From 82942d9cce6b4c3b93d147bcac8ca4a599017fec Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Dec 1998 22:00:30 +0000 Subject: [PATCH 0001/8469] Initial checkin of distutils source files. --- __init__.py | 0 version.py | 301 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 301 insertions(+) create mode 100644 __init__.py create mode 100644 version.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/version.py b/version.py new file mode 100644 index 0000000000..918a1ded43 --- /dev/null +++ b/version.py @@ -0,0 +1,301 @@ +# +# distutils/version.py +# +# Implements multiple version numbering conventions for the +# Python Module Distribution Utilities. +# +# written by Greg Ward, 1998/12/17 +# +# $Id$ +# + +"""Provides classes to represent module version numbers (one class for +each style of version numbering). There are currently two such classes +implemented: StrictVersion and LooseVersion. + +Every version number class implements the following interface: + * the 'parse' method takes a string and parses it to some internal + representation; if the string is an invalid version number, + 'parse' raises a ValueError exception + * the class constructor takes an optional string argument which, + if supplied, is passed to 'parse' + * __str__ reconstructs the string that was passed to 'parse' (or + an equivalent string -- ie. one that will generate an equivalent + version number instance) + * __repr__ generates Python code to recreate the version number instance + * __cmp__ compares the current instance with either another instance + of the same class or a string (which will be parsed to an instance + of the same class, thus must follow the same rules) +""" + +import string, re +from types import StringType + +class Version: + """Abstract base class for version numbering classes. Just provides + constructor (__init__) and reproducer (__repr__), because those + seem to be the same for all version numbering classes. + """ + + def __init__ (self, vstring=None): + if vstring: + self.parse (vstring) + + def __repr__ (self): + return "%s ('%s')" % (self.__class__.__name__, str (self)) + + +# Interface for version-number classes -- must be implemented +# by the following classes (the concrete ones -- Version should +# be treated as an abstract class). +# __init__ (string) - create and take same action as 'parse' +# (string parameter is optional) +# parse (string) - convert a string representation to whatever +# internal representation is appropriate for +# this style of version numbering +# __str__ (self) - convert back to a string; should be very similar +# (if not identical to) the string supplied to parse +# __repr__ (self) - generate Python code to recreate +# the instance +# __cmp__ (self, other) - compare two version numbers ('other' may +# be an unparsed version string, or another +# instance of your version class) + + +class StrictVersion (Version): + + """Version numbering for anal retentives and software idealists. + Implements the standard interface for version number classes as + described above. A version number consists of two or three + dot-separated numeric components, with an optional "pre-release" tag + on the end. The pre-release tag consists of the letter 'a' or 'b' + followed by a number. If the numeric components of two version + numbers are equal, then one with a pre-release tag will always + be deemed earlier (lesser) than one without. + + The following are valid version numbers (shown in the order that + would be obtained by sorting according to the supplied cmp function): + + 0.4 0.4.0 (these two are equivalent) + 0.4.1 + 0.5a1 + 0.5b3 + 0.5 + 0.9.6 + 1.0 + 1.0.4a3 + 1.0.4b1 + 1.0.4 + + The following are examples of invalid version numbers: + + 1 + 2.7.2.2 + 1.3.a4 + 1.3pl1 + 1.3c4 + + The rationale for this version numbering system will be explained + in the distutils documentation. + """ + + version_re = re.compile (r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', + re.VERBOSE) + + + def parse (self, vstring): + match = self.version_re.match (vstring) + if not match: + raise ValueError, "invalid version number '%s'" % vstring + + (major, minor, patch, prerelease, prerelease_num) = \ + match.group (1, 2, 4, 5, 6) + + if patch: + self.version = tuple (map (string.atoi, [major, minor, patch])) + else: + self.version = tuple (map (string.atoi, [major, minor]) + [0]) + + if prerelease: + self.prerelease = (prerelease[0], string.atoi (prerelease_num)) + else: + self.prerelease = None + + + def __str__ (self): + + if self.version[2] == 0: + vstring = string.join (map (str, self.version[0:2]), '.') + else: + vstring = string.join (map (str, self.version), '.') + + if self.prerelease: + vstring = vstring + self.prerelease[0] + str (self.prerelease[1]) + + return vstring + + + def __cmp__ (self, other): + if isinstance (other, StringType): + other = StrictVersion (other) + + compare = cmp (self.version, other.version) + if (compare == 0): # have to compare prerelease + + # case 1: neither has prerelease; they're equal + # case 2: self has prerelease, other doesn't; other is greater + # case 3: self doesn't have prerelease, other does: self is greater + # case 4: both have prerelease: must compare them! + + if (not self.prerelease and not other.prerelease): + return 0 + elif (self.prerelease and not other.prerelease): + return -1 + elif (not self.prerelease and other.prerelease): + return 1 + elif (self.prerelease and other.prerelease): + return cmp (self.prerelease, other.prerelease) + + else: # numeric versions don't match -- + return compare # prerelease stuff doesn't matter + + +# end class StrictVersion + + +# The rules according to Greg Stein: +# 1) a version number has 1 or more numbers separate by a period or by +# sequences of letters. If only periods, then these are compared +# left-to-right to determine an ordering. +# 2) sequences of letters are part of the tuple for comparison and are +# compared lexicographically +# 3) recognize the numeric components may have leading zeroes +# +# The LooseVersion class below implements these rules: a version number +# string is split up into a tuple of integer and string components, and +# comparison is a simple tuple comparison. This means that version +# numbers behave in a predictable and obvious way, but a way that might +# not necessarily be how people *want* version numbers to behave. There +# wouldn't be a problem if people could stick to purely numeric version +# numbers: just split on period and compare the numbers as tuples. +# However, people insist on putting letters into their version numbers; +# the most common purpose seems to be: +# - indicating a "pre-release" version +# ('alpha', 'beta', 'a', 'b', 'pre', 'p') +# - indicating a post-release patch ('p', 'pl', 'patch') +# but of course this can't cover all version number schemes, and there's +# no way to know what a programmer means without asking him. +# +# The problem is what to do with letters (and other non-numeric +# characters) in a version number. The current implementation does the +# obvious and predictable thing: keep them as strings and compare +# lexically within a tuple comparison. This has the desired effect if +# an appended letter sequence implies something "post-release": +# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002". +# +# However, if letters in a version number imply a pre-release version, +# the "obvious" thing isn't correct. Eg. you would expect that +# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison +# implemented here, this just isn't so. +# +# Two possible solutions come to mind. The first is to tie the +# comparison algorithm to a particular set of semantic rules, as has +# been done in the StrictVersion class above. This works great as long +# as everyone can go along with bondage and discipline. Hopefully a +# (large) subset of Python module programmers will agree that the +# particular flavour of bondage and discipline provided by StrictVersion +# provides enough benefit to be worth using, and will submit their +# version numbering scheme to its domination. The free-thinking +# anarchists in the lot will never give in, though, and something needs +# to be done to accomodate them. +# +# Perhaps a "moderately strict" version class could be implemented that +# lets almost anything slide (syntactically), and makes some heuristic +# assumptions about non-digits in version number strings. This could +# sink into special-case-hell, though; if I was as talented and +# idiosyncratic as Larry Wall, I'd go ahead and implement a class that +# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is +# just as happy dealing with things like "2g6" and "1.13++". I don't +# think I'm smart enough to do it right though. +# +# In any case, I've coded the test suite for this module (see +# ../test/test_version.py) specifically to fail on things like comparing +# "1.2a2" and "1.2". That's not because the *code* is doing anything +# wrong, it's because the simple, obvious design doesn't match my +# complicated, hairy expectations for real-world version numbers. It +# would be a snap to fix the test suite to say, "Yep, LooseVersion does +# the Right Thing" (ie. the code matches the conception). But I'd rather +# have a conception that matches common notions about version numbers. + +class LooseVersion (Version): + + """Version numbering for anarchists and software realists. + Implements the standard interface for version number classes as + described above. A version number consists of a series of numbers, + separated by either periods or strings of letters. When comparing + version numbers, the numeric components will be compared + numerically, and the alphabetic components lexically. The following + are all valid version numbers, in no particular order: + + 1.5.1 + 1.5.2b2 + 161 + 3.10a + 8.02 + 3.4j + 1996.07.12 + 3.2.pl0 + 3.1.1.6 + 2g6 + 11g + 0.960923 + 2.2beta29 + 1.13++ + 5.5.kw + 2.0b1pl0 + + In fact, there is no such thing as an invalid version number under + this scheme; the rules for comparison are simple and predictable, + but may not always give the results you want (for some definition + of "want"). + """ + + component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE) + + def __init__ (self, vstring=None): + if vstring: + self.parse (vstring) + + + def parse (self, vstring): + # I've given up on thinking I can reconstruct the version string + # from the parsed tuple -- so I just store the string here for + # use by __str__ + self.vstring = vstring + components = filter (lambda x: x and x != '.', + self.component_re.split (vstring)) + for i in range (len (components)): + try: + components[i] = int (components[i]) + except ValueError: + pass + + self.version = components + + + def __str__ (self): + return self.vstring + + + def __repr__ (self): + return "LooseVersion ('%s')" % str (self) + + + def __cmp__ (self, other): + if isinstance (other, StringType): + other = LooseVersion (other) + + return cmp (self.version, other.version) + + +# end class LooseVersion From 5e72268255a51c78cbeb6ef82a66af3c7b90cef8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Dec 1998 23:46:33 +0000 Subject: [PATCH 0002/8469] Fred's sysconfig module. --- sysconfig.py | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sysconfig.py diff --git a/sysconfig.py b/sysconfig.py new file mode 100644 index 0000000000..b5fe1874e1 --- /dev/null +++ b/sysconfig.py @@ -0,0 +1,106 @@ +"""Prototype sysconfig module that loads information when run as a script, +but only defines constants when imported. + +This should be run as a script as one of the last steps of the Python +installation process. + +Written by: Fred L. Drake, Jr. +Email: +Initial date: 17-Dec-1998 +""" + +__version__ = "$Revision$" + + +def _init_posix(): + import os + import re + import sys + + g = globals() + + version = sys.version[:3] + config_dir = os.path.join( + sys.exec_prefix, "lib", "python" + version, "config") + + # load the installed config.h: + define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") + undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") + fp = open(os.path.join(config_dir, "config.h")) + + while 1: + line = fp.readline() + if not line: + break + m = define_rx.match(line) + if m: + n, v = m.group(1, 2) + if v == "1": + g[n] = 1 + else: + g[n] = v + else: + m = undef_rx.match(line) + if m: + g[m.group(1)] = 0 + + # load the installed Makefile.pre.in: + variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)\n") + done = {} + notdone = {} + fp = open(os.path.join(config_dir, "Makefile")) + + while 1: + line = fp.readline() + if not line: + break + m = variable_rx.match(line) + if m: + n, v = m.group(1, 2) + if "$" in v: + notdone[n] = v + else: + done[n] = v + + # do variable interpolation here + findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)") + findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") + while notdone: + for name in notdone.keys(): + value = notdone[name] + m = findvar1_rx.search(value) + if not m: + m = findvar2_rx.search(value) + if m: + n = m.group(1) + if done.has_key(n): + after = value[m.end():] + value = value[:m.start()] + done[n] + after + if "$" in after: + notdone[name] = value + else: + done[name] = value + del notdone[name] + elif notdone.has_key(n): + # get it on a subsequent round + pass + else: + done[n] = "" + after = value[m.end():] + value = value[:m.start()] + after + if "$" in after: + notdone[name] = value + else: + done[name] = value + del notdone[name] + else: + del notdone[name] + + # save the results in the global dictionary + g.update(done) + + +import os +exec "_init_%s()" % os.name +del os +del _init_posix From 53be0347c57aecd9b1144d71edeb727f86d6ffa0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 22 Dec 1998 12:42:04 +0000 Subject: [PATCH 0003/8469] Applied Fred's patch to fix the bugs that John Skaller noticed. --- sysconfig.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index b5fe1874e1..3eee9b3507 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -15,6 +15,7 @@ def _init_posix(): import os import re + import string import sys g = globals() @@ -35,10 +36,9 @@ def _init_posix(): m = define_rx.match(line) if m: n, v = m.group(1, 2) - if v == "1": - g[n] = 1 - else: - g[n] = v + try: v = string.atoi(v) + except ValueError: pass + g[n] = v else: m = undef_rx.match(line) if m: @@ -57,9 +57,12 @@ def _init_posix(): m = variable_rx.match(line) if m: n, v = m.group(1, 2) + v = string.strip(v) if "$" in v: notdone[n] = v else: + try: v = string.atoi(v) + except ValueError: pass done[n] = v # do variable interpolation here @@ -79,7 +82,9 @@ def _init_posix(): if "$" in after: notdone[name] = value else: - done[name] = value + try: value = string.atoi(value) + except ValueError: pass + done[name] = string.strip(value) del notdone[name] elif notdone.has_key(n): # get it on a subsequent round @@ -91,9 +96,12 @@ def _init_posix(): if "$" in after: notdone[name] = value else: - done[name] = value + try: value = string.atoi(value) + except ValueError: pass + done[name] = string.strip(value) del notdone[name] else: + # bogus variable reference; just drop it since we can't deal del notdone[name] # save the results in the global dictionary From bb0ab0bba658a8f0467ed870bcc687aab0d1d4ff Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 6 Jan 1999 14:46:06 +0000 Subject: [PATCH 0004/8469] Another patch from Fred: factored _init_posix into get_config_h_filename, get_makefile_filename, parse_config_h, and parse_makefile. --- sysconfig.py | 55 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 3eee9b3507..1d8231abc7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -11,24 +11,26 @@ __version__ = "$Revision$" +import os +import re +import string +import sys -def _init_posix(): - import os - import re - import string - import sys - g = globals() +def get_config_h_filename(): + return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], + "config", "config.h") - version = sys.version[:3] - config_dir = os.path.join( - sys.exec_prefix, "lib", "python" + version, "config") +def get_makefile_filename(): + return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], + "config", "Makefile") - # load the installed config.h: +def parse_config_h(fp, g=None): + if g is None: + g = {} define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") - fp = open(os.path.join(config_dir, "config.h")) - + # while 1: line = fp.readline() if not line: @@ -43,13 +45,15 @@ def _init_posix(): m = undef_rx.match(line) if m: g[m.group(1)] = 0 + return g - # load the installed Makefile.pre.in: +def parse_makefile(fp, g=None): + if g is None: + g = {} variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)\n") done = {} notdone = {} - fp = open(os.path.join(config_dir, "Makefile")) - + # while 1: line = fp.readline() if not line: @@ -106,9 +110,24 @@ def _init_posix(): # save the results in the global dictionary g.update(done) + return g -import os -exec "_init_%s()" % os.name -del os +def _init_posix(): + g = globals() + # load the installed config.h: + parse_config_h(open(get_config_h_filename()), g) + # load the installed Makefile.pre.in: + parse_makefile(open(get_makefile_filename()), g) + + + +try: + exec "_init_" + os.name +except NameError: + # not needed for this platform + pass +else: + exec "_init_%s()" % os.name + del _init_posix From 4698daf69a1f9760e8870609c995bb18c14c7a62 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 6 Jan 1999 16:28:34 +0000 Subject: [PATCH 0005/8469] Update and add docstrings. --- sysconfig.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 1d8231abc7..04551a77aa 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -1,8 +1,5 @@ -"""Prototype sysconfig module that loads information when run as a script, -but only defines constants when imported. - -This should be run as a script as one of the last steps of the Python -installation process. +"""Provide access to Python's configuration information. The specific names +defined in the module depend heavily on the platform and configuration. Written by: Fred L. Drake, Jr. Email: @@ -18,14 +15,20 @@ def get_config_h_filename(): + """Return full pathname of installed config.h file.""" return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], "config", "config.h") def get_makefile_filename(): + """Return full pathname of installed Makefile from the Python build.""" return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], "config", "Makefile") def parse_config_h(fp, g=None): + """Parse a config.h-style file. A dictionary containing name/value + pairs is returned. If an optional dictionary is passed in as the second + argument, it is used instead of a new dictionary. + """ if g is None: g = {} define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") @@ -48,6 +51,10 @@ def parse_config_h(fp, g=None): return g def parse_makefile(fp, g=None): + """Parse a Makefile-style file. A dictionary containing name/value + pairs is returned. If an optional dictionary is passed in as the second + argument, it is used instead of a new dictionary. + """ if g is None: g = {} variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)\n") @@ -114,6 +121,7 @@ def parse_makefile(fp, g=None): def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" g = globals() # load the installed config.h: parse_config_h(open(get_config_h_filename()), g) From 18d23e41a229ed4ec07f17ed7499bd1cdbfab606 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 11 Jan 1999 15:34:55 +0000 Subject: [PATCH 0006/8469] get_config_h_filename(): Fix to work with current Python installations; it was picking up a stale config.h from an overwritten installation. --- sysconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 04551a77aa..e71ae4668a 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -16,8 +16,8 @@ def get_config_h_filename(): """Return full pathname of installed config.h file.""" - return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], - "config", "config.h") + return os.path.join(sys.exec_prefix, "include", "python" + sys.version[:3], + "config.h") def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" From 7c5088ade77bf14bf5ca03309fd684093733c1e9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 13 Jan 1999 16:12:04 +0000 Subject: [PATCH 0007/8469] Added: mems.lib.text_file: provides TextFile class for parsing text files with (optional) comment stripping, blank line skipping, whitespace removal, and line joining with trailing backslashes. --- text_file.py | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 text_file.py diff --git a/text_file.py b/text_file.py new file mode 100644 index 0000000000..9fff941ec9 --- /dev/null +++ b/text_file.py @@ -0,0 +1,206 @@ +"""text_file + +provides the TextFile class, which gives an interface to text files +that (optionally) takes care of stripping comments, ignoring blank +lines, and joining lines with backslashes.""" + +# created 1999/01/12, Greg Ward + +__revision__ = "$Id$" + +from types import * +import os, string, re + + +class TextFile: + filename = None + file = None + current_line = None + + default_options = { 'strip_comments': 1, + 'comment_re': re.compile (r'\s*#.*'), + 'skip_blanks': 1, + 'join_lines': 0, + 'lstrip_ws': 0, + 'rstrip_ws': 1, + } + + def __init__ (self, filename=None, **options): + + # set values for all options -- either from client option hash + # or fallback to default_options + for opt in self.default_options.keys(): + if options.has_key (opt): + if opt == 'comment_re' and type (options[opt]) is StringType: + self.comment_re = re.compile (options[opt]) + else: + setattr (self, opt, options[opt]) + + else: + setattr (self, opt, self.default_options[opt]) + + # sanity check client option hash + for opt in options.keys(): + if not self.default_options.has_key (opt): + raise KeyError, "invalid TextFile option '%s'" % opt + + self.filename = filename + if self.filename: + self.open () + + + def open (self, filename=None): + if not self.filename: + if not filename: + raise RuntimeError, "must provide a filename somehow" + + self.filename = filename + + self.file = open (self.filename, 'r') + self.current_line = 0 + + + def close (self): + self.file.close () + self.file = None + self.filename = None + self.current_line = None + + + def readline (self): + + buildup_line = '' + + while 1: + # read the line, optionally strip comments + line = self.file.readline() + if self.strip_comments and line: + line = self.comment_re.sub ('', line) + + # did previous line end with a backslash? then accumulate + if self.join_lines and buildup_line: + # oops: end of file + if not line: + self.warn ("continuation line immediately precedes " + "end-of-file") + return buildup_line + + line = buildup_line + line + + # careful: pay attention to line number when incrementing it + if type (self.current_line) is ListType: + self.current_line[1] = self.current_line[1] + 1 + else: + self.current_line = [self.current_line, self.current_line+1] + # just an ordinary line, read it as usual + else: + if not line: + return None + + # still have to be careful about incrementing the line number! + if type (self.current_line) is ListType: + self.current_line = self.current_line[1] + 1 + else: + self.current_line = self.current_line + 1 + + + # strip whitespace however the client wants (leading and + # trailing, or one or the other, or neither) + if self.lstrip_ws and self.rstrip_ws: + line = string.strip (line) + else: + if self.lstrip_ws: + line = string.lstrip (line) + if self.rstrip_ws: + line = string.rstrip (line) + + # blank line (whether we rstrip'ed or not)? skip to next line + # if appropriate + if line == '' or line == '\n' and self.skip_blanks: + continue + + if self.join_lines: + if line[-1] == '\\': + buildup_line = line[:-1] + continue + + if line[-2:] == '\\\n': + buildup_line = line[0:-2] + '\n' + continue + + # well, I guess there's some actual content there: return it + return line + + # end readline + + + def readlines (self): + lines = [] + while 1: + line = self.readline() + if line is None: + return lines + lines.append (line) + + +if __name__ == "__main__": + test_data = """# test file + +line 3 \\ +continues on next line +""" + + # result 1: no fancy options + result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) + + # result 2: just strip comments + result2 = ["\n", "\n", "line 3 \\\n", "continues on next line\n"] + + # result 3: just strip blank lines + result3 = ["# test file\n", "line 3 \\\n", "continues on next line\n"] + + # result 4: default, strip comments, blank lines, and trailing whitespace + result4 = ["line 3 \\", "continues on next line"] + + # result 5: full processing, strip comments and blanks, plus join lines + result5 = ["line 3 continues on next line"] + + def test_input (count, description, file, expected_result): + result = file.readlines () + # result = string.join (result, '') + if result == expected_result: + print "ok %d (%s)" % (count, description) + else: + print "not ok %d (%s):" % (count, description) + print "** expected:" + print expected_result + print "** received:" + print result + + + filename = "test.txt" + out_file = open (filename, "w") + out_file.write (test_data) + out_file.close () + + in_file = TextFile (filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (1, "no processing", in_file, result1) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (2, "strip comments", in_file, result2) + + in_file = TextFile (filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + test_input (3, "strip blanks", in_file, result3) + + in_file = TextFile (filename) + test_input (4, "default processing", in_file, result4) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + test_input (5, "full processing", in_file, result5) + + os.remove (filename) + From e57683381739ada3b56e7fc02e52b4c81f7defea Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 18 Jan 1999 17:08:16 +0000 Subject: [PATCH 0008/8469] Added 'warn' method. --- text_file.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/text_file.py b/text_file.py index 9fff941ec9..9e1a73b798 100644 --- a/text_file.py +++ b/text_file.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" from types import * -import os, string, re +import sys, os, string, re class TextFile: @@ -67,6 +67,15 @@ def close (self): self.current_line = None + def warn (self, msg): + sys.stderr.write (self.filename + ", ") + if type (self.current_line) is ListType: + sys.stderr.write ("lines %d-%d: " % tuple (self.current_line)) + else: + sys.stderr.write ("line %d: " % self.current_line) + sys.stderr.write (msg + "\n") + + def readline (self): buildup_line = '' From ecab4f612281cac63885b065866195177947e5e3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 8 Mar 1999 21:46:11 +0000 Subject: [PATCH 0009/8469] Added collapse_ws option. --- text_file.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/text_file.py b/text_file.py index 9e1a73b798..eab498d76c 100644 --- a/text_file.py +++ b/text_file.py @@ -23,6 +23,7 @@ class TextFile: 'join_lines': 0, 'lstrip_ws': 0, 'rstrip_ws': 1, + 'collapse_ws': 0, } def __init__ (self, filename=None, **options): @@ -137,6 +138,10 @@ def readline (self): buildup_line = line[0:-2] + '\n' continue + # collapse internal whitespace (*after* joining lines!) + if self.collapse_ws: + line = re.sub (r'(\S)\s+(\S)', r'\1 \2', line) + # well, I guess there's some actual content there: return it return line From 681a078a9561a64f87802bbe5d7d1e3f7abb4208 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 22 Mar 1999 14:52:19 +0000 Subject: [PATCH 0010/8469] First checkin of real Distutils code. --- core.py | 597 ++++++++++++++++++++++++++++++++++++++++++++++++ errors.py | 63 +++++ fancy_getopt.py | 115 ++++++++++ options.py | 111 +++++++++ util.py | 245 ++++++++++++++++++++ 5 files changed, 1131 insertions(+) create mode 100644 core.py create mode 100644 errors.py create mode 100644 fancy_getopt.py create mode 100644 options.py create mode 100644 util.py diff --git a/core.py b/core.py new file mode 100644 index 0000000000..3a7443c78e --- /dev/null +++ b/core.py @@ -0,0 +1,597 @@ +"""distutils.core + +The only module that needs to be imported to use the Distutils; provides +the 'setup' function (which must be called); the 'Distribution' class +(which may be subclassed if additional functionality is desired), and +the 'Command' class (which is used both internally by Distutils, and +may be subclassed by clients for still more flexibility).""" + +# created 1999/03/01, Greg Ward + +__rcsid__ = "$Id$" + +import sys +import string, re +from distutils.errors import * +from distutils.fancy_getopt import fancy_getopt + +# This is not *quite* the same as a Python NAME; I don't allow leading +# underscores. The fact that they're very similar is no coincidence... +command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') + +# Defining this as a global is probably inadequate -- what about +# listing the available options (or even commands, which can vary +# quite late as well) +usage = '%s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]' % sys.argv[0] + + + +def setup (**attrs): + """The gateway to the Distutils: do everything your setup script + needs to do, in a highly flexible and user-driven way. Briefly: + create a Distribution instance; parse the command-line, creating + and customizing instances of the command class for each command + found on the command-line; run each of those commands. + + The Distribution instance might be an instance of a class + supplied via the 'distclass' keyword argument to 'setup'; if no + such class is supplied, then the 'Distribution' class (also in + this module) is instantiated. All other arguments to 'setup' + (except for 'cmdclass') are used to set attributes of the + Distribution instance. + + The 'cmdclass' argument, if supplied, is a dictionary mapping + command names to command classes. Each command encountered on the + command line will be turned into a command class, which is in turn + instantiated; any class found in 'cmdclass' is used in place of the + default, which is (for command 'foo_bar') class 'FooBar' in module + 'distutils.command.foo_bar'. The command object must provide an + 'options' attribute which is a list of option specifiers for + 'distutils.fancy_getopt'. Any command-line options between the + current and the next command are used to set attributes in the + current command object. + + When the entire command-line has been successfully parsed, calls the + 'run' method on each command object in turn. This method will be + driven entirely by the Distribution object (which each command + object has a reference to, thanks to its constructor), and the + command-specific options that became attributes of each command + object.""" + + # Determine the distribution class -- either caller-supplied or + # our Distribution (see below). + klass = attrs.get ('distclass') + if klass: + del attrs['distclass'] + else: + klass = Distribution + + # Create the Distribution instance, using the remaining arguments + # (ie. everything except distclass) to initialize it + dist = klass (attrs) + + # Get it to parse the command line; any command-line errors are + # the end-users fault, so turn them into SystemExit to suppress + # tracebacks. + try: + dist.parse_command_line (sys.argv[1:]) + except DistutilsArgError, msg: + raise SystemExit, msg + + # And finally, run all the commands found on the command line. + dist.run_commands () + +# setup () + + +class Distribution: + """The core of the Distutils. Most of the work hiding behind + 'setup' is really done within a Distribution instance, which + farms the work out to the Distutils commands specified on the + command line. + + Clients will almost never instantiate Distribution directly, + unless the 'setup' function is totally inadequate to their needs. + However, it is conceivable that a client might wish to subclass + Distribution for some specialized purpose, and then pass the + subclass to 'setup' as the 'distclass' keyword argument. If so, + it is necessary to respect the expectations that 'setup' has of + Distribution: it must have a constructor and methods + 'parse_command_line()' and 'run_commands()' with signatures like + those described below.""" + + + # 'global_options' describes the command-line options that may + # be supplied to the client (setup.py) prior to any actual + # commands. Eg. "./setup.py -nv" or "./setup.py --verbose" + # both take advantage of these global options. + global_options = [('verbose', 'v', "run verbosely"), + ('dry-run', 'n', "don't actually do anything"), + ] + + + # -- Creation/initialization methods ------------------------------- + + def __init__ (self, attrs=None): + """Construct a new Distribution instance: initialize all the + attributes of a Distribution, and then uses 'attrs' (a + dictionary mapping attribute names to values) to assign + some of those attributes their "real" values. (Any attributes + not mentioned in 'attrs' will be assigned to some null + value: 0, None, an empty list or dictionary, etc.) Most + importantly, initialize the 'command_obj' attribute + to the empty dictionary; this will be filled in with real + command objects by 'parse_command_line()'.""" + + # Default values for our command-line options + self.verbose = 0 + self.dry_run = 0 + + # And for all other attributes (stuff that might be passed in + # from setup.py, rather than from the end-user) + self.name = None + self.version = None + self.author = None + self.licence = None + self.description = None + + self.cmdclass = {} + + # The rest of these are really the business of various commands, + # rather than of the Distribution itself. However, they have + # to be here as a conduit to the relevant command class. + self.py_modules = None + self.ext_modules = None + self.package = None + + # Now we'll use the attrs dictionary to possibly override + # any or all of these distribution options + if attrs: + for k in attrs.keys(): + setattr (self, k, attrs[k]) + + # And now initialize bookkeeping stuff that can't be supplied by + # the caller at all + self.command_obj = {} + + # __init__ () + + + def parse_command_line (self, args): + """Parse the client's command line: set any Distribution + attributes tied to command-line options, create all command + objects, and set their options from the command-line. 'args' + must be a list of command-line arguments, most likely + 'sys.argv[1:]' (see the 'setup()' function). This list is + first processed for "global options" -- options that set + attributes of the Distribution instance. Then, it is + alternately scanned for Distutils command and options for + that command. Each new command terminates the options for + the previous command. The allowed options for a command are + determined by the 'options' attribute of the command object + -- thus, we instantiate (and cache) every command object + here, in order to access its 'options' attribute. Any error + in that 'options' attribute raises DistutilsGetoptError; any + error on the command-line raises DistutilsArgError. If no + Distutils commands were found on the command line, raises + DistutilsArgError.""" + + # We have to parse the command line a bit at a time -- global + # options, then the first command, then its options, and so on -- + # because each command will be handled by a different class, and + # the options that are valid for a particular class aren't + # known until we instantiate the command class, which doesn't + # happen until we know what the command is. + + self.commands = [] + args = fancy_getopt (self.global_options, self, sys.argv[1:]) + + while args: + # Pull the current command from the head of the command line + command = args[0] + if not command_re.match (command): + raise SystemExit, "invalid command name '%s'" % command + self.commands.append (command) + + # Have to instantiate the command class now, so we have a + # way to get its valid options and somewhere to put the + # results of parsing its share of the command-line + cmd_obj = self.create_command_obj (command) + + # Require that the command class be derived from Command -- + # that way, we can be sure that we at least have the 'run' + # and 'get_option' methods. + if not isinstance (cmd_obj, Command): + raise DistutilsClassError, \ + "command class %s must subclass Command" % \ + cmd_obj.__class__ + + # XXX this assumes that cmd_obj provides an 'options' + # attribute, but we're not enforcing that anywhere! + args = fancy_getopt (cmd_obj.options, cmd_obj, args[1:]) + self.command_obj[command] = cmd_obj + + # while args + + # Oops, no commands found -- an end-user error + if not self.commands: + sys.stderr.write (usage + "\n") + raise DistutilsArgError, "no commands supplied" + + # parse_command_line() + + + # -- Command class/object methods ---------------------------------- + + # This is a method just so it can be overridden if desired; it doesn't + # actually use or change any attributes of the Distribution instance. + def find_command_class (self, command): + """Given a command, derives the names of the module and class + expected to implement the command: eg. 'foo_bar' becomes + 'distutils.command.foo_bar' (the module) and 'FooBar' (the + class within that module). Loads the module, extracts the + class from it, and returns the class object. + + Raises DistutilsModuleError with a semi-user-targeted error + message if the expected module could not be loaded, or the + expected class was not found in it.""" + + module_name = 'distutils.command.' + command + klass_name = string.join \ + (map (string.capitalize, string.split (command, '_')), '') + + try: + __import__ (module_name) + module = sys.modules[module_name] + except ImportError: + raise DistutilsModuleError, \ + "invalid command '%s' (no module named %s)" % \ + (command, module_name) + + try: + klass = vars(module)[klass_name] + except KeyError: + raise DistutilsModuleError, \ + "invalid command '%s' (no class '%s' in module '%s')" \ + % (command, klass_name, module_name) + + return klass + + # find_command_class () + + + def create_command_obj (self, command): + """Figure out the class that should implement a command, + instantiate it, cache and return the new "command object". + The "command class" is determined either by looking it up in + the 'cmdclass' attribute (this is the mechanism whereby + clients may override default Distutils commands or add their + own), or by calling the 'find_command_class()' method (if the + command name is not in 'cmdclass'.""" + + # Determine the command class -- either it's in the command_class + # dictionary, or we have to divine the module and class name + klass = self.cmdclass.get(command) + if not klass: + klass = self.find_command_class (command) + self.cmdclass[command] = klass + + # Found the class OK -- instantiate it + cmd_obj = klass (self) + return cmd_obj + + + def find_command_obj (self, command, create=1): + """Look up and return a command object in the cache maintained by + 'create_command_obj()'. If none found, the action taken + depends on 'create': if true (the default), create a new + command object by calling 'create_command_obj()' and return + it; otherwise, return None.""" + + cmd_obj = self.command_obj.get (command) + if not cmd_obj and create: + cmd_obj = self.create_command_obj (command) + self.command_obj[command] = cmd_obj + + return cmd_obj + + + # -- Methods that operate on the Distribution ---------------------- + + def announce (self, msg, level=1): + """Print 'msg' if 'level' is greater than or equal to the verbosity + level recorded in the 'verbose' attribute (which, currently, + can be only 0 or 1).""" + + if self.verbose >= level: + print msg + + + def run_commands (self): + """Run each command that was seen on the client command line. + Uses the list of commands found and cache of command objects + created by 'create_command_obj()'.""" + + for cmd in self.commands: + self.run_command (cmd) + + + def get_option (self, option): + """Return the value of a distribution option. Raise + DistutilsOptionError if 'option' is not known.""" + + try: + return getattr (self, opt) + except AttributeError: + raise DistutilsOptionError, \ + "unknown distribution option %s" % option + + + def get_options (self, *options): + """Return (as a tuple) the values of several distribution + options. Raise DistutilsOptionError if any element of + 'options' is not known.""" + + values = [] + try: + for opt in options: + values.append (getattr (self, opt)) + except AttributeError, name: + raise DistutilsOptionError, \ + "unknown distribution option %s" % name + + return tuple (values) + + + # -- Methods that operate on its Commands -------------------------- + + def run_command (self, command): + """Create a command object for 'command' if necessary, and + run the command by invoking its 'run()' method.""" + + self.announce ("running " + command) + cmd_obj = self.find_command_obj (command) + cmd_obj.run () + + + def get_command_option (self, command, option): + """Create a command object for 'command' if necessary, finalize + its option values by invoking its 'set_final_options()' + method, and return the value of its 'option' option. Raise + DistutilsOptionError if 'option' is not known for + that 'command'.""" + + cmd_obj = self.find_command_obj (command) + cmd_obj.set_final_options () + return cmd_obj.get_option (option) + try: + return getattr (cmd_obj, option) + except AttributeError: + raise DistutilsOptionError, \ + "command %s: no such option %s" % (command, option) + + + def get_command_options (self, command, *options): + """Create a command object for 'command' if necessary, finalize + its option values by invoking its 'set_final_options()' + method, and return the values of all the options listed in + 'options' for that command. Raise DistutilsOptionError if + 'option' is not known for that 'command'.""" + + cmd_obj = self.find_command_obj (command) + cmd_obj.set_final_options () + values = [] + try: + for opt in options: + values.append (getattr (cmd_obj, option)) + except AttributeError, name: + raise DistutilsOptionError, \ + "command %s: no such option %s" % (command, name) + + return tuple (values) + +# end class Distribution + + +class Command: + """Abstract base class for defining command classes, the "worker bees" + of the Distutils. A useful analogy for command classes is to + think of them as subroutines with local variables called + "options". The options are "declared" in 'set_initial_options()' + and "initialized" (given their real values) in + 'set_final_options()', both of which must be defined by every + command class. The distinction between the two is necessary + because option values might come from the outside world (command + line, option file, ...), and any options dependent on other + options must be computed *after* these outside influences have + been processed -- hence 'set_final_values()'. The "body" of the + subroutine, where it does all its work based on the values of its + options, is the 'run()' method, which must also be implemented by + every command class.""" + + # -- Creation/initialization methods ------------------------------- + + def __init__ (self, dist): + """Create and initialize a new Command object. Most importantly, + invokes the 'set_default_options()' method, which is the + real initializer and depends on the actual command being + instantiated.""" + + if not isinstance (dist, Distribution): + raise TypeError, "dist must be a Distribution instance" + if self.__class__ is Command: + raise RuntimeError, "Command is an abstract class" + + self.distribution = dist + self.set_default_options () + + # end __init__ () + + # Subclasses must define: + # set_default_options() + # provide default values for all options; may be overridden + # by Distutils client, by command-line options, or by options + # from option file + # set_final_options() + # decide on the final values for all options; this is called + # after all possible intervention from the outside world + # (command-line, option file, etc.) has been processed + # run() + # run the command: do whatever it is we're here to do, + # controlled by the command's various option values + + def set_default_options (self): + """Set default values for all the options that this command + supports. Note that these defaults may be overridden + by the command-line supplied by the user; thus, this is + not the place to code dependencies between options; generally, + 'set_default_options()' implementations are just a bunch + of "self.foo = None" assignments. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def set_final_options (self): + """Set final values for all the options that this command + supports. This is always called as late as possible, ie. + after any option assignments from the command-line or from + other commands have been done. Thus, this is the place to to + code option dependencies: if 'foo' depends on 'bar', then it + is safe to set 'foo' from 'bar' as long as 'foo' still has + the same value it was assigned in 'set_default_options()'. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def run (self): + """A command's raison d'etre: carry out the action it exists + to perform, controlled by the options initialized in + 'set_initial_options()', customized by the user and other + commands, and finalized in 'set_final_options()'. All + terminal output and filesystem interaction should be done by + 'run()'. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def announce (self, msg, level=1): + """If the Distribution instance to which this command belongs + has a verbosity level of greater than or equal to 'level' + print 'msg' to stdout.""" + if self.distribution.verbose >= level: + print msg + + + # -- Option query/set methods -------------------------------------- + + def get_option (self, option): + """Return the value of a single option for this command. Raise + DistutilsOptionError if 'option' is not known.""" + try: + return getattr (self, option) + except AttributeError: + raise DistutilsOptionError, \ + "command %s: no such option %s" % \ + (self.command_name(), option) + + + def get_options (self, *options): + """Return (as a tuple) the values of several options for this + command. Raise DistutilsOptionError if any of the options in + 'options' are not known.""" + + values = [] + try: + for opt in options: + values.append (getattr (self, opt)) + except AttributeError, name: + raise DistutilsOptionError, \ + "command %s: no such option %s" % \ + (self.command_name(), name) + + return tuple (values) + + + def set_option (self, option, value): + """Set the value of a single option for this command. Raise + DistutilsOptionError if 'option' is not known.""" + + if not hasattr (self, option): + raise DistutilsOptionError, \ + "command %s: no such option %s" % \ + (self.command_name(), option) + if value is not None: + setattr (self, option, value) + + def set_options (self, **optval): + """Set the values of several options for this command. Raise + DistutilsOptionError if any of the options specified as + keyword arguments are not known.""" + + for k in optval.keys(): + if optval[k] is not None: + self.set_option (k, optval[k]) + + + # -- Convenience methods for commands ------------------------------ + + def set_undefined_options (self, src_cmd, *option_pairs): + """Set the values of any "undefined" options from corresponding + option values in some other command object. "Undefined" here + means "is None", which is the convention used to indicate + that an option has not been changed between + 'set_initial_values()' and 'set_final_values()'. Usually + called from 'set_final_values()' for options that depend on + some other command rather than another option of the same + command. 'src_cmd' is the other command from which option + values will be taken (a command object will be created for it + if necessary); the remaining arguments are + '(src_option,dst_option)' tuples which mean "take the value + of 'src_option' in the 'src_cmd' command object, and copy it + to 'dst_option' in the current command object".""" + + # Option_pairs: list of (src_option, dst_option) tuples + + src_cmd_obj = self.distribution.find_command_obj (src_cmd) + src_cmd_obj.set_final_options () + try: + for (src_option, dst_option) in option_pairs: + if getattr (self, dst_option) is None: + self.set_option (dst_option, + src_cmd_obj.get_option (src_option)) + except AttributeError, name: + # duh, which command? + raise DistutilsOptionError, "unknown option %s" % name + + + def set_peer_option (self, command, option, value): + """Attempt to simulate a command-line override of some option + value in another command. Creates a command object for + 'command' if necessary, sets 'option' to 'value', and invokes + 'set_final_options()' on that command object. This will only + have the desired effect if the command object for 'command' + has not previously been created. Generally this is used to + ensure that the options in 'command' dependent on 'option' + are computed, hopefully (but not necessarily) deriving from + 'value'. It might be more accurate to call this method + 'influence_dependent_peer_options()'.""" + + cmd_obj = self.distribution.find_command_obj (command) + cmd_obj.set_option (option, value) + cmd_obj.set_final_options () + + + def run_peer (self, command): + """Run some other command: uses the 'run_command()' method of + Distribution, which creates the command object if necessary + and then invokes its 'run()' method.""" + + self.distribution.run_command (command) + +# end class Command diff --git a/errors.py b/errors.py new file mode 100644 index 0000000000..6605ad2cb1 --- /dev/null +++ b/errors.py @@ -0,0 +1,63 @@ +"""distutils.errors + +Provides exceptions used by the Distutils modules. Note that Distutils +modules may raise standard exceptions; in particular, SystemExit is +usually raised for errors that are obviously the end-user's fault +(eg. bad command-line arguments). + +This module safe to use in "from ... import *" mode; it only exports +symbols whose names start with "Distutils" and end with "Error".""" + +# created 1999/03/03, Greg Ward + +__rcsid__ = "$Id$" + +from types import * + +if type (RuntimeError) is ClassType: + + # DistutilsError is the root of all Distutils evil. + class DistutilsError (Exception): + pass + + # DistutilsModuleError is raised if we are unable to load an expected + # module, or find an expected class within some module + class DistutilsModuleError (DistutilsError): + pass + + # DistutilsClassError is raised if we encounter a distribution or command + # class that's not holding up its end of the bargain. + class DistutilsClassError (DistutilsError): + pass + + # DistutilsGetoptError (help me -- I have JavaProgrammersDisease!) is + # raised if the option table provided to fancy_getopt is bogus. + class DistutilsGetoptError (DistutilsError): + pass + + # DistutilsArgError is raised by fancy_getopt in response to getopt.error; + # distutils.core then turns around and raises SystemExit from that. (Thus + # client code should never see DistutilsArgError.) + class DistutilsArgError (DistutilsError): + pass + + # DistutilsFileError is raised for any problems in the filesystem: + # expected file not found, etc. + class DistutilsFileError (DistutilsError): + pass + + # DistutilsOptionError is raised anytime an attempt is made to access + # (get or set) an option that does not exist for a particular command + # (or for the distribution itself). + class DistutilsOptionError (DistutilsError): + pass + +# String-based exceptions +else: + DistutilsError = 'DistutilsError' + DistutilsModuleError = 'DistutilsModuleError' + DistutilsClassError = 'DistutilsClassError' + DistutilsGetoptError = 'DistutilsGetoptError' + DistutilsArgError = 'DistutilsArgError' + DistutilsFileError = 'DistutilsFileError' + DistutilsOptionError = 'DistutilsOptionError' diff --git a/fancy_getopt.py b/fancy_getopt.py new file mode 100644 index 0000000000..c63ce61b8e --- /dev/null +++ b/fancy_getopt.py @@ -0,0 +1,115 @@ +"""distutils.fancy_getopt + +Wrapper around the standard getopt module that provides the following +additional features: + * short and long options are tied together + * options have help strings, so fancy_getopt could potentially + create a complete usage summary + * options set attributes of a passed-in object +""" + +# created 1999/03/03, Greg Ward + +__rcsid__ = "$Id$" + +import string, re +from types import * +import getopt +from distutils.errors import * + +# Much like command_re in distutils.core, this is close to but not quite +# the same as a Python NAME -- except, in the spirit of most GNU +# utilities, we use '-' in place of '_'. (The spirit of LISP lives on!) +# The similarities to NAME are again not a coincidence... +longopt_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9-]*)$') + +# This is used to translate long options to legitimate Python identifiers +# (for use as attributes of some object). +longopt_xlate = string.maketrans ('-', '_') + + +def fancy_getopt (options, object, args): + + # The 'options' table is a list of 3-tuples: + # (long_option, short_option, help_string) + # if an option takes an argument, its long_option should have '=' + # appended; short_option should just be a single character, no ':' in + # any case. If a long_option doesn't have a corresponding + # short_option, short_option should be None. All option tuples must + # have long options. + + # Build the short_opts string and long_opts list, remembering how + # the two are tied together + + short_opts = [] # we'll join 'em when done + long_opts = [] + short2long = {} + attr_name = {} + takes_arg = {} + + for (long, short, help) in options: + # Type-check the option names + if type (long) is not StringType or len (long) < 2: + raise DistutilsGetoptError, \ + "long option must be a string of length >= 2" + + if (not ((short is None) or + (type (short) is StringType and len (short) == 1))): + raise DistutilsGetoptError, \ + "short option must be None or string of length 1" + + long_opts.append (long) + + if long[-1] == '=': # option takes an argument? + if short: short = short + ':' + long = long[0:-1] + takes_arg[long] = 1 + else: + takes_arg[long] = 0 + + # Now enforce some bondage on the long option name, so we can later + # translate it to an attribute name in 'object'. Have to do this a + # bit late to make sure we've removed any trailing '='. + if not longopt_re.match (long): + raise DistutilsGetoptError, \ + ("invalid long option name '%s' " + + "(must be letters, numbers, hyphens only") % long + + attr_name[long] = string.translate (long, longopt_xlate) + if short: + short_opts.append (short) + short2long[short[0]] = long + + # end loop over 'options' + + short_opts = string.join (short_opts) + try: + (opts, args) = getopt.getopt (args, short_opts, long_opts) + except getopt.error, msg: + raise DistutilsArgError, msg + + for (opt, val) in opts: + if len (opt) == 2 and opt[0] == '-': # it's a short option + opt = short2long[opt[1]] + + elif len (opt) > 2 and opt[0:2] == '--': + opt = opt[2:] + + else: + raise RuntimeError, "getopt lies! (bad option string '%s')" % \ + opt + + attr = attr_name[opt] + if takes_arg[opt]: + setattr (object, attr, val) + else: + if val == '': + setattr (object, attr, 1) + else: + raise RuntimeError, "getopt lies! (bad value '%s')" % value + + # end loop over options found in 'args' + + return args + +# end fancy_getopt() diff --git a/options.py b/options.py new file mode 100644 index 0000000000..f6cae82dc5 --- /dev/null +++ b/options.py @@ -0,0 +1,111 @@ +# XXX this is ridiculous! if commands need to pass options around, +# they can just pass them via the 'run' method... what we REALLY need +# is a way for commands to get at each other, via the Distribution! + +class Options: + """Used by Distribution and Command to encapsulate distribution + and command options -- parsing them from command-line arguments, + passing them between the distribution and command objects, etc.""" + + # -- Creation/initialization methods ------------------------------- + + def __init__ (self, owner): + + # 'owner' is the object (presumably either a Distribution + # or Command instance) to which this set of options applies. + self.owner = owner + + # The option table: maps option names to dictionaries, which + # look something like: + # { 'longopt': long command-line option string (optional) + # 'shortopt': short option (1 char) (optional) + # 'type': 'string', 'boolean', or 'list' + # 'description': text description (eg. for help strings) + # 'default': default value for the option + # 'send': list of (cmd,option) tuples: send option down the line + # 'receive': (cmd,option) tuple: pull option from upstream + # } + self.table = {} + + + def set_basic_options (self, *options): + """Add very basic options: no separate longopt, no fancy typing, no + send targets or receive destination. The arguments should just + be {1..4}-tuples of + (name [, shortopt [, description [, default]]]) + If name ends with '=', the option takes a string argument; + otherwise it's boolean.""" + + for opt in options: + if not (type (opt) is TupleType and 1 <= len (opt) <= 4): + raise ValueError, \ + ("invalid basic option record '%s': " + \ + "must be tuple of length 1 .. 4") % opt + + elements = ('name', 'shortopt', 'description', 'default') + name = opt[0] + self.table[name] = {} + for i in range (1,4): + if len (opt) >= i: + self.table[name][elements[i]] = opt[i] + else: + break + + # set_basic_options () + + + def add_option (self, name, **args): + + # XXX should probably sanity-check the keys of args + self.table[name] = args + + + # ------------------------------------------------------------------ + + # These are in the order that they will execute in to ensure proper + # prioritizing of option sources -- the default value is the most + # basic; it can be overridden by "client options" (the keyword args + # passed from setup.py to the 'setup' function); they in turn lose to + # options passed in "from above" (ie. from the Distribution, or from + # higher-level Commands); these in turn may be overridden by + # command-line arguments (which come from the end-user, the runner of + # setup.py). Only when all this is done can we pass options down to + # other Commands. + + # Hmmm, it also matters in which order Commands are processed: should a + # command-line option to 'make_blib' take precedence over the + # corresponding value passed down from its boss, 'build'? + + def set_defaults (self): + pass + + def set_client_options (self, options): + # 'self' should be a Distribution instance for this one -- + # this is to process the kw args passed to 'setup' + pass + + def receive_option (self, option, value): + # do we need to know the identity of the sender? don't + # think we should -- too much B&D + + # oh, 'self' should be anything *but* a Distribution (ie. + # a Command instance) -- only Commands take orders from above! + # (ironically enough) + pass + + def parse_command_line (self, args): + # here, 'self' can usefully be either a Distribution (for parsing + # "global" command-line options) or a Command (for "command-specific" + # options) + pass + + + def send_option (self, option, dest): + # perhaps this should not take a dest, but send the option + # to all possible receivers? + pass + + + # ------------------------------------------------------------------ + +# class Options diff --git a/util.py b/util.py new file mode 100644 index 0000000000..7c13abe09d --- /dev/null +++ b/util.py @@ -0,0 +1,245 @@ +"""distutils.util + +General-purpose utility functions used throughout the Distutils +(especially in command classes). Mostly filesystem manipulation, but +not limited to that. The functions in this module generally raise +DistutilsFileError when they have problems with the filesystem, because +os.error in pre-1.5.2 Python only gives the error message and not the +file causing it.""" + +# created 1999/03/08, Greg Ward + +__rcsid__ = "$Id$" + +import os +from distutils.errors import * + + +# I don't use os.makedirs because a) it's new to Python 1.5.2, and +# b) it blows up if the directory already exists (I want to silently +# succeed in that case). +def mkpath (name, mode=0777, verbose=0): + """Create a directory and any missing ancestor directories. If the + directory already exists, return silently. Raise + DistutilsFileError if unable to create some directory along the + way (eg. some sub-path exists, but is a file rather than a + directory). If 'verbose' is true, print a one-line summary of + each mkdir to stdout.""" + + # XXX what's the better way to handle verbosity? print as we create + # each directory in the path (the current behaviour), or only announce + # the creation of the whole path, and force verbose=0 on all sub-calls? + + if os.path.isdir (name): + return + + (head, tail) = os.path.split (name) + tails = [tail] # stack of lone dirs to create + + while head and tail and not os.path.isdir (head): + #print "splitting '%s': " % head, + (head, tail) = os.path.split (head) + #print "to ('%s','%s')" % (head, tail) + tails.insert (0, tail) # push next higher dir onto stack + + #print "stack of tails:", tails + + # now 'head' contains the highest directory that already exists + for d in tails: + #print "head = %s, d = %s: " % (head, d), + head = os.path.join (head, d) + if verbose: + print "creating", head + try: + os.mkdir (head) + except os.error, (errno, errstr): + raise DistutilsFileError, "%s: %s" % (head, errstr) + +# mkpath () + + +def newer (file1, file2): + """Return true if file1 exists and is more recently modified than + file2, or if file1 exists and file2 doesn't. Return false if both + exist and file2 is the same age or younger than file1. Raises + DistutilsFileError if file1 does not exist.""" + + if not os.path.exists (file1): + raise DistutilsFileError, "file '%s' does not exist" % file1 + if not os.path.exists (file2): + return 1 + + from stat import * + mtime1 = os.stat(file1)[ST_MTIME] + mtime2 = os.stat(file2)[ST_MTIME] + + return mtime1 > mtime2 + +# newer () + + +def make_file (src, dst, func, args, + verbose=0, update_message=None, noupdate_message=None): + """Makes 'dst' from 'src' (both filenames) by calling 'func' with + 'args', but only if it needs to: i.e. if 'dst' does not exist or + 'src' is newer than 'dst'.""" + + if newer (src, dst): + if verbose and update_message: + print update_message + apply (func, args) + else: + if verbose and noupdate_message: + print noupdate_message + +# make_file () + + +def _copy_file_contents (src, dst, buffer_size=16*1024): + """Copy the file 'src' to 'dst'; both must be filenames. Any error + opening either file, reading from 'src', or writing to 'dst', + raises DistutilsFileError. Data is read/written in chunks of + 'buffer_size' bytes (default 16k). No attempt is made to handle + anything apart from regular files.""" + + # Stolen from shutil module in the standard library, but with + # custom error-handling added. + + fsrc = None + fdst = None + try: + try: + fsrc = open(src, 'rb') + except os.error, (errno, errstr): + raise DistutilsFileError, "could not open %s: %s" % (src, errstr) + + try: + fdst = open(dst, 'wb') + except os.error, (errno, errstr): + raise DistutilsFileError, "could not create %s: %s" % (dst, errstr) + + while 1: + try: + buf = fsrc.read (buffer_size) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not read from %s: %s" % (src, errstr) + + if not buf: + break + + try: + fdst.write(buf) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not write to %s: %s" % (dst, errstr) + + finally: + if fdst: + fdst.close() + if fsrc: + fsrc.close() + +# _copy_file_contents() + + +def copy_file (src, dst, + preserve_mode=1, + preserve_times=1, + update=0, + verbose=0): + + """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' + is copied there with the same name; otherwise, it must be a + filename. (If the file exists, it will be ruthlessly clobbered.) + If 'preserve_mode' is true (the default), the file's mode (type + and permission bits, or whatever is analogous on the current + platform) is copied. If 'preserve_times' is true (the default), + the last-modified and last-access times are copied as well. If + 'update' is true, 'src' will only be copied if 'dst' does not + exist, or if 'dst' does exist but is older than 'src'. If + 'verbose' is true, then a one-line summary of the copy will be + printed to stdout.""" + + # XXX doesn't copy Mac-specific metadata + + from shutil import copyfile + from stat import * + + if not os.path.isfile (src): + raise DistutilsFileError, \ + "can't copy %s:not a regular file" % src + + if os.path.isdir (dst): + dir = dst + dst = os.path.join (dst, os.path.basename (src)) + else: + dir = os.path.dirname (dst) + + if update and not newer (src, dst): + return + + if verbose: + print "copying %s -> %s" % (src, dir) + + copyfile (src, dst) + if preserve_mode or preserve_times: + st = os.stat (src) + if preserve_mode: + os.chmod (dst, S_IMODE (st[ST_MODE])) + if preserve_times: + os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + +# copy_file () + + +def copy_tree (src, dst, + preserve_mode=1, + preserve_times=1, + preserve_symlinks=0, + update=0, + verbose=0): + + """Copy an entire directory tree 'src' to a new location 'dst'. Both + 'src' and 'dst' must be directory names. If 'src' is not a + directory, raise DistutilsFileError. If 'dst' does not exist, it + is created with 'mkpath'. The endresult of the copy is that + every file in 'src' is copied to 'dst', and directories under + 'src' are recursively copied to 'dst'. + + 'preserve_mode' and 'preserve_times' are the same as for + 'copy_file'; note that they only apply to regular files, not to + directories. If 'preserve_symlinks' is true, symlinks will be + copied as symlinks (on platforms that support them!); otherwise + (the default), the destination of the symlink will be copied. + 'update' and 'verbose' are the same as for 'copy_file'.""" + + if not os.path.isdir (src): + raise DistutilsFileError, \ + "cannot copy tree %s: not a directory" % src + try: + names = os.listdir (src) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "error listing files in %s: %s" % (src, errstr) + + + mkpath (dst, verbose=verbose) + + for n in names: + src_name = os.path.join (src, n) + dst_name = os.path.join (dst, n) + + if preserve_symlinks and os.path.islink (src_name): + link_dest = os.readlink (src_name) + os.symlink (link_dest, dst_name) + elif os.path.isdir (src_name): + copy_tree (src_name, dst_name, + preserve_mode, preserve_times, preserve_symlinks, + update, verbose) + else: + copy_file (src_name, dst_name, + preserve_mode, preserve_times, + update, verbose) + +# copy_tree () From cc115bf7157ec6636b0baa75630f61f03ddc6906 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 22 Mar 1999 14:54:09 +0000 Subject: [PATCH 0011/8469] Obsolete source file -- command options are actually implemented in a much less formalistic way. Just keeping this around for possible future reference. --- options.py | 111 ----------------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 options.py diff --git a/options.py b/options.py deleted file mode 100644 index f6cae82dc5..0000000000 --- a/options.py +++ /dev/null @@ -1,111 +0,0 @@ -# XXX this is ridiculous! if commands need to pass options around, -# they can just pass them via the 'run' method... what we REALLY need -# is a way for commands to get at each other, via the Distribution! - -class Options: - """Used by Distribution and Command to encapsulate distribution - and command options -- parsing them from command-line arguments, - passing them between the distribution and command objects, etc.""" - - # -- Creation/initialization methods ------------------------------- - - def __init__ (self, owner): - - # 'owner' is the object (presumably either a Distribution - # or Command instance) to which this set of options applies. - self.owner = owner - - # The option table: maps option names to dictionaries, which - # look something like: - # { 'longopt': long command-line option string (optional) - # 'shortopt': short option (1 char) (optional) - # 'type': 'string', 'boolean', or 'list' - # 'description': text description (eg. for help strings) - # 'default': default value for the option - # 'send': list of (cmd,option) tuples: send option down the line - # 'receive': (cmd,option) tuple: pull option from upstream - # } - self.table = {} - - - def set_basic_options (self, *options): - """Add very basic options: no separate longopt, no fancy typing, no - send targets or receive destination. The arguments should just - be {1..4}-tuples of - (name [, shortopt [, description [, default]]]) - If name ends with '=', the option takes a string argument; - otherwise it's boolean.""" - - for opt in options: - if not (type (opt) is TupleType and 1 <= len (opt) <= 4): - raise ValueError, \ - ("invalid basic option record '%s': " + \ - "must be tuple of length 1 .. 4") % opt - - elements = ('name', 'shortopt', 'description', 'default') - name = opt[0] - self.table[name] = {} - for i in range (1,4): - if len (opt) >= i: - self.table[name][elements[i]] = opt[i] - else: - break - - # set_basic_options () - - - def add_option (self, name, **args): - - # XXX should probably sanity-check the keys of args - self.table[name] = args - - - # ------------------------------------------------------------------ - - # These are in the order that they will execute in to ensure proper - # prioritizing of option sources -- the default value is the most - # basic; it can be overridden by "client options" (the keyword args - # passed from setup.py to the 'setup' function); they in turn lose to - # options passed in "from above" (ie. from the Distribution, or from - # higher-level Commands); these in turn may be overridden by - # command-line arguments (which come from the end-user, the runner of - # setup.py). Only when all this is done can we pass options down to - # other Commands. - - # Hmmm, it also matters in which order Commands are processed: should a - # command-line option to 'make_blib' take precedence over the - # corresponding value passed down from its boss, 'build'? - - def set_defaults (self): - pass - - def set_client_options (self, options): - # 'self' should be a Distribution instance for this one -- - # this is to process the kw args passed to 'setup' - pass - - def receive_option (self, option, value): - # do we need to know the identity of the sender? don't - # think we should -- too much B&D - - # oh, 'self' should be anything *but* a Distribution (ie. - # a Command instance) -- only Commands take orders from above! - # (ironically enough) - pass - - def parse_command_line (self, args): - # here, 'self' can usefully be either a Distribution (for parsing - # "global" command-line options) or a Command (for "command-specific" - # options) - pass - - - def send_option (self, option, dest): - # perhaps this should not take a dest, but send the option - # to all possible receivers? - pass - - - # ------------------------------------------------------------------ - -# class Options From df17f2c56422e29ed2b2bc07dfaf373b2f24eede Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 22 Mar 1999 14:55:25 +0000 Subject: [PATCH 0012/8469] First checkin of real Distutils command modules. --- command/__init__.py | 6 ++ command/build.py | 56 ++++++++++++ command/build_py.py | 113 ++++++++++++++++++++++++ command/install.py | 189 +++++++++++++++++++++++++++++++++++++++++ command/install_lib.py | 42 +++++++++ command/install_py.py | 42 +++++++++ 6 files changed, 448 insertions(+) create mode 100644 command/__init__.py create mode 100644 command/build.py create mode 100644 command/build_py.py create mode 100644 command/install.py create mode 100644 command/install_lib.py create mode 100644 command/install_py.py diff --git a/command/__init__.py b/command/__init__.py new file mode 100644 index 0000000000..9567fd13fb --- /dev/null +++ b/command/__init__.py @@ -0,0 +1,6 @@ +# this is solely for debugging convenience + +__all__ = ['build', + 'build_py', + 'make_blib', + ] diff --git a/command/build.py b/command/build.py new file mode 100644 index 0000000000..788609282d --- /dev/null +++ b/command/build.py @@ -0,0 +1,56 @@ +"""distutils.command.build + +Implements the Distutils 'build' command.""" + +# created 1999/03/08, Greg Ward + +__rcsid__ = "$Id$" + +import os +from distutils.core import Command + + +class Build (Command): + + options = [('basedir=', 'b', "base directory for build library"), + ('libdir=', 'l', "directory for platform-shared files"), + ('platdir=', 'p', "directory for platform-specific files"), + + # Flags for 'build_py' + ('compile-py', None, "compile .py to .pyc"), + ('optimize-py', None, "compile .py to .pyo (optimized)"), + ] + + def set_default_options (self): + self.basedir = 'build' + # these are decided only after 'basedir' has its final value + # (unless overridden by the user or client) + self.libdir = None + self.platdir = None + + self.compile_py = 1 + self.optimize_py = 1 + + def set_final_options (self): + # 'libdir' and 'platdir' just default to 'lib' and 'plat' under + # the base build directory + if self.libdir is None: + self.libdir = os.path.join (self.basedir, 'lib') + if self.platdir is None: + self.platdir = os.path.join (self.basedir, 'plat') + + + def run (self): + + self.set_final_options () + + # For now, "build" means "build_py" then "build_ext". (Eventually + # it should also build documentation.) + + # Invoke the 'build_py' command + self.run_peer ('build_py') + + # And now 'build_ext' + #self.run_peer ('build_ext') + +# end class Build diff --git a/command/build_py.py b/command/build_py.py new file mode 100644 index 0000000000..ae133f9c2a --- /dev/null +++ b/command/build_py.py @@ -0,0 +1,113 @@ +"""distutils.command.build_py + +Implements the Distutils 'build_py' command.""" + +# created 1999/03/08, Greg Ward + +__rcsid__ = "$Id$" + +import string, os +from distutils.core import Command +from distutils.errors import * +from distutils.util import mkpath, newer, make_file, copy_file + + +class BuildPy (Command): + + options = [('dir=', 'd', "directory for platform-shared files"), + ('compile', 'c', "compile .py to .pyc"), + ('optimize', 'o', "compile .py to .pyo (optimized)"), + ] + + + def set_default_options (self): + self.dir = None + self.compile = 1 + self.optimize = 1 + + def set_final_options (self): + self.set_undefined_options ('build', + ('libdir', 'dir'), + ('compile_py', 'compile'), + ('optimize_py', 'optimize')) + + + def run (self): + + # XXX copy_file by default preserves all stat info -- mode, atime, + # and mtime. IMHO this is the right thing to do, but perhaps it + # should be an option -- in particular, a site administrator might + # want installed files to reflect the time of installation rather + # than the last modification time before the installed release. + + # XXX copy_file does *not* preserve MacOS-specific file metadata. + # If this is a problem for building/installing Python modules, then + # we'll have to fix copy_file. (And what about installing scripts, + # when the time comes for that -- does MacOS use its special + # metadata to know that a file is meant to be interpreted by + # Python?) + + self.set_final_options () + + (modules, package) = \ + self.distribution.get_options ('py_modules', 'package') + package = package or '' + + infiles = [] + outfiles = [] + missing = [] + + # Loop over the list of "pure Python" modules, deriving + # input and output filenames and checking for missing + # input files. + + # XXX we should allow for wildcards, so eg. the Distutils setup.py + # file would just have to say + # py_modules = ['distutils.*', 'distutils.command.*'] + # without having to list each one explicitly. + for m in modules: + fn = apply (os.path.join, tuple (string.split (m, '.'))) + '.py' + if not os.path.exists (fn): + missing.append (fn) + else: + infiles.append (fn) + outfiles.append (os.path.join (self.dir, package, fn)) + + # Blow up if any input files were not found. + if missing: + raise DistutilsFileError, \ + "missing files: " + string.join (missing, ' ') + + # Loop over the list of input files, copying them to their + # temporary (build) destination. + created = {} + for i in range (len (infiles)): + outdir = os.path.split (outfiles[i])[0] + if not created.get(outdir): + mkpath (outdir, verbose=self.distribution.verbose) + created[outdir] = 1 + + copy_file (infiles[i], outfiles[i], + update=1, verbose=self.distribution.verbose) + + # (Optionally) compile .py to .pyc + # XXX hey! we can't control whether we optimize or not; that's up + # to the invocation of the current Python interpreter (at least + # according to the py_compile docs). That sucks. + + if self.compile: + from py_compile import compile + + for f in outfiles: + # XXX can't assume this filename mapping! + out_fn = string.replace (f, '.py', '.pyc') + + make_file (f, out_fn, compile, (f,), + verbose=self.distribution.verbose, + update_message="compiling %s" % f) + + # XXX ignore self.optimize for now, since we don't really know if + # we're compiling optimally or not, and couldn't pick what to do + # even if we did know. ;-( + +# end class BuildPy diff --git a/command/install.py b/command/install.py new file mode 100644 index 0000000000..1f457807e1 --- /dev/null +++ b/command/install.py @@ -0,0 +1,189 @@ +"""distutils.command.install + +Implements the Distutils 'install' command.""" + +# created 1999/03/13, Greg Ward + +__rcsid__ = "$Id$" + +import sys, os, string +from distutils import sysconfig +from distutils.core import Command + + +class Install (Command): + + options = [('prefix=', None, "installation prefix"), + ('execprefix=', None, + "prefix for platform-specific files"), + + # Build directories: where to install from + ('build-base=', None, + "base build directory"), + ('build-lib=', None, + "build directory for non-platform-specific library files"), + ('build-platlib=', None, + "build directory for platform-specific library files"), + + # Installation directories: where to put modules and packages + ('install-lib=', None, + "base Python library directory"), + ('install-platlib=', None, + "platform-specific Python library directory"), + ('install-site-lib=', None, + "directory for site-specific packages and modules"), + ('install-site-platlib=', None, + "platform-specific site directory"), + ('install-scheme=', None, + "install to 'system' or 'site' library directory?"), + + # Where to install documentation (eventually!) + ('doc-format=', None, "format of documentation to generate"), + ('install-man=', None, "directory for Unix man pages"), + ('install-html=', None, "directory for HTML documentation"), + ('install-info=', None, "directory for GNU info files"), + + ] + + def set_default_options (self): + + self.build_base = None + self.build_lib = None + self.build_platlib = None + + # Don't define 'prefix' or 'exec_prefix' so we can know when the + # command is run whether the user supplied values + self.prefix = None + self.exec_prefix = None + + # These two, we can supply real values for! (because they're + # not directories, and don't have a confusing multitude of + # possible derivations) + #self.install_scheme = 'site' + self.doc_format = None + + # The actual installation directories are determined only at + # run-time, so the user can supply just prefix (and exec_prefix?) + # as a base for everything else + self.install_lib = None + self.install_platlib = None + self.install_site_lib = None + self.install_site_platlib = None + + self.install_man = None + self.install_html = None + self.install_info = None + + + def set_final_options (self): + + # Figure out the build directories, ie. where to install from + self.set_peer_option ('build', 'basedir', self.build_base) + self.set_undefined_options ('build', + ('basedir', 'build_base'), + ('libdir', 'build_lib'), + ('platdir', 'build_platlib')) + + # Figure out actual installation directories; the basic principle + # is: if the user supplied nothing, then use the directories that + # Python was built and installed with (ie. the compiled-in prefix + # and exec_prefix, and the actual installation directories gleaned + # by sysconfig). If the user supplied a prefix (and possibly + # exec_prefix), then we generate our own installation directories, + # following any pattern gleaned from sysconfig's findings. If no + # such pattern can be gleaned, then we'll just make do and try to + # ape the behaviour of Python's configure script. + + if self.prefix is None: # user didn't override + self.prefix = sys.prefix + if self.exec_prefix is None: + self.exec_prefix = sys.exec_prefix + + if self.install_lib is None: + self.install_lib = \ + self.replace_sys_prefix ('LIBDEST', ('lib','python1.5')) + if self.install_platlib is None: + # XXX this should probably be DESTSHARED -- but why is there no + # equivalent to DESTSHARED for the "site-packages" dir"? + self.install_platlib = \ + self.replace_sys_prefix ('BINLIBDEST', ('lib','python1.5'), 1) + + if self.install_site_lib is None: + self.install_site_lib = \ + os.path.join (self.install_lib, 'site-packages') + if self.install_site_platlib is None: + # XXX ugh! this puts platform-specific files in with shared files, + # with no nice way to override it! (this might be a Python + # problem, though, not a Distutils problem...) + self.install_site_platlib = \ + os.path.join (self.install_lib, 'site-packages') + + #if self.install_scheme == 'site': + # install_lib = self.install_site_lib + # install_platlib = self.install_site_platlib + #elif self.install_scheme == 'system': + # install_lib = self.install_lib + # install_platlib = self.install_platlib + #else: + # # XXX new exception for this kind of misbehaviour? + # raise DistutilsArgError, \ + # "invalid install scheme '%s'" % self.install_scheme + + + # Punt on doc directories for now -- after all, we're punting on + # documentation completely! + + # set_final_options () + + + def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): + """Attempts to glean a simple pattern from an installation + directory available as a 'sysconfig' attribute: if the + directory name starts with the "system prefix" (the one + hard-coded in the Makefile and compiled into Python), + then replace it with the current installation prefix and + return the "relocated" installation directory.""" + + if use_exec: + sys_prefix = sys.exec_prefix + my_prefix = self.exec_prefix + else: + sys_prefix = sys.prefix + my_prefix = self.prefix + + val = getattr (sysconfig, config_attr) + if string.find (val, sys_prefix) == 0: + # If the sysconfig directory starts with the system prefix, + # then we can "relocate" it to the user-supplied prefix -- + # assuming, of course, it is different from the system prefix. + + if sys_prefix == my_prefix: + return val + else: + return my_prefix + val[len(sys_prefix):] + + else: + # Otherwise, just tack the "fallback postfix" onto the + # user-specified prefix. + + return apply (os.join, (my_prefix,) + fallback_postfix) + + # replace_sys_prefix () + + + def run (self): + + self.set_final_options () + + # Install modules in two steps: "platform-shared" files (ie. pure + # python modules) and platform-specific files (compiled C + # extensions). + + self.run_peer ('install_py') + + # don't have an 'install_ext' command just yet! + #self.run_peer ('install_ext')) + + # run () + +# class Install diff --git a/command/install_lib.py b/command/install_lib.py new file mode 100644 index 0000000000..f2fa842087 --- /dev/null +++ b/command/install_lib.py @@ -0,0 +1,42 @@ +# created 1999/03/13, Greg Ward + +__rcsid__ = "$Id$" + +import sys +from distutils.core import Command +from distutils.util import copy_tree + +class InstallPy (Command): + + options = [('dir=', 'd', "directory to install to"), + ('build-dir=' 'b', "build directory (where to install from)")] + + def set_default_options (self): + # let the 'install' command dictate our installation directory + self.dir = None + self.build_dir = None + + def set_final_options (self): + # If we don't have a 'dir' value, we'll have to ask the 'install' + # command for one. (This usually means the user ran 'install_py' + # directly, rather than going through 'install' -- so in reality, + # 'find_command_obj()' will create an 'install' command object, + # which we then query. + + self.set_undefined_options ('install', + ('build_lib', 'build_dir'), + ('install_site_lib', 'dir')) + + def run (self): + + self.set_final_options () + + # Dump entire contents of the build directory to the installation + # directory (that's the beauty of having a build directory!) + copy_tree (self.build_dir, self.dir, + verbose=self.distribution.verbose, + update=1) + + # run () + +# class InstallPy diff --git a/command/install_py.py b/command/install_py.py new file mode 100644 index 0000000000..f2fa842087 --- /dev/null +++ b/command/install_py.py @@ -0,0 +1,42 @@ +# created 1999/03/13, Greg Ward + +__rcsid__ = "$Id$" + +import sys +from distutils.core import Command +from distutils.util import copy_tree + +class InstallPy (Command): + + options = [('dir=', 'd', "directory to install to"), + ('build-dir=' 'b', "build directory (where to install from)")] + + def set_default_options (self): + # let the 'install' command dictate our installation directory + self.dir = None + self.build_dir = None + + def set_final_options (self): + # If we don't have a 'dir' value, we'll have to ask the 'install' + # command for one. (This usually means the user ran 'install_py' + # directly, rather than going through 'install' -- so in reality, + # 'find_command_obj()' will create an 'install' command object, + # which we then query. + + self.set_undefined_options ('install', + ('build_lib', 'build_dir'), + ('install_site_lib', 'dir')) + + def run (self): + + self.set_final_options () + + # Dump entire contents of the build directory to the installation + # directory (that's the beauty of having a build directory!) + copy_tree (self.build_dir, self.dir, + verbose=self.distribution.verbose, + update=1) + + # run () + +# class InstallPy From 99942c9809e7014fa412f7d73d0121dd9c70f68c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 Mar 1999 14:00:06 +0000 Subject: [PATCH 0013/8469] Changes to allow passing an open file to the constructor (to support ProcessHierarchy's changes to support reading from a remote URL in ProcessDatabase). --- text_file.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/text_file.py b/text_file.py index eab498d76c..6153dea3df 100644 --- a/text_file.py +++ b/text_file.py @@ -13,9 +13,6 @@ class TextFile: - filename = None - file = None - current_line = None default_options = { 'strip_comments': 1, 'comment_re': re.compile (r'\s*#.*'), @@ -26,7 +23,11 @@ class TextFile: 'collapse_ws': 0, } - def __init__ (self, filename=None, **options): + def __init__ (self, filename=None, file=None, **options): + + if filename is None and file is None: + raise RuntimeError, \ + "you must supply either or both of 'filename' and 'file'" # set values for all options -- either from client option hash # or fallback to default_options @@ -45,18 +46,16 @@ def __init__ (self, filename=None, **options): if not self.default_options.has_key (opt): raise KeyError, "invalid TextFile option '%s'" % opt - self.filename = filename - if self.filename: - self.open () - - - def open (self, filename=None): - if not self.filename: - if not filename: - raise RuntimeError, "must provide a filename somehow" - + if file is None: + self.open (filename) + else: self.filename = filename + self.file = file + self.current_line = 0 # assuming that file is at BOF! + + def open (self, filename): + self.filename = filename self.file = open (self.filename, 'r') self.current_line = 0 From 6c18a676e72670f94bd1f1a625d33d627fabb119 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 26 Mar 1999 21:48:59 +0000 Subject: [PATCH 0014/8469] Added 'linestart' array and 'unreadline()' method (makes parsing a lot easier). --- text_file.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/text_file.py b/text_file.py index 6153dea3df..1d579565d5 100644 --- a/text_file.py +++ b/text_file.py @@ -52,6 +52,11 @@ def __init__ (self, filename=None, file=None, **options): self.filename = filename self.file = file self.current_line = 0 # assuming that file is at BOF! + + # 'linestart' stores the file offset of the start of each logical + # line; it is used to back up the file pointer when the caller + # wants to "unread" a line + self.linestart = [] def open (self, filename): @@ -81,6 +86,11 @@ def readline (self): buildup_line = '' while 1: + # record current file position; this will be appended to + # the linestart array *unless* we're accumulating a + # continued logical line + current_pos = self.file.tell() + # read the line, optionally strip comments line = self.file.readline() if self.strip_comments and line: @@ -101,6 +111,11 @@ def readline (self): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, self.current_line+1] + + # Forget current position: don't want to save it in the + # middle of a logical line + current_pos = None + # just an ordinary line, read it as usual else: if not line: @@ -111,7 +126,7 @@ def readline (self): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 - + # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) @@ -128,6 +143,12 @@ def readline (self): if line == '' or line == '\n' and self.skip_blanks: continue + # if we're still here and have kept the current position, + # then this physical line starts a logical line; record its + # starting offset + if current_pos is not None: + self.linestart.append (current_pos) + if self.join_lines: if line[-1] == '\\': buildup_line = line[:-1] @@ -147,6 +168,14 @@ def readline (self): # end readline + def unreadline (self): + if not self.linestart: + raise IOError, "at beginning of file -- can't unreadline" + pos = self.linestart[-1] + del self.linestart[-1] + self.file.seek (pos) + + def readlines (self): lines = [] while 1: From b7509c18d82c99dc663763d51209a091f7306763 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 29 Mar 1999 18:01:49 +0000 Subject: [PATCH 0015/8469] Replaced the last attempt at an "unreadline" with one that actually works on non-seekable file-like objects, such as URLs. (Oops.) --- text_file.py | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/text_file.py b/text_file.py index 1d579565d5..bc56a4906b 100644 --- a/text_file.py +++ b/text_file.py @@ -53,10 +53,10 @@ def __init__ (self, filename=None, file=None, **options): self.file = file self.current_line = 0 # assuming that file is at BOF! - # 'linestart' stores the file offset of the start of each logical - # line; it is used to back up the file pointer when the caller - # wants to "unread" a line - self.linestart = [] + # 'linebuf' is a stack of lines that will be emptied before we + # actually read from the file; it's only populated by an + # 'unreadline()' operation + self.linebuf = [] def open (self, filename): @@ -83,14 +83,18 @@ def warn (self, msg): def readline (self): + # If any "unread" lines waiting in 'linebuf', return the top + # one. (We don't actually buffer read-ahead data -- lines only + # get put in 'linebuf' if the client explicitly does an + # 'unreadline()'. + if self.linebuf: + line = self.linebuf[-1] + del self.linebuf[-1] + return line + buildup_line = '' while 1: - # record current file position; this will be appended to - # the linestart array *unless* we're accumulating a - # continued logical line - current_pos = self.file.tell() - # read the line, optionally strip comments line = self.file.readline() if self.strip_comments and line: @@ -111,11 +115,6 @@ def readline (self): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, self.current_line+1] - - # Forget current position: don't want to save it in the - # middle of a logical line - current_pos = None - # just an ordinary line, read it as usual else: if not line: @@ -126,7 +125,7 @@ def readline (self): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 - + # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) @@ -143,12 +142,6 @@ def readline (self): if line == '' or line == '\n' and self.skip_blanks: continue - # if we're still here and have kept the current position, - # then this physical line starts a logical line; record its - # starting offset - if current_pos is not None: - self.linestart.append (current_pos) - if self.join_lines: if line[-1] == '\\': buildup_line = line[:-1] @@ -168,14 +161,6 @@ def readline (self): # end readline - def unreadline (self): - if not self.linestart: - raise IOError, "at beginning of file -- can't unreadline" - pos = self.linestart[-1] - del self.linestart[-1] - self.file.seek (pos) - - def readlines (self): lines = [] while 1: @@ -185,6 +170,10 @@ def readlines (self): lines.append (line) + def unreadline (self, line): + self.linebuf.append (line) + + if __name__ == "__main__": test_data = """# test file From a3af0a0d6a3cd60ff4a97d970b7ebe0a2dd6748b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Apr 1999 02:46:29 +0000 Subject: [PATCH 0016/8469] Changed to use the method versions of 'copy_file()', 'copy_tree()', and 'make_file()'-- that way, the verbose and dry-run flags are handled for free. --- command/build_py.py | 11 +++++------ command/install_lib.py | 4 +--- command/install_py.py | 4 +--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index ae133f9c2a..0ed8486ea0 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -84,11 +84,10 @@ def run (self): for i in range (len (infiles)): outdir = os.path.split (outfiles[i])[0] if not created.get(outdir): - mkpath (outdir, verbose=self.distribution.verbose) + self.mkpath (outdir) created[outdir] = 1 - copy_file (infiles[i], outfiles[i], - update=1, verbose=self.distribution.verbose) + self.copy_file (infiles[i], outfiles[i]) # (Optionally) compile .py to .pyc # XXX hey! we can't control whether we optimize or not; that's up @@ -102,9 +101,9 @@ def run (self): # XXX can't assume this filename mapping! out_fn = string.replace (f, '.py', '.pyc') - make_file (f, out_fn, compile, (f,), - verbose=self.distribution.verbose, - update_message="compiling %s" % f) + self.make_file (f, out_fn, compile, (f,), + "compiling %s -> %s" % (f, out_fn), + "compilation of %s skipped" % f) # XXX ignore self.optimize for now, since we don't really know if # we're compiling optimally or not, and couldn't pick what to do diff --git a/command/install_lib.py b/command/install_lib.py index f2fa842087..22ab71e799 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -33,9 +33,7 @@ def run (self): # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - copy_tree (self.build_dir, self.dir, - verbose=self.distribution.verbose, - update=1) + self.copy_tree (self.build_dir, self.dir) # run () diff --git a/command/install_py.py b/command/install_py.py index f2fa842087..22ab71e799 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -33,9 +33,7 @@ def run (self): # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - copy_tree (self.build_dir, self.dir, - verbose=self.distribution.verbose, - update=1) + self.copy_tree (self.build_dir, self.dir) # run () From 4e091bdd15624bc17b8f1f45091848e23e8be099 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Apr 1999 02:54:20 +0000 Subject: [PATCH 0017/8469] Added 'dry_run' flag to most functions (to support the "shadow methods" that wrap them in the Command class). Fixed 'copy_file()' to use '_copy_file_contents()', not 'copyfile()' from shutil module -- no reference to shutil anymore. Added "not copying" announcement in 'copy_file()'. Wee comment fix. --- util.py | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/util.py b/util.py index 7c13abe09d..f4a1df791f 100644 --- a/util.py +++ b/util.py @@ -18,7 +18,7 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0777, verbose=0): +def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the @@ -44,16 +44,20 @@ def mkpath (name, mode=0777, verbose=0): #print "stack of tails:", tails - # now 'head' contains the highest directory that already exists + # now 'head' contains the deepest directory that already exists + # (that is, the child of 'head' in 'name' is the highest directory + # that does *not* exist) for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join (head, d) if verbose: print "creating", head - try: - os.mkdir (head) - except os.error, (errno, errstr): - raise DistutilsFileError, "%s: %s" % (head, errstr) + + if not dry_run: + try: + os.mkdir (head) + except os.error, (errno, errstr): + raise DistutilsFileError, "%s: %s" % (head, errstr) # mkpath () @@ -147,7 +151,8 @@ def copy_file (src, dst, preserve_mode=1, preserve_times=1, update=0, - verbose=0): + verbose=0, + dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a @@ -163,7 +168,6 @@ def copy_file (src, dst, # XXX doesn't copy Mac-specific metadata - from shutil import copyfile from stat import * if not os.path.isfile (src): @@ -177,12 +181,16 @@ def copy_file (src, dst, dir = os.path.dirname (dst) if update and not newer (src, dst): + print "not copying %s (output up-to-date)" % src return if verbose: print "copying %s -> %s" % (src, dir) - copyfile (src, dst) + if dry_run: + return + + _copy_file_contents (src, dst) if preserve_mode or preserve_times: st = os.stat (src) if preserve_mode: @@ -198,7 +206,9 @@ def copy_tree (src, dst, preserve_times=1, preserve_symlinks=0, update=0, - verbose=0): + verbose=0, + dry_run=0): + """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a @@ -223,8 +233,8 @@ def copy_tree (src, dst, raise DistutilsFileError, \ "error listing files in %s: %s" % (src, errstr) - - mkpath (dst, verbose=verbose) + if not dry_run: + mkpath (dst, verbose=verbose) for n in names: src_name = os.path.join (src, n) @@ -232,14 +242,17 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink (src_name): link_dest = os.readlink (src_name) - os.symlink (link_dest, dst_name) + if verbose: + print "linking %s -> %s" % (dst_name, link_dest) + if not dry_run: + os.symlink (link_dest, dst_name) elif os.path.isdir (src_name): copy_tree (src_name, dst_name, preserve_mode, preserve_times, preserve_symlinks, - update, verbose) + update, verbose, dry_run) else: copy_file (src_name, dst_name, preserve_mode, preserve_times, - update, verbose) + update, verbose, dry_run) # copy_tree () From 542cc6a75696e8edf46dd30c53b1fe5b73e86a2e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Apr 1999 02:58:07 +0000 Subject: [PATCH 0018/8469] Added all the "external action" methods (to make handling the verbose and dry-run flags consistently painless): 'execute()', 'mkpath()', 'copy_file()', 'copy_tree()', 'make_file()', and stub for 'make_files()' (not sure yet if it's useful). --- core.py | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 3a7443c78e..980ba5b30d 100644 --- a/core.py +++ b/core.py @@ -10,10 +10,11 @@ __rcsid__ = "$Id$" -import sys +import sys, os import string, re from distutils.errors import * from distutils.fancy_getopt import fancy_getopt +from distutils import util # This is not *quite* the same as a Python NAME; I don't allow leading # underscores. The fact that they're very similar is no coincidence... @@ -594,4 +595,133 @@ def run_peer (self, command): self.distribution.run_command (command) + + # -- External world manipulation ----------------------------------- + + def execute (self, func, args, msg=None, level=1): + """Perform some action that affects the outside world (eg. + by writing to the filesystem). Such actions are special because + they should be disabled by the "dry run" flag (carried around by + the Command's Distribution), and should announce themselves if + the current verbosity level is high enough. This method takes + care of all that bureaucracy for you; all you have to do is + supply the funtion to call and an argument tuple for it (to + embody the "external action" being performed), a message to + print if the verbosity level is high enough, and an optional + verbosity threshold.""" + + + # Generate a message if we weren't passed one + if msg is None: + msg = "%s %s" % (func.__name__, `args`) + if msg[-2:] == ',)': # correct for singleton tuple + msg = msg[0:-2] + ')' + + # Print it if verbosity level is high enough + self.announce (msg, level) + + # And do it, as long as we're not in dry-run mode + if not self.distribution.dry_run: + apply (func, args) + + # execute() + + + def mkpath (self, name, mode=0777): + util.mkpath (name, mode, + self.distribution.verbose, self.distribution.dry_run) + + + def copy_file (self, infile, outfile, + preserve_mode=1, preserve_times=1, update=1, level=1): + """Copy a file respecting verbose and dry-run flags.""" + + util.copy_file (infile, outfile, + preserve_mode, preserve_times, + update, self.distribution.verbose >= level, + self.distribution.dry_run) + + + def copy_tree (self, infile, outfile, + preserve_mode=1, preserve_times=1, preserve_symlinks=0, + update=1, level=1): + """Copy an entire directory tree respecting verbose and dry-run + flags.""" + + util.copy_tree (infile, outfile, + preserve_mode, preserve_times, preserve_symlinks, + update, self.distribution.verbose >= level, + self.distribution.dry_run) + + + def make_file (self, infiles, outfile, func, args, + exec_msg=None, skip_msg=None, level=1): + + """Special case of 'execute()' for operations that process one or + more input files and generate one output file. Works just like + 'execute()', except the operation is skipped and a different + message printed if 'outfile' already exists and is newer than + all files listed in 'infiles'.""" + + + if exec_msg is None: + exec_msg = "generating %s from %s" % \ + (outfile, string.join (infiles, ', ')) + if skip_msg is None: + skip_msg = "skipping %s (inputs unchanged)" % outfile + + + # Allow 'infiles' to be a single string + if type (infiles) is StringType: + infiles = (infiles,) + elif type (infiles) not in (ListType, TupleType): + raise TypeError, \ + "'infiles' must be a string, or a list or tuple of strings" + + # XXX this stuff should probably be moved off to a function + # in 'distutils.util' + from stat import * + + if os.path.exists (outfile): + out_mtime = os.stat (outfile)[ST_MTIME] + + # Loop over all infiles. If any infile is newer than outfile, + # then we'll have to regenerate outfile + for f in infiles: + in_mtime = os.stat (f)[ST_MTIME] + if in_mtime > out_mtime: + runit = 1 + break + else: + runit = 0 + + else: + runit = 1 + + # If we determined that 'outfile' must be regenerated, then + # perform the action that presumably regenerates it + if runit: + self.execute (func, args, exec_msg, level) + + # Otherwise, print the "skip" message + else: + self.announce (skip_msg, level) + + # make_file () + + +# def make_files (self, infiles, outfiles, func, args, +# exec_msg=None, skip_msg=None, level=1): + +# """Special case of 'execute()' for operations that process one or +# more input files and generate one or more output files. Works +# just like 'execute()', except the operation is skipped and a +# different message printed if all files listed in 'outfiles' +# already exist and are newer than all files listed in +# 'infiles'.""" + +# pass + + + # end class Command From 8806d89547055f3a8b1246bf100338c5270b9fe9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 15 Apr 1999 17:50:19 +0000 Subject: [PATCH 0019/8469] 'warn()' method now takes an optional line number. --- text_file.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/text_file.py b/text_file.py index bc56a4906b..a27df06d45 100644 --- a/text_file.py +++ b/text_file.py @@ -72,12 +72,14 @@ def close (self): self.current_line = None - def warn (self, msg): + def warn (self, msg, line=None): + if line is None: + line = self.current_line sys.stderr.write (self.filename + ", ") - if type (self.current_line) is ListType: - sys.stderr.write ("lines %d-%d: " % tuple (self.current_line)) + if type (line) is ListType: + sys.stderr.write ("lines %d-%d: " % tuple (line)) else: - sys.stderr.write ("line %d: " % self.current_line) + sys.stderr.write ("line %d: " % line) sys.stderr.write (msg + "\n") From 4da83200ca7258a4c4d175c53f7b1b310db013cb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 2 May 1999 21:39:13 +0000 Subject: [PATCH 0020/8469] Rearranged things so that compilation of .py files is the responsibility of the 'install_py' command rather than 'build_py'. Obviously, this meant that the 'build_py' and 'install_py' modules had to change; less obviously, so did 'install' and 'build', since these higher-level commands must make options available to control the lower-level commands, and some compilation-related options had to migrate with the code. --- command/build.py | 7 ------- command/build_py.py | 28 +--------------------------- command/install.py | 6 ++++++ command/install_lib.py | 37 +++++++++++++++++++++++++++++++++---- command/install_py.py | 37 +++++++++++++++++++++++++++++++++---- 5 files changed, 73 insertions(+), 42 deletions(-) diff --git a/command/build.py b/command/build.py index 788609282d..d0e939e9b6 100644 --- a/command/build.py +++ b/command/build.py @@ -15,10 +15,6 @@ class Build (Command): options = [('basedir=', 'b', "base directory for build library"), ('libdir=', 'l', "directory for platform-shared files"), ('platdir=', 'p', "directory for platform-specific files"), - - # Flags for 'build_py' - ('compile-py', None, "compile .py to .pyc"), - ('optimize-py', None, "compile .py to .pyo (optimized)"), ] def set_default_options (self): @@ -28,9 +24,6 @@ def set_default_options (self): self.libdir = None self.platdir = None - self.compile_py = 1 - self.optimize_py = 1 - def set_final_options (self): # 'libdir' and 'platdir' just default to 'lib' and 'plat' under # the base build directory diff --git a/command/build_py.py b/command/build_py.py index 0ed8486ea0..d956eef396 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -15,21 +15,15 @@ class BuildPy (Command): options = [('dir=', 'd', "directory for platform-shared files"), - ('compile', 'c', "compile .py to .pyc"), - ('optimize', 'o', "compile .py to .pyo (optimized)"), ] def set_default_options (self): self.dir = None - self.compile = 1 - self.optimize = 1 def set_final_options (self): self.set_undefined_options ('build', - ('libdir', 'dir'), - ('compile_py', 'compile'), - ('optimize_py', 'optimize')) + ('libdir', 'dir')) def run (self): @@ -88,25 +82,5 @@ def run (self): created[outdir] = 1 self.copy_file (infiles[i], outfiles[i]) - - # (Optionally) compile .py to .pyc - # XXX hey! we can't control whether we optimize or not; that's up - # to the invocation of the current Python interpreter (at least - # according to the py_compile docs). That sucks. - - if self.compile: - from py_compile import compile - - for f in outfiles: - # XXX can't assume this filename mapping! - out_fn = string.replace (f, '.py', '.pyc') - - self.make_file (f, out_fn, compile, (f,), - "compiling %s -> %s" % (f, out_fn), - "compilation of %s skipped" % f) - - # XXX ignore self.optimize for now, since we don't really know if - # we're compiling optimally or not, and couldn't pick what to do - # even if we did know. ;-( # end class BuildPy diff --git a/command/install.py b/command/install.py index 1f457807e1..ec73b1c1a8 100644 --- a/command/install.py +++ b/command/install.py @@ -43,6 +43,9 @@ class Install (Command): ('install-html=', None, "directory for HTML documentation"), ('install-info=', None, "directory for GNU info files"), + # Flags for 'build_py' + ('compile-py', None, "compile .py to .pyc"), + ('optimize-py', None, "compile .py to .pyo (optimized)"), ] def set_default_options (self): @@ -74,6 +77,9 @@ def set_default_options (self): self.install_html = None self.install_info = None + self.compile_py = 1 + self.optimize_py = 1 + def set_final_options (self): diff --git a/command/install_lib.py b/command/install_lib.py index 22ab71e799..f147af47f3 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -2,19 +2,25 @@ __rcsid__ = "$Id$" -import sys +import sys, string from distutils.core import Command from distutils.util import copy_tree class InstallPy (Command): options = [('dir=', 'd', "directory to install to"), - ('build-dir=' 'b', "build directory (where to install from)")] + ('build-dir=' 'b', "build directory (where to install from)"), + ('compile', 'c', "compile .py to .pyc"), + ('optimize', 'o', "compile .py to .pyo (optimized)"), + ] + def set_default_options (self): # let the 'install' command dictate our installation directory self.dir = None self.build_dir = None + self.compile = 1 + self.optimize = 1 def set_final_options (self): # If we don't have a 'dir' value, we'll have to ask the 'install' @@ -25,7 +31,10 @@ def set_final_options (self): self.set_undefined_options ('install', ('build_lib', 'build_dir'), - ('install_site_lib', 'dir')) + ('install_site_lib', 'dir'), + ('compile_py', 'compile'), + ('optimize_py', 'optimize')) + def run (self): @@ -33,8 +42,28 @@ def run (self): # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - self.copy_tree (self.build_dir, self.dir) + outfiles = self.copy_tree (self.build_dir, self.dir) + # (Optionally) compile .py to .pyc + # XXX hey! we can't control whether we optimize or not; that's up + # to the invocation of the current Python interpreter (at least + # according to the py_compile docs). That sucks. + + if self.compile: + from py_compile import compile + + for f in outfiles: + # XXX can't assume this filename mapping! + out_fn = string.replace (f, '.py', '.pyc') + + self.make_file (f, out_fn, compile, (f,), + "compiling %s -> %s" % (f, out_fn), + "compilation of %s skipped" % f) + + # XXX ignore self.optimize for now, since we don't really know if + # we're compiling optimally or not, and couldn't pick what to do + # even if we did know. ;-( + # run () # class InstallPy diff --git a/command/install_py.py b/command/install_py.py index 22ab71e799..f147af47f3 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -2,19 +2,25 @@ __rcsid__ = "$Id$" -import sys +import sys, string from distutils.core import Command from distutils.util import copy_tree class InstallPy (Command): options = [('dir=', 'd', "directory to install to"), - ('build-dir=' 'b', "build directory (where to install from)")] + ('build-dir=' 'b', "build directory (where to install from)"), + ('compile', 'c', "compile .py to .pyc"), + ('optimize', 'o', "compile .py to .pyo (optimized)"), + ] + def set_default_options (self): # let the 'install' command dictate our installation directory self.dir = None self.build_dir = None + self.compile = 1 + self.optimize = 1 def set_final_options (self): # If we don't have a 'dir' value, we'll have to ask the 'install' @@ -25,7 +31,10 @@ def set_final_options (self): self.set_undefined_options ('install', ('build_lib', 'build_dir'), - ('install_site_lib', 'dir')) + ('install_site_lib', 'dir'), + ('compile_py', 'compile'), + ('optimize_py', 'optimize')) + def run (self): @@ -33,8 +42,28 @@ def run (self): # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - self.copy_tree (self.build_dir, self.dir) + outfiles = self.copy_tree (self.build_dir, self.dir) + # (Optionally) compile .py to .pyc + # XXX hey! we can't control whether we optimize or not; that's up + # to the invocation of the current Python interpreter (at least + # according to the py_compile docs). That sucks. + + if self.compile: + from py_compile import compile + + for f in outfiles: + # XXX can't assume this filename mapping! + out_fn = string.replace (f, '.py', '.pyc') + + self.make_file (f, out_fn, compile, (f,), + "compiling %s -> %s" % (f, out_fn), + "compilation of %s skipped" % f) + + # XXX ignore self.optimize for now, since we don't really know if + # we're compiling optimally or not, and couldn't pick what to do + # even if we did know. ;-( + # run () # class InstallPy From 8e84928345bf830b0a8fe08f37627d315d5f897a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 2 May 1999 21:42:05 +0000 Subject: [PATCH 0021/8469] The 'copy_file()' and 'copy_tree()' functions in util.py now have meaningful return values: respectively, whether the copy was done, and the list of files that were copied. This meant some trivial changes in core.py as well: the Command methods that mirror 'copy_file()' and 'copy_tree()' have to pass on their return values. --- core.py | 16 ++++++++-------- util.py | 42 ++++++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/core.py b/core.py index 980ba5b30d..4b8c78384e 100644 --- a/core.py +++ b/core.py @@ -636,10 +636,10 @@ def copy_file (self, infile, outfile, preserve_mode=1, preserve_times=1, update=1, level=1): """Copy a file respecting verbose and dry-run flags.""" - util.copy_file (infile, outfile, - preserve_mode, preserve_times, - update, self.distribution.verbose >= level, - self.distribution.dry_run) + return util.copy_file (infile, outfile, + preserve_mode, preserve_times, + update, self.distribution.verbose >= level, + self.distribution.dry_run) def copy_tree (self, infile, outfile, @@ -648,10 +648,10 @@ def copy_tree (self, infile, outfile, """Copy an entire directory tree respecting verbose and dry-run flags.""" - util.copy_tree (infile, outfile, - preserve_mode, preserve_times, preserve_symlinks, - update, self.distribution.verbose >= level, - self.distribution.dry_run) + return util.copy_tree (infile, outfile, + preserve_mode,preserve_times,preserve_symlinks, + update, self.distribution.verbose >= level, + self.distribution.dry_run) def make_file (self, infiles, outfile, func, args, diff --git a/util.py b/util.py index f4a1df791f..7aedc1c6df 100644 --- a/util.py +++ b/util.py @@ -164,7 +164,11 @@ def copy_file (src, dst, 'update' is true, 'src' will only be copied if 'dst' does not exist, or if 'dst' does exist but is older than 'src'. If 'verbose' is true, then a one-line summary of the copy will be - printed to stdout.""" + printed to stdout. + + Return true if the file was copied (or would have been copied), + false otherwise (ie. 'update' was true and the destination is + up-to-date).""" # XXX doesn't copy Mac-specific metadata @@ -181,14 +185,15 @@ def copy_file (src, dst, dir = os.path.dirname (dst) if update and not newer (src, dst): - print "not copying %s (output up-to-date)" % src - return + if verbose: + print "not copying %s (output up-to-date)" % src + return 0 if verbose: print "copying %s -> %s" % (src, dir) if dry_run: - return + return 1 _copy_file_contents (src, dst) if preserve_mode or preserve_times: @@ -198,6 +203,8 @@ def copy_file (src, dst, if preserve_times: os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + return 1 + # copy_file () @@ -213,9 +220,12 @@ def copy_tree (src, dst, """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it - is created with 'mkpath'. The endresult of the copy is that + is created with 'mkpath'. The end result of the copy is that every file in 'src' is copied to 'dst', and directories under - 'src' are recursively copied to 'dst'. + 'src' are recursively copied to 'dst'. Return the list of files + copied (under their output names) -- note that if 'update' is true, + this might be less than the list of files considered. Return + value is not affected by 'dry_run'. 'preserve_mode' and 'preserve_times' are the same as for 'copy_file'; note that they only apply to regular files, not to @@ -236,6 +246,8 @@ def copy_tree (src, dst, if not dry_run: mkpath (dst, verbose=verbose) + outputs = [] + for n in names: src_name = os.path.join (src, n) dst_name = os.path.join (dst, n) @@ -246,13 +258,19 @@ def copy_tree (src, dst, print "linking %s -> %s" % (dst_name, link_dest) if not dry_run: os.symlink (link_dest, dst_name) + outputs.append (dst_name) + elif os.path.isdir (src_name): - copy_tree (src_name, dst_name, - preserve_mode, preserve_times, preserve_symlinks, - update, verbose, dry_run) + outputs[-1:] = \ + copy_tree (src_name, dst_name, + preserve_mode, preserve_times, preserve_symlinks, + update, verbose, dry_run) else: - copy_file (src_name, dst_name, - preserve_mode, preserve_times, - update, verbose, dry_run) + if (copy_file (src_name, dst_name, + preserve_mode, preserve_times, + update, verbose, dry_run)): + outputs.append (dst_name) + + return outputs # copy_tree () From 4c91f4ee1b115815b34eb36da15553c41be1ef80 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Jun 1999 01:58:36 +0000 Subject: [PATCH 0022/8469] Now handles NT, through '_init_nt()' function (courtesy of Amos Latteier ). --- sysconfig.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index e71ae4668a..5c60ca4a49 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -129,6 +129,16 @@ def _init_posix(): parse_makefile(open(get_makefile_filename()), g) +def _init_nt(): + """Initialize the module as appropriate for NT""" + g=globals() + # load config.h, though I don't know how useful this is + parse_config_h(open( + os.path.join(sys.exec_prefix, "include", "config.h")), g) + # set basic install directories + g['LIBDEST']=os.path.join(sys.exec_prefix, "Lib") + g['BINLIBDEST']=os.path.join(sys.exec_prefix, "Lib") + try: exec "_init_" + os.name @@ -139,3 +149,4 @@ def _init_posix(): exec "_init_%s()" % os.name del _init_posix +del _init_nt From acd36b84863fab989ea5d731f787300f579e7861 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Jun 1999 02:02:00 +0000 Subject: [PATCH 0023/8469] Added the 'have_run' dictionary to Distribution, and changed 'run_command()' to refer to it before attempting to run a command -- that way, command classes can freely invoke other commands without fear of duplicate execution. Beefed up some comments and docstrings. --- core.py | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/core.py b/core.py index 4b8c78384e..8a6cf72037 100644 --- a/core.py +++ b/core.py @@ -136,6 +136,10 @@ def __init__ (self, attrs=None): self.licence = None self.description = None + # 'cmdclass' maps command names to class objects, so we + # can 1) quickly figure out which class to instantiate when + # we need to create a new command object, and 2) have a way + # for the client to override command classes self.cmdclass = {} # The rest of these are really the business of various commands, @@ -152,9 +156,23 @@ def __init__ (self, attrs=None): setattr (self, k, attrs[k]) # And now initialize bookkeeping stuff that can't be supplied by - # the caller at all + # the caller at all. 'command_obj' maps command names to + # Command instances -- that's how we enforce that every command + # class is a singleton. self.command_obj = {} + # 'have_run' maps command names to boolean values; it keeps track + # of whether we have actually run a particular command, to make it + # cheap to "run" a command whenever we think we might need to -- if + # it's already been done, no need for expensive filesystem + # operations, we just check the 'have_run' dictionary and carry on. + # It's only safe to query 'have_run' for a command class + # that has been instantiated -- a false value will be put inserted + # when the command object is created, and replaced with a true + # value when the command is succesfully run. Thus it's + # probably best to use '.get()' rather than a straight lookup. + self.have_run = {} + # __init__ () @@ -211,6 +229,7 @@ def parse_command_line (self, args): # attribute, but we're not enforcing that anywhere! args = fancy_getopt (cmd_obj.options, cmd_obj, args[1:]) self.command_obj[command] = cmd_obj + self.have_run[command] = 0 # while args @@ -347,12 +366,23 @@ def get_options (self, *options): # -- Methods that operate on its Commands -------------------------- def run_command (self, command): - """Create a command object for 'command' if necessary, and - run the command by invoking its 'run()' method.""" + + """Do whatever it takes to run a command (including nothing at all, + if the command has already been run). Specifically: if we have + already created and run the command named by 'command', return + silently without doing anything. If the command named by + 'command' doesn't even have a command object yet, create one. + Then invoke 'run()' on that command object (or an existing + one).""" + + # Already been here, done that? then return silently. + if self.have_run.get (command): + return self.announce ("running " + command) cmd_obj = self.find_command_obj (command) cmd_obj.run () + self.have_run[command] = 1 def get_command_option (self, command, option): From 50fc61eddf6d3a2028dddaeeb106bc783de0efd5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Jun 1999 02:04:36 +0000 Subject: [PATCH 0024/8469] Hacked 'set_final_options()' to set (hopefully) appropriate values for 'install_site_lib' and install_site_platlib' on non-POSIX platforms. Should at least work for NT, as this is adopted from Amos Latteier's NT patches. Also added extensive comments bitching about the inadequacy of the current model, both under POSIX and NT (and probably other) systems. --- command/install.py | 63 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/command/install.py b/command/install.py index ec73b1c1a8..54b81879a5 100644 --- a/command/install.py +++ b/command/install.py @@ -48,6 +48,7 @@ class Install (Command): ('optimize-py', None, "compile .py to .pyo (optimized)"), ] + def set_default_options (self): self.build_base = None @@ -83,6 +84,29 @@ def set_default_options (self): def set_final_options (self): + # XXX this method is where the default installation directories + # for modules and extension modules are determined. (Someday, + # the default installation directories for scripts, + # documentation, and whatever else the Distutils can build and + # install will also be determined here.) Thus, this is a pretty + # important place to fiddle with for anyone interested in + # installation schemes for the Python library. Issues that + # are not yet resolved to my satisfaction: + # * how much platform dependence should be here, and + # how much can be pushed off to sysconfig (or, better, the + # Makefiles parsed by sysconfig)? + # * how independent of Python version should this be -- ie. + # should we have special cases to handle Python 1.5 and + # older, and then do it "the right way" for 1.6? Or should + # we install a site.py along with Distutils under pre-1.6 + # Python to take care of the current deficiencies in + # Python's library installation scheme? + # + # Currently, this method has hacks to distinguish POSIX from + # non-POSIX systems (for installation of site-local modules), + # and assumes the Python 1.5 installation tree with no site.py + # to fix things. + # Figure out the build directories, ie. where to install from self.set_peer_option ('build', 'basedir', self.build_base) self.set_undefined_options ('build', @@ -114,15 +138,37 @@ def set_final_options (self): self.install_platlib = \ self.replace_sys_prefix ('BINLIBDEST', ('lib','python1.5'), 1) + + # Here is where we decide where to install most library files: + # on POSIX systems, they go to 'site-packages' under the + # install_lib (determined above -- typically + # /usr/local/lib/python1.x). Unfortunately, both + # platform-independent (.py*) and platform-specific (.so) files + # go to this directory, since there is no site-packages under + # $exec_prefix in the usual way that Python builds sys.path. On + # non-POSIX systems, the situation is even worse: everything + # gets dumped right into $exec_prefix, not even a lib + # subdirectory! But apparently that's what needs to be done to + # make it work under Python 1.5 -- hope we can get this fixed + # for 1.6! + if self.install_site_lib is None: - self.install_site_lib = \ - os.path.join (self.install_lib, 'site-packages') + if os.name == 'posix': + self.install_site_lib = \ + os.path.join (self.install_lib, 'site-packages') + else: + self.install_site_lib = self.exec_prefix + if self.install_site_platlib is None: - # XXX ugh! this puts platform-specific files in with shared files, - # with no nice way to override it! (this might be a Python - # problem, though, not a Distutils problem...) - self.install_site_platlib = \ - os.path.join (self.install_lib, 'site-packages') + if os.name == 'posix': + # XXX ugh! this puts platform-specific files in with + # shared files, with no nice way to override it! (this + # might be a Python problem, though, not a Distutils + # problem...) + self.install_site_platlib = \ + os.path.join (self.install_lib, 'site-packages') + else: + self.install_site_platlib = self.exec_prefix #if self.install_scheme == 'site': # install_lib = self.install_site_lib @@ -181,6 +227,9 @@ def run (self): self.set_final_options () + # Obviously have to build before we can install + self.run_peer ('build') + # Install modules in two steps: "platform-shared" files (ie. pure # python modules) and platform-specific files (compiled C # extensions). From 93d1813d1383f5f6c7cd004143fd97c8d18cbecf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Jun 1999 17:05:21 +0000 Subject: [PATCH 0025/8469] On David Ascher's recommendation: reversed order of 'utime()' and 'chmod()' in 'copy_file()'. --- util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 7aedc1c6df..9a299dfd83 100644 --- a/util.py +++ b/util.py @@ -198,10 +198,13 @@ def copy_file (src, dst, _copy_file_contents (src, dst) if preserve_mode or preserve_times: st = os.stat (src) - if preserve_mode: - os.chmod (dst, S_IMODE (st[ST_MODE])) + + # According to David Ascher , utime() should be done + # before chmod() (at least under NT). if preserve_times: os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + if preserve_mode: + os.chmod (dst, S_IMODE (st[ST_MODE])) return 1 From 3cba55ebdce6957864921de0b015f6118afdf2c0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 10 Jul 1999 02:01:44 +0000 Subject: [PATCH 0026/8469] Don't pollute importer's namespace with type objects from types modules. Added DistutilsPlatformError. --- errors.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/errors.py b/errors.py index 6605ad2cb1..f5ef385120 100644 --- a/errors.py +++ b/errors.py @@ -12,9 +12,9 @@ __rcsid__ = "$Id$" -from types import * +import types -if type (RuntimeError) is ClassType: +if type (RuntimeError) is types.ClassType: # DistutilsError is the root of all Distutils evil. class DistutilsError (Exception): @@ -52,6 +52,12 @@ class DistutilsFileError (DistutilsError): class DistutilsOptionError (DistutilsError): pass + # DistutilsPlatformError is raised when we find that we don't + # know how to do something on the current platform (but we do + # know how to do it on some platform). + class DistutilsPlatformError (DistutilsError): + pass + # String-based exceptions else: DistutilsError = 'DistutilsError' @@ -61,3 +67,6 @@ class DistutilsOptionError (DistutilsError): DistutilsArgError = 'DistutilsArgError' DistutilsFileError = 'DistutilsFileError' DistutilsOptionError = 'DistutilsOptionError' + DistutilsPlatformError = 'DistutilsPlatformError' + +del types From 029a6337d35a2ddabacbf5e00a07bfb87e163fc7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 10 Jul 1999 02:02:31 +0000 Subject: [PATCH 0027/8469] Added a self-berating command relating to installation directories for module distributions that contain platform-specific files. --- command/install.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/install.py b/command/install.py index 54b81879a5..01ea0052e6 100644 --- a/command/install.py +++ b/command/install.py @@ -165,6 +165,14 @@ def set_final_options (self): # shared files, with no nice way to override it! (this # might be a Python problem, though, not a Distutils # problem...) + + # NO: the way to fix this is + # * any platform-dependent files in distribution? + # yes: install under exec-prefix + # no: install under prefix + # ...which will require a pretty major rethink of all + # this. Damn. + self.install_site_platlib = \ os.path.join (self.install_lib, 'site-packages') else: From 6c7798416f22b36ecf283e3f379f29173cad60c5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 10 Jul 1999 02:03:53 +0000 Subject: [PATCH 0028/8469] The abstract base class that defines the C/C++ compiler abstraction model. --- ccompiler.py | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 ccompiler.py diff --git a/ccompiler.py b/ccompiler.py new file mode 100644 index 0000000000..7be0ba223d --- /dev/null +++ b/ccompiler.py @@ -0,0 +1,313 @@ +"""distutils.ccompiler + +Contains CCompiler, an abstract base class that defines the interface +for the Distutils compiler abstraction model.""" + +# created 1999/07/05, Greg Ward + +__rcsid__ = "$Id$" + +import os +from types import * +from copy import copy +from distutils.errors import * + + +class CCompiler: + """Abstract base class to define the interface that must be implemented + by real compiler abstraction classes. Might have some use as a + place for shared code, but it's not yet clear what code can be + shared between compiler abstraction models for different platforms. + + The basic idea behind a compiler abstraction class is that each + instance can be used for all the compile/link steps in building + a single project. Thus, attributes common to all of those compile + and link steps -- include directories, macros to define, libraries + to link against, etc. -- are attributes of the compiler instance. + To allow for variability in how individual files are treated, + most (all?) of those attributes may be varied on a per-compilation + or per-link basis.""" + + + # XXX things not handled by this compiler abstraction model: + # * client can't provide additional options for a compiler, + # e.g. warning, optimization, debugging flags. Perhaps this + # should be the domain of concrete compiler abstraction classes + # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base + # class should have methods for the common ones. + # * can't put output files (object files, libraries, whatever) + # into a separate directory from their inputs. Should this be + # handled by an 'output_dir' attribute of the whole object, or a + # parameter to the compile/link_* methods, or both? + # * can't completely override the include or library searchg + # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". + # I'm not sure how widely supported this is even by POSIX + # compilers, much less on other platforms. And I'm even less + # sure how useful it is; probably for cross-compiling, but I + # have no intention of supporting that. + # * can't do really freaky things with the library list/library + # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against + # different versions of libfoo.a in different locations. I + # think this is useless without the ability to null out the + # library search path anyways. + # * don't deal with verbose and dry-run flags -- probably a + # CCompiler object should just drag them around the way the + # Distribution object does (either that or we have to drag + # around a Distribution object, which is what Command objects + # do... but might be kind of annoying) + + + def __init__ (self): + + # 'macros': a list of macro definitions (or undefinitions). A + # macro definition is a 2-tuple (name, value), where the value is + # either a string or None (no explicit value). A macro + # undefinition is a 1-tuple (name,). + self.macros = [] + + + # 'include_dirs': a list of directories to search for include files + self.include_dirs = [] + + # 'libraries': a list of libraries to include in any link + # (library names, not filenames: eg. "foo" not "libfoo.a") + self.libraries = [] + + # 'library_dirs': a list of directories to search for libraries + self.library_dirs = [] + + # 'objects': a list of object files (or similar, such as explicitly + # named library files) to include on any link + self.objects = [] + + # __init__ () + + + def _find_macro (self, name): + i = 0 + for defn in self.macros: + if defn[0] == name: + return i + i = i + 1 + + return None + + + def _check_macro_definitions (self, definitions): + """Ensures that every element of 'definitions' is a valid macro + definition, ie. either (name,value) 2-tuple or a (name,) + tuple. Do nothing if all definitions are OK, raise + TypeError otherwise.""" + + for defn in definitions: + if not (type (defn) is TupleType and + (len (defn) == 1 or + (len (defn) == 2 and + (type (defn[1]) is StringType or defn[1] is None))) and + type (defn[0]) is StringType): + raise TypeError, \ + ("invalid macro definition '%s': " % defn) + \ + "must be tuple (string,), (string, string), or " + \ + "(string, None)" + + + # -- Bookkeeping methods ------------------------------------------- + + def define_macro (self, name, value=None): + """Define a preprocessor macro for all compilations driven by + this compiler object. The optional parameter 'value' should be + a string; if it is not supplied, then the macro will be defined + without an explicit value and the exact outcome depends on the + compiler used (XXX true? does ANSI say anything about this?)""" + + # Delete from the list of macro definitions/undefinitions if + # already there (so that this one will take precedence). + i = self._find_macro (name) + if i is not None: + del self.macros[i] + + defn = (name, value) + self.macros.append (defn) + + + def undefine_macro (self, name): + """Undefine a preprocessor macro for all compilations driven by + this compiler object. If the same macro is defined by + 'define_macro()' and undefined by 'undefine_macro()' the last + call takes precedence (including multiple redefinitions or + undefinitions). If the macro is redefined/undefined on a + per-compilation basis (ie. in the call to 'compile()'), then + that takes precedence.""" + + # Delete from the list of macro definitions/undefinitions if + # already there (so that this one will take precedence). + i = self._find_macro (name) + if i is not None: + del self.macros[i] + + undefn = (name,) + self.macros.append (undefn) + + + def add_include_dir (self, dir): + """Add 'dir' to the list of directories that will be searched + for header files. The compiler is instructed to search + directories in the order in which they are supplied by + successive calls to 'add_include_dir()'.""" + self.include_dirs.append (dir) + + def set_include_dirs (self, dirs): + """Set the list of directories that will be searched to 'dirs' + (a list of strings). Overrides any preceding calls to + 'add_include_dir()'; subsequence calls to 'add_include_dir()' + add to the list passed to 'set_include_dirs()'. This does + not affect any list of standard include directories that + the compiler may search by default.""" + self.include_dirs = copy (dirs) + + + def add_library (self, libname): + """Add 'libname' to the list of libraries that will be included + in all links driven by this compiler object. Note that + 'libname' should *not* be the name of a file containing a + library, but the name of the library itself: the actual filename + will be inferred by the linker, the compiler, or the compiler + abstraction class (depending on the platform). + + The linker will be instructed to link against libraries in the + order they were supplied to 'add_library()' and/or + 'set_libraries()'. It is perfectly valid to duplicate library + names; the linker will be instructed to link against libraries + as many times as they are mentioned.""" + self.libraries.append (libname) + + def set_libraries (self, libnames): + """Set the list of libraries to be included in all links driven + by this compiler object to 'libnames' (a list of strings). + This does not affect any standard system libraries that the + linker may include by default.""" + + self.libraries = copy (libnames) + + + def add_library_dir (self, dir): + """Add 'dir' to the list of directories that will be searched for + libraries specified to 'add_library()' and 'set_libraries()'. + The linker will be instructed to search for libraries in the + order they are supplied to 'add_library_dir()' and/or + 'set_library_dirs()'.""" + self.library_dirs.append (dir) + + def set_library_dirs (self, dirs): + """Set the list of library search directories to 'dirs' (a list + of strings). This does not affect any standard library + search path that the linker may search by default.""" + self.library_dirs = copy (dirs) + + + def add_link_object (self, object): + """Add 'object' to the list of object files (or analogues, such + as explictly named library files or the output of "resource + compilers") to be included in every link driven by this + compiler object.""" + self.objects.append (object) + + def set_link_objects (self, objects): + """Set the list of object files (or analogues) to be included + in every link to 'objects'. This does not affect any + standard object files that the linker may include by default + (such as system libraries).""" + self.objects = copy (objects) + + + # -- Worker methods ------------------------------------------------ + # (must be implemented by subclasses) + + def compile (self, + sources, + macros=None, + includes=None): + """Compile one or more C/C++ source files. 'sources' must be + a list of strings, each one the name of a C/C++ source + file. Return a list of the object filenames generated + (one for each source filename in 'sources'). + + 'macros', if given, must be a list of macro definitions. A + macro definition is either a (name, value) 2-tuple or a (name,) + 1-tuple. The former defines a macro; if the value is None, the + macro is defined without an explicit value. The 1-tuple case + undefines a macro. Later definitions/redefinitions/ + undefinitions take precedence. + + 'includes', if given, must be a list of strings, the directories + to add to the default include file search path for this + compilation only.""" + pass + + + # XXX this is kind of useless without 'link_binary()' or + # 'link_executable()' or something -- or maybe 'link_static_lib()' + # should not exist at all, and we just have 'link_binary()'? + def link_static_lib (self, + objects, + output_libname, + libraries=None, + library_dirs=None): + """Link a bunch of stuff together to create a static library + file. The "bunch of stuff" consists of the list of object + files supplied as 'objects', the extra object files supplied + to 'add_link_object()' and/or 'set_link_objects()', the + libraries supplied to 'add_library()' and/or + 'set_libraries()', and the libraries supplied as 'libraries' + (if any). + + 'output_libname' should be a library name, not a filename; + the filename will be inferred from the library name. + + 'library_dirs', if supplied, should be a list of additional + directories to search on top of the system default and those + supplied to 'add_library_dir()' and/or 'set_library_dirs()'.""" + + pass + + + # XXX what's better/more consistent/more universally understood + # terminology: "shared library" or "dynamic library"? + + def link_shared_lib (self, + objects, + output_libname, + libraries=None, + library_dirs=None): + """Link a bunch of stuff together to create a shared library + file. Has the same effect as 'link_static_lib()' except + that the filename inferred from 'output_libname' will most + likely be different, and the type of file generated will + almost certainly be different.""" + pass + + def link_shared_object (self, + objects, + output_filename, + libraries=None, + library_dirs=None): + """Link a bunch of stuff together to create a shared object + file. Much like 'link_shared_lib()', except the output + filename is explicitly supplied as 'output_filename'.""" + pass + +# class CCompiler + + +def new_compiler (plat=None): + """Generate a CCompiler instance for platform 'plat' (or the + current platform, if 'plat' not supplied). Really instantiates + some concrete subclass of CCompiler, of course.""" + + if plat is None: plat = os.name + if plat == 'posix': + from unixccompiler import UnixCCompiler + return UnixCCompiler () + else: + raise DistutilsPlatformError, \ + "don't know how to compile C/C++ code on platform %s" % plat From 49295f84d81b8262a04a374d1c1c33e8bbbff6e2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 10 Jul 1999 02:04:22 +0000 Subject: [PATCH 0029/8469] The first concrete subclass of CCompiler: defines a barebones Unix C compiler. --- unixccompiler.py | 192 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 unixccompiler.py diff --git a/unixccompiler.py b/unixccompiler.py new file mode 100644 index 0000000000..fb5ed6677c --- /dev/null +++ b/unixccompiler.py @@ -0,0 +1,192 @@ +"""distutils.unixccompiler + +Contains the UnixCCompiler class, a subclass of CCompiler that handles +the "typical" Unix-style command-line C compiler: + * macros defined with -Dname[=value] + * macros undefined with -Uname + * include search directories specified with -Idir + * libraries specified with -lllib + * library search directories specified with -Ldir + * compile handled by 'cc' (or similar) executable with -c option: + compiles .c to .o + * link static library handled by 'ar' command (possibly with 'ranlib') + * link shared library handled by 'cc -shared' +""" + +# created 1999/07/05, Greg Ward + +__rcsid__ = "$Id$" + +import string +from types import * +from sysconfig import \ + CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO +from ccompiler import CCompiler + + +# XXX Things not currently handled: +# * optimization/debug/warning flags; we just use whatever's in Python's +# Makefile and live with it. Is this adequate? If not, we might +# have to have a bunch of subclasses GNUCCompiler, SGICCompiler, +# SunCCompiler, and I suspect down that road lies madness. +# * even if we don't know a warning flag from an optimization flag, +# we need some way for outsiders to feed preprocessor/compiler/linker +# flags in to us -- eg. a sysadmin might want to mandate certain flags +# via a site config file, or a user might want to set something for +# compiling this module distribution only via the setup.py command +# line, whatever. As long as these options come from something on the +# current system, they can be as system-dependent as they like, and we +# should just happily stuff them into the preprocessor/compiler/linker +# options and carry on. + + +class UnixCCompiler (CCompiler): + + # XXX any -I and -D options that we get from Makefile (via sysconfig) + # are preserved, but not treated specially: that is, they are not put + # in the self.include_dirs and self.macros, etc. lists that we inherit + # from CCompiler. I'm not sure if this is right, wrong or indifferent, + # but it should probably be a documented part of the CCompiler API: + # ie. there are *three* kinds of include directories, those from the + # compiler, those from Python's Makefiles, and those supplied to + # {add,set}_include_dirs() -- and 'set_include_dirs()' only overrides + # the last kind! I suspect the same applies to libraries and library + # directories -- anything else? + + def __init__ (self): + + CCompiler.__init__ (self) + + self.preprocess_options = None + self.compile_options = None + + # munge CC and OPT together in case there are flags stuck in CC + (self.cc, self.ccflags) = \ + _split_command (CC + ' ' + OPT) + self.ccflags_shared = string.split (CCSHARED) + + (self.ld_shared, self.ldflags_shared) = \ + _split_command (LDSHARED) + + + def compile (self, + sources, + macros=[], + includes=[]): + + if type (macros) is not ListType: + raise TypeError, \ + "'macros' (if supplied) must be a list of tuples" + if type (includes) is not ListType: + raise TypeError, \ + "'includes' (if supplied) must be a list of strings" + + pp_opts = _gen_preprocess_options (self.macros + macros, + self.include_dirs + includes) + + # use of ccflags_shared means we're blithely assuming that we're + # compiling for inclusion in a shared object! (will have to fix + # this when I add the ability to build a new Python) + cc_args = ['-c'] + pp_opts + \ + self.ccflags + self.ccflags_shared + \ + sources + + # this will change to 'spawn' when I have it! + print string.join ([self.cc] + cc_args, ' ') + + + # XXX punting on 'link_static_lib()' for now -- it might be better for + # CCompiler to mandate just 'link_binary()' or some such to build a new + # Python binary; it would then take care of linking in everything + # needed for the new Python without messing with an intermediate static + # library. + + def link_shared_lib (self, + objects, + output_libname, + libraries=None, + library_dirs=None): + # XXX should we sanity check the library name? (eg. no + # slashes) + self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) + + + def link_shared_object (self, + objects, + output_filename, + libraries=[], + library_dirs=[]): + + lib_opts = _gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs) + ld_args = self.ldflags_shared + lib_opts + \ + objects + ['-o', output_filename] + + print string.join ([self.ld_shared] + ld_args, ' ') + + +# class UnixCCompiler + + +def _split_command (cmd): + """Split a command string up into the progam to run (a string) and + the list of arguments; return them as (cmd, arglist).""" + args = string.split (cmd) + return (args[0], args[1:]) + + +def _gen_preprocess_options (macros, includes): + + # XXX it would be nice (mainly aesthetic, and so we don't generate + # stupid-looking command lines) to go over 'macros' and eliminate + # redundant definitions/undefinitions (ie. ensure that only the + # latest mention of a particular macro winds up on the command + # line). I don't think it's essential, though, since most (all?) + # Unix C compilers only pay attention to the latest -D or -U + # mention of a macro on their command line. Similar situation for + # 'includes'. I'm punting on both for now. Anyways, weeding out + # redundancies like this should probably be the province of + # CCompiler, since the data structures used are inherited from it + # and therefore common to all CCompiler classes. + + + pp_opts = [] + for macro in macros: + if len (macro) == 1: # undefine this macro + pp_opts.append ("-U%s" % macro[0]) + elif len (macro) == 2: + if macro[1] is None: # define with no explicit value + pp_opts.append ("-D%s" % macro[0]) + else: + # XXX *don't* need to be clever about quoting the + # macro value here, because we're going to avoid the + # shell at all costs when we spawn the command! + pp_opts.append ("-D%s=%s" % macro) + + for dir in includes: + pp_opts.append ("-I%s" % dir) + + return pp_opts + +# _gen_preprocess_options () + + +def _gen_lib_options (libraries, library_dirs): + + lib_opts = [] + + for dir in library_dirs: + lib_opts.append ("-L%s" % dir) + + # XXX it's important that we *not* remove redundant library mentions! + # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to + # resolve all symbols. I just hope we never have to say "-lfoo obj.o + # -lbar" to get things to work -- that's certainly a possibility, but a + # pretty nasty way to arrange your C code. + + for lib in libraries: + lib_opts.append ("-l%s" % lib) + + return lib_opts + +# _gen_lib_options () From 8c9d03208b4de8de842b039922fad2373ea6bf0f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 10 Aug 1999 20:09:38 +0000 Subject: [PATCH 0030/8469] Allow comment characters (#) to be escaped: - did away with 'comment_re' option -- it's just not that simple anymore - heavily revised the main logic in 'readline()' to accomodate this Beefed up 'warn()': 'line' can be list or tuple, and 'msg' is automatically converted to a string. --- text_file.py | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/text_file.py b/text_file.py index a27df06d45..2e034301c5 100644 --- a/text_file.py +++ b/text_file.py @@ -15,7 +15,6 @@ class TextFile: default_options = { 'strip_comments': 1, - 'comment_re': re.compile (r'\s*#.*'), 'skip_blanks': 1, 'join_lines': 0, 'lstrip_ws': 0, @@ -33,10 +32,7 @@ def __init__ (self, filename=None, file=None, **options): # or fallback to default_options for opt in self.default_options.keys(): if options.has_key (opt): - if opt == 'comment_re' and type (options[opt]) is StringType: - self.comment_re = re.compile (options[opt]) - else: - setattr (self, opt, options[opt]) + setattr (self, opt, options[opt]) else: setattr (self, opt, self.default_options[opt]) @@ -76,11 +72,11 @@ def warn (self, msg, line=None): if line is None: line = self.current_line sys.stderr.write (self.filename + ", ") - if type (line) is ListType: + if type (line) in (ListType, TupleType): sys.stderr.write ("lines %d-%d: " % tuple (line)) else: sys.stderr.write ("line %d: " % line) - sys.stderr.write (msg + "\n") + sys.stderr.write (str (msg) + "\n") def readline (self): @@ -97,15 +93,42 @@ def readline (self): buildup_line = '' while 1: - # read the line, optionally strip comments + # read the line, make it None if EOF line = self.file.readline() + if line == '': line = None + if self.strip_comments and line: - line = self.comment_re.sub ('', line) + + # Look for the first "#" in the line. If none, never + # mind. If we find one and it's the first character, or + # is not preceded by "\", then it starts a comment -- + # strip the comment, strip whitespace before it, and + # carry on. Otherwise, it's just an escaped "#", so + # unescape it (and any other escaped "#"'s that might be + # lurking in there) and otherwise leave the line alone. + + pos = string.find (line, "#") + if pos == -1: # no "#" -- no comments + pass + elif pos == 0 or line[pos-1] != "\\": # it's a comment + # Have to preserve the trailing newline; if + # stripping comments resulted in an empty line, we'd + # have no way to distinguish end-of-file! (NB. this + # means that if the final line is all comment and + # has to trailing newline, we will think that it's + # EOF; I think that's OK.) + has_newline = (line[-1] == '\n') + line = line[0:pos] + if has_newline: line = line + '\n' + + else: # it's an escaped "#" + line = string.replace (line, "\\#", "#") + # did previous line end with a backslash? then accumulate if self.join_lines and buildup_line: # oops: end of file - if not line: + if line is None: self.warn ("continuation line immediately precedes " "end-of-file") return buildup_line @@ -119,7 +142,7 @@ def readline (self): self.current_line = [self.current_line, self.current_line+1] # just an ordinary line, read it as usual else: - if not line: + if line is None: # eof return None # still have to be careful about incrementing the line number! @@ -217,15 +240,15 @@ def test_input (count, description, file, expected_result): out_file.close () in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) + lstrip_ws=0, rstrip_ws=0) test_input (1, "no processing", in_file, result1) in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) + lstrip_ws=0, rstrip_ws=0) test_input (2, "strip comments", in_file, result2) in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) + lstrip_ws=0, rstrip_ws=0) test_input (3, "strip blanks", in_file, result3) in_file = TextFile (filename) From 6c5612c1cbdcc3fe4762d0ef80948a37a7cbdc3b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:43:45 +0000 Subject: [PATCH 0031/8469] Added DistutilsExecError, DistutilsValueError. --- errors.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/errors.py b/errors.py index f5ef385120..17d1abc796 100644 --- a/errors.py +++ b/errors.py @@ -52,12 +52,22 @@ class DistutilsFileError (DistutilsError): class DistutilsOptionError (DistutilsError): pass + # DistutilsValueError is raised anytime an option value (presumably + # provided by setup.py) is invalid. + class DistutilsValueError (DistutilsError): + pass + # DistutilsPlatformError is raised when we find that we don't # know how to do something on the current platform (but we do # know how to do it on some platform). class DistutilsPlatformError (DistutilsError): pass + # DistutilsExecError is raised if there are any problems executing + # an external program + class DistutilsExecError (DistutilsError): + pass + # String-based exceptions else: DistutilsError = 'DistutilsError' @@ -67,6 +77,8 @@ class DistutilsPlatformError (DistutilsError): DistutilsArgError = 'DistutilsArgError' DistutilsFileError = 'DistutilsFileError' DistutilsOptionError = 'DistutilsOptionError' + DistutilsValueError = 'DistutilsValueError' DistutilsPlatformError = 'DistutilsPlatformError' - + DistutilsExecError = 'DistutilsExecError' + del types From 08b303ebb482dc760d1f7b793ad61475885b98bc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:44:37 +0000 Subject: [PATCH 0032/8469] Better detection of bad entries in option table. Better error messages for bad entries in option table. --- fancy_getopt.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index c63ce61b8e..125dceb3e1 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -47,16 +47,24 @@ def fancy_getopt (options, object, args): attr_name = {} takes_arg = {} - for (long, short, help) in options: + for option in options: + try: + (long, short, help) = option + except ValueError: + raise DistutilsGetoptError, \ + "invalid option tuple " + str (option) + # Type-check the option names if type (long) is not StringType or len (long) < 2: raise DistutilsGetoptError, \ - "long option must be a string of length >= 2" + "long option '%s' must be a string of length >= 2" % \ + long if (not ((short is None) or (type (short) is StringType and len (short) == 1))): raise DistutilsGetoptError, \ - "short option must be None or string of length 1" + "short option '%s' must be None or string of length 1" % \ + short long_opts.append (long) From d1423866abe4c8a4416b514ca8c9f06f9283dcd7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:47:21 +0000 Subject: [PATCH 0033/8469] Comment tweak. --- core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core.py b/core.py index 8a6cf72037..a9c573258a 100644 --- a/core.py +++ b/core.py @@ -166,11 +166,11 @@ def __init__ (self, attrs=None): # cheap to "run" a command whenever we think we might need to -- if # it's already been done, no need for expensive filesystem # operations, we just check the 'have_run' dictionary and carry on. - # It's only safe to query 'have_run' for a command class - # that has been instantiated -- a false value will be put inserted - # when the command object is created, and replaced with a true - # value when the command is succesfully run. Thus it's - # probably best to use '.get()' rather than a straight lookup. + # It's only safe to query 'have_run' for a command class that has + # been instantiated -- a false value will be inserted when the + # command object is created, and replaced with a true value when + # the command is succesfully run. Thus it's probably best to use + # '.get()' rather than a straight lookup. self.have_run = {} # __init__ () From 5cf06667069e8044604eaa23c4d78bd61a31de74 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:50:50 +0000 Subject: [PATCH 0034/8469] Added 'verbose' and 'dry_run' flags to CCompiler constructor and 'new_compiler()' factory function. Added 'runtime_library_dirs' list (for -R linker option) and methods to manipulate it. Deleted some obsolete comments. Added all the filename manglign methods: 'object_filenames()', 'shared_object_filename()', 'library_filename()', 'shared_library_filename()'. Added 'spawn()' method (front end to the "real" spawn). --- ccompiler.py | 79 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 7be0ba223d..d5519cab1c 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -11,6 +11,7 @@ from types import * from copy import copy from distutils.errors import * +from distutils.spawn import spawn class CCompiler: @@ -41,23 +42,25 @@ class CCompiler: # parameter to the compile/link_* methods, or both? # * can't completely override the include or library searchg # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". - # I'm not sure how widely supported this is even by POSIX + # I'm not sure how widely supported this is even by Unix # compilers, much less on other platforms. And I'm even less - # sure how useful it is; probably for cross-compiling, but I - # have no intention of supporting that. + # sure how useful it is; maybe for cross-compiling, but + # support for that is a ways off. (And anyways, cross + # compilers probably have a dedicated binary with the + # right paths compiled in. I hope.) # * can't do really freaky things with the library list/library # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against # different versions of libfoo.a in different locations. I # think this is useless without the ability to null out the # library search path anyways. - # * don't deal with verbose and dry-run flags -- probably a - # CCompiler object should just drag them around the way the - # Distribution object does (either that or we have to drag - # around a Distribution object, which is what Command objects - # do... but might be kind of annoying) - def __init__ (self): + def __init__ (self, + verbose=0, + dry_run=0): + + self.verbose = verbose + self.dry_run = dry_run # 'macros': a list of macro definitions (or undefinitions). A # macro definition is a 2-tuple (name, value), where the value is @@ -65,7 +68,6 @@ def __init__ (self): # undefinition is a 1-tuple (name,). self.macros = [] - # 'include_dirs': a list of directories to search for include files self.include_dirs = [] @@ -76,6 +78,10 @@ def __init__ (self): # 'library_dirs': a list of directories to search for libraries self.library_dirs = [] + # 'runtime_library_dirs': a list of directories to search for + # shared libraries/objects at runtime + self.runtime_library_dirs = [] + # 'objects': a list of object files (or similar, such as explicitly # named library files) to include on any link self.objects = [] @@ -205,6 +211,19 @@ def set_library_dirs (self, dirs): self.library_dirs = copy (dirs) + def add_runtime_library_dir (self, dir): + """Add 'dir' to the list of directories that will be searched for + shared libraries at runtime.""" + self.runtime_library_dirs.append (dir) + + def set_runtime_library_dirs (self, dirs): + """Set the list of directories to search for shared libraries + at runtime to 'dirs' (a list of strings). This does not affect + any standard search path that the runtime linker may search by + default.""" + self.runtime_library_dirs = copy (dirs) + + def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as explictly named library files or the output of "resource @@ -271,9 +290,6 @@ def link_static_lib (self, pass - # XXX what's better/more consistent/more universally understood - # terminology: "shared library" or "dynamic library"? - def link_shared_lib (self, objects, output_libname, @@ -296,10 +312,43 @@ def link_shared_object (self, filename is explicitly supplied as 'output_filename'.""" pass + + # -- Filename mangling methods ------------------------------------- + + def object_filenames (source_filenames): + """Return the list of object filenames corresponding to each + specified source filename.""" + pass + + def shared_object_filename (source_filename): + """Return the shared object filename corresponding to a + specified source filename.""" + pass + + def library_filename (libname): + """Return the static library filename corresponding to the + specified library name.""" + + pass + + def shared_library_filename (libname): + """Return the shared library filename corresponding to the + specified library name.""" + pass + + + # -- Utility methods ----------------------------------------------- + + def spawn (self, cmd): + spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) + + # class CCompiler -def new_compiler (plat=None): +def new_compiler (plat=None, + verbose=0, + dry_run=0): """Generate a CCompiler instance for platform 'plat' (or the current platform, if 'plat' not supplied). Really instantiates some concrete subclass of CCompiler, of course.""" @@ -307,7 +356,7 @@ def new_compiler (plat=None): if plat is None: plat = os.name if plat == 'posix': from unixccompiler import UnixCCompiler - return UnixCCompiler () + return UnixCCompiler (verbose, dry_run) else: raise DistutilsPlatformError, \ "don't know how to compile C/C++ code on platform %s" % plat From 570f701e1116a7f768361b28323f16def9c3da31 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:53:53 +0000 Subject: [PATCH 0035/8469] Changed to use 'spawn()', now that it exists. Added 'verbose' and 'dry_run' parameters to constructor. Changed 'compile()', 'link_*()' to default lists arguments to None rather than empty list. Added implementations of the filename-mangling methods mandated by the CCompiler interface. --- unixccompiler.py | 86 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 24 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index fb5ed6677c..c8468f965a 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,7 +17,7 @@ __rcsid__ = "$Id$" -import string +import string, re from types import * from sysconfig import \ CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO @@ -42,25 +42,35 @@ class UnixCCompiler (CCompiler): - # XXX any -I and -D options that we get from Makefile (via sysconfig) - # are preserved, but not treated specially: that is, they are not put - # in the self.include_dirs and self.macros, etc. lists that we inherit - # from CCompiler. I'm not sure if this is right, wrong or indifferent, - # but it should probably be a documented part of the CCompiler API: - # ie. there are *three* kinds of include directories, those from the - # compiler, those from Python's Makefiles, and those supplied to - # {add,set}_include_dirs() -- and 'set_include_dirs()' only overrides - # the last kind! I suspect the same applies to libraries and library - # directories -- anything else? - - def __init__ (self): - - CCompiler.__init__ (self) + # XXX perhaps there should really be *three* kinds of include + # directories: those built in to the preprocessor, those from Python's + # Makefiles, and those supplied to {add,set}_include_dirs(). Currently + # we make no distinction between the latter two at this point; it's all + # up to the client class to select the include directories to use above + # and beyond the compiler's defaults. That is, both the Python include + # directories and any module- or package-specific include directories + # are specified via {add,set}_include_dirs(), and there's no way to + # distinguish them. This might be a bug. + + def __init__ (self, + verbose=0, + dry_run=0): + + CCompiler.__init__ (self, verbose, dry_run) self.preprocess_options = None self.compile_options = None - # munge CC and OPT together in case there are flags stuck in CC + # Munge CC and OPT together in case there are flags stuck in CC. + # Note that using these variables from sysconfig immediately makes + # this module specific to building Python extensions and + # inappropriate as a general-purpose C compiler front-end. So sue + # me. Note also that we use OPT rather than CFLAGS, because CFLAGS + # is the flags used to compile Python itself -- not only are there + # -I options in there, they are the *wrong* -I options. We'll + # leave selection of include directories up to the class using + # UnixCCompiler! + (self.cc, self.ccflags) = \ _split_command (CC + ' ' + OPT) self.ccflags_shared = string.split (CCSHARED) @@ -71,8 +81,13 @@ def __init__ (self): def compile (self, sources, - macros=[], - includes=[]): + macros=None, + includes=None): + + if macros is None: + macros = [] + if includes is None: + includes = [] if type (macros) is not ListType: raise TypeError, \ @@ -92,7 +107,8 @@ def compile (self, sources # this will change to 'spawn' when I have it! - print string.join ([self.cc] + cc_args, ' ') + #print string.join ([self.cc] + cc_args, ' ') + self.spawn ([self.cc] + cc_args) # XXX punting on 'link_static_lib()' for now -- it might be better for @@ -114,17 +130,39 @@ def link_shared_lib (self, def link_shared_object (self, objects, output_filename, - libraries=[], - library_dirs=[]): + libraries=None, + library_dirs=None): + + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] lib_opts = _gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs) ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] - print string.join ([self.ld_shared] + ld_args, ' ') - - + #print string.join ([self.ld_shared] + ld_args, ' ') + self.spawn ([self.ld_shared] + ld_args) + + + def object_filenames (self, source_filenames): + outnames = [] + for inname in source_filenames: + outnames.append (re.sub (r'\.(c|C|cc|cxx)$', '.o', inname)) + return outnames + + def shared_object_filename (self, source_filename): + return re.sub (r'\.(c|C|cc|cxx)$', SO) + + def library_filename (self, libname): + return "lib%s.a" % libname + + def shared_library_filename (self, libname): + return "lib%s.so" % libname + + # class UnixCCompiler From e78649a4e18096a1722b66030a160e4f8b90431f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:57:17 +0000 Subject: [PATCH 0036/8469] Module to spawn sub-commands in a platform-independent way. Initial revision only includes support for POSIX-style fork-and-exec. --- spawn.py | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 spawn.py diff --git a/spawn.py b/spawn.py new file mode 100644 index 0000000000..24e76ef10e --- /dev/null +++ b/spawn.py @@ -0,0 +1,106 @@ +"""distutils.spawn + +Provides the 'spawn()' function, a front-end to various platform- +specific functions for launching another program in a sub-process.""" + +# created 1999/07/24, Greg Ward + +__rcsid__ = "$Id$" + +import sys, os, string +from distutils.errors import * + + +def spawn (cmd, + search_path=1, + verbose=0, + dry_run=0): + + """Run another program, specified as a command list 'cmd', in a new + process. 'cmd' is just the argument list for the new process, ie. + cmd[0] is the program to run and cmd[1:] are the rest of its + arguments. There is no way to run a program with a name different + from that of its executable. + + If 'search_path' is true (the default), the system's executable + search path will be used to find the program; otherwise, cmd[0] must + be the exact path to the executable. If 'verbose' is true, a + one-line summary of the command will be printed before it is run. + If 'dry_run' is true, the command will not actually be run. + + Raise DistutilsExecError if running the program fails in any way; + just return on success.""" + + if os.name == 'posix': + _spawn_posix (cmd, search_path, verbose, dry_run) + elif os.name == 'windows': # ??? + # XXX should 'args' be cmd[1:] or cmd? + # XXX how do we detect failure? + # XXX how to do this in pre-1.5.2? + # XXX is P_WAIT the correct mode? + # XXX how to make Windows search the path? + if verbose: + print string.join (cmd, ' ') + if not dry_run: + os.spawnv (os.P_WAIT, cmd[0], cmd[1:]) + else: + raise DistutilsPlatformError, \ + "don't know how to spawn programs on platform '%s'" % os.name + +# spawn () + + +def _spawn_posix (cmd, + search_path=1, + verbose=0, + dry_run=0): + + if verbose: + print string.join (cmd, ' ') + if dry_run: + return + exec_fn = search_path and os.execvp or os.execv + + pid = os.fork () + + if pid == 0: # in the child + try: + #print "cmd[0] =", cmd[0] + #print "cmd =", cmd + exec_fn (cmd[0], cmd) + except OSError, e: + sys.stderr.write ("unable to execute %s: %s\n" % + (cmd[0], e.strerror)) + os._exit (1) + + sys.stderr.write ("unable to execute %s for unknown reasons" % cmd[0]) + os._exit (1) + + + else: # in the parent + # Loop until the child either exits or is terminated by a signal + # (ie. keep waiting if it's merely stopped) + while 1: + (pid, status) = os.waitpid (pid, 0) + if os.WIFSIGNALED (status): + raise DistutilsExecError, \ + "command %s terminated by signal %d" % \ + (cmd[0], os.WTERMSIG (status)) + + elif os.WIFEXITED (status): + exit_status = os.WEXITSTATUS (status) + if exit_status == 0: + return # hey, it succeeded! + else: + raise DistutilsExecError, \ + "command %s failed with exit status %d" % \ + (cmd[0], exit_status) + + elif os.WIFSTOPPED (status): + continue + + else: + raise DistutilsExecError, \ + "unknown error executing %s: termination status %d" % \ + (cmd[0], status) +# _spawn_posix () From d8eaecdab17b05bfe965bac07a69b59edba79799 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Aug 1999 23:57:49 +0000 Subject: [PATCH 0037/8469] Implements the 'build_ext' command for building C/C++ extension modules. --- command/build_ext.py | 192 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 command/build_ext.py diff --git a/command/build_ext.py b/command/build_ext.py new file mode 100644 index 0000000000..cb9da68dd9 --- /dev/null +++ b/command/build_ext.py @@ -0,0 +1,192 @@ +"""distutils.command.build_ext + +Implements the Distutils 'build_ext' command, for building extension +modules (currently limited to C extensions, should accomodate C++ +extensions ASAP).""" + +# created 1999/08/09, Greg Ward + +__rcsid__ = "$Id$" + +import sys, os, string, re +from types import * +from distutils.core import Command +from distutils.ccompiler import new_compiler +from distutils.sysconfig import INCLUDEPY, SO, exec_prefix +from distutils.errors import * + + +# This is the same as a Python NAME, since we must accept any +# valid module name for the extension name. +extension_name_re = re.compile (r'^[a-zA-Z_][a-zA-Z_0-9]*$') + + +class BuildExt (Command): + + # XXX thoughts on how to deal with complex command-line options like + # these, i.e. how to make it so fancy_getopt can suck them off the + # command line and make it look like setup.py defined the appropriate + # lists of tuples of what-have-you. + # - each command needs a callback to process its command-line options + # - Command.__init__() needs access to its share of the whole + # command line (must ultimately come from + # Distribution.parse_command_line()) + # - it then calls the current command class' option-parsing + # callback to deal with weird options like -D, which have to + # parse the option text and churn out some custom data + # structure + # - that data structure (in this case, a list of 2-tuples) + # will then be present in the command object by the time + # we get to set_final_options() (i.e. the constructor + # takes care of both command-line and client options + # in between set_default_options() and set_final_options()) + + options = [('dir=', 'd', + "directory for compiled extension modules"), + ('include-dirs=', 'I', + "list of directories to search for header files"), + ('define=', 'D', + "C preprocessor macros to define"), + ('undef=', 'U', + "C preprocessor macros to undefine"), + ('libs=', 'l', + "external C libraries to link with"), + ('library-dirs=', 'L', + "directories to search for external C libraries"), + ('rpath=', 'R', + "directories to search for shared C libraries at runtime"), + ('link-objects=', 'O', + "extra explicit link objects to include in the link"), + ] + + + def set_default_options (self): + self.dir = None + self.include_dirs = None + self.define = None + self.undef = None + self.libs = None + self.library_dirs = None + self.rpath = None + self.link_objects = None + + def set_final_options (self): + self.set_undefined_options ('build', ('platdir', 'dir')) + + # Make sure Python's include directories (for Python.h, config.h, + # etc.) are in the include search path. We have to roll our own + # "exec include dir", because the Makefile parsed by sysconfig + # doesn't have it (sigh). + py_include = INCLUDEPY # prefix + "include" + "python" + ver + exec_py_include = os.path.join (exec_prefix, 'include', + 'python' + sys.version[0:3]) + if self.include_dirs is None: + self.include_dirs = [] + self.include_dirs.insert (0, py_include) + if exec_py_include != py_include: + self.include_dirs.insert (0, exec_py_include) + + + def run (self): + + self.set_final_options () + (extensions, package) = \ + self.distribution.get_options ('ext_modules', 'package') + + # 'extensions', as supplied by setup.py, is a list of 2-tuples. + # Each tuple is simple: + # (ext_name, build_info) + # build_info is a dictionary containing everything specific to + # building this extension. (Info pertaining to all extensions + # should be handled by general distutils options passed from + # setup.py down to right here, but that's not taken care of yet.) + + + # First, sanity-check the 'extensions' list + self.check_extensions_list (extensions) + + # Setup the CCompiler object that we'll use to do all the + # compiling and linking + self.compiler = new_compiler (verbose=self.distribution.verbose, + dry_run=self.distribution.dry_run) + if self.include_dirs is not None: + self.compiler.set_include_dirs (self.include_dirs) + if self.define is not None: + # 'define' option is a list of (name,value) tuples + for (name,value) in self.define: + self.compiler.define_macro (name, value) + if self.undef is not None: + for macro in self.undef: + self.compiler.undefine_macro (macro) + if self.libs is not None: + self.compiler.set_libraries (self.libs) + if self.library_dirs is not None: + self.compiler.set_library_dirs (self.library_dirs) + if self.rpath is not None: + self.compiler.set_runtime_library_dirs (self.rpath) + if self.link_objects is not None: + self.compiler.set_link_objects (self.link_objects) + + # Now the real loop over extensions + self.build_extensions (extensions) + + + + def check_extensions_list (self, extensions): + + if type (extensions) is not ListType: + raise DistutilsValueError, \ + "'ext_modules' option must be a list of tuples" + + for ext in extensions: + if type (ext) is not TupleType and len (ext) != 2: + raise DistutilsValueError, \ + "each element of 'ext_modules' option must be a 2-tuple" + + if not (type (ext[0]) is StringType and + extension_name_re.match (ext[0])): + raise DistutilsValueError, \ + "first element of each tuple in 'ext_modules' " + \ + "must be the extension name (a string)" + + if type (ext[1]) is not DictionaryType: + raise DistutilsValueError, \ + "second element of each tuple in 'ext_modules' " + \ + "must be a dictionary" + + # end sanity-check for + + # check_extensions_list () + + + def build_extensions (self, extensions): + + for (extension_name, build_info) in extensions: + sources = build_info.get ('sources') + if sources is None or type (sources) is not ListType: + raise DistutilsValueError, \ + "in ext_modules option, 'sources' must be present " + \ + "and must be a list of source filenames" + + macros = build_info.get ('macros') + include_dirs = build_info.get ('include_dirs') + self.compiler.compile (sources, macros, include_dirs) + + objects = self.compiler.object_filenames (sources) + extra_objects = build_info.get ('extra_objects') + if extra_objects: + objects.extend (extra_objects) + libraries = build_info.get ('libraries') + library_dirs = build_info.get ('library_dirs') + + ext_filename = self.extension_filename (extension_name) + self.compiler.link_shared_object (objects, ext_filename, + libraries, library_dirs) + + # build_extensions () + + + def extension_filename (self, ext_name): + return ext_name + SO + +# class BuildExt From e168908a1284d0f1bccbdaa6b34ef9ee56be675f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 19 Aug 1999 20:02:10 +0000 Subject: [PATCH 0038/8469] Oops, call 'os.path.join()'! --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 01ea0052e6..cf45004f07 100644 --- a/command/install.py +++ b/command/install.py @@ -226,7 +226,7 @@ def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): # Otherwise, just tack the "fallback postfix" onto the # user-specified prefix. - return apply (os.join, (my_prefix,) + fallback_postfix) + return apply (os.path.join, (my_prefix,) + fallback_postfix) # replace_sys_prefix () From 6ad6cbda7915f2134e949639fa5deec460b2338f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:15:07 +0000 Subject: [PATCH 0039/8469] Added msvccompiler module exactly as supplied by Perry Stoll. --- msvccompiler.py | 317 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 msvccompiler.py diff --git a/msvccompiler.py b/msvccompiler.py new file mode 100644 index 0000000000..ff66f913be --- /dev/null +++ b/msvccompiler.py @@ -0,0 +1,317 @@ +"""distutils.ccompiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for the Microsoft Visual Studio """ + + +# created 1999/08/19, Perry Stoll +# +__rcsid__ = "$Id$" + +import os +import sys +from distutils.errors import * +from distutils.ccompiler import CCompiler + + +class MSVCCompiler ( CCompiler) : + """Abstract base class to define the interface that must be implemented + by real compiler abstraction classes. Might have some use as a + place for shared code, but it's not yet clear what code can be + shared between compiler abstraction models for different platforms. + + The basic idea behind a compiler abstraction class is that each + instance can be used for all the compile/link steps in building + a single project. Thus, attributes common to all of those compile + and link steps -- include directories, macros to define, libraries + to link against, etc. -- are attributes of the compiler instance. + To allow for variability in how individual files are treated, + most (all?) of those attributes may be varied on a per-compilation + or per-link basis.""" + + def __init__ (self, + verbose=0, + dry_run=0): + + CCompiler.__init__ (self, verbose, dry_run) + + + # XXX This is a nasty dependency to add on something otherwise + # pretty clean. move it to build_ext under an nt + # specific part. + # shared libraries need to link against python15.lib + self.add_library ( "python" + sys.version[0] + sys.version[2] ) + self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) + + self.cc = "cl.exe" + self.link = "link.exe" + self.preprocess_options = None + self.compile_options = [ '/nologo' ] + + self.ldflags_shared = ['/DLL', '/nologo'] + self.ldflags_static = [ '/nologo'] + + # XXX things not handled by this compiler abstraction model: + # * client can't provide additional options for a compiler, + # e.g. warning, optimization, debugging flags. Perhaps this + # should be the domain of concrete compiler abstraction classes + # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base + # class should have methods for the common ones. + # * can't put output files (object files, libraries, whatever) + # into a separate directory from their inputs. Should this be + # handled by an 'output_dir' attribute of the whole object, or a + # parameter to the compile/link_* methods, or both? + # * can't completely override the include or library searchg + # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". + # I'm not sure how widely supported this is even by Unix + # compilers, much less on other platforms. And I'm even less + # sure how useful it is; maybe for cross-compiling, but + # support for that is a ways off. (And anyways, cross + # compilers probably have a dedicated binary with the + # right paths compiled in. I hope.) + # * can't do really freaky things with the library list/library + # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against + # different versions of libfoo.a in different locations. I + # think this is useless without the ability to null out the + # library search path anyways. + + + # -- Worker methods ------------------------------------------------ + # (must be implemented by subclasses) + + _c_extensions = [ '.c' ] + _cpp_extensions = [ '.cc', 'cpp' ] + + _obj_ext = '.obj' + _exe_ext = 'exe' + _shared_lib_ext = '.dll' + _static_lib_ext = '.lib' + + def compile (self, + sources, + macros=None, + includes=None): + """Compile one or more C/C++ source files. 'sources' must be + a list of strings, each one the name of a C/C++ source + file. Return a list of the object filenames generated + (one for each source filename in 'sources'). + + 'macros', if given, must be a list of macro definitions. A + macro definition is either a (name, value) 2-tuple or a (name,) + 1-tuple. The former defines a macro; if the value is None, the + macro is defined without an explicit value. The 1-tuple case + undefines a macro. Later definitions/redefinitions/ + undefinitions take precedence. + + 'includes', if given, must be a list of strings, the directories + to add to the default include file search path for this + compilation only.""" + + if macros is None: + macros = [] + if includes is None: + includes = [] + + objectFiles = [] + + base_pp_opts = _gen_preprocess_options (self.macros + macros, + self.include_dirs + includes) + + base_pp_opts.append('/c') + + for srcFile in sources: + base,ext = os.path.splitext(srcFile) + objFile = base + ".obj" + + if ext in self._c_extensions: + fileOpt = "/Tc" + elif ext in self._cpp_extensions: + fileOpt = "/Tp" + + inputOpt = fileOpt + srcFile + outputOpt = "/Fo" + objFile + + pp_opts = base_pp_opts + [ outputOpt, inputOpt ] + + returnCode = self.spawn( [ self.cc ] + self.compile_options + pp_opts ) + # XXX check for valid return code + + objectFiles.append( objFile ) + + + return objectFiles + + # XXX this is kind of useless without 'link_binary()' or + # 'link_executable()' or something -- or maybe 'link_static_lib()' + # should not exist at all, and we just have 'link_binary()'? + def link_static_lib (self, + objects, + output_libname, + libraries=None, + library_dirs=None): + """Link a bunch of stuff together to create a static library + file. The "bunch of stuff" consists of the list of object + files supplied as 'objects', the extra object files supplied + to 'add_link_object()' and/or 'set_link_objects()', the + libraries supplied to 'add_library()' and/or + 'set_libraries()', and the libraries supplied as 'libraries' + (if any). + + 'output_libname' should be a library name, not a filename; + the filename will be inferred from the library name. + + 'library_dirs', if supplied, should be a list of additional + directories to search on top of the system default and those + supplied to 'add_library_dir()' and/or 'set_library_dirs()'.""" + + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] + if build_info is None: + build_info = {} + + lib_opts = _gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs) + + if build_info.has_key('def_file') : + lib_opts.append('/DEF:' + build_info['def_file'] ) + + ld_args = self.ldflags_static + lib_opts + \ + objects + ['/OUT:' + output_filename] + + self.spawn ( [ self.link ] + ld_args ) + + + def link_shared_lib (self, + objects, + output_libname, + libraries=None, + library_dirs=None, + build_info=None): + """Link a bunch of stuff together to create a shared library + file. Has the same effect as 'link_static_lib()' except + that the filename inferred from 'output_libname' will most + likely be different, and the type of file generated will + almost certainly be different.""" + # XXX should we sanity check the library name? (eg. no + # slashes) + self.link_shared_object (objects, self.shared_library_name(output_libname), + build_info=build_info ) + + def link_shared_object (self, + objects, + output_filename, + libraries=None, + library_dirs=None, + build_info=None): + """Link a bunch of stuff together to create a shared object + file. Much like 'link_shared_lib()', except the output + filename is explicitly supplied as 'output_filename'.""" + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] + if build_info is None: + build_info = {} + + lib_opts = _gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs) + + if build_info.has_key('def_file') : + lib_opts.append('/DEF:' + build_info['def_file'] ) + + ld_args = self.ldflags_shared + lib_opts + \ + objects + ['/OUT:' + output_filename] + + self.spawn ( [ self.link ] + ld_args ) + + + # -- Filename mangling methods ------------------------------------- + + def _change_extensions( self, filenames, newExtension ): + object_filenames = [] + + for srcFile in filenames: + base,ext = os.path.splitext( srcFile ) + # XXX should we strip off any existing path? + object_filenames.append( base + newExtension ) + + return object_filenames + + def object_filenames (self, source_filenames): + """Return the list of object filenames corresponding to each + specified source filename.""" + return self._change_extensions( source_filenames, self._obj_ext ) + + def shared_object_filename (self, source_filename): + """Return the shared object filename corresponding to a + specified source filename.""" + return self._change_extensions( source_filenames, self._shared_lib_ext ) + + def library_filename (self, libname): + """Return the static library filename corresponding to the + specified library name.""" + return "lib%s%s" %( libname, self._static_lib_ext ) + + def shared_library_filename (self, libname): + """Return the shared library filename corresponding to the + specified library name.""" + return "lib%s%s" %( libname, self._shared_lib_ext ) + +# class MSVCCompiler + +def _gen_preprocess_options (macros, includes): + + # XXX it would be nice (mainly aesthetic, and so we don't generate + # stupid-looking command lines) to go over 'macros' and eliminate + # redundant definitions/undefinitions (ie. ensure that only the + # latest mention of a particular macro winds up on the command + # line). I don't think it's essential, though, since most (all?) + # Unix C compilers only pay attention to the latest -D or -U + # mention of a macro on their command line. Similar situation for + # 'includes'. I'm punting on both for now. Anyways, weeding out + # redundancies like this should probably be the province of + # CCompiler, since the data structures used are inherited from it + # and therefore common to all CCompiler classes. + + + pp_opts = [] + for macro in macros: + if len (macro) == 1: # undefine this macro + pp_opts.append ("-U%s" % macro[0]) + elif len (macro) == 2: + if macro[1] is None: # define with no explicit value + pp_opts.append ("-D%s" % macro[0]) + else: + # XXX *don't* need to be clever about quoting the + # macro value here, because we're going to avoid the + # shell at all costs when we spawn the command! + pp_opts.append ("-D%s=%s" % macro) + + for dir in includes: + pp_opts.append ("-I%s" % dir) + + return pp_opts + +def _gen_lib_options (libraries, library_dirs): + + lib_opts = [] + + for dir in library_dirs: + lib_opts.append ("/LIBPATH:%s" % dir) + + # XXX it's important that we *not* remove redundant library mentions! + # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to + # resolve all symbols. I just hope we never have to say "-lfoo obj.o + # -lbar" to get things to work -- that's certainly a possibility, but a + # pretty nasty way to arrange your C code. + + for lib in libraries: + lib_opts.append ("%s.lib" % lib) # import libraries end in .lib + + return lib_opts + +# _gen_lib_options () + + From 39a6cfad1bbad1865216c88bf6b9a24c0a0a98f7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:17:36 +0000 Subject: [PATCH 0040/8469] Patch from Perry Stoll: - fix some broken abstract methods - kludge: add 'build_info' parameter to link methods - add 'object_name()' and 'shared_library_name()' - support for MSVCCompiler class on NT/Win95 --- ccompiler.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index d5519cab1c..5f27ebc9b7 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -294,7 +294,8 @@ def link_shared_lib (self, objects, output_libname, libraries=None, - library_dirs=None): + library_dirs=None, + build_info=None): """Link a bunch of stuff together to create a shared library file. Has the same effect as 'link_static_lib()' except that the filename inferred from 'output_libname' will most @@ -306,7 +307,8 @@ def link_shared_object (self, objects, output_filename, libraries=None, - library_dirs=None): + library_dirs=None, + build_info=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'.""" @@ -315,27 +317,35 @@ def link_shared_object (self, # -- Filename mangling methods ------------------------------------- - def object_filenames (source_filenames): + def object_filenames (self, source_filenames): """Return the list of object filenames corresponding to each specified source filename.""" pass - def shared_object_filename (source_filename): + def shared_object_filename (self, source_filename): """Return the shared object filename corresponding to a specified source filename.""" pass - def library_filename (libname): + def library_filename (self, libname): """Return the static library filename corresponding to the specified library name.""" pass - def shared_library_filename (libname): + def shared_library_filename (self, libname): """Return the shared library filename corresponding to the specified library name.""" pass + + def object_name (self, inname): + """Given a name with no extension, return the name + object extension""" + return inname + self._obj_ext + + def shared_library_name (self, inname): + """Given a name with no extension, return the name + shared object extension""" + return inname + self._shared_lib_ext # -- Utility methods ----------------------------------------------- @@ -357,6 +367,9 @@ def new_compiler (plat=None, if plat == 'posix': from unixccompiler import UnixCCompiler return UnixCCompiler (verbose, dry_run) + elif plat in ['nt', 'win95' ]: + from msvccompiler import MSVCCompiler + return MSVCCompiler ( verbose, dry_run ) else: raise DistutilsPlatformError, \ "don't know how to compile C/C++ code on platform %s" % plat From 0ae40f52f7ec42a97ac5ba7f5a19dc7e61b06427 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:18:26 +0000 Subject: [PATCH 0041/8469] Patch from Perry Stoll: pass 'build_info' to link method. --- command/build_ext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index cb9da68dd9..a0464b4ea0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -178,10 +178,9 @@ def build_extensions (self, extensions): objects.extend (extra_objects) libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') - ext_filename = self.extension_filename (extension_name) self.compiler.link_shared_object (objects, ext_filename, - libraries, library_dirs) + libraries, library_dirs, build_info) # build_extensions () From 0ddb1bcf7e8dd498d71f29941f3b148dc81f55e4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:19:01 +0000 Subject: [PATCH 0042/8469] Patch from Perry Stoll: OK for list of modules to be empty. --- command/build_py.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index d956eef396..d75bf3f615 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -55,6 +55,10 @@ def run (self): # input and output filenames and checking for missing # input files. + # it's ok not to have *any* py files, right? + if not modules: + return + # XXX we should allow for wildcards, so eg. the Distutils setup.py # file would just have to say # py_modules = ['distutils.*', 'distutils.command.*'] From 0911797ba33945835d936fde6db2cd1c57fda9f2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:19:37 +0000 Subject: [PATCH 0043/8469] Patch from Perry Stoll: typo fix, make sure we only compile .py files. --- command/install_lib.py | 15 +++++++++------ command/install_py.py | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index f147af47f3..876a34ce61 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -9,7 +9,7 @@ class InstallPy (Command): options = [('dir=', 'd', "directory to install to"), - ('build-dir=' 'b', "build directory (where to install from)"), + ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), ] @@ -54,12 +54,15 @@ def run (self): for f in outfiles: # XXX can't assume this filename mapping! - out_fn = string.replace (f, '.py', '.pyc') - - self.make_file (f, out_fn, compile, (f,), - "compiling %s -> %s" % (f, out_fn), - "compilation of %s skipped" % f) + # only compile the file if it is actually a .py file + if f[-3:] == '.py': + out_fn = string.replace (f, '.py', '.pyc') + + self.make_file (f, out_fn, compile, (f,), + "compiling %s -> %s" % (f, out_fn), + "compilation of %s skipped" % f) + # XXX ignore self.optimize for now, since we don't really know if # we're compiling optimally or not, and couldn't pick what to do # even if we did know. ;-( diff --git a/command/install_py.py b/command/install_py.py index f147af47f3..876a34ce61 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -9,7 +9,7 @@ class InstallPy (Command): options = [('dir=', 'd', "directory to install to"), - ('build-dir=' 'b', "build directory (where to install from)"), + ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), ] @@ -54,12 +54,15 @@ def run (self): for f in outfiles: # XXX can't assume this filename mapping! - out_fn = string.replace (f, '.py', '.pyc') - - self.make_file (f, out_fn, compile, (f,), - "compiling %s -> %s" % (f, out_fn), - "compilation of %s skipped" % f) + # only compile the file if it is actually a .py file + if f[-3:] == '.py': + out_fn = string.replace (f, '.py', '.pyc') + + self.make_file (f, out_fn, compile, (f,), + "compiling %s -> %s" % (f, out_fn), + "compilation of %s skipped" % f) + # XXX ignore self.optimize for now, since we don't really know if # we're compiling optimally or not, and couldn't pick what to do # even if we did know. ;-( From cb5a002f13cc594941024531f7949013f47e598b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:20:32 +0000 Subject: [PATCH 0044/8469] Patch from Perry Stoll: import types module. --- core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core.py b/core.py index a9c573258a..2d5d066145 100644 --- a/core.py +++ b/core.py @@ -12,6 +12,7 @@ import sys, os import string, re +from types import * from distutils.errors import * from distutils.fancy_getopt import fancy_getopt from distutils import util From 8d83e47358a6a67a91fb5d2d2fe180c717b0a2be Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:20:56 +0000 Subject: [PATCH 0045/8469] Patch from Perry Stoll: support for Windows. --- spawn.py | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/spawn.py b/spawn.py index 24e76ef10e..3a0702dc9d 100644 --- a/spawn.py +++ b/spawn.py @@ -33,23 +33,42 @@ def spawn (cmd, if os.name == 'posix': _spawn_posix (cmd, search_path, verbose, dry_run) - elif os.name == 'windows': # ??? - # XXX should 'args' be cmd[1:] or cmd? - # XXX how do we detect failure? - # XXX how to do this in pre-1.5.2? - # XXX is P_WAIT the correct mode? - # XXX how to make Windows search the path? - if verbose: - print string.join (cmd, ' ') - if not dry_run: - os.spawnv (os.P_WAIT, cmd[0], cmd[1:]) + elif os.name in ( 'nt', 'windows' ): # ??? + _spawn_nt (cmd, search_path, verbose, dry_run) else: raise DistutilsPlatformError, \ "don't know how to spawn programs on platform '%s'" % os.name # spawn () +def _spawn_nt ( cmd, + search_path=1, + verbose=0, + dry_run=0): + import string + executable = cmd[0] + if search_path: + paths = string.split( os.environ['PATH'], os.pathsep) + base,ext = os.path.splitext(executable) + if (ext != '.exe'): + executable = executable + '.exe' + if not os.path.isfile(executable): + paths.reverse() # go over the paths and keep the last one + for p in paths: + f = os.path.join( p, executable ) + if os.path.isfile ( f ): + # the file exists, we have a shot at spawn working + executable = f + if verbose: + print string.join ( [executable] + cmd[1:], ' ') + if not dry_run: + # spawn for NT requires a full path to the .exe + rc = os.spawnv (os.P_WAIT, executable, cmd) + if rc != 0: + raise DistutilsExecError("command failed: %d" % rc) + + def _spawn_posix (cmd, search_path=1, verbose=0, From c152a6391d7f1e688764758c6a156219ab081ce5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:22:13 +0000 Subject: [PATCH 0046/8469] Patch from Perry Stoll: tweaks to Windows support. --- sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 5c60ca4a49..8eaf17dc35 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -137,8 +137,13 @@ def _init_nt(): os.path.join(sys.exec_prefix, "include", "config.h")), g) # set basic install directories g['LIBDEST']=os.path.join(sys.exec_prefix, "Lib") - g['BINLIBDEST']=os.path.join(sys.exec_prefix, "Lib") + g['BINLIBDEST']= os.path.join(sys.exec_prefix, "Lib") + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = os.path.join (sys.prefix, 'include' ) + + g['SO'] = '.dll' + g['exec_prefix'] = sys.exec_prefix try: exec "_init_" + os.name From badcf0591e3b166bd7c6e52926e54390d07a96e0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 29 Aug 1999 18:23:32 +0000 Subject: [PATCH 0047/8469] Patch from Perry Stoll: caught up with changes in CCompiler necessary (?) for MSVCCompiler. --- unixccompiler.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index c8468f965a..6594043c73 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -51,6 +51,11 @@ class UnixCCompiler (CCompiler): # directories and any module- or package-specific include directories # are specified via {add,set}_include_dirs(), and there's no way to # distinguish them. This might be a bug. + + _obj_ext = '.o' + _exe_ext = '' + _shared_lib_ext = SO + _static_lib_ext = '.a' def __init__ (self, verbose=0, @@ -121,23 +126,29 @@ def link_shared_lib (self, objects, output_libname, libraries=None, - library_dirs=None): + library_dirs=None, + build_info=None): # XXX should we sanity check the library name? (eg. no # slashes) - self.link_shared_object (objects, "lib%s%s" % (output_libname, SO)) + self.link_shared_object (objects, "lib%s%s" % \ + (output_libname, self._shared_lib_ext), + build_info=build_info) def link_shared_object (self, objects, output_filename, libraries=None, - library_dirs=None): + library_dirs=None, + build_info=None): if libraries is None: libraries = [] if library_dirs is None: library_dirs = [] - + if build_info is None: + build_info = {} + lib_opts = _gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs) ld_args = self.ldflags_shared + lib_opts + \ @@ -150,17 +161,19 @@ def link_shared_object (self, def object_filenames (self, source_filenames): outnames = [] for inname in source_filenames: - outnames.append (re.sub (r'\.(c|C|cc|cxx)$', '.o', inname)) + outnames.append ( re.sub (r'\.(c|C|cc|cxx|cpp)$', + self._obj_ext, inname)) return outnames def shared_object_filename (self, source_filename): - return re.sub (r'\.(c|C|cc|cxx)$', SO) + return re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) def library_filename (self, libname): - return "lib%s.a" % libname + return "lib%s%s" % (libname, self._static_lib_ext ) def shared_library_filename (self, libname): - return "lib%s.so" % libname + return "lib%s%s" % (libname, self._shared_lib_ext ) + # class UnixCCompiler From 8fb6d44119d8eadaa89e54db50e804726f6fa98f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:23:28 +0000 Subject: [PATCH 0048/8469] [from 1999/08/28] Apparently os.name is "nt" or "posix" or we don't care. Cosmetic tweaks. --- spawn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spawn.py b/spawn.py index 3a0702dc9d..eee8e7f4a0 100644 --- a/spawn.py +++ b/spawn.py @@ -33,7 +33,7 @@ def spawn (cmd, if os.name == 'posix': _spawn_posix (cmd, search_path, verbose, dry_run) - elif os.name in ( 'nt', 'windows' ): # ??? + elif os.name == 'nt': _spawn_nt (cmd, search_path, verbose, dry_run) else: raise DistutilsPlatformError, \ @@ -41,11 +41,11 @@ def spawn (cmd, # spawn () + def _spawn_nt ( cmd, search_path=1, verbose=0, dry_run=0): - import string executable = cmd[0] if search_path: paths = string.split( os.environ['PATH'], os.pathsep) From 053838f4381b3616afaa3cd161a81d61969559ab Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:29:08 +0000 Subject: [PATCH 0049/8469] os.name is "posix" or "nt" or we don't care. Added big comment about the kludginess of passing 'build_options' to the link methods and how to fix it. Added 'gen_preprocess_options()' and 'gen_lib_options()' convenience functions -- the two cases are very similar for Unix C Compilers and VC++, so I figured I might as well unify the implementations. --- ccompiler.py | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 5f27ebc9b7..b1167ac25a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -290,6 +290,30 @@ def link_static_lib (self, pass + # XXX passing in 'build_info' here is a kludge to deal with the + # oddities of one particular compiler (Visual C++). For some reason, + # it needs to be told about ".def" files, and currently the + # 'build_info' hash allows this through a 'def_file' element. The link + # methods for VC++ look for 'def_file' and transform it into the + # appropriate command-line options. The current code is objectionable + # for a number of reasons: 1) if the link methods take 'build_info', + # why bother passing in libraries, library_dirs, etc.? 2) if the link + # methods do it, why not the compile methods? 3) build_info is part of + # the interface between setup.py and the 'build_ext' command -- it + # should stop there and not be propagated down into the compiler + # classes! and 4) I don't like elevating a platform- and + # compiler-specific oddity to "first-class" status in 'build_info' (oh + # well, at least it's not being reified in the compiler classes -- that + # would be really gross). + # + # Possible solutions: + # - just pass build_info to all the compile/link methods, + # never mind all those other parameters and screw the + # integrity of the interfaces + # - add a mechanism for passing platform-specific and/or + # compiler-specific compiler/linker options from setup.py + # straight through to the appropriate compiler class + def link_shared_lib (self, objects, output_libname, @@ -367,9 +391,81 @@ def new_compiler (plat=None, if plat == 'posix': from unixccompiler import UnixCCompiler return UnixCCompiler (verbose, dry_run) - elif plat in ['nt', 'win95' ]: + elif plat == 'nt': from msvccompiler import MSVCCompiler return MSVCCompiler ( verbose, dry_run ) else: raise DistutilsPlatformError, \ "don't know how to compile C/C++ code on platform %s" % plat + + +def gen_preprocess_options (macros, includes): + """Generate C pre-processor options (-D, -U, -I) as used by at + least two types of compilers: the typical Unix compiler and Visual + C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where + (name,) means undefine (-U) macro 'name', and (name,value) means + define (-D) macro 'name' to 'value'. 'includes' is just a list of + directory names to be added to the header file search path (-I). + Returns a list of command-line options suitable for either + Unix compilers or Visual C++.""" + + # XXX it would be nice (mainly aesthetic, and so we don't generate + # stupid-looking command lines) to go over 'macros' and eliminate + # redundant definitions/undefinitions (ie. ensure that only the + # latest mention of a particular macro winds up on the command + # line). I don't think it's essential, though, since most (all?) + # Unix C compilers only pay attention to the latest -D or -U + # mention of a macro on their command line. Similar situation for + # 'includes'. I'm punting on both for now. Anyways, weeding out + # redundancies like this should probably be the province of + # CCompiler, since the data structures used are inherited from it + # and therefore common to all CCompiler classes. + + pp_opts = [] + for macro in macros: + if len (macro) == 1: # undefine this macro + pp_opts.append ("-U%s" % macro[0]) + elif len (macro) == 2: + if macro[1] is None: # define with no explicit value + pp_opts.append ("-D%s" % macro[0]) + else: + # XXX *don't* need to be clever about quoting the + # macro value here, because we're going to avoid the + # shell at all costs when we spawn the command! + pp_opts.append ("-D%s=%s" % macro) + + for dir in includes: + pp_opts.append ("-I%s" % dir) + + return pp_opts + +# gen_preprocess_options () + + +def gen_lib_options (libraries, library_dirs, lib_format, dir_format): + """Generate linker options for searching library directories and + linking with specific libraries. 'libraries' and 'library_dirs' + are, respectively, lists of library names (not filenames!) and + search directories. 'lib_format' is a format string with exactly + one "%s", into which will be plugged each library name in turn; + 'dir_format' is similar, but directory names will be plugged into + it. Returns a list of command-line options suitable for use with + some compiler (depending on the two format strings passed in).""" + + lib_opts = [] + + for dir in library_dirs: + lib_opts.append (dir_format % dir) + + # XXX it's important that we *not* remove redundant library mentions! + # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to + # resolve all symbols. I just hope we never have to say "-lfoo obj.o + # -lbar" to get things to work -- that's certainly a possibility, but a + # pretty nasty way to arrange your C code. + + for lib in libraries: + lib_opts.append (lib_format % lib) + + return lib_opts + +# _gen_lib_options () From f57477b38afe2a8084580f112be920884c74fcb5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:32:19 +0000 Subject: [PATCH 0050/8469] Ditched '_gen_preprocess_options()' and '_gen_lib_options()' -- they're now provided (minus the leading underscore) by the ccompiler module. Fix 'compile()' to return the list of object files generated. Cosmetic tweaks/delete cruft. --- unixccompiler.py | 76 +++++------------------------------------------- 1 file changed, 8 insertions(+), 68 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 6594043c73..a868451462 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -21,7 +21,7 @@ from types import * from sysconfig import \ CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO -from ccompiler import CCompiler +from ccompiler import CCompiler, gen_preprocess_options, gen_lib_options # XXX Things not currently handled: @@ -101,8 +101,8 @@ def compile (self, raise TypeError, \ "'includes' (if supplied) must be a list of strings" - pp_opts = _gen_preprocess_options (self.macros + macros, - self.include_dirs + includes) + pp_opts = gen_preprocess_options (self.macros + macros, + self.include_dirs + includes) # use of ccflags_shared means we're blithely assuming that we're # compiling for inclusion in a shared object! (will have to fix @@ -111,10 +111,9 @@ def compile (self, self.ccflags + self.ccflags_shared + \ sources - # this will change to 'spawn' when I have it! - #print string.join ([self.cc] + cc_args, ' ') self.spawn ([self.cc] + cc_args) - + return self.object_filenames (sources) + # XXX punting on 'link_static_lib()' for now -- it might be better for # CCompiler to mandate just 'link_binary()' or some such to build a new @@ -149,12 +148,12 @@ def link_shared_object (self, if build_info is None: build_info = {} - lib_opts = _gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs) + lib_opts = gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs, + "-l%s", "-L%s") ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] - #print string.join ([self.ld_shared] + ld_args, ' ') self.spawn ([self.ld_shared] + ld_args) @@ -174,8 +173,6 @@ def library_filename (self, libname): def shared_library_filename (self, libname): return "lib%s%s" % (libname, self._shared_lib_ext ) - - # class UnixCCompiler @@ -184,60 +181,3 @@ def _split_command (cmd): the list of arguments; return them as (cmd, arglist).""" args = string.split (cmd) return (args[0], args[1:]) - - -def _gen_preprocess_options (macros, includes): - - # XXX it would be nice (mainly aesthetic, and so we don't generate - # stupid-looking command lines) to go over 'macros' and eliminate - # redundant definitions/undefinitions (ie. ensure that only the - # latest mention of a particular macro winds up on the command - # line). I don't think it's essential, though, since most (all?) - # Unix C compilers only pay attention to the latest -D or -U - # mention of a macro on their command line. Similar situation for - # 'includes'. I'm punting on both for now. Anyways, weeding out - # redundancies like this should probably be the province of - # CCompiler, since the data structures used are inherited from it - # and therefore common to all CCompiler classes. - - - pp_opts = [] - for macro in macros: - if len (macro) == 1: # undefine this macro - pp_opts.append ("-U%s" % macro[0]) - elif len (macro) == 2: - if macro[1] is None: # define with no explicit value - pp_opts.append ("-D%s" % macro[0]) - else: - # XXX *don't* need to be clever about quoting the - # macro value here, because we're going to avoid the - # shell at all costs when we spawn the command! - pp_opts.append ("-D%s=%s" % macro) - - for dir in includes: - pp_opts.append ("-I%s" % dir) - - return pp_opts - -# _gen_preprocess_options () - - -def _gen_lib_options (libraries, library_dirs): - - lib_opts = [] - - for dir in library_dirs: - lib_opts.append ("-L%s" % dir) - - # XXX it's important that we *not* remove redundant library mentions! - # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to - # resolve all symbols. I just hope we never have to say "-lfoo obj.o - # -lbar" to get things to work -- that's certainly a possibility, but a - # pretty nasty way to arrange your C code. - - for lib in libraries: - lib_opts.append ("-l%s" % lib) - - return lib_opts - -# _gen_lib_options () From 74deaef6c7323d3512b25e14cfea5f13fbfcb37e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:36:01 +0000 Subject: [PATCH 0051/8469] Ditched redundant docstrings and comments (overlap with ccompiler.py). Ditched redundant '_gen_preprocess_options()' and '_gen_lib_options()' -- now provided by ccompiler.py. Fixed some filename extension variables -- added missing period. Cosmetic tweaks. --- msvccompiler.py | 131 ++++++++---------------------------------------- 1 file changed, 20 insertions(+), 111 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index ff66f913be..f328232bc0 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -11,23 +11,13 @@ import os import sys from distutils.errors import * -from distutils.ccompiler import CCompiler +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options -class MSVCCompiler ( CCompiler) : - """Abstract base class to define the interface that must be implemented - by real compiler abstraction classes. Might have some use as a - place for shared code, but it's not yet clear what code can be - shared between compiler abstraction models for different platforms. - - The basic idea behind a compiler abstraction class is that each - instance can be used for all the compile/link steps in building - a single project. Thus, attributes common to all of those compile - and link steps -- include directories, macros to define, libraries - to link against, etc. -- are attributes of the compiler instance. - To allow for variability in how individual files are treated, - most (all?) of those attributes may be varied on a per-compilation - or per-link basis.""" +class MSVCCompiler (CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" def __init__ (self, verbose=0, @@ -35,11 +25,9 @@ def __init__ (self, CCompiler.__init__ (self, verbose, dry_run) - # XXX This is a nasty dependency to add on something otherwise - # pretty clean. move it to build_ext under an nt - # specific part. - # shared libraries need to link against python15.lib + # pretty clean. move it to build_ext under an nt specific part. + # shared libraries need to link against python15.lib self.add_library ( "python" + sys.version[0] + sys.version[2] ) self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) @@ -51,39 +39,15 @@ def __init__ (self, self.ldflags_shared = ['/DLL', '/nologo'] self.ldflags_static = [ '/nologo'] - # XXX things not handled by this compiler abstraction model: - # * client can't provide additional options for a compiler, - # e.g. warning, optimization, debugging flags. Perhaps this - # should be the domain of concrete compiler abstraction classes - # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base - # class should have methods for the common ones. - # * can't put output files (object files, libraries, whatever) - # into a separate directory from their inputs. Should this be - # handled by an 'output_dir' attribute of the whole object, or a - # parameter to the compile/link_* methods, or both? - # * can't completely override the include or library searchg - # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". - # I'm not sure how widely supported this is even by Unix - # compilers, much less on other platforms. And I'm even less - # sure how useful it is; maybe for cross-compiling, but - # support for that is a ways off. (And anyways, cross - # compilers probably have a dedicated binary with the - # right paths compiled in. I hope.) - # * can't do really freaky things with the library list/library - # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against - # different versions of libfoo.a in different locations. I - # think this is useless without the ability to null out the - # library search path anyways. - # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) _c_extensions = [ '.c' ] - _cpp_extensions = [ '.cc', 'cpp' ] + _cpp_extensions = [ '.cc', '.cpp' ] _obj_ext = '.obj' - _exe_ext = 'exe' + _exe_ext = '.exe' _shared_lib_ext = '.dll' _static_lib_ext = '.lib' @@ -114,8 +78,8 @@ def compile (self, objectFiles = [] - base_pp_opts = _gen_preprocess_options (self.macros + macros, - self.include_dirs + includes) + base_pp_opts = gen_preprocess_options (self.macros + macros, + self.include_dirs + includes) base_pp_opts.append('/c') @@ -133,14 +97,12 @@ def compile (self, pp_opts = base_pp_opts + [ outputOpt, inputOpt ] - returnCode = self.spawn( [ self.cc ] + self.compile_options + pp_opts ) - # XXX check for valid return code - + self.spawn( [ self.cc ] + self.compile_options + pp_opts) objectFiles.append( objFile ) - return objectFiles - + + # XXX this is kind of useless without 'link_binary()' or # 'link_executable()' or something -- or maybe 'link_static_lib()' # should not exist at all, and we just have 'link_binary()'? @@ -171,8 +133,9 @@ def link_static_lib (self, if build_info is None: build_info = {} - lib_opts = _gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs) + lib_opts = gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs, + "%s.lib", "/LIBPATH:%s") if build_info.has_key('def_file') : lib_opts.append('/DEF:' + build_info['def_file'] ) @@ -215,8 +178,9 @@ def link_shared_object (self, if build_info is None: build_info = {} - lib_opts = _gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs) + lib_opts = gen_lib_options (self.libraries + libraries, + self.library_dirs + library_dirs, + "%s.lib", "/LIBPATH:%s") if build_info.has_key('def_file') : lib_opts.append('/DEF:' + build_info['def_file'] ) @@ -260,58 +224,3 @@ def shared_library_filename (self, libname): return "lib%s%s" %( libname, self._shared_lib_ext ) # class MSVCCompiler - -def _gen_preprocess_options (macros, includes): - - # XXX it would be nice (mainly aesthetic, and so we don't generate - # stupid-looking command lines) to go over 'macros' and eliminate - # redundant definitions/undefinitions (ie. ensure that only the - # latest mention of a particular macro winds up on the command - # line). I don't think it's essential, though, since most (all?) - # Unix C compilers only pay attention to the latest -D or -U - # mention of a macro on their command line. Similar situation for - # 'includes'. I'm punting on both for now. Anyways, weeding out - # redundancies like this should probably be the province of - # CCompiler, since the data structures used are inherited from it - # and therefore common to all CCompiler classes. - - - pp_opts = [] - for macro in macros: - if len (macro) == 1: # undefine this macro - pp_opts.append ("-U%s" % macro[0]) - elif len (macro) == 2: - if macro[1] is None: # define with no explicit value - pp_opts.append ("-D%s" % macro[0]) - else: - # XXX *don't* need to be clever about quoting the - # macro value here, because we're going to avoid the - # shell at all costs when we spawn the command! - pp_opts.append ("-D%s=%s" % macro) - - for dir in includes: - pp_opts.append ("-I%s" % dir) - - return pp_opts - -def _gen_lib_options (libraries, library_dirs): - - lib_opts = [] - - for dir in library_dirs: - lib_opts.append ("/LIBPATH:%s" % dir) - - # XXX it's important that we *not* remove redundant library mentions! - # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to - # resolve all symbols. I just hope we never have to say "-lfoo obj.o - # -lbar" to get things to work -- that's certainly a possibility, but a - # pretty nasty way to arrange your C code. - - for lib in libraries: - lib_opts.append ("%s.lib" % lib) # import libraries end in .lib - - return lib_opts - -# _gen_lib_options () - - From 7fc78eeacf803248087fcf97f900c43656e02946 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:41:09 +0000 Subject: [PATCH 0052/8469] Careful rethink of command options, distribution options, distribution attributes, etc. Biggest change was to the Distribution constructor -- it now looks for an 'options' attribute, which contains values (options) that are explicitly farmed out to the commands. Also, certain options supplied to Distribution (ie. in the 'setup()' call in setup.py) are now "command option aliases", meaning they are dropped right into a certain command rather than being distribution options. This is handled by a new Distribution class attribute, 'alias_options'. Various comment changes to reflect the new way-of-thinking. Added 'get_command_name()' method to Command -- was assuming its existence all along as 'command_name()', so changed the code that needs it to call 'get_command_name()'. --- core.py | 134 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 108 insertions(+), 26 deletions(-) diff --git a/core.py b/core.py index 2d5d066145..8d2572afca 100644 --- a/core.py +++ b/core.py @@ -72,9 +72,12 @@ def setup (**attrs): # (ie. everything except distclass) to initialize it dist = klass (attrs) - # Get it to parse the command line; any command-line errors are - # the end-users fault, so turn them into SystemExit to suppress - # tracebacks. + # If we had a config file, this is where we would parse it: override + # the client-supplied command options, but be overridden by the + # command line. + + # Parse the command line; any command-line errors are the end-users + # fault, so turn them into SystemExit to suppress tracebacks. try: dist.parse_command_line (sys.argv[1:]) except DistutilsArgError, msg: @@ -111,6 +114,18 @@ class Distribution: ('dry-run', 'n', "don't actually do anything"), ] + # 'alias_options' map distribution options to command options -- the + # idea is that the most common, essential options can be directly + # specified as Distribution attributes, and the rest can go in the + # 'options' dictionary. These aliases are for those common, essential + # options. + alias_options = { 'py_modules': ('build_py', 'modules'), + 'ext_modules': ('build_ext', 'modules'), + 'package': [('build_py', 'package',), + ('build_ext', 'package')], + + } + # -- Creation/initialization methods ------------------------------- @@ -129,11 +144,13 @@ def __init__ (self, attrs=None): self.verbose = 0 self.dry_run = 0 - # And for all other attributes (stuff that might be passed in - # from setup.py, rather than from the end-user) + # And the "distribution meta-data" options -- these can only + # come from setup.py (the caller), not the command line + # (or a hypothetical config file).. self.name = None self.version = None self.author = None + self.url = None self.licence = None self.description = None @@ -143,18 +160,14 @@ def __init__ (self, attrs=None): # for the client to override command classes self.cmdclass = {} - # The rest of these are really the business of various commands, - # rather than of the Distribution itself. However, they have - # to be here as a conduit to the relevant command class. - self.py_modules = None - self.ext_modules = None - self.package = None - - # Now we'll use the attrs dictionary to possibly override - # any or all of these distribution options - if attrs: - for k in attrs.keys(): - setattr (self, k, attrs[k]) + # These options are really the business of various commands, rather + # than of the Distribution itself. We provide aliases for them in + # Distribution as a convenience to the developer. + # dictionary. + # XXX not needed anymore! (I think...) + #self.py_modules = None + #self.ext_modules = None + #self.package = None # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to @@ -174,6 +187,49 @@ def __init__ (self, attrs=None): # '.get()' rather than a straight lookup. self.have_run = {} + # Now we'll use the attrs dictionary (from the client) to possibly + # override any or all of these distribution options + if attrs: + + # Pull out the set of command options and work on them + # specifically. Note that this order guarantees that aliased + # command options will override any supplied redundantly + # through the general options dictionary. + options = attrs.get ('options') + if options: + del attrs['options'] + for (command, cmd_options) in options.items(): + cmd_obj = self.find_command_obj (command) + for (key, val) in cmd_options.items(): + cmd_obj.set_option (key, val) + # loop over commands + # if any command options + + # Now work on the rest of the attributes. Note that some of + # these may be aliases for command options, so we might go + # through some of the above again. + for (key,val) in attrs.items(): + alias = self.alias_options.get (key) + if alias: + if type (alias) is ListType: + for (command, cmd_option) in alias: + cmd_obj = self.find_command_obj (command) + cmd_obj.set_option (cmd_option, val) + elif type (alias) is TupleType: + (command, cmd_option) = alias + cmd_obj = self.find_command_obj (command) + cmd_obj.set_option (cmd_option, val) + else: + raise RuntimeError, \ + ("oops! bad alias option for '%s': " + + "must be tuple or list of tuples") % key + + elif hasattr (self, key): + setattr (self, key, val) + else: + raise DistutilsOptionError, \ + "invalid distribution option '%s'" % key + # __init__ () @@ -213,10 +269,10 @@ def parse_command_line (self, args): raise SystemExit, "invalid command name '%s'" % command self.commands.append (command) - # Have to instantiate the command class now, so we have a - # way to get its valid options and somewhere to put the - # results of parsing its share of the command-line - cmd_obj = self.create_command_obj (command) + # Make sure we have a command object to put the options into + # (this either pulls it out of a cache of command objects, + # or finds and instantiates the command class). + cmd_obj = self.find_command_obj (command) # Require that the command class be derived from Command -- # that way, we can be sure that we at least have the 'run' @@ -226,8 +282,15 @@ def parse_command_line (self, args): "command class %s must subclass Command" % \ cmd_obj.__class__ - # XXX this assumes that cmd_obj provides an 'options' - # attribute, but we're not enforcing that anywhere! + # Also make sure that the command object provides a list of its + # known options + if not (hasattr (cmd_obj, 'options') and + type (cmd_obj.options) is ListType): + raise DistutilsClasserror, \ + ("command class %s must provide an 'options' attribute "+ + "(a list of tuples)") % \ + cmd_obj.__class__ + args = fancy_getopt (cmd_obj.options, cmd_obj, args[1:]) self.command_obj[command] = cmd_obj self.have_run[command] = 0 @@ -376,6 +439,11 @@ def run_command (self, command): Then invoke 'run()' on that command object (or an existing one).""" + # XXX currently, this is the only place where we invoke a + # command object's 'run()' method -- so it might make sense to + # put the 'set_final_options()' call here, too, instead of + # requiring every command's 'run()' to call it first. + # Already been here, done that? then return silently. if self.have_run.get (command): return @@ -530,7 +598,7 @@ def get_option (self, option): except AttributeError: raise DistutilsOptionError, \ "command %s: no such option %s" % \ - (self.command_name(), option) + (self.get_command_name(), option) def get_options (self, *options): @@ -545,7 +613,7 @@ def get_options (self, *options): except AttributeError, name: raise DistutilsOptionError, \ "command %s: no such option %s" % \ - (self.command_name(), name) + (self.get_command_name(), name) return tuple (values) @@ -557,7 +625,7 @@ def set_option (self, option, value): if not hasattr (self, option): raise DistutilsOptionError, \ "command %s: no such option %s" % \ - (self.command_name(), option) + (self.get_command_name(), option) if value is not None: setattr (self, option, value) @@ -573,6 +641,20 @@ def set_options (self, **optval): # -- Convenience methods for commands ------------------------------ + def get_command_name (self): + if hasattr (self, 'command_name'): + return self.command_name + else: + class_name = self.__class__.__name__ + + # The re.split here returs empty strings delimited by the + # words we're actually interested in -- e.g. "FooBarBaz" + # splits to ['', 'Foo', '', 'Bar', '', 'Baz', '']. Hence + # the 'filter' to strip out the empties. + words = filter (None, re.split (r'([A-Z][a-z]+)', class_name)) + return string.join (map (string.lower, words), "_") + + def set_undefined_options (self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here From ba6f5bc4f0534bb3ebab3a17f16686f613e42707 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 8 Sep 1999 02:42:30 +0000 Subject: [PATCH 0053/8469] Changed to reflect the new "command options" regime -- in particular, we no longer explicitly pull distribution options out of our Distribution object, but rather let the Distribution put them into the command object. --- command/build_ext.py | 22 +++++++++++++++------- command/build_py.py | 14 +++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index a0464b4ea0..a3982c1b22 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -61,6 +61,7 @@ class BuildExt (Command): def set_default_options (self): + self.extensions = None self.dir = None self.include_dirs = None self.define = None @@ -90,10 +91,14 @@ def set_final_options (self): def run (self): self.set_final_options () - (extensions, package) = \ - self.distribution.get_options ('ext_modules', 'package') - # 'extensions', as supplied by setup.py, is a list of 2-tuples. + # XXX we should care about the package we compile extensions + # into! + + #(extensions, package) = \ + # self.distribution.get_options ('ext_modules', 'package') + + # 'self.extensions', as supplied by setup.py, is a list of 2-tuples. # Each tuple is simple: # (ext_name, build_info) # build_info is a dictionary containing everything specific to @@ -101,13 +106,16 @@ def run (self): # should be handled by general distutils options passed from # setup.py down to right here, but that's not taken care of yet.) + if not self.extensions: + return - # First, sanity-check the 'extensions' list - self.check_extensions_list (extensions) + # First, sanity-check the 'self.extensions' list + self.check_extensions_list (self.extensions) # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (verbose=self.distribution.verbose, + self.compiler = new_compiler (plat=os.environ.get ('PLAT'), + verbose=self.distribution.verbose, dry_run=self.distribution.dry_run) if self.include_dirs is not None: self.compiler.set_include_dirs (self.include_dirs) @@ -128,7 +136,7 @@ def run (self): self.compiler.set_link_objects (self.link_objects) # Now the real loop over extensions - self.build_extensions (extensions) + self.build_extensions (self.extensions) diff --git a/command/build_py.py b/command/build_py.py index d75bf3f615..28aefa9e7e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -20,10 +20,14 @@ class BuildPy (Command): def set_default_options (self): self.dir = None + self.modules = None + self.package = None def set_final_options (self): self.set_undefined_options ('build', ('libdir', 'dir')) + if self.package is None: + self.package = '' def run (self): @@ -43,10 +47,6 @@ def run (self): self.set_final_options () - (modules, package) = \ - self.distribution.get_options ('py_modules', 'package') - package = package or '' - infiles = [] outfiles = [] missing = [] @@ -56,20 +56,20 @@ def run (self): # input files. # it's ok not to have *any* py files, right? - if not modules: + if not self.modules: return # XXX we should allow for wildcards, so eg. the Distutils setup.py # file would just have to say # py_modules = ['distutils.*', 'distutils.command.*'] # without having to list each one explicitly. - for m in modules: + for m in self.modules: fn = apply (os.path.join, tuple (string.split (m, '.'))) + '.py' if not os.path.exists (fn): missing.append (fn) else: infiles.append (fn) - outfiles.append (os.path.join (self.dir, package, fn)) + outfiles.append (os.path.join (self.dir, self.package, fn)) # Blow up if any input files were not found. if missing: From cb448b16d3ad06c7158fe5a63cdb2f66b401935d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 03:03:01 +0000 Subject: [PATCH 0054/8469] Fixed some goofs in 'alias_options'. Error message tweak in Command.set_option(). Added Command.get_peer_option(). Added Command.move_file() wrapper. --- core.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 8d2572afca..a6c378d36c 100644 --- a/core.py +++ b/core.py @@ -120,9 +120,10 @@ class Distribution: # 'options' dictionary. These aliases are for those common, essential # options. alias_options = { 'py_modules': ('build_py', 'modules'), - 'ext_modules': ('build_ext', 'modules'), + 'ext_modules': ('build_ext', 'extensions'), 'package': [('build_py', 'package',), ('build_ext', 'package')], + 'include_dirs': ('build_ext', 'include_dirs'), } @@ -624,7 +625,7 @@ def set_option (self, option, value): if not hasattr (self, option): raise DistutilsOptionError, \ - "command %s: no such option %s" % \ + "command '%s': no such option '%s'" % \ (self.get_command_name(), option) if value is not None: setattr (self, option, value) @@ -701,6 +702,11 @@ def set_peer_option (self, command, option, value): cmd_obj.set_final_options () + def get_peer_option (self, command, option): + cmd_obj = self.distribution.find_command_obj (command) + return cmd_obj.get_option (option) + + def run_peer (self, command): """Run some other command: uses the 'run_command()' method of Distribution, which creates the command object if necessary @@ -767,6 +773,13 @@ def copy_tree (self, infile, outfile, self.distribution.dry_run) + def move_file (self, src, dst, level=1): + """Move a file respecting verbose and dry-run flags.""" + return util.move_file (src, dst, + self.distribution.verbose >= level, + self.distribution.dry_run) + + def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): From e9f33b359886fec9cc43caf900f3f1e8a12a44ae Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 03:07:24 +0000 Subject: [PATCH 0055/8469] Added 'output_dir' attribute, and 'output_dir' parameter to several method signatures, and updated some docstrings to reflect it. Some comments added. Added 'announce()' and 'move_file()' methods. --- ccompiler.py | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index b1167ac25a..0e505338be 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -12,6 +12,7 @@ from copy import copy from distutils.errors import * from distutils.spawn import spawn +from distutils.util import move_file class CCompiler: @@ -62,6 +63,10 @@ def __init__ (self, self.verbose = verbose self.dry_run = dry_run + # 'output_dir': a common output directory for object, library, + # shared object, and shared library files + self.output_dir = None + # 'macros': a list of macro definitions (or undefinitions). A # macro definition is a 2-tuple (name, value), where the value is # either a string or None (no explicit value). A macro @@ -244,6 +249,7 @@ def set_link_objects (self, objects): def compile (self, sources, + output_dir=None, macros=None, includes=None): """Compile one or more C/C++ source files. 'sources' must be @@ -270,6 +276,7 @@ def compile (self, def link_static_lib (self, objects, output_libname, + output_dir=None, libraries=None, library_dirs=None): """Link a bunch of stuff together to create a static library @@ -317,6 +324,7 @@ def link_static_lib (self, def link_shared_lib (self, objects, output_libname, + output_dir=None, libraries=None, library_dirs=None, build_info=None): @@ -330,25 +338,37 @@ def link_shared_lib (self, def link_shared_object (self, objects, output_filename, + output_dir=None, libraries=None, library_dirs=None, build_info=None): """Link a bunch of stuff together to create a shared object - file. Much like 'link_shared_lib()', except the output - filename is explicitly supplied as 'output_filename'.""" + file. Much like 'link_shared_lib()', except the output filename + is explicitly supplied as 'output_filename'. If 'output_dir' is + supplied, 'output_filename' is relative to it + (i.e. 'output_filename' can provide directoriy components if + needed).""" pass # -- Filename mangling methods ------------------------------------- - def object_filenames (self, source_filenames): + # General principle for the filename-mangling methods: by default, + # don't include a directory component, no matter what the caller + # supplies. Eg. for UnixCCompiler, a source file of "foo/bar/baz.c" + # becomes "baz.o" or "baz.so", etc. (That way, it's easiest for the + # caller to decide where it wants to put/find the output file.) The + # 'output_dir' parameter overrides this, of course -- the directory + # component of the input filenames is replaced by 'output_dir'. + + def object_filenames (self, source_filenames, output_dir=None): """Return the list of object filenames corresponding to each specified source filename.""" pass def shared_object_filename (self, source_filename): """Return the shared object filename corresponding to a - specified source filename.""" + specified source filename (assuming the same directory).""" pass def library_filename (self, libname): @@ -362,7 +382,7 @@ def shared_library_filename (self, libname): specified library name.""" pass - + # XXX ugh -- these should go! def object_name (self, inname): """Given a name with no extension, return the name + object extension""" return inname + self._obj_ext @@ -373,9 +393,16 @@ def shared_library_name (self, inname): # -- Utility methods ----------------------------------------------- + def announce (self, msg, level=1): + if self.verbose >= level: + print msg + def spawn (self, cmd): spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) + def move_file (self, src, dst): + return move_file (src, dst, verbose=self.verbose, dry_run=self.dry_run) + # class CCompiler @@ -393,7 +420,7 @@ def new_compiler (plat=None, return UnixCCompiler (verbose, dry_run) elif plat == 'nt': from msvccompiler import MSVCCompiler - return MSVCCompiler ( verbose, dry_run ) + return MSVCCompiler (verbose, dry_run) else: raise DistutilsPlatformError, \ "don't know how to compile C/C++ code on platform %s" % plat From 38e16941af7fee0698b7c2f53508a3a6b461a30c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 03:09:38 +0000 Subject: [PATCH 0056/8469] Added 'newer_pairwise()' and 'newer_group()'. Terminology change in 'newer()'. Made 'copy_tree' respect dry_run flag a little better. Added 'move_file()'. --- util.py | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 133 insertions(+), 16 deletions(-) diff --git a/util.py b/util.py index 9a299dfd83..bb790af438 100644 --- a/util.py +++ b/util.py @@ -62,26 +62,75 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # mkpath () -def newer (file1, file2): - """Return true if file1 exists and is more recently modified than - file2, or if file1 exists and file2 doesn't. Return false if both - exist and file2 is the same age or younger than file1. Raises - DistutilsFileError if file1 does not exist.""" - - if not os.path.exists (file1): - raise DistutilsFileError, "file '%s' does not exist" % file1 - if not os.path.exists (file2): +def newer (source, target): + """Return true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. Return + false if both exist and 'target' is the same age or younger than + 'source'. Raise DistutilsFileError if 'source' does not + exist.""" + + if not os.path.exists (source): + raise DistutilsFileError, "file '%s' does not exist" % source + if not os.path.exists (target): return 1 - from stat import * - mtime1 = os.stat(file1)[ST_MTIME] - mtime2 = os.stat(file2)[ST_MTIME] + from stat import ST_MTIME + mtime1 = os.stat(source)[ST_MTIME] + mtime2 = os.stat(target)[ST_MTIME] return mtime1 > mtime2 # newer () +def newer_pairwise (sources, targets): + + """Walk two filename lists in parallel, testing if each 'target' is + up-to-date relative to its corresponding 'source'. If so, both + are deleted from their respective lists. Return a list of tuples + containing the deleted (source,target) pairs.""" + + if len (sources) != len (targets): + raise ValueError, "'sources' and 'targets' must be same length" + + goners = [] + for i in range (len (sources)-1, -1, -1): + if not newer (sources[i], targets[i]): + goners.append ((sources[i], targets[i])) + del sources[i] + del targets[i] + goners.reverse() + return goners + +# newer_pairwise () + + +def newer_group (sources, target): + """Return true if 'target' is out-of-date with respect to any + file listed in 'sources'. In other words, if 'target' exists and + is newer than every file in 'sources', return false; otherwise + return true.""" + + # If the target doesn't even exist, then it's definitely out-of-date. + if not os.path.exists (target): + return 1 + + # Otherwise we have to find out the hard way: if *any* source file + # is more recent than 'target', then 'target' is out-of-date and + # we can immediately return true. If we fall through to the end + # of the loop, then 'target' is up-to-date and we return false. + from stat import ST_MTIME + target_mtime = os.stat (target)[ST_MTIME] + for source in sources: + source_mtime = os.stat(source)[ST_MTIME] + if source_mtime > target_mtime: + return 1 + else: + return 0 + +# newer_group () + + def make_file (src, dst, func, args, verbose=0, update_message=None, noupdate_message=None): """Makes 'dst' from 'src' (both filenames) by calling 'func' with @@ -176,7 +225,7 @@ def copy_file (src, dst, if not os.path.isfile (src): raise DistutilsFileError, \ - "can't copy %s:not a regular file" % src + "can't copy %s: not a regular file" % src if os.path.isdir (dst): dir = dst @@ -237,14 +286,17 @@ def copy_tree (src, dst, (the default), the destination of the symlink will be copied. 'update' and 'verbose' are the same as for 'copy_file'.""" - if not os.path.isdir (src): + if not dry_run and not os.path.isdir (src): raise DistutilsFileError, \ "cannot copy tree %s: not a directory" % src try: names = os.listdir (src) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "error listing files in %s: %s" % (src, errstr) + if dry_run: + names = [] + else: + raise DistutilsFileError, \ + "error listing files in %s: %s" % (src, errstr) if not dry_run: mkpath (dst, verbose=verbose) @@ -277,3 +329,68 @@ def copy_tree (src, dst, return outputs # copy_tree () + + +# XXX I suspect this is Unix-specific -- need porting help! +def move_file (src, dst, + verbose=0, + dry_run=0): + + """Move a file 'src' to 'dst'. If 'dst' is a directory, the file + will be moved into it with the same name; otherwise, 'src' is + just renamed to 'dst'. Return the new full name of the file. + + Handles cross-device moves on Unix using + 'copy_file()'. What about other systems???""" + + from os.path import exists, isfile, isdir, basename, dirname + + if verbose: + print "moving %s -> %s" % (src, dst) + + if dry_run: + return dst + + if not isfile (src): + raise DistutilsFileError, \ + "can't move '%s': not a regular file" % src + + if isdir (dst): + dst = os.path.join (dst, basename (src)) + elif exists (dst): + raise DistutilsFileError, \ + "can't move '%s': destination '%s' already exists" % \ + (src, dst) + + if not isdir (dirname (dst)): + raise DistutilsFileError, \ + "can't move '%s': destination '%s' not a valid path" % \ + (src, dst) + + copy_it = 0 + try: + os.rename (src, dst) + except os.error, (num, msg): + if num == errno.EXDEV: + copy_it = 1 + else: + raise DistutilsFileError, \ + "couldn't move '%s' to '%s': %s" % (src, dst, msg) + + if copy_it: + copy_file (src, dst) + try: + os.unlink (src) + except os.error, (num, msg): + try: + os.unlink (dst) + except os.error: + pass + raise DistutilsFileError, \ + ("couldn't move '%s' to '%s' by copy/delete: " + + "delete '%s' failed: %s") % \ + (src, dst, src, msg) + + return dst + +# move_file () From d16f82401008b9b8c470bd3506c34fe29cd4f8d7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 03:10:25 +0000 Subject: [PATCH 0057/8469] New command -- install_ext to install extension modules. --- command/install_ext.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 command/install_ext.py diff --git a/command/install_ext.py b/command/install_ext.py new file mode 100644 index 0000000000..360a8027b7 --- /dev/null +++ b/command/install_ext.py @@ -0,0 +1,38 @@ +"""install_ext + +Implement the Distutils "install_ext" command to install extension modules.""" + +# created 1999/09/12, Greg Ward + +__rcsid__ = "$Id$" + +from distutils.core import Command +from distutils.util import copy_tree + +class InstallExt (Command): + + options = [('dir=', 'd', "directory to install to"), + ('build-dir=','b', "build directory (where to install from)"), + ] + + def set_default_options (self): + # let the 'install' command dictate our installation directory + self.dir = None + self.build_dir = None + + def set_final_options (self): + self.set_undefined_options ('install', + ('build_platlib', 'build_dir'), + ('install_site_platlib', 'dir')) + + def run (self): + self.set_final_options () + + # Dump the entire "build/platlib" directory (or whatever it really + # is; "build/platlib" is the default) to the installation target + # (eg. "/usr/local/lib/python1.5/site-packages"). Note that + # putting files in the right package dir is already done when we + # build. + outfiles = self.copy_tree (self.build_dir, self.dir) + +# class InstallExt From 6d41846de7faa855ac30ea57349780d3cc074f96 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 03:12:53 +0000 Subject: [PATCH 0058/8469] Added 'output_dir' parameter to 'compile()' and 'link_shared_object(). Changed those two methods to only compile/link if necessary (according to simplistic timestamp checks). Added 'output_dir' to 'object_filenames()' and 'shared_object_filename()'. --- unixccompiler.py | 105 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 83 insertions(+), 22 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index a868451462..0149313110 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,12 +17,13 @@ __rcsid__ = "$Id$" -import string, re +import string, re, os from types import * +from copy import copy from sysconfig import \ CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO from ccompiler import CCompiler, gen_preprocess_options, gen_lib_options - +from util import move_file, newer_pairwise, newer_group # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's @@ -86,9 +87,12 @@ def __init__ (self, def compile (self, sources, + output_dir=None, macros=None, includes=None): + if output_dir is None: + output_dir = self.output_dir if macros is None: macros = [] if includes is None: @@ -104,15 +108,48 @@ def compile (self, pp_opts = gen_preprocess_options (self.macros + macros, self.include_dirs + includes) - # use of ccflags_shared means we're blithely assuming that we're - # compiling for inclusion in a shared object! (will have to fix - # this when I add the ability to build a new Python) - cc_args = ['-c'] + pp_opts + \ - self.ccflags + self.ccflags_shared + \ - sources + # So we can mangle 'sources' without hurting the caller's data + orig_sources = sources + sources = copy (sources) + + # Get the list of expected output (object) files and drop files we + # don't have to recompile. (Simplistic check -- we just compare the + # source and object file, no deep dependency checking involving + # header files. Hmmm.) + objects = self.object_filenames (sources, output_dir) + skipped = newer_pairwise (sources, objects) + for skipped_pair in skipped: + self.announce ("skipping %s (%s up-to-date)" % skipped_pair) + + # If anything left to compile, compile it + if sources: + # XXX use of ccflags_shared means we're blithely assuming + # that we're compiling for inclusion in a shared object! + # (will have to fix this when I add the ability to build a + # new Python) + cc_args = ['-c'] + pp_opts + \ + self.ccflags + self.ccflags_shared + \ + sources + self.spawn ([self.cc] + cc_args) + - self.spawn ([self.cc] + cc_args) - return self.object_filenames (sources) + # Note that compiling multiple source files in the same go like + # we've just done drops the .o file in the current directory, which + # may not be what the caller wants (depending on the 'output_dir' + # parameter). So, if necessary, fix that now by moving the .o + # files into the desired output directory. (The alternative, of + # course, is to compile one-at-a-time with a -o option. 6 of one, + # 12/2 of the other...) + + if output_dir: + for i in range (len (objects)): + src = os.path.basename (objects[i]) + objects[i] = self.move_file (src, output_dir) + + # Have to re-fetch list of object filenames, because we want to + # return *all* of them, including those that weren't recompiled on + # this call! + return self.object_filenames (orig_sources, output_dir) # XXX punting on 'link_static_lib()' for now -- it might be better for @@ -124,23 +161,31 @@ def compile (self, def link_shared_lib (self, objects, output_libname, + output_dir=None, libraries=None, library_dirs=None, build_info=None): # XXX should we sanity check the library name? (eg. no # slashes) - self.link_shared_object (objects, "lib%s%s" % \ - (output_libname, self._shared_lib_ext), - build_info=build_info) - + self.link_shared_object ( + objects, + "lib%s%s" % (output_libname, self._shared_lib_ext), + output_dir, + libraries, + library_dirs, + build_info) + def link_shared_object (self, objects, output_filename, + output_dir=None, libraries=None, library_dirs=None, build_info=None): + if output_dir is None: + output_dir = self.output_dir if libraries is None: libraries = [] if library_dirs is None: @@ -151,21 +196,37 @@ def link_shared_object (self, lib_opts = gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs, "-l%s", "-L%s") - ld_args = self.ldflags_shared + lib_opts + \ - objects + ['-o', output_filename] + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + # If any of the input object files are newer than the output shared + # object, relink. Again, this is a simplistic dependency check: + # doesn't look at any of the libraries we might be linking with. + if newer_group (objects, output_filename): + ld_args = self.ldflags_shared + lib_opts + \ + objects + ['-o', output_filename] - self.spawn ([self.ld_shared] + ld_args) + self.spawn ([self.ld_shared] + ld_args) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) - def object_filenames (self, source_filenames): + def object_filenames (self, source_filenames, output_dir=None): outnames = [] for inname in source_filenames: - outnames.append ( re.sub (r'\.(c|C|cc|cxx|cpp)$', - self._obj_ext, inname)) + outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._obj_ext, inname) + outname = os.path.basename (outname) + if output_dir is not None: + outname = os.path.join (output_dir, outname) + outnames.append (outname) return outnames - def shared_object_filename (self, source_filename): - return re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) + def shared_object_filename (self, source_filename, output_dir=None): + outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) + outname = os.path.basename (outname) + if output_dir is not None: + outname = os.path.join (output_dir, outname) + return outname def library_filename (self, libname): return "lib%s%s" % (libname, self._static_lib_ext ) From 7a95432812567cf0ce8135334619b557229c7a15 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 13:52:12 +0000 Subject: [PATCH 0059/8469] Now run 'build_ext'. Default platform-specific build directory changed to 'build/platlib'. --- command/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build.py b/command/build.py index d0e939e9b6..187dddc0b7 100644 --- a/command/build.py +++ b/command/build.py @@ -30,7 +30,7 @@ def set_final_options (self): if self.libdir is None: self.libdir = os.path.join (self.basedir, 'lib') if self.platdir is None: - self.platdir = os.path.join (self.basedir, 'plat') + self.platdir = os.path.join (self.basedir, 'platlib') def run (self): @@ -44,6 +44,6 @@ def run (self): self.run_peer ('build_py') # And now 'build_ext' - #self.run_peer ('build_ext') + self.run_peer ('build_ext') # end class Build From 3ae6c30ea10386dbf794f794af67fb5fe467d4e2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 13:54:06 +0000 Subject: [PATCH 0060/8469] Comment addition. --- command/build_py.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index 28aefa9e7e..0bbe339aa2 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -26,6 +26,9 @@ def set_default_options (self): def set_final_options (self): self.set_undefined_options ('build', ('libdir', 'dir')) + # 'package' is an alias option in Distribution (hmmm, we + # really should change to "pull" options from Distribution + # rather than "pushing" them out to commands...) if self.package is None: self.package = '' From a66fe4c0aa10aa6856e000034efc58d7369aeee1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 13:55:34 +0000 Subject: [PATCH 0061/8469] Added support for 'package' option, including where to link the actual extension module to. --- command/build_ext.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index a3982c1b22..299158128b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -63,6 +63,8 @@ class BuildExt (Command): def set_default_options (self): self.extensions = None self.dir = None + self.package = None + self.include_dirs = None self.define = None self.undef = None @@ -74,6 +76,9 @@ def set_default_options (self): def set_final_options (self): self.set_undefined_options ('build', ('platdir', 'dir')) + if self.package is None: + self.package = '' + # Make sure Python's include directories (for Python.h, config.h, # etc.) are in the include search path. We have to roll our own # "exec include dir", because the Makefile parsed by sysconfig @@ -92,12 +97,6 @@ def run (self): self.set_final_options () - # XXX we should care about the package we compile extensions - # into! - - #(extensions, package) = \ - # self.distribution.get_options ('ext_modules', 'package') - # 'self.extensions', as supplied by setup.py, is a list of 2-tuples. # Each tuple is simple: # (ext_name, build_info) @@ -187,8 +186,12 @@ def build_extensions (self, extensions): libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') ext_filename = self.extension_filename (extension_name) - self.compiler.link_shared_object (objects, ext_filename, - libraries, library_dirs, build_info) + dest = os.path.dirname ( + os.path.join (self.dir, self.package, ext_filename)) + self.mkpath (dest) + self.compiler.link_shared_object (objects, ext_filename, dest, + libraries, library_dirs, + build_info=build_info) # XXX hack! # build_extensions () From fc9f4cea6fc24a4e9fd19b16fbabdfad394e9742 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 13:57:26 +0000 Subject: [PATCH 0062/8469] Straightened up the selection of installation directories for platform- specific files; it was somewhat broken, and the comments were dead wrong. Now runs 'install_ext' command after 'install_py'. --- command/install.py | 52 +++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/command/install.py b/command/install.py index cf45004f07..6fb853618b 100644 --- a/command/install.py +++ b/command/install.py @@ -139,42 +139,33 @@ def set_final_options (self): self.replace_sys_prefix ('BINLIBDEST', ('lib','python1.5'), 1) - # Here is where we decide where to install most library files: - # on POSIX systems, they go to 'site-packages' under the - # install_lib (determined above -- typically - # /usr/local/lib/python1.x). Unfortunately, both - # platform-independent (.py*) and platform-specific (.so) files - # go to this directory, since there is no site-packages under - # $exec_prefix in the usual way that Python builds sys.path. On - # non-POSIX systems, the situation is even worse: everything - # gets dumped right into $exec_prefix, not even a lib - # subdirectory! But apparently that's what needs to be done to - # make it work under Python 1.5 -- hope we can get this fixed - # for 1.6! + # Here is where we decide where to install most library files: on + # POSIX systems, they go to 'site-packages' under the install_lib + # (determined above -- typically /usr/local/lib/python1.x). Note + # that on POSIX systems, platform-specific files belong in + # 'site-packages' under install_platlib. (The actual rule is that + # a module distribution that includes *any* platform-specific files + # -- ie. extension modules -- goes under install_platlib. This + # solves the "can't find extension module in a package" problem.) + # On non-POSIX systems, install_lib and install_platlib are the + # same (eg. "C:\Program Files\Python\Lib" on Windows), as are + # install_site_lib and install_site_platlib (eg. + # "C:\Program Files\Python" on Windows) -- everything will be dumped + # right into one of the install_site directories. (It doesn't + # really matter *which* one, of course, but I'll observe decorum + # and do it properly.) if self.install_site_lib is None: if os.name == 'posix': self.install_site_lib = \ os.path.join (self.install_lib, 'site-packages') else: - self.install_site_lib = self.exec_prefix + self.install_site_lib = self.prefix if self.install_site_platlib is None: if os.name == 'posix': - # XXX ugh! this puts platform-specific files in with - # shared files, with no nice way to override it! (this - # might be a Python problem, though, not a Distutils - # problem...) - - # NO: the way to fix this is - # * any platform-dependent files in distribution? - # yes: install under exec-prefix - # no: install under prefix - # ...which will require a pretty major rethink of all - # this. Damn. - self.install_site_platlib = \ - os.path.join (self.install_lib, 'site-packages') + os.path.join (self.install_platlib, 'site-packages') else: self.install_site_platlib = self.exec_prefix @@ -240,12 +231,11 @@ def run (self): # Install modules in two steps: "platform-shared" files (ie. pure # python modules) and platform-specific files (compiled C - # extensions). - + # extensions). Note that 'install_py' is smart enough to install + # pure Python modules in the "platlib" directory if we built any + # extensions. self.run_peer ('install_py') - - # don't have an 'install_ext' command just yet! - #self.run_peer ('install_ext')) + self.run_peer ('install_ext') # run () From 4c89c1907bed072e12306b6e7380b7e46b57285b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Sep 1999 13:58:34 +0000 Subject: [PATCH 0063/8469] Changed selection of installation directories (in 'set_final_options()') so that pure Python modules are installed to the platform-specific directory if there are any extension modules in this distribution. --- command/install_lib.py | 20 ++++++++++++++------ command/install_py.py | 20 ++++++++++++++------ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 876a34ce61..a2ba16cc35 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -23,15 +23,23 @@ def set_default_options (self): self.optimize = 1 def set_final_options (self): - # If we don't have a 'dir' value, we'll have to ask the 'install' - # command for one. (This usually means the user ran 'install_py' - # directly, rather than going through 'install' -- so in reality, - # 'find_command_obj()' will create an 'install' command object, - # which we then query. + # Find out from the 'build_ext' command if we were asked to build + # any extensions. If so, that means even pure-Python modules in + # this distribution have to be installed to the "platlib" + # directory. + extensions = self.get_peer_option ('build_ext', 'extensions') + if extensions: + dir_option = 'install_site_platlib' + else: + dir_option = 'install_site_lib' + + # Get all the information we need to install pure Python modules + # from the umbrella 'install' command -- build (source) directory, + # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - ('install_site_lib', 'dir'), + (dir_option, 'dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) diff --git a/command/install_py.py b/command/install_py.py index 876a34ce61..a2ba16cc35 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -23,15 +23,23 @@ def set_default_options (self): self.optimize = 1 def set_final_options (self): - # If we don't have a 'dir' value, we'll have to ask the 'install' - # command for one. (This usually means the user ran 'install_py' - # directly, rather than going through 'install' -- so in reality, - # 'find_command_obj()' will create an 'install' command object, - # which we then query. + # Find out from the 'build_ext' command if we were asked to build + # any extensions. If so, that means even pure-Python modules in + # this distribution have to be installed to the "platlib" + # directory. + extensions = self.get_peer_option ('build_ext', 'extensions') + if extensions: + dir_option = 'install_site_platlib' + else: + dir_option = 'install_site_lib' + + # Get all the information we need to install pure Python modules + # from the umbrella 'install' command -- build (source) directory, + # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - ('install_site_lib', 'dir'), + (dir_option, 'dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) From cc443544d4b1095c5d358652a98a79c743599abb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:22:34 +0000 Subject: [PATCH 0064/8469] Basically a complete rewrite to support dealing with modules in whole packages and searching for source files by 'package_dir'. --- command/build_py.py | 233 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 197 insertions(+), 36 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 0bbe339aa2..187e93b58c 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -7,6 +7,9 @@ __rcsid__ = "$Id$" import string, os +from types import * +from glob import glob + from distutils.core import Command from distutils.errors import * from distutils.util import mkpath, newer, make_file, copy_file @@ -22,15 +25,17 @@ def set_default_options (self): self.dir = None self.modules = None self.package = None + self.package_dir = None def set_final_options (self): self.set_undefined_options ('build', ('libdir', 'dir')) - # 'package' is an alias option in Distribution (hmmm, we - # really should change to "pull" options from Distribution - # rather than "pushing" them out to commands...) - if self.package is None: - self.package = '' + + # Get the distribution options that are aliases for build_py + # options -- list of packages and list of modules. + self.packages = self.distribution.packages + self.modules = self.distribution.py_modules + self.package_dir = self.distribution.package_dir def run (self): @@ -54,40 +59,196 @@ def run (self): outfiles = [] missing = [] - # Loop over the list of "pure Python" modules, deriving - # input and output filenames and checking for missing - # input files. + # Two options control which modules will be installed: 'packages' + # and 'modules'. The former lets us work with whole packages, not + # specifying individual modules at all; the latter is for + # specifying modules one-at-a-time. Currently they are mutually + # exclusive: you can define one or the other (or neither), but not + # both. It remains to be seen how limiting this is. - # it's ok not to have *any* py files, right? - if not self.modules: + # Dispose of the two "unusual" cases first: no pure Python modules + # at all (no problem, just return silently), and over-specified + # 'packages' and 'modules' options. + + if not self.modules and not self.packages: return + if self.modules and self.packages: + raise DistutilsOptionError, \ + "build_py: supplying both 'packages' and 'modules' " + \ + "options not allowed" + + # Now we're down to two cases: 'modules' only and 'packages' only. + if self.modules: + self.build_modules () + else: + self.build_packages () + + + # run () - # XXX we should allow for wildcards, so eg. the Distutils setup.py - # file would just have to say - # py_modules = ['distutils.*', 'distutils.command.*'] - # without having to list each one explicitly. - for m in self.modules: - fn = apply (os.path.join, tuple (string.split (m, '.'))) + '.py' - if not os.path.exists (fn): - missing.append (fn) + + def get_package_dir (self, package): + """Return the directory, relative to the top of the source + distribution, where package 'package' should be found + (at least according to the 'package_dir' option, if any).""" + + if type (package) is StringType: + path = string.split (package, '.') + elif type (package) in (TupleType, ListType): + path = list (path) + else: + raise TypeError, "'package' must be a string, list, or tuple" + + if not self.package_dir: + return apply (os.path.join, path) + else: + tail = [] + while path: + try: + pdir = self.package_dir[string.join (path, '.')] + except KeyError: + tail.insert (0, path[-1]) + del path[-1] + else: + tail.insert (0, pdir) + return apply (os.path.join, tail) else: - infiles.append (fn) - outfiles.append (os.path.join (self.dir, self.package, fn)) - - # Blow up if any input files were not found. - if missing: - raise DistutilsFileError, \ - "missing files: " + string.join (missing, ' ') - - # Loop over the list of input files, copying them to their - # temporary (build) destination. - created = {} - for i in range (len (infiles)): - outdir = os.path.split (outfiles[i])[0] - if not created.get(outdir): - self.mkpath (outdir) - created[outdir] = 1 - - self.copy_file (infiles[i], outfiles[i]) + # arg! everything failed, we might as well have not even + # looked in package_dir -- oh well + return apply (os.path.join, tail) + + # get_package_dir () + + + def check_package (self, package, package_dir): + + # Empty dir name means current directory, which we can probably + # assume exists. Also, os.path.exists and isdir don't know about + # my "empty string means current dir" convention, so we have to + # circumvent them. + if package_dir != "": + if not os.path.exists (package_dir): + raise DistutilsFileError, \ + "package directory '%s' does not exist" % package_dir + if not os.path.isdir (package_dir): + raise DistutilsFileErorr, \ + ("supposed package directory '%s' exists, " + + "but is not a directory") % package_dir + + # Require __init__.py for all but the "root package" + if package != "": + init_py = os.path.join (package_dir, "__init__.py") + if not os.path.isfile (init_py): + self.warn (("package init file '%s' not found " + + "(or not a regular file)") % init_py) + # check_package () + + + def check_module (self, module, module_file): + if not os.path.isfile (module_file): + self.warn ("file %s (for module %s) not found" % + module_file, module) + return 0 + else: + return 1 + + # check_module () + + + def find_modules (self, package, package_dir): + module_files = glob (os.path.join (package_dir, "*.py")) + module_pairs = [] + for f in module_files: + module = os.path.splitext (os.path.basename (f))[0] + module_pairs.append (module, f) + return module_pairs + + + def build_module (self, module, module_file, package): + + if type (package) is StringType: + package = string.split (package, '.') + + # Now put the module source file into the "build" area -- this + # is easy, we just copy it somewhere under self.dir (the build + # directory for Python source). + outfile_path = package + outfile_path.append (module + ".py") + outfile_path.insert (0, self.dir) + outfile = apply (os.path.join, outfile_path) + + dir = os.path.dirname (outfile) + self.mkpath (dir) + self.copy_file (module_file, outfile) + + + def build_modules (self): + + # Map package names to tuples of useful info about the package: + # (package_dir, checked) + # package_dir - the directory where we'll find source files for + # this package + # checked - true if we have checked that the package directory + # is valid (exists, contains __init__.py, ... ?) + + + packages = {} + + # We treat modules-in-packages almost the same as toplevel modules, + # just the "package" for a toplevel is empty (either an empty + # string or empty list, depending on context). Differences: + # - don't check for __init__.py in directory for empty package + + for module in self.modules: + path = string.split (module, '.') + package = tuple (path[0:-1]) + module = path[-1] + + try: + (package_dir, checked) = packages[package] + except KeyError: + package_dir = self.get_package_dir (package) + checked = 0 + + if not checked: + self.check_package (package, package_dir) + packages[package] = (package_dir, 1) + + # XXX perhaps we should also check for just .pyc files + # (so greedy closed-source bastards can distribute Python + # modules too) + module_file = os.path.join (package_dir, module + ".py") + if not self.check_module (module, module_file): + continue + + # Now "build" the module -- ie. copy the source file to + # self.dir (the build directory for Python source). (Actually, + # it gets copied to the directory for this package under + # self.dir.) + self.build_module (module, module_file, package) + + # build_modules () + + + def build_packages (self): + + for package in self.packages: + package_dir = self.get_package_dir (package) + self.check_package (package, package_dir) + + # Get list of (module, module_file) tuples based on scanning + # the package directory. Here, 'module' is the *unqualified* + # module name (ie. no dots, no package -- we already know its + # package!), and module_file is the path to the .py file, + # relative to the current directory (ie. including + # 'package_dir'). + modules = self.find_modules (package, package_dir) + + # Now loop over the modules we found, "building" each one (just + # copy it to self.dir). + for (module, module_file) in modules: + self.build_module (module, module_file, package) + + # build_packages () # end class BuildPy From 27fd97e6fa9b27d71a675771e3921954fe4f1ae8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:27:12 +0000 Subject: [PATCH 0065/8469] Some option changes: - rename 'dir' to 'build_dir' - take 'package' from distribution option 'ext_package' - take 'extensions' from distribution option 'ext_modules' - take 'include_dirs' from distribution Name keyword args explictly when calling CCompiler methods. Overhauled how we generate extension filenames (in 'extension_filename() and 'build_extension()') to take 'package' option into account. --- command/build_ext.py | 47 ++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 299158128b..a0ab61b389 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -16,9 +16,10 @@ from distutils.errors import * -# This is the same as a Python NAME, since we must accept any -# valid module name for the extension name. -extension_name_re = re.compile (r'^[a-zA-Z_][a-zA-Z_0-9]*$') +# An extension name is just a dot-separated list of Python NAMEs (ie. +# the same as a fully-qualified module name). +extension_name_re = re.compile \ + (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$') class BuildExt (Command): @@ -41,7 +42,7 @@ class BuildExt (Command): # takes care of both command-line and client options # in between set_default_options() and set_final_options()) - options = [('dir=', 'd', + options = [('build-dir=', 'd', "directory for compiled extension modules"), ('include-dirs=', 'I', "list of directories to search for header files"), @@ -57,12 +58,14 @@ class BuildExt (Command): "directories to search for shared C libraries at runtime"), ('link-objects=', 'O', "extra explicit link objects to include in the link"), + ('package=', 'p', + "Python package to put extension modules into"), ] def set_default_options (self): self.extensions = None - self.dir = None + self.build_dir = None self.package = None self.include_dirs = None @@ -74,10 +77,13 @@ def set_default_options (self): self.link_objects = None def set_final_options (self): - self.set_undefined_options ('build', ('platdir', 'dir')) + self.set_undefined_options ('build', ('platdir', 'build_dir')) if self.package is None: - self.package = '' + self.package = self.distribution.ext_package + + self.extensions = self.distribution.ext_modules + # Make sure Python's include directories (for Python.h, config.h, # etc.) are in the include search path. We have to roll our own @@ -87,7 +93,7 @@ def set_final_options (self): exec_py_include = os.path.join (exec_prefix, 'include', 'python' + sys.version[0:3]) if self.include_dirs is None: - self.include_dirs = [] + self.include_dirs = self.distribution.include_dirs or [] self.include_dirs.insert (0, py_include) if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) @@ -177,7 +183,9 @@ def build_extensions (self, extensions): macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') - self.compiler.compile (sources, macros, include_dirs) + self.compiler.compile (sources, + macros=macros, + includes=include_dirs) objects = self.compiler.object_filenames (sources) extra_objects = build_info.get ('extra_objects') @@ -185,18 +193,23 @@ def build_extensions (self, extensions): objects.extend (extra_objects) libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') - ext_filename = self.extension_filename (extension_name) - dest = os.path.dirname ( - os.path.join (self.dir, self.package, ext_filename)) - self.mkpath (dest) - self.compiler.link_shared_object (objects, ext_filename, dest, - libraries, library_dirs, + ext_filename = self.extension_filename \ + (extension_name, self.package) + ext_filename = os.path.join (self.build_dir, ext_filename) + dest_dir = os.path.dirname (ext_filename) + self.mkpath (dest_dir) + self.compiler.link_shared_object (objects, ext_filename, + libraries=libraries, + library_dirs=library_dirs, build_info=build_info) # XXX hack! # build_extensions () - def extension_filename (self, ext_name): - return ext_name + SO + def extension_filename (self, ext_name, package=None): + if package: + ext_name = package + '.' + ext_name + ext_path = string.split (ext_name, '.') + return apply (os.path.join, ext_path) + SO # class BuildExt From 6b9caf68d52702013783cd2225e4ad562c26e14b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:27:55 +0000 Subject: [PATCH 0066/8469] Only run build_py if we have pure Python modules, and build_ext if we have extension modules. --- command/build.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/command/build.py b/command/build.py index 187dddc0b7..b74e51cfea 100644 --- a/command/build.py +++ b/command/build.py @@ -40,10 +40,14 @@ def run (self): # For now, "build" means "build_py" then "build_ext". (Eventually # it should also build documentation.) - # Invoke the 'build_py' command - self.run_peer ('build_py') - - # And now 'build_ext' - self.run_peer ('build_ext') + # Invoke the 'build_py' command to "build" pure Python modules + # (ie. copy 'em into the build tree) + if self.distribution.packages or self.distribution.py_modules: + self.run_peer ('build_py') + + # And now 'build_ext' -- compile extension modules and put them + # into the build tree + if self.distribution.ext_modules: + self.run_peer ('build_ext') # end class Build From 0fd123490a06bd8a56edc91e707293b3b37c3514 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:31:14 +0000 Subject: [PATCH 0067/8469] Added 'install_path' option for giving non-packagized module distributions their own directory (and .pth file). Overhauled how we determine installation directories in 'set_final_options()' to separate platform-dependence and take 'install_path' option into account. Added 'create_path_file()' to create path config file when 'install_path' given. Only run 'install_py' and 'install_ext' when, respectively, there are some pure Python modules and some extension modules in the distribution. --- command/install.py | 94 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 12 deletions(-) diff --git a/command/install.py b/command/install.py index 6fb853618b..0e4ad3f016 100644 --- a/command/install.py +++ b/command/install.py @@ -7,8 +7,10 @@ __rcsid__ = "$Id$" import sys, os, string +from types import * from distutils import sysconfig from distutils.core import Command +from distutils.util import write_file class Install (Command): @@ -36,6 +38,8 @@ class Install (Command): "platform-specific site directory"), ('install-scheme=', None, "install to 'system' or 'site' library directory?"), + ('install-path=', None, + "extra intervening directories to put below install-lib"), # Where to install documentation (eventually!) ('doc-format=', None, "format of documentation to generate"), @@ -73,6 +77,7 @@ def set_default_options (self): self.install_platlib = None self.install_site_lib = None self.install_site_platlib = None + self.install_path = None self.install_man = None self.install_html = None @@ -155,19 +160,65 @@ def set_final_options (self): # really matter *which* one, of course, but I'll observe decorum # and do it properly.) - if self.install_site_lib is None: - if os.name == 'posix': - self.install_site_lib = \ - os.path.join (self.install_lib, 'site-packages') + # 'base' and 'platbase' are the base directories for installing + # site-local files, eg. "/usr/local/lib/python1.5/site-packages" + # or "C:\Program Files\Python" + if os.name == 'posix': + self.base = os.path.join (self.install_lib, + 'site-packages') + self.platbase = os.path.join (self.install_platlib, + 'site-packages') + else: + self.base = self.prefix + self.platbase = self.exec_prefix + + # 'path_file' and 'extra_dirs' are how we handle distributions + # that need to be installed to their own directory, but aren't + # package-ized yet. 'extra_dirs' is just a directory under + # 'base' or 'platbase' where toplevel modules will actually be + # installed; 'path_file' is the basename of a .pth file to drop + # in 'base' or 'platbase' (depending on the distribution). Very + # often they will be the same, which is why we allow them to be + # supplied as a string or 1-tuple as well as a 2-element + # comma-separated string or a 2-tuple. + if self.install_path is None: + self.install_path = self.distribution.install_path + + if self.install_path is not None: + if type (self.install_path) is StringType: + self.install_path = string.split (self.install_path, ',') + + if len (self.install_path) == 1: + path_file = extra_dirs = self.install_path[0] + elif len (self.install_path) == 2: + (path_file, extra_dirs) = self.install_path else: - self.install_site_lib = self.prefix + raise DistutilsOptionError, \ + "'install_path' option must be a list, tuple, or " + \ + "comma-separated string with 1 or 2 elements" + + # install path has slashes in it -- might need to convert to + # local form + if string.find (extra_dirs, '/') and os.name != "posix": + extra_dirs = string.split (extra_dirs, '/') + extra_dirs = apply (os.path.join, extra_dirs) + else: + path_file = None + extra_dirs = '' + + # XXX should we warn if path_file and not extra_dirs (in which case + # the path file would be harmless but pointless) + self.path_file = path_file + self.extra_dirs = extra_dirs + + + if self.install_site_lib is None: + self.install_site_lib = os.path.join (self.base, + extra_dirs) if self.install_site_platlib is None: - if os.name == 'posix': - self.install_site_platlib = \ - os.path.join (self.install_platlib, 'site-packages') - else: - self.install_site_platlib = self.exec_prefix + self.install_site_platlib = os.path.join (self.platbase, + extra_dirs) #if self.install_scheme == 'site': # install_lib = self.install_site_lib @@ -234,9 +285,28 @@ def run (self): # extensions). Note that 'install_py' is smart enough to install # pure Python modules in the "platlib" directory if we built any # extensions. - self.run_peer ('install_py') - self.run_peer ('install_ext') + if self.distribution.packages or self.distribution.py_modules: + self.run_peer ('install_py') + if self.distribution.ext_modules: + self.run_peer ('install_ext') + + if self.path_file: + self.create_path_file () # run () + + def create_path_file (self): + + if self.distribution.ext_modules: + base = self.platbase + else: + base = self.base + + filename = os.path.join (base, self.path_file + ".pth") + self.execute (write_file, + (filename, [self.extra_dirs]), + "creating %s" % filename) + + # class Install From 36722463169bd14a78f8b0773ed38786fb73cd41 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:33:09 +0000 Subject: [PATCH 0068/8469] Added docstring, brought __all__ up-to-date. --- command/__init__.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/command/__init__.py b/command/__init__.py index 9567fd13fb..9a5aef2002 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -1,6 +1,23 @@ -# this is solely for debugging convenience +"""distutils.command + +Package containing implementation of all the standard Distutils +commands. Currently this means: + + build + build_py + build_ext + install + install_py + install_ext + +but this list will undoubtedly grow with time.""" + +__rcsid__ = "$Id$" __all__ = ['build', 'build_py', - 'make_blib', + 'build_ext', + 'install', + 'install_py', + 'install_ext', ] From 79d143e97dffc76896eb203f2c0303337c051466 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:35:09 +0000 Subject: [PATCH 0069/8469] Typecheck elements of 'macros' parameter in 'gen_preprocess_options(). --- ccompiler.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index 0e505338be..2a80739c7b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -450,6 +450,14 @@ def gen_preprocess_options (macros, includes): pp_opts = [] for macro in macros: + + if not (type (macro) is TupleType and + 1 <= len (macro) <= 2): + raise TypeError, \ + ("bad macro definition '%s': " + + "each element of 'macros' list must be a 1- or 2-tuple") % \ + macro + if len (macro) == 1: # undefine this macro pp_opts.append ("-U%s" % macro[0]) elif len (macro) == 2: From b2bb06683462c1b7e9df90413d5af326002d93f3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:36:15 +0000 Subject: [PATCH 0070/8469] In 'link_shared_object()', try to be less sensitive to missing input files in dry-run mode. --- unixccompiler.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 0149313110..02fbc66aa7 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -202,7 +202,17 @@ def link_shared_object (self, # If any of the input object files are newer than the output shared # object, relink. Again, this is a simplistic dependency check: # doesn't look at any of the libraries we might be linking with. - if newer_group (objects, output_filename): + # Note that we have to dance around errors comparing timestamps if + # we're in dry-run mode (yuck). + try: + newer = newer_group (objects, output_filename) + except OSError: + if self.dry_run: + newer = 1 + else: + raise + + if newer: ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] From 602f5dabbeffa74e600e9fca91ef7295521affce Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:37:51 +0000 Subject: [PATCH 0071/8469] Added 'write_file()' function. Added global cache PATH_CREATED used by 'mkpath()' to ensure it doesn't try to create the same path more than once in a session (and, more importantly, to ensure that it doesn't print "creating X" more than once for each X per session!). --- util.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index bb790af438..85b04e7a80 100644 --- a/util.py +++ b/util.py @@ -15,6 +15,10 @@ from distutils.errors import * +# cache for by mkpath() -- in addition to cheapening redundant calls, +# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode +PATH_CREATED = {} + # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). @@ -26,12 +30,17 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout.""" + global PATH_CREATED + # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce - # the creation of the whole path, and force verbose=0 on all sub-calls? + # the creation of the whole path? (quite easy to do the latter since + # we're not using a recursive algorithm) if os.path.isdir (name): return + if PATH_CREATED.get (name): + return (head, tail) = os.path.split (name) tails = [tail] # stack of lone dirs to create @@ -59,6 +68,8 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): except os.error, (errno, errstr): raise DistutilsFileError, "%s: %s" % (head, errstr) + PATH_CREATED[head] = 1 + # mkpath () @@ -394,3 +405,13 @@ def move_file (src, dst, return dst # move_file () + + +def write_file (filename, contents): + """Create a file with the specified naem and write 'contents' (a + sequence of strings without line terminators) to it.""" + + f = open (filename, "w") + for line in contents: + f.write (line + "\n") + f.close () From 5c182c049b03573ef283d05d1079319d201c669d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 21 Sep 1999 18:41:36 +0000 Subject: [PATCH 0072/8469] Ditched the whole notion of "alias options": this meant dropping the 'alias_options' table and getting rid of some hairy code in the Distribution constructor. Resurrected the distribution options that describe the modules present in the module distribution ('py_modules', 'ext_modules'), and added a bunch more: 'packages', 'package_dir', 'ext_package', 'include_dirs', 'install_path'. Updated some comments. Added 'warn()' method to Command. 'Command.get_command_name()' now stores generated command name in self.command_name. --- core.py | 60 ++++++++++++++++++++------------------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/core.py b/core.py index a6c378d36c..e53392133d 100644 --- a/core.py +++ b/core.py @@ -114,19 +114,6 @@ class Distribution: ('dry-run', 'n', "don't actually do anything"), ] - # 'alias_options' map distribution options to command options -- the - # idea is that the most common, essential options can be directly - # specified as Distribution attributes, and the rest can go in the - # 'options' dictionary. These aliases are for those common, essential - # options. - alias_options = { 'py_modules': ('build_py', 'modules'), - 'ext_modules': ('build_ext', 'extensions'), - 'package': [('build_py', 'package',), - ('build_ext', 'package')], - 'include_dirs': ('build_ext', 'include_dirs'), - - } - # -- Creation/initialization methods ------------------------------- @@ -151,6 +138,7 @@ def __init__ (self, attrs=None): self.name = None self.version = None self.author = None + self.author_email = None self.url = None self.licence = None self.description = None @@ -165,10 +153,13 @@ def __init__ (self, attrs=None): # than of the Distribution itself. We provide aliases for them in # Distribution as a convenience to the developer. # dictionary. - # XXX not needed anymore! (I think...) - #self.py_modules = None - #self.ext_modules = None - #self.package = None + self.packages = None + self.package_dir = None + self.py_modules = None + self.ext_modules = None + self.ext_package = None + self.include_dirs = None + self.install_path = None # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to @@ -188,8 +179,9 @@ def __init__ (self, attrs=None): # '.get()' rather than a straight lookup. self.have_run = {} - # Now we'll use the attrs dictionary (from the client) to possibly - # override any or all of these distribution options + # Now we'll use the attrs dictionary (ultimately, keyword args from + # the client) to possibly override any or all of these distribution + # options. if attrs: # Pull out the set of command options and work on them @@ -206,26 +198,10 @@ def __init__ (self, attrs=None): # loop over commands # if any command options - # Now work on the rest of the attributes. Note that some of - # these may be aliases for command options, so we might go - # through some of the above again. + # Now work on the rest of the attributes. Any attribute that's + # not already defined is invalid! for (key,val) in attrs.items(): - alias = self.alias_options.get (key) - if alias: - if type (alias) is ListType: - for (command, cmd_option) in alias: - cmd_obj = self.find_command_obj (command) - cmd_obj.set_option (cmd_option, val) - elif type (alias) is TupleType: - (command, cmd_option) = alias - cmd_obj = self.find_command_obj (command) - cmd_obj.set_option (cmd_option, val) - else: - raise RuntimeError, \ - ("oops! bad alias option for '%s': " + - "must be tuple or list of tuples") % key - - elif hasattr (self, key): + if hasattr (self, key): setattr (self, key, val) else: raise DistutilsOptionError, \ @@ -653,7 +629,8 @@ def get_command_name (self): # splits to ['', 'Foo', '', 'Bar', '', 'Baz', '']. Hence # the 'filter' to strip out the empties. words = filter (None, re.split (r'([A-Z][a-z]+)', class_name)) - return string.join (map (string.lower, words), "_") + self.command_name = string.join (map (string.lower, words), "_") + return self.command_name def set_undefined_options (self, src_cmd, *option_pairs): @@ -717,6 +694,11 @@ def run_peer (self, command): # -- External world manipulation ----------------------------------- + def warn (self, msg): + sys.stderr.write ("warning: %s: %s\n" % + (self.get_command_name(), msg)) + + def execute (self, func, args, msg=None, level=1): """Perform some action that affects the outside world (eg. by writing to the filesystem). Such actions are special because From 366fb4718e7bad951328391a0439b6d07852b8fe Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Sep 1999 15:24:04 +0000 Subject: [PATCH 0073/8469] Added docstring and RCS id (apparently some Windows tar extractors ignore zero-byte files: grr...). --- __init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/__init__.py b/__init__.py index e69de29bb2..18deaadf44 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1,11 @@ +"""distutils + +The main package for the Python Module Distribtion Utilities. Normally +used from a setup script as + + from distutils.core import setup + + setup (...) +""" + +__rcsid__ = "$Id$" From d2ce9d4fb72071aabbe879af96eb405739ee1dee Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:12:19 +0000 Subject: [PATCH 0074/8469] Added 'ready' flag and 'ensure_ready()' method to Command: together they make sure that 'set_final_options()' has been called, but isn't called redundantly. Changed Distribution to call 'ensure_ready()' where it used to call 'set_final_options()', and in a few extra places as well. Lots of comment/docstring revisions and additions in both classes. New one-liner utility methods in Command: 'find_peer()', 'spawn()'. --- core.py | 81 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 28 deletions(-) diff --git a/core.py b/core.py index e53392133d..f0c97aa3ca 100644 --- a/core.py +++ b/core.py @@ -416,30 +416,25 @@ def run_command (self, command): Then invoke 'run()' on that command object (or an existing one).""" - # XXX currently, this is the only place where we invoke a - # command object's 'run()' method -- so it might make sense to - # put the 'set_final_options()' call here, too, instead of - # requiring every command's 'run()' to call it first. - # Already been here, done that? then return silently. if self.have_run.get (command): return self.announce ("running " + command) cmd_obj = self.find_command_obj (command) + cmd_obj.ensure_ready () cmd_obj.run () self.have_run[command] = 1 def get_command_option (self, command, option): - """Create a command object for 'command' if necessary, finalize - its option values by invoking its 'set_final_options()' - method, and return the value of its 'option' option. Raise - DistutilsOptionError if 'option' is not known for - that 'command'.""" + """Create a command object for 'command' if necessary, ensure that + its option values are all set to their final values, and return + the value of its 'option' option. Raise DistutilsOptionError if + 'option' is not known for that 'command'.""" cmd_obj = self.find_command_obj (command) - cmd_obj.set_final_options () + cmd_obj.ensure_ready () return cmd_obj.get_option (option) try: return getattr (cmd_obj, option) @@ -449,14 +444,14 @@ def get_command_option (self, command, option): def get_command_options (self, command, *options): - """Create a command object for 'command' if necessary, finalize - its option values by invoking its 'set_final_options()' - method, and return the values of all the options listed in - 'options' for that command. Raise DistutilsOptionError if - 'option' is not known for that 'command'.""" + """Create a command object for 'command' if necessary, ensure that + its option values are all set to their final values, and return + a tuple containing the values of all the options listed in + 'options' for that command. Raise DistutilsOptionError if any + invalid option is supplied in 'options'.""" cmd_obj = self.find_command_obj (command) - cmd_obj.set_final_options () + cmd_obj.ensure_ready () values = [] try: for opt in options: @@ -474,14 +469,14 @@ class Command: """Abstract base class for defining command classes, the "worker bees" of the Distutils. A useful analogy for command classes is to think of them as subroutines with local variables called - "options". The options are "declared" in 'set_initial_options()' + "options". The options are "declared" in 'set_default_options()' and "initialized" (given their real values) in 'set_final_options()', both of which must be defined by every command class. The distinction between the two is necessary because option values might come from the outside world (command line, option file, ...), and any options dependent on other options must be computed *after* these outside influences have - been processed -- hence 'set_final_values()'. The "body" of the + been processed -- hence 'set_final_options()'. The "body" of the subroutine, where it does all its work based on the values of its options, is the 'run()' method, which must also be implemented by every command class.""" @@ -502,8 +497,21 @@ def __init__ (self, dist): self.distribution = dist self.set_default_options () + # 'ready' records whether or not 'set_final_options()' has been + # called. 'set_final_options()' itself should not pay attention to + # this flag: it is the business of 'ensure_ready()', which always + # calls 'set_final_options()', to respect/update it. + self.ready = 0 + # end __init__ () + + def ensure_ready (self): + if not self.ready: + self.set_final_options () + self.ready = 1 + + # Subclasses must define: # set_default_options() # provide default values for all options; may be overridden @@ -664,22 +672,32 @@ def set_undefined_options (self, src_cmd, *option_pairs): def set_peer_option (self, command, option, value): """Attempt to simulate a command-line override of some option - value in another command. Creates a command object for - 'command' if necessary, sets 'option' to 'value', and invokes - 'set_final_options()' on that command object. This will only - have the desired effect if the command object for 'command' - has not previously been created. Generally this is used to - ensure that the options in 'command' dependent on 'option' - are computed, hopefully (but not necessarily) deriving from - 'value'. It might be more accurate to call this method - 'influence_dependent_peer_options()'.""" + value in another command. Finds the command object for + 'command', sets its 'option' to 'value', and unconditionally + calls 'set_final_options()' on it: this means that some command + objects may have 'set_final_options()' invoked more than once. + Even so, this is not entirely reliable: the other command may + already be initialized to its satisfaction, in which case the + second 'set_final_options()' invocation will have little or no + effect.""" cmd_obj = self.distribution.find_command_obj (command) cmd_obj.set_option (option, value) cmd_obj.set_final_options () + def find_peer (self, command, create=1): + """Wrapper around Distribution's 'find_command_obj()' method: + find (create if necessary and 'create' is true) the command + object for 'command'..""" + + return self.distribution.find_command_obj (command, create) + + def get_peer_option (self, command, option): + """Find or create the command object for 'command', and return + its 'option' option.""" + cmd_obj = self.distribution.find_command_obj (command) return cmd_obj.get_option (option) @@ -762,6 +780,13 @@ def move_file (self, src, dst, level=1): self.distribution.dry_run) + def spawn (self, cmd, search_path=1, level=1): + from distutils.spawn import spawn + spawn (cmd, search_path, + self.distribution.verbose >= level, + self.distribution.dry_run) + + def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): From 9a476d732350a106b3dc6ac876320a51a5d22053 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:14:16 +0000 Subject: [PATCH 0075/8469] More tweaks to 'mkpath()': - deal with empty tail from os.path.split() (eg. from trailing slash, or backslash, or whatever) - check PATH_CREATED hash inside loop as well --- util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util.py b/util.py index 85b04e7a80..aee95d3668 100644 --- a/util.py +++ b/util.py @@ -43,6 +43,8 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): return (head, tail) = os.path.split (name) + if not tail: # in case 'name' has trailing slash + (head, tail) = os.path.split (head) tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir (head): @@ -59,6 +61,9 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join (head, d) + if PATH_CREATED.get (head): + continue + if verbose: print "creating", head From e748eefe84902c7daee5e2bc2e34400b972fe08e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:20:55 +0000 Subject: [PATCH 0076/8469] Added 'extra_preargs' and 'extra_postargs' parameters to most methods, which allowed us to get rid of the 'build_info' used in some places (a temporary kludge to support MSVC++ "def" files). Deleted big comment whining about that kludge. Added 'compiler_type' class attribute. Overhauled 'new_compiler()': now takes 'compiler' argument along with 'plat' (both optional with sensible defaults), and looks them both up in the new 'default_compiler' and 'compiler_class' dictionaries to figure out where to get the concrete compiler class from. Reordered arguments to 'gen_lib_options()' to match the order in which the arguments are generated (ie. -L before -l). --- ccompiler.py | 141 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 94 insertions(+), 47 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 2a80739c7b..bfbb50faf3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -7,7 +7,7 @@ __rcsid__ = "$Id$" -import os +import sys, os from types import * from copy import copy from distutils.errors import * @@ -30,6 +30,15 @@ class CCompiler: most (all?) of those attributes may be varied on a per-compilation or per-link basis.""" + # 'compiler_type' is a class attribute that identifies this class. It + # keeps code that wants to know what kind of compiler it's dealing with + # from having to import all possible compiler classes just to do an + # 'isinstance'. In concrete CCompiler subclasses, 'compiler_type' + # should really, really be one of the keys of the 'compiler_class' + # dictionary (see below -- used by the 'new_compiler()' factory + # function) -- authors of new compiler interface classes are + # responsible for updating 'compiler_class'! + compiler_type = None # XXX things not handled by this compiler abstraction model: # * client can't provide additional options for a compiler, @@ -251,7 +260,9 @@ def compile (self, sources, output_dir=None, macros=None, - includes=None): + includes=None, + extra_preargs=None, + extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be a list of strings, each one the name of a C/C++ source file. Return a list of the object filenames generated @@ -266,7 +277,16 @@ def compile (self, 'includes', if given, must be a list of strings, the directories to add to the default include file search path for this - compilation only.""" + compilation only. + + 'extra_preargs' and 'extra_postargs' are optional lists of extra + command-line arguments that will be, respectively, prepended or + appended to the generated command line immediately before + execution. These will most likely be peculiar to the particular + platform and compiler being worked with, but are a necessary + escape hatch for those occasions when the abstract compiler + framework doesn't cut the mustard.""" + pass @@ -278,7 +298,9 @@ def link_static_lib (self, output_libname, output_dir=None, libraries=None, - library_dirs=None): + library_dirs=None, + extra_preargs=None, + extra_postargs=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied @@ -292,42 +314,23 @@ def link_static_lib (self, 'library_dirs', if supplied, should be a list of additional directories to search on top of the system default and those - supplied to 'add_library_dir()' and/or 'set_library_dirs()'.""" + supplied to 'add_library_dir()' and/or 'set_library_dirs()'. + + 'extra_preargs' and 'extra_postargs' are as for 'compile()' + (except of course that they supply command-line arguments + for the particular linker being used).""" pass - # XXX passing in 'build_info' here is a kludge to deal with the - # oddities of one particular compiler (Visual C++). For some reason, - # it needs to be told about ".def" files, and currently the - # 'build_info' hash allows this through a 'def_file' element. The link - # methods for VC++ look for 'def_file' and transform it into the - # appropriate command-line options. The current code is objectionable - # for a number of reasons: 1) if the link methods take 'build_info', - # why bother passing in libraries, library_dirs, etc.? 2) if the link - # methods do it, why not the compile methods? 3) build_info is part of - # the interface between setup.py and the 'build_ext' command -- it - # should stop there and not be propagated down into the compiler - # classes! and 4) I don't like elevating a platform- and - # compiler-specific oddity to "first-class" status in 'build_info' (oh - # well, at least it's not being reified in the compiler classes -- that - # would be really gross). - # - # Possible solutions: - # - just pass build_info to all the compile/link methods, - # never mind all those other parameters and screw the - # integrity of the interfaces - # - add a mechanism for passing platform-specific and/or - # compiler-specific compiler/linker options from setup.py - # straight through to the appropriate compiler class - def link_shared_lib (self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, - build_info=None): + extra_preargs=None, + extra_postargs=None): """Link a bunch of stuff together to create a shared library file. Has the same effect as 'link_static_lib()' except that the filename inferred from 'output_libname' will most @@ -335,18 +338,20 @@ def link_shared_lib (self, almost certainly be different.""" pass + def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, - build_info=None): + extra_preargs=None, + extra_postargs=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'. If 'output_dir' is supplied, 'output_filename' is relative to it - (i.e. 'output_filename' can provide directoriy components if + (i.e. 'output_filename' can provide directory components if needed).""" pass @@ -407,23 +412,65 @@ def move_file (self, src, dst): # class CCompiler +# Map a platform ('posix', 'nt') to the default compiler type for +# that platform. +default_compiler = { 'posix': 'unix', + 'nt': 'msvc', + } + +# Map compiler types to (module_name, class_name) pairs -- ie. where to +# find the code that implements an interface to this compiler. (The module +# is assumed to be in the 'distutils' package.) +compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler'), + 'msvc': ('msvccompiler', 'MSVCCompiler'), + } + + def new_compiler (plat=None, + compiler=None, verbose=0, dry_run=0): - """Generate a CCompiler instance for platform 'plat' (or the - current platform, if 'plat' not supplied). Really instantiates - some concrete subclass of CCompiler, of course.""" - - if plat is None: plat = os.name - if plat == 'posix': - from unixccompiler import UnixCCompiler - return UnixCCompiler (verbose, dry_run) - elif plat == 'nt': - from msvccompiler import MSVCCompiler - return MSVCCompiler (verbose, dry_run) - else: - raise DistutilsPlatformError, \ - "don't know how to compile C/C++ code on platform %s" % plat + + """Generate an instance of some CCompiler subclass for the supplied + platform/compiler combination. 'plat' defaults to 'os.name' + (eg. 'posix', 'nt'), and 'compiler' defaults to the default + compiler for that platform. Currently only 'posix' and 'nt' + are supported, and the default compilers are "traditional Unix + interface" (UnixCCompiler class) and Visual C++ (MSVCCompiler + class). Note that it's perfectly possible to ask for a Unix + compiler object under Windows, and a Microsoft compiler object + under Unix -- if you supply a value for 'compiler', 'plat' + is ignored.""" + + if plat is None: + plat = os.name + + try: + if compiler is None: + compiler = default_compiler[plat] + + (module_name, class_name) = compiler_class[compiler] + except KeyError: + msg = "don't know how to compile C/C++ code on platform '%s'" % plat + if compiler is not None: + msg = msg + " with '%s' compiler" % compiler + raise DistutilsPlatformError, msg + + try: + module_name = "distutils." + module_name + __import__ (module_name) + module = sys.modules[module_name] + klass = vars(module)[class_name] + except ImportError: + raise DistutilsModuleError, \ + "can't compile C/C++ code: unable to load module '%s'" % \ + module_name + except KeyError: + raise DistutilsModuleError, \ + ("can't compile C/C++ code: unable to find class '%s' " + + "in module '%s'") % (class_name, module_name) + + return klass (verbose, dry_run) def gen_preprocess_options (macros, includes): @@ -477,7 +524,7 @@ def gen_preprocess_options (macros, includes): # gen_preprocess_options () -def gen_lib_options (libraries, library_dirs, lib_format, dir_format): +def gen_lib_options (library_dirs, libraries, dir_format, lib_format): """Generate linker options for searching library directories and linking with specific libraries. 'libraries' and 'library_dirs' are, respectively, lists of library names (not filenames!) and From 5a10a6e29b3f8bab23620ad6385efb0d7f5b4486 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:22:50 +0000 Subject: [PATCH 0077/8469] Catch up with latest changes in CCompiler: - add 'extra_preargs' and 'extra_postargs' parameters (and use them!) - added 'compiler_type' class attribute - respect reordered arguments to 'gen_lib_options()' --- unixccompiler.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 02fbc66aa7..f3d9591b4a 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -53,6 +53,8 @@ class UnixCCompiler (CCompiler): # are specified via {add,set}_include_dirs(), and there's no way to # distinguish them. This might be a bug. + compiler_type = 'unix' + _obj_ext = '.o' _exe_ext = '' _shared_lib_ext = SO @@ -89,7 +91,9 @@ def compile (self, sources, output_dir=None, macros=None, - includes=None): + includes=None, + extra_preargs=None, + extra_postargs=None): if output_dir is None: output_dir = self.output_dir @@ -130,6 +134,10 @@ def compile (self, cc_args = ['-c'] + pp_opts + \ self.ccflags + self.ccflags_shared + \ sources + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs: + cc_args.extend (extra_postargs) self.spawn ([self.cc] + cc_args) @@ -164,7 +172,8 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, - build_info=None): + extra_preargs=None, + extra_postargs=None): # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object ( @@ -173,7 +182,8 @@ def link_shared_lib (self, output_dir, libraries, library_dirs, - build_info) + extra_preargs, + extra_postargs) def link_shared_object (self, @@ -182,7 +192,8 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, - build_info=None): + extra_preargs=None, + extra_postargs=None): if output_dir is None: output_dir = self.output_dir @@ -190,12 +201,10 @@ def link_shared_object (self, libraries = [] if library_dirs is None: library_dirs = [] - if build_info is None: - build_info = {} - lib_opts = gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs, - "-l%s", "-L%s") + lib_opts = gen_lib_options (self.library_dirs + library_dirs, + self.libraries + libraries, + "-L%s", "-l%s") if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -215,7 +224,10 @@ def link_shared_object (self, if newer: ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] - + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) self.spawn ([self.ld_shared] + ld_args) else: self.announce ("skipping %s (up-to-date)" % output_filename) From 746c9403521ce115a30d553275740a65af7efb63 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:29:10 +0000 Subject: [PATCH 0078/8469] Catch up with latest changes in CCompiler: - add 'extra_preargs' and 'extra_postargs' parameters (and use them!) - got rid of 'build_info' kludge parameter - added 'compiler_type' class attribute - respect reordered arguments to 'gen_lib_options()' Also added 'output_dir' parameter (catching up with older change in CCompiler) -- BUT this is presently ignored by all methods! Deleted some more docstrings redundant with CCompiler. Dropped generated of "/DEF:" argument --- that's now done by the 'build_ext' command. --- msvccompiler.py | 103 +++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 58 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index f328232bc0..64b2730713 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -1,7 +1,7 @@ """distutils.ccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class -for the Microsoft Visual Studio """ +for the Microsoft Visual Studio.""" # created 1999/08/19, Perry Stoll @@ -19,6 +19,8 @@ class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" + compiler_type = 'msvc' + def __init__ (self, verbose=0, dry_run=0): @@ -50,26 +52,19 @@ def __init__ (self, _exe_ext = '.exe' _shared_lib_ext = '.dll' _static_lib_ext = '.lib' + + # XXX the 'output_dir' parameter is ignored by the methods in this + # class! I just put it in to be consistent with CCompiler and + # UnixCCompiler, but someone who actually knows Visual C++ will + # have to make it work... def compile (self, sources, + output_dir=None, macros=None, - includes=None): - """Compile one or more C/C++ source files. 'sources' must be - a list of strings, each one the name of a C/C++ source - file. Return a list of the object filenames generated - (one for each source filename in 'sources'). - - 'macros', if given, must be a list of macro definitions. A - macro definition is either a (name, value) 2-tuple or a (name,) - 1-tuple. The former defines a macro; if the value is None, the - macro is defined without an explicit value. The 1-tuple case - undefines a macro. Later definitions/redefinitions/ - undefinitions take precedence. - - 'includes', if given, must be a list of strings, the directories - to add to the default include file search path for this - compilation only.""" + includes=None, + extra_preargs=None, + extra_postargs=None): if macros is None: macros = [] @@ -95,11 +90,16 @@ def compile (self, inputOpt = fileOpt + srcFile outputOpt = "/Fo" + objFile - pp_opts = base_pp_opts + [ outputOpt, inputOpt ] + cc_args = self.compile_options + \ + base_pp_opts + \ + [outputOpt, inputOpt] + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs: + cc_args.extend (extra_postargs) - self.spawn( [ self.cc ] + self.compile_options + pp_opts) + self.spawn ([self.cc] + cc_args) objectFiles.append( objFile ) - return objectFiles @@ -109,39 +109,27 @@ def compile (self, def link_static_lib (self, objects, output_libname, + output_dir=None, libraries=None, - library_dirs=None): - """Link a bunch of stuff together to create a static library - file. The "bunch of stuff" consists of the list of object - files supplied as 'objects', the extra object files supplied - to 'add_link_object()' and/or 'set_link_objects()', the - libraries supplied to 'add_library()' and/or - 'set_libraries()', and the libraries supplied as 'libraries' - (if any). - - 'output_libname' should be a library name, not a filename; - the filename will be inferred from the library name. - - 'library_dirs', if supplied, should be a list of additional - directories to search on top of the system default and those - supplied to 'add_library_dir()' and/or 'set_library_dirs()'.""" - + library_dirs=None, + extra_preargs=None, + extra_postargs=None): + if libraries is None: libraries = [] if library_dirs is None: library_dirs = [] - if build_info is None: - build_info = {} lib_opts = gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs, "%s.lib", "/LIBPATH:%s") - if build_info.has_key('def_file') : - lib_opts.append('/DEF:' + build_info['def_file'] ) - ld_args = self.ldflags_static + lib_opts + \ objects + ['/OUT:' + output_filename] + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) self.spawn ( [ self.link ] + ld_args ) @@ -149,25 +137,25 @@ def link_static_lib (self, def link_shared_lib (self, objects, output_libname, + output_dir=None, libraries=None, library_dirs=None, - build_info=None): - """Link a bunch of stuff together to create a shared library - file. Has the same effect as 'link_static_lib()' except - that the filename inferred from 'output_libname' will most - likely be different, and the type of file generated will - almost certainly be different.""" + extra_preargs=None, + extra_postargs=None): + # XXX should we sanity check the library name? (eg. no # slashes) - self.link_shared_object (objects, self.shared_library_name(output_libname), - build_info=build_info ) + self.link_shared_object (objects, + self.shared_library_name(output_libname)) def link_shared_object (self, objects, output_filename, + output_dir=None, libraries=None, library_dirs=None, - build_info=None): + extra_preargs=None, + extra_postargs=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'.""" @@ -175,18 +163,17 @@ def link_shared_object (self, libraries = [] if library_dirs is None: library_dirs = [] - if build_info is None: - build_info = {} - lib_opts = gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs, - "%s.lib", "/LIBPATH:%s") + lib_opts = gen_lib_options (self.library_dirs + library_dirs, + self.libraries + libraries, + "/LIBPATH:%s", "%s.lib") - if build_info.has_key('def_file') : - lib_opts.append('/DEF:' + build_info['def_file'] ) - ld_args = self.ldflags_shared + lib_opts + \ objects + ['/OUT:' + output_filename] + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) self.spawn ( [ self.link ] + ld_args ) From ef61002f9b2e49fe27ff73f7da6003844eac6943 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:38:18 +0000 Subject: [PATCH 0079/8469] Renamed many options to be consistent across commands. Tweaked some help strings to be consistent with documentation. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. --- command/build.py | 31 ++++++++++++++++--------------- command/install.py | 16 +++++++--------- command/install_ext.py | 9 ++++----- command/install_lib.py | 10 ++++------ command/install_py.py | 10 ++++------ 5 files changed, 35 insertions(+), 41 deletions(-) diff --git a/command/build.py b/command/build.py index b74e51cfea..1586e60b07 100644 --- a/command/build.py +++ b/command/build.py @@ -12,31 +12,32 @@ class Build (Command): - options = [('basedir=', 'b', "base directory for build library"), - ('libdir=', 'l', "directory for platform-shared files"), - ('platdir=', 'p', "directory for platform-specific files"), + options = [('build-base=', 'b', + "base directory for build library"), + ('build-lib=', 'l', + "directory for platform-shared files"), + ('build-platlib=', 'p', + "directory for platform-specific files"), ] def set_default_options (self): - self.basedir = 'build' - # these are decided only after 'basedir' has its final value + self.build_base = 'build' + # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) - self.libdir = None - self.platdir = None + self.build_lib = None + self.build_platlib = None def set_final_options (self): - # 'libdir' and 'platdir' just default to 'lib' and 'plat' under - # the base build directory - if self.libdir is None: - self.libdir = os.path.join (self.basedir, 'lib') - if self.platdir is None: - self.platdir = os.path.join (self.basedir, 'platlib') + # 'build_lib' and 'build_platlib' just default to 'lib' and + # 'platlib' under the base build directory + if self.build_lib is None: + self.build_lib = os.path.join (self.build_base, 'lib') + if self.build_platlib is None: + self.build_platlib = os.path.join (self.build_base, 'platlib') def run (self): - self.set_final_options () - # For now, "build" means "build_py" then "build_ext". (Eventually # it should also build documentation.) diff --git a/command/install.py b/command/install.py index 0e4ad3f016..cd12f6fc5b 100644 --- a/command/install.py +++ b/command/install.py @@ -16,16 +16,16 @@ class Install (Command): options = [('prefix=', None, "installation prefix"), - ('execprefix=', None, + ('exec-prefix=', None, "prefix for platform-specific files"), # Build directories: where to install from ('build-base=', None, "base build directory"), ('build-lib=', None, - "build directory for non-platform-specific library files"), + "build directory for pure Python modules"), ('build-platlib=', None, - "build directory for platform-specific library files"), + "build directory for extension modules"), # Installation directories: where to put modules and packages ('install-lib=', None, @@ -113,11 +113,11 @@ def set_final_options (self): # to fix things. # Figure out the build directories, ie. where to install from - self.set_peer_option ('build', 'basedir', self.build_base) + self.set_peer_option ('build', 'build_base', self.build_base) self.set_undefined_options ('build', - ('basedir', 'build_base'), - ('libdir', 'build_lib'), - ('platdir', 'build_platlib')) + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_platlib', 'build_platlib')) # Figure out actual installation directories; the basic principle # is: if the user supplied nothing, then use the directories that @@ -275,8 +275,6 @@ def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): def run (self): - self.set_final_options () - # Obviously have to build before we can install self.run_peer ('build') diff --git a/command/install_ext.py b/command/install_ext.py index 360a8027b7..3fb756c6a1 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -11,28 +11,27 @@ class InstallExt (Command): - options = [('dir=', 'd', "directory to install to"), + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ] def set_default_options (self): # let the 'install' command dictate our installation directory - self.dir = None + self.install_dir = None self.build_dir = None def set_final_options (self): self.set_undefined_options ('install', ('build_platlib', 'build_dir'), - ('install_site_platlib', 'dir')) + ('install_site_platlib', 'install_dir')) def run (self): - self.set_final_options () # Dump the entire "build/platlib" directory (or whatever it really # is; "build/platlib" is the default) to the installation target # (eg. "/usr/local/lib/python1.5/site-packages"). Note that # putting files in the right package dir is already done when we # build. - outfiles = self.copy_tree (self.build_dir, self.dir) + outfiles = self.copy_tree (self.build_dir, self.install_dir) # class InstallExt diff --git a/command/install_lib.py b/command/install_lib.py index a2ba16cc35..978bb3b958 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -8,7 +8,7 @@ class InstallPy (Command): - options = [('dir=', 'd', "directory to install to"), + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), @@ -17,7 +17,7 @@ class InstallPy (Command): def set_default_options (self): # let the 'install' command dictate our installation directory - self.dir = None + self.install_dir = None self.build_dir = None self.compile = 1 self.optimize = 1 @@ -39,18 +39,16 @@ def set_final_options (self): # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - (dir_option, 'dir'), + (dir_option, 'install_dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) def run (self): - self.set_final_options () - # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - outfiles = self.copy_tree (self.build_dir, self.dir) + outfiles = self.copy_tree (self.build_dir, self.install_dir) # (Optionally) compile .py to .pyc # XXX hey! we can't control whether we optimize or not; that's up diff --git a/command/install_py.py b/command/install_py.py index a2ba16cc35..978bb3b958 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -8,7 +8,7 @@ class InstallPy (Command): - options = [('dir=', 'd', "directory to install to"), + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), @@ -17,7 +17,7 @@ class InstallPy (Command): def set_default_options (self): # let the 'install' command dictate our installation directory - self.dir = None + self.install_dir = None self.build_dir = None self.compile = 1 self.optimize = 1 @@ -39,18 +39,16 @@ def set_final_options (self): # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - (dir_option, 'dir'), + (dir_option, 'install_dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) def run (self): - self.set_final_options () - # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) - outfiles = self.copy_tree (self.build_dir, self.dir) + outfiles = self.copy_tree (self.build_dir, self.install_dir) # (Optionally) compile .py to .pyc # XXX hey! we can't control whether we optimize or not; that's up From dc070bb95b5ab859dc3a9fa613a960a62c977f45 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:44:57 +0000 Subject: [PATCH 0080/8469] Renamed 'dir' option to be consistent with other commands. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. Rearranged to bit to allow outsiders (specifically, the 'dist' command) to find out what modules we would build: - 'find_modules()' renamed to 'find_package_modules()' - most of 'build_modules()' abstracted out to 'find_modules()' - added 'get_source_files()' (for the 'dist' command to use) - drastically simplified 'build_modules()' -- now just a wrapper around 'find_modules()' and 'build_module()' --- command/build_py.py | 101 +++++++++++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 35 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 187e93b58c..3a7a43bb1e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -17,19 +17,19 @@ class BuildPy (Command): - options = [('dir=', 'd', "directory for platform-shared files"), + options = [('build-dir=', 'd', "directory for platform-shared files"), ] def set_default_options (self): - self.dir = None + self.build_dir = None self.modules = None self.package = None self.package_dir = None def set_final_options (self): self.set_undefined_options ('build', - ('libdir', 'dir')) + ('build_lib', 'build_dir')) # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. @@ -53,8 +53,6 @@ def run (self): # metadata to know that a file is meant to be interpreted by # Python?) - self.set_final_options () - infiles = [] outfiles = [] missing = [] @@ -155,7 +153,7 @@ def check_module (self, module, module_file): # check_module () - def find_modules (self, package, package_dir): + def find_package_modules (self, package, package_dir): module_files = glob (os.path.join (package_dir, "*.py")) module_pairs = [] for f in module_files: @@ -164,36 +162,18 @@ def find_modules (self, package, package_dir): return module_pairs - def build_module (self, module, module_file, package): - - if type (package) is StringType: - package = string.split (package, '.') - - # Now put the module source file into the "build" area -- this - # is easy, we just copy it somewhere under self.dir (the build - # directory for Python source). - outfile_path = package - outfile_path.append (module + ".py") - outfile_path.insert (0, self.dir) - outfile = apply (os.path.join, outfile_path) - - dir = os.path.dirname (outfile) - self.mkpath (dir) - self.copy_file (module_file, outfile) - - - def build_modules (self): - + def find_modules (self): # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for # this package # checked - true if we have checked that the package directory # is valid (exists, contains __init__.py, ... ?) - - packages = {} + # List of (module, package, filename) tuples to return + modules = [] + # We treat modules-in-packages almost the same as toplevel modules, # just the "package" for a toplevel is empty (either an empty # string or empty list, depending on context). Differences: @@ -202,7 +182,7 @@ def build_modules (self): for module in self.modules: path = string.split (module, '.') package = tuple (path[0:-1]) - module = path[-1] + module_base = path[-1] try: (package_dir, checked) = packages[package] @@ -217,14 +197,65 @@ def build_modules (self): # XXX perhaps we should also check for just .pyc files # (so greedy closed-source bastards can distribute Python # modules too) - module_file = os.path.join (package_dir, module + ".py") + module_file = os.path.join (package_dir, module_base + ".py") if not self.check_module (module, module_file): continue + modules.append ((module, package, module_file)) + + return modules + + # find_modules () + + + def get_source_files (self): + + if self.modules: + modules = self.find_modules () + else: + modules = [] + for package in self.packages: + package_dir = self.get_package_dir (package) + m = self.find_package_modules (package, package_dir) + modules.extend (m) + + # Both find_modules() and find_package_modules() return a list of + # tuples where the last element of each tuple is the filename -- + # what a happy coincidence! + filenames = [] + for module in modules: + filenames.append (module[-1]) + + return filenames + + + def build_module (self, module, module_file, package): + + if type (package) is StringType: + package = string.split (package, '.') + + # Now put the module source file into the "build" area -- this is + # easy, we just copy it somewhere under self.build_dir (the build + # directory for Python source). + outfile_path = package + outfile_path.append (module + ".py") + outfile_path.insert (0, self.build_dir) + outfile = apply (os.path.join, outfile_path) + + dir = os.path.dirname (outfile) + self.mkpath (dir) + self.copy_file (module_file, outfile) + + + def build_modules (self): + + modules = self.find_modules() + for (module, package, module_file) in modules: + # Now "build" the module -- ie. copy the source file to - # self.dir (the build directory for Python source). (Actually, - # it gets copied to the directory for this package under - # self.dir.) + # self.build_dir (the build directory for Python source). + # (Actually, it gets copied to the directory for this package + # under self.build_dir.) self.build_module (module, module_file, package) # build_modules () @@ -242,10 +273,10 @@ def build_packages (self): # package!), and module_file is the path to the .py file, # relative to the current directory (ie. including # 'package_dir'). - modules = self.find_modules (package, package_dir) + modules = self.find_package_modules (package, package_dir) # Now loop over the modules we found, "building" each one (just - # copy it to self.dir). + # copy it to self.build_dir). for (module, module_file) in modules: self.build_module (module, module_file, package) From 0e1de2192cf0ccfd9196aec77cdae0ae04eda971 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:49:35 +0000 Subject: [PATCH 0081/8469] Added 'package' option. Catch up with renamed 'platdir' -> 'build_platlib' option in 'build'. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. If 'include_dirs' is a string, split it on os.pathsep (this is half- hearted -- support for setting compile/link options on the command line is totally lame and probably won't work at all). Added 'get_source_files()' for use by 'dist' command. Added code to 'build_extensions()' to figure out the "def file" to use with MSVC++ and add it to the linker command line as an "extra_postarg". --- command/build_ext.py | 51 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index a0ab61b389..8c5065f6bc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -58,8 +58,6 @@ class BuildExt (Command): "directories to search for shared C libraries at runtime"), ('link-objects=', 'O', "extra explicit link objects to include in the link"), - ('package=', 'p', - "Python package to put extension modules into"), ] @@ -76,8 +74,9 @@ def set_default_options (self): self.rpath = None self.link_objects = None + def set_final_options (self): - self.set_undefined_options ('build', ('platdir', 'build_dir')) + self.set_undefined_options ('build', ('build_platlib', 'build_dir')) if self.package is None: self.package = self.distribution.ext_package @@ -94,6 +93,10 @@ def set_final_options (self): 'python' + sys.version[0:3]) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] + if type (self.include_dirs) is StringType: + self.include_dirs = string.split (self.include_dirs, + os.pathsep) + self.include_dirs.insert (0, py_include) if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) @@ -101,8 +104,6 @@ def set_final_options (self): def run (self): - self.set_final_options () - # 'self.extensions', as supplied by setup.py, is a list of 2-tuples. # Each tuple is simple: # (ext_name, build_info) @@ -172,6 +173,19 @@ def check_extensions_list (self, extensions): # check_extensions_list () + def get_source_files (self): + + filenames = [] + + # Wouldn't it be neat if we knew the names of header files too... + for (extension_name, build_info) in extensions: + sources = build_info.get ('sources') + if type (sources) in (ListType, TupleType): + filenames.extend (sources) + + return filenames + + def build_extensions (self, extensions): for (extension_name, build_info) in extensions: @@ -180,19 +194,42 @@ def build_extensions (self, extensions): raise DistutilsValueError, \ "in ext_modules option, 'sources' must be present " + \ "and must be a list of source filenames" - + + # First step: compile the source code to object files. This + # drops the object files in the current directory, regardless + # of where the source is (may be a bad thing, but that's how a + # Makefile.pre.in-based system does it, so at least there's a + # precedent!) macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') self.compiler.compile (sources, macros=macros, includes=include_dirs) + # Now link the object files together into a "shared object" -- + # of course, first we have to figure out all the other things + # that go into the mix. objects = self.compiler.object_filenames (sources) extra_objects = build_info.get ('extra_objects') if extra_objects: objects.extend (extra_objects) libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') + extra_args = build_info.get ('extra_link_args') or [] + if self.compiler.compiler_type == 'msvc': + def_file = build_info.get ('def_file') + if def_file is None: + source_dir = os.path.dirname (sources[0]) + ext_base = (string.split (extension_name, '.'))[-1] + def_file = os.path.join (source_dir, "%s.def" % ext_base) + if not os.path.exists (def_file): + self.warn ("file '%s' not found: " % def_file + + "might have problems building DLL") + def_file = None + + if def_file is not None: + extra_args.append ('/DEF:' + def_file) + ext_filename = self.extension_filename \ (extension_name, self.package) ext_filename = os.path.join (self.build_dir, ext_filename) @@ -201,7 +238,7 @@ def build_extensions (self, extensions): self.compiler.link_shared_object (objects, ext_filename, libraries=libraries, library_dirs=library_dirs, - build_info=build_info) # XXX hack! + extra_postargs=extra_args) # build_extensions () From 23e30bcec4cff109e9545d49763f6166688b88f1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 12:50:13 +0000 Subject: [PATCH 0082/8469] New command to generate source distribution based on a manifest file. --- command/dist.py | 590 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 590 insertions(+) create mode 100644 command/dist.py diff --git a/command/dist.py b/command/dist.py new file mode 100644 index 0000000000..222296f363 --- /dev/null +++ b/command/dist.py @@ -0,0 +1,590 @@ +"""distutils.command.dist + +Implements the Distutils 'dist' command (create a source distribution).""" + +# created 1999/09/22, Greg Ward + +__rcsid__ = "$Id$" + +import sys, os, string, re +import fnmatch +from types import * +from glob import glob +from distutils.core import Command +from distutils.text_file import TextFile + + +# Possible modes of operation: +# - require an explicit manifest that lists every single file (presumably +# along with a way to auto-generate the manifest) +# - require an explicit manifest, but allow it to have globs or +# filename patterns of some kind (and also have auto-generation) +# - allow an explict manifest, but automatically augment it at runtime +# with the source files mentioned in 'packages', 'py_modules', and +# 'ext_modules' (and any other such things that might come along) + +# I'm liking the third way. Possible gotchas: +# - redundant specification: 'packages' includes 'foo' and manifest +# includes 'foo/*.py' +# - obvious conflict: 'packages' includes 'foo' and manifest +# includes '! foo/*.py' (can't imagine why you'd want this) +# - subtle conflict: 'packages' includes 'foo' and manifest +# includes '! foo/bar.py' (this could well be desired: eg. exclude +# an experimental module from distribution) + +# Syntax for the manifest file: +# - if a line is just a Unix-style glob by itself, it's a "simple include +# pattern": go find all files that match and add them to the list +# of files +# - if a line is a glob preceded by "!", then it's a "simple exclude +# pattern": go over the current list of files and exclude any that +# match the glob pattern +# - if a line consists of a directory name followed by zero or more +# glob patterns, then we'll recursively explore that directory tree +# - the glob patterns can be include (no punctuation) or exclude +# (prefixed by "!", no space) +# - if no patterns given or the first pattern is not an include pattern, +# then assume "*" -- ie. find everything (and then start applying +# the rest of the patterns) +# - the patterns are given in order of increasing precedence, ie. +# the *last* one to match a given file applies to it +# +# example (ignoring auto-augmentation!): +# distutils/*.py +# distutils/command/*.py +# ! distutils/bleeding_edge.py +# examples/*.py +# examples/README +# +# smarter way (that *will* include distutils/command/bleeding_edge.py!) +# distutils *.py +# ! distutils/bleeding_edge.py +# examples !*~ !*.py[co] (same as: examples * !*~ !*.py[co]) +# test test_* *.txt !*~ !*.py[co] +# README +# setup.py +# +# The actual Distutils manifest (don't need to mention source files, +# README, setup.py -- they're automatically distributed!): +# examples !*~ !*.py[co] +# test !*~ !*.py[co] + +# The algorithm that will make it work: +# files = stuff from 'packages', 'py_modules', 'ext_modules', +# plus README, setup.py, ... ? +# foreach pattern in manifest file: +# if simple-include-pattern: # "distutils/*.py" +# files.append (glob (pattern)) +# elif simple-exclude-pattern: # "! distutils/foo*" +# xfiles = glob (pattern) +# remove all xfiles from files +# elif recursive-pattern: # "examples" (just a directory name) +# patterns = rest-of-words-on-line +# dir_files = list of all files under dir +# if patterns: +# if patterns[0] is an exclude-pattern: +# insert "*" at patterns[0] +# for file in dir_files: +# for dpattern in reverse (patterns): +# if file matches dpattern: +# if dpattern is an include-pattern: +# files.append (file) +# else: +# nothing, don't include it +# next file +# else: +# files.extend (dir_files) # ie. accept all of them + + +# Anyways, this is all implemented below -- BUT it is largely untested; I +# know it works for the simple case of distributing the Distutils, but +# haven't tried it on more complicated examples. Undoubtedly doing so will +# reveal bugs and cause delays, so I'm waiting until after I've released +# Distutils 0.1. + + +# Other things we need to look for in creating a source distribution: +# - make sure there's a README +# - make sure the distribution meta-info is supplied and non-empty +# (*must* have name, version, ((author and author_email) or +# (maintainer and maintainer_email)), url +# +# Frills: +# - make sure the setup script is called "setup.py" +# - make sure the README refers to "setup.py" (ie. has a line matching +# /^\s*python\s+setup\.py/) + +# A crazy idea that conflicts with having/requiring 'version' in setup.py: +# - make sure there's a version number in the "main file" (main file +# is __init__.py of first package, or the first module if no packages, +# or the first extension module if no pure Python modules) +# - XXX how do we look for __version__ in an extension module? +# - XXX do we import and look for __version__? or just scan source for +# /^__version__\s*=\s*"[^"]+"/ ? +# - what about 'version_from' as an alternative to 'version' -- then +# we know just where to search for the version -- no guessing about +# what the "main file" is + + + +class Dist (Command): + + options = [('formats=', 'f', + "formats for source distribution (tar, ztar, gztar, or zip)"), + ('manifest=', 'm', + "name of manifest file"), + ] + + default_format = { 'posix': 'gztar', + 'nt': 'zip' } + + exclude_re = re.compile (r'\s*!\s*(\S+)') # for manifest lines + + + def set_default_options (self): + self.formats = None + self.manifest = None + + + def set_final_options (self): + if self.formats is None: + try: + self.formats = [self.default_format[os.name]] + except KeyError: + raise DistutilsPlatformError, \ + "don't know how to build source distributions on " + \ + "%s platform" % os.name + elif type (self.formats) is StringType: + self.formats = string.split (self.formats, ',') + + if self.manifest is None: + self.manifest = "MANIFEST" + + + def run (self): + + self.check_metadata () + + self.files = [] + self.find_defaults () + self.read_manifest () + + self.make_distribution () + + + def check_metadata (self): + + dist = self.distribution + + missing = [] + for attr in ('name', 'version', 'url'): + if not (hasattr (dist, attr) and getattr (dist, attr)): + missing.append (attr) + + if missing: + self.warn ("missing required meta-data: " + + string.join (missing, ", ")) + + if dist.author: + if not dist.author_email: + self.warn ("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") + elif dist.maintainer: + if not dist.maintainer_email: + self.warn ("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") + else: + self.warn ("missing meta-data: either author (and author_email) " + + "or maintainer (and maintainer_email) " + + "must be supplied") + + # check_metadata () + + + def find_defaults (self): + + standards = ['README', 'setup.py'] + for fn in standards: + if os.path.exists (fn): + self.files.append (fn) + else: + self.warn ("standard file %s not found" % fn) + + optional = ['test/test*.py'] + for pattern in optional: + files = glob (pattern) + if files: + self.files.extend (files) + + if self.distribution.packages or self.distribution.py_modules: + build_py = self.find_peer ('build_py') + build_py.ensure_ready () + self.files.extend (build_py.get_source_files ()) + + if self.distribution.ext_modules: + build_ext = self.find_peer ('build_ext') + build_ext.ensure_ready () + self.files.extend (build_ext.get_source_files ()) + + + + def open_manifest (self, filename): + return TextFile (filename, + strip_comments=1, + skip_blanks=1, + join_lines=1, + lstrip_ws=1, + rstrip_ws=1, + collapse_ws=1) + + + def search_dir (self, dir, patterns): + + allfiles = findall (dir) + if patterns: + if patterns[0][0] == "!": # starts with an exclude spec? + patterns.insert (0, "*")# then accept anything that isn't + # explicitly excluded + + act_patterns = [] # "action-patterns": (include,regexp) + # tuples where include is a boolean + for pattern in patterns: + if pattern[0] == '!': + act_patterns.append \ + ((0, re.compile (fnmatch.translate (pattern[1:])))) + else: + act_patterns.append \ + ((1, re.compile (fnmatch.translate (pattern)))) + act_patterns.reverse() + + + files = [] + for file in allfiles: + for (include,regexp) in act_patterns: + if regexp.match (file): + if include: + files.append (file) + break # continue to next file + else: + files = allfiles + + return files + + # search_dir () + + + def exclude_files (self, pattern): + + regexp = re.compile (fnmatch.translate (pattern)) + for i in range (len (self.files)-1, -1, -1): + if regexp.match (self.files[i]): + del self.files[i] + + + def read_manifest (self): + + # self.files had better already be defined (and hold the + # "automatically found" files -- Python modules and extensions, + # README, setup script, ...) + assert self.files is not None + + manifest = self.open_manifest (self.manifest) + while 1: + + pattern = manifest.readline() + if pattern is None: # end of file + break + + # Cases: + # 1) simple-include: "*.py", "foo/*.py", "doc/*.html", "FAQ" + # 2) simple-exclude: same, prefaced by ! + # 3) recursive: multi-word line, first word a directory + + exclude = self.exclude_re.match (pattern) + if exclude: + pattern = exclude.group (1) + + words = string.split (pattern) + assert words # must have something! + if os.name != 'posix': + words[0] = apply (os.path.join, string.split (words[0], '/')) + + # First word is a directory, possibly with include/exclude + # patterns making up the rest of the line: it's a recursive + # pattern + if os.path.isdir (words[0]): + if exclude: + file.warn ("exclude (!) doesn't apply to " + + "whole directory trees") + continue + + dir_files = self.search_dir (words[0], words[1:]) + self.files.extend (dir_files) + + # Multiple words in pattern: that's a no-no unless the first + # word is a directory name + elif len (words) > 1: + file.warn ("can't have multiple words unless first word " + + "('%s') is a directory name" % words[0]) + continue + + # Single word, no bang: it's a "simple include pattern" + elif not exclude: + matches = glob (pattern) + if matches: + self.files.extend (matches) + else: + manifest.warn ("no matches for '%s' found" % pattern) + + + # Single word prefixed with a bang: it's a "simple exclude pattern" + else: + if self.exclude_files (pattern) == 0: + file.warn ("no files excluded by '%s'" % pattern) + + # if/elif/.../else on 'pattern' + + # loop over lines of 'manifest' + + # read_manifest () + + + def make_release_tree (self, base_dir, files): + + # XXX this is Unix-specific + + # First get the list of directories to create + need_dir = {} + for file in files: + need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 + need_dirs = need_dir.keys() + need_dirs.sort() + + # Now create them + for dir in need_dirs: + self.mkpath (dir) + + # And walk over the list of files, making a hard link for + # each one that doesn't already exist in its corresponding + # location under 'base_dir' + + self.announce ("making hard links in %s..." % base_dir) + for file in files: + dest = os.path.join (base_dir, file) + if not os.path.exists (dest): + self.execute (os.link, (file, dest), + "linking %s -> %s" % (file, dest)) + # make_release_tree () + + + def make_tarball (self, base_dir): + + # XXX GNU tar 1.13 has a nifty option to add a prefix directory. + # It's pretty new, though, so we certainly can't require it -- but + # it would be nice to take advantage of it to skip the "create a + # tree of hardlinks" step! + + # But I am a lazy bastard, so I require GNU tar anyways. + + archive_name = base_dir + ".tar.gz" + self.spawn (["tar", "-czf", archive_name, base_dir]) + + + def make_zipfile (self, base_dir): + + # This assumes the Unix 'zip' utility -- it could be easily recast + # to use pkzip (or whatever the command-line zip creation utility + # on Redmond's archaic CP/M knockoff is nowadays), but I'll let + # someone who can actually test it do that. + + self.spawn (["zip", "-r", base_dir, base_dir]) + + + def make_distribution (self): + + # Don't warn about missing meta-data here -- should be done + # elsewhere. + name = self.distribution.name or "UNKNOWN" + version = self.distribution.version + + if version: + base_dir = "%s-%s" % (name, version) + else: + base_dir = name + + # Remove any files that match "base_dir" from the fileset -- we + # don't want to go distributing the distribution inside itself! + self.exclude_files (base_dir + "*") + + self.make_release_tree (base_dir, self.files) + if 'gztar' in self.formats: + self.make_tarball (base_dir) + if 'zip' in self.formats: + self.make_zipfile (base_dir) + +# class Dist + + +# ---------------------------------------------------------------------- +# Utility functions + +def findall (dir = os.curdir): + """Find all files under 'dir' and return the sorted list of full + filenames (relative to 'dir').""" + + list = [] + stack = [dir] + pop = stack.pop + push = stack.append + + while stack: + dir = pop() + names = os.listdir (dir) + + for name in names: + fullname = os.path.join (dir, name) + list.append (fullname) + if os.path.isdir (fullname) and not os.path.islink(fullname): + push (fullname) + + list.sort() + return list + + + + + +# ====================================================================== +# Here follows some extensive mental masturbation about how to +# make the manifest file and search algorithm even more complex. +# I think this is all gratuitous, really. + +# Hmm, something extra: want to apply an exclude pattern over a whole +# subtree without necessarily having to explicitly include files from it, +# ie. it should apply after gathering files by other means (simple +# include pattern) +# . !*~ !*.bak !#*# +# and we also want to prune at certain directories: +# . !RCS !CVS +# which again should apply globally. +# +# possible solution: +# - exclude pattern in a directory applies to all files found under that +# directory +# - subdirectories that match an exclude pattern will be pruned +# - hmmm, to be consistent, subdirectories that match an include +# pattern should be recursively included +# - and this should apply to "simple" patterns too +# +# thus: +# +# examples/ +# +# means get everything in examples/ and all subdirs; +# +# examples/ !*~ !#*# !*.py[co] +# +# means get everything under examples/ except files matching those three globs; +# +# ./ !RCS !CVS +# +# means get everything under current dir, but prune RCS/CVS directories; +# +# ./ !*~ !#*# !*.py[co] !RCS !CVS +# ! build/ +# ! experimental/ +# +# means get everything under the distribution directory except the usual +# excludes at all levels; exclude "build" and "experimental" under the +# distribution dir only. +# +# Do the former examples still work? +# +# distutils/ *.py +# ! distutils/bleeding_edge.py +# +# means all .py files recursively found under distutils, except for the one +# explicitly named. +# +# distutils/ *.py !bleeding_edge.py +# +# means the same, except bleeding_edge.py will be excluded wherever it's +# found -- thus this can exclude up to one file per directory under +# distutils. +# +# distutils/*.py +# ! distutils/bleeding_edge.py +# +# gets exactly distutils/*.py, minus the one explicitly mentioned exclude, and +# +# distutils/*.py +# distutils/ !bleeding_edge.py +# +# coincidentally does the same, but only because there can only be one file +# that matches the exclude pattern. Oh, we'd still like +# +# distutils *.py !bleeding*.py +# distutils/bleeding_ledge.py +# +# to include distutils/bleeding_ledge.py -- i.e. it should override the +# earlier exclude pattern by virtue of appearing later in the manifest. Does +# this conflict with the above requirements, ie. that "!RCS" and "!*~" should +# apply everywhere? Hmm, I think it doesn't have to, as long as we're smart +# about it. Consequence: +# +# . !RCS !CVS +# distutils * +# +# will go ahead and include RCS and CVS files under distutils, but +# +# distutils * +# . !RCS !CVS +# +# will do the right thing. Hmmm. I think that's OK, and an inevitable +# consequence of the ability to override exclusions. + +# OK, new crack at the search algorithm. +# +# for pattern in manifest: +# if dir-pattern: # ie. first word is a directory (incl. "."!) +# dir = first word on line +# patterns = rest of line +# if patterns: +# for dpattern in patterns: +# if exclude-pattern: +# remove from files anything matching dpattern (including pruning +# subtrees rooted at directories that match dpattern) +# else: +# files.append (recursive_glob (dir, dpattern)) +# else: +# files.append (recursive_glob (dir, '*') +# +# elif include-pattern: # it's a "simple include pattern" +# files.append (glob (pattern)) +# +# else: # it's a "simple exclude pattern" +# remove from files anything matching pattern + +# The two removal algorithms might be a bit tricky: +# +# "remove simple exclude pattern": +# for f in files: +# if f matches pattern: +# delete it +# +# "remove recursive exclude pattern": +# for f in files: +# +# t = tail (f) +# while t: +# if t matches pattern: +# delete current file +# continue +# t = tail (t) +# +# Well, that was an interesting mental exercise. I'm not completely +# convinced it will work, nor am I convinced this level of complexity +# is necessary. If you want to exclude RCS or CVS directories, just +# don't bloody include them! + + From 3a5f9618d77b220f7e47e6a2c0204472333a7356 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 13:03:32 +0000 Subject: [PATCH 0083/8469] Added all documentation. Slightly improved the code for dealing with newline on a comment line, and for stripping whitespace. --- text_file.py | 119 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 106 insertions(+), 13 deletions(-) diff --git a/text_file.py b/text_file.py index 2e034301c5..7b29ef4aa5 100644 --- a/text_file.py +++ b/text_file.py @@ -14,6 +14,65 @@ class TextFile: + """Provides a file-like object that takes care of all the things you + commonly want to do when processing a text file that has some + line-by-line syntax: strip comments (as long as "#" is your comment + character), skip blank lines, join adjacent lines by escaping the + newline (ie. backslash at end of line), strip leading and/or + trailing whitespace, and collapse internal whitespace. All of these + are optional and independently controllable. + + Provides a 'warn()' method so you can generate warning messages that + report physical line number, even if the logical line in question + spans multiple physical lines. Also provides 'unreadline()' for + implementing line-at-a-time lookahead. + + Constructor is called as: + + TextFile (filename=None, file=None, **options) + + It bombs (RuntimeError) if both 'filename' and 'file' are None; + 'filename' should be a string, and 'file' a file object (or + something that provides 'readline()' and 'close()' methods). It is + recommended that you supply at least 'filename', so that TextFile + can include it in warning messages. If 'file' is not supplied, + TextFile creates its own using the 'open()' builtin. + + The options are all boolean, and affect the value returned by + 'readline()': + strip_comments [default: true] + strip from "#" to end-of-line, as well as any whitespace + leading up to the "#" -- unless it is escaped by a backslash + lstrip_ws [default: false] + strip leading whitespace from each line before returning it + rstrip_ws [default: true] + strip trailing whitespace (including line terminator!) from + each line before returning it + skip_blanks [default: true} + skip lines that are empty *after* stripping comments and + whitespace. (If both lstrip_ws and rstrip_ws are true, + then some lines may consist of solely whitespace: these will + *not* be skipped, even if 'skip_blanks' is true.) + join_lines [default: false] + if a backslash is the last non-newline character on a line + after stripping comments and whitespace, join the following line + to it to form one "logical line"; if N consecutive lines end + with a backslash, then N+1 physical lines will be joined to + form one logical line. + collapse_ws [default: false] + after stripping comments and whitespace and joining physical + lines into logical lines, all internal whitespace (strings of + whitespace surrounded by non-whitespace characters, and not at + the beginning or end of the logical line) will be collapsed + to a single space. + + Note that since 'rstrip_ws' can strip the trailing newline, the + semantics of 'readline()' must differ from those of the builtin file + object's 'readline()' method! In particular, 'readline()' returns + None for end-of-file: an empty string might just be a blank line (or + an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is + not.""" + default_options = { 'strip_comments': 1, 'skip_blanks': 1, 'join_lines': 0, @@ -23,6 +82,10 @@ class TextFile: } def __init__ (self, filename=None, file=None, **options): + """Construct a new TextFile object. At least one of 'filename' + (a string) and 'file' (a file-like object) must be supplied. + They keyword argument options are described above and affect + the values returned by 'readline()'.""" if filename is None and file is None: raise RuntimeError, \ @@ -56,12 +119,18 @@ def __init__ (self, filename=None, file=None, **options): def open (self, filename): + """Open a new file named 'filename'. This overrides both the + 'filename' and 'file' arguments to the constructor.""" + self.filename = filename self.file = open (self.filename, 'r') self.current_line = 0 def close (self): + """Close the current file and forget everything we know about it + (filename, current line number).""" + self.file.close () self.file = None self.filename = None @@ -69,6 +138,14 @@ def close (self): def warn (self, msg, line=None): + """Print (to stderr) a warning message tied to the current logical + line in the current file. If the current logical line in the + file spans multiple physical lines, the warning refers to the + whole range, eg. "lines 3-5". If 'line' supplied, it overrides + the current line number; it may be a list or tuple to indicate a + range of physical lines, or an integer for a single physical + line.""" + if line is None: line = self.current_line sys.stderr.write (self.filename + ", ") @@ -80,6 +157,15 @@ def warn (self, msg, line=None): def readline (self): + """Read and return a single logical line from the current file (or + from an internal buffer if lines have previously been "unread" + with 'unreadline()'). If the 'join_lines' option is true, this + may involve reading multiple physical lines concatenated into a + single string. Updates the current line number, so calling + 'warn()' after 'readline()' emits a warning about the physical + line(s) just read. Returns None on end-of-file, since the empty + string can occur if 'rstrip_ws' is true but 'strip_blanks' is + not.""" # If any "unread" lines waiting in 'linebuf', return the top # one. (We don't actually buffer read-ahead data -- lines only @@ -111,15 +197,15 @@ def readline (self): if pos == -1: # no "#" -- no comments pass elif pos == 0 or line[pos-1] != "\\": # it's a comment - # Have to preserve the trailing newline; if - # stripping comments resulted in an empty line, we'd - # have no way to distinguish end-of-file! (NB. this - # means that if the final line is all comment and - # has to trailing newline, we will think that it's + + # Have to preserve the trailing newline, because it's + # the job of a later step (rstrip_ws) to remove it -- + # and if rstrip_ws is false, we'd better preserve it! + # (NB. this means that if the final line is all comment + # and has no trailing newline, we will think that it's # EOF; I think that's OK.) - has_newline = (line[-1] == '\n') - line = line[0:pos] - if has_newline: line = line + '\n' + eol = (line[-1] == '\n') and '\n' or '' + line = line[0:pos] + eol else: # it's an escaped "#" line = string.replace (line, "\\#", "#") @@ -156,11 +242,10 @@ def readline (self): # trailing, or one or the other, or neither) if self.lstrip_ws and self.rstrip_ws: line = string.strip (line) - else: - if self.lstrip_ws: - line = string.lstrip (line) - if self.rstrip_ws: - line = string.rstrip (line) + elif self.lstrip_ws: + line = string.lstrip (line) + elif self.rstrip_ws: + line = string.rstrip (line) # blank line (whether we rstrip'ed or not)? skip to next line # if appropriate @@ -187,6 +272,9 @@ def readline (self): def readlines (self): + """Read and return the list of all logical lines remaining in the + current file.""" + lines = [] while 1: line = self.readline() @@ -196,6 +284,10 @@ def readlines (self): def unreadline (self, line): + """Push 'line' (a string) onto an internal buffer that will be + checked by future 'readline()' calls. Handy for implementing + a parser with line-at-a-time lookahead.""" + self.linebuf.append (line) @@ -206,6 +298,7 @@ def unreadline (self, line): continues on next line """ + # result 1: no fancy options result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) From c0b843e02b1e09998d6a56ce259c88c010287b39 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Sep 1999 13:14:27 +0000 Subject: [PATCH 0084/8469] Added 'list_only' option (and modified 'run()' to respect it). --- command/dist.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/command/dist.py b/command/dist.py index 222296f363..3f309745ad 100644 --- a/command/dist.py +++ b/command/dist.py @@ -133,6 +133,8 @@ class Dist (Command): "formats for source distribution (tar, ztar, gztar, or zip)"), ('manifest=', 'm', "name of manifest file"), + ('list-only', 'l', + "just list files that would be distributed"), ] default_format = { 'posix': 'gztar', @@ -144,6 +146,7 @@ class Dist (Command): def set_default_options (self): self.formats = None self.manifest = None + self.list_only = 0 def set_final_options (self): @@ -169,7 +172,12 @@ def run (self): self.find_defaults () self.read_manifest () - self.make_distribution () + if self.list_only: + for f in self.files: + print f + + else: + self.make_distribution () def check_metadata (self): From 7bea18d0ecf34847d08afd9af1a2dc40799d8119 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 20:41:02 +0000 Subject: [PATCH 0085/8469] Slight change to the meaning of the 'libraries' list: if a library name has a directory component, then we only search for the library in that one directory, ie. ignore the 'library_dirs' lists for that one library. Changed calling convention to 'gen_lib_options()' again: now, it takes a CCompiler instance and calls methods on it instead of taking format strings. Also implemented the new "library name" semantics using the 'find_library_file()' method in the CCompiler instance. Added 'force' flag to CCompiler; added to constructor and 'new_compiler()'. Added 'warn()' method. --- ccompiler.py | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index bfbb50faf3..486f03ad04 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -67,10 +67,12 @@ class CCompiler: def __init__ (self, verbose=0, - dry_run=0): + dry_run=0, + force=0): self.verbose = verbose self.dry_run = dry_run + self.force = force # 'output_dir': a common output directory for object, library, # shared object, and shared library files @@ -312,9 +314,19 @@ def link_static_lib (self, 'output_libname' should be a library name, not a filename; the filename will be inferred from the library name. - 'library_dirs', if supplied, should be a list of additional - directories to search on top of the system default and those - supplied to 'add_library_dir()' and/or 'set_library_dirs()'. + 'libraries' is a list of libraries to link against. These are + library names, not filenames, since they're translated into + filenames in a platform-specific way (eg. "foo" becomes + "libfoo.a" on Unix and "foo.lib" on DOS/Windows). However, they + can include a directory component, which means the linker will + look in that specific directory rather than searching all the + normal locations. + + 'library_dirs', if supplied, should be a list of directories to + search for libraries that were specified as bare library names + (ie. no directory component). These are on top of the system + default and those supplied to 'add_library_dir()' and/or + 'set_library_dirs()'. 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except of course that they supply command-line arguments @@ -402,6 +414,9 @@ def announce (self, msg, level=1): if self.verbose >= level: print msg + def warn (self, msg): + sys.stderr.write ("warning: %s\n" % msg) + def spawn (self, cmd): spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) @@ -429,7 +444,8 @@ def move_file (self, src, dst): def new_compiler (plat=None, compiler=None, verbose=0, - dry_run=0): + dry_run=0, + force=0): """Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' @@ -470,7 +486,7 @@ def new_compiler (plat=None, ("can't compile C/C++ code: unable to find class '%s' " + "in module '%s'") % (class_name, module_name) - return klass (verbose, dry_run) + return klass (verbose, dry_run, force) def gen_preprocess_options (macros, includes): @@ -524,20 +540,18 @@ def gen_preprocess_options (macros, includes): # gen_preprocess_options () -def gen_lib_options (library_dirs, libraries, dir_format, lib_format): +def gen_lib_options (compiler, library_dirs, libraries): """Generate linker options for searching library directories and linking with specific libraries. 'libraries' and 'library_dirs' are, respectively, lists of library names (not filenames!) and - search directories. 'lib_format' is a format string with exactly - one "%s", into which will be plugged each library name in turn; - 'dir_format' is similar, but directory names will be plugged into - it. Returns a list of command-line options suitable for use with - some compiler (depending on the two format strings passed in).""" + search directories. Returns a list of command-line options suitable + for use with some compiler (depending on the two format strings + passed in).""" lib_opts = [] for dir in library_dirs: - lib_opts.append (dir_format % dir) + lib_opts.append (compiler.library_dir_option (dir)) # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to @@ -546,7 +560,16 @@ def gen_lib_options (library_dirs, libraries, dir_format, lib_format): # pretty nasty way to arrange your C code. for lib in libraries: - lib_opts.append (lib_format % lib) + (lib_dir, lib_name) = os.path.split (lib) + if lib_dir: + lib_file = compiler.find_library_file ([lib_dir], lib_name) + if lib_file: + lib_opts.append (lib_file) + else: + compiler.warn ("no library file corresponding to " + "'%s' found (skipping)" % lib) + else: + lib_opts.append (compiler.library_option (lib)) return lib_opts From 63c863ce22ff96c294f7e57858730b8a400debc9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 20:45:33 +0000 Subject: [PATCH 0086/8469] Fixed order of link options: object files now precede library stuff. Catch up with changes in 'gen_lib_options()': - change how we call it - added methods 'library_dir_option()', 'library_option()', and 'find_library_file()' that it calls Added 'force' flag and changed compile/link methods to respect it. --- unixccompiler.py | 79 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index f3d9591b4a..8f689196e1 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -62,9 +62,10 @@ class UnixCCompiler (CCompiler): def __init__ (self, verbose=0, - dry_run=0): + dry_run=0, + force=0): - CCompiler.__init__ (self, verbose, dry_run) + CCompiler.__init__ (self, verbose, dry_run, force) self.preprocess_options = None self.compile_options = None @@ -121,9 +122,10 @@ def compile (self, # source and object file, no deep dependency checking involving # header files. Hmmm.) objects = self.object_filenames (sources, output_dir) - skipped = newer_pairwise (sources, objects) - for skipped_pair in skipped: - self.announce ("skipping %s (%s up-to-date)" % skipped_pair) + if not self.force: + skipped = newer_pairwise (sources, objects) + for skipped_pair in skipped: + self.announce ("skipping %s (%s up-to-date)" % skipped_pair) # If anything left to compile, compile it if sources: @@ -202,9 +204,9 @@ def link_shared_object (self, if library_dirs is None: library_dirs = [] - lib_opts = gen_lib_options (self.library_dirs + library_dirs, - self.libraries + libraries, - "-L%s", "-l%s") + lib_opts = gen_lib_options (self, + self.library_dirs + library_dirs, + self.libraries + libraries) if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -213,17 +215,18 @@ def link_shared_object (self, # doesn't look at any of the libraries we might be linking with. # Note that we have to dance around errors comparing timestamps if # we're in dry-run mode (yuck). - try: - newer = newer_group (objects, output_filename) - except OSError: - if self.dry_run: - newer = 1 - else: - raise - - if newer: - ld_args = self.ldflags_shared + lib_opts + \ - objects + ['-o', output_filename] + if not self.force: + try: + newer = newer_group (objects, output_filename) + except OSError: + if self.dry_run: + newer = 1 + else: + raise + + if self.force or newer: + ld_args = self.ldflags_shared + objects + \ + lib_opts + ['-o', output_filename] if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -232,6 +235,10 @@ def link_shared_object (self, else: self.announce ("skipping %s (up-to-date)" % output_filename) + # link_shared_object () + + + # -- Filename-mangling (etc.) methods ------------------------------ def object_filenames (self, source_filenames, output_dir=None): outnames = [] @@ -250,11 +257,41 @@ def shared_object_filename (self, source_filename, output_dir=None): outname = os.path.join (output_dir, outname) return outname + def library_filename (self, libname): - return "lib%s%s" % (libname, self._static_lib_ext ) + return "lib%s%s" % (libname, self._static_lib_ext) def shared_library_filename (self, libname): - return "lib%s%s" % (libname, self._shared_lib_ext ) + return "lib%s%s" % (libname, self._shared_lib_ext) + + + def library_dir_option (self, dir): + return "-L" + dir + + def library_option (self, lib): + return "-l" + lib + + + def find_library_file (self, dirs, lib): + + for dir in dirs: + shared = os.path.join (dir, self.shared_library_filename (lib)) + static = os.path.join (dir, self.library_filename (lib)) + + # We're second-guessing the linker here, with not much hard + # data to go on: GCC seems to prefer the shared library, so I'm + # assuming that *all* Unix C compilers do. And of course I'm + # ignoring even GCC's "-static" option. So sue me. + if os.path.exists (shared): + return shared + elif os.path.exists (static): + return static + + else: + # Oops, didn't find it in *any* of 'dirs' + return None + + # find_library_file () # class UnixCCompiler From dba870e5c21cdf14d45ac7f322c75a59a73d249f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 20:47:52 +0000 Subject: [PATCH 0087/8469] Catch up with changes in 'gen_lib_options()': - change how we call it - added methods 'library_dir_option()', 'library_option()', and 'find_library_file()' that it calls Added 'force' flag; it's automatically "respected", because this class always rebuilds everything! (Which it to say, "force=0" is not respected.) --- msvccompiler.py | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 64b2730713..5ac60b2e47 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -23,9 +23,10 @@ class MSVCCompiler (CCompiler) : def __init__ (self, verbose=0, - dry_run=0): + dry_run=0, + force=0): - CCompiler.__init__ (self, verbose, dry_run) + CCompiler.__init__ (self, verbose, dry_run, force) # XXX This is a nasty dependency to add on something otherwise # pretty clean. move it to build_ext under an nt specific part. @@ -164,9 +165,9 @@ def link_shared_object (self, if library_dirs is None: library_dirs = [] - lib_opts = gen_lib_options (self.library_dirs + library_dirs, - self.libraries + libraries, - "/LIBPATH:%s", "%s.lib") + lib_opts = gen_lib_options (self, + self.library_dirs + library_dirs, + self.libraries + libraries) ld_args = self.ldflags_shared + lib_opts + \ objects + ['/OUT:' + output_filename] @@ -200,6 +201,9 @@ def shared_object_filename (self, source_filename): specified source filename.""" return self._change_extensions( source_filenames, self._shared_lib_ext ) + # XXX ummm... these aren't right, are they? I thought library 'foo' on + # DOS/Windows was to be found in "foo.lib", not "libfoo.lib"! + def library_filename (self, libname): """Return the static library filename corresponding to the specified library name.""" @@ -210,4 +214,25 @@ def shared_library_filename (self, libname): specified library name.""" return "lib%s%s" %( libname, self._shared_lib_ext ) + + def library_dir_option (self, dir): + return "/LIBPATH:" + dir + + def library_option (self, lib): + return self.library_filename (lib) + + + def find_library_file (self, dirs, lib): + + for dir in dirs: + libfile = os.path.join (dir, self.library_filename (lib)) + if os.path.exists (libfile): + return libfile + + else: + # Oops, didn't find it in *any* of 'dirs' + return None + + # find_library_file () + # class MSVCCompiler From 364a45f4e008a7361d45a0fdc9a9161d9710f7db Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 20:48:53 +0000 Subject: [PATCH 0088/8469] Hacked to support the notion of "negative alias" options, to handle -q/--quiet reasonably elegantly. --- fancy_getopt.py | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 125dceb3e1..3df2d1da65 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -21,7 +21,12 @@ # the same as a Python NAME -- except, in the spirit of most GNU # utilities, we use '-' in place of '_'. (The spirit of LISP lives on!) # The similarities to NAME are again not a coincidence... -longopt_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9-]*)$') +longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)' +longopt_re = re.compile (r'^%s$' % longopt_pat) + +# For recognizing "negative alias" options, eg. "quiet=!verbose" +neg_alias_re = re.compile ("^(%s)=!(%s)$" % (longopt_pat, longopt_pat)) + # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). @@ -46,6 +51,7 @@ def fancy_getopt (options, object, args): short2long = {} attr_name = {} takes_arg = {} + neg_alias = {} for option in options: try: @@ -73,7 +79,26 @@ def fancy_getopt (options, object, args): long = long[0:-1] takes_arg[long] = 1 else: - takes_arg[long] = 0 + + # Is option is a "negative alias" for some other option (eg. + # "quiet=!verbose")? + match = neg_alias_re.match (long) + if match: + (alias_from, alias_to) = match.group (1,2) + if not takes_arg.has_key(alias_to) or takes_arg[alias_to]: + raise DistutilsGetoptError, \ + ("option '%s' is a negative alias for '%s', " + + "which either hasn't been defined yet " + + "or takes an argument") % (alias_from, alias_to) + + long = alias_from + neg_alias[long] = alias_to + long_opts[-1] = long + takes_arg[long] = 0 + + else: + takes_arg[long] = 0 + # Now enforce some bondage on the long option name, so we can later # translate it to an attribute name in 'object'. Have to do this a @@ -112,7 +137,11 @@ def fancy_getopt (options, object, args): setattr (object, attr, val) else: if val == '': - setattr (object, attr, 1) + alias = neg_alias.get (opt) + if alias: + setattr (object, attr_name[alias], 0) + else: + setattr (object, attr, 1) else: raise RuntimeError, "getopt lies! (bad value '%s')" % value From ae141dd4aa010194531808f5c954ca947a9dd8b2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 20:50:41 +0000 Subject: [PATCH 0089/8469] Fixed 'mkpath()' to normalize the path right off the bat -- cleans up the code a bit and should make it work under Windows even with trailing backslash. Fixed a couple of docstrings. Added comment about 'make_file()' possibly being redundant and unnecessary. --- util.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index aee95d3668..4f93cd44d5 100644 --- a/util.py +++ b/util.py @@ -37,14 +37,14 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # the creation of the whole path? (quite easy to do the latter since # we're not using a recursive algorithm) + name = os.path.normpath (name) + if os.path.isdir (name): return if PATH_CREATED.get (name): return (head, tail) = os.path.split (name) - if not tail: # in case 'name' has trailing slash - (head, tail) = os.path.split (head) tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir (head): @@ -100,7 +100,6 @@ def newer (source, target): def newer_pairwise (sources, targets): - """Walk two filename lists in parallel, testing if each 'target' is up-to-date relative to its corresponding 'source'. If so, both are deleted from their respective lists. Return a list of tuples @@ -147,6 +146,9 @@ def newer_group (sources, target): # newer_group () +# XXX this isn't used anywhere, and worse, it has the same name as a method +# in Command with subtly different semantics. (This one just has one +# source -> one dest; that one has many sources -> one dest.) Nuke it? def make_file (src, dst, func, args, verbose=0, update_message=None, noupdate_message=None): """Makes 'dst' from 'src' (both filenames) by calling 'func' with @@ -288,7 +290,7 @@ def copy_tree (src, dst, """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it - is created with 'mkpath'. The end result of the copy is that + is created with 'mkpath()'. The end result of the copy is that every file in 'src' is copied to 'dst', and directories under 'src' are recursively copied to 'dst'. Return the list of files copied (under their output names) -- note that if 'update' is true, @@ -413,7 +415,7 @@ def move_file (src, dst, def write_file (filename, contents): - """Create a file with the specified naem and write 'contents' (a + """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it.""" f = open (filename, "w") From bf658c0131376f194bac577d8681e4d8038ae131 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:02:48 +0000 Subject: [PATCH 0090/8469] Added 'force' and 'quiet' (negative alias for 'verbose') to the global options table. Every Command instance now has its own copies of the global options, which automatically fallback to the Distribution instance. Changes: - initialize them in constructor - added '__getattr__()' to handle the fallback logic - changed every 'self.distribution.{verbose,dry_run}' in Command to 'self.{verbose,dry_run}'. - filesystem utility methods ('copy_file()' et al) don't take 'update' parameter anymore -- instead we pass 'not force' to the underlying function as 'update' Changed parsing of command line so that global options apply to all commands as well -- that's how (eg.) Command.verbose will be initialized. Simplified 'make_file()' to use 'newer_group()' (from util module). Deleted some cruft. Some docstring tweaks. --- core.py | 167 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 84 insertions(+), 83 deletions(-) diff --git a/core.py b/core.py index f0c97aa3ca..c9ccd794ed 100644 --- a/core.py +++ b/core.py @@ -106,12 +106,21 @@ class Distribution: those described below.""" - # 'global_options' describes the command-line options that may - # be supplied to the client (setup.py) prior to any actual - # commands. Eg. "./setup.py -nv" or "./setup.py --verbose" - # both take advantage of these global options. - global_options = [('verbose', 'v', "run verbosely"), - ('dry-run', 'n', "don't actually do anything"), + # 'global_options' describes the command-line options that may be + # supplied to the client (setup.py) prior to any actual commands. + # Eg. "./setup.py -nv" or "./setup.py --verbose" both take advantage of + # these global options. This list should be kept to a bare minimum, + # since every global option is also valid as a command option -- and we + # don't want to pollute the commands with too many options that they + # have minimal control over. + global_options = [('verbose', 'v', + "run verbosely"), + ('quiet=!verbose', 'q', + "run quietly (turns verbosity off)"), + ('dry-run', 'n', + "don't actually do anything"), + ('force', 'f', + "skip dependency checking between files"), ] @@ -131,6 +140,7 @@ def __init__ (self, attrs=None): # Default values for our command-line options self.verbose = 0 self.dry_run = 0 + self.force = 0 # And the "distribution meta-data" options -- these can only # come from setup.py (the caller), not the command line @@ -211,23 +221,22 @@ def __init__ (self, attrs=None): def parse_command_line (self, args): - """Parse the client's command line: set any Distribution + """Parse the setup script's command line: set any Distribution attributes tied to command-line options, create all command objects, and set their options from the command-line. 'args' must be a list of command-line arguments, most likely - 'sys.argv[1:]' (see the 'setup()' function). This list is - first processed for "global options" -- options that set - attributes of the Distribution instance. Then, it is - alternately scanned for Distutils command and options for - that command. Each new command terminates the options for - the previous command. The allowed options for a command are - determined by the 'options' attribute of the command object - -- thus, we instantiate (and cache) every command object - here, in order to access its 'options' attribute. Any error - in that 'options' attribute raises DistutilsGetoptError; any - error on the command-line raises DistutilsArgError. If no - Distutils commands were found on the command line, raises - DistutilsArgError.""" + 'sys.argv[1:]' (see the 'setup()' function). This list is first + processed for "global options" -- options that set attributes of + the Distribution instance. Then, it is alternately scanned for + Distutils command and options for that command. Each new + command terminates the options for the previous command. The + allowed options for a command are determined by the 'options' + attribute of the command object -- thus, we instantiate (and + cache) every command object here, in order to access its + 'options' attribute. Any error in that 'options' attribute + raises DistutilsGetoptError; any error on the command-line + raises DistutilsArgError. If no Distutils commands were found + on the command line, raises DistutilsArgError.""" # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -268,7 +277,10 @@ def parse_command_line (self, args): "(a list of tuples)") % \ cmd_obj.__class__ - args = fancy_getopt (cmd_obj.options, cmd_obj, args[1:]) + # Poof! like magic, all commands support the global + # options too, just by adding in 'global_options'. + args = fancy_getopt (self.global_options + cmd_obj.options, + cmd_obj, args[1:]) self.command_obj[command] = cmd_obj self.have_run[command] = 0 @@ -497,6 +509,17 @@ def __init__ (self, dist): self.distribution = dist self.set_default_options () + # Per-command versions of the global flags, so that the user can + # customize Distutils' behaviour command-by-command and let some + # commands fallback on the Distribution's behaviour. None means + # "not defined, check self.distribution's copy", while 0 or 1 mean + # false and true (duh). Note that this means figuring out the real + # value of each flag is a touch complicatd -- hence "self.verbose" + # (etc.) will be handled by __getattr__, below. + self._verbose = None + self._dry_run = None + self._force = None + # 'ready' records whether or not 'set_final_options()' has been # called. 'set_final_options()' itself should not pay attention to # this flag: it is the business of 'ensure_ready()', which always @@ -506,6 +529,17 @@ def __init__ (self, dist): # end __init__ () + def __getattr__ (self, attr): + if attr in ('verbose', 'dry_run', 'force'): + myval = getattr (self, "_" + attr) + if myval is None: + return getattr (self.distribution, attr) + else: + return myval + else: + raise AttributeError, attr + + def ensure_ready (self): if not self.ready: self.set_final_options () @@ -569,7 +603,8 @@ def announce (self, msg, level=1): """If the Distribution instance to which this command belongs has a verbosity level of greater than or equal to 'level' print 'msg' to stdout.""" - if self.distribution.verbose >= level: + + if self.verbose >= level: print msg @@ -720,15 +755,13 @@ def warn (self, msg): def execute (self, func, args, msg=None, level=1): """Perform some action that affects the outside world (eg. by writing to the filesystem). Such actions are special because - they should be disabled by the "dry run" flag (carried around by - the Command's Distribution), and should announce themselves if - the current verbosity level is high enough. This method takes - care of all that bureaucracy for you; all you have to do is - supply the funtion to call and an argument tuple for it (to - embody the "external action" being performed), a message to - print if the verbosity level is high enough, and an optional - verbosity threshold.""" - + they should be disabled by the "dry run" flag, and should + announce themselves if the current verbosity level is high + enough. This method takes care of all that bureaucracy for you; + all you have to do is supply the funtion to call and an argument + tuple for it (to embody the "external action" being performed), + a message to print if the verbosity level is high enough, and an + optional verbosity threshold.""" # Generate a message if we weren't passed one if msg is None: @@ -740,7 +773,7 @@ def execute (self, func, args, msg=None, level=1): self.announce (msg, level) # And do it, as long as we're not in dry-run mode - if not self.distribution.dry_run: + if not self.dry_run: apply (func, args) # execute() @@ -748,43 +781,45 @@ def execute (self, func, args, msg=None, level=1): def mkpath (self, name, mode=0777): util.mkpath (name, mode, - self.distribution.verbose, self.distribution.dry_run) + self.verbose, self.dry_run) def copy_file (self, infile, outfile, - preserve_mode=1, preserve_times=1, update=1, level=1): - """Copy a file respecting verbose and dry-run flags.""" + preserve_mode=1, preserve_times=1, level=1): + """Copy a file respecting verbose, dry-run and force flags.""" return util.copy_file (infile, outfile, preserve_mode, preserve_times, - update, self.distribution.verbose >= level, - self.distribution.dry_run) + not self.force, + self.verbose >= level, + self.dry_run) def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, - update=1, level=1): - """Copy an entire directory tree respecting verbose and dry-run - flags.""" + level=1): + """Copy an entire directory tree respecting verbose, dry-run, + and force flags.""" return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, - update, self.distribution.verbose >= level, - self.distribution.dry_run) + not self.force, + self.verbose >= level, + self.dry_run) def move_file (self, src, dst, level=1): """Move a file respecting verbose and dry-run flags.""" return util.move_file (src, dst, - self.distribution.verbose >= level, - self.distribution.dry_run) + self.verbose >= level, + self.dry_run) def spawn (self, cmd, search_path=1, level=1): from distutils.spawn import spawn spawn (cmd, search_path, - self.distribution.verbose >= level, - self.distribution.dry_run) + self.verbose >= level, + self.dry_run) def make_file (self, infiles, outfile, func, args, @@ -811,29 +846,10 @@ def make_file (self, infiles, outfile, func, args, raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" - # XXX this stuff should probably be moved off to a function - # in 'distutils.util' - from stat import * - - if os.path.exists (outfile): - out_mtime = os.stat (outfile)[ST_MTIME] - - # Loop over all infiles. If any infile is newer than outfile, - # then we'll have to regenerate outfile - for f in infiles: - in_mtime = os.stat (f)[ST_MTIME] - if in_mtime > out_mtime: - runit = 1 - break - else: - runit = 0 - - else: - runit = 1 - - # If we determined that 'outfile' must be regenerated, then + # If 'outfile' must be regenerated (either because it doesn't + # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if runit: + if self.force or newer_group (infiles, outfile): self.execute (func, args, exec_msg, level) # Otherwise, print the "skip" message @@ -842,19 +858,4 @@ def make_file (self, infiles, outfile, func, args, # make_file () - -# def make_files (self, infiles, outfiles, func, args, -# exec_msg=None, skip_msg=None, level=1): - -# """Special case of 'execute()' for operations that process one or -# more input files and generate one or more output files. Works -# just like 'execute()', except the operation is skipped and a -# different message printed if all files listed in 'outfiles' -# already exist and are newer than all files listed in -# 'infiles'.""" - -# pass - - - # end class Command From 5fb0798f6108306b956fbb5628ab020b00b0f570 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:03:26 +0000 Subject: [PATCH 0091/8469] Tweaked verbosity messages for byte-compilation. --- command/install_lib.py | 4 ++-- command/install_py.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 978bb3b958..35deaa812f 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -66,8 +66,8 @@ def run (self): out_fn = string.replace (f, '.py', '.pyc') self.make_file (f, out_fn, compile, (f,), - "compiling %s -> %s" % (f, out_fn), - "compilation of %s skipped" % f) + "byte-compiling %s" % f, + "byte-compilation of %s skipped" % f) # XXX ignore self.optimize for now, since we don't really know if # we're compiling optimally or not, and couldn't pick what to do diff --git a/command/install_py.py b/command/install_py.py index 978bb3b958..35deaa812f 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -66,8 +66,8 @@ def run (self): out_fn = string.replace (f, '.py', '.pyc') self.make_file (f, out_fn, compile, (f,), - "compiling %s -> %s" % (f, out_fn), - "compilation of %s skipped" % f) + "byte-compiling %s" % f, + "byte-compilation of %s skipped" % f) # XXX ignore self.optimize for now, since we don't really know if # we're compiling optimally or not, and couldn't pick what to do From c83db037302c04d9b2510552bcc4e75d5bf6a2ee Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:07:21 +0000 Subject: [PATCH 0092/8469] Don't import what we don't use. --- command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 3a7a43bb1e..4067ca4cd6 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -12,7 +12,7 @@ from distutils.core import Command from distutils.errors import * -from distutils.util import mkpath, newer, make_file, copy_file +from distutils.util import mkpath, copy_file class BuildPy (Command): From 04b548270ee36bdff4114fc797e84025925a0ef4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:08:42 +0000 Subject: [PATCH 0093/8469] Pass 'force' flag to 'new_compiler()'. --- command/build_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8c5065f6bc..f284092b3e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -121,8 +121,9 @@ def run (self): # Setup the CCompiler object that we'll use to do all the # compiling and linking self.compiler = new_compiler (plat=os.environ.get ('PLAT'), - verbose=self.distribution.verbose, - dry_run=self.distribution.dry_run) + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) if self.include_dirs is not None: self.compiler.set_include_dirs (self.include_dirs) if self.define is not None: From 95fff421e1c4f3293d15344a07f2361e4742b5b4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 3 Oct 1999 21:09:14 +0000 Subject: [PATCH 0094/8469] Filter 'glob()' results so we only look at regular files. --- command/dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/dist.py b/command/dist.py index 3f309745ad..99a05225bf 100644 --- a/command/dist.py +++ b/command/dist.py @@ -220,7 +220,7 @@ def find_defaults (self): optional = ['test/test*.py'] for pattern in optional: - files = glob (pattern) + files = filter (os.path.isfile, glob (pattern)) if files: self.files.extend (files) @@ -338,7 +338,7 @@ def read_manifest (self): # Single word, no bang: it's a "simple include pattern" elif not exclude: - matches = glob (pattern) + matches = filter (os.path.isfile, glob (pattern)) if matches: self.files.extend (matches) else: From 97cc7bbe9d4650bac48da8831dd70d987fb4562e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Oct 1999 19:06:20 +0000 Subject: [PATCH 0095/8469] Fix how we run 'zip' -- give explicit .zip extension. --- command/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/dist.py b/command/dist.py index 99a05225bf..959413f49c 100644 --- a/command/dist.py +++ b/command/dist.py @@ -405,7 +405,7 @@ def make_zipfile (self, base_dir): # on Redmond's archaic CP/M knockoff is nowadays), but I'll let # someone who can actually test it do that. - self.spawn (["zip", "-r", base_dir, base_dir]) + self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) def make_distribution (self): From d2649fd50531766567cef19ae50a6760f411cf9b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Oct 1999 19:06:56 +0000 Subject: [PATCH 0096/8469] Qualified use of 'newer_group' function. --- core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.py b/core.py index c9ccd794ed..23fc3ccad0 100644 --- a/core.py +++ b/core.py @@ -849,7 +849,7 @@ def make_file (self, infiles, outfile, func, args, # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if self.force or newer_group (infiles, outfile): + if self.force or util.newer_group (infiles, outfile): self.execute (func, args, exec_msg, level) # Otherwise, print the "skip" message From 78805a7cc9ab2cf178276ca4b84b1d61ad29a6f5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Oct 1999 19:10:59 +0000 Subject: [PATCH 0097/8469] Removed massive comment speculating about needlessly complex variations on the manifest file syntax. --- command/dist.py | 139 ------------------------------------------------ 1 file changed, 139 deletions(-) diff --git a/command/dist.py b/command/dist.py index 959413f49c..57db1d78dd 100644 --- a/command/dist.py +++ b/command/dist.py @@ -457,142 +457,3 @@ def findall (dir = os.curdir): list.sort() return list - - - - - -# ====================================================================== -# Here follows some extensive mental masturbation about how to -# make the manifest file and search algorithm even more complex. -# I think this is all gratuitous, really. - -# Hmm, something extra: want to apply an exclude pattern over a whole -# subtree without necessarily having to explicitly include files from it, -# ie. it should apply after gathering files by other means (simple -# include pattern) -# . !*~ !*.bak !#*# -# and we also want to prune at certain directories: -# . !RCS !CVS -# which again should apply globally. -# -# possible solution: -# - exclude pattern in a directory applies to all files found under that -# directory -# - subdirectories that match an exclude pattern will be pruned -# - hmmm, to be consistent, subdirectories that match an include -# pattern should be recursively included -# - and this should apply to "simple" patterns too -# -# thus: -# -# examples/ -# -# means get everything in examples/ and all subdirs; -# -# examples/ !*~ !#*# !*.py[co] -# -# means get everything under examples/ except files matching those three globs; -# -# ./ !RCS !CVS -# -# means get everything under current dir, but prune RCS/CVS directories; -# -# ./ !*~ !#*# !*.py[co] !RCS !CVS -# ! build/ -# ! experimental/ -# -# means get everything under the distribution directory except the usual -# excludes at all levels; exclude "build" and "experimental" under the -# distribution dir only. -# -# Do the former examples still work? -# -# distutils/ *.py -# ! distutils/bleeding_edge.py -# -# means all .py files recursively found under distutils, except for the one -# explicitly named. -# -# distutils/ *.py !bleeding_edge.py -# -# means the same, except bleeding_edge.py will be excluded wherever it's -# found -- thus this can exclude up to one file per directory under -# distutils. -# -# distutils/*.py -# ! distutils/bleeding_edge.py -# -# gets exactly distutils/*.py, minus the one explicitly mentioned exclude, and -# -# distutils/*.py -# distutils/ !bleeding_edge.py -# -# coincidentally does the same, but only because there can only be one file -# that matches the exclude pattern. Oh, we'd still like -# -# distutils *.py !bleeding*.py -# distutils/bleeding_ledge.py -# -# to include distutils/bleeding_ledge.py -- i.e. it should override the -# earlier exclude pattern by virtue of appearing later in the manifest. Does -# this conflict with the above requirements, ie. that "!RCS" and "!*~" should -# apply everywhere? Hmm, I think it doesn't have to, as long as we're smart -# about it. Consequence: -# -# . !RCS !CVS -# distutils * -# -# will go ahead and include RCS and CVS files under distutils, but -# -# distutils * -# . !RCS !CVS -# -# will do the right thing. Hmmm. I think that's OK, and an inevitable -# consequence of the ability to override exclusions. - -# OK, new crack at the search algorithm. -# -# for pattern in manifest: -# if dir-pattern: # ie. first word is a directory (incl. "."!) -# dir = first word on line -# patterns = rest of line -# if patterns: -# for dpattern in patterns: -# if exclude-pattern: -# remove from files anything matching dpattern (including pruning -# subtrees rooted at directories that match dpattern) -# else: -# files.append (recursive_glob (dir, dpattern)) -# else: -# files.append (recursive_glob (dir, '*') -# -# elif include-pattern: # it's a "simple include pattern" -# files.append (glob (pattern)) -# -# else: # it's a "simple exclude pattern" -# remove from files anything matching pattern - -# The two removal algorithms might be a bit tricky: -# -# "remove simple exclude pattern": -# for f in files: -# if f matches pattern: -# delete it -# -# "remove recursive exclude pattern": -# for f in files: -# -# t = tail (f) -# while t: -# if t matches pattern: -# delete current file -# continue -# t = tail (t) -# -# Well, that was an interesting mental exercise. I'm not completely -# convinced it will work, nor am I convinced this level of complexity -# is necessary. If you want to exclude RCS or CVS directories, just -# don't bloody include them! - - From 86d2c36a34934224784e597575f6d33bf0e426b4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Oct 1999 19:25:05 +0000 Subject: [PATCH 0098/8469] Don't assume GNU tar -- generate tar file and compress in separate steps. Now supports the full range of intended formats (tar, ztar, gztar, zip). "-f" no longer a short option for "--formats" -- conflicts with new global option "--force"! --- command/dist.py | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/command/dist.py b/command/dist.py index 57db1d78dd..abbd625b51 100644 --- a/command/dist.py +++ b/command/dist.py @@ -129,7 +129,7 @@ class Dist (Command): - options = [('formats=', 'f', + options = [('formats=', None, "formats for source distribution (tar, ztar, gztar, or zip)"), ('manifest=', 'm', "name of manifest file"), @@ -385,17 +385,23 @@ def make_release_tree (self, base_dir, files): # make_release_tree () - def make_tarball (self, base_dir): + def make_tarball (self, base_dir, compress="gzip"): # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- but - # it would be nice to take advantage of it to skip the "create a - # tree of hardlinks" step! + # It's pretty new, though, so we certainly can't require it -- + # but it would be nice to take advantage of it to skip the + # "create a tree of hardlinks" step! (Would also be nice to + # detect GNU tar to use its 'z' option and save a step.) - # But I am a lazy bastard, so I require GNU tar anyways. + if compress is not None and compress not in ('gzip', 'compress'): + raise ValueError, \ + "if given, 'compress' must be 'gzip' or 'compress'" - archive_name = base_dir + ".tar.gz" - self.spawn (["tar", "-czf", archive_name, base_dir]) + archive_name = base_dir + ".tar" + self.spawn (["tar", "-cf", archive_name, base_dir]) + + if compress: + self.spawn ([compress, archive_name]) def make_zipfile (self, base_dir): @@ -425,10 +431,15 @@ def make_distribution (self): self.exclude_files (base_dir + "*") self.make_release_tree (base_dir, self.files) - if 'gztar' in self.formats: - self.make_tarball (base_dir) - if 'zip' in self.formats: - self.make_zipfile (base_dir) + for fmt in self.formats: + if fmt == 'gztar': + self.make_tarball (base_dir, compress='gzip') + elif fmt == 'ztar': + self.make_tarball (base_dir, compress='compress') + elif fmt == 'tar': + self.make_tarball (base_dir, compress=None) + elif fmt == 'zip': + self.make_zipfile (base_dir) # class Dist From 2bfd1886680134fd1e76d6260abd7388c35079ca Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 3 Dec 1999 16:18:56 +0000 Subject: [PATCH 0099/8469] [from 1999-11-04] Bunch of little bug fixes that appeared in building non-packagized distributions. Mainly: - brain-slip typo in 'get_package_dir()' - don't try to os.path.join() an empty path tuple -- it doesn't like it - more type-safety in 'build_module()' --- command/build_py.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 4067ca4cd6..b3cc1e95cc 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -93,12 +93,15 @@ def get_package_dir (self, package): if type (package) is StringType: path = string.split (package, '.') elif type (package) in (TupleType, ListType): - path = list (path) + path = list (package) else: raise TypeError, "'package' must be a string, list, or tuple" if not self.package_dir: - return apply (os.path.join, path) + if path: + return apply (os.path.join, path) + else: + return '' else: tail = [] while path: @@ -113,7 +116,10 @@ def get_package_dir (self, package): else: # arg! everything failed, we might as well have not even # looked in package_dir -- oh well - return apply (os.path.join, tail) + if tail: + return apply (os.path.join, tail) + else: + return '' # get_package_dir () @@ -134,7 +140,7 @@ def check_package (self, package, package_dir): "but is not a directory") % package_dir # Require __init__.py for all but the "root package" - if package != "": + if package: init_py = os.path.join (package_dir, "__init__.py") if not os.path.isfile (init_py): self.warn (("package init file '%s' not found " + @@ -233,11 +239,14 @@ def build_module (self, module, module_file, package): if type (package) is StringType: package = string.split (package, '.') + elif type (package) not in (ListType, TupleType): + raise TypeError, \ + "'package' must be a string (dot-separated), list, or tuple" # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_dir (the build # directory for Python source). - outfile_path = package + outfile_path = list (package) outfile_path.append (module + ".py") outfile_path.insert (0, self.build_dir) outfile = apply (os.path.join, outfile_path) From 948163cdcbc541ae0bd3f7af825adad6062cb0e5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 16:51:44 +0000 Subject: [PATCH 0100/8469] Made "verbose" mode the default; now you have to supply --quiet if you want no output. Still no option for a happy medium though. Added "--help" global option. Changed 'parse_command_line()' to recognize help options (both for the whole distribution and per-command), and to distinguish "regular run" and "user asked for help" by returning false in the latter case. Also in 'parse_command_line()', detect invalid command name on command line by catching DistutilsModuleError. a 'negative_opt' class attribute right after 'global_options'; changed how we call 'fancy_getopt()' accordingly. Initialize 'maintainer' and 'maintainer_email' attributes to Distribution to avoid AttributeError when 'author' and 'author_email' not defined. Initialize 'help' attribute in Command constructor (to avoid AttributeError when user *doesn't* ask for help). In 'setup()': * show usage message before dying when we catch DistutilsArgError * only run commands if 'parse_command_line()' returned true (that way, we exit immediately when a help option is found) * catch KeyboardInterrupt and IOError from running commands Bulked up usage message to show --help options. Comment, docstring, and error message tweaks. --- core.py | 93 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 18 deletions(-) diff --git a/core.py b/core.py index 23fc3ccad0..13bf9c7fcb 100644 --- a/core.py +++ b/core.py @@ -13,19 +13,25 @@ import sys, os import string, re from types import * +from copy import copy from distutils.errors import * -from distutils.fancy_getopt import fancy_getopt +from distutils.fancy_getopt import fancy_getopt, print_help from distutils import util -# This is not *quite* the same as a Python NAME; I don't allow leading -# underscores. The fact that they're very similar is no coincidence... +# Regex to define acceptable Distutils command names. This is not *quite* +# the same as a Python NAME -- I don't allow leading underscores. The fact +# that they're very similar is no coincidence; the default naming scheme is +# to look for a Python module named after the command. command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') # Defining this as a global is probably inadequate -- what about # listing the available options (or even commands, which can vary # quite late as well) -usage = '%s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]' % sys.argv[0] - +usage = """\ +usage: %s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] + or: %s --help + or: %s cmd --help +""" % (sys.argv[0], sys.argv[0], sys.argv[0]) def setup (**attrs): @@ -79,12 +85,20 @@ def setup (**attrs): # Parse the command line; any command-line errors are the end-users # fault, so turn them into SystemExit to suppress tracebacks. try: - dist.parse_command_line (sys.argv[1:]) + ok = dist.parse_command_line (sys.argv[1:]) except DistutilsArgError, msg: + sys.stderr.write (usage + "\n") raise SystemExit, msg # And finally, run all the commands found on the command line. - dist.run_commands () + if ok: + try: + dist.run_commands () + except KeyboardInterrupt: + raise SystemExit, "interrupted" + except IOError, exc: + # is this 1.5.2-specific? 1.5-specific? + raise SystemExit, "error: %s: %s" % (exc.filename, exc.strerror) # setup () @@ -114,14 +128,17 @@ class Distribution: # don't want to pollute the commands with too many options that they # have minimal control over. global_options = [('verbose', 'v', - "run verbosely"), - ('quiet=!verbose', 'q', + "run verbosely (default)"), + ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('force', 'f', "skip dependency checking between files"), + ('help', 'h', + "show this help message"), ] + negative_opt = {'quiet': 'verbose'} # -- Creation/initialization methods ------------------------------- @@ -138,17 +155,20 @@ def __init__ (self, attrs=None): command objects by 'parse_command_line()'.""" # Default values for our command-line options - self.verbose = 0 + self.verbose = 1 self.dry_run = 0 self.force = 0 + self.help = 0 # And the "distribution meta-data" options -- these can only # come from setup.py (the caller), not the command line - # (or a hypothetical config file).. + # (or a hypothetical config file). self.name = None self.version = None self.author = None self.author_email = None + self.maintainer = None + self.maintainer_email = None self.url = None self.licence = None self.description = None @@ -236,7 +256,11 @@ def parse_command_line (self, args): 'options' attribute. Any error in that 'options' attribute raises DistutilsGetoptError; any error on the command-line raises DistutilsArgError. If no Distutils commands were found - on the command line, raises DistutilsArgError.""" + on the command line, raises DistutilsArgError. Return true if + command-line successfully parsed and we should carry on with + executing commands; false if no errors but we shouldn't execute + commands (currently, this only happens if user asks for + help).""" # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -246,7 +270,14 @@ def parse_command_line (self, args): # happen until we know what the command is. self.commands = [] - args = fancy_getopt (self.global_options, self, sys.argv[1:]) + args = fancy_getopt (self.global_options, self.negative_opt, + self, sys.argv[1:]) + + if self.help: + print_help (self.global_options, header="Global options:") + print + print usage + return while args: # Pull the current command from the head of the command line @@ -258,7 +289,10 @@ def parse_command_line (self, args): # Make sure we have a command object to put the options into # (this either pulls it out of a cache of command objects, # or finds and instantiates the command class). - cmd_obj = self.find_command_obj (command) + try: + cmd_obj = self.find_command_obj (command) + except DistutilsModuleError, msg: + raise DistutilsArgError, msg # Require that the command class be derived from Command -- # that way, we can be sure that we at least have the 'run' @@ -279,8 +313,24 @@ def parse_command_line (self, args): # Poof! like magic, all commands support the global # options too, just by adding in 'global_options'. - args = fancy_getopt (self.global_options + cmd_obj.options, + negative_opt = self.negative_opt + if hasattr (cmd_obj, 'negative_opt'): + negative_opt = copy (negative_opt) + negative_opt.update (cmd_obj.negative_opt) + + options = self.global_options + cmd_obj.options + args = fancy_getopt (options, negative_opt, cmd_obj, args[1:]) + if cmd_obj.help: + print_help (self.global_options, + header="Global options:") + print + print_help (cmd_obj.options, + header="Options for '%s' command:" % command) + print + print usage + return + self.command_obj[command] = cmd_obj self.have_run[command] = 0 @@ -288,9 +338,11 @@ def parse_command_line (self, args): # Oops, no commands found -- an end-user error if not self.commands: - sys.stderr.write (usage + "\n") raise DistutilsArgError, "no commands supplied" + # All is well: return true + return 1 + # parse_command_line() @@ -318,7 +370,7 @@ class from it, and returns the class object. module = sys.modules[module_name] except ImportError: raise DistutilsModuleError, \ - "invalid command '%s' (no module named %s)" % \ + "invalid command '%s' (no module named '%s')" % \ (command, module_name) try: @@ -359,7 +411,8 @@ def find_command_obj (self, command, create=1): 'create_command_obj()'. If none found, the action taken depends on 'create': if true (the default), create a new command object by calling 'create_command_obj()' and return - it; otherwise, return None.""" + it; otherwise, return None. If 'command' is an invalid + command name, then DistutilsModuleError will be raised.""" cmd_obj = self.command_obj.get (command) if not cmd_obj and create: @@ -520,6 +573,10 @@ def __init__ (self, dist): self._dry_run = None self._force = None + # The 'help' flag is just used for command-line parsing, so + # none of that complicated bureaucracy is needed. + self.help = 0 + # 'ready' records whether or not 'set_final_options()' has been # called. 'set_final_options()' itself should not pay attention to # this flag: it is the business of 'ensure_ready()', which always From 8fa8e3f254c307213ed4ebd194454e144578cd64 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 16:54:55 +0000 Subject: [PATCH 0101/8469] Added support for printing out help text from option table: 'print_help()', 'generate_help()', 'wrap_text()' functions, and a little tiny test of 'wrap_text()'. Changed how caller states that one option is the boolean opposite of another: added 'negative_opt' parameter to 'fancy_getopt()', and changed to use it instead of parsing long option name. --- fancy_getopt.py | 183 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 171 insertions(+), 12 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 3df2d1da65..86e9f326ad 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -12,7 +12,7 @@ __rcsid__ = "$Id$" -import string, re +import sys, string, re from types import * import getopt from distutils.errors import * @@ -33,7 +33,7 @@ longopt_xlate = string.maketrans ('-', '_') -def fancy_getopt (options, object, args): +def fancy_getopt (options, negative_opt, object, args): # The 'options' table is a list of 3-tuples: # (long_option, short_option, help_string) @@ -51,7 +51,6 @@ def fancy_getopt (options, object, args): short2long = {} attr_name = {} takes_arg = {} - neg_alias = {} for option in options: try: @@ -81,18 +80,15 @@ def fancy_getopt (options, object, args): else: # Is option is a "negative alias" for some other option (eg. - # "quiet=!verbose")? - match = neg_alias_re.match (long) - if match: - (alias_from, alias_to) = match.group (1,2) + # "quiet" == "!verbose")? + alias_to = negative_opt.get(long) + if alias_to is not None: if not takes_arg.has_key(alias_to) or takes_arg[alias_to]: raise DistutilsGetoptError, \ ("option '%s' is a negative alias for '%s', " + "which either hasn't been defined yet " + - "or takes an argument") % (alias_from, alias_to) + "or takes an argument") % (long, alias_to) - long = alias_from - neg_alias[long] = alias_to long_opts[-1] = long takes_arg[long] = 0 @@ -137,7 +133,7 @@ def fancy_getopt (options, object, args): setattr (object, attr, val) else: if val == '': - alias = neg_alias.get (opt) + alias = negative_opt.get (opt) if alias: setattr (object, attr_name[alias], 0) else: @@ -149,4 +145,167 @@ def fancy_getopt (options, object, args): return args -# end fancy_getopt() +# fancy_getopt() + + +WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace)) + +def wrap_text (text, width): + + if text is None: + return [] + if len (text) <= width: + return [text] + + text = string.expandtabs (text) + text = string.translate (text, WS_TRANS) + chunks = re.split (r'( +|-+)', text) + chunks = filter (None, chunks) # ' - ' results in empty strings + lines = [] + + while chunks: + + cur_line = [] # list of chunks (to-be-joined) + cur_len = 0 # length of current line + + while chunks: + l = len (chunks[0]) + if cur_len + l <= width: # can squeeze (at least) this chunk in + cur_line.append (chunks[0]) + del chunks[0] + cur_len = cur_len + l + else: # this line is full + # drop last chunk if all space + if cur_line and cur_line[-1][0] == ' ': + del cur_line[-1] + break + + if chunks: # any chunks left to process? + + # if the current line is still empty, then we had a single + # chunk that's too big too fit on a line -- so we break + # down and break it up at the line width + if cur_len == 0: + cur_line.append (chunks[0][0:width]) + chunks[0] = chunks[0][width:] + + # all-whitespace chunks at the end of a line can be discarded + # (and we know from the re.split above that if a chunk has + # *any* whitespace, it is *all* whitespace) + if chunks[0][0] == ' ': + del chunks[0] + + # and store this line in the list-of-all-lines -- as a single + # string, of course! + lines.append (string.join (cur_line, '')) + + # while chunks + + return lines + +# wrap_text () + + +def generate_help (options, header=None): + """Generate help text (a list of strings, one per suggested line of + output) from an option table.""" + + # Blithely assume the option table is good: probably wouldn't call + # 'generate_help()' unless you've already called 'fancy_getopt()'. + + # First pass: determine maximum length of long option names + max_opt = 0 + for option in options: + long = option[0] + short = option[1] + l = len (long) + if long[-1] == '=': + l = l - 1 + if short is not None: + l = l + 5 # " (-x)" where short == 'x' + if l > max_opt: + max_opt = l + + opt_width = max_opt + 2 + 2 + 2 # room for indent + dashes + gutter + + # Typical help block looks like this: + # --foo controls foonabulation + # Help block for longest option looks like this: + # --flimflam set the flim-flam level + # and with wrapped text: + # --flimflam set the flim-flam level (must be between + # 0 and 100, except on Tuesdays) + # Options with short names will have the short name shown (but + # it doesn't contribute to max_opt): + # --foo (-f) controls foonabulation + # If adding the short option would make the left column too wide, + # we push the explanation off to the next line + # --flimflam (-l) + # set the flim-flam level + # Important parameters: + # - 2 spaces before option block start lines + # - 2 dashes for each long option name + # - min. 2 spaces between option and explanation (gutter) + # - 5 characters (incl. space) for short option name + + # Now generate lines of help text. + line_width = 78 # if 80 columns were good enough for + text_width = line_width - opt_width # Jesus, then 78 are good enough for me + big_indent = ' ' * opt_width + if header: + lines = [header] + else: + lines = ['Option summary:'] + + for (long,short,help) in options: + + text = wrap_text (help, text_width) + if long[-1] == '=': + long = long[0:-1] + + # Case 1: no short option at all (makes life easy) + if short is None: + if text: + lines.append (" --%-*s %s" % (max_opt, long, text[0])) + else: + lines.append (" --%-*s " % (max_opt, long)) + + for l in text[1:]: + lines.append (big_indent + l) + + # Case 2: we have a short option, so we have to include it + # just after the long option + else: + opt_names = "%s (-%s)" % (long, short) + if text: + lines.append (" --%-*s %s" % + (max_opt, opt_names, text[0])) + else: + lines.append (" --%-*s" % opt_names) + + # for loop over options + + return lines + +# generate_help () + + +def print_help (options, file=None, header=None): + if file is None: + file = sys.stdout + for line in generate_help (options, header): + file.write (line + "\n") +# print_help () + + +if __name__ == "__main__": + text = """\ +Tra-la-la, supercalifragilisticexpialidocious. +How *do* you spell that odd word, anyways? +(Someone ask Mary -- she'll know [or she'll +say, "How should I know?"].)""" + + for w in (10, 20, 30, 40): + print "width: %d" % w + print string.join (wrap_text (text, w), "\n") + print From 6b3ff9eef6bd4d9f99572022a776b7874097466b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 16:57:47 +0000 Subject: [PATCH 0102/8469] In 'compile()' method, renamed 'includes' parameter to 'include_dirs' for consistency with 'build_ext' command option. Changed 'compile()' and 'link_shared_object()' so 'include_dirs', 'libraries', and 'library_dirs' can be lists or tuples. --- unixccompiler.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 8f689196e1..edff4f0a0e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -92,7 +92,7 @@ def compile (self, sources, output_dir=None, macros=None, - includes=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): @@ -100,18 +100,19 @@ def compile (self, output_dir = self.output_dir if macros is None: macros = [] - if includes is None: - includes = [] + if include_dirs is None: + include_dirs = [] if type (macros) is not ListType: raise TypeError, \ "'macros' (if supplied) must be a list of tuples" - if type (includes) is not ListType: + if type (include_dirs) not in (ListType, TupleType): raise TypeError, \ - "'includes' (if supplied) must be a list of strings" + "'include_dirs' (if supplied) must be a list of strings" + include_dirs = list (include_dirs) pp_opts = gen_preprocess_options (self.macros + macros, - self.include_dirs + includes) + self.include_dirs + include_dirs) # So we can mangle 'sources' without hurting the caller's data orig_sources = sources @@ -204,6 +205,15 @@ def link_shared_object (self, if library_dirs is None: library_dirs = [] + if type (libraries) not in (ListType, TupleType): + raise TypeError, \ + "'libraries' (if supplied) must be a list of strings" + if type (library_dirs) not in (ListType, TupleType): + raise TypeError, \ + "'library_dirs' (if supplied) must be a list of strings" + libraries = list (libraries) + library_dirs = list (library_dirs) + lib_opts = gen_lib_options (self, self.library_dirs + library_dirs, self.libraries + libraries) From c2cadc8e316e5b60fb44864110d970f068e977b2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 17:01:01 +0000 Subject: [PATCH 0103/8469] Changed 'build_extensions()' so 'sources' can be a list or tuple; and call CCompiler method 'compile()' with 'include_dirs' not 'includes'. Fixed stupid typo in 'get_source_files()'. --- command/build_ext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index f284092b3e..d38cb18b5c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -179,7 +179,7 @@ def get_source_files (self): filenames = [] # Wouldn't it be neat if we knew the names of header files too... - for (extension_name, build_info) in extensions: + for (extension_name, build_info) in self.extensions: sources = build_info.get ('sources') if type (sources) in (ListType, TupleType): filenames.extend (sources) @@ -191,10 +191,11 @@ def build_extensions (self, extensions): for (extension_name, build_info) in extensions: sources = build_info.get ('sources') - if sources is None or type (sources) is not ListType: + if sources is None or type (sources) not in (ListType, TupleType): raise DistutilsValueError, \ "in ext_modules option, 'sources' must be present " + \ "and must be a list of source filenames" + sources = list (sources) # First step: compile the source code to object files. This # drops the object files in the current directory, regardless @@ -205,7 +206,7 @@ def build_extensions (self, extensions): include_dirs = build_info.get ('include_dirs') self.compiler.compile (sources, macros=macros, - includes=include_dirs) + include_dirs=include_dirs) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things From 749d2ea556fa8790ab5c5188aa163ba170b07dee Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 17:03:59 +0000 Subject: [PATCH 0104/8469] Fixed 'find_package_modules()' to ensure that we never build (and thus install) the setup script itself. Fixed 'build_module()' so we do *not* preserve file mode (which means we can install read-only files, which makes the next installation of this distribution fail -- at least under Unix); added a comment explaining this. --- command/build_py.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index b3cc1e95cc..6bc5aa8007 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -6,7 +6,7 @@ __rcsid__ = "$Id$" -import string, os +import sys, string, os from types import * from glob import glob @@ -40,11 +40,21 @@ def set_final_options (self): def run (self): - # XXX copy_file by default preserves all stat info -- mode, atime, - # and mtime. IMHO this is the right thing to do, but perhaps it - # should be an option -- in particular, a site administrator might - # want installed files to reflect the time of installation rather - # than the last modification time before the installed release. + # XXX copy_file by default preserves atime and mtime. IMHO this is + # the right thing to do, but perhaps it should be an option -- in + # particular, a site administrator might want installed files to + # reflect the time of installation rather than the last + # modification time before the installed release. + + # XXX copy_file by default preserves mode, which appears to be the + # wrong thing to do: if a file is read-only in the working + # directory, we want it to be installed read/write so that the next + # installation of the same module distribution can overwrite it + # without problems. (This might be a Unix-specific issue.) Thus + # we turn off 'preserve_mode' when copying to the build directory, + # since the build directory is supposed to be exactly what the + # installation will look like (ie. we preserve mode when + # installing). # XXX copy_file does *not* preserve MacOS-specific file metadata. # If this is a problem for building/installing Python modules, then @@ -73,7 +83,7 @@ def run (self): if self.modules and self.packages: raise DistutilsOptionError, \ "build_py: supplying both 'packages' and 'modules' " + \ - "options not allowed" + "options is not allowed" # Now we're down to two cases: 'modules' only and 'packages' only. if self.modules: @@ -81,7 +91,6 @@ def run (self): else: self.build_packages () - # run () @@ -162,9 +171,13 @@ def check_module (self, module, module_file): def find_package_modules (self, package, package_dir): module_files = glob (os.path.join (package_dir, "*.py")) module_pairs = [] + setup_script = os.path.abspath (sys.argv[0]) + for f in module_files: - module = os.path.splitext (os.path.basename (f))[0] - module_pairs.append (module, f) + abs_f = os.path.abspath (f) + if abs_f != setup_script: + module = os.path.splitext (os.path.basename (f))[0] + module_pairs.append ((module, f)) return module_pairs @@ -253,7 +266,7 @@ def build_module (self, module, module_file, package): dir = os.path.dirname (outfile) self.mkpath (dir) - self.copy_file (module_file, outfile) + self.copy_file (module_file, outfile, preserve_mode=0) def build_modules (self): From a65fd32d4d8280c553b631c6407010b271634468 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 17:07:22 +0000 Subject: [PATCH 0105/8469] Catch missing MANIFEST file and warn rather than blowing up. Added 'nuke_release_tree()' method to blow away the directory from which the archive file(s) are created, and call it (conditionally) from 'make_distribution()'. Added 'keep_tree' option (false by default) to disable the call to 'nuke_release_tree()'. --- command/dist.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/command/dist.py b/command/dist.py index abbd625b51..cdd4dfc8cc 100644 --- a/command/dist.py +++ b/command/dist.py @@ -10,6 +10,7 @@ import fnmatch from types import * from glob import glob +from shutil import rmtree from distutils.core import Command from distutils.text_file import TextFile @@ -135,6 +136,9 @@ class Dist (Command): "name of manifest file"), ('list-only', 'l', "just list files that would be distributed"), + ('keep-tree', 'k', + "keep the distribution tree around after creating " + + "archive file(s)"), ] default_format = { 'posix': 'gztar', @@ -147,6 +151,7 @@ def set_default_options (self): self.formats = None self.manifest = None self.list_only = 0 + self.keep_tree = 0 def set_final_options (self): @@ -202,8 +207,8 @@ def check_metadata (self): self.warn ("missing meta-data: if 'maintainer' supplied, " + "'maintainer_email' must be supplied too") else: - self.warn ("missing meta-data: either author (and author_email) " + - "or maintainer (and maintainer_email) " + + self.warn ("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + "must be supplied") # check_metadata () @@ -296,7 +301,18 @@ def read_manifest (self): # README, setup script, ...) assert self.files is not None - manifest = self.open_manifest (self.manifest) + try: + manifest = self.open_manifest (self.manifest) + except IOError, exc: + if type (exc) is InstanceType and hasattr (exc, 'strerror'): + msg = "could not open MANIFEST (%s)" % \ + string.lower (exc.strerror) + else: + msg = "could not open MANIFST" + + self.warn (msg + ": using default file list") + return + while 1: pattern = manifest.readline() @@ -385,6 +401,11 @@ def make_release_tree (self, base_dir, files): # make_release_tree () + def nuke_release_tree (self, base_dir): + self.execute (rmtree, (base_dir,), + "removing %s" % base_dir) + + def make_tarball (self, base_dir, compress="gzip"): # XXX GNU tar 1.13 has a nifty option to add a prefix directory. @@ -441,6 +462,9 @@ def make_distribution (self): elif fmt == 'zip': self.make_zipfile (base_dir) + if not self.keep_tree: + self.nuke_release_tree (base_dir) + # class Dist From 8ae570b96d2c1a923c26b02f85d2826561638fba Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 12 Dec 1999 17:19:58 +0000 Subject: [PATCH 0106/8469] Catch up with terminology change in UnixCCompiler: 'includes' -> 'include_dirs'. --- ccompiler.py | 12 ++++++------ msvccompiler.py | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 486f03ad04..8c2ddf7658 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -262,7 +262,7 @@ def compile (self, sources, output_dir=None, macros=None, - includes=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be @@ -277,7 +277,7 @@ def compile (self, undefines a macro. Later definitions/redefinitions/ undefinitions take precedence. - 'includes', if given, must be a list of strings, the directories + 'include_dirs', if given, must be a list of strings, the directories to add to the default include file search path for this compilation only. @@ -489,12 +489,12 @@ def new_compiler (plat=None, return klass (verbose, dry_run, force) -def gen_preprocess_options (macros, includes): +def gen_preprocess_options (macros, include_dirs): """Generate C pre-processor options (-D, -U, -I) as used by at least two types of compilers: the typical Unix compiler and Visual C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) means undefine (-U) macro 'name', and (name,value) means - define (-D) macro 'name' to 'value'. 'includes' is just a list of + define (-D) macro 'name' to 'value'. 'include_dirs' is just a list of directory names to be added to the header file search path (-I). Returns a list of command-line options suitable for either Unix compilers or Visual C++.""" @@ -506,7 +506,7 @@ def gen_preprocess_options (macros, includes): # line). I don't think it's essential, though, since most (all?) # Unix C compilers only pay attention to the latest -D or -U # mention of a macro on their command line. Similar situation for - # 'includes'. I'm punting on both for now. Anyways, weeding out + # 'include_dirs'. I'm punting on both for now. Anyways, weeding out # redundancies like this should probably be the province of # CCompiler, since the data structures used are inherited from it # and therefore common to all CCompiler classes. @@ -532,7 +532,7 @@ def gen_preprocess_options (macros, includes): # shell at all costs when we spawn the command! pp_opts.append ("-D%s=%s" % macro) - for dir in includes: + for dir in include_dirs: pp_opts.append ("-I%s" % dir) return pp_opts diff --git a/msvccompiler.py b/msvccompiler.py index 5ac60b2e47..d93c74c76d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -63,19 +63,20 @@ def compile (self, sources, output_dir=None, macros=None, - includes=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): if macros is None: macros = [] - if includes is None: - includes = [] + if include_dirs is None: + include_dirs = [] objectFiles = [] - base_pp_opts = gen_preprocess_options (self.macros + macros, - self.include_dirs + includes) + base_pp_opts = \ + gen_preprocess_options (self.macros + macros, + self.include_dirs + include_dirs) base_pp_opts.append('/c') From fd51c3b988a972a4d21813364202d7e2f04a4c9a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 13 Dec 1999 21:38:57 +0000 Subject: [PATCH 0107/8469] Use 'search', not 'match', on filename pattern regexes. --- command/dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/dist.py b/command/dist.py index cdd4dfc8cc..2e4aacddfc 100644 --- a/command/dist.py +++ b/command/dist.py @@ -274,7 +274,7 @@ def search_dir (self, dir, patterns): files = [] for file in allfiles: for (include,regexp) in act_patterns: - if regexp.match (file): + if regexp.search (file): if include: files.append (file) break # continue to next file @@ -290,7 +290,7 @@ def exclude_files (self, pattern): regexp = re.compile (fnmatch.translate (pattern)) for i in range (len (self.files)-1, -1, -1): - if regexp.match (self.files[i]): + if regexp.search (self.files[i]): del self.files[i] From cca87fce7c57072fd109389de01d23572d0d5dec Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 16 Dec 1999 01:14:15 +0000 Subject: [PATCH 0108/8469] Catch errors from 'rmtree' and emit a warning. --- command/dist.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/command/dist.py b/command/dist.py index 2e4aacddfc..9931e3752d 100644 --- a/command/dist.py +++ b/command/dist.py @@ -402,8 +402,16 @@ def make_release_tree (self, base_dir, files): def nuke_release_tree (self, base_dir): - self.execute (rmtree, (base_dir,), - "removing %s" % base_dir) + try: + self.execute (rmtree, (base_dir,), + "removing %s" % base_dir) + except (IOError, OSError), exc: + if exc.filename: + msg = "error removing %s: %s (%s)" % \ + (base_dir, exc.strerror, exc.filename) + else: + msg = "error removing %s: %s" % (base_dir, exc.strerror) + self.warn (msg) def make_tarball (self, base_dir, compress="gzip"): From 29fed792b97b31c545bb4b7f90a0b3a2e8a8ab4a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 16 Dec 1999 01:19:05 +0000 Subject: [PATCH 0109/8469] When emitting a command-line error message, *say* it's an error. --- core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.py b/core.py index 13bf9c7fcb..fd5ba907fb 100644 --- a/core.py +++ b/core.py @@ -88,7 +88,7 @@ def setup (**attrs): ok = dist.parse_command_line (sys.argv[1:]) except DistutilsArgError, msg: sys.stderr.write (usage + "\n") - raise SystemExit, msg + raise SystemExit, "error: %s" % msg # And finally, run all the commands found on the command line. if ok: From 1e138ca57132305e61c88abc02f5f42c1f733584 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Jan 2000 22:39:32 +0000 Subject: [PATCH 0110/8469] Typo fix: 'file.warn' should have been 'manifest.warn' in a couple of places. --- command/dist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/command/dist.py b/command/dist.py index 9931e3752d..80af990321 100644 --- a/command/dist.py +++ b/command/dist.py @@ -338,8 +338,8 @@ def read_manifest (self): # pattern if os.path.isdir (words[0]): if exclude: - file.warn ("exclude (!) doesn't apply to " + - "whole directory trees") + manifest.warn ("exclude (!) doesn't apply to " + + "whole directory trees") continue dir_files = self.search_dir (words[0], words[1:]) @@ -348,8 +348,8 @@ def read_manifest (self): # Multiple words in pattern: that's a no-no unless the first # word is a directory name elif len (words) > 1: - file.warn ("can't have multiple words unless first word " + - "('%s') is a directory name" % words[0]) + manifest.warn ("can't have multiple words unless first word " + + "('%s') is a directory name" % words[0]) continue # Single word, no bang: it's a "simple include pattern" @@ -364,7 +364,7 @@ def read_manifest (self): # Single word prefixed with a bang: it's a "simple exclude pattern" else: if self.exclude_files (pattern) == 0: - file.warn ("no files excluded by '%s'" % pattern) + manifest.warn ("no files excluded by '%s'" % pattern) # if/elif/.../else on 'pattern' From b4325f5828cd4c7a744909360776702dd72a4a13 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Jan 2000 22:41:02 +0000 Subject: [PATCH 0111/8469] Removed a bunch of irrelevant parameters from 'link_static_lib()' signature. Added 'link_executable()' signature. --- ccompiler.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 8c2ddf7658..036cbe9f48 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -292,17 +292,10 @@ def compile (self, pass - # XXX this is kind of useless without 'link_binary()' or - # 'link_executable()' or something -- or maybe 'link_static_lib()' - # should not exist at all, and we just have 'link_binary()'? def link_static_lib (self, objects, output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - extra_preargs=None, - extra_postargs=None): + output_dir=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied @@ -368,6 +361,23 @@ def link_shared_object (self, pass + def link_executable (self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + extra_preargs=None, + extra_postargs=None): + """Link a bunch of stuff together to create a binary executable + file. The "bunch of stuff" is as for 'link_static_lib()'. + 'output_progname' should be the base name of the executable + program--e.g. on Unix the same as the output filename, but + on DOS/Windows ".exe" will be appended.""" + pass + + + # -- Filename mangling methods ------------------------------------- # General principle for the filename-mangling methods: by default, From c77e34abbcc3b20c0091b26e3a9142599b98753a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Jan 2000 22:47:53 +0000 Subject: [PATCH 0112/8469] Abstracted '_fix_link_args()' out of 'link_shared_object()'. Added 'link_static_lib()' method, and 'archiver' and 'archiver_options' class attributes to support it. Added 'link_executable()' method, and 'ld_exec' instance attribute to support it. 'newer_group()' is now able to handle missing files, so we don't have to kludge it by catching OSError when calling it. 'object_filenames()' and 'shared_object_filename()' now take 'keep_dir' flag parameters. 'library_filename()' and 'shared_library_filename()' now respect a directory component in the library name. Various comment updates/deletions. --- unixccompiler.py | 170 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 133 insertions(+), 37 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index edff4f0a0e..fb58269cc1 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -59,7 +59,14 @@ class UnixCCompiler (CCompiler): _exe_ext = '' _shared_lib_ext = SO _static_lib_ext = '.a' - + + # Command to create a static library: seems to be pretty consistent + # across the major Unices. Might have to move down into the + # constructor if we need platform-specific guesswork. + archiver = "ar" + archiver_options = "-cr" + + def __init__ (self, verbose=0, dry_run=0, @@ -87,6 +94,8 @@ def __init__ (self, (self.ld_shared, self.ldflags_shared) = \ _split_command (LDSHARED) + self.ld_exec = self.cc + def compile (self, sources, @@ -122,7 +131,7 @@ def compile (self, # don't have to recompile. (Simplistic check -- we just compare the # source and object file, no deep dependency checking involving # header files. Hmmm.) - objects = self.object_filenames (sources, output_dir) + objects = self.object_filenames (sources, output_dir=output_dir) if not self.force: skipped = newer_pairwise (sources, objects) for skipped_pair in skipped: @@ -161,13 +170,70 @@ def compile (self, # return *all* of them, including those that weren't recompiled on # this call! return self.object_filenames (orig_sources, output_dir) - - # XXX punting on 'link_static_lib()' for now -- it might be better for - # CCompiler to mandate just 'link_binary()' or some such to build a new - # Python binary; it would then take care of linking in everything - # needed for the new Python without messing with an intermediate static - # library. + + def _fix_link_args (self, output_dir, libraries, library_dirs): + """Fixes up the arguments supplied to the 'link_*' methods: + if output_dir is None, use self.output_dir; ensure that + libraries and library_dirs are both lists (could be None or + tuples on input -- both are converted to lists). Return + a tuple of the three input arguments.""" + + if output_dir is None: + output_dir = self.output_dir + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] + + if type (libraries) not in (ListType, TupleType): + raise TypeError, \ + "'libraries' (if supplied) must be a list of strings" + if type (library_dirs) not in (ListType, TupleType): + raise TypeError, \ + "'library_dirs' (if supplied) must be a list of strings" + libraries = list (libraries) + library_dirs = list (library_dirs) + + return (output_dir, libraries, library_dirs) + + + def link_static_lib (self, + objects, + output_libname, + output_dir=None): + + if type (objects) not in (ListType, TupleType): + raise TypeError, \ + "'objects' must be a list or tuple of strings" + objects = list (objects) + + if output_dir is None: + output_dir = self.output_dir + + output_filename = self.library_filename (output_libname) + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + # Check timestamps: if any of the object files are newer than + # the library file, *or* if "force" is true, then we'll + # recreate the library. + if not self.force: + if self.dry_run: + newer = newer_group (objects, output_filename, missing='newer') + else: + newer = newer_group (objects, output_filename) + + if self.force or newer: + self.spawn ([self.archiver, + self.archiver_options, + output_filename] + + objects) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + # link_static_lib () + def link_shared_lib (self, objects, @@ -198,21 +264,8 @@ def link_shared_object (self, extra_preargs=None, extra_postargs=None): - if output_dir is None: - output_dir = self.output_dir - if libraries is None: - libraries = [] - if library_dirs is None: - library_dirs = [] - - if type (libraries) not in (ListType, TupleType): - raise TypeError, \ - "'libraries' (if supplied) must be a list of strings" - if type (library_dirs) not in (ListType, TupleType): - raise TypeError, \ - "'library_dirs' (if supplied) must be a list of strings" - libraries = list (libraries) - library_dirs = list (library_dirs) + (output_dir, libraries, library_dirs) = \ + self._fix_link_args (output_dir, libraries, library_dirs) lib_opts = gen_lib_options (self, self.library_dirs + library_dirs, @@ -223,16 +276,12 @@ def link_shared_object (self, # If any of the input object files are newer than the output shared # object, relink. Again, this is a simplistic dependency check: # doesn't look at any of the libraries we might be linking with. - # Note that we have to dance around errors comparing timestamps if - # we're in dry-run mode (yuck). + if not self.force: - try: + if self.dry_run: + newer = newer_group (objects, output_filename, missing='newer') + else: newer = newer_group (objects, output_filename) - except OSError: - if self.dry_run: - newer = 1 - else: - raise if self.force or newer: ld_args = self.ldflags_shared + objects + \ @@ -248,31 +297,78 @@ def link_shared_object (self, # link_shared_object () + def link_executable (self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + extra_preargs=None, + extra_postargs=None): + + (output_dir, libraries, library_dirs) = \ + self._fix_link_args (output_dir, libraries, library_dirs) + + lib_opts = gen_lib_options (self, + self.library_dirs + library_dirs, + self.libraries + libraries) + output_filename = output_progname # Unix-ism! + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + # Same ol' simplistic-but-still-useful dependency check. + if not self.force: + if self.dry_run: + newer = newer_group (objects, output_filename, missing='newer') + else: + newer = newer_group (objects, output_filename) + + if self.force or newer: + ld_args = objects + lib_opts + ['-o', output_filename] + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) + self.spawn ([self.ld_exec] + ld_args) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + # link_executable () + + # -- Filename-mangling (etc.) methods ------------------------------ - def object_filenames (self, source_filenames, output_dir=None): + def object_filenames (self, source_filenames, + keep_dir=0, output_dir=None): outnames = [] for inname in source_filenames: outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._obj_ext, inname) - outname = os.path.basename (outname) + if not keep_dir: + outname = os.path.basename (outname) if output_dir is not None: outname = os.path.join (output_dir, outname) outnames.append (outname) return outnames - def shared_object_filename (self, source_filename, output_dir=None): + def shared_object_filename (self, source_filename, + keep_dir=0, output_dir=None): outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) - outname = os.path.basename (outname) + if not keep_dir: + outname = os.path.basename (outname) if output_dir is not None: outname = os.path.join (output_dir, outname) return outname def library_filename (self, libname): - return "lib%s%s" % (libname, self._static_lib_ext) + (dirname, basename) = os.path.split (libname) + return os.path.join (dirname, + "lib%s%s" % (basename, self._static_lib_ext)) def shared_library_filename (self, libname): - return "lib%s%s" % (libname, self._shared_lib_ext) + (dirname, basename) = os.path.split (libname) + return os.path.join (dirname, + "lib%s%s" % (basename, self._shared_lib_ext)) def library_dir_option (self, dir): From 070f8639264c4ef9d748a2592cad810d189e8f4e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Jan 2000 22:48:59 +0000 Subject: [PATCH 0113/8469] 'newer_group()' can now deal with missing files, in a way specified by the 'missing' parameter. --- util.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 4f93cd44d5..953c2e26e2 100644 --- a/util.py +++ b/util.py @@ -120,11 +120,18 @@ def newer_pairwise (sources, targets): # newer_pairwise () -def newer_group (sources, target): +def newer_group (sources, target, missing='error'): """Return true if 'target' is out-of-date with respect to any file listed in 'sources'. In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise - return true.""" + return true. 'missing' controls what we do when a source file is + missing; the default ("error") is to blow up with an OSError from + inside 'stat()'; if it is "ignore", we silently drop any missing + source files; if it is "newer", any missing source files make us + assume that 'target' is out-of-date (this is handy in "dry-run" + mode: it'll make you pretend to carry out commands that wouldn't + work because inputs are missing, but that doesn't matter because + you're not actually going to run the commands).""" # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists (target): @@ -137,6 +144,14 @@ def newer_group (sources, target): from stat import ST_MTIME target_mtime = os.stat (target)[ST_MTIME] for source in sources: + if not os.path.exists (source): + if missing == 'error': # blow up when we stat() the file + pass + elif missing == 'ignore': # missing source dropped from + continue # target's dependency list + elif missing == 'newer': # missing source means target is + return 1 # out-of-date + source_mtime = os.stat(source)[ST_MTIME] if source_mtime > target_mtime: return 1 From 9b0d91692d8ed2c33df2133484d19b66b4fe6aa4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 16:25:17 +0000 Subject: [PATCH 0114/8469] Ditch unneeded imports. --- command/build_py.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 6bc5aa8007..e27a36d464 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -12,7 +12,6 @@ from distutils.core import Command from distutils.errors import * -from distutils.util import mkpath, copy_file class BuildPy (Command): From 705babe53bea546b02923e3a54ad837b7fd0f5f4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 16:25:59 +0000 Subject: [PATCH 0115/8469] Always run sys.prefix and sys.exec_prefix through 'os.path.normpath()' before storing or using. --- command/install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index cd12f6fc5b..6f5d6715ca 100644 --- a/command/install.py +++ b/command/install.py @@ -130,9 +130,9 @@ def set_final_options (self): # ape the behaviour of Python's configure script. if self.prefix is None: # user didn't override - self.prefix = sys.prefix + self.prefix = os.path.normpath (sys.prefix) if self.exec_prefix is None: - self.exec_prefix = sys.exec_prefix + self.exec_prefix = os.path.normpath (sys.exec_prefix) if self.install_lib is None: self.install_lib = \ @@ -247,10 +247,10 @@ def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): return the "relocated" installation directory.""" if use_exec: - sys_prefix = sys.exec_prefix + sys_prefix = os.path.normpath (sys.exec_prefix) my_prefix = self.exec_prefix else: - sys_prefix = sys.prefix + sys_prefix = os.path.normpath (sys.prefix) my_prefix = self.prefix val = getattr (sysconfig, config_attr) From dcb45ff5424f902d4e82572b682549b8e1576c89 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 18:00:04 +0000 Subject: [PATCH 0116/8469] Fix library filename methods -- there is no 'lib' prefix under DOS/Windows. --- msvccompiler.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index d93c74c76d..48453768d2 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -202,18 +202,15 @@ def shared_object_filename (self, source_filename): specified source filename.""" return self._change_extensions( source_filenames, self._shared_lib_ext ) - # XXX ummm... these aren't right, are they? I thought library 'foo' on - # DOS/Windows was to be found in "foo.lib", not "libfoo.lib"! - def library_filename (self, libname): """Return the static library filename corresponding to the specified library name.""" - return "lib%s%s" %( libname, self._static_lib_ext ) + return "%s%s" %( libname, self._static_lib_ext ) def shared_library_filename (self, libname): """Return the shared library filename corresponding to the specified library name.""" - return "lib%s%s" %( libname, self._shared_lib_ext ) + return "%s%s" %( libname, self._shared_lib_ext ) def library_dir_option (self, dir): From e5eb54ac61619eb08aa9c2f2975afe01b747ef5f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 18:04:04 +0000 Subject: [PATCH 0117/8469] Added code to use Jim Ahlstrom's zipfile.py module if the external zip command wasn't found or failed. (Code supplied by Thomas Heller .) --- command/dist.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/command/dist.py b/command/dist.py index 80af990321..b588fe95a9 100644 --- a/command/dist.py +++ b/command/dist.py @@ -435,12 +435,39 @@ def make_tarball (self, base_dir, compress="gzip"): def make_zipfile (self, base_dir): - # This assumes the Unix 'zip' utility -- it could be easily recast - # to use pkzip (or whatever the command-line zip creation utility - # on Redmond's archaic CP/M knockoff is nowadays), but I'll let - # someone who can actually test it do that. + # This initially assumed the Unix 'zip' utility -- but + # apparently InfoZIP's zip.exe works the same under Windows, so + # no changes needed! - self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) + try: + self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) + except DistutilsExecError: + + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed" -- shouldn't try + # again in the latter case. (I think fixing this will + # require some cooperation from the spawn module -- perhaps + # a utility function to search the path, so we can fallback + # on zipfile.py without the failed spawn.) + try: + import zipfile + except ImportError: + raise DistutilsExecError, \ + ("unable to create zip file '%s.zip':" + + "could neither find a standalone zip utility nor " + + "import the 'zipfile' module") % base_dir + + z = zipfile.ZipFile (base_dir + ".zip", "wb", + compression=zipfile.ZIP_DEFLATED) + + def visit (z, dirname, names): + for name in names: + path = os.path.join (dirname, name) + if os.path.isfile (path): + z.write (path, path) + + os.path.walk (base_dir, visit, z) + z.close() def make_distribution (self): From 102e89700b1f852de2496db33885228989f8161a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 20:23:34 +0000 Subject: [PATCH 0118/8469] Added missing import. Fixed 'make_release_tree()' to copy files if 'os.link()' doesn't exist. --- command/dist.py | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/command/dist.py b/command/dist.py index b588fe95a9..2d05f17447 100644 --- a/command/dist.py +++ b/command/dist.py @@ -13,6 +13,7 @@ from shutil import rmtree from distutils.core import Command from distutils.text_file import TextFile +from distutils.errors import DistutilsExecError # Possible modes of operation: @@ -388,16 +389,30 @@ def make_release_tree (self, base_dir, files): for dir in need_dirs: self.mkpath (dir) - # And walk over the list of files, making a hard link for - # each one that doesn't already exist in its corresponding - # location under 'base_dir' + # And walk over the list of files, either making a hard link (if + # os.link exists) to each one that doesn't already exist in its + # corresponding location under 'base_dir', or copying each file + # that's out-of-date in 'base_dir'. (Usually, all files will be + # out-of-date, because by default we blow away 'base_dir' when + # we're done making the distribution archives.) - self.announce ("making hard links in %s..." % base_dir) + try: + link = os.link + msg = "making hard links in %s..." % base_dir + except AttributeError: + link = 0 + msg = "copying files to %s..." % base_dir + + self.announce (msg) for file in files: dest = os.path.join (base_dir, file) - if not os.path.exists (dest): - self.execute (os.link, (file, dest), - "linking %s -> %s" % (file, dest)) + if link: + if not os.path.exists (dest): + self.execute (os.link, (file, dest), + "linking %s -> %s" % (file, dest)) + else: + self.copy_file (file, dest) + # make_release_tree () @@ -453,7 +468,7 @@ def make_zipfile (self, base_dir): import zipfile except ImportError: raise DistutilsExecError, \ - ("unable to create zip file '%s.zip':" + + ("unable to create zip file '%s.zip': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % base_dir From 696403a48232186753c41267731124d0105892e3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 20:40:48 +0000 Subject: [PATCH 0119/8469] Added compiler flags suggested by Thomas Heller: optimize, use multi-threaded RT library. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 48453768d2..50fd4622f3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -37,7 +37,7 @@ def __init__ (self, self.cc = "cl.exe" self.link = "link.exe" self.preprocess_options = None - self.compile_options = [ '/nologo' ] + self.compile_options = [ '/nologo', '/Ox', '/MD', '/GD' ] self.ldflags_shared = ['/DLL', '/nologo'] self.ldflags_static = [ '/nologo'] From ab853dd09598817baa291d816f22a8a0b0c784c8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 21:57:17 +0000 Subject: [PATCH 0120/8469] Removed /GD switch -- currently ignored by MSVC. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 50fd4622f3..a07b4b8ea6 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -37,7 +37,7 @@ def __init__ (self, self.cc = "cl.exe" self.link = "link.exe" self.preprocess_options = None - self.compile_options = [ '/nologo', '/Ox', '/MD', '/GD' ] + self.compile_options = [ '/nologo', '/Ox', '/MD' ] self.ldflags_shared = ['/DLL', '/nologo'] self.ldflags_static = [ '/nologo'] From 57794609e7637324ea1c7c31686e8889571bccd6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 21:57:55 +0000 Subject: [PATCH 0121/8469] Catch OSError from 'spawnv()' in '_spawn_nt()'. Tweaked error messages in '_spawn_posix()'. --- spawn.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/spawn.py b/spawn.py index eee8e7f4a0..9a88ac8987 100644 --- a/spawn.py +++ b/spawn.py @@ -63,9 +63,16 @@ def _spawn_nt ( cmd, print string.join ( [executable] + cmd[1:], ' ') if not dry_run: # spawn for NT requires a full path to the .exe - rc = os.spawnv (os.P_WAIT, executable, cmd) + try: + rc = os.spawnv (os.P_WAIT, executable, cmd) + except OSError, exc: + # this seems to happen when the command isn't found + raise DistutilsExecError, \ + "command '%s' failed: %s" % (cmd[0], exc[-1]) if rc != 0: - raise DistutilsExecError("command failed: %d" % rc) + # and this reflects the command running but failing + raise DistutilsExecError, \ + "command '%s' failed with exit status %d" % (cmd[0], rc) @@ -103,7 +110,7 @@ def _spawn_posix (cmd, (pid, status) = os.waitpid (pid, 0) if os.WIFSIGNALED (status): raise DistutilsExecError, \ - "command %s terminated by signal %d" % \ + "command '%s' terminated by signal %d" % \ (cmd[0], os.WTERMSIG (status)) elif os.WIFEXITED (status): @@ -112,7 +119,7 @@ def _spawn_posix (cmd, return # hey, it succeeded! else: raise DistutilsExecError, \ - "command %s failed with exit status %d" % \ + "command '%s' failed with exit status %d" % \ (cmd[0], exit_status) elif os.WIFSTOPPED (status): @@ -120,6 +127,6 @@ def _spawn_posix (cmd, else: raise DistutilsExecError, \ - "unknown error executing %s: termination status %d" % \ + "unknown error executing '%s': termination status %d" % \ (cmd[0], status) # _spawn_posix () From 0026c2ec06718cd6767b38cb5cc72bb77ed548b7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 17 Jan 2000 21:58:07 +0000 Subject: [PATCH 0122/8469] Fix indentation bug. --- command/dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/dist.py b/command/dist.py index 2d05f17447..0f9e30bad8 100644 --- a/command/dist.py +++ b/command/dist.py @@ -472,8 +472,8 @@ def make_zipfile (self, base_dir): "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % base_dir - z = zipfile.ZipFile (base_dir + ".zip", "wb", - compression=zipfile.ZIP_DEFLATED) + z = zipfile.ZipFile (base_dir + ".zip", "wb", + compression=zipfile.ZIP_DEFLATED) def visit (z, dirname, names): for name in names: From 6de13bfacf9bf7d1722fc1ff5c5d8e801512ae04 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 15:07:56 +0000 Subject: [PATCH 0123/8469] Added missing run of corresponding 'build' command. --- command/install_ext.py | 3 +++ command/install_lib.py | 3 +++ command/install_py.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/command/install_ext.py b/command/install_ext.py index 3fb756c6a1..b5673d235a 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -27,6 +27,9 @@ def set_final_options (self): def run (self): + # Make sure we have built all extension modules first + self.run_peer ('build_ext') + # Dump the entire "build/platlib" directory (or whatever it really # is; "build/platlib" is the default) to the installation target # (eg. "/usr/local/lib/python1.5/site-packages"). Note that diff --git a/command/install_lib.py b/command/install_lib.py index 35deaa812f..50939a3431 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -46,6 +46,9 @@ def set_final_options (self): def run (self): + # Make sure we have "built" all pure Python modules first + self.run_peer ('build_py') + # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) outfiles = self.copy_tree (self.build_dir, self.install_dir) diff --git a/command/install_py.py b/command/install_py.py index 35deaa812f..50939a3431 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -46,6 +46,9 @@ def set_final_options (self): def run (self): + # Make sure we have "built" all pure Python modules first + self.run_peer ('build_py') + # Dump entire contents of the build directory to the installation # directory (that's the beauty of having a build directory!) outfiles = self.copy_tree (self.build_dir, self.install_dir) From f8864bbadfdd49102b589272837a8ec1a93ca0fc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 18:30:32 +0000 Subject: [PATCH 0124/8469] Improvements to the help system: * "--help" can now come either before or after particular commands to get help on and can give help on multiple commands, eg. "--help install dist" gives help on those two commands * added "--help-commands" option, implemented by the 'print_commands()' and 'print_command_list()' methods --- core.py | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 5 deletions(-) diff --git a/core.py b/core.py index fd5ba907fb..7a646dad22 100644 --- a/core.py +++ b/core.py @@ -30,8 +30,9 @@ usage = """\ usage: %s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: %s --help + or: %s --help-commands or: %s cmd --help -""" % (sys.argv[0], sys.argv[0], sys.argv[0]) +""" % ((sys.argv[0],) * 4) def setup (**attrs): @@ -159,6 +160,7 @@ def __init__ (self, attrs=None): self.dry_run = 0 self.force = 0 self.help = 0 + self.help_commands = 0 # And the "distribution meta-data" options -- these can only # come from setup.py (the caller), not the command line @@ -270,15 +272,21 @@ def parse_command_line (self, args): # happen until we know what the command is. self.commands = [] - args = fancy_getopt (self.global_options, self.negative_opt, + options = self.global_options + \ + [('help-commands', None, + "list all available commands")] + args = fancy_getopt (options, self.negative_opt, self, sys.argv[1:]) - if self.help: - print_help (self.global_options, header="Global options:") + # User just wants a list of commands -- we'll print it out and stop + # processing now (ie. if they ran "setup --help-commands foo bar", + # we ignore "foo bar"). + if self.help_commands: + self.print_commands () print print usage return - + while args: # Pull the current command from the head of the command line command = args[0] @@ -336,6 +344,25 @@ def parse_command_line (self, args): # while args + # If the user wants help -- ie. they gave the "--help" option -- + # give it to 'em. We do this *after* processing the commands in + # case they want help on any particular command, eg. + # "setup.py --help foo". (This isn't the documented way to + # get help on a command, but I support it because that's how + # CVS does it -- might as well be consistent.) + if self.help: + print_help (self.global_options, header="Global options:") + print + + for command in self.commands: + klass = self.find_command_class (command) + print_help (klass.options, + header="Options for '%s' command:" % command) + print + + print usage + return + # Oops, no commands found -- an end-user error if not self.commands: raise DistutilsArgError, "no commands supplied" @@ -346,6 +373,63 @@ def parse_command_line (self, args): # parse_command_line() + def print_command_list (self, commands, header, max_length): + """Print a subset of the list of all commands -- used by + 'print_commands()'.""" + + print header + ":" + + for cmd in commands: + klass = self.cmdclass.get (cmd) + if not klass: + klass = self.find_command_class (cmd) + try: + description = klass.description + except AttributeError: + description = "(no description available)" + + print " %-*s %s" % (max_length, cmd, description) + + # print_command_list () + + + def print_commands (self): + """Print out a help message listing all available commands with + a description of each. The list is divided into "standard + commands" (listed in distutils.command.__all__) and "extra + commands" (mentioned in self.cmdclass, but not a standard + command). The descriptions come from the command class + attribute 'description'.""" + + import distutils.command + std_commands = distutils.command.__all__ + is_std = {} + for cmd in std_commands: + is_std[cmd] = 1 + + extra_commands = [] + for cmd in self.cmdclass.keys(): + if not is_std.get(cmd): + extra_commands.append (cmd) + + max_length = 0 + for cmd in (std_commands + extra_commands): + if len (cmd) > max_length: + max_length = len (cmd) + + self.print_command_list (std_commands, + "Standard commands", + max_length) + if extra_commands: + print + self.print_command_list (extra_commands, + "Extra commands", + max_length) + + # print_commands () + + + # -- Command class/object methods ---------------------------------- # This is a method just so it can be overridden if desired; it doesn't From 40b35bdeccac9d3b970f084d10fd7d0502bca864 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 18:31:34 +0000 Subject: [PATCH 0125/8469] Added 'dist' command. --- command/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/__init__.py b/command/__init__.py index 9a5aef2002..8659307cbf 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -9,6 +9,7 @@ install install_py install_ext + dist but this list will undoubtedly grow with time.""" @@ -20,4 +21,5 @@ 'install', 'install_py', 'install_ext', + 'dist', ] From fb6034d5ef6f4eccc9ee98e7aa353a4b2ae51235 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 18:34:15 +0000 Subject: [PATCH 0126/8469] Added 'description' class attribute to every command class (to help the '--help-commands' option). Shuffled imports around in a few command modules to avoid expensive up-front import of sysconfig (and resulting delays in generating list of all commands). --- command/build.py | 2 ++ command/build_ext.py | 15 ++++++++++----- command/build_py.py | 2 ++ command/dist.py | 2 ++ command/install.py | 5 ++++- command/install_ext.py | 2 ++ command/install_lib.py | 2 ++ command/install_py.py | 2 ++ 8 files changed, 26 insertions(+), 6 deletions(-) diff --git a/command/build.py b/command/build.py index 1586e60b07..e6c87bfcae 100644 --- a/command/build.py +++ b/command/build.py @@ -12,6 +12,8 @@ class Build (Command): + description = "build everything needed to install" + options = [('build-base=', 'b', "base directory for build library"), ('build-lib=', 'l', diff --git a/command/build_ext.py b/command/build_ext.py index d38cb18b5c..4f7e53ff30 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -11,8 +11,6 @@ import sys, os, string, re from types import * from distutils.core import Command -from distutils.ccompiler import new_compiler -from distutils.sysconfig import INCLUDEPY, SO, exec_prefix from distutils.errors import * @@ -24,6 +22,8 @@ class BuildExt (Command): + description = "build C/C++ extensions (compile/link to build directory)" + # XXX thoughts on how to deal with complex command-line options like # these, i.e. how to make it so fancy_getopt can suck them off the # command line and make it look like setup.py defined the appropriate @@ -76,6 +76,8 @@ def set_default_options (self): def set_final_options (self): + from distutils import sysconfig + self.set_undefined_options ('build', ('build_platlib', 'build_dir')) if self.package is None: @@ -88,8 +90,8 @@ def set_final_options (self): # etc.) are in the include search path. We have to roll our own # "exec include dir", because the Makefile parsed by sysconfig # doesn't have it (sigh). - py_include = INCLUDEPY # prefix + "include" + "python" + ver - exec_py_include = os.path.join (exec_prefix, 'include', + py_include = sysconfig.INCLUDEPY # prefix + "include" + "python" + ver + exec_py_include = os.path.join (sysconfig.exec_prefix, 'include', 'python' + sys.version[0:3]) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] @@ -104,6 +106,8 @@ def set_final_options (self): def run (self): + from distutils.ccompiler import new_compiler + # 'self.extensions', as supplied by setup.py, is a list of 2-tuples. # Each tuple is simple: # (ext_name, build_info) @@ -246,9 +250,10 @@ def build_extensions (self, extensions): def extension_filename (self, ext_name, package=None): + from distutils import sysconfig if package: ext_name = package + '.' + ext_name ext_path = string.split (ext_name, '.') - return apply (os.path.join, ext_path) + SO + return apply (os.path.join, ext_path) + sysconfig.SO # class BuildExt diff --git a/command/build_py.py b/command/build_py.py index e27a36d464..57ddf7e7ea 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -16,6 +16,8 @@ class BuildPy (Command): + description = "\"build\" pure Python modules (copy to build directory)" + options = [('build-dir=', 'd', "directory for platform-shared files"), ] diff --git a/command/dist.py b/command/dist.py index 0f9e30bad8..76332b2751 100644 --- a/command/dist.py +++ b/command/dist.py @@ -131,6 +131,8 @@ class Dist (Command): + description = "create a source distribution (tarball, zip file, etc.)" + options = [('formats=', None, "formats for source distribution (tar, ztar, gztar, or zip)"), ('manifest=', 'm', diff --git a/command/install.py b/command/install.py index 6f5d6715ca..0e5b01cc98 100644 --- a/command/install.py +++ b/command/install.py @@ -8,13 +8,14 @@ import sys, os, string from types import * -from distutils import sysconfig from distutils.core import Command from distutils.util import write_file class Install (Command): + description = "install everything from build directory" + options = [('prefix=', None, "installation prefix"), ('exec-prefix=', None, "prefix for platform-specific files"), @@ -246,6 +247,8 @@ def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): then replace it with the current installation prefix and return the "relocated" installation directory.""" + from distutils import sysconfig + if use_exec: sys_prefix = os.path.normpath (sys.exec_prefix) my_prefix = self.exec_prefix diff --git a/command/install_ext.py b/command/install_ext.py index b5673d235a..599a37e1ce 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -11,6 +11,8 @@ class InstallExt (Command): + description = "install C/C++ extension modules" + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ] diff --git a/command/install_lib.py b/command/install_lib.py index 50939a3431..2e8a670686 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -8,6 +8,8 @@ class InstallPy (Command): + description = "install pure Python modules" + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), diff --git a/command/install_py.py b/command/install_py.py index 50939a3431..2e8a670686 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -8,6 +8,8 @@ class InstallPy (Command): + description = "install pure Python modules" + options = [('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), From 4cf86996ee90c2109a98829865f736683ca5cfac Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 19:57:48 +0000 Subject: [PATCH 0127/8469] Fixed broken list extend in 'copy_tree()'. --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 953c2e26e2..58d58439e0 100644 --- a/util.py +++ b/util.py @@ -349,10 +349,10 @@ def copy_tree (src, dst, outputs.append (dst_name) elif os.path.isdir (src_name): - outputs[-1:] = \ + outputs.extend ( copy_tree (src_name, dst_name, preserve_mode, preserve_times, preserve_symlinks, - update, verbose, dry_run) + update, verbose, dry_run)) else: if (copy_file (src_name, dst_name, preserve_mode, preserve_times, From 6be52b45d1a442faf400b853e190db26b718d1c9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jan 2000 20:22:27 +0000 Subject: [PATCH 0128/8469] Allow either README or README.txt as a "standard file". --- command/dist.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/command/dist.py b/command/dist.py index 76332b2751..ea61a4806e 100644 --- a/command/dist.py +++ b/command/dist.py @@ -219,12 +219,24 @@ def check_metadata (self): def find_defaults (self): - standards = ['README', 'setup.py'] + standards = [('README', 'README.txt'), 'setup.py'] for fn in standards: - if os.path.exists (fn): - self.files.append (fn) + if type (fn) is TupleType: + alts = fn + for fn in alts: + if os.path.exists (fn): + got_it = 1 + self.files.append (fn) + break + + if not got_it: + self.warn ("standard file not found: should have one of " + + string.join (alts, ', ')) else: - self.warn ("standard file %s not found" % fn) + if os.path.exists (fn): + self.files.append (fn) + else: + self.warn ("standard file %s not found" % fn) optional = ['test/test*.py'] for pattern in optional: From 439aa60615c8ada638e789a78159d26091838ffe Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Feb 2000 00:05:14 +0000 Subject: [PATCH 0129/8469] Comment fix. Always use normalized (with os.path.normpath()) versions of prefix and exec_prefix. --- sysconfig.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 8eaf17dc35..0e40cbc350 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -13,15 +13,20 @@ import string import sys +prefix = os.path.normpath (sys.prefix) +exec_prefix = os.path.normpath (sys.exec_prefix) + def get_config_h_filename(): """Return full pathname of installed config.h file.""" - return os.path.join(sys.exec_prefix, "include", "python" + sys.version[:3], + return os.path.join(exec_prefix, + "include", "python" + sys.version[:3], "config.h") def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" - return os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3], + return os.path.join(exec_prefix, + "lib", "python" + sys.version[:3], "config", "Makefile") def parse_config_h(fp, g=None): @@ -125,7 +130,7 @@ def _init_posix(): g = globals() # load the installed config.h: parse_config_h(open(get_config_h_filename()), g) - # load the installed Makefile.pre.in: + # load the installed Makefile: parse_makefile(open(get_makefile_filename()), g) @@ -134,16 +139,16 @@ def _init_nt(): g=globals() # load config.h, though I don't know how useful this is parse_config_h(open( - os.path.join(sys.exec_prefix, "include", "config.h")), g) + os.path.join(exec_prefix, "include", "config.h")), g) # set basic install directories - g['LIBDEST']=os.path.join(sys.exec_prefix, "Lib") - g['BINLIBDEST']= os.path.join(sys.exec_prefix, "Lib") + g['LIBDEST']=os.path.join(exec_prefix, "Lib") + g['BINLIBDEST']= os.path.join(exec_prefix, "Lib") # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = os.path.join (sys.prefix, 'include' ) + g['INCLUDEPY'] = os.path.join (prefix, 'include' ) g['SO'] = '.dll' - g['exec_prefix'] = sys.exec_prefix + g['exec_prefix'] = exec_prefix try: exec "_init_" + os.name From 0298b16d8f10a056dbd74b2b68c425fcf873d6e2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Feb 2000 00:07:14 +0000 Subject: [PATCH 0130/8469] Patch from Joe Van Andel: fix arg to % operator in warning. --- command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 57ddf7e7ea..048962b29f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -160,8 +160,8 @@ def check_package (self, package, package_dir): def check_module (self, module, module_file): if not os.path.isfile (module_file): - self.warn ("file %s (for module %s) not found" % - module_file, module) + self.warn ("file %s (for module %s) not found" % + (module_file, module)) return 0 else: return 1 From b97cf9ec1ea46ad32766cabf2f8b0697be681944 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 3 Feb 2000 23:07:19 +0000 Subject: [PATCH 0131/8469] Changed 'compile()' method to compile files one-at-a-time -- gives better feedback and, theoretically, the opportunity to set compiler flags on a per-file basis. --- unixccompiler.py | 49 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index fb58269cc1..9ace98606c 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -137,34 +137,27 @@ def compile (self, for skipped_pair in skipped: self.announce ("skipping %s (%s up-to-date)" % skipped_pair) - # If anything left to compile, compile it - if sources: - # XXX use of ccflags_shared means we're blithely assuming - # that we're compiling for inclusion in a shared object! - # (will have to fix this when I add the ability to build a - # new Python) - cc_args = ['-c'] + pp_opts + \ - self.ccflags + self.ccflags_shared + \ - sources - if extra_preargs: - cc_args[:0] = extra_preargs - if extra_postargs: - cc_args.extend (extra_postargs) - self.spawn ([self.cc] + cc_args) - - - # Note that compiling multiple source files in the same go like - # we've just done drops the .o file in the current directory, which - # may not be what the caller wants (depending on the 'output_dir' - # parameter). So, if necessary, fix that now by moving the .o - # files into the desired output directory. (The alternative, of - # course, is to compile one-at-a-time with a -o option. 6 of one, - # 12/2 of the other...) - - if output_dir: - for i in range (len (objects)): - src = os.path.basename (objects[i]) - objects[i] = self.move_file (src, output_dir) + # Build list of (source,object) tuples for convenience + srcobj = [] + for i in range (len (sources)): + srcobj.append ((sources[i], objects[i])) + + # Compile all source files that weren't eliminated by + # 'newer_pairwise()'. + # XXX use of ccflags_shared means we're blithely assuming + # that we're compiling for inclusion in a shared object! + # (will have to fix this when I add the ability to build a + # new Python) + cc_args = ['-c'] + pp_opts + self.ccflags + self.ccflags_shared + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs is None: + extra_postargs = [] + + for (source,object) in srcobj: + self.spawn ([self.cc] + cc_args + + [source, '-o', object] + + extra_postargs) # Have to re-fetch list of object filenames, because we want to # return *all* of them, including those that weren't recompiled on From 7c7b43f5c4d40dd9eb5524a4babd50f526cee53d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 3 Feb 2000 23:07:54 +0000 Subject: [PATCH 0132/8469] Improved an error message. Announce when we start building each extension (better feedback). --- command/build_ext.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4f7e53ff30..126cf60aab 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -197,10 +197,13 @@ def build_extensions (self, extensions): sources = build_info.get ('sources') if sources is None or type (sources) not in (ListType, TupleType): raise DistutilsValueError, \ - "in ext_modules option, 'sources' must be present " + \ - "and must be a list of source filenames" + ("in ext_modules option (extension '%s'), " + + "'sources' must be present and must be " + + "a list of source filenames") % extension_name sources = list (sources) + self.announce ("building '%s' extension" % extension_name) + # First step: compile the source code to object files. This # drops the object files in the current directory, regardless # of where the source is (may be a bad thing, but that's how a From 139d5ff59d0b42ffd4a768d3fffe2b8f0320bc9d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Feb 2000 02:23:16 +0000 Subject: [PATCH 0133/8469] Tweaked various comments, docstrings, and error messages. --- command/build_ext.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 126cf60aab..b253c55dce 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -103,6 +103,11 @@ def set_final_options (self): if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) + # XXX how the heck are 'self.define' and 'self.undef' supposed to + # be set? + + # set_final_options () + def run (self): @@ -152,6 +157,11 @@ def run (self): def check_extensions_list (self, extensions): + """Ensure that the list of extensions (presumably provided as a + command option 'extensions') is valid, i.e. it is a list of + 2-tuples, where the tuples are (extension_name, build_info_dict). + Raise DistutilsValueError if the structure is invalid anywhere; + just returns otherwise.""" if type (extensions) is not ListType: raise DistutilsValueError, \ @@ -171,7 +181,7 @@ def check_extensions_list (self, extensions): if type (ext[1]) is not DictionaryType: raise DistutilsValueError, \ "second element of each tuple in 'ext_modules' " + \ - "must be a dictionary" + "must be a dictionary (build info)" # end sanity-check for @@ -197,7 +207,7 @@ def build_extensions (self, extensions): sources = build_info.get ('sources') if sources is None or type (sources) not in (ListType, TupleType): raise DistutilsValueError, \ - ("in ext_modules option (extension '%s'), " + + ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % extension_name sources = list (sources) From 57d9abc5b58cf0fdc8a19692abdb934f5e07f52b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Feb 2000 02:23:59 +0000 Subject: [PATCH 0134/8469] New command to build C (and C++, hopefully) libraries needed by extensions in the current distribution: motivated by PIL's libImaging. --- command/build_clib.py | 161 ++++++++++++++++++++++++++++++++++++++++++ command/build_lib.py | 161 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 322 insertions(+) create mode 100644 command/build_clib.py create mode 100644 command/build_lib.py diff --git a/command/build_clib.py b/command/build_clib.py new file mode 100644 index 0000000000..c638fd5ffc --- /dev/null +++ b/command/build_clib.py @@ -0,0 +1,161 @@ +"""distutils.command.build_lib + +Implements the Distutils 'build_lib' command, to build a C/C++ library +that is included in the module distribution and needed by an extension +module.""" + +# created (an empty husk) 1999/12/18, Greg Ward +# fleshed out 2000/02/03-04 + +__rcsid__ = "$Id$" + + +# XXX this module has *lots* of code ripped-off quite transparently from +# build_ext.py -- not surprisingly really, as the work required to build +# a static library from a collection of C source files is not really all +# that different from what's required to build a shared object file from +# a collection of C source files. Nevertheless, I haven't done the +# necessary refactoring to account for the overlap in code between the +# two modules, mainly because a number of subtle details changed in the +# cut 'n paste. Sigh. + +import os, string +from types import * +from distutils.core import Command +from distutils.errors import * +from distutils.ccompiler import new_compiler + + +class BuildLib (Command): + + options = [] + + def set_default_options (self): + # List of libraries to build + self.libraries = None + + # Compilation options for all libraries + self.include_dirs = None + self.define = None + self.undef = None + + # set_default_options() + + def set_final_options (self): + self.libraries = self.distribution.libraries + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + if type (self.include_dirs) is StringType: + self.include_dirs = string.split (self.include_dirs, + os.pathsep) + + # XXX same as for build_ext -- what about 'self.define' and + # 'self.undef' ? + + # set_final_options() + + + def run (self): + + if not self.libraries: + return + self.check_library_list (self.libraries) + + # Yech -- this is cut 'n pasted from build_ext.py! + self.compiler = new_compiler (plat=os.environ.get ('PLAT'), + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + if self.include_dirs is not None: + self.compiler.set_include_dirs (self.include_dirs) + if self.define is not None: + # 'define' option is a list of (name,value) tuples + for (name,value) in self.define: + self.compiler.define_macro (name, value) + if self.undef is not None: + for macro in self.undef: + self.compiler.undefine_macro (macro) + + self.build_libraries (self.libraries) + + # run() + + + def check_library_list (self, libraries): + """Ensure that the list of libraries (presumably provided as a + command option 'libraries') is valid, i.e. it is a list of + 2-tuples, where the tuples are (library_name, build_info_dict). + Raise DistutilsValueError if the structure is invalid anywhere; + just returns otherwise.""" + + # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, + # with only names changed to protect the innocent! + + if type (libraries) is not ListType: + raise DistutilsValueError, \ + "'libraries' option must be a list of tuples" + + for lib in libraries: + if type (lib) is not TupleType and len (lib) != 2: + raise DistutilsValueError, \ + "each element of 'libraries' must a 2-tuple" + + if type (lib[0]) is not StringType: + raise DistutilsValueError, \ + "first element of each tuple in 'libraries' " + \ + "must be a string (the library name)" + if type (lib[1]) is not DictionaryType: + raise DistutilsValueError, \ + "second element of each tuple in 'libraries' " + \ + "must be a dictionary (build info)" + # for lib + + # check_library_list () + + + def build_libraries (self, libraries): + + compiler = self.compiler + + for (lib_name, build_info) in libraries: + sources = build_info.get ('sources') + if sources is None or type (sources) not in (ListType, TupleType): + raise DistutilsValueError, \ + ("in 'libraries' option (library '%s'), " + + "'sources' must be present and must be " + + "a list of source filenames") % lib_name + sources = list (sources) + + self.announce ("building '%s' library" % lib_name) + + # Extract the directory the library is intended to go in -- + # note translation from "universal" slash-separated form to + # current platform's pathname convention (so we can use the + # string for actual filesystem use). + path = tuple (string.split (lib_name, '/')[:-1]) + if path: + lib_dir = apply (os.path.join, path) + else: + lib_dir = '' + + # First, compile the source code to object files in the library + # directory. (This should probably change to putting object + # files in a temporary build directory.) + macros = build_info.get ('macros') + include_dirs = build_info.get ('include_dirs') + objects = self.compiler.compile (sources, + macros=macros, + include_dirs=include_dirs, + output_dir=lib_dir) + + # Now "link" the object files together into a static library. + # (On Unix at least, this isn't really linking -- it just + # builds an archive. Whatever.) + self.compiler.link_static_lib (objects, lib_name) + + # for libraries + + # build_libraries () + + +# class BuildLib diff --git a/command/build_lib.py b/command/build_lib.py new file mode 100644 index 0000000000..c638fd5ffc --- /dev/null +++ b/command/build_lib.py @@ -0,0 +1,161 @@ +"""distutils.command.build_lib + +Implements the Distutils 'build_lib' command, to build a C/C++ library +that is included in the module distribution and needed by an extension +module.""" + +# created (an empty husk) 1999/12/18, Greg Ward +# fleshed out 2000/02/03-04 + +__rcsid__ = "$Id$" + + +# XXX this module has *lots* of code ripped-off quite transparently from +# build_ext.py -- not surprisingly really, as the work required to build +# a static library from a collection of C source files is not really all +# that different from what's required to build a shared object file from +# a collection of C source files. Nevertheless, I haven't done the +# necessary refactoring to account for the overlap in code between the +# two modules, mainly because a number of subtle details changed in the +# cut 'n paste. Sigh. + +import os, string +from types import * +from distutils.core import Command +from distutils.errors import * +from distutils.ccompiler import new_compiler + + +class BuildLib (Command): + + options = [] + + def set_default_options (self): + # List of libraries to build + self.libraries = None + + # Compilation options for all libraries + self.include_dirs = None + self.define = None + self.undef = None + + # set_default_options() + + def set_final_options (self): + self.libraries = self.distribution.libraries + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + if type (self.include_dirs) is StringType: + self.include_dirs = string.split (self.include_dirs, + os.pathsep) + + # XXX same as for build_ext -- what about 'self.define' and + # 'self.undef' ? + + # set_final_options() + + + def run (self): + + if not self.libraries: + return + self.check_library_list (self.libraries) + + # Yech -- this is cut 'n pasted from build_ext.py! + self.compiler = new_compiler (plat=os.environ.get ('PLAT'), + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + if self.include_dirs is not None: + self.compiler.set_include_dirs (self.include_dirs) + if self.define is not None: + # 'define' option is a list of (name,value) tuples + for (name,value) in self.define: + self.compiler.define_macro (name, value) + if self.undef is not None: + for macro in self.undef: + self.compiler.undefine_macro (macro) + + self.build_libraries (self.libraries) + + # run() + + + def check_library_list (self, libraries): + """Ensure that the list of libraries (presumably provided as a + command option 'libraries') is valid, i.e. it is a list of + 2-tuples, where the tuples are (library_name, build_info_dict). + Raise DistutilsValueError if the structure is invalid anywhere; + just returns otherwise.""" + + # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, + # with only names changed to protect the innocent! + + if type (libraries) is not ListType: + raise DistutilsValueError, \ + "'libraries' option must be a list of tuples" + + for lib in libraries: + if type (lib) is not TupleType and len (lib) != 2: + raise DistutilsValueError, \ + "each element of 'libraries' must a 2-tuple" + + if type (lib[0]) is not StringType: + raise DistutilsValueError, \ + "first element of each tuple in 'libraries' " + \ + "must be a string (the library name)" + if type (lib[1]) is not DictionaryType: + raise DistutilsValueError, \ + "second element of each tuple in 'libraries' " + \ + "must be a dictionary (build info)" + # for lib + + # check_library_list () + + + def build_libraries (self, libraries): + + compiler = self.compiler + + for (lib_name, build_info) in libraries: + sources = build_info.get ('sources') + if sources is None or type (sources) not in (ListType, TupleType): + raise DistutilsValueError, \ + ("in 'libraries' option (library '%s'), " + + "'sources' must be present and must be " + + "a list of source filenames") % lib_name + sources = list (sources) + + self.announce ("building '%s' library" % lib_name) + + # Extract the directory the library is intended to go in -- + # note translation from "universal" slash-separated form to + # current platform's pathname convention (so we can use the + # string for actual filesystem use). + path = tuple (string.split (lib_name, '/')[:-1]) + if path: + lib_dir = apply (os.path.join, path) + else: + lib_dir = '' + + # First, compile the source code to object files in the library + # directory. (This should probably change to putting object + # files in a temporary build directory.) + macros = build_info.get ('macros') + include_dirs = build_info.get ('include_dirs') + objects = self.compiler.compile (sources, + macros=macros, + include_dirs=include_dirs, + output_dir=lib_dir) + + # Now "link" the object files together into a static library. + # (On Unix at least, this isn't really linking -- it just + # builds an archive. Whatever.) + self.compiler.link_static_lib (objects, lib_name) + + # for libraries + + # build_libraries () + + +# class BuildLib From ed153d7c608a30aeda273198189cd1539d01be2b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Feb 2000 02:24:16 +0000 Subject: [PATCH 0135/8469] Run the 'build_lib' command before building extensions, if necessary. --- command/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/build.py b/command/build.py index e6c87bfcae..768db12062 100644 --- a/command/build.py +++ b/command/build.py @@ -48,6 +48,12 @@ def run (self): if self.distribution.packages or self.distribution.py_modules: self.run_peer ('build_py') + # Build any standalone C libraries next -- they're most likely to + # be needed by extension modules, so obviously have to be done + # first! + if self.distribution.libraries: + self.run_peer ('build_lib') + # And now 'build_ext' -- compile extension modules and put them # into the build tree if self.distribution.ext_modules: From 47356dea6774b33b37dc74067ef67696a40567e6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Feb 2000 02:24:52 +0000 Subject: [PATCH 0136/8469] Added 'libraries' option for use by the 'build_lib' command. Typo fix. --- core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 7a646dad22..88e889b22f 100644 --- a/core.py +++ b/core.py @@ -188,6 +188,7 @@ def __init__ (self, attrs=None): self.packages = None self.package_dir = None self.py_modules = None + self.libraries = None self.ext_modules = None self.ext_package = None self.include_dirs = None @@ -314,7 +315,7 @@ def parse_command_line (self, args): # known options if not (hasattr (cmd_obj, 'options') and type (cmd_obj.options) is ListType): - raise DistutilsClasserror, \ + raise DistutilsClassError, \ ("command class %s must provide an 'options' attribute "+ "(a list of tuples)") % \ cmd_obj.__class__ From b08bf9ee895d020cd5431304cc50aead7c0ba272 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Feb 2000 02:37:15 +0000 Subject: [PATCH 0137/8469] Ditch .def file kludge for (much smaller) /export option kludge. --- command/build_ext.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index b253c55dce..0f2d1a7bf3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -236,18 +236,7 @@ def build_extensions (self, extensions): library_dirs = build_info.get ('library_dirs') extra_args = build_info.get ('extra_link_args') or [] if self.compiler.compiler_type == 'msvc': - def_file = build_info.get ('def_file') - if def_file is None: - source_dir = os.path.dirname (sources[0]) - ext_base = (string.split (extension_name, '.'))[-1] - def_file = os.path.join (source_dir, "%s.def" % ext_base) - if not os.path.exists (def_file): - self.warn ("file '%s' not found: " % def_file + - "might have problems building DLL") - def_file = None - - if def_file is not None: - extra_args.append ('/DEF:' + def_file) + extra_args.append ('/export:init%s' % extension_name) ext_filename = self.extension_filename \ (extension_name, self.package) From 23cd2df59e48224e36288f7437d180356b55da39 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Feb 2000 02:39:44 +0000 Subject: [PATCH 0138/8469] Revised version (thank to Thomas Heller and Robin Becker) that tries a lot harder to find the MSVC compiler (mainly by using the registry). --- msvccompiler.py | 101 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index a07b4b8ea6..10cd6081d3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -10,10 +10,96 @@ import os import sys +import string from distutils.errors import * from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options +def _devstudio_versions(): + "Get a list of devstudio versions" + try: + import win32api + import win32con + except ImportError: + return None + + K = 'Software\\Microsoft\\Devstudio' + L = [] + for base in (win32con.HKEY_CLASSES_ROOT,win32con.HKEY_LOCAL_MACHINE,win32con.HKEY_CURRENT_USER,win32con.HKEY_USERS): + try: + k = win32api.RegOpenKeyEx(base,K) + i = 0 + while 1: + try: + p = win32api.RegEnumKey(k,i) + if p[0] in '123456789' and p not in L: + L.append(p) + except win32api.error: + break + i = i + 1 + except win32api.error: + pass + L.sort() + L.reverse() + return L + +def _msvc_get_paths(path, vNum='6.0', platform='x86'): + "Get a devstudio path (include, lib or path)" + try: + import win32api + import win32con + except ImportError: + return None + + L = [] + if path=='lib': path= 'Library' + path = string.upper(path + ' Dirs') + K = 'Software\\Microsoft\\Devstudio\\%s\\Build System\\Components\\Platforms\\Win32 (%s)\\Directories' \ + % (vNum,platform) + for base in (win32con.HKEY_CLASSES_ROOT,win32con.HKEY_LOCAL_MACHINE,win32con.HKEY_CURRENT_USER,win32con.HKEY_USERS): + try: + k = win32api.RegOpenKeyEx(base,K) + i = 0 + while 1: + try: + (p,v,t) = win32api.RegEnumValue(k,i) + if string.upper(p)==path: + V = string.split(v,';') + for v in V: + if v=='' or v in L: continue + L.append(v) + break + i = i + 1 + except win32api.error: + break + except win32api.error: + pass + return L + +def _find_exe(exe): + for v in _devstudio_versions(): + for p in _msvc_get_paths('path',v): + fn=os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): return fn + + #didn't find it; try existing path + try: + for p in string.split(os.environ['Path'],';'): + fn=os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): return fn + except: + pass + return exe #last desperate hope + +def _find_SET(n): + for v in _devstudio_versions(): + p=_msvc_get_paths(n,v) + if p!=[]: return p + return [] + +def _do_SET(n): + p=_find_SET(n) + if p!=[]: os.environ[n]=string.join(p,';') class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -34,12 +120,21 @@ def __init__ (self, self.add_library ( "python" + sys.version[0] + sys.version[2] ) self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) - self.cc = "cl.exe" - self.link = "link.exe" + self.cc = _find_exe("cl.exe") + self.link = _find_exe("link.exe") + _do_SET('lib') + _do_SET('include') + path=_find_SET('path') + try: + for p in string.split(os.environ['path'],';'): + path.append(p) + except KeyError: + pass + os.environ['path'] = string.join(path,';') self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD' ] - self.ldflags_shared = ['/DLL', '/nologo'] + self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] self.ldflags_static = [ '/nologo'] From 7a31064ca3c8fed8497ec3db7cdb3ee89aba2731 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 8 Feb 2000 15:55:42 +0000 Subject: [PATCH 0139/8469] get_config_h_filename(): Support NT as well as Posix systems. _init_nt(): Use get_config_h_filename() instead of figuring out the name directly. g['SO'] should be set to '.pyd'. Adjust some minor coding nits. --- sysconfig.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 0e40cbc350..e291aec21e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -19,9 +19,12 @@ def get_config_h_filename(): """Return full pathname of installed config.h file.""" - return os.path.join(exec_prefix, - "include", "python" + sys.version[:3], - "config.h") + if os.name == "nt": + return os.path.join(exec_prefix, "include", "config.h") + else: + return os.path.join(exec_prefix, + "include", "python" + sys.version[:3], + "config.h") def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" @@ -136,20 +139,20 @@ def _init_posix(): def _init_nt(): """Initialize the module as appropriate for NT""" - g=globals() + g = globals() # load config.h, though I don't know how useful this is - parse_config_h(open( - os.path.join(exec_prefix, "include", "config.h")), g) + parse_config_h(open(get_config_h_filename()), g) # set basic install directories - g['LIBDEST']=os.path.join(exec_prefix, "Lib") - g['BINLIBDEST']= os.path.join(exec_prefix, "Lib") + g['LIBDEST'] = os.path.join(exec_prefix, "Lib") + g['BINLIBDEST'] = os.path.join(exec_prefix, "Lib") # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = os.path.join (prefix, 'include' ) + g['INCLUDEPY'] = os.path.join(prefix, 'include') - g['SO'] = '.dll' + g['SO'] = '.pyd' g['exec_prefix'] = exec_prefix + try: exec "_init_" + os.name except NameError: @@ -158,5 +161,6 @@ def _init_nt(): else: exec "_init_%s()" % os.name + del _init_posix del _init_nt From 0c9bccee1cec8339ed0fa0f331f2730ad2c41d21 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 9 Feb 2000 02:16:14 +0000 Subject: [PATCH 0140/8469] Added 'debug' flag to compile and link method signatures. Doc fix: several paragraphs under 'link_static_lib()' moved to 'link_shared_lib()', where they belong. --- ccompiler.py | 66 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 036cbe9f48..7d2d9f58b7 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -263,6 +263,7 @@ def compile (self, output_dir=None, macros=None, include_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be @@ -277,9 +278,12 @@ def compile (self, undefines a macro. Later definitions/redefinitions/ undefinitions take precedence. - 'include_dirs', if given, must be a list of strings, the directories - to add to the default include file search path for this - compilation only. + 'include_dirs', if given, must be a list of strings, the + directories to add to the default include file search path for + this compilation only. + + 'debug' is a boolean; if true, the compiler will be instructed + to output debug symbols in (or alongside) the object file(s). 'extra_preargs' and 'extra_postargs' are optional lists of extra command-line arguments that will be, respectively, prepended or @@ -295,7 +299,8 @@ def compile (self, def link_static_lib (self, objects, output_libname, - output_dir=None): + output_dir=None, + debug=0): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied @@ -304,8 +309,32 @@ def link_static_lib (self, 'set_libraries()', and the libraries supplied as 'libraries' (if any). - 'output_libname' should be a library name, not a filename; - the filename will be inferred from the library name. + 'output_libname' should be a library name, not a filename; the + filename will be inferred from the library name. 'output_dir' + is the directory where the library file will be put. + + 'debug' is a boolean; if true, debugging information will be + included in the library (note that on most platforms, it is the + compile step where this matters: the 'debug' flag is included + here just for consistency).""" + + pass + + + def link_shared_lib (self, + objects, + output_libname, + output_dir=None, + libraries=None, + library_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + """Link a bunch of stuff together to create a shared library + file. Has the same effect as 'link_static_lib()' except + that the filename inferred from 'output_libname' will most + likely be different, and the type of file generated will + almost certainly be different 'libraries' is a list of libraries to link against. These are library names, not filenames, since they're translated into @@ -321,26 +350,15 @@ def link_static_lib (self, default and those supplied to 'add_library_dir()' and/or 'set_library_dirs()'. + 'debug' is as for 'compile()' and 'link_static_lib()', with the + slight distinction that it actually matters on most platforms + (as opposed to 'link_static_lib()', which includes a 'debug' + flag mostly for form's sake). + 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except of course that they supply command-line arguments - for the particular linker being used).""" - - pass - + for the particular linker being used).""" - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - extra_preargs=None, - extra_postargs=None): - """Link a bunch of stuff together to create a shared library - file. Has the same effect as 'link_static_lib()' except - that the filename inferred from 'output_libname' will most - likely be different, and the type of file generated will - almost certainly be different.""" pass @@ -350,6 +368,7 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared object @@ -367,6 +386,7 @@ def link_executable (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a binary executable From 8c5bff29a20dcd4e9ce9b6bd2b4e96f8e6b31624 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 9 Feb 2000 02:17:00 +0000 Subject: [PATCH 0141/8469] Added 'debug' flags to compile and link methods, and modified code to add '-g' flag to compiler/linker command lines when it's true. --- unixccompiler.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 9ace98606c..cc0d7723ad 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -102,6 +102,7 @@ def compile (self, output_dir=None, macros=None, include_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -149,6 +150,8 @@ def compile (self, # (will have to fix this when I add the ability to build a # new Python) cc_args = ['-c'] + pp_opts + self.ccflags + self.ccflags_shared + if debug: + cc_args[:0] = ['-g'] if extra_preargs: cc_args[:0] = extra_preargs if extra_postargs is None: @@ -194,7 +197,8 @@ def _fix_link_args (self, output_dir, libraries, library_dirs): def link_static_lib (self, objects, output_libname, - output_dir=None): + output_dir=None, + debug=0): if type (objects) not in (ListType, TupleType): raise TypeError, \ @@ -234,6 +238,7 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): # XXX should we sanity check the library name? (eg. no @@ -244,6 +249,7 @@ def link_shared_lib (self, output_dir, libraries, library_dirs, + debug, extra_preargs, extra_postargs) @@ -254,6 +260,7 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -279,6 +286,8 @@ def link_shared_object (self, if self.force or newer: ld_args = self.ldflags_shared + objects + \ lib_opts + ['-o', output_filename] + if debug: + ld_args[:0] = ['-g'] if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -296,6 +305,7 @@ def link_executable (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -318,6 +328,8 @@ def link_executable (self, if self.force or newer: ld_args = objects + lib_opts + ['-o', output_filename] + if debug: + ld_args[:0] = ['-g'] if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: From 04c8638c9348a33880f8025b4cce8dc488117aa1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 9 Feb 2000 02:18:39 +0000 Subject: [PATCH 0142/8469] Added 'debug' flags to compile and link methods, and added dummy code for someone who knows Windows/MSVC++ to come along and add the right flags. Comment noting that 'link_static_lib()' signature is inconsistent with the other compiler classes (uh-oh!) --- msvccompiler.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 10cd6081d3..cf4be0dc43 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -159,6 +159,7 @@ def compile (self, output_dir=None, macros=None, include_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -190,6 +191,8 @@ def compile (self, cc_args = self.compile_options + \ base_pp_opts + \ [outputOpt, inputOpt] + if debug: + pass # XXX what goes here? if extra_preargs: cc_args[:0] = extra_preargs if extra_postargs: @@ -200,15 +203,17 @@ def compile (self, return objectFiles - # XXX this is kind of useless without 'link_binary()' or - # 'link_executable()' or something -- or maybe 'link_static_lib()' - # should not exist at all, and we just have 'link_binary()'? + # XXX the signature of this method is different from CCompiler and + # UnixCCompiler -- but those extra parameters (libraries, library_dirs) + # are actually used. So: are they really *needed*, or can they be + # ditched? If needed, the CCompiler API will have to change... def link_static_lib (self, objects, output_libname, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -223,6 +228,8 @@ def link_static_lib (self, ld_args = self.ldflags_static + lib_opts + \ objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -237,6 +244,7 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): @@ -267,6 +275,8 @@ def link_shared_object (self, ld_args = self.ldflags_shared + lib_opts + \ objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: From f0b2eb38689af9acf61db1e126458b28f36dff7d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 9 Feb 2000 02:19:49 +0000 Subject: [PATCH 0143/8469] Added 'debug' option (just there for 'build_ext' and 'build_lib' commands to fallback to if the user doesn't set it for those commands. --- command/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build.py b/command/build.py index 768db12062..82a4e6c292 100644 --- a/command/build.py +++ b/command/build.py @@ -20,6 +20,8 @@ class Build (Command): "directory for platform-shared files"), ('build-platlib=', 'p', "directory for platform-specific files"), + ('debug', 'g', + "compile extensions and libraries with debugging information"), ] def set_default_options (self): @@ -28,6 +30,7 @@ def set_default_options (self): # (unless overridden by the user or client) self.build_lib = None self.build_platlib = None + self.debug = None def set_final_options (self): # 'build_lib' and 'build_platlib' just default to 'lib' and From bc5bb15bc3510ccab5986fd22151e75d33776a46 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 9 Feb 2000 02:20:14 +0000 Subject: [PATCH 0144/8469] Added 'debug' option, and changed compile/link calls to use it. --- command/build_clib.py | 12 +++++++++--- command/build_ext.py | 16 ++++++++++++---- command/build_lib.py | 12 +++++++++--- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index c638fd5ffc..6571281816 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -28,7 +28,9 @@ class BuildLib (Command): - options = [] + options = [('debug', 'g', + "compile with debugging information"), + ] def set_default_options (self): # List of libraries to build @@ -38,10 +40,13 @@ def set_default_options (self): self.include_dirs = None self.define = None self.undef = None + self.debug = None # set_default_options() def set_final_options (self): + self.set_undefined_options ('build', + ('debug', 'debug')) self.libraries = self.distribution.libraries if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] @@ -146,12 +151,13 @@ def build_libraries (self, libraries): objects = self.compiler.compile (sources, macros=macros, include_dirs=include_dirs, - output_dir=lib_dir) + output_dir=lib_dir, + debug=self.debug) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name) + self.compiler.link_static_lib (objects, lib_name, debug=self.debug) # for libraries diff --git a/command/build_ext.py b/command/build_ext.py index 0f2d1a7bf3..14c2234e3c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -58,6 +58,8 @@ class BuildExt (Command): "directories to search for shared C libraries at runtime"), ('link-objects=', 'O', "extra explicit link objects to include in the link"), + ('debug', 'g', + "compile/link with debugging information"), ] @@ -73,12 +75,15 @@ def set_default_options (self): self.library_dirs = None self.rpath = None self.link_objects = None + self.debug = None def set_final_options (self): from distutils import sysconfig - self.set_undefined_options ('build', ('build_platlib', 'build_dir')) + self.set_undefined_options ('build', + ('build_platlib', 'build_dir'), + ('debug', 'debug')) if self.package is None: self.package = self.distribution.ext_package @@ -223,7 +228,8 @@ def build_extensions (self, extensions): include_dirs = build_info.get ('include_dirs') self.compiler.compile (sources, macros=macros, - include_dirs=include_dirs) + include_dirs=include_dirs, + debug=self.debug) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things @@ -236,7 +242,8 @@ def build_extensions (self, extensions): library_dirs = build_info.get ('library_dirs') extra_args = build_info.get ('extra_link_args') or [] if self.compiler.compiler_type == 'msvc': - extra_args.append ('/export:init%s' % extension_name) + mod_name = string.split (extension_name, '.')[-1] + extra_args.append ('/export:init%s' % mod_name) ext_filename = self.extension_filename \ (extension_name, self.package) @@ -246,7 +253,8 @@ def build_extensions (self, extensions): self.compiler.link_shared_object (objects, ext_filename, libraries=libraries, library_dirs=library_dirs, - extra_postargs=extra_args) + extra_postargs=extra_args, + debug=self.debug) # build_extensions () diff --git a/command/build_lib.py b/command/build_lib.py index c638fd5ffc..6571281816 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -28,7 +28,9 @@ class BuildLib (Command): - options = [] + options = [('debug', 'g', + "compile with debugging information"), + ] def set_default_options (self): # List of libraries to build @@ -38,10 +40,13 @@ def set_default_options (self): self.include_dirs = None self.define = None self.undef = None + self.debug = None # set_default_options() def set_final_options (self): + self.set_undefined_options ('build', + ('debug', 'debug')) self.libraries = self.distribution.libraries if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] @@ -146,12 +151,13 @@ def build_libraries (self, libraries): objects = self.compiler.compile (sources, macros=macros, include_dirs=include_dirs, - output_dir=lib_dir) + output_dir=lib_dir, + debug=self.debug) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name) + self.compiler.link_static_lib (objects, lib_name, debug=self.debug) # for libraries From b1228096c7a2efeaab3d677ec72cdb912c0d5252 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 10 Feb 2000 02:15:52 +0000 Subject: [PATCH 0145/8469] Patch from Thomas heller: * don't need to mention python.lib -- it's done by a pragma * add debug flags for compile and link, and use them * fix 'link_shared_library()' to pass everything to 'link_shared_object()' * change filename when shared object with debug info (ugh) --- msvccompiler.py | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index cf4be0dc43..7c179782df 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -114,10 +114,6 @@ def __init__ (self, CCompiler.__init__ (self, verbose, dry_run, force) - # XXX This is a nasty dependency to add on something otherwise - # pretty clean. move it to build_ext under an nt specific part. - # shared libraries need to link against python15.lib - self.add_library ( "python" + sys.version[0] + sys.version[2] ) self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) self.cc = _find_exe("cl.exe") @@ -133,8 +129,14 @@ def __init__ (self, os.environ['path'] = string.join(path,';') self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD' ] + self.compile_options_debug = [ + '/nologo', '/Od', '/MDd', '/Z7', '/D_DEBUG' + ] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' + ] self.ldflags_static = [ '/nologo'] @@ -175,6 +177,11 @@ def compile (self, self.include_dirs + include_dirs) base_pp_opts.append('/c') + + if debug: + compile_options = self.compile_options_debug + else: + compile_options = self.compile_options for srcFile in sources: base,ext = os.path.splitext(srcFile) @@ -188,11 +195,10 @@ def compile (self, inputOpt = fileOpt + srcFile outputOpt = "/Fo" + objFile - cc_args = self.compile_options + \ + cc_args = compile_options + \ base_pp_opts + \ [outputOpt, inputOpt] - if debug: - pass # XXX what goes here? + if extra_preargs: cc_args[:0] = extra_preargs if extra_postargs: @@ -251,7 +257,14 @@ def link_shared_lib (self, # XXX should we sanity check the library name? (eg. no # slashes) self.link_shared_object (objects, - self.shared_library_name(output_libname)) + self.shared_library_name(output_libname), + output_dir=output_dir, + libraries=libraries, + library_dirs=library_dirs, + debug=debug, + extra_preargs=extra_preargs, + extra_postargs=extra_postargs) + def link_shared_object (self, objects, @@ -259,6 +272,7 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + debug=0, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared object @@ -273,10 +287,18 @@ def link_shared_object (self, self.library_dirs + library_dirs, self.libraries + libraries) - ld_args = self.ldflags_shared + lib_opts + \ - objects + ['/OUT:' + output_filename] if debug: - pass # XXX what goes here? + ldflags = self.ldflags_shared_debug + basename, ext = os.path.splitext (output_filename) + #XXX not sure this belongs here + # extensions in debug_mode are named 'module_d.pyd' + output_filename = basename + '_d' + ext + else: + ldflags = self.ldflags_shared + + ld_args = ldflags + lib_opts + \ + objects + ['/OUT:' + output_filename] + if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: From e9cac8bea6e2f62aa1dd28e6c91958394ba0aecf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 10 Feb 2000 02:17:06 +0000 Subject: [PATCH 0146/8469] Path from Thomas Heller: resurrect the .def file kludge while preserving the /export option mini-kludge. --- command/build_ext.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 14c2234e3c..42eab4796d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -241,9 +241,21 @@ def build_extensions (self, extensions): libraries = build_info.get ('libraries') library_dirs = build_info.get ('library_dirs') extra_args = build_info.get ('extra_link_args') or [] + if self.compiler.compiler_type == 'msvc': - mod_name = string.split (extension_name, '.')[-1] - extra_args.append ('/export:init%s' % mod_name) + def_file = build_info.get ('def_file') + if def_file is None: + source_dir = os.path.dirname (sources[0]) + ext_base = (string.split (extension_name, '.'))[-1] + def_file = os.path.join (source_dir, "%s.def" % ext_base) + if not os.path.exists (def_file): + def_file = None + + if def_file is not None: + extra_args.append ('/DEF:' + def_file) + else: + modname = string.split (extension_name, '.')[-1] + extra_args.append('/export:init%s'%modname) ext_filename = self.extension_filename \ (extension_name, self.package) From 5d779ebd6d24ee05e11c670f6ed2bac639b33a6d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 10 Feb 2000 02:51:32 +0000 Subject: [PATCH 0147/8469] Typecheck 'output_dir' argument to compile/link methods. --- unixccompiler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unixccompiler.py b/unixccompiler.py index cc0d7723ad..770a543c75 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -106,6 +106,8 @@ def compile (self, extra_preargs=None, extra_postargs=None): + if type (output_dir) not in (StringType, NoneType): + raise TypeError, "'output_dir' must be a string or None" if output_dir is None: output_dir = self.output_dir if macros is None: @@ -205,6 +207,8 @@ def link_static_lib (self, "'objects' must be a list or tuple of strings" objects = list (objects) + if type (output_dir) not in (StringType, NoneType): + raise TypeError, "'output_dir' must be a string or None" if output_dir is None: output_dir = self.output_dir @@ -270,6 +274,8 @@ def link_shared_object (self, lib_opts = gen_lib_options (self, self.library_dirs + library_dirs, self.libraries + libraries) + if type (output_dir) not in (StringType, NoneType): + raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) From 7fffec2291d4e832411729c8d653c2cbce6a17f7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 10 Feb 2000 02:52:42 +0000 Subject: [PATCH 0148/8469] Stylistic changes to the registry-grovelling code: code formatting, changed function names, dbetter (hopefully) ocstrings, and comments. --- msvccompiler.py | 74 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 7c179782df..90ebae0a58 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -15,17 +15,26 @@ from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options -def _devstudio_versions(): - "Get a list of devstudio versions" + +def get_devstudio_versions (): + + """Get list of devstudio versions from the Windows registry. Return a + list of strings (???) containing version numbers; the list will be + empty if we were unable to access the registry (eg. couldn't import + a registry-access module) or the appropriate registry keys weren't + found. (XXX is this correct???)""" try: import win32api import win32con except ImportError: - return None + return [] K = 'Software\\Microsoft\\Devstudio' L = [] - for base in (win32con.HKEY_CLASSES_ROOT,win32con.HKEY_LOCAL_MACHINE,win32con.HKEY_CURRENT_USER,win32con.HKEY_USERS): + for base in (win32con.HKEY_CLASSES_ROOT, + win32con.HKEY_LOCAL_MACHINE, + win32con.HKEY_CURRENT_USER, + win32con.HKEY_USERS): try: k = win32api.RegOpenKeyEx(base,K) i = 0 @@ -43,8 +52,11 @@ def _devstudio_versions(): L.reverse() return L -def _msvc_get_paths(path, vNum='6.0', platform='x86'): - "Get a devstudio path (include, lib or path)" +# get_devstudio_versions () + + +def get_msvc_paths (path, version='6.0', platform='x86'): + """Get a devstudio path (include, lib or path).""" try: import win32api import win32con @@ -52,21 +64,26 @@ def _msvc_get_paths(path, vNum='6.0', platform='x86'): return None L = [] - if path=='lib': path= 'Library' + if path=='lib': + path= 'Library' path = string.upper(path + ' Dirs') - K = 'Software\\Microsoft\\Devstudio\\%s\\Build System\\Components\\Platforms\\Win32 (%s)\\Directories' \ - % (vNum,platform) - for base in (win32con.HKEY_CLASSES_ROOT,win32con.HKEY_LOCAL_MACHINE,win32con.HKEY_CURRENT_USER,win32con.HKEY_USERS): + K = ('Software\\Microsoft\\Devstudio\\%s\\' + + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ + (version,platform) + for base in (win32con.HKEY_CLASSES_ROOT, + win32con.HKEY_LOCAL_MACHINE, + win32con.HKEY_CURRENT_USER, + win32con.HKEY_USERS): try: k = win32api.RegOpenKeyEx(base,K) i = 0 while 1: try: (p,v,t) = win32api.RegEnumValue(k,i) - if string.upper(p)==path: + if string.upper(p) == path: V = string.split(v,';') for v in V: - if v=='' or v in L: continue + if v == '' or v in L: continue L.append(v) break i = i + 1 @@ -76,30 +93,41 @@ def _msvc_get_paths(path, vNum='6.0', platform='x86'): pass return L +# get_msvc_paths() + + def _find_exe(exe): - for v in _devstudio_versions(): - for p in _msvc_get_paths('path',v): - fn=os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): return fn + for v in get_devstudio_versions(): + for p in get_msvc_paths('path',v): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn #didn't find it; try existing path try: for p in string.split(os.environ['Path'],';'): fn=os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): return fn - except: + if os.path.isfile(fn): + return fn + # XXX BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD !!!!!!!!!!!!!!!! + except: # XXX WHAT'S BEING CAUGHT HERE?!?!? pass return exe #last desperate hope + def _find_SET(n): - for v in _devstudio_versions(): - p=_msvc_get_paths(n,v) - if p!=[]: return p + for v in get_devstudio_versions(): + p = get_msvc_paths(n,v) + if p: + return p return [] + def _do_SET(n): - p=_find_SET(n) - if p!=[]: os.environ[n]=string.join(p,';') + p = _find_SET(n) + if p: + os.environ[n] = string.join(p,';') + class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, From 8224dcdac16e8f63eb008892d84bd192e245b11f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 11 Feb 2000 02:47:15 +0000 Subject: [PATCH 0149/8469] Latest patch from Thomas Heller/Robin Becker: * tweak my docstrings * fix None returns to empty list * reshuffle responsibilities between '_find_exe()', '_find_SET()', and the MSVCCompiler constructor -- now the constructor worries about fetching the version list and determining the most recent one * added "/W3" compile option Also, I added/tweaked some docstrings. --- msvccompiler.py | 115 ++++++++++++++++++++++++++++-------------------- 1 file changed, 68 insertions(+), 47 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 90ebae0a58..3073aaea32 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -17,12 +17,12 @@ def get_devstudio_versions (): - """Get list of devstudio versions from the Windows registry. Return a - list of strings (???) containing version numbers; the list will be + list of strings containing version numbers; the list will be empty if we were unable to access the registry (eg. couldn't import a registry-access module) or the appropriate registry keys weren't - found. (XXX is this correct???)""" + found.""" + try: import win32api import win32con @@ -56,12 +56,15 @@ def get_devstudio_versions (): def get_msvc_paths (path, version='6.0', platform='x86'): - """Get a devstudio path (include, lib or path).""" + """Get a list of devstudio directories (include, lib or path). Return + a list of strings; will be empty list if unable to access the + registry or appropriate registry keys not found.""" + try: import win32api import win32con except ImportError: - return None + return [] L = [] if path=='lib': @@ -96,37 +99,45 @@ def get_msvc_paths (path, version='6.0', platform='x86'): # get_msvc_paths() -def _find_exe(exe): - for v in get_devstudio_versions(): - for p in get_msvc_paths('path',v): - fn = os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): - return fn +def find_exe (exe, version_number): + """Try to find an MSVC executable program 'exe' (from version + 'version_number' of MSVC) in several places: first, one of the MSVC + program search paths from the registry; next, the directories in the + PATH environment variable. If any of those work, return an absolute + path that is known to exist. If none of them work, just return the + original program name, 'exe'.""" - #didn't find it; try existing path - try: - for p in string.split(os.environ['Path'],';'): - fn=os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): - return fn - # XXX BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD !!!!!!!!!!!!!!!! - except: # XXX WHAT'S BEING CAUGHT HERE?!?!? - pass - return exe #last desperate hope - - -def _find_SET(n): - for v in get_devstudio_versions(): - p = get_msvc_paths(n,v) - if p: - return p - return [] - - -def _do_SET(n): - p = _find_SET(n) + for p in get_msvc_paths ('path', version_number): + fn = os.path.join (os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + + # didn't find it; try existing path + for p in string.split (os.environ['Path'],';'): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn + + return exe # last desperate hope + + +def _find_SET(name,version_number): + """looks up in the registry and returns a list of values suitable for + use in a SET command eg SET name=value. Normally the value will be a + ';' separated list similar to a path list. + + name is the name of an MSVC path and version_number is a version_number + of an MSVC installation.""" + return get_msvc_paths(name, version_number) + + +def _do_SET(name, version_number): + """sets os.environ[name] to an MSVC path type value obtained from + _find_SET. This is equivalent to a SET command prior to execution of + spawned commands.""" + p=_find_SET(name, version_number) if p: - os.environ[n] = string.join(p,';') + os.environ[name]=string.join(p,';') class MSVCCompiler (CCompiler) : @@ -144,21 +155,31 @@ def __init__ (self, self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) - self.cc = _find_exe("cl.exe") - self.link = _find_exe("link.exe") - _do_SET('lib') - _do_SET('include') - path=_find_SET('path') - try: - for p in string.split(os.environ['path'],';'): - path.append(p) - except KeyError: - pass - os.environ['path'] = string.join(path,';') + vNum = get_devstudio_versions () + + if vNum: + vNum = vNum[0] # highest version + + self.cc = _find_exe("cl.exe", vNum) + self.link = _find_exe("link.exe", vNum) + _do_SET('lib', vNum) + _do_SET('include', vNum) + path=_find_SET('path', vNum) + try: + for p in string.split(os.environ['path'],';'): + path.append(p) + except KeyError: + pass + os.environ['path'] = string.join(path,';') + else: + # devstudio not found in the registry + self.cc = "cl.exe" + self.link = "link.exe" + self.preprocess_options = None - self.compile_options = [ '/nologo', '/Ox', '/MD' ] + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3' ] self.compile_options_debug = [ - '/nologo', '/Od', '/MDd', '/Z7', '/D_DEBUG' + '/nologo', '/Od', '/MDd', '/W3', '/Z7', '/D_DEBUG' ] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] From eed228691703b5775b5ad0a6f626d20e73b72091 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 11 Feb 2000 02:52:39 +0000 Subject: [PATCH 0150/8469] Ditched '_find_SET()', since it was a no-value-added wrapper around 'get_msvc_paths()'. Renamed '_do_SET()' to 'set_path_env_var()', tweaked docstring, and cosmetically tweaked code. Stylistic changes to MSVCCompiler constructor (variable renaming and type consistency). --- msvccompiler.py | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 3073aaea32..e489c1c86e 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -121,23 +121,14 @@ def find_exe (exe, version_number): return exe # last desperate hope -def _find_SET(name,version_number): - """looks up in the registry and returns a list of values suitable for - use in a SET command eg SET name=value. Normally the value will be a - ';' separated list similar to a path list. +def set_path_env_var (name, version_number): + """Set environment variable 'name' to an MSVC path type value obtained + from 'get_msvc_paths()'. This is equivalent to a SET command prior + to execution of spawned commands.""" - name is the name of an MSVC path and version_number is a version_number - of an MSVC installation.""" - return get_msvc_paths(name, version_number) - - -def _do_SET(name, version_number): - """sets os.environ[name] to an MSVC path type value obtained from - _find_SET. This is equivalent to a SET command prior to execution of - spawned commands.""" - p=_find_SET(name, version_number) + p = get_msvc_paths (name, version_number) if p: - os.environ[name]=string.join(p,';') + os.environ[name] = string.join (p,';') class MSVCCompiler (CCompiler) : @@ -155,16 +146,16 @@ def __init__ (self, self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) - vNum = get_devstudio_versions () + versions = get_devstudio_versions () - if vNum: - vNum = vNum[0] # highest version + if versions: + version = versions[0] # highest version - self.cc = _find_exe("cl.exe", vNum) - self.link = _find_exe("link.exe", vNum) - _do_SET('lib', vNum) - _do_SET('include', vNum) - path=_find_SET('path', vNum) + self.cc = _find_exe("cl.exe", version) + self.link = _find_exe("link.exe", version) + set_path_env_var ('lib', version) + set_path_env_var ('include', version) + path=get_msvc_paths('path', version) try: for p in string.split(os.environ['path'],';'): path.append(p) From 333dbe885f8da8229084192e350fcf4d4881ada8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 17 Feb 2000 23:54:55 +0000 Subject: [PATCH 0151/8469] The 'dist' command is dead -- long live the 'sdist' command! --- command/dist.py | 558 ------------------------------------------------ 1 file changed, 558 deletions(-) delete mode 100644 command/dist.py diff --git a/command/dist.py b/command/dist.py deleted file mode 100644 index ea61a4806e..0000000000 --- a/command/dist.py +++ /dev/null @@ -1,558 +0,0 @@ -"""distutils.command.dist - -Implements the Distutils 'dist' command (create a source distribution).""" - -# created 1999/09/22, Greg Ward - -__rcsid__ = "$Id$" - -import sys, os, string, re -import fnmatch -from types import * -from glob import glob -from shutil import rmtree -from distutils.core import Command -from distutils.text_file import TextFile -from distutils.errors import DistutilsExecError - - -# Possible modes of operation: -# - require an explicit manifest that lists every single file (presumably -# along with a way to auto-generate the manifest) -# - require an explicit manifest, but allow it to have globs or -# filename patterns of some kind (and also have auto-generation) -# - allow an explict manifest, but automatically augment it at runtime -# with the source files mentioned in 'packages', 'py_modules', and -# 'ext_modules' (and any other such things that might come along) - -# I'm liking the third way. Possible gotchas: -# - redundant specification: 'packages' includes 'foo' and manifest -# includes 'foo/*.py' -# - obvious conflict: 'packages' includes 'foo' and manifest -# includes '! foo/*.py' (can't imagine why you'd want this) -# - subtle conflict: 'packages' includes 'foo' and manifest -# includes '! foo/bar.py' (this could well be desired: eg. exclude -# an experimental module from distribution) - -# Syntax for the manifest file: -# - if a line is just a Unix-style glob by itself, it's a "simple include -# pattern": go find all files that match and add them to the list -# of files -# - if a line is a glob preceded by "!", then it's a "simple exclude -# pattern": go over the current list of files and exclude any that -# match the glob pattern -# - if a line consists of a directory name followed by zero or more -# glob patterns, then we'll recursively explore that directory tree -# - the glob patterns can be include (no punctuation) or exclude -# (prefixed by "!", no space) -# - if no patterns given or the first pattern is not an include pattern, -# then assume "*" -- ie. find everything (and then start applying -# the rest of the patterns) -# - the patterns are given in order of increasing precedence, ie. -# the *last* one to match a given file applies to it -# -# example (ignoring auto-augmentation!): -# distutils/*.py -# distutils/command/*.py -# ! distutils/bleeding_edge.py -# examples/*.py -# examples/README -# -# smarter way (that *will* include distutils/command/bleeding_edge.py!) -# distutils *.py -# ! distutils/bleeding_edge.py -# examples !*~ !*.py[co] (same as: examples * !*~ !*.py[co]) -# test test_* *.txt !*~ !*.py[co] -# README -# setup.py -# -# The actual Distutils manifest (don't need to mention source files, -# README, setup.py -- they're automatically distributed!): -# examples !*~ !*.py[co] -# test !*~ !*.py[co] - -# The algorithm that will make it work: -# files = stuff from 'packages', 'py_modules', 'ext_modules', -# plus README, setup.py, ... ? -# foreach pattern in manifest file: -# if simple-include-pattern: # "distutils/*.py" -# files.append (glob (pattern)) -# elif simple-exclude-pattern: # "! distutils/foo*" -# xfiles = glob (pattern) -# remove all xfiles from files -# elif recursive-pattern: # "examples" (just a directory name) -# patterns = rest-of-words-on-line -# dir_files = list of all files under dir -# if patterns: -# if patterns[0] is an exclude-pattern: -# insert "*" at patterns[0] -# for file in dir_files: -# for dpattern in reverse (patterns): -# if file matches dpattern: -# if dpattern is an include-pattern: -# files.append (file) -# else: -# nothing, don't include it -# next file -# else: -# files.extend (dir_files) # ie. accept all of them - - -# Anyways, this is all implemented below -- BUT it is largely untested; I -# know it works for the simple case of distributing the Distutils, but -# haven't tried it on more complicated examples. Undoubtedly doing so will -# reveal bugs and cause delays, so I'm waiting until after I've released -# Distutils 0.1. - - -# Other things we need to look for in creating a source distribution: -# - make sure there's a README -# - make sure the distribution meta-info is supplied and non-empty -# (*must* have name, version, ((author and author_email) or -# (maintainer and maintainer_email)), url -# -# Frills: -# - make sure the setup script is called "setup.py" -# - make sure the README refers to "setup.py" (ie. has a line matching -# /^\s*python\s+setup\.py/) - -# A crazy idea that conflicts with having/requiring 'version' in setup.py: -# - make sure there's a version number in the "main file" (main file -# is __init__.py of first package, or the first module if no packages, -# or the first extension module if no pure Python modules) -# - XXX how do we look for __version__ in an extension module? -# - XXX do we import and look for __version__? or just scan source for -# /^__version__\s*=\s*"[^"]+"/ ? -# - what about 'version_from' as an alternative to 'version' -- then -# we know just where to search for the version -- no guessing about -# what the "main file" is - - - -class Dist (Command): - - description = "create a source distribution (tarball, zip file, etc.)" - - options = [('formats=', None, - "formats for source distribution (tar, ztar, gztar, or zip)"), - ('manifest=', 'm', - "name of manifest file"), - ('list-only', 'l', - "just list files that would be distributed"), - ('keep-tree', 'k', - "keep the distribution tree around after creating " + - "archive file(s)"), - ] - - default_format = { 'posix': 'gztar', - 'nt': 'zip' } - - exclude_re = re.compile (r'\s*!\s*(\S+)') # for manifest lines - - - def set_default_options (self): - self.formats = None - self.manifest = None - self.list_only = 0 - self.keep_tree = 0 - - - def set_final_options (self): - if self.formats is None: - try: - self.formats = [self.default_format[os.name]] - except KeyError: - raise DistutilsPlatformError, \ - "don't know how to build source distributions on " + \ - "%s platform" % os.name - elif type (self.formats) is StringType: - self.formats = string.split (self.formats, ',') - - if self.manifest is None: - self.manifest = "MANIFEST" - - - def run (self): - - self.check_metadata () - - self.files = [] - self.find_defaults () - self.read_manifest () - - if self.list_only: - for f in self.files: - print f - - else: - self.make_distribution () - - - def check_metadata (self): - - dist = self.distribution - - missing = [] - for attr in ('name', 'version', 'url'): - if not (hasattr (dist, attr) and getattr (dist, attr)): - missing.append (attr) - - if missing: - self.warn ("missing required meta-data: " + - string.join (missing, ", ")) - - if dist.author: - if not dist.author_email: - self.warn ("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") - elif dist.maintainer: - if not dist.maintainer_email: - self.warn ("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") - else: - self.warn ("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") - - # check_metadata () - - - def find_defaults (self): - - standards = [('README', 'README.txt'), 'setup.py'] - for fn in standards: - if type (fn) is TupleType: - alts = fn - for fn in alts: - if os.path.exists (fn): - got_it = 1 - self.files.append (fn) - break - - if not got_it: - self.warn ("standard file not found: should have one of " + - string.join (alts, ', ')) - else: - if os.path.exists (fn): - self.files.append (fn) - else: - self.warn ("standard file %s not found" % fn) - - optional = ['test/test*.py'] - for pattern in optional: - files = filter (os.path.isfile, glob (pattern)) - if files: - self.files.extend (files) - - if self.distribution.packages or self.distribution.py_modules: - build_py = self.find_peer ('build_py') - build_py.ensure_ready () - self.files.extend (build_py.get_source_files ()) - - if self.distribution.ext_modules: - build_ext = self.find_peer ('build_ext') - build_ext.ensure_ready () - self.files.extend (build_ext.get_source_files ()) - - - - def open_manifest (self, filename): - return TextFile (filename, - strip_comments=1, - skip_blanks=1, - join_lines=1, - lstrip_ws=1, - rstrip_ws=1, - collapse_ws=1) - - - def search_dir (self, dir, patterns): - - allfiles = findall (dir) - if patterns: - if patterns[0][0] == "!": # starts with an exclude spec? - patterns.insert (0, "*")# then accept anything that isn't - # explicitly excluded - - act_patterns = [] # "action-patterns": (include,regexp) - # tuples where include is a boolean - for pattern in patterns: - if pattern[0] == '!': - act_patterns.append \ - ((0, re.compile (fnmatch.translate (pattern[1:])))) - else: - act_patterns.append \ - ((1, re.compile (fnmatch.translate (pattern)))) - act_patterns.reverse() - - - files = [] - for file in allfiles: - for (include,regexp) in act_patterns: - if regexp.search (file): - if include: - files.append (file) - break # continue to next file - else: - files = allfiles - - return files - - # search_dir () - - - def exclude_files (self, pattern): - - regexp = re.compile (fnmatch.translate (pattern)) - for i in range (len (self.files)-1, -1, -1): - if regexp.search (self.files[i]): - del self.files[i] - - - def read_manifest (self): - - # self.files had better already be defined (and hold the - # "automatically found" files -- Python modules and extensions, - # README, setup script, ...) - assert self.files is not None - - try: - manifest = self.open_manifest (self.manifest) - except IOError, exc: - if type (exc) is InstanceType and hasattr (exc, 'strerror'): - msg = "could not open MANIFEST (%s)" % \ - string.lower (exc.strerror) - else: - msg = "could not open MANIFST" - - self.warn (msg + ": using default file list") - return - - while 1: - - pattern = manifest.readline() - if pattern is None: # end of file - break - - # Cases: - # 1) simple-include: "*.py", "foo/*.py", "doc/*.html", "FAQ" - # 2) simple-exclude: same, prefaced by ! - # 3) recursive: multi-word line, first word a directory - - exclude = self.exclude_re.match (pattern) - if exclude: - pattern = exclude.group (1) - - words = string.split (pattern) - assert words # must have something! - if os.name != 'posix': - words[0] = apply (os.path.join, string.split (words[0], '/')) - - # First word is a directory, possibly with include/exclude - # patterns making up the rest of the line: it's a recursive - # pattern - if os.path.isdir (words[0]): - if exclude: - manifest.warn ("exclude (!) doesn't apply to " + - "whole directory trees") - continue - - dir_files = self.search_dir (words[0], words[1:]) - self.files.extend (dir_files) - - # Multiple words in pattern: that's a no-no unless the first - # word is a directory name - elif len (words) > 1: - manifest.warn ("can't have multiple words unless first word " + - "('%s') is a directory name" % words[0]) - continue - - # Single word, no bang: it's a "simple include pattern" - elif not exclude: - matches = filter (os.path.isfile, glob (pattern)) - if matches: - self.files.extend (matches) - else: - manifest.warn ("no matches for '%s' found" % pattern) - - - # Single word prefixed with a bang: it's a "simple exclude pattern" - else: - if self.exclude_files (pattern) == 0: - manifest.warn ("no files excluded by '%s'" % pattern) - - # if/elif/.../else on 'pattern' - - # loop over lines of 'manifest' - - # read_manifest () - - - def make_release_tree (self, base_dir, files): - - # XXX this is Unix-specific - - # First get the list of directories to create - need_dir = {} - for file in files: - need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 - need_dirs = need_dir.keys() - need_dirs.sort() - - # Now create them - for dir in need_dirs: - self.mkpath (dir) - - # And walk over the list of files, either making a hard link (if - # os.link exists) to each one that doesn't already exist in its - # corresponding location under 'base_dir', or copying each file - # that's out-of-date in 'base_dir'. (Usually, all files will be - # out-of-date, because by default we blow away 'base_dir' when - # we're done making the distribution archives.) - - try: - link = os.link - msg = "making hard links in %s..." % base_dir - except AttributeError: - link = 0 - msg = "copying files to %s..." % base_dir - - self.announce (msg) - for file in files: - dest = os.path.join (base_dir, file) - if link: - if not os.path.exists (dest): - self.execute (os.link, (file, dest), - "linking %s -> %s" % (file, dest)) - else: - self.copy_file (file, dest) - - # make_release_tree () - - - def nuke_release_tree (self, base_dir): - try: - self.execute (rmtree, (base_dir,), - "removing %s" % base_dir) - except (IOError, OSError), exc: - if exc.filename: - msg = "error removing %s: %s (%s)" % \ - (base_dir, exc.strerror, exc.filename) - else: - msg = "error removing %s: %s" % (base_dir, exc.strerror) - self.warn (msg) - - - def make_tarball (self, base_dir, compress="gzip"): - - # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- - # but it would be nice to take advantage of it to skip the - # "create a tree of hardlinks" step! (Would also be nice to - # detect GNU tar to use its 'z' option and save a step.) - - if compress is not None and compress not in ('gzip', 'compress'): - raise ValueError, \ - "if given, 'compress' must be 'gzip' or 'compress'" - - archive_name = base_dir + ".tar" - self.spawn (["tar", "-cf", archive_name, base_dir]) - - if compress: - self.spawn ([compress, archive_name]) - - - def make_zipfile (self, base_dir): - - # This initially assumed the Unix 'zip' utility -- but - # apparently InfoZIP's zip.exe works the same under Windows, so - # no changes needed! - - try: - self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) - except DistutilsExecError: - - # XXX really should distinguish between "couldn't find - # external 'zip' command" and "zip failed" -- shouldn't try - # again in the latter case. (I think fixing this will - # require some cooperation from the spawn module -- perhaps - # a utility function to search the path, so we can fallback - # on zipfile.py without the failed spawn.) - try: - import zipfile - except ImportError: - raise DistutilsExecError, \ - ("unable to create zip file '%s.zip': " + - "could neither find a standalone zip utility nor " + - "import the 'zipfile' module") % base_dir - - z = zipfile.ZipFile (base_dir + ".zip", "wb", - compression=zipfile.ZIP_DEFLATED) - - def visit (z, dirname, names): - for name in names: - path = os.path.join (dirname, name) - if os.path.isfile (path): - z.write (path, path) - - os.path.walk (base_dir, visit, z) - z.close() - - - def make_distribution (self): - - # Don't warn about missing meta-data here -- should be done - # elsewhere. - name = self.distribution.name or "UNKNOWN" - version = self.distribution.version - - if version: - base_dir = "%s-%s" % (name, version) - else: - base_dir = name - - # Remove any files that match "base_dir" from the fileset -- we - # don't want to go distributing the distribution inside itself! - self.exclude_files (base_dir + "*") - - self.make_release_tree (base_dir, self.files) - for fmt in self.formats: - if fmt == 'gztar': - self.make_tarball (base_dir, compress='gzip') - elif fmt == 'ztar': - self.make_tarball (base_dir, compress='compress') - elif fmt == 'tar': - self.make_tarball (base_dir, compress=None) - elif fmt == 'zip': - self.make_zipfile (base_dir) - - if not self.keep_tree: - self.nuke_release_tree (base_dir) - -# class Dist - - -# ---------------------------------------------------------------------- -# Utility functions - -def findall (dir = os.curdir): - """Find all files under 'dir' and return the sorted list of full - filenames (relative to 'dir').""" - - list = [] - stack = [dir] - pop = stack.pop - push = stack.append - - while stack: - dir = pop() - names = os.listdir (dir) - - for name in names: - fullname = os.path.join (dir, name) - list.append (fullname) - if os.path.isdir (fullname) and not os.path.islink(fullname): - push (fullname) - - list.sort() - return list From 5caa9f1cf7ce67b78a7db4f2a177ac5a7e5cb16b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 17 Feb 2000 23:56:15 +0000 Subject: [PATCH 0152/8469] The 'sdist' command to create a source distribution. This is derived from the old 'dist' command, but the code for dealing with manifests is completely redone -- and renaming the command to 'sdist' is more symmetric with the soon-to-exist 'bdist' command. --- command/sdist.py | 716 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 716 insertions(+) create mode 100644 command/sdist.py diff --git a/command/sdist.py b/command/sdist.py new file mode 100644 index 0000000000..c8101a708e --- /dev/null +++ b/command/sdist.py @@ -0,0 +1,716 @@ +"""distutils.command.sdist + +Implements the Distutils 'sdist' command (create a source distribution).""" + +# created 1999/09/22, Greg Ward + +__rcsid__ = "$Id$" + +import sys, os, string, re +import fnmatch +from types import * +from glob import glob +from shutil import rmtree +from distutils.core import Command +from distutils.util import newer +from distutils.text_file import TextFile +from distutils.errors import DistutilsExecError + + +class Sdist (Command): + + description = "create a source distribution (tarball, zip file, etc.)" + + options = [('template=', 't', + "name of manifest template file [default: MANIFEST.in]"), + ('manifest=', 'm', + "name of manifest file [default: MANIFEST]"), + ('use-defaults', None, + "include the default file set in the manifest " + "[default; disable with --no-defaults]"), + ('manifest-only', None, + "just regenerate the manifest and then stop"), + ('force-manifest', None, + "forcibly regenerate the manifest and carry on as usual"), + + ('formats=', None, + "formats for source distribution (tar, ztar, gztar, or zip)"), + ('list-only', 'l', + "just list files that would be distributed"), + ('keep-tree', 'k', + "keep the distribution tree around after creating " + + "archive file(s)"), + ] + negative_opts = {'use-defaults': 'no-defaults'} + + default_format = { 'posix': 'gztar', + 'nt': 'zip' } + + exclude_re = re.compile (r'\s*!\s*(\S+)') # for manifest lines + + + def set_default_options (self): + # 'template' and 'manifest' are, respectively, the names of + # the manifest template and manifest file. + self.template = None + self.manifest = None + + # 'use_defaults': if true, we will include the default file set + # in the manifest + self.use_defaults = 1 + + self.manifest_only = 0 + self.force_manifest = 0 + + self.formats = None + self.list_only = 0 + self.keep_tree = 0 + + + def set_final_options (self): + if self.manifest is None: + self.manifest = "MANIFEST" + if self.template is None: + self.template = "MANIFEST.in" + + if self.formats is None: + try: + self.formats = [self.default_format[os.name]] + except KeyError: + raise DistutilsPlatformError, \ + "don't know how to build source distributions on " + \ + "%s platform" % os.name + elif type (self.formats) is StringType: + self.formats = string.split (self.formats, ',') + + + def run (self): + + # 'files' is the list of files that will make up the manifest + self.files = [] + + # Ensure that all required meta-data is given; warn if not (but + # don't die, it's not *that* serious!) + self.check_metadata () + + # Do whatever it takes to get the list of files to process + # (process the manifest template, read an existing manifest, + # whatever). File list is put into 'self.files'. + self.get_file_list () + + # If user just wanted us to regenerate the manifest, stop now. + if self.manifest_only: + return + + # Otherwise, go ahead and create the source distribution tarball, + # or zipfile, or whatever. + self.make_distribution () + + + def check_metadata (self): + + dist = self.distribution + + missing = [] + for attr in ('name', 'version', 'url'): + if not (hasattr (dist, attr) and getattr (dist, attr)): + missing.append (attr) + + if missing: + self.warn ("missing required meta-data: " + + string.join (missing, ", ")) + + if dist.author: + if not dist.author_email: + self.warn ("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") + elif dist.maintainer: + if not dist.maintainer_email: + self.warn ("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") + else: + self.warn ("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + + "must be supplied") + + # check_metadata () + + + def get_file_list (self): + """Figure out the list of files to include in the source + distribution, and put it in 'self.files'. This might + involve reading the manifest template (and writing the + manifest), or just reading the manifest, or just using + the default file set -- it all depends on the user's + options and the state of the filesystem.""" + + + template_exists = os.path.isfile (self.template) + if template_exists: + template_newer = newer (self.template, self.manifest) + + # Regenerate the manifest if necessary (or if explicitly told to) + if ((template_exists and template_newer) or + self.force_manifest or + self.manifest_only): + + if not template_exists: + self.warn (("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + + # Add default file set to 'files' + if self.use_defaults: + self.find_defaults () + + # Read manifest template if it exists + if template_exists: + self.read_template () + + # File list now complete -- sort it so that higher-level files + # come first + sortable_files = map (os.path.split, self.files) + sortable_files.sort () + self.files = [] + for sort_tuple in sortable_files: + self.files.append (apply (os.path.join, sort_tuple)) + + # Remove duplicates from the file list + for i in range (len(self.files)-1, 0, -1): + if self.files[i] == self.files[i-1]: + del self.files[i] + + # And write complete file list (including default file set) to + # the manifest. + self.write_manifest () + + # Don't regenerate the manifest, just read it in. + else: + self.read_manifest () + + # get_file_list () + + + def find_defaults (self): + + standards = [('README', 'README.txt'), 'setup.py'] + for fn in standards: + if type (fn) is TupleType: + alts = fn + for fn in alts: + if os.path.exists (fn): + got_it = 1 + self.files.append (fn) + break + + if not got_it: + self.warn ("standard file not found: should have one of " + + string.join (alts, ', ')) + else: + if os.path.exists (fn): + self.files.append (fn) + else: + self.warn ("standard file '%s' not found" % fn) + + optional = ['test/test*.py'] + for pattern in optional: + files = filter (os.path.isfile, glob (pattern)) + if files: + self.files.extend (files) + + if self.distribution.packages or self.distribution.py_modules: + build_py = self.find_peer ('build_py') + build_py.ensure_ready () + self.files.extend (build_py.get_source_files ()) + + if self.distribution.ext_modules: + build_ext = self.find_peer ('build_ext') + build_ext.ensure_ready () + self.files.extend (build_ext.get_source_files ()) + + + + def search_dir (self, dir, pattern=None): + """Recursively find files under 'dir' matching 'pattern' (a string + containing a Unix-style glob pattern). If 'pattern' is None, + find all files under 'dir'. Return the list of found + filenames.""" + + allfiles = findall (dir) + if pattern is None: + return allfiles + + pattern_re = translate_pattern (pattern) + files = [] + for file in allfiles: + if pattern_re.match (os.path.basename (file)): + files.append (file) + + return files + + # search_dir () + + + def exclude_pattern (self, pattern): + """Remove filenames from 'self.files' that match 'pattern'.""" + print "exclude_pattern: pattern=%s" % pattern + pattern_re = translate_pattern (pattern) + for i in range (len (self.files)-1, -1, -1): + if pattern_re.match (self.files[i]): + print "removing %s" % self.files[i] + del self.files[i] + + + def recursive_exclude_pattern (self, dir, pattern=None): + """Remove filenames from 'self.files' that are under 'dir' + and whose basenames match 'pattern'.""" + + print "recursive_exclude_pattern: dir=%s, pattern=%s" % (dir, pattern) + if pattern is None: + pattern_re = None + else: + pattern_re = translate_pattern (pattern) + + for i in range (len (self.files)-1, -1, -1): + (cur_dir, cur_base) = os.path.split (self.files[i]) + if (cur_dir == dir and + (pattern_re is None or pattern_re.match (cur_base))): + print "removing %s" % self.files[i] + del self.files[i] + + + def read_template (self): + """Read and parse the manifest template file named by + 'self.template' (usually "MANIFEST.in"). Process all file + specifications (include and exclude) in the manifest template + and add the resulting filenames to 'self.files'.""" + + assert self.files is not None and type (self.files) is ListType + + template = TextFile (self.template, + strip_comments=1, + skip_blanks=1, + join_lines=1, + lstrip_ws=1, + rstrip_ws=1, + collapse_ws=1) + + all_files = findall () + + while 1: + + line = template.readline() + if line is None: # end of file + break + + words = string.split (line) + action = words[0] + + # First, check that the right number of words are present + # for the given action (which is the first word) + if action in ('include','exclude', + 'global-include','global-exclude'): + if len (words) != 2: + template.warn \ + ("invalid manifest template line: " + + "'%s' expects a single " % + action) + continue + + pattern = words[1] + + elif action in ('recursive-include','recursive-exclude'): + if len (words) != 3: + template.warn \ + ("invalid manifest template line: " + + "'%s' expects " % + action) + continue + + (dir, pattern) = words[1:3] + + elif action in ('graft','prune'): + if len (words) != 2: + template.warn \ + ("invalid manifest template line: " + + "'%s' expects a single " % + action) + continue + + dir_pattern = words[1] + + else: + template.warn ("invalid manifest template line: " + + "unknown action '%s'" % action) + continue + + # OK, now we know that the action is valid and we have the + # right number of words on the line for that action -- so we + # can proceed with minimal error-checking. Also, we have + # defined either 'patter', 'dir' and 'pattern', or + # 'dir_pattern' -- so we don't have to spend any time digging + # stuff up out of 'words'. + + if action == 'include': + print "include", pattern + files = select_pattern (all_files, pattern, anchor=1) + if not files: + template.warn ("no files found matching '%s'" % pattern) + else: + self.files.extend (files) + + elif action == 'exclude': + print "exclude", pattern + num = exclude_pattern (self.files, pattern, anchor=1) + if num == 0: + template.warn \ + ("no previously-included files found matching '%s'" % + pattern) + + elif action == 'global-include': + print "global-include", pattern + files = select_pattern (all_files, pattern, anchor=0) + if not files: + template.warn (("no files found matching '%s' " + + "anywhere in distribution") % + pattern) + else: + self.files.extend (files) + + elif action == 'global-exclude': + print "global-exclude", pattern + num = exclude_pattern (self.files, pattern, anchor=0) + if num == 0: + template.warn \ + (("no previously-included files matching '%s' " + + "found anywhere in distribution") % + pattern) + + elif action == 'recursive-include': + print "recursive-include", dir, pattern + files = select_pattern (all_files, pattern, prefix=dir) + if not files: + template.warn (("no files found matching '%s' " + + "under directory '%s'") % + (pattern, dir)) + else: + self.files.extend (files) + + elif action == 'recursive-exclude': + print "recursive-exclude", dir, pattern + num = exclude_pattern (self.files, pattern, prefix=dir) + if num == 0: + template.warn \ + (("no previously-included files matching '%s' " + + "found under directory '%s'") % + (pattern, dir)) + + elif action == 'graft': + print "graft", dir_pattern + files = select_pattern (all_files, None, prefix=dir_pattern) + if not files: + template.warn ("no directories found matching '%s'" % + dir_pattern) + else: + self.files.extend (files) + + elif action == 'prune': + print "prune", dir_pattern + num = exclude_pattern (self.files, None, prefix=dir_pattern) + if num == 0: + template.warn \ + (("no previously-included directories found " + + "matching '%s'") % + dir_pattern) + else: + raise RuntimeError, \ + "this cannot happen: invalid action '%s'" % action + + # while loop over lines of template file + + # read_template () + + + def write_manifest (self): + """Write the file list in 'self.files' (presumably as filled in + by 'find_defaults()' and 'read_template()') to the manifest file + named by 'self.manifest'.""" + + manifest = open (self.manifest, "w") + for fn in self.files: + manifest.write (fn + '\n') + manifest.close () + + # write_manifest () + + + def read_manifest (self): + """Read the manifest file (named by 'self.manifest') and use + it to fill in 'self.files', the list of files to include + in the source distribution.""" + + manifest = open (self.manifest) + while 1: + line = manifest.readline () + if line == '': # end of file + break + if line[-1] == '\n': + line = line[0:-1] + self.files.append (line) + + # read_manifest () + + + + def make_release_tree (self, base_dir, files): + + # First get the list of directories to create + need_dir = {} + for file in files: + need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 + need_dirs = need_dir.keys() + need_dirs.sort() + + # Now create them + for dir in need_dirs: + self.mkpath (dir) + + # And walk over the list of files, either making a hard link (if + # os.link exists) to each one that doesn't already exist in its + # corresponding location under 'base_dir', or copying each file + # that's out-of-date in 'base_dir'. (Usually, all files will be + # out-of-date, because by default we blow away 'base_dir' when + # we're done making the distribution archives.) + + try: + link = os.link + msg = "making hard links in %s..." % base_dir + except AttributeError: + link = 0 + msg = "copying files to %s..." % base_dir + + self.announce (msg) + for file in files: + dest = os.path.join (base_dir, file) + if link: + if not os.path.exists (dest): + self.execute (os.link, (file, dest), + "linking %s -> %s" % (file, dest)) + else: + self.copy_file (file, dest) + + # make_release_tree () + + + def nuke_release_tree (self, base_dir): + try: + self.execute (rmtree, (base_dir,), + "removing %s" % base_dir) + except (IOError, OSError), exc: + if exc.filename: + msg = "error removing %s: %s (%s)" % \ + (base_dir, exc.strerror, exc.filename) + else: + msg = "error removing %s: %s" % (base_dir, exc.strerror) + self.warn (msg) + + + def make_tarball (self, base_dir, compress="gzip"): + + # XXX GNU tar 1.13 has a nifty option to add a prefix directory. + # It's pretty new, though, so we certainly can't require it -- + # but it would be nice to take advantage of it to skip the + # "create a tree of hardlinks" step! (Would also be nice to + # detect GNU tar to use its 'z' option and save a step.) + + if compress is not None and compress not in ('gzip', 'compress'): + raise ValueError, \ + "if given, 'compress' must be 'gzip' or 'compress'" + + archive_name = base_dir + ".tar" + self.spawn (["tar", "-cf", archive_name, base_dir]) + + if compress: + self.spawn ([compress, archive_name]) + + + def make_zipfile (self, base_dir): + + # This initially assumed the Unix 'zip' utility -- but + # apparently InfoZIP's zip.exe works the same under Windows, so + # no changes needed! + + try: + self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) + except DistutilsExecError: + + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed" -- shouldn't try + # again in the latter case. (I think fixing this will + # require some cooperation from the spawn module -- perhaps + # a utility function to search the path, so we can fallback + # on zipfile.py without the failed spawn.) + try: + import zipfile + except ImportError: + raise DistutilsExecError, \ + ("unable to create zip file '%s.zip': " + + "could neither find a standalone zip utility nor " + + "import the 'zipfile' module") % base_dir + + z = zipfile.ZipFile (base_dir + ".zip", "wb", + compression=zipfile.ZIP_DEFLATED) + + def visit (z, dirname, names): + for name in names: + path = os.path.join (dirname, name) + if os.path.isfile (path): + z.write (path, path) + + os.path.walk (base_dir, visit, z) + z.close() + + + def make_distribution (self): + + # Don't warn about missing meta-data here -- should be done + # elsewhere. + name = self.distribution.name or "UNKNOWN" + version = self.distribution.version + + if version: + base_dir = "%s-%s" % (name, version) + else: + base_dir = name + + # Remove any files that match "base_dir" from the fileset -- we + # don't want to go distributing the distribution inside itself! + self.exclude_pattern (base_dir + "*") + + self.make_release_tree (base_dir, self.files) + for fmt in self.formats: + if fmt == 'gztar': + self.make_tarball (base_dir, compress='gzip') + elif fmt == 'ztar': + self.make_tarball (base_dir, compress='compress') + elif fmt == 'tar': + self.make_tarball (base_dir, compress=None) + elif fmt == 'zip': + self.make_zipfile (base_dir) + + if not self.keep_tree: + self.nuke_release_tree (base_dir) + +# class Dist + + +# ---------------------------------------------------------------------- +# Utility functions + +def findall (dir = os.curdir): + """Find all files under 'dir' and return the list of full + filenames (relative to 'dir').""" + + list = [] + stack = [dir] + pop = stack.pop + push = stack.append + + while stack: + dir = pop() + names = os.listdir (dir) + + for name in names: + if dir != os.curdir: # avoid the dreaded "./" syndrome + fullname = os.path.join (dir, name) + else: + fullname = name + list.append (fullname) + if os.path.isdir (fullname) and not os.path.islink(fullname): + push (fullname) + + return list + + +def select_pattern (files, pattern, anchor=1, prefix=None): + """Select strings (presumably filenames) from 'files' that match + 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not + quite the same as implemented by the 'fnmatch' module: '*' and '?' + match non-special characters, where "special" is platform-dependent: + slash on Unix, colon, slash, and backslash on DOS/Windows, and colon + on Mac OS. + + If 'anchor' is true (the default), then the pattern match is more + stringent: "*.py" will match "foo.py" but not "foo/bar.py". If + 'anchor' is false, both of these will match. + + If 'prefix' is supplied, then only filenames starting with 'prefix' + (itself a pattern) and ending with 'pattern', with anything in + between them, will match. 'anchor' is ignored in this case. + + Return the list of matching strings, possibly empty.""" + + matches = [] + pattern_re = translate_pattern (pattern, anchor, prefix) + print "select_pattern: applying re %s" % pattern_re.pattern + for name in files: + if pattern_re.search (name): + matches.append (name) + print " adding", name + + return matches + +# select_pattern () + + +def exclude_pattern (files, pattern, anchor=1, prefix=None): + + pattern_re = translate_pattern (pattern, anchor, prefix) + print "exclude_pattern: applying re %s" % pattern_re.pattern + for i in range (len(files)-1, -1, -1): + if pattern_re.search (files[i]): + print " removing", files[i] + del files[i] + +# exclude_pattern () + + +def glob_to_re (pattern): + """Translate a shell-like glob pattern to a regular expression; + return a string containing the regex. Differs from + 'fnmatch.translate()' in that '*' does not match "special + characters" (which are platform-specific).""" + pattern_re = fnmatch.translate (pattern) + + # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which + # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, + # and by extension they shouldn't match such "special characters" under + # any OS. So change all non-escaped dots in the RE to match any + # character except the special characters. + # XXX currently the "special characters" are just slash -- i.e. this is + # Unix-only. + pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re) + return pattern_re + +# glob_to_re () + + +def translate_pattern (pattern, anchor=1, prefix=None): + """Translate a shell-like wildcard pattern to a compiled regular + expression. Return the compiled regex.""" + + if pattern: + pattern_re = glob_to_re (pattern) + else: + pattern_re = '' + + if prefix is not None: + prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $ + pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re) + else: # no prefix -- respect anchor flag + if anchor: + pattern_re = "^" + pattern_re + + return re.compile (pattern_re) + +# translate_pattern () From d03109b3f6d31ba77bdcee2559d786776a9430ce Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:11:52 +0000 Subject: [PATCH 0153/8469] Changed 'dist' to 'sdist'. --- command/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/__init__.py b/command/__init__.py index 8659307cbf..ea979f9b50 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -21,5 +21,5 @@ 'install', 'install_py', 'install_ext', - 'dist', + 'sdist', ] From 0fe8bb260644b6dfaf64c07189108d2a045a1895 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:13:53 +0000 Subject: [PATCH 0154/8469] Renamed all command classes so they're exactly the same as the name of the command itself: no more of this "FooBar class for foo_bar command" silliness. --- command/build.py | 2 +- command/build_clib.py | 2 +- command/build_ext.py | 2 +- command/build_lib.py | 2 +- command/build_py.py | 2 +- command/install.py | 2 +- command/install_ext.py | 2 +- command/install_lib.py | 2 +- command/install_py.py | 2 +- command/sdist.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/command/build.py b/command/build.py index 82a4e6c292..bcbb9332e4 100644 --- a/command/build.py +++ b/command/build.py @@ -10,7 +10,7 @@ from distutils.core import Command -class Build (Command): +class build (Command): description = "build everything needed to install" diff --git a/command/build_clib.py b/command/build_clib.py index 6571281816..749b0c2ba2 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -26,7 +26,7 @@ from distutils.ccompiler import new_compiler -class BuildLib (Command): +class build_lib (Command): options = [('debug', 'g', "compile with debugging information"), diff --git a/command/build_ext.py b/command/build_ext.py index 42eab4796d..ea0e294a70 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -20,7 +20,7 @@ (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$') -class BuildExt (Command): +class build_ext (Command): description = "build C/C++ extensions (compile/link to build directory)" diff --git a/command/build_lib.py b/command/build_lib.py index 6571281816..749b0c2ba2 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -26,7 +26,7 @@ from distutils.ccompiler import new_compiler -class BuildLib (Command): +class build_lib (Command): options = [('debug', 'g', "compile with debugging information"), diff --git a/command/build_py.py b/command/build_py.py index 048962b29f..f492ee374f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -14,7 +14,7 @@ from distutils.errors import * -class BuildPy (Command): +class build_py (Command): description = "\"build\" pure Python modules (copy to build directory)" diff --git a/command/install.py b/command/install.py index 0e5b01cc98..b57ec6f2f1 100644 --- a/command/install.py +++ b/command/install.py @@ -12,7 +12,7 @@ from distutils.util import write_file -class Install (Command): +class install (Command): description = "install everything from build directory" diff --git a/command/install_ext.py b/command/install_ext.py index 599a37e1ce..ba343d2e42 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -9,7 +9,7 @@ from distutils.core import Command from distutils.util import copy_tree -class InstallExt (Command): +class install_ext (Command): description = "install C/C++ extension modules" diff --git a/command/install_lib.py b/command/install_lib.py index 2e8a670686..e898ce0c18 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,7 +6,7 @@ from distutils.core import Command from distutils.util import copy_tree -class InstallPy (Command): +class install_py (Command): description = "install pure Python modules" diff --git a/command/install_py.py b/command/install_py.py index 2e8a670686..e898ce0c18 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -6,7 +6,7 @@ from distutils.core import Command from distutils.util import copy_tree -class InstallPy (Command): +class install_py (Command): description = "install pure Python modules" diff --git a/command/sdist.py b/command/sdist.py index c8101a708e..d890832862 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -17,7 +17,7 @@ from distutils.errors import DistutilsExecError -class Sdist (Command): +class sdist (Command): description = "create a source distribution (tarball, zip file, etc.)" From d393e804e26ad082c98d3070238a37e416e9e0af Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:14:21 +0000 Subject: [PATCH 0155/8469] Command classes are now named identically to their commands, so reflect this in 'find_command_class()' method. --- core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core.py b/core.py index 88e889b22f..f3951ac71c 100644 --- a/core.py +++ b/core.py @@ -447,8 +447,7 @@ class from it, and returns the class object. expected class was not found in it.""" module_name = 'distutils.command.' + command - klass_name = string.join \ - (map (string.capitalize, string.split (command, '_')), '') + klass_name = command try: __import__ (module_name) From 76c84dcb7f05dd257f26c74e2949e9020e1f633d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:25:39 +0000 Subject: [PATCH 0156/8469] Renamed all 'options' class attributes to 'user_options'. --- command/build.py | 19 +++++------ command/build_clib.py | 7 ++-- command/build_ext.py | 39 +++++++++++----------- command/build_lib.py | 7 ++-- command/build_py.py | 5 +-- command/install.py | 73 +++++++++++++++++++++--------------------- command/install_ext.py | 7 ++-- command/install_lib.py | 11 ++++--- command/install_py.py | 11 ++++--- command/sdist.py | 41 ++++++++++++------------ 10 files changed, 115 insertions(+), 105 deletions(-) diff --git a/command/build.py b/command/build.py index bcbb9332e4..d46132f308 100644 --- a/command/build.py +++ b/command/build.py @@ -14,15 +14,16 @@ class build (Command): description = "build everything needed to install" - options = [('build-base=', 'b', - "base directory for build library"), - ('build-lib=', 'l', - "directory for platform-shared files"), - ('build-platlib=', 'p', - "directory for platform-specific files"), - ('debug', 'g', - "compile extensions and libraries with debugging information"), - ] + user_options = [ + ('build-base=', 'b', + "base directory for build library"), + ('build-lib=', 'l', + "directory for platform-shared files"), + ('build-platlib=', 'p', + "directory for platform-specific files"), + ('debug', 'g', + "compile extensions and libraries with debugging information"), + ] def set_default_options (self): self.build_base = 'build' diff --git a/command/build_clib.py b/command/build_clib.py index 749b0c2ba2..26b89b3aba 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -28,9 +28,10 @@ class build_lib (Command): - options = [('debug', 'g', - "compile with debugging information"), - ] + user_options = [ + ('debug', 'g', + "compile with debugging information"), + ] def set_default_options (self): # List of libraries to build diff --git a/command/build_ext.py b/command/build_ext.py index ea0e294a70..963abc2977 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -42,25 +42,26 @@ class build_ext (Command): # takes care of both command-line and client options # in between set_default_options() and set_final_options()) - options = [('build-dir=', 'd', - "directory for compiled extension modules"), - ('include-dirs=', 'I', - "list of directories to search for header files"), - ('define=', 'D', - "C preprocessor macros to define"), - ('undef=', 'U', - "C preprocessor macros to undefine"), - ('libs=', 'l', - "external C libraries to link with"), - ('library-dirs=', 'L', - "directories to search for external C libraries"), - ('rpath=', 'R', - "directories to search for shared C libraries at runtime"), - ('link-objects=', 'O', - "extra explicit link objects to include in the link"), - ('debug', 'g', - "compile/link with debugging information"), - ] + user_options = [ + ('build-dir=', 'd', + "directory for compiled extension modules"), + ('include-dirs=', 'I', + "list of directories to search for header files"), + ('define=', 'D', + "C preprocessor macros to define"), + ('undef=', 'U', + "C preprocessor macros to undefine"), + ('libs=', 'l', + "external C libraries to link with"), + ('library-dirs=', 'L', + "directories to search for external C libraries"), + ('rpath=', 'R', + "directories to search for shared C libraries at runtime"), + ('link-objects=', 'O', + "extra explicit link objects to include in the link"), + ('debug', 'g', + "compile/link with debugging information"), + ] def set_default_options (self): diff --git a/command/build_lib.py b/command/build_lib.py index 749b0c2ba2..26b89b3aba 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -28,9 +28,10 @@ class build_lib (Command): - options = [('debug', 'g', - "compile with debugging information"), - ] + user_options = [ + ('debug', 'g', + "compile with debugging information"), + ] def set_default_options (self): # List of libraries to build diff --git a/command/build_py.py b/command/build_py.py index f492ee374f..eecf88b9d3 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -18,8 +18,9 @@ class build_py (Command): description = "\"build\" pure Python modules (copy to build directory)" - options = [('build-dir=', 'd', "directory for platform-shared files"), - ] + user_options = [ + ('build-dir=', 'd', "directory for platform-shared files"), + ] def set_default_options (self): diff --git a/command/install.py b/command/install.py index b57ec6f2f1..798460b27a 100644 --- a/command/install.py +++ b/command/install.py @@ -16,42 +16,43 @@ class install (Command): description = "install everything from build directory" - options = [('prefix=', None, "installation prefix"), - ('exec-prefix=', None, - "prefix for platform-specific files"), - - # Build directories: where to install from - ('build-base=', None, - "base build directory"), - ('build-lib=', None, - "build directory for pure Python modules"), - ('build-platlib=', None, - "build directory for extension modules"), - - # Installation directories: where to put modules and packages - ('install-lib=', None, - "base Python library directory"), - ('install-platlib=', None, - "platform-specific Python library directory"), - ('install-site-lib=', None, - "directory for site-specific packages and modules"), - ('install-site-platlib=', None, - "platform-specific site directory"), - ('install-scheme=', None, - "install to 'system' or 'site' library directory?"), - ('install-path=', None, - "extra intervening directories to put below install-lib"), - - # Where to install documentation (eventually!) - ('doc-format=', None, "format of documentation to generate"), - ('install-man=', None, "directory for Unix man pages"), - ('install-html=', None, "directory for HTML documentation"), - ('install-info=', None, "directory for GNU info files"), - - # Flags for 'build_py' - ('compile-py', None, "compile .py to .pyc"), - ('optimize-py', None, "compile .py to .pyo (optimized)"), - ] + user_options = [ + ('prefix=', None, "installation prefix"), + ('exec-prefix=', None, + "prefix for platform-specific files"), + + # Build directories: where to install from + ('build-base=', None, + "base build directory"), + ('build-lib=', None, + "build directory for pure Python modules"), + ('build-platlib=', None, + "build directory for extension modules"), + + # Installation directories: where to put modules and packages + ('install-lib=', None, + "base Python library directory"), + ('install-platlib=', None, + "platform-specific Python library directory"), + ('install-site-lib=', None, + "directory for site-specific packages and modules"), + ('install-site-platlib=', None, + "platform-specific site directory"), + ('install-scheme=', None, + "install to 'system' or 'site' library directory?"), + ('install-path=', None, + "extra intervening directories to put below install-lib"), + + # Where to install documentation (eventually!) + ('doc-format=', None, "format of documentation to generate"), + ('install-man=', None, "directory for Unix man pages"), + ('install-html=', None, "directory for HTML documentation"), + ('install-info=', None, "directory for GNU info files"), + + # Flags for 'build_py' + ('compile-py', None, "compile .py to .pyc"), + ('optimize-py', None, "compile .py to .pyo (optimized)"), + ] def set_default_options (self): diff --git a/command/install_ext.py b/command/install_ext.py index ba343d2e42..016a514e1e 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -13,9 +13,10 @@ class install_ext (Command): description = "install C/C++ extension modules" - options = [('install-dir=', 'd', "directory to install to"), - ('build-dir=','b', "build directory (where to install from)"), - ] + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ('build-dir=','b', "build directory (where to install from)"), + ] def set_default_options (self): # let the 'install' command dictate our installation directory diff --git a/command/install_lib.py b/command/install_lib.py index e898ce0c18..6dfebfbe0d 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -10,11 +10,12 @@ class install_py (Command): description = "install pure Python modules" - options = [('install-dir=', 'd', "directory to install to"), - ('build-dir=','b', "build directory (where to install from)"), - ('compile', 'c', "compile .py to .pyc"), - ('optimize', 'o', "compile .py to .pyo (optimized)"), - ] + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ('build-dir=','b', "build directory (where to install from)"), + ('compile', 'c', "compile .py to .pyc"), + ('optimize', 'o', "compile .py to .pyo (optimized)"), + ] def set_default_options (self): diff --git a/command/install_py.py b/command/install_py.py index e898ce0c18..6dfebfbe0d 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -10,11 +10,12 @@ class install_py (Command): description = "install pure Python modules" - options = [('install-dir=', 'd', "directory to install to"), - ('build-dir=','b', "build directory (where to install from)"), - ('compile', 'c', "compile .py to .pyc"), - ('optimize', 'o', "compile .py to .pyo (optimized)"), - ] + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ('build-dir=','b', "build directory (where to install from)"), + ('compile', 'c', "compile .py to .pyc"), + ('optimize', 'o', "compile .py to .pyo (optimized)"), + ] def set_default_options (self): diff --git a/command/sdist.py b/command/sdist.py index d890832862..aaedb30421 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -21,26 +21,27 @@ class sdist (Command): description = "create a source distribution (tarball, zip file, etc.)" - options = [('template=', 't', - "name of manifest template file [default: MANIFEST.in]"), - ('manifest=', 'm', - "name of manifest file [default: MANIFEST]"), - ('use-defaults', None, - "include the default file set in the manifest " - "[default; disable with --no-defaults]"), - ('manifest-only', None, - "just regenerate the manifest and then stop"), - ('force-manifest', None, - "forcibly regenerate the manifest and carry on as usual"), - - ('formats=', None, - "formats for source distribution (tar, ztar, gztar, or zip)"), - ('list-only', 'l', - "just list files that would be distributed"), - ('keep-tree', 'k', - "keep the distribution tree around after creating " + - "archive file(s)"), - ] + user_options = [ + ('template=', 't', + "name of manifest template file [default: MANIFEST.in]"), + ('manifest=', 'm', + "name of manifest file [default: MANIFEST]"), + ('use-defaults', None, + "include the default file set in the manifest " + "[default; disable with --no-defaults]"), + ('manifest-only', None, + "just regenerate the manifest and then stop"), + ('force-manifest', None, + "forcibly regenerate the manifest and carry on as usual"), + + ('formats=', None, + "formats for source distribution (tar, ztar, gztar, or zip)"), + ('list-only', 'l', + "just list files that would be distributed"), + ('keep-tree', 'k', + "keep the distribution tree around after creating " + + "archive file(s)"), + ] negative_opts = {'use-defaults': 'no-defaults'} default_format = { 'posix': 'gztar', From 42a137f33452bf81103e2960c6c33836b8260dda Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:26:23 +0000 Subject: [PATCH 0157/8469] Changed references to the command class 'options' attribute to 'user_options'. Related docstring changes. Unrelated comment changes. --- core.py | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/core.py b/core.py index f3951ac71c..6463bb4931 100644 --- a/core.py +++ b/core.py @@ -24,9 +24,10 @@ # to look for a Python module named after the command. command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') -# Defining this as a global is probably inadequate -- what about -# listing the available options (or even commands, which can vary -# quite late as well) +# This is a barebones help message generated displayed when the user +# runs the setup script with no arguments at all. More useful help +# is generated with various --help options: global help, list commands, +# and per-command help. usage = """\ usage: %s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: %s --help @@ -50,22 +51,22 @@ def setup (**attrs): Distribution instance. The 'cmdclass' argument, if supplied, is a dictionary mapping - command names to command classes. Each command encountered on the - command line will be turned into a command class, which is in turn - instantiated; any class found in 'cmdclass' is used in place of the - default, which is (for command 'foo_bar') class 'FooBar' in module - 'distutils.command.foo_bar'. The command object must provide an - 'options' attribute which is a list of option specifiers for - 'distutils.fancy_getopt'. Any command-line options between the - current and the next command are used to set attributes in the - current command object. - - When the entire command-line has been successfully parsed, calls the - 'run' method on each command object in turn. This method will be - driven entirely by the Distribution object (which each command - object has a reference to, thanks to its constructor), and the - command-specific options that became attributes of each command - object.""" + command names to command classes. Each command encountered on + the command line will be turned into a command class, which is in + turn instantiated; any class found in 'cmdclass' is used in place + of the default, which is (for command 'foo_bar') class 'foo_bar' + in module 'distutils.command.foo_bar'. The command class must + provide a 'user_options' attribute which is a list of option + specifiers for 'distutils.fancy_getopt'. Any command-line + options between the current and the next command are used to set + attributes of the current command object. + + When the entire command-line has been successfully parsed, calls + the 'run()' method on each command object in turn. This method + will be driven entirely by the Distribution object (which each + command object has a reference to, thanks to its constructor), + and the command-specific options that became attributes of each + command object.""" # Determine the distribution class -- either caller-supplied or # our Distribution (see below). @@ -313,11 +314,11 @@ def parse_command_line (self, args): # Also make sure that the command object provides a list of its # known options - if not (hasattr (cmd_obj, 'options') and - type (cmd_obj.options) is ListType): + if not (hasattr (cmd_obj, 'user_options') and + type (cmd_obj.user_options) is ListType): raise DistutilsClassError, \ - ("command class %s must provide an 'options' attribute "+ - "(a list of tuples)") % \ + ("command class %s must provide " + + "'user_options' attribute (a list of tuples)") % \ cmd_obj.__class__ # Poof! like magic, all commands support the global @@ -327,14 +328,14 @@ def parse_command_line (self, args): negative_opt = copy (negative_opt) negative_opt.update (cmd_obj.negative_opt) - options = self.global_options + cmd_obj.options + options = self.global_options + cmd_obj.user_options args = fancy_getopt (options, negative_opt, cmd_obj, args[1:]) if cmd_obj.help: print_help (self.global_options, header="Global options:") print - print_help (cmd_obj.options, + print_help (cmd_obj.user_options, header="Options for '%s' command:" % command) print print usage @@ -357,7 +358,7 @@ def parse_command_line (self, args): for command in self.commands: klass = self.find_command_class (command) - print_help (klass.options, + print_help (klass.user_options, header="Options for '%s' command:" % command) print From 7697546dd8208145f70f4d5dd97d6fc268842aaa Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:35:22 +0000 Subject: [PATCH 0158/8469] Renamed 'set_default_options()' to 'initialize_options()', and 'set_final_options()' to 'finalize_options()'. --- command/build.py | 4 ++-- command/build_clib.py | 8 ++++---- command/build_ext.py | 10 +++++----- command/build_lib.py | 8 ++++---- command/build_py.py | 4 ++-- command/install.py | 6 +++--- command/install_ext.py | 4 ++-- command/install_lib.py | 4 ++-- command/install_py.py | 4 ++-- command/sdist.py | 4 ++-- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/command/build.py b/command/build.py index d46132f308..28241e104f 100644 --- a/command/build.py +++ b/command/build.py @@ -25,7 +25,7 @@ class build (Command): "compile extensions and libraries with debugging information"), ] - def set_default_options (self): + def initialize_options (self): self.build_base = 'build' # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) @@ -33,7 +33,7 @@ def set_default_options (self): self.build_platlib = None self.debug = None - def set_final_options (self): + def finalize_options (self): # 'build_lib' and 'build_platlib' just default to 'lib' and # 'platlib' under the base build directory if self.build_lib is None: diff --git a/command/build_clib.py b/command/build_clib.py index 26b89b3aba..9cf53da032 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -33,7 +33,7 @@ class build_lib (Command): "compile with debugging information"), ] - def set_default_options (self): + def initialize_options (self): # List of libraries to build self.libraries = None @@ -43,9 +43,9 @@ def set_default_options (self): self.undef = None self.debug = None - # set_default_options() + # initialize_options() - def set_final_options (self): + def finalize_options (self): self.set_undefined_options ('build', ('debug', 'debug')) self.libraries = self.distribution.libraries @@ -58,7 +58,7 @@ def set_final_options (self): # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? - # set_final_options() + # finalize_options() def run (self): diff --git a/command/build_ext.py b/command/build_ext.py index 963abc2977..8ed3a97339 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -38,9 +38,9 @@ class build_ext (Command): # structure # - that data structure (in this case, a list of 2-tuples) # will then be present in the command object by the time - # we get to set_final_options() (i.e. the constructor + # we get to finalize_options() (i.e. the constructor # takes care of both command-line and client options - # in between set_default_options() and set_final_options()) + # in between initialize_options() and finalize_options()) user_options = [ ('build-dir=', 'd', @@ -64,7 +64,7 @@ class build_ext (Command): ] - def set_default_options (self): + def initialize_options (self): self.extensions = None self.build_dir = None self.package = None @@ -79,7 +79,7 @@ def set_default_options (self): self.debug = None - def set_final_options (self): + def finalize_options (self): from distutils import sysconfig self.set_undefined_options ('build', @@ -112,7 +112,7 @@ def set_final_options (self): # XXX how the heck are 'self.define' and 'self.undef' supposed to # be set? - # set_final_options () + # finalize_options () def run (self): diff --git a/command/build_lib.py b/command/build_lib.py index 26b89b3aba..9cf53da032 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -33,7 +33,7 @@ class build_lib (Command): "compile with debugging information"), ] - def set_default_options (self): + def initialize_options (self): # List of libraries to build self.libraries = None @@ -43,9 +43,9 @@ def set_default_options (self): self.undef = None self.debug = None - # set_default_options() + # initialize_options() - def set_final_options (self): + def finalize_options (self): self.set_undefined_options ('build', ('debug', 'debug')) self.libraries = self.distribution.libraries @@ -58,7 +58,7 @@ def set_final_options (self): # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? - # set_final_options() + # finalize_options() def run (self): diff --git a/command/build_py.py b/command/build_py.py index eecf88b9d3..7ae207b8cc 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -23,13 +23,13 @@ class build_py (Command): ] - def set_default_options (self): + def initialize_options (self): self.build_dir = None self.modules = None self.package = None self.package_dir = None - def set_final_options (self): + def finalize_options (self): self.set_undefined_options ('build', ('build_lib', 'build_dir')) diff --git a/command/install.py b/command/install.py index 798460b27a..ffd687978a 100644 --- a/command/install.py +++ b/command/install.py @@ -55,7 +55,7 @@ class install (Command): ] - def set_default_options (self): + def initialize_options (self): self.build_base = None self.build_lib = None @@ -89,7 +89,7 @@ def set_default_options (self): self.optimize_py = 1 - def set_final_options (self): + def finalize_options (self): # XXX this method is where the default installation directories # for modules and extension modules are determined. (Someday, @@ -237,7 +237,7 @@ def set_final_options (self): # Punt on doc directories for now -- after all, we're punting on # documentation completely! - # set_final_options () + # finalize_options () def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): diff --git a/command/install_ext.py b/command/install_ext.py index 016a514e1e..b046dfbf3b 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -18,12 +18,12 @@ class install_ext (Command): ('build-dir=','b', "build directory (where to install from)"), ] - def set_default_options (self): + def initialize_options (self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None - def set_final_options (self): + def finalize_options (self): self.set_undefined_options ('install', ('build_platlib', 'build_dir'), ('install_site_platlib', 'install_dir')) diff --git a/command/install_lib.py b/command/install_lib.py index 6dfebfbe0d..919873c6f2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -18,14 +18,14 @@ class install_py (Command): ] - def set_default_options (self): + def initialize_options (self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None self.compile = 1 self.optimize = 1 - def set_final_options (self): + def finalize_options (self): # Find out from the 'build_ext' command if we were asked to build # any extensions. If so, that means even pure-Python modules in diff --git a/command/install_py.py b/command/install_py.py index 6dfebfbe0d..919873c6f2 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -18,14 +18,14 @@ class install_py (Command): ] - def set_default_options (self): + def initialize_options (self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None self.compile = 1 self.optimize = 1 - def set_final_options (self): + def finalize_options (self): # Find out from the 'build_ext' command if we were asked to build # any extensions. If so, that means even pure-Python modules in diff --git a/command/sdist.py b/command/sdist.py index aaedb30421..042b1fc54a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -50,7 +50,7 @@ class sdist (Command): exclude_re = re.compile (r'\s*!\s*(\S+)') # for manifest lines - def set_default_options (self): + def initialize_options (self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. self.template = None @@ -68,7 +68,7 @@ def set_default_options (self): self.keep_tree = 0 - def set_final_options (self): + def finalize_options (self): if self.manifest is None: self.manifest = "MANIFEST" if self.template is None: From 18f73d2efe63baed2730c5d607901c429f7460ed Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 18 Feb 2000 00:36:20 +0000 Subject: [PATCH 0159/8469] Changed all references to command methods 'set_default_options()' and 'set_final_options()' to 'initialize_options()' and 'finalize_options()'. --- core.py | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/core.py b/core.py index 6463bb4931..ddd39a2c79 100644 --- a/core.py +++ b/core.py @@ -619,14 +619,14 @@ class Command: """Abstract base class for defining command classes, the "worker bees" of the Distutils. A useful analogy for command classes is to think of them as subroutines with local variables called - "options". The options are "declared" in 'set_default_options()' - and "initialized" (given their real values) in - 'set_final_options()', both of which must be defined by every + "options". The options are "declared" in 'initialize_options()' + and "defined" (given their final values, aka "finalized") in + 'finalize_options()', both of which must be defined by every command class. The distinction between the two is necessary because option values might come from the outside world (command line, option file, ...), and any options dependent on other options must be computed *after* these outside influences have - been processed -- hence 'set_final_options()'. The "body" of the + been processed -- hence 'finalize_options()'. The "body" of the subroutine, where it does all its work based on the values of its options, is the 'run()' method, which must also be implemented by every command class.""" @@ -635,7 +635,7 @@ class Command: def __init__ (self, dist): """Create and initialize a new Command object. Most importantly, - invokes the 'set_default_options()' method, which is the + invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated.""" @@ -645,7 +645,7 @@ def __init__ (self, dist): raise RuntimeError, "Command is an abstract class" self.distribution = dist - self.set_default_options () + self.initialize_options () # Per-command versions of the global flags, so that the user can # customize Distutils' behaviour command-by-command and let some @@ -662,10 +662,10 @@ def __init__ (self, dist): # none of that complicated bureaucracy is needed. self.help = 0 - # 'ready' records whether or not 'set_final_options()' has been - # called. 'set_final_options()' itself should not pay attention to + # 'ready' records whether or not 'finalize_options()' has been + # called. 'finalize_options()' itself should not pay attention to # this flag: it is the business of 'ensure_ready()', which always - # calls 'set_final_options()', to respect/update it. + # calls 'finalize_options()', to respect/update it. self.ready = 0 # end __init__ () @@ -684,16 +684,16 @@ def __getattr__ (self, attr): def ensure_ready (self): if not self.ready: - self.set_final_options () + self.finalize_options () self.ready = 1 # Subclasses must define: - # set_default_options() + # initialize_options() # provide default values for all options; may be overridden # by Distutils client, by command-line options, or by options # from option file - # set_final_options() + # finalize_options() # decide on the final values for all options; this is called # after all possible intervention from the outside world # (command-line, option file, etc.) has been processed @@ -701,12 +701,12 @@ def ensure_ready (self): # run the command: do whatever it is we're here to do, # controlled by the command's various option values - def set_default_options (self): + def initialize_options (self): """Set default values for all the options that this command supports. Note that these defaults may be overridden by the command-line supplied by the user; thus, this is not the place to code dependencies between options; generally, - 'set_default_options()' implementations are just a bunch + 'initialize_options()' implementations are just a bunch of "self.foo = None" assignments. This method must be implemented by all command classes.""" @@ -714,14 +714,14 @@ def set_default_options (self): raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ - def set_final_options (self): + def finalize_options (self): """Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to to code option dependencies: if 'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as long as 'foo' still has - the same value it was assigned in 'set_default_options()'. + the same value it was assigned in 'initialize_options()'. This method must be implemented by all command classes.""" @@ -731,8 +731,8 @@ def set_final_options (self): def run (self): """A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in - 'set_initial_options()', customized by the user and other - commands, and finalized in 'set_final_options()'. All + 'initialize_options()', customized by the user and other + commands, and finalized in 'finalize_options()'. All terminal output and filesystem interaction should be done by 'run()'. @@ -836,7 +836,7 @@ def set_undefined_options (self, src_cmd, *option_pairs): # Option_pairs: list of (src_option, dst_option) tuples src_cmd_obj = self.distribution.find_command_obj (src_cmd) - src_cmd_obj.set_final_options () + src_cmd_obj.finalize_options () try: for (src_option, dst_option) in option_pairs: if getattr (self, dst_option) is None: @@ -851,16 +851,16 @@ def set_peer_option (self, command, option, value): """Attempt to simulate a command-line override of some option value in another command. Finds the command object for 'command', sets its 'option' to 'value', and unconditionally - calls 'set_final_options()' on it: this means that some command - objects may have 'set_final_options()' invoked more than once. + calls 'finalize_options()' on it: this means that some command + objects may have 'finalize_options()' invoked more than once. Even so, this is not entirely reliable: the other command may already be initialized to its satisfaction, in which case the - second 'set_final_options()' invocation will have little or no + second 'finalize_options()' invocation will have little or no effect.""" cmd_obj = self.distribution.find_command_obj (command) cmd_obj.set_option (option, value) - cmd_obj.set_final_options () + cmd_obj.finalize_options () def find_peer (self, command, create=1): From d7fe6215f8ae6b39c44a475925c6ae0aa005157a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 24 Feb 2000 03:17:43 +0000 Subject: [PATCH 0160/8469] Fix from est@hyperreal.org: missing initialize in 'find_defaults()'. --- command/sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/sdist.py b/command/sdist.py index 042b1fc54a..6b838bdef2 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -198,6 +198,7 @@ def find_defaults (self): for fn in standards: if type (fn) is TupleType: alts = fn + got_it = 0 for fn in alts: if os.path.exists (fn): got_it = 1 From 0e7f7e1c36820e01bde9edbbcd9acc623445b045 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 26 Feb 2000 00:49:04 +0000 Subject: [PATCH 0161/8469] Unfinished, untested implementation of the lovely baroque installation scheme cooked up by Fred Drake and me. Only saved for posterity (whoever posterity is), as it is about to be ditched in favour of GvR's much simpler design. --- command/install.py | 259 +++++++++++++++++------------------------ command/install_ext.py | 2 +- command/install_lib.py | 20 +--- command/install_py.py | 20 +--- 4 files changed, 118 insertions(+), 183 deletions(-) diff --git a/command/install.py b/command/install.py index ffd687978a..a89bc0259f 100644 --- a/command/install.py +++ b/command/install.py @@ -10,7 +10,7 @@ from types import * from distutils.core import Command from distutils.util import write_file - +from distutils.errors import DistutilsOptionError class install (Command): @@ -21,66 +21,52 @@ class install (Command): ('exec-prefix=', None, "prefix for platform-specific files"), - # Build directories: where to install from - ('build-base=', None, - "base build directory"), - ('build-lib=', None, - "build directory for pure Python modules"), - ('build-platlib=', None, - "build directory for extension modules"), - # Installation directories: where to put modules and packages ('install-lib=', None, "base Python library directory"), ('install-platlib=', None, "platform-specific Python library directory"), - ('install-site-lib=', None, - "directory for site-specific packages and modules"), - ('install-site-platlib=', None, - "platform-specific site directory"), - ('install-scheme=', None, - "install to 'system' or 'site' library directory?"), ('install-path=', None, "extra intervening directories to put below install-lib"), + # Build directories: where to find the files to install + ('build-base=', None, + "base build directory"), + ('build-lib=', None, + "build directory for pure Python modules"), + ('build-platlib=', None, + "build directory for extension modules"), + # Where to install documentation (eventually!) - ('doc-format=', None, "format of documentation to generate"), - ('install-man=', None, "directory for Unix man pages"), - ('install-html=', None, "directory for HTML documentation"), - ('install-info=', None, "directory for GNU info files"), + #('doc-format=', None, "format of documentation to generate"), + #('install-man=', None, "directory for Unix man pages"), + #('install-html=', None, "directory for HTML documentation"), + #('install-info=', None, "directory for GNU info files"), # Flags for 'build_py' - ('compile-py', None, "compile .py to .pyc"), - ('optimize-py', None, "compile .py to .pyo (optimized)"), + #('compile-py', None, "compile .py to .pyc"), + #('optimize-py', None, "compile .py to .pyo (optimized)"), ] def initialize_options (self): - self.build_base = None - self.build_lib = None - self.build_platlib = None - # Don't define 'prefix' or 'exec_prefix' so we can know when the # command is run whether the user supplied values self.prefix = None self.exec_prefix = None - # These two, we can supply real values for! (because they're - # not directories, and don't have a confusing multitude of - # possible derivations) - #self.install_scheme = 'site' - self.doc_format = None - # The actual installation directories are determined only at # run-time, so the user can supply just prefix (and exec_prefix?) # as a base for everything else self.install_lib = None self.install_platlib = None - self.install_site_lib = None - self.install_site_platlib = None self.install_path = None + self.build_base = None + self.build_lib = None + self.build_platlib = None + self.install_man = None self.install_html = None self.install_info = None @@ -114,75 +100,90 @@ def finalize_options (self): # and assumes the Python 1.5 installation tree with no site.py # to fix things. - # Figure out the build directories, ie. where to install from - self.set_peer_option ('build', 'build_base', self.build_base) - self.set_undefined_options ('build', - ('build_base', 'build_base'), - ('build_lib', 'build_lib'), - ('build_platlib', 'build_platlib')) - # Figure out actual installation directories; the basic principle - # is: if the user supplied nothing, then use the directories that - # Python was built and installed with (ie. the compiled-in prefix - # and exec_prefix, and the actual installation directories gleaned - # by sysconfig). If the user supplied a prefix (and possibly - # exec_prefix), then we generate our own installation directories, - # following any pattern gleaned from sysconfig's findings. If no - # such pattern can be gleaned, then we'll just make do and try to - # ape the behaviour of Python's configure script. - - if self.prefix is None: # user didn't override - self.prefix = os.path.normpath (sys.prefix) + # is: ... + + sys_prefix = os.path.normpath (sys.prefix) + sys_exec_prefix = os.path.normpath (sys.exec_prefix) + + if self.prefix is None: + if self.exec_prefix is not None: + raise DistutilsOptionError, \ + "you may not supply exec_prefix without prefix" + self.prefix = sys_prefix + else: + # This is handy to guarantee that self.prefix is normalized -- + # but it could be construed as rude to go normalizing a + # user-supplied path (they might like to see their "../" or + # symlinks in the installation feedback). + self.prefix = os.path.normpath (self.prefix) + if self.exec_prefix is None: - self.exec_prefix = os.path.normpath (sys.exec_prefix) - - if self.install_lib is None: - self.install_lib = \ - self.replace_sys_prefix ('LIBDEST', ('lib','python1.5')) - if self.install_platlib is None: - # XXX this should probably be DESTSHARED -- but why is there no - # equivalent to DESTSHARED for the "site-packages" dir"? - self.install_platlib = \ - self.replace_sys_prefix ('BINLIBDEST', ('lib','python1.5'), 1) - - - # Here is where we decide where to install most library files: on - # POSIX systems, they go to 'site-packages' under the install_lib - # (determined above -- typically /usr/local/lib/python1.x). Note - # that on POSIX systems, platform-specific files belong in - # 'site-packages' under install_platlib. (The actual rule is that - # a module distribution that includes *any* platform-specific files - # -- ie. extension modules -- goes under install_platlib. This - # solves the "can't find extension module in a package" problem.) - # On non-POSIX systems, install_lib and install_platlib are the - # same (eg. "C:\Program Files\Python\Lib" on Windows), as are - # install_site_lib and install_site_platlib (eg. - # "C:\Program Files\Python" on Windows) -- everything will be dumped - # right into one of the install_site directories. (It doesn't - # really matter *which* one, of course, but I'll observe decorum - # and do it properly.) - - # 'base' and 'platbase' are the base directories for installing - # site-local files, eg. "/usr/local/lib/python1.5/site-packages" - # or "C:\Program Files\Python" + if self.prefix == sys_prefix: + self.exec_prefix = sys_exec_prefix + else: + self.exec_prefix = self.prefix + else: + # Same as above about handy versus rude to normalize user's + # exec_prefix. + self.exec_prefix = os.path.normpath (self.exec_prefix) + + if self.distribution.ext_modules: # any extensions to install? + effective_prefix = self.exec_prefix + else: + effective_prefix = self.prefix + if os.name == 'posix': - self.base = os.path.join (self.install_lib, - 'site-packages') - self.platbase = os.path.join (self.install_platlib, - 'site-packages') + if self.install_lib is None: + if self.prefix == sys_prefix: + self.install_lib = \ + os.path.join (effective_prefix, + "lib", + "python" + sys.version[:3], + "site-packages") + else: + self.install_lib = \ + os.path.join (effective_prefix, + "lib", + "python") # + sys.version[:3] ??? + # end if self.install_lib ... + + if self.install_platlib is None: + if self.exec_prefix == sys_exec_prefix: + self.install_platlib = \ + os.path.join (effective_prefix, + "lib", + "python" + sys.version[:3], + "site-packages") + else: + self.install_platlib = \ + os.path.join (effective_prefix, + "lib", + "python") # + sys.version[:3] ??? + # end if self.install_platlib ... + else: - self.base = self.prefix - self.platbase = self.exec_prefix - - # 'path_file' and 'extra_dirs' are how we handle distributions - # that need to be installed to their own directory, but aren't + raise DistutilsPlatformError, \ + "duh, I'm clueless (for now) about installing on %s" % os.name + + # end if/else on os.name + + + # 'path_file' and 'extra_dirs' are how we handle distributions that + # want to be installed to their own directory, but aren't # package-ized yet. 'extra_dirs' is just a directory under - # 'base' or 'platbase' where toplevel modules will actually be - # installed; 'path_file' is the basename of a .pth file to drop - # in 'base' or 'platbase' (depending on the distribution). Very - # often they will be the same, which is why we allow them to be - # supplied as a string or 1-tuple as well as a 2-element - # comma-separated string or a 2-tuple. + # 'install_lib' or 'install_platlib' where top-level modules will + # actually be installed; 'path_file' is the basename of a .pth file + # to drop in 'install_lib' or 'install_platlib' (depending on the + # distribution). Very often they will be the same, which is why we + # allow them to be supplied as a string or 1-tuple as well as a + # 2-element comma-separated string or a 2-tuple. + + # XXX this will drop a .pth file in install_{lib,platlib} even if + # they're not one of the site-packages directories: this is wrong! + # we need to suppress path_file in those cases, and warn if + # "install_lib/extra_dirs" is not in sys.path. + if self.install_path is None: self.install_path = self.distribution.install_path @@ -214,25 +215,12 @@ def finalize_options (self): self.extra_dirs = extra_dirs - if self.install_site_lib is None: - self.install_site_lib = os.path.join (self.base, - extra_dirs) - - if self.install_site_platlib is None: - self.install_site_platlib = os.path.join (self.platbase, - extra_dirs) - - #if self.install_scheme == 'site': - # install_lib = self.install_site_lib - # install_platlib = self.install_site_platlib - #elif self.install_scheme == 'system': - # install_lib = self.install_lib - # install_platlib = self.install_platlib - #else: - # # XXX new exception for this kind of misbehaviour? - # raise DistutilsArgError, \ - # "invalid install scheme '%s'" % self.install_scheme - + # Figure out the build directories, ie. where to install from + self.set_peer_option ('build', 'build_base', self.build_base) + self.set_undefined_options ('build', + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_platlib', 'build_platlib')) # Punt on doc directories for now -- after all, we're punting on # documentation completely! @@ -240,50 +228,13 @@ def finalize_options (self): # finalize_options () - def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): - """Attempts to glean a simple pattern from an installation - directory available as a 'sysconfig' attribute: if the - directory name starts with the "system prefix" (the one - hard-coded in the Makefile and compiled into Python), - then replace it with the current installation prefix and - return the "relocated" installation directory.""" - - from distutils import sysconfig - - if use_exec: - sys_prefix = os.path.normpath (sys.exec_prefix) - my_prefix = self.exec_prefix - else: - sys_prefix = os.path.normpath (sys.prefix) - my_prefix = self.prefix - - val = getattr (sysconfig, config_attr) - if string.find (val, sys_prefix) == 0: - # If the sysconfig directory starts with the system prefix, - # then we can "relocate" it to the user-supplied prefix -- - # assuming, of course, it is different from the system prefix. - - if sys_prefix == my_prefix: - return val - else: - return my_prefix + val[len(sys_prefix):] - - else: - # Otherwise, just tack the "fallback postfix" onto the - # user-specified prefix. - - return apply (os.path.join, (my_prefix,) + fallback_postfix) - - # replace_sys_prefix () - - def run (self): # Obviously have to build before we can install self.run_peer ('build') # Install modules in two steps: "platform-shared" files (ie. pure - # python modules) and platform-specific files (compiled C + # Python modules) and platform-specific files (compiled C # extensions). Note that 'install_py' is smart enough to install # pure Python modules in the "platlib" directory if we built any # extensions. diff --git a/command/install_ext.py b/command/install_ext.py index b046dfbf3b..f1a3e24725 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -26,7 +26,7 @@ def initialize_options (self): def finalize_options (self): self.set_undefined_options ('install', ('build_platlib', 'build_dir'), - ('install_site_platlib', 'install_dir')) + ('install_platlib', 'install_dir')) def run (self): diff --git a/command/install_lib.py b/command/install_lib.py index 919873c6f2..ab82e04bf0 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -27,22 +27,12 @@ def initialize_options (self): def finalize_options (self): - # Find out from the 'build_ext' command if we were asked to build - # any extensions. If so, that means even pure-Python modules in - # this distribution have to be installed to the "platlib" - # directory. - extensions = self.get_peer_option ('build_ext', 'extensions') - if extensions: - dir_option = 'install_site_platlib' - else: - dir_option = 'install_site_lib' - # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - (dir_option, 'install_dir'), + ('install_lib', 'install_dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) @@ -52,8 +42,9 @@ def run (self): # Make sure we have "built" all pure Python modules first self.run_peer ('build_py') - # Dump entire contents of the build directory to the installation - # directory (that's the beauty of having a build directory!) + # Install everything: simply dump the entire contents of the build + # directory to the installation directory (that's the beauty of + # having a build directory!) outfiles = self.copy_tree (self.build_dir, self.install_dir) # (Optionally) compile .py to .pyc @@ -65,7 +56,8 @@ def run (self): from py_compile import compile for f in outfiles: - # XXX can't assume this filename mapping! + # XXX can't assume this filename mapping! (what if + # we're running under "python -O"?) # only compile the file if it is actually a .py file if f[-3:] == '.py': diff --git a/command/install_py.py b/command/install_py.py index 919873c6f2..ab82e04bf0 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -27,22 +27,12 @@ def initialize_options (self): def finalize_options (self): - # Find out from the 'build_ext' command if we were asked to build - # any extensions. If so, that means even pure-Python modules in - # this distribution have to be installed to the "platlib" - # directory. - extensions = self.get_peer_option ('build_ext', 'extensions') - if extensions: - dir_option = 'install_site_platlib' - else: - dir_option = 'install_site_lib' - # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. self.set_undefined_options ('install', ('build_lib', 'build_dir'), - (dir_option, 'install_dir'), + ('install_lib', 'install_dir'), ('compile_py', 'compile'), ('optimize_py', 'optimize')) @@ -52,8 +42,9 @@ def run (self): # Make sure we have "built" all pure Python modules first self.run_peer ('build_py') - # Dump entire contents of the build directory to the installation - # directory (that's the beauty of having a build directory!) + # Install everything: simply dump the entire contents of the build + # directory to the installation directory (that's the beauty of + # having a build directory!) outfiles = self.copy_tree (self.build_dir, self.install_dir) # (Optionally) compile .py to .pyc @@ -65,7 +56,8 @@ def run (self): from py_compile import compile for f in outfiles: - # XXX can't assume this filename mapping! + # XXX can't assume this filename mapping! (what if + # we're running under "python -O"?) # only compile the file if it is actually a .py file if f[-3:] == '.py': From 06c2f98eb01493396435bb99b6e0264e3888353a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 26 Feb 2000 00:49:40 +0000 Subject: [PATCH 0162/8469] Try to deal with pre-1.5.2 IOError exception objects. --- core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index ddd39a2c79..a92bff9573 100644 --- a/core.py +++ b/core.py @@ -99,8 +99,12 @@ def setup (**attrs): except KeyboardInterrupt: raise SystemExit, "interrupted" except IOError, exc: - # is this 1.5.2-specific? 1.5-specific? - raise SystemExit, "error: %s: %s" % (exc.filename, exc.strerror) + # arg, try to work with Python pre-1.5.2 + if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): + raise SystemExit, \ + "error: %s: %s" % (exc.filename, exc.strerror) + else: + raise SystemExit, str (exc) # setup () From 23c5fe111b4770b4ec04b5be7fbbd081928df5c4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 01:19:37 +0000 Subject: [PATCH 0163/8469] Build reorg: change 'build_dir' option to 'build_lib'. --- command/build_py.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 7ae207b8cc..05a1beff4e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -19,19 +19,19 @@ class build_py (Command): description = "\"build\" pure Python modules (copy to build directory)" user_options = [ - ('build-dir=', 'd', "directory for platform-shared files"), + ('build-lib=', 'd', "directory to \"build\" (copy) to"), ] def initialize_options (self): - self.build_dir = None + self.build_lib = None self.modules = None self.package = None self.package_dir = None def finalize_options (self): self.set_undefined_options ('build', - ('build_lib', 'build_dir')) + ('build_lib', 'build_lib')) # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. @@ -259,11 +259,11 @@ def build_module (self, module, module_file, package): "'package' must be a string (dot-separated), list, or tuple" # Now put the module source file into the "build" area -- this is - # easy, we just copy it somewhere under self.build_dir (the build + # easy, we just copy it somewhere under self.build_lib (the build # directory for Python source). outfile_path = list (package) outfile_path.append (module + ".py") - outfile_path.insert (0, self.build_dir) + outfile_path.insert (0, self.build_lib) outfile = apply (os.path.join, outfile_path) dir = os.path.dirname (outfile) @@ -277,9 +277,9 @@ def build_modules (self): for (module, package, module_file) in modules: # Now "build" the module -- ie. copy the source file to - # self.build_dir (the build directory for Python source). + # self.build_lib (the build directory for Python source). # (Actually, it gets copied to the directory for this package - # under self.build_dir.) + # under self.build_lib.) self.build_module (module, module_file, package) # build_modules () @@ -300,7 +300,7 @@ def build_packages (self): modules = self.find_package_modules (package, package_dir) # Now loop over the modules we found, "building" each one (just - # copy it to self.build_dir). + # copy it to self.build_lib). for (module, module_file) in modules: self.build_module (module, module_file, package) From 403c4a31e1ceb3e900a8e1241d5ab9e1093d0171 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 01:26:45 +0000 Subject: [PATCH 0164/8469] Build reorg: * 'build_lib' -> 'build_purelib' * new 'build_lib' and 'build_temp' options * use 'get_platform()' to initialize 'build_platlib' and 'build_temp' --- command/build.py | 55 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/command/build.py b/command/build.py index 28241e104f..e25ef81cad 100644 --- a/command/build.py +++ b/command/build.py @@ -6,9 +6,9 @@ __rcsid__ = "$Id$" -import os +import sys, os from distutils.core import Command - +from distutils.util import get_platform class build (Command): @@ -17,10 +17,15 @@ class build (Command): user_options = [ ('build-base=', 'b', "base directory for build library"), - ('build-lib=', 'l', - "directory for platform-shared files"), - ('build-platlib=', 'p', - "directory for platform-specific files"), + ('build-purelib=', None, + "build directory for platform-neutral distributions"), + ('build-platlib=', None, + "build directory for platform-specific distributions"), + ('build-lib=', None, + "build directory for all distribution (defaults to either " + + "build-purelib or build-platlib"), + ('build-temp=', 't', + "temporary build directory"), ('debug', 'g', "compile extensions and libraries with debugging information"), ] @@ -29,17 +34,43 @@ def initialize_options (self): self.build_base = 'build' # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) - self.build_lib = None + self.build_purelib = None self.build_platlib = None + self.build_lib = None + self.build_temp = None self.debug = None def finalize_options (self): - # 'build_lib' and 'build_platlib' just default to 'lib' and - # 'platlib' under the base build directory - if self.build_lib is None: - self.build_lib = os.path.join (self.build_base, 'lib') + + # Need this to name platform-specific directories, but sys.platform + # is not enough -- it only names the OS and version, not the + # hardware architecture! + self.plat = get_platform () + + # 'build_purelib' and 'build_platlib' just default to 'lib' and + # 'lib.' under the base build directory. We only use one of + # them for a given distribution, though -- + if self.build_purelib is None: + self.build_purelib = os.path.join (self.build_base, 'lib') if self.build_platlib is None: - self.build_platlib = os.path.join (self.build_base, 'platlib') + self.build_platlib = os.path.join (self.build_base, + 'lib.' + self.plat) + + # 'build_lib' is the actual directory that we will use for this + # particular module distribution -- if user didn't supply it, pick + # one of 'build_purelib' or 'build_platlib'. + if self.build_lib is None: + if self.distribution.ext_modules: + self.build_lib = self.build_platlib + else: + self.build_lib = self.build_purelib + + # 'build_temp' -- temporary directory for compiler turds, + # "build/temp." + if self.build_temp is None: + self.build_temp = os.path.join (self.build_base, + 'temp.' + self.plat) + # finalize_options () def run (self): From d762d7cd369f81c7e0a359929d90a8a617d8dfeb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 01:43:28 +0000 Subject: [PATCH 0165/8469] Build reorg: * 'build_dir' -> 'build_lib', which by default takes its value straight from 'build_lib' in the 'build' command * added 'build_temp' and 'inplace' options * change 'build_extensions()' to put object files (compiler turds) in 'build_temp' dir * complicated the name-of-extension-file shenanigans in 'build_extensions()' to support "in-place" extension building, i.e. put the extension right into the source tree (handy for developers) * added 'get_ext_fullname()', renamed 'extension_filename()' to 'get_ext_filename()', and tweaked the latter a bit -- all to support the new filename shenanigans --- command/build_ext.py | 57 +++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8ed3a97339..2bbd89d891 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -43,8 +43,13 @@ class build_ext (Command): # in between initialize_options() and finalize_options()) user_options = [ - ('build-dir=', 'd', + ('build-lib=', 'b', "directory for compiled extension modules"), + ('build-temp=', 't', + "directory for temporary files (build by-products)"), + ('inplace', 'i', + "ignore build-lib and put compiled extensions into the source" + + "directory alongside your pure Python modules"), ('include-dirs=', 'I', "list of directories to search for header files"), ('define=', 'D', @@ -66,7 +71,9 @@ class build_ext (Command): def initialize_options (self): self.extensions = None - self.build_dir = None + self.build_lib = None + self.build_temp = None + self.inplace = 0 self.package = None self.include_dirs = None @@ -83,7 +90,8 @@ def finalize_options (self): from distutils import sysconfig self.set_undefined_options ('build', - ('build_platlib', 'build_dir'), + ('build_lib', 'build_lib'), + ('build_temp', 'build_temp'), ('debug', 'debug')) if self.package is None: @@ -227,15 +235,15 @@ def build_extensions (self, extensions): # precedent!) macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') - self.compiler.compile (sources, - macros=macros, - include_dirs=include_dirs, - debug=self.debug) + objects = self.compiler.compile (sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=include_dirs, + debug=self.debug) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. - objects = self.compiler.object_filenames (sources) extra_objects = build_info.get ('extra_objects') if extra_objects: objects.extend (extra_objects) @@ -257,12 +265,25 @@ def build_extensions (self, extensions): else: modname = string.split (extension_name, '.')[-1] extra_args.append('/export:init%s'%modname) + # end if MSVC + + fullname = self.get_ext_fullname (extension_name) + if self.inplace: + # ignore build-lib -- put the compiled extension into + # the source tree along with pure Python modules + + modpath = string.split (fullname, '.') + package = string.join (modpath[0:-1], '.') + base = modpath[-1] + + build_py = self.find_peer ('build_py') + package_dir = build_py.get_package_dir (package) + ext_filename = os.path.join (package_dir, + self.get_ext_filename(base)) + else: + ext_filename = os.path.join (self.build_lib, + self.get_ext_filename(fullname)) - ext_filename = self.extension_filename \ - (extension_name, self.package) - ext_filename = os.path.join (self.build_dir, ext_filename) - dest_dir = os.path.dirname (ext_filename) - self.mkpath (dest_dir) self.compiler.link_shared_object (objects, ext_filename, libraries=libraries, library_dirs=library_dirs, @@ -272,10 +293,14 @@ def build_extensions (self, extensions): # build_extensions () - def extension_filename (self, ext_name, package=None): + def get_ext_fullname (self, ext_name): + if self.package is None: + return ext_name + else: + return self.package + '.' + ext_name + + def get_ext_filename (self, ext_name): from distutils import sysconfig - if package: - ext_name = package + '.' + ext_name ext_path = string.split (ext_name, '.') return apply (os.path.join, ext_path) + sysconfig.SO From f5aaad4ab595030d314a3f2d815f3533ba7364e9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 14:40:15 +0000 Subject: [PATCH 0166/8469] Added 'get_platform()' to construct a string that identifies the current platform, using 'os.uname()' or 'sys.platform'. --- util.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 58d58439e0..641a35af8d 100644 --- a/util.py +++ b/util.py @@ -11,7 +11,7 @@ __rcsid__ = "$Id$" -import os +import os, string from distutils.errors import * @@ -437,3 +437,21 @@ def write_file (filename, contents): for line in contents: f.write (line + "\n") f.close () + + +def get_platform (): + """Return a string (suitable for tacking onto directory names) that + identifies the current platform. Under Unix, identifies both the OS + and hardware architecture, e.g. "linux-i586", "solaris-sparc", + "irix-mips". For Windows and Mac OS, just returns 'sys.platform' -- + i.e. "???" or "???".""" + + if os.name == 'posix': + uname = os.uname() + OS = uname[0] + arch = uname[4] + return "%s-%s" % (string.lower (OS), string.lower (arch)) + else: + return sys.platform + +# get_platform() From 8aea04d670e4b002754734358b5ebdfda20d8666 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 14:42:07 +0000 Subject: [PATCH 0167/8469] Added call to 'ensure_ready()' on the command object in 'Distribution.find_command_obj()'. --- core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core.py b/core.py index a92bff9573..83a98a84d6 100644 --- a/core.py +++ b/core.py @@ -506,6 +506,7 @@ def find_command_obj (self, command, create=1): cmd_obj = self.command_obj.get (command) if not cmd_obj and create: cmd_obj = self.create_command_obj (command) + cmd_obj.ensure_ready () self.command_obj[command] = cmd_obj return cmd_obj From bacc83b29ce5519b298bcb9ec9d558a2fec94701 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 14:43:12 +0000 Subject: [PATCH 0168/8469] Added 'mkpath()' method: convenience wrapper around 'util.mkpath()' that adds the compiler objects 'verbose' and 'dry_run' flags. --- ccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 7d2d9f58b7..72b77573c6 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -12,7 +12,7 @@ from copy import copy from distutils.errors import * from distutils.spawn import spawn -from distutils.util import move_file +from distutils.util import move_file, mkpath class CCompiler: @@ -453,6 +453,9 @@ def spawn (self, cmd): def move_file (self, src, dst): return move_file (src, dst, verbose=self.verbose, dry_run=self.dry_run) + def mkpath (self, name, mode=0777): + mkpath (name, mode, self.verbose, self.dry_run) + # class CCompiler From cbad9d0a7c7889f0593b839d4a87966fd54e5a81 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 1 Mar 2000 14:43:49 +0000 Subject: [PATCH 0169/8469] In compile/link methods: ensure that the directory we expect to be writing to exists before calling the compiler/linker. --- unixccompiler.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 770a543c75..77d12d32bc 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -159,6 +159,8 @@ def compile (self, if extra_postargs is None: extra_postargs = [] + if output_dir is not None: + self.mkpath (output_dir) for (source,object) in srcobj: self.spawn ([self.cc] + cc_args + [source, '-o', object] + @@ -167,7 +169,7 @@ def compile (self, # Have to re-fetch list of object filenames, because we want to # return *all* of them, including those that weren't recompiled on # this call! - return self.object_filenames (orig_sources, output_dir) + return self.object_filenames (orig_sources, output_dir=output_dir) def _fix_link_args (self, output_dir, libraries, library_dirs): @@ -226,6 +228,7 @@ def link_static_lib (self, newer = newer_group (objects, output_filename) if self.force or newer: + self.mkpath (os.path.dirname (output_filename)) self.spawn ([self.archiver, self.archiver_options, output_filename] + @@ -298,6 +301,7 @@ def link_shared_object (self, ld_args[:0] = extra_preargs if extra_postargs: ld_args.extend (extra_postargs) + self.mkpath (os.path.dirname (output_filename)) self.spawn ([self.ld_shared] + ld_args) else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -340,6 +344,7 @@ def link_executable (self, ld_args[:0] = extra_preargs if extra_postargs: ld_args.extend (extra_postargs) + self.mkpath (os.path.dirname (output_filename)) self.spawn ([self.ld_exec] + ld_args) else: self.announce ("skipping %s (up-to-date)" % output_filename) From 872379e98b29803bb5ec360686fe3365456c7313 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 2 Mar 2000 01:21:54 +0000 Subject: [PATCH 0170/8469] In the 'compile()' method: preserve the directory portion of source filenames when constructing object filenames, even if output_dir given -- eg. "foo/bar.c" will compile to "foo/bar.o" without an output_dir, and to "temp/foo/bar.o" if output_dir is "temp". --- unixccompiler.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 77d12d32bc..518132f670 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -100,6 +100,7 @@ def __init__ (self, def compile (self, sources, output_dir=None, + keep_dir=0, macros=None, include_dirs=None, debug=0, @@ -134,7 +135,11 @@ def compile (self, # don't have to recompile. (Simplistic check -- we just compare the # source and object file, no deep dependency checking involving # header files. Hmmm.) - objects = self.object_filenames (sources, output_dir=output_dir) + objects = self.object_filenames (sources, + output_dir=output_dir, + keep_dir=keep_dir) + all_objects = copy (objects) # preserve full list to return + if not self.force: skipped = newer_pairwise (sources, objects) for skipped_pair in skipped: @@ -169,7 +174,7 @@ def compile (self, # Have to re-fetch list of object filenames, because we want to # return *all* of them, including those that weren't recompiled on # this call! - return self.object_filenames (orig_sources, output_dir=output_dir) + return all_objects def _fix_link_args (self, output_dir, libraries, library_dirs): From 76ec448446c6c95e8942e53ffc6d5fae0b90a690 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 2 Mar 2000 01:27:36 +0000 Subject: [PATCH 0171/8469] Added command description. Added 'build_clib' and 'build_temp' options (where to put C libraries and where to put temporary compiler by-products, ie. object files). Moved the call to 'check_library_list()' from 'run()' to 'finalize_options()' -- that way, if we're going to crash we do so earlier, and we guarantee that the library list is valid before we do anything (not just run). Disallow directory separators in library names -- the compiled library always goes right in 'build_clib'. Added 'get_library_names()', so the "build_ext" command knows what libraries to link every extension with. --- command/build_clib.py | 62 +++++++++++++++++++++++++++++++++---------- command/build_lib.py | 62 +++++++++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 28 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 9cf53da032..9cb584a1ce 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -28,12 +28,21 @@ class build_lib (Command): + description = "build C/C++ libraries used by Python extensions" + user_options = [ + ('build-clib', 'b', + "directory to build C/C++ libraries to"), + ('build-temp', 't', + "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), ] def initialize_options (self): + self.build_clib = None + self.build_temp = None + # List of libraries to build self.libraries = None @@ -45,10 +54,23 @@ def initialize_options (self): # initialize_options() + def finalize_options (self): + + # This might be confusing: both build-clib and build-temp default + # to build-temp as defined by the "build" command. This is because + # I think that C libraries are really just temporary build + # by-products, at least from the point of view of building Python + # extensions -- but I want to keep my options open. self.set_undefined_options ('build', + ('build_temp', 'build_clib'), + ('build_temp', 'build_temp'), ('debug', 'debug')) + self.libraries = self.distribution.libraries + if self.libraries: + self.check_library_list (self.libraries) + if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type (self.include_dirs) is StringType: @@ -65,7 +87,6 @@ def run (self): if not self.libraries: return - self.check_library_list (self.libraries) # Yech -- this is cut 'n pasted from build_ext.py! self.compiler = new_compiler (plat=os.environ.get ('PLAT'), @@ -110,6 +131,12 @@ def check_library_list (self, libraries): raise DistutilsValueError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" + if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): + raise DistutilsValueError, \ + ("bad library name '%s': " + + "may not contain directory separators") % \ + lib[0] + if type (lib[1]) is not DictionaryType: raise DistutilsValueError, \ "second element of each tuple in 'libraries' " + \ @@ -119,6 +146,21 @@ def check_library_list (self, libraries): # check_library_list () + def get_library_names (self): + # Assume the library list is valid -- 'check_library_list()' is + # called from 'finalize_options()', so it should be! + + if not self.libraries: + return None + + lib_names = [] + for (lib_name, build_info) in self.libraries: + lib_names.append (lib_name) + return lib_names + + # get_library_names () + + def build_libraries (self, libraries): compiler = self.compiler @@ -134,35 +176,27 @@ def build_libraries (self, libraries): self.announce ("building '%s' library" % lib_name) - # Extract the directory the library is intended to go in -- - # note translation from "universal" slash-separated form to - # current platform's pathname convention (so we can use the - # string for actual filesystem use). - path = tuple (string.split (lib_name, '/')[:-1]) - if path: - lib_dir = apply (os.path.join, path) - else: - lib_dir = '' - # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') objects = self.compiler.compile (sources, + output_dir=self.build_temp, + keep_dir=1, macros=macros, include_dirs=include_dirs, - output_dir=lib_dir, debug=self.debug) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name, debug=self.debug) + self.compiler.link_static_lib (objects, lib_name, + output_dir=self.build_clib, + debug=self.debug) # for libraries # build_libraries () - # class BuildLib diff --git a/command/build_lib.py b/command/build_lib.py index 9cf53da032..9cb584a1ce 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -28,12 +28,21 @@ class build_lib (Command): + description = "build C/C++ libraries used by Python extensions" + user_options = [ + ('build-clib', 'b', + "directory to build C/C++ libraries to"), + ('build-temp', 't', + "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), ] def initialize_options (self): + self.build_clib = None + self.build_temp = None + # List of libraries to build self.libraries = None @@ -45,10 +54,23 @@ def initialize_options (self): # initialize_options() + def finalize_options (self): + + # This might be confusing: both build-clib and build-temp default + # to build-temp as defined by the "build" command. This is because + # I think that C libraries are really just temporary build + # by-products, at least from the point of view of building Python + # extensions -- but I want to keep my options open. self.set_undefined_options ('build', + ('build_temp', 'build_clib'), + ('build_temp', 'build_temp'), ('debug', 'debug')) + self.libraries = self.distribution.libraries + if self.libraries: + self.check_library_list (self.libraries) + if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type (self.include_dirs) is StringType: @@ -65,7 +87,6 @@ def run (self): if not self.libraries: return - self.check_library_list (self.libraries) # Yech -- this is cut 'n pasted from build_ext.py! self.compiler = new_compiler (plat=os.environ.get ('PLAT'), @@ -110,6 +131,12 @@ def check_library_list (self, libraries): raise DistutilsValueError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" + if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): + raise DistutilsValueError, \ + ("bad library name '%s': " + + "may not contain directory separators") % \ + lib[0] + if type (lib[1]) is not DictionaryType: raise DistutilsValueError, \ "second element of each tuple in 'libraries' " + \ @@ -119,6 +146,21 @@ def check_library_list (self, libraries): # check_library_list () + def get_library_names (self): + # Assume the library list is valid -- 'check_library_list()' is + # called from 'finalize_options()', so it should be! + + if not self.libraries: + return None + + lib_names = [] + for (lib_name, build_info) in self.libraries: + lib_names.append (lib_name) + return lib_names + + # get_library_names () + + def build_libraries (self, libraries): compiler = self.compiler @@ -134,35 +176,27 @@ def build_libraries (self, libraries): self.announce ("building '%s' library" % lib_name) - # Extract the directory the library is intended to go in -- - # note translation from "universal" slash-separated form to - # current platform's pathname convention (so we can use the - # string for actual filesystem use). - path = tuple (string.split (lib_name, '/')[:-1]) - if path: - lib_dir = apply (os.path.join, path) - else: - lib_dir = '' - # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') objects = self.compiler.compile (sources, + output_dir=self.build_temp, + keep_dir=1, macros=macros, include_dirs=include_dirs, - output_dir=lib_dir, debug=self.debug) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name, debug=self.debug) + self.compiler.link_static_lib (objects, lib_name, + output_dir=self.build_clib, + debug=self.debug) # for libraries # build_libraries () - # class BuildLib From 720accdc1c3e3d7926cfd26d58c368b87b551c12 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 2 Mar 2000 01:32:21 +0000 Subject: [PATCH 0172/8469] If the "build_lib" command built any C libraries, link with them all when building extensions (uses build_lib's 'get_library_names()' method). Ensure that the relative structure of source filenames is preserved in the temporary build tree, eg. foo/bar.c compiles to build/temp./foo/bar.o. --- command/build_ext.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2bbd89d891..fd5cd7a53a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -164,7 +164,15 @@ def run (self): self.compiler.set_runtime_library_dirs (self.rpath) if self.link_objects is not None: self.compiler.set_link_objects (self.link_objects) - + + if self.distribution.libraries: + build_lib = self.find_peer ('build_lib') + self.libraries = build_lib.get_library_names () or [] + self.library_dirs = [build_lib.build_clib] + else: + self.libraries = [] + self.library_dirs = [] + # Now the real loop over extensions self.build_extensions (self.extensions) @@ -237,6 +245,7 @@ def build_extensions (self, extensions): include_dirs = build_info.get ('include_dirs') objects = self.compiler.compile (sources, output_dir=self.build_temp, + keep_dir=1, macros=macros, include_dirs=include_dirs, debug=self.debug) @@ -247,8 +256,8 @@ def build_extensions (self, extensions): extra_objects = build_info.get ('extra_objects') if extra_objects: objects.extend (extra_objects) - libraries = build_info.get ('libraries') - library_dirs = build_info.get ('library_dirs') + libraries = self.libraries + build_info.get ('libraries') + library_dirs = self.library_dirs + build_info.get ('library_dirs') extra_args = build_info.get ('extra_link_args') or [] if self.compiler.compiler_type == 'msvc': From 41b233728bac2f952bf2cc9b5ffb19409b9a48e9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 2 Mar 2000 01:49:45 +0000 Subject: [PATCH 0173/8469] Changed '__rcsid__' to '__revision__'. --- __init__.py | 2 +- ccompiler.py | 2 +- command/__init__.py | 2 +- command/build.py | 2 +- command/build_clib.py | 2 +- command/build_ext.py | 2 +- command/build_lib.py | 2 +- command/build_py.py | 2 +- command/install.py | 2 +- command/install_ext.py | 2 +- command/install_lib.py | 2 +- command/install_py.py | 2 +- command/sdist.py | 2 +- core.py | 2 +- errors.py | 2 +- fancy_getopt.py | 2 +- msvccompiler.py | 2 +- spawn.py | 2 +- unixccompiler.py | 2 +- util.py | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/__init__.py b/__init__.py index 18deaadf44..1f23b972e4 100644 --- a/__init__.py +++ b/__init__.py @@ -8,4 +8,4 @@ setup (...) """ -__rcsid__ = "$Id$" +__revision__ = "$Id$" diff --git a/ccompiler.py b/ccompiler.py index 72b77573c6..4819b23c3c 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -5,7 +5,7 @@ # created 1999/07/05, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os from types import * diff --git a/command/__init__.py b/command/__init__.py index ea979f9b50..40595ba949 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -13,7 +13,7 @@ but this list will undoubtedly grow with time.""" -__rcsid__ = "$Id$" +__revision__ = "$Id$" __all__ = ['build', 'build_py', diff --git a/command/build.py b/command/build.py index e25ef81cad..d81bc88511 100644 --- a/command/build.py +++ b/command/build.py @@ -4,7 +4,7 @@ # created 1999/03/08, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os from distutils.core import Command diff --git a/command/build_clib.py b/command/build_clib.py index 9cb584a1ce..955cf5650c 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -7,7 +7,7 @@ # created (an empty husk) 1999/12/18, Greg Ward # fleshed out 2000/02/03-04 -__rcsid__ = "$Id$" +__revision__ = "$Id$" # XXX this module has *lots* of code ripped-off quite transparently from diff --git a/command/build_ext.py b/command/build_ext.py index fd5cd7a53a..6da02fedfa 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -6,7 +6,7 @@ # created 1999/08/09, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os, string, re from types import * diff --git a/command/build_lib.py b/command/build_lib.py index 9cb584a1ce..955cf5650c 100644 --- a/command/build_lib.py +++ b/command/build_lib.py @@ -7,7 +7,7 @@ # created (an empty husk) 1999/12/18, Greg Ward # fleshed out 2000/02/03-04 -__rcsid__ = "$Id$" +__revision__ = "$Id$" # XXX this module has *lots* of code ripped-off quite transparently from diff --git a/command/build_py.py b/command/build_py.py index 05a1beff4e..2d0ad1ce09 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -4,7 +4,7 @@ # created 1999/03/08, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, string, os from types import * diff --git a/command/install.py b/command/install.py index a89bc0259f..1df558434a 100644 --- a/command/install.py +++ b/command/install.py @@ -4,7 +4,7 @@ # created 1999/03/13, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os, string from types import * diff --git a/command/install_ext.py b/command/install_ext.py index f1a3e24725..8d23fa4cde 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -4,7 +4,7 @@ # created 1999/09/12, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree diff --git a/command/install_lib.py b/command/install_lib.py index ab82e04bf0..33cf6894e2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,6 +1,6 @@ # created 1999/03/13, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, string from distutils.core import Command diff --git a/command/install_py.py b/command/install_py.py index ab82e04bf0..33cf6894e2 100644 --- a/command/install_py.py +++ b/command/install_py.py @@ -1,6 +1,6 @@ # created 1999/03/13, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, string from distutils.core import Command diff --git a/command/sdist.py b/command/sdist.py index 6b838bdef2..726458a246 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -4,7 +4,7 @@ # created 1999/09/22, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os, string, re import fnmatch diff --git a/core.py b/core.py index 83a98a84d6..a31e60ce4a 100644 --- a/core.py +++ b/core.py @@ -8,7 +8,7 @@ # created 1999/03/01, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os import string, re diff --git a/errors.py b/errors.py index 17d1abc796..86d91dd6c0 100644 --- a/errors.py +++ b/errors.py @@ -10,7 +10,7 @@ # created 1999/03/03, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import types diff --git a/fancy_getopt.py b/fancy_getopt.py index 86e9f326ad..3110ab30db 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -10,7 +10,7 @@ # created 1999/03/03, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, string, re from types import * diff --git a/msvccompiler.py b/msvccompiler.py index e489c1c86e..2dd8dc10ca 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -6,7 +6,7 @@ # created 1999/08/19, Perry Stoll # -__rcsid__ = "$Id$" +__revision__ = "$Id$" import os import sys diff --git a/spawn.py b/spawn.py index 9a88ac8987..847346cc2f 100644 --- a/spawn.py +++ b/spawn.py @@ -5,7 +5,7 @@ # created 1999/07/24, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import sys, os, string from distutils.errors import * diff --git a/unixccompiler.py b/unixccompiler.py index 518132f670..7765faf88b 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ # created 1999/07/05, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import string, re, os from types import * diff --git a/util.py b/util.py index 641a35af8d..85f3a345e6 100644 --- a/util.py +++ b/util.py @@ -9,7 +9,7 @@ # created 1999/03/08, Greg Ward -__rcsid__ = "$Id$" +__revision__ = "$Id$" import os, string from distutils.errors import * From e67e55e012bc55359655cabd78e2bf9e4ec0d340 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 2 Mar 2000 01:57:12 +0000 Subject: [PATCH 0174/8469] Renamed 'build_lib' command to 'build_clib': * replaced build_lib.py with build_clib.py * renamed the class in build_clib.py * changed all references to 'build_lib' command in other command classes --- command/build.py | 2 +- command/build_clib.py | 6 +- command/build_ext.py | 6 +- command/build_lib.py | 202 ------------------------------------------ 4 files changed, 7 insertions(+), 209 deletions(-) delete mode 100644 command/build_lib.py diff --git a/command/build.py b/command/build.py index d81bc88511..97466fdb48 100644 --- a/command/build.py +++ b/command/build.py @@ -87,7 +87,7 @@ def run (self): # be needed by extension modules, so obviously have to be done # first! if self.distribution.libraries: - self.run_peer ('build_lib') + self.run_peer ('build_clib') # And now 'build_ext' -- compile extension modules and put them # into the build tree diff --git a/command/build_clib.py b/command/build_clib.py index 955cf5650c..7a6ef7a802 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -1,6 +1,6 @@ -"""distutils.command.build_lib +"""distutils.command.build_clib -Implements the Distutils 'build_lib' command, to build a C/C++ library +Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" @@ -26,7 +26,7 @@ from distutils.ccompiler import new_compiler -class build_lib (Command): +class build_clib (Command): description = "build C/C++ libraries used by Python extensions" diff --git a/command/build_ext.py b/command/build_ext.py index 6da02fedfa..bbdf062bd6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -166,9 +166,9 @@ def run (self): self.compiler.set_link_objects (self.link_objects) if self.distribution.libraries: - build_lib = self.find_peer ('build_lib') - self.libraries = build_lib.get_library_names () or [] - self.library_dirs = [build_lib.build_clib] + build_clib = self.find_peer ('build_clib') + self.libraries = build_clib.get_library_names () or [] + self.library_dirs = [build_clib.build_clib] else: self.libraries = [] self.library_dirs = [] diff --git a/command/build_lib.py b/command/build_lib.py deleted file mode 100644 index 955cf5650c..0000000000 --- a/command/build_lib.py +++ /dev/null @@ -1,202 +0,0 @@ -"""distutils.command.build_lib - -Implements the Distutils 'build_lib' command, to build a C/C++ library -that is included in the module distribution and needed by an extension -module.""" - -# created (an empty husk) 1999/12/18, Greg Ward -# fleshed out 2000/02/03-04 - -__revision__ = "$Id$" - - -# XXX this module has *lots* of code ripped-off quite transparently from -# build_ext.py -- not surprisingly really, as the work required to build -# a static library from a collection of C source files is not really all -# that different from what's required to build a shared object file from -# a collection of C source files. Nevertheless, I haven't done the -# necessary refactoring to account for the overlap in code between the -# two modules, mainly because a number of subtle details changed in the -# cut 'n paste. Sigh. - -import os, string -from types import * -from distutils.core import Command -from distutils.errors import * -from distutils.ccompiler import new_compiler - - -class build_lib (Command): - - description = "build C/C++ libraries used by Python extensions" - - user_options = [ - ('build-clib', 'b', - "directory to build C/C++ libraries to"), - ('build-temp', 't', - "directory to put temporary build by-products"), - ('debug', 'g', - "compile with debugging information"), - ] - - def initialize_options (self): - self.build_clib = None - self.build_temp = None - - # List of libraries to build - self.libraries = None - - # Compilation options for all libraries - self.include_dirs = None - self.define = None - self.undef = None - self.debug = None - - # initialize_options() - - - def finalize_options (self): - - # This might be confusing: both build-clib and build-temp default - # to build-temp as defined by the "build" command. This is because - # I think that C libraries are really just temporary build - # by-products, at least from the point of view of building Python - # extensions -- but I want to keep my options open. - self.set_undefined_options ('build', - ('build_temp', 'build_clib'), - ('build_temp', 'build_temp'), - ('debug', 'debug')) - - self.libraries = self.distribution.libraries - if self.libraries: - self.check_library_list (self.libraries) - - if self.include_dirs is None: - self.include_dirs = self.distribution.include_dirs or [] - if type (self.include_dirs) is StringType: - self.include_dirs = string.split (self.include_dirs, - os.pathsep) - - # XXX same as for build_ext -- what about 'self.define' and - # 'self.undef' ? - - # finalize_options() - - - def run (self): - - if not self.libraries: - return - - # Yech -- this is cut 'n pasted from build_ext.py! - self.compiler = new_compiler (plat=os.environ.get ('PLAT'), - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - if self.include_dirs is not None: - self.compiler.set_include_dirs (self.include_dirs) - if self.define is not None: - # 'define' option is a list of (name,value) tuples - for (name,value) in self.define: - self.compiler.define_macro (name, value) - if self.undef is not None: - for macro in self.undef: - self.compiler.undefine_macro (macro) - - self.build_libraries (self.libraries) - - # run() - - - def check_library_list (self, libraries): - """Ensure that the list of libraries (presumably provided as a - command option 'libraries') is valid, i.e. it is a list of - 2-tuples, where the tuples are (library_name, build_info_dict). - Raise DistutilsValueError if the structure is invalid anywhere; - just returns otherwise.""" - - # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, - # with only names changed to protect the innocent! - - if type (libraries) is not ListType: - raise DistutilsValueError, \ - "'libraries' option must be a list of tuples" - - for lib in libraries: - if type (lib) is not TupleType and len (lib) != 2: - raise DistutilsValueError, \ - "each element of 'libraries' must a 2-tuple" - - if type (lib[0]) is not StringType: - raise DistutilsValueError, \ - "first element of each tuple in 'libraries' " + \ - "must be a string (the library name)" - if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): - raise DistutilsValueError, \ - ("bad library name '%s': " + - "may not contain directory separators") % \ - lib[0] - - if type (lib[1]) is not DictionaryType: - raise DistutilsValueError, \ - "second element of each tuple in 'libraries' " + \ - "must be a dictionary (build info)" - # for lib - - # check_library_list () - - - def get_library_names (self): - # Assume the library list is valid -- 'check_library_list()' is - # called from 'finalize_options()', so it should be! - - if not self.libraries: - return None - - lib_names = [] - for (lib_name, build_info) in self.libraries: - lib_names.append (lib_name) - return lib_names - - # get_library_names () - - - def build_libraries (self, libraries): - - compiler = self.compiler - - for (lib_name, build_info) in libraries: - sources = build_info.get ('sources') - if sources is None or type (sources) not in (ListType, TupleType): - raise DistutilsValueError, \ - ("in 'libraries' option (library '%s'), " + - "'sources' must be present and must be " + - "a list of source filenames") % lib_name - sources = list (sources) - - self.announce ("building '%s' library" % lib_name) - - # First, compile the source code to object files in the library - # directory. (This should probably change to putting object - # files in a temporary build directory.) - macros = build_info.get ('macros') - include_dirs = build_info.get ('include_dirs') - objects = self.compiler.compile (sources, - output_dir=self.build_temp, - keep_dir=1, - macros=macros, - include_dirs=include_dirs, - debug=self.debug) - - # Now "link" the object files together into a static library. - # (On Unix at least, this isn't really linking -- it just - # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name, - output_dir=self.build_clib, - debug=self.debug) - - # for libraries - - # build_libraries () - -# class BuildLib From e5881f84002247373f54ef2108e050b03f30fcf2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 3 Mar 2000 03:00:02 +0000 Subject: [PATCH 0175/8469] Fixed 'mkpath()' to accept empty string silently (it's just the current dir). Fixed all DistutilsFileError messages to wrap file/dir names in quotes. --- util.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/util.py b/util.py index 85f3a345e6..b20f5be92c 100644 --- a/util.py +++ b/util.py @@ -39,7 +39,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): name = os.path.normpath (name) - if os.path.isdir (name): + if os.path.isdir (name) or name == '': return if PATH_CREATED.get (name): return @@ -71,7 +71,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): try: os.mkdir (head) except os.error, (errno, errstr): - raise DistutilsFileError, "%s: %s" % (head, errstr) + raise DistutilsFileError, "'%s': %s" % (head, errstr) PATH_CREATED[head] = 1 @@ -197,19 +197,21 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): try: fsrc = open(src, 'rb') except os.error, (errno, errstr): - raise DistutilsFileError, "could not open %s: %s" % (src, errstr) + raise DistutilsFileError, \ + "could not open '%s': %s" % (src, errstr) try: fdst = open(dst, 'wb') except os.error, (errno, errstr): - raise DistutilsFileError, "could not create %s: %s" % (dst, errstr) + raise DistutilsFileError, \ + "could not create '%s': %s" % (dst, errstr) while 1: try: buf = fsrc.read (buffer_size) except os.error, (errno, errstr): raise DistutilsFileError, \ - "could not read from %s: %s" % (src, errstr) + "could not read from '%s': %s" % (src, errstr) if not buf: break @@ -218,7 +220,7 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): fdst.write(buf) except os.error, (errno, errstr): raise DistutilsFileError, \ - "could not write to %s: %s" % (dst, errstr) + "could not write to '%s': %s" % (dst, errstr) finally: if fdst: @@ -258,7 +260,7 @@ def copy_file (src, dst, if not os.path.isfile (src): raise DistutilsFileError, \ - "can't copy %s: not a regular file" % src + "can't copy '%s': not a regular file" % src if os.path.isdir (dst): dir = dst @@ -321,7 +323,7 @@ def copy_tree (src, dst, if not dry_run and not os.path.isdir (src): raise DistutilsFileError, \ - "cannot copy tree %s: not a directory" % src + "cannot copy tree '%s': not a directory" % src try: names = os.listdir (src) except os.error, (errno, errstr): @@ -329,7 +331,7 @@ def copy_tree (src, dst, names = [] else: raise DistutilsFileError, \ - "error listing files in %s: %s" % (src, errstr) + "error listing files in '%s': %s" % (src, errstr) if not dry_run: mkpath (dst, verbose=verbose) From bea7ea527619fd6e4360157daea66bb5f7bf946e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 3 Mar 2000 03:00:27 +0000 Subject: [PATCH 0176/8469] Typo fix. --- command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 2d0ad1ce09..4e5255a67c 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -146,7 +146,7 @@ def check_package (self, package, package_dir): raise DistutilsFileError, \ "package directory '%s' does not exist" % package_dir if not os.path.isdir (package_dir): - raise DistutilsFileErorr, \ + raise DistutilsFileError, \ ("supposed package directory '%s' exists, " + "but is not a directory") % package_dir From 0b68db614df691a1089dc6c6a290bf0d8b81f424 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 6 Mar 2000 03:36:50 +0000 Subject: [PATCH 0177/8469] Don't pass 'keep_dir' to 'compile()' method of CCompiler -- no longer used. Don't assume that the 'libraries' and 'library_dirs' elements of the build info dict are always lists. --- command/build_ext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index bbdf062bd6..050a5c65b7 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -245,7 +245,6 @@ def build_extensions (self, extensions): include_dirs = build_info.get ('include_dirs') objects = self.compiler.compile (sources, output_dir=self.build_temp, - keep_dir=1, macros=macros, include_dirs=include_dirs, debug=self.debug) @@ -256,8 +255,10 @@ def build_extensions (self, extensions): extra_objects = build_info.get ('extra_objects') if extra_objects: objects.extend (extra_objects) - libraries = self.libraries + build_info.get ('libraries') - library_dirs = self.library_dirs + build_info.get ('library_dirs') + libraries = (self.libraries + + (build_info.get ('libraries') or [])) + library_dirs = (self.library_dirs + + (build_info.get ('library_dirs') or [])) extra_args = build_info.get ('extra_link_args') or [] if self.compiler.compiler_type == 'msvc': From 4ffaf24264f6c274ece3c928bdcf717fb12543cd Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 6 Mar 2000 03:37:45 +0000 Subject: [PATCH 0178/8469] Don't pass 'keep_dir' to 'compile()' method of CCompiler -- no longer used. --- command/build_clib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/build_clib.py b/command/build_clib.py index 7a6ef7a802..c49e3ca737 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -183,7 +183,6 @@ def build_libraries (self, libraries): include_dirs = build_info.get ('include_dirs') objects = self.compiler.compile (sources, output_dir=self.build_temp, - keep_dir=1, macros=macros, include_dirs=include_dirs, debug=self.debug) From 5696561cb0643ab61ee1e719217ba98f5029f674 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 6 Mar 2000 03:40:29 +0000 Subject: [PATCH 0179/8469] Serious overhaul of the C compiler interface and the two classes that implement it (so far): * moved filename generation methods into CCompiler base class, driven by data supplied by implementation classes * moved a bunch of common code from UnixCCompiler to convenience methods in CCompiler * overhauled MSVCCompiler's compile/link methods to look and act as much as possible like UnixCCompiler's, in order to regularize both interface and behaviour (especially by using those new convenience methods) --- ccompiler.py | 290 +++++++++++++++++++++++++++++++++++++++-------- msvccompiler.py | 235 +++++++++++++++++--------------------- unixccompiler.py | 237 +++++++++----------------------------- 3 files changed, 400 insertions(+), 362 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 4819b23c3c..2336e96589 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -12,7 +12,7 @@ from copy import copy from distutils.errors import * from distutils.spawn import spawn -from distutils.util import move_file, mkpath +from distutils.util import move_file, mkpath, newer_pairwise, newer_group class CCompiler: @@ -65,6 +65,18 @@ class CCompiler: # library search path anyways. + # Subclasses that rely on the standard filename generation methods + # implemented below should override these; see the comment near + # those methods ('object_filenames()' et. al.) for details: + src_extensions = None # list of strings + obj_extension = None # string + static_lib_extension = None + shared_lib_extension = None # string + static_lib_format = None # format string + shared_lib_format = None # prob. same as static_lib_format + exe_extension = None # string + + def __init__ (self, verbose=0, dry_run=0, @@ -255,6 +267,138 @@ def set_link_objects (self, objects): self.objects = copy (objects) + # -- Priviate utility methods -------------------------------------- + # (here for the convenience of subclasses) + + def _fix_compile_args (self, output_dir, macros, include_dirs): + """Typecheck and fix-up some of the arguments to the 'compile()' method, + and return fixed-up values. Specifically: if 'output_dir' is + None, replaces it with 'self.output_dir'; ensures that 'macros' + is a list, and augments it with 'self.macros'; ensures that + 'include_dirs' is a list, and augments it with + 'self.include_dirs'. Guarantees that the returned values are of + the correct type, i.e. for 'output_dir' either string or None, + and for 'macros' and 'include_dirs' either list or None.""" + + if output_dir is None: + output_dir = self.output_dir + elif type (output_dir) is not StringType: + raise TypeError, "'output_dir' must be a string or None" + + if macros is None: + macros = self.macros + elif type (macros) is ListType: + macros = macros + (self.macros or []) + else: + raise TypeError, \ + "'macros' (if supplied) must be a list of tuples" + + if include_dirs is None: + include_dirs = self.include_dirs + elif type (include_dirs) in (ListType, TupleType): + include_dirs = list (include_dirs) + (self.include_dirs or []) + else: + raise TypeError, \ + "'include_dirs' (if supplied) must be a list of strings" + + return (output_dir, macros, include_dirs) + + # _fix_compile_args () + + + def _prep_compile (self, sources, output_dir): + """Determine the list of object files corresponding to 'sources', and + figure out which ones really need to be recompiled. Return a list + of all object files and a dictionary telling which source files can + be skipped.""" + + # Get the list of expected output (object) files + objects = self.object_filenames (sources, + output_dir=output_dir) + + if self.force: + skip_source = {} # rebuild everything + for source in sources: + skip_source[source] = 0 + else: + # Figure out which source files we have to recompile according + # to a simplistic check -- we just compare the source and + # object file, no deep dependency checking involving header + # files. + skip_source = {} # rebuild everything + for source in sources: # no wait, rebuild nothing + skip_source[source] = 1 + + (n_sources, n_objects) = newer_pairwise (sources, objects) + for source in n_sources: # no really, only rebuild what's out-of-date + skip_source[source] = 0 + + return (objects, skip_source) + + # _prep_compile () + + + def _fix_link_args (self, objects, output_dir, + takes_libs=0, libraries=None, library_dirs=None): + """Typecheck and fix up some of the arguments supplied to the + 'link_*' methods and return the fixed values. Specifically: + ensure that 'objects' is a list; if output_dir is None, use + self.output_dir; ensure that 'libraries' and 'library_dirs' are + both lists, and augment them with 'self.libraries' and + 'self.library_dirs'. If 'takes_libs' is true, return a tuple + (objects, output_dir, libraries, library_dirs; else return + (objects, output_dir).""" + + if type (objects) not in (ListType, TupleType): + raise TypeError, \ + "'objects' must be a list or tuple of strings" + objects = list (objects) + + if output_dir is None: + output_dir = self.output_dir + elif type (output_dir) is not StringType: + raise TypeError, "'output_dir' must be a string or None" + + if takes_libs: + if libraries is None: + libraries = self.libraries + elif type (libraries) in (ListType, TupleType): + libraries = list (libraries) + (self.libraries or []) + else: + raise TypeError, \ + "'libraries' (if supplied) must be a list of strings" + + if library_dirs is None: + library_dirs = self.library_dirs + elif type (library_dirs) in (ListType, TupleType): + library_dirs = list (library_dirs) + (self.library_dirs or []) + else: + raise TypeError, \ + "'library_dirs' (if supplied) must be a list of strings" + + return (objects, output_dir, libraries, library_dirs) + else: + return (objects, output_dir) + + # _fix_link_args () + + + def _need_link (self, objects, output_file): + """Return true if we need to relink the files listed in 'objects' to + recreate 'output_file'.""" + + if self.force: + return 1 + else: + if self.dry_run: + newer = newer_group (objects, output_file, missing='newer') + else: + newer = newer_group (objects, output_file) + return newer + + # _need_link () + + # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) @@ -268,8 +412,16 @@ def compile (self, extra_postargs=None): """Compile one or more C/C++ source files. 'sources' must be a list of strings, each one the name of a C/C++ source - file. Return a list of the object filenames generated - (one for each source filename in 'sources'). + file. Return a list of object filenames, one per source + filename in 'sources'. Depending on the implementation, + not all source files will necessarily be compiled, but + all corresponding object filenames will be returned. + + If 'output_dir' is given, object files will be put under it, + while retaining their original path component. That is, + "foo/bar.c" normally compiles to "foo/bar.o" (for a Unix + implementation); if 'output_dir' is "build", then it would + compile to "build/foo/bar.o". 'macros', if given, must be a list of macro definitions. A macro definition is either a (name, value) 2-tuple or a (name,) @@ -285,11 +437,12 @@ def compile (self, 'debug' is a boolean; if true, the compiler will be instructed to output debug symbols in (or alongside) the object file(s). - 'extra_preargs' and 'extra_postargs' are optional lists of extra - command-line arguments that will be, respectively, prepended or - appended to the generated command line immediately before - execution. These will most likely be peculiar to the particular - platform and compiler being worked with, but are a necessary + 'extra_preargs' and 'extra_postargs' are implementation- + dependent. On platforms that have the notion of a command-line + (e.g. Unix, DOS/Windows), they are most likely lists of strings: + extra command-line arguments to prepand/append to the compiler + command line. On other platforms, consult the implementation + class documentation. In any event, they are intended as an escape hatch for those occasions when the abstract compiler framework doesn't cut the mustard.""" @@ -398,45 +551,88 @@ def link_executable (self, - # -- Filename mangling methods ------------------------------------- - - # General principle for the filename-mangling methods: by default, - # don't include a directory component, no matter what the caller - # supplies. Eg. for UnixCCompiler, a source file of "foo/bar/baz.c" - # becomes "baz.o" or "baz.so", etc. (That way, it's easiest for the - # caller to decide where it wants to put/find the output file.) The - # 'output_dir' parameter overrides this, of course -- the directory - # component of the input filenames is replaced by 'output_dir'. - - def object_filenames (self, source_filenames, output_dir=None): - """Return the list of object filenames corresponding to each - specified source filename.""" - pass - - def shared_object_filename (self, source_filename): - """Return the shared object filename corresponding to a - specified source filename (assuming the same directory).""" - pass - - def library_filename (self, libname): - """Return the static library filename corresponding to the - specified library name.""" - - pass - - def shared_library_filename (self, libname): - """Return the shared library filename corresponding to the - specified library name.""" - pass - - # XXX ugh -- these should go! - def object_name (self, inname): - """Given a name with no extension, return the name + object extension""" - return inname + self._obj_ext + # -- Filename generation methods ----------------------------------- + + # The default implementation of the filename generating methods are + # prejudiced towards the Unix/DOS/Windows view of the world: + # * object files are named by replacing the source file extension + # (eg. .c/.cpp -> .o/.obj) + # * library files (shared or static) are named by plugging the + # library name and extension into a format string, eg. + # "lib%s.%s" % (lib_name, ".a") for Unix static libraries + # * executables are named by appending an extension (possibly + # empty) to the program name: eg. progname + ".exe" for + # Windows + # + # To reduce redundant code, these methods expect to find + # several attributes in the current object (presumably defined + # as class attributes): + # * src_extensions - + # list of C/C++ source file extensions, eg. ['.c', '.cpp'] + # * obj_extension - + # object file extension, eg. '.o' or '.obj' + # * static_lib_extension - + # extension for static library files, eg. '.a' or '.lib' + # * shared_lib_extension - + # extension for shared library/object files, eg. '.so', '.dll' + # * static_lib_format - + # format string for generating static library filenames, + # eg. 'lib%s.%s' or '%s.%s' + # * shared_lib_format + # format string for generating shared library filenames + # (probably same as static_lib_format, since the extension + # is one of the intended parameters to the format string) + # * exe_extension - + # extension for executable files, eg. '' or '.exe' + + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + (base, ext) = os.path.splitext (src_name) + if ext not in self.src_extensions: + continue + if strip_dir: + base = os.path.basename (base) + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + # object_filenames () + + + def shared_object_filename (self, + basename, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + if strip_dir: + basename = os.path.basename (basename) + return os.path.join (output_dir, basename + self.shared_lib_extension) + + + def library_filename (self, + libname, + lib_type='static', # or 'shared' + strip_dir=0, + output_dir=''): + + if output_dir is None: output_dir = '' + if lib_type not in ("static","shared"): + raise ValueError, "'lib_type' must be \"static\" or \"shared\"" + fmt = getattr (self, lib_type + "_lib_format") + ext = getattr (self, lib_type + "_lib_extension") + + (dir, base) = os.path.split (libname) + filename = fmt % (base, ext) + if strip_dir: + dir = '' + + return os.path.join (output_dir, dir, filename) - def shared_library_name (self, inname): - """Given a name with no extension, return the name + shared object extension""" - return inname + self._shared_lib_ext # -- Utility methods ----------------------------------------------- @@ -606,4 +802,4 @@ def gen_lib_options (compiler, library_dirs, libraries): return lib_opts -# _gen_lib_options () +# gen_lib_options () diff --git a/msvccompiler.py b/msvccompiler.py index 2dd8dc10ca..847c611d29 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -5,12 +5,13 @@ # created 1999/08/19, Perry Stoll -# +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) + __revision__ = "$Id$" -import os -import sys -import string +import sys, os, string +from types import * from distutils.errors import * from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -137,6 +138,20 @@ class MSVCCompiler (CCompiler) : compiler_type = 'msvc' + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc','.cpp'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = _c_extensions + _cpp_extensions + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + def __init__ (self, verbose=0, dry_run=0, @@ -169,9 +184,7 @@ def __init__ (self, self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3' ] - self.compile_options_debug = [ - '/nologo', '/Od', '/MDd', '/W3', '/Z7', '/D_DEBUG' - ] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] self.ldflags_shared_debug = [ @@ -181,21 +194,7 @@ def __init__ (self, # -- Worker methods ------------------------------------------------ - # (must be implemented by subclasses) - _c_extensions = [ '.c' ] - _cpp_extensions = [ '.cc', '.cpp' ] - - _obj_ext = '.obj' - _exe_ext = '.exe' - _shared_lib_ext = '.dll' - _static_lib_ext = '.lib' - - # XXX the 'output_dir' parameter is ignored by the methods in this - # class! I just put it in to be consistent with CCompiler and - # UnixCCompiler, but someone who actually knows Visual C++ will - # have to make it work... - def compile (self, sources, output_dir=None, @@ -205,48 +204,43 @@ def compile (self, extra_preargs=None, extra_postargs=None): - if macros is None: - macros = [] - if include_dirs is None: - include_dirs = [] - - objectFiles = [] + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) - base_pp_opts = \ - gen_preprocess_options (self.macros + macros, - self.include_dirs + include_dirs) - - base_pp_opts.append('/c') + if extra_postargs is None: + extra_postargs = [] + pp_opts = gen_preprocess_options (macros, include_dirs) + compile_opts = extra_preargs or [] + compile_opts.append ('/c') if debug: - compile_options = self.compile_options_debug + compile_opts.extend (self.compile_options_debug) else: - compile_options = self.compile_options + compile_opts.extend (self.compile_options) - for srcFile in sources: - base,ext = os.path.splitext(srcFile) - objFile = base + ".obj" + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] - if ext in self._c_extensions: - fileOpt = "/Tc" - elif ext in self._cpp_extensions: - fileOpt = "/Tp" + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src - inputOpt = fileOpt + srcFile - outputOpt = "/Fo" + objFile + output_opt = "/Fo" + obj - cc_args = compile_options + \ - base_pp_opts + \ - [outputOpt, inputOpt] + self.mkpath (os.path.dirname (obj)) + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) - if extra_preargs: - cc_args[:0] = extra_preargs - if extra_postargs: - cc_args.extend (extra_postargs) + return objects - self.spawn ([self.cc] + cc_args) - objectFiles.append( objFile ) - return objectFiles + # compile () # XXX the signature of this method is different from CCompiler and @@ -263,25 +257,30 @@ def link_static_lib (self, extra_preargs=None, extra_postargs=None): - if libraries is None: - libraries = [] - if library_dirs is None: - library_dirs = [] + (objects, output_dir, libraries, library_dirs) = \ + self._fix_link_args (objects, output_dir, takes_libs=1, + libraries=libraries, + library_dirs=library_dirs) - lib_opts = gen_lib_options (self.libraries + libraries, - self.library_dirs + library_dirs, - "%s.lib", "/LIBPATH:%s") - - ld_args = self.ldflags_static + lib_opts + \ - objects + ['/OUT:' + output_filename] - if debug: - pass # XXX what goes here? - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend (extra_postargs) + output_filename = \ + self.library_filename (output_libname, output_dir=output_dir) + + if self._need_link (objects, output_filename): + lib_opts = gen_lib_options (libraries, library_dirs, + "%s.lib", "/LIBPATH:%s") + ld_args = self.ldflags_static + lib_opts + \ + objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) + self.spawn ([self.link] + ld_args) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) - self.spawn ( [ self.link ] + ld_args ) + # link_static_lib () def link_shared_lib (self, @@ -294,8 +293,6 @@ def link_shared_lib (self, extra_preargs=None, extra_postargs=None): - # XXX should we sanity check the library name? (eg. no - # slashes) self.link_shared_object (objects, self.shared_library_name(output_libname), output_dir=output_dir, @@ -315,70 +312,48 @@ def link_shared_object (self, debug=0, extra_preargs=None, extra_postargs=None): - """Link a bunch of stuff together to create a shared object - file. Much like 'link_shared_lib()', except the output - filename is explicitly supplied as 'output_filename'.""" - if libraries is None: - libraries = [] - if library_dirs is None: - library_dirs = [] - - lib_opts = gen_lib_options (self, - self.library_dirs + library_dirs, - self.libraries + libraries) - - if debug: - ldflags = self.ldflags_shared_debug - basename, ext = os.path.splitext (output_filename) - #XXX not sure this belongs here - # extensions in debug_mode are named 'module_d.pyd' - output_filename = basename + '_d' + ext - else: - ldflags = self.ldflags_shared - - ld_args = ldflags + lib_opts + \ - objects + ['/OUT:' + output_filename] - - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend (extra_postargs) - - self.spawn ( [ self.link ] + ld_args ) - - # -- Filename mangling methods ------------------------------------- - - def _change_extensions( self, filenames, newExtension ): - object_filenames = [] - - for srcFile in filenames: - base,ext = os.path.splitext( srcFile ) - # XXX should we strip off any existing path? - object_filenames.append( base + newExtension ) - - return object_filenames + (objects, output_dir, libraries, library_dirs) = \ + self._fix_link_args (objects, output_dir, takes_libs=1, + libraries=libraries, library_dirs=library_dirs) + + lib_opts = gen_lib_options (self, library_dirs, libraries) + if type (output_dir) not in (StringType, NoneType): + raise TypeError, "'output_dir' must be a string or None" + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + if self._need_link (objects, output_filename): + + if debug: + ldflags = self.ldflags_shared_debug + # XXX not sure this belongs here + # extensions in debug_mode are named 'module_d.pyd' + basename, ext = os.path.splitext (output_filename) + output_filename = basename + '_d' + ext + else: + ldflags = self.ldflags_shared + + ld_args = ldflags + lib_opts + \ + objects + ['/OUT:' + output_filename] - def object_filenames (self, source_filenames): - """Return the list of object filenames corresponding to each - specified source filename.""" - return self._change_extensions( source_filenames, self._obj_ext ) + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) - def shared_object_filename (self, source_filename): - """Return the shared object filename corresponding to a - specified source filename.""" - return self._change_extensions( source_filenames, self._shared_lib_ext ) + self.mkpath (os.path.dirname (output_filename)) + self.spawn ([self.link] + ld_args) - def library_filename (self, libname): - """Return the static library filename corresponding to the - specified library name.""" - return "%s%s" %( libname, self._static_lib_ext ) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) - def shared_library_filename (self, libname): - """Return the shared library filename corresponding to the - specified library name.""" - return "%s%s" %( libname, self._shared_lib_ext ) + # link_shared_object () + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. def library_dir_option (self, dir): return "/LIBPATH:" + dir diff --git a/unixccompiler.py b/unixccompiler.py index 7765faf88b..35390de0ce 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -20,10 +20,9 @@ import string, re, os from types import * from copy import copy -from sysconfig import \ +from distutils.sysconfig import \ CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO -from ccompiler import CCompiler, gen_preprocess_options, gen_lib_options -from util import move_file, newer_pairwise, newer_group +from distutils.ccompiler import CCompiler, gen_preprocess_options, gen_lib_options # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's @@ -55,10 +54,13 @@ class UnixCCompiler (CCompiler): compiler_type = 'unix' - _obj_ext = '.o' - _exe_ext = '' - _shared_lib_ext = SO - _static_lib_ext = '.a' + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = [".c",".C",".cc",".cxx",".cpp"] + obj_extension = ".o" + static_lib_extension = ".a" + shared_lib_extension = ".so" + static_lib_format = shared_lib_format = "lib%s%s" # Command to create a static library: seems to be pretty consistent # across the major Unices. Might have to move down into the @@ -96,66 +98,24 @@ def __init__ (self, self.ld_exec = self.cc + # __init__ () + def compile (self, sources, output_dir=None, - keep_dir=0, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): - if type (output_dir) not in (StringType, NoneType): - raise TypeError, "'output_dir' must be a string or None" - if output_dir is None: - output_dir = self.output_dir - if macros is None: - macros = [] - if include_dirs is None: - include_dirs = [] - - if type (macros) is not ListType: - raise TypeError, \ - "'macros' (if supplied) must be a list of tuples" - if type (include_dirs) not in (ListType, TupleType): - raise TypeError, \ - "'include_dirs' (if supplied) must be a list of strings" - include_dirs = list (include_dirs) - - pp_opts = gen_preprocess_options (self.macros + macros, - self.include_dirs + include_dirs) - - # So we can mangle 'sources' without hurting the caller's data - orig_sources = sources - sources = copy (sources) - - # Get the list of expected output (object) files and drop files we - # don't have to recompile. (Simplistic check -- we just compare the - # source and object file, no deep dependency checking involving - # header files. Hmmm.) - objects = self.object_filenames (sources, - output_dir=output_dir, - keep_dir=keep_dir) - all_objects = copy (objects) # preserve full list to return - - if not self.force: - skipped = newer_pairwise (sources, objects) - for skipped_pair in skipped: - self.announce ("skipping %s (%s up-to-date)" % skipped_pair) - - # Build list of (source,object) tuples for convenience - srcobj = [] - for i in range (len (sources)): - srcobj.append ((sources[i], objects[i])) + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) - # Compile all source files that weren't eliminated by - # 'newer_pairwise()'. - # XXX use of ccflags_shared means we're blithely assuming - # that we're compiling for inclusion in a shared object! - # (will have to fix this when I add the ability to build a - # new Python) + # Figure out the options for the compiler command line. + pp_opts = gen_preprocess_options (macros, include_dirs) cc_args = ['-c'] + pp_opts + self.ccflags + self.ccflags_shared if debug: cc_args[:0] = ['-g'] @@ -164,44 +124,21 @@ def compile (self, if extra_postargs is None: extra_postargs = [] - if output_dir is not None: - self.mkpath (output_dir) - for (source,object) in srcobj: - self.spawn ([self.cc] + cc_args + - [source, '-o', object] + - extra_postargs) - - # Have to re-fetch list of object filenames, because we want to - # return *all* of them, including those that weren't recompiled on - # this call! - return all_objects - - - def _fix_link_args (self, output_dir, libraries, library_dirs): - """Fixes up the arguments supplied to the 'link_*' methods: - if output_dir is None, use self.output_dir; ensure that - libraries and library_dirs are both lists (could be None or - tuples on input -- both are converted to lists). Return - a tuple of the three input arguments.""" - - if output_dir is None: - output_dir = self.output_dir - if libraries is None: - libraries = [] - if library_dirs is None: - library_dirs = [] - - if type (libraries) not in (ListType, TupleType): - raise TypeError, \ - "'libraries' (if supplied) must be a list of strings" - if type (library_dirs) not in (ListType, TupleType): - raise TypeError, \ - "'library_dirs' (if supplied) must be a list of strings" - libraries = list (libraries) - library_dirs = list (library_dirs) + # Compile all source files that weren't eliminated by + # '_prep_compile()'. + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + self.mkpath (os.path.dirname (obj)) + self.spawn ([self.cc] + cc_args + [src, '-o', obj] + extra_postargs) - return (output_dir, libraries, library_dirs) + # Return *all* object filenames, not just the ones we just built. + return objects + # compile () + def link_static_lib (self, objects, @@ -209,35 +146,17 @@ def link_static_lib (self, output_dir=None, debug=0): - if type (objects) not in (ListType, TupleType): - raise TypeError, \ - "'objects' must be a list or tuple of strings" - objects = list (objects) - - if type (output_dir) not in (StringType, NoneType): - raise TypeError, "'output_dir' must be a string or None" - if output_dir is None: - output_dir = self.output_dir + (objects, output_dir) = self._fix_link_args (objects, output_dir, takes_libs=0) - output_filename = self.library_filename (output_libname) - if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) + output_filename = \ + self.library_filename (output_libname, output_dir=output_dir) - # Check timestamps: if any of the object files are newer than - # the library file, *or* if "force" is true, then we'll - # recreate the library. - if not self.force: - if self.dry_run: - newer = newer_group (objects, output_filename, missing='newer') - else: - newer = newer_group (objects, output_filename) - - if self.force or newer: + if self._need_link (objects, output_filename): self.mkpath (os.path.dirname (output_filename)) self.spawn ([self.archiver, self.archiver_options, output_filename] + - objects) + objects + self.objects) else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -253,11 +172,9 @@ def link_shared_lib (self, debug=0, extra_preargs=None, extra_postargs=None): - # XXX should we sanity check the library name? (eg. no - # slashes) self.link_shared_object ( objects, - "lib%s%s" % (output_libname, self._shared_lib_ext), + self.shared_library_filename (output_libname), output_dir, libraries, library_dirs, @@ -276,30 +193,19 @@ def link_shared_object (self, extra_preargs=None, extra_postargs=None): - (output_dir, libraries, library_dirs) = \ - self._fix_link_args (output_dir, libraries, library_dirs) + (objects, output_dir, libraries, library_dirs) = \ + self._fix_link_args (objects, output_dir, takes_libs=1, + libraries=libraries, library_dirs=library_dirs) - lib_opts = gen_lib_options (self, - self.library_dirs + library_dirs, - self.libraries + libraries) + lib_opts = gen_lib_options (self, library_dirs, libraries) if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) - # If any of the input object files are newer than the output shared - # object, relink. Again, this is a simplistic dependency check: - # doesn't look at any of the libraries we might be linking with. - - if not self.force: - if self.dry_run: - newer = newer_group (objects, output_filename, missing='newer') - else: - newer = newer_group (objects, output_filename) - - if self.force or newer: - ld_args = self.ldflags_shared + objects + \ - lib_opts + ['-o', output_filename] + if self._need_link (objects, output_filename): + ld_args = (self.ldflags_shared + objects + self.objects + + lib_opts + ['-o', output_filename]) if debug: ld_args[:0] = ['-g'] if extra_preargs: @@ -324,25 +230,17 @@ def link_executable (self, extra_preargs=None, extra_postargs=None): - (output_dir, libraries, library_dirs) = \ - self._fix_link_args (output_dir, libraries, library_dirs) + (objects, output_dir, libraries, library_dirs) = \ + self._fix_link_args (objects, output_dir, takes_libs=1, + libraries=libraries, library_dirs=library_dirs) - lib_opts = gen_lib_options (self, - self.library_dirs + library_dirs, - self.libraries + libraries) + lib_opts = gen_lib_options (self, library_dirs, libraries) output_filename = output_progname # Unix-ism! if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) - # Same ol' simplistic-but-still-useful dependency check. - if not self.force: - if self.dry_run: - newer = newer_group (objects, output_filename, missing='newer') - else: - newer = newer_group (objects, output_filename) - - if self.force or newer: - ld_args = objects + lib_opts + ['-o', output_filename] + if self._need_link (objects, output_filename): + ld_args = objects + self.objects + lib_opts + ['-o', output_filename] if debug: ld_args[:0] = ['-g'] if extra_preargs: @@ -357,41 +255,10 @@ def link_executable (self, # link_executable () - # -- Filename-mangling (etc.) methods ------------------------------ - - def object_filenames (self, source_filenames, - keep_dir=0, output_dir=None): - outnames = [] - for inname in source_filenames: - outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._obj_ext, inname) - if not keep_dir: - outname = os.path.basename (outname) - if output_dir is not None: - outname = os.path.join (output_dir, outname) - outnames.append (outname) - return outnames - - def shared_object_filename (self, source_filename, - keep_dir=0, output_dir=None): - outname = re.sub (r'\.(c|C|cc|cxx|cpp)$', self._shared_lib_ext) - if not keep_dir: - outname = os.path.basename (outname) - if output_dir is not None: - outname = os.path.join (output_dir, outname) - return outname - - - def library_filename (self, libname): - (dirname, basename) = os.path.split (libname) - return os.path.join (dirname, - "lib%s%s" % (basename, self._static_lib_ext)) - - def shared_library_filename (self, libname): - (dirname, basename) = os.path.split (libname) - return os.path.join (dirname, - "lib%s%s" % (basename, self._shared_lib_ext)) - - + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + def library_dir_option (self, dir): return "-L" + dir From 5cf4767279d301842dc5fef525414412320ca947 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 6 Mar 2000 03:44:32 +0000 Subject: [PATCH 0180/8469] Rewrote 'newer_pairwise(): more natural (and incompatible) interface, simpler implementation. --- util.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/util.py b/util.py index b20f5be92c..03c0c88cae 100644 --- a/util.py +++ b/util.py @@ -100,22 +100,23 @@ def newer (source, target): def newer_pairwise (sources, targets): - """Walk two filename lists in parallel, testing if each 'target' is - up-to-date relative to its corresponding 'source'. If so, both - are deleted from their respective lists. Return a list of tuples - containing the deleted (source,target) pairs.""" + """Walk two filename lists in parallel, testing if each source is newer + than its corresponding target. Return a pair of lists (sources, + targets) where source is newer than target, according to the + semantics of 'newer()'.""" if len (sources) != len (targets): raise ValueError, "'sources' and 'targets' must be same length" - goners = [] - for i in range (len (sources)-1, -1, -1): - if not newer (sources[i], targets[i]): - goners.append ((sources[i], targets[i])) - del sources[i] - del targets[i] - goners.reverse() - return goners + # build a pair of lists (sources, targets) where source is newer + n_sources = [] + n_targets = [] + for i in range (len (sources)): + if newer (sources[i], targets[i]): + n_sources.append (sources[i]) + n_targets.append (targets[i]) + + return (n_sources, n_targets) # newer_pairwise () From 7155260372c2a9d8cecb81dd908df0adcafd8d01 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 7 Mar 2000 03:25:20 +0000 Subject: [PATCH 0181/8469] Added '_nt_quote_args()' to deal with whitespace in command-line arguments in a rather half-assed, but probably effective, way. --- spawn.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/spawn.py b/spawn.py index 847346cc2f..ae3d09fa31 100644 --- a/spawn.py +++ b/spawn.py @@ -42,11 +42,28 @@ def spawn (cmd, # spawn () -def _spawn_nt ( cmd, - search_path=1, - verbose=0, - dry_run=0): +def _nt_quote_args (args): + """Obscure quoting command line arguments on NT. + Simply quote every argument which contains blanks.""" + + # XXX this doesn't seem very robust to me -- but if the Windows guys + # say it'll work, I guess I'll have to accept it. (What if an arg + # contains quotes? What other magic characters, other than spaces, + # have to be escaped? Is there an escaping mechanism other than + # quoting?) + + for i in range (len (args)): + if string.find (args[i], ' ') == -1: + args[i] = '"%s"' % args[i] + + +def _spawn_nt (cmd, + search_path=1, + verbose=0, + dry_run=0): + executable = cmd[0] + cmd = _nt_quote_args (cmd) if search_path: paths = string.split( os.environ['PATH'], os.pathsep) base,ext = os.path.splitext(executable) @@ -60,7 +77,7 @@ def _spawn_nt ( cmd, # the file exists, we have a shot at spawn working executable = f if verbose: - print string.join ( [executable] + cmd[1:], ' ') + print string.join ([executable] + cmd[1:], ' ') if not dry_run: # spawn for NT requires a full path to the .exe try: From 0e7330777448758b059ab24d6db4b527c0269001 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 7 Mar 2000 03:27:08 +0000 Subject: [PATCH 0182/8469] Added 'native_path()' for use on pathnames from the setup script: split on slashes, and put back together again using the local directory separator. --- util.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/util.py b/util.py index 03c0c88cae..683d167641 100644 --- a/util.py +++ b/util.py @@ -458,3 +458,31 @@ def get_platform (): return sys.platform # get_platform() + + +def native_path (pathname): + """Return 'pathname' as a name that will work on the native + filesystem, i.e. split it on '/' and put it back together again + using the current directory separator. Needed because filenames in + the setup script are always supplied in Unix style, and have to be + converted to the local convention before we can actually use them in + the filesystem. Raises DistutilsValueError if 'pathname' is + absolute (starts with '/') or contains local directory separators + (unless the local separator is '/', of course).""" + + if pathname[0] == '/': + raise DistutilsValueError, "path '%s' cannot be absolute" % pathname + if pathname[-1] == '/': + raise DistutilsValueError, "path '%s' cannot end with '/'" % pathname + if os.sep != '/': + if os.sep in pathname: + raise DistutilsValueError, \ + "path '%s' cannot contain '%c' character" % \ + (pathname, os.sep) + + paths = string.split (pathname, '/') + return apply (os.path.join, paths) + else: + return pathname + +# native_path () From 01efeb23f10c8b27f9d961264d930d5e3f187248 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 7 Mar 2000 03:30:09 +0000 Subject: [PATCH 0183/8469] Patch from Corran Webster : add '_init_mac()'. --- sysconfig.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index e291aec21e..2107ffe4bc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -153,6 +153,27 @@ def _init_nt(): g['exec_prefix'] = exec_prefix +def _init_mac(): + """Initialize the module as appropriate for Macintosh systems""" + g = globals() + # load the installed config.h (what if not installed? - still need to + # be able to install packages which don't require compilation) + parse_config_h(open( + os.path.join(sys.exec_prefix, "Mac", "Include", "config.h")), g) + # set basic install directories + g['LIBDEST']=os.path.join(sys.exec_prefix, "Lib") + g['BINLIBDEST']= os.path.join(sys.exec_prefix, "Mac", "Plugins") + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = os.path.join (sys.prefix, 'Include' ) + + g['SO'] = '.ppc.slb' + g['exec_prefix'] = sys.exec_prefix + print sys.prefix + g['install_lib'] = os.path.join(sys.exec_prefix, "Lib") + g['install_platlib'] = os.path.join(sys.exec_prefix, "Mac", "Lib") + + try: exec "_init_" + os.name except NameError: @@ -164,3 +185,4 @@ def _init_nt(): del _init_posix del _init_nt +del _init_mac From 922f2b62bed5285c5a0d6e6d42f77fe7086e303e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 7 Mar 2000 03:34:16 +0000 Subject: [PATCH 0184/8469] Patch from Corran Webster (tweaked for style by me): changed 'copy_file()' to use the native Mac file copy routine. --- util.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/util.py b/util.py index 683d167641..2f193fb43c 100644 --- a/util.py +++ b/util.py @@ -280,6 +280,17 @@ def copy_file (src, dst, if dry_run: return 1 + # On a Mac, use the native file copy routine + if os.name == 'mac': + import macostools + try: + macostools.copy (src, dst, 0, preserve_times) + except OSError, exc: + raise DistutilsFileError, \ + "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) + return 1 + + # Otherwise use custom routine _copy_file_contents (src, dst) if preserve_mode or preserve_times: st = os.stat (src) From 86ff65237970cb480db4f9f909902892973fdf02 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 9 Mar 2000 03:16:05 +0000 Subject: [PATCH 0185/8469] Added Joe Van Andel's 'get_python_inc()', adapted by me to supply the platform-neutral include dir by default and with Mac support. Added 'get_python_lib()', inspired by 'get_python_inc()'. Rewrote 'get_config_h_filename()' and 'get_makefile_filename()' in terms of 'get_python_inc()' and 'get_python_lib()'. Changed '_init_nt()' and '_init_mac()' to use 'get_python_inc()' and 'get_python_lib()' for directory names. --- sysconfig.py | 95 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 80 insertions(+), 15 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 2107ffe4bc..49e58eb919 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -17,20 +17,83 @@ exec_prefix = os.path.normpath (sys.exec_prefix) +def get_python_inc (plat_specific=0): + """Return the directory containing installed Python header files. + If 'plat_specific' is false (the default), this is the path to the + non-platform-specific header files, i.e. Python.h and so on; + otherwise, this is the path to platform-specific header files + (namely config.h).""" + + the_prefix = (plat_specific and exec_prefix or prefix) + if os.name == "posix": + return os.path.join (the_prefix, "include", "python" + sys.version[:3]) + elif os.name == "nt": + return os.path.join (the_prefix, "Include") # include or Include? + elif os.name == "mac": + return os.path.join (the_prefix, "Include") + else: + raise DistutilsPlatformError, \ + ("I don't know where Python installs its C header files " + + "on platform '%s'") % os.name + + +def get_python_lib (plat_specific=0, standard_lib=0): + """Return the directory containing the Python library (standard or + site additions). If 'plat_specific' is true, return the directory + containing platform-specific modules, i.e. any module from a + non-pure-Python module distribution; otherwise, return the + platform-shared library directory. If 'standard_lib' is true, + return the directory containing standard Python library modules; + otherwise, return the directory for site-specific modules.""" + + the_prefix = (plat_specific and exec_prefix or prefix) + + if os.name == "posix": + libpython = os.path.join (the_prefix, + "lib", "python" + sys.version[:3]) + if standard_lib: + return libpython + else: + return os.path.join (libpython, "site-packages") + + elif os.name == "nt": + if standard_lib: + return os.path.join (the_prefix, "Lib") + else: + return the_prefix + + elif os.name == "mac": + if platform_specific: + if standard_lib: + return os.path.join (exec_prefix, "Mac", "Plugins") + else: + raise DistutilsPlatformError, \ + "OK, where DO site-specific extensions go on the Mac?" + else: + if standard_lib: + return os.path.join (prefix, "Lib") + else: + raise DistutilsPlatformError, \ + "OK, where DO site-specific modules go on the Mac?" + else: + raise DistutilsPlatformError, \ + ("I don't know where Python installs its library " + + "on platform '%s'") % os.name + +# get_python_lib () + + def get_config_h_filename(): """Return full pathname of installed config.h file.""" - if os.name == "nt": - return os.path.join(exec_prefix, "include", "config.h") - else: - return os.path.join(exec_prefix, - "include", "python" + sys.version[:3], - "config.h") + inc_dir = get_python_inc (plat_specific=1) + return os.path.join (inc_dir, "config.h") + def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" - return os.path.join(exec_prefix, - "lib", "python" + sys.version[:3], - "config", "Makefile") + lib_dir = get_python_lib (plat_specific=1, standard_lib=1) + return os.path.join (lib_dir, "config", "Makefile") + def parse_config_h(fp, g=None): """Parse a config.h-style file. A dictionary containing name/value @@ -143,11 +206,11 @@ def _init_nt(): # load config.h, though I don't know how useful this is parse_config_h(open(get_config_h_filename()), g) # set basic install directories - g['LIBDEST'] = os.path.join(exec_prefix, "Lib") - g['BINLIBDEST'] = os.path.join(exec_prefix, "Lib") + g['LIBDEST'] = get_python_lib (plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib (plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = os.path.join(prefix, 'include') + g['INCLUDEPY'] = get_python_inc (plat_specific=0) g['SO'] = '.pyd' g['exec_prefix'] = exec_prefix @@ -161,15 +224,17 @@ def _init_mac(): parse_config_h(open( os.path.join(sys.exec_prefix, "Mac", "Include", "config.h")), g) # set basic install directories - g['LIBDEST']=os.path.join(sys.exec_prefix, "Lib") - g['BINLIBDEST']= os.path.join(sys.exec_prefix, "Mac", "Plugins") + g['LIBDEST'] = get_python_lib (plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib (plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = os.path.join (sys.prefix, 'Include' ) + g['INCLUDEPY'] = get_python_inc (plat_specific=0) g['SO'] = '.ppc.slb' g['exec_prefix'] = sys.exec_prefix print sys.prefix + + # XXX are these used anywhere? g['install_lib'] = os.path.join(sys.exec_prefix, "Lib") g['install_platlib'] = os.path.join(sys.exec_prefix, "Mac", "Lib") From 13a17ccd50ded25c15ce6065dd516d85fb52bd7b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 9 Mar 2000 15:54:52 +0000 Subject: [PATCH 0186/8469] There are a few places which can raise DistutilsPlatformError; make sure it's imported! ;) Re-wrap the docstrings on get_python_inc() and get_python_lib() to be closer to the "normal" Python style. See GvR's "style guide" on the essays page (http://www.python.org/doc/essays/). There should never be a space between a function name and the '(' that opens the argument list (see the style guide again). --- sysconfig.py | 95 +++++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 49e58eb919..2c7318c04d 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -13,65 +13,73 @@ import string import sys -prefix = os.path.normpath (sys.prefix) -exec_prefix = os.path.normpath (sys.exec_prefix) +from errors import DistutilsPlatformError -def get_python_inc (plat_specific=0): +prefix = os.path.normpath(sys.prefix) +exec_prefix = os.path.normpath(sys.exec_prefix) + + +def get_python_inc(plat_specific=0): """Return the directory containing installed Python header files. - If 'plat_specific' is false (the default), this is the path to the - non-platform-specific header files, i.e. Python.h and so on; - otherwise, this is the path to platform-specific header files - (namely config.h).""" - + + If 'plat_specific' is false (the default), this is the path to the + non-platform-specific header files, i.e. Python.h and so on; + otherwise, this is the path to platform-specific header files + (namely config.h). + + """ the_prefix = (plat_specific and exec_prefix or prefix) if os.name == "posix": - return os.path.join (the_prefix, "include", "python" + sys.version[:3]) + return os.path.join(the_prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": - return os.path.join (the_prefix, "Include") # include or Include? + return os.path.join(the_prefix, "Include") # include or Include? elif os.name == "mac": - return os.path.join (the_prefix, "Include") + return os.path.join(the_prefix, "Include") else: raise DistutilsPlatformError, \ ("I don't know where Python installs its C header files " + "on platform '%s'") % os.name -def get_python_lib (plat_specific=0, standard_lib=0): +def get_python_lib(plat_specific=0, standard_lib=0): """Return the directory containing the Python library (standard or - site additions). If 'plat_specific' is true, return the directory - containing platform-specific modules, i.e. any module from a - non-pure-Python module distribution; otherwise, return the - platform-shared library directory. If 'standard_lib' is true, - return the directory containing standard Python library modules; - otherwise, return the directory for site-specific modules.""" + site additions). + + If 'plat_specific' is true, return the directory containing + platform-specific modules, i.e. any module from a non-pure-Python + module distribution; otherwise, return the platform-shared library + directory. If 'standard_lib' is true, return the directory + containing standard Python library modules; otherwise, return the + directory for site-specific modules. + """ the_prefix = (plat_specific and exec_prefix or prefix) if os.name == "posix": - libpython = os.path.join (the_prefix, - "lib", "python" + sys.version[:3]) + libpython = os.path.join(the_prefix, + "lib", "python" + sys.version[:3]) if standard_lib: return libpython else: - return os.path.join (libpython, "site-packages") + return os.path.join(libpython, "site-packages") elif os.name == "nt": if standard_lib: - return os.path.join (the_prefix, "Lib") + return os.path.join(the_prefix, "Lib") else: return the_prefix elif os.name == "mac": if platform_specific: if standard_lib: - return os.path.join (exec_prefix, "Mac", "Plugins") + return os.path.join(exec_prefix, "Mac", "Plugins") else: raise DistutilsPlatformError, \ "OK, where DO site-specific extensions go on the Mac?" else: if standard_lib: - return os.path.join (prefix, "Lib") + return os.path.join(prefix, "Lib") else: raise DistutilsPlatformError, \ "OK, where DO site-specific modules go on the Mac?" @@ -80,25 +88,27 @@ def get_python_lib (plat_specific=0, standard_lib=0): ("I don't know where Python installs its library " + "on platform '%s'") % os.name -# get_python_lib () +# get_python_lib() def get_config_h_filename(): """Return full pathname of installed config.h file.""" - inc_dir = get_python_inc (plat_specific=1) - return os.path.join (inc_dir, "config.h") + inc_dir = get_python_inc(plat_specific=1) + return os.path.join(inc_dir, "config.h") def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" - lib_dir = get_python_lib (plat_specific=1, standard_lib=1) - return os.path.join (lib_dir, "config", "Makefile") + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + return os.path.join(lib_dir, "config", "Makefile") def parse_config_h(fp, g=None): - """Parse a config.h-style file. A dictionary containing name/value - pairs is returned. If an optional dictionary is passed in as the second - argument, it is used instead of a new dictionary. + """Parse a config.h-style file. + + A dictionary containing name/value pairs is returned. If an + optional dictionary is passed in as the second argument, it is + used instead of a new dictionary. """ if g is None: g = {} @@ -122,9 +132,12 @@ def parse_config_h(fp, g=None): return g def parse_makefile(fp, g=None): - """Parse a Makefile-style file. A dictionary containing name/value - pairs is returned. If an optional dictionary is passed in as the second - argument, it is used instead of a new dictionary. + """Parse a Makefile-style file. + + A dictionary containing name/value pairs is returned. If an + optional dictionary is passed in as the second argument, it is + used instead of a new dictionary. + """ if g is None: g = {} @@ -206,11 +219,11 @@ def _init_nt(): # load config.h, though I don't know how useful this is parse_config_h(open(get_config_h_filename()), g) # set basic install directories - g['LIBDEST'] = get_python_lib (plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib (plat_specific=1, standard_lib=1) + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc (plat_specific=0) + g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' g['exec_prefix'] = exec_prefix @@ -224,11 +237,11 @@ def _init_mac(): parse_config_h(open( os.path.join(sys.exec_prefix, "Mac", "Include", "config.h")), g) # set basic install directories - g['LIBDEST'] = get_python_lib (plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib (plat_specific=1, standard_lib=1) + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc (plat_specific=0) + g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.ppc.slb' g['exec_prefix'] = sys.exec_prefix From 970b9e96ac35abc8a46525a25c5d0e7dd5c2c53a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 10 Mar 2000 01:48:32 +0000 Subject: [PATCH 0187/8469] Renamed 'link_static_lib() to 'create_static_lib()'. --- ccompiler.py | 25 +++++++++++++------------ unixccompiler.py | 12 ++++++------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 2336e96589..46dabadee9 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -449,11 +449,11 @@ class documentation. In any event, they are intended as an pass - def link_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0): + def create_static_lib (self, + objects, + output_libname, + output_dir=None, + debug=0): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied @@ -484,10 +484,11 @@ def link_shared_lib (self, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a shared library - file. Has the same effect as 'link_static_lib()' except - that the filename inferred from 'output_libname' will most - likely be different, and the type of file generated will - almost certainly be different + file. Similar semantics to 'create_static_lib()', with the + addition of other libraries to link against and directories to + search for them. Also, of course, the type and name of + the generated file will almost certainly be different, as will + the program used to create it. 'libraries' is a list of libraries to link against. These are library names, not filenames, since they're translated into @@ -503,9 +504,9 @@ def link_shared_lib (self, default and those supplied to 'add_library_dir()' and/or 'set_library_dirs()'. - 'debug' is as for 'compile()' and 'link_static_lib()', with the + 'debug' is as for 'compile()' and 'create_static_lib()', with the slight distinction that it actually matters on most platforms - (as opposed to 'link_static_lib()', which includes a 'debug' + (as opposed to 'create_static_lib()', which includes a 'debug' flag mostly for form's sake). 'extra_preargs' and 'extra_postargs' are as for 'compile()' @@ -543,7 +544,7 @@ def link_executable (self, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a binary executable - file. The "bunch of stuff" is as for 'link_static_lib()'. + file. The "bunch of stuff" is as for 'link_shared_lib()'. 'output_progname' should be the base name of the executable program--e.g. on Unix the same as the output filename, but on DOS/Windows ".exe" will be appended.""" diff --git a/unixccompiler.py b/unixccompiler.py index 35390de0ce..0d2858de1c 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -140,11 +140,11 @@ def compile (self, # compile () - def link_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0): + def create_static_lib (self, + objects, + output_libname, + output_dir=None, + debug=0): (objects, output_dir) = self._fix_link_args (objects, output_dir, takes_libs=0) @@ -160,7 +160,7 @@ def link_static_lib (self, else: self.announce ("skipping %s (up-to-date)" % output_filename) - # link_static_lib () + # create_static_lib () def link_shared_lib (self, From 475a7ee2b018683744a4d4d739ce14b735fb11e8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 10 Mar 2000 01:49:26 +0000 Subject: [PATCH 0188/8469] Renamed 'link_static_lib() to 'create_static_lib()', and rewrote it create a static library (using lib.exe as found by '__init__()', hopefully through registry entries pointing to DevStudio). --- msvccompiler.py | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 847c611d29..bf5257f1d6 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -168,6 +168,7 @@ def __init__ (self, self.cc = _find_exe("cl.exe", version) self.link = _find_exe("link.exe", version) + self.lib = _find_exe("lib.exe", version) set_path_env_var ('lib', version) set_path_env_var ('include', version) path=get_msvc_paths('path', version) @@ -181,6 +182,7 @@ def __init__ (self, # devstudio not found in the registry self.cc = "cl.exe" self.link = "link.exe" + self.lib = "lib.exe" self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3' ] @@ -243,44 +245,32 @@ def compile (self, # compile () - # XXX the signature of this method is different from CCompiler and - # UnixCCompiler -- but those extra parameters (libraries, library_dirs) - # are actually used. So: are they really *needed*, or can they be - # ditched? If needed, the CCompiler API will have to change... - def link_static_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): + def create_static_lib (self, + objects, + output_libname, + output_dir=None, + debug=0, + extra_preargs=None, + extra_postargs=None): - (objects, output_dir, libraries, library_dirs) = \ - self._fix_link_args (objects, output_dir, takes_libs=1, - libraries=libraries, - library_dirs=library_dirs) - + (objects, output_dir) = \ + self._fix_link_args (objects, output_dir, takes_libs=0) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) if self._need_link (objects, output_filename): - lib_opts = gen_lib_options (libraries, library_dirs, - "%s.lib", "/LIBPATH:%s") - ld_args = self.ldflags_static + lib_opts + \ - objects + ['/OUT:' + output_filename] + lib_args = objects + ['/OUT:' + output_filename] if debug: pass # XXX what goes here? if extra_preargs: - ld_args[:0] = extra_preargs + lib_args[:0] = extra_preargs if extra_postargs: - ld_args.extend (extra_postargs) + lib_args.extend (extra_postargs) self.spawn ([self.link] + ld_args) else: self.announce ("skipping %s (up-to-date)" % output_filename) - # link_static_lib () + # create_static_lib () def link_shared_lib (self, From f148d847825da4d45f345c97a6e7ad8a48b02774 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 10 Mar 2000 02:02:44 +0000 Subject: [PATCH 0189/8469] Catch up with change to CCompiler API: call 'create_static_lib()', not 'link_static_lib()'. --- command/build_clib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index c49e3ca737..6560fb4774 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -190,9 +190,9 @@ def build_libraries (self, libraries): # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.link_static_lib (objects, lib_name, - output_dir=self.build_clib, - debug=self.debug) + self.compiler.create_static_lib (objects, lib_name, + output_dir=self.build_clib, + debug=self.debug) # for libraries From a447a64793487f03b2f059298a2a1bc1b069a9e2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 15:19:51 +0000 Subject: [PATCH 0190/8469] Changed to pay attention to the 'runtime_library_dirs' list (= 'rpath' option in the 'build_ext' command): * in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs' parameter * in unixccompiler.py and msvccompiler.py: now pass 'self.runtime_library_dirs' to 'gen_lib_options()', and define 'runtime_library_dir_option()' (although in msvccompiler.py it blows up with a DistutilsPlatformError right now!) --- ccompiler.py | 5 ++++- msvccompiler.py | 8 +++++++- unixccompiler.py | 11 +++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 46dabadee9..4a8c1d38c8 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -770,7 +770,7 @@ def gen_preprocess_options (macros, include_dirs): # gen_preprocess_options () -def gen_lib_options (compiler, library_dirs, libraries): +def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and linking with specific libraries. 'libraries' and 'library_dirs' are, respectively, lists of library names (not filenames!) and @@ -783,6 +783,9 @@ def gen_lib_options (compiler, library_dirs, libraries): for dir in library_dirs: lib_opts.append (compiler.library_dir_option (dir)) + for dir in runtime_library_dirs: + lib_opts.append (compiler.runtime_library_dir_option (dir)) + # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to # resolve all symbols. I just hope we never have to say "-lfoo obj.o diff --git a/msvccompiler.py b/msvccompiler.py index bf5257f1d6..7324b8e1c6 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -307,7 +307,9 @@ def link_shared_object (self, self._fix_link_args (objects, output_dir, takes_libs=1, libraries=libraries, library_dirs=library_dirs) - lib_opts = gen_lib_options (self, library_dirs, libraries) + lib_opts = gen_lib_options (self, + library_dirs, self.runtime_library_dirs, + libraries) if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: @@ -348,6 +350,10 @@ def link_shared_object (self, def library_dir_option (self, dir): return "/LIBPATH:" + dir + def runtime_library_dir_option (self, dir): + raise DistutilsPlatformError, \ + "don't know how to set runtime library search path for MSVC++" + def library_option (self, lib): return self.library_filename (lib) diff --git a/unixccompiler.py b/unixccompiler.py index 0d2858de1c..ec85571ddf 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -197,7 +197,9 @@ def link_shared_object (self, self._fix_link_args (objects, output_dir, takes_libs=1, libraries=libraries, library_dirs=library_dirs) - lib_opts = gen_lib_options (self, library_dirs, libraries) + lib_opts = gen_lib_options (self, + library_dirs, self.runtime_library_dirs, + libraries) if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: @@ -234,7 +236,9 @@ def link_executable (self, self._fix_link_args (objects, output_dir, takes_libs=1, libraries=libraries, library_dirs=library_dirs) - lib_opts = gen_lib_options (self, library_dirs, libraries) + lib_opts = gen_lib_options (self, + library_dirs, self.runtime_library_dirs, + libraries) output_filename = output_progname # Unix-ism! if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -262,6 +266,9 @@ def link_executable (self, def library_dir_option (self, dir): return "-L" + dir + def runtime_library_dir_option (self, dir): + return "-R" + dir + def library_option (self, lib): return "-l" + lib From f11f6f3246f288422067b7c49aa0ab7d20992048 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 15:21:03 +0000 Subject: [PATCH 0191/8469] In 'finalize_options()': if 'self.libs' is a string, make it a singleton list. --- command/build_ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 050a5c65b7..dfe64a114e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -117,6 +117,9 @@ def finalize_options (self): if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) + if type (self.libs) is StringType: + self.libs = [self.libs] + # XXX how the heck are 'self.define' and 'self.undef' supposed to # be set? From 52b70f2aefe7f937e5090dce65c43eef3f8e6051 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 15:37:26 +0000 Subject: [PATCH 0192/8469] Contribution from Bastian Kleineidam : the Distutils 'clean' command. --- command/clean.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 command/clean.py diff --git a/command/clean.py b/command/clean.py new file mode 100644 index 0000000000..9785de9938 --- /dev/null +++ b/command/clean.py @@ -0,0 +1,44 @@ +"""distutils.command.clean + +Implements the Distutils 'clean' command.""" + +# contributed by Bastian Kleineidam , added 2000-03-18 + +__revision__ = "$Id$" + +import os +from distutils.core import Command +from distutils.util import remove_tree + +class clean (Command): + + description = "clean files we built" + user_options = [ + ('build-base=', 'b', "base directory for build library"), + ('build-lib=', None, + "build directory for all distribution (defaults to either " + + "build-purelib or build-platlib"), + ('build-temp=', 't', "temporary build directory"), + ('all', 'a', + "remove all build output, not just temporary by-products") + ] + + def initialize_options(self): + self.build_base = None + self.build_lib = None + self.build_temp = None + self.all = None + + def finalize_options(self): + self.set_undefined_options('build', + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_temp', 'build_temp')) + + def run(self): + # remove the build/temp. directory + remove_tree (self.build_temp, self.verbose, self.dry_run) + + if self.all: + # remove the build/lib resp. build/platlib directory + remove_tree (self.build_lib, self.verbose, self.dry_run) From b0b51892b77115a91a1cbf12dc63faba193de7a3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 15:42:22 +0000 Subject: [PATCH 0193/8469] Patch from Bastian Kleineidam : added 'remove_tree()'. --- util.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 2f193fb43c..7a07b65648 100644 --- a/util.py +++ b/util.py @@ -11,7 +11,7 @@ __revision__ = "$Id$" -import os, string +import os, string, shutil from distutils.errors import * @@ -378,6 +378,25 @@ def copy_tree (src, dst, # copy_tree () +def remove_tree (directory, verbose=0, dry_run=0): + """Recursively remove an entire directory tree. Any errors are ignored + (apart from being reported to stdout if 'verbose' is true).""" + + if verbose: + print "removing '%s' (and everything under it)" % directory + if dry_run: + return + try: + shutil.rmtree(directory,1) + except (IOError, OSError), exc: + if verbose: + if exc.filename: + print "error removing %s: %s (%s)" % \ + (directory, exc.strerror, exc.filename) + else: + print "error removing %s: %s" % (directory, exc.strerror) + + # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, verbose=0, From d8cd9e2b90b4f3ea1603bc44cbf1a156172c0f76 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 15:43:42 +0000 Subject: [PATCH 0194/8469] Patch from Bastian Kleineidam : use 'util.remove_tree()' instead of 'nuke_release_tree()'. --- command/sdist.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 726458a246..0c15177893 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -10,9 +10,8 @@ import fnmatch from types import * from glob import glob -from shutil import rmtree from distutils.core import Command -from distutils.util import newer +from distutils.util import newer, remove_tree from distutils.text_file import TextFile from distutils.errors import DistutilsExecError @@ -504,19 +503,6 @@ def make_release_tree (self, base_dir, files): # make_release_tree () - def nuke_release_tree (self, base_dir): - try: - self.execute (rmtree, (base_dir,), - "removing %s" % base_dir) - except (IOError, OSError), exc: - if exc.filename: - msg = "error removing %s: %s (%s)" % \ - (base_dir, exc.strerror, exc.filename) - else: - msg = "error removing %s: %s" % (base_dir, exc.strerror) - self.warn (msg) - - def make_tarball (self, base_dir, compress="gzip"): # XXX GNU tar 1.13 has a nifty option to add a prefix directory. @@ -601,7 +587,7 @@ def make_distribution (self): self.make_zipfile (base_dir) if not self.keep_tree: - self.nuke_release_tree (base_dir) + remove_tree (base_dir, self.verbose, self.dry_run) # class Dist From 9403029df5514984078943c729e96ba310319613 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 17:33:18 +0000 Subject: [PATCH 0195/8469] Tweaked all over: * improve help strings * warn if user supplies non-existing directories * don't try to 'remove_tree()' non-existing directories * try to remove the build_base after cleanup (but don't do or say anything if it fails -- this is just in case we made it empty) --- command/clean.py | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/command/clean.py b/command/clean.py index 9785de9938..4f0f7e3e94 100644 --- a/command/clean.py +++ b/command/clean.py @@ -12,13 +12,14 @@ class clean (Command): - description = "clean files we built" + description = "clean up output of 'build' command" user_options = [ - ('build-base=', 'b', "base directory for build library"), + ('build-base=', 'b', + "base build directory (default: 'build.build-base')"), ('build-lib=', None, - "build directory for all distribution (defaults to either " + - "build-purelib or build-platlib"), - ('build-temp=', 't', "temporary build directory"), + "build directory for all modules (default: 'build.build-lib')"), + ('build-temp=', 't', + "temporary build directory (default: 'build.build-temp')"), ('all', 'a', "remove all build output, not just temporary by-products") ] @@ -30,15 +31,34 @@ def initialize_options(self): self.all = None def finalize_options(self): + if self.build_lib and not os.path.exists (self.build_lib): + self.warn ("'%s' does not exist -- can't clean it" % + self.build_lib) + if self.build_temp and not os.path.exists (self.build_temp): + self.warn ("'%s' does not exist -- can't clean it" % + self.build_temp) + self.set_undefined_options('build', ('build_base', 'build_base'), ('build_lib', 'build_lib'), ('build_temp', 'build_temp')) def run(self): - # remove the build/temp. directory - remove_tree (self.build_temp, self.verbose, self.dry_run) + # remove the build/temp. directory (unless it's already + # gone) + if os.path.exists (self.build_temp): + remove_tree (self.build_temp, self.verbose, self.dry_run) if self.all: - # remove the build/lib resp. build/platlib directory - remove_tree (self.build_lib, self.verbose, self.dry_run) + # remove the module build directory (unless already gone) + if os.path.exists (self.build_lib): + remove_tree (self.build_lib, self.verbose, self.dry_run) + + # just for the heck of it, try to remove the base build directory: + # we might have emptied it right now, but if not we don't care + if not self.dry_run: + try: + os.rmdir (self.build_base) + self.announce ("removing '%s'" % self.build_base) + except OSError: + pass From 8f7de70136acae5a467212cbb16c09ce2c364fdb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 17:35:12 +0000 Subject: [PATCH 0196/8469] Oops! Don't call 'ensure_ready()' in 'Distribution.find_command_obj()' -- that broke parsing command-line options. Instead call it in 'Command.find_peer()', which is why I added it to 'find_command_obj()' in the first place. --- core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index a31e60ce4a..dfe411b0cc 100644 --- a/core.py +++ b/core.py @@ -506,7 +506,6 @@ def find_command_obj (self, command, create=1): cmd_obj = self.command_obj.get (command) if not cmd_obj and create: cmd_obj = self.create_command_obj (command) - cmd_obj.ensure_ready () self.command_obj[command] = cmd_obj return cmd_obj @@ -873,7 +872,9 @@ def find_peer (self, command, create=1): find (create if necessary and 'create' is true) the command object for 'command'..""" - return self.distribution.find_command_obj (command, create) + cmd_obj = self.distribution.find_command_obj (command, create) + cmd_obj.ensure_ready () + return cmd_obj def get_peer_option (self, command, option): From bfc2b54d5a0bc8ba8a3b115aa8abaf3911cfc9c9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 18 Mar 2000 17:36:09 +0000 Subject: [PATCH 0197/8469] Simplified doc string. Added 'clean' to list of commands. --- command/__init__.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/command/__init__.py b/command/__init__.py index 40595ba949..d2b37a8ce1 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -1,17 +1,7 @@ """distutils.command Package containing implementation of all the standard Distutils -commands. Currently this means: - - build - build_py - build_ext - install - install_py - install_ext - dist - -but this list will undoubtedly grow with time.""" +commands.""" __revision__ = "$Id$" @@ -21,5 +11,6 @@ 'install', 'install_py', 'install_ext', + 'clean', 'sdist', ] From 2176088ac051cb11a5b4aee4928f32b831ec2063 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:11:21 +0000 Subject: [PATCH 0198/8469] Took out what looks like old debugging code that probably should never have been checked in: was passing the PLAT environment variable as the 'plat' argument to 'new_compiler()'. --- command/build_ext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index dfe64a114e..1d8794a6e4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -146,8 +146,7 @@ def run (self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (plat=os.environ.get ('PLAT'), - verbose=self.verbose, + self.compiler = new_compiler (verbose=self.verbose, dry_run=self.dry_run, force=self.force) if self.include_dirs is not None: From d852781fe93c7a37b90387e2b388bf18ed3823d1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:12:51 +0000 Subject: [PATCH 0199/8469] Fix how we set 'build_dir' and 'install_dir' options from 'install' options -- irrelevant because this file is about to go away, but oh well. --- command/install_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/install_ext.py b/command/install_ext.py index 8d23fa4cde..14730909bb 100644 --- a/command/install_ext.py +++ b/command/install_ext.py @@ -25,8 +25,8 @@ def initialize_options (self): def finalize_options (self): self.set_undefined_options ('install', - ('build_platlib', 'build_dir'), - ('install_platlib', 'install_dir')) + ('build_lib', 'build_dir'), + ('install_lib', 'install_dir')) def run (self): From d80b9efb03fd6cb33c60de06877d7cc04405b576 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:15:45 +0000 Subject: [PATCH 0200/8469] Yet another complete rewrite. Hopefully the *last* complete rewrite of this command for a while; this implements roughly the plan cooked up by Guido, Fred, and me. Seems to strike a nice balance between usability in the common cases (just set one option), expandability for more types of files to install in future, and customizability of installation directories. This revision isn't completely working: standard and alternate installations work fine, but there are still some kinks to work out of customized installations. --- command/install.py | 428 +++++++++++++++++++++++++++++++-------------- 1 file changed, 299 insertions(+), 129 deletions(-) diff --git a/command/install.py b/command/install.py index 1df558434a..13baa1a756 100644 --- a/command/install.py +++ b/command/install.py @@ -9,33 +9,76 @@ import sys, os, string from types import * from distutils.core import Command -from distutils.util import write_file +from distutils.util import write_file, native_path, subst_vars from distutils.errors import DistutilsOptionError +INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', + 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'scripts': '$base/bin', + 'data' : '$base/share', + }, + 'unix_home': { + 'purelib': '$base/lib/python', + 'platlib': '$base/lib/python', + 'scripts': '$base/bin', + 'data' : '$base/share', + }, + 'nt': { + 'purelib': '$base', + 'platlib': '$base', + 'scripts': '$base\\Scripts', + 'data' : '$base\\Data', + }, + 'mac': { + 'purelib': '$base:Lib', + 'platlib': '$base:Mac:PlugIns', + 'scripts': '$base:Scripts', + 'data' : '$base:Data', + } + } + + class install (Command): description = "install everything from build directory" user_options = [ - ('prefix=', None, "installation prefix"), + # Select installation scheme and set base director(y|ies) + ('prefix=', None, + "installation prefix"), ('exec-prefix=', None, - "prefix for platform-specific files"), - - # Installation directories: where to put modules and packages - ('install-lib=', None, - "base Python library directory"), + "(Unix only) prefix for platform-specific files"), + ('home=', None, + "(Unix only) home directory to install under"), + + # Or, just set the base director(y|ies) + ('install-base=', None, + "base installation directory (instead of --prefix or --home)"), + ('install-platbase=', None, + "base installation directory for platform-specific files " + + "(instead of --exec-prefix or --home)"), + + # Or, explicitly set the installation scheme + ('install-purelib=', None, + "installation directory for pure Python module distributions"), ('install-platlib=', None, - "platform-specific Python library directory"), - ('install-path=', None, - "extra intervening directories to put below install-lib"), + "installation directory for non-pure module distributions"), + ('install-lib=', None, + "installation directory for all module distributions " + + "(overrides --install-purelib and --install-platlib)"), + + ('install-scripts=', None, + "installation directory for Python scripts"), + ('install-data=', None, + "installation directory for data files"), # Build directories: where to find the files to install ('build-base=', None, "base build directory"), ('build-lib=', None, - "build directory for pure Python modules"), - ('build-platlib=', None, - "build directory for extension modules"), + "build directory for all Python modules"), # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), @@ -55,21 +98,31 @@ def initialize_options (self): # command is run whether the user supplied values self.prefix = None self.exec_prefix = None + self.home = None + + self.install_base = None + self.install_platbase = None # The actual installation directories are determined only at # run-time, so the user can supply just prefix (and exec_prefix?) # as a base for everything else - self.install_lib = None + self.install_purelib = None self.install_platlib = None - self.install_path = None + self.install_lib = None + + self.install_scripts = None + self.install_data = None self.build_base = None self.build_lib = None self.build_platlib = None - self.install_man = None - self.install_html = None - self.install_info = None + self.extra_path = None + self.install_path_file = 0 + + #self.install_man = None + #self.install_html = None + #self.install_info = None self.compile_py = 1 self.optimize_py = 1 @@ -103,129 +156,234 @@ def finalize_options (self): # Figure out actual installation directories; the basic principle # is: ... + + + # Logic: + # * any: (prefix or exec-prefix or home) and (base or platbase) + # supplied: error + # * Windows/Mac OS: exec-prefix or home supplied: warn and ignore + # + # * Unix: home set + # (select the unix_home scheme) + # * Unix: neither prefix nor home set + # (set prefix=sys_prefix and carry on) + # * Unix: prefix set but not exec-prefix + # (set exec-prefix=prefix and carry on) + # * Unix: prefix set + # (select the unix_prefix scheme) + # + # * Windows/Mac OS: prefix not set + # (set prefix = sys_prefix and carry on) + # * Windows/Mac OS: prefix set + # (select the appropriate scheme) + + # "select a scheme" means: + # - set install-base and install-platbase + # - subst. base/platbase/version into the values of the + # particular scheme dictionary + # - use the resultings strings to set install-lib, etc. + sys_prefix = os.path.normpath (sys.prefix) sys_exec_prefix = os.path.normpath (sys.exec_prefix) - if self.prefix is None: - if self.exec_prefix is not None: + # Check for errors/inconsistencies in the options + if ((self.prefix or self.exec_prefix or self.home) and + (self.install_base or self.install_platbase)): + raise DistutilsOptionError, \ + ("must supply either prefix/exec-prefix/home or " + + "install-base/install-platbase -- not both") + + if os.name == 'posix': + if self.home and (self.prefix or self.exec_prefix): raise DistutilsOptionError, \ - "you may not supply exec_prefix without prefix" - self.prefix = sys_prefix - else: - # This is handy to guarantee that self.prefix is normalized -- - # but it could be construed as rude to go normalizing a - # user-supplied path (they might like to see their "../" or - # symlinks in the installation feedback). - self.prefix = os.path.normpath (self.prefix) - - if self.exec_prefix is None: - if self.prefix == sys_prefix: - self.exec_prefix = sys_exec_prefix - else: - self.exec_prefix = self.prefix + ("must supply either home or prefix/exec-prefix -- " + + "not both") else: - # Same as above about handy versus rude to normalize user's - # exec_prefix. - self.exec_prefix = os.path.normpath (self.exec_prefix) + if self.exec_prefix: + self.warn ("exec-prefix option ignored on this platform") + self.exec_prefix = None + if self.home: + self.warn ("home option ignored on this platform") + self.home = None + + # Now the interesting logic -- so interesting that we farm it out + # to other methods. The goal of these methods is to set the final + # values for the install_{lib,scripts,data,...} options, using as + # input a heady brew of prefix, exec_prefix, home, install_base, + # install_platbase, user-supplied versions of + # install_{purelib,platlib,lib,scripts,data,...}, and the + # INSTALL_SCHEME dictionary above. Phew! - if self.distribution.ext_modules: # any extensions to install? - effective_prefix = self.exec_prefix + if os.name == 'posix': + self.finalize_unix () else: - effective_prefix = self.prefix + self.finalize_other () + + # Expand "~" and configuration variables in the installation + # directories. + self.expand_dirs () + + # Pick the actual directory to install all modules to: either + # install_purelib or install_platlib, depending on whether this + # module distribution is pure or not. Of course, if the user + # already specified install_lib, use their selection. + if self.install_lib is None: + if self.distribution.ext_modules: # has extensions: non-pure + self.install_lib = self.install_platlib + else: + self.install_lib = self.install_purelib + + # Well, we're not actually fully completely finalized yet: we still + # have to deal with 'extra_path', which is the hack for allowing + # non-packagized module distributions (hello, Numerical Python!) to + # get their own directories. + self.handle_extra_path () + self.install_libbase = self.install_lib # needed for .pth file + self.install_lib = os.path.join (self.install_lib, self.extra_dirs) - if os.name == 'posix': - if self.install_lib is None: - if self.prefix == sys_prefix: - self.install_lib = \ - os.path.join (effective_prefix, - "lib", - "python" + sys.version[:3], - "site-packages") - else: - self.install_lib = \ - os.path.join (effective_prefix, - "lib", - "python") # + sys.version[:3] ??? - # end if self.install_lib ... - - if self.install_platlib is None: - if self.exec_prefix == sys_exec_prefix: - self.install_platlib = \ - os.path.join (effective_prefix, - "lib", - "python" + sys.version[:3], - "site-packages") - else: - self.install_platlib = \ - os.path.join (effective_prefix, - "lib", - "python") # + sys.version[:3] ??? - # end if self.install_platlib ... + # Figure out the build directories, ie. where to install from + self.set_peer_option ('build', 'build_base', self.build_base) + self.set_undefined_options ('build', + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_platlib', 'build_platlib')) + + # Punt on doc directories for now -- after all, we're punting on + # documentation completely! + # finalize_options () + + + def finalize_unix (self): + + if self.install_base is not None or self.install_platbase is not None: + if ((self.install_lib is None and + self.install_purelib is None and + self.install_platlib is None) or + self.install_scripts is None or + self.install_data is None): + raise DistutilsOptionError, \ + "install-base or install-platbase supplied, but " + \ + "installation scheme is incomplete" + + return + + if self.home is not None: + self.install_base = self.install_platbase = self.home + self.select_scheme ("unix_home") else: + if self.prefix is None: + if self.exec_prefix is not None: + raise DistutilsOptionError, \ + "must not supply exec-prefix without prefix" + + self.prefix = os.path.normpath (sys.prefix) + self.exec_prefix = os.path.normpath (sys.exec_prefix) + self.install_path_file = 1 + + else: + if self.exec_prefix is None: + self.exec_prefix = self.prefix + + + # XXX since we don't *know* that a user-supplied prefix really + # points to another Python installation, we can't be sure that + # writing a .pth file there will actually work -- so we don't + # try. That is, we only set 'install_path_file' if the user + # didn't supply prefix. There are certainly circumstances + # under which we *should* install a .pth file when the user + # supplies a prefix, namely when that prefix actually points to + # another Python installation. Hmmm. + + self.install_base = self.prefix + self.install_platbase = self.exec_prefix + self.select_scheme ("unix_prefix") + + # finalize_unix () + + + def finalize_other (self): # Windows and Mac OS for now + + if self.prefix is None: + self.prefix = os.path.normpath (sys.prefix) + self.install_path_file = 1 + + # XXX same caveat regarding 'install_path_file' as in + # 'finalize_unix()'. + + self.install_base = self.install_platbase = self.prefix + try: + self.select_scheme (os.name) + except KeyError: raise DistutilsPlatformError, \ - "duh, I'm clueless (for now) about installing on %s" % os.name + "I don't know how to install stuff on '%s'" % os.name - # end if/else on os.name - + # finalize_other () + + + def select_scheme (self, name): + + # it's the caller's problem if they supply a bad name! + scheme = INSTALL_SCHEMES[name] + + vars = { 'base': self.install_base, + 'platbase': self.install_platbase, + 'py_version_short': sys.version[0:3], + } + + for key in ('purelib', 'platlib', 'scripts', 'data'): + val = subst_vars (scheme[key], vars) + setattr (self, 'install_' + key, val) + + + def expand_dirs (self): + + # XXX probably don't want to 'expanduser()' on Windows or Mac + # XXX should use 'util.subst_vars()' with our own set of + # configuration variables + + for att in ('base', 'platbase', + 'purelib', 'platlib', 'lib', + 'scripts', 'data'): + fullname = "install_" + att + val = getattr (self, fullname) + if val is not None: + setattr (self, fullname, + os.path.expandvars (os.path.expanduser (val))) + + + def handle_extra_path (self): - # 'path_file' and 'extra_dirs' are how we handle distributions that - # want to be installed to their own directory, but aren't - # package-ized yet. 'extra_dirs' is just a directory under - # 'install_lib' or 'install_platlib' where top-level modules will - # actually be installed; 'path_file' is the basename of a .pth file - # to drop in 'install_lib' or 'install_platlib' (depending on the - # distribution). Very often they will be the same, which is why we - # allow them to be supplied as a string or 1-tuple as well as a - # 2-element comma-separated string or a 2-tuple. - - # XXX this will drop a .pth file in install_{lib,platlib} even if - # they're not one of the site-packages directories: this is wrong! - # we need to suppress path_file in those cases, and warn if - # "install_lib/extra_dirs" is not in sys.path. - - if self.install_path is None: - self.install_path = self.distribution.install_path - - if self.install_path is not None: - if type (self.install_path) is StringType: - self.install_path = string.split (self.install_path, ',') - - if len (self.install_path) == 1: - path_file = extra_dirs = self.install_path[0] - elif len (self.install_path) == 2: - (path_file, extra_dirs) = self.install_path + if self.extra_path is None: + self.extra_path = self.distribution.extra_path + + if self.extra_path is not None: + if type (self.extra_path) is StringType: + self.extra_path = string.split (self.extra_path, ',') + + if len (self.extra_path) == 1: + path_file = extra_dirs = self.extra_path[0] + elif len (self.extra_path) == 2: + (path_file, extra_dirs) = self.extra_path else: raise DistutilsOptionError, \ - "'install_path' option must be a list, tuple, or " + \ + "'extra_path' option must be a list, tuple, or " + \ "comma-separated string with 1 or 2 elements" - # install path has slashes in it -- might need to convert to - # local form - if string.find (extra_dirs, '/') and os.name != "posix": - extra_dirs = string.split (extra_dirs, '/') - extra_dirs = apply (os.path.join, extra_dirs) + # convert to local form in case Unix notation used (as it + # should be in setup scripts) + extra_dirs = native_path (extra_dirs) + else: path_file = None extra_dirs = '' - # XXX should we warn if path_file and not extra_dirs (in which case - # the path file would be harmless but pointless) + # XXX should we warn if path_file and not extra_dirs? (in which + # case the path file would be harmless but pointless) self.path_file = path_file self.extra_dirs = extra_dirs - - # Figure out the build directories, ie. where to install from - self.set_peer_option ('build', 'build_base', self.build_base) - self.set_undefined_options ('build', - ('build_base', 'build_base'), - ('build_lib', 'build_lib'), - ('build_platlib', 'build_platlib')) - - # Punt on doc directories for now -- after all, we're punting on - # documentation completely! - - # finalize_options () + # handle_extra_path () def run (self): @@ -238,28 +396,40 @@ def run (self): # extensions). Note that 'install_py' is smart enough to install # pure Python modules in the "platlib" directory if we built any # extensions. + + # XXX this should become one command, 'install_lib', since + # all modules are "built" into the same directory now + if self.distribution.packages or self.distribution.py_modules: self.run_peer ('install_py') - if self.distribution.ext_modules: - self.run_peer ('install_ext') + #if self.distribution.ext_modules: + # self.run_peer ('install_ext') if self.path_file: self.create_path_file () + normalized_path = map (os.path.normpath, sys.path) + if (not (self.path_file and self.install_path_file) and + os.path.normpath (self.install_lib) not in normalized_path): + self.warn (("modules installed to '%s', which is not in " + + "Python's module search path (sys.path) -- " + + "you'll have to change the search path yourself") % + self.install_lib) + # run () def create_path_file (self): - - if self.distribution.ext_modules: - base = self.platbase + filename = os.path.join (self.install_libbase, + self.path_file + ".pth") + if self.install_path_file: + self.execute (write_file, + (filename, [self.extra_dirs]), + "creating %s" % filename) else: - base = self.base - - filename = os.path.join (base, self.path_file + ".pth") - self.execute (write_file, - (filename, [self.extra_dirs]), - "creating %s" % filename) - + self.warn (("path file '%s' not created for alternate or custom " + + "installation (path files only work with standard " + + "installations)") % + filename) # class Install From 4b8aee534fe757703ad35e112a716bd732ae0cc6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:20:46 +0000 Subject: [PATCH 0201/8469] Renamed 'install_path' to 'extra_path'. Fix 'Command.set_undefined_option()' to call 'ensure_ready()' rather than 'finalize_options()' (which is only supposed to be called once, which is the whole point of 'ensure_ready()'). Added comment to 'set_peer_option()' to remind myself that this method cannot work and is fundamentally wrong-headed. --- core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index dfe411b0cc..2f3a36d7d0 100644 --- a/core.py +++ b/core.py @@ -197,7 +197,7 @@ def __init__ (self, attrs=None): self.ext_modules = None self.ext_package = None self.include_dirs = None - self.install_path = None + self.extra_path = None # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to @@ -840,7 +840,7 @@ def set_undefined_options (self, src_cmd, *option_pairs): # Option_pairs: list of (src_option, dst_option) tuples src_cmd_obj = self.distribution.find_command_obj (src_cmd) - src_cmd_obj.finalize_options () + src_cmd_obj.ensure_ready () try: for (src_option, dst_option) in option_pairs: if getattr (self, dst_option) is None: @@ -862,6 +862,10 @@ def set_peer_option (self, command, option, value): second 'finalize_options()' invocation will have little or no effect.""" + # XXX this won't work -- must call finalize_option to work, but + # calling finalize_option is wrong (it's only supposed to be called + # once). Where is this needed?!??! + cmd_obj = self.distribution.find_command_obj (command) cmd_obj.set_option (option, value) cmd_obj.finalize_options () From bcfea0afe66af5445e7660e4828a422161cf4126 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:22:44 +0000 Subject: [PATCH 0202/8469] Improved an error message in 'mkpath()'. Tightened up some logic in 'native_path()'. Added 'subst_vars()' and '_check_environ()'. --- util.py | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/util.py b/util.py index 7a07b65648..b308b90dd0 100644 --- a/util.py +++ b/util.py @@ -11,7 +11,7 @@ __revision__ = "$Id$" -import os, string, shutil +import os, string, re, shutil from distutils.errors import * @@ -71,7 +71,8 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): try: os.mkdir (head) except os.error, (errno, errstr): - raise DistutilsFileError, "'%s': %s" % (head, errstr) + raise DistutilsFileError, \ + "could not create '%s': %s" % (head, errstr) PATH_CREATED[head] = 1 @@ -504,11 +505,10 @@ def native_path (pathname): raise DistutilsValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': raise DistutilsValueError, "path '%s' cannot end with '/'" % pathname - if os.sep != '/': - if os.sep in pathname: - raise DistutilsValueError, \ - "path '%s' cannot contain '%c' character" % \ - (pathname, os.sep) + if os.sep != '/' and os.sep in pathname: + raise DistutilsValueError, \ + "path '%s' cannot contain '%c' character" % \ + (pathname, os.sep) paths = string.split (pathname, '/') return apply (os.path.join, paths) @@ -516,3 +516,43 @@ def native_path (pathname): return pathname # native_path () + + +def _check_environ (): + """Ensure that 'os.environ' has all the environment variables we + guarantee that users can use in config files, command-line + options, etc. Currently this includes: + HOME - user's home directory (Unix only) + PLAT - desription of the current platform, including hardware + and OS (see 'get_platform()') + """ + + if os.name == 'posix' and not os.environ.has_key('HOME'): + import pwd + os.environ['HOME'] = pwd.getpwuid (os.getuid())[5] + + if not os.environ.has_key('PLAT'): + os.environ['PLAT'] = get_platform () + + +def subst_vars (str, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. + Every occurence of '$' followed by a name, or a name enclosed in + braces, is considered a variable. Every variable is substituted by + the value found in the 'local_vars' dictionary, or in 'os.environ' + if it's not in 'local_vars'. 'os.environ' is first checked/ + augmented to guarantee that it contains certain values: see + '_check_environ()'. Raise ValueError for any variables not found in + either 'local_vars' or 'os.environ'.""" + + _check_environ () + def _subst (match, local_vars=local_vars): + var_name = match.group(1) + if local_vars.has_key (var_name): + return str (local_vars[var_name]) + else: + return os.environ[var_name] + + return re.sub (r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) + +# subst_vars () From 03db2e6f44914364b5e32fa45de7002e13e08142 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:30:54 +0000 Subject: [PATCH 0203/8469] Dropped any notion of allowing the user to specify the build directories: these must come from the 'build' command. This means we no longer need the misconceived 'set_peer_option()' method in Command and, more importantly, sweeps away a bunch of potential future complexity to handle this tricky case. --- command/install.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/command/install.py b/command/install.py index 13baa1a756..a1b5d06aec 100644 --- a/command/install.py +++ b/command/install.py @@ -74,12 +74,6 @@ class install (Command): ('install-data=', None, "installation directory for data files"), - # Build directories: where to find the files to install - ('build-base=', None, - "base build directory"), - ('build-lib=', None, - "build directory for all Python modules"), - # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), #('install-man=', None, "directory for Unix man pages"), @@ -113,13 +107,18 @@ def initialize_options (self): self.install_scripts = None self.install_data = None - self.build_base = None - self.build_lib = None - self.build_platlib = None - self.extra_path = None self.install_path_file = 0 + # These are only here as a conduit from the 'build' command to the + # 'install_*' commands that do the real work. ('build_base' isn't + # actually used anywhere, but it might be useful in future.) They + # are not user options, because if the user told the install + # command where the build directory is, that wouldn't affect the + # build command. + self.build_base = None + self.build_lib = None + #self.install_man = None #self.install_html = None #self.install_info = None @@ -242,11 +241,9 @@ def finalize_options (self): self.install_lib = os.path.join (self.install_lib, self.extra_dirs) # Figure out the build directories, ie. where to install from - self.set_peer_option ('build', 'build_base', self.build_base) self.set_undefined_options ('build', ('build_base', 'build_base'), - ('build_lib', 'build_lib'), - ('build_platlib', 'build_platlib')) + ('build_lib', 'build_lib')) # Punt on doc directories for now -- after all, we're punting on # documentation completely! From 6ec82e3176107f789ba8386705b60c2f65bf0999 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:31:37 +0000 Subject: [PATCH 0204/8469] Dropped the evil and misguided 'set_peer_option()' method -- it's no longer needed, and can't possibly work anyways. --- core.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/core.py b/core.py index 2f3a36d7d0..df3646765f 100644 --- a/core.py +++ b/core.py @@ -851,26 +851,6 @@ def set_undefined_options (self, src_cmd, *option_pairs): raise DistutilsOptionError, "unknown option %s" % name - def set_peer_option (self, command, option, value): - """Attempt to simulate a command-line override of some option - value in another command. Finds the command object for - 'command', sets its 'option' to 'value', and unconditionally - calls 'finalize_options()' on it: this means that some command - objects may have 'finalize_options()' invoked more than once. - Even so, this is not entirely reliable: the other command may - already be initialized to its satisfaction, in which case the - second 'finalize_options()' invocation will have little or no - effect.""" - - # XXX this won't work -- must call finalize_option to work, but - # calling finalize_option is wrong (it's only supposed to be called - # once). Where is this needed?!??! - - cmd_obj = self.distribution.find_command_obj (command) - cmd_obj.set_option (option, value) - cmd_obj.finalize_options () - - def find_peer (self, command, create=1): """Wrapper around Distribution's 'find_command_obj()' method: find (create if necessary and 'create' is true) the command From eb49a5318baf4799d7b24e8ec6e4b9012b6ad0b1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:35:16 +0000 Subject: [PATCH 0205/8469] Obsolete command -- no longer relevant since we now build all modules, pure Python and extensions, into the same directory. --- command/install_ext.py | 43 ------------------------------------------ 1 file changed, 43 deletions(-) delete mode 100644 command/install_ext.py diff --git a/command/install_ext.py b/command/install_ext.py deleted file mode 100644 index 14730909bb..0000000000 --- a/command/install_ext.py +++ /dev/null @@ -1,43 +0,0 @@ -"""install_ext - -Implement the Distutils "install_ext" command to install extension modules.""" - -# created 1999/09/12, Greg Ward - -__revision__ = "$Id$" - -from distutils.core import Command -from distutils.util import copy_tree - -class install_ext (Command): - - description = "install C/C++ extension modules" - - user_options = [ - ('install-dir=', 'd', "directory to install to"), - ('build-dir=','b', "build directory (where to install from)"), - ] - - def initialize_options (self): - # let the 'install' command dictate our installation directory - self.install_dir = None - self.build_dir = None - - def finalize_options (self): - self.set_undefined_options ('install', - ('build_lib', 'build_dir'), - ('install_lib', 'install_dir')) - - def run (self): - - # Make sure we have built all extension modules first - self.run_peer ('build_ext') - - # Dump the entire "build/platlib" directory (or whatever it really - # is; "build/platlib" is the default) to the installation target - # (eg. "/usr/local/lib/python1.5/site-packages"). Note that - # putting files in the right package dir is already done when we - # build. - outfiles = self.copy_tree (self.build_dir, self.install_dir) - -# class InstallExt From d3774f58433e614f683b466370188b4281c35735 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:37:16 +0000 Subject: [PATCH 0206/8469] Renamed install_py.py to install_lib.py, since it now handles installing all Python modules, pure and extensions. --- command/install_py.py | 76 ------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 command/install_py.py diff --git a/command/install_py.py b/command/install_py.py deleted file mode 100644 index 33cf6894e2..0000000000 --- a/command/install_py.py +++ /dev/null @@ -1,76 +0,0 @@ -# created 1999/03/13, Greg Ward - -__revision__ = "$Id$" - -import sys, string -from distutils.core import Command -from distutils.util import copy_tree - -class install_py (Command): - - description = "install pure Python modules" - - user_options = [ - ('install-dir=', 'd', "directory to install to"), - ('build-dir=','b', "build directory (where to install from)"), - ('compile', 'c', "compile .py to .pyc"), - ('optimize', 'o', "compile .py to .pyo (optimized)"), - ] - - - def initialize_options (self): - # let the 'install' command dictate our installation directory - self.install_dir = None - self.build_dir = None - self.compile = 1 - self.optimize = 1 - - def finalize_options (self): - - # Get all the information we need to install pure Python modules - # from the umbrella 'install' command -- build (source) directory, - # install (target) directory, and whether to compile .py files. - self.set_undefined_options ('install', - ('build_lib', 'build_dir'), - ('install_lib', 'install_dir'), - ('compile_py', 'compile'), - ('optimize_py', 'optimize')) - - - def run (self): - - # Make sure we have "built" all pure Python modules first - self.run_peer ('build_py') - - # Install everything: simply dump the entire contents of the build - # directory to the installation directory (that's the beauty of - # having a build directory!) - outfiles = self.copy_tree (self.build_dir, self.install_dir) - - # (Optionally) compile .py to .pyc - # XXX hey! we can't control whether we optimize or not; that's up - # to the invocation of the current Python interpreter (at least - # according to the py_compile docs). That sucks. - - if self.compile: - from py_compile import compile - - for f in outfiles: - # XXX can't assume this filename mapping! (what if - # we're running under "python -O"?) - - # only compile the file if it is actually a .py file - if f[-3:] == '.py': - out_fn = string.replace (f, '.py', '.pyc') - - self.make_file (f, out_fn, compile, (f,), - "byte-compiling %s" % f, - "byte-compilation of %s skipped" % f) - - # XXX ignore self.optimize for now, since we don't really know if - # we're compiling optimally or not, and couldn't pick what to do - # even if we did know. ;-( - - # run () - -# class InstallPy From 3603215dbb368ef0ffa0375174e2aeafc2d32fb1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:40:16 +0000 Subject: [PATCH 0207/8469] Run 'install_lib' instead of 'install_py', and ditch 'install_ext' completely (was already commented-out). --- command/install.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/command/install.py b/command/install.py index a1b5d06aec..00aa072047 100644 --- a/command/install.py +++ b/command/install.py @@ -388,19 +388,10 @@ def run (self): # Obviously have to build before we can install self.run_peer ('build') - # Install modules in two steps: "platform-shared" files (ie. pure - # Python modules) and platform-specific files (compiled C - # extensions). Note that 'install_py' is smart enough to install - # pure Python modules in the "platlib" directory if we built any - # extensions. - - # XXX this should become one command, 'install_lib', since - # all modules are "built" into the same directory now - - if self.distribution.packages or self.distribution.py_modules: - self.run_peer ('install_py') - #if self.distribution.ext_modules: - # self.run_peer ('install_ext') + # Now install all Python modules -- don't bother to make this + # conditional; why would someone distribute a Python module + # distribution without Python modules? + self.run_peer ('install_lib') if self.path_file: self.create_path_file () From 2f194a8f5701e42aef8801075f4b72da7a482fd8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 22 Mar 2000 00:51:18 +0000 Subject: [PATCH 0208/8469] Revised tons of comments to reflect the current state of affairs better. Deleted some crufty code. --- command/install.py | 111 ++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 72 deletions(-) diff --git a/command/install.py b/command/install.py index 00aa072047..ed74971efa 100644 --- a/command/install.py +++ b/command/install.py @@ -79,34 +79,38 @@ class install (Command): #('install-man=', None, "directory for Unix man pages"), #('install-html=', None, "directory for HTML documentation"), #('install-info=', None, "directory for GNU info files"), - - # Flags for 'build_py' - #('compile-py', None, "compile .py to .pyc"), - #('optimize-py', None, "compile .py to .pyo (optimized)"), ] def initialize_options (self): - # Don't define 'prefix' or 'exec_prefix' so we can know when the - # command is run whether the user supplied values + # High-level options: these select both an installation base + # and scheme. self.prefix = None self.exec_prefix = None self.home = None + # These select only the installation base; it's up to the user to + # specify the installation scheme (currently, that means supplying + # the --install-{platlib,purelib,scripts,data} options). self.install_base = None self.install_platbase = None - # The actual installation directories are determined only at - # run-time, so the user can supply just prefix (and exec_prefix?) - # as a base for everything else - self.install_purelib = None - self.install_platlib = None - self.install_lib = None - + # These options are the actual installation directories; if not + # supplied by the user, they are filled in using the installation + # scheme implied by prefix/exec-prefix/home and the contents of + # that installation scheme. + self.install_purelib = None # for pure module distributions + self.install_platlib = None # non-pure (dists w/ extensions) + self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None + # These two are for putting non-packagized distributions into their + # own directory and creating a .pth file if it makes sense. + # 'extra_path' comes from the setup file; 'install_path_file' is + # set only if we determine that it makes sense to install a path + # file. self.extra_path = None self.install_path_file = 0 @@ -119,79 +123,36 @@ def initialize_options (self): self.build_base = None self.build_lib = None + # Not defined yet because we don't know anything about + # documentation yet. #self.install_man = None #self.install_html = None #self.install_info = None - self.compile_py = 1 - self.optimize_py = 1 - def finalize_options (self): - # XXX this method is where the default installation directories - # for modules and extension modules are determined. (Someday, - # the default installation directories for scripts, - # documentation, and whatever else the Distutils can build and - # install will also be determined here.) Thus, this is a pretty - # important place to fiddle with for anyone interested in - # installation schemes for the Python library. Issues that - # are not yet resolved to my satisfaction: - # * how much platform dependence should be here, and - # how much can be pushed off to sysconfig (or, better, the - # Makefiles parsed by sysconfig)? - # * how independent of Python version should this be -- ie. - # should we have special cases to handle Python 1.5 and - # older, and then do it "the right way" for 1.6? Or should - # we install a site.py along with Distutils under pre-1.6 - # Python to take care of the current deficiencies in - # Python's library installation scheme? - # - # Currently, this method has hacks to distinguish POSIX from - # non-POSIX systems (for installation of site-local modules), - # and assumes the Python 1.5 installation tree with no site.py - # to fix things. - - # Figure out actual installation directories; the basic principle - # is: ... - - - - # Logic: - # * any: (prefix or exec-prefix or home) and (base or platbase) - # supplied: error - # * Windows/Mac OS: exec-prefix or home supplied: warn and ignore - # - # * Unix: home set - # (select the unix_home scheme) - # * Unix: neither prefix nor home set - # (set prefix=sys_prefix and carry on) - # * Unix: prefix set but not exec-prefix - # (set exec-prefix=prefix and carry on) - # * Unix: prefix set - # (select the unix_prefix scheme) - # - # * Windows/Mac OS: prefix not set - # (set prefix = sys_prefix and carry on) - # * Windows/Mac OS: prefix set - # (select the appropriate scheme) + # This method (and its pliant slaves, like 'finalize_unix()', + # 'finalize_other()', and 'select_scheme()') is where the default + # installation directories for modules, extension modules, and + # anything else we care to install from a Python module + # distribution. Thus, this code makes a pretty important policy + # statement about how third-party stuff is added to a Python + # installation! Note that the actual work of installation is done + # by the relatively simple 'install_*' commands; they just take + # their orders from the installation directory options determined + # here. - # "select a scheme" means: - # - set install-base and install-platbase - # - subst. base/platbase/version into the values of the - # particular scheme dictionary - # - use the resultings strings to set install-lib, etc. + # Check for errors/inconsistencies in the options; first, stuff + # that's wrong on any platform. - sys_prefix = os.path.normpath (sys.prefix) - sys_exec_prefix = os.path.normpath (sys.exec_prefix) - - # Check for errors/inconsistencies in the options if ((self.prefix or self.exec_prefix or self.home) and (self.install_base or self.install_platbase)): raise DistutilsOptionError, \ ("must supply either prefix/exec-prefix/home or " + "install-base/install-platbase -- not both") + # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name == 'posix': if self.home and (self.prefix or self.exec_prefix): raise DistutilsOptionError, \ @@ -240,7 +201,7 @@ def finalize_options (self): self.install_libbase = self.install_lib # needed for .pth file self.install_lib = os.path.join (self.install_lib, self.extra_dirs) - # Figure out the build directories, ie. where to install from + # Find out the build directories, ie. where to install from. self.set_undefined_options ('build', ('build_base', 'build_base'), ('build_lib', 'build_lib')) @@ -320,6 +281,12 @@ def finalize_other (self): # Windows and Mac OS for now def select_scheme (self, name): + # "select a scheme" means: + # - set install-base and install-platbase + # - subst. base/platbase/version into the values of the + # particular scheme dictionary + # - use the resultings strings to set install-lib, etc. + # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] From 51d7237f93809f4d6de8ed358a525777793e74d7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 23 Mar 2000 04:37:11 +0000 Subject: [PATCH 0209/8469] Fixed the class name. --- command/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 33cf6894e2..eaaa1c7da2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,7 +6,7 @@ from distutils.core import Command from distutils.util import copy_tree -class install_py (Command): +class install_lib (Command): description = "install pure Python modules" From 89cec6fde3704c17ce83732bee0c0da4ef54a7a4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 23 Mar 2000 04:38:36 +0000 Subject: [PATCH 0210/8469] Fixed '_nt_quote_args()': backwards logic reversed, and now it actually returns a value. --- spawn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spawn.py b/spawn.py index ae3d09fa31..4e6f206991 100644 --- a/spawn.py +++ b/spawn.py @@ -53,9 +53,9 @@ def _nt_quote_args (args): # quoting?) for i in range (len (args)): - if string.find (args[i], ' ') == -1: + if string.find (args[i], ' ') != -1: args[i] = '"%s"' % args[i] - + return def _spawn_nt (cmd, search_path=1, From 890ea186e16b49a61d19f9a9055c5e67a106ce3d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 23 Mar 2000 04:39:16 +0000 Subject: [PATCH 0211/8469] Import fix. --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index b308b90dd0..caf9906281 100644 --- a/util.py +++ b/util.py @@ -11,7 +11,7 @@ __revision__ = "$Id$" -import os, string, re, shutil +import sys, os, string, re, shutil from distutils.errors import * From db89798d96147692062b0ecad0513f2476082c3e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:37:09 +0000 Subject: [PATCH 0212/8469] Added 'runtime_library_dirs' parameter to 'link_*()' methods. Split '_fix_link_args()' up into '_fix_object_args()' (for use of 'create_static_lib() and link methods) and '_fix_lib_args()' (for the link methods only). --- ccompiler.py | 71 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 4a8c1d38c8..ffad294706 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -338,16 +338,11 @@ def _prep_compile (self, sources, output_dir): # _prep_compile () - def _fix_link_args (self, objects, output_dir, - takes_libs=0, libraries=None, library_dirs=None): - """Typecheck and fix up some of the arguments supplied to the - 'link_*' methods and return the fixed values. Specifically: - ensure that 'objects' is a list; if output_dir is None, use - self.output_dir; ensure that 'libraries' and 'library_dirs' are - both lists, and augment them with 'self.libraries' and - 'self.library_dirs'. If 'takes_libs' is true, return a tuple - (objects, output_dir, libraries, library_dirs; else return - (objects, output_dir).""" + def _fix_object_args (self, objects, output_dir): + """Typecheck and fix up some arguments supplied to various + methods. Specifically: ensure that 'objects' is a list; if + output_dir is None, replace with self.output_dir. Return fixed + versions of 'objects' and 'output_dir'.""" if type (objects) not in (ListType, TupleType): raise TypeError, \ @@ -359,28 +354,45 @@ def _fix_link_args (self, objects, output_dir, elif type (output_dir) is not StringType: raise TypeError, "'output_dir' must be a string or None" - if takes_libs: - if libraries is None: - libraries = self.libraries - elif type (libraries) in (ListType, TupleType): - libraries = list (libraries) + (self.libraries or []) - else: - raise TypeError, \ - "'libraries' (if supplied) must be a list of strings" + return (objects, output_dir) - if library_dirs is None: - library_dirs = self.library_dirs - elif type (library_dirs) in (ListType, TupleType): - library_dirs = list (library_dirs) + (self.library_dirs or []) - else: - raise TypeError, \ - "'library_dirs' (if supplied) must be a list of strings" - return (objects, output_dir, libraries, library_dirs) + def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): + """Typecheck and fix up some of the arguments supplied to the + 'link_*' methods. Specifically: ensure that all arguments are + lists, and augment them with their permanent versions + (eg. 'self.libraries' augments 'libraries'). Return a tuple + with fixed versions of all arguments.""" + + if libraries is None: + libraries = self.libraries + elif type (libraries) in (ListType, TupleType): + libraries = list (libraries) + (self.libraries or []) + else: + raise TypeError, \ + "'libraries' (if supplied) must be a list of strings" + + if library_dirs is None: + library_dirs = self.library_dirs + elif type (library_dirs) in (ListType, TupleType): + library_dirs = list (library_dirs) + (self.library_dirs or []) else: - return (objects, output_dir) + raise TypeError, \ + "'library_dirs' (if supplied) must be a list of strings" + + if runtime_library_dirs is None: + runtime_library_dirs = self.runtime_library_dirs + elif type (runtime_library_dirs) in (ListType, TupleType): + runtime_library_dirs = (list (runtime_library_dirs) + + (self.runtime_library_dirs or [])) + else: + raise TypeError, \ + "'runtime_library_dirs' (if supplied) " + \ + "must be a list of strings" + + return (libraries, library_dirs, runtime_library_dirs) - # _fix_link_args () + # _fix_lib_args () def _need_link (self, objects, output_file): @@ -480,6 +492,7 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -522,6 +535,7 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -540,6 +554,7 @@ def link_executable (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): From 3aa1d946cf86103148fc70e553115286b9777694 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:40:19 +0000 Subject: [PATCH 0213/8469] Added 'runtime_library_dirs' parameter to 'link_*()' methods, and changed to use it when linking. Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather than just '_fix_link_args()'. --- unixccompiler.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index ec85571ddf..ec766f5405 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -146,7 +146,7 @@ def create_static_lib (self, output_dir=None, debug=0): - (objects, output_dir) = self._fix_link_args (objects, output_dir, takes_libs=0) + (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) @@ -169,6 +169,7 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -178,6 +179,7 @@ def link_shared_lib (self, output_dir, libraries, library_dirs, + runtime_library_dirs, debug, extra_preargs, extra_postargs) @@ -189,16 +191,17 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): - (objects, output_dir, libraries, library_dirs) = \ - self._fix_link_args (objects, output_dir, takes_libs=1, - libraries=libraries, library_dirs=library_dirs) + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) lib_opts = gen_lib_options (self, - library_dirs, self.runtime_library_dirs, + library_dirs, runtime_library_dirs, libraries) if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" @@ -228,16 +231,17 @@ def link_executable (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): - (objects, output_dir, libraries, library_dirs) = \ - self._fix_link_args (objects, output_dir, takes_libs=1, - libraries=libraries, library_dirs=library_dirs) + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) lib_opts = gen_lib_options (self, - library_dirs, self.runtime_library_dirs, + library_dirs, runtime_library_dirs, libraries) output_filename = output_progname # Unix-ism! if output_dir is not None: From f5e23859b6bba32958929ab54176f28e01a5b9f0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:42:28 +0000 Subject: [PATCH 0214/8469] Added 'runtime_library_dirs' parameter to 'link_*()' methods, and warn that we don't know what to do with it when we see it. Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather than just '_fix_link_args()'. --- msvccompiler.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 7324b8e1c6..bc27cea9b7 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -253,8 +253,7 @@ def create_static_lib (self, extra_preargs=None, extra_postargs=None): - (objects, output_dir) = \ - self._fix_link_args (objects, output_dir, takes_libs=0) + (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) @@ -279,6 +278,7 @@ def link_shared_lib (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -299,16 +299,21 @@ def link_shared_object (self, output_dir=None, libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): - (objects, output_dir, libraries, library_dirs) = \ - self._fix_link_args (objects, output_dir, takes_libs=1, - libraries=libraries, library_dirs=library_dirs) + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + if self.runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) lib_opts = gen_lib_options (self, - library_dirs, self.runtime_library_dirs, + library_dirs, runtime_library_dirs, libraries) if type (output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" From 362881283944c95f424b461590f9d2f81e378d0a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:45:14 +0000 Subject: [PATCH 0215/8469] Fixed a bunch of screwed-up logic and inconsistent terminology. Fixed 'build_extensions()' to pay attention to the 'rpath' element of the 'build_info' dictionary. --- command/build_ext.py | 52 ++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1d8794a6e4..ff680fa953 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -56,7 +56,7 @@ class build_ext (Command): "C preprocessor macros to define"), ('undef=', 'U', "C preprocessor macros to undefine"), - ('libs=', 'l', + ('libraries=', 'l', "external C libraries to link with"), ('library-dirs=', 'L', "directories to search for external C libraries"), @@ -79,7 +79,7 @@ def initialize_options (self): self.include_dirs = None self.define = None self.undef = None - self.libs = None + self.libraries = None self.library_dirs = None self.rpath = None self.link_objects = None @@ -117,8 +117,8 @@ def finalize_options (self): if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) - if type (self.libs) is StringType: - self.libs = [self.libs] + if type (self.libraries) is StringType: + self.libraries = [self.libraries] # XXX how the heck are 'self.define' and 'self.undef' supposed to # be set? @@ -144,11 +144,33 @@ def run (self): # First, sanity-check the 'self.extensions' list self.check_extensions_list (self.extensions) + # Simplify the following logic (eg. don't have to worry about + # appending to None) + if self.libraries is None: + self.libraries = [] + if self.library_dirs is None: + self.library_dirs = [] + if self.rpath is None: + self.rpath = [] + + # If we were asked to build any C/C++ libraries, make sure that the + # directory where we put them is in the library search path for + # linking extensions. + if self.distribution.libraries: + build_clib = self.find_peer ('build_clib') + self.libraries.extend (build_clib.get_library_names() or []) + self.library_dirs.append (build_clib.build_clib) + # Setup the CCompiler object that we'll use to do all the # compiling and linking self.compiler = new_compiler (verbose=self.verbose, dry_run=self.dry_run, force=self.force) + + # And make sure that any compile/link-related options (which might + # come from the command-line or from the setup script) are set in + # that CCompiler object -- that way, they automatically apply to + # all compiling and linking done here. if self.include_dirs is not None: self.compiler.set_include_dirs (self.include_dirs) if self.define is not None: @@ -158,8 +180,8 @@ def run (self): if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro (macro) - if self.libs is not None: - self.compiler.set_libraries (self.libs) + if self.libraries is not None: + self.compiler.set_libraries (self.libraries) if self.library_dirs is not None: self.compiler.set_library_dirs (self.library_dirs) if self.rpath is not None: @@ -167,15 +189,7 @@ def run (self): if self.link_objects is not None: self.compiler.set_link_objects (self.link_objects) - if self.distribution.libraries: - build_clib = self.find_peer ('build_clib') - self.libraries = build_clib.get_library_names () or [] - self.library_dirs = [build_clib.build_clib] - else: - self.libraries = [] - self.library_dirs = [] - - # Now the real loop over extensions + # Now actually compile and link everything. self.build_extensions (self.extensions) @@ -257,10 +271,9 @@ def build_extensions (self, extensions): extra_objects = build_info.get ('extra_objects') if extra_objects: objects.extend (extra_objects) - libraries = (self.libraries + - (build_info.get ('libraries') or [])) - library_dirs = (self.library_dirs + - (build_info.get ('library_dirs') or [])) + libraries = build_info.get ('libraries') + library_dirs = build_info.get ('library_dirs') + rpath = build_info.get ('rpath') extra_args = build_info.get ('extra_link_args') or [] if self.compiler.compiler_type == 'msvc': @@ -299,6 +312,7 @@ def build_extensions (self, extensions): self.compiler.link_shared_object (objects, ext_filename, libraries=libraries, library_dirs=library_dirs, + runtime_library_dirs=rpath, extra_postargs=extra_args, debug=self.debug) From 5da6867520bab8d1abc3f7699207ac55bc6a03f9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:47:00 +0000 Subject: [PATCH 0216/8469] Duh, it helps if '_nt_quote_args()' actually returns the mutated list, rather than None. --- spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spawn.py b/spawn.py index 4e6f206991..86ea3dfb50 100644 --- a/spawn.py +++ b/spawn.py @@ -55,7 +55,7 @@ def _nt_quote_args (args): for i in range (len (args)): if string.find (args[i], ' ') != -1: args[i] = '"%s"' % args[i] - return + return args def _spawn_nt (cmd, search_path=1, From ece89d8b1b55c795e1de3e8842e22ca3eebd3f3d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:48:43 +0000 Subject: [PATCH 0217/8469] Beefed up error-handling in 'setup()' a smidge: handle OSError and DistutilsExecError now. --- core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index df3646765f..5090f25bc3 100644 --- a/core.py +++ b/core.py @@ -98,13 +98,15 @@ def setup (**attrs): dist.run_commands () except KeyboardInterrupt: raise SystemExit, "interrupted" - except IOError, exc: + except (OSError, IOError), exc: # arg, try to work with Python pre-1.5.2 if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): raise SystemExit, \ "error: %s: %s" % (exc.filename, exc.strerror) else: raise SystemExit, str (exc) + except DistutilsExecError, msg: + raise SystemExit, "error: " + str (msg) # setup () From 05135cd1557034010a85409726c822d34dcc5043 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:10:51 +0000 Subject: [PATCH 0218/8469] Deleted some crufty comments and code. A host of improvements in preparation for the 'bdist' command: - added 'get_outputs()' method (all the other improvements were to support this addition) - made 'find_package_modules()' and 'find_modules()' return similar values (list of (package, module, module_filename) tuples) - factored 'find_all_modules()' out of 'get_source_files()' (needed by 'get_outputs()') - factored 'get_module_outfile()' out of 'build_module()' (also needed by 'get_outputs()') - various little tweaks, improvements, comment/doc updates --- command/build_py.py | 85 ++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 4e5255a67c..3baddc62c7 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -58,17 +58,6 @@ def run (self): # installation will look like (ie. we preserve mode when # installing). - # XXX copy_file does *not* preserve MacOS-specific file metadata. - # If this is a problem for building/installing Python modules, then - # we'll have to fix copy_file. (And what about installing scripts, - # when the time comes for that -- does MacOS use its special - # metadata to know that a file is meant to be interpreted by - # Python?) - - infiles = [] - outfiles = [] - missing = [] - # Two options control which modules will be installed: 'packages' # and 'modules'. The former lets us work with whole packages, not # specifying individual modules at all; the latter is for @@ -171,16 +160,17 @@ def check_module (self, module, module_file): def find_package_modules (self, package, package_dir): + self.check_package (package, package_dir) module_files = glob (os.path.join (package_dir, "*.py")) - module_pairs = [] + modules = [] setup_script = os.path.abspath (sys.argv[0]) for f in module_files: abs_f = os.path.abspath (f) if abs_f != setup_script: module = os.path.splitext (os.path.basename (f))[0] - module_pairs.append ((module, f)) - return module_pairs + modules.append ((package, module, f)) + return modules def find_modules (self): @@ -222,14 +212,19 @@ def find_modules (self): if not self.check_module (module, module_file): continue - modules.append ((module, package, module_file)) + modules.append ((package, module, module_file)) return modules # find_modules () - def get_source_files (self): + def find_all_modules (self): + """Compute the list of all modules that will be built, whether + they are specified one-module-at-a-time ('self.modules') or + by whole packages ('self.packages'). Return a list of tuples + (package, module, module_file), just like 'find_modules()' and + 'find_package_modules()' do.""" if self.modules: modules = self.find_modules () @@ -240,18 +235,37 @@ def get_source_files (self): m = self.find_package_modules (package, package_dir) modules.extend (m) - # Both find_modules() and find_package_modules() return a list of - # tuples where the last element of each tuple is the filename -- - # what a happy coincidence! + return modules + + # find_all_modules () + + + def get_source_files (self): + + modules = self.find_all_modules () filenames = [] for module in modules: filenames.append (module[-1]) - return filenames + return filenames - def build_module (self, module, module_file, package): + def get_module_outfile (self, build_dir, package, module): + outfile_path = [build_dir] + list(package) + [module + ".py"] + return apply (os.path.join, outfile_path) + + + def get_outputs (self): + modules = self.find_all_modules () + outputs = [] + for (package, module, module_file) in modules: + package = string.split (package, '.') + outputs.append (self.get_module_outfile (self.build_lib, + package, module)) + return outputs + + def build_module (self, module, module_file, package): if type (package) is StringType: package = string.split (package, '.') elif type (package) not in (ListType, TupleType): @@ -261,11 +275,7 @@ def build_module (self, module, module_file, package): # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_lib (the build # directory for Python source). - outfile_path = list (package) - outfile_path.append (module + ".py") - outfile_path.insert (0, self.build_lib) - outfile = apply (os.path.join, outfile_path) - + outfile = self.get_module_outfile (self.build_lib, package, module) dir = os.path.dirname (outfile) self.mkpath (dir) self.copy_file (module_file, outfile, preserve_mode=0) @@ -274,7 +284,7 @@ def build_module (self, module, module_file, package): def build_modules (self): modules = self.find_modules() - for (module, package, module_file) in modules: + for (package, module, module_file) in modules: # Now "build" the module -- ie. copy the source file to # self.build_lib (the build directory for Python source). @@ -288,20 +298,23 @@ def build_modules (self): def build_packages (self): for package in self.packages: + + # Get list of (package, module, module_file) tuples based on + # scanning the package directory. 'package' is only included + # in the tuple so that 'find_modules()' and + # 'find_package_tuples()' have a consistent interface; it's + # ignored here (apart from a sanity check). Also, 'module' is + # the *unqualified* module name (ie. no dots, no package -- we + # already know its package!), and 'module_file' is the path to + # the .py file, relative to the current directory + # (ie. including 'package_dir'). package_dir = self.get_package_dir (package) - self.check_package (package, package_dir) - - # Get list of (module, module_file) tuples based on scanning - # the package directory. Here, 'module' is the *unqualified* - # module name (ie. no dots, no package -- we already know its - # package!), and module_file is the path to the .py file, - # relative to the current directory (ie. including - # 'package_dir'). modules = self.find_package_modules (package, package_dir) # Now loop over the modules we found, "building" each one (just # copy it to self.build_lib). - for (module, module_file) in modules: + for (package_, module, module_file) in modules: + assert package == package_ self.build_module (module, module_file, package) # build_packages () From be2cdd814051b3e077646a20ad98330a52e2f707 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:13:09 +0000 Subject: [PATCH 0219/8469] Added 'get_outputs()' in prepartion for the 'bdist' command. Changed signature of 'build_extensions()': no longer takes the extension list, but uses 'self.extensions' (just like 'get_outputs()' has to) Moved call to 'check_extensions_list()' from 'run()' to 'build_extensions()', again for consistency with 'get_outputs()'. --- command/build_ext.py | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index ff680fa953..7d88c06332 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -141,9 +141,6 @@ def run (self): if not self.extensions: return - # First, sanity-check the 'self.extensions' list - self.check_extensions_list (self.extensions) - # Simplify the following logic (eg. don't have to worry about # appending to None) if self.libraries is None: @@ -156,7 +153,7 @@ def run (self): # If we were asked to build any C/C++ libraries, make sure that the # directory where we put them is in the library search path for # linking extensions. - if self.distribution.libraries: + if self.distribution.has_c_libraries(): build_clib = self.find_peer ('build_clib') self.libraries.extend (build_clib.get_library_names() or []) self.library_dirs.append (build_clib.build_clib) @@ -190,9 +187,10 @@ def run (self): self.compiler.set_link_objects (self.link_objects) # Now actually compile and link everything. - self.build_extensions (self.extensions) + self.build_extensions () + + # run () - def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a @@ -239,9 +237,32 @@ def get_source_files (self): return filenames + def get_outputs (self): + + # Sanity check the 'extensions' list -- can't assume this is being + # done in the same run as a 'build_extensions()' call (in fact, we + # can probably assume that it *isn't*!). + self.check_extensions_list (self.extensions) + + # And build the list of output (built) filenames. Note that this + # ignores the 'inplace' flag, and assumes everything goes in the + # "build" tree. + outputs = [] + for (extension_name, build_info) in self.extensions: + fullname = self.get_ext_fullname (extension_name) + outputs.append (os.path.join (self.build_lib, + self.get_ext_filename(fullname))) + return outputs + + # get_outputs () + + def build_extensions (self, extensions): - for (extension_name, build_info) in extensions: + # First, sanity-check the 'extensions' list + self.check_extensions_list (self.extensions) + + for (extension_name, build_info) in self.extensions: sources = build_info.get ('sources') if sources is None or type (sources) not in (ListType, TupleType): raise DistutilsValueError, \ @@ -290,7 +311,7 @@ def build_extensions (self, extensions): else: modname = string.split (extension_name, '.')[-1] extra_args.append('/export:init%s'%modname) - # end if MSVC + # if MSVC fullname = self.get_ext_fullname (extension_name) if self.inplace: From d71b7f8620d2a8953c38ccc08541db8a7f087c51 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:14:21 +0000 Subject: [PATCH 0220/8469] Use the new 'has_pure_modules()', 'has_ext_modules()', 'has_c_libraries()' methods of Distribution instead of grovelling directly in self.distribution. --- command/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build.py b/command/build.py index 97466fdb48..2da589ab29 100644 --- a/command/build.py +++ b/command/build.py @@ -80,18 +80,18 @@ def run (self): # Invoke the 'build_py' command to "build" pure Python modules # (ie. copy 'em into the build tree) - if self.distribution.packages or self.distribution.py_modules: + if self.distribution.has_pure_modules(): self.run_peer ('build_py') # Build any standalone C libraries next -- they're most likely to # be needed by extension modules, so obviously have to be done # first! - if self.distribution.libraries: + if self.distribution.has_c_libraries(): self.run_peer ('build_clib') # And now 'build_ext' -- compile extension modules and put them # into the build tree - if self.distribution.ext_modules: + if self.distribution.has_ext_modules(): self.run_peer ('build_ext') # end class Build From 5d534b66bc25e3d1455e98944b5e5b6dfb1b7eb1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:15:57 +0000 Subject: [PATCH 0221/8469] Changed so the sub-commands we rely on to do the real work is specified in a class attribute 'sub_commands', rather than hard-coded in 'run()'. This should make it easier to subclass 'install', and also makes it easier to keep 'run()' and the new 'get_outputs()' consistent. Added 'get_outputs()' in preparation for the 'bdist' command. --- command/install.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index ed74971efa..ac9ec86517 100644 --- a/command/install.py +++ b/command/install.py @@ -82,6 +82,14 @@ class install (Command): ] + # 'sub_commands': a list of commands this command might have to run + # to get its work done. Each command is represented as a tuple + # (func, command) where 'func' is a function to call that returns + # true if 'command' (the sub-command name, a string) needs to be + # run. If 'func' is None, assume that 'command' must always be run. + sub_commands = [(None, 'install_lib')] + + def initialize_options (self): # High-level options: these select both an installation base @@ -355,10 +363,11 @@ def run (self): # Obviously have to build before we can install self.run_peer ('build') - # Now install all Python modules -- don't bother to make this - # conditional; why would someone distribute a Python module - # distribution without Python modules? - self.run_peer ('install_lib') + # Run all sub-commands: currently this just means install all + # Python modules using 'install_lib'. + for (func, cmd) in self.sub_commands: + if func is None or func(): + self.run_peer (cmd) if self.path_file: self.create_path_file () @@ -374,6 +383,17 @@ def run (self): # run () + def get_outputs (self): + # This command doesn't have any outputs of its own, so just + # get the outputs of all its sub-commands. + outputs = [] + for (func, cmd) in self.sub_commands: + if func is None or func(): + outputs.extend (self.run_peer (cmd)) + + return outputs + + def create_path_file (self): filename = os.path.join (self.install_libbase, self.path_file + ".pth") From 66878bbd6f4d2c871a13c3eb34a8c8a988f7eaa3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:17:42 +0000 Subject: [PATCH 0222/8469] Be sure to run both 'build_py' and 'build_ext', now that this command is responsible for installing all Python modules (pure and extensions). Added 'get_outputs()' in preparation for the 'bdist' command, and '_mutate_outputs()' to support 'get_outputs()'. --- command/install_lib.py | 52 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index eaaa1c7da2..7e1f2e2a4d 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -2,7 +2,7 @@ __revision__ = "$Id$" -import sys, string +import sys, os, string from distutils.core import Command from distutils.util import copy_tree @@ -39,14 +39,17 @@ def finalize_options (self): def run (self): - # Make sure we have "built" all pure Python modules first - self.run_peer ('build_py') + # Make sure we have built everything we need first + if self.distribution.has_pure_modules(): + self.run_peer ('build_py') + if self.distribution.has_ext_modules(): + self.run_peer ('build_ext') # Install everything: simply dump the entire contents of the build # directory to the installation directory (that's the beauty of # having a build directory!) outfiles = self.copy_tree (self.build_dir, self.install_dir) - + # (Optionally) compile .py to .pyc # XXX hey! we can't control whether we optimize or not; that's up # to the invocation of the current Python interpreter (at least @@ -73,4 +76,43 @@ def run (self): # run () -# class InstallPy + + def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): + + if not has_any: + return [] + + build_cmd = self.find_peer (build_cmd) + build_files = build_cmd.get_outputs() + build_dir = build_cmd.get_option (cmd_option) + + prefix_len = len (build_dir) + len (os.sep) + outputs = [] + for file in build_files: + outputs.append (os.path.join (output_dir, file[prefix_len:])) + + return outputs + + # _mutate_outputs () + + def get_outputs (self): + """Return the list of files that would be installed if this command + were actually run. Not affected by the "dry-run" flag or whether + modules have actually been built yet.""" + + pure_outputs = \ + self._mutate_outputs (self.distribution.has_pure_modules(), + 'build_py', 'build_lib', + self.install_dir) + + + ext_outputs = \ + self._mutate_outputs (self.distribution.has_ext_modules(), + 'build_ext', 'build_lib', + self.install_dir) + + return pure_outputs + ext_outputs + + # get_outputs () + +# class install_lib From f925cbf975d85ad247f6d790159af67f3967d7b2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:18:39 +0000 Subject: [PATCH 0223/8469] Added 'build_clib'; replaced 'install_py' and 'install_ext' with 'install_lib'. --- command/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/__init__.py b/command/__init__.py index d2b37a8ce1..b7973c6142 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -8,9 +8,9 @@ __all__ = ['build', 'build_py', 'build_ext', + 'build_clib', 'install', - 'install_py', - 'install_ext', + 'install_lib', 'clean', 'sdist', ] From 104be39562c08bd0c87944ce3a13014a30459c43 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:20:45 +0000 Subject: [PATCH 0224/8469] Added the "distribution query" methods: 'has_pure_modules()', 'has_ext_modules()', 'has_c_libraries()', 'has_modules()', and 'is_pure()'. --- core.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 5090f25bc3..08a1d641d1 100644 --- a/core.py +++ b/core.py @@ -618,7 +618,27 @@ def get_command_options (self, command, *options): return tuple (values) -# end class Distribution + + # -- Distribution query methods ------------------------------------ + + def has_pure_modules (self): + return len (self.packages or self.py_modules or []) > 0 + + def has_ext_modules (self): + return self.ext_modules and len (self.ext_modules) > 0 + + def has_c_libraries (self): + return self.libraries and len (self.libraries) > 0 + + def has_modules (self): + return self.has_pure_modules() or self.has_ext_modules() + + def is_pure (self): + return (self.has_pure_modules() and + not self.has_ext_modules() and + not self.has_c_libraries()) + +# class Distribution class Command: @@ -992,4 +1012,4 @@ def make_file (self, infiles, outfile, func, args, # make_file () -# end class Command +# class Command From 4aa19c2a2cd09156c6706104f484738302ca7901 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:47:29 +0000 Subject: [PATCH 0225/8469] Moved the guts of 'make_tarball()' and 'make_zipfile()' to distutils.util in preparation for the 'bdist_dumb' command; these methods remain as trivial wrappers around the versions in distutils.util. --- command/sdist.py | 57 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 53 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 0c15177893..19e1773111 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,7 +11,7 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import newer, remove_tree +from distutils.util import newer, remove_tree, make_tarball, make_zipfile from distutils.text_file import TextFile from distutils.errors import DistutilsExecError @@ -503,60 +503,11 @@ def make_release_tree (self, base_dir, files): # make_release_tree () - def make_tarball (self, base_dir, compress="gzip"): - - # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- - # but it would be nice to take advantage of it to skip the - # "create a tree of hardlinks" step! (Would also be nice to - # detect GNU tar to use its 'z' option and save a step.) - - if compress is not None and compress not in ('gzip', 'compress'): - raise ValueError, \ - "if given, 'compress' must be 'gzip' or 'compress'" - - archive_name = base_dir + ".tar" - self.spawn (["tar", "-cf", archive_name, base_dir]) - - if compress: - self.spawn ([compress, archive_name]) - + def make_tarball (self, base_dir, compress): + make_tarball (base_dir, compress, self.verbose, self.dry_run) def make_zipfile (self, base_dir): - - # This initially assumed the Unix 'zip' utility -- but - # apparently InfoZIP's zip.exe works the same under Windows, so - # no changes needed! - - try: - self.spawn (["zip", "-r", base_dir + ".zip", base_dir]) - except DistutilsExecError: - - # XXX really should distinguish between "couldn't find - # external 'zip' command" and "zip failed" -- shouldn't try - # again in the latter case. (I think fixing this will - # require some cooperation from the spawn module -- perhaps - # a utility function to search the path, so we can fallback - # on zipfile.py without the failed spawn.) - try: - import zipfile - except ImportError: - raise DistutilsExecError, \ - ("unable to create zip file '%s.zip': " + - "could neither find a standalone zip utility nor " + - "import the 'zipfile' module") % base_dir - - z = zipfile.ZipFile (base_dir + ".zip", "wb", - compression=zipfile.ZIP_DEFLATED) - - def visit (z, dirname, names): - for name in names: - path = os.path.join (dirname, name) - if os.path.isfile (path): - z.write (path, path) - - os.path.walk (base_dir, visit, z) - z.close() + make_zipfile (base_dir, self.verbose, self.dry_run) def make_distribution (self): From 872994b9087f38871f5fba8b6b0062db9a2714cf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:48:40 +0000 Subject: [PATCH 0226/8469] Added 'make_tarball()' and 'make_zipfile()' functions in preparation for the 'bdist_dumb' command. Adapted, with tweakage, from the 'sdist' command. --- util.py | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index caf9906281..b40373c486 100644 --- a/util.py +++ b/util.py @@ -13,7 +13,7 @@ import sys, os, string, re, shutil from distutils.errors import * - +from distutils.spawn import spawn # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating /foo/bar/baz" messages in dry-run mode @@ -316,7 +316,6 @@ def copy_tree (src, dst, verbose=0, dry_run=0): - """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it @@ -556,3 +555,92 @@ def _subst (match, local_vars=local_vars): return re.sub (r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) # subst_vars () + + +def make_tarball (base_dir, compress="gzip", verbose=0, dry_run=0): + """Create a (possibly compressed) tar file from all the files under + 'base_dir'. 'compress' must be "gzip" (the default), "compress", or + None. Both "tar" and the compression utility named by 'compress' + must be on the default program search path, so this is probably + Unix-specific. The output tar file will be named 'base_dir' + + ".tar", possibly plus the appropriate compression extension + (".gz" or ".Z"). Return the output filename.""" + + # XXX GNU tar 1.13 has a nifty option to add a prefix directory. + # It's pretty new, though, so we certainly can't require it -- + # but it would be nice to take advantage of it to skip the + # "create a tree of hardlinks" step! (Would also be nice to + # detect GNU tar to use its 'z' option and save a step.) + + compress_ext = { 'gzip': ".gz", + 'compress': ".Z" } + + if compress is not None and compress not in ('gzip', 'compress'): + raise ValueError, \ + "bad value for 'compress': must be None, 'gzip', or 'compress'" + + archive_name = base_dir + ".tar" + cmd = ["tar", "-cf", archive_name, base_dir] + spawn (cmd, verbose=verbose, dry_run=dry_run) + + if compress: + spawn ([compress, archive_name], verbose=verbose, dry_run=dry_run) + return archive_name + compress_ext[compress] + else: + return archive_name + +# make_tarball () + + +def make_zipfile (base_dir, verbose=0, dry_run=0): + """Create a ZIP file from all the files under 'base_dir'. The + output ZIP file will be named 'base_dir' + ".zip". Uses either the + InfoZIP "zip" utility (if installed and found on the default search + path) or the "zipfile" Python module (if available). If neither + tool is available, raises DistutilsExecError. Returns the name + of the output ZIP file.""" + + # This initially assumed the Unix 'zip' utility -- but + # apparently InfoZIP's zip.exe works the same under Windows, so + # no changes needed! + + zip_filename = base_dir + ".zip" + try: + spawn (["zip", "-r", zip_filename, base_dir], + verbose=verbose, dry_run=dry_run) + except DistutilsExecError: + + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed" -- shouldn't try + # again in the latter case. (I think fixing this will + # require some cooperation from the spawn module -- perhaps + # a utility function to search the path, so we can fallback + # on zipfile.py without the failed spawn.) + try: + import zipfile + except ImportError: + raise DistutilsExecError, \ + ("unable to create zip file '%s': " + + "could neither find a standalone zip utility nor " + + "import the 'zipfile' module") % zip_filename + + if verbose: + print "creating '%s' and adding '%s' to it" % \ + (zip_filename, base_dir) + + def visit (z, dirname, names): + for name in names: + path = os.path.join (dirname, name) + if os.path.isfile (path): + z.write (path, path) + + if not dry_run: + z = zipfile.ZipFile (zip_filename, "wb", + compression=zipfile.ZIP_DEFLATED) + + os.path.walk (base_dir, visit, z) + z.close() + + return zip_filename + +# make_zipfile () From 4546cfbf7ed2f8292aebd4f795132e0656a518d7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:53:02 +0000 Subject: [PATCH 0227/8469] Patch from Bastian Kleineidam : make 'mkdir()' return list of directories created. --- util.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util.py b/util.py index b40373c486..6351bc7edc 100644 --- a/util.py +++ b/util.py @@ -38,11 +38,11 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # we're not using a recursive algorithm) name = os.path.normpath (name) - + created_dirs = [] if os.path.isdir (name) or name == '': - return + return created_dirs if PATH_CREATED.get (name): - return + return created_dirs (head, tail) = os.path.split (name) tails = [tail] # stack of lone dirs to create @@ -70,11 +70,13 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): if not dry_run: try: os.mkdir (head) + created_dirs.append(head) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not create '%s': %s" % (head, errstr) PATH_CREATED[head] = 1 + return created_dirs # mkpath () From 408127fea3cd246776bfaac7c16cce3e250f0bee Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 02:56:34 +0000 Subject: [PATCH 0228/8469] Documented Bastian's patch. Made handling OSError in 'mkpath()' more standard. --- util.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/util.py b/util.py index 6351bc7edc..8242e10fc1 100644 --- a/util.py +++ b/util.py @@ -24,11 +24,13 @@ # succeed in that case). def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the - directory already exists, return silently. Raise - DistutilsFileError if unable to create some directory along the - way (eg. some sub-path exists, but is a file rather than a - directory). If 'verbose' is true, print a one-line summary of - each mkdir to stdout.""" + directory already exists (or if 'name' is the empty string, which + means the current directory, which of course exists), then do + nothing. Raise DistutilsFileError if unable to create some + directory along the way (eg. some sub-path exists, but is a file + rather than a directory). If 'verbose' is true, print a one-line + summary of each mkdir to stdout. Return the list of directories + actually created.""" global PATH_CREATED @@ -71,9 +73,9 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): try: os.mkdir (head) created_dirs.append(head) - except os.error, (errno, errstr): + except OSError, exc: raise DistutilsFileError, \ - "could not create '%s': %s" % (head, errstr) + "could not create '%s': %s" % (head, exc[-1]) PATH_CREATED[head] = 1 return created_dirs From 6d6e77e2094148c5f828f314e7858209a4c78d25 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 03:27:45 +0000 Subject: [PATCH 0229/8469] Changed 'copy_tree()' so it returns the list of all files that were copied or might have been copied, regardless of the 'update' flag. --- util.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/util.py b/util.py index 8242e10fc1..272961948e 100644 --- a/util.py +++ b/util.py @@ -322,13 +322,14 @@ def copy_tree (src, dst, """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a - directory, raise DistutilsFileError. If 'dst' does not exist, it - is created with 'mkpath()'. The end result of the copy is that - every file in 'src' is copied to 'dst', and directories under - 'src' are recursively copied to 'dst'. Return the list of files - copied (under their output names) -- note that if 'update' is true, - this might be less than the list of files considered. Return - value is not affected by 'dry_run'. + directory, raise DistutilsFileError. If 'dst' does not exist, it is + created with 'mkpath()'. The end result of the copy is that every + file in 'src' is copied to 'dst', and directories under 'src' are + recursively copied to 'dst'. Return the list of files that were + copied or might have been copied, using their output name. The + return value is unaffected by 'update' or 'dry_run': it is simply + the list of all files under 'src', with the names changed to be + under 'dst'. 'preserve_mode' and 'preserve_times' are the same as for 'copy_file'; note that they only apply to regular files, not to @@ -372,10 +373,10 @@ def copy_tree (src, dst, preserve_mode, preserve_times, preserve_symlinks, update, verbose, dry_run)) else: - if (copy_file (src_name, dst_name, - preserve_mode, preserve_times, - update, verbose, dry_run)): - outputs.append (dst_name) + copy_file (src_name, dst_name, + preserve_mode, preserve_times, + update, verbose, dry_run) + outputs.append (dst_name) return outputs From 90d8d95cef6f3195a62348dfcaf06afa616cdb65 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 03:29:34 +0000 Subject: [PATCH 0230/8469] Patch inspired by Bastian Kleineidam : use global __debug__ flag to determine if compiled files will be ".pyc" or ".pyo". Tweaked compilation output messages too. --- command/install_lib.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 7e1f2e2a4d..64f7cbcf27 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -59,21 +59,16 @@ def run (self): from py_compile import compile for f in outfiles: - # XXX can't assume this filename mapping! (what if - # we're running under "python -O"?) - # only compile the file if it is actually a .py file if f[-3:] == '.py': - out_fn = string.replace (f, '.py', '.pyc') - + out_fn = f + (__debug__ and "c" or "o") + compile_msg = "byte-compiling %s to %s" % \ + (f, os.path.basename (out_fn)) + skip_msg = "byte-compilation of %s skipped" % f self.make_file (f, out_fn, compile, (f,), - "byte-compiling %s" % f, - "byte-compilation of %s skipped" % f) - - # XXX ignore self.optimize for now, since we don't really know if - # we're compiling optimally or not, and couldn't pick what to do - # even if we did know. ;-( - + compile_msg, skip_msg) + + # run () From 93bb283e4ed96e98f1203996045abe8ddd0b69fa Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 04:13:00 +0000 Subject: [PATCH 0231/8469] Call 'find_exe()', not '_find_exe()'. --- msvccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index bc27cea9b7..298991049f 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -166,9 +166,9 @@ def __init__ (self, if versions: version = versions[0] # highest version - self.cc = _find_exe("cl.exe", version) - self.link = _find_exe("link.exe", version) - self.lib = _find_exe("lib.exe", version) + self.cc = find_exe("cl.exe", version) + self.link = find_exe("link.exe", version) + self.lib = find_exe("lib.exe", version) set_path_env_var ('lib', version) set_path_env_var ('include', version) path=get_msvc_paths('path', version) From c8a944d9a695816880e7f7aec21b351aa7df6185 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 29 Mar 2000 04:13:49 +0000 Subject: [PATCH 0232/8469] Put the Python "system" include dir last, rather than first. --- command/build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7d88c06332..96e7ce524f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -113,7 +113,9 @@ def finalize_options (self): self.include_dirs = string.split (self.include_dirs, os.pathsep) - self.include_dirs.insert (0, py_include) + # Put the Python "system" include dir at the end, so that + # any local include dirs take precedence. + self.include_dirs.append (py_include) if exec_py_include != py_include: self.include_dirs.insert (0, exec_py_include) From 97eeb322fc5bdf19b0fa8fe387c09b11addb040e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 30 Mar 2000 19:47:22 +0000 Subject: [PATCH 0233/8469] Oops: 'build_extensions()' no longer takes an 'extensions' list. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 96e7ce524f..f2e0b319b3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -259,7 +259,7 @@ def get_outputs (self): # get_outputs () - def build_extensions (self, extensions): + def build_extensions (self): # First, sanity-check the 'extensions' list self.check_extensions_list (self.extensions) From 986617164899c1f6a746c99318c4bebe6a0a8646 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:50:04 +0000 Subject: [PATCH 0234/8469] Changed to use the new 'has_pure_modules()' and 'has_ext_modules()' methods provided by Distribution. Cosmetic and error message tweaks. Simplified 'make_release_tree()': * extracted 'distutils.util.create_tree()' * don't have to do hard-linking ourselves -- it's now handled by 'distutils.util.copy_file()' (although the detection of whether hard linking is available still needs to be factored out) Removed 'make_tarball()' and 'make_zipfile()' entirely -- their role is now amply filled by 'distutils.util.make_archive()'. Simplified 'make_distribution()': * use Distribution's new 'get_full_name()' method * use 'make_archive()' instead of if/elif/.../else on the archive format --- command/sdist.py | 71 +++++++++++++----------------------------------- 1 file changed, 19 insertions(+), 52 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 19e1773111..7dbd40138a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,7 +11,8 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import newer, remove_tree, make_tarball, make_zipfile +from distutils.util import \ + newer, remove_tree, make_tarball, make_zipfile, create_tree from distutils.text_file import TextFile from distutils.errors import DistutilsExecError @@ -78,8 +79,8 @@ def finalize_options (self): self.formats = [self.default_format[os.name]] except KeyError: raise DistutilsPlatformError, \ - "don't know how to build source distributions on " + \ - "%s platform" % os.name + "don't know how to create source distributions " + \ + "on platform %s" % os.name elif type (self.formats) is StringType: self.formats = string.split (self.formats, ',') @@ -219,18 +220,15 @@ def find_defaults (self): if files: self.files.extend (files) - if self.distribution.packages or self.distribution.py_modules: + if self.distribution.has_pure_modules(): build_py = self.find_peer ('build_py') - build_py.ensure_ready () self.files.extend (build_py.get_source_files ()) - if self.distribution.ext_modules: + if self.distribution.has_ext_modules(): build_ext = self.find_peer ('build_ext') - build_ext.ensure_ready () self.files.extend (build_ext.get_source_files ()) - def search_dir (self, dir, pattern=None): """Recursively find files under 'dir' matching 'pattern' (a string containing a Unix-style glob pattern). If 'pattern' is None, @@ -465,16 +463,10 @@ def read_manifest (self): def make_release_tree (self, base_dir, files): - # First get the list of directories to create - need_dir = {} - for file in files: - need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 - need_dirs = need_dir.keys() - need_dirs.sort() - - # Now create them - for dir in need_dirs: - self.mkpath (dir) + # Create all the directories under 'base_dir' necessary to + # put 'files' there. + create_tree (base_dir, files, + verbose=self.verbose, dry_run=self.dry_run) # And walk over the list of files, either making a hard link (if # os.link exists) to each one that doesn't already exist in its @@ -483,44 +475,26 @@ def make_release_tree (self, base_dir, files): # out-of-date, because by default we blow away 'base_dir' when # we're done making the distribution archives.) - try: - link = os.link + if hasattr (os, 'link'): # can make hard links on this system + link = 'hard' msg = "making hard links in %s..." % base_dir - except AttributeError: - link = 0 + else: # nope, have to copy + link = None msg = "copying files to %s..." % base_dir self.announce (msg) for file in files: dest = os.path.join (base_dir, file) - if link: - if not os.path.exists (dest): - self.execute (os.link, (file, dest), - "linking %s -> %s" % (file, dest)) - else: - self.copy_file (file, dest) + self.copy_file (file, dest, link=link) # make_release_tree () - def make_tarball (self, base_dir, compress): - make_tarball (base_dir, compress, self.verbose, self.dry_run) - - def make_zipfile (self, base_dir): - make_zipfile (base_dir, self.verbose, self.dry_run) - - def make_distribution (self): - # Don't warn about missing meta-data here -- should be done - # elsewhere. - name = self.distribution.name or "UNKNOWN" - version = self.distribution.version - - if version: - base_dir = "%s-%s" % (name, version) - else: - base_dir = name + # Don't warn about missing meta-data here -- should be (and is!) + # done elsewhere. + base_dir = self.distribution.get_full_name() # Remove any files that match "base_dir" from the fileset -- we # don't want to go distributing the distribution inside itself! @@ -528,14 +502,7 @@ def make_distribution (self): self.make_release_tree (base_dir, self.files) for fmt in self.formats: - if fmt == 'gztar': - self.make_tarball (base_dir, compress='gzip') - elif fmt == 'ztar': - self.make_tarball (base_dir, compress='compress') - elif fmt == 'tar': - self.make_tarball (base_dir, compress=None) - elif fmt == 'zip': - self.make_zipfile (base_dir) + self.make_archive (base_dir, fmt, base_dir=base_dir) if not self.keep_tree: remove_tree (base_dir, self.verbose, self.dry_run) From fa293d87ba55e60937559c9647bcef24827cba77 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:52:02 +0000 Subject: [PATCH 0235/8469] Fixed 'get_outputs()' so it actually works. Added 'get_inputs()' (which is strikingly similar to 'get_outputs()' - sigh). Cosmetic tweaks. --- command/install.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index ac9ec86517..995fd875c3 100644 --- a/command/install.py +++ b/command/install.py @@ -365,9 +365,9 @@ def run (self): # Run all sub-commands: currently this just means install all # Python modules using 'install_lib'. - for (func, cmd) in self.sub_commands: + for (func, cmd_name) in self.sub_commands: if func is None or func(): - self.run_peer (cmd) + self.run_peer (cmd_name) if self.path_file: self.create_path_file () @@ -387,13 +387,25 @@ def get_outputs (self): # This command doesn't have any outputs of its own, so just # get the outputs of all its sub-commands. outputs = [] - for (func, cmd) in self.sub_commands: + for (func, cmd_name) in self.sub_commands: if func is None or func(): - outputs.extend (self.run_peer (cmd)) + cmd = self.find_peer (cmd_name) + outputs.extend (cmd.get_outputs()) return outputs + def get_inputs (self): + # XXX gee, this looks familiar ;-( + inputs = [] + for (func, cmd_name) in self.sub_commands: + if func is None or func(): + cmd = self.find_peer (cmd_name) + inputs.extend (cmd.get_inputs()) + + return inputs + + def create_path_file (self): filename = os.path.join (self.install_libbase, self.path_file + ".pth") From 3e2f02534c35d876d827a766dac2cf397092d04f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:53:07 +0000 Subject: [PATCH 0236/8469] Added 'get_inputs()'. --- command/install_lib.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/command/install_lib.py b/command/install_lib.py index 64f7cbcf27..5740c5eed2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -110,4 +110,24 @@ def get_outputs (self): # get_outputs () + def get_inputs (self): + """Get the list of files that are input to this command, ie. the + files that get installed as they are named in the build tree. + The files in this list correspond one-to-one to the output + filenames returned by 'get_outputs()'.""" + + inputs = [] + + if self.distribution.has_pure_modules(): + build_py = self.find_peer ('build_py') + inputs.extend (build_py.get_outputs()) + + if self.distribution.has_ext_modules(): + build_ext = self.find_peer ('build_ext') + inputs.extend (build_ext.get_outputs()) + + return inputs + + + # class install_lib From bdd1b78665f1d2ad66df4add652548e04474a315 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:55:12 +0000 Subject: [PATCH 0237/8469] The 'bdist' command, for creating "built" (binary) distributions. Initial revision is pretty limited; it only knows how to generate "dumb" binary distributions, i.e. a tarball on Unix and a zip file on Windows. Also, due to limitations in the installation code, it only knows how to distribute Python library code. But hey, it's a start. --- command/bdist.py | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 command/bdist.py diff --git a/command/bdist.py b/command/bdist.py new file mode 100644 index 0000000000..5630828580 --- /dev/null +++ b/command/bdist.py @@ -0,0 +1,70 @@ +"""distutils.command.bdist + +Implements the Distutils 'bdist' command (create a built [binary] +distribution).""" + +# created 2000/03/29, Greg Ward + +__revision__ = "$Id$" + +import os, string +from distutils.core import Command + + +class bdist (Command): + + description = "create a built (binary) distribution" + + user_options = [('formats=', 'f', + "formats for distribution (tar, ztar, gztar, zip, ... )"), + ] + + # This won't do in reality: will need to distinguish RPM-ish Linux, + # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. + default_format = { 'posix': 'gztar', + 'nt': 'zip', } + + format_command = { 'gztar': 'bdist_dumb', + 'zip': 'bdist_dumb', } + + + def initialize_options (self): + self.formats = None + + # initialize_options() + + + def finalize_options (self): + if self.formats is None: + try: + self.formats = [self.default_format[os.name]] + except KeyError: + raise DistutilsPlatformError, \ + "don't know how to create built distributions " + \ + "on platform %s" % os.name + elif type (self.formats) is StringType: + self.formats = string.split (self.formats, ',') + + + # finalize_options() + + + def run (self): + + for format in self.formats: + cmd_name = self.format_command[format] + sub_cmd = self.find_peer (cmd_name) + sub_cmd.set_option ('format', format) + + # XXX blecchhh!! should formalize this: at least a + # 'forget_run()' (?) method, possibly complicate the + # 'have_run' dictionary to include some command state as well + # as the command name -- eg. in this case we might want + # ('bdist_dumb','zip') to be marked "have run", but not + # ('bdist_dumb','gztar'). + self.distribution.have_run[cmd_name] = 0 + self.run_peer (cmd_name) + + # run() + +# class bdist From 24d3df10c8c218a584fd5f3d5f1701fd31dc9730 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:56:34 +0000 Subject: [PATCH 0238/8469] The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is the command that actually creates "dumb" binary distributions, ie. tarballs and zip files that you just unpack under or . Very limited, but it's a start. --- command/bdist_dumb.py | 131 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 command/bdist_dumb.py diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py new file mode 100644 index 0000000000..4383a8fa9f --- /dev/null +++ b/command/bdist_dumb.py @@ -0,0 +1,131 @@ +"""distutils.command.bdist_dumb + +Implements the Distutils 'bdist_dumb' command (create a "dumb" built +distribution -- i.e., just an archive to be unpacked under $prefix or +$exec_prefix).""" + +# created 2000/03/29, Greg Ward + +__revision__ = "$Id$" + +import os +from distutils.core import Command +from distutils.util import get_platform, create_tree + + +class bdist_dumb (Command): + + description = "create a \"dumb\" built distribution" + + user_options = [('format=', 'f', + "archive format to create (tar, ztar, gztar, zip)"), + ] + + default_format = { 'posix': 'gztar', + 'nt': 'zip', } + + + def initialize_options (self): + self.format = None + + # initialize_options() + + + def finalize_options (self): + if self.format is None: + try: + self.format = self.default_format[os.name] + except KeyError: + raise DistutilsPlatformError, \ + ("don't know how to create dumb built distributions " + + "on platform %s") % os.name + + # finalize_options() + + + def run (self): + + self.run_peer ('build') + install = self.find_peer ('install') + inputs = install.get_inputs () + outputs = install.get_outputs () + assert (len (inputs) == len (outputs)) + + # First, strip the installation base directory (prefix or + # exec-prefix) from all the output filenames. + self.strip_base_dirs (outputs, install) + + # Figure out where to copy them to: "build/bdist" by default; this + # directory masquerades as prefix/exec-prefix (ie. we'll make the + # archive from 'output_dir'). + build_base = self.get_peer_option ('build', 'build_base') + output_dir = os.path.join (build_base, "bdist") + + # Copy the built files to the pseudo-installation tree. + self.make_install_tree (output_dir, inputs, outputs) + + # And make an archive relative to the root of the + # pseudo-installation tree. + archive_basename = "%s.%s" % (self.distribution.get_full_name(), + get_platform()) + self.make_archive (archive_basename, self.format, + root_dir=output_dir) + + # run() + + + def strip_base_dirs (self, outputs, install_cmd): + # XXX this throws away the prefix/exec-prefix distinction, and + # means we can only correctly install the resulting archive on a + # system where prefix == exec-prefix (but at least we can *create* + # it on one where they differ). I don't see a way to fix this + # without either 1) generating two archives, one for prefix and one + # for exec-prefix, or 2) putting absolute paths in the archive + # rather than making them relative to one of the prefixes. + + base = install_cmd.install_base + os.sep + platbase = install_cmd.install_platbase + os.sep + b_len = len (base) + pb_len = len (platbase) + for i in range (len (outputs)): + if outputs[i][0:b_len] == base: + outputs[i] = outputs[i][b_len:] + elif outputs[i][0:pb_len] == platbase: + outputs[i] = outputs[i][pb_len:] + else: + raise DistutilsInternalError, \ + ("installation output filename '%s' doesn't start " + + "with either install_base ('%s') or " + + "install_platbase ('%s')") % \ + (outputs[i], base, platbase) + + # strip_base_dirs() + + + def make_install_tree (self, output_dir, inputs, outputs): + + assert (len(inputs) == len(outputs)) + + # Create all the directories under 'output_dir' necessary to + # put 'outputs' there. + create_tree (output_dir, outputs, + verbose=self.verbose, dry_run=self.dry_run) + + + # XXX this bit of logic is duplicated in sdist.make_release_tree(): + # would be nice to factor it out... + if hasattr (os, 'link'): # can make hard links on this system + link = 'hard' + msg = "making hard links in %s..." % output_dir + else: # nope, have to copy + link = None + msg = "copying files to %s..." % output_dir + + for i in range (len(inputs)): + output = os.path.join (output_dir, outputs[i]) + self.copy_file (inputs[i], output, link=link) + + # make_install_tree () + + +# class bdist_dumb From 55e4b812a77be3b24b104184c9c8970a874c805c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 02:57:31 +0000 Subject: [PATCH 0239/8469] Added DistutilsInternalError. --- errors.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/errors.py b/errors.py index 86d91dd6c0..f9d5c8de5a 100644 --- a/errors.py +++ b/errors.py @@ -68,6 +68,11 @@ class DistutilsPlatformError (DistutilsError): class DistutilsExecError (DistutilsError): pass + # DistutilsInternalError is raised on internal inconsistencies + # or impossibilities + class DistutilsInternalError (DistutilsError): + pass + # String-based exceptions else: DistutilsError = 'DistutilsError' @@ -80,5 +85,6 @@ class DistutilsExecError (DistutilsError): DistutilsValueError = 'DistutilsValueError' DistutilsPlatformError = 'DistutilsPlatformError' DistutilsExecError = 'DistutilsExecError' + DistutilsInternalError = 'DistutilsInternalError' del types From 2ffc581e227586358f5f8e262afe5e6aac8e3cc8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:02:22 +0000 Subject: [PATCH 0240/8469] Added 'create_tree()'. Changes to 'copy_file()': * added support for making hard links and symlinks * noted that it silently clobbers existing files when copying, but blows up if destination exists when linking -- hmmm... * error message tweak Added 'base_name' parameter to 'make_tarball()' and 'make_zipfile()'. Added 'make_archive()' -- wrapper around 'make_tarball()' or 'make_zipfile()' to take care of the archive "root directory". --- util.py | 160 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 135 insertions(+), 25 deletions(-) diff --git a/util.py b/util.py index 272961948e..6674d0aa18 100644 --- a/util.py +++ b/util.py @@ -19,6 +19,11 @@ # eliminates redundant "creating /foo/bar/baz" messages in dry-run mode PATH_CREATED = {} +# for generating verbose output in 'copy_file()' +_copy_action = { None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking' } + # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). @@ -83,6 +88,30 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # mkpath () +def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): + + """Create all the empty directories under 'base_dir' needed to + put 'files' there. 'base_dir' is just the a name of a directory + which doesn't necessarily exist yet; 'files' is a list of filenames + to be interpreted relative to 'base_dir'. 'base_dir' + the + directory portion of every file in 'files' will be created if it + doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as + for 'mkpath()'.""" + + # First get the list of directories to create + need_dir = {} + for file in files: + need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 + need_dirs = need_dir.keys() + need_dirs.sort() + + # Now create them + for dir in need_dirs: + mkpath (dir, mode, verbose, dry_run) + +# create_tree () + + def newer (source, target): """Return true if 'source' exists and is more recently modified than 'target', or if 'source' exists and 'target' doesn't. Return @@ -241,6 +270,7 @@ def copy_file (src, dst, preserve_mode=1, preserve_times=1, update=0, + link=None, verbose=0, dry_run=0): @@ -256,17 +286,32 @@ def copy_file (src, dst, 'verbose' is true, then a one-line summary of the copy will be printed to stdout. + 'link' allows you to make hard links (os.link) or symbolic links + (os.symlink) instead of copying: set it to "hard" or "sym"; if it + is None (the default), files are copied. Don't set 'link' on + systems that don't support it: 'copy_file()' doesn't check if + hard or symbolic linking is availalble. + + Under Mac OS, uses the native file copy function in macostools; + on other systems, uses '_copy_file_contents()' to copy file + contents. + Return true if the file was copied (or would have been copied), false otherwise (ie. 'update' was true and the destination is up-to-date).""" - # XXX doesn't copy Mac-specific metadata - + # XXX if the destination file already exists, we clobber it if + # copying, but blow up if linking. Hmmm. And I don't know what + # macostools.copyfile() does. Should definitely be consistent, and + # should probably blow up if destination exists and we would be + # changing it (ie. it's not already a hard/soft link to src OR + # (not update) and (src newer than dst). + from stat import * if not os.path.isfile (src): raise DistutilsFileError, \ - "can't copy '%s': not a regular file" % src + "can't copy '%s': doesn't exist or not a regular file" % src if os.path.isdir (dst): dir = dst @@ -279,8 +324,13 @@ def copy_file (src, dst, print "not copying %s (output up-to-date)" % src return 0 + try: + action = _copy_action[link] + except KeyError: + raise ValueError, \ + "invalid value '%s' for 'link' argument" % link if verbose: - print "copying %s -> %s" % (src, dir) + print "%s %s -> %s" % (action, src, dir) if dry_run: return 1 @@ -293,19 +343,29 @@ def copy_file (src, dst, except OSError, exc: raise DistutilsFileError, \ "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) - return 1 - # Otherwise use custom routine - _copy_file_contents (src, dst) - if preserve_mode or preserve_times: - st = os.stat (src) - - # According to David Ascher , utime() should be done - # before chmod() (at least under NT). - if preserve_times: - os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) - if preserve_mode: - os.chmod (dst, S_IMODE (st[ST_MODE])) + # If linking (hard or symbolic), use the appropriate system call + # (Unix only, of course, but that's the caller's responsibility) + elif link == 'hard': + if not (os.path.exists (dst) and os.path.samefile (src, dst)): + os.link (src, dst) + elif link == 'sym': + if not (os.path.exists (dst) and os.path.samefile (src, dst)): + os.symlink (src, dst) + + # Otherwise (non-Mac, not linking), copy the file contents and + # (optionally) copy the times and mode. + else: + _copy_file_contents (src, dst) + if preserve_mode or preserve_times: + st = os.stat (src) + + # According to David Ascher , utime() should be done + # before chmod() (at least under NT). + if preserve_times: + os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + if preserve_mode: + os.chmod (dst, S_IMODE (st[ST_MODE])) return 1 @@ -375,7 +435,7 @@ def copy_tree (src, dst, else: copy_file (src_name, dst_name, preserve_mode, preserve_times, - update, verbose, dry_run) + update, None, verbose, dry_run) outputs.append (dst_name) return outputs @@ -562,7 +622,8 @@ def _subst (match, local_vars=local_vars): # subst_vars () -def make_tarball (base_dir, compress="gzip", verbose=0, dry_run=0): +def make_tarball (base_name, base_dir, compress="gzip", + verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", or None. Both "tar" and the compression utility named by 'compress' @@ -584,7 +645,7 @@ def make_tarball (base_dir, compress="gzip", verbose=0, dry_run=0): raise ValueError, \ "bad value for 'compress': must be None, 'gzip', or 'compress'" - archive_name = base_dir + ".tar" + archive_name = base_name + ".tar" cmd = ["tar", "-cf", archive_name, base_dir] spawn (cmd, verbose=verbose, dry_run=dry_run) @@ -597,21 +658,21 @@ def make_tarball (base_dir, compress="gzip", verbose=0, dry_run=0): # make_tarball () -def make_zipfile (base_dir, verbose=0, dry_run=0): - """Create a ZIP file from all the files under 'base_dir'. The - output ZIP file will be named 'base_dir' + ".zip". Uses either the +def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): + """Create a zip file from all the files under 'base_dir'. The + output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If neither tool is available, raises DistutilsExecError. Returns the name - of the output ZIP file.""" + of the output zip file.""" # This initially assumed the Unix 'zip' utility -- but # apparently InfoZIP's zip.exe works the same under Windows, so # no changes needed! - zip_filename = base_dir + ".zip" + zip_filename = base_name + ".zip" try: - spawn (["zip", "-r", zip_filename, base_dir], + spawn (["zip", "-rq", zip_filename, base_dir], verbose=verbose, dry_run=dry_run) except DistutilsExecError: @@ -649,3 +710,52 @@ def visit (z, dirname, names): return zip_filename # make_zipfile () + + +def make_archive (base_name, format, + root_dir=None, base_dir=None, + verbose=0, dry_run=0): + + """Create an archive file (eg. zip or tar). 'base_name' is the name + of the file to create, minus any format-specific extension; 'format' + is the archive format: one of "zip", "tar", "ztar", or "gztar". + 'root_dir' is a directory that will be the root directory of the + archive; ie. we typically chdir into 'root_dir' before creating the + archive. 'base_dir' is the directory where we start archiving from; + ie. 'base_dir' will be the common prefix of all files and + directories in the archive. 'root_dir' and 'base_dir' both default + to the current directory.""" + + save_cwd = os.getcwd() + if root_dir is not None: + if verbose: + print "changing into '%s'" % root_dir + base_name = os.path.abspath (base_name) + if not dry_run: + os.chdir (root_dir) + + if base_dir is None: + base_dir = os.curdir + + kwargs = { 'verbose': verbose, + 'dry_run': dry_run } + + if format == 'gztar': + func = make_tarball + kwargs['compress'] = 'gzip' + elif format == 'ztar': + func = make_tarball + kwargs['compress'] = 'compress' + elif format == 'tar': + func = make_tarball + elif format == 'zip': + func = make_zipfile + + apply (func, (base_name, base_dir), kwargs) + + if root_dir is not None: + if verbose: + print "changing back to '%s'" % save_cwd + os.chdir (save_cwd) + +# make_archive () From 5b64d0853985580ffcb024ead685aac6a42f25af Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:05:18 +0000 Subject: [PATCH 0241/8469] Added 'get_name()' and 'get_full_name()' methods to Distribution. Simplified 'Command.get_peer_option()' a tad -- just call 'find_peer()' to get the peer command object. Updated 'Command.copy_file()' to take a 'link' parameter, just like 'util.copy_file()' does now. Added 'Command.make_archive()' to wrap 'util.make_archive()'. --- core.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 08a1d641d1..025e1c0df5 100644 --- a/core.py +++ b/core.py @@ -638,6 +638,13 @@ def is_pure (self): not self.has_ext_modules() and not self.has_c_libraries()) + def get_name (self): + return self.name or "UNKNOWN" + + def get_full_name (self): + return "%s-%s" % ((self.name or "UNKNOWN"), (self.version or "???")) + + # class Distribution @@ -887,7 +894,7 @@ def get_peer_option (self, command, option): """Find or create the command object for 'command', and return its 'option' option.""" - cmd_obj = self.distribution.find_command_obj (command) + cmd_obj = self.find_peer (command) return cmd_obj.get_option (option) @@ -939,12 +946,13 @@ def mkpath (self, name, mode=0777): def copy_file (self, infile, outfile, - preserve_mode=1, preserve_times=1, level=1): + preserve_mode=1, preserve_times=1, link=None, level=1): """Copy a file respecting verbose, dry-run and force flags.""" return util.copy_file (infile, outfile, preserve_mode, preserve_times, not self.force, + link, self.verbose >= level, self.dry_run) @@ -976,6 +984,12 @@ def spawn (self, cmd, search_path=1, level=1): self.dry_run) + def make_archive (self, base_name, format, + root_dir=None, base_dir=None): + util.make_archive (base_name, format, root_dir, base_dir, + self.verbose, self.dry_run) + + def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): From 71554a0d965d88e26b49b9352b9f6c16d9dcdd4b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:14:51 +0000 Subject: [PATCH 0242/8469] Added 'bdist' and 'bdist_dumb'. --- command/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/__init__.py b/command/__init__.py index b7973c6142..385330b5e0 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -13,4 +13,6 @@ 'install_lib', 'clean', 'sdist', + 'bdist', + 'bdist_dumb', ] From a65325be6c89763d12b4948bfccb2f5e51171a4e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:34:09 +0000 Subject: [PATCH 0243/8469] Don't put Python's library directory into the library search path -- that's specific to building Python extensions. --- msvccompiler.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 298991049f..c906e11469 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -158,9 +158,6 @@ def __init__ (self, force=0): CCompiler.__init__ (self, verbose, dry_run, force) - - self.add_library_dir( os.path.join( sys.exec_prefix, 'libs' ) ) - versions = get_devstudio_versions () if versions: From 62173c6e6b912a50267e06e7ad96074a8aa75a41 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:50:23 +0000 Subject: [PATCH 0244/8469] Patch (mostly) from Thomas Heller for building on Windows: * build to "Debug" or "Release" temp directory * put linker turds (.lib and .exp files) in the build temp directory * tack on "_d" to extensions built with debugging * added 'get_ext_libname()' help in putting linker turds to temp dir Also, moved the code that simplifies None to empty list for a bunch of options to 'finalize_options()' instead of 'run()'. --- command/build_ext.py | 47 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index f2e0b319b3..2cb1c610f0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -122,9 +122,24 @@ def finalize_options (self): if type (self.libraries) is StringType: self.libraries = [self.libraries] - # XXX how the heck are 'self.define' and 'self.undef' supposed to - # be set? + # Life is easier if we're not forever checking for None, so + # simplify these options to empty lists if unset + if self.libraries is None: + self.libraries = [] + if self.library_dirs is None: + self.library_dirs = [] + if self.rpath is None: + self.rpath = [] + # for extensions under windows use different directories + # for Release and Debug builds. + # also Python's library directory must be appended to library_dirs + if os.name == 'nt': + self.library_dirs.append (os.path.join(sys.exec_prefix, 'libs')) + if self.debug: + self.build_temp = os.path.join (self.build_temp, "Debug") + else: + self.build_temp = os.path.join (self.build_temp, "Release") # finalize_options () @@ -143,15 +158,6 @@ def run (self): if not self.extensions: return - # Simplify the following logic (eg. don't have to worry about - # appending to None) - if self.libraries is None: - self.libraries = [] - if self.library_dirs is None: - self.library_dirs = [] - if self.rpath is None: - self.rpath = [] - # If we were asked to build any C/C++ libraries, make sure that the # directory where we put them is in the library search path for # linking extensions. @@ -313,6 +319,14 @@ def build_extensions (self): else: modname = string.split (extension_name, '.')[-1] extra_args.append('/export:init%s'%modname) + + # The MSVC linker generates unneeded .lib and .exp files, + # which cannot be suppressed by any linker switches. So + # make sure they are generated in the temporary build + # directory. + implib_dir = os.path.join(self.build_temp,\ + self.get_ext_libname(extension_name)) + extra_args.append ('/IMPLIB:' + implib_dir) # if MSVC fullname = self.get_ext_fullname (extension_name) @@ -351,6 +365,17 @@ def get_ext_fullname (self, ext_name): def get_ext_filename (self, ext_name): from distutils import sysconfig ext_path = string.split (ext_name, '.') + # extensions in debug_mode are named 'module_d.pyd' under windows + if os.name == 'nt' and self.debug: + return apply (os.path.join, ext_path) + '_d' + sysconfig.SO return apply (os.path.join, ext_path) + sysconfig.SO + def get_ext_libname (self, ext_name): + # create a filename for the (unneeded) lib-file. + # extensions in debug_mode are named 'module_d.pyd' under windows + ext_path = string.split (ext_name, '.') + if os.name == 'nt' and self.debug: + return apply (os.path.join, ext_path) + '_d.lib' + return apply (os.path.join, ext_path) + '.lib' + # class BuildExt From ac24d4ea40f9c79d063743d6b454f801a81c93e7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 03:52:16 +0000 Subject: [PATCH 0245/8469] Don't perpetrate the "_d" hack for naming debugging extensions -- that's now done in the 'build_ext' command. --- msvccompiler.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index c906e11469..2828711e7b 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -321,10 +321,6 @@ def link_shared_object (self, if debug: ldflags = self.ldflags_shared_debug - # XXX not sure this belongs here - # extensions in debug_mode are named 'module_d.pyd' - basename, ext = os.path.splitext (output_filename) - output_filename = basename + '_d' + ext else: ldflags = self.ldflags_shared From acb7e0a92ecd47d4fb0e64424123a136b23a2b6c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 04:37:40 +0000 Subject: [PATCH 0246/8469] Removed some old test code: don't set 'plat' when calling 'new_compiler()'. --- command/build_clib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 6560fb4774..f48e6476fb 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -89,8 +89,7 @@ def run (self): return # Yech -- this is cut 'n pasted from build_ext.py! - self.compiler = new_compiler (plat=os.environ.get ('PLAT'), - verbose=self.verbose, + self.compiler = new_compiler (verbose=self.verbose, dry_run=self.dry_run, force=self.force) if self.include_dirs is not None: From f382f8cd5035da5ab29cf6d33f00f4f6a43c0c21 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 04:40:25 +0000 Subject: [PATCH 0247/8469] Tweaked 'get_platform()' to include the first character of the OS release: eg. sunos5, linux2, irix5. --- util.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util.py b/util.py index 6674d0aa18..63b6bec05a 100644 --- a/util.py +++ b/util.py @@ -545,10 +545,8 @@ def get_platform (): i.e. "???" or "???".""" if os.name == 'posix': - uname = os.uname() - OS = uname[0] - arch = uname[4] - return "%s-%s" % (string.lower (OS), string.lower (arch)) + (OS, _, rel, _, arch) = os.uname() + return "%s%c-%s" % (string.lower (OS), rel[0], string.lower (arch)) else: return sys.platform From ca78e832a4c8ecb5a9308ed104166e71b393d729 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 04:53:41 +0000 Subject: [PATCH 0248/8469] Import from 'types' module. Added 'ztar', 'tar' to 'format_command' dictionary. --- command/bdist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/bdist.py b/command/bdist.py index 5630828580..12397fcac1 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -8,6 +8,7 @@ __revision__ = "$Id$" import os, string +from types import * from distutils.core import Command @@ -25,6 +26,8 @@ class bdist (Command): 'nt': 'zip', } format_command = { 'gztar': 'bdist_dumb', + 'ztar': 'bdist_dumb', + 'tar': 'bdist_dumb', 'zip': 'bdist_dumb', } From 39f9a0206365461772e5c76d01a3cde0be9d1c10 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 05:08:50 +0000 Subject: [PATCH 0249/8469] Rename 'formats' option to 'format', and remove the ability to generate multiple built distributions in one run -- it seemed a bit dodgy and I'd rather remove it than try to beat it into submission right now. --- command/bdist.py | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 12397fcac1..889cdba857 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -10,14 +10,15 @@ import os, string from types import * from distutils.core import Command +from distutils.errors import * class bdist (Command): description = "create a built (binary) distribution" - user_options = [('formats=', 'f', - "formats for distribution (tar, ztar, gztar, zip, ... )"), + user_options = [('format=', 'f', + "format for distribution (tar, ztar, gztar, zip, ... )"), ] # This won't do in reality: will need to distinguish RPM-ish Linux, @@ -32,21 +33,21 @@ class bdist (Command): def initialize_options (self): - self.formats = None + self.format = None # initialize_options() def finalize_options (self): - if self.formats is None: + if self.format is None: try: - self.formats = [self.default_format[os.name]] + self.format = self.default_format[os.name] except KeyError: raise DistutilsPlatformError, \ "don't know how to create built distributions " + \ "on platform %s" % os.name - elif type (self.formats) is StringType: - self.formats = string.split (self.formats, ',') + #elif type (self.format) is StringType: + # self.format = string.split (self.format, ',') # finalize_options() @@ -54,19 +55,14 @@ def finalize_options (self): def run (self): - for format in self.formats: - cmd_name = self.format_command[format] - sub_cmd = self.find_peer (cmd_name) - sub_cmd.set_option ('format', format) - - # XXX blecchhh!! should formalize this: at least a - # 'forget_run()' (?) method, possibly complicate the - # 'have_run' dictionary to include some command state as well - # as the command name -- eg. in this case we might want - # ('bdist_dumb','zip') to be marked "have run", but not - # ('bdist_dumb','gztar'). - self.distribution.have_run[cmd_name] = 0 - self.run_peer (cmd_name) + try: + cmd_name = self.format_command[self.format] + except KeyError: + raise DistutilsOptionError, \ + "invalid archive format '%s'" % self.format + + sub_cmd = self.find_peer (cmd_name) + sub_cmd.set_option ('format', self.format) # run() From 23873c733a5189d48d90a3ab638d0e7d155fa234 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 05:20:27 +0000 Subject: [PATCH 0250/8469] Fixed 'make_archive()' to explicitly turn of compression when format is "tar". --- util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util.py b/util.py index 63b6bec05a..22fc437547 100644 --- a/util.py +++ b/util.py @@ -746,6 +746,7 @@ def make_archive (base_name, format, kwargs['compress'] = 'compress' elif format == 'tar': func = make_tarball + kwargs['compress'] = None elif format == 'zip': func = make_zipfile From f35f3bd982e3447106ba061b91ebe6f72a47d20a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 05:21:27 +0000 Subject: [PATCH 0251/8469] Oops, got a little too enthusiastic deleting code in that last revision: we still have to *run* the sub-command that creates a built distribution. --- command/bdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/bdist.py b/command/bdist.py index 889cdba857..685f52508e 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -63,6 +63,7 @@ def run (self): sub_cmd = self.find_peer (cmd_name) sub_cmd.set_option ('format', self.format) + self.run_peer (cmd_name) # run() From f9e57445d36b3438f083a1b69b5793e8b9f8145f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 05:22:47 +0000 Subject: [PATCH 0252/8469] Added code to blow away the pseudo-installation tree and a 'keep_tree' option to disable this (by default, it's false and we clean up). --- command/bdist_dumb.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 4383a8fa9f..5456e57ac3 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -10,7 +10,7 @@ import os from distutils.core import Command -from distutils.util import get_platform, create_tree +from distutils.util import get_platform, create_tree, remove_tree class bdist_dumb (Command): @@ -19,6 +19,9 @@ class bdist_dumb (Command): user_options = [('format=', 'f', "archive format to create (tar, ztar, gztar, zip)"), + ('keep-tree', 'k', + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), ] default_format = { 'posix': 'gztar', @@ -27,6 +30,7 @@ class bdist_dumb (Command): def initialize_options (self): self.format = None + self.keep_tree = 0 # initialize_options() @@ -68,9 +72,14 @@ def run (self): # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_full_name(), get_platform()) + print "output_dir = %s" % output_dir + print "self.format = %s" % self.format self.make_archive (archive_basename, self.format, root_dir=output_dir) + if not self.keep_tree: + remove_tree (output_dir, self.verbose, self.dry_run) + # run() From 802b36518e79ab0103afe61bb5c1ee9e92c2f433 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 16:47:40 +0000 Subject: [PATCH 0253/8469] Patch from Thomas Heller: use the new winreg module if available. --- msvccompiler.py | 71 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 2828711e7b..07096e95db 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -17,6 +17,35 @@ CCompiler, gen_preprocess_options, gen_lib_options +_can_read_reg = 0 +try: + import winreg + _HKEY_CLASSES_ROOT = winreg.HKEY_CLASSES_ROOT + _HKEY_LOCAL_MACHINE = winreg.HKEY_LOCAL_MACHINE + _HKEY_CURRENT_USER = winreg.HKEY_CURRENT_USER + _HKEY_USERS = winreg.HKEY_USERS + _RegOpenKeyEx = winreg.OpenKeyEx + _RegEnumKey = winreg.EnumKey + _RegEnumValue = winreg.EnumValue + _RegError = winreg.error + _can_read_reg = 1 +except ImportError: + try: + import win32api + import win32con + _HKEY_CLASSES_ROOT = win32con.HKEY_CLASSES_ROOT + _HKEY_LOCAL_MACHINE = win32con.HKEY_LOCAL_MACHINE + _HKEY_CURRENT_USER = win32con.HKEY_CURRENT_USER + _HKEY_USERS = win32con.HKEY_USERS + _RegOpenKeyEx = win32api.RegOpenKeyEx + _RegEnumKey = win32api.RegEnumKey + _RegEnumValue = win32api.RegEnumValue + _RegError = win32api.error + _can_read_reg = 1 + except ImportError: + pass + + def get_devstudio_versions (): """Get list of devstudio versions from the Windows registry. Return a list of strings containing version numbers; the list will be @@ -24,30 +53,27 @@ def get_devstudio_versions (): a registry-access module) or the appropriate registry keys weren't found.""" - try: - import win32api - import win32con - except ImportError: + if not _can_read_reg: return [] K = 'Software\\Microsoft\\Devstudio' L = [] - for base in (win32con.HKEY_CLASSES_ROOT, - win32con.HKEY_LOCAL_MACHINE, - win32con.HKEY_CURRENT_USER, - win32con.HKEY_USERS): + for base in (_HKEY_CLASSES_ROOT, + _HKEY_LOCAL_MACHINE, + _HKEY_CURRENT_USER, + _HKEY_USERS): try: - k = win32api.RegOpenKeyEx(base,K) + k = _RegOpenKeyEx(base,K) i = 0 while 1: try: - p = win32api.RegEnumKey(k,i) + p = _RegEnumKey(k,i) if p[0] in '123456789' and p not in L: L.append(p) - except win32api.error: + except _RegError: break i = i + 1 - except win32api.error: + except _RegError: pass L.sort() L.reverse() @@ -61,10 +87,7 @@ def get_msvc_paths (path, version='6.0', platform='x86'): a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" - try: - import win32api - import win32con - except ImportError: + if not _can_read_reg: return [] L = [] @@ -74,16 +97,16 @@ def get_msvc_paths (path, version='6.0', platform='x86'): K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) - for base in (win32con.HKEY_CLASSES_ROOT, - win32con.HKEY_LOCAL_MACHINE, - win32con.HKEY_CURRENT_USER, - win32con.HKEY_USERS): + for base in (_HKEY_CLASSES_ROOT, + _HKEY_LOCAL_MACHINE, + _HKEY_CURRENT_USER, + _HKEY_USERS): try: - k = win32api.RegOpenKeyEx(base,K) + k = _RegOpenKeyEx(base,K) i = 0 while 1: try: - (p,v,t) = win32api.RegEnumValue(k,i) + (p,v,t) = _RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: @@ -91,9 +114,9 @@ def get_msvc_paths (path, version='6.0', platform='x86'): L.append(v) break i = i + 1 - except win32api.error: + except _RegError: break - except win32api.error: + except _RegError: pass return L From 8b2185f27ae8706e420bcf52ee071a8c3f4ee5dd Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 16:53:42 +0000 Subject: [PATCH 0254/8469] Simplified Thomas Heller's registry patch: just assign all those HKEY_* and Reg* names once, rather than having near-duplicate code in the two import attempts. Also dropped the leading underscore on all the imported symbols, as it's not appropriate (they're not local to this module). --- msvccompiler.py | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 07096e95db..b38aadbece 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -20,30 +20,30 @@ _can_read_reg = 0 try: import winreg - _HKEY_CLASSES_ROOT = winreg.HKEY_CLASSES_ROOT - _HKEY_LOCAL_MACHINE = winreg.HKEY_LOCAL_MACHINE - _HKEY_CURRENT_USER = winreg.HKEY_CURRENT_USER - _HKEY_USERS = winreg.HKEY_USERS - _RegOpenKeyEx = winreg.OpenKeyEx - _RegEnumKey = winreg.EnumKey - _RegEnumValue = winreg.EnumValue - _RegError = winreg.error _can_read_reg = 1 + hkey_mod = winreg # module that provides HKEY_* stuff + reg_mod = winreg # provides other registry stuff except ImportError: try: import win32api import win32con - _HKEY_CLASSES_ROOT = win32con.HKEY_CLASSES_ROOT - _HKEY_LOCAL_MACHINE = win32con.HKEY_LOCAL_MACHINE - _HKEY_CURRENT_USER = win32con.HKEY_CURRENT_USER - _HKEY_USERS = win32con.HKEY_USERS - _RegOpenKeyEx = win32api.RegOpenKeyEx - _RegEnumKey = win32api.RegEnumKey - _RegEnumValue = win32api.RegEnumValue - _RegError = win32api.error _can_read_reg = 1 + hkey_mod = win32con + reg_mod = win32api except ImportError: pass + +if _can_read_reg: + HKEY_CLASSES_ROOT = hkey_mod.HKEY_CLASSES_ROOT + HKEY_LOCAL_MACHINE = hkey_mod.HKEY_LOCAL_MACHINE + HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER + HKEY_USERS = hkey_mod.HKEY_USERS + RegOpenKeyEx = reg_mod.RegOpenKeyEx + RegEnumKey = reg_mod.RegEnumKey + RegEnumValue = reg_mod.RegEnumValue + RegError = reg_mod.error + _can_read_reg = 1 + def get_devstudio_versions (): @@ -58,22 +58,22 @@ def get_devstudio_versions (): K = 'Software\\Microsoft\\Devstudio' L = [] - for base in (_HKEY_CLASSES_ROOT, - _HKEY_LOCAL_MACHINE, - _HKEY_CURRENT_USER, - _HKEY_USERS): + for base in (HKEY_CLASSES_ROOT, + HKEY_LOCAL_MACHINE, + HKEY_CURRENT_USER, + HKEY_USERS): try: - k = _RegOpenKeyEx(base,K) + k = RegOpenKeyEx(base,K) i = 0 while 1: try: - p = _RegEnumKey(k,i) + p = RegEnumKey(k,i) if p[0] in '123456789' and p not in L: L.append(p) - except _RegError: + except RegError: break i = i + 1 - except _RegError: + except RegError: pass L.sort() L.reverse() @@ -97,16 +97,16 @@ def get_msvc_paths (path, version='6.0', platform='x86'): K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) - for base in (_HKEY_CLASSES_ROOT, - _HKEY_LOCAL_MACHINE, - _HKEY_CURRENT_USER, - _HKEY_USERS): + for base in (HKEY_CLASSES_ROOT, + HKEY_LOCAL_MACHINE, + HKEY_CURRENT_USER, + HKEY_USERS): try: - k = _RegOpenKeyEx(base,K) + k = RegOpenKeyEx(base,K) i = 0 while 1: try: - (p,v,t) = _RegEnumValue(k,i) + (p,v,t) = RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: @@ -114,9 +114,9 @@ def get_msvc_paths (path, version='6.0', platform='x86'): L.append(v) break i = i + 1 - except _RegError: + except RegError: break - except _RegError: + except RegError: pass return L From 373df8bfb5f251907217641652a46ad18603f4b1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 31 Mar 2000 19:04:25 +0000 Subject: [PATCH 0255/8469] Fixed my simplification to Thomas' patch: winreg and win32api export the same functions, but with different names. --- msvccompiler.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index b38aadbece..43a8596085 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -21,15 +21,25 @@ try: import winreg _can_read_reg = 1 - hkey_mod = winreg # module that provides HKEY_* stuff - reg_mod = winreg # provides other registry stuff + hkey_mod = winreg + + RegOpenKeyEx = winreg.OpenKeyEx + RegEnumKey = winreg.EnumKey + RegEnumValue = winreg.EnumValue + RegError = winreg.error + except ImportError: try: import win32api import win32con _can_read_reg = 1 hkey_mod = win32con - reg_mod = win32api + + RegOpenKeyEx = win32api.RegOpenKeyEx + RegEnumKey = win32api.RegEnumKey + RegEnumValue = win32api.RegEnumValue + RegError = win32api.error + except ImportError: pass @@ -38,11 +48,6 @@ HKEY_LOCAL_MACHINE = hkey_mod.HKEY_LOCAL_MACHINE HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER HKEY_USERS = hkey_mod.HKEY_USERS - RegOpenKeyEx = reg_mod.RegOpenKeyEx - RegEnumKey = reg_mod.RegEnumKey - RegEnumValue = reg_mod.RegEnumValue - RegError = reg_mod.error - _can_read_reg = 1 From fe6451bacbd0075114cc247c568bde94f2b61caf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 4 Apr 2000 01:40:52 +0000 Subject: [PATCH 0256/8469] Reorganization: moved the Distribution class from core.py to dist.py, and the Command class from core.py to cmd.py. No other code needs changing though; distutils.core still provides the Command and Distribution classes, although indirectly now. --- cmd.py | 390 +++++++++++++++++++++++ core.py | 939 +------------------------------------------------------- dist.py | 567 ++++++++++++++++++++++++++++++++++ 3 files changed, 963 insertions(+), 933 deletions(-) create mode 100644 cmd.py create mode 100644 dist.py diff --git a/cmd.py b/cmd.py new file mode 100644 index 0000000000..ad78703713 --- /dev/null +++ b/cmd.py @@ -0,0 +1,390 @@ +"""distutils.cmd + +Provides the Command class, the base class for the command classes +in the distutils.command package.""" + +# created 2000/04/03, Greg Ward +# (extricated from core.py; actually dates back to the beginning) + +__revision__ = "$Id$" + +import sys, string +from types import * +from distutils.errors import * +from distutils import util + + +class Command: + """Abstract base class for defining command classes, the "worker bees" + of the Distutils. A useful analogy for command classes is to + think of them as subroutines with local variables called + "options". The options are "declared" in 'initialize_options()' + and "defined" (given their final values, aka "finalized") in + 'finalize_options()', both of which must be defined by every + command class. The distinction between the two is necessary + because option values might come from the outside world (command + line, option file, ...), and any options dependent on other + options must be computed *after* these outside influences have + been processed -- hence 'finalize_options()'. The "body" of the + subroutine, where it does all its work based on the values of its + options, is the 'run()' method, which must also be implemented by + every command class.""" + + # -- Creation/initialization methods ------------------------------- + + def __init__ (self, dist): + """Create and initialize a new Command object. Most importantly, + invokes the 'initialize_options()' method, which is the + real initializer and depends on the actual command being + instantiated.""" + + # late import because of mutual dependence between these classes + from distutils.dist import Distribution + + if not isinstance (dist, Distribution): + raise TypeError, "dist must be a Distribution instance" + if self.__class__ is Command: + raise RuntimeError, "Command is an abstract class" + + self.distribution = dist + self.initialize_options () + + # Per-command versions of the global flags, so that the user can + # customize Distutils' behaviour command-by-command and let some + # commands fallback on the Distribution's behaviour. None means + # "not defined, check self.distribution's copy", while 0 or 1 mean + # false and true (duh). Note that this means figuring out the real + # value of each flag is a touch complicatd -- hence "self.verbose" + # (etc.) will be handled by __getattr__, below. + self._verbose = None + self._dry_run = None + self._force = None + + # The 'help' flag is just used for command-line parsing, so + # none of that complicated bureaucracy is needed. + self.help = 0 + + # 'ready' records whether or not 'finalize_options()' has been + # called. 'finalize_options()' itself should not pay attention to + # this flag: it is the business of 'ensure_ready()', which always + # calls 'finalize_options()', to respect/update it. + self.ready = 0 + + # __init__ () + + + def __getattr__ (self, attr): + if attr in ('verbose', 'dry_run', 'force'): + myval = getattr (self, "_" + attr) + if myval is None: + return getattr (self.distribution, attr) + else: + return myval + else: + raise AttributeError, attr + + + def ensure_ready (self): + if not self.ready: + self.finalize_options () + self.ready = 1 + + + # Subclasses must define: + # initialize_options() + # provide default values for all options; may be overridden + # by Distutils client, by command-line options, or by options + # from option file + # finalize_options() + # decide on the final values for all options; this is called + # after all possible intervention from the outside world + # (command-line, option file, etc.) has been processed + # run() + # run the command: do whatever it is we're here to do, + # controlled by the command's various option values + + def initialize_options (self): + """Set default values for all the options that this command + supports. Note that these defaults may be overridden + by the command-line supplied by the user; thus, this is + not the place to code dependencies between options; generally, + 'initialize_options()' implementations are just a bunch + of "self.foo = None" assignments. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def finalize_options (self): + """Set final values for all the options that this command + supports. This is always called as late as possible, ie. + after any option assignments from the command-line or from + other commands have been done. Thus, this is the place to to + code option dependencies: if 'foo' depends on 'bar', then it + is safe to set 'foo' from 'bar' as long as 'foo' still has + the same value it was assigned in 'initialize_options()'. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def run (self): + """A command's raison d'etre: carry out the action it exists + to perform, controlled by the options initialized in + 'initialize_options()', customized by the user and other + commands, and finalized in 'finalize_options()'. All + terminal output and filesystem interaction should be done by + 'run()'. + + This method must be implemented by all command classes.""" + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + + def announce (self, msg, level=1): + """If the Distribution instance to which this command belongs + has a verbosity level of greater than or equal to 'level' + print 'msg' to stdout.""" + + if self.verbose >= level: + print msg + + + # -- Option query/set methods -------------------------------------- + + def get_option (self, option): + """Return the value of a single option for this command. Raise + DistutilsOptionError if 'option' is not known.""" + try: + return getattr (self, option) + except AttributeError: + raise DistutilsOptionError, \ + "command %s: no such option %s" % \ + (self.get_command_name(), option) + + + def get_options (self, *options): + """Return (as a tuple) the values of several options for this + command. Raise DistutilsOptionError if any of the options in + 'options' are not known.""" + + values = [] + try: + for opt in options: + values.append (getattr (self, opt)) + except AttributeError, name: + raise DistutilsOptionError, \ + "command %s: no such option %s" % \ + (self.get_command_name(), name) + + return tuple (values) + + + def set_option (self, option, value): + """Set the value of a single option for this command. Raise + DistutilsOptionError if 'option' is not known.""" + + if not hasattr (self, option): + raise DistutilsOptionError, \ + "command '%s': no such option '%s'" % \ + (self.get_command_name(), option) + if value is not None: + setattr (self, option, value) + + def set_options (self, **optval): + """Set the values of several options for this command. Raise + DistutilsOptionError if any of the options specified as + keyword arguments are not known.""" + + for k in optval.keys(): + if optval[k] is not None: + self.set_option (k, optval[k]) + + + # -- Convenience methods for commands ------------------------------ + + def get_command_name (self): + if hasattr (self, 'command_name'): + return self.command_name + else: + return self.__class__.__name__ + + + def set_undefined_options (self, src_cmd, *option_pairs): + """Set the values of any "undefined" options from corresponding + option values in some other command object. "Undefined" here + means "is None", which is the convention used to indicate + that an option has not been changed between + 'set_initial_values()' and 'set_final_values()'. Usually + called from 'set_final_values()' for options that depend on + some other command rather than another option of the same + command. 'src_cmd' is the other command from which option + values will be taken (a command object will be created for it + if necessary); the remaining arguments are + '(src_option,dst_option)' tuples which mean "take the value + of 'src_option' in the 'src_cmd' command object, and copy it + to 'dst_option' in the current command object".""" + + # Option_pairs: list of (src_option, dst_option) tuples + + src_cmd_obj = self.distribution.find_command_obj (src_cmd) + src_cmd_obj.ensure_ready () + try: + for (src_option, dst_option) in option_pairs: + if getattr (self, dst_option) is None: + self.set_option (dst_option, + src_cmd_obj.get_option (src_option)) + except AttributeError, name: + # duh, which command? + raise DistutilsOptionError, "unknown option %s" % name + + + def find_peer (self, command, create=1): + """Wrapper around Distribution's 'find_command_obj()' method: + find (create if necessary and 'create' is true) the command + object for 'command'..""" + + cmd_obj = self.distribution.find_command_obj (command, create) + cmd_obj.ensure_ready () + return cmd_obj + + + def get_peer_option (self, command, option): + """Find or create the command object for 'command', and return + its 'option' option.""" + + cmd_obj = self.find_peer (command) + return cmd_obj.get_option (option) + + + def run_peer (self, command): + """Run some other command: uses the 'run_command()' method of + Distribution, which creates the command object if necessary + and then invokes its 'run()' method.""" + + self.distribution.run_command (command) + + + # -- External world manipulation ----------------------------------- + + def warn (self, msg): + sys.stderr.write ("warning: %s: %s\n" % + (self.get_command_name(), msg)) + + + def execute (self, func, args, msg=None, level=1): + """Perform some action that affects the outside world (eg. + by writing to the filesystem). Such actions are special because + they should be disabled by the "dry run" flag, and should + announce themselves if the current verbosity level is high + enough. This method takes care of all that bureaucracy for you; + all you have to do is supply the funtion to call and an argument + tuple for it (to embody the "external action" being performed), + a message to print if the verbosity level is high enough, and an + optional verbosity threshold.""" + + # Generate a message if we weren't passed one + if msg is None: + msg = "%s %s" % (func.__name__, `args`) + if msg[-2:] == ',)': # correct for singleton tuple + msg = msg[0:-2] + ')' + + # Print it if verbosity level is high enough + self.announce (msg, level) + + # And do it, as long as we're not in dry-run mode + if not self.dry_run: + apply (func, args) + + # execute() + + + def mkpath (self, name, mode=0777): + util.mkpath (name, mode, + self.verbose, self.dry_run) + + + def copy_file (self, infile, outfile, + preserve_mode=1, preserve_times=1, link=None, level=1): + """Copy a file respecting verbose, dry-run and force flags.""" + + return util.copy_file (infile, outfile, + preserve_mode, preserve_times, + not self.force, + link, + self.verbose >= level, + self.dry_run) + + + def copy_tree (self, infile, outfile, + preserve_mode=1, preserve_times=1, preserve_symlinks=0, + level=1): + """Copy an entire directory tree respecting verbose, dry-run, + and force flags.""" + + return util.copy_tree (infile, outfile, + preserve_mode,preserve_times,preserve_symlinks, + not self.force, + self.verbose >= level, + self.dry_run) + + + def move_file (self, src, dst, level=1): + """Move a file respecting verbose and dry-run flags.""" + return util.move_file (src, dst, + self.verbose >= level, + self.dry_run) + + + def spawn (self, cmd, search_path=1, level=1): + from distutils.spawn import spawn + spawn (cmd, search_path, + self.verbose >= level, + self.dry_run) + + + def make_archive (self, base_name, format, + root_dir=None, base_dir=None): + util.make_archive (base_name, format, root_dir, base_dir, + self.verbose, self.dry_run) + + + def make_file (self, infiles, outfile, func, args, + exec_msg=None, skip_msg=None, level=1): + + """Special case of 'execute()' for operations that process one or + more input files and generate one output file. Works just like + 'execute()', except the operation is skipped and a different + message printed if 'outfile' already exists and is newer than + all files listed in 'infiles'.""" + + + if exec_msg is None: + exec_msg = "generating %s from %s" % \ + (outfile, string.join (infiles, ', ')) + if skip_msg is None: + skip_msg = "skipping %s (inputs unchanged)" % outfile + + + # Allow 'infiles' to be a single string + if type (infiles) is StringType: + infiles = (infiles,) + elif type (infiles) not in (ListType, TupleType): + raise TypeError, \ + "'infiles' must be a string, or a list or tuple of strings" + + # If 'outfile' must be regenerated (either because it doesn't + # exist, is out-of-date, or the 'force' flag is true) then + # perform the action that presumably regenerates it + if self.force or util.newer_group (infiles, outfile): + self.execute (func, args, exec_msg, level) + + # Otherwise, print the "skip" message + else: + self.announce (skip_msg, level) + + # make_file () + +# class Command diff --git a/core.py b/core.py index 025e1c0df5..3df54a5e83 100644 --- a/core.py +++ b/core.py @@ -1,28 +1,19 @@ """distutils.core The only module that needs to be imported to use the Distutils; provides -the 'setup' function (which must be called); the 'Distribution' class -(which may be subclassed if additional functionality is desired), and -the 'Command' class (which is used both internally by Distutils, and -may be subclassed by clients for still more flexibility).""" +the 'setup' function (which is to be called from the setup script). Also +indirectly provides the Distribution and Command classes, although they are +really defined in distutils.dist and distutils.cmd.""" # created 1999/03/01, Greg Ward __revision__ = "$Id$" -import sys, os -import string, re +import sys from types import * -from copy import copy from distutils.errors import * -from distutils.fancy_getopt import fancy_getopt, print_help -from distutils import util - -# Regex to define acceptable Distutils command names. This is not *quite* -# the same as a Python NAME -- I don't allow leading underscores. The fact -# that they're very similar is no coincidence; the default naming scheme is -# to look for a Python module named after the command. -command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') +from distutils.dist import Distribution +from distutils.cmd import Command # This is a barebones help message generated displayed when the user # runs the setup script with no arguments at all. More useful help @@ -109,921 +100,3 @@ def setup (**attrs): raise SystemExit, "error: " + str (msg) # setup () - - -class Distribution: - """The core of the Distutils. Most of the work hiding behind - 'setup' is really done within a Distribution instance, which - farms the work out to the Distutils commands specified on the - command line. - - Clients will almost never instantiate Distribution directly, - unless the 'setup' function is totally inadequate to their needs. - However, it is conceivable that a client might wish to subclass - Distribution for some specialized purpose, and then pass the - subclass to 'setup' as the 'distclass' keyword argument. If so, - it is necessary to respect the expectations that 'setup' has of - Distribution: it must have a constructor and methods - 'parse_command_line()' and 'run_commands()' with signatures like - those described below.""" - - - # 'global_options' describes the command-line options that may be - # supplied to the client (setup.py) prior to any actual commands. - # Eg. "./setup.py -nv" or "./setup.py --verbose" both take advantage of - # these global options. This list should be kept to a bare minimum, - # since every global option is also valid as a command option -- and we - # don't want to pollute the commands with too many options that they - # have minimal control over. - global_options = [('verbose', 'v', - "run verbosely (default)"), - ('quiet', 'q', - "run quietly (turns verbosity off)"), - ('dry-run', 'n', - "don't actually do anything"), - ('force', 'f', - "skip dependency checking between files"), - ('help', 'h', - "show this help message"), - ] - negative_opt = {'quiet': 'verbose'} - - - # -- Creation/initialization methods ------------------------------- - - def __init__ (self, attrs=None): - """Construct a new Distribution instance: initialize all the - attributes of a Distribution, and then uses 'attrs' (a - dictionary mapping attribute names to values) to assign - some of those attributes their "real" values. (Any attributes - not mentioned in 'attrs' will be assigned to some null - value: 0, None, an empty list or dictionary, etc.) Most - importantly, initialize the 'command_obj' attribute - to the empty dictionary; this will be filled in with real - command objects by 'parse_command_line()'.""" - - # Default values for our command-line options - self.verbose = 1 - self.dry_run = 0 - self.force = 0 - self.help = 0 - self.help_commands = 0 - - # And the "distribution meta-data" options -- these can only - # come from setup.py (the caller), not the command line - # (or a hypothetical config file). - self.name = None - self.version = None - self.author = None - self.author_email = None - self.maintainer = None - self.maintainer_email = None - self.url = None - self.licence = None - self.description = None - - # 'cmdclass' maps command names to class objects, so we - # can 1) quickly figure out which class to instantiate when - # we need to create a new command object, and 2) have a way - # for the client to override command classes - self.cmdclass = {} - - # These options are really the business of various commands, rather - # than of the Distribution itself. We provide aliases for them in - # Distribution as a convenience to the developer. - # dictionary. - self.packages = None - self.package_dir = None - self.py_modules = None - self.libraries = None - self.ext_modules = None - self.ext_package = None - self.include_dirs = None - self.extra_path = None - - # And now initialize bookkeeping stuff that can't be supplied by - # the caller at all. 'command_obj' maps command names to - # Command instances -- that's how we enforce that every command - # class is a singleton. - self.command_obj = {} - - # 'have_run' maps command names to boolean values; it keeps track - # of whether we have actually run a particular command, to make it - # cheap to "run" a command whenever we think we might need to -- if - # it's already been done, no need for expensive filesystem - # operations, we just check the 'have_run' dictionary and carry on. - # It's only safe to query 'have_run' for a command class that has - # been instantiated -- a false value will be inserted when the - # command object is created, and replaced with a true value when - # the command is succesfully run. Thus it's probably best to use - # '.get()' rather than a straight lookup. - self.have_run = {} - - # Now we'll use the attrs dictionary (ultimately, keyword args from - # the client) to possibly override any or all of these distribution - # options. - if attrs: - - # Pull out the set of command options and work on them - # specifically. Note that this order guarantees that aliased - # command options will override any supplied redundantly - # through the general options dictionary. - options = attrs.get ('options') - if options: - del attrs['options'] - for (command, cmd_options) in options.items(): - cmd_obj = self.find_command_obj (command) - for (key, val) in cmd_options.items(): - cmd_obj.set_option (key, val) - # loop over commands - # if any command options - - # Now work on the rest of the attributes. Any attribute that's - # not already defined is invalid! - for (key,val) in attrs.items(): - if hasattr (self, key): - setattr (self, key, val) - else: - raise DistutilsOptionError, \ - "invalid distribution option '%s'" % key - - # __init__ () - - - def parse_command_line (self, args): - """Parse the setup script's command line: set any Distribution - attributes tied to command-line options, create all command - objects, and set their options from the command-line. 'args' - must be a list of command-line arguments, most likely - 'sys.argv[1:]' (see the 'setup()' function). This list is first - processed for "global options" -- options that set attributes of - the Distribution instance. Then, it is alternately scanned for - Distutils command and options for that command. Each new - command terminates the options for the previous command. The - allowed options for a command are determined by the 'options' - attribute of the command object -- thus, we instantiate (and - cache) every command object here, in order to access its - 'options' attribute. Any error in that 'options' attribute - raises DistutilsGetoptError; any error on the command-line - raises DistutilsArgError. If no Distutils commands were found - on the command line, raises DistutilsArgError. Return true if - command-line successfully parsed and we should carry on with - executing commands; false if no errors but we shouldn't execute - commands (currently, this only happens if user asks for - help).""" - - # We have to parse the command line a bit at a time -- global - # options, then the first command, then its options, and so on -- - # because each command will be handled by a different class, and - # the options that are valid for a particular class aren't - # known until we instantiate the command class, which doesn't - # happen until we know what the command is. - - self.commands = [] - options = self.global_options + \ - [('help-commands', None, - "list all available commands")] - args = fancy_getopt (options, self.negative_opt, - self, sys.argv[1:]) - - # User just wants a list of commands -- we'll print it out and stop - # processing now (ie. if they ran "setup --help-commands foo bar", - # we ignore "foo bar"). - if self.help_commands: - self.print_commands () - print - print usage - return - - while args: - # Pull the current command from the head of the command line - command = args[0] - if not command_re.match (command): - raise SystemExit, "invalid command name '%s'" % command - self.commands.append (command) - - # Make sure we have a command object to put the options into - # (this either pulls it out of a cache of command objects, - # or finds and instantiates the command class). - try: - cmd_obj = self.find_command_obj (command) - except DistutilsModuleError, msg: - raise DistutilsArgError, msg - - # Require that the command class be derived from Command -- - # that way, we can be sure that we at least have the 'run' - # and 'get_option' methods. - if not isinstance (cmd_obj, Command): - raise DistutilsClassError, \ - "command class %s must subclass Command" % \ - cmd_obj.__class__ - - # Also make sure that the command object provides a list of its - # known options - if not (hasattr (cmd_obj, 'user_options') and - type (cmd_obj.user_options) is ListType): - raise DistutilsClassError, \ - ("command class %s must provide " + - "'user_options' attribute (a list of tuples)") % \ - cmd_obj.__class__ - - # Poof! like magic, all commands support the global - # options too, just by adding in 'global_options'. - negative_opt = self.negative_opt - if hasattr (cmd_obj, 'negative_opt'): - negative_opt = copy (negative_opt) - negative_opt.update (cmd_obj.negative_opt) - - options = self.global_options + cmd_obj.user_options - args = fancy_getopt (options, negative_opt, - cmd_obj, args[1:]) - if cmd_obj.help: - print_help (self.global_options, - header="Global options:") - print - print_help (cmd_obj.user_options, - header="Options for '%s' command:" % command) - print - print usage - return - - self.command_obj[command] = cmd_obj - self.have_run[command] = 0 - - # while args - - # If the user wants help -- ie. they gave the "--help" option -- - # give it to 'em. We do this *after* processing the commands in - # case they want help on any particular command, eg. - # "setup.py --help foo". (This isn't the documented way to - # get help on a command, but I support it because that's how - # CVS does it -- might as well be consistent.) - if self.help: - print_help (self.global_options, header="Global options:") - print - - for command in self.commands: - klass = self.find_command_class (command) - print_help (klass.user_options, - header="Options for '%s' command:" % command) - print - - print usage - return - - # Oops, no commands found -- an end-user error - if not self.commands: - raise DistutilsArgError, "no commands supplied" - - # All is well: return true - return 1 - - # parse_command_line() - - - def print_command_list (self, commands, header, max_length): - """Print a subset of the list of all commands -- used by - 'print_commands()'.""" - - print header + ":" - - for cmd in commands: - klass = self.cmdclass.get (cmd) - if not klass: - klass = self.find_command_class (cmd) - try: - description = klass.description - except AttributeError: - description = "(no description available)" - - print " %-*s %s" % (max_length, cmd, description) - - # print_command_list () - - - def print_commands (self): - """Print out a help message listing all available commands with - a description of each. The list is divided into "standard - commands" (listed in distutils.command.__all__) and "extra - commands" (mentioned in self.cmdclass, but not a standard - command). The descriptions come from the command class - attribute 'description'.""" - - import distutils.command - std_commands = distutils.command.__all__ - is_std = {} - for cmd in std_commands: - is_std[cmd] = 1 - - extra_commands = [] - for cmd in self.cmdclass.keys(): - if not is_std.get(cmd): - extra_commands.append (cmd) - - max_length = 0 - for cmd in (std_commands + extra_commands): - if len (cmd) > max_length: - max_length = len (cmd) - - self.print_command_list (std_commands, - "Standard commands", - max_length) - if extra_commands: - print - self.print_command_list (extra_commands, - "Extra commands", - max_length) - - # print_commands () - - - - # -- Command class/object methods ---------------------------------- - - # This is a method just so it can be overridden if desired; it doesn't - # actually use or change any attributes of the Distribution instance. - def find_command_class (self, command): - """Given a command, derives the names of the module and class - expected to implement the command: eg. 'foo_bar' becomes - 'distutils.command.foo_bar' (the module) and 'FooBar' (the - class within that module). Loads the module, extracts the - class from it, and returns the class object. - - Raises DistutilsModuleError with a semi-user-targeted error - message if the expected module could not be loaded, or the - expected class was not found in it.""" - - module_name = 'distutils.command.' + command - klass_name = command - - try: - __import__ (module_name) - module = sys.modules[module_name] - except ImportError: - raise DistutilsModuleError, \ - "invalid command '%s' (no module named '%s')" % \ - (command, module_name) - - try: - klass = vars(module)[klass_name] - except KeyError: - raise DistutilsModuleError, \ - "invalid command '%s' (no class '%s' in module '%s')" \ - % (command, klass_name, module_name) - - return klass - - # find_command_class () - - - def create_command_obj (self, command): - """Figure out the class that should implement a command, - instantiate it, cache and return the new "command object". - The "command class" is determined either by looking it up in - the 'cmdclass' attribute (this is the mechanism whereby - clients may override default Distutils commands or add their - own), or by calling the 'find_command_class()' method (if the - command name is not in 'cmdclass'.""" - - # Determine the command class -- either it's in the command_class - # dictionary, or we have to divine the module and class name - klass = self.cmdclass.get(command) - if not klass: - klass = self.find_command_class (command) - self.cmdclass[command] = klass - - # Found the class OK -- instantiate it - cmd_obj = klass (self) - return cmd_obj - - - def find_command_obj (self, command, create=1): - """Look up and return a command object in the cache maintained by - 'create_command_obj()'. If none found, the action taken - depends on 'create': if true (the default), create a new - command object by calling 'create_command_obj()' and return - it; otherwise, return None. If 'command' is an invalid - command name, then DistutilsModuleError will be raised.""" - - cmd_obj = self.command_obj.get (command) - if not cmd_obj and create: - cmd_obj = self.create_command_obj (command) - self.command_obj[command] = cmd_obj - - return cmd_obj - - - # -- Methods that operate on the Distribution ---------------------- - - def announce (self, msg, level=1): - """Print 'msg' if 'level' is greater than or equal to the verbosity - level recorded in the 'verbose' attribute (which, currently, - can be only 0 or 1).""" - - if self.verbose >= level: - print msg - - - def run_commands (self): - """Run each command that was seen on the client command line. - Uses the list of commands found and cache of command objects - created by 'create_command_obj()'.""" - - for cmd in self.commands: - self.run_command (cmd) - - - def get_option (self, option): - """Return the value of a distribution option. Raise - DistutilsOptionError if 'option' is not known.""" - - try: - return getattr (self, opt) - except AttributeError: - raise DistutilsOptionError, \ - "unknown distribution option %s" % option - - - def get_options (self, *options): - """Return (as a tuple) the values of several distribution - options. Raise DistutilsOptionError if any element of - 'options' is not known.""" - - values = [] - try: - for opt in options: - values.append (getattr (self, opt)) - except AttributeError, name: - raise DistutilsOptionError, \ - "unknown distribution option %s" % name - - return tuple (values) - - - # -- Methods that operate on its Commands -------------------------- - - def run_command (self, command): - - """Do whatever it takes to run a command (including nothing at all, - if the command has already been run). Specifically: if we have - already created and run the command named by 'command', return - silently without doing anything. If the command named by - 'command' doesn't even have a command object yet, create one. - Then invoke 'run()' on that command object (or an existing - one).""" - - # Already been here, done that? then return silently. - if self.have_run.get (command): - return - - self.announce ("running " + command) - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - cmd_obj.run () - self.have_run[command] = 1 - - - def get_command_option (self, command, option): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - the value of its 'option' option. Raise DistutilsOptionError if - 'option' is not known for that 'command'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - return cmd_obj.get_option (option) - try: - return getattr (cmd_obj, option) - except AttributeError: - raise DistutilsOptionError, \ - "command %s: no such option %s" % (command, option) - - - def get_command_options (self, command, *options): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - a tuple containing the values of all the options listed in - 'options' for that command. Raise DistutilsOptionError if any - invalid option is supplied in 'options'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - values = [] - try: - for opt in options: - values.append (getattr (cmd_obj, option)) - except AttributeError, name: - raise DistutilsOptionError, \ - "command %s: no such option %s" % (command, name) - - return tuple (values) - - - # -- Distribution query methods ------------------------------------ - - def has_pure_modules (self): - return len (self.packages or self.py_modules or []) > 0 - - def has_ext_modules (self): - return self.ext_modules and len (self.ext_modules) > 0 - - def has_c_libraries (self): - return self.libraries and len (self.libraries) > 0 - - def has_modules (self): - return self.has_pure_modules() or self.has_ext_modules() - - def is_pure (self): - return (self.has_pure_modules() and - not self.has_ext_modules() and - not self.has_c_libraries()) - - def get_name (self): - return self.name or "UNKNOWN" - - def get_full_name (self): - return "%s-%s" % ((self.name or "UNKNOWN"), (self.version or "???")) - - -# class Distribution - - -class Command: - """Abstract base class for defining command classes, the "worker bees" - of the Distutils. A useful analogy for command classes is to - think of them as subroutines with local variables called - "options". The options are "declared" in 'initialize_options()' - and "defined" (given their final values, aka "finalized") in - 'finalize_options()', both of which must be defined by every - command class. The distinction between the two is necessary - because option values might come from the outside world (command - line, option file, ...), and any options dependent on other - options must be computed *after* these outside influences have - been processed -- hence 'finalize_options()'. The "body" of the - subroutine, where it does all its work based on the values of its - options, is the 'run()' method, which must also be implemented by - every command class.""" - - # -- Creation/initialization methods ------------------------------- - - def __init__ (self, dist): - """Create and initialize a new Command object. Most importantly, - invokes the 'initialize_options()' method, which is the - real initializer and depends on the actual command being - instantiated.""" - - if not isinstance (dist, Distribution): - raise TypeError, "dist must be a Distribution instance" - if self.__class__ is Command: - raise RuntimeError, "Command is an abstract class" - - self.distribution = dist - self.initialize_options () - - # Per-command versions of the global flags, so that the user can - # customize Distutils' behaviour command-by-command and let some - # commands fallback on the Distribution's behaviour. None means - # "not defined, check self.distribution's copy", while 0 or 1 mean - # false and true (duh). Note that this means figuring out the real - # value of each flag is a touch complicatd -- hence "self.verbose" - # (etc.) will be handled by __getattr__, below. - self._verbose = None - self._dry_run = None - self._force = None - - # The 'help' flag is just used for command-line parsing, so - # none of that complicated bureaucracy is needed. - self.help = 0 - - # 'ready' records whether or not 'finalize_options()' has been - # called. 'finalize_options()' itself should not pay attention to - # this flag: it is the business of 'ensure_ready()', which always - # calls 'finalize_options()', to respect/update it. - self.ready = 0 - - # end __init__ () - - - def __getattr__ (self, attr): - if attr in ('verbose', 'dry_run', 'force'): - myval = getattr (self, "_" + attr) - if myval is None: - return getattr (self.distribution, attr) - else: - return myval - else: - raise AttributeError, attr - - - def ensure_ready (self): - if not self.ready: - self.finalize_options () - self.ready = 1 - - - # Subclasses must define: - # initialize_options() - # provide default values for all options; may be overridden - # by Distutils client, by command-line options, or by options - # from option file - # finalize_options() - # decide on the final values for all options; this is called - # after all possible intervention from the outside world - # (command-line, option file, etc.) has been processed - # run() - # run the command: do whatever it is we're here to do, - # controlled by the command's various option values - - def initialize_options (self): - """Set default values for all the options that this command - supports. Note that these defaults may be overridden - by the command-line supplied by the user; thus, this is - not the place to code dependencies between options; generally, - 'initialize_options()' implementations are just a bunch - of "self.foo = None" assignments. - - This method must be implemented by all command classes.""" - - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ - - def finalize_options (self): - """Set final values for all the options that this command - supports. This is always called as late as possible, ie. - after any option assignments from the command-line or from - other commands have been done. Thus, this is the place to to - code option dependencies: if 'foo' depends on 'bar', then it - is safe to set 'foo' from 'bar' as long as 'foo' still has - the same value it was assigned in 'initialize_options()'. - - This method must be implemented by all command classes.""" - - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ - - def run (self): - """A command's raison d'etre: carry out the action it exists - to perform, controlled by the options initialized in - 'initialize_options()', customized by the user and other - commands, and finalized in 'finalize_options()'. All - terminal output and filesystem interaction should be done by - 'run()'. - - This method must be implemented by all command classes.""" - - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ - - def announce (self, msg, level=1): - """If the Distribution instance to which this command belongs - has a verbosity level of greater than or equal to 'level' - print 'msg' to stdout.""" - - if self.verbose >= level: - print msg - - - # -- Option query/set methods -------------------------------------- - - def get_option (self, option): - """Return the value of a single option for this command. Raise - DistutilsOptionError if 'option' is not known.""" - try: - return getattr (self, option) - except AttributeError: - raise DistutilsOptionError, \ - "command %s: no such option %s" % \ - (self.get_command_name(), option) - - - def get_options (self, *options): - """Return (as a tuple) the values of several options for this - command. Raise DistutilsOptionError if any of the options in - 'options' are not known.""" - - values = [] - try: - for opt in options: - values.append (getattr (self, opt)) - except AttributeError, name: - raise DistutilsOptionError, \ - "command %s: no such option %s" % \ - (self.get_command_name(), name) - - return tuple (values) - - - def set_option (self, option, value): - """Set the value of a single option for this command. Raise - DistutilsOptionError if 'option' is not known.""" - - if not hasattr (self, option): - raise DistutilsOptionError, \ - "command '%s': no such option '%s'" % \ - (self.get_command_name(), option) - if value is not None: - setattr (self, option, value) - - def set_options (self, **optval): - """Set the values of several options for this command. Raise - DistutilsOptionError if any of the options specified as - keyword arguments are not known.""" - - for k in optval.keys(): - if optval[k] is not None: - self.set_option (k, optval[k]) - - - # -- Convenience methods for commands ------------------------------ - - def get_command_name (self): - if hasattr (self, 'command_name'): - return self.command_name - else: - class_name = self.__class__.__name__ - - # The re.split here returs empty strings delimited by the - # words we're actually interested in -- e.g. "FooBarBaz" - # splits to ['', 'Foo', '', 'Bar', '', 'Baz', '']. Hence - # the 'filter' to strip out the empties. - words = filter (None, re.split (r'([A-Z][a-z]+)', class_name)) - self.command_name = string.join (map (string.lower, words), "_") - return self.command_name - - - def set_undefined_options (self, src_cmd, *option_pairs): - """Set the values of any "undefined" options from corresponding - option values in some other command object. "Undefined" here - means "is None", which is the convention used to indicate - that an option has not been changed between - 'set_initial_values()' and 'set_final_values()'. Usually - called from 'set_final_values()' for options that depend on - some other command rather than another option of the same - command. 'src_cmd' is the other command from which option - values will be taken (a command object will be created for it - if necessary); the remaining arguments are - '(src_option,dst_option)' tuples which mean "take the value - of 'src_option' in the 'src_cmd' command object, and copy it - to 'dst_option' in the current command object".""" - - # Option_pairs: list of (src_option, dst_option) tuples - - src_cmd_obj = self.distribution.find_command_obj (src_cmd) - src_cmd_obj.ensure_ready () - try: - for (src_option, dst_option) in option_pairs: - if getattr (self, dst_option) is None: - self.set_option (dst_option, - src_cmd_obj.get_option (src_option)) - except AttributeError, name: - # duh, which command? - raise DistutilsOptionError, "unknown option %s" % name - - - def find_peer (self, command, create=1): - """Wrapper around Distribution's 'find_command_obj()' method: - find (create if necessary and 'create' is true) the command - object for 'command'..""" - - cmd_obj = self.distribution.find_command_obj (command, create) - cmd_obj.ensure_ready () - return cmd_obj - - - def get_peer_option (self, command, option): - """Find or create the command object for 'command', and return - its 'option' option.""" - - cmd_obj = self.find_peer (command) - return cmd_obj.get_option (option) - - - def run_peer (self, command): - """Run some other command: uses the 'run_command()' method of - Distribution, which creates the command object if necessary - and then invokes its 'run()' method.""" - - self.distribution.run_command (command) - - - # -- External world manipulation ----------------------------------- - - def warn (self, msg): - sys.stderr.write ("warning: %s: %s\n" % - (self.get_command_name(), msg)) - - - def execute (self, func, args, msg=None, level=1): - """Perform some action that affects the outside world (eg. - by writing to the filesystem). Such actions are special because - they should be disabled by the "dry run" flag, and should - announce themselves if the current verbosity level is high - enough. This method takes care of all that bureaucracy for you; - all you have to do is supply the funtion to call and an argument - tuple for it (to embody the "external action" being performed), - a message to print if the verbosity level is high enough, and an - optional verbosity threshold.""" - - # Generate a message if we weren't passed one - if msg is None: - msg = "%s %s" % (func.__name__, `args`) - if msg[-2:] == ',)': # correct for singleton tuple - msg = msg[0:-2] + ')' - - # Print it if verbosity level is high enough - self.announce (msg, level) - - # And do it, as long as we're not in dry-run mode - if not self.dry_run: - apply (func, args) - - # execute() - - - def mkpath (self, name, mode=0777): - util.mkpath (name, mode, - self.verbose, self.dry_run) - - - def copy_file (self, infile, outfile, - preserve_mode=1, preserve_times=1, link=None, level=1): - """Copy a file respecting verbose, dry-run and force flags.""" - - return util.copy_file (infile, outfile, - preserve_mode, preserve_times, - not self.force, - link, - self.verbose >= level, - self.dry_run) - - - def copy_tree (self, infile, outfile, - preserve_mode=1, preserve_times=1, preserve_symlinks=0, - level=1): - """Copy an entire directory tree respecting verbose, dry-run, - and force flags.""" - - return util.copy_tree (infile, outfile, - preserve_mode,preserve_times,preserve_symlinks, - not self.force, - self.verbose >= level, - self.dry_run) - - - def move_file (self, src, dst, level=1): - """Move a file respecting verbose and dry-run flags.""" - return util.move_file (src, dst, - self.verbose >= level, - self.dry_run) - - - def spawn (self, cmd, search_path=1, level=1): - from distutils.spawn import spawn - spawn (cmd, search_path, - self.verbose >= level, - self.dry_run) - - - def make_archive (self, base_name, format, - root_dir=None, base_dir=None): - util.make_archive (base_name, format, root_dir, base_dir, - self.verbose, self.dry_run) - - - def make_file (self, infiles, outfile, func, args, - exec_msg=None, skip_msg=None, level=1): - - """Special case of 'execute()' for operations that process one or - more input files and generate one output file. Works just like - 'execute()', except the operation is skipped and a different - message printed if 'outfile' already exists and is newer than - all files listed in 'infiles'.""" - - - if exec_msg is None: - exec_msg = "generating %s from %s" % \ - (outfile, string.join (infiles, ', ')) - if skip_msg is None: - skip_msg = "skipping %s (inputs unchanged)" % outfile - - - # Allow 'infiles' to be a single string - if type (infiles) is StringType: - infiles = (infiles,) - elif type (infiles) not in (ListType, TupleType): - raise TypeError, \ - "'infiles' must be a string, or a list or tuple of strings" - - # If 'outfile' must be regenerated (either because it doesn't - # exist, is out-of-date, or the 'force' flag is true) then - # perform the action that presumably regenerates it - if self.force or util.newer_group (infiles, outfile): - self.execute (func, args, exec_msg, level) - - # Otherwise, print the "skip" message - else: - self.announce (skip_msg, level) - - # make_file () - -# class Command diff --git a/dist.py b/dist.py new file mode 100644 index 0000000000..50e755697b --- /dev/null +++ b/dist.py @@ -0,0 +1,567 @@ +"""distutils.dist + +Provides the Distribution class, which represents the module distribution +being built/installed/distributed.""" + +# created 2000/04/03, Greg Ward +# (extricated from core.py; actually dates back to the beginning) + +__revision__ = "$Id$" + +import sys, string, re +from types import * +from copy import copy +from distutils.errors import * +from distutils.fancy_getopt import fancy_getopt, print_help + + +# Regex to define acceptable Distutils command names. This is not *quite* +# the same as a Python NAME -- I don't allow leading underscores. The fact +# that they're very similar is no coincidence; the default naming scheme is +# to look for a Python module named after the command. +command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') + + +class Distribution: + """The core of the Distutils. Most of the work hiding behind + 'setup' is really done within a Distribution instance, which + farms the work out to the Distutils commands specified on the + command line. + + Clients will almost never instantiate Distribution directly, + unless the 'setup' function is totally inadequate to their needs. + However, it is conceivable that a client might wish to subclass + Distribution for some specialized purpose, and then pass the + subclass to 'setup' as the 'distclass' keyword argument. If so, + it is necessary to respect the expectations that 'setup' has of + Distribution: it must have a constructor and methods + 'parse_command_line()' and 'run_commands()' with signatures like + those described below.""" + + + # 'global_options' describes the command-line options that may be + # supplied to the client (setup.py) prior to any actual commands. + # Eg. "./setup.py -nv" or "./setup.py --verbose" both take advantage of + # these global options. This list should be kept to a bare minimum, + # since every global option is also valid as a command option -- and we + # don't want to pollute the commands with too many options that they + # have minimal control over. + global_options = [('verbose', 'v', + "run verbosely (default)"), + ('quiet', 'q', + "run quietly (turns verbosity off)"), + ('dry-run', 'n', + "don't actually do anything"), + ('force', 'f', + "skip dependency checking between files"), + ('help', 'h', + "show this help message"), + ] + negative_opt = {'quiet': 'verbose'} + + + # -- Creation/initialization methods ------------------------------- + + def __init__ (self, attrs=None): + """Construct a new Distribution instance: initialize all the + attributes of a Distribution, and then uses 'attrs' (a + dictionary mapping attribute names to values) to assign + some of those attributes their "real" values. (Any attributes + not mentioned in 'attrs' will be assigned to some null + value: 0, None, an empty list or dictionary, etc.) Most + importantly, initialize the 'command_obj' attribute + to the empty dictionary; this will be filled in with real + command objects by 'parse_command_line()'.""" + + # Default values for our command-line options + self.verbose = 1 + self.dry_run = 0 + self.force = 0 + self.help = 0 + self.help_commands = 0 + + # And the "distribution meta-data" options -- these can only + # come from setup.py (the caller), not the command line + # (or a hypothetical config file). + self.name = None + self.version = None + self.author = None + self.author_email = None + self.maintainer = None + self.maintainer_email = None + self.url = None + self.licence = None + self.description = None + + # 'cmdclass' maps command names to class objects, so we + # can 1) quickly figure out which class to instantiate when + # we need to create a new command object, and 2) have a way + # for the client to override command classes + self.cmdclass = {} + + # These options are really the business of various commands, rather + # than of the Distribution itself. We provide aliases for them in + # Distribution as a convenience to the developer. + # dictionary. + self.packages = None + self.package_dir = None + self.py_modules = None + self.libraries = None + self.ext_modules = None + self.ext_package = None + self.include_dirs = None + self.extra_path = None + + # And now initialize bookkeeping stuff that can't be supplied by + # the caller at all. 'command_obj' maps command names to + # Command instances -- that's how we enforce that every command + # class is a singleton. + self.command_obj = {} + + # 'have_run' maps command names to boolean values; it keeps track + # of whether we have actually run a particular command, to make it + # cheap to "run" a command whenever we think we might need to -- if + # it's already been done, no need for expensive filesystem + # operations, we just check the 'have_run' dictionary and carry on. + # It's only safe to query 'have_run' for a command class that has + # been instantiated -- a false value will be inserted when the + # command object is created, and replaced with a true value when + # the command is succesfully run. Thus it's probably best to use + # '.get()' rather than a straight lookup. + self.have_run = {} + + # Now we'll use the attrs dictionary (ultimately, keyword args from + # the client) to possibly override any or all of these distribution + # options. + if attrs: + + # Pull out the set of command options and work on them + # specifically. Note that this order guarantees that aliased + # command options will override any supplied redundantly + # through the general options dictionary. + options = attrs.get ('options') + if options: + del attrs['options'] + for (command, cmd_options) in options.items(): + cmd_obj = self.find_command_obj (command) + for (key, val) in cmd_options.items(): + cmd_obj.set_option (key, val) + # loop over commands + # if any command options + + # Now work on the rest of the attributes. Any attribute that's + # not already defined is invalid! + for (key,val) in attrs.items(): + if hasattr (self, key): + setattr (self, key, val) + else: + raise DistutilsOptionError, \ + "invalid distribution option '%s'" % key + + # __init__ () + + + def parse_command_line (self, args): + """Parse the setup script's command line: set any Distribution + attributes tied to command-line options, create all command + objects, and set their options from the command-line. 'args' + must be a list of command-line arguments, most likely + 'sys.argv[1:]' (see the 'setup()' function). This list is first + processed for "global options" -- options that set attributes of + the Distribution instance. Then, it is alternately scanned for + Distutils command and options for that command. Each new + command terminates the options for the previous command. The + allowed options for a command are determined by the 'options' + attribute of the command object -- thus, we instantiate (and + cache) every command object here, in order to access its + 'options' attribute. Any error in that 'options' attribute + raises DistutilsGetoptError; any error on the command-line + raises DistutilsArgError. If no Distutils commands were found + on the command line, raises DistutilsArgError. Return true if + command-line successfully parsed and we should carry on with + executing commands; false if no errors but we shouldn't execute + commands (currently, this only happens if user asks for + help).""" + + # late import because of mutual dependence between these classes + from distutils.cmd import Command + + + # We have to parse the command line a bit at a time -- global + # options, then the first command, then its options, and so on -- + # because each command will be handled by a different class, and + # the options that are valid for a particular class aren't + # known until we instantiate the command class, which doesn't + # happen until we know what the command is. + + self.commands = [] + options = self.global_options + \ + [('help-commands', None, + "list all available commands")] + args = fancy_getopt (options, self.negative_opt, + self, sys.argv[1:]) + + # User just wants a list of commands -- we'll print it out and stop + # processing now (ie. if they ran "setup --help-commands foo bar", + # we ignore "foo bar"). + if self.help_commands: + self.print_commands () + print + print usage + return + + while args: + # Pull the current command from the head of the command line + command = args[0] + if not command_re.match (command): + raise SystemExit, "invalid command name '%s'" % command + self.commands.append (command) + + # Make sure we have a command object to put the options into + # (this either pulls it out of a cache of command objects, + # or finds and instantiates the command class). + try: + cmd_obj = self.find_command_obj (command) + except DistutilsModuleError, msg: + raise DistutilsArgError, msg + + # Require that the command class be derived from Command -- + # that way, we can be sure that we at least have the 'run' + # and 'get_option' methods. + if not isinstance (cmd_obj, Command): + raise DistutilsClassError, \ + "command class %s must subclass Command" % \ + cmd_obj.__class__ + + # Also make sure that the command object provides a list of its + # known options + if not (hasattr (cmd_obj, 'user_options') and + type (cmd_obj.user_options) is ListType): + raise DistutilsClassError, \ + ("command class %s must provide " + + "'user_options' attribute (a list of tuples)") % \ + cmd_obj.__class__ + + # Poof! like magic, all commands support the global + # options too, just by adding in 'global_options'. + negative_opt = self.negative_opt + if hasattr (cmd_obj, 'negative_opt'): + negative_opt = copy (negative_opt) + negative_opt.update (cmd_obj.negative_opt) + + options = self.global_options + cmd_obj.user_options + args = fancy_getopt (options, negative_opt, + cmd_obj, args[1:]) + if cmd_obj.help: + print_help (self.global_options, + header="Global options:") + print + print_help (cmd_obj.user_options, + header="Options for '%s' command:" % command) + print + print usage + return + + self.command_obj[command] = cmd_obj + self.have_run[command] = 0 + + # while args + + # If the user wants help -- ie. they gave the "--help" option -- + # give it to 'em. We do this *after* processing the commands in + # case they want help on any particular command, eg. + # "setup.py --help foo". (This isn't the documented way to + # get help on a command, but I support it because that's how + # CVS does it -- might as well be consistent.) + if self.help: + print_help (self.global_options, header="Global options:") + print + + for command in self.commands: + klass = self.find_command_class (command) + print_help (klass.user_options, + header="Options for '%s' command:" % command) + print + + print usage + return + + # Oops, no commands found -- an end-user error + if not self.commands: + raise DistutilsArgError, "no commands supplied" + + # All is well: return true + return 1 + + # parse_command_line() + + + def print_command_list (self, commands, header, max_length): + """Print a subset of the list of all commands -- used by + 'print_commands()'.""" + + print header + ":" + + for cmd in commands: + klass = self.cmdclass.get (cmd) + if not klass: + klass = self.find_command_class (cmd) + try: + description = klass.description + except AttributeError: + description = "(no description available)" + + print " %-*s %s" % (max_length, cmd, description) + + # print_command_list () + + + def print_commands (self): + """Print out a help message listing all available commands with + a description of each. The list is divided into "standard + commands" (listed in distutils.command.__all__) and "extra + commands" (mentioned in self.cmdclass, but not a standard + command). The descriptions come from the command class + attribute 'description'.""" + + import distutils.command + std_commands = distutils.command.__all__ + is_std = {} + for cmd in std_commands: + is_std[cmd] = 1 + + extra_commands = [] + for cmd in self.cmdclass.keys(): + if not is_std.get(cmd): + extra_commands.append (cmd) + + max_length = 0 + for cmd in (std_commands + extra_commands): + if len (cmd) > max_length: + max_length = len (cmd) + + self.print_command_list (std_commands, + "Standard commands", + max_length) + if extra_commands: + print + self.print_command_list (extra_commands, + "Extra commands", + max_length) + + # print_commands () + + + + # -- Command class/object methods ---------------------------------- + + # This is a method just so it can be overridden if desired; it doesn't + # actually use or change any attributes of the Distribution instance. + def find_command_class (self, command): + """Given a command, derives the names of the module and class + expected to implement the command: eg. 'foo_bar' becomes + 'distutils.command.foo_bar' (the module) and 'FooBar' (the + class within that module). Loads the module, extracts the + class from it, and returns the class object. + + Raises DistutilsModuleError with a semi-user-targeted error + message if the expected module could not be loaded, or the + expected class was not found in it.""" + + module_name = 'distutils.command.' + command + klass_name = command + + try: + __import__ (module_name) + module = sys.modules[module_name] + except ImportError: + raise DistutilsModuleError, \ + "invalid command '%s' (no module named '%s')" % \ + (command, module_name) + + try: + klass = vars(module)[klass_name] + except KeyError: + raise DistutilsModuleError, \ + "invalid command '%s' (no class '%s' in module '%s')" \ + % (command, klass_name, module_name) + + return klass + + # find_command_class () + + + def create_command_obj (self, command): + """Figure out the class that should implement a command, + instantiate it, cache and return the new "command object". + The "command class" is determined either by looking it up in + the 'cmdclass' attribute (this is the mechanism whereby + clients may override default Distutils commands or add their + own), or by calling the 'find_command_class()' method (if the + command name is not in 'cmdclass'.""" + + # Determine the command class -- either it's in the command_class + # dictionary, or we have to divine the module and class name + klass = self.cmdclass.get(command) + if not klass: + klass = self.find_command_class (command) + self.cmdclass[command] = klass + + # Found the class OK -- instantiate it + cmd_obj = klass (self) + return cmd_obj + + + def find_command_obj (self, command, create=1): + """Look up and return a command object in the cache maintained by + 'create_command_obj()'. If none found, the action taken + depends on 'create': if true (the default), create a new + command object by calling 'create_command_obj()' and return + it; otherwise, return None. If 'command' is an invalid + command name, then DistutilsModuleError will be raised.""" + + cmd_obj = self.command_obj.get (command) + if not cmd_obj and create: + cmd_obj = self.create_command_obj (command) + self.command_obj[command] = cmd_obj + + return cmd_obj + + + # -- Methods that operate on the Distribution ---------------------- + + def announce (self, msg, level=1): + """Print 'msg' if 'level' is greater than or equal to the verbosity + level recorded in the 'verbose' attribute (which, currently, + can be only 0 or 1).""" + + if self.verbose >= level: + print msg + + + def run_commands (self): + """Run each command that was seen on the client command line. + Uses the list of commands found and cache of command objects + created by 'create_command_obj()'.""" + + for cmd in self.commands: + self.run_command (cmd) + + + def get_option (self, option): + """Return the value of a distribution option. Raise + DistutilsOptionError if 'option' is not known.""" + + try: + return getattr (self, opt) + except AttributeError: + raise DistutilsOptionError, \ + "unknown distribution option %s" % option + + + def get_options (self, *options): + """Return (as a tuple) the values of several distribution + options. Raise DistutilsOptionError if any element of + 'options' is not known.""" + + values = [] + try: + for opt in options: + values.append (getattr (self, opt)) + except AttributeError, name: + raise DistutilsOptionError, \ + "unknown distribution option %s" % name + + return tuple (values) + + + # -- Methods that operate on its Commands -------------------------- + + def run_command (self, command): + + """Do whatever it takes to run a command (including nothing at all, + if the command has already been run). Specifically: if we have + already created and run the command named by 'command', return + silently without doing anything. If the command named by + 'command' doesn't even have a command object yet, create one. + Then invoke 'run()' on that command object (or an existing + one).""" + + # Already been here, done that? then return silently. + if self.have_run.get (command): + return + + self.announce ("running " + command) + cmd_obj = self.find_command_obj (command) + cmd_obj.ensure_ready () + cmd_obj.run () + self.have_run[command] = 1 + + + def get_command_option (self, command, option): + """Create a command object for 'command' if necessary, ensure that + its option values are all set to their final values, and return + the value of its 'option' option. Raise DistutilsOptionError if + 'option' is not known for that 'command'.""" + + cmd_obj = self.find_command_obj (command) + cmd_obj.ensure_ready () + return cmd_obj.get_option (option) + try: + return getattr (cmd_obj, option) + except AttributeError: + raise DistutilsOptionError, \ + "command %s: no such option %s" % (command, option) + + + def get_command_options (self, command, *options): + """Create a command object for 'command' if necessary, ensure that + its option values are all set to their final values, and return + a tuple containing the values of all the options listed in + 'options' for that command. Raise DistutilsOptionError if any + invalid option is supplied in 'options'.""" + + cmd_obj = self.find_command_obj (command) + cmd_obj.ensure_ready () + values = [] + try: + for opt in options: + values.append (getattr (cmd_obj, option)) + except AttributeError, name: + raise DistutilsOptionError, \ + "command %s: no such option %s" % (command, name) + + return tuple (values) + + + # -- Distribution query methods ------------------------------------ + + def has_pure_modules (self): + return len (self.packages or self.py_modules or []) > 0 + + def has_ext_modules (self): + return self.ext_modules and len (self.ext_modules) > 0 + + def has_c_libraries (self): + return self.libraries and len (self.libraries) > 0 + + def has_modules (self): + return self.has_pure_modules() or self.has_ext_modules() + + def is_pure (self): + return (self.has_pure_modules() and + not self.has_ext_modules() and + not self.has_c_libraries()) + + def get_name (self): + return self.name or "UNKNOWN" + + def get_full_name (self): + return "%s-%s" % ((self.name or "UNKNOWN"), (self.version or "???")) + +# class Distribution + + +if __name__ == "__main__": + dist = Distribution () + print "ok" From f3cceb54cf92355a4d0ce52a5b7b568c490753b3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 4 Apr 2000 02:05:59 +0000 Subject: [PATCH 0257/8469] Reorganization: ripped util.py to shreds, creating in the process: - file_util.py: operations on single files - dir_util.py: operations on whole directories or directory trees - dep_util.py: simple timestamp-based dependency analysis - archive_util.py: creation of archive (tar, zip, ...) files The functions left in util.py are miscellany that don't fit in any of the new files. --- archive_util.py | 152 +++++++++++ dep_util.py | 116 +++++++++ dir_util.py | 196 ++++++++++++++ file_util.py | 248 ++++++++++++++++++ util.py | 671 +----------------------------------------------- 5 files changed, 719 insertions(+), 664 deletions(-) create mode 100644 archive_util.py create mode 100644 dep_util.py create mode 100644 dir_util.py create mode 100644 file_util.py diff --git a/archive_util.py b/archive_util.py new file mode 100644 index 0000000000..a28eed1ad8 --- /dev/null +++ b/archive_util.py @@ -0,0 +1,152 @@ +"""distutils.archive_util + +Utility functions for creating archive files (tarballs, zip files, +that sort of thing).""" + +# created 2000/04/03, Greg Ward (extracted from util.py) + +__revision__ = "$Id$" + +import os +from distutils.errors import DistutilsExecError +from distutils.spawn import spawn + + +def make_tarball (base_name, base_dir, compress="gzip", + verbose=0, dry_run=0): + """Create a (possibly compressed) tar file from all the files under + 'base_dir'. 'compress' must be "gzip" (the default), "compress", or + None. Both "tar" and the compression utility named by 'compress' + must be on the default program search path, so this is probably + Unix-specific. The output tar file will be named 'base_dir' + + ".tar", possibly plus the appropriate compression extension + (".gz" or ".Z"). Return the output filename.""" + + # XXX GNU tar 1.13 has a nifty option to add a prefix directory. + # It's pretty new, though, so we certainly can't require it -- + # but it would be nice to take advantage of it to skip the + # "create a tree of hardlinks" step! (Would also be nice to + # detect GNU tar to use its 'z' option and save a step.) + + compress_ext = { 'gzip': ".gz", + 'compress': ".Z" } + + if compress is not None and compress not in ('gzip', 'compress'): + raise ValueError, \ + "bad value for 'compress': must be None, 'gzip', or 'compress'" + + archive_name = base_name + ".tar" + cmd = ["tar", "-cf", archive_name, base_dir] + spawn (cmd, verbose=verbose, dry_run=dry_run) + + if compress: + spawn ([compress, archive_name], verbose=verbose, dry_run=dry_run) + return archive_name + compress_ext[compress] + else: + return archive_name + +# make_tarball () + + +def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): + """Create a zip file from all the files under 'base_dir'. The + output zip file will be named 'base_dir' + ".zip". Uses either the + InfoZIP "zip" utility (if installed and found on the default search + path) or the "zipfile" Python module (if available). If neither + tool is available, raises DistutilsExecError. Returns the name + of the output zip file.""" + + # This initially assumed the Unix 'zip' utility -- but + # apparently InfoZIP's zip.exe works the same under Windows, so + # no changes needed! + + zip_filename = base_name + ".zip" + try: + spawn (["zip", "-rq", zip_filename, base_dir], + verbose=verbose, dry_run=dry_run) + except DistutilsExecError: + + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed" -- shouldn't try + # again in the latter case. (I think fixing this will + # require some cooperation from the spawn module -- perhaps + # a utility function to search the path, so we can fallback + # on zipfile.py without the failed spawn.) + try: + import zipfile + except ImportError: + raise DistutilsExecError, \ + ("unable to create zip file '%s': " + + "could neither find a standalone zip utility nor " + + "import the 'zipfile' module") % zip_filename + + if verbose: + print "creating '%s' and adding '%s' to it" % \ + (zip_filename, base_dir) + + def visit (z, dirname, names): + for name in names: + path = os.path.join (dirname, name) + if os.path.isfile (path): + z.write (path, path) + + if not dry_run: + z = zipfile.ZipFile (zip_filename, "wb", + compression=zipfile.ZIP_DEFLATED) + + os.path.walk (base_dir, visit, z) + z.close() + + return zip_filename + +# make_zipfile () + + +def make_archive (base_name, format, + root_dir=None, base_dir=None, + verbose=0, dry_run=0): + + """Create an archive file (eg. zip or tar). 'base_name' is the name + of the file to create, minus any format-specific extension; 'format' + is the archive format: one of "zip", "tar", "ztar", or "gztar". + 'root_dir' is a directory that will be the root directory of the + archive; ie. we typically chdir into 'root_dir' before creating the + archive. 'base_dir' is the directory where we start archiving from; + ie. 'base_dir' will be the common prefix of all files and + directories in the archive. 'root_dir' and 'base_dir' both default + to the current directory.""" + + save_cwd = os.getcwd() + if root_dir is not None: + if verbose: + print "changing into '%s'" % root_dir + base_name = os.path.abspath (base_name) + if not dry_run: + os.chdir (root_dir) + + if base_dir is None: + base_dir = os.curdir + + kwargs = { 'verbose': verbose, + 'dry_run': dry_run } + + if format == 'gztar': + func = make_tarball + kwargs['compress'] = 'gzip' + elif format == 'ztar': + func = make_tarball + kwargs['compress'] = 'compress' + elif format == 'tar': + func = make_tarball + kwargs['compress'] = None + elif format == 'zip': + func = make_zipfile + + apply (func, (base_name, base_dir), kwargs) + + if root_dir is not None: + if verbose: + print "changing back to '%s'" % save_cwd + os.chdir (save_cwd) + +# make_archive () diff --git a/dep_util.py b/dep_util.py new file mode 100644 index 0000000000..97812edaf5 --- /dev/null +++ b/dep_util.py @@ -0,0 +1,116 @@ +"""distutils.dep_util + +Utility functions for simple, timestamp-based dependency of files +and groups of files; also, function based entirely on such +timestamp dependency analysis.""" + +# created 2000/04/03, Greg Ward (extracted from util.py) + +__revision__ = "$Id$" + +import os +from distutils.errors import DistutilsFileError + + +def newer (source, target): + """Return true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. Return + false if both exist and 'target' is the same age or younger than + 'source'. Raise DistutilsFileError if 'source' does not + exist.""" + + if not os.path.exists (source): + raise DistutilsFileError, "file '%s' does not exist" % source + if not os.path.exists (target): + return 1 + + from stat import ST_MTIME + mtime1 = os.stat(source)[ST_MTIME] + mtime2 = os.stat(target)[ST_MTIME] + + return mtime1 > mtime2 + +# newer () + + +def newer_pairwise (sources, targets): + """Walk two filename lists in parallel, testing if each source is newer + than its corresponding target. Return a pair of lists (sources, + targets) where source is newer than target, according to the + semantics of 'newer()'.""" + + if len (sources) != len (targets): + raise ValueError, "'sources' and 'targets' must be same length" + + # build a pair of lists (sources, targets) where source is newer + n_sources = [] + n_targets = [] + for i in range (len (sources)): + if newer (sources[i], targets[i]): + n_sources.append (sources[i]) + n_targets.append (targets[i]) + + return (n_sources, n_targets) + +# newer_pairwise () + + +def newer_group (sources, target, missing='error'): + """Return true if 'target' is out-of-date with respect to any + file listed in 'sources'. In other words, if 'target' exists and + is newer than every file in 'sources', return false; otherwise + return true. 'missing' controls what we do when a source file is + missing; the default ("error") is to blow up with an OSError from + inside 'stat()'; if it is "ignore", we silently drop any missing + source files; if it is "newer", any missing source files make us + assume that 'target' is out-of-date (this is handy in "dry-run" + mode: it'll make you pretend to carry out commands that wouldn't + work because inputs are missing, but that doesn't matter because + you're not actually going to run the commands).""" + + # If the target doesn't even exist, then it's definitely out-of-date. + if not os.path.exists (target): + return 1 + + # Otherwise we have to find out the hard way: if *any* source file + # is more recent than 'target', then 'target' is out-of-date and + # we can immediately return true. If we fall through to the end + # of the loop, then 'target' is up-to-date and we return false. + from stat import ST_MTIME + target_mtime = os.stat (target)[ST_MTIME] + for source in sources: + if not os.path.exists (source): + if missing == 'error': # blow up when we stat() the file + pass + elif missing == 'ignore': # missing source dropped from + continue # target's dependency list + elif missing == 'newer': # missing source means target is + return 1 # out-of-date + + source_mtime = os.stat(source)[ST_MTIME] + if source_mtime > target_mtime: + return 1 + else: + return 0 + +# newer_group () + + +# XXX this isn't used anywhere, and worse, it has the same name as a method +# in Command with subtly different semantics. (This one just has one +# source -> one dest; that one has many sources -> one dest.) Nuke it? +def make_file (src, dst, func, args, + verbose=0, update_message=None, noupdate_message=None): + """Makes 'dst' from 'src' (both filenames) by calling 'func' with + 'args', but only if it needs to: i.e. if 'dst' does not exist or + 'src' is newer than 'dst'.""" + + if newer (src, dst): + if verbose and update_message: + print update_message + apply (func, args) + else: + if verbose and noupdate_message: + print noupdate_message + +# make_file () diff --git a/dir_util.py b/dir_util.py new file mode 100644 index 0000000000..c049bbd217 --- /dev/null +++ b/dir_util.py @@ -0,0 +1,196 @@ +"""distutils.dir_util + +Utility functions for manipulating directories and directory trees.""" + +# created 2000/04/03, Greg Ward (extracted from util.py) + +__revision__ = "$Id$" + +import os +from distutils.errors import DistutilsFileError + + +# cache for by mkpath() -- in addition to cheapening redundant calls, +# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode +PATH_CREATED = {} + +# I don't use os.makedirs because a) it's new to Python 1.5.2, and +# b) it blows up if the directory already exists (I want to silently +# succeed in that case). +def mkpath (name, mode=0777, verbose=0, dry_run=0): + """Create a directory and any missing ancestor directories. If the + directory already exists (or if 'name' is the empty string, which + means the current directory, which of course exists), then do + nothing. Raise DistutilsFileError if unable to create some + directory along the way (eg. some sub-path exists, but is a file + rather than a directory). If 'verbose' is true, print a one-line + summary of each mkdir to stdout. Return the list of directories + actually created.""" + + global PATH_CREATED + + # XXX what's the better way to handle verbosity? print as we create + # each directory in the path (the current behaviour), or only announce + # the creation of the whole path? (quite easy to do the latter since + # we're not using a recursive algorithm) + + name = os.path.normpath (name) + created_dirs = [] + if os.path.isdir (name) or name == '': + return created_dirs + if PATH_CREATED.get (name): + return created_dirs + + (head, tail) = os.path.split (name) + tails = [tail] # stack of lone dirs to create + + while head and tail and not os.path.isdir (head): + #print "splitting '%s': " % head, + (head, tail) = os.path.split (head) + #print "to ('%s','%s')" % (head, tail) + tails.insert (0, tail) # push next higher dir onto stack + + #print "stack of tails:", tails + + # now 'head' contains the deepest directory that already exists + # (that is, the child of 'head' in 'name' is the highest directory + # that does *not* exist) + for d in tails: + #print "head = %s, d = %s: " % (head, d), + head = os.path.join (head, d) + if PATH_CREATED.get (head): + continue + + if verbose: + print "creating", head + + if not dry_run: + try: + os.mkdir (head) + created_dirs.append(head) + except OSError, exc: + raise DistutilsFileError, \ + "could not create '%s': %s" % (head, exc[-1]) + + PATH_CREATED[head] = 1 + return created_dirs + +# mkpath () + + +def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): + + """Create all the empty directories under 'base_dir' needed to + put 'files' there. 'base_dir' is just the a name of a directory + which doesn't necessarily exist yet; 'files' is a list of filenames + to be interpreted relative to 'base_dir'. 'base_dir' + the + directory portion of every file in 'files' will be created if it + doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as + for 'mkpath()'.""" + + # First get the list of directories to create + need_dir = {} + for file in files: + need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 + need_dirs = need_dir.keys() + need_dirs.sort() + + # Now create them + for dir in need_dirs: + mkpath (dir, mode, verbose, dry_run) + +# create_tree () + + +def copy_tree (src, dst, + preserve_mode=1, + preserve_times=1, + preserve_symlinks=0, + update=0, + verbose=0, + dry_run=0): + + """Copy an entire directory tree 'src' to a new location 'dst'. Both + 'src' and 'dst' must be directory names. If 'src' is not a + directory, raise DistutilsFileError. If 'dst' does not exist, it is + created with 'mkpath()'. The end result of the copy is that every + file in 'src' is copied to 'dst', and directories under 'src' are + recursively copied to 'dst'. Return the list of files that were + copied or might have been copied, using their output name. The + return value is unaffected by 'update' or 'dry_run': it is simply + the list of all files under 'src', with the names changed to be + under 'dst'. + + 'preserve_mode' and 'preserve_times' are the same as for + 'copy_file'; note that they only apply to regular files, not to + directories. If 'preserve_symlinks' is true, symlinks will be + copied as symlinks (on platforms that support them!); otherwise + (the default), the destination of the symlink will be copied. + 'update' and 'verbose' are the same as for 'copy_file'.""" + + from distutils.file_util import copy_file + + if not dry_run and not os.path.isdir (src): + raise DistutilsFileError, \ + "cannot copy tree '%s': not a directory" % src + try: + names = os.listdir (src) + except os.error, (errno, errstr): + if dry_run: + names = [] + else: + raise DistutilsFileError, \ + "error listing files in '%s': %s" % (src, errstr) + + if not dry_run: + mkpath (dst, verbose=verbose) + + outputs = [] + + for n in names: + src_name = os.path.join (src, n) + dst_name = os.path.join (dst, n) + + if preserve_symlinks and os.path.islink (src_name): + link_dest = os.readlink (src_name) + if verbose: + print "linking %s -> %s" % (dst_name, link_dest) + if not dry_run: + os.symlink (link_dest, dst_name) + outputs.append (dst_name) + + elif os.path.isdir (src_name): + outputs.extend ( + copy_tree (src_name, dst_name, + preserve_mode, preserve_times, preserve_symlinks, + update, verbose, dry_run)) + else: + copy_file (src_name, dst_name, + preserve_mode, preserve_times, + update, None, verbose, dry_run) + outputs.append (dst_name) + + return outputs + +# copy_tree () + + +def remove_tree (directory, verbose=0, dry_run=0): + """Recursively remove an entire directory tree. Any errors are ignored + (apart from being reported to stdout if 'verbose' is true).""" + + from shutil import rmtree + + if verbose: + print "removing '%s' (and everything under it)" % directory + if dry_run: + return + try: + rmtree(directory,1) + except (IOError, OSError), exc: + if verbose: + if exc.filename: + print "error removing %s: %s (%s)" % \ + (directory, exc.strerror, exc.filename) + else: + print "error removing %s: %s" % (directory, exc.strerror) diff --git a/file_util.py b/file_util.py new file mode 100644 index 0000000000..91545abb18 --- /dev/null +++ b/file_util.py @@ -0,0 +1,248 @@ +"""distutils.file_util + +Utility functions for operating on single files.""" + +# created 2000/04/03, Greg Ward (extracted from util.py) + +__revision__ = "$Id$" + +import os +from distutils.errors import DistutilsFileError + + +# for generating verbose output in 'copy_file()' +_copy_action = { None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking' } + + +def _copy_file_contents (src, dst, buffer_size=16*1024): + """Copy the file 'src' to 'dst'; both must be filenames. Any error + opening either file, reading from 'src', or writing to 'dst', + raises DistutilsFileError. Data is read/written in chunks of + 'buffer_size' bytes (default 16k). No attempt is made to handle + anything apart from regular files.""" + + # Stolen from shutil module in the standard library, but with + # custom error-handling added. + + fsrc = None + fdst = None + try: + try: + fsrc = open(src, 'rb') + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not open '%s': %s" % (src, errstr) + + try: + fdst = open(dst, 'wb') + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not create '%s': %s" % (dst, errstr) + + while 1: + try: + buf = fsrc.read (buffer_size) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not read from '%s': %s" % (src, errstr) + + if not buf: + break + + try: + fdst.write(buf) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not write to '%s': %s" % (dst, errstr) + + finally: + if fdst: + fdst.close() + if fsrc: + fsrc.close() + +# _copy_file_contents() + + +def copy_file (src, dst, + preserve_mode=1, + preserve_times=1, + update=0, + link=None, + verbose=0, + dry_run=0): + + """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' + is copied there with the same name; otherwise, it must be a + filename. (If the file exists, it will be ruthlessly clobbered.) + If 'preserve_mode' is true (the default), the file's mode (type + and permission bits, or whatever is analogous on the current + platform) is copied. If 'preserve_times' is true (the default), + the last-modified and last-access times are copied as well. If + 'update' is true, 'src' will only be copied if 'dst' does not + exist, or if 'dst' does exist but is older than 'src'. If + 'verbose' is true, then a one-line summary of the copy will be + printed to stdout. + + 'link' allows you to make hard links (os.link) or symbolic links + (os.symlink) instead of copying: set it to "hard" or "sym"; if it + is None (the default), files are copied. Don't set 'link' on + systems that don't support it: 'copy_file()' doesn't check if + hard or symbolic linking is availalble. + + Under Mac OS, uses the native file copy function in macostools; + on other systems, uses '_copy_file_contents()' to copy file + contents. + + Return true if the file was copied (or would have been copied), + false otherwise (ie. 'update' was true and the destination is + up-to-date).""" + + # XXX if the destination file already exists, we clobber it if + # copying, but blow up if linking. Hmmm. And I don't know what + # macostools.copyfile() does. Should definitely be consistent, and + # should probably blow up if destination exists and we would be + # changing it (ie. it's not already a hard/soft link to src OR + # (not update) and (src newer than dst). + + from stat import * + from distutils.dep_util import newer + + if not os.path.isfile (src): + raise DistutilsFileError, \ + "can't copy '%s': doesn't exist or not a regular file" % src + + if os.path.isdir (dst): + dir = dst + dst = os.path.join (dst, os.path.basename (src)) + else: + dir = os.path.dirname (dst) + + if update and not newer (src, dst): + if verbose: + print "not copying %s (output up-to-date)" % src + return 0 + + try: + action = _copy_action[link] + except KeyError: + raise ValueError, \ + "invalid value '%s' for 'link' argument" % link + if verbose: + print "%s %s -> %s" % (action, src, dir) + + if dry_run: + return 1 + + # On a Mac, use the native file copy routine + if os.name == 'mac': + import macostools + try: + macostools.copy (src, dst, 0, preserve_times) + except OSError, exc: + raise DistutilsFileError, \ + "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) + + # If linking (hard or symbolic), use the appropriate system call + # (Unix only, of course, but that's the caller's responsibility) + elif link == 'hard': + if not (os.path.exists (dst) and os.path.samefile (src, dst)): + os.link (src, dst) + elif link == 'sym': + if not (os.path.exists (dst) and os.path.samefile (src, dst)): + os.symlink (src, dst) + + # Otherwise (non-Mac, not linking), copy the file contents and + # (optionally) copy the times and mode. + else: + _copy_file_contents (src, dst) + if preserve_mode or preserve_times: + st = os.stat (src) + + # According to David Ascher , utime() should be done + # before chmod() (at least under NT). + if preserve_times: + os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + if preserve_mode: + os.chmod (dst, S_IMODE (st[ST_MODE])) + + return 1 + +# copy_file () + + +# XXX I suspect this is Unix-specific -- need porting help! +def move_file (src, dst, + verbose=0, + dry_run=0): + + """Move a file 'src' to 'dst'. If 'dst' is a directory, the file + will be moved into it with the same name; otherwise, 'src' is + just renamed to 'dst'. Return the new full name of the file. + + Handles cross-device moves on Unix using + 'copy_file()'. What about other systems???""" + + from os.path import exists, isfile, isdir, basename, dirname + + if verbose: + print "moving %s -> %s" % (src, dst) + + if dry_run: + return dst + + if not isfile (src): + raise DistutilsFileError, \ + "can't move '%s': not a regular file" % src + + if isdir (dst): + dst = os.path.join (dst, basename (src)) + elif exists (dst): + raise DistutilsFileError, \ + "can't move '%s': destination '%s' already exists" % \ + (src, dst) + + if not isdir (dirname (dst)): + raise DistutilsFileError, \ + "can't move '%s': destination '%s' not a valid path" % \ + (src, dst) + + copy_it = 0 + try: + os.rename (src, dst) + except os.error, (num, msg): + if num == errno.EXDEV: + copy_it = 1 + else: + raise DistutilsFileError, \ + "couldn't move '%s' to '%s': %s" % (src, dst, msg) + + if copy_it: + copy_file (src, dst) + try: + os.unlink (src) + except os.error, (num, msg): + try: + os.unlink (dst) + except os.error: + pass + raise DistutilsFileError, \ + ("couldn't move '%s' to '%s' by copy/delete: " + + "delete '%s' failed: %s") % \ + (src, dst, src, msg) + + return dst + +# move_file () + + +def write_file (filename, contents): + """Create a file with the specified name and write 'contents' (a + sequence of strings without line terminators) to it.""" + + f = open (filename, "w") + for line in contents: + f.write (line + "\n") + f.close () diff --git a/util.py b/util.py index 22fc437547..ddcf0d2862 100644 --- a/util.py +++ b/util.py @@ -1,11 +1,7 @@ """distutils.util -General-purpose utility functions used throughout the Distutils -(especially in command classes). Mostly filesystem manipulation, but -not limited to that. The functions in this module generally raise -DistutilsFileError when they have problems with the filesystem, because -os.error in pre-1.5.2 Python only gives the error message and not the -file causing it.""" +Miscellaneous utility functions -- anything that doesn't fit into +one of the other *util.py modules.""" # created 1999/03/08, Greg Ward @@ -15,526 +11,11 @@ from distutils.errors import * from distutils.spawn import spawn -# cache for by mkpath() -- in addition to cheapening redundant calls, -# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode -PATH_CREATED = {} - -# for generating verbose output in 'copy_file()' -_copy_action = { None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking' } - -# I don't use os.makedirs because a) it's new to Python 1.5.2, and -# b) it blows up if the directory already exists (I want to silently -# succeed in that case). -def mkpath (name, mode=0777, verbose=0, dry_run=0): - """Create a directory and any missing ancestor directories. If the - directory already exists (or if 'name' is the empty string, which - means the current directory, which of course exists), then do - nothing. Raise DistutilsFileError if unable to create some - directory along the way (eg. some sub-path exists, but is a file - rather than a directory). If 'verbose' is true, print a one-line - summary of each mkdir to stdout. Return the list of directories - actually created.""" - - global PATH_CREATED - - # XXX what's the better way to handle verbosity? print as we create - # each directory in the path (the current behaviour), or only announce - # the creation of the whole path? (quite easy to do the latter since - # we're not using a recursive algorithm) - - name = os.path.normpath (name) - created_dirs = [] - if os.path.isdir (name) or name == '': - return created_dirs - if PATH_CREATED.get (name): - return created_dirs - - (head, tail) = os.path.split (name) - tails = [tail] # stack of lone dirs to create - - while head and tail and not os.path.isdir (head): - #print "splitting '%s': " % head, - (head, tail) = os.path.split (head) - #print "to ('%s','%s')" % (head, tail) - tails.insert (0, tail) # push next higher dir onto stack - - #print "stack of tails:", tails - - # now 'head' contains the deepest directory that already exists - # (that is, the child of 'head' in 'name' is the highest directory - # that does *not* exist) - for d in tails: - #print "head = %s, d = %s: " % (head, d), - head = os.path.join (head, d) - if PATH_CREATED.get (head): - continue - - if verbose: - print "creating", head - - if not dry_run: - try: - os.mkdir (head) - created_dirs.append(head) - except OSError, exc: - raise DistutilsFileError, \ - "could not create '%s': %s" % (head, exc[-1]) - - PATH_CREATED[head] = 1 - return created_dirs - -# mkpath () - - -def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): - - """Create all the empty directories under 'base_dir' needed to - put 'files' there. 'base_dir' is just the a name of a directory - which doesn't necessarily exist yet; 'files' is a list of filenames - to be interpreted relative to 'base_dir'. 'base_dir' + the - directory portion of every file in 'files' will be created if it - doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as - for 'mkpath()'.""" - - # First get the list of directories to create - need_dir = {} - for file in files: - need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 - need_dirs = need_dir.keys() - need_dirs.sort() - - # Now create them - for dir in need_dirs: - mkpath (dir, mode, verbose, dry_run) - -# create_tree () - - -def newer (source, target): - """Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. Return - false if both exist and 'target' is the same age or younger than - 'source'. Raise DistutilsFileError if 'source' does not - exist.""" - - if not os.path.exists (source): - raise DistutilsFileError, "file '%s' does not exist" % source - if not os.path.exists (target): - return 1 - - from stat import ST_MTIME - mtime1 = os.stat(source)[ST_MTIME] - mtime2 = os.stat(target)[ST_MTIME] - - return mtime1 > mtime2 - -# newer () - - -def newer_pairwise (sources, targets): - """Walk two filename lists in parallel, testing if each source is newer - than its corresponding target. Return a pair of lists (sources, - targets) where source is newer than target, according to the - semantics of 'newer()'.""" - - if len (sources) != len (targets): - raise ValueError, "'sources' and 'targets' must be same length" - - # build a pair of lists (sources, targets) where source is newer - n_sources = [] - n_targets = [] - for i in range (len (sources)): - if newer (sources[i], targets[i]): - n_sources.append (sources[i]) - n_targets.append (targets[i]) - - return (n_sources, n_targets) - -# newer_pairwise () - - -def newer_group (sources, target, missing='error'): - """Return true if 'target' is out-of-date with respect to any - file listed in 'sources'. In other words, if 'target' exists and - is newer than every file in 'sources', return false; otherwise - return true. 'missing' controls what we do when a source file is - missing; the default ("error") is to blow up with an OSError from - inside 'stat()'; if it is "ignore", we silently drop any missing - source files; if it is "newer", any missing source files make us - assume that 'target' is out-of-date (this is handy in "dry-run" - mode: it'll make you pretend to carry out commands that wouldn't - work because inputs are missing, but that doesn't matter because - you're not actually going to run the commands).""" - - # If the target doesn't even exist, then it's definitely out-of-date. - if not os.path.exists (target): - return 1 - - # Otherwise we have to find out the hard way: if *any* source file - # is more recent than 'target', then 'target' is out-of-date and - # we can immediately return true. If we fall through to the end - # of the loop, then 'target' is up-to-date and we return false. - from stat import ST_MTIME - target_mtime = os.stat (target)[ST_MTIME] - for source in sources: - if not os.path.exists (source): - if missing == 'error': # blow up when we stat() the file - pass - elif missing == 'ignore': # missing source dropped from - continue # target's dependency list - elif missing == 'newer': # missing source means target is - return 1 # out-of-date - - source_mtime = os.stat(source)[ST_MTIME] - if source_mtime > target_mtime: - return 1 - else: - return 0 - -# newer_group () - - -# XXX this isn't used anywhere, and worse, it has the same name as a method -# in Command with subtly different semantics. (This one just has one -# source -> one dest; that one has many sources -> one dest.) Nuke it? -def make_file (src, dst, func, args, - verbose=0, update_message=None, noupdate_message=None): - """Makes 'dst' from 'src' (both filenames) by calling 'func' with - 'args', but only if it needs to: i.e. if 'dst' does not exist or - 'src' is newer than 'dst'.""" - - if newer (src, dst): - if verbose and update_message: - print update_message - apply (func, args) - else: - if verbose and noupdate_message: - print noupdate_message - -# make_file () - - -def _copy_file_contents (src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', - raises DistutilsFileError. Data is read/written in chunks of - 'buffer_size' bytes (default 16k). No attempt is made to handle - anything apart from regular files.""" - - # Stolen from shutil module in the standard library, but with - # custom error-handling added. - - fsrc = None - fdst = None - try: - try: - fsrc = open(src, 'rb') - except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not open '%s': %s" % (src, errstr) - - try: - fdst = open(dst, 'wb') - except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not create '%s': %s" % (dst, errstr) - - while 1: - try: - buf = fsrc.read (buffer_size) - except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not read from '%s': %s" % (src, errstr) - - if not buf: - break - - try: - fdst.write(buf) - except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not write to '%s': %s" % (dst, errstr) - - finally: - if fdst: - fdst.close() - if fsrc: - fsrc.close() - -# _copy_file_contents() - - -def copy_file (src, dst, - preserve_mode=1, - preserve_times=1, - update=0, - link=None, - verbose=0, - dry_run=0): - - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' - is copied there with the same name; otherwise, it must be a - filename. (If the file exists, it will be ruthlessly clobbered.) - If 'preserve_mode' is true (the default), the file's mode (type - and permission bits, or whatever is analogous on the current - platform) is copied. If 'preserve_times' is true (the default), - the last-modified and last-access times are copied as well. If - 'update' is true, 'src' will only be copied if 'dst' does not - exist, or if 'dst' does exist but is older than 'src'. If - 'verbose' is true, then a one-line summary of the copy will be - printed to stdout. - - 'link' allows you to make hard links (os.link) or symbolic links - (os.symlink) instead of copying: set it to "hard" or "sym"; if it - is None (the default), files are copied. Don't set 'link' on - systems that don't support it: 'copy_file()' doesn't check if - hard or symbolic linking is availalble. - - Under Mac OS, uses the native file copy function in macostools; - on other systems, uses '_copy_file_contents()' to copy file - contents. - - Return true if the file was copied (or would have been copied), - false otherwise (ie. 'update' was true and the destination is - up-to-date).""" - - # XXX if the destination file already exists, we clobber it if - # copying, but blow up if linking. Hmmm. And I don't know what - # macostools.copyfile() does. Should definitely be consistent, and - # should probably blow up if destination exists and we would be - # changing it (ie. it's not already a hard/soft link to src OR - # (not update) and (src newer than dst). - - from stat import * - - if not os.path.isfile (src): - raise DistutilsFileError, \ - "can't copy '%s': doesn't exist or not a regular file" % src - - if os.path.isdir (dst): - dir = dst - dst = os.path.join (dst, os.path.basename (src)) - else: - dir = os.path.dirname (dst) - - if update and not newer (src, dst): - if verbose: - print "not copying %s (output up-to-date)" % src - return 0 - - try: - action = _copy_action[link] - except KeyError: - raise ValueError, \ - "invalid value '%s' for 'link' argument" % link - if verbose: - print "%s %s -> %s" % (action, src, dir) - - if dry_run: - return 1 - - # On a Mac, use the native file copy routine - if os.name == 'mac': - import macostools - try: - macostools.copy (src, dst, 0, preserve_times) - except OSError, exc: - raise DistutilsFileError, \ - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) - - # If linking (hard or symbolic), use the appropriate system call - # (Unix only, of course, but that's the caller's responsibility) - elif link == 'hard': - if not (os.path.exists (dst) and os.path.samefile (src, dst)): - os.link (src, dst) - elif link == 'sym': - if not (os.path.exists (dst) and os.path.samefile (src, dst)): - os.symlink (src, dst) - - # Otherwise (non-Mac, not linking), copy the file contents and - # (optionally) copy the times and mode. - else: - _copy_file_contents (src, dst) - if preserve_mode or preserve_times: - st = os.stat (src) - - # According to David Ascher , utime() should be done - # before chmod() (at least under NT). - if preserve_times: - os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) - if preserve_mode: - os.chmod (dst, S_IMODE (st[ST_MODE])) - - return 1 - -# copy_file () - - -def copy_tree (src, dst, - preserve_mode=1, - preserve_times=1, - preserve_symlinks=0, - update=0, - verbose=0, - dry_run=0): - - """Copy an entire directory tree 'src' to a new location 'dst'. Both - 'src' and 'dst' must be directory names. If 'src' is not a - directory, raise DistutilsFileError. If 'dst' does not exist, it is - created with 'mkpath()'. The end result of the copy is that every - file in 'src' is copied to 'dst', and directories under 'src' are - recursively copied to 'dst'. Return the list of files that were - copied or might have been copied, using their output name. The - return value is unaffected by 'update' or 'dry_run': it is simply - the list of all files under 'src', with the names changed to be - under 'dst'. - - 'preserve_mode' and 'preserve_times' are the same as for - 'copy_file'; note that they only apply to regular files, not to - directories. If 'preserve_symlinks' is true, symlinks will be - copied as symlinks (on platforms that support them!); otherwise - (the default), the destination of the symlink will be copied. - 'update' and 'verbose' are the same as for 'copy_file'.""" - - if not dry_run and not os.path.isdir (src): - raise DistutilsFileError, \ - "cannot copy tree '%s': not a directory" % src - try: - names = os.listdir (src) - except os.error, (errno, errstr): - if dry_run: - names = [] - else: - raise DistutilsFileError, \ - "error listing files in '%s': %s" % (src, errstr) - - if not dry_run: - mkpath (dst, verbose=verbose) - - outputs = [] - - for n in names: - src_name = os.path.join (src, n) - dst_name = os.path.join (dst, n) - - if preserve_symlinks and os.path.islink (src_name): - link_dest = os.readlink (src_name) - if verbose: - print "linking %s -> %s" % (dst_name, link_dest) - if not dry_run: - os.symlink (link_dest, dst_name) - outputs.append (dst_name) - - elif os.path.isdir (src_name): - outputs.extend ( - copy_tree (src_name, dst_name, - preserve_mode, preserve_times, preserve_symlinks, - update, verbose, dry_run)) - else: - copy_file (src_name, dst_name, - preserve_mode, preserve_times, - update, None, verbose, dry_run) - outputs.append (dst_name) - - return outputs - -# copy_tree () - - -def remove_tree (directory, verbose=0, dry_run=0): - """Recursively remove an entire directory tree. Any errors are ignored - (apart from being reported to stdout if 'verbose' is true).""" - - if verbose: - print "removing '%s' (and everything under it)" % directory - if dry_run: - return - try: - shutil.rmtree(directory,1) - except (IOError, OSError), exc: - if verbose: - if exc.filename: - print "error removing %s: %s (%s)" % \ - (directory, exc.strerror, exc.filename) - else: - print "error removing %s: %s" % (directory, exc.strerror) - - -# XXX I suspect this is Unix-specific -- need porting help! -def move_file (src, dst, - verbose=0, - dry_run=0): - - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file - will be moved into it with the same name; otherwise, 'src' is - just renamed to 'dst'. Return the new full name of the file. - - Handles cross-device moves on Unix using - 'copy_file()'. What about other systems???""" - - from os.path import exists, isfile, isdir, basename, dirname - - if verbose: - print "moving %s -> %s" % (src, dst) - - if dry_run: - return dst - - if not isfile (src): - raise DistutilsFileError, \ - "can't move '%s': not a regular file" % src - - if isdir (dst): - dst = os.path.join (dst, basename (src)) - elif exists (dst): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' already exists" % \ - (src, dst) - - if not isdir (dirname (dst)): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' not a valid path" % \ - (src, dst) - - copy_it = 0 - try: - os.rename (src, dst) - except os.error, (num, msg): - if num == errno.EXDEV: - copy_it = 1 - else: - raise DistutilsFileError, \ - "couldn't move '%s' to '%s': %s" % (src, dst, msg) - - if copy_it: - copy_file (src, dst) - try: - os.unlink (src) - except os.error, (num, msg): - try: - os.unlink (dst) - except os.error: - pass - raise DistutilsFileError, \ - ("couldn't move '%s' to '%s' by copy/delete: " + - "delete '%s' failed: %s") % \ - (src, dst, src, msg) - - return dst - -# move_file () - - -def write_file (filename, contents): - """Create a file with the specified name and write 'contents' (a - sequence of strings without line terminators) to it.""" - - f = open (filename, "w") - for line in contents: - f.write (line + "\n") - f.close () +# for backwards compatibility: +from distutils.file_util import * +from distutils.dir_util import * +from distutils.dep_util import * +from distutils.archive_util import * def get_platform (): @@ -620,141 +101,3 @@ def _subst (match, local_vars=local_vars): # subst_vars () -def make_tarball (base_name, base_dir, compress="gzip", - verbose=0, dry_run=0): - """Create a (possibly compressed) tar file from all the files under - 'base_dir'. 'compress' must be "gzip" (the default), "compress", or - None. Both "tar" and the compression utility named by 'compress' - must be on the default program search path, so this is probably - Unix-specific. The output tar file will be named 'base_dir' + - ".tar", possibly plus the appropriate compression extension - (".gz" or ".Z"). Return the output filename.""" - - # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- - # but it would be nice to take advantage of it to skip the - # "create a tree of hardlinks" step! (Would also be nice to - # detect GNU tar to use its 'z' option and save a step.) - - compress_ext = { 'gzip': ".gz", - 'compress': ".Z" } - - if compress is not None and compress not in ('gzip', 'compress'): - raise ValueError, \ - "bad value for 'compress': must be None, 'gzip', or 'compress'" - - archive_name = base_name + ".tar" - cmd = ["tar", "-cf", archive_name, base_dir] - spawn (cmd, verbose=verbose, dry_run=dry_run) - - if compress: - spawn ([compress, archive_name], verbose=verbose, dry_run=dry_run) - return archive_name + compress_ext[compress] - else: - return archive_name - -# make_tarball () - - -def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): - """Create a zip file from all the files under 'base_dir'. The - output zip file will be named 'base_dir' + ".zip". Uses either the - InfoZIP "zip" utility (if installed and found on the default search - path) or the "zipfile" Python module (if available). If neither - tool is available, raises DistutilsExecError. Returns the name - of the output zip file.""" - - # This initially assumed the Unix 'zip' utility -- but - # apparently InfoZIP's zip.exe works the same under Windows, so - # no changes needed! - - zip_filename = base_name + ".zip" - try: - spawn (["zip", "-rq", zip_filename, base_dir], - verbose=verbose, dry_run=dry_run) - except DistutilsExecError: - - # XXX really should distinguish between "couldn't find - # external 'zip' command" and "zip failed" -- shouldn't try - # again in the latter case. (I think fixing this will - # require some cooperation from the spawn module -- perhaps - # a utility function to search the path, so we can fallback - # on zipfile.py without the failed spawn.) - try: - import zipfile - except ImportError: - raise DistutilsExecError, \ - ("unable to create zip file '%s': " + - "could neither find a standalone zip utility nor " + - "import the 'zipfile' module") % zip_filename - - if verbose: - print "creating '%s' and adding '%s' to it" % \ - (zip_filename, base_dir) - - def visit (z, dirname, names): - for name in names: - path = os.path.join (dirname, name) - if os.path.isfile (path): - z.write (path, path) - - if not dry_run: - z = zipfile.ZipFile (zip_filename, "wb", - compression=zipfile.ZIP_DEFLATED) - - os.path.walk (base_dir, visit, z) - z.close() - - return zip_filename - -# make_zipfile () - - -def make_archive (base_name, format, - root_dir=None, base_dir=None, - verbose=0, dry_run=0): - - """Create an archive file (eg. zip or tar). 'base_name' is the name - of the file to create, minus any format-specific extension; 'format' - is the archive format: one of "zip", "tar", "ztar", or "gztar". - 'root_dir' is a directory that will be the root directory of the - archive; ie. we typically chdir into 'root_dir' before creating the - archive. 'base_dir' is the directory where we start archiving from; - ie. 'base_dir' will be the common prefix of all files and - directories in the archive. 'root_dir' and 'base_dir' both default - to the current directory.""" - - save_cwd = os.getcwd() - if root_dir is not None: - if verbose: - print "changing into '%s'" % root_dir - base_name = os.path.abspath (base_name) - if not dry_run: - os.chdir (root_dir) - - if base_dir is None: - base_dir = os.curdir - - kwargs = { 'verbose': verbose, - 'dry_run': dry_run } - - if format == 'gztar': - func = make_tarball - kwargs['compress'] = 'gzip' - elif format == 'ztar': - func = make_tarball - kwargs['compress'] = 'compress' - elif format == 'tar': - func = make_tarball - kwargs['compress'] = None - elif format == 'zip': - func = make_zipfile - - apply (func, (base_name, base_dir), kwargs) - - if root_dir is not None: - if verbose: - print "changing back to '%s'" % save_cwd - os.chdir (save_cwd) - -# make_archive () From 668f7321264af838cecd5c2b2fb57a01ece71857 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 6 Apr 2000 02:07:41 +0000 Subject: [PATCH 0258/8469] Add missing import of 'usage' string. --- dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 50e755697b..7246b74001 100644 --- a/dist.py +++ b/dist.py @@ -183,9 +183,9 @@ def parse_command_line (self, args): commands (currently, this only happens if user asks for help).""" - # late import because of mutual dependence between these classes + # late import because of mutual dependence between these modules from distutils.cmd import Command - + from distutils.core import usage # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- From 1941b15adc3750d84b149fb84af75e36a633ad61 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Apr 2000 02:31:45 +0000 Subject: [PATCH 0259/8469] This little note is to clarify things for people who go poking around the Python library hoping to find out more about the Distutils. --- README | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000000..f1db3c6c40 --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +This directory contains only a subset of the Distutils, specifically the +Python modules in the 'distutils' and 'distutils.command' packages. +Technically, this is all you need to distribute and install Python modules +using the Distutils. Most people will want some documentation and other +help, though. Currently, everything can be found at the Distutils web page: + + http://www.python.org/sigs/distutils-sig/ + +From there you can access the latest documentation, or download a standalone +Distutils release that includes all the code in this directory, plus +documentation, test scripts, examples, etc. + +The Distutils documentation isn't yet part of the standard Python +documentation set, but will be soon. + + Greg Ward (gward@python.net) + +$Id$ From 79cc38ef59bfe78ac6a3eae934cebb9ef10798ba Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Apr 2000 03:48:37 +0000 Subject: [PATCH 0260/8469] Added (currently) pointless and trivial main body (for future tests). --- cmd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd.py b/cmd.py index ad78703713..b2fb517e73 100644 --- a/cmd.py +++ b/cmd.py @@ -388,3 +388,7 @@ def make_file (self, infiles, outfile, func, args, # make_file () # class Command + + +if __name__ == "__main__": + print "ok" From 1633033ac04ecddfdb450f8e60efa54c7eb894d5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Apr 2000 03:49:20 +0000 Subject: [PATCH 0261/8469] Catch DistutilsFileError in addition to DistutilsExecError in 'setup()'. --- core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.py b/core.py index 3df54a5e83..9a801063c7 100644 --- a/core.py +++ b/core.py @@ -96,7 +96,7 @@ def setup (**attrs): "error: %s: %s" % (exc.filename, exc.strerror) else: raise SystemExit, str (exc) - except DistutilsExecError, msg: + except (DistutilsExecError, DistutilsFileError), msg: raise SystemExit, "error: " + str (msg) # setup () From 4973bedd82d22fe0b181d0a045565eac3e93a37f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 9 Apr 2000 03:51:40 +0000 Subject: [PATCH 0262/8469] Ditched the unused 'list_only' option. Added code to include source files from 'build_clib' command to default file list -- currently this won't work, since 'build_clib' doesn't have a 'get_source_files()' method! --- command/sdist.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 7dbd40138a..349a824afd 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -36,8 +36,6 @@ class sdist (Command): ('formats=', None, "formats for source distribution (tar, ztar, gztar, or zip)"), - ('list-only', 'l', - "just list files that would be distributed"), ('keep-tree', 'k', "keep the distribution tree around after creating " + "archive file(s)"), @@ -64,7 +62,6 @@ def initialize_options (self): self.force_manifest = 0 self.formats = None - self.list_only = 0 self.keep_tree = 0 @@ -228,6 +225,10 @@ def find_defaults (self): build_ext = self.find_peer ('build_ext') self.files.extend (build_ext.get_source_files ()) + if self.distribution.has_c_libraries(): + build_clib = self.find_peer ('build_clib') + self.files.extend (build_clib.get_source_files ()) + def search_dir (self, dir, pattern=None): """Recursively find files under 'dir' matching 'pattern' (a string From 4bd72ccc78221cffe25ef0048895e24c4a63ba6b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 00:02:16 +0000 Subject: [PATCH 0263/8469] Added __version__ to store the Distutils version number. --- __init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__init__.py b/__init__.py index 1f23b972e4..9305554999 100644 --- a/__init__.py +++ b/__init__.py @@ -9,3 +9,5 @@ """ __revision__ = "$Id$" + +__version__ = "0.8" From 515669ce62c1021d1cecfadc1c006bb074beb202 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 00:18:16 +0000 Subject: [PATCH 0264/8469] Removed global '--force' option -- just too vague a concept to be applicable to all commands in the same way. Several Command methods now either expect 'self.force' to be defined, or check if it is defined and assume it's false if not. --- cmd.py | 24 ++++++++++++++---------- dist.py | 3 --- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/cmd.py b/cmd.py index b2fb517e73..76a76919cd 100644 --- a/cmd.py +++ b/cmd.py @@ -58,7 +58,6 @@ def __init__ (self, dist): # (etc.) will be handled by __getattr__, below. self._verbose = None self._dry_run = None - self._force = None # The 'help' flag is just used for command-line parsing, so # none of that complicated bureaucracy is needed. @@ -74,7 +73,7 @@ def __init__ (self, dist): def __getattr__ (self, attr): - if attr in ('verbose', 'dry_run', 'force'): + if attr in ('verbose', 'dry_run'): myval = getattr (self, "_" + attr) if myval is None: return getattr (self.distribution, attr) @@ -308,7 +307,8 @@ def mkpath (self, name, mode=0777): def copy_file (self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): - """Copy a file respecting verbose, dry-run and force flags.""" + """Copy a file respecting verbose, dry-run and force flags (this + should only be used by commands that define 'self.force'!).""" return util.copy_file (infile, outfile, preserve_mode, preserve_times, @@ -322,7 +322,8 @@ def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, - and force flags.""" + and force flags (again, should only be used by commands + that define 'self.force').""" return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, @@ -352,13 +353,15 @@ def make_archive (self, base_name, format, def make_file (self, infiles, outfile, func, args, - exec_msg=None, skip_msg=None, level=1): + exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or - more input files and generate one output file. Works just like - 'execute()', except the operation is skipped and a different - message printed if 'outfile' already exists and is newer than - all files listed in 'infiles'.""" + more input files and generate one output file. Works just like + 'execute()', except the operation is skipped and a different + message printed if 'outfile' already exists and is newer than all + files listed in 'infiles'. If the command defined 'self.force', + and it is true, then the command is unconditionally run -- does no + timestamp checks.""" if exec_msg is None: @@ -378,7 +381,8 @@ def make_file (self, infiles, outfile, func, args, # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if self.force or util.newer_group (infiles, outfile): + if ((hasattr(self,'force') and self.force) or + util.newer_group (infiles, outfile)): self.execute (func, args, exec_msg, level) # Otherwise, print the "skip" message diff --git a/dist.py b/dist.py index 7246b74001..cb18031470 100644 --- a/dist.py +++ b/dist.py @@ -52,8 +52,6 @@ class Distribution: "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), - ('force', 'f', - "skip dependency checking between files"), ('help', 'h', "show this help message"), ] @@ -76,7 +74,6 @@ def __init__ (self, attrs=None): # Default values for our command-line options self.verbose = 1 self.dry_run = 0 - self.force = 0 self.help = 0 self.help_commands = 0 From 5f99c51af634e6d53353955add8bda432fa2d9ad Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 00:19:42 +0000 Subject: [PATCH 0265/8469] Added '--force' option -- very clear what it means for building (ignore timestamps), so every build_* command has 'self.force', which follows the 'build' command if not set by the user. --- command/build.py | 5 +++++ command/build_clib.py | 6 +++++- command/build_ext.py | 6 +++++- command/build_py.py | 7 ++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/command/build.py b/command/build.py index 2da589ab29..bca0ece808 100644 --- a/command/build.py +++ b/command/build.py @@ -28,6 +28,8 @@ class build (Command): "temporary build directory"), ('debug', 'g', "compile extensions and libraries with debugging information"), + ('force', 'f', + "forcibly build everything (ignore file timestamps"), ] def initialize_options (self): @@ -39,9 +41,12 @@ def initialize_options (self): self.build_lib = None self.build_temp = None self.debug = None + self.force = 0 def finalize_options (self): + print "build.finalize: force=%s" % self.force + # Need this to name platform-specific directories, but sys.platform # is not enough -- it only names the OS and version, not the # hardware architecture! diff --git a/command/build_clib.py b/command/build_clib.py index f48e6476fb..2311187484 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -37,6 +37,8 @@ class build_clib (Command): "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), + ('force', 'f', + "forcibly build everything (ignore file timestamps"), ] def initialize_options (self): @@ -51,6 +53,7 @@ def initialize_options (self): self.define = None self.undef = None self.debug = None + self.force = 0 # initialize_options() @@ -65,7 +68,8 @@ def finalize_options (self): self.set_undefined_options ('build', ('build_temp', 'build_clib'), ('build_temp', 'build_temp'), - ('debug', 'debug')) + ('debug', 'debug'), + ('force', 'force')) self.libraries = self.distribution.libraries if self.libraries: diff --git a/command/build_ext.py b/command/build_ext.py index 2cb1c610f0..ddb01d4ef2 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -66,6 +66,8 @@ class build_ext (Command): "extra explicit link objects to include in the link"), ('debug', 'g', "compile/link with debugging information"), + ('force', 'f', + "forcibly build everything (ignore file timestamps"), ] @@ -84,6 +86,7 @@ def initialize_options (self): self.rpath = None self.link_objects = None self.debug = None + self.force = None def finalize_options (self): @@ -92,7 +95,8 @@ def finalize_options (self): self.set_undefined_options ('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), - ('debug', 'debug')) + ('debug', 'debug'), + ('force', 'force')) if self.package is None: self.package = self.distribution.ext_package diff --git a/command/build_py.py b/command/build_py.py index 3baddc62c7..d719cec8d9 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -20,6 +20,7 @@ class build_py (Command): user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), + ('force', 'f', "forcibly build everything (ignore file timestamps"), ] @@ -28,10 +29,14 @@ def initialize_options (self): self.modules = None self.package = None self.package_dir = None + self.force = None def finalize_options (self): + print "build_py.finalize: force=%s" % self.force self.set_undefined_options ('build', - ('build_lib', 'build_lib')) + ('build_lib', 'build_lib'), + ('force', 'force')) + print "build_py.finalize: force=%s" % self.force # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. From b3602e53092a10f2c8fd167c7621150b6c71249a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 01:15:06 +0000 Subject: [PATCH 0266/8469] Better variable names here and there. --- sysconfig.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 2c7318c04d..9cf9540db3 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -16,8 +16,8 @@ from errors import DistutilsPlatformError -prefix = os.path.normpath(sys.prefix) -exec_prefix = os.path.normpath(sys.exec_prefix) +PREFIX = os.path.normpath(sys.prefix) +EXEC_PREFIX = os.path.normpath(sys.exec_prefix) def get_python_inc(plat_specific=0): @@ -29,13 +29,13 @@ def get_python_inc(plat_specific=0): (namely config.h). """ - the_prefix = (plat_specific and exec_prefix or prefix) + prefix = (plat_specific and EXEC_PREFIX or PREFIX) if os.name == "posix": - return os.path.join(the_prefix, "include", "python" + sys.version[:3]) + return os.path.join(prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": - return os.path.join(the_prefix, "Include") # include or Include? + return os.path.join(prefix, "Include") # include or Include? elif os.name == "mac": - return os.path.join(the_prefix, "Include") + return os.path.join(prefix, "Include") else: raise DistutilsPlatformError, \ ("I don't know where Python installs its C header files " + @@ -54,10 +54,10 @@ def get_python_lib(plat_specific=0, standard_lib=0): directory for site-specific modules. """ - the_prefix = (plat_specific and exec_prefix or prefix) + prefix = (plat_specific and EXEC_PREFIX or PREFIX) if os.name == "posix": - libpython = os.path.join(the_prefix, + libpython = os.path.join(prefix, "lib", "python" + sys.version[:3]) if standard_lib: return libpython @@ -66,20 +66,20 @@ def get_python_lib(plat_specific=0, standard_lib=0): elif os.name == "nt": if standard_lib: - return os.path.join(the_prefix, "Lib") + return os.path.join(PREFIX, "Lib") else: - return the_prefix + return prefix elif os.name == "mac": if platform_specific: if standard_lib: - return os.path.join(exec_prefix, "Mac", "Plugins") + return os.path.join(EXEC_PREFIX, "Mac", "Plugins") else: raise DistutilsPlatformError, \ "OK, where DO site-specific extensions go on the Mac?" else: if standard_lib: - return os.path.join(prefix, "Lib") + return os.path.join(PREFIX, "Lib") else: raise DistutilsPlatformError, \ "OK, where DO site-specific modules go on the Mac?" @@ -226,7 +226,7 @@ def _init_nt(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' - g['exec_prefix'] = exec_prefix + g['exec_prefix'] = EXEC_PREFIX def _init_mac(): @@ -235,7 +235,7 @@ def _init_mac(): # load the installed config.h (what if not installed? - still need to # be able to install packages which don't require compilation) parse_config_h(open( - os.path.join(sys.exec_prefix, "Mac", "Include", "config.h")), g) + os.path.join(EXEC_PREFIX, "Mac", "Include", "config.h")), g) # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) @@ -244,12 +244,12 @@ def _init_mac(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.ppc.slb' - g['exec_prefix'] = sys.exec_prefix - print sys.prefix + g['exec_prefix'] = EXEC_PREFIX + print sys.prefix, PREFIX # XXX are these used anywhere? - g['install_lib'] = os.path.join(sys.exec_prefix, "Lib") - g['install_platlib'] = os.path.join(sys.exec_prefix, "Mac", "Lib") + g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") + g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") try: From 82199403a5964745b104e69851f05de78387c2e5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 01:17:49 +0000 Subject: [PATCH 0267/8469] Added optional 'prefix' arguments to 'get_python_inc()' and 'get_python_lib()'. --- sysconfig.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 9cf9540db3..3f345fbd12 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -20,7 +20,7 @@ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -def get_python_inc(plat_specific=0): +def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the @@ -28,8 +28,11 @@ def get_python_inc(plat_specific=0): otherwise, this is the path to platform-specific header files (namely config.h). + If 'prefix' is supplied, use it instead of sys.prefix or + sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - prefix = (plat_specific and EXEC_PREFIX or PREFIX) + if prefix is None: + prefix = (plat_specific and EXEC_PREFIX or PREFIX) if os.name == "posix": return os.path.join(prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": @@ -42,7 +45,7 @@ def get_python_inc(plat_specific=0): "on platform '%s'") % os.name -def get_python_lib(plat_specific=0, standard_lib=0): +def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): """Return the directory containing the Python library (standard or site additions). @@ -53,8 +56,11 @@ def get_python_lib(plat_specific=0, standard_lib=0): containing standard Python library modules; otherwise, return the directory for site-specific modules. + If 'prefix' is supplied, use it instead of sys.prefix or + sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - prefix = (plat_specific and EXEC_PREFIX or PREFIX) + if prefix is None: + prefix = (plat_specific and EXEC_PREFIX or PREFIX) if os.name == "posix": libpython = os.path.join(prefix, From 888eb4fbd70664a685df5f61ea3e4acb4fb738ca Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 01:30:44 +0000 Subject: [PATCH 0268/8469] Added a check for the 'force' attribute in '__getattr__()' -- better than crashing when self.force not defined. Revise 'copy_file()' and 'copy_tree()' docstrings accordingly. Remove 'hasattr()' check for 'self.force' from 'make_file()'. --- cmd.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cmd.py b/cmd.py index 76a76919cd..16008c4fd0 100644 --- a/cmd.py +++ b/cmd.py @@ -79,6 +79,11 @@ def __getattr__ (self, attr): return getattr (self.distribution, attr) else: return myval + + # Needed because some Command methods assume 'self.force' exists, + # but not all commands define 'self.force'. Ugh. + elif attr == 'force': + return None else: raise AttributeError, attr @@ -307,8 +312,9 @@ def mkpath (self, name, mode=0777): def copy_file (self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): - """Copy a file respecting verbose, dry-run and force flags (this - should only be used by commands that define 'self.force'!).""" + """Copy a file respecting verbose, dry-run and force flags. (The + former two default to whatever is in the Distribution object, and + the latter defaults to false for commands that don't define it.)""" return util.copy_file (infile, outfile, preserve_mode, preserve_times, @@ -322,8 +328,7 @@ def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, - and force flags (again, should only be used by commands - that define 'self.force').""" + and force flags.""" return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, @@ -381,8 +386,7 @@ def make_file (self, infiles, outfile, func, args, # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if ((hasattr(self,'force') and self.force) or - util.newer_group (infiles, outfile)): + if self.force or util.newer_group (infiles, outfile): self.execute (func, args, exec_msg, level) # Otherwise, print the "skip" message From fa60eae5bb33a7b14d744cf26b0c0565e727db8a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 01:31:58 +0000 Subject: [PATCH 0269/8469] Delete some debugging print statements. --- command/build.py | 2 -- command/build_py.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/command/build.py b/command/build.py index bca0ece808..7fb0b56657 100644 --- a/command/build.py +++ b/command/build.py @@ -45,8 +45,6 @@ def initialize_options (self): def finalize_options (self): - print "build.finalize: force=%s" % self.force - # Need this to name platform-specific directories, but sys.platform # is not enough -- it only names the OS and version, not the # hardware architecture! diff --git a/command/build_py.py b/command/build_py.py index d719cec8d9..2a1fdd62c9 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -32,11 +32,9 @@ def initialize_options (self): self.force = None def finalize_options (self): - print "build_py.finalize: force=%s" % self.force self.set_undefined_options ('build', ('build_lib', 'build_lib'), ('force', 'force')) - print "build_py.finalize: force=%s" % self.force # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. From a37b56ceefcc8d1b790a3c4061251b11daf1d26f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 10 Apr 2000 13:11:51 +0000 Subject: [PATCH 0270/8469] Define 'self.force' in the constructor and remove the hack in '__getattr__()' to account for it not being defined in the constructor. --- cmd.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd.py b/cmd.py index 16008c4fd0..b3d16648d0 100644 --- a/cmd.py +++ b/cmd.py @@ -59,6 +59,12 @@ def __init__ (self, dist): self._verbose = None self._dry_run = None + # Some commands define a 'self.force' option to ignore file + # timestamps, but methods defined *here* assume that + # 'self.force' exists for all commands. So define it here + # just to be safe. + self.force = None + # The 'help' flag is just used for command-line parsing, so # none of that complicated bureaucracy is needed. self.help = 0 @@ -79,11 +85,6 @@ def __getattr__ (self, attr): return getattr (self.distribution, attr) else: return myval - - # Needed because some Command methods assume 'self.force' exists, - # but not all commands define 'self.force'. Ugh. - elif attr == 'force': - return None else: raise AttributeError, attr From b40196ff52fb4a503022ee6e91b53ad5ec9c7317 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 14 Apr 2000 00:39:31 +0000 Subject: [PATCH 0271/8469] Don't bother reading config.h on NT or Mac OS. (It's not really needed on Unix either, so should probably disappear entirely.) --- sysconfig.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 3f345fbd12..f7c2e78326 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -222,8 +222,6 @@ def _init_posix(): def _init_nt(): """Initialize the module as appropriate for NT""" g = globals() - # load config.h, though I don't know how useful this is - parse_config_h(open(get_config_h_filename()), g) # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) @@ -238,10 +236,6 @@ def _init_nt(): def _init_mac(): """Initialize the module as appropriate for Macintosh systems""" g = globals() - # load the installed config.h (what if not installed? - still need to - # be able to install packages which don't require compilation) - parse_config_h(open( - os.path.join(EXEC_PREFIX, "Mac", "Include", "config.h")), g) # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) From 0a8038198900ef7afaafc5e7c4a5b0fa584cf823 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 14 Apr 2000 00:48:15 +0000 Subject: [PATCH 0272/8469] Cleaned up use of sysconfig module a bit: don't import more names than we actually use, and do actually use AR and SO. Run ranlib on static libraries. (Should probably have a platform-check so we don't run ranlib when it's not necessary, ie. on most modern Unices.) --- unixccompiler.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index ec766f5405..0944461b9a 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -20,8 +20,7 @@ import string, re, os from types import * from copy import copy -from distutils.sysconfig import \ - CC, CCSHARED, CFLAGS, OPT, LDSHARED, LDFLAGS, RANLIB, AR, SO +from distutils import sysconfig from distutils.ccompiler import CCompiler, gen_preprocess_options, gen_lib_options # XXX Things not currently handled: @@ -59,14 +58,15 @@ class UnixCCompiler (CCompiler): src_extensions = [".c",".C",".cc",".cxx",".cpp"] obj_extension = ".o" static_lib_extension = ".a" - shared_lib_extension = ".so" + shared_lib_extension = sysconfig.SO static_lib_format = shared_lib_format = "lib%s%s" # Command to create a static library: seems to be pretty consistent # across the major Unices. Might have to move down into the # constructor if we need platform-specific guesswork. - archiver = "ar" + archiver = sysconfig.AR archiver_options = "-cr" + ranlib = sysconfig.RANLIB def __init__ (self, @@ -90,11 +90,11 @@ def __init__ (self, # UnixCCompiler! (self.cc, self.ccflags) = \ - _split_command (CC + ' ' + OPT) - self.ccflags_shared = string.split (CCSHARED) + _split_command (sysconfig.CC + ' ' + sysconfig.OPT) + self.ccflags_shared = string.split (sysconfig.CCSHARED) (self.ld_shared, self.ldflags_shared) = \ - _split_command (LDSHARED) + _split_command (sysconfig.LDSHARED) self.ld_exec = self.cc @@ -157,6 +157,12 @@ def create_static_lib (self, self.archiver_options, output_filename] + objects + self.objects) + + # Not many Unices required ranlib anymore -- SunOS 4.x is, + # I think the only major Unix that does. Probably should + # have some platform intelligence here to skip ranlib if + # it's not needed. + self.spawn ([self.ranlib, output_filename]) else: self.announce ("skipping %s (up-to-date)" % output_filename) From a213af0d45d592238ea3d6e56beca78271100d20 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 14 Apr 2000 00:49:30 +0000 Subject: [PATCH 0273/8469] Coerce all paths in the manifest template to the local path syntax with 'native_path()'. --- command/sdist.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 349a824afd..f3cc041e7d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -12,7 +12,7 @@ from glob import glob from distutils.core import Command from distutils.util import \ - newer, remove_tree, make_tarball, make_zipfile, create_tree + newer, create_tree, remove_tree, make_tarball, make_zipfile, native_path from distutils.text_file import TextFile from distutils.errors import DistutilsExecError @@ -317,7 +317,7 @@ def read_template (self): action) continue - pattern = words[1] + pattern = native_path (words[1]) elif action in ('recursive-include','recursive-exclude'): if len (words) != 3: @@ -327,7 +327,7 @@ def read_template (self): action) continue - (dir, pattern) = words[1:3] + (dir, pattern) = map (native_path, words[1:3]) elif action in ('graft','prune'): if len (words) != 2: @@ -337,7 +337,7 @@ def read_template (self): action) continue - dir_pattern = words[1] + dir_pattern = native_path (words[1]) else: template.warn ("invalid manifest template line: " + @@ -347,9 +347,9 @@ def read_template (self): # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we # can proceed with minimal error-checking. Also, we have - # defined either 'patter', 'dir' and 'pattern', or - # 'dir_pattern' -- so we don't have to spend any time digging - # stuff up out of 'words'. + # defined either (pattern), (dir and pattern), or + # (dir_pattern) -- so we don't have to spend any time + # digging stuff up out of 'words'. if action == 'include': print "include", pattern From 860fb8e70fb18c06ef9e82438fa2b5af33f926c0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 14 Apr 2000 00:50:49 +0000 Subject: [PATCH 0274/8469] Use 'get_python_inc()' to figure out the Python include directories rather than cobbling them togethere here. --- command/build_ext.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index ddb01d4ef2..f08c97e9e7 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -105,12 +105,9 @@ def finalize_options (self): # Make sure Python's include directories (for Python.h, config.h, - # etc.) are in the include search path. We have to roll our own - # "exec include dir", because the Makefile parsed by sysconfig - # doesn't have it (sigh). - py_include = sysconfig.INCLUDEPY # prefix + "include" + "python" + ver - exec_py_include = os.path.join (sysconfig.exec_prefix, 'include', - 'python' + sys.version[0:3]) + # etc.) are in the include search path. + py_include = sysconfig.get_python_inc() + plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type (self.include_dirs) is StringType: @@ -120,8 +117,8 @@ def finalize_options (self): # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. self.include_dirs.append (py_include) - if exec_py_include != py_include: - self.include_dirs.insert (0, exec_py_include) + if plat_py_include != py_include: + self.include_dirs.append (plat_py_include) if type (self.libraries) is StringType: self.libraries = [self.libraries] From cde4940c51df0bc44586a948ba99d32218cbc75d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 14 Apr 2000 13:53:34 +0000 Subject: [PATCH 0275/8469] Don't run "ranlib" if sysconfig's RANLIB (from Python's Makefile) starts with ":". --- unixccompiler.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 0944461b9a..5e1524c67c 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -158,11 +158,13 @@ def create_static_lib (self, output_filename] + objects + self.objects) - # Not many Unices required ranlib anymore -- SunOS 4.x is, - # I think the only major Unix that does. Probably should - # have some platform intelligence here to skip ranlib if - # it's not needed. - self.spawn ([self.ranlib, output_filename]) + # Not many Unices required ranlib anymore -- SunOS 4.x is, I + # think the only major Unix that does. Maybe we need some + # platform intelligence here to skip ranlib if it's not + # needed -- or maybe Python's configure script took care of + # it for us, hence the check for leading colon. + if self.ranlib[0] != ':': + self.spawn ([self.ranlib, output_filename]) else: self.announce ("skipping %s (up-to-date)" % output_filename) From 046fbde66e644516ce1dbe2b4decbc2348b0a137 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 15 Apr 2000 22:15:07 +0000 Subject: [PATCH 0276/8469] Cleaned up/simplified error-handling: - DistutilsOptionError is now documented as it's actually used, ie. to indicate bogus option values (usually user options, eg. from the command-line) - added DistutilsSetupError to indicate errors that definitely arise in the setup script - got rid of DistutilsValueError, and changed all usage of it to either DistutilsSetupError or ValueError as appropriate - simplified a bunch of option get/set methods in Command and Distribution classes -- just pass on AttributeError most of the time, rather than turning it into something else --- cmd.py | 42 ++++++++++++++---------------------------- command/build_clib.py | 14 +++++++------- command/build_ext.py | 12 ++++++------ dist.py | 36 +++++++++--------------------------- errors.py | 16 +++++++++------- msvccompiler.py | 3 +++ util.py | 8 ++++---- 7 files changed, 52 insertions(+), 79 deletions(-) diff --git a/cmd.py b/cmd.py index b3d16648d0..d8e413798e 100644 --- a/cmd.py +++ b/cmd.py @@ -161,38 +161,28 @@ def announce (self, msg, level=1): def get_option (self, option): """Return the value of a single option for this command. Raise - DistutilsOptionError if 'option' is not known.""" - try: - return getattr (self, option) - except AttributeError: - raise DistutilsOptionError, \ - "command %s: no such option %s" % \ - (self.get_command_name(), option) + AttributeError if 'option' is not known.""" + return getattr (self, option) def get_options (self, *options): """Return (as a tuple) the values of several options for this - command. Raise DistutilsOptionError if any of the options in + command. Raise AttributeError if any of the options in 'options' are not known.""" values = [] - try: - for opt in options: - values.append (getattr (self, opt)) - except AttributeError, name: - raise DistutilsOptionError, \ - "command %s: no such option %s" % \ - (self.get_command_name(), name) - + for opt in options: + values.append (getattr (self, opt)) + return tuple (values) - + def set_option (self, option, value): """Set the value of a single option for this command. Raise - DistutilsOptionError if 'option' is not known.""" + AttributeError if 'option' is not known.""" if not hasattr (self, option): - raise DistutilsOptionError, \ + raise AttributeError, \ "command '%s': no such option '%s'" % \ (self.get_command_name(), option) if value is not None: @@ -200,7 +190,7 @@ def set_option (self, option, value): def set_options (self, **optval): """Set the values of several options for this command. Raise - DistutilsOptionError if any of the options specified as + AttributeError if any of the options specified as keyword arguments are not known.""" for k in optval.keys(): @@ -236,14 +226,10 @@ def set_undefined_options (self, src_cmd, *option_pairs): src_cmd_obj = self.distribution.find_command_obj (src_cmd) src_cmd_obj.ensure_ready () - try: - for (src_option, dst_option) in option_pairs: - if getattr (self, dst_option) is None: - self.set_option (dst_option, - src_cmd_obj.get_option (src_option)) - except AttributeError, name: - # duh, which command? - raise DistutilsOptionError, "unknown option %s" % name + for (src_option, dst_option) in option_pairs: + if getattr (self, dst_option) is None: + self.set_option (dst_option, + src_cmd_obj.get_option (src_option)) def find_peer (self, command, create=1): diff --git a/command/build_clib.py b/command/build_clib.py index 2311187484..31170730e6 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -115,33 +115,33 @@ def check_library_list (self, libraries): """Ensure that the list of libraries (presumably provided as a command option 'libraries') is valid, i.e. it is a list of 2-tuples, where the tuples are (library_name, build_info_dict). - Raise DistutilsValueError if the structure is invalid anywhere; + Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise.""" # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, # with only names changed to protect the innocent! if type (libraries) is not ListType: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "'libraries' option must be a list of tuples" for lib in libraries: if type (lib) is not TupleType and len (lib) != 2: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "each element of 'libraries' must a 2-tuple" if type (lib[0]) is not StringType: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): - raise DistutilsValueError, \ + raise DistutilsSetupError, \ ("bad library name '%s': " + "may not contain directory separators") % \ lib[0] if type (lib[1]) is not DictionaryType: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "second element of each tuple in 'libraries' " + \ "must be a dictionary (build info)" # for lib @@ -171,7 +171,7 @@ def build_libraries (self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get ('sources') if sources is None or type (sources) not in (ListType, TupleType): - raise DistutilsValueError, \ + raise DistutilsSetupError, \ ("in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % lib_name diff --git a/command/build_ext.py b/command/build_ext.py index f08c97e9e7..422b8cae1f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -205,26 +205,26 @@ def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of 2-tuples, where the tuples are (extension_name, build_info_dict). - Raise DistutilsValueError if the structure is invalid anywhere; + Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise.""" if type (extensions) is not ListType: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "'ext_modules' option must be a list of tuples" for ext in extensions: if type (ext) is not TupleType and len (ext) != 2: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "each element of 'ext_modules' option must be a 2-tuple" if not (type (ext[0]) is StringType and extension_name_re.match (ext[0])): - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "first element of each tuple in 'ext_modules' " + \ "must be the extension name (a string)" if type (ext[1]) is not DictionaryType: - raise DistutilsValueError, \ + raise DistutilsSetupError, \ "second element of each tuple in 'ext_modules' " + \ "must be a dictionary (build info)" @@ -274,7 +274,7 @@ def build_extensions (self): for (extension_name, build_info) in self.extensions: sources = build_info.get ('sources') if sources is None or type (sources) not in (ListType, TupleType): - raise DistutilsValueError, \ + raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % extension_name diff --git a/dist.py b/dist.py index cb18031470..408b9f5c50 100644 --- a/dist.py +++ b/dist.py @@ -152,7 +152,7 @@ def __init__ (self, attrs=None): if hasattr (self, key): setattr (self, key, val) else: - raise DistutilsOptionError, \ + raise DistutilsSetupError, \ "invalid distribution option '%s'" % key # __init__ () @@ -447,27 +447,18 @@ def run_commands (self): def get_option (self, option): """Return the value of a distribution option. Raise - DistutilsOptionError if 'option' is not known.""" - - try: - return getattr (self, opt) - except AttributeError: - raise DistutilsOptionError, \ - "unknown distribution option %s" % option + AttributeError if 'option' is not known.""" + return getattr (self, opt) def get_options (self, *options): """Return (as a tuple) the values of several distribution - options. Raise DistutilsOptionError if any element of + options. Raise AttributeError if any element of 'options' is not known.""" values = [] - try: - for opt in options: - values.append (getattr (self, opt)) - except AttributeError, name: - raise DistutilsOptionError, \ - "unknown distribution option %s" % name + for opt in options: + values.append (getattr (self, opt)) return tuple (values) @@ -498,17 +489,12 @@ def run_command (self, command): def get_command_option (self, command, option): """Create a command object for 'command' if necessary, ensure that its option values are all set to their final values, and return - the value of its 'option' option. Raise DistutilsOptionError if + the value of its 'option' option. Raise AttributeError if 'option' is not known for that 'command'.""" cmd_obj = self.find_command_obj (command) cmd_obj.ensure_ready () return cmd_obj.get_option (option) - try: - return getattr (cmd_obj, option) - except AttributeError: - raise DistutilsOptionError, \ - "command %s: no such option %s" % (command, option) def get_command_options (self, command, *options): @@ -521,12 +507,8 @@ def get_command_options (self, command, *options): cmd_obj = self.find_command_obj (command) cmd_obj.ensure_ready () values = [] - try: - for opt in options: - values.append (getattr (cmd_obj, option)) - except AttributeError, name: - raise DistutilsOptionError, \ - "command %s: no such option %s" % (command, name) + for opt in options: + values.append (getattr (cmd_obj, option)) return tuple (values) diff --git a/errors.py b/errors.py index f9d5c8de5a..61cdb72c2a 100644 --- a/errors.py +++ b/errors.py @@ -46,15 +46,18 @@ class DistutilsArgError (DistutilsError): class DistutilsFileError (DistutilsError): pass - # DistutilsOptionError is raised anytime an attempt is made to access - # (get or set) an option that does not exist for a particular command - # (or for the distribution itself). + # DistutilsOptionError is raised for syntactic/semantic errors in + # command options, such as use of mutually conflicting options, or + # inconsistent options, badly-spelled values, etc. No distinction is + # made between option values originating in the setup script, the + # command line, config files, or what-have-you. class DistutilsOptionError (DistutilsError): pass - # DistutilsValueError is raised anytime an option value (presumably - # provided by setup.py) is invalid. - class DistutilsValueError (DistutilsError): + # DistutilsSetupError is raised for errors that can be definitely + # blamed on the setup script, such as invalid keyword arguments to + # 'setup()'. + class DistutilsSetupError (DistutilsError): pass # DistutilsPlatformError is raised when we find that we don't @@ -82,7 +85,6 @@ class DistutilsInternalError (DistutilsError): DistutilsArgError = 'DistutilsArgError' DistutilsFileError = 'DistutilsFileError' DistutilsOptionError = 'DistutilsOptionError' - DistutilsValueError = 'DistutilsValueError' DistutilsPlatformError = 'DistutilsPlatformError' DistutilsExecError = 'DistutilsExecError' DistutilsInternalError = 'DistutilsInternalError' diff --git a/msvccompiler.py b/msvccompiler.py index 43a8596085..c7a69c3594 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -360,6 +360,9 @@ def link_shared_object (self, if extra_postargs: ld_args.extend (extra_postargs) + print "link_shared_object():" + print " output_filename =", output_filename + print " mkpath'ing:", os.path.dirname (output_filename) self.mkpath (os.path.dirname (output_filename)) self.spawn ([self.link] + ld_args) diff --git a/util.py b/util.py index ddcf0d2862..be3a1d6e0f 100644 --- a/util.py +++ b/util.py @@ -40,16 +40,16 @@ def native_path (pathname): using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local convention before we can actually use them in - the filesystem. Raises DistutilsValueError if 'pathname' is + the filesystem. Raises ValueError if 'pathname' is absolute (starts with '/') or contains local directory separators (unless the local separator is '/', of course).""" if pathname[0] == '/': - raise DistutilsValueError, "path '%s' cannot be absolute" % pathname + raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': - raise DistutilsValueError, "path '%s' cannot end with '/'" % pathname + raise ValueError, "path '%s' cannot end with '/'" % pathname if os.sep != '/' and os.sep in pathname: - raise DistutilsValueError, \ + raise ValueError, \ "path '%s' cannot contain '%c' character" % \ (pathname, os.sep) From 30e154ec0f2489c3376e6cfc371e25a26a1fed70 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 15 Apr 2000 22:23:47 +0000 Subject: [PATCH 0277/8469] Reformatted all exception documentation as docstrings. --- errors.py | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/errors.py b/errors.py index 61cdb72c2a..d66043a1fe 100644 --- a/errors.py +++ b/errors.py @@ -16,64 +16,65 @@ if type (RuntimeError) is types.ClassType: - # DistutilsError is the root of all Distutils evil. class DistutilsError (Exception): + """The root of all Distutils evil.""" pass - # DistutilsModuleError is raised if we are unable to load an expected - # module, or find an expected class within some module class DistutilsModuleError (DistutilsError): + """Unable to load an expected module, or to find an expected class + within some module (in particular, command modules and classes).""" pass - # DistutilsClassError is raised if we encounter a distribution or command - # class that's not holding up its end of the bargain. class DistutilsClassError (DistutilsError): + """Some command class (or possibly distribution class, if anyone + feels a need to subclass Distribution) is found not to be holding + up its end of the bargain, ie. implementing some part of the + "command "interface.""" pass - # DistutilsGetoptError (help me -- I have JavaProgrammersDisease!) is - # raised if the option table provided to fancy_getopt is bogus. class DistutilsGetoptError (DistutilsError): + """The option table provided to 'fancy_getopt()' is bogus.""" pass - # DistutilsArgError is raised by fancy_getopt in response to getopt.error; - # distutils.core then turns around and raises SystemExit from that. (Thus - # client code should never see DistutilsArgError.) class DistutilsArgError (DistutilsError): + """Raised by fancy_getopt in response to getopt.error -- ie. an + error in the command line usage.""" pass - # DistutilsFileError is raised for any problems in the filesystem: - # expected file not found, etc. class DistutilsFileError (DistutilsError): + """Any problems in the filesystem: expected file not found, etc. + Typically this is for problems that we detect before IOError or + OSError could be raised.""" pass - # DistutilsOptionError is raised for syntactic/semantic errors in - # command options, such as use of mutually conflicting options, or - # inconsistent options, badly-spelled values, etc. No distinction is - # made between option values originating in the setup script, the - # command line, config files, or what-have-you. class DistutilsOptionError (DistutilsError): + """Syntactic/semantic errors in command options, such as use of + mutually conflicting options, or inconsistent options, + badly-spelled values, etc. No distinction is made between option + values originating in the setup script, the command line, config + files, or what-have-you -- but if we *know* something originated in + the setup script, we'll raise DistutilsSetupError instead.""" pass - # DistutilsSetupError is raised for errors that can be definitely - # blamed on the setup script, such as invalid keyword arguments to - # 'setup()'. class DistutilsSetupError (DistutilsError): + """For errors that can be definitely blamed on the setup script, + such as invalid keyword arguments to 'setup()'.""" pass - # DistutilsPlatformError is raised when we find that we don't - # know how to do something on the current platform (but we do - # know how to do it on some platform). class DistutilsPlatformError (DistutilsError): + """We don't know how to do something on the current platform (but + we do know how to do it on some platform) -- eg. trying to compile + C files on a platform not supported by a CCompiler subclass.""" pass - # DistutilsExecError is raised if there are any problems executing - # an external program class DistutilsExecError (DistutilsError): + """Any problems executing an external program (such as the C + compiler, when compiling C files).""" pass - # DistutilsInternalError is raised on internal inconsistencies - # or impossibilities class DistutilsInternalError (DistutilsError): + """Internal inconsistencies or impossibilities (obviously, this + should never be seen if the code is working!).""" pass # String-based exceptions From 02d779e3f493d0fe4faebc32f4dfc9636b0de179 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 19 Apr 2000 02:16:49 +0000 Subject: [PATCH 0278/8469] Added 'link_executable()' method (Berthold Hoellmann). Two small fixes to 'link_shared_object()'. --- msvccompiler.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index c7a69c3594..3667afcd2d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -333,15 +333,13 @@ def link_shared_object (self, (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) - if self.runtime_library_dirs: + if runtime_library_dirs: self.warn ("I don't know what to do with 'runtime_library_dirs': " + str (runtime_library_dirs)) lib_opts = gen_lib_options (self, library_dirs, runtime_library_dirs, libraries) - if type (output_dir) not in (StringType, NoneType): - raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -370,6 +368,53 @@ def link_shared_object (self, self.announce ("skipping %s (up-to-date)" % output_filename) # link_shared_object () + + + def link_executable (self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options (self, + library_dirs, runtime_library_dirs, + libraries) + output_filename = output_progname + self.exe_extension + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + if self._need_link (objects, output_filename): + + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + + ld_args = ldflags + lib_opts + \ + objects + ['/OUT:' + output_filename] + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) + + self.mkpath (os.path.dirname (output_filename)) + self.spawn ([self.link] + ld_args) + else: + self.announce ("skipping %s (up-to-date)" % output_filename) # -- Miscellaneous methods ----------------------------------------- From 32b92081ec16b3958ef792eff9e6588dcdff9e8c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 19 Apr 2000 02:18:09 +0000 Subject: [PATCH 0279/8469] Don't load the config.h file, even under Unix, because we never use the information from config.h. Code is still there in case someone in the future needs to parse an autoconf-generated config.h file. --- sysconfig.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index f7c2e78326..c6341c105d 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -213,8 +213,6 @@ def parse_makefile(fp, g=None): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = globals() - # load the installed config.h: - parse_config_h(open(get_config_h_filename()), g) # load the installed Makefile: parse_makefile(open(get_makefile_filename()), g) From 1822bd769bbf61b61f469351555b24c6765f08a9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 19 Apr 2000 02:22:07 +0000 Subject: [PATCH 0280/8469] Added kludge to deal with the "./ld_so_aix" problem: force all strings in the Makefile that start with "./" to be absolute paths (with the implied root being the directory where the Makefile itself was found). --- sysconfig.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index c6341c105d..5cc71dc0ba 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -205,6 +205,21 @@ def parse_makefile(fp, g=None): # bogus variable reference; just drop it since we can't deal del notdone[name] + # "Fix" all pathnames in the Makefile that are explicitly relative, + # ie. that start with "./". This is a kludge to fix the "./ld_so_aix" + # problem, the nature of which is that Python's installed Makefile + # refers to "./ld_so_aix", but when we are building extensions we are + # far from the directory where Python's Makefile (and ld_so_aix, for + # that matter) is installed. Unfortunately, there are several other + # relative pathnames in the Makefile, and this fix doesn't fix them, + # because the layout of Python's source tree -- which is what the + # Makefile refers to -- is not fully preserved in the Python + # installation. Grumble. + from os.path import normpath, join, dirname + for (name, value) in done.items(): + if value[0:2] == "./": + done[name] = normpath(join(dirname(fp.name), value)) + # save the results in the global dictionary g.update(done) return g From 4b2a001255107048e4117ac88b0a3d1aa371fd47 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 19 Apr 2000 02:23:21 +0000 Subject: [PATCH 0281/8469] Bumped version to 0.8.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9305554999..5b8a662888 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.8" +__version__ = "0.8.1" From 8b97bc929e1390ec9ad9998d10c173923b0b91a0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 01:41:54 +0000 Subject: [PATCH 0282/8469] Hefty refactoring: converted 'fancy_getopt()' function into FancyGetopt class. (Mainly this was to support the ability to go back after the getopt operation is done and get extra information about the parse, in particular the original order of options seen on the command line. But it's a big improvement and should make it a lot easier to add functionality in the future.) --- fancy_getopt.py | 281 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 266 insertions(+), 15 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 3110ab30db..94e654e896 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -27,11 +27,244 @@ # For recognizing "negative alias" options, eg. "quiet=!verbose" neg_alias_re = re.compile ("^(%s)=!(%s)$" % (longopt_pat, longopt_pat)) - # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). longopt_xlate = string.maketrans ('-', '_') +# This records (option, value) pairs in the order seen on the command line; +# it's close to what getopt.getopt() returns, but with short options +# expanded. (Ugh, this module should be OO-ified.) +_option_order = None + + +class FancyGetopt: + """Wrapper around the standard 'getopt()' module that provides some + handy extra functionality: + * short and long options are tied together + * options have help strings, and help text can be assembled + from them + * options set attributes of a passed-in object + * boolean options can have "negative aliases" -- eg. if + --quiet is the "negative alias" of --verbose, then "--quiet" + on the command line sets 'verbose' to false + """ + + def __init__ (self, option_table=None): + + # The option table is (currently) a list of 3-tuples: + # (long_option, short_option, help_string) + # if an option takes an argument, its long_option should have '=' + # appended; short_option should just be a single character, no ':' + # in any case. If a long_option doesn't have a corresponding + # short_option, short_option should be None. All option tuples + # must have long options. + self.option_table = option_table + + # 'option_index' maps long option names to entries in the option + # table (ie. those 3-tuples). + self.option_index = {} + if self.option_table: + self.build_index() + + # 'negative_alias' keeps track of options that are the boolean + # opposite of some other option + self.negative_alias = {} + + # These keep track of the information in the option table. We + # don't actually populate these structures until we're ready to + # parse the command-line, since the 'option_table' passed in here + # isn't necessarily the final word. + self.short_opts = [] + self.long_opts = [] + self.short2long = {} + self.attr_name = {} + self.takes_arg = {} + + # And 'option_order' is filled up in 'getopt()'; it records the + # original order of options (and their values) on the command-line, + # but expands short options, converts aliases, etc. + self.option_order = [] + + # __init__ () + + + def build_index (self): + for option in self.option_table: + self.option_index[option[0]] = option + + def add_option (self, long_option, short_option=None, help_string=None): + if self.option_index.has_key(long_option): + raise DistutilsGetoptError, \ + "option conflict: already an option '%s'" % long_option + else: + option = (long_option, short_option, help_string) + self.option_table.append (option) + self.option_index[long_option] = option + + def set_negative_aliases (self, negative_alias): + """Set the negative aliases for this option parser. + 'negative_alias' should be a dictionary mapping option names to + option names, both the key and value must already be defined + in the option table.""" + + assert type(negative_alias) is DictionaryType + for (negopt, opt) in negative_alias.items(): + if not self.option_index.has_key(negopt): + raise DistutilsGetoptError, \ + ("invalid negative alias '%s': " + "option '%s' not defined") % (negopt, negopt) + if not self.option_index.has_key(opt): + raise DistutilsGetoptError, \ + ("invalid negative alias '%s': " + "aliased option '%s' not defined") % (negopt, opt) + + self.negative_alias = negative_alias + + + def _grok_option_table (self): + """Populate the various data structures that keep tabs on + the option table. Called by 'getopt()' before it can do + anything worthwhile.""" + + for option in self.option_table: + try: + (long, short, help) = option + except ValueError: + raise DistutilsGetoptError, \ + "invalid option tuple " + str (option) + + # Type- and value-check the option names + if type(long) is not StringType or len(long) < 2: + raise DistutilsGetoptError, \ + ("invalid long option '%s': " + "must be a string of length >= 2") % long + + if (not ((short is None) or + (type (short) is StringType and len (short) == 1))): + raise DistutilsGetoptError, \ + ("invalid short option '%s': " + "must a single character or None") % short + + self.long_opts.append (long) + + if long[-1] == '=': # option takes an argument? + if short: short = short + ':' + long = long[0:-1] + self.takes_arg[long] = 1 + else: + + # Is option is a "negative alias" for some other option (eg. + # "quiet" == "!verbose")? + alias_to = self.negative_alias.get(long) + if alias_to is not None: + if self.takes_arg[alias_to]: + raise DistutilsGetoptError, \ + ("invalid negative alias '%s': " + "aliased option '%s' takes a value") % \ + (long, alias_to) + + self.long_opts[-1] = long # XXX redundant?! + self.takes_arg[long] = 0 + + else: + self.takes_arg[long] = 0 + + + # Now enforce some bondage on the long option name, so we can + # later translate it to an attribute name on some object. Have + # to do this a bit late to make sure we've removed any trailing + # '='. + if not longopt_re.match (long): + raise DistutilsGetoptError, \ + ("invalid long option name '%s' " + + "(must be letters, numbers, hyphens only") % long + + self.attr_name[long] = string.translate (long, longopt_xlate) + if short: + self.short_opts.append (short) + self.short2long[short[0]] = long + + # for option_table + + # _grok_option_table() + + + def getopt (self, args=None, object=None): + + """Parse the command-line options in 'args' and store the results + as attributes of 'object'. If 'args' is None or not supplied, uses + 'sys.argv[1:]'. If 'object' is None or not supplied, creates a new + OptionDummy object, stores option values there, and returns a tuple + (args, object). If 'object' is supplied, it is modified in place + and 'getopt()' just returns 'args'; in both cases, the returned + 'args' is a modified copy of the passed-in 'args' list, which is + left untouched.""" + + if args is None: + args = sys.argv[1:] + if object is None: + object = OptionDummy() + created_object = 1 + else: + created_object = 0 + + self._grok_option_table() + + short_opts = string.join (self.short_opts) + try: + (opts, args) = getopt.getopt (args, short_opts, self.long_opts) + except getopt.error, msg: + raise DistutilsArgError, msg + + for (opt, val) in opts: + if len (opt) == 2 and opt[0] == '-': # it's a short option + opt = self.short2long[opt[1]] + + elif len (opt) > 2 and opt[0:2] == '--': + opt = opt[2:] + + else: + raise DistutilsInternalError, \ + "this can't happen: bad option string '%s'" % opt + + if not self.takes_arg[opt]: # boolean option? + if val != '': # shouldn't have a value! + raise DistutilsInternalError, \ + "this can't happen: bad option value '%s'" % value + + alias = self.negative_alias.get (opt) + if alias: + opt = alias + val = 0 + else: + val = 1 + + attr = self.attr_name[opt] + setattr (object, attr, val) + self.option_order.append ((opt, val)) + + # for opts + + if created_object: + return (args, object) + else: + return args + + # getopt() + + + def get_option_order (): + """Returns the list of (option, value) tuples processed by the + previous run of 'fancy_getopt()'. Raises RuntimeError if + 'fancy_getopt()' hasn't been called yet.""" + + if self.option_order is None: + raise RuntimeError, "'fancy_getopt()' hasn't been called yet" + else: + return self.option_order + +# class FancyGetopt + def fancy_getopt (options, negative_opt, object, args): @@ -117,6 +350,9 @@ def fancy_getopt (options, negative_opt, object, args): except getopt.error, msg: raise DistutilsArgError, msg + global _option_order # blechh! should OO-ify this module + _option_order = [] + for (opt, val) in opts: if len (opt) == 2 and opt[0] == '-': # it's a short option opt = short2long[opt[1]] @@ -125,29 +361,38 @@ def fancy_getopt (options, negative_opt, object, args): opt = opt[2:] else: - raise RuntimeError, "getopt lies! (bad option string '%s')" % \ - opt + raise DistutilsInternalError, \ + "this can't happen: bad option string '%s'" % opt + + if not takes_arg[opt]: # boolean option? + if val != '': # shouldn't have a value! + raise DistutilsInternalError, \ + "this can't happen: bad option value '%s'" % value + + alias = negative_opt.get (opt) + if alias: + opt = alias + val = 0 + else: + val = 1 attr = attr_name[opt] - if takes_arg[opt]: - setattr (object, attr, val) - else: - if val == '': - alias = negative_opt.get (opt) - if alias: - setattr (object, attr_name[alias], 0) - else: - setattr (object, attr, 1) - else: - raise RuntimeError, "getopt lies! (bad value '%s')" % value + setattr (object, attr, val) + _option_order.append ((opt, val)) - # end loop over options found in 'args' + # for opts return args # fancy_getopt() +def fancy_getopt (options, negative_opt, object, args): + parser = FancyGetopt (options) + parser.set_negative_aliases (negative_opt) + return parser.getopt (args, object) + + WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace)) def wrap_text (text, width): @@ -296,6 +541,12 @@ def print_help (options, file=None, header=None): for line in generate_help (options, header): file.write (line + "\n") # print_help () + + +class OptionDummy: + """Dummy class just used as a place to hold command-line option + values as instance attributes.""" + pass if __name__ == "__main__": From bacfe767f341ed061b5cc1c0ac1454d7f3a72d2e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 01:44:00 +0000 Subject: [PATCH 0283/8469] Continuing the refactoring: deleted the old 'fancy_getopt()' function, leaving in its place a tiny wrapper around the FancyGetopt class for backwards compatibility. --- fancy_getopt.py | 121 ------------------------------------------------ 1 file changed, 121 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 94e654e896..8ee27748da 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -266,127 +266,6 @@ def get_option_order (): # class FancyGetopt -def fancy_getopt (options, negative_opt, object, args): - - # The 'options' table is a list of 3-tuples: - # (long_option, short_option, help_string) - # if an option takes an argument, its long_option should have '=' - # appended; short_option should just be a single character, no ':' in - # any case. If a long_option doesn't have a corresponding - # short_option, short_option should be None. All option tuples must - # have long options. - - # Build the short_opts string and long_opts list, remembering how - # the two are tied together - - short_opts = [] # we'll join 'em when done - long_opts = [] - short2long = {} - attr_name = {} - takes_arg = {} - - for option in options: - try: - (long, short, help) = option - except ValueError: - raise DistutilsGetoptError, \ - "invalid option tuple " + str (option) - - # Type-check the option names - if type (long) is not StringType or len (long) < 2: - raise DistutilsGetoptError, \ - "long option '%s' must be a string of length >= 2" % \ - long - - if (not ((short is None) or - (type (short) is StringType and len (short) == 1))): - raise DistutilsGetoptError, \ - "short option '%s' must be None or string of length 1" % \ - short - - long_opts.append (long) - - if long[-1] == '=': # option takes an argument? - if short: short = short + ':' - long = long[0:-1] - takes_arg[long] = 1 - else: - - # Is option is a "negative alias" for some other option (eg. - # "quiet" == "!verbose")? - alias_to = negative_opt.get(long) - if alias_to is not None: - if not takes_arg.has_key(alias_to) or takes_arg[alias_to]: - raise DistutilsGetoptError, \ - ("option '%s' is a negative alias for '%s', " + - "which either hasn't been defined yet " + - "or takes an argument") % (long, alias_to) - - long_opts[-1] = long - takes_arg[long] = 0 - - else: - takes_arg[long] = 0 - - - # Now enforce some bondage on the long option name, so we can later - # translate it to an attribute name in 'object'. Have to do this a - # bit late to make sure we've removed any trailing '='. - if not longopt_re.match (long): - raise DistutilsGetoptError, \ - ("invalid long option name '%s' " + - "(must be letters, numbers, hyphens only") % long - - attr_name[long] = string.translate (long, longopt_xlate) - if short: - short_opts.append (short) - short2long[short[0]] = long - - # end loop over 'options' - - short_opts = string.join (short_opts) - try: - (opts, args) = getopt.getopt (args, short_opts, long_opts) - except getopt.error, msg: - raise DistutilsArgError, msg - - global _option_order # blechh! should OO-ify this module - _option_order = [] - - for (opt, val) in opts: - if len (opt) == 2 and opt[0] == '-': # it's a short option - opt = short2long[opt[1]] - - elif len (opt) > 2 and opt[0:2] == '--': - opt = opt[2:] - - else: - raise DistutilsInternalError, \ - "this can't happen: bad option string '%s'" % opt - - if not takes_arg[opt]: # boolean option? - if val != '': # shouldn't have a value! - raise DistutilsInternalError, \ - "this can't happen: bad option value '%s'" % value - - alias = negative_opt.get (opt) - if alias: - opt = alias - val = 0 - else: - val = 1 - - attr = attr_name[opt] - setattr (object, attr, val) - _option_order.append ((opt, val)) - - # for opts - - return args - -# fancy_getopt() - - def fancy_getopt (options, negative_opt, object, args): parser = FancyGetopt (options) parser.set_negative_aliases (negative_opt) From 97f6eb18591a6e8a62dc727e4900ef036c801637 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 02:09:26 +0000 Subject: [PATCH 0284/8469] Made 'generate_help()' and 'print_help()' methods of FancyGetopt. Added 'set_option_table()' method. Added missing 'self' to 'get_option_order()'. Cosmetic/comment/docstring tweaks. --- fancy_getopt.py | 201 ++++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 99 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 8ee27748da..c8112331a0 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -64,7 +64,7 @@ def __init__ (self, option_table=None): # table (ie. those 3-tuples). self.option_index = {} if self.option_table: - self.build_index() + self._build_index() # 'negative_alias' keeps track of options that are the boolean # opposite of some other option @@ -88,10 +88,14 @@ def __init__ (self, option_table=None): # __init__ () - def build_index (self): + def _build_index (self): for option in self.option_table: self.option_index[option[0]] = option + def set_option_table (self, option_table): + self.option_table = option_table + self._build_index() + def add_option (self, long_option, short_option=None, help_string=None): if self.option_index.has_key(long_option): raise DistutilsGetoptError, \ @@ -190,7 +194,6 @@ def _grok_option_table (self): def getopt (self, args=None, object=None): - """Parse the command-line options in 'args' and store the results as attributes of 'object'. If 'args' is None or not supplied, uses 'sys.argv[1:]'. If 'object' is None or not supplied, creates a new @@ -253,16 +256,108 @@ def getopt (self, args=None, object=None): # getopt() - def get_option_order (): + def get_option_order (self): """Returns the list of (option, value) tuples processed by the - previous run of 'fancy_getopt()'. Raises RuntimeError if - 'fancy_getopt()' hasn't been called yet.""" + previous run of 'getopt()'. Raises RuntimeError if + 'getopt()' hasn't been called yet.""" if self.option_order is None: - raise RuntimeError, "'fancy_getopt()' hasn't been called yet" + raise RuntimeError, "'getopt()' hasn't been called yet" else: return self.option_order + + def generate_help (header=None): + """Generate help text (a list of strings, one per suggested line of + output) from the option table for this FancyGetopt object.""" + + # Blithely assume the option table is good: probably wouldn't call + # 'generate_help()' unless you've already called 'getopt()'. + + # First pass: determine maximum length of long option names + max_opt = 0 + for option in self.option_table: + long = option[0] + short = option[1] + l = len (long) + if long[-1] == '=': + l = l - 1 + if short is not None: + l = l + 5 # " (-x)" where short == 'x' + if l > max_opt: + max_opt = l + + opt_width = max_opt + 2 + 2 + 2 # room for indent + dashes + gutter + + # Typical help block looks like this: + # --foo controls foonabulation + # Help block for longest option looks like this: + # --flimflam set the flim-flam level + # and with wrapped text: + # --flimflam set the flim-flam level (must be between + # 0 and 100, except on Tuesdays) + # Options with short names will have the short name shown (but + # it doesn't contribute to max_opt): + # --foo (-f) controls foonabulation + # If adding the short option would make the left column too wide, + # we push the explanation off to the next line + # --flimflam (-l) + # set the flim-flam level + # Important parameters: + # - 2 spaces before option block start lines + # - 2 dashes for each long option name + # - min. 2 spaces between option and explanation (gutter) + # - 5 characters (incl. space) for short option name + + # Now generate lines of help text. (If 80 columns were good enough + # for Jesus, then 78 columns are good enough for me!) + line_width = 78 + text_width = line_width - opt_width + big_indent = ' ' * opt_width + if header: + lines = [header] + else: + lines = ['Option summary:'] + + for (long,short,help) in self.option_table: + + text = wrap_text (help, text_width) + if long[-1] == '=': + long = long[0:-1] + + # Case 1: no short option at all (makes life easy) + if short is None: + if text: + lines.append (" --%-*s %s" % (max_opt, long, text[0])) + else: + lines.append (" --%-*s " % (max_opt, long)) + + for l in text[1:]: + lines.append (big_indent + l) + + # Case 2: we have a short option, so we have to include it + # just after the long option + else: + opt_names = "%s (-%s)" % (long, short) + if text: + lines.append (" --%-*s %s" % + (max_opt, opt_names, text[0])) + else: + lines.append (" --%-*s" % opt_names) + + # for self.option_table + + return lines + + # generate_help () + + def print_help (self, file=None, header=None): + if file is None: + file = sys.stdout + for line in self.generate_help (header): + file.write (line + "\n") + # print_help () + # class FancyGetopt @@ -330,98 +425,6 @@ def wrap_text (text, width): # wrap_text () -def generate_help (options, header=None): - """Generate help text (a list of strings, one per suggested line of - output) from an option table.""" - - # Blithely assume the option table is good: probably wouldn't call - # 'generate_help()' unless you've already called 'fancy_getopt()'. - - # First pass: determine maximum length of long option names - max_opt = 0 - for option in options: - long = option[0] - short = option[1] - l = len (long) - if long[-1] == '=': - l = l - 1 - if short is not None: - l = l + 5 # " (-x)" where short == 'x' - if l > max_opt: - max_opt = l - - opt_width = max_opt + 2 + 2 + 2 # room for indent + dashes + gutter - - # Typical help block looks like this: - # --foo controls foonabulation - # Help block for longest option looks like this: - # --flimflam set the flim-flam level - # and with wrapped text: - # --flimflam set the flim-flam level (must be between - # 0 and 100, except on Tuesdays) - # Options with short names will have the short name shown (but - # it doesn't contribute to max_opt): - # --foo (-f) controls foonabulation - # If adding the short option would make the left column too wide, - # we push the explanation off to the next line - # --flimflam (-l) - # set the flim-flam level - # Important parameters: - # - 2 spaces before option block start lines - # - 2 dashes for each long option name - # - min. 2 spaces between option and explanation (gutter) - # - 5 characters (incl. space) for short option name - - # Now generate lines of help text. - line_width = 78 # if 80 columns were good enough for - text_width = line_width - opt_width # Jesus, then 78 are good enough for me - big_indent = ' ' * opt_width - if header: - lines = [header] - else: - lines = ['Option summary:'] - - for (long,short,help) in options: - - text = wrap_text (help, text_width) - if long[-1] == '=': - long = long[0:-1] - - # Case 1: no short option at all (makes life easy) - if short is None: - if text: - lines.append (" --%-*s %s" % (max_opt, long, text[0])) - else: - lines.append (" --%-*s " % (max_opt, long)) - - for l in text[1:]: - lines.append (big_indent + l) - - # Case 2: we have a short option, so we have to include it - # just after the long option - else: - opt_names = "%s (-%s)" % (long, short) - if text: - lines.append (" --%-*s %s" % - (max_opt, opt_names, text[0])) - else: - lines.append (" --%-*s" % opt_names) - - # for loop over options - - return lines - -# generate_help () - - -def print_help (options, file=None, header=None): - if file is None: - file = sys.stdout - for line in generate_help (options, header): - file.write (line + "\n") -# print_help () - - class OptionDummy: """Dummy class just used as a place to hold command-line option values as instance attributes.""" From cae8078a1df69595f030390f134fd59452b6db77 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 02:28:14 +0000 Subject: [PATCH 0285/8469] Patch, originally from Bastian Kleineidam and savagely mutilated by me, to add the "display metadata" options: --name, --version, --author, and so forth. Main changes: * added 'display_options' class attribute to list all the "display only" options (--help-commands plus the metadata options) * added DistributionMetadata class as a place to put the actual metadata information from the setup script (not to be confused with the metadata display options); the logic dealing with metadata (eg. return self.name or "UNKNOWN") is now in this class * changed 'parse_command_line()' to use the new OO interface provided by fancy_getopt, mainly so we can get at the original order of options on the command line, so we can print multiple lines of distribution meta-data in the order specified by the user * added 'handle_display_options()' to handle display-only options Also fixed some crufty old comments/docstrings. --- dist.py | 243 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 193 insertions(+), 50 deletions(-) diff --git a/dist.py b/dist.py index 408b9f5c50..bedd9d252a 100644 --- a/dist.py +++ b/dist.py @@ -12,7 +12,7 @@ from types import * from copy import copy from distutils.errors import * -from distutils.fancy_getopt import fancy_getopt, print_help +from distutils.fancy_getopt import FancyGetopt, longopt_xlate # Regex to define acceptable Distutils command names. This is not *quite* @@ -40,8 +40,8 @@ class Distribution: # 'global_options' describes the command-line options that may be - # supplied to the client (setup.py) prior to any actual commands. - # Eg. "./setup.py -nv" or "./setup.py --verbose" both take advantage of + # supplied to the setup script prior to any actual commands. + # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of # these global options. This list should be kept to a bare minimum, # since every global option is also valid as a command option -- and we # don't want to pollute the commands with too many options that they @@ -53,8 +53,47 @@ class Distribution: ('dry-run', 'n', "don't actually do anything"), ('help', 'h', - "show this help message"), + "show this help message, plus help for any commands " + + "given on the command-line"), ] + + # options that are not propagated to the commands + display_options = [ + ('help-commands', None, + "list all available commands"), + ('name', None, + "print package name"), + ('version', 'V', + "print package version"), + ('fullname', None, + "print -"), + ('author', None, + "print the author's name"), + ('author-email', None, + "print the author's email address"), + ('maintainer', None, + "print the maintainer's name"), + ('maintainer-email', None, + "print the maintainer's email address"), + ('contact', None, + "print the name of the maintainer if present, " + "else author"), + ('contact-email', None, + "print the email of the maintainer if present, " + "else author"), + ('url', None, + "print the URL for this package"), + ('licence', None, + "print the licence of the package"), + ('license', None, + "alias for --licence"), + ('description', None, + "print the package description"), + ] + display_option_names = map(lambda x: string.translate(x[0], longopt_xlate), + display_options) + + # negative options are options that exclude other options negative_opt = {'quiet': 'verbose'} @@ -75,31 +114,28 @@ def __init__ (self, attrs=None): self.verbose = 1 self.dry_run = 0 self.help = 0 - self.help_commands = 0 - - # And the "distribution meta-data" options -- these can only - # come from setup.py (the caller), not the command line - # (or a hypothetical config file). - self.name = None - self.version = None - self.author = None - self.author_email = None - self.maintainer = None - self.maintainer_email = None - self.url = None - self.licence = None - self.description = None + for attr in self.display_option_names: + setattr(self, attr, 0) + + # Store the distribution meta-data (name, version, author, and so + # forth) in a separate object -- we're getting to have enough + # information here (and enough command-line options) that it's + # worth it. Also delegate 'get_XXX()' methods to the 'metadata' + # object in a sneaky and underhanded (but efficient!) way. + self.metadata = DistributionMetadata () + for attr in dir(self.metadata): + meth_name = "get_" + attr + setattr(self, meth_name, getattr(self.metadata, meth_name)) # 'cmdclass' maps command names to class objects, so we # can 1) quickly figure out which class to instantiate when # we need to create a new command object, and 2) have a way - # for the client to override command classes + # for the setup script to override command classes self.cmdclass = {} # These options are really the business of various commands, rather # than of the Distribution itself. We provide aliases for them in # Distribution as a convenience to the developer. - # dictionary. self.packages = None self.package_dir = None self.py_modules = None @@ -128,8 +164,9 @@ def __init__ (self, attrs=None): self.have_run = {} # Now we'll use the attrs dictionary (ultimately, keyword args from - # the client) to possibly override any or all of these distribution - # options. + # the setup script) to possibly override any or all of these + # distribution options. + if attrs: # Pull out the set of command options and work on them @@ -149,7 +186,9 @@ def __init__ (self, attrs=None): # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): - if hasattr (self, key): + if hasattr (self.metadata, key): + setattr (self.metadata, key, val) + elif hasattr (self, key): setattr (self, key, val) else: raise DistutilsSetupError, \ @@ -192,19 +231,17 @@ def parse_command_line (self, args): # happen until we know what the command is. self.commands = [] - options = self.global_options + \ - [('help-commands', None, - "list all available commands")] - args = fancy_getopt (options, self.negative_opt, - self, sys.argv[1:]) + parser = FancyGetopt (self.global_options + self.display_options) + parser.set_negative_aliases (self.negative_opt) + args = parser.getopt (object=self) + option_order = parser.get_option_order() - # User just wants a list of commands -- we'll print it out and stop - # processing now (ie. if they ran "setup --help-commands foo bar", - # we ignore "foo bar"). - if self.help_commands: - self.print_commands () - print - print usage + # Handle aliases (license == licence) + if self.license: + self.licence = 1 + + # for display options we return immediately + if self.handle_display_options(option_order): return while args: @@ -246,15 +283,17 @@ def parse_command_line (self, args): negative_opt = copy (negative_opt) negative_opt.update (cmd_obj.negative_opt) - options = self.global_options + cmd_obj.user_options - args = fancy_getopt (options, negative_opt, - cmd_obj, args[1:]) + parser.set_option_table (self.global_options + + cmd_obj.user_options) + parser.set_negative_aliases (negative_opt) + args = parser.getopt (args[1:], cmd_obj) if cmd_obj.help: - print_help (self.global_options, - header="Global options:") + parser.set_option_table (self.global_options) + parser.print_help ("Global options:") print - print_help (cmd_obj.user_options, - header="Options for '%s' command:" % command) + + parser.set_option_table (cmd_obj.user_options) + parser.print_help ("Options for '%s' command:" % command) print print usage return @@ -271,13 +310,23 @@ def parse_command_line (self, args): # get help on a command, but I support it because that's how # CVS does it -- might as well be consistent.) if self.help: - print_help (self.global_options, header="Global options:") + parser.set_option_table (self.global_options) + parser.print_help ( + "Global options (apply to all commands, " + + "or can be used per command):") print + if not self.commands: + parser.set_option_table (self.display_options) + parser.print_help ( + "Information display options (just display " + + "information, ignore any commands)") + print + for command in self.commands: klass = self.find_command_class (command) - print_help (klass.user_options, - header="Options for '%s' command:" % command) + parser.set_option_table (klass.user_options) + parser.print_help ("Options for '%s' command:" % command) print print usage @@ -292,6 +341,40 @@ def parse_command_line (self, args): # parse_command_line() + def handle_display_options (self, option_order): + """If there were any non-global "display-only" options + (--help-commands or the metadata display options) on the command + line, display the requested info and return true; else return + false.""" + + from distutils.core import usage + + # User just wants a list of commands -- we'll print it out and stop + # processing now (ie. if they ran "setup --help-commands foo bar", + # we ignore "foo bar"). + if self.help_commands: + self.print_commands () + print + print usage + return 1 + + # If user supplied any of the "display metadata" options, then + # display that metadata in the order in which the user supplied the + # metadata options. + any_display_options = 0 + is_display_option = {} + for option in self.display_options: + is_display_option[option[0]] = 1 + + for (opt, val) in option_order: + if val and is_display_option.get(opt): + opt = string.translate (opt, longopt_xlate) + print getattr(self.metadata, "get_"+opt)() + any_display_options = 1 + + return any_display_options + + # handle_display_options() def print_command_list (self, commands, header, max_length): """Print a subset of the list of all commands -- used by @@ -437,7 +520,7 @@ def announce (self, msg, level=1): def run_commands (self): - """Run each command that was seen on the client command line. + """Run each command that was seen on the setup script command line. Uses the list of commands found and cache of command objects created by 'create_command_obj()'.""" @@ -532,14 +615,74 @@ def is_pure (self): not self.has_ext_modules() and not self.has_c_libraries()) + # -- Metadata query methods ---------------------------------------- + + # If you're looking for 'get_name()', 'get_version()', and so forth, + # they are defined in a sneaky way: the constructor binds self.get_XXX + # to self.metadata.get_XXX. The actual code is in the + # DistributionMetadata class, below. + +# class Distribution + + +class DistributionMetadata: + """Dummy class to hold the distribution meta-data: name, version, + author, and so forth.""" + + def __init__ (self): + self.name = None + self.version = None + self.author = None + self.author_email = None + self.maintainer = None + self.maintainer_email = None + self.url = None + self.licence = None + self.description = None + + # -- Metadata query methods ---------------------------------------- + def get_name (self): return self.name or "UNKNOWN" - def get_full_name (self): - return "%s-%s" % ((self.name or "UNKNOWN"), (self.version or "???")) - -# class Distribution + def get_version(self): + return self.version or "???" + + def get_fullname (self): + return "%s-%s" % (self.get_name(), self.get_version()) + + def get_author(self): + return self.author or "UNKNOWN" + def get_author_email(self): + return self.author_email or "UNKNOWN" + + def get_maintainer(self): + return self.maintainer or "UNKNOWN" + + def get_maintainer_email(self): + return self.maintainer_email or "UNKNOWN" + + def get_contact(self): + return (self.maintainer or + self.author or + "UNKNOWN") + + def get_contact_email(self): + return (self.maintainer_email or + self.author_email or + "UNKNOWN") + + def get_url(self): + return self.url or "UNKNOWN" + + def get_licence(self): + return self.licence or "UNKNOWN" + + def get_description(self): + return self.description or "UNKNOWN" + +# class DistributionMetadata if __name__ == "__main__": dist = Distribution () From 56ff5710cb6403a6135fdb2104a3545a27cdff64 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 02:31:07 +0000 Subject: [PATCH 0286/8469] Added 'has_option()', 'get_attr_name()' methods. --- fancy_getopt.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index c8112331a0..cfebab4920 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -105,6 +105,19 @@ def add_option (self, long_option, short_option=None, help_string=None): self.option_table.append (option) self.option_index[long_option] = option + + def has_option (self, long_option): + """Return true if the option table for this parser has an + option with long name 'long_option'.""" + return self.option_index.has_key(long_option) + + def get_attr_name (self, long_option): + """Translate long option name 'long_option' to the form it + has as an attribute of some object: ie., translate hyphens + to underscores.""" + return string.translate (long_option, longopt_xlate) + + def set_negative_aliases (self, negative_alias): """Set the negative aliases for this option parser. 'negative_alias' should be a dictionary mapping option names to @@ -183,7 +196,7 @@ def _grok_option_table (self): ("invalid long option name '%s' " + "(must be letters, numbers, hyphens only") % long - self.attr_name[long] = string.translate (long, longopt_xlate) + self.attr_name[long] = self.get_attr_name (long) if short: self.short_opts.append (short) self.short2long[short[0]] = long From fe34d8a966eede0315681b03ec003d9b8fb0c681 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 04:22:01 +0000 Subject: [PATCH 0287/8469] Added the capability for alias options. --- fancy_getopt.py | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index cfebab4920..629da29eef 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -66,6 +66,10 @@ def __init__ (self, option_table=None): if self.option_table: self._build_index() + # 'alias' records (duh) alias options; {'foo': 'bar'} means + # --foo is an alias for --bar + self.alias = {} + # 'negative_alias' keeps track of options that are the boolean # opposite of some other option self.negative_alias = {} @@ -118,23 +122,29 @@ def get_attr_name (self, long_option): return string.translate (long_option, longopt_xlate) + def _check_alias_dict (self, aliases, what): + assert type(aliases) is DictionaryType + for (alias, opt) in aliases.items(): + if not self.option_index.has_key(alias): + raise DistutilsGetoptError, \ + ("invalid %s '%s': " + "option '%s' not defined") % (what, alias, alias) + if not self.option_index.has_key(opt): + raise DistutilsGetoptError, \ + ("invalid %s '%s': " + "aliased option '%s' not defined") % (what, alias, opt) + + def set_aliases (self, alias): + """Set the aliases for this option parser.""" + self._check_alias_dict (alias, "alias") + self.alias = alias + def set_negative_aliases (self, negative_alias): """Set the negative aliases for this option parser. 'negative_alias' should be a dictionary mapping option names to option names, both the key and value must already be defined in the option table.""" - - assert type(negative_alias) is DictionaryType - for (negopt, opt) in negative_alias.items(): - if not self.option_index.has_key(negopt): - raise DistutilsGetoptError, \ - ("invalid negative alias '%s': " - "option '%s' not defined") % (negopt, negopt) - if not self.option_index.has_key(opt): - raise DistutilsGetoptError, \ - ("invalid negative alias '%s': " - "aliased option '%s' not defined") % (negopt, opt) - + self._check_alias_dict (negative_alias, "negative alias") self.negative_alias = negative_alias @@ -186,6 +196,16 @@ def _grok_option_table (self): else: self.takes_arg[long] = 0 + # If this is an alias option, make sure its "takes arg" flag is + # the same as the option it's aliased to. + alias_to = self.alias.get(long) + if alias_to is not None: + if self.takes_arg[long] != self.takes_arg[alias_to]: + raise DistutilsGetoptError, \ + ("invalid alias '%s': inconsistent with " + "aliased option '%s' (one of them takes a value, " + "the other doesn't") % (long, alias_to) + # Now enforce some bondage on the long option name, so we can # later translate it to an attribute name on some object. Have @@ -243,6 +263,10 @@ def getopt (self, args=None, object=None): raise DistutilsInternalError, \ "this can't happen: bad option string '%s'" % opt + alias = self.alias.get(opt) + if alias: + opt = alias + if not self.takes_arg[opt]: # boolean option? if val != '': # shouldn't have a value! raise DistutilsInternalError, \ From 7ee4ef65de0dc64230420e7ed910385384094967 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 04:22:49 +0000 Subject: [PATCH 0288/8469] Fixed the '--license' option so it's officially an alias for '--licence', and now actually works. --- dist.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dist.py b/dist.py index bedd9d252a..a209212778 100644 --- a/dist.py +++ b/dist.py @@ -233,13 +233,10 @@ def parse_command_line (self, args): self.commands = [] parser = FancyGetopt (self.global_options + self.display_options) parser.set_negative_aliases (self.negative_opt) + parser.set_aliases ({'license': 'licence'}) args = parser.getopt (object=self) option_order = parser.get_option_order() - # Handle aliases (license == licence) - if self.license: - self.licence = 1 - # for display options we return immediately if self.handle_display_options(option_order): return From e90d86fe9ee732ff165ac44bf174312ac828e9c9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 04:31:10 +0000 Subject: [PATCH 0289/8469] Patch from Andrew Kuchling: allow multiple include/exclude patterns for all commands except 'prune' and 'graft'. --- command/sdist.py | 103 +++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f3cc041e7d..59dd624813 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -310,24 +310,25 @@ def read_template (self): # for the given action (which is the first word) if action in ('include','exclude', 'global-include','global-exclude'): - if len (words) != 2: + if len (words) < 2: template.warn \ ("invalid manifest template line: " + - "'%s' expects a single " % + "'%s' expects ..." % action) continue - pattern = native_path (words[1]) + pattern_list = map(native_path, words[1:]) elif action in ('recursive-include','recursive-exclude'): - if len (words) != 3: + if len (words) < 3: template.warn \ ("invalid manifest template line: " + - "'%s' expects " % + "'%s' expects ..." % action) continue - (dir, pattern) = map (native_path, words[1:3]) + dir = native_path(words[1]) + pattern_list = map (native_path, words[2:]) elif action in ('graft','prune'): if len (words) != 2: @@ -352,58 +353,64 @@ def read_template (self): # digging stuff up out of 'words'. if action == 'include': - print "include", pattern - files = select_pattern (all_files, pattern, anchor=1) - if not files: - template.warn ("no files found matching '%s'" % pattern) - else: - self.files.extend (files) + print "include", string.join(pattern_list) + for pattern in pattern_list: + files = select_pattern (all_files, pattern, anchor=1) + if not files: + template.warn ("no files found matching '%s'" % pattern) + else: + self.files.extend (files) elif action == 'exclude': - print "exclude", pattern - num = exclude_pattern (self.files, pattern, anchor=1) - if num == 0: - template.warn \ - ("no previously-included files found matching '%s'" % - pattern) + print "exclude", string.join(pattern_list) + for pattern in pattern_list: + num = exclude_pattern (self.files, pattern, anchor=1) + if num == 0: + template.warn ( + "no previously-included files found matching '%s'"% + pattern) elif action == 'global-include': - print "global-include", pattern - files = select_pattern (all_files, pattern, anchor=0) - if not files: - template.warn (("no files found matching '%s' " + - "anywhere in distribution") % - pattern) - else: - self.files.extend (files) + print "global-include", string.join(pattern_list) + for pattern in pattern_list: + files = select_pattern (all_files, pattern, anchor=0) + if not files: + template.warn (("no files found matching '%s' " + + "anywhere in distribution") % + pattern) + else: + self.files.extend (files) elif action == 'global-exclude': - print "global-exclude", pattern - num = exclude_pattern (self.files, pattern, anchor=0) - if num == 0: - template.warn \ - (("no previously-included files matching '%s' " + - "found anywhere in distribution") % - pattern) + print "global-exclude", string.join(pattern_list) + for pattern in pattern_list: + num = exclude_pattern (self.files, pattern, anchor=0) + if num == 0: + template.warn \ + (("no previously-included files matching '%s' " + + "found anywhere in distribution") % + pattern) elif action == 'recursive-include': - print "recursive-include", dir, pattern - files = select_pattern (all_files, pattern, prefix=dir) - if not files: - template.warn (("no files found matching '%s' " + - "under directory '%s'") % - (pattern, dir)) - else: - self.files.extend (files) + print "recursive-include", dir, string.join(pattern_list) + for pattern in pattern_list: + files = select_pattern (all_files, pattern, prefix=dir) + if not files: + template.warn (("no files found matching '%s' " + + "under directory '%s'") % + (pattern, dir)) + else: + self.files.extend (files) elif action == 'recursive-exclude': - print "recursive-exclude", dir, pattern - num = exclude_pattern (self.files, pattern, prefix=dir) - if num == 0: - template.warn \ - (("no previously-included files matching '%s' " + - "found under directory '%s'") % - (pattern, dir)) + print "recursive-exclude", dir, string.join(pattern_list) + for pattern in pattern_list: + num = exclude_pattern (self.files, pattern, prefix=dir) + if num == 0: + template.warn \ + (("no previously-included files matching '%s' " + + "found under directory '%s'") % + (pattern, dir)) elif action == 'graft': print "graft", dir_pattern From bf586ddbeea4df44ebf9a21a17e12243bad0a327 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 21 Apr 2000 04:37:12 +0000 Subject: [PATCH 0290/8469] Fix 'check_metadata()' so it grovels through the distribution's metadata object, rather than through the distribution itself (since I moved the meta- data out to a DistributionMetadata instance). --- command/sdist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 59dd624813..43007d5970 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -107,23 +107,23 @@ def run (self): def check_metadata (self): - dist = self.distribution + metadata = self.distribution.metadata missing = [] for attr in ('name', 'version', 'url'): - if not (hasattr (dist, attr) and getattr (dist, attr)): + if not (hasattr (metadata, attr) and getattr (metadata, attr)): missing.append (attr) if missing: self.warn ("missing required meta-data: " + string.join (missing, ", ")) - if dist.author: - if not dist.author_email: + if metadata.author: + if not metadata.author_email: self.warn ("missing meta-data: if 'author' supplied, " + "'author_email' must be supplied too") - elif dist.maintainer: - if not dist.maintainer_email: + elif metadata.maintainer: + if not metadata.maintainer_email: self.warn ("missing meta-data: if 'maintainer' supplied, " + "'maintainer_email' must be supplied too") else: From 5a78411da74f438590a1d76d71213a5b667c379e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 02:51:25 +0000 Subject: [PATCH 0291/8469] Changed to call 'get_fullname()', not 'get_full_name()', on Distribution object. --- command/bdist_dumb.py | 2 +- command/sdist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 5456e57ac3..0a68d00a09 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -70,7 +70,7 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. - archive_basename = "%s.%s" % (self.distribution.get_full_name(), + archive_basename = "%s.%s" % (self.distribution.get_fullname(), get_platform()) print "output_dir = %s" % output_dir print "self.format = %s" % self.format diff --git a/command/sdist.py b/command/sdist.py index 43007d5970..2cf8e385b8 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -502,7 +502,7 @@ def make_distribution (self): # Don't warn about missing meta-data here -- should be (and is!) # done elsewhere. - base_dir = self.distribution.get_full_name() + base_dir = self.distribution.get_fullname() # Remove any files that match "base_dir" from the fileset -- we # don't want to go distributing the distribution inside itself! From 9a32e742ff8308ffcf088fe46eb527fbffd0e812 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 02:52:44 +0000 Subject: [PATCH 0292/8469] Fix how we generate the meta-data query methods to include 'get_fullname()' and the other "composite meta-data" methods. --- dist.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist.py b/dist.py index a209212778..4a83c794ff 100644 --- a/dist.py +++ b/dist.py @@ -123,9 +123,11 @@ def __init__ (self, attrs=None): # worth it. Also delegate 'get_XXX()' methods to the 'metadata' # object in a sneaky and underhanded (but efficient!) way. self.metadata = DistributionMetadata () - for attr in dir(self.metadata): - meth_name = "get_" + attr - setattr(self, meth_name, getattr(self.metadata, meth_name)) + method_basenames = dir(self.metadata) + \ + ['fullname', 'contact', 'contact_email'] + for basename in method_basenames: + method_name = "get_" + basename + setattr(self, method_name, getattr(self.metadata, method_name)) # 'cmdclass' maps command names to class objects, so we # can 1) quickly figure out which class to instantiate when From 71ceb366185124bc76998bd06c7ef6676f7d7827 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 03:09:56 +0000 Subject: [PATCH 0293/8469] Extracted the "what-do-I-do-for-this-format" logic from code in 'make_archive()' to a global static dictionary, ARCHIVE_FORMATS. Added 'check_archive_formats()', which obviously makes good use of this dictionary. --- archive_util.py | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/archive_util.py b/archive_util.py index a28eed1ad8..bae425be06 100644 --- a/archive_util.py +++ b/archive_util.py @@ -102,6 +102,20 @@ def visit (z, dirname, names): # make_zipfile () +ARCHIVE_FORMATS = { + 'gztar': (make_tarball, [('compress', 'gzip')]), + 'ztar': (make_tarball, [('compress', 'compress')]), + 'tar': (make_tarball, [('compress', None)]), + 'zip': (make_zipfile, []) + } + +def check_archive_formats (formats): + for format in formats: + if not ARCHIVE_FORMATS.has_key(format): + return format + else: + return None + def make_archive (base_name, format, root_dir=None, base_dir=None, verbose=0, dry_run=0): @@ -130,18 +144,14 @@ def make_archive (base_name, format, kwargs = { 'verbose': verbose, 'dry_run': dry_run } - if format == 'gztar': - func = make_tarball - kwargs['compress'] = 'gzip' - elif format == 'ztar': - func = make_tarball - kwargs['compress'] = 'compress' - elif format == 'tar': - func = make_tarball - kwargs['compress'] = None - elif format == 'zip': - func = make_zipfile + try: + format_info = ARCHIVE_FORMATS[format] + except KeyError: + raise ValueError, "unknown archive format '%s'" % format + func = format_info[0] + for (arg,val) in format_info[1]: + kwargs[arg] = val apply (func, (base_name, base_dir), kwargs) if root_dir is not None: From ff4f4d515fa616a7480b7a3be0d42fb6b10cf7d5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 03:11:17 +0000 Subject: [PATCH 0294/8469] Catch DistutilsOptionError in 'setup()' -- it's thrown either because of errors in the setup script or on the command line, so shouldn't result in a traceback. --- core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 9a801063c7..814f4418c1 100644 --- a/core.py +++ b/core.py @@ -96,7 +96,9 @@ def setup (**attrs): "error: %s: %s" % (exc.filename, exc.strerror) else: raise SystemExit, str (exc) - except (DistutilsExecError, DistutilsFileError), msg: + except (DistutilsExecError, + DistutilsFileError, + DistutilsOptionError), msg: raise SystemExit, "error: " + str (msg) # setup () From b106a335675ced0bd73d4a70addc388feef883e4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 03:11:55 +0000 Subject: [PATCH 0295/8469] Check that 'self.formats' is good early on. --- command/sdist.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 2cf8e385b8..8aa4618ecc 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,10 +11,10 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import \ - newer, create_tree, remove_tree, make_tarball, make_zipfile, native_path +from distutils.util import newer, create_tree, remove_tree, native_path +from distutils.archive_util import check_archive_formats from distutils.text_file import TextFile -from distutils.errors import DistutilsExecError +from distutils.errors import DistutilsExecError, DistutilsOptionError class sdist (Command): @@ -81,6 +81,11 @@ def finalize_options (self): elif type (self.formats) is StringType: self.formats = string.split (self.formats, ',') + bad_format = check_archive_formats (self.formats) + if bad_format: + raise DistutilsOptionError, \ + "unknown archive format '%s'" % bad_format + def run (self): From b99aaeebb214b61283c589940ed59489353062f8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 03:20:49 +0000 Subject: [PATCH 0296/8469] Merged in code from the 0.1.5 release to handle IOError and OSError exceptions better. --- core.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core.py b/core.py index 814f4418c1..4b6969284b 100644 --- a/core.py +++ b/core.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" -import sys +import sys, os from types import * from distutils.errors import * from distutils.dist import Distribution @@ -89,13 +89,19 @@ def setup (**attrs): dist.run_commands () except KeyboardInterrupt: raise SystemExit, "interrupted" - except (OSError, IOError), exc: - # arg, try to work with Python pre-1.5.2 + except (IOError, os.error), exc: + # check for Python 1.5.2-style {IO,OS}Error exception objects if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): - raise SystemExit, \ - "error: %s: %s" % (exc.filename, exc.strerror) + if exc.filename: + raise SystemExit, \ + "error: %s: %s" % (exc.filename, exc.strerror) + else: + # two-argument functions in posix module don't + # include the filename in the exception object! + raise SystemExit, \ + "error: %s" % exc.strerror else: - raise SystemExit, str (exc) + raise SystemExit, "error: " + exc[-1] except (DistutilsExecError, DistutilsFileError, DistutilsOptionError), msg: From c0aaf184cfb98c03241a7a455720f56074e1877d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 15:14:58 +0000 Subject: [PATCH 0297/8469] Merged in Python 1.5.1 compatibility changes from the 0.1.3 branch: added 'abspath()' and 'extend()'. --- util.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/util.py b/util.py index be3a1d6e0f..9c436b9474 100644 --- a/util.py +++ b/util.py @@ -18,6 +18,30 @@ from distutils.archive_util import * +# Need to define 'abspath()', because it was new with Python 1.5.2 +if hasattr (os.path, 'abspath'): + abspath = os.path.abspath +else: + def abspath(path): + if not os.path.isabs(path): + path = os.path.join(os.getcwd(), path) + return os.path.normpath(path) + + +# More backwards compatability hacks +def extend (list, new_list): + """Appends the list 'new_list' to 'list', just like the 'extend()' + list method does in Python 1.5.2 -- but this works on earlier + versions of Python too.""" + + if hasattr (list, 'extend'): + list.extend (new_list) + else: + list[len(list):] = new_list + +# extend () + + def get_platform (): """Return a string (suitable for tacking onto directory names) that identifies the current platform. Under Unix, identifies both the OS From 32155114f6d362c883a9d0f7e337ab91bf7a2187 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 22 Apr 2000 15:17:14 +0000 Subject: [PATCH 0298/8469] Sporadic, untested Python 1.5.1 compatibility changes. --- file_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_util.py b/file_util.py index 91545abb18..32245109d5 100644 --- a/file_util.py +++ b/file_util.py @@ -141,7 +141,7 @@ def copy_file (src, dst, import macostools try: macostools.copy (src, dst, 0, preserve_times) - except OSError, exc: + except os.error, exc: raise DistutilsFileError, \ "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) From cc06f983649b572614316eeaf64846a5dcecd5bf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 23 Apr 2000 02:50:45 +0000 Subject: [PATCH 0299/8469] Patch from Harry Henry Gebel: fix two stupid bugs in help-printing stuff. --- fancy_getopt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 629da29eef..39450e8079 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -304,7 +304,7 @@ def get_option_order (self): return self.option_order - def generate_help (header=None): + def generate_help (self, header=None): """Generate help text (a list of strings, one per suggested line of output) from the option table for this FancyGetopt object.""" @@ -388,7 +388,7 @@ def generate_help (header=None): # generate_help () - def print_help (self, file=None, header=None): + def print_help (self, header=None, file=None): if file is None: file = sys.stdout for line in self.generate_help (header): From 2db555c9b072cb91541f1f9a98d3398fde1a8601 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 25 Apr 2000 01:33:11 +0000 Subject: [PATCH 0300/8469] Lyle Johnson: fixed broken logic in 'native_path()'. --- util.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util.py b/util.py index 9c436b9474..ca20ae047a 100644 --- a/util.py +++ b/util.py @@ -72,13 +72,13 @@ def native_path (pathname): raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname - if os.sep != '/' and os.sep in pathname: - raise ValueError, \ - "path '%s' cannot contain '%c' character" % \ - (pathname, os.sep) - - paths = string.split (pathname, '/') - return apply (os.path.join, paths) + if os.sep != '/': + if os.sep in pathname: + raise ValueError, \ + "path '%s' cannot contain '%c' character" % (pathname, os.sep) + else: + paths = string.split (pathname, '/') + return apply (os.path.join, paths) else: return pathname From b2fe902127ca56285d80dbc3befd671ad467ba7c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 25 Apr 2000 01:38:20 +0000 Subject: [PATCH 0301/8469] Harry Henry Gebel: Adds bztar format to generate .tar.bz2 tarballs Uses the -f argument to overright old tarballs automatically, I am assuming that if the old tarball was wanted it would have been moved or else the version number would have been changed. Uses the -9 argument to bzip2 and gzip to use maximum compression. Compress uses the maximum compression by default. Tests for correct value for the 'compress' argument of make_tarball. This is one less place for someone adding new compression programs to forget to change. --- archive_util.py | 24 ++++++++++++++++-------- command/bdist.py | 4 +++- command/sdist.py | 3 +-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/archive_util.py b/archive_util.py index bae425be06..050ea41796 100644 --- a/archive_util.py +++ b/archive_util.py @@ -15,12 +15,12 @@ def make_tarball (base_name, base_dir, compress="gzip", verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under - 'base_dir'. 'compress' must be "gzip" (the default), "compress", or - None. Both "tar" and the compression utility named by 'compress' - must be on the default program search path, so this is probably - Unix-specific. The output tar file will be named 'base_dir' + - ".tar", possibly plus the appropriate compression extension - (".gz" or ".Z"). Return the output filename.""" + 'base_dir'. 'compress' must be "gzip" (the default), "compress", + "bzip2", or None. Both "tar" and the compression utility named by + 'compress' must be on the default program search path, so this is + probably Unix-specific. The output tar file will be named 'base_dir' + + ".tar", possibly plus the appropriate compression extension (".gz", + ".bz2" or ".Z"). Return the output filename.""" # XXX GNU tar 1.13 has a nifty option to add a prefix directory. # It's pretty new, though, so we certainly can't require it -- @@ -29,9 +29,15 @@ def make_tarball (base_name, base_dir, compress="gzip", # detect GNU tar to use its 'z' option and save a step.) compress_ext = { 'gzip': ".gz", + 'bzip2': '.bz2', 'compress': ".Z" } + + # flags for compression program, each element of list will be an argument + compress_flags = {'gzip': ["-f9"], + 'compress': ["-f"], + 'bzip2': ['-f9']} - if compress is not None and compress not in ('gzip', 'compress'): + if compress is not None and compress not in compress_ext.keys(): raise ValueError, \ "bad value for 'compress': must be None, 'gzip', or 'compress'" @@ -40,7 +46,8 @@ def make_tarball (base_name, base_dir, compress="gzip", spawn (cmd, verbose=verbose, dry_run=dry_run) if compress: - spawn ([compress, archive_name], verbose=verbose, dry_run=dry_run) + spawn ([compress] + compress_flags[compress] + [archive_name], + verbose=verbose, dry_run=dry_run) return archive_name + compress_ext[compress] else: return archive_name @@ -104,6 +111,7 @@ def visit (z, dirname, names): ARCHIVE_FORMATS = { 'gztar': (make_tarball, [('compress', 'gzip')]), + 'bztar': (make_tarball, [('compress', 'bzip2')]), 'ztar': (make_tarball, [('compress', 'compress')]), 'tar': (make_tarball, [('compress', None)]), 'zip': (make_zipfile, []) diff --git a/command/bdist.py b/command/bdist.py index 685f52508e..cde8dd63e8 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -18,7 +18,8 @@ class bdist (Command): description = "create a built (binary) distribution" user_options = [('format=', 'f', - "format for distribution (tar, ztar, gztar, zip, ... )"), + "format for distribution " + + "(tar, ztar, gztar, bztar, zip, ... )"), ] # This won't do in reality: will need to distinguish RPM-ish Linux, @@ -27,6 +28,7 @@ class bdist (Command): 'nt': 'zip', } format_command = { 'gztar': 'bdist_dumb', + 'bztar': 'bdist_dumb', 'ztar': 'bdist_dumb', 'tar': 'bdist_dumb', 'zip': 'bdist_dumb', } diff --git a/command/sdist.py b/command/sdist.py index 8aa4618ecc..8d9a4650bd 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -33,9 +33,8 @@ class sdist (Command): "just regenerate the manifest and then stop"), ('force-manifest', None, "forcibly regenerate the manifest and carry on as usual"), - ('formats=', None, - "formats for source distribution (tar, ztar, gztar, or zip)"), + "formats for source distribution (tar, ztar, gztar, bztar, or zip)"), ('keep-tree', 'k', "keep the distribution tree around after creating " + "archive file(s)"), From 9bf82f12921aae17ef321f30eb613aa3678ca513 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 25 Apr 2000 01:55:58 +0000 Subject: [PATCH 0302/8469] Bumped version to 0.8.2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 5b8a662888..32fc276c40 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.8.1" +__version__ = "0.8.2" From 622804da554351a32c6a379badb7520673a38060 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 26 Apr 2000 01:12:40 +0000 Subject: [PATCH 0303/8469] Harry Henry Gebel: Fix 'sdist.write_manifest()' to respect the value of dry_run. --- command/sdist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 8d9a4650bd..67917188de 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,7 +11,8 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import newer, create_tree, remove_tree, native_path +from distutils.util import newer, create_tree, remove_tree, native_path, \ + write_file from distutils.archive_util import check_archive_formats from distutils.text_file import TextFile from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -447,10 +448,9 @@ def write_manifest (self): by 'find_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'.""" - manifest = open (self.manifest, "w") - for fn in self.files: - manifest.write (fn + '\n') - manifest.close () + self.execute(write_file, + (self.manifest, self.files), + "writing manifest file") # write_manifest () From ed0fd8fbc0c9d218ea3c1dfd6d64936c790080d9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 26 Apr 2000 01:14:33 +0000 Subject: [PATCH 0304/8469] Supply short form for --manifest-only (-o) and --force-manifest (-f) options. --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 67917188de..f644e9fbfb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -30,9 +30,9 @@ class sdist (Command): ('use-defaults', None, "include the default file set in the manifest " "[default; disable with --no-defaults]"), - ('manifest-only', None, + ('manifest-only', 'o', "just regenerate the manifest and then stop"), - ('force-manifest', None, + ('force-manifest', 'f', "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, "formats for source distribution (tar, ztar, gztar, bztar, or zip)"), From 36f1d229a8213decc8b304e83dc49b81739b8e4d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 26 Apr 2000 02:26:55 +0000 Subject: [PATCH 0305/8469] Harry Henry Gebel: add 'long_description' to DistributionMetadata. --- dist.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 4a83c794ff..ae95009fee 100644 --- a/dist.py +++ b/dist.py @@ -89,6 +89,8 @@ class Distribution: "alias for --licence"), ('description', None, "print the package description"), + ('long-description', None, + "print the long package description"), ] display_option_names = map(lambda x: string.translate(x[0], longopt_xlate), display_options) @@ -638,6 +640,7 @@ def __init__ (self): self.url = None self.licence = None self.description = None + self.long_description = None # -- Metadata query methods ---------------------------------------- @@ -680,7 +683,10 @@ def get_licence(self): def get_description(self): return self.description or "UNKNOWN" - + + def get_long_description(self): + return self.long_description or "UNKNOWN" + # class DistributionMetadata if __name__ == "__main__": From c5f056b71b4498a249e5af284d31ea665ebd2a52 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 26 Apr 2000 02:29:51 +0000 Subject: [PATCH 0306/8469] Harry Henry Gebel: import exception classes. --- command/bdist_dumb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 0a68d00a09..23672a63e4 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -11,7 +11,7 @@ import os from distutils.core import Command from distutils.util import get_platform, create_tree, remove_tree - +from distutils.errors import * class bdist_dumb (Command): From 48f223a6efaadc98c4e9dd36f41f5f769a0db99d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 26 Apr 2000 02:38:01 +0000 Subject: [PATCH 0307/8469] Hacked things up a bit so that configuration variables are expanded in command-line options, and in two phases at that: first, we expand 'install_base' and 'install_platbase', and then the other 'install_*' options. This lets us do tricky stuff like install --prefix='/tmp$sys_prefix' ...oooh, neat. Simplified 'select_scheme()' -- it's no longer responsible for expanding config vars, tildes, etc. Define installation-specific config vars in 'self.config_vars', rather than in a local dictionary of one method. Also factored '_expand_attrs()' out of 'expand_dirs()' and added 'expand_basedirs()'. Added a bunch of debugging output so I (and others) can judge the success of this crazy scheme through direct feedback. --- command/install.py | 79 ++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/command/install.py b/command/install.py index 995fd875c3..98b08cd7c6 100644 --- a/command/install.py +++ b/command/install.py @@ -9,6 +9,7 @@ import sys, os, string from types import * from distutils.core import Command +from distutils import sysconfig from distutils.util import write_file, native_path, subst_vars from distutils.errors import DistutilsOptionError @@ -182,15 +183,47 @@ def finalize_options (self): # install_{purelib,platlib,lib,scripts,data,...}, and the # INSTALL_SCHEME dictionary above. Phew! + from pprint import pprint + print "pre-finalize:" + pprint (self.__dict__) + if os.name == 'posix': self.finalize_unix () else: self.finalize_other () + print "post-finalize:" + pprint (self.__dict__) + + # Expand configuration variables, tilde, etc. in self.install_base + # and self.install_platbase -- that way, we can use $base or + # $platbase in the other installation directories and not worry + # about needing recursive variable expansion (shudder). + + self.config_vars = {'py_version_short': sys.version[0:3], + 'sys_prefix': sysconfig.PREFIX, + 'sys_exec_prefix': sysconfig.EXEC_PREFIX, + } + self.expand_basedirs () + + print "post-expand_basedirs:" + pprint (self.__dict__) + + # Now define config vars for the base directories so we can expand + # everything else. + self.config_vars['base'] = self.install_base + self.config_vars['platbase'] = self.install_platbase + + print "config vars:" + pprint (self.config_vars) + # Expand "~" and configuration variables in the installation # directories. self.expand_dirs () + print "post-expand:" + pprint (self.__dict__) + # Pick the actual directory to install all modules to: either # install_purelib or install_platlib, depending on whether this # module distribution is pure or not. Of course, if the user @@ -288,40 +321,32 @@ def finalize_other (self): # Windows and Mac OS for now def select_scheme (self, name): - - # "select a scheme" means: - # - set install-base and install-platbase - # - subst. base/platbase/version into the values of the - # particular scheme dictionary - # - use the resultings strings to set install-lib, etc. - # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] - - vars = { 'base': self.install_base, - 'platbase': self.install_platbase, - 'py_version_short': sys.version[0:3], - } - for key in ('purelib', 'platlib', 'scripts', 'data'): - val = subst_vars (scheme[key], vars) - setattr (self, 'install_' + key, val) + setattr (self, 'install_' + key, scheme[key]) - def expand_dirs (self): + def _expand_attrs (self, attrs): + for attr in attrs: + val = getattr (self, attr) + if val is not None: + if os.name == 'posix': + val = os.path.expanduser (val) + val = subst_vars (val, self.config_vars) + setattr (self, attr, val) - # XXX probably don't want to 'expanduser()' on Windows or Mac - # XXX should use 'util.subst_vars()' with our own set of - # configuration variables - for att in ('base', 'platbase', - 'purelib', 'platlib', 'lib', - 'scripts', 'data'): - fullname = "install_" + att - val = getattr (self, fullname) - if val is not None: - setattr (self, fullname, - os.path.expandvars (os.path.expanduser (val))) + def expand_basedirs (self): + self._expand_attrs (['install_base', + 'install_platbase']) + + def expand_dirs (self): + self._expand_attrs (['install_purelib', + 'install_platlib', + 'install_lib', + 'install_scripts', + 'install_data',]) def handle_extra_path (self): From 6becff488178f722e192b09ba308afb6417ec772 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Apr 2000 01:53:46 +0000 Subject: [PATCH 0308/8469] Added 'change_root()' to forcibly slap a new root directory onto a pathname, even if it's already absolute. Currently only implemented for Unix; I'm not entirely sure of the right thing to do for DOS/Windows, and have no clue what to do for Mac OS. --- util.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/util.py b/util.py index ca20ae047a..8e642e16c6 100644 --- a/util.py +++ b/util.py @@ -85,6 +85,32 @@ def native_path (pathname): # native_path () +def change_root (new_root, pathname): + + """Return 'pathname' with 'new_root' prepended. If 'pathname' is + relative, this is equivalent to "os.path.join(new_root,pathname)". + Otherwise, it requires making 'pathname' relative and then joining the + two, which is tricky on DOS/Windows and Mac OS.""" + + if not abspath (pathname): + return os.path.join (new_root, pathname) + + elif os.name == 'posix': + return os.path.join (new_root, pathname[1:]) + + elif os.name == 'nt': + (root_drive, root_path) = os.path.splitdrive (new_root) + (drive, path) = os.path.splitdrive (pathname) + raise RuntimeError, "I give up -- not sure how to do this on Windows" + + elif os.name == 'mac': + raise RuntimeError, "no clue how to do this on Mac OS" + + else: + raise DistutilsPlatformError, \ + "nothing known about platform '%s'" % os.name + + def _check_environ (): """Ensure that 'os.environ' has all the environment variables we guarantee that users can use in config files, command-line From edd515dffffa31cf704c25c1bd4138ba4f6c85d1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Apr 2000 01:56:38 +0000 Subject: [PATCH 0309/8469] Added the "--root" option as a sort of meta-install-base; if supplied, it is forcibly prepended onto all installation directories, even if they are already absolute. Added 'dump_dirs()' to clean up the debug output a bit. --- command/install.py | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/command/install.py b/command/install.py index 98b08cd7c6..c70ed9a1d1 100644 --- a/command/install.py +++ b/command/install.py @@ -10,7 +10,7 @@ from types import * from distutils.core import Command from distutils import sysconfig -from distutils.util import write_file, native_path, subst_vars +from distutils.util import write_file, native_path, subst_vars, change_root from distutils.errors import DistutilsOptionError INSTALL_SCHEMES = { @@ -60,6 +60,8 @@ class install (Command): ('install-platbase=', None, "base installation directory for platform-specific files " + "(instead of --exec-prefix or --home)"), + ('root=', None, + "install everything relative to this alternate root directory"), # Or, explicitly set the installation scheme ('install-purelib=', None, @@ -104,6 +106,7 @@ def initialize_options (self): # the --install-{platlib,purelib,scripts,data} options). self.install_base = None self.install_platbase = None + self.root = None # These options are the actual installation directories; if not # supplied by the user, they are filled in using the installation @@ -183,17 +186,14 @@ def finalize_options (self): # install_{purelib,platlib,lib,scripts,data,...}, and the # INSTALL_SCHEME dictionary above. Phew! - from pprint import pprint - print "pre-finalize:" - pprint (self.__dict__) + self.dump_dirs ("pre-finalize_xxx") if os.name == 'posix': self.finalize_unix () else: self.finalize_other () - print "post-finalize:" - pprint (self.__dict__) + self.dump_dirs ("post-finalize_xxx()") # Expand configuration variables, tilde, etc. in self.install_base # and self.install_platbase -- that way, we can use $base or @@ -206,14 +206,14 @@ def finalize_options (self): } self.expand_basedirs () - print "post-expand_basedirs:" - pprint (self.__dict__) + self.dump_dirs ("post-expand_basedirs()") # Now define config vars for the base directories so we can expand # everything else. self.config_vars['base'] = self.install_base self.config_vars['platbase'] = self.install_platbase + from pprint import pprint print "config vars:" pprint (self.config_vars) @@ -221,8 +221,7 @@ def finalize_options (self): # directories. self.expand_dirs () - print "post-expand:" - pprint (self.__dict__) + self.dump_dirs ("post-expand_dirs()") # Pick the actual directory to install all modules to: either # install_purelib or install_platlib, depending on whether this @@ -242,6 +241,16 @@ def finalize_options (self): self.install_libbase = self.install_lib # needed for .pth file self.install_lib = os.path.join (self.install_lib, self.extra_dirs) + # If a new root directory was supplied, make all the installation + # dirs relative to it. + if self.root is not None: + for name in ('lib', 'purelib', 'platlib', 'scripts', 'data'): + attr = "install_" + name + new_val = change_root (self.root, getattr (self, attr)) + setattr (self, attr, new_val) + + self.dump_dirs ("after prepending root") + # Find out the build directories, ie. where to install from. self.set_undefined_options ('build', ('build_base', 'build_base'), @@ -253,6 +262,16 @@ def finalize_options (self): # finalize_options () + # hack for debugging output + def dump_dirs (self, msg): + from distutils.fancy_getopt import longopt_xlate + print msg + ":" + for opt in self.user_options: + opt_name = string.translate (opt[0][0:-1], longopt_xlate) + val = getattr (self, opt_name) + print " %s: %s" % (opt_name, val) + + def finalize_unix (self): if self.install_base is not None or self.install_platbase is not None: @@ -339,7 +358,8 @@ def _expand_attrs (self, attrs): def expand_basedirs (self): self._expand_attrs (['install_base', - 'install_platbase']) + 'install_platbase', + 'root']) def expand_dirs (self): self._expand_attrs (['install_purelib', From 671dda81fc33e545e873e0e5c3b8d81db93a2deb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 6 May 2000 13:12:59 +0000 Subject: [PATCH 0310/8469] Added the ability to sneak extra flags onto the C compiler command line via an 'extra_compile_args' option in the 'build_info' dictionary. --- command/build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 422b8cae1f..a430c2b3cf 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -289,11 +289,13 @@ def build_extensions (self): # precedent!) macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') + extra_args = build_info.get ('extra_compile_args') objects = self.compiler.compile (sources, output_dir=self.build_temp, macros=macros, include_dirs=include_dirs, - debug=self.debug) + debug=self.debug, + extra_postargs=extra_args) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things From d5ac3b7d4bbd40e5f118c04f768a4ece54b43d55 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 7 May 2000 15:29:15 +0000 Subject: [PATCH 0311/8469] Got rid of some little-used and not-very-useful methods: 'get_option()' and 'get_options()'. --- cmd.py | 47 +++-------------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/cmd.py b/cmd.py index d8e413798e..abb23c9fb2 100644 --- a/cmd.py +++ b/cmd.py @@ -157,47 +157,6 @@ def announce (self, msg, level=1): print msg - # -- Option query/set methods -------------------------------------- - - def get_option (self, option): - """Return the value of a single option for this command. Raise - AttributeError if 'option' is not known.""" - return getattr (self, option) - - - def get_options (self, *options): - """Return (as a tuple) the values of several options for this - command. Raise AttributeError if any of the options in - 'options' are not known.""" - - values = [] - for opt in options: - values.append (getattr (self, opt)) - - return tuple (values) - - - def set_option (self, option, value): - """Set the value of a single option for this command. Raise - AttributeError if 'option' is not known.""" - - if not hasattr (self, option): - raise AttributeError, \ - "command '%s': no such option '%s'" % \ - (self.get_command_name(), option) - if value is not None: - setattr (self, option, value) - - def set_options (self, **optval): - """Set the values of several options for this command. Raise - AttributeError if any of the options specified as - keyword arguments are not known.""" - - for k in optval.keys(): - if optval[k] is not None: - self.set_option (k, optval[k]) - - # -- Convenience methods for commands ------------------------------ def get_command_name (self): @@ -228,8 +187,8 @@ def set_undefined_options (self, src_cmd, *option_pairs): src_cmd_obj.ensure_ready () for (src_option, dst_option) in option_pairs: if getattr (self, dst_option) is None: - self.set_option (dst_option, - src_cmd_obj.get_option (src_option)) + setattr (self, dst_option, + getattr (src_cmd_obj, src_option)) def find_peer (self, command, create=1): @@ -247,7 +206,7 @@ def get_peer_option (self, command, option): its 'option' option.""" cmd_obj = self.find_peer (command) - return cmd_obj.get_option (option) + return getattr(cmd_obj, option) def run_peer (self, command): From f1d400d10a1f601cc70a56c403a039bc3e9661b1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 7 May 2000 15:30:31 +0000 Subject: [PATCH 0312/8469] Got rid of several little-used and not-very-useful methods: 'get_option()', 'get_options()', 'get_command_option()', 'get_command_options()'. --- dist.py | 49 ++----------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/dist.py b/dist.py index ae95009fee..f1ac35e48f 100644 --- a/dist.py +++ b/dist.py @@ -261,8 +261,8 @@ def parse_command_line (self, args): raise DistutilsArgError, msg # Require that the command class be derived from Command -- - # that way, we can be sure that we at least have the 'run' - # and 'get_option' methods. + # want to be sure that the basic "command" interface is + # implemented. if not isinstance (cmd_obj, Command): raise DistutilsClassError, \ "command class %s must subclass Command" % \ @@ -529,24 +529,6 @@ def run_commands (self): self.run_command (cmd) - def get_option (self, option): - """Return the value of a distribution option. Raise - AttributeError if 'option' is not known.""" - return getattr (self, opt) - - - def get_options (self, *options): - """Return (as a tuple) the values of several distribution - options. Raise AttributeError if any element of - 'options' is not known.""" - - values = [] - for opt in options: - values.append (getattr (self, opt)) - - return tuple (values) - - # -- Methods that operate on its Commands -------------------------- def run_command (self, command): @@ -570,33 +552,6 @@ def run_command (self, command): self.have_run[command] = 1 - def get_command_option (self, command, option): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - the value of its 'option' option. Raise AttributeError if - 'option' is not known for that 'command'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - return cmd_obj.get_option (option) - - - def get_command_options (self, command, *options): - """Create a command object for 'command' if necessary, ensure that - its option values are all set to their final values, and return - a tuple containing the values of all the options listed in - 'options' for that command. Raise DistutilsOptionError if any - invalid option is supplied in 'options'.""" - - cmd_obj = self.find_command_obj (command) - cmd_obj.ensure_ready () - values = [] - for opt in options: - values.append (getattr (cmd_obj, option)) - - return tuple (values) - - # -- Distribution query methods ------------------------------------ def has_pure_modules (self): From f60583c2d16f6fce44276326164967fcb0ccd965 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 7 May 2000 15:32:13 +0000 Subject: [PATCH 0313/8469] Don't use 'set_option()' or 'get_option()' method -- direct attribute access, or getattr/setattr, is all that's needed. --- command/bdist.py | 2 +- command/install_lib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index cde8dd63e8..01b4e162d3 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -64,7 +64,7 @@ def run (self): "invalid archive format '%s'" % self.format sub_cmd = self.find_peer (cmd_name) - sub_cmd.set_option ('format', self.format) + sub_cmd.format = self.format self.run_peer (cmd_name) # run() diff --git a/command/install_lib.py b/command/install_lib.py index 5740c5eed2..852e3f63a2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -79,7 +79,7 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): build_cmd = self.find_peer (build_cmd) build_files = build_cmd.get_outputs() - build_dir = build_cmd.get_option (cmd_option) + build_dir = getattr (build_cmd, cmd_option) prefix_len = len (build_dir) + len (os.sep) outputs = [] From 6ef49c947019b2eb196a1e735e0e231ad60cc8f6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 9 May 2000 01:50:41 +0000 Subject: [PATCH 0314/8469] Added comment about the MSVC-specific kludge. --- command/build_ext.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index a430c2b3cf..b234b9199a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -308,6 +308,16 @@ def build_extensions (self): rpath = build_info.get ('rpath') extra_args = build_info.get ('extra_link_args') or [] + # XXX this is a kludge! Knowledge of specific compilers or + # platforms really doesn't belong here; in an ideal world, the + # CCompiler interface would provide access to everything in a + # compiler/linker system needs to build Python extensions, and + # we would just do everything nicely and cleanly through that + # interface. However, this is a not an ideal world and the + # CCompiler interface doesn't handle absolutely everything. + # Thus, kludges like this slip in occasionally. (This is no + # excuse for committing more platform- and compiler-specific + # kludges; they are to be avoided if possible!) if self.compiler.compiler_type == 'msvc': def_file = build_info.get ('def_file') if def_file is None: From 46983102defd6428d66f50100e05d7746325b419 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:33:14 +0000 Subject: [PATCH 0315/8469] Fix from Lyle Johnson: add the '--compiler' option. --- command/build.py | 5 ++++- command/build_clib.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/command/build.py b/command/build.py index 7fb0b56657..7d753b1126 100644 --- a/command/build.py +++ b/command/build.py @@ -26,10 +26,12 @@ class build (Command): "build-purelib or build-platlib"), ('build-temp=', 't', "temporary build directory"), + ('compiler=', 'c', + "specify the compiler type"), ('debug', 'g', "compile extensions and libraries with debugging information"), ('force', 'f', - "forcibly build everything (ignore file timestamps"), + "forcibly build everything (ignore file timestamps)"), ] def initialize_options (self): @@ -40,6 +42,7 @@ def initialize_options (self): self.build_platlib = None self.build_lib = None self.build_temp = None + self.compiler = None self.debug = None self.force = 0 diff --git a/command/build_clib.py b/command/build_clib.py index 31170730e6..681cd76b56 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -38,7 +38,9 @@ class build_clib (Command): ('debug', 'g', "compile with debugging information"), ('force', 'f', - "forcibly build everything (ignore file timestamps"), + "forcibly build everything (ignore file timestamps)"), + ('compiler=', 'c', + "specify the compiler type"), ] def initialize_options (self): @@ -54,6 +56,7 @@ def initialize_options (self): self.undef = None self.debug = None self.force = 0 + self.compiler = None # initialize_options() @@ -68,6 +71,7 @@ def finalize_options (self): self.set_undefined_options ('build', ('build_temp', 'build_clib'), ('build_temp', 'build_temp'), + ('compiler', 'compiler'), ('debug', 'debug'), ('force', 'force')) @@ -93,9 +97,11 @@ def run (self): return # Yech -- this is cut 'n pasted from build_ext.py! - self.compiler = new_compiler (verbose=self.verbose, + self.compiler = new_compiler (compiler=self.compiler, + verbose=self.verbose, dry_run=self.dry_run, force=self.force) + if self.include_dirs is not None: self.compiler.set_include_dirs (self.include_dirs) if self.define is not None: From 7a4246d402981cf4382d566232f9f7100ed00572 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:34:12 +0000 Subject: [PATCH 0316/8469] Fix from Lyle Johnson: add the '--compiler' option. Also added creation of 'implib_dir', a temporary directory specific to MSVC++ -- but I checked in two ways of fixing it (Lyle's and mine), because I'm not sure which is right. --- command/build_ext.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index b234b9199a..2142d05fdc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -67,7 +67,9 @@ class build_ext (Command): ('debug', 'g', "compile/link with debugging information"), ('force', 'f', - "forcibly build everything (ignore file timestamps"), + "forcibly build everything (ignore file timestamps)"), + ('compiler=', 'c', + "specify the compiler type"), ] @@ -87,6 +89,7 @@ def initialize_options (self): self.link_objects = None self.debug = None self.force = None + self.compiler = None def finalize_options (self): @@ -95,6 +98,7 @@ def finalize_options (self): self.set_undefined_options ('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), + ('compiler', 'compiler'), ('debug', 'debug'), ('force', 'force')) @@ -169,7 +173,8 @@ def run (self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (verbose=self.verbose, + self.compiler = new_compiler (compiler=self.compiler, + verbose=self.verbose, dry_run=self.dry_run, force=self.force) @@ -340,6 +345,10 @@ def build_extensions (self): implib_dir = os.path.join(self.build_temp,\ self.get_ext_libname(extension_name)) extra_args.append ('/IMPLIB:' + implib_dir) + + # XXX arg, which of these is correct? + self.mkpath(implib_dir) + self.mkpath(os.path.dirname(implib_dir)) # if MSVC fullname = self.get_ext_fullname (extension_name) From 61b34f69cabd9929f8c6c7d3d7141acec8fb817c Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:40:00 +0000 Subject: [PATCH 0317/8469] Made 'check_environ()' "public" by stripping the leading underscore; added a global '_environ_checked' so we know if it's already been called. --- util.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 8e642e16c6..b660b4bf2b 100644 --- a/util.py +++ b/util.py @@ -111,7 +111,8 @@ def change_root (new_root, pathname): "nothing known about platform '%s'" % os.name -def _check_environ (): +_environ_checked = 0 +def check_environ (): """Ensure that 'os.environ' has all the environment variables we guarantee that users can use in config files, command-line options, etc. Currently this includes: @@ -120,6 +121,10 @@ def _check_environ (): and OS (see 'get_platform()') """ + global _environ_checked + if _environ_checked: + return + if os.name == 'posix' and not os.environ.has_key('HOME'): import pwd os.environ['HOME'] = pwd.getpwuid (os.getuid())[5] @@ -127,6 +132,8 @@ def _check_environ (): if not os.environ.has_key('PLAT'): os.environ['PLAT'] = get_platform () + _environ_checked = 1 + def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. @@ -138,7 +145,7 @@ def subst_vars (str, local_vars): '_check_environ()'. Raise ValueError for any variables not found in either 'local_vars' or 'os.environ'.""" - _check_environ () + check_environ () def _subst (match, local_vars=local_vars): var_name = match.group(1) if local_vars.has_key (var_name): From a5a461bdbf26a573b747000752c03ff9dbf58819 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:41:33 +0000 Subject: [PATCH 0318/8469] Preliminary support for config files: - added 'find_config_files()' and 'parse_config_files()' methods - added 'command_options' attribute Comment/docstring updates. --- dist.py | 94 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 12 deletions(-) diff --git a/dist.py b/dist.py index f1ac35e48f..a0c6c9ea3d 100644 --- a/dist.py +++ b/dist.py @@ -8,11 +8,12 @@ __revision__ = "$Id$" -import sys, string, re +import sys, os, string, re from types import * from copy import copy from distutils.errors import * from distutils.fancy_getopt import FancyGetopt, longopt_xlate +from distutils.util import check_environ # Regex to define acceptable Distutils command names. This is not *quite* @@ -137,6 +138,11 @@ def __init__ (self, attrs=None): # for the setup script to override command classes self.cmdclass = {} + # Store options for commands here between parsing them (from config + # files, the command-line, etc.) and actually putting them into the + # command object that needs them. + self.command_options = {} + # These options are really the business of various commands, rather # than of the Distribution itself. We provide aliases for them in # Distribution as a convenience to the developer. @@ -201,6 +207,74 @@ def __init__ (self, attrs=None): # __init__ () + def find_config_files (self): + """Find as many configuration files as should be processed for this + platform, and return a list of filenames in the order in which they + should be parsed. The filenames returned are guaranteed to exist + (modulo nasty race conditions). + + On Unix, there are three possible config files: pydistutils.cfg in + the Distutils installation directory (ie. where the top-level + Distutils __inst__.py file lives), .pydistutils.cfg in the user's + home directory, and setup.cfg in the current directory. + + On Windows and Mac OS, there are two possible config files: + pydistutils.cfg in the Python installation directory (sys.prefix) + and setup.cfg in the current directory.""" + + files = [] + if os.name == "posix": + check_environ() + + sys_dir = os.path.dirname(sys.modules['distutils'].__file__) + sys_file = os.path.join(sys_dir, "pydistutils.cfg") + if os.path.isfile(sys_file): + files.append(sys_file) + + user_file = os.path.join(os.environ.get('HOME'), + ".pydistutils.cfg") + if os.path.isfile(user_file): + files.append(user_file) + + else: + sys_file = os.path.join (sysconfig.PREFIX, "pydistutils.cfg") + if os.path.isfile(sys_file): + files.append(sys_file) + + # All platforms support local setup.cfg + local_file = "setup.cfg" + if os.path.isfile(local_file): + files.append(local_file) + + return files + + # find_config_files () + + + def parse_config_files (self, filenames=None): + + from ConfigParser import ConfigParser + + if filenames is None: + filenames = self.find_config_files() + + parser = ConfigParser() + parser.read(filenames) + for section in parser.sections(): + options = parser.options(section) + if not self.command_options.has_key(section) is None: + self.command_options[section] = {} + cmd_opts = self.command_options[section] + + for opt in options: + if opt != '__name__': + cmd_opts[opt] = parser.get(section,opt) + + from pprint import pprint + print "configuration options:" + pprint (self.command_options) + + def parse_command_line (self, args): """Parse the setup script's command line: set any Distribution attributes tied to command-line options, create all command @@ -436,18 +510,14 @@ def print_commands (self): # -- Command class/object methods ---------------------------------- - # This is a method just so it can be overridden if desired; it doesn't - # actually use or change any attributes of the Distribution instance. def find_command_class (self, command): - """Given a command, derives the names of the module and class - expected to implement the command: eg. 'foo_bar' becomes - 'distutils.command.foo_bar' (the module) and 'FooBar' (the - class within that module). Loads the module, extracts the - class from it, and returns the class object. - - Raises DistutilsModuleError with a semi-user-targeted error - message if the expected module could not be loaded, or the - expected class was not found in it.""" + """Given a command name, attempts to load the module and class that + implements that command. This is done by importing a module + "distutils.command." + command, and a class named 'command' in that + module. + + Raises DistutilsModuleError if the expected module could not be + found, or if that module does not define the expected class.""" module_name = 'distutils.command.' + command klass_name = command From a228f136965785d37f5d53b274e92a9fb73ba007 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:42:19 +0000 Subject: [PATCH 0319/8469] Call 'parse_config_files()' at the appropriate point. Tweaked error-generating code. --- core.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core.py b/core.py index 4b6969284b..a39bccd307 100644 --- a/core.py +++ b/core.py @@ -71,11 +71,11 @@ def setup (**attrs): # (ie. everything except distclass) to initialize it dist = klass (attrs) - # If we had a config file, this is where we would parse it: override - # the client-supplied command options, but be overridden by the - # command line. - - # Parse the command line; any command-line errors are the end-users + # Find and parse the config file(s): they will override options from + # the setup script, but be overridden by the command line. + dist.parse_config_files() + + # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. try: ok = dist.parse_command_line (sys.argv[1:]) @@ -101,10 +101,10 @@ def setup (**attrs): raise SystemExit, \ "error: %s" % exc.strerror else: - raise SystemExit, "error: " + exc[-1] + raise SystemExit, "error: " + str(exc[-1]) except (DistutilsExecError, DistutilsFileError, DistutilsOptionError), msg: - raise SystemExit, "error: " + str (msg) + raise SystemExit, "error: " + str(msg) # setup () From 316a284532e000c26f077afbbdfbd6640b077210 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 00:52:23 +0000 Subject: [PATCH 0320/8469] Patch from Bastien Kleineidam: adds the 'install_data' and 'install_scripts' commands; these two are trivial thanks to the 'install_misc' base class in cmd.py. (Minor tweaks and commentary by me; the code is untested so far.) --- cmd.py | 30 ++++++++++++++++++++++++++++++ command/__init__.py | 2 ++ command/install.py | 5 ++++- command/install_data.py | 14 ++++++++++++++ command/install_scripts.py | 16 ++++++++++++++++ dist.py | 2 ++ 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 command/install_data.py create mode 100644 command/install_scripts.py diff --git a/cmd.py b/cmd.py index abb23c9fb2..393734401d 100644 --- a/cmd.py +++ b/cmd.py @@ -344,5 +344,35 @@ def make_file (self, infiles, outfile, func, args, # class Command +class install_misc (Command): + """Common base class for installing some files in a subdirectory. + Currently used by install_data and install_scripts. + """ + + user_options = [('install-dir=', 'd', "directory to install the files to")] + + def initialize_options (self): + self.install_dir = None + self.outfiles = None + + def _install_dir_from(self, dirname): + self.set_undefined_options('install', (dirname, 'install_dir')) + + def _copydata(self, filelist): + self.outfiles = [] + if not filelist: + return + self.mkpath(self.install_dir) + for f in filelist: + self.outfiles.append(self.copy_file (f, self.install_dir)) + + def _outputdata(self, filelist): + if self.outfiles is not None: + return self.outfiles + # XXX de-lambda-fy + return map(lambda x: os.path.join(self.install_dir, x), filelist) + + + if __name__ == "__main__": print "ok" diff --git a/command/__init__.py b/command/__init__.py index 385330b5e0..573ae5138e 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -11,6 +11,8 @@ 'build_clib', 'install', 'install_lib', + 'install_scripts', + 'install_data', 'clean', 'sdist', 'bdist', diff --git a/command/install.py b/command/install.py index c70ed9a1d1..3f6fa33fc6 100644 --- a/command/install.py +++ b/command/install.py @@ -90,7 +90,10 @@ class install (Command): # (func, command) where 'func' is a function to call that returns # true if 'command' (the sub-command name, a string) needs to be # run. If 'func' is None, assume that 'command' must always be run. - sub_commands = [(None, 'install_lib')] + sub_commands = [(None, 'install_lib'), + (None, 'install_scripts'), + (None, 'install_data'), + ] def initialize_options (self): diff --git a/command/install_data.py b/command/install_data.py new file mode 100644 index 0000000000..f86d95e54b --- /dev/null +++ b/command/install_data.py @@ -0,0 +1,14 @@ +from distutils.cmd import install_misc + +class install_data (install_misc): + + description = "install data files" + + def finalize_options (self): + self._install_dir_from('install_data') + + def run (self): + self._copydata(self.distribution.data) + + def get_outputs (self): + return self._outputdata(self.distribution.data) diff --git a/command/install_scripts.py b/command/install_scripts.py new file mode 100644 index 0000000000..665208eb78 --- /dev/null +++ b/command/install_scripts.py @@ -0,0 +1,16 @@ +from distutils.cmd import install_misc + +class install_scripts(install_misc): + + description = "install scripts" + # XXX needed? + user_options = [('install-dir=', 'd', "directory to install to")] + + def finalize_options (self): + self._install_dir_from('install_scripts') + + def run (self): + self._copydata(self.distribution.scripts) + + def get_outputs(self): + return self._outputdata(self.distribution.scripts) diff --git a/dist.py b/dist.py index a0c6c9ea3d..998cff7190 100644 --- a/dist.py +++ b/dist.py @@ -154,6 +154,8 @@ def __init__ (self, attrs=None): self.ext_package = None self.include_dirs = None self.extra_path = None + self.scripts = None + self.data = None # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to From 593bfaaa0c09ea0939a54bdb050a2e91ab0e295e Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:31:37 +0000 Subject: [PATCH 0321/8469] In 'install_misc' class: - renamed '_copydata()' to 'copy_files()' - changed it to record complete output filenames - dropped '_outputdata()' in favour of much simpler 'get_outputs()' --- cmd.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cmd.py b/cmd.py index 393734401d..28d8617949 100644 --- a/cmd.py +++ b/cmd.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, string +import sys, os, string from types import * from distutils.errors import * from distutils import util @@ -355,23 +355,20 @@ def initialize_options (self): self.install_dir = None self.outfiles = None - def _install_dir_from(self, dirname): + def _install_dir_from (self, dirname): self.set_undefined_options('install', (dirname, 'install_dir')) - def _copydata(self, filelist): + def _copy_files (self, filelist): self.outfiles = [] if not filelist: return self.mkpath(self.install_dir) for f in filelist: - self.outfiles.append(self.copy_file (f, self.install_dir)) - - def _outputdata(self, filelist): - if self.outfiles is not None: - return self.outfiles - # XXX de-lambda-fy - return map(lambda x: os.path.join(self.install_dir, x), filelist) + self.copy_file(f, self.install_dir) + self.outfiles.append(os.path.join(self.install_dir, f)) + def get_outputs (self): + return self.outfiles if __name__ == "__main__": From a6ee82aab954f10c941860047e35bb26dcc2866b Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:32:30 +0000 Subject: [PATCH 0322/8469] Deleted some cruft. Caught up with renaming in 'install_misc' base class. Changed 'run()' to chmod installed scripts under Unix. --- command/install_scripts.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/command/install_scripts.py b/command/install_scripts.py index 665208eb78..5c3f2fb4c2 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -1,16 +1,26 @@ +import os from distutils.cmd import install_misc +from stat import ST_MODE class install_scripts(install_misc): description = "install scripts" - # XXX needed? - user_options = [('install-dir=', 'd', "directory to install to")] def finalize_options (self): self._install_dir_from('install_scripts') def run (self): - self._copydata(self.distribution.scripts) + self._copy_files(self.distribution.scripts) + if os.name == 'posix': + # Set the executable bits (owner, group, and world) on + # all the scripts we just installed. + files = self.get_outputs() + for file in files: + if self.dry_run: + self.announce("changing mode of %s" % file) + else: + mode = (os.stat(file)[ST_MODE]) | 0111 + self.announce("changing mode of %s to %o" % (file, mode)) + os.chmod(file, mode) - def get_outputs(self): - return self._outputdata(self.distribution.scripts) +# class install_scripts From d5eb448fcce25d02a65b8ebaabbc119d21be5672 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:34:33 +0000 Subject: [PATCH 0323/8469] Caught up with renaming in 'install_misc' base class. --- command/install_data.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index f86d95e54b..d96a1def89 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -8,7 +8,4 @@ def finalize_options (self): self._install_dir_from('install_data') def run (self): - self._copydata(self.distribution.data) - - def get_outputs (self): - return self._outputdata(self.distribution.data) + self._copy_files(self.distribution.data) From 58a11985342e4e261381916e6b43210b58ae0908 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:46:47 +0000 Subject: [PATCH 0324/8469] Added --skip-build option, so lazy debuggers/testers (mainly me) don't have to wade through all the 'build' output when testing installation. --- command/install.py | 15 +++++++++++++-- command/install_lib.py | 15 ++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/command/install.py b/command/install.py index 3f6fa33fc6..4e68e00e95 100644 --- a/command/install.py +++ b/command/install.py @@ -77,6 +77,11 @@ class install (Command): ('install-data=', None, "installation directory for data files"), + # For lazy debuggers who just want to test the install + # commands without rerunning "build" all the time + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), + # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), #('install-man=', None, "directory for Unix man pages"), @@ -129,6 +134,8 @@ def initialize_options (self): self.extra_path = None self.install_path_file = 0 + self.skip_build = 0 + # These are only here as a conduit from the 'build' command to the # 'install_*' commands that do the real work. ('build_base' isn't # actually used anywhere, but it might be useful in future.) They @@ -270,7 +277,10 @@ def dump_dirs (self, msg): from distutils.fancy_getopt import longopt_xlate print msg + ":" for opt in self.user_options: - opt_name = string.translate (opt[0][0:-1], longopt_xlate) + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + opt_name = string.translate (opt_name, longopt_xlate) val = getattr (self, opt_name) print " %s: %s" % (opt_name, val) @@ -409,7 +419,8 @@ def handle_extra_path (self): def run (self): # Obviously have to build before we can install - self.run_peer ('build') + if not self.skip_build: + self.run_peer ('build') # Run all sub-commands: currently this just means install all # Python modules using 'install_lib'. diff --git a/command/install_lib.py b/command/install_lib.py index 852e3f63a2..2d0a7190f8 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -15,6 +15,7 @@ class install_lib (Command): ('build-dir=','b', "build directory (where to install from)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), + ('skip-build', None, "skip the build steps"), ] @@ -24,6 +25,7 @@ def initialize_options (self): self.build_dir = None self.compile = 1 self.optimize = 1 + self.skip_build = None def finalize_options (self): @@ -34,16 +36,19 @@ def finalize_options (self): ('build_lib', 'build_dir'), ('install_lib', 'install_dir'), ('compile_py', 'compile'), - ('optimize_py', 'optimize')) + ('optimize_py', 'optimize'), + ('skip_build', 'skip_build'), + ) def run (self): # Make sure we have built everything we need first - if self.distribution.has_pure_modules(): - self.run_peer ('build_py') - if self.distribution.has_ext_modules(): - self.run_peer ('build_ext') + if not self.skip_build: + if self.distribution.has_pure_modules(): + self.run_peer ('build_py') + if self.distribution.has_ext_modules(): + self.run_peer ('build_ext') # Install everything: simply dump the entire contents of the build # directory to the installation directory (that's the beauty of From 5ff2cdf00f98ecaf7ed6140145e7253425171252 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:54:50 +0000 Subject: [PATCH 0325/8469] Fixed 'select_scheme()' so it doesn't override a directory attribute that's already been set (eg. by a command-line option). --- command/install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 4e68e00e95..ba4110cb8a 100644 --- a/command/install.py +++ b/command/install.py @@ -356,7 +356,9 @@ def select_scheme (self, name): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in ('purelib', 'platlib', 'scripts', 'data'): - setattr (self, 'install_' + key, scheme[key]) + attrname = 'install_' + key + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) def _expand_attrs (self, attrs): From 23b8295f824f1520612add07320e9bf62bc71709 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Fri, 12 May 2000 01:58:29 +0000 Subject: [PATCH 0326/8469] Added comment/docstring/revision header. --- command/install_data.py | 9 +++++++++ command/install_scripts.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/command/install_data.py b/command/install_data.py index d96a1def89..95ef423127 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -1,3 +1,12 @@ +"""distutils.command.install_data + +Implements the Distutils 'install_data' command, for installing +platform-independent data files.""" + +# contributed by Bastian Kleineidam + +__revision__ = "$Id$" + from distutils.cmd import install_misc class install_data (install_misc): diff --git a/command/install_scripts.py b/command/install_scripts.py index 5c3f2fb4c2..4e23efc8b6 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -1,3 +1,12 @@ +"""distutils.command.install_scripts + +Implements the Distutils 'install_scripts' command, for installing +Python scripts.""" + +# contributed by Bastian Kleineidam + +__revision__ = "$Id$" + import os from distutils.cmd import install_misc from stat import ST_MODE From ea70d0b5ebf3197a83a0965f25125f27d0b05d88 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:35:33 +0000 Subject: [PATCH 0327/8469] From Lyle Johnson: renamed 'implib_dir' to 'implib_file', and correctly ensure that it's 'dirname' exists. --- command/build_ext.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2142d05fdc..deb3b130b9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -342,13 +342,11 @@ def build_extensions (self): # which cannot be suppressed by any linker switches. So # make sure they are generated in the temporary build # directory. - implib_dir = os.path.join(self.build_temp,\ - self.get_ext_libname(extension_name)) - extra_args.append ('/IMPLIB:' + implib_dir) - - # XXX arg, which of these is correct? - self.mkpath(implib_dir) - self.mkpath(os.path.dirname(implib_dir)) + implib_file = os.path.join ( + self.build_temp, + self.get_ext_libname (extension_name)) + extra_args.append ('/IMPLIB:' + implib_file) + self.mkpath (os.path.dirname (implib_file)) # if MSVC fullname = self.get_ext_fullname (extension_name) From 0ad597128936e67ed4025f170e46d66a61a61ce3 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:48:15 +0000 Subject: [PATCH 0328/8469] Harry Henry Gebel: add 'bdist_rpm' command. --- command/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/__init__.py b/command/__init__.py index 573ae5138e..cd7753fe64 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -17,4 +17,5 @@ 'sdist', 'bdist', 'bdist_dumb', + 'bdist_rpm', ] From 68504c5151605eb5da935805f7973fcb70e6f3aa Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:49:56 +0000 Subject: [PATCH 0329/8469] Harry Henry Gebel: add support for the 'bdist_rpm' command, specifically the 'no_format_option' class attribute. --- command/bdist.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 01b4e162d3..970779dcaa 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -22,6 +22,9 @@ class bdist (Command): "(tar, ztar, gztar, bztar, zip, ... )"), ] + # The following commands do not take a format option from bdist + no_format_option = ('bdist_rpm',) + # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. default_format = { 'posix': 'gztar', @@ -31,6 +34,7 @@ class bdist (Command): 'bztar': 'bdist_dumb', 'ztar': 'bdist_dumb', 'tar': 'bdist_dumb', + 'rpm': 'bdist_rpm', 'zip': 'bdist_dumb', } @@ -63,8 +67,9 @@ def run (self): raise DistutilsOptionError, \ "invalid archive format '%s'" % self.format - sub_cmd = self.find_peer (cmd_name) - sub_cmd.format = self.format + if cmd_name not in self.no_format_option: + sub_cmd = self.find_peer (cmd_name) + sub_cmd.format = self.format self.run_peer (cmd_name) # run() From e1e8fd9c6397cccb920d93434f7b7393b361b564 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:52:14 +0000 Subject: [PATCH 0330/8469] Harry Henry Gebel: get extra compiler flags from the CFLAGS environment variable. (Is this really needed? Can we drop it when the config file mechanism allows users to set compiler flags in setup.cfg?) --- command/build_ext.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index deb3b130b9..aa9ea0d034 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -295,6 +295,14 @@ def build_extensions (self): macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') extra_args = build_info.get ('extra_compile_args') + # honor CFLAGS enviroment variable + # XXX do we *really* need this? or is it just a hack until + # the user can put compiler flags in setup.cfg? + if os.environ.has_key('CFLAGS'): + if not extra_args: + extra_args = [] + extra_args = string.split(os.environ['CFLAGS']) + extra_args + objects = self.compiler.compile (sources, output_dir=self.build_temp, macros=macros, From 25c47ab8b0225c1a451b36eb720cfe73954af9b1 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:56:55 +0000 Subject: [PATCH 0331/8469] Added the 'build_bdist' option and code to clean it up -- this is the top-level temporary directory for creating built distributions. (Won't work yet, since the "build" command doesn't yet have a 'build_bdist' option, and none of the "bdist" commands support it yet.) --- command/clean.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/command/clean.py b/command/clean.py index 4f0f7e3e94..78166f2642 100644 --- a/command/clean.py +++ b/command/clean.py @@ -20,6 +20,8 @@ class clean (Command): "build directory for all modules (default: 'build.build-lib')"), ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"), + ('build-bdist=', None, + "temporary directory for built distributions"), ('all', 'a', "remove all build output, not just temporary by-products") ] @@ -28,6 +30,7 @@ def initialize_options(self): self.build_base = None self.build_lib = None self.build_temp = None + self.build_bdist = None self.all = None def finalize_options(self): @@ -39,9 +42,10 @@ def finalize_options(self): self.build_temp) self.set_undefined_options('build', - ('build_base', 'build_base'), - ('build_lib', 'build_lib'), - ('build_temp', 'build_temp')) + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_temp', 'build_temp'), + ('build_bdist', 'build_bdist')) def run(self): # remove the build/temp. directory (unless it's already @@ -53,6 +57,13 @@ def run(self): # remove the module build directory (unless already gone) if os.path.exists (self.build_lib): remove_tree (self.build_lib, self.verbose, self.dry_run) + # remove the temporary directory used for creating built + # distributions (default "build/bdist") -- eg. type of + # built distribution will have its own subdirectory under + # "build/bdist", but they'll be taken care of by + # 'remove_tree()'. + if os.path.exists (self.build_bdist) + remove_tree (self.build_bdist, self.verbose, self.dry_run) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care From 714539777115782361abaa82992217496a2d932e Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 01:58:19 +0000 Subject: [PATCH 0332/8469] Harry Henry Gebel: add the "--record" option to write the list of installed files to INSTALLED_FILES. --- command/install.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index ba4110cb8a..e6ed984166 100644 --- a/command/install.py +++ b/command/install.py @@ -12,6 +12,7 @@ from distutils import sysconfig from distutils.util import write_file, native_path, subst_vars, change_root from distutils.errors import DistutilsOptionError +from glob import glob INSTALL_SCHEMES = { 'unix_prefix': { @@ -87,8 +88,10 @@ class install (Command): #('install-man=', None, "directory for Unix man pages"), #('install-html=', None, "directory for HTML documentation"), #('install-info=', None, "directory for GNU info files"), - ] + ('record', None, + "make a record of installation"), + ] # 'sub_commands': a list of commands this command might have to run # to get its work done. Each command is represented as a tuple @@ -151,6 +154,7 @@ def initialize_options (self): #self.install_html = None #self.install_info = None + self.record = None def finalize_options (self): @@ -441,6 +445,22 @@ def run (self): "you'll have to change the search path yourself") % self.install_lib) + # write list of installed files, if requested. + if self.record: + outputs = self.get_outputs() + for counter in xrange (len (outputs)): # include ".pyc" and ".pyo" + if outputs[counter][-3:] == ".py": + byte_code = glob(outputs[counter] + '[co]') + outputs.extend(byte_code) + outputs.sort() # just makes it look nicer + if self.root: # strip any package prefix + root_len = len(self.root) + for counter in xrange (len (outputs)): + outputs[counter] = outputs[counter][root_len:] + self.execute(write_file, + ("INSTALLED_FILES", outputs), + "Writing list of installed files") + # run () From 1c914c4988122ad3436aac8bb4e2ab833aef511f Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:01:22 +0000 Subject: [PATCH 0333/8469] Moved check for installation to non-sys.path location so it comes last (after writing list of installed files) -- that way, the warning is more visible. --- command/install.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/command/install.py b/command/install.py index e6ed984166..163b018749 100644 --- a/command/install.py +++ b/command/install.py @@ -437,14 +437,6 @@ def run (self): if self.path_file: self.create_path_file () - normalized_path = map (os.path.normpath, sys.path) - if (not (self.path_file and self.install_path_file) and - os.path.normpath (self.install_lib) not in normalized_path): - self.warn (("modules installed to '%s', which is not in " + - "Python's module search path (sys.path) -- " + - "you'll have to change the search path yourself") % - self.install_lib) - # write list of installed files, if requested. if self.record: outputs = self.get_outputs() @@ -459,7 +451,15 @@ def run (self): outputs[counter] = outputs[counter][root_len:] self.execute(write_file, ("INSTALLED_FILES", outputs), - "Writing list of installed files") + "writing list of installed files") + + normalized_path = map (os.path.normpath, sys.path) + if (not (self.path_file and self.install_path_file) and + os.path.normpath (self.install_lib) not in normalized_path): + self.warn (("modules installed to '%s', which is not in " + + "Python's module search path (sys.path) -- " + + "you'll have to change the search path yourself") % + self.install_lib) # run () From 6406c80d46402cc93bdfd1fa565acba9a7a33213 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:11:10 +0000 Subject: [PATCH 0334/8469] Added '_bytecode_filenames()' method, and use it in 'get_outputs()' to ensure that compiled bytecode files are considered part of the output of the "install_lib" command. --- command/install_lib.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 2d0a7190f8..63c7a6bf00 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -72,8 +72,6 @@ def run (self): skip_msg = "byte-compilation of %s skipped" % f self.make_file (f, out_fn, compile, (f,), compile_msg, skip_msg) - - # run () @@ -94,6 +92,14 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): return outputs # _mutate_outputs () + + def _bytecode_filenames (self, py_filenames): + bytecode_files = [] + for py_file in py_filenames: + bytecode = py_file + (__debug__ and "c" or "o") + bytecode_files.append(bytecode) + + return bytecode_files def get_outputs (self): """Return the list of files that would be installed if this command @@ -104,14 +110,17 @@ def get_outputs (self): self._mutate_outputs (self.distribution.has_pure_modules(), 'build_py', 'build_lib', self.install_dir) - + if self.compile: + bytecode_outputs = self._bytecode_filenames(pure_outputs) + else: + bytecode_outputs = [] ext_outputs = \ self._mutate_outputs (self.distribution.has_ext_modules(), 'build_ext', 'build_lib', self.install_dir) - return pure_outputs + ext_outputs + return pure_outputs + bytecode_outputs + ext_outputs # get_outputs () From b9143e831d39d846dd31c84f8e2252161355b346 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:13:53 +0000 Subject: [PATCH 0335/8469] Ditch the explicit search for *.py[co] files -- they're now included in the list returned by 'get_outputs()', thanks to changes in the "install_lib" command. --- command/install.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/command/install.py b/command/install.py index 163b018749..2429f1b1f9 100644 --- a/command/install.py +++ b/command/install.py @@ -440,12 +440,7 @@ def run (self): # write list of installed files, if requested. if self.record: outputs = self.get_outputs() - for counter in xrange (len (outputs)): # include ".pyc" and ".pyo" - if outputs[counter][-3:] == ".py": - byte_code = glob(outputs[counter] + '[co]') - outputs.extend(byte_code) - outputs.sort() # just makes it look nicer - if self.root: # strip any package prefix + if self.root: # strip any package prefix root_len = len(self.root) for counter in xrange (len (outputs)): outputs[counter] = outputs[counter][root_len:] From 1f4bdba5ba8806643d7ff97ae965cb0edf1d99fe Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:16:45 +0000 Subject: [PATCH 0336/8469] Made the '--record' option take an argument, which is the name of the file to write the list of installed files to. --- command/install.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index 2429f1b1f9..a4986e5d5d 100644 --- a/command/install.py +++ b/command/install.py @@ -89,8 +89,8 @@ class install (Command): #('install-html=', None, "directory for HTML documentation"), #('install-info=', None, "directory for GNU info files"), - ('record', None, - "make a record of installation"), + ('record=', None, + "filename in which to record list of installed files"), ] # 'sub_commands': a list of commands this command might have to run @@ -445,8 +445,9 @@ def run (self): for counter in xrange (len (outputs)): outputs[counter] = outputs[counter][root_len:] self.execute(write_file, - ("INSTALLED_FILES", outputs), - "writing list of installed files") + (self.record, outputs), + "writing list of installed files to '%s'" % + self.record) normalized_path = map (os.path.normpath, sys.path) if (not (self.path_file and self.install_path_file) and From 2d34b0395476d92bd2fbec6f4fcd99cae6d2a383 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:20:43 +0000 Subject: [PATCH 0337/8469] Typo fix. --- command/clean.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/clean.py b/command/clean.py index 78166f2642..8706e57a1e 100644 --- a/command/clean.py +++ b/command/clean.py @@ -62,7 +62,7 @@ def run(self): # built distribution will have its own subdirectory under # "build/bdist", but they'll be taken care of by # 'remove_tree()'. - if os.path.exists (self.build_bdist) + if os.path.exists (self.build_bdist): remove_tree (self.build_bdist, self.verbose, self.dry_run) # just for the heck of it, try to remove the base build directory: From b7d9b1267bfe9638d965a16556a7ca408f6e6ff2 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 02:30:15 +0000 Subject: [PATCH 0338/8469] Rename 'build_bdist' to 'bdist_base', and get it by default from the "bdist" command rather than "build". --- command/clean.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/command/clean.py b/command/clean.py index 8706e57a1e..d6999060bd 100644 --- a/command/clean.py +++ b/command/clean.py @@ -20,7 +20,7 @@ class clean (Command): "build directory for all modules (default: 'build.build-lib')"), ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"), - ('build-bdist=', None, + ('bdist-base=', None, "temporary directory for built distributions"), ('all', 'a', "remove all build output, not just temporary by-products") @@ -30,7 +30,7 @@ def initialize_options(self): self.build_base = None self.build_lib = None self.build_temp = None - self.build_bdist = None + self.bdist_base = None self.all = None def finalize_options(self): @@ -44,8 +44,9 @@ def finalize_options(self): self.set_undefined_options('build', ('build_base', 'build_base'), ('build_lib', 'build_lib'), - ('build_temp', 'build_temp'), - ('build_bdist', 'build_bdist')) + ('build_temp', 'build_temp')) + self.set_undefined_options('bdist', + ('bdist_base', 'bdist_base')) def run(self): # remove the build/temp. directory (unless it's already @@ -62,8 +63,8 @@ def run(self): # built distribution will have its own subdirectory under # "build/bdist", but they'll be taken care of by # 'remove_tree()'. - if os.path.exists (self.build_bdist): - remove_tree (self.build_bdist, self.verbose, self.dry_run) + if os.path.exists (self.bdist_base): + remove_tree (self.bdist_base, self.verbose, self.dry_run) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care From 75835e5b552eacae52c565cb1f2172bc0c03405f Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:06:56 +0000 Subject: [PATCH 0339/8469] Drastically simplified by taking advantage of the "install" command's new flexibility, specifically the 'root' option. Now, we just use "install" to do a fake installation into a temporary directory (the 'bdist_dir' option, which derives from the 'bdist_base' option of "bdist"), and then tar/zip up that directory. This means that dumb built distributions are now relative to the root directory, rather than the prefix or exec-prefix; this is probably a feature, but does make them slightly less flexible. --- command/bdist_dumb.py | 95 ++++++++++--------------------------------- 1 file changed, 21 insertions(+), 74 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 23672a63e4..2de2befc14 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -17,7 +17,9 @@ class bdist_dumb (Command): description = "create a \"dumb\" built distribution" - user_options = [('format=', 'f', + user_options = [('bdist-dir=', 'd', + "temporary directory for creating the distribution"), + ('format=', 'f', "archive format to create (tar, ztar, gztar, zip)"), ('keep-tree', 'k', "keep the pseudo-installation tree around after " + @@ -29,6 +31,7 @@ class bdist_dumb (Command): def initialize_options (self): + self.bdist_dir = None self.format = None self.keep_tree = 0 @@ -36,6 +39,10 @@ def initialize_options (self): def finalize_options (self): + if self.bdist_dir is None: + bdist_base = self.get_peer_option('bdist', 'bdist_base') + self.bdist_dir = os.path.join(bdist_base, 'dumb') + if self.format is None: try: self.format = self.default_format[os.name] @@ -50,91 +57,31 @@ def finalize_options (self): def run (self): self.run_peer ('build') - install = self.find_peer ('install') - inputs = install.get_inputs () - outputs = install.get_outputs () - assert (len (inputs) == len (outputs)) - - # First, strip the installation base directory (prefix or - # exec-prefix) from all the output filenames. - self.strip_base_dirs (outputs, install) - # Figure out where to copy them to: "build/bdist" by default; this - # directory masquerades as prefix/exec-prefix (ie. we'll make the - # archive from 'output_dir'). - build_base = self.get_peer_option ('build', 'build_base') - output_dir = os.path.join (build_base, "bdist") + # XXX don't use 'self.find_peer()', because it always runs + # 'ensure_ready()' on the command object; we explictly want a + # command object that has *not* been finalized, so we can set + # options on it! (The option we set, 'root', is so that we can do + # a proper "fake install" using this install command object.) + install = self.distribution.find_command_obj('install') + install.root = self.bdist_dir - # Copy the built files to the pseudo-installation tree. - self.make_install_tree (output_dir, inputs, outputs) + self.announce ("installing to %s" % self.bdist_dir) + install.ensure_ready() + install.run() # And make an archive relative to the root of the # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_fullname(), get_platform()) - print "output_dir = %s" % output_dir + print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format self.make_archive (archive_basename, self.format, - root_dir=output_dir) + root_dir=self.bdist_dir) if not self.keep_tree: - remove_tree (output_dir, self.verbose, self.dry_run) + remove_tree (self.bdist_dir, self.verbose, self.dry_run) # run() - - def strip_base_dirs (self, outputs, install_cmd): - # XXX this throws away the prefix/exec-prefix distinction, and - # means we can only correctly install the resulting archive on a - # system where prefix == exec-prefix (but at least we can *create* - # it on one where they differ). I don't see a way to fix this - # without either 1) generating two archives, one for prefix and one - # for exec-prefix, or 2) putting absolute paths in the archive - # rather than making them relative to one of the prefixes. - - base = install_cmd.install_base + os.sep - platbase = install_cmd.install_platbase + os.sep - b_len = len (base) - pb_len = len (platbase) - for i in range (len (outputs)): - if outputs[i][0:b_len] == base: - outputs[i] = outputs[i][b_len:] - elif outputs[i][0:pb_len] == platbase: - outputs[i] = outputs[i][pb_len:] - else: - raise DistutilsInternalError, \ - ("installation output filename '%s' doesn't start " + - "with either install_base ('%s') or " + - "install_platbase ('%s')") % \ - (outputs[i], base, platbase) - - # strip_base_dirs() - - - def make_install_tree (self, output_dir, inputs, outputs): - - assert (len(inputs) == len(outputs)) - - # Create all the directories under 'output_dir' necessary to - # put 'outputs' there. - create_tree (output_dir, outputs, - verbose=self.verbose, dry_run=self.dry_run) - - - # XXX this bit of logic is duplicated in sdist.make_release_tree(): - # would be nice to factor it out... - if hasattr (os, 'link'): # can make hard links on this system - link = 'hard' - msg = "making hard links in %s..." % output_dir - else: # nope, have to copy - link = None - msg = "copying files to %s..." % output_dir - - for i in range (len(inputs)): - output = os.path.join (output_dir, outputs[i]) - self.copy_file (inputs[i], output, link=link) - - # make_install_tree () - - # class bdist_dumb From 046f4ee3aab641fbb6c72931d116e1c58bb99511 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:07:53 +0000 Subject: [PATCH 0340/8469] Added 'get_inputs()' methods, needed by the "install" command's 'get_inputs()'. --- command/install_data.py | 3 +++ command/install_scripts.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/command/install_data.py b/command/install_data.py index 95ef423127..448614b050 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -18,3 +18,6 @@ def finalize_options (self): def run (self): self._copy_files(self.distribution.data) + + def get_inputs (self): + return self.distribution.data or [] diff --git a/command/install_scripts.py b/command/install_scripts.py index 4e23efc8b6..43e5fc18bc 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -32,4 +32,7 @@ def run (self): self.announce("changing mode of %s to %o" % (file, mode)) os.chmod(file, mode) + def get_inputs (self): + return self.distribution.scripts or [] + # class install_scripts From 783f98d5381de82ad91e71bb529bf001d0e69456 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:08:28 +0000 Subject: [PATCH 0341/8469] Added the 'bdist_base' option, the base temp directory for all bdist commands. --- command/bdist.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 970779dcaa..892712ecfb 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -11,13 +11,16 @@ from types import * from distutils.core import Command from distutils.errors import * +from distutils.util import get_platform class bdist (Command): description = "create a built (binary) distribution" - user_options = [('format=', 'f', + user_options = [('bdist-base=', 'b', + "temporary directory for creating built distributions"), + ('format=', 'f', "format for distribution " + "(tar, ztar, gztar, bztar, zip, ... )"), ] @@ -39,12 +42,21 @@ class bdist (Command): def initialize_options (self): + self.bdist_base = None self.format = None # initialize_options() def finalize_options (self): + # 'bdist_base' -- parent of per-built-distribution-format + # temporary directories (eg. we'll probably have + # "build/bdist./dumb", "build/bdist./rpm", etc.) + if self.bdist_base is None: + build_base = self.find_peer('build').build_base + plat = get_platform() + self.bdist_base = os.path.join (build_base, 'bdist.' + plat) + if self.format is None: try: self.format = self.default_format[os.name] @@ -55,7 +67,6 @@ def finalize_options (self): #elif type (self.format) is StringType: # self.format = string.split (self.format, ',') - # finalize_options() From d3e1d51b64dc3cbddc78212a358a69cb51737e8e Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:09:50 +0000 Subject: [PATCH 0342/8469] List data files are listed in the Distribution attribute 'data_files', rather than 'data'. --- command/install_data.py | 4 ++-- dist.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index 448614b050..fd9836b607 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -17,7 +17,7 @@ def finalize_options (self): self._install_dir_from('install_data') def run (self): - self._copy_files(self.distribution.data) + self._copy_files(self.distribution.data_files) def get_inputs (self): - return self.distribution.data or [] + return self.distribution.data_files or [] diff --git a/dist.py b/dist.py index 998cff7190..24c8d2b853 100644 --- a/dist.py +++ b/dist.py @@ -155,7 +155,7 @@ def __init__ (self, attrs=None): self.include_dirs = None self.extra_path = None self.scripts = None - self.data = None + self.data_files = None # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to From cc5ee731de127fa418aa290fa486531f9ce2e9e8 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:10:30 +0000 Subject: [PATCH 0343/8469] In 'install_misc': 'self.outfiles' defaults to the empty list, so we don't have to worry about "or []" in 'get_outputs()'. --- cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.py b/cmd.py index 28d8617949..c544b86440 100644 --- a/cmd.py +++ b/cmd.py @@ -353,7 +353,7 @@ class install_misc (Command): def initialize_options (self): self.install_dir = None - self.outfiles = None + self.outfiles = [] def _install_dir_from (self, dirname): self.set_undefined_options('install', (dirname, 'install_dir')) From 6c282fc092bc44258e4d614b541ff59d15bb6582 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:11:40 +0000 Subject: [PATCH 0344/8469] Contribution from Harry Henry Gebel: the 'bdist_rpm' command. (Completely uninspected and untested by me, this is just to get the code into CVS!) --- command/bdist_rpm.py | 390 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 command/bdist_rpm.py diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py new file mode 100644 index 0000000000..9c3aca3bc1 --- /dev/null +++ b/command/bdist_rpm.py @@ -0,0 +1,390 @@ +"""distutils.command.bdist_rpm + +Implements the Distutils 'bdist_rpm' command (create RPM source and binary +distributions.""" + +# created 2000/04/25, by Harry Henry Gebel + +__revision__ = "$Id$" + +from os.path import exists, basename +import os +from distutils.core import Command +from distutils.util import mkpath, write_file, copy_file +from distutils.errors import * +from string import join, lower +from types import StringType, DictType, LongType, FloatType, IntType, \ + ListType, TupleType + +class bdist_rpm (Command): + + description = "create an RPM distribution" + + user_options = [ + ('spec-only', None, + "Only regenerate spec file"), + ('source-only', None, + "Only generate source RPM"), + ('binary-only', None, + "Only generate binary RPM"), + ('use-bzip2', None, + "Use bzip2 instead of gzip to create source distribution"), + ('no-clean', None, + "Do not clean RPM build directory"), + ('no-rpm-opt-flags', None, + "Do not pass any RPM CFLAGS to compiler") + ] + + + def initialize_options (self): + self.spec_only = None + self.binary_only = None + self.source_only = None + self.use_bzip2 = None + self.no_clean = None + self.no_rpm_opt_flags = None + + # initialize_options() + + + def finalize_options (self): + if os.name != 'posix': + raise DistutilsPlatformError, \ + ("don't know how to create RPM " + "distributions on platform %s" % os.name) + if self.binary_only and self.source_only: + raise DistutilsOptionsError, \ + "Cannot supply both '--source-only' and '--binary-only'" + # don't pass CFLAGS to pure python distributions + if not self.distribution.has_ext_modules(): + self.no_rpm_opt_flags = 1 + + # finalize_options() + + + def run (self): + self._get_package_data() # get packaging info + + + # make directories + if self.spec_only: + self.execute(mkpath, ('redhat',), "Created './redhat' directory") + else: + self.execute(mkpath, ('build/rpm/SOURCES',), + "Created RPM source directory") + self.execute(mkpath, ('build/rpm/SPECS',), + "Created RPM source directory") + self.execute(mkpath, ('build/rpm/BUILD',), + "Created RPM source directory") + self.execute(mkpath, ('build/rpm/RPMS',), + "Created RPM source directory") + self.execute(mkpath, ('build/rpm/SRPMS',), + "Created RPM source directory") + + # spec file goes into .redhat directory if '--spec-only specified', + # into build/rpm/spec otherwisu + if self.spec_only: + spec_path = './redhat/%s.spec' % self.distribution.get_name() + else: + spec_path = ('build/rpm/SPECS/%s.spec' % + self.distribution.get_name()) + self.execute(write_file, + (spec_path, + self._make_spec_file()), + 'Writing .spec file') + + if self.spec_only: # stop if requested + return + + # make a source distribution and copy to SOURCES directory with + # optional icon + sdist = self.find_peer ('sdist') + if self.use_bzip2: + sdist.formats = ['bztar'] + else: + sdist.formats = ['gztar'] + self.run_peer('sdist') + if self.use_bzip2: + source = self.distribution.get_fullname() + '.tar.bz2' + else: + source = self.distribution.get_fullname() + '.tar.gz' + self.execute(copy_file, (source, 'build/rpm/SOURCES'), + 'Copying source distribution to SOURCES') + if self.icon: + if exists(self.icon): + self.execute(copy_file, (self.icon, 'build/rpm/SOURCES'), + 'Copying icon to SOURCES') + else: + raise DistutilsFileError, \ + "Unable to find icon file '%s'" % self.icon + + + # build package + self.announce('Building RPMs') + rpm_args = ['rpm',] + if self.source_only: # what kind of RPMs? + rpm_args.append('-bs') + elif self.binary_only: + rpm_args.append('-bb') + else: + rpm_args.append('-ba') + topdir = os.getcwd() + 'build/rpm' + rpm_args.extend(['--define', + '_topdir ' + os.getcwd() + '/build/rpm',]) + if not self.no_clean: + rpm_args.append('--clean') + rpm_args.append(spec_path) + self.spawn(rpm_args) + + # run() + + + def _get_package_data(self): + ''' Get data needed to generate spec file, first from the + DistributionMetadata class, then from the package_data file, which is + Python code read with execfile() ''' + + package_type = 'rpm' + + # read in package data, if any + if exists('package_data'): + try: + exec(open('package_data')) + except: + raise DistutilsOptionError, 'Unable to parse package data file' + + # set instance variables, supplying default value if not provided in + # package data file + self.package_data = locals() + + # the following variables must be {string (len() = 2): string} + self.summaries = self._check_string_dict('summaries') + self.descriptions = self._check_string_dict('descriptions') + + # The following variable must be an ordinary number or a string + self.release = self._check_number_or_string('release', '1') + self.serial = self._check_number_or_string('serial') + + # The following variables must be strings + self.group = self._check_string('group', 'Development/Libraries') + self.vendor = self._check_string('vendor') + self.packager = self._check_string('packager') + self.changelog = self._check_string('changelog') + self.icon = self._check_string('icon') + self.distribution_name = self._check_string('distribution_name') + self.pre = self._check_string('pre') + self.post = self._check_string('post') + self.preun = self._check_string('preun') + self.postun = self._check_string('postun') + self.prep = self._check_string('prep', '%setup') + if not self.no_rpm_opt_flags: + self.build = (self._check_string( + 'build', + 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build')) + else: + self.build = (self._check_string('build', 'python setup.py build')) + self.install = self._check_string( + 'install', + 'python setup.py install --root=$RPM_BUILD_ROOT --record') + self.clean = self._check_string( + 'clean', + 'rm -rf $RPM_BUILD_ROOT') + + # The following variables must be a list or tuple of strings, or a + # string + self.doc = self._check_string_list('doc') + if type(self.doc) == ListType: + for readme in ('README', 'README.txt'): + if exists(readme) and readme not in self.doc: + self.doc.append(readme) + self.doc = join(self.doc) + self.provides = join(self._check_string_list('provides')) + self.requires = join(self._check_string_list('requires')) + self.conflicts = join(self._check_string_list('conflicts')) + self.build_requires = join(self._check_string_list('build_requires')) + self.obsoletes = join(self._check_string_list('obsoletes')) + + def _make_spec_file(self): + ''' Generate an RPM spec file ''' + + # definitons and headers + spec_file = [ + '%define name ' + self.distribution.get_name(), + '%define version ' + self.distribution.get_version(), + '%define release ' + self.release, + '', + 'Summary: ' + self.distribution.get_description(), + ] + + # put locale summaries into spec file + for locale in self.summaries.keys(): + spec_file.append('Summary(%s): %s' % (locale, + self.summaries[locale])) + + spec_file.extend([ + 'Name: %{name}', + 'Version: %{version}', + 'Release: %{release}',]) + if self.use_bzip2: + spec_file.append('Source0: %{name}-%{version}.tar.bz2') + else: + spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.extend([ + 'Copyright: ' + self.distribution.get_licence(), + 'Group: ' + self.group, + 'BuildRoot: %{_tmppath}/%{name}-buildroot', + 'Prefix: %{_prefix}', ]) + + # noarch if no extension modules + if not self.distribution.has_ext_modules(): + spec_file.append('BuildArchitectures: noarch') + + for field in ('Vendor', + 'Packager', + 'Provides', + 'Requires', + 'Conflicts', + 'Obsoletes', + ): + if getattr(self, lower(field)): + spec_file.append('%s: %s' % (field, getattr(self, + lower(field)))) + + if self.distribution.get_url() != 'UNKNOWN': + spec_file.append('Url: ' + self.distribution.get_url()) + + if self.distribution_name: + spec_file.append('Distribution: ' + self.distribution_name) + + if self.build_requires: + spec_file.append('BuildRequires: ' + self.build_requires) + + if self.icon: + spec_file.append('Icon: ' + basename(self.icon)) + + spec_file.extend([ + '', + '%description', + self.distribution.get_long_description() + ]) + + # put locale descriptions into spec file + for locale in self.descriptions.keys(): + spec_file.extend([ + '', + '%description -l ' + locale, + self.descriptions[locale], + ]) + + # rpm scripts + for script in ('prep', + 'build', + 'install', + 'clean', + 'pre', + 'post', + 'preun', + 'postun', + ): + if getattr(self, script): + spec_file.extend([ + '', + '%' + script, + getattr(self, script), + ]) + + + # files section + spec_file.extend([ + '', + '%files -f INSTALLED_FILES', + '%defattr(-,root,root)', + ]) + + if self.doc: + spec_file.append('%doc ' + self.doc) + + if self.changelog: + spec_file.extend([ + '', + '%changelog', + self.changelog + ]) + + return spec_file + + def _check_string_dict(self, var_name, default_value = {}): + ''' Tests a wariable to determine if it is {string: string}, + var_name is the name of the wariable. Return the value if it is valid, + returns default_value if the variable does not exist, raises + DistutilsOptionError if the variable is not valid''' + if self.package_data.has_key(var_name): + pass_test = 1 # set to 0 if fails test + value = self.package_data[var_name] + if type(value) == DictType: + for locale in value.keys(): + if (type(locale) != StringType) or (type(value[locale]) != + StringType): + pass_test = 0 + break + if pass_test: + return test_me + raise DistutilsOptionError, \ + ("Error in package_data: '%s' must be dictionary: " + '{string: string}' % var_name) + else: + return default_value + + def _check_string(self, var_name, default_value = None): + ''' Tests a variable in package_data to determine if it is a string, + var_name is the name of the wariable. Return the value if it is a + string, returns default_value if the variable does not exist, raises + DistutilsOptionError if the variable is not a string''' + if self.package_data.has_key(var_name): + if type(self.package_data[var_name]) == StringType: + return self.package_data[var_name] + else: + raise DistutilsOptionError, \ + "Error in package_data: '%s' must be a string" % var_name + else: + return default_value + + def _check_number_or_string(self, var_name, default_value = None): + ''' Tests a variable in package_data to determine if it is a number or + a string, var_name is the name of the wariable. Return the value if it + is valid, returns default_value if the variable does not exist, raises + DistutilsOptionError if the variable is not valid''' + if self.package_data.has_key(var_name): + if type(self.package_data[var_name]) in (StringType, LongType, + IntType, FloatType): + return str(self.package_data[var_name]) + else: + raise DistutilsOptionError, \ + ("Error in package_data: '%s' must be a string or a " + 'number' % var_name) + else: + return default_value + + def _check_string_list(self, var_name, default_value = []): + ''' Tests a variable in package_data to determine if it is a string or + a list or tuple of strings, var_name is the name of the wariable. + Return the value as a string or a list if it is valid, returns + default_value if the variable does not exist, raises + DistutilsOptionError if the variable is not valid''' + if self.package_data.has_key(var_name): + value = self.package_data[var_name] + pass_test = 1 + if type(value) == StringType: + return value + elif type(value) in (ListType, TupleType): + for item in value: + if type(item) != StringType: + pass_test = 0 + break + if pass_test: + return list(value) + raise DistutilsOptionError, \ + ("Error in package_data: '%s' must be a string or a " + 'list or tuple of strings' % var_name) + else: + return default_value From e46022cedb21e05ca1292aae4f598817b0c195c6 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:32:36 +0000 Subject: [PATCH 0345/8469] Template for writing Distutils command modules. --- command/command_template | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 command/command_template diff --git a/command/command_template b/command/command_template new file mode 100644 index 0000000000..f0329aa9f9 --- /dev/null +++ b/command/command_template @@ -0,0 +1,39 @@ +"""distutils.command.x + +Implements the Distutils 'x' command.""" + +# created 2000/mm/dd, Greg Ward + +__revision__ = "$Id$" + +from distutils.core import Command + + +class x (Command): + + description = "" + + user_options = [('', '', + ""), + ] + + + def initialize_options (self): + self. = None + self. = None + self. = None + + # initialize_options() + + + def finalize_options (self): + + # finalize_options() + + + def run (self): + + + # run() + +# class x From ed02ed8aaba4efefd9e172b8f39e4f82e93a627c Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 13 May 2000 03:35:05 +0000 Subject: [PATCH 0346/8469] Changed default developer name. Added some guiding comments. --- command/command_template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/command_template b/command/command_template index f0329aa9f9..73c1c190db 100644 --- a/command/command_template +++ b/command/command_template @@ -2,7 +2,7 @@ Implements the Distutils 'x' command.""" -# created 2000/mm/dd, Greg Ward +# created 2000/mm/dd, John Doe __revision__ = "$Id$" @@ -11,8 +11,11 @@ from distutils.core import Command class x (Command): + # Brief (40-50 characters) description of the command description = "" + # List of option tuples: long name, short name (None if no short + # name), and help string. user_options = [('', '', ""), ] @@ -27,6 +30,8 @@ class x (Command): def finalize_options (self): + if self.x is None: + self.x = # finalize_options() From 33eb8cbf408e379e5e965c32b1365d3f961003a4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 13:23:21 +0000 Subject: [PATCH 0347/8469] Added support for the 'export_symbols' parameter to 'link_shared_object()' and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds /EXPORT: options to the linker command line. In UnixCCompiler, it is ignored. --- ccompiler.py | 10 +++++++++- msvccompiler.py | 12 ++++++++++-- unixccompiler.py | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index ffad294706..51f5ae02a9 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -493,6 +493,7 @@ def link_shared_lib (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -515,7 +516,13 @@ def link_shared_lib (self, search for libraries that were specified as bare library names (ie. no directory component). These are on top of the system default and those supplied to 'add_library_dir()' and/or - 'set_library_dirs()'. + 'set_library_dirs()'. 'runtime_library_dirs' is a list of + directories that will be embedded into the shared library and + used to search for other shared libraries that *it* depends on + at run-time. (This may only be relevant on Unix.) + + 'export_symbols' is a list of symbols that the shared library + will export. (This appears to be relevant only on Windows.) 'debug' is as for 'compile()' and 'create_static_lib()', with the slight distinction that it actually matters on most platforms @@ -536,6 +543,7 @@ def link_shared_object (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): diff --git a/msvccompiler.py b/msvccompiler.py index 3667afcd2d..b6ff432ce3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -304,6 +304,7 @@ def link_shared_lib (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -313,6 +314,8 @@ def link_shared_lib (self, output_dir=output_dir, libraries=libraries, library_dirs=library_dirs, + runtime_library_dirs=runtime_library_dirs, + export_symbols=export_symbols, debug=debug, extra_preargs=extra_preargs, extra_postargs=extra_postargs) @@ -325,6 +328,7 @@ def link_shared_object (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -350,8 +354,12 @@ def link_shared_object (self, else: ldflags = self.ldflags_shared - ld_args = ldflags + lib_opts + \ - objects + ['/OUT:' + output_filename] + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) if extra_preargs: ld_args[:0] = extra_preargs diff --git a/unixccompiler.py b/unixccompiler.py index 5e1524c67c..40f564ab88 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -178,6 +178,7 @@ def link_shared_lib (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): @@ -188,6 +189,7 @@ def link_shared_lib (self, libraries, library_dirs, runtime_library_dirs, + export_symbols, debug, extra_preargs, extra_postargs) @@ -200,6 +202,7 @@ def link_shared_object (self, libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None): From 05fa00ab977197b8e02c7a99443e3541cdfc3624 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 13:31:32 +0000 Subject: [PATCH 0348/8469] Lyle Johnson: added stubs for the four miscellaneous methods that must be implemented by subclasses, since they are needed by 'gen_lib_options()'. --- ccompiler.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index 51f5ae02a9..42221769e6 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -575,6 +575,33 @@ def link_executable (self, + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function; there is + # no appropriate default implementation so subclasses should + # implement all of these. + + def library_dir_option (self, dir): + """Return the compiler option to add 'dir' to the list of directories + searched for libraries.""" + raise NotImplementedError + + def runtime_library_dir_option (self, dir): + """Return the compiler option to add 'dir' to the list of directories + searched for runtime libraries.""" + raise NotImplementedError + + def library_option (self, lib): + """Return the compiler option to add 'dir' to the list of libraries + linked into the shared library or executable.""" + raise NotImplementedError + + def find_library_file (self, dirs, lib): + """Search the specified list of directories for a static or shared + library file 'lib' and return the full path to that file. Return + None if it wasn't found in any of the specified directories.""" + raise NotImplementedError + + # -- Filename generation methods ----------------------------------- # The default implementation of the filename generating methods are From 022c5e143c2e7f68bc794a3f108a70193b302533 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 14:07:59 +0000 Subject: [PATCH 0349/8469] Added missing import. --- dist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.py b/dist.py index 24c8d2b853..0f131980b8 100644 --- a/dist.py +++ b/dist.py @@ -12,6 +12,7 @@ from types import * from copy import copy from distutils.errors import * +from distutils import sysconfig from distutils.fancy_getopt import FancyGetopt, longopt_xlate from distutils.util import check_environ From dcc3e4d4cbc4029ba8c71691613faef73a4c1c4d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 15:06:48 +0000 Subject: [PATCH 0350/8469] Added 'has_scripts()', 'has_data_files()' methods. --- dist.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist.py b/dist.py index 0f131980b8..03b20e1f57 100644 --- a/dist.py +++ b/dist.py @@ -639,6 +639,12 @@ def has_c_libraries (self): def has_modules (self): return self.has_pure_modules() or self.has_ext_modules() + def has_scripts (self): + return self.scripts and len(self.scripts) > 0 + + def has_data_files (self): + return self.data_files and len(self.data_files) > 0 + def is_pure (self): return (self.has_pure_modules() and not self.has_ext_modules() and From 81213a2c15fe76d6d0a05621cad1959ac8deecad Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 15:08:57 +0000 Subject: [PATCH 0351/8469] Check if the claimed build directory doesn't exist, and warn that we don't have any Python modules to install (rather than bomb when we try to copy a non-existent directory). --- command/install_lib.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 63c7a6bf00..5b3d77a399 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -53,7 +53,12 @@ def run (self): # Install everything: simply dump the entire contents of the build # directory to the installation directory (that's the beauty of # having a build directory!) - outfiles = self.copy_tree (self.build_dir, self.install_dir) + if os.path.isdir(self.build_dir): + outfiles = self.copy_tree (self.build_dir, self.install_dir) + else: + self.warn("'%s' does not exist -- no Python modules to install" % + self.build_dir) + return # (Optionally) compile .py to .pyc # XXX hey! we can't control whether we optimize or not; that's up From 8e79f197fb13982a17cfc1dfa4187444f290f7a5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 15:17:09 +0000 Subject: [PATCH 0352/8469] Changed the semantics of the 'sub_commands' list: instead of function objects, it now has method names. Added three methods, 'has_lib()', 'has_scripts()', and 'has_data()' to determine if we need to run each of the three possible sub-commands. Added 'get_sub_commands()' to take care of finding the methods named in 'sub_commands', running them, and interpreting the results to build a list of sub-commands that actually have to be run. --- command/install.py | 65 +++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/command/install.py b/command/install.py index a4986e5d5d..392fe507c9 100644 --- a/command/install.py +++ b/command/install.py @@ -93,14 +93,14 @@ class install (Command): "filename in which to record list of installed files"), ] - # 'sub_commands': a list of commands this command might have to run - # to get its work done. Each command is represented as a tuple - # (func, command) where 'func' is a function to call that returns - # true if 'command' (the sub-command name, a string) needs to be - # run. If 'func' is None, assume that 'command' must always be run. - sub_commands = [(None, 'install_lib'), - (None, 'install_scripts'), - (None, 'install_data'), + # 'sub_commands': a list of commands this command might have to run to + # get its work done. Each command is represented as a tuple (method, + # command) where 'method' is the name of a method to call that returns + # true if 'command' (the sub-command name, a string) needs to be run. + # If 'method' is None, assume that 'command' must always be run. + sub_commands = [('has_lib', 'install_lib'), + ('has_scripts', 'install_scripts'), + ('has_data', 'install_data'), ] @@ -422,17 +422,29 @@ def handle_extra_path (self): # handle_extra_path () + def get_sub_commands (self): + """Return the list of subcommands that we need to run. This is + based on the 'subcommands' class attribute: each tuple in that list + can name a method that we call to determine if the subcommand needs + to be run for the current distribution.""" + commands = [] + for (method, cmd_name) in self.sub_commands: + if method is not None: + method = getattr(self, method) + if method is None or method(): + commands.append(cmd_name) + return commands + + def run (self): # Obviously have to build before we can install if not self.skip_build: self.run_peer ('build') - # Run all sub-commands: currently this just means install all - # Python modules using 'install_lib'. - for (func, cmd_name) in self.sub_commands: - if func is None or func(): - self.run_peer (cmd_name) + # Run all sub-commands (at least those that need to be run) + for cmd_name in self.get_sub_commands(): + self.run_peer (cmd_name) if self.path_file: self.create_path_file () @@ -460,14 +472,26 @@ def run (self): # run () + def has_lib (self): + """Return true if the current distribution has any Python + modules to install.""" + return (self.distribution.has_pure_modules() or + self.distribution.has_ext_modules()) + + def has_scripts (self): + return self.distribution.has_scripts() + + def has_data (self): + return self.distribution.has_data_files() + + def get_outputs (self): # This command doesn't have any outputs of its own, so just # get the outputs of all its sub-commands. outputs = [] - for (func, cmd_name) in self.sub_commands: - if func is None or func(): - cmd = self.find_peer (cmd_name) - outputs.extend (cmd.get_outputs()) + for cmd_name in self.get_sub_commands(): + cmd = self.find_peer (cmd_name) + outputs.extend (cmd.get_outputs()) return outputs @@ -475,10 +499,9 @@ def get_outputs (self): def get_inputs (self): # XXX gee, this looks familiar ;-( inputs = [] - for (func, cmd_name) in self.sub_commands: - if func is None or func(): - cmd = self.find_peer (cmd_name) - inputs.extend (cmd.get_inputs()) + for cmd_name in self.get_sub_commands(): + cmd = self.find_peer (cmd_name) + inputs.extend (cmd.get_inputs()) return inputs From a745efa83a06a337f54b8a80362957bdb4cdf4bc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 20 May 2000 16:05:34 +0000 Subject: [PATCH 0353/8469] Tweaked output of 'copy_file()': if copying to a new name, show the whole destination path, otherwise show just the directory. --- file_util.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/file_util.py b/file_util.py index 32245109d5..a73db42b54 100644 --- a/file_util.py +++ b/file_util.py @@ -90,7 +90,7 @@ def copy_file (src, dst, (os.symlink) instead of copying: set it to "hard" or "sym"; if it is None (the default), files are copied. Don't set 'link' on systems that don't support it: 'copy_file()' doesn't check if - hard or symbolic linking is availalble. + hard or symbolic linking is available. Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file @@ -131,8 +131,11 @@ def copy_file (src, dst, raise ValueError, \ "invalid value '%s' for 'link' argument" % link if verbose: - print "%s %s -> %s" % (action, src, dir) - + if os.path.basename(dst) == os.path.basename(src): + print "%s %s -> %s" % (action, src, dir) + else: + print "%s %s -> %s" % (action, src, dst) + if dry_run: return 1 From 0f61807acb702df144c2266a92fc7a60988c9581 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 01:42:17 +0000 Subject: [PATCH 0354/8469] Marching towards full support of config files: thoroughly overhauled the command-line parsing code, splitting it up into several methods (new methods: '_parse_command_opts()', '_show_help()') and making it put options into the 'command_options' dictionary rather than instantiating command objects and putting them there. Lots of other little changes: * merged 'find_command_class()' and 'create_command_obj()' and called the result 'get_command_class()' * renamed 'find_command_obj()' to 'get_command_obj()', and added command object creation and maintenance of the command object cache to its responsibilities (taken over from 'create_command_obj()') * parse config files one-at-a-time, so we can keep track of the filename for later error reporting * tweaked some help messages * fixed up many obsolete comments and docstrings --- dist.py | 447 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 238 insertions(+), 209 deletions(-) diff --git a/dist.py b/dist.py index 03b20e1f57..3fd29d9f48 100644 --- a/dist.py +++ b/dist.py @@ -48,15 +48,10 @@ class Distribution: # since every global option is also valid as a command option -- and we # don't want to pollute the commands with too many options that they # have minimal control over. - global_options = [('verbose', 'v', - "run verbosely (default)"), - ('quiet', 'q', - "run quietly (turns verbosity off)"), - ('dry-run', 'n', - "don't actually do anything"), - ('help', 'h', - "show this help message, plus help for any commands " + - "given on the command-line"), + global_options = [('verbose', 'v', "run verbosely (default)"), + ('quiet', 'q', "run quietly (turns verbosity off)"), + ('dry-run', 'n', "don't actually do anything"), + ('help', 'h', "show detailed help message"), ] # options that are not propagated to the commands @@ -78,11 +73,9 @@ class Distribution: ('maintainer-email', None, "print the maintainer's email address"), ('contact', None, - "print the name of the maintainer if present, " - "else author"), + "print the maintainer's name if known, else the author's"), ('contact-email', None, - "print the email of the maintainer if present, " - "else author"), + "print the maintainer's email address if known, else the author's"), ('url', None, "print the URL for this package"), ('licence', None, @@ -139,9 +132,11 @@ def __init__ (self, attrs=None): # for the setup script to override command classes self.cmdclass = {} - # Store options for commands here between parsing them (from config - # files, the command-line, etc.) and actually putting them into the - # command object that needs them. + # 'command_options' is where we store command options between + # parsing them (from config files, the command-line, etc.) and when + # they are actually needed -- ie. when the command in question is + # instantiated. It is a dictionary of dictionaries of 2-tuples: + # command_options = { command_name : { option : (source, value) } } self.command_options = {} # These options are really the business of various commands, rather @@ -190,7 +185,7 @@ def __init__ (self, attrs=None): if options: del attrs['options'] for (command, cmd_options) in options.items(): - cmd_obj = self.find_command_obj (command) + cmd_obj = self.get_command_obj (command) for (key, val) in cmd_options.items(): cmd_obj.set_option (key, val) # loop over commands @@ -210,6 +205,8 @@ def __init__ (self, attrs=None): # __init__ () + # -- Config file finding/parsing methods --------------------------- + def find_config_files (self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they @@ -223,8 +220,8 @@ def find_config_files (self): On Windows and Mac OS, there are two possible config files: pydistutils.cfg in the Python installation directory (sys.prefix) - and setup.cfg in the current directory.""" - + and setup.cfg in the current directory. + """ files = [] if os.name == "posix": check_environ() @@ -262,54 +259,50 @@ def parse_config_files (self, filenames=None): filenames = self.find_config_files() parser = ConfigParser() - parser.read(filenames) - for section in parser.sections(): - options = parser.options(section) - if not self.command_options.has_key(section) is None: - self.command_options[section] = {} - cmd_opts = self.command_options[section] - - for opt in options: - if opt != '__name__': - cmd_opts[opt] = parser.get(section,opt) + for filename in filenames: + parser.read(filename) + for section in parser.sections(): + options = parser.options(section) + if not self.command_options.has_key(section): + self.command_options[section] = {} + opts = self.command_options[section] + + for opt in options: + if opt != '__name__': + opts[opt] = (filename, parser.get(section,opt)) from pprint import pprint - print "configuration options:" + print "options (after parsing config files):" pprint (self.command_options) - def parse_command_line (self, args): - """Parse the setup script's command line: set any Distribution - attributes tied to command-line options, create all command - objects, and set their options from the command-line. 'args' - must be a list of command-line arguments, most likely - 'sys.argv[1:]' (see the 'setup()' function). This list is first - processed for "global options" -- options that set attributes of - the Distribution instance. Then, it is alternately scanned for - Distutils command and options for that command. Each new - command terminates the options for the previous command. The - allowed options for a command are determined by the 'options' - attribute of the command object -- thus, we instantiate (and - cache) every command object here, in order to access its - 'options' attribute. Any error in that 'options' attribute - raises DistutilsGetoptError; any error on the command-line - raises DistutilsArgError. If no Distutils commands were found - on the command line, raises DistutilsArgError. Return true if - command-line successfully parsed and we should carry on with - executing commands; false if no errors but we shouldn't execute - commands (currently, this only happens if user asks for - help).""" - - # late import because of mutual dependence between these modules - from distutils.cmd import Command - from distutils.core import usage + # -- Command-line parsing methods ---------------------------------- + def parse_command_line (self, args): + """Parse the setup script's command line. 'args' must be a list + of command-line arguments, most likely 'sys.argv[1:]' (see the + 'setup()' function). This list is first processed for "global + options" -- options that set attributes of the Distribution + instance. Then, it is alternately scanned for Distutils + commands and options for that command. Each new command + terminates the options for the previous command. The allowed + options for a command are determined by the 'user_options' + attribute of the command class -- thus, we have to be able to + load command classes in order to parse the command line. Any + error in that 'options' attribute raises DistutilsGetoptError; + any error on the command-line raises DistutilsArgError. If no + Distutils commands were found on the command line, raises + DistutilsArgError. Return true if command-line were + successfully parsed and we should carry on with executing + commands; false if no errors but we shouldn't execute commands + (currently, this only happens if user asks for help). + """ # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- # because each command will be handled by a different class, and - # the options that are valid for a particular class aren't - # known until we instantiate the command class, which doesn't - # happen until we know what the command is. + # the options that are valid for a particular class aren't known + # until we have loaded the command class, which doesn't happen + # until we know what the command is. self.commands = [] parser = FancyGetopt (self.global_options + self.display_options) @@ -323,91 +316,21 @@ def parse_command_line (self, args): return while args: - # Pull the current command from the head of the command line - command = args[0] - if not command_re.match (command): - raise SystemExit, "invalid command name '%s'" % command - self.commands.append (command) - - # Make sure we have a command object to put the options into - # (this either pulls it out of a cache of command objects, - # or finds and instantiates the command class). - try: - cmd_obj = self.find_command_obj (command) - except DistutilsModuleError, msg: - raise DistutilsArgError, msg - - # Require that the command class be derived from Command -- - # want to be sure that the basic "command" interface is - # implemented. - if not isinstance (cmd_obj, Command): - raise DistutilsClassError, \ - "command class %s must subclass Command" % \ - cmd_obj.__class__ - - # Also make sure that the command object provides a list of its - # known options - if not (hasattr (cmd_obj, 'user_options') and - type (cmd_obj.user_options) is ListType): - raise DistutilsClassError, \ - ("command class %s must provide " + - "'user_options' attribute (a list of tuples)") % \ - cmd_obj.__class__ - - # Poof! like magic, all commands support the global - # options too, just by adding in 'global_options'. - negative_opt = self.negative_opt - if hasattr (cmd_obj, 'negative_opt'): - negative_opt = copy (negative_opt) - negative_opt.update (cmd_obj.negative_opt) - - parser.set_option_table (self.global_options + - cmd_obj.user_options) - parser.set_negative_aliases (negative_opt) - args = parser.getopt (args[1:], cmd_obj) - if cmd_obj.help: - parser.set_option_table (self.global_options) - parser.print_help ("Global options:") - print - - parser.set_option_table (cmd_obj.user_options) - parser.print_help ("Options for '%s' command:" % command) - print - print usage + args = self._parse_command_opts(parser, args) + if args is None: # user asked for help (and got it) return - - self.command_obj[command] = cmd_obj - self.have_run[command] = 0 - - # while args - - # If the user wants help -- ie. they gave the "--help" option -- - # give it to 'em. We do this *after* processing the commands in - # case they want help on any particular command, eg. - # "setup.py --help foo". (This isn't the documented way to - # get help on a command, but I support it because that's how - # CVS does it -- might as well be consistent.) - if self.help: - parser.set_option_table (self.global_options) - parser.print_help ( - "Global options (apply to all commands, " + - "or can be used per command):") - print - if not self.commands: - parser.set_option_table (self.display_options) - parser.print_help ( - "Information display options (just display " + - "information, ignore any commands)") - print - - for command in self.commands: - klass = self.find_command_class (command) - parser.set_option_table (klass.user_options) - parser.print_help ("Options for '%s' command:" % command) - print - - print usage + # Handle the cases of --help as a "global" option, ie. + # "setup.py --help" and "setup.py --help command ...". For the + # former, we show global options (--verbose, --dry-run, etc.) + # and display-only options (--name, --version, etc.); for the + # latter, we omit the display-only options and show help for + # each command listed on the command line. + if self.help: + print "showing 'global' help; commands=", self.commands + self._show_help(parser, + display_options=len(self.commands) == 0, + commands=self.commands) return # Oops, no commands found -- an end-user error @@ -419,12 +342,133 @@ def parse_command_line (self, args): # parse_command_line() + def _parse_command_opts (self, parser, args): + + """Parse the command-line options for a single command. + 'parser' must be a FancyGetopt instance; 'args' must be the list + of arguments, starting with the current command (whose options + we are about to parse). Returns a new version of 'args' with + the next command at the front of the list; will be the empty + list if there are no more commands on the command line. Returns + None if the user asked for help on this command. + """ + # late import because of mutual dependence between these modules + from distutils.cmd import Command + + # Pull the current command from the head of the command line + command = args[0] + if not command_re.match (command): + raise SystemExit, "invalid command name '%s'" % command + self.commands.append (command) + + # Dig up the command class that implements this command, so we + # 1) know that it's a valid command, and 2) know which options + # it takes. + try: + cmd_class = self.get_command_class (command) + except DistutilsModuleError, msg: + raise DistutilsArgError, msg + + # Require that the command class be derived from Command -- want + # to be sure that the basic "command" interface is implemented. + if not issubclass (cmd_class, Command): + raise DistutilsClassError, \ + "command class %s must subclass Command" % cmd_class + + # Also make sure that the command object provides a list of its + # known options. + if not (hasattr (cmd_class, 'user_options') and + type (cmd_class.user_options) is ListType): + raise DistutilsClassError, \ + ("command class %s must provide " + + "'user_options' attribute (a list of tuples)") % \ + cmd_class + + # If the command class has a list of negative alias options, + # merge it in with the global negative aliases. + negative_opt = self.negative_opt + if hasattr (cmd_class, 'negative_opt'): + negative_opt = copy (negative_opt) + negative_opt.update (cmd_class.negative_opt) + + # All commands support the global options too, just by adding + # in 'global_options'. + parser.set_option_table (self.global_options + + cmd_class.user_options) + parser.set_negative_aliases (negative_opt) + (args, opts) = parser.getopt (args[1:]) + if opts.help: + print "showing help for command", cmd_class + self._show_help(parser, display_options=0, commands=[cmd_class]) + return + + # Put the options from the command-line into their official + # holding pen, the 'command_options' dictionary. + if not self.command_options.has_key(command): + self.command_options[command] = {} + cmd_opts = self.command_options[command] + for (name, value) in vars(opts).items(): + cmd_opts[command] = ("command line", value) + + return args + + # _parse_command_opts () + + + def _show_help (self, + parser, + global_options=1, + display_options=1, + commands=[]): + """Show help for the setup script command-line in the form of + several lists of command-line options. 'parser' should be a + FancyGetopt instance; do not expect it to be returned in the + same state, as its option table will be reset to make it + generate the correct help text. + + If 'global_options' is true, lists the global options: + --verbose, --dry-run, etc. If 'display_options' is true, lists + the "display-only" options: --name, --version, etc. Finally, + lists per-command help for every command name or command class + in 'commands'. + """ + # late import because of mutual dependence between these modules + from distutils.core import usage + from distutils.cmd import Command + + if global_options: + parser.set_option_table (self.global_options) + parser.print_help ("Global options:") + print + + if display_options: + parser.set_option_table (self.display_options) + parser.print_help ( + "Information display options (just display " + + "information, ignore any commands)") + print + + for command in self.commands: + if type(command) is ClassType and issubclass(klass, Command): + klass = command + else: + klass = self.get_command_class (command) + parser.set_option_table (klass.user_options) + parser.print_help ("Options for '%s' command:" % klass.__name__) + print + + print usage + return + + # _show_help () + + def handle_display_options (self, option_order): """If there were any non-global "display-only" options - (--help-commands or the metadata display options) on the command - line, display the requested info and return true; else return - false.""" - + (--help-commands or the metadata display options) on the command + line, display the requested info and return true; else return + false. + """ from distutils.core import usage # User just wants a list of commands -- we'll print it out and stop @@ -456,14 +500,15 @@ def handle_display_options (self, option_order): def print_command_list (self, commands, header, max_length): """Print a subset of the list of all commands -- used by - 'print_commands()'.""" + 'print_commands()'. + """ print header + ":" for cmd in commands: klass = self.cmdclass.get (cmd) if not klass: - klass = self.find_command_class (cmd) + klass = self.get_command_class (cmd) try: description = klass.description except AttributeError: @@ -475,12 +520,13 @@ def print_command_list (self, commands, header, max_length): def print_commands (self): - """Print out a help message listing all available commands with - a description of each. The list is divided into "standard - commands" (listed in distutils.command.__all__) and "extra - commands" (mentioned in self.cmdclass, but not a standard - command). The descriptions come from the command class - attribute 'description'.""" + """Print out a help message listing all available commands with a + description of each. The list is divided into "standard commands" + (listed in distutils.command.__all__) and "extra commands" + (mentioned in self.cmdclass, but not a standard command). The + descriptions come from the command class attribute + 'description'. + """ import distutils.command std_commands = distutils.command.__all__ @@ -508,19 +554,25 @@ def print_commands (self): max_length) # print_commands () - # -- Command class/object methods ---------------------------------- - def find_command_class (self, command): - """Given a command name, attempts to load the module and class that - implements that command. This is done by importing a module - "distutils.command." + command, and a class named 'command' in that - module. + def get_command_class (self, command): + """Return the class that implements the Distutils command named by + 'command'. First we check the 'cmdclass' dictionary; if the + command is mentioned there, we fetch the class object from the + dictionary and return it. Otherwise we load the command module + ("distutils.command." + command) and fetch the command class from + the module. The loaded class is also stored in 'cmdclass' + to speed future calls to 'get_command_class()'. Raises DistutilsModuleError if the expected module could not be - found, or if that module does not define the expected class.""" + found, or if that module does not define the expected class. + """ + klass = self.cmdclass.get(command) + if klass: + return klass module_name = 'distutils.command.' + command klass_name = command @@ -534,50 +586,28 @@ def find_command_class (self, command): (command, module_name) try: - klass = vars(module)[klass_name] - except KeyError: + klass = getattr(module, klass_name) + except AttributeError: raise DistutilsModuleError, \ "invalid command '%s' (no class '%s' in module '%s')" \ % (command, klass_name, module_name) + self.cmdclass[command] = klass return klass - # find_command_class () - - - def create_command_obj (self, command): - """Figure out the class that should implement a command, - instantiate it, cache and return the new "command object". - The "command class" is determined either by looking it up in - the 'cmdclass' attribute (this is the mechanism whereby - clients may override default Distutils commands or add their - own), or by calling the 'find_command_class()' method (if the - command name is not in 'cmdclass'.""" - - # Determine the command class -- either it's in the command_class - # dictionary, or we have to divine the module and class name - klass = self.cmdclass.get(command) - if not klass: - klass = self.find_command_class (command) - self.cmdclass[command] = klass + # get_command_class () - # Found the class OK -- instantiate it - cmd_obj = klass (self) - return cmd_obj - - - def find_command_obj (self, command, create=1): - """Look up and return a command object in the cache maintained by - 'create_command_obj()'. If none found, the action taken - depends on 'create': if true (the default), create a new - command object by calling 'create_command_obj()' and return - it; otherwise, return None. If 'command' is an invalid - command name, then DistutilsModuleError will be raised.""" - - cmd_obj = self.command_obj.get (command) + def get_command_obj (self, command, create=1): + """Return the command object for 'command'. Normally this object + is cached on a previous call to 'get_command_obj()'; if no comand + object for 'command' is in the cache, then we either create and + return it (if 'create' is true) or return None. + """ + cmd_obj = self.command_obj.get(command) if not cmd_obj and create: - cmd_obj = self.create_command_obj (command) - self.command_obj[command] = cmd_obj + klass = self.get_command_class(command) + cmd_obj = self.command_obj[command] = klass() + self.command_run[command] = 0 return cmd_obj @@ -586,17 +616,17 @@ def find_command_obj (self, command, create=1): def announce (self, msg, level=1): """Print 'msg' if 'level' is greater than or equal to the verbosity - level recorded in the 'verbose' attribute (which, currently, - can be only 0 or 1).""" - + level recorded in the 'verbose' attribute (which, currently, can be + only 0 or 1). + """ if self.verbose >= level: print msg def run_commands (self): """Run each command that was seen on the setup script command line. - Uses the list of commands found and cache of command objects - created by 'create_command_obj()'.""" + Uses the list of commands found and cache of command objects + created by 'get_command_obj()'.""" for cmd in self.commands: self.run_command (cmd) @@ -605,21 +635,20 @@ def run_commands (self): # -- Methods that operate on its Commands -------------------------- def run_command (self, command): - """Do whatever it takes to run a command (including nothing at all, - if the command has already been run). Specifically: if we have - already created and run the command named by 'command', return - silently without doing anything. If the command named by - 'command' doesn't even have a command object yet, create one. - Then invoke 'run()' on that command object (or an existing - one).""" + if the command has already been run). Specifically: if we have + already created and run the command named by 'command', return + silently without doing anything. If the command named by 'command' + doesn't even have a command object yet, create one. Then invoke + 'run()' on that command object (or an existing one). + """ # Already been here, done that? then return silently. if self.have_run.get (command): return self.announce ("running " + command) - cmd_obj = self.find_command_obj (command) + cmd_obj = self.get_command_obj (command) cmd_obj.ensure_ready () cmd_obj.run () self.have_run[command] = 1 From 1ea22ad71cc61f4f7467262c768ec43fabbb81d2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 01:43:08 +0000 Subject: [PATCH 0355/8469] Tweaked usage message. --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index a39bccd307..3eeba1df7e 100644 --- a/core.py +++ b/core.py @@ -21,10 +21,10 @@ # and per-command help. usage = """\ usage: %s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] - or: %s --help + or: %s --help [cmd1 cmd2 ...] or: %s --help-commands or: %s cmd --help -""" % ((sys.argv[0],) * 4) +""" % ((os.path.basename(sys.argv[0]),) * 4) def setup (**attrs): From 138ae247bb47e34672d909a46fa998a4b86b90f6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 01:44:20 +0000 Subject: [PATCH 0356/8469] OptionDummy now has a constructor that takes a list of options: each string in the option list is an attribute of the OptionDummy that will be initialized to None. --- fancy_getopt.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 39450e8079..588c6ba73f 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -239,7 +239,7 @@ def getopt (self, args=None, object=None): if args is None: args = sys.argv[1:] if object is None: - object = OptionDummy() + object = OptionDummy(self.attr_name.values()) created_object = 1 else: created_object = 0 @@ -465,7 +465,14 @@ def wrap_text (text, width): class OptionDummy: """Dummy class just used as a place to hold command-line option values as instance attributes.""" - pass + + def __init__ (self, options=[]): + """Create a new OptionDummy instance. The attributes listed in + 'options' will be initialized to None.""" + for opt in options: + setattr(self, opt, None) + +# class OptionDummy if __name__ == "__main__": From 3f5a39b346e9ed623bba60da5b773e238721ef71 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 01:55:01 +0000 Subject: [PATCH 0357/8469] Use 'get_command_obj()' instead of 'find_command_obj()'. --- cmd.py | 6 +++--- command/bdist_dumb.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd.py b/cmd.py index c544b86440..0cf88d41f5 100644 --- a/cmd.py +++ b/cmd.py @@ -183,7 +183,7 @@ def set_undefined_options (self, src_cmd, *option_pairs): # Option_pairs: list of (src_option, dst_option) tuples - src_cmd_obj = self.distribution.find_command_obj (src_cmd) + src_cmd_obj = self.distribution.get_command_obj (src_cmd) src_cmd_obj.ensure_ready () for (src_option, dst_option) in option_pairs: if getattr (self, dst_option) is None: @@ -192,11 +192,11 @@ def set_undefined_options (self, src_cmd, *option_pairs): def find_peer (self, command, create=1): - """Wrapper around Distribution's 'find_command_obj()' method: + """Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command'..""" - cmd_obj = self.distribution.find_command_obj (command, create) + cmd_obj = self.distribution.get_command_obj (command, create) cmd_obj.ensure_ready () return cmd_obj diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 2de2befc14..eaa192732b 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -63,7 +63,7 @@ def run (self): # command object that has *not* been finalized, so we can set # options on it! (The option we set, 'root', is so that we can do # a proper "fake install" using this install command object.) - install = self.distribution.find_command_obj('install') + install = self.distribution.get_command_obj('install') install.root = self.bdist_dir self.announce ("installing to %s" % self.bdist_dir) From ed327f4988e7fe976ba91586893e4babb655409c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 01:55:16 +0000 Subject: [PATCH 0358/8469] Fixed command description. --- command/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 5b3d77a399..e9cd80db35 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -8,7 +8,7 @@ class install_lib (Command): - description = "install pure Python modules" + description = "install all Python modules (extensions and pure Python)" user_options = [ ('install-dir=', 'd', "directory to install to"), From 684f4fcf396f5109aae531d4229699b55419b9e6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 03:47:35 +0000 Subject: [PATCH 0359/8469] Fixed so options from config files and command lines actually work: * 'get_command_obj()' now sets command attributes based on the 'command_options' dictionary * some typos fixed * kludged 'parse_config_files()' to re-initialize the ConfigParser instance after each file, so we know for sure which config file each option comes form * added lots of handy debugging output --- dist.py | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/dist.py b/dist.py index 3fd29d9f48..3ceadf1985 100644 --- a/dist.py +++ b/dist.py @@ -258,8 +258,11 @@ def parse_config_files (self, filenames=None): if filenames is None: filenames = self.find_config_files() + print "Distribution.parse_config_files():" + parser = ConfigParser() for filename in filenames: + print " reading", filename parser.read(filename) for section in parser.sections(): options = parser.options(section) @@ -271,9 +274,11 @@ def parse_config_files (self, filenames=None): if opt != '__name__': opts[opt] = (filename, parser.get(section,opt)) - from pprint import pprint - print "options (after parsing config files):" - pprint (self.command_options) + # Make the ConfigParser forget everything (so we retain + # the original filenames that options come from) -- gag, + # retch, puke -- another good reason for a distutils- + # specific config parser (sigh...) + parser.__init__() # -- Command-line parsing methods ---------------------------------- @@ -397,7 +402,7 @@ def _parse_command_opts (self, parser, args): cmd_class.user_options) parser.set_negative_aliases (negative_opt) (args, opts) = parser.getopt (args[1:]) - if opts.help: + if hasattr(opts, 'help') and opts.help: print "showing help for command", cmd_class self._show_help(parser, display_options=0, commands=[cmd_class]) return @@ -408,7 +413,7 @@ def _parse_command_opts (self, parser, args): self.command_options[command] = {} cmd_opts = self.command_options[command] for (name, value) in vars(opts).items(): - cmd_opts[command] = ("command line", value) + cmd_opts[name] = ("command line", value) return args @@ -605,9 +610,24 @@ def get_command_obj (self, command, create=1): """ cmd_obj = self.command_obj.get(command) if not cmd_obj and create: + print "Distribution.get_command_obj(): " \ + "creating '%s' command object" % command + klass = self.get_command_class(command) - cmd_obj = self.command_obj[command] = klass() - self.command_run[command] = 0 + cmd_obj = self.command_obj[command] = klass(self) + self.have_run[command] = 0 + + # Set any options that were supplied in config files + # or on the command line. (NB. support for error + # reporting is lame here: any errors aren't reported + # until 'finalize_options()' is called, which means + # we won't report the source of the error.) + options = self.command_options.get(command) + if options: + print " setting options:" + for (option, (source, value)) in options.items(): + print " %s = %s (from %s)" % (option, value, source) + setattr(cmd_obj, option, value) return cmd_obj From 9e14daca28b2a95ede58edbb6a4a87ff81ac803f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 03:53:10 +0000 Subject: [PATCH 0360/8469] Don't take advantage of OptionDummy's new "auto-initialization" feature after all -- turns out it doesn't buy us much after all... --- fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 588c6ba73f..a593354c9d 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -239,7 +239,7 @@ def getopt (self, args=None, object=None): if args is None: args = sys.argv[1:] if object is None: - object = OptionDummy(self.attr_name.values()) + object = OptionDummy() created_object = 1 else: created_object = 0 From ecde8dd1d2bee1ac529e903b23c1a874c220b846 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 03:54:16 +0000 Subject: [PATCH 0361/8469] Added some debuging output (actually moved here from dist.py) -- dump the Distribution's 'command_options' dict after parsing config files, and then after parsing the command line. --- core.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core.py b/core.py index 3eeba1df7e..e22db939c9 100644 --- a/core.py +++ b/core.py @@ -59,6 +59,8 @@ def setup (**attrs): and the command-specific options that became attributes of each command object.""" + from pprint import pprint # for debugging output + # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get ('distclass') @@ -75,6 +77,9 @@ def setup (**attrs): # the setup script, but be overridden by the command line. dist.parse_config_files() + print "options (after parsing config files):" + pprint (dist.command_options) + # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. try: @@ -83,6 +88,9 @@ def setup (**attrs): sys.stderr.write (usage + "\n") raise SystemExit, "error: %s" % msg + print "options (after parsing command line):" + pprint (dist.command_options) + # And finally, run all the commands found on the command line. if ok: try: From a5620289f67a4feeb2f0cb54e6c7b481da3f5ea4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 04:11:14 +0000 Subject: [PATCH 0362/8469] Fix 'get_command_obj()' so it checks if a command object has an attribute before setting it -- this will catch bad options (eg. typos) in config files. --- dist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist.py b/dist.py index 3ceadf1985..7bdd9aa09b 100644 --- a/dist.py +++ b/dist.py @@ -627,6 +627,10 @@ def get_command_obj (self, command, create=1): print " setting options:" for (option, (source, value)) in options.items(): print " %s = %s (from %s)" % (option, value, source) + if not hasattr(cmd_obj, option): + raise DistutilsOptionError, \ + ("%s: command '%s' has no such option '%s'") % \ + (source, command, option) setattr(cmd_obj, option, value) return cmd_obj From 9449a2faa1832da6ab9fae2b656333f6548ebfb6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 23 May 2000 23:14:00 +0000 Subject: [PATCH 0363/8469] Catch failure to open installed Makefile, and report it as a DistutilsPlatformError: "invalid Python installation". (This will happen on Red Hat-ish systems where the python-devel package is not installed.) --- sysconfig.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 5cc71dc0ba..a5f3816a16 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -229,7 +229,17 @@ def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = globals() # load the installed Makefile: - parse_makefile(open(get_makefile_filename()), g) + try: + filename = get_makefile_filename() + file = open(filename) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError, my_msg + + parse_makefile(file, g) def _init_nt(): From 9cd0dff83db07c62d3a941dbd82cbeb8b2652bcf Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 01:10:04 +0000 Subject: [PATCH 0364/8469] Normalized all the end-of-class lines. --- command/bdist_rpm.py | 2 ++ command/build.py | 2 +- command/build_clib.py | 2 +- command/build_ext.py | 2 +- command/build_py.py | 2 +- command/clean.py | 2 ++ command/install.py | 2 +- command/sdist.py | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 9c3aca3bc1..d10d0762ca 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -388,3 +388,5 @@ def _check_string_list(self, var_name, default_value = []): 'list or tuple of strings' % var_name) else: return default_value + +# class bdist_rpm diff --git a/command/build.py b/command/build.py index 7d753b1126..aab0d6f177 100644 --- a/command/build.py +++ b/command/build.py @@ -100,4 +100,4 @@ def run (self): if self.distribution.has_ext_modules(): self.run_peer ('build_ext') -# end class Build +# class build diff --git a/command/build_clib.py b/command/build_clib.py index 681cd76b56..dba9a40a8b 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -207,4 +207,4 @@ def build_libraries (self, libraries): # build_libraries () -# class BuildLib +# class build_lib diff --git a/command/build_ext.py b/command/build_ext.py index aa9ea0d034..4fb51ac713 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -406,4 +406,4 @@ def get_ext_libname (self, ext_name): return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' -# class BuildExt +# class build_ext diff --git a/command/build_py.py b/command/build_py.py index 2a1fdd62c9..72c6157ceb 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -322,4 +322,4 @@ def build_packages (self): # build_packages () -# end class BuildPy +# class build_py diff --git a/command/clean.py b/command/clean.py index d6999060bd..62307a1968 100644 --- a/command/clean.py +++ b/command/clean.py @@ -74,3 +74,5 @@ def run(self): self.announce ("removing '%s'" % self.build_base) except OSError: pass + +# class clean diff --git a/command/install.py b/command/install.py index 392fe507c9..5398175f45 100644 --- a/command/install.py +++ b/command/install.py @@ -519,4 +519,4 @@ def create_path_file (self): "installations)") % filename) -# class Install +# class install diff --git a/command/sdist.py b/command/sdist.py index f644e9fbfb..56bc4c9556 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -519,7 +519,7 @@ def make_distribution (self): if not self.keep_tree: remove_tree (base_dir, self.verbose, self.dry_run) -# class Dist +# class sdist # ---------------------------------------------------------------------- From 6a76fd2a072f87312fcd0affe20e4715d4ec0a98 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 01:19:18 +0000 Subject: [PATCH 0365/8469] Bastian Kleineidam: the "build_scripts" command and changes necessary to support it. Details: - build command additionally calls build_scripts - build_scripts builds your scripts in 'build/scripts' and adjusts the first line if it begins with "#!" and ends with "python", optionally ending with commandline options (like -O, -t ...). Adjusting means we write the current path to the Python interpreter in the first line. - install_scripts copies the scripts to the install_scripts dir - install_data copies your data_files in install_data. You can supply individual directories for your data_files: data_files = ['doc/info.txt', # copy this file in install_scripts dir ('testdata', ['a.dat', 'b.dat']), # copy these files in # install_scripts/testdata ('/etc', ['packagerc']), # copy this in /etc. When --root is # given, copy this in rootdir/etc ] So you can use the --root option with absolute data paths. --- command/__init__.py | 1 + command/build.py | 8 +++++++ command/install_data.py | 45 +++++++++++++++++++++++++++++++++----- command/install_scripts.py | 31 +++++++++++++++++++++----- 4 files changed, 74 insertions(+), 11 deletions(-) diff --git a/command/__init__.py b/command/__init__.py index cd7753fe64..229c8a3486 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -9,6 +9,7 @@ 'build_py', 'build_ext', 'build_clib', + 'build_scripts', 'install', 'install_lib', 'install_scripts', diff --git a/command/build.py b/command/build.py index aab0d6f177..96d41d5e0b 100644 --- a/command/build.py +++ b/command/build.py @@ -24,6 +24,8 @@ class build (Command): ('build-lib=', None, "build directory for all distribution (defaults to either " + "build-purelib or build-platlib"), + ('build-scripts=', None, + "build directory for scripts"), ('build-temp=', 't', "temporary build directory"), ('compiler=', 'c', @@ -42,6 +44,7 @@ def initialize_options (self): self.build_platlib = None self.build_lib = None self.build_temp = None + self.build_scripts = None self.compiler = None self.debug = None self.force = 0 @@ -76,6 +79,8 @@ def finalize_options (self): if self.build_temp is None: self.build_temp = os.path.join (self.build_base, 'temp.' + self.plat) + if self.build_scripts is None: + self.build_scripts = os.path.join (self.build_base, 'scripts') # finalize_options () @@ -100,4 +105,7 @@ def run (self): if self.distribution.has_ext_modules(): self.run_peer ('build_ext') + if self.distribution.scripts: + self.run_peer ('build_scripts') + # class build diff --git a/command/install_data.py b/command/install_data.py index fd9836b607..65d188f7b3 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -7,17 +7,52 @@ __revision__ = "$Id$" -from distutils.cmd import install_misc +import os +from types import StringType +from distutils.core import Command -class install_data (install_misc): +class install_data (Command): description = "install data files" + user_options = [ + ('install-dir=', 'd', + "directory to install the files to"), + ('root=', None, + "install everything relative to this alternate root directory"), + ] + + def initialize_options (self): + self.install_dir = None + self.outfiles = None + self.root = None + self.data_files = self.distribution.data_files + def finalize_options (self): - self._install_dir_from('install_data') + self.set_undefined_options('install', + ('install_data', 'install_dir'), + ('root', 'root'), + ) def run (self): - self._copy_files(self.distribution.data_files) + self.mkpath(self.install_dir) + for f in self.data_files: + if type(f) == StringType: + # its a simple file, so copy it + self.copy_file(f, self.install_dir) + else: + # its a tuple with path to install to and a list of files + dir = f[0] + if not os.path.isabs(dir): + dir = os.path.join(self.install_dir, dir) + elif self.root: + dir = os.path.join(self.root, dir[1:]) + self.mkpath(dir) + for data in f[1]: + self.copy_file(data, dir) def get_inputs (self): - return self.distribution.data_files or [] + return self.data_files or [] + + def get_outputs (self): + return self.outfiles diff --git a/command/install_scripts.py b/command/install_scripts.py index 43e5fc18bc..9b78326373 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -8,23 +8,39 @@ __revision__ = "$Id$" import os -from distutils.cmd import install_misc +from distutils.core import Command from stat import ST_MODE -class install_scripts(install_misc): +class install_scripts(Command): description = "install scripts" + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ('build-dir=','b', "build directory (where to install from)"), + ('skip-build', None, "skip the build steps"), + ] + + def initialize_options (self): + self.install_dir = None + self.build_dir = None + self.skip_build = None + def finalize_options (self): - self._install_dir_from('install_scripts') + self.set_undefined_options('build', ('build_scripts', 'build_dir')) + self.set_undefined_options ('install', + ('install_scripts', 'install_dir'), + ('skip_build', 'skip_build'), + ) def run (self): - self._copy_files(self.distribution.scripts) + if not self.skip_build: + self.run_peer('build_scripts') + self.outfiles = self.copy_tree (self.build_dir, self.install_dir) if os.name == 'posix': # Set the executable bits (owner, group, and world) on # all the scripts we just installed. - files = self.get_outputs() - for file in files: + for file in self.get_outputs(): if self.dry_run: self.announce("changing mode of %s" % file) else: @@ -35,4 +51,7 @@ def run (self): def get_inputs (self): return self.distribution.scripts or [] + def get_outputs(self): + return self.outfiles or [] + # class install_scripts From a561b7d0b579bb9f7bdf5e861daf54b20145a8c1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 01:20:15 +0000 Subject: [PATCH 0366/8469] Bastian Kleineidam: the "build_scripts" command. --- command/build_scripts.py | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 command/build_scripts.py diff --git a/command/build_scripts.py b/command/build_scripts.py new file mode 100644 index 0000000000..1e7279d022 --- /dev/null +++ b/command/build_scripts.py @@ -0,0 +1,71 @@ +"""distutils.command.build_scripts + +Implements the Distutils 'build_scripts' command.""" + +# created 2000/05/23, Bastian Kleineidam + +__revision__ = "$Id$" + +import sys,os,re +from distutils.core import Command + +# check if Python is called on the first line with this expression +first_line_re = re.compile(r"^#!.+python(\s-\w+)*") + +class build_scripts (Command): + + description = "\"build\" scripts" + + user_options = [ + ('build-dir=', 'd', "directory to \"build\" (copy) to"), + ('force', 'f', "forcibly build everything (ignore file timestamps"), + ] + + + def initialize_options (self): + self.build_dir = None + self.scripts = None + self.force = None + self.outfiles = None + + def finalize_options (self): + self.set_undefined_options ('build', + ('build_scripts', 'build_dir'), + ('force', 'force')) + self.scripts = self.distribution.scripts + + + def run (self): + if not self.scripts: + return + self._copy_files() + self._adjust_files() + + def _copy_files(self): + """Copy all the scripts to the build dir""" + self.outfiles = [] + self.mkpath(self.build_dir) + for f in self.scripts: + print self.build_dir + if self.copy_file(f, self.build_dir): + self.outfiles.append(os.path.join(self.build_dir, f)) + + def _adjust_files(self): + """If the first line begins with #! and ends with python + replace it with the current python interpreter""" + for f in self.outfiles: + if not self.dry_run: + data = open(f, "r").readlines() + if not data: + self.warn("%s is an empty file!" % f) + continue + mo = first_line_re.match(data[0]) + if mo: + self.announce("Adjusting first line of file %s" % f) + data[0] = "#!"+sys.executable + # add optional command line options + if mo.group(1): + data[0] = data[0] + mo.group(1) + else: + data[0] = data[0] + "\n" + open(f, "w").writelines(data) From dec17861b3cc97457f3eef132a26ebe5c55d976a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 01:21:54 +0000 Subject: [PATCH 0367/8469] Use Distribution's 'has_scripts()' method instead of directly accessing its 'scripts' attribute. --- command/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build.py b/command/build.py index 96d41d5e0b..d9eed7685c 100644 --- a/command/build.py +++ b/command/build.py @@ -105,7 +105,7 @@ def run (self): if self.distribution.has_ext_modules(): self.run_peer ('build_ext') - if self.distribution.scripts: + if self.distribution.has_scripts(): self.run_peer ('build_scripts') # class build From ef17c6ecdc8fcc0285ed78c359093824cc040d50 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 01:26:23 +0000 Subject: [PATCH 0368/8469] Added comment to remind us of the (temporary?) obsolescense of the 'install_misc' class. --- cmd.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd.py b/cmd.py index 0cf88d41f5..09727331d4 100644 --- a/cmd.py +++ b/cmd.py @@ -344,6 +344,11 @@ def make_file (self, infiles, outfile, func, args, # class Command +# XXX 'install_misc' class not currently used -- it was the base class for +# both 'install_scripts' and 'install_data', but they outgrew it. It might +# still be useful for 'install_headers', though, so I'm keeping it around +# for the time being. + class install_misc (Command): """Common base class for installing some files in a subdirectory. Currently used by install_data and install_scripts. From eaf0c26b00302e889666ceeff1ebfddf519cef59 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 02:03:56 +0000 Subject: [PATCH 0369/8469] Improvements to Bastian's build_scripts command: * 'first_line_re' loosened up * command description improved * replaced '_copy_files()' and '_adjust_files()' with one method that does everything, 'copy_scripts()' -- this should be more efficient than Bastian's version, should behave better in dry-run mode, and does timestamp dependency-checking --- command/build_scripts.py | 89 ++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 1e7279d022..18297348c0 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -6,15 +6,16 @@ __revision__ = "$Id$" -import sys,os,re +import sys, os, re from distutils.core import Command +from distutils.dep_util import newer # check if Python is called on the first line with this expression -first_line_re = re.compile(r"^#!.+python(\s-\w+)*") +first_line_re = re.compile(r'^#!.*python(\s+.*)?') class build_scripts (Command): - description = "\"build\" scripts" + description = "\"build\" scripts (copy and fixup #! line)" user_options = [ ('build-dir=', 'd', "directory to \"build\" (copy) to"), @@ -38,34 +39,60 @@ def finalize_options (self): def run (self): if not self.scripts: return - self._copy_files() - self._adjust_files() + self.copy_scripts() + - def _copy_files(self): - """Copy all the scripts to the build dir""" - self.outfiles = [] + def copy_scripts (self): + """Copy each script listed in 'self.scripts'; if it's marked as a + Python script in the Unix way (first line matches 'first_line_re', + ie. starts with "\#!" and contains "python"), then adjust the first + line to refer to the current Python intepreter as we copy. + """ + outfiles = [] self.mkpath(self.build_dir) - for f in self.scripts: - print self.build_dir - if self.copy_file(f, self.build_dir): - self.outfiles.append(os.path.join(self.build_dir, f)) - - def _adjust_files(self): - """If the first line begins with #! and ends with python - replace it with the current python interpreter""" - for f in self.outfiles: - if not self.dry_run: - data = open(f, "r").readlines() - if not data: - self.warn("%s is an empty file!" % f) + for script in self.scripts: + adjust = 0 + outfile = os.path.join(self.build_dir, script) + + if not self.force and not newer(script, outfile): + self.announce("not copying %s (output up-to-date)" % script) + continue + + # Always open the file, but ignore failures in dry-run mode -- + # that way, we'll get accurate feedback if we can read the + # script. + try: + f = open(script, "r") + except IOError: + if not self.dry_run: + raise + f = None + else: + first_line = f.readline() + if not first_line: + self.warn("%s is an empty file (skipping)" % script) continue - mo = first_line_re.match(data[0]) - if mo: - self.announce("Adjusting first line of file %s" % f) - data[0] = "#!"+sys.executable - # add optional command line options - if mo.group(1): - data[0] = data[0] + mo.group(1) - else: - data[0] = data[0] + "\n" - open(f, "w").writelines(data) + + match = first_line_re.match(first_line) + if match: + adjust = 1 + post_interp = match.group(1) + + if adjust: + self.announce("copying and adjusting %s -> %s" % + (script, self.build_dir)) + if not self.dry_run: + outf = open(outfile, "w") + outf.write("#!%s%s\n" % + (os.path.normpath(sys.executable), post_interp)) + outf.writelines(f.readlines()) + outf.close() + if f: + f.close() + else: + f.close() + self.copy_file(script, outfile) + + # copy_scripts () + +# class build_scripts From 14a7a370319757cb72bc70c020c6944077f555e3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 02:14:26 +0000 Subject: [PATCH 0370/8469] Fix to use 'change_root()' rather than directly mangling path. --- command/install_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install_data.py b/command/install_data.py index 65d188f7b3..acc89aa395 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -10,6 +10,7 @@ import os from types import StringType from distutils.core import Command +from distutils.util import change_root class install_data (Command): @@ -46,7 +47,7 @@ def run (self): if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self.root: - dir = os.path.join(self.root, dir[1:]) + dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: self.copy_file(data, dir) From 62bcf92f91582ef01086ae94e446a1aee8b82274 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 25 May 2000 20:05:52 +0000 Subject: [PATCH 0371/8469] Take the basename of the script before concatenating it with the build dir. --- command/build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 18297348c0..6467e65b83 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -52,7 +52,7 @@ def copy_scripts (self): self.mkpath(self.build_dir) for script in self.scripts: adjust = 0 - outfile = os.path.join(self.build_dir, script) + outfile = os.path.join(self.build_dir, os.path.basename(script)) if not self.force and not newer(script, outfile): self.announce("not copying %s (output up-to-date)" % script) From 514f94d06bedf2f945a7ec777616e0c47ec881a3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 26 May 2000 00:44:06 +0000 Subject: [PATCH 0372/8469] Fixed a couple of long-hidden bugs (amazing what you find when you attempt to verify the bold assertions in the documentation): * entries for the "root package" in 'package_dir' didn't work -- fixed by improving the fall-through code in 'get_package_dir()' * __init__.py files weren't installed when modules-in-packages were listed individually (ie. in 'py_modules' in the setup script); fixed by making 'check_package()' return the name of the __init__ file if it exists, and making 'find_modules()' add an entry to the module list for __init__ if applicable --- command/build_py.py | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 72c6157ceb..92a37f20c4 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -117,8 +117,17 @@ def get_package_dir (self, package): tail.insert (0, pdir) return apply (os.path.join, tail) else: - # arg! everything failed, we might as well have not even - # looked in package_dir -- oh well + # Oops, got all the way through 'path' without finding a + # match in package_dir. If package_dir defines a directory + # for the root (nameless) package, then fallback on it; + # otherwise, we might as well have not consulted + # package_dir at all, as we just use the directory implied + # by 'tail' (which should be the same as the original value + # of 'path' at this point). + pdir = self.package_dir.get('') + if pdir is not None: + tail.insert(0, pdir) + if tail: return apply (os.path.join, tail) else: @@ -145,9 +154,16 @@ def check_package (self, package, package_dir): # Require __init__.py for all but the "root package" if package: init_py = os.path.join (package_dir, "__init__.py") - if not os.path.isfile (init_py): + if os.path.isfile (init_py): + return init_py + else: self.warn (("package init file '%s' not found " + "(or not a regular file)") % init_py) + + # Either not in a package at all (__init__.py not expected), or + # __init__.py doesn't exist -- so don't return the filename. + return + # check_package () @@ -177,6 +193,15 @@ def find_package_modules (self, package, package_dir): def find_modules (self): + """Finds individually-specified Python modules, ie. those listed by + module name in 'self.modules'. Returns a list of tuples (package, + module_base, filename): 'package' is a tuple of the path through + package-space to the module; 'module_base' is the bare (no + packages, no dots) module name, and 'filename' is the path to the + ".py" file (relative to the distribution root) that implements the + module. + """ + # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for @@ -185,7 +210,7 @@ def find_modules (self): # is valid (exists, contains __init__.py, ... ?) packages = {} - # List of (module, package, filename) tuples to return + # List of (package, module, filename) tuples to return modules = [] # We treat modules-in-packages almost the same as toplevel modules, @@ -205,8 +230,10 @@ def find_modules (self): checked = 0 if not checked: - self.check_package (package, package_dir) + init_py = self.check_package (package, package_dir) packages[package] = (package_dir, 1) + if init_py: + modules.append((package, "__init__", init_py)) # XXX perhaps we should also check for just .pyc files # (so greedy closed-source bastards can distribute Python @@ -215,7 +242,7 @@ def find_modules (self): if not self.check_module (module, module_file): continue - modules.append ((package, module, module_file)) + modules.append ((package, module_base, module_file)) return modules From a9e47e475f9420277cc20e1eccf5b67c42adf8b7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 26 May 2000 00:54:52 +0000 Subject: [PATCH 0373/8469] Added the DEBUG global (set from the DISTUTILS_DEBUG environment variable). Changed the exception-handling code in 'setup()' to re-raise exceptions if DEBUG is true. --- core.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/core.py b/core.py index e22db939c9..cd0f8e9694 100644 --- a/core.py +++ b/core.py @@ -27,6 +27,11 @@ """ % ((os.path.basename(sys.argv[0]),) * 4) +# If DISTUTILS_DEBUG is anything other than the empty string, we run in +# debug mode. +DEBUG = os.environ.get('DISTUTILS_DEBUG') + + def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: @@ -101,18 +106,26 @@ def setup (**attrs): # check for Python 1.5.2-style {IO,OS}Error exception objects if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): if exc.filename: - raise SystemExit, \ - "error: %s: %s" % (exc.filename, exc.strerror) + error = "error: %s: %s" % (exc.filename, exc.strerror) else: # two-argument functions in posix module don't # include the filename in the exception object! - raise SystemExit, \ - "error: %s" % exc.strerror + error = "error: %s" % exc.strerror else: - raise SystemExit, "error: " + str(exc[-1]) + error = "error: " + str(exc[-1]) + + if DEBUG: + sys.stderr.write(error + "\n") + raise + else: + raise SystemExit, error + except (DistutilsExecError, DistutilsFileError, DistutilsOptionError), msg: - raise SystemExit, "error: " + str(msg) + if DEBUG: + raise + else: + raise SystemExit, "error: " + str(msg) # setup () From bab7e2589a1ecb58045e27f6bce0938d7fee5377 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 26 May 2000 01:00:15 +0000 Subject: [PATCH 0374/8469] Factored out code for extracting-or-creating one of the option dictionaries in 'self.command_options' to 'get_option_dict()'. Simplified code in 'parse_config_files()' and 'parse_command_line()' accordingly. Fixed code in constructor that processes the 'options' dictionary from the setup script so it actually works: uses the new 'self.command_options' dictionary rather than creating command objects and calling 'set_option()' on them. --- dist.py | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/dist.py b/dist.py index 7bdd9aa09b..33b3b657b1 100644 --- a/dist.py +++ b/dist.py @@ -185,11 +185,9 @@ def __init__ (self, attrs=None): if options: del attrs['options'] for (command, cmd_options) in options.items(): - cmd_obj = self.get_command_obj (command) - for (key, val) in cmd_options.items(): - cmd_obj.set_option (key, val) - # loop over commands - # if any command options + opt_dict = self.get_option_dict(command) + for (opt, val) in cmd_options.items(): + opt_dict[opt] = ("setup script", val) # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! @@ -205,6 +203,19 @@ def __init__ (self, attrs=None): # __init__ () + def get_option_dict (self, command): + """Get the option dictionary for a given command. If that + command's option dictionary hasn't been created yet, then create it + and return the new dictionary; otherwise, return the existing + option dictionary. + """ + + dict = self.command_options.get(command) + if dict is None: + dict = self.command_options[command] = {} + return dict + + # -- Config file finding/parsing methods --------------------------- def find_config_files (self): @@ -266,13 +277,11 @@ def parse_config_files (self, filenames=None): parser.read(filename) for section in parser.sections(): options = parser.options(section) - if not self.command_options.has_key(section): - self.command_options[section] = {} - opts = self.command_options[section] + opt_dict = self.get_option_dict(section) for opt in options: if opt != '__name__': - opts[opt] = (filename, parser.get(section,opt)) + opt_dict[opt] = (filename, parser.get(section,opt)) # Make the ConfigParser forget everything (so we retain # the original filenames that options come from) -- gag, @@ -409,11 +418,9 @@ def _parse_command_opts (self, parser, args): # Put the options from the command-line into their official # holding pen, the 'command_options' dictionary. - if not self.command_options.has_key(command): - self.command_options[command] = {} - cmd_opts = self.command_options[command] + opt_dict = self.get_option_dict(command) for (name, value) in vars(opts).items(): - cmd_opts[name] = ("command line", value) + opt_dict[name] = ("command line", value) return args From b960e574912ef3567a40ec67e3684d2f07d772a8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 26 May 2000 01:31:53 +0000 Subject: [PATCH 0375/8469] Rene Liebscher: check if the extension file (.so or .pyd) is up-to-date with respect to the source files; that way, we don't needlessly rebuild just because object files go away. --- command/build_ext.py | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4fb51ac713..acf1d7b7d5 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -12,7 +12,7 @@ from types import * from distutils.core import Command from distutils.errors import * - +from distutils.dep_util import newer_group # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). @@ -285,7 +285,29 @@ def build_extensions (self): "a list of source filenames") % extension_name sources = list (sources) - self.announce ("building '%s' extension" % extension_name) + fullname = self.get_ext_fullname (extension_name) + if self.inplace: + # ignore build-lib -- put the compiled extension into + # the source tree along with pure Python modules + + modpath = string.split (fullname, '.') + package = string.join (modpath[0:-1], '.') + base = modpath[-1] + + build_py = self.find_peer ('build_py') + package_dir = build_py.get_package_dir (package) + ext_filename = os.path.join (package_dir, + self.get_ext_filename(base)) + else: + ext_filename = os.path.join (self.build_lib, + self.get_ext_filename(fullname)) + + if not newer_group(sources, ext_filename, 'newer'): + self.announce ("skipping '%s' extension (up-to-date)" % + extension_name) + continue # 'for' loop over all extensions + else: + self.announce ("building '%s' extension" % extension_name) # First step: compile the source code to object files. This # drops the object files in the current directory, regardless @@ -357,23 +379,6 @@ def build_extensions (self): self.mkpath (os.path.dirname (implib_file)) # if MSVC - fullname = self.get_ext_fullname (extension_name) - if self.inplace: - # ignore build-lib -- put the compiled extension into - # the source tree along with pure Python modules - - modpath = string.split (fullname, '.') - package = string.join (modpath[0:-1], '.') - base = modpath[-1] - - build_py = self.find_peer ('build_py') - package_dir = build_py.get_package_dir (package) - ext_filename = os.path.join (package_dir, - self.get_ext_filename(base)) - else: - ext_filename = os.path.join (self.build_lib, - self.get_ext_filename(fullname)) - self.compiler.link_shared_object (objects, ext_filename, libraries=libraries, library_dirs=library_dirs, From 4fb6d85e29cc25c036f2ecf88b746dd7de51387d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 01:25:16 +0000 Subject: [PATCH 0376/8469] Added 'install_headers' command to install C/C++ header files. --- command/__init__.py | 1 + command/install_headers.py | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 command/install_headers.py diff --git a/command/__init__.py b/command/__init__.py index 229c8a3486..56c26fe151 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -12,6 +12,7 @@ 'build_scripts', 'install', 'install_lib', + 'install_headers', 'install_scripts', 'install_data', 'clean', diff --git a/command/install_headers.py b/command/install_headers.py new file mode 100644 index 0000000000..33edb945dd --- /dev/null +++ b/command/install_headers.py @@ -0,0 +1,40 @@ +"""distutils.command.install_headers + +Implements the Distutils 'install_headers' command, to install C/C++ header +files to the Python include directory.""" + +# created 2000/05/26, Greg Ward + +__revision__ = "$Id$" + +from distutils.core import Command + + +class install_headers (Command): + + description = "install C/C++ header files" + + user_options = [('install-dir=', 'd', + "directory to install header files to"), + ] + + + def initialize_options (self): + self.install_dir = None + + def finalize_options (self): + self.set_undefined_options('install', + ('install_headers', 'install_dir')) + + def run (self): + headers = self.distribution.headers + if not headers: + return + + self.mkpath(self.install_dir) + for header in headers: + self.copy_file(header, self.install_dir) + + # run() + +# class install_headers From 2f4fee98094cc689a133ac05186a61fdffc0ea7f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 01:33:12 +0000 Subject: [PATCH 0377/8469] Support for the "install_headers" command: * 'headers' entry added to all the install schemes * '--install-headers' option added * 'install_headers' added to 'sub_commands' * added 'dist_name' to configuration variables (along with a few others that seem handy: 'dist_version', 'dist_fullname', and 'py_version' * in 'finalize_unix()', make sure 'install_headers' defined if user specified 'install_base' and/or 'install_platbase' * added 'has_headers()' * a few other small changes --- command/install.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/command/install.py b/command/install.py index 5398175f45..d89ce4d255 100644 --- a/command/install.py +++ b/command/install.py @@ -18,24 +18,28 @@ 'unix_prefix': { 'purelib': '$base/lib/python$py_version_short/site-packages', 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'headers': '$base/include/python/$py_version_short/$dist_name', 'scripts': '$base/bin', 'data' : '$base/share', }, 'unix_home': { 'purelib': '$base/lib/python', 'platlib': '$base/lib/python', + 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base/share', }, 'nt': { 'purelib': '$base', 'platlib': '$base', + 'headers': '$base\\Include\\$dist_name', 'scripts': '$base\\Scripts', 'data' : '$base\\Data', }, 'mac': { 'purelib': '$base:Lib', 'platlib': '$base:Mac:PlugIns', + 'headers': '$base:Include:$dist_name', 'scripts': '$base:Scripts', 'data' : '$base:Data', } @@ -73,6 +77,8 @@ class install (Command): "installation directory for all module distributions " + "(overrides --install-purelib and --install-platlib)"), + ('install-headers=', None, + "installation directory for C/C++ headers"), ('install-scripts=', None, "installation directory for Python scripts"), ('install-data=', None, @@ -99,6 +105,7 @@ class install (Command): # true if 'command' (the sub-command name, a string) needs to be run. # If 'method' is None, assume that 'command' must always be run. sub_commands = [('has_lib', 'install_lib'), + ('has_headers', 'install_headers'), ('has_scripts', 'install_scripts'), ('has_data', 'install_data'), ] @@ -125,6 +132,7 @@ def initialize_options (self): # that installation scheme. self.install_purelib = None # for pure module distributions self.install_platlib = None # non-pure (dists w/ extensions) + self.install_headers = None # for C/C++ headers self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None @@ -200,21 +208,26 @@ def finalize_options (self): # install_{purelib,platlib,lib,scripts,data,...}, and the # INSTALL_SCHEME dictionary above. Phew! - self.dump_dirs ("pre-finalize_xxx") + self.dump_dirs ("pre-finalize_{unix,other}") if os.name == 'posix': self.finalize_unix () else: self.finalize_other () - self.dump_dirs ("post-finalize_xxx()") + self.dump_dirs ("post-finalize_{unix,other}()") # Expand configuration variables, tilde, etc. in self.install_base # and self.install_platbase -- that way, we can use $base or # $platbase in the other installation directories and not worry # about needing recursive variable expansion (shudder). - self.config_vars = {'py_version_short': sys.version[0:3], + py_version = (string.split(sys.version))[0] + self.config_vars = {'dist_name': self.distribution.get_name(), + 'dist_version': self.distribution.get_version(), + 'dist_fullname': self.distribution.get_fullname(), + 'py_version': py_version, + 'py_version_short': py_version[0:3], 'sys_prefix': sysconfig.PREFIX, 'sys_exec_prefix': sysconfig.EXEC_PREFIX, } @@ -295,12 +308,12 @@ def finalize_unix (self): if ((self.install_lib is None and self.install_purelib is None and self.install_platlib is None) or + self.install_headers is None or self.install_scripts is None or self.install_data is None): raise DistutilsOptionError, \ "install-base or install-platbase supplied, but " + \ "installation scheme is incomplete" - return if self.home is not None: @@ -359,7 +372,7 @@ def finalize_other (self): # Windows and Mac OS for now def select_scheme (self, name): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] - for key in ('purelib', 'platlib', 'scripts', 'data'): + for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): attrname = 'install_' + key if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) @@ -384,6 +397,7 @@ def expand_dirs (self): self._expand_attrs (['install_purelib', 'install_platlib', 'install_lib', + 'install_headers', 'install_scripts', 'install_data',]) @@ -478,6 +492,9 @@ def has_lib (self): return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) + def has_headers (self): + return self.distribution.has_headers() + def has_scripts (self): return self.distribution.has_scripts() From 3269156427c4908f5388f8f214436797d1b41810 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 01:33:49 +0000 Subject: [PATCH 0378/8469] Tweaked description, help text. --- command/install_scripts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install_scripts.py b/command/install_scripts.py index 9b78326373..5888cafd44 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -11,12 +11,12 @@ from distutils.core import Command from stat import ST_MODE -class install_scripts(Command): +class install_scripts (Command): - description = "install scripts" + description = "install scripts (Python or otherwise)" user_options = [ - ('install-dir=', 'd', "directory to install to"), + ('install-dir=', 'd', "directory to install scripts to"), ('build-dir=','b', "build directory (where to install from)"), ('skip-build', None, "skip the build steps"), ] From 1b401b74ff3cac71a809383c5fde85fe31a26ce7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 01:35:27 +0000 Subject: [PATCH 0379/8469] 'mkpath()' now detects non-string 'name' arguments -- this is a fairly common bug when adding new code, so I thought I'd make it blow up earlier than deep in posix.py. --- dir_util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index c049bbd217..194183ae25 100644 --- a/dir_util.py +++ b/dir_util.py @@ -7,7 +7,8 @@ __revision__ = "$Id$" import os -from distutils.errors import DistutilsFileError +from types import * +from distutils.errors import DistutilsFileError, DistutilsInternalError # cache for by mkpath() -- in addition to cheapening redundant calls, @@ -29,6 +30,11 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global PATH_CREATED + # Detect a common bug -- name is None + if type(name) is not StringType: + raise DistutilsInternalError, \ + "mkpath: 'name' must be a string (got %s)" % `name` + # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce # the creation of the whole path? (quite easy to do the latter since From 20cf8c4a9698ff498f8ed64b06734a86f11af75c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 01:36:14 +0000 Subject: [PATCH 0380/8469] Support for the "install_headers" command: distribution option 'headers' and method 'has_headers()'. --- dist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist.py b/dist.py index 33b3b657b1..1e8c63243b 100644 --- a/dist.py +++ b/dist.py @@ -146,6 +146,7 @@ def __init__ (self, attrs=None): self.package_dir = None self.py_modules = None self.libraries = None + self.headers = None self.ext_modules = None self.ext_package = None self.include_dirs = None @@ -699,6 +700,9 @@ def has_c_libraries (self): def has_modules (self): return self.has_pure_modules() or self.has_ext_modules() + def has_headers (self): + return self.headers and len(self.headers) > 0 + def has_scripts (self): return self.scripts and len(self.scripts) > 0 From 0bf1c3e9874ed43aa7353c5e03884fc6775486c3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 03:03:23 +0000 Subject: [PATCH 0381/8469] Patch from Andrew Kuchling: prune out the build and source distribution directories after all is said and done, so we don't accidentally include those files in the source distribution. (This is the quick and easy way to fix this; Andrew says: "Changing findall() looked like it was going to be messy, so I tried this instead. The only problem is that redundant directory traversals are being done, walking through build/ only to throw out all the files found at the end."). --- command/sdist.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/command/sdist.py b/command/sdist.py index 56bc4c9556..0a57ba364f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -440,6 +440,13 @@ def read_template (self): # while loop over lines of template file + # Prune away the build and source distribution directories + build = self.find_peer ('build') + exclude_pattern (self.files, None, prefix=build.build_base) + + base_dir = self.distribution.get_fullname() + exclude_pattern (self.files, None, prefix=base_dir) + # read_template () From 8b3691a0dc7439ba4ce8c91bc7cd112c3ad9b49f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 27 May 2000 17:27:23 +0000 Subject: [PATCH 0382/8469] Some far-reaching naming changes: * Command method 'find_peer()' -> 'get_finalized_command()' * Command method 'run_peer()' -> 'run_command()' Also deleted the 'get_command_option()' method from Command, and fixed the one place where it was used (in "bdist_dumb"). --- cmd.py | 30 +++++++++-------------- command/bdist.py | 6 ++--- command/bdist_dumb.py | 10 ++++---- command/bdist_rpm.py | 49 +++++++++++++++----------------------- command/build.py | 8 +++---- command/build_ext.py | 4 ++-- command/install.py | 8 +++---- command/install_lib.py | 10 ++++---- command/install_scripts.py | 2 +- command/sdist.py | 8 +++---- dist.py | 2 +- 11 files changed, 59 insertions(+), 78 deletions(-) diff --git a/cmd.py b/cmd.py index 09727331d4..c21ea03e6d 100644 --- a/cmd.py +++ b/cmd.py @@ -69,11 +69,11 @@ def __init__ (self, dist): # none of that complicated bureaucracy is needed. self.help = 0 - # 'ready' records whether or not 'finalize_options()' has been + # 'finalized' records whether or not 'finalize_options()' has been # called. 'finalize_options()' itself should not pay attention to - # this flag: it is the business of 'ensure_ready()', which always - # calls 'finalize_options()', to respect/update it. - self.ready = 0 + # this flag: it is the business of 'ensure_finalized()', which + # always calls 'finalize_options()', to respect/update it. + self.finalized = 0 # __init__ () @@ -89,10 +89,10 @@ def __getattr__ (self, attr): raise AttributeError, attr - def ensure_ready (self): - if not self.ready: + def ensure_finalized (self): + if not self.finalized: self.finalize_options () - self.ready = 1 + self.finalized = 1 # Subclasses must define: @@ -184,32 +184,24 @@ def set_undefined_options (self, src_cmd, *option_pairs): # Option_pairs: list of (src_option, dst_option) tuples src_cmd_obj = self.distribution.get_command_obj (src_cmd) - src_cmd_obj.ensure_ready () + src_cmd_obj.ensure_finalized () for (src_option, dst_option) in option_pairs: if getattr (self, dst_option) is None: setattr (self, dst_option, getattr (src_cmd_obj, src_option)) - def find_peer (self, command, create=1): + def get_finalized_command (self, command, create=1): """Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command'..""" cmd_obj = self.distribution.get_command_obj (command, create) - cmd_obj.ensure_ready () + cmd_obj.ensure_finalized () return cmd_obj - def get_peer_option (self, command, option): - """Find or create the command object for 'command', and return - its 'option' option.""" - - cmd_obj = self.find_peer (command) - return getattr(cmd_obj, option) - - - def run_peer (self, command): + def run_command (self, command): """Run some other command: uses the 'run_command()' method of Distribution, which creates the command object if necessary and then invokes its 'run()' method.""" diff --git a/command/bdist.py b/command/bdist.py index 892712ecfb..df4e3a0350 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -53,7 +53,7 @@ def finalize_options (self): # temporary directories (eg. we'll probably have # "build/bdist./dumb", "build/bdist./rpm", etc.) if self.bdist_base is None: - build_base = self.find_peer('build').build_base + build_base = self.get_finalized_command('build').build_base plat = get_platform() self.bdist_base = os.path.join (build_base, 'bdist.' + plat) @@ -79,9 +79,9 @@ def run (self): "invalid archive format '%s'" % self.format if cmd_name not in self.no_format_option: - sub_cmd = self.find_peer (cmd_name) + sub_cmd = self.get_finalized_command (cmd_name) sub_cmd.format = self.format - self.run_peer (cmd_name) + self.run_command (cmd_name) # run() diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index eaa192732b..51e35e4b15 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -40,7 +40,7 @@ def initialize_options (self): def finalize_options (self): if self.bdist_dir is None: - bdist_base = self.get_peer_option('bdist', 'bdist_base') + bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'dumb') if self.format is None: @@ -56,10 +56,10 @@ def finalize_options (self): def run (self): - self.run_peer ('build') + self.run_command ('build') - # XXX don't use 'self.find_peer()', because it always runs - # 'ensure_ready()' on the command object; we explictly want a + # XXX don't use 'self.get_finalized_command()', because it always runs + # 'ensure_finalized()' on the command object; we explictly want a # command object that has *not* been finalized, so we can set # options on it! (The option we set, 'root', is so that we can do # a proper "fake install" using this install command object.) @@ -67,7 +67,7 @@ def run (self): install.root = self.bdist_dir self.announce ("installing to %s" % self.bdist_dir) - install.ensure_ready() + install.ensure_finalized() install.run() # And make an archive relative to the root of the diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index d10d0762ca..d07f9249da 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -1,20 +1,17 @@ """distutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary -distributions.""" +distributions).""" # created 2000/04/25, by Harry Henry Gebel __revision__ = "$Id$" -from os.path import exists, basename -import os +import os, string +from types import * from distutils.core import Command from distutils.util import mkpath, write_file, copy_file from distutils.errors import * -from string import join, lower -from types import StringType, DictType, LongType, FloatType, IntType, \ - ListType, TupleType class bdist_rpm (Command): @@ -68,23 +65,15 @@ def run (self): # make directories if self.spec_only: - self.execute(mkpath, ('redhat',), "Created './redhat' directory") + self.mkpath('redhat') else: - self.execute(mkpath, ('build/rpm/SOURCES',), - "Created RPM source directory") - self.execute(mkpath, ('build/rpm/SPECS',), - "Created RPM source directory") - self.execute(mkpath, ('build/rpm/BUILD',), - "Created RPM source directory") - self.execute(mkpath, ('build/rpm/RPMS',), - "Created RPM source directory") - self.execute(mkpath, ('build/rpm/SRPMS',), - "Created RPM source directory") + for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): + self.mkpath(os.path.join('build/rpm', d)) # spec file goes into .redhat directory if '--spec-only specified', - # into build/rpm/spec otherwisu + # into build/rpm/spec otherwise if self.spec_only: - spec_path = './redhat/%s.spec' % self.distribution.get_name() + spec_path = 'redhat/%s.spec' % self.distribution.get_name() else: spec_path = ('build/rpm/SPECS/%s.spec' % self.distribution.get_name()) @@ -98,12 +87,12 @@ def run (self): # make a source distribution and copy to SOURCES directory with # optional icon - sdist = self.find_peer ('sdist') + sdist = self.get_finalized_command ('sdist') if self.use_bzip2: sdist.formats = ['bztar'] else: sdist.formats = ['gztar'] - self.run_peer('sdist') + self.run_command('sdist') if self.use_bzip2: source = self.distribution.get_fullname() + '.tar.bz2' else: @@ -111,7 +100,7 @@ def run (self): self.execute(copy_file, (source, 'build/rpm/SOURCES'), 'Copying source distribution to SOURCES') if self.icon: - if exists(self.icon): + if os.path.exists(self.icon): self.execute(copy_file, (self.icon, 'build/rpm/SOURCES'), 'Copying icon to SOURCES') else: @@ -144,10 +133,12 @@ def _get_package_data(self): DistributionMetadata class, then from the package_data file, which is Python code read with execfile() ''' + from string import join + package_type = 'rpm' # read in package data, if any - if exists('package_data'): + if os.path.exists('package_data'): try: exec(open('package_data')) except: @@ -195,7 +186,7 @@ def _get_package_data(self): self.doc = self._check_string_list('doc') if type(self.doc) == ListType: for readme in ('README', 'README.txt'): - if exists(readme) and readme not in self.doc: + if os.path.exists(readme) and readme not in self.doc: self.doc.append(readme) self.doc = join(self.doc) self.provides = join(self._check_string_list('provides')) @@ -246,9 +237,9 @@ def _make_spec_file(self): 'Conflicts', 'Obsoletes', ): - if getattr(self, lower(field)): - spec_file.append('%s: %s' % (field, getattr(self, - lower(field)))) + if getattr(self, string.lower(field)): + spec_file.append('%s: %s' % + (field, getattr(self, string.lower(field)))) if self.distribution.get_url() != 'UNKNOWN': spec_file.append('Url: ' + self.distribution.get_url()) @@ -260,7 +251,7 @@ def _make_spec_file(self): spec_file.append('BuildRequires: ' + self.build_requires) if self.icon: - spec_file.append('Icon: ' + basename(self.icon)) + spec_file.append('Icon: ' + os.path.basename(self.icon)) spec_file.extend([ '', @@ -388,5 +379,3 @@ def _check_string_list(self, var_name, default_value = []): 'list or tuple of strings' % var_name) else: return default_value - -# class bdist_rpm diff --git a/command/build.py b/command/build.py index d9eed7685c..b0894b8313 100644 --- a/command/build.py +++ b/command/build.py @@ -92,20 +92,20 @@ def run (self): # Invoke the 'build_py' command to "build" pure Python modules # (ie. copy 'em into the build tree) if self.distribution.has_pure_modules(): - self.run_peer ('build_py') + self.run_command ('build_py') # Build any standalone C libraries next -- they're most likely to # be needed by extension modules, so obviously have to be done # first! if self.distribution.has_c_libraries(): - self.run_peer ('build_clib') + self.run_command ('build_clib') # And now 'build_ext' -- compile extension modules and put them # into the build tree if self.distribution.has_ext_modules(): - self.run_peer ('build_ext') + self.run_command ('build_ext') if self.distribution.has_scripts(): - self.run_peer ('build_scripts') + self.run_command ('build_scripts') # class build diff --git a/command/build_ext.py b/command/build_ext.py index acf1d7b7d5..cef3ca827d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -167,7 +167,7 @@ def run (self): # directory where we put them is in the library search path for # linking extensions. if self.distribution.has_c_libraries(): - build_clib = self.find_peer ('build_clib') + build_clib = self.get_finalized_command ('build_clib') self.libraries.extend (build_clib.get_library_names() or []) self.library_dirs.append (build_clib.build_clib) @@ -294,7 +294,7 @@ def build_extensions (self): package = string.join (modpath[0:-1], '.') base = modpath[-1] - build_py = self.find_peer ('build_py') + build_py = self.get_finalized_command ('build_py') package_dir = build_py.get_package_dir (package) ext_filename = os.path.join (package_dir, self.get_ext_filename(base)) diff --git a/command/install.py b/command/install.py index d89ce4d255..bc5d8f33be 100644 --- a/command/install.py +++ b/command/install.py @@ -454,11 +454,11 @@ def run (self): # Obviously have to build before we can install if not self.skip_build: - self.run_peer ('build') + self.run_command ('build') # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): - self.run_peer (cmd_name) + self.run_command (cmd_name) if self.path_file: self.create_path_file () @@ -507,7 +507,7 @@ def get_outputs (self): # get the outputs of all its sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): - cmd = self.find_peer (cmd_name) + cmd = self.get_finalized_command (cmd_name) outputs.extend (cmd.get_outputs()) return outputs @@ -517,7 +517,7 @@ def get_inputs (self): # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): - cmd = self.find_peer (cmd_name) + cmd = self.get_finalized_command (cmd_name) inputs.extend (cmd.get_inputs()) return inputs diff --git a/command/install_lib.py b/command/install_lib.py index e9cd80db35..d866d8cc82 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -46,9 +46,9 @@ def run (self): # Make sure we have built everything we need first if not self.skip_build: if self.distribution.has_pure_modules(): - self.run_peer ('build_py') + self.run_command ('build_py') if self.distribution.has_ext_modules(): - self.run_peer ('build_ext') + self.run_command ('build_ext') # Install everything: simply dump the entire contents of the build # directory to the installation directory (that's the beauty of @@ -85,7 +85,7 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): if not has_any: return [] - build_cmd = self.find_peer (build_cmd) + build_cmd = self.get_finalized_command (build_cmd) build_files = build_cmd.get_outputs() build_dir = getattr (build_cmd, cmd_option) @@ -138,11 +138,11 @@ def get_inputs (self): inputs = [] if self.distribution.has_pure_modules(): - build_py = self.find_peer ('build_py') + build_py = self.get_finalized_command ('build_py') inputs.extend (build_py.get_outputs()) if self.distribution.has_ext_modules(): - build_ext = self.find_peer ('build_ext') + build_ext = self.get_finalized_command ('build_ext') inputs.extend (build_ext.get_outputs()) return inputs diff --git a/command/install_scripts.py b/command/install_scripts.py index 5888cafd44..3eb3963c95 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -35,7 +35,7 @@ def finalize_options (self): def run (self): if not self.skip_build: - self.run_peer('build_scripts') + self.run_command('build_scripts') self.outfiles = self.copy_tree (self.build_dir, self.install_dir) if os.name == 'posix': # Set the executable bits (owner, group, and world) on diff --git a/command/sdist.py b/command/sdist.py index 0a57ba364f..6626b9e66a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -223,15 +223,15 @@ def find_defaults (self): self.files.extend (files) if self.distribution.has_pure_modules(): - build_py = self.find_peer ('build_py') + build_py = self.get_finalized_command ('build_py') self.files.extend (build_py.get_source_files ()) if self.distribution.has_ext_modules(): - build_ext = self.find_peer ('build_ext') + build_ext = self.get_finalized_command ('build_ext') self.files.extend (build_ext.get_source_files ()) if self.distribution.has_c_libraries(): - build_clib = self.find_peer ('build_clib') + build_clib = self.get_finalized_command ('build_clib') self.files.extend (build_clib.get_source_files ()) @@ -441,7 +441,7 @@ def read_template (self): # while loop over lines of template file # Prune away the build and source distribution directories - build = self.find_peer ('build') + build = self.get_finalized_command ('build') exclude_pattern (self.files, None, prefix=build.build_base) base_dir = self.distribution.get_fullname() diff --git a/dist.py b/dist.py index 1e8c63243b..ece23a6ba3 100644 --- a/dist.py +++ b/dist.py @@ -681,7 +681,7 @@ def run_command (self, command): self.announce ("running " + command) cmd_obj = self.get_command_obj (command) - cmd_obj.ensure_ready () + cmd_obj.ensure_finalized () cmd_obj.run () self.have_run[command] = 1 From e98b1cb14ebf43c54f0ec74be9483e02d69d900e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 28 May 2000 23:47:00 +0000 Subject: [PATCH 0383/8469] Moved warnings out of 'finalize_options()' into 'run()'. Added a warning for 'bdist_base' directory. --- command/clean.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/command/clean.py b/command/clean.py index 62307a1968..31147b58ef 100644 --- a/command/clean.py +++ b/command/clean.py @@ -34,13 +34,6 @@ def initialize_options(self): self.all = None def finalize_options(self): - if self.build_lib and not os.path.exists (self.build_lib): - self.warn ("'%s' does not exist -- can't clean it" % - self.build_lib) - if self.build_temp and not os.path.exists (self.build_temp): - self.warn ("'%s' does not exist -- can't clean it" % - self.build_temp) - self.set_undefined_options('build', ('build_base', 'build_base'), ('build_lib', 'build_lib'), @@ -53,11 +46,21 @@ def run(self): # gone) if os.path.exists (self.build_temp): remove_tree (self.build_temp, self.verbose, self.dry_run) + else: + self.warn ("'%s' does not exist -- can't clean it" % + self.build_temp) + + + if self.all: # remove the module build directory (unless already gone) if os.path.exists (self.build_lib): remove_tree (self.build_lib, self.verbose, self.dry_run) + else: + self.warn ("'%s' does not exist -- can't clean it" % + self.build_lib) + # remove the temporary directory used for creating built # distributions (default "build/bdist") -- eg. type of # built distribution will have its own subdirectory under @@ -65,6 +68,9 @@ def run(self): # 'remove_tree()'. if os.path.exists (self.bdist_base): remove_tree (self.bdist_base, self.verbose, self.dry_run) + else: + self.warn ("'%s' does not exist -- can't clean it" % + self.bdist_base) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care From 5988ea06ee6f64f6b1da4397b66b1ea9b227484c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 28 May 2000 23:47:31 +0000 Subject: [PATCH 0384/8469] Only print debugging output if DEBUG (imported from distutils.core) is true. --- command/install.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/command/install.py b/command/install.py index bc5d8f33be..13fa88ee19 100644 --- a/command/install.py +++ b/command/install.py @@ -8,7 +8,7 @@ import sys, os, string from types import * -from distutils.core import Command +from distutils.core import Command, DEBUG from distutils import sysconfig from distutils.util import write_file, native_path, subst_vars, change_root from distutils.errors import DistutilsOptionError @@ -240,9 +240,10 @@ def finalize_options (self): self.config_vars['base'] = self.install_base self.config_vars['platbase'] = self.install_platbase - from pprint import pprint - print "config vars:" - pprint (self.config_vars) + if DEBUG: + from pprint import pprint + print "config vars:" + pprint (self.config_vars) # Expand "~" and configuration variables in the installation # directories. @@ -289,17 +290,17 @@ def finalize_options (self): # finalize_options () - # hack for debugging output def dump_dirs (self, msg): - from distutils.fancy_getopt import longopt_xlate - print msg + ":" - for opt in self.user_options: - opt_name = opt[0] - if opt_name[-1] == "=": - opt_name = opt_name[0:-1] - opt_name = string.translate (opt_name, longopt_xlate) - val = getattr (self, opt_name) - print " %s: %s" % (opt_name, val) + if DEBUG: + from distutils.fancy_getopt import longopt_xlate + print msg + ":" + for opt in self.user_options: + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + opt_name = string.translate (opt_name, longopt_xlate) + val = getattr (self, opt_name) + print " %s: %s" % (opt_name, val) def finalize_unix (self): From 691c62d56f771c3a2f1f914bc44f9958ad2d7c28 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 28 May 2000 23:49:03 +0000 Subject: [PATCH 0385/8469] Changed order so 'clean' is right after the 'build' commands. --- command/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/__init__.py b/command/__init__.py index 56c26fe151..95bce8d8c1 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -10,12 +10,12 @@ 'build_ext', 'build_clib', 'build_scripts', + 'clean', 'install', 'install_lib', 'install_headers', 'install_scripts', 'install_data', - 'clean', 'sdist', 'bdist', 'bdist_dumb', From b09a8fe0d18535ae8db3f8f6c980d5f2fde3e19f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 28 May 2000 23:53:06 +0000 Subject: [PATCH 0386/8469] Factored '_set_command_options()' out of 'get_command_obj()'. Added 'reinitialize_command()' -- lets us "push" option values in a controlled, safe way; this is a small change to the code, but a big change to the Distutils philosophy of passing option values around. The preferred mode is still definitely to "pull" options from another command (eg. "install" fetches the base build directory from "build"), but it is now feasible to "push" options onto another command, when you know what's best for it. One possible application will be a "config" command, which pokes around the system and pushes values (eg. include and library directories) onto the "build" command. Added 'dump_option_dicts()' method (for debugging output). --- dist.py | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 82 insertions(+), 8 deletions(-) diff --git a/dist.py b/dist.py index ece23a6ba3..3391e53f5e 100644 --- a/dist.py +++ b/dist.py @@ -217,6 +217,35 @@ def get_option_dict (self, command): return dict + def dump_option_dicts (self, header=None, commands=None, indent=""): + from pprint import pformat + + if commands is None: # dump all command option dicts + commands = self.command_options.keys() + commands.sort() + + if header is not None: + print indent + header + indent = indent + " " + + if not commands: + print indent + "no commands known yet" + return + + for cmd_name in commands: + opt_dict = self.command_options.get(cmd_name) + if opt_dict is None: + print indent + "no option dict for '%s' command" % cmd_name + else: + print indent + "option dict for '%s' command:" % cmd_name + out = pformat(opt_dict) + for line in string.split(out, "\n"): + print indent + " " + line + + # dump_option_dicts () + + + # -- Config file finding/parsing methods --------------------------- def find_config_files (self): @@ -632,17 +661,62 @@ def get_command_obj (self, command, create=1): # we won't report the source of the error.) options = self.command_options.get(command) if options: - print " setting options:" - for (option, (source, value)) in options.items(): - print " %s = %s (from %s)" % (option, value, source) - if not hasattr(cmd_obj, option): - raise DistutilsOptionError, \ - ("%s: command '%s' has no such option '%s'") % \ - (source, command, option) - setattr(cmd_obj, option, value) + self._set_command_options(cmd_obj, options) return cmd_obj + def _set_command_options (self, command_obj, option_dict=None): + + """Set the options for 'command_obj' from 'option_dict'. Basically + this means copying elements of a dictionary ('option_dict') to + attributes of an instance ('command'). + + 'command_obj' must be a Commnd instance. If 'option_dict' is not + supplied, uses the standard option dictionary for this command + (from 'self.command_options'). + """ + from distutils.core import DEBUG + + command_name = command_obj.get_command_name() + if option_dict is None: + option_dict = self.get_option_dict(command_name) + + if DEBUG: print " setting options for '%s' command:" % command_name + for (option, (source, value)) in option_dict.items(): + if DEBUG: print " %s = %s (from %s)" % (option, value, source) + if not hasattr(command_obj, option): + raise DistutilsOptionError, \ + ("error in %s: command '%s' has no such option '%s'") % \ + (source, command_name, option) + setattr(command_obj, option, value) + + def reinitialize_command (self, command): + """Reinitializes a command to the state it was in when first + returned by 'get_command_obj()': ie., initialized but not yet + finalized. This gives provides the opportunity to sneak option + values in programmatically, overriding or supplementing + user-supplied values from the config files and command line. + You'll have to re-finalize the command object (by calling + 'finalize_options()' or 'ensure_finalized()') before using it for + real. + + 'command' should be a command name (string) or command object. + Returns the reinitialized command object. + """ + from distutils.cmd import Command + if not isinstance(command, Command): + command_name = command + command = self.get_command_obj(command_name) + else: + command_name = command.get_command_name() + + if not command.finalized: + return + command.initialize_options() + command.finalized = 0 + self._set_command_options(command) + return command + # -- Methods that operate on the Distribution ---------------------- From d7dd557d81c46cd532939cdbf4a420f34d46bb1c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 28 May 2000 23:54:00 +0000 Subject: [PATCH 0387/8469] Added 'dump_options()' for debugging output. --- cmd.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmd.py b/cmd.py index c21ea03e6d..f80338920e 100644 --- a/cmd.py +++ b/cmd.py @@ -135,6 +135,21 @@ def finalize_options (self): raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ + + def dump_options (self, header=None, indent=""): + from distutils.fancy_getopt import longopt_xlate + if header is None: + header = "command options for '%s':" % self.get_command_name() + print indent + header + indent = indent + " " + for (option, _, _) in self.user_options: + option = string.translate(option, longopt_xlate) + if option[-1] == "=": + option = option[:-1] + value = getattr(self, option) + print indent + "%s = %s" % (option, value) + + def run (self): """A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in From 73ce40de7dd0c8ef02a2f2b99d3cc308d9062916 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 01:56:44 +0000 Subject: [PATCH 0388/8469] Changed to catch compile/link failures and raise CompileError, LibError, or LinkError (exception classes defined in ccompiler.py). --- ccompiler.py | 36 +++++++++++++++++++++++++++++++----- msvccompiler.py | 28 +++++++++++++++++++++------- unixccompiler.py | 27 ++++++++++++++++++++++----- 3 files changed, 74 insertions(+), 17 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 42221769e6..33caf86830 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,6 +15,22 @@ from distutils.util import move_file, mkpath, newer_pairwise, newer_group +# Exception classes used by the CCompiler implementation classes +class CCompilerError (Exception): + """Failure doing some compile/link operation.""" + +class CompileError (CCompilerError): + """Failure to compile one or more C/C++ source files.""" + +class LibError (CCompilerError): + """Failure to create a static library from one or more C/C++ object + files.""" + +class LinkError (CCompilerError): + """Failure to link one or more C/C++ object files into an executable + or shared library file.""" + + class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler abstraction classes. Might have some use as a @@ -456,7 +472,9 @@ def compile (self, command line. On other platforms, consult the implementation class documentation. In any event, they are intended as an escape hatch for those occasions when the abstract compiler - framework doesn't cut the mustard.""" + framework doesn't cut the mustard. + + Raises CompileError on failure.""" pass @@ -481,7 +499,9 @@ def create_static_lib (self, 'debug' is a boolean; if true, debugging information will be included in the library (note that on most platforms, it is the compile step where this matters: the 'debug' flag is included - here just for consistency).""" + here just for consistency). + + Raises LibError on failure.""" pass @@ -531,7 +551,9 @@ def link_shared_lib (self, 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except of course that they supply command-line arguments - for the particular linker being used).""" + for the particular linker being used). + + Raises LinkError on failure.""" pass @@ -552,7 +574,9 @@ def link_shared_object (self, is explicitly supplied as 'output_filename'. If 'output_dir' is supplied, 'output_filename' is relative to it (i.e. 'output_filename' can provide directory components if - needed).""" + needed). + + Raises LinkError on failure.""" pass @@ -570,7 +594,9 @@ def link_executable (self, file. The "bunch of stuff" is as for 'link_shared_lib()'. 'output_progname' should be the base name of the executable program--e.g. on Unix the same as the output filename, but - on DOS/Windows ".exe" will be appended.""" + on DOS/Windows ".exe" will be appended. + + Raises LinkError on failure.""" pass diff --git a/msvccompiler.py b/msvccompiler.py index b6ff432ce3..06b415ebde 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -14,7 +14,8 @@ from types import * from distutils.errors import * from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options + CCompiler, gen_preprocess_options, gen_lib_options, \ + CompileError, LibError, LinkError _can_read_reg = 0 @@ -261,9 +262,12 @@ def compile (self, output_opt = "/Fo" + obj self.mkpath (os.path.dirname (obj)) - self.spawn ([self.cc] + compile_opts + pp_opts + - [input_opt, output_opt] + - extra_postargs) + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg return objects @@ -290,7 +294,11 @@ def create_static_lib (self, lib_args[:0] = extra_preargs if extra_postargs: lib_args.extend (extra_postargs) - self.spawn ([self.link] + ld_args) + try: + self.spawn ([self.link] + ld_args) + except DistutilsExecError, msg: + raise LibError, msg + else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -370,7 +378,10 @@ def link_shared_object (self, print " output_filename =", output_filename print " mkpath'ing:", os.path.dirname (output_filename) self.mkpath (os.path.dirname (output_filename)) - self.spawn ([self.link] + ld_args) + try: + self.spawn ([self.link] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -420,7 +431,10 @@ def link_executable (self, ld_args.extend (extra_postargs) self.mkpath (os.path.dirname (output_filename)) - self.spawn ([self.link] + ld_args) + try: + self.spawn ([self.link] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) diff --git a/unixccompiler.py b/unixccompiler.py index 40f564ab88..c2f841ff67 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -21,7 +21,10 @@ from types import * from copy import copy from distutils import sysconfig -from distutils.ccompiler import CCompiler, gen_preprocess_options, gen_lib_options +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options, \ + CompileError, LibError, LinkError +from distutils.errors import DistutilsExecError # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's @@ -132,7 +135,12 @@ def compile (self, self.announce ("skipping %s (%s up-to-date)" % (src, obj)) else: self.mkpath (os.path.dirname (obj)) - self.spawn ([self.cc] + cc_args + [src, '-o', obj] + extra_postargs) + try: + self.spawn ([self.cc] + cc_args + + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg # Return *all* object filenames, not just the ones we just built. return objects @@ -164,7 +172,10 @@ def create_static_lib (self, # needed -- or maybe Python's configure script took care of # it for us, hence the check for leading colon. if self.ranlib[0] != ':': - self.spawn ([self.ranlib, output_filename]) + try: + self.spawn ([self.ranlib, output_filename]) + except DistutilsExecError, msg: + raise LibError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -229,7 +240,10 @@ def link_shared_object (self, if extra_postargs: ld_args.extend (extra_postargs) self.mkpath (os.path.dirname (output_filename)) - self.spawn ([self.ld_shared] + ld_args) + try: + self.spawn ([self.ld_shared] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) @@ -267,7 +281,10 @@ def link_executable (self, if extra_postargs: ld_args.extend (extra_postargs) self.mkpath (os.path.dirname (output_filename)) - self.spawn ([self.ld_exec] + ld_args) + try: + self.spawn ([self.ld_exec] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) From 8f4b133d35191a4e6efc52c8a743c01cc7be8cd7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 02:02:14 +0000 Subject: [PATCH 0389/8469] Moved the CCompiler exceptions here, to avoid having to import ccompiler.py just to get a little exception class. No more string-based exceptions. --- errors.py | 157 +++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 79 deletions(-) diff --git a/errors.py b/errors.py index d66043a1fe..161705633c 100644 --- a/errors.py +++ b/errors.py @@ -12,82 +12,81 @@ __revision__ = "$Id$" -import types - -if type (RuntimeError) is types.ClassType: - - class DistutilsError (Exception): - """The root of all Distutils evil.""" - pass - - class DistutilsModuleError (DistutilsError): - """Unable to load an expected module, or to find an expected class - within some module (in particular, command modules and classes).""" - pass - - class DistutilsClassError (DistutilsError): - """Some command class (or possibly distribution class, if anyone - feels a need to subclass Distribution) is found not to be holding - up its end of the bargain, ie. implementing some part of the - "command "interface.""" - pass - - class DistutilsGetoptError (DistutilsError): - """The option table provided to 'fancy_getopt()' is bogus.""" - pass - - class DistutilsArgError (DistutilsError): - """Raised by fancy_getopt in response to getopt.error -- ie. an - error in the command line usage.""" - pass - - class DistutilsFileError (DistutilsError): - """Any problems in the filesystem: expected file not found, etc. - Typically this is for problems that we detect before IOError or - OSError could be raised.""" - pass - - class DistutilsOptionError (DistutilsError): - """Syntactic/semantic errors in command options, such as use of - mutually conflicting options, or inconsistent options, - badly-spelled values, etc. No distinction is made between option - values originating in the setup script, the command line, config - files, or what-have-you -- but if we *know* something originated in - the setup script, we'll raise DistutilsSetupError instead.""" - pass - - class DistutilsSetupError (DistutilsError): - """For errors that can be definitely blamed on the setup script, - such as invalid keyword arguments to 'setup()'.""" - pass - - class DistutilsPlatformError (DistutilsError): - """We don't know how to do something on the current platform (but - we do know how to do it on some platform) -- eg. trying to compile - C files on a platform not supported by a CCompiler subclass.""" - pass - - class DistutilsExecError (DistutilsError): - """Any problems executing an external program (such as the C - compiler, when compiling C files).""" - pass - - class DistutilsInternalError (DistutilsError): - """Internal inconsistencies or impossibilities (obviously, this - should never be seen if the code is working!).""" - pass - -# String-based exceptions -else: - DistutilsError = 'DistutilsError' - DistutilsModuleError = 'DistutilsModuleError' - DistutilsClassError = 'DistutilsClassError' - DistutilsGetoptError = 'DistutilsGetoptError' - DistutilsArgError = 'DistutilsArgError' - DistutilsFileError = 'DistutilsFileError' - DistutilsOptionError = 'DistutilsOptionError' - DistutilsPlatformError = 'DistutilsPlatformError' - DistutilsExecError = 'DistutilsExecError' - DistutilsInternalError = 'DistutilsInternalError' - -del types +class DistutilsError (Exception): + """The root of all Distutils evil.""" + pass + +class DistutilsModuleError (DistutilsError): + """Unable to load an expected module, or to find an expected class + within some module (in particular, command modules and classes).""" + pass + +class DistutilsClassError (DistutilsError): + """Some command class (or possibly distribution class, if anyone + feels a need to subclass Distribution) is found not to be holding + up its end of the bargain, ie. implementing some part of the + "command "interface.""" + pass + +class DistutilsGetoptError (DistutilsError): + """The option table provided to 'fancy_getopt()' is bogus.""" + pass + +class DistutilsArgError (DistutilsError): + """Raised by fancy_getopt in response to getopt.error -- ie. an + error in the command line usage.""" + pass + +class DistutilsFileError (DistutilsError): + """Any problems in the filesystem: expected file not found, etc. + Typically this is for problems that we detect before IOError or + OSError could be raised.""" + pass + +class DistutilsOptionError (DistutilsError): + """Syntactic/semantic errors in command options, such as use of + mutually conflicting options, or inconsistent options, + badly-spelled values, etc. No distinction is made between option + values originating in the setup script, the command line, config + files, or what-have-you -- but if we *know* something originated in + the setup script, we'll raise DistutilsSetupError instead.""" + pass + +class DistutilsSetupError (DistutilsError): + """For errors that can be definitely blamed on the setup script, + such as invalid keyword arguments to 'setup()'.""" + pass + +class DistutilsPlatformError (DistutilsError): + """We don't know how to do something on the current platform (but + we do know how to do it on some platform) -- eg. trying to compile + C files on a platform not supported by a CCompiler subclass.""" + pass + +class DistutilsExecError (DistutilsError): + """Any problems executing an external program (such as the C + compiler, when compiling C files).""" + pass + +class DistutilsInternalError (DistutilsError): + """Internal inconsistencies or impossibilities (obviously, this + should never be seen if the code is working!).""" + pass + + +# Exception classes used by the CCompiler implementation classes +class CCompilerError (Exception): + """Some compile/link operation failed.""" + +class CompileError (CCompilerError): + """Failure to compile one or more C/C++ source files.""" + +class LibError (CCompilerError): + """Failure to create a static library from one or more C/C++ object + files.""" + +class LinkError (CCompilerError): + """Failure to link one or more C/C++ object files into an executable + or shared library file.""" + + From 16536d61d54c05d033267117413465693856737e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 02:02:48 +0000 Subject: [PATCH 0390/8469] Removed exceptions -- now in errors.py to avoid expensive import of ccompiler. --- ccompiler.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 33caf86830..834d543e33 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,22 +15,6 @@ from distutils.util import move_file, mkpath, newer_pairwise, newer_group -# Exception classes used by the CCompiler implementation classes -class CCompilerError (Exception): - """Failure doing some compile/link operation.""" - -class CompileError (CCompilerError): - """Failure to compile one or more C/C++ source files.""" - -class LibError (CCompilerError): - """Failure to create a static library from one or more C/C++ object - files.""" - -class LinkError (CCompilerError): - """Failure to link one or more C/C++ object files into an executable - or shared library file.""" - - class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler abstraction classes. Might have some use as a From 665fe5e7211490f9540308db3a3c625d0303ddc4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 02:02:49 +0000 Subject: [PATCH 0391/8469] Import exceptions from errors.py, not ccompiler.py. --- msvccompiler.py | 8 ++++---- unixccompiler.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 06b415ebde..06d8501afa 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -12,11 +12,11 @@ import sys, os, string from types import * -from distutils.errors import * -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options, \ +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError - +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options _can_read_reg = 0 try: diff --git a/unixccompiler.py b/unixccompiler.py index c2f841ff67..4d38e4d8c1 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -22,9 +22,9 @@ from copy import copy from distutils import sysconfig from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options, \ - CompileError, LibError, LinkError -from distutils.errors import DistutilsExecError + CCompiler, gen_preprocess_options, gen_lib_options +from distutils.errors import \ + DistutilsExecError, CompileError, LibError, LinkError # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's From ad92da0dcc01f36dfd7c4b5084c77a20a7352f7b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 02:04:29 +0000 Subject: [PATCH 0392/8469] Catch CCompiler exceptions in 'setup()'. --- core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index cd0f8e9694..15a8814712 100644 --- a/core.py +++ b/core.py @@ -122,7 +122,8 @@ def setup (**attrs): except (DistutilsExecError, DistutilsFileError, - DistutilsOptionError), msg: + DistutilsOptionError, + CCompilerError), msg: if DEBUG: raise else: From 4c3307aa998ac380beb50662b75648fa6e5d80ea Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 30 May 2000 02:04:54 +0000 Subject: [PATCH 0393/8469] Cosmetic tweak. --- command/command_template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/command_template b/command/command_template index 73c1c190db..50bbab7b6e 100644 --- a/command/command_template +++ b/command/command_template @@ -1,6 +1,7 @@ """distutils.command.x -Implements the Distutils 'x' command.""" +Implements the Distutils 'x' command. +""" # created 2000/mm/dd, John Doe From 31ba84d5006258eea4f524076aebb085a1168aac Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 01:05:35 +0000 Subject: [PATCH 0394/8469] Provides the Extension class, a nicer way to describe C/C++ extensions than the old (ext_name, build_info) tuple. --- extension.py | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 extension.py diff --git a/extension.py b/extension.py new file mode 100644 index 0000000000..9d2a6fa15c --- /dev/null +++ b/extension.py @@ -0,0 +1,115 @@ +"""distutils.extension + +Provides the Extension class, used to describe C/C++ extension +modules in setup scripts.""" + +# created 2000/05/30, Greg Ward + +__revision__ = "$Id$" + +from types import * + + +# This class is really only used by the "build_ext" command, so it might +# make sense to put it in distutils.command.build_ext. However, that +# module is already big enough, and I want to make this class a bit more +# complex to simplify some common cases ("foo" module in "foo.c") and do +# better error-checking ("foo.c" actually exists). +# +# Also, putting this in build_ext.py means every setup script would have to +# import that large-ish module (indirectly, through distutils.core) in +# order to do anything. + +class Extension: + """Just a collection of attributes that describes an extension + module and everything needed to build it (hopefully in a portable + way, but there are hooks that let you can be as unportable as you + need). + + Instance attributes: + name : string + the full name of the extension, including any packages -- ie. + *not* a filename or pathname, but Python dotted name + sources : [string] + list of C/C++ source filenames, relative to the distribution + root (where the setup script lives), in Unix form + (slash-separated) for portability + include_dirs : [string] + list of directories to search for C/C++ header files (in Unix + form for portability) + define_macros : [(name : string, value : string|None)] + list of macros to define; each macro is defined using a 2-tuple, + where 'value' is either the string to define it to or None to + define it without a particular value (equivalent of "#define + FOO" in source or -DFOO on Unix C compiler command line) + undef_macros : [string] + list of macros to undefine explicitly + library_dirs : [string] + list of directories to search for C/C++ libraries at link time + libraries : [string] + list of library names (not filenames or paths) to link against + runtime_library_dirs : [string] + list of directories to search for C/C++ libraries at run time + (for shared extensions, this is when the extension is loaded) + extra_objects : [string] + list of extra files to link with (eg. object files not implied + by 'sources', static library that must be explicitly specified, + binary resource files, etc.) + extra_compile_args : [string] + any extra platform- and compiler-specific information to use + when compiling the source files in 'sources'. For platforms and + compilers where "command line" makes sense, this is typically a + list of command-line arguments, but for other platforms it could + be anything. + extra_link_args : [string] + any extra platform- and compiler-specific information to use + when linking object files together to create the extension (or + to create a new static Python interpreter). Similar + interpretation as for 'extra_compile_args'. + export_symbols : [string] + list of symbols to be exported from a shared extension. Not + used on all platforms, and not generally necessary for Python + extensions, which typically export exactly one symbol: "init" + + extension_name. + export_symbol_file : string + name of file that lists symbols to export; the format of this + file is platform- and compiler-specific. This is even more + gratuitous and unnecessary than 'export_symbols'; I'll be happy + when it goes away forever. + """ + + def __init__ (self, name, sources, + include_dirs=None, + define_macros=None, + undef_macros=None, + library_dirs=None, + libraries=None, + runtime_library_dirs=None, + extra_objects=None, + extra_compile_args=None, + extra_link_args=None, + export_symbols=None, + export_symbol_file=None, + ): + + assert type(name) is StringType, "'name' must be a string" + assert (type(sources) is ListType and + len(sources) >= 1 and + map(type, sources) == [StringType]*len(sources)), \ + "'sources' must be a non-empty list of strings" + + self.name = name + self.sources = sources + self.include_dirs = include_dirs or [] + self.define_macros = define_macros or [] + self.undef_macros = undef_macros or [] + self.library_dirs = library_dirs or [] + self.libraries = libraries or [] + self.runtime_library_dirs = runtime_library_dirs or [] + self.extra_objects = extra_objects or [] + self.extra_compile_args = extra_compile_args or [] + self.extra_link_args = extra_link_args or [] + self.export_symbols = export_symbols or [] + self.export_symbol_file = export_symbol_file + +# class Extension From 69fc9746d19d0bdb9cf5d2d18eaebe561da1210b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 01:09:52 +0000 Subject: [PATCH 0395/8469] Overhauled to expect 'self.extensions' (taken from 'ext_modules' in the setup script) to be a list of Extension instances, rather than a list of of (ext_name, build_info) tuples. This is mostly a simplification, but 'check_extension_list()' got a lot more complicated because of the need to convert the old-style tuples to Extension instances. Temporarily dropped support for defining/undefining macros in the 'extensions' list -- I want to change the interface, but haven't yet made the required changes in CCompiler and friends to support this nicely. Also neatened up the code that merges 'extra_compile_flags' and the CFLAGS environment variable. --- command/build_ext.py | 194 ++++++++++++++++++++++++++++--------------- 1 file changed, 128 insertions(+), 66 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index cef3ca827d..f487a68cab 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -13,6 +13,7 @@ from distutils.core import Command from distutils.errors import * from distutils.dep_util import newer_group +from distutils.extension import Extension # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). @@ -152,13 +153,17 @@ def run (self): from distutils.ccompiler import new_compiler - # 'self.extensions', as supplied by setup.py, is a list of 2-tuples. - # Each tuple is simple: + # 'self.extensions', as supplied by setup.py, is a list of + # Extension instances. See the documentation for Extension (in + # distutils.core) for details. + # + # For backwards compatibility with Distutils 0.8.2 and earlier, we + # also allow the 'extensions' list to be a list of tuples: # (ext_name, build_info) - # build_info is a dictionary containing everything specific to - # building this extension. (Info pertaining to all extensions - # should be handled by general distutils options passed from - # setup.py down to right here, but that's not taken care of yet.) + # where build_info is a dictionary containing everything that + # Extension instances do except the name, with a few things being + # differently named. We convert these 2-tuples to Extension + # instances as needed. if not self.extensions: return @@ -208,32 +213,82 @@ def run (self): def check_extensions_list (self, extensions): """Ensure that the list of extensions (presumably provided as a - command option 'extensions') is valid, i.e. it is a list of - 2-tuples, where the tuples are (extension_name, build_info_dict). - Raise DistutilsSetupError if the structure is invalid anywhere; - just returns otherwise.""" - - if type (extensions) is not ListType: + command option 'extensions') is valid, i.e. it is a list of + Extension objects. We also support the old-style list of 2-tuples, + where the tuples are (ext_name, build_info), which are converted to + Extension instances here. + + Raise DistutilsSetupError if the structure is invalid anywhere; + just returns otherwise. + """ + if type(extensions) is not ListType: raise DistutilsSetupError, \ - "'ext_modules' option must be a list of tuples" + "'ext_modules' option must be a list of Extension instances" - for ext in extensions: - if type (ext) is not TupleType and len (ext) != 2: + for i in range(len(extensions)): + ext = extensions[i] + if isinstance(ext, Extension): + continue # OK! (assume type-checking done + # by Extension constructor) + + (ext_name, build_info) = ext + self.warn(("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name)) + if type(ext) is not TupleType and len(ext) != 2: raise DistutilsSetupError, \ - "each element of 'ext_modules' option must be a 2-tuple" + ("each element of 'ext_modules' option must be an " + "Extension instance or 2-tuple") - if not (type (ext[0]) is StringType and - extension_name_re.match (ext[0])): + if not (type(ext_name) is StringType and + extension_name_re.match(ext_name)): raise DistutilsSetupError, \ - "first element of each tuple in 'ext_modules' " + \ - "must be the extension name (a string)" + ("first element of each tuple in 'ext_modules' " + "must be the extension name (a string)") - if type (ext[1]) is not DictionaryType: + if type(build_info) is not DictionaryType: raise DistutilsSetupError, \ - "second element of each tuple in 'ext_modules' " + \ - "must be a dictionary (build info)" - - # end sanity-check for + ("second element of each tuple in 'ext_modules' " + "must be a dictionary (build info)") + + # OK, the (ext_name, build_info) dict is type-safe: convert it + # to an Extension instance. + ext = Extension(ext_name, build_info['sources']) + + # Easy stuff: one-to-one mapping from dict elements to + # instance attributes. + for key in ('include_dirs', + 'library_dirs', + 'libraries', + 'extra_objects', + 'extra_compile_args', + 'extra_link_args'): + setattr(ext, key, build_info.get(key)) + + # Medium-easy stuff: same syntax/semantics, different names. + ext.runtime_library_dirs = build_info.get('rpath') + ext.export_symbol_file = build_info.get('def_file') + + # Non-trivial stuff: 'macros' split into 'define_macros' + # and 'undef_macros'. + macros = build_info.get('macros') + if macros: + ext.define_macros = [] + ext.undef_macros = [] + for macro in macros: + if not (type(macro) is TupleType and + 1 <= len(macros) <= 2): + raise DistutilsSetupError, \ + ("'macros' element of build info dict " + "must be 1- or 2-tuple") + if len(macro) == 1: + ext.undef_macros.append(macro[0]) + elif len(macro) == 2: + ext.define_macros.append(macro) + + extensions[i] = ext + + # for extensions # check_extensions_list () @@ -243,10 +298,8 @@ def get_source_files (self): filenames = [] # Wouldn't it be neat if we knew the names of header files too... - for (extension_name, build_info) in self.extensions: - sources = build_info.get ('sources') - if type (sources) in (ListType, TupleType): - filenames.extend (sources) + for ext in self.extensions: + filenames.extend (ext.sources) return filenames @@ -262,8 +315,8 @@ def get_outputs (self): # ignores the 'inplace' flag, and assumes everything goes in the # "build" tree. outputs = [] - for (extension_name, build_info) in self.extensions: - fullname = self.get_ext_fullname (extension_name) + for ext in self.extensions: + fullname = self.get_ext_fullname (ext.name) outputs.append (os.path.join (self.build_lib, self.get_ext_filename(fullname))) return outputs @@ -276,16 +329,16 @@ def build_extensions (self): # First, sanity-check the 'extensions' list self.check_extensions_list (self.extensions) - for (extension_name, build_info) in self.extensions: - sources = build_info.get ('sources') + for ext in self.extensions: + sources = ext.sources if sources is None or type (sources) not in (ListType, TupleType): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + - "a list of source filenames") % extension_name + "a list of source filenames") % ext.name sources = list (sources) - fullname = self.get_ext_fullname (extension_name) + fullname = self.get_ext_fullname (ext.name) if self.inplace: # ignore build-lib -- put the compiled extension into # the source tree along with pure Python modules @@ -302,46 +355,54 @@ def build_extensions (self): ext_filename = os.path.join (self.build_lib, self.get_ext_filename(fullname)) - if not newer_group(sources, ext_filename, 'newer'): + if not (self.force or newer_group(sources, ext_filename, 'newer')): self.announce ("skipping '%s' extension (up-to-date)" % - extension_name) + ext.name) continue # 'for' loop over all extensions else: - self.announce ("building '%s' extension" % extension_name) + self.announce ("building '%s' extension" % ext.name) # First step: compile the source code to object files. This # drops the object files in the current directory, regardless # of where the source is (may be a bad thing, but that's how a # Makefile.pre.in-based system does it, so at least there's a # precedent!) - macros = build_info.get ('macros') - include_dirs = build_info.get ('include_dirs') - extra_args = build_info.get ('extra_compile_args') - # honor CFLAGS enviroment variable - # XXX do we *really* need this? or is it just a hack until - # the user can put compiler flags in setup.cfg? + + # XXX not honouring 'define_macros' or 'undef_macros' -- the + # CCompiler API needs to change to accomodate this, and I + # want to do one thing at a time! + + # Two possible sources for extra compiler arguments: + # - 'extra_compile_args' in Extension object + # - CFLAGS environment variable (not particularly + # elegant, but people seem to expect it and I + # guess it's useful) + # The environment variable should take precedence, and + # any sensible compiler will give precendence to later + # command line args. Hence we combine them in order: + extra_args = ext.extra_compile_args + + # XXX and if we support CFLAGS, why not CC (compiler + # executable), CPPFLAGS (pre-processor options), and LDFLAGS + # (linker options) too? + # XXX should we use shlex to properly parse CFLAGS? + if os.environ.has_key('CFLAGS'): - if not extra_args: - extra_args = [] - extra_args = string.split(os.environ['CFLAGS']) + extra_args + extra_args.extend(string.split(os.environ['CFLAGS'])) objects = self.compiler.compile (sources, output_dir=self.build_temp, - macros=macros, - include_dirs=include_dirs, + #macros=macros, + include_dirs=ext.include_dirs, debug=self.debug, extra_postargs=extra_args) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. - extra_objects = build_info.get ('extra_objects') - if extra_objects: - objects.extend (extra_objects) - libraries = build_info.get ('libraries') - library_dirs = build_info.get ('library_dirs') - rpath = build_info.get ('rpath') - extra_args = build_info.get ('extra_link_args') or [] + if ext.extra_objects: + objects.extend (ext.extra_objects) + extra_args = ext.extra_link_args # XXX this is a kludge! Knowledge of specific compilers or # platforms really doesn't belong here; in an ideal world, the @@ -354,10 +415,10 @@ def build_extensions (self): # excuse for committing more platform- and compiler-specific # kludges; they are to be avoided if possible!) if self.compiler.compiler_type == 'msvc': - def_file = build_info.get ('def_file') + def_file = ext.export_symbol_file if def_file is None: source_dir = os.path.dirname (sources[0]) - ext_base = (string.split (extension_name, '.'))[-1] + ext_base = (string.split (ext.name, '.'))[-1] def_file = os.path.join (source_dir, "%s.def" % ext_base) if not os.path.exists (def_file): def_file = None @@ -365,7 +426,7 @@ def build_extensions (self): if def_file is not None: extra_args.append ('/DEF:' + def_file) else: - modname = string.split (extension_name, '.')[-1] + modname = string.split (ext.name, '.')[-1] extra_args.append('/export:init%s'%modname) # The MSVC linker generates unneeded .lib and .exp files, @@ -374,17 +435,18 @@ def build_extensions (self): # directory. implib_file = os.path.join ( self.build_temp, - self.get_ext_libname (extension_name)) + self.get_ext_libname (ext.name)) extra_args.append ('/IMPLIB:' + implib_file) self.mkpath (os.path.dirname (implib_file)) # if MSVC - self.compiler.link_shared_object (objects, ext_filename, - libraries=libraries, - library_dirs=library_dirs, - runtime_library_dirs=rpath, - extra_postargs=extra_args, - debug=self.debug) + self.compiler.link_shared_object ( + objects, ext_filename, + libraries=ext.libraries, + library_dirs=ext.library_dirs, + runtime_library_dirs=ext.runtime_library_dirs, + extra_postargs=extra_args, + debug=self.debug) # build_extensions () From 56c6ea7b26cbbbd156403430021ae019172da3ff Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 01:11:20 +0000 Subject: [PATCH 0396/8469] Import the new Extension class, so setup scripts can "from distutils.core import" it. --- core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core.py b/core.py index 15a8814712..8903603925 100644 --- a/core.py +++ b/core.py @@ -12,8 +12,12 @@ import sys, os from types import * from distutils.errors import * + +# Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution from distutils.cmd import Command +from distutils.extension import Extension + # This is a barebones help message generated displayed when the user # runs the setup script with no arguments at all. More useful help From 794b1fe1cd5521c67511325600ef8679c48a53e6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 02:14:32 +0000 Subject: [PATCH 0397/8469] Fixed 'change_root() to work at all on Windows, and to work correctly on Unix. --- util.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/util.py b/util.py index b660b4bf2b..6063aa6847 100644 --- a/util.py +++ b/util.py @@ -86,22 +86,22 @@ def native_path (pathname): def change_root (new_root, pathname): - """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the - two, which is tricky on DOS/Windows and Mac OS.""" - - if not abspath (pathname): - return os.path.join (new_root, pathname) - - elif os.name == 'posix': - return os.path.join (new_root, pathname[1:]) + two, which is tricky on DOS/Windows and Mac OS. + """ + if os.name == 'posix': + if not os.path.isabs (pathname): + return os.path.join (new_root, pathname) + else: + return os.path.join (new_root, pathname[1:]) elif os.name == 'nt': - (root_drive, root_path) = os.path.splitdrive (new_root) (drive, path) = os.path.splitdrive (pathname) - raise RuntimeError, "I give up -- not sure how to do this on Windows" + if path[0] == '\\': + path = path[1:] + return os.path.join (new_root, path) elif os.name == 'mac': raise RuntimeError, "no clue how to do this on Mac OS" From f96f4e6d4a60e6d7c8cddc8656e6affbe456c61a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 02:17:19 +0000 Subject: [PATCH 0398/8469] Normalize paths before writing them to a zipfile. --- archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_util.py b/archive_util.py index 050ea41796..218450a6ba 100644 --- a/archive_util.py +++ b/archive_util.py @@ -93,7 +93,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): def visit (z, dirname, names): for name in names: - path = os.path.join (dirname, name) + path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile (path): z.write (path, path) From 378e81b1c72a9d54682c8e53a433d8d5cb2f81f7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 02:32:10 +0000 Subject: [PATCH 0399/8469] Renamed 'native_path()' to 'convert_path()'. Also changed it so it doesn't barf if the path is already in native format (ie. contains os.sep). --- command/install.py | 4 ++-- command/sdist.py | 10 +++++----- util.py | 12 ++++-------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/command/install.py b/command/install.py index 13fa88ee19..7176fab890 100644 --- a/command/install.py +++ b/command/install.py @@ -10,7 +10,7 @@ from types import * from distutils.core import Command, DEBUG from distutils import sysconfig -from distutils.util import write_file, native_path, subst_vars, change_root +from distutils.util import write_file, convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError from glob import glob @@ -423,7 +423,7 @@ def handle_extra_path (self): # convert to local form in case Unix notation used (as it # should be in setup scripts) - extra_dirs = native_path (extra_dirs) + extra_dirs = convert_path (extra_dirs) else: path_file = None diff --git a/command/sdist.py b/command/sdist.py index 6626b9e66a..c06860fb65 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,7 +11,7 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import newer, create_tree, remove_tree, native_path, \ +from distutils.util import newer, create_tree, remove_tree, convert_path, \ write_file from distutils.archive_util import check_archive_formats from distutils.text_file import TextFile @@ -322,7 +322,7 @@ def read_template (self): action) continue - pattern_list = map(native_path, words[1:]) + pattern_list = map(convert_path, words[1:]) elif action in ('recursive-include','recursive-exclude'): if len (words) < 3: @@ -332,8 +332,8 @@ def read_template (self): action) continue - dir = native_path(words[1]) - pattern_list = map (native_path, words[2:]) + dir = convert_path(words[1]) + pattern_list = map (convert_path, words[2:]) elif action in ('graft','prune'): if len (words) != 2: @@ -343,7 +343,7 @@ def read_template (self): action) continue - dir_pattern = native_path (words[1]) + dir_pattern = convert_path (words[1]) else: template.warn ("invalid manifest template line: " + diff --git a/util.py b/util.py index 6063aa6847..575463843b 100644 --- a/util.py +++ b/util.py @@ -58,7 +58,7 @@ def get_platform (): # get_platform() -def native_path (pathname): +def convert_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in @@ -73,16 +73,12 @@ def native_path (pathname): if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname if os.sep != '/': - if os.sep in pathname: - raise ValueError, \ - "path '%s' cannot contain '%c' character" % (pathname, os.sep) - else: - paths = string.split (pathname, '/') - return apply (os.path.join, paths) + paths = string.split (pathname, '/') + return apply (os.path.join, paths) else: return pathname -# native_path () +# convert_path () def change_root (new_root, pathname): From c0ed34f0d17691d413a195bb719cc004e50fd3fd Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 31 May 2000 23:56:45 +0000 Subject: [PATCH 0400/8469] Regularize options a bit: * help strings start with lowercase * added affirmative version of '--no-clean' and '--no-rpm-opt-flags', which are the default (thus the attributes that correspond to the options are now 'clean' and 'use_rpm_opt_flags') --- command/bdist_rpm.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index d07f9249da..e7e4ca7ef6 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -19,27 +19,34 @@ class bdist_rpm (Command): user_options = [ ('spec-only', None, - "Only regenerate spec file"), + "only regenerate spec file"), ('source-only', None, - "Only generate source RPM"), + "only generate source RPM"), ('binary-only', None, - "Only generate binary RPM"), + "only generate binary RPM"), ('use-bzip2', None, - "Use bzip2 instead of gzip to create source distribution"), + "use bzip2 instead of gzip to create source distribution"), + ('clean', None, + "clean up RPM build directory [default]"), ('no-clean', None, - "Do not clean RPM build directory"), + "don't clean up RPM build directory"), + ('use-rpm-opt-flags', None, + "compile with RPM_OPT_FLAGS when building from source RPM"), ('no-rpm-opt-flags', None, - "Do not pass any RPM CFLAGS to compiler") - ] + "do not pass any RPM CFLAGS to compiler"), + ] + negative_opt = {'no-clean': 'clean', + 'no-rpm-opt-flags': 'use-rpm-opt-flags'} + def initialize_options (self): self.spec_only = None self.binary_only = None self.source_only = None self.use_bzip2 = None - self.no_clean = None - self.no_rpm_opt_flags = None + self.clean = 1 + self.use_rpm_opt_flags = 1 # initialize_options() @@ -54,7 +61,7 @@ def finalize_options (self): "Cannot supply both '--source-only' and '--binary-only'" # don't pass CFLAGS to pure python distributions if not self.distribution.has_ext_modules(): - self.no_rpm_opt_flags = 1 + self.use_rpm_opt_flags = 0 # finalize_options() @@ -120,7 +127,7 @@ def run (self): topdir = os.getcwd() + 'build/rpm' rpm_args.extend(['--define', '_topdir ' + os.getcwd() + '/build/rpm',]) - if not self.no_clean: + if self.clean: rpm_args.append('--clean') rpm_args.append(spec_path) self.spawn(rpm_args) @@ -168,7 +175,7 @@ def _get_package_data(self): self.preun = self._check_string('preun') self.postun = self._check_string('postun') self.prep = self._check_string('prep', '%setup') - if not self.no_rpm_opt_flags: + if self.use_rpm_opt_flags: self.build = (self._check_string( 'build', 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build')) From 0534a48d54c3fbf99ad65bff7b472b26eae70534 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 1 Jun 2000 00:40:25 +0000 Subject: [PATCH 0401/8469] More tweaking to make this command act like other Distutils commands: * added "--bdist-base" option to parameterize where we build the RPM (comes from "bdist" by default: "build/bdist.") * simplified/cleaned up some code in 'run()' in the process of removing (most) hard-coded directory names * if "--spec-only", drop spec file in "dist" rather than "redhat" (directory name still hard-coded, though) * use 'reinitialize_command()' to fetch the "sdist" object to tweak before running "sdist" command * use 'self.copy_file()' method rather than 'copy_file()' function * cosmetic tweaks to comments, error messages --- command/bdist_rpm.py | 55 +++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index e7e4ca7ef6..c84fda873e 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -10,7 +10,7 @@ import os, string from types import * from distutils.core import Command -from distutils.util import mkpath, write_file, copy_file +from distutils.util import get_platform, write_file from distutils.errors import * class bdist_rpm (Command): @@ -18,6 +18,8 @@ class bdist_rpm (Command): description = "create an RPM distribution" user_options = [ + ('bdist-base', None, + "base directory for creating built distributions"), ('spec-only', None, "only regenerate spec file"), ('source-only', None, @@ -41,6 +43,7 @@ class bdist_rpm (Command): def initialize_options (self): + self.bdist_base = None self.spec_only = None self.binary_only = None self.source_only = None @@ -52,13 +55,14 @@ def initialize_options (self): def finalize_options (self): + self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) if os.name != 'posix': raise DistutilsPlatformError, \ ("don't know how to create RPM " "distributions on platform %s" % os.name) if self.binary_only and self.source_only: raise DistutilsOptionsError, \ - "Cannot supply both '--source-only' and '--binary-only'" + "cannot supply both '--source-only' and '--binary-only'" # don't pass CFLAGS to pure python distributions if not self.distribution.has_ext_modules(): self.use_rpm_opt_flags = 0 @@ -69,50 +73,49 @@ def finalize_options (self): def run (self): self._get_package_data() # get packaging info - # make directories if self.spec_only: - self.mkpath('redhat') + spec_dir = "dist" + self.mkpath(spec_dir) # XXX should be configurable else: + rpm_base = os.path.join(self.bdist_base, "rpm") + rpm_dir = {} for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): - self.mkpath(os.path.join('build/rpm', d)) - - # spec file goes into .redhat directory if '--spec-only specified', - # into build/rpm/spec otherwise - if self.spec_only: - spec_path = 'redhat/%s.spec' % self.distribution.get_name() - else: - spec_path = ('build/rpm/SPECS/%s.spec' % - self.distribution.get_name()) + rpm_dir[d] = os.path.join(rpm_base, d) + self.mkpath(rpm_dir[d]) + spec_dir = rpm_dir['SPECS'] + + # Spec file goes into 'dist' directory if '--spec-only specified', + # into build/rpm. otherwise. + spec_path = os.path.join(spec_dir, + "%s.spec" % self.distribution.get_name()) self.execute(write_file, (spec_path, self._make_spec_file()), - 'Writing .spec file') + "writing '%s'" % spec_path) if self.spec_only: # stop if requested return - # make a source distribution and copy to SOURCES directory with - # optional icon - sdist = self.get_finalized_command ('sdist') + # Make a source distribution and copy to SOURCES directory with + # optional icon. + sdist = self.reinitialize_command ('sdist') if self.use_bzip2: sdist.formats = ['bztar'] else: sdist.formats = ['gztar'] self.run_command('sdist') - if self.use_bzip2: - source = self.distribution.get_fullname() + '.tar.bz2' - else: - source = self.distribution.get_fullname() + '.tar.gz' - self.execute(copy_file, (source, 'build/rpm/SOURCES'), - 'Copying source distribution to SOURCES') + + source = sdist.get_archive_files()[0] + source_dir = rpm_dir['SOURCES'] + self.copy_file(source, source_dir) + if self.icon: if os.path.exists(self.icon): - self.execute(copy_file, (self.icon, 'build/rpm/SOURCES'), - 'Copying icon to SOURCES') + self.copy_file(self.icon, source_dir) else: raise DistutilsFileError, \ - "Unable to find icon file '%s'" % self.icon + "icon file '%s' does not exist" % self.icon # build package From 7b2992eb1483e6c551d33f6e896569a420b1c88b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 1 Jun 2000 01:07:55 +0000 Subject: [PATCH 0402/8469] Ensure that 'make_archive()' returns the name of the new archive file. --- archive_util.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/archive_util.py b/archive_util.py index 218450a6ba..3159c284e4 100644 --- a/archive_util.py +++ b/archive_util.py @@ -127,7 +127,6 @@ def check_archive_formats (formats): def make_archive (base_name, format, root_dir=None, base_dir=None, verbose=0, dry_run=0): - """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific extension; 'format' is the archive format: one of "zip", "tar", "ztar", or "gztar". @@ -136,8 +135,8 @@ def make_archive (base_name, format, archive. 'base_dir' is the directory where we start archiving from; ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default - to the current directory.""" - + to the current directory. Returns the name of the archive file. + """ save_cwd = os.getcwd() if root_dir is not None: if verbose: @@ -160,11 +159,13 @@ def make_archive (base_name, format, func = format_info[0] for (arg,val) in format_info[1]: kwargs[arg] = val - apply (func, (base_name, base_dir), kwargs) + filename = apply (func, (base_name, base_dir), kwargs) if root_dir is not None: if verbose: print "changing back to '%s'" % save_cwd os.chdir (save_cwd) + return filename + # make_archive () From 71848a5af214fca715bf55b482e778cb4763c81b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 1 Jun 2000 01:08:52 +0000 Subject: [PATCH 0403/8469] Added 'reinitialize_command()' method -- delegated to Distribution instance. Ensure 'make_archive()' method returns archive filename. --- cmd.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd.py b/cmd.py index f80338920e..852acadbea 100644 --- a/cmd.py +++ b/cmd.py @@ -215,6 +215,10 @@ def get_finalized_command (self, command, create=1): cmd_obj.ensure_finalized () return cmd_obj + # XXX rename to 'get_reinitialized_command()'? (should do the + # same in dist.py, if so) + def reinitialize_command (self, command): + return self.distribution.reinitialize_command(command) def run_command (self, command): """Run some other command: uses the 'run_command()' method of @@ -306,8 +310,8 @@ def spawn (self, cmd, search_path=1, level=1): def make_archive (self, base_name, format, root_dir=None, base_dir=None): - util.make_archive (base_name, format, root_dir, base_dir, - self.verbose, self.dry_run) + return util.make_archive (base_name, format, root_dir, base_dir, + self.verbose, self.dry_run) def make_file (self, infiles, outfile, func, args, From 2d35a4ef38fc12bf2e61791fe1ba5bd2b99015ab Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 1 Jun 2000 01:09:47 +0000 Subject: [PATCH 0404/8469] Oops, 'reinitialize_command()' forgot to return the command object if didn't need to be reinitialized -- fixed. --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 3391e53f5e..de4f7ef0a2 100644 --- a/dist.py +++ b/dist.py @@ -711,7 +711,7 @@ def reinitialize_command (self, command): command_name = command.get_command_name() if not command.finalized: - return + return command command.initialize_options() command.finalized = 0 self._set_command_options(command) From d9112d61365041f3bd448c3084b2e53a99b432bc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 1 Jun 2000 01:10:56 +0000 Subject: [PATCH 0405/8469] Remember the list of archive files created in 'make_distribution()'. Added 'get_archive_files()' so outsiders can get their hands on that list. --- command/sdist.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index c06860fb65..03de85b1ae 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -64,6 +64,8 @@ def initialize_options (self): self.formats = None self.keep_tree = 0 + self.archive_files = None + def finalize_options (self): if self.manifest is None: @@ -520,12 +522,22 @@ def make_distribution (self): self.exclude_pattern (base_dir + "*") self.make_release_tree (base_dir, self.files) + archive_files = [] # remember names of files we create for fmt in self.formats: - self.make_archive (base_dir, fmt, base_dir=base_dir) + file = self.make_archive (base_dir, fmt, base_dir=base_dir) + archive_files.append(file) + + self.archive_files = archive_files if not self.keep_tree: remove_tree (base_dir, self.verbose, self.dry_run) + def get_archive_files (self): + """Return the list of archive files created when the command + was run, or None if the command hasn't run yet. + """ + return self.archive_files + # class sdist From fcdde577abf375ececdcf97aed74e3d0d5e73463 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 00:44:53 +0000 Subject: [PATCH 0406/8469] Reformatted and updated many docstrings. --- cmd.py | 168 ++++++++++++++++++++++++++++---------------------------- core.py | 64 ++++++++++----------- dist.py | 47 ++++++++-------- 3 files changed, 140 insertions(+), 139 deletions(-) diff --git a/cmd.py b/cmd.py index 852acadbea..b0a4b95942 100644 --- a/cmd.py +++ b/cmd.py @@ -1,7 +1,8 @@ """distutils.cmd Provides the Command class, the base class for the command classes -in the distutils.command package.""" +in the distutils.command package. +""" # created 2000/04/03, Greg Ward # (extricated from core.py; actually dates back to the beginning) @@ -16,28 +17,28 @@ class Command: """Abstract base class for defining command classes, the "worker bees" - of the Distutils. A useful analogy for command classes is to - think of them as subroutines with local variables called - "options". The options are "declared" in 'initialize_options()' - and "defined" (given their final values, aka "finalized") in - 'finalize_options()', both of which must be defined by every - command class. The distinction between the two is necessary - because option values might come from the outside world (command - line, option file, ...), and any options dependent on other - options must be computed *after* these outside influences have - been processed -- hence 'finalize_options()'. The "body" of the - subroutine, where it does all its work based on the values of its - options, is the 'run()' method, which must also be implemented by - every command class.""" + of the Distutils. A useful analogy for command classes is to think of + them as subroutines with local variables called "options". The options + are "declared" in 'initialize_options()' and "defined" (given their + final values, aka "finalized") in 'finalize_options()', both of which + must be defined by every command class. The distinction between the + two is necessary because option values might come from the outside + world (command line, config file, ...), and any options dependent on + other options must be computed *after* these outside influences have + been processed -- hence 'finalize_options()'. The "body" of the + subroutine, where it does all its work based on the values of its + options, is the 'run()' method, which must also be implemented by every + command class. + """ # -- Creation/initialization methods ------------------------------- def __init__ (self, dist): """Create and initialize a new Command object. Most importantly, - invokes the 'initialize_options()' method, which is the - real initializer and depends on the actual command being - instantiated.""" - + invokes the 'initialize_options()' method, which is the real + initializer and depends on the actual command being + instantiated. + """ # late import because of mutual dependence between these classes from distutils.dist import Distribution @@ -97,9 +98,9 @@ def ensure_finalized (self): # Subclasses must define: # initialize_options() - # provide default values for all options; may be overridden - # by Distutils client, by command-line options, or by options - # from option file + # provide default values for all options; may be customized by + # setup script, by options from config file(s), or by command-line + # options # finalize_options() # decide on the final values for all options; this is called # after all possible intervention from the outside world @@ -110,28 +111,28 @@ def ensure_finalized (self): def initialize_options (self): """Set default values for all the options that this command - supports. Note that these defaults may be overridden - by the command-line supplied by the user; thus, this is - not the place to code dependencies between options; generally, - 'initialize_options()' implementations are just a bunch - of "self.foo = None" assignments. - - This method must be implemented by all command classes.""" + supports. Note that these defaults may be overridden by other + commands, by the setup script, by config files, or by the + command-line. Thus, this is not the place to code dependencies + between options; generally, 'initialize_options()' implementations + are just a bunch of "self.foo = None" assignments. + This method must be implemented by all command classes. + """ raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ def finalize_options (self): - """Set final values for all the options that this command - supports. This is always called as late as possible, ie. - after any option assignments from the command-line or from - other commands have been done. Thus, this is the place to to - code option dependencies: if 'foo' depends on 'bar', then it - is safe to set 'foo' from 'bar' as long as 'foo' still has - the same value it was assigned in 'initialize_options()'. - - This method must be implemented by all command classes.""" - + """Set final values for all the options that this command supports. + This is always called as late as possible, ie. after any option + assignments from the command-line or from other commands have been + done. Thus, this is the place to to code option dependencies: if + 'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as + long as 'foo' still has the same value it was assigned in + 'initialize_options()'. + + This method must be implemented by all command classes. + """ raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ @@ -151,23 +152,23 @@ def dump_options (self, header=None, indent=""): def run (self): - """A command's raison d'etre: carry out the action it exists - to perform, controlled by the options initialized in - 'initialize_options()', customized by the user and other - commands, and finalized in 'finalize_options()'. All - terminal output and filesystem interaction should be done by - 'run()'. + """A command's raison d'etre: carry out the action it exists to + perform, controlled by the options initialized in + 'initialize_options()', customized by other commands, the setup + script, the command-line, and config files, and finalized in + 'finalize_options()'. All terminal output and filesystem + interaction should be done by 'run()'. - This method must be implemented by all command classes.""" + This method must be implemented by all command classes. + """ raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ def announce (self, msg, level=1): - """If the Distribution instance to which this command belongs - has a verbosity level of greater than or equal to 'level' - print 'msg' to stdout.""" - + """If the current verbosity level is of greater than or equal to + 'level' print 'msg' to stdout. + """ if self.verbose >= level: print msg @@ -183,18 +184,18 @@ def get_command_name (self): def set_undefined_options (self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding - option values in some other command object. "Undefined" here - means "is None", which is the convention used to indicate - that an option has not been changed between - 'set_initial_values()' and 'set_final_values()'. Usually - called from 'set_final_values()' for options that depend on - some other command rather than another option of the same - command. 'src_cmd' is the other command from which option - values will be taken (a command object will be created for it - if necessary); the remaining arguments are - '(src_option,dst_option)' tuples which mean "take the value - of 'src_option' in the 'src_cmd' command object, and copy it - to 'dst_option' in the current command object".""" + option values in some other command object. "Undefined" here means + "is None", which is the convention used to indicate that an option + has not been changed between 'initialize_options()' and + 'finalize_options()'. Usually called from 'finalize_options()' for + options that depend on some other command rather than another + option of the same command. 'src_cmd' is the other command from + which option values will be taken (a command object will be created + for it if necessary); the remaining arguments are + '(src_option,dst_option)' tuples which mean "take the value of + 'src_option' in the 'src_cmd' command object, and copy it to + 'dst_option' in the current command object". + """ # Option_pairs: list of (src_option, dst_option) tuples @@ -207,10 +208,11 @@ def set_undefined_options (self, src_cmd, *option_pairs): def get_finalized_command (self, command, create=1): - """Wrapper around Distribution's 'get_command_obj()' method: - find (create if necessary and 'create' is true) the command - object for 'command'..""" - + """Wrapper around Distribution's 'get_command_obj()' method: find + (create if necessary and 'create' is true) the command object for + 'command', call its 'ensure_finalized()' method, and return the + finalized command object. + """ cmd_obj = self.distribution.get_command_obj (command, create) cmd_obj.ensure_finalized () return cmd_obj @@ -222,9 +224,9 @@ def reinitialize_command (self, command): def run_command (self, command): """Run some other command: uses the 'run_command()' method of - Distribution, which creates the command object if necessary - and then invokes its 'run()' method.""" - + Distribution, which creates and finalizes the command object if + necessary and then invokes its 'run()' method. + """ self.distribution.run_command (command) @@ -236,15 +238,16 @@ def warn (self, msg): def execute (self, func, args, msg=None, level=1): - """Perform some action that affects the outside world (eg. - by writing to the filesystem). Such actions are special because - they should be disabled by the "dry run" flag, and should - announce themselves if the current verbosity level is high - enough. This method takes care of all that bureaucracy for you; - all you have to do is supply the funtion to call and an argument - tuple for it (to embody the "external action" being performed), - a message to print if the verbosity level is high enough, and an - optional verbosity threshold.""" + """Perform some action that affects the outside world (eg. by + writing to the filesystem). Such actions are special because they + should be disabled by the "dry run" flag, and should announce + themselves if the current verbosity level is high enough. This + method takes care of all that bureaucracy for you; all you have to + do is supply the funtion to call and an argument tuple for it (to + embody the "external action" being performed), a message to print + if the verbosity level is high enough, and an optional verbosity + threshold. + """ # Generate a message if we weren't passed one if msg is None: @@ -285,8 +288,8 @@ def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, - and force flags.""" - + and force flags. + """ return util.copy_tree (infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, @@ -302,6 +305,7 @@ def move_file (self, src, dst, level=1): def spawn (self, cmd, search_path=1, level=1): + """Spawn an external command respecting verbose and dry-run flags.""" from distutils.spawn import spawn spawn (cmd, search_path, self.verbose >= level, @@ -316,16 +320,14 @@ def make_archive (self, base_name, format, def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): - """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'. If the command defined 'self.force', and it is true, then the command is unconditionally run -- does no - timestamp checks.""" - - + timestamp checks. + """ if exec_msg is None: exec_msg = "generating %s from %s" % \ (outfile, string.join (infiles, ', ')) diff --git a/core.py b/core.py index 8903603925..9e390ac13a 100644 --- a/core.py +++ b/core.py @@ -3,7 +3,8 @@ The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are -really defined in distutils.dist and distutils.cmd.""" +really defined in distutils.dist and distutils.cmd. +""" # created 1999/03/01, Greg Ward @@ -37,36 +38,37 @@ def setup (**attrs): - """The gateway to the Distutils: do everything your setup script - needs to do, in a highly flexible and user-driven way. Briefly: - create a Distribution instance; parse the command-line, creating - and customizing instances of the command class for each command - found on the command-line; run each of those commands. - - The Distribution instance might be an instance of a class - supplied via the 'distclass' keyword argument to 'setup'; if no - such class is supplied, then the 'Distribution' class (also in - this module) is instantiated. All other arguments to 'setup' - (except for 'cmdclass') are used to set attributes of the - Distribution instance. - - The 'cmdclass' argument, if supplied, is a dictionary mapping - command names to command classes. Each command encountered on - the command line will be turned into a command class, which is in - turn instantiated; any class found in 'cmdclass' is used in place - of the default, which is (for command 'foo_bar') class 'foo_bar' - in module 'distutils.command.foo_bar'. The command class must - provide a 'user_options' attribute which is a list of option - specifiers for 'distutils.fancy_getopt'. Any command-line - options between the current and the next command are used to set - attributes of the current command object. - - When the entire command-line has been successfully parsed, calls - the 'run()' method on each command object in turn. This method - will be driven entirely by the Distribution object (which each - command object has a reference to, thanks to its constructor), - and the command-specific options that became attributes of each - command object.""" + """The gateway to the Distutils: do everything your setup script needs + to do, in a highly flexible and user-driven way. Briefly: create a + Distribution instance; find and parse config files; parse the command + line; run each of those commands using the options supplied to + 'setup()' (as keyword arguments), in config files, and on the command + line. + + The Distribution instance might be an instance of a class supplied via + the 'distclass' keyword argument to 'setup'; if no such class is + supplied, then the Distribution class (in dist.py) is instantiated. + All other arguments to 'setup' (except for 'cmdclass') are used to set + attributes of the Distribution instance. + + The 'cmdclass' argument, if supplied, is a dictionary mapping command + names to command classes. Each command encountered on the command line + will be turned into a command class, which is in turn instantiated; any + class found in 'cmdclass' is used in place of the default, which is + (for command 'foo_bar') class 'foo_bar' in module + 'distutils.command.foo_bar'. The command class must provide a + 'user_options' attribute which is a list of option specifiers for + 'distutils.fancy_getopt'. Any command-line options between the current + and the next command are used to set attributes of the current command + object. + + When the entire command-line has been successfully parsed, calls the + 'run()' method on each command object in turn. This method will be + driven entirely by the Distribution object (which each command object + has a reference to, thanks to its constructor), and the + command-specific options that became attributes of each command + object. + """ from pprint import pprint # for debugging output diff --git a/dist.py b/dist.py index de4f7ef0a2..6acc0544a8 100644 --- a/dist.py +++ b/dist.py @@ -1,7 +1,8 @@ """distutils.dist Provides the Distribution class, which represents the module distribution -being built/installed/distributed.""" +being built/installed/distributed. +""" # created 2000/04/03, Greg Ward # (extricated from core.py; actually dates back to the beginning) @@ -25,20 +26,18 @@ class Distribution: - """The core of the Distutils. Most of the work hiding behind - 'setup' is really done within a Distribution instance, which - farms the work out to the Distutils commands specified on the - command line. - - Clients will almost never instantiate Distribution directly, - unless the 'setup' function is totally inadequate to their needs. - However, it is conceivable that a client might wish to subclass - Distribution for some specialized purpose, and then pass the - subclass to 'setup' as the 'distclass' keyword argument. If so, - it is necessary to respect the expectations that 'setup' has of - Distribution: it must have a constructor and methods - 'parse_command_line()' and 'run_commands()' with signatures like - those described below.""" + """The core of the Distutils. Most of the work hiding behind 'setup' + is really done within a Distribution instance, which farms the work out + to the Distutils commands specified on the command line. + + Setup scripts will almost never instantiate Distribution directly, + unless the 'setup()' function is totally inadequate to their needs. + However, it is conceivable that a setup script might wish to subclass + Distribution for some specialized purpose, and then pass the subclass + to 'setup()' as the 'distclass' keyword argument. If so, it is + necessary to respect the expectations that 'setup' has of Distribution. + See the code for 'setup()', in core.py, for details. + """ # 'global_options' describes the command-line options that may be @@ -98,14 +97,14 @@ class Distribution: def __init__ (self, attrs=None): """Construct a new Distribution instance: initialize all the - attributes of a Distribution, and then uses 'attrs' (a - dictionary mapping attribute names to values) to assign - some of those attributes their "real" values. (Any attributes - not mentioned in 'attrs' will be assigned to some null - value: 0, None, an empty list or dictionary, etc.) Most - importantly, initialize the 'command_obj' attribute - to the empty dictionary; this will be filled in with real - command objects by 'parse_command_line()'.""" + attributes of a Distribution, and then use 'attrs' (a dictionary + mapping attribute names to values) to assign some of those + attributes their "real" values. (Any attributes not mentioned in + 'attrs' will be assigned to some null value: 0, None, an empty list + or dictionary, etc.) Most importantly, initialize the + 'command_obj' attribute to the empty dictionary; this will be + filled in with real command objects by 'parse_command_line()'. + """ # Default values for our command-line options self.verbose = 1 @@ -387,7 +386,6 @@ def parse_command_line (self, args): # parse_command_line() def _parse_command_opts (self, parser, args): - """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list of arguments, starting with the current command (whose options @@ -666,7 +664,6 @@ def get_command_obj (self, command, create=1): return cmd_obj def _set_command_options (self, command_obj, option_dict=None): - """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). From c857db21dbfe9234d637d3b65ffe37f49464d7d5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 01:49:58 +0000 Subject: [PATCH 0407/8469] Fairly massive overhaul to support getting RPM inputs (extra meta-data, prep/build/etc. scripts, doc files, dependency info) from a config file rather than the dedicated "package_info" file. (The idea is that developers will provide RPM-specific info in the "[bdist_rpm]" section of setup.cfg, but of course it could also be supplied in the other config files, on the command line, or in the setup script -- or any mix of the above.) Major changes: * added a boatload of options to 'user_options' and 'initialize_options()': 'distribution_name', 'group', 'release', ... * added 'finalize_package_data()', which takes the place of '_get_package_data()' -- except it's called from 'finalize_options()', not 'run()', so we have everything figured out before we actually run the command * added 'ensure_string()', 'ensure_string_list()', 'ensure_filename()'; these take the place of '_check_string()' and friends. (These actually look like really useful type-checking methods that could come in handy all over the Distutils; should consider moving them up to Command and using them in other command classes' 'finalize_options()' method for error-checking). * various cleanup, commentary, and adaptation to the new way of storing RPM info in '_make_spec_file()' --- command/bdist_rpm.py | 262 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 230 insertions(+), 32 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index c84fda873e..b09b657fb6 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string +import os, string, re from types import * from distutils.core import Command from distutils.util import get_platform, write_file @@ -28,6 +28,63 @@ class bdist_rpm (Command): "only generate binary RPM"), ('use-bzip2', None, "use bzip2 instead of gzip to create source distribution"), + + # More meta-data: too RPM-specific to put in the setup script, + # but needs to go in the .spec file -- so we make these options + # to "bdist_rpm". The idea is that packagers would put this + # info in setup.cfg, although they are of course free to + # supply it on the command line. + ('distribution-name', None, + "name of the (Linux) distribution name to which this " + "RPM applies (*not* the name of the module distribution!)"), + ('group', None, + "package classification [default: \"Development/Libraries\"]"), + ('release', None, + "RPM release number"), + ('serial', None, + "???"), + ('vendor', None, + "RPM \"vendor\" (eg. \"Joe Blow \") " + "[default: maintainer or author from setup script]"), + ('packager', None, + "RPM packager (eg. \"Jane Doe \")" + "[default: vendor]"), + ('doc-files', None, + "list of documentation files (space or comma-separated)"), + ('changelog', None, + "RPM changelog"), + ('icon', None, + "name of icon file"), + + ('prep-cmd', None, + "?? pre-build command(s) ??"), + ('build-cmd', None, + "?? build command(s) ??"), + ('install-cmd', None, + "?? installation command(s) ??"), + ('clean-cmd', None, + "?? clean command(s) ??"), + ('pre-install', None, + "pre-install script (Bourne shell code)"), + ('post-install', None, + "post-install script (Bourne shell code)"), + ('pre-uninstall', None, + "pre-uninstall script (Bourne shell code)"), + ('post-uninstall', None, + "post-uninstall script (Bourne shell code)"), + + ('provides', None, + "???"), + ('requires', None, + "???"), + ('conflicts', None, + "???"), + ('build-requires', None, + "???"), + ('obsoletes', None, + "???"), + + # Actions to take when building RPM ('clean', None, "clean up RPM build directory [default]"), ('no-clean', None, @@ -48,6 +105,32 @@ def initialize_options (self): self.binary_only = None self.source_only = None self.use_bzip2 = None + + self.distribution_name = None + self.group = None + self.release = None + self.serial = None + self.vendor = None + self.packager = None + self.doc_files = None + self.changelog = None + self.icon = None + + self.prep_cmd = None + self.build_cmd = None + self.install_cmd = None + self.clean_cmd = None + self.pre_install = None + self.post_install = None + self.pre_uninstall = None + self.post_uninstall = None + self.prep = None + self.provides = None + self.requires = None + self.conflicts = None + self.build_requires = None + self.obsoletes = None + self.clean = 1 self.use_rpm_opt_flags = 1 @@ -63,15 +146,112 @@ def finalize_options (self): if self.binary_only and self.source_only: raise DistutilsOptionsError, \ "cannot supply both '--source-only' and '--binary-only'" + # don't pass CFLAGS to pure python distributions if not self.distribution.has_ext_modules(): self.use_rpm_opt_flags = 0 + self.finalize_package_data() + # finalize_options() + def finalize_package_data (self): + self.ensure_string('group', "Development/Libraries") + self.ensure_string('vendor', + "%s <%s>" % (self.distribution.get_contact(), + self.distribution.get_contact_email())) + self.ensure_string('packager', self.vendor) # or nothing? + self.ensure_string_list('doc_files') + if type(self.doc_files) is ListType: + for readme in ('README', 'README.txt'): + if os.path.exists(readme) and readme not in self.doc_files: + self.doc.append(readme) + + self.ensure_string('release', "1") # should it be an int? + self.ensure_string('serial') # should it be an int? + + self.ensure_string('icon') + self.ensure_string('distribution_name') + + self.ensure_string('prep_cmd', "%setup") # string or filename? + + if self.use_rpm_opt_flags: + def_build = 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build' + else: + def_build = 'python setup.py build' + self.ensure_string('build_cmd', def_build) + self.ensure_string('install_cmd', + "python setup.py install --root=$RPM_BUILD_ROOT " + "--record=INSTALLED_FILES") + self.ensure_string('clean_cmd', + "rm -rf $RPM_BUILD_ROOT") + self.ensure_filename('pre_install') + self.ensure_filename('post_install') + self.ensure_filename('pre_uninstall') + self.ensure_filename('post_uninstall') + + # XXX don't forget we punted on summaries and descriptions -- they + # should be handled here eventually! + + # Now *this* is some meta-data that belongs in the setup script... + self.ensure_string_list('provides') + self.ensure_string_list('requires') + self.ensure_string_list('conflicts') + self.ensure_string_list('build_requires') + self.ensure_string_list('obsoletes') + + # finalize_package_data () + + + # XXX these look awfully handy: should probably move them + # up to Command and use more widely. + def _ensure_stringlike (self, option, what, default=None): + val = getattr(self, option) + if val is None: + setattr(self, option, default) + return default + elif type(val) is not StringType: + raise DistutilsOptionError, \ + "'%s' must be a %s (got `%s`)" % (option, what, val) + return val + + def ensure_string (self, option, default=None): + self._ensure_stringlike(option, "string", default) + + def ensure_string_list (self, option): + val = getattr(self, option) + if val is None: + return + elif type(val) is StringType: + setattr(self, option, re.split(r',\s*|\s+', val)) + else: + if type(val) is ListType: + types = map(type, val) + ok = (types == [StringType] * len(val)) + else: + ok = 0 + + if not ok: + raise DistutilsOptionError, \ + "'%s' must be a list of strings (got %s)" % \ + (option, `val`) + + def ensure_filename (self, option, default=None): + val = self._ensure_stringlike(option, "filename", None) + if val is not None and not os.path.exists(val): + raise DistutilsOptionError, \ + "error in '%s' option: file '%s' does not exist" % \ + (option, val) + + def run (self): - self._get_package_data() # get packaging info + + print "before _get_package_data():" + print "vendor =", self.vendor + print "packager =", self.packager + print "doc_files =", self.doc_files + print "changelog =", self.changelog # make directories if self.spec_only: @@ -206,9 +386,10 @@ def _get_package_data(self): self.obsoletes = join(self._check_string_list('obsoletes')) def _make_spec_file(self): - ''' Generate an RPM spec file ''' - - # definitons and headers + """Generate the text of an RPM spec file and return it as a + list of strings (one per line). + """ + # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), @@ -218,18 +399,25 @@ def _make_spec_file(self): ] # put locale summaries into spec file - for locale in self.summaries.keys(): - spec_file.append('Summary(%s): %s' % (locale, - self.summaries[locale])) + # XXX not supported for now (hard to put a dictionary + # in a config file -- arg!) + #for locale in self.summaries.keys(): + # spec_file.append('Summary(%s): %s' % (locale, + # self.summaries[locale])) spec_file.extend([ 'Name: %{name}', 'Version: %{version}', 'Release: %{release}',]) + + # XXX yuck! this filename is available from the "sdist" command, + # but only after it has run: and we create the spec file before + # running "sdist", in case of --spec-only. if self.use_bzip2: spec_file.append('Source0: %{name}-%{version}.tar.bz2') else: spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.extend([ 'Copyright: ' + self.distribution.get_licence(), 'Group: ' + self.group, @@ -247,9 +435,12 @@ def _make_spec_file(self): 'Conflicts', 'Obsoletes', ): - if getattr(self, string.lower(field)): - spec_file.append('%s: %s' % - (field, getattr(self, string.lower(field)))) + val = getattr(self, string.lower(field)) + if type(val) is ListType: + spec_file.append('%s: %s' % (field, string.join(val))) + elif val is not None: + spec_file.append('%s: %s' % (field, val)) + if self.distribution.get_url() != 'UNKNOWN': spec_file.append('Url: ' + self.distribution.get_url()) @@ -258,7 +449,8 @@ def _make_spec_file(self): spec_file.append('Distribution: ' + self.distribution_name) if self.build_requires: - spec_file.append('BuildRequires: ' + self.build_requires) + spec_file.append('BuildRequires: ' + + string.join(self.build_requires)) if self.icon: spec_file.append('Icon: ' + os.path.basename(self.icon)) @@ -270,28 +462,34 @@ def _make_spec_file(self): ]) # put locale descriptions into spec file - for locale in self.descriptions.keys(): - spec_file.extend([ - '', - '%description -l ' + locale, - self.descriptions[locale], - ]) + # XXX again, suppressed because config file syntax doesn't + # easily support this ;-( + #for locale in self.descriptions.keys(): + # spec_file.extend([ + # '', + # '%description -l ' + locale, + # self.descriptions[locale], + # ]) # rpm scripts - for script in ('prep', - 'build', - 'install', - 'clean', - 'pre', - 'post', - 'preun', - 'postun', - ): - if getattr(self, script): + for (rpm_opt, attr) in (('prep', 'prep_cmd'), + ('build', 'build_cmd'), + ('install', 'install_cmd'), + ('clean', 'clean_cmd'), + ('pre', 'pre_install'), + ('post', 'post_install'), + ('preun', 'pre_uninstall'), + ('postun', 'post_uninstall')): + # XXX oops, this doesn't distinguish between "raw code" + # options and "script filename" options -- well, we probably + # should settle on one or the other, and not make the + # distinction! + val = getattr(self, attr) + if val: spec_file.extend([ '', - '%' + script, - getattr(self, script), + '%' + rpm_opt, + val ]) @@ -302,8 +500,8 @@ def _make_spec_file(self): '%defattr(-,root,root)', ]) - if self.doc: - spec_file.append('%doc ' + self.doc) + if self.doc_files: + spec_file.append('%doc ' + string.join(self.doc_files)) if self.changelog: spec_file.extend([ From 4e66ce5352c3529cb79bf189c35da0b990b0993b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 01:52:04 +0000 Subject: [PATCH 0408/8469] Ditched the obsolete '_get_package_data()' method and its '_check_*()' helpers. --- command/bdist_rpm.py | 145 +------------------------------------------ 1 file changed, 3 insertions(+), 142 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index b09b657fb6..d37d609094 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -318,73 +318,6 @@ def run (self): # run() - def _get_package_data(self): - ''' Get data needed to generate spec file, first from the - DistributionMetadata class, then from the package_data file, which is - Python code read with execfile() ''' - - from string import join - - package_type = 'rpm' - - # read in package data, if any - if os.path.exists('package_data'): - try: - exec(open('package_data')) - except: - raise DistutilsOptionError, 'Unable to parse package data file' - - # set instance variables, supplying default value if not provided in - # package data file - self.package_data = locals() - - # the following variables must be {string (len() = 2): string} - self.summaries = self._check_string_dict('summaries') - self.descriptions = self._check_string_dict('descriptions') - - # The following variable must be an ordinary number or a string - self.release = self._check_number_or_string('release', '1') - self.serial = self._check_number_or_string('serial') - - # The following variables must be strings - self.group = self._check_string('group', 'Development/Libraries') - self.vendor = self._check_string('vendor') - self.packager = self._check_string('packager') - self.changelog = self._check_string('changelog') - self.icon = self._check_string('icon') - self.distribution_name = self._check_string('distribution_name') - self.pre = self._check_string('pre') - self.post = self._check_string('post') - self.preun = self._check_string('preun') - self.postun = self._check_string('postun') - self.prep = self._check_string('prep', '%setup') - if self.use_rpm_opt_flags: - self.build = (self._check_string( - 'build', - 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build')) - else: - self.build = (self._check_string('build', 'python setup.py build')) - self.install = self._check_string( - 'install', - 'python setup.py install --root=$RPM_BUILD_ROOT --record') - self.clean = self._check_string( - 'clean', - 'rm -rf $RPM_BUILD_ROOT') - - # The following variables must be a list or tuple of strings, or a - # string - self.doc = self._check_string_list('doc') - if type(self.doc) == ListType: - for readme in ('README', 'README.txt'): - if os.path.exists(readme) and readme not in self.doc: - self.doc.append(readme) - self.doc = join(self.doc) - self.provides = join(self._check_string_list('provides')) - self.requires = join(self._check_string_list('requires')) - self.conflicts = join(self._check_string_list('conflicts')) - self.build_requires = join(self._check_string_list('build_requires')) - self.obsoletes = join(self._check_string_list('obsoletes')) - def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). @@ -512,78 +445,6 @@ def _make_spec_file(self): return spec_file - def _check_string_dict(self, var_name, default_value = {}): - ''' Tests a wariable to determine if it is {string: string}, - var_name is the name of the wariable. Return the value if it is valid, - returns default_value if the variable does not exist, raises - DistutilsOptionError if the variable is not valid''' - if self.package_data.has_key(var_name): - pass_test = 1 # set to 0 if fails test - value = self.package_data[var_name] - if type(value) == DictType: - for locale in value.keys(): - if (type(locale) != StringType) or (type(value[locale]) != - StringType): - pass_test = 0 - break - if pass_test: - return test_me - raise DistutilsOptionError, \ - ("Error in package_data: '%s' must be dictionary: " - '{string: string}' % var_name) - else: - return default_value - - def _check_string(self, var_name, default_value = None): - ''' Tests a variable in package_data to determine if it is a string, - var_name is the name of the wariable. Return the value if it is a - string, returns default_value if the variable does not exist, raises - DistutilsOptionError if the variable is not a string''' - if self.package_data.has_key(var_name): - if type(self.package_data[var_name]) == StringType: - return self.package_data[var_name] - else: - raise DistutilsOptionError, \ - "Error in package_data: '%s' must be a string" % var_name - else: - return default_value - - def _check_number_or_string(self, var_name, default_value = None): - ''' Tests a variable in package_data to determine if it is a number or - a string, var_name is the name of the wariable. Return the value if it - is valid, returns default_value if the variable does not exist, raises - DistutilsOptionError if the variable is not valid''' - if self.package_data.has_key(var_name): - if type(self.package_data[var_name]) in (StringType, LongType, - IntType, FloatType): - return str(self.package_data[var_name]) - else: - raise DistutilsOptionError, \ - ("Error in package_data: '%s' must be a string or a " - 'number' % var_name) - else: - return default_value - - def _check_string_list(self, var_name, default_value = []): - ''' Tests a variable in package_data to determine if it is a string or - a list or tuple of strings, var_name is the name of the wariable. - Return the value as a string or a list if it is valid, returns - default_value if the variable does not exist, raises - DistutilsOptionError if the variable is not valid''' - if self.package_data.has_key(var_name): - value = self.package_data[var_name] - pass_test = 1 - if type(value) == StringType: - return value - elif type(value) in (ListType, TupleType): - for item in value: - if type(item) != StringType: - pass_test = 0 - break - if pass_test: - return list(value) - raise DistutilsOptionError, \ - ("Error in package_data: '%s' must be a string or a " - 'list or tuple of strings' % var_name) - else: - return default_value + # _make_spec_file () + +# class bdist_rpm From 1870024f295ec8b39849c562a75f6a11deb725b7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 01:55:36 +0000 Subject: [PATCH 0409/8469] Use Distribution method 'dump_option_dicts()' for debugging output, and only do so if DEBUG is true. --- core.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core.py b/core.py index 9e390ac13a..2bad10e438 100644 --- a/core.py +++ b/core.py @@ -70,8 +70,6 @@ class found in 'cmdclass' is used in place of the default, which is object. """ - from pprint import pprint # for debugging output - # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get ('distclass') @@ -88,8 +86,9 @@ class found in 'cmdclass' is used in place of the default, which is # the setup script, but be overridden by the command line. dist.parse_config_files() - print "options (after parsing config files):" - pprint (dist.command_options) + if DEBUG: + print "options (after parsing config files):" + dist.dump_option_dicts() # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. @@ -99,8 +98,9 @@ class found in 'cmdclass' is used in place of the default, which is sys.stderr.write (usage + "\n") raise SystemExit, "error: %s" % msg - print "options (after parsing command line):" - pprint (dist.command_options) + if DEBUG: + print "options (after parsing command line):" + dist.dump_option_dicts() # And finally, run all the commands found on the command line. if ok: From 1d343163373ad5f9fa7fe5e11e44d4f7af9eabae Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 01:59:33 +0000 Subject: [PATCH 0410/8469] Only print debugging output if DEBUG true (and deleted some of the more extraneous debug prints). --- dist.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dist.py b/dist.py index 6acc0544a8..64f63add57 100644 --- a/dist.py +++ b/dist.py @@ -294,15 +294,16 @@ def find_config_files (self): def parse_config_files (self, filenames=None): from ConfigParser import ConfigParser + from distutils.core import DEBUG if filenames is None: filenames = self.find_config_files() - print "Distribution.parse_config_files():" + if DEBUG: print "Distribution.parse_config_files():" parser = ConfigParser() for filename in filenames: - print " reading", filename + if DEBUG: print " reading", filename parser.read(filename) for section in parser.sections(): options = parser.options(section) @@ -370,7 +371,6 @@ def parse_command_line (self, args): # latter, we omit the display-only options and show help for # each command listed on the command line. if self.help: - print "showing 'global' help; commands=", self.commands self._show_help(parser, display_options=len(self.commands) == 0, commands=self.commands) @@ -440,7 +440,6 @@ def _parse_command_opts (self, parser, args): parser.set_negative_aliases (negative_opt) (args, opts) = parser.getopt (args[1:]) if hasattr(opts, 'help') and opts.help: - print "showing help for command", cmd_class self._show_help(parser, display_options=0, commands=[cmd_class]) return @@ -643,10 +642,12 @@ def get_command_obj (self, command, create=1): object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ + from distutils.core import DEBUG cmd_obj = self.command_obj.get(command) if not cmd_obj and create: - print "Distribution.get_command_obj(): " \ - "creating '%s' command object" % command + if DEBUG: + print "Distribution.get_command_obj(): " \ + "creating '%s' command object" % command klass = self.get_command_class(command) cmd_obj = self.command_obj[command] = klass(self) From a3be3dbd094620fea37917c49fd6d93cabd4a16c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 02:01:51 +0000 Subject: [PATCH 0411/8469] Only print debugging output if DEBUG true. --- command/bdist_rpm.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index d37d609094..aecf5c9dec 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -9,7 +9,7 @@ import os, string, re from types import * -from distutils.core import Command +from distutils.core import Command, DEBUG from distutils.util import get_platform, write_file from distutils.errors import * @@ -247,11 +247,12 @@ def ensure_filename (self, option, default=None): def run (self): - print "before _get_package_data():" - print "vendor =", self.vendor - print "packager =", self.packager - print "doc_files =", self.doc_files - print "changelog =", self.changelog + if DEBUG: + print "before _get_package_data():" + print "vendor =", self.vendor + print "packager =", self.packager + print "doc_files =", self.doc_files + print "changelog =", self.changelog # make directories if self.spec_only: From 9057f17f11ad3f506bab940ada1bd488f9add36a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 2 Jun 2000 02:23:42 +0000 Subject: [PATCH 0412/8469] Bumped version number to 0.9pre (there will be a couple of code snapshots before the real release, but I want to make it clear that a major new release is on the way). --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 32fc276c40..2ba82bd58d 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.8.2" +__version__ = "0.9pre" From 821ff992cc9ca03f511e1e7d69a71c37f1e80938 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 3 Jun 2000 00:44:30 +0000 Subject: [PATCH 0413/8469] Added a bunch of new globals in '_init_mac()' -- these will be needed to support the forthcoming Cygwin/Mingw32 GCC-on-Windows patch. Standardized CVS id line. --- sysconfig.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index a5f3816a16..53da48264e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -6,7 +6,7 @@ Initial date: 17-Dec-1998 """ -__version__ = "$Revision$" +__revision__ = "$Id$" import os import re @@ -255,6 +255,20 @@ def _init_nt(): g['SO'] = '.pyd' g['exec_prefix'] = EXEC_PREFIX + # These are needed for the CygwinCCompiler and Mingw32CCompiler + # classes, which are just UnixCCompiler classes that happen to work on + # Windows. UnixCCompiler expects to find these values in sysconfig, so + # here they are. The fact that other Windows compilers don't need + # these values is pure luck (hmmm). + g['CC'] = "cc" # not gcc? + g['RANLIB'] = "ranlib" + g['AR'] = "ar" + g['OPT'] = "-O2" + g['SO'] = ".pyd" + g['LDSHARED'] = "ld" + g['CCSHARED'] = "" + g['EXE'] = ".exe" + def _init_mac(): """Initialize the module as appropriate for Macintosh systems""" From c5268b3d895061e69e712f4e375e8997a03de8e3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 3 Jun 2000 01:02:06 +0000 Subject: [PATCH 0414/8469] Catch DistutilSetupError from the Distribution constructor. --- core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 2bad10e438..8bcf2a87d6 100644 --- a/core.py +++ b/core.py @@ -80,7 +80,10 @@ class found in 'cmdclass' is used in place of the default, which is # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it - dist = klass (attrs) + try: + dist = klass (attrs) + except DistutilsSetupError, msg: + raise SystemExit, "error in setup script: %s" % msg # Find and parse the config file(s): they will override options from # the setup script, but be overridden by the command line. From 85ef7f4621c78621e4a2858b21c950cede345f8f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 3 Jun 2000 01:03:55 +0000 Subject: [PATCH 0415/8469] Patch from Harry Henry Gebel: fixes a bit of code that slipped by my overhaul last night. --- command/bdist_rpm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index aecf5c9dec..9bce04c1ad 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -308,9 +308,8 @@ def run (self): rpm_args.append('-bb') else: rpm_args.append('-ba') - topdir = os.getcwd() + 'build/rpm' rpm_args.extend(['--define', - '_topdir ' + os.getcwd() + '/build/rpm',]) + '_topdir %s/%s' % (os.getcwd(), rpm_base),]) if self.clean: rpm_args.append('--clean') rpm_args.append(spec_path) From 4e412ef49e4dc89329ceb1a213f4b695f611e080 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 13:42:52 +0000 Subject: [PATCH 0416/8469] Renamed 'modules' option to 'py_modules', for consistency with Distribution (and in order to generate a more sensible error message cleanly). --- command/build_py.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 92a37f20c4..0405d392d3 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -26,7 +26,7 @@ class build_py (Command): def initialize_options (self): self.build_lib = None - self.modules = None + self.py_modules = None self.package = None self.package_dir = None self.force = None @@ -39,7 +39,7 @@ def finalize_options (self): # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. self.packages = self.distribution.packages - self.modules = self.distribution.py_modules + self.py_modules = self.distribution.py_modules self.package_dir = self.distribution.package_dir @@ -62,7 +62,7 @@ def run (self): # installing). # Two options control which modules will be installed: 'packages' - # and 'modules'. The former lets us work with whole packages, not + # and 'py_modules'. The former lets us work with whole packages, not # specifying individual modules at all; the latter is for # specifying modules one-at-a-time. Currently they are mutually # exclusive: you can define one or the other (or neither), but not @@ -70,17 +70,17 @@ def run (self): # Dispose of the two "unusual" cases first: no pure Python modules # at all (no problem, just return silently), and over-specified - # 'packages' and 'modules' options. + # 'packages' and 'py_modules' options. - if not self.modules and not self.packages: + if not self.py_modules and not self.packages: return - if self.modules and self.packages: + if self.py_modules and self.packages: raise DistutilsOptionError, \ - "build_py: supplying both 'packages' and 'modules' " + \ + "build_py: supplying both 'packages' and 'py_modules' " + \ "options is not allowed" - # Now we're down to two cases: 'modules' only and 'packages' only. - if self.modules: + # Now we're down to two cases: 'py_modules' only and 'packages' only. + if self.py_modules: self.build_modules () else: self.build_packages () @@ -194,7 +194,7 @@ def find_package_modules (self, package, package_dir): def find_modules (self): """Finds individually-specified Python modules, ie. those listed by - module name in 'self.modules'. Returns a list of tuples (package, + module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through package-space to the module; 'module_base' is the bare (no packages, no dots) module name, and 'filename' is the path to the @@ -218,7 +218,7 @@ def find_modules (self): # string or empty list, depending on context). Differences: # - don't check for __init__.py in directory for empty package - for module in self.modules: + for module in self.py_modules: path = string.split (module, '.') package = tuple (path[0:-1]) module_base = path[-1] @@ -251,12 +251,12 @@ def find_modules (self): def find_all_modules (self): """Compute the list of all modules that will be built, whether - they are specified one-module-at-a-time ('self.modules') or + they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.""" - if self.modules: + if self.py_modules: modules = self.find_modules () else: modules = [] From 32b0296e148d27447ca6b7154f8fd2d94b6a6a5e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 14:20:57 +0000 Subject: [PATCH 0417/8469] Removed the 'ensure_*' methods -- they're just too handy too keep in one command class, so they're now in the Command base class. --- command/bdist_rpm.py | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 9bce04c1ad..4e7675e806 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string, re +import os, string from types import * from distutils.core import Command, DEBUG from distutils.util import get_platform, write_file @@ -203,48 +203,6 @@ def finalize_package_data (self): # finalize_package_data () - # XXX these look awfully handy: should probably move them - # up to Command and use more widely. - def _ensure_stringlike (self, option, what, default=None): - val = getattr(self, option) - if val is None: - setattr(self, option, default) - return default - elif type(val) is not StringType: - raise DistutilsOptionError, \ - "'%s' must be a %s (got `%s`)" % (option, what, val) - return val - - def ensure_string (self, option, default=None): - self._ensure_stringlike(option, "string", default) - - def ensure_string_list (self, option): - val = getattr(self, option) - if val is None: - return - elif type(val) is StringType: - setattr(self, option, re.split(r',\s*|\s+', val)) - else: - if type(val) is ListType: - types = map(type, val) - ok = (types == [StringType] * len(val)) - else: - ok = 0 - - if not ok: - raise DistutilsOptionError, \ - "'%s' must be a list of strings (got %s)" % \ - (option, `val`) - - def ensure_filename (self, option, default=None): - val = self._ensure_stringlike(option, "filename", None) - if val is not None and not os.path.exists(val): - raise DistutilsOptionError, \ - "error in '%s' option: file '%s' does not exist" % \ - (option, val) - - - def run (self): if DEBUG: From f126db7e1143b197ef275f5545fc39258124fa87 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 14:21:28 +0000 Subject: [PATCH 0418/8469] Added the 'ensure_*' methods from bdist_rpm; refactored 'ensure_filename()' and added 'ensure_dirname()'. --- cmd.py | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/cmd.py b/cmd.py index b0a4b95942..9f63f838a7 100644 --- a/cmd.py +++ b/cmd.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os, string, re from types import * from distutils.errors import * from distutils import util @@ -173,6 +173,77 @@ def announce (self, msg, level=1): print msg + # -- Option validation methods ------------------------------------- + # (these are very handy in writing the 'finalize_options()' method) + # + # NB. the general philosophy here is to ensure that a particular option + # value meets certain type and value constraints. If not, we try to + # force it into conformance (eg. if we expect a list but have a string, + # split the string on comma and/or whitespace). If we can't force the + # option into conformance, raise DistutilsOptionError. Thus, command + # classes need do nothing more than (eg.) + # self.ensure_string_list('foo') + # and they can be guaranteed that thereafter, self.foo will be + # a list of strings. + + def _ensure_stringlike (self, option, what, default=None): + val = getattr(self, option) + if val is None: + setattr(self, option, default) + return default + elif type(val) is not StringType: + raise DistutilsOptionError, \ + "'%s' must be a %s (got `%s`)" % (option, what, val) + return val + + def ensure_string (self, option, default=None): + """Ensure that 'option' is a string; if not defined, set it to + 'default'. + """ + self._ensure_stringlike(option, "string", default) + + def ensure_string_list (self, option): + """Ensure that 'option' is a list of strings. If 'option' is + currently a string, we split it either on /,\s*/ or /\s+/, so + "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become + ["foo", "bar", "baz"]. + """ + val = getattr(self, option) + if val is None: + return + elif type(val) is StringType: + setattr(self, option, re.split(r',\s*|\s+', val)) + else: + if type(val) is ListType: + types = map(type, val) + ok = (types == [StringType] * len(val)) + else: + ok = 0 + + if not ok: + raise DistutilsOptionError, \ + "'%s' must be a list of strings (got %s)" % \ + (option, `val`) + + def _ensure_tested_string (self, option, tester, + what, error_fmt, default=None): + val = self._ensure_stringlike(option, what, default) + if val is not None and not tester(val): + raise DistutilsOptionError, \ + ("error in '%s' option: " + error_fmt) % (option, val) + + def ensure_filename (self, option): + """Ensure that 'option' is the name of an existing file.""" + self._ensure_tested_string(option, os.path.isfile, + "filename", + "'%s' does not exist or is not a file") + + def ensure_dirname (self, option): + self._ensure_tested_string(option, os.path.isdir, + "directory name", + "'%s' does not exist or is not a directory") + + # -- Convenience methods for commands ------------------------------ def get_command_name (self): From bf680c9cda3ae15b841455b9b8f8b858eb9fffd4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 15:00:34 +0000 Subject: [PATCH 0419/8469] Patch from Harry Henry Gebel: Fills in question marks in help Reads scripts in from files rather than strings Adds RPM 2 compatibility mode (untested). Use of this mode requires that --bdist-base be specified because bdist_rpm has no way of detecting where RPM wants to find spec files and source files. An unmodified RedHat 5.0 system would require '--bdist-base=/usr/src/RedHat'. (You would also have to be root.) If the rpmrc file has been modified to allow RPMs to be built by normal users then --build-base would need to be changed accordingly. Formats the changelog. GPW: tweaked formatting, added some editorial comments. --- command/bdist_rpm.py | 162 +++++++++++++++++++++++++++---------------- 1 file changed, 103 insertions(+), 59 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 4e7675e806..612629fe4c 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -42,7 +42,7 @@ class bdist_rpm (Command): ('release', None, "RPM release number"), ('serial', None, - "???"), + "RPM serial number"), ('vendor', None, "RPM \"vendor\" (eg. \"Joe Blow \") " "[default: maintainer or author from setup script]"), @@ -52,18 +52,17 @@ class bdist_rpm (Command): ('doc-files', None, "list of documentation files (space or comma-separated)"), ('changelog', None, - "RPM changelog"), + "path to RPM changelog"), ('icon', None, "name of icon file"), - - ('prep-cmd', None, - "?? pre-build command(s) ??"), - ('build-cmd', None, - "?? build command(s) ??"), - ('install-cmd', None, - "?? installation command(s) ??"), - ('clean-cmd', None, - "?? clean command(s) ??"), + ('prep-script', None, + "pre-build script (Bourne shell code)"), + ('build-script', None, + "build script (Bourne shell code)"), + ('install-script', None, + "installation script (Bourne shell code)"), + ('clean-script', None, + "clean script (Bourne shell code)"), ('pre-install', None, "pre-install script (Bourne shell code)"), ('post-install', None, @@ -72,17 +71,16 @@ class bdist_rpm (Command): "pre-uninstall script (Bourne shell code)"), ('post-uninstall', None, "post-uninstall script (Bourne shell code)"), - ('provides', None, - "???"), + "capabilities provided by this package"), ('requires', None, - "???"), + "capabilities required by this package"), ('conflicts', None, - "???"), + "capabilities which conflict with this package"), ('build-requires', None, - "???"), + "capabilities required to build this package"), ('obsoletes', None, - "???"), + "capabilities made obsolete by this package"), # Actions to take when building RPM ('clean', None, @@ -93,10 +91,15 @@ class bdist_rpm (Command): "compile with RPM_OPT_FLAGS when building from source RPM"), ('no-rpm-opt-flags', None, "do not pass any RPM CFLAGS to compiler"), + ('rpm3-mode', None, + "RPM 3 compatibility mode (default)"), + ('rpm2-mode', None, + "RPM 2 compatibility mode"), ] negative_opt = {'no-clean': 'clean', - 'no-rpm-opt-flags': 'use-rpm-opt-flags'} + 'no-rpm-opt-flags': 'use-rpm-opt-flags', + 'rpm2-mode': 'rpm3-mode'} def initialize_options (self): @@ -116,10 +119,10 @@ def initialize_options (self): self.changelog = None self.icon = None - self.prep_cmd = None - self.build_cmd = None - self.install_cmd = None - self.clean_cmd = None + self.prep_script = None + self.build_script = None + self.install_script = None + self.clean_script = None self.pre_install = None self.post_install = None self.pre_uninstall = None @@ -133,6 +136,7 @@ def initialize_options (self): self.clean = 1 self.use_rpm_opt_flags = 1 + self.rpm3_mode = 1 # initialize_options() @@ -160,31 +164,28 @@ def finalize_package_data (self): self.ensure_string('vendor', "%s <%s>" % (self.distribution.get_contact(), self.distribution.get_contact_email())) - self.ensure_string('packager', self.vendor) # or nothing? + self.ensure_string('packager') self.ensure_string_list('doc_files') if type(self.doc_files) is ListType: for readme in ('README', 'README.txt'): if os.path.exists(readme) and readme not in self.doc_files: self.doc.append(readme) - self.ensure_string('release', "1") # should it be an int? + self.ensure_string('release', "1") self.ensure_string('serial') # should it be an int? - self.ensure_string('icon') self.ensure_string('distribution_name') - self.ensure_string('prep_cmd', "%setup") # string or filename? + self.ensure_string('changelog') + # Format changelog correctly + self.changelog = self._format_changelog(self.changelog) - if self.use_rpm_opt_flags: - def_build = 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build' - else: - def_build = 'python setup.py build' - self.ensure_string('build_cmd', def_build) - self.ensure_string('install_cmd', - "python setup.py install --root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES") - self.ensure_string('clean_cmd', - "rm -rf $RPM_BUILD_ROOT") + self.ensure_filename('icon') + + self.ensure_filename('prep_script') + self.ensure_filename('build_script') + self.ensure_filename('install_script') + self.ensure_filename('clean_script') self.ensure_filename('pre_install') self.ensure_filename('post_install') self.ensure_filename('pre_uninstall') @@ -217,7 +218,11 @@ def run (self): spec_dir = "dist" self.mkpath(spec_dir) # XXX should be configurable else: - rpm_base = os.path.join(self.bdist_base, "rpm") + if self.rpm3_mode: + rpm_base = os.path.join(self.bdist_base, "rpm") + else: + # complete path must be specified in RPM 2 mode + rpm_base = self.bdist_base rpm_dir = {} for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): rpm_dir[d] = os.path.join(rpm_base, d) @@ -266,8 +271,9 @@ def run (self): rpm_args.append('-bb') else: rpm_args.append('-ba') - rpm_args.extend(['--define', - '_topdir %s/%s' % (os.getcwd(), rpm_base),]) + if self.rpm3_mode: + rpm_args.extend(['--define', + '_topdir %s/%s' % (os.getcwd(), rpm_base),]) if self.clean: rpm_args.append('--clean') rpm_args.append(spec_path) @@ -363,27 +369,45 @@ def _make_spec_file(self): # ]) # rpm scripts - for (rpm_opt, attr) in (('prep', 'prep_cmd'), - ('build', 'build_cmd'), - ('install', 'install_cmd'), - ('clean', 'clean_cmd'), - ('pre', 'pre_install'), - ('post', 'post_install'), - ('preun', 'pre_uninstall'), - ('postun', 'post_uninstall')): - # XXX oops, this doesn't distinguish between "raw code" - # options and "script filename" options -- well, we probably - # should settle on one or the other, and not make the - # distinction! + # figure out default build script + if self.use_rpm_opt_flags: + def_build = 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build' + else: + def_build = 'python setup.py build' + # insert contents of files + + # XXX this is kind of misleading: user-supplied options are files + # that we open and interpolate into the spec file, but the defaults + # are just text that we drop in as-is. Hmmm. + + script_options = [ + ('prep', 'prep_script', "%setup"), + ('build', 'build_script', def_build), + ('install', 'install_script', + "python setup.py install " + "--root=$RPM_BUILD_ROOT " + "--record=INSTALLED_FILES"), + ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), + ('pre', 'pre_install', None), + ('post', 'post_install', None), + ('preun', 'pre_uninstall', None), + ('postun', 'post_uninstall', None)) + ] + + for (rpm_opt, attr, default) in script_options: + # Insert contents of file refered to, if no file is refered to + # use 'default' as contents of script val = getattr(self, attr) - if val: + if val or default: spec_file.extend([ '', - '%' + rpm_opt, - val - ]) + '%' + rpm_opt,]) + if val: + spec_file.extend(string.split(open(val, 'r').read(), '\n')) + else: + spec_file.append(default) + - # files section spec_file.extend([ '', @@ -397,12 +421,32 @@ def _make_spec_file(self): if self.changelog: spec_file.extend([ '', - '%changelog', - self.changelog - ]) + '%changelog',]) + spec_file.extend(self.changelog) return spec_file # _make_spec_file () + def _format_changelog(self, changelog): + """Format the changelog correctly and convert it to a list of strings + """ + new_changelog = [] + for line in string.split(string.strip(changelog), '\n'): + line = string.strip(line) + if line[0] == '*': + new_changelog.extend(['', line]) + elif line[0] == '-': + new_changelog.append(line) + else: + new_changelog.append(' ' + line) + + # strip trailing newline inserted by first changelog entry + if not new_changelog[0]: + del new_changelog[0] + + return new_changelog + + # _format_changelog() + # class bdist_rpm From 2b0f2098a922464c8891848b2ef9da402ed0398b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 15:12:51 +0000 Subject: [PATCH 0420/8469] Use 'ensure_string_list()' for 'formats' option, so that it can be spelled sensibly in a config file. --- command/sdist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 03de85b1ae..af88eba07a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -73,6 +73,7 @@ def finalize_options (self): if self.template is None: self.template = "MANIFEST.in" + self.ensure_string_list('formats') if self.formats is None: try: self.formats = [self.default_format[os.name]] @@ -80,8 +81,6 @@ def finalize_options (self): raise DistutilsPlatformError, \ "don't know how to create source distributions " + \ "on platform %s" % os.name - elif type (self.formats) is StringType: - self.formats = string.split (self.formats, ',') bad_format = check_archive_formats (self.formats) if bad_format: From a74d191319d246a424b5de2e1ca55dce5cd4d799 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 4 Jun 2000 15:30:35 +0000 Subject: [PATCH 0421/8469] Fixed syntax error. Half-fixed RPM 2 compatibility:added 'rpm_base' option, which must be set (to eg. /usr/src/redhat on a stock Red Hat system) if rpm2_mode is on. Still not quite working, though. --- command/bdist_rpm.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 612629fe4c..0959ad8f90 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -18,8 +18,11 @@ class bdist_rpm (Command): description = "create an RPM distribution" user_options = [ - ('bdist-base', None, + ('bdist-base=', None, "base directory for creating built distributions"), + ('rpm-base=', None, + "base directory for creating RPMs (defaults to \"rpm\" under " + "--bdist-base; must be specified for RPM 2)"), ('spec-only', None, "only regenerate spec file"), ('source-only', None, @@ -104,6 +107,7 @@ class bdist_rpm (Command): def initialize_options (self): self.bdist_base = None + self.rpm_base = None self.spec_only = None self.binary_only = None self.source_only = None @@ -143,6 +147,12 @@ def initialize_options (self): def finalize_options (self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) + if self.rpm_base is None: + if not self.rpm3_mode: + raise DistutilsOptionError, \ + "you must specify --rpm-base in RPM 2 mode" + self.rpm_base = os.path.join(self.bdist_base, "rpm") + if os.name != 'posix': raise DistutilsPlatformError, \ ("don't know how to create RPM " @@ -218,14 +228,9 @@ def run (self): spec_dir = "dist" self.mkpath(spec_dir) # XXX should be configurable else: - if self.rpm3_mode: - rpm_base = os.path.join(self.bdist_base, "rpm") - else: - # complete path must be specified in RPM 2 mode - rpm_base = self.bdist_base rpm_dir = {} for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): - rpm_dir[d] = os.path.join(rpm_base, d) + rpm_dir[d] = os.path.join(self.rpm_base, d) self.mkpath(rpm_dir[d]) spec_dir = rpm_dir['SPECS'] @@ -273,7 +278,7 @@ def run (self): rpm_args.append('-ba') if self.rpm3_mode: rpm_args.extend(['--define', - '_topdir %s/%s' % (os.getcwd(), rpm_base),]) + '_topdir %s/%s' % (os.getcwd(), self.rpm_base),]) if self.clean: rpm_args.append('--clean') rpm_args.append(spec_path) @@ -391,7 +396,7 @@ def _make_spec_file(self): ('pre', 'pre_install', None), ('post', 'post_install', None), ('preun', 'pre_uninstall', None), - ('postun', 'post_uninstall', None)) + ('postun', 'post_uninstall', None), ] for (rpm_opt, attr, default) in script_options: From 448d6882a1ad6730e07c74b34be274cfadfbd514 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 6 Jun 2000 02:18:13 +0000 Subject: [PATCH 0422/8469] 'get_outputs()' now returns an empty list instead of None. --- command/install_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_data.py b/command/install_data.py index acc89aa395..5481dabe66 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -56,4 +56,4 @@ def get_inputs (self): return self.data_files or [] def get_outputs (self): - return self.outfiles + return self.outfiles or [] From 6a1d2a4ef333b3c52fbd11a6f4ba261349aae97c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 6 Jun 2000 02:51:38 +0000 Subject: [PATCH 0423/8469] Support for multiple distribution formats in one run. --- command/bdist.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index df4e3a0350..3cd1eb0342 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -20,9 +20,9 @@ class bdist (Command): user_options = [('bdist-base=', 'b', "temporary directory for creating built distributions"), - ('format=', 'f', - "format for distribution " + - "(tar, ztar, gztar, bztar, zip, ... )"), + ('formats=', None, + "formats for distribution " + + "(gztar, bztar, zip, rpm, ... )"), ] # The following commands do not take a format option from bdist @@ -43,7 +43,7 @@ class bdist (Command): def initialize_options (self): self.bdist_base = None - self.format = None + self.formats = None # initialize_options() @@ -57,31 +57,32 @@ def finalize_options (self): plat = get_platform() self.bdist_base = os.path.join (build_base, 'bdist.' + plat) - if self.format is None: + self.ensure_string_list('formats') + if self.formats is None: try: - self.format = self.default_format[os.name] + self.formats = [self.default_format[os.name]] except KeyError: raise DistutilsPlatformError, \ "don't know how to create built distributions " + \ "on platform %s" % os.name - #elif type (self.format) is StringType: - # self.format = string.split (self.format, ',') # finalize_options() def run (self): - try: - cmd_name = self.format_command[self.format] - except KeyError: - raise DistutilsOptionError, \ - "invalid archive format '%s'" % self.format + for format in self.formats: - if cmd_name not in self.no_format_option: - sub_cmd = self.get_finalized_command (cmd_name) - sub_cmd.format = self.format - self.run_command (cmd_name) + try: + cmd_name = self.format_command[self.format] + except KeyError: + raise DistutilsOptionError, \ + "invalid format '%s'" % self.format + + sub_cmd = self.reinitialize_command(cmd_name) + if cmd_name not in self.no_format_option: + sub_cmd.format = self.format + self.run_command (cmd_name) # run() From ea60038bb5f5d80fefb16772d62e90d2d2508dc5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 6 Jun 2000 02:52:36 +0000 Subject: [PATCH 0424/8469] Fix 'reinitialize_command()' so it resets the 'have_run' flag for the command being reinitialized to false. --- dist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.py b/dist.py index 64f63add57..44f5c8806a 100644 --- a/dist.py +++ b/dist.py @@ -712,6 +712,7 @@ def reinitialize_command (self, command): return command command.initialize_options() command.finalized = 0 + self.have_run[command_name] = 0 self._set_command_options(command) return command From 356f7580cd5f33456c296a1c8addd207d67a4548 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 6 Jun 2000 02:57:07 +0000 Subject: [PATCH 0425/8469] First crack at the Distutils "config" command. Unlike other commands, this one doesn't *do* anything by default; it's just there as a conduit for data (eg. include dirs, libraries) from the user to the "build" commands. However, it provides a couple of Autoconf-ish methods ('try_compile()', 'try_link()', 'try_run()') that derived, per-distribution "config" commands can use to poke around the target system and see what's available. Initial experimenst with mxDateTime indicate that higher-level methods are necessary: analogs of Autoconf's AC_CHECK_HEADER, AC_CHECK_LIB will be needed too (and that's just to probe the C/C++ system: how to probe the Python system is wide open, and someday we'll have to worry about probing a Java system too). --- command/config.py | 180 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 command/config.py diff --git a/command/config.py b/command/config.py new file mode 100644 index 0000000000..cad75bcb27 --- /dev/null +++ b/command/config.py @@ -0,0 +1,180 @@ +"""distutils.command.config + +Implements the Distutils 'config' command, a (mostly) empty command class +that exists mainly to be sub-classed by specific module distributions and +applications. The idea is that while every "config" command is different, +at least they're all named the same, and users always see "config" in the +list of standard commands. Also, this is a good place to put common +configure-like tasks: "try to compile this C code", or "figure out where +this header file lives". +""" + +# created 2000/05/29, Greg Ward + +__revision__ = "$Id$" + +import os, string +from distutils.core import Command +from distutils.errors import DistutilsExecError + + +LANG_EXT = {'c': '.c', + 'c++': '.cxx'} + +class config (Command): + + description = "prepare to build" + + user_options = [ + ('compiler=', None, + "specify the compiler type"), + ('cc=', None, + "specify the compiler executable"), + ('include-dirs=', 'I', + "list of directories to search for header files"), + ('define=', 'D', + "C preprocessor macros to define"), + ('undef=', 'U', + "C preprocessor macros to undefine"), + ('libraries=', 'l', + "external C libraries to link with"), + ('library-dirs=', 'L', + "directories to search for external C libraries"), + ] + + + # The three standard command methods: since the "config" command + # does nothing by default, these are empty. + + def initialize_options (self): + self.compiler = None + self.cc = None + self.include_dirs = None + #self.define = None + #self.undef = None + self.libraries = None + self.library_dirs = None + + def finalize_options (self): + pass + + def run (self): + pass + + + # Utility methods for actual "config" commands. The interfaces are + # loosely based on Autoconf macros of similar names. Sub-classes + # may use these freely. + + def _check_compiler (self): + """Check that 'self.compiler' really is a CCompiler object; + if not, make it one. + """ + # We do this late, and only on-demand, because this is an expensive + # import. + from distutils.ccompiler import CCompiler, new_compiler + if not isinstance(self.compiler, CCompiler): + self.compiler = new_compiler (compiler=self.compiler, + verbose=self.verbose, # for now + dry_run=self.dry_run, + force=1) + if self.include_dirs: + self.compiler.set_include_dirs(self.include_dirs) + if self.libraries: + self.compiler.set_libraries(self.libraries) + if self.library_dirs: + self.compiler.set_library_dirs(self.library_dirs) + + + def _gen_temp_sourcefile (self, body, lang): + filename = "_configtest" + LANG_EXT[lang] + file = open(filename, "w") + file.write(body) + file.close() + return filename + + def _compile (self, body, lang): + src = self._gen_temp_sourcefile(body, lang) + (obj,) = self.compiler.compile([src]) + return (src, obj) + + def _link (self, body, lang): + (src, obj) = self._compile(body, lang) + exe = os.path.splitext(os.path.basename(src))[0] + self.compiler.link_executable([obj], exe) + return (src, obj, exe) + + def _clean (self, *filenames): + self.announce("removing: " + string.join(filenames)) + for filename in filenames: + try: + os.remove(filename) + except OSError: + pass + + + # XXX no 'try_cpp()' or 'search_cpp()' since the CCompiler interface + # does not provide access to the preprocessor. This is an oversight + # that should be fixed. + + # XXX these ignore the dry-run flag: what to do, what to do? even if + # you want a dry-run build, you still need some sort of configuration + # info. My inclination is to make it up to the real config command to + # consult 'dry_run', and assume a default (minimal) configuration if + # true. The problem with trying to do it here is that you'd have to + # return either true or false from all the 'try' methods, neither of + # which is correct. + + def try_compile (self, body, lang="c"): + """Try to compile a source file that consists of the text in 'body' + (a multi-line string). Return true on success, false + otherwise. + """ + from distutils.ccompiler import CompileError + self._check_compiler() + try: + (src, obj) = self._compile(body, lang) + ok = 1 + except CompileError: + ok = 0 + + self.announce(ok and "success!" or "failure.") + self._clean(src, obj) + return ok + + def try_link (self, body, lang="c"): + """Try to compile and link a source file (to an executable) that + consists of the text in 'body' (a multi-line string). Return true + on success, false otherwise. + """ + from distutils.ccompiler import CompileError, LinkError + self._check_compiler() + try: + (src, obj, exe) = self._link(body, lang) + ok = 1 + except (CompileError, LinkError): + ok = 0 + + self.announce(ok and "success!" or "failure.") + self._clean(src, obj, exe) + return ok + + def try_run (self, body, lang="c"): + """Try to compile, link to an executable, and run a program that + consists of the text in 'body'. Return true on success, false + otherwise. + """ + from distutils.ccompiler import CompileError, LinkError + self._check_compiler() + try: + (src, obj, exe) = self._link(body, lang) + self.spawn([exe]) + ok = 1 + except (CompileError, LinkError, DistutilsExecError): + ok = 0 + + self.announce(ok and "success!" or "failure.") + self._clean(src, obj, exe) + return ok + +# class config From 86b8b566efbb265aaa76d90658759dad90a5d31c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 7 Jun 2000 02:26:19 +0000 Subject: [PATCH 0426/8469] Patch from Rene Liebscher: Look for personal config file in /home/greg on Windows, too: users will have to set /home/greg to use this, so it's not something that many people will use. But if python-dev comes up with the "right way" to divine a home directory on Windows, we can use that to set /home/greg and poof! -- personal Distutils config files on Windows. --- dist.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/dist.py b/dist.py index 44f5c8806a..ea4ec2e7e9 100644 --- a/dist.py +++ b/dist.py @@ -263,24 +263,25 @@ def find_config_files (self): and setup.cfg in the current directory. """ files = [] - if os.name == "posix": - check_environ() - - sys_dir = os.path.dirname(sys.modules['distutils'].__file__) - sys_file = os.path.join(sys_dir, "pydistutils.cfg") - if os.path.isfile(sys_file): - files.append(sys_file) - - user_file = os.path.join(os.environ.get('HOME'), - ".pydistutils.cfg") + check_environ() + + if os.name=='posix': + sys_dir = os.path.dirname(sys.modules['distutils'].__file__) + user_filename = ".pydistutils.cfg" + else: + sys_dir = sysconfig.PREFIX + user_filename = "pydistutils.cfg" + + sys_file = os.path.join(sys_dir, "pydistutils.cfg") + if os.path.isfile(sys_file): + files.append(sys_file) + + if os.environ.has_key('HOME'): + user_file = os.path.join(os.environ.get('HOME'), + user_filename) if os.path.isfile(user_file): files.append(user_file) - else: - sys_file = os.path.join (sysconfig.PREFIX, "pydistutils.cfg") - if os.path.isfile(sys_file): - files.append(sys_file) - # All platforms support local setup.cfg local_file = "setup.cfg" if os.path.isfile(local_file): From daadfabdb5b0395712504823a574111262fd5361 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 7 Jun 2000 02:29:03 +0000 Subject: [PATCH 0427/8469] Always look for the system config file in the Distutils module directory, and call it "distutils.cfg" instead of "pydistutils.cfg" (personal config files are still ".pydistutils.cfg" or "pydistutils.cfg", though). --- dist.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/dist.py b/dist.py index ea4ec2e7e9..0b8a99e1cd 100644 --- a/dist.py +++ b/dist.py @@ -265,20 +265,23 @@ def find_config_files (self): files = [] check_environ() - if os.name=='posix': - sys_dir = os.path.dirname(sys.modules['distutils'].__file__) + # Where to look for the system-wide Distutils config file + sys_dir = os.path.dirname(sys.modules['distutils'].__file__) + + # Look for the system config file + sys_file = os.path.join(sys_dir, "distutils.cfg") + if os.path.isfile(sys_file): + files.append(sys_file) + + # What to call the per-user config file + if os.name == 'posix': user_filename = ".pydistutils.cfg" else: - sys_dir = sysconfig.PREFIX user_filename = "pydistutils.cfg" - sys_file = os.path.join(sys_dir, "pydistutils.cfg") - if os.path.isfile(sys_file): - files.append(sys_file) - + # And look for the user config file if os.environ.has_key('HOME'): - user_file = os.path.join(os.environ.get('HOME'), - user_filename) + user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) From daf86a83ea964ce51f67cff37b365f4129e93134 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 7 Jun 2000 03:00:06 +0000 Subject: [PATCH 0428/8469] Patch from Rene Liebscher: this adds "--help-foo" options to list the values that "--foo" can take for various commands: eg. what formats for "sdist" and "bdist", what compilers for "build_ext" and "build_clib". I have *not* reviewed this patch; I'm checking it in as-is because it also fixes a paper-bag-over-head bug in bdist.py, and because I won't have time to review it properly for several days: so someone else can test it for me, instead! --- archive_util.py | 10 +++++----- ccompiler.py | 18 +++++++++++++++--- command/bdist.py | 37 ++++++++++++++++++++++++++----------- command/build.py | 5 +++++ command/build_clib.py | 6 +++++- command/build_ext.py | 5 +++++ command/sdist.py | 19 +++++++++++++++++-- dist.py | 32 +++++++++++++++++++++++++++++--- 8 files changed, 107 insertions(+), 25 deletions(-) diff --git a/archive_util.py b/archive_util.py index 3159c284e4..27aa8c0bfc 100644 --- a/archive_util.py +++ b/archive_util.py @@ -110,11 +110,11 @@ def visit (z, dirname, names): ARCHIVE_FORMATS = { - 'gztar': (make_tarball, [('compress', 'gzip')]), - 'bztar': (make_tarball, [('compress', 'bzip2')]), - 'ztar': (make_tarball, [('compress', 'compress')]), - 'tar': (make_tarball, [('compress', None)]), - 'zip': (make_zipfile, []) + 'gztar': (make_tarball, [('compress', 'gzip')],"gzipped tar-file"), + 'bztar': (make_tarball, [('compress', 'bzip2')],"bzip2-ed tar-file"), + 'ztar': (make_tarball, [('compress', 'compress')],"compressed tar-file"), + 'tar': (make_tarball, [('compress', None)],"uncompressed tar-file"), + 'zip': (make_zipfile, [],"zip-file") } def check_archive_formats (formats): diff --git a/ccompiler.py b/ccompiler.py index 834d543e33..b146f89011 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -726,10 +726,22 @@ def mkpath (self, name, mode=0777): # Map compiler types to (module_name, class_name) pairs -- ie. where to # find the code that implements an interface to this compiler. (The module # is assumed to be in the 'distutils' package.) -compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler'), - 'msvc': ('msvccompiler', 'MSVCCompiler'), +compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler',"standard UNIX-style compiler"), + 'msvc': ('msvccompiler', 'MSVCCompiler',"Microsoft Visual C++"), + 'cygwin': ('cygwinccompiler', 'CygwinCCompiler',"Cygwin-Gnu-Win32-C-Compiler"), + 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',"MinGW32-C-Compiler (or cygwin in this mode)"), } +# prints all possible arguments to --compiler +def show_compilers(): + from distutils.fancy_getopt import FancyGetopt + list_of_compilers=[] + for compiler in compiler_class.keys(): + list_of_compilers.append(("compiler="+compiler,None,compiler_class[compiler][2])) + list_of_compilers.sort() + pretty_printer=FancyGetopt(list_of_compilers) + pretty_printer.print_help("List of available compilers:") + def new_compiler (plat=None, compiler=None, @@ -755,7 +767,7 @@ def new_compiler (plat=None, if compiler is None: compiler = default_compiler[plat] - (module_name, class_name) = compiler_class[compiler] + (module_name, class_name,long_description) = compiler_class[compiler] except KeyError: msg = "don't know how to compile C/C++ code on platform '%s'" % plat if compiler is not None: diff --git a/command/bdist.py b/command/bdist.py index 3cd1eb0342..66ef1133f3 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -21,8 +21,7 @@ class bdist (Command): user_options = [('bdist-base=', 'b', "temporary directory for creating built distributions"), ('formats=', None, - "formats for distribution " + - "(gztar, bztar, zip, rpm, ... )"), + "formats for distribution"), ] # The following commands do not take a format option from bdist @@ -33,12 +32,28 @@ class bdist (Command): default_format = { 'posix': 'gztar', 'nt': 'zip', } - format_command = { 'gztar': 'bdist_dumb', - 'bztar': 'bdist_dumb', - 'ztar': 'bdist_dumb', - 'tar': 'bdist_dumb', - 'rpm': 'bdist_rpm', - 'zip': 'bdist_dumb', } + format_command = { 'gztar': ('bdist_dumb',"gzipped tar-file"), + 'bztar': ('bdist_dumb',"bzip2-ed tar-file"), + 'ztar': ('bdist_dumb',"compressed tar-file"), + 'tar': ('bdist_dumb',"tar-file"), + 'rpm': ('bdist_rpm',"rpm distribution"), + 'zip': ('bdist_dumb',"zip-file"), + } + + # prints all possible arguments to --format + def show_formats(): + from distutils.fancy_getopt import FancyGetopt + list_of_formats=[] + for format in bdist.format_command.keys(): + list_of_formats.append(("formats="+format,None,bdist.format_command[format][1])) + list_of_formats.sort() + pretty_printer=FancyGetopt(list_of_formats) + pretty_printer.print_help("List of available distribution formats:") + + help_options = [ + ('help-formats', None, + "lists available distribution formats",show_formats), + ] def initialize_options (self): @@ -74,14 +89,14 @@ def run (self): for format in self.formats: try: - cmd_name = self.format_command[self.format] + cmd_name = self.format_command[format][0] except KeyError: raise DistutilsOptionError, \ - "invalid format '%s'" % self.format + "invalid format '%s'" % format sub_cmd = self.reinitialize_command(cmd_name) if cmd_name not in self.no_format_option: - sub_cmd.format = self.format + sub_cmd.format = format self.run_command (cmd_name) # run() diff --git a/command/build.py b/command/build.py index b0894b8313..c064f8394b 100644 --- a/command/build.py +++ b/command/build.py @@ -9,6 +9,7 @@ import sys, os from distutils.core import Command from distutils.util import get_platform +from distutils.ccompiler import show_compilers class build (Command): @@ -35,6 +36,10 @@ class build (Command): ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] + help_options = [ + ('help-compiler', None, + "lists available compilers",show_compilers), + ] def initialize_options (self): self.build_base = 'build' diff --git a/command/build_clib.py b/command/build_clib.py index dba9a40a8b..72df372fbf 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -23,7 +23,7 @@ from types import * from distutils.core import Command from distutils.errors import * -from distutils.ccompiler import new_compiler +from distutils.ccompiler import new_compiler,show_compilers class build_clib (Command): @@ -42,6 +42,10 @@ class build_clib (Command): ('compiler=', 'c', "specify the compiler type"), ] + help_options = [ + ('help-compiler', None, + "lists available compilers",show_compilers), + ] def initialize_options (self): self.build_clib = None diff --git a/command/build_ext.py b/command/build_ext.py index f487a68cab..53a265cc2e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -14,6 +14,7 @@ from distutils.errors import * from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils.ccompiler import show_compilers # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). @@ -72,6 +73,10 @@ class build_ext (Command): ('compiler=', 'c', "specify the compiler type"), ] + help_options = [ + ('help-compiler', None, + "lists available compilers",show_compilers), + ] def initialize_options (self): diff --git a/command/sdist.py b/command/sdist.py index af88eba07a..221a4d9934 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -13,7 +13,7 @@ from distutils.core import Command from distutils.util import newer, create_tree, remove_tree, convert_path, \ write_file -from distutils.archive_util import check_archive_formats +from distutils.archive_util import check_archive_formats,ARCHIVE_FORMATS from distutils.text_file import TextFile from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -35,11 +35,26 @@ class sdist (Command): ('force-manifest', 'f', "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, - "formats for source distribution (tar, ztar, gztar, bztar, or zip)"), + "formats for source distribution"), ('keep-tree', 'k', "keep the distribution tree around after creating " + "archive file(s)"), ] + # prints all possible arguments to --formats + def show_formats(): + from distutils.fancy_getopt import FancyGetopt + list_of_formats=[] + for format in ARCHIVE_FORMATS.keys(): + list_of_formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2])) + list_of_formats.sort() + pretty_printer=FancyGetopt(list_of_formats) + pretty_printer.print_help("List of available distribution formats:") + + help_options = [ + ('help-formats', None, + "lists available distribution formats",show_formats), + ] + negative_opts = {'use-defaults': 'no-defaults'} default_format = { 'posix': 'gztar', diff --git a/dist.py b/dist.py index 0b8a99e1cd..88bd94a470 100644 --- a/dist.py +++ b/dist.py @@ -437,16 +437,38 @@ def _parse_command_opts (self, parser, args): negative_opt = copy (negative_opt) negative_opt.update (cmd_class.negative_opt) + # Check for help_options in command class + # They have a different format (tuple of four) so we need to preprocess them here + help_options = [] + if hasattr(cmd_class,"help_options") and type (cmd_class.help_options) is ListType: + help_options = map(lambda x:(x[0],x[1],x[2]),cmd_class.help_options) + # All commands support the global options too, just by adding # in 'global_options'. parser.set_option_table (self.global_options + - cmd_class.user_options) + cmd_class.user_options + help_options) parser.set_negative_aliases (negative_opt) (args, opts) = parser.getopt (args[1:]) if hasattr(opts, 'help') and opts.help: self._show_help(parser, display_options=0, commands=[cmd_class]) return + if hasattr(cmd_class,"help_options") and type (cmd_class.help_options) is ListType: + help_option_found=0 + for help_option in cmd_class.help_options: + if hasattr(opts, parser.get_attr_name(help_option[0])): + help_option_found=1 + #print "showing help for option %s of command %s" % (help_option[0],cmd_class) + if callable(help_option[3]): + help_option[3]() + else: + raise DistutilsClassError, \ + ("command class %s must provide " + + "a callable object for help_option '%s'") % \ + (cmd_class,help_option[0]) + if help_option_found: + return + # Put the options from the command-line into their official # holding pen, the 'command_options' dictionary. opt_dict = self.get_option_dict(command) @@ -496,7 +518,11 @@ def _show_help (self, klass = command else: klass = self.get_command_class (command) - parser.set_option_table (klass.user_options) + if hasattr(klass,"help_options") and type (klass.help_options) is ListType: + parser.set_option_table (klass.user_options+ + map(lambda x:(x[0],x[1],x[2]),klass.help_options)) + else: + parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print @@ -504,7 +530,7 @@ def _show_help (self, return # _show_help () - + def handle_display_options (self, option_order): """If there were any non-global "display-only" options From e2136df03285e1476e460aab0d646aa929b69651 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:02:36 +0000 Subject: [PATCH 0429/8469] Added 'debug_print()' method (driven by DEBUG global from distutils.core). --- cmd.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd.py b/cmd.py index 9f63f838a7..c9b5624f8a 100644 --- a/cmd.py +++ b/cmd.py @@ -172,6 +172,15 @@ def announce (self, msg, level=1): if self.verbose >= level: print msg + def debug_print (self, msg): + """Print 'msg' to stdout if the global DEBUG (taken from the + DISTUTILS_DEBUG environment variable) flag is true. + """ + from distutils.core import DEBUG + if DEBUG: + print msg + + # -- Option validation methods ------------------------------------- # (these are very handy in writing the 'finalize_options()' method) From 33a33497961e25ab9467ff6de472a4c8fb2e6230 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:08:14 +0000 Subject: [PATCH 0430/8469] Made all debug output go through the 'debug_print()' method instead of directly printing to stdout. This was a bit more work than it sounds like it should have been: * turned 'select_pattern()' and 'exclude_pattern()' from functions into methods, so they can refer to 'self' to access the method * commented out the *other* 'exclude_pattern()' method, which appears to be vestigial code that was never cleaned up when the 'exclude_pattern()' function was created * changed the one use of the old 'exclude_pattern()' method to use the new 'exclude_pattern()' (same behaviour, slightly different args) * some code and docstring reformatting * and, of course, changed all the debugging prints to 'debug_print()' calls Added/tweaked some regular ('self.announce()') output for better runtime feedback. --- command/sdist.py | 165 ++++++++++++++++++++++++++--------------------- 1 file changed, 90 insertions(+), 75 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 221a4d9934..b06c515656 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -272,21 +272,22 @@ def search_dir (self, dir, pattern=None): # search_dir () - def exclude_pattern (self, pattern): - """Remove filenames from 'self.files' that match 'pattern'.""" - print "exclude_pattern: pattern=%s" % pattern - pattern_re = translate_pattern (pattern) - for i in range (len (self.files)-1, -1, -1): - if pattern_re.match (self.files[i]): - print "removing %s" % self.files[i] - del self.files[i] +# def exclude_pattern (self, pattern): +# """Remove filenames from 'self.files' that match 'pattern'.""" +# self.debug_print("exclude_pattern: pattern=%s" % pattern) +# pattern_re = translate_pattern (pattern) +# for i in range (len (self.files)-1, -1, -1): +# if pattern_re.match (self.files[i]): +# self.debug_print("removing %s" % self.files[i]) +# del self.files[i] def recursive_exclude_pattern (self, dir, pattern=None): """Remove filenames from 'self.files' that are under 'dir' and whose basenames match 'pattern'.""" - print "recursive_exclude_pattern: dir=%s, pattern=%s" % (dir, pattern) + self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" % + (dir, pattern)) if pattern is None: pattern_re = None else: @@ -296,7 +297,7 @@ def recursive_exclude_pattern (self, dir, pattern=None): (cur_dir, cur_base) = os.path.split (self.files[i]) if (cur_dir == dir and (pattern_re is None or pattern_re.match (cur_base))): - print "removing %s" % self.files[i] + self.debug_print("removing %s" % self.files[i]) del self.files[i] @@ -307,6 +308,7 @@ def read_template (self): and add the resulting filenames to 'self.files'.""" assert self.files is not None and type (self.files) is ListType + self.announce("reading manifest template '%s'" % self.template) template = TextFile (self.template, strip_comments=1, @@ -374,27 +376,28 @@ def read_template (self): # digging stuff up out of 'words'. if action == 'include': - print "include", string.join(pattern_list) + self.debug_print("include " + string.join(pattern_list)) for pattern in pattern_list: - files = select_pattern (all_files, pattern, anchor=1) + files = self.select_pattern (all_files, pattern, anchor=1) if not files: - template.warn ("no files found matching '%s'" % pattern) + template.warn ("no files found matching '%s'" % + pattern) else: self.files.extend (files) elif action == 'exclude': - print "exclude", string.join(pattern_list) + self.debug_print("exclude " + string.join(pattern_list)) for pattern in pattern_list: - num = exclude_pattern (self.files, pattern, anchor=1) + num = self.exclude_pattern (self.files, pattern, anchor=1) if num == 0: template.warn ( "no previously-included files found matching '%s'"% pattern) elif action == 'global-include': - print "global-include", string.join(pattern_list) + self.debug_print("global-include " + string.join(pattern_list)) for pattern in pattern_list: - files = select_pattern (all_files, pattern, anchor=0) + files = self.select_pattern (all_files, pattern, anchor=0) if not files: template.warn (("no files found matching '%s' " + "anywhere in distribution") % @@ -403,9 +406,9 @@ def read_template (self): self.files.extend (files) elif action == 'global-exclude': - print "global-exclude", string.join(pattern_list) + self.debug_print("global-exclude " + string.join(pattern_list)) for pattern in pattern_list: - num = exclude_pattern (self.files, pattern, anchor=0) + num = self.exclude_pattern (self.files, pattern, anchor=0) if num == 0: template.warn \ (("no previously-included files matching '%s' " + @@ -413,9 +416,11 @@ def read_template (self): pattern) elif action == 'recursive-include': - print "recursive-include", dir, string.join(pattern_list) + self.debug_print("recursive-include %s %s" % + (dir, string.join(pattern_list))) for pattern in pattern_list: - files = select_pattern (all_files, pattern, prefix=dir) + files = self.select_pattern ( + all_files, pattern, prefix=dir) if not files: template.warn (("no files found matching '%s' " + "under directory '%s'") % @@ -424,9 +429,11 @@ def read_template (self): self.files.extend (files) elif action == 'recursive-exclude': - print "recursive-exclude", dir, string.join(pattern_list) + self.debug_print("recursive-exclude %s %s" % + (dir, string.join(pattern_list))) for pattern in pattern_list: - num = exclude_pattern (self.files, pattern, prefix=dir) + num = self.exclude_pattern( + self.files, pattern, prefix=dir) if num == 0: template.warn \ (("no previously-included files matching '%s' " + @@ -434,8 +441,9 @@ def read_template (self): (pattern, dir)) elif action == 'graft': - print "graft", dir_pattern - files = select_pattern (all_files, None, prefix=dir_pattern) + self.debug_print("graft " + dir_pattern) + files = self.select_pattern( + all_files, None, prefix=dir_pattern) if not files: template.warn ("no directories found matching '%s'" % dir_pattern) @@ -443,8 +451,9 @@ def read_template (self): self.files.extend (files) elif action == 'prune': - print "prune", dir_pattern - num = exclude_pattern (self.files, None, prefix=dir_pattern) + self.debug_print("prune " + dir_pattern) + num = self.exclude_pattern( + self.files, None, prefix=dir_pattern) if num == 0: template.warn \ (("no previously-included directories found " + @@ -458,14 +467,63 @@ def read_template (self): # Prune away the build and source distribution directories build = self.get_finalized_command ('build') - exclude_pattern (self.files, None, prefix=build.build_base) + self.exclude_pattern (self.files, None, prefix=build.build_base) base_dir = self.distribution.get_fullname() - exclude_pattern (self.files, None, prefix=base_dir) + self.exclude_pattern (self.files, None, prefix=base_dir) # read_template () + def select_pattern (self, files, pattern, anchor=1, prefix=None): + """Select strings (presumably filenames) from 'files' that match + 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not + quite the same as implemented by the 'fnmatch' module: '*' and '?' + match non-special characters, where "special" is platform-dependent: + slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on + Mac OS. + + If 'anchor' is true (the default), then the pattern match is more + stringent: "*.py" will match "foo.py" but not "foo/bar.py". If + 'anchor' is false, both of these will match. + + If 'prefix' is supplied, then only filenames starting with 'prefix' + (itself a pattern) and ending with 'pattern', with anything in between + them, will match. 'anchor' is ignored in this case. + + Return the list of matching strings, possibly empty. + """ + matches = [] + pattern_re = translate_pattern (pattern, anchor, prefix) + self.debug_print("select_pattern: applying regex r'%s'" % + pattern_re.pattern) + for name in files: + if pattern_re.search (name): + matches.append (name) + self.debug_print(" adding " + name) + + return matches + + # select_pattern () + + + def exclude_pattern (self, files, pattern, anchor=1, prefix=None): + """Remove strings (presumably filenames) from 'files' that match + 'pattern'. 'pattern', 'anchor', 'and 'prefix' are the same + as for 'select_pattern()', above. The list 'files' is modified + in place. + """ + pattern_re = translate_pattern (pattern, anchor, prefix) + self.debug_print("exclude_pattern: applying regex r'%s'" % + pattern_re.pattern) + for i in range (len(files)-1, -1, -1): + if pattern_re.search (files[i]): + self.debug_print(" removing " + files[i]) + del files[i] + + # exclude_pattern () + + def write_manifest (self): """Write the file list in 'self.files' (presumably as filled in by 'find_defaults()' and 'read_template()') to the manifest file @@ -473,7 +531,7 @@ def write_manifest (self): self.execute(write_file, (self.manifest, self.files), - "writing manifest file") + "writing manifest file '%s'" % self.manifest) # write_manifest () @@ -483,6 +541,7 @@ def read_manifest (self): it to fill in 'self.files', the list of files to include in the source distribution.""" + self.announce("reading manifest file '%s'" % self.manifest) manifest = open (self.manifest) while 1: line = manifest.readline () @@ -495,7 +554,6 @@ def read_manifest (self): # read_manifest () - def make_release_tree (self, base_dir, files): # Create all the directories under 'base_dir' necessary to @@ -533,7 +591,7 @@ def make_distribution (self): # Remove any files that match "base_dir" from the fileset -- we # don't want to go distributing the distribution inside itself! - self.exclude_pattern (base_dir + "*") + self.exclude_pattern (self.files, base_dir + "*") self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create @@ -583,49 +641,6 @@ def findall (dir = os.curdir): return list -def select_pattern (files, pattern, anchor=1, prefix=None): - """Select strings (presumably filenames) from 'files' that match - 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not - quite the same as implemented by the 'fnmatch' module: '*' and '?' - match non-special characters, where "special" is platform-dependent: - slash on Unix, colon, slash, and backslash on DOS/Windows, and colon - on Mac OS. - - If 'anchor' is true (the default), then the pattern match is more - stringent: "*.py" will match "foo.py" but not "foo/bar.py". If - 'anchor' is false, both of these will match. - - If 'prefix' is supplied, then only filenames starting with 'prefix' - (itself a pattern) and ending with 'pattern', with anything in - between them, will match. 'anchor' is ignored in this case. - - Return the list of matching strings, possibly empty.""" - - matches = [] - pattern_re = translate_pattern (pattern, anchor, prefix) - print "select_pattern: applying re %s" % pattern_re.pattern - for name in files: - if pattern_re.search (name): - matches.append (name) - print " adding", name - - return matches - -# select_pattern () - - -def exclude_pattern (files, pattern, anchor=1, prefix=None): - - pattern_re = translate_pattern (pattern, anchor, prefix) - print "exclude_pattern: applying re %s" % pattern_re.pattern - for i in range (len(files)-1, -1, -1): - if pattern_re.search (files[i]): - print " removing", files[i] - del files[i] - -# exclude_pattern () - - def glob_to_re (pattern): """Translate a shell-like glob pattern to a regular expression; return a string containing the regex. Differs from From 0a3e5710675c4013d56a4f72ecccdc230282ec00 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:14:18 +0000 Subject: [PATCH 0431/8469] Cosmetic tweaks to imports, the 'show_formats()' function, and the 'help_options' list; also added an editorial comment. --- command/sdist.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index b06c515656..eabf5c7936 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -11,9 +11,9 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import newer, create_tree, remove_tree, convert_path, \ - write_file -from distutils.archive_util import check_archive_formats,ARCHIVE_FORMATS +from distutils.util import \ + convert_path, create_tree, remove_tree, newer, write_file, \ + check_archive_formats, ARCHIVE_FORMATS from distutils.text_file import TextFile from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -40,19 +40,27 @@ class sdist (Command): "keep the distribution tree around after creating " + "archive file(s)"), ] - # prints all possible arguments to --formats - def show_formats(): + + + # XXX ugh: this has to precede the 'help_options' list, because + # it is mentioned there -- also, this is not a method, even though + # it's defined in a class: double-ugh! + def show_formats (): + """Print all possible values for the 'formats' option -- used by + the "--help-formats" command-line option. + """ from distutils.fancy_getopt import FancyGetopt - list_of_formats=[] + formats=[] for format in ARCHIVE_FORMATS.keys(): - list_of_formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2])) - list_of_formats.sort() - pretty_printer=FancyGetopt(list_of_formats) - pretty_printer.print_help("List of available distribution formats:") + formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2])) + formats.sort() + pretty_printer = FancyGetopt(formats) + pretty_printer.print_help( + "List of available source distribution formats:") help_options = [ ('help-formats', None, - "lists available distribution formats",show_formats), + "lists available distribution formats", show_formats), ] negative_opts = {'use-defaults': 'no-defaults'} From 3acc171c28a904839b263f8a6cbb617c9894d184 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:24:01 +0000 Subject: [PATCH 0432/8469] Docstring reformatting binge. --- command/sdist.py | 51 ++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index eabf5c7936..cd7f258b53 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -68,8 +68,6 @@ def show_formats (): default_format = { 'posix': 'gztar', 'nt': 'zip' } - exclude_re = re.compile (r'\s*!\s*(\S+)') # for manifest lines - def initialize_options (self): # 'template' and 'manifest' are, respectively, the names of @@ -165,13 +163,11 @@ def check_metadata (self): def get_file_list (self): """Figure out the list of files to include in the source - distribution, and put it in 'self.files'. This might - involve reading the manifest template (and writing the - manifest), or just reading the manifest, or just using - the default file set -- it all depends on the user's - options and the state of the filesystem.""" - - + distribution, and put it in 'self.files'. This might involve + reading the manifest template (and writing the manifest), or just + reading the manifest, or just using the default file set -- it all + depends on the user's options and the state of the filesystem. + """ template_exists = os.path.isfile (self.template) if template_exists: template_newer = newer (self.template, self.manifest) @@ -261,10 +257,9 @@ def find_defaults (self): def search_dir (self, dir, pattern=None): """Recursively find files under 'dir' matching 'pattern' (a string - containing a Unix-style glob pattern). If 'pattern' is None, - find all files under 'dir'. Return the list of found - filenames.""" - + containing a Unix-style glob pattern). If 'pattern' is None, find + all files under 'dir'. Return the list of found filenames. + """ allfiles = findall (dir) if pattern is None: return allfiles @@ -291,9 +286,9 @@ def search_dir (self, dir, pattern=None): def recursive_exclude_pattern (self, dir, pattern=None): - """Remove filenames from 'self.files' that are under 'dir' - and whose basenames match 'pattern'.""" - + """Remove filenames from 'self.files' that are under 'dir' and + whose basenames match 'pattern'. + """ self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" % (dir, pattern)) if pattern is None: @@ -311,10 +306,10 @@ def recursive_exclude_pattern (self, dir, pattern=None): def read_template (self): """Read and parse the manifest template file named by - 'self.template' (usually "MANIFEST.in"). Process all file - specifications (include and exclude) in the manifest template - and add the resulting filenames to 'self.files'.""" - + 'self.template' (usually "MANIFEST.in"). Process all file + specifications (include and exclude) in the manifest template and + add the resulting filenames to 'self.files'. + """ assert self.files is not None and type (self.files) is ListType self.announce("reading manifest template '%s'" % self.template) @@ -533,10 +528,10 @@ def exclude_pattern (self, files, pattern, anchor=1, prefix=None): def write_manifest (self): - """Write the file list in 'self.files' (presumably as filled in - by 'find_defaults()' and 'read_template()') to the manifest file - named by 'self.manifest'.""" - + """Write the file list in 'self.files' (presumably as filled in by + 'find_defaults()' and 'read_template()') to the manifest file named + by 'self.manifest'. + """ self.execute(write_file, (self.manifest, self.files), "writing manifest file '%s'" % self.manifest) @@ -545,10 +540,10 @@ def write_manifest (self): def read_manifest (self): - """Read the manifest file (named by 'self.manifest') and use - it to fill in 'self.files', the list of files to include - in the source distribution.""" - + """Read the manifest file (named by 'self.manifest') and use it to + fill in 'self.files', the list of files to include in the source + distribution. + """ self.announce("reading manifest file '%s'" % self.manifest) manifest = open (self.manifest) while 1: From 74f4d48df9b4e3afe675b6fe446c6d4ad1dee325 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:35:33 +0000 Subject: [PATCH 0433/8469] Fixed so we print more than just the first line of help for options with a short form and text that wraps onto multiple lines. --- fancy_getopt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index a593354c9d..6adfc819c2 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -369,9 +369,6 @@ def generate_help (self, header=None): else: lines.append (" --%-*s " % (max_opt, long)) - for l in text[1:]: - lines.append (big_indent + l) - # Case 2: we have a short option, so we have to include it # just after the long option else: @@ -382,6 +379,9 @@ def generate_help (self, header=None): else: lines.append (" --%-*s" % opt_names) + for l in text[1:]: + lines.append (big_indent + l) + # for self.option_table return lines From 691fce64def6c4aca873465234a5039c6a6c8480 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:46:45 +0000 Subject: [PATCH 0434/8469] Docstring addition binge. --- command/sdist.py | 59 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index cd7f258b53..2a4d346fff 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -31,7 +31,8 @@ class sdist (Command): "include the default file set in the manifest " "[default; disable with --no-defaults]"), ('manifest-only', 'o', - "just regenerate the manifest and then stop"), + "just regenerate the manifest and then stop " + "(implies --force-manifest)"), ('force-manifest', 'f', "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, @@ -133,7 +134,11 @@ def run (self): def check_metadata (self): - + """Ensure that all required elements of meta-data (name, version, + URL, (author and author_email) or (maintainer and + maintainer_email)) are supplied by the Distribution object; warn if + any are missing. + """ metadata = self.distribution.metadata missing = [] @@ -215,7 +220,16 @@ def get_file_list (self): def find_defaults (self): - + """Add all the default files to self.files: + - README or README.txt + - setup.py + - test/test*.py + - all pure Python modules mentioned in setup script + - all C sources listed as part of extensions or C libraries + in the setup script (doesn't catch C headers!) + Warns if (README or README.txt) or setup.py are missing; everything + else is optional. + """ standards = [('README', 'README.txt'), 'setup.py'] for fn in standards: if type (fn) is TupleType: @@ -308,7 +322,8 @@ def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and - add the resulting filenames to 'self.files'. + update 'self.files' accordingly (filenames may be added to + or removed from 'self.files' based on the manifest template). """ assert self.files is not None and type (self.files) is ListType self.announce("reading manifest template '%s'" % self.template) @@ -558,7 +573,14 @@ def read_manifest (self): def make_release_tree (self, base_dir, files): - + """Create the directory tree that will become the source + distribution archive. All directories implied by the filenames in + 'files' are created under 'base_dir', and then we hard link or copy + (if hard linking is unavailable) those files into place. + Essentially, this duplicates the developer's source tree, but in a + directory named after the distribution, containing only the files + to be distributed. + """ # Create all the directories under 'base_dir' necessary to # put 'files' there. create_tree (base_dir, files, @@ -587,7 +609,13 @@ def make_release_tree (self, base_dir, files): def make_distribution (self): - + """Create the source distribution(s). First, we create the release + tree with 'make_release_tree()'; then, we create all required + archive files (according to 'self.formats') from the release tree. + Finally, we clean up by blowing away the release tree (unless + 'self.keep_tree' is true). The list of archive files created is + stored so it can be retrieved later by 'get_archive_files()'. + """ # Don't warn about missing meta-data here -- should be (and is!) # done elsewhere. base_dir = self.distribution.get_fullname() @@ -620,9 +648,9 @@ def get_archive_files (self): # Utility functions def findall (dir = os.curdir): - """Find all files under 'dir' and return the list of full - filenames (relative to 'dir').""" - + """Find all files under 'dir' and return the list of full filenames + (relative to 'dir'). + """ list = [] stack = [dir] pop = stack.pop @@ -645,10 +673,11 @@ def findall (dir = os.curdir): def glob_to_re (pattern): - """Translate a shell-like glob pattern to a regular expression; - return a string containing the regex. Differs from - 'fnmatch.translate()' in that '*' does not match "special - characters" (which are platform-specific).""" + """Translate a shell-like glob pattern to a regular expression; return + a string containing the regex. Differs from 'fnmatch.translate()' in + that '*' does not match "special characters" (which are + platform-specific). + """ pattern_re = fnmatch.translate (pattern) # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which @@ -666,8 +695,8 @@ def glob_to_re (pattern): def translate_pattern (pattern, anchor=1, prefix=None): """Translate a shell-like wildcard pattern to a compiled regular - expression. Return the compiled regex.""" - + expression. Return the compiled regex. + """ if pattern: pattern_re = glob_to_re (pattern) else: From 99ddd15c2fca235eaf905472d648564831458a89 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 00:52:52 +0000 Subject: [PATCH 0435/8469] Renamed 'find_defaults()' to 'add_defaults()'. Deleted old, commented-out 'exclude_pattern()' method. --- command/sdist.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 2a4d346fff..26241353ac 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -189,7 +189,7 @@ def get_file_list (self): # Add default file set to 'files' if self.use_defaults: - self.find_defaults () + self.add_defaults () # Read manifest template if it exists if template_exists: @@ -219,7 +219,7 @@ def get_file_list (self): # get_file_list () - def find_defaults (self): + def add_defaults (self): """Add all the default files to self.files: - README or README.txt - setup.py @@ -268,6 +268,8 @@ def find_defaults (self): build_clib = self.get_finalized_command ('build_clib') self.files.extend (build_clib.get_source_files ()) + # add_defaults () + def search_dir (self, dir, pattern=None): """Recursively find files under 'dir' matching 'pattern' (a string @@ -289,16 +291,6 @@ def search_dir (self, dir, pattern=None): # search_dir () -# def exclude_pattern (self, pattern): -# """Remove filenames from 'self.files' that match 'pattern'.""" -# self.debug_print("exclude_pattern: pattern=%s" % pattern) -# pattern_re = translate_pattern (pattern) -# for i in range (len (self.files)-1, -1, -1): -# if pattern_re.match (self.files[i]): -# self.debug_print("removing %s" % self.files[i]) -# del self.files[i] - - def recursive_exclude_pattern (self, dir, pattern=None): """Remove filenames from 'self.files' that are under 'dir' and whose basenames match 'pattern'. @@ -544,7 +536,7 @@ def exclude_pattern (self, files, pattern, anchor=1, prefix=None): def write_manifest (self): """Write the file list in 'self.files' (presumably as filled in by - 'find_defaults()' and 'read_template()') to the manifest file named + 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ self.execute(write_file, From 5f4a8d08d7029e5d4e199ddb50ca40743d836c2d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 01:06:02 +0000 Subject: [PATCH 0436/8469] Moved the code that prunes the file list after reading the manifest template into a new method 'prune_file_list()', called from 'get_file_list()' rather than 'read_manifest()' -- this keeps 'read_manifest()' more general. Deleted the redundant call to 'exclude_pattern()' in 'make_distribution()' -- this had the same intention as 'prune_file_list()', but was incomplete (only pruned the release tree, not the build tree) and in the wrong place (the prune wouldn't be reflected in the manifest file). --- command/sdist.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 26241353ac..5a78cc58d2 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -195,6 +195,9 @@ def get_file_list (self): if template_exists: self.read_template () + # Prune away the build and source distribution directories + self.prune_file_list() + # File list now complete -- sort it so that higher-level files # come first sortable_files = map (os.path.split, self.files) @@ -475,15 +478,21 @@ def read_template (self): # while loop over lines of template file - # Prune away the build and source distribution directories - build = self.get_finalized_command ('build') - self.exclude_pattern (self.files, None, prefix=build.build_base) + # read_template () + + def prune_file_list (self): + """Prune off branches that might slip into the file list as created + by 'read_template()', but really don't belong there: specifically, + the build tree (typically "build") and the release tree itself + (only an issue if we ran "sdist" previously with --keep-tree, or it + aborted). + """ + build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() + self.exclude_pattern (self.files, None, prefix=build.build_base) self.exclude_pattern (self.files, None, prefix=base_dir) - # read_template () - def select_pattern (self, files, pattern, anchor=1, prefix=None): """Select strings (presumably filenames) from 'files' that match @@ -612,10 +621,6 @@ def make_distribution (self): # done elsewhere. base_dir = self.distribution.get_fullname() - # Remove any files that match "base_dir" from the fileset -- we - # don't want to go distributing the distribution inside itself! - self.exclude_pattern (self.files, base_dir + "*") - self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create for fmt in self.formats: From 1e78c7432ebfb62f570e7c380f0011ac4eb37e58 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 01:22:48 +0000 Subject: [PATCH 0437/8469] Include setup.cfg in the list of default files to distribute. --- command/sdist.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 5a78cc58d2..48e9793e5e 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -233,6 +233,10 @@ def add_defaults (self): Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ + + # XXX name of setup script and config file should be taken + # programmatically from the Distribution object (except + # it doesn't have that capability... yet!) standards = [('README', 'README.txt'), 'setup.py'] for fn in standards: if type (fn) is TupleType: @@ -253,7 +257,7 @@ def add_defaults (self): else: self.warn ("standard file '%s' not found" % fn) - optional = ['test/test*.py'] + optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter (os.path.isfile, glob (pattern)) if files: From 4ea6b39b83cf4405bad1110e81ad7cd240fbecfe Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 8 Jun 2000 14:21:23 +0000 Subject: [PATCH 0438/8469] Harry Henry Gebel: fix '_format_changelog()' so it doesn't bomb if passed None. --- command/bdist_rpm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 0959ad8f90..7f58a1da6b 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -436,6 +436,8 @@ def _make_spec_file(self): def _format_changelog(self, changelog): """Format the changelog correctly and convert it to a list of strings """ + if not changelog: + return changelog new_changelog = [] for line in string.split(string.strip(changelog), '\n'): line = string.strip(line) From 524777aabcda3e1fafe2ce35eed3df0ac2be07ef Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 01:34:45 +0000 Subject: [PATCH 0439/8469] Fixed install directory for header files on Unix. --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 7176fab890..21d971b8d3 100644 --- a/command/install.py +++ b/command/install.py @@ -18,7 +18,7 @@ 'unix_prefix': { 'purelib': '$base/lib/python$py_version_short/site-packages', 'platlib': '$platbase/lib/python$py_version_short/site-packages', - 'headers': '$base/include/python/$py_version_short/$dist_name', + 'headers': '$base/include/python$py_version_short/$dist_name', 'scripts': '$base/bin', 'data' : '$base/share', }, From 1f24f7dc91a4145dafa4e7678bd50f47822730b5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 01:58:14 +0000 Subject: [PATCH 0440/8469] Bastian Kleineidam: added 'remove_tree()' function. Needed so that 'remove_tree()' can cooperate with 'mkpath()' in the maintenance of the PATH_CREATED cache: specifically, if a directory is created with 'mkpath()', later removed with 'remove_tree()', and 'mkpath()' is again requested to create it, then it would erroneously think the directory already existed, because it was in the PATH_CREATED cache. The patch (slightly tweaked by me) fixes that. --- dir_util.py | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/dir_util.py b/dir_util.py index 194183ae25..e5b24fe475 100644 --- a/dir_util.py +++ b/dir_util.py @@ -180,23 +180,38 @@ def copy_tree (src, dst, # copy_tree () +# Helper for remove_tree() +def _build_cmdtuple(path, cmdtuples): + for f in os.listdir(path): + real_f = os.path.join(path,f) + if os.path.isdir(real_f) and not os.path.islink(real_f): + _build_cmdtuple(real_f, cmdtuples) + else: + cmdtuples.append((os.remove, real_f)) + cmdtuples.append((os.rmdir, path)) + def remove_tree (directory, verbose=0, dry_run=0): """Recursively remove an entire directory tree. Any errors are ignored (apart from being reported to stdout if 'verbose' is true).""" - from shutil import rmtree - + global PATH_CREATED if verbose: print "removing '%s' (and everything under it)" % directory if dry_run: return - try: - rmtree(directory,1) - except (IOError, OSError), exc: - if verbose: - if exc.filename: - print "error removing %s: %s (%s)" % \ + cmdtuples = [] + _build_cmdtuple(directory, cmdtuples) + for cmd in cmdtuples: + try: + apply(cmd[0], (cmd[1],)) + # remove dir from cache if it's already there + if PATH_CREATED.has_key(cmd[1]): + del PATH_CREATED[cmd[1]] + except (IOError, OSError), exc: + if verbose: + if exc.filename: + print "error removing %s: %s (%s)" % \ (directory, exc.strerror, exc.filename) - else: - print "error removing %s: %s" % (directory, exc.strerror) + else: + print "error removing %s: %s" % (directory, exc.strerror) From c5c7d04269747c746f02bfaec075f2710e7cd309 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 02:16:46 +0000 Subject: [PATCH 0441/8469] Added 'grok_environment_error()' function to deal with the various forms that IOError and OSError can take (taken from core.py). --- util.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/util.py b/util.py index 575463843b..279f246726 100644 --- a/util.py +++ b/util.py @@ -154,3 +154,23 @@ def _subst (match, local_vars=local_vars): # subst_vars () +def grok_environment_error (exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError (IOError or + OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + does what it can to deal with exception objects that don't have a + filename (which happens when the error is due to a two-file operation, + such as 'rename()' or 'link()'. Returns the error message as a string + prefixed with 'prefix'. + """ + # check for Python 1.5.2-style {IO,OS}Error exception objects + if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): + if exc.filename: + error = prefix + "%s: %s" % (exc.filename, exc.strerror) + else: + # two-argument functions in posix module don't + # include the filename in the exception object! + error = prefix + "%s" % exc.strerror + else: + error = prefix + str(exc[-1]) + + return error From f0ceb6e0a9eda6011c72bf4b0e3c7ed52eddd271 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 02:17:45 +0000 Subject: [PATCH 0442/8469] Changed to use the new 'grok_environment_error()' function instead of muddling through IOError and OSError exception objects right here. --- core.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core.py b/core.py index 8bcf2a87d6..35afa84b7e 100644 --- a/core.py +++ b/core.py @@ -112,16 +112,7 @@ class found in 'cmdclass' is used in place of the default, which is except KeyboardInterrupt: raise SystemExit, "interrupted" except (IOError, os.error), exc: - # check for Python 1.5.2-style {IO,OS}Error exception objects - if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): - if exc.filename: - error = "error: %s: %s" % (exc.filename, exc.strerror) - else: - # two-argument functions in posix module don't - # include the filename in the exception object! - error = "error: %s" % exc.strerror - else: - error = "error: " + str(exc[-1]) + error = grok_environment_error(exc) if DEBUG: sys.stderr.write(error + "\n") From 3b27bed6ec2871c31925d0f22bfbb8203dc81a5c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 02:18:19 +0000 Subject: [PATCH 0443/8469] Changed 'remove_tree()' to use the new 'grok_environment_error()' function instead of muddling through IOError and OSError exception objects itself. --- dir_util.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dir_util.py b/dir_util.py index e5b24fe475..838a870d9b 100644 --- a/dir_util.py +++ b/dir_util.py @@ -193,9 +193,11 @@ def _build_cmdtuple(path, cmdtuples): def remove_tree (directory, verbose=0, dry_run=0): """Recursively remove an entire directory tree. Any errors are ignored - (apart from being reported to stdout if 'verbose' is true).""" - + (apart from being reported to stdout if 'verbose' is true). + """ + from distutils.util import grok_environment_error global PATH_CREATED + if verbose: print "removing '%s' (and everything under it)" % directory if dry_run: @@ -210,8 +212,5 @@ def remove_tree (directory, verbose=0, dry_run=0): del PATH_CREATED[cmd[1]] except (IOError, OSError), exc: if verbose: - if exc.filename: - print "error removing %s: %s (%s)" % \ - (directory, exc.strerror, exc.filename) - else: - print "error removing %s: %s" % (directory, exc.strerror) + print grok_environment_error( + exc, "error removing %s: " % directory) From dab81b6a1e465fdc70dc1051a6bb4b9440737555 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 02:19:30 +0000 Subject: [PATCH 0444/8469] Renamed PATH_CREATED to _path_created, on the grounds that it's private and mutable, rather than public and constant. --- dir_util.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dir_util.py b/dir_util.py index 838a870d9b..85f8a18d2c 100644 --- a/dir_util.py +++ b/dir_util.py @@ -13,7 +13,7 @@ # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating /foo/bar/baz" messages in dry-run mode -PATH_CREATED = {} +_path_created = {} # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently @@ -28,7 +28,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): summary of each mkdir to stdout. Return the list of directories actually created.""" - global PATH_CREATED + global _path_created # Detect a common bug -- name is None if type(name) is not StringType: @@ -44,7 +44,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): created_dirs = [] if os.path.isdir (name) or name == '': return created_dirs - if PATH_CREATED.get (name): + if _path_created.get (name): return created_dirs (head, tail) = os.path.split (name) @@ -64,7 +64,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join (head, d) - if PATH_CREATED.get (head): + if _path_created.get (head): continue if verbose: @@ -78,7 +78,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): raise DistutilsFileError, \ "could not create '%s': %s" % (head, exc[-1]) - PATH_CREATED[head] = 1 + _path_created[head] = 1 return created_dirs # mkpath () @@ -196,7 +196,7 @@ def remove_tree (directory, verbose=0, dry_run=0): (apart from being reported to stdout if 'verbose' is true). """ from distutils.util import grok_environment_error - global PATH_CREATED + global _path_created if verbose: print "removing '%s' (and everything under it)" % directory @@ -208,8 +208,8 @@ def remove_tree (directory, verbose=0, dry_run=0): try: apply(cmd[0], (cmd[1],)) # remove dir from cache if it's already there - if PATH_CREATED.has_key(cmd[1]): - del PATH_CREATED[cmd[1]] + if _path_created.has_key(cmd[1]): + del _path_created[cmd[1]] except (IOError, OSError), exc: if verbose: print grok_environment_error( From 0e20e9c1fe3d9a35d483d251ef45a9675a7b36d0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 17 Jun 2000 23:04:31 +0000 Subject: [PATCH 0445/8469] Pulled the MSVC++-specific hackery out to a new method, 'prelink_hook()', and added (empty) 'precompile_hook()' for symmetry. One can envision a much more elaborate hook mechanism, but this looks like it'll do for now. --- command/build_ext.py | 99 ++++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 36 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 53a265cc2e..3d6d17c8d8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -160,7 +160,7 @@ def run (self): # 'self.extensions', as supplied by setup.py, is a list of # Extension instances. See the documentation for Extension (in - # distutils.core) for details. + # distutils.extension) for details. # # For backwards compatibility with Distutils 0.8.2 and earlier, we # also allow the 'extensions' list to be a list of tuples: @@ -395,6 +395,11 @@ def build_extensions (self): if os.environ.has_key('CFLAGS'): extra_args.extend(string.split(os.environ['CFLAGS'])) + # Run any platform/compiler-specific hooks needed before + # compiling (currently none, but any hypothetical subclasses + # might find it useful to override this). + self.precompile_hook() + objects = self.compiler.compile (sources, output_dir=self.build_temp, #macros=macros, @@ -409,41 +414,9 @@ def build_extensions (self): objects.extend (ext.extra_objects) extra_args = ext.extra_link_args - # XXX this is a kludge! Knowledge of specific compilers or - # platforms really doesn't belong here; in an ideal world, the - # CCompiler interface would provide access to everything in a - # compiler/linker system needs to build Python extensions, and - # we would just do everything nicely and cleanly through that - # interface. However, this is a not an ideal world and the - # CCompiler interface doesn't handle absolutely everything. - # Thus, kludges like this slip in occasionally. (This is no - # excuse for committing more platform- and compiler-specific - # kludges; they are to be avoided if possible!) - if self.compiler.compiler_type == 'msvc': - def_file = ext.export_symbol_file - if def_file is None: - source_dir = os.path.dirname (sources[0]) - ext_base = (string.split (ext.name, '.'))[-1] - def_file = os.path.join (source_dir, "%s.def" % ext_base) - if not os.path.exists (def_file): - def_file = None - - if def_file is not None: - extra_args.append ('/DEF:' + def_file) - else: - modname = string.split (ext.name, '.')[-1] - extra_args.append('/export:init%s'%modname) - - # The MSVC linker generates unneeded .lib and .exp files, - # which cannot be suppressed by any linker switches. So - # make sure they are generated in the temporary build - # directory. - implib_file = os.path.join ( - self.build_temp, - self.get_ext_libname (ext.name)) - extra_args.append ('/IMPLIB:' + implib_file) - self.mkpath (os.path.dirname (implib_file)) - # if MSVC + # Run any platform/compiler-specific hooks needed between + # compiling and linking (currently needed only on Windows). + self.prelink_hook() self.compiler.link_shared_object ( objects, ext_filename, @@ -456,6 +429,55 @@ def build_extensions (self): # build_extensions () + # -- Hooks --------------------------------------------------------- + + def precompile_hook (self): + pass + + def prelink_hook (self): + + # XXX this is a kludge! Knowledge of specific compilers or + # platforms really doesn't belong here; in an ideal world, the + # CCompiler interface would provide access to everything in a + # compiler/linker system needs to build Python extensions, and + # we would just do everything nicely and cleanly through that + # interface. However, this is a not an ideal world and the + # CCompiler interface doesn't handle absolutely everything. + # Thus, kludges like this slip in occasionally. (This is no + # excuse for committing more platform- and compiler-specific + # kludges; they are to be avoided if possible!) + if self.compiler.compiler_type == 'msvc': + def_file = ext.export_symbol_file + if def_file is None: + source_dir = os.path.dirname (sources[0]) + ext_base = (string.split (ext.name, '.'))[-1] + def_file = os.path.join (source_dir, "%s.def" % ext_base) + if not os.path.exists (def_file): + def_file = None + + if def_file is not None: + extra_args.append ('/DEF:' + def_file) + else: + modname = string.split (ext.name, '.')[-1] + extra_args.append('/export:init%s'%modname) + + # The MSVC linker generates unneeded .lib and .exp files, + # which cannot be suppressed by any linker switches. So + # make sure they are generated in the temporary build + # directory. + implib_file = os.path.join ( + self.build_temp, + self.get_ext_libname (ext.name)) + extra_args.append ('/IMPLIB:' + implib_file) + self.mkpath (os.path.dirname (implib_file)) + # if MSVC + + # prelink_hook () + + + # -- Name generators ----------------------------------------------- + # (extension names, filenames, whatever) + def get_ext_fullname (self, ext_name): if self.package is None: return ext_name @@ -463,6 +485,11 @@ def get_ext_fullname (self, ext_name): return self.package + '.' + ext_name def get_ext_filename (self, ext_name): + """Convert the name of an extension (eg. "foo.bar") into the name + of the file from which it will be loaded (eg. "foo/bar.so", or + "foo\bar.pyd"). + """ + from distutils import sysconfig ext_path = string.split (ext_name, '.') # extensions in debug_mode are named 'module_d.pyd' under windows From 895819ab90dd0a4851f356f2153b68f4e2888b9d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 18 Jun 2000 15:45:55 +0000 Subject: [PATCH 0446/8469] 'get_platform()' now just returns 'sys.platform' on all platforms. --- util.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/util.py b/util.py index 279f246726..74df8aa6a4 100644 --- a/util.py +++ b/util.py @@ -44,18 +44,10 @@ def extend (list, new_list): def get_platform (): """Return a string (suitable for tacking onto directory names) that - identifies the current platform. Under Unix, identifies both the OS - and hardware architecture, e.g. "linux-i586", "solaris-sparc", - "irix-mips". For Windows and Mac OS, just returns 'sys.platform' -- - i.e. "???" or "???".""" - - if os.name == 'posix': - (OS, _, rel, _, arch) = os.uname() - return "%s%c-%s" % (string.lower (OS), rel[0], string.lower (arch)) - else: - return sys.platform - -# get_platform() + identifies the current platform. Currently, this is just + 'sys.platform'. + """ + return sys.platform def convert_path (pathname): From 2591d3a3e93d7f39325d7e0e707f9457c7a1631a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 02:58:46 +0000 Subject: [PATCH 0447/8469] Added 'preprocess()' method to CCompiler interface, and implemented it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and whatever other compiler classes are lurking out there, waiting to be checked in). --- ccompiler.py | 16 ++++++++++++++++ unixccompiler.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index b146f89011..53d4fa5301 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -414,6 +414,22 @@ def _need_link (self, objects, output_file): # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) + def preprocess (self, + source, + output_file=None, + macros=None, + include_dirs=None, + extra_preargs=None, + extra_postargs=None): + """Preprocess a single C/C++ source file, named in 'source'. + Output will be written to file named 'output_file', or stdout if + 'output_file' not supplied. 'macros' is a list of macro + definitions as for 'compile()', which will augment the macros set + with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a + list of directory names that will be added to the default list. + """ + pass + def compile (self, sources, output_dir=None, diff --git a/unixccompiler.py b/unixccompiler.py index 4d38e4d8c1..47d8ad6325 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -21,6 +21,7 @@ from types import * from copy import copy from distutils import sysconfig +from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options from distutils.errors import \ @@ -104,6 +105,37 @@ def __init__ (self, # __init__ () + def preprocess (self, + source, + output_file=None, + macros=None, + include_dirs=None, + extra_preargs=None, + extra_postargs=None): + + (_, macros, include_dirs) = \ + self._fix_compile_args (None, macros, include_dirs) + pp_opts = gen_preprocess_options (macros, include_dirs) + cc_args = ['-E'] + pp_opts + if output_file: + cc_args.extend(['-o', output_file]) + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs: + extra_postargs.extend(extra_postargs) + + # We need to preprocess: either we're being forced to, or the + # source file is newer than the target (or the target doesn't + # exist). + if self.force or (output_file and newer(source, output_file)): + if output_file: + self.mkpath(os.path.dirname(output_file)) + try: + self.spawn ([self.cc] + cc_args) + except DistutilsExecError, msg: + raise CompileError, msg + + def compile (self, sources, output_dir=None, From 90843282f35eb7ff25172ea35d52d77e5135d56e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 02:59:14 +0000 Subject: [PATCH 0448/8469] Oops, import 'grok_environment_error()'. --- core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core.py b/core.py index 35afa84b7e..4c982a07ad 100644 --- a/core.py +++ b/core.py @@ -13,6 +13,7 @@ import sys, os from types import * from distutils.errors import * +from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution From ebbf910d513041fe74deacf0244b1b79b2bad2f5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:00:50 +0000 Subject: [PATCH 0449/8469] Fleshed out and added a bunch of useful stuff, notably 'check_func()', 'try_cpp()', 'search_cpp()', and 'check_header()'. This is enough that the base config is actually useful for implementing a real config command, specifically one for mxDateTime. --- command/config.py | 208 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 176 insertions(+), 32 deletions(-) diff --git a/command/config.py b/command/config.py index cad75bcb27..570f71a5c1 100644 --- a/command/config.py +++ b/command/config.py @@ -13,7 +13,7 @@ __revision__ = "$Id$" -import os, string +import sys, os, string, re from distutils.core import Command from distutils.errors import DistutilsExecError @@ -40,6 +40,11 @@ class config (Command): "external C libraries to link with"), ('library-dirs=', 'L', "directories to search for external C libraries"), + + ('noisy', None, + "show every action (compile, link, run, ...) taken"), + ('dump-source', None, + "dump generated source files before attempting to compile them"), ] @@ -55,6 +60,14 @@ def initialize_options (self): self.libraries = None self.library_dirs = None + # maximal output for now + self.noisy = 1 + self.dump_source = 1 + + # list of temporary files generated along-the-way that we have + # to clean at some point + self.temp_files = [] + def finalize_options (self): pass @@ -75,7 +88,7 @@ def _check_compiler (self): from distutils.ccompiler import CCompiler, new_compiler if not isinstance(self.compiler, CCompiler): self.compiler = new_compiler (compiler=self.compiler, - verbose=self.verbose, # for now + verbose=self.noisy, dry_run=self.dry_run, force=1) if self.include_dirs: @@ -86,25 +99,48 @@ def _check_compiler (self): self.compiler.set_library_dirs(self.library_dirs) - def _gen_temp_sourcefile (self, body, lang): + def _gen_temp_sourcefile (self, body, headers, lang): filename = "_configtest" + LANG_EXT[lang] file = open(filename, "w") + if headers: + for header in headers: + file.write("#include <%s>\n" % header) + file.write("\n") file.write(body) + if body[-1] != "\n": + file.write("\n") file.close() return filename - def _compile (self, body, lang): - src = self._gen_temp_sourcefile(body, lang) - (obj,) = self.compiler.compile([src]) + def _preprocess (self, body, headers, lang): + src = self._gen_temp_sourcefile(body, headers, lang) + out = "_configtest.i" + self.temp_files.extend([src, out]) + self.compiler.preprocess(src, out) + return (src, out) + + def _compile (self, body, headers, lang): + src = self._gen_temp_sourcefile(body, headers, lang) + if self.dump_source: + dump_file(src, "compiling '%s':" % src) + (obj,) = self.compiler.object_filenames([src]) + self.temp_files.extend([src, obj]) + self.compiler.compile([src]) return (src, obj) - def _link (self, body, lang): - (src, obj) = self._compile(body, lang) - exe = os.path.splitext(os.path.basename(src))[0] - self.compiler.link_executable([obj], exe) - return (src, obj, exe) + def _link (self, body, headers, libraries, library_dirs, lang): + (src, obj) = self._compile(body, headers, lang) + prog = os.path.splitext(os.path.basename(src))[0] + self.temp_files.append(prog) # XXX should be prog + exe_ext + self.compiler.link_executable([obj], prog, + libraries=libraries, + library_dirs=library_dirs) + return (src, obj, prog) def _clean (self, *filenames): + if not filenames: + filenames = self.temp_files + self.temp_files = [] self.announce("removing: " + string.join(filenames)) for filename in filenames: try: @@ -113,10 +149,6 @@ def _clean (self, *filenames): pass - # XXX no 'try_cpp()' or 'search_cpp()' since the CCompiler interface - # does not provide access to the preprocessor. This is an oversight - # that should be fixed. - # XXX these ignore the dry-run flag: what to do, what to do? even if # you want a dry-run build, you still need some sort of configuration # info. My inclination is to make it up to the real config command to @@ -125,56 +157,168 @@ def _clean (self, *filenames): # return either true or false from all the 'try' methods, neither of # which is correct. - def try_compile (self, body, lang="c"): - """Try to compile a source file that consists of the text in 'body' - (a multi-line string). Return true on success, false - otherwise. + # XXX need access to the header search path and maybe default macros. + + def try_cpp (self, body=None, headers=None, lang="c"): + """Construct a source file from 'body' (a string containing lines + of C/C++ code) and 'headers' (a list of header files to include) + and run it through the preprocessor. Return true if the + preprocessor succeeded, false if there were any errors. + ('body' probably isn't of much use, but what the heck.) """ from distutils.ccompiler import CompileError self._check_compiler() + ok = 1 try: - (src, obj) = self._compile(body, lang) + self._preprocess(body, headers, lang) + except CompileError: + ok = 0 + + self._clean() + return ok + + def search_cpp (self, pattern, body=None, headers=None, lang="c"): + """Construct a source file (just like 'try_cpp()'), run it through + the preprocessor, and return true if any line of the output matches + 'pattern'. 'pattern' should either be a compiled regex object or a + string containing a regex. If both 'body' and 'headers' are None, + preprocesses an empty file -- which can be useful to determine the + symbols the preprocessor and compiler set by default. + """ + + self._check_compiler() + (src, out) = self._preprocess(body, headers, lang) + + if type(pattern) is StringType: + pattern = re.compile(pattern) + + file = open(out) + match = 0 + while 1: + line = file.readline() + if line == '': + break + if pattern.search(pattern): + match = 1 + break + + file.close() + self._clean() + return match + + def try_compile (self, body, headers=None, lang="c"): + """Try to compile a source file built from 'body' and 'headers'. + Return true on success, false otherwise. + """ + from distutils.ccompiler import CompileError + self._check_compiler() + try: + self._compile(body, headers, lang) ok = 1 except CompileError: ok = 0 self.announce(ok and "success!" or "failure.") - self._clean(src, obj) + self._clean() return ok - def try_link (self, body, lang="c"): - """Try to compile and link a source file (to an executable) that - consists of the text in 'body' (a multi-line string). Return true - on success, false otherwise. + def try_link (self, + body, headers=None, + libraries=None, library_dirs=None, + lang="c"): + """Try to compile and link a source file, built from 'body' and + 'headers', to executable form. Return true on success, false + otherwise. """ from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: - (src, obj, exe) = self._link(body, lang) + self._link(body, headers, libraries, library_dirs, lang) ok = 1 except (CompileError, LinkError): ok = 0 self.announce(ok and "success!" or "failure.") - self._clean(src, obj, exe) + self._clean() return ok - def try_run (self, body, lang="c"): - """Try to compile, link to an executable, and run a program that - consists of the text in 'body'. Return true on success, false + def try_run (self, + body, headers=None, + libraries=None, library_dirs=None, + lang="c"): + """Try to compile, link to an executable, and run a program + built from 'body' and 'headers'. Return true on success, false otherwise. """ from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: - (src, obj, exe) = self._link(body, lang) + self._link(body, headers, libraries, library_dirs, lang) self.spawn([exe]) ok = 1 except (CompileError, LinkError, DistutilsExecError): ok = 0 self.announce(ok and "success!" or "failure.") - self._clean(src, obj, exe) + self._clean() return ok + + # -- High-level methods -------------------------------------------- + # (these are the ones that are actually likely to be useful + # when implementing a real-world config command!) + + def check_func (self, func, headers=None, + libraries=None, library_dirs=None, + decl=0, call=0): + + """Determine if function 'func' is available by constructing a + source file that refers to 'func', and compiles and links it. + If everything succeeds, returns true; otherwise returns false. + + The constructed source file starts out by including the header + files listed in 'headers'. If 'decl' is true, it then declares + 'func' (as "int func()"); you probably shouldn't supply 'headers' + and set 'decl' true in the same call, or you might get errors about + a conflicting declarations for 'func'. Finally, the constructed + 'main()' function either references 'func' or (if 'call' is true) + calls it. 'libraries' and 'library_dirs' are used when + linking. + """ + + self._check_compiler() + body = [] + if decl: + body.append("int %s ();" % func) + body.append("int main () {") + if call: + body.append(" %s();" % func) + else: + body.append(" %s;" % func) + body.append("}") + body = string.join(body, "\n") + "\n" + + return self.try_link(body, headers, libraries, library_dirs) + + # check_func () + + def check_header (self, header, lang="c"): + """Determine if the system header file named by 'header_file' + exists and can be found by the preprocessor; return true if so, + false otherwise. + """ + return self.try_cpp(headers=[header]) + + # class config + + +def dump_file (filename, head=None): + if head is None: + print filename + ":" + else: + print head + + file = open(filename) + sys.stdout.write(file.read()) + file.close() From ed71d7548070c87c61c8ac7b2ca5f1f4479d2622 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:09:02 +0000 Subject: [PATCH 0450/8469] Rene Liebscher: when fixing up directories with an alternate root, include 'install_headers'. --- command/install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 21d971b8d3..5e8ade8d80 100644 --- a/command/install.py +++ b/command/install.py @@ -272,7 +272,8 @@ def finalize_options (self): # If a new root directory was supplied, make all the installation # dirs relative to it. if self.root is not None: - for name in ('lib', 'purelib', 'platlib', 'scripts', 'data'): + for name in ('lib', 'purelib', 'platlib', + 'scripts', 'data', 'headers'): attr = "install_" + name new_val = change_root (self.root, getattr (self, attr)) setattr (self, attr, new_val) From db2316094f167954780793b08eeb1a62dbad543c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:13:51 +0000 Subject: [PATCH 0451/8469] Build the 'outfiles' list so 'get_outputs()' has something to return. (Bug spotted and originally fixed by Rene Liebscher; fix redone by me.) --- command/install_data.py | 10 ++++++---- command/install_headers.py | 10 +++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index 5481dabe66..f8ed0a7540 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -25,7 +25,7 @@ class install_data (Command): def initialize_options (self): self.install_dir = None - self.outfiles = None + self.outfiles = [] self.root = None self.data_files = self.distribution.data_files @@ -40,7 +40,8 @@ def run (self): for f in self.data_files: if type(f) == StringType: # its a simple file, so copy it - self.copy_file(f, self.install_dir) + out = self.copy_file(f, self.install_dir) + self.outfiles.append(out) else: # its a tuple with path to install to and a list of files dir = f[0] @@ -50,10 +51,11 @@ def run (self): dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: - self.copy_file(data, dir) + out = self.copy_file(data, dir) + self.outfiles.append(out) def get_inputs (self): return self.data_files or [] def get_outputs (self): - return self.outfiles or [] + return self.outfiles diff --git a/command/install_headers.py b/command/install_headers.py index 33edb945dd..afcc887a69 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" +import os from distutils.core import Command @@ -21,6 +22,7 @@ class install_headers (Command): def initialize_options (self): self.install_dir = None + self.outfiles = [] def finalize_options (self): self.set_undefined_options('install', @@ -33,8 +35,14 @@ def run (self): self.mkpath(self.install_dir) for header in headers: - self.copy_file(header, self.install_dir) + out = self.copy_file(header, self.install_dir) + self.outfiles.append(out) + def get_inputs (self): + return self.distribution.headers or [] + + def get_outputs (self): + return self.outfiles # run() # class install_headers From f888626d57eb7caa92c9b814e81802e2e2fd24c4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:14:27 +0000 Subject: [PATCH 0452/8469] Delete spurious comment. --- command/install_headers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/install_headers.py b/command/install_headers.py index afcc887a69..991985b4ad 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -43,6 +43,5 @@ def get_inputs (self): def get_outputs (self): return self.outfiles - # run() # class install_headers From 88259b3d075b18c55429fd5c2413c2e08cbb8a56 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:29:57 +0000 Subject: [PATCH 0453/8469] Fix inspired by Rene Liebscher: if setup script is newer than the manifest, regenerate the manifest. --- command/sdist.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 48e9793e5e..ded8ec2269 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -173,14 +173,37 @@ def get_file_list (self): reading the manifest, or just using the default file set -- it all depends on the user's options and the state of the filesystem. """ + + # If we have a manifest template, see if it's newer than the + # manifest; if so, we'll regenerate the manifest. template_exists = os.path.isfile (self.template) if template_exists: template_newer = newer (self.template, self.manifest) + # The contents of the manifest file almost certainly depend on the + # setup script as well as the manifest template -- so if the setup + # script is newer than the manifest, we'll regenerate the manifest + # from the template. (Well, not quite: if we already have a + # manifest, but there's no template -- which will happen if the + # developer elects to generate a manifest some other way -- then we + # can't regenerate the manifest, so we don't.) + setup_newer = newer(sys.argv[0], self.manifest) + + # cases: + # 1) no manifest, template exists: generate manifest + # (covered by 2a: no manifest == template newer) + # 2) manifest & template exist: + # 2a) template or setup script newer than manifest: + # regenerate manifest + # 2b) manifest newer than both: + # do nothing (unless --force or --manifest-only) + # 3) manifest exists, no template: + # do nothing (unless --force or --manifest-only) + # 4) no manifest, no template: generate w/ warning ("defaults only") + # Regenerate the manifest if necessary (or if explicitly told to) - if ((template_exists and template_newer) or - self.force_manifest or - self.manifest_only): + if ((template_exists and (template_newer or setup_newer)) or + self.force_manifest or self.manifest_only): if not template_exists: self.warn (("manifest template '%s' does not exist " + From bed42c8495831545d7e190a1221bb59cacf441f3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 21 Jun 2000 03:33:03 +0000 Subject: [PATCH 0454/8469] Implementation of the CCompiler class for Cygwin and Mingw32, ie. the two major ports of GCC to Windows. Contributed by Rene Liebscher, and quite untested by me. Apparently requires tweaking Python's installed config.h and adding a libpython.a to build extensions. --- cygwinccompiler.py | 181 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 cygwinccompiler.py diff --git a/cygwinccompiler.py b/cygwinccompiler.py new file mode 100644 index 0000000000..cc2ed5db66 --- /dev/null +++ b/cygwinccompiler.py @@ -0,0 +1,181 @@ +"""distutils.cygwinccompiler + +Contains the CygwinCCompiler class, a subclass of UnixCCompiler that handles +the Gnu Win32 C compiler. +It also contains the Mingw32CCompiler class which handles the mingw32 compiler +(same as cygwin in no-cygwin mode.) + +""" + +# created 2000/05/05, Rene Liebscher + +__revision__ = "$Id$" + +import os,sys,string,tempfile +from distutils import sysconfig +from distutils.unixccompiler import UnixCCompiler + +# Because these compilers aren't configured in Python's config.h file by default +# we should at least warn the user if he used this unmodified version. +def check_if_config_h_is_gcc_ready(): + """ checks, if the gcc-compiler is mentioned in config.h + if it is not, compiling probably doesn't work """ + from distutils import sysconfig + import string,sys + try: + # It would probably better to read single lines to search. + # But we do this only once, and it is fast enough + f=open(sysconfig.get_config_h_filename()) + s=f.read() + f.close() + try: + string.index(s,"__GNUC__") # is somewhere a #ifdef __GNUC__ or something similar + except: + sys.stderr.write ("warning: Python's config.h doesn't seem to support your compiler.\n") + except: # unspecific error => ignore + pass + + +# This is called when the module is imported, so we make this check only once +check_if_config_h_is_gcc_ready() + + +# XXX Things not currently handled: +# * see UnixCCompiler + +class CygwinCCompiler (UnixCCompiler): + + compiler_type = 'cygwin' + + def __init__ (self, + verbose=0, + dry_run=0, + force=0): + + UnixCCompiler.__init__ (self, verbose, dry_run, force) + + # our compiler uses other names + self.cc='gcc' + self.ld_shared='dllwrap' + self.ldflags_shared=[] + + # some variables to manage the differences between cygwin and mingw32 + self.dllwrap_options=["--target=i386-cygwin32"] + # specification of entry point is not necessary + + self.dll_additional_libraries=[ + # cygwin shouldn't need msvcrt, but without the dll's will crash + # perhaps something about initialization (Python uses it, too) + # mingw32 needs it in all cases + "msvcrt" + ] + + # __init__ () + + def link_shared_object (self, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + if libraries==None: + libraries=[] + + python_library=["python"+str(sys.hexversion>>24)+str((sys.hexversion>>16)&0xff)] + libraries=libraries+python_library+self.dll_additional_libraries + + # if you don't need the def-file afterwards, it is + # better to use for it tempfile.mktemp() as its name + # (unix-style compilers don't like backslashes in filenames) + win_dll_def_file=string.replace(tempfile.mktemp(),"\\","/") + #win_dll_def_file=output_filename[:-len(self.shared_lib_extension)]+".def" + #win_dll_exp_file=output_filename[:-len(self.shared_lib_extension)]+".exp" + #win_dll_lib_file=output_filename[:-len(self.shared_lib_extension)]+".a" + + # Make .def file + # (It would probably better to check if we really need this, but for this we had to + # insert some unchanged parts of UnixCCompiler, and this is not what I want.) + f=open(win_dll_def_file,"w") + f.write("EXPORTS\n") # intro + # always export a function "init"+module_name + if not debug: + f.write("init"+os.path.basename(output_filename)[:-len(self.shared_lib_extension)]+"\n") + else: # in debug mode outfile_name is something like XXXXX_d.pyd + f.write("init"+os.path.basename(output_filename)[:-(len(self.shared_lib_extension)+2)]+"\n") + # if there are more symbols to export + # insert code here to write them in f + if export_symbols!=None: + for sym in export_symbols: + f.write(sym+"\n") + f.close() + + if extra_preargs==None: + extra_preargs=[] + + extra_preargs=extra_preargs+[ + #"--verbose", + #"--output-exp",win_dll_exp_file, + #"--output-lib",win_dll_lib_file, + "--def",win_dll_def_file + ]+ self.dllwrap_options + + # who wants symbols and a many times greater output file + # should explicitely switch the debug mode on + # otherwise we let dllwrap strip the outputfile + # (On my machine unstripped_file=stripped_file+254KB + # 10KB < stripped_file < ??100KB ) + if not debug: + extra_preargs=extra_preargs+["-s"] + + try: + UnixCCompiler.link_shared_object(self, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + None, # export_symbols, we do this with our def-file + debug, + extra_preargs, + extra_postargs) + finally: + # we don't need the def-file anymore + os.remove(win_dll_def_file) + + # link_shared_object () + +# class CygwinCCompiler + +# the same as cygwin plus some additional parameters +class Mingw32CCompiler (CygwinCCompiler): + + compiler_type = 'mingw32' + + def __init__ (self, + verbose=0, + dry_run=0, + force=0): + + CygwinCCompiler.__init__ (self, verbose, dry_run, force) + + self.ccflags = self.ccflags + ["-mno-cygwin"] + self.dllwrap_options=[ + # mingw32 doesn't really need 'target' + # and cygwin too (it seems, it is enough + # to specify a different entry point) + #"--target=i386-mingw32", + "--entry","_DllMain@12" + ] + # no additional libraries need + # (only msvcrt, which is already added by CygwinCCompiler) + + # __init__ () + +# class Mingw32CCompiler From ae6b225478590a6a5d5462307ff1bb565980619e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 23 Jun 2000 01:42:40 +0000 Subject: [PATCH 0455/8469] Bastian Kleineidam: 'copy_file()' now returns the output filename, rather than a boolean indicating whether it did the copy. --- file_util.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/file_util.py b/file_util.py index a73db42b54..2d0148f3f1 100644 --- a/file_util.py +++ b/file_util.py @@ -96,9 +96,8 @@ def copy_file (src, dst, on other systems, uses '_copy_file_contents()' to copy file contents. - Return true if the file was copied (or would have been copied), - false otherwise (ie. 'update' was true and the destination is - up-to-date).""" + Return the name of the destination file, whether it was actually + copied or not.""" # XXX if the destination file already exists, we clobber it if # copying, but blow up if linking. Hmmm. And I don't know what @@ -123,7 +122,7 @@ def copy_file (src, dst, if update and not newer (src, dst): if verbose: print "not copying %s (output up-to-date)" % src - return 0 + return dst try: action = _copy_action[link] @@ -137,7 +136,7 @@ def copy_file (src, dst, print "%s %s -> %s" % (action, src, dst) if dry_run: - return 1 + return dst # On a Mac, use the native file copy routine if os.name == 'mac': @@ -171,7 +170,7 @@ def copy_file (src, dst, if preserve_mode: os.chmod (dst, S_IMODE (st[ST_MODE])) - return 1 + return dst # copy_file () From 0b55a059cd131e263c36fb412c5556f9e32d2437 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 00:18:24 +0000 Subject: [PATCH 0456/8469] Revised docstring so 'sources' isn't necessarily all C/C++ files (to accomodate SWIG interface files, resource files, etc.). --- extension.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extension.py b/extension.py index 9d2a6fa15c..f0f68b9390 100644 --- a/extension.py +++ b/extension.py @@ -31,9 +31,11 @@ class Extension: the full name of the extension, including any packages -- ie. *not* a filename or pathname, but Python dotted name sources : [string] - list of C/C++ source filenames, relative to the distribution - root (where the setup script lives), in Unix form - (slash-separated) for portability + list of source filenames, relative to the distribution root + (where the setup script lives), in Unix form (slash-separated) + for portability. Source files may be C, C++, SWIG (.i), + platform-specific resource files, or whatever else is recognized + by the "build_ext" command as source for a Python extension. include_dirs : [string] list of directories to search for C/C++ header files (in Unix form for portability) From 1f3bafb167859eb32d5a0fcec63c92bc72e4e65a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 00:19:35 +0000 Subject: [PATCH 0457/8469] Experimental, completely untested SWIG support. --- command/build_ext.py | 79 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 5 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 3d6d17c8d8..f3ff157183 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -367,11 +367,12 @@ def build_extensions (self): else: self.announce ("building '%s' extension" % ext.name) - # First step: compile the source code to object files. This - # drops the object files in the current directory, regardless - # of where the source is (may be a bad thing, but that's how a - # Makefile.pre.in-based system does it, so at least there's a - # precedent!) + # First, scan the sources for SWIG definition files (.i), run + # SWIG on 'em to create .c files, and modify the sources list + # accordingly. + sources = self.swig_sources(sources) + + # Next, compile the source code to object files. # XXX not honouring 'define_macros' or 'undef_macros' -- the # CCompiler API needs to change to accomodate this, and I @@ -429,6 +430,74 @@ def build_extensions (self): # build_extensions () + def swig_sources (self, sources): + + """Walk the list of source files in 'sources', looking for SWIG + interface (.i) files. Run SWIG on all that are found, and + return a modified 'sources' list with SWIG source files replaced + by the generated C (or C++) files. + """ + + new_sources = [] + swig_sources = [] + swig_targets = {} + + # XXX this drops generated C files into the source tree, which + # is fine for developers who want to distribute the generated + # source -- but there should be an option to put SWIG output in + # the temp dir. + + for source in sources: + (base, ext) = os.path.splitext(source) + if ext in self.swig_ext(): + new_sources.append(base + ".c") # umm, what if it's C++? + swig_files.append(source) + swig_targets[source] = new_sources[-1] + else: + new_sources.append(source) + + if not swig_files: + return new_sources + + swig = self.find_swig() + swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] # again, C++?!? + + for source in swig_sources: + self.announce ("swigging %s to %s" % (src, obj)) + self.spawn(swig_cmd + ["-o", swig_targets[source], source]) + + return new_sources + + # swig_sources () + + def find_swig (self): + """Return the name of the SWIG executable. On Unix, this is + just "swig" -- it should be in the PATH. Tries a bit harder on + Windows. + """ + + if os.name == "posix": + return "swig" + elif os.name == "nt": + + # Look for SWIG in its standard installation directory on + # Windows (or so I presume!). If we find it there, great; + # if not, act like Unix and assume it's in the PATH. + for vers in ("1.3", "1.2", "1.1"): + fn = os.path.join("c:\\swig%s" % vers, "swig.exe") + if os.path.isfile (fn): + return fn + else: + return "swig.exe" + + else: + raise DistutilsPlatformError, \ + ("I don't know how to find (much less run) SWIG " + "on platform '%s'") % os.name + + # find_swig () + + # -- Hooks --------------------------------------------------------- def precompile_hook (self): From 9285ec887624587ca83a53445ce64b0bafd34ea9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 00:23:20 +0000 Subject: [PATCH 0458/8469] Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch. --- archive_util.py | 8 ++++---- ccompiler.py | 30 ++++++++++++++++++++---------- command/bdist.py | 29 +++++++++++++++-------------- command/build.py | 3 ++- command/build_clib.py | 3 ++- command/sdist.py | 4 ++-- dist.py | 37 +++++++++++++++++++++++++++---------- 7 files changed, 72 insertions(+), 42 deletions(-) diff --git a/archive_util.py b/archive_util.py index 27aa8c0bfc..08a3c8310c 100644 --- a/archive_util.py +++ b/archive_util.py @@ -110,10 +110,10 @@ def visit (z, dirname, names): ARCHIVE_FORMATS = { - 'gztar': (make_tarball, [('compress', 'gzip')],"gzipped tar-file"), - 'bztar': (make_tarball, [('compress', 'bzip2')],"bzip2-ed tar-file"), - 'ztar': (make_tarball, [('compress', 'compress')],"compressed tar-file"), - 'tar': (make_tarball, [('compress', None)],"uncompressed tar-file"), + 'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"), + 'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"), + 'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"), + 'tar': (make_tarball, [('compress', None)], "uncompressed tar file"), 'zip': (make_zipfile, [],"zip-file") } diff --git a/ccompiler.py b/ccompiler.py index 53d4fa5301..5be8c25a14 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -742,20 +742,30 @@ def mkpath (self, name, mode=0777): # Map compiler types to (module_name, class_name) pairs -- ie. where to # find the code that implements an interface to this compiler. (The module # is assumed to be in the 'distutils' package.) -compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler',"standard UNIX-style compiler"), - 'msvc': ('msvccompiler', 'MSVCCompiler',"Microsoft Visual C++"), - 'cygwin': ('cygwinccompiler', 'CygwinCCompiler',"Cygwin-Gnu-Win32-C-Compiler"), - 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',"MinGW32-C-Compiler (or cygwin in this mode)"), +compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler', + "standard UNIX-style compiler"), + 'msvc': ('msvccompiler', 'MSVCCompiler', + "Microsoft Visual C++"), + 'cygwin': ('cygwinccompiler', 'CygwinCCompiler', + "Cygwin port of GNU C Compiler for Win32"), + 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', + "Mingw32 port of GNU C Compiler for Win32"), } -# prints all possible arguments to --compiler def show_compilers(): + """Print list of available compilers (used by the "--help-compiler" + options to "build", "build_ext", "build_clib"). + """ + # XXX this "knows" that the compiler option it's describing is + # "--compiler", which just happens to be the case for the three + # commands that use it. from distutils.fancy_getopt import FancyGetopt - list_of_compilers=[] + compilers = [] for compiler in compiler_class.keys(): - list_of_compilers.append(("compiler="+compiler,None,compiler_class[compiler][2])) - list_of_compilers.sort() - pretty_printer=FancyGetopt(list_of_compilers) + compilers.append(("compiler="+compiler, None, + compiler_class[compiler][2])) + compilers.sort() + pretty_printer = FancyGetopt(compilers) pretty_printer.print_help("List of available compilers:") @@ -783,7 +793,7 @@ def new_compiler (plat=None, if compiler is None: compiler = default_compiler[plat] - (module_name, class_name,long_description) = compiler_class[compiler] + (module_name, class_name, long_description) = compiler_class[compiler] except KeyError: msg = "don't know how to compile C/C++ code on platform '%s'" % plat if compiler is not None: diff --git a/command/bdist.py b/command/bdist.py index 66ef1133f3..164699362d 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -21,7 +21,7 @@ class bdist (Command): user_options = [('bdist-base=', 'b', "temporary directory for creating built distributions"), ('formats=', None, - "formats for distribution"), + "formats for distribution (comma-separated list)"), ] # The following commands do not take a format option from bdist @@ -32,22 +32,24 @@ class bdist (Command): default_format = { 'posix': 'gztar', 'nt': 'zip', } - format_command = { 'gztar': ('bdist_dumb',"gzipped tar-file"), - 'bztar': ('bdist_dumb',"bzip2-ed tar-file"), - 'ztar': ('bdist_dumb',"compressed tar-file"), - 'tar': ('bdist_dumb',"tar-file"), - 'rpm': ('bdist_rpm',"rpm distribution"), - 'zip': ('bdist_dumb',"zip-file"), + format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'ztar': ('bdist_dumb', "compressed tar file"), + 'tar': ('bdist_dumb', "tar file"), + 'zip': ('bdist_dumb', "ZIP file"), } - # prints all possible arguments to --format - def show_formats(): + def show_formats (): + """Print list of available formats (arguments to "--format" option). + """ from distutils.fancy_getopt import FancyGetopt - list_of_formats=[] + formats=[] for format in bdist.format_command.keys(): - list_of_formats.append(("formats="+format,None,bdist.format_command[format][1])) - list_of_formats.sort() - pretty_printer=FancyGetopt(list_of_formats) + formats.append(("formats="+format, None, + bdist.format_command[format][1])) + formats.sort() + pretty_printer = FancyGetopt(formats) pretty_printer.print_help("List of available distribution formats:") help_options = [ @@ -87,7 +89,6 @@ def finalize_options (self): def run (self): for format in self.formats: - try: cmd_name = self.format_command[format][0] except KeyError: diff --git a/command/build.py b/command/build.py index c064f8394b..d5513fc737 100644 --- a/command/build.py +++ b/command/build.py @@ -36,9 +36,10 @@ class build (Command): ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] + help_options = [ ('help-compiler', None, - "lists available compilers",show_compilers), + "list available compilers", show_compilers), ] def initialize_options (self): diff --git a/command/build_clib.py b/command/build_clib.py index 72df372fbf..9a82ac0917 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -42,9 +42,10 @@ class build_clib (Command): ('compiler=', 'c', "specify the compiler type"), ] + help_options = [ ('help-compiler', None, - "lists available compilers",show_compilers), + "list available compilers", show_compilers), ] def initialize_options (self): diff --git a/command/sdist.py b/command/sdist.py index ded8ec2269..93e53bbd66 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -36,7 +36,7 @@ class sdist (Command): ('force-manifest', 'f', "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, - "formats for source distribution"), + "formats for source distribution (comma-separated list)"), ('keep-tree', 'k', "keep the distribution tree around after creating " + "archive file(s)"), @@ -61,7 +61,7 @@ def show_formats (): help_options = [ ('help-formats', None, - "lists available distribution formats", show_formats), + "list available distribution formats", show_formats), ] negative_opts = {'use-defaults': 'no-defaults'} diff --git a/dist.py b/dist.py index 88bd94a470..2e4951ff88 100644 --- a/dist.py +++ b/dist.py @@ -437,11 +437,14 @@ def _parse_command_opts (self, parser, args): negative_opt = copy (negative_opt) negative_opt.update (cmd_class.negative_opt) - # Check for help_options in command class - # They have a different format (tuple of four) so we need to preprocess them here - help_options = [] - if hasattr(cmd_class,"help_options") and type (cmd_class.help_options) is ListType: - help_options = map(lambda x:(x[0],x[1],x[2]),cmd_class.help_options) + # Check for help_options in command class. They have a different + # format (tuple of four) so we need to preprocess them here. + if (hasattr(cmd_class, 'help_options') and + type (cmd_class.help_options) is ListType): + help_options = fix_help_options(cmd_class.help_options) + else: + help_optiosn = [] + # All commands support the global options too, just by adding # in 'global_options'. @@ -453,12 +456,14 @@ def _parse_command_opts (self, parser, args): self._show_help(parser, display_options=0, commands=[cmd_class]) return - if hasattr(cmd_class,"help_options") and type (cmd_class.help_options) is ListType: + if (hasattr(cmd_class, 'help_options') and + type (cmd_class.help_options) is ListType): help_option_found=0 for help_option in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option[0])): help_option_found=1 - #print "showing help for option %s of command %s" % (help_option[0],cmd_class) + #print "showing help for option %s of command %s" % \ + # (help_option[0],cmd_class) if callable(help_option[3]): help_option[3]() else: @@ -518,9 +523,10 @@ def _show_help (self, klass = command else: klass = self.get_command_class (command) - if hasattr(klass,"help_options") and type (klass.help_options) is ListType: - parser.set_option_table (klass.user_options+ - map(lambda x:(x[0],x[1],x[2]),klass.help_options)) + if (hasattr(klass, 'help_options') and + type (klass.help_options) is ListType): + parser.set_option_table (klass.user_options + + fix_help_options(klass.help_options)) else: parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) @@ -890,6 +896,17 @@ def get_long_description(self): # class DistributionMetadata + +def fix_help_options (options): + """Convert a 4-tuple 'help_options' list as found in various command + classes to the 3-tuple form required by FancyGetopt. + """ + new_options = [] + for help_tuple in options: + new_options.append(help_tuple[0:3]) + return new_options + + if __name__ == "__main__": dist = Distribution () print "ok" From 4fc435d3e805645f360a11cb97bf4d3e93e5af17 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 01:22:41 +0000 Subject: [PATCH 0459/8469] More stylistic tweaks to the generic '--help-xxx' code. --- dist.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/dist.py b/dist.py index 2e4951ff88..287137ee13 100644 --- a/dist.py +++ b/dist.py @@ -443,13 +443,14 @@ def _parse_command_opts (self, parser, args): type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) else: - help_optiosn = [] + help_options = [] # All commands support the global options too, just by adding # in 'global_options'. parser.set_option_table (self.global_options + - cmd_class.user_options + help_options) + cmd_class.user_options + + help_options) parser.set_negative_aliases (negative_opt) (args, opts) = parser.getopt (args[1:]) if hasattr(opts, 'help') and opts.help: @@ -459,19 +460,21 @@ def _parse_command_opts (self, parser, args): if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_option_found=0 - for help_option in cmd_class.help_options: - if hasattr(opts, parser.get_attr_name(help_option[0])): + for (help_option, short, desc, func) in cmd_class.help_options: + if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) - if callable(help_option[3]): - help_option[3]() - else: - raise DistutilsClassError, \ - ("command class %s must provide " + - "a callable object for help_option '%s'") % \ - (cmd_class,help_option[0]) - if help_option_found: + + if callable(func): + func() + else: + raise DistutilsClassError, \ + ("invalid help function %s for help option '%s': " + "must be a callable object (function, etc.)") % \ + (`func`, help_option) + + if help_option_found: return # Put the options from the command-line into their official From 869c587086b76265a98af7c65def177261b593cc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 01:23:37 +0000 Subject: [PATCH 0460/8469] Changed so all the help-generating functions are defined, at module-level, in the module of the command classes that have command-specific help options. This lets us keep the principle of lazily importing the ccompiler module, and also gets away from defining non-methods at class level. --- command/bdist.py | 38 ++++++++++++++++++++------------------ command/build.py | 7 ++++++- command/build_clib.py | 7 ++++++- command/build_ext.py | 10 +++++++--- command/sdist.py | 35 +++++++++++++++++------------------ 5 files changed, 56 insertions(+), 41 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 164699362d..47d4cbc965 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -14,6 +14,18 @@ from distutils.util import get_platform +def show_formats (): + """Print list of available formats (arguments to "--format" option). + """ + from distutils.fancy_getopt import FancyGetopt + formats=[] + for format in bdist.format_commands: + formats.append(("formats=" + format, None, + bdist.format_command[format][1])) + pretty_printer = FancyGetopt(formats) + pretty_printer.print_help("List of available distribution formats:") + + class bdist (Command): description = "create a built (binary) distribution" @@ -24,6 +36,11 @@ class bdist (Command): "formats for distribution (comma-separated list)"), ] + help_options = [ + ('help-formats', None, + "lists available distribution formats", show_formats), + ] + # The following commands do not take a format option from bdist no_format_option = ('bdist_rpm',) @@ -38,24 +55,9 @@ class bdist (Command): 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), 'zip': ('bdist_dumb', "ZIP file"), - } - - def show_formats (): - """Print list of available formats (arguments to "--format" option). - """ - from distutils.fancy_getopt import FancyGetopt - formats=[] - for format in bdist.format_command.keys(): - formats.append(("formats="+format, None, - bdist.format_command[format][1])) - formats.sort() - pretty_printer = FancyGetopt(formats) - pretty_printer.print_help("List of available distribution formats:") - - help_options = [ - ('help-formats', None, - "lists available distribution formats",show_formats), - ] + } + # establish the preferred order + format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', 'zip'] def initialize_options (self): diff --git a/command/build.py b/command/build.py index d5513fc737..1e87f23bbc 100644 --- a/command/build.py +++ b/command/build.py @@ -9,7 +9,12 @@ import sys, os from distutils.core import Command from distutils.util import get_platform -from distutils.ccompiler import show_compilers + + +def show_compilers (): + from distutils.ccompiler import show_compilers + show_compilers() + class build (Command): diff --git a/command/build_clib.py b/command/build_clib.py index 9a82ac0917..7106882d79 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -23,7 +23,11 @@ from types import * from distutils.core import Command from distutils.errors import * -from distutils.ccompiler import new_compiler,show_compilers + + +def show_compilers (): + from distutils.ccompiler import show_compilers + show_compilers() class build_clib (Command): @@ -102,6 +106,7 @@ def run (self): return # Yech -- this is cut 'n pasted from build_ext.py! + from distutils.ccompiler import new_compiler self.compiler = new_compiler (compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, diff --git a/command/build_ext.py b/command/build_ext.py index f3ff157183..6b7ec74190 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -14,7 +14,6 @@ from distutils.errors import * from distutils.dep_util import newer_group from distutils.extension import Extension -from distutils.ccompiler import show_compilers # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). @@ -22,6 +21,11 @@ (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$') +def show_compilers (): + from distutils.ccompiler import show_compilers + show_compilers() + + class build_ext (Command): description = "build C/C++ extensions (compile/link to build directory)" @@ -73,12 +77,12 @@ class build_ext (Command): ('compiler=', 'c', "specify the compiler type"), ] + help_options = [ ('help-compiler', None, - "lists available compilers",show_compilers), + "list available compilers", show_compilers), ] - def initialize_options (self): self.extensions = None self.build_lib = None diff --git a/command/sdist.py b/command/sdist.py index 93e53bbd66..5627ebb9e5 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -13,11 +13,27 @@ from distutils.core import Command from distutils.util import \ convert_path, create_tree, remove_tree, newer, write_file, \ - check_archive_formats, ARCHIVE_FORMATS + check_archive_formats from distutils.text_file import TextFile from distutils.errors import DistutilsExecError, DistutilsOptionError +def show_formats (): + """Print all possible values for the 'formats' option (used by + the "--help-formats" command-line option). + """ + from distutils.fancy_getopt import FancyGetopt + from distutils.archive_util import ARCHIVE_FORMATS + formats=[] + for format in ARCHIVE_FORMATS.keys(): + formats.append(("formats=" + format, None, + ARCHIVE_FORMATS[format][2])) + formats.sort() + pretty_printer = FancyGetopt(formats) + pretty_printer.print_help( + "List of available source distribution formats:") + + class sdist (Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -43,22 +59,6 @@ class sdist (Command): ] - # XXX ugh: this has to precede the 'help_options' list, because - # it is mentioned there -- also, this is not a method, even though - # it's defined in a class: double-ugh! - def show_formats (): - """Print all possible values for the 'formats' option -- used by - the "--help-formats" command-line option. - """ - from distutils.fancy_getopt import FancyGetopt - formats=[] - for format in ARCHIVE_FORMATS.keys(): - formats.append(("formats="+format,None,ARCHIVE_FORMATS[format][2])) - formats.sort() - pretty_printer = FancyGetopt(formats) - pretty_printer.print_help( - "List of available source distribution formats:") - help_options = [ ('help-formats', None, "list available distribution formats", show_formats), @@ -69,7 +69,6 @@ def show_formats (): default_format = { 'posix': 'gztar', 'nt': 'zip' } - def initialize_options (self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. From 614a927fbf22310f55f5ee3f895ce6a138bf6d35 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 02:22:49 +0000 Subject: [PATCH 0461/8469] Changed 'object_filenames()' to raise exception instead of silently carrying on if it sees a filename with unknown extension. --- ccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 5be8c25a14..4dd8645bc5 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -671,7 +671,9 @@ def object_filenames (self, for src_name in source_filenames: (base, ext) = os.path.splitext (src_name) if ext not in self.src_extensions: - continue + raise UnknownFileError, \ + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) if strip_dir: base = os.path.basename (base) obj_names.append (os.path.join (output_dir, From 2bfcf462aa13cdd68bc582ec69ed80e2d52d6eb5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 17:22:39 +0000 Subject: [PATCH 0462/8469] Changed the default installation directory for data files (used by the "install_data" command to the installation base, which is usually just sys.prefix. (Any setup scripts out there that specify data files will have to set the installation directory, relative to the base, explicitly.) --- command/install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index 5e8ade8d80..1be49046ec 100644 --- a/command/install.py +++ b/command/install.py @@ -20,28 +20,28 @@ 'platlib': '$platbase/lib/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short/$dist_name', 'scripts': '$base/bin', - 'data' : '$base/share', + 'data' : '$base', }, 'unix_home': { 'purelib': '$base/lib/python', 'platlib': '$base/lib/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', - 'data' : '$base/share', + 'data' : '$base', }, 'nt': { 'purelib': '$base', 'platlib': '$base', 'headers': '$base\\Include\\$dist_name', 'scripts': '$base\\Scripts', - 'data' : '$base\\Data', + 'data' : '$base', }, 'mac': { 'purelib': '$base:Lib', 'platlib': '$base:Mac:PlugIns', 'headers': '$base:Include:$dist_name', 'scripts': '$base:Scripts', - 'data' : '$base:Data', + 'data' : '$base', } } From 3cac3f4156d58d1a827929273bb02e8645762484 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 17:36:24 +0000 Subject: [PATCH 0463/8469] Print a warning if we install a data file right in install_dir. Tweaked help text. --- command/install_data.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index f8ed0a7540..716febb5c6 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -18,7 +18,8 @@ class install_data (Command): user_options = [ ('install-dir=', 'd', - "directory to install the files to"), + "base directory for installating data files " + "(default: installation base dir)"), ('root=', None, "install everything relative to this alternate root directory"), ] @@ -39,11 +40,14 @@ def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: - # its a simple file, so copy it + # it's a simple file, so copy it + self.warn("setup script did not provide a directory for " + "'%s' -- installing right in '%s'" % + (f, self.install_dir)) out = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: - # its a tuple with path to install to and a list of files + # it's a tuple with path to install to and a list of files dir = f[0] if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) From 0a5cf577d2738162be426bc2a95b04d55bf3cbed Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 18:10:48 +0000 Subject: [PATCH 0464/8469] Docstring reformatting/tweaking binge. Fixed a few comments. --- ccompiler.py | 502 ++++++++++++++++++++++++++------------------------- 1 file changed, 253 insertions(+), 249 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 4dd8645bc5..9aa41adb9d 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -17,18 +17,17 @@ class CCompiler: """Abstract base class to define the interface that must be implemented - by real compiler abstraction classes. Might have some use as a - place for shared code, but it's not yet clear what code can be - shared between compiler abstraction models for different platforms. - - The basic idea behind a compiler abstraction class is that each - instance can be used for all the compile/link steps in building - a single project. Thus, attributes common to all of those compile - and link steps -- include directories, macros to define, libraries - to link against, etc. -- are attributes of the compiler instance. - To allow for variability in how individual files are treated, - most (all?) of those attributes may be varied on a per-compilation - or per-link basis.""" + by real compiler classes. Also has some utility methods used by + several compiler classes. + + The basic idea behind a compiler abstraction class is that each + instance can be used for all the compile/link steps in building a + single project. Thus, attributes common to all of those compile and + link steps -- include directories, macros to define, libraries to link + against, etc. -- are attributes of the compiler instance. To allow for + variability in how individual files are treated, most of those + attributes may be varied on a per-compilation or per-link basis. + """ # 'compiler_type' is a class attribute that identifies this class. It # keeps code that wants to know what kind of compiler it's dealing with @@ -46,10 +45,6 @@ class CCompiler: # should be the domain of concrete compiler abstraction classes # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base # class should have methods for the common ones. - # * can't put output files (object files, libraries, whatever) - # into a separate directory from their inputs. Should this be - # handled by an 'output_dir' attribute of the whole object, or a - # parameter to the compile/link_* methods, or both? # * can't completely override the include or library searchg # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". # I'm not sure how widely supported this is even by Unix @@ -129,10 +124,9 @@ def _find_macro (self, name): def _check_macro_definitions (self, definitions): """Ensures that every element of 'definitions' is a valid macro - definition, ie. either (name,value) 2-tuple or a (name,) - tuple. Do nothing if all definitions are OK, raise - TypeError otherwise.""" - + definition, ie. either (name,value) 2-tuple or a (name,) tuple. Do + nothing if all definitions are OK, raise TypeError otherwise. + """ for defn in definitions: if not (type (defn) is TupleType and (len (defn) == 1 or @@ -148,12 +142,12 @@ def _check_macro_definitions (self, definitions): # -- Bookkeeping methods ------------------------------------------- def define_macro (self, name, value=None): - """Define a preprocessor macro for all compilations driven by - this compiler object. The optional parameter 'value' should be - a string; if it is not supplied, then the macro will be defined - without an explicit value and the exact outcome depends on the - compiler used (XXX true? does ANSI say anything about this?)""" - + """Define a preprocessor macro for all compilations driven by this + compiler object. The optional parameter 'value' should be a + string; if it is not supplied, then the macro will be defined + without an explicit value and the exact outcome depends on the + compiler used (XXX true? does ANSI say anything about this?) + """ # Delete from the list of macro definitions/undefinitions if # already there (so that this one will take precedence). i = self._find_macro (name) @@ -166,13 +160,13 @@ def define_macro (self, name, value=None): def undefine_macro (self, name): """Undefine a preprocessor macro for all compilations driven by - this compiler object. If the same macro is defined by - 'define_macro()' and undefined by 'undefine_macro()' the last - call takes precedence (including multiple redefinitions or - undefinitions). If the macro is redefined/undefined on a - per-compilation basis (ie. in the call to 'compile()'), then - that takes precedence.""" - + this compiler object. If the same macro is defined by + 'define_macro()' and undefined by 'undefine_macro()' the last call + takes precedence (including multiple redefinitions or + undefinitions). If the macro is redefined/undefined on a + per-compilation basis (ie. in the call to 'compile()'), then that + takes precedence. + """ # Delete from the list of macro definitions/undefinitions if # already there (so that this one will take precedence). i = self._find_macro (name) @@ -184,86 +178,94 @@ def undefine_macro (self, name): def add_include_dir (self, dir): - """Add 'dir' to the list of directories that will be searched - for header files. The compiler is instructed to search - directories in the order in which they are supplied by - successive calls to 'add_include_dir()'.""" + """Add 'dir' to the list of directories that will be searched for + header files. The compiler is instructed to search directories in + the order in which they are supplied by successive calls to + 'add_include_dir()'. + """ self.include_dirs.append (dir) def set_include_dirs (self, dirs): - """Set the list of directories that will be searched to 'dirs' - (a list of strings). Overrides any preceding calls to - 'add_include_dir()'; subsequence calls to 'add_include_dir()' - add to the list passed to 'set_include_dirs()'. This does - not affect any list of standard include directories that - the compiler may search by default.""" + """Set the list of directories that will be searched to 'dirs' (a + list of strings). Overrides any preceding calls to + 'add_include_dir()'; subsequence calls to 'add_include_dir()' add + to the list passed to 'set_include_dirs()'. This does not affect + any list of standard include directories that the compiler may + search by default. + """ self.include_dirs = copy (dirs) def add_library (self, libname): - """Add 'libname' to the list of libraries that will be included - in all links driven by this compiler object. Note that - 'libname' should *not* be the name of a file containing a - library, but the name of the library itself: the actual filename - will be inferred by the linker, the compiler, or the compiler - abstraction class (depending on the platform). - - The linker will be instructed to link against libraries in the - order they were supplied to 'add_library()' and/or - 'set_libraries()'. It is perfectly valid to duplicate library - names; the linker will be instructed to link against libraries - as many times as they are mentioned.""" + """Add 'libname' to the list of libraries that will be included in + all links driven by this compiler object. Note that 'libname' + should *not* be the name of a file containing a library, but the + name of the library itself: the actual filename will be inferred by + the linker, the compiler, or the compiler class (depending on the + platform). + + The linker will be instructed to link against libraries in the + order they were supplied to 'add_library()' and/or + 'set_libraries()'. It is perfectly valid to duplicate library + names; the linker will be instructed to link against libraries as + many times as they are mentioned. + """ self.libraries.append (libname) def set_libraries (self, libnames): - """Set the list of libraries to be included in all links driven - by this compiler object to 'libnames' (a list of strings). - This does not affect any standard system libraries that the - linker may include by default.""" - + """Set the list of libraries to be included in all links driven by + this compiler object to 'libnames' (a list of strings). This does + not affect any standard system libraries that the linker may + include by default. + """ self.libraries = copy (libnames) def add_library_dir (self, dir): """Add 'dir' to the list of directories that will be searched for - libraries specified to 'add_library()' and 'set_libraries()'. - The linker will be instructed to search for libraries in the - order they are supplied to 'add_library_dir()' and/or - 'set_library_dirs()'.""" + libraries specified to 'add_library()' and 'set_libraries()'. The + linker will be instructed to search for libraries in the order they + are supplied to 'add_library_dir()' and/or 'set_library_dirs()'. + """ self.library_dirs.append (dir) def set_library_dirs (self, dirs): - """Set the list of library search directories to 'dirs' (a list - of strings). This does not affect any standard library - search path that the linker may search by default.""" + """Set the list of library search directories to 'dirs' (a list of + strings). This does not affect any standard library search path + that the linker may search by default. + """ self.library_dirs = copy (dirs) def add_runtime_library_dir (self, dir): """Add 'dir' to the list of directories that will be searched for - shared libraries at runtime.""" + shared libraries at runtime. + """ self.runtime_library_dirs.append (dir) def set_runtime_library_dirs (self, dirs): - """Set the list of directories to search for shared libraries - at runtime to 'dirs' (a list of strings). This does not affect - any standard search path that the runtime linker may search by - default.""" + """Set the list of directories to search for shared libraries at + runtime to 'dirs' (a list of strings). This does not affect any + standard search path that the runtime linker may search by + default. + """ self.runtime_library_dirs = copy (dirs) def add_link_object (self, object): - """Add 'object' to the list of object files (or analogues, such - as explictly named library files or the output of "resource - compilers") to be included in every link driven by this - compiler object.""" + """Add 'object' to the list of object files (or analogues, such as + explictly named library files or the output of "resource + compilers") to be included in every link driven by this compiler + object. + """ self.objects.append (object) def set_link_objects (self, objects): - """Set the list of object files (or analogues) to be included - in every link to 'objects'. This does not affect any - standard object files that the linker may include by default - (such as system libraries).""" + """Set the list of object files (or analogues) to be included in + every link to 'objects'. This does not affect any standard object + files that the linker may include by default (such as system + libraries). + """ self.objects = copy (objects) @@ -271,15 +273,15 @@ def set_link_objects (self, objects): # (here for the convenience of subclasses) def _fix_compile_args (self, output_dir, macros, include_dirs): - """Typecheck and fix-up some of the arguments to the 'compile()' method, - and return fixed-up values. Specifically: if 'output_dir' is - None, replaces it with 'self.output_dir'; ensures that 'macros' - is a list, and augments it with 'self.macros'; ensures that - 'include_dirs' is a list, and augments it with - 'self.include_dirs'. Guarantees that the returned values are of - the correct type, i.e. for 'output_dir' either string or None, - and for 'macros' and 'include_dirs' either list or None.""" - + """Typecheck and fix-up some of the arguments to the 'compile()' + method, and return fixed-up values. Specifically: if 'output_dir' + is None, replaces it with 'self.output_dir'; ensures that 'macros' + is a list, and augments it with 'self.macros'; ensures that + 'include_dirs' is a list, and augments it with 'self.include_dirs'. + Guarantees that the returned values are of the correct type, + i.e. for 'output_dir' either string or None, and for 'macros' and + 'include_dirs' either list or None. + """ if output_dir is None: output_dir = self.output_dir elif type (output_dir) is not StringType: @@ -307,11 +309,11 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): def _prep_compile (self, sources, output_dir): - """Determine the list of object files corresponding to 'sources', and - figure out which ones really need to be recompiled. Return a list - of all object files and a dictionary telling which source files can - be skipped.""" - + """Determine the list of object files corresponding to 'sources', + and figure out which ones really need to be recompiled. Return a + list of all object files and a dictionary telling which source + files can be skipped. + """ # Get the list of expected output (object) files objects = self.object_filenames (sources, output_dir=output_dir) @@ -330,8 +332,8 @@ def _prep_compile (self, sources, output_dir): skip_source[source] = 1 (n_sources, n_objects) = newer_pairwise (sources, objects) - for source in n_sources: # no really, only rebuild what's out-of-date - skip_source[source] = 0 + for source in n_sources: # no really, only rebuild what's + skip_source[source] = 0 # out-of-date return (objects, skip_source) @@ -339,11 +341,11 @@ def _prep_compile (self, sources, output_dir): def _fix_object_args (self, objects, output_dir): - """Typecheck and fix up some arguments supplied to various - methods. Specifically: ensure that 'objects' is a list; if - output_dir is None, replace with self.output_dir. Return fixed - versions of 'objects' and 'output_dir'.""" - + """Typecheck and fix up some arguments supplied to various methods. + Specifically: ensure that 'objects' is a list; if output_dir is + None, replace with self.output_dir. Return fixed versions of + 'objects' and 'output_dir'. + """ if type (objects) not in (ListType, TupleType): raise TypeError, \ "'objects' must be a list or tuple of strings" @@ -359,11 +361,11 @@ def _fix_object_args (self, objects, output_dir): def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): """Typecheck and fix up some of the arguments supplied to the - 'link_*' methods. Specifically: ensure that all arguments are - lists, and augment them with their permanent versions - (eg. 'self.libraries' augments 'libraries'). Return a tuple - with fixed versions of all arguments.""" - + 'link_*' methods. Specifically: ensure that all arguments are + lists, and augment them with their permanent versions + (eg. 'self.libraries' augments 'libraries'). Return a tuple with + fixed versions of all arguments. + """ if libraries is None: libraries = self.libraries elif type (libraries) in (ListType, TupleType): @@ -396,9 +398,9 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): def _need_link (self, objects, output_file): - """Return true if we need to relink the files listed in 'objects' to - recreate 'output_file'.""" - + """Return true if we need to relink the files listed in 'objects' + to recreate 'output_file'. + """ if self.force: return 1 else: @@ -438,44 +440,44 @@ def compile (self, debug=0, extra_preargs=None, extra_postargs=None): - """Compile one or more C/C++ source files. 'sources' must be - a list of strings, each one the name of a C/C++ source - file. Return a list of object filenames, one per source - filename in 'sources'. Depending on the implementation, - not all source files will necessarily be compiled, but - all corresponding object filenames will be returned. - - If 'output_dir' is given, object files will be put under it, - while retaining their original path component. That is, - "foo/bar.c" normally compiles to "foo/bar.o" (for a Unix - implementation); if 'output_dir' is "build", then it would - compile to "build/foo/bar.o". - - 'macros', if given, must be a list of macro definitions. A - macro definition is either a (name, value) 2-tuple or a (name,) - 1-tuple. The former defines a macro; if the value is None, the - macro is defined without an explicit value. The 1-tuple case - undefines a macro. Later definitions/redefinitions/ - undefinitions take precedence. - - 'include_dirs', if given, must be a list of strings, the - directories to add to the default include file search path for - this compilation only. - - 'debug' is a boolean; if true, the compiler will be instructed - to output debug symbols in (or alongside) the object file(s). - - 'extra_preargs' and 'extra_postargs' are implementation- - dependent. On platforms that have the notion of a command-line - (e.g. Unix, DOS/Windows), they are most likely lists of strings: - extra command-line arguments to prepand/append to the compiler - command line. On other platforms, consult the implementation - class documentation. In any event, they are intended as an - escape hatch for those occasions when the abstract compiler - framework doesn't cut the mustard. - - Raises CompileError on failure.""" - + """Compile one or more C/C++ source files. 'sources' must be a + list of strings, each one the name of a C/C++ source file. Return + a list of object filenames, one per source filename in 'sources'. + Depending on the implementation, not all source files will + necessarily be compiled, but all corresponding object filenames + will be returned. + + If 'output_dir' is given, object files will be put under it, while + retaining their original path component. That is, "foo/bar.c" + normally compiles to "foo/bar.o" (for a Unix implementation); if + 'output_dir' is "build", then it would compile to + "build/foo/bar.o". + + 'macros', if given, must be a list of macro definitions. A macro + definition is either a (name, value) 2-tuple or a (name,) 1-tuple. + The former defines a macro; if the value is None, the macro is + defined without an explicit value. The 1-tuple case undefines a + macro. Later definitions/redefinitions/ undefinitions take + precedence. + + 'include_dirs', if given, must be a list of strings, the + directories to add to the default include file search path for this + compilation only. + + 'debug' is a boolean; if true, the compiler will be instructed to + output debug symbols in (or alongside) the object file(s). + + 'extra_preargs' and 'extra_postargs' are implementation- dependent. + On platforms that have the notion of a command-line (e.g. Unix, + DOS/Windows), they are most likely lists of strings: extra + command-line arguments to prepand/append to the compiler command + line. On other platforms, consult the implementation class + documentation. In any event, they are intended as an escape hatch + for those occasions when the abstract compiler framework doesn't + cut the mustard. + + Raises CompileError on failure. + """ pass @@ -484,25 +486,24 @@ def create_static_lib (self, output_libname, output_dir=None, debug=0): - """Link a bunch of stuff together to create a static library - file. The "bunch of stuff" consists of the list of object - files supplied as 'objects', the extra object files supplied - to 'add_link_object()' and/or 'set_link_objects()', the - libraries supplied to 'add_library()' and/or - 'set_libraries()', and the libraries supplied as 'libraries' - (if any). - - 'output_libname' should be a library name, not a filename; the - filename will be inferred from the library name. 'output_dir' - is the directory where the library file will be put. - - 'debug' is a boolean; if true, debugging information will be - included in the library (note that on most platforms, it is the - compile step where this matters: the 'debug' flag is included - here just for consistency). - - Raises LibError on failure.""" - + """Link a bunch of stuff together to create a static library file. + The "bunch of stuff" consists of the list of object files supplied + as 'objects', the extra object files supplied to + 'add_link_object()' and/or 'set_link_objects()', the libraries + supplied to 'add_library()' and/or 'set_libraries()', and the + libraries supplied as 'libraries' (if any). + + 'output_libname' should be a library name, not a filename; the + filename will be inferred from the library name. 'output_dir' is + the directory where the library file will be put. + + 'debug' is a boolean; if true, debugging information will be + included in the library (note that on most platforms, it is the + compile step where this matters: the 'debug' flag is included here + just for consistency). + + Raises LibError on failure. + """ pass @@ -517,44 +518,44 @@ def link_shared_lib (self, debug=0, extra_preargs=None, extra_postargs=None): - """Link a bunch of stuff together to create a shared library - file. Similar semantics to 'create_static_lib()', with the - addition of other libraries to link against and directories to - search for them. Also, of course, the type and name of - the generated file will almost certainly be different, as will - the program used to create it. - - 'libraries' is a list of libraries to link against. These are - library names, not filenames, since they're translated into - filenames in a platform-specific way (eg. "foo" becomes - "libfoo.a" on Unix and "foo.lib" on DOS/Windows). However, they - can include a directory component, which means the linker will - look in that specific directory rather than searching all the - normal locations. - - 'library_dirs', if supplied, should be a list of directories to - search for libraries that were specified as bare library names - (ie. no directory component). These are on top of the system - default and those supplied to 'add_library_dir()' and/or - 'set_library_dirs()'. 'runtime_library_dirs' is a list of - directories that will be embedded into the shared library and - used to search for other shared libraries that *it* depends on - at run-time. (This may only be relevant on Unix.) - - 'export_symbols' is a list of symbols that the shared library - will export. (This appears to be relevant only on Windows.) - - 'debug' is as for 'compile()' and 'create_static_lib()', with the - slight distinction that it actually matters on most platforms - (as opposed to 'create_static_lib()', which includes a 'debug' - flag mostly for form's sake). - - 'extra_preargs' and 'extra_postargs' are as for 'compile()' - (except of course that they supply command-line arguments - for the particular linker being used). - - Raises LinkError on failure.""" + """Link a bunch of stuff together to create a shared library file. + Similar semantics to 'create_static_lib()', with the addition of + other libraries to link against and directories to search for them. + Also, of course, the type and name of the generated file will + almost certainly be different, as will the program used to create + it. + + 'libraries' is a list of libraries to link against. These are + library names, not filenames, since they're translated into + filenames in a platform-specific way (eg. "foo" becomes "libfoo.a" + on Unix and "foo.lib" on DOS/Windows). However, they can include a + directory component, which means the linker will look in that + specific directory rather than searching all the normal locations. + + 'library_dirs', if supplied, should be a list of directories to + search for libraries that were specified as bare library names + (ie. no directory component). These are on top of the system + default and those supplied to 'add_library_dir()' and/or + 'set_library_dirs()'. 'runtime_library_dirs' is a list of + directories that will be embedded into the shared library and used + to search for other shared libraries that *it* depends on at + run-time. (This may only be relevant on Unix.) + + 'export_symbols' is a list of symbols that the shared library will + export. (This appears to be relevant only on Windows.) + + 'debug' is as for 'compile()' and 'create_static_lib()', with the + slight distinction that it actually matters on most platforms (as + opposed to 'create_static_lib()', which includes a 'debug' flag + mostly for form's sake). + + 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except + of course that they supply command-line arguments for the + particular linker being used). + + Raises LinkError on failure. + """ pass @@ -569,14 +570,15 @@ def link_shared_object (self, debug=0, extra_preargs=None, extra_postargs=None): - """Link a bunch of stuff together to create a shared object - file. Much like 'link_shared_lib()', except the output filename - is explicitly supplied as 'output_filename'. If 'output_dir' is - supplied, 'output_filename' is relative to it - (i.e. 'output_filename' can provide directory components if - needed). - - Raises LinkError on failure.""" + """Link a bunch of stuff together to create a shared object file. + Much like 'link_shared_lib()', except the output filename is + explicitly supplied as 'output_filename'. If 'output_dir' is + supplied, 'output_filename' is relative to it + (i.e. 'output_filename' can provide directory components if + needed). + + Raises LinkError on failure. + """ pass @@ -591,12 +593,13 @@ def link_executable (self, extra_preargs=None, extra_postargs=None): """Link a bunch of stuff together to create a binary executable - file. The "bunch of stuff" is as for 'link_shared_lib()'. - 'output_progname' should be the base name of the executable - program--e.g. on Unix the same as the output filename, but - on DOS/Windows ".exe" will be appended. + file. The "bunch of stuff" is as for 'link_shared_lib()'. + 'output_progname' should be the base name of the executable + program--e.g. on Unix the same as the output filename, but on + DOS/Windows ".exe" will be appended. - Raises LinkError on failure.""" + Raises LinkError on failure. + """ pass @@ -607,24 +610,28 @@ def link_executable (self, # implement all of these. def library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of directories - searched for libraries.""" + """Return the compiler option to add 'dir' to the list of + directories searched for libraries. + """ raise NotImplementedError def runtime_library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of directories - searched for runtime libraries.""" + """Return the compiler option to add 'dir' to the list of + directories searched for runtime libraries. + """ raise NotImplementedError def library_option (self, lib): """Return the compiler option to add 'dir' to the list of libraries - linked into the shared library or executable.""" + linked into the shared library or executable. + """ raise NotImplementedError def find_library_file (self, dirs, lib): """Search the specified list of directories for a static or shared - library file 'lib' and return the full path to that file. Return - None if it wasn't found in any of the specified directories.""" + library file 'lib' and return the full path to that file. Return + None if it wasn't found in any of the specified directories. + """ raise NotImplementedError @@ -776,18 +783,16 @@ def new_compiler (plat=None, verbose=0, dry_run=0, force=0): - """Generate an instance of some CCompiler subclass for the supplied - platform/compiler combination. 'plat' defaults to 'os.name' - (eg. 'posix', 'nt'), and 'compiler' defaults to the default - compiler for that platform. Currently only 'posix' and 'nt' - are supported, and the default compilers are "traditional Unix - interface" (UnixCCompiler class) and Visual C++ (MSVCCompiler - class). Note that it's perfectly possible to ask for a Unix - compiler object under Windows, and a Microsoft compiler object - under Unix -- if you supply a value for 'compiler', 'plat' - is ignored.""" - + platform/compiler combination. 'plat' defaults to 'os.name' + (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler + for that platform. Currently only 'posix' and 'nt' are supported, and + the default compilers are "traditional Unix interface" (UnixCCompiler + class) and Visual C++ (MSVCCompiler class). Note that it's perfectly + possible to ask for a Unix compiler object under Windows, and a + Microsoft compiler object under Unix -- if you supply a value for + 'compiler', 'plat' is ignored. + """ if plat is None: plat = os.name @@ -820,15 +825,15 @@ def new_compiler (plat=None, def gen_preprocess_options (macros, include_dirs): - """Generate C pre-processor options (-D, -U, -I) as used by at - least two types of compilers: the typical Unix compiler and Visual - C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where - (name,) means undefine (-U) macro 'name', and (name,value) means - define (-D) macro 'name' to 'value'. 'include_dirs' is just a list of - directory names to be added to the header file search path (-I). - Returns a list of command-line options suitable for either - Unix compilers or Visual C++.""" - + """Generate C pre-processor options (-D, -U, -I) as used by at least + two types of compilers: the typical Unix compiler and Visual C++. + 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) + means undefine (-U) macro 'name', and (name,value) means define (-D) + macro 'name' to 'value'. 'include_dirs' is just a list of directory + names to be added to the header file search path (-I). Returns a list + of command-line options suitable for either Unix compilers or Visual + C++. + """ # XXX it would be nice (mainly aesthetic, and so we don't generate # stupid-looking command lines) to go over 'macros' and eliminate # redundant definitions/undefinitions (ie. ensure that only the @@ -872,12 +877,11 @@ def gen_preprocess_options (macros, include_dirs): def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and - linking with specific libraries. 'libraries' and 'library_dirs' - are, respectively, lists of library names (not filenames!) and - search directories. Returns a list of command-line options suitable - for use with some compiler (depending on the two format strings - passed in).""" - + linking with specific libraries. 'libraries' and 'library_dirs' are, + respectively, lists of library names (not filenames!) and search + directories. Returns a list of command-line options suitable for use + with some compiler (depending on the two format strings passed in). + """ lib_opts = [] for dir in library_dirs: From 57d36e94b071791b0183ad6df383ff293b2ecbc7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 24 Jun 2000 20:40:02 +0000 Subject: [PATCH 0465/8469] Added 'split_quoted()' function to deal with strings that are quoted in Unix shell-like syntax (eg. in Python's Makefile, for one thing -- now that I have this function, I'll probably allow quoted strings in config files too. --- util.py | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/util.py b/util.py index 74df8aa6a4..5c1de78997 100644 --- a/util.py +++ b/util.py @@ -166,3 +166,70 @@ def grok_environment_error (exc, prefix="error: "): error = prefix + str(exc[-1]) return error + + +# Needed by 'split_quoted()' +_wordchars_re = re.compile(r'[^\\\'\"\ ]*') +_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") +_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') + +def split_quoted (s): + """Split a string up according to Unix shell-like rules for quotes and + backslashes. In short: words are delimited by spaces, as long as those + spaces are not escaped by a backslash, or inside a quoted string. + Single and double quotes are equivalent, and the quote characters can + be backslash-escaped. The backslash is stripped from any two-character + escape sequence, leaving only the escaped character. The quote + characters are stripped from any quoted string. Returns a list of + words. + """ + + # This is a nice algorithm for splitting up a single string, since it + # doesn't require character-by-character examination. It was a little + # bit of a brain-bender to get it working right, though... + + s = string.strip(s) + words = [] + pos = 0 + + while s: + m = _wordchars_re.match(s, pos) + end = m.end() + if end == len(s): + words.append(s[:end]) + break + + if s[end] == ' ': # unescaped, unquoted space: now + words.append(s[:end]) # we definitely have a word delimiter + s = string.lstrip(s[end:]) + pos = 0 + + elif s[end] == '\\': # preserve whatever is being escaped; + # will become part of the current word + s = s[:end] + s[end+1:] + pos = end+1 + + else: + if s[end] == "'": # slurp singly-quoted string + m = _squote_re.match(s, end) + elif s[end] == '"': # slurp doubly-quoted string + m = _dquote_re.match(s, end) + else: + raise RuntimeError, \ + "this can't happen (bad char '%c')" % s[end] + + if m is None: + raise ValueError, \ + "bad string (mismatched %s quotes?)" % s[end] + + (beg, end) = m.span() + s = s[:beg] + s[beg+1:end-1] + s[end:] + pos = m.end() - 2 + + if pos >= len(s): + words.append(s) + break + + return words + +# split_quoted () From d710c3f8dee703894ec6e3e3ab6a4ead1b827be7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:05:29 +0000 Subject: [PATCH 0466/8469] Got rid of direct dependence on the sysconfig module. Mainly, this meant playing along with the new "dictionary of executables" scheme added to CCompiler by adding the 'executables' class attribute, and changing all the compile/link/etc. methods to use the new attributes (which encapsulate both the program to run and its standard arguments, so it was a *little* bit more than just changing some names). --- unixccompiler.py | 102 ++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 67 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 47d8ad6325..85ce5df719 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -20,7 +20,6 @@ import string, re, os from types import * from copy import copy -from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -45,65 +44,42 @@ class UnixCCompiler (CCompiler): - # XXX perhaps there should really be *three* kinds of include - # directories: those built in to the preprocessor, those from Python's - # Makefiles, and those supplied to {add,set}_include_dirs(). Currently - # we make no distinction between the latter two at this point; it's all - # up to the client class to select the include directories to use above - # and beyond the compiler's defaults. That is, both the Python include - # directories and any module- or package-specific include directories - # are specified via {add,set}_include_dirs(), and there's no way to - # distinguish them. This might be a bug. - compiler_type = 'unix' - # Needed for the filename generation methods provided by the - # base class, CCompiler. + # These are used by CCompiler in two places: the constructor sets + # instance attributes 'preprocessor', 'compiler', etc. from them, and + # 'set_executable()' allows any of these to be set. The defaults here + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). + executables = {'preprocessor' : None, + 'compiler' : ["cc"], + 'compiler_so' : ["cc"], + 'linker_so' : ["cc", "-shared"], + 'linker_exe' : ["cc"], + 'archiver' : ["ar", "-cr"], + 'ranlib' : None, + } + + # Needed for the filename generation methods provided by the base + # class, CCompiler. NB. whoever instantiates/uses a particular + # UnixCCompiler instance should set 'shared_lib_ext' -- we set a + # reasonable common default here, but it's not necessarily used on all + # Unices! + src_extensions = [".c",".C",".cc",".cxx",".cpp"] obj_extension = ".o" static_lib_extension = ".a" - shared_lib_extension = sysconfig.SO + shared_lib_extension = ".so" static_lib_format = shared_lib_format = "lib%s%s" - # Command to create a static library: seems to be pretty consistent - # across the major Unices. Might have to move down into the - # constructor if we need platform-specific guesswork. - archiver = sysconfig.AR - archiver_options = "-cr" - ranlib = sysconfig.RANLIB - def __init__ (self, verbose=0, dry_run=0, force=0): - CCompiler.__init__ (self, verbose, dry_run, force) - self.preprocess_options = None - self.compile_options = None - - # Munge CC and OPT together in case there are flags stuck in CC. - # Note that using these variables from sysconfig immediately makes - # this module specific to building Python extensions and - # inappropriate as a general-purpose C compiler front-end. So sue - # me. Note also that we use OPT rather than CFLAGS, because CFLAGS - # is the flags used to compile Python itself -- not only are there - # -I options in there, they are the *wrong* -I options. We'll - # leave selection of include directories up to the class using - # UnixCCompiler! - - (self.cc, self.ccflags) = \ - _split_command (sysconfig.CC + ' ' + sysconfig.OPT) - self.ccflags_shared = string.split (sysconfig.CCSHARED) - - (self.ld_shared, self.ldflags_shared) = \ - _split_command (sysconfig.LDSHARED) - - self.ld_exec = self.cc - - # __init__ () - def preprocess (self, source, @@ -116,11 +92,11 @@ def preprocess (self, (_, macros, include_dirs) = \ self._fix_compile_args (None, macros, include_dirs) pp_opts = gen_preprocess_options (macros, include_dirs) - cc_args = ['-E'] + pp_opts + pp_args = self.preprocessor + pp_opts if output_file: - cc_args.extend(['-o', output_file]) + pp_args.extend(['-o', output_file]) if extra_preargs: - cc_args[:0] = extra_preargs + pp_args[:0] = extra_preargs if extra_postargs: extra_postargs.extend(extra_postargs) @@ -131,7 +107,7 @@ def preprocess (self, if output_file: self.mkpath(os.path.dirname(output_file)) try: - self.spawn ([self.cc] + cc_args) + self.spawn (pp_args) except DistutilsExecError, msg: raise CompileError, msg @@ -151,7 +127,7 @@ def compile (self, # Figure out the options for the compiler command line. pp_opts = gen_preprocess_options (macros, include_dirs) - cc_args = ['-c'] + pp_opts + self.ccflags + self.ccflags_shared + cc_args = pp_opts + ['-c'] if debug: cc_args[:0] = ['-g'] if extra_preargs: @@ -168,7 +144,7 @@ def compile (self, else: self.mkpath (os.path.dirname (obj)) try: - self.spawn ([self.cc] + cc_args + + self.spawn (self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError, msg: @@ -193,9 +169,8 @@ def create_static_lib (self, if self._need_link (objects, output_filename): self.mkpath (os.path.dirname (output_filename)) - self.spawn ([self.archiver, - self.archiver_options, - output_filename] + + self.spawn (self.archiver + + [output_filename] + objects + self.objects) # Not many Unices required ranlib anymore -- SunOS 4.x is, I @@ -203,9 +178,9 @@ def create_static_lib (self, # platform intelligence here to skip ranlib if it's not # needed -- or maybe Python's configure script took care of # it for us, hence the check for leading colon. - if self.ranlib[0] != ':': + if self.ranlib: try: - self.spawn ([self.ranlib, output_filename]) + self.spawn (self.ranlib + [output_filename]) except DistutilsExecError, msg: raise LibError, msg else: @@ -263,7 +238,7 @@ def link_shared_object (self, output_filename = os.path.join (output_dir, output_filename) if self._need_link (objects, output_filename): - ld_args = (self.ldflags_shared + objects + self.objects + + ld_args = (objects + self.objects + lib_opts + ['-o', output_filename]) if debug: ld_args[:0] = ['-g'] @@ -273,7 +248,7 @@ def link_shared_object (self, ld_args.extend (extra_postargs) self.mkpath (os.path.dirname (output_filename)) try: - self.spawn ([self.ld_shared] + ld_args) + self.spawn (self.linker_so + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: @@ -314,7 +289,7 @@ def link_executable (self, ld_args.extend (extra_postargs) self.mkpath (os.path.dirname (output_filename)) try: - self.spawn ([self.ld_exec] + ld_args) + self.spawn (self.linker_exe + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: @@ -359,10 +334,3 @@ def find_library_file (self, dirs, lib): # find_library_file () # class UnixCCompiler - - -def _split_command (cmd): - """Split a command string up into the progam to run (a string) and - the list of arguments; return them as (cmd, arglist).""" - args = string.split (cmd) - return (args[0], args[1:]) From 69604851149442fe1a0cba66cadf75e9fc6947fb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:08:18 +0000 Subject: [PATCH 0467/8469] Introduced some bureaucracy for setting and tracking the executables that a particular compiler system depends on. This consists of the 'set_executables()' and 'set_executable()' methods, and a few lines in the constructor that expect implementation classes to provide an 'executables' attribute, which we use to initialize several instance attributes. The default implementation is somewhat biased in favour of a Unix/DOS "command-line" view of the world, but it shouldn't be too hard to override this for operating systems with a more sophisticated way of representing programs-to-execute. --- ccompiler.py | 61 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 9aa41adb9d..e97c97776a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -12,7 +12,10 @@ from copy import copy from distutils.errors import * from distutils.spawn import spawn -from distutils.util import move_file, mkpath, newer_pairwise, newer_group +from distutils.file_util import move_file +from distutils.dir_util import mkpath +from distutils.dep_util import newer_pairwise, newer_group +from distutils.util import split_quoted class CCompiler: @@ -109,9 +112,56 @@ def __init__ (self, # named library files) to include on any link self.objects = [] + for key in self.executables.keys(): + self.set_executable(key, self.executables[key]) + # __init__ () + def set_executables (self, **args): + + """Define the executables (and options for them) that will be run + to perform the various stages of compilation. The exact set of + executables that may be specified here depends on the compiler + class (via the 'executables' class attribute), but most will have: + compiler the C/C++ compiler + linker_so linker used to create shared objects and libraries + linker_exe linker used to create binary executables + archiver static library creator + + On platforms with a command-line (Unix, DOS/Windows), each of these + is a string that will be split into executable name and (optional) + list of arguments. (Splitting the string is done similarly to how + Unix shells operate: words are delimited by spaces, but quotes and + backslashes can override this. See + 'distutils.util.split_quoted()'.) + """ + + # Note that some CCompiler implementation classes will define class + # attributes 'cpp', 'cc', etc. with hard-coded executable names; + # this is appropriate when a compiler class is for exactly one + # compiler/OS combination (eg. MSVCCompiler). Other compiler + # classes (UnixCCompiler, in particular) are driven by information + # discovered at run-time, since there are many different ways to do + # basically the same things with Unix C compilers. + + for key in args.keys(): + if not self.executables.has_key(key): + raise ValueError, \ + "unknown executable '%s' for class %s" % \ + (key, self.__class__.__name__) + self.set_executable(key, args[key]) + + # set_executables () + + def set_executable(self, key, value): + if type(value) is StringType: + setattr(self, key, split_quoted(value)) + else: + setattr(self, key, value) + + + def _find_macro (self, name): i = 0 for defn in self.macros: @@ -429,6 +479,8 @@ def preprocess (self, definitions as for 'compile()', which will augment the macros set with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a list of directory names that will be added to the default list. + + Raises PreprocessError on failure. """ pass @@ -440,8 +492,11 @@ def compile (self, debug=0, extra_preargs=None, extra_postargs=None): - """Compile one or more C/C++ source files. 'sources' must be a - list of strings, each one the name of a C/C++ source file. Return + + """Compile one or more source files. 'sources' must be a list of + filenames, most likely C/C++ files, but in reality anything that + can be handled by a particular compiler and compiler class + (eg. MSVCCompiler can handle resource files in 'sources'). Return a list of object filenames, one per source filename in 'sources'. Depending on the implementation, not all source files will necessarily be compiled, but all corresponding object filenames From c0d32c47f1960aae8b43c2efd4deeaf996740fc6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:09:14 +0000 Subject: [PATCH 0468/8469] Added the 'customize_compiler()' function, which plugs in the essential information about building Python extensions that we discovered in Python's makefile. Currently only needed on Unix, so does nothing on other systems. --- sysconfig.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 53da48264e..330d3b333c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -97,6 +97,23 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): # get_python_lib() +def customize_compiler (compiler): + """Do any platform-specific customization of the CCompiler instance + 'compiler'. Mainly needed on Unix, so we can plug in the information + that varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": + cc_cmd = CC + ' ' + OPT + compiler.set_executables( + preprocessor=CC + " -E", # not always! + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + CCSHARED, + linker_so=LDSHARED, + linker_exe=CC) + + compiler.shared_lib_extension = SO + + def get_config_h_filename(): """Return full pathname of installed config.h file.""" inc_dir = get_python_inc(plat_specific=1) @@ -260,6 +277,9 @@ def _init_nt(): # Windows. UnixCCompiler expects to find these values in sysconfig, so # here they are. The fact that other Windows compilers don't need # these values is pure luck (hmmm). + + # XXX I think these are now unnecessary... + g['CC'] = "cc" # not gcc? g['RANLIB'] = "ranlib" g['AR'] = "ar" From 9ce4a2b21ef10a62a81c34e979aa56e0f592d2b4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:10:46 +0000 Subject: [PATCH 0469/8469] Fixed a few silly bugs in my SWIG support code. (Hey, I said it was experimental and untested.) Call 'customize_compiler()' after getting CCompiler object. --- command/build_ext.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 6b7ec74190..f8df87a724 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -12,6 +12,7 @@ from types import * from distutils.core import Command from distutils.errors import * +from distutils.sysconfig import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension @@ -191,6 +192,7 @@ def run (self): verbose=self.verbose, dry_run=self.dry_run, force=self.force) + customize_compiler(self.compiler) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in @@ -453,14 +455,14 @@ def swig_sources (self, sources): for source in sources: (base, ext) = os.path.splitext(source) - if ext in self.swig_ext(): + if ext == ".i": # SWIG interface file new_sources.append(base + ".c") # umm, what if it's C++? - swig_files.append(source) + swig_sources.append(source) swig_targets[source] = new_sources[-1] else: new_sources.append(source) - if not swig_files: + if not swig_sources: return new_sources swig = self.find_swig() From ef29e55a0092ccf9c959cd1cdb5edc96edf4dc8f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:10:58 +0000 Subject: [PATCH 0470/8469] Call 'customize_compiler()' after getting CCompiler object. --- command/build_clib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/build_clib.py b/command/build_clib.py index 7106882d79..450dae1754 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -23,6 +23,7 @@ from types import * from distutils.core import Command from distutils.errors import * +from distutils.sysconfig import customize_compiler def show_compilers (): @@ -111,6 +112,7 @@ def run (self): verbose=self.verbose, dry_run=self.dry_run, force=self.force) + customize_compiler(self.compiler) if self.include_dirs is not None: self.compiler.set_include_dirs (self.include_dirs) From e4b7595cc2c3b3cfb5830579792155aa2b82494a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:12:14 +0000 Subject: [PATCH 0471/8469] Added PreprocessError and UnknownFileError (both used by CCompiler). --- errors.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/errors.py b/errors.py index 161705633c..a718f01a40 100644 --- a/errors.py +++ b/errors.py @@ -78,6 +78,9 @@ class DistutilsInternalError (DistutilsError): class CCompilerError (Exception): """Some compile/link operation failed.""" +class PreprocessError (CCompilerError): + """Failure to preprocess one or more C/C++ files.""" + class CompileError (CCompilerError): """Failure to compile one or more C/C++ source files.""" @@ -89,4 +92,5 @@ class LinkError (CCompilerError): """Failure to link one or more C/C++ object files into an executable or shared library file.""" - +class UnknownFileError (CCompilerError): + """Attempt to process an unknown file type.""" From b6aafbc5a3d6007b6579cc491ce55c9b34a64620 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:23:11 +0000 Subject: [PATCH 0472/8469] Fixed the "pre-link hook" so it actually works, mainly by renaming it to 'msvc_prelink_hack()', adding the parameters that it actually needs, and only calling it for MSVC compiler objects. Generally gave up on the idea of a general "hook" mechanism: deleted the empty 'precompile_hook()'. --- command/build_ext.py | 74 ++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index f8df87a724..0a5fa9cd0d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -188,7 +188,8 @@ def run (self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (compiler=self.compiler, + self.compiler = new_compiler (#compiler=self.compiler, + compiler="msvc", verbose=self.verbose, dry_run=self.dry_run, force=self.force) @@ -402,11 +403,6 @@ def build_extensions (self): if os.environ.has_key('CFLAGS'): extra_args.extend(string.split(os.environ['CFLAGS'])) - # Run any platform/compiler-specific hooks needed before - # compiling (currently none, but any hypothetical subclasses - # might find it useful to override this). - self.precompile_hook() - objects = self.compiler.compile (sources, output_dir=self.build_temp, #macros=macros, @@ -421,9 +417,9 @@ def build_extensions (self): objects.extend (ext.extra_objects) extra_args = ext.extra_link_args - # Run any platform/compiler-specific hooks needed between - # compiling and linking (currently needed only on Windows). - self.prelink_hook() + # Bunch of fixing-up we have to do for Microsoft's linker. + if self.compiler.compiler_type == 'msvc': + self.msvc_prelink_hack(sources, ext, extra_args) self.compiler.link_shared_object ( objects, ext_filename, @@ -504,12 +500,9 @@ def find_swig (self): # find_swig () - # -- Hooks --------------------------------------------------------- - - def precompile_hook (self): - pass + # -- Hooks 'n hacks ------------------------------------------------ - def prelink_hook (self): + def msvc_prelink_hack (self, sources, ext, extra_args): # XXX this is a kludge! Knowledge of specific compilers or # platforms really doesn't belong here; in an ideal world, the @@ -521,33 +514,32 @@ def prelink_hook (self): # Thus, kludges like this slip in occasionally. (This is no # excuse for committing more platform- and compiler-specific # kludges; they are to be avoided if possible!) - if self.compiler.compiler_type == 'msvc': - def_file = ext.export_symbol_file - if def_file is None: - source_dir = os.path.dirname (sources[0]) - ext_base = (string.split (ext.name, '.'))[-1] - def_file = os.path.join (source_dir, "%s.def" % ext_base) - if not os.path.exists (def_file): - def_file = None - - if def_file is not None: - extra_args.append ('/DEF:' + def_file) - else: - modname = string.split (ext.name, '.')[-1] - extra_args.append('/export:init%s'%modname) - - # The MSVC linker generates unneeded .lib and .exp files, - # which cannot be suppressed by any linker switches. So - # make sure they are generated in the temporary build - # directory. - implib_file = os.path.join ( - self.build_temp, - self.get_ext_libname (ext.name)) - extra_args.append ('/IMPLIB:' + implib_file) - self.mkpath (os.path.dirname (implib_file)) - # if MSVC - - # prelink_hook () + + def_file = ext.export_symbol_file + if def_file is None: + source_dir = os.path.dirname (sources[0]) + ext_base = (string.split (ext.name, '.'))[-1] + def_file = os.path.join (source_dir, "%s.def" % ext_base) + if not os.path.exists (def_file): + def_file = None + + if def_file is not None: + extra_args.append ('/DEF:' + def_file) + else: + modname = string.split (ext.name, '.')[-1] + extra_args.append('/export:init%s' % modname) + + # The MSVC linker generates unneeded .lib and .exp files, + # which cannot be suppressed by any linker switches. So + # make sure they are generated in the temporary build + # directory. + implib_file = os.path.join ( + self.build_temp, + self.get_ext_libname (ext.name)) + extra_args.append ('/IMPLIB:' + implib_file) + self.mkpath (os.path.dirname (implib_file)) + + # msvc_prelink_hack () # -- Name generators ----------------------------------------------- From 2ae918a80f3a4fd7b6cfad6add81e149bc52e8c4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:30:15 +0000 Subject: [PATCH 0473/8469] Removed some debugging code that slipped into the last checkin. Ensure that 'extra_args' (whether compile or link args) is never None. --- command/build_ext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0a5fa9cd0d..26d6981805 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -188,8 +188,7 @@ def run (self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (#compiler=self.compiler, - compiler="msvc", + self.compiler = new_compiler (compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) @@ -393,7 +392,7 @@ def build_extensions (self): # The environment variable should take precedence, and # any sensible compiler will give precendence to later # command line args. Hence we combine them in order: - extra_args = ext.extra_compile_args + extra_args = ext.extra_compile_args or [] # XXX and if we support CFLAGS, why not CC (compiler # executable), CPPFLAGS (pre-processor options), and LDFLAGS @@ -415,7 +414,7 @@ def build_extensions (self): # that go into the mix. if ext.extra_objects: objects.extend (ext.extra_objects) - extra_args = ext.extra_link_args + extra_args = ext.extra_link_args or [] # Bunch of fixing-up we have to do for Microsoft's linker. if self.compiler.compiler_type == 'msvc': From 7d785e9c7c3410b9c883c7bab41ebdcdfcab8244 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 25 Jun 2000 02:31:16 +0000 Subject: [PATCH 0474/8469] Define the 'executables' class attribute so the CCompiler constructor doesn't blow up. We don't currently use the 'set_executables()' bureaucracy, although it would be nice to do so for consistency with UnixCCompiler. --- msvccompiler.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 06d8501afa..2e80ed5fd7 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -167,6 +167,13 @@ class MSVCCompiler (CCompiler) : compiler_type = 'msvc' + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + # Private class data (need to distinguish C from C++ source for compiler) _c_extensions = ['.c'] _cpp_extensions = ['.cc','.cpp'] @@ -295,7 +302,7 @@ def create_static_lib (self, if extra_postargs: lib_args.extend (extra_postargs) try: - self.spawn ([self.link] + ld_args) + self.spawn ([self.lib] + lib_args) except DistutilsExecError, msg: raise LibError, msg From 2bc3b231e4cc5a7d5570923a0d49df5500171d35 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:21:22 +0000 Subject: [PATCH 0475/8469] Added 'include_dirs' parameters all over the place. Added 'check_lib()', which provides a subset of the functionality of 'check_func()' with a simpler interface and implementation. --- command/config.py | 58 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/command/config.py b/command/config.py index 570f71a5c1..5c3f26a716 100644 --- a/command/config.py +++ b/command/config.py @@ -112,24 +112,26 @@ def _gen_temp_sourcefile (self, body, headers, lang): file.close() return filename - def _preprocess (self, body, headers, lang): + def _preprocess (self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) out = "_configtest.i" self.temp_files.extend([src, out]) - self.compiler.preprocess(src, out) + self.compiler.preprocess(src, out, include_dirs=include_dirs) return (src, out) - def _compile (self, body, headers, lang): + def _compile (self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) if self.dump_source: dump_file(src, "compiling '%s':" % src) (obj,) = self.compiler.object_filenames([src]) self.temp_files.extend([src, obj]) - self.compiler.compile([src]) + self.compiler.compile([src], include_dirs=include_dirs) return (src, obj) - def _link (self, body, headers, libraries, library_dirs, lang): - (src, obj) = self._compile(body, headers, lang) + def _link (self, body, + headers, include_dirs, + libraries, library_dirs, lang): + (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] self.temp_files.append(prog) # XXX should be prog + exe_ext self.compiler.link_executable([obj], prog, @@ -159,7 +161,7 @@ def _clean (self, *filenames): # XXX need access to the header search path and maybe default macros. - def try_cpp (self, body=None, headers=None, lang="c"): + def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): """Construct a source file from 'body' (a string containing lines of C/C++ code) and 'headers' (a list of header files to include) and run it through the preprocessor. Return true if the @@ -177,7 +179,8 @@ def try_cpp (self, body=None, headers=None, lang="c"): self._clean() return ok - def search_cpp (self, pattern, body=None, headers=None, lang="c"): + def search_cpp (self, pattern, body=None, + headers=None, include_dirs=None, lang="c"): """Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a @@ -206,7 +209,7 @@ def search_cpp (self, pattern, body=None, headers=None, lang="c"): self._clean() return match - def try_compile (self, body, headers=None, lang="c"): + def try_compile (self, body, headers=None, include_dirs=None, lang="c"): """Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise. """ @@ -222,8 +225,8 @@ def try_compile (self, body, headers=None, lang="c"): self._clean() return ok - def try_link (self, - body, headers=None, + def try_link (self, body, + headers=None, include_dirs=None, libraries=None, library_dirs=None, lang="c"): """Try to compile and link a source file, built from 'body' and @@ -233,7 +236,8 @@ def try_link (self, from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: - self._link(body, headers, libraries, library_dirs, lang) + self._link(body, headers, include_dirs, + libraries, library_dirs, lang) ok = 1 except (CompileError, LinkError): ok = 0 @@ -242,8 +246,8 @@ def try_link (self, self._clean() return ok - def try_run (self, - body, headers=None, + def try_run (self, body, + headers=None, include_dirs=None, libraries=None, library_dirs=None, lang="c"): """Try to compile, link to an executable, and run a program @@ -253,7 +257,8 @@ def try_run (self, from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: - self._link(body, headers, libraries, library_dirs, lang) + self._link(body, headers, include_dirs, + libraries, library_dirs, lang) self.spawn([exe]) ok = 1 except (CompileError, LinkError, DistutilsExecError): @@ -268,7 +273,8 @@ def try_run (self, # (these are the ones that are actually likely to be useful # when implementing a real-world config command!) - def check_func (self, func, headers=None, + def check_func (self, func, + headers=None, include_dirs=None, libraries=None, library_dirs=None, decl=0, call=0): @@ -298,16 +304,30 @@ def check_func (self, func, headers=None, body.append("}") body = string.join(body, "\n") + "\n" - return self.try_link(body, headers, libraries, library_dirs) + return self.try_link(body, headers, include_dirs, + libraries, library_dirs) # check_func () - def check_header (self, header, lang="c"): + def check_lib (self, library, library_dirs=None, + headers=None, include_dirs=None): + """Determine if 'library' is available to be linked against, + without actually checking that any particular symbols are provided + by it. 'headers' will be used in constructing the source file to + be compiled, but the only effect of this is to check if all the + header files listed are available. + """ + self._check_compiler() + return self.try_link("int main (void) { }", + headers, include_dirs, [library], library_dirs) + + def check_header (self, header, include_dirs=None, + library_dirs=None, lang="c"): """Determine if the system header file named by 'header_file' exists and can be found by the preprocessor; return true if so, false otherwise. """ - return self.try_cpp(headers=[header]) + return self.try_cpp(headers=[header], include_dirs=include_dirs) # class config From 1930cf43c4152c2db35164b0dca4a8a85f58c37d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:24:07 +0000 Subject: [PATCH 0476/8469] Infrastructure support for the "bdist_wininst" command. --- command/__init__.py | 1 + command/bdist.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/command/__init__.py b/command/__init__.py index 95bce8d8c1..ef8e9ad694 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -20,4 +20,5 @@ 'bdist', 'bdist_dumb', 'bdist_rpm', + 'bdist_wininst', ] diff --git a/command/bdist.py b/command/bdist.py index 47d4cbc965..3fcbf7793d 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -55,6 +55,8 @@ class bdist (Command): 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), 'zip': ('bdist_dumb', "ZIP file"), + 'wininst': ('bdist_wininst', + "Windows executable installer"), } # establish the preferred order format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', 'zip'] From 78fe2e5e7ee63ad56dc426dd2afbd2c3f986d196 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:24:38 +0000 Subject: [PATCH 0477/8469] Thomas Heller's "bdist_wininst" command (unreviewed, untested). --- command/bdist_wininst.py | 448 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 448 insertions(+) create mode 100644 command/bdist_wininst.py diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py new file mode 100644 index 0000000000..6a4b4722ce --- /dev/null +++ b/command/bdist_wininst.py @@ -0,0 +1,448 @@ +"""distutils.command.bdist_wininst + +Implements the Distutils 'bdist_wininst' command: create a windows installer +exe-program.""" + +# created 2000/06/02, Thomas Heller + +__revision__ = "$Id$" + +import os, sys +from distutils.core import Command +from distutils.util import get_platform, create_tree, remove_tree +from distutils.errors import * + +class bdist_wininst (Command): + + description = "create a \"wininst\" built distribution" + + user_options = [('bdist-dir=', 'd', + "temporary directory for creating the distribution"), + ('keep-tree', 'k', + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), + ('target-compile', 'c', + "compile to .pyc on the target system"), + ('target-optimize', 'o', + "compile to .pyo on the target system"), + ('target-version=', 'v', + "require a specific python version" + + " on the target system (1.5 or 1.6)"), + ] + + def initialize_options (self): + self.bdist_dir = None + self.keep_tree = 0 + self.target_compile = 0 + self.target_optimize = 0 + self.target_version = None + + # initialize_options() + + + def finalize_options (self): + if self.bdist_dir is None: + bdist_base = self.get_finalized_command('bdist').bdist_base + self.bdist_dir = os.path.join(bdist_base, 'wininst') + if not self.target_version: + self.target_version = "" + else: + if not self.target_version in ("1.5", "1.6"): + raise DistutilsOptionError ( + "target version must be 1.5 or 1.6") + if self.distribution.has_ext_modules(): + short_version = sys.version[:3] + if self.target_version and self.target_version != short_version: + raise DistutilsOptionError ("target version can only be" + + short_version) + self.target_version = short_version + + # finalize_options() + + + def run (self): + + self.run_command ('build') + + # XXX don't use 'self.get_finalized_command()', because it always + # runs 'ensure_finalized()' on the command object; we explictly + # want a command object that has *not* been finalized, so we can set + # options on it! (The option we set, 'root', is so that we can do + # a proper "fake install" using this install command object.) + install = self.distribution.get_command_obj('install') + install.root = self.bdist_dir + + install_lib = self.distribution.get_command_obj('install_lib') + + install_lib.compile = 0 + install_lib.optimize = 0 + + # The packager (correct term in distutils speak?) can choose + # if pyc and pyo files should be created on the TARGET system + # instead at the SOURCE system. + +## # The compilation can only be done on the SOURCE system +## # for one python version (assuming 1.6 and 1.5 have incompatible +## # byte-codes). +## short_version = sys.version[:3] +## if self.target_version == short_version: +## if not self.target_compile: +## install_lib.compile = 1 +## if not self.target_optimize: +## install_lib.optimize = 1 + + install_lib.ensure_finalized() + + self.announce ("installing to %s" % self.bdist_dir) + install.ensure_finalized() + + install.run() + + # And make an archive relative to the root of the + # pseudo-installation tree. + archive_basename = "%s.win32" % self.distribution.get_fullname() + # XXX hack! Our archive MUST be relative to sys.prefix + # XXX What about .install_data, .install_scripts, ...? + root_dir = install.install_lib + arcname = self.make_archive (archive_basename, "zip", + root_dir=root_dir) + + self.create_exe (arcname) + + if not self.keep_tree: + remove_tree (self.bdist_dir, self.verbose, self.dry_run) + + # run() + + def create_inifile (self): + # create an inifile containing data describing the installation. + # This could be done without creating a real file, but + # a file is (at least) usefull for debugging bdist_wininst. + import string + + metadata = self.distribution.metadata + + ini_name = "%s.ini" % self.distribution.get_fullname() + + self.announce ("creating %s" % ini_name) + + inifile = open (ini_name, "w") + + # write the [metadata] section. values are written with repr()[1:], + # so they do not contain unprintable characters, and are not + # surrounded by quote chars + inifile.write ("[metadata]\n") + + # 'info' will be displayed in the installers dialog box, + # describing the items to be installed + info = metadata.long_description + '\n' + + for name in dir (metadata): + if (name != 'long_description'): + data = getattr (metadata, name) + if data: + info = info + ("\n %s: %s" % \ + (string.capitalize (name), data)) + inifile.write ("%s=%s\n" % (name, repr (data)[1:-1])) + + # The [setup] section contains entries controlling + # the installer runtime. + inifile.write ("\n[Setup]\n") + inifile.write ("info=%s\n" % repr (info)[1:-1]) + inifile.write ("pthname=%s.%s\n" % (metadata.name, metadata.version)) + inifile.write ("pyc_compile=%d\n" % self.target_compile) + inifile.write ("pyo_compile=%d\n" % self.target_optimize) + if self.target_version: + vers_minor = string.split (self.target_version, '.')[1] + inifile.write ("vers_minor=%s\n" % vers_minor) + + title = self.distribution.get_fullname() + inifile.write ("title=%s\n" % repr (title)[1:-1]) + inifile.close() + return ini_name + + # create_inifile() + + def create_exe (self, arcname): + import struct, zlib + + cfgdata = open (self.create_inifile()).read() + + comp_method = zlib.DEFLATED + co = zlib.compressobj (zlib.Z_DEFAULT_COMPRESSION, comp_method, -15) + zcfgdata = co.compress (cfgdata) + co.flush() + + installer_name = "%s.win32.exe" % self.distribution.get_fullname() + + self.announce ("creating %s" % installer_name) + + file = open (installer_name, "wb") + file.write (self.get_exe_bytes ()) + file.write (zcfgdata) + crc32 = zlib.crc32 (cfgdata) + header = struct.pack (" Date: Tue, 27 Jun 2000 01:37:10 +0000 Subject: [PATCH 0478/8469] Thomas Heller: added --swig-cpp option and fixed silly typos in SWIG support. Also supposedly made some change to where .lib files wind up under MSVC++, but I don't understand how to code is doing what Thomas says it's doing. --- command/build_ext.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 26d6981805..106faccb28 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -77,6 +77,8 @@ class build_ext (Command): "forcibly build everything (ignore file timestamps)"), ('compiler=', 'c', "specify the compiler type"), + ('swig-cpp', None, + "make SWIG create C++ files (default is C)"), ] help_options = [ @@ -101,6 +103,7 @@ def initialize_options (self): self.debug = None self.force = None self.compiler = None + self.swig_cpp = None def finalize_options (self): @@ -443,15 +446,20 @@ def swig_sources (self, sources): swig_sources = [] swig_targets = {} - # XXX this drops generated C files into the source tree, which + # XXX this drops generated C/C++ files into the source tree, which # is fine for developers who want to distribute the generated # source -- but there should be an option to put SWIG output in # the temp dir. + if self.swig_cpp: + target_ext = '.cpp' + else: + target_ext = '.c' + for source in sources: (base, ext) = os.path.splitext(source) if ext == ".i": # SWIG interface file - new_sources.append(base + ".c") # umm, what if it's C++? + new_sources.append(base + target_ext) swig_sources.append(source) swig_targets[source] = new_sources[-1] else: @@ -461,11 +469,14 @@ def swig_sources (self, sources): return new_sources swig = self.find_swig() - swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] # again, C++?!? + swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] + if self.swig_cpp: + swig_cmd.append ("-c++") for source in swig_sources: - self.announce ("swigging %s to %s" % (src, obj)) - self.spawn(swig_cmd + ["-o", swig_targets[source], source]) + target = swig_targets[source] + self.announce ("swigging %s to %s" % (source, target)) + self.spawn(swig_cmd + ["-o", target, source]) return new_sources @@ -528,10 +539,11 @@ def msvc_prelink_hack (self, sources, ext, extra_args): modname = string.split (ext.name, '.')[-1] extra_args.append('/export:init%s' % modname) - # The MSVC linker generates unneeded .lib and .exp files, - # which cannot be suppressed by any linker switches. So - # make sure they are generated in the temporary build - # directory. + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. implib_file = os.path.join ( self.build_temp, self.get_ext_libname (ext.name)) From f73b0b9df04af727d477c1f326fc1b82639b8ead Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:43:24 +0000 Subject: [PATCH 0479/8469] A-ha! Read Thomas' patch a little more carefully and figured it out: the 'implib_dir' attribute is back (only on NT, of course). --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 106faccb28..f8aa91cae3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -155,6 +155,7 @@ def finalize_options (self): # also Python's library directory must be appended to library_dirs if os.name == 'nt': self.library_dirs.append (os.path.join(sys.exec_prefix, 'libs')) + self.implib_dir = self.build_temp if self.debug: self.build_temp = os.path.join (self.build_temp, "Debug") else: @@ -545,7 +546,7 @@ def msvc_prelink_hack (self, sources, ext, extra_args): # directory. Since they have different names for debug and release # builds, they can go into the same directory. implib_file = os.path.join ( - self.build_temp, + self.implib_dir, self.get_ext_libname (ext.name)) extra_args.append ('/IMPLIB:' + implib_file) self.mkpath (os.path.dirname (implib_file)) From 603c444d6b9ead884a9c09ca25b5fb707ca622b6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:59:06 +0000 Subject: [PATCH 0480/8469] Fixed LDSHARED for AIX, based on a patch by Rene Liebscher. Ditched my old code that fixed relative paths in the Makefile -- didn't work, doomed to failure, etc. --- sysconfig.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 330d3b333c..9ca94ed9c8 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -222,21 +222,6 @@ def parse_makefile(fp, g=None): # bogus variable reference; just drop it since we can't deal del notdone[name] - # "Fix" all pathnames in the Makefile that are explicitly relative, - # ie. that start with "./". This is a kludge to fix the "./ld_so_aix" - # problem, the nature of which is that Python's installed Makefile - # refers to "./ld_so_aix", but when we are building extensions we are - # far from the directory where Python's Makefile (and ld_so_aix, for - # that matter) is installed. Unfortunately, there are several other - # relative pathnames in the Makefile, and this fix doesn't fix them, - # because the layout of Python's source tree -- which is what the - # Makefile refers to -- is not fully preserved in the Python - # installation. Grumble. - from os.path import normpath, join, dirname - for (name, value) in done.items(): - if value[0:2] == "./": - done[name] = normpath(join(dirname(fp.name), value)) - # save the results in the global dictionary g.update(done) return g @@ -257,6 +242,18 @@ def _init_posix(): raise DistutilsPlatformError, my_msg parse_makefile(file, g) + + # On AIX, there are wrong paths to the linker scripts in the Makefile + # -- these paths are relative to the Python source, but when installed + # the scripts are in another directory. + if sys.platform: # == 'aix4': # what about AIX 3.x ? + # Linker script is in the config directory, not in Modules as the + # Makefile says. + python_lib = get_python_lib(standard_lib=1) + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') + python_exp = os.path.join(python_lib, 'config', 'python.exp') + + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) def _init_nt(): From ecb70087dbb4512152365262d97e3879509cbec1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 27 Jun 2000 01:59:43 +0000 Subject: [PATCH 0481/8469] Oops, only do that AIX hack on AIX. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 9ca94ed9c8..b2aa3f2d1e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -246,7 +246,7 @@ def _init_posix(): # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. - if sys.platform: # == 'aix4': # what about AIX 3.x ? + if sys.platform == 'aix4': # what about AIX 3.x ? # Linker script is in the config directory, not in Modules as the # Makefile says. python_lib = get_python_lib(standard_lib=1) From 9a02fc21cdba079187b15393495606987817c20e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 00:36:40 +0000 Subject: [PATCH 0482/8469] Fixed to use 'reinitialize_command()' to fetch the "install" command object. --- command/bdist_dumb.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 51e35e4b15..f9c81fc247 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -58,12 +58,7 @@ def run (self): self.run_command ('build') - # XXX don't use 'self.get_finalized_command()', because it always runs - # 'ensure_finalized()' on the command object; we explictly want a - # command object that has *not* been finalized, so we can set - # options on it! (The option we set, 'root', is so that we can do - # a proper "fake install" using this install command object.) - install = self.distribution.get_command_obj('install') + install = self.reinitialize_command('install') install.root = self.bdist_dir self.announce ("installing to %s" % self.bdist_dir) From 60c49dce0d05efd5482eb0d8dc99f969a6b981f8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 00:56:20 +0000 Subject: [PATCH 0483/8469] Fixed to use 'reinitialize_command()' to fetch "install" and "install_lib" command objects. Various formatting tweaks, typo fixes in comments. --- command/bdist_wininst.py | 48 +++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 6a4b4722ce..d3d17721e1 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -7,14 +7,14 @@ __revision__ = "$Id$" -import os, sys +import sys, os, string from distutils.core import Command from distutils.util import get_platform, create_tree, remove_tree from distutils.errors import * class bdist_wininst (Command): - description = "create a \"wininst\" built distribution" + description = "create an executable installer for MS Windows" user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), @@ -64,22 +64,15 @@ def run (self): self.run_command ('build') - # XXX don't use 'self.get_finalized_command()', because it always - # runs 'ensure_finalized()' on the command object; we explictly - # want a command object that has *not* been finalized, so we can set - # options on it! (The option we set, 'root', is so that we can do - # a proper "fake install" using this install command object.) - install = self.distribution.get_command_obj('install') + install = self.reinitialize_command('install') install.root = self.bdist_dir - install_lib = self.distribution.get_command_obj('install_lib') - + install_lib = self.reinitialize_command('install_lib') install_lib.compile = 0 install_lib.optimize = 0 - # The packager (correct term in distutils speak?) can choose - # if pyc and pyo files should be created on the TARGET system - # instead at the SOURCE system. + # The packager can choose if .pyc and .pyo files should be created + # on the TARGET system instead at the SOURCE system. ## # The compilation can only be done on the SOURCE system ## # for one python version (assuming 1.6 and 1.5 have incompatible @@ -95,7 +88,6 @@ def run (self): self.announce ("installing to %s" % self.bdist_dir) install.ensure_finalized() - install.run() # And make an archive relative to the root of the @@ -103,10 +95,14 @@ def run (self): archive_basename = "%s.win32" % self.distribution.get_fullname() # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? + # [Perhaps require that all installation dirs be under sys.prefix + # on Windows? this will be acceptable until we start dealing + # with Python applications, at which point we should zip up + # the application directory -- and again everything can be + # under one dir --GPW] root_dir = install.install_lib arcname = self.make_archive (archive_basename, "zip", - root_dir=root_dir) - + root_dir=root_dir) self.create_exe (arcname) if not self.keep_tree: @@ -115,26 +111,23 @@ def run (self): # run() def create_inifile (self): - # create an inifile containing data describing the installation. + # Create an inifile containing data describing the installation. # This could be done without creating a real file, but - # a file is (at least) usefull for debugging bdist_wininst. - import string + # a file is (at least) useful for debugging bdist_wininst. metadata = self.distribution.metadata - - ini_name = "%s.ini" % self.distribution.get_fullname() + ini_name = "%s.ini" % metadata.get_fullname() self.announce ("creating %s" % ini_name) - inifile = open (ini_name, "w") - # write the [metadata] section. values are written with repr()[1:], - # so they do not contain unprintable characters, and are not - # surrounded by quote chars + # Write the [metadata] section. Values are written with + # repr()[1:-1], so they do not contain unprintable characters, and + # are not surrounded by quote chars. inifile.write ("[metadata]\n") - # 'info' will be displayed in the installers dialog box, - # describing the items to be installed + # 'info' will be displayed in the installer's dialog box, + # describing the items to be installed. info = metadata.long_description + '\n' for name in dir (metadata): @@ -173,7 +166,6 @@ def create_exe (self, arcname): zcfgdata = co.compress (cfgdata) + co.flush() installer_name = "%s.win32.exe" % self.distribution.get_fullname() - self.announce ("creating %s" % installer_name) file = open (installer_name, "wb") From 834a327e9f342c7903be01c24ecca10ff2c8138a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 01:20:35 +0000 Subject: [PATCH 0484/8469] Lyle Johnson's interface to Borland C++, with a few editorial comments by me. Two major points: * lots of overlap with MSVCCompiler; the common code really should be factored out into a base class, say WindowsCCompiler * it doesn't work: weird problem spawning the linker (see comment for details) --- bcppcompiler.py | 344 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 344 insertions(+) create mode 100644 bcppcompiler.py diff --git a/bcppcompiler.py b/bcppcompiler.py new file mode 100644 index 0000000000..6c9ac827c1 --- /dev/null +++ b/bcppcompiler.py @@ -0,0 +1,344 @@ +"""distutils.bcppcompiler + +Contains BorlandCCompiler, an implementation of the abstract CCompiler class +for the Borland C++ compiler. +""" + +# This implementation by Lyle Johnson, based on the original msvccompiler.py +# module and using the directions originally published by Gordon Williams. + +# XXX looks like there's a LOT of overlap between these two classes: +# someone should sit down and factor out the common code as +# WindowsCCompiler! --GPW + +# XXX Lyle reports that this doesn't quite work yet: +# """...but this is what I've got so far. The compile step works fine but +# when it runs the link step I get an "out of memory" failure. Since +# spawn() echoes the command it's trying to spawn, I can type the link line +# verbatim at the DOS prompt and it links the Windows DLL correctly -- so +# the syntax is correct. There's just some weird interaction going on when +# it tries to "spawn" the link process from within the setup.py script. I'm +# not really sure how to debug this one right off-hand; obviously there's +# nothing wrong with the "spawn()" function since it's working properly for +# the compile stage.""" + +__revision__ = "$Id$" + + +import sys, os, string +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options + + +class BCPPCompiler(CCompiler) : + """Concrete class that implements an interface to the Borland C/C++ + compiler, as defined by the CCompiler abstract class. + """ + + compiler_type = 'bcpp' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = _c_extensions + _cpp_extensions + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + + def __init__ (self, + verbose=0, + dry_run=0, + force=0): + + CCompiler.__init__ (self, verbose, dry_run, force) + + # These executables are assumed to all be in the path. + # Borland doesn't seem to use any special registry settings to + # indicate their installation locations. + + self.cc = "bcc32.exe" + self.link = "ilink32.exe" + self.lib = "tlib.exe" + + self.preprocess_options = None + self.compile_options = ['/tWM', '/O2', '/q'] + self.compile_options_debug = ['/tWM', '/Od', '/q'] + + self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x'] + self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x'] + self.ldflags_static = [] + + + # -- Worker methods ------------------------------------------------ + + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) + + if extra_postargs is None: + extra_postargs = [] + + pp_opts = gen_preprocess_options (macros, include_dirs) + compile_opts = extra_preargs or [] + compile_opts.append ('-c') + if debug: + compile_opts.extend (self.compile_options_debug) + else: + compile_opts.extend (self.compile_options) + + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] + + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + if ext in self._c_extensions: + input_opt = "" + elif ext in self._cpp_extensions: + input_opt = "-P" + + output_opt = "-o" + obj + + self.mkpath (os.path.dirname (obj)) + + # Compiler command line syntax is: "bcc32 [options] file(s)". + # Note that the source file names must appear at the end of + # the command line. + + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs + [src]) + except DistutilsExecError, msg: + raise CompileError, msg + + return objects + + # compile () + + + def create_static_lib (self, + objects, + output_libname, + output_dir=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (objects, output_dir) = self._fix_object_args (objects, output_dir) + output_filename = \ + self.library_filename (output_libname, output_dir=output_dir) + + if self._need_link (objects, output_filename): + lib_args = [output_filename, '/u'] + objects + if debug: + pass # XXX what goes here? + if extra_preargs: + lib_args[:0] = extra_preargs + if extra_postargs: + lib_args.extend (extra_postargs) + try: + self.spawn ([self.lib] + lib_args) + except DistutilsExecError, msg: + raise LibError, msg + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + # create_static_lib () + + + def link_shared_lib (self, + objects, + output_libname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + + self.link_shared_object (objects, + self.shared_library_name(output_libname), + output_dir=output_dir, + libraries=libraries, + library_dirs=library_dirs, + runtime_library_dirs=runtime_library_dirs, + export_symbols=export_symbols, + debug=debug, + extra_preargs=extra_preargs, + extra_postargs=extra_postargs, + build_temp=build_temp) + + + def link_shared_object (self, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + if self._need_link (objects, output_filename): + + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared + + startup_obj = 'c0d32' + + libraries.append ('mypylib') + libraries.append ('import32') + libraries.append ('cw32mt') + + # Create a temporary exports file for use by the linker + head, tail = os.path.split (output_filename) + modname, ext = os.path.splitext (tail) + def_file = os.path.join (build_temp, '%s.def' % modname) + f = open (def_file, 'w') + f.write ('EXPORTS\n') + for sym in (export_symbols or []): + f.write (' %s=_%s\n' % (sym, sym)) + + ld_args = ldflags + [startup_obj] + objects + \ + [',%s,,' % output_filename] + \ + libraries + [',' + def_file] + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) + + self.mkpath (os.path.dirname (output_filename)) + try: + self.spawn ([self.link] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg + + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + # link_shared_object () + + + def link_executable (self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options (self, + library_dirs, runtime_library_dirs, + libraries) + output_filename = output_progname + self.exe_extension + if output_dir is not None: + output_filename = os.path.join (output_dir, output_filename) + + if self._need_link (objects, output_filename): + + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + + ld_args = ldflags + lib_opts + \ + objects + ['/OUT:' + output_filename] + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend (extra_postargs) + + self.mkpath (os.path.dirname (output_filename)) + try: + self.spawn ([self.link] + ld_args) + except DistutilsExecError, msg: + raise LinkError, msg + else: + self.announce ("skipping %s (up-to-date)" % output_filename) + + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option (self, dir): + return "-L" + dir + + def runtime_library_dir_option (self, dir): + raise DistutilsPlatformError, \ + "don't know how to set runtime library search path for MSVC++" + + def library_option (self, lib): + return self.library_filename (lib) + + + def find_library_file (self, dirs, lib): + + for dir in dirs: + libfile = os.path.join (dir, self.library_filename (lib)) + if os.path.exists (libfile): + return libfile + + else: + # Oops, didn't find it in *any* of 'dirs' + return None + From 6d74cfe58c300042b6a6e67053efb05ef972621e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 01:25:27 +0000 Subject: [PATCH 0485/8469] Typo fix. --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 287137ee13..bb4760657c 100644 --- a/dist.py +++ b/dist.py @@ -730,7 +730,7 @@ def _set_command_options (self, command_obj, option_dict=None): def reinitialize_command (self, command): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet - finalized. This gives provides the opportunity to sneak option + finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied values from the config files and command line. You'll have to re-finalize the command object (by calling From de30582dec6027d2b0441578781cbbb71033a72f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 01:29:09 +0000 Subject: [PATCH 0486/8469] Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()' methods (but not 'link_executable()', hmmm). Currently only used by BCPPCompiler; it's a dummy parameter for UnixCCompiler and MSVCCompiler. Also added 'bcpp' to compiler table used by 'new_compiler()'. --- ccompiler.py | 10 ++++++---- msvccompiler.py | 11 +++++++---- unixccompiler.py | 11 ++++++++--- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index e97c97776a..20a5191ba3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -492,7 +492,6 @@ def compile (self, debug=0, extra_preargs=None, extra_postargs=None): - """Compile one or more source files. 'sources' must be a list of filenames, most likely C/C++ files, but in reality anything that can be handled by a particular compiler and compiler class @@ -572,8 +571,8 @@ def link_shared_lib (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): - + extra_postargs=None, + build_temp=None): """Link a bunch of stuff together to create a shared library file. Similar semantics to 'create_static_lib()', with the addition of other libraries to link against and directories to search for them. @@ -624,7 +623,8 @@ def link_shared_object (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): """Link a bunch of stuff together to create a shared object file. Much like 'link_shared_lib()', except the output filename is explicitly supplied as 'output_filename'. If 'output_dir' is @@ -814,6 +814,8 @@ def mkpath (self, name, mode=0777): "Cygwin port of GNU C Compiler for Win32"), 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', "Mingw32 port of GNU C Compiler for Win32"), + 'bcpp': ('bcppcompiler', 'BCPPCompiler', + "Borland C++ Compiler"), } def show_compilers(): diff --git a/msvccompiler.py b/msvccompiler.py index 2e80ed5fd7..db8bd35aca 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -1,4 +1,4 @@ -"""distutils.ccompiler +"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio.""" @@ -322,7 +322,8 @@ def link_shared_lib (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): self.link_shared_object (objects, self.shared_library_name(output_libname), @@ -333,7 +334,8 @@ def link_shared_lib (self, export_symbols=export_symbols, debug=debug, extra_preargs=extra_preargs, - extra_postargs=extra_postargs) + extra_postargs=extra_postargs, + build_temp=build_temp) def link_shared_object (self, @@ -346,7 +348,8 @@ def link_shared_object (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ diff --git a/unixccompiler.py b/unixccompiler.py index 85ce5df719..4772e1a8b5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -74,6 +74,7 @@ class UnixCCompiler (CCompiler): static_lib_format = shared_lib_format = "lib%s%s" + def __init__ (self, verbose=0, dry_run=0, @@ -199,7 +200,9 @@ def link_shared_lib (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): + self.link_shared_object ( objects, self.shared_library_filename (output_libname), @@ -210,7 +213,8 @@ def link_shared_lib (self, export_symbols, debug, extra_preargs, - extra_postargs) + extra_postargs, + build_temp) def link_shared_object (self, @@ -223,7 +227,8 @@ def link_shared_object (self, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ From 2a385bb0eca83d0735d51671439c5e1978ca4bd2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 28 Jun 2000 01:29:37 +0000 Subject: [PATCH 0487/8469] Lyle Johnson: pass in temp directory as 'build_temp' argument when calling 'link_shared_object()'. --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index f8aa91cae3..adf85d3287 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -430,7 +430,8 @@ def build_extensions (self): library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, extra_postargs=extra_args, - debug=self.debug) + debug=self.debug, + build_temp=self.build_temp) # build_extensions () From cce2862dcd7df9f3ed14f8c8277e9ba3fd768d98 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Jun 2000 14:48:01 +0000 Subject: [PATCH 0488/8469] typos fixed by Rob Hooft --- cmd.py | 2 +- command/build_ext.py | 4 ++-- util.py | 2 +- version.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd.py b/cmd.py index c9b5624f8a..d450ad320c 100644 --- a/cmd.py +++ b/cmd.py @@ -323,7 +323,7 @@ def execute (self, func, args, msg=None, level=1): should be disabled by the "dry run" flag, and should announce themselves if the current verbosity level is high enough. This method takes care of all that bureaucracy for you; all you have to - do is supply the funtion to call and an argument tuple for it (to + do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), a message to print if the verbosity level is high enough, and an optional verbosity threshold. diff --git a/command/build_ext.py b/command/build_ext.py index adf85d3287..54d48467bc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -1,7 +1,7 @@ """distutils.command.build_ext Implements the Distutils 'build_ext' command, for building extension -modules (currently limited to C extensions, should accomodate C++ +modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" # created 1999/08/09, Greg Ward @@ -385,7 +385,7 @@ def build_extensions (self): # Next, compile the source code to object files. # XXX not honouring 'define_macros' or 'undef_macros' -- the - # CCompiler API needs to change to accomodate this, and I + # CCompiler API needs to change to accommodate this, and I # want to do one thing at a time! # Two possible sources for extra compiler arguments: diff --git a/util.py b/util.py index 5c1de78997..ebfdf0abf5 100644 --- a/util.py +++ b/util.py @@ -28,7 +28,7 @@ def abspath(path): return os.path.normpath(path) -# More backwards compatability hacks +# More backwards compatibility hacks def extend (list, new_list): """Appends the list 'new_list' to 'list', just like the 'extend()' list method does in Python 1.5.2 -- but this works on earlier diff --git a/version.py b/version.py index 918a1ded43..8b9ef10670 100644 --- a/version.py +++ b/version.py @@ -207,7 +207,7 @@ def __cmp__ (self, other): # provides enough benefit to be worth using, and will submit their # version numbering scheme to its domination. The free-thinking # anarchists in the lot will never give in, though, and something needs -# to be done to accomodate them. +# to be done to accommodate them. # # Perhaps a "moderately strict" version class could be implemented that # lets almost anything slide (syntactically), and makes some heuristic From 78d7f6ae8b4d39977f5bc4efc043a136d80e9c96 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 02:06:29 +0000 Subject: [PATCH 0489/8469] Fixed 'findall()' so it only returns regular files -- no directories. Changed 'prune_file_list()' so it also prunes out RCS and CVS directories. Added 'is_regex' parameter to 'select_pattern()', 'exclude_pattern()', and 'translate_pattern()', so that you don't have to be constrained by the simple shell-glob-like pattern language, and can escape into full-blown regexes when needed. Currently this is only available in code -- it's not exposed in the manifest template mini-language. Added 'prune' option (controlled by --prune and --no-prune) to determine whether we call 'prune_file_list()' or not -- it's true by default. Fixed 'negative_opt' -- it was misnamed and not being seen by dist.py. Added --no-defaults to the option table, so it's seen by FancyGetopt. --- command/sdist.py | 72 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 5627ebb9e5..6f867e89d8 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -46,6 +46,14 @@ class sdist (Command): ('use-defaults', None, "include the default file set in the manifest " "[default; disable with --no-defaults]"), + ('no-defaults', None, + "don't include the default file set"), + ('prune', None, + "specifically exclude files/directories that should not be " + "distributed (build tree, RCS/CVS dirs, etc.) " + "[default; disable with --no-prune]"), + ('no-prune', None, + "don't automatically exclude anything"), ('manifest-only', 'o', "just regenerate the manifest and then stop " "(implies --force-manifest)"), @@ -64,7 +72,8 @@ class sdist (Command): "list available distribution formats", show_formats), ] - negative_opts = {'use-defaults': 'no-defaults'} + negative_opt = {'no-defaults': 'use-defaults', + 'no-prune': 'prune' } default_format = { 'posix': 'gztar', 'nt': 'zip' } @@ -78,6 +87,7 @@ def initialize_options (self): # 'use_defaults': if true, we will include the default file set # in the manifest self.use_defaults = 1 + self.prune = 1 self.manifest_only = 0 self.force_manifest = 0 @@ -217,8 +227,10 @@ def get_file_list (self): if template_exists: self.read_template () - # Prune away the build and source distribution directories - self.prune_file_list() + # Prune away any directories that don't belong in the source + # distribution + if self.prune: + self.prune_file_list() # File list now complete -- sort it so that higher-level files # come first @@ -509,18 +521,21 @@ def read_template (self): def prune_file_list (self): """Prune off branches that might slip into the file list as created - by 'read_template()', but really don't belong there: specifically, - the build tree (typically "build") and the release tree itself - (only an issue if we ran "sdist" previously with --keep-tree, or it - aborted). + by 'read_template()', but really don't belong there: + * the build tree (typically "build") + * the release tree itself (only an issue if we ran "sdist" + previously with --keep-tree, or it aborted) + * any RCS or CVS directories """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.exclude_pattern (self.files, None, prefix=build.build_base) self.exclude_pattern (self.files, None, prefix=base_dir) + self.exclude_pattern (self.files, r'/(RCS|CVS)/.*', is_regex=1) - def select_pattern (self, files, pattern, anchor=1, prefix=None): + def select_pattern (self, files, pattern, + anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'files' that match 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not quite the same as implemented by the 'fnmatch' module: '*' and '?' @@ -536,10 +551,15 @@ def select_pattern (self, files, pattern, anchor=1, prefix=None): (itself a pattern) and ending with 'pattern', with anything in between them, will match. 'anchor' is ignored in this case. + If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and + 'pattern' is assumed to be either a string containing a regex or a + regex object -- no translation is done, the regex is just compiled + and used as-is. + Return the list of matching strings, possibly empty. """ matches = [] - pattern_re = translate_pattern (pattern, anchor, prefix) + pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) self.debug_print("select_pattern: applying regex r'%s'" % pattern_re.pattern) for name in files: @@ -552,13 +572,14 @@ def select_pattern (self, files, pattern, anchor=1, prefix=None): # select_pattern () - def exclude_pattern (self, files, pattern, anchor=1, prefix=None): + def exclude_pattern (self, files, pattern, + anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match - 'pattern'. 'pattern', 'anchor', 'and 'prefix' are the same - as for 'select_pattern()', above. The list 'files' is modified - in place. + 'pattern'. Other parameters are the same as for + 'select_pattern()', above. The list 'files' is modified in place. """ - pattern_re = translate_pattern (pattern, anchor, prefix) + + pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern) for i in range (len(files)-1, -1, -1): @@ -674,6 +695,8 @@ def findall (dir = os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ + from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK + list = [] stack = [dir] pop = stack.pop @@ -688,8 +711,13 @@ def findall (dir = os.curdir): fullname = os.path.join (dir, name) else: fullname = name - list.append (fullname) - if os.path.isdir (fullname) and not os.path.islink(fullname): + + # Avoid excess stat calls -- just one will do, thank you! + stat = os.stat(fullname) + mode = stat[ST_MODE] + if S_ISREG(mode): + list.append (fullname) + elif S_ISDIR(mode) and not S_ISLNK(mode): push (fullname) return list @@ -716,10 +744,18 @@ def glob_to_re (pattern): # glob_to_re () -def translate_pattern (pattern, anchor=1, prefix=None): +def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): """Translate a shell-like wildcard pattern to a compiled regular - expression. Return the compiled regex. + expression. Return the compiled regex. If 'is_regex' true, + then 'pattern' is directly compiled to a regex (if it's a string) + or just returned as-is (assumes it's a regex object). """ + if is_regex: + if type(pattern) is StringType: + return re.compile(pattern) + else: + return pattern + if pattern: pattern_re = glob_to_re (pattern) else: From 0350ebe9b29608aada89136c1db880c4f3552330 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 02:16:24 +0000 Subject: [PATCH 0490/8469] Fixed so 'get_source_files()' calls 'check_extension_list()' -- that way, we can run "sdist" on a distribution with old-style extension structures even if we haven't built it yet. Bug spotted by Harry Gebel. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 54d48467bc..9bb7e77001 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -309,7 +309,7 @@ def check_extensions_list (self, extensions): def get_source_files (self): - + self.check_extension_list() filenames = [] # Wouldn't it be neat if we knew the names of header files too... From 41192ad621b245fd3985b4191348ab27cab4360d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 22:57:55 +0000 Subject: [PATCH 0491/8469] Cleaned up and reformatted by Rene Liebscher. More reformatting by me. Also added some editorial comments. --- cygwinccompiler.py | 208 ++++++++++++++++++++++++--------------------- 1 file changed, 113 insertions(+), 95 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index cc2ed5db66..7d43f02ff3 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -1,48 +1,55 @@ """distutils.cygwinccompiler -Contains the CygwinCCompiler class, a subclass of UnixCCompiler that handles -the Gnu Win32 C compiler. -It also contains the Mingw32CCompiler class which handles the mingw32 compiler -(same as cygwin in no-cygwin mode.) - +Provides the CygwinCCompiler class, a subclass of UnixCCompiler that +handles the Cygwin port of the GNU C compiler to Windows. It also contains +the Mingw32CCompiler class which handles the mingw32 port of GCC (same as +cygwin in no-cygwin mode). """ # created 2000/05/05, Rene Liebscher __revision__ = "$Id$" -import os,sys,string,tempfile +import os,sys,string from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler -# Because these compilers aren't configured in Python's config.h file by default -# we should at least warn the user if he used this unmodified version. -def check_if_config_h_is_gcc_ready(): - """ checks, if the gcc-compiler is mentioned in config.h - if it is not, compiling probably doesn't work """ - from distutils import sysconfig - import string,sys +# Because these compilers aren't configured in Python's config.h file by +# default we should at least warn the user if he is using a unmodified +# version. + +def check_config_h(): + """Checks if the GCC compiler is mentioned in config.h. If it is not, + compiling probably doesn't work, so print a warning to stderr. + """ + + # XXX the result of the check should be returned! + + from distutils import sysconfig + import string,sys + try: + # It would probably better to read single lines to search. + # But we do this only once, and it is fast enough + f=open(sysconfig.get_config_h_filename()) + s=f.read() + f.close() try: - # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough - f=open(sysconfig.get_config_h_filename()) - s=f.read() - f.close() - try: - string.index(s,"__GNUC__") # is somewhere a #ifdef __GNUC__ or something similar - except: - sys.stderr.write ("warning: Python's config.h doesn't seem to support your compiler.\n") - except: # unspecific error => ignore - pass + # is somewhere a #ifdef __GNUC__ or something similar + string.index(s,"__GNUC__") + except ValueError: + sys.stderr.write ("warning: "+ + "Python's config.h doesn't seem to support your compiler.\n") + except IOError: + # if we can't read this file, we cannot say it is wrong + # the compiler will complain later about this file as missing + pass # This is called when the module is imported, so we make this check only once -check_if_config_h_is_gcc_ready() +# XXX why not make it only when the compiler is needed? +check_config_h() -# XXX Things not currently handled: -# * see UnixCCompiler - class CygwinCCompiler (UnixCCompiler): compiler_type = 'cygwin' @@ -54,21 +61,22 @@ def __init__ (self, UnixCCompiler.__init__ (self, verbose, dry_run, force) - # our compiler uses other names - self.cc='gcc' - self.ld_shared='dllwrap' - self.ldflags_shared=[] - - # some variables to manage the differences between cygwin and mingw32 - self.dllwrap_options=["--target=i386-cygwin32"] - # specification of entry point is not necessary - - self.dll_additional_libraries=[ - # cygwin shouldn't need msvcrt, but without the dll's will crash - # perhaps something about initialization (Python uses it, too) + # Hard-code GCC because that's what this is all about. + # XXX optimization, warnings etc. should be customizable. + self.set_executables(compiler='gcc -O -Wall', + compiler_so='gcc -O -Wall', + linker_exe='gcc', + linker_so='dllwrap --target=i386-cygwin32') + + # cygwin and mingw32 need different sets of libraries + self.dll_libraries=[ + # cygwin shouldn't need msvcrt, + # but without the dll's will crash + # ( gcc version 2.91.57 ) + # perhaps something about initialization # mingw32 needs it in all cases - "msvcrt" - ] + "msvcrt" + ] # __init__ () @@ -80,79 +88,88 @@ def link_shared_object (self, library_dirs=None, runtime_library_dirs=None, export_symbols=None, - debug=0, + debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + build_temp=None): - if libraries==None: - libraries=[] + if libraries == None: + libraries = [] - python_library=["python"+str(sys.hexversion>>24)+str((sys.hexversion>>16)&0xff)] - libraries=libraries+python_library+self.dll_additional_libraries - - # if you don't need the def-file afterwards, it is - # better to use for it tempfile.mktemp() as its name - # (unix-style compilers don't like backslashes in filenames) - win_dll_def_file=string.replace(tempfile.mktemp(),"\\","/") - #win_dll_def_file=output_filename[:-len(self.shared_lib_extension)]+".def" - #win_dll_exp_file=output_filename[:-len(self.shared_lib_extension)]+".exp" - #win_dll_lib_file=output_filename[:-len(self.shared_lib_extension)]+".a" + # Additional libraries: the python library is always needed on + # Windows we need the python version without the dot, eg. '15' + + pythonlib = ("python%d%d" % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + libraries.append(pythonlib) + libraries.extend(self.dll_libraries) + + # name of extension + + # XXX WRONG WRONG WRONG + # this is NOT the place to make guesses about Python namespaces; + # that MUST be done in build_ext.py + + if not debug: + ext_name = os.path.basename(output_filename)[:-len(".pyd")] + else: + ext_name = os.path.basename(output_filename)[:-len("_d.pyd")] + + def_file = os.path.join(build_temp, ext_name + ".def") + #exp_file = os.path.join(build_temp, ext_name + ".exp") + #lib_file = os.path.join(build_temp, 'lib' + ext_name + ".a") # Make .def file - # (It would probably better to check if we really need this, but for this we had to - # insert some unchanged parts of UnixCCompiler, and this is not what I want.) - f=open(win_dll_def_file,"w") + # (It would probably better to check if we really need this, + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) + f = open(def_file,"w") f.write("EXPORTS\n") # intro - # always export a function "init"+module_name - if not debug: - f.write("init"+os.path.basename(output_filename)[:-len(self.shared_lib_extension)]+"\n") - else: # in debug mode outfile_name is something like XXXXX_d.pyd - f.write("init"+os.path.basename(output_filename)[:-(len(self.shared_lib_extension)+2)]+"\n") - # if there are more symbols to export - # insert code here to write them in f - if export_symbols!=None: + if export_symbols == None: + # export a function "init" + ext_name + f.write("init" + ext_name + "\n") + else: + # if there are more symbols to export write them into f for sym in export_symbols: - f.write(sym+"\n") + f.write(sym+"\n") f.close() - if extra_preargs==None: - extra_preargs=[] + if extra_preargs == None: + extra_preargs = [] - extra_preargs=extra_preargs+[ + extra_preargs = extra_preargs + [ #"--verbose", - #"--output-exp",win_dll_exp_file, - #"--output-lib",win_dll_lib_file, - "--def",win_dll_def_file - ]+ self.dllwrap_options + #"--output-exp",exp_file, + #"--output-lib",lib_file, + "--def",def_file + ] - # who wants symbols and a many times greater output file + # who wants symbols and a many times larger output file # should explicitely switch the debug mode on - # otherwise we let dllwrap strip the outputfile - # (On my machine unstripped_file=stripped_file+254KB + # otherwise we let dllwrap strip the output file + # (On my machine unstripped_file = stripped_file + 254KB # 10KB < stripped_file < ??100KB ) if not debug: - extra_preargs=extra_preargs+["-s"] - - try: - UnixCCompiler.link_shared_object(self, + extra_preargs = extra_preargs + ["-s"] + + UnixCCompiler.link_shared_object(self, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, - None, # export_symbols, we do this with our def-file + None, # export_symbols, we do this with our def-file debug, extra_preargs, - extra_postargs) - finally: - # we don't need the def-file anymore - os.remove(win_dll_def_file) + extra_postargs, + build_temp) # link_shared_object () # class CygwinCCompiler + # the same as cygwin plus some additional parameters class Mingw32CCompiler (CygwinCCompiler): @@ -165,14 +182,15 @@ def __init__ (self, CygwinCCompiler.__init__ (self, verbose, dry_run, force) - self.ccflags = self.ccflags + ["-mno-cygwin"] - self.dllwrap_options=[ - # mingw32 doesn't really need 'target' - # and cygwin too (it seems, it is enough - # to specify a different entry point) - #"--target=i386-mingw32", - "--entry","_DllMain@12" - ] + self.set_executables(compiler='gcc -mno-cygwin -O -Wall', + compiler_so='gcc -mno-cygwin -O -Wall', + linker_exe='gcc -mno-cygwin', + linker_so='dllwrap' + + ' --target=i386-mingw32' + + ' --entry _DllMain@12') + # mingw32 doesn't really need 'target' and cygwin too (it seems, + # it is enough to specify a different entry point) + # no additional libraries need # (only msvcrt, which is already added by CygwinCCompiler) From ac971ce5217faf3cac2d2b9bf69d347dac0ca08c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 22:59:10 +0000 Subject: [PATCH 0492/8469] Changed to use _winreg module instead of winreg. --- msvccompiler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index db8bd35aca..6acd4efd0d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -20,14 +20,14 @@ _can_read_reg = 0 try: - import winreg + import _winreg _can_read_reg = 1 - hkey_mod = winreg + hkey_mod = _winreg - RegOpenKeyEx = winreg.OpenKeyEx - RegEnumKey = winreg.EnumKey - RegEnumValue = winreg.EnumValue - RegError = winreg.error + RegOpenKeyEx = _winreg.OpenKeyEx + RegEnumKey = _winreg.EnumKey + RegEnumValue = _winreg.EnumValue + RegError = _winreg.error except ImportError: try: From 9d71d05b4198ad054d20534d5714d1a1a8ce8877 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 23:04:59 +0000 Subject: [PATCH 0493/8469] On second thought, first try for _winreg, and then winreg. Only if both fail do we try for win32api/win32con. If *those* both fail, then we don't have registry access. Phew! --- msvccompiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 6acd4efd0d..ae5e2d767a 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -20,7 +20,11 @@ _can_read_reg = 0 try: - import _winreg + try: + import _winreg + except ImportError: + import winreg # for pre-2000/06/29 CVS Python + _can_read_reg = 1 hkey_mod = _winreg From 6165d95cb15b50fb4e20dd91ae8879229e231f06 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 23:09:20 +0000 Subject: [PATCH 0494/8469] Don't try to guess the name of a .def file -- if one is supplied, use it, otherwise just generate an '/export:' option. --- command/build_ext.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 9bb7e77001..4b5aaab8ef 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -528,12 +528,6 @@ def msvc_prelink_hack (self, sources, ext, extra_args): # kludges; they are to be avoided if possible!) def_file = ext.export_symbol_file - if def_file is None: - source_dir = os.path.dirname (sources[0]) - ext_base = (string.split (ext.name, '.'))[-1] - def_file = os.path.join (source_dir, "%s.def" % ext_base) - if not os.path.exists (def_file): - def_file = None if def_file is not None: extra_args.append ('/DEF:' + def_file) From 734a9d18a8887ba73bcba4bf355a7fd271b2a7d9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 29 Jun 2000 23:50:19 +0000 Subject: [PATCH 0495/8469] Allow 2.0 on the list of target versions. NB. this isn't enough: the GUI part, misc/install.c, still needs to be updated, and it looks like a non-trivial change. --- command/bdist_wininst.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d3d17721e1..b81c4d4179 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -27,7 +27,7 @@ class bdist_wininst (Command): "compile to .pyo on the target system"), ('target-version=', 'v', "require a specific python version" + - " on the target system (1.5 or 1.6)"), + " on the target system (1.5 or 1.6/2.0)"), ] def initialize_options (self): @@ -47,9 +47,9 @@ def finalize_options (self): if not self.target_version: self.target_version = "" else: - if not self.target_version in ("1.5", "1.6"): + if not self.target_version in ("1.5", "1.6", "2.0"): raise DistutilsOptionError ( - "target version must be 1.5 or 1.6") + "target version must be 1.5, 1.6, or 2.0") if self.distribution.has_ext_modules(): short_version = sys.version[:3] if self.target_version and self.target_version != short_version: @@ -74,8 +74,8 @@ def run (self): # The packager can choose if .pyc and .pyo files should be created # on the TARGET system instead at the SOURCE system. -## # The compilation can only be done on the SOURCE system -## # for one python version (assuming 1.6 and 1.5 have incompatible +## # The compilation can only be done on the SOURCE system for one +## # python version (assuming 1.6/2.0 and 1.5 have incompatible ## # byte-codes). ## short_version = sys.version[:3] ## if self.target_version == short_version: From 67211d1e7cc101f970c3053015b8da87d889de28 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 30 Jun 2000 02:54:36 +0000 Subject: [PATCH 0496/8469] Bump version to 0.9. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2ba82bd58d..ded0899c76 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9pre" +__version__ = "0.9" From a951e20878ee09dfd00a555b89ca61fabe4f79ff Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 30 Jun 2000 19:37:59 +0000 Subject: [PATCH 0497/8469] Simplify the registry-module-finding code: _winreg or win32api/win32con. This'll work fine with 2.0 or 1.5.2, but is less than ideal for 1.6a1/a2. But the code to accomodate 1.6a1/a2 was released with Distutils 0.9, so it can go away now. --- msvccompiler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index ae5e2d767a..e58e6c10c8 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -20,10 +20,7 @@ _can_read_reg = 0 try: - try: - import _winreg - except ImportError: - import winreg # for pre-2000/06/29 CVS Python + import _winreg _can_read_reg = 1 hkey_mod = _winreg From 07f383457ff22083cc4b09c58be345d5d09b80ea Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 5 Jul 2000 03:06:46 +0000 Subject: [PATCH 0498/8469] Added the --dist-dir option to control where the archive(s) are put; defaults to 'dist' (ie. no longer in the distribution root). --- command/sdist.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 6f867e89d8..2d31640f44 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -64,6 +64,9 @@ class sdist (Command): ('keep-tree', 'k', "keep the distribution tree around after creating " + "archive file(s)"), + ('dist-dir=', 'd', + "directory to put the source distribution archive(s) in " + "[default: dist]"), ] @@ -94,6 +97,7 @@ def initialize_options (self): self.formats = None self.keep_tree = 0 + self.dist_dir = None self.archive_files = None @@ -118,6 +122,9 @@ def finalize_options (self): raise DistutilsOptionError, \ "unknown archive format '%s'" % bad_format + if self.dist_dir is None: + self.dist_dir = "dist" + def run (self): @@ -667,11 +674,14 @@ def make_distribution (self): # Don't warn about missing meta-data here -- should be (and is!) # done elsewhere. base_dir = self.distribution.get_fullname() + base_name = os.path.join(self.dist_dir, base_dir) self.make_release_tree (base_dir, self.files) archive_files = [] # remember names of files we create + if self.dist_dir: + self.mkpath(self.dist_dir) for fmt in self.formats: - file = self.make_archive (base_dir, fmt, base_dir=base_dir) + file = self.make_archive (base_name, fmt, base_dir=base_dir) archive_files.append(file) self.archive_files = archive_files From 0b393c97f576061b8565a7b373788f7046f28148 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 5 Jul 2000 03:07:18 +0000 Subject: [PATCH 0499/8469] Added the --dist-dir option that the "bdist_*" will use to control where they place their output files. --- command/bdist.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/command/bdist.py b/command/bdist.py index 3fcbf7793d..100563a9d1 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -34,6 +34,9 @@ class bdist (Command): "temporary directory for creating built distributions"), ('formats=', None, "formats for distribution (comma-separated list)"), + ('dist-dir=', 'd', + "directory to put final built distributions in " + "[default: dist]"), ] help_options = [ @@ -65,6 +68,7 @@ class bdist (Command): def initialize_options (self): self.bdist_base = None self.formats = None + self.dist_dir = None # initialize_options() @@ -86,6 +90,9 @@ def finalize_options (self): raise DistutilsPlatformError, \ "don't know how to create built distributions " + \ "on platform %s" % os.name + + if self.dist_dir is None: + self.dist_dir = "dist" # finalize_options() From 8efd9f49e8f828de05c505aed52f32b17a9a91ad Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 5 Jul 2000 03:07:37 +0000 Subject: [PATCH 0500/8469] Added --dist-dir option to control where output archive(s) go. --- command/bdist_dumb.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index f9c81fc247..805aa0a9eb 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -24,6 +24,8 @@ class bdist_dumb (Command): ('keep-tree', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] default_format = { 'posix': 'gztar', @@ -34,6 +36,7 @@ def initialize_options (self): self.bdist_dir = None self.format = None self.keep_tree = 0 + self.dist_dir = None # initialize_options() @@ -51,6 +54,8 @@ def finalize_options (self): ("don't know how to create dumb built distributions " + "on platform %s") % os.name + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() @@ -71,7 +76,8 @@ def run (self): get_platform()) print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format - self.make_archive (archive_basename, self.format, + self.make_archive (os.path.join(self.dist_dir, archive_basename), + self.format, root_dir=self.bdist_dir) if not self.keep_tree: From 93518e1e37741f335e5aa118799826d5e6b5abbc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 5 Jul 2000 03:08:55 +0000 Subject: [PATCH 0501/8469] Fixed so the ZIP file (which is bundled into an executable) goes in the temporary directory ('bdist_base'). Added --dist-dir option to control where the executable is put. --- command/bdist_wininst.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b81c4d4179..0c53bf9e6b 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -28,6 +28,8 @@ class bdist_wininst (Command): ('target-version=', 'v', "require a specific python version" + " on the target system (1.5 or 1.6/2.0)"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), ] def initialize_options (self): @@ -36,6 +38,7 @@ def initialize_options (self): self.target_compile = 0 self.target_optimize = 0 self.target_version = None + self.dist_dir = None # initialize_options() @@ -57,6 +60,8 @@ def finalize_options (self): short_version) self.target_version = short_version + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + # finalize_options() @@ -92,7 +97,10 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. - archive_basename = "%s.win32" % self.distribution.get_fullname() + fullname = self.distribution.get_fullname() + archive_basename = os.path.join(self.bdist_dir, + "%s.win32" % fullname) + # XXX hack! Our archive MUST be relative to sys.prefix # XXX What about .install_data, .install_scripts, ...? # [Perhaps require that all installation dirs be under sys.prefix @@ -103,7 +111,7 @@ def run (self): root_dir = install.install_lib arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) - self.create_exe (arcname) + self.create_exe (arcname, fullname) if not self.keep_tree: remove_tree (self.bdist_dir, self.verbose, self.dry_run) @@ -156,7 +164,7 @@ def create_inifile (self): # create_inifile() - def create_exe (self, arcname): + def create_exe (self, arcname, fullname): import struct, zlib cfgdata = open (self.create_inifile()).read() @@ -165,7 +173,8 @@ def create_exe (self, arcname): co = zlib.compressobj (zlib.Z_DEFAULT_COMPRESSION, comp_method, -15) zcfgdata = co.compress (cfgdata) + co.flush() - installer_name = "%s.win32.exe" % self.distribution.get_fullname() + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) self.announce ("creating %s" % installer_name) file = open (installer_name, "wb") From 9f4f35f3c5fe3f538355af050e65e951997b2dfb Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Fri, 7 Jul 2000 20:45:21 +0000 Subject: [PATCH 0502/8469] fix inconsistent use of tabs and spaces --- ccompiler.py | 2 +- command/build_ext.py | 10 +++++----- command/install_headers.py | 2 +- dist.py | 34 +++++++++++++++++----------------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 20a5191ba3..933060aeb2 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -828,7 +828,7 @@ def show_compilers(): from distutils.fancy_getopt import FancyGetopt compilers = [] for compiler in compiler_class.keys(): - compilers.append(("compiler="+compiler, None, + compilers.append(("compiler="+compiler, None, compiler_class[compiler][2])) compilers.sort() pretty_printer = FancyGetopt(compilers) diff --git a/command/build_ext.py b/command/build_ext.py index 4b5aaab8ef..6456ad498f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -370,12 +370,12 @@ def build_extensions (self): ext_filename = os.path.join (self.build_lib, self.get_ext_filename(fullname)) - if not (self.force or newer_group(sources, ext_filename, 'newer')): - self.announce ("skipping '%s' extension (up-to-date)" % + if not (self.force or newer_group(sources, ext_filename, 'newer')): + self.announce ("skipping '%s' extension (up-to-date)" % ext.name) - continue # 'for' loop over all extensions - else: - self.announce ("building '%s' extension" % ext.name) + continue # 'for' loop over all extensions + else: + self.announce ("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list diff --git a/command/install_headers.py b/command/install_headers.py index 991985b4ad..2e6ce8690b 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -22,7 +22,7 @@ class install_headers (Command): def initialize_options (self): self.install_dir = None - self.outfiles = [] + self.outfiles = [] def finalize_options (self): self.set_undefined_options('install', diff --git a/dist.py b/dist.py index bb4760657c..5f81c88773 100644 --- a/dist.py +++ b/dist.py @@ -275,13 +275,13 @@ def find_config_files (self): # What to call the per-user config file if os.name == 'posix': - user_filename = ".pydistutils.cfg" - else: - user_filename = "pydistutils.cfg" + user_filename = ".pydistutils.cfg" + else: + user_filename = "pydistutils.cfg" # And look for the user config file - if os.environ.has_key('HOME'): - user_file = os.path.join(os.environ.get('HOME'), user_filename) + if os.environ.has_key('HOME'): + user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) @@ -439,7 +439,7 @@ def _parse_command_opts (self, parser, args): # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. - if (hasattr(cmd_class, 'help_options') and + if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) else: @@ -457,17 +457,17 @@ def _parse_command_opts (self, parser, args): self._show_help(parser, display_options=0, commands=[cmd_class]) return - if (hasattr(cmd_class, 'help_options') and + if (hasattr(cmd_class, 'help_options') and type (cmd_class.help_options) is ListType): - help_option_found=0 - for (help_option, short, desc, func) in cmd_class.help_options: - if hasattr(opts, parser.get_attr_name(help_option)): - help_option_found=1 + help_option_found=0 + for (help_option, short, desc, func) in cmd_class.help_options: + if hasattr(opts, parser.get_attr_name(help_option)): + help_option_found=1 #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): - func() + func() else: raise DistutilsClassError, \ ("invalid help function %s for help option '%s': " @@ -475,7 +475,7 @@ def _parse_command_opts (self, parser, args): (`func`, help_option) if help_option_found: - return + return # Put the options from the command-line into their official # holding pen, the 'command_options' dictionary. @@ -526,12 +526,12 @@ def _show_help (self, klass = command else: klass = self.get_command_class (command) - if (hasattr(klass, 'help_options') and + if (hasattr(klass, 'help_options') and type (klass.help_options) is ListType): - parser.set_option_table (klass.user_options + + parser.set_option_table (klass.user_options + fix_help_options(klass.help_options)) - else: - parser.set_option_table (klass.user_options) + else: + parser.set_option_table (klass.user_options) parser.print_help ("Options for '%s' command:" % klass.__name__) print From e522e80e068bcf976636e4454d1e6e127436f551 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 14 Jul 2000 13:35:07 +0000 Subject: [PATCH 0503/8469] Typo fix from Bastian Kleineidam --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 6456ad498f..37d19c7db4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -309,7 +309,7 @@ def check_extensions_list (self, extensions): def get_source_files (self): - self.check_extension_list() + self.check_extensions_list(self.extensions) filenames = [] # Wouldn't it be neat if we knew the names of header files too... From ac99c62e48886255ec93847fec136b5b81d9122e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Jul 2000 01:21:54 +0000 Subject: [PATCH 0504/8469] Typo fix from David Ascher. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 37d19c7db4..2ede447fed 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -292,7 +292,7 @@ def check_extensions_list (self, extensions): ext.undef_macros = [] for macro in macros: if not (type(macro) is TupleType and - 1 <= len(macros) <= 2): + 1 <= len(macro) <= 2): raise DistutilsSetupError, \ ("'macros' element of build info dict " "must be 1- or 2-tuple") From 20550ceda600efdce508bd686c887ce88b2c09e9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Jul 2000 01:23:19 +0000 Subject: [PATCH 0505/8469] Fix to call 'library_filename()' instead of the non-existent 'shared_library_filename()'. --- unixccompiler.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 4772e1a8b5..799560c396 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -205,7 +205,7 @@ def link_shared_lib (self, self.link_shared_object ( objects, - self.shared_library_filename (output_libname), + self.library_filename (output_libname, lib_type='shared'), output_dir, libraries, library_dirs, @@ -320,8 +320,10 @@ def library_option (self, lib): def find_library_file (self, dirs, lib): for dir in dirs: - shared = os.path.join (dir, self.shared_library_filename (lib)) - static = os.path.join (dir, self.library_filename (lib)) + shared = os.path.join ( + dir, self.library_filename (lib, lib_type='shared')) + static = os.path.join ( + dir, self.library_filename (lib, lib_type='static')) # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm From ba1b7bf236f18fb1997ae789505856bb315c8f37 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Jul 2000 01:58:45 +0000 Subject: [PATCH 0506/8469] Remove unused 'search_dir()' method. Comment tweak. --- command/sdist.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 2d31640f44..3b91170cb3 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -319,26 +319,6 @@ def add_defaults (self): # add_defaults () - def search_dir (self, dir, pattern=None): - """Recursively find files under 'dir' matching 'pattern' (a string - containing a Unix-style glob pattern). If 'pattern' is None, find - all files under 'dir'. Return the list of found filenames. - """ - allfiles = findall (dir) - if pattern is None: - return allfiles - - pattern_re = translate_pattern (pattern) - files = [] - for file in allfiles: - if pattern_re.match (os.path.basename (file)): - files.append (file) - - return files - - # search_dir () - - def recursive_exclude_pattern (self, dir, pattern=None): """Remove filenames from 'self.files' that are under 'dir' and whose basenames match 'pattern'. @@ -717,7 +697,7 @@ def findall (dir = os.curdir): names = os.listdir (dir) for name in names: - if dir != os.curdir: # avoid the dreaded "./" syndrome + if dir != os.curdir: # avoid leading "./" fullname = os.path.join (dir, name) else: fullname = name From 01105a3143f4096e4916f9fd95e219dc9d6d3fde Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Jul 2000 02:13:20 +0000 Subject: [PATCH 0507/8469] Fixed a grab-bag of typos spotted by Rob Hooft. --- ccompiler.py | 2 +- cmd.py | 2 +- command/bdist_rpm.py | 2 +- command/build_ext.py | 2 +- command/build_scripts.py | 2 +- command/install_data.py | 2 +- cygwinccompiler.py | 2 +- dist.py | 4 ++-- util.py | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 933060aeb2..eb6200f638 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -304,7 +304,7 @@ def set_runtime_library_dirs (self, dirs): def add_link_object (self, object): """Add 'object' to the list of object files (or analogues, such as - explictly named library files or the output of "resource + explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. """ diff --git a/cmd.py b/cmd.py index d450ad320c..8beb5d443e 100644 --- a/cmd.py +++ b/cmd.py @@ -55,7 +55,7 @@ def __init__ (self, dist): # commands fallback on the Distribution's behaviour. None means # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real - # value of each flag is a touch complicatd -- hence "self.verbose" + # value of each flag is a touch complicated -- hence "self.verbose" # (etc.) will be handled by __getattr__, below. self._verbose = None self._dry_run = None diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 7f58a1da6b..3302eea24b 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -400,7 +400,7 @@ def _make_spec_file(self): ] for (rpm_opt, attr, default) in script_options: - # Insert contents of file refered to, if no file is refered to + # Insert contents of file referred to, if no file is refered to # use 'default' as contents of script val = getattr(self, attr) if val or default: diff --git a/command/build_ext.py b/command/build_ext.py index 2ede447fed..c04036b02e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -394,7 +394,7 @@ def build_extensions (self): # elegant, but people seem to expect it and I # guess it's useful) # The environment variable should take precedence, and - # any sensible compiler will give precendence to later + # any sensible compiler will give precedence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] diff --git a/command/build_scripts.py b/command/build_scripts.py index 6467e65b83..17fae8f7b5 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -46,7 +46,7 @@ def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first - line to refer to the current Python intepreter as we copy. + line to refer to the current Python interpreter as we copy. """ outfiles = [] self.mkpath(self.build_dir) diff --git a/command/install_data.py b/command/install_data.py index 716febb5c6..9193f91924 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -18,7 +18,7 @@ class install_data (Command): user_options = [ ('install-dir=', 'd', - "base directory for installating data files " + "base directory for installing data files " "(default: installation base dir)"), ('root=', None, "install everything relative to this alternate root directory"), diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 7d43f02ff3..650627f5cf 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -145,7 +145,7 @@ def link_shared_object (self, ] # who wants symbols and a many times larger output file - # should explicitely switch the debug mode on + # should explicitly switch the debug mode on # otherwise we let dllwrap strip the output file # (On my machine unstripped_file = stripped_file + 254KB # 10KB < stripped_file < ??100KB ) diff --git a/dist.py b/dist.py index 5f81c88773..ed829fe480 100644 --- a/dist.py +++ b/dist.py @@ -167,7 +167,7 @@ def __init__ (self, attrs=None): # It's only safe to query 'have_run' for a command class that has # been instantiated -- a false value will be inserted when the # command object is created, and replaced with a true value when - # the command is succesfully run. Thus it's probably best to use + # the command is successfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. self.have_run = {} @@ -677,7 +677,7 @@ def get_command_class (self, command): def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object - is cached on a previous call to 'get_command_obj()'; if no comand + is cached on a previous call to 'get_command_obj()'; if no command object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ diff --git a/util.py b/util.py index ebfdf0abf5..0bff3a5b85 100644 --- a/util.py +++ b/util.py @@ -105,7 +105,7 @@ def check_environ (): guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) - PLAT - desription of the current platform, including hardware + PLAT - description of the current platform, including hardware and OS (see 'get_platform()') """ @@ -125,7 +125,7 @@ def check_environ (): def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. - Every occurence of '$' followed by a name, or a name enclosed in + Every occurrence of '$' followed by a name, or a name enclosed in braces, is considered a variable. Every variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/ From 5338783b1c404117bb02b80412e4cc94b5380469 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 27 Jul 2000 02:17:40 +0000 Subject: [PATCH 0508/8469] Bump version to 0.9.1pre. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index ded0899c76..f6af3c9dac 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9" +__version__ = "0.9.1pre" From e709ad9b04b0dca03c690faa222979297b759f74 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 00:04:17 +0000 Subject: [PATCH 0509/8469] Provides the FileList class for building a list of filenames by exploring the filesystem, and filtering the list by applying various patterns. Initial revision (almost) as supplied in a patch by Rene Liebscher; I just renamed the class from Template to FileList, and the module accordingly. --- filelist.py | 362 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 filelist.py diff --git a/filelist.py b/filelist.py new file mode 100644 index 0000000000..ee7051b97e --- /dev/null +++ b/filelist.py @@ -0,0 +1,362 @@ +"""distutils.filelist + +Provides the FileList class, used for poking about the filesystem +and building lists of files. +""" + +# created 2000/07/17, Rene Liebscher (as template.py) +# most parts taken from commands/sdist.py +# renamed 2000/07/29 (to filelist.py) and officially added to +# the Distutils source, Greg Ward + +__revision__ = "$Id$" + +import sys, os, string, re +import fnmatch +from types import * +from glob import glob +from distutils.util import convert_path + +class FileList: + + files = None # reference to files list to mainpulate + allfiles = None # list of all files, if None will be filled + # at first use from directory self.dir + dir = None # directory from which files will be taken + # to fill self.allfiles if it was not set otherwise + + # next both functions (callable objects) can be set by the user + # warn: warning function + # debug_print: debug function + + def __init__(self, + files=[], + dir=os.curdir, + allfiles=None, + warn=None, + debug_print=None): + # use standard warning and debug functions, if no other given + if warn is None: warn = self.__warn + if debug_print is None: debug_print = self.__debug_print + self.warn = warn + self.debug_print = debug_print + self.files = files + self.dir = dir + self.allfiles = allfiles + # if None, it will be filled, when used for first time + + + # standard warning and debug functions, if no other given + def __warn (self, msg): + sys.stderr.write ("warning: template: %s\n" % msg) + + def __debug_print (self, msg): + """Print 'msg' to stdout if the global DEBUG (taken from the + DISTUTILS_DEBUG environment variable) flag is true. + """ + from distutils.core import DEBUG + if DEBUG: + print msg + + + def process_line(self, line): + + words = string.split (line) + action = words[0] + + # First, check that the right number of words are present + # for the given action (which is the first word) + if action in ('include','exclude', + 'global-include','global-exclude'): + if len (words) < 2: + self.warn \ + ("invalid template line: " + + "'%s' expects ..." % + action) + return + + pattern_list = map(convert_path, words[1:]) + + elif action in ('recursive-include','recursive-exclude'): + if len (words) < 3: + self.warn \ + ("invalid template line: " + + "'%s' expects ..." % + action) + return + + dir = convert_path(words[1]) + pattern_list = map (convert_path, words[2:]) + + elif action in ('graft','prune'): + if len (words) != 2: + self.warn \ + ("invalid template line: " + + "'%s' expects a single " % + action) + return + + dir_pattern = convert_path (words[1]) + + else: + self.warn ("invalid template line: " + + "unknown action '%s'" % action) + return + + # OK, now we know that the action is valid and we have the + # right number of words on the line for that action -- so we + # can proceed with minimal error-checking. Also, we have + # defined either (pattern), (dir and pattern), or + # (dir_pattern) -- so we don't have to spend any time + # digging stuff up out of 'words'. + + if action == 'include': + self.debug_print("include " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.select_pattern (pattern, anchor=1): + self.warn ("no files found matching '%s'" % + pattern) + + elif action == 'exclude': + self.debug_print("exclude " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.exclude_pattern (pattern, anchor=1): + self.warn ( + "no previously-included files found matching '%s'"% + pattern) + + elif action == 'global-include': + self.debug_print("global-include " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.select_pattern (pattern, anchor=0): + self.warn (("no files found matching '%s' " + + "anywhere in distribution") % + pattern) + + elif action == 'global-exclude': + self.debug_print("global-exclude " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.exclude_pattern (pattern, anchor=0): + self.warn \ + (("no previously-included files matching '%s' " + + "found anywhere in distribution") % + pattern) + + elif action == 'recursive-include': + self.debug_print("recursive-include %s %s" % + (dir, string.join(pattern_list))) + for pattern in pattern_list: + if not self.select_pattern (pattern, prefix=dir): + self.warn (("no files found matching '%s' " + + "under directory '%s'") % + (pattern, dir)) + + elif action == 'recursive-exclude': + self.debug_print("recursive-exclude %s %s" % + (dir, string.join(pattern_list))) + for pattern in pattern_list: + if not self.exclude_pattern(pattern, prefix=dir): + self.warn \ + (("no previously-included files matching '%s' " + + "found under directory '%s'") % + (pattern, dir)) + + elif action == 'graft': + self.debug_print("graft " + dir_pattern) + if not self.select_pattern(None, prefix=dir_pattern): + self.warn ("no directories found matching '%s'" % + dir_pattern) + + elif action == 'prune': + self.debug_print("prune " + dir_pattern) + if not self.exclude_pattern(None, prefix=dir_pattern): + self.warn \ + (("no previously-included directories found " + + "matching '%s'") % + dir_pattern) + else: + raise RuntimeError, \ + "this cannot happen: invalid action '%s'" % action + + # process_line () + + + + + def select_pattern (self, pattern, + anchor=1, prefix=None, is_regex=0): + """Select strings (presumably filenames) from 'files' that match + 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not + quite the same as implemented by the 'fnmatch' module: '*' and '?' + match non-special characters, where "special" is platform-dependent: + slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on + Mac OS. + + If 'anchor' is true (the default), then the pattern match is more + stringent: "*.py" will match "foo.py" but not "foo/bar.py". If + 'anchor' is false, both of these will match. + + If 'prefix' is supplied, then only filenames starting with 'prefix' + (itself a pattern) and ending with 'pattern', with anything in between + them, will match. 'anchor' is ignored in this case. + + If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and + 'pattern' is assumed to be either a string containing a regex or a + regex object -- no translation is done, the regex is just compiled + and used as-is. + + Selected strings will be added to self.files. + + Return 1 if files are found. + """ + files_found = 0 + pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) + self.debug_print("select_pattern: applying regex r'%s'" % + pattern_re.pattern) + + # delayed loading of allfiles list + if self.allfiles is None: self.allfiles = findall (self.dir) + + for name in self.allfiles: + if pattern_re.search (name): + self.debug_print(" adding " + name) + self.files.append (name) + files_found = 1 + + return files_found + + # select_pattern () + + + def exclude_pattern (self, pattern, + anchor=1, prefix=None, is_regex=0): + """Remove strings (presumably filenames) from 'files' that match + 'pattern'. Other parameters are the same as for + 'select_pattern()', above. + The list 'self.files' is modified in place. + Return 1 if files are found. + """ + files_found = 0 + pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) + self.debug_print("exclude_pattern: applying regex r'%s'" % + pattern_re.pattern) + for i in range (len(self.files)-1, -1, -1): + if pattern_re.search (self.files[i]): + self.debug_print(" removing " + self.files[i]) + del self.files[i] + files_found = 1 + + return files_found + + # exclude_pattern () + + + def recursive_exclude_pattern (self, dir, pattern=None): + """Remove filenames from 'self.files' that are under 'dir' and + whose basenames match 'pattern'. + Return 1 if files are found. + """ + files_found = 0 + self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" % + (dir, pattern)) + if pattern is None: + pattern_re = None + else: + pattern_re = translate_pattern (pattern) + + for i in range (len (self.files)-1, -1, -1): + (cur_dir, cur_base) = os.path.split (self.files[i]) + if (cur_dir == dir and + (pattern_re is None or pattern_re.match (cur_base))): + self.debug_print("removing %s" % self.files[i]) + del self.files[i] + files_found = 1 + + return files_found + +# class FileList + + +# ---------------------------------------------------------------------- +# Utility functions + +def findall (dir = os.curdir): + """Find all files under 'dir' and return the list of full filenames + (relative to 'dir'). + """ + from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK + + list = [] + stack = [dir] + pop = stack.pop + push = stack.append + + while stack: + dir = pop() + names = os.listdir (dir) + + for name in names: + if dir != os.curdir: # avoid the dreaded "./" syndrome + fullname = os.path.join (dir, name) + else: + fullname = name + + # Avoid excess stat calls -- just one will do, thank you! + stat = os.stat(fullname) + mode = stat[ST_MODE] + if S_ISREG(mode): + list.append (fullname) + elif S_ISDIR(mode) and not S_ISLNK(mode): + push (fullname) + + return list + + +def glob_to_re (pattern): + """Translate a shell-like glob pattern to a regular expression; return + a string containing the regex. Differs from 'fnmatch.translate()' in + that '*' does not match "special characters" (which are + platform-specific). + """ + pattern_re = fnmatch.translate (pattern) + + # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which + # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, + # and by extension they shouldn't match such "special characters" under + # any OS. So change all non-escaped dots in the RE to match any + # character except the special characters. + # XXX currently the "special characters" are just slash -- i.e. this is + # Unix-only. + pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re) + return pattern_re + +# glob_to_re () + + +def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): + """Translate a shell-like wildcard pattern to a compiled regular + expression. Return the compiled regex. If 'is_regex' true, + then 'pattern' is directly compiled to a regex (if it's a string) + or just returned as-is (assumes it's a regex object). + """ + if is_regex: + if type(pattern) is StringType: + return re.compile(pattern) + else: + return pattern + + if pattern: + pattern_re = glob_to_re (pattern) + else: + pattern_re = '' + + if prefix is not None: + prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $ + pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re) + else: # no prefix -- respect anchor flag + if anchor: + pattern_re = "^" + pattern_re + + return re.compile (pattern_re) + +# translate_pattern () From 8c4ad7e3aecd45e6207ee27003cceef9ed92b8d2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 00:08:13 +0000 Subject: [PATCH 0510/8469] Added class docstring and ditched inappropriate class attrs. Indentation/whitspace fixes. --- filelist.py | 249 ++++++++++++++++++++++++++-------------------------- 1 file changed, 126 insertions(+), 123 deletions(-) diff --git a/filelist.py b/filelist.py index ee7051b97e..78f2a8d859 100644 --- a/filelist.py +++ b/filelist.py @@ -19,15 +19,19 @@ class FileList: - files = None # reference to files list to mainpulate - allfiles = None # list of all files, if None will be filled - # at first use from directory self.dir - dir = None # directory from which files will be taken - # to fill self.allfiles if it was not set otherwise - - # next both functions (callable objects) can be set by the user - # warn: warning function - # debug_print: debug function + """A list of files built by on exploring the filesystem and filtered by + applying various patterns to what we find there. + + Instance attributes: + dir + directory from which files will be taken -- only used if + 'allfiles' not supplied to constructor + files + list of filenames currently being built/filtered/manipulated + allfiles + complete list of files under consideration (ie. without any + filtering applied) + """ def __init__(self, files=[], @@ -42,13 +46,14 @@ def __init__(self, self.debug_print = debug_print self.files = files self.dir = dir + + # if None, 'allfiles' will be filled when used for first time self.allfiles = allfiles - # if None, it will be filled, when used for first time # standard warning and debug functions, if no other given def __warn (self, msg): - sys.stderr.write ("warning: template: %s\n" % msg) + sys.stderr.write ("warning: %s\n" % msg) def __debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the @@ -59,130 +64,128 @@ def __debug_print (self, msg): print msg - def process_line(self, line): + def process_line (self, line): + + words = string.split (line) + action = words[0] + + # First, check that the right number of words are present + # for the given action (which is the first word) + if action in ('include','exclude', + 'global-include','global-exclude'): + if len (words) < 2: + self.warn \ + ("invalid template line: " + + "'%s' expects ..." % + action) + return - words = string.split (line) - action = words[0] + pattern_list = map(convert_path, words[1:]) - # First, check that the right number of words are present - # for the given action (which is the first word) - if action in ('include','exclude', - 'global-include','global-exclude'): - if len (words) < 2: - self.warn \ - ("invalid template line: " + - "'%s' expects ..." % - action) - return + elif action in ('recursive-include','recursive-exclude'): + if len (words) < 3: + self.warn \ + ("invalid template line: " + + "'%s' expects ..." % + action) + return - pattern_list = map(convert_path, words[1:]) + dir = convert_path(words[1]) + pattern_list = map (convert_path, words[2:]) - elif action in ('recursive-include','recursive-exclude'): - if len (words) < 3: - self.warn \ - ("invalid template line: " + - "'%s' expects ..." % - action) - return + elif action in ('graft','prune'): + if len (words) != 2: + self.warn \ + ("invalid template line: " + + "'%s' expects a single " % + action) + return - dir = convert_path(words[1]) - pattern_list = map (convert_path, words[2:]) + dir_pattern = convert_path (words[1]) - elif action in ('graft','prune'): - if len (words) != 2: + else: + self.warn ("invalid template line: " + + "unknown action '%s'" % action) + return + + # OK, now we know that the action is valid and we have the + # right number of words on the line for that action -- so we + # can proceed with minimal error-checking. Also, we have + # defined either (pattern), (dir and pattern), or + # (dir_pattern) -- so we don't have to spend any time + # digging stuff up out of 'words'. + + if action == 'include': + self.debug_print("include " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.select_pattern (pattern, anchor=1): + self.warn ("no files found matching '%s'" % + pattern) + + elif action == 'exclude': + self.debug_print("exclude " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.exclude_pattern (pattern, anchor=1): + self.warn ( + "no previously-included files found matching '%s'"% + pattern) + + elif action == 'global-include': + self.debug_print("global-include " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.select_pattern (pattern, anchor=0): + self.warn (("no files found matching '%s' " + + "anywhere in distribution") % + pattern) + + elif action == 'global-exclude': + self.debug_print("global-exclude " + string.join(pattern_list)) + for pattern in pattern_list: + if not self.exclude_pattern (pattern, anchor=0): self.warn \ - ("invalid template line: " + - "'%s' expects a single " % - action) - return - - dir_pattern = convert_path (words[1]) - - else: - self.warn ("invalid template line: " + - "unknown action '%s'" % action) - return - - # OK, now we know that the action is valid and we have the - # right number of words on the line for that action -- so we - # can proceed with minimal error-checking. Also, we have - # defined either (pattern), (dir and pattern), or - # (dir_pattern) -- so we don't have to spend any time - # digging stuff up out of 'words'. - - if action == 'include': - self.debug_print("include " + string.join(pattern_list)) - for pattern in pattern_list: - if not self.select_pattern (pattern, anchor=1): - self.warn ("no files found matching '%s'" % - pattern) - - elif action == 'exclude': - self.debug_print("exclude " + string.join(pattern_list)) - for pattern in pattern_list: - if not self.exclude_pattern (pattern, anchor=1): - self.warn ( - "no previously-included files found matching '%s'"% - pattern) - - elif action == 'global-include': - self.debug_print("global-include " + string.join(pattern_list)) - for pattern in pattern_list: - if not self.select_pattern (pattern, anchor=0): - self.warn (("no files found matching '%s' " + - "anywhere in distribution") % - pattern) - - elif action == 'global-exclude': - self.debug_print("global-exclude " + string.join(pattern_list)) - for pattern in pattern_list: - if not self.exclude_pattern (pattern, anchor=0): - self.warn \ - (("no previously-included files matching '%s' " + - "found anywhere in distribution") % - pattern) - - elif action == 'recursive-include': - self.debug_print("recursive-include %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: - if not self.select_pattern (pattern, prefix=dir): - self.warn (("no files found matching '%s' " + - "under directory '%s'") % - (pattern, dir)) - - elif action == 'recursive-exclude': - self.debug_print("recursive-exclude %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: - if not self.exclude_pattern(pattern, prefix=dir): - self.warn \ - (("no previously-included files matching '%s' " + - "found under directory '%s'") % - (pattern, dir)) - - elif action == 'graft': - self.debug_print("graft " + dir_pattern) - if not self.select_pattern(None, prefix=dir_pattern): - self.warn ("no directories found matching '%s'" % - dir_pattern) - - elif action == 'prune': - self.debug_print("prune " + dir_pattern) - if not self.exclude_pattern(None, prefix=dir_pattern): + (("no previously-included files matching '%s' " + + "found anywhere in distribution") % + pattern) + + elif action == 'recursive-include': + self.debug_print("recursive-include %s %s" % + (dir, string.join(pattern_list))) + for pattern in pattern_list: + if not self.select_pattern (pattern, prefix=dir): + self.warn (("no files found matching '%s' " + + "under directory '%s'") % + (pattern, dir)) + + elif action == 'recursive-exclude': + self.debug_print("recursive-exclude %s %s" % + (dir, string.join(pattern_list))) + for pattern in pattern_list: + if not self.exclude_pattern(pattern, prefix=dir): self.warn \ - (("no previously-included directories found " + - "matching '%s'") % - dir_pattern) - else: - raise RuntimeError, \ - "this cannot happen: invalid action '%s'" % action + (("no previously-included files matching '%s' " + + "found under directory '%s'") % + (pattern, dir)) + + elif action == 'graft': + self.debug_print("graft " + dir_pattern) + if not self.select_pattern(None, prefix=dir_pattern): + self.warn ("no directories found matching '%s'" % + dir_pattern) + + elif action == 'prune': + self.debug_print("prune " + dir_pattern) + if not self.exclude_pattern(None, prefix=dir_pattern): + self.warn \ + (("no previously-included directories found " + + "matching '%s'") % + dir_pattern) + else: + raise RuntimeError, \ + "this cannot happen: invalid action '%s'" % action # process_line () - - def select_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'files' that match From aab3b0d0ea6785e13a0bdeb71853544d4302f568 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 00:21:36 +0000 Subject: [PATCH 0511/8469] Renamed 'process_line()' to 'process_template_line()', and factored out '_parse_template_line()'. --- filelist.py | 132 +++++++++++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 69 deletions(-) diff --git a/filelist.py b/filelist.py index 78f2a8d859..5310ae5a67 100644 --- a/filelist.py +++ b/filelist.py @@ -16,6 +16,7 @@ from types import * from glob import glob from distutils.util import convert_path +from distutils.errors import DistutilsTemplateError, DistutilsInternalError class FileList: @@ -64,126 +65,119 @@ def __debug_print (self, msg): print msg - def process_line (self, line): - + def _parse_template_line (self, line): words = string.split (line) action = words[0] - # First, check that the right number of words are present - # for the given action (which is the first word) - if action in ('include','exclude', - 'global-include','global-exclude'): + patterns = dir = dir_pattern = None + + if action in ('include', 'exclude', + 'global-include', 'global-exclude'): if len (words) < 2: - self.warn \ - ("invalid template line: " + - "'%s' expects ..." % - action) - return + raise DistutilsTemplateError, \ + "'%s' expects ..." % action - pattern_list = map(convert_path, words[1:]) + patterns = map(convert_path, words[1:]) - elif action in ('recursive-include','recursive-exclude'): + elif action in ('recursive-include', 'recursive-exclude'): if len (words) < 3: - self.warn \ - ("invalid template line: " + - "'%s' expects ..." % - action) - return + raise DistutilsTemplateError, \ + "'%s' expects ..." % action dir = convert_path(words[1]) - pattern_list = map (convert_path, words[2:]) + patterns = map(convert_path, words[2:]) - elif action in ('graft','prune'): + elif action in ('graft', 'prune'): if len (words) != 2: - self.warn \ - ("invalid template line: " + - "'%s' expects a single " % - action) - return + raise DistutilsTemplateError, \ + "'%s' expects a single " % action - dir_pattern = convert_path (words[1]) + dir_pattern = convert_path(words[1]) else: - self.warn ("invalid template line: " + - "unknown action '%s'" % action) - return + raise DistutilsTemplateError, "unknown action '%s'" % action + + return (action, pattern, dir, dir_pattern) + + # _parse_template_line () + + + def process_template_line (self, line): + + # Parse the line: split it up, make sure the right number of words + # are there, and return the relevant words. 'action' is always + # defined: it's the first word of the line. Which of the other + # three are defined depends on the action; it'll be either + # patterns, (dir and patterns), or (dir_pattern). + (action, patterns, dir, dir_pattern) = self._parse_template_line(line) # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we - # can proceed with minimal error-checking. Also, we have - # defined either (pattern), (dir and pattern), or - # (dir_pattern) -- so we don't have to spend any time - # digging stuff up out of 'words'. - + # can proceed with minimal error-checking. if action == 'include': - self.debug_print("include " + string.join(pattern_list)) - for pattern in pattern_list: + self.debug_print("include " + string.join(patterns)) + for pattern in patterns: if not self.select_pattern (pattern, anchor=1): - self.warn ("no files found matching '%s'" % - pattern) + self.warn("no files found matching '%s'" % pattern) elif action == 'exclude': - self.debug_print("exclude " + string.join(pattern_list)) - for pattern in pattern_list: + self.debug_print("exclude " + string.join(patterns)) + for pattern in patterns: if not self.exclude_pattern (pattern, anchor=1): - self.warn ( + self.warn( "no previously-included files found matching '%s'"% pattern) elif action == 'global-include': - self.debug_print("global-include " + string.join(pattern_list)) - for pattern in pattern_list: + self.debug_print("global-include " + string.join(patterns)) + for pattern in patterns: if not self.select_pattern (pattern, anchor=0): self.warn (("no files found matching '%s' " + - "anywhere in distribution") % - pattern) + "anywhere in distribution") % + pattern) elif action == 'global-exclude': - self.debug_print("global-exclude " + string.join(pattern_list)) - for pattern in pattern_list: + self.debug_print("global-exclude " + string.join(patterns)) + for pattern in patterns: if not self.exclude_pattern (pattern, anchor=0): - self.warn \ - (("no previously-included files matching '%s' " + - "found anywhere in distribution") % - pattern) + self.warn(("no previously-included files matching '%s' " + + "found anywhere in distribution") % + pattern) elif action == 'recursive-include': self.debug_print("recursive-include %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: + (dir, string.join(patterns))) + for pattern in patterns: if not self.select_pattern (pattern, prefix=dir): self.warn (("no files found matching '%s' " + - "under directory '%s'") % - (pattern, dir)) + "under directory '%s'") % + (pattern, dir)) elif action == 'recursive-exclude': self.debug_print("recursive-exclude %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: + (dir, string.join(patterns))) + for pattern in patterns: if not self.exclude_pattern(pattern, prefix=dir): - self.warn \ - (("no previously-included files matching '%s' " + - "found under directory '%s'") % - (pattern, dir)) + self.warn(("no previously-included files matching '%s' " + + "found under directory '%s'") % + (pattern, dir)) elif action == 'graft': self.debug_print("graft " + dir_pattern) if not self.select_pattern(None, prefix=dir_pattern): - self.warn ("no directories found matching '%s'" % - dir_pattern) + self.warn ("no directories found matching '%s'" % dir_pattern) elif action == 'prune': self.debug_print("prune " + dir_pattern) if not self.exclude_pattern(None, prefix=dir_pattern): - self.warn \ - (("no previously-included directories found " + - "matching '%s'") % - dir_pattern) + self.warn(("no previously-included directories found " + + "matching '%s'") % + dir_pattern) else: - raise RuntimeError, \ + raise DistutilsInternalError, \ "this cannot happen: invalid action '%s'" % action - # process_line () + # process_template_line () def select_pattern (self, pattern, From ea8670808399ab267f60d8cfcab189102e069b8e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 00:36:25 +0000 Subject: [PATCH 0512/8469] Renamed 'select_pattern()' to 'include_pattern()'. Other cosmetic/doc/comment tweaks. --- filelist.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/filelist.py b/filelist.py index 5310ae5a67..749fa6124b 100644 --- a/filelist.py +++ b/filelist.py @@ -105,7 +105,7 @@ def _parse_template_line (self, line): def process_template_line (self, line): # Parse the line: split it up, make sure the right number of words - # are there, and return the relevant words. 'action' is always + # is there, and return the relevant words. 'action' is always # defined: it's the first word of the line. Which of the other # three are defined depends on the action; it'll be either # patterns, (dir and patterns), or (dir_pattern). @@ -117,7 +117,7 @@ def process_template_line (self, line): if action == 'include': self.debug_print("include " + string.join(patterns)) for pattern in patterns: - if not self.select_pattern (pattern, anchor=1): + if not self.include_pattern (pattern, anchor=1): self.warn("no files found matching '%s'" % pattern) elif action == 'exclude': @@ -131,7 +131,7 @@ def process_template_line (self, line): elif action == 'global-include': self.debug_print("global-include " + string.join(patterns)) for pattern in patterns: - if not self.select_pattern (pattern, anchor=0): + if not self.include_pattern (pattern, anchor=0): self.warn (("no files found matching '%s' " + "anywhere in distribution") % pattern) @@ -148,7 +148,7 @@ def process_template_line (self, line): self.debug_print("recursive-include %s %s" % (dir, string.join(patterns))) for pattern in patterns: - if not self.select_pattern (pattern, prefix=dir): + if not self.include_pattern (pattern, prefix=dir): self.warn (("no files found matching '%s' " + "under directory '%s'") % (pattern, dir)) @@ -164,7 +164,7 @@ def process_template_line (self, line): elif action == 'graft': self.debug_print("graft " + dir_pattern) - if not self.select_pattern(None, prefix=dir_pattern): + if not self.include_pattern(None, prefix=dir_pattern): self.warn ("no directories found matching '%s'" % dir_pattern) elif action == 'prune': @@ -180,14 +180,15 @@ def process_template_line (self, line): # process_template_line () - def select_pattern (self, pattern, + def include_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): - """Select strings (presumably filenames) from 'files' that match - 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not - quite the same as implemented by the 'fnmatch' module: '*' and '?' - match non-special characters, where "special" is platform-dependent: - slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on - Mac OS. + + """Select strings (presumably filenames) from 'self.files' that + match 'pattern', a Unix-style wildcard (glob) pattern. Patterns + are not quite the same as implemented by the 'fnmatch' module: '*' + and '?' match non-special characters, where "special" is platform- + dependent: slash on Unix; colon, slash, and backslash on + DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more stringent: "*.py" will match "foo.py" but not "foo/bar.py". If @@ -208,7 +209,7 @@ def select_pattern (self, pattern, """ files_found = 0 pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) - self.debug_print("select_pattern: applying regex r'%s'" % + self.debug_print("include_pattern: applying regex r'%s'" % pattern_re.pattern) # delayed loading of allfiles list @@ -222,14 +223,14 @@ def select_pattern (self, pattern, return files_found - # select_pattern () + # include_pattern () def exclude_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match 'pattern'. Other parameters are the same as for - 'select_pattern()', above. + 'include_pattern()', above. The list 'self.files' is modified in place. Return 1 if files are found. """ From 86f9edf31c0f992aacc6f9fb0892a57e749e60f4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 00:37:04 +0000 Subject: [PATCH 0513/8469] Ditched the unused 'recursive_exclude_pattern()' method. --- filelist.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/filelist.py b/filelist.py index 749fa6124b..2eaff83705 100644 --- a/filelist.py +++ b/filelist.py @@ -248,30 +248,6 @@ def exclude_pattern (self, pattern, # exclude_pattern () - - def recursive_exclude_pattern (self, dir, pattern=None): - """Remove filenames from 'self.files' that are under 'dir' and - whose basenames match 'pattern'. - Return 1 if files are found. - """ - files_found = 0 - self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" % - (dir, pattern)) - if pattern is None: - pattern_re = None - else: - pattern_re = translate_pattern (pattern) - - for i in range (len (self.files)-1, -1, -1): - (cur_dir, cur_base) = os.path.split (self.files[i]) - if (cur_dir == dir and - (pattern_re is None or pattern_re.match (cur_base))): - self.debug_print("removing %s" % self.files[i]) - del self.files[i] - files_found = 1 - - return files_found - # class FileList From 2a8fc1009cee9fe11b303b246f81dfc71806e647 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:03:31 +0000 Subject: [PATCH 0514/8469] Added DistutilsTemplateError. --- errors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/errors.py b/errors.py index a718f01a40..bec3464511 100644 --- a/errors.py +++ b/errors.py @@ -73,6 +73,9 @@ class DistutilsInternalError (DistutilsError): should never be seen if the code is working!).""" pass +class DistutilsTemplateError (DistutilsError): + """Syntax error in a file list template.""" + # Exception classes used by the CCompiler implementation classes class CCompilerError (Exception): From 689482195099b5777e8d3ae68f3049df64c46d7a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:04:22 +0000 Subject: [PATCH 0515/8469] Typo fix. --- filelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filelist.py b/filelist.py index 2eaff83705..a8049287df 100644 --- a/filelist.py +++ b/filelist.py @@ -97,7 +97,7 @@ def _parse_template_line (self, line): else: raise DistutilsTemplateError, "unknown action '%s'" % action - return (action, pattern, dir, dir_pattern) + return (action, patterns, dir, dir_pattern) # _parse_template_line () From 29d6ebdae92bac92b53c8cb2d69c710b12c8b1a9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:05:02 +0000 Subject: [PATCH 0516/8469] The other half of Rene Liebscher's patch to add the Template class, which I renamed to FileList: remove all the file-list-generation code from the sdist command and adapt it to use the new FileList class instead. --- command/sdist.py | 320 +++-------------------------------------------- 1 file changed, 15 insertions(+), 305 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 3b91170cb3..045054b86a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -6,16 +6,16 @@ __revision__ = "$Id$" -import sys, os, string, re -import fnmatch +import sys, os, string from types import * from glob import glob from distutils.core import Command from distutils.util import \ - convert_path, create_tree, remove_tree, newer, write_file, \ + create_tree, remove_tree, newer, write_file, \ check_archive_formats from distutils.text_file import TextFile from distutils.errors import DistutilsExecError, DistutilsOptionError +from distutils.filelist import FileList def show_formats (): @@ -319,25 +319,6 @@ def add_defaults (self): # add_defaults () - def recursive_exclude_pattern (self, dir, pattern=None): - """Remove filenames from 'self.files' that are under 'dir' and - whose basenames match 'pattern'. - """ - self.debug_print("recursive_exclude_pattern: dir=%s, pattern=%s" % - (dir, pattern)) - if pattern is None: - pattern_re = None - else: - pattern_re = translate_pattern (pattern) - - for i in range (len (self.files)-1, -1, -1): - (cur_dir, cur_base) = os.path.split (self.files[i]) - if (cur_dir == dir and - (pattern_re is None or pattern_re.match (cur_base))): - self.debug_print("removing %s" % self.files[i]) - del self.files[i] - - def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file @@ -356,152 +337,17 @@ def read_template (self): rstrip_ws=1, collapse_ws=1) - all_files = findall () + # if we give Template() a list, it modifies this list + filelist = FileList(files=self.files, + warn=self.warn, + debug_print=self.debug_print) while 1: - line = template.readline() if line is None: # end of file break - words = string.split (line) - action = words[0] - - # First, check that the right number of words are present - # for the given action (which is the first word) - if action in ('include','exclude', - 'global-include','global-exclude'): - if len (words) < 2: - template.warn \ - ("invalid manifest template line: " + - "'%s' expects ..." % - action) - continue - - pattern_list = map(convert_path, words[1:]) - - elif action in ('recursive-include','recursive-exclude'): - if len (words) < 3: - template.warn \ - ("invalid manifest template line: " + - "'%s' expects ..." % - action) - continue - - dir = convert_path(words[1]) - pattern_list = map (convert_path, words[2:]) - - elif action in ('graft','prune'): - if len (words) != 2: - template.warn \ - ("invalid manifest template line: " + - "'%s' expects a single " % - action) - continue - - dir_pattern = convert_path (words[1]) - - else: - template.warn ("invalid manifest template line: " + - "unknown action '%s'" % action) - continue - - # OK, now we know that the action is valid and we have the - # right number of words on the line for that action -- so we - # can proceed with minimal error-checking. Also, we have - # defined either (pattern), (dir and pattern), or - # (dir_pattern) -- so we don't have to spend any time - # digging stuff up out of 'words'. - - if action == 'include': - self.debug_print("include " + string.join(pattern_list)) - for pattern in pattern_list: - files = self.select_pattern (all_files, pattern, anchor=1) - if not files: - template.warn ("no files found matching '%s'" % - pattern) - else: - self.files.extend (files) - - elif action == 'exclude': - self.debug_print("exclude " + string.join(pattern_list)) - for pattern in pattern_list: - num = self.exclude_pattern (self.files, pattern, anchor=1) - if num == 0: - template.warn ( - "no previously-included files found matching '%s'"% - pattern) - - elif action == 'global-include': - self.debug_print("global-include " + string.join(pattern_list)) - for pattern in pattern_list: - files = self.select_pattern (all_files, pattern, anchor=0) - if not files: - template.warn (("no files found matching '%s' " + - "anywhere in distribution") % - pattern) - else: - self.files.extend (files) - - elif action == 'global-exclude': - self.debug_print("global-exclude " + string.join(pattern_list)) - for pattern in pattern_list: - num = self.exclude_pattern (self.files, pattern, anchor=0) - if num == 0: - template.warn \ - (("no previously-included files matching '%s' " + - "found anywhere in distribution") % - pattern) - - elif action == 'recursive-include': - self.debug_print("recursive-include %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: - files = self.select_pattern ( - all_files, pattern, prefix=dir) - if not files: - template.warn (("no files found matching '%s' " + - "under directory '%s'") % - (pattern, dir)) - else: - self.files.extend (files) - - elif action == 'recursive-exclude': - self.debug_print("recursive-exclude %s %s" % - (dir, string.join(pattern_list))) - for pattern in pattern_list: - num = self.exclude_pattern( - self.files, pattern, prefix=dir) - if num == 0: - template.warn \ - (("no previously-included files matching '%s' " + - "found under directory '%s'") % - (pattern, dir)) - - elif action == 'graft': - self.debug_print("graft " + dir_pattern) - files = self.select_pattern( - all_files, None, prefix=dir_pattern) - if not files: - template.warn ("no directories found matching '%s'" % - dir_pattern) - else: - self.files.extend (files) - - elif action == 'prune': - self.debug_print("prune " + dir_pattern) - num = self.exclude_pattern( - self.files, None, prefix=dir_pattern) - if num == 0: - template.warn \ - (("no previously-included directories found " + - "matching '%s'") % - dir_pattern) - else: - raise RuntimeError, \ - "this cannot happen: invalid action '%s'" % action - - # while loop over lines of template file + filelist.process_template_line(line) # read_template () @@ -516,65 +362,14 @@ def prune_file_list (self): """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() - self.exclude_pattern (self.files, None, prefix=build.build_base) - self.exclude_pattern (self.files, None, prefix=base_dir) - self.exclude_pattern (self.files, r'/(RCS|CVS)/.*', is_regex=1) - - - def select_pattern (self, files, pattern, - anchor=1, prefix=None, is_regex=0): - """Select strings (presumably filenames) from 'files' that match - 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not - quite the same as implemented by the 'fnmatch' module: '*' and '?' - match non-special characters, where "special" is platform-dependent: - slash on Unix, colon, slash, and backslash on DOS/Windows, and colon on - Mac OS. - - If 'anchor' is true (the default), then the pattern match is more - stringent: "*.py" will match "foo.py" but not "foo/bar.py". If - 'anchor' is false, both of these will match. - - If 'prefix' is supplied, then only filenames starting with 'prefix' - (itself a pattern) and ending with 'pattern', with anything in between - them, will match. 'anchor' is ignored in this case. - - If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and - 'pattern' is assumed to be either a string containing a regex or a - regex object -- no translation is done, the regex is just compiled - and used as-is. - - Return the list of matching strings, possibly empty. - """ - matches = [] - pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) - self.debug_print("select_pattern: applying regex r'%s'" % - pattern_re.pattern) - for name in files: - if pattern_re.search (name): - matches.append (name) - self.debug_print(" adding " + name) - - return matches - # select_pattern () - - - def exclude_pattern (self, files, pattern, - anchor=1, prefix=None, is_regex=0): - """Remove strings (presumably filenames) from 'files' that match - 'pattern'. Other parameters are the same as for - 'select_pattern()', above. The list 'files' is modified in place. - """ - - pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) - self.debug_print("exclude_pattern: applying regex r'%s'" % - pattern_re.pattern) - for i in range (len(files)-1, -1, -1): - if pattern_re.search (files[i]): - self.debug_print(" removing " + files[i]) - del files[i] - - # exclude_pattern () + # if we give FileList a list, it modifies this list + filelist = FileList(files=self.files, + warn=self.warn, + debug_print=self.debug_print) + filelist.exclude_pattern(None, prefix=build.build_base) + filelist.exclude_pattern(None, prefix=base_dir) + filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1) def write_manifest (self): @@ -676,88 +471,3 @@ def get_archive_files (self): return self.archive_files # class sdist - - -# ---------------------------------------------------------------------- -# Utility functions - -def findall (dir = os.curdir): - """Find all files under 'dir' and return the list of full filenames - (relative to 'dir'). - """ - from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK - - list = [] - stack = [dir] - pop = stack.pop - push = stack.append - - while stack: - dir = pop() - names = os.listdir (dir) - - for name in names: - if dir != os.curdir: # avoid leading "./" - fullname = os.path.join (dir, name) - else: - fullname = name - - # Avoid excess stat calls -- just one will do, thank you! - stat = os.stat(fullname) - mode = stat[ST_MODE] - if S_ISREG(mode): - list.append (fullname) - elif S_ISDIR(mode) and not S_ISLNK(mode): - push (fullname) - - return list - - -def glob_to_re (pattern): - """Translate a shell-like glob pattern to a regular expression; return - a string containing the regex. Differs from 'fnmatch.translate()' in - that '*' does not match "special characters" (which are - platform-specific). - """ - pattern_re = fnmatch.translate (pattern) - - # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which - # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, - # and by extension they shouldn't match such "special characters" under - # any OS. So change all non-escaped dots in the RE to match any - # character except the special characters. - # XXX currently the "special characters" are just slash -- i.e. this is - # Unix-only. - pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re) - return pattern_re - -# glob_to_re () - - -def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): - """Translate a shell-like wildcard pattern to a compiled regular - expression. Return the compiled regex. If 'is_regex' true, - then 'pattern' is directly compiled to a regex (if it's a string) - or just returned as-is (assumes it's a regex object). - """ - if is_regex: - if type(pattern) is StringType: - return re.compile(pattern) - else: - return pattern - - if pattern: - pattern_re = glob_to_re (pattern) - else: - pattern_re = '' - - if prefix is not None: - prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $ - pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re) - else: # no prefix -- respect anchor flag - if anchor: - pattern_re = "^" + pattern_re - - return re.compile (pattern_re) - -# translate_pattern () From ab16bbe1a660891123c029e7dbdd66e61a585a1c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:30:31 +0000 Subject: [PATCH 0517/8469] Replaced 'self.files' with 'self.filelist': now we carry around a FileList instance instead of a list of filenames. Simplifies the "sdist" command only a bit, but should allow greater simplification of FileList. --- command/sdist.py | 92 ++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 54 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 045054b86a..4c2acf678f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -128,8 +128,9 @@ def finalize_options (self): def run (self): - # 'files' is the list of files that will make up the manifest - self.files = [] + # 'filelist' contains the list of files that will make up the + # manifest + self.filelist = FileList() # Ensure that all required meta-data is given; warn if not (but # don't die, it's not *that* serious!) @@ -137,7 +138,7 @@ def run (self): # Do whatever it takes to get the list of files to process # (process the manifest template, read an existing manifest, - # whatever). File list is put into 'self.files'. + # whatever). File list is accumulated in 'self.filelist'. self.get_file_list () # If user just wanted us to regenerate the manifest, stop now. @@ -184,7 +185,7 @@ def check_metadata (self): def get_file_list (self): """Figure out the list of files to include in the source - distribution, and put it in 'self.files'. This might involve + distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options and the state of the filesystem. @@ -192,9 +193,9 @@ def get_file_list (self): # If we have a manifest template, see if it's newer than the # manifest; if so, we'll regenerate the manifest. - template_exists = os.path.isfile (self.template) + template_exists = os.path.isfile(self.template) if template_exists: - template_newer = newer (self.template, self.manifest) + template_newer = newer(self.template, self.manifest) # The contents of the manifest file almost certainly depend on the # setup script as well as the manifest template -- so if the setup @@ -222,17 +223,17 @@ def get_file_list (self): self.force_manifest or self.manifest_only): if not template_exists: - self.warn (("manifest template '%s' does not exist " + - "(using default file list)") % - self.template) + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) # Add default file set to 'files' if self.use_defaults: - self.add_defaults () + self.add_defaults() # Read manifest template if it exists if template_exists: - self.read_template () + self.read_template() # Prune away any directories that don't belong in the source # distribution @@ -241,30 +242,24 @@ def get_file_list (self): # File list now complete -- sort it so that higher-level files # come first - sortable_files = map (os.path.split, self.files) - sortable_files.sort () - self.files = [] - for sort_tuple in sortable_files: - self.files.append (apply (os.path.join, sort_tuple)) + self.filelist.sort() # Remove duplicates from the file list - for i in range (len(self.files)-1, 0, -1): - if self.files[i] == self.files[i-1]: - del self.files[i] + self.filelist.remove_duplicates() # And write complete file list (including default file set) to # the manifest. - self.write_manifest () + self.write_manifest() # Don't regenerate the manifest, just read it in. else: - self.read_manifest () + self.read_manifest() # get_file_list () def add_defaults (self): - """Add all the default files to self.files: + """Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py @@ -286,7 +281,7 @@ def add_defaults (self): for fn in alts: if os.path.exists (fn): got_it = 1 - self.files.append (fn) + self.filelist.append (fn) break if not got_it: @@ -294,7 +289,7 @@ def add_defaults (self): string.join (alts, ', ')) else: if os.path.exists (fn): - self.files.append (fn) + self.filelist.append (fn) else: self.warn ("standard file '%s' not found" % fn) @@ -302,33 +297,31 @@ def add_defaults (self): for pattern in optional: files = filter (os.path.isfile, glob (pattern)) if files: - self.files.extend (files) + self.filelist.extend (files) if self.distribution.has_pure_modules(): build_py = self.get_finalized_command ('build_py') - self.files.extend (build_py.get_source_files ()) + self.filelist.extend (build_py.get_source_files ()) if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command ('build_ext') - self.files.extend (build_ext.get_source_files ()) + self.filelist.extend (build_ext.get_source_files ()) if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command ('build_clib') - self.files.extend (build_clib.get_source_files ()) + self.filelist.extend (build_clib.get_source_files ()) # add_defaults () def read_template (self): + """Read and parse the manifest template file named by - 'self.template' (usually "MANIFEST.in"). Process all file - specifications (include and exclude) in the manifest template and - update 'self.files' accordingly (filenames may be added to - or removed from 'self.files' based on the manifest template). + 'self.template' (usually "MANIFEST.in"). The parsing and + processing is done by 'self.filelist', which updates itself + accordingly. """ - assert self.files is not None and type (self.files) is ListType self.announce("reading manifest template '%s'" % self.template) - template = TextFile (self.template, strip_comments=1, skip_blanks=1, @@ -337,17 +330,12 @@ def read_template (self): rstrip_ws=1, collapse_ws=1) - # if we give Template() a list, it modifies this list - filelist = FileList(files=self.files, - warn=self.warn, - debug_print=self.debug_print) - while 1: line = template.readline() if line is None: # end of file break - filelist.process_template_line(line) + self.filelist.process_template_line(line) # read_template () @@ -363,22 +351,18 @@ def prune_file_list (self): build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() - # if we give FileList a list, it modifies this list - filelist = FileList(files=self.files, - warn=self.warn, - debug_print=self.debug_print) - filelist.exclude_pattern(None, prefix=build.build_base) - filelist.exclude_pattern(None, prefix=base_dir) - filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1) + self.filelist.exclude_pattern(None, prefix=build.build_base) + self.filelist.exclude_pattern(None, prefix=base_dir) + self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1) def write_manifest (self): - """Write the file list in 'self.files' (presumably as filled in by - 'add_defaults()' and 'read_template()') to the manifest file named - by 'self.manifest'. + """Write the file list in 'self.filelist' (presumably as filled in + by 'add_defaults()' and 'read_template()') to the manifest file + named by 'self.manifest'. """ self.execute(write_file, - (self.manifest, self.files), + (self.manifest, self.filelist.files), "writing manifest file '%s'" % self.manifest) # write_manifest () @@ -386,7 +370,7 @@ def write_manifest (self): def read_manifest (self): """Read the manifest file (named by 'self.manifest') and use it to - fill in 'self.files', the list of files to include in the source + fill in 'self.filelist', the list of files to include in the source distribution. """ self.announce("reading manifest file '%s'" % self.manifest) @@ -397,7 +381,7 @@ def read_manifest (self): break if line[-1] == '\n': line = line[0:-1] - self.files.append (line) + self.filelist.append (line) # read_manifest () @@ -451,7 +435,7 @@ def make_distribution (self): base_dir = self.distribution.get_fullname() base_name = os.path.join(self.dist_dir, base_dir) - self.make_release_tree (base_dir, self.files) + self.make_release_tree (base_dir, self.filelist.files) archive_files = [] # remember names of files we create if self.dist_dir: self.mkpath(self.dist_dir) From d3cb1ab466d37d52bad2f5b44d852bb6009c2214 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:45:42 +0000 Subject: [PATCH 0518/8469] Added list-like methods: 'append()', 'extend()', 'sort()'. Added 'remove_duplicates()'. Simplified constructor: no longer take 'files' or 'allfiles' as args, and no longer have 'dir' attribute at all. Added 'set_allfiles()' and 'findall()' so the client does have a way to set the list of all files. Changed 'include_pattern()' to use the 'findall()' method instead of the external function. (Of course, the method is just a trivial wrapper around the function.) --- filelist.py | 60 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/filelist.py b/filelist.py index a8049287df..84f36d2c4b 100644 --- a/filelist.py +++ b/filelist.py @@ -35,24 +35,25 @@ class FileList: """ def __init__(self, - files=[], - dir=os.curdir, - allfiles=None, warn=None, debug_print=None): - # use standard warning and debug functions, if no other given - if warn is None: warn = self.__warn - if debug_print is None: debug_print = self.__debug_print - self.warn = warn - self.debug_print = debug_print - self.files = files - self.dir = dir + # use standard warning and debug functions if no other given + self.warn = warn or self.__warn + self.debug_print = debug_print or self.__debug_print - # if None, 'allfiles' will be filled when used for first time - self.allfiles = allfiles + self.allfiles = None + self.files = [] - # standard warning and debug functions, if no other given + def set_allfiles (self, allfiles): + self.allfiles = allfiles + + def findall (self, dir=os.curdir): + self.allfiles = findall(dir) + + + # -- Fallback warning/debug functions ------------------------------ + def __warn (self, msg): sys.stderr.write ("warning: %s\n" % msg) @@ -64,6 +65,34 @@ def __debug_print (self, msg): if DEBUG: print msg + + # -- List-like methods --------------------------------------------- + + def append (self, item): + self.files.append(item) + + def extend (self, items): + self.files.extend(items) + + def sort (self): + # Not a strict lexical sort! + sortable_files = map(os.path.split, self.files) + sortable_files.sort() + self.files = [] + for sort_tuple in sortable_files: + self.files.append(apply(os.path.join, sort_tuple)) + + + # -- Other miscellaneous utility methods --------------------------- + + def remove_duplicates (self): + # Assumes list has been sorted! + for i in range (len(self.files)-1, 0, -1): + if self.files[i] == self.files[i-1]: + del self.files[i] + + + # -- "File template" methods --------------------------------------- def _parse_template_line (self, line): words = string.split (line) @@ -180,6 +209,8 @@ def process_template_line (self, line): # process_template_line () + # -- Filtering/selection methods ----------------------------------- + def include_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): @@ -213,7 +244,8 @@ def include_pattern (self, pattern, pattern_re.pattern) # delayed loading of allfiles list - if self.allfiles is None: self.allfiles = findall (self.dir) + if self.allfiles is None: + self.findall() for name in self.allfiles: if pattern_re.search (name): From c27f92a2c9bbf5835159d9b0d3e56ae258ef31be Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 30 Jul 2000 01:47:16 +0000 Subject: [PATCH 0519/8469] Catch syntax errors from processing template lines and turn them into mere warnings. Call 'findall()' on our FileList object before we start using it seriously. --- command/sdist.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 4c2acf678f..4765d7fa13 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -14,7 +14,7 @@ create_tree, remove_tree, newer, write_file, \ check_archive_formats from distutils.text_file import TextFile -from distutils.errors import DistutilsExecError, DistutilsOptionError +from distutils.errors import * from distutils.filelist import FileList @@ -227,6 +227,8 @@ def get_file_list (self): "(using default file list)") % self.template) + self.filelist.findall() + # Add default file set to 'files' if self.use_defaults: self.add_defaults() @@ -335,7 +337,12 @@ def read_template (self): if line is None: # end of file break - self.filelist.process_template_line(line) + try: + self.filelist.process_template_line(line) + except DistutilsTemplateError, msg: + self.warn("%s, line %d: %s" % (template.filename, + template.current_line, + msg)) # read_template () From 06830ada1cda3595d2a1f222fd8cbed35bdb691e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 1 Aug 2000 23:54:29 +0000 Subject: [PATCH 0520/8469] Patch from Rene Liebscher, tweaked by me: - 'export_symbol_file' (and corresponding 'def_file' in the old "build info" dict) are gone; warn if we see 'def_file' in the dict - the MSVC "pre-link hack" is gone -- all that stuff is now handled elsewhere (eg. by using 'export_symbols', etc.) - add 'get_export_symbols()' and 'get_libraries()' methods -- needed because on Windows, both of those things are a tad more complicated than fetching them from the Extension instance --- command/build_ext.py | 85 +++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c04036b02e..1ffe3234d4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -84,7 +84,7 @@ class build_ext (Command): help_options = [ ('help-compiler', None, "list available compilers", show_compilers), - ] + ] def initialize_options (self): self.extensions = None @@ -282,7 +282,9 @@ def check_extensions_list (self, extensions): # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') - ext.export_symbol_file = build_info.get('def_file') + if build_info.has_key('def_file'): + self.warn("'def_file' element of build info dict " + "no longer supported") # Non-trivial stuff: 'macros' split into 'define_macros' # and 'undef_macros'. @@ -420,16 +422,14 @@ def build_extensions (self): objects.extend (ext.extra_objects) extra_args = ext.extra_link_args or [] - # Bunch of fixing-up we have to do for Microsoft's linker. - if self.compiler.compiler_type == 'msvc': - self.msvc_prelink_hack(sources, ext, extra_args) self.compiler.link_shared_object ( objects, ext_filename, - libraries=ext.libraries, + libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, extra_postargs=extra_args, + export_symbols=self.get_export_symbols(ext), debug=self.debug, build_temp=self.build_temp) @@ -511,44 +511,6 @@ def find_swig (self): # find_swig () - - # -- Hooks 'n hacks ------------------------------------------------ - - def msvc_prelink_hack (self, sources, ext, extra_args): - - # XXX this is a kludge! Knowledge of specific compilers or - # platforms really doesn't belong here; in an ideal world, the - # CCompiler interface would provide access to everything in a - # compiler/linker system needs to build Python extensions, and - # we would just do everything nicely and cleanly through that - # interface. However, this is a not an ideal world and the - # CCompiler interface doesn't handle absolutely everything. - # Thus, kludges like this slip in occasionally. (This is no - # excuse for committing more platform- and compiler-specific - # kludges; they are to be avoided if possible!) - - def_file = ext.export_symbol_file - - if def_file is not None: - extra_args.append ('/DEF:' + def_file) - else: - modname = string.split (ext.name, '.')[-1] - extra_args.append('/export:init%s' % modname) - - # The MSVC linker generates .lib and .exp files, which cannot be - # suppressed by any linker switches. The .lib files may even be - # needed! Make sure they are generated in the temporary build - # directory. Since they have different names for debug and release - # builds, they can go into the same directory. - implib_file = os.path.join ( - self.implib_dir, - self.get_ext_libname (ext.name)) - extra_args.append ('/IMPLIB:' + implib_file) - self.mkpath (os.path.dirname (implib_file)) - - # msvc_prelink_hack () - - # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) @@ -579,4 +541,39 @@ def get_ext_libname (self, ext_name): return apply (os.path.join, ext_path) + '_d.lib' return apply (os.path.join, ext_path) + '.lib' + + def get_export_symbols (self, ext): + """Return the list of symbols that a shared extension has to + export. This either uses 'ext.export_symbols' or, if it's not + provided, "init" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "init" function. + """ + + # XXX what if 'export_symbols' defined but it doesn't contain + # "init" + module_name? Should we add it? warn? or just carry + # on doing nothing? + + if ext.export_symbols is None: + return ["init" + string.split(ext.name,'.')[-1]] + else: + return ext.export_symbols + + def get_libraries (self, ext): + """Return the list of libraries to link against when building a + shared extension. On most platforms, this is just 'ext.libraries'; + on Windows, we add the Python library (eg. python20.dll). + """ + # The python library is always needed on Windows. For MSVC, this + # is redundant, since the library is mentioned in a pragma in + # config.h that MSVC groks. The other Windows compilers all seem + # to need it mentioned explicitly, though, so that's what we do. + if sys.platform == "win32": + pythonlib = ("python%d%d" % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib] + else: + return ext.libraries + # class build_ext From 7ef5e9f9cda6b4b01a7f64ef3b23052c0303e23f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 00:00:30 +0000 Subject: [PATCH 0521/8469] Patch from Rene Liebscher: generate an /IMPLIB: option to ensure that the linker leaves the (temporary) .lib file in the temporary dir. (Moved from 'msvc_prelink_hack()' method in build_ext.py.) --- msvccompiler.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index e58e6c10c8..b86e0b3023 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -380,10 +380,22 @@ def link_shared_object (self, ld_args = (ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]) + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + os.path.dirname(objects[0]), + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) + if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: - ld_args.extend (extra_postargs) + ld_args.extend(extra_postargs) print "link_shared_object():" print " output_filename =", output_filename From 247bbf98667922b35c599456d86afe9b69664773 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 00:01:56 +0000 Subject: [PATCH 0522/8469] Ditched some debugging prints. --- msvccompiler.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index b86e0b3023..a1dedb0e53 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -397,9 +397,6 @@ def link_shared_object (self, if extra_postargs: ld_args.extend(extra_postargs) - print "link_shared_object():" - print " output_filename =", output_filename - print " mkpath'ing:", os.path.dirname (output_filename) self.mkpath (os.path.dirname (output_filename)) try: self.spawn ([self.link] + ld_args) From d43aeac154d817eefdde7f84243bd273d5542254 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 00:04:13 +0000 Subject: [PATCH 0523/8469] Removed 'export_symbol_file'. 'export_symbols' can be None (not sure this is a good idea: it's inconsistent with every other instance attribute of Extension). --- extension.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/extension.py b/extension.py index f0f68b9390..95a2ece8e8 100644 --- a/extension.py +++ b/extension.py @@ -73,11 +73,6 @@ class Extension: used on all platforms, and not generally necessary for Python extensions, which typically export exactly one symbol: "init" + extension_name. - export_symbol_file : string - name of file that lists symbols to export; the format of this - file is platform- and compiler-specific. This is even more - gratuitous and unnecessary than 'export_symbols'; I'll be happy - when it goes away forever. """ def __init__ (self, name, sources, @@ -91,7 +86,6 @@ def __init__ (self, name, sources, extra_compile_args=None, extra_link_args=None, export_symbols=None, - export_symbol_file=None, ): assert type(name) is StringType, "'name' must be a string" @@ -111,7 +105,6 @@ def __init__ (self, name, sources, self.extra_objects = extra_objects or [] self.extra_compile_args = extra_compile_args or [] self.extra_link_args = extra_link_args or [] - self.export_symbols = export_symbols or [] - self.export_symbol_file = export_symbol_file + self.export_symbols = export_symbols # class Extension From 336876f5fbc5664836629ae225b680d31020eb55 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 00:37:32 +0000 Subject: [PATCH 0524/8469] Ditched 'abspath()' -- don't need 1.5.1 compatability hacks anymore. --- util.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/util.py b/util.py index 0bff3a5b85..d69626e1f1 100644 --- a/util.py +++ b/util.py @@ -18,16 +18,6 @@ from distutils.archive_util import * -# Need to define 'abspath()', because it was new with Python 1.5.2 -if hasattr (os.path, 'abspath'): - abspath = os.path.abspath -else: - def abspath(path): - if not os.path.isabs(path): - path = os.path.join(os.getcwd(), path) - return os.path.normpath(path) - - # More backwards compatibility hacks def extend (list, new_list): """Appends the list 'new_list' to 'list', just like the 'extend()' From b4ff40df511d1477c3457931578bb2ab9630ab1b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:03:23 +0000 Subject: [PATCH 0525/8469] Patch from Rene Liebscher. Some ugly changes, but supposedly this makes it so BCPPCompiler actually works, so I'm provisionally accepting it -- ugly and working is better than not working! Major changes: - normalize paths (apparently BC++ doesn't like slashes) - overhauled how we search for and specify libraries on the linker command-line - hacked up 'find_library_file()' so it knows about "debug" library naming convention as well as "bcpp_xxx.lib" -- the question is, is this a well-established and sensible convention? Also: - change to use 'util.write_file()' to write the .def file --- bcppcompiler.py | 99 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 29 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 6c9ac827c1..7daa597b75 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,17 +11,6 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -# XXX Lyle reports that this doesn't quite work yet: -# """...but this is what I've got so far. The compile step works fine but -# when it runs the link step I get an "out of memory" failure. Since -# spawn() echoes the command it's trying to spawn, I can type the link line -# verbatim at the DOS prompt and it links the Windows DLL correctly -- so -# the syntax is correct. There's just some weird interaction going on when -# it tries to "spawn" the link process from within the setup.py script. I'm -# not really sure how to debug this one right off-hand; obviously there's -# nothing wrong with the "spawn()" function since it's working properly for -# the compile stage.""" - __revision__ = "$Id$" @@ -31,6 +20,7 @@ CompileError, LibError, LinkError from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options +from distutils.file_util import write_file class BCPPCompiler(CCompiler) : @@ -123,14 +113,15 @@ def compile (self, elif ext in self._cpp_extensions: input_opt = "-P" + src = os.path.normpath(src) + obj = os.path.normpath(obj) + output_opt = "-o" + obj - - self.mkpath (os.path.dirname (obj)) + self.mkpath(os.path.dirname(obj)) # Compiler command line syntax is: "bcc32 [options] file(s)". # Note that the source file names must appear at the end of # the command line. - try: self.spawn ([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + @@ -212,6 +203,9 @@ def link_shared_object (self, extra_postargs=None, build_temp=None): + # XXX this ignores 'build_temp'! should follow the lead of + # msvccompiler.py + (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) @@ -226,33 +220,63 @@ def link_shared_object (self, if self._need_link (objects, output_filename): if debug: - ldflags = self.ldflags_shared_debug + ld_args = self.ldflags_shared_debug[:] else: - ldflags = self.ldflags_shared + ld_args = self.ldflags_shared[:] + # Borland C++ has problems with '/' in paths + objects = map(os.path.normpath, objects) startup_obj = 'c0d32' + objects.insert(0, startup_obj) - libraries.append ('mypylib') + # either exchange python15.lib in the python libs directory against + # a Borland-like one, or create one with name bcpp_python15.lib + # there and remove the pragmas from config.h + #libraries.append ('mypylib') libraries.append ('import32') libraries.append ('cw32mt') # Create a temporary exports file for use by the linker head, tail = os.path.split (output_filename) modname, ext = os.path.splitext (tail) - def_file = os.path.join (build_temp, '%s.def' % modname) - f = open (def_file, 'w') - f.write ('EXPORTS\n') + temp_dir = os.path.dirname(objects[0]) # preserve tree structure + def_file = os.path.join (temp_dir, '%s.def' % modname) + contents = ['EXPORTS'] for sym in (export_symbols or []): - f.write (' %s=_%s\n' % (sym, sym)) - - ld_args = ldflags + [startup_obj] + objects + \ - [',%s,,' % output_filename] + \ - libraries + [',' + def_file] + contents.append(' %s=_%s' % (sym, sym)) + self.execute(write_file, (def_file, contents), + "writing %s" % def_file) + + # Start building command line flags and options. + + for l in library_dirs: + ld_args.append("/L%s" % os.path.normpath(l)) + + ld_args.extend(objects) # list of object files + + # name of dll file + ld_args.extend([',',output_filename]) + # no map file and start libraries + ld_args.extend([',', ',']) + + for lib in libraries: + # see if we find it and if there is a bcpp specific lib + # (bcpp_xxx.lib) + libfile = self.find_library_file(library_dirs, lib, debug) + if libfile is None: + ld_args.append(lib) + # probably a BCPP internal library -- don't warn + # self.warn('library %s not found.' % lib) + else: + # full name which prefers bcpp_xxx.lib over xxx.lib + ld_args.append(libfile) + # def file for export symbols + ld_args.extend([',',def_file]) if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: - ld_args.extend (extra_postargs) + ld_args.extend(extra_postargs) self.mkpath (os.path.dirname (output_filename)) try: @@ -325,15 +349,32 @@ def library_dir_option (self, dir): def runtime_library_dir_option (self, dir): raise DistutilsPlatformError, \ - "don't know how to set runtime library search path for MSVC++" + ("don't know how to set runtime library search path " + "for Borland C++") def library_option (self, lib): return self.library_filename (lib) - def find_library_file (self, dirs, lib): - + def find_library_file (self, dirs, lib, debug=0): + # find library file + # bcpp_xxx.lib is better than xxx.lib + # and xxx_d.lib is better than xxx.lib if debug is set for dir in dirs: + if debug: + libfile = os.path.join ( + dir, self.library_filename ("bcpp_" + lib + "_d")) + if os.path.exists (libfile): + return libfile + libfile = os.path.join ( + dir, self.library_filename ("bcpp_" + lib)) + if os.path.exists (libfile): + return libfile + if debug: + libfile = os.path.join ( + dir, self.library_filename(lib + '_d')) + if os.path.exists (libfile): + return libfile libfile = os.path.join (dir, self.library_filename (lib)) if os.path.exists (libfile): return libfile From 6904a1cecea7706215802d00436350ed15771192 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:08:02 +0000 Subject: [PATCH 0526/8469] Rene Liebscher: factor 'find_executable()' out of '_spawn_nt()'. --- spawn.py | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/spawn.py b/spawn.py index 86ea3dfb50..651124d682 100644 --- a/spawn.py +++ b/spawn.py @@ -1,7 +1,9 @@ """distutils.spawn Provides the 'spawn()' function, a front-end to various platform- -specific functions for launching another program in a sub-process.""" +specific functions for launching another program in a sub-process. +Also provides the 'find_executable()' to search the path for a given +executable name. """ # created 1999/07/24, Greg Ward @@ -65,17 +67,8 @@ def _spawn_nt (cmd, executable = cmd[0] cmd = _nt_quote_args (cmd) if search_path: - paths = string.split( os.environ['PATH'], os.pathsep) - base,ext = os.path.splitext(executable) - if (ext != '.exe'): - executable = executable + '.exe' - if not os.path.isfile(executable): - paths.reverse() # go over the paths and keep the last one - for p in paths: - f = os.path.join( p, executable ) - if os.path.isfile ( f ): - # the file exists, we have a shot at spawn working - executable = f + # either we find one or it stays the same + executable = find_executable(executable) or executable if verbose: print string.join ([executable] + cmd[1:], ' ') if not dry_run: @@ -91,7 +84,6 @@ def _spawn_nt (cmd, raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) - def _spawn_posix (cmd, search_path=1, @@ -147,3 +139,28 @@ def _spawn_posix (cmd, "unknown error executing '%s': termination status %d" % \ (cmd[0], status) # _spawn_posix () + + +def find_executable(executable, path=None): + """Try to find 'executable' in the directories listed in 'path' (a + string listing directories separated by 'os.pathsep'; defaults to + os.environ['PATH']). Returns the complete filename or None if not + found. + """ + if path is None: + path = os.environ['PATH'] + paths = string.split(path, os.pathsep) + (base, ext) = os.path.splitext(executable) + if (sys.platform == 'win32') and (ext != '.exe'): + executable = executable + '.exe' + if not os.path.isfile(executable): + for p in paths: + f = os.path.join(p, executable) + if os.path.isfile(f): + # the file exists, we have a shot at spawn working + return f + return None + else: + return executable + +# find_executable() From 8be2f9c465909ad6d71cc1bb116df7f87fa25422 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:09:11 +0000 Subject: [PATCH 0527/8469] Rene Liebscher: deleted unneeded hard-coded assignments of CC, RANLIB, etc. in '_init_nt()' (they were kludges for CygwinCCompiler and no longer needed). --- sysconfig.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index b2aa3f2d1e..f6d941ac13 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -267,24 +267,8 @@ def _init_nt(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' - g['exec_prefix'] = EXEC_PREFIX - - # These are needed for the CygwinCCompiler and Mingw32CCompiler - # classes, which are just UnixCCompiler classes that happen to work on - # Windows. UnixCCompiler expects to find these values in sysconfig, so - # here they are. The fact that other Windows compilers don't need - # these values is pure luck (hmmm). - - # XXX I think these are now unnecessary... - - g['CC'] = "cc" # not gcc? - g['RANLIB'] = "ranlib" - g['AR'] = "ar" - g['OPT'] = "-O2" - g['SO'] = ".pyd" - g['LDSHARED'] = "ld" - g['CCSHARED'] = "" g['EXE'] = ".exe" + g['exec_prefix'] = EXEC_PREFIX def _init_mac(): From cc5431ba2d4c6e6fb0ab740721ea8734ca9dc3b8 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:31:56 +0000 Subject: [PATCH 0528/8469] Latest version from Rene Liebscher; major changes: - added big comment describing possible problems - look for and react to versions of gcc, ld, and dlltool; mainly this is done by the 'get_versions()' function and the CygwinCCompiler and Mingw32CCompiler constructors - move 'check_config_h()' to end of file and defer calling it until we need to (ie. in the CygwinCCompiler constructor) - lots of changes in 'link_shared_object()' -- mostly seems to be library and DLL stuff, but I don't follow it entirely --- cygwinccompiler.py | 337 +++++++++++++++++++++++++++++++-------------- 1 file changed, 230 insertions(+), 107 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 650627f5cf..3f9a5bd585 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -6,53 +6,54 @@ cygwin in no-cygwin mode). """ +# problems: +# +# * if you use a msvc compiled python version (1.5.2) +# 1. you have to insert a __GNUC__ section in its config.h +# 2. you have to generate a import library for its dll +# - create a def-file for python??.dll +# - create a import library using +# dlltool --dllname python15.dll --def python15.def \ +# --output-lib libpython15.a +# +# see also http://starship.python.net/crew/kernr/mingw32/Notes.html +# +# * We use put export_symbols in a def-file, and don't use +# --export-all-symbols because it doesn't worked reliable in some +# tested configurations. And because other windows compilers also +# need their symbols specified this no serious problem. +# +# tested configurations: +# +# * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works +# (after patching python's config.h and for C++ some other include files) +# see also http://starship.python.net/crew/kernr/mingw32/Notes.html +# * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works +# (ld doesn't support -shared, so we use dllwrap) +# * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now +# - its dllwrap doesn't work, there is a bug in binutils 2.10.90 +# see also ..... +# - using gcc -mdll instead dllwrap doesn't work without -static because +# it tries to link against dlls instead their import libraries. (If +# it finds the dll first.) +# By specifying -static we force ld to link against the import libraries, +# this is windows standard and there are normally not the necessary symbols +# in the dlls. + # created 2000/05/05, Rene Liebscher __revision__ = "$Id$" -import os,sys,string -from distutils import sysconfig +import os,sys from distutils.unixccompiler import UnixCCompiler - -# Because these compilers aren't configured in Python's config.h file by -# default we should at least warn the user if he is using a unmodified -# version. - -def check_config_h(): - """Checks if the GCC compiler is mentioned in config.h. If it is not, - compiling probably doesn't work, so print a warning to stderr. - """ - - # XXX the result of the check should be returned! - - from distutils import sysconfig - import string,sys - try: - # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough - f=open(sysconfig.get_config_h_filename()) - s=f.read() - f.close() - try: - # is somewhere a #ifdef __GNUC__ or something similar - string.index(s,"__GNUC__") - except ValueError: - sys.stderr.write ("warning: "+ - "Python's config.h doesn't seem to support your compiler.\n") - except IOError: - # if we can't read this file, we cannot say it is wrong - # the compiler will complain later about this file as missing - pass - - -# This is called when the module is imported, so we make this check only once -# XXX why not make it only when the compiler is needed? -check_config_h() - +from distutils.file_util import write_file class CygwinCCompiler (UnixCCompiler): compiler_type = 'cygwin' + gcc_version = None + dllwrap_version = None + ld_version = None def __init__ (self, verbose=0, @@ -61,22 +62,45 @@ def __init__ (self, UnixCCompiler.__init__ (self, verbose, dry_run, force) + if check_config_h()<=0: + self.warn( + "Python's config.h doesn't seem to support your compiler. " + "Compiling may fail because of undefined preprocessor macros.") + + (self.gcc_version, self.ld_version, self.dllwrap_version) = \ + get_versions() + sys.stderr.write(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % + (self.gcc_version, + self.ld_version, + self.dllwrap_version) ) + + # ld_version >= "2.10.90" should also be able to use + # gcc -mdll instead of dllwrap + # Older dllwraps had own version numbers, newer ones use the + # same as the rest of binutils ( also ld ) + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker = "gcc" + else: + self.linker = "dllwrap" + # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -O -Wall', - compiler_so='gcc -O -Wall', - linker_exe='gcc', - linker_so='dllwrap --target=i386-cygwin32') + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin -mdll -static' % + self.linker)) # cygwin and mingw32 need different sets of libraries - self.dll_libraries=[ - # cygwin shouldn't need msvcrt, - # but without the dll's will crash - # ( gcc version 2.91.57 ) - # perhaps something about initialization - # mingw32 needs it in all cases - "msvcrt" - ] + if self.gcc_version == "2.91.57": + # cygwin shouldn't need msvcrt, but without the dlls will crash + # (gcc version 2.91.57) -- perhaps something about initialization + self.dll_libraries=["msvcrt"] + self.warn( + "Consider upgrading to a newer version of gcc") + else: + self.dll_libraries=[] # __init__ () @@ -93,64 +117,67 @@ def link_shared_object (self, extra_postargs=None, build_temp=None): - if libraries == None: - libraries = [] + # use separate copies, so can modify the lists + extra_preargs = list(extra_preargs or []) + libraries = list(libraries or []) - # Additional libraries: the python library is always needed on - # Windows we need the python version without the dot, eg. '15' - - pythonlib = ("python%d%d" % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - libraries.append(pythonlib) + # Additional libraries libraries.extend(self.dll_libraries) + + # we want to put some files in the same directory as the + # object files are, build_temp doesn't help much - # name of extension + # where are the object files + temp_dir = os.path.dirname(objects[0]) - # XXX WRONG WRONG WRONG - # this is NOT the place to make guesses about Python namespaces; - # that MUST be done in build_ext.py + # name of dll to give the helper files (def, lib, exp) the same name + (dll_name, dll_extension) = os.path.splitext( + os.path.basename(output_filename)) - if not debug: - ext_name = os.path.basename(output_filename)[:-len(".pyd")] - else: - ext_name = os.path.basename(output_filename)[:-len("_d.pyd")] + # generate the filenames for these files + def_file = None # this will be done later, if necessary + exp_file = os.path.join(temp_dir, dll_name + ".exp") + lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a") - def_file = os.path.join(build_temp, ext_name + ".def") - #exp_file = os.path.join(build_temp, ext_name + ".exp") - #lib_file = os.path.join(build_temp, 'lib' + ext_name + ".a") - - # Make .def file - # (It would probably better to check if we really need this, - # but for this we had to insert some unchanged parts of - # UnixCCompiler, and this is not what we want.) - f = open(def_file,"w") - f.write("EXPORTS\n") # intro - if export_symbols == None: - # export a function "init" + ext_name - f.write("init" + ext_name + "\n") + #extra_preargs.append("--verbose") + if self.linker == "dllwrap": + extra_preargs.extend([#"--output-exp",exp_file, + "--output-lib",lib_file, + ]) else: - # if there are more symbols to export write them into f + # doesn't work: bfd_close build\...\libfoo.a: Invalid operation + extra_preargs.extend([#"-Wl,--out-implib,%s" % lib_file, + ]) + + # check what we got in export_symbols + if export_symbols is not None: + # Make .def file + # (It would probably better to check if we really need this, + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) + def_file = os.path.join(temp_dir, dll_name + ".def") + contents = [ + "LIBRARY %s" % os.path.basename(output_filename), + "EXPORTS"] for sym in export_symbols: - f.write(sym+"\n") - f.close() - - if extra_preargs == None: - extra_preargs = [] - - extra_preargs = extra_preargs + [ - #"--verbose", - #"--output-exp",exp_file, - #"--output-lib",lib_file, - "--def",def_file - ] - + contents.append(sym) + self.execute(write_file, (def_file, contents), + "writing %s" % def_file) + + if def_file: + if self.linker == "dllwrap": + # for dllwrap we have to use a special option + extra_preargs.append("--def") + # for gcc/ld it is specified as any other object file + extra_preargs.append(def_file) + # who wants symbols and a many times larger output file # should explicitly switch the debug mode on - # otherwise we let dllwrap strip the output file + # otherwise we let dllwrap/ld strip the output file # (On my machine unstripped_file = stripped_file + 254KB # 10KB < stripped_file < ??100KB ) if not debug: - extra_preargs = extra_preargs + ["-s"] + extra_preargs.append("-s") UnixCCompiler.link_shared_object(self, objects, @@ -159,7 +186,7 @@ def link_shared_object (self, libraries, library_dirs, runtime_library_dirs, - None, # export_symbols, we do this with our def-file + None, # export_symbols, we do this in our def-file debug, extra_preargs, extra_postargs, @@ -181,19 +208,115 @@ def __init__ (self, force=0): CygwinCCompiler.__init__ (self, verbose, dry_run, force) + + # A real mingw32 doesn't need to specify a different entry point, + # but cygwin 2.91.57 in no-cygwin-mode needs it. + if self.gcc_version <= "2.91.57": + entry_point = '--entry _DllMain@12' + else: + entry_point = '' self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -O -Wall', + compiler_so='gcc -mno-cygwin -mdll -O -Wall', linker_exe='gcc -mno-cygwin', - linker_so='dllwrap' - + ' --target=i386-mingw32' - + ' --entry _DllMain@12') - # mingw32 doesn't really need 'target' and cygwin too (it seems, - # it is enough to specify a different entry point) - - # no additional libraries need - # (only msvcrt, which is already added by CygwinCCompiler) - + linker_so='%s -mno-cygwin -mdll -static %s' + % (self.linker, entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) + # (-mthreads: Support thread-safe exception handling on `Mingw32') + + # no additional libraries needed + self.dll_libraries=[] + # __init__ () - + # class Mingw32CCompiler + +# Because these compilers aren't configured in Python's config.h file by +# default, we should at least warn the user if he is using a unmodified +# version. + +def check_config_h(): + """Checks if the GCC compiler is mentioned in config.h. If it is not, + compiling probably doesn't work. + """ + # return values + # 2: OK, python was compiled with GCC + # 1: OK, python's config.h mentions __GCC__ + # 0: uncertain, because we couldn't check it + # -1: probably not OK, because we didn't found it in config.h + # You could check check_config_h()>0 => OK + + from distutils import sysconfig + import string,sys + # if sys.version contains GCC then python was compiled with + # GCC, and the config.h file should be OK + if -1 == string.find(sys.version,"GCC"): + pass # go to the next test + else: + return 2 + + try: + # It would probably better to read single lines to search. + # But we do this only once, and it is fast enough + f=open(sysconfig.get_config_h_filename()) + s=f.read() + f.close() + + # is somewhere a #ifdef __GNUC__ or something similar + if -1 == string.find(s,"__GNUC__"): + return -1 + else: + return 1 + except IOError: + # if we can't read this file, we cannot say it is wrong + # the compiler will complain later about this file as missing + pass + return 0 + +def get_versions(): + """ Try to find out the versions of gcc, ld and dllwrap. + If not possible it returns None for it. + """ + from distutils.version import StrictVersion + from distutils.spawn import find_executable + import re + + gcc_exe = find_executable('gcc') + if gcc_exe: + out = os.popen(gcc_exe + ' -dumpversion','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+\.\d+)',out_string) + if result: + gcc_version = StrictVersion(result.group(1)) + else: + gcc_version = None + else: + gcc_version = None + ld_exe = find_executable('ld') + if ld_exe: + out = os.popen(ld_exe + ' -v','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+\.\d+)',out_string) + if result: + ld_version = StrictVersion(result.group(1)) + else: + ld_version = None + else: + ld_version = None + dllwrap_exe = find_executable('dllwrap') + if dllwrap_exe: + out = os.popen(dllwrap_exe + ' --version','r') + out_string = out.read() + out.close() + result = re.search(' (\d+\.\d+\.\d+)',out_string) + if result: + dllwrap_version = StrictVersion(result.group(1)) + else: + dllwrap_version = None + else: + dllwrap_version = None + return (gcc_version, ld_version, dllwrap_version) + From 8370736a2f17bc52b2aae9f0497cbf39a4851987 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:34:18 +0000 Subject: [PATCH 0529/8469] Rene Liebscher: fix 'skipping byte-compilation' message for grammatical consistency. --- command/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index d866d8cc82..1c15db1494 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -74,7 +74,7 @@ def run (self): out_fn = f + (__debug__ and "c" or "o") compile_msg = "byte-compiling %s to %s" % \ (f, os.path.basename (out_fn)) - skip_msg = "byte-compilation of %s skipped" % f + skip_msg = "skipping byte-compilation of %s" % f self.make_file (f, out_fn, compile, (f,), compile_msg, skip_msg) # run () From 9624e74733a8888f50d4cc7bef25e7e3c78de50e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:37:30 +0000 Subject: [PATCH 0530/8469] Added the 'execute()' function (moved here from cmd.py with minor tweakage). --- util.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/util.py b/util.py index d69626e1f1..37cd4b554e 100644 --- a/util.py +++ b/util.py @@ -223,3 +223,29 @@ def split_quoted (s): return words # split_quoted () + + +def execute (func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world (eg. by writing + to the filesystem). Such actions are special because they are disabled + by the 'dry_run' flag, and announce themselves if 'verbose' is true. + This method takes care of all that bureaucracy for you; all you have to + do is supply the function to call and an argument tuple for it (to + embody the "external action" being performed), and an optional message + to print. + """ + # Generate a message if we weren't passed one + if msg is None: + msg = "%s%s" % (func.__name__, `args`) + if msg[-2:] == ',)': # correct for singleton tuple + msg = msg[0:-2] + ')' + + # Print it if verbosity level is high enough + if verbose: + print msg + + # And do it, as long as we're not in dry-run mode + if not dry_run: + apply(func, args) + +# execute() From 20b387f6de0ca9835df40e2b4728a0bd9e629521 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:37:53 +0000 Subject: [PATCH 0531/8469] Replaced 'execute()' method with a thin wrapper around 'util.execute()'. --- cmd.py | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/cmd.py b/cmd.py index 8beb5d443e..c905edecb4 100644 --- a/cmd.py +++ b/cmd.py @@ -318,31 +318,7 @@ def warn (self, msg): def execute (self, func, args, msg=None, level=1): - """Perform some action that affects the outside world (eg. by - writing to the filesystem). Such actions are special because they - should be disabled by the "dry run" flag, and should announce - themselves if the current verbosity level is high enough. This - method takes care of all that bureaucracy for you; all you have to - do is supply the function to call and an argument tuple for it (to - embody the "external action" being performed), a message to print - if the verbosity level is high enough, and an optional verbosity - threshold. - """ - - # Generate a message if we weren't passed one - if msg is None: - msg = "%s %s" % (func.__name__, `args`) - if msg[-2:] == ',)': # correct for singleton tuple - msg = msg[0:-2] + ')' - - # Print it if verbosity level is high enough - self.announce (msg, level) - - # And do it, as long as we're not in dry-run mode - if not self.dry_run: - apply (func, args) - - # execute() + util.execute(func, args, msg, self.verbose >= level, self.dry_run) def mkpath (self, name, mode=0777): From edbbc73e92e3889f5f3ea0ac9f5a2e9445c5751d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:38:20 +0000 Subject: [PATCH 0532/8469] Added 'execute()' method, a thin wrapper around 'util.execute() (just like the one in cmd.py). --- ccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index eb6200f638..d8d8ab916c 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,7 +15,7 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group -from distutils.util import split_quoted +from distutils.util import split_quoted, execute class CCompiler: @@ -784,6 +784,9 @@ def announce (self, msg, level=1): def warn (self, msg): sys.stderr.write ("warning: %s\n" % msg) + def execute (self, func, args, msg=None, level=1): + execute(func, args, msg, self.verbose >= level, self.dry_run) + def spawn (self, cmd): spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) From bb7acec3a19a3e0488ef95e2d5e41c0df0ed446b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:44:44 +0000 Subject: [PATCH 0533/8469] Added 'wininst' to the 'format_commands' list, so it's included in the --help-formats output. Also moved that list up so it's more obvious when adding formats. --- command/bdist.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 100563a9d1..1c862d585d 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -52,17 +52,20 @@ class bdist (Command): default_format = { 'posix': 'gztar', 'nt': 'zip', } + # Establish the preferred order (for the --help-formats option). + format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', + 'wininst', 'zip'] + + # And the real information. format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), 'gztar': ('bdist_dumb', "gzip'ed tar file"), 'bztar': ('bdist_dumb', "bzip2'ed tar file"), 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), - 'zip': ('bdist_dumb', "ZIP file"), 'wininst': ('bdist_wininst', "Windows executable installer"), + 'zip': ('bdist_dumb', "ZIP file"), } - # establish the preferred order - format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', 'zip'] def initialize_options (self): From a509be9cada73fce73f71a7cf74a175eac6d530a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 2 Aug 2000 01:49:40 +0000 Subject: [PATCH 0534/8469] Typo fix. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index f6d941ac13..2246327781 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -77,7 +77,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return prefix elif os.name == "mac": - if platform_specific: + if plat_specific: if standard_lib: return os.path.join(EXEC_PREFIX, "Mac", "Plugins") else: From e989444d5f0c7def7be57bbfa1d1529298fa1b07 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 4 Aug 2000 01:28:39 +0000 Subject: [PATCH 0535/8469] Added 'debug' flag to 'find_library_file()'. --- ccompiler.py | 8 +++++--- unixccompiler.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index d8d8ab916c..141af796a0 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -682,10 +682,12 @@ def library_option (self, lib): """ raise NotImplementedError - def find_library_file (self, dirs, lib): + def find_library_file (self, dirs, lib, debug=0): """Search the specified list of directories for a static or shared - library file 'lib' and return the full path to that file. Return - None if it wasn't found in any of the specified directories. + library file 'lib' and return the full path to that file. If + 'debug' true, look for a debugging version (if that makes sense on + the current platform). Return None if 'lib' wasn't found in any of + the specified directories. """ raise NotImplementedError diff --git a/unixccompiler.py b/unixccompiler.py index 799560c396..9339850102 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -317,7 +317,7 @@ def library_option (self, lib): return "-l" + lib - def find_library_file (self, dirs, lib): + def find_library_file (self, dirs, lib, debug=0): for dir in dirs: shared = os.path.join ( From be27b1c8bcaa43999f0008d56c4f5c502495e346 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 4 Aug 2000 01:29:27 +0000 Subject: [PATCH 0536/8469] Added 'debug' flag to 'find_library_file()', and changed code to handle it. --- msvccompiler.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index a1dedb0e53..eecbb620ed 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -474,13 +474,18 @@ def library_option (self, lib): return self.library_filename (lib) - def find_library_file (self, dirs, lib): - + def find_library_file (self, dirs, lib, debug=0): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] for dir in dirs: - libfile = os.path.join (dir, self.library_filename (lib)) - if os.path.exists (libfile): - return libfile - + for name in try_names: + libfile = os.path.join(dir, self.library_filename (name)) + if os.path.exists(libfile): + return libfile else: # Oops, didn't find it in *any* of 'dirs' return None From 8e0f15f62975ef32643724e05c08eebf8376db4b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 4 Aug 2000 01:30:03 +0000 Subject: [PATCH 0537/8469] Rewrote 'find_library_file()' much more cleanly (and consistently with MSVCCompiler's version, to aid in factoring common code out of the two classes when the time comes). --- bcppcompiler.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 7daa597b75..1d897de61a 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -357,28 +357,26 @@ def library_option (self, lib): def find_library_file (self, dirs, lib, debug=0): - # find library file + # List of effective library names to try, in order of preference: # bcpp_xxx.lib is better than xxx.lib # and xxx_d.lib is better than xxx.lib if debug is set + # + # The "bcpp_" prefix is to handle a Python installation for people + # with multiple compilers (primarily Distutils hackers, I suspect + # ;-). The idea is they'd have one static library for each + # compiler they care about, since (almost?) every Windows compiler + # seems to have a different format for static libraries. + if debug: + dlib = (lib + "_d") + try_names = ("bcpp_" + dlib, "bcpp_" + lib, dlib, lib) + else: + try_names = ("bcpp_" + lib, lib) + for dir in dirs: - if debug: - libfile = os.path.join ( - dir, self.library_filename ("bcpp_" + lib + "_d")) - if os.path.exists (libfile): + for name in try_names: + libfile = os.path.join(dir, self.library_filename(name)) + if os.path.exists(libfile): return libfile - libfile = os.path.join ( - dir, self.library_filename ("bcpp_" + lib)) - if os.path.exists (libfile): - return libfile - if debug: - libfile = os.path.join ( - dir, self.library_filename(lib + '_d')) - if os.path.exists (libfile): - return libfile - libfile = os.path.join (dir, self.library_filename (lib)) - if os.path.exists (libfile): - return libfile - else: # Oops, didn't find it in *any* of 'dirs' return None From 7555345e8cd473cae9a0b4ee91fb265885bb35c5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 4 Aug 2000 01:31:13 +0000 Subject: [PATCH 0538/8469] Added 'debug_print()'. --- ccompiler.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index 141af796a0..ce3f2be69d 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -783,6 +783,11 @@ def announce (self, msg, level=1): if self.verbose >= level: print msg + def debug_print (self, msg): + from distutils.core import DEBUG + if DEBUG: + print msg + def warn (self, msg): sys.stderr.write ("warning: %s\n" % msg) From 242c59cb2be299e3229b9bcde18dd47eff67fd4d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Aug 2000 01:25:24 +0000 Subject: [PATCH 0539/8469] Drop the 'extend()' function -- old 1.5.1 compatibility hack that wasn't actually used anywhere. Drop the "from xxx_util import*" backwards compability hacks. --- util.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/util.py b/util.py index 37cd4b554e..96266d266e 100644 --- a/util.py +++ b/util.py @@ -11,26 +11,6 @@ from distutils.errors import * from distutils.spawn import spawn -# for backwards compatibility: -from distutils.file_util import * -from distutils.dir_util import * -from distutils.dep_util import * -from distutils.archive_util import * - - -# More backwards compatibility hacks -def extend (list, new_list): - """Appends the list 'new_list' to 'list', just like the 'extend()' - list method does in Python 1.5.2 -- but this works on earlier - versions of Python too.""" - - if hasattr (list, 'extend'): - list.extend (new_list) - else: - list[len(list):] = new_list - -# extend () - def get_platform (): """Return a string (suitable for tacking onto directory names) that From 177d3705cc1ffcd1b068776baea88dd5f44259cb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 5 Aug 2000 01:31:54 +0000 Subject: [PATCH 0540/8469] Fixed imports from '*util' modules to not just import everything from util. --- command/bdist_dumb.py | 3 ++- command/bdist_rpm.py | 3 ++- command/bdist_wininst.py | 3 ++- command/clean.py | 2 +- command/install.py | 3 ++- command/install_lib.py | 2 +- command/sdist.py | 18 ++++++++---------- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 805aa0a9eb..e93c6b7272 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -10,7 +10,8 @@ import os from distutils.core import Command -from distutils.util import get_platform, create_tree, remove_tree +from distutils.util import get_platform +from distutils.dir_util import create_tree, remove_tree from distutils.errors import * class bdist_dumb (Command): diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 3302eea24b..e45d7a368b 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -10,7 +10,8 @@ import os, string from types import * from distutils.core import Command, DEBUG -from distutils.util import get_platform, write_file +from distutils.util import get_platform +from distutils.file_util import write_file from distutils.errors import * class bdist_rpm (Command): diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0c53bf9e6b..38e973b66d 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -9,7 +9,8 @@ import sys, os, string from distutils.core import Command -from distutils.util import get_platform, create_tree, remove_tree +from distutils.util import get_platform +from distutils.dir_util import create_tree, remove_tree from distutils.errors import * class bdist_wininst (Command): diff --git a/command/clean.py b/command/clean.py index 31147b58ef..1d8c7b2200 100644 --- a/command/clean.py +++ b/command/clean.py @@ -8,7 +8,7 @@ import os from distutils.core import Command -from distutils.util import remove_tree +from distutils.dir_util import remove_tree class clean (Command): diff --git a/command/install.py b/command/install.py index 1be49046ec..6385fdc224 100644 --- a/command/install.py +++ b/command/install.py @@ -10,7 +10,8 @@ from types import * from distutils.core import Command, DEBUG from distutils import sysconfig -from distutils.util import write_file, convert_path, subst_vars, change_root +from distutils.file_util import write_file +from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError from glob import glob diff --git a/command/install_lib.py b/command/install_lib.py index 1c15db1494..879a7d00e2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -4,7 +4,7 @@ import sys, os, string from distutils.core import Command -from distutils.util import copy_tree +from distutils.dir_util import copy_tree class install_lib (Command): diff --git a/command/sdist.py b/command/sdist.py index 4765d7fa13..b2d7a86f1f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -10,9 +10,7 @@ from types import * from glob import glob from distutils.core import Command -from distutils.util import \ - create_tree, remove_tree, newer, write_file, \ - check_archive_formats +from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile from distutils.errors import * from distutils.filelist import FileList @@ -117,7 +115,7 @@ def finalize_options (self): "don't know how to create source distributions " + \ "on platform %s" % os.name - bad_format = check_archive_formats (self.formats) + bad_format = archive_util.check_archive_formats (self.formats) if bad_format: raise DistutilsOptionError, \ "unknown archive format '%s'" % bad_format @@ -195,7 +193,7 @@ def get_file_list (self): # manifest; if so, we'll regenerate the manifest. template_exists = os.path.isfile(self.template) if template_exists: - template_newer = newer(self.template, self.manifest) + template_newer = dep_util.newer(self.template, self.manifest) # The contents of the manifest file almost certainly depend on the # setup script as well as the manifest template -- so if the setup @@ -204,7 +202,7 @@ def get_file_list (self): # manifest, but there's no template -- which will happen if the # developer elects to generate a manifest some other way -- then we # can't regenerate the manifest, so we don't.) - setup_newer = newer(sys.argv[0], self.manifest) + setup_newer = dep_util.newer(sys.argv[0], self.manifest) # cases: # 1) no manifest, template exists: generate manifest @@ -368,7 +366,7 @@ def write_manifest (self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - self.execute(write_file, + self.execute(file_util.write_file, (self.manifest, self.filelist.files), "writing manifest file '%s'" % self.manifest) @@ -404,8 +402,8 @@ def make_release_tree (self, base_dir, files): """ # Create all the directories under 'base_dir' necessary to # put 'files' there. - create_tree (base_dir, files, - verbose=self.verbose, dry_run=self.dry_run) + dir_util.create_tree (base_dir, files, + verbose=self.verbose, dry_run=self.dry_run) # And walk over the list of files, either making a hard link (if # os.link exists) to each one that doesn't already exist in its @@ -453,7 +451,7 @@ def make_distribution (self): self.archive_files = archive_files if not self.keep_tree: - remove_tree (base_dir, self.verbose, self.dry_run) + dir_util.remove_tree (base_dir, self.verbose, self.dry_run) def get_archive_files (self): """Return the list of archive files created when the command From d6bdb1ca69a126e1c651d06d304c283ca304254a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 7 Aug 2000 00:45:51 +0000 Subject: [PATCH 0541/8469] Fix so we clear or reinitialize various data structures before populating (allows the same FancyGetopt object to be used multiple times with different option tables). --- fancy_getopt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fancy_getopt.py b/fancy_getopt.py index 6adfc819c2..a62bc0df75 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -93,6 +93,7 @@ def __init__ (self, option_table=None): def _build_index (self): + self.option_index.clear() for option in self.option_table: self.option_index[option[0]] = option @@ -153,6 +154,10 @@ def _grok_option_table (self): the option table. Called by 'getopt()' before it can do anything worthwhile.""" + self.long_opts = [] + self.short_opts = [] + self.short2long.clear() + for option in self.option_table: try: (long, short, help) = option From f777456bab4933786d6890e00ccd603912e382b1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 7 Aug 2000 00:48:04 +0000 Subject: [PATCH 0542/8469] Fix so the 'install_libbase' directory -- where .pth files are installed -- participates in the "--root" hack, ie. it also has a new root directory hacked on at the very last minute (essential if the .pth file is to be included in an RPM or other smart installer!). --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 6385fdc224..2a59e16b96 100644 --- a/command/install.py +++ b/command/install.py @@ -273,7 +273,7 @@ def finalize_options (self): # If a new root directory was supplied, make all the installation # dirs relative to it. if self.root is not None: - for name in ('lib', 'purelib', 'platlib', + for name in ('libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers'): attr = "install_" + name new_val = change_root (self.root, getattr (self, attr)) From 5dcbeda034a291131d3b1106ea80896749366a9e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 8 Aug 2000 14:38:13 +0000 Subject: [PATCH 0543/8469] Fix so 'split_quoted()' handles any whitespace delimiter (not just space). --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 96266d266e..2487f6dab6 100644 --- a/util.py +++ b/util.py @@ -139,7 +139,7 @@ def grok_environment_error (exc, prefix="error: "): # Needed by 'split_quoted()' -_wordchars_re = re.compile(r'[^\\\'\"\ ]*') +_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') @@ -169,7 +169,7 @@ def split_quoted (s): words.append(s[:end]) break - if s[end] == ' ': # unescaped, unquoted space: now + if s[end] in string.whitespace: # unescaped, unquoted whitespace: now words.append(s[:end]) # we definitely have a word delimiter s = string.lstrip(s[end:]) pos = 0 From bb6a4ba2745a9747b1a152f6d6a1dbf5cc20574f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:36:47 +0000 Subject: [PATCH 0544/8469] Fix references to functions formerly imported from 'util'. --- cmd.py | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/cmd.py b/cmd.py index c905edecb4..474f8f321b 100644 --- a/cmd.py +++ b/cmd.py @@ -12,7 +12,7 @@ import sys, os, string, re from types import * from distutils.errors import * -from distutils import util +from distutils import util, dir_util, file_util, archive_util, dep_util class Command: @@ -322,8 +322,8 @@ def execute (self, func, args, msg=None, level=1): def mkpath (self, name, mode=0777): - util.mkpath (name, mode, - self.verbose, self.dry_run) + dir_util.mkpath(name, mode, + self.verbose, self.dry_run) def copy_file (self, infile, outfile, @@ -332,12 +332,13 @@ def copy_file (self, infile, outfile, former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)""" - return util.copy_file (infile, outfile, - preserve_mode, preserve_times, - not self.force, - link, - self.verbose >= level, - self.dry_run) + return file_util.copy_file( + infile, outfile, + preserve_mode, preserve_times, + not self.force, + link, + self.verbose >= level, + self.dry_run) def copy_tree (self, infile, outfile, @@ -346,18 +347,19 @@ def copy_tree (self, infile, outfile, """Copy an entire directory tree respecting verbose, dry-run, and force flags. """ - return util.copy_tree (infile, outfile, - preserve_mode,preserve_times,preserve_symlinks, - not self.force, - self.verbose >= level, - self.dry_run) + return dir_util.copy_tree( + infile, outfile, + preserve_mode,preserve_times,preserve_symlinks, + not self.force, + self.verbose >= level, + self.dry_run) def move_file (self, src, dst, level=1): """Move a file respecting verbose and dry-run flags.""" - return util.move_file (src, dst, - self.verbose >= level, - self.dry_run) + return file_util.move_file (src, dst, + self.verbose >= level, + self.dry_run) def spawn (self, cmd, search_path=1, level=1): @@ -370,8 +372,9 @@ def spawn (self, cmd, search_path=1, level=1): def make_archive (self, base_name, format, root_dir=None, base_dir=None): - return util.make_archive (base_name, format, root_dir, base_dir, - self.verbose, self.dry_run) + return archive_util.make_archive( + base_name, format, root_dir, base_dir, + self.verbose, self.dry_run) def make_file (self, infiles, outfile, func, args, @@ -401,7 +404,7 @@ def make_file (self, infiles, outfile, func, args, # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if self.force or util.newer_group (infiles, outfile): + if self.force or dep_util.newer_group (infiles, outfile): self.execute (func, args, exec_msg, level) # Otherwise, print the "skip" message From 5351623c97c7a5adc612074a46d601dbd9f948c5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:38:58 +0000 Subject: [PATCH 0545/8469] Typo fix in docstring. --- extension.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extension.py b/extension.py index 95a2ece8e8..f0021d0edc 100644 --- a/extension.py +++ b/extension.py @@ -23,8 +23,7 @@ class Extension: """Just a collection of attributes that describes an extension module and everything needed to build it (hopefully in a portable - way, but there are hooks that let you can be as unportable as you - need). + way, but there are hooks that let you be as unportable as you need). Instance attributes: name : string From f04ac5dd09157b550218a607a0721aa1bb86e821 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:41:40 +0000 Subject: [PATCH 0546/8469] Rene Liebscher: ext.export_symbols is now always a list (added 'or []'). --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index f0021d0edc..1d3112b652 100644 --- a/extension.py +++ b/extension.py @@ -104,6 +104,6 @@ def __init__ (self, name, sources, self.extra_objects = extra_objects or [] self.extra_compile_args = extra_compile_args or [] self.extra_link_args = extra_link_args or [] - self.export_symbols = export_symbols + self.export_symbols = export_symbols or [] # class Extension From dff17c86072b76f6491300166e4b9670149ddd9b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:42:35 +0000 Subject: [PATCH 0547/8469] get_export_symbols() changed, adds now module init function if not given by the user. --- command/build_ext.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1ffe3234d4..aca6dac407 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -549,14 +549,10 @@ def get_export_symbols (self, ext): the .pyd file (DLL) must export the module "init" function. """ - # XXX what if 'export_symbols' defined but it doesn't contain - # "init" + module_name? Should we add it? warn? or just carry - # on doing nothing? - - if ext.export_symbols is None: - return ["init" + string.split(ext.name,'.')[-1]] - else: - return ext.export_symbols + initfunc_name = "init" + string.split(ext.name,'.')[-1] + if initfunc_name not in ext.export_symbols: + ext.export_symbols.append(initfunc_name) + return ext.export_symbols def get_libraries (self, ext): """Return the list of libraries to link against when building a From 9ef0502074aa149aa35ac81368f89253308a8012 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:43:16 +0000 Subject: [PATCH 0548/8469] Rene Liebscher: * changed some list.extend([...]) to list.append(...) * added '/g0' to compiler_options, so compiler doesn't stop after 100 warnings --- bcppcompiler.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 1d897de61a..930490245b 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -67,8 +67,8 @@ def __init__ (self, self.lib = "tlib.exe" self.preprocess_options = None - self.compile_options = ['/tWM', '/O2', '/q'] - self.compile_options_debug = ['/tWM', '/Od', '/q'] + self.compile_options = ['/tWM', '/O2', '/q', '/g0'] + self.compile_options_debug = ['/tWM', '/Od', '/q', '/g0'] self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x'] self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x'] @@ -232,7 +232,6 @@ def link_shared_object (self, # either exchange python15.lib in the python libs directory against # a Borland-like one, or create one with name bcpp_python15.lib # there and remove the pragmas from config.h - #libraries.append ('mypylib') libraries.append ('import32') libraries.append ('cw32mt') @@ -257,7 +256,7 @@ def link_shared_object (self, # name of dll file ld_args.extend([',',output_filename]) # no map file and start libraries - ld_args.extend([',', ',']) + ld_args.append(',,') for lib in libraries: # see if we find it and if there is a bcpp specific lib From 2c9c53b17589f71e434be1a8dae4ead6dd6e3f1e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:43:56 +0000 Subject: [PATCH 0549/8469] Rene Liebscher: * use self.debug_print() for debug messages * uses now copy.copy() to copy lists * added 'shared_lib_extension=".dll"', ... , this is necessary if you want use the compiler class outside of the standard distutils build process. * changed result type of check_config_h() from int to string --- cygwinccompiler.py | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 3f9a5bd585..da0d60b0c2 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -44,16 +44,19 @@ __revision__ = "$Id$" -import os,sys +import os,sys,copy from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file class CygwinCCompiler (UnixCCompiler): compiler_type = 'cygwin' - gcc_version = None - dllwrap_version = None - ld_version = None + obj_extension = ".o" + static_lib_extension = ".a" + shared_lib_extension = ".dll" + static_lib_format = "lib%s%s" + shared_lib_format = "%s%s" + exe_extension = ".exe" def __init__ (self, verbose=0, @@ -62,14 +65,16 @@ def __init__ (self, UnixCCompiler.__init__ (self, verbose, dry_run, force) - if check_config_h()<=0: + check_result = check_config_h() + self.debug_print("Python's GCC status: %s" % check_result) + if check_result[:2] <> "OK": self.warn( "Python's config.h doesn't seem to support your compiler. " "Compiling may fail because of undefined preprocessor macros.") (self.gcc_version, self.ld_version, self.dllwrap_version) = \ get_versions() - sys.stderr.write(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % + self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, self.dllwrap_version) ) @@ -117,9 +122,9 @@ def link_shared_object (self, extra_postargs=None, build_temp=None): - # use separate copies, so can modify the lists - extra_preargs = list(extra_preargs or []) - libraries = list(libraries or []) + # use separate copies, so we can modify the lists + extra_preargs = copy.copy(extra_preargs or []) + libraries = copy.copy(libraries or []) # Additional libraries libraries.extend(self.dll_libraries) @@ -241,11 +246,11 @@ def check_config_h(): compiling probably doesn't work. """ # return values - # 2: OK, python was compiled with GCC - # 1: OK, python's config.h mentions __GCC__ - # 0: uncertain, because we couldn't check it - # -1: probably not OK, because we didn't found it in config.h - # You could check check_config_h()>0 => OK + # "OK, python was compiled with GCC" + # "OK, python's config.h mentions __GCC__" + # "uncertain, because we couldn't check it" + # "not OK, because we didn't found __GCC__ in config.h" + # You could check check_config_h()[:2] == "OK" from distutils import sysconfig import string,sys @@ -254,7 +259,7 @@ def check_config_h(): if -1 == string.find(sys.version,"GCC"): pass # go to the next test else: - return 2 + return "OK, python was compiled with GCC" try: # It would probably better to read single lines to search. @@ -265,14 +270,14 @@ def check_config_h(): # is somewhere a #ifdef __GNUC__ or something similar if -1 == string.find(s,"__GNUC__"): - return -1 + return "not OK, because we didn't found __GCC__ in config.h" else: - return 1 + return "OK, python's config.h mentions __GCC__" except IOError: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing pass - return 0 + return "uncertain, because we couldn't check it" def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. From b9d00036db2020f271d9509152265dc170ac729b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 00:54:39 +0000 Subject: [PATCH 0550/8469] Added a whinging comment about the ugliness of constructing the BCPP argument list. --- bcppcompiler.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bcppcompiler.py b/bcppcompiler.py index 930490245b..8ad9e4f2d4 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -253,6 +253,16 @@ def link_shared_object (self, ld_args.extend(objects) # list of object files + # XXX the command-line syntax for Borland C++ is a bit wonky; + # certain filenames are jammed together in one big string, but + # comma-delimited. This doesn't mesh too well with the + # Unix-centric attitude (with a DOS/Windows quoting hack) of + # 'spawn()', so constructing the argument list is a bit + # awkward. Note that doing the obvious thing and jamming all + # the filenames and commas into one argument would be wrong, + # because 'spawn()' would quote any filenames with spaces in + # them. Arghghh!. Apparently it works fine as coded... + # name of dll file ld_args.extend([',',output_filename]) # no map file and start libraries From 5042724ac26c16206dffec481827d36d8778a182 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 13 Aug 2000 01:18:55 +0000 Subject: [PATCH 0551/8469] Overhauld 'check_config_h()': now returns a (status, details) tuple, and is much better documented to boot. --- cygwinccompiler.py | 71 +++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index da0d60b0c2..2ac2678e73 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -65,11 +65,13 @@ def __init__ (self, UnixCCompiler.__init__ (self, verbose, dry_run, force) - check_result = check_config_h() - self.debug_print("Python's GCC status: %s" % check_result) - if check_result[:2] <> "OK": + (status, details) = check_config_h() + self.debug_print("Python's GCC status: %s (details: %s)" % + (status, details)) + if status is not CONFIG_H_OK: self.warn( - "Python's config.h doesn't seem to support your compiler. " + "Python's config.h doesn't seem to support your compiler. " + + ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") (self.gcc_version, self.ld_version, self.dllwrap_version) = \ @@ -241,43 +243,60 @@ def __init__ (self, # default, we should at least warn the user if he is using a unmodified # version. +CONFIG_H_OK = "ok" +CONFIG_H_NOTOK = "not ok" +CONFIG_H_UNCERTAIN = "uncertain" + def check_config_h(): - """Checks if the GCC compiler is mentioned in config.h. If it is not, - compiling probably doesn't work. + + """Check if the current Python installation (specifically, config.h) + appears amenable to building extensions with GCC. Returns a tuple + (status, details), where 'status' is one of the following constants: + CONFIG_H_OK + all is well, go ahead and compile + CONFIG_H_NOTOK + doesn't look good + CONFIG_H_UNCERTAIN + not sure -- unable to read config.h + 'details' is a human-readable string explaining the situation. + + Note there are two ways to conclude "OK": either 'sys.version' contains + the string "GCC" (implying that this Python was built with GCC), or the + installed "config.h" contains the string "__GNUC__". """ - # return values - # "OK, python was compiled with GCC" - # "OK, python's config.h mentions __GCC__" - # "uncertain, because we couldn't check it" - # "not OK, because we didn't found __GCC__ in config.h" - # You could check check_config_h()[:2] == "OK" + + # XXX since this function also checks sys.version, it's not strictly a + # "config.h" check -- should probably be renamed... from distutils import sysconfig import string,sys # if sys.version contains GCC then python was compiled with # GCC, and the config.h file should be OK - if -1 == string.find(sys.version,"GCC"): - pass # go to the next test - else: - return "OK, python was compiled with GCC" + if string.find(sys.version,"GCC") >= 0: + return (CONFIG_H_OK, "sys.version mentions 'GCC'") + fn = sysconfig.get_config_h_filename() try: # It would probably better to read single lines to search. # But we do this only once, and it is fast enough - f=open(sysconfig.get_config_h_filename()) - s=f.read() + f = open(fn) + s = f.read() f.close() - # is somewhere a #ifdef __GNUC__ or something similar - if -1 == string.find(s,"__GNUC__"): - return "not OK, because we didn't found __GCC__ in config.h" - else: - return "OK, python's config.h mentions __GCC__" - except IOError: + except IOError, exc: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing - pass - return "uncertain, because we couldn't check it" + return (CONFIG_H_UNCERTAIN, + "couldn't read '%s': %s" % (fn, exc.strerror)) + + else: + # "config.h" contains an "#ifdef __GNUC__" or something similar + if string.find(s,"__GNUC__") >= 0: + return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) + else: + return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) + + def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. From e016e0767f54a5256595679a34f7ce581508d573 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 15 Aug 2000 13:01:25 +0000 Subject: [PATCH 0552/8469] Fix long-hidden inconsistency in internal interface: 'find_modules()' now represents packages as strings, not tuples. This allowed a simplification in 'get_package_dir()', too -- can now assume that 'package' is a string. --- command/build_py.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 0405d392d3..87e3efa218 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -93,12 +93,7 @@ def get_package_dir (self, package): distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - if type (package) is StringType: - path = string.split (package, '.') - elif type (package) in (TupleType, ListType): - path = list (package) - else: - raise TypeError, "'package' must be a string, list, or tuple" + path = string.split (package, '.') if not self.package_dir: if path: @@ -220,7 +215,7 @@ def find_modules (self): for module in self.py_modules: path = string.split (module, '.') - package = tuple (path[0:-1]) + package = string.join(path[0:-1], '.') module_base = path[-1] try: From 56988c3650a6601eca05bb51e07e84faaf629ca2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 15 Aug 2000 13:03:16 +0000 Subject: [PATCH 0553/8469] Added support for the '--dist-dir' option, including a mildly nasty hack to find the two created RPM files (source and binary) and move them to the "dist dir" (default "dist"). --- command/bdist_rpm.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index e45d7a368b..1da0b81f39 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -8,6 +8,7 @@ __revision__ = "$Id$" import os, string +import glob from types import * from distutils.core import Command, DEBUG from distutils.util import get_platform @@ -24,6 +25,9 @@ class bdist_rpm (Command): ('rpm-base=', None, "base directory for creating RPMs (defaults to \"rpm\" under " "--bdist-base; must be specified for RPM 2)"), + ('dist-dir=', 'd', + "directory to put final RPM files in " + "(and .spec files if --spec-only)"), ('spec-only', None, "only regenerate spec file"), ('source-only', None, @@ -109,6 +113,7 @@ class bdist_rpm (Command): def initialize_options (self): self.bdist_base = None self.rpm_base = None + self.dist_dir = None self.spec_only = None self.binary_only = None self.source_only = None @@ -166,6 +171,7 @@ def finalize_options (self): if not self.distribution.has_ext_modules(): self.use_rpm_opt_flags = 0 + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) self.finalize_package_data() # finalize_options() @@ -226,8 +232,8 @@ def run (self): # make directories if self.spec_only: - spec_dir = "dist" - self.mkpath(spec_dir) # XXX should be configurable + spec_dir = self.dist_dir + self.mkpath(spec_dir) else: rpm_dir = {} for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): @@ -235,8 +241,8 @@ def run (self): self.mkpath(rpm_dir[d]) spec_dir = rpm_dir['SPECS'] - # Spec file goes into 'dist' directory if '--spec-only specified', - # into build/rpm. otherwise. + # Spec file goes into 'dist_dir' if '--spec-only specified', + # build/rpm. otherwise. spec_path = os.path.join(spec_dir, "%s.spec" % self.distribution.get_name()) self.execute(write_file, @@ -285,6 +291,19 @@ def run (self): rpm_args.append(spec_path) self.spawn(rpm_args) + # XXX this is a nasty hack -- we really should have a proper way to + # find out the names of the RPM files created; also, this assumes + # that RPM creates exactly one source and one binary RPM. + if not self.dry_run: + srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) + rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) + assert len(srpms) == 1, \ + "unexpected number of SRPM files found: %s" % srpms + assert len(rpms) == 1, \ + "unexpected number of RPM files found: %s" % rpms + self.move_file(srpms[0], self.dist_dir) + self.move_file(rpms[0], self.dist_dir) + # run() From 802df4b37327ad870f0a6fe0be1551740f138758 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 15 Aug 2000 13:05:35 +0000 Subject: [PATCH 0554/8469] Fixed the move-RPM-files hack so it knows about the '--binary-only' and '--source-only' options. --- command/bdist_rpm.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 1da0b81f39..026a3ba4d5 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -295,14 +295,17 @@ def run (self): # find out the names of the RPM files created; also, this assumes # that RPM creates exactly one source and one binary RPM. if not self.dry_run: - srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) - rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - assert len(srpms) == 1, \ - "unexpected number of SRPM files found: %s" % srpms - assert len(rpms) == 1, \ - "unexpected number of RPM files found: %s" % rpms - self.move_file(srpms[0], self.dist_dir) - self.move_file(rpms[0], self.dist_dir) + if not self.binary_only: + srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) + assert len(srpms) == 1, \ + "unexpected number of SRPM files found: %s" % srpms + self.move_file(srpms[0], self.dist_dir) + + if not self.source_only: + rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) + assert len(rpms) == 1, \ + "unexpected number of RPM files found: %s" % rpms + self.move_file(rpms[0], self.dist_dir) # run() From 91251698bde14e2f5f9697626ff61d6ba3f408cb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 15 Aug 2000 13:14:27 +0000 Subject: [PATCH 0555/8469] Bump version to 0.9.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f6af3c9dac..7fe2f913e9 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.1pre" +__version__ = "0.9.1" From 7ec708f7b894796c2fe1d28216e47819fc9fcf87 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 22 Aug 2000 01:48:54 +0000 Subject: [PATCH 0556/8469] Ensure destination directory exists before trying to create a tarball or ZIP file. --- archive_util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/archive_util.py b/archive_util.py index 08a3c8310c..26cd7fb2ec 100644 --- a/archive_util.py +++ b/archive_util.py @@ -10,7 +10,7 @@ import os from distutils.errors import DistutilsExecError from distutils.spawn import spawn - +from distutils.dir_util import mkpath def make_tarball (base_name, base_dir, compress="gzip", verbose=0, dry_run=0): @@ -42,6 +42,7 @@ def make_tarball (base_name, base_dir, compress="gzip", "bad value for 'compress': must be None, 'gzip', or 'compress'" archive_name = base_name + ".tar" + mkpath(os.path.dirname(archive_name), verbose=verbose, dry_run=dry_run) cmd = ["tar", "-cf", archive_name, base_dir] spawn (cmd, verbose=verbose, dry_run=dry_run) @@ -68,6 +69,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): # no changes needed! zip_filename = base_name + ".zip" + mkpath(os.path.dirname(zip_filename), verbose=verbose, dry_run=dry_run) try: spawn (["zip", "-rq", zip_filename, base_dir], verbose=verbose, dry_run=dry_run) @@ -114,7 +116,7 @@ def visit (z, dirname, names): 'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"), 'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"), 'tar': (make_tarball, [('compress', None)], "uncompressed tar file"), - 'zip': (make_zipfile, [],"zip-file") + 'zip': (make_zipfile, [],"ZIP file") } def check_archive_formats (formats): From a535c80ee5091193512f8e7456e92b827d1725df Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 22 Aug 2000 01:49:41 +0000 Subject: [PATCH 0557/8469] Don't bother to 'mkpath()' the 'dist_dir' -- that's now taken care of in archive_util.py. --- command/sdist.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index b2d7a86f1f..2351ebbe37 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -442,8 +442,6 @@ def make_distribution (self): self.make_release_tree (base_dir, self.filelist.files) archive_files = [] # remember names of files we create - if self.dist_dir: - self.mkpath(self.dist_dir) for fmt in self.formats: file = self.make_archive (base_name, fmt, base_dir=base_dir) archive_files.append(file) From e1e774a29223c5fafee139a64411fec416e1fdb4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 26 Aug 2000 02:21:55 +0000 Subject: [PATCH 0558/8469] In 'check_extensions_list()': when converting old-style 'buildinfo' dict, don't assign None to any attributes of the Extension object. --- command/build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index aca6dac407..4d779b8264 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -278,7 +278,9 @@ def check_extensions_list (self, extensions): 'extra_objects', 'extra_compile_args', 'extra_link_args'): - setattr(ext, key, build_info.get(key)) + val = build_info.get(key) + if val is not None: + setattr(ext, key, val) # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') From 43abfd378a945259c7164cabc5fb16b44dc8a5f1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 26 Aug 2000 02:37:07 +0000 Subject: [PATCH 0559/8469] Bumped version to 0.9.2pre. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7fe2f913e9..afd65545b4 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.1" +__version__ = "0.9.2pre" From 8294ae149b20ee146afc6c57c410979b440f7934 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 26 Aug 2000 02:40:10 +0000 Subject: [PATCH 0560/8469] New release of the Windows installer from Thomas Heller. The known bug (bogus error message when an empty file is extracted) is fixed. Other changes: - The target-compile and target-optimize flags of bdist_wininst are gone. It is no longer possible to compile the python files during installation. - The zlib module is no longer required or used by bdist_wininst. - I moved the decompression/extraction code into a separate file (extract.c). - The installer stub is now compressed by UPX (see http://upx.tsx.org/). This reduces the size of the exe (and thus the overhead of the final installer program) from 40 kB to 16 kB. - The installer displays a more uptodate user wizard-like user interface, also containing a graphic: Just's Python Powered logo. (I could not convince myself to use one of the BeOpen logos). - The installation progress bar now moves correctly. --- command/bdist_wininst.py | 579 ++++++++++++++++++++------------------- 1 file changed, 296 insertions(+), 283 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 38e973b66d..9b600a9e1e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -22,13 +22,9 @@ class bdist_wininst (Command): ('keep-tree', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), - ('target-compile', 'c', - "compile to .pyc on the target system"), - ('target-optimize', 'o', - "compile to .pyo on the target system"), ('target-version=', 'v', "require a specific python version" + - " on the target system (1.5 or 1.6/2.0)"), + " on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), ] @@ -74,22 +70,10 @@ def run (self): install.root = self.bdist_dir install_lib = self.reinitialize_command('install_lib') + # we do not want to include pyc or pyo files install_lib.compile = 0 install_lib.optimize = 0 - # The packager can choose if .pyc and .pyo files should be created - # on the TARGET system instead at the SOURCE system. - -## # The compilation can only be done on the SOURCE system for one -## # python version (assuming 1.6/2.0 and 1.5 have incompatible -## # byte-codes). -## short_version = sys.version[:3] -## if self.target_version == short_version: -## if not self.target_compile: -## install_lib.compile = 1 -## if not self.target_optimize: -## install_lib.optimize = 1 - install_lib.ensure_finalized() self.announce ("installing to %s" % self.bdist_dir) @@ -137,7 +121,7 @@ def create_inifile (self): # 'info' will be displayed in the installer's dialog box, # describing the items to be installed. - info = metadata.long_description + '\n' + info = metadata.long_description or '' + '\n' for name in dir (metadata): if (name != 'long_description'): @@ -152,11 +136,8 @@ def create_inifile (self): inifile.write ("\n[Setup]\n") inifile.write ("info=%s\n" % repr (info)[1:-1]) inifile.write ("pthname=%s.%s\n" % (metadata.name, metadata.version)) - inifile.write ("pyc_compile=%d\n" % self.target_compile) - inifile.write ("pyo_compile=%d\n" % self.target_optimize) if self.target_version: - vers_minor = string.split (self.target_version, '.')[1] - inifile.write ("vers_minor=%s\n" % vers_minor) + inifile.write ("target_version=%s\n" % self.target_version) title = self.distribution.get_fullname() inifile.write ("title=%s\n" % repr (title)[1:-1]) @@ -166,285 +147,317 @@ def create_inifile (self): # create_inifile() def create_exe (self, arcname, fullname): - import struct, zlib + import struct#, zlib cfgdata = open (self.create_inifile()).read() - comp_method = zlib.DEFLATED - co = zlib.compressobj (zlib.Z_DEFAULT_COMPRESSION, comp_method, -15) - zcfgdata = co.compress (cfgdata) + co.flush() - installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) self.announce ("creating %s" % installer_name) file = open (installer_name, "wb") file.write (self.get_exe_bytes ()) - file.write (zcfgdata) - crc32 = zlib.crc32 (cfgdata) - header = struct.pack (" Date: Sun, 27 Aug 2000 20:44:13 +0000 Subject: [PATCH 0561/8469] Fix line-endings. Fix bad operator precedence: should be "(metadata or '') + '\n'". --- command/bdist_wininst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 9b600a9e1e..78a5c9c573 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -121,7 +121,7 @@ def create_inifile (self): # 'info' will be displayed in the installer's dialog box, # describing the items to be installed. - info = metadata.long_description or '' + '\n' + info = (metadata.long_description or '') + '\n' for name in dir (metadata): if (name != 'long_description'): From 23be7d21e3e70fd3a397ce710a25166adfa8a037 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 29 Aug 2000 01:15:18 +0000 Subject: [PATCH 0562/8469] Added 'script_name' and 'script_args' instance attributes to Distribution. Changed 'core.setup()' so it sets them to reasonable defaults. Tweaked how the "usage" string is generated: 'core' now provides 'gen_usage()', which is used instead of 'USAGE'. Modified "build_py" and "sdist" commands to refer to 'self.distribution.script_name' rather than 'sys.argv[0]'. --- command/build_py.py | 4 +++- command/sdist.py | 5 ++++- core.py | 34 ++++++++++++++++++----------- dist.py | 52 +++++++++++++++++++++++++-------------------- 4 files changed, 58 insertions(+), 37 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 87e3efa218..66f50241c1 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -177,13 +177,15 @@ def find_package_modules (self, package, package_dir): self.check_package (package, package_dir) module_files = glob (os.path.join (package_dir, "*.py")) modules = [] - setup_script = os.path.abspath (sys.argv[0]) + setup_script = os.path.abspath(self.distribution.script_name) for f in module_files: abs_f = os.path.abspath (f) if abs_f != setup_script: module = os.path.splitext (os.path.basename (f))[0] modules.append ((package, module, f)) + else: + self.debug_print("excluding %s" % setup_script) return modules diff --git a/command/sdist.py b/command/sdist.py index 2351ebbe37..06c8f1cb10 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -202,7 +202,10 @@ def get_file_list (self): # manifest, but there's no template -- which will happen if the # developer elects to generate a manifest some other way -- then we # can't regenerate the manifest, so we don't.) - setup_newer = dep_util.newer(sys.argv[0], self.manifest) + self.debug_print("checking if %s newer than %s" % + (self.distribution.script_name, self.manifest)) + setup_newer = dep_util.newer(self.distribution.script_name, + self.manifest) # cases: # 1) no manifest, template exists: generate manifest diff --git a/core.py b/core.py index 4c982a07ad..39f1f54b29 100644 --- a/core.py +++ b/core.py @@ -25,26 +25,30 @@ # runs the setup script with no arguments at all. More useful help # is generated with various --help options: global help, list commands, # and per-command help. -usage = """\ -usage: %s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] - or: %s --help [cmd1 cmd2 ...] - or: %s --help-commands - or: %s cmd --help -""" % ((os.path.basename(sys.argv[0]),) * 4) +USAGE = """\ +usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] + or: %(script)s --help [cmd1 cmd2 ...] + or: %(script)s --help-commands + or: %(script)s cmd --help +""" # If DISTUTILS_DEBUG is anything other than the empty string, we run in # debug mode. DEBUG = os.environ.get('DISTUTILS_DEBUG') +def gen_usage (script_name): + script = os.path.basename(script_name) + return USAGE % vars() + def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command - line; run each of those commands using the options supplied to - 'setup()' (as keyword arguments), in config files, and on the command - line. + line; run each Distutils command found there, customized by the options + supplied to 'setup()' (as keyword arguments), in config files, and on + the command line. The Distribution instance might be an instance of a class supplied via the 'distclass' keyword argument to 'setup'; if no such class is @@ -79,6 +83,11 @@ class found in 'cmdclass' is used in place of the default, which is else: klass = Distribution + if not attrs.has_key('script_name'): + attrs['script_name'] = sys.argv[0] + if not attrs.has_key('script_args'): + attrs['script_args'] = sys.argv[1:] + # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it try: @@ -97,10 +106,11 @@ class found in 'cmdclass' is used in place of the default, which is # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. try: - ok = dist.parse_command_line (sys.argv[1:]) + ok = dist.parse_command_line() except DistutilsArgError, msg: - sys.stderr.write (usage + "\n") - raise SystemExit, "error: %s" % msg + script = os.path.basename(dist.script_name) + raise SystemExit, \ + gen_usage(dist.script_name) + "\nerror: %s" % msg if DEBUG: print "options (after parsing command line):" diff --git a/dist.py b/dist.py index ed829fe480..1552dc0c41 100644 --- a/dist.py +++ b/dist.py @@ -131,6 +131,12 @@ def __init__ (self, attrs=None): # for the setup script to override command classes self.cmdclass = {} + # 'script_name' and 'script_args' are usually set to sys.argv[0] + # and sys.argv[1:], but they can be overridden when the caller is + # not necessarily a setup script run from the command-line. + self.script_name = None + self.script_args = None + # 'command_options' is where we store command options between # parsing them (from config files, the command-line, etc.) and when # they are actually needed -- ie. when the command in question is @@ -326,24 +332,24 @@ def parse_config_files (self, filenames=None): # -- Command-line parsing methods ---------------------------------- - def parse_command_line (self, args): - """Parse the setup script's command line. 'args' must be a list - of command-line arguments, most likely 'sys.argv[1:]' (see the - 'setup()' function). This list is first processed for "global - options" -- options that set attributes of the Distribution - instance. Then, it is alternately scanned for Distutils - commands and options for that command. Each new command - terminates the options for the previous command. The allowed - options for a command are determined by the 'user_options' - attribute of the command class -- thus, we have to be able to - load command classes in order to parse the command line. Any - error in that 'options' attribute raises DistutilsGetoptError; - any error on the command-line raises DistutilsArgError. If no - Distutils commands were found on the command line, raises - DistutilsArgError. Return true if command-line were - successfully parsed and we should carry on with executing - commands; false if no errors but we shouldn't execute commands - (currently, this only happens if user asks for help). + def parse_command_line (self): + """Parse the setup script's command line, taken from the + 'script_args' instance attribute (which defaults to 'sys.argv[1:]' + -- see 'setup()' in core.py). This list is first processed for + "global options" -- options that set attributes of the Distribution + instance. Then, it is alternately scanned for Distutils commands + and options for that command. Each new command terminates the + options for the previous command. The allowed options for a + command are determined by the 'user_options' attribute of the + command class -- thus, we have to be able to load command classes + in order to parse the command line. Any error in that 'options' + attribute raises DistutilsGetoptError; any error on the + command-line raises DistutilsArgError. If no Distutils commands + were found on the command line, raises DistutilsArgError. Return + true if command-line were successfully parsed and we should carry + on with executing commands; false if no errors but we shouldn't + execute commands (currently, this only happens if user asks for + help). """ # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -356,7 +362,7 @@ def parse_command_line (self, args): parser = FancyGetopt (self.global_options + self.display_options) parser.set_negative_aliases (self.negative_opt) parser.set_aliases ({'license': 'licence'}) - args = parser.getopt (object=self) + args = parser.getopt (args=self.script_args, object=self) option_order = parser.get_option_order() # for display options we return immediately @@ -506,7 +512,7 @@ def _show_help (self, in 'commands'. """ # late import because of mutual dependence between these modules - from distutils.core import usage + from distutils.core import gen_usage from distutils.cmd import Command if global_options: @@ -535,7 +541,7 @@ def _show_help (self, parser.print_help ("Options for '%s' command:" % klass.__name__) print - print usage + print gen_usage(self.script_name) return # _show_help () @@ -547,7 +553,7 @@ def handle_display_options (self, option_order): line, display the requested info and return true; else return false. """ - from distutils.core import usage + from distutils.core import gen_usage # User just wants a list of commands -- we'll print it out and stop # processing now (ie. if they ran "setup --help-commands foo bar", @@ -555,7 +561,7 @@ def handle_display_options (self, option_order): if self.help_commands: self.print_commands () print - print usage + print gen_usage(self.script_name) return 1 # If user supplied any of the "display metadata" options, then From 67d6f9504294214af2808483dbf15e6246a5a2d4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 30 Aug 2000 17:16:27 +0000 Subject: [PATCH 0563/8469] Added docstring for 'wrap()' function. --- fancy_getopt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fancy_getopt.py b/fancy_getopt.py index a62bc0df75..eaf6073760 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -412,6 +412,11 @@ def fancy_getopt (options, negative_opt, object, args): WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace)) def wrap_text (text, width): + """wrap_text(text : string, width : int) -> [string] + + Split 'text' into multiple lines of no more than 'width' characters + each, and return the list of strings that results. + """ if text is None: return [] From 630ec75678315f7043e3a14aa21b539d77979854 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 30 Aug 2000 17:32:24 +0000 Subject: [PATCH 0564/8469] Add ".cxx" to the list of known C++ extensions. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index eecbb620ed..6c3f8dab71 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -177,7 +177,7 @@ class MSVCCompiler (CCompiler) : # Private class data (need to distinguish C from C++ source for compiler) _c_extensions = ['.c'] - _cpp_extensions = ['.cc','.cpp'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] # Needed for the filename generation methods provided by the # base class, CCompiler. From 1020b190ea0add7c81905e2bc2814678d0fc414a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 31 Aug 2000 00:31:07 +0000 Subject: [PATCH 0565/8469] Add /GX to 'compile_options'. This is definitely needed for C++ source; according to the MS docs it enables exception-handling, and (according to Alex Martelli ) is needed to compile without getting warnings from standard C++ library headers. Apparently it doesn't cause any problems with C code, so I haven't bothered conditionalizing the use of /GX. --- msvccompiler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 6c3f8dab71..ae08e7fdcf 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -219,8 +219,9 @@ def __init__ (self, self.lib = "lib.exe" self.preprocess_options = None - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3' ] - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/Z7', '/D_DEBUG'] + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', + '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] self.ldflags_shared_debug = [ From 58ad88e9ee05aaf0a3ee7e3d6c23900d3277d399 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 00:52:45 +0000 Subject: [PATCH 0566/8469] Added 'run_setup()' to allow outsiders to run a setup script under fairly tight control, and the '_setup_stop_after' and '_setup_distribution' globals to provide the tight control. This isn't entirely reliable yet: it dies horribly with a NameError on the example PIL setup script in examples/pil_setup.py (at least with Python 1.5.2; untested with current Python). There's some strangeness going on with execfile(), but I don't understand it and don't have time to track it down right now. --- core.py | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 39f1f54b29..5dfe2db839 100644 --- a/core.py +++ b/core.py @@ -42,6 +42,11 @@ def gen_usage (script_name): return USAGE % vars() +# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'. +_setup_stop_after = None +_setup_distribution = None + + def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a @@ -75,6 +80,8 @@ class found in 'cmdclass' is used in place of the default, which is object. """ + global _setup_stop_after, _setup_distribution + # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get ('distclass') @@ -91,10 +98,13 @@ class found in 'cmdclass' is used in place of the default, which is # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it try: - dist = klass (attrs) + _setup_distribution = dist = klass (attrs) except DistutilsSetupError, msg: raise SystemExit, "error in setup script: %s" % msg + if _setup_stop_after == "init": + return dist + # Find and parse the config file(s): they will override options from # the setup script, but be overridden by the command line. dist.parse_config_files() @@ -103,6 +113,9 @@ class found in 'cmdclass' is used in place of the default, which is print "options (after parsing config files):" dist.dump_option_dicts() + if _setup_stop_after == "config": + return dist + # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. try: @@ -116,6 +129,9 @@ class found in 'cmdclass' is used in place of the default, which is print "options (after parsing command line):" dist.dump_option_dicts() + if _setup_stop_after == "commandline": + return dist + # And finally, run all the commands found on the command line. if ok: try: @@ -140,4 +156,76 @@ class found in 'cmdclass' is used in place of the default, which is else: raise SystemExit, "error: " + str(msg) + return dist + # setup () + + +def run_setup (script_name, script_args=None, stop_after="run"): + """Run a setup script in a somewhat controlled environment, and + return the Distribution instance that drives things. This is useful + if you need to find out the distribution meta-data (passed as + keyword args from 'script' to 'setup()', or the contents of the + config files or command-line. + + 'script_name' is a file that will be run with 'execfile()'; + 'sys.argv[0]' will be replaced with 'script' for the duration of the + call. 'script_args' is a list of strings; if supplied, + 'sys.argv[1:]' will be replaced by 'script_args' for the duration of + the call. + + 'stop_after' tells 'setup()' when to stop processing; possible + values: + init + stop after the Distribution instance has been created and + populated with the keyword arguments to 'setup()' + config + stop after config files have been parsed (and their data + stored in the Distribution instance) + commandline + stop after the command-line ('sys.argv[1:]' or 'script_args') + have been parsed (and the data stored in the Distribution) + run [default] + stop after all commands have been run (the same as if 'setup()' + had been called in the usual way + + Returns the Distribution instance, which provides all information + used to drive the Distutils. + """ + if stop_after not in ('init', 'config', 'commandline', 'run'): + raise ValueError, "invalid value for 'stop_after': %s" % `stop_after` + + global _setup_stop_after, _setup_distribution + _setup_stop_after = stop_after + + save_argv = sys.argv + g = {} + l = {} + try: + try: + sys.argv[0] = script_name + if script_args is not None: + sys.argv[1:] = script_args + execfile(script_name, g, l) + finally: + sys.argv = save_argv + _setup_stop_after = None + except SystemExit: + # Hmm, should we do something if exiting with a non-zero code + # (ie. error)? + pass + except: + raise + + if _setup_distribution is None: + raise RuntimeError, \ + ("'distutils.core.setup()' was never called -- " + "perhaps '%s' is not a Distutils setup script?") % \ + script_name + + # I wonder if the setup script's namespace -- g and l -- would be of + # any interest to callers? + #print "_setup_distribution:", _setup_distribution + return _setup_distribution + +# run_setup () From 0a344796c68ac40b4796d2c07fa3b37104a4157b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 01:00:40 +0000 Subject: [PATCH 0567/8469] Bump version to 0.9.2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index afd65545b4..16a3984b0c 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.2pre" +__version__ = "0.9.2" From 8553e855805f2e75372d582f60ffc9517a91f01e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 01:23:26 +0000 Subject: [PATCH 0568/8469] Rene Liebscher: hack '_init_posix()' to handle the BeOS linker script. (With a worry-wart comment added by me about where we *should* add the Python library to the link.) --- sysconfig.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 2246327781..3774ab25bc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -255,6 +255,23 @@ def _init_posix(): g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) + if sys.platform == 'beos': + + # Linker script is in the config directory. In the Makefile it is + # relative to the srcdir, which after installation no longer makes + # sense. + python_lib = get_python_lib(standard_lib=1) + linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) + linkerscript = os.path.join(python_lib, 'config', linkerscript_name) + + # XXX this isn't the right place to do this: adding the Python + # library to the link, if needed, should be in the "build_ext" + # command. (It's also needed for non-MS compilers on Windows, and + # it's taken care of for them by the 'build_ext.get_libraries()' + # method.) + g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % + (linkerscript, sys.prefix, sys.version[0:3])) + def _init_nt(): """Initialize the module as appropriate for NT""" From 18201c35b97437685a0cbf43a86e188d471f22e2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 01:24:31 +0000 Subject: [PATCH 0569/8469] Rene Liebscher: comment fixes. --- cygwinccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 2ac2678e73..f547d540f5 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -18,7 +18,7 @@ # # see also http://starship.python.net/crew/kernr/mingw32/Notes.html # -# * We use put export_symbols in a def-file, and don't use +# * We put export_symbols in a def-file, and don't use # --export-all-symbols because it doesn't worked reliable in some # tested configurations. And because other windows compilers also # need their symbols specified this no serious problem. @@ -32,7 +32,7 @@ # (ld doesn't support -shared, so we use dllwrap) # * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now # - its dllwrap doesn't work, there is a bug in binutils 2.10.90 -# see also ..... +# see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html # - using gcc -mdll instead dllwrap doesn't work without -static because # it tries to link against dlls instead their import libraries. (If # it finds the dll first.) From bb458fa60d179f85c4290c807987cf8f93a52e1d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 01:28:33 +0000 Subject: [PATCH 0570/8469] Rene Liebscher: * reverse library names from bcpp_library to library_bcpp * move some code to the right places, to put the def-files in the right directories again --- bcppcompiler.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 8ad9e4f2d4..2b73b12f0d 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -224,17 +224,6 @@ def link_shared_object (self, else: ld_args = self.ldflags_shared[:] - # Borland C++ has problems with '/' in paths - objects = map(os.path.normpath, objects) - startup_obj = 'c0d32' - objects.insert(0, startup_obj) - - # either exchange python15.lib in the python libs directory against - # a Borland-like one, or create one with name bcpp_python15.lib - # there and remove the pragmas from config.h - libraries.append ('import32') - libraries.append ('cw32mt') - # Create a temporary exports file for use by the linker head, tail = os.path.split (output_filename) modname, ext = os.path.splitext (tail) @@ -246,6 +235,17 @@ def link_shared_object (self, self.execute(write_file, (def_file, contents), "writing %s" % def_file) + # Borland C++ has problems with '/' in paths + objects = map(os.path.normpath, objects) + startup_obj = 'c0d32' + objects.insert(0, startup_obj) + + # either exchange python15.lib in the python libs directory against + # a Borland-like one, or create one with name bcpp_python15.lib + # there and remove the pragmas from config.h + libraries.append ('import32') + libraries.append ('cw32mt') + # Start building command line flags and options. for l in library_dirs: @@ -377,9 +377,9 @@ def find_library_file (self, dirs, lib, debug=0): # seems to have a different format for static libraries. if debug: dlib = (lib + "_d") - try_names = ("bcpp_" + dlib, "bcpp_" + lib, dlib, lib) + try_names = (dlib + "_bcpp", lib + "_bcpp", dlib, lib) else: - try_names = ("bcpp_" + lib, lib) + try_names = (lib + "_bcpp", lib) for dir in dirs: for name in try_names: From 6d4ed7968e6a6ebde7b50b53361e180c1a1d8f2c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 1 Sep 2000 01:44:45 +0000 Subject: [PATCH 0571/8469] Rene Liebscher/Thomas Heller: * ensure the "dist" directory exists * raise exception if using for modules containing compiled extensions on a non-win32 platform. * don't create an .ini file anymore (it was just for debugging) --- command/bdist_wininst.py | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 78a5c9c573..d51ea0a851 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -63,6 +63,12 @@ def finalize_options (self): def run (self): + if (sys.platform != "win32" and + (self.distribution.has_ext_modules() or + self.distribution.has_c_libraries())): + raise DistutilsPlatformError, \ + ("distribution contains extensions and/or C libraries; " + "must be compiled on a Windows 32 platform") self.run_command ('build') @@ -103,21 +109,16 @@ def run (self): # run() - def create_inifile (self): - # Create an inifile containing data describing the installation. - # This could be done without creating a real file, but - # a file is (at least) useful for debugging bdist_wininst. + def get_inidata (self): + # Return data describing the installation. + lines = [] metadata = self.distribution.metadata - ini_name = "%s.ini" % metadata.get_fullname() - - self.announce ("creating %s" % ini_name) - inifile = open (ini_name, "w") # Write the [metadata] section. Values are written with # repr()[1:-1], so they do not contain unprintable characters, and # are not surrounded by quote chars. - inifile.write ("[metadata]\n") + lines.append ("[metadata]") # 'info' will be displayed in the installer's dialog box, # describing the items to be installed. @@ -129,27 +130,28 @@ def create_inifile (self): if data: info = info + ("\n %s: %s" % \ (string.capitalize (name), data)) - inifile.write ("%s=%s\n" % (name, repr (data)[1:-1])) + lines.append ("%s=%s" % (name, repr (data)[1:-1])) # The [setup] section contains entries controlling # the installer runtime. - inifile.write ("\n[Setup]\n") - inifile.write ("info=%s\n" % repr (info)[1:-1]) - inifile.write ("pthname=%s.%s\n" % (metadata.name, metadata.version)) + lines.append ("\n[Setup]") + lines.append ("info=%s" % repr (info)[1:-1]) + lines.append ("pthname=%s.%s" % (metadata.name, metadata.version)) if self.target_version: - inifile.write ("target_version=%s\n" % self.target_version) + lines.append ("target_version=%s" % self.target_version) title = self.distribution.get_fullname() - inifile.write ("title=%s\n" % repr (title)[1:-1]) - inifile.close() - return ini_name + lines.append ("title=%s" % repr (title)[1:-1]) + return string.join (lines, "\n") - # create_inifile() + # get_inidata() def create_exe (self, arcname, fullname): - import struct#, zlib + import struct + + self.mkpath(self.dist_dir) - cfgdata = open (self.create_inifile()).read() + cfgdata = self.get_inidata() installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) From 47192a5d2460a813c4a177c8a2d27339c7fbecc1 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 6 Sep 2000 02:06:27 +0000 Subject: [PATCH 0572/8469] Typo fix. --- command/build_ext.py | 2 +- command/build_py.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4d779b8264..3f714c54d8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -55,7 +55,7 @@ class build_ext (Command): ('build-temp=', 't', "directory for temporary files (build by-products)"), ('inplace', 'i', - "ignore build-lib and put compiled extensions into the source" + + "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules"), ('include-dirs=', 'I', "list of directories to search for header files"), diff --git a/command/build_py.py b/command/build_py.py index 66f50241c1..5fcd18e788 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -20,7 +20,7 @@ class build_py (Command): user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), - ('force', 'f', "forcibly build everything (ignore file timestamps"), + ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] From 1565bb9efd2c7943171ecd4c07774d02d6785038 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 6 Sep 2000 02:08:24 +0000 Subject: [PATCH 0573/8469] Reorganized logic in 'get_file_list()' so it's easier to read, and fixed a bug to boot: now works even if both MANIFEST and MANIFEST.in don't exist. Don't hardcode setup.py, use 'self.distribution.script_name'. --- command/sdist.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 06c8f1cb10..1bf297fdcb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -219,10 +219,14 @@ def get_file_list (self): # do nothing (unless --force or --manifest-only) # 4) no manifest, no template: generate w/ warning ("defaults only") - # Regenerate the manifest if necessary (or if explicitly told to) - if ((template_exists and (template_newer or setup_newer)) or - self.force_manifest or self.manifest_only): + manifest_outofdate = (template_exists and + (template_newer or setup_newer)) + force_regen = self.force_manifest or self.manifest_only + manifest_exists = os.path.isfile(self.manifest) + neither_exists = (not template_exists and not manifest_exists) + # Regenerate the manifest if necessary (or if explicitly told to) + if manifest_outofdate or neither_exists or force_regen: if not template_exists: self.warn(("manifest template '%s' does not exist " + "(using default file list)") % @@ -273,10 +277,7 @@ def add_defaults (self): else is optional. """ - # XXX name of setup script and config file should be taken - # programmatically from the Distribution object (except - # it doesn't have that capability... yet!) - standards = [('README', 'README.txt'), 'setup.py'] + standards = [('README', 'README.txt'), self.distribution.script_name] for fn in standards: if type (fn) is TupleType: alts = fn From 6df7b0fff005b77bbf39fc0dc1c0e50284d60ede Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 6 Sep 2000 02:18:59 +0000 Subject: [PATCH 0574/8469] Bullet-proofing of 'make_release_tree()': - 'mkpath()' the distribution dir in case of empty manifest - warn if empty manifest - detect, warn about, and skip non-regular files in manifest --- command/sdist.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 1bf297fdcb..6de703ec92 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -405,9 +405,11 @@ def make_release_tree (self, base_dir, files): to be distributed. """ # Create all the directories under 'base_dir' necessary to - # put 'files' there. - dir_util.create_tree (base_dir, files, - verbose=self.verbose, dry_run=self.dry_run) + # put 'files' there; the 'mkpath()' is just so we don't die + # if the manifest happens to be empty. + self.mkpath(base_dir) + dir_util.create_tree(base_dir, files, + verbose=self.verbose, dry_run=self.dry_run) # And walk over the list of files, either making a hard link (if # os.link exists) to each one that doesn't already exist in its @@ -423,10 +425,16 @@ def make_release_tree (self, base_dir, files): link = None msg = "copying files to %s..." % base_dir - self.announce (msg) + if not files: + self.warn("no files to distribute -- empty manifest?") + else: + self.announce (msg) for file in files: - dest = os.path.join (base_dir, file) - self.copy_file (file, dest, link=link) + if not os.path.isfile(file): + self.warn("'%s' not a regular file -- skipping" % file) + else: + dest = os.path.join (base_dir, file) + self.copy_file (file, dest, link=link) # make_release_tree () From 9f06911a43f19a6b026ffb25fbe8858d330b1e69 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 7 Sep 2000 02:38:42 +0000 Subject: [PATCH 0575/8469] Typo fix. --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 026a3ba4d5..daf55b766a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -43,7 +43,7 @@ class bdist_rpm (Command): # info in setup.cfg, although they are of course free to # supply it on the command line. ('distribution-name', None, - "name of the (Linux) distribution name to which this " + "name of the (Linux) distribution to which this " "RPM applies (*not* the name of the module distribution!)"), ('group', None, "package classification [default: \"Development/Libraries\"]"), From c8a74343d6d9f35457e17ff5dbf40f15ac533ec7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 7 Sep 2000 15:59:22 +0000 Subject: [PATCH 0576/8469] Changes: distutils/command/bdist_wininst.py: - the windows installer is again able to compile after installing the files. Note: The default has changed, the packager has to give --no-target-compile/--no-target-optimize to NOT compile on the target system. (Another note: install_lib's --compile --optimize options have the same semantics to switch off the compilation. Shouldn't the names change?) - All references to specific python versions are gone. - A small bug: raise DistutilsPlatformError ("...") instead of raise DistutilsPlatformError, ("...") - When bdist_wininst creates an installer for one specific python version, this is reflected in the name: Distutils-0.9.2.win32-py15.exe instead of Distutils-0.9.2.win32.exe - bdist_wininst, when run as script, reads the wininst.exe file and rewrites itself. Previously this was done by hand. misc/install.c - All the changes needed for compilation - Deleted a lot of debug/dead code --- command/bdist_wininst.py | 571 ++++++++++++++++++++------------------- 1 file changed, 298 insertions(+), 273 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d51ea0a851..0ebc566838 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -25,6 +25,10 @@ class bdist_wininst (Command): ('target-version=', 'v', "require a specific python version" + " on the target system"), + ('no-target-compile', 'c', + "do not compile .py to .pyc on the target system"), + ('no-target-optimize', 'o', + "do not compile .py to .pyo (optimized) on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), ] @@ -32,8 +36,8 @@ class bdist_wininst (Command): def initialize_options (self): self.bdist_dir = None self.keep_tree = 0 - self.target_compile = 0 - self.target_optimize = 0 + self.no_target_compile = 0 + self.no_target_optimize = 0 self.target_version = None self.dist_dir = None @@ -46,10 +50,6 @@ def finalize_options (self): self.bdist_dir = os.path.join(bdist_base, 'wininst') if not self.target_version: self.target_version = "" - else: - if not self.target_version in ("1.5", "1.6", "2.0"): - raise DistutilsOptionError ( - "target version must be 1.5, 1.6, or 2.0") if self.distribution.has_ext_modules(): short_version = sys.version[:3] if self.target_version and self.target_version != short_version: @@ -66,7 +66,7 @@ def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): - raise DistutilsPlatformError, \ + raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") @@ -137,6 +137,8 @@ def get_inidata (self): lines.append ("\n[Setup]") lines.append ("info=%s" % repr (info)[1:-1]) lines.append ("pthname=%s.%s" % (metadata.name, metadata.version)) + lines.append ("target_compile=%d" % (not self.no_target_compile)) + lines.append ("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append ("target_version=%s" % self.target_version) @@ -153,8 +155,15 @@ def create_exe (self, arcname, fullname): cfgdata = self.get_inidata() - installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) + if self.target_version: + # if we create an installer for a specific python version, + # it's better to include this in the name + installer_name = os.path.join(self.dist_dir, + "%s.win32-py%s.exe" % + (fullname, self.target_version)) + else: + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) self.announce ("creating %s" % installer_name) file = open (installer_name, "wb") @@ -175,291 +184,307 @@ def get_exe_bytes (self): # class bdist_wininst if __name__ == '__main__': - import base64 - file = r"..\..\misc\wininst.exe" - data = open (file, "rb").read() - bdata = base64.encodestring (data) - open ("EXEDATA", "w").write (bdata) - print "%d %d" % (len (data), len (bdata)) + # recreate EXEDATA from wininst.exe by rewriting this file + import re, base64 + moddata = open ("bdist_wininst.py", "r").read() + exedata = open ("../../misc/wininst.exe", "rb").read() + print "wininst.exe length is %d bytes" % len (exedata) + print "wininst.exe encoded length is %d bytes" % len (base64.encodestring (exedata)) + exp = re.compile ('EXE'+'DATA = """\\\\(\n.*)*\n"""', re.M) + data = exp.sub ('EXE' + 'DATA = """\\\\\n%s"""' % + base64.encodestring (exedata), moddata) + open ("bdist_wininst.py", "w").write (data) + print "bdist_wininst.py recreated" EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZG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+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== """ + +# --- EOF --- From b5474c8672e2a3114d5225e07dfc855424ddc737 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Sat, 9 Sep 2000 19:52:49 +0000 Subject: [PATCH 0577/8469] The windows installer must also look under the HKEY_CURRENT_USER key for python installations, not only under HKEY_LOCAL_MACHINE. --- command/bdist_wininst.py | 480 +++++++++++++++++++-------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0ebc566838..5e94047c13 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -201,7 +201,7 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o 36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwDytrc5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA +AAAAAAAAAAAAAAAAUEUAAEwBAwBmkbo5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAABDVAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -214,7 +214,7 @@ def get_exe_bytes (self): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAk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AAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From fdee9cba1357af7cf490d43b5a994fb215155582 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Sat, 9 Sep 2000 21:15:12 +0000 Subject: [PATCH 0578/8469] The installer now displays info about version of distutils used to create the distribution and the creation date. Takes care of the extra_path argument to the setup function, installs the modules into /extra_path and creates a -pth file (like install_lib does). --- command/bdist_wininst.py | 541 ++++++++++++++++++++------------------- 1 file changed, 278 insertions(+), 263 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 5e94047c13..2e535d51ec 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -84,6 +84,13 @@ def run (self): self.announce ("installing to %s" % self.bdist_dir) install.ensure_finalized() + + # save the path_file and extra_dirs options + # created by the install command if an extra_path + # argument has been supplied + self.extra_dirs = install.extra_dirs + self.path_file = install.path_file + install.run() # And make an archive relative to the root of the @@ -136,14 +143,22 @@ def get_inidata (self): # the installer runtime. lines.append ("\n[Setup]") lines.append ("info=%s" % repr (info)[1:-1]) - lines.append ("pthname=%s.%s" % (metadata.name, metadata.version)) lines.append ("target_compile=%d" % (not self.no_target_compile)) lines.append ("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append ("target_version=%s" % self.target_version) + if (self.path_file): + lines.append ("path_file=%s" % self.path_file) + if (self.extra_dirs): + lines.append ("extra_dirs=%s" % self.extra_dirs) title = self.distribution.get_fullname() lines.append ("title=%s" % repr (title)[1:-1]) + import time + import distutils + build_info = "Build %s with distutils-%s" % \ + (time.ctime (time.time()), distutils.__version__) + lines.append ("build_info=%s" % build_info) return string.join (lines, "\n") # get_inidata() @@ -198,287 +213,287 @@ def get_exe_bytes (self): EXEDATA = """\ T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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From cde132acfb8b07bd59966d7392c82c4fb2de2b2b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 10 Sep 2000 01:21:27 +0000 Subject: [PATCH 0579/8469] Added --python and --fix-python options for better control over what interpreter the .spec file refers to. Cosmetic tweaks. --- command/bdist_rpm.py | 49 +++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index daf55b766a..9bddddce24 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string +import sys, os, string import glob from types import * from distutils.core import Command, DEBUG @@ -28,6 +28,12 @@ class bdist_rpm (Command): ('dist-dir=', 'd', "directory to put final RPM files in " "(and .spec files if --spec-only)"), + ('python=', None, + "path to Python interpreter to hard-code in the .spec file " + "(default: \"python\")"), + ('fix-python', None, + "hard-code the exact path to the current Python interpreter in " + "the .spec file"), ('spec-only', None, "only regenerate spec file"), ('source-only', None, @@ -114,6 +120,8 @@ def initialize_options (self): self.bdist_base = None self.rpm_base = None self.dist_dir = None + self.python = None + self.fix_python = None self.spec_only = None self.binary_only = None self.source_only = None @@ -159,6 +167,15 @@ def finalize_options (self): "you must specify --rpm-base in RPM 2 mode" self.rpm_base = os.path.join(self.bdist_base, "rpm") + if self.python is None: + if self.fix_python: + self.python = sys.executable + else: + self.python = "python" + elif self.fix_python: + raise DistutilsOptionError, \ + "--python and --fix-python are mutually exclusive options" + if os.name != 'posix': raise DistutilsPlatformError, \ ("don't know how to create RPM " @@ -275,21 +292,21 @@ def run (self): # build package - self.announce('Building RPMs') - rpm_args = ['rpm',] + self.announce('building RPMs') + rpm_cmd = ['rpm'] if self.source_only: # what kind of RPMs? - rpm_args.append('-bs') + rpm_cmd.append('-bs') elif self.binary_only: - rpm_args.append('-bb') + rpm_cmd.append('-bb') else: - rpm_args.append('-ba') + rpm_cmd.append('-ba') if self.rpm3_mode: - rpm_args.extend(['--define', + rpm_cmd.extend(['--define', '_topdir %s/%s' % (os.getcwd(), self.rpm_base),]) if self.clean: - rpm_args.append('--clean') - rpm_args.append(spec_path) - self.spawn(rpm_args) + rpm_cmd.append('--clean') + rpm_cmd.append(spec_path) + self.spawn(rpm_cmd) # XXX this is a nasty hack -- we really should have a proper way to # find out the names of the RPM files created; also, this assumes @@ -398,10 +415,10 @@ def _make_spec_file(self): # rpm scripts # figure out default build script + def_build = "%s setup.py build" % self.python if self.use_rpm_opt_flags: - def_build = 'env CFLAGS="$RPM_OPT_FLAGS" python setup.py build' - else: - def_build = 'python setup.py build' + def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build + # insert contents of files # XXX this is kind of misleading: user-supplied options are files @@ -412,9 +429,9 @@ def _make_spec_file(self): ('prep', 'prep_script', "%setup"), ('build', 'build_script', def_build), ('install', 'install_script', - "python setup.py install " - "--root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES"), + ("%s setup.py install " + "--root=$RPM_BUILD_ROOT " + "--record=INSTALLED_FILES") % self.python), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), ('pre', 'pre_install', None), ('post', 'post_install', None), From 9a1e68da5031587d22fa58f20a36e3d12f76a9aa Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 11 Sep 2000 00:47:35 +0000 Subject: [PATCH 0580/8469] Added --plat-name option to override sysconfig.get_platform() in generated filenames. --- command/bdist.py | 11 +++++++++-- command/bdist_dumb.py | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 1c862d585d..cc0c3985cf 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -32,6 +32,9 @@ class bdist (Command): user_options = [('bdist-base=', 'b', "temporary directory for creating built distributions"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('formats=', None, "formats for distribution (comma-separated list)"), ('dist-dir=', 'd', @@ -70,6 +73,7 @@ class bdist (Command): def initialize_options (self): self.bdist_base = None + self.plat_name = None self.formats = None self.dist_dir = None @@ -77,13 +81,16 @@ def initialize_options (self): def finalize_options (self): + # have to finalize 'plat_name' before 'bdist_base' + if self.plat_name is None: + self.plat_name = get_platform() + # 'bdist_base' -- parent of per-built-distribution-format # temporary directories (eg. we'll probably have # "build/bdist./dumb", "build/bdist./rpm", etc.) if self.bdist_base is None: build_base = self.get_finalized_command('build').build_base - plat = get_platform() - self.bdist_base = os.path.join (build_base, 'bdist.' + plat) + self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name) self.ensure_string_list('formats') if self.formats is None: diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index e93c6b7272..0fb8e83b2f 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -20,6 +20,9 @@ class bdist_dumb (Command): user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('format=', 'f', "archive format to create (tar, ztar, gztar, zip)"), ('keep-tree', 'k', @@ -35,6 +38,7 @@ class bdist_dumb (Command): def initialize_options (self): self.bdist_dir = None + self.plat_name = None self.format = None self.keep_tree = 0 self.dist_dir = None @@ -43,6 +47,7 @@ def initialize_options (self): def finalize_options (self): + if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'dumb') @@ -55,7 +60,9 @@ def finalize_options (self): ("don't know how to create dumb built distributions " + "on platform %s") % os.name - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name')) # finalize_options() @@ -74,7 +81,7 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_fullname(), - get_platform()) + self.plat_name) print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format self.make_archive (os.path.join(self.dist_dir, archive_basename), From 445af86d1bb43c3904c1f0542efb72d1fe21ba1e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 11 Sep 2000 00:50:37 +0000 Subject: [PATCH 0581/8469] Delete some debugging prints. --- command/bdist_dumb.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 0fb8e83b2f..2da9c48795 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -82,8 +82,6 @@ def run (self): # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_fullname(), self.plat_name) - print "self.bdist_dir = %s" % self.bdist_dir - print "self.format = %s" % self.format self.make_archive (os.path.join(self.dist_dir, archive_basename), self.format, root_dir=self.bdist_dir) From 561b706a78a2adb9f8909bf17b31c031f42a8cc9 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 12 Sep 2000 00:07:49 +0000 Subject: [PATCH 0582/8469] Bastian Kleineidam: fix so it cleans up the temporary script-building directory too. Also generally cleaned up the code. --- command/clean.py | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/command/clean.py b/command/clean.py index 1d8c7b2200..2f3597fdbc 100644 --- a/command/clean.py +++ b/command/clean.py @@ -20,6 +20,8 @@ class clean (Command): "build directory for all modules (default: 'build.build-lib')"), ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"), + ('build-scripts=', None, + "build directory for scripts (default: 'build.build-scripts')"), ('bdist-base=', None, "temporary directory for built distributions"), ('all', 'a', @@ -30,6 +32,7 @@ def initialize_options(self): self.build_base = None self.build_lib = None self.build_temp = None + self.build_scripts = None self.bdist_base = None self.all = None @@ -37,6 +40,7 @@ def finalize_options(self): self.set_undefined_options('build', ('build_base', 'build_base'), ('build_lib', 'build_lib'), + ('build_scripts', 'build_scripts'), ('build_temp', 'build_temp')) self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) @@ -50,27 +54,16 @@ def run(self): self.warn ("'%s' does not exist -- can't clean it" % self.build_temp) - - - if self.all: - # remove the module build directory (unless already gone) - if os.path.exists (self.build_lib): - remove_tree (self.build_lib, self.verbose, self.dry_run) - else: - self.warn ("'%s' does not exist -- can't clean it" % - self.build_lib) - - # remove the temporary directory used for creating built - # distributions (default "build/bdist") -- eg. type of - # built distribution will have its own subdirectory under - # "build/bdist", but they'll be taken care of by - # 'remove_tree()'. - if os.path.exists (self.bdist_base): - remove_tree (self.bdist_base, self.verbose, self.dry_run) - else: - self.warn ("'%s' does not exist -- can't clean it" % - self.bdist_base) + # remove build directories + for directory in (self.build_lib, + self.bdist_base, + self.build_scripts): + if os.path.exists (directory): + remove_tree (directory, self.verbose, self.dry_run) + else: + self.warn ("'%s' does not exist -- can't clean it" % + directory) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care From e4b265d05af821755af79ff534c0afb4f4cdfedb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 13 Sep 2000 00:12:11 +0000 Subject: [PATCH 0583/8469] Fix install directories on Mac OS: now everything goes to :Lib:site-packages. --- command/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/install.py b/command/install.py index 2a59e16b96..2cb7871fdf 100644 --- a/command/install.py +++ b/command/install.py @@ -38,8 +38,8 @@ 'data' : '$base', }, 'mac': { - 'purelib': '$base:Lib', - 'platlib': '$base:Mac:PlugIns', + 'purelib': '$base:Lib:site-packages', + 'platlib': '$base:Lib:site-packages', 'headers': '$base:Include:$dist_name', 'scripts': '$base:Scripts', 'data' : '$base', From f322172314e80fb68beeb9438853db40cef0e116 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 13 Sep 2000 00:44:09 +0000 Subject: [PATCH 0584/8469] Bump version to 0.9.3pre. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 16a3984b0c..34f55a2fd7 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.2" +__version__ = "0.9.3pre" From 1d693fbcc485be61709c3a033b0b915a97cd31ea Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 13 Sep 2000 01:02:25 +0000 Subject: [PATCH 0585/8469] Added --force (-f) option to force installation (including bytecode compilation). --- command/install.py | 6 ++++-- command/install_data.py | 3 +++ command/install_headers.py | 7 ++++++- command/install_lib.py | 3 +++ command/install_scripts.py | 5 ++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index 2cb7871fdf..2332770c6b 100644 --- a/command/install.py +++ b/command/install.py @@ -85,8 +85,9 @@ class install (Command): ('install-data=', None, "installation directory for data files"), - # For lazy debuggers who just want to test the install - # commands without rerunning "build" all the time + # Miscellaneous control options + ('force', 'f', + "force installation (overwrite any existing files)"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), @@ -146,6 +147,7 @@ def initialize_options (self): self.extra_path = None self.install_path_file = 0 + self.force = 0 self.skip_build = 0 # These are only here as a conduit from the 'build' command to the diff --git a/command/install_data.py b/command/install_data.py index 9193f91924..6cfc7d41f3 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -22,18 +22,21 @@ class install_data (Command): "(default: installation base dir)"), ('root=', None, "install everything relative to this alternate root directory"), + ('force', 'f', "force installation (overwrite existing files)"), ] def initialize_options (self): self.install_dir = None self.outfiles = [] self.root = None + self.force = 0 self.data_files = self.distribution.data_files def finalize_options (self): self.set_undefined_options('install', ('install_data', 'install_dir'), ('root', 'root'), + ('force', 'force'), ) def run (self): diff --git a/command/install_headers.py b/command/install_headers.py index 2e6ce8690b..5c06d574d6 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -17,16 +17,21 @@ class install_headers (Command): user_options = [('install-dir=', 'd', "directory to install header files to"), + ('force', 'f', + "force installation (overwrite existing files)"), ] def initialize_options (self): self.install_dir = None + self.force = 0 self.outfiles = [] def finalize_options (self): self.set_undefined_options('install', - ('install_headers', 'install_dir')) + ('install_headers', 'install_dir'), + ('force', 'force')) + def run (self): headers = self.distribution.headers diff --git a/command/install_lib.py b/command/install_lib.py index 879a7d00e2..2d19e5b96a 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -13,6 +13,7 @@ class install_lib (Command): user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), + ('force', 'f', "force installation (overwrite existing files)"), ('compile', 'c', "compile .py to .pyc"), ('optimize', 'o', "compile .py to .pyo (optimized)"), ('skip-build', None, "skip the build steps"), @@ -23,6 +24,7 @@ def initialize_options (self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None + self.force = 0 self.compile = 1 self.optimize = 1 self.skip_build = None @@ -35,6 +37,7 @@ def finalize_options (self): self.set_undefined_options ('install', ('build_lib', 'build_dir'), ('install_lib', 'install_dir'), + ('force', 'force'), ('compile_py', 'compile'), ('optimize_py', 'optimize'), ('skip_build', 'skip_build'), diff --git a/command/install_scripts.py b/command/install_scripts.py index 3eb3963c95..d506f90f51 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -18,11 +18,13 @@ class install_scripts (Command): user_options = [ ('install-dir=', 'd', "directory to install scripts to"), ('build-dir=','b', "build directory (where to install from)"), + ('force', 'f', "force installation (overwrite existing files)"), ('skip-build', None, "skip the build steps"), ] def initialize_options (self): self.install_dir = None + self.force = 0 self.build_dir = None self.skip_build = None @@ -30,13 +32,14 @@ def finalize_options (self): self.set_undefined_options('build', ('build_scripts', 'build_dir')) self.set_undefined_options ('install', ('install_scripts', 'install_dir'), + ('force', 'force'), ('skip_build', 'skip_build'), ) def run (self): if not self.skip_build: self.run_command('build_scripts') - self.outfiles = self.copy_tree (self.build_dir, self.install_dir) + self.outfiles = self.copy_tree(self.build_dir, self.install_dir) if os.name == 'posix': # Set the executable bits (owner, group, and world) on # all the scripts we just installed. From 5f191c24e8ad0103340029f2d342a8d643f8e1fc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 00:03:13 +0000 Subject: [PATCH 0586/8469] Fixed so 'parse_makefile()' uses the TextFile class to ensure that comments are stripped and lines are joined according to the backslash convention. --- sysconfig.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 3774ab25bc..27c08dbf19 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -154,7 +154,7 @@ def parse_config_h(fp, g=None): g[m.group(1)] = 0 return g -def parse_makefile(fp, g=None): +def parse_makefile(fn, g=None): """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an @@ -162,15 +162,18 @@ def parse_makefile(fp, g=None): used instead of a new dictionary. """ + from distutils.text_file import TextFile + fp = TextFile(fn, strip_comments=1, join_lines=1) + if g is None: g = {} - variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)\n") + variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") done = {} notdone = {} - # + while 1: line = fp.readline() - if not line: + if line is None: break m = variable_rx.match(line) if m: @@ -233,7 +236,7 @@ def _init_posix(): # load the installed Makefile: try: filename = get_makefile_filename() - file = open(filename) + parse_makefile(filename, g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): @@ -241,7 +244,6 @@ def _init_posix(): raise DistutilsPlatformError, my_msg - parse_makefile(file, g) # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed From c0c287bddf8631bd8bd8ea78a02b9e4bc2724a8a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:15:08 +0000 Subject: [PATCH 0587/8469] Changed from eager parsing of Makefile (at import time) to lazy: only do all that work when someone asks for a "configuration variable" from the Makefile. Details: - added 'get_config_vars()': responsible for calling one of the '_init_*()' functions to figure things out for this platform, and to provide an interface to the resulting dictionary - added 'get_config_var()' as a simple interface to the dictionary loaded by 'get_config_vars()' - changed the '_init_*()' functions so they load the global dictionary '_config_vars', rather than spewing their findings all over the module namespace - don't delete the '_init_*()' functions when done importing - adjusted 'customize_compiler()' to the new regime --- sysconfig.py | 88 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 25 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 27c08dbf19..de35d96a8d 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -15,7 +15,7 @@ from errors import DistutilsPlatformError - +# These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) @@ -103,15 +103,18 @@ def customize_compiler (compiler): that varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - cc_cmd = CC + ' ' + OPT + (cc, opt, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') + + cc_cmd = cc + ' ' + opt compiler.set_executables( - preprocessor=CC + " -E", # not always! + preprocessor=cc + " -E", # not always! compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + CCSHARED, - linker_so=LDSHARED, - linker_exe=CC) + compiler_so=cc_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc) - compiler.shared_lib_extension = SO + compiler.shared_lib_extension = so_ext def get_config_h_filename(): @@ -230,9 +233,11 @@ def parse_makefile(fn, g=None): return g +_config_vars = None + def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" - g = globals() + g = {} # load the installed Makefile: try: filename = get_makefile_filename() @@ -257,7 +262,7 @@ def _init_posix(): g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - if sys.platform == 'beos': + elif sys.platform == 'beos': # Linker script is in the config directory. In the Makefile it is # relative to the srcdir, which after installation no longer makes @@ -272,12 +277,15 @@ def _init_posix(): # it's taken care of for them by the 'build_ext.get_libraries()' # method.) g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, sys.prefix, sys.version[0:3])) + (linkerscript, PREFIX, sys.version[0:3])) + + global _config_vars + _config_vars = g def _init_nt(): """Initialize the module as appropriate for NT""" - g = globals() + g = {} # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) @@ -287,12 +295,14 @@ def _init_nt(): g['SO'] = '.pyd' g['EXE'] = ".exe" - g['exec_prefix'] = EXEC_PREFIX + + global _config_vars + _config_vars = g def _init_mac(): """Initialize the module as appropriate for Macintosh systems""" - g = globals() + g = {} # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) @@ -301,23 +311,51 @@ def _init_mac(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.ppc.slb' - g['exec_prefix'] = EXEC_PREFIX - print sys.prefix, PREFIX # XXX are these used anywhere? g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") + global _config_vars + _config_vars = g -try: - exec "_init_" + os.name -except NameError: - # not needed for this platform - pass -else: - exec "_init_%s()" % os.name +def get_config_vars(*args): + """With no arguments, return a dictionary of all configuration + variables relevant for the current platform. Generally this includes + everything needed to build extensions and install both pure modules and + extensions. On Unix, this means every variable defined in Python's + installed Makefile; on Windows and Mac OS it's a much smaller set. -del _init_posix -del _init_nt -del _init_mac + With arguments, return a list of values that result from looking up + each argument in the configuration variable dictionary. + """ + global _config_vars + if _config_vars is None: + from pprint import pprint + func = globals().get("_init_" + os.name) + if func: + func() + else: + _config_vars = {} + + # Normalized versions of prefix and exec_prefix are handy to have; + # in fact, these are the standard versions used most places in the + # Distutils. + _config_vars['prefix'] = PREFIX + _config_vars['exec_prefix'] = EXEC_PREFIX + + if args: + vals = [] + for name in args: + vals.append(_config_vars.get(name)) + return vals + else: + return _config_vars + +def get_config_var(name): + """Return the value of a single variable using the dictionary + returned by 'get_config_vars()'. Equivalent to + get_config_vars().get(name) + """ + return get_config_vars().get(name) From 4f4854922673817fb057229ff42e7c47fded3f2c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:16:14 +0000 Subject: [PATCH 0588/8469] Revamped 'get_platform()' to try and do something reasonably smart on POSIX platforms, ie. get a little more detail than 'sys.platform' gives. --- util.py | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/util.py b/util.py index 2487f6dab6..468887127f 100644 --- a/util.py +++ b/util.py @@ -13,11 +13,49 @@ def get_platform (): - """Return a string (suitable for tacking onto directory names) that - identifies the current platform. Currently, this is just - 'sys.platform'. + """Return a string that identifies the current platform. This is used + mainly to distinguish platform-specific build directories and + platform-specific built distributions. Typically includes the OS name + and version and the architecture (as supplied by 'os.uname()'), + although the exact information included depends on the OS; eg. for IRIX + the architecture isn't particularly important (IRIX only runs on SGI + hardware), but for Linux the kernel version isn't particularly + important. + + Examples of returned values: + linux-i586 + linux-alpha (?) + solaris-2.6-sun4u + irix-5.3 + irix64-6.2 + + For non-POSIX platforms, currently just returns 'sys.platform'. """ - return sys.platform + if os.name != "posix": + # XXX what about the architecture? NT is Intel or Alpha, + # Mac OS is M68k or PPC, etc. + return sys.platform + + # Try to distinguish various flavours of Unix + + (osname, host, release, version, machine) = os.uname() + osname = string.lower(osname) + if osname[:5] == "linux": + # At least on Linux/Intel, 'machine' is the processor -- + # i386, etc. + # XXX what about Alpha, SPARC, etc? + return "%s-%s" % (osname, machine) + elif osname[:5] == "sunos": + if release[0] >= "5": # SunOS 5 == Solaris 2 + osname = "solaris" + release = "%d.%s" % (int(release[0]) - 3, release[2:]) + # fall through to standard osname-release-machine representation + elif osname[:4] == "irix": # could be "irix64"! + return "%s-%s" % (osname, release) + + return "%s-%s-%s" % (osname, release, machine) + +# get_platform () def convert_path (pathname): From 4959d02600d04cf81f26e89cf083cc7455c5b736 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:19:03 +0000 Subject: [PATCH 0589/8469] Adjust to the new sysconfig regime: use 'get_config_var()' instead of globals from sysconfig. --- command/build_ext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 3f714c54d8..76da00476c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -528,12 +528,13 @@ def get_ext_filename (self, ext_name): "foo\bar.pyd"). """ - from distutils import sysconfig + from distutils.sysconfig import get_config_var ext_path = string.split (ext_name, '.') # extensions in debug_mode are named 'module_d.pyd' under windows + so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply (os.path.join, ext_path) + '_d' + sysconfig.SO - return apply (os.path.join, ext_path) + sysconfig.SO + return apply (os.path.join, ext_path) + '_d' + so_ext + return apply (os.path.join, ext_path) + so_ext def get_ext_libname (self, ext_name): # create a filename for the (unneeded) lib-file. From 637280f9c621536fbea5a6030b991aa0c3b2364f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:20:10 +0000 Subject: [PATCH 0590/8469] Adjust to the new sysconfig regime: use 'get_config_vars()' instead of globals from sysconfig. Added 'prefix' and 'exec_prefix' to the list of variables that can be expanded in installation directories (preserving the stupid old names of 'sys_prefix' and 'sys_exec_prefix, though). --- command/install.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/install.py b/command/install.py index 2332770c6b..938922a675 100644 --- a/command/install.py +++ b/command/install.py @@ -9,7 +9,7 @@ import sys, os, string from types import * from distutils.core import Command, DEBUG -from distutils import sysconfig +from distutils.sysconfig import get_config_vars from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError @@ -226,13 +226,16 @@ def finalize_options (self): # about needing recursive variable expansion (shudder). py_version = (string.split(sys.version))[0] + prefix = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, 'py_version_short': py_version[0:3], - 'sys_prefix': sysconfig.PREFIX, - 'sys_exec_prefix': sysconfig.EXEC_PREFIX, + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, } self.expand_basedirs () From 4018076a7ebe9adf03891e2eef88f35b3f6b2a1f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:21:07 +0000 Subject: [PATCH 0591/8469] Added 'warn_dir' option so other code can sneak in and disable the sometimes inappropriate warning about where we're installing data files. --- command/install_data.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index 6cfc7d41f3..af348f5190 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -30,7 +30,9 @@ def initialize_options (self): self.outfiles = [] self.root = None self.force = 0 + self.data_files = self.distribution.data_files + self.warn_dir = 1 def finalize_options (self): self.set_undefined_options('install', @@ -44,9 +46,10 @@ def run (self): for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it - self.warn("setup script did not provide a directory for " - "'%s' -- installing right in '%s'" % - (f, self.install_dir)) + if self.warn_dir: + self.warn("setup script did not provide a directory for " + "'%s' -- installing right in '%s'" % + (f, self.install_dir)) out = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: From 1507bd55580f4662f9319edd26efdcc698a33cb2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 01:44:45 +0000 Subject: [PATCH 0592/8469] Document the directory separatory for include dir and library dir lists. --- command/build_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 76da00476c..f880a7a8d5 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -49,6 +49,7 @@ class build_ext (Command): # takes care of both command-line and client options # in between initialize_options() and finalize_options()) + sep_by = " (separated by '%s')" % os.pathsep user_options = [ ('build-lib=', 'b', "directory for compiled extension modules"), @@ -58,7 +59,7 @@ class build_ext (Command): "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules"), ('include-dirs=', 'I', - "list of directories to search for header files"), + "list of directories to search for header files" + sep_by), ('define=', 'D', "C preprocessor macros to define"), ('undef=', 'U', @@ -66,7 +67,7 @@ class build_ext (Command): ('libraries=', 'l', "external C libraries to link with"), ('library-dirs=', 'L', - "directories to search for external C libraries"), + "directories to search for external C libraries" + sep_by), ('rpath=', 'R', "directories to search for shared C libraries at runtime"), ('link-objects=', 'O', From 8a0e231dcf1cd16a0075cca6c78a7996144eb6d2 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 01:54:46 +0000 Subject: [PATCH 0593/8469] Include the Python version in the platform-specific build directories: with the recent change in 'get_platform()', we now have directory names like "build/lib-1.5-linux-i586". Idea and original patch by Rene Liebscher. --- command/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/build.py b/command/build.py index 1e87f23bbc..1d901282ad 100644 --- a/command/build.py +++ b/command/build.py @@ -67,6 +67,8 @@ def finalize_options (self): # hardware architecture! self.plat = get_platform () + plat_specifier = sys.version[0:3] + '-' + self.plat + # 'build_purelib' and 'build_platlib' just default to 'lib' and # 'lib.' under the base build directory. We only use one of # them for a given distribution, though -- @@ -74,7 +76,7 @@ def finalize_options (self): self.build_purelib = os.path.join (self.build_base, 'lib') if self.build_platlib is None: self.build_platlib = os.path.join (self.build_base, - 'lib.' + self.plat) + 'lib-' + plat_specifier) # 'build_lib' is the actual directory that we will use for this # particular module distribution -- if user didn't supply it, pick @@ -89,7 +91,7 @@ def finalize_options (self): # "build/temp." if self.build_temp is None: self.build_temp = os.path.join (self.build_base, - 'temp.' + self.plat) + 'temp-' + plat_specifier) if self.build_scripts is None: self.build_scripts = os.path.join (self.build_base, 'scripts') # finalize_options () From df1d24963b20a7532d52a441e7f39cb3c9b7c892 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 01:59:06 +0000 Subject: [PATCH 0594/8469] Typo fix. --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 938922a675..7182857d2c 100644 --- a/command/install.py +++ b/command/install.py @@ -226,7 +226,7 @@ def finalize_options (self): # about needing recursive variable expansion (shudder). py_version = (string.split(sys.version))[0] - prefix = get_config_vars('prefix', 'exec_prefix') + (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), From e24f5d6128e2325fa37f0f37819c253b35fbaae0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 02:06:45 +0000 Subject: [PATCH 0595/8469] Tweaked the build temp dir names again. --- command/build.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/command/build.py b/command/build.py index 1d901282ad..15476ca11b 100644 --- a/command/build.py +++ b/command/build.py @@ -62,12 +62,7 @@ def initialize_options (self): def finalize_options (self): - # Need this to name platform-specific directories, but sys.platform - # is not enough -- it only names the OS and version, not the - # hardware architecture! - self.plat = get_platform () - - plat_specifier = sys.version[0:3] + '-' + self.plat + plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) # 'build_purelib' and 'build_platlib' just default to 'lib' and # 'lib.' under the base build directory. We only use one of @@ -76,7 +71,7 @@ def finalize_options (self): self.build_purelib = os.path.join (self.build_base, 'lib') if self.build_platlib is None: self.build_platlib = os.path.join (self.build_base, - 'lib-' + plat_specifier) + 'lib' + plat_specifier) # 'build_lib' is the actual directory that we will use for this # particular module distribution -- if user didn't supply it, pick @@ -91,9 +86,10 @@ def finalize_options (self): # "build/temp." if self.build_temp is None: self.build_temp = os.path.join (self.build_base, - 'temp-' + plat_specifier) + 'temp' + plat_specifier) if self.build_scripts is None: self.build_scripts = os.path.join (self.build_base, 'scripts') + # finalize_options () From fe2e79b7e47c5f822e28eb0aebf83e652fa9192b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:06:57 +0000 Subject: [PATCH 0596/8469] Factored the "sub-command" machinery out to Command. Mainly, this meant removing 'get_sub_commands()', and moving the 'sub_commands' class attribute to the end and restructuring it to conform to the new regime. --- command/install.py | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/command/install.py b/command/install.py index 7182857d2c..04b325a6d2 100644 --- a/command/install.py +++ b/command/install.py @@ -101,17 +101,6 @@ class install (Command): "filename in which to record list of installed files"), ] - # 'sub_commands': a list of commands this command might have to run to - # get its work done. Each command is represented as a tuple (method, - # command) where 'method' is the name of a method to call that returns - # true if 'command' (the sub-command name, a string) needs to be run. - # If 'method' is None, assume that 'command' must always be run. - sub_commands = [('has_lib', 'install_lib'), - ('has_headers', 'install_headers'), - ('has_scripts', 'install_scripts'), - ('has_data', 'install_data'), - ] - def initialize_options (self): @@ -444,20 +433,6 @@ def handle_extra_path (self): # handle_extra_path () - def get_sub_commands (self): - """Return the list of subcommands that we need to run. This is - based on the 'subcommands' class attribute: each tuple in that list - can name a method that we call to determine if the subcommand needs - to be run for the current distribution.""" - commands = [] - for (method, cmd_name) in self.sub_commands: - if method is not None: - method = getattr(self, method) - if method is None or method(): - commands.append(cmd_name) - return commands - - def run (self): # Obviously have to build before we can install @@ -494,6 +469,8 @@ def run (self): # run () + # -- Predicates for sub-command list ------------------------------- + def has_lib (self): """Return true if the current distribution has any Python modules to install.""" @@ -544,4 +521,12 @@ def create_path_file (self): "installations)") % filename) + # 'sub_commands': a list of commands this command might have to run to + # get its work done. See cmd.py for more info. + sub_commands = [('install_lib', has_lib), + ('install_headers', has_headers), + ('install_scripts', has_scripts), + ('install_data', has_data), + ] + # class install From 2534b87e2eb30b3657de351d70266460069506dd Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:09:17 +0000 Subject: [PATCH 0597/8469] Added the "sub-command" machinery to formalize the notion of "command families" -- eg. install and its brood, build and its brood, and so forth. Specifically: added the 'sub_commands' class attribute (empty list, sub- classes must override it) and a comment describing it, and the 'get_sub_commands()' method. --- cmd.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cmd.py b/cmd.py index 474f8f321b..61d234bb4e 100644 --- a/cmd.py +++ b/cmd.py @@ -31,6 +31,23 @@ class Command: command class. """ + # 'sub_commands' formalizes the notion of a "family" of commands, + # eg. "install" as the parent with sub-commands "install_lib", + # "install_headers", etc. The parent of a family of commands + # defines 'sub_commands' as a class attribute; it's a list of + # (command_name : string, predicate : unbound_method | string | None) + # tuples, where 'predicate' is a method of the parent command that + # determines whether the corresponding command is applicable in the + # current situation. (Eg. we "install_headers" is only applicable if + # we have any C header files to install.) If 'predicate' is None, + # that command is always applicable. + # + # 'sub_commands' is usually defined at the *end* of a class, because + # predicates can be unbound methods, so they must already have been + # defined. The canonical example is the "install" command. + sub_commands = [] + + # -- Creation/initialization methods ------------------------------- def __init__ (self, dist): @@ -310,6 +327,20 @@ def run_command (self, command): self.distribution.run_command (command) + def get_sub_commands (self): + """Determine the sub-commands that are relevant in the current + distribution (ie., that need to be run). This is based on the + 'sub_commands' class attribute: each tuple in that list may include + a method that we call to determine if the subcommand needs to be + run for the current distribution. Return a list of command names. + """ + commands = [] + for (cmd_name, method) in self.sub_commands: + if method is None or method(self): + commands.append(cmd_name) + return commands + + # -- External world manipulation ----------------------------------- def warn (self, msg): From 09dbe7ef0f1498e27bfdeef00ffd238e1c13b62f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:23:28 +0000 Subject: [PATCH 0598/8469] Generalized 'reinitialize_command()' so it can optionally reinitialize the command's sub-commands as well (off by default). This is essential if we want to be be able to run (eg.) "install" twice in one run, as happens when generating multiple built distributions in one run. --- dist.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 1552dc0c41..b126a99757 100644 --- a/dist.py +++ b/dist.py @@ -733,7 +733,7 @@ def _set_command_options (self, command_obj, option_dict=None): (source, command_name, option) setattr(command_obj, option, value) - def reinitialize_command (self, command): + def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option @@ -743,9 +743,18 @@ def reinitialize_command (self, command): 'finalize_options()' or 'ensure_finalized()') before using it for real. - 'command' should be a command name (string) or command object. + 'command' should be a command name (string) or command object. If + 'reinit_subcommands' is true, also reinitializes the command's + sub-commands, as declared by the 'sub_commands' class attribute (if + it has one). See the "install" command for an example. Only + reinitializes the sub-commands that actually matter, ie. those + whose test predicates return true. + Returns the reinitialized command object. """ + print "reinitialize_command: command=%s" % command + print " before: have_run =", self.have_run + from distutils.cmd import Command if not isinstance(command, Command): command_name = command @@ -759,6 +768,15 @@ def reinitialize_command (self, command): command.finalized = 0 self.have_run[command_name] = 0 self._set_command_options(command) + + print " after: have_run =", self.have_run + + if reinit_subcommands: + print (" reinitializing sub-commands: %s" % + command.get_sub_commands()) + for sub in command.get_sub_commands(): + self.reinitialize_command(sub, reinit_subcommands) + return command From 927edd6665097270bd2930210f37501f692bbe55 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:25:55 +0000 Subject: [PATCH 0599/8469] In 'reinitialize_subcommand()', pass 'reinit_subcommands' flag on to the real implementation in Distribution. --- cmd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd.py b/cmd.py index 61d234bb4e..7866d1b607 100644 --- a/cmd.py +++ b/cmd.py @@ -316,8 +316,9 @@ def get_finalized_command (self, command, create=1): # XXX rename to 'get_reinitialized_command()'? (should do the # same in dist.py, if so) - def reinitialize_command (self, command): - return self.distribution.reinitialize_command(command) + def reinitialize_command (self, command, reinit_subcommands=0): + return self.distribution.reinitialize_command( + command, reinit_subcommands) def run_command (self, command): """Run some other command: uses the 'run_command()' method of From 8db8a763ae8c5c0456a161c93a765483887d9130 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:27:17 +0000 Subject: [PATCH 0600/8469] Remove some debugging output from the last change. --- dist.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dist.py b/dist.py index b126a99757..c5fe86ebbf 100644 --- a/dist.py +++ b/dist.py @@ -752,9 +752,6 @@ def reinitialize_command (self, command, reinit_subcommands=0): Returns the reinitialized command object. """ - print "reinitialize_command: command=%s" % command - print " before: have_run =", self.have_run - from distutils.cmd import Command if not isinstance(command, Command): command_name = command @@ -769,11 +766,7 @@ def reinitialize_command (self, command, reinit_subcommands=0): self.have_run[command_name] = 0 self._set_command_options(command) - print " after: have_run =", self.have_run - if reinit_subcommands: - print (" reinitializing sub-commands: %s" % - command.get_sub_commands()) for sub in command.get_sub_commands(): self.reinitialize_command(sub, reinit_subcommands) From ba1539c0c415bebf7bf237cb91e0dc0c007b00bd Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:30:47 +0000 Subject: [PATCH 0601/8469] Ensure sub-commands of "install" are reinitialized too. Run "install" the right way, by calling 'run_command()'. --- command/bdist_dumb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 2da9c48795..afeb4ad35f 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -71,12 +71,11 @@ def run (self): self.run_command ('build') - install = self.reinitialize_command('install') + install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir self.announce ("installing to %s" % self.bdist_dir) - install.ensure_finalized() - install.run() + self.run_command('install') # And make an archive relative to the root of the # pseudo-installation tree. From 7275ee4bb9a86ab4d196242acc902697a70caa67 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:53:41 +0000 Subject: [PATCH 0602/8469] Renamed --keep-tree option to --keep-temp. --- command/bdist_dumb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index afeb4ad35f..1fdbf4253b 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -25,7 +25,7 @@ class bdist_dumb (Command): "(default: %s)" % get_platform()), ('format=', 'f', "archive format to create (tar, ztar, gztar, zip)"), - ('keep-tree', 'k', + ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), ('dist-dir=', 'd', @@ -40,7 +40,7 @@ def initialize_options (self): self.bdist_dir = None self.plat_name = None self.format = None - self.keep_tree = 0 + self.keep_temp = 0 self.dist_dir = None # initialize_options() @@ -85,7 +85,7 @@ def run (self): self.format, root_dir=self.bdist_dir) - if not self.keep_tree: + if not self.keep_temp: remove_tree (self.bdist_dir, self.verbose, self.dry_run) # run() From cedc5acb59abb40151af3df16d4e1c7751608c78 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:54:18 +0000 Subject: [PATCH 0603/8469] Renamed --clean to --no-keep-temp and --noclean to --keep-temp. --- command/bdist_rpm.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 9bddddce24..2afc714670 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -97,10 +97,10 @@ class bdist_rpm (Command): "capabilities made obsolete by this package"), # Actions to take when building RPM - ('clean', None, - "clean up RPM build directory [default]"), - ('no-clean', None, + ('keep-temp', 'k', "don't clean up RPM build directory"), + ('no-keep-temp', None, + "clean up RPM build directory [default]"), ('use-rpm-opt-flags', None, "compile with RPM_OPT_FLAGS when building from source RPM"), ('no-rpm-opt-flags', None, @@ -111,7 +111,7 @@ class bdist_rpm (Command): "RPM 2 compatibility mode"), ] - negative_opt = {'no-clean': 'clean', + negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', 'rpm2-mode': 'rpm3-mode'} @@ -152,7 +152,7 @@ def initialize_options (self): self.build_requires = None self.obsoletes = None - self.clean = 1 + self.keep_temp = 0 self.use_rpm_opt_flags = 1 self.rpm3_mode = 1 @@ -303,7 +303,7 @@ def run (self): if self.rpm3_mode: rpm_cmd.extend(['--define', '_topdir %s/%s' % (os.getcwd(), self.rpm_base),]) - if self.clean: + if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) self.spawn(rpm_cmd) From 55c0d1f2782c95996bf76de2418aa62fe28de33a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 15:56:32 +0000 Subject: [PATCH 0604/8469] Renamed --keep-tree to --keep-temp. --- command/bdist_wininst.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 2e535d51ec..5030ef9057 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -19,7 +19,7 @@ class bdist_wininst (Command): user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), - ('keep-tree', 'k', + ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), ('target-version=', 'v', @@ -35,7 +35,7 @@ class bdist_wininst (Command): def initialize_options (self): self.bdist_dir = None - self.keep_tree = 0 + self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 self.target_version = None @@ -111,7 +111,7 @@ def run (self): root_dir=root_dir) self.create_exe (arcname, fullname) - if not self.keep_tree: + if not self.keep_temp: remove_tree (self.bdist_dir, self.verbose, self.dry_run) # run() From 8e1b5544e34c5186aa2c8a1c63fd426d2dfae782 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 16:04:59 +0000 Subject: [PATCH 0605/8469] Rene Liebscher: if we have to run the same sub-command multiple times (eg. "bdist_dumb", to generate both ZIP and tar archives in the same run), tell all but the last run to keep temp files -- this just gets rid of the need to pseudo-install the same files multiple times. --- command/bdist.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index cc0c3985cf..8651e70954 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -90,7 +90,8 @@ def finalize_options (self): # "build/bdist./dumb", "build/bdist./rpm", etc.) if self.bdist_base is None: build_base = self.get_finalized_command('build').build_base - self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name) + self.bdist_base = os.path.join(build_base, + 'bdist.' + self.plat_name) self.ensure_string_list('formats') if self.formats is None: @@ -109,16 +110,28 @@ def finalize_options (self): def run (self): + # Figure out which sub-commands we need to run. + commands = [] for format in self.formats: try: - cmd_name = self.format_command[format][0] + commands.append(self.format_command[format][0]) except KeyError: - raise DistutilsOptionError, \ - "invalid format '%s'" % format + raise DistutilsOptionError, "invalid format '%s'" % format + # Reinitialize and run each command. + for i in range(len(self.formats)): + cmd_name = commands[i] sub_cmd = self.reinitialize_command(cmd_name) if cmd_name not in self.no_format_option: - sub_cmd.format = format + sub_cmd.format = self.formats[i] + + print ("bdist.run: format=%s, command=%s, rest=%s" % + (self.formats[i], cmd_name, commands[i+1:])) + + # If we're going to need to run this command again, tell it to + # keep its temporary files around so subsequent runs go faster. + if cmd_name in commands[i+1:]: + sub_cmd.keep_temp = 1 self.run_command (cmd_name) # run() From 41ea88ac7aefa3d488f04485e277ad53e8c023f6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 18:04:55 +0000 Subject: [PATCH 0606/8469] [change from 2000/04/17, propagating now to distutils copy] Dropped the 'collapse_ws' option and replaced it with 'collapse_join' -- it's *much* faster (no 're.sub()') and this is the reason I really added 'collapse_ws', ie. to remove leading whitespace from a line being joined to the previous line. --- text_file.py | 56 ++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/text_file.py b/text_file.py index 7b29ef4aa5..f22b3e9167 100644 --- a/text_file.py +++ b/text_file.py @@ -9,18 +9,18 @@ __revision__ = "$Id$" from types import * -import sys, os, string, re +import sys, os, string class TextFile: """Provides a file-like object that takes care of all the things you commonly want to do when processing a text file that has some - line-by-line syntax: strip comments (as long as "#" is your comment - character), skip blank lines, join adjacent lines by escaping the - newline (ie. backslash at end of line), strip leading and/or - trailing whitespace, and collapse internal whitespace. All of these - are optional and independently controllable. + line-by-line syntax: strip comments (as long as "#" is your + comment character), skip blank lines, join adjacent lines by + escaping the newline (ie. backslash at end of line), strip + leading and/or trailing whitespace. All of these are optional + and independently controllable. Provides a 'warn()' method so you can generate warning messages that report physical line number, even if the logical line in question @@ -50,7 +50,7 @@ class TextFile: each line before returning it skip_blanks [default: true} skip lines that are empty *after* stripping comments and - whitespace. (If both lstrip_ws and rstrip_ws are true, + whitespace. (If both lstrip_ws and rstrip_ws are false, then some lines may consist of solely whitespace: these will *not* be skipped, even if 'skip_blanks' is true.) join_lines [default: false] @@ -59,12 +59,9 @@ class TextFile: to it to form one "logical line"; if N consecutive lines end with a backslash, then N+1 physical lines will be joined to form one logical line. - collapse_ws [default: false] - after stripping comments and whitespace and joining physical - lines into logical lines, all internal whitespace (strings of - whitespace surrounded by non-whitespace characters, and not at - the beginning or end of the logical line) will be collapsed - to a single space. + collapse_join [default: false] + strip leading whitespace from lines that are joined to their + predecessor; only matters if (join_lines and not lstrip_ws) Note that since 'rstrip_ws' can strip the trailing newline, the semantics of 'readline()' must differ from those of the builtin file @@ -75,10 +72,10 @@ class TextFile: default_options = { 'strip_comments': 1, 'skip_blanks': 1, - 'join_lines': 0, 'lstrip_ws': 0, 'rstrip_ws': 1, - 'collapse_ws': 0, + 'join_lines': 0, + 'collapse_join': 0, } def __init__ (self, filename=None, file=None, **options): @@ -219,6 +216,8 @@ def readline (self): "end-of-file") return buildup_line + if self.collapse_join: + line = string.lstrip (line) line = buildup_line + line # careful: pay attention to line number when incrementing it @@ -261,10 +260,6 @@ def readline (self): buildup_line = line[0:-2] + '\n' continue - # collapse internal whitespace (*after* joining lines!) - if self.collapse_ws: - line = re.sub (r'(\S)\s+(\S)', r'\1 \2', line) - # well, I guess there's some actual content there: return it return line @@ -295,7 +290,7 @@ def unreadline (self, line): test_data = """# test file line 3 \\ -continues on next line + continues on next line """ @@ -303,16 +298,21 @@ def unreadline (self, line): result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) # result 2: just strip comments - result2 = ["\n", "\n", "line 3 \\\n", "continues on next line\n"] + result2 = ["\n", "\n", "line 3 \\\n", " continues on next line\n"] # result 3: just strip blank lines - result3 = ["# test file\n", "line 3 \\\n", "continues on next line\n"] + result3 = ["# test file\n", "line 3 \\\n", " continues on next line\n"] # result 4: default, strip comments, blank lines, and trailing whitespace - result4 = ["line 3 \\", "continues on next line"] + result4 = ["line 3 \\", " continues on next line"] - # result 5: full processing, strip comments and blanks, plus join lines - result5 = ["line 3 continues on next line"] + # result 5: strip comments and blanks, plus join lines (but don't + # "collapse" joined lines + result5 = ["line 3 continues on next line"] + + # result 6: strip comments and blanks, plus join lines (and + # "collapse" joined lines + result6 = ["line 3 continues on next line"] def test_input (count, description, file, expected_result): result = file.readlines () @@ -349,7 +349,11 @@ def test_input (count, description, file, expected_result): in_file = TextFile (filename, strip_comments=1, skip_blanks=1, join_lines=1, rstrip_ws=1) - test_input (5, "full processing", in_file, result5) + test_input (5, "join lines without collapsing", in_file, result5) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + test_input (6, "join lines with collapsing", in_file, result6) os.remove (filename) From c21a9987e9f21985cccaa2e3a244a0c456091692 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 18:06:31 +0000 Subject: [PATCH 0607/8469] [change from 2000/08/11, propagating now to distutils copy] Factored the guts of 'warn()' out to 'gen_error()', and added the 'error()' method (trivial thanks to the refactoring). --- text_file.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/text_file.py b/text_file.py index f22b3e9167..b731762230 100644 --- a/text_file.py +++ b/text_file.py @@ -134,6 +134,22 @@ def close (self): self.current_line = None + def gen_error (self, msg, line=None): + outmsg = [] + if line is None: + line = self.current_line + outmsg.append(self.filename + ", ") + if type (line) in (ListType, TupleType): + outmsg.append("lines %d-%d: " % tuple (line)) + else: + outmsg.append("line %d: " % line) + outmsg.append(str(msg)) + return string.join(outmsg, "") + + + def error (self, msg, line=None): + raise ValueError, "error: " + self.gen_error(msg, line) + def warn (self, msg, line=None): """Print (to stderr) a warning message tied to the current logical line in the current file. If the current logical line in the @@ -142,15 +158,7 @@ def warn (self, msg, line=None): the current line number; it may be a list or tuple to indicate a range of physical lines, or an integer for a single physical line.""" - - if line is None: - line = self.current_line - sys.stderr.write (self.filename + ", ") - if type (line) in (ListType, TupleType): - sys.stderr.write ("lines %d-%d: " % tuple (line)) - else: - sys.stderr.write ("line %d: " % line) - sys.stderr.write (str (msg) + "\n") + sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n") def readline (self): From 878b6ad60e8f5e4e163ae13074582e08f4ae4b3b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 18:09:22 +0000 Subject: [PATCH 0608/8469] Andrew Kuchling: Fixed precendence bug that meant setting skip_blanks to false didn't work under some circumstances. --- text_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text_file.py b/text_file.py index b731762230..c983afa425 100644 --- a/text_file.py +++ b/text_file.py @@ -256,7 +256,7 @@ def readline (self): # blank line (whether we rstrip'ed or not)? skip to next line # if appropriate - if line == '' or line == '\n' and self.skip_blanks: + if (line == '' or line == '\n') and self.skip_blanks: continue if self.join_lines: From 0bd2aefe51af28256934aa5b567efb49d09f2f7a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 16 Sep 2000 18:33:36 +0000 Subject: [PATCH 0609/8469] Changed so lines that are all comment (or just whitespace + comment) are completely skipped, rather than being treated as blank lines (and then subject to the 'skip_blanks' flag). This allows us to process old-style Setup files, which rely on hello \\ # boo! there coming out as "hello there". --- text_file.py | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/text_file.py b/text_file.py index c983afa425..37bffe6139 100644 --- a/text_file.py +++ b/text_file.py @@ -201,8 +201,10 @@ def readline (self): pos = string.find (line, "#") if pos == -1: # no "#" -- no comments pass - elif pos == 0 or line[pos-1] != "\\": # it's a comment - + + # It's definitely a comment -- either "#" is the first + # character, or it's elsewhere and unescaped. + elif pos == 0 or line[pos-1] != "\\": # Have to preserve the trailing newline, because it's # the job of a later step (rstrip_ws) to remove it -- # and if rstrip_ws is false, we'd better preserve it! @@ -212,6 +214,16 @@ def readline (self): eol = (line[-1] == '\n') and '\n' or '' line = line[0:pos] + eol + # If all that's left is whitespace, then skip line + # *now*, before we try to join it to 'buildup_line' -- + # that way constructs like + # hello \\ + # # comment that should be ignored + # there + # result in "hello there". + if string.strip(line) == "": + continue + else: # it's an escaped "#" line = string.replace (line, "\\#", "#") @@ -232,7 +244,8 @@ def readline (self): if type (self.current_line) is ListType: self.current_line[1] = self.current_line[1] + 1 else: - self.current_line = [self.current_line, self.current_line+1] + self.current_line = [self.current_line, + self.current_line+1] # just an ordinary line, read it as usual else: if line is None: # eof @@ -271,7 +284,7 @@ def readline (self): # well, I guess there's some actual content there: return it return line - # end readline + # readline () def readlines (self): @@ -298,21 +311,26 @@ def unreadline (self, line): test_data = """# test file line 3 \\ +# intervening comment continues on next line """ - - # result 1: no fancy options result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) # result 2: just strip comments - result2 = ["\n", "\n", "line 3 \\\n", " continues on next line\n"] + result2 = ["\n", + "line 3 \\\n", + " continues on next line\n"] # result 3: just strip blank lines - result3 = ["# test file\n", "line 3 \\\n", " continues on next line\n"] + result3 = ["# test file\n", + "line 3 \\\n", + "# intervening comment\n", + " continues on next line\n"] # result 4: default, strip comments, blank lines, and trailing whitespace - result4 = ["line 3 \\", " continues on next line"] + result4 = ["line 3 \\", + " continues on next line"] # result 5: strip comments and blanks, plus join lines (but don't # "collapse" joined lines From 7774801f0603d1cb9323ece86720102e31eaac79 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 17 Sep 2000 00:45:18 +0000 Subject: [PATCH 0610/8469] Added 'read_setup_file()' to read old-style Setup files. Could make life easier for people porting Makefile.pre.in-based extensions to Distutils. Also loosened argument-checking in Extension constructor to make life easier for 'read_setup_file()'. --- extension.py | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/extension.py b/extension.py index 1d3112b652..a63ede233c 100644 --- a/extension.py +++ b/extension.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" +import os, string from types import * @@ -89,9 +90,8 @@ def __init__ (self, name, sources, assert type(name) is StringType, "'name' must be a string" assert (type(sources) is ListType and - len(sources) >= 1 and map(type, sources) == [StringType]*len(sources)), \ - "'sources' must be a non-empty list of strings" + "'sources' must be a list of strings" self.name = name self.sources = sources @@ -107,3 +107,111 @@ def __init__ (self, name, sources, self.export_symbols = export_symbols or [] # class Extension + + +def read_setup_file (filename): + from distutils.sysconfig import \ + parse_makefile, expand_makefile_vars, _variable_rx + from distutils.text_file import TextFile + from distutils.util import split_quoted + + # First pass over the file to gather "VAR = VALUE" assignments. + vars = parse_makefile(filename) + + # Second pass to gobble up the real content: lines of the form + # ... [ ...] [ ...] [ ...] + file = TextFile(filename, + strip_comments=1, skip_blanks=1, join_lines=1, + lstrip_ws=1, rstrip_ws=1) + extensions = [] + + while 1: + line = file.readline() + if line is None: # eof + break + if _variable_rx.match(line): # VAR=VALUE, handled in first pass + continue + + if line[0] == line[-1] == "*": + file.warn("'%s' lines not handled yet" % line) + continue + + #print "original line: " + line + line = expand_makefile_vars(line, vars) + words = split_quoted(line) + #print "expanded line: " + line + + # NB. this parses a slightly different syntax than the old + # makesetup script: here, there must be exactly one extension per + # line, and it must be the first word of the line. I have no idea + # why the old syntax supported multiple extensions per line, as + # they all wind up being the same. + + module = words[0] + ext = Extension(module, []) + append_next_word = None + + for word in words[1:]: + if append_next_word is not None: + append_next_word.append(word) + append_next_word = None + continue + + suffix = os.path.splitext(word)[1] + switch = word[0:2] ; value = word[2:] + + if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++"): + # hmm, should we do something about C vs. C++ sources? + # or leave it up to the CCompiler implementation to + # worry about? + ext.sources.append(word) + elif switch == "-I": + ext.include_dirs.append(value) + elif switch == "-D": + equals = string.find(value, "=") + if equals == -1: # bare "-DFOO" -- no value + ext.define_macros.append((value, None)) + else: # "-DFOO=blah" + ext.define_macros.append((value[0:equals], + value[equals+2:])) + elif switch == "-U": + ext.undef_macros.append(value) + elif switch == "-C": # only here 'cause makesetup has it! + ext.extra_compile_args.append(word) + elif switch == "-l": + ext.libraries.append(value) + elif switch == "-L": + ext.library_dirs.append(value) + elif switch == "-R": + ext.runtime_library_dirs.append(value) + elif word == "-rpath": + append_next_word = ext.runtime_library_dirs + elif word == "-Xlinker": + append_next_word = ext.extra_link_args + elif switch == "-u": + ext.extra_link_args.append(word) + if not value: + append_next_word = ext.extra_link_args + elif suffix in (".a", ".so", ".sl", ".o"): + # NB. a really faithful emulation of makesetup would + # append a .o file to extra_objects only if it + # had a slash in it; otherwise, it would s/.o/.c/ + # and append it to sources. Hmmmm. + ext.extra_objects.append(word) + else: + file.warn("unrecognized argument '%s'" % word) + + extensions.append(ext) + + #print "module:", module + #print "source files:", source_files + #print "cpp args:", cpp_args + #print "lib args:", library_args + + #extensions[module] = { 'sources': source_files, + # 'cpp_args': cpp_args, + # 'lib_args': library_args } + + return extensions + +# read_setup_file () From 0e6eb0bf665aed42a3e42d4319a636b3ca6fa38c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 17 Sep 2000 00:53:02 +0000 Subject: [PATCH 0611/8469] Added 'expand_makefile_vars()' to (duh) expand make-style variables in a string (gives you something to do with the dictionary returned by 'parse_makefile()'). Pulled the regexes in 'parse_makefile()' out -- they're now globals, as 'expand_makefile_vars()' needs (two of) them. Cosmetic tweaks to 'parse_makefile()'. --- sysconfig.py | 48 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index de35d96a8d..605e95dfb2 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -157,6 +157,13 @@ def parse_config_h(fp, g=None): g[m.group(1)] = 0 return g + +# Regexes needed for parsing Makefile (and similar syntaxes, +# like old-style Setup files). +_variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") +_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)") +_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") + def parse_makefile(fn, g=None): """Parse a Makefile-style file. @@ -166,19 +173,18 @@ def parse_makefile(fn, g=None): """ from distutils.text_file import TextFile - fp = TextFile(fn, strip_comments=1, join_lines=1) + fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) if g is None: g = {} - variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") done = {} notdone = {} while 1: line = fp.readline() - if line is None: + if line is None: # eof break - m = variable_rx.match(line) + m = _variable_rx.match(line) if m: n, v = m.group(1, 2) v = string.strip(v) @@ -190,14 +196,10 @@ def parse_makefile(fn, g=None): done[n] = v # do variable interpolation here - findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)") - findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") while notdone: for name in notdone.keys(): value = notdone[name] - m = findvar1_rx.search(value) - if not m: - m = findvar2_rx.search(value) + m = _findvar1_rx.search(value) or _findvar2_rx.search(value) if m: n = m.group(1) if done.has_key(n): @@ -228,11 +230,39 @@ def parse_makefile(fn, g=None): # bogus variable reference; just drop it since we can't deal del notdone[name] + fp.close() + # save the results in the global dictionary g.update(done) return g +def expand_makefile_vars(s, vars): + """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in + 'string' according to 'vars' (a dictionary mapping variable names to + values). Variables not present in 'vars' are silently expanded to the + empty string. The variable values in 'vars' should not contain further + variable expansions; if 'vars' is the output of 'parse_makefile()', + you're fine. Returns a variable-expanded version of 's'. + """ + + # This algorithm does multiple expansion, so if vars['foo'] contains + # "${bar}", it will expand ${foo} to ${bar}, and then expand + # ${bar}... and so forth. This is fine as long as 'vars' comes from + # 'parse_makefile()', which takes care of such expansions eagerly, + # according to make's variable expansion semantics. + + while 1: + m = _findvar1_rx.search(s) or _findvar2_rx.search(s) + if m: + name = m.group(1) + (beg, end) = m.span() + s = s[0:beg] + vars.get(m.group(1)) + s[end:] + else: + break + return s + + _config_vars = None def _init_posix(): From 7ce5bceb8f36d5b1b416bde08b9f161ca4bf51d4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 17 Sep 2000 00:54:58 +0000 Subject: [PATCH 0612/8469] Fixed to respect 'define_macros' and 'undef_macros' on Extension object. --- command/build_ext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index f880a7a8d5..d578b846ac 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -403,6 +403,10 @@ def build_extensions (self): # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] + macros = ext.define_macros[:] + for undef in ext.undef_macros: + macros.append((undef,)) + # XXX and if we support CFLAGS, why not CC (compiler # executable), CPPFLAGS (pre-processor options), and LDFLAGS # (linker options) too? @@ -413,7 +417,7 @@ def build_extensions (self): objects = self.compiler.compile (sources, output_dir=self.build_temp, - #macros=macros, + macros=macros, include_dirs=ext.include_dirs, debug=self.debug, extra_postargs=extra_args) From 7d833392261181af33c821afed6dff05ed17b3b0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 18 Sep 2000 00:41:10 +0000 Subject: [PATCH 0613/8469] Catch up to recent changes in TextFile (spotted by Bastian Kleineidam). --- command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 6de703ec92..9b9f6064c5 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -332,7 +332,7 @@ def read_template (self): join_lines=1, lstrip_ws=1, rstrip_ws=1, - collapse_ws=1) + collapse_join=1) while 1: line = template.readline() From 3d12a4154867139b39890b8debcf250286f6b5e7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 19 Sep 2000 11:10:23 +0000 Subject: [PATCH 0614/8469] Set the 'nt' installation scheme for the install command even if run on other systems, so that data, headers, scripts are included in the installer. --- command/bdist_wininst.py | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 5030ef9057..4637d4518c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -74,6 +74,17 @@ def run (self): install = self.reinitialize_command('install') install.root = self.bdist_dir + if os.name != 'nt': + # must force install to use the 'nt' scheme + install.select_scheme ('nt') + # change the backslash to the current pathname separator + for key in ('purelib', 'platlib', 'headers', 'scripts', + 'data'): + attrname = 'install_' + key + attr = getattr (install, attrname) + if attr: + attr = string.replace (attr, '\\', os.sep) + setattr (install, attrname, attr) install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files @@ -99,14 +110,20 @@ def run (self): archive_basename = os.path.join(self.bdist_dir, "%s.win32" % fullname) - # XXX hack! Our archive MUST be relative to sys.prefix - # XXX What about .install_data, .install_scripts, ...? - # [Perhaps require that all installation dirs be under sys.prefix - # on Windows? this will be acceptable until we start dealing - # with Python applications, at which point we should zip up - # the application directory -- and again everything can be - # under one dir --GPW] - root_dir = install.install_lib + # Our archive MUST be relative to sys.prefix, which is the + # same as install_lib in the 'nt' scheme. + root_dir = os.path.normpath (install.install_lib) + + # Sanity check: Make sure everything is included + for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): + attrname = 'install_' + key + install_x = getattr (install, attrname) + # (Use normpath so that we can string.find to look for + # subdirectories) + install_x = os.path.normpath (install_x) + if string.find (install_x, root_dir) != 0: + raise DistutilsInternalError \ + ("'%s' not included in install_lib" % key) arcname = self.make_archive (archive_basename, "zip", root_dir=root_dir) self.create_exe (arcname, fullname) From 5054d1229b94a8fe66d72b69de38e62955997685 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 19 Sep 2000 23:56:43 +0000 Subject: [PATCH 0615/8469] *Very* belated application of Thomas Heller's patch to handle resource files. The gist of the patch is to treat ".rc" and ".mc" files as source files; ".mc" files are compiled to ".rc" and then ".res", and ".rc" files are compiled to ".res". Wish I knew what all these things stood for... --- msvccompiler.py | 89 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index ae08e7fdcf..ea58a79cd3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -178,10 +178,14 @@ class MSVCCompiler (CCompiler) : # Private class data (need to distinguish C from C++ source for compiler) _c_extensions = ['.c'] _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] # Needed for the filename generation methods provided by the # base class, CCompiler. - src_extensions = _c_extensions + _cpp_extensions + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions + _mc_extensions) + res_extension = '.res' obj_extension = '.obj' static_lib_extension = '.lib' shared_lib_extension = '.dll' @@ -203,6 +207,8 @@ def __init__ (self, self.cc = find_exe("cl.exe", version) self.link = find_exe("link.exe", version) self.lib = find_exe("lib.exe", version) + self.rc = find_exe("rc.exe", version) # resource compiler + self.mc = find_exe("mc.exe", version) # message compiler set_path_env_var ('lib', version) set_path_env_var ('include', version) path=get_msvc_paths('path', version) @@ -217,6 +223,8 @@ def __init__ (self, self.cc = "cl.exe" self.link = "link.exe" self.lib = "lib.exe" + self.rc = "rc.exe" + self.mc = "mc.exe" self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ] @@ -232,6 +240,37 @@ def __init__ (self, # -- Worker methods ------------------------------------------------ + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + # Copied from ccompiler.py, extended to return .res as 'object'-file + # for .rc input file + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + (base, ext) = os.path.splitext (src_name) + if ext not in self.src_extensions: + # Better to raise an exception instead of silently continuing + # and later complain about sources and targets having + # different lengths + raise CompileError ("Don't know how to compile %s" % src_name) + if strip_dir: + base = os.path.basename (base) + if ext in self._rc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + elif ext in self._mc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + # object_filenames () + + def compile (self, sources, output_dir=None, @@ -263,14 +302,58 @@ def compile (self, if skip_sources[src]: self.announce ("skipping %s (%s up-to-date)" % (src, obj)) else: + self.mkpath (os.path.dirname (obj)) + if ext in self._c_extensions: input_opt = "/Tc" + src elif ext in self._cpp_extensions: input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn ([self.rc] + + [output_opt] + [input_opt]) + except DistutilsExecError, msg: + raise CompileError, msg + continue + elif ext in self._mc_extensions: + + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + + h_dir = os.path.dirname (src) + rc_dir = os.path.dirname (obj) + try: + # first compile .MC to .RC and .H file + self.spawn ([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn ([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError, msg: + raise CompileError, msg + continue + else: + # how to handle this file? + raise CompileError ( + "Don't know how to compile %s to %s" % \ + (src, obj)) output_opt = "/Fo" + obj - - self.mkpath (os.path.dirname (obj)) try: self.spawn ([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + From ec1f37f7faad9e09826aa1b6003f006676f0a9ef Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 21 Sep 2000 01:23:35 +0000 Subject: [PATCH 0616/8469] Corran Webster: fix 'change_root()' to handle Mac OS paths. --- util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 468887127f..b60e39c709 100644 --- a/util.py +++ b/util.py @@ -100,7 +100,13 @@ def change_root (new_root, pathname): return os.path.join (new_root, path) elif os.name == 'mac': - raise RuntimeError, "no clue how to do this on Mac OS" + if not os.path.isabs(pathname): + return os.path.join(new_root, pathname) + else: + # Chop off volume name from start of path + elements = string.split(pathname, ":", 1) + pathname = ":" + elements[1] + return os.path.join(new_root, pathname) else: raise DistutilsPlatformError, \ From d56ce29dfa83433ccaa14e7fc1cd3d732cc08955 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 22 Sep 2000 01:05:43 +0000 Subject: [PATCH 0617/8469] Fix 'convert_path()' so it returns immediately under Unix -- prevents blowing up when the pathname starts with '/', which is needed when converting installation directories in the "install" command. --- util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index b60e39c709..3f06807854 100644 --- a/util.py +++ b/util.py @@ -68,15 +68,15 @@ def convert_path (pathname): absolute (starts with '/') or contains local directory separators (unless the local separator is '/', of course).""" + if os.sep == '/': + return pathname if pathname[0] == '/': raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname - if os.sep != '/': - paths = string.split (pathname, '/') - return apply (os.path.join, paths) - else: - return pathname + + paths = string.split(pathname, '/') + return apply(os.path.join, paths) # convert_path () From ade6e34965cd938919f4177788b89e96c6f16d99 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 22 Sep 2000 01:31:08 +0000 Subject: [PATCH 0618/8469] Changed all paths in the INSTALL_SCHEMES dict to Unix syntax, and added 'convert_paths()' method to convert them all to the local syntax (backslash or colon or whatever) at the appropriate time. Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in 'select_scheme()'). Default 'install_path_file' to true, and never set it false (it's just there in case some outsider somewhere wants to disable installation of the .pth file for whatever reason). Toned down the warning emitted when 'install_path_file' is false, since we no longer know why it might be false. Added 'warn_dir' flag to suppress warning when installing to a directory not in sys.path (again, we never set this false -- it's there for outsiders to use, specifically the "bdist_*" commands). Pulled the loop of 'change_root()' calls out to new method 'change_roots()'. Comment updates/deletions/additions. --- command/install.py | 99 ++++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/command/install.py b/command/install.py index 04b325a6d2..573e0740eb 100644 --- a/command/install.py +++ b/command/install.py @@ -33,19 +33,24 @@ 'nt': { 'purelib': '$base', 'platlib': '$base', - 'headers': '$base\\Include\\$dist_name', - 'scripts': '$base\\Scripts', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', 'data' : '$base', }, 'mac': { - 'purelib': '$base:Lib:site-packages', - 'platlib': '$base:Lib:site-packages', - 'headers': '$base:Include:$dist_name', - 'scripts': '$base:Scripts', + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', 'data' : '$base', } } +# The keys to an installation scheme; if any new types of files are to be +# installed, be sure to add an entry to every installation scheme above, +# and to SCHEME_KEYS here. +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') + class install (Command): @@ -130,14 +135,24 @@ def initialize_options (self): # These two are for putting non-packagized distributions into their # own directory and creating a .pth file if it makes sense. - # 'extra_path' comes from the setup file; 'install_path_file' is - # set only if we determine that it makes sense to install a path - # file. + # 'extra_path' comes from the setup file; 'install_path_file' can + # be turned off if it makes no sense to install a .pth file. (But + # better to install it uselessly than to guess wrong and not + # install it when it's necessary and would be used!) Currently, + # 'install_path_file' is always true unless some outsider meddles + # with it. self.extra_path = None - self.install_path_file = 0 - + self.install_path_file = 1 + + # 'force' forces installation, even if target files are not + # out-of-date. 'skip_build' skips running the "build" command, + # handy if you know it's not necessary. 'warn_dir' (which is *not* + # a user option, it's just there so the bdist_* commands can turn + # it off) determines whether we warn about installing to a + # directory not in sys.path. self.force = 0 self.skip_build = 0 + self.warn_dir = 1 # These are only here as a conduit from the 'build' command to the # 'install_*' commands that do the real work. ('build_base' isn't @@ -256,6 +271,12 @@ def finalize_options (self): else: self.install_lib = self.install_purelib + + # Convert directories from Unix /-separated syntax to the local + # convention. + self.convert_paths('lib', 'purelib', 'platlib', + 'scripts', 'data', 'headers') + # Well, we're not actually fully completely finalized yet: we still # have to deal with 'extra_path', which is the hack for allowing # non-packagized module distributions (hello, Numerical Python!) to @@ -267,11 +288,8 @@ def finalize_options (self): # If a new root directory was supplied, make all the installation # dirs relative to it. if self.root is not None: - for name in ('libbase', 'lib', 'purelib', 'platlib', - 'scripts', 'data', 'headers'): - attr = "install_" + name - new_val = change_root (self.root, getattr (self, attr)) - setattr (self, attr, new_val) + self.change_roots('libbase', 'lib', 'purelib', 'platlib', + 'scripts', 'data', 'headers') self.dump_dirs ("after prepending root") @@ -324,22 +342,11 @@ def finalize_unix (self): self.prefix = os.path.normpath (sys.prefix) self.exec_prefix = os.path.normpath (sys.exec_prefix) - self.install_path_file = 1 else: if self.exec_prefix is None: self.exec_prefix = self.prefix - - # XXX since we don't *know* that a user-supplied prefix really - # points to another Python installation, we can't be sure that - # writing a .pth file there will actually work -- so we don't - # try. That is, we only set 'install_path_file' if the user - # didn't supply prefix. There are certainly circumstances - # under which we *should* install a .pth file when the user - # supplies a prefix, namely when that prefix actually points to - # another Python installation. Hmmm. - self.install_base = self.prefix self.install_platbase = self.exec_prefix self.select_scheme ("unix_prefix") @@ -351,10 +358,6 @@ def finalize_other (self): # Windows and Mac OS for now if self.prefix is None: self.prefix = os.path.normpath (sys.prefix) - self.install_path_file = 1 - - # XXX same caveat regarding 'install_path_file' as in - # 'finalize_unix()'. self.install_base = self.install_platbase = self.prefix try: @@ -369,7 +372,7 @@ def finalize_other (self): # Windows and Mac OS for now def select_scheme (self, name): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] - for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): + for key in SCHEME_KEYS: attrname = 'install_' + key if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) @@ -399,6 +402,12 @@ def expand_dirs (self): 'install_data',]) + def convert_paths (self, *names): + for name in names: + attr = "install_" + name + setattr(self, attr, convert_path(getattr(self, attr))) + + def handle_extra_path (self): if self.extra_path is None: @@ -433,6 +442,12 @@ def handle_extra_path (self): # handle_extra_path () + def change_roots (self, *names): + for name in names: + attr = "install_" + name + setattr(self, attr, change_root(self.root, getattr(self, attr))) + + def run (self): # Obviously have to build before we can install @@ -458,13 +473,14 @@ def run (self): "writing list of installed files to '%s'" % self.record) - normalized_path = map (os.path.normpath, sys.path) - if (not (self.path_file and self.install_path_file) and - os.path.normpath (self.install_lib) not in normalized_path): - self.warn (("modules installed to '%s', which is not in " + - "Python's module search path (sys.path) -- " + - "you'll have to change the search path yourself") % - self.install_lib) + normalized_path = map(os.path.normpath, sys.path) + if (self.warn_dir and + not (self.path_file and self.install_path_file) and + os.path.normpath(self.install_lib) not in normalized_path): + self.warn(("modules installed to '%s', which is not in " + + "Python's module search path (sys.path) -- " + + "you'll have to change the search path yourself") % + self.install_lib) # run () @@ -516,10 +532,7 @@ def create_path_file (self): (filename, [self.extra_dirs]), "creating %s" % filename) else: - self.warn (("path file '%s' not created for alternate or custom " + - "installation (path files only work with standard " + - "installations)") % - filename) + self.warn("path file '%s' not created" % filename) # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. From 7d6f876b662e94221ed957643e07cacff9352e7b Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 22 Sep 2000 01:32:34 +0000 Subject: [PATCH 0619/8469] Tweak what happens when run on non-Windows platforms: set install prefix as well as scheme, and don't convert all installation paths (that's now done by the "install" command for us). --- command/bdist_wininst.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 4637d4518c..b4c6d9b4b6 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -75,16 +75,11 @@ def run (self): install = self.reinitialize_command('install') install.root = self.bdist_dir if os.name != 'nt': - # must force install to use the 'nt' scheme - install.select_scheme ('nt') - # change the backslash to the current pathname separator - for key in ('purelib', 'platlib', 'headers', 'scripts', - 'data'): - attrname = 'install_' + key - attr = getattr (install, attrname) - if attr: - attr = string.replace (attr, '\\', os.sep) - setattr (install, attrname, attr) + # Must force install to use the 'nt' scheme; we set the + # prefix too just because it looks silly to put stuff + # in (eg.) ".../usr/Scripts", "usr/Include", etc. + install.prefix = "Python" + install.select_scheme('nt') install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files From 3790253376ae5bac233c686320b37e6789fe51f5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Sep 2000 00:59:34 +0000 Subject: [PATCH 0620/8469] Reformat docstrings. Standardize use of whitespace on function calls. --- file_util.py | 128 +++++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 65 deletions(-) diff --git a/file_util.py b/file_util.py index 2d0148f3f1..0e85a74b69 100644 --- a/file_util.py +++ b/file_util.py @@ -18,11 +18,11 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', - raises DistutilsFileError. Data is read/written in chunks of - 'buffer_size' bytes (default 16k). No attempt is made to handle - anything apart from regular files.""" - + opening either file, reading from 'src', or writing to 'dst', raises + DistutilsFileError. Data is read/written in chunks of 'buffer_size' + bytes (default 16k). No attempt is made to handle anything apart from + regular files. + """ # Stolen from shutil module in the standard library, but with # custom error-handling added. @@ -43,7 +43,7 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): while 1: try: - buf = fsrc.read (buffer_size) + buf = fsrc.read(buffer_size) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not read from '%s': %s" % (src, errstr) @@ -74,31 +74,29 @@ def copy_file (src, dst, verbose=0, dry_run=0): - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' - is copied there with the same name; otherwise, it must be a - filename. (If the file exists, it will be ruthlessly clobbered.) - If 'preserve_mode' is true (the default), the file's mode (type - and permission bits, or whatever is analogous on the current - platform) is copied. If 'preserve_times' is true (the default), - the last-modified and last-access times are copied as well. If - 'update' is true, 'src' will only be copied if 'dst' does not - exist, or if 'dst' does exist but is older than 'src'. If - 'verbose' is true, then a one-line summary of the copy will be - printed to stdout. - - 'link' allows you to make hard links (os.link) or symbolic links - (os.symlink) instead of copying: set it to "hard" or "sym"; if it - is None (the default), files are copied. Don't set 'link' on - systems that don't support it: 'copy_file()' doesn't check if - hard or symbolic linking is available. - - Under Mac OS, uses the native file copy function in macostools; - on other systems, uses '_copy_file_contents()' to copy file - contents. - - Return the name of the destination file, whether it was actually - copied or not.""" - + """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is + copied there with the same name; otherwise, it must be a filename. (If + the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' + is true (the default), the file's mode (type and permission bits, or + whatever is analogous on the current platform) is copied. If + 'preserve_times' is true (the default), the last-modified and + last-access times are copied as well. If 'update' is true, 'src' will + only be copied if 'dst' does not exist, or if 'dst' does exist but is + older than 'src'. If 'verbose' is true, then a one-line summary of the + copy will be printed to stdout. + + 'link' allows you to make hard links (os.link) or symbolic links + (os.symlink) instead of copying: set it to "hard" or "sym"; if it is + None (the default), files are copied. Don't set 'link' on systems that + don't support it: 'copy_file()' doesn't check if hard or symbolic + linking is available. + + Under Mac OS, uses the native file copy function in macostools; on + other systems, uses '_copy_file_contents()' to copy file contents. + + Return the name of the destination file, whether it was actually copied + or not. + """ # XXX if the destination file already exists, we clobber it if # copying, but blow up if linking. Hmmm. And I don't know what # macostools.copyfile() does. Should definitely be consistent, and @@ -109,17 +107,17 @@ def copy_file (src, dst, from stat import * from distutils.dep_util import newer - if not os.path.isfile (src): + if not os.path.isfile(src): raise DistutilsFileError, \ "can't copy '%s': doesn't exist or not a regular file" % src - if os.path.isdir (dst): + if os.path.isdir(dst): dir = dst - dst = os.path.join (dst, os.path.basename (src)) + dst = os.path.join(dst, os.path.basename(src)) else: - dir = os.path.dirname (dst) + dir = os.path.dirname(dst) - if update and not newer (src, dst): + if update and not newer(src, dst): if verbose: print "not copying %s (output up-to-date)" % src return dst @@ -142,7 +140,7 @@ def copy_file (src, dst, if os.name == 'mac': import macostools try: - macostools.copy (src, dst, 0, preserve_times) + macostools.copy(src, dst, 0, preserve_times) except os.error, exc: raise DistutilsFileError, \ "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) @@ -150,25 +148,25 @@ def copy_file (src, dst, # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': - if not (os.path.exists (dst) and os.path.samefile (src, dst)): - os.link (src, dst) + if not (os.path.exists(dst) and os.path.samefile(src, dst)): + os.link(src, dst) elif link == 'sym': - if not (os.path.exists (dst) and os.path.samefile (src, dst)): - os.symlink (src, dst) + if not (os.path.exists(dst) and os.path.samefile(src, dst)): + os.symlink(src, dst) # Otherwise (non-Mac, not linking), copy the file contents and # (optionally) copy the times and mode. else: - _copy_file_contents (src, dst) + _copy_file_contents(src, dst) if preserve_mode or preserve_times: - st = os.stat (src) + st = os.stat(src) # According to David Ascher , utime() should be done # before chmod() (at least under NT). if preserve_times: - os.utime (dst, (st[ST_ATIME], st[ST_MTIME])) + os.utime(dst, (st[ST_ATIME], st[ST_MTIME])) if preserve_mode: - os.chmod (dst, S_IMODE (st[ST_MODE])) + os.chmod(dst, S_IMODE(st[ST_MODE])) return dst @@ -180,13 +178,13 @@ def move_file (src, dst, verbose=0, dry_run=0): - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file - will be moved into it with the same name; otherwise, 'src' is - just renamed to 'dst'. Return the new full name of the file. - - Handles cross-device moves on Unix using - 'copy_file()'. What about other systems???""" + """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will + be moved into it with the same name; otherwise, 'src' is just renamed + to 'dst'. Return the new full name of the file. + Handles cross-device moves on Unix using 'copy_file()'. What about + other systems??? + """ from os.path import exists, isfile, isdir, basename, dirname if verbose: @@ -195,25 +193,25 @@ def move_file (src, dst, if dry_run: return dst - if not isfile (src): + if not isfile(src): raise DistutilsFileError, \ "can't move '%s': not a regular file" % src - if isdir (dst): - dst = os.path.join (dst, basename (src)) - elif exists (dst): + if isdir(dst): + dst = os.path.join(dst, basename(src)) + elif exists(dst): raise DistutilsFileError, \ "can't move '%s': destination '%s' already exists" % \ (src, dst) - if not isdir (dirname (dst)): + if not isdir(dirname(dst)): raise DistutilsFileError, \ "can't move '%s': destination '%s' not a valid path" % \ (src, dst) copy_it = 0 try: - os.rename (src, dst) + os.rename(src, dst) except os.error, (num, msg): if num == errno.EXDEV: copy_it = 1 @@ -222,12 +220,12 @@ def move_file (src, dst, "couldn't move '%s' to '%s': %s" % (src, dst, msg) if copy_it: - copy_file (src, dst) + copy_file(src, dst) try: - os.unlink (src) + os.unlink(src) except os.error, (num, msg): try: - os.unlink (dst) + os.unlink(dst) except os.error: pass raise DistutilsFileError, \ @@ -242,9 +240,9 @@ def move_file (src, dst, def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a - sequence of strings without line terminators) to it.""" - - f = open (filename, "w") + sequence of strings without line terminators) to it. + """ + f = open(filename, "w") for line in contents: - f.write (line + "\n") - f.close () + f.write(line + "\n") + f.close() From 2d5928fb5d508496758ddafa463e5a55712f637c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Sep 2000 01:10:10 +0000 Subject: [PATCH 0621/8469] Whitespace tweaks. --- command/install_lib.py | 67 ++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 2d19e5b96a..dac644ee68 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -34,30 +34,29 @@ def finalize_options (self): # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. - self.set_undefined_options ('install', - ('build_lib', 'build_dir'), - ('install_lib', 'install_dir'), - ('force', 'force'), - ('compile_py', 'compile'), - ('optimize_py', 'optimize'), - ('skip_build', 'skip_build'), - ) - + self.set_undefined_options('install', + ('build_lib', 'build_dir'), + ('install_lib', 'install_dir'), + ('force', 'force'), + ('compile_py', 'compile'), + ('optimize_py', 'optimize'), + ('skip_build', 'skip_build'), + ) def run (self): # Make sure we have built everything we need first if not self.skip_build: if self.distribution.has_pure_modules(): - self.run_command ('build_py') + self.run_command('build_py') if self.distribution.has_ext_modules(): - self.run_command ('build_ext') + self.run_command('build_ext') # Install everything: simply dump the entire contents of the build # directory to the installation directory (that's the beauty of # having a build directory!) if os.path.isdir(self.build_dir): - outfiles = self.copy_tree (self.build_dir, self.install_dir) + outfiles = self.copy_tree(self.build_dir, self.install_dir) else: self.warn("'%s' does not exist -- no Python modules to install" % self.build_dir) @@ -76,10 +75,10 @@ def run (self): if f[-3:] == '.py': out_fn = f + (__debug__ and "c" or "o") compile_msg = "byte-compiling %s to %s" % \ - (f, os.path.basename (out_fn)) + (f, os.path.basename(out_fn)) skip_msg = "skipping byte-compilation of %s" % f - self.make_file (f, out_fn, compile, (f,), - compile_msg, skip_msg) + self.make_file(f, out_fn, compile, (f,), + compile_msg, skip_msg) # run () @@ -88,14 +87,14 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): if not has_any: return [] - build_cmd = self.get_finalized_command (build_cmd) + build_cmd = self.get_finalized_command(build_cmd) build_files = build_cmd.get_outputs() - build_dir = getattr (build_cmd, cmd_option) + build_dir = getattr(build_cmd, cmd_option) - prefix_len = len (build_dir) + len (os.sep) + prefix_len = len(build_dir) + len(os.sep) outputs = [] for file in build_files: - outputs.append (os.path.join (output_dir, file[prefix_len:])) + outputs.append(os.path.join(output_dir, file[prefix_len:])) return outputs @@ -112,21 +111,21 @@ def _bytecode_filenames (self, py_filenames): def get_outputs (self): """Return the list of files that would be installed if this command were actually run. Not affected by the "dry-run" flag or whether - modules have actually been built yet.""" - + modules have actually been built yet. + """ pure_outputs = \ - self._mutate_outputs (self.distribution.has_pure_modules(), - 'build_py', 'build_lib', - self.install_dir) + self._mutate_outputs(self.distribution.has_pure_modules(), + 'build_py', 'build_lib', + self.install_dir) if self.compile: bytecode_outputs = self._bytecode_filenames(pure_outputs) else: bytecode_outputs = [] ext_outputs = \ - self._mutate_outputs (self.distribution.has_ext_modules(), - 'build_ext', 'build_lib', - self.install_dir) + self._mutate_outputs(self.distribution.has_ext_modules(), + 'build_ext', 'build_lib', + self.install_dir) return pure_outputs + bytecode_outputs + ext_outputs @@ -136,20 +135,18 @@ def get_inputs (self): """Get the list of files that are input to this command, ie. the files that get installed as they are named in the build tree. The files in this list correspond one-to-one to the output - filenames returned by 'get_outputs()'.""" - + filenames returned by 'get_outputs()'. + """ inputs = [] if self.distribution.has_pure_modules(): - build_py = self.get_finalized_command ('build_py') - inputs.extend (build_py.get_outputs()) + build_py = self.get_finalized_command('build_py') + inputs.extend(build_py.get_outputs()) if self.distribution.has_ext_modules(): - build_ext = self.get_finalized_command ('build_ext') - inputs.extend (build_ext.get_outputs()) + build_ext = self.get_finalized_command('build_ext') + inputs.extend(build_ext.get_outputs()) return inputs - - # class install_lib From 5b0913a16d97aa227bbe0bcc2aaf6d39bc502934 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 23 Sep 2000 01:20:19 +0000 Subject: [PATCH 0622/8469] Split 'run()' up into 'build()', 'install()', and 'bytecompile()' (for easier extensibility). --- command/install_lib.py | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index dac644ee68..b104fa9cfc 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -46,31 +46,46 @@ def finalize_options (self): def run (self): # Make sure we have built everything we need first + self.build() + + # Install everything: simply dump the entire contents of the build + # directory to the installation directory (that's the beauty of + # having a build directory!) + outfiles = self.install() + + # (Optionally) compile .py to .pyc + self.bytecompile(outfiles) + + # run () + + + # -- Top-level worker functions ------------------------------------ + # (called from 'run()') + + def build (self): if not self.skip_build: if self.distribution.has_pure_modules(): self.run_command('build_py') if self.distribution.has_ext_modules(): self.run_command('build_ext') - - # Install everything: simply dump the entire contents of the build - # directory to the installation directory (that's the beauty of - # having a build directory!) + + def install (self): if os.path.isdir(self.build_dir): outfiles = self.copy_tree(self.build_dir, self.install_dir) else: self.warn("'%s' does not exist -- no Python modules to install" % self.build_dir) return + return outfiles - # (Optionally) compile .py to .pyc + def bytecompile (self, files): # XXX hey! we can't control whether we optimize or not; that's up # to the invocation of the current Python interpreter (at least # according to the py_compile docs). That sucks. - if self.compile: from py_compile import compile - for f in outfiles: + for f in files: # only compile the file if it is actually a .py file if f[-3:] == '.py': out_fn = f + (__debug__ and "c" or "o") @@ -79,9 +94,10 @@ def run (self): skip_msg = "skipping byte-compilation of %s" % f self.make_file(f, out_fn, compile, (f,), compile_msg, skip_msg) - # run () + # -- Utility methods ----------------------------------------------- + def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): if not has_any: @@ -108,6 +124,10 @@ def _bytecode_filenames (self, py_filenames): return bytecode_files + + # -- External interface -------------------------------------------- + # (called by outsiders) + def get_outputs (self): """Return the list of files that would be installed if this command were actually run. Not affected by the "dry-run" flag or whether From 16f0821b07cee481a0ed13bf10ce67c589acd618 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:23:52 +0000 Subject: [PATCH 0623/8469] Fixed some bugs and mis-features in handling config files: * options can now be spelled "foo-bar" or "foo_bar" (handled in 'parse_config_files()', just after we parse a file) * added a "[global]" section so there's a place to set global options like verbose/quiet and dry-run * respect the "negative alias" dictionary so (eg.) "quiet=1" is the same as "verbose=0" (this had to be done twice: once in 'parse_config_file()' for global options, and once in '_set_command_options()' for per-command options) * the other half of handling boolean options correctly: allow commands to list their boolean options in a 'boolean_options' class attribute, and use it to translate strings (like "yes", "1", "no", "0", etc) to true or false --- dist.py | 53 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/dist.py b/dist.py index c5fe86ebbf..f821e0aa30 100644 --- a/dist.py +++ b/dist.py @@ -15,7 +15,7 @@ from distutils.errors import * from distutils import sysconfig from distutils.fancy_getopt import FancyGetopt, longopt_xlate -from distutils.util import check_environ +from distutils.util import check_environ, strtobool # Regex to define acceptable Distutils command names. This is not *quite* @@ -321,7 +321,9 @@ def parse_config_files (self, filenames=None): for opt in options: if opt != '__name__': - opt_dict[opt] = (filename, parser.get(section,opt)) + val = parser.get(section,opt) + opt = string.replace(opt, '-', '_') + opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain # the original filenames that options come from) -- gag, @@ -329,6 +331,22 @@ def parse_config_files (self, filenames=None): # specific config parser (sigh...) parser.__init__() + # If there was a "global" section in the config file, use it + # to set Distribution options. + + if self.command_options.has_key('global'): + for (opt, (src, val)) in self.command_options['global'].items(): + alias = self.negative_opt.get(opt) + try: + if alias: + setattr(self, alias, not strtobool(val)) + elif opt in ('verbose', 'dry_run'): # ugh! + setattr(self, opt, strtobool(val)) + except ValueError, msg: + raise DistutilsOptionError, msg + + # parse_config_files () + # -- Command-line parsing methods ---------------------------------- @@ -346,7 +364,7 @@ def parse_command_line (self): attribute raises DistutilsGetoptError; any error on the command-line raises DistutilsArgError. If no Distutils commands were found on the command line, raises DistutilsArgError. Return - true if command-line were successfully parsed and we should carry + true if command-line was successfully parsed and we should carry on with executing commands; false if no errors but we shouldn't execute commands (currently, this only happens if user asks for help). @@ -714,7 +732,7 @@ def _set_command_options (self, command_obj, option_dict=None): this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). - 'command_obj' must be a Commnd instance. If 'option_dict' is not + 'command_obj' must be a Command instance. If 'option_dict' is not supplied, uses the standard option dictionary for this command (from 'self.command_options'). """ @@ -727,11 +745,28 @@ def _set_command_options (self, command_obj, option_dict=None): if DEBUG: print " setting options for '%s' command:" % command_name for (option, (source, value)) in option_dict.items(): if DEBUG: print " %s = %s (from %s)" % (option, value, source) - if not hasattr(command_obj, option): - raise DistutilsOptionError, \ - ("error in %s: command '%s' has no such option '%s'") % \ - (source, command_name, option) - setattr(command_obj, option, value) + try: + bool_opts = command_obj.boolean_options + except AttributeError: + bool_opts = [] + try: + neg_opt = command_obj.negative_opt + except AttributeError: + neg_opt = {} + + try: + if neg_opt.has_key(option): + setattr(command_obj, neg_opt[option], not strtobool(value)) + elif option in bool_opts: + setattr(command_obj, option, strtobool(value)) + elif hasattr(command_obj, option): + setattr(command_obj, option, value) + else: + raise DistutilsOptionError, \ + ("error in %s: command '%s' has no such option '%s'" + % (source, command_name, option)) + except ValueError, msg: + raise DistutilsOptionError, msg def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first From a9f1b90db48367bd932b4d19310d184a2e5cf317 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:25:06 +0000 Subject: [PATCH 0624/8469] Added 'strtobool()' function: convert strings like "yes", "1", "no", "0", etc. to true/false. --- util.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/util.py b/util.py index 3f06807854..367985aceb 100644 --- a/util.py +++ b/util.py @@ -273,3 +273,18 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): apply(func, args) # execute() + + +def strtobool (val): + """Convert a string representation of truth to true (1) or false (0). + True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values + are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if + 'val' is anything else. + """ + val = string.lower(val) + if val in ('y', 'yes', 't', 'true', 'on', '1'): + return 1 + elif val in ('n', 'no', 'f', 'false', 'off', '0'): + return 0 + else: + raise ValueError, "invalid truth value %s" % `val` From 0881101deede0e48530b1245c88f396acc1cbf6f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:41:15 +0000 Subject: [PATCH 0625/8469] Added 'boolean_options' list to support config file parsing. --- command/bdist_dumb.py | 2 ++ command/bdist_rpm.py | 2 ++ command/bdist_wininst.py | 2 ++ command/build.py | 2 ++ command/build_clib.py | 2 ++ command/build_ext.py | 2 ++ command/build_py.py | 2 ++ command/build_scripts.py | 2 ++ command/clean.py | 2 ++ command/install.py | 2 ++ command/install_data.py | 2 ++ command/install_headers.py | 1 + command/install_lib.py | 2 ++ command/install_scripts.py | 3 +++ command/sdist.py | 3 +++ 15 files changed, 31 insertions(+) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 1fdbf4253b..520098db19 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -32,6 +32,8 @@ class bdist_dumb (Command): "directory to put final built distributions in"), ] + boolean_options = ['keep-temp'] + default_format = { 'posix': 'gztar', 'nt': 'zip', } diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 2afc714670..d585e8c660 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -111,6 +111,8 @@ class bdist_rpm (Command): "RPM 2 compatibility mode"), ] + boolean_options = ['keep-temp', 'rpm2-mode'] + negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', 'rpm2-mode': 'rpm3-mode'} diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b4c6d9b4b6..16dd8022a0 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -33,6 +33,8 @@ class bdist_wininst (Command): "directory to put final built distributions in"), ] + boolean_options = ['keep-temp'] + def initialize_options (self): self.bdist_dir = None self.keep_temp = 0 diff --git a/command/build.py b/command/build.py index 15476ca11b..f30f4ee1da 100644 --- a/command/build.py +++ b/command/build.py @@ -42,6 +42,8 @@ class build (Command): "forcibly build everything (ignore file timestamps)"), ] + boolean_options = ['debug', 'force'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/command/build_clib.py b/command/build_clib.py index 450dae1754..775b7ade5a 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -48,6 +48,8 @@ class build_clib (Command): "specify the compiler type"), ] + boolean_options = ['debug', 'force'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/command/build_ext.py b/command/build_ext.py index d578b846ac..7fdfd1458d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -82,6 +82,8 @@ class build_ext (Command): "make SWIG create C++ files (default is C)"), ] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + help_options = [ ('help-compiler', None, "list available compilers", show_compilers), diff --git a/command/build_py.py b/command/build_py.py index 5fcd18e788..ea92c2be0f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -23,6 +23,8 @@ class build_py (Command): ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] + boolean_options = ['force'] + def initialize_options (self): self.build_lib = None diff --git a/command/build_scripts.py b/command/build_scripts.py index 17fae8f7b5..eacf798996 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -22,6 +22,8 @@ class build_scripts (Command): ('force', 'f', "forcibly build everything (ignore file timestamps"), ] + boolean_options = ['force'] + def initialize_options (self): self.build_dir = None diff --git a/command/clean.py b/command/clean.py index 2f3597fdbc..4f04f08be5 100644 --- a/command/clean.py +++ b/command/clean.py @@ -28,6 +28,8 @@ class clean (Command): "remove all build output, not just temporary by-products") ] + boolean_options = ['all'] + def initialize_options(self): self.build_base = None self.build_lib = None diff --git a/command/install.py b/command/install.py index 573e0740eb..4ad652d990 100644 --- a/command/install.py +++ b/command/install.py @@ -106,6 +106,8 @@ class install (Command): "filename in which to record list of installed files"), ] + boolean_options = ['force', 'skip-build'] + def initialize_options (self): diff --git a/command/install_data.py b/command/install_data.py index af348f5190..9ce118394b 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -25,6 +25,8 @@ class install_data (Command): ('force', 'f', "force installation (overwrite existing files)"), ] + boolean_options = ['force'] + def initialize_options (self): self.install_dir = None self.outfiles = [] diff --git a/command/install_headers.py b/command/install_headers.py index 5c06d574d6..ec0cf4412d 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -21,6 +21,7 @@ class install_headers (Command): "force installation (overwrite existing files)"), ] + boolean_options = ['force'] def initialize_options (self): self.install_dir = None diff --git a/command/install_lib.py b/command/install_lib.py index b104fa9cfc..a603b4f59e 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -19,6 +19,8 @@ class install_lib (Command): ('skip-build', None, "skip the build steps"), ] + boolean_options = ['force', 'compile', 'optimize', 'skip-build'] + def initialize_options (self): # let the 'install' command dictate our installation directory diff --git a/command/install_scripts.py b/command/install_scripts.py index d506f90f51..b8938c48de 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -22,6 +22,9 @@ class install_scripts (Command): ('skip-build', None, "skip the build steps"), ] + boolean_options = ['force', 'skip-build'] + + def initialize_options (self): self.install_dir = None self.force = 0 diff --git a/command/sdist.py b/command/sdist.py index 9b9f6064c5..ec443a3068 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -67,6 +67,9 @@ class sdist (Command): "[default: dist]"), ] + boolean_options = ['use-defaults', 'prune', + 'manifest-only', 'force-manifest', + 'keep-tree'] help_options = [ ('help-formats', None, From 0dc98e6007d2b9a56fa302fd96b0c043e2e3da05 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:51:01 +0000 Subject: [PATCH 0626/8469] Renamed '--keep-tree' option to '--keep-temp', for consistency with the bdist_* commands. --- command/sdist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index ec443a3068..adaf4925f2 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -59,7 +59,7 @@ class sdist (Command): "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, "formats for source distribution (comma-separated list)"), - ('keep-tree', 'k', + ('keep-temp', 'k', "keep the distribution tree around after creating " + "archive file(s)"), ('dist-dir=', 'd', @@ -69,7 +69,7 @@ class sdist (Command): boolean_options = ['use-defaults', 'prune', 'manifest-only', 'force-manifest', - 'keep-tree'] + 'keep-temp'] help_options = [ ('help-formats', None, @@ -97,7 +97,7 @@ def initialize_options (self): self.force_manifest = 0 self.formats = None - self.keep_tree = 0 + self.keep_temp = 0 self.dist_dir = None self.archive_files = None @@ -357,7 +357,7 @@ def prune_file_list (self): by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" - previously with --keep-tree, or it aborted) + previously with --keep-temp, or it aborted) * any RCS or CVS directories """ build = self.get_finalized_command('build') @@ -447,7 +447,7 @@ def make_distribution (self): tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. Finally, we clean up by blowing away the release tree (unless - 'self.keep_tree' is true). The list of archive files created is + 'self.keep_temp' is true). The list of archive files created is stored so it can be retrieved later by 'get_archive_files()'. """ # Don't warn about missing meta-data here -- should be (and is!) @@ -463,7 +463,7 @@ def make_distribution (self): self.archive_files = archive_files - if not self.keep_tree: + if not self.keep_temp: dir_util.remove_tree (base_dir, self.verbose, self.dry_run) def get_archive_files (self): From 680d30f3685bcd7d4230598198edcf5bb634d692 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:53:01 +0000 Subject: [PATCH 0627/8469] Added a bunch of missing "=" signs in the option table. Removed script options -- don't think they ever worked, weren't very well thought through, etc. --- command/bdist_rpm.py | 44 ++++++++++++++------------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index d585e8c660..c293f1f5e4 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -48,52 +48,36 @@ class bdist_rpm (Command): # to "bdist_rpm". The idea is that packagers would put this # info in setup.cfg, although they are of course free to # supply it on the command line. - ('distribution-name', None, + ('distribution-name=', None, "name of the (Linux) distribution to which this " "RPM applies (*not* the name of the module distribution!)"), - ('group', None, + ('group=', None, "package classification [default: \"Development/Libraries\"]"), - ('release', None, + ('release=', None, "RPM release number"), - ('serial', None, + ('serial=', None, "RPM serial number"), - ('vendor', None, + ('vendor=', None, "RPM \"vendor\" (eg. \"Joe Blow \") " "[default: maintainer or author from setup script]"), - ('packager', None, + ('packager=', None, "RPM packager (eg. \"Jane Doe \")" "[default: vendor]"), - ('doc-files', None, + ('doc-files=', None, "list of documentation files (space or comma-separated)"), - ('changelog', None, + ('changelog=', None, "path to RPM changelog"), - ('icon', None, + ('icon=', None, "name of icon file"), - ('prep-script', None, - "pre-build script (Bourne shell code)"), - ('build-script', None, - "build script (Bourne shell code)"), - ('install-script', None, - "installation script (Bourne shell code)"), - ('clean-script', None, - "clean script (Bourne shell code)"), - ('pre-install', None, - "pre-install script (Bourne shell code)"), - ('post-install', None, - "post-install script (Bourne shell code)"), - ('pre-uninstall', None, - "pre-uninstall script (Bourne shell code)"), - ('post-uninstall', None, - "post-uninstall script (Bourne shell code)"), - ('provides', None, + ('provides=', None, "capabilities provided by this package"), - ('requires', None, + ('requires=', None, "capabilities required by this package"), - ('conflicts', None, + ('conflicts=', None, "capabilities which conflict with this package"), - ('build-requires', None, + ('build-requires=', None, "capabilities required to build this package"), - ('obsoletes', None, + ('obsoletes=', None, "capabilities made obsolete by this package"), # Actions to take when building RPM From e0a10947148eeed6a56ef67c5ea170315fbe3c48 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:58:07 +0000 Subject: [PATCH 0628/8469] Change to use the new 'translate_longopt()' function from fancy_getopt, rather than rolling our own with fancy_getopt's 'longopt_xlate' global. --- dist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist.py b/dist.py index f821e0aa30..0069b5fb4c 100644 --- a/dist.py +++ b/dist.py @@ -14,7 +14,7 @@ from copy import copy from distutils.errors import * from distutils import sysconfig -from distutils.fancy_getopt import FancyGetopt, longopt_xlate +from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool @@ -86,8 +86,8 @@ class Distribution: ('long-description', None, "print the long package description"), ] - display_option_names = map(lambda x: string.translate(x[0], longopt_xlate), - display_options) + display_option_names = map(lambda x: translate_longopt(x[0]), + display_options) # negative options are options that exclude other options negative_opt = {'quiet': 'verbose'} @@ -592,7 +592,7 @@ def handle_display_options (self, option_order): for (opt, val) in option_order: if val and is_display_option.get(opt): - opt = string.translate (opt, longopt_xlate) + opt = translate_longopt(opt) print getattr(self.metadata, "get_"+opt)() any_display_options = 1 @@ -746,7 +746,7 @@ def _set_command_options (self, command_obj, option_dict=None): for (option, (source, value)) in option_dict.items(): if DEBUG: print " %s = %s (from %s)" % (option, value, source) try: - bool_opts = command_obj.boolean_options + bool_opts = map(translate_longopt, command_obj.boolean_options) except AttributeError: bool_opts = [] try: From d5e007365aa1d4b127c7eee4826590ca86aeb3b6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 25 Sep 2000 01:58:31 +0000 Subject: [PATCH 0629/8469] Added 'translate_longopt()' function. --- fancy_getopt.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fancy_getopt.py b/fancy_getopt.py index eaf6073760..f93520019f 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -470,6 +470,13 @@ def wrap_text (text, width): return lines # wrap_text () + + +def translate_longopt (opt): + """Convert a long option name to a valid Python identifier by + changing "-" to "_". + """ + return string.translate(opt, longopt_xlate) class OptionDummy: From e67685fc403dc1e6cc25b0381aac29230aca571d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 01:52:25 +0000 Subject: [PATCH 0630/8469] Standardize whitespace in function calls and docstrings. --- dist.py | 124 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/dist.py b/dist.py index 0069b5fb4c..91b820e9b4 100644 --- a/dist.py +++ b/dist.py @@ -118,7 +118,7 @@ def __init__ (self, attrs=None): # information here (and enough command-line options) that it's # worth it. Also delegate 'get_XXX()' methods to the 'metadata' # object in a sneaky and underhanded (but efficient!) way. - self.metadata = DistributionMetadata () + self.metadata = DistributionMetadata() method_basenames = dir(self.metadata) + \ ['fullname', 'contact', 'contact_email'] for basename in method_basenames: @@ -187,7 +187,7 @@ def __init__ (self, attrs=None): # specifically. Note that this order guarantees that aliased # command options will override any supplied redundantly # through the general options dictionary. - options = attrs.get ('options') + options = attrs.get('options') if options: del attrs['options'] for (command, cmd_options) in options.items(): @@ -198,10 +198,10 @@ def __init__ (self, attrs=None): # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): - if hasattr (self.metadata, key): - setattr (self.metadata, key, val) - elif hasattr (self, key): - setattr (self, key, val) + if hasattr(self.metadata, key): + setattr(self.metadata, key, val) + elif hasattr(self, key): + setattr(self, key, val) else: raise DistutilsSetupError, \ "invalid distribution option '%s'" % key @@ -377,10 +377,10 @@ def parse_command_line (self): # until we know what the command is. self.commands = [] - parser = FancyGetopt (self.global_options + self.display_options) - parser.set_negative_aliases (self.negative_opt) - parser.set_aliases ({'license': 'licence'}) - args = parser.getopt (args=self.script_args, object=self) + parser = FancyGetopt(self.global_options + self.display_options) + parser.set_negative_aliases(self.negative_opt) + parser.set_aliases({'license': 'licence'}) + args = parser.getopt(args=self.script_args, object=self) option_order = parser.get_option_order() # for display options we return immediately @@ -427,28 +427,28 @@ def _parse_command_opts (self, parser, args): # Pull the current command from the head of the command line command = args[0] - if not command_re.match (command): + if not command_re.match(command): raise SystemExit, "invalid command name '%s'" % command - self.commands.append (command) + self.commands.append(command) # Dig up the command class that implements this command, so we # 1) know that it's a valid command, and 2) know which options # it takes. try: - cmd_class = self.get_command_class (command) + cmd_class = self.get_command_class(command) except DistutilsModuleError, msg: raise DistutilsArgError, msg # Require that the command class be derived from Command -- want # to be sure that the basic "command" interface is implemented. - if not issubclass (cmd_class, Command): + if not issubclass(cmd_class, Command): raise DistutilsClassError, \ "command class %s must subclass Command" % cmd_class # Also make sure that the command object provides a list of its # known options. - if not (hasattr (cmd_class, 'user_options') and - type (cmd_class.user_options) is ListType): + if not (hasattr(cmd_class, 'user_options') and + type(cmd_class.user_options) is ListType): raise DistutilsClassError, \ ("command class %s must provide " + "'user_options' attribute (a list of tuples)") % \ @@ -457,14 +457,14 @@ def _parse_command_opts (self, parser, args): # If the command class has a list of negative alias options, # merge it in with the global negative aliases. negative_opt = self.negative_opt - if hasattr (cmd_class, 'negative_opt'): - negative_opt = copy (negative_opt) - negative_opt.update (cmd_class.negative_opt) + if hasattr(cmd_class, 'negative_opt'): + negative_opt = copy(negative_opt) + negative_opt.update(cmd_class.negative_opt) # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and - type (cmd_class.help_options) is ListType): + type(cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) else: help_options = [] @@ -472,17 +472,17 @@ def _parse_command_opts (self, parser, args): # All commands support the global options too, just by adding # in 'global_options'. - parser.set_option_table (self.global_options + - cmd_class.user_options + - help_options) - parser.set_negative_aliases (negative_opt) - (args, opts) = parser.getopt (args[1:]) + parser.set_option_table(self.global_options + + cmd_class.user_options + + help_options) + parser.set_negative_aliases(negative_opt) + (args, opts) = parser.getopt(args[1:]) if hasattr(opts, 'help') and opts.help: self._show_help(parser, display_options=0, commands=[cmd_class]) return if (hasattr(cmd_class, 'help_options') and - type (cmd_class.help_options) is ListType): + type(cmd_class.help_options) is ListType): help_option_found=0 for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): @@ -534,13 +534,13 @@ def _show_help (self, from distutils.cmd import Command if global_options: - parser.set_option_table (self.global_options) - parser.print_help ("Global options:") + parser.set_option_table(self.global_options) + parser.print_help("Global options:") print if display_options: - parser.set_option_table (self.display_options) - parser.print_help ( + parser.set_option_table(self.display_options) + parser.print_help( "Information display options (just display " + "information, ignore any commands)") print @@ -549,14 +549,14 @@ def _show_help (self, if type(command) is ClassType and issubclass(klass, Command): klass = command else: - klass = self.get_command_class (command) + klass = self.get_command_class(command) if (hasattr(klass, 'help_options') and - type (klass.help_options) is ListType): - parser.set_option_table (klass.user_options + - fix_help_options(klass.help_options)) + type(klass.help_options) is ListType): + parser.set_option_table(klass.user_options + + fix_help_options(klass.help_options)) else: - parser.set_option_table (klass.user_options) - parser.print_help ("Options for '%s' command:" % klass.__name__) + parser.set_option_table(klass.user_options) + parser.print_help("Options for '%s' command:" % klass.__name__) print print gen_usage(self.script_name) @@ -577,7 +577,7 @@ def handle_display_options (self, option_order): # processing now (ie. if they ran "setup --help-commands foo bar", # we ignore "foo bar"). if self.help_commands: - self.print_commands () + self.print_commands() print print gen_usage(self.script_name) return 1 @@ -608,9 +608,9 @@ def print_command_list (self, commands, header, max_length): print header + ":" for cmd in commands: - klass = self.cmdclass.get (cmd) + klass = self.cmdclass.get(cmd) if not klass: - klass = self.get_command_class (cmd) + klass = self.get_command_class(cmd) try: description = klass.description except AttributeError: @@ -639,21 +639,21 @@ def print_commands (self): extra_commands = [] for cmd in self.cmdclass.keys(): if not is_std.get(cmd): - extra_commands.append (cmd) + extra_commands.append(cmd) max_length = 0 for cmd in (std_commands + extra_commands): - if len (cmd) > max_length: - max_length = len (cmd) + if len(cmd) > max_length: + max_length = len(cmd) - self.print_command_list (std_commands, - "Standard commands", - max_length) + self.print_command_list(std_commands, + "Standard commands", + max_length) if extra_commands: print - self.print_command_list (extra_commands, - "Extra commands", - max_length) + self.print_command_list(extra_commands, + "Extra commands", + max_length) # print_commands () @@ -822,10 +822,10 @@ def announce (self, msg, level=1): def run_commands (self): """Run each command that was seen on the setup script command line. Uses the list of commands found and cache of command objects - created by 'get_command_obj()'.""" - + created by 'get_command_obj()'. + """ for cmd in self.commands: - self.run_command (cmd) + self.run_command(cmd) # -- Methods that operate on its Commands -------------------------- @@ -838,28 +838,27 @@ def run_command (self, command): doesn't even have a command object yet, create one. Then invoke 'run()' on that command object (or an existing one). """ - # Already been here, done that? then return silently. - if self.have_run.get (command): + if self.have_run.get(command): return - self.announce ("running " + command) - cmd_obj = self.get_command_obj (command) - cmd_obj.ensure_finalized () - cmd_obj.run () + self.announce("running " + command) + cmd_obj = self.get_command_obj(command) + cmd_obj.ensure_finalized() + cmd_obj.run() self.have_run[command] = 1 # -- Distribution query methods ------------------------------------ def has_pure_modules (self): - return len (self.packages or self.py_modules or []) > 0 + return len(self.packages or self.py_modules or []) > 0 def has_ext_modules (self): - return self.ext_modules and len (self.ext_modules) > 0 + return self.ext_modules and len(self.ext_modules) > 0 def has_c_libraries (self): - return self.libraries and len (self.libraries) > 0 + return self.libraries and len(self.libraries) > 0 def has_modules (self): return self.has_pure_modules() or self.has_ext_modules() @@ -890,7 +889,8 @@ def is_pure (self): class DistributionMetadata: """Dummy class to hold the distribution meta-data: name, version, - author, and so forth.""" + author, and so forth. + """ def __init__ (self): self.name = None @@ -963,5 +963,5 @@ def fix_help_options (options): if __name__ == "__main__": - dist = Distribution () + dist = Distribution() print "ok" From cb2e23a951132584f35e3f5ab94e42034b4c4e28 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 01:56:15 +0000 Subject: [PATCH 0631/8469] Standardize whitespace in function calls. --- core.py | 6 +-- unixccompiler.py | 104 +++++++++++++++++++++++------------------------ util.py | 24 +++++------ version.py | 50 +++++++++++------------ 4 files changed, 92 insertions(+), 92 deletions(-) diff --git a/core.py b/core.py index 5dfe2db839..2aab7c4dd3 100644 --- a/core.py +++ b/core.py @@ -84,7 +84,7 @@ class found in 'cmdclass' is used in place of the default, which is # Determine the distribution class -- either caller-supplied or # our Distribution (see below). - klass = attrs.get ('distclass') + klass = attrs.get('distclass') if klass: del attrs['distclass'] else: @@ -98,7 +98,7 @@ class found in 'cmdclass' is used in place of the default, which is # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it try: - _setup_distribution = dist = klass (attrs) + _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: raise SystemExit, "error in setup script: %s" % msg @@ -135,7 +135,7 @@ class found in 'cmdclass' is used in place of the default, which is # And finally, run all the commands found on the command line. if ok: try: - dist.run_commands () + dist.run_commands() except KeyboardInterrupt: raise SystemExit, "interrupted" except (IOError, os.error), exc: diff --git a/unixccompiler.py b/unixccompiler.py index 9339850102..ff0341a5ce 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -91,8 +91,8 @@ def preprocess (self, extra_postargs=None): (_, macros, include_dirs) = \ - self._fix_compile_args (None, macros, include_dirs) - pp_opts = gen_preprocess_options (macros, include_dirs) + self._fix_compile_args(None, macros, include_dirs) + pp_opts = gen_preprocess_options(macros, include_dirs) pp_args = self.preprocessor + pp_opts if output_file: pp_args.extend(['-o', output_file]) @@ -108,7 +108,7 @@ def preprocess (self, if output_file: self.mkpath(os.path.dirname(output_file)) try: - self.spawn (pp_args) + self.spawn(pp_args) except DistutilsExecError, msg: raise CompileError, msg @@ -123,11 +123,11 @@ def compile (self, extra_postargs=None): (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile (sources, output_dir) + self._fix_compile_args(output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile(sources, output_dir) # Figure out the options for the compiler command line. - pp_opts = gen_preprocess_options (macros, include_dirs) + pp_opts = gen_preprocess_options(macros, include_dirs) cc_args = pp_opts + ['-c'] if debug: cc_args[:0] = ['-g'] @@ -138,16 +138,16 @@ def compile (self, # Compile all source files that weren't eliminated by # '_prep_compile()'. - for i in range (len (sources)): + for i in range(len(sources)): src = sources[i] ; obj = objects[i] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + self.announce("skipping %s (%s up-to-date)" % (src, obj)) else: - self.mkpath (os.path.dirname (obj)) + self.mkpath(os.path.dirname(obj)) try: - self.spawn (self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) + self.spawn(self.compiler_so + cc_args + + [src, '-o', obj] + + extra_postargs) except DistutilsExecError, msg: raise CompileError, msg @@ -163,16 +163,16 @@ def create_static_lib (self, output_dir=None, debug=0): - (objects, output_dir) = self._fix_object_args (objects, output_dir) + (objects, output_dir) = self._fix_object_args(objects, output_dir) output_filename = \ - self.library_filename (output_libname, output_dir=output_dir) + self.library_filename(output_libname, output_dir=output_dir) - if self._need_link (objects, output_filename): - self.mkpath (os.path.dirname (output_filename)) - self.spawn (self.archiver + - [output_filename] + - objects + self.objects) + if self._need_link(objects, output_filename): + self.mkpath(os.path.dirname(output_filename)) + self.spawn(self.archiver + + [output_filename] + + objects + self.objects) # Not many Unices required ranlib anymore -- SunOS 4.x is, I # think the only major Unix that does. Maybe we need some @@ -181,11 +181,11 @@ def create_static_lib (self, # it for us, hence the check for leading colon. if self.ranlib: try: - self.spawn (self.ranlib + [output_filename]) + self.spawn(self.ranlib + [output_filename]) except DistutilsExecError, msg: raise LibError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + self.announce("skipping %s (up-to-date)" % output_filename) # create_static_lib () @@ -203,9 +203,9 @@ def link_shared_lib (self, extra_postargs=None, build_temp=None): - self.link_shared_object ( + self.link_shared_object( objects, - self.library_filename (output_libname, lib_type='shared'), + self.library_filename(output_libname, lib_type='shared'), output_dir, libraries, library_dirs, @@ -230,19 +230,19 @@ def link_shared_object (self, extra_postargs=None, build_temp=None): - (objects, output_dir) = self._fix_object_args (objects, output_dir) + (objects, output_dir) = self._fix_object_args(objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) - lib_opts = gen_lib_options (self, - library_dirs, runtime_library_dirs, - libraries) - if type (output_dir) not in (StringType, NoneType): + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) + if type(output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) + output_filename = os.path.join(output_dir, output_filename) - if self._need_link (objects, output_filename): + if self._need_link(objects, output_filename): ld_args = (objects + self.objects + lib_opts + ['-o', output_filename]) if debug: @@ -250,14 +250,14 @@ def link_shared_object (self, if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: - ld_args.extend (extra_postargs) - self.mkpath (os.path.dirname (output_filename)) + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) try: - self.spawn (self.linker_so + ld_args) + self.spawn(self.linker_so + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + self.announce("skipping %s (up-to-date)" % output_filename) # link_shared_object () @@ -273,32 +273,32 @@ def link_executable (self, extra_preargs=None, extra_postargs=None): - (objects, output_dir) = self._fix_object_args (objects, output_dir) + (objects, output_dir) = self._fix_object_args(objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) - lib_opts = gen_lib_options (self, - library_dirs, runtime_library_dirs, - libraries) + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) output_filename = output_progname # Unix-ism! if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) + output_filename = os.path.join(output_dir, output_filename) - if self._need_link (objects, output_filename): + if self._need_link(objects, output_filename): ld_args = objects + self.objects + lib_opts + ['-o', output_filename] if debug: ld_args[:0] = ['-g'] if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: - ld_args.extend (extra_postargs) - self.mkpath (os.path.dirname (output_filename)) + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) try: - self.spawn (self.linker_exe + ld_args) + self.spawn(self.linker_exe + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + self.announce("skipping %s (up-to-date)" % output_filename) # link_executable () @@ -320,18 +320,18 @@ def library_option (self, lib): def find_library_file (self, dirs, lib, debug=0): for dir in dirs: - shared = os.path.join ( - dir, self.library_filename (lib, lib_type='shared')) - static = os.path.join ( - dir, self.library_filename (lib, lib_type='static')) + shared = os.path.join( + dir, self.library_filename(lib, lib_type='shared')) + static = os.path.join( + dir, self.library_filename(lib, lib_type='static')) # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm # ignoring even GCC's "-static" option. So sue me. - if os.path.exists (shared): + if os.path.exists(shared): return shared - elif os.path.exists (static): + elif os.path.exists(static): return static else: diff --git a/util.py b/util.py index 367985aceb..d52c69b46f 100644 --- a/util.py +++ b/util.py @@ -88,16 +88,16 @@ def change_root (new_root, pathname): two, which is tricky on DOS/Windows and Mac OS. """ if os.name == 'posix': - if not os.path.isabs (pathname): - return os.path.join (new_root, pathname) + if not os.path.isabs(pathname): + return os.path.join(new_root, pathname) else: - return os.path.join (new_root, pathname[1:]) + return os.path.join(new_root, pathname[1:]) elif os.name == 'nt': - (drive, path) = os.path.splitdrive (pathname) + (drive, path) = os.path.splitdrive(pathname) if path[0] == '\\': path = path[1:] - return os.path.join (new_root, path) + return os.path.join(new_root, path) elif os.name == 'mac': if not os.path.isabs(pathname): @@ -129,10 +129,10 @@ def check_environ (): if os.name == 'posix' and not os.environ.has_key('HOME'): import pwd - os.environ['HOME'] = pwd.getpwuid (os.getuid())[5] + os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] if not os.environ.has_key('PLAT'): - os.environ['PLAT'] = get_platform () + os.environ['PLAT'] = get_platform() _environ_checked = 1 @@ -147,15 +147,15 @@ def subst_vars (str, local_vars): '_check_environ()'. Raise ValueError for any variables not found in either 'local_vars' or 'os.environ'.""" - check_environ () + check_environ() def _subst (match, local_vars=local_vars): var_name = match.group(1) - if local_vars.has_key (var_name): - return str (local_vars[var_name]) + if local_vars.has_key(var_name): + return str(local_vars[var_name]) else: return os.environ[var_name] - return re.sub (r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) + return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) # subst_vars () @@ -169,7 +169,7 @@ def grok_environment_error (exc, prefix="error: "): prefixed with 'prefix'. """ # check for Python 1.5.2-style {IO,OS}Error exception objects - if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): + if hasattr(exc, 'filename') and hasattr(exc, 'strerror'): if exc.filename: error = prefix + "%s: %s" % (exc.filename, exc.strerror) else: diff --git a/version.py b/version.py index 8b9ef10670..9d3d172429 100644 --- a/version.py +++ b/version.py @@ -39,10 +39,10 @@ class Version: def __init__ (self, vstring=None): if vstring: - self.parse (vstring) + self.parse(vstring) def __repr__ (self): - return "%s ('%s')" % (self.__class__.__name__, str (self)) + return "%s ('%s')" % (self.__class__.__name__, str(self)) # Interface for version-number classes -- must be implemented @@ -99,25 +99,25 @@ class StrictVersion (Version): in the distutils documentation. """ - version_re = re.compile (r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', - re.VERBOSE) + version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', + re.VERBOSE) def parse (self, vstring): - match = self.version_re.match (vstring) + match = self.version_re.match(vstring) if not match: raise ValueError, "invalid version number '%s'" % vstring (major, minor, patch, prerelease, prerelease_num) = \ - match.group (1, 2, 4, 5, 6) + match.group(1, 2, 4, 5, 6) if patch: - self.version = tuple (map (string.atoi, [major, minor, patch])) + self.version = tuple(map(string.atoi, [major, minor, patch])) else: - self.version = tuple (map (string.atoi, [major, minor]) + [0]) + self.version = tuple(map(string.atoi, [major, minor]) + [0]) if prerelease: - self.prerelease = (prerelease[0], string.atoi (prerelease_num)) + self.prerelease = (prerelease[0], string.atoi(prerelease_num)) else: self.prerelease = None @@ -125,21 +125,21 @@ def parse (self, vstring): def __str__ (self): if self.version[2] == 0: - vstring = string.join (map (str, self.version[0:2]), '.') + vstring = string.join(map(str, self.version[0:2]), '.') else: - vstring = string.join (map (str, self.version), '.') + vstring = string.join(map(str, self.version), '.') if self.prerelease: - vstring = vstring + self.prerelease[0] + str (self.prerelease[1]) + vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) return vstring def __cmp__ (self, other): - if isinstance (other, StringType): - other = StrictVersion (other) + if isinstance(other, StringType): + other = StrictVersion(other) - compare = cmp (self.version, other.version) + compare = cmp(self.version, other.version) if (compare == 0): # have to compare prerelease # case 1: neither has prerelease; they're equal @@ -154,7 +154,7 @@ def __cmp__ (self, other): elif (not self.prerelease and other.prerelease): return 1 elif (self.prerelease and other.prerelease): - return cmp (self.prerelease, other.prerelease) + return cmp(self.prerelease, other.prerelease) else: # numeric versions don't match -- return compare # prerelease stuff doesn't matter @@ -264,7 +264,7 @@ class LooseVersion (Version): def __init__ (self, vstring=None): if vstring: - self.parse (vstring) + self.parse(vstring) def parse (self, vstring): @@ -272,11 +272,11 @@ def parse (self, vstring): # from the parsed tuple -- so I just store the string here for # use by __str__ self.vstring = vstring - components = filter (lambda x: x and x != '.', - self.component_re.split (vstring)) - for i in range (len (components)): + components = filter(lambda x: x and x != '.', + self.component_re.split(vstring)) + for i in range(len(components)): try: - components[i] = int (components[i]) + components[i] = int(components[i]) except ValueError: pass @@ -288,14 +288,14 @@ def __str__ (self): def __repr__ (self): - return "LooseVersion ('%s')" % str (self) + return "LooseVersion ('%s')" % str(self) def __cmp__ (self, other): - if isinstance (other, StringType): - other = LooseVersion (other) + if isinstance(other, StringType): + other = LooseVersion(other) - return cmp (self.version, other.version) + return cmp(self.version, other.version) # end class LooseVersion From f5d5642c6b067bcbf6f82020cc1fda18dbb74511 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 02:00:51 +0000 Subject: [PATCH 0632/8469] Reformat docstrings. Standardize whitespace in function calls. --- spawn.py | 79 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/spawn.py b/spawn.py index 651124d682..1eed7a8abc 100644 --- a/spawn.py +++ b/spawn.py @@ -3,7 +3,8 @@ Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given -executable name. """ +executable name. +""" # created 1999/07/24, Greg Ward @@ -19,24 +20,24 @@ def spawn (cmd, dry_run=0): """Run another program, specified as a command list 'cmd', in a new - process. 'cmd' is just the argument list for the new process, ie. - cmd[0] is the program to run and cmd[1:] are the rest of its - arguments. There is no way to run a program with a name different - from that of its executable. - - If 'search_path' is true (the default), the system's executable - search path will be used to find the program; otherwise, cmd[0] must - be the exact path to the executable. If 'verbose' is true, a - one-line summary of the command will be printed before it is run. - If 'dry_run' is true, the command will not actually be run. - - Raise DistutilsExecError if running the program fails in any way; - just return on success.""" - + process. 'cmd' is just the argument list for the new process, ie. + cmd[0] is the program to run and cmd[1:] are the rest of its arguments. + There is no way to run a program with a name different from that of its + executable. + + If 'search_path' is true (the default), the system's executable search + path will be used to find the program; otherwise, cmd[0] must be the + exact path to the executable. If 'verbose' is true, a one-line summary + of the command will be printed before it is run. If 'dry_run' is true, + the command will not actually be run. + + Raise DistutilsExecError if running the program fails in any way; just + return on success. + """ if os.name == 'posix': - _spawn_posix (cmd, search_path, verbose, dry_run) + _spawn_posix(cmd, search_path, verbose, dry_run) elif os.name == 'nt': - _spawn_nt (cmd, search_path, verbose, dry_run) + _spawn_nt(cmd, search_path, verbose, dry_run) else: raise DistutilsPlatformError, \ "don't know how to spawn programs on platform '%s'" % os.name @@ -45,8 +46,10 @@ def spawn (cmd, def _nt_quote_args (args): - """Obscure quoting command line arguments on NT. - Simply quote every argument which contains blanks.""" + """Quote command-line arguments for DOS/Windows conventions: just + wraps every argument which contains blanks in double quotes, and + returns a new argument list. + """ # XXX this doesn't seem very robust to me -- but if the Windows guys # say it'll work, I guess I'll have to accept it. (What if an arg @@ -54,8 +57,8 @@ def _nt_quote_args (args): # have to be escaped? Is there an escaping mechanism other than # quoting?) - for i in range (len (args)): - if string.find (args[i], ' ') != -1: + for i in range(len(args)): + if string.find(args[i], ' ') != -1: args[i] = '"%s"' % args[i] return args @@ -65,16 +68,16 @@ def _spawn_nt (cmd, dry_run=0): executable = cmd[0] - cmd = _nt_quote_args (cmd) + cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable if verbose: - print string.join ([executable] + cmd[1:], ' ') + print string.join([executable] + cmd[1:], ' ') if not dry_run: # spawn for NT requires a full path to the .exe try: - rc = os.spawnv (os.P_WAIT, executable, cmd) + rc = os.spawnv(os.P_WAIT, executable, cmd) except OSError, exc: # this seems to happen when the command isn't found raise DistutilsExecError, \ @@ -91,39 +94,39 @@ def _spawn_posix (cmd, dry_run=0): if verbose: - print string.join (cmd, ' ') + print string.join(cmd, ' ') if dry_run: return exec_fn = search_path and os.execvp or os.execv - pid = os.fork () + pid = os.fork() if pid == 0: # in the child try: #print "cmd[0] =", cmd[0] #print "cmd =", cmd - exec_fn (cmd[0], cmd) + exec_fn(cmd[0], cmd) except OSError, e: - sys.stderr.write ("unable to execute %s: %s\n" % - (cmd[0], e.strerror)) - os._exit (1) + sys.stderr.write("unable to execute %s: %s\n" % + (cmd[0], e.strerror)) + os._exit(1) - sys.stderr.write ("unable to execute %s for unknown reasons" % cmd[0]) - os._exit (1) + sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0]) + os._exit(1) else: # in the parent # Loop until the child either exits or is terminated by a signal # (ie. keep waiting if it's merely stopped) while 1: - (pid, status) = os.waitpid (pid, 0) - if os.WIFSIGNALED (status): + (pid, status) = os.waitpid(pid, 0) + if os.WIFSIGNALED(status): raise DistutilsExecError, \ "command '%s' terminated by signal %d" % \ - (cmd[0], os.WTERMSIG (status)) + (cmd[0], os.WTERMSIG(status)) - elif os.WIFEXITED (status): - exit_status = os.WEXITSTATUS (status) + elif os.WIFEXITED(status): + exit_status = os.WEXITSTATUS(status) if exit_status == 0: return # hey, it succeeded! else: @@ -131,7 +134,7 @@ def _spawn_posix (cmd, "command '%s' failed with exit status %d" % \ (cmd[0], exit_status) - elif os.WIFSTOPPED (status): + elif os.WIFSTOPPED(status): continue else: From 310173b2ba5b272a6ef87f9057c36381712d42c5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 02:03:34 +0000 Subject: [PATCH 0633/8469] Whitespace fix. --- file_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file_util.py b/file_util.py index 0e85a74b69..d05b456161 100644 --- a/file_util.py +++ b/file_util.py @@ -1,6 +1,7 @@ """distutils.file_util -Utility functions for operating on single files.""" +Utility functions for operating on single files. +""" # created 2000/04/03, Greg Ward (extracted from util.py) From b7ed5395cfb4acb46268fe41f6f8188e2f3da77d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 02:12:31 +0000 Subject: [PATCH 0634/8469] Standardize whitespace in function calls. --- cmd.py | 54 ++++++++++++------------ dir_util.py | 60 +++++++++++++------------- fancy_getopt.py | 109 ++++++++++++++++++++++++------------------------ filelist.py | 69 +++++++++++++++--------------- 4 files changed, 145 insertions(+), 147 deletions(-) diff --git a/cmd.py b/cmd.py index 7866d1b607..ce44829498 100644 --- a/cmd.py +++ b/cmd.py @@ -59,13 +59,13 @@ def __init__ (self, dist): # late import because of mutual dependence between these classes from distutils.dist import Distribution - if not isinstance (dist, Distribution): + if not isinstance(dist, Distribution): raise TypeError, "dist must be a Distribution instance" if self.__class__ is Command: raise RuntimeError, "Command is an abstract class" self.distribution = dist - self.initialize_options () + self.initialize_options() # Per-command versions of the global flags, so that the user can # customize Distutils' behaviour command-by-command and let some @@ -98,9 +98,9 @@ def __init__ (self, dist): def __getattr__ (self, attr): if attr in ('verbose', 'dry_run'): - myval = getattr (self, "_" + attr) + myval = getattr(self, "_" + attr) if myval is None: - return getattr (self.distribution, attr) + return getattr(self.distribution, attr) else: return myval else: @@ -109,7 +109,7 @@ def __getattr__ (self, attr): def ensure_finalized (self): if not self.finalized: - self.finalize_options () + self.finalize_options() self.finalized = 1 @@ -273,7 +273,7 @@ def ensure_dirname (self, option): # -- Convenience methods for commands ------------------------------ def get_command_name (self): - if hasattr (self, 'command_name'): + if hasattr(self, 'command_name'): return self.command_name else: return self.__class__.__name__ @@ -296,12 +296,12 @@ def set_undefined_options (self, src_cmd, *option_pairs): # Option_pairs: list of (src_option, dst_option) tuples - src_cmd_obj = self.distribution.get_command_obj (src_cmd) - src_cmd_obj.ensure_finalized () + src_cmd_obj = self.distribution.get_command_obj(src_cmd) + src_cmd_obj.ensure_finalized() for (src_option, dst_option) in option_pairs: - if getattr (self, dst_option) is None: - setattr (self, dst_option, - getattr (src_cmd_obj, src_option)) + if getattr(self, dst_option) is None: + setattr(self, dst_option, + getattr(src_cmd_obj, src_option)) def get_finalized_command (self, command, create=1): @@ -310,8 +310,8 @@ def get_finalized_command (self, command, create=1): 'command', call its 'ensure_finalized()' method, and return the finalized command object. """ - cmd_obj = self.distribution.get_command_obj (command, create) - cmd_obj.ensure_finalized () + cmd_obj = self.distribution.get_command_obj(command, create) + cmd_obj.ensure_finalized() return cmd_obj # XXX rename to 'get_reinitialized_command()'? (should do the @@ -325,7 +325,7 @@ def run_command (self, command): Distribution, which creates and finalizes the command object if necessary and then invokes its 'run()' method. """ - self.distribution.run_command (command) + self.distribution.run_command(command) def get_sub_commands (self): @@ -345,8 +345,8 @@ def get_sub_commands (self): # -- External world manipulation ----------------------------------- def warn (self, msg): - sys.stderr.write ("warning: %s: %s\n" % - (self.get_command_name(), msg)) + sys.stderr.write("warning: %s: %s\n" % + (self.get_command_name(), msg)) def execute (self, func, args, msg=None, level=1): @@ -389,17 +389,17 @@ def copy_tree (self, infile, outfile, def move_file (self, src, dst, level=1): """Move a file respecting verbose and dry-run flags.""" - return file_util.move_file (src, dst, - self.verbose >= level, - self.dry_run) + return file_util.move_file(src, dst, + self.verbose >= level, + self.dry_run) def spawn (self, cmd, search_path=1, level=1): """Spawn an external command respecting verbose and dry-run flags.""" from distutils.spawn import spawn - spawn (cmd, search_path, - self.verbose >= level, - self.dry_run) + spawn(cmd, search_path, + self.verbose >= level, + self.dry_run) def make_archive (self, base_name, format, @@ -421,15 +421,15 @@ def make_file (self, infiles, outfile, func, args, """ if exec_msg is None: exec_msg = "generating %s from %s" % \ - (outfile, string.join (infiles, ', ')) + (outfile, string.join(infiles, ', ')) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile # Allow 'infiles' to be a single string - if type (infiles) is StringType: + if type(infiles) is StringType: infiles = (infiles,) - elif type (infiles) not in (ListType, TupleType): + elif type(infiles) not in (ListType, TupleType): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" @@ -437,11 +437,11 @@ def make_file (self, infiles, outfile, func, args, # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group (infiles, outfile): - self.execute (func, args, exec_msg, level) + self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: - self.announce (skip_msg, level) + self.announce(skip_msg, level) # make_file () diff --git a/dir_util.py b/dir_util.py index 85f8a18d2c..768cb4ebe7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -40,21 +40,21 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # the creation of the whole path? (quite easy to do the latter since # we're not using a recursive algorithm) - name = os.path.normpath (name) + name = os.path.normpath(name) created_dirs = [] - if os.path.isdir (name) or name == '': + if os.path.isdir(name) or name == '': return created_dirs - if _path_created.get (name): + if _path_created.get(name): return created_dirs - (head, tail) = os.path.split (name) + (head, tail) = os.path.split(name) tails = [tail] # stack of lone dirs to create - while head and tail and not os.path.isdir (head): + while head and tail and not os.path.isdir(head): #print "splitting '%s': " % head, - (head, tail) = os.path.split (head) + (head, tail) = os.path.split(head) #print "to ('%s','%s')" % (head, tail) - tails.insert (0, tail) # push next higher dir onto stack + tails.insert(0, tail) # push next higher dir onto stack #print "stack of tails:", tails @@ -63,8 +63,8 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # that does *not* exist) for d in tails: #print "head = %s, d = %s: " % (head, d), - head = os.path.join (head, d) - if _path_created.get (head): + head = os.path.join(head, d) + if _path_created.get(head): continue if verbose: @@ -72,7 +72,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): if not dry_run: try: - os.mkdir (head) + os.mkdir(head) created_dirs.append(head) except OSError, exc: raise DistutilsFileError, \ @@ -97,13 +97,13 @@ def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): # First get the list of directories to create need_dir = {} for file in files: - need_dir[os.path.join (base_dir, os.path.dirname (file))] = 1 + need_dir[os.path.join(base_dir, os.path.dirname(file))] = 1 need_dirs = need_dir.keys() need_dirs.sort() # Now create them for dir in need_dirs: - mkpath (dir, mode, verbose, dry_run) + mkpath(dir, mode, verbose, dry_run) # create_tree () @@ -136,11 +136,11 @@ def copy_tree (src, dst, from distutils.file_util import copy_file - if not dry_run and not os.path.isdir (src): + if not dry_run and not os.path.isdir(src): raise DistutilsFileError, \ "cannot copy tree '%s': not a directory" % src try: - names = os.listdir (src) + names = os.listdir(src) except os.error, (errno, errstr): if dry_run: names = [] @@ -149,32 +149,32 @@ def copy_tree (src, dst, "error listing files in '%s': %s" % (src, errstr) if not dry_run: - mkpath (dst, verbose=verbose) + mkpath(dst, verbose=verbose) outputs = [] for n in names: - src_name = os.path.join (src, n) - dst_name = os.path.join (dst, n) + src_name = os.path.join(src, n) + dst_name = os.path.join(dst, n) - if preserve_symlinks and os.path.islink (src_name): - link_dest = os.readlink (src_name) + if preserve_symlinks and os.path.islink(src_name): + link_dest = os.readlink(src_name) if verbose: print "linking %s -> %s" % (dst_name, link_dest) if not dry_run: - os.symlink (link_dest, dst_name) - outputs.append (dst_name) + os.symlink(link_dest, dst_name) + outputs.append(dst_name) - elif os.path.isdir (src_name): - outputs.extend ( - copy_tree (src_name, dst_name, - preserve_mode, preserve_times, preserve_symlinks, - update, verbose, dry_run)) + elif os.path.isdir(src_name): + outputs.extend( + copy_tree(src_name, dst_name, + preserve_mode, preserve_times, preserve_symlinks, + update, verbose, dry_run)) else: - copy_file (src_name, dst_name, - preserve_mode, preserve_times, - update, None, verbose, dry_run) - outputs.append (dst_name) + copy_file(src_name, dst_name, + preserve_mode, preserve_times, + update, None, verbose, dry_run) + outputs.append(dst_name) return outputs diff --git a/fancy_getopt.py b/fancy_getopt.py index f93520019f..6f8b8c06f1 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -22,14 +22,14 @@ # utilities, we use '-' in place of '_'. (The spirit of LISP lives on!) # The similarities to NAME are again not a coincidence... longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)' -longopt_re = re.compile (r'^%s$' % longopt_pat) +longopt_re = re.compile(r'^%s$' % longopt_pat) # For recognizing "negative alias" options, eg. "quiet=!verbose" -neg_alias_re = re.compile ("^(%s)=!(%s)$" % (longopt_pat, longopt_pat)) +neg_alias_re = re.compile("^(%s)=!(%s)$" % (longopt_pat, longopt_pat)) # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = string.maketrans ('-', '_') +longopt_xlate = string.maketrans('-', '_') # This records (option, value) pairs in the order seen on the command line; # it's close to what getopt.getopt() returns, but with short options @@ -107,7 +107,7 @@ def add_option (self, long_option, short_option=None, help_string=None): "option conflict: already an option '%s'" % long_option else: option = (long_option, short_option, help_string) - self.option_table.append (option) + self.option_table.append(option) self.option_index[long_option] = option @@ -120,7 +120,7 @@ def get_attr_name (self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return string.translate (long_option, longopt_xlate) + return string.translate(long_option, longopt_xlate) def _check_alias_dict (self, aliases, what): @@ -137,7 +137,7 @@ def _check_alias_dict (self, aliases, what): def set_aliases (self, alias): """Set the aliases for this option parser.""" - self._check_alias_dict (alias, "alias") + self._check_alias_dict(alias, "alias") self.alias = alias def set_negative_aliases (self, negative_alias): @@ -145,15 +145,15 @@ def set_negative_aliases (self, negative_alias): 'negative_alias' should be a dictionary mapping option names to option names, both the key and value must already be defined in the option table.""" - self._check_alias_dict (negative_alias, "negative alias") + self._check_alias_dict(negative_alias, "negative alias") self.negative_alias = negative_alias def _grok_option_table (self): - """Populate the various data structures that keep tabs on - the option table. Called by 'getopt()' before it can do - anything worthwhile.""" - + """Populate the various data structures that keep tabs on the + option table. Called by 'getopt()' before it can do anything + worthwhile. + """ self.long_opts = [] self.short_opts = [] self.short2long.clear() @@ -163,7 +163,7 @@ def _grok_option_table (self): (long, short, help) = option except ValueError: raise DistutilsGetoptError, \ - "invalid option tuple " + str (option) + "invalid option tuple " + str(option) # Type- and value-check the option names if type(long) is not StringType or len(long) < 2: @@ -172,12 +172,12 @@ def _grok_option_table (self): "must be a string of length >= 2") % long if (not ((short is None) or - (type (short) is StringType and len (short) == 1))): + (type(short) is StringType and len(short) == 1))): raise DistutilsGetoptError, \ ("invalid short option '%s': " "must a single character or None") % short - self.long_opts.append (long) + self.long_opts.append(long) if long[-1] == '=': # option takes an argument? if short: short = short + ':' @@ -216,14 +216,14 @@ def _grok_option_table (self): # later translate it to an attribute name on some object. Have # to do this a bit late to make sure we've removed any trailing # '='. - if not longopt_re.match (long): + if not longopt_re.match(long): raise DistutilsGetoptError, \ ("invalid long option name '%s' " + "(must be letters, numbers, hyphens only") % long - self.attr_name[long] = self.get_attr_name (long) + self.attr_name[long] = self.get_attr_name(long) if short: - self.short_opts.append (short) + self.short_opts.append(short) self.short2long[short[0]] = long # for option_table @@ -239,8 +239,8 @@ def getopt (self, args=None, object=None): (args, object). If 'object' is supplied, it is modified in place and 'getopt()' just returns 'args'; in both cases, the returned 'args' is a modified copy of the passed-in 'args' list, which is - left untouched.""" - + left untouched. + """ if args is None: args = sys.argv[1:] if object is None: @@ -251,17 +251,17 @@ def getopt (self, args=None, object=None): self._grok_option_table() - short_opts = string.join (self.short_opts) + short_opts = string.join(self.short_opts) try: - (opts, args) = getopt.getopt (args, short_opts, self.long_opts) + (opts, args) = getopt.getopt(args, short_opts, self.long_opts) except getopt.error, msg: raise DistutilsArgError, msg for (opt, val) in opts: - if len (opt) == 2 and opt[0] == '-': # it's a short option + if len(opt) == 2 and opt[0] == '-': # it's a short option opt = self.short2long[opt[1]] - elif len (opt) > 2 and opt[0:2] == '--': + elif len(opt) > 2 and opt[0:2] == '--': opt = opt[2:] else: @@ -277,7 +277,7 @@ def getopt (self, args=None, object=None): raise DistutilsInternalError, \ "this can't happen: bad option value '%s'" % value - alias = self.negative_alias.get (opt) + alias = self.negative_alias.get(opt) if alias: opt = alias val = 0 @@ -285,8 +285,8 @@ def getopt (self, args=None, object=None): val = 1 attr = self.attr_name[opt] - setattr (object, attr, val) - self.option_order.append ((opt, val)) + setattr(object, attr, val) + self.option_order.append((opt, val)) # for opts @@ -301,8 +301,8 @@ def getopt (self, args=None, object=None): def get_option_order (self): """Returns the list of (option, value) tuples processed by the previous run of 'getopt()'. Raises RuntimeError if - 'getopt()' hasn't been called yet.""" - + 'getopt()' hasn't been called yet. + """ if self.option_order is None: raise RuntimeError, "'getopt()' hasn't been called yet" else: @@ -311,8 +311,8 @@ def get_option_order (self): def generate_help (self, header=None): """Generate help text (a list of strings, one per suggested line of - output) from the option table for this FancyGetopt object.""" - + output) from the option table for this FancyGetopt object. + """ # Blithely assume the option table is good: probably wouldn't call # 'generate_help()' unless you've already called 'getopt()'. @@ -321,7 +321,7 @@ def generate_help (self, header=None): for option in self.option_table: long = option[0] short = option[1] - l = len (long) + l = len(long) if long[-1] == '=': l = l - 1 if short is not None: @@ -363,29 +363,29 @@ def generate_help (self, header=None): for (long,short,help) in self.option_table: - text = wrap_text (help, text_width) + text = wrap_text(help, text_width) if long[-1] == '=': long = long[0:-1] # Case 1: no short option at all (makes life easy) if short is None: if text: - lines.append (" --%-*s %s" % (max_opt, long, text[0])) + lines.append(" --%-*s %s" % (max_opt, long, text[0])) else: - lines.append (" --%-*s " % (max_opt, long)) + lines.append(" --%-*s " % (max_opt, long)) # Case 2: we have a short option, so we have to include it # just after the long option else: opt_names = "%s (-%s)" % (long, short) if text: - lines.append (" --%-*s %s" % - (max_opt, opt_names, text[0])) + lines.append(" --%-*s %s" % + (max_opt, opt_names, text[0])) else: - lines.append (" --%-*s" % opt_names) + lines.append(" --%-*s" % opt_names) for l in text[1:]: - lines.append (big_indent + l) + lines.append(big_indent + l) # for self.option_table @@ -396,20 +396,19 @@ def generate_help (self, header=None): def print_help (self, header=None, file=None): if file is None: file = sys.stdout - for line in self.generate_help (header): - file.write (line + "\n") - # print_help () + for line in self.generate_help(header): + file.write(line + "\n") # class FancyGetopt def fancy_getopt (options, negative_opt, object, args): - parser = FancyGetopt (options) - parser.set_negative_aliases (negative_opt) - return parser.getopt (args, object) + parser = FancyGetopt(options) + parser.set_negative_aliases(negative_opt) + return parser.getopt(args, object) -WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace)) +WS_TRANS = string.maketrans(string.whitespace, ' ' * len(string.whitespace)) def wrap_text (text, width): """wrap_text(text : string, width : int) -> [string] @@ -420,13 +419,13 @@ def wrap_text (text, width): if text is None: return [] - if len (text) <= width: + if len(text) <= width: return [text] - text = string.expandtabs (text) - text = string.translate (text, WS_TRANS) - chunks = re.split (r'( +|-+)', text) - chunks = filter (None, chunks) # ' - ' results in empty strings + text = string.expandtabs(text) + text = string.translate(text, WS_TRANS) + chunks = re.split(r'( +|-+)', text) + chunks = filter(None, chunks) # ' - ' results in empty strings lines = [] while chunks: @@ -435,9 +434,9 @@ def wrap_text (text, width): cur_len = 0 # length of current line while chunks: - l = len (chunks[0]) + l = len(chunks[0]) if cur_len + l <= width: # can squeeze (at least) this chunk in - cur_line.append (chunks[0]) + cur_line.append(chunks[0]) del chunks[0] cur_len = cur_len + l else: # this line is full @@ -452,7 +451,7 @@ def wrap_text (text, width): # chunk that's too big too fit on a line -- so we break # down and break it up at the line width if cur_len == 0: - cur_line.append (chunks[0][0:width]) + cur_line.append(chunks[0][0:width]) chunks[0] = chunks[0][width:] # all-whitespace chunks at the end of a line can be discarded @@ -463,7 +462,7 @@ def wrap_text (text, width): # and store this line in the list-of-all-lines -- as a single # string, of course! - lines.append (string.join (cur_line, '')) + lines.append(string.join(cur_line, '')) # while chunks @@ -501,5 +500,5 @@ def __init__ (self, options=[]): for w in (10, 20, 30, 40): print "width: %d" % w - print string.join (wrap_text (text, w), "\n") + print string.join(wrap_text(text, w), "\n") print diff --git a/filelist.py b/filelist.py index 84f36d2c4b..211b65f8d2 100644 --- a/filelist.py +++ b/filelist.py @@ -55,7 +55,7 @@ def findall (self, dir=os.curdir): # -- Fallback warning/debug functions ------------------------------ def __warn (self, msg): - sys.stderr.write ("warning: %s\n" % msg) + sys.stderr.write("warning: %s\n" % msg) def __debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the @@ -87,7 +87,7 @@ def sort (self): def remove_duplicates (self): # Assumes list has been sorted! - for i in range (len(self.files)-1, 0, -1): + for i in range(len(self.files)-1, 0, -1): if self.files[i] == self.files[i-1]: del self.files[i] @@ -95,21 +95,21 @@ def remove_duplicates (self): # -- "File template" methods --------------------------------------- def _parse_template_line (self, line): - words = string.split (line) + words = string.split(line) action = words[0] patterns = dir = dir_pattern = None if action in ('include', 'exclude', 'global-include', 'global-exclude'): - if len (words) < 2: + if len(words) < 2: raise DistutilsTemplateError, \ "'%s' expects ..." % action patterns = map(convert_path, words[1:]) elif action in ('recursive-include', 'recursive-exclude'): - if len (words) < 3: + if len(words) < 3: raise DistutilsTemplateError, \ "'%s' expects ..." % action @@ -117,7 +117,7 @@ def _parse_template_line (self, line): patterns = map(convert_path, words[2:]) elif action in ('graft', 'prune'): - if len (words) != 2: + if len(words) != 2: raise DistutilsTemplateError, \ "'%s' expects a single " % action @@ -146,13 +146,13 @@ def process_template_line (self, line): if action == 'include': self.debug_print("include " + string.join(patterns)) for pattern in patterns: - if not self.include_pattern (pattern, anchor=1): + if not self.include_pattern(pattern, anchor=1): self.warn("no files found matching '%s'" % pattern) elif action == 'exclude': self.debug_print("exclude " + string.join(patterns)) for pattern in patterns: - if not self.exclude_pattern (pattern, anchor=1): + if not self.exclude_pattern(pattern, anchor=1): self.warn( "no previously-included files found matching '%s'"% pattern) @@ -160,15 +160,15 @@ def process_template_line (self, line): elif action == 'global-include': self.debug_print("global-include " + string.join(patterns)) for pattern in patterns: - if not self.include_pattern (pattern, anchor=0): - self.warn (("no files found matching '%s' " + - "anywhere in distribution") % - pattern) + if not self.include_pattern(pattern, anchor=0): + self.warn(("no files found matching '%s' " + + "anywhere in distribution") % + pattern) elif action == 'global-exclude': self.debug_print("global-exclude " + string.join(patterns)) for pattern in patterns: - if not self.exclude_pattern (pattern, anchor=0): + if not self.exclude_pattern(pattern, anchor=0): self.warn(("no previously-included files matching '%s' " + "found anywhere in distribution") % pattern) @@ -177,8 +177,8 @@ def process_template_line (self, line): self.debug_print("recursive-include %s %s" % (dir, string.join(patterns))) for pattern in patterns: - if not self.include_pattern (pattern, prefix=dir): - self.warn (("no files found matching '%s' " + + if not self.include_pattern(pattern, prefix=dir): + self.warn(("no files found matching '%s' " + "under directory '%s'") % (pattern, dir)) @@ -190,11 +190,11 @@ def process_template_line (self, line): self.warn(("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir)) - + elif action == 'graft': self.debug_print("graft " + dir_pattern) if not self.include_pattern(None, prefix=dir_pattern): - self.warn ("no directories found matching '%s'" % dir_pattern) + self.warn("no directories found matching '%s'" % dir_pattern) elif action == 'prune': self.debug_print("prune " + dir_pattern) @@ -212,8 +212,7 @@ def process_template_line (self, line): # -- Filtering/selection methods ----------------------------------- def include_pattern (self, pattern, - anchor=1, prefix=None, is_regex=0): - + anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'self.files' that match 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not quite the same as implemented by the 'fnmatch' module: '*' @@ -239,7 +238,7 @@ def include_pattern (self, pattern, Return 1 if files are found. """ files_found = 0 - pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) + pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("include_pattern: applying regex r'%s'" % pattern_re.pattern) @@ -248,9 +247,9 @@ def include_pattern (self, pattern, self.findall() for name in self.allfiles: - if pattern_re.search (name): + if pattern_re.search(name): self.debug_print(" adding " + name) - self.files.append (name) + self.files.append(name) files_found = 1 return files_found @@ -267,11 +266,11 @@ def exclude_pattern (self, pattern, Return 1 if files are found. """ files_found = 0 - pattern_re = translate_pattern (pattern, anchor, prefix, is_regex) + pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern) - for i in range (len(self.files)-1, -1, -1): - if pattern_re.search (self.files[i]): + for i in range(len(self.files)-1, -1, -1): + if pattern_re.search(self.files[i]): self.debug_print(" removing " + self.files[i]) del self.files[i] files_found = 1 @@ -299,11 +298,11 @@ def findall (dir = os.curdir): while stack: dir = pop() - names = os.listdir (dir) + names = os.listdir(dir) for name in names: if dir != os.curdir: # avoid the dreaded "./" syndrome - fullname = os.path.join (dir, name) + fullname = os.path.join(dir, name) else: fullname = name @@ -311,9 +310,9 @@ def findall (dir = os.curdir): stat = os.stat(fullname) mode = stat[ST_MODE] if S_ISREG(mode): - list.append (fullname) + list.append(fullname) elif S_ISDIR(mode) and not S_ISLNK(mode): - push (fullname) + push(fullname) return list @@ -324,7 +323,7 @@ def glob_to_re (pattern): that '*' does not match "special characters" (which are platform-specific). """ - pattern_re = fnmatch.translate (pattern) + pattern_re = fnmatch.translate(pattern) # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, @@ -333,7 +332,7 @@ def glob_to_re (pattern): # character except the special characters. # XXX currently the "special characters" are just slash -- i.e. this is # Unix-only. - pattern_re = re.sub (r'(^|[^\\])\.', r'\1[^/]', pattern_re) + pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re) return pattern_re # glob_to_re () @@ -352,17 +351,17 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): return pattern if pattern: - pattern_re = glob_to_re (pattern) + pattern_re = glob_to_re(pattern) else: pattern_re = '' if prefix is not None: - prefix_re = (glob_to_re (prefix))[0:-1] # ditch trailing $ - pattern_re = "^" + os.path.join (prefix_re, ".*" + pattern_re) + prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ + pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re - return re.compile (pattern_re) + return re.compile(pattern_re) # translate_pattern () From 208764c9d80a704b06463dbadf392709af561b57 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 02:13:49 +0000 Subject: [PATCH 0635/8469] Reformat docstrings. Standardize whitespace in function calls. --- archive_util.py | 56 +++++++++++++++++++------------------- dep_util.py | 71 ++++++++++++++++++++++++------------------------- 2 files changed, 63 insertions(+), 64 deletions(-) diff --git a/archive_util.py b/archive_util.py index 26cd7fb2ec..61bc25ea0f 100644 --- a/archive_util.py +++ b/archive_util.py @@ -15,13 +15,13 @@ def make_tarball (base_name, base_dir, compress="gzip", verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under - 'base_dir'. 'compress' must be "gzip" (the default), "compress", - "bzip2", or None. Both "tar" and the compression utility named by - 'compress' must be on the default program search path, so this is - probably Unix-specific. The output tar file will be named 'base_dir' - + ".tar", possibly plus the appropriate compression extension (".gz", - ".bz2" or ".Z"). Return the output filename.""" - + 'base_dir'. 'compress' must be "gzip" (the default), "compress", + "bzip2", or None. Both "tar" and the compression utility named by + 'compress' must be on the default program search path, so this is + probably Unix-specific. The output tar file will be named 'base_dir' + + ".tar", possibly plus the appropriate compression extension (".gz", + ".bz2" or ".Z"). Return the output filename. + """ # XXX GNU tar 1.13 has a nifty option to add a prefix directory. # It's pretty new, though, so we certainly can't require it -- # but it would be nice to take advantage of it to skip the @@ -44,11 +44,11 @@ def make_tarball (base_name, base_dir, compress="gzip", archive_name = base_name + ".tar" mkpath(os.path.dirname(archive_name), verbose=verbose, dry_run=dry_run) cmd = ["tar", "-cf", archive_name, base_dir] - spawn (cmd, verbose=verbose, dry_run=dry_run) + spawn(cmd, verbose=verbose, dry_run=dry_run) if compress: - spawn ([compress] + compress_flags[compress] + [archive_name], - verbose=verbose, dry_run=dry_run) + spawn([compress] + compress_flags[compress] + [archive_name], + verbose=verbose, dry_run=dry_run) return archive_name + compress_ext[compress] else: return archive_name @@ -57,13 +57,13 @@ def make_tarball (base_name, base_dir, compress="gzip", def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): - """Create a zip file from all the files under 'base_dir'. The - output zip file will be named 'base_dir' + ".zip". Uses either the - InfoZIP "zip" utility (if installed and found on the default search - path) or the "zipfile" Python module (if available). If neither - tool is available, raises DistutilsExecError. Returns the name - of the output zip file.""" - + """Create a zip file from all the files under 'base_dir'. The output + zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP + "zip" utility (if installed and found on the default search path) or + the "zipfile" Python module (if available). If neither tool is + available, raises DistutilsExecError. Returns the name of the output + zip file. + """ # This initially assumed the Unix 'zip' utility -- but # apparently InfoZIP's zip.exe works the same under Windows, so # no changes needed! @@ -71,8 +71,8 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), verbose=verbose, dry_run=dry_run) try: - spawn (["zip", "-rq", zip_filename, base_dir], - verbose=verbose, dry_run=dry_run) + spawn(["zip", "-rq", zip_filename, base_dir], + verbose=verbose, dry_run=dry_run) except DistutilsExecError: # XXX really should distinguish between "couldn't find @@ -96,14 +96,14 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) - if os.path.isfile (path): - z.write (path, path) + if os.path.isfile(path): + z.write(path, path) if not dry_run: - z = zipfile.ZipFile (zip_filename, "wb", - compression=zipfile.ZIP_DEFLATED) + z = zipfile.ZipFile(zip_filename, "wb", + compression=zipfile.ZIP_DEFLATED) - os.path.walk (base_dir, visit, z) + os.path.walk(base_dir, visit, z) z.close() return zip_filename @@ -143,9 +143,9 @@ def make_archive (base_name, format, if root_dir is not None: if verbose: print "changing into '%s'" % root_dir - base_name = os.path.abspath (base_name) + base_name = os.path.abspath(base_name) if not dry_run: - os.chdir (root_dir) + os.chdir(root_dir) if base_dir is None: base_dir = os.curdir @@ -161,12 +161,12 @@ def make_archive (base_name, format, func = format_info[0] for (arg,val) in format_info[1]: kwargs[arg] = val - filename = apply (func, (base_name, base_dir), kwargs) + filename = apply(func, (base_name, base_dir), kwargs) if root_dir is not None: if verbose: print "changing back to '%s'" % save_cwd - os.chdir (save_cwd) + os.chdir(save_cwd) return filename diff --git a/dep_util.py b/dep_util.py index 97812edaf5..4b93ed023c 100644 --- a/dep_util.py +++ b/dep_util.py @@ -14,14 +14,13 @@ def newer (source, target): """Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. Return - false if both exist and 'target' is the same age or younger than - 'source'. Raise DistutilsFileError if 'source' does not - exist.""" - - if not os.path.exists (source): + 'target', or if 'source' exists and 'target' doesn't. Return false if + both exist and 'target' is the same age or younger than 'source'. + Raise DistutilsFileError if 'source' does not exist. + """ + if not os.path.exists(source): raise DistutilsFileError, "file '%s' does not exist" % source - if not os.path.exists (target): + if not os.path.exists(target): return 1 from stat import ST_MTIME @@ -35,20 +34,20 @@ def newer (source, target): def newer_pairwise (sources, targets): """Walk two filename lists in parallel, testing if each source is newer - than its corresponding target. Return a pair of lists (sources, - targets) where source is newer than target, according to the - semantics of 'newer()'.""" - - if len (sources) != len (targets): + than its corresponding target. Return a pair of lists (sources, + targets) where source is newer than target, according to the semantics + of 'newer()'. + """ + if len(sources) != len(targets): raise ValueError, "'sources' and 'targets' must be same length" # build a pair of lists (sources, targets) where source is newer n_sources = [] n_targets = [] - for i in range (len (sources)): - if newer (sources[i], targets[i]): - n_sources.append (sources[i]) - n_targets.append (targets[i]) + for i in range(len(sources)): + if newer(sources[i], targets[i]): + n_sources.append(sources[i]) + n_targets.append(targets[i]) return (n_sources, n_targets) @@ -56,20 +55,20 @@ def newer_pairwise (sources, targets): def newer_group (sources, target, missing='error'): - """Return true if 'target' is out-of-date with respect to any - file listed in 'sources'. In other words, if 'target' exists and - is newer than every file in 'sources', return false; otherwise - return true. 'missing' controls what we do when a source file is - missing; the default ("error") is to blow up with an OSError from - inside 'stat()'; if it is "ignore", we silently drop any missing - source files; if it is "newer", any missing source files make us - assume that 'target' is out-of-date (this is handy in "dry-run" - mode: it'll make you pretend to carry out commands that wouldn't - work because inputs are missing, but that doesn't matter because - you're not actually going to run the commands).""" - + """Return true if 'target' is out-of-date with respect to any file + listed in 'sources'. In other words, if 'target' exists and is newer + than every file in 'sources', return false; otherwise return true. + 'missing' controls what we do when a source file is missing; the + default ("error") is to blow up with an OSError from inside 'stat()'; + if it is "ignore", we silently drop any missing source files; if it is + "newer", any missing source files make us assume that 'target' is + out-of-date (this is handy in "dry-run" mode: it'll make you pretend to + carry out commands that wouldn't work because inputs are missing, but + that doesn't matter because you're not actually going to run the + commands). + """ # If the target doesn't even exist, then it's definitely out-of-date. - if not os.path.exists (target): + if not os.path.exists(target): return 1 # Otherwise we have to find out the hard way: if *any* source file @@ -77,9 +76,9 @@ def newer_group (sources, target, missing='error'): # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. from stat import ST_MTIME - target_mtime = os.stat (target)[ST_MTIME] + target_mtime = os.stat(target)[ST_MTIME] for source in sources: - if not os.path.exists (source): + if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file pass elif missing == 'ignore': # missing source dropped from @@ -102,13 +101,13 @@ def newer_group (sources, target, missing='error'): def make_file (src, dst, func, args, verbose=0, update_message=None, noupdate_message=None): """Makes 'dst' from 'src' (both filenames) by calling 'func' with - 'args', but only if it needs to: i.e. if 'dst' does not exist or - 'src' is newer than 'dst'.""" - - if newer (src, dst): + 'args', but only if it needs to: i.e. if 'dst' does not exist or 'src' + is newer than 'dst'. + """ + if newer(src, dst): if verbose and update_message: print update_message - apply (func, args) + apply(func, args) else: if verbose and noupdate_message: print noupdate_message From 60381acee5ec5b115938eff6e66cb4277ec2a84d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 26 Sep 2000 02:51:09 +0000 Subject: [PATCH 0636/8469] Bump version to 0.9.3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 34f55a2fd7..b2b9b569a7 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.3pre" +__version__ = "0.9.3" From f2886a0174116e2d8dfd3a5275de79233b5481b4 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 27 Sep 2000 00:15:37 +0000 Subject: [PATCH 0637/8469] Fix '_set_command_options()' so it only calls 'strtobool()' on strings (was crashing on any boolean command-line option!). --- dist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 91b820e9b4..92d390f777 100644 --- a/dist.py +++ b/dist.py @@ -755,9 +755,10 @@ def _set_command_options (self, command_obj, option_dict=None): neg_opt = {} try: - if neg_opt.has_key(option): + is_string = type(value) is StringType + if neg_opt.has_key(option) and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) - elif option in bool_opts: + elif option in bool_opts and is_string: setattr(command_obj, option, strtobool(value)) elif hasattr(command_obj, option): setattr(command_obj, option, value) From 3baf36cad7c938199bb27b95d25bcb5db2bb6cae Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 27 Sep 2000 00:17:08 +0000 Subject: [PATCH 0638/8469] Bump version to 0.9.4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b2b9b569a7..6113dcf8c3 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.3" +__version__ = "0.9.4" From 5937fb6402fd3826b37192fc61b0869f7c3e441d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 27 Sep 2000 02:08:14 +0000 Subject: [PATCH 0639/8469] Big patch from Rene Liebscher to simplify the CCompiler API and implementations. Details: * replace 'link_shared_object()', 'link_shared_lib()', and 'link_executable()' with 'link()', which is (roughly) the union of the three methods it replaces * in all implementation classes (UnixCCompiler, MSVCCompiler, etc.), ditch the old 'link_*()' methods and replace them with 'link()' * in the abstract base class (CCompiler), add the old 'link_*()' methods as wrappers around the new 'link()' (they also print a warning of the deprecated interface) Also increases consistency between MSVCCompiler and BCPPCompiler, hopefully to make it easier to factor out the mythical WindowsCCompiler class. Details: * use 'self.linker' instead of 'self.link' * add ability to compile resource files to BCPPCompiler * added (redundant?) 'object_filename()' method to BCPPCompiler * only generate a .def file if 'export_symbols' defined --- bcppcompiler.py | 263 +++++++++++++++++++++------------------------ ccompiler.py | 111 ++++++++++++------- cygwinccompiler.py | 230 +++++++++++++++++++++++++++------------ msvccompiler.py | 135 ++++++----------------- unixccompiler.py | 100 ++++------------- 5 files changed, 409 insertions(+), 430 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 2b73b12f0d..bb9557fbb3 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -63,7 +63,7 @@ def __init__ (self, # indicate their installation locations. self.cc = "bcc32.exe" - self.link = "ilink32.exe" + self.linker = "ilink32.exe" self.lib = "tlib.exe" self.preprocess_options = None @@ -73,6 +73,8 @@ def __init__ (self, self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x'] self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x'] self.ldflags_static = [] + self.ldflags_exe = ['/Gn', '/q', '/x'] + self.ldflags_exe_debug = ['/Gn', '/q', '/x','/r'] # -- Worker methods ------------------------------------------------ @@ -108,16 +110,33 @@ def compile (self, if skip_sources[src]: self.announce ("skipping %s (%s up-to-date)" % (src, obj)) else: + src = os.path.normpath(src) + obj = os.path.normpath(obj) + self.mkpath(os.path.dirname(obj)) + + if ext == '.res': + # This is already a binary file -- skip it. + continue # the 'for' loop + if ext == '.rc': + # This needs to be compiled to a .res file -- do it now. + try: + self.spawn (["brcc32", "-fo", obj, src]) + except DistutilsExecError, msg: + raise CompileError, msg + continue # the 'for' loop + + # The next two are both for the real compiler. if ext in self._c_extensions: input_opt = "" elif ext in self._cpp_extensions: input_opt = "-P" + else: + # Unknown file type -- no extra options. The compiler + # will probably fail, but let it just in case this is a + # file the compiler recognizes even if we don't. + input_opt = "" - src = os.path.normpath(src) - obj = os.path.normpath(obj) - output_opt = "-o" + obj - self.mkpath(os.path.dirname(obj)) # Compiler command line syntax is: "bcc32 [options] file(s)". # Note that the source file names must appear at the end of @@ -163,45 +182,20 @@ def create_static_lib (self, # create_static_lib () - - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): - - self.link_shared_object (objects, - self.shared_library_name(output_libname), - output_dir=output_dir, - libraries=libraries, - library_dirs=library_dirs, - runtime_library_dirs=runtime_library_dirs, - export_symbols=export_symbols, - debug=debug, - extra_preargs=extra_preargs, - extra_postargs=extra_postargs, - build_temp=build_temp) - - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): # XXX this ignores 'build_temp'! should follow the lead of # msvccompiler.py @@ -213,45 +207,61 @@ def link_shared_object (self, if runtime_library_dirs: self.warn ("I don't know what to do with 'runtime_library_dirs': " + str (runtime_library_dirs)) - + if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) if self._need_link (objects, output_filename): - if debug: - ld_args = self.ldflags_shared_debug[:] + # Figure out linker args based on type of target. + if target_desc == CCompiler.EXECUTABLE: + startup_obj = 'c0w32' + if debug: + ld_args = self.ldflags_exe_debug[:] + else: + ld_args = self.ldflags_exe[:] else: - ld_args = self.ldflags_shared[:] + startup_obj = 'c0d32' + if debug: + ld_args = self.ldflags_shared_debug[:] + else: + ld_args = self.ldflags_shared[:] + # Create a temporary exports file for use by the linker - head, tail = os.path.split (output_filename) - modname, ext = os.path.splitext (tail) - temp_dir = os.path.dirname(objects[0]) # preserve tree structure - def_file = os.path.join (temp_dir, '%s.def' % modname) - contents = ['EXPORTS'] - for sym in (export_symbols or []): - contents.append(' %s=_%s' % (sym, sym)) - self.execute(write_file, (def_file, contents), - "writing %s" % def_file) + if export_symbols is None: + def_file = '' + else: + head, tail = os.path.split (output_filename) + modname, ext = os.path.splitext (tail) + temp_dir = os.path.dirname(objects[0]) # preserve tree structure + def_file = os.path.join (temp_dir, '%s.def' % modname) + contents = ['EXPORTS'] + for sym in (export_symbols or []): + contents.append(' %s=_%s' % (sym, sym)) + self.execute(write_file, (def_file, contents), + "writing %s" % def_file) # Borland C++ has problems with '/' in paths - objects = map(os.path.normpath, objects) - startup_obj = 'c0d32' - objects.insert(0, startup_obj) - - # either exchange python15.lib in the python libs directory against - # a Borland-like one, or create one with name bcpp_python15.lib - # there and remove the pragmas from config.h - libraries.append ('import32') - libraries.append ('cw32mt') - - # Start building command line flags and options. - + objects2 = map(os.path.normpath, objects) + # split objects in .obj and .res files + # Borland C++ needs them at different positions in the command line + objects = [startup_obj] + resources = [] + for file in objects2: + (base, ext) = os.path.splitext(os.path.normcase(file)) + if ext == '.res': + resources.append(file) + else: + objects.append(file) + + for l in library_dirs: ld_args.append("/L%s" % os.path.normpath(l)) - - ld_args.extend(objects) # list of object files + ld_args.append("/L.") # we sometimes use relative paths + + # list of object files + ld_args.extend(objects) # XXX the command-line syntax for Borland C++ is a bit wonky; # certain filenames are jammed together in one big string, but @@ -263,14 +273,14 @@ def link_shared_object (self, # because 'spawn()' would quote any filenames with spaces in # them. Arghghh!. Apparently it works fine as coded... - # name of dll file + # name of dll/exe file ld_args.extend([',',output_filename]) # no map file and start libraries ld_args.append(',,') for lib in libraries: # see if we find it and if there is a bcpp specific lib - # (bcpp_xxx.lib) + # (xxx_bcpp.lib) libfile = self.find_library_file(library_dirs, lib, debug) if libfile is None: ld_args.append(lib) @@ -279,8 +289,17 @@ def link_shared_object (self, else: # full name which prefers bcpp_xxx.lib over xxx.lib ld_args.append(libfile) + + # some default libraries + ld_args.append ('import32') + ld_args.append ('cw32mt') + # def file for export symbols ld_args.extend([',',def_file]) + # add resource files + ld_args.append(',') + ld_args.extend(resources) + if extra_preargs: ld_args[:0] = extra_preargs @@ -289,88 +308,24 @@ def link_shared_object (self, self.mkpath (os.path.dirname (output_filename)) try: - self.spawn ([self.link] + ld_args) + self.spawn ([self.linker] + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) - # link_shared_object () - - - def link_executable (self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (objects, output_dir) = self._fix_object_args (objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) - - if runtime_library_dirs: - self.warn ("I don't know what to do with 'runtime_library_dirs': " - + str (runtime_library_dirs)) - - lib_opts = gen_lib_options (self, - library_dirs, runtime_library_dirs, - libraries) - output_filename = output_progname + self.exe_extension - if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) - - if self._need_link (objects, output_filename): - - if debug: - ldflags = self.ldflags_shared_debug[1:] - else: - ldflags = self.ldflags_shared[1:] - - ld_args = ldflags + lib_opts + \ - objects + ['/OUT:' + output_filename] - - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend (extra_postargs) - - self.mkpath (os.path.dirname (output_filename)) - try: - self.spawn ([self.link] + ld_args) - except DistutilsExecError, msg: - raise LinkError, msg - else: - self.announce ("skipping %s (up-to-date)" % output_filename) - + # link () # -- Miscellaneous methods ----------------------------------------- - # These are all used by the 'gen_lib_options() function, in - # ccompiler.py. - - def library_dir_option (self, dir): - return "-L" + dir - - def runtime_library_dir_option (self, dir): - raise DistutilsPlatformError, \ - ("don't know how to set runtime library search path " - "for Borland C++") - - def library_option (self, lib): - return self.library_filename (lib) def find_library_file (self, dirs, lib, debug=0): # List of effective library names to try, in order of preference: - # bcpp_xxx.lib is better than xxx.lib + # xxx_bcpp.lib is better than xxx.lib # and xxx_d.lib is better than xxx.lib if debug is set # - # The "bcpp_" prefix is to handle a Python installation for people + # The "_bcpp" suffix is to handle a Python installation for people # with multiple compilers (primarily Distutils hackers, I suspect # ;-). The idea is they'd have one static library for each # compiler they care about, since (almost?) every Windows compiler @@ -390,3 +345,31 @@ def find_library_file (self, dirs, lib, debug=0): # Oops, didn't find it in *any* of 'dirs' return None + # overwrite the one from CCompiler to support rc and res-files + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + # use normcase to make sure '.rc' is really '.rc' and not '.RC' + (base, ext) = os.path.splitext (os.path.normcase(src_name)) + if ext not in (self.src_extensions + ['.rc','.res']): + raise UnknownFileError, \ + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) + if strip_dir: + base = os.path.basename (base) + if ext == '.res': + # these can go unchanged + obj_names.append (os.path.join (output_dir, base + ext)) + elif ext == '.rc': + # these need to be compiled to .res-files + obj_names.append (os.path.join (output_dir, base + '.res')) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + # object_filenames () diff --git a/ccompiler.py b/ccompiler.py index ce3f2be69d..97949060fb 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -561,24 +561,32 @@ def create_static_lib (self, pass - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): - """Link a bunch of stuff together to create a shared library file. - Similar semantics to 'create_static_lib()', with the addition of - other libraries to link against and directories to search for them. - Also, of course, the type and name of the generated file will - almost certainly be different, as will the program used to create - it. + # values for target_desc parameter in link() + SHARED_OBJECT = "shared_object" + SHARED_LIBRARY = "shared_library" + EXECUTABLE = "executable" + + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + """Link a bunch of stuff together to create an executable or + shared library file. + + The "bunch of stuff" consists of the list of object files supplied + as 'objects'. 'output_filename' should be a filename. If + 'output_dir' is supplied, 'output_filename' is relative to it + (i.e. 'output_filename' can provide directory components if + needed). 'libraries' is a list of libraries to link against. These are library names, not filenames, since they're translated into @@ -610,7 +618,31 @@ def link_shared_lib (self, Raises LinkError on failure. """ - pass + raise NotImplementedError + + + # old methods, rewritten to use the new link() method. + + def link_shared_lib (self, + objects, + output_libname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + self.warn("link_shared_lib(..) is deprecated, please " + "use link(CCompiler.SHARED_LIBRARY, ...) instead") + self.link(CCompiler.SHARED_LIBRARY, objects, + self.library_filename(output_libname, lib_type='shared'), + output_dir, + libraries, library_dirs, runtime_library_dirs, + export_symbols, debug, + extra_preargs, extra_postargs, build_temp) def link_shared_object (self, @@ -625,16 +657,13 @@ def link_shared_object (self, extra_preargs=None, extra_postargs=None, build_temp=None): - """Link a bunch of stuff together to create a shared object file. - Much like 'link_shared_lib()', except the output filename is - explicitly supplied as 'output_filename'. If 'output_dir' is - supplied, 'output_filename' is relative to it - (i.e. 'output_filename' can provide directory components if - needed). - - Raises LinkError on failure. - """ - pass + self.warn("link_shared_object(...) is deprecated, please " + "use link(CCompiler.SHARED_OBJECT,...) instead.") + self.link(CCompiler.SHARED_OBJECT, objects, + output_filename, output_dir, + libraries, library_dirs, runtime_library_dirs, + export_symbols, debug, + extra_preargs, extra_postargs, build_temp) def link_executable (self, @@ -647,16 +676,12 @@ def link_executable (self, debug=0, extra_preargs=None, extra_postargs=None): - """Link a bunch of stuff together to create a binary executable - file. The "bunch of stuff" is as for 'link_shared_lib()'. - 'output_progname' should be the base name of the executable - program--e.g. on Unix the same as the output filename, but on - DOS/Windows ".exe" will be appended. - - Raises LinkError on failure. - """ - pass - + self.warn("link_executable(...) is deprecated, please " + "use link(CCompiler.EXECUTABLE,...) instead.") + self.link (CCompiler.EXECUTABLE, objects, + self.executable_filename(output_progname), output_dir, + libraries, library_dirs, runtime_library_dirs, None, + debug, extra_preargs, extra_postargs, None) # -- Miscellaneous methods ----------------------------------------- @@ -756,6 +781,14 @@ def shared_object_filename (self, basename = os.path.basename (basename) return os.path.join (output_dir, basename + self.shared_lib_extension) + def executable_filename (self, + basename, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + if strip_dir: + basename = os.path.basename (basename) + return os.path.join(output_dir, basename + (self.exe_extension or '')) def library_filename (self, libname, diff --git a/cygwinccompiler.py b/cygwinccompiler.py index f547d540f5..5b06d3d79c 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -39,14 +39,17 @@ # By specifying -static we force ld to link against the import libraries, # this is windows standard and there are normally not the necessary symbols # in the dlls. +# *** only the version of June 2000 shows these problems # created 2000/05/05, Rene Liebscher __revision__ = "$Id$" import os,sys,copy +from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file +from distutils.errors import DistutilsExecError, CompileError, UnknownFileError class CygwinCCompiler (UnixCCompiler): @@ -87,9 +90,9 @@ def __init__ (self, # same as the rest of binutils ( also ld ) # dllwrap 2.10.90 is buggy if self.ld_version >= "2.10.90": - self.linker = "gcc" + self.linker_dll = "gcc" else: - self.linker = "dllwrap" + self.linker_dll = "dllwrap" # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. @@ -97,7 +100,7 @@ def __init__ (self, compiler_so='gcc -mcygwin -mdll -O -Wall', linker_exe='gcc -mcygwin', linker_so=('%s -mcygwin -mdll -static' % - self.linker)) + self.linker_dll)) # cygwin and mingw32 need different sets of libraries if self.gcc_version == "2.91.57": @@ -111,58 +114,108 @@ def __init__ (self, # __init__ () - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): + # not much different of the compile method in UnixCCompiler, + # but we have to insert some lines in the middle of it, so + # we put here a adapted version of it. + # (If we would call compile() in the base class, it would do some + # initializations a second time, this is why all is done here.) + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) + + # Figure out the options for the compiler command line. + pp_opts = gen_preprocess_options (macros, include_dirs) + cc_args = pp_opts + ['-c'] + if debug: + cc_args[:0] = ['-g'] + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs is None: + extra_postargs = [] + + # Compile all source files that weren't eliminated by + # '_prep_compile()'. + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + self.mkpath (os.path.dirname (obj)) + if ext == '.rc' or ext == '.res': + # gcc needs '.res' and '.rc' compiled to object files !!! + try: + self.spawn (["windres","-i",src,"-o",obj]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn (self.compiler_so + cc_args + + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + + # Return *all* object filenames, not just the ones we just built. + return objects + + # compile () + + + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) - + objects = copy.copy(objects or []) + # Additional libraries libraries.extend(self.dll_libraries) - - # we want to put some files in the same directory as the - # object files are, build_temp doesn't help much - - # where are the object files - temp_dir = os.path.dirname(objects[0]) - - # name of dll to give the helper files (def, lib, exp) the same name - (dll_name, dll_extension) = os.path.splitext( - os.path.basename(output_filename)) - - # generate the filenames for these files - def_file = None # this will be done later, if necessary - exp_file = os.path.join(temp_dir, dll_name + ".exp") - lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a") - - #extra_preargs.append("--verbose") - if self.linker == "dllwrap": - extra_preargs.extend([#"--output-exp",exp_file, - "--output-lib",lib_file, - ]) - else: - # doesn't work: bfd_close build\...\libfoo.a: Invalid operation - extra_preargs.extend([#"-Wl,--out-implib,%s" % lib_file, - ]) - - # check what we got in export_symbols - if export_symbols is not None: - # Make .def file - # (It would probably better to check if we really need this, + + # handle export symbols by creating a def-file + # with executables this only works with gcc/ld as linker + if ((export_symbols is not None) and + (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): + # (The linker doesn't do anything if output is up-to-date. + # So it would probably better to check if we really need this, # but for this we had to insert some unchanged parts of # UnixCCompiler, and this is not what we want.) + + # we want to put some files in the same directory as the + # object files are, build_temp doesn't help much + # where are the object files + temp_dir = os.path.dirname(objects[0]) + # name of dll to give the helper files the same base name + (dll_name, dll_extension) = os.path.splitext( + os.path.basename(output_filename)) + + # generate the filenames for these files def_file = os.path.join(temp_dir, dll_name + ".def") + exp_file = os.path.join(temp_dir, dll_name + ".exp") + lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a") + + # Generate .def file contents = [ "LIBRARY %s" % os.path.basename(output_filename), "EXPORTS"] @@ -171,35 +224,78 @@ def link_shared_object (self, self.execute(write_file, (def_file, contents), "writing %s" % def_file) - if def_file: - if self.linker == "dllwrap": + # next add options for def-file and to creating import libraries + + # dllwrap uses different options than gcc/ld + if self.linker_dll == "dllwrap": + extra_preargs.extend([#"--output-exp",exp_file, + "--output-lib",lib_file, + ]) # for dllwrap we have to use a special option - extra_preargs.append("--def") - # for gcc/ld it is specified as any other object file - extra_preargs.append(def_file) + extra_preargs.extend(["--def", def_file]) + # we use gcc/ld here and can be sure ld is >= 2.9.10 + else: + # doesn't work: bfd_close build\...\libfoo.a: Invalid operation + #extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file]) + # for gcc/ld the def-file is specified as any other object files + objects.append(def_file) + + #end: if ((export_symbols is not None) and + # (target_desc <> self.EXECUTABLE or self.linker_dll == "gcc")): # who wants symbols and a many times larger output file # should explicitly switch the debug mode on # otherwise we let dllwrap/ld strip the output file - # (On my machine unstripped_file = stripped_file + 254KB - # 10KB < stripped_file < ??100KB ) + # (On my machine: 10KB < stripped_file < ??100KB + # unstripped_file = stripped_file + XXX KB + # ( XXX=254 for a typical python extension)) if not debug: extra_preargs.append("-s") - UnixCCompiler.link_shared_object(self, - objects, - output_filename, - output_dir, - libraries, - library_dirs, - runtime_library_dirs, - None, # export_symbols, we do this in our def-file - debug, - extra_preargs, - extra_postargs, - build_temp) + UnixCCompiler.link(self, + target_desc, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + None, # export_symbols, we do this in our def-file + debug, + extra_preargs, + extra_postargs, + build_temp) - # link_shared_object () + # link () + + # -- Miscellaneous methods ----------------------------------------- + + # overwrite the one from CCompiler to support rc and res-files + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + # use normcase to make sure '.rc' is really '.rc' and not '.RC' + (base, ext) = os.path.splitext (os.path.normcase(src_name)) + if ext not in (self.src_extensions + ['.rc','.res']): + raise UnknownFileError, \ + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) + if strip_dir: + base = os.path.basename (base) + if ext == '.res' or ext == '.rc': + # these need to be compiled to object files + obj_names.append (os.path.join (output_dir, + base + ext + self.obj_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + # object_filenames () # class CygwinCCompiler @@ -227,7 +323,7 @@ def __init__ (self, compiler_so='gcc -mno-cygwin -mdll -O -Wall', linker_exe='gcc -mno-cygwin', linker_so='%s -mno-cygwin -mdll -static %s' - % (self.linker, entry_point)) + % (self.linker_dll, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) # (-mthreads: Support thread-safe exception handling on `Mingw32') diff --git a/msvccompiler.py b/msvccompiler.py index ea58a79cd3..0325b48508 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -205,7 +205,7 @@ def __init__ (self, version = versions[0] # highest version self.cc = find_exe("cl.exe", version) - self.link = find_exe("link.exe", version) + self.linker = find_exe("link.exe", version) self.lib = find_exe("lib.exe", version) self.rc = find_exe("rc.exe", version) # resource compiler self.mc = find_exe("mc.exe", version) # message compiler @@ -221,7 +221,7 @@ def __init__ (self, else: # devstudio not found in the registry self.cc = "cl.exe" - self.link = "link.exe" + self.linker = "link.exe" self.lib = "lib.exe" self.rc = "rc.exe" self.mc = "mc.exe" @@ -396,45 +396,19 @@ def create_static_lib (self, # create_static_lib () - - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): - - self.link_shared_object (objects, - self.shared_library_name(output_libname), - output_dir=output_dir, - libraries=libraries, - library_dirs=library_dirs, - runtime_library_dirs=runtime_library_dirs, - export_symbols=export_symbols, - debug=debug, - extra_preargs=extra_preargs, - extra_postargs=extra_postargs, - build_temp=build_temp) - - - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ @@ -452,10 +426,16 @@ def link_shared_object (self, if self._need_link (objects, output_filename): - if debug: - ldflags = self.ldflags_shared_debug + if target_desc == CCompiler.EXECUTABLE: + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] else: - ldflags = self.ldflags_shared + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared export_opts = [] for sym in (export_symbols or []): @@ -469,12 +449,13 @@ def link_shared_object (self, # needed! Make sure they are generated in the temporary build # directory. Since they have different names for debug and release # builds, they can go into the same directory. - (dll_name, dll_ext) = os.path.splitext( - os.path.basename(output_filename)) - implib_file = os.path.join( - os.path.dirname(objects[0]), - self.library_filename(dll_name)) - ld_args.append ('/IMPLIB:' + implib_file) + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + os.path.dirname(objects[0]), + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) if extra_preargs: ld_args[:0] = extra_preargs @@ -483,66 +464,16 @@ def link_shared_object (self, self.mkpath (os.path.dirname (output_filename)) try: - self.spawn ([self.link] + ld_args) + self.spawn ([self.linker] + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) - # link_shared_object () + # link () - def link_executable (self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (objects, output_dir) = self._fix_object_args (objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) - - if runtime_library_dirs: - self.warn ("I don't know what to do with 'runtime_library_dirs': " - + str (runtime_library_dirs)) - - lib_opts = gen_lib_options (self, - library_dirs, runtime_library_dirs, - libraries) - output_filename = output_progname + self.exe_extension - if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) - - if self._need_link (objects, output_filename): - - if debug: - ldflags = self.ldflags_shared_debug[1:] - else: - ldflags = self.ldflags_shared[1:] - - ld_args = ldflags + lib_opts + \ - objects + ['/OUT:' + output_filename] - - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend (extra_postargs) - - self.mkpath (os.path.dirname (output_filename)) - try: - self.spawn ([self.link] + ld_args) - except DistutilsExecError, msg: - raise LinkError, msg - else: - self.announce ("skipping %s (up-to-date)" % output_filename) - - # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in # ccompiler.py. diff --git a/unixccompiler.py b/unixccompiler.py index ff0341a5ce..f7eb93ae43 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -190,45 +190,19 @@ def create_static_lib (self, # create_static_lib () - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): - - self.link_shared_object( - objects, - self.library_filename(output_libname, lib_type='shared'), - output_dir, - libraries, - library_dirs, - runtime_library_dirs, - export_symbols, - debug, - extra_preargs, - extra_postargs, - build_temp) - - - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): (objects, output_dir) = self._fix_object_args(objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ @@ -253,54 +227,16 @@ def link_shared_object (self, ld_args.extend(extra_postargs) self.mkpath(os.path.dirname(output_filename)) try: - self.spawn(self.linker_so + ld_args) + if target_desc == CCompiler.EXECUTABLE: + self.spawn(self.linker_exe + ld_args) + else: + self.spawn(self.linker_so + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: self.announce("skipping %s (up-to-date)" % output_filename) - # link_shared_object () - - - def link_executable (self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (objects, output_dir) = self._fix_object_args(objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) - - lib_opts = gen_lib_options(self, - library_dirs, runtime_library_dirs, - libraries) - output_filename = output_progname # Unix-ism! - if output_dir is not None: - output_filename = os.path.join(output_dir, output_filename) - - if self._need_link(objects, output_filename): - ld_args = objects + self.objects + lib_opts + ['-o', output_filename] - if debug: - ld_args[:0] = ['-g'] - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: - self.spawn(self.linker_exe + ld_args) - except DistutilsExecError, msg: - raise LinkError, msg - else: - self.announce("skipping %s (up-to-date)" % output_filename) - - # link_executable () + # link () # -- Miscellaneous methods ----------------------------------------- From a50a92cb127350ef11b3bf567d9724e61ce063af Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 27 Sep 2000 02:24:21 +0000 Subject: [PATCH 0640/8469] Remove deprecation warnings on old 'link_*()' methods, ie. they're not deprecated after all. But now they're only implemented once, instead of N times. --- ccompiler.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 97949060fb..b10ee67e3c 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -621,7 +621,7 @@ def link (self, raise NotImplementedError - # old methods, rewritten to use the new link() method. + # Old 'link_*()' methods, rewritten to use the new 'link()' method. def link_shared_lib (self, objects, @@ -635,8 +635,6 @@ def link_shared_lib (self, extra_preargs=None, extra_postargs=None, build_temp=None): - self.warn("link_shared_lib(..) is deprecated, please " - "use link(CCompiler.SHARED_LIBRARY, ...) instead") self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, @@ -657,8 +655,6 @@ def link_shared_object (self, extra_preargs=None, extra_postargs=None, build_temp=None): - self.warn("link_shared_object(...) is deprecated, please " - "use link(CCompiler.SHARED_OBJECT,...) instead.") self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, @@ -676,12 +672,10 @@ def link_executable (self, debug=0, extra_preargs=None, extra_postargs=None): - self.warn("link_executable(...) is deprecated, please " - "use link(CCompiler.EXECUTABLE,...) instead.") - self.link (CCompiler.EXECUTABLE, objects, - self.executable_filename(output_progname), output_dir, - libraries, library_dirs, runtime_library_dirs, None, - debug, extra_preargs, extra_postargs, None) + self.link(CCompiler.EXECUTABLE, objects, + self.executable_filename(output_progname), output_dir, + libraries, library_dirs, runtime_library_dirs, None, + debug, extra_preargs, extra_postargs, None) # -- Miscellaneous methods ----------------------------------------- From 117c5cbfe52d2dfc01e823e96051f24f80f60038 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 27 Sep 2000 02:26:57 +0000 Subject: [PATCH 0641/8469] Bump version to 1.0pre. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6113dcf8c3..23315cdeb9 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "0.9.4" +__version__ = "1.0pre" From b0ce6a9888ab8fc85326e696c0e114dddfdeaeaa Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 28 Sep 2000 19:28:35 +0000 Subject: [PATCH 0642/8469] Removed the implib_dir instance variable because it is unused. Removed get_ext_libname() because it is unused. Fixed get_libraries() to append an '_d' to the python debug import library. If MSVC is used, do not add 'pythonxx.lib' to the list of libraries, because this is handled better by a pragma in config.h. This should fix bug #115595, but it needs some more testing. --- command/build_ext.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7fdfd1458d..9147c3d07b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -158,7 +158,6 @@ def finalize_options (self): # also Python's library directory must be appended to library_dirs if os.name == 'nt': self.library_dirs.append (os.path.join(sys.exec_prefix, 'libs')) - self.implib_dir = self.build_temp if self.debug: self.build_temp = os.path.join (self.build_temp, "Debug") else: @@ -543,15 +542,6 @@ def get_ext_filename (self, ext_name): return apply (os.path.join, ext_path) + '_d' + so_ext return apply (os.path.join, ext_path) + so_ext - def get_ext_libname (self, ext_name): - # create a filename for the (unneeded) lib-file. - # extensions in debug_mode are named 'module_d.pyd' under windows - ext_path = string.split (ext_name, '.') - if os.name == 'nt' and self.debug: - return apply (os.path.join, ext_path) + '_d.lib' - return apply (os.path.join, ext_path) + '.lib' - - def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not @@ -573,9 +563,15 @@ def get_libraries (self, ext): # is redundant, since the library is mentioned in a pragma in # config.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. - if sys.platform == "win32": - pythonlib = ("python%d%d" % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # Append '_d' to the python import library on debug builds. + from distutils.msvccompiler import MSVCCompiler + if sys.platform == "win32" and \ + not isinstance(self.compiler, MSVCCompiler): + template = "python%d%d" + if self.debug: + template = template + '_d' + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] From 96979143f471579f54c80afc1aedf0831a98e58a Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 29 Sep 2000 11:36:55 +0000 Subject: [PATCH 0643/8469] Removed the extra_dirs and path_file metadata options. They are unneeded: All this stuff is already done by the install command which is run by bdist_wininst. One bug has been fixed: The root of the fake install tree is install.install_purelib, not install.install_lib! They are different if the extra_path option is used in the setup function. Rebuild after the changes to wininst.exe. --- command/bdist_wininst.py | 530 +++++++++++++++++++-------------------- 1 file changed, 260 insertions(+), 270 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 16dd8022a0..3251bac07c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -28,7 +28,8 @@ class bdist_wininst (Command): ('no-target-compile', 'c', "do not compile .py to .pyc on the target system"), ('no-target-optimize', 'o', - "do not compile .py to .pyo (optimized) on the target system"), + "do not compile .py to .pyo (optimized)" + "on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), ] @@ -92,13 +93,6 @@ def run (self): self.announce ("installing to %s" % self.bdist_dir) install.ensure_finalized() - - # save the path_file and extra_dirs options - # created by the install command if an extra_path - # argument has been supplied - self.extra_dirs = install.extra_dirs - self.path_file = install.path_file - install.run() # And make an archive relative to the root of the @@ -108,8 +102,8 @@ def run (self): "%s.win32" % fullname) # Our archive MUST be relative to sys.prefix, which is the - # same as install_lib in the 'nt' scheme. - root_dir = os.path.normpath (install.install_lib) + # same as install_purelib in the 'nt' scheme. + root_dir = os.path.normpath (install.install_purelib) # Sanity check: Make sure everything is included for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): @@ -161,10 +155,6 @@ def get_inidata (self): lines.append ("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append ("target_version=%s" % self.target_version) - if (self.path_file): - lines.append ("path_file=%s" % self.path_file) - if (self.extra_dirs): - lines.append ("extra_dirs=%s" % self.extra_dirs) title = self.distribution.get_fullname() lines.append ("title=%s" % repr (title)[1:-1]) @@ -227,271 +217,271 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAADq05KMrrL8366y/N+usvzf1a7w36+y/N8trvLfrLL831GS+N+ssvzfzK3v -36ay/N+usv3fzrL8366y/N+jsvzfUZL236Oy/N9ptPrfr7L831JpY2iusvzfAAAAAAAAAABQRQAA -TAEDAPimujkAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAkAAA4NUAAACgAAAA4AAAAABAAAAQAAAA -AgAABAAAAAAAAAAEAAAAAAAAAADwAAAABAAAAAAAAAIAAAAAABAAABAAAAAAEAAAEAAAAAAAABAA -AAAAAAAAAAAAADDhAABwAQAAAOAAADABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v +ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o +36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAAD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ABm -cmVlAABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AABFeGl0UHJvY2VzcwAAAFJlZ0Nsb3NlS2V5AAAAUHJvcGVydHlTaGVldEEAAFRleHRPdXRBAABl +eGl0AABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From 2ab90e20a50ed93e808c40772d010c8427c283c6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:05:37 +0000 Subject: [PATCH 0644/8469] Moved some things around for better organization. --- command/install.py | 62 +++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/command/install.py b/command/install.py index 4ad652d990..8c6aa1cff8 100644 --- a/command/install.py +++ b/command/install.py @@ -173,6 +173,13 @@ def initialize_options (self): self.record = None + + # -- Option finalizing methods ------------------------------------- + # (This is rather more involved than for most commands, + # because this is where the policy for installing third- + # party Python modules on various platforms given a wide + # array of user input is decided. Yes, it's quite complex!) + def finalize_options (self): # This method (and its pliant slaves, like 'finalize_unix()', @@ -450,6 +457,8 @@ def change_roots (self, *names): setattr(self, attr, change_root(self.root, getattr(self, attr))) + # -- Command execution methods ------------------------------------- + def run (self): # Obviously have to build before we can install @@ -486,24 +495,18 @@ def run (self): # run () + def create_path_file (self): + filename = os.path.join (self.install_libbase, + self.path_file + ".pth") + if self.install_path_file: + self.execute (write_file, + (filename, [self.extra_dirs]), + "creating %s" % filename) + else: + self.warn("path file '%s' not created" % filename) - # -- Predicates for sub-command list ------------------------------- - - def has_lib (self): - """Return true if the current distribution has any Python - modules to install.""" - return (self.distribution.has_pure_modules() or - self.distribution.has_ext_modules()) - - def has_headers (self): - return self.distribution.has_headers() - - def has_scripts (self): - return self.distribution.has_scripts() - - def has_data (self): - return self.distribution.has_data_files() + # -- Reporting methods --------------------------------------------- def get_outputs (self): # This command doesn't have any outputs of its own, so just @@ -515,7 +518,6 @@ def get_outputs (self): return outputs - def get_inputs (self): # XXX gee, this looks familiar ;-( inputs = [] @@ -526,15 +528,23 @@ def get_inputs (self): return inputs - def create_path_file (self): - filename = os.path.join (self.install_libbase, - self.path_file + ".pth") - if self.install_path_file: - self.execute (write_file, - (filename, [self.extra_dirs]), - "creating %s" % filename) - else: - self.warn("path file '%s' not created" % filename) + # -- Predicates for sub-command list ------------------------------- + + def has_lib (self): + """Return true if the current distribution has any Python + modules to install.""" + return (self.distribution.has_pure_modules() or + self.distribution.has_ext_modules()) + + def has_headers (self): + return self.distribution.has_headers() + + def has_scripts (self): + return self.distribution.has_scripts() + + def has_data (self): + return self.distribution.has_data_files() + # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. From 157e91886f9d060d88fc35c34e2f5239d43c6af3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:08:12 +0000 Subject: [PATCH 0645/8469] Changed to use the 'sub-commands' machinery: - added 'sub_commands' class attr - added 'has_*()' predicates referenced by the sub-command list - rewrote 'run()' so it's a trivial loop over relevant sub-commands --- command/build.py | 50 ++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/command/build.py b/command/build.py index f30f4ee1da..1f785996ec 100644 --- a/command/build.py +++ b/command/build.py @@ -97,26 +97,34 @@ def finalize_options (self): def run (self): - # For now, "build" means "build_py" then "build_ext". (Eventually - # it should also build documentation.) - - # Invoke the 'build_py' command to "build" pure Python modules - # (ie. copy 'em into the build tree) - if self.distribution.has_pure_modules(): - self.run_command ('build_py') - - # Build any standalone C libraries next -- they're most likely to - # be needed by extension modules, so obviously have to be done - # first! - if self.distribution.has_c_libraries(): - self.run_command ('build_clib') - - # And now 'build_ext' -- compile extension modules and put them - # into the build tree - if self.distribution.has_ext_modules(): - self.run_command ('build_ext') - - if self.distribution.has_scripts(): - self.run_command ('build_scripts') + # Run all relevant sub-commands. This will be some subset of: + # - build_py - pure Python modules + # - build_clib - standalone C libraries + # - build_ext - Python extensions + # - build_scripts - (Python) scripts + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + + # -- Predicates for the sub-command list --------------------------- + + def has_pure_modules (self): + return self.distribution.has_pure_modules() + + def has_c_libraries (self): + return self.distribution.has_c_libraries() + + def has_ext_modules (self): + return self.distribution.has_ext_modules() + + def has_scripts (self): + return self.distribution.has_scripts() + + + sub_commands = [('build_py', has_pure_modules), + ('build_clib', has_c_libraries), + ('build_ext', has_ext_modules), + ('build_scripts', has_scripts), + ] # class build From 939159b5a3ded23234a997e930543af87d19c524 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:09:39 +0000 Subject: [PATCH 0646/8469] In 'get_platform()', handle so-called POSIX systems that don't have 'uname()' -- specifically NeXTSTEP. --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index d52c69b46f..016119ce66 100644 --- a/util.py +++ b/util.py @@ -31,7 +31,7 @@ def get_platform (): For non-POSIX platforms, currently just returns 'sys.platform'. """ - if os.name != "posix": + if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. return sys.platform From 3e90f681ce2c2f2bfb9b5015e78a0f207135997a Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:29:35 +0000 Subject: [PATCH 0647/8469] Changed 'copy_file()' so it returns a tuple (dest_name, copied) -- hopefully, this will please everyone (as if that's possible). --- file_util.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/file_util.py b/file_util.py index d05b456161..a9e12ce3f3 100644 --- a/file_util.py +++ b/file_util.py @@ -95,8 +95,9 @@ def copy_file (src, dst, Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file contents. - Return the name of the destination file, whether it was actually copied - or not. + Return a tuple (dest_name, copied): 'dest_name' is the actual name of + the output file, and 'copied' is true if the file was copied (or would + have been copied, if 'dry_run' true). """ # XXX if the destination file already exists, we clobber it if # copying, but blow up if linking. Hmmm. And I don't know what @@ -121,7 +122,7 @@ def copy_file (src, dst, if update and not newer(src, dst): if verbose: print "not copying %s (output up-to-date)" % src - return dst + return (dst, 0) try: action = _copy_action[link] @@ -135,9 +136,9 @@ def copy_file (src, dst, print "%s %s -> %s" % (action, src, dst) if dry_run: - return dst + return (dst, 1) - # On a Mac, use the native file copy routine + # On Mac OS, use the native file copy routine if os.name == 'mac': import macostools try: @@ -169,7 +170,7 @@ def copy_file (src, dst, if preserve_mode: os.chmod(dst, S_IMODE(st[ST_MODE])) - return dst + return (dst, 1) # copy_file () From 4e493b610cddc4325efb115e2ebf61d2aaba8068 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:33:05 +0000 Subject: [PATCH 0648/8469] Changed 'build_module()' so it returns the result of 'copy_file()' on the module file -- could be useful for subclasses overriding it. --- command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index ea92c2be0f..ebe30e8106 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -307,7 +307,7 @@ def build_module (self, module, module_file, package): outfile = self.get_module_outfile (self.build_lib, package, module) dir = os.path.dirname (outfile) self.mkpath (dir) - self.copy_file (module_file, outfile, preserve_mode=0) + return self.copy_file (module_file, outfile, preserve_mode=0) def build_modules (self): From 5b94288789b79b3b730f5eb2d40eb5e617f93f2f Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:34:50 +0000 Subject: [PATCH 0649/8469] Expect a tuple (dest_name, copied) from 'copy_file()'. --- command/install_data.py | 4 ++-- command/install_headers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index 9ce118394b..d9a486936c 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -52,7 +52,7 @@ def run (self): self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) - out = self.copy_file(f, self.install_dir) + (out, _) = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: # it's a tuple with path to install to and a list of files @@ -63,7 +63,7 @@ def run (self): dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: - out = self.copy_file(data, dir) + (out, _) = self.copy_file(data, dir) self.outfiles.append(out) def get_inputs (self): diff --git a/command/install_headers.py b/command/install_headers.py index ec0cf4412d..2d72a07b14 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -41,7 +41,7 @@ def run (self): self.mkpath(self.install_dir) for header in headers: - out = self.copy_file(header, self.install_dir) + (out, _) = self.copy_file(header, self.install_dir) self.outfiles.append(out) def get_inputs (self): From 28c8c4911fe821cda508e839dbeca6781e9dd924 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:35:26 +0000 Subject: [PATCH 0650/8469] Fixed 'run()' so it doesn't call 'bytecompile()' if 'install()' returned None. --- command/install_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index a603b4f59e..2c92f3fe4a 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -56,7 +56,8 @@ def run (self): outfiles = self.install() # (Optionally) compile .py to .pyc - self.bytecompile(outfiles) + if outfiles is not None: + self.bytecompile(outfiles) # run () From 48647d7afb29872232fd752601c017a428c47233 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 17:47:17 +0000 Subject: [PATCH 0651/8469] Andrew Kuchling: changed so the '_path_created' dictionary is keyed on absolute pathnames; this lets it keep working in the face of chdir'ing around. --- dir_util.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dir_util.py b/dir_util.py index 768cb4ebe7..a1578bed6a 100644 --- a/dir_util.py +++ b/dir_util.py @@ -44,7 +44,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): created_dirs = [] if os.path.isdir(name) or name == '': return created_dirs - if _path_created.get(name): + if _path_created.get(os.path.abspath(name)): return created_dirs (head, tail) = os.path.split(name) @@ -64,7 +64,9 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join(head, d) - if _path_created.get(head): + abs_head = os.path.abspath(head) + + if _path_created.get(abs_head): continue if verbose: @@ -78,7 +80,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): raise DistutilsFileError, \ "could not create '%s': %s" % (head, exc[-1]) - _path_created[head] = 1 + _path_created[abs_head] = 1 return created_dirs # mkpath () @@ -208,8 +210,9 @@ def remove_tree (directory, verbose=0, dry_run=0): try: apply(cmd[0], (cmd[1],)) # remove dir from cache if it's already there - if _path_created.has_key(cmd[1]): - del _path_created[cmd[1]] + abspath = os.path.abspath(cmd[1]) + if _path_created.has_key(abspath): + del _path_created[abspath] except (IOError, OSError), exc: if verbose: print grok_environment_error( From cade95e31186a5f2c4119d538e60ea58a44fa920 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 18:27:54 +0000 Subject: [PATCH 0652/8469] Standardized whitespace around function calls. --- command/bdist.py | 2 +- command/bdist_dumb.py | 12 ++-- command/bdist_rpm.py | 2 +- command/bdist_wininst.py | 88 ++++++++++++------------- command/build.py | 12 ++-- command/build_clib.py | 74 ++++++++++----------- command/build_ext.py | 127 ++++++++++++++++++------------------- command/build_py.py | 108 +++++++++++++++---------------- command/build_scripts.py | 6 +- command/clean.py | 20 +++--- command/config.py | 8 +-- command/install.py | 112 ++++++++++++++++---------------- command/install_scripts.py | 10 +-- command/sdist.py | 96 ++++++++++++++-------------- 14 files changed, 338 insertions(+), 339 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 8651e70954..c0cb1d3acd 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -132,7 +132,7 @@ def run (self): # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: sub_cmd.keep_temp = 1 - self.run_command (cmd_name) + self.run_command(cmd_name) # run() diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 520098db19..8dfc3271df 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -71,24 +71,24 @@ def finalize_options (self): def run (self): - self.run_command ('build') + self.run_command('build') install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir - self.announce ("installing to %s" % self.bdist_dir) + self.announce("installing to %s" % self.bdist_dir) self.run_command('install') # And make an archive relative to the root of the # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_fullname(), self.plat_name) - self.make_archive (os.path.join(self.dist_dir, archive_basename), - self.format, - root_dir=self.bdist_dir) + self.make_archive(os.path.join(self.dist_dir, archive_basename), + self.format, + root_dir=self.bdist_dir) if not self.keep_temp: - remove_tree (self.bdist_dir, self.verbose, self.dry_run) + remove_tree(self.bdist_dir, self.verbose, self.dry_run) # run() diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index c293f1f5e4..f421590488 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -258,7 +258,7 @@ def run (self): # Make a source distribution and copy to SOURCES directory with # optional icon. - sdist = self.reinitialize_command ('sdist') + sdist = self.reinitialize_command('sdist') if self.use_bzip2: sdist.formats = ['bztar'] else: diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3251bac07c..afe6955e77 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -56,8 +56,8 @@ def finalize_options (self): if self.distribution.has_ext_modules(): short_version = sys.version[:3] if self.target_version and self.target_version != short_version: - raise DistutilsOptionError ("target version can only be" + - short_version) + raise DistutilsOptionError, \ + "target version can only be" + short_version self.target_version = short_version self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) @@ -73,7 +73,7 @@ def run (self): ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") - self.run_command ('build') + self.run_command('build') install = self.reinitialize_command('install') install.root = self.bdist_dir @@ -91,7 +91,7 @@ def run (self): install_lib.ensure_finalized() - self.announce ("installing to %s" % self.bdist_dir) + self.announce("installing to %s" % self.bdist_dir) install.ensure_finalized() install.run() @@ -103,24 +103,24 @@ def run (self): # Our archive MUST be relative to sys.prefix, which is the # same as install_purelib in the 'nt' scheme. - root_dir = os.path.normpath (install.install_purelib) + root_dir = os.path.normpath(install.install_purelib) # Sanity check: Make sure everything is included for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): attrname = 'install_' + key - install_x = getattr (install, attrname) + install_x = getattr(install, attrname) # (Use normpath so that we can string.find to look for # subdirectories) - install_x = os.path.normpath (install_x) - if string.find (install_x, root_dir) != 0: + install_x = os.path.normpath(install_x) + if string.find(install_x, root_dir) != 0: raise DistutilsInternalError \ ("'%s' not included in install_lib" % key) - arcname = self.make_archive (archive_basename, "zip", - root_dir=root_dir) - self.create_exe (arcname, fullname) + arcname = self.make_archive(archive_basename, "zip", + root_dir=root_dir) + self.create_exe(arcname, fullname) if not self.keep_temp: - remove_tree (self.bdist_dir, self.verbose, self.dry_run) + remove_tree(self.bdist_dir, self.verbose, self.dry_run) # run() @@ -133,37 +133,37 @@ def get_inidata (self): # Write the [metadata] section. Values are written with # repr()[1:-1], so they do not contain unprintable characters, and # are not surrounded by quote chars. - lines.append ("[metadata]") + lines.append("[metadata]") # 'info' will be displayed in the installer's dialog box, # describing the items to be installed. info = (metadata.long_description or '') + '\n' - for name in dir (metadata): + for name in dir(metadata): if (name != 'long_description'): - data = getattr (metadata, name) + data = getattr(metadata, name) if data: info = info + ("\n %s: %s" % \ - (string.capitalize (name), data)) - lines.append ("%s=%s" % (name, repr (data)[1:-1])) + (string.capitalize(name), data)) + lines.append("%s=%s" % (name, repr(data)[1:-1])) # The [setup] section contains entries controlling # the installer runtime. - lines.append ("\n[Setup]") - lines.append ("info=%s" % repr (info)[1:-1]) - lines.append ("target_compile=%d" % (not self.no_target_compile)) - lines.append ("target_optimize=%d" % (not self.no_target_optimize)) + lines.append("\n[Setup]") + lines.append("info=%s" % repr(info)[1:-1]) + lines.append("target_compile=%d" % (not self.no_target_compile)) + lines.append("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: - lines.append ("target_version=%s" % self.target_version) + lines.append("target_version=%s" % self.target_version) title = self.distribution.get_fullname() - lines.append ("title=%s" % repr (title)[1:-1]) + lines.append("title=%s" % repr(title)[1:-1]) import time import distutils build_info = "Build %s with distutils-%s" % \ - (time.ctime (time.time()), distutils.__version__) - lines.append ("build_info=%s" % build_info) - return string.join (lines, "\n") + (time.ctime(time.time()), distutils.__version__) + lines.append("build_info=%s" % build_info) + return string.join(lines, "\n") # get_inidata() @@ -183,36 +183,36 @@ def create_exe (self, arcname, fullname): else: installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) - self.announce ("creating %s" % installer_name) + self.announce("creating %s" % installer_name) - file = open (installer_name, "wb") - file.write (self.get_exe_bytes ()) - file.write (cfgdata) - header = struct.pack ("' under the base build directory. We only use one of # them for a given distribution, though -- if self.build_purelib is None: - self.build_purelib = os.path.join (self.build_base, 'lib') + self.build_purelib = os.path.join(self.build_base, 'lib') if self.build_platlib is None: - self.build_platlib = os.path.join (self.build_base, - 'lib' + plat_specifier) + self.build_platlib = os.path.join(self.build_base, + 'lib' + plat_specifier) # 'build_lib' is the actual directory that we will use for this # particular module distribution -- if user didn't supply it, pick @@ -87,10 +87,10 @@ def finalize_options (self): # 'build_temp' -- temporary directory for compiler turds, # "build/temp." if self.build_temp is None: - self.build_temp = os.path.join (self.build_base, - 'temp' + plat_specifier) + self.build_temp = os.path.join(self.build_base, + 'temp' + plat_specifier) if self.build_scripts is None: - self.build_scripts = os.path.join (self.build_base, 'scripts') + self.build_scripts = os.path.join(self.build_base, 'scripts') # finalize_options () diff --git a/command/build_clib.py b/command/build_clib.py index 775b7ade5a..2726b975fa 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -80,22 +80,22 @@ def finalize_options (self): # I think that C libraries are really just temporary build # by-products, at least from the point of view of building Python # extensions -- but I want to keep my options open. - self.set_undefined_options ('build', - ('build_temp', 'build_clib'), - ('build_temp', 'build_temp'), - ('compiler', 'compiler'), - ('debug', 'debug'), - ('force', 'force')) + self.set_undefined_options('build', + ('build_temp', 'build_clib'), + ('build_temp', 'build_temp'), + ('compiler', 'compiler'), + ('debug', 'debug'), + ('force', 'force')) self.libraries = self.distribution.libraries if self.libraries: - self.check_library_list (self.libraries) + self.check_library_list(self.libraries) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type (self.include_dirs) is StringType: - self.include_dirs = string.split (self.include_dirs, - os.pathsep) + if type(self.include_dirs) is StringType: + self.include_dirs = string.split(self.include_dirs, + os.pathsep) # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? @@ -110,23 +110,23 @@ def run (self): # Yech -- this is cut 'n pasted from build_ext.py! from distutils.ccompiler import new_compiler - self.compiler = new_compiler (compiler=self.compiler, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) + self.compiler = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) customize_compiler(self.compiler) if self.include_dirs is not None: - self.compiler.set_include_dirs (self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name,value) in self.define: - self.compiler.define_macro (name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro (macro) + self.compiler.undefine_macro(macro) - self.build_libraries (self.libraries) + self.build_libraries(self.libraries) # run() @@ -141,16 +141,16 @@ def check_library_list (self, libraries): # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, # with only names changed to protect the innocent! - if type (libraries) is not ListType: + if type(libraries) is not ListType: raise DistutilsSetupError, \ "'libraries' option must be a list of tuples" for lib in libraries: - if type (lib) is not TupleType and len (lib) != 2: + if type(lib) is not TupleType and len(lib) != 2: raise DistutilsSetupError, \ "each element of 'libraries' must a 2-tuple" - if type (lib[0]) is not StringType: + if type(lib[0]) is not StringType: raise DistutilsSetupError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" @@ -160,7 +160,7 @@ def check_library_list (self, libraries): "may not contain directory separators") % \ lib[0] - if type (lib[1]) is not DictionaryType: + if type(lib[1]) is not DictionaryType: raise DistutilsSetupError, \ "second element of each tuple in 'libraries' " + \ "must be a dictionary (build info)" @@ -178,7 +178,7 @@ def get_library_names (self): lib_names = [] for (lib_name, build_info) in self.libraries: - lib_names.append (lib_name) + lib_names.append(lib_name) return lib_names # get_library_names () @@ -189,33 +189,33 @@ def build_libraries (self, libraries): compiler = self.compiler for (lib_name, build_info) in libraries: - sources = build_info.get ('sources') - if sources is None or type (sources) not in (ListType, TupleType): + sources = build_info.get('sources') + if sources is None or type(sources) not in (ListType, TupleType): raise DistutilsSetupError, \ ("in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % lib_name - sources = list (sources) + sources = list(sources) - self.announce ("building '%s' library" % lib_name) + self.announce("building '%s' library" % lib_name) # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) - macros = build_info.get ('macros') - include_dirs = build_info.get ('include_dirs') - objects = self.compiler.compile (sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=include_dirs, - debug=self.debug) + macros = build_info.get('macros') + include_dirs = build_info.get('include_dirs') + objects = self.compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=include_dirs, + debug=self.debug) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) - self.compiler.create_static_lib (objects, lib_name, - output_dir=self.build_clib, - debug=self.debug) + self.compiler.create_static_lib(objects, lib_name, + output_dir=self.build_clib, + debug=self.debug) # for libraries diff --git a/command/build_ext.py b/command/build_ext.py index 9147c3d07b..70e8a73455 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -112,12 +112,12 @@ def initialize_options (self): def finalize_options (self): from distutils import sysconfig - self.set_undefined_options ('build', - ('build_lib', 'build_lib'), - ('build_temp', 'build_temp'), - ('compiler', 'compiler'), - ('debug', 'debug'), - ('force', 'force')) + self.set_undefined_options('build', + ('build_lib', 'build_lib'), + ('build_temp', 'build_temp'), + ('compiler', 'compiler'), + ('debug', 'debug'), + ('force', 'force')) if self.package is None: self.package = self.distribution.ext_package @@ -131,17 +131,16 @@ def finalize_options (self): plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type (self.include_dirs) is StringType: - self.include_dirs = string.split (self.include_dirs, - os.pathsep) + if type(self.include_dirs) is StringType: + self.include_dirs = string.split(self.include_dirs, os.pathsep) # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. - self.include_dirs.append (py_include) + self.include_dirs.append(py_include) if plat_py_include != py_include: - self.include_dirs.append (plat_py_include) + self.include_dirs.append(plat_py_include) - if type (self.libraries) is StringType: + if type(self.libraries) is StringType: self.libraries = [self.libraries] # Life is easier if we're not forever checking for None, so @@ -157,11 +156,11 @@ def finalize_options (self): # for Release and Debug builds. # also Python's library directory must be appended to library_dirs if os.name == 'nt': - self.library_dirs.append (os.path.join(sys.exec_prefix, 'libs')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) if self.debug: - self.build_temp = os.path.join (self.build_temp, "Debug") + self.build_temp = os.path.join(self.build_temp, "Debug") else: - self.build_temp = os.path.join (self.build_temp, "Release") + self.build_temp = os.path.join(self.build_temp, "Release") # finalize_options () @@ -188,16 +187,16 @@ def run (self): # directory where we put them is in the library search path for # linking extensions. if self.distribution.has_c_libraries(): - build_clib = self.get_finalized_command ('build_clib') - self.libraries.extend (build_clib.get_library_names() or []) - self.library_dirs.append (build_clib.build_clib) + build_clib = self.get_finalized_command('build_clib') + self.libraries.extend(build_clib.get_library_names() or []) + self.library_dirs.append(build_clib.build_clib) # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler (compiler=self.compiler, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) + self.compiler = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) customize_compiler(self.compiler) # And make sure that any compile/link-related options (which might @@ -205,25 +204,25 @@ def run (self): # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs (self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name,value) in self.define: - self.compiler.define_macro (name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro (macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries (self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs (self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs (self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects (self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. - self.build_extensions () + self.build_extensions() # run () @@ -320,7 +319,7 @@ def get_source_files (self): # Wouldn't it be neat if we knew the names of header files too... for ext in self.extensions: - filenames.extend (ext.sources) + filenames.extend(ext.sources) return filenames @@ -330,16 +329,16 @@ def get_outputs (self): # Sanity check the 'extensions' list -- can't assume this is being # done in the same run as a 'build_extensions()' call (in fact, we # can probably assume that it *isn't*!). - self.check_extensions_list (self.extensions) + self.check_extensions_list(self.extensions) # And build the list of output (built) filenames. Note that this # ignores the 'inplace' flag, and assumes everything goes in the # "build" tree. outputs = [] for ext in self.extensions: - fullname = self.get_ext_fullname (ext.name) - outputs.append (os.path.join (self.build_lib, - self.get_ext_filename(fullname))) + fullname = self.get_ext_fullname(ext.name) + outputs.append(os.path.join(self.build_lib, + self.get_ext_filename(fullname))) return outputs # get_outputs () @@ -348,40 +347,40 @@ def get_outputs (self): def build_extensions (self): # First, sanity-check the 'extensions' list - self.check_extensions_list (self.extensions) + self.check_extensions_list(self.extensions) for ext in self.extensions: sources = ext.sources - if sources is None or type (sources) not in (ListType, TupleType): + if sources is None or type(sources) not in (ListType, TupleType): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % ext.name - sources = list (sources) + sources = list(sources) - fullname = self.get_ext_fullname (ext.name) + fullname = self.get_ext_fullname(ext.name) if self.inplace: # ignore build-lib -- put the compiled extension into # the source tree along with pure Python modules - modpath = string.split (fullname, '.') - package = string.join (modpath[0:-1], '.') + modpath = string.split(fullname, '.') + package = string.join(modpath[0:-1], '.') base = modpath[-1] - build_py = self.get_finalized_command ('build_py') - package_dir = build_py.get_package_dir (package) - ext_filename = os.path.join (package_dir, - self.get_ext_filename(base)) + build_py = self.get_finalized_command('build_py') + package_dir = build_py.get_package_dir(package) + ext_filename = os.path.join(package_dir, + self.get_ext_filename(base)) else: - ext_filename = os.path.join (self.build_lib, - self.get_ext_filename(fullname)) + ext_filename = os.path.join(self.build_lib, + self.get_ext_filename(fullname)) if not (self.force or newer_group(sources, ext_filename, 'newer')): - self.announce ("skipping '%s' extension (up-to-date)" % - ext.name) + self.announce("skipping '%s' extension (up-to-date)" % + ext.name) continue # 'for' loop over all extensions else: - self.announce ("building '%s' extension" % ext.name) + self.announce("building '%s' extension" % ext.name) # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list @@ -416,22 +415,22 @@ def build_extensions (self): if os.environ.has_key('CFLAGS'): extra_args.extend(string.split(os.environ['CFLAGS'])) - objects = self.compiler.compile (sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args) + objects = self.compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args) # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. if ext.extra_objects: - objects.extend (ext.extra_objects) + objects.extend(ext.extra_objects) extra_args = ext.extra_link_args or [] - self.compiler.link_shared_object ( + self.compiler.link_shared_object( objects, ext_filename, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -481,11 +480,11 @@ def swig_sources (self, sources): swig = self.find_swig() swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] if self.swig_cpp: - swig_cmd.append ("-c++") + swig_cmd.append("-c++") for source in swig_sources: target = swig_targets[source] - self.announce ("swigging %s to %s" % (source, target)) + self.announce("swigging %s to %s" % (source, target)) self.spawn(swig_cmd + ["-o", target, source]) return new_sources @@ -507,7 +506,7 @@ def find_swig (self): # if not, act like Unix and assume it's in the PATH. for vers in ("1.3", "1.2", "1.1"): fn = os.path.join("c:\\swig%s" % vers, "swig.exe") - if os.path.isfile (fn): + if os.path.isfile(fn): return fn else: return "swig.exe" @@ -535,12 +534,12 @@ def get_ext_filename (self, ext_name): """ from distutils.sysconfig import get_config_var - ext_path = string.split (ext_name, '.') + ext_path = string.split(ext_name, '.') # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply (os.path.join, ext_path) + '_d' + so_ext - return apply (os.path.join, ext_path) + so_ext + return apply(os.path.join, ext_path) + '_d' + so_ext + return apply(os.path.join, ext_path) + so_ext def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to diff --git a/command/build_py.py b/command/build_py.py index ebe30e8106..6a8a7f43f9 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -34,9 +34,9 @@ def initialize_options (self): self.force = None def finalize_options (self): - self.set_undefined_options ('build', - ('build_lib', 'build_lib'), - ('force', 'force')) + self.set_undefined_options('build', + ('build_lib', 'build_lib'), + ('force', 'force')) # Get the distribution options that are aliases for build_py # options -- list of packages and list of modules. @@ -83,9 +83,9 @@ def run (self): # Now we're down to two cases: 'py_modules' only and 'packages' only. if self.py_modules: - self.build_modules () + self.build_modules() else: - self.build_packages () + self.build_packages() # run () @@ -95,24 +95,24 @@ def get_package_dir (self, package): distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = string.split (package, '.') + path = string.split(package, '.') if not self.package_dir: if path: - return apply (os.path.join, path) + return apply(os.path.join, path) else: return '' else: tail = [] while path: try: - pdir = self.package_dir[string.join (path, '.')] + pdir = self.package_dir[string.join(path, '.')] except KeyError: - tail.insert (0, path[-1]) + tail.insert(0, path[-1]) del path[-1] else: - tail.insert (0, pdir) - return apply (os.path.join, tail) + tail.insert(0, pdir) + return apply(os.path.join, tail) else: # Oops, got all the way through 'path' without finding a # match in package_dir. If package_dir defines a directory @@ -126,7 +126,7 @@ def get_package_dir (self, package): tail.insert(0, pdir) if tail: - return apply (os.path.join, tail) + return apply(os.path.join, tail) else: return '' @@ -140,22 +140,22 @@ def check_package (self, package, package_dir): # my "empty string means current dir" convention, so we have to # circumvent them. if package_dir != "": - if not os.path.exists (package_dir): + if not os.path.exists(package_dir): raise DistutilsFileError, \ "package directory '%s' does not exist" % package_dir - if not os.path.isdir (package_dir): + if not os.path.isdir(package_dir): raise DistutilsFileError, \ ("supposed package directory '%s' exists, " + "but is not a directory") % package_dir # Require __init__.py for all but the "root package" if package: - init_py = os.path.join (package_dir, "__init__.py") - if os.path.isfile (init_py): + init_py = os.path.join(package_dir, "__init__.py") + if os.path.isfile(init_py): return init_py else: - self.warn (("package init file '%s' not found " + - "(or not a regular file)") % init_py) + self.warn(("package init file '%s' not found " + + "(or not a regular file)") % init_py) # Either not in a package at all (__init__.py not expected), or # __init__.py doesn't exist -- so don't return the filename. @@ -165,9 +165,9 @@ def check_package (self, package, package_dir): def check_module (self, module, module_file): - if not os.path.isfile (module_file): - self.warn ("file %s (for module %s) not found" % - (module_file, module)) + if not os.path.isfile(module_file): + self.warn("file %s (for module %s) not found" % + (module_file, module)) return 0 else: return 1 @@ -176,16 +176,16 @@ def check_module (self, module, module_file): def find_package_modules (self, package, package_dir): - self.check_package (package, package_dir) - module_files = glob (os.path.join (package_dir, "*.py")) + self.check_package(package, package_dir) + module_files = glob(os.path.join(package_dir, "*.py")) modules = [] setup_script = os.path.abspath(self.distribution.script_name) for f in module_files: - abs_f = os.path.abspath (f) + abs_f = os.path.abspath(f) if abs_f != setup_script: - module = os.path.splitext (os.path.basename (f))[0] - modules.append ((package, module, f)) + module = os.path.splitext(os.path.basename(f))[0] + modules.append((package, module, f)) else: self.debug_print("excluding %s" % setup_script) return modules @@ -218,18 +218,18 @@ def find_modules (self): # - don't check for __init__.py in directory for empty package for module in self.py_modules: - path = string.split (module, '.') + path = string.split(module, '.') package = string.join(path[0:-1], '.') module_base = path[-1] try: (package_dir, checked) = packages[package] except KeyError: - package_dir = self.get_package_dir (package) + package_dir = self.get_package_dir(package) checked = 0 if not checked: - init_py = self.check_package (package, package_dir) + init_py = self.check_package(package, package_dir) packages[package] = (package_dir, 1) if init_py: modules.append((package, "__init__", init_py)) @@ -237,11 +237,11 @@ def find_modules (self): # XXX perhaps we should also check for just .pyc files # (so greedy closed-source bastards can distribute Python # modules too) - module_file = os.path.join (package_dir, module_base + ".py") - if not self.check_module (module, module_file): + module_file = os.path.join(package_dir, module_base + ".py") + if not self.check_module(module, module_file): continue - modules.append ((package, module_base, module_file)) + modules.append((package, module_base, module_file)) return modules @@ -256,13 +256,13 @@ def find_all_modules (self): 'find_package_modules()' do.""" if self.py_modules: - modules = self.find_modules () + modules = self.find_modules() else: modules = [] for package in self.packages: - package_dir = self.get_package_dir (package) - m = self.find_package_modules (package, package_dir) - modules.extend (m) + package_dir = self.get_package_dir(package) + m = self.find_package_modules(package, package_dir) + modules.extend(m) return modules @@ -271,43 +271,43 @@ def find_all_modules (self): def get_source_files (self): - modules = self.find_all_modules () + modules = self.find_all_modules() filenames = [] for module in modules: - filenames.append (module[-1]) + filenames.append(module[-1]) return filenames def get_module_outfile (self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] - return apply (os.path.join, outfile_path) + return apply(os.path.join, outfile_path) def get_outputs (self): - modules = self.find_all_modules () + modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: - package = string.split (package, '.') - outputs.append (self.get_module_outfile (self.build_lib, - package, module)) + package = string.split(package, '.') + outputs.append(self.get_module_outfile(self.build_lib, + package, module)) return outputs def build_module (self, module, module_file, package): - if type (package) is StringType: - package = string.split (package, '.') - elif type (package) not in (ListType, TupleType): + if type(package) is StringType: + package = string.split(package, '.') + elif type(package) not in (ListType, TupleType): raise TypeError, \ "'package' must be a string (dot-separated), list, or tuple" # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_lib (the build # directory for Python source). - outfile = self.get_module_outfile (self.build_lib, package, module) - dir = os.path.dirname (outfile) - self.mkpath (dir) - return self.copy_file (module_file, outfile, preserve_mode=0) + outfile = self.get_module_outfile(self.build_lib, package, module) + dir = os.path.dirname(outfile) + self.mkpath(dir) + return self.copy_file(module_file, outfile, preserve_mode=0) def build_modules (self): @@ -319,7 +319,7 @@ def build_modules (self): # self.build_lib (the build directory for Python source). # (Actually, it gets copied to the directory for this package # under self.build_lib.) - self.build_module (module, module_file, package) + self.build_module(module, module_file, package) # build_modules () @@ -337,14 +337,14 @@ def build_packages (self): # already know its package!), and 'module_file' is the path to # the .py file, relative to the current directory # (ie. including 'package_dir'). - package_dir = self.get_package_dir (package) - modules = self.find_package_modules (package, package_dir) + package_dir = self.get_package_dir(package) + modules = self.find_package_modules(package, package_dir) # Now loop over the modules we found, "building" each one (just # copy it to self.build_lib). for (package_, module, module_file) in modules: assert package == package_ - self.build_module (module, module_file, package) + self.build_module(module, module_file, package) # build_packages () diff --git a/command/build_scripts.py b/command/build_scripts.py index eacf798996..495f4c372a 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -32,9 +32,9 @@ def initialize_options (self): self.outfiles = None def finalize_options (self): - self.set_undefined_options ('build', - ('build_scripts', 'build_dir'), - ('force', 'force')) + self.set_undefined_options('build', + ('build_scripts', 'build_dir'), + ('force', 'force')) self.scripts = self.distribution.scripts diff --git a/command/clean.py b/command/clean.py index 4f04f08be5..fb8822f766 100644 --- a/command/clean.py +++ b/command/clean.py @@ -50,29 +50,29 @@ def finalize_options(self): def run(self): # remove the build/temp. directory (unless it's already # gone) - if os.path.exists (self.build_temp): - remove_tree (self.build_temp, self.verbose, self.dry_run) + if os.path.exists(self.build_temp): + remove_tree(self.build_temp, self.verbose, self.dry_run) else: - self.warn ("'%s' does not exist -- can't clean it" % - self.build_temp) + self.warn("'%s' does not exist -- can't clean it" % + self.build_temp) if self.all: # remove build directories for directory in (self.build_lib, self.bdist_base, self.build_scripts): - if os.path.exists (directory): - remove_tree (directory, self.verbose, self.dry_run) + if os.path.exists(directory): + remove_tree(directory, self.verbose, self.dry_run) else: - self.warn ("'%s' does not exist -- can't clean it" % - directory) + self.warn("'%s' does not exist -- can't clean it" % + directory) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care if not self.dry_run: try: - os.rmdir (self.build_base) - self.announce ("removing '%s'" % self.build_base) + os.rmdir(self.build_base) + self.announce("removing '%s'" % self.build_base) except OSError: pass diff --git a/command/config.py b/command/config.py index 5c3f26a716..a13055cf8c 100644 --- a/command/config.py +++ b/command/config.py @@ -87,10 +87,10 @@ def _check_compiler (self): # import. from distutils.ccompiler import CCompiler, new_compiler if not isinstance(self.compiler, CCompiler): - self.compiler = new_compiler (compiler=self.compiler, - verbose=self.noisy, - dry_run=self.dry_run, - force=1) + self.compiler = new_compiler(compiler=self.compiler, + verbose=self.noisy, + dry_run=self.dry_run, + force=1) if self.include_dirs: self.compiler.set_include_dirs(self.include_dirs) if self.libraries: diff --git a/command/install.py b/command/install.py index 8c6aa1cff8..e9528c635d 100644 --- a/command/install.py +++ b/command/install.py @@ -210,10 +210,10 @@ def finalize_options (self): "not both") else: if self.exec_prefix: - self.warn ("exec-prefix option ignored on this platform") + self.warn("exec-prefix option ignored on this platform") self.exec_prefix = None if self.home: - self.warn ("home option ignored on this platform") + self.warn("home option ignored on this platform") self.home = None # Now the interesting logic -- so interesting that we farm it out @@ -224,14 +224,14 @@ def finalize_options (self): # install_{purelib,platlib,lib,scripts,data,...}, and the # INSTALL_SCHEME dictionary above. Phew! - self.dump_dirs ("pre-finalize_{unix,other}") + self.dump_dirs("pre-finalize_{unix,other}") if os.name == 'posix': - self.finalize_unix () + self.finalize_unix() else: - self.finalize_other () + self.finalize_other() - self.dump_dirs ("post-finalize_{unix,other}()") + self.dump_dirs("post-finalize_{unix,other}()") # Expand configuration variables, tilde, etc. in self.install_base # and self.install_platbase -- that way, we can use $base or @@ -250,9 +250,9 @@ def finalize_options (self): 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, } - self.expand_basedirs () + self.expand_basedirs() - self.dump_dirs ("post-expand_basedirs()") + self.dump_dirs("post-expand_basedirs()") # Now define config vars for the base directories so we can expand # everything else. @@ -262,13 +262,13 @@ def finalize_options (self): if DEBUG: from pprint import pprint print "config vars:" - pprint (self.config_vars) + pprint(self.config_vars) # Expand "~" and configuration variables in the installation # directories. - self.expand_dirs () + self.expand_dirs() - self.dump_dirs ("post-expand_dirs()") + self.dump_dirs("post-expand_dirs()") # Pick the actual directory to install all modules to: either # install_purelib or install_platlib, depending on whether this @@ -290,9 +290,9 @@ def finalize_options (self): # have to deal with 'extra_path', which is the hack for allowing # non-packagized module distributions (hello, Numerical Python!) to # get their own directories. - self.handle_extra_path () + self.handle_extra_path() self.install_libbase = self.install_lib # needed for .pth file - self.install_lib = os.path.join (self.install_lib, self.extra_dirs) + self.install_lib = os.path.join(self.install_lib, self.extra_dirs) # If a new root directory was supplied, make all the installation # dirs relative to it. @@ -300,12 +300,12 @@ def finalize_options (self): self.change_roots('libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers') - self.dump_dirs ("after prepending root") + self.dump_dirs("after prepending root") # Find out the build directories, ie. where to install from. - self.set_undefined_options ('build', - ('build_base', 'build_base'), - ('build_lib', 'build_lib')) + self.set_undefined_options('build', + ('build_base', 'build_base'), + ('build_lib', 'build_lib')) # Punt on doc directories for now -- after all, we're punting on # documentation completely! @@ -321,8 +321,8 @@ def dump_dirs (self, msg): opt_name = opt[0] if opt_name[-1] == "=": opt_name = opt_name[0:-1] - opt_name = string.translate (opt_name, longopt_xlate) - val = getattr (self, opt_name) + opt_name = string.translate(opt_name, longopt_xlate) + val = getattr(self, opt_name) print " %s: %s" % (opt_name, val) @@ -342,15 +342,15 @@ def finalize_unix (self): if self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme ("unix_home") + self.select_scheme("unix_home") else: if self.prefix is None: if self.exec_prefix is not None: raise DistutilsOptionError, \ "must not supply exec-prefix without prefix" - self.prefix = os.path.normpath (sys.prefix) - self.exec_prefix = os.path.normpath (sys.exec_prefix) + self.prefix = os.path.normpath(sys.prefix) + self.exec_prefix = os.path.normpath(sys.exec_prefix) else: if self.exec_prefix is None: @@ -358,7 +358,7 @@ def finalize_unix (self): self.install_base = self.prefix self.install_platbase = self.exec_prefix - self.select_scheme ("unix_prefix") + self.select_scheme("unix_prefix") # finalize_unix () @@ -366,11 +366,11 @@ def finalize_unix (self): def finalize_other (self): # Windows and Mac OS for now if self.prefix is None: - self.prefix = os.path.normpath (sys.prefix) + self.prefix = os.path.normpath(sys.prefix) self.install_base = self.install_platbase = self.prefix try: - self.select_scheme (os.name) + self.select_scheme(os.name) except KeyError: raise DistutilsPlatformError, \ "I don't know how to install stuff on '%s'" % os.name @@ -389,26 +389,26 @@ def select_scheme (self, name): def _expand_attrs (self, attrs): for attr in attrs: - val = getattr (self, attr) + val = getattr(self, attr) if val is not None: if os.name == 'posix': - val = os.path.expanduser (val) - val = subst_vars (val, self.config_vars) - setattr (self, attr, val) + val = os.path.expanduser(val) + val = subst_vars(val, self.config_vars) + setattr(self, attr, val) def expand_basedirs (self): - self._expand_attrs (['install_base', - 'install_platbase', - 'root']) + self._expand_attrs(['install_base', + 'install_platbase', + 'root']) def expand_dirs (self): - self._expand_attrs (['install_purelib', - 'install_platlib', - 'install_lib', - 'install_headers', - 'install_scripts', - 'install_data',]) + self._expand_attrs(['install_purelib', + 'install_platlib', + 'install_lib', + 'install_headers', + 'install_scripts', + 'install_data',]) def convert_paths (self, *names): @@ -423,12 +423,12 @@ def handle_extra_path (self): self.extra_path = self.distribution.extra_path if self.extra_path is not None: - if type (self.extra_path) is StringType: - self.extra_path = string.split (self.extra_path, ',') + if type(self.extra_path) is StringType: + self.extra_path = string.split(self.extra_path, ',') - if len (self.extra_path) == 1: + if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] - elif len (self.extra_path) == 2: + elif len(self.extra_path) == 2: (path_file, extra_dirs) = self.extra_path else: raise DistutilsOptionError, \ @@ -437,7 +437,7 @@ def handle_extra_path (self): # convert to local form in case Unix notation used (as it # should be in setup scripts) - extra_dirs = convert_path (extra_dirs) + extra_dirs = convert_path(extra_dirs) else: path_file = None @@ -463,21 +463,21 @@ def run (self): # Obviously have to build before we can install if not self.skip_build: - self.run_command ('build') + self.run_command('build') # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): - self.run_command (cmd_name) + self.run_command(cmd_name) if self.path_file: - self.create_path_file () + self.create_path_file() # write list of installed files, if requested. if self.record: outputs = self.get_outputs() if self.root: # strip any package prefix root_len = len(self.root) - for counter in xrange (len (outputs)): + for counter in xrange(len(outputs)): outputs[counter] = outputs[counter][root_len:] self.execute(write_file, (self.record, outputs), @@ -496,12 +496,12 @@ def run (self): # run () def create_path_file (self): - filename = os.path.join (self.install_libbase, - self.path_file + ".pth") + filename = os.path.join(self.install_libbase, + self.path_file + ".pth") if self.install_path_file: - self.execute (write_file, - (filename, [self.extra_dirs]), - "creating %s" % filename) + self.execute(write_file, + (filename, [self.extra_dirs]), + "creating %s" % filename) else: self.warn("path file '%s' not created" % filename) @@ -513,8 +513,8 @@ def get_outputs (self): # get the outputs of all its sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): - cmd = self.get_finalized_command (cmd_name) - outputs.extend (cmd.get_outputs()) + cmd = self.get_finalized_command(cmd_name) + outputs.extend(cmd.get_outputs()) return outputs @@ -522,8 +522,8 @@ def get_inputs (self): # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): - cmd = self.get_finalized_command (cmd_name) - inputs.extend (cmd.get_inputs()) + cmd = self.get_finalized_command(cmd_name) + inputs.extend(cmd.get_inputs()) return inputs diff --git a/command/install_scripts.py b/command/install_scripts.py index b8938c48de..3bc23e7460 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -33,11 +33,11 @@ def initialize_options (self): def finalize_options (self): self.set_undefined_options('build', ('build_scripts', 'build_dir')) - self.set_undefined_options ('install', - ('install_scripts', 'install_dir'), - ('force', 'force'), - ('skip_build', 'skip_build'), - ) + self.set_undefined_options('install', + ('install_scripts', 'install_dir'), + ('force', 'force'), + ('skip_build', 'skip_build'), + ) def run (self): if not self.skip_build: diff --git a/command/sdist.py b/command/sdist.py index adaf4925f2..5116868e76 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -118,7 +118,7 @@ def finalize_options (self): "don't know how to create source distributions " + \ "on platform %s" % os.name - bad_format = archive_util.check_archive_formats (self.formats) + bad_format = archive_util.check_archive_formats(self.formats) if bad_format: raise DistutilsOptionError, \ "unknown archive format '%s'" % bad_format @@ -135,12 +135,12 @@ def run (self): # Ensure that all required meta-data is given; warn if not (but # don't die, it's not *that* serious!) - self.check_metadata () + self.check_metadata() # Do whatever it takes to get the list of files to process # (process the manifest template, read an existing manifest, # whatever). File list is accumulated in 'self.filelist'. - self.get_file_list () + self.get_file_list() # If user just wanted us to regenerate the manifest, stop now. if self.manifest_only: @@ -148,7 +148,7 @@ def run (self): # Otherwise, go ahead and create the source distribution tarball, # or zipfile, or whatever. - self.make_distribution () + self.make_distribution() def check_metadata (self): @@ -161,25 +161,25 @@ def check_metadata (self): missing = [] for attr in ('name', 'version', 'url'): - if not (hasattr (metadata, attr) and getattr (metadata, attr)): - missing.append (attr) + if not (hasattr(metadata, attr) and getattr(metadata, attr)): + missing.append(attr) if missing: - self.warn ("missing required meta-data: " + - string.join (missing, ", ")) + self.warn("missing required meta-data: " + + string.join(missing, ", ")) if metadata.author: if not metadata.author_email: - self.warn ("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") + self.warn("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") elif metadata.maintainer: if not metadata.maintainer_email: - self.warn ("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") + self.warn("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") else: - self.warn ("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") + self.warn("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + + "must be supplied") # check_metadata () @@ -282,41 +282,41 @@ def add_defaults (self): standards = [('README', 'README.txt'), self.distribution.script_name] for fn in standards: - if type (fn) is TupleType: + if type(fn) is TupleType: alts = fn got_it = 0 for fn in alts: - if os.path.exists (fn): + if os.path.exists(fn): got_it = 1 - self.filelist.append (fn) + self.filelist.append(fn) break if not got_it: - self.warn ("standard file not found: should have one of " + - string.join (alts, ', ')) + self.warn("standard file not found: should have one of " + + string.join(alts, ', ')) else: - if os.path.exists (fn): - self.filelist.append (fn) + if os.path.exists(fn): + self.filelist.append(fn) else: - self.warn ("standard file '%s' not found" % fn) + self.warn("standard file '%s' not found" % fn) optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = filter (os.path.isfile, glob (pattern)) + files = filter(os.path.isfile, glob(pattern)) if files: - self.filelist.extend (files) + self.filelist.extend(files) if self.distribution.has_pure_modules(): - build_py = self.get_finalized_command ('build_py') - self.filelist.extend (build_py.get_source_files ()) + build_py = self.get_finalized_command('build_py') + self.filelist.extend(build_py.get_source_files()) if self.distribution.has_ext_modules(): - build_ext = self.get_finalized_command ('build_ext') - self.filelist.extend (build_ext.get_source_files ()) + build_ext = self.get_finalized_command('build_ext') + self.filelist.extend(build_ext.get_source_files()) if self.distribution.has_c_libraries(): - build_clib = self.get_finalized_command ('build_clib') - self.filelist.extend (build_clib.get_source_files ()) + build_clib = self.get_finalized_command('build_clib') + self.filelist.extend(build_clib.get_source_files()) # add_defaults () @@ -329,13 +329,13 @@ def read_template (self): accordingly. """ self.announce("reading manifest template '%s'" % self.template) - template = TextFile (self.template, - strip_comments=1, - skip_blanks=1, - join_lines=1, - lstrip_ws=1, - rstrip_ws=1, - collapse_join=1) + template = TextFile(self.template, + strip_comments=1, + skip_blanks=1, + join_lines=1, + lstrip_ws=1, + rstrip_ws=1, + collapse_join=1) while 1: line = template.readline() @@ -386,14 +386,14 @@ def read_manifest (self): distribution. """ self.announce("reading manifest file '%s'" % self.manifest) - manifest = open (self.manifest) + manifest = open(self.manifest) while 1: - line = manifest.readline () + line = manifest.readline() if line == '': # end of file break if line[-1] == '\n': line = line[0:-1] - self.filelist.append (line) + self.filelist.append(line) # read_manifest () @@ -421,7 +421,7 @@ def make_release_tree (self, base_dir, files): # out-of-date, because by default we blow away 'base_dir' when # we're done making the distribution archives.) - if hasattr (os, 'link'): # can make hard links on this system + if hasattr(os, 'link'): # can make hard links on this system link = 'hard' msg = "making hard links in %s..." % base_dir else: # nope, have to copy @@ -431,13 +431,13 @@ def make_release_tree (self, base_dir, files): if not files: self.warn("no files to distribute -- empty manifest?") else: - self.announce (msg) + self.announce(msg) for file in files: if not os.path.isfile(file): self.warn("'%s' not a regular file -- skipping" % file) else: - dest = os.path.join (base_dir, file) - self.copy_file (file, dest, link=link) + dest = os.path.join(base_dir, file) + self.copy_file(file, dest, link=link) # make_release_tree () @@ -455,16 +455,16 @@ def make_distribution (self): base_dir = self.distribution.get_fullname() base_name = os.path.join(self.dist_dir, base_dir) - self.make_release_tree (base_dir, self.filelist.files) + self.make_release_tree(base_dir, self.filelist.files) archive_files = [] # remember names of files we create for fmt in self.formats: - file = self.make_archive (base_name, fmt, base_dir=base_dir) + file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) self.archive_files = archive_files if not self.keep_temp: - dir_util.remove_tree (base_dir, self.verbose, self.dry_run) + dir_util.remove_tree(base_dir, self.verbose, self.dry_run) def get_archive_files (self): """Return the list of archive files created when the command From e125b16ff055a9b864f749cc48dcc94e8191a123 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 18:40:42 +0000 Subject: [PATCH 0653/8469] Reformat docstrings. --- util.py | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/util.py b/util.py index 016119ce66..4f972ffd91 100644 --- a/util.py +++ b/util.py @@ -59,15 +59,15 @@ def get_platform (): def convert_path (pathname): - """Return 'pathname' as a name that will work on the native - filesystem, i.e. split it on '/' and put it back together again - using the current directory separator. Needed because filenames in - the setup script are always supplied in Unix style, and have to be - converted to the local convention before we can actually use them in - the filesystem. Raises ValueError if 'pathname' is - absolute (starts with '/') or contains local directory separators - (unless the local separator is '/', of course).""" - + """Return 'pathname' as a name that will work on the native filesystem, + i.e. split it on '/' and put it back together again using the current + directory separator. Needed because filenames in the setup script are + always supplied in Unix style, and have to be converted to the local + convention before we can actually use them in the filesystem. Raises + ValueError if 'pathname' is absolute (starts with '/') or contains + local directory separators (unless the local separator is '/', of + course). + """ if os.sep == '/': return pathname if pathname[0] == '/': @@ -116,13 +116,12 @@ def change_root (new_root, pathname): _environ_checked = 0 def check_environ (): """Ensure that 'os.environ' has all the environment variables we - guarantee that users can use in config files, command-line - options, etc. Currently this includes: - HOME - user's home directory (Unix only) - PLAT - description of the current platform, including hardware - and OS (see 'get_platform()') + guarantee that users can use in config files, command-line options, + etc. Currently this includes: + HOME - user's home directory (Unix only) + PLAT - description of the current platform, including hardware + and OS (see 'get_platform()') """ - global _environ_checked if _environ_checked: return @@ -138,15 +137,15 @@ def check_environ (): def subst_vars (str, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. - Every occurrence of '$' followed by a name, or a name enclosed in - braces, is considered a variable. Every variable is substituted by - the value found in the 'local_vars' dictionary, or in 'os.environ' - if it's not in 'local_vars'. 'os.environ' is first checked/ - augmented to guarantee that it contains certain values: see - '_check_environ()'. Raise ValueError for any variables not found in - either 'local_vars' or 'os.environ'.""" - + """Perform shell/Perl-style variable substitution on 'string'. Every + occurrence of '$' followed by a name, or a name enclosed in braces, is + considered a variable. Every variable is substituted by the value + found in the 'local_vars' dictionary, or in 'os.environ' if it's not in + 'local_vars'. 'os.environ' is first checked/ augmented to guarantee + that it contains certain values: see '_check_environ()'. Raise + ValueError for any variables not found in either 'local_vars' or + 'os.environ'. + """ check_environ() def _subst (match, local_vars=local_vars): var_name = match.group(1) From 2cefa8512551672a267241aa0c7c783c272325e0 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 18:49:14 +0000 Subject: [PATCH 0654/8469] Various docstring tweaks. Fixed 'subst_vars()' so it actually blows up like the docstring claims (and fixed the docstring not to claim it handles ${var}, which it doesn't). --- util.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/util.py b/util.py index 4f972ffd91..1a1ec6d858 100644 --- a/util.py +++ b/util.py @@ -1,7 +1,8 @@ """distutils.util Miscellaneous utility functions -- anything that doesn't fit into -one of the other *util.py modules.""" +one of the other *util.py modules. +""" # created 1999/03/08, Greg Ward @@ -64,9 +65,8 @@ def convert_path (pathname): directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local convention before we can actually use them in the filesystem. Raises - ValueError if 'pathname' is absolute (starts with '/') or contains - local directory separators (unless the local separator is '/', of - course). + ValueError on non-Unix-ish systems if 'pathname' either starts or + ends with a slash. """ if os.sep == '/': return pathname @@ -138,13 +138,12 @@ def check_environ (): def subst_vars (str, local_vars): """Perform shell/Perl-style variable substitution on 'string'. Every - occurrence of '$' followed by a name, or a name enclosed in braces, is - considered a variable. Every variable is substituted by the value - found in the 'local_vars' dictionary, or in 'os.environ' if it's not in - 'local_vars'. 'os.environ' is first checked/ augmented to guarantee - that it contains certain values: see '_check_environ()'. Raise - ValueError for any variables not found in either 'local_vars' or - 'os.environ'. + occurrence of '$' followed by a name is considered a variable, and + variable is substituted by the value found in the 'local_vars' + dictionary, or in 'os.environ' if it's not in 'local_vars'. + 'os.environ' is first checked/augmented to guarantee that it contains + certain values: see 'check_environ()'. Raise ValueError for any + variables not found in either 'local_vars' or 'os.environ'. """ check_environ() def _subst (match, local_vars=local_vars): @@ -154,7 +153,10 @@ def _subst (match, local_vars=local_vars): else: return os.environ[var_name] - return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) + try: + return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) + except KeyError, var: + raise ValueError, "invalid variable '$%s'" % var # subst_vars () From 016c9e3595524f13467fe2192e5509f9469725a6 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 20:37:56 +0000 Subject: [PATCH 0655/8469] Added 'byte_compile(): an all-singing, all-dancing wrapper around the standard 'py_compile.compile()' function. Laundry list of features: - handles standard Distutils 'force', 'verbose', 'dry_run' flags - handles various levels of optimization: can compile directly in this interpreter process, or write a temporary script that is then executed by a new interpreter with the appropriate flags - can rewrite the source filename by stripping an optional prefix and preprending an optional base dir. --- util.py | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 1a1ec6d858..03234847a6 100644 --- a/util.py +++ b/util.py @@ -8,8 +8,9 @@ __revision__ = "$Id$" -import sys, os, string, re, shutil -from distutils.errors import * +import sys, os, string, re +from distutils.errors import DistutilsPlatformError +from distutils.dep_util import newer from distutils.spawn import spawn @@ -289,3 +290,129 @@ def strtobool (val): return 0 else: raise ValueError, "invalid truth value %s" % `val` + + +def byte_compile (py_files, + optimize=0, force=0, + prefix=None, base_dir=None, + verbose=1, dry_run=0, + direct=None): + """Byte-compile a collection of Python source files to either + .pyc or .pyo files in the same directory. 'optimize' must be + one of the following: + 0 - don't optimize (generate .pyc) + 1 - normal optimization (like "python -O") + 2 - extra optimization (like "python -OO") + If 'force' is true, all files are recompiled regardless of + timestamps. + + The source filename encoded in each bytecode file defaults to the + filenames listed in 'py_files'; you can modify these with 'prefix' and + 'basedir'. 'prefix' is a string that will be stripped off of each + source filename, and 'base_dir' is a directory name that will be + prepended (after 'prefix' is stripped). You can supply either or both + (or neither) of 'prefix' and 'base_dir', as you wish. + + If 'verbose' is true, prints out a report of each file. If 'dry_run' + is true, doesn't actually do anything that would affect the filesystem. + + Byte-compilation is either done directly in this interpreter process + with the standard py_compile module, or indirectly by writing a + temporary script and executing it. Normally, you should let + 'byte_compile()' figure out to use direct compilation or not (see + the source for details). The 'direct' flag is used by the script + generated in indirect mode; unless you know what you're doing, leave + it set to None. + """ + + # First, if the caller didn't force us into direct or indirect mode, + # figure out which mode we should be in. We take a conservative + # approach: choose direct mode *only* if the current interpreter is + # in debug mode and optimize is 0. If we're not in debug mode (-O + # or -OO), we don't know which level of optimization this + # interpreter is running with, so we can't do direct + # byte-compilation and be certain that it's the right thing. Thus, + # always compile indirectly if the current interpreter is in either + # optimize mode, or if either optimization level was requested by + # the caller. + if direct is None: + direct = (__debug__ and optimize == 0) + + # "Indirect" byte-compilation: write a temporary script and then + # run it with the appropriate flags. + if not direct: + from tempfile import mktemp + script_name = mktemp(".py") + if verbose: + print "writing byte-compilation script '%s'" % script_name + if not dry_run: + script = open(script_name, "w") + + script.write("""\ +from distutils.util import byte_compile +files = [ +""") + script.write(string.join(map(repr, py_files), ",\n") + "]\n") + script.write(""" +byte_compile(files, optimize=%s, force=%s, + prefix=%s, base_dir=%s, + verbose=%s, dry_run=0, + direct=1) +""" % (`optimize`, `force`, `prefix`, `base_dir`, `verbose`)) + + script.close() + + cmd = [sys.executable, script_name] + if optimize == 1: + cmd.insert(1, "-O") + elif optimize == 2: + cmd.insert(1, "-OO") + spawn(cmd, verbose=verbose, dry_run=dry_run) + + # "Direct" byte-compilation: use the py_compile module to compile + # right here, right now. Note that the script generated in indirect + # mode simply calls 'byte_compile()' in direct mode, a weird sort of + # cross-process recursion. Hey, it works! + else: + from py_compile import compile + + for file in py_files: + if file[-3:] != ".py": + raise ValueError, \ + "invalid filename: %s doesn't end with '.py'" % `file` + + # Terminology from the py_compile module: + # cfile - byte-compiled file + # dfile - purported source filename (same as 'file' by default) + cfile = file + (__debug__ and "c" or "o") + dfile = file + if prefix: + if file[:len(prefix)] != prefix: + raise ValueError, \ + ("invalid prefix: filename %s doesn't start with %s" + % (`file`, `prefix`)) + dfile = dfile[len(prefix):] + if base_dir: + dfile = os.path.join(base_dir, dfile) + + cfile_base = os.path.basename(cfile) + if direct: + if force or newer(file, cfile): + if verbose: + print "byte-compiling %s to %s" % (file, cfile_base) + if not dry_run: + compile(file, cfile, dfile) + else: + if verbose: + print "skipping byte-compilation of %s to %s" % \ + (file, cfile_base) + +# byte_compile () + + +if __name__ == "__main__": + import glob + f = glob.glob("command/*.py") + byte_compile(f, optimize=0, prefix="command/", base_dir="/usr/lib/python") + #byte_compile(f, optimize=1) + #byte_compile(f, optimize=2) From c2c1bbc37b9dea94262111b0d050c6d6e9fd024e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 30 Sep 2000 20:39:09 +0000 Subject: [PATCH 0656/8469] Reduced the 'bytecompile()' method to a one-line wrapper around 'util.byte_compile()'. Currently just reproduces the existing functionality -- doesn't use any of the fancy features in the new 'byte_compile()'. --- command/install_lib.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 2c92f3fe4a..6ad0a54b32 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -5,6 +5,7 @@ import sys, os, string from distutils.core import Command from distutils.dir_util import copy_tree +from distutils.util import byte_compile class install_lib (Command): @@ -82,21 +83,9 @@ def install (self): return outfiles def bytecompile (self, files): - # XXX hey! we can't control whether we optimize or not; that's up - # to the invocation of the current Python interpreter (at least - # according to the py_compile docs). That sucks. - if self.compile: - from py_compile import compile - - for f in files: - # only compile the file if it is actually a .py file - if f[-3:] == '.py': - out_fn = f + (__debug__ and "c" or "o") - compile_msg = "byte-compiling %s to %s" % \ - (f, os.path.basename(out_fn)) - skip_msg = "skipping byte-compilation of %s" % f - self.make_file(f, out_fn, compile, (f,), - compile_msg, skip_msg) + byte_compile(files, + force=self.force, + verbose=self.verbose, dry_run=self.dry_run) # -- Utility methods ----------------------------------------------- From 9a39df987d712514e23769e43651dd72768e0289 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 1 Oct 2000 23:49:30 +0000 Subject: [PATCH 0657/8469] Tweaked 'byte_compile()' so it silently skips non-Python files, rather than blowing up. --- util.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index 03234847a6..563e47c4bd 100644 --- a/util.py +++ b/util.py @@ -297,9 +297,10 @@ def byte_compile (py_files, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None): - """Byte-compile a collection of Python source files to either - .pyc or .pyo files in the same directory. 'optimize' must be - one of the following: + """Byte-compile a collection of Python source files to either .pyc + or .pyo files in the same directory. 'py_files' is a list of files + to compile; any files that don't end in ".py" are silently skipped. + 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -378,8 +379,9 @@ def byte_compile (py_files, for file in py_files: if file[-3:] != ".py": - raise ValueError, \ - "invalid filename: %s doesn't end with '.py'" % `file` + # This lets us be lazy and not filter filenames in + # the "install_lib" command. + continue # Terminology from the py_compile module: # cfile - byte-compiled file From 1e229b65b2fd026127f9507e1a5eb2bf5716b6d3 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 1 Oct 2000 23:50:13 +0000 Subject: [PATCH 0658/8469] From 'run()', only call 'bytecompile()' if we actually have pure Python modules to compile. --- command/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 6ad0a54b32..2396eedad3 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -57,7 +57,7 @@ def run (self): outfiles = self.install() # (Optionally) compile .py to .pyc - if outfiles is not None: + if outfiles is not None and self.distribution.has_pure_modules(): self.bytecompile(outfiles) # run () From 0c6e44515410c371cbb4f4d3589f8554e7f217ab Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 2 Oct 2000 02:09:55 +0000 Subject: [PATCH 0659/8469] Remove the temporary byte-compilation script when we're done with it. --- util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util.py b/util.py index 563e47c4bd..8a8b77afef 100644 --- a/util.py +++ b/util.py @@ -369,6 +369,7 @@ def byte_compile (py_files, elif optimize == 2: cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) + os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile # right here, right now. Note that the script generated in indirect From af0b04bbeb4b4811fcf2892856cfc4154841bda7 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 2 Oct 2000 02:15:08 +0000 Subject: [PATCH 0660/8469] Finished the overhaul of byte-compilation options: there's now a 6-way choice between (compile, no-compile) * (optimize=0, optimize=1, optimize=2). Details: - added --no-compile option to complement --compile, which has been there for ages - changed --optimize (which never worked) to a value option, which expects 0, 1, or 2 - renamed 'bytecompile()' method to 'byte_compile()', and beefed it up to handle both 'compile' and 'optimize' options - fix '_bytecode_filenames()' to respect the new options --- command/install_lib.py | 81 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 15 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 2396eedad3..80da3acc86 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -3,24 +3,44 @@ __revision__ = "$Id$" import sys, os, string +from types import IntType from distutils.core import Command +from distutils.errors import DistutilsOptionError from distutils.dir_util import copy_tree -from distutils.util import byte_compile class install_lib (Command): description = "install all Python modules (extensions and pure Python)" + # The byte-compilation options are a tad confusing. Here are the + # possible scenarios: + # 1) no compilation at all (--no-compile --no-optimize) + # 2) compile .pyc only (--compile --no-optimize; default) + # 3) compile .pyc and "level 1" .pyo (--compile --optimize) + # 4) compile "level 1" .pyo only (--no-compile --optimize) + # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more) + # 6) compile "level 2" .pyo only (--no-compile --optimize-more) + # + # The UI for this is two option, 'compile' and 'optimize'. + # 'compile' is strictly boolean, and only decides whether to + # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and + # decides both whether to generate .pyo files and what level of + # optimization to use. + user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), - ('compile', 'c', "compile .py to .pyc"), - ('optimize', 'o', "compile .py to .pyo (optimized)"), + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('skip-build', None, "skip the build steps"), ] - boolean_options = ['force', 'compile', 'optimize', 'skip-build'] + boolean_options = ['force', 'compile', 'skip-build'] + negative_opt = {'no-compile' : 'compile'} def initialize_options (self): @@ -28,8 +48,8 @@ def initialize_options (self): self.install_dir = None self.build_dir = None self.force = 0 - self.compile = 1 - self.optimize = 1 + self.compile = None + self.optimize = None self.skip_build = None def finalize_options (self): @@ -41,11 +61,25 @@ def finalize_options (self): ('build_lib', 'build_dir'), ('install_lib', 'install_dir'), ('force', 'force'), - ('compile_py', 'compile'), - ('optimize_py', 'optimize'), + ('compile', 'compile'), + ('optimize', 'optimize'), ('skip_build', 'skip_build'), ) + if self.compile is None: + self.compile = 1 + if self.optimize is None: + self.optimize = 0 + + print "install_lib: compile=%s, optimize=%s" % \ + (`self.compile`, `self.optimize`) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" + def run (self): # Make sure we have built everything we need first @@ -58,7 +92,7 @@ def run (self): # (Optionally) compile .py to .pyc if outfiles is not None and self.distribution.has_pure_modules(): - self.bytecompile(outfiles) + self.byte_compile(outfiles) # run () @@ -82,10 +116,25 @@ def install (self): return return outfiles - def bytecompile (self, files): - byte_compile(files, - force=self.force, - verbose=self.verbose, dry_run=self.dry_run) + def byte_compile (self, files): + from distutils.util import byte_compile + + # Get the "--root" directory supplied to the "install" command, + # and use it as a prefix to strip off the purported filename + # encoded in bytecode files. This is far from complete, but it + # should at least generate usable bytecode in RPM distributions. + install_root = self.get_finalized_command('install').root + + if self.compile: + byte_compile(files, optimize=0, + force=self.force, + prefix=install_root, + verbose=self.verbose, dry_run=self.dry_run) + if self.optimize > 0: + byte_compile(files, optimize=self.optimize, + force=self.force, + prefix=install_root, + verbose=self.verbose, dry_run=self.dry_run) # -- Utility methods ----------------------------------------------- @@ -111,8 +160,10 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): def _bytecode_filenames (self, py_filenames): bytecode_files = [] for py_file in py_filenames: - bytecode = py_file + (__debug__ and "c" or "o") - bytecode_files.append(bytecode) + if self.compile: + bytecode_files.append(py_file + "c") + if self.optmize > 0: + bytecode_files.append(py_file + "o") return bytecode_files From 6bccb12b568be281d7e54b5ef3c5ff67ca6163bc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 2 Oct 2000 02:16:04 +0000 Subject: [PATCH 0661/8469] Added --compile, --optimize options so users have an easy way to instruct the "install_lib" command from the command-line. --- command/install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/command/install.py b/command/install.py index e9528c635d..303ae4c02d 100644 --- a/command/install.py +++ b/command/install.py @@ -90,6 +90,15 @@ class install (Command): ('install-data=', None, "installation directory for data files"), + # Byte-compilation options -- see install_lib.py for details, as + # these are duplicated from there (but only install_lib does + # anything with them). + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), + # Miscellaneous control options ('force', 'f', "force installation (overwrite any existing files)"), @@ -135,6 +144,9 @@ def initialize_options (self): self.install_scripts = None self.install_data = None + self.compile = None + self.optimize = None + # These two are for putting non-packagized distributions into their # own directory and creating a .pth file if it makes sense. # 'extra_path' comes from the setup file; 'install_path_file' can From 7acf599bd33799d9e5b000b8d7e233a13464211d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 2 Oct 2000 02:19:04 +0000 Subject: [PATCH 0662/8469] Added the ability to do byte-compilation at build time, currently off by default (since compiling at install time works just fine). Details: - added 'compile' and 'optimize' options - added 'byte_compile()' method - changed 'get_outputs()' so it includes bytecode files A lot of the code added is very similar to code in install_lib.py; would be nice to factor it out further. --- command/build_py.py | 56 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 6a8a7f43f9..6fd4417f48 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -20,10 +20,16 @@ class build_py (Command): user_options = [ ('build-lib=', 'd', "directory to \"build\" (copy) to"), + ('compile', 'c', "compile .py to .pyc"), + ('no-compile', None, "don't compile .py files [default]"), + ('optimize=', 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] - boolean_options = ['force'] + boolean_options = ['compile', 'force'] + negative_opt = {'no-compile' : 'compile'} def initialize_options (self): @@ -31,6 +37,8 @@ def initialize_options (self): self.py_modules = None self.package = None self.package_dir = None + self.compile = 0 + self.optimize = 0 self.force = None def finalize_options (self): @@ -44,6 +52,14 @@ def finalize_options (self): self.py_modules = self.distribution.py_modules self.package_dir = self.distribution.package_dir + # Ick, copied straight from install_lib.py (fancy_getopt needs a + # type system! Hell, *everything* needs a type system!!!) + if type(self.optimize) is not IntType: + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError, "optimize must be 0, 1, or 2" def run (self): @@ -87,6 +103,8 @@ def run (self): else: self.build_packages() + self.byte_compile(self.get_outputs(include_bytecode=0)) + # run () @@ -284,13 +302,19 @@ def get_module_outfile (self, build_dir, package, module): return apply(os.path.join, outfile_path) - def get_outputs (self): + def get_outputs (self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: package = string.split(package, '.') - outputs.append(self.get_module_outfile(self.build_lib, - package, module)) + filename = self.get_module_outfile(self.build_lib, package, module) + outputs.append(filename) + if include_bytecode: + if self.compile: + outputs.append(filename + "c") + if self.optimize > 0: + outputs.append(filename + "o") + return outputs @@ -347,5 +371,27 @@ def build_packages (self): self.build_module(module, module_file, package) # build_packages () - + + + def byte_compile (self, files): + from distutils.util import byte_compile + prefix = self.build_lib + if prefix[-1] != os.sep: + prefix = prefix + os.sep + + # XXX this code is essentially the same as the 'byte_compile() + # method of the "install_lib" command, except for the determination + # of the 'prefix' string. Hmmm. + + if self.compile: + byte_compile(files, optimize=0, + force=self.force, + prefix=prefix, + verbose=self.verbose, dry_run=self.dry_run) + if self.optimize > 0: + byte_compile(files, optimize=self.optimize, + force=self.force, + prefix=prefix, + verbose=self.verbose, dry_run=self.dry_run) + # class build_py From d2497ea9a9cfcf3a2869d5251437cfea6ff473cc Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Mon, 2 Oct 2000 02:25:51 +0000 Subject: [PATCH 0663/8469] Typo fix. --- command/install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 80da3acc86..804dcffa60 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -162,7 +162,7 @@ def _bytecode_filenames (self, py_filenames): for py_file in py_filenames: if self.compile: bytecode_files.append(py_file + "c") - if self.optmize > 0: + if self.optimize > 0: bytecode_files.append(py_file + "o") return bytecode_files From 94052cd86e69fe242219496b66427f1e429994df Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 3 Oct 2000 03:31:05 +0000 Subject: [PATCH 0664/8469] Added a long-winded comment (and commented-out comment to go with out) about how it would be nice to write absolute paths to the temporary byte-compilation script, but this doesn't work because it screws up the trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()' method. Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary script: now it doesn't blow up in dry-run mode! --- util.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 8a8b77afef..7522ee2499 100644 --- a/util.py +++ b/util.py @@ -353,6 +353,21 @@ def byte_compile (py_files, from distutils.util import byte_compile files = [ """) + + # XXX would be nice to write absolute filenames, just for + # safety's sake (script should be more robust in the face of + # chdir'ing before running it). But this requires abspath'ing + # 'prefix' as well, and that breaks the hack in build_lib's + # 'byte_compile()' method that carefully tacks on a trailing + # slash (os.sep really) to make sure the prefix here is "just + # right". This whole prefix business is rather delicate -- the + # problem is that it's really a directory, but I'm treating it + # as a dumb string, so trailing slashes and so forth matter. + + #py_files = map(os.path.abspath, py_files) + #if prefix: + # prefix = os.path.abspath(prefix) + script.write(string.join(map(repr, py_files), ",\n") + "]\n") script.write(""" byte_compile(files, optimize=%s, force=%s, @@ -369,7 +384,8 @@ def byte_compile (py_files, elif optimize == 2: cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) - os.remove(script_name) + execute(os.remove, (script_name,), "removing %s" % script_name, + verbose=verbose, dry_run=dry_run) # "Direct" byte-compilation: use the py_compile module to compile # right here, right now. Note that the script generated in indirect From 5e53de4c1f29689ed46a3edcedab0594b2ab9b7e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 3 Oct 2000 03:31:52 +0000 Subject: [PATCH 0665/8469] Fixed so --no-compile is a negative alias for --compile. --- command/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/install.py b/command/install.py index 303ae4c02d..330f324867 100644 --- a/command/install.py +++ b/command/install.py @@ -116,6 +116,7 @@ class install (Command): ] boolean_options = ['force', 'skip-build'] + negative_opt = {'no-compile' : 'compile'} def initialize_options (self): From 7bfd1e33100e73e990f07bffe02e06f5f8cd2e60 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 3 Oct 2000 03:32:37 +0000 Subject: [PATCH 0666/8469] Remove some debugging prints. --- command/install_lib.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 804dcffa60..6c4c7fe993 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -71,8 +71,6 @@ def finalize_options (self): if self.optimize is None: self.optimize = 0 - print "install_lib: compile=%s, optimize=%s" % \ - (`self.compile`, `self.optimize`) if type(self.optimize) is not IntType: try: self.optimize = int(self.optimize) From f07662ad4804864ca561414b1aeab71901df8c64 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 3 Oct 2000 03:48:43 +0000 Subject: [PATCH 0667/8469] Bump version to 1.0. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 23315cdeb9..2073617627 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "1.0pre" +__version__ = "1.0" From aa3edfa3ec76a4cc13fca1dee25fda6f0baeb771 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 12 Oct 2000 19:31:13 +0000 Subject: [PATCH 0668/8469] Recreated after installer source code changes. This should close SF bug (patch) http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470 --- command/bdist_wininst.py | 492 +++++++++++++++++++-------------------- 1 file changed, 246 insertions(+), 246 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index afe6955e77..b45089b724 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -218,9 +218,9 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAADqs5WMrtL7367S+9+u0vvf1c7336/S+98tzvXfrNL731Hy/9+s0vvfzM3o -36bS+9+u0vrf89L7367S+9+j0vvfUfLx36PS+99p1P3fr9L731JpY2iu0vvfAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwD9e9Q5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAADVAAAA +ZGUuDQ0KJAAAAAAAAABwj7aMNO7Y3zTu2N807tjfT/LU3zXu2N+38tbfNu7Y39zx3N827tjfVvHL +3zzu2N807tnfae7Y3zTu2N857tjf3PHS3znu2N+M6N7fNe7Y31JpY2g07tjfAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAUEUAAEwBAwAu6+E5AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAJAAAPDUAAAA oAAAAOAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAA8AAAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw4QAAcAEAAADgAAAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -233,251 +233,251 @@ def get_exe_bytes (self): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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 +hsQp+IDr6AHwiQeDxwWJ2OLZjb4AsAAAiwcJwHQ8i18EjYQwMNEAAAHzUIPHCP+WvNEAAJWKB0cI +wHTciflXSPKuVf+WwNEAAAnAdAeJA4PDBOvh/5bE0QAAYemoeP//AAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From 3440959467b0aa5fa7f21378e1657a9bbc047b67 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Oct 2000 03:40:20 +0000 Subject: [PATCH 0669/8469] Bastian Kleineidam: fix up any supplied command-line options. --- command/config.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/command/config.py b/command/config.py index a13055cf8c..18d7992abe 100644 --- a/command/config.py +++ b/command/config.py @@ -14,6 +14,7 @@ __revision__ = "$Id$" import sys, os, string, re +from types import * from distutils.core import Command from distutils.errors import DistutilsExecError @@ -69,7 +70,21 @@ def initialize_options (self): self.temp_files = [] def finalize_options (self): - pass + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + elif type(self.include_dirs) is StringType: + self.include_dirs = string.split(self.include_dirs, os.pathsep) + + if self.libraries is None: + self.libraries = [] + elif type(self.libraries) is StringType: + self.libraries = [self.libraries] + + if self.library_dirs is None: + self.library_dirs = [] + elif type(self.library_dirs) is StringType: + self.library_dirs = string.split(self.library_dirs, os.pathsep) + def run (self): pass From 806c2d4c0c20efab95c6519462cc891f93d96c0c Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Oct 2000 03:47:07 +0000 Subject: [PATCH 0670/8469] Lyle Johnson: use 'normcase()' in addition to 'normpath()' when testing if we actually installed modules to a directory in sys.path. --- command/install.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/install.py b/command/install.py index 330f324867..012b9f4577 100644 --- a/command/install.py +++ b/command/install.py @@ -497,10 +497,12 @@ def run (self): "writing list of installed files to '%s'" % self.record) - normalized_path = map(os.path.normpath, sys.path) + sys_path = map(os.path.normpath, sys.path) + sys_path = map(os.path.normcase, sys_path) + install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and not (self.path_file and self.install_path_file) and - os.path.normpath(self.install_lib) not in normalized_path): + install_lib not in sys_path): self.warn(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + "you'll have to change the search path yourself") % From 89b5ec9d38d646bd3b9e1c7f746f3ba1801315fb Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Oct 2000 03:56:42 +0000 Subject: [PATCH 0671/8469] Bastian Kleineidam: make 'check_lib()' more like AC_CHECK_LIB by adding an 'other_libraries()' parameter. --- command/config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/config.py b/command/config.py index 18d7992abe..ce6cff8cef 100644 --- a/command/config.py +++ b/command/config.py @@ -325,16 +325,19 @@ def check_func (self, func, # check_func () def check_lib (self, library, library_dirs=None, - headers=None, include_dirs=None): + headers=None, include_dirs=None, other_libraries=[]): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the - header files listed are available. + header files listed are available. Any libraries listed in + 'other_libraries' will be included in the link, in case 'library' + has symbols that depend on other libraries. """ self._check_compiler() return self.try_link("int main (void) { }", - headers, include_dirs, [library], library_dirs) + headers, include_dirs, + [library]+other_libraries, library_dirs) def check_header (self, header, include_dirs=None, library_dirs=None, lang="c"): From 760b926a79252cf94800f28d378990773ed82bde Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Oct 2000 04:06:40 +0000 Subject: [PATCH 0672/8469] Untabified. --- command/bdist.py | 2 +- command/build.py | 2 +- command/build_clib.py | 2 +- command/clean.py | 2 +- command/install.py | 2 +- command/install_data.py | 6 +++--- command/sdist.py | 2 +- dist.py | 10 +++++----- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index c0cb1d3acd..a75303e689 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -45,7 +45,7 @@ class bdist (Command): help_options = [ ('help-formats', None, "lists available distribution formats", show_formats), - ] + ] # The following commands do not take a format option from bdist no_format_option = ('bdist_rpm',) diff --git a/command/build.py b/command/build.py index 0fed6b489e..cf35b45d01 100644 --- a/command/build.py +++ b/command/build.py @@ -47,7 +47,7 @@ class build (Command): help_options = [ ('help-compiler', None, "list available compilers", show_compilers), - ] + ] def initialize_options (self): self.build_base = 'build' diff --git a/command/build_clib.py b/command/build_clib.py index 2726b975fa..063da91552 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -53,7 +53,7 @@ class build_clib (Command): help_options = [ ('help-compiler', None, "list available compilers", show_compilers), - ] + ] def initialize_options (self): self.build_clib = None diff --git a/command/clean.py b/command/clean.py index fb8822f766..b4a9be45f8 100644 --- a/command/clean.py +++ b/command/clean.py @@ -60,7 +60,7 @@ def run(self): # remove build directories for directory in (self.build_lib, self.bdist_base, - self.build_scripts): + self.build_scripts): if os.path.exists(directory): remove_tree(directory, self.verbose, self.dry_run) else: diff --git a/command/install.py b/command/install.py index 012b9f4577..6aee1b35d9 100644 --- a/command/install.py +++ b/command/install.py @@ -498,7 +498,7 @@ def run (self): self.record) sys_path = map(os.path.normpath, sys.path) - sys_path = map(os.path.normcase, sys_path) + sys_path = map(os.path.normcase, sys_path) install_lib = os.path.normcase(os.path.normpath(self.install_lib)) if (self.warn_dir and not (self.path_file and self.install_path_file) and diff --git a/command/install_data.py b/command/install_data.py index d9a486936c..dba108af14 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -38,10 +38,10 @@ def initialize_options (self): def finalize_options (self): self.set_undefined_options('install', - ('install_data', 'install_dir'), - ('root', 'root'), + ('install_data', 'install_dir'), + ('root', 'root'), ('force', 'force'), - ) + ) def run (self): self.mkpath(self.install_dir) diff --git a/command/sdist.py b/command/sdist.py index 5116868e76..1f9e9184d7 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -74,7 +74,7 @@ class sdist (Command): help_options = [ ('help-formats', None, "list available distribution formats", show_formats), - ] + ] negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune' } diff --git a/dist.py b/dist.py index 92d390f777..abbc160067 100644 --- a/dist.py +++ b/dist.py @@ -284,7 +284,7 @@ def find_config_files (self): user_filename = ".pydistutils.cfg" else: user_filename = "pydistutils.cfg" - + # And look for the user config file if os.environ.has_key('HOME'): user_file = os.path.join(os.environ.get('HOME'), user_filename) @@ -461,8 +461,8 @@ def _parse_command_opts (self, parser, args): negative_opt = copy(negative_opt) negative_opt.update(cmd_class.negative_opt) - # Check for help_options in command class. They have a different - # format (tuple of four) so we need to preprocess them here. + # Check for help_options in command class. They have a different + # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and type(cmd_class.help_options) is ListType): help_options = fix_help_options(cmd_class.help_options) @@ -487,7 +487,7 @@ def _parse_command_opts (self, parser, args): for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 - #print "showing help for option %s of command %s" % \ + #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) if callable(func): @@ -563,7 +563,7 @@ def _show_help (self, return # _show_help () - + def handle_display_options (self, option_order): """If there were any non-global "display-only" options From ac94b8701f445c75e671f29ed64ea3b577a9b3a5 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 14 Oct 2000 04:07:39 +0000 Subject: [PATCH 0673/8469] Removed debugging code at bottom. --- util.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/util.py b/util.py index 7522ee2499..dd9de854f9 100644 --- a/util.py +++ b/util.py @@ -427,11 +427,3 @@ def byte_compile (py_files, (file, cfile_base) # byte_compile () - - -if __name__ == "__main__": - import glob - f = glob.glob("command/*.py") - byte_compile(f, optimize=0, prefix="command/", base_dir="/usr/lib/python") - #byte_compile(f, optimize=1) - #byte_compile(f, optimize=2) From dc35143fa2af5382aa1428c9da4b140237bf9391 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 15 Oct 2000 19:20:20 +0000 Subject: [PATCH 0674/8469] Bump version to 1.0.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2073617627..55951090ff 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "1.0" +__version__ = "1.0.1" From f64d6b6db2fa6882b19b75d53156c4a541b53588 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 11 Nov 2000 02:47:11 +0000 Subject: [PATCH 0675/8469] Jack Jansen: added 'get_command_list()' method, and Mac-specific code to use it to generate a dialog for users to specify the command-line (because providing a command-line with MacPython is so awkward). --- dist.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/dist.py b/dist.py index abbc160067..fe728c3b60 100644 --- a/dist.py +++ b/dist.py @@ -172,6 +172,12 @@ def __init__ (self, attrs=None): # operations, we just check the 'have_run' dictionary and carry on. # It's only safe to query 'have_run' for a command class that has # been instantiated -- a false value will be inserted when the + if sys.platform == 'mac': + import EasyDialogs + cmdlist = self.get_command_list() + self.script_args = EasyDialogs.GetArgv( + self.global_options + self.display_options, cmdlist) + # command object is created, and replaced with a true value when # the command is successfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. @@ -657,6 +663,38 @@ def print_commands (self): # print_commands () + def get_command_list (self): + """Get a list of (command, description) tuples. + The list is divided into "standard commands" (listed in + distutils.command.__all__) and "extra commands" (mentioned in + self.cmdclass, but not a standard command). The descriptions come + from the command class attribute 'description'. + """ + # Currently this is only used on Mac OS, for the Mac-only GUI + # Distutils interface (by Jack Jansen) + + import distutils.command + std_commands = distutils.command.__all__ + is_std = {} + for cmd in std_commands: + is_std[cmd] = 1 + + extra_commands = [] + for cmd in self.cmdclass.keys(): + if not is_std.get(cmd): + extra_commands.append(cmd) + + rv = [] + for cmd in (std_commands + extra_commands): + klass = self.cmdclass.get(cmd) + if not klass: + klass = self.get_command_class(cmd) + try: + description = klass.description + except AttributeError: + description = "(no description available)" + rv.append((cmd, description)) + return rv # -- Command class/object methods ---------------------------------- From 41f2923e4cb8e646dd04aea546f43752850c091b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 12 Dec 2000 23:11:42 +0000 Subject: [PATCH 0676/8469] Update the code to better reflect recommended style: Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects. --- cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 5b06d3d79c..f40d1a2d4a 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -241,7 +241,7 @@ def link (self, objects.append(def_file) #end: if ((export_symbols is not None) and - # (target_desc <> self.EXECUTABLE or self.linker_dll == "gcc")): + # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): # who wants symbols and a many times larger output file # should explicitly switch the debug mode on From f749040280c9b9f4151fc1852e7d3ec524d2a1b4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 20 Dec 2000 00:48:12 +0000 Subject: [PATCH 0677/8469] Add forgotten initialization. Fixes bug #120994, "Traceback with DISTUTILS_DEBUG set" --- command/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/install.py b/command/install.py index 6aee1b35d9..806da01afa 100644 --- a/command/install.py +++ b/command/install.py @@ -146,6 +146,7 @@ def initialize_options (self): self.install_data = None self.compile = None + self.no_compile = None self.optimize = None # These two are for putting non-packagized distributions into their From aa73c5a0fd86980d14bb7bfc07fb41189c2f58cb Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 9 Jan 2001 03:15:47 +0000 Subject: [PATCH 0678/8469] Check in patch #102971: if library_dirs is a string, split it using os.pathsep --- command/build_ext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 70e8a73455..936a5f633a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -149,6 +149,8 @@ def finalize_options (self): self.libraries = [] if self.library_dirs is None: self.library_dirs = [] + elif type(self.library_dirs) is StringType: + self.library_dirs = string.split(self.library_dirs, os.pathsep) if self.rpath is None: self.rpath = [] From abec99bc72e4002a5348f4a6822f7891bb4f4589 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 11 Jan 2001 15:35:16 +0000 Subject: [PATCH 0679/8469] Delete unused import of pprint module --- sysconfig.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 605e95dfb2..d57b915911 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -362,7 +362,6 @@ def get_config_vars(*args): """ global _config_vars if _config_vars is None: - from pprint import pprint func = globals().get("_init_" + os.name) if func: func() From 12123de064e383654dafdd825e35948ef01c2825 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 15 Jan 2001 16:09:35 +0000 Subject: [PATCH 0680/8469] Fix from Jack Jansen for the Mac and the Metrowerks compiler, posted to the Distutils-SIG and archived at http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html --- ccompiler.py | 3 + dist.py | 16 ++-- mwerkscompiler.py | 203 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+), 6 deletions(-) create mode 100644 mwerkscompiler.py diff --git a/ccompiler.py b/ccompiler.py index b10ee67e3c..53901b3362 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -838,6 +838,7 @@ def mkpath (self, name, mode=0777): # that platform. default_compiler = { 'posix': 'unix', 'nt': 'msvc', + 'mac': 'mwerks', } # Map compiler types to (module_name, class_name) pairs -- ie. where to @@ -853,6 +854,8 @@ def mkpath (self, name, mode=0777): "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), + 'mwerks': ('mwerkscompiler', 'MWerksCompiler', + "MetroWerks CodeWarrior"), } def show_compilers(): diff --git a/dist.py b/dist.py index fe728c3b60..41d5dbbc0b 100644 --- a/dist.py +++ b/dist.py @@ -172,12 +172,6 @@ def __init__ (self, attrs=None): # operations, we just check the 'have_run' dictionary and carry on. # It's only safe to query 'have_run' for a command class that has # been instantiated -- a false value will be inserted when the - if sys.platform == 'mac': - import EasyDialogs - cmdlist = self.get_command_list() - self.script_args = EasyDialogs.GetArgv( - self.global_options + self.display_options, cmdlist) - # command object is created, and replaced with a true value when # the command is successfully run. Thus it's probably best to use # '.get()' rather than a straight lookup. @@ -375,6 +369,16 @@ def parse_command_line (self): execute commands (currently, this only happens if user asks for help). """ + # + # We now have enough information to show the Macintosh dialog that allows + # the user to interactively specify the "command line". + # + if sys.platform == 'mac': + import EasyDialogs + cmdlist = self.get_command_list() + self.script_args = EasyDialogs.GetArgv( + self.global_options + self.display_options, cmdlist) + # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- # because each command will be handled by a different class, and diff --git a/mwerkscompiler.py b/mwerkscompiler.py new file mode 100644 index 0000000000..2edc8259bf --- /dev/null +++ b/mwerkscompiler.py @@ -0,0 +1,203 @@ +"""distutils.mwerkscompiler + +Contains MWerksCompiler, an implementation of the abstract CCompiler class +for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on +Windows.""" + +import sys, os, string +from types import * +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options +import distutils.util +import distutils.dir_util +import mkcwproject + +class MWerksCompiler (CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'mwerks' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.r'] + _exp_extension = '.exp' + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions) + res_extension = '.rsrc' + obj_extension = '.obj' # Not used, really + static_lib_extension = '.lib' + shared_lib_extension = '.slb' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '' + + + def __init__ (self, + verbose=0, + dry_run=0, + force=0): + + CCompiler.__init__ (self, verbose, dry_run, force) + + + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + self.__sources = sources + self.__macros = macros + self.__include_dirs = include_dirs + # Don't need extra_preargs and extra_postargs for CW + + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + # First examine a couple of options for things that aren't implemented yet + if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): + raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' + if runtime_library_dirs: + raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' + if extra_preargs or extra_postargs: + raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' + if len(export_symbols) != 1: + raise DistutilsPlatformError, 'Need exactly one export symbol' + # Next there are various things for which we need absolute pathnames. + # This is because we (usually) create the project in a subdirectory of + # where we are now, and keeping the paths relative is too much work right + # now. + sources = map(self._filename_to_abs, self.__sources) + include_dirs = map(self._filename_to_abs, self.__include_dirs) + if objects: + objects = map(self._filename_to_abs, objects) + else: + objects = [] + if build_temp: + build_temp = self._filename_to_abs(build_temp) + else: + build_temp = os.curdir() + if output_dir: + output_filename = os.path.join(output_dir, output_filename) + # The output filename needs special handling: splitting it into dir and + # filename part. Actually I'm not sure this is really needed, but it + # can't hurt. + output_filename = self._filename_to_abs(output_filename) + output_dir, output_filename = os.path.split(output_filename) + # Now we need the short names of a couple of things for putting them + # into the project. + if output_filename[-8:] == '.ppc.slb': + basename = output_filename[:-8] + else: + basename = os.path.strip(output_filename)[0] + projectname = basename + '.mcp' + targetname = basename + xmlname = basename + '.xml' + exportname = basename + '.mcp.exp' + prefixname = 'mwerks_%s_config.h'%basename + # Create the directories we need + distutils.dir_util.mkpath(build_temp, self.verbose, self.dry_run) + distutils.dir_util.mkpath(output_dir, self.verbose, self.dry_run) + # And on to filling in the parameters for the project builder + settings = {} + settings['mac_exportname'] = exportname + settings['mac_outputdir'] = output_dir + settings['mac_dllname'] = output_filename + settings['mac_targetname'] = targetname + settings['sysprefix'] = sys.prefix + settings['mac_sysprefixtype'] = 'Absolute' + sourcefilenames = [] + sourcefiledirs = [] + for filename in sources + objects: + dirname, filename = os.path.split(filename) + sourcefilenames.append(filename) + if not dirname in sourcefiledirs: + sourcefiledirs.append(dirname) + settings['sources'] = sourcefilenames + settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs + if self.dry_run: + print 'CALLING LINKER IN', os.getcwd() + for key, value in settings.items(): + print '%20.20s %s'%(key, value) + return + # Build the export file + exportfilename = os.path.join(build_temp, exportname) + if self.verbose: + print '\tCreate export file', exportfilename + fp = open(exportfilename, 'w') + fp.write('%s\n'%export_symbols[0]) + fp.close() + # Generate the prefix file, if needed, and put it in the settings + if self.__macros: + prefixfilename = os.path.join(os.getcwd(), os.path.join(build_temp, prefixname)) + fp = open(prefixfilename, 'w') + fp.write('#include "mwerks_plugin_config.h"\n') + for name, value in self.__macros: + if value is None: + fp.write('#define %s\n'%name) + else: + fp.write('#define %s "%s"\n'%(name, value)) + fp.close() + settings['prefixname'] = prefixname + + # Build the XML file. We need the full pathname (only lateron, really) + # because we pass this pathname to CodeWarrior in an AppleEvent, and CW + # doesn't have a clue about our working directory. + xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) + if self.verbose: + print '\tCreate XML file', xmlfilename + xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) + xmlbuilder.generate() + xmldata = settings['tmp_projectxmldata'] + fp = open(xmlfilename, 'w') + fp.write(xmldata) + fp.close() + # Generate the project. Again a full pathname. + projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) + if self.verbose: + print '\tCreate project file', projectfilename + mkcwproject.makeproject(xmlfilename, projectfilename) + # And build it + if self.verbose: + print '\tBuild project' + mkcwproject.buildproject(projectfilename) + + def _filename_to_abs(self, filename): + # Some filenames seem to be unix-like. Convert to Mac names. +## if '/' in filename and ':' in filename: +## raise DistutilsPlatformError, 'Filename may be Unix or Mac style: %s'%filename +## if '/' in filename: +## filename = macurl2path(filename) + filename = distutils.util.convert_path(filename) + if not os.path.isabs(filename): + curdir = os.getcwd() + filename = os.path.join(curdir, filename) + return filename + + From cacfb4f1472c9b83df8d0b1799834f9f5e322e47 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 16 Jan 2001 03:10:43 +0000 Subject: [PATCH 0681/8469] Add strip_dir argument to the single call to .object_filenames(), to prevent creating files such as build/lib.whatever/Modules/foo.o when given a source filename such as Modules/foo.c. --- ccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ccompiler.py b/ccompiler.py index 53901b3362..5e0b328042 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -366,6 +366,7 @@ def _prep_compile (self, sources, output_dir): """ # Get the list of expected output (object) files objects = self.object_filenames (sources, + strip_dir=1, output_dir=output_dir) if self.force: From 3f4a8e719b6611b77347bb1f8970b5a0141bd400 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 16 Jan 2001 16:16:03 +0000 Subject: [PATCH 0682/8469] Modified version of a patch from Jeremy Kloth, to make .get_outputs() produce a list of unique filenames: "While attempting to build an RPM using distutils on Python 2.0, rpm complained about duplicate files. The following patch fixed that problem. --- command/install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 806da01afa..40e00705d3 100644 --- a/command/install.py +++ b/command/install.py @@ -530,7 +530,11 @@ def get_outputs (self): outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) - outputs.extend(cmd.get_outputs()) + # Add the contents of cmd.get_outputs(), ensuring + # that outputs doesn't contain duplicate entries + for filename in cmd.get_outputs(): + if filename not in outputs: + outputs.append(filename) return outputs From e26cdf35269dc6e049dd19c5b39bd312cddeb81a Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 16 Jan 2001 16:33:28 +0000 Subject: [PATCH 0683/8469] Fix bugs with integer-valued variables when parsing Makefiles. Values for done[n] can be integers as well as strings, but the code concatenates them with strings (fixed by adding a str()) and calls string.strip() on them (fixed by rearranging the logic) (Presumably this wasn't noticed previously because parse_makefile() was only called on Modules/Makefile, which contains no integer-valued variables.) --- sysconfig.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d57b915911..4da376898c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -204,13 +204,15 @@ def parse_makefile(fn, g=None): n = m.group(1) if done.has_key(n): after = value[m.end():] - value = value[:m.start()] + done[n] + after + value = value[:m.start()] + str(done[n]) + after if "$" in after: notdone[name] = value else: try: value = string.atoi(value) - except ValueError: pass - done[name] = string.strip(value) + except ValueError: + done[name] = string.strip(value) + else: + done[name] = value del notdone[name] elif notdone.has_key(n): # get it on a subsequent round @@ -223,8 +225,10 @@ def parse_makefile(fn, g=None): notdone[name] = value else: try: value = string.atoi(value) - except ValueError: pass - done[name] = string.strip(value) + except ValueError: + done[name] = string.strip(value) + else: + done[name] = value del notdone[name] else: # bogus variable reference; just drop it since we can't deal From 6aef8efc56535f695fdbbddcb651bf715bfbc79e Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 17 Jan 2001 15:16:52 +0000 Subject: [PATCH 0684/8469] Patch #103279: sysconfig.py always looks for versions of files in sys.prefix + 'config/Makefile'. When building Python for the first time, these files aren't there, so the files from the build tree have to be used instead; this file adds an entry point for specifying that the build tree files should be used. (Perhaps 'set_python_build' should should be preceded with an underscore?) --- sysconfig.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 4da376898c..3ae0a5f91d 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -19,6 +19,19 @@ PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +# Boolean; if it's true, we're still building Python, so +# we use different (hard-wired) directories. + +python_build = 0 + +def set_python_build(): + """Set the python_build flag to true; this means that we're + building Python itself. Only called from the setup.py script + shipped with Python. + """ + + global python_build + python_build = 1 def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. @@ -34,6 +47,8 @@ def get_python_inc(plat_specific=0, prefix=None): if prefix is None: prefix = (plat_specific and EXEC_PREFIX or PREFIX) if os.name == "posix": + if python_build: + return "Include/" return os.path.join(prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": return os.path.join(prefix, "Include") # include or Include? @@ -119,12 +134,15 @@ def customize_compiler (compiler): def get_config_h_filename(): """Return full pathname of installed config.h file.""" - inc_dir = get_python_inc(plat_specific=1) + if python_build: inc_dir = '.' + else: inc_dir = get_python_inc(plat_specific=1) return os.path.join(inc_dir, "config.h") def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" + if python_build: + return './Modules/Makefile' lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") From dd5ccc0082a1bf655dd242d3881620cd88f0d980 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 19 Jan 2001 16:26:12 +0000 Subject: [PATCH 0685/8469] Patch #103220 from Jason Tishler: This patch adds support for Cygwin to util.get_platform(). A Cygwin specific case is needed due to the format of Cygwin's uname command, which contains '/' characters. --- util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util.py b/util.py index dd9de854f9..80e4814389 100644 --- a/util.py +++ b/util.py @@ -54,6 +54,11 @@ def get_platform (): # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) + elif osname[:6] == "cygwin": + rel_re = re.compile (r'[\d.]+') + m = rel_re.match(release) + if m: + release = m.group() return "%s-%s-%s" % (osname, release, machine) From 86f47bdacaf41dd4535e115c74162bfcfb87f267 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 24 Jan 2001 15:43:09 +0000 Subject: [PATCH 0686/8469] Part of patch #102409: special cases for Cygwin: Lib/distutils/command/build_ext.py(build_ext.finalize_options): Add Cygwin specific code to append Python's library directory to the extension's list of library directories. (build_ext.get_libraries): Add Cygwin specific code to append Python's (import) library to the extension's list of libraries. --- command/build_ext.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 936a5f633a..2876c3593f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -163,6 +163,17 @@ def finalize_options (self): self.build_temp = os.path.join(self.build_temp, "Debug") else: self.build_temp = os.path.join(self.build_temp, "Release") + + # for extensions under Cygwin Python's library directory must be + # appended to library_dirs + if sys.platform[:6] == 'cygwin': + if string.find(sys.executable, sys.exec_prefix) != -1: + # building third party extensions + self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + sys.version[:3], "config")) + else: + # building python standard extensions + self.library_dirs.append('.') + # finalize_options () @@ -576,6 +587,13 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + elif sys.platform[:6] == "cygwin": + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib] else: return ext.libraries From 11b83157df263f7aa40e1d42536200ee07a34b32 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Wed, 24 Jan 2001 17:17:20 +0000 Subject: [PATCH 0687/8469] There is no more Modules/Makefile, use toplevel Makefile. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 3ae0a5f91d..ae9b37f3a1 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -142,7 +142,7 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return './Modules/Makefile' + return './Makefile' lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") From 5634233ca85a0f27b1feca9ccf899b688c276cbf Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 25 Jan 2001 20:10:32 +0000 Subject: [PATCH 0688/8469] In subst_vars(), change the name of the argument from str to s to prevent binding for str from masking use of builtin str in nested function. (This is the only case I found in the standard library where a local shadows a global or builtin. There may be others, but the regression test doesn't catch them.) --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 80e4814389..550d94abb6 100644 --- a/util.py +++ b/util.py @@ -142,7 +142,7 @@ def check_environ (): _environ_checked = 1 -def subst_vars (str, local_vars): +def subst_vars (s, local_vars): """Perform shell/Perl-style variable substitution on 'string'. Every occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' @@ -160,7 +160,7 @@ def _subst (match, local_vars=local_vars): return os.environ[var_name] try: - return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, str) + return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) except KeyError, var: raise ValueError, "invalid variable '$%s'" % var From 0cb7c3124d31ecef94db04ea71eb2d7b38a54ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Fri, 26 Jan 2001 18:00:48 +0000 Subject: [PATCH 0689/8469] Added an execution layer to be able to customize per-extension building. --- command/build_ext.py | 183 ++++++++++++++++++++++--------------------- 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2876c3593f..8f59523935 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -356,104 +356,105 @@ def get_outputs (self): # get_outputs () - - def build_extensions (self): + def build_extensions(self): # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) for ext in self.extensions: - sources = ext.sources - if sources is None or type(sources) not in (ListType, TupleType): - raise DistutilsSetupError, \ - ("in 'ext_modules' option (extension '%s'), " + - "'sources' must be present and must be " + - "a list of source filenames") % ext.name - sources = list(sources) + self.build_extension(ext) - fullname = self.get_ext_fullname(ext.name) - if self.inplace: - # ignore build-lib -- put the compiled extension into - # the source tree along with pure Python modules - - modpath = string.split(fullname, '.') - package = string.join(modpath[0:-1], '.') - base = modpath[-1] - - build_py = self.get_finalized_command('build_py') - package_dir = build_py.get_package_dir(package) - ext_filename = os.path.join(package_dir, - self.get_ext_filename(base)) - else: - ext_filename = os.path.join(self.build_lib, - self.get_ext_filename(fullname)) + def build_extension(self, ext): - if not (self.force or newer_group(sources, ext_filename, 'newer')): - self.announce("skipping '%s' extension (up-to-date)" % - ext.name) - continue # 'for' loop over all extensions - else: - self.announce("building '%s' extension" % ext.name) - - # First, scan the sources for SWIG definition files (.i), run - # SWIG on 'em to create .c files, and modify the sources list - # accordingly. - sources = self.swig_sources(sources) - - # Next, compile the source code to object files. - - # XXX not honouring 'define_macros' or 'undef_macros' -- the - # CCompiler API needs to change to accommodate this, and I - # want to do one thing at a time! - - # Two possible sources for extra compiler arguments: - # - 'extra_compile_args' in Extension object - # - CFLAGS environment variable (not particularly - # elegant, but people seem to expect it and I - # guess it's useful) - # The environment variable should take precedence, and - # any sensible compiler will give precedence to later - # command line args. Hence we combine them in order: - extra_args = ext.extra_compile_args or [] - - macros = ext.define_macros[:] - for undef in ext.undef_macros: - macros.append((undef,)) - - # XXX and if we support CFLAGS, why not CC (compiler - # executable), CPPFLAGS (pre-processor options), and LDFLAGS - # (linker options) too? - # XXX should we use shlex to properly parse CFLAGS? - - if os.environ.has_key('CFLAGS'): - extra_args.extend(string.split(os.environ['CFLAGS'])) - - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args) - - # Now link the object files together into a "shared object" -- - # of course, first we have to figure out all the other things - # that go into the mix. - if ext.extra_objects: - objects.extend(ext.extra_objects) - extra_args = ext.extra_link_args or [] - - - self.compiler.link_shared_object( - objects, ext_filename, - libraries=self.get_libraries(ext), - library_dirs=ext.library_dirs, - runtime_library_dirs=ext.runtime_library_dirs, - extra_postargs=extra_args, - export_symbols=self.get_export_symbols(ext), - debug=self.debug, - build_temp=self.build_temp) - - # build_extensions () + sources = ext.sources + if sources is None or type(sources) not in (ListType, TupleType): + raise DistutilsSetupError, \ + ("in 'ext_modules' option (extension '%s'), " + + "'sources' must be present and must be " + + "a list of source filenames") % ext.name + sources = list(sources) + + fullname = self.get_ext_fullname(ext.name) + if self.inplace: + # ignore build-lib -- put the compiled extension into + # the source tree along with pure Python modules + + modpath = string.split(fullname, '.') + package = string.join(modpath[0:-1], '.') + base = modpath[-1] + + build_py = self.get_finalized_command('build_py') + package_dir = build_py.get_package_dir(package) + ext_filename = os.path.join(package_dir, + self.get_ext_filename(base)) + else: + ext_filename = os.path.join(self.build_lib, + self.get_ext_filename(fullname)) + + if not (self.force or newer_group(sources, ext_filename, 'newer')): + self.announce("skipping '%s' extension (up-to-date)" % + ext.name) + return + else: + self.announce("building '%s' extension" % ext.name) + + # First, scan the sources for SWIG definition files (.i), run + # SWIG on 'em to create .c files, and modify the sources list + # accordingly. + sources = self.swig_sources(sources) + + # Next, compile the source code to object files. + + # XXX not honouring 'define_macros' or 'undef_macros' -- the + # CCompiler API needs to change to accommodate this, and I + # want to do one thing at a time! + + # Two possible sources for extra compiler arguments: + # - 'extra_compile_args' in Extension object + # - CFLAGS environment variable (not particularly + # elegant, but people seem to expect it and I + # guess it's useful) + # The environment variable should take precedence, and + # any sensible compiler will give precedence to later + # command line args. Hence we combine them in order: + extra_args = ext.extra_compile_args or [] + + macros = ext.define_macros[:] + for undef in ext.undef_macros: + macros.append((undef,)) + + # XXX and if we support CFLAGS, why not CC (compiler + # executable), CPPFLAGS (pre-processor options), and LDFLAGS + # (linker options) too? + # XXX should we use shlex to properly parse CFLAGS? + + if os.environ.has_key('CFLAGS'): + extra_args.extend(string.split(os.environ['CFLAGS'])) + + objects = self.compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args) + + # Now link the object files together into a "shared object" -- + # of course, first we have to figure out all the other things + # that go into the mix. + if ext.extra_objects: + objects.extend(ext.extra_objects) + extra_args = ext.extra_link_args or [] + + + self.compiler.link_shared_object( + objects, ext_filename, + libraries=self.get_libraries(ext), + library_dirs=ext.library_dirs, + runtime_library_dirs=ext.runtime_library_dirs, + extra_postargs=extra_args, + export_symbols=self.get_export_symbols(ext), + debug=self.debug, + build_temp=self.build_temp) def swig_sources (self, sources): From a2946a75cbbeb464dbe57bba2a67327381da73ac Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 28 Jan 2001 12:22:14 +0000 Subject: [PATCH 0690/8469] Data pathnames were not converted from URL-style to local style. Fixed. --- command/install_data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index dba108af14..503c1aa8ac 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -10,7 +10,7 @@ import os from types import StringType from distutils.core import Command -from distutils.util import change_root +from distutils.util import change_root, convert_path class install_data (Command): @@ -48,6 +48,7 @@ def run (self): for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it + f = convert_path(f) if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % @@ -56,13 +57,14 @@ def run (self): self.outfiles.append(out) else: # it's a tuple with path to install to and a list of files - dir = f[0] + dir = convert_path(f[0]) if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self.root: dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: + data = convert_path(f[1]) (out, _) = self.copy_file(data, dir) self.outfiles.append(out) From d14a7b0d085ee7397a87141e7cd2ea0503def6b8 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 28 Jan 2001 12:23:32 +0000 Subject: [PATCH 0691/8469] Remove single "." components from pathnames, and return os.curdir if the resulting path is empty. --- util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util.py b/util.py index 550d94abb6..d4891b3c2a 100644 --- a/util.py +++ b/util.py @@ -82,6 +82,10 @@ def convert_path (pathname): raise ValueError, "path '%s' cannot end with '/'" % pathname paths = string.split(pathname, '/') + while '.' in paths: + paths.remove('.') + if not paths: + return os.curdir return apply(os.path.join, paths) # convert_path () From 2b9227d208d3f9196b66758a601352a58ae4253f Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 31 Jan 2001 20:07:17 +0000 Subject: [PATCH 0692/8469] move "from stat import *" to module level --- file_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_util.py b/file_util.py index a9e12ce3f3..39f6eea289 100644 --- a/file_util.py +++ b/file_util.py @@ -8,6 +8,7 @@ __revision__ = "$Id$" import os +from stat import * from distutils.errors import DistutilsFileError @@ -106,7 +107,6 @@ def copy_file (src, dst, # changing it (ie. it's not already a hard/soft link to src OR # (not update) and (src newer than dst). - from stat import * from distutils.dep_util import newer if not os.path.isfile(src): From b0762d40180e6930b7f5fa403e7c1084c1f598da Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 5 Feb 2001 17:43:11 +0000 Subject: [PATCH 0693/8469] Patch #103587: Fix typo that broke the install_data command; caught by Uche Ogbuji --- command/install_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_data.py b/command/install_data.py index 503c1aa8ac..28f593866c 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -64,7 +64,7 @@ def run (self): dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: - data = convert_path(f[1]) + data = convert_path(data) (out, _) = self.copy_file(data, dir) self.outfiles.append(out) From 6b6d7c364eec3b44b99f1f1b5a41be2920183783 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 9 Feb 2001 11:14:08 +0000 Subject: [PATCH 0694/8469] String method conversion. (This one was trivial -- no actual string. references in it!) --- bcppcompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index bb9557fbb3..00ccec548b 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -14,7 +14,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError From 877b037a3e40bfb3285be20db1d161ca44b1e8db Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 9 Feb 2001 11:51:27 +0000 Subject: [PATCH 0695/8469] String method conversion. --- cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd.py b/cmd.py index ce44829498..cec4bff237 100644 --- a/cmd.py +++ b/cmd.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util @@ -161,7 +161,7 @@ def dump_options (self, header=None, indent=""): print indent + header indent = indent + " " for (option, _, _) in self.user_options: - option = string.translate(option, longopt_xlate) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) @@ -421,7 +421,7 @@ def make_file (self, infiles, outfile, func, args, """ if exec_msg is None: exec_msg = "generating %s from %s" % \ - (outfile, string.join(infiles, ', ')) + (outfile, ', '.join(infiles)) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile From 31bfd423882c406175d12a99256a75411487bb93 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 9 Feb 2001 12:20:51 +0000 Subject: [PATCH 0696/8469] String method conversion. --- cygwinccompiler.py | 6 +++--- extension.py | 4 ++-- version.py | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index f40d1a2d4a..42318ad3d4 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -365,10 +365,10 @@ def check_config_h(): # "config.h" check -- should probably be renamed... from distutils import sysconfig - import string,sys + import sys # if sys.version contains GCC then python was compiled with # GCC, and the config.h file should be OK - if string.find(sys.version,"GCC") >= 0: + if sys.version.find("GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") fn = sysconfig.get_config_h_filename() @@ -387,7 +387,7 @@ def check_config_h(): else: # "config.h" contains an "#ifdef __GNUC__" or something similar - if string.find(s,"__GNUC__") >= 0: + if s.find("__GNUC__") >= 0: return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) else: return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) diff --git a/extension.py b/extension.py index a63ede233c..f49abad003 100644 --- a/extension.py +++ b/extension.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string +import os from types import * @@ -168,7 +168,7 @@ def read_setup_file (filename): elif switch == "-I": ext.include_dirs.append(value) elif switch == "-D": - equals = string.find(value, "=") + equals = value.find("=") if equals == -1: # bare "-DFOO" -- no value ext.define_macros.append((value, None)) else: # "-DFOO=blah" diff --git a/version.py b/version.py index 9d3d172429..2916eb79a1 100644 --- a/version.py +++ b/version.py @@ -112,12 +112,12 @@ def parse (self, vstring): match.group(1, 2, 4, 5, 6) if patch: - self.version = tuple(map(string.atoi, [major, minor, patch])) + self.version = tuple(map(int, [major, minor, patch])) else: - self.version = tuple(map(string.atoi, [major, minor]) + [0]) + self.version = tuple(map(int, [major, minor]) + [0]) if prerelease: - self.prerelease = (prerelease[0], string.atoi(prerelease_num)) + self.prerelease = (prerelease[0], int(prerelease_num)) else: self.prerelease = None @@ -125,9 +125,9 @@ def parse (self, vstring): def __str__ (self): if self.version[2] == 0: - vstring = string.join(map(str, self.version[0:2]), '.') + vstring = '.'.join(map(str, self.version[0:2])) else: - vstring = string.join(map(str, self.version), '.') + vstring = '.'.join(map(str, self.version)) if self.prerelease: vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) From e5fb9e92092d08b97107b3ae88108bc404a00bdb Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Fri, 16 Feb 2001 03:31:13 +0000 Subject: [PATCH 0697/8469] Linking just got simpiler on AIX and BeOS (closes SF patch #103679). --- sysconfig.py | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index ae9b37f3a1..2b0bce33e9 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -305,31 +305,8 @@ def _init_posix(): # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. - if sys.platform == 'aix4': # what about AIX 3.x ? - # Linker script is in the config directory, not in Modules as the - # Makefile says. - python_lib = get_python_lib(standard_lib=1) - ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') - python_exp = os.path.join(python_lib, 'config', 'python.exp') - - g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - - elif sys.platform == 'beos': - - # Linker script is in the config directory. In the Makefile it is - # relative to the srcdir, which after installation no longer makes - # sense. - python_lib = get_python_lib(standard_lib=1) - linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) - linkerscript = os.path.join(python_lib, 'config', linkerscript_name) - - # XXX this isn't the right place to do this: adding the Python - # library to the link, if needed, should be in the "build_ext" - # command. (It's also needed for non-MS compilers on Windows, and - # it's taken care of for them by the 'build_ext.get_libraries()' - # method.) - g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, PREFIX, sys.version[0:3])) + if python_build: + g['LDSHARED'] = g['BLDSHARED'] global _config_vars _config_vars = g From abba167c662eed5cea8b58a24df09483eac2fd96 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 17 Feb 2001 04:48:41 +0000 Subject: [PATCH 0698/8469] Split the rpath argument into multiple paths, turning it into a list. This partially fixes bug #128930. --- command/build_ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 8f59523935..14cfebf720 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -151,8 +151,11 @@ def finalize_options (self): self.library_dirs = [] elif type(self.library_dirs) is StringType: self.library_dirs = string.split(self.library_dirs, os.pathsep) + if self.rpath is None: self.rpath = [] + elif type(self.rpath) is StringType: + self.rpath = string.split(self.rpath, os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. From 7122d9720a99b46bb0f52a89f2e24375d21514f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Mon, 19 Feb 2001 09:20:04 +0000 Subject: [PATCH 0699/8469] This patch makes the default compiler determination more flexible and also takes the sys.platform name into account. This helps on platforms where there are multiple possible compiler backends (the one with which Python itself was compiled is preferred over others in this case). The patch uses this new technique to enable using cygwin compiler per default for cygwin compiled Pythons. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum. --- ccompiler.py | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 5e0b328042..0a30640fe2 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os +import sys, os, re from types import * from copy import copy from distutils.errors import * @@ -835,12 +835,44 @@ def mkpath (self, name, mode=0777): # class CCompiler -# Map a platform ('posix', 'nt') to the default compiler type for -# that platform. -default_compiler = { 'posix': 'unix', - 'nt': 'msvc', - 'mac': 'mwerks', - } +# Map a sys.platform/os.name ('posix', 'nt') to the default compiler +# type for that platform. Keys are interpreted as re match +# patterns. Order is important; platform mappings are preferred over +# OS names. +_default_compilers = ( + + # Platform string mappings + ('cygwin.*', 'cygwin'), + + # OS name mappings + ('posix', 'unix'), + ('nt', 'msvc'), + ('mac', 'mwerks'), + + ) + +def get_default_compiler(osname=None, platform=None): + + """ Determine the default compiler to use for the given platform. + + osname should be one of the standard Python OS names (i.e. the + ones returned by os.name) and platform the common value + returned by sys.platform for the platform in question. + + The default values are os.name and sys.platform in case the + parameters are not given. + + """ + if osname is None: + osname = os.name + if platform is None: + platform = sys.platform + for pattern, compiler in _default_compilers: + if re.match(pattern, platform) is not None or \ + re.match(pattern, osname) is not None: + return compiler + # Default to Unix compiler + return 'unix' # Map compiler types to (module_name, class_name) pairs -- ie. where to # find the code that implements an interface to this compiler. (The module @@ -896,7 +928,7 @@ def new_compiler (plat=None, try: if compiler is None: - compiler = default_compiler[plat] + compiler = get_default_compiler(plat) (module_name, class_name, long_description) = compiler_class[compiler] except KeyError: From a8b3af8796b6d404864ae381ffb958e46632d836 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 19 Feb 2001 09:20:30 +0000 Subject: [PATCH 0700/8469] Enhancements to the bdist_wininst command: --bitmap command line option allows to use a different bitmap file instead of the build-in python powered logo. --title lets you specify the text to display on the background. The editbox in the first screen now longer is selected (highlighted), it had the WS_TABSTOP flag. This is the patch http://sourceforge.net/patch/?func=detailpatch&patch_id=103687&group_id=5470 with two changes: 1. No messagebox displayed when the compilation to .pyc or .pyo files failes, this will only confuse the user (and it will fail under certain cases, where sys.path contains garbage). 2. A debugging print statement was removed from bdist_wininst.py. --- command/bdist_wininst.py | 547 ++++++++++++++++++++------------------- 1 file changed, 282 insertions(+), 265 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b45089b724..e3964b6b4b 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -32,6 +32,10 @@ class bdist_wininst (Command): "on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), + ('bitmap=', 'b', + "bitmap to use for the installer instead of python-powered logo"), + ('title=', 't', + "title to display on the installer background instead of default"), ] boolean_options = ['keep-temp'] @@ -43,6 +47,8 @@ def initialize_options (self): self.no_target_optimize = 0 self.target_version = None self.dist_dir = None + self.bitmap = None + self.title = None # initialize_options() @@ -117,7 +123,7 @@ def run (self): ("'%s' not included in install_lib" % key) arcname = self.make_archive(archive_basename, "zip", root_dir=root_dir) - self.create_exe(arcname, fullname) + self.create_exe(arcname, fullname, self.bitmap) if not self.keep_temp: remove_tree(self.bdist_dir, self.verbose, self.dry_run) @@ -156,7 +162,7 @@ def get_inidata (self): if self.target_version: lines.append("target_version=%s" % self.target_version) - title = self.distribution.get_fullname() + title = self.title or self.distribution.get_fullname() lines.append("title=%s" % repr(title)[1:-1]) import time import distutils @@ -167,7 +173,7 @@ def get_inidata (self): # get_inidata() - def create_exe (self, arcname, fullname): + def create_exe (self, arcname, fullname, bitmap=None): import struct self.mkpath(self.dist_dir) @@ -185,12 +191,23 @@ def create_exe (self, arcname, fullname): "%s.win32.exe" % fullname) self.announce("creating %s" % installer_name) + if bitmap: + bitmapdata = open(bitmap, "rb").read() + bitmaplen = len(bitmapdata) + else: + bitmaplen = 0 + file = open(installer_name, "wb") file.write(self.get_exe_bytes()) + if bitmap: + file.write(bitmapdata) + file.write(cfgdata) - header = struct.pack(" Date: Tue, 27 Feb 2001 18:48:00 +0000 Subject: [PATCH 0701/8469] Patch #404275: generate a reasonable platform string for AIX --- util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util.py b/util.py index d4891b3c2a..009ba6cb93 100644 --- a/util.py +++ b/util.py @@ -54,6 +54,8 @@ def get_platform (): # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) + elif osname[:3] == "aix": + return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": rel_re = re.compile (r'[\d.]+') m = rel_re.match(release) From e49a11577577efa7493fe079aec5b257a1796d00 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 27 Feb 2001 19:13:15 +0000 Subject: [PATCH 0702/8469] Patch #403947: On Cygwin, use the Unix compiler class, and not the Cygwin-specific compiler class. (According to Jason Tishler, cygwinccompiler needs some work to handle the differences in Cygwin- and MSVC-Python. Makefile and config files are currently ignored by cygwinccompiler, as it was written to support cygwin for extensions which are intended to be used with the standard MSVC built Python.) --- ccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 0a30640fe2..4a282d4cff 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -842,7 +842,10 @@ def mkpath (self, name, mode=0777): _default_compilers = ( # Platform string mappings - ('cygwin.*', 'cygwin'), + + # on a cygwin built python we can use gcc like an ordinary UNIXish + # compiler + ('cygwin.*', 'unix'), # OS name mappings ('posix', 'unix'), From 9a2d4238fc67219b220c86cdea11776e83cf8371 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 27 Feb 2001 19:25:42 +0000 Subject: [PATCH 0703/8469] Bug #229280: remove '/' characters from the OS name (for BSD/OS :) ) --- util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 009ba6cb93..e596150422 100644 --- a/util.py +++ b/util.py @@ -41,7 +41,12 @@ def get_platform (): # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() - osname = string.lower(osname) + + # Convert the OS name to lowercase and remove '/' characters + # (to accommodate BSD/OS) + osname = string.lower(osname) + osname = string.replace(osname, '/', '') + if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- # i386, etc. From a491120a1f3f62675249b45d01c90e690c13000f Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 28 Feb 2001 19:40:27 +0000 Subject: [PATCH 0704/8469] Placate tabnanny --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 2b0bce33e9..91f9279d87 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -306,7 +306,7 @@ def _init_posix(): # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. if python_build: - g['LDSHARED'] = g['BLDSHARED'] + g['LDSHARED'] = g['BLDSHARED'] global _config_vars _config_vars = g From fde8019f9e24a1b85b69bbdddc0073996df538aa Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 28 Feb 2001 20:59:33 +0000 Subject: [PATCH 0705/8469] Leave #! lines featuring /usr/bin/env alone --- command/build_scripts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 495f4c372a..1f68899ce9 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -10,8 +10,10 @@ from distutils.core import Command from distutils.dep_util import newer -# check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python(\s+.*)?') +# check if Python is called on the first line with this expression. +# This expression will leave lines using /usr/bin/env alone; presumably +# the script author knew what they were doing...) +first_line_re = re.compile(r'^#!(?!\s*/usr/bin/env\b).*python(\s+.*)?') class build_scripts (Command): From 925f20a7baabbecc1a696330747546e2f2d8e2a3 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 2 Mar 2001 07:28:03 +0000 Subject: [PATCH 0706/8469] When not copying a file because the output is up to date, make the message slightly more brief, and more like the message that an extension will not be built because the built copy is up to date. --- command/build_scripts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 1f68899ce9..ee7f4e2d1e 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -45,7 +45,7 @@ def run (self): return self.copy_scripts() - + def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', @@ -59,7 +59,7 @@ def copy_scripts (self): outfile = os.path.join(self.build_dir, os.path.basename(script)) if not self.force and not newer(script, outfile): - self.announce("not copying %s (output up-to-date)" % script) + self.announce("not copying %s (up-to-date)" % script) continue # Always open the file, but ignore failures in dry-run mode -- From baf6ba89cd2afee636c0590384219bf555f3b02f Mon Sep 17 00:00:00 2001 From: Ka-Ping Yee Date: Sat, 10 Mar 2001 09:33:14 +0000 Subject: [PATCH 0707/8469] Make docstrings raw, since they contain literal backslashes. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 14cfebf720..866697577d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -545,7 +545,7 @@ def get_ext_fullname (self, ext_name): return self.package + '.' + ext_name def get_ext_filename (self, ext_name): - """Convert the name of an extension (eg. "foo.bar") into the name + r"""Convert the name of an extension (eg. "foo.bar") into the name of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ From c30a37b5c788097c52695b55e76916e109d32ac4 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 16 Mar 2001 20:57:37 +0000 Subject: [PATCH 0708/8469] The bdist_wininst.py command has been recreated after wininst.exe has been changed to include an uninstaller. I forgot to mention in the uninstaller checkin that the logfile name (used for uninstalling) has been changed from .log to -wininst.log. This should prevent conflicts with a distutils logfile serving the same purpose. The short form of the --bdist-dir (-d) option has been removed because it caused conflicts with the short form of the --dist-dir option. --- command/bdist_wininst.py | 580 +++++++++++++++++++++------------------ 1 file changed, 308 insertions(+), 272 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index e3964b6b4b..f1dd633297 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -17,7 +17,7 @@ class bdist_wininst (Command): description = "create an executable installer for MS Windows" - user_options = [('bdist-dir=', 'd', + user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + @@ -235,292 +235,328 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAABwr7eMNM7Z3zTO2d80ztnfT9LV3zXO2d+30tffNs7Z39zR3d82ztnfVtHK -3zzO2d80ztjfVM7Z3zTO2d85ztnf3NHT3znO2d+MyN/fNc7Z31JpY2g0ztnfAAAAAAAAAABQRQAA -TAEDAG/hkDoAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAkAAAwNUAAACgAAAA4AAAAABAAAAQAAAA -AgAABAAAAAAAAAAEAAAAAAAAAADwAAAABAAAAAAAAAIAAAAAABAAABAAAAAAEAAAEAAAAAAAABAA -AAAAAAAAAAAAADDhAABsAQAAAOAAADABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +ZGUuDQ0KJAAAAAAAAABwv7aMNN7Y3zTe2N803tjfT8LU3zXe2N+3wtbfNt7Y39zB3N823tjfVsHL +3zze2N803tnfSN7Y3zTe2N853tjf3MHS3zne2N+M2N7fNd7Y31JpY2g03tjfAAAAAAAAAABQRQAA +TAEDAE55sjoAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAoAAAsOwAAACwAAAA8AAAAABAAAAQAAAA +AgAABAAAAAAAAAAEAAAAAAAAAAAAAQAABAAAAAAAAAIAAAAAABAAABAAAAAAEAAAEAAAAAAAABAA +AAAAAAAAAAAAADDxA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AAAAAAAAAAAAAAAAAAAAAAAA """ # --- EOF --- From 517c0d40da7055c00cdc68e76207ae86a72756bf Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 16 Mar 2001 21:00:18 +0000 Subject: [PATCH 0709/8469] Distutils version number has been changed from 1.0.1 to 1.0.2pre before this get forgotten again. Should probably be set to 1.0.2 before final release of python 2.1 Does someone still release distutils separate from python? --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 55951090ff..bd9761cc25 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "1.0.1" +__version__ = "1.0.2pre" From 59c4620e1fd084da8d9067c4eeadf763feb4760d Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 17 Mar 2001 19:59:26 +0000 Subject: [PATCH 0710/8469] Bug #409403: Signal an error if the distribution's metadata has no version --- dist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist.py b/dist.py index 41d5dbbc0b..6bda869e2e 100644 --- a/dist.py +++ b/dist.py @@ -206,6 +206,10 @@ def __init__ (self, attrs=None): raise DistutilsSetupError, \ "invalid distribution option '%s'" % key + if self.metadata.version is None: + raise DistutilsSetupError, \ + "No version number specified for distribution" + # __init__ () From d23ca0098c0ef28b79e4833fcf6ed85fae2aa11a Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 17 Mar 2001 20:15:41 +0000 Subject: [PATCH 0711/8469] Fix bug #233253: the --define and --undef options didn't work, whether specified on the command-line or in setup.cfg. The option processing leaves them as strings, but they're supposed to be lists. --- command/build_ext.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 866697577d..f732373ea3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -177,6 +177,21 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') + # The argument parsing will result in self.define being a string, but + # it has to be a list of 2-tuples. All the preprocessor symbols + # specified by the 'define' option will be set to '1'. Multiple + # symbols can be separated with commas. + + if self.define: + defines = string.split(self.define, ',') + self.define = map(lambda symbol: (symbol, '1'), defines) + + # The option for macros to undefine is also a string from the + # option parsing, but has to be a list. Multiple symbols can also + # be separated with commas here. + if self.undef: + self.undef = string.split(self.undef, ',') + # finalize_options () From 61fe3191e144fa397832ea37932156cdf904320c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 03:03:41 +0000 Subject: [PATCH 0712/8469] Patch #407434: add rfc822_escape utility function --- util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.py b/util.py index e596150422..010db9a3b0 100644 --- a/util.py +++ b/util.py @@ -443,3 +443,13 @@ def byte_compile (py_files, (file, cfile_base) # byte_compile () + +def rfc822_escape (header): + """Return a version of the string escaped for inclusion in an + RFC-822 header, by adding a space after each newline. + """ + header = string.rstrip(header) + header = string.replace(header, '\n', '\n ') + return header + + From c5fc89cfdabbf37241d499f96c4c1bf08973b436 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 03:06:52 +0000 Subject: [PATCH 0713/8469] Add 'platforms' and 'keywords' attributes to the DistributionMetadata class, along with options to print them. Add a finalize_options() method to Distribution to do final processing on the platform and keyword attributes Add DistributionMetadata.write_pkg_info() method to write a PKG-INFO file into the release tree. --- dist.py | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 5 deletions(-) diff --git a/dist.py b/dist.py index 6bda869e2e..23466965ad 100644 --- a/dist.py +++ b/dist.py @@ -15,7 +15,7 @@ from distutils.errors import * from distutils import sysconfig from distutils.fancy_getopt import FancyGetopt, translate_longopt -from distutils.util import check_environ, strtobool +from distutils.util import check_environ, strtobool, rfc822_escape # Regex to define acceptable Distutils command names. This is not *quite* @@ -85,6 +85,10 @@ class Distribution: "print the package description"), ('long-description', None, "print the long package description"), + ('platforms', None, + "print the list of platforms"), + ('keywords', None, + "print the list of keywords"), ] display_option_names = map(lambda x: translate_longopt(x[0]), display_options) @@ -206,9 +210,7 @@ def __init__ (self, attrs=None): raise DistutilsSetupError, \ "invalid distribution option '%s'" % key - if self.metadata.version is None: - raise DistutilsSetupError, \ - "No version number specified for distribution" + self.finalize_options() # __init__ () @@ -526,6 +528,28 @@ def _parse_command_opts (self, parser, args): # _parse_command_opts () + def finalize_options (self): + """Set final values for all the options on the Distribution + instance, analogous to the .finalize_options() method of Command + objects. + """ + + if self.metadata.version is None: + raise DistutilsSetupError, \ + "No version number specified for distribution" + + keywords = self.metadata.keywords + if keywords is not None: + if type(keywords) is StringType: + keywordlist = string.split(keywords, ',') + self.metadata.keywords = map(string.strip, keywordlist) + + platforms = self.metadata.platforms + if platforms is not None: + if type(platforms) is StringType: + platformlist = string.split(platforms, ',') + self.metadata.platforms = map(string.strip, platformlist) + def _show_help (self, parser, global_options=1, @@ -607,7 +631,11 @@ def handle_display_options (self, option_order): for (opt, val) in option_order: if val and is_display_option.get(opt): opt = translate_longopt(opt) - print getattr(self.metadata, "get_"+opt)() + value = getattr(self.metadata, "get_"+opt)() + if opt in ['keywords', 'platforms']: + print string.join(value, ',') + else: + print value any_display_options = 1 return any_display_options @@ -950,7 +978,38 @@ def __init__ (self): self.licence = None self.description = None self.long_description = None + self.keywords = None + self.platforms = None + def write_pkg_info (self, base_dir): + """Write the PKG-INFO file into the release tree. + """ + + pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') + + pkg_info.write('Metadata-Version: 1.0\n') + pkg_info.write('Name: %s\n' % self.get_name() ) + pkg_info.write('Version: %s\n' % self.get_version() ) + pkg_info.write('Summary: %s\n' % self.get_description() ) + pkg_info.write('Home-page: %s\n' % self.get_url() ) + pkg_info.write('Author: %s\n' % self.get_maintainer() ) + pkg_info.write('Author-email: %s\n' % self.get_maintainer_email() ) + pkg_info.write('License: %s\n' % self.get_licence() ) + + long_desc = rfc822_escape( self.get_long_description() ) + pkg_info.write('Description: %s\n' % long_desc) + + keywords = string.join( self.get_keywords(), ',') + if keywords: + pkg_info.write('Keywords: %s\n' % keywords ) + + for platform in self.get_platforms(): + pkg_info.write('Platform: %s\n' % platform ) + + pkg_info.close() + + # write_pkg_info () + # -- Metadata query methods ---------------------------------------- def get_name (self): @@ -996,6 +1055,12 @@ def get_description(self): def get_long_description(self): return self.long_description or "UNKNOWN" + def get_keywords(self): + return self.keywords or [] + + def get_platforms(self): + return self.platforms or ["UNKNOWN"] + # class DistributionMetadata From adced399695befb6c925c42e5ccae882a1f4924f Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 03:10:05 +0000 Subject: [PATCH 0714/8469] Call the write_pkg_info method --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 1f9e9184d7..894d7d44c5 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -31,7 +31,6 @@ def show_formats (): pretty_printer.print_help( "List of available source distribution formats:") - class sdist (Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -439,9 +438,10 @@ def make_release_tree (self, base_dir, files): dest = os.path.join(base_dir, file) self.copy_file(file, dest, link=link) + self.distribution.metadata.write_pkg_info(base_dir) + # make_release_tree () - def make_distribution (self): """Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required From 047c580a97cb9ef9101c572e241cb5f33773c502 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 03:48:31 +0000 Subject: [PATCH 0715/8469] Back out conversion to string methods; the Distutils is intended to work with 1.5.2 --- cmd.py | 6 +++--- cygwinccompiler.py | 6 +++--- extension.py | 4 ++-- version.py | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd.py b/cmd.py index cec4bff237..ce44829498 100644 --- a/cmd.py +++ b/cmd.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" -import sys, os, re +import sys, os, string, re from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util @@ -161,7 +161,7 @@ def dump_options (self, header=None, indent=""): print indent + header indent = indent + " " for (option, _, _) in self.user_options: - option = option.translate(longopt_xlate) + option = string.translate(option, longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) @@ -421,7 +421,7 @@ def make_file (self, infiles, outfile, func, args, """ if exec_msg is None: exec_msg = "generating %s from %s" % \ - (outfile, ', '.join(infiles)) + (outfile, string.join(infiles, ', ')) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 42318ad3d4..f40d1a2d4a 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -365,10 +365,10 @@ def check_config_h(): # "config.h" check -- should probably be renamed... from distutils import sysconfig - import sys + import string,sys # if sys.version contains GCC then python was compiled with # GCC, and the config.h file should be OK - if sys.version.find("GCC") >= 0: + if string.find(sys.version,"GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") fn = sysconfig.get_config_h_filename() @@ -387,7 +387,7 @@ def check_config_h(): else: # "config.h" contains an "#ifdef __GNUC__" or something similar - if s.find("__GNUC__") >= 0: + if string.find(s,"__GNUC__") >= 0: return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) else: return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) diff --git a/extension.py b/extension.py index f49abad003..a63ede233c 100644 --- a/extension.py +++ b/extension.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os +import os, string from types import * @@ -168,7 +168,7 @@ def read_setup_file (filename): elif switch == "-I": ext.include_dirs.append(value) elif switch == "-D": - equals = value.find("=") + equals = string.find(value, "=") if equals == -1: # bare "-DFOO" -- no value ext.define_macros.append((value, None)) else: # "-DFOO=blah" diff --git a/version.py b/version.py index 2916eb79a1..9d3d172429 100644 --- a/version.py +++ b/version.py @@ -112,12 +112,12 @@ def parse (self, vstring): match.group(1, 2, 4, 5, 6) if patch: - self.version = tuple(map(int, [major, minor, patch])) + self.version = tuple(map(string.atoi, [major, minor, patch])) else: - self.version = tuple(map(int, [major, minor]) + [0]) + self.version = tuple(map(string.atoi, [major, minor]) + [0]) if prerelease: - self.prerelease = (prerelease[0], int(prerelease_num)) + self.prerelease = (prerelease[0], string.atoi(prerelease_num)) else: self.prerelease = None @@ -125,9 +125,9 @@ def parse (self, vstring): def __str__ (self): if self.version[2] == 0: - vstring = '.'.join(map(str, self.version[0:2])) + vstring = string.join(map(str, self.version[0:2]), '.') else: - vstring = '.'.join(map(str, self.version)) + vstring = string.join(map(str, self.version), '.') if self.prerelease: vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) From 7e76bc2645746985a3025843e7476b540c8c7316 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 03:50:09 +0000 Subject: [PATCH 0716/8469] Remove redundant import --- cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index f40d1a2d4a..92def164ad 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -365,7 +365,7 @@ def check_config_h(): # "config.h" check -- should probably be renamed... from distutils import sysconfig - import string,sys + import string # if sys.version contains GCC then python was compiled with # GCC, and the config.h file should be OK if string.find(sys.version,"GCC") >= 0: From 52e9a5d7a9f246c15dfefe605c6a4e37a706001d Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 22 Mar 2001 15:32:23 +0000 Subject: [PATCH 0717/8469] Use the get_contact*() accessors instead of get_maintainer*() --- dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 23466965ad..7ef3a42b76 100644 --- a/dist.py +++ b/dist.py @@ -992,8 +992,8 @@ def write_pkg_info (self, base_dir): pkg_info.write('Version: %s\n' % self.get_version() ) pkg_info.write('Summary: %s\n' % self.get_description() ) pkg_info.write('Home-page: %s\n' % self.get_url() ) - pkg_info.write('Author: %s\n' % self.get_maintainer() ) - pkg_info.write('Author-email: %s\n' % self.get_maintainer_email() ) + pkg_info.write('Author: %s\n' % self.get_contact() ) + pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) pkg_info.write('License: %s\n' % self.get_licence() ) long_desc = rfc822_escape( self.get_long_description() ) From 9f790bc4fe4815ba2d112430a83d527a8b13f8b0 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 23 Mar 2001 17:30:26 +0000 Subject: [PATCH 0718/8469] Change rfc822_escape() to ensure there's a consistent amount of whitespace after each newline, instead of just blindly inserting a space at the start of each line. (Improvement suggested by Thomas Wouters) --- util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util.py b/util.py index 010db9a3b0..01abd346d5 100644 --- a/util.py +++ b/util.py @@ -446,10 +446,11 @@ def byte_compile (py_files, def rfc822_escape (header): """Return a version of the string escaped for inclusion in an - RFC-822 header, by adding a space after each newline. + RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - header = string.rstrip(header) - header = string.replace(header, '\n', '\n ') + lines = string.split(header, '\n') + lines = map(string.strip, lines) + header = string.join(lines, '\n' + 8*' ') return header From 3d12c8d570fc54ac95ec9d25869b79b5b862c24a Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 31 Mar 2001 02:41:01 +0000 Subject: [PATCH 0719/8469] Back out the requirement to supply a version number --- dist.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dist.py b/dist.py index 7ef3a42b76..1ac9786d8d 100644 --- a/dist.py +++ b/dist.py @@ -534,10 +534,6 @@ def finalize_options (self): objects. """ - if self.metadata.version is None: - raise DistutilsSetupError, \ - "No version number specified for distribution" - keywords = self.metadata.keywords if keywords is not None: if type(keywords) is StringType: From 74314af647d7117a502d009c6c465851867e00e4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 5 Apr 2001 15:46:48 +0000 Subject: [PATCH 0720/8469] Patch #413912 from Steve Majewski: Add .m to the list of extensions in order to support Objective-C. --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index f7eb93ae43..9ecfb6d13b 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -67,7 +67,7 @@ class UnixCCompiler (CCompiler): # reasonable common default here, but it's not necessarily used on all # Unices! - src_extensions = [".c",".C",".cc",".cxx",".cpp"] + src_extensions = [".c",".C",".cc",".cxx",".cpp",".m"] obj_extension = ".o" static_lib_extension = ".a" shared_lib_extension = ".so" From c6c4c5c787dad0ef56656ef9123aa7ae49be9c45 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 10 Apr 2001 18:57:07 +0000 Subject: [PATCH 0721/8469] Since bdist_wininst.py contains the installer executable, it had to be rebuild. --- command/bdist_wininst.py | 524 +++++++++++++++++++-------------------- 1 file changed, 262 insertions(+), 262 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index f1dd633297..477b733cd3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -237,7 +237,7 @@ def get_exe_bytes (self): AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAABwv7aMNN7Y3zTe2N803tjfT8LU3zXe2N+3wtbfNt7Y39zB3N823tjfVsHL 3zze2N803tnfSN7Y3zTe2N853tjf3MHS3zne2N+M2N7fNd7Y31JpY2g03tjfAAAAAAAAAABQRQAA -TAEDAE55sjoAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAoAAAsOwAAACwAAAA8AAAAABAAAAQAAAA +TAEDABAF0joAAAAAAAAAAOAADwELAQYAAEAAAAAQAAAAoAAA8OwAAACwAAAA8AAAAABAAAAQAAAA AgAABAAAAAAAAAAEAAAAAAAAAAAAAQAABAAAAAAAAAIAAAAAABAA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78Edtz5IPBAoH9APP//4PRAY0UL4P9/HYPigJCiAdHSXX36WP///+QiwKD +wgSJB4PHBIPpBHfxAc/pTP///16J97mtAAAAigdHLOg8AXf3gD8BdfKLB4pfBGbB6AjBwBCGxCn4 +gOvoAfCJB4PHBYnY4tmNvgDAAACLBwnAdDyLXwSNhDAw4QAAAfNQg8cI/5a84QAAlYoHRwjAdNyJ ++VdI8q5V/5bA4QAACcB0B4kDg8ME6+H/lsThAABh6fhr//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA From 4d5c70781a289e136da686d05bcb1a0767e08cea Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 14 Apr 2001 16:17:00 +0000 Subject: [PATCH 0722/8469] Pete Shinners discovered that zipfile.ZipFile() is called with mode argument "wb", while the only valid modes are "r", "w" or "a". Fix this by changing the mode to "w". --- archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_util.py b/archive_util.py index 61bc25ea0f..4c5641b951 100644 --- a/archive_util.py +++ b/archive_util.py @@ -100,7 +100,7 @@ def visit (z, dirname, names): z.write(path, path) if not dry_run: - z = zipfile.ZipFile(zip_filename, "wb", + z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) os.path.walk(base_dir, visit, z) From 48343f32fa28556d2d229b5a661bfe5e0b4b0634 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 23 Apr 2001 16:01:06 +0000 Subject: [PATCH 0723/8469] Bump version # for final release --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index bd9761cc25..16d387a46a 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "1.0.2pre" +__version__ = "1.0.2" From 09b62d24b0c662a7e9146fcafe7a4f29bff0d463 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 23 Apr 2001 17:13:03 +0000 Subject: [PATCH 0724/8469] Fix typo in docstring --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 16d387a46a..27e79a54ac 100644 --- a/__init__.py +++ b/__init__.py @@ -1,6 +1,6 @@ """distutils -The main package for the Python Module Distribtion Utilities. Normally +The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup From 59653f9ebdb6ead7454c56aadfb40bfcb33b0bfa Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 17 May 2001 12:52:01 +0000 Subject: [PATCH 0725/8469] Made distutils understand the MacPython Carbon runtime model. Distutils will build for the runtime model you are currently using for the interpreter. --- mwerkscompiler.py | 2 ++ sysconfig.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 2edc8259bf..981fd95f01 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -114,6 +114,8 @@ def link (self, # into the project. if output_filename[-8:] == '.ppc.slb': basename = output_filename[:-8] + elif output_filename[-11:] == '.carbon.slb': + basename = output_filename[:-11] else: basename = os.path.strip(output_filename)[0] projectname = basename + '.mcp' diff --git a/sysconfig.py b/sysconfig.py index 91f9279d87..473faea85e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -339,7 +339,11 @@ def _init_mac(): # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] = get_python_inc(plat_specific=0) + import MacOS + if not hasattr(MacOS, 'runtimemodel'): g['SO'] = '.ppc.slb' + else: + g['SO'] = '.%s.slb' % MacOS.runtimemodel # XXX are these used anywhere? g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") From 9ac36316de9ed5d0c147f7493e9b472480c7b4f7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 17 May 2001 15:03:14 +0000 Subject: [PATCH 0726/8469] Fixed botched indent in _init_mac() code. (It may never be executed, but it still can't have any syntax errors. Went a little too fast there, Jack? :-) --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 473faea85e..d013d1b832 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -341,7 +341,7 @@ def _init_mac(): import MacOS if not hasattr(MacOS, 'runtimemodel'): - g['SO'] = '.ppc.slb' + g['SO'] = '.ppc.slb' else: g['SO'] = '.%s.slb' % MacOS.runtimemodel From 4fb616ab1845cdb8a67b68055a8a348db3c6f99c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 21 May 2001 20:34:38 +0000 Subject: [PATCH 0727/8469] Fix bug #418369: typo in bdist_rpm --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index f421590488..4659494533 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -189,7 +189,7 @@ def finalize_package_data (self): if type(self.doc_files) is ListType: for readme in ('README', 'README.txt'): if os.path.exists(readme) and readme not in self.doc_files: - self.doc.append(readme) + self.doc_files.append(readme) self.ensure_string('release', "1") self.ensure_string('serial') # should it be an int? From e7ab99d0e57404a593cd9e44f9381d3f08b0925c Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Tue, 19 Jun 2001 19:44:02 +0000 Subject: [PATCH 0728/8469] Fixed -D emulation for symbols with a value, as specified with the define_macros Extension argument. --- mwerkscompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 981fd95f01..1b416715ea 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -164,7 +164,7 @@ def link (self, if value is None: fp.write('#define %s\n'%name) else: - fp.write('#define %s "%s"\n'%(name, value)) + fp.write('#define %s %s\n'%(name, value)) fp.close() settings['prefixname'] = prefixname From 37936adf51754abcc600a93964e105b20a052e20 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 19 Jun 2001 21:23:11 +0000 Subject: [PATCH 0729/8469] - _filename_to_abs() didn't cater for .. components in the pathname. Fixed. - compile() didn't return a (empty) list of objects. Fixed. - the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed. --- mwerkscompiler.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 1b416715ea..46e16e2e94 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -62,10 +62,13 @@ def compile (self, debug=0, extra_preargs=None, extra_postargs=None): + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) self.__sources = sources self.__macros = macros self.__include_dirs = include_dirs # Don't need extra_preargs and extra_postargs for CW + return [] def link (self, target_desc, @@ -80,6 +83,11 @@ def link (self, extra_preargs=None, extra_postargs=None, build_temp=None): + # First fixup. + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + # First examine a couple of options for things that aren't implemented yet if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' @@ -200,6 +208,11 @@ def _filename_to_abs(self, filename): if not os.path.isabs(filename): curdir = os.getcwd() filename = os.path.join(curdir, filename) - return filename + # Finally remove .. components + components = string.split(filename, ':') + for i in range(1, len(components)): + if components[i] == '..': + components[i] = '' + return string.join(components, ':') From debc45c4d667d5573afe333e9ac6d9ede0d07da1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2001 16:52:02 +0000 Subject: [PATCH 0730/8469] dummy checkin for testing, please ignore --- command/bdist_wininst.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 477b733cd3..16a6cc418c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -216,7 +216,6 @@ def create_exe (self, arcname, fullname, bitmap=None): def get_exe_bytes (self): import base64 return base64.decodestring(EXEDATA) - # class bdist_wininst if __name__ == '__main__': From 78fe57542d08d417655af49304c2b266b993a2ff Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 16 Jul 2001 14:19:20 +0000 Subject: [PATCH 0731/8469] [Bug #441527] Fixes for preprocessor support, contributed by Tarn Weisner Burton --- unixccompiler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 9ecfb6d13b..91e7d5e03b 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -99,12 +99,13 @@ def preprocess (self, if extra_preargs: pp_args[:0] = extra_preargs if extra_postargs: - extra_postargs.extend(extra_postargs) + pp_args.extend(extra_postargs) - # We need to preprocess: either we're being forced to, or the - # source file is newer than the target (or the target doesn't + # We need to preprocess: either we're being forced to, or we're + # generating output to stdout, or there's a target output file and + # the source file is newer than the target (or the target doesn't # exist). - if self.force or (output_file and newer(source, output_file)): + if self.force or output_file is None or newer(source, output_file)): if output_file: self.mkpath(os.path.dirname(output_file)) try: From 4490899b03853d52c7f718b6a2c5a54a2e865829 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 16 Jul 2001 14:46:13 +0000 Subject: [PATCH 0732/8469] Fix a mismatched parenthesis in the last patch. --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 91e7d5e03b..da1f2a4e8e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -105,7 +105,7 @@ def preprocess (self, # generating output to stdout, or there's a target output file and # the source file is newer than the target (or the target doesn't # exist). - if self.force or output_file is None or newer(source, output_file)): + if self.force or output_file is None or newer(source, output_file): if output_file: self.mkpath(os.path.dirname(output_file)) try: From 89b261c72363d96d8c2e380370cff3396b22b488 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 18 Jul 2001 18:39:56 +0000 Subject: [PATCH 0733/8469] Minor changes for stylistic cleanliness and consistency. --- sysconfig.py | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d013d1b832..16e80231d1 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -1,5 +1,9 @@ -"""Provide access to Python's configuration information. The specific names -defined in the module depend heavily on the platform and configuration. +"""Provide access to Python's configuration information. The specific +configuration variables available depend heavily on the platform and +configuration. The values may be retrieved using +get_config_var(name), and the list of variables is available via +get_config_vars().keys(). Additional convenience functions are also +available. Written by: Fred L. Drake, Jr. Email: @@ -45,7 +49,7 @@ def get_python_inc(plat_specific=0, prefix=None): sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: - prefix = (plat_specific and EXEC_PREFIX or PREFIX) + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: return "Include/" @@ -55,9 +59,9 @@ def get_python_inc(plat_specific=0, prefix=None): elif os.name == "mac": return os.path.join(prefix, "Include") else: - raise DistutilsPlatformError, \ - ("I don't know where Python installs its C header files " + - "on platform '%s'") % os.name + raise DistutilsPlatformError( + "I don't know where Python installs its C header files " + "on platform '%s'" % os.name) def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): @@ -75,7 +79,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: - prefix = (plat_specific and EXEC_PREFIX or PREFIX) + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": libpython = os.path.join(prefix, @@ -96,23 +100,23 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if standard_lib: return os.path.join(EXEC_PREFIX, "Mac", "Plugins") else: - raise DistutilsPlatformError, \ - "OK, where DO site-specific extensions go on the Mac?" + raise DistutilsPlatformError( + "OK, where DO site-specific extensions go on the Mac?") else: if standard_lib: return os.path.join(PREFIX, "Lib") else: - raise DistutilsPlatformError, \ - "OK, where DO site-specific modules go on the Mac?" + raise DistutilsPlatformError( + "OK, where DO site-specific modules go on the Mac?") else: - raise DistutilsPlatformError, \ - ("I don't know where Python installs its library " + - "on platform '%s'") % os.name + raise DistutilsPlatformError( + "I don't know where Python installs its library " + "on platform '%s'" % os.name) # get_python_lib() -def customize_compiler (compiler): +def customize_compiler(compiler): """Do any platform-specific customization of the CCompiler instance 'compiler'. Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. @@ -299,7 +303,7 @@ def _init_posix(): if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror - raise DistutilsPlatformError, my_msg + raise DistutilsPlatformError(my_msg) # On AIX, there are wrong paths to the linker scripts in the Makefile From cfca016e6101c3590ecefd1731c56be76f4f6b83 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 20 Jul 2001 19:29:04 +0000 Subject: [PATCH 0734/8469] Patch #429442 from Jason Tishler: Corrects sys.platform and distutils.util.get_platform() problems caused by the cruft contained in Cygwin's uname -s. --- util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util.py b/util.py index 01abd346d5..25ddbdf450 100644 --- a/util.py +++ b/util.py @@ -62,6 +62,7 @@ def get_platform (): elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": + osname = "cygwin" rel_re = re.compile (r'[\d.]+') m = rel_re.match(release) if m: From 9dad3ab68accd527b9d7027b9d005303abfbdc35 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 25 Jul 2001 19:48:03 +0000 Subject: [PATCH 0735/8469] Don't "import *" from stat at all -- just import what's needed, and do it back in copy_file() (not at module level). --- file_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_util.py b/file_util.py index 39f6eea289..a3767bbd93 100644 --- a/file_util.py +++ b/file_util.py @@ -8,7 +8,6 @@ __revision__ = "$Id$" import os -from stat import * from distutils.errors import DistutilsFileError @@ -108,6 +107,7 @@ def copy_file (src, dst, # (not update) and (src newer than dst). from distutils.dep_util import newer + from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): raise DistutilsFileError, \ From 49b8a8e81d33296018e5454c1d42c9a8321510da Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Wed, 25 Jul 2001 20:20:11 +0000 Subject: [PATCH 0736/8469] Undo revision 1.7: always mangle a #! line containing "python" to point to the current Python interpreter (ie. the one used for building/installation), even (especially!) if "/usr/bin/env" appears in the #! line. Rationale: installing scripts with "#!/usr/bin/env python" is asking for trouble, because 1) it might pick the wrong interpreter (not the one used to build/install the script) 2) it doesn't work on all platforms (try it on IRIX 5, or on Linux with command-line options for python) 3) "env" might not be in /usr/bin --- command/build_scripts.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index ee7f4e2d1e..653b8d8ace 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -10,10 +10,8 @@ from distutils.core import Command from distutils.dep_util import newer -# check if Python is called on the first line with this expression. -# This expression will leave lines using /usr/bin/env alone; presumably -# the script author knew what they were doing...) -first_line_re = re.compile(r'^#!(?!\s*/usr/bin/env\b).*python(\s+.*)?') +# check if Python is called on the first line with this expression +first_line_re = re.compile(r'^#!.*python(\s+.*)?') class build_scripts (Command): From 853724a093730bff94e89528c3117b032c8af6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 26 Jul 2001 13:41:06 +0000 Subject: [PATCH 0737/8469] Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. --- command/build_ext.py | 4 ++-- cygwinccompiler.py | 16 ++++++++-------- sysconfig.py | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index f732373ea3..259a8447fb 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -125,7 +125,7 @@ def finalize_options (self): self.extensions = self.distribution.ext_modules - # Make sure Python's include directories (for Python.h, config.h, + # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. py_include = sysconfig.get_python_inc() plat_py_include = sysconfig.get_python_inc(plat_specific=1) @@ -592,7 +592,7 @@ def get_libraries (self, ext): """ # The python library is always needed on Windows. For MSVC, this # is redundant, since the library is mentioned in a pragma in - # config.h that MSVC groks. The other Windows compilers all seem + # pyconfig.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. from distutils.msvccompiler import MSVCCompiler diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 92def164ad..07e16655b0 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -73,7 +73,7 @@ def __init__ (self, (status, details)) if status is not CONFIG_H_OK: self.warn( - "Python's config.h doesn't seem to support your compiler. " + + "Python's pyconfig.h doesn't seem to support your compiler. " + ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") @@ -335,7 +335,7 @@ def __init__ (self, # class Mingw32CCompiler -# Because these compilers aren't configured in Python's config.h file by +# Because these compilers aren't configured in Python's pyconfig.h file by # default, we should at least warn the user if he is using a unmodified # version. @@ -345,7 +345,7 @@ def __init__ (self, def check_config_h(): - """Check if the current Python installation (specifically, config.h) + """Check if the current Python installation (specifically, pyconfig.h) appears amenable to building extensions with GCC. Returns a tuple (status, details), where 'status' is one of the following constants: CONFIG_H_OK @@ -353,21 +353,21 @@ def check_config_h(): CONFIG_H_NOTOK doesn't look good CONFIG_H_UNCERTAIN - not sure -- unable to read config.h + not sure -- unable to read pyconfig.h 'details' is a human-readable string explaining the situation. Note there are two ways to conclude "OK": either 'sys.version' contains the string "GCC" (implying that this Python was built with GCC), or the - installed "config.h" contains the string "__GNUC__". + installed "pyconfig.h" contains the string "__GNUC__". """ # XXX since this function also checks sys.version, it's not strictly a - # "config.h" check -- should probably be renamed... + # "pyconfig.h" check -- should probably be renamed... from distutils import sysconfig import string # if sys.version contains GCC then python was compiled with - # GCC, and the config.h file should be OK + # GCC, and the pyconfig.h file should be OK if string.find(sys.version,"GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") @@ -386,7 +386,7 @@ def check_config_h(): "couldn't read '%s': %s" % (fn, exc.strerror)) else: - # "config.h" contains an "#ifdef __GNUC__" or something similar + # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar if string.find(s,"__GNUC__") >= 0: return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) else: diff --git a/sysconfig.py b/sysconfig.py index 16e80231d1..529d0e6dd3 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -43,7 +43,7 @@ def get_python_inc(plat_specific=0, prefix=None): If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files - (namely config.h). + (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. @@ -137,10 +137,10 @@ def customize_compiler(compiler): def get_config_h_filename(): - """Return full pathname of installed config.h file.""" + """Return full pathname of installed pyconfig.h file.""" if python_build: inc_dir = '.' else: inc_dir = get_python_inc(plat_specific=1) - return os.path.join(inc_dir, "config.h") + return os.path.join(inc_dir, "pyconfig.h") def get_makefile_filename(): From 80b512fee5d1ee8342100e305a8582f4b121d978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 26 Jul 2001 18:06:58 +0000 Subject: [PATCH 0738/8469] Add backwards compatibility. --- sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 529d0e6dd3..bbf7c4afab 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -140,7 +140,12 @@ def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: inc_dir = '.' else: inc_dir = get_python_inc(plat_specific=1) - return os.path.join(inc_dir, "pyconfig.h") + if sys.version < '2.2': + config_h = 'config.h' + else: + # The name of the config.h file changed in 2.2 + config_h = 'pyconfig.h' + return os.path.join(inc_dir, config_h) def get_makefile_filename(): From 6f9753a79698a3fd9c882c8567cd75a351e6e04a Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Sun, 29 Jul 2001 21:39:18 +0000 Subject: [PATCH 0739/8469] Do convert_path() on script paths (now PyXML builds out of the box under MacOS.) --- command/build_scripts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/build_scripts.py b/command/build_scripts.py index 653b8d8ace..611767e7bc 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -9,6 +9,7 @@ import sys, os, re from distutils.core import Command from distutils.dep_util import newer +from distutils.util import convert_path # check if Python is called on the first line with this expression first_line_re = re.compile(r'^#!.*python(\s+.*)?') @@ -54,6 +55,7 @@ def copy_scripts (self): self.mkpath(self.build_dir) for script in self.scripts: adjust = 0 + script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script)) if not self.force and not newer(script, outfile): From 27487d75c92e72a5a28d25d0b75bbb26c49ec5b4 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 2 Aug 2001 20:03:12 +0000 Subject: [PATCH 0740/8469] Miscellaneous minor cleanups. --- sysconfig.py | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index bbf7c4afab..1f0d14539f 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -29,14 +29,15 @@ python_build = 0 def set_python_build(): - """Set the python_build flag to true; this means that we're - building Python itself. Only called from the setup.py script - shipped with Python. + """Set the python_build flag to true. + + This means that we're building Python itself. Only called from + the setup.py script shipped with Python. """ - global python_build python_build = 1 + def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. @@ -55,7 +56,7 @@ def get_python_inc(plat_specific=0, prefix=None): return "Include/" return os.path.join(prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": - return os.path.join(prefix, "Include") # include or Include? + return os.path.join(prefix, "include") elif os.name == "mac": return os.path.join(prefix, "Include") else: @@ -80,7 +81,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX - + if os.name == "posix": libpython = os.path.join(prefix, "lib", "python" + sys.version[:3]) @@ -91,20 +92,20 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): elif os.name == "nt": if standard_lib: - return os.path.join(PREFIX, "Lib") + return os.path.join(prefix, "Lib") else: return prefix elif os.name == "mac": if plat_specific: if standard_lib: - return os.path.join(EXEC_PREFIX, "Mac", "Plugins") + return os.path.join(prefix, "Mac", "Plugins") else: raise DistutilsPlatformError( "OK, where DO site-specific extensions go on the Mac?") else: if standard_lib: - return os.path.join(PREFIX, "Lib") + return os.path.join(prefix, "Lib") else: raise DistutilsPlatformError( "OK, where DO site-specific modules go on the Mac?") @@ -113,13 +114,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) -# get_python_lib() - def customize_compiler(compiler): - """Do any platform-specific customization of the CCompiler instance - 'compiler'. Mainly needed on Unix, so we can plug in the information - that varies across Unices and is stored in Python's Makefile. + """Do any platform-specific customization of a CCompiler instance. + + Mainly needed on Unix, so we can plug in the information that + varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": (cc, opt, ccshared, ldshared, so_ext) = \ @@ -138,8 +138,10 @@ def customize_compiler(compiler): def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" - if python_build: inc_dir = '.' - else: inc_dir = get_python_inc(plat_specific=1) + if python_build: + inc_dir = os.curdir + else: + inc_dir = get_python_inc(plat_specific=1) if sys.version < '2.2': config_h = 'config.h' else: @@ -197,7 +199,6 @@ def parse_makefile(fn, g=None): A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. - """ from distutils.text_file import TextFile fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) @@ -309,8 +310,8 @@ def _init_posix(): my_msg = my_msg + " (%s)" % msg.strerror raise DistutilsPlatformError(my_msg) - - + + # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. @@ -397,6 +398,6 @@ def get_config_vars(*args): def get_config_var(name): """Return the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to - get_config_vars().get(name) + get_config_vars().get(name) """ return get_config_vars().get(name) From 6daca2f31cd60949e816919a9c1163b016c02a71 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 9 Aug 2001 20:57:46 +0000 Subject: [PATCH 0741/8469] Use correct variable name --- fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 6f8b8c06f1..83d07216a7 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -275,7 +275,7 @@ def getopt (self, args=None, object=None): if not self.takes_arg[opt]: # boolean option? if val != '': # shouldn't have a value! raise DistutilsInternalError, \ - "this can't happen: bad option value '%s'" % value + "this can't happen: bad option value '%s'" % val alias = self.negative_alias.get(opt) if alias: From db61a5d336c081391a6621918a63df03e9b64e04 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 9 Aug 2001 20:59:53 +0000 Subject: [PATCH 0742/8469] Import the errno module --- file_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file_util.py b/file_util.py index a3767bbd93..991d8357b5 100644 --- a/file_util.py +++ b/file_util.py @@ -188,7 +188,8 @@ def move_file (src, dst, other systems??? """ from os.path import exists, isfile, isdir, basename, dirname - + import errno + if verbose: print "moving %s -> %s" % (src, dst) From ff1cb1dae11e3fb8f12fba68a62f9c0085ff9e50 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 9 Aug 2001 21:02:34 +0000 Subject: [PATCH 0743/8469] Import UnknownFileError --- bcppcompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 00ccec548b..2742b5fe33 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -17,7 +17,7 @@ import sys, os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError + CompileError, LibError, LinkError, UnknownFileError from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options from distutils.file_util import write_file From 34771a9b3649f5b2762c5090a5587d49dc7e9698 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 18:49:23 +0000 Subject: [PATCH 0744/8469] [Bug #412271, bug #449009] Use 'license' as the attribute name, though 'licence' is still supported for backward-compatibility (Should I add a warning to get_licence(), or not bother?) Also fixes an UnboundLocalError noticed by PyChecker --- dist.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dist.py b/dist.py index 1ac9786d8d..824a0d3e6a 100644 --- a/dist.py +++ b/dist.py @@ -13,7 +13,6 @@ from types import * from copy import copy from distutils.errors import * -from distutils import sysconfig from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape @@ -77,10 +76,10 @@ class Distribution: "print the maintainer's email address if known, else the author's"), ('url', None, "print the URL for this package"), - ('licence', None, - "print the licence of the package"), ('license', None, - "alias for --licence"), + "print the license of the package"), + ('licence', None, + "alias for --license"), ('description', None, "print the package description"), ('long-description', None, @@ -395,7 +394,7 @@ def parse_command_line (self): self.commands = [] parser = FancyGetopt(self.global_options + self.display_options) parser.set_negative_aliases(self.negative_opt) - parser.set_aliases({'license': 'licence'}) + parser.set_aliases({'licence': 'license'}) args = parser.getopt(args=self.script_args, object=self) option_order = parser.get_option_order() @@ -580,7 +579,7 @@ def _show_help (self, print for command in self.commands: - if type(command) is ClassType and issubclass(klass, Command): + if type(command) is ClassType and issubclass(command, Command): klass = command else: klass = self.get_command_class(command) @@ -971,7 +970,7 @@ def __init__ (self): self.maintainer = None self.maintainer_email = None self.url = None - self.licence = None + self.license = None self.description = None self.long_description = None self.keywords = None @@ -990,7 +989,7 @@ def write_pkg_info (self, base_dir): pkg_info.write('Home-page: %s\n' % self.get_url() ) pkg_info.write('Author: %s\n' % self.get_contact() ) pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) - pkg_info.write('License: %s\n' % self.get_licence() ) + pkg_info.write('License: %s\n' % self.get_license() ) long_desc = rfc822_escape( self.get_long_description() ) pkg_info.write('Description: %s\n' % long_desc) @@ -1042,9 +1041,10 @@ def get_contact_email(self): def get_url(self): return self.url or "UNKNOWN" - def get_licence(self): - return self.licence or "UNKNOWN" - + def get_license(self): + return self.license or "UNKNOWN" + get_licence = get_license + def get_description(self): return self.description or "UNKNOWN" From 404bfc2ce6499d3f1e0f3f7bc318805fb1f53feb Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 18:50:11 +0000 Subject: [PATCH 0745/8469] Use .get_license() --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 4659494533..92de935825 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -347,7 +347,7 @@ def _make_spec_file(self): spec_file.append('Source0: %{name}-%{version}.tar.gz') spec_file.extend([ - 'Copyright: ' + self.distribution.get_licence(), + 'Copyright: ' + self.distribution.get_license(), 'Group: ' + self.group, 'BuildRoot: %{_tmppath}/%{name}-buildroot', 'Prefix: %{_prefix}', ]) From a23893242a626332e830cf29243efe00df23c38f Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 10 Aug 2001 18:59:30 +0000 Subject: [PATCH 0746/8469] Wrap a comment to fit in 80 columns. Use construction-syntax for an exception to make the argument easier to read. --- dist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dist.py b/dist.py index 824a0d3e6a..3803f5cc68 100644 --- a/dist.py +++ b/dist.py @@ -375,8 +375,8 @@ def parse_command_line (self): help). """ # - # We now have enough information to show the Macintosh dialog that allows - # the user to interactively specify the "command line". + # We now have enough information to show the Macintosh dialog + # that allows the user to interactively specify the "command line". # if sys.platform == 'mac': import EasyDialogs @@ -508,10 +508,10 @@ def _parse_command_opts (self, parser, args): if callable(func): func() else: - raise DistutilsClassError, \ - ("invalid help function %s for help option '%s': " - "must be a callable object (function, etc.)") % \ - (`func`, help_option) + raise DistutilsClassError( + "invalid help function %s for help option '%s': " + "must be a callable object (function, etc.)" + % (`func`, help_option)) if help_option_found: return From 67be7feb397ea9c635a125a3efa771e38454e78c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 18:59:59 +0000 Subject: [PATCH 0747/8469] Add forgotten import --- command/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/install.py b/command/install.py index 40e00705d3..1d0a34e4cd 100644 --- a/command/install.py +++ b/command/install.py @@ -10,6 +10,7 @@ from types import * from distutils.core import Command, DEBUG from distutils.sysconfig import get_config_vars +from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError From cd27545f369affed2ce5537416fd463fb1180c1c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 19:00:15 +0000 Subject: [PATCH 0748/8469] Fix typo caught by PyChecker --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 92de935825..150fdeca62 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -167,7 +167,7 @@ def finalize_options (self): ("don't know how to create RPM " "distributions on platform %s" % os.name) if self.binary_only and self.source_only: - raise DistutilsOptionsError, \ + raise DistutilsOptionError, \ "cannot supply both '--source-only' and '--binary-only'" # don't pass CFLAGS to pure python distributions From f7cb031597baffc1532b640a2c5fb2d08f306524 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 19:00:41 +0000 Subject: [PATCH 0749/8469] Remove unused variable --- command/build_scripts.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 611767e7bc..16024e5fed 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -51,7 +51,6 @@ def copy_scripts (self): ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ - outfiles = [] self.mkpath(self.build_dir) for script in self.scripts: adjust = 0 From 45de3e623e5f498ee233b53b22a76a48fc542a08 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 10 Aug 2001 20:24:33 +0000 Subject: [PATCH 0750/8469] [Bug #414032] Make the 'sdist' command work when the distribution contains libraries. This is done by adding a .get_source_files() method, contributed by Rene Liebscher and slightly modified. Remove an unused local variable spotted by PyChecker --- command/build_clib.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 063da91552..69ed044551 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -184,9 +184,25 @@ def get_library_names (self): # get_library_names () - def build_libraries (self, libraries): + def get_source_files (self): + self.check_library_list(self.libraries) + filenames = [] + for (lib_name, build_info) in self.libraries: + sources = build_info.get('sources') + if (sources is None or + type(sources) not in (ListType, TupleType) ): + raise DistutilsSetupError, \ + ("in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % lib_name + + filenames.extend(sources) + + return filenames + # get_source_files () - compiler = self.compiler + + def build_libraries (self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get('sources') From 33c706bf78fbd8f9aad6ec837164a703b8a9a2e2 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 13 Aug 2001 13:56:24 +0000 Subject: [PATCH 0751/8469] Fix for NameError caught by PyChecker. (This command seems to be essentially untested; should fix that...) --- command/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/config.py b/command/config.py index ce6cff8cef..d409691874 100644 --- a/command/config.py +++ b/command/config.py @@ -272,8 +272,8 @@ def try_run (self, body, from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: - self._link(body, headers, include_dirs, - libraries, library_dirs, lang) + src, obj, exe = self._link(body, headers, include_dirs, + libraries, library_dirs, lang) self.spawn([exe]) ok = 1 except (CompileError, LinkError, DistutilsExecError): From dbdaae041996677d97be3ed6bed2b0bd59643989 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 16 Aug 2001 13:56:40 +0000 Subject: [PATCH 0752/8469] [Patch #442530 from twburton] Provide include_dirs argument to all calls to ._preprocess and ._compile Fix typo: pattern.search(pattern) should be pattern.search(line) --- command/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/config.py b/command/config.py index d409691874..2df42a5722 100644 --- a/command/config.py +++ b/command/config.py @@ -187,7 +187,7 @@ def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): self._check_compiler() ok = 1 try: - self._preprocess(body, headers, lang) + self._preprocess(body, headers, include_dirs, lang) except CompileError: ok = 0 @@ -205,7 +205,7 @@ def search_cpp (self, pattern, body=None, """ self._check_compiler() - (src, out) = self._preprocess(body, headers, lang) + (src, out) = self._preprocess(body, headers, include_dirs, lang) if type(pattern) is StringType: pattern = re.compile(pattern) @@ -216,7 +216,7 @@ def search_cpp (self, pattern, body=None, line = file.readline() if line == '': break - if pattern.search(pattern): + if pattern.search(line): match = 1 break @@ -231,7 +231,7 @@ def try_compile (self, body, headers=None, include_dirs=None, lang="c"): from distutils.ccompiler import CompileError self._check_compiler() try: - self._compile(body, headers, lang) + self._compile(body, headers, include_dirs, lang) ok = 1 except CompileError: ok = 0 From 95bdf9afbb9a6455ee440381fc6226fd00aede8f Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 16 Aug 2001 14:08:02 +0000 Subject: [PATCH 0753/8469] [Patch #444854 from twburton] Add executable extension, needed to get the program name right on Win32 --- command/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/config.py b/command/config.py index 2df42a5722..b89997a293 100644 --- a/command/config.py +++ b/command/config.py @@ -148,10 +148,13 @@ def _link (self, body, libraries, library_dirs, lang): (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] - self.temp_files.append(prog) # XXX should be prog + exe_ext self.compiler.link_executable([obj], prog, libraries=libraries, library_dirs=library_dirs) + + prog = prog + self.compiler.exe_extension + self.temp_files.append(prog) + return (src, obj, prog) def _clean (self, *filenames): From d786b1a936ba0f38409c95d2906c908d1ba245a1 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 16 Aug 2001 20:17:41 +0000 Subject: [PATCH 0754/8469] [Patch #441691] preprocess() method for Borland C compiler. I have no way of testing this. --- bcppcompiler.py | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 2742b5fe33..5c0fae8b71 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -21,7 +21,7 @@ from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options from distutils.file_util import write_file - +from distutils.dep_util import newer class BCPPCompiler(CCompiler) : """Concrete class that implements an interface to the Borland C/C++ @@ -373,3 +373,37 @@ def object_filenames (self, return obj_names # object_filenames () + + def preprocess (self, + source, + output_file=None, + macros=None, + include_dirs=None, + extra_preargs=None, + extra_postargs=None): + + (_, macros, include_dirs) = \ + self._fix_compile_args(None, macros, include_dirs) + pp_opts = gen_preprocess_options(macros, include_dirs) + pp_args = ['cpp32.exe'] + pp_opts + if output_file is not None: + pp_args.append('-o' + output_file) + if extra_preargs: + pp_args[:0] = extra_preargs + if extra_postargs: + pp_args.extend(extra_postargs) + pp_args.append(source) + + # We need to preprocess: either we're being forced to, or the + # source file is newer than the target (or the target doesn't + # exist). + if self.force or output_file is None or newer(source, output_file): + if output_file: + self.mkpath(os.path.dirname(output_file)) + try: + self.spawn(pp_args) + except DistutilsExecError, msg: + print msg + raise CompileError, msg + + # preprocess() From f5528a1e2f78f25f3208d3365f6b0ed3f5e7e74e Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 23 Aug 2001 20:53:27 +0000 Subject: [PATCH 0755/8469] Patch #449054 to implement PEP 250. The standard install directory for modules and extensions on Windows is now $PREFIX/Lib/site-packages. Includes backwards compatibility code for pre-2.2 Pythons. Contributed by Paul Moore. --- command/install.py | 25 ++++++++++++++++++------- sysconfig.py | 5 ++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/command/install.py b/command/install.py index 1d0a34e4cd..5af4cf1055 100644 --- a/command/install.py +++ b/command/install.py @@ -16,6 +16,23 @@ from distutils.errors import DistutilsOptionError from glob import glob +if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', + 'platlib': '$base', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } +else: + WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } + INSTALL_SCHEMES = { 'unix_prefix': { 'purelib': '$base/lib/python$py_version_short/site-packages', @@ -31,13 +48,7 @@ 'scripts': '$base/bin', 'data' : '$base', }, - 'nt': { - 'purelib': '$base', - 'platlib': '$base', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, + 'nt': WINDOWS_SCHEME, 'mac': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', diff --git a/sysconfig.py b/sysconfig.py index 1f0d14539f..558ff2938e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -94,7 +94,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if standard_lib: return os.path.join(prefix, "Lib") else: - return prefix + if sys.version < "2.2": + return prefix + else: + return os.path.join(PREFIX, "Lib", "site-packages") elif os.name == "mac": if plat_specific: From 679698bbb368dc2cee79992418c7720f2acce34a Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 27 Aug 2001 15:08:16 +0000 Subject: [PATCH 0756/8469] Patch by Bill Noon: added 'dylib' as a library type along with 'static' and 'shared'. This fixes extension building for dynamic Pythons on MacOSX. --- ccompiler.py | 4 ++-- unixccompiler.py | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 4a282d4cff..4efd93407b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -792,8 +792,8 @@ def library_filename (self, output_dir=''): if output_dir is None: output_dir = '' - if lib_type not in ("static","shared"): - raise ValueError, "'lib_type' must be \"static\" or \"shared\"" + if lib_type not in ("static","shared","dylib"): + raise ValueError, "'lib_type' must be \"static\", \"shared\" or \"dylib\"" fmt = getattr (self, lib_type + "_lib_format") ext = getattr (self, lib_type + "_lib_extension") diff --git a/unixccompiler.py b/unixccompiler.py index da1f2a4e8e..a4f0ac4d04 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -71,7 +71,8 @@ class UnixCCompiler (CCompiler): obj_extension = ".o" static_lib_extension = ".a" shared_lib_extension = ".so" - static_lib_format = shared_lib_format = "lib%s%s" + dylib_lib_extension = ".dylib" + static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" @@ -259,6 +260,8 @@ def find_library_file (self, dirs, lib, debug=0): for dir in dirs: shared = os.path.join( dir, self.library_filename(lib, lib_type='shared')) + dylib = os.path.join( + dir, self.library_filename(lib, lib_type='dylib')) static = os.path.join( dir, self.library_filename(lib, lib_type='static')) @@ -266,7 +269,9 @@ def find_library_file (self, dirs, lib, debug=0): # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm # ignoring even GCC's "-static" option. So sue me. - if os.path.exists(shared): + if os.path.exists(dylib): + return dylib + elif os.path.exists(shared): return shared elif os.path.exists(static): return static From 31ba5afaf948150804377ad1f4a508e9578d1549 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Wed, 29 Aug 2001 23:57:22 +0000 Subject: [PATCH 0757/8469] Flush output more aggressively. This makes things look better if the setup script is running from inside Vim. --- cmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd.py b/cmd.py index ce44829498..85a7f46182 100644 --- a/cmd.py +++ b/cmd.py @@ -188,6 +188,7 @@ def announce (self, msg, level=1): """ if self.verbose >= level: print msg + sys.stdout.flush() def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the @@ -196,6 +197,7 @@ def debug_print (self, msg): from distutils.core import DEBUG if DEBUG: print msg + sys.stdout.flush() From 8035ea689daa1273bbcb133c80e51c70a4fa3ca6 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Mon, 3 Sep 2001 15:47:21 +0000 Subject: [PATCH 0758/8469] Don't use dir() to find instance attribute names. --- dist.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dist.py b/dist.py index 3803f5cc68..40dcc96e27 100644 --- a/dist.py +++ b/dist.py @@ -122,9 +122,7 @@ def __init__ (self, attrs=None): # worth it. Also delegate 'get_XXX()' methods to the 'metadata' # object in a sneaky and underhanded (but efficient!) way. self.metadata = DistributionMetadata() - method_basenames = dir(self.metadata) + \ - ['fullname', 'contact', 'contact_email'] - for basename in method_basenames: + for basename in self.metadata._METHOD_BASENAMES: method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name)) @@ -962,6 +960,12 @@ class DistributionMetadata: author, and so forth. """ + _METHOD_BASENAMES = ("name", "version", "author", "author_email", + "maintainer", "maintainer_email", "url", + "license", "description", "long_description", + "keywords", "platforms", "fullname", "contact", + "contact_email", "licence") + def __init__ (self): self.name = None self.version = None From 66b732945438e944b73f2417ac97195af45c49d7 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 4 Sep 2001 12:01:49 +0000 Subject: [PATCH 0759/8469] On the mac some library paths returned were outdated, some were outright funny. Fixed. --- sysconfig.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 558ff2938e..cc663a8341 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -102,16 +102,14 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): elif os.name == "mac": if plat_specific: if standard_lib: - return os.path.join(prefix, "Mac", "Plugins") + return os.path.join(prefix, "Lib", "lib-dynload") else: - raise DistutilsPlatformError( - "OK, where DO site-specific extensions go on the Mac?") + return os.path.join(prefix, "Lib", "site-packages") else: if standard_lib: return os.path.join(prefix, "Lib") else: - raise DistutilsPlatformError( - "OK, where DO site-specific modules go on the Mac?") + return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( "I don't know where Python installs its library " From 6d5c86825f122583f4fec4be228f10e2c712e61e Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 4 Sep 2001 20:06:43 +0000 Subject: [PATCH 0760/8469] [Bug #436732] install.py does not record a created *.pth file in the INSTALLED_FILES output. Modified version of a patch from Jon Nelson (jnelson) --- command/install.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/command/install.py b/command/install.py index 5af4cf1055..022e34a2e0 100644 --- a/command/install.py +++ b/command/install.py @@ -537,8 +537,7 @@ def create_path_file (self): # -- Reporting methods --------------------------------------------- def get_outputs (self): - # This command doesn't have any outputs of its own, so just - # get the outputs of all its sub-commands. + # Assemble the outputs of all the sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) @@ -548,6 +547,10 @@ def get_outputs (self): if filename not in outputs: outputs.append(filename) + if self.path_file and self.install_path_file: + outputs.append(os.path.join(self.install_libbase, + self.path_file + ".pth")) + return outputs def get_inputs (self): From 33914718f28f60a0d0ff5f79bc6662748fd1dc6b Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 4 Sep 2001 20:42:08 +0000 Subject: [PATCH 0761/8469] [Bug #444589] Record empty directories in the install_data command Slightly modified version of patch from Jon Nelson (jnelson). --- command/install_data.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index 28f593866c..d0091ce238 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -63,10 +63,18 @@ def run (self): elif self.root: dir = change_root(self.root, dir) self.mkpath(dir) - for data in f[1]: - data = convert_path(data) - (out, _) = self.copy_file(data, dir) - self.outfiles.append(out) + + if f[1] == []: + # If there are no files listed, the user must be + # trying to create an empty directory, so add the + # directory to the list of output files. + self.outfiles.append(dir) + else: + # Copy files, adding them to the list of output files. + for data in f[1]: + data = convert_path(data) + (out, _) = self.copy_file(data, dir) + self.outfiles.append(out) def get_inputs (self): return self.data_files or [] From 4a7fbb7560c4f661bf8314166f6d26c0bfd25882 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 5 Sep 2001 12:02:59 +0000 Subject: [PATCH 0762/8469] [Bug #404274] Restore some special-case code for AIX and BeOS under 1.5.2. This will have to stay until we decide to drop 1.5.2 compatibility completely. --- sysconfig.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index cc663a8341..935372cd2b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -318,7 +318,34 @@ def _init_posix(): # the scripts are in another directory. if python_build: g['LDSHARED'] = g['BLDSHARED'] - + + elif sys.version < '2.1': + # The following two branches are for 1.5.2 compatibility. + if sys.platform == 'aix4': # what about AIX 3.x ? + # Linker script is in the config directory, not in Modules as the + # Makefile says. + python_lib = get_python_lib(standard_lib=1) + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') + python_exp = os.path.join(python_lib, 'config', 'python.exp') + + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) + + elif sys.platform == 'beos': + # Linker script is in the config directory. In the Makefile it is + # relative to the srcdir, which after installation no longer makes + # sense. + python_lib = get_python_lib(standard_lib=1) + linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) + linkerscript = os.path.join(python_lib, 'config', linkerscript_name) + + # XXX this isn't the right place to do this: adding the Python + # library to the link, if needed, should be in the "build_ext" + # command. (It's also needed for non-MS compilers on Windows, and + # it's taken care of for them by the 'build_ext.get_libraries()' + # method.) + g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % + (linkerscript, PREFIX, sys.version[0:3])) + global _config_vars _config_vars = g From e9d279e9c8eb2b7b6bbdf3f9c6e01eb27684dce7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 5 Sep 2001 13:00:40 +0000 Subject: [PATCH 0763/8469] Implement PEP250: Use Lib/site-packages under windows. bdist_wininst doesn't use the NT SCHEME any more, instead a custom SCHEME is used, which is exchanged at installation time, depending on the python version used. Avoid a bogus warning frpom install_lib about installing into a directory not on sys.path. --- command/bdist_wininst.py | 617 +++++++++++++++++++-------------------- 1 file changed, 306 insertions(+), 311 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 16a6cc418c..8e4a7964a9 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -83,46 +83,41 @@ def run (self): install = self.reinitialize_command('install') install.root = self.bdist_dir - if os.name != 'nt': - # Must force install to use the 'nt' scheme; we set the - # prefix too just because it looks silly to put stuff - # in (eg.) ".../usr/Scripts", "usr/Include", etc. - install.prefix = "Python" - install.select_scheme('nt') install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files install_lib.compile = 0 install_lib.optimize = 0 - install_lib.ensure_finalized() + # Use a custom scheme for the zip-file, because we have to decide + # at installation time which scheme to use. + for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): + value = string.upper(key) + if key == 'headers': + value = value + '/Include/$dist_name' + setattr(install, + 'install_' + key, + value) self.announce("installing to %s" % self.bdist_dir) install.ensure_finalized() + + # avoid warning of 'install_lib' about installing + # into a directory not in sys.path + sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB')) + install.run() + del sys.path[0] + # And make an archive relative to the root of the # pseudo-installation tree. fullname = self.distribution.get_fullname() archive_basename = os.path.join(self.bdist_dir, "%s.win32" % fullname) - # Our archive MUST be relative to sys.prefix, which is the - # same as install_purelib in the 'nt' scheme. - root_dir = os.path.normpath(install.install_purelib) - - # Sanity check: Make sure everything is included - for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): - attrname = 'install_' + key - install_x = getattr(install, attrname) - # (Use normpath so that we can string.find to look for - # subdirectories) - install_x = os.path.normpath(install_x) - if string.find(install_x, root_dir) != 0: - raise DistutilsInternalError \ - ("'%s' not included in install_lib" % key) arcname = self.make_archive(archive_basename, "zip", - root_dir=root_dir) + root_dir=self.bdist_dir) self.create_exe(arcname, fullname, self.bitmap) if not self.keep_temp: @@ -233,308 +228,308 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAABwv7aMNN7Y3zTe2N803tjfT8LU3zXe2N+3wtbfNt7Y39zB3N823tjfVsHL -3zze2N803tnfSN7Y3zTe2N853tjf3MHS3zne2N+M2N7fNd7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EEB23UHix6D7vwR2xHJAdtz73UJix6D +7vwR23Pkg8ECgf0A8///g9EBjRQvg/38dg+KAkKIB0dJdffpY////5CLAoPCBIkHg8cEg+kEd/EB +z+lM////Xon3ubQAAACKB0cs6DwBd/eAPwF18osHil8EZsHoCMHAEIbEKfiA6+gB8IkHg8cFidji +2Y2+AMAAAIsHCcB0PItfBI2EMDDhAAAB81CDxwj/lrzhAACVigdHCMB03In5V0jyrlX/lsDhAAAJ +wHQHiQODwwTr4f+WxOEAAGHpGGz//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgAAACAAAIAFAAAAYAAAgAAA From 74eebff9df62f424e6be3262778cd50611dd7dbd Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 5 Oct 2001 20:40:48 +0000 Subject: [PATCH 0764/8469] Explicitely list the metadata attributes to show in the gui. Updated to include the new exe-file. --- command/bdist_wininst.py | 599 ++++++++++++++++++++------------------- 1 file changed, 304 insertions(+), 295 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 8e4a7964a9..7cdf385553 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -140,13 +140,13 @@ def get_inidata (self): # describing the items to be installed. info = (metadata.long_description or '') + '\n' - for name in dir(metadata): - if (name != 'long_description'): - data = getattr(metadata, name) - if data: - info = info + ("\n %s: %s" % \ - (string.capitalize(name), data)) - lines.append("%s=%s" % (name, repr(data)[1:-1])) + for name in ["author", "author_email", "description", "maintainer", + "maintainer_email", "name", "url", "version"]: + data = getattr(metadata, name, "") + if data: + info = info + ("\n %s: %s" % \ + (string.capitalize(name), data)) + lines.append("%s=%s" % (name, repr(data)[1:-1])) # The [setup] section contains entries controlling # the installer runtime. @@ -231,20 +231,20 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAAA/SHa+eykY7XspGO17KRjtADUU7XkpGO0UNhLtcCkY7fg1Fu15KRjtFDYc 7XkpGO0ZNgvtcykY7XspGe0GKRjteykY7XYpGO19ChLteSkY7bwvHu16KRjtUmljaHspGO0AAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwCMCZY7AAAAAAAAAADgAA8BCwEGAABAAAAAEAAAAKAAAADuAAAA -sAAAAPAAAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAAAEAAAQAAAAAAAACAAAAAAAQAAAQ -AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAw8QAAbAEAAADwAAAwAQAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAUEUAAEwBAwBWGr47AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAAKAAAODuAAAA +sAAAAAABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAEAEAAAQAAAAAAAACAAAAAAAQAAAQ +AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwAQEAbAEAAAAAAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVUFgwAAAAAACgAAAAEAAAAAAAAAAEAAAA -AAAAAAAAAAAAAACAAADgVVBYMQAAAAAAQAAAALAAAABAAAAABAAAAAAAAAAAAAAAAAAAQAAA4C5y -c3JjAAAAABAAAADwAAAABAAAAEQAAAAA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AAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAA= """ # --- EOF --- From b00902df9fcae870190f460790a9293c8eda1c61 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 5 Oct 2001 20:43:09 +0000 Subject: [PATCH 0765/8469] With Andrew's blessing: distutils version number is now 1.0.3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 27e79a54ac..1055aa39c1 100644 --- a/__init__.py +++ b/__init__.py @@ -10,4 +10,4 @@ __revision__ = "$Id$" -__version__ = "1.0.2" +__version__ = "1.0.3" From 333b9da550f41bac8faf5a4b3bfccc53a54da671 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sat, 10 Nov 2001 23:20:22 +0000 Subject: [PATCH 0766/8469] The libraries argument was completely ignored, fixed. Reported by Tom Loredo. --- mwerkscompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 46e16e2e94..e759456a36 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -16,7 +16,7 @@ import mkcwproject class MWerksCompiler (CCompiler) : - """Concrete class that implements an interface to Microsoft Visual C++, + """Concrete class that implements an interface to MetroWerks CodeWarrior, as defined by the CCompiler abstract class.""" compiler_type = 'mwerks' @@ -150,6 +150,7 @@ def link (self, if not dirname in sourcefiledirs: sourcefiledirs.append(dirname) settings['sources'] = sourcefilenames + settings['libraries'] = libraries settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs if self.dry_run: print 'CALLING LINKER IN', os.getcwd() From 6fdff7d1bce93929138b277904edd9508b635978 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 6 Dec 2001 16:32:05 +0000 Subject: [PATCH 0767/8469] [Bug #459270] Fix incorrect docstring --- dist.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dist.py b/dist.py index 40dcc96e27..3e1bc648d4 100644 --- a/dist.py +++ b/dist.py @@ -262,14 +262,11 @@ def find_config_files (self): should be parsed. The filenames returned are guaranteed to exist (modulo nasty race conditions). - On Unix, there are three possible config files: pydistutils.cfg in - the Distutils installation directory (ie. where the top-level - Distutils __inst__.py file lives), .pydistutils.cfg in the user's - home directory, and setup.cfg in the current directory. - - On Windows and Mac OS, there are two possible config files: - pydistutils.cfg in the Python installation directory (sys.prefix) - and setup.cfg in the current directory. + There are three possible config files: distutils.cfg in the + Distutils installation directory (ie. where the top-level + Distutils __inst__.py file lives), a file in the user's home + directory named .pydistutils.cfg on Unix and pydistutils.cfg + on Windows/Mac, and setup.cfg in the current directory. """ files = [] check_environ() From 1a4ad0259c7382d0520aa9dad7e6af852b3d7ad9 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 6 Dec 2001 20:44:19 +0000 Subject: [PATCH 0768/8469] Use a version number of 0.0.0 instead of ???. The latter leads to invalid filenames on Windows when building without specifying a version number in the setup script. See also http://mail.python.org/pipermail/distutils-sig/2001-November/002656.html Bugfix candidate. --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 3e1bc648d4..d5bfa05dc4 100644 --- a/dist.py +++ b/dist.py @@ -1012,7 +1012,7 @@ def get_name (self): return self.name or "UNKNOWN" def get_version(self): - return self.version or "???" + return self.version or "0.0.0" def get_fullname (self): return "%s-%s" % (self.get_name(), self.get_version()) From 68cb7fe9ae037b7a517b692213c03c6c0e54f7e4 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 6 Dec 2001 20:51:35 +0000 Subject: [PATCH 0769/8469] Whitespace normalization. --- archive_util.py | 6 +-- bcppcompiler.py | 32 +++++++-------- ccompiler.py | 34 ++++++++-------- cmd.py | 20 +++++----- core.py | 4 +- cygwinccompiler.py | 97 +++++++++++++++++++++++----------------------- dep_util.py | 8 ++-- dir_util.py | 6 +-- dist.py | 28 ++++++------- extension.py | 4 +- fancy_getopt.py | 12 +++--- file_util.py | 16 ++++---- filelist.py | 28 ++++++------- msvccompiler.py | 18 ++++----- mwerkscompiler.py | 32 +++++++-------- spawn.py | 12 +++--- sysconfig.py | 8 ++-- text_file.py | 13 +++---- unixccompiler.py | 16 ++++---- util.py | 16 ++++---- version.py | 16 ++++---- 21 files changed, 210 insertions(+), 216 deletions(-) diff --git a/archive_util.py b/archive_util.py index 4c5641b951..58d9a062e1 100644 --- a/archive_util.py +++ b/archive_util.py @@ -31,7 +31,7 @@ def make_tarball (base_name, base_dir, compress="gzip", compress_ext = { 'gzip': ".gz", 'bzip2': '.bz2', 'compress': ".Z" } - + # flags for compression program, each element of list will be an argument compress_flags = {'gzip': ["-f9"], 'compress': ["-f"], @@ -85,7 +85,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): import zipfile except ImportError: raise DistutilsExecError, \ - ("unable to create zip file '%s': " + + ("unable to create zip file '%s': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename @@ -152,7 +152,7 @@ def make_archive (base_name, format, kwargs = { 'verbose': verbose, 'dry_run': dry_run } - + try: format_info = ARCHIVE_FORMATS[format] except KeyError: diff --git a/bcppcompiler.py b/bcppcompiler.py index 5c0fae8b71..9ebba2d85b 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -102,7 +102,7 @@ def compile (self, compile_opts.extend (self.compile_options_debug) else: compile_opts.extend (self.compile_options) - + for i in range (len (sources)): src = sources[i] ; obj = objects[i] ext = (os.path.splitext (src))[1] @@ -130,11 +130,11 @@ def compile (self, input_opt = "" elif ext in self._cpp_extensions: input_opt = "-P" - else: + else: # Unknown file type -- no extra options. The compiler # will probably fail, but let it just in case this is a # file the compiler recognizes even if we don't. - input_opt = "" + input_opt = "" output_opt = "-o" + obj @@ -174,17 +174,17 @@ def create_static_lib (self, if extra_postargs: lib_args.extend (extra_postargs) try: - self.spawn ([self.lib] + lib_args) + self.spawn ([self.lib] + lib_args) except DistutilsExecError, msg: - raise LibError, msg + raise LibError, msg else: self.announce ("skipping %s (up-to-date)" % output_filename) # create_static_lib () - - + + def link (self, - target_desc, + target_desc, objects, output_filename, output_dir=None, @@ -254,14 +254,14 @@ def link (self, resources.append(file) else: objects.append(file) - - + + for l in library_dirs: - ld_args.append("/L%s" % os.path.normpath(l)) + ld_args.append("/L%s" % os.path.normpath(l)) ld_args.append("/L.") # we sometimes use relative paths - # list of object files - ld_args.extend(objects) + # list of object files + ld_args.extend(objects) # XXX the command-line syntax for Borland C++ is a bit wonky; # certain filenames are jammed together in one big string, but @@ -275,11 +275,11 @@ def link (self, # name of dll/exe file ld_args.extend([',',output_filename]) - # no map file and start libraries + # no map file and start libraries ld_args.append(',,') for lib in libraries: - # see if we find it and if there is a bcpp specific lib + # see if we find it and if there is a bcpp specific lib # (xxx_bcpp.lib) libfile = self.find_library_file(library_dirs, lib, debug) if libfile is None: @@ -300,7 +300,7 @@ def link (self, ld_args.append(',') ld_args.extend(resources) - + if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: diff --git a/ccompiler.py b/ccompiler.py index 4efd93407b..21bf0c1715 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -61,7 +61,7 @@ class CCompiler: # different versions of libfoo.a in different locations. I # think this is useless without the ability to null out the # library search path anyways. - + # Subclasses that rely on the standard filename generation methods # implemented below should override these; see the comment near @@ -159,7 +159,7 @@ def set_executable(self, key, value): setattr(self, key, split_quoted(value)) else: setattr(self, key, value) - + def _find_macro (self, name): @@ -352,7 +352,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): else: raise TypeError, \ "'include_dirs' (if supplied) must be a list of strings" - + return (output_dir, macros, include_dirs) # _fix_compile_args () @@ -364,7 +364,7 @@ def _prep_compile (self, sources, output_dir): list of all object files and a dictionary telling which source files can be skipped. """ - # Get the list of expected output (object) files + # Get the list of expected output (object) files objects = self.object_filenames (sources, strip_dir=1, output_dir=output_dir) @@ -401,7 +401,7 @@ def _fix_object_args (self, objects, output_dir): raise TypeError, \ "'objects' must be a list or tuple of strings" objects = list (objects) - + if output_dir is None: output_dir = self.output_dir elif type (output_dir) is not StringType: @@ -560,7 +560,7 @@ def create_static_lib (self, Raises LibError on failure. """ pass - + # values for target_desc parameter in link() SHARED_OBJECT = "shared_object" @@ -621,7 +621,7 @@ def link (self, """ raise NotImplementedError - + # Old 'link_*()' methods, rewritten to use the new 'link()' method. def link_shared_lib (self, @@ -636,13 +636,13 @@ def link_shared_lib (self, extra_preargs=None, extra_postargs=None, build_temp=None): - self.link(CCompiler.SHARED_LIBRARY, objects, + self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp) - + def link_shared_object (self, objects, @@ -673,9 +673,9 @@ def link_executable (self, debug=0, extra_preargs=None, extra_postargs=None): - self.link(CCompiler.EXECUTABLE, objects, + self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, - libraries, library_dirs, runtime_library_dirs, None, + libraries, library_dirs, runtime_library_dirs, None, debug, extra_preargs, extra_postargs, None) @@ -846,12 +846,12 @@ def mkpath (self, name, mode=0777): # on a cygwin built python we can use gcc like an ordinary UNIXish # compiler ('cygwin.*', 'unix'), - + # OS name mappings ('posix', 'unix'), ('nt', 'msvc'), ('mac', 'mwerks'), - + ) def get_default_compiler(osname=None, platform=None): @@ -901,7 +901,7 @@ def show_compilers(): # XXX this "knows" that the compiler option it's describing is # "--compiler", which just happens to be the case for the three # commands that use it. - from distutils.fancy_getopt import FancyGetopt + from distutils.fancy_getopt import FancyGetopt compilers = [] for compiler in compiler_class.keys(): compilers.append(("compiler="+compiler, None, @@ -909,7 +909,7 @@ def show_compilers(): compilers.sort() pretty_printer = FancyGetopt(compilers) pretty_printer.print_help("List of available compilers:") - + def new_compiler (plat=None, compiler=None, @@ -932,14 +932,14 @@ def new_compiler (plat=None, try: if compiler is None: compiler = get_default_compiler(plat) - + (module_name, class_name, long_description) = compiler_class[compiler] except KeyError: msg = "don't know how to compile C/C++ code on platform '%s'" % plat if compiler is not None: msg = msg + " with '%s' compiler" % compiler raise DistutilsPlatformError, msg - + try: module_name = "distutils." + module_name __import__ (module_name) diff --git a/cmd.py b/cmd.py index 85a7f46182..65060d6700 100644 --- a/cmd.py +++ b/cmd.py @@ -41,7 +41,7 @@ class Command: # current situation. (Eg. we "install_headers" is only applicable if # we have any C header files to install.) If 'predicate' is None, # that command is always applicable. - # + # # 'sub_commands' is usually defined at the *end* of a class, because # predicates can be unbound methods, so they must already have been # defined. The canonical example is the "install" command. @@ -111,7 +111,7 @@ def ensure_finalized (self): if not self.finalized: self.finalize_options() self.finalized = 1 - + # Subclasses must define: # initialize_options() @@ -133,12 +133,12 @@ def initialize_options (self): command-line. Thus, this is not the place to code dependencies between options; generally, 'initialize_options()' implementations are just a bunch of "self.foo = None" assignments. - + This method must be implemented by all command classes. """ raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ - + def finalize_options (self): """Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option @@ -198,12 +198,12 @@ def debug_print (self, msg): if DEBUG: print msg sys.stdout.flush() - + # -- Option validation methods ------------------------------------- # (these are very handy in writing the 'finalize_options()' method) - # + # # NB. the general philosophy here is to ensure that a particular option # value meets certain type and value constraints. If not, we try to # force it into conformance (eg. if we expect a list but have a string, @@ -252,7 +252,7 @@ def ensure_string_list (self, option): raise DistutilsOptionError, \ "'%s' must be a list of strings (got %s)" % \ (option, `val`) - + def _ensure_tested_string (self, option, tester, what, error_fmt, default=None): val = self._ensure_stringlike(option, what, default) @@ -382,7 +382,7 @@ def copy_tree (self, infile, outfile, and force flags. """ return dir_util.copy_tree( - infile, outfile, + infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, self.verbose >= level, @@ -426,7 +426,7 @@ def make_file (self, infiles, outfile, func, args, (outfile, string.join(infiles, ', ')) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile - + # Allow 'infiles' to be a single string if type(infiles) is StringType: @@ -459,7 +459,7 @@ class install_misc (Command): """Common base class for installing some files in a subdirectory. Currently used by install_data and install_scripts. """ - + user_options = [('install-dir=', 'd', "directory to install the files to")] def initialize_options (self): diff --git a/core.py b/core.py index 2aab7c4dd3..97a741c812 100644 --- a/core.py +++ b/core.py @@ -108,7 +108,7 @@ class found in 'cmdclass' is used in place of the default, which is # Find and parse the config file(s): they will override options from # the setup script, but be overridden by the command line. dist.parse_config_files() - + if DEBUG: print "options (after parsing config files):" dist.dump_option_dicts() @@ -146,7 +146,7 @@ class found in 'cmdclass' is used in place of the default, which is raise else: raise SystemExit, error - + except (DistutilsExecError, DistutilsFileError, DistutilsOptionError, diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 07e16655b0..1d97282322 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -18,28 +18,28 @@ # # see also http://starship.python.net/crew/kernr/mingw32/Notes.html # -# * We put export_symbols in a def-file, and don't use +# * We put export_symbols in a def-file, and don't use # --export-all-symbols because it doesn't worked reliable in some # tested configurations. And because other windows compilers also # need their symbols specified this no serious problem. # # tested configurations: -# -# * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works +# +# * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works # (after patching python's config.h and for C++ some other include files) # see also http://starship.python.net/crew/kernr/mingw32/Notes.html -# * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works -# (ld doesn't support -shared, so we use dllwrap) +# * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works +# (ld doesn't support -shared, so we use dllwrap) # * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now # - its dllwrap doesn't work, there is a bug in binutils 2.10.90 # see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html -# - using gcc -mdll instead dllwrap doesn't work without -static because +# - using gcc -mdll instead dllwrap doesn't work without -static because # it tries to link against dlls instead their import libraries. (If # it finds the dll first.) -# By specifying -static we force ld to link against the import libraries, -# this is windows standard and there are normally not the necessary symbols +# By specifying -static we force ld to link against the import libraries, +# this is windows standard and there are normally not the necessary symbols # in the dlls. -# *** only the version of June 2000 shows these problems +# *** only the version of June 2000 shows these problems # created 2000/05/05, Rene Liebscher @@ -60,7 +60,7 @@ class CygwinCCompiler (UnixCCompiler): static_lib_format = "lib%s%s" shared_lib_format = "%s%s" exe_extension = ".exe" - + def __init__ (self, verbose=0, dry_run=0, @@ -76,20 +76,20 @@ def __init__ (self, "Python's pyconfig.h doesn't seem to support your compiler. " + ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - + (self.gcc_version, self.ld_version, self.dllwrap_version) = \ get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % - (self.gcc_version, - self.ld_version, + (self.gcc_version, + self.ld_version, self.dllwrap_version) ) - # ld_version >= "2.10.90" should also be able to use + # ld_version >= "2.10.90" should also be able to use # gcc -mdll instead of dllwrap - # Older dllwraps had own version numbers, newer ones use the + # Older dllwraps had own version numbers, newer ones use the # same as the rest of binutils ( also ld ) # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": + if self.ld_version >= "2.10.90": self.linker_dll = "gcc" else: self.linker_dll = "dllwrap" @@ -102,22 +102,22 @@ def __init__ (self, linker_so=('%s -mcygwin -mdll -static' % self.linker_dll)) - # cygwin and mingw32 need different sets of libraries + # cygwin and mingw32 need different sets of libraries if self.gcc_version == "2.91.57": # cygwin shouldn't need msvcrt, but without the dlls will crash # (gcc version 2.91.57) -- perhaps something about initialization self.dll_libraries=["msvcrt"] - self.warn( + self.warn( "Consider upgrading to a newer version of gcc") else: self.dll_libraries=[] - + # __init__ () # not much different of the compile method in UnixCCompiler, # but we have to insert some lines in the middle of it, so # we put here a adapted version of it. - # (If we would call compile() in the base class, it would do some + # (If we would call compile() in the base class, it would do some # initializations a second time, this is why all is done here.) def compile (self, sources, @@ -143,7 +143,7 @@ def compile (self, extra_postargs = [] # Compile all source files that weren't eliminated by - # '_prep_compile()'. + # '_prep_compile()'. for i in range (len (sources)): src = sources[i] ; obj = objects[i] ext = (os.path.splitext (src))[1] @@ -157,7 +157,7 @@ def compile (self, self.spawn (["windres","-i",src,"-o",obj]) except DistutilsExecError, msg: raise CompileError, msg - else: # for other files use the C-compiler + else: # for other files use the C-compiler try: self.spawn (self.compiler_so + cc_args + [src, '-o', obj] + @@ -184,12 +184,12 @@ def link (self, extra_preargs=None, extra_postargs=None, build_temp=None): - + # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) objects = copy.copy(objects or []) - + # Additional libraries libraries.extend(self.dll_libraries) @@ -199,10 +199,10 @@ def link (self, (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): # (The linker doesn't do anything if output is up-to-date. # So it would probably better to check if we really need this, - # but for this we had to insert some unchanged parts of - # UnixCCompiler, and this is not what we want.) + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) - # we want to put some files in the same directory as the + # we want to put some files in the same directory as the # object files are, build_temp doesn't help much # where are the object files temp_dir = os.path.dirname(objects[0]) @@ -214,7 +214,7 @@ def link (self, def_file = os.path.join(temp_dir, dll_name + ".def") exp_file = os.path.join(temp_dir, dll_name + ".exp") lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a") - + # Generate .def file contents = [ "LIBRARY %s" % os.path.basename(output_filename), @@ -237,21 +237,21 @@ def link (self, else: # doesn't work: bfd_close build\...\libfoo.a: Invalid operation #extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file]) - # for gcc/ld the def-file is specified as any other object files + # for gcc/ld the def-file is specified as any other object files objects.append(def_file) #end: if ((export_symbols is not None) and # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): - + # who wants symbols and a many times larger output file - # should explicitly switch the debug mode on + # should explicitly switch the debug mode on # otherwise we let dllwrap/ld strip the output file - # (On my machine: 10KB < stripped_file < ??100KB + # (On my machine: 10KB < stripped_file < ??100KB # unstripped_file = stripped_file + XXX KB - # ( XXX=254 for a typical python extension)) - if not debug: - extra_preargs.append("-s") - + # ( XXX=254 for a typical python extension)) + if not debug: + extra_preargs.append("-s") + UnixCCompiler.link(self, target_desc, objects, @@ -265,7 +265,7 @@ def link (self, extra_preargs, extra_postargs, build_temp) - + # link () # -- Miscellaneous methods ----------------------------------------- @@ -288,7 +288,7 @@ def object_filenames (self, base = os.path.basename (base) if ext == '.res' or ext == '.rc': # these need to be compiled to object files - obj_names.append (os.path.join (output_dir, + obj_names.append (os.path.join (output_dir, base + ext + self.obj_extension)) else: obj_names.append (os.path.join (output_dir, @@ -311,7 +311,7 @@ def __init__ (self, force=0): CygwinCCompiler.__init__ (self, verbose, dry_run, force) - + # A real mingw32 doesn't need to specify a different entry point, # but cygwin 2.91.57 in no-cygwin-mode needs it. if self.gcc_version <= "2.91.57": @@ -322,15 +322,15 @@ def __init__ (self, self.set_executables(compiler='gcc -mno-cygwin -O -Wall', compiler_so='gcc -mno-cygwin -mdll -O -Wall', linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin -mdll -static %s' + linker_so='%s -mno-cygwin -mdll -static %s' % (self.linker_dll, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) - # (-mthreads: Support thread-safe exception handling on `Mingw32') - - # no additional libraries needed + # (-mthreads: Support thread-safe exception handling on `Mingw32') + + # no additional libraries needed self.dll_libraries=[] - + # __init__ () # class Mingw32CCompiler @@ -370,15 +370,15 @@ def check_config_h(): # GCC, and the pyconfig.h file should be OK if string.find(sys.version,"GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") - + fn = sysconfig.get_config_h_filename() try: # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough + # But we do this only once, and it is fast enough f = open(fn) s = f.read() f.close() - + except IOError, exc: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing @@ -401,7 +401,7 @@ def get_versions(): from distutils.version import StrictVersion from distutils.spawn import find_executable import re - + gcc_exe = find_executable('gcc') if gcc_exe: out = os.popen(gcc_exe + ' -dumpversion','r') @@ -439,4 +439,3 @@ def get_versions(): else: dllwrap_version = None return (gcc_version, ld_version, dllwrap_version) - diff --git a/dep_util.py b/dep_util.py index 4b93ed023c..9edba4c8ae 100644 --- a/dep_util.py +++ b/dep_util.py @@ -70,7 +70,7 @@ def newer_group (sources, target, missing='error'): # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists(target): return 1 - + # Otherwise we have to find out the hard way: if *any* source file # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end @@ -80,12 +80,12 @@ def newer_group (sources, target, missing='error'): for source in sources: if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file - pass - elif missing == 'ignore': # missing source dropped from + pass + elif missing == 'ignore': # missing source dropped from continue # target's dependency list elif missing == 'newer': # missing source means target is return 1 # out-of-date - + source_mtime = os.stat(source)[ST_MTIME] if source_mtime > target_mtime: return 1 diff --git a/dir_util.py b/dir_util.py index a1578bed6a..77007c976b 100644 --- a/dir_util.py +++ b/dir_util.py @@ -49,7 +49,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): (head, tail) = os.path.split(name) tails = [tail] # stack of lone dirs to create - + while head and tail and not os.path.isdir(head): #print "splitting '%s': " % head, (head, tail) = os.path.split(head) @@ -140,7 +140,7 @@ def copy_tree (src, dst, if not dry_run and not os.path.isdir(src): raise DistutilsFileError, \ - "cannot copy tree '%s': not a directory" % src + "cannot copy tree '%s': not a directory" % src try: names = os.listdir(src) except os.error, (errno, errstr): @@ -166,7 +166,7 @@ def copy_tree (src, dst, if not dry_run: os.symlink(link_dest, dst_name) outputs.append(dst_name) - + elif os.path.isdir(src_name): outputs.extend( copy_tree(src_name, dst_name, diff --git a/dist.py b/dist.py index d5bfa05dc4..b648f24eb7 100644 --- a/dist.py +++ b/dist.py @@ -97,7 +97,7 @@ class Distribution: # -- Creation/initialization methods ------------------------------- - + def __init__ (self, attrs=None): """Construct a new Distribution instance: initialize all the attributes of a Distribution, and then use 'attrs' (a dictionary @@ -208,7 +208,7 @@ def __init__ (self, attrs=None): "invalid distribution option '%s'" % key self.finalize_options() - + # __init__ () @@ -251,7 +251,7 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): print indent + " " + line # dump_option_dicts () - + # -- Config file finding/parsing methods --------------------------- @@ -378,7 +378,7 @@ def parse_command_line (self): cmdlist = self.get_command_list() self.script_args = EasyDialogs.GetArgv( self.global_options + self.display_options, cmdlist) - + # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- # because each command will be handled by a different class, and @@ -396,7 +396,7 @@ def parse_command_line (self): # for display options we return immediately if self.handle_display_options(option_order): return - + while args: args = self._parse_command_opts(parser, args) if args is None: # user asked for help (and got it) @@ -508,7 +508,7 @@ def _parse_command_opts (self, parser, args): "must be a callable object (function, etc.)" % (`func`, help_option)) - if help_option_found: + if help_option_found: return # Put the options from the command-line into their official @@ -801,7 +801,7 @@ def _set_command_options (self, command_obj, option_dict=None): (from 'self.command_options'). """ from distutils.core import DEBUG - + command_name = command_obj.get_command_name() if option_dict is None: option_dict = self.get_option_dict(command_name) @@ -841,7 +841,7 @@ def reinitialize_command (self, command, reinit_subcommands=0): user-supplied values from the config files and command line. You'll have to re-finalize the command object (by calling 'finalize_options()' or 'ensure_finalized()') before using it for - real. + real. 'command' should be a command name (string) or command object. If 'reinit_subcommands' is true, also reinitializes the command's @@ -868,11 +868,11 @@ def reinitialize_command (self, command, reinit_subcommands=0): if reinit_subcommands: for sub in command.get_sub_commands(): - self.reinitialize_command(sub, reinit_subcommands) + self.reinitialize_command(sub, reinit_subcommands) return command - + # -- Methods that operate on the Distribution ---------------------- def announce (self, msg, level=1): @@ -976,7 +976,7 @@ def __init__ (self): self.long_description = None self.keywords = None self.platforms = None - + def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. """ @@ -1003,9 +1003,9 @@ def write_pkg_info (self, base_dir): pkg_info.write('Platform: %s\n' % platform ) pkg_info.close() - + # write_pkg_info () - + # -- Metadata query methods ---------------------------------------- def get_name (self): @@ -1045,7 +1045,7 @@ def get_url(self): def get_license(self): return self.license or "UNKNOWN" get_licence = get_license - + def get_description(self): return self.description or "UNKNOWN" diff --git a/extension.py b/extension.py index a63ede233c..fbae7c5226 100644 --- a/extension.py +++ b/extension.py @@ -16,7 +16,7 @@ # module is already big enough, and I want to make this class a bit more # complex to simplify some common cases ("foo" module in "foo.c") and do # better error-checking ("foo.c" actually exists). -# +# # Also, putting this in build_ext.py means every setup script would have to # import that large-ish module (indirectly, through distutils.core) in # order to do anything. @@ -211,7 +211,7 @@ def read_setup_file (filename): #extensions[module] = { 'sources': source_files, # 'cpp_args': cpp_args, # 'lib_args': library_args } - + return extensions # read_setup_file () diff --git a/fancy_getopt.py b/fancy_getopt.py index 83d07216a7..e65302fc0b 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -73,7 +73,7 @@ def __init__ (self, option_table=None): # 'negative_alias' keeps track of options that are the boolean # opposite of some other option self.negative_alias = {} - + # These keep track of the information in the option table. We # don't actually populate these structures until we're ready to # parse the command-line, since the 'option_table' passed in here @@ -90,7 +90,7 @@ def __init__ (self, option_table=None): self.option_order = [] # __init__ () - + def _build_index (self): self.option_index.clear() @@ -117,7 +117,7 @@ def has_option (self, long_option): return self.option_index.has_key(long_option) def get_attr_name (self, long_option): - """Translate long option name 'long_option' to the form it + """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" return string.translate(long_option, longopt_xlate) @@ -134,7 +134,7 @@ def _check_alias_dict (self, aliases, what): raise DistutilsGetoptError, \ ("invalid %s '%s': " "aliased option '%s' not defined") % (what, alias, opt) - + def set_aliases (self, alias): """Set the aliases for this option parser.""" self._check_alias_dict(alias, "alias") @@ -476,7 +476,7 @@ def translate_longopt (opt): changing "-" to "_". """ return string.translate(opt, longopt_xlate) - + class OptionDummy: """Dummy class just used as a place to hold command-line option @@ -489,7 +489,7 @@ def __init__ (self, options=[]): setattr(self, opt, None) # class OptionDummy - + if __name__ == "__main__": text = """\ diff --git a/file_util.py b/file_util.py index 991d8357b5..526e4cf593 100644 --- a/file_util.py +++ b/file_util.py @@ -35,20 +35,20 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): except os.error, (errno, errstr): raise DistutilsFileError, \ "could not open '%s': %s" % (src, errstr) - + try: fdst = open(dst, 'wb') except os.error, (errno, errstr): raise DistutilsFileError, \ "could not create '%s': %s" % (dst, errstr) - + while 1: try: buf = fsrc.read(buffer_size) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not read from '%s': %s" % (src, errstr) - + if not buf: break @@ -57,7 +57,7 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): except os.error, (errno, errstr): raise DistutilsFileError, \ "could not write to '%s': %s" % (dst, errstr) - + finally: if fdst: fdst.close() @@ -134,7 +134,7 @@ def copy_file (src, dst, print "%s %s -> %s" % (action, src, dir) else: print "%s %s -> %s" % (action, src, dst) - + if dry_run: return (dst, 1) @@ -146,7 +146,7 @@ def copy_file (src, dst, except os.error, exc: raise DistutilsFileError, \ "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) - + # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': @@ -189,7 +189,7 @@ def move_file (src, dst, """ from os.path import exists, isfile, isdir, basename, dirname import errno - + if verbose: print "moving %s -> %s" % (src, dst) @@ -232,7 +232,7 @@ def move_file (src, dst, except os.error: pass raise DistutilsFileError, \ - ("couldn't move '%s' to '%s' by copy/delete: " + + ("couldn't move '%s' to '%s' by copy/delete: " + "delete '%s' failed: %s") % \ (src, dst, src, msg) diff --git a/filelist.py b/filelist.py index 211b65f8d2..f7222fd927 100644 --- a/filelist.py +++ b/filelist.py @@ -7,7 +7,7 @@ # created 2000/07/17, Rene Liebscher (as template.py) # most parts taken from commands/sdist.py # renamed 2000/07/29 (to filelist.py) and officially added to -# the Distutils source, Greg Ward +# the Distutils source, Greg Ward __revision__ = "$Id$" @@ -34,8 +34,8 @@ class FileList: filtering applied) """ - def __init__(self, - warn=None, + def __init__(self, + warn=None, debug_print=None): # use standard warning and debug functions if no other given self.warn = warn or self.__warn @@ -53,10 +53,10 @@ def findall (self, dir=os.curdir): # -- Fallback warning/debug functions ------------------------------ - + def __warn (self, msg): sys.stderr.write("warning: %s\n" % msg) - + def __debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. @@ -93,7 +93,7 @@ def remove_duplicates (self): # -- "File template" methods --------------------------------------- - + def _parse_template_line (self, line): words = string.split(line) action = words[0] @@ -129,9 +129,9 @@ def _parse_template_line (self, line): return (action, patterns, dir, dir_pattern) # _parse_template_line () - - def process_template_line (self, line): + + def process_template_line (self, line): # Parse the line: split it up, make sure the right number of words # is there, and return the relevant words. 'action' is always @@ -190,7 +190,7 @@ def process_template_line (self, line): self.warn(("no previously-included files matching '%s' " + "found under directory '%s'") % (pattern, dir)) - + elif action == 'graft': self.debug_print("graft " + dir_pattern) if not self.include_pattern(None, prefix=dir_pattern): @@ -251,7 +251,7 @@ def include_pattern (self, pattern, self.debug_print(" adding " + name) self.files.append(name) files_found = 1 - + return files_found # include_pattern () @@ -261,7 +261,7 @@ def exclude_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match 'pattern'. Other parameters are the same as for - 'include_pattern()', above. + 'include_pattern()', above. The list 'self.files' is modified in place. Return 1 if files are found. """ @@ -274,7 +274,7 @@ def exclude_pattern (self, pattern, self.debug_print(" removing " + self.files[i]) del self.files[i] files_found = 1 - + return files_found # exclude_pattern () @@ -354,14 +354,14 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): pattern_re = glob_to_re(pattern) else: pattern_re = '' - + if prefix is not None: prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re - + return re.compile(pattern_re) # translate_pattern () diff --git a/msvccompiler.py b/msvccompiler.py index 0325b48508..8a67dfc823 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -50,8 +50,8 @@ HKEY_LOCAL_MACHINE = hkey_mod.HKEY_LOCAL_MACHINE HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER HKEY_USERS = hkey_mod.HKEY_USERS - - + + def get_devstudio_versions (): """Get list of devstudio versions from the Windows registry. Return a @@ -93,7 +93,7 @@ def get_msvc_paths (path, version='6.0', platform='x86'): """Get a list of devstudio directories (include, lib or path). Return a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" - + if not _can_read_reg: return [] @@ -149,7 +149,7 @@ def find_exe (exe, version_number): if os.path.isfile(fn): return fn - return exe # last desperate hope + return exe # last desperate hope def set_path_env_var (name, version_number): @@ -294,7 +294,7 @@ def compile (self, compile_opts.extend (self.compile_options_debug) else: compile_opts.extend (self.compile_options) - + for i in range (len (sources)): src = sources[i] ; obj = objects[i] ext = (os.path.splitext (src))[1] @@ -390,12 +390,12 @@ def create_static_lib (self, self.spawn ([self.lib] + lib_args) except DistutilsExecError, msg: raise LibError, msg - + else: self.announce ("skipping %s (up-to-date)" % output_filename) # create_static_lib () - + def link (self, target_desc, objects, @@ -417,7 +417,7 @@ def link (self, if runtime_library_dirs: self.warn ("I don't know what to do with 'runtime_library_dirs': " + str (runtime_library_dirs)) - + lib_opts = gen_lib_options (self, library_dirs, runtime_library_dirs, libraries) @@ -441,7 +441,7 @@ def link (self, for sym in (export_symbols or []): export_opts.append("/EXPORT:" + sym) - ld_args = (ldflags + lib_opts + export_opts + + ld_args = (ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]) # The MSVC linker generates .lib and .exp files, which cannot be diff --git a/mwerkscompiler.py b/mwerkscompiler.py index e759456a36..7c77b8bcef 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -52,8 +52,8 @@ def __init__ (self, force=0): CCompiler.__init__ (self, verbose, dry_run, force) - - + + def compile (self, sources, output_dir=None, @@ -62,14 +62,14 @@ def compile (self, debug=0, extra_preargs=None, extra_postargs=None): - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - self.__sources = sources - self.__macros = macros - self.__include_dirs = include_dirs - # Don't need extra_preargs and extra_postargs for CW - return [] - + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + self.__sources = sources + self.__macros = macros + self.__include_dirs = include_dirs + # Don't need extra_preargs and extra_postargs for CW + return [] + def link (self, target_desc, objects, @@ -198,7 +198,7 @@ def link (self, if self.verbose: print '\tBuild project' mkcwproject.buildproject(projectfilename) - + def _filename_to_abs(self, filename): # Some filenames seem to be unix-like. Convert to Mac names. ## if '/' in filename and ':' in filename: @@ -207,13 +207,11 @@ def _filename_to_abs(self, filename): ## filename = macurl2path(filename) filename = distutils.util.convert_path(filename) if not os.path.isabs(filename): - curdir = os.getcwd() - filename = os.path.join(curdir, filename) + curdir = os.getcwd() + filename = os.path.join(curdir, filename) # Finally remove .. components components = string.split(filename, ':') for i in range(1, len(components)): - if components[i] == '..': - components[i] = '' + if components[i] == '..': + components[i] = '' return string.join(components, ':') - - diff --git a/spawn.py b/spawn.py index 1eed7a8abc..07dc81484a 100644 --- a/spawn.py +++ b/spawn.py @@ -71,7 +71,7 @@ def _spawn_nt (cmd, cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same - executable = find_executable(executable) or executable + executable = find_executable(executable) or executable if verbose: print string.join([executable] + cmd[1:], ' ') if not dry_run: @@ -87,7 +87,7 @@ def _spawn_nt (cmd, raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) - + def _spawn_posix (cmd, search_path=1, verbose=0, @@ -110,11 +110,11 @@ def _spawn_posix (cmd, sys.stderr.write("unable to execute %s: %s\n" % (cmd[0], e.strerror)) os._exit(1) - + sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0]) os._exit(1) - + else: # in the parent # Loop until the child either exits or is terminated by a signal # (ie. keep waiting if it's merely stopped) @@ -133,7 +133,7 @@ def _spawn_posix (cmd, raise DistutilsExecError, \ "command '%s' failed with exit status %d" % \ (cmd[0], exit_status) - + elif os.WIFSTOPPED(status): continue @@ -166,4 +166,4 @@ def find_executable(executable, path=None): else: return executable -# find_executable() +# find_executable() diff --git a/sysconfig.py b/sysconfig.py index 935372cd2b..feaf318ccd 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -48,7 +48,7 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. - """ + """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": @@ -318,7 +318,7 @@ def _init_posix(): # the scripts are in another directory. if python_build: g['LDSHARED'] = g['BLDSHARED'] - + elif sys.version < '2.1': # The following two branches are for 1.5.2 compatibility. if sys.platform == 'aix4': # what about AIX 3.x ? @@ -337,7 +337,7 @@ def _init_posix(): python_lib = get_python_lib(standard_lib=1) linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) - + # XXX this isn't the right place to do this: adding the Python # library to the link, if needed, should be in the "build_ext" # command. (It's also needed for non-MS compilers on Windows, and @@ -345,7 +345,7 @@ def _init_posix(): # method.) g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % (linkerscript, PREFIX, sys.version[0:3])) - + global _config_vars _config_vars = g diff --git a/text_file.py b/text_file.py index 37bffe6139..7086b1af56 100644 --- a/text_file.py +++ b/text_file.py @@ -86,7 +86,7 @@ def __init__ (self, filename=None, file=None, **options): if filename is None and file is None: raise RuntimeError, \ - "you must supply either or both of 'filename' and 'file'" + "you must supply either or both of 'filename' and 'file'" # set values for all options -- either from client option hash # or fallback to default_options @@ -113,7 +113,7 @@ def __init__ (self, filename=None, file=None, **options): # actually read from the file; it's only populated by an # 'unreadline()' operation self.linebuf = [] - + def open (self, filename): """Open a new file named 'filename'. This overrides both the @@ -213,7 +213,7 @@ def readline (self): # EOF; I think that's OK.) eol = (line[-1] == '\n') and '\n' or '' line = line[0:pos] + eol - + # If all that's left is whitespace, then skip line # *now*, before we try to join it to 'buildup_line' -- # that way constructs like @@ -226,7 +226,7 @@ def readline (self): else: # it's an escaped "#" line = string.replace (line, "\\#", "#") - + # did previous line end with a backslash? then accumulate if self.join_lines and buildup_line: @@ -256,7 +256,7 @@ def readline (self): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 - + # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) @@ -351,7 +351,7 @@ def test_input (count, description, file, expected_result): print expected_result print "** received:" print result - + filename = "test.txt" out_file = open (filename, "w") @@ -382,4 +382,3 @@ def test_input (count, description, file, expected_result): test_input (6, "join lines with collapsing", in_file, result6) os.remove (filename) - diff --git a/unixccompiler.py b/unixccompiler.py index a4f0ac4d04..a9b5de51ce 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -103,8 +103,8 @@ def preprocess (self, pp_args.extend(extra_postargs) # We need to preprocess: either we're being forced to, or we're - # generating output to stdout, or there's a target output file and - # the source file is newer than the target (or the target doesn't + # generating output to stdout, or there's a target output file and + # the source file is newer than the target (or the target doesn't # exist). if self.force or output_file is None or newer(source, output_file): if output_file: @@ -139,7 +139,7 @@ def compile (self, extra_postargs = [] # Compile all source files that weren't eliminated by - # '_prep_compile()'. + # '_prep_compile()'. for i in range(len(sources)): src = sources[i] ; obj = objects[i] if skip_sources[src]: @@ -157,7 +157,7 @@ def compile (self, return objects # compile () - + def create_static_lib (self, objects, @@ -193,7 +193,7 @@ def create_static_lib (self, def link (self, - target_desc, + target_desc, objects, output_filename, output_dir=None, @@ -219,7 +219,7 @@ def link (self, output_filename = os.path.join(output_dir, output_filename) if self._need_link(objects, output_filename): - ld_args = (objects + self.objects + + ld_args = (objects + self.objects + lib_opts + ['-o', output_filename]) if debug: ld_args[:0] = ['-g'] @@ -229,7 +229,7 @@ def link (self, ld_args.extend(extra_postargs) self.mkpath(os.path.dirname(output_filename)) try: - if target_desc == CCompiler.EXECUTABLE: + if target_desc == CCompiler.EXECUTABLE: self.spawn(self.linker_exe + ld_args) else: self.spawn(self.linker_so + ld_args) @@ -244,7 +244,7 @@ def link (self, # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in # ccompiler.py. - + def library_dir_option (self, dir): return "-L" + dir diff --git a/util.py b/util.py index 25ddbdf450..1541e02de9 100644 --- a/util.py +++ b/util.py @@ -30,7 +30,7 @@ def get_platform (): solaris-2.6-sun4u irix-5.3 irix64-6.2 - + For non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name != "posix" or not hasattr(os, 'uname'): @@ -44,9 +44,9 @@ def get_platform (): # Convert the OS name to lowercase and remove '/' characters # (to accommodate BSD/OS) - osname = string.lower(osname) + osname = string.lower(osname) osname = string.replace(osname, '/', '') - + if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- # i386, etc. @@ -59,7 +59,7 @@ def get_platform (): # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) - elif osname[:3] == "aix": + elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" @@ -67,7 +67,7 @@ def get_platform (): m = rel_re.match(release) if m: release = m.group() - + return "%s-%s-%s" % (osname, release, machine) # get_platform () @@ -280,7 +280,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): # Generate a message if we weren't passed one if msg is None: msg = "%s%s" % (func.__name__, `args`) - if msg[-2:] == ',)': # correct for singleton tuple + if msg[-2:] == ',)': # correct for singleton tuple msg = msg[0:-2] + ')' # Print it if verbosity level is high enough @@ -403,7 +403,7 @@ def byte_compile (py_files, spawn(cmd, verbose=verbose, dry_run=dry_run) execute(os.remove, (script_name,), "removing %s" % script_name, verbose=verbose, dry_run=dry_run) - + # "Direct" byte-compilation: use the py_compile module to compile # right here, right now. Note that the script generated in indirect # mode simply calls 'byte_compile()' in direct mode, a weird sort of @@ -453,5 +453,3 @@ def rfc822_escape (header): lines = map(string.strip, lines) header = string.join(lines, '\n' + 8*' ') return header - - diff --git a/version.py b/version.py index 9d3d172429..02502dac95 100644 --- a/version.py +++ b/version.py @@ -98,7 +98,7 @@ class StrictVersion (Version): The rationale for this version numbering system will be explained in the distutils documentation. """ - + version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE) @@ -123,7 +123,7 @@ def parse (self, vstring): def __str__ (self): - + if self.version[2] == 0: vstring = string.join(map(str, self.version[0:2]), '.') else: @@ -133,7 +133,7 @@ def __str__ (self): vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) return vstring - + def __cmp__ (self, other): if isinstance(other, StringType): @@ -170,7 +170,7 @@ def __cmp__ (self, other): # 2) sequences of letters are part of the tuple for comparison and are # compared lexicographically # 3) recognize the numeric components may have leading zeroes -# +# # The LooseVersion class below implements these rules: a version number # string is split up into a tuple of integer and string components, and # comparison is a simple tuple comparison. This means that version @@ -185,7 +185,7 @@ def __cmp__ (self, other): # - indicating a post-release patch ('p', 'pl', 'patch') # but of course this can't cover all version number schemes, and there's # no way to know what a programmer means without asking him. -# +# # The problem is what to do with letters (and other non-numeric # characters) in a version number. The current implementation does the # obvious and predictable thing: keep them as strings and compare @@ -208,7 +208,7 @@ def __cmp__ (self, other): # version numbering scheme to its domination. The free-thinking # anarchists in the lot will never give in, though, and something needs # to be done to accommodate them. -# +# # Perhaps a "moderately strict" version class could be implemented that # lets almost anything slide (syntactically), and makes some heuristic # assumptions about non-digits in version number strings. This could @@ -217,7 +217,7 @@ def __cmp__ (self, other): # somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is # just as happy dealing with things like "2g6" and "1.13++". I don't # think I'm smart enough to do it right though. -# +# # In any case, I've coded the test suite for this module (see # ../test/test_version.py) specifically to fail on things like comparing # "1.2a2" and "1.2". That's not because the *code* is doing anything @@ -296,6 +296,6 @@ def __cmp__ (self, other): other = LooseVersion(other) return cmp(self.version, other.version) - + # end class LooseVersion From 4263b3189f9532a313b1bb52e478168f8a545729 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 6 Dec 2001 21:01:19 +0000 Subject: [PATCH 0770/8469] Whitespace normalization. --- command/bdist.py | 4 ++-- command/bdist_rpm.py | 22 +++++++++++----------- command/bdist_wininst.py | 2 +- command/build_clib.py | 4 ++-- command/build_ext.py | 20 ++++++++++---------- command/build_py.py | 6 +++--- command/config.py | 4 ++-- command/install.py | 10 +++++----- command/install_headers.py | 2 +- command/install_lib.py | 12 ++++++------ command/sdist.py | 10 +++++----- 11 files changed, 48 insertions(+), 48 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index a75303e689..2b1951fd32 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -17,7 +17,7 @@ def show_formats (): """Print list of available formats (arguments to "--format" option). """ - from distutils.fancy_getopt import FancyGetopt + from distutils.fancy_getopt import FancyGetopt formats=[] for format in bdist.format_commands: formats.append(("formats=" + format, None, @@ -104,7 +104,7 @@ def finalize_options (self): if self.dist_dir is None: self.dist_dir = "dist" - + # finalize_options() diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 150fdeca62..037ed9e8f9 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -101,7 +101,7 @@ class bdist_rpm (Command): 'no-rpm-opt-flags': 'use-rpm-opt-flags', 'rpm2-mode': 'rpm3-mode'} - + def initialize_options (self): self.bdist_base = None self.rpm_base = None @@ -184,7 +184,7 @@ def finalize_package_data (self): self.ensure_string('vendor', "%s <%s>" % (self.distribution.get_contact(), self.distribution.get_contact_email())) - self.ensure_string('packager') + self.ensure_string('packager') self.ensure_string_list('doc_files') if type(self.doc_files) is ListType: for readme in ('README', 'README.txt'): @@ -201,7 +201,7 @@ def finalize_package_data (self): self.changelog = self._format_changelog(self.changelog) self.ensure_filename('icon') - + self.ensure_filename('prep_script') self.ensure_filename('build_script') self.ensure_filename('install_script') @@ -275,7 +275,7 @@ def run (self): else: raise DistutilsFileError, \ "icon file '%s' does not exist" % self.icon - + # build package self.announce('building RPMs') @@ -368,17 +368,17 @@ def _make_spec_file(self): spec_file.append('%s: %s' % (field, string.join(val))) elif val is not None: spec_file.append('%s: %s' % (field, val)) - - + + if self.distribution.get_url() != 'UNKNOWN': spec_file.append('Url: ' + self.distribution.get_url()) if self.distribution_name: - spec_file.append('Distribution: ' + self.distribution_name) + spec_file.append('Distribution: ' + self.distribution_name) if self.build_requires: - spec_file.append('BuildRequires: ' + - string.join(self.build_requires)) + spec_file.append('BuildRequires: ' + + string.join(self.build_requires)) if self.icon: spec_file.append('Icon: ' + os.path.basename(self.icon)) @@ -473,11 +473,11 @@ def _format_changelog(self, changelog): new_changelog.append(line) else: new_changelog.append(' ' + line) - + # strip trailing newline inserted by first changelog entry if not new_changelog[0]: del new_changelog[0] - + return new_changelog # _format_changelog() diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 7cdf385553..357ba519d3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -196,7 +196,7 @@ def create_exe (self, arcname, fullname, bitmap=None): file.write(self.get_exe_bytes()) if bitmap: file.write(bitmapdata) - + file.write(cfgdata) header = struct.pack(" Date: Thu, 6 Dec 2001 21:29:28 +0000 Subject: [PATCH 0771/8469] [Bug #475009] Tighten the pattern for the first line, so we don't adjust it when a versioned interpreter is supplied (#!.../python2 ...) --- command/build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 16024e5fed..31750b7c1d 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -12,7 +12,7 @@ from distutils.util import convert_path # check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python(\s+.*)?') +first_line_re = re.compile(r'^#!.*python(\s+.*)?$') class build_scripts (Command): From bf0c7b1e25b1e08c625bb9f5cfd1e6db68360aa6 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 6 Dec 2001 22:59:54 +0000 Subject: [PATCH 0772/8469] Visious hackery to solve a build-control problem related to our use of distutils for the library modules built as shared objects. A better solution appears possible, but with the threat that the distutils becomes more magical ("complex"). This closes SF bug #458343. --- command/build_ext.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index c9e3062306..7a39314bcd 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -456,6 +456,17 @@ def build_extension(self, ext): debug=self.debug, extra_postargs=extra_args) + # XXX -- this is a Vile HACK! + # + # The setup.py script for Python on Unix needs to be able to + # get this list so it can perform all the clean up needed to + # avoid keeping object files around when cleaning out a failed + # build of an extension module. Since Distutils does not + # track dependencies, we have to get rid of intermediates to + # ensure all the intermediates will be properly re-built. + # + self._built_objects = objects[:] + # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. From 730b95b729f9b7acfb9d84225ce74b7f20b8f263 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Mon, 10 Dec 2001 15:28:30 +0000 Subject: [PATCH 0773/8469] Fix for [ #477371 ] build_scripts can use wrong #! line scripts now get "built" into a directory build/scripts-$(PYTHON_VERSION)/ --- command/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build.py b/command/build.py index cf35b45d01..6bc92a43b8 100644 --- a/command/build.py +++ b/command/build.py @@ -90,7 +90,8 @@ def finalize_options (self): self.build_temp = os.path.join(self.build_base, 'temp' + plat_specifier) if self.build_scripts is None: - self.build_scripts = os.path.join(self.build_base, 'scripts') + self.build_scripts = os.path.join(self.build_base, + 'scripts-' + sys.version[0:3]) # finalize_options () From 158c496ca9d641e38b8469143db7cf49ff35b8a8 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Mon, 10 Dec 2001 16:15:44 +0000 Subject: [PATCH 0774/8469] Fix for [ #409430 ] pydoc install broken --- command/build_scripts.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 31750b7c1d..7286bf1f3f 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import sys, os, re +from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path @@ -86,8 +87,16 @@ def copy_scripts (self): (script, self.build_dir)) if not self.dry_run: outf = open(outfile, "w") - outf.write("#!%s%s\n" % - (os.path.normpath(sys.executable), post_interp)) + if not sysconfig.python_build: + outf.write("#!%s%s\n" % + (os.path.normpath(sys.executable), + post_interp)) + else: + outf.write("#!%s%s" % + (os.path.join( + sysconfig.get_config_var("BINDIR"), + "python" + sysconfig.get_config_var("EXE")), + post_interp)) outf.writelines(f.readlines()) outf.close() if f: From 54b68c95834551d0995f388151974be7b967a471 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 11 Dec 2001 05:04:24 +0000 Subject: [PATCH 0775/8469] When using GCC, use the right option to add a directory to the list of dirs searched for a dependency for runtime linking. This closes SF bug #445902. --- unixccompiler.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index a9b5de51ce..356587d600 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -20,6 +20,7 @@ import string, re, os from types import * from copy import copy +from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -249,7 +250,23 @@ def library_dir_option (self, dir): return "-L" + dir def runtime_library_dir_option (self, dir): - return "-R" + dir + # XXX Hackish, at the very least. See Python bug #445902: + # http://sourceforge.net/tracker/index.php + # ?func=detail&aid=445902&group_id=5470&atid=105470 + # Linkers on different platforms need different options to + # specify that directories need to be added to the list of + # directories searched for dependencies when a dynamic library + # is sought. GCC has to be told to pass the -R option through + # to the linker, whereas other compilers just know this. + # Other compilers may need something slightly different. At + # this time, there's no way to determine this information from + # the configuration data stored in the Python installation, so + # we use this hack. + compiler = os.path.basename(sysconfig.get_config_var("CC")) + if compiler == "gcc" or compiler == "g++": + return "-Wl,-R" + dir + else: + return "-R" + dir def library_option (self, lib): return "-l" + lib From 30bfa264aae2dfa5a6a6db2a3058467c79c7f437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Tue, 11 Dec 2001 20:44:42 +0000 Subject: [PATCH 0776/8469] Joe VanAndel wrote: > > When using 'distutils' (shipped with Python 2.1) I've found that my > Python scripts installed with a first line of: > > #!/usr/bin/python2.1None > > This is caused by distutils trying to patch the first line of the python > script to use the current interpreter. --- command/build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 7286bf1f3f..bfa33c3a10 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -80,7 +80,7 @@ def copy_scripts (self): match = first_line_re.match(first_line) if match: adjust = 1 - post_interp = match.group(1) + post_interp = match.group(1) or '' if adjust: self.announce("copying and adjusting %s -> %s" % From 5ccf2307126f5e3f989925d2653239860c9b53db Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 18 Dec 2001 20:13:40 +0000 Subject: [PATCH 0777/8469] Second part of fix for bug [#483982] Python 2.2b2 bdist_wininst crashes. If no external zip-utility is found, the archive is created by the zipfile module, which behaves different now than in 2.1: if the zip-file is created in the root directory if the distribution, it will contain an (empty) version of itself. This triggered the above bug - so it's better to create the zip-file far away in the TMP directory. --- command/bdist_wininst.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 357ba519d3..9ff9461307 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -112,13 +112,16 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. + from tempfile import mktemp + archive_basename = mktemp() fullname = self.distribution.get_fullname() - archive_basename = os.path.join(self.bdist_dir, - "%s.win32" % fullname) - arcname = self.make_archive(archive_basename, "zip", root_dir=self.bdist_dir) + # create an exe containing the zip-file self.create_exe(arcname, fullname, self.bitmap) + # remove the zip-file again + self.announce("removing temporary file '%s'" % arcname) + os.remove(arcname) if not self.keep_temp: remove_tree(self.bdist_dir, self.verbose, self.dry_run) From 74bfeea5bba971e7e23323973affee72cfd37c60 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 18 Dec 2001 21:08:15 +0000 Subject: [PATCH 0778/8469] Recreated after source changes. --- command/bdist_wininst.py | 568 +++++++++++++++++++-------------------- 1 file changed, 284 insertions(+), 284 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 9ff9461307..7c34cffd85 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -234,7 +234,7 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAAA/SHa+eykY7XspGO17KRjtADUU7XkpGO0UNhLtcCkY7fg1Fu15KRjtF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AAAAAAAAAAAAAAAAAAAAAAAAAA From b8b4137be241dd8aeb636a704150fea716b63a30 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 21 Dec 2001 15:34:17 +0000 Subject: [PATCH 0779/8469] Suggested by Pete Shinners: treat .m and .mm files as source code. Question for Jack Jansen: is this reasonable? Candidate for 2.2 release branch (if Jack thinks it's OK). --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index fbae7c5226..a31ccbce8d 100644 --- a/extension.py +++ b/extension.py @@ -160,7 +160,7 @@ def read_setup_file (filename): suffix = os.path.splitext(word)[1] switch = word[0:2] ; value = word[2:] - if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++"): + if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): # hmm, should we do something about C vs. C++ sources? # or leave it up to the CCompiler implementation to # worry about? From 533106ffec72f15ce012bff3bae5f24df618c8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Jan 2002 11:27:42 +0000 Subject: [PATCH 0780/8469] Patch #414775: Add --skip-build option to bdist command. --- command/bdist.py | 5 +++++ command/bdist_dumb.py | 9 +++++++-- command/bdist_wininst.py | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 2b1951fd32..fc18bd0c80 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -40,8 +40,12 @@ class bdist (Command): ('dist-dir=', 'd', "directory to put final built distributions in " "[default: dist]"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] + boolean_options = ['skip-build'] + help_options = [ ('help-formats', None, "lists available distribution formats", show_formats), @@ -76,6 +80,7 @@ def initialize_options (self): self.plat_name = None self.formats = None self.dist_dir = None + self.skip_build = 0 # initialize_options() diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 8dfc3271df..dbe862bb42 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -30,9 +30,11 @@ class bdist_dumb (Command): "creating the distribution archive"), ('dist-dir=', 'd', "directory to put final built distributions in"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] - boolean_options = ['keep-temp'] + boolean_options = ['keep-temp', 'skip-build'] default_format = { 'posix': 'gztar', 'nt': 'zip', } @@ -44,6 +46,7 @@ def initialize_options (self): self.format = None self.keep_temp = 0 self.dist_dir = None + self.skip_build = 0 # initialize_options() @@ -71,10 +74,12 @@ def finalize_options (self): def run (self): - self.run_command('build') + if not self.skip_build: + self.run_command('build') install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir + install.skip_build = self.skip_build self.announce("installing to %s" % self.bdist_dir) self.run_command('install') diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 7c34cffd85..4a16eec45e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -36,6 +36,8 @@ class bdist_wininst (Command): "bitmap to use for the installer instead of python-powered logo"), ('title=', 't', "title to display on the installer background instead of default"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), ] boolean_options = ['keep-temp'] @@ -49,6 +51,7 @@ def initialize_options (self): self.dist_dir = None self.bitmap = None self.title = None + self.skip_build = 0 # initialize_options() @@ -79,10 +82,12 @@ def run (self): ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") - self.run_command('build') + if not self.skip_build: + self.run_command('build') install = self.reinitialize_command('install') install.root = self.bdist_dir + install.skip_build = self.skip_build install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files From 877f0c18a6a831ef6f840a30e04d9ad8414d9aef Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 18 Jan 2002 20:30:53 +0000 Subject: [PATCH 0781/8469] SWIGing a source file .i silently overwrites .c if it is present - at least the swigged file should be named _wrap.c as this is also SWIG's default. (Even better would be to generate the wrapped sources in a different location, but I'll leave this for later). Newer versions of SWIG don't accept the -dnone flag any more. Since virtually nobody uses SWIG with distutils, this should do no harm. Suggested be Martin Bless on c.l.p. --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7a39314bcd..98617f7fcd 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -511,7 +511,7 @@ def swig_sources (self, sources): for source in sources: (base, ext) = os.path.splitext(source) if ext == ".i": # SWIG interface file - new_sources.append(base + target_ext) + new_sources.append(base + '_wrap' + target_ext) swig_sources.append(source) swig_targets[source] = new_sources[-1] else: @@ -521,7 +521,7 @@ def swig_sources (self, sources): return new_sources swig = self.find_swig() - swig_cmd = [swig, "-python", "-dnone", "-ISWIG"] + swig_cmd = [swig, "-python"] if self.swig_cpp: swig_cmd.append("-c++") From 9b2752c213bc110bd6b5a123c3aa67314d772711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 29 Jan 2002 10:23:42 +0000 Subject: [PATCH 0782/8469] Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate. --- msvccompiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 8a67dfc823..35336642ae 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -117,6 +117,10 @@ def get_msvc_paths (path, version='6.0', platform='x86'): if string.upper(p) == path: V = string.split(v,';') for v in V: + try: + v = v.encode("mbcs") + except UnicodeError: + pass if v == '' or v in L: continue L.append(v) break From d6951f1f6bab52d73341651f62cda2dd3f85433c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 31 Jan 2002 18:56:00 +0000 Subject: [PATCH 0783/8469] OS/2 patches by Andrew I MacIntyre for distutils. Closes patch #435381. --- ccompiler.py | 3 +++ command/bdist.py | 3 ++- command/bdist_dumb.py | 9 ++++++++- command/build_ext.py | 27 ++++++++++++++++++++++++++- command/install.py | 7 +++++++ spawn.py | 31 ++++++++++++++++++++++++++++++- sysconfig.py | 26 ++++++++++++++++++++++++++ util.py | 6 ++++++ 8 files changed, 108 insertions(+), 4 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 21bf0c1715..f4fc4bcbae 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -846,6 +846,7 @@ def mkpath (self, name, mode=0777): # on a cygwin built python we can use gcc like an ordinary UNIXish # compiler ('cygwin.*', 'unix'), + ('os2emx', 'emx'), # OS name mappings ('posix', 'unix'), @@ -892,6 +893,8 @@ def get_default_compiler(osname=None, platform=None): "Borland C++ Compiler"), 'mwerks': ('mwerkscompiler', 'MWerksCompiler', "MetroWerks CodeWarrior"), + 'emx': ('emxccompiler', 'EMXCCompiler', + "EMX port of GNU C Compiler for OS/2"), } def show_compilers(): diff --git a/command/bdist.py b/command/bdist.py index fc18bd0c80..68609f346a 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -57,7 +57,8 @@ class bdist (Command): # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. default_format = { 'posix': 'gztar', - 'nt': 'zip', } + 'nt': 'zip', + 'os2': 'zip', } # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index dbe862bb42..b627a86a43 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -37,7 +37,8 @@ class bdist_dumb (Command): boolean_options = ['keep-temp', 'skip-build'] default_format = { 'posix': 'gztar', - 'nt': 'zip', } + 'nt': 'zip', + 'os2': 'zip' } def initialize_options (self): @@ -88,6 +89,12 @@ def run (self): # pseudo-installation tree. archive_basename = "%s.%s" % (self.distribution.get_fullname(), self.plat_name) + + # OS/2 objects to any ":" characters in a filename (such as when + # a timestamp is used in a version) so change them to hyphens. + if os.name == "os2": + archive_basename = archive_basename.replace(":", "-") + self.make_archive(os.path.join(self.dist_dir, archive_basename), self.format, root_dir=self.bdist_dir) diff --git a/command/build_ext.py b/command/build_ext.py index 98617f7fcd..91fee5ee6e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -167,6 +167,11 @@ def finalize_options (self): else: self.build_temp = os.path.join(self.build_temp, "Release") + # OS/2 (EMX) doesn't support Debug vs Release builds, but has the + # import libraries in its "Config" subdirectory + if os.name == 'os2': + self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) + # for extensions under Cygwin Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin': @@ -554,6 +559,10 @@ def find_swig (self): else: return "swig.exe" + elif os.name == "os2": + # assume swig available in the PATH. + return "swig.exe" + else: raise DistutilsPlatformError, \ ("I don't know how to find (much less run) SWIG " @@ -578,6 +587,9 @@ def get_ext_filename (self, ext_name): from distutils.sysconfig import get_config_var ext_path = string.split(ext_name, '.') + # OS/2 has an 8 character module (extension) limit :-( + if os.name == "os2": + ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: @@ -599,7 +611,7 @@ def get_export_symbols (self, ext): def get_libraries (self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; - on Windows, we add the Python library (eg. python20.dll). + on Windows and OS/2, we add the Python library (eg. python20.dll). """ # The python library is always needed on Windows. For MSVC, this # is redundant, since the library is mentioned in a pragma in @@ -617,6 +629,19 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + elif sys.platform == "os2emx": + # EMX/GCC requires the python library explicitly, and I + # believe VACPP does as well (though not confirmed) - AIM Apr01 + template = "python%d%d" + # debug versions of the main DLL aren't supported, at least + # not at this time - AIM Apr01 + #if self.debug: + # template = template + '_d' + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib] elif sys.platform[:6] == "cygwin": template = "python%d.%d" pythonlib = (template % diff --git a/command/install.py b/command/install.py index 8755a1424a..4d78d3aa6f 100644 --- a/command/install.py +++ b/command/install.py @@ -50,6 +50,13 @@ }, 'nt': WINDOWS_SCHEME, 'mac': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', diff --git a/spawn.py b/spawn.py index 07dc81484a..5b6016e0d8 100644 --- a/spawn.py +++ b/spawn.py @@ -38,6 +38,8 @@ def spawn (cmd, _spawn_posix(cmd, search_path, verbose, dry_run) elif os.name == 'nt': _spawn_nt(cmd, search_path, verbose, dry_run) + elif os.name == 'os2': + _spawn_os2(cmd, search_path, verbose, dry_run) else: raise DistutilsPlatformError, \ "don't know how to spawn programs on platform '%s'" % os.name @@ -88,6 +90,33 @@ def _spawn_nt (cmd, "command '%s' failed with exit status %d" % (cmd[0], rc) +def _spawn_os2 (cmd, + search_path=1, + verbose=0, + dry_run=0): + + executable = cmd[0] + #cmd = _nt_quote_args(cmd) + if search_path: + # either we find one or it stays the same + executable = find_executable(executable) or executable + if verbose: + print string.join([executable] + cmd[1:], ' ') + if not dry_run: + # spawnv for OS/2 EMX requires a full path to the .exe + try: + rc = os.spawnv(os.P_WAIT, executable, cmd) + except OSError, exc: + # this seems to happen when the command isn't found + raise DistutilsExecError, \ + "command '%s' failed: %s" % (cmd[0], exc[-1]) + if rc != 0: + # and this reflects the command running but failing + print "command '%s' failed with exit status %d" % (cmd[0], rc) + raise DistutilsExecError, \ + "command '%s' failed with exit status %d" % (cmd[0], rc) + + def _spawn_posix (cmd, search_path=1, verbose=0, @@ -154,7 +183,7 @@ def find_executable(executable, path=None): path = os.environ['PATH'] paths = string.split(path, os.pathsep) (base, ext) = os.path.splitext(executable) - if (sys.platform == 'win32') and (ext != '.exe'): + if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'): executable = executable + '.exe' if not os.path.isfile(executable): for p in paths: diff --git a/sysconfig.py b/sysconfig.py index feaf318ccd..d773f14905 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -59,6 +59,8 @@ def get_python_inc(plat_specific=0, prefix=None): return os.path.join(prefix, "include") elif os.name == "mac": return os.path.join(prefix, "Include") + elif os.name == "os2": + return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " @@ -110,6 +112,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return os.path.join(prefix, "Lib") else: return os.path.join(prefix, "Lib", "site-packages") + + elif os.name == "os2": + if standard_lib: + return os.path.join(PREFIX, "Lib") + else: + return os.path.join(PREFIX, "Lib", "site-packages") + else: raise DistutilsPlatformError( "I don't know where Python installs its library " @@ -391,6 +400,23 @@ def _init_mac(): _config_vars = g +def _init_os2(): + """Initialize the module as appropriate for OS/2""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + g['SO'] = '.pyd' + g['EXE'] = ".exe" + + global _config_vars + _config_vars = g + + def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes diff --git a/util.py b/util.py index 1541e02de9..a51ce6601d 100644 --- a/util.py +++ b/util.py @@ -117,6 +117,12 @@ def change_root (new_root, pathname): path = path[1:] return os.path.join(new_root, path) + elif os.name == 'os2': + (drive, path) = os.path.splitdrive(pathname) + if path[0] == os.sep: + path = path[1:] + return os.path.join(new_root, path) + elif os.name == 'mac': if not os.path.isabs(pathname): return os.path.join(new_root, pathname) From f666dda63137a66f6d619529d79c9238dfbae94d Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 31 Jan 2002 22:08:38 +0000 Subject: [PATCH 0784/8469] Restrict the mode to the lowest four octal positions; higher positions contain the type of the file (regular file, socket, link, &c.). This means that install_scripts will now print "changing mode of to 775" instead of "... to 100775". 2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug. --- command/install_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_scripts.py b/command/install_scripts.py index 3bc23e7460..d4cbaa3a0a 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -50,7 +50,7 @@ def run (self): if self.dry_run: self.announce("changing mode of %s" % file) else: - mode = (os.stat(file)[ST_MODE]) | 0111 + mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777 self.announce("changing mode of %s to %o" % (file, mode)) os.chmod(file, mode) From 4431a9867079962ba92f8671378c33555fe45a10 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 1 Feb 2002 09:44:09 +0000 Subject: [PATCH 0785/8469] package_dir must be converted from the distutils path conventions to local conventions before being used by build_py. Fixes SF bug #509288, probably a candidate for 2.2.1 --- command/build_py.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 527e81d9ae..97d094b1b2 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -12,6 +12,7 @@ from distutils.core import Command from distutils.errors import * +from distutils.util import convert_path class build_py (Command): @@ -50,7 +51,10 @@ def finalize_options (self): # options -- list of packages and list of modules. self.packages = self.distribution.packages self.py_modules = self.distribution.py_modules - self.package_dir = self.distribution.package_dir + self.package_dir = {} + if self.distribution.package_dir: + for name, path in self.distribution.package_dir.items(): + self.package_dir[name] = convert_path(path) # Ick, copied straight from install_lib.py (fancy_getopt needs a # type system! Hell, *everything* needs a type system!!!) From 0592edfb320ccaba1ac5478560dab5f5dbdccdd9 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 1 Feb 2002 18:29:34 +0000 Subject: [PATCH 0786/8469] [Bug #220993; may also fix bug #479469] Fix flakiness when old installations are present, by always unlinking the destination file before copying to it. Without the unlink(), the copied file remains owned by its previous UID, causing the subsequent chmod() to fail. Bugfix candidate, though it may cause changes on platforms where file ownership behaves differently. --- file_util.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/file_util.py b/file_util.py index 526e4cf593..14772fb74a 100644 --- a/file_util.py +++ b/file_util.py @@ -36,6 +36,13 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): raise DistutilsFileError, \ "could not open '%s': %s" % (src, errstr) + if os.path.exists(dst): + try: + os.unlink(dst) + except os.error, (errno, errstr): + raise DistutilsFileError, \ + "could not delete '%s': %s" % (dst, errstr) + try: fdst = open(dst, 'wb') except os.error, (errno, errstr): From 896685f12e8f24d25586928c66d926c7c095b8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Wed, 6 Feb 2002 18:22:48 +0000 Subject: [PATCH 0787/8469] Forgot to add the new emxccompiler.py from Andrew I. MacIntyre's distutils patch for OS/2. Here it is... --- emxccompiler.py | 334 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 emxccompiler.py diff --git a/emxccompiler.py b/emxccompiler.py new file mode 100644 index 0000000000..58a0d812e4 --- /dev/null +++ b/emxccompiler.py @@ -0,0 +1,334 @@ +"""distutils.emxccompiler + +Provides the EMXCCompiler class, a subclass of UnixCCompiler that +handles the EMX port of the GNU C compiler to OS/2. +""" + +# issues: +# +# * OS/2 insists that DLLs can have names no longer than 8 characters +# We put export_symbols in a def-file, as though the DLL can have +# an arbitrary length name, but truncate the output filename. +# +# * only use OMF objects and use LINK386 as the linker (-Zomf) +# +# * always build for multithreading (-Zmt) as the accompanying OS/2 port +# of Python is only distributed with threads enabled. +# +# tested configurations: +# +# * EMX gcc 2.81/EMX 0.9d fix03 + +# created 2001/5/7, Andrew MacIntyre, from Rene Liebscher's cywinccompiler.py + +__revision__ = "$Id$" + +import os,sys,copy +from distutils.ccompiler import gen_preprocess_options, gen_lib_options +from distutils.unixccompiler import UnixCCompiler +from distutils.file_util import write_file +from distutils.errors import DistutilsExecError, CompileError, UnknownFileError + +class EMXCCompiler (UnixCCompiler): + + compiler_type = 'emx' + obj_extension = ".obj" + static_lib_extension = ".lib" + shared_lib_extension = ".dll" + static_lib_format = "%s%s" + shared_lib_format = "%s%s" + res_extension = ".res" # compiled resource file + exe_extension = ".exe" + + def __init__ (self, + verbose=0, + dry_run=0, + force=0): + + UnixCCompiler.__init__ (self, verbose, dry_run, force) + + (status, details) = check_config_h() + self.debug_print("Python's GCC status: %s (details: %s)" % + (status, details)) + if status is not CONFIG_H_OK: + self.warn( + "Python's pyconfig.h doesn't seem to support your compiler. " + + ("Reason: %s." % details) + + "Compiling may fail because of undefined preprocessor macros.") + + (self.gcc_version, self.ld_version) = \ + get_versions() + self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % + (self.gcc_version, + self.ld_version) ) + + # Hard-code GCC because that's what this is all about. + # XXX optimization, warnings etc. should be customizable. + self.set_executables(compiler='gcc -Zomf -Zmt -O2 -Wall', + compiler_so='gcc -Zomf -Zmt -O2 -Wall', + linker_exe='gcc -Zomf -Zmt -Zcrtdll', + linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') + + # want the gcc library statically linked (so that we don't have + # to distribute a version dependent on the compiler we have) + self.dll_libraries=["gcc"] + + # __init__ () + + # not much different of the compile method in UnixCCompiler, + # but we have to insert some lines in the middle of it, so + # we put here a adapted version of it. + # (If we would call compile() in the base class, it would do some + # initializations a second time, this is why all is done here.) + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) + + # Figure out the options for the compiler command line. + pp_opts = gen_preprocess_options (macros, include_dirs) + cc_args = pp_opts + ['-c'] + if debug: + cc_args[:0] = ['-g'] + if extra_preargs: + cc_args[:0] = extra_preargs + if extra_postargs is None: + extra_postargs = [] + + # Compile all source files that weren't eliminated by + # '_prep_compile()'. + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + self.mkpath (os.path.dirname (obj)) + if ext == '.rc': + # gcc requires '.rc' compiled to binary ('.res') files !!! + try: + self.spawn (["rc","-r",src]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn (self.compiler_so + cc_args + + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + + # Return *all* object filenames, not just the ones we just built. + return objects + + # compile () + + + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): + + # use separate copies, so we can modify the lists + extra_preargs = copy.copy(extra_preargs or []) + libraries = copy.copy(libraries or []) + objects = copy.copy(objects or []) + + # Additional libraries + libraries.extend(self.dll_libraries) + + # handle export symbols by creating a def-file + # with executables this only works with gcc/ld as linker + if ((export_symbols is not None) and + (target_desc != self.EXECUTABLE)): + # (The linker doesn't do anything if output is up-to-date. + # So it would probably better to check if we really need this, + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) + + # we want to put some files in the same directory as the + # object files are, build_temp doesn't help much + # where are the object files + temp_dir = os.path.dirname(objects[0]) + # name of dll to give the helper files the same base name + (dll_name, dll_extension) = os.path.splitext( + os.path.basename(output_filename)) + + # generate the filenames for these files + def_file = os.path.join(temp_dir, dll_name + ".def") + lib_file = os.path.join(temp_dir, dll_name + ".lib") + + # Generate .def file + contents = [ + "LIBRARY %s INITINSTANCE TERMINSTANCE" % os.path.splitext(os.path.basename(output_filename))[0], + "DATA MULTIPLE NONSHARED", + "EXPORTS"] + for sym in export_symbols: + contents.append(' "%s"' % sym) + self.execute(write_file, (def_file, contents), + "writing %s" % def_file) + + # next add options for def-file and to creating import libraries + # for gcc/ld the def-file is specified as any other object files + objects.append(def_file) + + #end: if ((export_symbols is not None) and + # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): + + # who wants symbols and a many times larger output file + # should explicitly switch the debug mode on + # otherwise we let dllwrap/ld strip the output file + # (On my machine: 10KB < stripped_file < ??100KB + # unstripped_file = stripped_file + XXX KB + # ( XXX=254 for a typical python extension)) + if not debug: + extra_preargs.append("-s") + + UnixCCompiler.link(self, + target_desc, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + None, # export_symbols, we do this in our def-file + debug, + extra_preargs, + extra_postargs, + build_temp) + + # link () + + # -- Miscellaneous methods ----------------------------------------- + + # overwrite the one from CCompiler to support rc and res-files + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + # use normcase to make sure '.rc' is really '.rc' and not '.RC' + (base, ext) = os.path.splitext (os.path.normcase(src_name)) + if ext not in (self.src_extensions + ['.rc']): + raise UnknownFileError, \ + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) + if strip_dir: + base = os.path.basename (base) + if ext == '.rc': + # these need to be compiled to object files + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + # object_filenames () + +# class EMXCCompiler + + +# Because these compilers aren't configured in Python's pyconfig.h file by +# default, we should at least warn the user if he is using a unmodified +# version. + +CONFIG_H_OK = "ok" +CONFIG_H_NOTOK = "not ok" +CONFIG_H_UNCERTAIN = "uncertain" + +def check_config_h(): + + """Check if the current Python installation (specifically, pyconfig.h) + appears amenable to building extensions with GCC. Returns a tuple + (status, details), where 'status' is one of the following constants: + CONFIG_H_OK + all is well, go ahead and compile + CONFIG_H_NOTOK + doesn't look good + CONFIG_H_UNCERTAIN + not sure -- unable to read pyconfig.h + 'details' is a human-readable string explaining the situation. + + Note there are two ways to conclude "OK": either 'sys.version' contains + the string "GCC" (implying that this Python was built with GCC), or the + installed "pyconfig.h" contains the string "__GNUC__". + """ + + # XXX since this function also checks sys.version, it's not strictly a + # "pyconfig.h" check -- should probably be renamed... + + from distutils import sysconfig + import string + # if sys.version contains GCC then python was compiled with + # GCC, and the pyconfig.h file should be OK + if string.find(sys.version,"GCC") >= 0: + return (CONFIG_H_OK, "sys.version mentions 'GCC'") + + fn = sysconfig.get_config_h_filename() + try: + # It would probably better to read single lines to search. + # But we do this only once, and it is fast enough + f = open(fn) + s = f.read() + f.close() + + except IOError, exc: + # if we can't read this file, we cannot say it is wrong + # the compiler will complain later about this file as missing + return (CONFIG_H_UNCERTAIN, + "couldn't read '%s': %s" % (fn, exc.strerror)) + + else: + # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar + if string.find(s,"__GNUC__") >= 0: + return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) + else: + return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) + + +def get_versions(): + """ Try to find out the versions of gcc and ld. + If not possible it returns None for it. + """ + from distutils.version import StrictVersion + from distutils.spawn import find_executable + import re + + gcc_exe = find_executable('gcc') + if gcc_exe: + out = os.popen(gcc_exe + ' -dumpversion','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+\.\d+)',out_string) + if result: + gcc_version = StrictVersion(result.group(1)) + else: + gcc_version = None + else: + gcc_version = None + # EMX ld has no way of reporting version number, and we use GCC + # anyway - so we can link OMF DLLs + ld_version = None + return (gcc_version, ld_version) + From e4a3cf2f6d0118090f23e5ed8b9d61afd9b2b6f5 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 8 Feb 2002 14:41:31 +0000 Subject: [PATCH 0788/8469] Make it 1.5.2 compatible again. --- msvccompiler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 35336642ae..79a4901bea 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -117,10 +117,11 @@ def get_msvc_paths (path, version='6.0', platform='x86'): if string.upper(p) == path: V = string.split(v,';') for v in V: - try: - v = v.encode("mbcs") - except UnicodeError: - pass + if hasattr(v, "encode"): + try: + v = v.encode("mbcs") + except UnicodeError: + pass if v == '' or v in L: continue L.append(v) break From ab694beb3331ca6d37bf29f0f783c2cd57c52bb5 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 11 Feb 2002 15:31:50 +0000 Subject: [PATCH 0789/8469] on MacOSX/Darwin, use ranlib when building static libs. --- unixccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 356587d600..7e63c56afe 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,7 +17,7 @@ __revision__ = "$Id$" -import string, re, os +import string, re, os, sys from types import * from copy import copy from distutils import sysconfig @@ -62,6 +62,9 @@ class UnixCCompiler (CCompiler): 'ranlib' : None, } + if sys.platform[:6] == "darwin": + executables['ranlib'] = ["ranlib"] + # Needed for the filename generation methods provided by the base # class, CCompiler. NB. whoever instantiates/uses a particular # UnixCCompiler instance should set 'shared_lib_ext' -- we set a From 32ee66a4511be5b957e95bf1e71f148b611f9736 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 20 Feb 2002 08:01:19 +0000 Subject: [PATCH 0790/8469] First version which runs an install-script (specified by the --install-script ... command line option to bdist_wininst) at the end of the installation and at the start of deinstallation. Output (stdout, stderr) of the script (if any) is displayed in the last screen at installation, or in a simple message box at deinstallation. sys.argv[1] for the script will contain '-install' at installation time or '-remove' at deinstallation time. The installation script runs in an environment (embedded by the bdist_wininst runtime) where an additional function is available as builtin: create_shortcut(path, description, filename, [arguments[, workdir[, iconpath, iconindex]]]) Recreated this file after source changes. --- command/bdist_wininst.py | 668 +++++++++++++++++++++------------------ 1 file changed, 354 insertions(+), 314 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 4a16eec45e..fe52f393dc 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -38,6 +38,9 @@ class bdist_wininst (Command): "title to display on the installer background instead of default"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('install-script=', None, + "installation script to be run after installation" + " or before deinstallation"), ] boolean_options = ['keep-temp'] @@ -52,6 +55,7 @@ def initialize_options (self): self.bitmap = None self.title = None self.skip_build = 0 + self.install_script = None # initialize_options() @@ -71,6 +75,11 @@ def finalize_options (self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + if self.install_script and \ + self.install_script not in self.distribution.scripts: + raise DistutilsOptionError, \ + "install_script '%s' not found in scripts" % self.install_script + # finalize_options() @@ -159,6 +168,8 @@ def get_inidata (self): # The [setup] section contains entries controlling # the installer runtime. lines.append("\n[Setup]") + if self.install_script: + lines.append("install_script=%s" % self.install_script) lines.append("info=%s" % repr(info)[1:-1]) lines.append("target_compile=%d" % (not self.no_target_compile)) lines.append("target_optimize=%d" % (not self.no_target_optimize)) @@ -223,6 +234,17 @@ def get_exe_bytes (self): if __name__ == '__main__': # recreate EXEDATA from wininst.exe by rewriting this file + + # If you want to do this at home, you should: + # - checkout the *distutils* source code + # (see also http://sourceforge.net/cvs/?group_id=5470) + # by doing: + # cvs -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python login + # and + # cvs -z3 -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python co distutils + # - Built wininst.exe from the MSVC project file distutils/misc/wininst.dsw + # - Execute this file (distutils/distutils/command/bdist_wininst.py) + import re, base64 moddata = open("bdist_wininst.py", "r").read() exedata = open("../../misc/wininst.exe", "rb").read() @@ -236,338 +258,356 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -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AAAAAABLRVJORUwzMi5ETEwAQURWQVBJMzIu +ZGxsAENPTUNUTDMyLmRsbABHREkzMi5kbGwATVNWQ1JULmRsbABvbGUzMi5kbGwAVVNFUjMyLmRs +bAAATG9hZExpYnJhcnlBAABHZXRQcm9jQWRkcmVzcwAARXhpdFByb2Nlc3MAAABSZWdDbG9zZUtl +eQAAAFByb3BlcnR5U2hlZXRBAABUZXh0T3V0QQAAZXhpdAAAQ29Jbml0aWFsaXplAABHZXREQwAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAA= +AAAAAAAAAAAAAAAAAAAAAAAA """ # --- EOF --- From 09c86a0df132784f9ed870fd070a8b4f2438659c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 28 Feb 2002 09:16:21 +0000 Subject: [PATCH 0791/8469] Allow shebang's which use versioned Python binaries. Fixes bug #521526. --- command/build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index bfa33c3a10..444284f7cc 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -13,7 +13,7 @@ from distutils.util import convert_path # check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python(\s+.*)?$') +first_line_re = re.compile(r'^#!.*python[0-9.]*(\s+.*)?$') class build_scripts (Command): From 8fd1b1700cffd1092deeb99b2448e2a42217299a Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Mar 2002 23:27:54 +0000 Subject: [PATCH 0792/8469] [Bug #517451] bdist_rpm didn't list all of its Boolean options. (Someone should check the other commands for this same error.) Bugfix candidate. --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 037ed9e8f9..4bc2561324 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -95,7 +95,7 @@ class bdist_rpm (Command): "RPM 2 compatibility mode"), ] - boolean_options = ['keep-temp', 'rpm2-mode'] + boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', From 1e740e80316e36a442707027850bece78e8eb3af Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Mar 2002 23:44:01 +0000 Subject: [PATCH 0793/8469] Add unlisted Boolean options. Thomas H., can you please check that I got this right? Bugfix candidate, unless Thomas notes a problem. --- command/bdist_wininst.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index fe52f393dc..33dc28ed0c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -43,7 +43,8 @@ class bdist_wininst (Command): " or before deinstallation"), ] - boolean_options = ['keep-temp'] + boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', + 'skip-build'] def initialize_options (self): self.bdist_dir = None From 127d81ce6d8d0d8e6c98fe835467cca676ac6e57 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Mar 2002 23:46:54 +0000 Subject: [PATCH 0794/8469] Add missing Boolean options Remove unused no_compile flag Initialize the Boolean attribute .compile to 0 instead of None Bugfix candidate. --- command/install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command/install.py b/command/install.py index 4d78d3aa6f..2a18fb9dee 100644 --- a/command/install.py +++ b/command/install.py @@ -134,7 +134,7 @@ class install (Command): "filename in which to record list of installed files"), ] - boolean_options = ['force', 'skip-build'] + boolean_options = ['compile', 'force', 'skip-build'] negative_opt = {'no-compile' : 'compile'} @@ -164,8 +164,7 @@ def initialize_options (self): self.install_scripts = None self.install_data = None - self.compile = None - self.no_compile = None + self.compile = 0 self.optimize = None # These two are for putting non-packagized distributions into their From b193016d79630c69c5bb7005c4a38a746aa74be2 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 22 Mar 2002 15:35:17 +0000 Subject: [PATCH 0795/8469] Revert part of previous patch: several install_* subcommands expect .compile to be None, and set it to true if it is. Caught by Pearu Peterson. Bugfix candidate, if the previous change is accepted for release22-maint. --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 2a18fb9dee..746ca1f2c3 100644 --- a/command/install.py +++ b/command/install.py @@ -164,7 +164,7 @@ def initialize_options (self): self.install_scripts = None self.install_data = None - self.compile = 0 + self.compile = None self.optimize = None # These two are for putting non-packagized distributions into their From 3f2880bde5a24637ed8dc9e8b534d3855705673c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 29 Mar 2002 18:00:19 +0000 Subject: [PATCH 0796/8469] [Patch #536769] Add -Xcompiler flag for adding arguments and switches for the compiler --- extension.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension.py b/extension.py index a31ccbce8d..3737712016 100644 --- a/extension.py +++ b/extension.py @@ -188,6 +188,8 @@ def read_setup_file (filename): append_next_word = ext.runtime_library_dirs elif word == "-Xlinker": append_next_word = ext.extra_link_args + elif word == "-Xcompiler": + append_next_word = ext.extra_compile_args elif switch == "-u": ext.extra_link_args.append(word) if not value: From fd007b43987507a5ef19f1ba2d9037d1aebf6c4d Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 4 Apr 2002 22:55:58 +0000 Subject: [PATCH 0797/8469] Convert a pile of obvious "yes/no" functions to return bool. --- command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 97d094b1b2..453ca97a09 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -190,9 +190,9 @@ def check_module (self, module, module_file): if not os.path.isfile(module_file): self.warn("file %s (for module %s) not found" % (module_file, module)) - return 0 + return False else: - return 1 + return True # check_module () From 2b6ab4d227f851daa1f17389e45bc5456c3211e6 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 4 Apr 2002 23:17:31 +0000 Subject: [PATCH 0798/8469] Revert 0/1 -> False/True change; I didn't intend to muck w/ distutils. --- command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 453ca97a09..97d094b1b2 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -190,9 +190,9 @@ def check_module (self, module, module_file): if not os.path.isfile(module_file): self.warn("file %s (for module %s) not found" % (module_file, module)) - return False + return 0 else: - return True + return 1 # check_module () From ae4a213ef2fb41949998f6087eeb9797cad3ee71 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 9 Apr 2002 14:14:38 +0000 Subject: [PATCH 0799/8469] Set the warn_dir option to 0 before running the install command. This suppresses bogus warnings about modules installed into a directory not in sys.path. Bugfix candidate. --- command/bdist_dumb.py | 1 + command/bdist_wininst.py | 1 + 2 files changed, 2 insertions(+) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index b627a86a43..a135877a8e 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -81,6 +81,7 @@ def run (self): install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir install.skip_build = self.skip_build + install.warn_dir = 0 self.announce("installing to %s" % self.bdist_dir) self.run_command('install') diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 33dc28ed0c..1683bb31a7 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -98,6 +98,7 @@ def run (self): install = self.reinitialize_command('install') install.root = self.bdist_dir install.skip_build = self.skip_build + install.warn_dir = 0 install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files From 0691960a0fb3b6ce43f5d0c58985371ed2a98d48 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 9 Apr 2002 14:16:07 +0000 Subject: [PATCH 0800/8469] Remove unconditional debugging prints. --- command/bdist.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 68609f346a..99f7d95e5a 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -131,9 +131,6 @@ def run (self): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] - print ("bdist.run: format=%s, command=%s, rest=%s" % - (self.formats[i], cmd_name, commands[i+1:])) - # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: From 668ed0282eeb48450bfbf7800678dcacd6c2e4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Wed, 17 Apr 2002 20:30:10 +0000 Subject: [PATCH 0801/8469] Patch #531901 by Mark W. Alexander: adds a new distutils packager base class (in bdist_packager) and two subclasses which make use of this base class: bdist_pkgtool (for Solaris) and bdist_sdux (for HP-UX). --- command/__init__.py | 5 + command/bdist.py | 11 +- command/bdist_packager.py | 250 +++++++++++++++++++++++ command/bdist_pkgtool.py | 412 ++++++++++++++++++++++++++++++++++++++ command/bdist_sdux.py | 302 ++++++++++++++++++++++++++++ 5 files changed, 976 insertions(+), 4 deletions(-) create mode 100644 command/bdist_packager.py create mode 100644 command/bdist_pkgtool.py create mode 100644 command/bdist_sdux.py diff --git a/command/__init__.py b/command/__init__.py index ef8e9ad694..8143627559 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -21,4 +21,9 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', + 'bdist_sdux', + 'bdist_pkgtool', + # Note: + # bdist_packager is not included because it only provides + # an abstract base class ] diff --git a/command/bdist.py b/command/bdist.py index 99f7d95e5a..f61611eb8d 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -52,7 +52,7 @@ class bdist (Command): ] # The following commands do not take a format option from bdist - no_format_option = ('bdist_rpm',) + no_format_option = ('bdist_rpm', 'bdist_sdux', 'bdist_pkgtool') # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. @@ -62,18 +62,21 @@ class bdist (Command): # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', - 'wininst', 'zip'] + 'wininst', 'zip', 'pkgtool', 'sdux'] # And the real information. format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), - 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'zip': ('bdist_dumb', "ZIP file"), 'gztar': ('bdist_dumb', "gzip'ed tar file"), 'bztar': ('bdist_dumb', "bzip2'ed tar file"), 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), 'wininst': ('bdist_wininst', "Windows executable installer"), 'zip': ('bdist_dumb', "ZIP file"), - } + 'pkgtool': ('bdist_pkgtool', + "Solaris pkgtool distribution"), + 'sdux': ('bdist_sdux', "HP-UX swinstall depot"), + } def initialize_options (self): diff --git a/command/bdist_packager.py b/command/bdist_packager.py new file mode 100644 index 0000000000..a812307e73 --- /dev/null +++ b/command/bdist_packager.py @@ -0,0 +1,250 @@ +"""distutils.command.bdist_ packager + +Modified from bdist_dumb by Mark W. Alexander + +Implements the Distutils 'bdist_packager' abstract command +to be subclassed by binary package creation commands.""" + + +__revision__ = "$Id: bdist_packager.py,v 0.1 2001/04/4 mwa" + +import os +from distutils.core import Command +from distutils.util import get_platform +from distutils.dir_util import create_tree, remove_tree +from distutils.file_util import write_file +from distutils.errors import * +import string, sys + +class bdist_packager (Command): + + description = "abstract base for package manager specific bdist commands" + +# XXX update user_options + user_options = [ + ('bdist-base=', None, + "base directory for creating built distributions"), + ('pkg-dir=', None, + "base directory for creating binary packages (defaults to \"binary\" under "), + ('dist-dir=', 'd', + "directory to put final RPM files in " + "(and .spec files if --spec-only)"), + ('category=', None, + "Software category (packager dependent format)"), + ('revision=', None, + "package revision number"), + # the following have moved into the distribution class + #('packager=', None, + #"Package maintainer"), + #('packager-mail=', None, + #"Package maintainer's email address"), + #('author=', None, + #"Package author"), + #('author-mail=', None, + #"Package author's email address"), + #('license=', None, + #"License code"), + #('licence=', None, + #"alias for license"), + ('icon=', None, + "Package icon"), + ('subpackages=', None, + "Comma seperated list of seperately packaged trees"), + ('preinstall=', None, + "preinstall script (Bourne shell code)"), + ('postinstall=', None, + "postinstall script (Bourne shell code)"), + ('preremove=', None, + "preremove script (Bourne shell code)"), + ('postremove=', None, + "postremove script (Bourne shell code)"), + ('requires=', None, + "capabilities required by this package"), + ('keep-temp', 'k', + "don't clean up RPM build directory"), + ('control-only', None, + "Generate package control files and stop"), + ('no-autorelocate', None, + "Inhibit automatic relocation to installed site-packages"), + ] + + boolean_options = ['keep-temp', 'control-only', 'no_autorelocate'] + + def ensure_string_not_none (self,option,default=None): + val = getattr(self,option) + if val is not None: + return + Command.ensure_string(self,option,default) + val = getattr(self,option) + if val is None: + raise DistutilsOptionError, "'%s' must be provided" % option + + def ensure_script (self,arg): + if not arg: + return + try: + self.ensure_string(arg, None) + except: + try: + self.ensure_filename(arg, None) + except: + raise RuntimeError, \ + "cannot decipher script option (%s)" \ + % arg + + def write_script (self,path,attr,default=None): + """ write the script specified in attr to path. if attr is None, + write use default instead """ + val = getattr(self,attr) + if not val: + if not default: + return + else: + setattr(self,attr,default) + val = default + if val!="": + self.announce('Creating %s script', attr) + self.execute(write_file, + (path, self.get_script(attr)), + "writing '%s'" % path) + + def get_binary_name(self): + py_ver = sys.version[0:string.find(sys.version,' ')] + return self.name + '-' + self.version + '-' + \ + self.revision + '-' + py_ver + + def get_script (self,attr): + # accept a script as a string ("line\012line\012..."), + # a filename, or a list + # XXX We could probably get away with copy_file, but I'm + # guessing this will be more flexible later on.... + val = getattr(self,attr) + ret=None + if val: + try: + os.stat(val) + # script is a file + ret=[] + f=open(val) + ret=string.split(f.read(),"\012"); + f.close() + #return ret + except: + if type(val)==type(""): + # script is a string + ret = string.split(val,"\012") + elif type(val)==type([]): + # script is a list + ret = val + else: + raise RuntimeError, \ + "cannot figure out what to do with 'request' option (%s)" \ + % val + return ret + + + def initialize_options (self): + d = self.distribution + self.keep_temp = 0 + self.control_only = 0 + self.no_autorelocate = 0 + self.pkg_dir = None + self.plat_name = None + self.icon = None + self.requires = None + self.subpackages = None + self.category = None + self.revision = None + + # PEP 241 Metadata + self.name = None + self.version = None + #self.url = None + #self.author = None + #self.author_email = None + #self.maintainer = None + #self.maintainer_email = None + #self.description = None + #self.long_description = None + #self.licence = None + #self.platforms = None + #self.keywords = None + self.root_package = None + + # package installation scripts + self.preinstall = None + self.postinstall = None + self.preremove = None + self.postremove = None + # initialize_options() + + + def finalize_options (self): + + if self.pkg_dir is None: + bdist_base = self.get_finalized_command('bdist').bdist_base + self.pkg_dir = os.path.join(bdist_base, 'binary') + + if not self.plat_name: + d = self.distribution + self.plat = d.get_platforms() + if self.distribution.has_ext_modules(): + self.plat_name = [sys.platform,] + else: + self.plat_name = ["noarch",] + + d = self.distribution + self.ensure_string_not_none('name', d.get_name()) + self.ensure_string_not_none('version', d.get_version()) + self.ensure_string('category') + self.ensure_string('revision',"1") + #self.ensure_string('url',d.get_url()) + if type(self.distribution.packages) == type([]): + self.root_package=self.distribution.packages[0] + else: + self.root_package=self.name + self.ensure_string('root_package',self.root_package) + #self.ensure_string_list('keywords') + #self.ensure_string_not_none('author', d.get_author()) + #self.ensure_string_not_none('author_email', d.get_author_email()) + self.ensure_filename('icon') + #self.ensure_string_not_none('maintainer', d.get_maintainer()) + #self.ensure_string_not_none('maintainer_email', + #d.get_maintainer_email()) + #self.ensure_string_not_none('description', d.get_description()) + #self.ensure_string_not_none('long_description', d.get_long_description()) + #if self.long_description=='UNKNOWN': + #self.long_description=self.description + #self.ensure_string_not_none('license', d.get_license()) + self.ensure_string_list('requires') + self.ensure_filename('preinstall') + self.ensure_filename('postinstall') + self.ensure_filename('preremove') + self.ensure_filename('postremove') + + # finalize_options() + + + def run (self): + + raise RuntimeError, \ + "abstract method -- subclass %s must override" % self.__class__ + self.run_command('build') + + install = self.reinitialize_command('install', reinit_subcommands=1) + install.root = self.pkg_dir + + self.announce("installing to %s" % self.pkg_dir) + self.run_command('install') + + # And make an archive relative to the root of the + # pseudo-installation tree. + archive_basename = "%s.%s" % (self.distribution.get_fullname(), + self.plat_name) + + if not self.keep_temp: + remove_tree(self.pkg_dir, self.verbose, self.dry_run) + + # run() + +# class bdist_packager diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py new file mode 100644 index 0000000000..fc035ebde4 --- /dev/null +++ b/command/bdist_pkgtool.py @@ -0,0 +1,412 @@ +"""distutils.command.bdist_pkgtool + + +Author: Mark W. Alexander + +Implements the Distutils 'bdist_pkgtool' command (create Solaris pkgtool +distributions).""" + +import os, string, sys, pwd, grp +import glob +from types import * +from distutils.core import Command, DEBUG +from distutils.util import get_platform +from distutils.file_util import write_file +from distutils.errors import * +from distutils.command import bdist_packager +from distutils import sysconfig +import compileall +from commands import getoutput + +__revision__ = "$Id: bdist_pkgtool.py,v 0.3 mwa " + +# default request script - Is also wrapped around user's request script +# unless --no-autorelocate is requested. Finds the python site-packages +# directory and prompts for verification +DEFAULT_REQUEST="""#!/bin/sh +###################################################################### +# Distutils internal package relocation support # +###################################################################### + +PRODUCT="__DISTUTILS_NAME__" + +trap `exit 3` 15 +/usr/bin/which python 2>&1 >/dev/null +if [ $? -ne 0 ]; then + echo "The python interpretor needs to be on your path!" + echo + echo "If you have more than one, make sure the first one is where" + echo "you want this module installed:" + exit 1 +fi + +PY_DIR=`python -c "import sys;print '%s/lib/python%s' % (sys.exec_prefix,sys.version[0:3])" 2>/dev/null` +PY_PKG_DIR=`python -c "import sys;print '%s/lib/python%s/site-packages' % (sys.exec_prefix,sys.version[0:3])" 2>/dev/null` + +echo "" +if [ -z "${PY_DIR}" ]; then + echo "I can't seem to find the python distribution." + echo "I'm assuming the default path for site-packages" +else + BASEDIR="${PY_PKG_DIR}" + cat <&1 >/dev/null +if [ $? -ne 0 ]; then + echo "The python interpretor needs to be on your path!" + echo + echo "If you have more than one, make sure the first one is where" + echo "you want this module removed from" + exit 1 +fi + +/usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ +if [ $? -eq 0 ]; then + find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyc" -exec rm {} \; + find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyo" -exec rm {} \; +fi +""" + +# default postremove removes the module directory _IF_ no files are +# there (Turns out this isn't needed if the preremove does it's job +# Left for posterity +DEFAULT_POSTREMOVE="""#!/bin/sh + +/usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ +if [ $? -eq 0 ]; then + if [ `find ${BASEDIR}/__DISTUTILS_NAME__ ! -type d | wc -l` -eq 0 ]; then + rm -rf ${BASEDIR}/__DISTUTILS_NAME__ + fi +fi +""" + +class bdist_pkgtool (bdist_packager.bdist_packager): + + description = "create an pkgtool (Solaris) package" + + user_options = bdist_packager.bdist_packager.user_options + [ + ('revision=', None, + "package revision number (PSTAMP)"), + ('pkg-abrev=', None, + "Abbreviation (9 characters or less) of the package name"), + ('compver=', None, + "file containing compatible versions of this package (man compver)"), + ('depend=', None, + "file containing dependencies for this package (man depend)"), + #('category=', None, + #"Software category"), + ('request=', None, + "request script (Bourne shell code)"), + ] + + def initialize_options (self): + # XXX Check for pkgtools on path... + bdist_packager.bdist_packager.initialize_options(self) + self.compver = None + self.depend = None + self.vendor = None + self.classes = None + self.request = None + self.pkg_abrev = None + self.revision = None + # I'm not sure I should need to do this, but the setup.cfg + # settings weren't showing up.... + options = self.distribution.get_option_dict('bdist_packager') + for key in options.keys(): + setattr(self,key,options[key][1]) + + # initialize_options() + + + def finalize_options (self): + global DEFAULT_REQUEST, DEFAULT_POSTINSTALL + global DEFAULT_PREREMOVE, DEFAULT_POSTREMOVE + if self.pkg_dir is None: + dist_dir = self.get_finalized_command('bdist').dist_dir + self.pkg_dir = os.path.join(dist_dir, "pkgtool") + + self.ensure_string('classes', None) + self.ensure_string('revision', "1") + self.ensure_script('request') + self.ensure_script('preinstall') + self.ensure_script('postinstall') + self.ensure_script('preremove') + self.ensure_script('postremove') + self.ensure_string('vendor', None) + if self.__dict__.has_key('author'): + if self.__dict__.has_key('author_email'): + self.ensure_string('vendor', + "%s <%s>" % (self.author, + self.author_email)) + else: + self.ensure_string('vendor', + "%s" % (self.author)) + self.ensure_string('category', "System,application") + self.ensure_script('compver') + self.ensure_script('depend') + bdist_packager.bdist_packager.finalize_options(self) + if self.pkg_abrev is None: + self.pkg_abrev=self.name + if len(self.pkg_abrev)>9: + raise DistutilsOptionError, \ + "pkg-abrev (%s) must be less than 9 characters" % self.pkg_abrev + # Update default scripts with our metadata name + DEFAULT_REQUEST = string.replace(DEFAULT_REQUEST, + "__DISTUTILS_NAME__", self.root_package) + DEFAULT_POSTINSTALL = string.replace(DEFAULT_POSTINSTALL, + "__DISTUTILS_NAME__", self.root_package) + DEFAULT_PREREMOVE = string.replace(DEFAULT_PREREMOVE, + "__DISTUTILS_NAME__", self.root_package) + DEFAULT_POSTREMOVE = string.replace(DEFAULT_POSTREMOVE, + "__DISTUTILS_NAME__", self.root_package) + + # finalize_options() + + + def make_package(self,root=None): + # make directories + self.mkpath(self.pkg_dir) + if root: + pkg_dir = self.pkg_dir+"/"+root + self.mkpath(pkg_dir) + else: + pkg_dir = self.pkg_dir + + install = self.reinitialize_command('install', reinit_subcommands=1) + # build package + self.announce('Building package') + self.run_command('build') + self.announce('Creating pkginfo file') + path = os.path.join(pkg_dir, "pkginfo") + self.execute(write_file, + (path, + self._make_info_file()), + "writing '%s'" % path) + # request script handling + if self.request==None: + self.request = self._make_request_script() + if self.request!="": + path = os.path.join(pkg_dir, "request") + self.execute(write_file, + (path, + self.request), + "writing '%s'" % path) + + # Create installation scripts, since compver & depend are + # user created files, they work just fine as scripts + self.write_script(os.path.join(pkg_dir, "postinstall"), + 'postinstall',DEFAULT_POSTINSTALL) + self.write_script(os.path.join(pkg_dir, "preinstall"), + 'preinstall',None) + self.write_script(os.path.join(pkg_dir, "preremove"), + 'preremove',DEFAULT_PREREMOVE) + self.write_script(os.path.join(pkg_dir, "postremove"), + 'postremove',None) + self.write_script(os.path.join(pkg_dir, "compver"), + 'compver',None) + self.write_script(os.path.join(pkg_dir, "depend"), + 'depend',None) + + self.announce('Creating prototype file') + path = os.path.join(pkg_dir, "prototype") + self.execute(write_file, + (path, + self._make_prototype()), + "writing '%s'" % path) + + + if self.control_only: # stop if requested + return + + + self.announce('Creating package') + pkg_cmd = ['pkgmk', '-o', '-f'] + pkg_cmd.append(path) + pkg_cmd.append('-b') + pkg_cmd.append(os.environ['PWD']) + self.spawn(pkg_cmd) + pkg_cmd = ['pkgtrans', '-s', '/var/spool/pkg'] + path = os.path.join(os.environ['PWD'],pkg_dir, + self.get_binary_name() + ".pkg") + self.announce('Transferring package to ' + pkg_dir) + pkg_cmd.append(path) + pkg_cmd.append(self.pkg_abrev) + self.spawn(pkg_cmd) + os.system("rm -rf /var/spool/pkg/%s" % self.pkg_abrev) + + + def run (self): + if self.subpackages: + self.subpackages=string.split(self.subpackages,",") + for pkg in self.subpackages: + self.make_package(subpackage) + else: + self.make_package() + # run() + + + def _make_prototype(self): + proto_file = ["i pkginfo"] + if self.request: + proto_file.extend(['i request']) + if self.postinstall: + proto_file.extend(['i postinstall']) + if self.postremove: + proto_file.extend(['i postremove']) + if self.preinstall: + proto_file.extend(['i preinstall']) + if self.preremove: + proto_file.extend(['i preremove']) + if self.compver: + proto_file.extend(['i compver']) + if self.requires: + proto_file.extend(['i depend']) + proto_file.extend(['!default 644 root bin']) + build = self.get_finalized_command('build') + + try: + self.distribution.packages[0] + file_list=string.split( + getoutput("pkgproto %s/%s=%s" % (build.build_lib, + self.distribution.packages[0], + self.distribution.packages[0])),"\012") + except: + file_list=string.split( + getoutput("pkgproto %s=" % (build.build_lib)),"\012") + ownership="%s %s" % (pwd.getpwuid(os.getuid())[0], + grp.getgrgid(os.getgid())[0]) + for i in range(len(file_list)): + file_list[i] = string.replace(file_list[i],ownership,"root bin") + proto_file.extend(file_list) + return proto_file + + def _make_request_script(self): + global DEFAULT_REQUEST + # A little different from other scripts, if we are to automatically + # relocate to the target site-packages, we have to wrap any provided + # script with the autorelocation script. If no script is provided, + # The request script will simply be the autorelocate script + if self.no_autorelocate==0: + request=string.split(DEFAULT_REQUEST,"\012") + else: + self.announce('Creating relocation request script') + if self.request: + users_request=self.get_script('request') + if users_request!=None and users_request!=[]: + if self.no_autorelocate==0 and users_request[0][0:2]=="#!": + users_request.remove(users_request[0]) + for i in users_request: + request.append(i) + + if self.no_autorelocate==0: + request.append("#############################################") + request.append("# finalize relocation support #") + request.append("#############################################") + request.append('echo "BASEDIR=\\"${BASEDIR}\\"" >>$1') + return request + + def _make_info_file(self): + """Generate the text of a pkgtool info file and return it as a + list of strings (one per line). + """ + # definitions and headers + # PKG must be alphanumeric, < 9 characters + info_file = [ + 'PKG="%s"' % self.pkg_abrev, + 'NAME="%s"' % self.name, + 'VERSION="%s"' % self.version, + 'PSTAMP="%s"' % self.revision, + ] + info_file.extend(['VENDOR="%s (%s)"' % (self.distribution.maintainer, \ + self.distribution.license) ]) + info_file.extend(['EMAIL="%s"' % self.distribution.maintainer_email ]) + + p = self.distribution.get_platforms() + if p is None or p==['UNKNOWN']: + archs=getoutput('uname -p') + else: + archs=string.join(self.distribution.get_platforms(),',') + #else: + #print "Assuming a sparc architecure" + #archs='sparc' + info_file.extend(['ARCH="%s"' % archs ]) + + if self.distribution.get_url(): + info_file.extend(['HOTLINE="%s"' % self.distribution.get_url() ]) + if self.classes: + info_file.extend(['CLASSES="%s"' % self.classes ]) + if self.category: + info_file.extend(['CATEGORY="%s"' % self.category ]) + site=None + for i in sys.path: + if i[-13:]=="site-packages": + site=i + break + if site: + info_file.extend(['BASEDIR="%s"' % site ]) + + return info_file + + # _make_info_file () + + def _format_changelog(self, changelog): + """Format the changelog correctly and convert it to a list of strings + """ + if not changelog: + return changelog + new_changelog = [] + for line in string.split(string.strip(changelog), '\n'): + line = string.strip(line) + if line[0] == '*': + new_changelog.extend(['', line]) + elif line[0] == '-': + new_changelog.append(line) + else: + new_changelog.append(' ' + line) + + # strip trailing newline inserted by first changelog entry + if not new_changelog[0]: + del new_changelog[0] + + return new_changelog + + # _format_changelog() + +# class bdist_rpm diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py new file mode 100644 index 0000000000..985a37a57b --- /dev/null +++ b/command/bdist_sdux.py @@ -0,0 +1,302 @@ +"""distutils.command.bdist_pkgtool + +Implements the Distutils 'bdist_sdux' command to create HP-UX +swinstall depot""" + +# Mark Alexander + +__revision__ = "$Id: bdist_sdux.py,v 0.2 " +import os, string +import glob +from types import * +from distutils.core import Command, DEBUG +from distutils.util import get_platform +from distutils.file_util import write_file +from distutils.errors import * +from distutils.command import bdist_packager +import sys +from commands import getoutput + +DEFAULT_CHECKINSTALL="""#!/bin/sh +/usr/bin/which python 2>&1 >/dev/null +if [ $? -ne 0 ]; then + echo "ERROR: Python must be on your PATH" &>2 + echo "ERROR: (You may need to link it to /usr/bin) " &>2 + exit 1 +fi +PY_DIR=`python -c "import sys;print '%s/lib/python%s' % (sys.exec_prefix,sys.version[0:3])" #2>/dev/null` +PY_PKG_DIR=`python -c "import sys;print '%s/lib/python%s/site-packages' % (sys.exec_prefix,sys.version[0:3])" #2>/dev/null` +PY_LIB_DIR=`dirname $PY_PKG_DIR` + +if [ "`dirname ${SW_LOCATION}`" = "__DISTUTILS_PKG_DIR__" ]; then + # swinstall to default location + if [ "${PY_PKG_DIR}" != "__DISTUTILS_PKG_DIR__" ]; then + echo "ERROR: " &>2 + echo "ERROR: Python is not installed where this package expected!" &>2 + echo "ERROR: You need to manually relocate this package to your python installation." &>2 + echo "ERROR: " &>2 + echo "ERROR: Re-run swinstall specifying the product name:location, e.g.:" &>2 + echo "ERROR: " &>2 + echo "ERROR: swinstall -s [source] __DISTUTILS_NAME__:${PY_PKG_DIR}/__DISTUTILS_DIRNAME__" &>2 + echo "ERROR: " &>2 + echo "ERROR: to relocate this package to match your python installation" &>2 + echo "ERROR: " &>2 + exit 1 + fi +else + if [ "`dirname ${SW_LOCATION}`" != "${PY_PKG_DIR}" -a "`dirname ${SWLOCATION}`" != "${PY_LIB_DIR}" ]; then + echo "WARNING: " &>2 + echo "WARNING: Package is being installed outside the 'normal' python search path!" &>2 + echo "WARNING: Add ${SW_LOCATION} to PYTHONPATH to use this package" &>2 + echo "WARNING: " &>2 + fi +fi +""" + +DEFAULT_POSTINSTALL="""#!/bin/sh +/usr/bin/which python 2>&1 >/dev/null +if [ $? -ne 0 ]; then + echo "ERROR: Python must be on your PATH" &>2 + echo "ERROR: (You may need to link it to /usr/bin) " &>2 + exit 1 +fi +python -c "import compileall;compileall.compile_dir(\\"${SW_LOCATION}\\")" +""" + +DEFAULT_PREREMOVE="""#!/bin/sh +# remove compiled bytecode files +find ${SW_LOCATION} -name "*.pyc" -exec rm {} \; +find ${SW_LOCATION} -name "*.pyo" -exec rm {} \; +""" + +DEFAULT_POSTREMOVE="""#!/bin/sh +if [ `find ${SW_LOCATION} ! -type d | wc -l` -eq 0 ]; then + # remove if there's nothing but empty directories left + rm -rf ${SW_LOCATION} +fi +""" + +class bdist_sdux(bdist_packager.bdist_packager): + + description = "create an HP swinstall depot" + + user_options = bdist_packager.bdist_packager.user_options + [ + #('revision=', None, + #"package revision number (PSTAMP)"), + ('keep-permissions', None, + "Don't reset permissions and ownership to root/bin"), # XXX + ('corequisites=', None, + "corequisites"), # XXX + ('prerequisites=', None, + "prerequisites"), # XXX + #('category=', None, + #"Software category"), + ('checkinstall=', None, # XXX ala request + "checkinstall script (Bourne shell code)"), + ('configure=', None, # XXX + "configure script (Bourne shell code)"), + ('unconfigure=', None, # XXX + "unconfigure script (Bourne shell code)"), + ('verify=', None, # XXX + "verify script (Bourne shell code)"), + ('unpreinstall=', None, # XXX + "unpreinstall script (Bourne shell code)"), + ('unpostinstall=', None, # XXX + "unpostinstall script (Bourne shell code)"), + ] + + boolean_options = ['keep-permissions'] + + def initialize_options (self): + bdist_packager.bdist_packager.initialize_options(self) + self.corequisites = None + self.prerequesites = None + self.checkinstall = None + self.configure = None + self.unconfigure = None + self.verify = None + self.unpreinstall = None + self.unpostinstall = None + # More + self.copyright = None + self.readme = None + self.machine_type = None + self.os_name = None + self.os_release = None + self.directory = None + self.readme = None + self.copyright = None + self.architecture= None + self.keep_permissions= None + options = self.distribution.get_option_dict('bdist_packager') + for key in options.keys(): + setattr(self,key,options[key][1]) + + # initialize_options() + + + def finalize_options (self): + global DEFAULT_CHECKINSTALL, DEFAULT_POSTINSTALL + global DEFAULT_PREREMOVE, DEFAULT_POSTREMOVE + if self.pkg_dir==None: + dist_dir = self.get_finalized_command('bdist').dist_dir + self.pkg_dir = os.path.join(dist_dir, "sdux") + self.ensure_script('corequisites') + self.ensure_script('prerequesites') + self.ensure_script('checkinstall') + self.ensure_script('configure') + self.ensure_script('unconfigure') + self.ensure_script('verify') + self.ensure_script('unpreinstall') + self.ensure_script('unpostinstall') + self.ensure_script('copyright') + self.ensure_script('readme') + self.ensure_string('machine_type','*') + if not self.__dict__.has_key('platforms'): + # This is probably HP, but if it's not, use sys.platform + if sys.platform[0:5] == "hp-ux": + self.platforms = "HP-UX" + else: + self.platforms = string.upper(sys.platform) + else: + # we can only handle one + self.platforms=string.join(self.platforms[0]) + self.ensure_string('os_release','*') + self.ensure_string('directory','%s/lib/python%s/site-packages' % \ + (sys.exec_prefix, sys.version[0:3])) + bdist_packager.bdist_packager.finalize_options(self) + DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, + "__DISTUTILS_NAME__", self.name) + DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, + "__DISTUTILS_DIRNAME__", self.root_package) + DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, + "__DISTUTILS_PKG_DIR__", self.directory) + DEFAULT_POSTINSTALL = string.replace(DEFAULT_POSTINSTALL, + "__DISTUTILS_DIRNAME__", self.root_package) + #DEFAULT_PREREMOVE = string.replace(DEFAULT_PREREMOVE, + #"__DISTUTILS_NAME__", self.root_package) + #DEFAULT_POSTREMOVE = string.replace(DEFAULT_POSTREMOVE, + #"__DISTUTILS_NAME__", self.root_package) + # finalize_options() + + def run (self): + # make directories + self.mkpath(self.pkg_dir) + psf_path = os.path.join(self.pkg_dir, + "%s.psf" % self.get_binary_name()) + # build package + self.announce('Building package') + self.run_command('build') + self.announce('Creating psf file') + self.execute(write_file, + (psf_path, + self._make_control_file()), + "writing '%s'" % psf_path) + if self.control_only: # stop if requested + return + + self.announce('Creating package') + spawn_cmd = ['swpackage', '-s'] + spawn_cmd.append(psf_path) + spawn_cmd.append('-x') + spawn_cmd.append('target_type=tape') + spawn_cmd.append('@') + spawn_cmd.append(self.pkg_dir+"/"+self.get_binary_name()+'.depot') + self.spawn(spawn_cmd) + + # run() + + + def _make_control_file(self): + # Generate a psf file and return it as list of strings (one per line). + # definitions and headers + title = "%s %s" % (self.maintainer,self.maintainer_email) + title=title[0:80] + #top=self.distribution.packages[0] + psf_file = [ + 'vendor', # Vendor information + ' tag %s' % "DISTUTILS", + ' title %s' % title, + ' description Distutils package maintainer (%s)' % self.license, + 'end', # end of vendor + 'product', # Product information + ' tag %s' % self.name, + ' title %s' % self.description, + ' description %s' % self.description, + ' revision %s' % self.version, + ' architecture %s' % self.platforms, + ' machine_type %s' % self.machine_type, + ' os_name %s' % self.platforms, + ' os_release %s' % self.os_release, + ' directory %s' % self.directory + "/" + self.root_package, + ] + + self.write_script(os.path.join(self.pkg_dir, "checkinstall"), + 'checkinstall',DEFAULT_CHECKINSTALL) + psf_file.extend([' checkinstall %s/checkinstall' % self.pkg_dir]) + self.write_script(os.path.join(self.pkg_dir, "postinstall"), + 'postinstall',DEFAULT_POSTINSTALL) + psf_file.extend([' postinstall %s/postinstall' % self.pkg_dir]) + self.write_script(os.path.join(self.pkg_dir, "preremove"), + 'preremove',DEFAULT_PREREMOVE) + psf_file.extend([' preremove %s/preremove' % self.pkg_dir]) + self.write_script(os.path.join(self.pkg_dir, "postremove"), + 'postremove',DEFAULT_POSTREMOVE) + psf_file.extend([' postremove %s/postremove' % self.pkg_dir]) + if self.preinstall: + self.write_script(self.pkg_dir+"/preinstall", 'preinstall', None) + psf_file.extend([' preinstall %s/preinstall' % self.pkg_dir]) + if self.configure: + self.write_script(self.pkg_dir+"/configure", 'configure', None) + psf_file.extend([' configure %s/configure' % self.pkg_dir]) + if self.unconfigure: + self.write_script(self.pkg_dir+"/unconfigure", 'unconfigure', None) + psf_file.extend([' unconfigure %s/unconfigure' % self.pkg_dir]) + if self.verify: + self.write_script(self.pkg_dir+"/verify", 'verify', None) + psf_file.extend([' verify %s/verify' % self.pkg_dir]) + if self.unpreinstall: + self.write_script(self.pkg_dir+"/unpreinstall", 'unpreinstall', None) + psf_file.extend([' unpreinstall %s/unpreinstall' % self.pkg_dir]) + if self.unpostinstall: + self.write_script(self.pkg_dir+"/unpostinstall", 'unpostinstall', None) + psf_file.extend([' unpostinstall %s/unpostinstall' % self.pkg_dir]) + psf_file.extend([' is_locatable true']) + #if self.long_description: + #psf_file.extend([self.long_description]) + if self.copyright: + # XX make a copyright file XXX + write_script('copyright') + psf_file.extend([' copyright Date: Tue, 23 Apr 2002 18:18:43 +0000 Subject: [PATCH 0802/8469] Whitespace normalization. Unka Timmy would be proud. --- command/bdist_packager.py | 12 ++--- command/bdist_pkgtool.py | 102 +++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/command/bdist_packager.py b/command/bdist_packager.py index a812307e73..667c03069e 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -2,7 +2,7 @@ Modified from bdist_dumb by Mark W. Alexander -Implements the Distutils 'bdist_packager' abstract command +Implements the Distutils 'bdist_packager' abstract command to be subclassed by binary package creation commands.""" @@ -33,7 +33,7 @@ class bdist_packager (Command): "Software category (packager dependent format)"), ('revision=', None, "package revision number"), - # the following have moved into the distribution class + # the following have moved into the distribution class #('packager=', None, #"Package maintainer"), #('packager-mail=', None, @@ -199,10 +199,10 @@ def finalize_options (self): self.ensure_string('category') self.ensure_string('revision',"1") #self.ensure_string('url',d.get_url()) - if type(self.distribution.packages) == type([]): - self.root_package=self.distribution.packages[0] - else: - self.root_package=self.name + if type(self.distribution.packages) == type([]): + self.root_package=self.distribution.packages[0] + else: + self.root_package=self.name self.ensure_string('root_package',self.root_package) #self.ensure_string_list('keywords') #self.ensure_string_not_none('author', d.get_author()) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index fc035ebde4..a36638a92c 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -23,7 +23,7 @@ # default request script - Is also wrapped around user's request script # unless --no-autorelocate is requested. Finds the python site-packages # directory and prompts for verification -DEFAULT_REQUEST="""#!/bin/sh +DEFAULT_REQUEST="""#!/bin/sh ###################################################################### # Distutils internal package relocation support # ###################################################################### @@ -34,7 +34,7 @@ /usr/bin/which python 2>&1 >/dev/null if [ $? -ne 0 ]; then echo "The python interpretor needs to be on your path!" - echo + echo echo "If you have more than one, make sure the first one is where" echo "you want this module installed:" exit 1 @@ -45,26 +45,26 @@ echo "" if [ -z "${PY_DIR}" ]; then - echo "I can't seem to find the python distribution." - echo "I'm assuming the default path for site-packages" + echo "I can't seem to find the python distribution." + echo "I'm assuming the default path for site-packages" else - BASEDIR="${PY_PKG_DIR}" - cat <&1 >/dev/null if [ $? -ne 0 ]; then echo "The python interpretor needs to be on your path!" - echo + echo echo "If you have more than one, make sure the first one is where" echo "you want this module removed from" exit 1 @@ -99,8 +99,8 @@ /usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ if [ $? -eq 0 ]; then - find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyc" -exec rm {} \; - find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyo" -exec rm {} \; + find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyc" -exec rm {} \; + find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyo" -exec rm {} \; fi """ @@ -111,9 +111,9 @@ /usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ if [ $? -eq 0 ]; then - if [ `find ${BASEDIR}/__DISTUTILS_NAME__ ! -type d | wc -l` -eq 0 ]; then - rm -rf ${BASEDIR}/__DISTUTILS_NAME__ - fi + if [ `find ${BASEDIR}/__DISTUTILS_NAME__ ! -type d | wc -l` -eq 0 ]; then + rm -rf ${BASEDIR}/__DISTUTILS_NAME__ + fi fi """ @@ -171,13 +171,13 @@ def finalize_options (self): self.ensure_script('postremove') self.ensure_string('vendor', None) if self.__dict__.has_key('author'): - if self.__dict__.has_key('author_email'): - self.ensure_string('vendor', - "%s <%s>" % (self.author, - self.author_email)) - else: - self.ensure_string('vendor', - "%s" % (self.author)) + if self.__dict__.has_key('author_email'): + self.ensure_string('vendor', + "%s <%s>" % (self.author, + self.author_email)) + else: + self.ensure_string('vendor', + "%s" % (self.author)) self.ensure_string('category', "System,application") self.ensure_script('compver') self.ensure_script('depend') @@ -188,7 +188,7 @@ def finalize_options (self): raise DistutilsOptionError, \ "pkg-abrev (%s) must be less than 9 characters" % self.pkg_abrev # Update default scripts with our metadata name - DEFAULT_REQUEST = string.replace(DEFAULT_REQUEST, + DEFAULT_REQUEST = string.replace(DEFAULT_REQUEST, "__DISTUTILS_NAME__", self.root_package) DEFAULT_POSTINSTALL = string.replace(DEFAULT_POSTINSTALL, "__DISTUTILS_NAME__", self.root_package) @@ -243,7 +243,7 @@ def make_package(self,root=None): 'compver',None) self.write_script(os.path.join(pkg_dir, "depend"), 'depend',None) - + self.announce('Creating prototype file') path = os.path.join(pkg_dir, "prototype") self.execute(write_file, @@ -263,14 +263,14 @@ def make_package(self,root=None): pkg_cmd.append(os.environ['PWD']) self.spawn(pkg_cmd) pkg_cmd = ['pkgtrans', '-s', '/var/spool/pkg'] - path = os.path.join(os.environ['PWD'],pkg_dir, - self.get_binary_name() + ".pkg") + path = os.path.join(os.environ['PWD'],pkg_dir, + self.get_binary_name() + ".pkg") self.announce('Transferring package to ' + pkg_dir) pkg_cmd.append(path) pkg_cmd.append(self.pkg_abrev) self.spawn(pkg_cmd) os.system("rm -rf /var/spool/pkg/%s" % self.pkg_abrev) - + def run (self): if self.subpackages: @@ -281,7 +281,7 @@ def run (self): self.make_package() # run() - + def _make_prototype(self): proto_file = ["i pkginfo"] if self.request: @@ -302,15 +302,15 @@ def _make_prototype(self): build = self.get_finalized_command('build') try: - self.distribution.packages[0] - file_list=string.split( - getoutput("pkgproto %s/%s=%s" % (build.build_lib, - self.distribution.packages[0], - self.distribution.packages[0])),"\012") + self.distribution.packages[0] + file_list=string.split( + getoutput("pkgproto %s/%s=%s" % (build.build_lib, + self.distribution.packages[0], + self.distribution.packages[0])),"\012") except: - file_list=string.split( - getoutput("pkgproto %s=" % (build.build_lib)),"\012") - ownership="%s %s" % (pwd.getpwuid(os.getuid())[0], + file_list=string.split( + getoutput("pkgproto %s=" % (build.build_lib)),"\012") + ownership="%s %s" % (pwd.getpwuid(os.getuid())[0], grp.getgrgid(os.getgid())[0]) for i in range(len(file_list)): file_list[i] = string.replace(file_list[i],ownership,"root bin") @@ -324,7 +324,7 @@ def _make_request_script(self): # script with the autorelocation script. If no script is provided, # The request script will simply be the autorelocate script if self.no_autorelocate==0: - request=string.split(DEFAULT_REQUEST,"\012") + request=string.split(DEFAULT_REQUEST,"\012") else: self.announce('Creating relocation request script') if self.request: @@ -334,7 +334,7 @@ def _make_request_script(self): users_request.remove(users_request[0]) for i in users_request: request.append(i) - + if self.no_autorelocate==0: request.append("#############################################") request.append("# finalize relocation support #") @@ -355,12 +355,12 @@ def _make_info_file(self): 'PSTAMP="%s"' % self.revision, ] info_file.extend(['VENDOR="%s (%s)"' % (self.distribution.maintainer, \ - self.distribution.license) ]) + self.distribution.license) ]) info_file.extend(['EMAIL="%s"' % self.distribution.maintainer_email ]) - + p = self.distribution.get_platforms() - if p is None or p==['UNKNOWN']: - archs=getoutput('uname -p') + if p is None or p==['UNKNOWN']: + archs=getoutput('uname -p') else: archs=string.join(self.distribution.get_platforms(),',') #else: @@ -381,7 +381,7 @@ def _make_info_file(self): break if site: info_file.extend(['BASEDIR="%s"' % site ]) - + return info_file # _make_info_file () @@ -400,11 +400,11 @@ def _format_changelog(self, changelog): new_changelog.append(line) else: new_changelog.append(' ' + line) - + # strip trailing newline inserted by first changelog entry if not new_changelog[0]: del new_changelog[0] - + return new_changelog # _format_changelog() From 6bb5291d452462b4170a9a8d3630dcf66aa020d7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 25 Apr 2002 17:03:30 +0000 Subject: [PATCH 0803/8469] Fix trivial typo. --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index f4fc4bcbae..f8d13c0e03 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -319,7 +319,7 @@ def set_link_objects (self, objects): self.objects = copy (objects) - # -- Priviate utility methods -------------------------------------- + # -- Private utility methods -------------------------------------- # (here for the convenience of subclasses) def _fix_compile_args (self, output_dir, macros, include_dirs): From cad65ba14e067657c1756b023f522c2a0e3ac0af Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 25 Apr 2002 17:26:37 +0000 Subject: [PATCH 0804/8469] Append the PC specific include 'PC' and library 'PCBuild' directories under NT - this allows distutils to work with the CVS version or the source distribution. Wrap a long line. --- command/build_ext.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 91fee5ee6e..ddbd03e28c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -167,6 +167,11 @@ def finalize_options (self): else: self.build_temp = os.path.join(self.build_temp, "Release") + # Append the source distribution include and library directories, + # this allows distutils on windows to work in the source tree + self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory if os.name == 'os2': @@ -177,7 +182,9 @@ def finalize_options (self): if sys.platform[:6] == 'cygwin': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions - self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + sys.version[:3], "config")) + self.library_dirs.append(os.path.join(sys.prefix, "lib", + "python" + sys.version[:3], + "config")) else: # building python standard extensions self.library_dirs.append('.') From 33b72ce75455b7b892efa9aa682a7c35e42ea1da Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 25 Apr 2002 17:29:45 +0000 Subject: [PATCH 0805/8469] Pass the full pathname to MSVC when compiling a debug version. This allows the debugger to find the source without asking the user to browse for it. --- msvccompiler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 79a4901bea..73cd44258c 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -309,6 +309,12 @@ def compile (self, else: self.mkpath (os.path.dirname (obj)) + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + if ext in self._c_extensions: input_opt = "/Tc" + src elif ext in self._cpp_extensions: From f40275a1996a3dd768fd1d2f4e96e4f3e1c3dfd6 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 6 May 2002 13:57:19 +0000 Subject: [PATCH 0806/8469] Prevent convert_path from crashing if the path is an empty string. Bugfix candidate. --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index a51ce6601d..d079588a91 100644 --- a/util.py +++ b/util.py @@ -84,9 +84,9 @@ def convert_path (pathname): """ if os.sep == '/': return pathname - if pathname[0] == '/': + if pathname and pathname[0] == '/': raise ValueError, "path '%s' cannot be absolute" % pathname - if pathname[-1] == '/': + if pathname and pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname paths = string.split(pathname, '/') From e5820caf234ff9c9feaf90519f64a6c7800ca5d6 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 30 May 2002 19:15:16 +0000 Subject: [PATCH 0807/8469] Remove unneeded import --- command/install_lib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 029528e995..03b44ee9ef 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,7 +6,6 @@ from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError -from distutils.dir_util import copy_tree class install_lib (Command): From 6b571cfed1d5d0e7d955f4f177e9e4dabc631a1b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 4 Jun 2002 15:28:21 +0000 Subject: [PATCH 0808/8469] When using a Python that has not been installed to build 3rd-party modules, distutils does not understand that the build version of the source tree is needed. This patch fixes distutils.sysconfig to understand that the running Python is part of the build tree and needs to use the appropriate "shape" of the tree. This does not assume anything about the current directory, so can be used to build 3rd-party modules using Python's build tree as well. This is useful since it allows us to use a non-installed debug-mode Python with 3rd-party modules for testing. It as the side-effect that set_python_build() is no longer needed (the hack which was added to allow distutils to be used to build the "standard" extension modules). This closes SF patch #547734. --- sysconfig.py | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d773f14905..3e323533b6 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -23,19 +23,20 @@ PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -# Boolean; if it's true, we're still building Python, so -# we use different (hard-wired) directories. - -python_build = 0 - -def set_python_build(): - """Set the python_build flag to true. - - This means that we're building Python itself. Only called from - the setup.py script shipped with Python. - """ - global python_build +# python_build: (Boolean) if true, we're either building Python or +# building an extension with an un-installed Python, so we use +# different (hard-wired) directories. + +argv0_path = os.path.dirname(os.path.abspath(sys.executable)) +landmark = os.path.join(argv0_path, "Modules", "Setup") +if not os.path.isfile(landmark): + python_build = 0 +elif os.path.isfile(os.path.join(argv0_path, "Lib", "os.py")): python_build = 1 +else: + python_build = os.path.isfile(os.path.join(os.path.dirname(argv0_path), + "Lib", "os.py")) +del argv0_path, landmark def get_python_inc(plat_specific=0, prefix=None): @@ -53,7 +54,14 @@ def get_python_inc(plat_specific=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: - return "Include/" + base = os.path.dirname(os.path.abspath(sys.executable)) + if plat_specific: + inc_dir = base + else: + inc_dir = os.path.join(base, "Include") + if not os.path.exists(inc_dir): + inc_dir = os.path.join(os.path.dirname(base), "Include") + return inc_dir return os.path.join(prefix, "include", "python" + sys.version[:3]) elif os.name == "nt": return os.path.join(prefix, "include") @@ -163,7 +171,7 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return './Makefile' + return os.path.join(os.path.dirname(sys.executable), "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") From bbf5c4f0008d7aa45284910f87a2ee7179ee8f0d Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 18:55:54 +0000 Subject: [PATCH 0809/8469] The comment said: # XXX this isn't used anywhere, and worse, it has the same name as a method # in Command with subtly different semantics. (This one just has one # source -> one dest; that one has many sources -> one dest.) Nuke it? Yes. Nuke it. --- dep_util.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/dep_util.py b/dep_util.py index 9edba4c8ae..bbb6d235b3 100644 --- a/dep_util.py +++ b/dep_util.py @@ -93,23 +93,3 @@ def newer_group (sources, target, missing='error'): return 0 # newer_group () - - -# XXX this isn't used anywhere, and worse, it has the same name as a method -# in Command with subtly different semantics. (This one just has one -# source -> one dest; that one has many sources -> one dest.) Nuke it? -def make_file (src, dst, func, args, - verbose=0, update_message=None, noupdate_message=None): - """Makes 'dst' from 'src' (both filenames) by calling 'func' with - 'args', but only if it needs to: i.e. if 'dst' does not exist or 'src' - is newer than 'dst'. - """ - if newer(src, dst): - if verbose and update_message: - print update_message - apply(func, args) - else: - if verbose and noupdate_message: - print noupdate_message - -# make_file () From 6b2531b43f67643c8bf7cc2552159d8f0aaf4081 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:00:26 +0000 Subject: [PATCH 0810/8469] A simple log mechanism styled after the proposed std library module --- log.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 log.py diff --git a/log.py b/log.py new file mode 100644 index 0000000000..f0a7865067 --- /dev/null +++ b/log.py @@ -0,0 +1,56 @@ +"""A simple log mechanism styled after PEP 282.""" + +# The class here is styled after PEP 282 so that it could later be +# replaced with a standard Python logging implementation. + +DEBUG = 1 +INFO = 2 +WARN = 3 +ERROR = 4 +FATAL = 5 + +class Log: + + def __init__(self, threshold=WARN): + self.threshold = threshold + + def _log(self, level, msg, args): + if level >= self.threshold: + print msg % args + + def log(self, level, msg, *args): + self._log(level, msg, args) + + def debug(self, msg, *args): + self._log(DEBUG, msg, args) + + def info(self, msg, *args): + self._log(INFO, msg, args) + + def warn(self, msg, *args): + self._log(WARN, msg, args) + + def error(self, msg, *args): + self._log(ERROR, msg, args) + + def fatal(self, msg, *args): + self._log(FATAL, msg, args) + +_global_log = Log() +log = _global_log.log +debug = _global_log.debug +info = _global_log.info +warn = _global_log.warn +error = _global_log.error +fatal = _global_log.fatal + +def set_threshold(level): + _global_log.threshold = level + +def set_verbosity(v): + if v == 0: + set_threshold(WARN) + if v == 1: + set_threshold(INFO) + if v == 2: + set_threshold(DEBUG) From fcaddaa4cfd26c0f07bfbb4dbf41760334d5d788 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:14:43 +0000 Subject: [PATCH 0811/8469] Make setup.py less chatty by default. This is a conservative version of SF patch 504889. It uses the log module instead of calling print in various places, and it ignores the verbose argument passed to many functions and set as an attribute on some objects. Instead, it uses the verbosity set on the logger via the command line. The log module is now preferred over announce() and warn() methods that exist only for backwards compatibility. XXX This checkin changes a lot of modules that have no test suite and aren't exercised by the Python build process. It will need substantial testing. --- archive_util.py | 28 +++++++++--------- bcppcompiler.py | 12 ++++---- ccompiler.py | 19 +++++++------ cmd.py | 51 +++++++++++++++------------------ command/bdist_dumb.py | 5 ++-- command/bdist_packager.py | 9 +++--- command/bdist_pkgtool.py | 13 +++++---- command/bdist_rpm.py | 3 +- command/bdist_sdux.py | 7 +++-- command/bdist_wininst.py | 7 +++-- command/build_clib.py | 5 ++-- command/build_ext.py | 18 ++++++------ command/build_py.py | 17 ++++------- command/build_scripts.py | 7 +++-- command/clean.py | 15 +++++----- command/config.py | 14 ++++----- command/install_lib.py | 8 ++---- command/install_scripts.py | 5 ++-- command/sdist.py | 37 ++++++++---------------- core.py | 6 +++- cygwinccompiler.py | 3 +- dir_util.py | 31 +++++++++----------- dist.py | 16 ++++------- emxccompiler.py | 3 +- fancy_getopt.py | 57 +++++++++++++++++++------------------ file_util.py | 23 ++++++--------- filelist.py | 58 ++++++++++++++++---------------------- msvccompiler.py | 7 +++-- mwerkscompiler.py | 17 +++++------ spawn.py | 20 ++++++------- unixccompiler.py | 7 +++-- util.py | 45 ++++++++++++----------------- 32 files changed, 260 insertions(+), 313 deletions(-) diff --git a/archive_util.py b/archive_util.py index 58d9a062e1..47fac0cb7d 100644 --- a/archive_util.py +++ b/archive_util.py @@ -11,6 +11,7 @@ from distutils.errors import DistutilsExecError from distutils.spawn import spawn from distutils.dir_util import mkpath +from distutils import log def make_tarball (base_name, base_dir, compress="gzip", verbose=0, dry_run=0): @@ -42,13 +43,13 @@ def make_tarball (base_name, base_dir, compress="gzip", "bad value for 'compress': must be None, 'gzip', or 'compress'" archive_name = base_name + ".tar" - mkpath(os.path.dirname(archive_name), verbose=verbose, dry_run=dry_run) + mkpath(os.path.dirname(archive_name), dry_run=dry_run) cmd = ["tar", "-cf", archive_name, base_dir] - spawn(cmd, verbose=verbose, dry_run=dry_run) + spawn(cmd, dry_run=dry_run) if compress: spawn([compress] + compress_flags[compress] + [archive_name], - verbose=verbose, dry_run=dry_run) + dry_run=dry_run) return archive_name + compress_ext[compress] else: return archive_name @@ -69,10 +70,10 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): # no changes needed! zip_filename = base_name + ".zip" - mkpath(os.path.dirname(zip_filename), verbose=verbose, dry_run=dry_run) + mkpath(os.path.dirname(zip_filename), dry_run=dry_run) try: spawn(["zip", "-rq", zip_filename, base_dir], - verbose=verbose, dry_run=dry_run) + dry_run=dry_run) except DistutilsExecError: # XXX really should distinguish between "couldn't find @@ -89,10 +90,10 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename - if verbose: - print "creating '%s' and adding '%s' to it" % \ - (zip_filename, base_dir) - + + log.info("creating '%s' and adding '%s' to it", + zip_filename, base_dir) + def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) @@ -141,8 +142,7 @@ def make_archive (base_name, format, """ save_cwd = os.getcwd() if root_dir is not None: - if verbose: - print "changing into '%s'" % root_dir + log.debug("changing into '%s'", root_dir) base_name = os.path.abspath(base_name) if not dry_run: os.chdir(root_dir) @@ -150,8 +150,7 @@ def make_archive (base_name, format, if base_dir is None: base_dir = os.curdir - kwargs = { 'verbose': verbose, - 'dry_run': dry_run } + kwargs = { 'dry_run': dry_run } try: format_info = ARCHIVE_FORMATS[format] @@ -164,8 +163,7 @@ def make_archive (base_name, format, filename = apply(func, (base_name, base_dir), kwargs) if root_dir is not None: - if verbose: - print "changing back to '%s'" % save_cwd + log.debug("changing back to '%s'", save_cwd) os.chdir(save_cwd) return filename diff --git a/bcppcompiler.py b/bcppcompiler.py index 9ebba2d85b..019244cd16 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -22,6 +22,7 @@ CCompiler, gen_preprocess_options, gen_lib_options from distutils.file_util import write_file from distutils.dep_util import newer +from distutils import log class BCPPCompiler(CCompiler) : """Concrete class that implements an interface to the Borland C/C++ @@ -108,7 +109,7 @@ def compile (self, ext = (os.path.splitext (src))[1] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: src = os.path.normpath(src) obj = os.path.normpath(obj) @@ -178,7 +179,7 @@ def create_static_lib (self, except DistutilsExecError, msg: raise LibError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -205,8 +206,8 @@ def link (self, self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) if runtime_library_dirs: - self.warn ("I don't know what to do with 'runtime_library_dirs': " - + str (runtime_library_dirs)) + log.warn("I don't know what to do with 'runtime_library_dirs': %s", + str(runtime_library_dirs)) if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -285,7 +286,6 @@ def link (self, if libfile is None: ld_args.append(lib) # probably a BCPP internal library -- don't warn - # self.warn('library %s not found.' % lib) else: # full name which prefers bcpp_xxx.lib over xxx.lib ld_args.append(libfile) @@ -313,7 +313,7 @@ def link (self, raise LinkError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # link () diff --git a/ccompiler.py b/ccompiler.py index f8d13c0e03..4c8b881c3a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -16,7 +16,7 @@ from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group from distutils.util import split_quoted, execute - +from distutils import log class CCompiler: """Abstract base class to define the interface that must be implemented @@ -80,7 +80,6 @@ def __init__ (self, dry_run=0, force=0): - self.verbose = verbose self.dry_run = dry_run self.force = force @@ -808,8 +807,7 @@ def library_filename (self, # -- Utility methods ----------------------------------------------- def announce (self, msg, level=1): - if self.verbose >= level: - print msg + log.debug(msg) def debug_print (self, msg): from distutils.core import DEBUG @@ -820,16 +818,16 @@ def warn (self, msg): sys.stderr.write ("warning: %s\n" % msg) def execute (self, func, args, msg=None, level=1): - execute(func, args, msg, self.verbose >= level, self.dry_run) + execute(func, args, msg, self.dry_run) def spawn (self, cmd): - spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) + spawn (cmd, dry_run=self.dry_run) def move_file (self, src, dst): - return move_file (src, dst, verbose=self.verbose, dry_run=self.dry_run) + return move_file (src, dst, dry_run=self.dry_run) def mkpath (self, name, mode=0777): - mkpath (name, mode, self.verbose, self.dry_run) + mkpath (name, mode, self.dry_run) # class CCompiler @@ -957,7 +955,10 @@ def new_compiler (plat=None, ("can't compile C/C++ code: unable to find class '%s' " + "in module '%s'") % (class_name, module_name) - return klass (verbose, dry_run, force) + # XXX The None is necessary to preserve backwards compatibility + # with classes that expect verbose to be the first positional + # argument. + return klass (None, dry_run, force) def gen_preprocess_options (macros, include_dirs): diff --git a/cmd.py b/cmd.py index 65060d6700..25ff3025b6 100644 --- a/cmd.py +++ b/cmd.py @@ -13,7 +13,7 @@ from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util - +from distutils import log class Command: """Abstract base class for defining command classes, the "worker bees" @@ -72,11 +72,15 @@ def __init__ (self, dist): # commands fallback on the Distribution's behaviour. None means # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real - # value of each flag is a touch complicated -- hence "self.verbose" - # (etc.) will be handled by __getattr__, below. - self._verbose = None + # value of each flag is a touch complicated -- hence "self._dry_run" + # will be handled by __getattr__, below. + # XXX This needs to be fixed. self._dry_run = None + # verbose is largely ignored, but needs to be set for + # backwards compatibility (I think)? + self.verbose = dist.verbose + # Some commands define a 'self.force' option to ignore file # timestamps, but methods defined *here* assume that # 'self.force' exists for all commands. So define it here @@ -96,8 +100,10 @@ def __init__ (self, dist): # __init__ () + # XXX A more explicit way to customize dry_run would be better. + def __getattr__ (self, attr): - if attr in ('verbose', 'dry_run'): + if attr == 'dry_run': myval = getattr(self, "_" + attr) if myval is None: return getattr(self.distribution, attr) @@ -186,9 +192,7 @@ def announce (self, msg, level=1): """If the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout. """ - if self.verbose >= level: - print msg - sys.stdout.flush() + log.debug(msg) def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the @@ -352,12 +356,11 @@ def warn (self, msg): def execute (self, func, args, msg=None, level=1): - util.execute(func, args, msg, self.verbose >= level, self.dry_run) + util.execute(func, args, msg, dry_run=self.dry_run) def mkpath (self, name, mode=0777): - dir_util.mkpath(name, mode, - self.verbose, self.dry_run) + dir_util.mkpath(name, mode, dry_run=self.dry_run) def copy_file (self, infile, outfile, @@ -371,8 +374,7 @@ def copy_file (self, infile, outfile, preserve_mode, preserve_times, not self.force, link, - self.verbose >= level, - self.dry_run) + dry_run=self.dry_run) def copy_tree (self, infile, outfile, @@ -385,30 +387,21 @@ def copy_tree (self, infile, outfile, infile, outfile, preserve_mode,preserve_times,preserve_symlinks, not self.force, - self.verbose >= level, - self.dry_run) - + dry_run=self.dry_run) def move_file (self, src, dst, level=1): - """Move a file respecting verbose and dry-run flags.""" - return file_util.move_file(src, dst, - self.verbose >= level, - self.dry_run) - + """Move a file respectin dry-run flag.""" + return file_util.move_file(src, dst, dry_run = self.dry_run) def spawn (self, cmd, search_path=1, level=1): - """Spawn an external command respecting verbose and dry-run flags.""" + """Spawn an external command respecting dry-run flag.""" from distutils.spawn import spawn - spawn(cmd, search_path, - self.verbose >= level, - self.dry_run) - + spawn(cmd, search_path, dry_run= self.dry_run) def make_archive (self, base_name, format, root_dir=None, base_dir=None): return archive_util.make_archive( - base_name, format, root_dir, base_dir, - self.verbose, self.dry_run) + base_name, format, root_dir, base_dir, dry_run=self.dry_run) def make_file (self, infiles, outfile, func, args, @@ -443,7 +436,7 @@ def make_file (self, infiles, outfile, func, args, # Otherwise, print the "skip" message else: - self.announce(skip_msg, level) + log.debug(skip_msg) # make_file () diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index a135877a8e..712fec884e 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -13,6 +13,7 @@ from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * +from distutils import log class bdist_dumb (Command): @@ -83,7 +84,7 @@ def run (self): install.skip_build = self.skip_build install.warn_dir = 0 - self.announce("installing to %s" % self.bdist_dir) + log.info("installing to %s" % self.bdist_dir) self.run_command('install') # And make an archive relative to the root of the @@ -101,7 +102,7 @@ def run (self): root_dir=self.bdist_dir) if not self.keep_temp: - remove_tree(self.bdist_dir, self.verbose, self.dry_run) + remove_tree(self.bdist_dir, dry_run=self.dry_run) # run() diff --git a/command/bdist_packager.py b/command/bdist_packager.py index 667c03069e..11278ee28b 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -14,6 +14,7 @@ from distutils.dir_util import create_tree, remove_tree from distutils.file_util import write_file from distutils.errors import * +from distutils import log import string, sys class bdist_packager (Command): @@ -102,8 +103,8 @@ def write_script (self,path,attr,default=None): else: setattr(self,attr,default) val = default - if val!="": - self.announce('Creating %s script', attr) + if val != "": + log.info('Creating %s script', attr) self.execute(write_file, (path, self.get_script(attr)), "writing '%s'" % path) @@ -234,7 +235,7 @@ def run (self): install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.pkg_dir - self.announce("installing to %s" % self.pkg_dir) + log.info("installing to %s", self.pkg_dir) self.run_command('install') # And make an archive relative to the root of the @@ -243,7 +244,7 @@ def run (self): self.plat_name) if not self.keep_temp: - remove_tree(self.pkg_dir, self.verbose, self.dry_run) + remove_tree(self.pkg_dir, dry_run=self.dry_run) # run() diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index a36638a92c..4fd95012a2 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -15,6 +15,7 @@ from distutils.errors import * from distutils.command import bdist_packager from distutils import sysconfig +from distutils import log import compileall from commands import getoutput @@ -211,9 +212,9 @@ def make_package(self,root=None): install = self.reinitialize_command('install', reinit_subcommands=1) # build package - self.announce('Building package') + log.info('Building package') self.run_command('build') - self.announce('Creating pkginfo file') + log.info('Creating pkginfo file') path = os.path.join(pkg_dir, "pkginfo") self.execute(write_file, (path, @@ -244,7 +245,7 @@ def make_package(self,root=None): self.write_script(os.path.join(pkg_dir, "depend"), 'depend',None) - self.announce('Creating prototype file') + log.info('Creating prototype file') path = os.path.join(pkg_dir, "prototype") self.execute(write_file, (path, @@ -256,7 +257,7 @@ def make_package(self,root=None): return - self.announce('Creating package') + log.info('Creating package') pkg_cmd = ['pkgmk', '-o', '-f'] pkg_cmd.append(path) pkg_cmd.append('-b') @@ -265,7 +266,7 @@ def make_package(self,root=None): pkg_cmd = ['pkgtrans', '-s', '/var/spool/pkg'] path = os.path.join(os.environ['PWD'],pkg_dir, self.get_binary_name() + ".pkg") - self.announce('Transferring package to ' + pkg_dir) + log.info('Transferring package to ' + pkg_dir) pkg_cmd.append(path) pkg_cmd.append(self.pkg_abrev) self.spawn(pkg_cmd) @@ -326,7 +327,7 @@ def _make_request_script(self): if self.no_autorelocate==0: request=string.split(DEFAULT_REQUEST,"\012") else: - self.announce('Creating relocation request script') + log.info('Creating relocation request script') if self.request: users_request=self.get_script('request') if users_request!=None and users_request!=[]: diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 4bc2561324..808ddc14cb 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -14,6 +14,7 @@ from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * +from distutils import log class bdist_rpm (Command): @@ -278,7 +279,7 @@ def run (self): # build package - self.announce('building RPMs') + log.info("building RPMs") rpm_cmd = ['rpm'] if self.source_only: # what kind of RPMs? rpm_cmd.append('-bs') diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py index 985a37a57b..e4765f97df 100644 --- a/command/bdist_sdux.py +++ b/command/bdist_sdux.py @@ -14,6 +14,7 @@ from distutils.file_util import write_file from distutils.errors import * from distutils.command import bdist_packager +from distutils import log import sys from commands import getoutput @@ -185,9 +186,9 @@ def run (self): psf_path = os.path.join(self.pkg_dir, "%s.psf" % self.get_binary_name()) # build package - self.announce('Building package') + log.info('Building package') self.run_command('build') - self.announce('Creating psf file') + log.info('Creating psf file') self.execute(write_file, (psf_path, self._make_control_file()), @@ -195,7 +196,7 @@ def run (self): if self.control_only: # stop if requested return - self.announce('Creating package') + log.info('Creating package') spawn_cmd = ['swpackage', '-s'] spawn_cmd.append(psf_path) spawn_cmd.append('-x') diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 1683bb31a7..6a985f190b 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -12,6 +12,7 @@ from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * +from distutils import log class bdist_wininst (Command): @@ -115,7 +116,7 @@ def run (self): 'install_' + key, value) - self.announce("installing to %s" % self.bdist_dir) + log.info("installing to %s", self.bdist_dir) install.ensure_finalized() # avoid warning of 'install_lib' about installing @@ -136,11 +137,11 @@ def run (self): # create an exe containing the zip-file self.create_exe(arcname, fullname, self.bitmap) # remove the zip-file again - self.announce("removing temporary file '%s'" % arcname) + log.debug("removing temporary file '%s'", arcname) os.remove(arcname) if not self.keep_temp: - remove_tree(self.bdist_dir, self.verbose, self.dry_run) + remove_tree(self.bdist_dir, dry_run=self.dry_run) # run() diff --git a/command/build_clib.py b/command/build_clib.py index b659147b26..f0207e4e0f 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -24,7 +24,7 @@ from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler - +from distutils import log def show_compilers (): from distutils.ccompiler import show_compilers @@ -111,7 +111,6 @@ def run (self): # Yech -- this is cut 'n pasted from build_ext.py! from distutils.ccompiler import new_compiler self.compiler = new_compiler(compiler=self.compiler, - verbose=self.verbose, dry_run=self.dry_run, force=self.force) customize_compiler(self.compiler) @@ -213,7 +212,7 @@ def build_libraries (self, libraries): "a list of source filenames") % lib_name sources = list(sources) - self.announce("building '%s' library" % lib_name) + log.info("building '%s' library", lib_name) # First, compile the source code to object files in the library # directory. (This should probably change to putting object diff --git a/command/build_ext.py b/command/build_ext.py index ddbd03e28c..89ca1dc9b8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -15,6 +15,7 @@ from distutils.sysconfig import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils import log # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). @@ -291,9 +292,9 @@ def check_extensions_list (self, extensions): # by Extension constructor) (ext_name, build_info) = ext - self.warn(("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name)) + log.warn(("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name)) if type(ext) is not TupleType and len(ext) != 2: raise DistutilsSetupError, \ ("each element of 'ext_modules' option must be an " @@ -329,8 +330,8 @@ def check_extensions_list (self, extensions): # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') if build_info.has_key('def_file'): - self.warn("'def_file' element of build info dict " - "no longer supported") + log.warn("'def_file' element of build info dict " + "no longer supported") # Non-trivial stuff: 'macros' split into 'define_macros' # and 'undef_macros'. @@ -422,11 +423,10 @@ def build_extension(self, ext): self.get_ext_filename(fullname)) if not (self.force or newer_group(sources, ext_filename, 'newer')): - self.announce("skipping '%s' extension (up-to-date)" % - ext.name) + log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: - self.announce("building '%s' extension" % ext.name) + log.info("building '%s' extension", ext.name) # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list @@ -539,7 +539,7 @@ def swig_sources (self, sources): for source in swig_sources: target = swig_targets[source] - self.announce("swigging %s to %s" % (source, target)) + log.info("swigging %s to %s", source, target) self.spawn(swig_cmd + ["-o", target, source]) return new_sources diff --git a/command/build_py.py b/command/build_py.py index 97d094b1b2..388d3cbc9e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -13,7 +13,7 @@ from distutils.core import Command from distutils.errors import * from distutils.util import convert_path - +from distutils import log class build_py (Command): @@ -176,8 +176,8 @@ def check_package (self, package, package_dir): if os.path.isfile(init_py): return init_py else: - self.warn(("package init file '%s' not found " + - "(or not a regular file)") % init_py) + log.warn(("package init file '%s' not found " + + "(or not a regular file)"), init_py) # Either not in a package at all (__init__.py not expected), or # __init__.py doesn't exist -- so don't return the filename. @@ -188,8 +188,7 @@ def check_package (self, package, package_dir): def check_module (self, module, module_file): if not os.path.isfile(module_file): - self.warn("file %s (for module %s) not found" % - (module_file, module)) + log.warn("file %s (for module %s) not found", module_file, module) return 0 else: return 1 @@ -389,13 +388,9 @@ def byte_compile (self, files): if self.compile: byte_compile(files, optimize=0, - force=self.force, - prefix=prefix, - verbose=self.verbose, dry_run=self.dry_run) + force=self.force, prefix=prefix, dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, - force=self.force, - prefix=prefix, - verbose=self.verbose, dry_run=self.dry_run) + force=self.force, prefix=prefix, dry_run=self.dry_run) # class build_py diff --git a/command/build_scripts.py b/command/build_scripts.py index 444284f7cc..211ade40fa 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -11,6 +11,7 @@ from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path +from distutils import log # check if Python is called on the first line with this expression first_line_re = re.compile(r'^#!.*python[0-9.]*(\s+.*)?$') @@ -59,7 +60,7 @@ def copy_scripts (self): outfile = os.path.join(self.build_dir, os.path.basename(script)) if not self.force and not newer(script, outfile): - self.announce("not copying %s (up-to-date)" % script) + log.debug("not copying %s (up-to-date)", script) continue # Always open the file, but ignore failures in dry-run mode -- @@ -83,8 +84,8 @@ def copy_scripts (self): post_interp = match.group(1) or '' if adjust: - self.announce("copying and adjusting %s -> %s" % - (script, self.build_dir)) + log.info("copying and adjusting %s -> %s", script, + self.build_dir) if not self.dry_run: outf = open(outfile, "w") if not sysconfig.python_build: diff --git a/command/clean.py b/command/clean.py index b4a9be45f8..8fddeb453a 100644 --- a/command/clean.py +++ b/command/clean.py @@ -9,6 +9,7 @@ import os from distutils.core import Command from distutils.dir_util import remove_tree +from distutils import log class clean (Command): @@ -51,10 +52,10 @@ def run(self): # remove the build/temp. directory (unless it's already # gone) if os.path.exists(self.build_temp): - remove_tree(self.build_temp, self.verbose, self.dry_run) + remove_tree(self.build_temp, dry_run=self.dry_run) else: - self.warn("'%s' does not exist -- can't clean it" % - self.build_temp) + log.warn("'%s' does not exist -- can't clean it", + self.build_temp) if self.all: # remove build directories @@ -62,17 +63,17 @@ def run(self): self.bdist_base, self.build_scripts): if os.path.exists(directory): - remove_tree(directory, self.verbose, self.dry_run) + remove_tree(directory, dry_run=self.dry_run) else: - self.warn("'%s' does not exist -- can't clean it" % - directory) + log.warn("'%s' does not exist -- can't clean it", + directory) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care if not self.dry_run: try: os.rmdir(self.build_base) - self.announce("removing '%s'" % self.build_base) + log.info("removing '%s'", self.build_base) except OSError: pass diff --git a/command/config.py b/command/config.py index 27c2cc1512..d74aa6a277 100644 --- a/command/config.py +++ b/command/config.py @@ -17,7 +17,7 @@ from types import * from distutils.core import Command from distutils.errors import DistutilsExecError - +from distutils import log LANG_EXT = {'c': '.c', 'c++': '.cxx'} @@ -103,9 +103,7 @@ def _check_compiler (self): from distutils.ccompiler import CCompiler, new_compiler if not isinstance(self.compiler, CCompiler): self.compiler = new_compiler(compiler=self.compiler, - verbose=self.noisy, - dry_run=self.dry_run, - force=1) + dry_run=self.dry_run, force=1) if self.include_dirs: self.compiler.set_include_dirs(self.include_dirs) if self.libraries: @@ -161,7 +159,7 @@ def _clean (self, *filenames): if not filenames: filenames = self.temp_files self.temp_files = [] - self.announce("removing: " + string.join(filenames)) + log.info("removing: %s", string.join(filenames)) for filename in filenames: try: os.remove(filename) @@ -239,7 +237,7 @@ def try_compile (self, body, headers=None, include_dirs=None, lang="c"): except CompileError: ok = 0 - self.announce(ok and "success!" or "failure.") + log.info(ok and "success!" or "failure.") self._clean() return ok @@ -260,7 +258,7 @@ def try_link (self, body, except (CompileError, LinkError): ok = 0 - self.announce(ok and "success!" or "failure.") + log.info(ok and "success!" or "failure.") self._clean() return ok @@ -282,7 +280,7 @@ def try_run (self, body, except (CompileError, LinkError, DistutilsExecError): ok = 0 - self.announce(ok and "success!" or "failure.") + log.info(ok and "success!" or "failure.") self._clean() return ok diff --git a/command/install_lib.py b/command/install_lib.py index 03b44ee9ef..1e771c619e 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -124,13 +124,11 @@ def byte_compile (self, files): if self.compile: byte_compile(files, optimize=0, - force=self.force, - prefix=install_root, - verbose=self.verbose, dry_run=self.dry_run) + force=self.force, prefix=install_root, + dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, - force=self.force, - prefix=install_root, + force=self.force, prefix=install_root, verbose=self.verbose, dry_run=self.dry_run) diff --git a/command/install_scripts.py b/command/install_scripts.py index d4cbaa3a0a..4044ba092b 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -9,6 +9,7 @@ import os from distutils.core import Command +from distutils import log from stat import ST_MODE class install_scripts (Command): @@ -48,10 +49,10 @@ def run (self): # all the scripts we just installed. for file in self.get_outputs(): if self.dry_run: - self.announce("changing mode of %s" % file) + log.info("changing mode of %s to %o", file, mode) else: mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777 - self.announce("changing mode of %s to %o" % (file, mode)) + log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) def get_inputs (self): diff --git a/command/sdist.py b/command/sdist.py index fbd3c6d200..082aa88ce3 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -14,6 +14,7 @@ from distutils.text_file import TextFile from distutils.errors import * from distutils.filelist import FileList +from distutils import log def show_formats (): @@ -233,31 +234,17 @@ def get_file_list (self): self.warn(("manifest template '%s' does not exist " + "(using default file list)") % self.template) - self.filelist.findall() - # Add default file set to 'files' if self.use_defaults: self.add_defaults() - - # Read manifest template if it exists if template_exists: self.read_template() - - # Prune away any directories that don't belong in the source - # distribution if self.prune: self.prune_file_list() - # File list now complete -- sort it so that higher-level files - # come first self.filelist.sort() - - # Remove duplicates from the file list self.filelist.remove_duplicates() - - # And write complete file list (including default file set) to - # the manifest. self.write_manifest() # Don't regenerate the manifest, just read it in. @@ -321,13 +308,12 @@ def add_defaults (self): def read_template (self): + """Read and parse manifest template file named by self.template. - """Read and parse the manifest template file named by - 'self.template' (usually "MANIFEST.in"). The parsing and - processing is done by 'self.filelist', which updates itself - accordingly. + (usually "MANIFEST.in") The parsing and processing is done by + 'self.filelist', which updates itself accordingly. """ - self.announce("reading manifest template '%s'" % self.template) + log.info("reading manifest template '%s'", self.template) template = TextFile(self.template, strip_comments=1, skip_blanks=1, @@ -384,7 +370,7 @@ def read_manifest (self): fill in 'self.filelist', the list of files to include in the source distribution. """ - self.announce("reading manifest file '%s'" % self.manifest) + log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest) while 1: line = manifest.readline() @@ -410,8 +396,7 @@ def make_release_tree (self, base_dir, files): # put 'files' there; the 'mkpath()' is just so we don't die # if the manifest happens to be empty. self.mkpath(base_dir) - dir_util.create_tree(base_dir, files, - verbose=self.verbose, dry_run=self.dry_run) + dir_util.create_tree(base_dir, files, dry_run=self.dry_run) # And walk over the list of files, either making a hard link (if # os.link exists) to each one that doesn't already exist in its @@ -428,12 +413,12 @@ def make_release_tree (self, base_dir, files): msg = "copying files to %s..." % base_dir if not files: - self.warn("no files to distribute -- empty manifest?") + log.warn("no files to distribute -- empty manifest?") else: - self.announce(msg) + log.info(msg) for file in files: if not os.path.isfile(file): - self.warn("'%s' not a regular file -- skipping" % file) + log.warn("'%s' not a regular file -- skipping" % file) else: dest = os.path.join(base_dir, file) self.copy_file(file, dest, link=link) @@ -464,7 +449,7 @@ def make_distribution (self): self.archive_files = archive_files if not self.keep_temp: - dir_util.remove_tree(base_dir, self.verbose, self.dry_run) + dir_util.remove_tree(base_dir, dry_run=self.dry_run) def get_archive_files (self): """Return the list of archive files created when the command diff --git a/core.py b/core.py index 97a741c812..222e6aebd8 100644 --- a/core.py +++ b/core.py @@ -100,7 +100,11 @@ class found in 'cmdclass' is used in place of the default, which is try: _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: - raise SystemExit, "error in setup script: %s" % msg + if attrs.has_key('name'): + raise SystemExit, "error in %s setup command: %s" % \ + (attrs['name'], msg) + else: + raise SystemExit, "error in setup command: %s" % msg if _setup_stop_after == "init": return dist diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 1d97282322..3fb5bc9005 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -50,6 +50,7 @@ from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError +from distutils import log class CygwinCCompiler (UnixCCompiler): @@ -148,7 +149,7 @@ def compile (self, src = sources[i] ; obj = objects[i] ext = (os.path.splitext (src))[1] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: self.mkpath (os.path.dirname (obj)) if ext == '.rc' or ext == '.res': diff --git a/dir_util.py b/dir_util.py index 77007c976b..8b3e06b2fa 100644 --- a/dir_util.py +++ b/dir_util.py @@ -9,7 +9,7 @@ import os from types import * from distutils.errors import DistutilsFileError, DistutilsInternalError - +from distutils import log # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating /foo/bar/baz" messages in dry-run mode @@ -69,8 +69,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): if _path_created.get(abs_head): continue - if verbose: - print "creating", head + log.info("creating %s", head) if not dry_run: try: @@ -105,7 +104,7 @@ def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): # Now create them for dir in need_dirs: - mkpath(dir, mode, verbose, dry_run) + mkpath(dir, mode, dry_run=dry_run) # create_tree () @@ -151,7 +150,7 @@ def copy_tree (src, dst, "error listing files in '%s': %s" % (src, errstr) if not dry_run: - mkpath(dst, verbose=verbose) + mkpath(dst) outputs = [] @@ -161,21 +160,19 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) - if verbose: - print "linking %s -> %s" % (dst_name, link_dest) + log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: os.symlink(link_dest, dst_name) outputs.append(dst_name) elif os.path.isdir(src_name): outputs.extend( - copy_tree(src_name, dst_name, - preserve_mode, preserve_times, preserve_symlinks, - update, verbose, dry_run)) + copy_tree(src_name, dst_name, preserve_mode, + preserve_times, preserve_symlinks, update, + dry_run=dry_run)) else: - copy_file(src_name, dst_name, - preserve_mode, preserve_times, - update, None, verbose, dry_run) + copy_file(src_name, dst_name, preserve_mode, + preserve_times, update, dry_run=dry_run) outputs.append(dst_name) return outputs @@ -200,8 +197,7 @@ def remove_tree (directory, verbose=0, dry_run=0): from distutils.util import grok_environment_error global _path_created - if verbose: - print "removing '%s' (and everything under it)" % directory + log.info("removing '%s' (and everything under it)", directory) if dry_run: return cmdtuples = [] @@ -214,6 +210,5 @@ def remove_tree (directory, verbose=0, dry_run=0): if _path_created.has_key(abspath): del _path_created[abspath] except (IOError, OSError), exc: - if verbose: - print grok_environment_error( - exc, "error removing %s: " % directory) + log.warn(grok_environment_error( + exc, "error removing %s: " % directory)) diff --git a/dist.py b/dist.py index b648f24eb7..a84004f4c7 100644 --- a/dist.py +++ b/dist.py @@ -15,7 +15,7 @@ from distutils.errors import * from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape - +from distutils import log # Regex to define acceptable Distutils command names. This is not *quite* # the same as a Python NAME -- I don't allow leading underscores. The fact @@ -46,7 +46,8 @@ class Distribution: # since every global option is also valid as a command option -- and we # don't want to pollute the commands with too many options that they # have minimal control over. - global_options = [('verbose', 'v', "run verbosely (default)"), + # The fourth entry for verbose means that it can be repeated. + global_options = [('verbose', 'v', "run verbosely (default)", 1), ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('help', 'h', "show detailed help message"), @@ -392,6 +393,7 @@ def parse_command_line (self): parser.set_aliases({'licence': 'license'}) args = parser.getopt(args=self.script_args, object=self) option_order = parser.get_option_order() + log.set_verbosity(self.verbose) # for display options we return immediately if self.handle_display_options(option_order): @@ -876,13 +878,7 @@ def reinitialize_command (self, command, reinit_subcommands=0): # -- Methods that operate on the Distribution ---------------------- def announce (self, msg, level=1): - """Print 'msg' if 'level' is greater than or equal to the verbosity - level recorded in the 'verbose' attribute (which, currently, can be - only 0 or 1). - """ - if self.verbose >= level: - print msg - + log.debug(msg) def run_commands (self): """Run each command that was seen on the setup script command line. @@ -907,7 +903,7 @@ def run_command (self, command): if self.have_run.get(command): return - self.announce("running " + command) + log.info("running %s", command) cmd_obj = self.get_command_obj(command) cmd_obj.ensure_finalized() cmd_obj.run() diff --git a/emxccompiler.py b/emxccompiler.py index 58a0d812e4..2788209c72 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -28,6 +28,7 @@ from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError +from distutils import log class EMXCCompiler (UnixCCompiler): @@ -109,7 +110,7 @@ def compile (self, src = sources[i] ; obj = objects[i] ext = (os.path.splitext (src))[1] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: self.mkpath (os.path.dirname (obj)) if ext == '.rc': diff --git a/fancy_getopt.py b/fancy_getopt.py index e65302fc0b..fe9b0d4d94 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -157,13 +157,18 @@ def _grok_option_table (self): self.long_opts = [] self.short_opts = [] self.short2long.clear() + self.repeat = {} for option in self.option_table: - try: - (long, short, help) = option - except ValueError: - raise DistutilsGetoptError, \ - "invalid option tuple " + str(option) + if len(option) == 3: + long, short, help = option + repeat = 0 + elif len(option) == 4: + long, short, help, repeat = option + else: + # the option table is part of the code, so simply + # assert that it is correct + assert "invalid option tuple: %s" % `option` # Type- and value-check the option names if type(long) is not StringType or len(long) < 2: @@ -177,6 +182,7 @@ def _grok_option_table (self): ("invalid short option '%s': " "must a single character or None") % short + self.repeat[long] = 1 self.long_opts.append(long) if long[-1] == '=': # option takes an argument? @@ -232,14 +238,15 @@ def _grok_option_table (self): def getopt (self, args=None, object=None): - """Parse the command-line options in 'args' and store the results - as attributes of 'object'. If 'args' is None or not supplied, uses - 'sys.argv[1:]'. If 'object' is None or not supplied, creates a new - OptionDummy object, stores option values there, and returns a tuple - (args, object). If 'object' is supplied, it is modified in place - and 'getopt()' just returns 'args'; in both cases, the returned - 'args' is a modified copy of the passed-in 'args' list, which is - left untouched. + """Parse command-line options in args. Store as attributes on object. + + If 'args' is None or not supplied, uses 'sys.argv[1:]'. If + 'object' is None or not supplied, creates a new OptionDummy + object, stores option values there, and returns a tuple (args, + object). If 'object' is supplied, it is modified in place and + 'getopt()' just returns 'args'; in both cases, the returned + 'args' is a modified copy of the passed-in 'args' list, which + is left untouched. """ if args is None: args = sys.argv[1:] @@ -253,30 +260,23 @@ def getopt (self, args=None, object=None): short_opts = string.join(self.short_opts) try: - (opts, args) = getopt.getopt(args, short_opts, self.long_opts) + opts, args = getopt.getopt(args, short_opts, self.long_opts) except getopt.error, msg: raise DistutilsArgError, msg - for (opt, val) in opts: + for opt, val in opts: if len(opt) == 2 and opt[0] == '-': # it's a short option opt = self.short2long[opt[1]] - - elif len(opt) > 2 and opt[0:2] == '--': - opt = opt[2:] - else: - raise DistutilsInternalError, \ - "this can't happen: bad option string '%s'" % opt + assert len(opt) > 2 and opt[:2] == '--' + opt = opt[2:] alias = self.alias.get(opt) if alias: opt = alias if not self.takes_arg[opt]: # boolean option? - if val != '': # shouldn't have a value! - raise DistutilsInternalError, \ - "this can't happen: bad option value '%s'" % val - + assert val == '', "boolean option can't have value" alias = self.negative_alias.get(opt) if alias: opt = alias @@ -285,13 +285,16 @@ def getopt (self, args=None, object=None): val = 1 attr = self.attr_name[opt] + # The only repeating option at the moment is 'verbose'. + # It has a negative option -q quiet, which should set verbose = 0. + if val and self.repeat.get(attr) is not None: + val = getattr(object, attr, 0) + 1 setattr(object, attr, val) self.option_order.append((opt, val)) # for opts - if created_object: - return (args, object) + return args, object else: return args diff --git a/file_util.py b/file_util.py index 14772fb74a..56b1faee45 100644 --- a/file_util.py +++ b/file_util.py @@ -9,7 +9,7 @@ import os from distutils.errors import DistutilsFileError - +from distutils import log # for generating verbose output in 'copy_file()' _copy_action = { None: 'copying', @@ -73,7 +73,6 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): # _copy_file_contents() - def copy_file (src, dst, preserve_mode=1, preserve_times=1, @@ -90,8 +89,7 @@ def copy_file (src, dst, 'preserve_times' is true (the default), the last-modified and last-access times are copied as well. If 'update' is true, 'src' will only be copied if 'dst' does not exist, or if 'dst' does exist but is - older than 'src'. If 'verbose' is true, then a one-line summary of the - copy will be printed to stdout. + older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -127,20 +125,18 @@ def copy_file (src, dst, dir = os.path.dirname(dst) if update and not newer(src, dst): - if verbose: - print "not copying %s (output up-to-date)" % src - return (dst, 0) + log.debug("not copying %s (output up-to-date)", src) + return dst, 0 try: action = _copy_action[link] except KeyError: raise ValueError, \ "invalid value '%s' for 'link' argument" % link - if verbose: - if os.path.basename(dst) == os.path.basename(src): - print "%s %s -> %s" % (action, src, dir) - else: - print "%s %s -> %s" % (action, src, dst) + if os.path.basename(dst) == os.path.basename(src): + log.info("%s %s -> %s", action, src, dir) + else: + log.info("%s %s -> %s", action, src, dst) if dry_run: return (dst, 1) @@ -197,8 +193,7 @@ def move_file (src, dst, from os.path import exists, isfile, isdir, basename, dirname import errno - if verbose: - print "moving %s -> %s" % (src, dst) + log.info("moving %s -> %s", src, dst) if dry_run: return dst diff --git a/filelist.py b/filelist.py index f7222fd927..d39c835869 100644 --- a/filelist.py +++ b/filelist.py @@ -37,27 +37,19 @@ class FileList: def __init__(self, warn=None, debug_print=None): - # use standard warning and debug functions if no other given - self.warn = warn or self.__warn - self.debug_print = debug_print or self.__debug_print + # ignore argument to FileList, but keep them for backwards + # compatibility self.allfiles = None self.files = [] - def set_allfiles (self, allfiles): self.allfiles = allfiles def findall (self, dir=os.curdir): self.allfiles = findall(dir) - - # -- Fallback warning/debug functions ------------------------------ - - def __warn (self, msg): - sys.stderr.write("warning: %s\n" % msg) - - def __debug_print (self, msg): + def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ @@ -65,7 +57,6 @@ def __debug_print (self, msg): if DEBUG: print msg - # -- List-like methods --------------------------------------------- def append (self, item): @@ -87,8 +78,8 @@ def sort (self): def remove_duplicates (self): # Assumes list has been sorted! - for i in range(len(self.files)-1, 0, -1): - if self.files[i] == self.files[i-1]: + for i in range(len(self.files) - 1, 0, -1): + if self.files[i] == self.files[i - 1]: del self.files[i] @@ -147,61 +138,60 @@ def process_template_line (self, line): self.debug_print("include " + string.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=1): - self.warn("no files found matching '%s'" % pattern) + log.warn("warning: no files found matching '%s'", + pattern) elif action == 'exclude': self.debug_print("exclude " + string.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=1): - self.warn( - "no previously-included files found matching '%s'"% - pattern) + log.warn(("warning: no previously-included files " + "found matching '%s'"), pattern) elif action == 'global-include': self.debug_print("global-include " + string.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=0): - self.warn(("no files found matching '%s' " + - "anywhere in distribution") % - pattern) + log.warn(("warning: no files found matching '%s' " + + "anywhere in distribution"), pattern) elif action == 'global-exclude': self.debug_print("global-exclude " + string.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=0): - self.warn(("no previously-included files matching '%s' " + - "found anywhere in distribution") % - pattern) + log.warn(("warning: no previously-included files matching " + "'%s' found anywhere in distribution"), + pattern) elif action == 'recursive-include': self.debug_print("recursive-include %s %s" % (dir, string.join(patterns))) for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): - self.warn(("no files found matching '%s' " + - "under directory '%s'") % - (pattern, dir)) + log.warn(("warngin: no files found matching '%s' " + + "under directory '%s'"), + pattern, dir) elif action == 'recursive-exclude': self.debug_print("recursive-exclude %s %s" % (dir, string.join(patterns))) for pattern in patterns: if not self.exclude_pattern(pattern, prefix=dir): - self.warn(("no previously-included files matching '%s' " + - "found under directory '%s'") % - (pattern, dir)) + log.warn(("warning: no previously-included files matching " + "'%s' found under directory '%s'"), + pattern, dir) elif action == 'graft': self.debug_print("graft " + dir_pattern) if not self.include_pattern(None, prefix=dir_pattern): - self.warn("no directories found matching '%s'" % dir_pattern) + log.warn("warning: no directories found matching '%s'", + dir_pattern) elif action == 'prune': self.debug_print("prune " + dir_pattern) if not self.exclude_pattern(None, prefix=dir_pattern): - self.warn(("no previously-included directories found " + - "matching '%s'") % - dir_pattern) + log.warn(("no previously-included directories found " + + "matching '%s'"), dir_pattern) else: raise DistutilsInternalError, \ "this cannot happen: invalid action '%s'" % action diff --git a/msvccompiler.py b/msvccompiler.py index 73cd44258c..ade8172d3b 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -17,6 +17,7 @@ CompileError, LibError, LinkError from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options +from distutils import log _can_read_reg = 0 try: @@ -305,7 +306,7 @@ def compile (self, ext = (os.path.splitext (src))[1] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: self.mkpath (os.path.dirname (obj)) @@ -403,7 +404,7 @@ def create_static_lib (self, raise LibError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -480,7 +481,7 @@ def link (self, raise LinkError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # link () diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 7c77b8bcef..6242f12aa1 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -13,6 +13,7 @@ CCompiler, gen_preprocess_options, gen_lib_options import distutils.util import distutils.dir_util +from distutils import log import mkcwproject class MWerksCompiler (CCompiler) : @@ -132,8 +133,8 @@ def link (self, exportname = basename + '.mcp.exp' prefixname = 'mwerks_%s_config.h'%basename # Create the directories we need - distutils.dir_util.mkpath(build_temp, self.verbose, self.dry_run) - distutils.dir_util.mkpath(output_dir, self.verbose, self.dry_run) + distutils.dir_util.mkpath(build_temp, dry_run=self.dry_run) + distutils.dir_util.mkpath(output_dir, dry_run=self.dry_run) # And on to filling in the parameters for the project builder settings = {} settings['mac_exportname'] = exportname @@ -159,8 +160,7 @@ def link (self, return # Build the export file exportfilename = os.path.join(build_temp, exportname) - if self.verbose: - print '\tCreate export file', exportfilename + log.debug("\tCreate export file", exportfilename) fp = open(exportfilename, 'w') fp.write('%s\n'%export_symbols[0]) fp.close() @@ -181,8 +181,7 @@ def link (self, # because we pass this pathname to CodeWarrior in an AppleEvent, and CW # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) - if self.verbose: - print '\tCreate XML file', xmlfilename + log.debug("\tCreate XML file", xmlfilename) xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] @@ -191,12 +190,10 @@ def link (self, fp.close() # Generate the project. Again a full pathname. projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) - if self.verbose: - print '\tCreate project file', projectfilename + log.debug('\tCreate project file', projectfilename) mkcwproject.makeproject(xmlfilename, projectfilename) # And build it - if self.verbose: - print '\tBuild project' + log.debug('\tBuild project') mkcwproject.buildproject(projectfilename) def _filename_to_abs(self, filename): diff --git a/spawn.py b/spawn.py index 5b6016e0d8..4df6e097de 100644 --- a/spawn.py +++ b/spawn.py @@ -12,7 +12,7 @@ import sys, os, string from distutils.errors import * - +from distutils import log def spawn (cmd, search_path=1, @@ -27,19 +27,18 @@ def spawn (cmd, If 'search_path' is true (the default), the system's executable search path will be used to find the program; otherwise, cmd[0] must be the - exact path to the executable. If 'verbose' is true, a one-line summary - of the command will be printed before it is run. If 'dry_run' is true, + exact path to the executable.If 'dry_run' is true, the command will not actually be run. Raise DistutilsExecError if running the program fails in any way; just return on success. """ if os.name == 'posix': - _spawn_posix(cmd, search_path, verbose, dry_run) + _spawn_posix(cmd, search_path, dry_run=dry_run) elif os.name == 'nt': - _spawn_nt(cmd, search_path, verbose, dry_run) + _spawn_nt(cmd, search_path, dry_run=dry_run) elif os.name == 'os2': - _spawn_os2(cmd, search_path, verbose, dry_run) + _spawn_os2(cmd, search_path, dry_run=dry_run) else: raise DistutilsPlatformError, \ "don't know how to spawn programs on platform '%s'" % os.name @@ -74,8 +73,7 @@ def _spawn_nt (cmd, if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - if verbose: - print string.join([executable] + cmd[1:], ' ') + log.info(string.join([executable] + cmd[1:], ' ')) if not dry_run: # spawn for NT requires a full path to the .exe try: @@ -100,8 +98,7 @@ def _spawn_os2 (cmd, if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - if verbose: - print string.join([executable] + cmd[1:], ' ') + log.info(string.join([executable] + cmd[1:], ' ')) if not dry_run: # spawnv for OS/2 EMX requires a full path to the .exe try: @@ -122,8 +119,7 @@ def _spawn_posix (cmd, verbose=0, dry_run=0): - if verbose: - print string.join(cmd, ' ') + log.info(string.join(cmd, ' ')) if dry_run: return exec_fn = search_path and os.execvp or os.execv diff --git a/unixccompiler.py b/unixccompiler.py index 7e63c56afe..55a51b3201 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -26,6 +26,7 @@ CCompiler, gen_preprocess_options, gen_lib_options from distutils.errors import \ DistutilsExecError, CompileError, LibError, LinkError +from distutils import log # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's @@ -147,7 +148,7 @@ def compile (self, for i in range(len(sources)): src = sources[i] ; obj = objects[i] if skip_sources[src]: - self.announce("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: self.mkpath(os.path.dirname(obj)) try: @@ -191,7 +192,7 @@ def create_static_lib (self, except DistutilsExecError, msg: raise LibError, msg else: - self.announce("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -240,7 +241,7 @@ def link (self, except DistutilsExecError, msg: raise LinkError, msg else: - self.announce("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # link () diff --git a/util.py b/util.py index d079588a91..23c29ebb2a 100644 --- a/util.py +++ b/util.py @@ -12,7 +12,7 @@ from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn - +from distutils import log def get_platform (): """Return a string that identifies the current platform. This is used @@ -275,33 +275,27 @@ def split_quoted (s): def execute (func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world (eg. by writing - to the filesystem). Such actions are special because they are disabled - by the 'dry_run' flag, and announce themselves if 'verbose' is true. - This method takes care of all that bureaucracy for you; all you have to - do is supply the function to call and an argument tuple for it (to - embody the "external action" being performed), and an optional message - to print. + """Perform some action that affects the outside world (eg. by + writing to the filesystem). Such actions are special because they + are disabled by the 'dry_run' flag. This method takes care of all + that bureaucracy for you; all you have to do is supply the + function to call and an argument tuple for it (to embody the + "external action" being performed), and an optional message to + print. """ - # Generate a message if we weren't passed one if msg is None: msg = "%s%s" % (func.__name__, `args`) if msg[-2:] == ',)': # correct for singleton tuple msg = msg[0:-2] + ')' - # Print it if verbosity level is high enough - if verbose: - print msg - - # And do it, as long as we're not in dry-run mode + log.info(msg) if not dry_run: apply(func, args) -# execute() - def strtobool (val): """Convert a string representation of truth to true (1) or false (0). + True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. @@ -337,8 +331,8 @@ def byte_compile (py_files, prepended (after 'prefix' is stripped). You can supply either or both (or neither) of 'prefix' and 'base_dir', as you wish. - If 'verbose' is true, prints out a report of each file. If 'dry_run' - is true, doesn't actually do anything that would affect the filesystem. + If 'dry_run' is true, doesn't actually do anything that would + affect the filesystem. Byte-compilation is either done directly in this interpreter process with the standard py_compile module, or indirectly by writing a @@ -367,8 +361,7 @@ def byte_compile (py_files, if not direct: from tempfile import mktemp script_name = mktemp(".py") - if verbose: - print "writing byte-compilation script '%s'" % script_name + log.info("writing byte-compilation script '%s'", script_name) if not dry_run: script = open(script_name, "w") @@ -406,9 +399,9 @@ def byte_compile (py_files, cmd.insert(1, "-O") elif optimize == 2: cmd.insert(1, "-OO") - spawn(cmd, verbose=verbose, dry_run=dry_run) + spawn(cmd, dry_run=dry_run) execute(os.remove, (script_name,), "removing %s" % script_name, - verbose=verbose, dry_run=dry_run) + dry_run=dry_run) # "Direct" byte-compilation: use the py_compile module to compile # right here, right now. Note that the script generated in indirect @@ -440,14 +433,12 @@ def byte_compile (py_files, cfile_base = os.path.basename(cfile) if direct: if force or newer(file, cfile): - if verbose: - print "byte-compiling %s to %s" % (file, cfile_base) + log.info("byte-compiling %s to %s", file, cfile_base) if not dry_run: compile(file, cfile, dfile) else: - if verbose: - print "skipping byte-compilation of %s to %s" % \ - (file, cfile_base) + log.debug("skipping byte-compilation of %s to %s", + file, cfile_base) # byte_compile () From 86d1bd16c0053ee46f0e7d529dec144b611de3ed Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:18:24 +0000 Subject: [PATCH 0812/8469] Remove unused imports caught by pychecker --- command/bdist_pkgtool.py | 2 -- command/bdist_sdux.py | 1 - filelist.py | 2 +- unixccompiler.py | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index 4fd95012a2..9d6e7dc110 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -7,7 +7,6 @@ distributions).""" import os, string, sys, pwd, grp -import glob from types import * from distutils.core import Command, DEBUG from distutils.util import get_platform @@ -16,7 +15,6 @@ from distutils.command import bdist_packager from distutils import sysconfig from distutils import log -import compileall from commands import getoutput __revision__ = "$Id: bdist_pkgtool.py,v 0.3 mwa " diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py index e4765f97df..a3cbbb8a3f 100644 --- a/command/bdist_sdux.py +++ b/command/bdist_sdux.py @@ -7,7 +7,6 @@ __revision__ = "$Id: bdist_sdux.py,v 0.2 " import os, string -import glob from types import * from distutils.core import Command, DEBUG from distutils.util import get_platform diff --git a/filelist.py b/filelist.py index d39c835869..3ed6f03291 100644 --- a/filelist.py +++ b/filelist.py @@ -11,7 +11,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import os, string, re import fnmatch from types import * from glob import glob diff --git a/unixccompiler.py b/unixccompiler.py index 55a51b3201..56d3ee44cb 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,7 +17,7 @@ __revision__ = "$Id$" -import string, re, os, sys +import os, sys from types import * from copy import copy from distutils import sysconfig From ae4a1269c661b5fb842d7d18911d5a0c19ded7dc Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:24:05 +0000 Subject: [PATCH 0813/8469] Set repeat metadata for an option based on repeat local var not constant. --- fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index fe9b0d4d94..cb89e070d7 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -182,7 +182,7 @@ def _grok_option_table (self): ("invalid short option '%s': " "must a single character or None") % short - self.repeat[long] = 1 + self.repeat[long] = repeat self.long_opts.append(long) if long[-1] == '=': # option takes an argument? From c3296eab8b1919b8f4c3fcdbfbd34deca6a22040 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:26:44 +0000 Subject: [PATCH 0814/8469] Fix unused local variables caught by pychecker. Fixes a bug for Solaris pkgtool (bdist_pkgtool) that would have prevented it from building subpackages. --- command/bdist_packager.py | 10 +--------- command/bdist_pkgtool.py | 4 ++-- core.py | 4 +--- cygwinccompiler.py | 7 ++----- emxccompiler.py | 4 ++-- sysconfig.py | 1 - 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/command/bdist_packager.py b/command/bdist_packager.py index 11278ee28b..dde113ce4d 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -145,7 +145,6 @@ def get_script (self,attr): def initialize_options (self): - d = self.distribution self.keep_temp = 0 self.control_only = 0 self.no_autorelocate = 0 @@ -187,8 +186,7 @@ def finalize_options (self): self.pkg_dir = os.path.join(bdist_base, 'binary') if not self.plat_name: - d = self.distribution - self.plat = d.get_platforms() + self.plat = self.distribution.get_platforms() if self.distribution.has_ext_modules(): self.plat_name = [sys.platform,] else: @@ -237,12 +235,6 @@ def run (self): log.info("installing to %s", self.pkg_dir) self.run_command('install') - - # And make an archive relative to the root of the - # pseudo-installation tree. - archive_basename = "%s.%s" % (self.distribution.get_fullname(), - self.plat_name) - if not self.keep_temp: remove_tree(self.pkg_dir, dry_run=self.dry_run) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index 9d6e7dc110..3a48d2699a 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -208,7 +208,7 @@ def make_package(self,root=None): else: pkg_dir = self.pkg_dir - install = self.reinitialize_command('install', reinit_subcommands=1) + self.reinitialize_command('install', reinit_subcommands=1) # build package log.info('Building package') self.run_command('build') @@ -275,7 +275,7 @@ def run (self): if self.subpackages: self.subpackages=string.split(self.subpackages,",") for pkg in self.subpackages: - self.make_package(subpackage) + self.make_package(pkg) else: self.make_package() # run() diff --git a/core.py b/core.py index 222e6aebd8..fbf5d51182 100644 --- a/core.py +++ b/core.py @@ -125,9 +125,7 @@ class found in 'cmdclass' is used in place of the default, which is try: ok = dist.parse_command_line() except DistutilsArgError, msg: - script = os.path.basename(dist.script_name) - raise SystemExit, \ - gen_usage(dist.script_name) + "\nerror: %s" % msg + raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg if DEBUG: print "options (after parsing command line):" diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 3fb5bc9005..443c9bcfb7 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -213,7 +213,6 @@ def link (self, # generate the filenames for these files def_file = os.path.join(temp_dir, dll_name + ".def") - exp_file = os.path.join(temp_dir, dll_name + ".exp") lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a") # Generate .def file @@ -229,16 +228,14 @@ def link (self, # dllwrap uses different options than gcc/ld if self.linker_dll == "dllwrap": - extra_preargs.extend([#"--output-exp",exp_file, - "--output-lib",lib_file, - ]) + extra_preargs.extend(["--output-lib", lib_file]) # for dllwrap we have to use a special option extra_preargs.extend(["--def", def_file]) # we use gcc/ld here and can be sure ld is >= 2.9.10 else: # doesn't work: bfd_close build\...\libfoo.a: Invalid operation #extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file]) - # for gcc/ld the def-file is specified as any other object files + # for gcc/ld the def-file is specified as any object files objects.append(def_file) #end: if ((export_symbols is not None) and diff --git a/emxccompiler.py b/emxccompiler.py index 2788209c72..644c6fc391 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -174,11 +174,11 @@ def link (self, # generate the filenames for these files def_file = os.path.join(temp_dir, dll_name + ".def") - lib_file = os.path.join(temp_dir, dll_name + ".lib") # Generate .def file contents = [ - "LIBRARY %s INITINSTANCE TERMINSTANCE" % os.path.splitext(os.path.basename(output_filename))[0], + "LIBRARY %s INITINSTANCE TERMINSTANCE" % \ + os.path.splitext(os.path.basename(output_filename))[0], "DATA MULTIPLE NONSHARED", "EXPORTS"] for sym in export_symbols: diff --git a/sysconfig.py b/sysconfig.py index 3e323533b6..847b87240b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -305,7 +305,6 @@ def expand_makefile_vars(s, vars): while 1: m = _findvar1_rx.search(s) or _findvar2_rx.search(s) if m: - name = m.group(1) (beg, end) = m.span() s = s[0:beg] + vars.get(m.group(1)) + s[end:] else: From c7cb56da7ee4c7f2a29d32f6a15c6e838708419e Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:30:10 +0000 Subject: [PATCH 0815/8469] Fix bug in recent change to logging code. mode is not computed in dry_run mode, so it can't be included in the log message. --- command/install_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_scripts.py b/command/install_scripts.py index 4044ba092b..ceece1b6bf 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -49,7 +49,7 @@ def run (self): # all the scripts we just installed. for file in self.get_outputs(): if self.dry_run: - log.info("changing mode of %s to %o", file, mode) + log.info("changing mode of %s", file) else: mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777 log.info("changing mode of %s to %o", file, mode) From 8c19b0c4ec29c8daa3aceddcaabf7ec0f86ed12e Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:35:10 +0000 Subject: [PATCH 0816/8469] global _option_order is not used --- fancy_getopt.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index cb89e070d7..2ed29a24fd 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -31,12 +31,6 @@ # (for use as attributes of some object). longopt_xlate = string.maketrans('-', '_') -# This records (option, value) pairs in the order seen on the command line; -# it's close to what getopt.getopt() returns, but with short options -# expanded. (Ugh, this module should be OO-ified.) -_option_order = None - - class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some handy extra functionality: From d8961739214a05f084e4ee8ac55b0c02deaba3b7 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:39:34 +0000 Subject: [PATCH 0817/8469] get_script() implicitly returned None and also had explicit returns. Make all returns explicit and rearrange logic to avoid extra indentation. --- command/bdist_packager.py | 51 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/command/bdist_packager.py b/command/bdist_packager.py index dde113ce4d..d57a59403b 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -3,8 +3,8 @@ Modified from bdist_dumb by Mark W. Alexander Implements the Distutils 'bdist_packager' abstract command -to be subclassed by binary package creation commands.""" - +to be subclassed by binary package creation commands. +""" __revision__ = "$Id: bdist_packager.py,v 0.1 2001/04/4 mwa" @@ -114,34 +114,33 @@ def get_binary_name(self): return self.name + '-' + self.version + '-' + \ self.revision + '-' + py_ver - def get_script (self,attr): + def get_script (self, attr): # accept a script as a string ("line\012line\012..."), # a filename, or a list # XXX We could probably get away with copy_file, but I'm # guessing this will be more flexible later on.... - val = getattr(self,attr) - ret=None - if val: - try: - os.stat(val) - # script is a file - ret=[] - f=open(val) - ret=string.split(f.read(),"\012"); - f.close() - #return ret - except: - if type(val)==type(""): - # script is a string - ret = string.split(val,"\012") - elif type(val)==type([]): - # script is a list - ret = val - else: - raise RuntimeError, \ - "cannot figure out what to do with 'request' option (%s)" \ - % val - return ret + val = getattr(self, attr) + if val is None: + return None + try: + os.stat(val) + # script is a file + ret = [] + f = open(val) + ret = string.split(f.read(), "\012"); + f.close() + except: + if type(val) == type(""): + # script is a string + ret = string.split(val, "\012") + elif type(val) == type([]): + # script is a list + ret = val + else: + raise RuntimeError, \ + "cannot figure out what to do with 'request' option (%s)" \ + % val + return ret def initialize_options (self): From 53d0ff29cbd412eb5505f8044b76544bd7496321 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:40:03 +0000 Subject: [PATCH 0818/8469] Remove (commented out) options that have moved into the distribution. --- command/bdist_packager.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/command/bdist_packager.py b/command/bdist_packager.py index d57a59403b..12efeaa087 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -34,19 +34,6 @@ class bdist_packager (Command): "Software category (packager dependent format)"), ('revision=', None, "package revision number"), - # the following have moved into the distribution class - #('packager=', None, - #"Package maintainer"), - #('packager-mail=', None, - #"Package maintainer's email address"), - #('author=', None, - #"Package author"), - #('author-mail=', None, - #"Package author's email address"), - #('license=', None, - #"License code"), - #('licence=', None, - #"alias for license"), ('icon=', None, "Package icon"), ('subpackages=', None, From d9e8a67208a3d479acb0e19dd9e92b03d6d5aa83 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:42:41 +0000 Subject: [PATCH 0819/8469] Reindent lines to improve readability --- command/bdist_pkgtool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index 3a48d2699a..998af5e7cd 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -303,9 +303,9 @@ def _make_prototype(self): try: self.distribution.packages[0] file_list=string.split( - getoutput("pkgproto %s/%s=%s" % (build.build_lib, - self.distribution.packages[0], - self.distribution.packages[0])),"\012") + getoutput("pkgproto %s/%s=%s" % \ + (build.build_lib, self.distribution.packages[0], + self.distribution.packages[0])), "\012") except: file_list=string.split( getoutput("pkgproto %s=" % (build.build_lib)),"\012") From 54e7ddc64aac340cb2a1c87e394caf0a9bdfb3ab Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:45:17 +0000 Subject: [PATCH 0820/8469] ensure_filename() only takes one argument. Call ensure_string() with one arg too, since the second value passed was the default. --- command/bdist_packager.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/command/bdist_packager.py b/command/bdist_packager.py index 12efeaa087..1960425511 100644 --- a/command/bdist_packager.py +++ b/command/bdist_packager.py @@ -67,18 +67,16 @@ def ensure_string_not_none (self,option,default=None): if val is None: raise DistutilsOptionError, "'%s' must be provided" % option - def ensure_script (self,arg): + def ensure_script(self, arg): if not arg: return try: - self.ensure_string(arg, None) + self.ensure_string(arg) except: try: - self.ensure_filename(arg, None) + self.ensure_filename(arg) except: - raise RuntimeError, \ - "cannot decipher script option (%s)" \ - % arg + raise RuntimeError, "cannot decipher script option (%s)" % arg def write_script (self,path,attr,default=None): """ write the script specified in attr to path. if attr is None, From 58596909c7673897cc8563e233ba6b71547a3ab4 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:55:10 +0000 Subject: [PATCH 0821/8469] import base64 at the top to avoid two different imports at other times --- command/bdist_wininst.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 6a985f190b..f018f4616f 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -8,6 +8,7 @@ __revision__ = "$Id$" import sys, os, string +import base64 from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree @@ -231,7 +232,6 @@ def create_exe (self, arcname, fullname, bitmap=None): # create_exe() def get_exe_bytes (self): - import base64 return base64.decodestring(EXEDATA) # class bdist_wininst @@ -248,7 +248,7 @@ def get_exe_bytes (self): # - Built wininst.exe from the MSVC project file distutils/misc/wininst.dsw # - Execute this file (distutils/distutils/command/bdist_wininst.py) - import re, base64 + import re moddata = open("bdist_wininst.py", "r").read() exedata = open("../../misc/wininst.exe", "rb").read() print "wininst.exe length is %d bytes" % len(exedata) From 6ff1777df1ce884b828e5e6bcf6a562512d5d543 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:00:20 +0000 Subject: [PATCH 0822/8469] Make None return explicit --- command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 388d3cbc9e..0ab72c08f4 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -181,7 +181,7 @@ def check_package (self, package, package_dir): # Either not in a package at all (__init__.py not expected), or # __init__.py doesn't exist -- so don't return the filename. - return + return None # check_package () From 0d435a0fec6aed4828aaf1f692d34dc0c213570b Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:00:33 +0000 Subject: [PATCH 0823/8469] Remove unused imports --- command/bdist_pkgtool.py | 1 - command/bdist_sdux.py | 1 - 2 files changed, 2 deletions(-) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index 998af5e7cd..51b89d978e 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -8,7 +8,6 @@ import os, string, sys, pwd, grp from types import * -from distutils.core import Command, DEBUG from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py index a3cbbb8a3f..ee3822e9d3 100644 --- a/command/bdist_sdux.py +++ b/command/bdist_sdux.py @@ -8,7 +8,6 @@ __revision__ = "$Id: bdist_sdux.py,v 0.2 " import os, string from types import * -from distutils.core import Command, DEBUG from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * From 2c4e48b301ddef1ea26454a694220d56c98a644f Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:02:26 +0000 Subject: [PATCH 0824/8469] Use module-level import of DEBUG instead of many function-level imports. --- dist.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dist.py b/dist.py index a84004f4c7..f995d58e9a 100644 --- a/dist.py +++ b/dist.py @@ -16,6 +16,7 @@ from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape from distutils import log +from distutils.core import DEBUG # Regex to define acceptable Distutils command names. This is not *quite* # the same as a Python NAME -- I don't allow leading underscores. The fact @@ -305,7 +306,6 @@ def find_config_files (self): def parse_config_files (self, filenames=None): from ConfigParser import ConfigParser - from distutils.core import DEBUG if filenames is None: filenames = self.find_config_files() @@ -771,7 +771,6 @@ def get_command_obj (self, command, create=1): object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ - from distutils.core import DEBUG cmd_obj = self.command_obj.get(command) if not cmd_obj and create: if DEBUG: @@ -802,8 +801,6 @@ def _set_command_options (self, command_obj, option_dict=None): supplied, uses the standard option dictionary for this command (from 'self.command_options'). """ - from distutils.core import DEBUG - command_name = command_obj.get_command_name() if option_dict is None: option_dict = self.get_option_dict(command_name) From 309de7b19b6bcfe387a274af9a2412921364ea0e Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:04:03 +0000 Subject: [PATCH 0825/8469] Add missing import of log. --- filelist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/filelist.py b/filelist.py index 3ed6f03291..e2e2457c8b 100644 --- a/filelist.py +++ b/filelist.py @@ -17,6 +17,7 @@ from glob import glob from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError +from distutils import log class FileList: From dfeac87d4fb807b342d27a6d19626aef80a8de17 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:05:05 +0000 Subject: [PATCH 0826/8469] Define DEBUG as early as possible to avoid import problems. --- core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core.py b/core.py index fbf5d51182..8a348ce3e5 100644 --- a/core.py +++ b/core.py @@ -12,6 +12,11 @@ import sys, os from types import * + +# If DISTUTILS_DEBUG is anything other than the empty string, we run in +# debug mode. +DEBUG = os.environ.get('DISTUTILS_DEBUG') + from distutils.errors import * from distutils.util import grok_environment_error @@ -32,11 +37,6 @@ or: %(script)s cmd --help """ - -# If DISTUTILS_DEBUG is anything other than the empty string, we run in -# debug mode. -DEBUG = os.environ.get('DISTUTILS_DEBUG') - def gen_usage (script_name): script = os.path.basename(script_name) return USAGE % vars() From 6dc1366e1df26a7247b81f0d1ac19e278ad4fcb7 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:06:16 +0000 Subject: [PATCH 0827/8469] Replace bogus bare variables with attribute access. --- command/bdist_sdux.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py index ee3822e9d3..875f3d88ce 100644 --- a/command/bdist_sdux.py +++ b/command/bdist_sdux.py @@ -1,7 +1,8 @@ """distutils.command.bdist_pkgtool Implements the Distutils 'bdist_sdux' command to create HP-UX -swinstall depot""" +swinstall depot. +""" # Mark Alexander @@ -265,11 +266,11 @@ def _make_control_file(self): #psf_file.extend([self.long_description]) if self.copyright: # XX make a copyright file XXX - write_script('copyright') + self.write_script('copyright') psf_file.extend([' copyright Date: Tue, 4 Jun 2002 21:10:35 +0000 Subject: [PATCH 0828/8469] Track extra arg to option_table to all uses of it --- fancy_getopt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 2ed29a24fd..a11b4d5840 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -358,8 +358,8 @@ def generate_help (self, header=None): else: lines = ['Option summary:'] - for (long,short,help) in self.option_table: - + for option in self.option_table: + long, short, help = option_table[:3] text = wrap_text(help, text_width) if long[-1] == '=': long = long[0:-1] From 03599c1b7e1719cbc27bef76603807002c384aec Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:11:56 +0000 Subject: [PATCH 0829/8469] Test changes before checking them in. --- fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index a11b4d5840..5de64e15da 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -359,7 +359,7 @@ def generate_help (self, header=None): lines = ['Option summary:'] for option in self.option_table: - long, short, help = option_table[:3] + long, short, help = option[:3] text = wrap_text(help, text_width) if long[-1] == '=': long = long[0:-1] From 1d89b23767470db537211e8d3daa12d435d5effb Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 21:20:08 +0000 Subject: [PATCH 0830/8469] Move warning about directory not on sys.path to debug level. Fix a bunch of multiline string constants that used +. --- command/install.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/command/install.py b/command/install.py index 746ca1f2c3..322177f441 100644 --- a/command/install.py +++ b/command/install.py @@ -2,6 +2,8 @@ Implements the Distutils 'install' command.""" +from distutils import log + # created 1999/03/13, Greg Ward __revision__ = "$Id$" @@ -368,8 +370,8 @@ def finalize_unix (self): self.install_scripts is None or self.install_data is None): raise DistutilsOptionError, \ - "install-base or install-platbase supplied, but " + \ - "installation scheme is incomplete" + ("install-base or install-platbase supplied, but " + "installation scheme is incomplete") return if self.home is not None: @@ -464,8 +466,8 @@ def handle_extra_path (self): (path_file, extra_dirs) = self.extra_path else: raise DistutilsOptionError, \ - "'extra_path' option must be a list, tuple, or " + \ - "comma-separated string with 1 or 2 elements" + ("'extra_path' option must be a list, tuple, or " + "comma-separated string with 1 or 2 elements") # convert to local form in case Unix notation used (as it # should be in setup scripts) @@ -522,10 +524,10 @@ def run (self): if (self.warn_dir and not (self.path_file and self.install_path_file) and install_lib not in sys_path): - self.warn(("modules installed to '%s', which is not in " + - "Python's module search path (sys.path) -- " + - "you'll have to change the search path yourself") % - self.install_lib) + log.debug(("modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + "you'll have to change the search path yourself"), + self.install_lib) # run () From 6b97787eb0832dabe581cb2b8e55a709bab0d75f Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 6 Jun 2002 14:54:56 +0000 Subject: [PATCH 0831/8469] Change warning to debug level; it's a very minor issue. The specific warning is that clean didn't find a directory that should be removed if it exists. --- command/clean.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/clean.py b/command/clean.py index 8fddeb453a..36252d5174 100644 --- a/command/clean.py +++ b/command/clean.py @@ -54,8 +54,8 @@ def run(self): if os.path.exists(self.build_temp): remove_tree(self.build_temp, dry_run=self.dry_run) else: - log.warn("'%s' does not exist -- can't clean it", - self.build_temp) + log.debug("'%s' does not exist -- can't clean it", + self.build_temp) if self.all: # remove build directories From 8ad35754e1684d02471a0be1b22e0e14c2b78592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 11 Jun 2002 06:22:31 +0000 Subject: [PATCH 0832/8469] Patch #488073: AtheOS port. --- command/build_ext.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 89ca1dc9b8..d8f3dc8a7a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -178,9 +178,9 @@ def finalize_options (self): if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) - # for extensions under Cygwin Python's library directory must be + # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin': + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -656,6 +656,22 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + elif sys.platform[:6] == "atheos": + from distutils import sysconfig + + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # Get SHLIBS from Makefile + extra = [] + for lib in sysconfig.get_config_var('SHLIBS').split(): + if lib.startswith('-l'): + extra.append(lib[2:]) + else: + extra.append(lib) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib, "m"] + extra else: return ext.libraries From c21ebfc2107cf837e5efa2958dc1c66e2db057fc Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 12 Jun 2002 20:08:56 +0000 Subject: [PATCH 0833/8469] Add a new definition to Extension objects: depends. depends is a list of files that the target depends, but aren't direct sources of the target. think .h files. --- command/build_ext.py | 3 ++- extension.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index d8f3dc8a7a..21dd0dcd6e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -422,7 +422,8 @@ def build_extension(self, ext): ext_filename = os.path.join(self.build_lib, self.get_ext_filename(fullname)) - if not (self.force or newer_group(sources, ext_filename, 'newer')): + depends = sources + ext.depends + if not (self.force or newer_group(depends, ext_filename, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: diff --git a/extension.py b/extension.py index 3737712016..d73bb08e00 100644 --- a/extension.py +++ b/extension.py @@ -73,6 +73,8 @@ class Extension: used on all platforms, and not generally necessary for Python extensions, which typically export exactly one symbol: "init" + extension_name. + depends : [string] + list of files that the extension depends on """ def __init__ (self, name, sources, @@ -86,6 +88,7 @@ def __init__ (self, name, sources, extra_compile_args=None, extra_link_args=None, export_symbols=None, + depends=None, ): assert type(name) is StringType, "'name' must be a string" @@ -105,6 +108,7 @@ def __init__ (self, name, sources, self.extra_compile_args = extra_compile_args or [] self.extra_link_args = extra_link_args or [] self.export_symbols = export_symbols or [] + self.depends = depends or [] # class Extension From bcb36e840f82d68473ff4c48f3fd9b53fcebf9eb Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 14:58:30 +0000 Subject: [PATCH 0834/8469] Python style conformance: Delete spaces between name of function and arglist. Making the world better a little bit at a time . --- unixccompiler.py | 82 ++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 56d3ee44cb..e584007c00 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -81,20 +81,20 @@ class UnixCCompiler (CCompiler): - def __init__ (self, - verbose=0, - dry_run=0, - force=0): + def __init__(self, + verbose=0, + dry_run=0, + force=0): CCompiler.__init__ (self, verbose, dry_run, force) - def preprocess (self, - source, - output_file=None, - macros=None, - include_dirs=None, - extra_preargs=None, - extra_postargs=None): + def preprocess(self, + source, + output_file=None, + macros=None, + include_dirs=None, + extra_preargs=None, + extra_postargs=None): (_, macros, include_dirs) = \ self._fix_compile_args(None, macros, include_dirs) @@ -120,14 +120,14 @@ def preprocess (self, raise CompileError, msg - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): + def compile(self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): (output_dir, macros, include_dirs) = \ self._fix_compile_args(output_dir, macros, include_dirs) @@ -164,11 +164,11 @@ def compile (self, # compile () - def create_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0): + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0): (objects, output_dir) = self._fix_object_args(objects, output_dir) @@ -197,19 +197,19 @@ def create_static_lib (self, # create_static_lib () - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None): (objects, output_dir) = self._fix_object_args(objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ @@ -250,10 +250,10 @@ def link (self, # These are all used by the 'gen_lib_options() function, in # ccompiler.py. - def library_dir_option (self, dir): + def library_dir_option(self, dir): return "-L" + dir - def runtime_library_dir_option (self, dir): + def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 @@ -272,11 +272,11 @@ def runtime_library_dir_option (self, dir): else: return "-R" + dir - def library_option (self, lib): + def library_option(self, lib): return "-l" + lib - def find_library_file (self, dirs, lib, debug=0): + def find_library_file(self, dirs, lib, debug=0): for dir in dirs: shared = os.path.join( From 80830960c062d2faed9375840f036eefe109c991 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 15:01:38 +0000 Subject: [PATCH 0835/8469] Some more style improvements --- unixccompiler.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index e584007c00..1cfeebd136 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -18,8 +18,9 @@ __revision__ = "$Id$" import os, sys -from types import * +from types import StringType, NoneType from copy import copy + from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ @@ -43,8 +44,7 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. - -class UnixCCompiler (CCompiler): +class UnixCCompiler(CCompiler): compiler_type = 'unix' @@ -85,8 +85,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): - CCompiler.__init__ (self, verbose, dry_run, force) - + CCompiler.__init__(self, verbose, dry_run, force) def preprocess(self, source, @@ -95,7 +94,6 @@ def preprocess(self, include_dirs=None, extra_preargs=None, extra_postargs=None): - (_, macros, include_dirs) = \ self._fix_compile_args(None, macros, include_dirs) pp_opts = gen_preprocess_options(macros, include_dirs) @@ -119,7 +117,6 @@ def preprocess(self, except DistutilsExecError, msg: raise CompileError, msg - def compile(self, sources, output_dir=None, @@ -128,7 +125,6 @@ def compile(self, debug=0, extra_preargs=None, extra_postargs=None): - (output_dir, macros, include_dirs) = \ self._fix_compile_args(output_dir, macros, include_dirs) (objects, skip_sources) = self._prep_compile(sources, output_dir) @@ -161,15 +157,11 @@ def compile(self, # Return *all* object filenames, not just the ones we just built. return objects - # compile () - - def create_static_lib(self, objects, output_libname, output_dir=None, debug=0): - (objects, output_dir) = self._fix_object_args(objects, output_dir) output_filename = \ @@ -194,9 +186,6 @@ def create_static_lib(self, else: log.debug("skipping %s (up-to-date)", output_filename) - # create_static_lib () - - def link(self, target_desc, objects, @@ -210,7 +199,6 @@ def link(self, extra_preargs=None, extra_postargs=None, build_temp=None): - (objects, output_dir) = self._fix_object_args(objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) @@ -243,9 +231,6 @@ def link(self, else: log.debug("skipping %s (up-to-date)", output_filename) - # link () - - # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in # ccompiler.py. @@ -275,9 +260,7 @@ def runtime_library_dir_option(self, dir): def library_option(self, lib): return "-l" + lib - def find_library_file(self, dirs, lib, debug=0): - for dir in dirs: shared = os.path.join( dir, self.library_filename(lib, lib_type='shared')) @@ -300,7 +283,3 @@ def find_library_file(self, dirs, lib, debug=0): else: # Oops, didn't find it in *any* of 'dirs' return None - - # find_library_file () - -# class UnixCCompiler From 26e7e90cb2e973453758e43324128205af177296 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 15:14:10 +0000 Subject: [PATCH 0836/8469] More style changes and little cleanups. Remove __init__ that just called base class __init__ with same args. Fold long argument lists into fewer, shorter lines. Remove parens in tuple unpacks. Don't put multiple statements on one line with a semicolon. In find_library_file() compute the library_filename() upfront. --- unixccompiler.py | 96 +++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 63 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 1cfeebd136..abf7a2643b 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -79,22 +79,10 @@ class UnixCCompiler(CCompiler): dylib_lib_extension = ".dylib" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" - - - def __init__(self, - verbose=0, - dry_run=0, - force=0): - CCompiler.__init__(self, verbose, dry_run, force) - - def preprocess(self, - source, - output_file=None, - macros=None, - include_dirs=None, - extra_preargs=None, - extra_postargs=None): - (_, macros, include_dirs) = \ + def preprocess(self, source, + output_file=None, macros=None, include_dirs=None, + extra_preargs=None, extra_postargs=None): + ignore, macros, include_dirs = \ self._fix_compile_args(None, macros, include_dirs) pp_opts = gen_preprocess_options(macros, include_dirs) pp_args = self.preprocessor + pp_opts @@ -117,17 +105,12 @@ def preprocess(self, except DistutilsExecError, msg: raise CompileError, msg - def compile(self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - (output_dir, macros, include_dirs) = \ + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None): + output_dir, macros, include_dirs = \ self._fix_compile_args(output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile(sources, output_dir) + objects, skip_sources = self._prep_compile(sources, output_dir) # Figure out the options for the compiler command line. pp_opts = gen_preprocess_options(macros, include_dirs) @@ -142,27 +125,24 @@ def compile(self, # Compile all source files that weren't eliminated by # '_prep_compile()'. for i in range(len(sources)): - src = sources[i] ; obj = objects[i] + src = sources[i] + obj = objects[i] if skip_sources[src]: log.debug("skipping %s (%s up-to-date)", src, obj) else: self.mkpath(os.path.dirname(obj)) try: self.spawn(self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) + [src, '-o', obj] + extra_postargs) except DistutilsExecError, msg: raise CompileError, msg # Return *all* object filenames, not just the ones we just built. return objects - def create_static_lib(self, - objects, - output_libname, - output_dir=None, - debug=0): - (objects, output_dir) = self._fix_object_args(objects, output_dir) + def create_static_lib(self, objects, output_libname, + output_dir=None, debug=0): + objects, output_dir = self._fix_object_args(objects, output_dir) output_filename = \ self.library_filename(output_libname, output_dir=output_dir) @@ -186,25 +166,16 @@ def create_static_lib(self, else: log.debug("skipping %s (up-to-date)", output_filename) - def link(self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None): - (objects, output_dir) = self._fix_object_args(objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ + def link(self, target_desc, objects, + output_filename, output_dir=None, libraries=None, + library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None): + objects, output_dir = self._fix_object_args(objects, output_dir) + libraries, library_dirs, runtime_library_dirs = \ self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) - lib_opts = gen_lib_options(self, - library_dirs, runtime_library_dirs, + lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) if type(output_dir) not in (StringType, NoneType): raise TypeError, "'output_dir' must be a string or None" @@ -261,14 +232,14 @@ def library_option(self, lib): return "-l" + lib def find_library_file(self, dirs, lib, debug=0): + shared_f = self.library_filename(lib, lib_type='shared') + dylib_f = self.library_filename(lib, lib_type='dylib') + static_f = self.library_filename(lib, lib_type='static') + for dir in dirs: - shared = os.path.join( - dir, self.library_filename(lib, lib_type='shared')) - dylib = os.path.join( - dir, self.library_filename(lib, lib_type='dylib')) - static = os.path.join( - dir, self.library_filename(lib, lib_type='static')) - + shared = os.path.join(dir, shared_f) + dylib = os.path.join(dir, dylib_f) + static = os.path.join(dir, static_f) # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm @@ -279,7 +250,6 @@ def find_library_file(self, dirs, lib, debug=0): return shared elif os.path.exists(static): return static - - else: - # Oops, didn't find it in *any* of 'dirs' - return None + + # Oops, didn't find it in *any* of 'dirs' + return None From 538305bafac46ceda3d7702e7cf88a19a757caef Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 17:26:30 +0000 Subject: [PATCH 0837/8469] Extend compiler() method with optional depends argument. This change is not backwards compatible. If a compiler subclass exists outside the distutils package, it may get called with the unexpected keyword arg. It's easy to extend that compiler by having it ignore the argument, and not much harder to do the right thing. If this ends up being burdensome, we can change it before 2.3 final to work harder at compatibility. Also add _setup_compile() and _get_cc_args() helper functions that factor out much of the boilerplate for each concrete compiler class. --- ccompiler.py | 242 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 168 insertions(+), 74 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 4c8b881c3a..50246b8961 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -160,7 +160,6 @@ def set_executable(self, key, value): setattr(self, key, value) - def _find_macro (self, name): i = 0 for defn in self.macros: @@ -321,6 +320,100 @@ def set_link_objects (self, objects): # -- Private utility methods -------------------------------------- # (here for the convenience of subclasses) + # Helper method to prep compiler in subclass compile() methods + + def _setup_compile(self, outdir, macros, incdirs, sources, depends, + extra): + """Process arguments and decide which source files to compile. + + Merges _fix_compile_args() and _prep_compile(). + """ + if outdir is None: + outdir = self.output_dir + elif type(outdir) is not StringType: + raise TypeError, "'output_dir' must be a string or None" + + if macros is None: + macros = self.macros + elif type(macros) is ListType: + macros = macros + (self.macros or []) + else: + raise TypeError, "'macros' (if supplied) must be a list of tuples" + + if incdirs is None: + incdirs = self.include_dirs + elif type(incdirs) in (ListType, TupleType): + incdirs = list(incdirs) + (self.include_dirs or []) + else: + raise TypeError, \ + "'include_dirs' (if supplied) must be a list of strings" + + if extra is None: + extra = [] + + # Get the list of expected output (object) files + objects = self.object_filenames(sources, 1, outdir) + assert len(objects) == len(sources) + + # XXX should redo this code to eliminate skip_source entirely. + # XXX instead create build and issue skip messages inline + + if self.force: + skip_source = {} # rebuild everything + for source in sources: + skip_source[source] = 0 + elif depends is None: + # If depends is None, figure out which source files we + # have to recompile according to a simplistic check. We + # just compare the source and object file, no deep + # dependency checking involving header files. + skip_source = {} # rebuild everything + for source in sources: # no wait, rebuild nothing + skip_source[source] = 1 + + n_sources, n_objects = newer_pairwise(sources, objects) + for source in n_sources: # no really, only rebuild what's + skip_source[source] = 0 # out-of-date + else: + # If depends is a list of files, then do a different + # simplistic check. Assume that each object depends on + # its source and all files in the depends list. + skip_source = {} + # L contains all the depends plus a spot at the end for a + # particular source file + L = depends[:] + [None] + for i in range(len(objects)): + source = sources[i] + L[-1] = source + if newer_group(L, objects[i]): + skip_source[source] = 0 + else: + skip_source[source] = 1 + + pp_opts = gen_preprocess_options(macros, incdirs) + + build = {} + for i in range(len(sources)): + src = sources[i] + obj = objects[i] + ext = os.path.splitext(src)[1] + self.mkpath(os.path.dirname(obj)) + if skip_source[src]: + log.debug("skipping %s (%s up-to-date)", src, obj) + else: + build[obj] = src, ext + + return macros, objects, extra, pp_opts, build + + def _get_cc_args(self, pp_opts, debug, before): + # works for unixccompiler, emxccompiler, cygwinccompiler + cc_args = pp_opts + ['-c'] + if debug: + cc_args[:0] = ['-g'] + if before: + cc_args[:0] = before + return cc_args + def _fix_compile_args (self, output_dir, macros, include_dirs): """Typecheck and fix-up some of the arguments to the 'compile()' method, and return fixed-up values. Specifically: if 'output_dir' @@ -341,8 +434,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): elif type (macros) is ListType: macros = macros + (self.macros or []) else: - raise TypeError, \ - "'macros' (if supplied) must be a list of tuples" + raise TypeError, "'macros' (if supplied) must be a list of tuples" if include_dirs is None: include_dirs = self.include_dirs @@ -352,40 +444,57 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): raise TypeError, \ "'include_dirs' (if supplied) must be a list of strings" - return (output_dir, macros, include_dirs) + return output_dir, macros, include_dirs # _fix_compile_args () - def _prep_compile (self, sources, output_dir): - """Determine the list of object files corresponding to 'sources', - and figure out which ones really need to be recompiled. Return a - list of all object files and a dictionary telling which source - files can be skipped. + def _prep_compile(self, sources, output_dir, depends=None): + """Decide which souce files must be recompiled. + + Determine the list of object files corresponding to 'sources', + and figure out which ones really need to be recompiled. + Return a list of all object files and a dictionary telling + which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames (sources, - strip_dir=1, - output_dir=output_dir) + objects = self.object_filenames(sources, strip_dir=1, + output_dir=output_dir) + assert len(objects) == len(sources) if self.force: skip_source = {} # rebuild everything for source in sources: skip_source[source] = 0 - else: - # Figure out which source files we have to recompile according - # to a simplistic check -- we just compare the source and - # object file, no deep dependency checking involving header - # files. + elif depends is None: + # If depends is None, figure out which source files we + # have to recompile according to a simplistic check. We + # just compare the source and object file, no deep + # dependency checking involving header files. skip_source = {} # rebuild everything for source in sources: # no wait, rebuild nothing skip_source[source] = 1 - (n_sources, n_objects) = newer_pairwise (sources, objects) + n_sources, n_objects = newer_pairwise(sources, objects) for source in n_sources: # no really, only rebuild what's skip_source[source] = 0 # out-of-date - - return (objects, skip_source) + else: + # If depends is a list of files, then do a different + # simplistic check. Assume that each object depends on + # its source and all files in the depends list. + skip_source = {} + # L contains all the depends plus a spot at the end for a + # particular source file + L = depends[:] + [None] + for i in range(len(objects)): + source = sources[i] + L[-1] = source + if newer_group(L, objects[i]): + skip_source[source] = 0 + else: + skip_source[source] = 1 + + return objects, skip_source # _prep_compile () @@ -484,22 +593,19 @@ def preprocess (self, """ pass - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - """Compile one or more source files. 'sources' must be a list of - filenames, most likely C/C++ files, but in reality anything that - can be handled by a particular compiler and compiler class - (eg. MSVCCompiler can handle resource files in 'sources'). Return - a list of object filenames, one per source filename in 'sources'. - Depending on the implementation, not all source files will - necessarily be compiled, but all corresponding object filenames - will be returned. + def compile(self, sources, output_dir=None, macros=None, + include_dirs=None, debug=0, extra_preargs=None, + extra_postargs=None, depends=None): + """Compile one or more source files. + + 'sources' must be a list of filenames, most likely C/C++ + files, but in reality anything that can be handled by a + particular compiler and compiler class (eg. MSVCCompiler can + handle resource files in 'sources'). Return a list of object + filenames, one per source filename in 'sources'. Depending on + the implementation, not all source files will necessarily be + compiled, but all corresponding object filenames will be + returned. If 'output_dir' is given, object files will be put under it, while retaining their original path component. That is, "foo/bar.c" @@ -530,6 +636,12 @@ def compile (self, for those occasions when the abstract compiler framework doesn't cut the mustard. + 'depends', if given, is a list of filenames that all targets + depend on. If a source file is older than any file in + depends, then the source file will be recompiled. This + supports dependency tracking, but only at a coarse + granularity. + Raises CompileError on failure. """ pass @@ -710,7 +822,6 @@ def find_library_file (self, dirs, lib, debug=0): """ raise NotImplementedError - # -- Filename generation methods ----------------------------------- # The default implementation of the filename generating methods are @@ -745,63 +856,46 @@ def find_library_file (self, dirs, lib, debug=0): # * exe_extension - # extension for executable files, eg. '' or '.exe' - def object_filenames (self, - source_filenames, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' + def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): + assert output_dir is not None obj_names = [] for src_name in source_filenames: - (base, ext) = os.path.splitext (src_name) + base, ext = os.path.splitext(src_name) if ext not in self.src_extensions: raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % \ - (ext, src_name) + "unknown file type '%s' (from '%s')" % (ext, src_name) if strip_dir: - base = os.path.basename (base) - obj_names.append (os.path.join (output_dir, - base + self.obj_extension)) + base = os.path.basename(base) + obj_names.append(os.path.join(output_dir, + base + self.obj_extension)) return obj_names - # object_filenames () - - - def shared_object_filename (self, - basename, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' + def shared_object_filename(self, basename, strip_dir=0, output_dir=''): + assert output_dir is not None if strip_dir: basename = os.path.basename (basename) - return os.path.join (output_dir, basename + self.shared_lib_extension) + return os.path.join(output_dir, basename + self.shared_lib_extension) - def executable_filename (self, - basename, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' + def executable_filename(self, basename, strip_dir=0, output_dir=''): + assert output_dir is not None if strip_dir: basename = os.path.basename (basename) return os.path.join(output_dir, basename + (self.exe_extension or '')) - def library_filename (self, - libname, - lib_type='static', # or 'shared' - strip_dir=0, - output_dir=''): - - if output_dir is None: output_dir = '' - if lib_type not in ("static","shared","dylib"): + def library_filename(self, libname, lib_type='static', # or 'shared' + strip_dir=0, output_dir=''): + assert output_dir is not None + if lib_type not in ("static", "shared", "dylib"): raise ValueError, "'lib_type' must be \"static\", \"shared\" or \"dylib\"" - fmt = getattr (self, lib_type + "_lib_format") - ext = getattr (self, lib_type + "_lib_extension") + fmt = getattr(self, lib_type + "_lib_format") + ext = getattr(self, lib_type + "_lib_extension") - (dir, base) = os.path.split (libname) + dir, base = os.path.split (libname) filename = fmt % (base, ext) if strip_dir: dir = '' - return os.path.join (output_dir, dir, filename) + return os.path.join(output_dir, dir, filename) # -- Utility methods ----------------------------------------------- From 155cee1b86894b12c00e663d6d8172b385700127 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 17:27:13 +0000 Subject: [PATCH 0838/8469] Add depends=None to the arglist for compile(). --- mwerkscompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 6242f12aa1..1f71c60cea 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -62,7 +62,8 @@ def compile (self, include_dirs=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + depends=None): (output_dir, macros, include_dirs) = \ self._fix_compile_args (output_dir, macros, include_dirs) self.__sources = sources From 2c28f1d7b189db2ed88625f504345e19d4be2e08 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 17:28:18 +0000 Subject: [PATCH 0839/8469] Refactor compile() method implementations. Always use _setup_compile() to do the grunt work of processing arguments, figuring out which files to compile, and emitting debug messages for files that are up-to-date. Use _get_cc_args() when possible. --- bcppcompiler.py | 101 +++++++++++++---------------- cygwinccompiler.py | 85 +++++++++---------------- emxccompiler.py | 69 +++++++------------- msvccompiler.py | 155 ++++++++++++++++++++------------------------- unixccompiler.py | 40 ++++-------- 5 files changed, 178 insertions(+), 272 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 019244cd16..6e9d6c64de 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -80,23 +80,13 @@ def __init__ (self, # -- Worker methods ------------------------------------------------ - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile (sources, output_dir) - - if extra_postargs is None: - extra_postargs = [] - - pp_opts = gen_preprocess_options (macros, include_dirs) + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) compile_opts = extra_preargs or [] compile_opts.append ('-c') if debug: @@ -104,50 +94,47 @@ def compile (self, else: compile_opts.extend (self.compile_options) - for i in range (len (sources)): - src = sources[i] ; obj = objects[i] - ext = (os.path.splitext (src))[1] + for obj, (src, ext) in build.items(): + # XXX why do the normpath here? + src = os.path.normpath(src) + obj = os.path.normpath(obj) + # XXX _setup_compile() did a mkpath() too but before the normpath. + # Is it possible to skip the normpath? + self.mkpath(os.path.dirname(obj)) - if skip_sources[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - src = os.path.normpath(src) - obj = os.path.normpath(obj) - self.mkpath(os.path.dirname(obj)) - - if ext == '.res': - # This is already a binary file -- skip it. - continue # the 'for' loop - if ext == '.rc': - # This needs to be compiled to a .res file -- do it now. - try: - self.spawn (["brcc32", "-fo", obj, src]) - except DistutilsExecError, msg: - raise CompileError, msg - continue # the 'for' loop - - # The next two are both for the real compiler. - if ext in self._c_extensions: - input_opt = "" - elif ext in self._cpp_extensions: - input_opt = "-P" - else: - # Unknown file type -- no extra options. The compiler - # will probably fail, but let it just in case this is a - # file the compiler recognizes even if we don't. - input_opt = "" - - output_opt = "-o" + obj - - # Compiler command line syntax is: "bcc32 [options] file(s)". - # Note that the source file names must appear at the end of - # the command line. + if ext == '.res': + # This is already a binary file -- skip it. + continue # the 'for' loop + if ext == '.rc': + # This needs to be compiled to a .res file -- do it now. try: - self.spawn ([self.cc] + compile_opts + pp_opts + - [input_opt, output_opt] + - extra_postargs + [src]) + self.spawn (["brcc32", "-fo", obj, src]) except DistutilsExecError, msg: raise CompileError, msg + continue # the 'for' loop + + # The next two are both for the real compiler. + if ext in self._c_extensions: + input_opt = "" + elif ext in self._cpp_extensions: + input_opt = "-P" + else: + # Unknown file type -- no extra options. The compiler + # will probably fail, but let it just in case this is a + # file the compiler recognizes even if we don't. + input_opt = "" + + output_opt = "-o" + obj + + # Compiler command line syntax is: "bcc32 [options] file(s)". + # Note that the source file names must appear at the end of + # the command line. + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs + [src]) + except DistutilsExecError, msg: + raise CompileError, msg return objects diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 443c9bcfb7..302293ac25 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -62,10 +62,7 @@ class CygwinCCompiler (UnixCCompiler): shared_lib_format = "%s%s" exe_extension = ".exe" - def __init__ (self, - verbose=0, - dry_run=0, - force=0): + def __init__ (self, verbose=0, dry_run=0, force=0): UnixCCompiler.__init__ (self, verbose, dry_run, force) @@ -74,11 +71,12 @@ def __init__ (self, (status, details)) if status is not CONFIG_H_OK: self.warn( - "Python's pyconfig.h doesn't seem to support your compiler. " + - ("Reason: %s." % details) + - "Compiling may fail because of undefined preprocessor macros.") + "Python's pyconfig.h doesn't seem to support your compiler. " + "Reason: %s. " + "Compiling may fail because of undefined preprocessor macros." + % details) - (self.gcc_version, self.ld_version, self.dllwrap_version) = \ + self.gcc_version, self.ld_version, self.dllwrap_version = \ get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, @@ -120,58 +118,33 @@ def __init__ (self, # we put here a adapted version of it. # (If we would call compile() in the base class, it would do some # initializations a second time, this is why all is done here.) - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile (sources, output_dir) - - # Figure out the options for the compiler command line. - pp_opts = gen_preprocess_options (macros, include_dirs) - cc_args = pp_opts + ['-c'] - if debug: - cc_args[:0] = ['-g'] - if extra_preargs: - cc_args[:0] = extra_preargs - if extra_postargs is None: - extra_postargs = [] - - # Compile all source files that weren't eliminated by - # '_prep_compile()'. - for i in range (len (sources)): - src = sources[i] ; obj = objects[i] - ext = (os.path.splitext (src))[1] - if skip_sources[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - self.mkpath (os.path.dirname (obj)) - if ext == '.rc' or ext == '.res': - # gcc needs '.res' and '.rc' compiled to object files !!! - try: - self.spawn (["windres","-i",src,"-o",obj]) - except DistutilsExecError, msg: - raise CompileError, msg - else: # for other files use the C-compiler - try: - self.spawn (self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) + cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) + + for obj, (src, ext) in build.items(): + if ext == '.rc' or ext == '.res': + # gcc needs '.res' and '.rc' compiled to object files !!! + try: + self.spawn (["windres","-i",src,"-o",obj]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn (self.compiler_so + cc_args + + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg # Return *all* object filenames, not just the ones we just built. return objects - # compile () - - def link (self, target_desc, objects, diff --git a/emxccompiler.py b/emxccompiler.py index 644c6fc391..c2c73b0dec 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -81,51 +81,30 @@ def __init__ (self, # we put here a adapted version of it. # (If we would call compile() in the base class, it would do some # initializations a second time, this is why all is done here.) - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile (sources, output_dir) - - # Figure out the options for the compiler command line. - pp_opts = gen_preprocess_options (macros, include_dirs) - cc_args = pp_opts + ['-c'] - if debug: - cc_args[:0] = ['-g'] - if extra_preargs: - cc_args[:0] = extra_preargs - if extra_postargs is None: - extra_postargs = [] - - # Compile all source files that weren't eliminated by - # '_prep_compile()'. - for i in range (len (sources)): - src = sources[i] ; obj = objects[i] - ext = (os.path.splitext (src))[1] - if skip_sources[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - self.mkpath (os.path.dirname (obj)) - if ext == '.rc': - # gcc requires '.rc' compiled to binary ('.res') files !!! - try: - self.spawn (["rc","-r",src]) - except DistutilsExecError, msg: - raise CompileError, msg - else: # for other files use the C-compiler - try: - self.spawn (self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg + + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) + cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) + + for obj, (src, ext) in build.items(): + if ext == '.rc': + # gcc requires '.rc' compiled to binary ('.res') files !!! + try: + self.spawn (["rc","-r",src]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn (self.compiler_so + cc_args + + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg # Return *all* object filenames, not just the ones we just built. return objects diff --git a/msvccompiler.py b/msvccompiler.py index ade8172d3b..8460eea967 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -277,101 +277,84 @@ def object_filenames (self, # object_filenames () - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None): - - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - (objects, skip_sources) = self._prep_compile (sources, output_dir) - - if extra_postargs is None: - extra_postargs = [] - - pp_opts = gen_preprocess_options (macros, include_dirs) + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) + compile_opts = extra_preargs or [] compile_opts.append ('/c') if debug: - compile_opts.extend (self.compile_options_debug) + compile_opts.extend(self.compile_options_debug) else: - compile_opts.extend (self.compile_options) - - for i in range (len (sources)): - src = sources[i] ; obj = objects[i] - ext = (os.path.splitext (src))[1] - - if skip_sources[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - self.mkpath (os.path.dirname (obj)) + compile_opts.extend(self.compile_options) - if debug: - # pass the full pathname to MSVC in debug mode, - # this allows the debugger to find the source file - # without asking the user to browse for it - src = os.path.abspath(src) - - if ext in self._c_extensions: - input_opt = "/Tc" + src - elif ext in self._cpp_extensions: - input_opt = "/Tp" + src - elif ext in self._rc_extensions: - # compile .RC to .RES file - input_opt = src - output_opt = "/fo" + obj - try: - self.spawn ([self.rc] + - [output_opt] + [input_opt]) - except DistutilsExecError, msg: - raise CompileError, msg - continue - elif ext in self._mc_extensions: - - # Compile .MC to .RC file to .RES file. - # * '-h dir' specifies the directory for the - # generated include file - # * '-r dir' specifies the target directory of the - # generated RC file and the binary message resource - # it includes - # - # For now (since there are no options to change this), - # we use the source-directory for the include file and - # the build directory for the RC file and message - # resources. This works at least for win32all. - - h_dir = os.path.dirname (src) - rc_dir = os.path.dirname (obj) - try: - # first compile .MC to .RC and .H file - self.spawn ([self.mc] + - ['-h', h_dir, '-r', rc_dir] + [src]) - base, _ = os.path.splitext (os.path.basename (src)) - rc_file = os.path.join (rc_dir, base + '.rc') - # then compile .RC to .RES file - self.spawn ([self.rc] + - ["/fo" + obj] + [rc_file]) - - except DistutilsExecError, msg: - raise CompileError, msg - continue - else: - # how to handle this file? - raise CompileError ( - "Don't know how to compile %s to %s" % \ - (src, obj)) + for obj, (src, ext) in build.items(): + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn ([self.rc] + + [output_opt] + [input_opt]) + except DistutilsExecError, msg: + raise CompileError, msg + continue + elif ext in self._mc_extensions: - output_opt = "/Fo" + obj + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + + h_dir = os.path.dirname (src) + rc_dir = os.path.dirname (obj) try: - self.spawn ([self.cc] + compile_opts + pp_opts + - [input_opt, output_opt] + - extra_postargs) + # first compile .MC to .RC and .H file + self.spawn ([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn ([self.rc] + + ["/fo" + obj] + [rc_file]) + except DistutilsExecError, msg: raise CompileError, msg + continue + else: + # how to handle this file? + raise CompileError ( + "Don't know how to compile %s to %s" % \ + (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg return objects diff --git a/unixccompiler.py b/unixccompiler.py index abf7a2643b..c887a88226 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -107,35 +107,19 @@ def preprocess(self, source, def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, - extra_preargs=None, extra_postargs=None): - output_dir, macros, include_dirs = \ - self._fix_compile_args(output_dir, macros, include_dirs) - objects, skip_sources = self._prep_compile(sources, output_dir) + extra_preargs=None, extra_postargs=None, depends=None): + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) + cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - # Figure out the options for the compiler command line. - pp_opts = gen_preprocess_options(macros, include_dirs) - cc_args = pp_opts + ['-c'] - if debug: - cc_args[:0] = ['-g'] - if extra_preargs: - cc_args[:0] = extra_preargs - if extra_postargs is None: - extra_postargs = [] - - # Compile all source files that weren't eliminated by - # '_prep_compile()'. - for i in range(len(sources)): - src = sources[i] - obj = objects[i] - if skip_sources[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - self.mkpath(os.path.dirname(obj)) - try: - self.spawn(self.compiler_so + cc_args + - [src, '-o', obj] + extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg + for obj, (src, ext) in build.items(): + try: + self.spawn(self.compiler_so + cc_args + + [src, '-o', obj] + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg # Return *all* object filenames, not just the ones we just built. return objects From 2c0f494c5782d2208257d403c1e4eecef2ef3305 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 13 Jun 2002 17:32:20 +0000 Subject: [PATCH 0840/8469] Extend dependency tracking so that .o files are rebuilt. Two new tests are needed: Don't skip building an extension if any of the depends files are newer than the target. Pass ext.depends to compiler.compile() so that it can track individual files. --- command/build_ext.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 21dd0dcd6e..943f30a4fb 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -388,7 +388,6 @@ def get_outputs (self): # get_outputs () def build_extensions(self): - # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) @@ -396,7 +395,6 @@ def build_extensions(self): self.build_extension(ext) def build_extension(self, ext): - sources = ext.sources if sources is None or type(sources) not in (ListType, TupleType): raise DistutilsSetupError, \ @@ -421,7 +419,6 @@ def build_extension(self, ext): else: ext_filename = os.path.join(self.build_lib, self.get_ext_filename(fullname)) - depends = sources + ext.depends if not (self.force or newer_group(depends, ext_filename, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) @@ -467,7 +464,8 @@ def build_extension(self, ext): macros=macros, include_dirs=ext.include_dirs, debug=self.debug, - extra_postargs=extra_args) + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # From 39105a6df67fb823a7f86283f0b514cccb7d708c Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 18 Jun 2002 18:40:54 +0000 Subject: [PATCH 0841/8469] Only import msvccompiler on win32 platforms. --- command/build_ext.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 943f30a4fb..6b6f2c7d57 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -624,17 +624,17 @@ def get_libraries (self, ext): # pyconfig.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. - from distutils.msvccompiler import MSVCCompiler - if sys.platform == "win32" and \ - not isinstance(self.compiler, MSVCCompiler): - template = "python%d%d" - if self.debug: - template = template + '_d' - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - # don't extend ext.libraries, it may be shared with other - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib] + if sys.platform == "win32": + from distutils.msvccompiler import MSVCCompiler + if not isinstance(self.compiler, MSVCCompiler): + template = "python%d%d" + if self.debug: + template = template + '_d' + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib] elif sys.platform == "os2emx": # EMX/GCC requires the python library explicitly, and I # believe VACPP does as well (though not confirmed) - AIM Apr01 From 34d756600f62023716bf0d11c1d4df69fe434199 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 18 Jun 2002 18:42:41 +0000 Subject: [PATCH 0842/8469] Add a default implementation of compile() to the base class. The default implementation calls _compile() to compile individual files. This method must be implemented by the subclass. This change factors out most of the remaining common code in all the compilers except mwerks. --- ccompiler.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 50246b8961..f1a50cbddc 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -644,8 +644,27 @@ def compile(self, sources, output_dir=None, macros=None, Raises CompileError on failure. """ - pass + # A concrete compiler class can either override this method + # entirely or implement _compile(). + + macros, objects, extra_postargs, pp_opts, build = \ + self._setup_compile(output_dir, macros, include_dirs, sources, + depends, extra_postargs) + cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) + + for obj, (src, ext) in build.items(): + self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) + + # Return *all* object filenames, not just the ones we just built. + return objects + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + """Compile 'src' to product 'obj'.""" + + # A concrete compiler class that does not override compile() + # should implement _compile(). + pass def create_static_lib (self, objects, From 0fac9b6c9635aa053f92312b8a489ab8b2fc502f Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 18 Jun 2002 18:48:55 +0000 Subject: [PATCH 0843/8469] Add implementation of _compile() and use default compile() method. --- cygwinccompiler.py | 45 ++++++++++++++----------------------------- emxccompiler.py | 48 +++++++++++++--------------------------------- unixccompiler.py | 24 ++++++----------------- 3 files changed, 33 insertions(+), 84 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 302293ac25..9aabd8a66b 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -113,37 +113,20 @@ def __init__ (self, verbose=0, dry_run=0, force=0): # __init__ () - # not much different of the compile method in UnixCCompiler, - # but we have to insert some lines in the middle of it, so - # we put here a adapted version of it. - # (If we would call compile() in the base class, it would do some - # initializations a second time, this is why all is done here.) - def compile(self, sources, - output_dir=None, macros=None, include_dirs=None, debug=0, - extra_preargs=None, extra_postargs=None, depends=None): - - macros, objects, extra_postargs, pp_opts, build = \ - self._setup_compile(output_dir, macros, include_dirs, sources, - depends, extra_postargs) - cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - - for obj, (src, ext) in build.items(): - if ext == '.rc' or ext == '.res': - # gcc needs '.res' and '.rc' compiled to object files !!! - try: - self.spawn (["windres","-i",src,"-o",obj]) - except DistutilsExecError, msg: - raise CompileError, msg - else: # for other files use the C-compiler - try: - self.spawn (self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - - # Return *all* object filenames, not just the ones we just built. - return objects + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + if ext == '.rc' or ext == '.res': + # gcc needs '.res' and '.rc' compiled to object files !!! + try: + self.spawn(["windres", "-i", src, "-o", obj]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg def link (self, target_desc, diff --git a/emxccompiler.py b/emxccompiler.py index c2c73b0dec..2dc4fbd091 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -76,41 +76,19 @@ def __init__ (self, # __init__ () - # not much different of the compile method in UnixCCompiler, - # but we have to insert some lines in the middle of it, so - # we put here a adapted version of it. - # (If we would call compile() in the base class, it would do some - # initializations a second time, this is why all is done here.) - - def compile(self, sources, - output_dir=None, macros=None, include_dirs=None, debug=0, - extra_preargs=None, extra_postargs=None, depends=None): - - macros, objects, extra_postargs, pp_opts, build = \ - self._setup_compile(output_dir, macros, include_dirs, sources, - depends, extra_postargs) - cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - - for obj, (src, ext) in build.items(): - if ext == '.rc': - # gcc requires '.rc' compiled to binary ('.res') files !!! - try: - self.spawn (["rc","-r",src]) - except DistutilsExecError, msg: - raise CompileError, msg - else: # for other files use the C-compiler - try: - self.spawn (self.compiler_so + cc_args + - [src, '-o', obj] + - extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - - # Return *all* object filenames, not just the ones we just built. - return objects - - # compile () - + def _compile(self, obj, src, ext, cc_args, extra_postargs): + if ext == '.rc': + # gcc requires '.rc' compiled to binary ('.res') files !!! + try: + self.spawn(["rc", "-r", src]) + except DistutilsExecError, msg: + raise CompileError, msg + else: # for other files use the C-compiler + try: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg def link (self, target_desc, diff --git a/unixccompiler.py b/unixccompiler.py index c887a88226..d94c384092 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -105,24 +105,12 @@ def preprocess(self, source, except DistutilsExecError, msg: raise CompileError, msg - def compile(self, sources, - output_dir=None, macros=None, include_dirs=None, debug=0, - extra_preargs=None, extra_postargs=None, depends=None): - - macros, objects, extra_postargs, pp_opts, build = \ - self._setup_compile(output_dir, macros, include_dirs, sources, - depends, extra_postargs) - cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - - for obj, (src, ext) in build.items(): - try: - self.spawn(self.compiler_so + cc_args + - [src, '-o', obj] + extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - - # Return *all* object filenames, not just the ones we just built. - return objects + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + try: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg def create_static_lib(self, objects, output_libname, output_dir=None, debug=0): From 38242c6fdae57a47aeb70eda52f3b6f2b651900d Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 18 Jun 2002 19:08:40 +0000 Subject: [PATCH 0844/8469] Define NDEBUG for releae builds, just like Python. XXX Why doesn't distutils on Windows use the same set of flags as Python? --- msvccompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 8460eea967..65b114353e 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -233,7 +233,8 @@ def __init__ (self, self.mc = "mc.exe" self.preprocess_options = None - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ] + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , + '/DNDEBUG'] self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', '/Z7', '/D_DEBUG'] From a0559d181e1cc8a522f7d416edde440d306b4818 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 26 Jun 2002 15:00:29 +0000 Subject: [PATCH 0845/8469] This module broke on the Mac (where it can't work, but distutils seems to import it anyway) because it imported pwd and grp. Moved the import to inside the routine where they're used. --- command/bdist_pkgtool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py index 51b89d978e..3b8ca2d2e7 100644 --- a/command/bdist_pkgtool.py +++ b/command/bdist_pkgtool.py @@ -6,7 +6,7 @@ Implements the Distutils 'bdist_pkgtool' command (create Solaris pkgtool distributions).""" -import os, string, sys, pwd, grp +import os, string, sys from types import * from distutils.util import get_platform from distutils.file_util import write_file @@ -281,6 +281,7 @@ def run (self): def _make_prototype(self): + import pwd, grp proto_file = ["i pkginfo"] if self.request: proto_file.extend(['i request']) From 88e0aef39dbc5f117ac936aa266650e7f6ab7079 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 26 Jun 2002 15:42:49 +0000 Subject: [PATCH 0846/8469] Fixed various MacPython-specific issues found by attempting to use the standard core setup.py for MacPython. --- mwerkscompiler.py | 34 +++++++++++++++++++++++++++++++--- sysconfig.py | 7 ++++++- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 1f71c60cea..5f567b9989 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -161,7 +161,7 @@ def link (self, return # Build the export file exportfilename = os.path.join(build_temp, exportname) - log.debug("\tCreate export file", exportfilename) + log.debug("\tCreate export file %s", exportfilename) fp = open(exportfilename, 'w') fp.write('%s\n'%export_symbols[0]) fp.close() @@ -182,7 +182,7 @@ def link (self, # because we pass this pathname to CodeWarrior in an AppleEvent, and CW # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) - log.debug("\tCreate XML file", xmlfilename) + log.debug("\tCreate XML file %s", xmlfilename) xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] @@ -191,7 +191,7 @@ def link (self, fp.close() # Generate the project. Again a full pathname. projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) - log.debug('\tCreate project file', projectfilename) + log.debug('\tCreate project file %s', projectfilename) mkcwproject.makeproject(xmlfilename, projectfilename) # And build it log.debug('\tBuild project') @@ -213,3 +213,31 @@ def _filename_to_abs(self, filename): if components[i] == '..': components[i] = '' return string.join(components, ':') + + def library_dir_option (self, dir): + """Return the compiler option to add 'dir' to the list of + directories searched for libraries. + """ + return # XXXX Not correct... + + def runtime_library_dir_option (self, dir): + """Return the compiler option to add 'dir' to the list of + directories searched for runtime libraries. + """ + # Nothing needed or Mwerks/Mac. + return + + def library_option (self, lib): + """Return the compiler option to add 'dir' to the list of libraries + linked into the shared library or executable. + """ + return + + def find_library_file (self, dirs, lib, debug=0): + """Search the specified list of directories for a static or shared + library file 'lib' and return the full path to that file. If + 'debug' true, look for a debugging version (if that makes sense on + the current platform). Return None if 'lib' wasn't found in any of + the specified directories. + """ + return 0 diff --git a/sysconfig.py b/sysconfig.py index 847b87240b..74394abc5a 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -66,7 +66,10 @@ def get_python_inc(plat_specific=0, prefix=None): elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": - return os.path.join(prefix, "Include") + if plat_specific: + return os.path.join(prefix, "Mac", "Include") + else: + return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: @@ -403,6 +406,8 @@ def _init_mac(): g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") + # These are used by the extension module build + g['srcdir'] = ':' global _config_vars _config_vars = g From a88699b8cec97f6868dbde077637389919a41ae7 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 26 Jun 2002 22:05:33 +0000 Subject: [PATCH 0847/8469] Whitespace normalization (remove tabs) --- sysconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 74394abc5a..e9b728eac8 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -66,10 +66,10 @@ def get_python_inc(plat_specific=0, prefix=None): elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": - if plat_specific: - return os.path.join(prefix, "Mac", "Include") - else: - return os.path.join(prefix, "Include") + if plat_specific: + return os.path.join(prefix, "Mac", "Include") + else: + return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: From 04369bde233174b17d0d9494125511641c3e69f9 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 27 Jun 2002 22:10:19 +0000 Subject: [PATCH 0848/8469] The standard definition file is now called mwerks_shcarbon_plugin.h. --- mwerkscompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 5f567b9989..cd66a09913 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -169,7 +169,7 @@ def link (self, if self.__macros: prefixfilename = os.path.join(os.getcwd(), os.path.join(build_temp, prefixname)) fp = open(prefixfilename, 'w') - fp.write('#include "mwerks_plugin_config.h"\n') + fp.write('#include "mwerks_shcarbon_config.h"\n') for name, value in self.__macros: if value is None: fp.write('#define %s\n'%name) From b15291038df11afa687d1e12480e0901a6567ed4 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Fri, 12 Jul 2002 09:16:44 +0000 Subject: [PATCH 0849/8469] Well, Fred never did explain why the code to determine whether the calling Python was installed was so complicated, so I simplified it. This should get the snake-farm's build scripts working again. --- sysconfig.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index e9b728eac8..48672d6a10 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -29,13 +29,9 @@ argv0_path = os.path.dirname(os.path.abspath(sys.executable)) landmark = os.path.join(argv0_path, "Modules", "Setup") -if not os.path.isfile(landmark): - python_build = 0 -elif os.path.isfile(os.path.join(argv0_path, "Lib", "os.py")): - python_build = 1 -else: - python_build = os.path.isfile(os.path.join(os.path.dirname(argv0_path), - "Lib", "os.py")) + +python_build = os.path.isfile(landmark) + del argv0_path, landmark From 3f0272e6f1efa1a3e4faf5afbf1bdc830ecf404f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 28 Jul 2002 10:49:37 +0000 Subject: [PATCH 0850/8469] Patch #543498: Use License: field instead of Copyright:. --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 808ddc14cb..dd9dc66108 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -348,7 +348,7 @@ def _make_spec_file(self): spec_file.append('Source0: %{name}-%{version}.tar.gz') spec_file.extend([ - 'Copyright: ' + self.distribution.get_license(), + 'License: ' + self.distribution.get_license(), 'Group: ' + self.group, 'BuildRoot: %{_tmppath}/%{name}-buildroot', 'Prefix: %{_prefix}', ]) From 9ffafc4502cbaf28984a9eb1fa3191b70607a678 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 29 Jul 2002 12:11:18 +0000 Subject: [PATCH 0851/8469] Recompiled the exe and updated bdist_wininst.py. --- command/bdist_wininst.py | 677 ++++++++++++++++++++------------------- 1 file changed, 343 insertions(+), 334 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index f018f4616f..71e51bfd37 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -261,356 +261,365 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAA+AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAAA/1p0ge7fzc3u383N7t/NzAKv/c3m383MUqPlzcLfzc/ir/XN5t/NzFKj3 -c3m383N7t/NzdLfzc3u38nPzt/NzGajgc3C383N9lPlzebfzc7yx9XN6t/NzUmljaHu383MAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAABQRQAATAEDAIRxcjwAAAAAAAAAAOAADwELAQYAAFAAAAAQAAAA -oAAA0PMAAACwAAAAAAEAAABAAAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAAAQAQAABAAAAAAAAAIA -AAAAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAADABAQCgAQAAAAABADABAAAAAAAAAAAA +AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1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AAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAA= """ # --- EOF --- From c715e1d18cfc2b74b8728ab418cb7dc9d7433bdf Mon Sep 17 00:00:00 2001 From: Andrew MacIntyre Date: Sun, 4 Aug 2002 06:17:08 +0000 Subject: [PATCH 0852/8469] add parameter missing following Jeremy's compiler class refactoring --- emxccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emxccompiler.py b/emxccompiler.py index 2dc4fbd091..91920eb366 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -76,7 +76,7 @@ def __init__ (self, # __init__ () - def _compile(self, obj, src, ext, cc_args, extra_postargs): + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): if ext == '.rc': # gcc requires '.rc' compiled to binary ('.res') files !!! try: From 3dcfe36f1c82f73bfad7d1eb3c3c8188de577415 Mon Sep 17 00:00:00 2001 From: Andrew MacIntyre Date: Sun, 4 Aug 2002 06:21:25 +0000 Subject: [PATCH 0853/8469] - comment improvement - implement viable library search routine for EMX --- emxccompiler.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/emxccompiler.py b/emxccompiler.py index 91920eb366..9cd9600c0e 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -177,7 +177,8 @@ def link (self, # -- Miscellaneous methods ----------------------------------------- - # overwrite the one from CCompiler to support rc and res-files + # override the object_filenames method from CCompiler to + # support rc and res-files def object_filenames (self, source_filenames, strip_dir=0, @@ -204,6 +205,29 @@ def object_filenames (self, # object_filenames () + # override the find_library_file method from UnixCCompiler + # to deal with file naming/searching differences + def find_library_file(self, dirs, lib, debug=0): + shortlib = '%s.lib' % lib + longlib = 'lib%s.lib' % lib # this form very rare + + # get EMX's default library directory search path + try: + emx_dirs = os.environ['LIBRARY_PATH'].split(';') + except KeyError: + emx_dirs = [] + + for dir in dirs + emx_dirs: + shortlibp = os.path.join(dir, shortlib) + longlibp = os.path.join(dir, longlib) + if os.path.exists(shortlibp): + return shortlibp + elif os.path.exists(longlibp): + return longlibp + + # Oops, didn't find it in *any* of 'dirs' + return None + # class EMXCCompiler From cec536c16d4f1efa7f0ee0c2cb56805f9aac6b69 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 9 Aug 2002 16:38:32 +0000 Subject: [PATCH 0854/8469] Massive changes from SF 589982 (tempfile.py rewrite, by Zack Weinberg). This changes all uses of deprecated tempfile functions to the recommended ones. --- command/bdist_wininst.py | 7 ++++--- util.py | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 71e51bfd37..b538319881 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -130,8 +130,9 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. - from tempfile import mktemp - archive_basename = mktemp() + from tempfile import NamedTemporaryFile + arc = NamedTemporaryFile(".zip") + archive_basename = arc.name[:-4] fullname = self.distribution.get_fullname() arcname = self.make_archive(archive_basename, "zip", root_dir=self.bdist_dir) @@ -139,7 +140,7 @@ def run (self): self.create_exe(arcname, fullname, self.bitmap) # remove the zip-file again log.debug("removing temporary file '%s'", arcname) - os.remove(arcname) + arc.close() if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) diff --git a/util.py b/util.py index 23c29ebb2a..d9c622487c 100644 --- a/util.py +++ b/util.py @@ -359,11 +359,11 @@ def byte_compile (py_files, # "Indirect" byte-compilation: write a temporary script and then # run it with the appropriate flags. if not direct: - from tempfile import mktemp - script_name = mktemp(".py") + from tempfile import mkstemp + (script_fd, script_name) = mkstemp(".py") log.info("writing byte-compilation script '%s'", script_name) if not dry_run: - script = open(script_name, "w") + script = os.fdopen(script_fd, "w") script.write("""\ from distutils.util import byte_compile From cf18671a7339251d55d6fcec6653e359574c2599 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 13 Aug 2002 17:42:57 +0000 Subject: [PATCH 0855/8469] SF bug #574235, convert_path fails with empty pathname --- util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index d9c622487c..8d22415496 100644 --- a/util.py +++ b/util.py @@ -84,9 +84,11 @@ def convert_path (pathname): """ if os.sep == '/': return pathname - if pathname and pathname[0] == '/': + if not pathname: + return pathname + if pathname[0] == '/': raise ValueError, "path '%s' cannot be absolute" % pathname - if pathname and pathname[-1] == '/': + if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname paths = string.split(pathname, '/') From 6dddf6bec77b5dcf69da39d556471f094eb8ecd8 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 9 Sep 2002 12:10:00 +0000 Subject: [PATCH 0856/8469] Include an empty body when checking for a header file (Bugfix candidate for 2.2, and likely 2.1 as well) --- command/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/config.py b/command/config.py index d74aa6a277..88b1586607 100644 --- a/command/config.py +++ b/command/config.py @@ -346,7 +346,8 @@ def check_header (self, header, include_dirs=None, exists and can be found by the preprocessor; return true if so, false otherwise. """ - return self.try_cpp(headers=[header], include_dirs=include_dirs) + return self.try_cpp(body="/* No body */", headers=[header], + include_dirs=include_dirs) # class config From 23ad69adc2c9dd95e91445962900405da7115026 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 9 Sep 2002 12:16:58 +0000 Subject: [PATCH 0857/8469] The .preprocess() method didn't work, because it didn't add the input file to the command-line arguments. Fix this by adding the source filename. --- unixccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unixccompiler.py b/unixccompiler.py index d94c384092..831717baca 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -92,6 +92,7 @@ def preprocess(self, source, pp_args[:0] = extra_preargs if extra_postargs: pp_args.extend(extra_postargs) + pp_args.append(source) # We need to preprocess: either we're being forced to, or we're # generating output to stdout, or there's a target output file and From dfe0dcd95667389986923e0815e82009a3137729 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 11 Sep 2002 16:28:52 +0000 Subject: [PATCH 0858/8469] Define DEBUG in a separate module to resolve circular references. --- debug.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 debug.py diff --git a/debug.py b/debug.py new file mode 100644 index 0000000000..7ca76d6c5c --- /dev/null +++ b/debug.py @@ -0,0 +1,6 @@ +import os + +# If DISTUTILS_DEBUG is anything other than the empty string, we run in +# debug mode. +DEBUG = os.environ.get('DISTUTILS_DEBUG') + From 788c442e3f321f5824f388132538e2cc1350fb35 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 11 Sep 2002 16:31:53 +0000 Subject: [PATCH 0859/8469] Use distutils.debug.DEBUG instead of distutils.core.DEBUG. Note that distutils.core.DEBUG still works if client code uses it, but the core code avoids circular references by using distutils.debug. --- ccompiler.py | 2 +- cmd.py | 2 +- command/bdist_rpm.py | 3 ++- command/install.py | 3 ++- core.py | 6 +----- dist.py | 2 +- filelist.py | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index f1a50cbddc..5a0641ea5c 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -923,7 +923,7 @@ def announce (self, msg, level=1): log.debug(msg) def debug_print (self, msg): - from distutils.core import DEBUG + from distutils.debug import DEBUG if DEBUG: print msg diff --git a/cmd.py b/cmd.py index 25ff3025b6..6a268184c0 100644 --- a/cmd.py +++ b/cmd.py @@ -198,7 +198,7 @@ def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ - from distutils.core import DEBUG + from distutils.debug import DEBUG if DEBUG: print msg sys.stdout.flush() diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index dd9dc66108..bbaad7dc7b 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -10,7 +10,8 @@ import sys, os, string import glob from types import * -from distutils.core import Command, DEBUG +from distutils.core import Command +from distutils.debug import DEBUG from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * diff --git a/command/install.py b/command/install.py index 322177f441..67f37893f5 100644 --- a/command/install.py +++ b/command/install.py @@ -10,7 +10,8 @@ import sys, os, string from types import * -from distutils.core import Command, DEBUG +from distutils.core import Command +from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file diff --git a/core.py b/core.py index 8a348ce3e5..9a6bff6b55 100644 --- a/core.py +++ b/core.py @@ -13,10 +13,7 @@ import sys, os from types import * -# If DISTUTILS_DEBUG is anything other than the empty string, we run in -# debug mode. -DEBUG = os.environ.get('DISTUTILS_DEBUG') - +from distutils.debug import DEBUG from distutils.errors import * from distutils.util import grok_environment_error @@ -25,7 +22,6 @@ from distutils.cmd import Command from distutils.extension import Extension - # This is a barebones help message generated displayed when the user # runs the setup script with no arguments at all. More useful help # is generated with various --help options: global help, list commands, diff --git a/dist.py b/dist.py index f995d58e9a..92cb8320da 100644 --- a/dist.py +++ b/dist.py @@ -16,7 +16,7 @@ from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape from distutils import log -from distutils.core import DEBUG +from distutils.debug import DEBUG # Regex to define acceptable Distutils command names. This is not *quite* # the same as a Python NAME -- I don't allow leading underscores. The fact diff --git a/filelist.py b/filelist.py index e2e2457c8b..b4f3269cf1 100644 --- a/filelist.py +++ b/filelist.py @@ -54,7 +54,7 @@ def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ - from distutils.core import DEBUG + from distutils.debug import DEBUG if DEBUG: print msg From 1e573796bb675500c52d99361415982b0f40f193 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 29 Sep 2002 00:25:51 +0000 Subject: [PATCH 0860/8469] Whitespace normalization (get rid of tabs). --- emxccompiler.py | 57 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/emxccompiler.py b/emxccompiler.py index 9cd9600c0e..7c3ad025bb 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -16,7 +16,7 @@ # of Python is only distributed with threads enabled. # # tested configurations: -# +# # * EMX gcc 2.81/EMX 0.9d fix03 # created 2001/5/7, Andrew MacIntyre, from Rene Liebscher's cywinccompiler.py @@ -40,7 +40,7 @@ class EMXCCompiler (UnixCCompiler): shared_lib_format = "%s%s" res_extension = ".res" # compiled resource file exe_extension = ".exe" - + def __init__ (self, verbose=0, dry_run=0, @@ -56,11 +56,11 @@ def __init__ (self, "Python's pyconfig.h doesn't seem to support your compiler. " + ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - + (self.gcc_version, self.ld_version) = \ get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % - (self.gcc_version, + (self.gcc_version, self.ld_version) ) # Hard-code GCC because that's what this is all about. @@ -73,7 +73,7 @@ def __init__ (self, # want the gcc library statically linked (so that we don't have # to distribute a version dependent on the compiler we have) self.dll_libraries=["gcc"] - + # __init__ () def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): @@ -83,7 +83,7 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): self.spawn(["rc", "-r", src]) except DistutilsExecError, msg: raise CompileError, msg - else: # for other files use the C-compiler + else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) @@ -103,12 +103,12 @@ def link (self, extra_preargs=None, extra_postargs=None, build_temp=None): - + # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) objects = copy.copy(objects or []) - + # Additional libraries libraries.extend(self.dll_libraries) @@ -118,10 +118,10 @@ def link (self, (target_desc != self.EXECUTABLE)): # (The linker doesn't do anything if output is up-to-date. # So it would probably better to check if we really need this, - # but for this we had to insert some unchanged parts of - # UnixCCompiler, and this is not what we want.) + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) - # we want to put some files in the same directory as the + # we want to put some files in the same directory as the # object files are, build_temp doesn't help much # where are the object files temp_dir = os.path.dirname(objects[0]) @@ -131,7 +131,7 @@ def link (self, # generate the filenames for these files def_file = os.path.join(temp_dir, dll_name + ".def") - + # Generate .def file contents = [ "LIBRARY %s INITINSTANCE TERMINSTANCE" % \ @@ -144,21 +144,21 @@ def link (self, "writing %s" % def_file) # next add options for def-file and to creating import libraries - # for gcc/ld the def-file is specified as any other object files + # for gcc/ld the def-file is specified as any other object files objects.append(def_file) #end: if ((export_symbols is not None) and # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): - + # who wants symbols and a many times larger output file - # should explicitly switch the debug mode on + # should explicitly switch the debug mode on # otherwise we let dllwrap/ld strip the output file - # (On my machine: 10KB < stripped_file < ??100KB + # (On my machine: 10KB < stripped_file < ??100KB # unstripped_file = stripped_file + XXX KB - # ( XXX=254 for a typical python extension)) - if not debug: - extra_preargs.append("-s") - + # ( XXX=254 for a typical python extension)) + if not debug: + extra_preargs.append("-s") + UnixCCompiler.link(self, target_desc, objects, @@ -172,7 +172,7 @@ def link (self, extra_preargs, extra_postargs, build_temp) - + # link () # -- Miscellaneous methods ----------------------------------------- @@ -196,7 +196,7 @@ def object_filenames (self, base = os.path.basename (base) if ext == '.rc': # these need to be compiled to object files - obj_names.append (os.path.join (output_dir, + obj_names.append (os.path.join (output_dir, base + self.res_extension)) else: obj_names.append (os.path.join (output_dir, @@ -216,7 +216,7 @@ def find_library_file(self, dirs, lib, debug=0): emx_dirs = os.environ['LIBRARY_PATH'].split(';') except KeyError: emx_dirs = [] - + for dir in dirs + emx_dirs: shortlibp = os.path.join(dir, shortlib) longlibp = os.path.join(dir, longlib) @@ -224,7 +224,7 @@ def find_library_file(self, dirs, lib, debug=0): return shortlibp elif os.path.exists(longlibp): return longlibp - + # Oops, didn't find it in *any* of 'dirs' return None @@ -266,15 +266,15 @@ def check_config_h(): # GCC, and the pyconfig.h file should be OK if string.find(sys.version,"GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") - + fn = sysconfig.get_config_h_filename() try: # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough + # But we do this only once, and it is fast enough f = open(fn) s = f.read() f.close() - + except IOError, exc: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing @@ -296,7 +296,7 @@ def get_versions(): from distutils.version import StrictVersion from distutils.spawn import find_executable import re - + gcc_exe = find_executable('gcc') if gcc_exe: out = os.popen(gcc_exe + ' -dumpversion','r') @@ -313,4 +313,3 @@ def get_versions(): # anyway - so we can link OMF DLLs ld_version = None return (gcc_version, ld_version) - From 4db3246f4f27f3cfd92a72024b56c7c60c6ac083 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 1 Oct 2002 04:14:17 +0000 Subject: [PATCH 0861/8469] Commit fix for SF 603831. Strangely, two out of three patches there seem already committed; but the essential one (get rid of the assert in object_filenames in ccompiler.py) was not yet applied. This makes the build procedure for Twisted work again. This is *not* a backport candidate despite the fact that identical code appears to exist in 2.2.2; Twisted builds fine there, so there must have been a change elsewhere. --- ccompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 5a0641ea5c..43dfa731d2 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -876,7 +876,8 @@ def find_library_file (self, dirs, lib, debug=0): # extension for executable files, eg. '' or '.exe' def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): - assert output_dir is not None + if output_dir is None: + output_dir = '' obj_names = [] for src_name in source_filenames: base, ext = os.path.splitext(src_name) From 1d52f144d021e9b66b6610b2dfc1c662182f7248 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 1 Oct 2002 17:39:59 +0000 Subject: [PATCH 0862/8469] save the verbose argument as an instance attributes. Subclasses of CCompiler may rely on the presence of self.verbose (SciPy's distutils appears to). --- ccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ccompiler.py b/ccompiler.py index 43dfa731d2..60d1caeed1 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -82,6 +82,7 @@ def __init__ (self, self.dry_run = dry_run self.force = force + self.verbose = verbose # 'output_dir': a common output directory for object, library, # shared object, and shared library files From 464cfeaa1514adce324231af0aba80aac19484d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Fri, 4 Oct 2002 09:30:06 +0000 Subject: [PATCH 0863/8469] Pulling Mark Alexander's contribution from CVS. --- command/__init__.py | 5 +- command/bdist.py | 17 +- command/bdist_packager.py | 227 --------------------- command/bdist_pkgtool.py | 411 -------------------------------------- command/bdist_sdux.py | 302 ---------------------------- 5 files changed, 14 insertions(+), 948 deletions(-) delete mode 100644 command/bdist_packager.py delete mode 100644 command/bdist_pkgtool.py delete mode 100644 command/bdist_sdux.py diff --git a/command/__init__.py b/command/__init__.py index 8143627559..e70429c807 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -21,8 +21,9 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', - 'bdist_sdux', - 'bdist_pkgtool', + # These two are reserved for future use: + #'bdist_sdux', + #'bdist_pkgtool', # Note: # bdist_packager is not included because it only provides # an abstract base class diff --git a/command/bdist.py b/command/bdist.py index f61611eb8d..454c9df119 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -52,7 +52,9 @@ class bdist (Command): ] # The following commands do not take a format option from bdist - no_format_option = ('bdist_rpm', 'bdist_sdux', 'bdist_pkgtool') + no_format_option = ('bdist_rpm', + #'bdist_sdux', 'bdist_pkgtool' + ) # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. @@ -62,20 +64,23 @@ class bdist (Command): # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', - 'wininst', 'zip', 'pkgtool', 'sdux'] + 'wininst', 'zip', + #'pkgtool', 'sdux' + ] # And the real information. format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), - 'zip': ('bdist_dumb', "ZIP file"), 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'zip': ('bdist_dumb', "ZIP file"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), 'bztar': ('bdist_dumb', "bzip2'ed tar file"), 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), 'wininst': ('bdist_wininst', "Windows executable installer"), 'zip': ('bdist_dumb', "ZIP file"), - 'pkgtool': ('bdist_pkgtool', - "Solaris pkgtool distribution"), - 'sdux': ('bdist_sdux', "HP-UX swinstall depot"), + #'pkgtool': ('bdist_pkgtool', + # "Solaris pkgtool distribution"), + #'sdux': ('bdist_sdux', "HP-UX swinstall depot"), } diff --git a/command/bdist_packager.py b/command/bdist_packager.py deleted file mode 100644 index 1960425511..0000000000 --- a/command/bdist_packager.py +++ /dev/null @@ -1,227 +0,0 @@ -"""distutils.command.bdist_ packager - -Modified from bdist_dumb by Mark W. Alexander - -Implements the Distutils 'bdist_packager' abstract command -to be subclassed by binary package creation commands. -""" - -__revision__ = "$Id: bdist_packager.py,v 0.1 2001/04/4 mwa" - -import os -from distutils.core import Command -from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree -from distutils.file_util import write_file -from distutils.errors import * -from distutils import log -import string, sys - -class bdist_packager (Command): - - description = "abstract base for package manager specific bdist commands" - -# XXX update user_options - user_options = [ - ('bdist-base=', None, - "base directory for creating built distributions"), - ('pkg-dir=', None, - "base directory for creating binary packages (defaults to \"binary\" under "), - ('dist-dir=', 'd', - "directory to put final RPM files in " - "(and .spec files if --spec-only)"), - ('category=', None, - "Software category (packager dependent format)"), - ('revision=', None, - "package revision number"), - ('icon=', None, - "Package icon"), - ('subpackages=', None, - "Comma seperated list of seperately packaged trees"), - ('preinstall=', None, - "preinstall script (Bourne shell code)"), - ('postinstall=', None, - "postinstall script (Bourne shell code)"), - ('preremove=', None, - "preremove script (Bourne shell code)"), - ('postremove=', None, - "postremove script (Bourne shell code)"), - ('requires=', None, - "capabilities required by this package"), - ('keep-temp', 'k', - "don't clean up RPM build directory"), - ('control-only', None, - "Generate package control files and stop"), - ('no-autorelocate', None, - "Inhibit automatic relocation to installed site-packages"), - ] - - boolean_options = ['keep-temp', 'control-only', 'no_autorelocate'] - - def ensure_string_not_none (self,option,default=None): - val = getattr(self,option) - if val is not None: - return - Command.ensure_string(self,option,default) - val = getattr(self,option) - if val is None: - raise DistutilsOptionError, "'%s' must be provided" % option - - def ensure_script(self, arg): - if not arg: - return - try: - self.ensure_string(arg) - except: - try: - self.ensure_filename(arg) - except: - raise RuntimeError, "cannot decipher script option (%s)" % arg - - def write_script (self,path,attr,default=None): - """ write the script specified in attr to path. if attr is None, - write use default instead """ - val = getattr(self,attr) - if not val: - if not default: - return - else: - setattr(self,attr,default) - val = default - if val != "": - log.info('Creating %s script', attr) - self.execute(write_file, - (path, self.get_script(attr)), - "writing '%s'" % path) - - def get_binary_name(self): - py_ver = sys.version[0:string.find(sys.version,' ')] - return self.name + '-' + self.version + '-' + \ - self.revision + '-' + py_ver - - def get_script (self, attr): - # accept a script as a string ("line\012line\012..."), - # a filename, or a list - # XXX We could probably get away with copy_file, but I'm - # guessing this will be more flexible later on.... - val = getattr(self, attr) - if val is None: - return None - try: - os.stat(val) - # script is a file - ret = [] - f = open(val) - ret = string.split(f.read(), "\012"); - f.close() - except: - if type(val) == type(""): - # script is a string - ret = string.split(val, "\012") - elif type(val) == type([]): - # script is a list - ret = val - else: - raise RuntimeError, \ - "cannot figure out what to do with 'request' option (%s)" \ - % val - return ret - - - def initialize_options (self): - self.keep_temp = 0 - self.control_only = 0 - self.no_autorelocate = 0 - self.pkg_dir = None - self.plat_name = None - self.icon = None - self.requires = None - self.subpackages = None - self.category = None - self.revision = None - - # PEP 241 Metadata - self.name = None - self.version = None - #self.url = None - #self.author = None - #self.author_email = None - #self.maintainer = None - #self.maintainer_email = None - #self.description = None - #self.long_description = None - #self.licence = None - #self.platforms = None - #self.keywords = None - self.root_package = None - - # package installation scripts - self.preinstall = None - self.postinstall = None - self.preremove = None - self.postremove = None - # initialize_options() - - - def finalize_options (self): - - if self.pkg_dir is None: - bdist_base = self.get_finalized_command('bdist').bdist_base - self.pkg_dir = os.path.join(bdist_base, 'binary') - - if not self.plat_name: - self.plat = self.distribution.get_platforms() - if self.distribution.has_ext_modules(): - self.plat_name = [sys.platform,] - else: - self.plat_name = ["noarch",] - - d = self.distribution - self.ensure_string_not_none('name', d.get_name()) - self.ensure_string_not_none('version', d.get_version()) - self.ensure_string('category') - self.ensure_string('revision',"1") - #self.ensure_string('url',d.get_url()) - if type(self.distribution.packages) == type([]): - self.root_package=self.distribution.packages[0] - else: - self.root_package=self.name - self.ensure_string('root_package',self.root_package) - #self.ensure_string_list('keywords') - #self.ensure_string_not_none('author', d.get_author()) - #self.ensure_string_not_none('author_email', d.get_author_email()) - self.ensure_filename('icon') - #self.ensure_string_not_none('maintainer', d.get_maintainer()) - #self.ensure_string_not_none('maintainer_email', - #d.get_maintainer_email()) - #self.ensure_string_not_none('description', d.get_description()) - #self.ensure_string_not_none('long_description', d.get_long_description()) - #if self.long_description=='UNKNOWN': - #self.long_description=self.description - #self.ensure_string_not_none('license', d.get_license()) - self.ensure_string_list('requires') - self.ensure_filename('preinstall') - self.ensure_filename('postinstall') - self.ensure_filename('preremove') - self.ensure_filename('postremove') - - # finalize_options() - - - def run (self): - - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ - self.run_command('build') - - install = self.reinitialize_command('install', reinit_subcommands=1) - install.root = self.pkg_dir - - log.info("installing to %s", self.pkg_dir) - self.run_command('install') - if not self.keep_temp: - remove_tree(self.pkg_dir, dry_run=self.dry_run) - - # run() - -# class bdist_packager diff --git a/command/bdist_pkgtool.py b/command/bdist_pkgtool.py deleted file mode 100644 index 3b8ca2d2e7..0000000000 --- a/command/bdist_pkgtool.py +++ /dev/null @@ -1,411 +0,0 @@ -"""distutils.command.bdist_pkgtool - - -Author: Mark W. Alexander - -Implements the Distutils 'bdist_pkgtool' command (create Solaris pkgtool -distributions).""" - -import os, string, sys -from types import * -from distutils.util import get_platform -from distutils.file_util import write_file -from distutils.errors import * -from distutils.command import bdist_packager -from distutils import sysconfig -from distutils import log -from commands import getoutput - -__revision__ = "$Id: bdist_pkgtool.py,v 0.3 mwa " - -# default request script - Is also wrapped around user's request script -# unless --no-autorelocate is requested. Finds the python site-packages -# directory and prompts for verification -DEFAULT_REQUEST="""#!/bin/sh -###################################################################### -# Distutils internal package relocation support # -###################################################################### - -PRODUCT="__DISTUTILS_NAME__" - -trap `exit 3` 15 -/usr/bin/which python 2>&1 >/dev/null -if [ $? -ne 0 ]; then - echo "The python interpretor needs to be on your path!" - echo - echo "If you have more than one, make sure the first one is where" - echo "you want this module installed:" - exit 1 -fi - -PY_DIR=`python -c "import sys;print '%s/lib/python%s' % (sys.exec_prefix,sys.version[0:3])" 2>/dev/null` -PY_PKG_DIR=`python -c "import sys;print '%s/lib/python%s/site-packages' % (sys.exec_prefix,sys.version[0:3])" 2>/dev/null` - -echo "" -if [ -z "${PY_DIR}" ]; then - echo "I can't seem to find the python distribution." - echo "I'm assuming the default path for site-packages" -else - BASEDIR="${PY_PKG_DIR}" - cat <&1 >/dev/null -if [ $? -ne 0 ]; then - echo "The python interpretor needs to be on your path!" - echo - echo "If you have more than one, make sure the first one is where" - echo "you want this module removed from" - exit 1 -fi - -/usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ -if [ $? -eq 0 ]; then - find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyc" -exec rm {} \; - find ${BASEDIR}/__DISTUTILS_NAME__ -name "*.pyo" -exec rm {} \; -fi -""" - -# default postremove removes the module directory _IF_ no files are -# there (Turns out this isn't needed if the preremove does it's job -# Left for posterity -DEFAULT_POSTREMOVE="""#!/bin/sh - -/usr/bin/test -d ${BASEDIR}/__DISTUTILS_NAME__ -if [ $? -eq 0 ]; then - if [ `find ${BASEDIR}/__DISTUTILS_NAME__ ! -type d | wc -l` -eq 0 ]; then - rm -rf ${BASEDIR}/__DISTUTILS_NAME__ - fi -fi -""" - -class bdist_pkgtool (bdist_packager.bdist_packager): - - description = "create an pkgtool (Solaris) package" - - user_options = bdist_packager.bdist_packager.user_options + [ - ('revision=', None, - "package revision number (PSTAMP)"), - ('pkg-abrev=', None, - "Abbreviation (9 characters or less) of the package name"), - ('compver=', None, - "file containing compatible versions of this package (man compver)"), - ('depend=', None, - "file containing dependencies for this package (man depend)"), - #('category=', None, - #"Software category"), - ('request=', None, - "request script (Bourne shell code)"), - ] - - def initialize_options (self): - # XXX Check for pkgtools on path... - bdist_packager.bdist_packager.initialize_options(self) - self.compver = None - self.depend = None - self.vendor = None - self.classes = None - self.request = None - self.pkg_abrev = None - self.revision = None - # I'm not sure I should need to do this, but the setup.cfg - # settings weren't showing up.... - options = self.distribution.get_option_dict('bdist_packager') - for key in options.keys(): - setattr(self,key,options[key][1]) - - # initialize_options() - - - def finalize_options (self): - global DEFAULT_REQUEST, DEFAULT_POSTINSTALL - global DEFAULT_PREREMOVE, DEFAULT_POSTREMOVE - if self.pkg_dir is None: - dist_dir = self.get_finalized_command('bdist').dist_dir - self.pkg_dir = os.path.join(dist_dir, "pkgtool") - - self.ensure_string('classes', None) - self.ensure_string('revision', "1") - self.ensure_script('request') - self.ensure_script('preinstall') - self.ensure_script('postinstall') - self.ensure_script('preremove') - self.ensure_script('postremove') - self.ensure_string('vendor', None) - if self.__dict__.has_key('author'): - if self.__dict__.has_key('author_email'): - self.ensure_string('vendor', - "%s <%s>" % (self.author, - self.author_email)) - else: - self.ensure_string('vendor', - "%s" % (self.author)) - self.ensure_string('category', "System,application") - self.ensure_script('compver') - self.ensure_script('depend') - bdist_packager.bdist_packager.finalize_options(self) - if self.pkg_abrev is None: - self.pkg_abrev=self.name - if len(self.pkg_abrev)>9: - raise DistutilsOptionError, \ - "pkg-abrev (%s) must be less than 9 characters" % self.pkg_abrev - # Update default scripts with our metadata name - DEFAULT_REQUEST = string.replace(DEFAULT_REQUEST, - "__DISTUTILS_NAME__", self.root_package) - DEFAULT_POSTINSTALL = string.replace(DEFAULT_POSTINSTALL, - "__DISTUTILS_NAME__", self.root_package) - DEFAULT_PREREMOVE = string.replace(DEFAULT_PREREMOVE, - "__DISTUTILS_NAME__", self.root_package) - DEFAULT_POSTREMOVE = string.replace(DEFAULT_POSTREMOVE, - "__DISTUTILS_NAME__", self.root_package) - - # finalize_options() - - - def make_package(self,root=None): - # make directories - self.mkpath(self.pkg_dir) - if root: - pkg_dir = self.pkg_dir+"/"+root - self.mkpath(pkg_dir) - else: - pkg_dir = self.pkg_dir - - self.reinitialize_command('install', reinit_subcommands=1) - # build package - log.info('Building package') - self.run_command('build') - log.info('Creating pkginfo file') - path = os.path.join(pkg_dir, "pkginfo") - self.execute(write_file, - (path, - self._make_info_file()), - "writing '%s'" % path) - # request script handling - if self.request==None: - self.request = self._make_request_script() - if self.request!="": - path = os.path.join(pkg_dir, "request") - self.execute(write_file, - (path, - self.request), - "writing '%s'" % path) - - # Create installation scripts, since compver & depend are - # user created files, they work just fine as scripts - self.write_script(os.path.join(pkg_dir, "postinstall"), - 'postinstall',DEFAULT_POSTINSTALL) - self.write_script(os.path.join(pkg_dir, "preinstall"), - 'preinstall',None) - self.write_script(os.path.join(pkg_dir, "preremove"), - 'preremove',DEFAULT_PREREMOVE) - self.write_script(os.path.join(pkg_dir, "postremove"), - 'postremove',None) - self.write_script(os.path.join(pkg_dir, "compver"), - 'compver',None) - self.write_script(os.path.join(pkg_dir, "depend"), - 'depend',None) - - log.info('Creating prototype file') - path = os.path.join(pkg_dir, "prototype") - self.execute(write_file, - (path, - self._make_prototype()), - "writing '%s'" % path) - - - if self.control_only: # stop if requested - return - - - log.info('Creating package') - pkg_cmd = ['pkgmk', '-o', '-f'] - pkg_cmd.append(path) - pkg_cmd.append('-b') - pkg_cmd.append(os.environ['PWD']) - self.spawn(pkg_cmd) - pkg_cmd = ['pkgtrans', '-s', '/var/spool/pkg'] - path = os.path.join(os.environ['PWD'],pkg_dir, - self.get_binary_name() + ".pkg") - log.info('Transferring package to ' + pkg_dir) - pkg_cmd.append(path) - pkg_cmd.append(self.pkg_abrev) - self.spawn(pkg_cmd) - os.system("rm -rf /var/spool/pkg/%s" % self.pkg_abrev) - - - def run (self): - if self.subpackages: - self.subpackages=string.split(self.subpackages,",") - for pkg in self.subpackages: - self.make_package(pkg) - else: - self.make_package() - # run() - - - def _make_prototype(self): - import pwd, grp - proto_file = ["i pkginfo"] - if self.request: - proto_file.extend(['i request']) - if self.postinstall: - proto_file.extend(['i postinstall']) - if self.postremove: - proto_file.extend(['i postremove']) - if self.preinstall: - proto_file.extend(['i preinstall']) - if self.preremove: - proto_file.extend(['i preremove']) - if self.compver: - proto_file.extend(['i compver']) - if self.requires: - proto_file.extend(['i depend']) - proto_file.extend(['!default 644 root bin']) - build = self.get_finalized_command('build') - - try: - self.distribution.packages[0] - file_list=string.split( - getoutput("pkgproto %s/%s=%s" % \ - (build.build_lib, self.distribution.packages[0], - self.distribution.packages[0])), "\012") - except: - file_list=string.split( - getoutput("pkgproto %s=" % (build.build_lib)),"\012") - ownership="%s %s" % (pwd.getpwuid(os.getuid())[0], - grp.getgrgid(os.getgid())[0]) - for i in range(len(file_list)): - file_list[i] = string.replace(file_list[i],ownership,"root bin") - proto_file.extend(file_list) - return proto_file - - def _make_request_script(self): - global DEFAULT_REQUEST - # A little different from other scripts, if we are to automatically - # relocate to the target site-packages, we have to wrap any provided - # script with the autorelocation script. If no script is provided, - # The request script will simply be the autorelocate script - if self.no_autorelocate==0: - request=string.split(DEFAULT_REQUEST,"\012") - else: - log.info('Creating relocation request script') - if self.request: - users_request=self.get_script('request') - if users_request!=None and users_request!=[]: - if self.no_autorelocate==0 and users_request[0][0:2]=="#!": - users_request.remove(users_request[0]) - for i in users_request: - request.append(i) - - if self.no_autorelocate==0: - request.append("#############################################") - request.append("# finalize relocation support #") - request.append("#############################################") - request.append('echo "BASEDIR=\\"${BASEDIR}\\"" >>$1') - return request - - def _make_info_file(self): - """Generate the text of a pkgtool info file and return it as a - list of strings (one per line). - """ - # definitions and headers - # PKG must be alphanumeric, < 9 characters - info_file = [ - 'PKG="%s"' % self.pkg_abrev, - 'NAME="%s"' % self.name, - 'VERSION="%s"' % self.version, - 'PSTAMP="%s"' % self.revision, - ] - info_file.extend(['VENDOR="%s (%s)"' % (self.distribution.maintainer, \ - self.distribution.license) ]) - info_file.extend(['EMAIL="%s"' % self.distribution.maintainer_email ]) - - p = self.distribution.get_platforms() - if p is None or p==['UNKNOWN']: - archs=getoutput('uname -p') - else: - archs=string.join(self.distribution.get_platforms(),',') - #else: - #print "Assuming a sparc architecure" - #archs='sparc' - info_file.extend(['ARCH="%s"' % archs ]) - - if self.distribution.get_url(): - info_file.extend(['HOTLINE="%s"' % self.distribution.get_url() ]) - if self.classes: - info_file.extend(['CLASSES="%s"' % self.classes ]) - if self.category: - info_file.extend(['CATEGORY="%s"' % self.category ]) - site=None - for i in sys.path: - if i[-13:]=="site-packages": - site=i - break - if site: - info_file.extend(['BASEDIR="%s"' % site ]) - - return info_file - - # _make_info_file () - - def _format_changelog(self, changelog): - """Format the changelog correctly and convert it to a list of strings - """ - if not changelog: - return changelog - new_changelog = [] - for line in string.split(string.strip(changelog), '\n'): - line = string.strip(line) - if line[0] == '*': - new_changelog.extend(['', line]) - elif line[0] == '-': - new_changelog.append(line) - else: - new_changelog.append(' ' + line) - - # strip trailing newline inserted by first changelog entry - if not new_changelog[0]: - del new_changelog[0] - - return new_changelog - - # _format_changelog() - -# class bdist_rpm diff --git a/command/bdist_sdux.py b/command/bdist_sdux.py deleted file mode 100644 index 875f3d88ce..0000000000 --- a/command/bdist_sdux.py +++ /dev/null @@ -1,302 +0,0 @@ -"""distutils.command.bdist_pkgtool - -Implements the Distutils 'bdist_sdux' command to create HP-UX -swinstall depot. -""" - -# Mark Alexander - -__revision__ = "$Id: bdist_sdux.py,v 0.2 " -import os, string -from types import * -from distutils.util import get_platform -from distutils.file_util import write_file -from distutils.errors import * -from distutils.command import bdist_packager -from distutils import log -import sys -from commands import getoutput - -DEFAULT_CHECKINSTALL="""#!/bin/sh -/usr/bin/which python 2>&1 >/dev/null -if [ $? -ne 0 ]; then - echo "ERROR: Python must be on your PATH" &>2 - echo "ERROR: (You may need to link it to /usr/bin) " &>2 - exit 1 -fi -PY_DIR=`python -c "import sys;print '%s/lib/python%s' % (sys.exec_prefix,sys.version[0:3])" #2>/dev/null` -PY_PKG_DIR=`python -c "import sys;print '%s/lib/python%s/site-packages' % (sys.exec_prefix,sys.version[0:3])" #2>/dev/null` -PY_LIB_DIR=`dirname $PY_PKG_DIR` - -if [ "`dirname ${SW_LOCATION}`" = "__DISTUTILS_PKG_DIR__" ]; then - # swinstall to default location - if [ "${PY_PKG_DIR}" != "__DISTUTILS_PKG_DIR__" ]; then - echo "ERROR: " &>2 - echo "ERROR: Python is not installed where this package expected!" &>2 - echo "ERROR: You need to manually relocate this package to your python installation." &>2 - echo "ERROR: " &>2 - echo "ERROR: Re-run swinstall specifying the product name:location, e.g.:" &>2 - echo "ERROR: " &>2 - echo "ERROR: swinstall -s [source] __DISTUTILS_NAME__:${PY_PKG_DIR}/__DISTUTILS_DIRNAME__" &>2 - echo "ERROR: " &>2 - echo "ERROR: to relocate this package to match your python installation" &>2 - echo "ERROR: " &>2 - exit 1 - fi -else - if [ "`dirname ${SW_LOCATION}`" != "${PY_PKG_DIR}" -a "`dirname ${SWLOCATION}`" != "${PY_LIB_DIR}" ]; then - echo "WARNING: " &>2 - echo "WARNING: Package is being installed outside the 'normal' python search path!" &>2 - echo "WARNING: Add ${SW_LOCATION} to PYTHONPATH to use this package" &>2 - echo "WARNING: " &>2 - fi -fi -""" - -DEFAULT_POSTINSTALL="""#!/bin/sh -/usr/bin/which python 2>&1 >/dev/null -if [ $? -ne 0 ]; then - echo "ERROR: Python must be on your PATH" &>2 - echo "ERROR: (You may need to link it to /usr/bin) " &>2 - exit 1 -fi -python -c "import compileall;compileall.compile_dir(\\"${SW_LOCATION}\\")" -""" - -DEFAULT_PREREMOVE="""#!/bin/sh -# remove compiled bytecode files -find ${SW_LOCATION} -name "*.pyc" -exec rm {} \; -find ${SW_LOCATION} -name "*.pyo" -exec rm {} \; -""" - -DEFAULT_POSTREMOVE="""#!/bin/sh -if [ `find ${SW_LOCATION} ! -type d | wc -l` -eq 0 ]; then - # remove if there's nothing but empty directories left - rm -rf ${SW_LOCATION} -fi -""" - -class bdist_sdux(bdist_packager.bdist_packager): - - description = "create an HP swinstall depot" - - user_options = bdist_packager.bdist_packager.user_options + [ - #('revision=', None, - #"package revision number (PSTAMP)"), - ('keep-permissions', None, - "Don't reset permissions and ownership to root/bin"), # XXX - ('corequisites=', None, - "corequisites"), # XXX - ('prerequisites=', None, - "prerequisites"), # XXX - #('category=', None, - #"Software category"), - ('checkinstall=', None, # XXX ala request - "checkinstall script (Bourne shell code)"), - ('configure=', None, # XXX - "configure script (Bourne shell code)"), - ('unconfigure=', None, # XXX - "unconfigure script (Bourne shell code)"), - ('verify=', None, # XXX - "verify script (Bourne shell code)"), - ('unpreinstall=', None, # XXX - "unpreinstall script (Bourne shell code)"), - ('unpostinstall=', None, # XXX - "unpostinstall script (Bourne shell code)"), - ] - - boolean_options = ['keep-permissions'] - - def initialize_options (self): - bdist_packager.bdist_packager.initialize_options(self) - self.corequisites = None - self.prerequesites = None - self.checkinstall = None - self.configure = None - self.unconfigure = None - self.verify = None - self.unpreinstall = None - self.unpostinstall = None - # More - self.copyright = None - self.readme = None - self.machine_type = None - self.os_name = None - self.os_release = None - self.directory = None - self.readme = None - self.copyright = None - self.architecture= None - self.keep_permissions= None - options = self.distribution.get_option_dict('bdist_packager') - for key in options.keys(): - setattr(self,key,options[key][1]) - - # initialize_options() - - - def finalize_options (self): - global DEFAULT_CHECKINSTALL, DEFAULT_POSTINSTALL - global DEFAULT_PREREMOVE, DEFAULT_POSTREMOVE - if self.pkg_dir==None: - dist_dir = self.get_finalized_command('bdist').dist_dir - self.pkg_dir = os.path.join(dist_dir, "sdux") - self.ensure_script('corequisites') - self.ensure_script('prerequesites') - self.ensure_script('checkinstall') - self.ensure_script('configure') - self.ensure_script('unconfigure') - self.ensure_script('verify') - self.ensure_script('unpreinstall') - self.ensure_script('unpostinstall') - self.ensure_script('copyright') - self.ensure_script('readme') - self.ensure_string('machine_type','*') - if not self.__dict__.has_key('platforms'): - # This is probably HP, but if it's not, use sys.platform - if sys.platform[0:5] == "hp-ux": - self.platforms = "HP-UX" - else: - self.platforms = string.upper(sys.platform) - else: - # we can only handle one - self.platforms=string.join(self.platforms[0]) - self.ensure_string('os_release','*') - self.ensure_string('directory','%s/lib/python%s/site-packages' % \ - (sys.exec_prefix, sys.version[0:3])) - bdist_packager.bdist_packager.finalize_options(self) - DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, - "__DISTUTILS_NAME__", self.name) - DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, - "__DISTUTILS_DIRNAME__", self.root_package) - DEFAULT_CHECKINSTALL = string.replace(DEFAULT_CHECKINSTALL, - "__DISTUTILS_PKG_DIR__", self.directory) - DEFAULT_POSTINSTALL = string.replace(DEFAULT_POSTINSTALL, - "__DISTUTILS_DIRNAME__", self.root_package) - #DEFAULT_PREREMOVE = string.replace(DEFAULT_PREREMOVE, - #"__DISTUTILS_NAME__", self.root_package) - #DEFAULT_POSTREMOVE = string.replace(DEFAULT_POSTREMOVE, - #"__DISTUTILS_NAME__", self.root_package) - # finalize_options() - - def run (self): - # make directories - self.mkpath(self.pkg_dir) - psf_path = os.path.join(self.pkg_dir, - "%s.psf" % self.get_binary_name()) - # build package - log.info('Building package') - self.run_command('build') - log.info('Creating psf file') - self.execute(write_file, - (psf_path, - self._make_control_file()), - "writing '%s'" % psf_path) - if self.control_only: # stop if requested - return - - log.info('Creating package') - spawn_cmd = ['swpackage', '-s'] - spawn_cmd.append(psf_path) - spawn_cmd.append('-x') - spawn_cmd.append('target_type=tape') - spawn_cmd.append('@') - spawn_cmd.append(self.pkg_dir+"/"+self.get_binary_name()+'.depot') - self.spawn(spawn_cmd) - - # run() - - - def _make_control_file(self): - # Generate a psf file and return it as list of strings (one per line). - # definitions and headers - title = "%s %s" % (self.maintainer,self.maintainer_email) - title=title[0:80] - #top=self.distribution.packages[0] - psf_file = [ - 'vendor', # Vendor information - ' tag %s' % "DISTUTILS", - ' title %s' % title, - ' description Distutils package maintainer (%s)' % self.license, - 'end', # end of vendor - 'product', # Product information - ' tag %s' % self.name, - ' title %s' % self.description, - ' description %s' % self.description, - ' revision %s' % self.version, - ' architecture %s' % self.platforms, - ' machine_type %s' % self.machine_type, - ' os_name %s' % self.platforms, - ' os_release %s' % self.os_release, - ' directory %s' % self.directory + "/" + self.root_package, - ] - - self.write_script(os.path.join(self.pkg_dir, "checkinstall"), - 'checkinstall',DEFAULT_CHECKINSTALL) - psf_file.extend([' checkinstall %s/checkinstall' % self.pkg_dir]) - self.write_script(os.path.join(self.pkg_dir, "postinstall"), - 'postinstall',DEFAULT_POSTINSTALL) - psf_file.extend([' postinstall %s/postinstall' % self.pkg_dir]) - self.write_script(os.path.join(self.pkg_dir, "preremove"), - 'preremove',DEFAULT_PREREMOVE) - psf_file.extend([' preremove %s/preremove' % self.pkg_dir]) - self.write_script(os.path.join(self.pkg_dir, "postremove"), - 'postremove',DEFAULT_POSTREMOVE) - psf_file.extend([' postremove %s/postremove' % self.pkg_dir]) - if self.preinstall: - self.write_script(self.pkg_dir+"/preinstall", 'preinstall', None) - psf_file.extend([' preinstall %s/preinstall' % self.pkg_dir]) - if self.configure: - self.write_script(self.pkg_dir+"/configure", 'configure', None) - psf_file.extend([' configure %s/configure' % self.pkg_dir]) - if self.unconfigure: - self.write_script(self.pkg_dir+"/unconfigure", 'unconfigure', None) - psf_file.extend([' unconfigure %s/unconfigure' % self.pkg_dir]) - if self.verify: - self.write_script(self.pkg_dir+"/verify", 'verify', None) - psf_file.extend([' verify %s/verify' % self.pkg_dir]) - if self.unpreinstall: - self.write_script(self.pkg_dir+"/unpreinstall", 'unpreinstall', None) - psf_file.extend([' unpreinstall %s/unpreinstall' % self.pkg_dir]) - if self.unpostinstall: - self.write_script(self.pkg_dir+"/unpostinstall", 'unpostinstall', None) - psf_file.extend([' unpostinstall %s/unpostinstall' % self.pkg_dir]) - psf_file.extend([' is_locatable true']) - #if self.long_description: - #psf_file.extend([self.long_description]) - if self.copyright: - # XX make a copyright file XXX - self.write_script('copyright') - psf_file.extend([' copyright Date: Mon, 7 Oct 2002 05:57:21 +0000 Subject: [PATCH 0864/8469] Patch #619493: Prefer rpmbuild over rpm if available. Backported to 2.2. --- command/bdist_rpm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index bbaad7dc7b..86a40947b4 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -282,6 +282,9 @@ def run (self): # build package log.info("building RPMs") rpm_cmd = ['rpm'] + if os.path.exists('/usr/bin/rpmbuild') or \ + os.path.exists('/bin/rpmbuild'): + rpm_cmd = ['rpmbuild'] if self.source_only: # what kind of RPMs? rpm_cmd.append('-bs') elif self.binary_only: From 6ed654260a646f4c8823e335597316c2a29038e5 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Wed, 9 Oct 2002 21:37:18 +0000 Subject: [PATCH 0865/8469] MacOSX linker doesn't understand -R flag at all, no matter how you feed it the flag. Punt and return a -L flag instead (returning "" gums up the command to be forked). --- unixccompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 831717baca..692e3eb477 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -196,7 +196,10 @@ def runtime_library_dir_option(self, dir): # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) - if compiler == "gcc" or compiler == "g++": + if sys.platform[:6] == "darwin": + # MacOSX's linker doesn't understand the -R flag at all + return "-L" + dir + elif compiler == "gcc" or compiler == "g++": return "-Wl,-R" + dir else: return "-R" + dir From 41f9cf2f3074f7626544b810e8995139bb842be9 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 15 Oct 2002 14:51:58 +0000 Subject: [PATCH 0866/8469] Revert the previous checkin - it didn't work anyway. --- command/bdist_wininst.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b538319881..71e51bfd37 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -130,9 +130,8 @@ def run (self): # And make an archive relative to the root of the # pseudo-installation tree. - from tempfile import NamedTemporaryFile - arc = NamedTemporaryFile(".zip") - archive_basename = arc.name[:-4] + from tempfile import mktemp + archive_basename = mktemp() fullname = self.distribution.get_fullname() arcname = self.make_archive(archive_basename, "zip", root_dir=self.bdist_dir) @@ -140,7 +139,7 @@ def run (self): self.create_exe(arcname, fullname, self.bitmap) # remove the zip-file again log.debug("removing temporary file '%s'", arcname) - arc.close() + os.remove(arcname) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) From a3f707d5f06386feabf8d3767faca67ef4a580cd Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 15 Oct 2002 19:45:25 +0000 Subject: [PATCH 0867/8469] Recreated after source changes. --- command/bdist_wininst.py | 630 +++++++++++++++++++-------------------- 1 file changed, 315 insertions(+), 315 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 71e51bfd37..a3526a7a04 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -264,7 +264,7 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwAQIUU9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAJAFAQAA +AAAAAAAAAAAAAAAAUEUAAEwBAwDeb6w9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAGAGAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -277,7 +277,7 @@ def get_exe_bytes (self): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAkSW5mbzogVGhpcyBmaWxlIGlz IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAxOTk2LTIwMDAgdGhlIFVQWCBUZWFtLiBB -bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCsm8FbzjNj4gCekAAIxFAAAA4AAAJgYA2//b +bGwgUmlnaHRzIFJlc2V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: Wed, 16 Oct 2002 17:51:38 +0000 Subject: [PATCH 0868/8469] Recreated after source changes. --- command/bdist_wininst.py | 638 +++++++++++++++++++-------------------- 1 file changed, 319 insertions(+), 319 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index a3526a7a04..d996bee35a 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -264,7 +264,7 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwDeb6w9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAGAGAQAA +AAAAAAAAAAAAAAAAUEUAAEwBAwCepq09AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAIAGAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -277,7 +277,7 @@ def get_exe_bytes (self): AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAkSW5mbzogVGhpcyBmaWxlIGlz IHBhY2tlZCB3aXRoIHRoZSBVUFggZXhlY3V0YWJsZSBwYWNrZXIgaHR0cDovL3VweC50c3gub3Jn ICQKACRJZDogVVBYIDEuMDEgQ29weXJpZ2h0IChDKSAx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bd148 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 31 Oct 2002 13:22:41 +0000 Subject: [PATCH 0869/8469] Make the Distribution() constructor forgiving of unknown keyword arguments, triggering a warning instead of raising an exception. (In 1.5.2/2.0, it will print to stderr.) Bugfix candidate for all previous versions. This changes behaviour, but the old behaviour wasn't very useful. If Distutils version X+1 adds a new keyword argument, using the new keyword means your setup.py file won't work with Distutils version X any more. --- dist.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 92cb8320da..c71cb36a94 100644 --- a/dist.py +++ b/dist.py @@ -12,6 +12,12 @@ import sys, os, string, re from types import * from copy import copy + +try: + import warnings +except: + warnings = None + from distutils.errors import * from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape @@ -206,8 +212,11 @@ def __init__ (self, attrs=None): elif hasattr(self, key): setattr(self, key, val) else: - raise DistutilsSetupError, \ - "invalid distribution option '%s'" % key + msg = "Unknown distribution option: %s" % repr(key) + if warnings is not None: + warnings.warn(msg) + else: + sys.stderr.write(msg + "\n") self.finalize_options() From 00c4a7c3a8e95dcb877acdf8d92421cc853c69cb Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 31 Oct 2002 13:39:33 +0000 Subject: [PATCH 0870/8469] Catch only ImportError --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index c71cb36a94..dbeeb8b1dc 100644 --- a/dist.py +++ b/dist.py @@ -15,7 +15,7 @@ try: import warnings -except: +except ImportError: warnings = None from distutils.errors import * From 763affe91fa9f53831b26e94b818e34d73c5a2cd Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 31 Oct 2002 14:26:37 +0000 Subject: [PATCH 0871/8469] Fixes SF bug#614051: win32 build_ext problem. --- command/build_ext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 6b6f2c7d57..11ab59528a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -635,6 +635,8 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + else: + return ext.libraries elif sys.platform == "os2emx": # EMX/GCC requires the python library explicitly, and I # believe VACPP does as well (though not confirmed) - AIM Apr01 From 42f8752d3cfc16950f11ddc0c462ec9c06cfd822 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Nov 2002 13:33:07 +0000 Subject: [PATCH 0872/8469] [Bug #570655] Fix misleading option text --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 86a40947b4..597b26c6ad 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -68,7 +68,7 @@ class bdist_rpm (Command): ('doc-files=', None, "list of documentation files (space or comma-separated)"), ('changelog=', None, - "path to RPM changelog"), + "RPM changelog"), ('icon=', None, "name of icon file"), ('provides=', None, From a5639c31c94c1fe14c1685072399798fa4ed1a82 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Nov 2002 13:45:15 +0000 Subject: [PATCH 0873/8469] Add get_distutil_options(); future setup.py files can use this to check whether the Distutils being used supports a particularly capability. (This idea was originally suggested by Juergen Hermann as a method on the Distribution class. I think it makes more sense as a function in core.py, and that's what this patch implements.) --- core.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core.py b/core.py index 9a6bff6b55..d180eb8cb6 100644 --- a/core.py +++ b/core.py @@ -227,3 +227,12 @@ def run_setup (script_name, script_args=None, stop_after="run"): return _setup_distribution # run_setup () + +def get_distutil_options (): + """Returns a list of strings recording changes to the Distutils. + + setup.py files can then do: + if 'optional-thing' in get_distutil_options(): + ... + """ + return [] From 1bd24104b8ac0fb4707a24204bfde7b5e30c93d4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Nov 2002 14:27:43 +0000 Subject: [PATCH 0874/8469] [Bug #620630] Flush stdout after logging every message. Without it, when output is redirected to a file, compiler error messages show up before Distutils prints the command being invoked. --- log.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/log.py b/log.py index f0a7865067..6aeb7c9aac 100644 --- a/log.py +++ b/log.py @@ -9,6 +9,8 @@ ERROR = 4 FATAL = 5 +import sys + class Log: def __init__(self, threshold=WARN): @@ -17,6 +19,7 @@ def __init__(self, threshold=WARN): def _log(self, level, msg, args): if level >= self.threshold: print msg % args + sys.stdout.flush() def log(self, level, msg, *args): self._log(level, msg, args) From 17cca1e870697be532a44be00137f801faad424d Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Nov 2002 19:50:03 +0000 Subject: [PATCH 0875/8469] [Patch #588809] Remove check of environment variables; sysconfig.py will do that now --- command/build_ext.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 11ab59528a..934b4576e6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -451,14 +451,6 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - # XXX and if we support CFLAGS, why not CC (compiler - # executable), CPPFLAGS (pre-processor options), and LDFLAGS - # (linker options) too? - # XXX should we use shlex to properly parse CFLAGS? - - if os.environ.has_key('CFLAGS'): - extra_args.extend(string.split(os.environ['CFLAGS'])) - objects = self.compiler.compile(sources, output_dir=self.build_temp, macros=macros, @@ -485,7 +477,6 @@ def build_extension(self, ext): objects.extend(ext.extra_objects) extra_args = ext.extra_link_args or [] - self.compiler.link_shared_object( objects, ext_filename, libraries=self.get_libraries(ext), From 4765756222ebf75cbba020854d4550f7e471f2f5 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Nov 2002 19:53:24 +0000 Subject: [PATCH 0876/8469] [Patch #588809] LDFLAGS support for build_ext.py, from Robert Weber customize_compiler() now looks at various environment variables and uses their values to override the configured C compiler/preprocessor/linker binary and flags. --- sysconfig.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 48672d6a10..e879fa149a 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -142,9 +142,25 @@ def customize_compiler(compiler): (cc, opt, ccshared, ldshared, so_ext) = \ get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') + if os.environ.has_key('CC'): + cc = os.environ['CC'] + if os.environ.has_key('CPP'): + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if os.environ.has_key('LDFLAGS'): + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if os.environ.has_key('CFLAGS'): + opt = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if os.environ.has_key('CPPFLAGS'): + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + opt = opt + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + cc_cmd = cc + ' ' + opt compiler.set_executables( - preprocessor=cc + " -E", # not always! + preprocessor=cpp, compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, linker_so=ldshared, From 8c157b7b9e0b11cd6274e6fdbb476e142d61951f Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 5 Nov 2002 10:06:19 +0000 Subject: [PATCH 0877/8469] Must now give the basename - not including directories - of the install-script on the command line. Recreated after recompilation of wininst.exe. --- command/bdist_wininst.py | 704 ++++++++++++++++++++------------------- 1 file changed, 358 insertions(+), 346 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d996bee35a..029a026b62 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -41,8 +41,8 @@ class bdist_wininst (Command): ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ('install-script=', None, - "installation script to be run after installation" - " or before deinstallation"), + "basename of installation script to be run after" + "installation or before deinstallation"), ] boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', @@ -78,11 +78,14 @@ def finalize_options (self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) - if self.install_script and \ - self.install_script not in self.distribution.scripts: - raise DistutilsOptionError, \ - "install_script '%s' not found in scripts" % self.install_script - + if self.install_script: + for script in self.distribution.scripts: + if self.install_script == os.path.basename(script): + break + else: + raise DistutilsOptionError, \ + "install_script '%s' not found in scripts" % \ + self.install_script # finalize_options() @@ -264,362 +267,371 @@ def get_exe_bytes (self): AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwCepq09AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAIAGAQAA +AAAAAAAAAAAAAAAAUEUAAEwBAwAvl8c9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAMAGAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVUFgwAAAAAACwAAAAEAAAAAAAAAAEAAAA -AAAAAAAAAAAAAACAAADgVVBYMQAAAAAAUAAAAMAAAABIAAAABAAAAAAAAAAAAAAAAAAAQAAA4C5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AAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAA= +AAAAAAAAAAAAAAAAAAAAAA== """ # --- EOF --- From 47474c30d9a5ba83990c5370f74eba40d166d84c Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Tue, 5 Nov 2002 16:12:02 +0000 Subject: [PATCH 0878/8469] This patch fixes the following bugs: [#413582] g++ must be called for c++ extensions [#454030] distutils cannot link C++ code with GCC topdir = "Lib/distutils" * bcppcompiler.py (BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (BCPPCompiler.link): Included target_lang parameter. * msvccompiler.py (MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs and extra_postargs parameters. Included target_lang parameter. (MSVCCompiler.link): Included target_lang parameter. * ccompiler.py (CCompiler): New language_map and language_order attributes, used by CCompiler.detect_language(). (CCompiler.detect_language): New method, will return the language of a given source, or list of sources. Individual source language is detected using the language_map dict. When mixed sources are used, language_order will stablish the language precedence. (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable, CCompiler.link_shared_object, CCompiler.link_shared_lib): Inlcuded target_lang parameter. * cygwinccompiler.py (CygwinCCompiler.link): Included target_lang parameter. * emxccompiler.py (EMXCCompiler.link): Included target_lang parameter. * mwerkscompiler.py (MWerksCompiler.link): Included target_lang parameter. * extension.py (Extension.__init__): New 'language' parameter/attribute, initialized to None by default. If provided will overlap the automatic detection made by CCompiler.detect_language(), in build_ext command. * sysconfig.py (customize_compiler): Check Makefile for CXX option, and also the environment variable CXX. Use the resulting value in the 'compiler_cxx' parameter of compiler.set_executables(). * unixccompiler.py (UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting to 'cc'. (UnixCCompiler.create_static_lib): Included target_lang parameter. (UnixCCompiler.link): Included target_lang parameter, and made linker command use compiler_cxx, if target_lang is 'c++'. * command/build_ext.py (build_ext.build_extension): Pass new ext.language attribute to compiler.link_shared_object()'s target_lang parameter. If ext.language is not provided, detect language using compiler.detect_language(sources) instead. * command/config.py (config._link): Pass already available lang parameter as target_lang parameter of compiler.link_executable(). --- bcppcompiler.py | 10 +++---- ccompiler.py | 63 ++++++++++++++++++++++++++++++++++++++------ command/build_ext.py | 6 ++++- command/config.py | 3 ++- cygwinccompiler.py | 6 +++-- emxccompiler.py | 6 +++-- extension.py | 5 ++++ msvccompiler.py | 10 +++---- mwerkscompiler.py | 3 ++- sysconfig.py | 7 +++-- unixccompiler.py | 12 ++++++--- 11 files changed, 96 insertions(+), 35 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 6e9d6c64de..abe302a804 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -146,8 +146,7 @@ def create_static_lib (self, output_libname, output_dir=None, debug=0, - extra_preargs=None, - extra_postargs=None): + target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ @@ -157,10 +156,6 @@ def create_static_lib (self, lib_args = [output_filename, '/u'] + objects if debug: pass # XXX what goes here? - if extra_preargs: - lib_args[:0] = extra_preargs - if extra_postargs: - lib_args.extend (extra_postargs) try: self.spawn ([self.lib] + lib_args) except DistutilsExecError, msg: @@ -183,7 +178,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): # XXX this ignores 'build_temp'! should follow the lead of # msvccompiler.py diff --git a/ccompiler.py b/ccompiler.py index 60d1caeed1..317e21efb4 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -74,6 +74,19 @@ class CCompiler: shared_lib_format = None # prob. same as static_lib_format exe_extension = None # string + # Default language settings. language_map is used to detect a source + # file or Extension target language, checking source filenames. + # language_order is used to detect the language precedence, when deciding + # what language to use when mixing source types. For example, if some + # extension has two files with ".c" extension, and one with ".cpp", it + # is still linked as c++. + language_map = {".c" : "c", + ".cc" : "c++", + ".cpp" : "c++", + ".cxx" : "c++", + ".m" : "objc", + } + language_order = ["c++", "objc", "c"] def __init__ (self, verbose=0, @@ -572,6 +585,27 @@ def _need_link (self, objects, output_file): # _need_link () + def detect_language (self, sources): + """Detect the language of a given file, or list of files. Uses + language_map, and language_order to do the job. + """ + if type(sources) is not ListType: + sources = [sources] + lang = None + index = len(self.language_order) + for source in sources: + base, ext = os.path.splitext(source) + extlang = self.language_map.get(ext) + try: + extindex = self.language_order.index(extlang) + if extindex < index: + lang = extlang + index = extindex + except ValueError: + pass + return lang + + # detect_language () # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) @@ -671,7 +705,8 @@ def create_static_lib (self, objects, output_libname, output_dir=None, - debug=0): + debug=0, + target_lang=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to @@ -688,6 +723,10 @@ def create_static_lib (self, compile step where this matters: the 'debug' flag is included here just for consistency). + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + Raises LibError on failure. """ pass @@ -710,7 +749,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. @@ -748,6 +788,10 @@ def link (self, of course that they supply command-line arguments for the particular linker being used). + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + Raises LinkError on failure. """ raise NotImplementedError @@ -766,13 +810,14 @@ def link_shared_lib (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, - extra_preargs, extra_postargs, build_temp) + extra_preargs, extra_postargs, build_temp, target_lang) def link_shared_object (self, @@ -786,12 +831,13 @@ def link_shared_object (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, - extra_preargs, extra_postargs, build_temp) + extra_preargs, extra_postargs, build_temp, target_lang) def link_executable (self, @@ -803,11 +849,12 @@ def link_executable (self, runtime_library_dirs=None, debug=0, extra_preargs=None, - extra_postargs=None): + extra_postargs=None, + target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, - debug, extra_preargs, extra_postargs, None) + debug, extra_preargs, extra_postargs, None, target_lang) # -- Miscellaneous methods ----------------------------------------- diff --git a/command/build_ext.py b/command/build_ext.py index 934b4576e6..4bfc20c9d4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -477,6 +477,9 @@ def build_extension(self, ext): objects.extend(ext.extra_objects) extra_args = ext.extra_link_args or [] + # Detect target language, if not provided + language = ext.language or self.compiler.detect_language(sources) + self.compiler.link_shared_object( objects, ext_filename, libraries=self.get_libraries(ext), @@ -485,7 +488,8 @@ def build_extension(self, ext): extra_postargs=extra_args, export_symbols=self.get_export_symbols(ext), debug=self.debug, - build_temp=self.build_temp) + build_temp=self.build_temp, + target_lang=language) def swig_sources (self, sources): diff --git a/command/config.py b/command/config.py index 88b1586607..9ebe0d9191 100644 --- a/command/config.py +++ b/command/config.py @@ -148,7 +148,8 @@ def _link (self, body, prog = os.path.splitext(os.path.basename(src))[0] self.compiler.link_executable([obj], prog, libraries=libraries, - library_dirs=library_dirs) + library_dirs=library_dirs, + target_lang=lang) prog = prog + self.compiler.exe_extension self.temp_files.append(prog) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 9aabd8a66b..a046ee21c8 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -140,7 +140,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) @@ -218,7 +219,8 @@ def link (self, debug, extra_preargs, extra_postargs, - build_temp) + build_temp, + target_lang) # link () diff --git a/emxccompiler.py b/emxccompiler.py index 7c3ad025bb..624c0fecbd 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -102,7 +102,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) @@ -171,7 +172,8 @@ def link (self, debug, extra_preargs, extra_postargs, - build_temp) + build_temp, + target_lang) # link () diff --git a/extension.py b/extension.py index d73bb08e00..7fbeb4e1f1 100644 --- a/extension.py +++ b/extension.py @@ -75,6 +75,9 @@ class Extension: extension_name. depends : [string] list of files that the extension depends on + language : string + extension language (i.e. "c", "c++", "objc"). Will be detected + from the source extensions if not provided. """ def __init__ (self, name, sources, @@ -89,6 +92,7 @@ def __init__ (self, name, sources, extra_link_args=None, export_symbols=None, depends=None, + language=None, ): assert type(name) is StringType, "'name' must be a string" @@ -109,6 +113,7 @@ def __init__ (self, name, sources, self.extra_link_args = extra_link_args or [] self.export_symbols = export_symbols or [] self.depends = depends or [] + self.language = language # class Extension diff --git a/msvccompiler.py b/msvccompiler.py index 65b114353e..a2459ad032 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -367,8 +367,7 @@ def create_static_lib (self, output_libname, output_dir=None, debug=0, - extra_preargs=None, - extra_postargs=None): + target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ @@ -378,10 +377,6 @@ def create_static_lib (self, lib_args = objects + ['/OUT:' + output_filename] if debug: pass # XXX what goes here? - if extra_preargs: - lib_args[:0] = extra_preargs - if extra_postargs: - lib_args.extend (extra_postargs) try: self.spawn ([self.lib] + lib_args) except DistutilsExecError, msg: @@ -404,7 +399,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ diff --git a/mwerkscompiler.py b/mwerkscompiler.py index cd66a09913..8f62bf7d87 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -84,7 +84,8 @@ def link (self, debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None): + build_temp=None, + target_lang=None): # First fixup. (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ diff --git a/sysconfig.py b/sysconfig.py index e879fa149a..cc571888db 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -139,11 +139,13 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, opt, ccshared, ldshared, so_ext) = \ - get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') + (cc, cxx, opt, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'CXX', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): cc = os.environ['CC'] + if os.environ.has_key('CXX'): + cxx = os.environ['CXX'] if os.environ.has_key('CPP'): cpp = os.environ['CPP'] else: @@ -163,6 +165,7 @@ def customize_compiler(compiler): preprocessor=cpp, compiler=cc_cmd, compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, linker_so=ldshared, linker_exe=cc) diff --git a/unixccompiler.py b/unixccompiler.py index 692e3eb477..2f4546e1a7 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -57,6 +57,7 @@ class UnixCCompiler(CCompiler): executables = {'preprocessor' : None, 'compiler' : ["cc"], 'compiler_so' : ["cc"], + 'compiler_cxx' : ["cc"], 'linker_so' : ["cc", "-shared"], 'linker_exe' : ["cc"], 'archiver' : ["ar", "-cr"], @@ -114,7 +115,7 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): raise CompileError, msg def create_static_lib(self, objects, output_libname, - output_dir=None, debug=0): + output_dir=None, debug=0, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) output_filename = \ @@ -143,7 +144,7 @@ def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None): + extra_postargs=None, build_temp=None, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) libraries, library_dirs, runtime_library_dirs = \ self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) @@ -167,9 +168,12 @@ def link(self, target_desc, objects, self.mkpath(os.path.dirname(output_filename)) try: if target_desc == CCompiler.EXECUTABLE: - self.spawn(self.linker_exe + ld_args) + linker = self.linker_exe[:] else: - self.spawn(self.linker_so + ld_args) + linker = self.linker_so[:] + if target_lang == "c++" and self.compiler_cxx: + linker[0] = self.compiler_cxx[0] + self.spawn(linker + ld_args) except DistutilsExecError, msg: raise LinkError, msg else: From bc09b3f743da2691427c0a23f5b5aadfe90c7847 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 5 Nov 2002 20:11:08 +0000 Subject: [PATCH 0879/8469] Remove use of string module and reflow a couple of long lines. --- sysconfig.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index cc571888db..222648aa74 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -14,7 +14,6 @@ import os import re -import string import sys from errors import DistutilsPlatformError @@ -213,7 +212,7 @@ def parse_config_h(fp, g=None): m = define_rx.match(line) if m: n, v = m.group(1, 2) - try: v = string.atoi(v) + try: v = int(v) except ValueError: pass g[n] = v else: @@ -251,11 +250,11 @@ def parse_makefile(fn, g=None): m = _variable_rx.match(line) if m: n, v = m.group(1, 2) - v = string.strip(v) + v = v.strip() if "$" in v: notdone[n] = v else: - try: v = string.atoi(v) + try: v = int(v) except ValueError: pass done[n] = v @@ -272,9 +271,9 @@ def parse_makefile(fn, g=None): if "$" in after: notdone[name] = value else: - try: value = string.atoi(value) + try: value = int(value) except ValueError: - done[name] = string.strip(value) + done[name] = value.strip() else: done[name] = value del notdone[name] @@ -288,9 +287,9 @@ def parse_makefile(fn, g=None): if "$" in after: notdone[name] = value else: - try: value = string.atoi(value) + try: value = int(value) except ValueError: - done[name] = string.strip(value) + done[name] = value.strip() else: done[name] = value del notdone[name] @@ -369,8 +368,9 @@ def _init_posix(): # relative to the srcdir, which after installation no longer makes # sense. python_lib = get_python_lib(standard_lib=1) - linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) - linkerscript = os.path.join(python_lib, 'config', linkerscript_name) + linkerscript_name = os.path.basename(g['LDSHARED'].split()[0]) + linkerscript = os.path.join(python_lib, 'config', + linkerscript_name) # XXX this isn't the right place to do this: adding the Python # library to the link, if needed, should be in the "build_ext" From 152918876946cf1aba35f1a4e4e7a9ff53f37acc Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 5 Nov 2002 20:27:17 +0000 Subject: [PATCH 0880/8469] Repair inconsistent use of tabs and spaces. --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 317e21efb4..8898f51f59 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -589,7 +589,7 @@ def detect_language (self, sources): """Detect the language of a given file, or list of files. Uses language_map, and language_order to do the job. """ - if type(sources) is not ListType: + if type(sources) is not ListType: sources = [sources] lang = None index = len(self.language_order) From 5211b8478b5bd08e9237dbf35840eee043efb320 Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Wed, 6 Nov 2002 18:44:26 +0000 Subject: [PATCH 0881/8469] Fixed bug "[#466200] ability to specify a 'verify' script". * Lib/distutils/command/bdist_rpm.py (bdist_rpm.initialize_options): Included verify_script attribute. (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename. (bdist_rpm._make_spec_file): Included verify_script in script_options tuple. * Misc/NEWS Mention change. --- command/bdist_rpm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 597b26c6ad..0dad1ac474 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -129,6 +129,7 @@ def initialize_options (self): self.build_script = None self.install_script = None self.clean_script = None + self.verify_script = None self.pre_install = None self.post_install = None self.pre_uninstall = None @@ -208,6 +209,7 @@ def finalize_package_data (self): self.ensure_filename('build_script') self.ensure_filename('install_script') self.ensure_filename('clean_script') + self.ensure_filename('verify_script') self.ensure_filename('pre_install') self.ensure_filename('post_install') self.ensure_filename('pre_uninstall') @@ -424,6 +426,7 @@ def _make_spec_file(self): "--root=$RPM_BUILD_ROOT " "--record=INSTALLED_FILES") % self.python), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), + ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), ('post', 'post_install', None), ('preun', 'pre_uninstall', None), From 013ee1e07785651f7b0bc75fdd3944b6409e7a31 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 7 Nov 2002 16:41:38 +0000 Subject: [PATCH 0882/8469] Fix a small bug when sys.argv[0] has an absolute path. See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html --- core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.py b/core.py index d180eb8cb6..001e74be47 100644 --- a/core.py +++ b/core.py @@ -87,7 +87,7 @@ class found in 'cmdclass' is used in place of the default, which is klass = Distribution if not attrs.has_key('script_name'): - attrs['script_name'] = sys.argv[0] + attrs['script_name'] = os.path.basename(sys.argv[0]) if not attrs.has_key('script_args'): attrs['script_args'] = sys.argv[1:] From 5ebe4f2073b0cfd36cbbd01e7c3bd18ec7a1f773 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 7 Nov 2002 16:46:19 +0000 Subject: [PATCH 0883/8469] Use dynamic linking for the SHGetSpecialFolderPath function, it is not always available on Windows NT. When the function cannot be loaded, get_special_folder_path raises OSError, "function not available". Compiled the exe, and rebuilt bdist_wininst.py. --- command/bdist_wininst.py | 662 +++++++++++++++++++-------------------- 1 file changed, 331 insertions(+), 331 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 029a026b62..97a045824d 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -265,11 +265,11 @@ def get_exe_bytes (self): EXEDATA = """\ TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAAAtOHsRaVkVQmlZFUJpWRVCEkUZQmpZFUIGRh9CYlkVQupFG0JrWRVCBkYR -QmtZFUJpWRVCZlkVQmlZFELjWRVCC0YGQmRZFUJveh9Ca1kVQq5fE0JoWRVCUmljaGlZFUIAAAAA -AAAAAAAAAAAAAAAAUEUAAEwBAwAvl8c9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAMAGAQAA +ZGUuDQ0KJAAAAAAAAAAjSEomZykkdWcpJHVnKSR1HDUodWQpJHUINi51bCkkdeQ1KnVlKSR1CDYg +dWUpJHVnKSR1aCkkdWcpJXXuKSR1BTY3dWwpJHVhCi51ZSkkdaAvInVmKSR1UmljaGcpJHUAAAAA +AAAAAAAAAAAAAAAAUEUAAEwBAwCllso9AAAAAAAAAADgAA8BCwEGAABQAAAAEAAAALAAAAAHAQAA wAAAABABAAAAQAAAEAAAAAIAAAQAAAAAAAAABAAAAAAAAAAAIAEAAAQAAAAAAAACAAAAAAAQAAAQ -AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEA5AEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA +AAAAABAAABAAAAAAAAAQAAAAAAAAAAAAAAAwEQEAoAEAAAAQAQAwAQAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 0dad1ac474..88be5e8bf7 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -434,7 +434,7 @@ def _make_spec_file(self): ] for (rpm_opt, attr, default) in script_options: - # Insert contents of file referred to, if no file is refered to + # Insert contents of file referred to, if no file is referred to # use 'default' as contents of script val = getattr(self, attr) if val or default: From b309ef158743a718b302cf7566e03aa79cd600d7 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 8 Nov 2002 16:18:24 +0000 Subject: [PATCH 0885/8469] [Bug #233259] Ugly traceback for DistutilsPlatformError Fixed by catching all exceptions that are subclasses of DistutilsError, so only the error message will be printed. You can still get the whole traceback by enabling the Distutils debugging mode. --- core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core.py b/core.py index 001e74be47..51961454f6 100644 --- a/core.py +++ b/core.py @@ -145,9 +145,7 @@ class found in 'cmdclass' is used in place of the default, which is else: raise SystemExit, error - except (DistutilsExecError, - DistutilsFileError, - DistutilsOptionError, + except (DistutilsError, CCompilerError), msg: if DEBUG: raise From 8541483a41b056cfb0e5e2bf707f66c3afb1d0e6 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 13 Nov 2002 13:26:59 +0000 Subject: [PATCH 0886/8469] Update file --- README | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README b/README index f1db3c6c40..45c7ca8ca9 100644 --- a/README +++ b/README @@ -1,17 +1,21 @@ -This directory contains only a subset of the Distutils, specifically the -Python modules in the 'distutils' and 'distutils.command' packages. -Technically, this is all you need to distribute and install Python modules -using the Distutils. Most people will want some documentation and other -help, though. Currently, everything can be found at the Distutils web page: +This directory contains only a subset of the Distutils, specifically +the Python modules in the 'distutils' and 'distutils.command' +packages. This is all you need to distribute and install Python +modules using the Distutils. There is also a separately packaged +standalone version of the Distutils available for people who want to +upgrade the Distutils without upgrading Python, available from the +Distutils web page: http://www.python.org/sigs/distutils-sig/ -From there you can access the latest documentation, or download a standalone -Distutils release that includes all the code in this directory, plus -documentation, test scripts, examples, etc. +The standalone version includes all of the code in this directory, +plus documentation, test scripts, examples, etc. -The Distutils documentation isn't yet part of the standard Python -documentation set, but will be soon. +The Distutils documentation is divided into two documents, "Installing +Python Modules", which explains how to install Python packages, and +"Distributing Python Modules", which explains how to write setup.py +files. Both documents are part of the standard Python documentation +set, and are available from http://www.python.org/doc/current/ . Greg Ward (gward@python.net) From 02d558c61ba43389e4aba498833b2dfd6e55c26d Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 13 Nov 2002 17:03:05 +0000 Subject: [PATCH 0887/8469] Back out part of rev. 1.53, restoring the use of the string module. The two long lines have been reflowed differently; hopefully someone on BeOS can test them. Rev. 1.53 also converted string.atoi() to int(); I've left that alone. --- sysconfig.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 222648aa74..3d369b00de 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -14,6 +14,7 @@ import os import re +import string import sys from errors import DistutilsPlatformError @@ -250,7 +251,7 @@ def parse_makefile(fn, g=None): m = _variable_rx.match(line) if m: n, v = m.group(1, 2) - v = v.strip() + v = string.strip(v) if "$" in v: notdone[n] = v else: @@ -273,7 +274,7 @@ def parse_makefile(fn, g=None): else: try: value = int(value) except ValueError: - done[name] = value.strip() + done[name] = string.strip(value) else: done[name] = value del notdone[name] @@ -289,7 +290,7 @@ def parse_makefile(fn, g=None): else: try: value = int(value) except ValueError: - done[name] = value.strip() + done[name] = string.strip(value) else: done[name] = value del notdone[name] @@ -368,7 +369,8 @@ def _init_posix(): # relative to the srcdir, which after installation no longer makes # sense. python_lib = get_python_lib(standard_lib=1) - linkerscript_name = os.path.basename(g['LDSHARED'].split()[0]) + linkerscript_path = string.split(g['LDSHARED'])[0] + linkerscript_name = os.path.basename(linkerscript_path) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) From 87b5c0ec3c8aded916170321554f653bafe57030 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 13 Nov 2002 20:54:21 +0000 Subject: [PATCH 0888/8469] Allow unknown keyword arguments to the Extension class, and warn about them. --- extension.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/extension.py b/extension.py index 7fbeb4e1f1..9dc316a1a5 100644 --- a/extension.py +++ b/extension.py @@ -10,6 +10,10 @@ import os, string from types import * +try: + import warnings +except ImportError: + warnings = None # This class is really only used by the "build_ext" command, so it might # make sense to put it in distutils.command.build_ext. However, that @@ -93,8 +97,8 @@ def __init__ (self, name, sources, export_symbols=None, depends=None, language=None, + **kw # To catch unknown keywords ): - assert type(name) is StringType, "'name' must be a string" assert (type(sources) is ListType and map(type, sources) == [StringType]*len(sources)), \ @@ -115,6 +119,15 @@ def __init__ (self, name, sources, self.depends = depends or [] self.language = language + # If there are unknown keyword options, warn about them + if len(kw): + L = kw.keys() ; L.sort() + L = map(repr, L) + msg = "Unknown Extension options: " + string.join(L, ', ') + if warnings is not None: + warnings.warn(msg) + else: + sys.stderr.write(msg + '\n') # class Extension From 649fdd11b8ff8d08957390b343eca0dbc5a9e3a5 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 14 Nov 2002 01:29:00 +0000 Subject: [PATCH 0889/8469] [Bug #599248] ext module generation problem If you have source files srcdir1/foo.c and srcdir2/foo.c, the temporary .o for both files is written to build/temp./foo.o. This patch sets strip_dir to false for both calls to object_filename, so now the object files are written to temp./srcdir1/foo.o and .../srcdir2/foo.o. 2.2 bugfix candidate --- ccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 8898f51f59..8aca058b0f 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -366,7 +366,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra = [] # Get the list of expected output (object) files - objects = self.object_filenames(sources, 1, outdir) + objects = self.object_filenames(sources, 0, outdir) assert len(objects) == len(sources) # XXX should redo this code to eliminate skip_source entirely. @@ -472,7 +472,7 @@ def _prep_compile(self, sources, output_dir, depends=None): which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames(sources, strip_dir=1, + objects = self.object_filenames(sources, strip_dir=0, output_dir=output_dir) assert len(objects) == len(sources) From d47c1f5e8455cc049fc8c4ae2c00795e98c3abb7 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 14 Nov 2002 01:43:00 +0000 Subject: [PATCH 0890/8469] [Bug #550364] Add get_python_version() --- sysconfig.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 3d369b00de..b12b98deee 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -35,6 +35,14 @@ del argv0_path, landmark +def get_python_version (): + """Return a string containing the major and minor Python version, + leaving off the patchlevel. Sample return values could be '1.5' + or '2.2'. + """ + return sys.version[:3] + + def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. @@ -93,7 +101,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if os.name == "posix": libpython = os.path.join(prefix, - "lib", "python" + sys.version[:3]) + "lib", "python" + get_python_version()) if standard_lib: return libpython else: From fb4cdac4953c41880107d487afc61c4b7ca937b2 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 14 Nov 2002 01:44:35 +0000 Subject: [PATCH 0891/8469] [Bug #550364] Use sysconfig.get_python_version() --- command/bdist_wininst.py | 2 +- command/build_ext.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 97a045824d..dcc390e6d6 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -70,7 +70,7 @@ def finalize_options (self): if not self.target_version: self.target_version = "" if self.distribution.has_ext_modules(): - short_version = sys.version[:3] + short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ "target version can only be" + short_version diff --git a/command/build_ext.py b/command/build_ext.py index 4bfc20c9d4..250e539340 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -12,7 +12,7 @@ from types import * from distutils.core import Command from distutils.errors import * -from distutils.sysconfig import customize_compiler +from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension from distutils import log @@ -184,7 +184,7 @@ def finalize_options (self): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + sys.version[:3], + "python" + get_python_version(), "config")) else: # building python standard extensions From fdfa7f054ccb881256c4696ad9dadbb5f0f9aa1c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 14 Nov 2002 01:58:48 +0000 Subject: [PATCH 0892/8469] Fix docstring typo; remove 'created' line --- errors.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/errors.py b/errors.py index bec3464511..963d83377c 100644 --- a/errors.py +++ b/errors.py @@ -5,11 +5,9 @@ usually raised for errors that are obviously the end-user's fault (eg. bad command-line arguments). -This module safe to use in "from ... import *" mode; it only exports +This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -# created 1999/03/03, Greg Ward - __revision__ = "$Id$" class DistutilsError (Exception): From 4461f74828aed6a205722c0d9e697f8425771f8c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 14 Nov 2002 02:25:42 +0000 Subject: [PATCH 0893/8469] Remove 'created by' lines; people can use CVS for this, and the information is often out of date --- archive_util.py | 2 -- ccompiler.py | 2 -- cmd.py | 3 --- command/bdist.py | 2 -- command/bdist_dumb.py | 2 -- command/bdist_rpm.py | 2 -- command/bdist_wininst.py | 2 -- command/build.py | 2 -- command/build_clib.py | 3 --- command/build_ext.py | 2 -- command/build_py.py | 2 -- command/build_scripts.py | 2 -- command/config.py | 2 -- command/install.py | 2 -- command/install_headers.py | 2 -- command/install_lib.py | 2 -- command/sdist.py | 2 -- core.py | 2 -- cygwinccompiler.py | 2 -- dep_util.py | 2 -- dir_util.py | 2 -- dist.py | 3 --- emxccompiler.py | 2 -- extension.py | 2 -- fancy_getopt.py | 2 -- file_util.py | 2 -- filelist.py | 5 ----- msvccompiler.py | 2 +- spawn.py | 2 -- sysconfig.py | 1 - text_file.py | 2 -- unixccompiler.py | 2 -- util.py | 2 -- version.py | 2 -- 34 files changed, 1 insertion(+), 72 deletions(-) diff --git a/archive_util.py b/archive_util.py index 47fac0cb7d..98c1e55950 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,8 +3,6 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -# created 2000/04/03, Greg Ward (extracted from util.py) - __revision__ = "$Id$" import os diff --git a/ccompiler.py b/ccompiler.py index 8aca058b0f..3084947d58 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,8 +3,6 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -# created 1999/07/05, Greg Ward - __revision__ = "$Id$" import sys, os, re diff --git a/cmd.py b/cmd.py index 6a268184c0..b35eb07855 100644 --- a/cmd.py +++ b/cmd.py @@ -4,9 +4,6 @@ in the distutils.command package. """ -# created 2000/04/03, Greg Ward -# (extricated from core.py; actually dates back to the beginning) - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/bdist.py b/command/bdist.py index 454c9df119..e0648f3bdd 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -# created 2000/03/29, Greg Ward - __revision__ = "$Id$" import os, string diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 712fec884e..7562b70812 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,8 +4,6 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -# created 2000/03/29, Greg Ward - __revision__ = "$Id$" import os diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 88be5e8bf7..a7bc45f481 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -# created 2000/04/25, by Harry Henry Gebel - __revision__ = "$Id$" import sys, os, string diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index dcc390e6d6..c5cfd6d31b 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -# created 2000/06/02, Thomas Heller - __revision__ = "$Id$" import sys, os, string diff --git a/command/build.py b/command/build.py index 6bc92a43b8..0643948c92 100644 --- a/command/build.py +++ b/command/build.py @@ -2,8 +2,6 @@ Implements the Distutils 'build' command.""" -# created 1999/03/08, Greg Ward - __revision__ = "$Id$" import sys, os diff --git a/command/build_clib.py b/command/build_clib.py index f0207e4e0f..fe921fb88b 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,9 +4,6 @@ that is included in the module distribution and needed by an extension module.""" -# created (an empty husk) 1999/12/18, Greg Ward -# fleshed out 2000/02/03-04 - __revision__ = "$Id$" diff --git a/command/build_ext.py b/command/build_ext.py index 250e539340..0b3ef14933 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,8 +4,6 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -# created 1999/08/09, Greg Ward - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/build_py.py b/command/build_py.py index 0ab72c08f4..f61dc17a18 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_py' command.""" -# created 1999/03/08, Greg Ward - __revision__ = "$Id$" import sys, string, os diff --git a/command/build_scripts.py b/command/build_scripts.py index 211ade40fa..e4d6099bd5 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_scripts' command.""" -# created 2000/05/23, Bastian Kleineidam - __revision__ = "$Id$" import sys, os, re diff --git a/command/config.py b/command/config.py index 9ebe0d9191..abfa138530 100644 --- a/command/config.py +++ b/command/config.py @@ -9,8 +9,6 @@ this header file lives". """ -# created 2000/05/29, Greg Ward - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/install.py b/command/install.py index 67f37893f5..9adda4688a 100644 --- a/command/install.py +++ b/command/install.py @@ -4,8 +4,6 @@ from distutils import log -# created 1999/03/13, Greg Ward - __revision__ = "$Id$" import sys, os, string diff --git a/command/install_headers.py b/command/install_headers.py index 495d150c55..957ed239b1 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,8 +3,6 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -# created 2000/05/26, Greg Ward - __revision__ = "$Id$" import os diff --git a/command/install_lib.py b/command/install_lib.py index 1e771c619e..5da1c7aea7 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,5 +1,3 @@ -# created 1999/03/13, Greg Ward - __revision__ = "$Id$" import sys, os, string diff --git a/command/sdist.py b/command/sdist.py index 082aa88ce3..91807e6a3f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,8 +2,6 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -# created 1999/09/22, Greg Ward - __revision__ = "$Id$" import sys, os, string diff --git a/core.py b/core.py index 51961454f6..5be9e4ec29 100644 --- a/core.py +++ b/core.py @@ -6,8 +6,6 @@ really defined in distutils.dist and distutils.cmd. """ -# created 1999/03/01, Greg Ward - __revision__ = "$Id$" import sys, os diff --git a/cygwinccompiler.py b/cygwinccompiler.py index a046ee21c8..93f8803847 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -41,8 +41,6 @@ # in the dlls. # *** only the version of June 2000 shows these problems -# created 2000/05/05, Rene Liebscher - __revision__ = "$Id$" import os,sys,copy diff --git a/dep_util.py b/dep_util.py index bbb6d235b3..f49665483a 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,8 +4,6 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -# created 2000/04/03, Greg Ward (extracted from util.py) - __revision__ = "$Id$" import os diff --git a/dir_util.py b/dir_util.py index 8b3e06b2fa..d407e9ac5b 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,8 +2,6 @@ Utility functions for manipulating directories and directory trees.""" -# created 2000/04/03, Greg Ward (extracted from util.py) - __revision__ = "$Id$" import os diff --git a/dist.py b/dist.py index dbeeb8b1dc..3a690696bb 100644 --- a/dist.py +++ b/dist.py @@ -4,9 +4,6 @@ being built/installed/distributed. """ -# created 2000/04/03, Greg Ward -# (extricated from core.py; actually dates back to the beginning) - __revision__ = "$Id$" import sys, os, string, re diff --git a/emxccompiler.py b/emxccompiler.py index 624c0fecbd..76bdbae506 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -19,8 +19,6 @@ # # * EMX gcc 2.81/EMX 0.9d fix03 -# created 2001/5/7, Andrew MacIntyre, from Rene Liebscher's cywinccompiler.py - __revision__ = "$Id$" import os,sys,copy diff --git a/extension.py b/extension.py index 9dc316a1a5..5b197fa58d 100644 --- a/extension.py +++ b/extension.py @@ -3,8 +3,6 @@ Provides the Extension class, used to describe C/C++ extension modules in setup scripts.""" -# created 2000/05/30, Greg Ward - __revision__ = "$Id$" import os, string diff --git a/fancy_getopt.py b/fancy_getopt.py index 5de64e15da..f78b0a6854 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,8 +8,6 @@ * options set attributes of a passed-in object """ -# created 1999/03/03, Greg Ward - __revision__ = "$Id$" import sys, string, re diff --git a/file_util.py b/file_util.py index 56b1faee45..c2fa086f05 100644 --- a/file_util.py +++ b/file_util.py @@ -3,8 +3,6 @@ Utility functions for operating on single files. """ -# created 2000/04/03, Greg Ward (extracted from util.py) - __revision__ = "$Id$" import os diff --git a/filelist.py b/filelist.py index b4f3269cf1..4b5d47d02f 100644 --- a/filelist.py +++ b/filelist.py @@ -4,11 +4,6 @@ and building lists of files. """ -# created 2000/07/17, Rene Liebscher (as template.py) -# most parts taken from commands/sdist.py -# renamed 2000/07/29 (to filelist.py) and officially added to -# the Distutils source, Greg Ward - __revision__ = "$Id$" import os, string, re diff --git a/msvccompiler.py b/msvccompiler.py index a2459ad032..c2bd77de44 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -4,7 +4,7 @@ for the Microsoft Visual Studio.""" -# created 1999/08/19, Perry Stoll +# Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) diff --git a/spawn.py b/spawn.py index 4df6e097de..f94817d498 100644 --- a/spawn.py +++ b/spawn.py @@ -6,8 +6,6 @@ executable name. """ -# created 1999/07/24, Greg Ward - __revision__ = "$Id$" import sys, os, string diff --git a/sysconfig.py b/sysconfig.py index b12b98deee..aa3636f609 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -7,7 +7,6 @@ Written by: Fred L. Drake, Jr. Email: -Initial date: 17-Dec-1998 """ __revision__ = "$Id$" diff --git a/text_file.py b/text_file.py index 7086b1af56..67efd65e36 100644 --- a/text_file.py +++ b/text_file.py @@ -4,8 +4,6 @@ that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" -# created 1999/01/12, Greg Ward - __revision__ = "$Id$" from types import * diff --git a/unixccompiler.py b/unixccompiler.py index 2f4546e1a7..603dfe90cc 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -13,8 +13,6 @@ * link shared library handled by 'cc -shared' """ -# created 1999/07/05, Greg Ward - __revision__ = "$Id$" import os, sys diff --git a/util.py b/util.py index 8d22415496..9de6077fc6 100644 --- a/util.py +++ b/util.py @@ -4,8 +4,6 @@ one of the other *util.py modules. """ -# created 1999/03/08, Greg Ward - __revision__ = "$Id$" import sys, os, string, re diff --git a/version.py b/version.py index 02502dac95..71a5614719 100644 --- a/version.py +++ b/version.py @@ -4,8 +4,6 @@ # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # -# written by Greg Ward, 1998/12/17 -# # $Id$ # From 58e414fbe6bab66065fc5b5a0705980f578f4796 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 19 Nov 2002 13:12:28 +0000 Subject: [PATCH 0894/8469] Add comment to Distutil files about requiring 1.5.2 compatibility, as suggested by PEP 291. --- __init__.py | 2 ++ archive_util.py | 2 ++ bcppcompiler.py | 2 ++ ccompiler.py | 2 ++ cmd.py | 2 ++ command/__init__.py | 2 ++ command/bdist.py | 2 ++ command/bdist_dumb.py | 2 ++ command/bdist_rpm.py | 2 ++ command/bdist_wininst.py | 2 ++ command/build.py | 2 ++ command/build_clib.py | 2 ++ command/build_ext.py | 2 ++ command/build_py.py | 2 ++ command/build_scripts.py | 2 ++ command/clean.py | 2 ++ command/config.py | 2 ++ command/install.py | 2 ++ command/install_data.py | 2 ++ command/install_headers.py | 2 ++ command/install_lib.py | 2 ++ command/install_scripts.py | 2 ++ command/sdist.py | 2 ++ core.py | 2 ++ cygwinccompiler.py | 2 ++ debug.py | 4 ++++ dep_util.py | 2 ++ dir_util.py | 2 ++ dist.py | 2 ++ errors.py | 2 ++ fancy_getopt.py | 2 ++ file_util.py | 2 ++ filelist.py | 2 ++ log.py | 2 ++ msvccompiler.py | 3 ++- mwerkscompiler.py | 4 ++++ spawn.py | 2 ++ 37 files changed, 78 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 1055aa39c1..7873d297b3 100644 --- a/__init__.py +++ b/__init__.py @@ -8,6 +8,8 @@ setup (...) """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" __version__ = "1.0.3" diff --git a/archive_util.py b/archive_util.py index 98c1e55950..d1dc909520 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,6 +3,8 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/bcppcompiler.py b/bcppcompiler.py index abe302a804..cfbe04ac01 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,6 +11,8 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" diff --git a/ccompiler.py b/ccompiler.py index 3084947d58..edb9f7542f 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,6 +3,8 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, re diff --git a/cmd.py b/cmd.py index b35eb07855..1165f95124 100644 --- a/cmd.py +++ b/cmd.py @@ -4,6 +4,8 @@ in the distutils.command package. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string, re diff --git a/command/__init__.py b/command/__init__.py index e70429c807..fc6117166b 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -3,6 +3,8 @@ Package containing implementation of all the standard Distutils commands.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" __all__ = ['build', diff --git a/command/bdist.py b/command/bdist.py index e0648f3bdd..7c606ffc4d 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,6 +3,8 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os, string diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 7562b70812..d1cce55b20 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,6 +4,8 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index a7bc45f481..237cc70d25 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,6 +3,8 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index c5cfd6d31b..9c9fd10918 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,6 +3,8 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/command/build.py b/command/build.py index 0643948c92..78231541ec 100644 --- a/command/build.py +++ b/command/build.py @@ -2,6 +2,8 @@ Implements the Distutils 'build' command.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os diff --git a/command/build_clib.py b/command/build_clib.py index fe921fb88b..ef03ed7269 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,6 +4,8 @@ that is included in the module distribution and needed by an extension module.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" diff --git a/command/build_ext.py b/command/build_ext.py index 0b3ef14933..0c37768179 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,6 +4,8 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string, re diff --git a/command/build_py.py b/command/build_py.py index f61dc17a18..258d6d4ca0 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,6 +2,8 @@ Implements the Distutils 'build_py' command.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, string, os diff --git a/command/build_scripts.py b/command/build_scripts.py index e4d6099bd5..b7c11d472b 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,6 +2,8 @@ Implements the Distutils 'build_scripts' command.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, re diff --git a/command/clean.py b/command/clean.py index 36252d5174..41b22777bc 100644 --- a/command/clean.py +++ b/command/clean.py @@ -4,6 +4,8 @@ # contributed by Bastian Kleineidam , added 2000-03-18 +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/command/config.py b/command/config.py index abfa138530..b6f5ad1dc5 100644 --- a/command/config.py +++ b/command/config.py @@ -9,6 +9,8 @@ this header file lives". """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string, re diff --git a/command/install.py b/command/install.py index 9adda4688a..5d5bdaa77e 100644 --- a/command/install.py +++ b/command/install.py @@ -4,6 +4,8 @@ from distutils import log +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/command/install_data.py b/command/install_data.py index d0091ce238..5c1f18a9f2 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -5,6 +5,8 @@ # contributed by Bastian Kleineidam +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/command/install_headers.py b/command/install_headers.py index 957ed239b1..3a37d309f9 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,6 +3,8 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/command/install_lib.py b/command/install_lib.py index 5da1c7aea7..daf3e010fd 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,3 +1,5 @@ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/command/install_scripts.py b/command/install_scripts.py index ceece1b6bf..6572e650d4 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -5,6 +5,8 @@ # contributed by Bastian Kleineidam +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/command/sdist.py b/command/sdist.py index 91807e6a3f..c0b7dd45d9 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,6 +2,8 @@ Implements the Distutils 'sdist' command (create a source distribution).""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/core.py b/core.py index 5be9e4ec29..9ab419ef4c 100644 --- a/core.py +++ b/core.py @@ -6,6 +6,8 @@ really defined in distutils.dist and distutils.cmd. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 93f8803847..18af388c3c 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -41,6 +41,8 @@ # in the dlls. # *** only the version of June 2000 shows these problems +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os,sys,copy diff --git a/debug.py b/debug.py index 7ca76d6c5c..e195ebdcdf 100644 --- a/debug.py +++ b/debug.py @@ -1,5 +1,9 @@ import os +# This module should be kept compatible with Python 1.5.2. + +__revision__ = "$Id$" + # If DISTUTILS_DEBUG is anything other than the empty string, we run in # debug mode. DEBUG = os.environ.get('DISTUTILS_DEBUG') diff --git a/dep_util.py b/dep_util.py index f49665483a..0746633d23 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,6 +4,8 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/dir_util.py b/dir_util.py index d407e9ac5b..ca9fa9dc7f 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,6 +2,8 @@ Utility functions for manipulating directories and directory trees.""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/dist.py b/dist.py index 3a690696bb..faeb7b10b3 100644 --- a/dist.py +++ b/dist.py @@ -4,6 +4,8 @@ being built/installed/distributed. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string, re diff --git a/errors.py b/errors.py index 963d83377c..94e83fb557 100644 --- a/errors.py +++ b/errors.py @@ -8,6 +8,8 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" class DistutilsError (Exception): diff --git a/fancy_getopt.py b/fancy_getopt.py index f78b0a6854..a4a4e7979e 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,6 +8,8 @@ * options set attributes of a passed-in object """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, string, re diff --git a/file_util.py b/file_util.py index c2fa086f05..e230ce587e 100644 --- a/file_util.py +++ b/file_util.py @@ -3,6 +3,8 @@ Utility functions for operating on single files. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os diff --git a/filelist.py b/filelist.py index 4b5d47d02f..bfa53d2133 100644 --- a/filelist.py +++ b/filelist.py @@ -4,6 +4,8 @@ and building lists of files. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import os, string, re diff --git a/log.py b/log.py index 6aeb7c9aac..0442033d66 100644 --- a/log.py +++ b/log.py @@ -1,5 +1,7 @@ """A simple log mechanism styled after PEP 282.""" +# This module should be kept compatible with Python 1.5.2. + # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. diff --git a/msvccompiler.py b/msvccompiler.py index c2bd77de44..65a50cc79a 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -3,11 +3,12 @@ Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio.""" - # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 8f62bf7d87..d546de1f25 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -4,6 +4,10 @@ for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on Windows.""" +# This module should be kept compatible with Python 1.5.2. + +__revision__ = "$Id$" + import sys, os, string from types import * from distutils.errors import \ diff --git a/spawn.py b/spawn.py index f94817d498..6e0423b099 100644 --- a/spawn.py +++ b/spawn.py @@ -6,6 +6,8 @@ executable name. """ +# This module should be kept compatible with Python 1.5.2. + __revision__ = "$Id$" import sys, os, string From 6ff384d0805ec8da74e606380d9526d73cac0c8b Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 20 Nov 2002 16:10:29 +0000 Subject: [PATCH 0895/8469] Add missing import --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index 5b197fa58d..e4209449e4 100644 --- a/extension.py +++ b/extension.py @@ -5,7 +5,7 @@ __revision__ = "$Id$" -import os, string +import os, string, sys from types import * try: From 66ffcc6481adb327ae0c529f439bed2c418e97ef Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Nov 2002 18:33:28 +0000 Subject: [PATCH 0896/8469] Bug #639118 from Ollie Oldham: archiver should use zipfile before zip Previously archive_util.py attempted to spawn an external 'zip' program for the zip action, if this fails, an attempt to import zipfile.py is made... This bites folks who have 'old' or non-conforming zip programs on windows platforms. This change tries the 'zipfile' module first, falling back to spawning a zip process if the module isn't available. --- archive_util.py | 58 +++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/archive_util.py b/archive_util.py index d1dc909520..d5b3096617 100644 --- a/archive_util.py +++ b/archive_util.py @@ -59,46 +59,48 @@ def make_tarball (base_name, base_dir, compress="gzip", def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output - zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP - "zip" utility (if installed and found on the default search path) or - the "zipfile" Python module (if available). If neither tool is - available, raises DistutilsExecError. Returns the name of the output - zip file. + zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" + Python module (if available) or the InfoZIP "zip" utility (if installed + and found on the default search path). If neither tool is available, + raises DistutilsExecError. Returns the name of the output zip file. """ - # This initially assumed the Unix 'zip' utility -- but - # apparently InfoZIP's zip.exe works the same under Windows, so - # no changes needed! - + try: + import zipfile + except ImportError: + zipfile = None + zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), dry_run=dry_run) - try: - spawn(["zip", "-rq", zip_filename, base_dir], - dry_run=dry_run) - except DistutilsExecError: - - # XXX really should distinguish between "couldn't find - # external 'zip' command" and "zip failed" -- shouldn't try - # again in the latter case. (I think fixing this will - # require some cooperation from the spawn module -- perhaps - # a utility function to search the path, so we can fallback - # on zipfile.py without the failed spawn.) + + # If zipfile module is not available, try spawning an external + # 'zip' command. + if zipfile is None: + if verbose: + zipoptions = "-r" + else: + zipoptions = "-rq" + try: - import zipfile - except ImportError: + spawn(["zip", zipoptions, zip_filename, base_dir], + dry_run=dry_run) + except DistutilsExecError: + # XXX really should distinguish between "couldn't find + # external 'zip' command" and "zip failed". raise DistutilsExecError, \ - ("unable to create zip file '%s': " + - "could neither find a standalone zip utility nor " + - "import the 'zipfile' module") % zip_filename + ("unable to create zip file '%s': " + "could neither import the 'zipfile' module nor " + "find a standalone zip utility") % zip_filename - - log.info("creating '%s' and adding '%s' to it", + else: + log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) - + def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): z.write(path, path) + log.info("adding '%s'" % path) if not dry_run: z = zipfile.ZipFile(zip_filename, "w", From c8618f4eddcd6ecc5ea54387494cb5d8a00f8dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 21 Nov 2002 20:33:24 +0000 Subject: [PATCH 0897/8469] Patch #642019: Recognize gcc-x.y as gcc. --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 603dfe90cc..2a6b1beeea 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -201,7 +201,7 @@ def runtime_library_dir_option(self, dir): if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir - elif compiler == "gcc" or compiler == "g++": + elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: return "-R" + dir From 2fe3abe410be345020e460b3be5860c4d60a2223 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Nov 2002 20:41:07 +0000 Subject: [PATCH 0898/8469] Reflow comment --- spawn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spawn.py b/spawn.py index 6e0423b099..4857ce5e63 100644 --- a/spawn.py +++ b/spawn.py @@ -25,9 +25,9 @@ def spawn (cmd, There is no way to run a program with a name different from that of its executable. - If 'search_path' is true (the default), the system's executable search - path will be used to find the program; otherwise, cmd[0] must be the - exact path to the executable.If 'dry_run' is true, + If 'search_path' is true (the default), the system's executable + search path will be used to find the program; otherwise, cmd[0] + must be the exact path to the executable. If 'dry_run' is true, the command will not actually be run. Raise DistutilsExecError if running the program fails in any way; just From 90b1c1a1b6dfb3d5ed0ef835e62d94ea2c45f4fa Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 22 Nov 2002 20:57:20 +0000 Subject: [PATCH 0899/8469] get_python_version was not imported. --- command/bdist_wininst.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 9c9fd10918..7609fabeef 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -13,6 +13,7 @@ from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * +from distutils.sysconfig import get_python_version from distutils import log class bdist_wininst (Command): From fc4c1ada98f887c3423daee9c803753513fba0ba Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 22 Nov 2002 21:08:34 +0000 Subject: [PATCH 0900/8469] (This is hopefully the last large, funny checkin message for bdist_wininst.py we will see.) Removed the base64 encoded binary contents, wininst.exe must be in the same directory as this file now. wininst.exe must be recompiled and commited each time the sources in PC/bdist_wininst are changed. --- command/bdist_wininst.py | 404 +-------------------------------------- command/wininst.exe | Bin 0 -> 20992 bytes 2 files changed, 4 insertions(+), 400 deletions(-) create mode 100755 command/wininst.exe diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 7609fabeef..5acca11a62 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -8,7 +8,6 @@ __revision__ = "$Id$" import sys, os, string -import base64 from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree @@ -236,403 +235,8 @@ def create_exe (self, arcname, fullname, bitmap=None): # create_exe() def get_exe_bytes (self): - return base64.decodestring(EXEDATA) + # wininst.exe is in the same directory as this file + directory = os.path.dirname(__file__) + filename = os.path.join(directory, "wininst.exe") + return open(filename, "rb").read() # class bdist_wininst - -if __name__ == '__main__': - # recreate EXEDATA from wininst.exe by rewriting this file - - # If you want to do this at home, you should: - # - checkout the *distutils* source code - # (see also http://sourceforge.net/cvs/?group_id=5470) - # by doing: - # cvs -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python login - # and - # cvs -z3 -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python co distutils - # - Built wininst.exe from the MSVC project file distutils/misc/wininst.dsw - # - Execute this file (distutils/distutils/command/bdist_wininst.py) - - import re - moddata = open("bdist_wininst.py", "r").read() - exedata = open("../../misc/wininst.exe", "rb").read() - print "wininst.exe length is %d bytes" % len(exedata) - print "wininst.exe encoded length is %d bytes" % len(base64.encodestring(exedata)) - exp = re.compile('EXE'+'DATA = """\\\\(\n.*)*\n"""', re.M) - data = exp.sub('EXE' + 'DATA = """\\\\\n%s"""' % - base64.encodestring(exedata), moddata) - open("bdist_wininst.py", "w").write(data) - print "bdist_wininst.py recreated" - -EXEDATA = """\ -TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAA8AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v -ZGUuDQ0KJAAAAAAAAAAjSEomZykkdWcpJHVnKSR1HDUodWQpJHUINi51bCk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E91dEEAAGZyZWUAAENvSW5pdGlhbGl6ZQAAR2V0REMAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAA== -""" - -# --- EOF --- diff --git a/command/wininst.exe b/command/wininst.exe new file mode 100755 index 0000000000000000000000000000000000000000..6290a9361e36d244122f6af3feb506efe6d255c8 GIT binary patch literal 20992 zcmdqJXH-+oyEYz@5CQ}edLWe01WACCP_5bky_I`P1t+}uJp6klJXHVMf%$_)S6#zg0007LY zOeO$O&%(oE{IC80H_I%VSE`X0@SL+>x}MFxU)q%vPDaPY$A-lRMx%oQV`5?{=o2C6 zcxntfJO*vifSL+U4Q&=1cPc(Sj6^{znjJ-}>FH@JtK)FE|HXqOOjNPI#_u*zXB)^Vj_oItL>zLVs(SI6VOOt4<#)~x4b5CAyB2B=|9GnoW8 zB7-6)n6>RrNnu3Ei8Ic?(vATraS=X5=I8BLrjY$fV*q2*Q^J$tpLPV`&i6L%p!N6P z3ECc$st^J1$!entWUW!)?j%Io!TjG=o(Oj4DD4$&g~L69jnmU}yAwebC)EK2o|RMq zlwTd?>DpnY?m>JksSK=#zn`ynryFCHwhAK<-5Ev?lsDE>6E(J*^xE{OP%1~a1(Xd& zB&FFuWyZ$x5s3tL7;~Jq%cNWE!?SXNV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xg{nJoaQAQUrDMBzOHfjrdn`v`AHibab@2LRwr4Bp4g7|22C8niu( z;wcn!Q5;0k&@UeR&+!Q8p7{_O^Sgrn^bBA4M-2oFdFYY>y;o7$vfl;SK9c!+-YYaR zcpU(^|0B;99WUq>09gK)aVbV1a1+&ad*5tOZtw%{QNdt23u$F(hNq1#IFd6LXXpfqoM#-@Jd!} zgyC!*h5__O0VmNAF*sqtf6&nhD>?Cr???m|&4iN@LgHttKor6kMoBWId}$F20K!D_ zSSe!IB1lCt832S7O5PFg93Wnl#eor-C{k2}P6$oR7fI#lzn(}WN82Wf3gs~hLrsic evH<`GG2EY+UcbN*O{|Knd=fqw(hGF_bj literal 0 HcmV?d00001 From 7e77495f1012854570db4870dcd839ce9ece7854 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 26 Nov 2002 17:42:48 +0000 Subject: [PATCH 0901/8469] Part of the fix for bug #410541: add ensure_relative() function --- dir_util.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index ca9fa9dc7f..bd1ea0f243 100644 --- a/dir_util.py +++ b/dir_util.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import os +import os, sys from types import * from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log @@ -212,3 +212,17 @@ def remove_tree (directory, verbose=0, dry_run=0): except (IOError, OSError), exc: log.warn(grok_environment_error( exc, "error removing %s: " % directory)) + + +def ensure_relative (path): + """Take the full path 'path', and make it a relative path so + it can be the second argument to os.path.join(). + """ + drive, path = os.path.splitdrive(path) + if sys.platform == 'mac': + return os.sep + path + else: + if path[0:1] == os.sep: + path = drive + path[1:] + return path + From 56507a08e5a566801e5506f80325a67198e86493 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 26 Nov 2002 17:45:19 +0000 Subject: [PATCH 0902/8469] Fix for bug #410541: bdist builds bogus .zips This adds a --relative option to the bdist_dumb command that defaults to false; if true, the .tar.gz or .zip will be assembled using relative paths. --- command/bdist_dumb.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index d1cce55b20..8ee3a5c5f7 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -11,7 +11,7 @@ import os from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree +from distutils.dir_util import create_tree, remove_tree, ensure_relative from distutils.errors import * from distutils import log @@ -33,9 +33,12 @@ class bdist_dumb (Command): "directory to put final built distributions in"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('relative', None, + "build the archive using relative paths" + "(default: false)"), ] - boolean_options = ['keep-temp', 'skip-build'] + boolean_options = ['keep-temp', 'skip-build', 'relative'] default_format = { 'posix': 'gztar', 'nt': 'zip', @@ -49,7 +52,8 @@ def initialize_options (self): self.keep_temp = 0 self.dist_dir = None self.skip_build = 0 - + self.relative = 0 + # initialize_options() @@ -97,9 +101,24 @@ def run (self): if os.name == "os2": archive_basename = archive_basename.replace(":", "-") - self.make_archive(os.path.join(self.dist_dir, archive_basename), - self.format, - root_dir=self.bdist_dir) + pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) + if not self.relative: + archive_root = self.bdist_dir + else: + if (self.distribution.has_ext_modules() and + (install.install_base != install.install_platbase)): + raise DistutilsPlatformError, \ + ("can't make a dumb built distribution where " + "base and platbase are different (%s, %s)" + % (repr(install.install_base), + repr(install.install_platbase))) + else: + archive_root = os.path.join(self.bdist_dir, + ensure_relative(install.install_base)) + + # Make the archive + self.make_archive(pseudoinstall_root, + self.format, root_dir=archive_root) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) From 6f8ae17986bf88dde5c0f158e4a49b1f9465736b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 26 Nov 2002 21:28:23 +0000 Subject: [PATCH 0903/8469] Use "is" to test type objects, not "==". --- command/install_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_data.py b/command/install_data.py index 5c1f18a9f2..2fa0da29fe 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -48,7 +48,7 @@ def finalize_options (self): def run (self): self.mkpath(self.install_dir) for f in self.data_files: - if type(f) == StringType: + if type(f) is StringType: # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: From 6efa84626efe12980cd1ec6c649b9c41bff2d6a4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 27 Nov 2002 13:45:26 +0000 Subject: [PATCH 0904/8469] [Part of patch #641685] Add .dylib as an extension for shared libraries --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index e4209449e4..94b56e6ce4 100644 --- a/extension.py +++ b/extension.py @@ -214,7 +214,7 @@ def read_setup_file (filename): ext.extra_link_args.append(word) if not value: append_next_word = ext.extra_link_args - elif suffix in (".a", ".so", ".sl", ".o"): + elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): # NB. a really faithful emulation of makesetup would # append a .o file to extra_objects only if it # had a slash in it; otherwise, it would s/.o/.c/ From 54d6451d9991f43b2f593fee76fe238632027264 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 29 Nov 2002 19:45:58 +0000 Subject: [PATCH 0905/8469] Fix mode on scripts to have the read bit set (noted by Nicholas Riley) --- command/install_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install_scripts.py b/command/install_scripts.py index 6572e650d4..abe10457b6 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -53,7 +53,7 @@ def run (self): if self.dry_run: log.info("changing mode of %s", file) else: - mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777 + mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777 log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) From f786b434f3184c64840218756664aae4152f5b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Tue, 3 Dec 2002 08:45:11 +0000 Subject: [PATCH 0906/8469] Adding Python <= 2.2 support back in. --- util.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/util.py b/util.py index 9de6077fc6..17fc320aa6 100644 --- a/util.py +++ b/util.py @@ -359,11 +359,18 @@ def byte_compile (py_files, # "Indirect" byte-compilation: write a temporary script and then # run it with the appropriate flags. if not direct: - from tempfile import mkstemp - (script_fd, script_name) = mkstemp(".py") + try: + from tempfile import mkstemp + (script_fd, script_name) = mkstemp(".py") + except ImportError: + from tempfile import mktemp + (script_fd, script_name) = None, mktemp(".py") log.info("writing byte-compilation script '%s'", script_name) if not dry_run: - script = os.fdopen(script_fd, "w") + if script_fd is not None: + script = os.fdopen(script_fd, "w") + else: + script = open(script_name, "w") script.write("""\ from distutils.util import byte_compile From fb9fc102e11fdf1851470aa6b5dd11b0e2737b6f Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sun, 29 Dec 2002 17:00:57 +0000 Subject: [PATCH 0907/8469] Bug #599248: strip directories when building Python. Out-of-tree builds should work again. --- ccompiler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index edb9f7542f..bfcf1279f1 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,6 +15,7 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group +from distutils.sysconfig import python_build from distutils.util import split_quoted, execute from distutils import log @@ -366,7 +367,9 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra = [] # Get the list of expected output (object) files - objects = self.object_filenames(sources, 0, outdir) + objects = self.object_filenames(sources, + strip_dir=python_build, + output_dir=outdir) assert len(objects) == len(sources) # XXX should redo this code to eliminate skip_source entirely. @@ -472,7 +475,7 @@ def _prep_compile(self, sources, output_dir, depends=None): which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames(sources, strip_dir=0, + objects = self.object_filenames(sources, strip_dir=python_build, output_dir=output_dir) assert len(objects) == len(sources) From 0f17b9ba75fc0d3d166a058387ca8a7cd2d97a63 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 3 Jan 2003 15:24:36 +0000 Subject: [PATCH 0908/8469] [Patch #658094] PEP 301 implementation Add 'classifiers' keyword to DistributionMetadata --- dist.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index faeb7b10b3..f15c945c74 100644 --- a/dist.py +++ b/dist.py @@ -93,6 +93,8 @@ class Distribution: "print the long package description"), ('platforms', None, "print the list of platforms"), + ('classifiers', None, + "print the list of classifiers"), ('keywords', None, "print the list of keywords"), ] @@ -634,6 +636,8 @@ def handle_display_options (self, option_order): value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: print string.join(value, ',') + elif opt == 'classifiers': + print string.join(value, '\n') else: print value any_display_options = 1 @@ -962,7 +966,7 @@ class DistributionMetadata: "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", - "contact_email", "licence") + "contact_email", "licence", "classifiers") def __init__ (self): self.name = None @@ -977,6 +981,7 @@ def __init__ (self): self.long_description = None self.keywords = None self.platforms = None + self.classifiers = None def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. @@ -1003,6 +1008,9 @@ def write_pkg_info (self, base_dir): for platform in self.get_platforms(): pkg_info.write('Platform: %s\n' % platform ) + for classifier in self.get_classifiers(): + pkg_info.write('Classifier: %s\n' % classifier ) + pkg_info.close() # write_pkg_info () @@ -1059,6 +1067,9 @@ def get_keywords(self): def get_platforms(self): return self.platforms or ["UNKNOWN"] + def get_classifiers(self): + return self.classifiers or [] + # class DistributionMetadata From 68218cefc84e5b95d3cbf4cadccb1742b83623d5 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 3 Jan 2003 15:29:28 +0000 Subject: [PATCH 0909/8469] [Patch #658094 ] PEP 301 implementation Add the 'register' distutils command --- command/register.py | 293 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 command/register.py diff --git a/command/register.py b/command/register.py new file mode 100644 index 0000000000..6920d1d1c9 --- /dev/null +++ b/command/register.py @@ -0,0 +1,293 @@ +"""distutils.command.register + +Implements the Distutils 'register' command (register with the repository). +""" + +# created 2002/10/21, Richard Jones + +__revision__ = "$Id$" + +import sys, os, string, urllib2, getpass, urlparse +import StringIO, ConfigParser + +from distutils.core import Command +from distutils.errors import * + +class register(Command): + + description = "register the distribution with the repository" + + # XXX must update this to python.org before 2.3final! + DEFAULT_REPOSITORY = 'http://www.amk.ca/cgi-bin/pypi.cgi' + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]"%DEFAULT_REPOSITORY), + ('verify', None, + 'verify the package metadata for correctness'), + ('list-classifiers', None, + 'list the valid Trove classifiers'), + ('verbose', None, + 'display full response from server'), + ] + boolean_options = ['verify', 'verbose', 'list-classifiers'] + + def initialize_options(self): + self.repository = None + self.verify = 0 + self.verbose = 0 + self.list_classifiers = 0 + + def finalize_options(self): + if self.repository is None: + self.repository = self.DEFAULT_REPOSITORY + + def run(self): + self.check_metadata() + if self.verify: + self.verify_metadata() + elif self.list_classifiers: + self.classifiers() + else: + self.send_metadata() + + def check_metadata(self): + """Ensure that all required elements of meta-data (name, version, + URL, (author and author_email) or (maintainer and + maintainer_email)) are supplied by the Distribution object; warn if + any are missing. + """ + metadata = self.distribution.metadata + + missing = [] + for attr in ('name', 'version', 'url'): + if not (hasattr(metadata, attr) and getattr(metadata, attr)): + missing.append(attr) + + if missing: + self.warn("missing required meta-data: " + + string.join(missing, ", ")) + + if metadata.author: + if not metadata.author_email: + self.warn("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") + elif metadata.maintainer: + if not metadata.maintainer_email: + self.warn("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") + else: + self.warn("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + + "must be supplied") + + def classifiers(self): + ''' Fetch the list of classifiers from the server. + ''' + response = urllib2.urlopen(self.repository+'?:action=list_classifiers') + print response.read() + + def verify_metadata(self): + ''' Send the metadata to the package index server to be checked. + ''' + # send the info to the server and report the result + (code, result) = self.post_to_server(self.build_post_data('verify')) + print 'Server response (%s): %s'%(code, result) + + def send_metadata(self): + ''' Send the metadata to the package index server. + + Well, do the following: + 1. figure who the user is, and then + 2. send the data as a Basic auth'ed POST. + + First we try to read the username/password from $HOME/.pypirc, + which is a ConfigParser-formatted file with a section + [server-login] containing username and password entries (both + in clear text). Eg: + + [server-login] + username: fred + password: sekrit + + Otherwise, to figure who the user is, we offer the user three + choices: + + 1. use existing login, + 2. register as a new user, or + 3. set the password to a random string and email the user. + + ''' + choice = 'x' + username = password = '' + + # see if we can short-cut and get the username/password from the + # config + config = None + if os.environ.has_key('HOME'): + rc = os.path.join(os.environ['HOME'], '.pypirc') + if os.path.exists(rc): + print 'Using PyPI login from %s'%rc + config = ConfigParser.ConfigParser() + config.read(rc) + username = config.get('server-login', 'username') + password = config.get('server-login', 'password') + choice = '1' + + # get the user's login info + choices = '1 2 3 4'.split() + while choice not in choices: + print '''We need to know who you are, so please choose either: + 1. use your existing login, + 2. register as a new user, + 3. have the server generate a new password for you (and email it to you), or + 4. quit +Your selection [default 1]: ''', + choice = raw_input() + if not choice: + choice = '1' + elif choice not in choices: + print 'Please choose one of the four options!' + + if choice == '1': + # get the username and password + while not username: + username = raw_input('Username: ') + while not password: + password = getpass.getpass('Password: ') + + # set up the authentication + auth = urllib2.HTTPPasswordMgr() + host = urlparse.urlparse(self.repository)[1] + auth.add_password('pypi', host, username, password) + + # send the info to the server and report the result + code, result = self.post_to_server(self.build_post_data('submit'), + auth) + print 'Server response (%s): %s'%(code, result) + + # possibly save the login + if os.environ.has_key('HOME') and config is None and code == 200: + rc = os.path.join(os.environ['HOME'], '.pypirc') + print 'I can store your PyPI login so future submissions will be faster.' + print '(the login will be stored in %s)'%rc + choice = 'X' + while choice.lower() not in 'yn': + choice = raw_input('Save your login (y/N)?') + if not choice: + choice = 'n' + if choice.lower() == 'y': + f = open(rc, 'w') + f.write('[server-login]\nusername:%s\npassword:%s\n'%( + username, password)) + f.close() + try: + os.chmod(rc, 0600) + except: + pass + elif choice == '2': + data = {':action': 'user'} + data['name'] = data['password'] = data['email'] = '' + data['confirm'] = None + while not data['name']: + data['name'] = raw_input('Username: ') + while data['password'] != data['confirm']: + while not data['password']: + data['password'] = getpass.getpass('Password: ') + while not data['confirm']: + data['confirm'] = getpass.getpass(' Confirm: ') + if data['password'] != data['confirm']: + data['password'] = '' + data['confirm'] = None + print "Password and confirm don't match!" + while not data['email']: + data['email'] = raw_input(' EMail: ') + code, result = self.post_to_server(data) + if code != 200: + print 'Server response (%s): %s'%(code, result) + else: + print 'You will receive an email shortly.' + print 'Follow the instructions in it to complete registration.' + elif choice == '3': + data = {':action': 'password_reset'} + data['email'] = '' + while not data['email']: + data['email'] = raw_input('Your email address: ') + code, result = self.post_to_server(data) + print 'Server response (%s): %s'%(code, result) + + def build_post_data(self, action): + # figure the data to send - the metadata plus some additional + # information used by the package server + meta = self.distribution.metadata + data = { + ':action': action, + 'metadata_version' : '1.0', + 'name': meta.get_name(), + 'version': meta.get_version(), + 'summary': meta.get_description(), + 'home_page': meta.get_url(), + 'author': meta.get_contact(), + 'author_email': meta.get_contact_email(), + 'license': meta.get_licence(), + 'description': meta.get_long_description(), + 'keywords': meta.get_keywords(), + 'platform': meta.get_platforms(), + } + if hasattr(meta, 'classifiers'): + data['classifiers'] = meta.get_classifiers() + return data + + def post_to_server(self, data, auth=None): + ''' Post a query to the server, and return a string response. + ''' + + # Build up the MIME payload for the urllib2 POST data + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = '\n--' + boundary + end_boundary = sep_boundary + '--' + body = StringIO.StringIO() + for key, value in data.items(): + # handle multiple entries for the same name + if type(value) != type([]): + value = [value] + for value in value: + value = str(value) + body.write(sep_boundary) + body.write('\nContent-Disposition: form-data; name="%s"'%key) + body.write("\n\n") + body.write(value) + if value and value[-1] == '\r': + body.write('\n') # write an extra newline (lurve Macs) + body.write(end_boundary) + body.write("\n") + body = body.getvalue() + + # build the Request + headers = { + 'Content-type': 'multipart/form-data; boundary=%s'%boundary, + 'Content-length': str(len(body)) + } + req = urllib2.Request(self.repository, body, headers) + + # handle HTTP and include the Basic Auth handler + opener = urllib2.build_opener( + urllib2.HTTPBasicAuthHandler(password_mgr=auth) + ) + data = '' + try: + result = opener.open(req) + except urllib2.HTTPError, e: + if self.verbose: + data = e.fp.read() + result = e.code, e.msg + except urllib2.URLError, e: + result = 500, str(e) + else: + if self.verbose: + data = result.read() + result = 200, 'OK' + if self.verbose: + print '-'*75, data, '-'*75 + return result + From bfd055388d345fe1f58cd04f7272f6f7d3963f15 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 6 Jan 2003 13:28:12 +0000 Subject: [PATCH 0910/8469] Translate spaces in the machine name to underscores (Power Macintosh -> Power_Macintosh) --- util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 17fc320aa6..dc3183b691 100644 --- a/util.py +++ b/util.py @@ -40,10 +40,11 @@ def get_platform (): (osname, host, release, version, machine) = os.uname() - # Convert the OS name to lowercase and remove '/' characters - # (to accommodate BSD/OS) + # Convert the OS name to lowercase, remove '/' characters + # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") osname = string.lower(osname) osname = string.replace(osname, '/', '') + machine = string.replace(machine, ' ', '_') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- From fc7885b993648b7587683e0e14adecb21011556b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 Jan 2003 14:56:52 +0000 Subject: [PATCH 0911/8469] Change the mode of scripts in the build/scripts* directory to executable. --- command/build_scripts.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/command/build_scripts.py b/command/build_scripts.py index b7c11d472b..c7bd4a9d9b 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import sys, os, re +from stat import ST_MODE from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer @@ -54,10 +55,12 @@ def copy_scripts (self): line to refer to the current Python interpreter as we copy. """ self.mkpath(self.build_dir) + outfiles = [] for script in self.scripts: adjust = 0 script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script)) + outfiles.append(outfile) if not self.force and not newer(script, outfile): log.debug("not copying %s (up-to-date)", script) @@ -106,6 +109,15 @@ def copy_scripts (self): f.close() self.copy_file(script, outfile) + if os.name == 'posix': + for file in outfiles: + if self.dry_run: + log.info("changing mode of %s", file) + else: + mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777 + log.info("changing mode of %s to %o", file, mode) + os.chmod(file, mode) + # copy_scripts () # class build_scripts From caa7bc3bd88e1b1c50f4f03bda217b0fc6063f2b Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 27 Jan 2003 16:30:36 +0000 Subject: [PATCH 0912/8469] Remove the recently-added get_distutil_options(), and just have two tuples listing the legal keywords for setup() and Extension() --- core.py | 21 +++++++++++++-------- extension.py | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core.py b/core.py index 9ab419ef4c..29fbc5cdf9 100644 --- a/core.py +++ b/core.py @@ -42,6 +42,19 @@ def gen_usage (script_name): _setup_stop_after = None _setup_distribution = None +# Legal keyword arguments for the setup() function +setup_keywords = ('distclass', 'script_name', 'script_args', 'options', + 'name', 'version', 'author', 'author_email', + 'maintainer', 'maintainer_email', 'url', 'license', + 'description', 'long_description', 'keywords', + 'platforms', 'classifiers') + +# Legal keyword arguments for the Extension constructor +extension_keywords = ('name', 'sources', 'include_dirs', + 'define_macros', 'undef_macros', + 'library_dirs', 'libraries', 'runtime_library_dirs', + 'extra_objects', 'extra_compile_args', 'extra_link_args', + 'export_symbols', 'depends', 'language') def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs @@ -226,11 +239,3 @@ def run_setup (script_name, script_args=None, stop_after="run"): # run_setup () -def get_distutil_options (): - """Returns a list of strings recording changes to the Distutils. - - setup.py files can then do: - if 'optional-thing' in get_distutil_options(): - ... - """ - return [] diff --git a/extension.py b/extension.py index 94b56e6ce4..e69f3e93e0 100644 --- a/extension.py +++ b/extension.py @@ -82,6 +82,8 @@ class Extension: from the source extensions if not provided. """ + # When adding arguments to this constructor, be sure to update + # setup_keywords in core.py. def __init__ (self, name, sources, include_dirs=None, define_macros=None, From 04937364e507dbe9f02d00d0cd79908dbfc9afb7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 29 Jan 2003 16:58:31 +0000 Subject: [PATCH 0913/8469] Only log a message and chmod() when the mode isn't already what we want it to be. Log both the old and new mode. --- command/build_scripts.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index c7bd4a9d9b..f61ad37d03 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -114,9 +114,12 @@ def copy_scripts (self): if self.dry_run: log.info("changing mode of %s", file) else: - mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777 - log.info("changing mode of %s to %o", file, mode) - os.chmod(file, mode) + oldmode = os.stat(file)[ST_MODE] & 07777 + newmode = (oldmode | 0555) & 07777 + if newmode != oldmode: + log.info("changing mode of %s from %o to %o", + file, oldmode, newmode) + os.chmod(file, newmode) # copy_scripts () From c7d6889f2f4e4f3a0562798e3641d67c09951f35 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 31 Jan 2003 20:40:15 +0000 Subject: [PATCH 0914/8469] Pass the preprocessor options also to the resource compiler when compiling .RC files. From Robin Dunn, fixes SF # 669198. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 65a50cc79a..e07a6d5a0c 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -310,7 +310,7 @@ def compile(self, sources, input_opt = src output_opt = "/fo" + obj try: - self.spawn ([self.rc] + + self.spawn ([self.rc] + pp_opts + [output_opt] + [input_opt]) except DistutilsExecError, msg: raise CompileError, msg From 90ceb5eaaf84551cf39ba48550debf99f9081e7b Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 3 Feb 2003 11:43:54 +0000 Subject: [PATCH 0915/8469] patch #664131, fix config command on OSX and Linux --- command/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/config.py b/command/config.py index b6f5ad1dc5..3bd537a6e8 100644 --- a/command/config.py +++ b/command/config.py @@ -151,7 +151,8 @@ def _link (self, body, library_dirs=library_dirs, target_lang=lang) - prog = prog + self.compiler.exe_extension + if self.compiler.exe_extension is not None: + prog = prog + self.compiler.exe_extension self.temp_files.append(prog) return (src, obj, prog) From 3ea65a4bba9d3ce1086bc983c16c5f0feea8055b Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 10 Feb 2003 14:02:33 +0000 Subject: [PATCH 0916/8469] Pick up Makefile variable BASECFLAGS too. This is needed since OPT was split into OPT and BASECFLAGS (Makefile.pre.in rev. 1.108), because now there are essential CFLAGS in BASECFLAGS. --- sysconfig.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index aa3636f609..67353a8d64 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,8 +146,8 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, ccshared, ldshared, so_ext) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CCSHARED', 'LDSHARED', 'SO') + (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): cc = os.environ['CC'] @@ -159,6 +159,8 @@ def customize_compiler(compiler): cpp = cc + " -E" # not always if os.environ.has_key('LDFLAGS'): ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if basecflags: + opt = basecflags + ' ' + opt if os.environ.has_key('CFLAGS'): opt = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] From a65727b5db3ecf4546e808fcc72eb14fbea9cf42 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 18 Feb 2003 01:28:51 +0000 Subject: [PATCH 0917/8469] [Patch #681504] Call customize_compiler in config command --- command/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/config.py b/command/config.py index 3bd537a6e8..f18c79ff43 100644 --- a/command/config.py +++ b/command/config.py @@ -17,6 +17,7 @@ from types import * from distutils.core import Command from distutils.errors import DistutilsExecError +from distutils.sysconfig import customize_compiler from distutils import log LANG_EXT = {'c': '.c', @@ -104,6 +105,7 @@ def _check_compiler (self): if not isinstance(self.compiler, CCompiler): self.compiler = new_compiler(compiler=self.compiler, dry_run=self.dry_run, force=1) + customize_compiler(self.compiler) if self.include_dirs: self.compiler.set_include_dirs(self.include_dirs) if self.libraries: From dae4f7a4a339196ac3fa85ede474b603659e3169 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Tue, 18 Feb 2003 21:28:20 +0000 Subject: [PATCH 0918/8469] Use python.org as the repository --- command/register.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/register.py b/command/register.py index 6920d1d1c9..aac700c480 100644 --- a/command/register.py +++ b/command/register.py @@ -17,8 +17,7 @@ class register(Command): description = "register the distribution with the repository" - # XXX must update this to python.org before 2.3final! - DEFAULT_REPOSITORY = 'http://www.amk.ca/cgi-bin/pypi.cgi' + DEFAULT_REPOSITORY = 'http://www.python.org/pypi' user_options = [ ('repository=', 'r', From 7fa7f24d329793d1d40b4fbdb0d56cb284e4c907 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 19 Feb 2003 13:49:35 +0000 Subject: [PATCH 0919/8469] [Patch #684398] Rename verbose argument to show-response; don't conditionalize the get_classifiers() call --- command/register.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/command/register.py b/command/register.py index aac700c480..328d8d0ae8 100644 --- a/command/register.py +++ b/command/register.py @@ -26,15 +26,15 @@ class register(Command): 'verify the package metadata for correctness'), ('list-classifiers', None, 'list the valid Trove classifiers'), - ('verbose', None, - 'display full response from server'), + ('show-response', None, + 'display full response text from server'), ] - boolean_options = ['verify', 'verbose', 'list-classifiers'] + boolean_options = ['verify', 'show-response', 'list-classifiers'] def initialize_options(self): self.repository = None self.verify = 0 - self.verbose = 0 + self.show_response = 0 self.list_classifiers = 0 def finalize_options(self): @@ -232,9 +232,8 @@ def build_post_data(self, action): 'description': meta.get_long_description(), 'keywords': meta.get_keywords(), 'platform': meta.get_platforms(), + 'classifiers': meta.get_classifiers(), } - if hasattr(meta, 'classifiers'): - data['classifiers'] = meta.get_classifiers() return data def post_to_server(self, data, auth=None): @@ -277,16 +276,16 @@ def post_to_server(self, data, auth=None): try: result = opener.open(req) except urllib2.HTTPError, e: - if self.verbose: + if self.show_response: data = e.fp.read() result = e.code, e.msg except urllib2.URLError, e: result = 500, str(e) else: - if self.verbose: + if self.show_response: data = result.read() result = 200, 'OK' - if self.verbose: + if self.show_response: print '-'*75, data, '-'*75 return result From fedab9d677951d29d7e11684ab6978e31cea0a68 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 19 Feb 2003 14:16:01 +0000 Subject: [PATCH 0920/8469] [Patch #683939] Add download_url field to metadata --- core.py | 2 +- dist.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 29fbc5cdf9..a463272c2f 100644 --- a/core.py +++ b/core.py @@ -47,7 +47,7 @@ def gen_usage (script_name): 'name', 'version', 'author', 'author_email', 'maintainer', 'maintainer_email', 'url', 'license', 'description', 'long_description', 'keywords', - 'platforms', 'classifiers') + 'platforms', 'classifiers', 'download_url') # Legal keyword arguments for the Extension constructor extension_keywords = ('name', 'sources', 'include_dirs', diff --git a/dist.py b/dist.py index f15c945c74..08e2a4f7d8 100644 --- a/dist.py +++ b/dist.py @@ -966,7 +966,8 @@ class DistributionMetadata: "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", - "contact_email", "licence", "classifiers") + "contact_email", "licence", "classifiers", + "download_url") def __init__ (self): self.name = None @@ -982,6 +983,7 @@ def __init__ (self): self.keywords = None self.platforms = None self.classifiers = None + self.download_url = None def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. @@ -997,6 +999,8 @@ def write_pkg_info (self, base_dir): pkg_info.write('Author: %s\n' % self.get_contact() ) pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) pkg_info.write('License: %s\n' % self.get_license() ) + if self.download_url: + pkg_info.write('Download-URL: %s\n' % self.download_url) long_desc = rfc822_escape( self.get_long_description() ) pkg_info.write('Description: %s\n' % long_desc) @@ -1070,6 +1074,9 @@ def get_platforms(self): def get_classifiers(self): return self.classifiers or [] + def get_download_url(self): + return self.download_url or "UNKNOWN" + # class DistributionMetadata From 3001d212f66a2cb547d0d3306680e7ab09c87f6e Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 19 Feb 2003 14:27:21 +0000 Subject: [PATCH 0921/8469] Include download_url in the data POSTed to the catalog server --- command/register.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/register.py b/command/register.py index 328d8d0ae8..29b76cbfd9 100644 --- a/command/register.py +++ b/command/register.py @@ -233,6 +233,7 @@ def build_post_data(self, action): 'keywords': meta.get_keywords(), 'platform': meta.get_platforms(), 'classifiers': meta.get_classifiers(), + 'download_url': meta.get_download_url(), } return data From 39a95207b183654cd92b4048ed910491ffe1a48a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 20 Feb 2003 02:09:30 +0000 Subject: [PATCH 0922/8469] set_verbosity(): do something reasonable for out-of-range verbosity levels. (Previously, -vvv would be the same as -q!) --- log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/log.py b/log.py index 0442033d66..01420da9af 100644 --- a/log.py +++ b/log.py @@ -53,9 +53,9 @@ def set_threshold(level): _global_log.threshold = level def set_verbosity(v): - if v == 0: + if v <= 0: set_threshold(WARN) - if v == 1: + elif v == 1: set_threshold(INFO) - if v == 2: + elif v >= 2: set_threshold(DEBUG) From 72cbcb8b55ce0bd038577685f074418aa61fdea6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 20 Feb 2003 02:10:08 +0000 Subject: [PATCH 0923/8469] announce(): use the level argument to control the log level. --- cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.py b/cmd.py index 1165f95124..7e7a4cd5ff 100644 --- a/cmd.py +++ b/cmd.py @@ -191,7 +191,7 @@ def announce (self, msg, level=1): """If the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout. """ - log.debug(msg) + log.log(level, msg) def debug_print (self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the From 5daaf7cd967da08a031cb40e3b668a173b4673a1 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 26 Feb 2003 18:52:07 +0000 Subject: [PATCH 0924/8469] [Bug #668662] Patch from Pearu Pearson: if a C source file is specified with an absolute path, the object file is also written to an absolute path. The patch drops the drive and leading '/' from the source path, so a path like /path/to/foo.c results in an object file like build/temp.i686linux/path/to/foo.o. --- ccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index bfcf1279f1..46fb743db0 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -932,6 +932,8 @@ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): obj_names = [] for src_name in source_filenames: base, ext = os.path.splitext(src_name) + base = os.path.splitdrive(base)[1] # Chop off the drive + base = base[os.path.isabs(base):] # If abs, chop off leading / if ext not in self.src_extensions: raise UnknownFileError, \ "unknown file type '%s' (from '%s')" % (ext, src_name) From cbc89d16f32d66f6b51a0a94cd6a0a00824bdbff Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 28 Feb 2003 22:03:04 +0000 Subject: [PATCH 0925/8469] [Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages --- command/build_py.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 258d6d4ca0..6c007c6987 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -86,25 +86,11 @@ def run (self): # Two options control which modules will be installed: 'packages' # and 'py_modules'. The former lets us work with whole packages, not # specifying individual modules at all; the latter is for - # specifying modules one-at-a-time. Currently they are mutually - # exclusive: you can define one or the other (or neither), but not - # both. It remains to be seen how limiting this is. - - # Dispose of the two "unusual" cases first: no pure Python modules - # at all (no problem, just return silently), and over-specified - # 'packages' and 'py_modules' options. - - if not self.py_modules and not self.packages: - return - if self.py_modules and self.packages: - raise DistutilsOptionError, \ - "build_py: supplying both 'packages' and 'py_modules' " + \ - "options is not allowed" - - # Now we're down to two cases: 'py_modules' only and 'packages' only. + # specifying modules one-at-a-time. + if self.py_modules: self.build_modules() - else: + if self.packages: self.build_packages() self.byte_compile(self.get_outputs(include_bytecode=0)) @@ -276,10 +262,10 @@ def find_all_modules (self): (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.""" + modules = [] if self.py_modules: - modules = self.find_modules() - else: - modules = [] + modules.extend(self.find_modules()) + if self.packages: for package in self.packages: package_dir = self.get_package_dir(package) m = self.find_package_modules(package, package_dir) From 06f82fdc6015683f349612125cd2e44fea44092b Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 3 Mar 2003 18:26:01 +0000 Subject: [PATCH 0926/8469] Improve description --- command/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/register.py b/command/register.py index 29b76cbfd9..e4a379939b 100644 --- a/command/register.py +++ b/command/register.py @@ -15,7 +15,7 @@ class register(Command): - description = "register the distribution with the repository" + description = ("register the distribution with the Python package index") DEFAULT_REPOSITORY = 'http://www.python.org/pypi' From 9c00844cfbe8e4f33255f6174c54fe45c266fce8 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 3 Mar 2003 18:37:16 +0000 Subject: [PATCH 0927/8469] [Bug #69389] List register command in __all__, so setup.py --help-commands will now list it --- command/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/__init__.py b/command/__init__.py index fc6117166b..870005dca7 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -19,6 +19,7 @@ 'install_scripts', 'install_data', 'sdist', + 'register', 'bdist', 'bdist_dumb', 'bdist_rpm', From 9766b20bc6d839174db2fb53881c140f110583dd Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 3 Mar 2003 20:07:27 +0000 Subject: [PATCH 0928/8469] [Bug #693470] 'licence' as an alias for 'license' doesn't work. This patch makes it work again. --- dist.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 08e2a4f7d8..d313e7d116 100644 --- a/dist.py +++ b/dist.py @@ -205,6 +205,15 @@ def __init__ (self, attrs=None): for (opt, val) in cmd_options.items(): opt_dict[opt] = ("setup script", val) + if attrs.has_key('licence'): + attrs['license'] = attrs['licence'] + del attrs['licence'] + msg = "'licence' distribution option is deprecated; use 'license'" + if warnings is not None: + warnings.warn(msg) + else: + sys.stderr.write(msg + "\n") + # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): @@ -966,7 +975,7 @@ class DistributionMetadata: "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", - "contact_email", "licence", "classifiers", + "contact_email", "license", "classifiers", "download_url") def __init__ (self): From ad325698f9280631620c2d7aad6619b67ab8d899 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 9 Apr 2003 12:35:51 +0000 Subject: [PATCH 0929/8469] Remove the --verify option in favor of the standard -n/--dry-run option --- command/register.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/register.py b/command/register.py index e4a379939b..8e347ce6dc 100644 --- a/command/register.py +++ b/command/register.py @@ -22,8 +22,6 @@ class register(Command): user_options = [ ('repository=', 'r', "url of repository [default: %s]"%DEFAULT_REPOSITORY), - ('verify', None, - 'verify the package metadata for correctness'), ('list-classifiers', None, 'list the valid Trove classifiers'), ('show-response', None, @@ -33,7 +31,6 @@ class register(Command): def initialize_options(self): self.repository = None - self.verify = 0 self.show_response = 0 self.list_classifiers = 0 @@ -43,7 +40,7 @@ def finalize_options(self): def run(self): self.check_metadata() - if self.verify: + if self.dry_run: self.verify_metadata() elif self.list_classifiers: self.classifiers() From 1942fa31ea1b33d7fcccfed31d6cd2ebd46c7f60 Mon Sep 17 00:00:00 2001 From: Jason Tishler Date: Wed, 9 Apr 2003 16:03:57 +0000 Subject: [PATCH 0930/8469] Patch #709178: remove -static option from cygwinccompiler Currently, the cygwinccompiler.py compiler handling in distutils is invoking the cygwin and mingw compilers with the -static option. Logically, this means that the linker should choose to link to static libraries instead of shared/dynamically linked libraries. Current win32 binutils expect import libraries to have a .dll.a suffix and static libraries to have .a suffix. If -static is passed, it will skip the .dll.a libraries. This is pain if one has a tree with both static and dynamic libraries using this naming convention, and wish to use the dynamic libraries. The -static option being passed in distutils is to get around a bug in old versions of binutils where it would get confused when it found the DLLs themselves. The decision to use static or shared libraries is site or package specific, and should be left to the setup script or to command line options. --- cygwinccompiler.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 18af388c3c..e86dc81533 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -33,12 +33,6 @@ # * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now # - its dllwrap doesn't work, there is a bug in binutils 2.10.90 # see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html -# - using gcc -mdll instead dllwrap doesn't work without -static because -# it tries to link against dlls instead their import libraries. (If -# it finds the dll first.) -# By specifying -static we force ld to link against the import libraries, -# this is windows standard and there are normally not the necessary symbols -# in the dlls. # *** only the version of June 2000 shows these problems # This module should be kept compatible with Python 1.5.2. @@ -98,7 +92,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.set_executables(compiler='gcc -mcygwin -O -Wall', compiler_so='gcc -mcygwin -mdll -O -Wall', linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin -mdll -static' % + linker_so=('%s -mcygwin -mdll' % self.linker_dll)) # cygwin and mingw32 need different sets of libraries @@ -278,7 +272,7 @@ def __init__ (self, self.set_executables(compiler='gcc -mno-cygwin -O -Wall', compiler_so='gcc -mno-cygwin -mdll -O -Wall', linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin -mdll -static %s' + linker_so='%s -mno-cygwin -mdll %s' % (self.linker_dll, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) From 972516d3ad5fba97791d87ba95d126f3d6bcc5a2 Mon Sep 17 00:00:00 2001 From: Jason Tishler Date: Wed, 9 Apr 2003 20:13:59 +0000 Subject: [PATCH 0931/8469] Patch #718551: cygwinccompiler.get_versions() patch The cygwinccompiler.get_versions() function only handles versions numbers of the form "x.y.z". The attached patch enhances get_versions() to handle "x.y" too (i.e., the ".z" is optional). This change causes the unnecessary "--entry _DllMain@12" link option to be suppressed for recent Cygwin and Mingw toolchains. Additionally, it directs recent Mingw toolchains to use gcc instead of dllwrap during linking. --- cygwinccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index e86dc81533..794dcdb59c 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -357,7 +357,7 @@ def get_versions(): out = os.popen(gcc_exe + ' -dumpversion','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+\.\d+)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: gcc_version = StrictVersion(result.group(1)) else: @@ -369,7 +369,7 @@ def get_versions(): out = os.popen(ld_exe + ' -v','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+\.\d+)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: ld_version = StrictVersion(result.group(1)) else: @@ -381,7 +381,7 @@ def get_versions(): out = os.popen(dllwrap_exe + ' --version','r') out_string = out.read() out.close() - result = re.search(' (\d+\.\d+\.\d+)',out_string) + result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) if result: dllwrap_version = StrictVersion(result.group(1)) else: From ac175fdb7176adf51768ab5237c81f7ab421c50d Mon Sep 17 00:00:00 2001 From: Jason Tishler Date: Mon, 14 Apr 2003 12:51:26 +0000 Subject: [PATCH 0932/8469] Patch #709178: remove -static option from cygwinccompiler After some more reflection (and no negative feedback), I am reverting the original patch and applying my version, cygwinccompiler.py-shared.diff, instead. My reasons are the following: 1. support for older toolchains is retained 2. support for new toolchains (i.e., ld -shared) is added The goal of my approach is to avoid breaking older toolchains while adding better support for newer ones. --- cygwinccompiler.py | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 794dcdb59c..94b8b86b6d 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -33,7 +33,17 @@ # * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now # - its dllwrap doesn't work, there is a bug in binutils 2.10.90 # see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html +# - using gcc -mdll instead dllwrap doesn't work without -static because +# it tries to link against dlls instead their import libraries. (If +# it finds the dll first.) +# By specifying -static we force ld to link against the import libraries, +# this is windows standard and there are normally not the necessary symbols +# in the dlls. # *** only the version of June 2000 shows these problems +# * cygwin gcc 3.2/ld 2.13.90 works +# (ld supports -shared) +# * mingw gcc 3.2/ld 2.13 works +# (ld supports -shared) # This module should be kept compatible with Python 1.5.2. @@ -77,7 +87,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.ld_version, self.dllwrap_version) ) - # ld_version >= "2.10.90" should also be able to use + # ld_version >= "2.10.90" and < "2.13" should also be able to use # gcc -mdll instead of dllwrap # Older dllwraps had own version numbers, newer ones use the # same as the rest of binutils ( also ld ) @@ -87,13 +97,20 @@ def __init__ (self, verbose=0, dry_run=0, force=0): else: self.linker_dll = "dllwrap" + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static + if self.ld_version >= "2.13": + shared_option = "-shared" + else: + shared_option = "-mdll -static" + # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. self.set_executables(compiler='gcc -mcygwin -O -Wall', compiler_so='gcc -mcygwin -mdll -O -Wall', linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin -mdll' % - self.linker_dll)) + linker_so=('%s -mcygwin %s' % + (self.linker_dll, shared_option))) # cygwin and mingw32 need different sets of libraries if self.gcc_version == "2.91.57": @@ -262,6 +279,13 @@ def __init__ (self, CygwinCCompiler.__init__ (self, verbose, dry_run, force) + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static + if self.ld_version >= "2.13": + shared_option = "-shared" + else: + shared_option = "-mdll -static" + # A real mingw32 doesn't need to specify a different entry point, # but cygwin 2.91.57 in no-cygwin-mode needs it. if self.gcc_version <= "2.91.57": @@ -272,8 +296,9 @@ def __init__ (self, self.set_executables(compiler='gcc -mno-cygwin -O -Wall', compiler_so='gcc -mno-cygwin -mdll -O -Wall', linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin -mdll %s' - % (self.linker_dll, entry_point)) + linker_so='%s -mno-cygwin %s %s' + % (self.linker_dll, shared_option, + entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) # (-mthreads: Support thread-safe exception handling on `Mingw32') From 8e2d2f9fefd61c49a54298e45d4c10be078a5696 Mon Sep 17 00:00:00 2001 From: Jason Tishler Date: Fri, 18 Apr 2003 17:27:47 +0000 Subject: [PATCH 0933/8469] Patch #718049: Setting exe_extension for cygwin On cygwin, the setup.py script uses unixccompiler.py for compiling and linking C extensions. The unixccompiler.py script assumes that executables do not get special extensions, which makes sense for Unix. However, on Cygwin, executables get an .exe extension. This causes a problem during the configuration step (python setup.py config), in which some temporary executables may be generated. As unixccompiler.py does not know about the .exe extension, distutils fails to clean up after itself: it does not remove _configtest.exe but tries to remove _configtest instead. The attached patch to unixccompiler.py sets the correct exe_extension for cygwin by checking if sys.platform is 'cygwin'. With this patch, distutils cleans up after itself correctly. Michiel de Hoon University of Tokyo, Human Genome Center. --- unixccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unixccompiler.py b/unixccompiler.py index 2a6b1beeea..e444917fb6 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -77,6 +77,8 @@ class UnixCCompiler(CCompiler): shared_lib_extension = ".so" dylib_lib_extension = ".dylib" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" + if sys.platform == "cygwin": + exe_extension = ".exe" def preprocess(self, source, output_file=None, macros=None, include_dirs=None, From d19626f7466f8166af24c6cd5e3aca722395b835 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 24 Apr 2003 19:49:23 +0000 Subject: [PATCH 0934/8469] new method: has_function() - returns a boolean indicating whether the argument function is available on the current platform --- ccompiler.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index 46fb743db0..751ec0694b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -883,6 +883,51 @@ def library_option (self, lib): """ raise NotImplementedError + def has_function(self, funcname, + includes=None, + include_dirs=None, + libraries=None, + library_dirs=None): + """Return a boolean indicating whether funcname is supported on + the current platform. The optional arguments can be used to + augment the compilation environment. + """ + + # this can't be included at module scope because it tries to + # import math which might not be available at that point - maybe + # the necessary logic should just be inlined? + import tempfile + if includes is None: + includes = [] + if include_dirs is None: + include_dirs = [] + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] + fd, fname = tempfile.mkstemp(".c", funcname, text=True) + f = os.fdopen(fd, "w") + for incl in includes: + f.write("""#include "%s"\n""" % incl) + f.write("""\ +main (int argc, char **argv) { + %s(); +} +""" % funcname) + f.close() + try: + objects = self.compile([fname], include_dirs=include_dirs) + except CompileError: + return False + + try: + self.link_executable(objects, "a.out", + libraries=libraries, + library_dirs=library_dirs) + except (LinkError, TypeError): + return False + return True + def find_library_file (self, dirs, lib, debug=0): """Search the specified list of directories for a static or shared library file 'lib' and return the full path to that file. If From 70a92cdaba12a893f3c1d19f8c714029e6054081 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Fri, 9 May 2003 16:06:42 +0000 Subject: [PATCH 0935/8469] Variant of SF patch 614770: MSVC 7 support distutils now looks for the compiler version in sys.version, falling back to MSVC 6 if the version isn't listed (Python 2.2 and lower). Add helper routines for reading the registry. Refactor many module functions into methods of the compiler to avoid passing lots of state as arguments. --- msvccompiler.py | 332 +++++++++++++++++++++++++++--------------------- 1 file changed, 189 insertions(+), 143 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index e07a6d5a0c..b4c890d030 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -1,7 +1,8 @@ """distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class -for the Microsoft Visual Studio.""" +for the Microsoft Visual Studio. +""" # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of @@ -12,7 +13,6 @@ __revision__ = "$Id$" import sys, os, string -from types import * from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -48,126 +48,116 @@ pass if _can_read_reg: - HKEY_CLASSES_ROOT = hkey_mod.HKEY_CLASSES_ROOT - HKEY_LOCAL_MACHINE = hkey_mod.HKEY_LOCAL_MACHINE - HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER - HKEY_USERS = hkey_mod.HKEY_USERS + HKEYS = (hkey_mod.HKEY_USERS, + hkey_mod.HKEY_CURRENT_USER, + hkey_mod.HKEY_LOCAL_MACHINE, + hkey_mod.HKEY_CLASSES_ROOT) +def read_keys(base, key): + """Return list of registry keys.""" - -def get_devstudio_versions (): - """Get list of devstudio versions from the Windows registry. Return a - list of strings containing version numbers; the list will be - empty if we were unable to access the registry (eg. couldn't import - a registry-access module) or the appropriate registry keys weren't - found.""" - - if not _can_read_reg: - return [] - - K = 'Software\\Microsoft\\Devstudio' + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None L = [] - for base in (HKEY_CLASSES_ROOT, - HKEY_LOCAL_MACHINE, - HKEY_CURRENT_USER, - HKEY_USERS): + i = 0 + while 1: try: - k = RegOpenKeyEx(base,K) - i = 0 - while 1: - try: - p = RegEnumKey(k,i) - if p[0] in '123456789' and p not in L: - L.append(p) - except RegError: - break - i = i + 1 + k = RegEnumKey(handle, i) except RegError: - pass - L.sort() - L.reverse() + break + L.append(k) + i = i + 1 return L -# get_devstudio_versions () - - -def get_msvc_paths (path, version='6.0', platform='x86'): - """Get a list of devstudio directories (include, lib or path). Return - a list of strings; will be empty list if unable to access the - registry or appropriate registry keys not found.""" - - if not _can_read_reg: - return [] +def read_values(base, key): + """Return dict of registry keys and values. - L = [] - if path=='lib': - path= 'Library' - path = string.upper(path + ' Dirs') - K = ('Software\\Microsoft\\Devstudio\\%s\\' + - 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ - (version,platform) - for base in (HKEY_CLASSES_ROOT, - HKEY_LOCAL_MACHINE, - HKEY_CURRENT_USER, - HKEY_USERS): + All names are converted to lowercase. + """ + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + d = {} + i = 0 + while 1: try: - k = RegOpenKeyEx(base,K) - i = 0 - while 1: - try: - (p,v,t) = RegEnumValue(k,i) - if string.upper(p) == path: - V = string.split(v,';') - for v in V: - if hasattr(v, "encode"): - try: - v = v.encode("mbcs") - except UnicodeError: - pass - if v == '' or v in L: continue - L.append(v) - break - i = i + 1 - except RegError: - break + name, value, type = RegEnumValue(handle, i) except RegError: + break + name = name.lower() + d[convert_mbcs(name)] = convert_mbcs(value) + i = i + 1 + return d + +def convert_mbcs(s): + enc = getattr(s, "encode", None) + if enc is not None: + try: + s = enc("mbcs") + except UnicodeError: pass - return L - -# get_msvc_paths() - - -def find_exe (exe, version_number): - """Try to find an MSVC executable program 'exe' (from version - 'version_number' of MSVC) in several places: first, one of the MSVC - program search paths from the registry; next, the directories in the - PATH environment variable. If any of those work, return an absolute - path that is known to exist. If none of them work, just return the - original program name, 'exe'.""" - - for p in get_msvc_paths ('path', version_number): - fn = os.path.join (os.path.abspath(p), exe) - if os.path.isfile(fn): - return fn - - # didn't find it; try existing path - for p in string.split (os.environ['Path'],';'): - fn = os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): - return fn - - return exe # last desperate hope - - -def set_path_env_var (name, version_number): - """Set environment variable 'name' to an MSVC path type value obtained - from 'get_msvc_paths()'. This is equivalent to a SET command prior - to execution of spawned commands.""" - - p = get_msvc_paths (name, version_number) - if p: - os.environ[name] = string.join (p,';') - + return s + +class MacroExpander: + + def __init__(self, version): + self.macros = {} + self.load_macros(version) + + def set_macro(self, macro, path, key): + for base in HKEYS: + d = read_values(base, path) + if d: + self.macros["$(%s)" % macro] = d[key] + break + + def load_macros(self, version): + vsbase = r"Software\Microsoft\VisualStudio\%s.0" % version + self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") + self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") + net = r"Software\Microsoft\.NETFramework" + self.set_macro("FrameworkDir", net, "installroot") + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + + p = r"Software\Microsoft\NET Framework Setup\Product" + for base in HKEYS: + try: + h = RegOpenKeyEx(base, p) + except RegError: + continue + key = RegEnumKey(h, 0) + d = read_values(base, r"%s\%s" % (p, key)) + self.macros["$(FrameworkVersion)"] = d["version"] + + def sub(self, s): + for k, v in self.macros.items(): + s = string.replace(s, k, v) + return s + +def get_build_version(): + """Return the version of MSVC that was used to build Python. + + For Python 2.3 and up, the version number is included in + sys.version. For earlier versions, assume the compiler is MSVC 6. + """ + + prefix = "MSC v." + i = string.find(sys.version, prefix) + if i == -1: + return 6 + i += len(prefix) + s, rest = sys.version[i:].split(" ", 1) + n = int(s[:-2]) + if n == 12: + return 6 + elif n == 13: + return 7 + # else we don't know what version of the compiler this is + return None + class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -199,39 +189,31 @@ class MSVCCompiler (CCompiler) : static_lib_format = shared_lib_format = '%s%s' exe_extension = '.exe' - - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - + def __init__ (self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) - versions = get_devstudio_versions () - - if versions: - version = versions[0] # highest version - - self.cc = find_exe("cl.exe", version) - self.linker = find_exe("link.exe", version) - self.lib = find_exe("lib.exe", version) - self.rc = find_exe("rc.exe", version) # resource compiler - self.mc = find_exe("mc.exe", version) # message compiler - set_path_env_var ('lib', version) - set_path_env_var ('include', version) - path=get_msvc_paths('path', version) - try: - for p in string.split(os.environ['path'],';'): - path.append(p) - except KeyError: - pass - os.environ['path'] = string.join(path,';') + self.__version = get_build_version() + if self.__version == 7: + self.__root = r"Software\Microsoft\VisualStudio" + self.__macros = MacroExpander(self.__version) else: - # devstudio not found in the registry - self.cc = "cl.exe" - self.linker = "link.exe" - self.lib = "lib.exe" - self.rc = "rc.exe" - self.mc = "mc.exe" + self.__root = r"Software\Microsoft\Devstudio" + self.__paths = self.get_msvc_paths("path") + + self.cc = self.find_exe("cl.exe") + self.linker = self.find_exe("link.exe") + self.lib = self.find_exe("lib.exe") + self.rc = self.find_exe("rc.exe") # resource compiler + self.mc = self.find_exe("mc.exe") # message compiler + self.set_path_env_var('lib') + self.set_path_env_var('include') + + # extend the MSVC path with the current path + try: + for p in string.split(os.environ['path'], ';'): + self.__paths.append(p) + except KeyError: + pass + os.environ['path'] = string.join(self.__paths, ';') self.preprocess_options = None self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , @@ -500,4 +482,68 @@ def find_library_file (self, dirs, lib, debug=0): # find_library_file () -# class MSVCCompiler + # Helper methods for using the MSVC registry settings + + def find_exe(self, exe): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + + for p in self.__paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + + # didn't find it; try existing path + for p in string.split(os.environ['Path'],';'): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn + + return exe + + def get_msvc_paths(self, path, platform='x86'): + """Get a list of devstudio directories (include, lib or path). + + Return a list of strings. The list will be empty if unable to + access the registry or appropriate registry keys not found. + """ + + if not _can_read_reg: + return [] + + path = path + " dirs" + if self.__version == 7: + key = (r"%s\7.0\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" + % (self.__root,)) + else: + key = (r"%s\6.0\Build System\Components\Platforms" + + for base in HKEYS: + d = read_values(base, key) + if d: + if self.__version == 7: + return string.split(self.__macros.sub(d[path]), ";") + else: + return string.split(d[path], ";") + return [] + + def set_path_env_var(self, name): + """Set environment variable 'name' to an MSVC path type value. + + This is equivalent to a SET command prior to execution of spawned + commands. + """ + + if name == "lib": + p = self.get_msvc_paths("library") + else: + p = self.get_msvc_paths(name) + if p: + os.environ[name] = string.join(p, ';') + From c4ab88656cb41c9c7182805868af9ec6800f9874 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Fri, 9 May 2003 16:55:28 +0000 Subject: [PATCH 0936/8469] Replace line somehow deleted before last checkin. --- msvccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/msvccompiler.py b/msvccompiler.py index b4c890d030..4d7159f0f9 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -523,6 +523,7 @@ def get_msvc_paths(self, path, platform='x86'): % (self.__root,)) else: key = (r"%s\6.0\Build System\Components\Platforms" + r"\Win32 (%s)\Directories" % (self.__root, platform)) for base in HKEYS: d = read_values(base, key) From afc49f281192ac64ca549636dec5e8765bb1e0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Wed, 14 May 2003 19:48:57 +0000 Subject: [PATCH 0937/8469] Restore Python 1.5.2 compatibility. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 4d7159f0f9..eeac0ee67a 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -148,7 +148,7 @@ def get_build_version(): i = string.find(sys.version, prefix) if i == -1: return 6 - i += len(prefix) + i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) n = int(s[:-2]) if n == 12: From bd92613fe048b143af67d29b018d525d8d380b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 31 May 2003 08:09:21 +0000 Subject: [PATCH 0938/8469] Patch #740301: Add +s when linking shared libraries on HP-UX, use -L for the library path. --- unixccompiler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index e444917fb6..02db910ae6 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -203,8 +203,10 @@ def runtime_library_dir_option(self, dir): if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir - elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir + elif sys.platform[:5] == "hp-ux": + return "+s -L" + dir + elif compiler[:3] == "gcc" or compiler[:3] == "g++": + return "-Wl,-R" + dir else: return "-R" + dir From 2e51b32d4660c3e6a8e90ce8e8fa7bb6bed786dc Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 1 Jun 2003 19:27:40 +0000 Subject: [PATCH 0939/8469] Fixed indentation error. Closes bug #746953. --- unixccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 02db910ae6..11ecb9f6ae 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -203,9 +203,9 @@ def runtime_library_dir_option(self, dir): if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir - elif sys.platform[:5] == "hp-ux": + elif sys.platform[:5] == "hp-ux": return "+s -L" + dir - elif compiler[:3] == "gcc" or compiler[:3] == "g++": + elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: return "-R" + dir From 3f5044ac5626bd886b51c905d16a1fcb1aaa6464 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 12 Jun 2003 17:23:58 +0000 Subject: [PATCH 0940/8469] Fix for sf # 749210, wininst isn't build correctly after building zip. The problem was that subcommands were not reinitialized. Bugfix candidate, will backport myself. --- command/bdist_wininst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 5acca11a62..3c4c893920 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -100,7 +100,7 @@ def run (self): if not self.skip_build: self.run_command('build') - install = self.reinitialize_command('install') + install = self.reinitialize_command('install', reinit_subcommands=1) install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = 0 From 59a7a49f88a89af3e6e168da54dcd45ffb374aed Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Fri, 27 Jun 2003 19:33:38 +0000 Subject: [PATCH 0941/8469] Do not add extra "\n" after bang line. --- command/build_scripts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index f61ad37d03..8de9cd3f6d 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -15,7 +15,7 @@ from distutils import log # check if Python is called on the first line with this expression -first_line_re = re.compile(r'^#!.*python[0-9.]*(\s+.*)?$') +first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') class build_scripts (Command): @@ -96,7 +96,7 @@ def copy_scripts (self): (os.path.normpath(sys.executable), post_interp)) else: - outf.write("#!%s%s" % + outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), "python" + sysconfig.get_config_var("EXE")), From a17a0b4ac049c984145ad23ccbbe301b98dc6564 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 17 Jul 2003 14:41:07 +0000 Subject: [PATCH 0942/8469] Patch from John Anderson to enable VC 7.1 support. I tested against VC 7.0 and it caused no problems there. --- msvccompiler.py | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index eeac0ee67a..5f3d8de872 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -45,6 +45,10 @@ RegError = win32api.error except ImportError: + log.info("Warning: Can't read registry to find the " + "necessary compiler setting\n" + "Make sure that Python modules _winreg, " + "win32api or win32con are installed.") pass if _can_read_reg: @@ -115,12 +119,15 @@ def set_macro(self, macro, path, key): break def load_macros(self, version): - vsbase = r"Software\Microsoft\VisualStudio\%s.0" % version + vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") - self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + if version > 7.0: + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") + else: + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") p = r"Software\Microsoft\NET Framework Setup\Product" for base in HKEYS: @@ -150,11 +157,13 @@ def get_build_version(): return 6 i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) - n = int(s[:-2]) - if n == 12: - return 6 - elif n == 13: - return 7 + majorVersion = int(s[:-2]) - 6 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: + minorVersion = 0 + if majorVersion >= 6: + return majorVersion + minorVersion # else we don't know what version of the compiler this is return None @@ -192,13 +201,19 @@ class MSVCCompiler (CCompiler) : def __init__ (self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) self.__version = get_build_version() - if self.__version == 7: + if self.__version >= 7: self.__root = r"Software\Microsoft\VisualStudio" self.__macros = MacroExpander(self.__version) else: self.__root = r"Software\Microsoft\Devstudio" self.__paths = self.get_msvc_paths("path") + if len (self.__paths) == 0: + raise DistutilsPlatformError, \ + ("Python was built with version %s of Visual Studio, " + "and extensions need to be built with the same " + "version of the compiler, but it isn't installed." % self.__version) + self.cc = self.find_exe("cl.exe") self.linker = self.find_exe("link.exe") self.lib = self.find_exe("lib.exe") @@ -518,9 +533,9 @@ def get_msvc_paths(self, path, platform='x86'): return [] path = path + " dirs" - if self.__version == 7: - key = (r"%s\7.0\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" - % (self.__root,)) + if self.__version >= 7: + key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" + % (self.__root, self.__version)) else: key = (r"%s\6.0\Build System\Components\Platforms" r"\Win32 (%s)\Directories" % (self.__root, platform)) @@ -528,7 +543,7 @@ def get_msvc_paths(self, path, platform='x86'): for base in HKEYS: d = read_values(base, key) if d: - if self.__version == 7: + if self.__version >= 7: return string.split(self.__macros.sub(d[path]), ";") else: return string.split(d[path], ";") From 9089c83f40086c19cff06f883f152354c953bd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Mon, 20 Oct 2003 14:01:56 +0000 Subject: [PATCH 0943/8469] Fix a bunch of typos in documentation, docstrings and comments. (From SF patch #810751) --- cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.py b/cmd.py index 7e7a4cd5ff..6e44221eb5 100644 --- a/cmd.py +++ b/cmd.py @@ -148,7 +148,7 @@ def finalize_options (self): """Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been - done. Thus, this is the place to to code option dependencies: if + done. Thus, this is the place to code option dependencies: if 'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as long as 'foo' still has the same value it was assigned in 'initialize_options()'. From f50262ae1518686131d3a0953983ea64b13b1b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 24 Oct 2003 20:09:23 +0000 Subject: [PATCH 0944/8469] Patch #812378: Normalize white space. --- sysconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 67353a8d64..46d1acbb04 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -70,9 +70,9 @@ def get_python_inc(plat_specific=0, prefix=None): return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: - return os.path.join(prefix, "Mac", "Include") + return os.path.join(prefix, "Mac", "Include") else: - return os.path.join(prefix, "Include") + return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: @@ -160,7 +160,7 @@ def customize_compiler(compiler): if os.environ.has_key('LDFLAGS'): ldshared = ldshared + ' ' + os.environ['LDFLAGS'] if basecflags: - opt = basecflags + ' ' + opt + opt = basecflags + ' ' + opt if os.environ.has_key('CFLAGS'): opt = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] From 2c9c51ede8cea8c78f14fcc723c5c0a3cbf7b5cf Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 28 Nov 2003 19:42:56 +0000 Subject: [PATCH 0945/8469] See SF #848614: distutils' msvccompiler now tries to detect that MSVC6 is installed but the registry settings are incomplete because the gui has never been run. Already backported to release23-maint. --- msvccompiler.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 5f3d8de872..27fb658b5b 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -547,6 +547,16 @@ def get_msvc_paths(self, path, platform='x86'): return string.split(self.__macros.sub(d[path]), ";") else: return string.split(d[path], ";") + # MSVC 6 seems to create the registry entries we need only when + # the GUI is run. + if self.__version == 6: + for base in HKEYS: + if read_values(base, r"%s\6.0" % self.__root) is not None: + self.warn("It seems you have Visual Studio 6 installed, " + "but the expected registry settings are not present.\n" + "You must at least run the Visual Studio GUI once " + "so that these entries are created.") + break return [] def set_path_env_var(self, name): From 2a97217f7fae82ae141e9dc1a426146dca203b04 Mon Sep 17 00:00:00 2001 From: Andrew MacIntyre Date: Tue, 2 Dec 2003 12:17:59 +0000 Subject: [PATCH 0946/8469] use same compiler switches as core for extensions --- emxccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emxccompiler.py b/emxccompiler.py index 76bdbae506..f52e63232d 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -63,8 +63,8 @@ def __init__ (self, # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -Zomf -Zmt -O2 -Wall', - compiler_so='gcc -Zomf -Zmt -O2 -Wall', + self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', + compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', linker_exe='gcc -Zomf -Zmt -Zcrtdll', linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') From 21a1ad1c19eeab489dc344c59f0cd027bda50dd7 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 5 Dec 2003 20:12:23 +0000 Subject: [PATCH 0947/8469] Compile the files in the same order they are passed to the compiler. Use case: Sometimes 'compiling' source files (with SWIG, for example) creates additionl files which included by later sources. The win32all setup script requires this. There is no SF item for this, but it was discussed on distutils-sig: http://mail.python.org/pipermail/distutils-sig/2003-November/003514.html --- bcppcompiler.py | 6 +++++- ccompiler.py | 6 +++++- msvccompiler.py | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index cfbe04ac01..b0360a248e 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -96,7 +96,11 @@ def compile(self, sources, else: compile_opts.extend (self.compile_options) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue # XXX why do the normpath here? src = os.path.normpath(src) obj = os.path.normpath(obj) diff --git a/ccompiler.py b/ccompiler.py index 751ec0694b..ebd93c27eb 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -691,7 +691,11 @@ def compile(self, sources, output_dir=None, macros=None, depends, extra_postargs) cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) # Return *all* object filenames, not just the ones we just built. diff --git a/msvccompiler.py b/msvccompiler.py index 27fb658b5b..1441ea04c3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -291,7 +291,11 @@ def compile(self, sources, else: compile_opts.extend(self.compile_options) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue if debug: # pass the full pathname to MSVC in debug mode, # this allows the debugger to find the source file From affdbb99128310385c45cd2562afcb2f0009431f Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 18 Jan 2004 20:29:55 +0000 Subject: [PATCH 0948/8469] Whitespace normalization. --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0c37768179..7fff422268 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -171,7 +171,8 @@ def finalize_options (self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) + #self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From cdd1c7641bdef9ac123a2879c88c2f4d28a9a9fe Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 18 Jan 2004 20:39:35 +0000 Subject: [PATCH 0949/8469] Revert another local change that snuck into a whitespace normalization patch. --- command/build_ext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7fff422268..0c37768179 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -171,8 +171,7 @@ def finalize_options (self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) - #self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From 950e6ac2191aa79725d553476bb9cd3211ae0a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Thu, 12 Feb 2004 17:35:32 +0000 Subject: [PATCH 0950/8469] Replace backticks with repr() or "%r" From SF patch #852334. --- cmd.py | 4 ++-- core.py | 2 +- dir_util.py | 2 +- dist.py | 4 ++-- fancy_getopt.py | 2 +- util.py | 16 ++++++++-------- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd.py b/cmd.py index 6e44221eb5..fef49390da 100644 --- a/cmd.py +++ b/cmd.py @@ -253,8 +253,8 @@ def ensure_string_list (self, option): if not ok: raise DistutilsOptionError, \ - "'%s' must be a list of strings (got %s)" % \ - (option, `val`) + "'%s' must be a list of strings (got %r)" % \ + (option, val) def _ensure_tested_string (self, option, tester, what, error_fmt, default=None): diff --git a/core.py b/core.py index a463272c2f..eb419721e4 100644 --- a/core.py +++ b/core.py @@ -202,7 +202,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): used to drive the Distutils. """ if stop_after not in ('init', 'config', 'commandline', 'run'): - raise ValueError, "invalid value for 'stop_after': %s" % `stop_after` + raise ValueError, "invalid value for 'stop_after': %r" % (stop_after,) global _setup_stop_after, _setup_distribution _setup_stop_after = stop_after diff --git a/dir_util.py b/dir_util.py index bd1ea0f243..e479b62415 100644 --- a/dir_util.py +++ b/dir_util.py @@ -33,7 +33,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # Detect a common bug -- name is None if type(name) is not StringType: raise DistutilsInternalError, \ - "mkpath: 'name' must be a string (got %s)" % `name` + "mkpath: 'name' must be a string (got %r)" % (name,) # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce diff --git a/dist.py b/dist.py index d313e7d116..f63ea97331 100644 --- a/dist.py +++ b/dist.py @@ -525,9 +525,9 @@ def _parse_command_opts (self, parser, args): func() else: raise DistutilsClassError( - "invalid help function %s for help option '%s': " + "invalid help function %r for help option '%s': " "must be a callable object (function, etc.)" - % (`func`, help_option)) + % (func, help_option)) if help_option_found: return diff --git a/fancy_getopt.py b/fancy_getopt.py index a4a4e7979e..512bc9b665 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -162,7 +162,7 @@ def _grok_option_table (self): else: # the option table is part of the code, so simply # assert that it is correct - assert "invalid option tuple: %s" % `option` + assert "invalid option tuple: %r" % (option,) # Type- and value-check the option names if type(long) is not StringType or len(long) < 2: diff --git a/util.py b/util.py index dc3183b691..8c3c8df979 100644 --- a/util.py +++ b/util.py @@ -285,7 +285,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): print. """ if msg is None: - msg = "%s%s" % (func.__name__, `args`) + msg = "%s%r" % (func.__name__, args) if msg[-2:] == ',)': # correct for singleton tuple msg = msg[0:-2] + ')' @@ -307,7 +307,7 @@ def strtobool (val): elif val in ('n', 'no', 'f', 'false', 'off', '0'): return 0 else: - raise ValueError, "invalid truth value %s" % `val` + raise ValueError, "invalid truth value %r" % (val,) def byte_compile (py_files, @@ -394,11 +394,11 @@ def byte_compile (py_files, script.write(string.join(map(repr, py_files), ",\n") + "]\n") script.write(""" -byte_compile(files, optimize=%s, force=%s, - prefix=%s, base_dir=%s, - verbose=%s, dry_run=0, +byte_compile(files, optimize=%r, force=%r, + prefix=%r, base_dir=%r, + verbose=%r, dry_run=0, direct=1) -""" % (`optimize`, `force`, `prefix`, `base_dir`, `verbose`)) +""" % (optimize, force, prefix, base_dir, verbose)) script.close() @@ -432,8 +432,8 @@ def byte_compile (py_files, if prefix: if file[:len(prefix)] != prefix: raise ValueError, \ - ("invalid prefix: filename %s doesn't start with %s" - % (`file`, `prefix`)) + ("invalid prefix: filename %r doesn't start with %r" + % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) From bc3373b4d89d718b8760d3c8a4afd18316fec86c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 17 Feb 2004 22:35:19 +0000 Subject: [PATCH 0951/8469] commentary about how bad ConfigParser is doesn't help here, and the suggested approach to dealing with it isn't a good one; we need a better general purpose config reader, not a distutils-specific reader --- dist.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dist.py b/dist.py index f63ea97331..586e6bb145 100644 --- a/dist.py +++ b/dist.py @@ -346,9 +346,7 @@ def parse_config_files (self, filenames=None): opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain - # the original filenames that options come from) -- gag, - # retch, puke -- another good reason for a distutils- - # specific config parser (sigh...) + # the original filenames that options come from) parser.__init__() # If there was a "global" section in the config file, use it From 0d7a3db04fd813544f939ce1d9bbcf135f1a6f35 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 20 Feb 2004 14:43:21 +0000 Subject: [PATCH 0952/8469] Patch #892660 from Mark Hammond, for distutils bdist_wininst command. install.c: support for a 'pre-install-script', run before anything has been installed. Provides a 'message_box' module function for use by either the pre-install or post-install scripts. bdist_wininst.py: support for pre-install script. Typo (build->built), fixes so that --target-version can still work, even when the distribution has extension modules - in this case, we insist on --skip-build, as we still can't actually build other versions. --- command/bdist_wininst.py | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3c4c893920..76b1762ede 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -43,6 +43,10 @@ class bdist_wininst (Command): ('install-script=', None, "basename of installation script to be run after" "installation or before deinstallation"), + ('pre-install-script=', None, + "Fully qualified filename of a script to be run before " + "any files are installed. This script need not be in the " + "distribution"), ] boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', @@ -59,6 +63,7 @@ def initialize_options (self): self.title = None self.skip_build = 0 self.install_script = None + self.pre_install_script = None # initialize_options() @@ -69,11 +74,12 @@ def finalize_options (self): self.bdist_dir = os.path.join(bdist_base, 'wininst') if not self.target_version: self.target_version = "" - if self.distribution.has_ext_modules(): + if not self.skip_build and self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ - "target version can only be" + short_version + "target version can only be %s, or the '--skip_build'" \ + " option must be specified" % (short_version,) self.target_version = short_version self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) @@ -109,6 +115,21 @@ def run (self): # we do not want to include pyc or pyo files install_lib.compile = 0 install_lib.optimize = 0 + + # If we are building an installer for a Python version other + # than the one we are currently running, then we need to ensure + # our build_lib reflects the other Python version rather than ours. + # Note that for target_version!=sys.version, we must have skipped the + # build step, so there is no issue with enforcing the build of this + # version. + target_version = self.target_version + if not target_version: + assert self.skip_build, "Should have already checked this" + target_version = sys.version[0:3] + plat_specifier = ".%s-%s" % (get_platform(), target_version) + build = self.get_finalized_command('build') + build.build_lib = os.path.join(build.build_base, + 'lib' + plat_specifier) # Use a custom scheme for the zip-file, because we have to decide # at installation time which scheme to use. @@ -187,7 +208,7 @@ def get_inidata (self): lines.append("title=%s" % repr(title)[1:-1]) import time import distutils - build_info = "Build %s with distutils-%s" % \ + build_info = "Built %s with distutils-%s" % \ (time.ctime(time.time()), distutils.__version__) lines.append("build_info=%s" % build_info) return string.join(lines, "\n") @@ -223,6 +244,11 @@ def create_exe (self, arcname, fullname, bitmap=None): if bitmap: file.write(bitmapdata) + # Append the pre-install script + cfgdata = cfgdata + "\0" + if self.pre_install_script: + script_data = open(self.pre_install_script, "r").read() + cfgdata = cfgdata + script_data + "\n\0" file.write(cfgdata) header = struct.pack(" Date: Fri, 20 Feb 2004 14:44:32 +0000 Subject: [PATCH 0953/8469] Recompiled the binary wininst.exe. Patch #892660 from Mark Hammond, for distutils bdist_wininst command. install.c: support for a 'pre-install-script', run before anything has been installed. Provides a 'message_box' module function for use by either the pre-install or post-install scripts. bdist_wininst.py: support for pre-install script. Typo (build->built), fixes so that --target-version can still work, even when the distribution has extension modules - in this case, we insist on --skip-build, as we still can't actually build other versions. --- command/wininst.exe | Bin 20992 -> 21504 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst.exe b/command/wininst.exe index 6290a9361e36d244122f6af3feb506efe6d255c8..bea2bed4c14ba91dacafda27a890db281143dc4b 100755 GIT binary patch delta 18883 zcmXtfXH*m4*L6Y)fg~hAfY3un5_+%FdkHP{UJM;m00j+QAfPCq(iB9op+5wrNC%}T zC1C#Fo^YwsRm-S8D=l2fqv@AYCYDUrjkmt&q|6yrKz9sK5e`V0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Yh&FO73 R9U;Ea972x7`nLFR@IS?K`al2x From ab3840c7ff78c37c20f8c36242eba1b3329778e2 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 20 Feb 2004 18:26:55 +0000 Subject: [PATCH 0954/8469] wininst.exe is no longer used - we now need wininst-6.exe or wininst-7.1.exe. --- command/wininst.exe | Bin 21504 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 command/wininst.exe diff --git a/command/wininst.exe b/command/wininst.exe deleted file mode 100755 index bea2bed4c14ba91dacafda27a890db281143dc4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21504 zcmdqIXH-*f5I&fY5CSA5K!DIgM-qCkh90B^0tvl?p<@c5fRq3d0*VSM#e&#HMNmNL zpcDlKL5hfgqJk7r5m3-9{{Ch6>^Zw1_ruOP?>z6k^W3>_<|eswlQXV)fr008d| zE*Ai3-ot-_|4;wFtMxs%ko;pIzytmvg=V13kb)OAnvO}LB_5=O#$&=m6A}^`n6O9; zjhTRnPQci?lQ8j#5s_MOxPbEi3_ZKUm9DHfN%&u5F8@5?+@6ijzep(GLwa7>e<*h9 z#eY~?Q9=;^=RY+_IP;&sl5l(vm8#AXD)!JbI-L41*8kJaiS_`13lIbtKpWxz7iSKD z015&j0041s1-Uos0DwyZKmefgpS_3wvhi=7=YQmBZ}wll{viOf=l_?yJ=t^b$sX|^ z_kZL6H2*E_iH|7cdEKQ{onrf@PF?6e{CTP0GQk3>HcRE z_jKppaM>IGHy(bEr$wXF!uMSN#rl_{f1H2E{9gqBKO+2JR{sAu6#ytZB}65fVg7sb zM@7d)V*Y&yLc?PtBQPn^3@U~}jl}Hb6%&~n8O~&chV3!_bJH+X1|!K#Tbr4bs>PtE zY9-PRVwC^Ii!l4|09`E|U5ssF(qUTkK`H~IZo3boYieqwsi&i(^S`5dMTW*}VXWig zFrNQdbc|;tJ(89j8KLzr*4}v)VEjA+SAEaLNLGQ~|6BwB$`0&ZhdBU16$q&2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st-7.1.exe are in CVS, so that they can be included in Python distributions for systems other than Windows. Windows installers can be build on non-Windows systems as long as they only include pure python module distributions. --- command/wininst-6.exe | Bin 0 -> 21504 bytes command/wininst-7.1.exe | Bin 0 -> 22016 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 command/wininst-6.exe create mode 100644 command/wininst-7.1.exe diff --git a/command/wininst-6.exe b/command/wininst-6.exe new file mode 100644 index 0000000000000000000000000000000000000000..c40cbcb5a0adbbc15edd7005be0deb672f9d08c3 GIT binary patch literal 21504 zcmdqIc{H0{6gQe#L?S^DbIdA1%ri01gb3ww0bl?C0NES6 zy8uAL9{v^bfBOGjZS1)P<(>!vYWWA`8-T6@^4|0qCO(;w6wL@tz=ww>CML1)VUc(S zI}sm~h`05i;uDf0A~jJcgwp>Ey>Ux1`f0D5-v1iiBUXB?d$#3>jb6(hdXGB&hdS-T z|KZbKS3SeO{&tLB&3}Fey$5^P`22tPA+KEYn)ht4m~i^vnEy|AK(PY=T!COfG}VCo zzc|wXG*AEt0{|#{E111ey_W|B5CCZVYwzLTto&UE{f~U@&Hl^VUj*Ry{C|_UCwuNa z*(3ht{%`!B=HI0~AqfEi6@NqS#U=g4|Bu9n;z#=LsOmla-}UX`|Ge)1bqP5D!1NwZ z`#+nqr`z_1>)!ak@yL5TO$L(@zUTTc*54fc<^0|Ae+c=1MEE~e{{J*Z0F;~(qmoSU z|2_OsG4YZ3zi)!j@VLkbd}<7fj%U#$@q78iN2W!Fvss~GdyN0w3_P91N;c8bVkf6* zvY2U_NsMT`(%*OyCjV{F)+A};ZIY7H88Ojx7GBL}A70zo*g!*vL?Zp~sNRvG37UAT z_;|e6UltSZ70HZbq(nw&{*ASFt~`<-glJuxnM}6Eu20PY07lMx`JV;=RDgi4-QCZ- zG#*O{S+IuA=Ky?o@k&@<-XSFnHOB(LN>1Ee+KmmQ?TWe{Bm;OW3jY4AVBannKm~zJc~^UO?~x-8OPiXW=4ead&EJ2}z|DnfGYut~D9A8MEPRz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K4C+=j=1p! zv9W=+=AzAqoW2*B*XUSyea9c2;PHccW%&f%2F1Mmc%6bgM@Kpa!o1_DFB7#zH$l7u zOh;@`bglmw<@dHKLR<7ZAc38*9;a^B>3gg#>Hq}4w=)>6a`?aY{WF05Qk&2Ml=y>z zA>m7@zptGbC=H~uzr&+09@rcoLl999&A!)kpj1GE%REN{@C-mHz()Yld5IV(2f$Yi zJcZy>LA>kxFEnm==N2M0y*&;?jJc3@abU7 z8P_+BN3fxwcQXE>^$iLci` zbWm8NXDEmLg$3`-<9bAxcj$Ns>S!W-Ay`e5@ntG51o?^-JQ*TD?;*hY9|U Date: Fri, 20 Feb 2004 19:38:50 +0000 Subject: [PATCH 0956/8469] Use the right wininstXX.exe, depending on msvccompiler.get_build_version(). Distributions without a pre-install-script didn't work any longer, we must at least provide the terminating NUL character. --- command/bdist_wininst.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 76b1762ede..324ce31a91 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -249,6 +249,9 @@ def create_exe (self, arcname, fullname, bitmap=None): if self.pre_install_script: script_data = open(self.pre_install_script, "r").read() cfgdata = cfgdata + script_data + "\n\0" + else: + # empty pre-install script + cfgdata = cfgdata + "\0" file.write(cfgdata) header = struct.pack(" Date: Tue, 24 Feb 2004 23:54:17 +0000 Subject: [PATCH 0957/8469] Make _spawn_posix be ready for EINTR. waitpid(2) can be interrupted by SIGCHLD or sth because no signal is masked before. This fixes an optimized installation problem on FreeBSD libpthread. --- spawn.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spawn.py b/spawn.py index 4857ce5e63..67391e8826 100644 --- a/spawn.py +++ b/spawn.py @@ -144,7 +144,14 @@ def _spawn_posix (cmd, # Loop until the child either exits or is terminated by a signal # (ie. keep waiting if it's merely stopped) while 1: - (pid, status) = os.waitpid(pid, 0) + try: + (pid, status) = os.waitpid(pid, 0) + except OSError, exc: + import errno + if exc.errno == errno.EINTR: + continue + raise DistutilsExecError, \ + "command '%s' failed: %s" % (cmd[0], exc[-1]) if os.WIFSIGNALED(status): raise DistutilsExecError, \ "command '%s' terminated by signal %d" % \ From 7fcc46c767cdadaa18b2b1111864b92ec4439bd9 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Mon, 22 Mar 2004 22:22:05 +0000 Subject: [PATCH 0958/8469] Basic dependency checking. setup() has two new optional arguments requires and provides. requires is a sequence of strings, of the form 'packagename-version'. The dependency checking so far merely does an '__import__(packagename)' and checks for packagename.__version__ You can also leave off the version, and any version of the package will be installed. There's a special case for the package 'python' - sys.version_info is used, so requires= ( 'python-2.3', ) just works. Provides is of the same format as requires - but if it's not supplied, a provides is generated by adding the version to each entry in packages, or modules if packages isn't there. Provides is currently only used in the PKG-INFO file. Shortly, PyPI will grow the ability to accept these lines, and register will be updated to send them. There's a new command 'checkdep' command that runs these checks. For this version, only greater-than-or-equal checking is done. We'll add the ability to specify an optional operator later. --- command/__init__.py | 1 + command/checkdep.py | 70 +++++++++++++++++++++++++++++++++++++++++++++ command/install.py | 13 ++++++++- core.py | 3 +- dist.py | 60 +++++++++++++++++++++++++++++++++++++- 5 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 command/checkdep.py diff --git a/command/__init__.py b/command/__init__.py index 870005dca7..3a9a53ee85 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -24,6 +24,7 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', + 'checkdep', # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', diff --git a/command/checkdep.py b/command/checkdep.py new file mode 100644 index 0000000000..729002c725 --- /dev/null +++ b/command/checkdep.py @@ -0,0 +1,70 @@ +"""distutils.command.x + +Implements the Distutils 'x' command. +""" + +# created 2000/mm/dd, John Doe + +__revision__ = "$Id$" + +from distutils.core import Command + +class DependencyFailure(Exception): pass + +class VersionTooOld(DependencyFailure): pass + +class VersionNotKnown(DependencyFailure): pass + +class checkdep (Command): + + # Brief (40-50 characters) description of the command + description = "check package dependencies" + + # List of option tuples: long name, short name (None if no short + # name), and help string. + # Later on, we might have auto-fetch and the like here. Feel free. + user_options = [] + + def initialize_options (self): + self.debug = None + + # initialize_options() + + + def finalize_options (self): + pass + # finalize_options() + + + def run (self): + from distutils.version import LooseVersion + failed = [] + for pkg, ver in self.distribution.metadata.requires: + if pkg == 'python': + if ver is not None: + # Special case the 'python' package + import sys + thisver = LooseVersion('%d.%d.%d'%sys.version_info[:3]) + if thisver < ver: + failed.append(((pkg,ver), VersionTooOld(thisver))) + continue + # Kinda hacky - we should do more here + try: + mod = __import__(pkg) + except Exception, e: + failed.append(((pkg,ver), e)) + continue + if ver is not None: + if hasattr(mod, '__version__'): + thisver = LooseVersion(mod.__version__) + if thisver < ver: + failed.append(((pkg,ver), VersionTooOld(thisver))) + else: + failed.append(((pkg,ver), VersionNotKnown())) + + if failed: + raise DependencyFailure, failed + + # run() + +# class x diff --git a/command/install.py b/command/install.py index 5d5bdaa77e..7fb46a74bb 100644 --- a/command/install.py +++ b/command/install.py @@ -126,6 +126,8 @@ class install (Command): "force installation (overwrite any existing files)"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('skip-checkdep', None, + "skip checking dependencies (use at own risk)"), # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), @@ -183,12 +185,15 @@ def initialize_options (self): # 'force' forces installation, even if target files are not # out-of-date. 'skip_build' skips running the "build" command, - # handy if you know it's not necessary. 'warn_dir' (which is *not* + # handy if you know it's not necessary. 'skip_checkdep' skips + # the 'checkdep' command, if you are sure you can work around the + # dependency failure in another way. 'warn_dir' (which is *not* # a user option, it's just there so the bdist_* commands can turn # it off) determines whether we warn about installing to a # directory not in sys.path. self.force = 0 self.skip_build = 0 + self.skip_checkdep = 0 self.warn_dir = 1 # These are only here as a conduit from the 'build' command to the @@ -500,6 +505,12 @@ def run (self): if not self.skip_build: self.run_command('build') + # We check dependencies before we install + # For now, this is disabled. Before 2.4 is released, this will + # be turned on. + #if not self.skip_checkdep: + # self.run_command('checkdep') + # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) diff --git a/core.py b/core.py index eb419721e4..fba463c10b 100644 --- a/core.py +++ b/core.py @@ -47,7 +47,8 @@ def gen_usage (script_name): 'name', 'version', 'author', 'author_email', 'maintainer', 'maintainer_email', 'url', 'license', 'description', 'long_description', 'keywords', - 'platforms', 'classifiers', 'download_url') + 'platforms', 'classifiers', 'download_url', + 'provides', 'requires', ) # Legal keyword arguments for the Extension constructor extension_keywords = ('name', 'sources', 'include_dirs', diff --git a/dist.py b/dist.py index 586e6bb145..2795b7bc83 100644 --- a/dist.py +++ b/dist.py @@ -214,6 +214,51 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") + # Build up the requires sequence + from distutils.version import LooseVersion + requires = attrs.get('requires') + if requires: + if isinstance(requires, type('')): + raise DistutilsOptionError, 'requires should be a sequence' + newreq = [] + for req in requires: + if '-' not in req: + # We have a plain package name - any version will do + newreq.append((req,None)) + else: + pkg, ver = string.split(req, '-', 1) + newreq.append((pkg, LooseVersion(ver))) + attrs['requires'] = newreq + + # Build up the provides object. If the setup() has no + # provides line, we use packages or modules and the version + # to synthesise the provides. If no version is provided (no + # pun intended) we don't have a provides entry at all. + provides = attrs.get('provides') + if provides: + if isinstance(provides, type('')): + raise DistutilsOptionError, 'provides should be a sequence' + newprov = [] + for prov in provides: + if '-' not in prov: + # We have a plain package name - any version will do + newprov.append((prov,None)) + else: + pkg, ver = string.split(prov, '-', 1) + newprov.append((pkg, LooseVersion(ver))) + attrs['provides'] = newprov + elif attrs.get('version'): + # Build a provides line + prov = [] + if attrs.get('packages'): + for pkg in attrs['packages']: + pkg = string.replace(pkg, '/', '.') + prov.append('%s-%s'%(pkg, attrs['version'])) + elif attrs.get('modules'): + for mod in attrs['modules']: + prov.append('%s-%s'%(mod, attrs['version'])) + attrs['provides'] = prov + # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): @@ -974,7 +1019,7 @@ class DistributionMetadata: "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", "contact_email", "license", "classifiers", - "download_url") + "download_url", "provides", "requires",) def __init__ (self): self.name = None @@ -991,6 +1036,8 @@ def __init__ (self): self.platforms = None self.classifiers = None self.download_url = None + self.requires = [] + self.provides = [] def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. @@ -1006,6 +1053,10 @@ def write_pkg_info (self, base_dir): pkg_info.write('Author: %s\n' % self.get_contact() ) pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) pkg_info.write('License: %s\n' % self.get_license() ) + for req in self.get_requires(): + pkg_info.write('Requires: %s\n' % req ) + for prov in self.get_provides(): + pkg_info.write('Provides: %s\n' % prov ) if self.download_url: pkg_info.write('Download-URL: %s\n' % self.download_url) @@ -1084,6 +1135,13 @@ def get_classifiers(self): def get_download_url(self): return self.download_url or "UNKNOWN" + def get_requires(self): + return [ '%s%s%s'%(x, (y and '-') or '', y or '') + for x,y in self.requires ] + + def get_provides(self): + return self.provides + # class DistributionMetadata From 62e895c42c640dfee627e9ae286a5577654ebdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 25 Mar 2004 14:58:19 +0000 Subject: [PATCH 0959/8469] Defer compilation of regular expressions until first use. --- util.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util.py b/util.py index 8c3c8df979..12775d6fc4 100644 --- a/util.py +++ b/util.py @@ -209,9 +209,12 @@ def grok_environment_error (exc, prefix="error: "): # Needed by 'split_quoted()' -_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) -_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") -_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') +_wordchars_re = _squote_re = _dquote_re = None +def _init_regex(): + global _wordchars_re, _squote_re, _dquote_re + _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) + _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") + _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and @@ -227,6 +230,7 @@ def split_quoted (s): # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... + if _wordchars_re is None: _init_regex() s = string.strip(s) words = [] From 74d0b875f5ca2d37ade9f60df8ab09b90db35b57 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 25 Mar 2004 22:04:52 +0000 Subject: [PATCH 0960/8469] make sure the default manifest generation includes files identified as scripts closes SF bug 796042 --- command/build_scripts.py | 2 ++ command/sdist.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/command/build_scripts.py b/command/build_scripts.py index 8de9cd3f6d..165a009ded 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -41,6 +41,8 @@ def finalize_options (self): ('force', 'force')) self.scripts = self.distribution.scripts + def get_source_files(self): + return self.scripts def run (self): if not self.scripts: diff --git a/command/sdist.py b/command/sdist.py index c0b7dd45d9..0a29addba6 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -304,6 +304,10 @@ def add_defaults (self): build_clib = self.get_finalized_command('build_clib') self.filelist.extend(build_clib.get_source_files()) + if self.distribution.has_scripts(): + build_scripts = self.get_finalized_command('build_scripts') + self.filelist.extend(build_scripts.get_source_files()) + # add_defaults () From 802e2d1d699ab8830e703ab229c31a7e2749f369 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 11 May 2004 18:13:10 +0000 Subject: [PATCH 0961/8469] Added 2.3.3 and 2.3.4 to the release table. Added 2004 to the list of copyright years. --- command/build_ext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0c37768179..83364c7463 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -171,9 +171,10 @@ def finalize_options (self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) + #self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) - # OS/2 (EMX) doesn't support Debug vs Release builds, but has the + # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) @@ -636,7 +637,7 @@ def get_libraries (self, ext): # EMX/GCC requires the python library explicitly, and I # believe VACPP does as well (though not confirmed) - AIM Apr01 template = "python%d%d" - # debug versions of the main DLL aren't supported, at least + # debug versions of the main DLL aren't supported, at least # not at this time - AIM Apr01 #if self.debug: # template = template + '_d' From 56255b44272116bc022a3c8b872a6b5441e1177f Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 11 May 2004 18:18:35 +0000 Subject: [PATCH 0962/8469] Reverting local change checked in by mistake. --- command/build_ext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 83364c7463..0c37768179 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -171,10 +171,9 @@ def finalize_options (self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) - #self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) - # OS/2 (EMX) doesn't support Debug vs Release builds, but has the + # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) @@ -637,7 +636,7 @@ def get_libraries (self, ext): # EMX/GCC requires the python library explicitly, and I # believe VACPP does as well (though not confirmed) - AIM Apr01 template = "python%d%d" - # debug versions of the main DLL aren't supported, at least + # debug versions of the main DLL aren't supported, at least # not at this time - AIM Apr01 #if self.debug: # template = template + '_d' From 23064f19614cbb3afc2ce8c908e05d5bc4e11aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Mon, 31 May 2004 15:12:27 +0000 Subject: [PATCH 0963/8469] Fix typo (from SF bug #962602) --- filelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filelist.py b/filelist.py index bfa53d2133..0872e96636 100644 --- a/filelist.py +++ b/filelist.py @@ -166,7 +166,7 @@ def process_template_line (self, line): (dir, string.join(patterns))) for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): - log.warn(("warngin: no files found matching '%s' " + + log.warn(("warning: no files found matching '%s' " + "under directory '%s'"), pattern, dir) From ffd7d4b009e36c735ec8e7bead8c45c56049f144 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 31 May 2004 19:27:59 +0000 Subject: [PATCH 0964/8469] SF patch 959726: sdist versus SVN The disutils sdist command now ignores .svn directories. --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 0a29addba6..7021496549 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -347,14 +347,14 @@ def prune_file_list (self): * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) - * any RCS or CVS directories + * any RCS, CVS and .svn directories """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1) + self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1) def write_manifest (self): From 48fa26d6758e83a5680f95d8795ee6428d752a02 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 3 Jun 2004 12:41:45 +0000 Subject: [PATCH 0965/8469] Partial fix for #887242 (link extensions with dynamic_lookup in stead of hard linking against the framework). If $MACOSX_DEPLOYMENT_TARGET is set, and >= 10.3, during configure we setup extensions to link with dynamic lookup. We also record the value in the Makefile. Distutils checks whether a value for MACOSX_DEPLOYMENT_TARGET was recorded in the Makefile, and if it was insists that the current value matches. This is only a partial fix because it only applies to 2.4, and the "two python problem" exists with Python 2.3 shipped with MacOSX 10.3, which we have no influence over. --- sysconfig.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 46d1acbb04..c912a15cdc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -355,7 +355,19 @@ def _init_posix(): raise DistutilsPlatformError(my_msg) - + # On MacOSX we need to check the setting of the environment variable + # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so + # it needs to be compatible. + # An alternative would be to force MACOSX_DEPLOYMENT_TARGET to be + # the same as during configure. + if sys.platform == 'darwin' and g.has_key('CONFIGURE_MACOSX_DEPLOYMENT_TARGET'): + cfg_target = g['CONFIGURE_MACOSX_DEPLOYMENT_TARGET'] + cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') + if cfg_target != cur_target: + my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' + % (cur_target, cfg_target)) + raise DistutilsPlatformError(my_msg) + # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. From 10fc69e6cf3fed9c530548ec7a8dbc4536ad4576 Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Sat, 5 Jun 2004 18:37:53 +0000 Subject: [PATCH 0966/8469] SF #877165: Give an info about what C++ compiler command should be used in cygwin and mingw32. (Reported by Michael Droettboom) --- cygwinccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 94b8b86b6d..0101bae5b9 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -108,6 +108,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): # XXX optimization, warnings etc. should be customizable. self.set_executables(compiler='gcc -mcygwin -O -Wall', compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', linker_exe='gcc -mcygwin', linker_so=('%s -mcygwin %s' % (self.linker_dll, shared_option))) @@ -295,6 +296,7 @@ def __init__ (self, self.set_executables(compiler='gcc -mno-cygwin -O -Wall', compiler_so='gcc -mno-cygwin -mdll -O -Wall', + compiler_cxx='g++ -mno-cygwin -O -Wall', linker_exe='gcc -mno-cygwin', linker_so='%s -mno-cygwin %s %s' % (self.linker_dll, shared_option, From 2dc3968b1f396bca0d8732826103427ffa8f3fe8 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Fri, 11 Jun 2004 17:16:46 +0000 Subject: [PATCH 0967/8469] Bug 957381: rpmbuild builds a -debuginfo rpm on recent Redhat and Fedora releases. Ignore it, rather than breaking. Will backport. (and r1.1000 for Misc/NEWS!) --- command/bdist_rpm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 237cc70d25..4be9999497 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -313,10 +313,15 @@ def run (self): if not self.source_only: rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) + debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], \ + "*/*debuginfo*.rpm")) + if debuginfo: + rpms.remove(debuginfo[0]) assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms self.move_file(rpms[0], self.dist_dir) - + if debuginfo: + self.move_file(debuginfo[0], self.dist_dir) # run() From f94afed8695dece39c63c0122579a9e7f823d9e0 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 11 Jun 2004 21:50:33 +0000 Subject: [PATCH 0968/8469] Add support for package data. This is basically the support for package data from Phillip Eby's setuptools package. I've changed it only to fit it into the core implementation rather than to live in subclasses, and added documentation. --- command/build_py.py | 51 +++++++++++++++++++++++++++++++++++++++++++++ dist.py | 1 + 2 files changed, 52 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index 6c007c6987..329b55a9d5 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -37,6 +37,7 @@ def initialize_options (self): self.build_lib = None self.py_modules = None self.package = None + self.package_data = None self.package_dir = None self.compile = 0 self.optimize = 0 @@ -51,6 +52,8 @@ def finalize_options (self): # options -- list of packages and list of modules. self.packages = self.distribution.packages self.py_modules = self.distribution.py_modules + self.package_data = self.distribution.package_data + self.data_files = self.get_data_files() self.package_dir = {} if self.distribution.package_dir: for name, path in self.distribution.package_dir.items(): @@ -92,11 +95,53 @@ def run (self): self.build_modules() if self.packages: self.build_packages() + self.build_package_data() self.byte_compile(self.get_outputs(include_bytecode=0)) # run () + def get_data_files (self): + """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" + data = [] + for package in self.packages: + # Locate package source directory + src_dir = self.get_package_dir(package) + + # Compute package build directory + build_dir = os.path.join(*([self.build_lib] + package.split('.'))) + + # Length of path to strip from found files + plen = len(src_dir)+1 + + # Strip directory from globbed filenames + filenames = [ + file[plen:] for file in self.find_data_files(package, src_dir) + ] + data.append((package, src_dir, build_dir, filenames)) + return data + + def find_data_files (self, package, src_dir): + """Return filenames for package's data files in 'src_dir'""" + globs = (self.package_data.get('', []) + + self.package_data.get(package, [])) + files = [] + for pattern in globs: + # Each pattern has to be converted to a platform-specific path + filelist = glob(os.path.join(src_dir, convert_path(pattern))) + # Files that match more than one pattern are only added once + files.extend([fn for fn in filelist if fn not in files]) + return files + + def build_package_data (self): + """Copy data files into build directory""" + lastdir = None + for package, src_dir, build_dir, filenames in self.data_files: + for filename in filenames: + target = os.path.join(build_dir, filename) + self.mkpath(os.path.dirname(target)) + self.copy_file(os.path.join(src_dir, filename), target, + preserve_mode=False) def get_package_dir (self, package): """Return the directory, relative to the top of the source @@ -304,6 +349,12 @@ def get_outputs (self, include_bytecode=1): if self.optimize > 0: outputs.append(filename + "o") + outputs += [ + os.path.join(build_dir, filename) + for package, src_dir, build_dir, filenames in self.data_files + for filename in filenames + ] + return outputs diff --git a/dist.py b/dist.py index 2795b7bc83..7d0a7bad3c 100644 --- a/dist.py +++ b/dist.py @@ -158,6 +158,7 @@ def __init__ (self, attrs=None): # than of the Distribution itself. We provide aliases for them in # Distribution as a convenience to the developer. self.packages = None + self.package_data = {} self.package_dir = None self.py_modules = None self.libraries = None From c32a93c26b45cb63b89156e60d7ab2218feec3de Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 15 Jun 2004 15:49:46 +0000 Subject: [PATCH 0969/8469] One unit test for distutils is not much, but is more than we had yesterday. We need to write more; hopefully the barrier is a little lower now. --- tests/__init__.py | 35 ++++++++++++++++++++++++++ tests/test_install_scripts.py | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 tests/__init__.py create mode 100644 tests/test_install_scripts.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000000..7bdb912463 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,35 @@ +"""Test suite for distutils. + +This test suite consists of a collection of test modules in the +distutils.tests package. Each test module has a name starting with +'test' and contains a function test_suite(). The function is expected +to return an initialized unittest.TestSuite instance. + +Tests for the command classes in the distutils.command package are +included in distutils.tests as well, instead of using a separate +distutils.command.tests package, since command identification is done +by import rather than matching pre-defined names. + +""" + +import os +import sys +import unittest + + +here = os.path.dirname(__file__) + + +def test_suite(): + suite = unittest.TestSuite() + for fn in os.listdir(here): + if fn.startswith("test") and fn.endswith(".py"): + modname = "distutils.tests." + fn[:-3] + __import__(modname) + module = sys.modules[modname] + suite.addTest(module.test_suite()) + return suite + + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py new file mode 100644 index 0000000000..f9a95ea504 --- /dev/null +++ b/tests/test_install_scripts.py @@ -0,0 +1,46 @@ +"""Tests for distutils.command.install_scripts.""" + +import os +import unittest + +from distutils.command.install_scripts import install_scripts +from distutils.core import Distribution + + +class InstallScriptsTestCase(unittest.TestCase): + + def test_default_settings(self): + dist = Distribution() + dist.command_obj["build"] = DummyCommand(build_scripts="/foo/bar") + dist.command_obj["install"] = DummyCommand( + install_scripts="/splat/funk", + force=1, + skip_build=1, + ) + cmd = install_scripts(dist) + self.assert_(not cmd.force) + self.assert_(not cmd.skip_build) + self.assert_(cmd.build_dir is None) + self.assert_(cmd.install_dir is None) + + cmd.finalize_options() + + self.assert_(cmd.force) + self.assert_(cmd.skip_build) + self.assertEqual(cmd.build_dir, "/foo/bar") + self.assertEqual(cmd.install_dir, "/splat/funk") + + +class DummyCommand: + + def __init__(self, **kwargs): + for kw, val in kwargs.items(): + setattr(self, kw, val) + + def ensure_finalized(self): + pass + + + +def test_suite(): + return unittest.makeSuite(InstallScriptsTestCase) From 05b7bce87c1ab146c6912af1520c1d988fa43959 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 15 Jun 2004 16:55:46 +0000 Subject: [PATCH 0970/8469] add a test that actually installs some scripts --- tests/test_install_scripts.py | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index f9a95ea504..824f733601 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -1,6 +1,8 @@ """Tests for distutils.command.install_scripts.""" import os +import shutil +import tempfile import unittest from distutils.command.install_scripts import install_scripts @@ -9,6 +11,23 @@ class InstallScriptsTestCase(unittest.TestCase): + def setUp(self): + self.tempdirs = [] + + def tearDown(self): + while self.tempdirs: + d = self.tempdirs.pop() + shutil.rmtree(d) + + def mkdtemp(self): + """Create a temporary directory that will be cleaned up. + + Returns the path of the directory. + """ + d = tempfile.mkdtemp() + self.tempdirs.append(d) + return d + def test_default_settings(self): dist = Distribution() dist.command_obj["build"] = DummyCommand(build_scripts="/foo/bar") @@ -30,8 +49,45 @@ def test_default_settings(self): self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") + def test_installation(self): + source = self.mkdtemp() + expected = [] + + def write_script(name, text): + expected.append(name) + f = open(os.path.join(source, name), "w") + f.write(text) + f.close() + + write_script("script1.py", ("#! /usr/bin/env python2.3\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + write_script("script2.py", ("#!/usr/bin/python\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + write_script("shell.sh", ("#!/bin/sh\n" + "# bogus shell script w/ sh-bang\n" + "exit 0\n")) + + target = self.mkdtemp() + dist = Distribution() + dist.command_obj["build"] = DummyCommand(build_scripts=source) + dist.command_obj["install"] = DummyCommand( + install_scripts=target, + force=1, + skip_build=1, + ) + cmd = install_scripts(dist) + cmd.finalize_options() + cmd.run() + + installed = os.listdir(target) + for name in expected: + self.assert_(name in installed) + class DummyCommand: + """Class to store options for retrieval via set_undefined_options().""" def __init__(self, **kwargs): for kw, val in kwargs.items(): From 8191b39bcc348a1b1f89d7ab3a00e6b2afcf5e94 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 17 Jun 2004 20:14:50 +0000 Subject: [PATCH 0971/8469] move support code to a helper module to ease re-use --- tests/support.py | 41 +++++++++++++++++++++++++++++++++++ tests/test_install_scripts.py | 41 ++++++----------------------------- 2 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 tests/support.py diff --git a/tests/support.py b/tests/support.py new file mode 100644 index 0000000000..cef985d79a --- /dev/null +++ b/tests/support.py @@ -0,0 +1,41 @@ +"""Support code for distutils test cases.""" + +import shutil +import tempfile + + +class TempdirManager(object): + """Mix-in class that handles temporary directories for test cases. + + This is intended to be used with unittest.TestCase. + """ + + def setUp(self): + super(TempdirManager, self).setUp() + self.tempdirs = [] + + def tearDown(self): + super(TempdirManager, self).tearDown() + while self.tempdirs: + d = self.tempdirs.pop() + shutil.rmtree(d) + + def mkdtemp(self): + """Create a temporary directory that will be cleaned up. + + Returns the path of the directory. + """ + d = tempfile.mkdtemp() + self.tempdirs.append(d) + return d + + +class DummyCommand: + """Class to store options for retrieval via set_undefined_options().""" + + def __init__(self, **kwargs): + for kw, val in kwargs.items(): + setattr(self, kw, val) + + def ensure_finalized(self): + pass diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 824f733601..0a11abf6bd 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -1,37 +1,21 @@ """Tests for distutils.command.install_scripts.""" import os -import shutil -import tempfile import unittest from distutils.command.install_scripts import install_scripts from distutils.core import Distribution +from distutils.tests import support -class InstallScriptsTestCase(unittest.TestCase): - def setUp(self): - self.tempdirs = [] - - def tearDown(self): - while self.tempdirs: - d = self.tempdirs.pop() - shutil.rmtree(d) - - def mkdtemp(self): - """Create a temporary directory that will be cleaned up. - - Returns the path of the directory. - """ - d = tempfile.mkdtemp() - self.tempdirs.append(d) - return d +class InstallScriptsTestCase(support.TempdirManager, unittest.TestCase): def test_default_settings(self): dist = Distribution() - dist.command_obj["build"] = DummyCommand(build_scripts="/foo/bar") - dist.command_obj["install"] = DummyCommand( + dist.command_obj["build"] = support.DummyCommand( + build_scripts="/foo/bar") + dist.command_obj["install"] = support.DummyCommand( install_scripts="/splat/funk", force=1, skip_build=1, @@ -71,8 +55,8 @@ def write_script(name, text): target = self.mkdtemp() dist = Distribution() - dist.command_obj["build"] = DummyCommand(build_scripts=source) - dist.command_obj["install"] = DummyCommand( + dist.command_obj["build"] = support.DummyCommand(build_scripts=source) + dist.command_obj["install"] = support.DummyCommand( install_scripts=target, force=1, skip_build=1, @@ -86,17 +70,6 @@ def write_script(name, text): self.assert_(name in installed) -class DummyCommand: - """Class to store options for retrieval via set_undefined_options().""" - - def __init__(self, **kwargs): - for kw, val in kwargs.items(): - setattr(self, kw, val) - - def ensure_finalized(self): - pass - - def test_suite(): return unittest.makeSuite(InstallScriptsTestCase) From 7e402b740c8846c7b50ce89e2ac4013f7048b35c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 17 Jun 2004 20:16:19 +0000 Subject: [PATCH 0972/8469] fix bug: list of data files was initialized too soon in build_py --- command/build_py.py | 2 +- tests/test_build_py.py | 50 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tests/test_build_py.py diff --git a/command/build_py.py b/command/build_py.py index 329b55a9d5..cfbab262cc 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -53,11 +53,11 @@ def finalize_options (self): self.packages = self.distribution.packages self.py_modules = self.distribution.py_modules self.package_data = self.distribution.package_data - self.data_files = self.get_data_files() self.package_dir = {} if self.distribution.package_dir: for name, path in self.distribution.package_dir.items(): self.package_dir[name] = convert_path(path) + self.data_files = self.get_data_files() # Ick, copied straight from install_lib.py (fancy_getopt needs a # type system! Hell, *everything* needs a type system!!!) diff --git a/tests/test_build_py.py b/tests/test_build_py.py new file mode 100644 index 0000000000..6cdce2c776 --- /dev/null +++ b/tests/test_build_py.py @@ -0,0 +1,50 @@ +"""Tests for distutils.command.build_py.""" + +import os +import unittest + +from distutils.command.build_py import build_py +from distutils.core import Distribution + +from distutils.tests import support + + +class BuildPyTestCase(support.TempdirManager, unittest.TestCase): + + def test_package_data(self): + sources = self.mkdtemp() + f = open(os.path.join(sources, "__init__.py"), "w") + f.write("# Pretend this is a package.") + f.close() + f = open(os.path.join(sources, "README.txt"), "w") + f.write("Info about this package") + f.close() + + destination = self.mkdtemp() + + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": sources}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.command_obj["build"] = support.DummyCommand( + force=0, + build_lib=destination) + dist.packages = ["pkg"] + dist.package_data = {"pkg": ["README.txt"]} + dist.package_dir = {"pkg": sources} + + cmd = build_py(dist) + cmd.ensure_finalized() + self.assertEqual(cmd.package_data, dist.package_data) + + cmd.run() + + self.assertEqual(len(cmd.get_outputs()), 2) + pkgdest = os.path.join(destination, "pkg") + files = os.listdir(pkgdest) + self.assert_("__init__.py" in files) + self.assert_("README.txt" in files) + + +def test_suite(): + return unittest.makeSuite(BuildPyTestCase) From 08d85503d984dae19579aaeeca76e8c4b5322d63 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 18 Jun 2004 18:30:27 +0000 Subject: [PATCH 0973/8469] Rebuild the wininst.exe files. --- command/wininst-6.exe | Bin 21504 -> 61440 bytes command/wininst-7.1.exe | Bin 22016 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index c40cbcb5a0adbbc15edd7005be0deb672f9d08c3..8ab173b662012ef4eed68d00f4704b761c182bae 100644 GIT binary patch literal 61440 zcmeFad0bQ1^FMq;0t5vU6%-XUYP2Y*SVWg@#z-HLbSQ z+Sa;M+hP~1)&=VZf`VJc4REQ&*0w>gVx@{!&GVjn17erY_w#&zzvua@@S5Cv&Y3f3 z&di)SbLQSa?D$oTm|++Rz-D8Zd|c^A#ee?i4=b8mb^WFlv)koNw|r5|nQrmy%nZf6 z^tm(Ar_5GNn=)t4T)kpyiXz=GM=^7bB7BTSF?;Uxlzwh*EtGcBZANY{*LoM28lmsN z)20NJFAeJl#HuJxzVJ?_3+@6rk8R3wcl}5BCca+ zPGhN0;|$ah3=<=gFooSOs2c047@4T0$cbSlqh^&*dnW}~Iba@@Rl+^WBp>=|yfTbP zXhWR?-vT7+M<4vP>B6@bZ(x{BbXUbN8|D~UK3=<_V@V5l}=~EW!(UO&j58`XG z{fbNDj{>#*(x*?+Phptff=~;ZyaCX)*^dgf{RA||+8Yf!01EpRm&P9z!xZ#O&q$w! z3VyCtxKRMg0L^|>!YIvZ{=NNI0{=?jUkUsxfqy0NuLS;;z`qjsR|5Y^;9m*+D}n#7 zB%n#qa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/8469] If self.packages is None (this can happen, I saw it), return immediately (since None is not a sequence you can iterate over). --- command/build_py.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index cfbab262cc..3079bfcdef 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -104,6 +104,8 @@ def run (self): def get_data_files (self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" data = [] + if not self.packages: + return data for package in self.packages: # Locate package source directory src_dir = self.get_package_dir(package) From b48d7f0f6502934c6ee3cc6d3d2d2ec6a602c651 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 18 Jun 2004 21:28:28 +0000 Subject: [PATCH 0975/8469] fix typo --- cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.py b/cmd.py index fef49390da..9362410487 100644 --- a/cmd.py +++ b/cmd.py @@ -68,7 +68,7 @@ def __init__ (self, dist): # Per-command versions of the global flags, so that the user can # customize Distutils' behaviour command-by-command and let some - # commands fallback on the Distribution's behaviour. None means + # commands fall back on the Distribution's behaviour. None means # "not defined, check self.distribution's copy", while 0 or 1 mean # false and true (duh). Note that this means figuring out the real # value of each flag is a touch complicated -- hence "self._dry_run" From b20a6ccc211060644ff3e6f89428420fa59f5a5d Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 21 Jun 2004 16:15:22 +0000 Subject: [PATCH 0976/8469] add a couple of tests for the build_scripts command --- tests/test_build_scripts.py | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tests/test_build_scripts.py diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py new file mode 100644 index 0000000000..0cfef4e5cf --- /dev/null +++ b/tests/test_build_scripts.py @@ -0,0 +1,74 @@ +"""Tests for distutils.command.build_scripts.""" + +import os +import unittest + +from distutils.command.build_scripts import build_scripts +from distutils.core import Distribution + +from distutils.tests import support + + +class BuildScriptsTestCase(support.TempdirManager, unittest.TestCase): + + def test_default_settings(self): + cmd = self.get_build_scripts_cmd("/foo/bar", []) + self.assert_(not cmd.force) + self.assert_(cmd.build_dir is None) + + cmd.finalize_options() + + self.assert_(cmd.force) + self.assertEqual(cmd.build_dir, "/foo/bar") + + def test_build(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + cmd = self.get_build_scripts_cmd(target, + [os.path.join(source, fn) + for fn in expected]) + cmd.finalize_options() + cmd.run() + + built = os.listdir(target) + for name in expected: + self.assert_(name in built) + + def get_build_scripts_cmd(self, target, scripts): + dist = Distribution() + dist.scripts = scripts + dist.command_obj["build"] = support.DummyCommand( + build_scripts=target, + force=1 + ) + return build_scripts(dist) + + def write_sample_scripts(self, dir): + expected = [] + expected.append("script1.py") + self.write_script(dir, "script1.py", + ("#! /usr/bin/env python2.3\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + expected.append("script2.py") + self.write_script(dir, "script2.py", + ("#!/usr/bin/python\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + expected.append("shell.sh") + self.write_script(dir, "shell.sh", + ("#!/bin/sh\n" + "# bogus shell script w/ sh-bang\n" + "exit 0\n")) + return expected + + def write_script(self, dir, name, text): + f = open(os.path.join(dir, name), "w") + f.write(text) + f.close() + + +def test_suite(): + return unittest.makeSuite(BuildScriptsTestCase) From 08c14ecdbb73fbb9036506e74a2bdf742ee5b13a Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 25 Jun 2004 19:04:21 +0000 Subject: [PATCH 0977/8469] add boilerplate so the test modules can be run as scripts --- tests/test_build_py.py | 3 +++ tests/test_build_scripts.py | 3 +++ tests/test_install_scripts.py | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 6cdce2c776..757d757c86 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -48,3 +48,6 @@ def test_package_data(self): def test_suite(): return unittest.makeSuite(BuildPyTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 0cfef4e5cf..7ef71cc120 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -72,3 +72,6 @@ def write_script(self, dir, name, text): def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 0a11abf6bd..2e86dcd8a9 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -70,6 +70,8 @@ def write_script(name, text): self.assert_(name in installed) - def test_suite(): return unittest.makeSuite(InstallScriptsTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 1bf1bfa6924e28ef13c43dd27d35ca94b988b36b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 25 Jun 2004 23:02:59 +0000 Subject: [PATCH 0978/8469] Make distutils "install --home" support all platforms. --- command/install.py | 34 +++++++++++++------------- tests/test_install.py | 55 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 17 deletions(-) create mode 100644 tests/test_install.py diff --git a/command/install.py b/command/install.py index 7fb46a74bb..3c36ede622 100644 --- a/command/install.py +++ b/command/install.py @@ -242,19 +242,15 @@ def finalize_options (self): ("must supply either prefix/exec-prefix/home or " + "install-base/install-platbase -- not both") + if self.home and (self.prefix or self.exec_prefix): + raise DistutilsOptionError, \ + "must supply either home or prefix/exec-prefix -- not both" + # Next, stuff that's wrong (or dubious) only on certain platforms. - if os.name == 'posix': - if self.home and (self.prefix or self.exec_prefix): - raise DistutilsOptionError, \ - ("must supply either home or prefix/exec-prefix -- " + - "not both") - else: + if os.name != "posix": if self.exec_prefix: self.warn("exec-prefix option ignored on this platform") self.exec_prefix = None - if self.home: - self.warn("home option ignored on this platform") - self.home = None # Now the interesting logic -- so interesting that we farm it out # to other methods. The goal of these methods is to set the final @@ -405,15 +401,19 @@ def finalize_unix (self): def finalize_other (self): # Windows and Mac OS for now - if self.prefix is None: - self.prefix = os.path.normpath(sys.prefix) + if self.home is not None: + self.install_base = self.install_platbase = self.home + self.select_scheme("unix_home") + else: + if self.prefix is None: + self.prefix = os.path.normpath(sys.prefix) - self.install_base = self.install_platbase = self.prefix - try: - self.select_scheme(os.name) - except KeyError: - raise DistutilsPlatformError, \ - "I don't know how to install stuff on '%s'" % os.name + self.install_base = self.install_platbase = self.prefix + try: + self.select_scheme(os.name) + except KeyError: + raise DistutilsPlatformError, \ + "I don't know how to install stuff on '%s'" % os.name # finalize_other () diff --git a/tests/test_install.py b/tests/test_install.py new file mode 100644 index 0000000000..c834b91b38 --- /dev/null +++ b/tests/test_install.py @@ -0,0 +1,55 @@ +"""Tests for distutils.command.install.""" + +import os +import unittest + +from distutils.command.install import install +from distutils.core import Distribution + +from distutils.tests import support + + +class InstallTestCase(support.TempdirManager, unittest.TestCase): + + def test_home_installation_scheme(self): + # This ensure two things: + # - that --home generates the desired set of directory names + # - test --home is supported on all platforms + builddir = self.mkdtemp() + destination = os.path.join(builddir, "installation") + + dist = Distribution({"name": "foopkg"}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(builddir, "setup.py") + dist.command_obj["build"] = support.DummyCommand( + build_base=builddir, + build_lib=os.path.join(builddir, "lib"), + ) + + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() + + self.assertEqual(cmd.install_base, destination) + self.assertEqual(cmd.install_platbase, destination) + + def check_path(got, expected): + got = os.path.normpath(got) + expected = os.path.normpath(expected) + self.assertEqual(got, expected) + + libdir = os.path.join(destination, "lib", "python") + check_path(cmd.install_lib, libdir) + check_path(cmd.install_platlib, libdir) + check_path(cmd.install_purelib, libdir) + check_path(cmd.install_headers, + os.path.join(destination, "include", "python", "foopkg")) + check_path(cmd.install_scripts, os.path.join(destination, "bin")) + check_path(cmd.install_data, destination) + + +def test_suite(): + return unittest.makeSuite(InstallTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a6850a7120f88d68c4e2f8413120dce52e8b19c5 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 2 Jul 2004 08:02:40 +0000 Subject: [PATCH 0979/8469] Fix for SF 982215: bdist_wininst - Next button not greyed out during file copy. Patch from Mark Hammond. Recompiled binary. Already packported to the 2.3 branch. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index 8ab173b662012ef4eed68d00f4704b761c182bae..efa3bc4f1f8a2632e71009b24317e5417f2a0522 100644 GIT binary patch delta 14456 zcmeHte|%KcweOk95Jn8nfEfr7AnJ&z{4hEM5|Y>fGBIe714CwrLSlr#$uuM}IfG~k z6P!#R@h}!WXsN{(EhU?fXAs{WD*C>hccMmzA#; zXbkt2KiZME*-+vSE>YlPzg-8hUk7cY(QKv~H3Y+KK{8JznXm^hLDvX>-FV zu_UM(H#}5-b)~<+`LwzIYTBkn^;aF6r_^7q6cg&N*7)Z++u}#(Mekvsw)jzbOO`~Z z`OM+P{Y!b(R`HmVn9m;NA3rHviC83D_MtLK8h?Ak1t+ArmvCANrJgN4W&>oBGaGfzKUc7ePENI5tR@Qn@j?Ps z)9t^ZMxh;~iX4$sEka){bLIYFh(Tuo?gjlOq!K4$!y# z9fHx1J&r4?zh9kwIr#+5V+Ws5W|4SXUhvwenoH;tE`qe0z6-o-e30rR#Sfoqk!D{` z!YCi-35Q~&V;?YxB?w^bt$LeVwOKof`RFf+*!zqaEh_rD92<8_LRyWJ%WA8;kr!6@ z<=e;Gy#;h8m$J7>c1$Nd39+ry3M?Bl-gHh`g_DA*4e{4XK02pezTNLR@(0Br**66L1+n^NizeX z0Ye4!)T_2cX3Zj5;tb6qgnIO1!#{wLezVrbD`8ZFtyaCNo*!62lG`JtldXHDn2@`{ z8Q{F?d11x|YUo5MkxGrOJ`_z_u^+`gOo7%Iid|Z<7sU>(*rT3zT*>;l(W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980/8469] Fix SF#983164. Patch from Mark Hammond: bdist_wininst attempts to use the correct MSVC runtime for the current version of Python. This doesn't work correctly when --target-version is set. In that case, bdist_wininst still uses the *current* sys.version (ie, 2.4) rather than the version specified as --target-version. Thus, the msvc7 runtime based executable stub is *always* used. This patch "hard-codes" knowledge of earlier Python versions, providing the correct result when Python 2.4 is used to build Python 2.3 and earlier distributions. Remove the short variant (-v) of the --target-version command line options, it conflicts with the --verbose/-v standard distutils switch. --- command/bdist_wininst.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 324ce31a91..7c593adcaa 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -24,7 +24,7 @@ class bdist_wininst (Command): ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), - ('target-version=', 'v', + ('target-version=', None, "require a specific python version" + " on the target system"), ('no-target-compile', 'c', @@ -265,10 +265,34 @@ def create_exe (self, arcname, fullname, bitmap=None): def get_exe_bytes (self): from distutils.msvccompiler import get_build_version + # If a target-version other than the current version has been + # specified, then using the MSVC version from *this* build is no good. + # Without actually finding and executing the target version and parsing + # its sys.version, we just hard-code our knowledge of old versions. + # NOTE: Possible alternative is to allow "--target-version" to + # specify a Python executable rather than a simple version string. + # We can then execute this program to obtain any info we need, such + # as the real sys.version string for the build. + cur_version = get_python_version() + if self.target_version and self.target_version != cur_version: + # If the target version is *later* than us, then we assume they + # use what we use + # string compares seem wrong, but are what sysconfig.py itself uses + if self.target_version > cur_version: + bv = get_build_version() + else: + if self.target_version < "2.4": + bv = "6" + else: + bv = "7.1" + else: + # for current version - use authoritative check. + bv = get_build_version() + # wininst-x.y.exe is in the same directory as this file directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - filename = os.path.join(directory, "wininst-%s.exe" % get_build_version()) + filename = os.path.join(directory, "wininst-%s.exe" % bv) return open(filename, "rb").read() # class bdist_wininst From 89f251ec91fbc1a66a06a5aa903f6faa2d44d047 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 14 Jul 2004 15:22:05 +0000 Subject: [PATCH 0981/8469] Recompiled after source file changes. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index efa3bc4f1f8a2632e71009b24317e5417f2a0522..7e93de88ebb447bc758757638161718fb4d62883 100644 GIT binary patch delta 16266 zcmeHue_T}8weOx`)X`vOh>Q|NgLV>0)r15|AV@kYLok9K8JS@|Q4wX#VZyHrXZ(?X zgB|FF97#=%={2owwR#hKo7>u8QkqzU0YzWEeK!80iJ#QA-u9TG4Q;rVv?S+!*FFas zo4&U1z5CyNd_L=({bTL5*Is-5+WQR6R}z}9B(%0U^O%w@ds8vS#j^`6QKsR9kw&*O0zkVfy$73Nnb zKbK*B-oDawSP|^A63^7TSnF@4$v)A3Sb56cVmhN}_9f_ClJrG9PbAI7^S4PE=C!Mp zJ8ny@IP78_?o+|v3+-#qtCkGLAV5*QN)dw}3LrT4DwDU}EQ&N!2r z``5?q7_geK`n;>4$h^KtI8C%4A>xNKO;K57hTNnkL6}+$DH3sLwH1cKyws6iB{UEyQ3$qkL>tVLRaIjwD7tS@eCil z8f()B)8=-UuRGl%TRuqxT964Ht;4i&L0}L^U~{U`q>GMA29ut~Y+~09W@6t}a;MEs z%nrF&?#ZTG1Tp_LMV#i0WWPpy-4M64wcFNG0IBemwtWLrn!Ms3yfw$78)K6(=-MGz z0XDp&bht!31O(YCXh}Nl0Z8#$o8GU5uTak_0bN!>JcF)SJ;rI_%V<|_NtqZqL~Ug` z;Q=XycMR|W^YsBcsWUexJSff3!dH3!An(uD`>UycMoxH0n#((fc&8Jc(*&^)o$;Fi zdBz^;Xg&Xlrim7;QV42V_ZB;)Va+ig zRG@wt^b#ux+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6 zb(N6DKr(jOB>4T`7@;}N+*M^lDV^OckHqk7t;5KLewgwGh!e+__%~Km85E6BM7gh` zs;qi5w;{$}Fc;O7VE{sgsy8EoGJC}8%{mQ2T|>os-Ho}vX5L&^L$N}64*S%!63j7P zEniJ&>HFLmv7U9+wK?ppsStXO@mfpb>6Mk(eC$J$P+d35>e517{iS3IES@XP(BtrQ z%|u}!VRWQweJtep+$&>?lWGW^yKG5?gsp^l$uNNBPX=gY_E!^G6IN$wbtMHaMD>HDlfb;JM;``VMWkiyVYA-8Km8@hA`YQ zJnG-dzB#s?l*l#`&RrGU1Oh_TQhj-izsjh8i|P=AbL2fr2%|eMgXT%X|f-QaKe?}sOv9uT;}N~N`kn3h$Q zSLd+PrV_BJsvwr{@^Tr1sh{%_a22>??HRAwjvNjhMjS=4)IQ_8$N28Tw*j!lsK??R zqAvpwJ$?T(`f2D`06L1nv+$jX?|gh`;2T$mM^YOK1GUHz;d>e1iTIwwcRIdD@ud*% z5WWfc?!|W}AalB&kq3&^puTw8Nc{=amn|Nt7oh&^sJaVv`;1t-^4?DaCR59bKfFF! O*=>HP<(BSG=ln01UY@=H diff --git a/command/wininst-7.1.exe b/command/wininst-7.1.exe index 7be9396b8a9c39abaddb789180bfaa6752b8d9a3..40f80035e4be9a80d6abd461a1afc0eeb14d18c9 100644 GIT binary patch delta 11920 zcmeHNaePzN^?ylI2oOks1_Bfa5THPTLRzJ?g&<9>(87bzgifI1fITCFT3=9RA;mPa z@ezhzwjn>9F#I_78*^xxR#6DFw79w7P(V6m8`~;-wN*2zShvdieb0L-EjmB@?T_Do z>*sUcz4zR6&pG$pbI(2Zrd3yxs;(sM&ehqT$Xgg(+49MO)bRdm-C&M>dd-IRh{&mH zW7M+i+Gw?8YWtaJz1nVku1YP`+}T>Z6vDC4_MC-^j~ z6RJIZkfIQ(7VxRpcL3%a?`K6*1WfW!MNu#!91FbM`VSC=I(e}luUPkhv~6Z~ zz;3Q?p|JszU$2zd!?99k8*Cr_OARONhtSp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rG$Hz#4Qa09%1_;8|b~@Dgwk_yur0h))c76Sx921FgWP zKq|ET8fkwBGXtrB9moXc0tLWwpcL2$lmX>HHLwSupAl140~`W8u*iC#40s0k0pR-y zKCc3=0q+1G05^cIfoe1w1Iz&OfaSpbz-Hh{pb2;rI0n!!6Ur6bDJ?q zS6aJl`*1xh&2cNXZ`k_y)=lCD+lC#Rwuze_eb}~f)8-A^?inPU(c$`OKXi4?Rq9umb1>_y4u#tticn_*!&CtonE_eDv^O^;5<+V>;q12tDU#| z<8i@l4?DT<0rbORRvC>5GY;q}KZyK>L|G*!K2=A1OCQ4ZGs^knn#y zBzXRJLPG7UwVV47v?Ym;ls)?3BV6s!*OK(?;8AmJO#i-tt=f7}4G=LbGg@lL66xVY zdJt(1uqRRO@mu0A2Z*22zsElU4cCK@j=sf6Q;`-R9fkjs Date: Fri, 16 Jul 2004 18:14:37 +0000 Subject: [PATCH 0982/8469] The new distutils features justify a new version number, imo. If someone has other ideas for the numbering scheme, please change to something else (1.1.0 ?). --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7873d297b3..2e9c90c7c7 100644 --- a/__init__.py +++ b/__init__.py @@ -12,4 +12,4 @@ __revision__ = "$Id$" -__version__ = "1.0.3" +__version__ = "1.0.4" From 3d2ade66dfe5efa2a561cd804d43c35974ed210a Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 18 Jul 2004 06:16:08 +0000 Subject: [PATCH 0983/8469] Whitespace normalization, via reindent.py. --- archive_util.py | 4 ++-- bcppcompiler.py | 2 +- ccompiler.py | 4 ++-- cmd.py | 4 ++-- command/bdist.py | 2 +- command/bdist_dumb.py | 2 +- command/bdist_wininst.py | 2 +- command/build_ext.py | 4 ++-- command/build_scripts.py | 2 +- command/install.py | 2 +- command/register.py | 1 - core.py | 1 - cygwinccompiler.py | 2 +- debug.py | 1 - dir_util.py | 1 - dist.py | 4 ++-- file_util.py | 2 +- filelist.py | 2 +- log.py | 8 ++++---- msvccompiler.py | 7 +++---- spawn.py | 2 +- sysconfig.py | 2 +- unixccompiler.py | 6 +++--- util.py | 2 +- 24 files changed, 32 insertions(+), 37 deletions(-) diff --git a/archive_util.py b/archive_util.py index d5b3096617..55babe6fc6 100644 --- a/archive_util.py +++ b/archive_util.py @@ -68,7 +68,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): import zipfile except ImportError: zipfile = None - + zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), dry_run=dry_run) @@ -79,7 +79,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): zipoptions = "-r" else: zipoptions = "-rq" - + try: spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) diff --git a/bcppcompiler.py b/bcppcompiler.py index b0360a248e..f995e36711 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -85,7 +85,7 @@ def __init__ (self, def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None): - + macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) diff --git a/ccompiler.py b/ccompiler.py index ebd93c27eb..a3b1ffa4d5 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -685,7 +685,7 @@ def compile(self, sources, output_dir=None, macros=None, # A concrete compiler class can either override this method # entirely or implement _compile(). - + macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) @@ -703,7 +703,7 @@ def compile(self, sources, output_dir=None, macros=None, def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): """Compile 'src' to product 'obj'.""" - + # A concrete compiler class that does not override compile() # should implement _compile(). pass diff --git a/cmd.py b/cmd.py index 9362410487..be8e826fdb 100644 --- a/cmd.py +++ b/cmd.py @@ -79,7 +79,7 @@ def __init__ (self, dist): # verbose is largely ignored, but needs to be set for # backwards compatibility (I think)? self.verbose = dist.verbose - + # Some commands define a 'self.force' option to ignore file # timestamps, but methods defined *here* assume that # 'self.force' exists for all commands. So define it here @@ -100,7 +100,7 @@ def __init__ (self, dist): # XXX A more explicit way to customize dry_run would be better. - + def __getattr__ (self, attr): if attr == 'dry_run': myval = getattr(self, "_" + attr) diff --git a/command/bdist.py b/command/bdist.py index 7c606ffc4d..4eca9c3426 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -78,7 +78,7 @@ class bdist (Command): 'wininst': ('bdist_wininst', "Windows executable installer"), 'zip': ('bdist_dumb', "ZIP file"), - #'pkgtool': ('bdist_pkgtool', + #'pkgtool': ('bdist_pkgtool', # "Solaris pkgtool distribution"), #'sdux': ('bdist_sdux', "HP-UX swinstall depot"), } diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 8ee3a5c5f7..3db332d5bd 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -53,7 +53,7 @@ def initialize_options (self): self.dist_dir = None self.skip_build = 0 self.relative = 0 - + # initialize_options() diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 7c593adcaa..d91c08936c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -115,7 +115,7 @@ def run (self): # we do not want to include pyc or pyo files install_lib.compile = 0 install_lib.optimize = 0 - + # If we are building an installer for a Python version other # than the one we are currently running, then we need to ensure # our build_lib reflects the other Python version rather than ours. diff --git a/command/build_ext.py b/command/build_ext.py index 0c37768179..04cd742cef 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -173,7 +173,7 @@ def finalize_options (self): self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) - # OS/2 (EMX) doesn't support Debug vs Release builds, but has the + # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) @@ -636,7 +636,7 @@ def get_libraries (self, ext): # EMX/GCC requires the python library explicitly, and I # believe VACPP does as well (though not confirmed) - AIM Apr01 template = "python%d%d" - # debug versions of the main DLL aren't supported, at least + # debug versions of the main DLL aren't supported, at least # not at this time - AIM Apr01 #if self.debug: # template = template + '_d' diff --git a/command/build_scripts.py b/command/build_scripts.py index 165a009ded..e0fcc23e13 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -94,7 +94,7 @@ def copy_scripts (self): if not self.dry_run: outf = open(outfile, "w") if not sysconfig.python_build: - outf.write("#!%s%s\n" % + outf.write("#!%s%s\n" % (os.path.normpath(sys.executable), post_interp)) else: diff --git a/command/install.py b/command/install.py index 3c36ede622..175f785214 100644 --- a/command/install.py +++ b/command/install.py @@ -537,7 +537,7 @@ def run (self): not (self.path_file and self.install_path_file) and install_lib not in sys_path): log.debug(("modules installed to '%s', which is not in " - "Python's module search path (sys.path) -- " + "Python's module search path (sys.path) -- " "you'll have to change the search path yourself"), self.install_lib) diff --git a/command/register.py b/command/register.py index 8e347ce6dc..8104ce0656 100644 --- a/command/register.py +++ b/command/register.py @@ -286,4 +286,3 @@ def post_to_server(self, data, auth=None): if self.show_response: print '-'*75, data, '-'*75 return result - diff --git a/core.py b/core.py index fba463c10b..fef291f656 100644 --- a/core.py +++ b/core.py @@ -239,4 +239,3 @@ def run_setup (script_name, script_args=None, stop_after="run"): return _setup_distribution # run_setup () - diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 0101bae5b9..a962007601 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -75,7 +75,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): (status, details)) if status is not CONFIG_H_OK: self.warn( - "Python's pyconfig.h doesn't seem to support your compiler. " + "Python's pyconfig.h doesn't seem to support your compiler. " "Reason: %s. " "Compiling may fail because of undefined preprocessor macros." % details) diff --git a/debug.py b/debug.py index e195ebdcdf..2a87eb5d28 100644 --- a/debug.py +++ b/debug.py @@ -7,4 +7,3 @@ # If DISTUTILS_DEBUG is anything other than the empty string, we run in # debug mode. DEBUG = os.environ.get('DISTUTILS_DEBUG') - diff --git a/dir_util.py b/dir_util.py index e479b62415..77f64c4104 100644 --- a/dir_util.py +++ b/dir_util.py @@ -225,4 +225,3 @@ def ensure_relative (path): if path[0:1] == os.sep: path = drive + path[1:] return path - diff --git a/dist.py b/dist.py index 7d0a7bad3c..b4dd0b9170 100644 --- a/dist.py +++ b/dist.py @@ -231,7 +231,7 @@ def __init__ (self, attrs=None): newreq.append((pkg, LooseVersion(ver))) attrs['requires'] = newreq - # Build up the provides object. If the setup() has no + # Build up the provides object. If the setup() has no # provides line, we use packages or modules and the version # to synthesise the provides. If no version is provided (no # pun intended) we don't have a provides entry at all. @@ -1137,7 +1137,7 @@ def get_download_url(self): return self.download_url or "UNKNOWN" def get_requires(self): - return [ '%s%s%s'%(x, (y and '-') or '', y or '') + return [ '%s%s%s'%(x, (y and '-') or '', y or '') for x,y in self.requires ] def get_provides(self): diff --git a/file_util.py b/file_util.py index e230ce587e..e2b1c51558 100644 --- a/file_util.py +++ b/file_util.py @@ -42,7 +42,7 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): except os.error, (errno, errstr): raise DistutilsFileError, \ "could not delete '%s': %s" % (dst, errstr) - + try: fdst = open(dst, 'wb') except os.error, (errno, errstr): diff --git a/filelist.py b/filelist.py index 0872e96636..566d87ab28 100644 --- a/filelist.py +++ b/filelist.py @@ -167,7 +167,7 @@ def process_template_line (self, line): for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): log.warn(("warning: no files found matching '%s' " + - "under directory '%s'"), + "under directory '%s'"), pattern, dir) elif action == 'recursive-exclude': diff --git a/log.py b/log.py index 01420da9af..024e7c28de 100644 --- a/log.py +++ b/log.py @@ -28,16 +28,16 @@ def log(self, level, msg, *args): def debug(self, msg, *args): self._log(DEBUG, msg, args) - + def info(self, msg, *args): self._log(INFO, msg, args) - + def warn(self, msg, *args): self._log(WARN, msg, args) - + def error(self, msg, *args): self._log(ERROR, msg, args) - + def fatal(self, msg, *args): self._log(FATAL, msg, args) diff --git a/msvccompiler.py b/msvccompiler.py index 1441ea04c3..168881ad2d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -117,7 +117,7 @@ def set_macro(self, macro, path, key): if d: self.macros["$(%s)" % macro] = d[key] break - + def load_macros(self, version): vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") @@ -166,7 +166,7 @@ def get_build_version(): return majorVersion + minorVersion # else we don't know what version of the compiler this is return None - + class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -525,7 +525,7 @@ def find_exe(self, exe): return fn return exe - + def get_msvc_paths(self, path, platform='x86'): """Get a list of devstudio directories (include, lib or path). @@ -576,4 +576,3 @@ def set_path_env_var(self, name): p = self.get_msvc_paths(name) if p: os.environ[name] = string.join(p, ';') - diff --git a/spawn.py b/spawn.py index 67391e8826..a89b88cebf 100644 --- a/spawn.py +++ b/spawn.py @@ -97,7 +97,7 @@ def _spawn_os2 (cmd, #cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same - executable = find_executable(executable) or executable + executable = find_executable(executable) or executable log.info(string.join([executable] + cmd[1:], ' ')) if not dry_run: # spawnv for OS/2 EMX requires a full path to the .exe diff --git a/sysconfig.py b/sysconfig.py index c912a15cdc..0a4e14cc37 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -367,7 +367,7 @@ def _init_posix(): my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) raise DistutilsPlatformError(my_msg) - + # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. diff --git a/unixccompiler.py b/unixccompiler.py index 11ecb9f6ae..24cbcb53e5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -206,7 +206,7 @@ def runtime_library_dir_option(self, dir): elif sys.platform[:5] == "hp-ux": return "+s -L" + dir elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir + return "-Wl,-R" + dir else: return "-R" + dir @@ -217,7 +217,7 @@ def find_library_file(self, dirs, lib, debug=0): shared_f = self.library_filename(lib, lib_type='shared') dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') - + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) @@ -232,6 +232,6 @@ def find_library_file(self, dirs, lib, debug=0): return shared elif os.path.exists(static): return static - + # Oops, didn't find it in *any* of 'dirs' return None diff --git a/util.py b/util.py index 12775d6fc4..387e9bdc93 100644 --- a/util.py +++ b/util.py @@ -300,7 +300,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): def strtobool (val): """Convert a string representation of truth to true (1) or false (0). - + True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. From eb85239d5cdcf684b6f19ef7cce2cc969accdf6c Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 19 Jul 2004 09:45:46 +0000 Subject: [PATCH 0984/8469] The binary layout of cfgdata has changed, so the magic number has to change as well. Add a comment explaining this. --- command/bdist_wininst.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d91c08936c..79c95ae2ae 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -253,8 +253,14 @@ def create_exe (self, arcname, fullname, bitmap=None): # empty pre-install script cfgdata = cfgdata + "\0" file.write(cfgdata) + + # The 'magic number' 0x1234567B is used to make sure that the + # binary layout of 'cfgdata' is what the wininst.exe binary + # expects. If the layout changes, increment that number, make + # the corresponding changes to the wininst.exe sources, and + # recompile them. header = struct.pack(" Date: Mon, 19 Jul 2004 10:07:28 +0000 Subject: [PATCH 0985/8469] The binary layout of cfgdata has changed, so the magic number has to change as well. Recompiled binaries after this change. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index 7e93de88ebb447bc758757638161718fb4d62883..ed288d6a260ab8e0b5e8a9b79ab781433399e94c 100644 GIT binary patch delta 2835 zcmZuz4Nz3q6~1>_1kEli%Puamz=8|%4+5(avi5;M5S2XKvbgm>QF-o&64}*s5*22l znKaW5aiyhI2$hY|=s4s@F_>wYmUNzxHrp68NrSyTXBVuUmYK8f zzH{z5_nhy3=R7(mqdF&}PJ}Yvdi^_r%>GT1c=`mLN60o%oQNp@#1iN@ZD)7sGc+eq zp_q!NZ7fZjM|Etq)u2AEGcPmxeh}4YiItSv&-SJqM5k$(jMW8kwn7zIUM({a`%ihIP1^8O4>rFnQh@8W9EXbFjPNUcNtd2%ofM4 z88Tt#-wk<5Sg6Bsb(C8M0UT-10G=$fqU1(}@-{o1T%rwOGPj`i7D=HbkZFjGBv+v| zYEj9;eQODE^o%&%S+GOSgd4wix)*E>i!5p*r0($6DIH#mG02WD^3q9`lyWR)+q(j> z%OUng%3`?jYbjQGmd!V2D-08CsWG3L*k)r<+~j3Q=OG~5!f#2P?6h&^QyPGXxT-x? z11{VZcJ4CAa{bKn0`Y}<(dr~Vae==+E^4f4y;Ip_=X$Xn&gwHv1QJtIC_T)I(^?jx zJ3y)tokZGC;m#@4W#>09jIlFmJLwpkmoC8X)9IdE1gu5+0@ASak6NVA+=6@}5P6^u zvXjU-EPu)FrWH69nh1M6YP*F)@9E_{!#oocq4<*O*N6g_~Rn zpfk+!y(<#pV5}09Mp53+(le&%D@>L7HyU97%zPPv|MB8X0RH^qV;a0~yIpDrOq$<| z)=jWRb4DIkW|K3jp{oWtY}n**sl(xI@;p#F95z{r#xtCqHmB+z%eMMk&b^RK?-aXc zHpfkYvs?o(VgpRDhvwv%$y*3Z4NJ|+DAwW4#&^F0Jn~q}0eo@+QF5)6l!I^+&A^4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eZst!Evt*Vts=re>_T)VZt8ZJ(WzdFnMK4F&ERc`^py?v1~^ShUq zOiZg61L9V&K4{zo<#OC_jGL=!Yqvg(?b5jEVQP;J(YQ$;AGg?0S+n&aj(f$pX)8E! z*Ng#Dtn&2(Q*V07xM@?ZR4;Jc_lXzPD|Z~2bZa{G@$hE2kqJ}^JS+sbS;oq3^;=R* zxwN$U`iHBwY*G#!xNA(8v8KMhuIl0Hw(+lRHrNLYm1wjP4)`-x0;3wP?OWgbJS|9$ zRD|;-2P~xC8&dDpc$Wf-Qs0BVis*9zL{IO(M^Ei00vw>FEz^wm6ugu5t{^uVh3^cUMhpa895-3%{851ZJC0lSf$K=yiuZpw9)V<6+YM(wn(_Yt_QD!p From ccb3f9c92225e9af8441defe2003ddf96d2b9cd2 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 21 Jul 2004 18:53:06 +0000 Subject: [PATCH 0986/8469] elaborate package data test to make sure get_outputs() gives the right results when byte-code compilation is requested (in particular, make sure that package data doesn't get a bogus byte-code listing generated) --- tests/test_build_py.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 757d757c86..6f7276866d 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -34,15 +34,21 @@ def test_package_data(self): dist.package_dir = {"pkg": sources} cmd = build_py(dist) + cmd.compile = 1 cmd.ensure_finalized() self.assertEqual(cmd.package_data, dist.package_data) cmd.run() - self.assertEqual(len(cmd.get_outputs()), 2) + # This makes sure the list of outputs includes byte-compiled + # files for Python modules but not for package data files + # (there shouldn't *be* byte-code files for those!). + # + self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) self.assert_("__init__.py" in files) + self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) From c8ecef628841d8f77400d5227236538dd227eab1 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 23 Jul 2004 19:44:29 +0000 Subject: [PATCH 0987/8469] bdist_wininst does now properly handle unicode strings or byte strings with umlauts in the author argument and others. Fixes sf # 993943. --- command/bdist_wininst.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 79c95ae2ae..506a4a26ba 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -176,36 +176,38 @@ def get_inidata (self): lines = [] metadata = self.distribution.metadata - # Write the [metadata] section. Values are written with - # repr()[1:-1], so they do not contain unprintable characters, and - # are not surrounded by quote chars. + # Write the [metadata] section. lines.append("[metadata]") # 'info' will be displayed in the installer's dialog box, # describing the items to be installed. info = (metadata.long_description or '') + '\n' + # Escape newline characters + def escape(s): + return string.replace(s, "\n", "\\n") + for name in ["author", "author_email", "description", "maintainer", "maintainer_email", "name", "url", "version"]: data = getattr(metadata, name, "") if data: info = info + ("\n %s: %s" % \ - (string.capitalize(name), data)) - lines.append("%s=%s" % (name, repr(data)[1:-1])) + (string.capitalize(name), escape(data))) + lines.append("%s=%s" % (name, escape(data))) # The [setup] section contains entries controlling # the installer runtime. lines.append("\n[Setup]") if self.install_script: lines.append("install_script=%s" % self.install_script) - lines.append("info=%s" % repr(info)[1:-1]) + lines.append("info=%s" % escape(info)) lines.append("target_compile=%d" % (not self.no_target_compile)) lines.append("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append("target_version=%s" % self.target_version) title = self.title or self.distribution.get_fullname() - lines.append("title=%s" % repr(title)[1:-1]) + lines.append("title=%s" % escape(title)) import time import distutils build_info = "Built %s with distutils-%s" % \ @@ -244,6 +246,15 @@ def create_exe (self, arcname, fullname, bitmap=None): if bitmap: file.write(bitmapdata) + # Convert cfgdata from unicode to ascii, mbcs encoded + try: + unicode + except NameError: + pass + else: + if isinstance(cfgdata, unicode): + cfgdata = cfgdata.encode("mbcs") + # Append the pre-install script cfgdata = cfgdata + "\0" if self.pre_install_script: From 255d561a68712ed1f40f673cbb1c428815a5febd Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 23 Jul 2004 19:47:32 +0000 Subject: [PATCH 0988/8469] Make the distutils version number the same as the python version. It must be literally contained here, because it is still possible to install this distutils in older Python versions. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2e9c90c7c7..2592a6c559 100644 --- a/__init__.py +++ b/__init__.py @@ -12,4 +12,4 @@ __revision__ = "$Id$" -__version__ = "1.0.4" +__version__ = "2.4.0" From c1e60ed922d5a869202a3aea3f5c9e7587d063f1 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 23 Jul 2004 19:58:28 +0000 Subject: [PATCH 0989/8469] Factored out a method to determine the final installer filename. --- command/bdist_wininst.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 506a4a26ba..20bd61389a 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -224,15 +224,7 @@ def create_exe (self, arcname, fullname, bitmap=None): cfgdata = self.get_inidata() - if self.target_version: - # if we create an installer for a specific python version, - # it's better to include this in the name - installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) - else: - installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) + installer_name = self.get_installer_filename(fullname) self.announce("creating %s" % installer_name) if bitmap: @@ -280,6 +272,19 @@ def create_exe (self, arcname, fullname, bitmap=None): # create_exe() + def get_installer_filename(self, fullname): + # Factored out to allow overriding in subclasses + if self.target_version: + # if we create an installer for a specific python version, + # it's better to include this in the name + installer_name = os.path.join(self.dist_dir, + "%s.win32-py%s.exe" % + (fullname, self.target_version)) + else: + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) + # get_installer_filename() + def get_exe_bytes (self): from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been From 372525bfe68c909c7d7a8b5f92bdfc31ef361149 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 28 Jul 2004 14:55:10 +0000 Subject: [PATCH 0990/8469] Since build_py handles package data installation, the list of outputs can contain more than just .py files. Make sure we only report bytecode files for the .py files. --- command/install_lib.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/command/install_lib.py b/command/install_lib.py index daf3e010fd..c234117adc 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -7,6 +7,11 @@ from distutils.core import Command from distutils.errors import DistutilsOptionError + +# Extension for Python source files. +PYTHON_SOURCE_EXTENSION = os.extsep + "py" + + class install_lib (Command): description = "install all Python modules (extensions and pure Python)" @@ -155,6 +160,12 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): def _bytecode_filenames (self, py_filenames): bytecode_files = [] for py_file in py_filenames: + # Since build_py handles package data installation, the + # list of outputs can contain more than just .py files. + # Make sure we only report bytecode for the .py files. + ext = os.path.splitext(os.path.normcase(py_file))[1] + if ext != PYTHON_SOURCE_EXTENSION: + continue if self.compile: bytecode_files.append(py_file + "c") if self.optimize > 0: From ab63210e40d4c242c91f03b4ae363e2cdf7a6341 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 2 Aug 2004 17:58:51 +0000 Subject: [PATCH 0991/8469] - fix description of option table entries - fix broken assert statement; should just raise --- fancy_getopt.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 512bc9b665..6c1134fc40 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -45,8 +45,9 @@ class FancyGetopt: def __init__ (self, option_table=None): - # The option table is (currently) a list of 3-tuples: - # (long_option, short_option, help_string) + # The option table is (currently) a list of tuples. The + # tuples may have 3 or four values: + # (long_option, short_option, help_string [, repeatable]) # if an option takes an argument, its long_option should have '=' # appended; short_option should just be a single character, no ':' # in any case. If a long_option doesn't have a corresponding @@ -162,7 +163,7 @@ def _grok_option_table (self): else: # the option table is part of the code, so simply # assert that it is correct - assert "invalid option tuple: %r" % (option,) + raise ValueError, "invalid option tuple: %r" % (option,) # Type- and value-check the option names if type(long) is not StringType or len(long) < 2: From ab4c054599bc4bcce9deb27b543b6b5465667a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 3 Aug 2004 12:41:42 +0000 Subject: [PATCH 0992/8469] Patch #870382: Automatically add msvcr71 to the list of libraries if Python was built with VC 7.1. --- cygwinccompiler.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index a962007601..acd393d593 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -122,6 +122,17 @@ def __init__ (self, verbose=0, dry_run=0, force=0): "Consider upgrading to a newer version of gcc") else: self.dll_libraries=[] + # Include the appropriate MSVC runtime library if Python was built + # with MSVC 7.0 or 7.1. + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + self.dll_libraries = ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + self.dll_libraries = ['msvcr71'] # __init__ () @@ -308,6 +319,18 @@ def __init__ (self, # no additional libraries needed self.dll_libraries=[] + # Include the appropriate MSVC runtime library if Python was built + # with MSVC 7.0 or 7.1. + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + self.dll_libraries = ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + self.dll_libraries = ['msvcr71'] + # __init__ () # class Mingw32CCompiler From 1e8e19184f43761f8645b35e3ceb1bc95edde5b5 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 3 Aug 2004 16:37:40 +0000 Subject: [PATCH 0993/8469] This allows additional commands to be provided for existing setup.py scripts without modifying either the distutils installation or the setup.py scripts of packages with which the new commands will be used. Specifically, an option is added to distutils that allows additional packages to be searched for command implementations in addition to distutils.command. The additional packages can be specified on the command line or via the installation or personal configuration files already loaded by distutils. For discussion, see the thread starting with: http://mail.python.org/pipermail/distutils-sig/2004-August/004112.html This closes SF patch #102241. --- dist.py | 84 +++++++++++++++++++++++++++---------- tests/test_dist.py | 100 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+), 22 deletions(-) create mode 100644 tests/test_dist.py diff --git a/dist.py b/dist.py index b4dd0b9170..53846e937f 100644 --- a/dist.py +++ b/dist.py @@ -141,6 +141,14 @@ def __init__ (self, attrs=None): # for the setup script to override command classes self.cmdclass = {} + # 'command_packages' is a list of packages in which commands + # are searched for. The factory for command 'foo' is expected + # to be named 'foo' in the module 'foo' in one of the packages + # named here. This list is searched from the left; an error + # is raised if no named package provides the command being + # searched for. (Always access using get_command_packages().) + self.command_packages = None + # 'script_name' and 'script_args' are usually set to sys.argv[0] # and sys.argv[1:], but they can be overridden when the caller is # not necessarily a setup script run from the command-line. @@ -406,6 +414,8 @@ def parse_config_files (self, filenames=None): setattr(self, alias, not strtobool(val)) elif opt in ('verbose', 'dry_run'): # ugh! setattr(self, opt, strtobool(val)) + else: + setattr(self, opt, val) except ValueError, msg: raise DistutilsOptionError, msg @@ -437,11 +447,12 @@ def parse_command_line (self): # We now have enough information to show the Macintosh dialog # that allows the user to interactively specify the "command line". # + toplevel_options = self._get_toplevel_options() if sys.platform == 'mac': import EasyDialogs cmdlist = self.get_command_list() self.script_args = EasyDialogs.GetArgv( - self.global_options + self.display_options, cmdlist) + toplevel_options + self.display_options, cmdlist) # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -451,7 +462,7 @@ def parse_command_line (self): # until we know what the command is. self.commands = [] - parser = FancyGetopt(self.global_options + self.display_options) + parser = FancyGetopt(toplevel_options + self.display_options) parser.set_negative_aliases(self.negative_opt) parser.set_aliases({'licence': 'license'}) args = parser.getopt(args=self.script_args, object=self) @@ -488,6 +499,17 @@ def parse_command_line (self): # parse_command_line() + def _get_toplevel_options (self): + """Return the non-display options recognized at the top level. + + This includes options that are recognized *only* at the top + level as well as options recognized for commands. + """ + return self.global_options + [ + ("command-packages=", None, + "list of packages that provide distutils commands"), + ] + def _parse_command_opts (self, parser, args): """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list @@ -586,7 +608,6 @@ def _parse_command_opts (self, parser, args): # _parse_command_opts () - def finalize_options (self): """Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command @@ -627,7 +648,11 @@ def _show_help (self, from distutils.cmd import Command if global_options: - parser.set_option_table(self.global_options) + if display_options: + options = self._get_toplevel_options() + else: + options = self.global_options + parser.set_option_table(options) parser.print_help("Global options:") print @@ -791,6 +816,19 @@ def get_command_list (self): # -- Command class/object methods ---------------------------------- + def get_command_packages (self): + """Return a list of packages from which commands are loaded.""" + pkgs = self.command_packages + if not isinstance(pkgs, type([])): + pkgs = string.split(pkgs or "", ",") + for i in range(len(pkgs)): + pkgs[i] = string.strip(pkgs[i]) + pkgs = filter(None, pkgs) + if "distutils.command" not in pkgs: + pkgs.insert(0, "distutils.command") + self.command_packages = pkgs + return pkgs + def get_command_class (self, command): """Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the @@ -807,26 +845,28 @@ def get_command_class (self, command): if klass: return klass - module_name = 'distutils.command.' + command - klass_name = command + for pkgname in self.get_command_packages(): + module_name = "%s.%s" % (pkgname, command) + klass_name = command - try: - __import__ (module_name) - module = sys.modules[module_name] - except ImportError: - raise DistutilsModuleError, \ - "invalid command '%s' (no module named '%s')" % \ - (command, module_name) + try: + __import__ (module_name) + module = sys.modules[module_name] + except ImportError: + continue + + try: + klass = getattr(module, klass_name) + except AttributeError: + raise DistutilsModuleError, \ + "invalid command '%s' (no class '%s' in module '%s')" \ + % (command, klass_name, module_name) + + self.cmdclass[command] = klass + return klass + + raise DistutilsModuleError("invalid command '%s'" % command) - try: - klass = getattr(module, klass_name) - except AttributeError: - raise DistutilsModuleError, \ - "invalid command '%s' (no class '%s' in module '%s')" \ - % (command, klass_name, module_name) - - self.cmdclass[command] = klass - return klass # get_command_class () diff --git a/tests/test_dist.py b/tests/test_dist.py new file mode 100644 index 0000000000..695f6d8192 --- /dev/null +++ b/tests/test_dist.py @@ -0,0 +1,100 @@ +"""Tests for distutils.dist.""" + +import distutils.cmd +import distutils.dist +import os +import shutil +import sys +import tempfile +import unittest + +from test.test_support import TESTFN + + +class test_dist(distutils.cmd.Command): + """Sample distutils extension command.""" + + user_options = [ + ("sample-option=", "S", "help text"), + ] + + def initialize_options(self): + self.sample_option = None + + +class TestDistribution(distutils.dist.Distribution): + """Distribution subclasses that avoids the default search for + configuration files. + + The ._config_files attribute must be set before + .parse_config_files() is called. + """ + + def find_config_files(self): + return self._config_files + + +class DistributionTestCase(unittest.TestCase): + + def setUp(self): + self.argv = sys.argv[:] + del sys.argv[1:] + + def tearDown(self): + sys.argv[:] = self.argv + + def create_distribution(self, configfiles=()): + d = TestDistribution() + d._config_files = configfiles + d.parse_config_files() + d.parse_command_line() + return d + + def test_command_packages_unspecified(self): + sys.argv.append("build") + d = self.create_distribution() + self.assertEqual(d.get_command_packages(), ["distutils.command"]) + + def test_command_packages_cmdline(self): + sys.argv.extend(["--command-packages", + "foo.bar,distutils.tests", + "test_dist", + "-Ssometext", + ]) + d = self.create_distribution() + # let's actually try to load our test command: + self.assertEqual(d.get_command_packages(), + ["distutils.command", "foo.bar", "distutils.tests"]) + cmd = d.get_command_obj("test_dist") + self.assert_(isinstance(cmd, test_dist)) + self.assertEqual(cmd.sample_option, "sometext") + + def test_command_packages_configfile(self): + sys.argv.append("build") + f = open(TESTFN, "w") + try: + print >>f, "[global]" + print >>f, "command_packages = foo.bar, splat" + f.close() + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "foo.bar", "splat"]) + + # ensure command line overrides config: + sys.argv[1:] = ["--command-packages", "spork", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "spork"]) + + # Setting --command-packages to '' should cause the default to + # be used even if a config file specified something else: + sys.argv[1:] = ["--command-packages", "", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), ["distutils.command"]) + + finally: + os.unlink(TESTFN) + + +def test_suite(): + return unittest.makeSuite(DistributionTestCase) From 5f46c973a65daae1e9351c98edd0c4d7e531526b Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 3 Aug 2004 18:53:07 +0000 Subject: [PATCH 0994/8469] make sure distutils logging is shut off in tests to avoid spurious output --- log.py | 3 +++ tests/support.py | 13 +++++++++++++ tests/test_build_py.py | 4 +++- tests/test_build_scripts.py | 4 +++- tests/test_install_scripts.py | 4 +++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/log.py b/log.py index 024e7c28de..bf26302fcc 100644 --- a/log.py +++ b/log.py @@ -50,7 +50,10 @@ def fatal(self, msg, *args): fatal = _global_log.fatal def set_threshold(level): + # return the old threshold for use from tests + old = _global_log.threshold _global_log.threshold = level + return old def set_verbosity(v): if v <= 0: diff --git a/tests/support.py b/tests/support.py index cef985d79a..475ceee598 100644 --- a/tests/support.py +++ b/tests/support.py @@ -3,6 +3,19 @@ import shutil import tempfile +from distutils import log + + +class LoggingSilencer(object): + + def setUp(self): + super(LoggingSilencer, self).setUp() + self.threshold = log.set_threshold(log.FATAL) + + def tearDown(self): + log.set_threshold(self.threshold) + super(LoggingSilencer, self).tearDown() + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 6f7276866d..78e4c55ed4 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -9,7 +9,9 @@ from distutils.tests import support -class BuildPyTestCase(support.TempdirManager, unittest.TestCase): +class BuildPyTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_package_data(self): sources = self.mkdtemp() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 7ef71cc120..bf25b38222 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -9,7 +9,9 @@ from distutils.tests import support -class BuildScriptsTestCase(support.TempdirManager, unittest.TestCase): +class BuildScriptsTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 2e86dcd8a9..fffa6ef2c3 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -9,7 +9,9 @@ from distutils.tests import support -class InstallScriptsTestCase(support.TempdirManager, unittest.TestCase): +class InstallScriptsTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_default_settings(self): dist = Distribution() From 4e7fa463934326cdeebc21acd417260cb1dd5da2 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 4 Aug 2004 02:36:18 +0000 Subject: [PATCH 0995/8469] Whitespace normalization. --- cygwinccompiler.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index acd393d593..31e8e3492f 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -122,17 +122,17 @@ def __init__ (self, verbose=0, dry_run=0, force=0): "Consider upgrading to a newer version of gcc") else: self.dll_libraries=[] - # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # Include the appropriate MSVC runtime library if Python was built + # with MSVC 7.0 or 7.1. + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + self.dll_libraries = ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + self.dll_libraries = ['msvcr71'] # __init__ () @@ -319,17 +319,17 @@ def __init__ (self, # no additional libraries needed self.dll_libraries=[] - # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # Include the appropriate MSVC runtime library if Python was built + # with MSVC 7.0 or 7.1. + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + self.dll_libraries = ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + self.dll_libraries = ['msvcr71'] # __init__ () From bf70c77f2d4b915ed174f2484197be059d589916 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Tue, 17 Aug 2004 10:15:07 +0000 Subject: [PATCH 0996/8469] The get_installer_filename() method forgot to return the name it calculates. Spotted by Cort Danger Stratton. --- command/bdist_wininst.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 20bd61389a..33e15561bb 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -283,6 +283,7 @@ def get_installer_filename(self, fullname): else: installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) + return installer_name # get_installer_filename() def get_exe_bytes (self): From 85a862fc5645a070fa1b62884c76210384376912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 25 Aug 2004 11:37:43 +0000 Subject: [PATCH 0997/8469] Patch #736857, #736859: Add -e option to build_scripts. --- command/build.py | 5 +++++ command/build_scripts.py | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/command/build.py b/command/build.py index 78231541ec..e6b3991f15 100644 --- a/command/build.py +++ b/command/build.py @@ -40,6 +40,8 @@ class build (Command): "compile extensions and libraries with debugging information"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ('executable=', 'e', + "specify final destination interpreter path (build.py)"), ] boolean_options = ['debug', 'force'] @@ -61,6 +63,7 @@ def initialize_options (self): self.compiler = None self.debug = None self.force = 0 + self.executable = None def finalize_options (self): @@ -93,6 +96,8 @@ def finalize_options (self): self.build_scripts = os.path.join(self.build_base, 'scripts-' + sys.version[0:3]) + if self.executable is None: + self.executable = os.path.normpath(sys.executable) # finalize_options () diff --git a/command/build_scripts.py b/command/build_scripts.py index e0fcc23e13..fb73719f57 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -24,6 +24,7 @@ class build_scripts (Command): user_options = [ ('build-dir=', 'd', "directory to \"build\" (copy) to"), ('force', 'f', "forcibly build everything (ignore file timestamps"), + ('executable=', 'e', "specify final destination interpreter path"), ] boolean_options = ['force'] @@ -33,12 +34,14 @@ def initialize_options (self): self.build_dir = None self.scripts = None self.force = None + self.executable = None self.outfiles = None def finalize_options (self): self.set_undefined_options('build', ('build_scripts', 'build_dir'), - ('force', 'force')) + ('force', 'force'), + ('executable', 'executable')) self.scripts = self.distribution.scripts def get_source_files(self): @@ -95,7 +98,7 @@ def copy_scripts (self): outf = open(outfile, "w") if not sysconfig.python_build: outf.write("#!%s%s\n" % - (os.path.normpath(sys.executable), + (self.executable, post_interp)) else: outf.write("#!%s%s\n" % From 5fb221df11270747861f6bbc2dd35e88365935f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 25 Aug 2004 13:00:34 +0000 Subject: [PATCH 0998/8469] Patch #970019: Include version and release in the BuildRoot. --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 4be9999497..43181ea018 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -361,7 +361,7 @@ def _make_spec_file(self): spec_file.extend([ 'License: ' + self.distribution.get_license(), 'Group: ' + self.group, - 'BuildRoot: %{_tmppath}/%{name}-buildroot', + 'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot', 'Prefix: %{_prefix}', ]) # noarch if no extension modules From e640606ebb5a80db67d17d9e2ec8f82e901fff61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 25 Aug 2004 13:04:53 +0000 Subject: [PATCH 0999/8469] Patch #970015: Replace - by _ in version and release. --- command/bdist_rpm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 43181ea018..5c8a7570b3 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -332,8 +332,8 @@ def _make_spec_file(self): # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), - '%define version ' + self.distribution.get_version(), - '%define release ' + self.release, + '%define version ' + self.distribution.get_version().replace('-','_'), + '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), ] From 78bb6f689a29017a19b4197024fe1ec78031063b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 26 Aug 2004 05:44:02 +0000 Subject: [PATCH 1000/8469] Add missing executable option to DummyCommand. --- tests/test_build_scripts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index bf25b38222..666ca44c1d 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -39,11 +39,13 @@ def test_build(self): self.assert_(name in built) def get_build_scripts_cmd(self, target, scripts): + import sys dist = Distribution() dist.scripts = scripts dist.command_obj["build"] = support.DummyCommand( build_scripts=target, - force=1 + force=1, + executable=sys.executable ) return build_scripts(dist) From 87a4bf20711940df17932f0c16c05785da706480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 29 Aug 2004 16:40:55 +0000 Subject: [PATCH 1001/8469] Patch #973204: Use -rpath instead of -R on Irix and Tru64. --- ccompiler.py | 6 +++++- unixccompiler.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index a3b1ffa4d5..e5b9d7cc11 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1241,7 +1241,11 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): lib_opts.append (compiler.library_dir_option (dir)) for dir in runtime_library_dirs: - lib_opts.append (compiler.runtime_library_dir_option (dir)) + opt = compiler.runtime_library_dir_option (dir) + if type(opt) is ListType: + lib_opts = lib_opts + opt + else: + lib_opts.append (opt) # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to diff --git a/unixccompiler.py b/unixccompiler.py index 24cbcb53e5..56998c3507 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -205,6 +205,8 @@ def runtime_library_dir_option(self, dir): return "-L" + dir elif sys.platform[:5] == "hp-ux": return "+s -L" + dir + elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": + return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: From 99846e7ee4b5ad74bdbdcc4428b22f51e8a6a082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 10 Sep 2004 06:25:01 +0000 Subject: [PATCH 1002/8469] Patch #808115: Add script support to bdist_rpm.py. --- command/bdist_rpm.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 5c8a7570b3..11fd9f184c 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -95,6 +95,31 @@ class bdist_rpm (Command): "RPM 3 compatibility mode (default)"), ('rpm2-mode', None, "RPM 2 compatibility mode"), + + # Add the hooks necessary for specifying custom scripts + ('prep-script=', None, + "Specify a script for the PREP phase of RPM building"), + ('build-script=', None, + "Specify a script for the BUILD phase of RPM building"), + + ('pre-install=', None, + "Specify a script for the pre-INSTALL phase of RPM building"), + ('install-script=', None, + "Specify a script for the INSTALL phase of RPM building"), + ('post-install=', None, + "Specify a script for the post-INSTALL phase of RPM building"), + + ('pre-uninstall=', None, + "Specify a script for the pre-UNINSTALL phase of RPM building"), + ('post-uninstall=', None, + "Specify a script for the post-UNINSTALL phase of RPM building"), + + ('clean-script=', None, + "Specify a script for the CLEAN phase of RPM building"), + + ('verify-script=', None, + "Specify a script for the VERIFY phase of the RPM build"), + ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode'] From 6d690de8de670b52f88c5d414c1bc2580ade2c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 10 Sep 2004 06:32:54 +0000 Subject: [PATCH 1003/8469] Patch #808120: Add --force-arch=ARCH to bdist_rpm.py. --- command/bdist_rpm.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 11fd9f184c..559fcb9f73 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -120,6 +120,9 @@ class bdist_rpm (Command): ('verify-script=', None, "Specify a script for the VERIFY phase of the RPM build"), + # Allow a packager to explicitly force an architecture + ('force-arch=', None, + "Force an architecture onto the RPM build process"), ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode'] @@ -170,6 +173,8 @@ def initialize_options (self): self.use_rpm_opt_flags = 1 self.rpm3_mode = 1 + self.force_arch = None + # initialize_options() @@ -250,6 +255,7 @@ def finalize_package_data (self): self.ensure_string_list('build_requires') self.ensure_string_list('obsoletes') + self.ensure_string('force_arch') # finalize_package_data () @@ -389,9 +395,12 @@ def _make_spec_file(self): 'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot', 'Prefix: %{_prefix}', ]) - # noarch if no extension modules - if not self.distribution.has_ext_modules(): - spec_file.append('BuildArchitectures: noarch') + if not self.force_arch: + # noarch if no extension modules + if not self.distribution.has_ext_modules(): + spec_file.append('BuildArch: noarch') + else: + spec_file.append( 'BuildArch: %s' % self.force_arch ) for field in ('Vendor', 'Packager', From d3c88e64e1b45b0c08f081423c191de75c823b05 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 12 Sep 2004 03:49:31 +0000 Subject: [PATCH 1004/8469] Whitespace normalization. --- command/bdist_rpm.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 559fcb9f73..22eccb9325 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -97,24 +97,24 @@ class bdist_rpm (Command): "RPM 2 compatibility mode"), # Add the hooks necessary for specifying custom scripts - ('prep-script=', None, + ('prep-script=', None, "Specify a script for the PREP phase of RPM building"), - ('build-script=', None, + ('build-script=', None, "Specify a script for the BUILD phase of RPM building"), - ('pre-install=', None, + ('pre-install=', None, "Specify a script for the pre-INSTALL phase of RPM building"), - ('install-script=', None, + ('install-script=', None, "Specify a script for the INSTALL phase of RPM building"), - ('post-install=', None, + ('post-install=', None, "Specify a script for the post-INSTALL phase of RPM building"), - ('pre-uninstall=', None, + ('pre-uninstall=', None, "Specify a script for the pre-UNINSTALL phase of RPM building"), - ('post-uninstall=', None, + ('post-uninstall=', None, "Specify a script for the post-UNINSTALL phase of RPM building"), - ('clean-script=', None, + ('clean-script=', None, "Specify a script for the CLEAN phase of RPM building"), ('verify-script=', None, From 6b853a9c0d4926ef6c628436cdec012241c7912b Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 17 Sep 2004 08:23:22 +0000 Subject: [PATCH 1005/8469] SF Patch 1022003: Change bdist_rpm _topdir to use os.path.abspath(self.rpm_base) instead of os.getcwd() + '/' + self.rpm_base --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 22eccb9325..18546d2611 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -326,7 +326,7 @@ def run (self): rpm_cmd.append('-ba') if self.rpm3_mode: rpm_cmd.extend(['--define', - '_topdir %s/%s' % (os.getcwd(), self.rpm_base),]) + '_topdir %s' % os.path.abspath(self.rpm_base)]) if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) From f9ace2e1ee023402f1c4ba9df06df33a2d5b52ac Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 17 Sep 2004 08:34:12 +0000 Subject: [PATCH 1006/8469] SF Patch 1022011: Add a command-line argument --no-autoreq, which sets the "AutoReq: 0" to disable automatic dependency searching. --- command/bdist_rpm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 18546d2611..7f1b440e05 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -81,6 +81,8 @@ class bdist_rpm (Command): "capabilities required to build this package"), ('obsoletes=', None, "capabilities made obsolete by this package"), + ('no-autoreq', None, + "do not automatically calculate dependencies"), # Actions to take when building RPM ('keep-temp', 'k', @@ -125,7 +127,8 @@ class bdist_rpm (Command): "Force an architecture onto the RPM build process"), ] - boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode'] + boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode', + 'no-autoreq'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', @@ -172,6 +175,7 @@ def initialize_options (self): self.keep_temp = 0 self.use_rpm_opt_flags = 1 self.rpm3_mode = 1 + self.no_autoreq = 0 self.force_arch = None @@ -429,6 +433,9 @@ def _make_spec_file(self): if self.icon: spec_file.append('Icon: ' + os.path.basename(self.icon)) + if self.no_autoreq: + spec_file.append('AutoReq: 0') + spec_file.extend([ '', '%description', From de08fcf3db1b9779a9430c600354bed93dadd90b Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Wed, 13 Oct 2004 12:35:28 +0000 Subject: [PATCH 1007/8469] Backing out the basic dependency checking (from pycon sprint). This support was only a first cut, and doesn't deserve to be in a released version (where we have to support it in an ongoing manner) --- command/__init__.py | 1 - command/checkdep.py | 70 --------------------------------------------- command/install.py | 13 +-------- core.py | 3 +- dist.py | 61 +-------------------------------------- 5 files changed, 3 insertions(+), 145 deletions(-) delete mode 100644 command/checkdep.py diff --git a/command/__init__.py b/command/__init__.py index 3a9a53ee85..870005dca7 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -24,7 +24,6 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', - 'checkdep', # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', diff --git a/command/checkdep.py b/command/checkdep.py deleted file mode 100644 index 729002c725..0000000000 --- a/command/checkdep.py +++ /dev/null @@ -1,70 +0,0 @@ -"""distutils.command.x - -Implements the Distutils 'x' command. -""" - -# created 2000/mm/dd, John Doe - -__revision__ = "$Id$" - -from distutils.core import Command - -class DependencyFailure(Exception): pass - -class VersionTooOld(DependencyFailure): pass - -class VersionNotKnown(DependencyFailure): pass - -class checkdep (Command): - - # Brief (40-50 characters) description of the command - description = "check package dependencies" - - # List of option tuples: long name, short name (None if no short - # name), and help string. - # Later on, we might have auto-fetch and the like here. Feel free. - user_options = [] - - def initialize_options (self): - self.debug = None - - # initialize_options() - - - def finalize_options (self): - pass - # finalize_options() - - - def run (self): - from distutils.version import LooseVersion - failed = [] - for pkg, ver in self.distribution.metadata.requires: - if pkg == 'python': - if ver is not None: - # Special case the 'python' package - import sys - thisver = LooseVersion('%d.%d.%d'%sys.version_info[:3]) - if thisver < ver: - failed.append(((pkg,ver), VersionTooOld(thisver))) - continue - # Kinda hacky - we should do more here - try: - mod = __import__(pkg) - except Exception, e: - failed.append(((pkg,ver), e)) - continue - if ver is not None: - if hasattr(mod, '__version__'): - thisver = LooseVersion(mod.__version__) - if thisver < ver: - failed.append(((pkg,ver), VersionTooOld(thisver))) - else: - failed.append(((pkg,ver), VersionNotKnown())) - - if failed: - raise DependencyFailure, failed - - # run() - -# class x diff --git a/command/install.py b/command/install.py index 175f785214..2aaf010562 100644 --- a/command/install.py +++ b/command/install.py @@ -126,8 +126,6 @@ class install (Command): "force installation (overwrite any existing files)"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), - ('skip-checkdep', None, - "skip checking dependencies (use at own risk)"), # Where to install documentation (eventually!) #('doc-format=', None, "format of documentation to generate"), @@ -185,15 +183,12 @@ def initialize_options (self): # 'force' forces installation, even if target files are not # out-of-date. 'skip_build' skips running the "build" command, - # handy if you know it's not necessary. 'skip_checkdep' skips - # the 'checkdep' command, if you are sure you can work around the - # dependency failure in another way. 'warn_dir' (which is *not* + # handy if you know it's not necessary. 'warn_dir' (which is *not* # a user option, it's just there so the bdist_* commands can turn # it off) determines whether we warn about installing to a # directory not in sys.path. self.force = 0 self.skip_build = 0 - self.skip_checkdep = 0 self.warn_dir = 1 # These are only here as a conduit from the 'build' command to the @@ -505,12 +500,6 @@ def run (self): if not self.skip_build: self.run_command('build') - # We check dependencies before we install - # For now, this is disabled. Before 2.4 is released, this will - # be turned on. - #if not self.skip_checkdep: - # self.run_command('checkdep') - # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) diff --git a/core.py b/core.py index fef291f656..6867534967 100644 --- a/core.py +++ b/core.py @@ -47,8 +47,7 @@ def gen_usage (script_name): 'name', 'version', 'author', 'author_email', 'maintainer', 'maintainer_email', 'url', 'license', 'description', 'long_description', 'keywords', - 'platforms', 'classifiers', 'download_url', - 'provides', 'requires', ) + 'platforms', 'classifiers', 'download_url',) # Legal keyword arguments for the Extension constructor extension_keywords = ('name', 'sources', 'include_dirs', diff --git a/dist.py b/dist.py index 53846e937f..a23a773c57 100644 --- a/dist.py +++ b/dist.py @@ -223,51 +223,6 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") - # Build up the requires sequence - from distutils.version import LooseVersion - requires = attrs.get('requires') - if requires: - if isinstance(requires, type('')): - raise DistutilsOptionError, 'requires should be a sequence' - newreq = [] - for req in requires: - if '-' not in req: - # We have a plain package name - any version will do - newreq.append((req,None)) - else: - pkg, ver = string.split(req, '-', 1) - newreq.append((pkg, LooseVersion(ver))) - attrs['requires'] = newreq - - # Build up the provides object. If the setup() has no - # provides line, we use packages or modules and the version - # to synthesise the provides. If no version is provided (no - # pun intended) we don't have a provides entry at all. - provides = attrs.get('provides') - if provides: - if isinstance(provides, type('')): - raise DistutilsOptionError, 'provides should be a sequence' - newprov = [] - for prov in provides: - if '-' not in prov: - # We have a plain package name - any version will do - newprov.append((prov,None)) - else: - pkg, ver = string.split(prov, '-', 1) - newprov.append((pkg, LooseVersion(ver))) - attrs['provides'] = newprov - elif attrs.get('version'): - # Build a provides line - prov = [] - if attrs.get('packages'): - for pkg in attrs['packages']: - pkg = string.replace(pkg, '/', '.') - prov.append('%s-%s'%(pkg, attrs['version'])) - elif attrs.get('modules'): - for mod in attrs['modules']: - prov.append('%s-%s'%(mod, attrs['version'])) - attrs['provides'] = prov - # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): @@ -275,7 +230,6 @@ def __init__ (self, attrs=None): setattr(self.metadata, key, val) elif hasattr(self, key): setattr(self, key, val) - else: msg = "Unknown distribution option: %s" % repr(key) if warnings is not None: warnings.warn(msg) @@ -1060,7 +1014,7 @@ class DistributionMetadata: "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", "contact_email", "license", "classifiers", - "download_url", "provides", "requires",) + "download_url") def __init__ (self): self.name = None @@ -1077,8 +1031,6 @@ def __init__ (self): self.platforms = None self.classifiers = None self.download_url = None - self.requires = [] - self.provides = [] def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. @@ -1094,10 +1046,6 @@ def write_pkg_info (self, base_dir): pkg_info.write('Author: %s\n' % self.get_contact() ) pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) pkg_info.write('License: %s\n' % self.get_license() ) - for req in self.get_requires(): - pkg_info.write('Requires: %s\n' % req ) - for prov in self.get_provides(): - pkg_info.write('Provides: %s\n' % prov ) if self.download_url: pkg_info.write('Download-URL: %s\n' % self.download_url) @@ -1176,13 +1124,6 @@ def get_classifiers(self): def get_download_url(self): return self.download_url or "UNKNOWN" - def get_requires(self): - return [ '%s%s%s'%(x, (y and '-') or '', y or '') - for x,y in self.requires ] - - def get_provides(self): - return self.provides - # class DistributionMetadata From f790936afe6035720d8afde494b9b17d408032c7 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Wed, 13 Oct 2004 13:22:34 +0000 Subject: [PATCH 1008/8469] oops. how did _that_ happen? --- dist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.py b/dist.py index a23a773c57..1a39022fd8 100644 --- a/dist.py +++ b/dist.py @@ -230,6 +230,7 @@ def __init__ (self, attrs=None): setattr(self.metadata, key, val) elif hasattr(self, key): setattr(self, key, val) + else: msg = "Unknown distribution option: %s" % repr(key) if warnings is not None: warnings.warn(msg) From 51311882da9cc8f976e8c669794f9bbcc1860792 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Wed, 13 Oct 2004 15:54:17 +0000 Subject: [PATCH 1009/8469] Patch 983206: distutils obeys LDSHARED env var. Removed the code in Python's own setup.py that did the same thing (and tested on Solaris, where LDSHARED is needed...) --- sysconfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 0a4e14cc37..8986dc9857 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -153,6 +153,8 @@ def customize_compiler(compiler): cc = os.environ['CC'] if os.environ.has_key('CXX'): cxx = os.environ['CXX'] + if os.environ.has_key('LDSHARED'): + ldshared = os.environ['LDSHARED'] if os.environ.has_key('CPP'): cpp = os.environ['CPP'] else: From 27585e07f272206ef70fe911c5c0f05c78fa9336 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Thu, 14 Oct 2004 10:02:08 +0000 Subject: [PATCH 1010/8469] Patch 1046644 - improved distutils support for SWIG. --- command/build_ext.py | 27 +++++++++++++++++++++++---- core.py | 2 +- extension.py | 5 +++++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 04cd742cef..07614c6a0d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -81,6 +81,10 @@ class build_ext (Command): "specify the compiler type"), ('swig-cpp', None, "make SWIG create C++ files (default is C)"), + ('swig-opts=', None, + "list of SWIG command line options"), + ('swig=', None, + "path to the SWIG executable"), ] boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] @@ -107,8 +111,9 @@ def initialize_options (self): self.debug = None self.force = None self.compiler = None + self.swig = None self.swig_cpp = None - + self.swig_opts = None def finalize_options (self): from distutils import sysconfig @@ -205,6 +210,11 @@ def finalize_options (self): if self.undef: self.undef = string.split(self.undef, ',') + if self.swig_opts is None: + self.swig_opts = [] + else: + self.swig_opts = self.swig_opts.split(' ') + # finalize_options () @@ -429,7 +439,7 @@ def build_extension(self, ext): # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list # accordingly. - sources = self.swig_sources(sources) + sources = self.swig_sources(sources, ext) # Next, compile the source code to object files. @@ -492,7 +502,7 @@ def build_extension(self, ext): target_lang=language) - def swig_sources (self, sources): + def swig_sources (self, sources, extension): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and @@ -510,6 +520,9 @@ def swig_sources (self, sources): # the temp dir. if self.swig_cpp: + log.warn("--swig-cpp is deprecated - use --swig-opts=-c++") + + if self.swig_cpp or ('-c++' in self.swig_opts): target_ext = '.cpp' else: target_ext = '.c' @@ -526,11 +539,17 @@ def swig_sources (self, sources): if not swig_sources: return new_sources - swig = self.find_swig() + swig = self.swig or self.find_swig() swig_cmd = [swig, "-python"] + swig_cmd.extend(self.swig_opts) if self.swig_cpp: swig_cmd.append("-c++") + # Do not override commandline arguments + if not self.swig_opts: + for o in extension.swig_opts: + swig_cmd.append(o) + for source in swig_sources: target = swig_targets[source] log.info("swigging %s to %s", source, target) diff --git a/core.py b/core.py index 6867534967..8c82801051 100644 --- a/core.py +++ b/core.py @@ -54,7 +54,7 @@ def gen_usage (script_name): 'define_macros', 'undef_macros', 'library_dirs', 'libraries', 'runtime_library_dirs', 'extra_objects', 'extra_compile_args', 'extra_link_args', - 'export_symbols', 'depends', 'language') + 'swig_opts', 'export_symbols', 'depends', 'language') def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs diff --git a/extension.py b/extension.py index e69f3e93e0..440d128cdc 100644 --- a/extension.py +++ b/extension.py @@ -75,6 +75,9 @@ class Extension: used on all platforms, and not generally necessary for Python extensions, which typically export exactly one symbol: "init" + extension_name. + swig_opts : [string] + any extra options to pass to SWIG if a source file has the .i + extension. depends : [string] list of files that the extension depends on language : string @@ -95,6 +98,7 @@ def __init__ (self, name, sources, extra_compile_args=None, extra_link_args=None, export_symbols=None, + swig_opts = None, depends=None, language=None, **kw # To catch unknown keywords @@ -116,6 +120,7 @@ def __init__ (self, name, sources, self.extra_compile_args = extra_compile_args or [] self.extra_link_args = extra_link_args or [] self.export_symbols = export_symbols or [] + self.swig_opts = swig_opts or [] self.depends = depends or [] self.language = language From dea703ad7656eb0d194d854734483045e0a0be56 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 27 Oct 2004 21:54:33 +0000 Subject: [PATCH 1011/8469] Fix [1055540 ] bdist_wininst broken for pure Python distributions --- command/bdist_wininst.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 33e15561bb..f4bab62ae3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -116,20 +116,21 @@ def run (self): install_lib.compile = 0 install_lib.optimize = 0 - # If we are building an installer for a Python version other - # than the one we are currently running, then we need to ensure - # our build_lib reflects the other Python version rather than ours. - # Note that for target_version!=sys.version, we must have skipped the - # build step, so there is no issue with enforcing the build of this - # version. - target_version = self.target_version - if not target_version: - assert self.skip_build, "Should have already checked this" - target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) - build = self.get_finalized_command('build') - build.build_lib = os.path.join(build.build_base, - 'lib' + plat_specifier) + if self.distribution.has_ext_modules(): + # If we are building an installer for a Python version other + # than the one we are currently running, then we need to ensure + # our build_lib reflects the other Python version rather than ours. + # Note that for target_version!=sys.version, we must have skipped the + # build step, so there is no issue with enforcing the build of this + # version. + target_version = self.target_version + if not target_version: + assert self.skip_build, "Should have already checked this" + target_version = sys.version[0:3] + plat_specifier = ".%s-%s" % (get_platform(), target_version) + build = self.get_finalized_command('build') + build.build_lib = os.path.join(build.build_base, + 'lib' + plat_specifier) # Use a custom scheme for the zip-file, because we have to decide # at installation time which scheme to use. From d0a2baffd16b3af0caca15a0b5ec9c3449a6abcd Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 10 Nov 2004 09:01:41 +0000 Subject: [PATCH 1012/8469] Avoid a linker warning: MSVC 7 doesn't support /pdb:None, the debug info will always be in a .pdb file. --- msvccompiler.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 168881ad2d..ab92801c2b 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -237,9 +237,14 @@ def __init__ (self, verbose=0, dry_run=0, force=0): '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] - self.ldflags_shared_debug = [ - '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' - ] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG' + ] + else: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG' + ] self.ldflags_static = [ '/nologo'] From 5712b12c54ef78b0e4211337269ae93fdcdb1ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 10 Nov 2004 22:23:15 +0000 Subject: [PATCH 1013/8469] Update compatibility comments to 2.1, corresponding to PEP 291 1.13. --- __init__.py | 2 +- archive_util.py | 2 +- bcppcompiler.py | 2 +- ccompiler.py | 2 +- cmd.py | 2 +- command/__init__.py | 2 +- command/bdist.py | 2 +- command/bdist_dumb.py | 2 +- command/bdist_rpm.py | 2 +- command/bdist_wininst.py | 2 +- command/build.py | 2 +- command/build_clib.py | 2 +- command/build_ext.py | 2 +- command/build_py.py | 2 +- command/build_scripts.py | 2 +- command/clean.py | 2 +- command/config.py | 2 +- command/install.py | 2 +- command/install_data.py | 2 +- command/install_headers.py | 2 +- command/install_lib.py | 2 +- command/install_scripts.py | 2 +- command/sdist.py | 2 +- core.py | 2 +- cygwinccompiler.py | 2 +- debug.py | 2 +- dep_util.py | 2 +- dir_util.py | 2 +- dist.py | 2 +- errors.py | 2 +- fancy_getopt.py | 2 +- file_util.py | 2 +- filelist.py | 2 +- log.py | 2 +- msvccompiler.py | 2 +- mwerkscompiler.py | 2 +- spawn.py | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) diff --git a/__init__.py b/__init__.py index 2592a6c559..a1dbb4b5ef 100644 --- a/__init__.py +++ b/__init__.py @@ -8,7 +8,7 @@ setup (...) """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/archive_util.py b/archive_util.py index 55babe6fc6..6aa5e635d7 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,7 +3,7 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/bcppcompiler.py b/bcppcompiler.py index f995e36711..ca524a5b88 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,7 +11,7 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/ccompiler.py b/ccompiler.py index e5b9d7cc11..6dad757a6a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,7 +3,7 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/cmd.py b/cmd.py index be8e826fdb..3cd5858920 100644 --- a/cmd.py +++ b/cmd.py @@ -4,7 +4,7 @@ in the distutils.command package. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/__init__.py b/command/__init__.py index 870005dca7..0888c2712b 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -3,7 +3,7 @@ Package containing implementation of all the standard Distutils commands.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/bdist.py b/command/bdist.py index 4eca9c3426..23c25a55a8 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,7 +3,7 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 3db332d5bd..7f498c8396 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,7 +4,7 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 7f1b440e05..8eaaff3246 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index f4bab62ae3..9b45cf35e8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/build.py b/command/build.py index e6b3991f15..9ae0a292a3 100644 --- a/command/build.py +++ b/command/build.py @@ -2,7 +2,7 @@ Implements the Distutils 'build' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/build_clib.py b/command/build_clib.py index ef03ed7269..69d8c75166 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,7 +4,7 @@ that is included in the module distribution and needed by an extension module.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/build_ext.py b/command/build_ext.py index 07614c6a0d..4191c76cef 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,7 +4,7 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/build_py.py b/command/build_py.py index 3079bfcdef..621bcb4af3 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,7 +2,7 @@ Implements the Distutils 'build_py' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/build_scripts.py b/command/build_scripts.py index fb73719f57..bda4480ca5 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,7 +2,7 @@ Implements the Distutils 'build_scripts' command.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/clean.py b/command/clean.py index 41b22777bc..1844ffefd3 100644 --- a/command/clean.py +++ b/command/clean.py @@ -4,7 +4,7 @@ # contributed by Bastian Kleineidam , added 2000-03-18 -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/config.py b/command/config.py index f18c79ff43..520c1b0c76 100644 --- a/command/config.py +++ b/command/config.py @@ -9,7 +9,7 @@ this header file lives". """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/install.py b/command/install.py index 2aaf010562..fdbec35872 100644 --- a/command/install.py +++ b/command/install.py @@ -4,7 +4,7 @@ from distutils import log -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/install_data.py b/command/install_data.py index 2fa0da29fe..1069830fb3 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -5,7 +5,7 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/install_headers.py b/command/install_headers.py index 3a37d309f9..2bd1b04367 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,7 +3,7 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/install_lib.py b/command/install_lib.py index c234117adc..22d0ab37a7 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,4 +1,4 @@ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/install_scripts.py b/command/install_scripts.py index abe10457b6..fe93ef5af2 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -5,7 +5,7 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/command/sdist.py b/command/sdist.py index 7021496549..fe6c913913 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,7 +2,7 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/core.py b/core.py index 8c82801051..eba94559d9 100644 --- a/core.py +++ b/core.py @@ -6,7 +6,7 @@ really defined in distutils.dist and distutils.cmd. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 31e8e3492f..4fd23e6dc6 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -45,7 +45,7 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/debug.py b/debug.py index 2a87eb5d28..b67139c7d4 100644 --- a/debug.py +++ b/debug.py @@ -1,6 +1,6 @@ import os -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/dep_util.py b/dep_util.py index 0746633d23..c139c852e4 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,7 +4,7 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/dir_util.py b/dir_util.py index 77f64c4104..7f1450373b 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,7 +2,7 @@ Utility functions for manipulating directories and directory trees.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/dist.py b/dist.py index 1a39022fd8..9eb2aa424c 100644 --- a/dist.py +++ b/dist.py @@ -4,7 +4,7 @@ being built/installed/distributed. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/errors.py b/errors.py index 94e83fb557..e72221bdba 100644 --- a/errors.py +++ b/errors.py @@ -8,7 +8,7 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/fancy_getopt.py b/fancy_getopt.py index 6c1134fc40..218ed73f98 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,7 +8,7 @@ * options set attributes of a passed-in object """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/file_util.py b/file_util.py index e2b1c51558..37b152ed8a 100644 --- a/file_util.py +++ b/file_util.py @@ -3,7 +3,7 @@ Utility functions for operating on single files. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/filelist.py b/filelist.py index 566d87ab28..43f9aaaf5b 100644 --- a/filelist.py +++ b/filelist.py @@ -4,7 +4,7 @@ and building lists of files. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/log.py b/log.py index bf26302fcc..cf3ee136e0 100644 --- a/log.py +++ b/log.py @@ -1,6 +1,6 @@ """A simple log mechanism styled after PEP 282.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. diff --git a/msvccompiler.py b/msvccompiler.py index ab92801c2b..dd9d8928ad 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -8,7 +8,7 @@ # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/mwerkscompiler.py b/mwerkscompiler.py index d546de1f25..0de123d9e9 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -4,7 +4,7 @@ for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on Windows.""" -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" diff --git a/spawn.py b/spawn.py index a89b88cebf..e5654ff009 100644 --- a/spawn.py +++ b/spawn.py @@ -6,7 +6,7 @@ executable name. """ -# This module should be kept compatible with Python 1.5.2. +# This module should be kept compatible with Python 2.1. __revision__ = "$Id$" From 0d815d149d55b3ec5930550e0facf64838f03cb7 Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Wed, 24 Nov 2004 22:31:11 +0000 Subject: [PATCH 1014/8469] SF patch #1071739 (by Christos Georgiou) This patch offers a better explanation in case the MS VC++ (free) toolkit is installed but the .NET Framework SDK is not. --- msvccompiler.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index dd9d8928ad..ccb62a8813 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -124,10 +124,15 @@ def load_macros(self, version): self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") - if version > 7.0: - self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") - else: - self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + try: + if version > 7.0: + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") + else: + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + except KeyError, exc: # + raise DistutilsPlatformError, \ + ("The .NET Framework SDK needs to be installed before " + "building extensions for Python.") p = r"Software\Microsoft\NET Framework Setup\Product" for base in HKEYS: From 69251931fb71629f37d7daa3e3765ee802513e74 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 28 Nov 2004 01:10:01 +0000 Subject: [PATCH 1015/8469] Whitespace normalization. --- msvccompiler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index ccb62a8813..89a75b3486 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -124,12 +124,12 @@ def load_macros(self, version): self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") - try: - if version > 7.0: - self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") - else: - self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError, exc: # + try: + if version > 7.0: + self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") + else: + self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") + except KeyError, exc: # raise DistutilsPlatformError, \ ("The .NET Framework SDK needs to be installed before " "building extensions for Python.") From 0713ced9996da5971124d3912d21af46ec2c21ad Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 1 Dec 2004 19:43:34 +0000 Subject: [PATCH 1016/8469] Recompiled binaries after source changes. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index ed288d6a260ab8e0b5e8a9b79ab781433399e94c..4683659e41dbce722c3ff1160de9954a03c331fa 100644 GIT binary patch delta 3904 zcmY*adr(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? zWofy%cAot4p$A4i1hQrRk}7}p0xpr5$zCA8b!g)75$s(X$;mh0$+$0{Xe|gsqd+#m7~N zm8;jmo=4DIXm|KPnj5056M#PwzP#k8)tVzs!b!q2(TU8TKpo4DfQbx;2f73C%Cn%~lI7$Tcn_lL+&?QeE+ zl;GJLD|f}pmr!m6)W+(}r^WEg&_?)F{w@5`7_%IBL#ur1cx7{8rKr1yFIeWvTR5MqlK)gSZS>k;`D(FreYvfCy=W`h zP*Pe}@=Tdu9xIM*&J$PZ2%QHdkdOR2b_;rOLK!{koEJ`PjyF@~%xg z<@D#Xmln(^QnP$y&tXNoHB|=g85>b#Je{Mqp zzX^O5^JJRx$H6z7+nz7f$+qhH=8kHc&Jx2eVQXBA<@wjl0GA-LhQX5n3f%L!xQ&8Y~$?g3&!@n_MNUp*Q7@7b;}) V#=;>aX&n@A`0(a?&wW1e{{X&s-p&93 From 543e5a6ca421c514dd517e81bb4d2ba64da772dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 2 Dec 2004 20:14:16 +0000 Subject: [PATCH 1017/8469] Restore Python 2.1 compatibility (os.extsep was introduced in Python 2.2). --- command/install_lib.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 22d0ab37a7..08ff543449 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -9,8 +9,10 @@ # Extension for Python source files. -PYTHON_SOURCE_EXTENSION = os.extsep + "py" - +if hasattr(os, 'extsep'): + PYTHON_SOURCE_EXTENSION = os.extsep + "py" +else: + PYTHON_SOURCE_EXTENSION = ".py" class install_lib (Command): From abc818a08898ada7a31b2466a7bf56848798fe86 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Wed, 22 Dec 2004 17:24:36 +0000 Subject: [PATCH 1018/8469] Recompiled after source changes. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index 4683659e41dbce722c3ff1160de9954a03c331fa..6ee282353046c2c28240398af0611d81a1fd5dd6 100644 GIT binary patch delta 14670 zcmeHue|(cwmiLnoAV4qy8z@kqXpjm8E1}X_>KmY`MTJ~f@OGh3K4Q+?j=xlcmV zad+K)_s{pOpOfd_bI(2Z+;h)8_uO-_{@RfGYeRM~&?(R7FAm(>Exoci@|zn8825bF zjZLWk{`uIAt@wss_%-`dyO+^jzi}O3^9wg`RI>IjZ34e9Jd~*-5UB+d793nKk}NqL-!rML;w7=iE@w5 zsH>K5>1K>W!`cxes@^f@w;fu z_wjpn%nbbgZcLVLvpi+&yl-rp?!0_r z><6>Px;QQp>ik+&d4)q6z3NX6y^Q)A@lLHlI0}xuaz%dg&Uw0D$Y0#KR<}$pO8McP z&C5AXtuch1{Rs~HB90I*3`+>XpOVF55f)N^_aZaS{hjH_DHv+KgP%~Zt~&}H%R*8APs-YcaqG^t99Y%jfHp)U zA5g8;=v1nTHiK#{qW;qlU3Ng52Z^SoMC#tzZPY<0`72T9{PTr*qJvYdSE`AFf4q=J z)$D?g3Aw8stV-?Cb1i}aXh_rvvV+vq6>;|S?{L7nRKH2JHh>hO2EfB$kH$O+{?>nk zVeG2gepB`LtMhKyPSZHWkQ0kpD&Acf{CcGCI@*Np8j|BAWY^@NrH`&#eXd2CcOxCW zyqr4{>Z3LGf`UYX0><7I$GKE%RwoG``zK=7$(YfkVsFTO%7~2bI_^lF!lqMMKVT8`c??LLBgwJ zG~O1!ynpiF7$D!Uo`RM;Iz!fH0W3R8EhexsC4mfP;^ zCtau=U|ywWM`1M)=MgpgFbcw6bO!%)@DH|Hm~5fLWH=z<1$3)dttrg>MKayY2x}Gg zP&eh(VzBiGj2e_^e075h-^!)PGrK~d3)-D-#ZX5Q7XQ!zIL8en9({(do#>+cnJXVV zg>G}hizwusHaA2V0=gsBNls(lX>ogwQ51!v5C!JY0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aP6E28k z%%_{-t&C5m9bH98Bs6e^b6M|P1^Z3ev;~ftD(EfngK4ewa|0~T+-quVAcSu-bhyU< z@nvv1Gn*E{G;>x?8t%3opU{s7pKqG9v4jWUbbG(2%yG9y0_cM?x%0~u;NI_o2G&V#4;;2=p94R`AX&bi|0a1C>FY%3#)L}BZW&cAE? zCpGU2whj|TNp0`MX!kp-F`--UT}DWc!6KuACkbPk-Quv$1GxGmACVCn-p>Q$-25Hp zPxKQQ?{JOq{;+E#Qd>%8Zf+4F@nEbl#Qh81UcGe{X2qC@!Nvn4KH;(lUC@%!(`_h4 zMA}gG>IK-2mzy6#1>5{_ipoTj>1b7M6S$Zk7l~cN%KCMuwFNoPP`Xz;l{-jtMlT@_ zvFuP3Pv@`a4;Z{yqAOWKe+16vUqMQoxqdcX55HXRq&6s>J)M?mb+hxSG*+YCW4Vda zF75R>dnwJ+ZZ7De#=D$^c$2s{0xztg*FsIvlXN?rFUl=nw+OjZYbliVmG~8mWwx~# zuDjizj3aukUhpBE0k#{ys&BAkY^!mlC$&8+ z5wf$@m_`XnZ7)bF#DGd@A1dXe4r{ER;npP7+MFcDgx??N?e>P9BiJY0Q9QG(KN1>3 z(y2`Y;sm`mLHLB>NUJa$zG@H|Wc@ifRO~R%5=`5zyg$ajtP3rze&fiUu;> zZirT7JHaI$e-eguGvrb-Uu9nwT%IPSBz# zUj0fTA#1t~S@=8-;^U#)euC$mGw8GMma|-%dl4=ijimBjF?t4@+ry~%7rzIgglHqhN7d$7=Jg)zB-mdUaiw! zXf&qMt#Ei_F3p6q8=t4|YWJ!es1)6#^=~Sg2vMo&=+@)abKEK;8&Sj$|5x!p@tbbC gs@LGROZ(>V$@KIB1Q!P|@oT=HktXffi510v0gQ=V1^@s6 From 9c20e5e7816e7e2f1a132fe8a7458745355141b1 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 26 Dec 2004 23:07:48 +0000 Subject: [PATCH 1019/8469] After discussion on the PythonMac-SIG it was decided that it is better to make using "-undefined dynamic_lookup" for linking extensions more automatic on 10.3 and later. So if we're on that platform and MACOSX_DEPLOYMENT_TARGET is not set we now set it to the current OSX version during configure. Additionally, distutils will pick up the configure-time value by default. Will backport. --- sysconfig.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 8986dc9857..d4eb368e9f 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -360,11 +360,13 @@ def _init_posix(): # On MacOSX we need to check the setting of the environment variable # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. - # An alternative would be to force MACOSX_DEPLOYMENT_TARGET to be - # the same as during configure. + # If it isn't set we set it to the configure-time value if sys.platform == 'darwin' and g.has_key('CONFIGURE_MACOSX_DEPLOYMENT_TARGET'): cfg_target = g['CONFIGURE_MACOSX_DEPLOYMENT_TARGET'] cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') + if cur_target == '': + cur_target = cfg_target + os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) if cfg_target != cur_target: my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) From 4cca0bf734f15ffd714bcb39f781c6e3d768312f Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 20 Jan 2005 19:14:17 +0000 Subject: [PATCH 1020/8469] Fix [ 1103844 ] fix distutils.install.dump_dirs() with negated options. Will backport myself. --- command/install.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/install.py b/command/install.py index fdbec35872..7723761117 100644 --- a/command/install.py +++ b/command/install.py @@ -352,8 +352,13 @@ def dump_dirs (self, msg): opt_name = opt[0] if opt_name[-1] == "=": opt_name = opt_name[0:-1] - opt_name = string.translate(opt_name, longopt_xlate) - val = getattr(self, opt_name) + if self.negative_opt.has_key(opt_name): + opt_name = string.translate(self.negative_opt[opt_name], + longopt_xlate) + val = not getattr(self, opt_name) + else: + opt_name = string.translate(opt_name, longopt_xlate) + val = getattr(self, opt_name) print " %s: %s" % (opt_name, val) From 3145cad407f875f453bb252f7aea93597c6e6777 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Thu, 3 Feb 2005 20:48:26 +0000 Subject: [PATCH 1021/8469] Recompiled after source changes. --- command/wininst-6.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.exe b/command/wininst-6.exe index 6ee282353046c2c28240398af0611d81a1fd5dd6..bd715250e780b37e94996e33820070987bcc77fd 100644 GIT binary patch delta 15247 zcmeHue|%HNmG4LvAc%G~F3Hj@%|c;YlG1%{OcFOxFtNd~n@=AJ0o;U7p1b9xm&)xriI*z74)=Y} zTp63B+iu_I^Zt6ze2(VM%$YN1X3noU_Y&$!3H7AxnQ!QOp>R>~cu&d&t!ZO;5F$UQ z3MWu+_`%xnmnbK_vVoV>PwiS$O?WfPAH1?N+>i3#V-JSEKso7^XTqPMeEhrL3g1Mz ze8XCi#;~va2`EcIp{ryuo9<`ikN=eABqn z_`+RNlpcfGDEO4$8SWXgHMA((tzGzCIPN+8o*6eAzrP=sV=OCIW{l6M zYH_ld>zw~nA-d`VwLgb3xiKT$nbF)Xr8aBQHw1AHFyd1Q$0Vp74>IN}IO~%ppmVGs zHlWjQ(yoL%Qyn*eBdCVQ8F=tX_vr}hT9p0cGmJ-9C~uFyFy}KjW3lG$o0=x5J$S~j z(1{UOP+uuc&^yEykQCGtZspAh4r>fZg6!(k0{vQ!W-C>`n6Sinzgu}C?WG6yEoV%t zH$`0ogCs*}v7D-$BD)6Uvi_8F+1+|iv}{07H!N2ywn@_k;3Vg~AIrFH()*SxMYf7y z%#|vL$6B3C3#4kc-fk!HiG4M$>OhM>MXgU^Ow8;Af=$(XS9O%jy?xi3Dt75AmOy`XSM| zcG<~%zIcH{J8AzJ8Uh2_Lz->gx6w*Rb#M5r`SGTk61p0GqXkwEi0|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9zilC@hm%968)Ud_@Hu?QG+vVo=LvrUSVH$)E)PP9b zB34()OU~4_?Wh%|+);>ge;I&+{0w|;fMfs%7(me03piibHnHJ13xaI|!Uh2SAm&%g z;7uz5BlUwQznrKuWa8J!BV)BW*k5UoqkkN(5ynsoTus7R5OpeyCEcyJQwB;A|PuJCuN7}rcbL+8_^Q)hDP^{Xz z9{)dZIhPB}woS!Vb#;|bR4wPYyTGZssC@w6}Cc z+bcJ%4AjRt9UzwRyC)SGF!TPX%GgQfOAM3YPR#$I-oa4Ty-~2fB z$APQgtm%VWsjJws{V|SvS-*KZILY5^{nD*J&~M&c9jFsH?x)0q;mcZQEt*KYAKwaR zF`Y`aj|;WjLVd+kb=wlmxTK`Iy2mTGZRX^UTeBv2>$lX^)l@!S)mHqvHw?1n$l+iQoGCff&cyd*;(HX|R=|NoeZ)Hv{cZr! z)A#SuQ@@!25wuhB-GuKPeAnYUn?r<@iGl@)RD4tLHQ+l5-@#fZHw)h@_~K;Y&f}Ym zZw%iffZSPHrVuD@AL{qd9IH2@zG=3TGf*RbcA)-T?pXUK)Q_^dNh2r)!a7^-dc77m XbL~ghw)T_P=zpW$)^<1W- From 21599f63453eaf27fb5819a7d7706cb23720f323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Mar 2005 08:12:27 +0000 Subject: [PATCH 1022/8469] Patch #1104111: Alter setup.py --help and --help-commands. --- command/clean.py | 2 +- dist.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/command/clean.py b/command/clean.py index 1844ffefd3..02189c531a 100644 --- a/command/clean.py +++ b/command/clean.py @@ -15,7 +15,7 @@ class clean (Command): - description = "clean up output of 'build' command" + description = "clean up temporary files from 'build' command" user_options = [ ('build-base=', 'b', "base build directory (default: 'build.build-base')"), diff --git a/dist.py b/dist.py index 9eb2aa424c..4f4bae5218 100644 --- a/dist.py +++ b/dist.py @@ -59,6 +59,15 @@ class Distribution: ('help', 'h', "show detailed help message"), ] + # 'common_usage' is a short (2-3 line) string describing the common + # usage of the setup script. + common_usage = """\ +Common commands: (see '--help-commands' for more) + + setup.py build will build the package underneath 'build/' + setup.py install will install the package +""" + # options that are not propagated to the commands display_options = [ ('help-commands', None, @@ -608,7 +617,7 @@ def _show_help (self, else: options = self.global_options parser.set_option_table(options) - parser.print_help("Global options:") + parser.print_help(self.common_usage + "\nGlobal options:") print if display_options: From b60285cfd0da94171ac6ab69812e9213c9826d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Mar 2005 11:08:03 +0000 Subject: [PATCH 1023/8469] Patch #1046831: Use get_python_version where appropriate in sysconfig.py. --- sysconfig.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d4eb368e9f..aae0f27cb5 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -34,7 +34,7 @@ del argv0_path, landmark -def get_python_version (): +def get_python_version(): """Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. @@ -65,7 +65,7 @@ def get_python_inc(plat_specific=0, prefix=None): if not os.path.exists(inc_dir): inc_dir = os.path.join(os.path.dirname(base), "Include") return inc_dir - return os.path.join(prefix, "include", "python" + sys.version[:3]) + return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": @@ -110,7 +110,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if standard_lib: return os.path.join(prefix, "Lib") else: - if sys.version < "2.2": + if get_python_version() < "2.2": return prefix else: return os.path.join(PREFIX, "Lib", "site-packages") @@ -189,7 +189,7 @@ def get_config_h_filename(): inc_dir = os.curdir else: inc_dir = get_python_inc(plat_specific=1) - if sys.version < '2.2': + if get_python_version() < '2.2': config_h = 'config.h' else: # The name of the config.h file changed in 2.2 @@ -378,7 +378,7 @@ def _init_posix(): if python_build: g['LDSHARED'] = g['BLDSHARED'] - elif sys.version < '2.1': + elif get_python_version() < '2.1': # The following two branches are for 1.5.2 compatibility. if sys.platform == 'aix4': # what about AIX 3.x ? # Linker script is in the config directory, not in Modules as the @@ -405,7 +405,7 @@ def _init_posix(): # it's taken care of for them by the 'build_ext.get_libraries()' # method.) g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, PREFIX, sys.version[0:3])) + (linkerscript, PREFIX, get_python_version())) global _config_vars _config_vars = g From 827d92b58b53f25b8e2579d6f301c51a43780687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 4 Mar 2005 13:50:17 +0000 Subject: [PATCH 1024/8469] Patch #1075887: Don't require MSVC in distutils if there is nothing to build. Will backport to 2.4 --- msvccompiler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 89a75b3486..016139321c 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -211,6 +211,9 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.__macros = MacroExpander(self.__version) else: self.__root = r"Software\Microsoft\Devstudio" + self.initialized = False + + def initialize(self): self.__paths = self.get_msvc_paths("path") if len (self.__paths) == 0: @@ -290,6 +293,7 @@ def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None): + if not self.initialized: self.initialize() macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) @@ -381,6 +385,7 @@ def create_static_lib (self, debug=0, target_lang=None): + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) @@ -414,6 +419,7 @@ def link (self, build_temp=None, target_lang=None): + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) From ec12da619b7a0be1135564e31e6a9b41d6134437 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 5 Mar 2005 05:28:45 +0000 Subject: [PATCH 1025/8469] Remove a tab so that whitespace usage is consistent. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index 016139321c..d2ea008e82 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -293,7 +293,7 @@ def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None): - if not self.initialized: self.initialize() + if not self.initialized: self.initialize() macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) From 891c7ebce5c207c73bfcf79ecd51d58ee8fab395 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 5 Mar 2005 05:32:14 +0000 Subject: [PATCH 1026/8469] Remove some more tab usage to prevent an error when run as ``python -tt``. --- msvccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index d2ea008e82..8106df6177 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -385,7 +385,7 @@ def create_static_lib (self, debug=0, target_lang=None): - if not self.initialized: self.initialize() + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) @@ -419,7 +419,7 @@ def link (self, build_temp=None, target_lang=None): - if not self.initialized: self.initialize() + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) From 8992c0187b1cbc5bf26aa8c686421d0b81e55e4c Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sat, 12 Mar 2005 19:05:58 +0000 Subject: [PATCH 1027/8469] Port bugfix from 2.4 maint. Bug #1160802: Can't build Zope on Windows w/ 2.4.1c1. MSVCCompiler.initialize(): set self.initialized to True, as suggested by AMK. Else we keep growing the PATH endlessly, with each new C extension built, until putenv() complains. No change to NEWS because the patch that created this bug is also new for 2.5a1 (so there's no change here to any code yet released from HEAD). --- msvccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/msvccompiler.py b/msvccompiler.py index 8106df6177..b94d35f15f 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -255,6 +255,7 @@ def initialize(self): ] self.ldflags_static = [ '/nologo'] + self.initialized = True # -- Worker methods ------------------------------------------------ From 5a3290c36b8087fc73356362cccb51d523b16167 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Sun, 20 Mar 2005 22:17:02 +0000 Subject: [PATCH 1028/8469] helper code, mostly from Andy Harrington, for PEP 314 completion --- tests/test_versionpredicate.py | 9 +++ versionpredicate.py | 103 +++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 tests/test_versionpredicate.py create mode 100644 versionpredicate.py diff --git a/tests/test_versionpredicate.py b/tests/test_versionpredicate.py new file mode 100644 index 0000000000..44cb41ee38 --- /dev/null +++ b/tests/test_versionpredicate.py @@ -0,0 +1,9 @@ +"""Tests harness for distutils.versionpredicate. + +""" + +import distutils.versionpredicate +import doctest + +def test_suite(): + return doctest.DocTestSuite(distutils.versionpredicate) diff --git a/versionpredicate.py b/versionpredicate.py new file mode 100644 index 0000000000..5126ebf548 --- /dev/null +++ b/versionpredicate.py @@ -0,0 +1,103 @@ +"""Module for parsing and testing package version predicate strings. +""" +import re +import version +import operator + +re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)") +# (package) (rest) + +re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses +re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$") +# (comp) (version) + +def splitUp(pred): + """Parse a single version comparison. + Return (comparison string, StrictVersion) + """ + res = re_splitComparison.match(pred) + if not res: + raise ValueError, "Bad package restriction syntax: " + pred + comp, verStr = res.groups() + return (comp, version.StrictVersion(verStr)) + +compmap = {"<": operator.lt, "<=": operator.le, "==": operator.eq, + ">": operator.gt, ">=": operator.ge, "!=": operator.ne} + +class VersionPredicate: + """Parse and test package version predicates. + + >>> v = VersionPredicate("pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)") + >>> print v + pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3) + >>> v.satisfied_by("1.1") + True + >>> v.satisfied_by("1.4") + True + >>> v.satisfied_by("1.0") + False + >>> v.satisfied_by("4444.4") + False + >>> v.satisfied_by("1555.1b3") + False + >>> v = VersionPredicate("pat( == 0.1 ) ") + >>> v.satisfied_by("0.1") + True + >>> v.satisfied_by("0.2") + False + >>> v = VersionPredicate("p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)") + Traceback (most recent call last): + ... + ValueError: invalid version number '1.2zb3' + + """ + + def __init__(self, versionPredicateStr): + """Parse a version predicate string. + """ + # Fields: + # name: package name + # pred: list of (comparison string, StrictVersion) + + versionPredicateStr = versionPredicateStr.strip() + if not versionPredicateStr: + raise ValueError, "Empty package restriction" + match = re_validPackage.match(versionPredicateStr) + if not match: + raise ValueError, "Bad package name in " + versionPredicateStr + self.name, paren = match.groups() + paren = paren.strip() + if paren: + match = re_paren.match(paren) + if not match: + raise ValueError, "Expected parenthesized list: " + paren + str = match.groups()[0] + self.pred = [splitUp(aPred) for aPred in str.split(",")] + if not self.pred: + raise ValueError("Empty Parenthesized list in %r" + % versionPredicateStr ) + else: + self.pred=[] + + def __str__(self): + if self.pred: + seq = [cond + " " + str(ver) for cond, ver in self.pred] + return self.name + " (" + ", ".join(seq) + ")" + else: + return self.name + + def satisfied_by(self, version): + """True if version is compatible with all the predicates in self. + The parameter version must be acceptable to the StrictVersion + constructor. It may be either a string or StrictVersion. + """ + for cond, ver in self.pred: + if not compmap[cond](version, ver): + return False + return True + + +def check_provision(value): + m = re.match("[a-zA-Z_]\w*(\.[a-zA-Z_]\w*)*(\s*\([^)]+\))?$", value) + if not m: + raise ValueError("illegal provides specification: %r" % value) From 1690ef36ec0968c381d0cd02c92863441416daf0 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Sun, 20 Mar 2005 22:19:47 +0000 Subject: [PATCH 1029/8469] PEP 314 implementation (client side): added support for the provides, requires, and obsoletes metadata fields --- command/register.py | 6 +++ core.py | 4 +- dist.py | 109 ++++++++++++++++++++++++++++++++++---------- tests/test_dist.py | 91 +++++++++++++++++++++++++++++++++++- 4 files changed, 185 insertions(+), 25 deletions(-) diff --git a/command/register.py b/command/register.py index 8104ce0656..6e9a8d4297 100644 --- a/command/register.py +++ b/command/register.py @@ -231,7 +231,13 @@ def build_post_data(self, action): 'platform': meta.get_platforms(), 'classifiers': meta.get_classifiers(), 'download_url': meta.get_download_url(), + # PEP 314 + 'provides': meta.get_provides(), + 'requires': meta.get_requires(), + 'obsoletes': meta.get_obsoletes(), } + if data['provides'] or data['requires'] or data['obsoletes']: + data['metadata_version'] = '1.1' return data def post_to_server(self, data, auth=None): diff --git a/core.py b/core.py index eba94559d9..c9c6f037a7 100644 --- a/core.py +++ b/core.py @@ -47,7 +47,9 @@ def gen_usage (script_name): 'name', 'version', 'author', 'author_email', 'maintainer', 'maintainer_email', 'url', 'license', 'description', 'long_description', 'keywords', - 'platforms', 'classifiers', 'download_url',) + 'platforms', 'classifiers', 'download_url', + 'requires', 'provides', 'obsoletes', + ) # Legal keyword arguments for the Extension constructor extension_keywords = ('name', 'sources', 'include_dirs', diff --git a/dist.py b/dist.py index 4f4bae5218..c5dd5cbf78 100644 --- a/dist.py +++ b/dist.py @@ -106,6 +106,12 @@ class Distribution: "print the list of classifiers"), ('keywords', None, "print the list of keywords"), + ('provides', None, + "print the list of packages/modules provided"), + ('requires', None, + "print the list of packages/modules required"), + ('obsoletes', None, + "print the list of packages/modules made obsolete") ] display_option_names = map(lambda x: translate_longopt(x[0]), display_options) @@ -210,7 +216,6 @@ def __init__ (self, attrs=None): # distribution options. if attrs: - # Pull out the set of command options and work on them # specifically. Note that this order guarantees that aliased # command options will override any supplied redundantly @@ -235,7 +240,9 @@ def __init__ (self, attrs=None): # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! for (key,val) in attrs.items(): - if hasattr(self.metadata, key): + if hasattr(self.metadata, "set_" + key): + getattr(self.metadata, "set_" + key)(val) + elif hasattr(self.metadata, key): setattr(self.metadata, key, val) elif hasattr(self, key): setattr(self, key, val) @@ -678,7 +685,8 @@ def handle_display_options (self, option_order): value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: print string.join(value, ',') - elif opt == 'classifiers': + elif opt in ('classifiers', 'provides', 'requires', + 'obsoletes'): print string.join(value, '\n') else: print value @@ -1024,7 +1032,10 @@ class DistributionMetadata: "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", "contact_email", "license", "classifiers", - "download_url") + "download_url", + # PEP 314 + "provides", "requires", "obsoletes", + ) def __init__ (self): self.name = None @@ -1041,40 +1052,58 @@ def __init__ (self): self.platforms = None self.classifiers = None self.download_url = None + # PEP 314 + self.provides = None + self.requires = None + self.obsoletes = None def write_pkg_info (self, base_dir): """Write the PKG-INFO file into the release tree. """ - pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - pkg_info.write('Metadata-Version: 1.0\n') - pkg_info.write('Name: %s\n' % self.get_name() ) - pkg_info.write('Version: %s\n' % self.get_version() ) - pkg_info.write('Summary: %s\n' % self.get_description() ) - pkg_info.write('Home-page: %s\n' % self.get_url() ) - pkg_info.write('Author: %s\n' % self.get_contact() ) - pkg_info.write('Author-email: %s\n' % self.get_contact_email() ) - pkg_info.write('License: %s\n' % self.get_license() ) + self.write_pkg_file(pkg_info) + + pkg_info.close() + + # write_pkg_info () + + def write_pkg_file (self, file): + """Write the PKG-INFO format data to a file object. + """ + version = '1.0' + if self.provides or self.requires or self.obsoletes: + version = '1.1' + + file.write('Metadata-Version: %s\n' % version) + file.write('Name: %s\n' % self.get_name() ) + file.write('Version: %s\n' % self.get_version() ) + file.write('Summary: %s\n' % self.get_description() ) + file.write('Home-page: %s\n' % self.get_url() ) + file.write('Author: %s\n' % self.get_contact() ) + file.write('Author-email: %s\n' % self.get_contact_email() ) + file.write('License: %s\n' % self.get_license() ) if self.download_url: - pkg_info.write('Download-URL: %s\n' % self.download_url) + file.write('Download-URL: %s\n' % self.download_url) long_desc = rfc822_escape( self.get_long_description() ) - pkg_info.write('Description: %s\n' % long_desc) + file.write('Description: %s\n' % long_desc) keywords = string.join( self.get_keywords(), ',') if keywords: - pkg_info.write('Keywords: %s\n' % keywords ) - - for platform in self.get_platforms(): - pkg_info.write('Platform: %s\n' % platform ) + file.write('Keywords: %s\n' % keywords ) - for classifier in self.get_classifiers(): - pkg_info.write('Classifier: %s\n' % classifier ) + self._write_list(file, 'Platform', self.get_platforms()) + self._write_list(file, 'Classifier', self.get_classifiers()) - pkg_info.close() + # PEP 314 + self._write_list(file, 'Requires', self.get_requires()) + self._write_list(file, 'Provides', self.get_provides()) + self._write_list(file, 'Obsoletes', self.get_obsoletes()) - # write_pkg_info () + def _write_list (self, file, name, values): + for value in values: + file.write('%s: %s\n' % (name, value)) # -- Metadata query methods ---------------------------------------- @@ -1134,6 +1163,40 @@ def get_classifiers(self): def get_download_url(self): return self.download_url or "UNKNOWN" + # PEP 314 + + def get_requires(self): + return self.requires or [] + + def set_requires(self, value): + import distutils.versionpredicate + for v in value: + distutils.versionpredicate.VersionPredicate(v) + self.requires = value + + def get_provides(self): + return self.provides or [] + + def set_provides(self, value): + value = [v.strip() for v in value] + for v in value: + import distutils.versionpredicate + ver = distutils.versionpredicate.check_provision(v) + if ver: + import distutils.version + sv = distutils.version.StrictVersion() + sv.parse(ver.strip()[1:-1]) + self.provides = value + + def get_obsoletes(self): + return self.obsoletes or [] + + def set_obsoletes(self, value): + import distutils.versionpredicate + for v in value: + distutils.versionpredicate.VersionPredicate(v) + self.obsoletes = value + # class DistributionMetadata diff --git a/tests/test_dist.py b/tests/test_dist.py index 695f6d8192..7675fbfa93 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -4,6 +4,7 @@ import distutils.dist import os import shutil +import StringIO import sys import tempfile import unittest @@ -96,5 +97,93 @@ def test_command_packages_configfile(self): os.unlink(TESTFN) +class MetadataTestCase(unittest.TestCase): + + def test_simple_metadata(self): + attrs = {"name": "package", + "version": "1.0"} + dist = distutils.dist.Distribution(attrs) + meta = self.format_metadata(dist) + self.assert_("Metadata-Version: 1.0" in meta) + self.assert_("provides:" not in meta.lower()) + self.assert_("requires:" not in meta.lower()) + self.assert_("obsoletes:" not in meta.lower()) + + def test_provides(self): + attrs = {"name": "package", + "version": "1.0", + "provides": ["package", "package.sub"]} + dist = distutils.dist.Distribution(attrs) + self.assertEqual(dist.metadata.get_provides(), + ["package", "package.sub"]) + self.assertEqual(dist.get_provides(), + ["package", "package.sub"]) + meta = self.format_metadata(dist) + self.assert_("Metadata-Version: 1.1" in meta) + self.assert_("requires:" not in meta.lower()) + self.assert_("obsoletes:" not in meta.lower()) + + def test_provides_illegal(self): + self.assertRaises(ValueError, + distutils.dist.Distribution, + {"name": "package", + "version": "1.0", + "provides": ["my.pkg (splat)"]}) + + def test_requires(self): + attrs = {"name": "package", + "version": "1.0", + "requires": ["other", "another (==1.0)"]} + dist = distutils.dist.Distribution(attrs) + self.assertEqual(dist.metadata.get_requires(), + ["other", "another (==1.0)"]) + self.assertEqual(dist.get_requires(), + ["other", "another (==1.0)"]) + meta = self.format_metadata(dist) + self.assert_("Metadata-Version: 1.1" in meta) + self.assert_("provides:" not in meta.lower()) + self.assert_("Requires: other" in meta) + self.assert_("Requires: another (==1.0)" in meta) + self.assert_("obsoletes:" not in meta.lower()) + + def test_requires_illegal(self): + self.assertRaises(ValueError, + distutils.dist.Distribution, + {"name": "package", + "version": "1.0", + "requires": ["my.pkg (splat)"]}) + + def test_obsoletes(self): + attrs = {"name": "package", + "version": "1.0", + "obsoletes": ["other", "another (<1.0)"]} + dist = distutils.dist.Distribution(attrs) + self.assertEqual(dist.metadata.get_obsoletes(), + ["other", "another (<1.0)"]) + self.assertEqual(dist.get_obsoletes(), + ["other", "another (<1.0)"]) + meta = self.format_metadata(dist) + self.assert_("Metadata-Version: 1.1" in meta) + self.assert_("provides:" not in meta.lower()) + self.assert_("requires:" not in meta.lower()) + self.assert_("Obsoletes: other" in meta) + self.assert_("Obsoletes: another (<1.0)" in meta) + + def test_obsoletes_illegal(self): + self.assertRaises(ValueError, + distutils.dist.Distribution, + {"name": "package", + "version": "1.0", + "obsoletes": ["my.pkg (splat)"]}) + + def format_metadata(self, dist): + sio = StringIO.StringIO() + dist.metadata.write_pkg_file(sio) + return sio.getvalue() + + def test_suite(): - return unittest.makeSuite(DistributionTestCase) + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(DistributionTestCase)) + suite.addTest(unittest.makeSuite(MetadataTestCase)) + return suite From b9835f36c86e8b46e92de5b8c6fcd88525bcac21 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 21 Mar 2005 06:36:32 +0000 Subject: [PATCH 1030/8469] - rename check_provision() to split_revision() - fix indentation to conform to the Python style guide - add more tests and documentation --- dist.py | 6 +- versionpredicate.py | 227 ++++++++++++++++++++++++++++---------------- 2 files changed, 145 insertions(+), 88 deletions(-) diff --git a/dist.py b/dist.py index c5dd5cbf78..f015874bc4 100644 --- a/dist.py +++ b/dist.py @@ -1181,11 +1181,7 @@ def set_provides(self, value): value = [v.strip() for v in value] for v in value: import distutils.versionpredicate - ver = distutils.versionpredicate.check_provision(v) - if ver: - import distutils.version - sv = distutils.version.StrictVersion() - sv.parse(ver.strip()[1:-1]) + distutils.versionpredicate.split_provision(v) self.provides = value def get_obsoletes(self): diff --git a/versionpredicate.py b/versionpredicate.py index 5126ebf548..8922b137fd 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -1,9 +1,10 @@ """Module for parsing and testing package version predicate strings. """ import re -import version +import distutils.version import operator + re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)") # (package) (rest) @@ -11,93 +12,153 @@ re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$") # (comp) (version) + def splitUp(pred): - """Parse a single version comparison. - Return (comparison string, StrictVersion) - """ - res = re_splitComparison.match(pred) - if not res: - raise ValueError, "Bad package restriction syntax: " + pred - comp, verStr = res.groups() - return (comp, version.StrictVersion(verStr)) + """Parse a single version comparison. + + Return (comparison string, StrictVersion) + """ + res = re_splitComparison.match(pred) + if not res: + raise ValueError("bad package restriction syntax: %r" % pred) + comp, verStr = res.groups() + return (comp, distutils.version.StrictVersion(verStr)) compmap = {"<": operator.lt, "<=": operator.le, "==": operator.eq, ">": operator.gt, ">=": operator.ge, "!=": operator.ne} class VersionPredicate: - """Parse and test package version predicates. - - >>> v = VersionPredicate("pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)") - >>> print v - pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3) - >>> v.satisfied_by("1.1") - True - >>> v.satisfied_by("1.4") - True - >>> v.satisfied_by("1.0") - False - >>> v.satisfied_by("4444.4") - False - >>> v.satisfied_by("1555.1b3") - False - >>> v = VersionPredicate("pat( == 0.1 ) ") - >>> v.satisfied_by("0.1") - True - >>> v.satisfied_by("0.2") - False - >>> v = VersionPredicate("p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)") - Traceback (most recent call last): - ... - ValueError: invalid version number '1.2zb3' - - """ - - def __init__(self, versionPredicateStr): - """Parse a version predicate string. - """ - # Fields: - # name: package name - # pred: list of (comparison string, StrictVersion) - - versionPredicateStr = versionPredicateStr.strip() - if not versionPredicateStr: - raise ValueError, "Empty package restriction" - match = re_validPackage.match(versionPredicateStr) - if not match: - raise ValueError, "Bad package name in " + versionPredicateStr - self.name, paren = match.groups() - paren = paren.strip() - if paren: - match = re_paren.match(paren) - if not match: - raise ValueError, "Expected parenthesized list: " + paren - str = match.groups()[0] - self.pred = [splitUp(aPred) for aPred in str.split(",")] - if not self.pred: - raise ValueError("Empty Parenthesized list in %r" - % versionPredicateStr ) - else: - self.pred=[] - - def __str__(self): - if self.pred: - seq = [cond + " " + str(ver) for cond, ver in self.pred] - return self.name + " (" + ", ".join(seq) + ")" - else: - return self.name - - def satisfied_by(self, version): - """True if version is compatible with all the predicates in self. - The parameter version must be acceptable to the StrictVersion - constructor. It may be either a string or StrictVersion. - """ - for cond, ver in self.pred: - if not compmap[cond](version, ver): - return False - return True - - -def check_provision(value): - m = re.match("[a-zA-Z_]\w*(\.[a-zA-Z_]\w*)*(\s*\([^)]+\))?$", value) + """Parse and test package version predicates. + + >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)') + + The `name` attribute provides the full dotted name that is given:: + + >>> v.name + 'pyepat.abc' + + The str() of a `VersionPredicate` provides a normalized + human-readable version of the expression:: + + >>> print v + pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3) + + The `satisfied_by()` method can be used to determine with a given + version number is included in the set described by the version + restrictions:: + + >>> v.satisfied_by('1.1') + True + >>> v.satisfied_by('1.4') + True + >>> v.satisfied_by('1.0') + False + >>> v.satisfied_by('4444.4') + False + >>> v.satisfied_by('1555.1b3') + False + + `VersionPredicate` is flexible in accepting extra whitespace:: + + >>> v = VersionPredicate(' pat( == 0.1 ) ') + >>> v.name + 'pat' + >>> v.satisfied_by('0.1') + True + >>> v.satisfied_by('0.2') + False + + If any version numbers passed in do not conform to the + restrictions of `StrictVersion`, a `ValueError` is raised:: + + >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)') + Traceback (most recent call last): + ... + ValueError: invalid version number '1.2zb3' + + It the module or package name given does not conform to what's + allowed as a legal module or package name, `ValueError` is + raised:: + + >>> v = VersionPredicate('foo-bar') + Traceback (most recent call last): + ... + ValueError: expected parenthesized list: '-bar' + + >>> v = VersionPredicate('foo bar (12.21)') + Traceback (most recent call last): + ... + ValueError: expected parenthesized list: 'bar (12.21)' + + """ + + def __init__(self, versionPredicateStr): + """Parse a version predicate string. + """ + # Fields: + # name: package name + # pred: list of (comparison string, StrictVersion) + + versionPredicateStr = versionPredicateStr.strip() + if not versionPredicateStr: + raise ValueError("empty package restriction") + match = re_validPackage.match(versionPredicateStr) + if not match: + raise ValueError("bad package name in %r" % versionPredicateStr) + self.name, paren = match.groups() + paren = paren.strip() + if paren: + match = re_paren.match(paren) + if not match: + raise ValueError("expected parenthesized list: %r" % paren) + str = match.groups()[0] + self.pred = [splitUp(aPred) for aPred in str.split(",")] + if not self.pred: + raise ValueError("empty parenthesized list in %r" + % versionPredicateStr) + else: + self.pred=[] + + def __str__(self): + if self.pred: + seq = [cond + " " + str(ver) for cond, ver in self.pred] + return self.name + " (" + ", ".join(seq) + ")" + else: + return self.name + + def satisfied_by(self, version): + """True if version is compatible with all the predicates in self. + The parameter version must be acceptable to the StrictVersion + constructor. It may be either a string or StrictVersion. + """ + for cond, ver in self.pred: + if not compmap[cond](version, ver): + return False + return True + + +_provision_rx = None + +def split_provision(value): + """Return the name and optional version number of a provision. + + The version number, if given, will be returned as a `StrictVersion` + instance, otherwise it will be `None`. + + >>> split_provision('mypkg') + ('mypkg', None) + >>> split_provision(' mypkg( 1.2 ) ') + ('mypkg', StrictVersion ('1.2')) + """ + global _provision_rx + if _provision_rx is None: + _provision_rx = re.compile( + "([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$") + value = value.strip() + m = _provision_rx.match(value) if not m: raise ValueError("illegal provides specification: %r" % value) + ver = m.group(2) or None + if ver: + ver = distutils.version.StrictVersion(ver) + return m.group(1), ver From 8bd5d36635206ea66de6ec7389408175ea9dea89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 21 Mar 2005 20:56:35 +0000 Subject: [PATCH 1031/8469] Add the upload command. Make all dist commands register their outputs with the distribution object. --- command/bdist_dumb.py | 5 +++-- command/bdist_rpm.py | 3 +++ command/bdist_wininst.py | 2 ++ command/sdist.py | 1 + command/upload.py | 4 ++++ dist.py | 5 +++++ 6 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 command/upload.py diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 7f498c8396..59435516fa 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -117,8 +117,9 @@ def run (self): ensure_relative(install.install_base)) # Make the archive - self.make_archive(pseudoinstall_root, - self.format, root_dir=archive_root) + filename = self.make_archive(pseudoinstall_root, + self.format, root_dir=archive_root) + self.distribution.dist_files.append(('bdist_dumb', filename)) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 8eaaff3246..09bfa43fd0 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -297,12 +297,14 @@ def run (self): # Make a source distribution and copy to SOURCES directory with # optional icon. + saved_dist_files = self.distributuion.dist_files[:] sdist = self.reinitialize_command('sdist') if self.use_bzip2: sdist.formats = ['bztar'] else: sdist.formats = ['gztar'] self.run_command('sdist') + self.distribution.dist_files = saved_dist_files source = sdist.get_archive_files()[0] source_dir = rpm_dir['SOURCES'] @@ -355,6 +357,7 @@ def run (self): assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms self.move_file(rpms[0], self.dist_dir) + self.distribution.dist_files.append(('bdist_rpm', rpms[0])) if debuginfo: self.move_file(debuginfo[0], self.dist_dir) # run() diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 9b45cf35e8..a0335feec7 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -162,6 +162,8 @@ def run (self): root_dir=self.bdist_dir) # create an exe containing the zip-file self.create_exe(arcname, fullname, self.bitmap) + self.distribution.dist_files.append(('bdist_wininst', + self.get_installer_filename())) # remove the zip-file again log.debug("removing temporary file '%s'", arcname) os.remove(arcname) diff --git a/command/sdist.py b/command/sdist.py index fe6c913913..8b88f22f83 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -449,6 +449,7 @@ def make_distribution (self): for fmt in self.formats: file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) + self.distribution.dist_files.append(('sdist',file)) self.archive_files = archive_files diff --git a/command/upload.py b/command/upload.py new file mode 100644 index 0000000000..d14f177697 --- /dev/null +++ b/command/upload.py @@ -0,0 +1,4 @@ +"""distutils.command.upload + +Implements the Distutils 'upload' subcommand (upload package to PyPI).""" + diff --git a/dist.py b/dist.py index f015874bc4..c7ec3830fa 100644 --- a/dist.py +++ b/dist.py @@ -177,6 +177,11 @@ def __init__ (self, attrs=None): # command_options = { command_name : { option : (source, value) } } self.command_options = {} + # 'dist_files' is the list of (command, file) that have been created + # by any dist commands run so far. This is filled regardless + # of whether the run is dry or not. + self.dist_files = [] + # These options are really the business of various commands, rather # than of the Distribution itself. We provide aliases for them in # Distribution as a convenience to the developer. From b793563cf2adb97f0fc84300d8e9f550125c22b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 21 Mar 2005 21:00:59 +0000 Subject: [PATCH 1032/8469] Actually add the implementation of the command. --- command/upload.py | 150 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/command/upload.py b/command/upload.py index d14f177697..aea2e4b9c4 100644 --- a/command/upload.py +++ b/command/upload.py @@ -2,3 +2,153 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" +from distutils.errors import * +from distutils.core import Command +from md5 import md5 +from distutils.sysconfig import get_python_version +from distutils import log +import os +import platform +import ConfigParser +import httplib +import base64 +import urlparse +import cStringIO as StringIO + +class upload(Command): + + description = "upload binary package to PyPI" + + DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]" % DEFAULT_REPOSITORY), + ('show-response', None, + 'display full response text from server'), + ] + boolean_options = ['show-response'] + + def initialize_options(self): + self.username = '' + self.password = '' + self.repository = '' + self.show_response = 0 + + def finalize_options(self): + if os.environ.has_key('HOME'): + rc = os.path.join(os.environ['HOME'], '.pypirc') + if os.path.exists(rc): + self.announce('Using PyPI login from %s' % rc) + config = ConfigParser.ConfigParser({ + 'username':'', + 'password':'', + 'repository':''}) + config.read(rc) + if not self.repository: + self.repository = config.get('server-login', 'repository') + if not self.username: + self.username = config.get('server-login', 'username') + if not self.password: + self.password = config.get('server-login', 'password') + if not self.repository: + self.repository = self.DEFAULT_REPOSITORY + + def run(self): + if not self.distribution.dist_files: + raise DistutilsOptionError("No dist file created in earlier command") + for command, filename in self.distribution.dist_files: + self.upload_file(command, filename) + + def upload_file(self, command, filename): + + # Fill in the data + content = open(filename).read() + data = { + ':action':'file_upload', + 'name':self.distribution.get_name(), + 'version':self.distribution.get_version(), + 'content':(os.path.basename(filename),content), + 'filetype':command, + 'pyversion':get_python_version(), + 'md5_digest':md5(content).hexdigest(), + } + comment = '' + if command == 'bdist_rpm': + dist, version, id = platform.dist() + if dist: + comment = 'built for %s %s' % (dist, version) + elif command == 'bdist_dumb': + comment = 'built for %s' % platform.platform(terse=1) + data['comment'] = comment + + # set up the authentication + auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() + + # Build up the MIME payload for the POST data + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = '\n--' + boundary + end_boundary = sep_boundary + '--' + body = StringIO.StringIO() + for key, value in data.items(): + # handle multiple entries for the same name + if type(value) != type([]): + value = [value] + for value in value: + if type(value) is tuple: + fn = ';filename="%s"' % value[0] + value = value[1] + else: + fn = "" + value = str(value) + body.write(sep_boundary) + body.write('\nContent-Disposition: form-data; name="%s"'%key) + body.write(fn) + body.write("\n\n") + body.write(value) + if value and value[-1] == '\r': + body.write('\n') # write an extra newline (lurve Macs) + body.write(end_boundary) + body.write("\n") + body = body.getvalue() + + self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) + + # build the Request + # We can't use urllib2 since we need to send the Basic + # auth right with the first request + schema, netloc, url, params, query, fragments = \ + urlparse.urlparse(self.repository) + assert not params and not query and not fragments + if schema == 'http': + http = httplib.HTTPConnection(netloc) + elif schema == 'https': + http = httplib.HTTPSConnection(netloc) + else: + raise AssertionError, "unsupported schema "+schema + + data = '' + loglevel = log.INFO + try: + http.connect() + http.putrequest("POST", url) + http.putheader('Content-type', + 'multipart/form-data; boundary=%s'%boundary) + http.putheader('Content-length', str(len(body))) + http.putheader('Authorization', auth) + http.endheaders() + http.send(body) + except socket.error, e: + self.announce(e.msg, log.ERROR) + return + + r = http.getresponse() + if r.status == 200: + self.announce('Server response (%s): %s' % (r.status, r.reason), + log.INFO) + else: + self.announce('Upload failed (%s): %s' % (r.status, r.reason), + log.INFO) + if self.show_response: + print '-'*75, r.read(), '-'*75 + From a2e09746ac9aee2d9002e43e37fd3b8c71379e9f Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 22 Mar 2005 05:43:18 +0000 Subject: [PATCH 1033/8469] fix Python style guide conformance --- versionpredicate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionpredicate.py b/versionpredicate.py index 8922b137fd..62d89f8b00 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -117,7 +117,7 @@ def __init__(self, versionPredicateStr): raise ValueError("empty parenthesized list in %r" % versionPredicateStr) else: - self.pred=[] + self.pred = [] def __str__(self): if self.pred: From ae0315024ea6c6e2a36267ec78988ab4cc8d8047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 22 Mar 2005 15:51:14 +0000 Subject: [PATCH 1034/8469] Upload GPG signature. --- command/upload.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index aea2e4b9c4..ad0e230462 100644 --- a/command/upload.py +++ b/command/upload.py @@ -4,9 +4,10 @@ from distutils.errors import * from distutils.core import Command -from md5 import md5 from distutils.sysconfig import get_python_version +from distutils.spawn import spawn from distutils import log +from md5 import md5 import os import platform import ConfigParser @@ -26,14 +27,17 @@ class upload(Command): "url of repository [default: %s]" % DEFAULT_REPOSITORY), ('show-response', None, 'display full response text from server'), + ('sign', 's', + 'sign files to upload using gpg'), ] - boolean_options = ['show-response'] + boolean_options = ['show-response', 'sign'] def initialize_options(self): self.username = '' self.password = '' self.repository = '' self.show_response = 0 + self.sign = False def finalize_options(self): if os.environ.has_key('HOME'): @@ -61,11 +65,16 @@ def run(self): self.upload_file(command, filename) def upload_file(self, command, filename): + # Sign if requested + if self.sign: + spawn(("gpg", "--sign", "-a", filename), + dry_run=self.dry_run) # Fill in the data content = open(filename).read() data = { ':action':'file_upload', + 'protcol_version':'1', 'name':self.distribution.get_name(), 'version':self.distribution.get_version(), 'content':(os.path.basename(filename),content), @@ -82,6 +91,10 @@ def upload_file(self, command, filename): comment = 'built for %s' % platform.platform(terse=1) data['comment'] = comment + if self.sign: + data['gpg_signature'] = (os.path.basename(filename) + ".asc", + open(filename+".asc").read()) + # set up the authentication auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() @@ -148,7 +161,7 @@ def upload_file(self, command, filename): log.INFO) else: self.announce('Upload failed (%s): %s' % (r.status, r.reason), - log.INFO) + log.ERROR) if self.show_response: print '-'*75, r.read(), '-'*75 From a383851362fc46f5c023273f1465611203271c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 22 Mar 2005 20:32:41 +0000 Subject: [PATCH 1035/8469] Don't set the Python version for sdist uploads. --- command/upload.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/upload.py b/command/upload.py index ad0e230462..a62da78a02 100644 --- a/command/upload.py +++ b/command/upload.py @@ -89,6 +89,8 @@ def upload_file(self, command, filename): comment = 'built for %s %s' % (dist, version) elif command == 'bdist_dumb': comment = 'built for %s' % platform.platform(terse=1) + elif command == 'sdist': + data['pyversion'] = '' data['comment'] = comment if self.sign: From ec9d7b79d687c8b9954d807c838993912c26499d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 22 Mar 2005 22:23:29 +0000 Subject: [PATCH 1036/8469] Fix registration of output file. --- command/bdist_wininst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index a0335feec7..5a83226b78 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -163,7 +163,7 @@ def run (self): # create an exe containing the zip-file self.create_exe(arcname, fullname, self.bitmap) self.distribution.dist_files.append(('bdist_wininst', - self.get_installer_filename())) + self.get_installer_filename(fullname))) # remove the zip-file again log.debug("removing temporary file '%s'", arcname) os.remove(arcname) From ef5d51cd28dc7219e12a42241e132ea86d371392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 22 Mar 2005 23:02:54 +0000 Subject: [PATCH 1037/8469] Make the signature detached. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index a62da78a02..6a4e3b3332 100644 --- a/command/upload.py +++ b/command/upload.py @@ -67,7 +67,7 @@ def run(self): def upload_file(self, command, filename): # Sign if requested if self.sign: - spawn(("gpg", "--sign", "-a", filename), + spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run) # Fill in the data From af6b7fae4c6a9b798e43aa544897d23b2ed013b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 23 Mar 2005 18:54:36 +0000 Subject: [PATCH 1038/8469] Make dist_files a triple, with the Python target version included, so that bdist_wininst can specify 'any'. --- command/bdist_dumb.py | 8 +++++++- command/bdist_rpm.py | 13 ++++++++++++- command/bdist_wininst.py | 6 +++++- command/sdist.py | 2 +- command/upload.py | 11 ++++------- dist.py | 12 +++++++++--- 6 files changed, 38 insertions(+), 14 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 59435516fa..ccba00955a 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -13,6 +13,7 @@ from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree, ensure_relative from distutils.errors import * +from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb (Command): @@ -119,7 +120,12 @@ def run (self): # Make the archive filename = self.make_archive(pseudoinstall_root, self.format, root_dir=archive_root) - self.distribution.dist_files.append(('bdist_dumb', filename)) + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + self.distribution.dist_files.append(('bdist_dumb', pyversion, + filename)) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 09bfa43fd0..c7b94e8133 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -15,6 +15,7 @@ from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * +from distutils.sysconfig import get_python_version from distutils import log class bdist_rpm (Command): @@ -346,6 +347,10 @@ def run (self): srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) assert len(srpms) == 1, \ "unexpected number of SRPM files found: %s" % srpms + dist_file = ('bdist_rpm', '', + os.path.join(self.dist_dir, + os.path.basename(srpms[0]))) + self.distribution.dist_files.append(dist_file) self.move_file(srpms[0], self.dist_dir) if not self.source_only: @@ -356,9 +361,15 @@ def run (self): rpms.remove(debuginfo[0]) assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms + dist_file = ('bdist_rpm', get_python_version(), + os.path.join(self.dist_dir, + os.path.basename(rpms[0]))) + self.distribution.dist_files.append(dist_file) self.move_file(rpms[0], self.dist_dir) - self.distribution.dist_files.append(('bdist_rpm', rpms[0])) if debuginfo: + dist_file = ('bdist_rpm', get_python_version(), + os.path.join(self.dist_dir, + os.path.basename(debuginfo[0]))) self.move_file(debuginfo[0], self.dist_dir) # run() diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 5a83226b78..49afca0472 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -162,7 +162,11 @@ def run (self): root_dir=self.bdist_dir) # create an exe containing the zip-file self.create_exe(arcname, fullname, self.bitmap) - self.distribution.dist_files.append(('bdist_wininst', + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + self.distribution.dist_files.append(('bdist_wininst', pyversion, self.get_installer_filename(fullname))) # remove the zip-file again log.debug("removing temporary file '%s'", arcname) diff --git a/command/sdist.py b/command/sdist.py index 8b88f22f83..3dfe6f21a7 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -449,7 +449,7 @@ def make_distribution (self): for fmt in self.formats: file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) - self.distribution.dist_files.append(('sdist',file)) + self.distribution.dist_files.append(('sdist', '', file)) self.archive_files = archive_files diff --git a/command/upload.py b/command/upload.py index 6a4e3b3332..266e9b1e87 100644 --- a/command/upload.py +++ b/command/upload.py @@ -4,7 +4,6 @@ from distutils.errors import * from distutils.core import Command -from distutils.sysconfig import get_python_version from distutils.spawn import spawn from distutils import log from md5 import md5 @@ -61,10 +60,10 @@ def finalize_options(self): def run(self): if not self.distribution.dist_files: raise DistutilsOptionError("No dist file created in earlier command") - for command, filename in self.distribution.dist_files: - self.upload_file(command, filename) + for command, pyversion, filename in self.distribution.dist_files: + self.upload_file(command, pyversion, filename) - def upload_file(self, command, filename): + def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: spawn(("gpg", "--detach-sign", "-a", filename), @@ -79,7 +78,7 @@ def upload_file(self, command, filename): 'version':self.distribution.get_version(), 'content':(os.path.basename(filename),content), 'filetype':command, - 'pyversion':get_python_version(), + 'pyversion':pyversion, 'md5_digest':md5(content).hexdigest(), } comment = '' @@ -89,8 +88,6 @@ def upload_file(self, command, filename): comment = 'built for %s %s' % (dist, version) elif command == 'bdist_dumb': comment = 'built for %s' % platform.platform(terse=1) - elif command == 'sdist': - data['pyversion'] = '' data['comment'] = comment if self.sign: diff --git a/dist.py b/dist.py index c7ec3830fa..ff49886d97 100644 --- a/dist.py +++ b/dist.py @@ -177,9 +177,15 @@ def __init__ (self, attrs=None): # command_options = { command_name : { option : (source, value) } } self.command_options = {} - # 'dist_files' is the list of (command, file) that have been created - # by any dist commands run so far. This is filled regardless - # of whether the run is dry or not. + # 'dist_files' is the list of (command, pyversion, file) that + # have been created by any dist commands run so far. This is + # filled regardless of whether the run is dry or not. pyversion + # gives sysconfig.get_python_version() if the dist file is + # specific to a Python version, 'any' if it is good for all + # Python versions on the target platform, and '' for a source + # file. pyversion should not be used to specify minimum or + # maximum required Python versions; use the metainfo for that + # instead. self.dist_files = [] # These options are really the business of various commands, rather From ae46d6954d01ffda7b4fcc5f966bcb9fc9ccb197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 23 Mar 2005 22:16:22 +0000 Subject: [PATCH 1039/8469] Make SRPMs pyversion 'any'. --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index c7b94e8133..7968d14ca7 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -347,7 +347,7 @@ def run (self): srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) assert len(srpms) == 1, \ "unexpected number of SRPM files found: %s" % srpms - dist_file = ('bdist_rpm', '', + dist_file = ('bdist_rpm', 'any', os.path.join(self.dist_dir, os.path.basename(srpms[0]))) self.distribution.dist_files.append(dist_file) From 17df9acf1e48891c158caa9db83cb972377f81b6 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 24 Mar 2005 07:00:05 +0000 Subject: [PATCH 1040/8469] minor cleanup --- command/bdist_rpm.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 7968d14ca7..98621af9fd 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -348,31 +348,30 @@ def run (self): assert len(srpms) == 1, \ "unexpected number of SRPM files found: %s" % srpms dist_file = ('bdist_rpm', 'any', - os.path.join(self.dist_dir, - os.path.basename(srpms[0]))) + self._dist_path(srpms[0])) self.distribution.dist_files.append(dist_file) self.move_file(srpms[0], self.dist_dir) if not self.source_only: rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], \ + debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*debuginfo*.rpm")) if debuginfo: rpms.remove(debuginfo[0]) assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms dist_file = ('bdist_rpm', get_python_version(), - os.path.join(self.dist_dir, - os.path.basename(rpms[0]))) + self._dist_path(rpms[0]) self.distribution.dist_files.append(dist_file) self.move_file(rpms[0], self.dist_dir) if debuginfo: dist_file = ('bdist_rpm', get_python_version(), - os.path.join(self.dist_dir, - os.path.basename(debuginfo[0]))) + self._dist_path(debuginfo[0]) self.move_file(debuginfo[0], self.dist_dir) # run() + def _dist_path(self, path): + return os.path.join(self.dist_dir, os.path.basename(path)) def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a From 5c887b6d88da0ef921b9cef12269eeb321a9275f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 24 Mar 2005 19:40:57 +0000 Subject: [PATCH 1041/8469] Add missing socket import --- command/upload.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/upload.py b/command/upload.py index 266e9b1e87..d1d5ec601a 100644 --- a/command/upload.py +++ b/command/upload.py @@ -8,6 +8,7 @@ from distutils import log from md5 import md5 import os +import socket import platform import ConfigParser import httplib From 31e173cb4da568d9a71645bfd46d416b6d0d406b Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 28 Mar 2005 01:05:48 +0000 Subject: [PATCH 1042/8469] Two lines in this file had unbalanced parentheses -- couldn't possibly work (SyntaxErrors at compile time). I slammed in what looked like the obvious fixes, but someone who understands this file should check my work. --- command/bdist_rpm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 98621af9fd..4bc00c3ac4 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -361,12 +361,12 @@ def run (self): assert len(rpms) == 1, \ "unexpected number of RPM files found: %s" % rpms dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(rpms[0]) + self._dist_path(rpms[0])) self.distribution.dist_files.append(dist_file) self.move_file(rpms[0], self.dist_dir) if debuginfo: dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(debuginfo[0]) + self._dist_path(debuginfo[0])) self.move_file(debuginfo[0], self.dist_dir) # run() From 462bfbfa899143d92476cc8b1e2e86df2b4b7432 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 28 Mar 2005 01:08:02 +0000 Subject: [PATCH 1043/8469] Whitespace normalization. --- command/upload.py | 9 ++++----- tests/test_dist.py | 2 +- tests/test_versionpredicate.py | 2 +- versionpredicate.py | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/command/upload.py b/command/upload.py index d1d5ec601a..7b08336c82 100644 --- a/command/upload.py +++ b/command/upload.py @@ -133,7 +133,7 @@ def upload_file(self, command, pyversion, filename): schema, netloc, url, params, query, fragments = \ urlparse.urlparse(self.repository) assert not params and not query and not fragments - if schema == 'http': + if schema == 'http': http = httplib.HTTPConnection(netloc) elif schema == 'https': http = httplib.HTTPSConnection(netloc) @@ -145,7 +145,7 @@ def upload_file(self, command, pyversion, filename): try: http.connect() http.putrequest("POST", url) - http.putheader('Content-type', + http.putheader('Content-type', 'multipart/form-data; boundary=%s'%boundary) http.putheader('Content-length', str(len(body))) http.putheader('Authorization', auth) @@ -157,11 +157,10 @@ def upload_file(self, command, pyversion, filename): r = http.getresponse() if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), + self.announce('Server response (%s): %s' % (r.status, r.reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), + self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: print '-'*75, r.read(), '-'*75 - diff --git a/tests/test_dist.py b/tests/test_dist.py index 7675fbfa93..4d2a7cdf1a 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -175,7 +175,7 @@ def test_obsoletes_illegal(self): {"name": "package", "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) - + def format_metadata(self, dist): sio = StringIO.StringIO() dist.metadata.write_pkg_file(sio) diff --git a/tests/test_versionpredicate.py b/tests/test_versionpredicate.py index 44cb41ee38..8a60dbe806 100644 --- a/tests/test_versionpredicate.py +++ b/tests/test_versionpredicate.py @@ -6,4 +6,4 @@ import doctest def test_suite(): - return doctest.DocTestSuite(distutils.versionpredicate) + return doctest.DocTestSuite(distutils.versionpredicate) diff --git a/versionpredicate.py b/versionpredicate.py index 62d89f8b00..ba8b6c021b 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -101,10 +101,10 @@ def __init__(self, versionPredicateStr): versionPredicateStr = versionPredicateStr.strip() if not versionPredicateStr: - raise ValueError("empty package restriction") + raise ValueError("empty package restriction") match = re_validPackage.match(versionPredicateStr) if not match: - raise ValueError("bad package name in %r" % versionPredicateStr) + raise ValueError("bad package name in %r" % versionPredicateStr) self.name, paren = match.groups() paren = paren.strip() if paren: @@ -114,7 +114,7 @@ def __init__(self, versionPredicateStr): str = match.groups()[0] self.pred = [splitUp(aPred) for aPred in str.split(",")] if not self.pred: - raise ValueError("empty parenthesized list in %r" + raise ValueError("empty parenthesized list in %r" % versionPredicateStr) else: self.pred = [] From 1ad5ca4f1e967b5623b43600007d51dc9c758d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Thu, 31 Mar 2005 13:57:38 +0000 Subject: [PATCH 1044/8469] Since PyPI only accepts UTF-8 encoded data now, make sure that the data is properly encoded and include the encoding in the Content-Type header. --- command/register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/register.py b/command/register.py index 6e9a8d4297..dec9aa2bf2 100644 --- a/command/register.py +++ b/command/register.py @@ -254,7 +254,7 @@ def post_to_server(self, data, auth=None): if type(value) != type([]): value = [value] for value in value: - value = str(value) + value = unicode(value).encode("utf-8") body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") @@ -267,7 +267,7 @@ def post_to_server(self, data, auth=None): # build the Request headers = { - 'Content-type': 'multipart/form-data; boundary=%s'%boundary, + 'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'%boundary, 'Content-length': str(len(body)) } req = urllib2.Request(self.repository, body, headers) From 7edd1145871db2e4b444114c99e326829edbbc12 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Fri, 15 Apr 2005 06:17:20 +0000 Subject: [PATCH 1045/8469] typo fix, thanks Jeremy Sanders --- command/bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 4bc00c3ac4..738e3f7269 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -298,7 +298,7 @@ def run (self): # Make a source distribution and copy to SOURCES directory with # optional icon. - saved_dist_files = self.distributuion.dist_files[:] + saved_dist_files = self.distribution.dist_files[:] sdist = self.reinitialize_command('sdist') if self.use_bzip2: sdist.formats = ['bztar'] From 1133a2e0542e3f3e82544ec98095d3799a5921cd Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 24 Apr 2005 22:26:38 +0000 Subject: [PATCH 1046/8469] Introduced EXTRA_CFLAGS as an environment variable used by the Makefile. Meant to be used for flags that change binary compatibility. Distutils was tweaked to also use the variable if used during compilation of the interpreter. --- sysconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index aae0f27cb5..1bd62097f0 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,8 +146,9 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \ - get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO') + (cc, cxx, opt, extra_cflags, basecflags, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'CXX', 'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS', + 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): cc = os.environ['CC'] @@ -171,7 +172,7 @@ def customize_compiler(compiler): opt = opt + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - cc_cmd = cc + ' ' + opt + cc_cmd = ' '.join(str(x) for x in (cc, opt, extra_cflags) if x) compiler.set_executables( preprocessor=cpp, compiler=cc_cmd, From a9aaf538b9b30a25b67802887f107ae74c35eba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 25 Apr 2005 07:14:03 +0000 Subject: [PATCH 1047/8469] Make parse_makefile fallback to environment variables if nothing is defined in the makefile. Get CFLAGS from the Makefile, instead of getting OPT, BASE_CFLAGS and EXTRA_CFLAGS individually. --- sysconfig.py | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 1bd62097f0..0be5b6b7cb 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,8 +146,8 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, extra_cflags, basecflags, ccshared, ldshared, so_ext) = \ - get_config_vars('CC', 'CXX', 'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS', + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): @@ -162,17 +162,15 @@ def customize_compiler(compiler): cpp = cc + " -E" # not always if os.environ.has_key('LDFLAGS'): ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if basecflags: - opt = basecflags + ' ' + opt if os.environ.has_key('CFLAGS'): - opt = opt + ' ' + os.environ['CFLAGS'] + cflags = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] if os.environ.has_key('CPPFLAGS'): cpp = cpp + ' ' + os.environ['CPPFLAGS'] - opt = opt + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - cc_cmd = ' '.join(str(x) for x in (cc, opt, extra_cflags) if x) + cc_cmd = cc + ' ' + cflags compiler.set_executables( preprocessor=cpp, compiler=cc_cmd, @@ -278,25 +276,20 @@ def parse_makefile(fn, g=None): m = _findvar1_rx.search(value) or _findvar2_rx.search(value) if m: n = m.group(1) + found = True if done.has_key(n): - after = value[m.end():] - value = value[:m.start()] + str(done[n]) + after - if "$" in after: - notdone[name] = value - else: - try: value = int(value) - except ValueError: - done[name] = string.strip(value) - else: - done[name] = value - del notdone[name] + item = str(done[n]) elif notdone.has_key(n): # get it on a subsequent round - pass + found = False + elif os.environ.has_key(n): + # do it like make: fall back to environment + item = os.environ[n] else: - done[n] = "" + done[n] = item = "" + if found: after = value[m.end():] - value = value[:m.start()] + after + value = value[:m.start()] + item + after if "$" in after: notdone[name] = value else: From 3b756201e5bd88f1dac1206c49864e5a286a3497 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 18 May 2005 02:18:09 +0000 Subject: [PATCH 1048/8469] Whitespace normalization. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 0be5b6b7cb..9bdbb16a8c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -147,7 +147,7 @@ def customize_compiler(compiler): """ if compiler.compiler_type == "unix": (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') if os.environ.has_key('CC'): From 7c683cbb4a9a15e15bc522c90e018c1fb5707418 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Thu, 7 Jul 2005 15:36:20 +0000 Subject: [PATCH 1049/8469] Fix "upload" command garbling and truncating files on Windows. If it's a binary file, use 'rb'! --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 7b08336c82..3b5a0fc9d9 100644 --- a/command/upload.py +++ b/command/upload.py @@ -71,7 +71,7 @@ def upload_file(self, command, pyversion, filename): dry_run=self.dry_run) # Fill in the data - content = open(filename).read() + content = open(filename,'rb').read() data = { ':action':'file_upload', 'protcol_version':'1', From 72fb0955fb8a81449d0a0924faa805fec3fa221f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 7 Aug 2005 20:51:04 +0000 Subject: [PATCH 1050/8469] Patch #827386: Support absolute source paths in msvccompiler.py. Backported to 2.4. --- msvccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index b94d35f15f..85d515b20d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -269,6 +269,8 @@ def object_filenames (self, obj_names = [] for src_name in source_filenames: (base, ext) = os.path.splitext (src_name) + base = os.path.splitdrive(base)[1] # Chop off the drive + base = base[os.path.isabs(base):] # If abs, chop off leading / if ext not in self.src_extensions: # Better to raise an exception instead of silently continuing # and later complain about sources and targets having From 1cae8e7c527625752262f72ade9f12e0dcf92214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 24 Aug 2005 14:55:22 +0000 Subject: [PATCH 1051/8469] Patch #1167716: Support Unicode filenames in mkpath. Fixes #1121494. Will backport to 2.4. --- dir_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 7f1450373b..2248b607cf 100644 --- a/dir_util.py +++ b/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if type(name) is not StringType: + if not isinstance(name, StringTypes): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) From 326aece3c808d1f4a0cec3f37fcca0d5ce4f1223 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 26 Aug 2005 15:20:46 +0000 Subject: [PATCH 1052/8469] Whitespace normalization (via reindent.py). --- dir_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 2248b607cf..43994db3ff 100644 --- a/dir_util.py +++ b/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if not isinstance(name, StringTypes): + if not isinstance(name, StringTypes): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) From 7792b51671f50059dd24fffbac70a38b487a0d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 8 Jan 2006 10:48:54 +0000 Subject: [PATCH 1053/8469] Patch #1299675: Pass metadata in upload. --- command/upload.py | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/command/upload.py b/command/upload.py index 3b5a0fc9d9..62767a348e 100644 --- a/command/upload.py +++ b/command/upload.py @@ -70,17 +70,41 @@ def upload_file(self, command, pyversion, filename): spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run) - # Fill in the data + # Fill in the data - send all the meta-data in case we need to + # register a new release content = open(filename,'rb').read() + meta = self.distribution.metadata data = { - ':action':'file_upload', - 'protcol_version':'1', - 'name':self.distribution.get_name(), - 'version':self.distribution.get_version(), - 'content':(os.path.basename(filename),content), - 'filetype':command, - 'pyversion':pyversion, - 'md5_digest':md5(content).hexdigest(), + # action + ':action': 'file_upload', + 'protcol_version': '1', + + # identify release + 'name': meta.get_name(), + 'version': meta.get_version(), + + # file content + 'content': (os.path.basename(filename),content), + 'filetype': command, + 'pyversion': pyversion, + 'md5_digest': md5(content).hexdigest(), + + # additional meta-data + 'metadata_version' : '1.0', + 'summary': meta.get_description(), + 'home_page': meta.get_url(), + 'author': meta.get_contact(), + 'author_email': meta.get_contact_email(), + 'license': meta.get_licence(), + 'description': meta.get_long_description(), + 'keywords': meta.get_keywords(), + 'platform': meta.get_platforms(), + 'classifiers': meta.get_classifiers(), + 'download_url': meta.get_download_url(), + # PEP 314 + 'provides': meta.get_provides(), + 'requires': meta.get_requires(), + 'obsoletes': meta.get_obsoletes(), } comment = '' if command == 'bdist_rpm': From 2849b2318b136f0a419cd040cc516100eef3a762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 20 Feb 2006 12:15:15 +0000 Subject: [PATCH 1054/8469] Let the SDK setup override distutils logic. --- msvccompiler.py | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index 85d515b20d..b65e5286a2 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -214,21 +214,31 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.initialized = False def initialize(self): - self.__paths = self.get_msvc_paths("path") - - if len (self.__paths) == 0: - raise DistutilsPlatformError, \ - ("Python was built with version %s of Visual Studio, " - "and extensions need to be built with the same " - "version of the compiler, but it isn't installed." % self.__version) - - self.cc = self.find_exe("cl.exe") - self.linker = self.find_exe("link.exe") - self.lib = self.find_exe("lib.exe") - self.rc = self.find_exe("rc.exe") # resource compiler - self.mc = self.find_exe("mc.exe") # message compiler - self.set_path_env_var('lib') - self.set_path_env_var('include') + self.__paths = [] + if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + # Assume that the SDK set up everything alright; don't try to be + # smarter + self.cc = "cl.exe" + self.linker = "link.exe" + self.lib = "lib.exe" + self.rc = "rc.exe" + self.mc = "mc.exe" + else: + self.__paths = self.get_msvc_paths("path") + + if len (self.__paths) == 0: + raise DistutilsPlatformError, \ + ("Python was built with version %s of Visual Studio, " + "and extensions need to be built with the same " + "version of the compiler, but it isn't installed." % self.__version) + + self.cc = self.find_exe("cl.exe") + self.linker = self.find_exe("link.exe") + self.lib = self.find_exe("lib.exe") + self.rc = self.find_exe("rc.exe") # resource compiler + self.mc = self.find_exe("mc.exe") # message compiler + self.set_path_env_var('lib') + self.set_path_env_var('include') # extend the MSVC path with the current path try: From 7a7a2802bcbe8f867b3f0bfd75949ee1a4b9fc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 20 Feb 2006 12:26:58 +0000 Subject: [PATCH 1055/8469] Detect Win64 builds. --- msvccompiler.py | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index b65e5286a2..aefcf98709 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -172,6 +172,20 @@ def get_build_version(): # else we don't know what version of the compiler this is return None +def get_build_architecture(): + """Return the processor architecture. + + Possible results are "Intel", "Itanium", or "AMD64". + """ + + prefix = " bit (" + i = string.find(sys.version, prefix) + if i == -1: + return "Intel" + j = string.find(sys.version, ")", i) + return sys.version[i+len(prefix):j] + + class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -206,11 +220,19 @@ class MSVCCompiler (CCompiler) : def __init__ (self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) self.__version = get_build_version() - if self.__version >= 7: - self.__root = r"Software\Microsoft\VisualStudio" - self.__macros = MacroExpander(self.__version) + self.__arch = get_build_architecture() + if self.__arch == "Intel": + # x86 + if self.__version >= 7: + self.__root = r"Software\Microsoft\VisualStudio" + self.__macros = MacroExpander(self.__version) + else: + self.__root = r"Software\Microsoft\Devstudio" + self.__product = "Visual Studio version %s" % self.__version else: - self.__root = r"Software\Microsoft\Devstudio" + # Win64. Assume this was built with the platform SDK + self.__product = "Microsoft SDK compiler %s" % (self.__version + 6) + self.initialized = False def initialize(self): @@ -228,9 +250,9 @@ def initialize(self): if len (self.__paths) == 0: raise DistutilsPlatformError, \ - ("Python was built with version %s of Visual Studio, " + ("Python was built with %s, " "and extensions need to be built with the same " - "version of the compiler, but it isn't installed." % self.__version) + "version of the compiler, but it isn't installed." % self.__product) self.cc = self.find_exe("cl.exe") self.linker = self.find_exe("link.exe") @@ -249,10 +271,17 @@ def initialize(self): os.environ['path'] = string.join(self.__paths, ';') self.preprocess_options = None - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , - '/DNDEBUG'] - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', - '/Z7', '/D_DEBUG'] + if self.__arch == "Intel": + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' , + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX', + '/Z7', '/D_DEBUG'] + else: + # Win64 + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', + '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] if self.__version >= 7: From a1548e541bd1b4b0e54ff449520e393bbfd00a39 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 20 Feb 2006 21:42:18 +0000 Subject: [PATCH 1056/8469] Whitespace normalization. --- msvccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index aefcf98709..f88f36526c 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -184,7 +184,7 @@ def get_build_architecture(): return "Intel" j = string.find(sys.version, ")", i) return sys.version[i+len(prefix):j] - + class MSVCCompiler (CCompiler) : @@ -232,7 +232,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): else: # Win64. Assume this was built with the platform SDK self.__product = "Microsoft SDK compiler %s" % (self.__version + 6) - + self.initialized = False def initialize(self): @@ -281,7 +281,7 @@ def initialize(self): self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , '/DNDEBUG'] self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', - '/Z7', '/D_DEBUG'] + '/Z7', '/D_DEBUG'] self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] if self.__version >= 7: From d35ccaa6b4a5e7da4b2888f5f59f3407ce34ae6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 5 Mar 2006 13:36:04 +0000 Subject: [PATCH 1057/8469] Import bdist_msi --- command/bdist_msi.py | 639 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 639 insertions(+) create mode 100644 command/bdist_msi.py diff --git a/command/bdist_msi.py b/command/bdist_msi.py new file mode 100644 index 0000000000..6c0982d49f --- /dev/null +++ b/command/bdist_msi.py @@ -0,0 +1,639 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2005 Martin v. Löwis +# Licensed to PSF under a Contributor Agreement. +# The bdist_wininst command proper +# based on bdist_wininst +""" +Implements the bdist_msi command. +""" + +import sys, os, string +from distutils.core import Command +from distutils.util import get_platform +from distutils.dir_util import remove_tree +from distutils.sysconfig import get_python_version +from distutils.version import StrictVersion +from distutils.errors import DistutilsOptionError +from distutils import log +import msilib +from msilib import schema, sequence, uisample +from msilib import Directory, Feature, Dialog, add_data + +class PyDialog(Dialog): + """Dialog class with a fixed layout: controls at the top, then a ruler, + then a list of buttons: back, next, cancel. Optionally a bitmap at the + left.""" + def __init__(self, *args, **kw): + """Dialog(database, name, x, y, w, h, attributes, title, first, + default, cancel, bitmap=true)""" + Dialog.__init__(self, *args) + ruler = self.h - 36 + bmwidth = 152*ruler/328 + #if kw.get("bitmap", True): + # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin") + self.line("BottomLine", 0, ruler, self.w, 0) + + def title(self, title): + "Set the title text of the dialog at the top." + # name, x, y, w, h, flags=Visible|Enabled|Transparent|NoPrefix, + # text, in VerdanaBold10 + self.text("Title", 15, 10, 320, 60, 0x30003, + r"{\VerdanaBold10}%s" % title) + + def back(self, title, next, name = "Back", active = 1): + """Add a back button with a given title, the tab-next button, + its name in the Control table, possibly initially disabled. + + Return the button, so that events can be associated""" + if active: + flags = 3 # Visible|Enabled + else: + flags = 1 # Visible + return self.pushbutton(name, 180, self.h-27 , 56, 17, flags, title, next) + + def cancel(self, title, next, name = "Cancel", active = 1): + """Add a cancel button with a given title, the tab-next button, + its name in the Control table, possibly initially disabled. + + Return the button, so that events can be associated""" + if active: + flags = 3 # Visible|Enabled + else: + flags = 1 # Visible + return self.pushbutton(name, 304, self.h-27, 56, 17, flags, title, next) + + def next(self, title, next, name = "Next", active = 1): + """Add a Next button with a given title, the tab-next button, + its name in the Control table, possibly initially disabled. + + Return the button, so that events can be associated""" + if active: + flags = 3 # Visible|Enabled + else: + flags = 1 # Visible + return self.pushbutton(name, 236, self.h-27, 56, 17, flags, title, next) + + def xbutton(self, name, title, next, xpos): + """Add a button with a given title, the tab-next button, + its name in the Control table, giving its x position; the + y-position is aligned with the other buttons. + + Return the button, so that events can be associated""" + return self.pushbutton(name, int(self.w*xpos - 28), self.h-27, 56, 17, 3, title, next) + +class bdist_msi (Command): + + description = "create a Microsoft Installer (.msi) binary distribution" + + user_options = [('bdist-dir=', None, + "temporary directory for creating the distribution"), + ('keep-temp', 'k', + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), + ('target-version=', None, + "require a specific python version" + + " on the target system"), + ('no-target-compile', 'c', + "do not compile .py to .pyc on the target system"), + ('no-target-optimize', 'o', + "do not compile .py to .pyo (optimized)" + "on the target system"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), + ('install-script=', None, + "basename of installation script to be run after" + "installation or before deinstallation"), + ('pre-install-script=', None, + "Fully qualified filename of a script to be run before " + "any files are installed. This script need not be in the " + "distribution"), + ] + + boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', + 'skip-build'] + + def initialize_options (self): + self.bdist_dir = None + self.keep_temp = 0 + self.no_target_compile = 0 + self.no_target_optimize = 0 + self.target_version = None + self.dist_dir = None + self.skip_build = 0 + self.install_script = None + self.pre_install_script = None + + def finalize_options (self): + if self.bdist_dir is None: + bdist_base = self.get_finalized_command('bdist').bdist_base + self.bdist_dir = os.path.join(bdist_base, 'msi') + short_version = get_python_version() + if self.target_version: + if not self.skip_build and self.distribution.has_ext_modules()\ + and self.target_version != short_version: + raise DistutilsOptionError, \ + "target version can only be %s, or the '--skip_build'" \ + " option must be specified" % (short_version,) + else: + self.target_version = short_version + + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + + if self.pre_install_script: + raise DistutilsOptionError, "the pre-install-script feature is not yet implemented" + + if self.install_script: + for script in self.distribution.scripts: + if self.install_script == os.path.basename(script): + break + else: + raise DistutilsOptionError, \ + "install_script '%s' not found in scripts" % \ + self.install_script + self.install_script_key = None + # finalize_options() + + + def run (self): + if not self.skip_build: + self.run_command('build') + + install = self.reinitialize_command('install', reinit_subcommands=1) + install.prefix = self.bdist_dir + install.skip_build = self.skip_build + install.warn_dir = 0 + + install_lib = self.reinitialize_command('install_lib') + # we do not want to include pyc or pyo files + install_lib.compile = 0 + install_lib.optimize = 0 + + if self.distribution.has_ext_modules(): + # If we are building an installer for a Python version other + # than the one we are currently running, then we need to ensure + # our build_lib reflects the other Python version rather than ours. + # Note that for target_version!=sys.version, we must have skipped the + # build step, so there is no issue with enforcing the build of this + # version. + target_version = self.target_version + if not target_version: + assert self.skip_build, "Should have already checked this" + target_version = sys.version[0:3] + plat_specifier = ".%s-%s" % (get_platform(), target_version) + build = self.get_finalized_command('build') + build.build_lib = os.path.join(build.build_base, + 'lib' + plat_specifier) + + log.info("installing to %s", self.bdist_dir) + install.ensure_finalized() + + # avoid warning of 'install_lib' about installing + # into a directory not in sys.path + sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB')) + + install.run() + + del sys.path[0] + + self.mkpath(self.dist_dir) + fullname = self.distribution.get_fullname() + installer_name = self.get_installer_filename(fullname) + installer_name = os.path.abspath(installer_name) + if os.path.exists(installer_name): os.unlink(installer_name) + + metadata = self.distribution.metadata + author = metadata.author + if not author: + author = metadata.maintainer + if not author: + author = "UNKNOWN" + version = metadata.get_version() + # ProductVersion must be strictly numeric + # XXX need to deal with prerelease versions + sversion = "%d.%d.%d" % StrictVersion(version).version + # Prefix ProductName with Python x.y, so that + # it sorts together with the other Python packages + # in Add-Remove-Programs (APR) + product_name = "Python %s %s" % (self.target_version, + self.distribution.get_fullname()) + self.db = msilib.init_database(installer_name, schema, + product_name, msilib.gen_uuid(), + sversion, author) + msilib.add_tables(self.db, sequence) + props = [('DistVersion', version)] + email = metadata.author_email or metadata.maintainer_email + if email: + props.append(("ARPCONTACT", email)) + if metadata.url: + props.append(("ARPURLINFOABOUT", metadata.url)) + if props: + add_data(self.db, 'Property', props) + + self.add_find_python() + self.add_files() + self.add_scripts() + self.add_ui() + self.db.Commit() + + if hasattr(self.distribution, 'dist_files'): + self.distribution.dist_files.append(('bdist_msi', self.target_version, fullname)) + + if not self.keep_temp: + remove_tree(self.bdist_dir, dry_run=self.dry_run) + + def add_files(self): + db = self.db + cab = msilib.CAB("distfiles") + f = Feature(db, "default", "Default Feature", "Everything", 1, directory="TARGETDIR") + f.set_current() + rootdir = os.path.abspath(self.bdist_dir) + root = Directory(db, cab, None, rootdir, "TARGETDIR", "SourceDir") + db.Commit() + todo = [root] + while todo: + dir = todo.pop() + for file in os.listdir(dir.absolute): + afile = os.path.join(dir.absolute, file) + if os.path.isdir(afile): + newdir = Directory(db, cab, dir, file, file, "%s|%s" % (dir.make_short(file), file)) + todo.append(newdir) + else: + key = dir.add_file(file) + if file==self.install_script: + if self.install_script_key: + raise DistutilsOptionError, "Multiple files with name %s" % file + self.install_script_key = '[#%s]' % key + + cab.commit(db) + + def add_find_python(self): + """Adds code to the installer to compute the location of Python. + Properties PYTHON.MACHINE, PYTHON.USER, PYTHONDIR and PYTHON will be set + in both the execute and UI sequences; PYTHONDIR will be set from + PYTHON.USER if defined, else from PYTHON.MACHINE. + PYTHON is PYTHONDIR\python.exe""" + install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version + add_data(self.db, "RegLocator", + [("python.machine", 2, install_path, None, 2), + ("python.user", 1, install_path, None, 2)]) + add_data(self.db, "AppSearch", + [("PYTHON.MACHINE", "python.machine"), + ("PYTHON.USER", "python.user")]) + add_data(self.db, "CustomAction", + [("PythonFromMachine", 51+256, "PYTHONDIR", "[PYTHON.MACHINE]"), + ("PythonFromUser", 51+256, "PYTHONDIR", "[PYTHON.USER]"), + ("PythonExe", 51+256, "PYTHON", "[PYTHONDIR]\\python.exe"), + ("InitialTargetDir", 51+256, "TARGETDIR", "[PYTHONDIR]")]) + add_data(self.db, "InstallExecuteSequence", + [("PythonFromMachine", "PYTHON.MACHINE", 401), + ("PythonFromUser", "PYTHON.USER", 402), + ("PythonExe", None, 403), + ("InitialTargetDir", 'TARGETDIR=""', 404), + ]) + add_data(self.db, "InstallUISequence", + [("PythonFromMachine", "PYTHON.MACHINE", 401), + ("PythonFromUser", "PYTHON.USER", 402), + ("PythonExe", None, 403), + ("InitialTargetDir", 'TARGETDIR=""', 404), + ]) + + def add_scripts(self): + if self.install_script: + add_data(self.db, "CustomAction", + [("install_script", 50, "PYTHON", self.install_script_key)]) + add_data(self.db, "InstallExecuteSequence", + [("install_script", "NOT Installed", 6800)]) + if self.pre_install_script: + scriptfn = os.path.join(self.bdist_dir, "preinstall.bat") + f = open(scriptfn, "w") + # The batch file will be executed with [PYTHON], so that %1 + # is the path to the Python interpreter; %0 will be the path + # of the batch file. + # rem =""" + # %1 %0 + # exit + # """ + # + f.write('rem ="""\n%1 %0\nexit\n"""\n') + f.write(open(self.pre_install_script).read()) + f.close() + add_data(self.db, "Binary", + [("PreInstall", msilib.Binary(scriptfn)) + ]) + add_data(self.db, "CustomAction", + [("PreInstall", 2, "PreInstall", None) + ]) + add_data(self.db, "InstallExecuteSequence", + [("PreInstall", "NOT Installed", 450)]) + + + def add_ui(self): + db = self.db + x = y = 50 + w = 370 + h = 300 + title = "[ProductName] Setup" + + # see "Dialog Style Bits" + modal = 3 # visible | modal + modeless = 1 # visible + track_disk_space = 32 + + # UI customization properties + add_data(db, "Property", + # See "DefaultUIFont Property" + [("DefaultUIFont", "DlgFont8"), + # See "ErrorDialog Style Bit" + ("ErrorDialog", "ErrorDlg"), + ("Progress1", "Install"), # modified in maintenance type dlg + ("Progress2", "installs"), + ("MaintenanceForm_Action", "Repair"), + # possible values: ALL, JUSTME + ("WhichUsers", "ALL") + ]) + + # Fonts, see "TextStyle Table" + add_data(db, "TextStyle", + [("DlgFont8", "Tahoma", 9, None, 0), + ("DlgFontBold8", "Tahoma", 8, None, 1), #bold + ("VerdanaBold10", "Verdana", 10, None, 1), + ("VerdanaRed9", "Verdana", 9, 255, 0), + ]) + + # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table" + # Numbers indicate sequence; see sequence.py for how these action integrate + add_data(db, "InstallUISequence", + [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140), + ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141), + # In the user interface, assume all-users installation if privileged. + ("SelectDirectoryDlg", "Not Installed", 1230), + # XXX no support for resume installations yet + #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240), + ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250), + ("ProgressDlg", None, 1280)]) + + add_data(db, 'ActionText', uisample.ActionText) + add_data(db, 'UIText', uisample.UIText) + ##################################################################### + # Standard dialogs: FatalError, UserExit, ExitDialog + fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title, + "Finish", "Finish", "Finish") + fatal.title("[ProductName] Installer ended prematurely") + fatal.back("< Back", "Finish", active = 0) + fatal.cancel("Cancel", "Back", active = 0) + fatal.text("Description1", 15, 70, 320, 80, 0x30003, + "[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.") + fatal.text("Description2", 15, 155, 320, 20, 0x30003, + "Click the Finish button to exit the Installer.") + c=fatal.next("Finish", "Cancel", name="Finish") + c.event("EndDialog", "Exit") + + user_exit=PyDialog(db, "UserExit", x, y, w, h, modal, title, + "Finish", "Finish", "Finish") + user_exit.title("[ProductName] Installer was interrupted") + user_exit.back("< Back", "Finish", active = 0) + user_exit.cancel("Cancel", "Back", active = 0) + user_exit.text("Description1", 15, 70, 320, 80, 0x30003, + "[ProductName] setup was interrupted. Your system has not been modified. " + "To install this program at a later time, please run the installation again.") + user_exit.text("Description2", 15, 155, 320, 20, 0x30003, + "Click the Finish button to exit the Installer.") + c = user_exit.next("Finish", "Cancel", name="Finish") + c.event("EndDialog", "Exit") + + exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title, + "Finish", "Finish", "Finish") + exit_dialog.title("Completing the [ProductName] Installer") + exit_dialog.back("< Back", "Finish", active = 0) + exit_dialog.cancel("Cancel", "Back", active = 0) + exit_dialog.text("Description", 15, 235, 320, 20, 0x30003, + "Click the Finish button to exit the Installer.") + c = exit_dialog.next("Finish", "Cancel", name="Finish") + c.event("EndDialog", "Return") + + ##################################################################### + # Required dialog: FilesInUse, ErrorDlg + inuse = PyDialog(db, "FilesInUse", + x, y, w, h, + 19, # KeepModeless|Modal|Visible + title, + "Retry", "Retry", "Retry", bitmap=False) + inuse.text("Title", 15, 6, 200, 15, 0x30003, + r"{\DlgFontBold8}Files in Use") + inuse.text("Description", 20, 23, 280, 20, 0x30003, + "Some files that need to be updated are currently in use.") + inuse.text("Text", 20, 55, 330, 50, 3, + "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.") + inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess", + None, None, None) + c=inuse.back("Exit", "Ignore", name="Exit") + c.event("EndDialog", "Exit") + c=inuse.next("Ignore", "Retry", name="Ignore") + c.event("EndDialog", "Ignore") + c=inuse.cancel("Retry", "Exit", name="Retry") + c.event("EndDialog","Retry") + + # See "Error Dialog". See "ICE20" for the required names of the controls. + error = Dialog(db, "ErrorDlg", + 50, 10, 330, 101, + 65543, # Error|Minimize|Modal|Visible + title, + "ErrorText", None, None) + error.text("ErrorText", 50,9,280,48,3, "") + #error.control("ErrorIcon", "Icon", 15, 9, 24, 24, 5242881, None, "py.ico", None, None) + error.pushbutton("N",120,72,81,21,3,"No",None).event("EndDialog","ErrorNo") + error.pushbutton("Y",240,72,81,21,3,"Yes",None).event("EndDialog","ErrorYes") + error.pushbutton("A",0,72,81,21,3,"Abort",None).event("EndDialog","ErrorAbort") + error.pushbutton("C",42,72,81,21,3,"Cancel",None).event("EndDialog","ErrorCancel") + error.pushbutton("I",81,72,81,21,3,"Ignore",None).event("EndDialog","ErrorIgnore") + error.pushbutton("O",159,72,81,21,3,"Ok",None).event("EndDialog","ErrorOk") + error.pushbutton("R",198,72,81,21,3,"Retry",None).event("EndDialog","ErrorRetry") + + ##################################################################### + # Global "Query Cancel" dialog + cancel = Dialog(db, "CancelDlg", 50, 10, 260, 85, 3, title, + "No", "No", "No") + cancel.text("Text", 48, 15, 194, 30, 3, + "Are you sure you want to cancel [ProductName] installation?") + #cancel.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None, + # "py.ico", None, None) + c=cancel.pushbutton("Yes", 72, 57, 56, 17, 3, "Yes", "No") + c.event("EndDialog", "Exit") + + c=cancel.pushbutton("No", 132, 57, 56, 17, 3, "No", "Yes") + c.event("EndDialog", "Return") + + ##################################################################### + # Global "Wait for costing" dialog + costing = Dialog(db, "WaitForCostingDlg", 50, 10, 260, 85, modal, title, + "Return", "Return", "Return") + costing.text("Text", 48, 15, 194, 30, 3, + "Please wait while the installer finishes determining your disk space requirements.") + c = costing.pushbutton("Return", 102, 57, 56, 17, 3, "Return", None) + c.event("EndDialog", "Exit") + + ##################################################################### + # Preparation dialog: no user input except cancellation + prep = PyDialog(db, "PrepareDlg", x, y, w, h, modeless, title, + "Cancel", "Cancel", "Cancel") + prep.text("Description", 15, 70, 320, 40, 0x30003, + "Please wait while the Installer prepares to guide you through the installation.") + prep.title("Welcome to the [ProductName] Installer") + c=prep.text("ActionText", 15, 110, 320, 20, 0x30003, "Pondering...") + c.mapping("ActionText", "Text") + c=prep.text("ActionData", 15, 135, 320, 30, 0x30003, None) + c.mapping("ActionData", "Text") + prep.back("Back", None, active=0) + prep.next("Next", None, active=0) + c=prep.cancel("Cancel", None) + c.event("SpawnDialog", "CancelDlg") + + ##################################################################### + # Target directory selection + seldlg = PyDialog(db, "SelectDirectoryDlg", x, y, w, h, modal, title, + "Next", "Next", "Cancel") + seldlg.title("Select Destination Directory") + + version = sys.version[:3]+" " + seldlg.text("Hint", 15, 30, 300, 40, 3, + "The destination directory should contain a Python %sinstallation" % version) + + seldlg.back("< Back", None, active=0) + c = seldlg.next("Next >", "Cancel") + c.event("SetTargetPath", "TARGETDIR", order=1) + c.event("SpawnWaitDialog", "WaitForCostingDlg", order=2) + c.event("EndDialog", "Return", order=3) + + c = seldlg.cancel("Cancel", "DirectoryCombo") + c.event("SpawnDialog", "CancelDlg") + + seldlg.control("DirectoryCombo", "DirectoryCombo", 15, 70, 272, 80, 393219, + "TARGETDIR", None, "DirectoryList", None) + seldlg.control("DirectoryList", "DirectoryList", 15, 90, 308, 136, 3, "TARGETDIR", + None, "PathEdit", None) + seldlg.control("PathEdit", "PathEdit", 15, 230, 306, 16, 3, "TARGETDIR", None, "Next", None) + c = seldlg.pushbutton("Up", 306, 70, 18, 18, 3, "Up", None) + c.event("DirectoryListUp", "0") + c = seldlg.pushbutton("NewDir", 324, 70, 30, 18, 3, "New", None) + c.event("DirectoryListNew", "0") + + ##################################################################### + # Disk cost + cost = PyDialog(db, "DiskCostDlg", x, y, w, h, modal, title, + "OK", "OK", "OK", bitmap=False) + cost.text("Title", 15, 6, 200, 15, 0x30003, + "{\DlgFontBold8}Disk Space Requirements") + cost.text("Description", 20, 20, 280, 20, 0x30003, + "The disk space required for the installation of the selected features.") + cost.text("Text", 20, 53, 330, 60, 3, + "The highlighted volumes (if any) do not have enough disk space " + "available for the currently selected features. You can either " + "remove some files from the highlighted volumes, or choose to " + "install less features onto local drive(s), or select different " + "destination drive(s).") + cost.control("VolumeList", "VolumeCostList", 20, 100, 330, 150, 393223, + None, "{120}{70}{70}{70}{70}", None, None) + cost.xbutton("OK", "Ok", None, 0.5).event("EndDialog", "Return") + + ##################################################################### + # WhichUsers Dialog. Only available on NT, and for privileged users. + # This must be run before FindRelatedProducts, because that will + # take into account whether the previous installation was per-user + # or per-machine. We currently don't support going back to this + # dialog after "Next" was selected; to support this, we would need to + # find how to reset the ALLUSERS property, and how to re-run + # FindRelatedProducts. + # On Windows9x, the ALLUSERS property is ignored on the command line + # and in the Property table, but installer fails according to the documentation + # if a dialog attempts to set ALLUSERS. + whichusers = PyDialog(db, "WhichUsersDlg", x, y, w, h, modal, title, + "AdminInstall", "Next", "Cancel") + whichusers.title("Select whether to install [ProductName] for all users of this computer.") + # A radio group with two options: allusers, justme + g = whichusers.radiogroup("AdminInstall", 15, 60, 260, 50, 3, + "WhichUsers", "", "Next") + g.add("ALL", 0, 5, 150, 20, "Install for all users") + g.add("JUSTME", 0, 25, 150, 20, "Install just for me") + + whichusers.back("Back", None, active=0) + + c = whichusers.next("Next >", "Cancel") + c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1) + c.event("EndDialog", "Return", order = 2) + + c = whichusers.cancel("Cancel", "AdminInstall") + c.event("SpawnDialog", "CancelDlg") + + ##################################################################### + # Installation Progress dialog (modeless) + progress = PyDialog(db, "ProgressDlg", x, y, w, h, modeless, title, + "Cancel", "Cancel", "Cancel", bitmap=False) + progress.text("Title", 20, 15, 200, 15, 0x30003, + "{\DlgFontBold8}[Progress1] [ProductName]") + progress.text("Text", 35, 65, 300, 30, 3, + "Please wait while the Installer [Progress2] [ProductName]. " + "This may take several minutes.") + progress.text("StatusLabel", 35, 100, 35, 20, 3, "Status:") + + c=progress.text("ActionText", 70, 100, w-70, 20, 3, "Pondering...") + c.mapping("ActionText", "Text") + + #c=progress.text("ActionData", 35, 140, 300, 20, 3, None) + #c.mapping("ActionData", "Text") + + c=progress.control("ProgressBar", "ProgressBar", 35, 120, 300, 10, 65537, + None, "Progress done", None, None) + c.mapping("SetProgress", "Progress") + + progress.back("< Back", "Next", active=False) + progress.next("Next >", "Cancel", active=False) + progress.cancel("Cancel", "Back").event("SpawnDialog", "CancelDlg") + + ################################################################### + # Maintenance type: repair/uninstall + maint = PyDialog(db, "MaintenanceTypeDlg", x, y, w, h, modal, title, + "Next", "Next", "Cancel") + maint.title("Welcome to the [ProductName] Setup Wizard") + maint.text("BodyText", 15, 63, 330, 42, 3, + "Select whether you want to repair or remove [ProductName].") + g=maint.radiogroup("RepairRadioGroup", 15, 108, 330, 60, 3, + "MaintenanceForm_Action", "", "Next") + #g.add("Change", 0, 0, 200, 17, "&Change [ProductName]") + g.add("Repair", 0, 18, 200, 17, "&Repair [ProductName]") + g.add("Remove", 0, 36, 200, 17, "Re&move [ProductName]") + + maint.back("< Back", None, active=False) + c=maint.next("Finish", "Cancel") + # Change installation: Change progress dialog to "Change", then ask + # for feature selection + #c.event("[Progress1]", "Change", 'MaintenanceForm_Action="Change"', 1) + #c.event("[Progress2]", "changes", 'MaintenanceForm_Action="Change"', 2) + + # Reinstall: Change progress dialog to "Repair", then invoke reinstall + # Also set list of reinstalled features to "ALL" + c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 5) + c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 6) + c.event("[Progress2]", "repairs", 'MaintenanceForm_Action="Repair"', 7) + c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 8) + + # Uninstall: Change progress to "Remove", then invoke uninstall + # Also set list of removed features to "ALL" + c.event("[REMOVE]", "ALL", 'MaintenanceForm_Action="Remove"', 11) + c.event("[Progress1]", "Removing", 'MaintenanceForm_Action="Remove"', 12) + c.event("[Progress2]", "removes", 'MaintenanceForm_Action="Remove"', 13) + c.event("Remove", "ALL", 'MaintenanceForm_Action="Remove"', 14) + + # Close dialog when maintenance action scheduled + c.event("EndDialog", "Return", 'MaintenanceForm_Action<>"Change"', 20) + #c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 21) + + maint.cancel("Cancel", "RepairRadioGroup").event("SpawnDialog", "CancelDlg") + + def get_installer_filename(self, fullname): + # Factored out to allow overriding in subclasses + installer_name = os.path.join(self.dist_dir, + "%s.win32-py%s.msi" % + (fullname, self.target_version)) + return installer_name From c24cffd76bbddf35362ec7ab850b25bea009dbf5 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 9 Mar 2006 01:15:05 +0000 Subject: [PATCH 1058/8469] Whitespace normalization. --- command/bdist_msi.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 6c0982d49f..f05d66cb5d 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -216,10 +216,10 @@ def run (self): # Prefix ProductName with Python x.y, so that # it sorts together with the other Python packages # in Add-Remove-Programs (APR) - product_name = "Python %s %s" % (self.target_version, + product_name = "Python %s %s" % (self.target_version, self.distribution.get_fullname()) self.db = msilib.init_database(installer_name, schema, - product_name, msilib.gen_uuid(), + product_name, msilib.gen_uuid(), sversion, author) msilib.add_tables(self.db, sequence) props = [('DistVersion', version)] @@ -238,7 +238,7 @@ def run (self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - self.distribution.dist_files.append(('bdist_msi', self.target_version, fullname)) + self.distribution.dist_files.append(('bdist_msi', self.target_version, fullname)) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) @@ -265,14 +265,14 @@ def add_files(self): if self.install_script_key: raise DistutilsOptionError, "Multiple files with name %s" % file self.install_script_key = '[#%s]' % key - + cab.commit(db) def add_find_python(self): """Adds code to the installer to compute the location of Python. Properties PYTHON.MACHINE, PYTHON.USER, PYTHONDIR and PYTHON will be set in both the execute and UI sequences; PYTHONDIR will be set from - PYTHON.USER if defined, else from PYTHON.MACHINE. + PYTHON.USER if defined, else from PYTHON.MACHINE. PYTHON is PYTHONDIR\python.exe""" install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version add_data(self.db, "RegLocator", @@ -497,7 +497,7 @@ def add_ui(self): seldlg.title("Select Destination Directory") version = sys.version[:3]+" " - seldlg.text("Hint", 15, 30, 300, 40, 3, + seldlg.text("Hint", 15, 30, 300, 40, 3, "The destination directory should contain a Python %sinstallation" % version) seldlg.back("< Back", None, active=0) From 9e5258e007776422cab25de64ea538f0056f438f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 15 Mar 2006 04:33:54 +0000 Subject: [PATCH 1059/8469] Use relative imports in a few places where I noticed the need. (Ideally, all packages in Python 2.5 will use the relative import syntax for all their relative import needs.) --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 9bdbb16a8c..dc603be8b7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -16,7 +16,7 @@ import string import sys -from errors import DistutilsPlatformError +from .errors import DistutilsPlatformError # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) From 68fb7a659320c41ca8949058210394de916a400f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 15 Mar 2006 04:58:47 +0000 Subject: [PATCH 1060/8469] Checkpoint. 218 tests are okay; 53 are failing. Done so far: - all classes are new-style (but ripping out classobject.[ch] isn't done) - int/int -> float - all exceptions must derive from BaseException - absolute import - 'as' and 'with' are keywords --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 9bdbb16a8c..dc603be8b7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -16,7 +16,7 @@ import string import sys -from errors import DistutilsPlatformError +from .errors import DistutilsPlatformError # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) From 0a9342f5549e6078a83335bee511bed4dcd43480 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 15 Mar 2006 23:08:13 +0000 Subject: [PATCH 1061/8469] Instead of relative imports, use (implicitly) absolute ones. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index dc603be8b7..0feb14aa2b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -16,7 +16,7 @@ import string import sys -from .errors import DistutilsPlatformError +from distutils.errors import DistutilsPlatformError # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) From 79b3a97173af4724fe2c4b437a12ce760960f718 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 17 Mar 2006 06:49:51 +0000 Subject: [PATCH 1062/8469] Get rid of a bunch more raw_input references --- command/register.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/register.py b/command/register.py index dec9aa2bf2..f8912621c8 100644 --- a/command/register.py +++ b/command/register.py @@ -13,6 +13,11 @@ from distutils.core import Command from distutils.errors import * +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + class register(Command): description = ("register the distribution with the Python package index") From 6811c9d7ad4341ea3769490502cd805ce400eb09 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 17 Mar 2006 08:00:19 +0000 Subject: [PATCH 1063/8469] Remove apply() --- archive_util.py | 2 +- command/build_ext.py | 4 ++-- command/build_py.py | 8 ++++---- dir_util.py | 2 +- filelist.py | 2 +- util.py | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/archive_util.py b/archive_util.py index 6aa5e635d7..b725a14b41 100644 --- a/archive_util.py +++ b/archive_util.py @@ -162,7 +162,7 @@ def make_archive (base_name, format, func = format_info[0] for (arg,val) in format_info[1]: kwargs[arg] = val - filename = apply(func, (base_name, base_dir), kwargs) + filename = func(base_name, base_dir, **kwargs) if root_dir is not None: log.debug("changing back to '%s'", save_cwd) diff --git a/command/build_ext.py b/command/build_ext.py index 4191c76cef..6ea5d57998 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -613,8 +613,8 @@ def get_ext_filename (self, ext_name): # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext - return apply(os.path.join, ext_path) + so_ext + return os.path.join(*ext_path) + '_d' + so_ext + return os.path.join(*ext_path) + so_ext def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to diff --git a/command/build_py.py b/command/build_py.py index 621bcb4af3..3b7ec62c59 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -154,7 +154,7 @@ def get_package_dir (self, package): if not self.package_dir: if path: - return apply(os.path.join, path) + return os.path.join(*path) else: return '' else: @@ -167,7 +167,7 @@ def get_package_dir (self, package): del path[-1] else: tail.insert(0, pdir) - return apply(os.path.join, tail) + return os.path.join(*tail) else: # Oops, got all the way through 'path' without finding a # match in package_dir. If package_dir defines a directory @@ -181,7 +181,7 @@ def get_package_dir (self, package): tail.insert(0, pdir) if tail: - return apply(os.path.join, tail) + return os.path.join(*tail) else: return '' @@ -335,7 +335,7 @@ def get_source_files (self): def get_module_outfile (self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] - return apply(os.path.join, outfile_path) + return os.path.join(*outfile_path) def get_outputs (self, include_bytecode=1): diff --git a/dir_util.py b/dir_util.py index 43994db3ff..a4aff58e3d 100644 --- a/dir_util.py +++ b/dir_util.py @@ -204,7 +204,7 @@ def remove_tree (directory, verbose=0, dry_run=0): _build_cmdtuple(directory, cmdtuples) for cmd in cmdtuples: try: - apply(cmd[0], (cmd[1],)) + cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) if _path_created.has_key(abspath): diff --git a/filelist.py b/filelist.py index 43f9aaaf5b..4bbdd1f00f 100644 --- a/filelist.py +++ b/filelist.py @@ -69,7 +69,7 @@ def sort (self): sortable_files.sort() self.files = [] for sort_tuple in sortable_files: - self.files.append(apply(os.path.join, sort_tuple)) + self.files.append(os.path.join(*sort_tuple)) # -- Other miscellaneous utility methods --------------------------- diff --git a/util.py b/util.py index 387e9bdc93..889bf13603 100644 --- a/util.py +++ b/util.py @@ -95,7 +95,7 @@ def convert_path (pathname): paths.remove('.') if not paths: return os.curdir - return apply(os.path.join, paths) + return os.path.join(*paths) # convert_path () @@ -295,7 +295,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): log.info(msg) if not dry_run: - apply(func, args) + func(*args) def strtobool (val): From be411d30ce0fadb76610cae16903da8a1f34f200 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Mon, 27 Mar 2006 21:55:21 +0000 Subject: [PATCH 1064/8469] Patch #1459476: install PKG-INFO metadata alongside distutils-installed packages. --- command/install.py | 1 + command/install_egg_info.py | 75 +++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 command/install_egg_info.py diff --git a/command/install.py b/command/install.py index 7723761117..453151d08b 100644 --- a/command/install.py +++ b/command/install.py @@ -601,6 +601,7 @@ def has_data (self): ('install_headers', has_headers), ('install_scripts', has_scripts), ('install_data', has_data), + ('install_egg_info', lambda self:True), ] # class install diff --git a/command/install_egg_info.py b/command/install_egg_info.py new file mode 100644 index 0000000000..4e472d7c75 --- /dev/null +++ b/command/install_egg_info.py @@ -0,0 +1,75 @@ +"""distutils.command.install_egg_info + +Implements the Distutils 'install_egg_info' command, for installing +a package's PKG-INFO metadata.""" + + +from distutils.cmd import Command +from distutils import log, dir_util +import os, sys, re + +class install_egg_info(Command): + """Install an .egg-info file for the package""" + + description = "Install package's PKG-INFO metadata as an .egg-info file" + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ] + + def initialize_options(self): + self.install_dir = None + + def finalize_options(self): + self.set_undefined_options('install_lib',('install_dir','install_dir')) + basename = "%s-%s-py%s.egg-info" % ( + to_filename(safe_name(self.distribution.get_name())), + to_filename(safe_version(self.distribution.get_version())), + sys.version[:3] + ) + self.target = os.path.join(self.install_dir, basename) + self.outputs = [self.target] + + def run(self): + target = self.target + if os.path.isdir(target) and not os.path.islink(target): + dir_util.remove_tree(target, dry_run=self.dry_run) + elif os.path.exists(target): + self.execute(os.unlink,(self.target,),"Removing "+target) + log.info("Writing %s", target) + if not self.dry_run: + f = open(target, 'w') + self.distribution.metadata.write_pkg_file(f) + f.close() + + def get_outputs(self): + return self.outputs + + +# The following routines are taken from setuptools' pkg_resources module and +# can be replaced by importing them from pkg_resources once it is included +# in the stdlib. + +def safe_name(name): + """Convert an arbitrary string to a standard distribution name + + Any runs of non-alphanumeric/. characters are replaced with a single '-'. + """ + return re.sub('[^A-Za-z0-9.]+', '-', name) + + +def safe_version(version): + """Convert an arbitrary string to a standard version string + + Spaces become dots, and all other non-alphanumeric characters become + dashes, with runs of multiple dashes condensed to a single dash. + """ + version = version.replace(' ','.') + return re.sub('[^A-Za-z0-9.]+', '-', version) + + +def to_filename(name): + """Convert a project or version name to its filename-escaped form + + Any '-' characters are currently replaced with '_'. + """ + return name.replace('-','_') From 9e248daf97b68077781fbfde44293dcaa0104172 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Thu, 30 Mar 2006 02:12:14 +0000 Subject: [PATCH 1065/8469] Implementation for patch request #1457316: support --identity option for setup.py "upload" command. --- command/upload.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 62767a348e..6f4ce81f79 100644 --- a/command/upload.py +++ b/command/upload.py @@ -29,6 +29,7 @@ class upload(Command): 'display full response text from server'), ('sign', 's', 'sign files to upload using gpg'), + ('identity=', 'i', 'GPG identity used to sign files'), ] boolean_options = ['show-response', 'sign'] @@ -38,8 +39,13 @@ def initialize_options(self): self.repository = '' self.show_response = 0 self.sign = False + self.identity = None def finalize_options(self): + if self.identity and not self.sign: + raise DistutilsOptionError( + "Must use --sign for --identity to have meaning" + ) if os.environ.has_key('HOME'): rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): @@ -67,7 +73,10 @@ def run(self): def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: - spawn(("gpg", "--detach-sign", "-a", filename), + gpg_args = ["gpg", "--detach-sign", "-a", filename] + if self.identity: + gpg_args[2:2] = ["--local-user", self.identity] + spawn(gpg_args, dry_run=self.dry_run) # Fill in the data - send all the meta-data in case we need to From c363bcdfa7ebe6448597a5dc7a323ee6887083e8 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Thu, 30 Mar 2006 12:59:11 +0000 Subject: [PATCH 1066/8469] whitespace normalisation --- command/install_egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/install_egg_info.py b/command/install_egg_info.py index 4e472d7c75..c31ac29668 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -26,7 +26,7 @@ def finalize_options(self): to_filename(safe_version(self.distribution.get_version())), sys.version[:3] ) - self.target = os.path.join(self.install_dir, basename) + self.target = os.path.join(self.install_dir, basename) self.outputs = [self.target] def run(self): @@ -40,7 +40,7 @@ def run(self): f = open(target, 'w') self.distribution.metadata.write_pkg_file(f) f.close() - + def get_outputs(self): return self.outputs From 723767238ee601ade352660d96ceb887a9437417 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 1 Apr 2006 07:46:54 +0000 Subject: [PATCH 1067/8469] Bug #1458017: make distutils.Log._log more forgiving when passing in msg strings with '%', but without format args. --- log.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/log.py b/log.py index cf3ee136e0..95d4c1c5a2 100644 --- a/log.py +++ b/log.py @@ -20,7 +20,12 @@ def __init__(self, threshold=WARN): def _log(self, level, msg, args): if level >= self.threshold: - print msg % args + if not args: + # msg may contain a '%'. If args is empty, + # don't even try to string-format + print msg + else: + print msg % args sys.stdout.flush() def log(self, level, msg, *args): From 6cce429ad7ac2f6ee6d4a2b37817de4296a4a639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 10 Apr 2006 12:39:36 +0000 Subject: [PATCH 1068/8469] Patch #1429775: Link Python modules to libpython on linux if --enable-shared. Fixes #832799. --- command/build_ext.py | 13 +++++++++++-- sysconfig.py | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4191c76cef..fbb74768ba 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -185,7 +185,9 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ + (sys.platform.startswith('linux') and + sysconfig.get_config_var('Py_ENABLE_SHARED')): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -688,6 +690,13 @@ def get_libraries (self, ext): # extensions, it is a reference to the original list return ext.libraries + [pythonlib, "m"] + extra else: - return ext.libraries + from distutils import sysconfig + if sysconfig.get_config_var('Py_ENABLE_SHARED'): + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + return ext.libraries + [pythonlib] + else: + return ext.libraries # class build_ext diff --git a/sysconfig.py b/sysconfig.py index 0feb14aa2b..eafd49e7af 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -213,8 +213,8 @@ def parse_config_h(fp, g=None): """ if g is None: g = {} - define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") - undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") + define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") + undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") # while 1: line = fp.readline() @@ -351,6 +351,17 @@ def _init_posix(): raise DistutilsPlatformError(my_msg) + # load the installed pyconfig.h: + try: + filename = get_config_h_filename() + parse_config_h(file(filename), g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + # On MacOSX we need to check the setting of the environment variable # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. From 9294929b0028f551a54dd48cc3325581933b3c5f Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 12 Oct 2009 20:00:02 +0000 Subject: [PATCH 1069/8469] Major updates and fixes include: * Fix for the Python 2.6.3 build_ext API change * Support for the most recent Sourceforge download link insanity * Support for SVN 1.6 * Stop crashing on certain types of HTTP error * Stop re-trying URLs that already failed retrieval once * Fixes for various dependency management problems such as looping builds, re-downloading packages already present on sys.path (but not in a registered "site" directory), and randomly preferring local -f packages over local installed packages * Prevent lots of spurious "already imported from another path" warnings (e.g. when pkg_resources is imported late) * Ensure C libraries (as opposed to extensions) are also built when doing bdist_egg Other changes: * Misc. documentation fixes * Improved Jython support * Fewer warnings under Python 2.6+ * Warn when 'packages' uses paths instead of package names (because it causes other problems, like spurious "already imported" warnings) * Stop using /usr/bin/sw_vers on Mac OS (replaced w/'platform' module calls) Note: This is NOT a merge from Distribute; upon review, many of the tracker-submitted patches used as a basis for forking were incorrect, incomplete, introduced new bugs, or were not addressing the root causes. (E.g., one of the changes in this patch fixes three superficially unrelated issues in the setuptools bug tracker.) Careful review will be required if you want to merge this work back into Distribute. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075385 --- EasyInstall.txt | 18 ++++- ez_setup.py | 2 +- pkg_resources.py | 109 ++++++++++++++++++--------- pkg_resources.txt | 20 ++--- release.sh | 2 +- setup.py | 4 +- setuptools.egg-info/entry_points.txt | 1 + setuptools.txt | 31 +++++++- setuptools/__init__.py | 2 +- setuptools/command/alias.py | 4 +- setuptools/command/bdist_egg.py | 6 +- setuptools/command/build_ext.py | 18 ++--- setuptools/command/easy_install.py | 14 ++-- setuptools/command/egg_info.py | 22 +++--- setuptools/command/sdist.py | 83 ++++++++++++++------ setuptools/depends.py | 2 +- setuptools/dist.py | 53 +++++++++++-- setuptools/package_index.py | 62 +++++++-------- setuptools/sandbox.py | 75 +++++++++++++----- version.dat | 2 +- 20 files changed, 368 insertions(+), 162 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index b0341e8881..20e2053a32 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -256,7 +256,7 @@ or directory (found in the installation directory). If you want to delete the currently installed version of a package (or all versions of a package), you should first run:: - easy_install -m PackageName + easy_install -mxN PackageName This will ensure that Python doesn't continue to search for a package you're planning to remove. After you've done this, you can safely delete the .egg @@ -427,7 +427,7 @@ below, and also the section on the `Package Index "API"`_. Password-Protected Sites ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ If a site you want to download from is password-protected using HTTP "Basic" authentication, you can specify your credentials in the URL, like so:: @@ -1217,7 +1217,19 @@ displayed MD5 info (broken onto two lines for readability):: Release Notes/Change History ============================ -0.6final +0.6c10 + * Support for the most recent Sourceforge download link insanity + + * Stop crashing on certain types of HTTP error + + * Stop re-trying URLs that already failed retrieval once + + * Fixes for various dependency management problems such as looping builds, + re-downloading packages already present on sys.path (but not in a registered + "site" directory), and semi-randomly preferring local "-f" packages over + local installed packages + +0.6c9 * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting is flattened out in the resulting egg. (There was a case-sensitivity problem that affected some distributions, notably ``pywin32``.) diff --git a/ez_setup.py b/ez_setup.py index d24e845e58..f4de7e4b03 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -14,7 +14,7 @@ This file can also be run as a script to install or upgrade setuptools. """ import sys -DEFAULT_VERSION = "0.6c9" +DEFAULT_VERSION = "0.6c10" DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { diff --git a/pkg_resources.py b/pkg_resources.py index 9edb6c0bd9..baff42253c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,7 @@ method. """ -import sys, os, zipimport, time, re, imp, new +import sys, os, zipimport, time, re, imp try: frozenset @@ -39,6 +39,47 @@ +_state_vars = {} + +def _declare_state(vartype, **kw): + g = globals() + for name, val in kw.iteritems(): + g[name] = val + _state_vars[name] = vartype + +def __getstate__(): + state = {} + g = globals() + for k, v in _state_vars.iteritems(): + state[k] = g['_sget_'+v](g[k]) + return state + +def __setstate__(state): + g = globals() + for k, v in state.iteritems(): + g['_sset_'+_state_vars[k]](k, g[k], v) + return state + +def _sget_dict(val): + return val.copy() + +def _sset_dict(key, ob, state): + ob.clear() + ob.update(state) + +def _sget_object(val): + return val.__getstate__() + +def _sset_object(key, ob, state): + ob.__setstate__(state) + +_sget_none = _sset_none = lambda *args: None + + + + + + def get_supported_platform(): """Return this platform's maximum compatible version. @@ -164,14 +205,8 @@ def get_provider(moduleOrReq): def _macosx_vers(_cache=[]): if not _cache: - info = os.popen('/usr/bin/sw_vers').read().splitlines() - for line in info: - key, value = line.split(None, 1) - if key == 'ProductVersion:': - _cache.append(value.strip().split(".")) - break - else: - raise ValueError, "What?!" + from platform import mac_ver + _cache.append(mac_ver()[0].split('.')) return _cache[0] def _macosx_arch(machine): @@ -203,6 +238,12 @@ def get_build_platform(): + + + + + + def compatible_platforms(provided,required): """Can code for the `provided` platform run on the `required` platform? @@ -387,7 +428,7 @@ def __init__(self, entries=None): def add_entry(self, entry): """Add a path item to ``.entries``, finding any distributions on it - ``find_distributions(entry,False)`` is used to find distributions + ``find_distributions(entry, True)`` is used to find distributions corresponding to the path entry, and they are added. `entry` is always appended to ``.entries``, even if it is already present. (This is because ``sys.path`` can contain the same value more than @@ -622,7 +663,6 @@ def require(self, *requirements): activated to fulfill the requirements; all relevant distributions are included, even if they were already activated in this working set. """ - needed = self.resolve(parse_requirements(requirements)) for dist in needed: @@ -630,7 +670,6 @@ def require(self, *requirements): return needed - def subscribe(self, callback): """Invoke `callback` for all distributions (including existing ones)""" if callback in self.callbacks: @@ -639,19 +678,21 @@ def subscribe(self, callback): for dist in self: callback(dist) - def _added_new(self, dist): for callback in self.callbacks: callback(dist) + def __getstate__(self): + return ( + self.entries[:], self.entry_keys.copy(), self.by_key.copy(), + self.callbacks[:] + ) - - - - - - - + def __setstate__(self, (entries, keys, by_key, callbacks)): + self.entries = entries[:] + self.entry_keys = keys.copy() + self.by_key = by_key.copy() + self.callbacks = callbacks[:] class Environment(object): @@ -1597,7 +1638,7 @@ def get_importer(path_item): -_distribution_finders = {} +_declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items @@ -1646,7 +1687,7 @@ def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" path_item = _normalize_cached(path_item) - if os.path.isdir(path_item): + if os.path.isdir(path_item) and os.access(path_item, os.R_OK): if path_item.lower().endswith('.egg'): # unpacked egg yield Distribution.from_filename( @@ -1679,8 +1720,8 @@ def find_on_path(importer, path_item, only=False): break register_finder(ImpWrapper,find_on_path) -_namespace_handlers = {} -_namespace_packages = {} +_declare_state('dict', _namespace_handlers = {}) +_declare_state('dict', _namespace_packages = {}) def register_namespace_handler(importer_type, namespace_handler): """Register `namespace_handler` to declare namespace packages @@ -1709,7 +1750,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = new.module(packageName) + module = sys.modules[packageName] = imp.new_module(packageName) module.__path__ = []; _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) @@ -2220,12 +2261,9 @@ def insert_on(self, path, loc = None): if not loc: return - if path is sys.path: - self.check_version_conflict() - nloc = _normalize_cached(loc) bdir = os.path.dirname(nloc) - npath= map(_normalize_cached, path) + npath= [(p and _normalize_cached(p) or p) for p in path] bp = None for p, item in enumerate(npath): @@ -2233,10 +2271,14 @@ def insert_on(self, path, loc = None): break elif item==bdir and self.precedence==EGG_DIST: # if it's an .egg, give it precedence over its directory + if path is sys.path: + self.check_version_conflict() path.insert(p, loc) npath.insert(p, nloc) break else: + if path is sys.path: + self.check_version_conflict() path.append(loc) return @@ -2253,7 +2295,6 @@ def insert_on(self, path, loc = None): return - def check_version_conflict(self): if self.key=='setuptools': return # ignore the inevitable setuptools self-conflicts :( @@ -2267,7 +2308,7 @@ def check_version_conflict(self): continue fn = getattr(sys.modules[modname], '__file__', None) - if fn and normalize_path(fn).startswith(loc): + if fn and (normalize_path(fn).startswith(loc) or fn.startswith(loc)): continue issue_warning( "Module %s was already imported from %s, but %s is being added" @@ -2444,7 +2485,7 @@ def __eq__(self,other): def __contains__(self,item): if isinstance(item,Distribution): - if item.key <> self.key: return False + if item.key != self.key: return False if self.index: item = item.parsed_version # only get if we need it elif isinstance(item,basestring): item = parse_version(item) @@ -2541,7 +2582,7 @@ def _mkstemp(*args,**kw): os.open = old_open # and then put it back -# Set up global resource manager +# Set up global resource manager (deliberately not state-saved) _manager = ResourceManager() def _initialize(g): for name in dir(_manager): @@ -2550,7 +2591,7 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -working_set = WorkingSet() +_declare_state('object', working_set = WorkingSet()) try: # Does the main program list any requirements? from __main__ import __requires__ diff --git a/pkg_resources.txt b/pkg_resources.txt index 7d8afd377e..03793b6268 100755 --- a/pkg_resources.txt +++ b/pkg_resources.txt @@ -269,7 +269,7 @@ instance: the global ``working_set`` to reflect the change. This method is also called by the ``WorkingSet()`` constructor during initialization. - This method uses ``find_distributions(entry,False)`` to find distributions + This method uses ``find_distributions(entry, True)`` to find distributions corresponding to the path entry, and then ``add()`` them. `entry` is always appended to the ``entries`` attribute, even if it is already present, however. (This is because ``sys.path`` can contain the same value @@ -1661,14 +1661,10 @@ PEP 302 Utilities for obtaining an "importer" object. It first checks for an importer for the path item in ``sys.path_importer_cache``, and if not found it calls each of the ``sys.path_hooks`` and caches the result if a good importer is - found. If no importer is found, this routine returns an ``ImpWrapper`` - instance that wraps the builtin import machinery as a PEP 302-compliant - "importer" object. This ``ImpWrapper`` is *not* cached; instead a new - instance is returned each time. - - (Note: When run under Python 2.5, this function is simply an alias for - ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper`` - instances, it may return ``pkgutil.ImpImporter`` instances.) + found. If no importer is found, this routine returns a wrapper object + that wraps the builtin import machinery as a PEP 302-compliant "importer" + object. This wrapper object is *not* cached; instead a new instance is + returned each time. File/Path Utilities @@ -1692,7 +1688,11 @@ File/Path Utilities Release Notes/Change History ---------------------------- -0.6final +0.6c10 + * Prevent lots of spurious "already imported from another path" warnings (e.g. + when pkg_resources is imported late). + +0.6c9 * Fix ``resource_listdir('')`` always returning an empty list for zipped eggs. 0.6c7 diff --git a/release.sh b/release.sh index c53357d924..2d2da5eb53 100755 --- a/release.sh +++ b/release.sh @@ -7,7 +7,7 @@ # If your initials aren't PJE, don't run it. :) # -export VERSION="0.6c9" +export VERSION="0.6c10" python2.3 setup.py -q release source --target-version=2.3 upload && \ python2.4 setup.py -q release binary --target-version=2.4 upload && \ diff --git a/setup.py b/setup.py index b5da418398..198ae88d9a 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ execfile(convert_path('setuptools/command/__init__.py'), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6c9" +VERSION = "0.6c10" from setuptools import setup, find_packages import sys @@ -53,8 +53,8 @@ "include_package_data = setuptools.dist:assert_bool", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", + "packages = setuptools.dist:check_packages", ], - "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index f7367e0d35..10f1da6c73 100755 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -49,6 +49,7 @@ test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages tests_require = setuptools.dist:check_requirements [setuptools.installation] diff --git a/setuptools.txt b/setuptools.txt index d1b253028d..93940528ae 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -2569,6 +2569,27 @@ A few important points for writing revision control file finders: inform the user of the missing program(s). +A Note Regarding Dependencies +----------------------------- + +If the project *containing* your distutils/setuptools extension(s) depends on +any projects other than setuptools, you *must* also declare those dependencies +as part of your project's ``setup_requires`` keyword, so that they will +already be built (and at least temprorarily installed) before your extension +project is built. + +So, if for example you create a project Foo that includes a new file finder +plugin, and Foo depends on Bar, then you *must* list Bar in both the +``install_requires`` **and** ``setup_requires`` arguments to ``setup()``. + +If you don't do this, then in certain edge cases you may cause setuptools to +try to go into infinite recursion, trying to build your dependencies to resolve +your dependencies, while still building your dependencies. (It probably won't +happen on your development machine, but it *will* happen in a full build +pulling everything from revision control on a clean machine, and then you or +your users will be scratching their heads trying to figure it out!) + + Subclassing ``Command`` ----------------------- @@ -2611,7 +2632,15 @@ XXX Release Notes/Change History ---------------------------- -0.6final +0.6c10 + * Fix for the Python 2.6.3 build_ext API change + + * Ensure C libraries (as opposed to extensions) are also built when doing + bdist_egg + + * Support for SVN 1.6 + +0.6c9 * Fixed a missing files problem when using Windows source distributions on non-Windows platforms, due to distutils not handling manifest file line endings correctly. diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 56cbf7673b..a9f6544de9 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path import os.path -__version__ = '0.6c9' +__version__ = '0.6c10' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index f5368b29e9..40c00b550b 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -9,7 +9,7 @@ def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) - if arg.split()<>[arg]: + if arg.split()!=[arg]: return repr(arg) return arg @@ -33,7 +33,7 @@ def initialize_options(self): def finalize_options(self): option_base.finalize_options(self) - if self.remove and len(self.args)<>1: + if self.remove and len(self.args)!=1: raise DistutilsOptionError( "Must specify exactly one argument (the alias name) when " "using --remove" diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9e852a3f15..7e5a37995c 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -165,12 +165,13 @@ def call_command(self,cmdname,**kw): def run(self): # Generate metadata first self.run_command("egg_info") - # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. log.info("installing library code to %s" % self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root; instcmd.root = None + if self.distribution.has_c_libraries() and not self.skip_build: + self.run_command('build_clib') cmd = self.call_command('install_lib', warn_dir=0) instcmd.root = old_root @@ -190,7 +191,6 @@ def run(self): to_compile.extend(self.make_init_files()) if to_compile: cmd.byte_compile(to_compile) - if self.distribution.data_files: self.do_install_data() @@ -398,7 +398,7 @@ def write_safety_flag(egg_dir, safe): for flag,fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): - if safe is None or bool(safe)<>flag: + if safe is None or bool(safe)!=flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: f=open(fn,'wb'); f.write('\n'); f.close() diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index c0aaa8e80c..f6f3355dcb 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -82,15 +82,15 @@ def swig_sources(self, sources, *otherargs): def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) - ext = self.ext_map[fullname] - if isinstance(ext,Library): - fn, ext = os.path.splitext(filename) - return self.shlib_compiler.library_filename(fn,libtype) - elif use_stubs and ext._links_to_dynamic: - d,fn = os.path.split(filename) - return os.path.join(d,'dl-'+fn) - else: - return filename + if fullname in self.ext_map: + ext = self.ext_map[fullname] + if isinstance(ext,Library): + fn, ext = os.path.splitext(filename) + return self.shlib_compiler.library_filename(fn,libtype) + elif use_stubs and ext._links_to_dynamic: + d,fn = os.path.split(filename) + return os.path.join(d,'dl-'+fn) + return filename def initialize_options(self): _build_ext.initialize_options(self) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f06b6ddd7b..a5a23ad49b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -204,7 +204,7 @@ def finalize_options(self): self.outputs = [] def run(self): - if self.verbose<>self.distribution.verbose: + if self.verbose!=self.distribution.verbose: log.set_verbosity(self.verbose) try: for spec in self.args: @@ -252,7 +252,7 @@ def check_site_dir(self): # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs - if not is_site_dir: + if not is_site_dir and not self.multi_version: # No? Then directly test whether it does .pth file processing is_site_dir = self.check_pth_processing() else: @@ -430,9 +430,9 @@ def easy_install(self, spec, deps=False): self.check_editable(spec) dist = self.package_index.fetch_distribution( - spec, tmpdir, self.upgrade, self.editable, not self.always_copy + spec, tmpdir, self.upgrade, self.editable, not self.always_copy, + self.local_index ) - if dist is None: msg = "Could not find suitable distribution for %r" % spec if self.always_copy: @@ -722,7 +722,7 @@ def install_exe(self, dist_filename, tmpdir): f = open(pkg_inf,'w') f.write('Metadata-Version: 1.0\n') for k,v in cfg.items('metadata'): - if k<>'target_version': + if k!='target_version': f.write('%s: %s\n' % (k.replace('_','-').title(), v)) f.close() script_dir = os.path.join(egg_info,'scripts') @@ -988,7 +988,6 @@ def unpack_and_compile(self, egg_path, destination): def pf(src,dst): if dst.endswith('.py') and not src.startswith('EGG-INFO/'): to_compile.append(dst) - to_chmod.append(dst) elif dst.endswith('.dll') or dst.endswith('.so'): to_chmod.append(dst) self.unpack_progress(src,dst) @@ -1023,6 +1022,7 @@ def byte_compile(self, to_compile): + def no_default_version_msg(self): return """bad install directory or PYTHONPATH @@ -1286,7 +1286,7 @@ def get_exe_prefixes(exe_filename): if parts[1].endswith('.egg-info'): prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/')) break - if len(parts)<>2 or not name.endswith('.pth'): + if len(parts)!=2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9741e26a34..5a8b2db8d7 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -217,18 +217,21 @@ def get_svn_revision(self): data = f.read() f.close() - if data.startswith('9') or data.startswith('8'): + if data.startswith('9 and d[9]]+[0]) - elif data.startswith('=6 and record[5]=="delete": continue # skip deleted yield joinpath(dirname, record[0]) - elif data.startswith('"unknown" and version >= self.requested_version + str(version)!="unknown" and version >= self.requested_version def get_version(self, paths=None, default="unknown"): diff --git a/setuptools/dist.py b/setuptools/dist.py index 30ff35e320..c1218ef218 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -8,7 +8,7 @@ from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd -import os, distutils.log +import os, distutils.log, re def _get_unpatched(cls): """Protect against re-patching the distutils if reloaded @@ -61,8 +61,8 @@ def check_nsp(dist, attr, value): parent = '.'.join(nsp.split('.')[:-1]) if parent not in value: distutils.log.warn( - "%r is declared as a package namespace, but %r is not:" - " please correct this in setup.py", nsp, parent + "WARNING: %r is declared as a package namespace, but %r" + " is not: please correct this in setup.py", nsp, parent ) def check_extras(dist, attr, value): @@ -120,6 +120,47 @@ def check_package_data(dist, attr, value): attr+" must be a dictionary mapping package names to lists of " "wildcard patterns" ) + +def check_packages(dist, attr, value): + for pkgname in value: + if not re.match(r'\w+(\.\w+)*', pkgname): + distutils.log.warn( + "WARNING: %r not a valid package name; please use only" + ".-separated package names in setup.py", pkgname + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -415,19 +456,19 @@ def exclude_package(self,package): if self.packages: self.packages = [ p for p in self.packages - if p<>package and not p.startswith(pfx) + if p!=package and not p.startswith(pfx) ] if self.py_modules: self.py_modules = [ p for p in self.py_modules - if p<>package and not p.startswith(pfx) + if p!=package and not p.startswith(pfx) ] if self.ext_modules: self.ext_modules = [ p for p in self.ext_modules - if p.name<>package and not p.name.startswith(pfx) + if p.name!=package and not p.name.startswith(pfx) ] diff --git a/setuptools/package_index.py b/setuptools/package_index.py index da3fed1248..70b75a6f47 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO +import httplib from pkg_resources import * from distutils import log from distutils.errors import DistutilsError @@ -8,7 +9,6 @@ except ImportError: from md5 import md5 from fnmatch import translate - 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 @@ -42,6 +42,8 @@ def parse_bdist_wininst(name): def egg_info_for_url(url): scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) base = urllib2.unquote(path.split('/')[-1]) + if server=='sourceforge.net' and base=='download': # XXX Yuck + base = urllib2.unquote(path.split('/')[-2]) if '#' in base: base, fragment = base.split('#',1) return base,fragment @@ -64,14 +66,12 @@ def distros_for_location(location, basename, metadata=None): if basename.endswith('.egg') and '-' in basename: # only one, unambiguous interpretation return [Distribution.from_location(location, basename, metadata)] - if basename.endswith('.exe'): win_base, py_ver = parse_bdist_wininst(basename) if win_base is not None: return interpret_distro_name( location, win_base, metadata, py_ver, BINARY_DIST, "win32" ) - # Try source distro extensions (.zip, .tgz, etc.) # for ext in EXTENSIONS: @@ -186,10 +186,10 @@ def process_url(self, url, retrieve=False): return self.info("Reading %s", url) + self.fetched_urls[url] = True # prevent multiple fetch attempts f = self.open_url(url, "Download error: %s -- Some packages may not be found!") if f is None: return - self.fetched_urls[url] = self.fetched_urls[f.url] = True - + self.fetched_urls[f.url] = True if 'html' not in f.headers.get('content-type', '').lower(): f.close() # not html, we can't process it return @@ -329,7 +329,7 @@ def obtain(self, requirement, installer=None): def check_md5(self, cs, info, filename, tfp): if re.match('md5=[0-9a-f]{32}$', info): self.debug("Validating md5 checksum for %s", filename) - if cs.hexdigest()<>info[4:]: + if cs.hexdigest()!=info[4:]: tfp.close() os.unlink(filename) raise DistutilsError( @@ -409,7 +409,8 @@ def download(self, spec, tmpdir): def fetch_distribution(self, - requirement, tmpdir, force_scan=False, source=False, develop_ok=False + requirement, tmpdir, force_scan=False, source=False, develop_ok=False, + local_index=None, ): """Obtain a distribution suitable for fulfilling `requirement` @@ -427,15 +428,15 @@ def fetch_distribution(self, set, development and system eggs (i.e., those using the ``.egg-info`` format) will be ignored. """ - # process a Requirement self.info("Searching for %s", requirement) skipped = {} + dist = None - def find(req): + def find(env, req): # Find a matching distribution; may be called more than once - for dist in self[req.key]: + for dist in env[req.key]: if dist.precedence==DEVELOP_DIST and not develop_ok: if dist not in skipped: @@ -444,23 +445,25 @@ def find(req): continue if dist in req and (dist.precedence<=SOURCE_DIST or not source): - self.info("Best match: %s", dist) - return dist.clone( - location=self.download(dist.location, tmpdir) - ) + return dist + + if force_scan: self.prescan() self.find_packages(requirement) + dist = find(self, requirement) + + if local_index is not None: + dist = dist or find(local_index, requirement) - dist = find(requirement) if dist is None and self.to_scan is not None: self.prescan() - dist = find(requirement) + dist = find(self, requirement) if dist is None and not force_scan: self.find_packages(requirement) - dist = find(requirement) + dist = find(self, requirement) if dist is None: self.warn( @@ -468,7 +471,9 @@ def find(req): (source and "a source distribution of " or ""), requirement, ) - return dist + self.info("Best match: %s", dist) + return dist.clone(location=self.download(dist.location, tmpdir)) + def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` @@ -485,11 +490,6 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): - - - - - def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) dists = match and [d for d in @@ -573,17 +573,19 @@ def reporthook(self, url, filename, blocknum, blksize, size): def open_url(self, url, warning=None): - if url.startswith('file:'): - return local_open(url) + if url.startswith('file:'): return local_open(url) try: return open_with_auth(url) except urllib2.HTTPError, v: return v except urllib2.URLError, v: - if warning: self.warn(warning, v.reason) - else: - raise DistutilsError("Download error for %s: %s" - % (url, v.reason)) + reason = v.reason + except httplib.HTTPException, v: + reason = "%s: %s" % (v.__doc__ or v.__class__.__name__, v) + if warning: + self.warn(warning, reason) + else: + raise DistutilsError("Download error for %s: %s" % (url, reason)) def _download_url(self, scheme, url, tmpdir): # Determine download filename @@ -611,8 +613,6 @@ def _download_url(self, scheme, url, tmpdir): self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) - - def scan_url(self, url): self.process_url(url, True) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 4db0dbdb37..00eb012410 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,14 +1,46 @@ -import os, sys, __builtin__, tempfile, operator +import os, sys, __builtin__, tempfile, operator, pkg_resources _os = sys.modules[os.name] _open = open +_file = file + from distutils.errors import DistutilsError +from pkg_resources import working_set + __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" - old_dir = os.getcwd() save_argv = sys.argv[:] save_path = sys.path[:] @@ -16,13 +48,16 @@ def run_setup(setup_script, args): temp_dir = os.path.join(setup_dir,'temp') if not os.path.isdir(temp_dir): os.makedirs(temp_dir) save_tmp = tempfile.tempdir - + save_modules = sys.modules.copy() + pr_state = pkg_resources.__getstate__() try: - tempfile.tempdir = temp_dir - os.chdir(setup_dir) + tempfile.tempdir = temp_dir; os.chdir(setup_dir) try: sys.argv[:] = [setup_script]+list(args) sys.path.insert(0, setup_dir) + # reset to include setup dir, w/clean callback list + working_set.__init__() + working_set.callbacks.append(lambda dist:dist.activate()) DirectorySandbox(setup_dir).run( lambda: execfile( "setup.py", @@ -34,11 +69,17 @@ def run_setup(setup_script, args): raise # Normal exit, just return finally: + pkg_resources.__setstate__(pr_state) + sys.modules.update(save_modules) + for key in list(sys.modules): + if key not in save_modules: del sys.modules[key] os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv tempfile.tempdir = save_tmp + + class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" @@ -58,15 +99,16 @@ def run(self, func): """Run 'func' under os sandboxing""" try: self._copy(self) - __builtin__.open = __builtin__.file = self._open + __builtin__.file = self._file + __builtin__.open = self._open self._active = True return func() finally: self._active = False - __builtin__.open = __builtin__.file = _open + __builtin__.open = _file + __builtin__.file = _open self._copy(_os) - def _mk_dual_path_wrapper(name): original = getattr(_os,name) def wrap(self,src,dst,*args,**kw): @@ -75,7 +117,6 @@ def wrap(self,src,dst,*args,**kw): return original(src,dst,*args,**kw) return wrap - for name in ["rename", "link", "symlink"]: if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name) @@ -88,7 +129,8 @@ def wrap(self,path,*args,**kw): return original(path,*args,**kw) return wrap - _open = _mk_single_path_wrapper('file', _open) + _open = _mk_single_path_wrapper('open', _open) + _file = _mk_single_path_wrapper('file', _file) for name in [ "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat", @@ -96,7 +138,6 @@ def wrap(self,path,*args,**kw): ]: if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name) - def _mk_single_with_return(name): original = getattr(_os,name) def wrap(self,path,*args,**kw): @@ -187,22 +228,22 @@ def _remap_pair(self,operation,src,dst,*args,**kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) + def _file(self, path, mode='r', *args, **kw): + if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): + self._violation("file", path, mode, *args, **kw) + return _file(path,mode,*args,**kw) + def open(self, file, flags, mode=0777): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode) return _os.open(file,flags,mode) - WRITE_FLAGS = reduce( - operator.or_, - [getattr(_os, a, 0) for a in + operator.or_, [getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) - - - class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" diff --git a/version.dat b/version.dat index 32144c8eb9..16ecd2aaf1 100755 --- a/version.dat +++ b/version.dat @@ -1,6 +1,6 @@ [setuptools] status = 'release candidate' major = 0 -build = 9 +build = 10 minor = 6 From 11e0e840b1d2b9b2e4326facb2f05eacec71bafa Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 12 Oct 2009 20:05:56 +0000 Subject: [PATCH 1070/8469] Backport fixes for issues 16 & 23 from trunk --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075386 --- pkg_resources.py | 20 ++++++++++---------- setuptools/archive_util.py | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index baff42253c..79db00b8c2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -20,18 +20,18 @@ except NameError: from sets import ImmutableSet as frozenset -from os import utime, rename, unlink # capture these to bypass sandboxing +# capture these to bypass sandboxing +from os import utime, rename, unlink, mkdir from os import open as os_open +from os.path import isdir, split - - - - - - - - +def _bypass_ensure_directory(name, mode=0777): + # Sandbox-bypassing version of ensure_directory() + dirname, filename = split(name) + if dirname and filename and not isdir(dirname): + _bypass_ensure_directory(dirname) + mkdir(dirname, mode) @@ -957,7 +957,7 @@ def get_cache_path(self, archive_name, names=()): extract_path = self.extraction_path or get_default_cache() target_path = os.path.join(extract_path, archive_name+'-tmp', *names) try: - ensure_directory(target_path) + _bypass_ensure_directory(target_path) except: self.extraction_error() diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 511f05ad5d..5d72e7edc6 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -189,7 +189,10 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): if dst: if dst.endswith(os.sep): dst = dst[:-1] - tarobj._extract_member(member,dst) # XXX Ugh + try: + tarobj._extract_member(member,dst) # XXX Ugh + except tarfile.ExtractError: + pass # chown/chmod/mkfifo/mknode/makedev failed return True finally: tarobj.close() @@ -200,6 +203,3 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile - - - From 81e2bb6c275be23a335e2735bb346559357b9d7e Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 12 Oct 2009 20:21:43 +0000 Subject: [PATCH 1071/8469] Windows 64/Vista UAC fixes --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075388 --- setuptools/cli.exe | Bin 6656 -> 7168 bytes setuptools/command/easy_install.py | 45 +++++++++++++++++++++++++++-- setuptools/gui.exe | Bin 7168 -> 7168 bytes 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/setuptools/cli.exe b/setuptools/cli.exe index 3173b2b21dd54f1008d0a1046418eefb5f9c2989..491544004c39e95525c3d0177761ae52129f8d17 100755 GIT binary patch literal 7168 zcmeHMeQ;FO6~DWAz!H+|R)PxUW5GaS#F!|yAOseY4POBQA(ocJWy!w4O0v7N`(6l2 zbi-yHp3iks1*Hy58$YULrcCQV42ZaHFd;MA322#&I4u;dFKiq#k_ii@Zhz9MHqfB*8MJ7e0340d$v2h&@0 zMITJxxZUY9d%W&#UVF8=j*Rr^{ThuEbpJcJSHh>8V+o>S8NnMY>UJ z$}=CXN?N$`oii zbAn-G!-k>mcxU&L1Vs)US9KOaXC~ykXAa2?S-VLF#-S(Fj1eq!@+X9l&yqk-7K}2J zg(-Ptu7^`fv3`|ejA*yURB3Ar?wFdG*+PlsEEWnOEoAKjGPJM+%_)DtkR}5tq`>hq z2WfeNc|FK;#$Xc^1#Vsxrl|rHT@!W5mK=%8Qg&cuLN;(SEX=-DrkG@wLnfNuIQ&uW zR>zSg$)p?^3lpFADo}En}(*Oe@&|6&~$7x=AczMk1(alS;|_7Cekv@Efbmi z2oedmx-H0EqgsCkq<}IWpOA?Fl$Nj25jr}H5;fSbAL>6aykAbAhcVJ;mp+$;D8?k`x+OK#^K|+t>^#vg|lI*jw~kaHH;i|Dvg7V#?C!R5WIY35(uYOtng0FUeaEr{0wq-gdTYCei(>6bBD<{v$F%z6H&>AFX z$Qs21Uli0g+?LwZ!#mh7EKYh$r3J5*=OH1rqK57u6~v-ENb|CkquN+B|D-lKsVl_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OMNLr8`aCmr_6jK@TIL? zU6gO755Bh`we0VEDzC9}vGZBvZ?4pQ08K{W zYzdZ>mdr>4?ffs<$Q#&PTZb&Mw1Z<$Lzz zU0MQiD;d-jWYZRcQJzL^))6*y8Eev!6`A|lYg%$8(^A}l7f2q!?U;9UjaAFx{?TIO z3Tx~bt^^Y^>9kKvvbAmOcbUYeeU%Mlk_%daHDr=}-AeW^4YBK%m=9rBp=kH0;ao<| zzS{eHqf(CHLX@U`M?+5OUSg{>XH!yUkTQhPT9cm2c z$cpS@<_2laE?j=2`}eq&9vI5{z{InL!_o4ad#@V~Ukcsmj-w!Tq)tCDVKE$v1}1cd zLzm)4d7MPE%`9Y)U$Tq*7qQu3!Wgzcx;{YT#E+&bq|c@=Y}mJaFK$Z33DG@Dp9+2kB)mVO)ZE79Tc; z=oB|;EPmnXbx-*>^;vjYKi*KzJ|K_Vl~?>E72`oHx?aAE-Bgj=bC&qWY&@O~%}PhI zFs9>2^BZtyOSPozKYMB&i#e_bfM6w;)_%qR9vg#oQkhhamzIBPZpL;6Ox4$ zDqgAL+f}?y#oJZ1)J!v$=9>fvE ze3ahKS(gU(lg;PHxX;6d<-j&|4pLYLRE(@htP zK@hfyQm4b|cKEh+K{;}-AP7j>sPED#zJvA;D^r5#-r@9l+yJXmyra|8t|Yc0?-C`! z;q?mAZm**4#=^v1PWtx+MnG_SS^@GIq0{lU=ygcjp@k7V?xzNO8S0*jb`a-Yms3)V z(ARHf9r!mW6{vu1bGTd{rOM@Ohu7zHOC4zR7VGT7_S$IX9=6N5&FygE6h44j^tAar zZKCog=N7E>iDI3z)#vc-#`OfeB1$!$&Q6EBz0Tvmw|Bj}!$ZCGY@Nq}v6Kw8yQl=e5<}iX@>*U8IiFWTM)Qm$ Hhbj3NM6ug1 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a5a23ad49b..af4e349768 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1590,12 +1590,53 @@ def get_script_args(dist, executable=sys_executable, wininst=False): yield (name+ext, hdr+script_text, 't', [name+x for x in old]) yield ( name+'.exe', resource_string('setuptools', launcher), - 'b' # write in binary mode - ) + 'b') # write in binary mode + yield (name+'.exe.manifest', _launcher_manifest % (name,), 't') else: # On other platforms, we assume the right thing to do is to # just write the stub with no extension. yield (name, header+script_text) + +_launcher_manifest = """ + + + + + + + + + + + + +""" + + + + + + + + + + + + + + + + + + + + + + + def rmtree(path, ignore_errors=False, onerror=auto_chmod): """Recursively delete a directory tree. diff --git a/setuptools/gui.exe b/setuptools/gui.exe index 53d4ff81af0e50b1996de048db0726d561613809..5231ed9013c4c7b5f0c60ca523c75b54f50c6678 100755 GIT binary patch delta 3357 zcmcguZ*UXG6<-~PE!&c%1QTd%f}D{Z6O6H`lTdJyBSgfZKn%vIJ46+-bOr@k(nxp4 zq$M)QqCO5~4ChQ~2QqOXGlUQMkYuRIFjTb&f2Ns~I4Q$~ejp{uoRKnhJ04f0Zq?tO z&e*i+*Y4=)w{Q3N-oE#C_wIUE_O2Z0XP3P8>H5QmDhzKPetS8y|KY=*KgtkRS;K@I z>IA+=AcTxt@MqP91lWM?GbwKy7M0W|>%#ege&rLxB5OTY*AaxT`nlAg7*YI`Xm@kvWxcP^JxKQ$9F=11=mYcBz#A*pd1OO?N|_Uf~m(FPc? zFdD0x;mx?aZC0A*mPcVvtQ=97ff&oMs>4Kx%E9|3N0!E$aAe`xIz((70hi@C8jUI8 zm;e}uNnU5w<1iUALW?H_?+F%cdA@Bk)KN=(2!3MU-V_#V1RCfNoszkFDazW_Z7|J~ zW8Wr)n*SuVNZ>pHPTD*$yQ$@x9bHPYs&5owjW5U5ZX@FVE0U0DoW`N)0Ee{5;pwdc z)H9`C1VyT_FIAs{m&6&G>a4)5bj=IYitj6 zvw})9O(&M*sFh$+n8L@IMw7Ct@E~)&M7daKd*lH2NJ^nJ3oaoj7TZG?lN#;nNzBAD zCfXe;QOrgUGf}LBjq90H#maf3i+Q?OSzOe_+*hnPiD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eg>2UBi#T1 From da607e59a42f29d99defe7e74cf7321d1d575aaa Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 12 Oct 2009 20:23:55 +0000 Subject: [PATCH 1072/8469] Update change log --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075389 --- EasyInstall.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EasyInstall.txt b/EasyInstall.txt index 20e2053a32..b03a29a142 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1218,6 +1218,10 @@ Release Notes/Change History ============================ 0.6c10 + * Fix easy_install.exe giving UAC errors on Windows Vista + + * Fix installed script .exe files not working with 64-bit Python on Windows + * Support for the most recent Sourceforge download link insanity * Stop crashing on certain types of HTTP error From e3aaece7b04a0947d15862cdcf0baf9900342e13 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 14 Oct 2009 02:53:15 +0000 Subject: [PATCH 1073/8469] Add a better link to the files --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075399 --- README.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 50ef99b307..03a2afcd53 100755 --- a/README.txt +++ b/README.txt @@ -90,7 +90,7 @@ Downloads All setuptools downloads can be found at `the project's home page in the Python Package Index`_. Scroll to the very bottom of the page to find the links. -.. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools +.. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files In addition to the PyPI downloads, the development version of ``setuptools`` is available from the `Python SVN sandbox`_, and in-development versions of the @@ -159,3 +159,4 @@ Credits "Code Bear" Taylor) contributed their time and stress as guinea pigs for the use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) +.. _files: From de0eb5ca27896c10e01e1686913cbf01f4f540cb Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 19:46:34 +0000 Subject: [PATCH 1074/8469] Release update, fix string.join in README warning --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075540 --- ez_setup.py | 4 ++++ release.sh | 1 + setuptools.egg-info/entry_points.txt | 2 +- setuptools/command/sdist.py | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f4de7e4b03..bb8b5acc46 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,6 +28,10 @@ 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', + 'setuptools-0.6c10-py2.3.egg': 'cb00cbd3d93b66f6c118a1c042113f93', + 'setuptools-0.6c10-py2.4.egg': 'be702e15b4b61628e059d6ab88335a87', + 'setuptools-0.6c10-py2.5.egg': '79b809922c0ce55e2d8b5b0cc31da0f2', + 'setuptools-0.6c10-py2.6.egg': 'c4b741e774a793609d508ff4a2a21194', 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', diff --git a/release.sh b/release.sh index 2d2da5eb53..59558707fc 100755 --- a/release.sh +++ b/release.sh @@ -12,6 +12,7 @@ export VERSION="0.6c10" python2.3 setup.py -q release source --target-version=2.3 upload && \ python2.4 setup.py -q release binary --target-version=2.4 upload && \ python2.5 setup.py -q release binary --target-version=2.5 upload && \ +python2.6 setup.py -q release binary --target-version=2.6 upload && \ python2.3 ez_setup.py --md5update dist/setuptools-$VERSION*-py2.?.egg && \ cp ez_setup.py virtual-python.py ~/distrib/ && \ cp ez_setup.py ~/projects/ez_setup/__init__.py && \ diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 10f1da6c73..2642c316ea 100755 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -31,7 +31,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.5 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index d5121de5ce..d84afdb850 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -181,7 +181,7 @@ def add_defaults (self): if not got_it: self.warn("standard file not found: should have one of " + - string.join(alts, ', ')) + ', '.join(alts)) else: if os.path.exists(fn): self.filelist.append(fn) From 7742bceaefff829d1c886e410f5124902c52516c Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:03:29 +0000 Subject: [PATCH 1075/8469] Missing launcher fixes --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075544 --- launcher.c | 11 ++++++----- setuptools/cli.exe | Bin 7168 -> 7168 bytes setuptools/gui.exe | Bin 7168 -> 7168 bytes 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/launcher.c b/launcher.c index c8022505f4..201219cc46 100755 --- a/launcher.c +++ b/launcher.c @@ -81,17 +81,18 @@ char *quoted(char *data) { char *loadable_exe(char *exename) { - HINSTANCE hPython; /* DLL handle for python executable */ + /* HINSTANCE hPython; DLL handle for python executable */ char *result; - hPython = LoadLibraryEx(exename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - if (!hPython) return NULL; + /* hPython = LoadLibraryEx(exename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (!hPython) return NULL; */ /* Return the absolute filename for spawnv */ result = calloc(MAX_PATH, sizeof(char)); - if (result) GetModuleFileName(hPython, result, MAX_PATH); + strncpy(result, exename, MAX_PATH); + /*if (result) GetModuleFileName(hPython, result, MAX_PATH); - FreeLibrary(hPython); + FreeLibrary(hPython); */ return result; } diff --git a/setuptools/cli.exe b/setuptools/cli.exe index 491544004c39e95525c3d0177761ae52129f8d17..8906ff77a26d30d63766158b2cebe1284188e637 100755 GIT binary patch delta 1642 zcmcgr?@v=#7(S=HKud3XYetz+1}H6pV~Pt-9GF}jIL&^6K*j=WZb;@Pf`eOwi=>UU z3)kAD7E&COud=gl+J#I5OQ6D)ATF!PHZ-1 zo9Gnm7CLAPj0oGkB@RMDOVXJWhGFPqc0v}qaCb-W*znvAO|A6^x&VI(+uhSF=>0c% zonl5R{w-9cc^qk2DVPv+mq>{2gkxzh`;Xy~QHv~-kft0S6AEP#cI7poc~=UJ;_2YZ ztWuClV0A`WC@hz&f=7Q5Pp;<%S2U&M*_?WolYu#l_UO|~U&Q8N7we=tb*bBmJ?4}8 zJ_}0vPK1}za}W5^QFUBDkBMrYN6*G0kxA5&x(b)zWaWobrI@A#8E+kJRv!ct7Mu*b zx8ZU^G`+y<#IXM58ipgWVpgR&Y%fQj`k>vIizvm+_P})dCXp2iYBH<*CeVysRD|6b zJ-Zr%iL5(#c~%r_Gu8)j_G%ox7G{R)ENnVV?8huH6TF?(3OSZ{H?Cz85*U~vK5O8{ z3~Ffe+0_b<-UNe|3OWuqEQhQIFom6*gktMXS_Ey@GWTydm5}C3N|WZ-2J0T4(G-_- zQ)9xWV9Z)g{V;1iOKah1W=~BuPEL&nmkpmwRXhSJB;|Nx@2X)e+(L1YYdSV&QVCit zh1FThAcTI;`X<0_i_zENXIs7$MXwr~eQX$NwMVam$F{An=KhVAIT#oARb89M$f>zV zNM{+W$_kI&#L}e7XBo%|H;Z9moCW9LL$PE->M>8HbiKlK4ZsD_omYcT9O-=2`u+#) zaeOs4Vm-9}>|ekyV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IH1)2LkojZS-4PubxKG5^jy~D^iA~~HT5RrSYh?|@wn6;@Dk3X6NBe?Bf zo0ant0+wfl9R;1`is(=~aWkp)uSMjde`;EoW*0Pz#_-ciwI}YeN{U4_eWpi^xn=c~ z1WS)-NveI%wN#jns#7qj&+i=vdl6S(sl`zbaz_6 zx1-G;v)pNLNN`BNB1;l%l$dS?ufQKOC{q(G7+95SnShmt3&!flP$*Fh_ZgOgh1eXG zN{4!t-^F$$u@#k>kSpGKs5^>A-sosM8*4@_`diwb4J+w{_|D7_kKXs~40`GE7+DG% zeO;;)u2a9%qkjn!Hm=h&ChZV1X}-Qhn5O&mIl?II)7Jl^Ta?rnfS->E_nxVuo$w_iG5I_@m-Yq$kxL=}b?y277Kbq9NBx=b^U~L&BS}s@~-1;-l2Cg+>fE)0c@r zsPQ_>c8#iraUo8Jja!A=^tQ3Bel`!UIj+gYfrt{7*DI@`$*pifH0v-sdeyUvd01?y zxi_w9Z+3P^D?%{lpa~J2MoO?MBaF&yd|1U8_&U9kE<)T$eiRC%RGObI(P?VXM24(IS+gSTmr5FY~29g1g3%ezyc5l()SZ$ z1vUbOz;>VpXaYKb9^hR-20jD^fhX%C_LqShKm@qApLodvHh%ynSSkT(nO&^^$Jn#U zV*lan-^RvHIhx3)zdQjaeCQaLL+vGPTMVi0Rf;fYXATM From 33415044219744c3d3c27096959f4e5e4fb6998e Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:06:29 +0000 Subject: [PATCH 1076/8469] Update to version 0.6c11 --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075545 --- ez_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- version.dat | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bb8b5acc46..3b598c5031 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -14,7 +14,7 @@ This file can also be run as a script to install or upgrade setuptools. """ import sys -DEFAULT_VERSION = "0.6c10" +DEFAULT_VERSION = "0.6c11" DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { diff --git a/release.sh b/release.sh index 59558707fc..00ffa57d4d 100755 --- a/release.sh +++ b/release.sh @@ -7,7 +7,7 @@ # If your initials aren't PJE, don't run it. :) # -export VERSION="0.6c10" +export VERSION="0.6c11" python2.3 setup.py -q release source --target-version=2.3 upload && \ python2.4 setup.py -q release binary --target-version=2.4 upload && \ diff --git a/setup.py b/setup.py index 198ae88d9a..b9a40769a8 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ execfile(convert_path('setuptools/command/__init__.py'), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6c10" +VERSION = "0.6c11" from setuptools import setup, find_packages import sys diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a9f6544de9..a314ca7e0e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path import os.path -__version__ = '0.6c10' +__version__ = '0.6c11' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' diff --git a/version.dat b/version.dat index 16ecd2aaf1..d312dddcbe 100755 --- a/version.dat +++ b/version.dat @@ -1,6 +1,6 @@ [setuptools] status = 'release candidate' major = 0 -build = 10 +build = 11 minor = 6 From 86439f1b2b983c8a41448f86895d9646a3b0568a Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:19:30 +0000 Subject: [PATCH 1077/8469] Build correct filenames for py2.6 "cross-compile" --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075546 --- release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index 00ffa57d4d..e184d0212b 100755 --- a/release.sh +++ b/release.sh @@ -8,11 +8,11 @@ # export VERSION="0.6c11" - +python2.3 setup.py -q egg_info # force upload to be available python2.3 setup.py -q release source --target-version=2.3 upload && \ python2.4 setup.py -q release binary --target-version=2.4 upload && \ python2.5 setup.py -q release binary --target-version=2.5 upload && \ -python2.6 setup.py -q release binary --target-version=2.6 upload && \ +python2.6 setup.py -q release binary --target-version=2.6 -p win32 upload && \ python2.3 ez_setup.py --md5update dist/setuptools-$VERSION*-py2.?.egg && \ cp ez_setup.py virtual-python.py ~/distrib/ && \ cp ez_setup.py ~/projects/ez_setup/__init__.py && \ From c5d26a405390ac00223a0a1967e6f134ac69ed5b Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:47:44 +0000 Subject: [PATCH 1078/8469] Fix the elusive "double upload bdist_wininst" bug --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075548 --- setuptools/command/bdist_wininst.py | 67 +++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 93e6846d79..e8521f834c 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,26 +2,24 @@ import os, sys class bdist_wininst(_bdist_wininst): + _good_upload = _bad_upload = None def create_exe(self, arcname, fullname, bitmap=None): _bdist_wininst.create_exe(self, arcname, fullname, bitmap) - dist_files = getattr(self.distribution, 'dist_files', []) - + installer_name = self.get_installer_filename(fullname) if self.target_version: - installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) pyversion = self.target_version - - # fix 2.5 bdist_wininst ignoring --target-version spec - bad = ('bdist_wininst','any',installer_name) - if bad in dist_files: - dist_files.remove(bad) + # fix 2.5+ bdist_wininst ignoring --target-version spec + self._bad_upload = ('bdist_wininst', 'any', installer_name) else: - installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) pyversion = 'any' - good = ('bdist_wininst', pyversion, installer_name) + self._good_upload = ('bdist_wininst', pyversion, installer_name) + + def _fix_upload_names(self): + good, bad = self._good_upload, self._bad_upload + dist_files = getattr(self.distribution, 'dist_files', []) + if bad in dist_files: + dist_files.remove(bad) if good not in dist_files: dist_files.append(good) @@ -36,6 +34,49 @@ def run(self): self._is_running = True try: _bdist_wininst.run(self) + self._fix_upload_names() finally: self._is_running = False + + + if not hasattr(_bdist_wininst, 'get_installer_filename'): + def get_installer_filename(self, fullname): + # Factored out to allow overriding in subclasses + if self.target_version: + # if we create an installer for a specific python version, + # it's better to include this in the name + installer_name = os.path.join(self.dist_dir, + "%s.win32-py%s.exe" % + (fullname, self.target_version)) + else: + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) + return installer_name + # get_installer_filename() + + + + + + + + + + + + + + + + + + + + + + + + + + From 0b6145a275ffa6ff89ed286f47b6af033d664c2b Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:49:47 +0000 Subject: [PATCH 1079/8469] Update change logs for release --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075549 --- EasyInstall.txt | 6 ++++-- setuptools.txt | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index b03a29a142..2bf69e9040 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1217,11 +1217,13 @@ displayed MD5 info (broken onto two lines for readability):: Release Notes/Change History ============================ +0.6c11 + * Fix installed script .exe files not working with 64-bit Python on Windows + (wasn't actually released in 0.6c10 due to a lost checkin) + 0.6c10 * Fix easy_install.exe giving UAC errors on Windows Vista - * Fix installed script .exe files not working with 64-bit Python on Windows - * Support for the most recent Sourceforge download link insanity * Stop crashing on certain types of HTTP error diff --git a/setuptools.txt b/setuptools.txt index 93940528ae..c709a9081c 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -2632,6 +2632,9 @@ XXX Release Notes/Change History ---------------------------- +0.6c11 + * Fix "bdist_wininst upload" trying to upload same file twice + 0.6c10 * Fix for the Python 2.6.3 build_ext API change From 2015618bf61262dbb18bffd4086b683dd2d0e85d Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 19 Oct 2009 21:51:24 +0000 Subject: [PATCH 1080/8469] Fixed MD5's --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075550 --- ez_setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3b598c5031..7aab12d11d 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,10 +28,10 @@ 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', - 'setuptools-0.6c10-py2.3.egg': 'cb00cbd3d93b66f6c118a1c042113f93', - 'setuptools-0.6c10-py2.4.egg': 'be702e15b4b61628e059d6ab88335a87', - 'setuptools-0.6c10-py2.5.egg': '79b809922c0ce55e2d8b5b0cc31da0f2', - 'setuptools-0.6c10-py2.6.egg': 'c4b741e774a793609d508ff4a2a21194', + 'setuptools-0.6c10-py2.3.egg': 'ce1e2ab5d3a0256456d9fc13800a7090', + 'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4', + 'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7', + 'setuptools-0.6c10-py2.6.egg': '58ea40aef06da02ce641495523a0b7f5', 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', From e3e7199a5e9487b16beb24c59d111303f765c097 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 20 Oct 2009 14:16:29 +0000 Subject: [PATCH 1081/8469] Update MD5's --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075567 --- ez_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 7aab12d11d..1ff1d3e7a6 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -32,6 +32,10 @@ 'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4', 'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7', 'setuptools-0.6c10-py2.6.egg': '58ea40aef06da02ce641495523a0b7f5', + 'setuptools-0.6c11-py2.3.egg': '2baeac6e13d414a9d28e7ba5b5a596de', + 'setuptools-0.6c11-py2.4.egg': 'bd639f9b0eac4c42497034dec2ec0c2b', + 'setuptools-0.6c11-py2.5.egg': '64c94f3bf7a72a13ec83e0b24f2749b2', + 'setuptools-0.6c11-py2.6.egg': 'bfa92100bd772d5a213eedd356d64086', 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', From 2a5eaaedacf84a2992fd800203276b1079b96bd1 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 28 Oct 2009 17:12:45 +0000 Subject: [PATCH 1082/8469] Bump version --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075925 --- ez_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- version.dat | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1ff1d3e7a6..997c453d1f 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -14,7 +14,7 @@ This file can also be run as a script to install or upgrade setuptools. """ import sys -DEFAULT_VERSION = "0.6c11" +DEFAULT_VERSION = "0.6c12" DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { diff --git a/release.sh b/release.sh index e184d0212b..5e38b70efa 100755 --- a/release.sh +++ b/release.sh @@ -7,7 +7,7 @@ # If your initials aren't PJE, don't run it. :) # -export VERSION="0.6c11" +export VERSION="0.6c12" python2.3 setup.py -q egg_info # force upload to be available python2.3 setup.py -q release source --target-version=2.3 upload && \ python2.4 setup.py -q release binary --target-version=2.4 upload && \ diff --git a/setup.py b/setup.py index b9a40769a8..d496268742 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ execfile(convert_path('setuptools/command/__init__.py'), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6c11" +VERSION = "0.6c12" from setuptools import setup, find_packages import sys diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a314ca7e0e..71eeff4974 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path import os.path -__version__ = '0.6c11' +__version__ = '0.6c12' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' diff --git a/version.dat b/version.dat index d312dddcbe..86f4657540 100755 --- a/version.dat +++ b/version.dat @@ -1,6 +1,6 @@ [setuptools] status = 'release candidate' major = 0 -build = 11 +build = 12 minor = 6 From 03cee8b587cf41af1a4ad1071cb6aa7b97c4f182 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 28 Oct 2009 17:12:57 +0000 Subject: [PATCH 1083/8469] Fix for issue 88 --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4075926 --- EasyInstall.txt | 4 ++++ setuptools/package_index.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 2bf69e9040..6dad8c4192 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1217,6 +1217,10 @@ displayed MD5 info (broken onto two lines for readability):: Release Notes/Change History ============================ +0.6final + * Fixed AttributeError under Python 2.3 when processing "HTTP authentication" + URLs (i.e., ones with a ``user:password@host``). + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 70b75a6f47..1a4fabdeca 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,6 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO -import httplib +import httplib, urllib from pkg_resources import * from distutils import log from distutils.errors import DistutilsError @@ -701,7 +701,7 @@ def open_with_auth(url): scheme, netloc, path, params, query, frag = urlparse.urlparse(url) if scheme in ('http', 'https'): - auth, host = urllib2.splituser(netloc) + auth, host = urllib.splituser(netloc) else: auth = None From 4478cdc28c1550f64b7918e3d88af08d0c28a0cb Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 5 Nov 2009 16:00:25 +0000 Subject: [PATCH 1084/8469] Backport to 0.6 --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4076123 --- EasyInstall.txt | 3 +++ setuptools/package_index.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 6dad8c4192..df11309a65 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1221,6 +1221,9 @@ Release Notes/Change History * Fixed AttributeError under Python 2.3 when processing "HTTP authentication" URLs (i.e., ones with a ``user:password@host``). + * Fixed bogus AttributeError when no local or downloadable packages are + available + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1a4fabdeca..78b07f4bbe 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -471,8 +471,9 @@ def find(env, req): (source and "a source distribution of " or ""), requirement, ) - self.info("Best match: %s", dist) - return dist.clone(location=self.download(dist.location, tmpdir)) + else: + self.info("Best match: %s", dist) + return dist.clone(location=self.download(dist.location, tmpdir)) def fetch(self, requirement, tmpdir, force_scan=False, source=False): @@ -489,7 +490,6 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): return None - def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) dists = match and [d for d in From 16dc2a11fb1b33955ad55ab00f186fcc909e35f6 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Mon, 1 Feb 2010 16:42:04 +0000 Subject: [PATCH 1085/8469] Backport SF download fix --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4077904 --- EasyInstall.txt | 2 ++ setuptools/package_index.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index df11309a65..45bdf0c857 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1224,6 +1224,8 @@ Release Notes/Change History * Fixed bogus AttributeError when no local or downloadable packages are available + * Fix for recent Sourceforge downloading changes + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 78b07f4bbe..32498d0fd4 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -590,9 +590,8 @@ def open_url(self, url, warning=None): def _download_url(self, scheme, url, tmpdir): # Determine download filename # - name = filter(None,urlparse.urlparse(url)[2].split('/')) + name, fragment = egg_info_for_url(url) if name: - name = name[-1] while '..' in name: name = name.replace('..','.').replace('\\','_') else: @@ -613,6 +612,7 @@ def _download_url(self, scheme, url, tmpdir): self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) + def scan_url(self, url): self.process_url(url, True) From 9e86a83d9b16147dfda3ae2d74c2ed82c1c893a7 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 29 Apr 2010 16:09:17 +0000 Subject: [PATCH 1086/8469] Fix a problem with sandbox swapping 'open' and 'file' builtins. Support sandbox access to os.devnull. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4080622 --- setuptools/sandbox.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 00eb012410..4c5e7129db 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -105,8 +105,8 @@ def run(self, func): return func() finally: self._active = False - __builtin__.open = _file - __builtin__.file = _open + __builtin__.open = _open + __builtin__.file = _file self._copy(_os) def _mk_dual_path_wrapper(name): @@ -203,10 +203,10 @@ def _open(self, path, mode='r', *args, **kw): self._violation("open", path, mode, *args, **kw) return _open(path,mode,*args,**kw) - def tmpnam(self): - self._violation("tmpnam") + def tmpnam(self): self._violation("tmpnam") def _ok(self,path): + if hasattr(_os,'devnull') and path==_os.devnull: return True active = self._active try: self._active = False From 97128303bf077da33cc5b30ce71d853fb730b589 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sun, 22 Aug 2010 23:09:12 +0000 Subject: [PATCH 1087/8469] Fix quotes handling for GUI scripts on Windows when Python is in a directory with a space in the name. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4084273 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index af4e349768..014fc70d25 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1583,7 +1583,7 @@ def get_script_args(dist, executable=sys_executable, wininst=False): old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1]) or sys.platform!='win32': + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': hdr = new_header else: hdr = header From 7cfca7995a9e5de15663ea4f6e754aa001e6ea98 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 2 Oct 2010 19:16:45 +0000 Subject: [PATCH 1088/8469] Tarfile link support, and handle .pyd/.dll files installed as data on win32. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4085190 --- EasyInstall.txt | 5 +++++ setuptools/archive_util.py | 18 +++++++++--------- setuptools/command/easy_install.py | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 45bdf0c857..96ccc55fd0 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1226,6 +1226,11 @@ Release Notes/Change History * Fix for recent Sourceforge downloading changes + * Handle .exe's containing .pyd or .dll files installed as "data" on win32 + + * Extract copies of hardlinked and symlinked files in tarballs when extracting + source + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 5d72e7edc6..be81374653 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -180,11 +180,15 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): try: tarobj.chown = lambda *args: None # don't do any chowning! for member in tarobj: - if member.isfile() or member.isdir(): - name = member.name - # don't extract absolute paths or ones with .. in them - if not name.startswith('/') and '..' not in name: - dst = os.path.join(extract_dir, *name.split('/')) + name = member.name + # don't extract absolute paths or ones with .. in them + if not name.startswith('/') and '..' not in name: + dst = os.path.join(extract_dir, *name.split('/')) + + while member.islnk() or member.issym(): + member = tarobj._getmember(member.linkname, member) + + if member.isfile() or member.isdir(): dst = progress_filter(name, dst) if dst: if dst.endswith(os.sep): @@ -198,8 +202,4 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): tarobj.close() - - extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile - - diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 014fc70d25..90f29320af 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1274,7 +1274,7 @@ def get_exe_prefixes(exe_filename): prefixes = [ ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), - ('PLATLIB/', ''), + ('PLATLIB/', ''), ('DATA/lib/site-packages/', ''), ('SCRIPTS/', 'EGG-INFO/scripts/') ] z = zipfile.ZipFile(exe_filename) From e6990dd3de14acea85f2285dddc5956318f139ee Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 9 Oct 2010 03:24:25 +0000 Subject: [PATCH 1089/8469] Backport from trunk --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4085332 --- setuptools/archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index be81374653..15d38de56e 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -185,10 +185,10 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): if not name.startswith('/') and '..' not in name: dst = os.path.join(extract_dir, *name.split('/')) - while member.islnk() or member.issym(): + while member is not None and member.islnk() or member.issym(): member = tarobj._getmember(member.linkname, member) - if member.isfile() or member.isdir(): + if member is not None and member.isfile() or member.isdir(): dst = progress_filter(name, dst) if dst: if dst.endswith(os.sep): From f86fa331e8d2165d9aba0bc6d44af1db987d5239 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 9 Oct 2010 03:33:27 +0000 Subject: [PATCH 1090/8469] Backport. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4085334 --- setuptools/archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 15d38de56e..eae3729a69 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -185,10 +185,10 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): if not name.startswith('/') and '..' not in name: dst = os.path.join(extract_dir, *name.split('/')) - while member is not None and member.islnk() or member.issym(): + while member is not None and (member.islnk() or member.issym()): member = tarobj._getmember(member.linkname, member) - if member is not None and member.isfile() or member.isdir(): + if member is not None and (member.isfile() or member.isdir()): dst = progress_filter(name, dst) if dst: if dst.endswith(os.sep): From ca8f80843db50fd079df0b62180d85c83cd937cc Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 12 Oct 2010 15:44:18 +0000 Subject: [PATCH 1091/8469] Backport --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4085381 --- setuptools/archive_util.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index eae3729a69..d26b383bc3 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -6,7 +6,7 @@ "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] -import zipfile, tarfile, os, shutil +import zipfile, tarfile, os, shutil, posixpath from pkg_resources import ensure_directory from distutils.errors import DistutilsError @@ -169,14 +169,12 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): by ``tarfile.open()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. """ - try: tarobj = tarfile.open(filename) except tarfile.TarError: raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) ) - try: tarobj.chown = lambda *args: None # don't do any chowning! for member in tarobj: @@ -184,9 +182,12 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): # don't extract absolute paths or ones with .. in them if not name.startswith('/') and '..' not in name: dst = os.path.join(extract_dir, *name.split('/')) - while member is not None and (member.islnk() or member.issym()): - member = tarobj._getmember(member.linkname, member) + linkpath = member.linkname + if member.issym(): + linkpath = posixpath.join(posixpath.dirname(member.name), linkpath) + linkpath = posixpath.normpath(linkpath) + member = tarobj._getmember(linkpath) if member is not None and (member.isfile() or member.isdir()): dst = progress_filter(name, dst) @@ -201,5 +202,4 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): finally: tarobj.close() - extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile From 2e97ab0fbc5862025968cf6d10b6011f2a585cf1 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 20 Jan 2011 18:50:00 +0000 Subject: [PATCH 1092/8469] Fix path problems when pkg_resources is installed, but not setuptools. (Also, remove some obsolete MD5s.) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4088124 --- ez_setup.py | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 997c453d1f..d8d25db1c5 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -18,16 +18,6 @@ DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { - 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', - 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', - 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', - 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', - 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', - 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', - 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', - 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', - 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', - 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', 'setuptools-0.6c10-py2.3.egg': 'ce1e2ab5d3a0256456d9fc13800a7090', 'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4', 'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7', @@ -36,23 +26,6 @@ 'setuptools-0.6c11-py2.4.egg': 'bd639f9b0eac4c42497034dec2ec0c2b', 'setuptools-0.6c11-py2.5.egg': '64c94f3bf7a72a13ec83e0b24f2749b2', 'setuptools-0.6c11-py2.6.egg': 'bfa92100bd772d5a213eedd356d64086', - 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', - 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', - 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', - 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', - 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', - 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', - 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', - 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', - 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', - 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', - 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', - 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', - 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', - 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', - 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', - 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', - 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', @@ -112,11 +85,11 @@ def do_download(): "\n\n(Currently using %r)" ) % (version, e.args[0]) sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return do_download() except pkg_resources.DistributionNotFound: - return do_download() + pass + + del pkg_resources, sys.modules['pkg_resources'] # reload ok + return do_download() def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, From 9f3c9810de9de1358d4f62ebd74bdf2c866c7d73 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 23 Mar 2011 20:38:12 +0000 Subject: [PATCH 1093/8469] Backport. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4088793 --- EasyInstall.txt | 4 ++++ setuptools/package_index.py | 45 +++++++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 96ccc55fd0..91b6cc178a 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1231,6 +1231,10 @@ Release Notes/Change History * Extract copies of hardlinked and symlinked files in tarballs when extracting source + * Support HTTP servers that return multiple 'Content-Length' headers + + * Support user/password credentials in Subversion (svnserve) URLs + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 32498d0fd4..9a9c5d62e7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -550,7 +550,7 @@ def _download_to(self, url, filename): bs = self.dl_blocksize size = -1 if "content-length" in headers: - size = int(headers["Content-Length"]) + size = max(map(int,headers.getheaders("Content-Length"))) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: @@ -639,10 +639,39 @@ def _download_html(self, url, headers, filename): os.unlink(filename) raise DistutilsError("Unexpected HTML page found at "+url) + + + + + + + + + + + + + + + def _download_svn(self, url, filename): url = url.split('#',1)[0] # remove any fragment for svn's sake + creds = '' + if url.lower().startswith('svn:') and '@' in url: + scheme, netloc, path, p, q, f = urlparse.urlparse(url) + if not netloc and path.startswith('//') and '/' in path[2:]: + netloc, path = path[2:].split('/',1) + auth, host = urllib.splituser(netloc) + if auth: + if ':' in auth: + user, pw = auth.split(':',1) + creds = " --username=%s --password=%s" % (user, pw) + else: + creds = " --username="+auth + netloc = host + url = urlparse.urlunparse((scheme, netloc, url, p, q, f)) self.info("Doing subversion checkout from %s to %s", url, filename) - os.system("svn checkout -q %s %s" % (url, filename)) + os.system("svn checkout%s -q %s %s" % (creds, url, filename)) return filename def debug(self, msg, *args): @@ -654,6 +683,18 @@ def info(self, msg, *args): def warn(self, msg, *args): log.warn(msg, *args) + + + + + + + + + + + + # This pattern matches a character entity reference (a decimal numeric # references, a hexadecimal numeric reference, or a named reference). entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub From 8d7af6e22f1275ac58b3eccfd43db6e83dfc6e33 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 23 Mar 2011 21:09:16 +0000 Subject: [PATCH 1094/8469] Fixed skipping extraction of files or directories containing '..' in their names. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4088795 --- EasyInstall.txt | 6 ++++++ setuptools/archive_util.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 91b6cc178a..753baf65ed 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1235,6 +1235,12 @@ Release Notes/Change History * Support user/password credentials in Subversion (svnserve) URLs + * Fixed problems accessing /dev/null inside the script sandbox, and the sandbox + swapping the ``open`` and file`` builtins. + + * Fixed skipping extraction of files or directories containing '..' in their + names + 0.6c11 * Fix installed script .exe files not working with 64-bit Python on Windows (wasn't actually released in 0.6c10 due to a lost checkin) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index d26b383bc3..d44264f821 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -138,7 +138,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): name = info.filename # don't extract absolute paths or ones with .. in them - if name.startswith('/') or '..' in name: + if name.startswith('/') or '..' in name.split('/'): continue target = os.path.join(extract_dir, *name.split('/')) @@ -180,7 +180,7 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): for member in tarobj: name = member.name # don't extract absolute paths or ones with .. in them - if not name.startswith('/') and '..' not in name: + if not name.startswith('/') and '..' not in name.split('/'): dst = os.path.join(extract_dir, *name.split('/')) while member is not None and (member.islnk() or member.issym()): linkpath = member.linkname From a6e8eec3e46dfa7e37259c63da244049ce08f603 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 31 May 2011 20:10:56 +0000 Subject: [PATCH 1095/8469] Document 64-bit Windows workaround --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4088846 --- README.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 03a2afcd53..22d76da2db 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,17 @@ Installation Instructions Windows ======= -Install setuptools using the provided ``.exe`` installer. If you've previously +32-bit version of Python + Install setuptools using the provided ``.exe`` installer. + +64-bit versions of Python + Download `ez_setup.py`_ and run it; it will download the appropriate .egg file and install it for you. (Currently, the provided ``.exe`` installer does not support 64-bit versions of Python for Windows, due to a `distutils installer compatibility issue`_ + +.. _ez_setup.py: http://peak.telecommunity.com/dist/ez_setup.py +.. _distutils installer compatibility issue: http://bugs.python.org/issue6792 + + +NOTE: Regardless of what sort of Python you're using, if you've previously installed older versions of setuptools, please delete all ``setuptools*.egg`` and ``setuptools.pth`` files from your system's ``site-packages`` directory (and any other ``sys.path`` directories) FIRST. From 58a658b26d1c95b31d02050dcccd648d2e4ce27b Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 20 Jun 2011 22:55:16 +0100 Subject: [PATCH 1096/8469] Changes to support 2.x and 3.x in the same codebase. --HG-- branch : distribute extra : rebase_source : 7d3608edee54a43789f0574d702fb839628b5071 --- pkg_resources.py | 67 +++++++++++++++------- setup.py | 6 +- setuptools/command/alias.py | 14 ++--- setuptools/command/bdist_egg.py | 5 +- setuptools/command/easy_install.py | 52 ++++++++++------- setuptools/command/egg_info.py | 10 ++-- setuptools/command/install_scripts.py | 2 +- setuptools/command/rotate.py | 1 + setuptools/command/saveopts.py | 3 +- setuptools/command/sdist.py | 2 +- setuptools/command/setopt.py | 4 +- setuptools/command/upload.py | 18 +++--- setuptools/command/upload_docs.py | 11 ++-- setuptools/compat.py | 73 ++++++++++++++++++++++++ setuptools/depends.py | 4 +- setuptools/dist.py | 9 ++- setuptools/package_index.py | 82 +++++++++++++++------------ setuptools/sandbox.py | 17 +++--- setuptools/tests/__init__.py | 10 ++-- setuptools/tests/doctest.py | 58 +++++++++---------- setuptools/tests/server.py | 7 +-- setuptools/tests/test_develop.py | 5 +- setuptools/tests/test_easy_install.py | 7 +-- setuptools/tests/test_packageindex.py | 22 ++++--- setuptools/tests/test_resources.py | 17 +++--- tests/install_test.py | 18 +++--- tests/manual_test.py | 2 +- tests/test_distribute_setup.py | 6 +- 28 files changed, 332 insertions(+), 200 deletions(-) create mode 100644 setuptools/compat.py diff --git a/pkg_resources.py b/pkg_resources.py index 52d92669b3..f64745cb6e 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -14,12 +14,35 @@ """ import sys, os, zipimport, time, re, imp, types -from urlparse import urlparse, urlunparse +try: + from urlparse import urlparse, urlunparse +except ImportError: + from urllib.parse import urlparse, urlunparse try: frozenset except NameError: from sets import ImmutableSet as frozenset +try: + basestring + next = lambda o: o.next() + from cStringIO import StringIO + def exec_(code, globs=None, locs=None): + if globs is None: + frame = sys._getframe(1) + globs = frame.f_globals + if locs is None: + locs = frame.f_locals + del frame + elif locs is None: + locs = globs + exec("""exec code in globs, locs""") +except NameError: + basestring = str + from io import StringIO + exec_ = eval("exec") + def execfile(fn, globs, locs): + exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) # capture these to bypass sandboxing from os import utime @@ -42,7 +65,7 @@ # attribute is present to decide wether to reinstall the package _distribute = True -def _bypass_ensure_directory(name, mode=0777): +def _bypass_ensure_directory(name, mode=0x1FF): # 0777 # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') @@ -56,20 +79,20 @@ def _bypass_ensure_directory(name, mode=0777): def _declare_state(vartype, **kw): g = globals() - for name, val in kw.iteritems(): + for name, val in kw.items(): g[name] = val _state_vars[name] = vartype def __getstate__(): state = {} g = globals() - for k, v in _state_vars.iteritems(): + for k, v in _state_vars.items(): state[k] = g['_sget_'+v](g[k]) return state def __setstate__(state): g = globals() - for k, v in state.iteritems(): + for k, v in state.items(): g['_sset_'+_state_vars[k]](k, g[k], v) return state @@ -639,7 +662,7 @@ def find_plugins(self, env = full_env + plugin_env shadow_set = self.__class__([]) - map(shadow_set.add, self) # put all our entries in shadow_set + list(map(shadow_set.add, self)) # put all our entries in shadow_set for project_name in plugin_projects: @@ -650,7 +673,8 @@ def find_plugins(self, try: resolvees = shadow_set.resolve(req, env, installer) - except ResolutionError,v: + except ResolutionError: + v = sys.exc_info()[1] error_info[dist] = v # save error info if fallback: continue # try the next older version of project @@ -658,7 +682,7 @@ def find_plugins(self, break # give up on this project, keep going else: - map(shadow_set.add, resolvees) + list(map(shadow_set.add, resolvees)) distributions.update(dict.fromkeys(resolvees)) # success, no need to try any more versions of this project @@ -708,7 +732,8 @@ def __getstate__(self): return (self.entries[:], self.entry_keys.copy(), self.by_key.copy(), self.callbacks[:]) - def __setstate__(self, (entries, keys, by_key, callbacks)): + def __setstate__(self, e_k_b_c): + entries, keys, by_key, callbacks = e_k_b_c self.entries = entries[:] self.entry_keys = keys.copy() self.by_key = by_key.copy() @@ -1021,7 +1046,7 @@ def postprocess(self, tempname, filename): if os.name == 'posix': # Make the resource executable - mode = ((os.stat(tempname).st_mode) | 0555) & 07777 + mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777 os.chmod(tempname, mode) @@ -1239,7 +1264,7 @@ def run_script(self,script_name,namespace): len(script_text), 0, script_text.split('\n'), script_filename ) script_code = compile(script_text,script_filename,'exec') - exec script_code in namespace, namespace + exec_(script_code, namespace, namespace) def _has(self, path): raise NotImplementedError( @@ -1711,7 +1736,7 @@ def StringIO(*args, **kw): try: from cStringIO import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO return StringIO(*args,**kw) def find_nothing(importer, path_item, only=False): @@ -1999,8 +2024,8 @@ def load(self, require=True, env=None, installer=None): def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) - map(working_set.add, - working_set.resolve(self.dist.requires(self.extras),env,installer)) + list(map(working_set.add, + working_set.resolve(self.dist.requires(self.extras),env,installer))) @@ -2064,7 +2089,7 @@ def parse_group(cls, group, lines, dist=None): def parse_map(cls, data, dist=None): """Parse a map of entry point groups""" if isinstance(data,dict): - data = data.items() + data = list(data.items()) else: data = split_sections(data) maps = {} @@ -2229,7 +2254,7 @@ def activate(self,path=None): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - map(declare_namespace, self._get_metadata('namespace_packages.txt')) + list(map(declare_namespace, self._get_metadata('namespace_packages.txt'))) def egg_name(self): @@ -2258,7 +2283,7 @@ def __str__(self): def __getattr__(self,attr): """Delegate all unrecognized public attributes to .metadata provider""" if attr.startswith('_'): - raise AttributeError,attr + raise AttributeError(attr) return getattr(self._provider, attr) #@classmethod @@ -2337,7 +2362,7 @@ def insert_on(self, path, loc = None): nloc = _normalize_cached(loc) bdir = os.path.dirname(nloc) - npath= map(_normalize_cached, path) + npath = list(map(_normalize_cached, path)) bp = None for p, item in enumerate(npath): @@ -2466,7 +2491,7 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): while not TERMINATOR(line,p): if CONTINUE(line,p): try: - line = lines.next(); p = 0 + line = next(lines); p = 0 except StopIteration: raise ValueError( "\\ must not appear on the last nonblank line" @@ -2558,7 +2583,7 @@ def __eq__(self,other): def __contains__(self,item): if isinstance(item,Distribution): - if item.key <> self.key: return False + if item.key != self.key: return False if self.index: item = item.parsed_version # only get if we need it elif isinstance(item,basestring): item = parse_version(item) @@ -2727,5 +2752,5 @@ def _initialize(g): # all distributions added to the working set in the future (e.g. by # calling ``require()``) will get activated as well. add_activation_listener(lambda dist: dist.activate()) -working_set.entries=[]; map(working_set.add_entry,sys.path) # match order +working_set.entries=[]; list(map(working_set.add_entry,sys.path)) # match order diff --git a/setup.py b/setup.py index bfb6240646..5b444bf7e7 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,8 @@ import os src_root = None -if sys.version_info >= (3,): +do_2to3 = False +if sys.version_info >= (3,) and do_2to3: tmp_src = os.path.join("build", "src") from distutils.filelist import FileList from distutils import dir_util, file_util, util, log @@ -66,7 +67,8 @@ def build_package_data(self): # previous version doesn't have convert_2to3_doctests) if not hasattr(self.distribution, 'convert_2to3_doctests'): continue - + if not do_2to3: + continue if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index f5368b29e9..52384e1a28 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -9,7 +9,7 @@ def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) - if arg.split()<>[arg]: + if arg.split() != [arg]: return repr(arg) return arg @@ -33,7 +33,7 @@ def initialize_options(self): def finalize_options(self): option_base.finalize_options(self) - if self.remove and len(self.args)<>1: + if self.remove and len(self.args) != 1: raise DistutilsOptionError( "Must specify exactly one argument (the alias name) when " "using --remove" @@ -43,10 +43,10 @@ def run(self): aliases = self.distribution.get_option_dict('aliases') if not self.args: - print "Command Aliases" - print "---------------" + print("Command Aliases") + print("---------------") for alias in aliases: - print "setup.py alias", format_alias(alias, aliases) + print("setup.py alias", format_alias(alias, aliases)) return elif len(self.args)==1: @@ -54,10 +54,10 @@ def run(self): if self.remove: command = None elif alias in aliases: - print "setup.py alias", format_alias(alias, aliases) + print("setup.py alias", format_alias(alias, aliases)) return else: - print "No alias definition found for %r" % alias + print("No alias definition found for %r" % alias) return else: alias = self.args[0] diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 68ca15c799..007f3ba93c 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -17,6 +17,7 @@ from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint from types import CodeType +from setuptools.compat import basestring, next from setuptools.extension import Library def strip_module(filename): @@ -379,7 +380,7 @@ def get_ext_outputs(self): def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) - base,dirs,files = walker.next() + base,dirs,files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') yield base,dirs,files @@ -407,7 +408,7 @@ def write_safety_flag(egg_dir, safe): for flag,fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): - if safe is None or bool(safe)<>flag: + if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: f=open(fn,'wt'); f.write('\n'); f.close() diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 58e7ab3913..b8a1034683 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -25,6 +25,7 @@ from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info +from setuptools.compat import iteritems, maxsize, xrange, basestring, unicode from pkg_resources import yield_lines, normalize_path, resource_string, \ ensure_directory, get_distribution, find_distributions, \ Environment, Requirement, Distribution, \ @@ -187,7 +188,7 @@ def delete_blockers(self, blockers): def finalize_options(self): if self.version: - print 'distribute %s' % get_distribution('distribute').version + print('distribute %s' % get_distribution('distribute').version) sys.exit() py_version = sys.version.split()[0] @@ -367,7 +368,7 @@ def pseudo_tempname(self): try: pid = os.getpid() except: - pid = random.randint(0,sys.maxint) + pid = random.randint(0, maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) def warn_deprecated_options(self): @@ -412,7 +413,7 @@ def check_site_dir(self): self.pth_file = None PYTHONPATH = os.environ.get('PYTHONPATH','').split(os.pathsep) - if instdir not in map(normalize_path, filter(None,PYTHONPATH)): + if instdir not in map(normalize_path, [_f for _f in PYTHONPATH if _f]): # only PYTHONPATH dirs need a site.py, so pretend it's there self.sitepy_installed = True elif self.multi_version and not os.path.exists(pth_file): @@ -668,11 +669,13 @@ def process_distribution(self, requirement, dist, deps=True, *info): distros = WorkingSet([]).resolve( [requirement], self.local_index, self.easy_install ) - except DistributionNotFound, e: + except DistributionNotFound: + e = sys.exc_info()[1] raise DistutilsError( "Could not find required distribution %s" % e.args ) - except VersionConflict, e: + except VersionConflict: + e = sys.exc_info()[1] raise DistutilsError( "Installed distribution %s conflicts with requirement %s" % e.args @@ -758,7 +761,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target,0755) + chmod(target,0x1ED) # 0755 @@ -872,7 +875,7 @@ def install_exe(self, dist_filename, tmpdir): f = open(pkg_inf,'w') f.write('Metadata-Version: 1.0\n') for k,v in cfg.items('metadata'): - if k<>'target_version': + if k != 'target_version': f.write('%s: %s\n' % (k.replace('_','-').title(), v)) f.close() script_dir = os.path.join(egg_info,'scripts') @@ -1069,7 +1072,8 @@ def run_setup(self, setup_script, setup_base, args): ) try: run_setup(setup_script, args) - except SystemExit, v: + except SystemExit: + v = sys.exc_info()[1] raise DistutilsError("Setup script exited with %s" % (v.args[0],)) def build_and_install(self, setup_script, setup_base): @@ -1149,7 +1153,7 @@ def pf(src,dst): self.byte_compile(to_compile) if not self.dry_run: for f in to_chmod: - mode = ((os.stat(f)[stat.ST_MODE]) | 0555) & 07755 + mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED # 0555, 07755 chmod(f, mode) def byte_compile(self, to_compile): @@ -1263,10 +1267,10 @@ def create_home_path(self): if not self.user: return home = convert_path(os.path.expanduser("~")) - for name, path in self.config_vars.iteritems(): + for name, path in iteritems(self.config_vars): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0700)" % path) - os.makedirs(path, 0700) + os.makedirs(path, 0x1C0) # 0700 @@ -1317,7 +1321,8 @@ def _expand(self, *attrs): def get_site_dirs(): # return a list of 'site' dirs - sitedirs = filter(None,os.environ.get('PYTHONPATH','').split(os.pathsep)) + sitedirs = [_f for _f in os.environ.get('PYTHONPATH', + '').split(os.pathsep) if _f] prefixes = [sys.prefix] if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) @@ -1355,7 +1360,7 @@ def get_site_dirs(): if HAS_USER_SITE: sitedirs.append(site.USER_SITE) - sitedirs = map(normalize_path, sitedirs) + sitedirs = list(map(normalize_path, sitedirs)) return sitedirs @@ -1417,7 +1422,8 @@ def extract_wininst_cfg(dist_filename): return None f.seek(prepended-12) - import struct, StringIO, ConfigParser + from setuptools.compat import StringIO, ConfigParser + import struct tag, cfglen, bmlen = struct.unpack("2 or not name.endswith('.pth'): + if len(parts) != 2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue @@ -1490,11 +1496,12 @@ class PthDistributions(Environment): dirty = False def __init__(self, filename, sitedirs=()): - self.filename = filename; self.sitedirs=map(normalize_path, sitedirs) + self.filename = filename + self.sitedirs = list(map(normalize_path, sitedirs)) self.basedir = normalize_path(os.path.dirname(self.filename)) self._load(); Environment.__init__(self, [], None, None) for path in yield_lines(self.paths): - map(self.add, find_distributions(path, True)) + list(map(self.add, find_distributions(path, True))) def _load(self): self.paths = [] @@ -1623,7 +1630,7 @@ def auto_chmod(func, arg, exc): chmod(arg, stat.S_IWRITE) return func(arg) exc = sys.exc_info() - raise exc[0], (exc[1][0], exc[1][1] + (" %s %s" % (func,arg))) + raise exc[0](exc[1][0], exc[1][1] + (" %s %s" % (func,arg))) def uncache_zipdir(path): """Ensure that the importer caches dont have stale info for `path`""" @@ -1723,7 +1730,8 @@ def chmod(path, mode): log.debug("changing mode of %s to %o", path, mode) try: _chmod(path, mode) - except os.error, e: + except os.error: + e = sys.exc_info()[1] log.debug("chmod failed: %s", e) def fix_jython_executable(executable, options): @@ -1799,7 +1807,7 @@ def onerror(*args): names = [] try: names = os.listdir(path) - except os.error, err: + except os.error: onerror(os.listdir, path, sys.exc_info()) for name in names: fullname = os.path.join(path, name) @@ -1812,7 +1820,7 @@ def onerror(*args): else: try: os.remove(fullname) - except os.error, err: + except os.error: onerror(os.remove, fullname, sys.exc_info()) try: os.rmdir(path) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 46cdf4e097..9ccbe68fb8 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -8,11 +8,12 @@ from distutils.errors import * from distutils import log from setuptools.command.sdist import sdist +from setuptools.compat import basestring from distutils.util import convert_path from distutils.filelist import FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename -from sdist import walk_revctrl +from setuptools.command.sdist import walk_revctrl class egg_info(Command): description = "create a distribution's .egg-info directory" @@ -51,7 +52,7 @@ def initialize_options(self): self.vtags = None def save_version_info(self, filename): - from setopt import edit_config + from setuptools.command.setopt import edit_config edit_config( filename, {'egg_info': @@ -220,7 +221,7 @@ def get_svn_revision(self): f.close() if data.startswith('10') or data.startswith('9') or data.startswith('8'): - data = map(str.splitlines,data.split('\n\x0c\n')) + data = list(map(str.splitlines,data.split('\n\x0c\n'))) del data[0][0] # get rid of the '8' or '9' or '10' dirurl = data[0][3] localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) @@ -386,7 +387,8 @@ def write_pkg_info(cmd, basename, filename): metadata.name, metadata.version = oldname, oldver safe = getattr(cmd.distribution,'zip_safe',None) - import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe) + from setuptools.command import bdist_egg + bdist_egg.write_safety_flag(cmd.egg_info, safe) def warn_depends_obsolete(cmd, basename, filename): if os.path.exists(filename): diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 6ce1b99319..251190bad7 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -49,5 +49,5 @@ def write_script(self, script_name, contents, mode="t", *ignored): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target,0755) + chmod(target,0x1ED) # 0755 diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 11b6eae82b..b10acfb41f 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -1,5 +1,6 @@ import distutils, os from setuptools import Command +from setuptools.compat import basestring from distutils.util import convert_path from distutils import log from distutils.errors import * diff --git a/setuptools/command/saveopts.py b/setuptools/command/saveopts.py index 1180a440c9..7209be4cd9 100755 --- a/setuptools/command/saveopts.py +++ b/setuptools/command/saveopts.py @@ -9,10 +9,9 @@ class saveopts(option_base): def run(self): dist = self.distribution - commands = dist.command_options.keys() settings = {} - for cmd in commands: + for cmd in dist.command_options: if cmd=='saveopts': continue # don't save our own options! diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 3442fe4be6..499a3fb9c2 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -178,7 +178,7 @@ def add_defaults(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = filter(os.path.isfile, glob(pattern)) + files = list(filter(os.path.isfile, glob(pattern))) if files: self.filelist.extend(files) diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index dbf3a94ec1..aa468c88fe 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -47,9 +47,9 @@ 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 ConfigParser import RawConfigParser + from setuptools.compat import ConfigParser log.debug("Reading configuration from %s", filename) - opts = RawConfigParser() + opts = ConfigParser.RawConfigParser() opts.read([filename]) for section, options in settings.items(): if options is None: diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 1f49745e3e..6b18d761da 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -11,13 +11,12 @@ except ImportError: from md5 import md5 import os +import sys import socket import platform -import ConfigParser -import httplib import base64 -import urlparse -import cStringIO as StringIO + +from setuptools.compat import urlparse, StringIO, httplib, ConfigParser class upload(Command): @@ -49,7 +48,7 @@ def finalize_options(self): raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) @@ -148,14 +147,14 @@ def upload_file(self, command, pyversion, filename): # We can't use urllib2 since we need to send the Basic # auth right with the first request schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) + urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': http = httplib.HTTPConnection(netloc) elif schema == 'https': http = httplib.HTTPSConnection(netloc) else: - raise AssertionError, "unsupported schema "+schema + raise AssertionError("unsupported schema " + schema) data = '' loglevel = log.INFO @@ -168,7 +167,8 @@ def upload_file(self, command, pyversion, filename): http.putheader('Authorization', auth) http.endheaders() http.send(body) - except socket.error, e: + except socket.error: + e = sys.exc_info()[1] self.announce(str(e), log.ERROR) return @@ -180,4 +180,4 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 + print('-'*75, r.read(), '-'*75) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 213f7b588e..505ddadb3a 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -8,9 +8,7 @@ import os import socket import zipfile -import httplib import base64 -import urlparse import tempfile import sys @@ -22,6 +20,8 @@ except ImportError: from setuptools.command.upload import upload +from setuptools.compat import httplib, urlparse + _IS_PYTHON3 = sys.version > '3' try: @@ -137,7 +137,7 @@ def upload_file(self, filename): # We can't use urllib2 since we need to send the Basic # auth right with the first request schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) + urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': conn = httplib.HTTPConnection(netloc) @@ -157,7 +157,8 @@ def upload_file(self, filename): conn.putheader('Authorization', auth) conn.endheaders() conn.send(body) - except socket.error, e: + except socket.error: + e = sys.exc_info()[1] self.announce(str(e), log.ERROR) return @@ -175,4 +176,4 @@ def upload_file(self, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 + print('-'*75, r.read(), '-'*75) diff --git a/setuptools/compat.py b/setuptools/compat.py new file mode 100644 index 0000000000..dfbb314d6d --- /dev/null +++ b/setuptools/compat.py @@ -0,0 +1,73 @@ +import sys + +if sys.version_info[0] < 3: + PY3 = False + + basestring = basestring + import __builtin__ as builtins + import ConfigParser + from cStringIO import StringIO + BytesIO = StringIO + execfile = execfile + func_code = lambda o: o.func_code + func_globals = lambda o: o.func_globals + im_func = lambda o: o.im_func + from htmlentitydefs import name2codepoint + import httplib + from BaseHTTPServer import HTTPServer + from SimpleHTTPServer import SimpleHTTPRequestHandler + iteritems = lambda o: o.iteritems + long_type = long + maxsize = sys.maxint + next = lambda o: o.next() + numeric_types = (int, long, float) + reduce = reduce + unichr = unichr + unicode = unicode + from urllib import url2pathname + import urllib2 + from urllib2 import urlopen, HTTPError, URLError, unquote, splituser + from urlparse import urlparse, urlunparse, urljoin + xrange = xrange + + def exec_(code, globs=None, locs=None): + if globs is None: + frame = sys._getframe(1) + globs = frame.f_globals + if locs is None: + locs = frame.f_locals + del frame + elif locs is None: + locs = globs + exec("""exec code in globs, locs""") + +else: + PY3 = True + + basestring = str + import builtins + import configparser as ConfigParser + exec_ = eval('exec') + from io import StringIO, BytesIO + func_code = lambda o: o.__code__ + func_globals = lambda o: o.__globals__ + im_func = lambda o: o.__func__ + from html.entities import name2codepoint + import http.client as httplib + from http.server import HTTPServer, SimpleHTTPRequestHandler + iteritems = lambda o: o.items + long_type = int + maxsize = sys.maxsize + next = next + numeric_types = (int, float) + from functools import reduce + unichr = chr + unicode = str + from urllib.error import HTTPError, URLError + import urllib.request as urllib2 + from urllib.request import urlopen, url2pathname + from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin + xrange = range + + def execfile(fn, globs, locs): + exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) diff --git a/setuptools/depends.py b/setuptools/depends.py index 4b7b343760..8b9d1217b1 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -36,7 +36,7 @@ def full_name(self): def version_ok(self,version): """Is 'version' sufficiently up-to-date?""" return self.attribute is None or self.format is None or \ - str(version)<>"unknown" and version >= self.requested_version + str(version) != "unknown" and version >= self.requested_version def get_version(self, paths=None, default="unknown"): @@ -103,7 +103,7 @@ def _iter_code(code): ptr += 3 if op==EXTENDED_ARG: - extended_arg = arg * 65536L + extended_arg = arg * long_type(65536) continue else: diff --git a/setuptools/dist.py b/setuptools/dist.py index 0ad18122cf..ebe02065be 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,11 +1,13 @@ __all__ = ['Distribution'] import re +import sys from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib +from setuptools.compat import numeric_types, basestring from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd @@ -100,7 +102,8 @@ def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: pkg_resources.EntryPoint.parse_map(value) - except ValueError, e: + except ValueError: + e = sys.exc_info()[1] raise DistutilsSetupError(e) def check_test_suite(dist, attr, value): @@ -223,7 +226,7 @@ def __init__ (self, attrs=None): if not hasattr(self,ep.name): setattr(self,ep.name,None) _Distribution.__init__(self,attrs) - if isinstance(self.metadata.version, (int,long,float)): + if isinstance(self.metadata.version, numeric_types): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) @@ -526,7 +529,7 @@ def _exclude_packages(self,packages): raise DistutilsSetupError( "packages: setting must be a list or tuple (%r)" % (packages,) ) - map(self.exclude_package, packages) + list(map(self.exclude_package, packages)) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f064b110d5..589dade619 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,9 +1,12 @@ """PyPI and direct package downloading""" -import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO -import httplib +import sys, os.path, re, shutil, random, socket from pkg_resources import * 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) try: from hashlib import md5 except ImportError: @@ -52,8 +55,8 @@ def parse_bdist_wininst(name): def egg_info_for_url(url): - scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) - base = urllib2.unquote(path.split('/')[-1]) + scheme, server, path, parameters, query, fragment = urlparse(url) + base = unquote(path.split('/')[-1]) if '#' in base: base, fragment = base.split('#',1) return base,fragment @@ -144,14 +147,14 @@ def find_external_links(url, page): rels = map(str.strip, rel.lower().split(',')) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): - yield urlparse.urljoin(url, htmldecode(match.group(1))) + yield urljoin(url, htmldecode(match.group(1))) for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - yield urlparse.urljoin(url, htmldecode(match.group(1))) + yield urljoin(url, htmldecode(match.group(1))) user_agent = "Python-urllib/%s distribute/%s" % ( sys.version[:3], require('distribute')[0].version @@ -190,7 +193,7 @@ def process_url(self, url, retrieve=False): self.debug("Found link: %s", url) if dists or not retrieve or url in self.fetched_urls: - map(self.add, dists) + list(map(self.add, dists)) return # don't need the actual page if not self.url_ok(url): @@ -209,7 +212,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. - if isinstance(f, urllib2.HTTPError): + if isinstance(f, HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' else: @@ -217,7 +220,7 @@ def process_url(self, url, retrieve=False): page = page.decode(charset, "ignore") f.close() for match in HREF.finditer(page): - link = urlparse.urljoin(base, htmldecode(match.group(1))) + link = urljoin(base, htmldecode(match.group(1))) self.process_url(link) if url.startswith(self.index_url) and getattr(f,'code',None)!=404: page = self.process_index(url, page) @@ -236,11 +239,11 @@ def process_filename(self, fn, nested=False): dists = distros_for_filename(fn) if dists: self.debug("Found: %s", fn) - map(self.add, dists) + list(map(self.add, dists)) def url_ok(self, url, fatal=False): s = URL_SCHEME(url) - if (s and s.group(1).lower()=='file') or self.allows(urlparse.urlparse(url)[1]): + if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]): return True msg = "\nLink to % s ***BLOCKED*** by --allow-hosts\n" if fatal: @@ -256,7 +259,8 @@ def scan_egg_links(self, search_path): self.scan_egg_link(item, entry) def scan_egg_link(self, path, entry): - lines = filter(None, map(str.strip, open(os.path.join(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) @@ -268,9 +272,9 @@ def process_index(self,url,page): def scan(link): # Process a URL to see if it's for a package page if link.startswith(self.index_url): - parts = map( - urllib2.unquote, link[len(self.index_url):].split('/') - ) + parts = list(map( + unquote, link[len(self.index_url):].split('/') + )) if len(parts)==2 and '#' not in parts[1]: # it's a package page, sanitize and index it pkg = safe_name(parts[0]) @@ -282,7 +286,7 @@ def scan(link): # process an index page into the package-page index for match in HREF.finditer(page): try: - scan( urlparse.urljoin(url, htmldecode(match.group(1))) ) + scan( urljoin(url, htmldecode(match.group(1))) ) except ValueError: pass @@ -351,7 +355,7 @@ def obtain(self, requirement, installer=None): def check_md5(self, cs, info, filename, tfp): if re.match('md5=[0-9a-f]{32}$', info): self.debug("Validating md5 checksum for %s", filename) - if cs.hexdigest()<>info[4:]: + if cs.hexdigest() != info[4:]: tfp.close() os.unlink(filename) raise DistutilsError( @@ -377,7 +381,7 @@ def add_find_links(self, urls): def prescan(self): """Scan urls scheduled for prescanning (e.g. --find-links)""" if self.to_scan: - map(self.scan_url, self.to_scan) + list(map(self.scan_url, self.to_scan)) self.to_scan = None # from now on, go ahead and process immediately def not_found_in_index(self, requirement): @@ -569,7 +573,7 @@ def _download_to(self, url, filename): if '#' in url: url, info = url.split('#', 1) fp = self.open_url(url) - if isinstance(fp, urllib2.HTTPError): + if isinstance(fp, HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) ) @@ -608,28 +612,33 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url) - except (ValueError, httplib.InvalidURL), v: + except (ValueError, httplib.InvalidURL): + v = sys.exc_info()[1] msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) else: raise DistutilsError('%s %s' % (url, msg)) - except urllib2.HTTPError, v: + except urllib2.HTTPError: + v = sys.exc_info()[1] return v - except urllib2.URLError, v: + except urllib2.URLError: + v = sys.exc_info()[1] if warning: self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) - except httplib.BadStatusLine, v: + except httplib.BadStatusLine: + v = sys.exc_info()[1] if warning: self.warn(warning, v.line) else: raise DistutilsError('%s returned a bad status line. ' 'The server might be down, %s' % \ (url, v.line)) - except httplib.HTTPException, v: + except httplib.HTTPException: + v = sys.exc_info()[1] if warning: self.warn(warning, v) else: @@ -639,7 +648,7 @@ def open_url(self, url, warning=None): def _download_url(self, scheme, url, tmpdir): # Determine download filename # - name = filter(None,urlparse.urlparse(url)[2].split('/')) + name = [_f for _f in urlparse(url)[2].split('/') if _f] if name: name = name[-1] while '..' in name: @@ -657,7 +666,7 @@ def _download_url(self, scheme, url, tmpdir): if scheme=='svn' or scheme.startswith('svn+'): return self._download_svn(url, filename) elif scheme=='file': - return urllib.url2pathname(urlparse.urlparse(url)[2]) + return url2pathname(urlparse.urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) @@ -722,7 +731,6 @@ def decode_entity(match): elif what.startswith('#'): what = int(what[1:]) else: - from htmlentitydefs import name2codepoint what = name2codepoint.get(what, match.group(0)) return uchr(what) @@ -760,16 +768,16 @@ def _socket_timeout(*args, **kwargs): def open_with_auth(url): """Open a urllib2 request, handling HTTP authentication""" - scheme, netloc, path, params, query, frag = urlparse.urlparse(url) + scheme, netloc, path, params, query, frag = urlparse(url) if scheme in ('http', 'https'): - auth, host = urllib2.splituser(netloc) + auth, host = splituser(netloc) else: auth = None if auth: - auth = "Basic " + urllib2.unquote(auth).encode('base64').strip() - new_url = urlparse.urlunparse((scheme,host,path,params,query,frag)) + auth = "Basic " + unquote(auth).encode('base64').strip() + new_url = urlunparse((scheme,host,path,params,query,frag)) request = urllib2.Request(new_url) request.add_header("Authorization", auth) else: @@ -781,9 +789,9 @@ def open_with_auth(url): if auth: # Put authentication info back into request URL if same host, # so that links found on the page will work - s2, h2, path2, param2, query2, frag2 = urlparse.urlparse(fp.url) + s2, h2, path2, param2, query2, frag2 = urlparse(fp.url) if s2==scheme and h2==host: - fp.url = urlparse.urlunparse((s2,netloc,path2,param2,query2,frag2)) + fp.url = urlunparse((s2,netloc,path2,param2,query2,frag2)) return fp @@ -805,8 +813,8 @@ def fix_sf_url(url): def local_open(url): """Read a local path, with special support for directories""" - scheme, server, path, param, query, frag = urlparse.urlparse(url) - filename = urllib.url2pathname(path) + scheme, server, path, param, query, frag = urlparse(url) + filename = url2pathname(path) if os.path.isfile(filename): return urllib2.urlopen(url) elif path.endswith('/') and os.path.isdir(filename): @@ -827,8 +835,8 @@ def local_open(url): else: status, message, body = 404, "Path not found", "Not found" - return urllib2.HTTPError(url, status, message, - {'content-type':'text/html'}, cStringIO.StringIO(body)) + return HTTPError(url, status, message, + {'content-type':'text/html'}, StringIO(body)) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 8e0c09b5ea..41f1119b4c 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,4 +1,4 @@ -import os, sys, __builtin__, tempfile, operator, pkg_resources +import os, sys, tempfile, operator, pkg_resources _os = sys.modules[os.name] try: _file = file @@ -6,6 +6,8 @@ _file = None _open = open from distutils.errors import DistutilsError +from setuptools.compat import builtins, execfile, reduce + __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] @@ -32,7 +34,8 @@ def run_setup(setup_script, args): {'__file__':setup_script, '__name__':'__main__'} ) ) - except SystemExit, v: + except SystemExit: + v = sys.exc_info()[1] if v.args and v.args[0]: raise # Normal exit, just return @@ -66,15 +69,15 @@ def run(self, func): try: self._copy(self) if _file: - __builtin__.file = self._file - __builtin__.open = self._open + builtins.file = self._file + builtins.open = self._open self._active = True return func() finally: self._active = False if _file: - __builtin__.file = _file - __builtin__.open = _open + builtins.file = _file + builtins.open = _open self._copy(_os) @@ -225,7 +228,7 @@ def _remap_pair(self,operation,src,dst,*args,**kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) - def open(self, file, flags, mode=0777): + def open(self, file, flags, mode=0x1FF): # 0777 """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 9af44a88bb..669bb8262f 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -7,6 +7,7 @@ from setuptools import Feature from distutils.core import Extension extract_constant, get_module_constant = None, None +from setuptools.compat import func_code from setuptools.depends import * from distutils.version import StrictVersion, LooseVersion from distutils.util import convert_path @@ -50,17 +51,18 @@ def f1(): x = "test" y = z + fc = func_code(f1) # unrecognized name - self.assertEqual(extract_constant(f1.func_code,'q', -1), None) + self.assertEqual(extract_constant(fc,'q', -1), None) # constant assigned - self.assertEqual(extract_constant(f1.func_code,'x', -1), "test") + self.assertEqual(extract_constant(fc,'x', -1), "test") # expression assigned - self.assertEqual(extract_constant(f1.func_code,'y', -1), -1) + self.assertEqual(extract_constant(fc,'y', -1), -1) # recognized name, not assigned - self.assertEqual(extract_constant(f1.func_code,'z', -1), None) + self.assertEqual(extract_constant(fc,'z', -1), None) def testFindModule(self): diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index be399a9d22..1f23fd8e93 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -9,7 +9,7 @@ try: basestring except NameError: - basestring = str,unicode + basestring = str try: enumerate @@ -109,7 +109,7 @@ def _test(): import sys, traceback, inspect, linecache, os, re, types import unittest, difflib, pdb, tempfile import warnings -from StringIO import StringIO +from setuptools.compat import StringIO, execfile, exec_, func_code, im_func # Don't whine about the deprecated is_private function in this # module's tests. @@ -240,7 +240,7 @@ def _normalize_module(module, depth=2): """ if inspect.ismodule(module): return module - elif isinstance(module, (str, unicode)): + elif isinstance(module, basestring): return __import__(module, globals(), locals(), ["*"]) elif module is None: return sys.modules[sys._getframe(depth).f_globals['__name__']] @@ -367,9 +367,9 @@ def trace_dispatch(self, *args): # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): if not inspect.ismodule(module): - raise TypeError, 'Expected a module: %r' % module + raise TypeError('Expected a module: %r' % module) if path.startswith('/'): - raise ValueError, 'Module-relative files may not have absolute paths' + raise ValueError('Module-relative files may not have absolute paths') # Find the base directory for the path. if hasattr(module, '__file__'): @@ -877,7 +877,7 @@ def _from_module(self, module, object): if module is None: return True elif inspect.isfunction(object): - return module.__dict__ is object.func_globals + return module.__dict__ is func_globals(object) elif inspect.isclass(object): return module.__name__ == object.__module__ elif inspect.getmodule(object) is not None: @@ -895,7 +895,7 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen): add them to `tests`. """ if self._verbose: - print 'Finding tests in %s' % name + print('Finding tests in %s' % name) # If we've already processed this object, then ignore it. if id(obj) in seen: @@ -948,7 +948,7 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen): if isinstance(val, staticmethod): val = getattr(obj, valname) if isinstance(val, classmethod): - val = getattr(obj, valname).im_func + val = im_func(getattr(obj, valname)) # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or @@ -1020,8 +1020,8 @@ def _find_lineno(self, obj, source_lines): break # Find the line number for functions & methods. - if inspect.ismethod(obj): obj = obj.im_func - if inspect.isfunction(obj): obj = obj.func_code + if inspect.ismethod(obj): obj = im_func(obj) + if inspect.isfunction(obj): obj = func_code(obj) if inspect.istraceback(obj): obj = obj.tb_frame if inspect.isframe(obj): obj = obj.f_code if inspect.iscode(obj): @@ -1250,8 +1250,8 @@ def __run(self, test, compileflags, out): # keyboard interrupts.) try: # Don't blink! This is where the user's code gets run. - exec compile(example.source, filename, "single", - compileflags, 1) in test.globs + exec_(compile(example.source, filename, "single", + compileflags, 1), test.globs) self.debugger.set_continue() # ==== Example Finished ==== exception = None except KeyboardInterrupt: @@ -1335,7 +1335,7 @@ def __patched_linecache_getlines(self, filename, module_globals=None): if m and m.group('name') == self.test.name: example = self.test.examples[int(m.group('examplenum'))] return example.source.splitlines(True) - elif self.save_linecache_getlines.func_code.co_argcount>1: + elif func_code(self.save_linecache_getlines).co_argcount > 1: return self.save_linecache_getlines(filename, module_globals) else: return self.save_linecache_getlines(filename) @@ -1427,28 +1427,28 @@ def summarize(self, verbose=None): failed.append(x) if verbose: if notests: - print len(notests), "items had no tests:" + print(len(notests), "items had no tests:") notests.sort() for thing in notests: - print " ", thing + print(" ", thing) if passed: - print len(passed), "items passed all tests:" + print(len(passed), "items passed all tests:") passed.sort() for thing, count in passed: - print " %3d tests in %s" % (count, thing) + print(" %3d tests in %s" % (count, thing)) if failed: - print self.DIVIDER - print len(failed), "items had failures:" + print(self.DIVIDER) + print(len(failed), "items had failures:") failed.sort() for thing, (f, t) in failed: - print " %3d of %3d in %s" % (f, t, thing) + print(" %3d of %3d in %s" % (f, t, thing)) if verbose: - print totalt, "tests in", len(self._name2ft), "items." - print totalt - totalf, "passed and", totalf, "failed." + print(totalt, "tests in", len(self._name2ft), "items.") + print(totalt - totalf, "passed and", totalf, "failed.") if totalf: - print "***Test Failed***", totalf, "failures." + print("***Test Failed***", totalf, "failures.") elif verbose: - print "Test passed." + print("Test passed.") return totalf, totalt #///////////////////////////////////////////////////////////////// @@ -1458,8 +1458,8 @@ def merge(self, other): d = self._name2ft for name, (f, t) in other._name2ft.items(): if name in d: - print "*** DocTestRunner.merge: '" + name + "' in both" \ - " testers; summing outcomes." + print("*** DocTestRunner.merge: '" + name + "' in both" \ + " testers; summing outcomes.") f2, t2 = d[name] f = f + f2 t = t + t2 @@ -2037,10 +2037,10 @@ def __init__(self, mod=None, globs=None, verbose=None, def runstring(self, s, name): test = DocTestParser().get_doctest(s, self.globs, name, None, None) if self.verbose: - print "Running string", name + print("Running string", name) (f,t) = self.testrunner.run(test) if self.verbose: - print f, "of", t, "examples failed in string", name + print(f, "of", t, "examples failed in string", name) return (f,t) def rundoc(self, object, name=None, module=None): @@ -2552,7 +2552,7 @@ def debug_script(src, pm=False, globs=None): try: execfile(srcfilename, globs, globs) except: - print sys.exc_info()[1] + print(sys.exc_info()[1]) pdb.post_mortem(sys.exc_info()[2]) else: # Note that %r is vital here. '%s' instead can, e.g., cause diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index f4aaaa1cfc..c70fab7bc2 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -1,10 +1,9 @@ """Basic http server for tests to simulate PyPI or custom indexes """ -import urllib2 import sys from threading import Thread -from BaseHTTPServer import HTTPServer -from SimpleHTTPServer import SimpleHTTPRequestHandler +from setuptools.compat import (urllib2, URLError, HTTPServer, + SimpleHTTPRequestHandler) class IndexServer(HTTPServer): """Basic single-threaded http server simulating a package index @@ -39,7 +38,7 @@ def stop(self): None, 5) else: urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port) - except urllib2.URLError: + except URLError: pass self.thread.join() diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 5576d5e5f2..752a70e9db 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -4,11 +4,11 @@ import os, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError from setuptools.command.develop import develop from setuptools.command import easy_install as easy_install_pkg +from setuptools.compat import StringIO from setuptools.dist import Distribution SETUP_PY = """\ @@ -73,7 +73,8 @@ def test_develop_with_setup_requires(self): try: try: dist = Distribution({'setup_requires': ['I_DONT_EXIST']}) - except DistutilsError, e: + except DistutilsError: + e = sys.exc_info()[1] error = str(e) if error == wanted: pass diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 85616605c2..af5644c5e2 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -3,7 +3,7 @@ import sys import os, shutil, tempfile, unittest import site -from StringIO import StringIO +from setuptools.compat import StringIO, next from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -67,7 +67,7 @@ def test_get_script_args(self): old_platform = sys.platform try: - name, script = get_script_args(dist).next() + name, script = next(get_script_args(dist)) finally: sys.platform = old_platform @@ -125,8 +125,7 @@ def test_no_find_links(self): cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') cmd.args = ['ok'] cmd.ensure_finalized() - keys = cmd.package_index.scanned_urls.keys() - keys.sort() + keys = sorted(cmd.package_index.scanned_urls.keys()) self.assertEquals(keys, ['link1', 'link2']) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 00d44ca689..8c685c01ca 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -2,10 +2,11 @@ """ # More would be better! import sys -import os, shutil, tempfile, unittest, urllib2 +import os, shutil, tempfile, unittest import pkg_resources +from setuptools.compat import urllib2, httplib, HTTPError import setuptools.package_index -from server import IndexServer +from tests.server import IndexServer class TestPackageIndex(unittest.TestCase): @@ -14,10 +15,11 @@ def test_bad_urls(self): url = 'http://127.0.0.1:0/nonesuch/test_package_index' try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assert_(url in str(v)) else: - self.assert_(isinstance(v,urllib2.HTTPError)) + self.assert_(isinstance(v, HTTPError)) # issue 16 # easy_install inquant.contentmirror.plone breaks because of a typo @@ -29,13 +31,13 @@ def test_bad_urls(self): url = 'url:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunk' try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assert_(url in str(v)) else: - self.assert_(isinstance(v, urllib2.HTTPError)) + self.assert_(isinstance(v, HTTPError)) def _urlopen(*args): - import httplib raise httplib.BadStatusLine('line') old_urlopen = urllib2.urlopen @@ -44,7 +46,8 @@ def _urlopen(*args): try: try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assert_('line' in str(v)) else: raise AssertionError('Should have raise here!') @@ -55,7 +58,8 @@ def _urlopen(*args): url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' try: index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assert_('nonnumeric port' in str(v)) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index c10ca21083..57536221da 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -3,7 +3,8 @@ # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh -import os, pkg_resources, sys, StringIO, tempfile, shutil +from setuptools.compat import StringIO, iteritems +import os, pkg_resources, sys, tempfile, shutil try: frozenset except NameError: from sets import ImmutableSet as frozenset @@ -139,7 +140,7 @@ def testResolve(self): for i in range(3): targets = list(ws.resolve(parse_requirements("Foo"), ad)) self.assertEqual(targets, [Foo]) - map(ws.add,targets) + list(map(ws.add,targets)) self.assertRaises(VersionConflict, ws.resolve, parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset @@ -262,7 +263,7 @@ def testRejects(self): def checkSubMap(self, m): self.assertEqual(len(m), len(self.submap_expect)) - for key, ep in self.submap_expect.iteritems(): + for key, ep in iteritems(self.submap_expect): self.assertEqual(repr(m.get(key)), repr(ep)) submap_expect = dict( @@ -286,10 +287,10 @@ def testParseList(self): def testParseMap(self): m = EntryPoint.parse_map({'xyz':self.submap_str}) self.checkSubMap(m['xyz']) - self.assertEqual(m.keys(),['xyz']) + self.assertEqual(list(m.keys()),['xyz']) m = EntryPoint.parse_map("[xyz]\n"+self.submap_str) self.checkSubMap(m['xyz']) - self.assertEqual(m.keys(),['xyz']) + self.assertEqual(list(m.keys()),['xyz']) self.assertRaises(ValueError, EntryPoint.parse_map, ["[xyz]", "[xyz]"]) self.assertRaises(ValueError, EntryPoint.parse_map, self.submap_str) @@ -549,12 +550,12 @@ def test_get_script_header_jython_workaround(self): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = sys.stderr = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = sys.stderr = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) @@ -606,7 +607,7 @@ def test_two_levels_deep(self): self.assertTrue("pkg1" in pkg_resources._namespace_packages.keys()) try: import pkg1.pkg2 - except ImportError, e: + except ImportError: self.fail("Distribute tried to import the parent namespace package") # check the _namespace_packages dict self.assertTrue("pkg1.pkg2" in pkg_resources._namespace_packages.keys()) diff --git a/tests/install_test.py b/tests/install_test.py index 02deb81860..97b79933e7 100644 --- a/tests/install_test.py +++ b/tests/install_test.py @@ -1,19 +1,19 @@ -import urllib2 import sys import os +from setuptools.compat import urllib2 if os.path.exists('distribute_setup.py'): - print 'distribute_setup.py exists in the current dir, aborting' + print('distribute_setup.py exists in the current dir, aborting') sys.exit(2) -print '**** Starting Test' -print '\n\n' +print('**** Starting Test') +print('\n\n') is_jython = sys.platform.startswith('java') if is_jython: import subprocess -print 'Downloading bootstrap' +print('Downloading bootstrap') file = urllib2.urlopen('http://nightly.ziade.org/distribute_setup.py') f = open('distribute_setup.py', 'w') f.write(file.read()) @@ -27,7 +27,7 @@ res = os.spawnv(os.P_WAIT, sys.executable, args) if res != 0: - print '**** Test failed, please send me the output at tarek@ziade.org' + print('**** Test failed, please send me the output at tarek@ziade.org') os.remove('distribute_setup.py') sys.exit(2) @@ -63,11 +63,11 @@ else: res = os.spawnv(os.P_WAIT, sys.executable, args) - print '\n\n' + print('\n\n') if res: - print '**** Test is OK' + print('**** Test is OK') else: - print '**** Test failed, please send me the output at tarek@ziade.org' + print('**** Test failed, please send me the output at tarek@ziade.org') finally: if os.path.exists(script_name): os.remove(script_name) diff --git a/tests/manual_test.py b/tests/manual_test.py index 0d5051f165..223567f439 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -9,7 +9,7 @@ import tempfile from distutils.command.install import INSTALL_SCHEMES from string import Template -from urllib2 import urlopen +from setuptools.compat import urlopen try: import subprocess diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 4151587fcc..37c6cf82d0 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -17,7 +17,7 @@ class TestSetup(unittest.TestCase): def urlopen(self, url): - return open(self.tarball) + return open(self.tarball, 'rb') def setUp(self): self.old_sys_path = copy.copy(sys.path) @@ -28,7 +28,7 @@ def setUp(self): "--dist-dir", "%s" % self.tmpdir) tarball = os.listdir(self.tmpdir)[0] self.tarball = os.path.join(self.tmpdir, tarball) - import urllib2 + from setuptools.compat import urllib2 urllib2.urlopen = self.urlopen def tearDown(self): @@ -38,7 +38,7 @@ def tearDown(self): def test_build_egg(self): # making it an egg - egg = _build_egg(self.tarball, self.tmpdir) + egg = _build_egg('Egg to be built', self.tarball, self.tmpdir) # now trying to import it sys.path[0] = egg From e65d621e1661512a4bcfb7d9a5320d3faa96aebe Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 21 Jun 2011 08:11:40 +0100 Subject: [PATCH 1097/8469] Fixed some bugs - tests now all pass under Python 3.3. --HG-- branch : distribute extra : rebase_source : 3498bfdc0d4c15e4276673b52e924c461ca353f0 --- setuptools/compat.py | 4 ++-- setuptools/tests/test_packageindex.py | 2 +- tests/api_tests.txt | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index dfbb314d6d..725818668b 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -16,7 +16,7 @@ import httplib from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler - iteritems = lambda o: o.iteritems + iteritems = lambda o: o.iteritems() long_type = long maxsize = sys.maxint next = lambda o: o.next() @@ -55,7 +55,7 @@ def exec_(code, globs=None, locs=None): from html.entities import name2codepoint import http.client as httplib from http.server import HTTPServer, SimpleHTTPRequestHandler - iteritems = lambda o: o.items + iteritems = lambda o: o.items() long_type = int maxsize = sys.maxsize next = next diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 8c685c01ca..cabbb48cd9 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -6,7 +6,7 @@ import pkg_resources from setuptools.compat import urllib2, httplib, HTTPError import setuptools.package_index -from tests.server import IndexServer +from setuptools.tests.server import IndexServer class TestPackageIndex(unittest.TestCase): diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 6cf6e66f27..c2e63b24e9 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -39,7 +39,7 @@ Distributions have various introspectable attributes:: >>> dist.py_version == sys.version[:3] True - >>> print dist.platform + >>> print(dist.platform) None Including various computed attributes:: @@ -199,7 +199,7 @@ shows up once when iterating the working set: You can ask a WorkingSet to ``find()`` a distribution matching a requirement:: >>> from pkg_resources import Requirement - >>> print ws.find(Requirement.parse("Foo==1.0")) # no match, return None + >>> print(ws.find(Requirement.parse("Foo==1.0"))) # no match, return None None >>> ws.find(Requirement.parse("Bar==0.9")) # match, return distribution @@ -211,7 +211,7 @@ working set triggers a ``pkg_resources.VersionConflict`` error: >>> try: ... ws.find(Requirement.parse("Bar==1.0")) ... except VersionConflict: - ... print 'ok' + ... print('ok') ok You can subscribe a callback function to receive notifications whenever a new @@ -219,7 +219,7 @@ distribution is added to a working set. The callback is immediately invoked once for each existing distribution in the working set, and then is called again for new distributions added thereafter:: - >>> def added(dist): print "Added", dist + >>> def added(dist): print("Added", dist) >>> ws.subscribe(added) Added Bar 0.9 >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") From 5861e0443331531fda2525fc4a714101968cb537 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 21 Jun 2011 09:32:50 +0100 Subject: [PATCH 1098/8469] Fixed some bugs, tests now also all pass on 2.7 and 3.2. --HG-- branch : distribute extra : rebase_source : 25c6042a716c49e3576605c3cf4e2878d5b85c18 --- setuptools/compat.py | 2 +- tests/api_tests.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 725818668b..7427c17fe7 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -6,7 +6,7 @@ basestring = basestring import __builtin__ as builtins import ConfigParser - from cStringIO import StringIO + from StringIO import StringIO BytesIO = StringIO execfile = execfile func_code = lambda o: o.func_code diff --git a/tests/api_tests.txt b/tests/api_tests.txt index c2e63b24e9..65443e093d 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -219,7 +219,7 @@ distribution is added to a working set. The callback is immediately invoked once for each existing distribution in the working set, and then is called again for new distributions added thereafter:: - >>> def added(dist): print("Added", dist) + >>> def added(dist): print("Added %s" % dist) >>> ws.subscribe(added) Added Bar 0.9 >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") From 6e67978d8e96d4e60462389ec71bfd2d51ac9109 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 21 Jun 2011 13:16:40 +0100 Subject: [PATCH 1099/8469] Fixed execfile in compat.py. --HG-- branch : distribute extra : rebase_source : cf31870fee8b718e14e209d957905c8d7573beba --- setuptools/compat.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 7427c17fe7..c5d28be560 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -69,5 +69,10 @@ def exec_(code, globs=None, locs=None): from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin xrange = range - def execfile(fn, globs, locs): + def execfile(fn, globs=None, locs=None): + if globs is None: + globs = globals() + if locs is None: + locs = globs exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) + From 32ba6930fa97bbeac9392cac3ed49aac87fd1018 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 21 Jun 2011 14:36:38 +0100 Subject: [PATCH 1100/8469] Fixed execfile in pkg_resources. --HG-- branch : distribute extra : rebase_source : 3148f97cc98edf62e982cb14b4b90527c4fc11fb --- pkg_resources.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index f64745cb6e..ae1f6c4d16 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -41,7 +41,11 @@ def exec_(code, globs=None, locs=None): basestring = str from io import StringIO exec_ = eval("exec") - def execfile(fn, globs, locs): + def execfile(fn, globs=None, locs=None): + if globs is None: + globs = globals() + if locs is None: + locs = globs exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) # capture these to bypass sandboxing From ac3ba239c54965e464e6047fd872f02ca1c0cb99 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 10 Oct 2012 09:39:21 +0100 Subject: [PATCH 1101/8469] Post-merge fixes for Python 3. --HG-- branch : distribute extra : source : 6b9041dea7b9197f6ea1fb993d7a05dd4f7c580d --- pkg_resources.py | 2 +- setuptools/command/easy_install.py | 11 ++++++----- setuptools/compat.py | 7 +++++++ setuptools/tests/test_bdist_egg.py | 2 +- setuptools/tests/test_packageindex.py | 2 +- setuptools/tests/test_sdist.py | 3 +-- setuptools/tests/test_test.py | 4 ++-- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9f4c55bcd4..b63e3f0f26 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2518,7 +2518,7 @@ def _compute_dependencies(self): # Including any condition expressions for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: distvers, mark = self._preparse_requirement(req) - parsed = parse_requirements(distvers).next() + parsed = next(parse_requirements(distvers)) parsed.marker_fn = compile_marker(mark) reqs.append(parsed) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 75d7b24b78..8ce71614fb 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -34,7 +34,8 @@ from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info -from setuptools.compat import iteritems, maxsize, xrange, basestring, unicode +from setuptools.compat import (iteritems, maxsize, xrange, basestring, unicode, + reraise) from pkg_resources import yield_lines, normalize_path, resource_string, \ ensure_directory, get_distribution, find_distributions, \ Environment, Requirement, Distribution, \ @@ -1133,7 +1134,7 @@ def _set_fetcher_options(self, base): 'site_dirs', 'allow_hosts', ) fetch_options = {} - for key, val in ei_opts.iteritems(): + for key, val in ei_opts.items(): if key not in fetch_directives: continue fetch_options[key.replace('_', '-')] = val[1] # create a settings dictionary suitable for `edit_config` @@ -1686,8 +1687,8 @@ def auto_chmod(func, arg, exc): if func is os.remove and os.name=='nt': chmod(arg, stat.S_IWRITE) return func(arg) - exc = sys.exc_info() - raise exc[0](exc[1][0], exc[1][1] + (" %s %s" % (func,arg))) + et, ev, _ = sys.exc_info() + reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg)))) def uncache_zipdir(path): """Ensure that the importer caches dont have stale info for `path`""" @@ -1888,7 +1889,7 @@ def onerror(*args): onerror(os.rmdir, path, sys.exc_info()) def current_umask(): - tmp = os.umask(022) + tmp = os.umask(0x12) # 022 os.umask(tmp) return tmp diff --git a/setuptools/compat.py b/setuptools/compat.py index c5d28be560..6d4ea539ef 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -41,6 +41,8 @@ def exec_(code, globs=None, locs=None): locs = globs exec("""exec code in globs, locs""") + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb""") else: PY3 = True @@ -76,3 +78,8 @@ def execfile(fn, globs=None, locs=None): locs = globs exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) + def reraise(tp, value, tb=None): + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 7da122cc31..1a12218645 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -4,9 +4,9 @@ import os, re, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError +from setuptools.compat import StringIO from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index d9e5022438..b596d37fc5 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -3,7 +3,7 @@ import sys import unittest import pkg_resources -from setuptools.compat import urllib2, httplib, HTTPError +from setuptools.compat import urllib2, httplib, HTTPError, unicode import distutils.errors import setuptools.package_index from setuptools.tests.server import IndexServer diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 7e2f0a498b..49007c3dc4 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -7,9 +7,8 @@ import sys import tempfile import unittest -from StringIO import StringIO - +from setuptools.compat import StringIO from setuptools.command.sdist import sdist from setuptools.dist import Distribution diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index ad7cbd0f96..e7022995dc 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -6,9 +6,9 @@ import os, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError +from setuptools.compat import StringIO from setuptools.command.test import test from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -121,4 +121,4 @@ def test_test(self): pass finally: sys.stdout = old_stdout - \ No newline at end of file + From 7cf9cd93c2fddb7f7f5fe6c1fcc140e9d6c93232 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 13:54:35 -0500 Subject: [PATCH 1102/8469] Minor fix previously fixed in a merge --HG-- branch : distribute --- setuptools/compat.py | 2 ++ setuptools/tests/server.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 6d4ea539ef..27d472b55b 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -16,6 +16,7 @@ import httplib from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler + from BaseHTTPServer import BaseHTTPRequestHandler iteritems = lambda o: o.iteritems() long_type = long maxsize = sys.maxint @@ -57,6 +58,7 @@ def exec_(code, globs=None, locs=None): from html.entities import name2codepoint import http.client as httplib from http.server import HTTPServer, SimpleHTTPRequestHandler + from http.server import BaseHTTPRequestHandler iteritems = lambda o: o.items() long_type = int maxsize = sys.maxsize diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index c734334077..0e7407bb0d 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -3,7 +3,7 @@ import sys import time import threading -import BaseHTTPServer +from setuptools.compat import BaseHTTPRequestHandler from setuptools.compat import (urllib2, URLError, HTTPServer, SimpleHTTPRequestHandler) @@ -56,7 +56,7 @@ def base_url(self): port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port -class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): +class RequestRecorder(BaseHTTPRequestHandler): def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) From e3f7235a944f5758780de74aac548e27a09e39a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 13:55:16 -0500 Subject: [PATCH 1103/8469] Updated win_script_wrapper to run on Python 2 and Python 3 --HG-- branch : distribute --- setuptools/tests/win_script_wrapper.txt | 77 +++++++++++++++---------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 2e1bff7434..1fe47bc56c 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -16,16 +16,18 @@ Let's create a simple script, foo-script.py: >>> import os, sys, tempfile >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( + >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') + >>> bytes = f.write( ... """#!%(python_exe)s ... import sys ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input + ... print(sys.argv[0][-14:]) + ... print(sys.argv[1:]) + ... print(input) ... if __debug__: - ... print 'non-optimized' + ... print('non-optimized') ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + >>> f.close() Note that the script starts with a Unix-style '#!' line saying which Python executable to run. The wrapper will use this to find the @@ -34,9 +36,11 @@ correct Python executable. We'll also copy cli.exe to the sample-directory with the name foo.exe: >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'foo.exe'), 'wb').write( + >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb') + >>> bytes = f.write( ... pkg_resources.resource_string('setuptools', 'cli.exe') ... ) + >>> f.close() When the copy of cli.exe, foo.exe in this example, runs, it examines the path name it was run with and computes a Python script path name @@ -45,12 +49,12 @@ GUI programs, the suffix '-script-pyw' is added.) This is why we named out script the way we did. Now we can run out script by running the wrapper: - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'foo.exe')) - ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') - >>> input.write('hello\nworld\n') - >>> input.close() - >>> print output.read(), + >>> import subprocess + >>> cmd = [os.path.join(sample_directory, 'foo.exe'), 'arg1', 'arg 2', + ... 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] + >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE) + >>> stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii')) + >>> bytes = sys.stdout.write(stdout.decode('ascii').replace('\r\n', '\n')) \foo-script.py ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] 'hello\nworld\n' @@ -77,21 +81,23 @@ to start the interactive interpreter. You can combine multiple options as usual. For example, to run in optimized mode and enter the interpreter after running the script, you could use -Oi: - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( - ... """#!%(python_exe)s -Oi + >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') + >>> bytes = f.write( + ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input + ... print(sys.argv[0][-14:]) + ... print(sys.argv[1:]) + ... print(input) ... if __debug__: - ... print 'non-optimized' + ... print('non-optimized') ... sys.ps1 = '---' ... """ % dict(python_exe=nt_quote_arg(sys.executable))) - - >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) - >>> input.close() - >>> print output.read(), + >>> f.close() + >>> cmd = [os.path.join(sample_directory, 'foo.exe')] + >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) + >>> stdout, stderr = proc.communicate() + >>> bytes = sys.stdout.write(stdout.decode('ascii').replace('\r\n', '\n')) \foo-script.py [] '' @@ -105,29 +111,38 @@ Now let's test the GUI version with the simple scipt, bar-script.py: >>> import os, sys, tempfile >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'bar-script.pyw'), 'w').write( + >>> f = open(os.path.join(sample_directory, 'bar-script.pyw'), 'w') + >>> bytes = f.write( ... """#!%(python_exe)s ... import sys - ... open(sys.argv[1], 'wb').write(repr(sys.argv[2])) + ... open(sys.argv[1], 'wb').write(repr(sys.argv[2]).encode('ascii')) ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + >>> f.close() We'll also copy gui.exe to the sample-directory with the name bar.exe: >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'bar.exe'), 'wb').write( + >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb') + >>> bytes = f.write( ... pkg_resources.resource_string('setuptools', 'gui.exe') ... ) + >>> f.close() Finally, we'll run the script and check the result: - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')) - ... + r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) - >>> input.close() - >>> print output.read() + >>> cmd = [ + ... os.path.join(sample_directory, 'bar.exe'), + ... os.path.join(sample_directory, 'test_output.txt'), + ... 'Test Argument', + ... ] + >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) + >>> stdout, stderr = proc.communicate() + >>> print(stdout.decode('ascii')) - >>> print open(os.path.join(sample_directory, 'test_output.txt'), 'rb').read() + >>> f_out = open(os.path.join(sample_directory, 'test_output.txt'), 'rb') + >>> print(f_out.read().decode('ascii')) 'Test Argument' + >>> f_out.close() We're done with the sample_directory: From 94fc39cb62df19e85b07658f2fa5d0b4a7bf9303 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 10 Oct 2012 10:49:54 +0100 Subject: [PATCH 1104/8469] Fixed some resource leaks. --HG-- branch : distribute extra : source : 98c929e25fee11a99eb125dd9a13521321d68dd3 --- setuptools/compat.py | 8 +++-- setuptools/tests/server.py | 1 + setuptools/tests/test_develop.py | 17 +++++++---- setuptools/tests/test_dist_info.py | 43 ++++++++++++++++----------- setuptools/tests/test_easy_install.py | 2 +- 5 files changed, 45 insertions(+), 26 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 27d472b55b..05417c6e32 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -78,10 +78,14 @@ def execfile(fn, globs=None, locs=None): globs = globals() if locs is None: locs = globs - exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) + f = open(fn) + try: + source = f.read() + finally: + f.close() + exec_(compile(source, fn, 'exec'), globs, locs) def reraise(tp, value, tb=None): if value.__traceback__ is not tb: raise value.with_traceback(tb) raise value - diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 0e7407bb0d..ae2381e355 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -51,6 +51,7 @@ def stop(self): # ignore any errors; all that's important is the request pass self.thread.join() + self.socket.close() def base_url(self): port = self.server_port diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ecd2212d11..0813959d3e 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -43,7 +43,7 @@ def setUp(self): f = open(init, 'w') f.write(INIT_PY) f.close() - + os.chdir(self.dir) self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() @@ -53,7 +53,7 @@ def setUp(self): def tearDown(self): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return - + os.chdir(self.old_cwd) shutil.rmtree(self.dir) shutil.rmtree(site.USER_BASE) @@ -89,8 +89,16 @@ def test_develop(self): self.assertEqual(content, ['easy-install.pth', 'foo.egg-link']) # Check that we are using the right code. - path = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt').read().split()[0].strip() - init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip() + f = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt') + try: + path = f.read().split()[0].strip() + finally: + f.close() + f = open(os.path.join(path, 'foo', '__init__.py'), 'rt') + try: + init = f.read().strip() + finally: + f.close() if sys.version < "3": self.assertEqual(init, 'print "foo"') else: @@ -112,4 +120,3 @@ def notest_develop_with_setup_requires(self): pass finally: os.chdir(old_dir) - diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 623ccc471a..93ab8816d3 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -50,27 +50,34 @@ def setUp(self): versioned = os.path.join(self.tmpdir, 'VersionedDistribution-2.718.dist-info') os.mkdir(versioned) - open(os.path.join(versioned, 'METADATA'), 'w+').write(DALS( - """ - Metadata-Version: 1.2 - Name: VersionedDistribution - Requires-Dist: splort (4) - Provides-Extra: baz - Requires-Dist: quux (>=1.1); extra == 'baz' - """)) - + f = open(os.path.join(versioned, 'METADATA'), 'w+') + try: + f.write(DALS( + """ + Metadata-Version: 1.2 + Name: VersionedDistribution + Requires-Dist: splort (4) + Provides-Extra: baz + Requires-Dist: quux (>=1.1); extra == 'baz' + """)) + finally: + f.close() unversioned = os.path.join(self.tmpdir, 'UnversionedDistribution.dist-info') os.mkdir(unversioned) - open(os.path.join(unversioned, 'METADATA'), 'w+').write(DALS( - """ - Metadata-Version: 1.2 - Name: UnversionedDistribution - Version: 0.3 - Requires-Dist: splort (==4) - Provides-Extra: baz - Requires-Dist: quux (>=1.1); extra == 'baz' - """)) + f = open(os.path.join(unversioned, 'METADATA'), 'w+') + try: + f.write(DALS( + """ + Metadata-Version: 1.2 + Name: UnversionedDistribution + Version: 0.3 + Requires-Dist: splort (==4) + Provides-Extra: baz + Requires-Dist: quux (>=1.1); extra == 'baz' + """)) + finally: + f.close() def tearDown(self): shutil.rmtree(self.tmpdir) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aab4b6179e..34faeaad52 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -233,7 +233,7 @@ def test_local_index(self): f = open(egg_file, 'w') try: f.write('Name: foo\n') - except: + finally: f.close() sys.path.append(target) From cc6f2911a225cd23b8fd0af4daad92131ee823ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 15:01:03 +0100 Subject: [PATCH 1105/8469] In merge branch, a late version of distribute --HG-- branch : Setuptools-Distribute merge From 4a2bb4b699ab4e37663a216501b1ff1f6bef0ccd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Mar 2013 11:32:56 -0500 Subject: [PATCH 1106/8469] Restore the project name and URL to pypi --HG-- branch : Setuptools-Distribute merge extra : source : 2e7a227d01bff8b6bdd865d2c9f14ff91eb910ef --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 607954d03a..771cb74a4b 100755 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ def _linkified(rst_path): readme_file.close() dist = setup( - name="distribute", + name="setuptools", version=VERSION, description="Easily download, build, install, upgrade, and uninstall " "Python packages", @@ -166,7 +166,7 @@ def _linkified(rst_path): license="PSF or ZPL", long_description = long_description, keywords = "CPAN PyPI distutils eggs package management", - url = "http://packages.python.org/distribute", + url = "http://pypi.python.org/pypi/setuptools", test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), From a0a725d980140be92866bd7c27f01d99b16f7979 Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 1 Mar 2013 12:04:30 -0500 Subject: [PATCH 1107/8469] Fix broken documentation on pre/post versions --HG-- branch : setuptools-0.6 extra : source : 86385567abb93fb56c7b67b39a703ba4728b87b8 --- setuptools.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools.txt b/setuptools.txt index c709a9081c..eee3052557 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -217,11 +217,7 @@ For the most part, setuptools' interpretation of version numbers is intuitive, but here are a few tips that will keep you out of trouble in the corner cases: * Don't use ``-`` or any other character than ``.`` as a separator, unless you - really want a post-release. Remember that ``2.1-rc2`` means you've - *already* released ``2.1``, whereas ``2.1rc2`` and ``2.1.c2`` are candidates - you're putting out *before* ``2.1``. If you accidentally distribute copies - of a post-release that you meant to be a pre-release, the only safe fix is to - bump your main release number (e.g. to ``2.1.1``) and re-release the project. + really want a post-release. * Don't stick adjoining pre-release tags together without a dot or number between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, @@ -239,7 +235,7 @@ but here are a few tips that will keep you out of trouble in the corner cases: >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev') True >>> parse_version('2.1-rc2') < parse_version('2.1') - False + True >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9') True From 7b80ff95a04569e39da9ae0fb33f0b90988e22dc Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 1 Mar 2013 12:18:34 -0500 Subject: [PATCH 1108/8469] Add doc fix to change log --HG-- branch : setuptools-0.6 --- setuptools.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools.txt b/setuptools.txt index eee3052557..177f35190a 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -2628,6 +2628,10 @@ XXX Release Notes/Change History ---------------------------- +0.6c12 + * Fix documentation describing incorrect pre/post release version comparison + logic. + 0.6c11 * Fix "bdist_wininst upload" trying to upload same file twice From 890c8b348838b24d9eaa1725dcf858021f54d88d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Mar 2013 12:20:57 -0500 Subject: [PATCH 1109/8469] Updated documentation to reflect merged target name, only keeping legacy references to Distribute. --HG-- branch : Setuptools-Distribute merge extra : source : 7c68dd2a22cf2dc0ad77f1cca857736586aa5753 --- docs/_templates/indexsidebar.html | 8 +-- docs/conf.py | 14 ++--- docs/easy_install.txt | 12 +++-- docs/index.txt | 32 ++++------- docs/python3.txt | 31 ++++++----- docs/roadmap.txt | 88 +++---------------------------- docs/setuptools.txt | 6 +-- docs/using.txt | 19 ++----- 8 files changed, 60 insertions(+), 150 deletions(-) diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 932909f3e1..9d49ae5dc2 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -1,8 +1,8 @@ -

Download

+

Download

-

Current version: {{ version }}

-

Get Distribute from the Python Package Index +

Current version: {{ version }}

+

Get Setuptools from the Python Package Index

Questions? Suggestions? Contributions?

-

Visit the Distribute project page

+

Visit the Setuptools project page

diff --git a/docs/conf.py b/docs/conf.py index 586e3fe6ad..4f878f642d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Distribute documentation build configuration file, created by +# Setuptools documentation build configuration file, created by # sphinx-quickstart on Fri Jul 17 14:22:37 2009. # # This file is execfile()d with the current directory set to its containing dir. @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'Distribute' -copyright = u'2009-2011, The fellowship of the packaging' +project = u'Setuptools' +copyright = u'2009-2013, The fellowship of the packaging' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -106,10 +106,10 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -html_title = "Distribute documentation" +html_title = "Setuptools documentation" # A shorter title for the navigation bar. Default is the same as html_title. -html_short_title = "Distribute" +html_short_title = "Setuptools" # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -161,7 +161,7 @@ #html_file_suffix = '' # Output file base name for HTML help builder. -htmlhelp_basename = 'Distributedoc' +htmlhelp_basename = 'Setuptoolsdoc' # -- Options for LaTeX output -------------------------------------------------- @@ -175,7 +175,7 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Distribute.tex', ur'Distribute Documentation', + ('index', 'Setuptools.tex', ur'Setuptools Documentation', ur'The fellowship of the packaging', 'manual'), ] diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 9b4fcfbb6e..dac0fa8fcb 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -94,7 +94,7 @@ directory, you can also retarget the installation location for scripts so they go on a directory that's already on the ``PATH``. For more information see the sections below on `Command-Line Options`_ and `Configuration Files`_. You can pass command line options (such as ``--script-dir``) to -``distribute_setup.py`` to control where ``easy_install.exe`` will be installed. +``ez_setup.py`` to control where ``easy_install.exe`` will be installed. @@ -776,10 +776,12 @@ Command-Line Options package not being available locally, or due to the use of the ``--update`` or ``-U`` option. -``--no-find-links`` Blocks the addition of any link. (New in Distribute 0.6.11) - This is useful if you want to avoid adding links defined in a project - easy_install is installing (wether it's a requested project or a - dependency.). When used, ``--find-links`` is ignored. +``--no-find-links`` Blocks the addition of any link. + This parameter is useful if you want to avoid adding links defined in a + project easy_install is installing (whether it's a requested project or a + dependency). When used, ``--find-links`` is ignored. + + Added in Distribute 0.6.11 and Setuptools 0.7. ``--delete-conflicting, -D`` (Removed in 0.6a11) (As of 0.6a11, this option is no longer necessary; please do not use it!) diff --git a/docs/index.txt b/docs/index.txt index 5f3b945b20..21442b93b5 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,16 +1,15 @@ -Welcome to Distribute's documentation! -====================================== +Welcome to Setuptools' documentation! +===================================== -`Distribute` is a fork of the `Setuptools` project. +Setuptools is a fully-featured, actively-maintained, and stable library +designed to facilitate packaging Python projects, where packaging includes: -Distribute is intended to replace Setuptools as the standard method for -working with Python module distributions. - -For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple: - -- Distribute is a drop-in replacement for Setuptools -- The code is actively maintained, and has over 10 commiters -- Distribute offers Python 3 support ! + - Python package and module definitions + - Distribution package metadata + - Test hooks + - Project installation + - Platform-specific details + - Python 3 support Documentation content: @@ -23,14 +22,3 @@ Documentation content: setuptools easy_install pkg_resources - - -.. image:: http://python-distribute.org/pip_distribute.png - -Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 - -Copy & paste:: - - curl -O http://python-distribute.org/distribute_setup.py - python distribute_setup.py - easy_install pip \ No newline at end of file diff --git a/docs/python3.txt b/docs/python3.txt index 2f6cde4ab3..1e019951c4 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -1,18 +1,19 @@ ===================================================== -Supporting both Python 2 and Python 3 with Distribute +Supporting both Python 2 and Python 3 with Setuptools ===================================================== -Starting with version 0.6.2, Distribute supports Python 3. Installing and -using distribute for Python 3 code works exactly the same as for Python 2 -code, but Distribute also helps you to support Python 2 and Python 3 from +Starting with Distribute version 0.6.2 and Setuptools 0.7, the Setuptools +project supported Python 3. Installing and +using setuptools for Python 3 code works exactly the same as for Python 2 +code, but Setuptools also helps you to support Python 2 and Python 3 from the same source code by letting you run 2to3 on the code as a part of the build process, by setting the keyword parameter ``use_2to3`` to True. -Distribute as help during porting +Setuptools as help during porting ================================= -Distribute can make the porting process much easier by automatically running +Setuptools can make the porting process much easier by automatically running 2to3 as a part of the test running. To do this you need to configure the setup.py so that you can run the unit tests with ``python setup.py test``. @@ -24,10 +25,10 @@ The test command will now first run the build command during which the code will be converted with 2to3, and the tests will then be run from the build directory, as opposed from the source directory as is normally done. -Distribute will convert all Python files, and also all doctests in Python +Setuptools will convert all Python files, and also all doctests in Python files. However, if you have doctests located in separate text files, these will not automatically be converted. By adding them to the -``convert_2to3_doctests`` keyword parameter Distrubute will convert them as +``convert_2to3_doctests`` keyword parameter Setuptools will convert them as well. By default, the conversion uses all fixers in the ``lib2to3.fixers`` package. @@ -86,12 +87,14 @@ Advanced features If you don't want to run the 2to3 conversion on the doctests in Python files, you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. -Note on compatibility with setuptools -===================================== +Note on compatibility with older versions of setuptools +======================================================= -Setuptools do not know about the new keyword parameters to support Python 3. +Setuptools earlier than 0.7 does not know about the new keyword parameters to +support Python 3. As a result it will warn about the unknown keyword parameters if you use -setuptools instead of Distribute under Python 2. This is not an error, and +those versions of setuptools instead of Distribute under Python 2. This output +is not an error, and install process will continue as normal, but if you want to get rid of that error this is easy. Simply conditionally add the new parameters into an extra dict and pass that dict into setup():: @@ -117,5 +120,5 @@ dict and pass that dict into setup():: **extra ) -This way the parameters will only be used under Python 3, where you have to -use Distribute. +This way the parameters will only be used under Python 3, where Distribute or +Setuptools 0.7 or later is required. diff --git a/docs/roadmap.txt b/docs/roadmap.txt index ea5070eaaf..44bcdb0ff8 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -2,85 +2,13 @@ Roadmap ======= -Distribute has two branches: +Setuptools has merged with Distribute and to provide a unified codebase for +ongoing development. -- 0.6.x : provides a Setuptools-0.6cX compatible version -- 0.7.x : will provide a refactoring - -0.6.x -===== - -Not "much" is going to happen here, we want this branch to be helpful -to the community *today* by addressing the 40-or-so bugs -that were found in Setuptools and never fixed. This is eventually -happen soon because its development is -fast : there are up to 5 commiters that are working on it very often -(and the number grows weekly.) - -The biggest issue with this branch is that it is providing the same -packages and modules setuptools does, and this -requires some bootstrapping work where we make sure once Distribute is -installed, all Distribution that requires Setuptools -will continue to work. This is done by faking the metadata of -Setuptools 0.6c9. That's the only way we found to do this. - -There's one major thing though: thanks to the work of Lennart, Alex, -Martin, this branch supports Python 3, -which is great to have to speed up Py3 adoption. - -The goal of the 0.6.x is to remove as much bugs as we can, and try if -possible to remove the patches done -on Distutils. We will support 0.6.x maintenance for years and we will -promote its usage everywhere instead of -Setuptools. - -Some new commands are added there, when they are helpful and don't -interact with the rest. I am thinking -about "upload_docs" that let you upload documentation to PyPI. The -goal is to move it to Distutils -at some point, if the documentation feature of PyPI stays and starts to be used. - -0.7.x -===== - -We've started to refactor Distribute with this roadmap in mind (and -no, as someone said, it's not vaporware, -we've done a lot already) - -- 0.7.x can be installed and used with 0.6.x - -- easy_install is going to be deprecated ! use Pip ! - -- the version system will be deprecated, in favor of the one in Distutils - -- no more Distutils monkey-patch that happens once you use the code - (things like 'from distutils import cmd; cmd.Command = CustomCommand') - -- no more custom site.py (that is: if something misses in Python's - site.py we'll add it there instead of patching it) - -- no more namespaced packages system, if PEP 382 (namespaces package - support) makes it to 2.7 - -- The code is splitted in many packages and might be distributed under - several distributions. - - - distribute.resources: that's the old pkg_resources, but - reorganized in clean, pep-8 modules. This package will - only contain the query APIs and will focus on being PEP 376 - compatible. We will promote its usage and see if Pip wants - to use it as a basis. - It will probably shrink a lot though, once the stdlib provides PEP 376 support. - - - distribute.entrypoints: that's the old pkg_resources entry points - system, but on its own. it uses distribute.resources - - - distribute.index: that's package_index and a few other things. - everything required to interact with PyPI. We will promote - its usage and see if Pip wants to use it as a basis. - - - distribute.core (might be renamed to main): that's everything - else, and uses the other packages. - -Goal: A first release before (or when) Python 2.7 / 3.2 is out. +This new effort will draw from the resources of both projects to leverage +community contribution for ongoing advancement but also maintain stability +for the user base. +An initial release of Setuptools 0.7 will attempt to be compatible both with +Setuptools 0.6c11 and Distribute 0.6.36. Where compatibility cannot be +achieved, the changes should be well-documented. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index fe8bb3f615..2504dcda17 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1,8 +1,8 @@ ================================================== -Building and Distributing Packages with Distribute +Building and Distributing Packages with Setuptools ================================================== -``Distribute`` is a collection of enhancements to the Python ``distutils`` +``Setuptools`` is a collection of enhancements to the Python ``distutils`` (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages. @@ -15,7 +15,7 @@ including just a single `bootstrap module`_ (an 8K .py file), your package will automatically download and install ``setuptools`` if the user is building your package from source and doesn't have a suitable version already installed. -.. _bootstrap module: http://nightly.ziade.org/distribute_setup.py +.. _bootstrap module: http://bitbucket.org/jaraco/setuptools/downloads/ez_setup.py Feature Highlights: diff --git a/docs/using.txt b/docs/using.txt index 192f1dc234..6f93c3867c 100644 --- a/docs/using.txt +++ b/docs/using.txt @@ -1,21 +1,10 @@ ================================ -Using Distribute in your project +Using Setuptools in your project ================================ -To use Distribute in your project, the recommended way is to ship -`distribute_setup.py` alongside your `setup.py` script and call +To use Setuptools in your project, the recommended way is to ship +`ez_setup.py` alongside your `setup.py` script and call it at the very begining of `setup.py` like this:: - from distribute_setup import use_setuptools + from ez_setup import use_setuptools use_setuptools() - -Another way is to add ``Distribute`` in the ``install_requires`` option:: - - from setuptools import setup - - setup(... - install_requires=['distribute'] - ) - - -XXX to be finished From 70c61d89a8c7d548a42f843579ca540b39655ca9 Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 1 Mar 2013 12:23:20 -0500 Subject: [PATCH 1110/8469] Default index URL to use SSL version of PyPI --HG-- branch : setuptools-0.6 extra : source : b95868385a32c0103133105788c70850656662c6 --- setuptools/command/easy_install.py | 2 +- setuptools/package_index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 90f29320af..71794865b9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -156,7 +156,7 @@ def finalize_options(self): else: self.all_site_dirs.append(normalize_path(d)) if not self.editable: self.check_site_dir() - self.index_url = self.index_url or "http://pypi.python.org/simple" + self.index_url = self.index_url or "https://pypi.python.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: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9a9c5d62e7..1668e76547 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -149,7 +149,7 @@ def find_external_links(url, page): class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" - def __init__(self, index_url="http://pypi.python.org/simple", hosts=('*',), + def __init__(self, index_url="https://pypi.python.org/simple", hosts=('*',), *args, **kw ): Environment.__init__(self,*args,**kw) From 1e8086f7f574d170d946bb6cb21f56ef4064e008 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Mar 2013 12:24:24 -0500 Subject: [PATCH 1111/8469] Add original author of setuptools, PJ Eby, to CONTRIBUTORS --HG-- branch : Setuptools-Distribute merge extra : source : 9417b02804bcd1f1b316a68860faa3c19f88897c --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 22c90aba19..a5f050cd3a 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -19,6 +19,7 @@ Contributors * Martin von Löwis * Noufal Ibrahim * Pete Hollobon +* Philip J. Eby * Philip Jenvey * Reinout van Rees * Robert Myers From 07f79506c315c983f6cbba7d67cb68f0f668af44 Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 1 Mar 2013 12:26:46 -0500 Subject: [PATCH 1112/8469] Add SSL fix to change log --HG-- branch : setuptools-0.6 --- EasyInstall.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EasyInstall.txt b/EasyInstall.txt index 753baf65ed..1e7c890945 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -1217,7 +1217,9 @@ displayed MD5 info (broken onto two lines for readability):: Release Notes/Change History ============================ -0.6final +0.6c12 + * Default --index-URL to SSL version of PyPI + * Fixed AttributeError under Python 2.3 when processing "HTTP authentication" URLs (i.e., ones with a ``user:password@host``). From fdd1a61ec9dc1b46c0d1486d3a5052f1ffe60d16 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Mar 2013 12:29:58 -0500 Subject: [PATCH 1113/8469] update devguide --HG-- branch : Setuptools-Distribute merge extra : source : 441c08cdeb3dc45ba0f34a98d3538db1c2f8532e --- DEVGUIDE.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index 8dcabfd1d7..db556480e7 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -2,11 +2,11 @@ Quick notes for contributors ============================ -Distribute is using Mercurial. +Setuptools is developed using the DVCS Mercurial. Grab the code at bitbucket:: - $ hg clone https://bitbucket.org/tarek/distribute + $ hg clone https://bitbucket.org/jaraco/setuptools If you want to contribute changes, we recommend you fork the repository on bitbucket, commit the changes to your repository, and then make a pull request @@ -14,8 +14,8 @@ on bitbucket. If you make some changes, don't forget to: - add a note in CHANGES.txt -And remember that 0.6 (the only development line) is only bug fixes, and the -APIs should be fully backward compatible with Setuptools. +Please commit bug-fixes against the current maintenance branch and new +features to the default branch. You can run the tests via:: From 192602a4ec9bd661a3561800e3c278bcc1f8c5f0 Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 1 Mar 2013 14:05:34 -0500 Subject: [PATCH 1114/8469] Backport formats documentation from trunk --HG-- branch : setuptools-0.6 --- doc/formats.txt | 696 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 696 insertions(+) create mode 100644 doc/formats.txt diff --git a/doc/formats.txt b/doc/formats.txt new file mode 100644 index 0000000000..dbfc28129f --- /dev/null +++ b/doc/formats.txt @@ -0,0 +1,696 @@ +===================================== +The Internal Structure of Python Eggs +===================================== + +STOP! This is not the first document you should read! + +This document assumes you have at least some passing familiarity with +*using* setuptools, the ``pkg_resources`` module, and EasyInstall. It +does not attempt to explain basic concepts like inter-project +dependencies, nor does it contain detailed lexical syntax for most +file formats. Neither does it explain concepts like "namespace +packages" or "resources" in any detail, as all of these subjects are +covered at length in the setuptools developer's guide and the +``pkg_resources`` reference manual. + +Instead, this is **internal** documentation for how those concepts and +features are *implemented* in concrete terms. It is intended for people +who are working on the setuptools code base, who want to be able to +troubleshoot setuptools problems, want to write code that reads the file +formats involved, or want to otherwise tinker with setuptools-generated +files and directories. + +Note, however, that these are all internal implementation details and +are therefore subject to change; stick to the published API if you don't +want to be responsible for keeping your code from breaking when +setuptools changes. You have been warned. + + +.. contents:: **Table of Contents** + + +---------------------- +Eggs and their Formats +---------------------- + +A "Python egg" is a logical structure embodying the release of a +specific version of a Python project, comprising its code, resources, +and metadata. There are multiple formats that can be used to physically +encode a Python egg, and others can be developed. However, a key +principle of Python eggs is that they should be discoverable and +importable. That is, it should be possible for a Python application to +easily and efficiently find out what eggs are present on a system, and +to ensure that the desired eggs' contents are importable. + +There are two basic formats currently implemented for Python eggs: + +1. ``.egg`` format: a directory or zipfile *containing* the project's + code and resources, along with an ``EGG-INFO`` subdirectory that + contains the project's metadata + +2. ``.egg-info`` format: a file or directory placed *adjacent* to the + project's code and resources, that directly contains the project's + metadata. + +Both formats can include arbitrary Python code and resources, including +static data files, package and non-package directories, Python +modules, C extension modules, and so on. But each format is optimized +for different purposes. + +The ``.egg`` format is well-suited to distribution and the easy +uninstallation or upgrades of code, since the project is essentially +self-contained within a single directory or file, unmingled with any +other projects' code or resources. It also makes it possible to have +multiple versions of a project simultaneously installed, such that +individual programs can select the versions they wish to use. + +The ``.egg-info`` format, on the other hand, was created to support +backward-compatibility, performance, and ease of installation for system +packaging tools that expect to install all projects' code and resources +to a single directory (e.g. ``site-packages``). Placing the metadata +in that same directory simplifies the installation process, since it +isn't necessary to create ``.pth`` files or otherwise modify +``sys.path`` to include each installed egg. + +Its disadvantage, however, is that it provides no support for clean +uninstallation or upgrades, and of course only a single version of a +project can be installed to a given directory. Thus, support from a +package management tool is required. (This is why setuptools' "install" +command refers to this type of egg installation as "single-version, +externally managed".) Also, they lack sufficient data to allow them to +be copied from their installation source. easy_install can "ship" an +application by copying ``.egg`` files or directories to a target +location, but it cannot do this for ``.egg-info`` installs, because +there is no way to tell what code and resources belong to a particular +egg -- there may be several eggs "scrambled" together in a single +installation location, and the ``.egg-info`` format does not currently +include a way to list the files that were installed. (This may change +in a future version.) + + +Code and Resources +================== + +The layout of the code and resources is dictated by Python's normal +import layout, relative to the egg's "base location". + +For the ``.egg`` format, the base location is the ``.egg`` itself. That +is, adding the ``.egg`` filename or directory name to ``sys.path`` +makes its contents importable. + +For the ``.egg-info`` format, however, the base location is the +directory that *contains* the ``.egg-info``, and thus it is the +directory that must be added to ``sys.path`` to make the egg importable. +(Note that this means that the "normal" installation of a package to a +``sys.path`` directory is sufficient to make it an "egg" if it has an +``.egg-info`` file or directory installed alongside of it.) + + +Project Metadata +================= + +If eggs contained only code and resources, there would of course be +no difference between them and any other directory or zip file on +``sys.path``. Thus, metadata must also be included, using a metadata +file or directory. + +For the ``.egg`` format, the metadata is placed in an ``EGG-INFO`` +subdirectory, directly within the ``.egg`` file or directory. For the +``.egg-info`` format, metadata is stored directly within the +``.egg-info`` directory itself. + +The minimum project metadata that all eggs must have is a standard +Python ``PKG-INFO`` file, named ``PKG-INFO`` and placed within the +metadata directory appropriate to the format. Because it's possible for +this to be the only metadata file included, ``.egg-info`` format eggs +are not required to be a directory; they can just be a ``.egg-info`` +file that directly contains the ``PKG-INFO`` metadata. This eliminates +the need to create a directory just to store one file. This option is +*not* available for ``.egg`` formats, since setuptools always includes +other metadata. (In fact, setuptools itself never generates +``.egg-info`` files, either; the support for using files was added so +that the requirement could easily be satisfied by other tools, such +as the distutils in Python 2.5). + +In addition to the ``PKG-INFO`` file, an egg's metadata directory may +also include files and directories representing various forms of +optional standard metadata (see the section on `Standard Metadata`_, +below) or user-defined metadata required by the project. For example, +some projects may define a metadata format to describe their application +plugins, and metadata in this format would then be included by plugin +creators in their projects' metadata directories. + + +Filename-Embedded Metadata +========================== + +To allow introspection of installed projects and runtime resolution of +inter-project dependencies, a certain amount of information is embedded +in egg filenames. At a minimum, this includes the project name, and +ideally will also include the project version number. Optionally, it +can also include the target Python version and required runtime +platform if platform-specific C code is included. The syntax of an +egg filename is as follows:: + + name ["-" version ["-py" pyver ["-" required_platform]]] "." ext + +The "name" and "version" should be escaped using the ``to_filename()`` +function provided by ``pkg_resources``, after first processing them with +``safe_name()`` and ``safe_version()`` respectively. These latter two +functions can also be used to later "unescape" these parts of the +filename. (For a detailed description of these transformations, please +see the "Parsing Utilities" section of the ``pkg_resources`` manual.) + +The "pyver" string is the Python major version, as found in the first +3 characters of ``sys.version``. "required_platform" is essentially +a distutils ``get_platform()`` string, but with enhancements to properly +distinguish Mac OS versions. (See the ``get_build_platform()`` +documentation in the "Platform Utilities" section of the +``pkg_resources`` manual for more details.) + +Finally, the "ext" is either ``.egg`` or ``.egg-info``, as appropriate +for the egg's format. + +Normally, an egg's filename should include at least the project name and +version, as this allows the runtime system to find desired project +versions without having to read the egg's PKG-INFO to determine its +version number. + +Setuptools, however, only includes the version number in the filename +when an ``.egg`` file is built using the ``bdist_egg`` command, or when +an ``.egg-info`` directory is being installed by the +``install_egg_info`` command. When generating metadata for use with the +original source tree, it only includes the project name, so that the +directory will not have to be renamed each time the project's version +changes. + +This is especially important when version numbers change frequently, and +the source metadata directory is kept under version control with the +rest of the project. (As would be the case when the project's source +includes project-defined metadata that is not generated from by +setuptools from data in the setup script.) + + +Egg Links +========= + +In addition to the ``.egg`` and ``.egg-info`` formats, there is a third +egg-related extension that you may encounter on occasion: ``.egg-link`` +files. + +These files are not eggs, strictly speaking. They simply provide a way +to reference an egg that is not physically installed in the desired +location. They exist primarily as a cross-platform alternative to +symbolic links, to support "installing" code that is being developed in +a different location than the desired installation location. For +example, if a user is developing an application plugin in their home +directory, but the plugin needs to be "installed" in an application +plugin directory, running "setup.py develop -md /path/to/app/plugins" +will install an ``.egg-link`` file in ``/path/to/app/plugins``, that +tells the egg runtime system where to find the actual egg (the user's +project source directory and its ``.egg-info`` subdirectory). + +``.egg-link`` files are named following the format for ``.egg`` and +``.egg-info`` names, but only the project name is included; no version, +Python version, or platform information is included. When the runtime +searches for available eggs, ``.egg-link`` files are opened and the +actual egg file/directory name is read from them. + +Each ``.egg-link`` file should contain a single file or directory name, +with no newlines. This filename should be the base location of one or +more eggs. That is, the name must either end in ``.egg``, or else it +should be the parent directory of one or more ``.egg-info`` format eggs. + +As of setuptools 0.6c6, the path may be specified as a platform-independent +(i.e. ``/``-separated) relative path from the directory containing the +``.egg-link`` file, and a second line may appear in the file, specifying a +platform-independent relative path from the egg's base directory to its +setup script directory. This allows installation tools such as EasyInstall +to find the project's setup directory and build eggs or perform other setup +commands on it. + + +----------------- +Standard Metadata +----------------- + +In addition to the minimum required ``PKG-INFO`` metadata, projects can +include a variety of standard metadata files or directories, as +described below. Except as otherwise noted, these files and directories +are automatically generated by setuptools, based on information supplied +in the setup script or through analysis of the project's code and +resources. + +Most of these files and directories are generated via "egg-info +writers" during execution of the setuptools ``egg_info`` command, and +are listed in the ``egg_info.writers`` entry point group defined by +setuptools' own ``setup.py`` file. + +Project authors can register their own metadata writers as entry points +in this group (as described in the setuptools manual under "Adding new +EGG-INFO Files") to cause setuptools to generate project-specific +metadata files or directories during execution of the ``egg_info`` +command. It is up to project authors to document these new metadata +formats, if they create any. + + +``.txt`` File Formats +===================== + +Files described in this section that have ``.txt`` extensions have a +simple lexical format consisting of a sequence of text lines, each line +terminated by a linefeed character (regardless of platform). Leading +and trailing whitespace on each line is ignored, as are blank lines and +lines whose first nonblank character is a ``#`` (comment symbol). (This +is the parsing format defined by the ``yield_lines()`` function of +the ``pkg_resources`` module.) + +All ``.txt`` files defined by this section follow this format, but some +are also "sectioned" files, meaning that their contents are divided into +sections, using square-bracketed section headers akin to Windows +``.ini`` format. Note that this does *not* imply that the lines within +the sections follow an ``.ini`` format, however. Please see an +individual metadata file's documentation for a description of what the +lines and section names mean in that particular file. + +Sectioned files can be parsed using the ``split_sections()`` function; +see the "Parsing Utilities" section of the ``pkg_resources`` manual for +for details. + + +Dependency Metadata +=================== + + +``requires.txt`` +---------------- + +This is a "sectioned" text file. Each section is a sequence of +"requirements", as parsed by the ``parse_requirements()`` function; +please see the ``pkg_resources`` manual for the complete requirement +parsing syntax. + +The first, unnamed section (i.e., before the first section header) in +this file is the project's core requirements, which must be installed +for the project to function. (Specified using the ``install_requires`` +keyword to ``setup()``). + +The remaining (named) sections describe the project's "extra" +requirements, as specified using the ``extras_require`` keyword to +``setup()``. The section name is the name of the optional feature, and +the section body lists that feature's dependencies. + +Note that it is not normally necessary to inspect this file directly; +``pkg_resources.Distribution`` objects have a ``requires()`` method +that can be used to obtain ``Requirement`` objects describing the +project's core and optional dependencies. + + + +``dependency_links.txt`` +------------------------ + +A list of dependency URLs, one per line, as specified using the +``dependency_links`` keyword to ``setup()``. These may be direct +download URLs, or the URLs of web pages containing direct download +links, and will be used by EasyInstall to find dependencies, as though +the user had manually provided them via the ``--find-links`` command +line option. Please see the setuptools manual and EasyInstall manual +for more information on specifying this option, and for information on +how EasyInstall processes ``--find-links`` URLs. + + +``depends.txt`` -- Obsolete, do not create! +------------------------------------------- + +This file follows an identical format to ``requires.txt``, but is +obsolete and should not be used. The earliest versions of setuptools +required users to manually create and maintain this file, so the runtime +still supports reading it, if it exists. The new filename was created +so that it could be automatically generated from ``setup()`` information +without overwriting an existing hand-created ``depends.txt``, if one +was already present in the project's source ``.egg-info`` directory. + + +``namespace_packages.txt`` -- Namespace Package Metadata +======================================================== + +A list of namespace package names, one per line, as supplied to the +``namespace_packages`` keyword to ``setup()``. Please see the manuals +for setuptools and ``pkg_resources`` for more information about +namespace packages. + + +``entry_points.txt`` -- "Entry Point"/Plugin Metadata +===================================================== + +This is a "sectioned" text file, whose contents encode the +``entry_points`` keyword supplied to ``setup()``. All sections are +named, as the section names specify the entry point groups in which the +corresponding section's entry points are registered. + +Each section is a sequence of "entry point" lines, each parseable using +the ``EntryPoint.parse`` classmethod; please see the ``pkg_resources`` +manual for the complete entry point parsing syntax. + +Note that it is not necessary to parse this file directly; the +``pkg_resources`` module provides a variety of APIs to locate and load +entry points automatically. Please see the setuptools and +``pkg_resources`` manuals for details on the nature and uses of entry +points. + + +The ``scripts`` Subdirectory +============================ + +This directory is currently only created for ``.egg`` files built by +the setuptools ``bdist_egg`` command. It will contain copies of all +of the project's "traditional" scripts (i.e., those specified using the +``scripts`` keyword to ``setup()``). This is so that they can be +reconstituted when an ``.egg`` file is installed. + +The scripts are placed here using the disutils' standard +``install_scripts`` command, so any ``#!`` lines reflect the Python +installation where the egg was built. But instead of copying the +scripts to the local script installation directory, EasyInstall writes +short wrapper scripts that invoke the original scripts from inside the +egg, after ensuring that sys.path includes the egg and any eggs it +depends on. For more about `script wrappers`_, see the section below on +`Installation and Path Management Issues`_. + + +Zip Support Metadata +==================== + + +``native_libs.txt`` +------------------- + +A list of C extensions and other dynamic link libraries contained in +the egg, one per line. Paths are ``/``-separated and relative to the +egg's base location. + +This file is generated as part of ``bdist_egg`` processing, and as such +only appears in ``.egg`` files (and ``.egg`` directories created by +unpacking them). It is used to ensure that all libraries are extracted +from a zipped egg at the same time, in case there is any direct linkage +between them. Please see the `Zip File Issues`_ section below for more +information on library and resource extraction from ``.egg`` files. + + +``eager_resources.txt`` +----------------------- + +A list of resource files and/or directories, one per line, as specified +via the ``eager_resources`` keyword to ``setup()``. Paths are +``/``-separated and relative to the egg's base location. + +Resource files or directories listed here will be extracted +simultaneously, if any of the named resources are extracted, or if any +native libraries listed in ``native_libs.txt`` are extracted. Please +see the setuptools manual for details on what this feature is used for +and how it works, as well as the `Zip File Issues`_ section below. + + +``zip-safe`` and ``not-zip-safe`` +--------------------------------- + +These are zero-length files, and either one or the other should exist. +If ``zip-safe`` exists, it means that the project will work properly +when installedas an ``.egg`` zipfile, and conversely the existence of +``not-zip-safe`` means the project should not be installed as an +``.egg`` file. The ``zip_safe`` option to setuptools' ``setup()`` +determines which file will be written. If the option isn't provided, +setuptools attempts to make its own assessment of whether the package +can work, based on code and content analysis. + +If neither file is present at installation time, EasyInstall defaults +to assuming that the project should be unzipped. (Command-line options +to EasyInstall, however, take precedence even over an existing +``zip-safe`` or ``not-zip-safe`` file.) + +Note that these flag files appear only in ``.egg`` files generated by +``bdist_egg``, and in ``.egg`` directories created by unpacking such an +``.egg`` file. + + + +``top_level.txt`` -- Conflict Management Metadata +================================================= + +This file is a list of the top-level module or package names provided +by the project, one Python identifier per line. + +Subpackages are not included; a project containing both a ``foo.bar`` +and a ``foo.baz`` would include only one line, ``foo``, in its +``top_level.txt``. + +This data is used by ``pkg_resources`` at runtime to issue a warning if +an egg is added to ``sys.path`` when its contained packages may have +already been imported. + +(It was also once used to detect conflicts with non-egg packages at +installation time, but in more recent versions, setuptools installs eggs +in such a way that they always override non-egg packages, thus +preventing a problem from arising.) + + +``SOURCES.txt`` -- Source Files Manifest +======================================== + +This file is roughly equivalent to the distutils' ``MANIFEST`` file. +The differences are as follows: + +* The filenames always use ``/`` as a path separator, which must be + converted back to a platform-specific path whenever they are read. + +* The file is automatically generated by setuptools whenever the + ``egg_info`` or ``sdist`` commands are run, and it is *not* + user-editable. + +Although this metadata is included with distributed eggs, it is not +actually used at runtime for any purpose. Its function is to ensure +that setuptools-built *source* distributions can correctly discover +what files are part of the project's source, even if the list had been +generated using revision control metadata on the original author's +system. + +In other words, ``SOURCES.txt`` has little or no runtime value for being +included in distributed eggs, and it is possible that future versions of +the ``bdist_egg`` and ``install_egg_info`` commands will strip it before +installation or distribution. Therefore, do not rely on its being +available outside of an original source directory or source +distribution. + + +------------------------------ +Other Technical Considerations +------------------------------ + + +Zip File Issues +=============== + +Although zip files resemble directories, they are not fully +substitutable for them. Most platforms do not support loading dynamic +link libraries contained in zipfiles, so it is not possible to directly +import C extensions from ``.egg`` zipfiles. Similarly, there are many +existing libraries -- whether in Python or C -- that require actual +operating system filenames, and do not work with arbitrary "file-like" +objects or in-memory strings, and thus cannot operate directly on the +contents of zip files. + +To address these issues, the ``pkg_resources`` module provides a +"resource API" to support obtaining either the contents of a resource, +or a true operating system filename for the resource. If the egg +containing the resource is a directory, the resource's real filename +is simply returned. However, if the egg is a zipfile, then the +resource is first extracted to a cache directory, and the filename +within the cache is returned. + +The cache directory is determined by the ``pkg_resources`` API; please +see the ``set_cache_path()`` and ``get_default_cache()`` documentation +for details. + + +The Extraction Process +---------------------- + +Resources are extracted to a cache subdirectory whose name is based +on the enclosing ``.egg`` filename and the path to the resource. If +there is already a file of the correct name, size, and timestamp, its +filename is returned to the requester. Otherwise, the desired file is +extracted first to a temporary name generated using +``mkstemp(".$extract",target_dir)``, and then its timestamp is set to +match the one in the zip file, before renaming it to its final name. +(Some collision detection and resolution code is used to handle the +fact that Windows doesn't overwrite files when renaming.) + +If a resource directory is requested, all of its contents are +recursively extracted in this fashion, to ensure that the directory +name can be used as if it were valid all along. + +If the resource requested for extraction is listed in the +``native_libs.txt`` or ``eager_resources.txt`` metadata files, then +*all* resources listed in *either* file will be extracted before the +requested resource's filename is returned, thus ensuring that all +C extensions and data used by them will be simultaneously available. + + +Extension Import Wrappers +------------------------- + +Since Python's built-in zip import feature does not support loading +C extension modules from zipfiles, the setuptools ``bdist_egg`` command +generates special import wrappers to make it work. + +The wrappers are ``.py`` files (along with corresponding ``.pyc`` +and/or ``.pyo`` files) that have the same module name as the +corresponding C extension. These wrappers are located in the same +package directory (or top-level directory) within the zipfile, so that +say, ``foomodule.so`` will get a corresponding ``foo.py``, while +``bar/baz.pyd`` will get a corresponding ``bar/baz.py``. + +These wrapper files contain a short stanza of Python code that asks +``pkg_resources`` for the filename of the corresponding C extension, +then reloads the module using the obtained filename. This will cause +``pkg_resources`` to first ensure that all of the egg's C extensions +(and any accompanying "eager resources") are extracted to the cache +before attempting to link to the C library. + +Note, by the way, that ``.egg`` directories will also contain these +wrapper files. However, Python's default import priority is such that +C extensions take precedence over same-named Python modules, so the +import wrappers are ignored unless the egg is a zipfile. + + +Installation and Path Management Issues +======================================= + +Python's initial setup of ``sys.path`` is very dependent on the Python +version and installation platform, as well as how Python was started +(i.e., script vs. ``-c`` vs. ``-m`` vs. interactive interpreter). +In fact, Python also provides only two relatively robust ways to affect +``sys.path`` outside of direct manipulation in code: the ``PYTHONPATH`` +environment variable, and ``.pth`` files. + +However, with no cross-platform way to safely and persistently change +environment variables, this leaves ``.pth`` files as EasyInstall's only +real option for persistent configuration of ``sys.path``. + +But ``.pth`` files are rather strictly limited in what they are allowed +to do normally. They add directories only to the *end* of ``sys.path``, +after any locally-installed ``site-packages`` directory, and they are +only processed *in* the ``site-packages`` directory to start with. + +This is a double whammy for users who lack write access to that +directory, because they can't create a ``.pth`` file that Python will +read, and even if a sympathetic system administrator adds one for them +that calls ``site.addsitedir()`` to allow some other directory to +contain ``.pth`` files, they won't be able to install newer versions of +anything that's installed in the systemwide ``site-packages``, because +their paths will still be added *after* ``site-packages``. + +So EasyInstall applies two workarounds to solve these problems. + +The first is that EasyInstall leverages ``.pth`` files' "import" feature +to manipulate ``sys.path`` and ensure that anything EasyInstall adds +to a ``.pth`` file will always appear before both the standard library +and the local ``site-packages`` directories. Thus, it is always +possible for a user who can write a Python-read ``.pth`` file to ensure +that their packages come first in their own environment. + +Second, when installing to a ``PYTHONPATH`` directory (as opposed to +a "site" directory like ``site-packages``) EasyInstall will also install +a special version of the ``site`` module. Because it's in a +``PYTHONPATH`` directory, this module will get control before the +standard library version of ``site`` does. It will record the state of +``sys.path`` before invoking the "real" ``site`` module, and then +afterwards it processes any ``.pth`` files found in ``PYTHONPATH`` +directories, including all the fixups needed to ensure that eggs always +appear before the standard library in sys.path, but are in a relative +order to one another that is defined by their ``PYTHONPATH`` and +``.pth``-prescribed sequence. + +The net result of these changes is that ``sys.path`` order will be +as follows at runtime: + +1. The ``sys.argv[0]`` directory, or an emtpy string if no script + is being executed. + +2. All eggs installed by EasyInstall in any ``.pth`` file in each + ``PYTHONPATH`` directory, in order first by ``PYTHONPATH`` order, + then normal ``.pth`` processing order (which is to say alphabetical + by ``.pth`` filename, then by the order of listing within each + ``.pth`` file). + +3. All eggs installed by EasyInstall in any ``.pth`` file in each "site" + directory (such as ``site-packages``), following the same ordering + rules as for the ones on ``PYTHONPATH``. + +4. The ``PYTHONPATH`` directories themselves, in their original order + +5. Any paths from ``.pth`` files found on ``PYTHONPATH`` that were *not* + eggs installed by EasyInstall, again following the same relative + ordering rules. + +6. The standard library and "site" directories, along with the contents + of any ``.pth`` files found in the "site" directories. + +Notice that sections 1, 4, and 6 comprise the "normal" Python setup for +``sys.path``. Sections 2 and 3 are inserted to support eggs, and +section 5 emulates what the "normal" semantics of ``.pth`` files on +``PYTHONPATH`` would be if Python natively supported them. + +For further discussion of the tradeoffs that went into this design, as +well as notes on the actual magic inserted into ``.pth`` files to make +them do these things, please see also the following messages to the +distutils-SIG mailing list: + +* http://mail.python.org/pipermail/distutils-sig/2006-February/006026.html +* http://mail.python.org/pipermail/distutils-sig/2006-March/006123.html + + +Script Wrappers +--------------- + +EasyInstall never directly installs a project's original scripts to +a script installation directory. Instead, it writes short wrapper +scripts that first ensure that the project's dependencies are active +on sys.path, before invoking the original script. These wrappers +have a #! line that points to the version of Python that was used to +install them, and their second line is always a comment that indicates +the type of script wrapper, the project version required for the script +to run, and information identifying the script to be invoked. + +The format of this marker line is:: + + "# EASY-INSTALL-" script_type ": " tuple_of_strings "\n" + +The ``script_type`` is one of ``SCRIPT``, ``DEV-SCRIPT``, or +``ENTRY-SCRIPT``. The ``tuple_of_strings`` is a comma-separated +sequence of Python string constants. For ``SCRIPT`` and ``DEV-SCRIPT`` +wrappers, there are two strings: the project version requirement, and +the script name (as a filename within the ``scripts`` metadata +directory). For ``ENTRY-SCRIPT`` wrappers, there are three: +the project version requirement, the entry point group name, and the +entry point name. (See the "Automatic Script Creation" section in the +setuptools manual for more information about entry point scripts.) + +In each case, the project version requirement string will be a string +parseable with the ``pkg_resources`` modules' ``Requirement.parse()`` +classmethod. The only difference between a ``SCRIPT`` wrapper and a +``DEV-SCRIPT`` is that a ``DEV-SCRIPT`` actually executes the original +source script in the project's source tree, and is created when the +"setup.py develop" command is run. A ``SCRIPT`` wrapper, on the other +hand, uses the "installed" script written to the ``EGG-INFO/scripts`` +subdirectory of the corresponding ``.egg`` zipfile or directory. +(``.egg-info`` eggs do not have script wrappers associated with them, +except in the "setup.py develop" case.) + +The purpose of including the marker line in generated script wrappers is +to facilitate introspection of installed scripts, and their relationship +to installed eggs. For example, an uninstallation tool could use this +data to identify what scripts can safely be removed, and/or identify +what scripts would stop working if a particular egg is uninstalled. + From ceee7fff6e3eaf606a2b88888febf45ac0eb9ed7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 12:28:49 -0500 Subject: [PATCH 1115/8469] Remove special Distribute handling from pkg_resources module --HG-- branch : Setuptools-Distribute merge extra : source : 57da23339d58d215d98d8877a0e13103f4a8c9b9 --- pkg_resources.py | 64 ++++-------------------------------------------- 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 69601480d3..49f71c232b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -39,15 +39,6 @@ else: importlib_bootstrap = None -# This marker is used to simplify the process that checks is the -# setuptools package was installed by the Setuptools project -# or by the Distribute project, in case Setuptools creates -# a distribution with the same version. -# -# The bootstrapping script for instance, will check if this -# attribute is present to decide wether to reinstall the package -_distribute = True - def _bypass_ensure_directory(name, mode=0777): # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: @@ -551,7 +542,7 @@ def add(self, dist, entry=None, insert=True): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None, replacement=True): + def resolve(self, requirements, env=None, installer=None): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -570,9 +561,6 @@ def resolve(self, requirements, env=None, installer=None, replacement=True): while requirements: req = requirements.pop(0) # process dependencies breadth-first - if _override_setuptools(req) and replacement: - req = Requirement.parse('distribute') - if req in processed: # Ignore cyclic or redundant dependencies continue @@ -2346,17 +2334,6 @@ def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" loc = loc or self.location - - if self.project_name == 'setuptools': - try: - version = self.version - except ValueError: - version = '' - if '0.7' in version: - raise ValueError( - "A 0.7-series setuptools cannot be installed " - "with distribute. Found one at %s" % str(self.location)) - if not loc: return @@ -2395,7 +2372,7 @@ def insert_on(self, path, loc = None): def check_version_conflict(self): - if self.key=='distribute': + if self.key=='setuptools': return # ignore the inevitable setuptools self-conflicts :( nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt')) @@ -2676,22 +2653,11 @@ def __hash__(self): def __repr__(self): return "Requirement.parse(%r)" % str(self) #@staticmethod - def parse(s, replacement=True): + def parse(s): reqs = list(parse_requirements(s)) if reqs: - if len(reqs) == 1: - founded_req = reqs[0] - # if asked for setuptools distribution - # and if distribute is installed, we want to give - # distribute instead - if _override_setuptools(founded_req) and replacement: - distribute = list(parse_requirements('distribute')) - if len(distribute) == 1: - return distribute[0] - return founded_req - else: - return founded_req - + if len(reqs)==1: + return reqs[0] raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) @@ -2708,26 +2674,6 @@ def parse(s, replacement=True): } -def _override_setuptools(req): - """Return True when distribute wants to override a setuptools dependency. - - We want to override when the requirement is setuptools and the version is - a variant of 0.6. - - """ - if req.project_name == 'setuptools': - if not len(req.specs): - # Just setuptools: ok - return True - for comparator, version in req.specs: - if comparator in ['==', '>=', '>']: - if '0.7' in version: - # We want some setuptools not from the 0.6 series. - return False - return True - return False - - def _get_mro(cls): """Get an mro for a type or classic class""" if not isinstance(cls,type): From d59170df908bc3eed9783181906a74b577fbfc5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 12:42:41 -0500 Subject: [PATCH 1116/8469] Back out distribute-specific references in easy_install command module --HG-- branch : Setuptools-Distribute merge extra : source : 474b4e90c3c64ac0f8194dd68666bb137fd57988 --- setuptools/command/easy_install.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0d72f75843..8d44817f77 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -7,7 +7,7 @@ packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ http://packages.python.org/distribute/easy_install.html +__ http://packages.python.org/setuptools/easy_install.html """ import sys @@ -200,7 +200,7 @@ def delete_blockers(self, blockers): def finalize_options(self): if self.version: - print 'distribute %s' % get_distribution('distribute').version + print 'setuptools %s' % get_distribution('setuptools').version sys.exit() py_version = sys.version.split()[0] @@ -465,7 +465,7 @@ def cant_write_to_target(self): For information on other options, you may wish to consult the documentation at: - http://packages.python.org/distribute/easy_install.html + http://packages.python.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. """ @@ -1164,7 +1164,8 @@ def update_pth(self,dist): if not self.dry_run: self.pth_file.save() - if dist.key=='distribute': + + if dist.key=='setuptools': # Ensure that setuptools itself never becomes unavailable! # XXX should this check for latest version? filename = os.path.join(self.install_dir,'setuptools.pth') @@ -1249,7 +1250,7 @@ def no_default_version_msg(self): * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - http://packages.python.org/distribute/easy_install.html#custom-installation-locations + http://packages.python.org/setuptools/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" % ( self.install_dir, os.environ.get('PYTHONPATH','') @@ -1271,7 +1272,7 @@ def install_site_py(self): return # already did it, or don't need to sitepy = os.path.join(self.install_dir, "site.py") - source = resource_string(Requirement.parse("distribute"), "site.py") + source = resource_string(Requirement.parse("setuptools"), "site.py") current = "" if os.path.exists(sitepy): From 4febe30d3a406b342ef398c95a8cfec6018aa86e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 12:46:21 -0500 Subject: [PATCH 1117/8469] Backed out distribute-specific references in package_index module --HG-- branch : Setuptools-Distribute merge extra : source : 619f12674c8d42831a59dc805b7b9cbf375a831d --- setuptools/package_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0ee21e3b7b..d4d4631a86 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -154,8 +154,8 @@ def find_external_links(url, page): if match: yield urlparse.urljoin(url, htmldecode(match.group(1))) -user_agent = "Python-urllib/%s distribute/%s" % ( - sys.version[:3], require('distribute')[0].version +user_agent = "Python-urllib/%s setuptools/%s" % ( + sys.version[:3], require('setuptools')[0].version ) From 57a6e413d32ca4cb0854bb9efb275dd757116a99 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 12:49:20 -0500 Subject: [PATCH 1118/8469] Backed out distribute-specific reference in setuptools package --HG-- branch : Setuptools-Distribute merge extra : source : c8cbca6cc8241eebe20562282c560d8e620a55c6 --- setuptools/__init__.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9de373f98e..08de43498b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -14,16 +14,6 @@ 'find_packages' ] -# This marker is used to simplify the process that checks is the -# setuptools package was installed by the Setuptools project -# or by the Distribute project, in case Setuptools creates -# a distribution with the same version. -# -# The distribute_setup script for instance, will check if this -# attribute is present to decide whether to reinstall the package -# or not. -_distribute = True - bootstrap_install_from = None # If we run 2to3 on .py files, should we also convert docstrings? @@ -51,7 +41,7 @@ def find_packages(where='.', exclude=()): os.path.isfile(os.path.join(fn,'__init__.py')) ): out.append(prefix+name); stack.append((fn,prefix+name+'.')) - for pat in list(exclude)+['ez_setup', 'distribute_setup']: + for pat in list(exclude)+['ez_setup']: from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] return out From 31e60749d1eb7cf20a948407c07ad08b330c185e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 12:50:23 -0500 Subject: [PATCH 1119/8469] Rename distribute_setup back to ez_setup --HG-- branch : Setuptools-Distribute merge rename : distribute_setup.py => ez_setup.py extra : source : 6672af83b8acc0a4f88dd0e7a4df55591b878565 --- distribute_setup.py => ez_setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distribute_setup.py => ez_setup.py (100%) diff --git a/distribute_setup.py b/ez_setup.py similarity index 100% rename from distribute_setup.py rename to ez_setup.py From e601a3231382da411900b0a2d04f6ba64a1e2067 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Mar 2013 20:50:10 -0500 Subject: [PATCH 1120/8469] Removed the bulk of the anti-setuptools logic in ez_setup.py --HG-- branch : Setuptools-Distribute merge extra : source : 68b6b7a23e9150de6f2cc6ea37e1233ddbf79b22 --- ez_setup.py | 338 +++++----------------------------------------------- 1 file changed, 33 insertions(+), 305 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f630bca4f9..d311a0b9fb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,10 +1,10 @@ #!python -"""Bootstrap distribute installation +"""Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: - from distribute_setup import use_setuptools + from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools, set a download @@ -16,8 +16,6 @@ import os import shutil import sys -import time -import fnmatch import tempfile import tarfile import optparse @@ -50,20 +48,7 @@ def quote(arg): return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 DEFAULT_VERSION = "0.6.36" -DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" -SETUPTOOLS_FAKED_VERSION = "0.6c11" - -SETUPTOOLS_PKG_INFO = """\ -Metadata-Version: 1.0 -Name: setuptools -Version: %s -Summary: xxxx -Home-page: xxx -Author: xxx -Author-email: xxx -License: xxx -Description: xxx -""" % SETUPTOOLS_FAKED_VERSION +DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" def _install(tarball, install_args=()): @@ -83,7 +68,7 @@ def _install(tarball, install_args=()): log.warn('Now working in %s', subdir) # installing - log.warn('Installing Distribute') + log.warn('Installing Setuptools') if not _python_cmd('setup.py', 'install', *install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') @@ -111,7 +96,7 @@ def _build_egg(egg, tarball, to_dir): log.warn('Now working in %s', subdir) # building an egg - log.warn('Building a Distribute egg in %s', to_dir) + log.warn('Building a Setuptools egg in %s', to_dir) _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) finally: @@ -124,7 +109,7 @@ def _build_egg(egg, tarball, to_dir): def _do_download(version, download_base, to_dir, download_delay): - egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg' + egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): tarball = download_setuptools(version, download_base, @@ -136,50 +121,42 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15, no_fake=True): + to_dir=os.curdir, download_delay=15): # making sure we use the absolute path to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ 'setuptools' in sys.modules try: - try: - import pkg_resources - if not hasattr(pkg_resources, '_distribute'): - if not no_fake: - _fake_setuptools() - raise ImportError - except ImportError: - return _do_download(version, download_base, to_dir, download_delay) - try: - pkg_resources.require("distribute>=" + version) - return - except pkg_resources.VersionConflict: - e = sys.exc_info()[1] - if was_imported: - sys.stderr.write( - "The required version of distribute (>=%s) is not available,\n" - "and can't be installed while this script is running. Please\n" - "install a more recent version first, using\n" - "'easy_install -U distribute'." - "\n\n(Currently using %r)\n" % (version, e.args[0])) - sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return _do_download(version, download_base, to_dir, - download_delay) - except pkg_resources.DistributionNotFound: + import pkg_resources + except ImportError: + return _do_download(version, download_base, to_dir, download_delay) + try: + pkg_resources.require("setuptools>=" + version) + return + except pkg_resources.VersionConflict: + e = sys.exc_info()[1] + if was_imported: + sys.stderr.write( + "The required version of setuptools (>=%s) is not available,\n" + "and can't be installed while this script is running. Please\n" + "install a more recent version first, using\n" + "'easy_install -U setuptools'." + "\n\n(Currently using %r)\n" % (version, e.args[0])) + sys.exit(2) + else: + del pkg_resources, sys.modules['pkg_resources'] # reload ok return _do_download(version, download_base, to_dir, download_delay) - finally: - if not no_fake: - _create_fake_setuptools_pkg_info(to_dir) + except pkg_resources.DistributionNotFound: + return _do_download(version, download_base, to_dir, + download_delay) def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): - """Download distribute from a specified location and return its filename + """Download setuptools from a specified location and return its filename - `version` should be a valid distribute version number that is available + `version` should be a valid setuptools version number that is available as an egg for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download @@ -191,7 +168,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, from urllib.request import urlopen except ImportError: from urllib2 import urlopen - tgz_name = "distribute-%s.tar.gz" % version + tgz_name = "setuptools-%s.tar.gz" % version url = download_base + tgz_name saveto = os.path.join(to_dir, tgz_name) src = dst = None @@ -212,255 +189,6 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, return os.path.realpath(saveto) -def _no_sandbox(function): - def __no_sandbox(*args, **kw): - try: - from setuptools.sandbox import DirectorySandbox - if not hasattr(DirectorySandbox, '_old'): - def violation(*args): - pass - DirectorySandbox._old = DirectorySandbox._violation - DirectorySandbox._violation = violation - patched = True - else: - patched = False - except ImportError: - patched = False - - try: - return function(*args, **kw) - finally: - if patched: - DirectorySandbox._violation = DirectorySandbox._old - del DirectorySandbox._old - - return __no_sandbox - - -def _patch_file(path, content): - """Will backup the file then patch it""" - f = open(path) - existing_content = f.read() - f.close() - if existing_content == content: - # already patched - log.warn('Already patched.') - return False - log.warn('Patching...') - _rename_path(path) - f = open(path, 'w') - try: - f.write(content) - finally: - f.close() - return True - -_patch_file = _no_sandbox(_patch_file) - - -def _same_content(path, content): - f = open(path) - existing_content = f.read() - f.close() - return existing_content == content - - -def _rename_path(path): - new_name = path + '.OLD.%s' % time.time() - log.warn('Renaming %s to %s', path, new_name) - os.rename(path, new_name) - return new_name - - -def _remove_flat_installation(placeholder): - if not os.path.isdir(placeholder): - log.warn('Unkown installation at %s', placeholder) - return False - found = False - for file in os.listdir(placeholder): - if fnmatch.fnmatch(file, 'setuptools*.egg-info'): - found = True - break - if not found: - log.warn('Could not locate setuptools*.egg-info') - return - - log.warn('Moving elements out of the way...') - pkg_info = os.path.join(placeholder, file) - if os.path.isdir(pkg_info): - patched = _patch_egg_dir(pkg_info) - else: - patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) - - if not patched: - log.warn('%s already patched.', pkg_info) - return False - # now let's move the files out of the way - for element in ('setuptools', 'pkg_resources.py', 'site.py'): - element = os.path.join(placeholder, element) - if os.path.exists(element): - _rename_path(element) - else: - log.warn('Could not find the %s element of the ' - 'Setuptools distribution', element) - return True - -_remove_flat_installation = _no_sandbox(_remove_flat_installation) - - -def _after_install(dist): - log.warn('After install bootstrap.') - placeholder = dist.get_command_obj('install').install_purelib - _create_fake_setuptools_pkg_info(placeholder) - - -def _create_fake_setuptools_pkg_info(placeholder): - if not placeholder or not os.path.exists(placeholder): - log.warn('Could not find the install location') - return - pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - setuptools_file = 'setuptools-%s-py%s.egg-info' % \ - (SETUPTOOLS_FAKED_VERSION, pyver) - pkg_info = os.path.join(placeholder, setuptools_file) - if os.path.exists(pkg_info): - log.warn('%s already exists', pkg_info) - return - - log.warn('Creating %s', pkg_info) - try: - f = open(pkg_info, 'w') - except EnvironmentError: - log.warn("Don't have permissions to write %s, skipping", pkg_info) - return - try: - f.write(SETUPTOOLS_PKG_INFO) - finally: - f.close() - - pth_file = os.path.join(placeholder, 'setuptools.pth') - log.warn('Creating %s', pth_file) - f = open(pth_file, 'w') - try: - f.write(os.path.join(os.curdir, setuptools_file)) - finally: - f.close() - -_create_fake_setuptools_pkg_info = _no_sandbox( - _create_fake_setuptools_pkg_info -) - - -def _patch_egg_dir(path): - # let's check if it's already patched - pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') - if os.path.exists(pkg_info): - if _same_content(pkg_info, SETUPTOOLS_PKG_INFO): - log.warn('%s already patched.', pkg_info) - return False - _rename_path(path) - os.mkdir(path) - os.mkdir(os.path.join(path, 'EGG-INFO')) - pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') - f = open(pkg_info, 'w') - try: - f.write(SETUPTOOLS_PKG_INFO) - finally: - f.close() - return True - -_patch_egg_dir = _no_sandbox(_patch_egg_dir) - - -def _before_install(): - log.warn('Before install bootstrap.') - _fake_setuptools() - - -def _under_prefix(location): - if 'install' not in sys.argv: - return True - args = sys.argv[sys.argv.index('install') + 1:] - for index, arg in enumerate(args): - for option in ('--root', '--prefix'): - if arg.startswith('%s=' % option): - top_dir = arg.split('root=')[-1] - return location.startswith(top_dir) - elif arg == option: - if len(args) > index: - top_dir = args[index + 1] - return location.startswith(top_dir) - if arg == '--user' and USER_SITE is not None: - return location.startswith(USER_SITE) - return True - - -def _fake_setuptools(): - log.warn('Scanning installed packages') - try: - import pkg_resources - except ImportError: - # we're cool - log.warn('Setuptools or Distribute does not seem to be installed.') - return - ws = pkg_resources.working_set - try: - setuptools_dist = ws.find( - pkg_resources.Requirement.parse('setuptools', replacement=False) - ) - except TypeError: - # old distribute API - setuptools_dist = ws.find( - pkg_resources.Requirement.parse('setuptools') - ) - - if setuptools_dist is None: - log.warn('No setuptools distribution found') - return - # detecting if it was already faked - setuptools_location = setuptools_dist.location - log.warn('Setuptools installation detected at %s', setuptools_location) - - # if --root or --preix was provided, and if - # setuptools is not located in them, we don't patch it - if not _under_prefix(setuptools_location): - log.warn('Not patching, --root or --prefix is installing Distribute' - ' in another location') - return - - # let's see if its an egg - if not setuptools_location.endswith('.egg'): - log.warn('Non-egg installation') - res = _remove_flat_installation(setuptools_location) - if not res: - return - else: - log.warn('Egg installation') - pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO') - if (os.path.exists(pkg_info) and - _same_content(pkg_info, SETUPTOOLS_PKG_INFO)): - log.warn('Already patched.') - return - log.warn('Patching...') - # let's create a fake egg replacing setuptools one - res = _patch_egg_dir(setuptools_location) - if not res: - return - log.warn('Patching complete.') - _relaunch() - - -def _relaunch(): - log.warn('Relaunching...') - # we have to relaunch the process - # pip marker to avoid a relaunch bug - _cmd1 = ['-c', 'install', '--single-version-externally-managed'] - _cmd2 = ['-c', 'install', '--record'] - if sys.argv[:3] == _cmd1 or sys.argv[:3] == _cmd2: - sys.argv[0] = 'setup.py' - args = [sys.executable] + sys.argv - sys.exit(subprocess.call(args)) - - def _extractall(self, path=".", members=None): """Extract all members from the archive to the current working directory and set owner, modification time and permissions on @@ -510,7 +238,7 @@ def sorter(dir1, dir2): def _build_install_args(options): """ - Build the arguments to 'python setup.py install' on the distribute package + Build the arguments to 'python setup.py install' on the setuptools package """ install_args = [] if options.user_install: @@ -531,7 +259,7 @@ def _parse_args(): parser.add_option( '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, - help='alternative URL from where to download the distribute package') + help='alternative URL from where to download the setuptools package') options, args = parser.parse_args() # positional arguments are ignored return options From c1767ecf01540e87f89451a1d5fe9ff2ce1266d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Mar 2013 12:50:40 -0400 Subject: [PATCH 1121/8469] Remove references to distribute in setup.py --HG-- branch : Setuptools-Distribute merge extra : source : bee46cf41b11c416b5597c616bac574b8a83de0e --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 771cb74a4b..23146fcc9e 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ manifest_file.close() dir_util.create_tree(tmp_src, fl.files) outfiles_2to3 = [] - dist_script = os.path.join("build", "src", "distribute_setup.py") + dist_script = os.path.join("build", "src", "ez_setup.py") for f in fl.files: outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1) if copied and outf.endswith(".py") and outf != dist_script: @@ -82,7 +82,7 @@ def build_package_data(self): class test(_test): """Specific test class to avoid rewriting the entry_points.txt""" def run(self): - entry_points = os.path.join('distribute.egg-info', 'entry_points.txt') + entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt') if not os.path.exists(entry_points): _test.run(self) @@ -130,7 +130,7 @@ def _being_installed(): return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): - from distribute_setup import _before_install + from ez_setup import _before_install _before_install() # return contents of reStructureText file with linked issue references @@ -249,5 +249,5 @@ def _linkified(rst_path): ) if _being_installed(): - from distribute_setup import _after_install + from ez_setup import _after_install _after_install(dist) From cfd4a052e4f899269435180f87a1615417513385 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Mar 2013 13:16:49 -0400 Subject: [PATCH 1122/8469] Removed more distribute-specific, anti-setuptools code in setup.py --HG-- branch : Setuptools-Distribute merge extra : source : 8efeb91ad396dc12014a3992fc458cdb1fc35206 --- setup.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 23146fcc9e..d21ff02344 100755 --- a/setup.py +++ b/setup.py @@ -107,27 +107,16 @@ def run(self): f.close() -# if we are installing Distribute using "python setup.py install" -# we need to get setuptools out of the way -def _easy_install_marker(): - return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and - sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1]) - def _buildout_marker(): command = os.environ.get('_') if command: return 'buildout' in os.path.basename(command) def _being_installed(): - if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: - return False if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False - # easy_install marker - if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: # Don't bother doing anything if they're just asking for help - return False - return 'install' in sys.argv[1:] or _easy_install_marker() + return 'install' in sys.argv[1:] if _being_installed(): from ez_setup import _before_install From 74ac500de5709742b769c8bde05817b3bcdbebfe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Mar 2013 13:19:18 -0400 Subject: [PATCH 1123/8469] Removed references to removed methods in ez_setup --HG-- branch : Setuptools-Distribute merge extra : source : 4b38838e17b59d3705735e111219e20d89632481 --- setup.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/setup.py b/setup.py index d21ff02344..6cd15f25ab 100755 --- a/setup.py +++ b/setup.py @@ -107,21 +107,6 @@ def run(self): f.close() -def _buildout_marker(): - command = os.environ.get('_') - if command: - return 'buildout' in os.path.basename(command) - -def _being_installed(): - if _buildout_marker(): - # Installed by buildout, don't mess with a global setuptools. - return False - return 'install' in sys.argv[1:] - -if _being_installed(): - from ez_setup import _before_install - _before_install() - # return contents of reStructureText file with linked issue references def _linkified(rst_path): bitroot = 'http://bitbucket.org/tarek/distribute' @@ -236,7 +221,3 @@ def _linkified(rst_path): """).strip().splitlines(), scripts = scripts, ) - -if _being_installed(): - from ez_setup import _after_install - _after_install(dist) From 5dd873205fbd31f653b5a2bca68477306c7c64fb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 10:42:23 -0700 Subject: [PATCH 1124/8469] Restore entry_points.txt in egg-info. This file must be present if one desires to build or install setuptools on a system which doesn't already have some form of setuptools installed (such as a clean Python installation that has just cloned setuptools). This file could be omitted if we choose to only support installing via a setuptools-built sdist --HG-- branch : Setuptools-Distribute merge extra : source : a267228055f4402890b8143c6e9be5ea8074037e --- setuptools.egg-info/entry_points.txt | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 setuptools.egg-info/entry_points.txt diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt new file mode 100644 index 0000000000..663882d630 --- /dev/null +++ b/setuptools.egg-info/entry_points.txt @@ -0,0 +1,62 @@ +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + From 0281ae614b34e729dd3f67b938bee9ce90c12b45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 11:02:06 -0700 Subject: [PATCH 1125/8469] Updated references in tests to refer to setuptools in favor of distribute --HG-- branch : Setuptools-Distribute merge extra : rebase_source : 1ffe834b5ecad0e5fd0ae44cb63e6541d9006004 --- setuptools/tests/test_easy_install.py | 12 ++++++------ setuptools/tests/test_packageindex.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 582219cef9..4a65a8d243 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -266,10 +266,10 @@ def test_local_index(self): del os.environ['PYTHONPATH'] def test_setup_requires(self): - """Regression test for issue #318 + """Regression test for Distribute issue #318 - Ensures that a package with setup_requires can be installed when - distribute is installed in the user site-packages without causing a + Ensure that a package with setup_requires can be installed when + setuptools is installed in the user site-packages without causing a SandboxViolation. """ @@ -373,13 +373,13 @@ def create_sdist(self, installer): doesn't exist) and invoke installer on it. """ def build_sdist(dir): - dist_path = os.path.join(dir, 'distribute-test-fetcher-1.0.tar.gz') + dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz') make_trivial_sdist( dist_path, textwrap.dedent(""" import setuptools setuptools.setup( - name="distribute-test-fetcher", + name="setuptools-test-fetcher", version="1.0", setup_requires = ['does-not-exist'], ) @@ -447,7 +447,7 @@ def argv_context(f, repl): def reset_setup_stop_context(f): """ - When the distribute tests are run using setup.py test, and then + When the setuptools tests are run using setup.py test, and then one wants to invoke another setup() command (such as easy_install) within those tests, it's necessary to reset the global variable in distutils.core so that the setup() command will run naturally. diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 3e446b54d4..9c4bfadb0c 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -110,7 +110,7 @@ def test_links_priority(self): - someone reuploads the package (with a different md5) - while easy_installing, an MD5 error occurs because the external link is used - -> Distribute should use the link from pypi, not the external one. + -> Setuptools should use the link from pypi, not the external one. """ if sys.platform.startswith('java'): # Skip this test on jython because binding to :0 fails From 6482552f94c24cdc52c9badf6923640a4e9efa4f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 11:10:22 -0700 Subject: [PATCH 1126/8469] Removed tests relevant to the co-existence of distribute and setuptools; retained some tests that are still relevant --HG-- branch : Setuptools-Distribute merge extra : rebase_source : c87a0b28f0bcd679ae5a34770b0f4fb908f2aee3 --- setuptools/tests/test_resources.py | 43 +++++------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 292b78d1ab..f10fc99925 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -197,29 +197,6 @@ def testDistroDependsOptions(self): ) self.assertRaises(UnknownExtra, d.requires, ["foo"]) - def testSetuptoolsDistributeCombination(self): - # Ensure that installing a 0.7-series setuptools fails. PJE says that - # it will not co-exist. - ws = WorkingSet([]) - d = Distribution( - "/some/path", - project_name="setuptools", - version="0.7a1") - self.assertRaises(ValueError, ws.add, d) - # A 0.6-series is no problem - d2 = Distribution( - "/some/path", - project_name="setuptools", - version="0.6c9") - ws.add(d2) - - # a unexisting version needs to work - ws = WorkingSet([]) - d3 = Distribution( - "/some/path", - project_name="setuptools") - ws.add(d3) - class EntryPointTests(TestCase): @@ -372,21 +349,13 @@ def testVersionEquality(self): self.assertTrue(d("foo-0.3a3.egg") in r2) self.assertTrue(d("foo-0.3a5.egg") in r2) - def testDistributeSetuptoolsOverride(self): - # Plain setuptools or distribute mean we return distribute. - self.assertEqual( - Requirement.parse('setuptools').project_name, 'distribute') - self.assertEqual( - Requirement.parse('distribute').project_name, 'distribute') - # setuptools lower than 0.7 means distribute - self.assertEqual( - Requirement.parse('setuptools==0.6c9').project_name, 'distribute') - self.assertEqual( - Requirement.parse('setuptools==0.6c10').project_name, 'distribute') - self.assertEqual( - Requirement.parse('setuptools>=0.6').project_name, 'distribute') + def testSetuptoolsProjectName(self): + """ + The setuptools project should implement the setuptools package. + """ + self.assertEqual( - Requirement.parse('setuptools < 0.7').project_name, 'distribute') + Requirement.parse('setuptools').project_name, 'setuptools') # setuptools 0.7 and higher means setuptools. self.assertEqual( Requirement.parse('setuptools == 0.7').project_name, 'setuptools') From 7a12d0b7937c832c0ce5b306105ceb5c5b08bd63 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 11:11:34 -0700 Subject: [PATCH 1127/8469] Updated a couple more references from Distribute to Setuptools --HG-- branch : Setuptools-Distribute merge extra : rebase_source : ad9f8f344d7e705ddc354757fbe741b34b576b1b --- setuptools/tests/test_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index f10fc99925..9c2ed9c91d 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -559,7 +559,7 @@ class NamespaceTests(TestCase): def setUp(self): self._ns_pkgs = pkg_resources._namespace_packages.copy() - self._tmpdir = tempfile.mkdtemp(prefix="tests-distribute-") + self._tmpdir = tempfile.mkdtemp(prefix="tests-setuptools-") os.makedirs(os.path.join(self._tmpdir, "site-pkgs")) self._prev_sys_path = sys.path[:] sys.path.append(os.path.join(self._tmpdir, "site-pkgs")) @@ -603,7 +603,7 @@ def test_two_levels_deep(self): try: import pkg1.pkg2 except ImportError, e: - self.fail("Distribute tried to import the parent namespace package") + self.fail("Setuptools tried to import the parent namespace package") # check the _namespace_packages dict self._assertIn("pkg1.pkg2", pkg_resources._namespace_packages.keys()) self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) From 9418f48c8f3baefbae00d12e6872f0d174bc9335 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 11:27:50 -0700 Subject: [PATCH 1128/8469] Updated install_test to reference the new bootstrap script --HG-- branch : Setuptools-Distribute merge extra : rebase_source : ae9d4dbfa6770634bf65bba6f0b6f236074aa9d5 --- tests/install_test.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/install_test.py b/tests/install_test.py index 02deb81860..c8a28decbd 100644 --- a/tests/install_test.py +++ b/tests/install_test.py @@ -2,8 +2,10 @@ import sys import os -if os.path.exists('distribute_setup.py'): - print 'distribute_setup.py exists in the current dir, aborting' +bootstrap_name = 'ez_setup.py' + +if os.path.exists(bootstrap_name): + print bootstrap_name + ' exists in the current dir, aborting' sys.exit(2) print '**** Starting Test' @@ -14,24 +16,28 @@ import subprocess print 'Downloading bootstrap' -file = urllib2.urlopen('http://nightly.ziade.org/distribute_setup.py') -f = open('distribute_setup.py', 'w') +file = urllib2.urlopen('https://bitbucket.org/jaraco/setuptools-private' + '/src/tip/' + bootstrap_name) +f = open(bootstrap_name, 'w') f.write(file.read()) f.close() # running it -args = [sys.executable] + ['distribute_setup.py'] +args = [sys.executable, bootstrap_name] if is_jython: res = subprocess.call(args) else: res = os.spawnv(os.P_WAIT, sys.executable, args) +fail_message = ('**** Test failed; please report the output to the ' + 'setuptools bugtracker.') + if res != 0: - print '**** Test failed, please send me the output at tarek@ziade.org' - os.remove('distribute_setup.py') + print(fail_message) + os.remove(bootstrap_name) sys.exit(2) -# now checking if Distribute is installed +# now checking if Setuptools is installed script = """\ import sys try: @@ -67,9 +73,9 @@ if res: print '**** Test is OK' else: - print '**** Test failed, please send me the output at tarek@ziade.org' + print(fail_message) finally: if os.path.exists(script_name): os.remove(script_name) - os.remove('distribute_setup.py') + os.remove(bootstrap_name) From 45728d9be1d67fac6369e89941cf1bb4d0f8e520 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 11:28:35 -0700 Subject: [PATCH 1129/8469] Removing install_test altogether (the only thing it tests is the presence of the deprecated setuptools._distribute attribute) --HG-- branch : Setuptools-Distribute merge extra : rebase_source : 05075288d1f0557ec75ceda127699ef8152a466f --- tests/install_test.py | 81 ------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 tests/install_test.py diff --git a/tests/install_test.py b/tests/install_test.py deleted file mode 100644 index c8a28decbd..0000000000 --- a/tests/install_test.py +++ /dev/null @@ -1,81 +0,0 @@ -import urllib2 -import sys -import os - -bootstrap_name = 'ez_setup.py' - -if os.path.exists(bootstrap_name): - print bootstrap_name + ' exists in the current dir, aborting' - sys.exit(2) - -print '**** Starting Test' -print '\n\n' - -is_jython = sys.platform.startswith('java') -if is_jython: - import subprocess - -print 'Downloading bootstrap' -file = urllib2.urlopen('https://bitbucket.org/jaraco/setuptools-private' - '/src/tip/' + bootstrap_name) -f = open(bootstrap_name, 'w') -f.write(file.read()) -f.close() - -# running it -args = [sys.executable, bootstrap_name] -if is_jython: - res = subprocess.call(args) -else: - res = os.spawnv(os.P_WAIT, sys.executable, args) - -fail_message = ('**** Test failed; please report the output to the ' - 'setuptools bugtracker.') - -if res != 0: - print(fail_message) - os.remove(bootstrap_name) - sys.exit(2) - -# now checking if Setuptools is installed -script = """\ -import sys -try: - import setuptools -except ImportError: - sys.exit(0) - -sys.exit(hasattr(setuptools, "_distribute")) -""" - -root = 'script' -seed = 0 -script_name = '%s%d.py' % (root, seed) - -while os.path.exists(script_name): - seed += 1 - script_name = '%s%d.py' % (root, seed) - -f = open(script_name, 'w') -try: - f.write(script) -finally: - f.close() - -try: - args = [sys.executable] + [script_name] - if is_jython: - res = subprocess.call(args) - else: - res = os.spawnv(os.P_WAIT, sys.executable, args) - - print '\n\n' - if res: - print '**** Test is OK' - else: - print(fail_message) -finally: - if os.path.exists(script_name): - os.remove(script_name) - os.remove(bootstrap_name) - From 06b90a07da2bc7fded73743ca5bbf38200e972d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 12:01:43 -0700 Subject: [PATCH 1130/8469] Updated manual test to test against setuptools --HG-- branch : Setuptools-Distribute merge extra : rebase_source : ff968de5ea0e28052c0b53fecdcf0c348a6faf04 --- tests/manual_test.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 0d5051f165..44cf2d0657 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -51,9 +51,8 @@ def _tempdir(*args, **kwargs): extensions """ -BOOTSTRAP = 'http://python-distribute.org/bootstrap.py' +BOOTSTRAP = 'http://downloads.buildout.org/1/bootstrap.py' PYVER = sys.version.split()[0][:3] -DEV_URL = 'http://bitbucket.org/tarek/distribute/get/0.6-maintenance.zip#egg=distribute-dev' _VARS = {'base': '.', 'py_version_short': PYVER} @@ -66,26 +65,25 @@ def _tempdir(*args, **kwargs): @tempdir def test_virtualenv(): - """virtualenv with distribute""" + """virtualenv with setuptools""" purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) - _system_call('virtualenv', '--no-site-packages', '.', '--distribute') - _system_call('bin/easy_install', 'distribute==dev') + _system_call('virtualenv', '--no-site-packages', '.') + _system_call('bin/easy_install', 'setuptools==dev') # linux specific site_pkg = os.listdir(purelib) site_pkg.sort() - assert 'distribute' in site_pkg[0] + assert 'setuptools' in site_pkg[0] easy_install = os.path.join(purelib, 'easy-install.pth') with open(easy_install) as f: res = f.read() - assert 'distribute' in res - assert 'setuptools' not in res + assert 'setuptools' in res @tempdir def test_full(): """virtualenv + pip + buildout""" _system_call('virtualenv', '--no-site-packages', '.') - _system_call('bin/easy_install', '-q', 'distribute==dev') - _system_call('bin/easy_install', '-qU', 'distribute==dev') + _system_call('bin/easy_install', '-q', 'setuptools==dev') + _system_call('bin/easy_install', '-qU', 'setuptools==dev') _system_call('bin/easy_install', '-q', 'pip') _system_call('bin/pip', 'install', '-q', 'zc.buildout') @@ -95,16 +93,16 @@ def test_full(): with open('bootstrap.py', 'w') as f: f.write(urlopen(BOOTSTRAP).read()) - _system_call('bin/python', 'bootstrap.py', '--distribute') + _system_call('bin/python', 'bootstrap.py') _system_call('bin/buildout', '-q') eggs = os.listdir('eggs') eggs.sort() assert len(eggs) == 3 - assert eggs[0].startswith('distribute') - assert eggs[1:] == ['extensions-0.3-py2.6.egg', - 'zc.recipe.egg-1.2.2-py2.6.egg'] + assert eggs[1].startswith('setuptools') + del eggs[1] + assert eggs == ['extensions-0.3-py2.6.egg', + 'zc.recipe.egg-1.2.2-py2.6.egg'] if __name__ == '__main__': test_virtualenv() test_full() - From c49ceeb20b4478dcd089be4f1ebe1684fb880bb5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 12:06:28 -0700 Subject: [PATCH 1131/8469] Update test_distribute_setup to reference ez_setup.py --HG-- branch : Setuptools-Distribute merge rename : tests/test_distribute_setup.py => tests/test_ez_setup.py extra : rebase_source : d6fe218013147bd6a4e43220356d539d7764da11 --- ...st_distribute_setup.py => test_ez_setup.py} | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) rename tests/{test_distribute_setup.py => test_ez_setup.py} (75%) diff --git a/tests/test_distribute_setup.py b/tests/test_ez_setup.py similarity index 75% rename from tests/test_distribute_setup.py rename to tests/test_ez_setup.py index 1f3da058d1..922bd88465 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_ez_setup.py @@ -9,10 +9,9 @@ TOPDIR = os.path.split(CURDIR)[0] sys.path.insert(0, TOPDIR) -from distribute_setup import (use_setuptools, _build_egg, _python_cmd, - _do_download, _install, DEFAULT_URL, - DEFAULT_VERSION) -import distribute_setup +from ez_setup import (use_setuptools, _build_egg, _python_cmd, _do_download, + _install, DEFAULT_URL, DEFAULT_VERSION) +import ez_setup class TestSetup(unittest.TestCase): @@ -54,20 +53,11 @@ def test_do_download(self): def test_install(self): def _faked(*args): return True - distribute_setup.python_cmd = _faked + ez_setup.python_cmd = _faked _install(self.tarball) def test_use_setuptools(self): self.assertEqual(use_setuptools(), None) - # make sure fake_setuptools is not called by default - import pkg_resources - del pkg_resources._distribute - def fake_setuptools(*args): - raise AssertionError - - pkg_resources._fake_setuptools = fake_setuptools - use_setuptools() - if __name__ == '__main__': unittest.main() From 79c654f4976d7e5258feef30c7d948665ac7d8cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 17:10:43 -0700 Subject: [PATCH 1132/8469] Revert README to match setuptools-0.6 --HG-- branch : Setuptools-Distribute merge extra : source : 5d3a4df9b11a90b744762470fc7b784ca5412da9 --- README.txt | 312 ++++++++++++++++++++++++----------------------------- 1 file changed, 143 insertions(+), 169 deletions(-) diff --git a/README.txt b/README.txt index a827f4a627..12b1e390b6 100755 --- a/README.txt +++ b/README.txt @@ -1,228 +1,202 @@ =============================== -Installing and Using Distribute +Installing and Using Setuptools =============================== .. contents:: **Table of Contents** ------------ -Disclaimers ------------ - -About the fork -============== - -`Distribute` is a fork of the `Setuptools` project. - -Distribute is intended to replace Setuptools as the standard method -for working with Python module distributions. - -The fork has two goals: - -- Providing a backward compatible version to replace Setuptools - and make all distributions that depend on Setuptools work as - before, but with less bugs and behaviorial issues. - This work is done in the 0.6.x series. +---------------------------------- +Security Issues - Read this First! +---------------------------------- - Starting with version 0.6.2, Distribute supports Python 3. - Installing and using distribute for Python 3 code works exactly - the same as for Python 2 code, but Distribute also helps you to support - Python 2 and Python 3 from the same source code by letting you run 2to3 - on the code as a part of the build process, by setting the keyword parameter - ``use_2to3`` to True. See http://packages.python.org/distribute for more - information. +Setuptools and ``easy_install`` currently default to allowing automated +download and execution of code from anywhere on the internet, without actually +verifying the owners of the websites or the authors of the code. If you want +your installation to be more secure, you will need to: -- Refactoring the code, and releasing it in several distributions. - This work is being done in the 0.7.x series but not yet released. + 1. Manually install the `requests `_ + library **after** installing setuptools, using an SSL-enabled browser or + other tool. (This will enable SSL certificate verification.) -The roadmap is still evolving, and the page that is up-to-date is -located at : `http://packages.python.org/distribute/roadmap`. + 2. Configure your default ``--allow-hosts`` setting so that ``easy_install`` + will only download from sites you trust. (E.g., to only download from + ``pypi.python.org`` or some other trusted package index.) -If you install `Distribute` and want to switch back for any reason to -`Setuptools`, get to the `Uninstallation instructions`_ section. + 3. If you are using a Python version less than 2.6, you will also need to + install the `SSL backport module `_ + to enable SSL downloads from PyPI. (Unfortunately, the ``requests`` + package does not support older versions of Python at this time, so SSL + certificate verification will not be enabled. But at least you'll still be + able to use PyPI, which is in the process of switching to an all-SSL policy + for downloads. + +For more information on how to do all of the above, and for other security- +related information, please see the full `setuptools security documentation +`_. -More documentation -================== - -You can get more information in the Sphinx-based documentation, located -at http://packages.python.org/distribute. This documentation includes the old -Setuptools documentation that is slowly replaced, and brand new content. - -About the installation process -============================== - -The `Distribute` installer modifies your installation by de-activating an -existing installation of `Setuptools` in a bootstrap process. This process -has been tested in various installation schemes and contexts but in case of a -bug during this process your Python installation might be left in a broken -state. Since all modified files and directories are copied before the -installation starts, you will be able to get back to a normal state by reading -the instructions in the `Uninstallation instructions`_ section. - -In any case, it is recommended to save you `site-packages` directory before -you start the installation of `Distribute`. ------------------------- Installation Instructions ------------------------- -Distribute is only released as a source distribution. - -It can be installed using pip, and can be done so with the source tarball, -or by using the ``distribute_setup.py`` script provided online. - -``distribute_setup.py`` is the simplest and preferred way on all systems. +Windows +======= -distribute_setup.py -=================== +32-bit version of Python + Install setuptools using the provided ``.exe`` installer. -Download -`distribute_setup.py `_ -and execute it, using the Python interpreter of your choice. +64-bit versions of Python + Download `ez_setup.py`_ and run it; it will download the appropriate .egg file and install it for you. (Currently, the provided ``.exe`` installer does not support 64-bit versions of Python for Windows, due to a `distutils installer compatibility issue`_ -If your shell has the ``curl`` program you can do:: +.. _ez_setup.py: http://peak.telecommunity.com/dist/ez_setup.py +.. _distutils installer compatibility issue: http://bugs.python.org/issue6792 - $ curl -O http://python-distribute.org/distribute_setup.py - $ python distribute_setup.py -Notice this file is also provided in the source release. +NOTE: Regardless of what sort of Python you're using, if you've previously +installed older versions of setuptools, please delete all ``setuptools*.egg`` +and ``setuptools.pth`` files from your system's ``site-packages`` directory +(and any other ``sys.path`` directories) FIRST. -pip -=== +If you are upgrading a previous version of setuptools that was installed using +an ``.exe`` installer, please be sure to also *uninstall that older version* +via your system's "Add/Remove Programs" feature, BEFORE installing the newer +version. -Run easy_install or pip:: +Once installation is complete, you will find an ``easy_install.exe`` program in +your Python ``Scripts`` subdirectory. Be sure to add this directory to your +``PATH`` environment variable, if you haven't already done so. - $ pip install distribute -Source installation -=================== +RPM-Based Systems +================= -Download the source tarball, uncompress it, then run the install command:: +Install setuptools using the provided source RPM. The included ``.spec`` file +assumes you are installing using the default ``python`` executable, and is not +specific to a particular Python version. The ``easy_install`` executable will +be installed to a system ``bin`` directory such as ``/usr/bin``. - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.36.tar.gz - $ tar -xzvf distribute-0.6.36.tar.gz - $ cd distribute-0.6.36 - $ python setup.py install +If you wish to install to a location other than the default Python +installation's default ``site-packages`` directory (and ``$prefix/bin`` for +scripts), please use the ``.egg``-based installation approach described in the +following section. ---------------------------- -Uninstallation Instructions ---------------------------- -Like other distutils-based distributions, Distribute doesn't provide an -uninstaller yet. It's all done manually! We are all waiting for PEP 376 -support in Python. - -Distribute is installed in three steps: - -1. it gets out of the way an existing installation of Setuptools -2. it installs a `fake` setuptools installation -3. it installs distribute - -Distribute can be removed like this: - -- remove the ``distribute*.egg`` file located in your site-packages directory -- remove the ``setuptools.pth`` file located in you site-packages directory -- remove the easy_install script located in you ``sys.prefix/bin`` directory -- remove the ``setuptools*.egg`` directory located in your site-packages directory, - if any. - -If you want to get back to setuptools: - -- reinstall setuptools using its instruction. - -Lastly: - -- remove the *.OLD.* directory located in your site-packages directory if any, - **once you have checked everything was working correctly again**. +Cygwin, Mac OS X, Linux, Other +============================== -------------------------- -Quick help for developers -------------------------- +1. Download the appropriate egg for your version of Python (e.g. + ``setuptools-0.6c9-py2.4.egg``). Do NOT rename it. -To create an egg which is compatible with Distribute, use the same -practice as with Setuptools, e.g.:: +2. Run it as if it were a shell script, e.g. ``sh setuptools-0.6c9-py2.4.egg``. + Setuptools will install itself using the matching version of Python (e.g. + ``python2.4``), and will place the ``easy_install`` executable in the + default location for installing Python scripts (as determined by the + standard distutils configuration files, or by the Python installation). - from setuptools import setup +If you want to install setuptools to somewhere other than ``site-packages`` or +your default distutils installation locations for libraries and scripts, you +may include EasyInstall command-line options such as ``--prefix``, +``--install-dir``, and so on, following the ``.egg`` filename on the same +command line. For example:: - setup(... - ) + sh setuptools-0.6c9-py2.4.egg --prefix=~ -To use `pkg_resources` to access data files in the egg, you should -require the Setuptools distribution explicitly:: +You can use ``--help`` to get a full options list, but we recommend consulting +the `EasyInstall manual`_ for detailed instructions, especially `the section +on custom installation locations`_. - from setuptools import setup +.. _EasyInstall manual: http://peak.telecommunity.com/DevCenter/EasyInstall +.. _the section on custom installation locations: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations - setup(... - install_requires=['setuptools'] - ) -Only if you need Distribute-specific functionality should you depend -on it explicitly. In this case, replace the Setuptools dependency:: +Cygwin Note +----------- - from setuptools import setup +If you are trying to install setuptools for the **Windows** version of Python +(as opposed to the Cygwin version that lives in ``/usr/bin``), you must make +sure that an appropriate executable (``python2.3``, ``python2.4``, or +``python2.5``) is on your **Cygwin** ``PATH`` when invoking the egg. For +example, doing the following at a Cygwin bash prompt will install setuptools +for the **Windows** Python found at ``C:\\Python24``:: - setup(... - install_requires=['distribute'] - ) + ln -s /cygdrive/c/Python24/python.exe python2.4 + PATH=.:$PATH sh setuptools-0.6c9-py2.4.egg + rm python2.4 ------------ -Install FAQ ------------ -- **Why is Distribute wrapping my Setuptools installation?** +Downloads +========= - Since Distribute is a fork, and since it provides the same package - and modules, it renames the existing Setuptools egg and inserts a - new one which merely wraps the Distribute code. This way, full - backwards compatibility is kept for packages which rely on the - Setuptools modules. +All setuptools downloads can be found at `the project's home page in the Python +Package Index`_. Scroll to the very bottom of the page to find the links. - At the same time, packages can meet their dependency on Setuptools - without actually installing it (which would disable Distribute). +.. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files -- **How does Distribute interact with virtualenv?** +In addition to the PyPI downloads, the development version of ``setuptools`` +is available from the `Python SVN sandbox`_, and in-development versions of the +`0.6 branch`_ are available as well. - Everytime you create a virtualenv it will install setuptools by default. - You either need to re-install Distribute in it right after or pass the - ``--distribute`` option when creating it. +.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - Once installed, your virtualenv will use Distribute transparently. +.. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev - Although, if you have Setuptools installed in your system-wide Python, - and if the virtualenv you are in was generated without the `--no-site-packages` - option, the Distribute installation will stop. +-------------------------------- +Using Setuptools and EasyInstall +-------------------------------- - You need in this case to build a virtualenv with the `--no-site-packages` - option or to install `Distribute` globally. +Here are some of the available manuals, tutorials, and other resources for +learning about Setuptools, Python Eggs, and EasyInstall: -- **How does Distribute interacts with zc.buildout?** +* `The EasyInstall user's guide and reference manual`_ +* `The setuptools Developer's Guide`_ +* `The pkg_resources API reference`_ +* `Package Compatibility Notes`_ (user-maintained) +* `The Internal Structure of Python Eggs`_ - You can use Distribute in your zc.buildout, with the --distribute option, - starting at zc.buildout 1.4.2:: +Questions, comments, and bug reports should be directed to the `distutils-sig +mailing list`_. If you have written (or know of) any tutorials, documentation, +plug-ins, or other resources for setuptools users, please let us know about +them there, so this reference list can be updated. If you have working, +*tested* patches to correct problems or add features, you may submit them to +the `setuptools bug tracker`_. - $ python bootstrap.py --distribute +.. _setuptools bug tracker: http://bugs.python.org/setuptools/ +.. _Package Compatibility Notes: http://peak.telecommunity.com/DevCenter/PackageNotes +.. _The Internal Structure of Python Eggs: http://peak.telecommunity.com/DevCenter/EggFormats +.. _The setuptools Developer's Guide: http://peak.telecommunity.com/DevCenter/setuptools +.. _The pkg_resources API reference: http://peak.telecommunity.com/DevCenter/PkgResources +.. _The EasyInstall user's guide and reference manual: http://peak.telecommunity.com/DevCenter/EasyInstall +.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ - For previous zc.buildout versions, *the only thing* you need to do - is use the bootstrap at `http://python-distribute.org/bootstrap.py`. Run - that bootstrap and ``bin/buildout`` (and all other buildout-generated - scripts) will transparently use distribute instead of setuptools. You do - not need a specific buildout release. - A shared eggs directory is no problem (since 0.6.6): the setuptools egg is - left in place unmodified. So other buildouts that do not yet use the new - bootstrap continue to work just fine. And there is no need to list - ``distribute`` somewhere in your eggs: using the bootstrap is enough. +------- +Credits +------- - The source code for the bootstrap script is located at - `http://bitbucket.org/tarek/buildout-distribute`. +* The original design for the ``.egg`` format and the ``pkg_resources`` API was + co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first + version of ``pkg_resources``, and supplied the OS X operating system version + compatibility algorithm. +* Ian Bicking implemented many early "creature comfort" features of + easy_install, including support for downloading via Sourceforge and + Subversion repositories. Ian's comments on the Web-SIG about WSGI + application deployment also inspired the concept of "entry points" in eggs, + and he has given talks at PyCon and elsewhere to inform and educate the + community about eggs and setuptools. +* Jim Fulton contributed time and effort to build automated tests of various + aspects of ``easy_install``, and supplied the doctests for the command-line + ``.exe`` wrappers on Windows. ------------------------------ -Feedback and getting involved ------------------------------ +* Phillip J. Eby is the principal author and maintainer of setuptools, and + first proposed the idea of an importable binary distribution format for + Python application plug-ins. -- Mailing list: http://mail.python.org/mailman/listinfo/distutils-sig -- Issue tracker: http://bitbucket.org/tarek/distribute/issues/ -- Code Repository: http://bitbucket.org/tarek/distribute +* Significant parts of the implementation of setuptools were funded by the Open + Source Applications Foundation, to provide a plug-in infrastructure for the + Chandler PIM application. In addition, many OSAF staffers (such as Mike + "Code Bear" Taylor) contributed their time and stress as guinea pigs for the + use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) +.. _files: From 1ec0efe5d55c06f421840cce007580516645f0d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 15:38:52 +0100 Subject: [PATCH 1133/8469] This revision is where the distribute fork occurred --HG-- branch : Setuptools-Distribute merge From 44e41d4b39ba45fa6329cdfefea82adc02242f3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 17:23:50 -0700 Subject: [PATCH 1134/8469] Copied changes from setuptools-0.6 for pkg_resources.py --HG-- branch : Setuptools-Distribute merge extra : source : ead8ad8c5e5f750d70b7f040f61c0664a2128c1e --- pkg_resources.py | 113 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 36 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9edb6c0bd9..79db00b8c2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,17 +13,25 @@ method. """ -import sys, os, zipimport, time, re, imp, new +import sys, os, zipimport, time, re, imp try: frozenset except NameError: from sets import ImmutableSet as frozenset -from os import utime, rename, unlink # capture these to bypass sandboxing +# capture these to bypass sandboxing +from os import utime, rename, unlink, mkdir from os import open as os_open +from os.path import isdir, split +def _bypass_ensure_directory(name, mode=0777): + # Sandbox-bypassing version of ensure_directory() + dirname, filename = split(name) + if dirname and filename and not isdir(dirname): + _bypass_ensure_directory(dirname) + mkdir(dirname, mode) @@ -31,8 +39,41 @@ +_state_vars = {} +def _declare_state(vartype, **kw): + g = globals() + for name, val in kw.iteritems(): + g[name] = val + _state_vars[name] = vartype + +def __getstate__(): + state = {} + g = globals() + for k, v in _state_vars.iteritems(): + state[k] = g['_sget_'+v](g[k]) + return state + +def __setstate__(state): + g = globals() + for k, v in state.iteritems(): + g['_sset_'+_state_vars[k]](k, g[k], v) + return state + +def _sget_dict(val): + return val.copy() + +def _sset_dict(key, ob, state): + ob.clear() + ob.update(state) + +def _sget_object(val): + return val.__getstate__() +def _sset_object(key, ob, state): + ob.__setstate__(state) + +_sget_none = _sset_none = lambda *args: None @@ -164,14 +205,8 @@ def get_provider(moduleOrReq): def _macosx_vers(_cache=[]): if not _cache: - info = os.popen('/usr/bin/sw_vers').read().splitlines() - for line in info: - key, value = line.split(None, 1) - if key == 'ProductVersion:': - _cache.append(value.strip().split(".")) - break - else: - raise ValueError, "What?!" + from platform import mac_ver + _cache.append(mac_ver()[0].split('.')) return _cache[0] def _macosx_arch(machine): @@ -203,6 +238,12 @@ def get_build_platform(): + + + + + + def compatible_platforms(provided,required): """Can code for the `provided` platform run on the `required` platform? @@ -387,7 +428,7 @@ def __init__(self, entries=None): def add_entry(self, entry): """Add a path item to ``.entries``, finding any distributions on it - ``find_distributions(entry,False)`` is used to find distributions + ``find_distributions(entry, True)`` is used to find distributions corresponding to the path entry, and they are added. `entry` is always appended to ``.entries``, even if it is already present. (This is because ``sys.path`` can contain the same value more than @@ -622,7 +663,6 @@ def require(self, *requirements): activated to fulfill the requirements; all relevant distributions are included, even if they were already activated in this working set. """ - needed = self.resolve(parse_requirements(requirements)) for dist in needed: @@ -630,7 +670,6 @@ def require(self, *requirements): return needed - def subscribe(self, callback): """Invoke `callback` for all distributions (including existing ones)""" if callback in self.callbacks: @@ -639,19 +678,21 @@ def subscribe(self, callback): for dist in self: callback(dist) - def _added_new(self, dist): for callback in self.callbacks: callback(dist) + def __getstate__(self): + return ( + self.entries[:], self.entry_keys.copy(), self.by_key.copy(), + self.callbacks[:] + ) - - - - - - - + def __setstate__(self, (entries, keys, by_key, callbacks)): + self.entries = entries[:] + self.entry_keys = keys.copy() + self.by_key = by_key.copy() + self.callbacks = callbacks[:] class Environment(object): @@ -916,7 +957,7 @@ def get_cache_path(self, archive_name, names=()): extract_path = self.extraction_path or get_default_cache() target_path = os.path.join(extract_path, archive_name+'-tmp', *names) try: - ensure_directory(target_path) + _bypass_ensure_directory(target_path) except: self.extraction_error() @@ -1597,7 +1638,7 @@ def get_importer(path_item): -_distribution_finders = {} +_declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items @@ -1646,7 +1687,7 @@ def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" path_item = _normalize_cached(path_item) - if os.path.isdir(path_item): + if os.path.isdir(path_item) and os.access(path_item, os.R_OK): if path_item.lower().endswith('.egg'): # unpacked egg yield Distribution.from_filename( @@ -1679,8 +1720,8 @@ def find_on_path(importer, path_item, only=False): break register_finder(ImpWrapper,find_on_path) -_namespace_handlers = {} -_namespace_packages = {} +_declare_state('dict', _namespace_handlers = {}) +_declare_state('dict', _namespace_packages = {}) def register_namespace_handler(importer_type, namespace_handler): """Register `namespace_handler` to declare namespace packages @@ -1709,7 +1750,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = new.module(packageName) + module = sys.modules[packageName] = imp.new_module(packageName) module.__path__ = []; _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) @@ -2220,12 +2261,9 @@ def insert_on(self, path, loc = None): if not loc: return - if path is sys.path: - self.check_version_conflict() - nloc = _normalize_cached(loc) bdir = os.path.dirname(nloc) - npath= map(_normalize_cached, path) + npath= [(p and _normalize_cached(p) or p) for p in path] bp = None for p, item in enumerate(npath): @@ -2233,10 +2271,14 @@ def insert_on(self, path, loc = None): break elif item==bdir and self.precedence==EGG_DIST: # if it's an .egg, give it precedence over its directory + if path is sys.path: + self.check_version_conflict() path.insert(p, loc) npath.insert(p, nloc) break else: + if path is sys.path: + self.check_version_conflict() path.append(loc) return @@ -2253,7 +2295,6 @@ def insert_on(self, path, loc = None): return - def check_version_conflict(self): if self.key=='setuptools': return # ignore the inevitable setuptools self-conflicts :( @@ -2267,7 +2308,7 @@ def check_version_conflict(self): continue fn = getattr(sys.modules[modname], '__file__', None) - if fn and normalize_path(fn).startswith(loc): + if fn and (normalize_path(fn).startswith(loc) or fn.startswith(loc)): continue issue_warning( "Module %s was already imported from %s, but %s is being added" @@ -2444,7 +2485,7 @@ def __eq__(self,other): def __contains__(self,item): if isinstance(item,Distribution): - if item.key <> self.key: return False + if item.key != self.key: return False if self.index: item = item.parsed_version # only get if we need it elif isinstance(item,basestring): item = parse_version(item) @@ -2541,7 +2582,7 @@ def _mkstemp(*args,**kw): os.open = old_open # and then put it back -# Set up global resource manager +# Set up global resource manager (deliberately not state-saved) _manager = ResourceManager() def _initialize(g): for name in dir(_manager): @@ -2550,7 +2591,7 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -working_set = WorkingSet() +_declare_state('object', working_set = WorkingSet()) try: # Does the main program list any requirements? from __main__ import __requires__ From 5b2e22a7985daad2d7e44efc8b73d202d287a645 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2013 17:42:11 -0700 Subject: [PATCH 1135/8469] Remove newlines to simplify merge --HG-- branch : Setuptools-Distribute merge extra : source : 78b5054a6eefc60e57c76e14d968286fa8aa19c6 --- pkg_resources.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 79db00b8c2..abb90b1a00 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -34,11 +34,6 @@ def _bypass_ensure_directory(name, mode=0777): mkdir(dirname, mode) - - - - - _state_vars = {} def _declare_state(vartype, **kw): From 4a327c5c8d2cae9d8abdc26109e4bae2f6f325e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Mar 2013 16:32:07 -0400 Subject: [PATCH 1136/8469] Adding MERGE notes --HG-- branch : Setuptools-Distribute merge extra : source : c404c8580bd1450d84cc4f0f32245ebd1130bcfc --- MERGE.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 MERGE.txt diff --git a/MERGE.txt b/MERGE.txt new file mode 100644 index 0000000000..e4cd20a0f5 --- /dev/null +++ b/MERGE.txt @@ -0,0 +1,25 @@ +With the merge of Setuptools and Distribute, the following concessions were +made: + +Differences from setuptools 0.6c12: + +Major Changes +------------- + +* Python 3 support. +* Improved support for GAE. +* Sort order of Distributions in pkg_resources now prefers PyPI to external + links (Distribute issue 163). + +Minor Changes +------------- + +* Wording of some output has changed to replace contractions with their + canonical form (i.e. prefer "could not" to "couldn't"). + +Differences from Distribute 0.6.35: + +Major Changes +------------- + +* The _distribute property of the setuptools module has been removed. From 9eebb2dfe17fa129f2201add401c8fb6eb0ebcc1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 10:39:35 -0400 Subject: [PATCH 1137/8469] Distributions are once again installed as zipped eggs by default. --HG-- branch : Setuptools-Distribute merge extra : source : f3b1c801d877734669007ad4f5d8cee091a6c767 --- MERGE.txt | 5 +++++ setuptools/command/easy_install.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MERGE.txt b/MERGE.txt index e4cd20a0f5..bcff09da48 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -23,3 +23,8 @@ Major Changes ------------- * The _distribute property of the setuptools module has been removed. +* Distributions are once again installed as zipped eggs by default, per the + rationale given in `the seminal bug report + `_ indicates that the feature + should remain and no substantial justification was given in the `Distribute + report `_. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8d44817f77..4ca0526d9d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -704,7 +704,7 @@ def should_unzip(self, dist): return True if not dist.has_metadata('zip-safe'): return True - return True + return False def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) From f86079e4b6629d75a4650be64bdcbe89724138a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 10:42:11 -0400 Subject: [PATCH 1138/8469] Backed out improper fix for distribute issue #174 --HG-- branch : Setuptools-Distribute merge extra : source : 28eb706c219004e2dd83dcd1db37d952e8c66908 --- MERGE.txt | 7 +++++++ setuptools/command/easy_install.py | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index bcff09da48..ecb140da26 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -28,3 +28,10 @@ Major Changes `_ indicates that the feature should remain and no substantial justification was given in the `Distribute report `_. + +Minor Changes +------------- + +* The patch for `#174 `_ + has been rolled-back, as the comment on the ticket indicates that the patch + addressed a symptom and not the fundamental issue. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4ca0526d9d..655478b312 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -655,8 +655,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) self.local_index.add(dist) - if not self.editable: - self.install_egg_scripts(dist) + self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) if (dist.has_metadata('dependency_links.txt') and From eafde2c8f2870bbe61084c73783b71a3329cafa0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 10:45:40 -0400 Subject: [PATCH 1139/8469] easy_install once again honors setup.cfg if found in the current directory --HG-- branch : Setuptools-Distribute merge extra : source : 422fc7e84eb2a22aa13df44dea6f138d7c840e83 --- MERGE.txt | 4 +++ setuptools/command/easy_install.py | 6 ----- setuptools/tests/test_easy_install.py | 37 +-------------------------- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index ecb140da26..550273fb29 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -35,3 +35,7 @@ Minor Changes * The patch for `#174 `_ has been rolled-back, as the comment on the ticket indicates that the patch addressed a symptom and not the fundamental issue. +* ``easy_install`` (the command) once again honors setup.cfg if found in the + current directory. The "mis-behavior" characterized in `#99 + `_ is actually intended + behavior, and no substantial rationale was given for the deviation. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 655478b312..47c1a3d899 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1925,12 +1925,6 @@ class DistributionWithoutHelpCommands(Distribution): def _show_help(self,*args,**kw): with_ei_usage(lambda: Distribution._show_help(self,*args,**kw)) - def find_config_files(self): - files = Distribution.find_config_files(self) - if 'setup.cfg' in files: - files.remove('setup.cfg') - return files - if argv is None: argv = sys.argv[1:] diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4a65a8d243..395056e723 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,7 +13,7 @@ import distutils.core from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, main +from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -84,41 +84,6 @@ def test_get_script_args(self): self.assertEqual(script, WANTED) - def test_no_setup_cfg(self): - # makes sure easy_install as a command (main) - # doesn't use a setup.cfg file that is located - # in the current working directory - dir = tempfile.mkdtemp() - setup_cfg = open(os.path.join(dir, 'setup.cfg'), 'w') - setup_cfg.write('[easy_install]\nfind_links = http://example.com') - setup_cfg.close() - setup_py = open(os.path.join(dir, 'setup.py'), 'w') - setup_py.write(SETUP_PY) - setup_py.close() - - from setuptools.dist import Distribution - - def _parse_command_line(self): - msg = 'Error: a local setup.cfg was used' - opts = self.command_options - if 'easy_install' in opts: - assert 'find_links' not in opts['easy_install'], msg - return self._old_parse_command_line() - - Distribution._old_parse_command_line = Distribution.parse_command_line - Distribution.parse_command_line = _parse_command_line - - old_wd = os.getcwd() - try: - os.chdir(dir) - reset_setup_stop_context( - lambda: self.assertRaises(SystemExit, main, []) - ) - finally: - os.chdir(old_wd) - shutil.rmtree(dir) - Distribution.parse_command_line = Distribution._old_parse_command_line - def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at # the project level From 59cf01356e2611dd921d4cece2176fc9ea7cce59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 23:55:42 -0400 Subject: [PATCH 1140/8469] Move where add_defaults is defined to align with setuptools --HG-- branch : Setuptools-Distribute merge extra : source : 6728b2be550b4ed4015d5cdc88bc49141bc40878 --- setuptools/command/sdist.py | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2fa3771aa6..b8c8495eec 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -157,7 +157,7 @@ def run(self): import distutils.command if 'check' not in distutils.command.__all__: self.check_metadata() - + self.make_distribution() dist_files = getattr(self.distribution,'dist_files',[]) @@ -166,6 +166,26 @@ def run(self): if data not in dist_files: dist_files.append(data) + def __read_template_hack(self): + # This grody hack closes the template file (MANIFEST.in) if an + # exception occurs during read_template. + # Doing so prevents an error when easy_install attempts to delete the + # file. + try: + _sdist.read_template(self) + except: + sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() + raise + # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle + # has been fixed, so only override the method if we're using an earlier + # Python. + if ( + sys.version_info < (2,7,2) + or (3,0) <= sys.version_info < (3,1,4) + or (3,2) <= sys.version_info < (3,2,1) + ): + read_template = __read_template_hack + def add_defaults(self): standards = [READMES, self.distribution.script_name] @@ -219,26 +239,6 @@ def add_defaults(self): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) - def __read_template_hack(self): - # This grody hack closes the template file (MANIFEST.in) if an - # exception occurs during read_template. - # Doing so prevents an error when easy_install attempts to delete the - # file. - try: - _sdist.read_template(self) - except: - sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() - raise - # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle - # has been fixed, so only override the method if we're using an earlier - # Python. - if ( - sys.version_info < (2,7,2) - or (3,0) <= sys.version_info < (3,1,4) - or (3,2) <= sys.version_info < (3,2,1) - ): - read_template = __read_template_hack - def check_readme(self): for f in READMES: if os.path.exists(f): From 6b9f1df35359a8a7b43975b32ee79d8f7259d8c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Mar 2013 11:01:29 -0700 Subject: [PATCH 1141/8469] Update sandbox.py to latest from setuptools-0.6 --HG-- branch : Setuptools-Distribute merge extra : source : 7f4dd650af5779b69ae13fe6a1b4adce386b5489 --- setuptools/sandbox.py | 79 ++++++++++++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 19 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 4db0dbdb37..4c5e7129db 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,14 +1,46 @@ -import os, sys, __builtin__, tempfile, operator +import os, sys, __builtin__, tempfile, operator, pkg_resources _os = sys.modules[os.name] _open = open +_file = file + from distutils.errors import DistutilsError +from pkg_resources import working_set + __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" - old_dir = os.getcwd() save_argv = sys.argv[:] save_path = sys.path[:] @@ -16,13 +48,16 @@ def run_setup(setup_script, args): temp_dir = os.path.join(setup_dir,'temp') if not os.path.isdir(temp_dir): os.makedirs(temp_dir) save_tmp = tempfile.tempdir - + save_modules = sys.modules.copy() + pr_state = pkg_resources.__getstate__() try: - tempfile.tempdir = temp_dir - os.chdir(setup_dir) + tempfile.tempdir = temp_dir; os.chdir(setup_dir) try: sys.argv[:] = [setup_script]+list(args) sys.path.insert(0, setup_dir) + # reset to include setup dir, w/clean callback list + working_set.__init__() + working_set.callbacks.append(lambda dist:dist.activate()) DirectorySandbox(setup_dir).run( lambda: execfile( "setup.py", @@ -34,11 +69,17 @@ def run_setup(setup_script, args): raise # Normal exit, just return finally: + pkg_resources.__setstate__(pr_state) + sys.modules.update(save_modules) + for key in list(sys.modules): + if key not in save_modules: del sys.modules[key] os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv tempfile.tempdir = save_tmp + + class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" @@ -58,15 +99,16 @@ def run(self, func): """Run 'func' under os sandboxing""" try: self._copy(self) - __builtin__.open = __builtin__.file = self._open + __builtin__.file = self._file + __builtin__.open = self._open self._active = True return func() finally: self._active = False - __builtin__.open = __builtin__.file = _open + __builtin__.open = _open + __builtin__.file = _file self._copy(_os) - def _mk_dual_path_wrapper(name): original = getattr(_os,name) def wrap(self,src,dst,*args,**kw): @@ -75,7 +117,6 @@ def wrap(self,src,dst,*args,**kw): return original(src,dst,*args,**kw) return wrap - for name in ["rename", "link", "symlink"]: if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name) @@ -88,7 +129,8 @@ def wrap(self,path,*args,**kw): return original(path,*args,**kw) return wrap - _open = _mk_single_path_wrapper('file', _open) + _open = _mk_single_path_wrapper('open', _open) + _file = _mk_single_path_wrapper('file', _file) for name in [ "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir", "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat", @@ -96,7 +138,6 @@ def wrap(self,path,*args,**kw): ]: if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name) - def _mk_single_with_return(name): original = getattr(_os,name) def wrap(self,path,*args,**kw): @@ -162,10 +203,10 @@ def _open(self, path, mode='r', *args, **kw): self._violation("open", path, mode, *args, **kw) return _open(path,mode,*args,**kw) - def tmpnam(self): - self._violation("tmpnam") + def tmpnam(self): self._violation("tmpnam") def _ok(self,path): + if hasattr(_os,'devnull') and path==_os.devnull: return True active = self._active try: self._active = False @@ -187,22 +228,22 @@ def _remap_pair(self,operation,src,dst,*args,**kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) + def _file(self, path, mode='r', *args, **kw): + if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): + self._violation("file", path, mode, *args, **kw) + return _file(path,mode,*args,**kw) + def open(self, file, flags, mode=0777): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode) return _os.open(file,flags,mode) - WRITE_FLAGS = reduce( - operator.or_, - [getattr(_os, a, 0) for a in + operator.or_, [getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) - - - class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" From 742bd477e51562a8548d3a18bd3695c76a618fc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Mar 2013 13:56:46 -0700 Subject: [PATCH 1142/8469] Copy changes to package_index from 1aae1efe5733 --HG-- branch : Setuptools-Distribute merge extra : source : db6acae7b8cfb92007fe8e7ae4f392481b080a00 --- setuptools/package_index.py | 113 ++++++++++++++++++++++++------------ 1 file changed, 77 insertions(+), 36 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index da3fed1248..9a9c5d62e7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO +import httplib, urllib from pkg_resources import * from distutils import log from distutils.errors import DistutilsError @@ -8,7 +9,6 @@ except ImportError: from md5 import md5 from fnmatch import translate - 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 @@ -42,6 +42,8 @@ def parse_bdist_wininst(name): def egg_info_for_url(url): scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) base = urllib2.unquote(path.split('/')[-1]) + if server=='sourceforge.net' and base=='download': # XXX Yuck + base = urllib2.unquote(path.split('/')[-2]) if '#' in base: base, fragment = base.split('#',1) return base,fragment @@ -64,14 +66,12 @@ def distros_for_location(location, basename, metadata=None): if basename.endswith('.egg') and '-' in basename: # only one, unambiguous interpretation return [Distribution.from_location(location, basename, metadata)] - if basename.endswith('.exe'): win_base, py_ver = parse_bdist_wininst(basename) if win_base is not None: return interpret_distro_name( location, win_base, metadata, py_ver, BINARY_DIST, "win32" ) - # Try source distro extensions (.zip, .tgz, etc.) # for ext in EXTENSIONS: @@ -186,10 +186,10 @@ def process_url(self, url, retrieve=False): return self.info("Reading %s", url) + self.fetched_urls[url] = True # prevent multiple fetch attempts f = self.open_url(url, "Download error: %s -- Some packages may not be found!") if f is None: return - self.fetched_urls[url] = self.fetched_urls[f.url] = True - + self.fetched_urls[f.url] = True if 'html' not in f.headers.get('content-type', '').lower(): f.close() # not html, we can't process it return @@ -329,7 +329,7 @@ def obtain(self, requirement, installer=None): def check_md5(self, cs, info, filename, tfp): if re.match('md5=[0-9a-f]{32}$', info): self.debug("Validating md5 checksum for %s", filename) - if cs.hexdigest()<>info[4:]: + if cs.hexdigest()!=info[4:]: tfp.close() os.unlink(filename) raise DistutilsError( @@ -409,7 +409,8 @@ def download(self, spec, tmpdir): def fetch_distribution(self, - requirement, tmpdir, force_scan=False, source=False, develop_ok=False + requirement, tmpdir, force_scan=False, source=False, develop_ok=False, + local_index=None, ): """Obtain a distribution suitable for fulfilling `requirement` @@ -427,15 +428,15 @@ def fetch_distribution(self, set, development and system eggs (i.e., those using the ``.egg-info`` format) will be ignored. """ - # process a Requirement self.info("Searching for %s", requirement) skipped = {} + dist = None - def find(req): + def find(env, req): # Find a matching distribution; may be called more than once - for dist in self[req.key]: + for dist in env[req.key]: if dist.precedence==DEVELOP_DIST and not develop_ok: if dist not in skipped: @@ -444,23 +445,25 @@ def find(req): continue if dist in req and (dist.precedence<=SOURCE_DIST or not source): - self.info("Best match: %s", dist) - return dist.clone( - location=self.download(dist.location, tmpdir) - ) + return dist + + if force_scan: self.prescan() self.find_packages(requirement) + dist = find(self, requirement) + + if local_index is not None: + dist = dist or find(local_index, requirement) - dist = find(requirement) if dist is None and self.to_scan is not None: self.prescan() - dist = find(requirement) + dist = find(self, requirement) if dist is None and not force_scan: self.find_packages(requirement) - dist = find(requirement) + dist = find(self, requirement) if dist is None: self.warn( @@ -468,7 +471,10 @@ def find(req): (source and "a source distribution of " or ""), requirement, ) - return dist + else: + self.info("Best match: %s", dist) + return dist.clone(location=self.download(dist.location, tmpdir)) + def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` @@ -484,12 +490,6 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): return None - - - - - - def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) dists = match and [d for d in @@ -550,7 +550,7 @@ def _download_to(self, url, filename): bs = self.dl_blocksize size = -1 if "content-length" in headers: - size = int(headers["Content-Length"]) + size = max(map(int,headers.getheaders("Content-Length"))) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: @@ -573,24 +573,25 @@ def reporthook(self, url, filename, blocknum, blksize, size): def open_url(self, url, warning=None): - if url.startswith('file:'): - return local_open(url) + if url.startswith('file:'): return local_open(url) try: return open_with_auth(url) except urllib2.HTTPError, v: return v except urllib2.URLError, v: - if warning: self.warn(warning, v.reason) - else: - raise DistutilsError("Download error for %s: %s" - % (url, v.reason)) + reason = v.reason + except httplib.HTTPException, v: + reason = "%s: %s" % (v.__doc__ or v.__class__.__name__, v) + if warning: + self.warn(warning, reason) + else: + raise DistutilsError("Download error for %s: %s" % (url, reason)) def _download_url(self, scheme, url, tmpdir): # Determine download filename # - name = filter(None,urlparse.urlparse(url)[2].split('/')) + name, fragment = egg_info_for_url(url) if name: - name = name[-1] while '..' in name: name = name.replace('..','.').replace('\\','_') else: @@ -612,7 +613,6 @@ def _download_url(self, scheme, url, tmpdir): return self._attempt_download(url, filename) - def scan_url(self, url): self.process_url(url, True) @@ -639,10 +639,39 @@ def _download_html(self, url, headers, filename): os.unlink(filename) raise DistutilsError("Unexpected HTML page found at "+url) + + + + + + + + + + + + + + + def _download_svn(self, url, filename): url = url.split('#',1)[0] # remove any fragment for svn's sake + creds = '' + if url.lower().startswith('svn:') and '@' in url: + scheme, netloc, path, p, q, f = urlparse.urlparse(url) + if not netloc and path.startswith('//') and '/' in path[2:]: + netloc, path = path[2:].split('/',1) + auth, host = urllib.splituser(netloc) + if auth: + if ':' in auth: + user, pw = auth.split(':',1) + creds = " --username=%s --password=%s" % (user, pw) + else: + creds = " --username="+auth + netloc = host + url = urlparse.urlunparse((scheme, netloc, url, p, q, f)) self.info("Doing subversion checkout from %s to %s", url, filename) - os.system("svn checkout -q %s %s" % (url, filename)) + os.system("svn checkout%s -q %s %s" % (creds, url, filename)) return filename def debug(self, msg, *args): @@ -654,6 +683,18 @@ def info(self, msg, *args): def warn(self, msg, *args): log.warn(msg, *args) + + + + + + + + + + + + # This pattern matches a character entity reference (a decimal numeric # references, a hexadecimal numeric reference, or a named reference). entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub @@ -701,7 +742,7 @@ def open_with_auth(url): scheme, netloc, path, params, query, frag = urlparse.urlparse(url) if scheme in ('http', 'https'): - auth, host = urllib2.splituser(netloc) + auth, host = urllib.splituser(netloc) else: auth = None From a65b6ea00662c72fff9a887b1313c439e32a9219 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 11 Apr 2013 18:04:06 -0700 Subject: [PATCH 1143/8469] Skip test when file system encoding is not suitable. Fixes #55 and Distribute #363. --- CHANGES.txt | 2 ++ setuptools/tests/test_sdist.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f97dca3c18..b97c10046a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ CHANGES launcher for 'develop' installs). * ``ez_setup.py`` now ensures partial downloads are cleaned up following a failed download. +* Distribute #363 and Issue #55: Skip an sdist test that fails on locales + other than UTF-8. ----- 1.1.6 diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 438f7cedbd..19f6d4cd0f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """sdist tests""" - +import locale import os import shutil import sys @@ -10,6 +10,7 @@ import unicodedata from setuptools.compat import StringIO, unicode +from setuptools.tests.py26compat import skipIf from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -318,6 +319,8 @@ def test_read_manifest_skips_non_utf8_filenames(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) + @skipIf(sys.version_info >= (3,) and locale.getpreferredencoding() != 'UTF-8', + 'Unittest fails if locale is not utf-8 but the manifests is recorded correctly') def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From 46d1c4ed7df5722771e382a55fb79d9f1d16e389 Mon Sep 17 00:00:00 2001 From: pje Date: Thu, 25 Apr 2013 20:32:21 -0400 Subject: [PATCH 1144/8469] Fix spurious test breakage on 2.7 (grafted from aeb004b22c9472066322f4b0319588cddf63f699) --HG-- branch : setuptools-0.6 extra : source : aeb004b22c9472066322f4b0319588cddf63f699 --- setuptools/tests/test_resources.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 03e5d0f83b..fdd405af88 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -507,7 +507,7 @@ def test_get_script_header(self): def test_get_script_header_jython_workaround(self): platform = sys.platform sys.platform = 'java1.5.0_13' - stdout = sys.stdout + stdout, stderr = sys.stdout, sys.stderr try: # A mock sys.executable that uses a shebang line (this file) exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') @@ -517,17 +517,17 @@ def test_get_script_header_jython_workaround(self): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue()) finally: sys.platform = platform - sys.stdout = stdout + sys.stdout, sys.stderr = stdout, stderr From 737fe613840baf2e10246ffb83f86690a0b1561b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 07:43:28 -0400 Subject: [PATCH 1145/8469] Copy changes to dist.py from 1aae1efe5733 --HG-- branch : Setuptools-Distribute merge extra : source : a79dd619dc8637e5c9b7de32bd8c5389c995dcb9 --- setuptools/dist.py | 53 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 30ff35e320..c1218ef218 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -8,7 +8,7 @@ from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd -import os, distutils.log +import os, distutils.log, re def _get_unpatched(cls): """Protect against re-patching the distutils if reloaded @@ -61,8 +61,8 @@ def check_nsp(dist, attr, value): parent = '.'.join(nsp.split('.')[:-1]) if parent not in value: distutils.log.warn( - "%r is declared as a package namespace, but %r is not:" - " please correct this in setup.py", nsp, parent + "WARNING: %r is declared as a package namespace, but %r" + " is not: please correct this in setup.py", nsp, parent ) def check_extras(dist, attr, value): @@ -120,6 +120,47 @@ def check_package_data(dist, attr, value): attr+" must be a dictionary mapping package names to lists of " "wildcard patterns" ) + +def check_packages(dist, attr, value): + for pkgname in value: + if not re.match(r'\w+(\.\w+)*', pkgname): + distutils.log.warn( + "WARNING: %r not a valid package name; please use only" + ".-separated package names in setup.py", pkgname + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -415,19 +456,19 @@ def exclude_package(self,package): if self.packages: self.packages = [ p for p in self.packages - if p<>package and not p.startswith(pfx) + if p!=package and not p.startswith(pfx) ] if self.py_modules: self.py_modules = [ p for p in self.py_modules - if p<>package and not p.startswith(pfx) + if p!=package and not p.startswith(pfx) ] if self.ext_modules: self.ext_modules = [ p for p in self.ext_modules - if p.name<>package and not p.name.startswith(pfx) + if p.name!=package and not p.name.startswith(pfx) ] From b03a9e293b94b338027c4983c2ac3764692dd297 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 07:59:45 -0400 Subject: [PATCH 1146/8469] Copy changes to setuptools/archive_util.py setuptools/depends.py setuptools/extension.py and setuptools/__init__.py from 1aae1efe5733 --HG-- branch : Setuptools-Distribute merge extra : source : a3f8891a67625e751eacbf027d66feff19779da4 --- setuptools/__init__.py | 2 +- setuptools/archive_util.py | 36 ++++++++++++++++++------------------ setuptools/depends.py | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 56cbf7673b..71eeff4974 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path import os.path -__version__ = '0.6c9' +__version__ = '0.6c12' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 511f05ad5d..d44264f821 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -6,7 +6,7 @@ "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] -import zipfile, tarfile, os, shutil +import zipfile, tarfile, os, shutil, posixpath from pkg_resources import ensure_directory from distutils.errors import DistutilsError @@ -138,7 +138,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): name = info.filename # don't extract absolute paths or ones with .. in them - if name.startswith('/') or '..' in name: + if name.startswith('/') or '..' in name.split('/'): continue target = os.path.join(extract_dir, *name.split('/')) @@ -169,37 +169,37 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): by ``tarfile.open()``). See ``unpack_archive()`` for an explanation of the `progress_filter` argument. """ - try: tarobj = tarfile.open(filename) except tarfile.TarError: raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) ) - try: tarobj.chown = lambda *args: None # don't do any chowning! for member in tarobj: - if member.isfile() or member.isdir(): - name = member.name - # don't extract absolute paths or ones with .. in them - if not name.startswith('/') and '..' not in name: - dst = os.path.join(extract_dir, *name.split('/')) + name = member.name + # don't extract absolute paths or ones with .. in them + if not name.startswith('/') and '..' not in name.split('/'): + dst = os.path.join(extract_dir, *name.split('/')) + while member is not None and (member.islnk() or member.issym()): + linkpath = member.linkname + if member.issym(): + linkpath = posixpath.join(posixpath.dirname(member.name), linkpath) + linkpath = posixpath.normpath(linkpath) + member = tarobj._getmember(linkpath) + + if member is not None and (member.isfile() or member.isdir()): dst = progress_filter(name, dst) if dst: if dst.endswith(os.sep): dst = dst[:-1] - tarobj._extract_member(member,dst) # XXX Ugh + try: + tarobj._extract_member(member,dst) # XXX Ugh + except tarfile.ExtractError: + pass # chown/chmod/mkfifo/mknode/makedev failed return True finally: tarobj.close() - - - extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile - - - - - diff --git a/setuptools/depends.py b/setuptools/depends.py index 4b7b343760..5fdf2d7e57 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -36,7 +36,7 @@ def full_name(self): def version_ok(self,version): """Is 'version' sufficiently up-to-date?""" return self.attribute is None or self.format is None or \ - str(version)<>"unknown" and version >= self.requested_version + str(version)!="unknown" and version >= self.requested_version def get_version(self, paths=None, default="unknown"): From b33cf3e333837cf2fa04af79bcd46094a047741b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 08:38:09 -0400 Subject: [PATCH 1147/8469] Copy changes to easy_install.py from 1aae1efe5733 --HG-- branch : Setuptools-Distribute merge extra : source : 835ac45ae9db9a12fa13648ac556ac43c85f750b --- setuptools/command/easy_install.py | 63 ++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f06b6ddd7b..90f29320af 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -204,7 +204,7 @@ def finalize_options(self): self.outputs = [] def run(self): - if self.verbose<>self.distribution.verbose: + if self.verbose!=self.distribution.verbose: log.set_verbosity(self.verbose) try: for spec in self.args: @@ -252,7 +252,7 @@ def check_site_dir(self): # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs - if not is_site_dir: + if not is_site_dir and not self.multi_version: # No? Then directly test whether it does .pth file processing is_site_dir = self.check_pth_processing() else: @@ -430,9 +430,9 @@ def easy_install(self, spec, deps=False): self.check_editable(spec) dist = self.package_index.fetch_distribution( - spec, tmpdir, self.upgrade, self.editable, not self.always_copy + spec, tmpdir, self.upgrade, self.editable, not self.always_copy, + self.local_index ) - if dist is None: msg = "Could not find suitable distribution for %r" % spec if self.always_copy: @@ -722,7 +722,7 @@ def install_exe(self, dist_filename, tmpdir): f = open(pkg_inf,'w') f.write('Metadata-Version: 1.0\n') for k,v in cfg.items('metadata'): - if k<>'target_version': + if k!='target_version': f.write('%s: %s\n' % (k.replace('_','-').title(), v)) f.close() script_dir = os.path.join(egg_info,'scripts') @@ -988,7 +988,6 @@ def unpack_and_compile(self, egg_path, destination): def pf(src,dst): if dst.endswith('.py') and not src.startswith('EGG-INFO/'): to_compile.append(dst) - to_chmod.append(dst) elif dst.endswith('.dll') or dst.endswith('.so'): to_chmod.append(dst) self.unpack_progress(src,dst) @@ -1023,6 +1022,7 @@ def byte_compile(self, to_compile): + def no_default_version_msg(self): return """bad install directory or PYTHONPATH @@ -1274,7 +1274,7 @@ def get_exe_prefixes(exe_filename): prefixes = [ ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), - ('PLATLIB/', ''), + ('PLATLIB/', ''), ('DATA/lib/site-packages/', ''), ('SCRIPTS/', 'EGG-INFO/scripts/') ] z = zipfile.ZipFile(exe_filename) @@ -1286,7 +1286,7 @@ def get_exe_prefixes(exe_filename): if parts[1].endswith('.egg-info'): prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/')) break - if len(parts)<>2 or not name.endswith('.pth'): + if len(parts)!=2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue @@ -1583,19 +1583,60 @@ def get_script_args(dist, executable=sys_executable, wininst=False): old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1]) or sys.platform!='win32': + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': hdr = new_header else: hdr = header yield (name+ext, hdr+script_text, 't', [name+x for x in old]) yield ( name+'.exe', resource_string('setuptools', launcher), - 'b' # write in binary mode - ) + 'b') # write in binary mode + yield (name+'.exe.manifest', _launcher_manifest % (name,), 't') else: # On other platforms, we assume the right thing to do is to # just write the stub with no extension. yield (name, header+script_text) + +_launcher_manifest = """ + + + + + + + + + + + + +""" + + + + + + + + + + + + + + + + + + + + + + + def rmtree(path, ignore_errors=False, onerror=auto_chmod): """Recursively delete a directory tree. From ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 May 2013 23:09:46 -0400 Subject: [PATCH 1148/8469] Copy changes from 1aae1efe5733 for setuptools/command/* (except easy_install.py --HG-- branch : Setuptools-Distribute merge extra : source : 0c89fbb19c269ce1cb3bc3e9ece9864127768169 --- setuptools/command/alias.py | 4 +- setuptools/command/bdist_egg.py | 6 +-- setuptools/command/bdist_wininst.py | 67 ++++++++++++++++++----- setuptools/command/build_ext.py | 18 +++---- setuptools/command/egg_info.py | 22 ++++---- setuptools/command/sdist.py | 83 +++++++++++++++++++++-------- 6 files changed, 141 insertions(+), 59 deletions(-) diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index f5368b29e9..40c00b550b 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -9,7 +9,7 @@ def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) - if arg.split()<>[arg]: + if arg.split()!=[arg]: return repr(arg) return arg @@ -33,7 +33,7 @@ def initialize_options(self): def finalize_options(self): option_base.finalize_options(self) - if self.remove and len(self.args)<>1: + if self.remove and len(self.args)!=1: raise DistutilsOptionError( "Must specify exactly one argument (the alias name) when " "using --remove" diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9e852a3f15..7e5a37995c 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -165,12 +165,13 @@ def call_command(self,cmdname,**kw): def run(self): # Generate metadata first self.run_command("egg_info") - # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. log.info("installing library code to %s" % self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root; instcmd.root = None + if self.distribution.has_c_libraries() and not self.skip_build: + self.run_command('build_clib') cmd = self.call_command('install_lib', warn_dir=0) instcmd.root = old_root @@ -190,7 +191,6 @@ def run(self): to_compile.extend(self.make_init_files()) if to_compile: cmd.byte_compile(to_compile) - if self.distribution.data_files: self.do_install_data() @@ -398,7 +398,7 @@ def write_safety_flag(egg_dir, safe): for flag,fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): - if safe is None or bool(safe)<>flag: + if safe is None or bool(safe)!=flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: f=open(fn,'wb'); f.write('\n'); f.close() diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 93e6846d79..e8521f834c 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,26 +2,24 @@ import os, sys class bdist_wininst(_bdist_wininst): + _good_upload = _bad_upload = None def create_exe(self, arcname, fullname, bitmap=None): _bdist_wininst.create_exe(self, arcname, fullname, bitmap) - dist_files = getattr(self.distribution, 'dist_files', []) - + installer_name = self.get_installer_filename(fullname) if self.target_version: - installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) pyversion = self.target_version - - # fix 2.5 bdist_wininst ignoring --target-version spec - bad = ('bdist_wininst','any',installer_name) - if bad in dist_files: - dist_files.remove(bad) + # fix 2.5+ bdist_wininst ignoring --target-version spec + self._bad_upload = ('bdist_wininst', 'any', installer_name) else: - installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) pyversion = 'any' - good = ('bdist_wininst', pyversion, installer_name) + self._good_upload = ('bdist_wininst', pyversion, installer_name) + + def _fix_upload_names(self): + good, bad = self._good_upload, self._bad_upload + dist_files = getattr(self.distribution, 'dist_files', []) + if bad in dist_files: + dist_files.remove(bad) if good not in dist_files: dist_files.append(good) @@ -36,6 +34,49 @@ def run(self): self._is_running = True try: _bdist_wininst.run(self) + self._fix_upload_names() finally: self._is_running = False + + + if not hasattr(_bdist_wininst, 'get_installer_filename'): + def get_installer_filename(self, fullname): + # Factored out to allow overriding in subclasses + if self.target_version: + # if we create an installer for a specific python version, + # it's better to include this in the name + installer_name = os.path.join(self.dist_dir, + "%s.win32-py%s.exe" % + (fullname, self.target_version)) + else: + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) + return installer_name + # get_installer_filename() + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index c0aaa8e80c..f6f3355dcb 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -82,15 +82,15 @@ def swig_sources(self, sources, *otherargs): def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) - ext = self.ext_map[fullname] - if isinstance(ext,Library): - fn, ext = os.path.splitext(filename) - return self.shlib_compiler.library_filename(fn,libtype) - elif use_stubs and ext._links_to_dynamic: - d,fn = os.path.split(filename) - return os.path.join(d,'dl-'+fn) - else: - return filename + if fullname in self.ext_map: + ext = self.ext_map[fullname] + if isinstance(ext,Library): + fn, ext = os.path.splitext(filename) + return self.shlib_compiler.library_filename(fn,libtype) + elif use_stubs and ext._links_to_dynamic: + d,fn = os.path.split(filename) + return os.path.join(d,'dl-'+fn) + return filename def initialize_options(self): _build_ext.initialize_options(self) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9741e26a34..5a8b2db8d7 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -217,18 +217,21 @@ def get_svn_revision(self): data = f.read() f.close() - if data.startswith('9') or data.startswith('8'): + if data.startswith('9 and d[9]]+[0]) - elif data.startswith('=6 and record[5]=="delete": continue # skip deleted yield joinpath(dirname, record[0]) - elif data.startswith(' Date: Sat, 4 May 2013 09:37:53 -0400 Subject: [PATCH 1149/8469] Updated merge notes --HG-- branch : Setuptools-Distribute merge extra : source : 9d926f62c15cff2f25a9c8b8e9a2984246a5ba5c --- MERGE.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/MERGE.txt b/MERGE.txt index df2689f373..9cc94d3e00 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -1,3 +1,61 @@ +Process +======= + +In order to try to accurately reflect the fork and then re-merge of the +projects, the merge process brought both code trees together into one +repository and grafted the Distribute fork onto the Setuptools development +line (as if it had been created as a branch in the first place). + +The rebase to get distribute onto setuptools went something like this:: + + hg phase -d -f -r 26b4c29b62db + hg rebase -s 26b4c29b62db -d 7a5cf59c78d7 + +The technique required a late version of mercurial (2.5) to work correctly. + +The only code that was included was the code that was ancestral to the public +releases of Distribute 0.6. Additionally, because Setuptools was not hosted +on Mercurial at the time of the fork and because the Distribute fork did not +include a complete conversion of the Setuptools history, the Distribute +changesets had to be re-applied to a new, different conversion of the +Setuptools SVN repository. As a result, all of the hashes have changed. + +Distribute was grafted in a 'distribute' branch and the 'setuptools-0.6' +branch was targeted for the merge. The 'setuptools' branch remains with +unreleased code and may be incorporated in the future. + +Reconciling Differences +======================= + +There were both technical and philosophical differences between Setuptools +and Distribute. To reconcile these differences in a manageable way, the +following technique was undertaken: + +In the 'distribute' branch, first remove code that is no longer relevant to +setuptools (such as the setuptools patching code). + +Next, in the 'distribute' branch, at the point where the fork occurred (such +that the code is still essentially pristine setuptools), copy changes for a +single file or small group of files from a late revision of that file in the +'setuptools-0.6' branch (1aae1efe5733 was used) and commit those changes. This +step creates a new head. That head is then merged. It is in this Mercurial +merge operation that the fundamental differences between Distribute and +Setuptools are reconciled, but since only a single file or small set of files +are used, the scope is limited. + +Finally, once all files have been reconciled and merged, the tip of the +'distribute' branch represents the merged code. It is then merged with the +'setuptools-0.6' branch, deferring to the 'distribute' branch:: + + hg update null + hg merge 1aae1efe5733 + hg ci -m "New beginning in a default branch" + hg merge distribute --tool internal:other + hg ci -m "Merge with Distribute" + +Concessions +=========== + With the merge of Setuptools and Distribute, the following concessions were made: @@ -22,7 +80,7 @@ Minor Changes Distribute-based script launchers are used and they launch Python as a subprocess, rather than loading the Python DLL in-process. -Differences from Distribute 0.6.35: +Differences from Distribute 0.6.36: Major Changes ------------- From e7d341af8987659ae1fa79701515c16238fe22f6 Mon Sep 17 00:00:00 2001 From: pje Date: Sat, 4 May 2013 16:21:50 -0400 Subject: [PATCH 1150/8469] Backport experimental environment marker support from the trunk --HG-- branch : setuptools-0.6 --- pkg_resources.py | 152 ++++++++++++++++++++++++--- setuptools.egg-info/entry_points.txt | 3 +- setuptools/dist.py | 8 +- 3 files changed, 143 insertions(+), 20 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 79db00b8c2..3192f2005d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -144,7 +144,7 @@ def get_supported_platform(): # Parsing functions and string utilities 'parse_requirements', 'parse_version', 'safe_name', 'safe_version', 'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections', - 'safe_extra', 'to_filename', + 'safe_extra', 'to_filename', 'invalid_marker', 'evaluate_marker', # filesystem utilities 'ensure_directory', 'normalize_path', @@ -1146,6 +1146,129 @@ def to_filename(name): +_marker_names = { + 'os': ['name'], 'sys': ['platform'], + 'platform': ['version','machine','python_implementation'], + 'python_version': [], 'python_full_version': [], 'extra':[], +} + +_marker_values = { + 'os_name': lambda: os.name, + 'sys_platform': lambda: sys.platform, + 'python_full_version': lambda: sys.version.split()[0], + 'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]), + 'platform_version': lambda: _platinfo('version'), + 'platform_machine': lambda: _platinfo('machine'), + 'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(), +} + +def _platinfo(attr): + try: + import platform + except ImportError: + return '' + return getattr(platform, attr, lambda:'')() + +def _pyimp(): + if sys.platform=='cli': + return 'IronPython' + elif sys.platform.startswith('java'): + return 'Jython' + elif '__pypy__' in sys.builtin_module_names: + return 'PyPy' + else: + return 'CPython' + +def invalid_marker(text): + """Validate text as a PEP 426 environment marker; return exception or False""" + try: + evaluate_marker(text) + except SyntaxError: + return sys.exc_info()[1] + return False + +def evaluate_marker(text, extra=None, _ops={}): + """Evaluate a PEP 426 environment marker; SyntaxError if marker is invalid""" + + if not _ops: + + from token import NAME, STRING + import token, symbol, operator + + def and_test(nodelist): + # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! + return reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + + def test(nodelist): + # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! + return reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + + def atom(nodelist): + t = nodelist[1][0] + if t == token.LPAR: + if nodelist[2][0] == token.RPAR: + raise SyntaxError("Empty parentheses") + return interpret(nodelist[2]) + raise SyntaxError("Language feature not supported in environment markers") + + def comparison(nodelist): + if len(nodelist)>4: + raise SyntaxError("Chained comparison not allowed in environment markers") + comp = nodelist[2][1] + cop = comp[1] + if comp[0] == NAME: + if len(nodelist[2]) == 3: + if cop == 'not': + cop = 'not in' + else: + cop = 'is not' + try: + cop = _ops[cop] + except KeyError: + raise SyntaxError(repr(cop)+" operator not allowed in environment markers") + return cop(evaluate(nodelist[1]), evaluate(nodelist[3])) + + _ops.update({ + symbol.test: test, symbol.and_test: and_test, symbol.atom: atom, + symbol.comparison: comparison, 'not in': lambda x,y: x not in y, + 'in': lambda x,y: x in y, '==': operator.eq, '!=': operator.ne, + }) + if hasattr(symbol,'or_test'): + _ops[symbol.or_test] = test + + def interpret(nodelist): + while len(nodelist)==2: nodelist = nodelist[1] + try: + op = _ops[nodelist[0]] + except KeyError: + raise SyntaxError("Comparison or logical expression expected") + raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]]) + return op(nodelist) + + def evaluate(nodelist): + while len(nodelist)==2: nodelist = nodelist[1] + kind = nodelist[0] + name = nodelist[1] + #while len(name)==2: name = name[1] + if kind==NAME: + try: + op = _marker_values[name] + except KeyError: + raise SyntaxError("Unknown name %r" % name) + return op() + if kind==STRING: + s = nodelist[1] + if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \ + or '\\' in s: + raise SyntaxError( + "Only plain strings allowed in environment markers") + return s[1:-1] + raise SyntaxError("Language feature not supported in environment markers") + + import parser + return interpret(parser.expr(text).totuple(1)[1]) + + class NullProvider: """Try to implement resources and metadata for arbitrary PEP 302 loaders""" @@ -1925,7 +2048,6 @@ def parse_version(s): parts.pop() parts.append(part) return tuple(parts) - class EntryPoint(object): """Object representing an advertised importable object""" @@ -2139,7 +2261,14 @@ def _dep_map(self): dm = self.__dep_map = {None: []} for name in 'requires.txt', 'depends.txt': for extra,reqs in split_sections(self._get_metadata(name)): - if extra: extra = safe_extra(extra) + if extra: + if ':' in extra: + extra, marker = extra.split(':',1) + if invalid_marker(marker): + reqs=[] # XXX warn + elif not evaluate_marker(marker): + reqs=[] + extra = safe_extra(extra) or None dm.setdefault(extra,[]).extend(parse_requirements(reqs)) return dm _dep_map = property(_dep_map) @@ -2163,6 +2292,8 @@ def _get_metadata(self,name): for line in self.get_metadata_lines(name): yield line + + def activate(self,path=None): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: path = sys.path @@ -2201,6 +2332,9 @@ def __getattr__(self,attr): raise AttributeError,attr return getattr(self._provider, attr) + + + #@classmethod def from_filename(cls,filename,metadata=None, **kw): return cls.from_location( @@ -2242,18 +2376,6 @@ def get_entry_info(self, group, name): - - - - - - - - - - - - def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2642c316ea..04fbe4bee9 100755 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -7,6 +7,7 @@ build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register +upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -31,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.3 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/dist.py b/setuptools/dist.py index c1218ef218..582cc557d9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -47,7 +47,6 @@ def assert_string_list(dist, attr, value): raise DistutilsSetupError( "%r must be a list of strings (got %r)" % (attr,value) ) - def check_nsp(dist, attr, value): """Verify that namespace packages are valid""" assert_string_list(dist,attr,value) @@ -69,6 +68,10 @@ def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: for k,v in value.items(): + if ':' in k: + k,m = k.split(':',1) + if pkg_resources.invalid_marker(m): + raise DistutilsSetupError("Invalid environment marker: "+m) list(pkg_resources.parse_requirements(v)) except (TypeError,ValueError,AttributeError): raise DistutilsSetupError( @@ -77,9 +80,6 @@ def check_extras(dist, attr, value): "requirement specifiers." ) - - - def assert_bool(dist, attr, value): """Verify that value is True, False, 0, or 1""" if bool(value) != value: From d53be3dea895338e9f19947b59e2c06488c57fbb Mon Sep 17 00:00:00 2001 From: pje Date: Sat, 4 May 2013 15:34:27 -0400 Subject: [PATCH 1151/8469] Enable safe SSL dependency installs via "easy_install setuptools[ssl]" (grafted from 695a82c1934090e7c56ba74e7b5a2bdc13071698) --HG-- branch : setuptools-0.6 extra : source : 695a82c1934090e7c56ba74e7b5a2bdc13071698 --- setup.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py index d496268742..b868d50869 100755 --- a/setup.py +++ b/setup.py @@ -91,31 +91,31 @@ Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration Topic :: Utilities""".splitlines() if f.strip()], - scripts = scripts, + extras_require = { + "ssl:sys_platform=='win32'": "wincertstore==0.1", + "ssl:sys_platform=='win32' and python_version in '2.3, 2.4'": "ctypes==1.0.2", + "ssl:python_version in '2.3, 2.4, 2.5'":"ssl==1.16", + }, + dependency_links = [ + 'http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', + 'http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', + 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3', + 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.4.exe/download#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', + 'http://peak.telecommunity.com/dist/ssl-1.16-py2.3-win32.egg#md5=658f74b3eb6f32050e8531bb73de8e74', + 'http://peak.telecommunity.com/dist/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', + 'http://peak.telecommunity.com/dist/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', + ], + scripts = [], # uncomment for testing # setup_requires = ['setuptools>=0.6a0'], + # tests_require = "setuptools[ssl]", ) - - - - - - - - - - - - - - - From c2488982d312b8eb577fbf7e364d0860102cf14d Mon Sep 17 00:00:00 2001 From: pje Date: Sat, 4 May 2013 16:02:34 -0400 Subject: [PATCH 1152/8469] Make sure ssl is installable even from source checkout (grafted from 0ecea0fc56e1c862ef57dac038e00cbff4e171bc) --HG-- branch : setuptools-0.6 extra : source : 0ecea0fc56e1c862ef57dac038e00cbff4e171bc --- setuptools.egg-info/dependency_links.txt | 7 +++++++ setuptools.egg-info/requires.txt | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 setuptools.egg-info/dependency_links.txt create mode 100644 setuptools.egg-info/requires.txt diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt new file mode 100644 index 0000000000..a659a050c6 --- /dev/null +++ b/setuptools.egg-info/dependency_links.txt @@ -0,0 +1,7 @@ +http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb +http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c +http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3 +http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.4.exe/download#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc +http://peak.telecommunity.com/dist/ssl-1.16-py2.3-win32.egg#md5=658f74b3eb6f32050e8531bb73de8e74 +http://peak.telecommunity.com/dist/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 +http://peak.telecommunity.com/dist/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt new file mode 100644 index 0000000000..517f15d8a2 --- /dev/null +++ b/setuptools.egg-info/requires.txt @@ -0,0 +1,10 @@ + + +[ssl:sys_platform=='win32'] +wincertstore==0.1 + +[ssl:sys_platform=='win32' and python_version in '2.3, 2.4'] +ctypes==1.0.2 + +[ssl:python_version in '2.3, 2.4, 2.5'] +ssl==1.16 \ No newline at end of file From 27d44ebd4ca443c9df123f308b46cc1cbd7d2404 Mon Sep 17 00:00:00 2001 From: pje Date: Sat, 4 May 2013 16:07:01 -0400 Subject: [PATCH 1153/8469] Low-level SSL verification w/out warnings or options; automatically uses it if it can, won't if it doesn't. (grafted from 8dc579408781836ecf30b637665ad7f2509933a5) --HG-- branch : setuptools-0.6 extra : source : 8dc579408781836ecf30b637665ad7f2509933a5 --- setuptools/package_index.py | 28 ++-- setuptools/ssl_support.py | 246 ++++++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+), 14 deletions(-) create mode 100644 setuptools/ssl_support.py diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1668e76547..aab2bb231f 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,6 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO -import httplib, urllib +import httplib, urllib; from setuptools import ssl_support from pkg_resources import * from distutils import log from distutils.errors import DistutilsError @@ -145,12 +145,11 @@ def find_external_links(url, page): urllib2.__version__, require('setuptools')[0].version ) - class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" def __init__(self, index_url="https://pypi.python.org/simple", hosts=('*',), - *args, **kw + ca_bundle=None, verify_ssl=True, *args, **kw ): Environment.__init__(self,*args,**kw) self.index_url = index_url + "/"[:not index_url.endswith('/')] @@ -159,8 +158,9 @@ def __init__(self, index_url="https://pypi.python.org/simple", hosts=('*',), self.package_pages = {} self.allows = re.compile('|'.join(map(translate,hosts))).match self.to_scan = [] - - + if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()): + self.opener = ssl_support.opener_for(ca_bundle) + else: self.opener = urllib2.urlopen def process_url(self, url, retrieve=False): """Evaluate a URL as a possible download, and maybe retrieve it""" @@ -575,12 +575,13 @@ def reporthook(self, url, filename, blocknum, blksize, size): def open_url(self, url, warning=None): if url.startswith('file:'): return local_open(url) try: - return open_with_auth(url) - except urllib2.HTTPError, v: - return v - except urllib2.URLError, v: - reason = v.reason - except httplib.HTTPException, v: + return open_with_auth(url, self.opener) + except urllib2.HTTPError: + return sys.exc_info()[1] + except urllib2.URLError: + reason = sys.exc_info()[1].reason + except httplib.HTTPException: + v = sys.exc_info()[1] reason = "%s: %s" % (v.__doc__ or v.__class__.__name__, v) if warning: self.warn(warning, reason) @@ -612,7 +613,6 @@ def _download_url(self, scheme, url, tmpdir): self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) - def scan_url(self, url): self.process_url(url, True) @@ -736,7 +736,7 @@ def htmldecode(text): -def open_with_auth(url): +def open_with_auth(url, opener=urllib2.urlopen): """Open a urllib2 request, handling HTTP authentication""" scheme, netloc, path, params, query, frag = urlparse.urlparse(url) @@ -755,7 +755,7 @@ def open_with_auth(url): request = urllib2.Request(url) request.add_header('User-Agent', user_agent) - fp = urllib2.urlopen(request) + fp = opener(request) if auth: # Put authentication info back into request URL if same host, diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py new file mode 100644 index 0000000000..fe9d5df240 --- /dev/null +++ b/setuptools/ssl_support.py @@ -0,0 +1,246 @@ +import sys, os, socket, urllib2, atexit, re + +try: + import ssl +except ImportError: + ssl = None + +__all__ = [ + 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_available', 'cert_paths', + 'opener_for' +] + +cert_paths = """ +/etc/pki/tls/certs/ca-bundle.crt +/etc/ssl/certs/ca-certificates.crt +/usr/share/ssl/certs/ca-bundle.crt +/usr/local/share/certs/ca-root.crt +/etc/ssl/cert.pem +/System/Library/OpenSSL/certs/cert.pem +""".strip().split() + + +HTTPSHandler = HTTPSConnection = object + +for what, where in ( + ('HTTPSHandler', ['urllib2','urllib.request']), + ('HTTPSConnection', ['httplib', 'http.client']), +): + for module in where: + try: + exec("from %s import %s" % (module, what)) + except ImportError: + pass + +is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection) + + + + + + +try: + from socket import create_connection +except ImportError: + _GLOBAL_DEFAULT_TIMEOUT = getattr(socket, '_GLOBAL_DEFAULT_TIMEOUT', object()) + def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, + source_address=None): + """Connect to *address* and return the socket object. + + Convenience function. Connect to *address* (a 2-tuple ``(host, + port)``) and return the socket object. Passing the optional + *timeout* parameter will set the timeout on the socket instance + before attempting to connect. If no *timeout* is supplied, the + global default timeout setting returned by :func:`getdefaulttimeout` + is used. If *source_address* is set it must be a tuple of (host, port) + for the socket to bind as a source address before making the connection. + An host of '' or port 0 tells the OS to use the default. + """ + host, port = address + err = None + for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): + af, socktype, proto, canonname, sa = res + sock = None + try: + sock = socket.socket(af, socktype, proto) + if timeout is not _GLOBAL_DEFAULT_TIMEOUT: + sock.settimeout(timeout) + if source_address: + sock.bind(source_address) + sock.connect(sa) + return sock + + except error: + err = True + if sock is not None: + sock.close() + if err: + raise + else: + raise error("getaddrinfo returns an empty list") + + +try: + from ssl import CertificateError, match_hostname +except ImportError: + class CertificateError(ValueError): + pass + + def _dnsname_to_pat(dn): + pats = [] + for frag in dn.split(r'.'): + if frag == '*': + # When '*' is a fragment by itself, it matches a non-empty dotless + # fragment. + pats.append('[^.]+') + else: + # Otherwise, '*' matches any dotless fragment. + frag = re.escape(frag) + pats.append(frag.replace(r'\*', '[^.]*')) + return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) + + def match_hostname(cert, hostname): + """Verify that *cert* (in decoded format as returned by + SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 rules + are mostly followed, but IP addresses are not accepted for *hostname*. + + CertificateError is raised on failure. On success, the function + returns nothing. + """ + if not cert: + raise ValueError("empty or no certificate") + dnsnames = [] + san = cert.get('subjectAltName', ()) + for key, value in san: + if key == 'DNS': + if _dnsname_to_pat(value).match(hostname): + return + dnsnames.append(value) + if not dnsnames: + # The subject is only checked when there is no dNSName entry + # in subjectAltName + for sub in cert.get('subject', ()): + for key, value in sub: + # XXX according to RFC 2818, the most specific Common Name + # must be used. + if key == 'commonName': + if _dnsname_to_pat(value).match(hostname): + return + dnsnames.append(value) + if len(dnsnames) > 1: + raise CertificateError("hostname %r " + "doesn't match either of %s" + % (hostname, ', '.join(map(repr, dnsnames)))) + elif len(dnsnames) == 1: + raise CertificateError("hostname %r " + "doesn't match %r" + % (hostname, dnsnames[0])) + else: + raise CertificateError("no appropriate commonName or " + "subjectAltName fields were found") + + + + + + + + + + + + + + + + + + + + + + + + +class VerifyingHTTPSHandler(HTTPSHandler): + """Simple verifying handler: no auth, subclasses, timeouts, etc.""" + + def __init__(self, ca_bundle): + self.ca_bundle = ca_bundle + HTTPSHandler.__init__(self) + + def https_open(self, req): + return self.do_open( + lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req + ) + + +class VerifyingHTTPSConn(HTTPSConnection): + """Simple verifying connection: no auth, subclasses, timeouts, etc.""" + def __init__(self, host, ca_bundle, **kw): + HTTPSConnection.__init__(self, host, **kw) + self.ca_bundle = ca_bundle + + def connect(self): + sock = create_connection( + (self.host, self.port), getattr(self,'source_address',None) + ) + self.sock = ssl.wrap_socket( + sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle + ) + try: + match_hostname(self.sock.getpeercert(), self.host) + except CertificateError: + self.sock.shutdown(socket.SHUT_RDWR) + self.sock.close() + raise + +def opener_for(ca_bundle=None): + """Get a urlopen() replacement that uses ca_bundle for verification""" + return urllib2.build_opener( + VerifyingHTTPSHandler(ca_bundle or find_ca_bundle()) + ).open + + + +_wincerts = None + +def get_win_certfile(): + global _wincerts + if _wincerts is not None: + return _wincerts.name + + try: + from wincertstore import CertFile + except ImportError: + return None + + class MyCertFile(CertFile): + def __init__(self, stores=(), certs=()): + CertFile.__init__(self) + for store in stores: + self.addstore(store) + self.addcerts(certs) + atexit.register(self.close) + + _wincerts = MyCertFile(stores=['CA', 'ROOT']) + return _wincerts.name + +def find_ca_bundle(): + """Return an existing CA bundle path, or None""" + if os.name=='nt': + return get_win_certfile() + else: + for cert_path in cert_paths: + if os.path.isfile(cert_path): + return cert_path + + + + + + + + + + From d6faaf34a953d9c30c9c64c4038470881958ddc1 Mon Sep 17 00:00:00 2001 From: pje Date: Sat, 4 May 2013 16:32:55 -0400 Subject: [PATCH 1154/8469] Merge environment marker tests from the trunk --HG-- branch : setuptools-0.6 --- api_tests.txt | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/api_tests.txt b/api_tests.txt index 735ad8dd68..cb25454bb5 100755 --- a/api_tests.txt +++ b/api_tests.txt @@ -328,3 +328,94 @@ setuptools is provided as well:: >>> cp("darwin-8.2.0-Power_Macintosh", "macosx-10.3-ppc") False + +Environment Markers +------------------- + + >>> from pkg_resources import invalid_marker as im, evaluate_marker as em + >>> import os + + >>> print(im("sys_platform")) + Comparison or logical expression expected + + >>> print(im("sys_platform==")) + unexpected EOF while parsing (line 1) + + >>> print(im("sys_platform=='win32'")) + False + + >>> print(im("sys=='x'")) + Unknown name 'sys' + + >>> print(im("(extra)")) + Comparison or logical expression expected + + >>> print(im("(extra")) + unexpected EOF while parsing (line 1) + + >>> print(im("os.open('foo')=='y'")) + Language feature not supported in environment markers + + >>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit! + Language feature not supported in environment markers + + >>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit! + Language feature not supported in environment markers + + >>> print(im("'x' < 'y'")) + '<' operator not allowed in environment markers + + >>> print(im("'x' < 'y' < 'z'")) + Chained comparison not allowed in environment markers + + >>> print(im("r'x'=='x'")) + Only plain strings allowed in environment markers + + >>> print(im("'''x'''=='x'")) + Only plain strings allowed in environment markers + + >>> print(im('"""x"""=="x"')) + Only plain strings allowed in environment markers + + >>> print(im(r"'x\n'=='x'")) + Only plain strings allowed in environment markers + + >>> print(im("os.open=='y'")) + Language feature not supported in environment markers + + >>> em('"x"=="x"') + True + + >>> em('"x"=="y"') + False + + >>> em('"x"=="y" and "x"=="x"') + False + + >>> em('"x"=="y" or "x"=="x"') + True + + >>> em('"x"=="y" and "x"=="q" or "z"=="z"') + True + + >>> em('"x"=="y" and ("x"=="q" or "z"=="z")') + False + + >>> em('"x"=="y" and "z"=="z" or "x"=="q"') + False + + >>> em('"x"=="x" and "z"=="z" or "x"=="q"') + True + + >>> em("sys_platform=='win32'") == (sys.platform=='win32') + True + + >>> em("'x' in 'yx'") + True + + >>> em("'yx' in 'x'") + False + + + + From 476342be985a7478e13618b578d111f7781b108b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:37:14 -0400 Subject: [PATCH 1155/8469] Updated merge notes to reflect less invasive change (and regression). Thanks PJE for pointing out the flaw in my reasoning. --HG-- branch : Setuptools-Distribute merge extra : source : 07d5668a8c0c09caf690c8f4f449eb46b4e45ab3 --- MERGE.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index 9cc94d3e00..37e85d8545 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -76,9 +76,7 @@ Minor Changes * Wording of some output has changed to replace contractions with their canonical form (i.e. prefer "could not" to "couldn't"). -* Manifest files are no longer written for .exe launchers. The - Distribute-based script launchers are used and they launch Python as a - subprocess, rather than loading the Python DLL in-process. +* Manifest files are only written for 32-bit .exe launchers. Differences from Distribute 0.6.36: From 430529414dec7264d11400d2c1bd8a207ee76904 Mon Sep 17 00:00:00 2001 From: pje Date: Sun, 5 May 2013 14:35:27 -0400 Subject: [PATCH 1156/8469] Add support for fallback to 'certifi' module, if installed+active. (grafted from 4a183cf275264653005072be25a644273463ba83) --HG-- branch : setuptools-0.6 extra : source : 4a183cf275264653005072be25a644273463ba83 --- setup.py | 4 ++-- setuptools.egg-info/dependency_links.txt | 1 + setuptools.egg-info/requires.txt | 3 +++ setuptools/ssl_support.py | 14 +++++++------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index b868d50869..c13f9320ab 100755 --- a/setup.py +++ b/setup.py @@ -95,8 +95,10 @@ "ssl:sys_platform=='win32'": "wincertstore==0.1", "ssl:sys_platform=='win32' and python_version in '2.3, 2.4'": "ctypes==1.0.2", "ssl:python_version in '2.3, 2.4, 2.5'":"ssl==1.16", + "certs": "certifi==0.0.8", }, dependency_links = [ + 'http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3', @@ -119,5 +121,3 @@ - - diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index a659a050c6..d490c30035 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,3 +1,4 @@ +http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3 diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 517f15d8a2..9ddbc5aca0 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,6 +3,9 @@ [ssl:sys_platform=='win32'] wincertstore==0.1 +[certs] +certifi==0.0.8 + [ssl:sys_platform=='win32' and python_version in '2.3, 2.4'] ctypes==1.0.2 diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index fe9d5df240..f1d8c92032 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,4 +1,5 @@ import sys, os, socket, urllib2, atexit, re +from pkg_resources import ResolutionError, ExtractionError try: import ssl @@ -38,7 +39,6 @@ - try: from socket import create_connection except ImportError: @@ -225,7 +225,8 @@ def __init__(self, stores=(), certs=()): _wincerts = MyCertFile(stores=['CA', 'ROOT']) return _wincerts.name - + + def find_ca_bundle(): """Return an existing CA bundle path, or None""" if os.name=='nt': @@ -234,11 +235,10 @@ def find_ca_bundle(): for cert_path in cert_paths: if os.path.isfile(cert_path): return cert_path - - - - - + try: + return pkg_resources.resource_filename('certifi', 'cacert.pem') + except (ImportError, ResolutionError, ExtractionError): + return None From c46bdf7f7f29f9cba3ff89450fb8cb49d9ddc109 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 11:54:22 +0100 Subject: [PATCH 1157/8469] Update merge notes again to reflect revised technique --HG-- branch : Setuptools-Distribute merge --- MERGE.txt | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index 37e85d8545..cf5ecd5747 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -31,27 +31,34 @@ There were both technical and philosophical differences between Setuptools and Distribute. To reconcile these differences in a manageable way, the following technique was undertaken: -In the 'distribute' branch, first remove code that is no longer relevant to -setuptools (such as the setuptools patching code). +Create a 'Setuptools-Distribute merge' branch, based on a late release of +Distribute (0.6.35). This was done with a00b441856c4. -Next, in the 'distribute' branch, at the point where the fork occurred (such -that the code is still essentially pristine setuptools), copy changes for a +In that branch, first remove code that is no longer relevant to +Setuptools (such as the setuptools patching code). + +Next, in the the merge branch, create another base from at the point where the +fork occurred (such that the code is still essentially an older but pristine +setuptools). This base can be found as 955792b069d0. This creates two heads +in the merge branch, each with a basis in the fork. + +Then, repeatedly copy changes for a single file or small group of files from a late revision of that file in the -'setuptools-0.6' branch (1aae1efe5733 was used) and commit those changes. This -step creates a new head. That head is then merged. It is in this Mercurial +'setuptools-0.6' branch (1aae1efe5733 was used) and commit those changes on +the setuptools-only head. That head is then merged with the head with +Distribute changes. It is in this Mercurial merge operation that the fundamental differences between Distribute and Setuptools are reconciled, but since only a single file or small set of files are used, the scope is limited. Finally, once all files have been reconciled and merged, the tip of the -'distribute' branch represents the merged code. It is then merged with the -'setuptools-0.6' branch, deferring to the 'distribute' branch:: - - hg update null - hg merge 1aae1efe5733 - hg ci -m "New beginning in a default branch" - hg merge distribute --tool internal:other - hg ci -m "Merge with Distribute" +merge branch represents the merged code. + +Originally, jaraco attempted all of this using anonymous heads in the +Distribute branch, but later realized this technique made for a somewhat +unclear merge process, so the changes were re-committed as described above +for clarity. In this way, the "distribute" and "setuptools" branches can +continue to track the official "distribute" changesets. Concessions =========== From a0d19667eaa92bd95f2bebfcb50a68d0921282eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 12:10:02 +0100 Subject: [PATCH 1158/8469] Updated merge notes again to reference relevant changesets and final process --HG-- branch : Setuptools-Distribute merge --- MERGE.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index cf5ecd5747..f836f35414 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -51,14 +51,15 @@ merge operation that the fundamental differences between Distribute and Setuptools are reconciled, but since only a single file or small set of files are used, the scope is limited. -Finally, once all files have been reconciled and merged, the tip of the -merge branch represents the merged code. +Finally, once all the challenging files have been reconciled and merged, the +remaining changes from the setuptools-0.6 branch are merged, deferring to the +reconciled changes (a1fa855a5a62 and 160ccaa46be0). Originally, jaraco attempted all of this using anonymous heads in the Distribute branch, but later realized this technique made for a somewhat unclear merge process, so the changes were re-committed as described above for clarity. In this way, the "distribute" and "setuptools" branches can -continue to track the official "distribute" changesets. +continue to track the official Distribute changesets. Concessions =========== From 94e2f8b4674735b16f02651a9fac29a7d5f75835 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 May 2013 08:10:01 -0400 Subject: [PATCH 1159/8469] Re-ran egg_info on Python 2.7 (causes upload command to disappear) --- setuptools.egg-info/entry_points.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 5b799e94f1..663882d630 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -7,7 +7,6 @@ build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register -upload = setuptools.command.upload:upload upload_docs = setuptools.command.upload_docs:upload_docs install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias From 40da992b5e706a5bb5ac438256633828c2640f53 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 May 2013 08:13:26 -0400 Subject: [PATCH 1160/8469] Setuptools 0.7 only supports Python 2.4+. Moved external references for ctypes and Windows SSL builds to an authoritative location (with the project on bitbucket). --- setup.py | 11 +++++------ setuptools.egg-info/dependency_links.txt | 7 +++---- setuptools.egg-info/requires.txt | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index 164f4edbc1..c5dcbdbaaf 100755 --- a/setup.py +++ b/setup.py @@ -209,8 +209,8 @@ def run(self): """).strip().splitlines(), extras_require = { "ssl:sys_platform=='win32'": "wincertstore==0.1", - "ssl:sys_platform=='win32' and python_version in '2.3, 2.4'": "ctypes==1.0.2", - "ssl:python_version in '2.3, 2.4, 2.5'":"ssl==1.16", + "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", + "ssl:python_version in '2.4, 2.5'":"ssl==1.16", "certs": "certifi==0.0.8", }, dependency_links = [ @@ -218,10 +218,9 @@ def run(self): 'http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3', - 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.4.exe/download#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', - 'http://peak.telecommunity.com/dist/ssl-1.16-py2.3-win32.egg#md5=658f74b3eb6f32050e8531bb73de8e74', - 'http://peak.telecommunity.com/dist/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', - 'http://peak.telecommunity.com/dist/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', + 'http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', + 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', + 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', ], scripts = [], # tests_require = "setuptools[ssl]", diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index d490c30035..a725f332b7 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -2,7 +2,6 @@ http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3 -http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.4.exe/download#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc -http://peak.telecommunity.com/dist/ssl-1.16-py2.3-win32.egg#md5=658f74b3eb6f32050e8531bb73de8e74 -http://peak.telecommunity.com/dist/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 -http://peak.telecommunity.com/dist/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b +http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc +http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 +http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 9ddbc5aca0..91d84d9ca8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [ssl:sys_platform=='win32'] wincertstore==0.1 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version in '2.3, 2.4'] -ctypes==1.0.2 - -[ssl:python_version in '2.3, 2.4, 2.5'] +[ssl:python_version in '2.4, 2.5'] ssl==1.16 \ No newline at end of file From 17bc3630ba27ac4ce6fe4537f071e5621c31a5bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 May 2013 08:22:02 -0400 Subject: [PATCH 1161/8469] Update versions in preparation for an 0.7b1 release --- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 6 ++---- setup.py | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9a60cfe18f..25022b031e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.40' +version = '0.7b1' # The full version, including alpha/beta/rc tags. -release = '0.6.40' +release = '0.7b1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 57f019b12d..cb9fafb24d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -47,7 +47,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.40" +DEFAULT_VERSION = "0.7b1" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" diff --git a/release.py b/release.py index 2dc51ae822..48871986e4 100644 --- a/release.py +++ b/release.py @@ -22,8 +22,7 @@ except Exception: pass -VERSION = '0.6.40' -PACKAGE_INDEX = 'https://pypi.python.org/pypi' +VERSION = '0.7b1' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(): @@ -33,8 +32,7 @@ def get_next_version(): NEXT_VERSION = get_next_version() -files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', - 'README.txt', 'distribute_setup.py') +files_with_versions = 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py' def get_repo_name(): """ diff --git a/setup.py b/setup.py index c5dcbdbaaf..8bd55b1846 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.40" +VERSION = "0.7b1" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 9073ffa68ed6e3e73484d8b9d2e6d79eacd3c96f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 May 2013 08:24:51 -0400 Subject: [PATCH 1162/8469] Added tag 0.7b1 for changeset 9b2e2aa06e05 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b433c91f43..34b79febd1 100644 --- a/.hgtags +++ b/.hgtags @@ -49,3 +49,4 @@ be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 +9b2e2aa06e058c63e06c5e42a7f279ddae2dfb7d 0.7b1 From 22a549287b1c504420e40d21501c55f9bc62db3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 May 2013 07:52:19 -0400 Subject: [PATCH 1163/8469] Revert README to match setuptools-0.6 branch (originally copied from requests implementation which was not used). --- README.txt | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/README.txt b/README.txt index 12b1e390b6..22d76da2db 100755 --- a/README.txt +++ b/README.txt @@ -5,36 +5,6 @@ Installing and Using Setuptools .. contents:: **Table of Contents** ----------------------------------- -Security Issues - Read this First! ----------------------------------- - -Setuptools and ``easy_install`` currently default to allowing automated -download and execution of code from anywhere on the internet, without actually -verifying the owners of the websites or the authors of the code. If you want -your installation to be more secure, you will need to: - - 1. Manually install the `requests `_ - library **after** installing setuptools, using an SSL-enabled browser or - other tool. (This will enable SSL certificate verification.) - - 2. Configure your default ``--allow-hosts`` setting so that ``easy_install`` - will only download from sites you trust. (E.g., to only download from - ``pypi.python.org`` or some other trusted package index.) - - 3. If you are using a Python version less than 2.6, you will also need to - install the `SSL backport module `_ - to enable SSL downloads from PyPI. (Unfortunately, the ``requests`` - package does not support older versions of Python at this time, so SSL - certificate verification will not be enabled. But at least you'll still be - able to use PyPI, which is in the process of switching to an all-SSL policy - for downloads. - -For more information on how to do all of the above, and for other security- -related information, please see the full `setuptools security documentation -`_. - - ------------------------- Installation Instructions ------------------------- From af3f2330cc900f367d3ba4eb425b846148c8b414 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 May 2013 07:56:07 -0400 Subject: [PATCH 1164/8469] Updated readme to include note about removing distribute as well --- README.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 22d76da2db..69e327642a 100755 --- a/README.txt +++ b/README.txt @@ -23,8 +23,9 @@ Windows NOTE: Regardless of what sort of Python you're using, if you've previously -installed older versions of setuptools, please delete all ``setuptools*.egg`` -and ``setuptools.pth`` files from your system's ``site-packages`` directory +installed older versions of setuptools or distribute, please delete all +``setuptools*.egg``, ``distribute*.egg``, and ``setuptools.pth`` files and +directories from your system's ``site-packages`` directory (and any other ``sys.path`` directories) FIRST. If you are upgrading a previous version of setuptools that was installed using @@ -102,8 +103,8 @@ Package Index`_. Scroll to the very bottom of the page to find the links. .. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files -In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `Python SVN sandbox`_, and in-development versions of the +In addition to the PyPI downloads, the development version of ``setuptools`` +is available from the `Python SVN sandbox`_, and in-development versions of the `0.6 branch`_ are available as well. .. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 From cd39b89526cd1a7f37d144cf07820cd2ca052f69 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 May 2013 07:58:03 -0400 Subject: [PATCH 1165/8469] Reindent long lines --- README.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 69e327642a..6297ca01cd 100755 --- a/README.txt +++ b/README.txt @@ -16,7 +16,10 @@ Windows Install setuptools using the provided ``.exe`` installer. 64-bit versions of Python - Download `ez_setup.py`_ and run it; it will download the appropriate .egg file and install it for you. (Currently, the provided ``.exe`` installer does not support 64-bit versions of Python for Windows, due to a `distutils installer compatibility issue`_ + Download `ez_setup.py`_ and run it; it will download the appropriate .egg + file and install it for you. (Currently, the provided ``.exe`` installer + does not support 64-bit versions of Python for Windows, due to a + `distutils installer compatibility issue`_ .. _ez_setup.py: http://peak.telecommunity.com/dist/ez_setup.py .. _distutils installer compatibility issue: http://bugs.python.org/issue6792 From b4fffca5bc50fffaff74404fe6dc3157c8246a73 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 May 2013 08:03:19 -0400 Subject: [PATCH 1166/8469] Replaced telecommunity link with bitbucket link --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 6297ca01cd..63dfd54078 100755 --- a/README.txt +++ b/README.txt @@ -21,7 +21,7 @@ Windows does not support 64-bit versions of Python for Windows, due to a `distutils installer compatibility issue`_ -.. _ez_setup.py: http://peak.telecommunity.com/dist/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/default/ez_setup.py .. _distutils installer compatibility issue: http://bugs.python.org/issue6792 From 5da758824995633435c165754b8c7b7342b8372a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 May 2013 08:19:41 -0400 Subject: [PATCH 1167/8469] Update documentation references to point to new anticipated location at pythonhosted.org --- README.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 63dfd54078..07bdbc2eca 100755 --- a/README.txt +++ b/README.txt @@ -134,12 +134,12 @@ them there, so this reference list can be updated. If you have working, *tested* patches to correct problems or add features, you may submit them to the `setuptools bug tracker`_. -.. _setuptools bug tracker: http://bugs.python.org/setuptools/ -.. _Package Compatibility Notes: http://peak.telecommunity.com/DevCenter/PackageNotes -.. _The Internal Structure of Python Eggs: http://peak.telecommunity.com/DevCenter/EggFormats -.. _The setuptools Developer's Guide: http://peak.telecommunity.com/DevCenter/setuptools -.. _The pkg_resources API reference: http://peak.telecommunity.com/DevCenter/PkgResources -.. _The EasyInstall user's guide and reference manual: http://peak.telecommunity.com/DevCenter/EasyInstall +.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues +.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes +.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html +.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html +.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html +.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ From 7ad02bac8fa7250a96bad6c864e82792e6427273 Mon Sep 17 00:00:00 2001 From: pje Date: Wed, 15 May 2013 17:55:20 -0400 Subject: [PATCH 1168/8469] Fix broken devnull check; fixes issue 93 (grafted from 4dd378f0f048fbb1906dc5e71ef736fc4f089211) --HG-- branch : setuptools-0.6 extra : source : 4dd378f0f048fbb1906dc5e71ef736fc4f089211 --- setuptools/sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 4c5e7129db..8b889a783d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -206,7 +206,7 @@ def _open(self, path, mode='r', *args, **kw): def tmpnam(self): self._violation("tmpnam") def _ok(self,path): - if hasattr(_os,'devnull') and path==_os.devnull: return True + if hasattr(os,'devnull') and path==os.devnull: return True active = self._active try: self._active = False From 150a2700ce85b5b574d2f7fc13f5f72039190230 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 May 2013 18:51:22 -0400 Subject: [PATCH 1169/8469] Correct spelling of the seminal author's name --- CONTRIBUTORS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d35d9e1153..9007aecedb 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -20,7 +20,7 @@ Contributors * Martin von Löwis * Noufal Ibrahim * Pete Hollobon -* Philip J. Eby +* Phillip J. Eby * Philip Jenvey * Reinout van Rees * Robert Myers From 95b4277b80b7b35e1c9f16c487f6fb3fe804ac47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 May 2013 18:55:02 -0400 Subject: [PATCH 1170/8469] Indicate that environment markers are experimental --- CHANGES.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 566d10fe5d..9f2b4f1473 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,9 +11,12 @@ CHANGES Added several features that were slated for setuptools 0.6c12: * Index URL now defaults to HTTPS. -* Added environment marker support. Now clients may designate a PEP-426 - environment marker for "extra" dependencies. For an example, see the - Setuptools ``setup.py`` script. +* Added experimental environment marker support. Now clients may designate a + PEP-426 environment marker for "extra" dependencies. Setuptools uses this + feature in ``setup.py`` for optional SSL and certificate validation support + on older platforms. Based on Distutils-SIG discussions, the syntax is + somewhat tentative. There should probably be a PEP with a firmer spec before + the feature should be considered suitable for use. * Added support for SSL certificate validation when installing packages from an HTTPS service. From 585abe8ae6bfdb75f12181629e029b37a7cf3ea6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 May 2013 18:55:41 -0400 Subject: [PATCH 1171/8469] Remove ctypes link for Python 2.3 (not supported) --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 8bd55b1846..90baa789ea 100755 --- a/setup.py +++ b/setup.py @@ -217,7 +217,6 @@ def run(self): 'http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', - 'http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3', 'http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', From ac16aa2d54815d3e805c60a38afa5f4c9f3d282f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 16 May 2013 08:17:22 -0400 Subject: [PATCH 1172/8469] Remove redundant exception for os.devnull --HG-- branch : Setuptools-Distribute merge --- setuptools/sandbox.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index e026ff13e5..f309512532 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -61,7 +61,7 @@ def run_setup(setup_script, args): sys.argv[:] = [setup_script]+list(args) sys.path.insert(0, setup_dir) # reset to include setup dir, w/clean callback list - working_set.__init__() + working_set.__init__() working_set.callbacks.append(lambda dist:dist.activate()) DirectorySandbox(setup_dir).run( lambda: execfile( @@ -241,7 +241,6 @@ def tmpnam(self): self._violation("tmpnam") def _ok(self,path): - if hasattr(_os,'devnull') and path==_os.devnull: return True active = self._active try: self._active = False From 16e9ae36591d3cdeb2a097f32a6782361b66e0c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 21:58:08 -0400 Subject: [PATCH 1173/8469] Update test to work with latest SSL-enabled URL opening technique. --- setuptools.egg-info/dependency_links.txt | 1 - setuptools.egg-info/entry_points.txt | 124 +++++++++++------------ setuptools/tests/test_packageindex.py | 16 ++- 3 files changed, 68 insertions(+), 73 deletions(-) diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index a725f332b7..a54d9039cc 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,7 +1,6 @@ http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c -http://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.win32-py2.3.exe/download#md5=9afe4b75240a8808a24df7a76b6081e3 http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 663882d630..2965458969 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 9c4bfadb0c..ad856e81f5 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -46,18 +46,14 @@ def _urlopen(*args): import httplib raise httplib.BadStatusLine('line') - old_urlopen = urllib2.urlopen - urllib2.urlopen = _urlopen + index.opener = _urlopen url = 'http://example.com' try: - try: - v = index.open_url(url) - except Exception, v: - self.assertTrue('line' in str(v)) - else: - raise AssertionError('Should have raise here!') - finally: - urllib2.urlopen = old_urlopen + v = index.open_url(url) + except Exception, v: + self.assertTrue('line' in str(v)) + else: + raise AssertionError('Should have raise here!') def test_bad_url_double_scheme(self): """ From 1ad68c6f3dee2d96f831e078dd7b58a4c39c08c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 22:21:42 -0400 Subject: [PATCH 1174/8469] Try doctest with full exception name --- tests/api_tests.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index cb25454bb5..b55740213a 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -211,8 +211,8 @@ working set triggers a ``pkg_resources.VersionConflict`` error: >>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE Traceback (most recent call last): ... - VersionConflict: (Bar 0.9 (http://example.com/something), - Requirement.parse('Bar==1.0')) + pkg_resources.VersionConflict: (Bar 0.9 (http://example.com/something), + Requirement.parse('Bar==1.0')) You can subscribe a callback function to receive notifications whenever a new distribution is added to a working set. The callback is immediately invoked @@ -222,14 +222,14 @@ again for new distributions added thereafter:: >>> def added(dist): print "Added", dist >>> ws.subscribe(added) Added Bar 0.9 - >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") + >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") >>> ws.add(foo12) Added Foo 1.2 Note, however, that only the first distribution added for a given project name will trigger a callback, even during the initial ``subscribe()`` callback:: - >>> foo14 = Distribution(project_name="Foo", version="1.4", location="f14") + >>> foo14 = Distribution(project_name="Foo", version="1.4", location="f14") >>> ws.add(foo14) # no callback, because Foo 1.2 is already active >>> ws = WorkingSet([]) @@ -237,7 +237,7 @@ will trigger a callback, even during the initial ``subscribe()`` callback:: >>> ws.add(foo14) >>> ws.subscribe(added) Added Foo 1.2 - + And adding a callback more than once has no effect, either:: >>> ws.subscribe(added) # no callbacks @@ -260,7 +260,7 @@ Finding Plugins >>> plugins.add(foo12) >>> plugins.add(foo14) >>> plugins.add(just_a_test) - + In the simplest case, we just get the newest version of each distribution in the plugin environment:: @@ -318,7 +318,7 @@ number does not matter:: >>> cp("macosx-9.5-ppc", reqd) False -Backwards compatibility for packages made via earlier versions of +Backwards compatibility for packages made via earlier versions of setuptools is provided as well:: >>> cp("darwin-8.2.0-Power_Macintosh", reqd) @@ -340,7 +340,7 @@ Environment Markers >>> print(im("sys_platform==")) unexpected EOF while parsing (line 1) - + >>> print(im("sys_platform=='win32'")) False @@ -355,7 +355,7 @@ Environment Markers >>> print(im("os.open('foo')=='y'")) Language feature not supported in environment markers - + >>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit! Language feature not supported in environment markers @@ -364,25 +364,25 @@ Environment Markers >>> print(im("'x' < 'y'")) '<' operator not allowed in environment markers - + >>> print(im("'x' < 'y' < 'z'")) Chained comparison not allowed in environment markers >>> print(im("r'x'=='x'")) Only plain strings allowed in environment markers - + >>> print(im("'''x'''=='x'")) Only plain strings allowed in environment markers - + >>> print(im('"""x"""=="x"')) Only plain strings allowed in environment markers - + >>> print(im(r"'x\n'=='x'")) Only plain strings allowed in environment markers >>> print(im("os.open=='y'")) Language feature not supported in environment markers - + >>> em('"x"=="x"') True From 28c5207103c91950079cbe58ac6b7455af351d49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 22:37:40 -0400 Subject: [PATCH 1175/8469] Update doctest to use syntax suitable for Python 2 and Python 3. Credit to Lennart Regebro for the [hints in his book](http://python3porting.com/problems.html#handling-expected-exceptions). --- tests/api_tests.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index b55740213a..06e14a33b9 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -208,11 +208,14 @@ You can ask a WorkingSet to ``find()`` a distribution matching a requirement:: Note that asking for a conflicting version of a distribution already in a working set triggers a ``pkg_resources.VersionConflict`` error: - >>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE - Traceback (most recent call last): - ... - pkg_resources.VersionConflict: (Bar 0.9 (http://example.com/something), - Requirement.parse('Bar==1.0')) + >>> try: + ... ws.find(Requirement.parse("Bar==1.0")) + ... except pkg_resources.VersionConflict: + ... exc = sys.exc_info()[1] + ... print(str(exc)) + ... else: + ... raise AssertionError("VersionConflict was not raised") + (Bar 0.9 (http://examples.com/something), Requirement.parse('Bar==1.0')) You can subscribe a callback function to receive notifications whenever a new distribution is added to a working set. The callback is immediately invoked From efc915b3a20012ab7a6200b7b99fa970ea6dfbe4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 22:45:59 -0400 Subject: [PATCH 1176/8469] Fix typo --- tests/api_tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 06e14a33b9..364b3d6f1b 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -215,7 +215,7 @@ working set triggers a ``pkg_resources.VersionConflict`` error: ... print(str(exc)) ... else: ... raise AssertionError("VersionConflict was not raised") - (Bar 0.9 (http://examples.com/something), Requirement.parse('Bar==1.0')) + (Bar 0.9 (http://example.com/something), Requirement.parse('Bar==1.0')) You can subscribe a callback function to receive notifications whenever a new distribution is added to a working set. The callback is immediately invoked From f1427c0e80b583800c59f4013d08b45a4cbb8250 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:13:47 -0400 Subject: [PATCH 1177/8469] SVN is no longer used. --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d7dfbb772e..176cc47e09 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,5 @@ [egg_info] tag_build = dev -tag_svn_revision = 1 [aliases] release = egg_info -RDb '' From 0465490edb621f16353aa5ac7d9661cf69accf8b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:30:20 -0400 Subject: [PATCH 1178/8469] Updated get_next_version to bump arbitrary versions and added doctests. --- release.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/release.py b/release.py index 283340fb5a..10c21e24b1 100644 --- a/release.py +++ b/release.py @@ -25,12 +25,32 @@ VERSION = '0.7b1' PACKAGE_INDEX = 'https://pypi.python.org/pypi' -def get_next_version(): - digits = map(int, VERSION.split('.')) - digits[-1] += 1 - return '.'.join(map(str, digits)) +def get_next_version(version): + """ + Infer a next version from the current version by incrementing the last + number or appending a number. + + >>> get_next_version('1.0') + '1.1' + + >>> get_next_version('1.0b') + '1.0b1' + + >>> get_next_version('1.0.9') + '1.0.10' + + >>> get_next_version('1') + '2' + + >>> get_next_version('') + '1' + """ + def incr(match): + ver = int(match.group(0) or '0') + return str(ver + 1) + return re.sub('\d*$', incr, version) -NEXT_VERSION = get_next_version() +NEXT_VERSION = get_next_version(VERSION) files_with_versions = 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py' From 6075a86ef9810670e9b89c9f4321aad19158fad0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:36:21 -0400 Subject: [PATCH 1179/8469] Bump to 0.7b2 for next release --- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 25022b031e..3ce8913e9e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7b1' +version = '0.7b2' # The full version, including alpha/beta/rc tags. -release = '0.7b1' +release = '0.7b2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index cb9fafb24d..34882266b5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -47,7 +47,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.7b1" +DEFAULT_VERSION = "0.7b2" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" diff --git a/release.py b/release.py index 10c21e24b1..229f8ed857 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7b1' +VERSION = '0.7b2' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(version): diff --git a/setup.py b/setup.py index 134336ea96..f43b07e2e4 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7b1" +VERSION = "0.7b2" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 0496e68c19f392c9da7081935709c8f8f0f01605 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:46:08 -0400 Subject: [PATCH 1180/8469] Extract function for uploading to pypi --- release.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/release.py b/release.py index 229f8ed857..98a3944ff5 100644 --- a/release.py +++ b/release.py @@ -132,21 +132,7 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) - linkify('CHANGES.txt', 'CHANGES (links).txt') - - has_docs = build_docs() - if os.path.isdir('./dist'): - shutil.rmtree('./dist') - cmd = [ - sys.executable, 'setup.py', '-q', - 'egg_info', '-RD', '-b', '', - 'sdist', - 'register', '-r', PACKAGE_INDEX, - 'upload', '-r', PACKAGE_INDEX, - ] - if has_docs: - cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) - subprocess.check_call(cmd) + upload_to_pypi() upload_bootstrap_script() # update to the tip for the next operation @@ -163,6 +149,23 @@ def do_release(): add_milestone_and_version() +def upload_to_pypi(): + linkify('CHANGES.txt', 'CHANGES (links).txt') + + has_docs = build_docs() + if os.path.isdir('./dist'): + shutil.rmtree('./dist') + cmd = [ + sys.executable, 'setup.py', '-q', + 'egg_info', '-RD', '-b', '', + 'sdist', + 'register', '-r', PACKAGE_INDEX, + 'upload', '-r', PACKAGE_INDEX, + ] + if has_docs: + cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) + subprocess.check_call(cmd) + def has_sphinx(): try: devnull = open(os.path.devnull, 'wb') From 1bc6912c187819269f60ec7851a43a778b6881b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:47:04 -0400 Subject: [PATCH 1181/8469] Added tag 0.7b2 for changeset 8951daac6c1b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f27c75b999..0909dae156 100644 --- a/.hgtags +++ b/.hgtags @@ -53,3 +53,4 @@ d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 +8951daac6c1bc7b24c7fb054fd369f2c5b88cdb3 0.7b2 From 8f52bc5f9db7b202461c6d2421930545a683fb5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:59:46 -0400 Subject: [PATCH 1182/8469] Bump to next anticipated version --- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3ce8913e9e..1a896681ec 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7b2' +version = '0.7b3' # The full version, including alpha/beta/rc tags. -release = '0.7b2' +release = '0.7b3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 34882266b5..ec3d3fd76c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -47,7 +47,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.7b2" +DEFAULT_VERSION = "0.7b3" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" diff --git a/release.py b/release.py index 98a3944ff5..f3d8387202 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7b2' +VERSION = '0.7b3' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(version): diff --git a/setup.py b/setup.py index f43b07e2e4..9334d7d84f 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7b2" +VERSION = "0.7b3" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 59d45d94058826e754c7f36fe0605ab9e1160b62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 23:53:44 -0400 Subject: [PATCH 1183/8469] Support get_headers on Python 3 and Python 2 --- setuptools/package_index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 2701c87394..8a3c96dec8 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -608,7 +608,10 @@ def _download_to(self, url, filename): size = -1 if "content-length" in headers: # Some servers return multiple Content-Length headers :( - size = max(map(int,headers.getheaders("Content-Length"))) + if not hasattr(headers, 'get_all'): + # Older versions of Python don't have the get_all method + headers.get_all = headers.getheaders + size = max(map(int,headers.get_all("Content-Length"))) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: From cc51ff77f4914497a98b7223723995f05e8ab1a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 May 2013 14:32:23 -0400 Subject: [PATCH 1184/8469] Fix use of getheaders on Python 3 --- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools/package_index.py | 7 +- setuptools/py27compat.py | 15 ++++ 3 files changed, 80 insertions(+), 66 deletions(-) create mode 100644 setuptools/py27compat.py diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2965458969..663882d630 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8a3c96dec8..133677e87c 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -13,6 +13,7 @@ from md5 import md5 from fnmatch import translate from .py24compat import wraps +from setuptools.py27compat import get_all_headers EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$') HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I) @@ -608,10 +609,8 @@ def _download_to(self, url, filename): size = -1 if "content-length" in headers: # Some servers return multiple Content-Length headers :( - if not hasattr(headers, 'get_all'): - # Older versions of Python don't have the get_all method - headers.get_all = headers.getheaders - size = max(map(int,headers.get_all("Content-Length"))) + sizes = get_all_headers(headers, 'Content-Length') + size = max(map(int, sizes)) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py new file mode 100644 index 0000000000..9d2886db99 --- /dev/null +++ b/setuptools/py27compat.py @@ -0,0 +1,15 @@ +""" +Compatibility Support for Python 2.7 and earlier +""" + +import sys + +def get_all_headers(message, key): + """ + Given an HTTPMessage, return all headers matching a given key. + """ + return message.get_all(key) + +if sys.version_info < (3,): + def get_all_headers(message, key): + return message.getheaders(key) From 06bb0278e3cdc05207b3670bd30eb23f9c8a1076 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 May 2013 15:32:30 -0400 Subject: [PATCH 1185/8469] Re-generate egg_info --- setuptools.egg-info/entry_points.txt | 86 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 ++--- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 663882d630..2a1ffddaff 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +top_level.txt = setuptools.command.egg_info:write_toplevel_names +PKG-INFO = setuptools.command.egg_info:write_pkg_info dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names namespace_packages.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete +eager_resources.txt = setuptools.command.egg_info:overwrite_arg + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +easy_install-3.3 = setuptools.command.easy_install:main [distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +test_loader = setuptools.dist:check_importable tests_require = setuptools.dist:check_requirements +include_package_data = setuptools.dist:assert_bool +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +use_2to3_fixers = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +packages = setuptools.dist:check_packages -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +egg_info = setuptools.command.egg_info:egg_info +alias = setuptools.command.alias:alias +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +register = setuptools.command.register:register +test = setuptools.command.test:test +build_py = setuptools.command.build_py:build_py +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_egg_info = setuptools.command.install_egg_info:install_egg_info +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +rotate = setuptools.command.rotate:rotate +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +easy_install = setuptools.command.easy_install:easy_install +upload_docs = setuptools.command.upload_docs:upload_docs +setopt = setuptools.command.setopt:setopt +install = setuptools.command.install:install +build_ext = setuptools.command.build_ext:build_ext diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 91d84d9ca8..668f4ee242 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [certs] certifi==0.0.8 [ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ssl==1.16 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file From 14439716f80f8c24996de8d2179003a32f1cff3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 May 2013 15:54:55 -0400 Subject: [PATCH 1186/8469] Added tag 0.7b3 for changeset 63e4eb2d6120 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 076d63bec2..2d205d9953 100644 --- a/.hgtags +++ b/.hgtags @@ -55,3 +55,4 @@ ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 8951daac6c1bc7b24c7fb054fd369f2c5b88cdb3 0.7b2 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 +63e4eb2d61204f77f9b557201a0efa187b05a611 0.7b3 From 2a6828a3a6f98a6f6e0e97b02b1c6e397130a473 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 May 2013 16:04:05 -0400 Subject: [PATCH 1187/8469] Bump version for subsequent release --- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1a896681ec..b702d35895 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7b3' +version = '0.7b4' # The full version, including alpha/beta/rc tags. -release = '0.7b3' +release = '0.7b4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index ec3d3fd76c..2ea5dbab94 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -47,7 +47,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.7b3" +DEFAULT_VERSION = "0.7b4" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" diff --git a/release.py b/release.py index f3d8387202..bd944647ec 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7b3' +VERSION = '0.7b4' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(version): diff --git a/setup.py b/setup.py index 9334d7d84f..131b065e47 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7b3" +VERSION = "0.7b4" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From d45dccf4ef6db592e73337da6a04ca1e4445341f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 10:51:36 -0400 Subject: [PATCH 1188/8469] Add note about dropped support for Python 2.3 --- MERGE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/MERGE.txt b/MERGE.txt index f836f35414..16fbdc68a6 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -78,6 +78,7 @@ Major Changes packages. * Sort order of Distributions in pkg_resources now prefers PyPI to external links (Distribute issue 163). +* Python 2.4 or greater is required (drop support for Python 2.3). Minor Changes ------------- From 9d50157d521db8e339228d6da0d7fa0ef126b927 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 10:56:46 -0400 Subject: [PATCH 1189/8469] Remove Python 2.3 support from ez_setup.py --- ez_setup.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2ea5dbab94..acd7e39cfe 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -19,6 +19,7 @@ import tempfile import tarfile import optparse +import subprocess from distutils import log @@ -27,29 +28,12 @@ except ImportError: USER_SITE = None -try: - import subprocess - - def _python_cmd(*args): - args = (sys.executable,) + args - return subprocess.call(args) == 0 - -except ImportError: - # will be used for python 2.3 - def _python_cmd(*args): - args = (sys.executable,) + args - # quoting arguments if windows - if sys.platform == 'win32': - def quote(arg): - if ' ' in arg: - return '"%s"' % arg - return arg - args = [quote(arg) for arg in args] - return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 - DEFAULT_VERSION = "0.7b4" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" +def _python_cmd(*args): + args = (sys.executable,) + args + return subprocess.call(args) == 0 def _install(tarball, install_args=()): # extracting the tarball From 6cf253f0799970f6e7c86ba18cec6e1231dbe493 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 11:52:53 -0400 Subject: [PATCH 1190/8469] Add support for Python 3.3 in environment marker tests --- tests/api_tests.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 364b3d6f1b..d03da14e12 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -341,8 +341,8 @@ Environment Markers >>> print(im("sys_platform")) Comparison or logical expression expected - >>> print(im("sys_platform==")) - unexpected EOF while parsing (line 1) + >>> print(im("sys_platform==")) # doctest: +ELLIPSIS + unexpected EOF while parsing (...line 1) >>> print(im("sys_platform=='win32'")) False @@ -353,8 +353,8 @@ Environment Markers >>> print(im("(extra)")) Comparison or logical expression expected - >>> print(im("(extra")) - unexpected EOF while parsing (line 1) + >>> print(im("(extra")) # doctest: +ELLIPSIS + unexpected EOF while parsing (...line 1) >>> print(im("os.open('foo')=='y'")) Language feature not supported in environment markers From dd5da9cf82d57afdf074c873c6403beb830df7e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:01:15 -0400 Subject: [PATCH 1191/8469] Resave with excess whitespace removed --- setuptools/ssl_support.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index f1d8c92032..d662a1fc6d 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -46,7 +46,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None): """Connect to *address* and return the socket object. - + Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance @@ -55,7 +55,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. - """ + """ host, port = address err = None for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): @@ -73,7 +73,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, except error: err = True if sock is not None: - sock.close() + sock.close() if err: raise else: @@ -85,7 +85,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, except ImportError: class CertificateError(ValueError): pass - + def _dnsname_to_pat(dn): pats = [] for frag in dn.split(r'.'): @@ -98,12 +98,12 @@ def _dnsname_to_pat(dn): frag = re.escape(frag) pats.append(frag.replace(r'\*', '[^.]*')) return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) - + def match_hostname(cert, hostname): """Verify that *cert* (in decoded format as returned by SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 rules are mostly followed, but IP addresses are not accepted for *hostname*. - + CertificateError is raised on failure. On success, the function returns nothing. """ @@ -177,7 +177,7 @@ def https_open(self, req): class VerifyingHTTPSConn(HTTPSConnection): """Simple verifying connection: no auth, subclasses, timeouts, etc.""" - def __init__(self, host, ca_bundle, **kw): + def __init__(self, host, ca_bundle, **kw): HTTPSConnection.__init__(self, host, **kw) self.ca_bundle = ca_bundle @@ -187,7 +187,7 @@ def connect(self): ) self.sock = ssl.wrap_socket( sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle - ) + ) try: match_hostname(self.sock.getpeercert(), self.host) except CertificateError: @@ -201,7 +201,7 @@ def opener_for(ca_bundle=None): VerifyingHTTPSHandler(ca_bundle or find_ca_bundle()) ).open - + _wincerts = None @@ -210,7 +210,7 @@ def get_win_certfile(): if _wincerts is not None: return _wincerts.name - try: + try: from wincertstore import CertFile except ImportError: return None @@ -221,7 +221,7 @@ def __init__(self, stores=(), certs=()): for store in stores: self.addstore(store) self.addcerts(certs) - atexit.register(self.close) + atexit.register(self.close) _wincerts = MyCertFile(stores=['CA', 'ROOT']) return _wincerts.name From 9b12dd9c3ff59b8925f5abb6548e8e8eea455b4c Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 28 May 2013 14:33:43 -0500 Subject: [PATCH 1192/8469] Import resource_filename from pkg_resources --HG-- extra : source : 14737efaf19e5a19c92f54c94163003d381aed0b --- setuptools/ssl_support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index d662a1fc6d..312a509761 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,5 +1,5 @@ import sys, os, socket, urllib2, atexit, re -from pkg_resources import ResolutionError, ExtractionError +from pkg_resources import ResolutionError, ExtractionError, resource_filename try: import ssl @@ -236,7 +236,7 @@ def find_ca_bundle(): if os.path.isfile(cert_path): return cert_path try: - return pkg_resources.resource_filename('certifi', 'cacert.pem') + return resource_filename('certifi', 'cacert.pem') except (ImportError, ResolutionError, ExtractionError): return None From 4b6e1f43acfe225d0f52f066984e61674f162b83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:09:12 -0400 Subject: [PATCH 1193/8469] Prefer namespaced usage --- setuptools/ssl_support.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 312a509761..6dca5fab89 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,5 +1,6 @@ import sys, os, socket, urllib2, atexit, re -from pkg_resources import ResolutionError, ExtractionError, resource_filename +import pkg_resources +from pkg_resources import ResolutionError, ExtractionError try: import ssl @@ -236,7 +237,7 @@ def find_ca_bundle(): if os.path.isfile(cert_path): return cert_path try: - return resource_filename('certifi', 'cacert.pem') + return pkg_resources.resource_filename('certifi', 'cacert.pem') except (ImportError, ResolutionError, ExtractionError): return None From 6962fdf6d1d306e2ff57a71c80c44ca39e0b2284 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:10:10 -0400 Subject: [PATCH 1194/8469] Updated changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a11ab36476..daa7622d26 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,12 @@ Added several features that were slated for setuptools 0.6c12: * Added support for SSL certificate validation when installing packages from an HTTPS service. +----- +0.7b4 +----- + +* Issue #3: Fixed NameError in SSL support. + ------ 0.6.44 ------ From 213781b9db1194885abdce521b9f766a33f9280d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:15:37 -0400 Subject: [PATCH 1195/8469] Temporarily disable uploading until PyPI is used again --- release.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release.py b/release.py index bd944647ec..33fb294a53 100644 --- a/release.py +++ b/release.py @@ -159,11 +159,13 @@ def upload_to_pypi(): sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '', 'sdist', - 'register', '-r', PACKAGE_INDEX, - 'upload', '-r', PACKAGE_INDEX, + #'register', '-r', PACKAGE_INDEX, + #'upload', '-r', PACKAGE_INDEX, ] if has_docs: - cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) + cmd.extend([ + #'upload_docs', '-r', PACKAGE_INDEX + ]) subprocess.check_call(cmd) def has_sphinx(): From 715d09f7e80a6979939b9e72541277cadb4c6e97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:16:33 -0400 Subject: [PATCH 1196/8469] Added tag 0.7b4 for changeset 53b4ac9a748a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7314696f80..5e073ef606 100644 --- a/.hgtags +++ b/.hgtags @@ -57,3 +57,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 63e4eb2d61204f77f9b557201a0efa187b05a611 0.7b3 73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 +53b4ac9a748aa28893aaca42c41e5e99568667bb 0.7b4 From a1bc841f097ac20ee5a6526c804398ffb3604c80 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:16:42 -0400 Subject: [PATCH 1197/8469] Bumped to 0.7b5 in preparation for next release. --- docs/conf.py | 4 +- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools.egg-info/entry_points.txt | 86 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 ++--- 6 files changed, 55 insertions(+), 55 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b702d35895..8cd3b069dc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7b4' +version = '0.7b5' # The full version, including alpha/beta/rc tags. -release = '0.7b4' +release = '0.7b5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index acd7e39cfe..6f401d9d90 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7b4" +DEFAULT_VERSION = "0.7b5" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 33fb294a53..e0c6a5ebb9 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7b4' +VERSION = '0.7b5' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(version): diff --git a/setup.py b/setup.py index 131b065e47..684ef64f83 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7b4" +VERSION = "0.7b5" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2a1ffddaff..663882d630 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist [egg_info.writers] -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names -PKG-INFO = setuptools.command.egg_info:write_pkg_info dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names namespace_packages.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list use_2to3 = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements -include_package_data = setuptools.dist:assert_bool -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data namespace_packages = setuptools.dist:check_nsp -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -egg_info = setuptools.command.egg_info:egg_info -alias = setuptools.command.alias:alias -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -register = setuptools.command.register:register -test = setuptools.command.test:test -build_py = setuptools.command.build_py:build_py -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_egg_info = setuptools.command.install_egg_info:install_egg_info -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -easy_install = setuptools.command.easy_install:easy_install -upload_docs = setuptools.command.upload_docs:upload_docs -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -build_ext = setuptools.command.build_ext:build_ext +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 668f4ee242..91d84d9ca8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[certs] -certifi==0.0.8 - -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +[certs] +certifi==0.0.8 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file From a8e437006a04ec091b4a88434698e4e7c7d3b0fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:18:28 -0400 Subject: [PATCH 1198/8469] No need to upload bootstrap script as it's referenced from the docs. --- release.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/release.py b/release.py index e0c6a5ebb9..5a1bc3dfe1 100644 --- a/release.py +++ b/release.py @@ -133,7 +133,6 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) upload_to_pypi() - upload_bootstrap_script() # update to the tip for the next operation subprocess.check_call(['hg', 'update']) @@ -192,14 +191,6 @@ def build_docs(): subprocess.check_call(cmd, cwd='docs') return True -def upload_bootstrap_script(): - scp_command = 'pscp' if sys.platform.startswith('win') else 'scp' - try: - subprocess.check_call([scp_command, 'distribute_setup.py', - 'pypi@ziade.org:python-distribute.org/']) - except: - print("Unable to upload bootstrap script. Ask Tarek to do it.") - def linkify(source, dest): with open(source) as source: out = _linkified_text(source.read()) From a87aad81100c8ec8a457f7e15ddd3e04a83e82f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 17:24:43 -0400 Subject: [PATCH 1199/8469] Make sure there's a blank line between files --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 684ef64f83..e05e5957bf 100755 --- a/setup.py +++ b/setup.py @@ -114,7 +114,7 @@ def run(self): else: # but if the release script has not run, fall back to the source file changes_file = open('CHANGES.txt') -long_description = readme_file.read() + changes_file.read() +long_description = readme_file.read() + '\n' + changes_file.read() readme_file.close() changes_file.close() From d58f9a5feafbeb74b6205c43a4d8cc58923814de Mon Sep 17 00:00:00 2001 From: pje Date: Fri, 31 May 2013 15:30:35 -0400 Subject: [PATCH 1200/8469] Correct missing import in ssl_support (grafted from 3b91f246d8de2f54b4b764dfe362a3677a001162) --HG-- branch : setuptools-0.6 extra : source : 3b91f246d8de2f54b4b764dfe362a3677a001162 --- setuptools/ssl_support.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index f1d8c92032..2e615db374 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,5 +1,5 @@ -import sys, os, socket, urllib2, atexit, re -from pkg_resources import ResolutionError, ExtractionError +import sys, os, socket, urllib2, atexit +from pkg_resources import ResolutionError, ExtractionError, resource_filename try: import ssl @@ -236,7 +236,7 @@ def find_ca_bundle(): if os.path.isfile(cert_path): return cert_path try: - return pkg_resources.resource_filename('certifi', 'cacert.pem') + return resource_filename('certifi', 'cacert.pem') except (ImportError, ResolutionError, ExtractionError): return None From b09c79d8508e13407dc7c6c93ae0239d5ab4fc23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Jun 2013 17:23:35 -0400 Subject: [PATCH 1201/8469] Updated README to reflect preferred installation techniques, HTTPS links, and more references to bitbucket hosting. The preferred installation technique now is running 'ez_setup.py' on all platforms. --- README.txt | 114 ++++++++++++++++++++++++----------------------------- 1 file changed, 51 insertions(+), 63 deletions(-) diff --git a/README.txt b/README.txt index 07bdbc2eca..d2136b2ce5 100755 --- a/README.txt +++ b/README.txt @@ -9,25 +9,33 @@ Installing and Using Setuptools Installation Instructions ------------------------- -Windows -======= +Upgrading from Distribute +========================= + +Currently, Distribute disallows installing Setuptools 0.7 over Distribute. +You must first uninstall any active version of Distribute first. One way to +do this is to remove all ``setuptools*`` and ``distribute*`` from your +``site-packgaes`` directory. + -32-bit version of Python - Install setuptools using the provided ``.exe`` installer. +Upgrading from Setuptools 0.6 +============================= -64-bit versions of Python - Download `ez_setup.py`_ and run it; it will download the appropriate .egg - file and install it for you. (Currently, the provided ``.exe`` installer - does not support 64-bit versions of Python for Windows, due to a - `distutils installer compatibility issue`_ +Upgrading from prior versions of Setuptools is supported. Initial reports +good success in this regard. + +Windows +======= -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/default/ez_setup.py -.. _distutils installer compatibility issue: http://bugs.python.org/issue6792 +The recommended way to install setuptools on Windows is to download +`ez_setup.py`_ and run it. The script will download the appropriate .egg +file and install it for you. +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py -NOTE: Regardless of what sort of Python you're using, if you've previously -installed older versions of setuptools or distribute, please delete all -``setuptools*.egg``, ``distribute*.egg``, and ``setuptools.pth`` files and +For best results, regardless of what sort of Python you're using, if you've +previously installed older versions of setuptools or distribute, please delete +all ``setuptools*.egg``, ``distribute*.egg``, and ``setuptools.pth`` files and directories from your system's ``site-packages`` directory (and any other ``sys.path`` directories) FIRST. @@ -37,65 +45,46 @@ via your system's "Add/Remove Programs" feature, BEFORE installing the newer version. Once installation is complete, you will find an ``easy_install.exe`` program in -your Python ``Scripts`` subdirectory. Be sure to add this directory to your -``PATH`` environment variable, if you haven't already done so. +your Python ``Scripts`` subdirectory. For simple invocation and best results, +add this directory to your ``PATH`` environment variable, if it is not already +present. -RPM-Based Systems -================= +Unix-based Systems including Mac OS X +===================================== -Install setuptools using the provided source RPM. The included ``.spec`` file -assumes you are installing using the default ``python`` executable, and is not -specific to a particular Python version. The ``easy_install`` executable will -be installed to a system ``bin`` directory such as ``/usr/bin``. +Download `ez_setup.py`_ and run it using the target Python version. The script +will download the appropriate version and install it for you:: -If you wish to install to a location other than the default Python -installation's default ``site-packages`` directory (and ``$prefix/bin`` for -scripts), please use the ``.egg``-based installation approach described in the -following section. + > wget https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py -O - | python +Note that you will may need to invoke the command with superuser privileges to +install to the system Python. -Cygwin, Mac OS X, Linux, Other -============================== +Alternatively, on Python 2.6 and later, Setuptools may be installed to a +user-local path:: -1. Download the appropriate egg for your version of Python (e.g. - ``setuptools-0.6c9-py2.4.egg``). Do NOT rename it. + > wget https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py + > python ez_setup.py --user -2. Run it as if it were a shell script, e.g. ``sh setuptools-0.6c9-py2.4.egg``. - Setuptools will install itself using the matching version of Python (e.g. - ``python2.4``), and will place the ``easy_install`` executable in the - default location for installing Python scripts (as determined by the - standard distutils configuration files, or by the Python installation). -If you want to install setuptools to somewhere other than ``site-packages`` or -your default distutils installation locations for libraries and scripts, you -may include EasyInstall command-line options such as ``--prefix``, -``--install-dir``, and so on, following the ``.egg`` filename on the same -command line. For example:: +Advanced Installation +===================== - sh setuptools-0.6c9-py2.4.egg --prefix=~ +For more advanced installation options, such as installing to custom +locations or prefixes, download and extract the source +tarball from `Setuptools on PyPI `_ +and run setup.py with any supported distutils and Setuptools options. +For example:: -You can use ``--help`` to get a full options list, but we recommend consulting + setuptools-0.7$ python setup.py --prefix=/opt/setuptools + +Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section on custom installation locations`_. -.. _EasyInstall manual: http://peak.telecommunity.com/DevCenter/EasyInstall -.. _the section on custom installation locations: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations - - -Cygwin Note ------------ - -If you are trying to install setuptools for the **Windows** version of Python -(as opposed to the Cygwin version that lives in ``/usr/bin``), you must make -sure that an appropriate executable (``python2.3``, ``python2.4``, or -``python2.5``) is on your **Cygwin** ``PATH`` when invoking the egg. For -example, doing the following at a Cygwin bash prompt will install setuptools -for the **Windows** Python found at ``C:\\Python24``:: - - ln -s /cygdrive/c/Python24/python.exe python2.4 - PATH=.:$PATH sh setuptools-0.6c9-py2.4.egg - rm python2.4 +.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall +.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations Downloads @@ -107,12 +96,11 @@ Package Index`_. Scroll to the very bottom of the page to find the links. .. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `Python SVN sandbox`_, and in-development versions of the +is available from the `Bitbucket repo`_, and in-development versions of the `0.6 branch`_ are available as well. -.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - -.. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev +.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev +.. _0.6 branch: https://bitbucket.org/pypa/setuptools/get/setuptools-0.6.tar.gz#egg=setuptools-dev06 -------------------------------- Using Setuptools and EasyInstall From 94e105c2c105782f332eeb0d2a00ef225883e06b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Jun 2013 17:26:20 -0400 Subject: [PATCH 1202/8469] README.txt now references specific versions again --- release.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release.py b/release.py index 5a1bc3dfe1..d146de2cfc 100644 --- a/release.py +++ b/release.py @@ -52,7 +52,9 @@ def incr(match): NEXT_VERSION = get_next_version(VERSION) -files_with_versions = 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py' +files_with_versions = ( + 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'README.txt', +) def get_repo_name(): """ From ef0f5481a2324a3cec28102af88cd5a5ee43af9b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Jun 2013 17:54:24 -0400 Subject: [PATCH 1203/8469] Updated release script to allow setting of the version to be released at release time (but still infer a next release). --- release.py | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/release.py b/release.py index d146de2cfc..d38903074a 100644 --- a/release.py +++ b/release.py @@ -25,24 +25,30 @@ VERSION = '0.7b5' PACKAGE_INDEX = 'https://pypi.python.org/pypi' -def get_next_version(version): +def set_versions(): + global VERSION + version = raw_input("Release as version [%s]> " % VERSION) + if version != VERSION: + VERSION = bump_versions(version) + +def infer_next_version(version): """ Infer a next version from the current version by incrementing the last number or appending a number. - >>> get_next_version('1.0') + >>> infer_next_version('1.0') '1.1' - >>> get_next_version('1.0b') + >>> infer_next_version('1.0b') '1.0b1' - >>> get_next_version('1.0.9') + >>> infer_next_version('1.0.9') '1.0.10' - >>> get_next_version('1') + >>> infer_next_version('1') '2' - >>> get_next_version('') + >>> infer_next_version('') '1' """ def incr(match): @@ -50,8 +56,6 @@ def incr(match): return str(ver + 1) return re.sub('\d*$', incr, version) -NEXT_VERSION = get_next_version(VERSION) - files_with_versions = ( 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'README.txt', ) @@ -85,7 +89,7 @@ def get_mercurial_creds(system='https://bitbucket.org', username=None): Credential = collections.namedtuple('Credential', 'username password') return Credential(username, password) -def add_milestone_and_version(version=NEXT_VERSION): +def add_milestone_and_version(version): auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip() headers = { 'Authorization': auth, @@ -101,12 +105,17 @@ def add_milestone_and_version(version=NEXT_VERSION): except urllib2.HTTPError as e: print(e.fp.read()) -def bump_versions(): - list(map(bump_version, files_with_versions)) +def bump_versions(target_ver): + for filename in files_with_versions: + bump_version(filename, target_ver) + subprocess.check_call(['hg', 'ci', '-m', + 'Bumped to {target_ver} in preparation for next ' + 'release.'.format(**vars())]) + return target_ver -def bump_version(filename): +def bump_version(filename, target_ver): with open(filename, 'rb') as f: - lines = [line.replace(VERSION, NEXT_VERSION) for line in f] + lines = [line.replace(VERSION, target_ver) for line in f] with open(filename, 'wb') as f: f.writelines(lines) @@ -116,6 +125,8 @@ def do_release(): assert has_sphinx(), "You must have Sphinx installed to release" + set_versions() + res = raw_input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) @@ -140,15 +151,12 @@ def do_release(): subprocess.check_call(['hg', 'update']) # we just tagged the current version, bump for the next release. - bump_versions() - subprocess.check_call(['hg', 'ci', '-m', - 'Bumped to {NEXT_VERSION} in preparation for next ' - 'release.'.format(**globals())]) + next_ver = bump_versions(infer_next_version(VERSION)) # push the changes subprocess.check_call(['hg', 'push']) - add_milestone_and_version() + add_milestone_and_version(next_ver) def upload_to_pypi(): linkify('CHANGES.txt', 'CHANGES (links).txt') From d3b8352bccc50525a050238904cef9385650c01c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 09:54:33 -0400 Subject: [PATCH 1204/8469] Refactor docs to describe uninstallation in a single section. --- README.txt | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/README.txt b/README.txt index d2136b2ce5..f6827e4963 100755 --- a/README.txt +++ b/README.txt @@ -13,10 +13,7 @@ Upgrading from Distribute ========================= Currently, Distribute disallows installing Setuptools 0.7 over Distribute. -You must first uninstall any active version of Distribute first. One way to -do this is to remove all ``setuptools*`` and ``distribute*`` from your -``site-packgaes`` directory. - +You must first uninstall any active version of Distribute first. Upgrading from Setuptools 0.6 ============================= @@ -33,16 +30,7 @@ file and install it for you. .. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py -For best results, regardless of what sort of Python you're using, if you've -previously installed older versions of setuptools or distribute, please delete -all ``setuptools*.egg``, ``distribute*.egg``, and ``setuptools.pth`` files and -directories from your system's ``site-packages`` directory -(and any other ``sys.path`` directories) FIRST. - -If you are upgrading a previous version of setuptools that was installed using -an ``.exe`` installer, please be sure to also *uninstall that older version* -via your system's "Add/Remove Programs" feature, BEFORE installing the newer -version. +For best results, uninstall previous versions FIRST. Once installation is complete, you will find an ``easy_install.exe`` program in your Python ``Scripts`` subdirectory. For simple invocation and best results, @@ -102,6 +90,23 @@ is available from the `Bitbucket repo`_, and in-development versions of the .. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev .. _0.6 branch: https://bitbucket.org/pypa/setuptools/get/setuptools-0.6.tar.gz#egg=setuptools-dev06 +Uninstalling +============ + +On Windows, if Setuptools was installed using an ``.exe`` or ``.msi`` +installer, simply use the uninstall feature of "Add/Remove Programs" in the +Control Panel. + +Otherwise, to uninstall Setuptools or Distribute, regardless of the Python +version, delete all ``setuptools*`` and ``distribute*`` files and +directories from your system's ``site-packages`` directory +(and any other ``sys.path`` directories) FIRST. + +If you are upgrading or otherwise plan to re-install Setuptools or Distribute, +nothing further needs to be done. If you want to completely remove Setuptools, +you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts +and associated executables installed to the Python scripts directory. + -------------------------------- Using Setuptools and EasyInstall -------------------------------- From dc25db5fb15a3b8e11667ee9ea8ec1457c99797f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 09:57:07 -0400 Subject: [PATCH 1205/8469] Restored egg-link for setuptools 0.6 to minimize flux for setuptools 0.6 users. --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index f6827e4963..99dda8dceb 100755 --- a/README.txt +++ b/README.txt @@ -88,7 +88,7 @@ is available from the `Bitbucket repo`_, and in-development versions of the `0.6 branch`_ are available as well. .. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev -.. _0.6 branch: https://bitbucket.org/pypa/setuptools/get/setuptools-0.6.tar.gz#egg=setuptools-dev06 +.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 Uninstalling ============ From 35657c3486bf9943c3d31ffc2e61e18cdd4b9332 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 10:36:22 -0400 Subject: [PATCH 1206/8469] Add links to Uninstalling section --- README.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 99dda8dceb..215337168d 100755 --- a/README.txt +++ b/README.txt @@ -13,7 +13,8 @@ Upgrading from Distribute ========================= Currently, Distribute disallows installing Setuptools 0.7 over Distribute. -You must first uninstall any active version of Distribute first. +You must first uninstall any active version of Distribute first (see +`Uninstalling`_). Upgrading from Setuptools 0.6 ============================= @@ -30,7 +31,7 @@ file and install it for you. .. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py -For best results, uninstall previous versions FIRST. +For best results, uninstall previous versions FIRST (see `Uninstalling`_). Once installation is complete, you will find an ``easy_install.exe`` program in your Python ``Scripts`` subdirectory. For simple invocation and best results, From 87818a14ed9897a88737f287b634191337a2ed2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 10:46:47 -0400 Subject: [PATCH 1207/8469] Bumped to 0.7 in preparation for next release. --- README.txt | 6 +++--- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 215337168d..1003cf570e 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7b5/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py > python ez_setup.py --user diff --git a/docs/conf.py b/docs/conf.py index 8cd3b069dc..f38127c081 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7b5' +version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.7b5' +release = '0.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 6f401d9d90..0a4bf346cf 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7b5" +DEFAULT_VERSION = "0.7" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index d38903074a..ee69487584 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7b5' +VERSION = '0.7' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index e05e5957bf..7de1025f09 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7b5" +VERSION = "0.7" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 9f551f0f9eda458347a802a7e7c616035c44d0b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 10:48:15 -0400 Subject: [PATCH 1208/8469] Added tag 0.7 for changeset 7f2c08e9ca22 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3795b833bb..11c91397dd 100644 --- a/.hgtags +++ b/.hgtags @@ -59,3 +59,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 53b4ac9a748aa28893aaca42c41e5e99568667bb 0.7b4 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 +7f2c08e9ca22023d1499c512fccc1513813b7dc4 0.7 From ccc570ac00b66b799cd8e626543340786df1bcd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Jun 2013 11:37:26 -0400 Subject: [PATCH 1209/8469] Bumped to 0.7.1 in preparation for next release. --- README.txt | 10 ++-- docs/conf.py | 4 +- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools.egg-info/entry_points.txt | 70 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 +++--- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/README.txt b/README.txt index 1003cf570e..39f35cf51e 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7 over Distribute. +Currently, Distribute disallows installing Setuptools 0.7.1 over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.1$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index f38127c081..61775604d9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7' +version = '0.7.1' # The full version, including alpha/beta/rc tags. -release = '0.7' +release = '0.7.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 0a4bf346cf..5a0af32c5f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7" +DEFAULT_VERSION = "0.7.1" DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index ee69487584..0332bf15a3 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7' +VERSION = '0.7.1' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index 7de1025f09..d6322004dc 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7" +VERSION = "0.7.1" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 663882d630..f101286d2b 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ [distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist +install_scripts = setuptools.command.install_scripts:install_scripts +alias = setuptools.command.alias:alias saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install = setuptools.command.install:install easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +egg_info = setuptools.command.egg_info:egg_info +build_ext = setuptools.command.build_ext:build_ext +setopt = setuptools.command.setopt:setopt +develop = setuptools.command.develop:develop bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test +install_egg_info = setuptools.command.install_egg_info:install_egg_info +register = setuptools.command.register:register +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist +test = setuptools.command.test:test +rotate = setuptools.command.rotate:rotate [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool use_2to3_fixers = setuptools.dist:assert_string_list include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite +packages = setuptools.dist:check_packages eager_resources = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements +exclude_package_data = setuptools.dist:check_package_data zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 91d84d9ca8..2f2a364fa2 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [certs] certifi==0.0.8 +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ssl==1.16 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file From ef75b8b873d459003cbf90d320d5941cc82f9405 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 10:56:14 -0400 Subject: [PATCH 1210/8469] Correct pkg_resources reference again (broken in e002a2ff195b) --- setuptools/ssl_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 32c8ee3cd7..6dca5fab89 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -237,7 +237,7 @@ def find_ca_bundle(): if os.path.isfile(cert_path): return cert_path try: - return resource_filename('certifi', 'cacert.pem') + return pkg_resources.resource_filename('certifi', 'cacert.pem') except (ImportError, ResolutionError, ExtractionError): return None From ee9f6452378fe46b0cef14ceee7a83a4922505dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 10:57:28 -0400 Subject: [PATCH 1211/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 74e28d6e06..bd1e29da2d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.1 +----- + +* Fix NameError (Issue #3) again - broken in bad merge. + --- 0.7 --- From 9ca207c7fafdfae6b054077766b0df55dd95a0b6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 11:14:38 -0400 Subject: [PATCH 1212/8469] Added tag 0.7.1 for changeset 024dd30ed702 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 11c91397dd..667a02aac0 100644 --- a/.hgtags +++ b/.hgtags @@ -60,3 +60,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 53b4ac9a748aa28893aaca42c41e5e99568667bb 0.7b4 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 7f2c08e9ca22023d1499c512fccc1513813b7dc4 0.7 +024dd30ed702135f5328975042566e48cc479d7d 0.7.1 From c5e74cbc8d7a3899f1f276be59d2a7b52e551eab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 11:18:47 -0400 Subject: [PATCH 1213/8469] Use https in ez_setup (fixes #10) --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 70 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 +++--- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5a0af32c5f..cb1ee506a2 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ USER_SITE = None DEFAULT_VERSION = "0.7.1" -DEFAULT_URL = "http://pypi.python.org/packages/source/s/setuptools/" +DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): args = (sys.executable,) + args diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index f101286d2b..663882d630 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ [distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt build_py = setuptools.command.build_py:build_py -sdist = setuptools.command.sdist:sdist -install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias saveopts = setuptools.command.saveopts:saveopts -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install = setuptools.command.install:install -easy_install = setuptools.command.easy_install:easy_install egg_info = setuptools.command.egg_info:egg_info -build_ext = setuptools.command.build_ext:build_ext -setopt = setuptools.command.setopt:setopt -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_egg_info = setuptools.command.install_egg_info:install_egg_info register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install_lib = setuptools.command.install_lib:install_lib +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install test = setuptools.command.test:test -rotate = setuptools.command.rotate:rotate +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist [egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages -eager_resources = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -exclude_package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data namespace_packages = setuptools.dist:check_nsp - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 2f2a364fa2..91d84d9ca8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] wincertstore==0.1 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +ctypes==1.0.2 + +[certs] +certifi==0.0.8 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file From 0bbfe3d3d2e8bbddd492b0a50793d1352a33c3cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 11:19:45 -0400 Subject: [PATCH 1214/8469] Updated changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index bd1e29da2d..a7bf1ac678 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.2 +----- + +* Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI. + ----- 0.7.1 ----- From 609e9c41cef5b938482b1f0f77334283b89b0750 Mon Sep 17 00:00:00 2001 From: pje Date: Mon, 3 Jun 2013 13:25:04 -0400 Subject: [PATCH 1215/8469] Fix missing import (grafted from 1375a2f096ce47e2b9b7b27559671a5344a1189f) --HG-- branch : setuptools-0.6 extra : source : 1375a2f096ce47e2b9b7b27559671a5344a1189f --- setuptools/ssl_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 2e615db374..f6485a69de 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,4 +1,4 @@ -import sys, os, socket, urllib2, atexit +import sys, os, socket, urllib2, atexit, re from pkg_resources import ResolutionError, ExtractionError, resource_filename try: From 6b694814e0f877a45aff1091849ec09abd8f0ed2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Jun 2013 14:20:13 -0400 Subject: [PATCH 1216/8469] Bumped to 0.7.2 in preparation for next release. --- README.txt | 10 +++++----- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index 39f35cf51e..3b7563bc3d 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7.1 over Distribute. +Currently, Distribute disallows installing Setuptools 0.7.2 over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.1/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.1$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.2$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 61775604d9..e28153942f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.1' +version = '0.7.2' # The full version, including alpha/beta/rc tags. -release = '0.7.1' +release = '0.7.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index cb1ee506a2..7f09dae453 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.1" +DEFAULT_VERSION = "0.7.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 0332bf15a3..b43233c4bb 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.1' +VERSION = '0.7.2' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index d6322004dc..d650ab752f 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.1" +VERSION = "0.7.2" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 34160eb2ed3da6bf4f57c882ccdd5d6fab3bc76b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Jun 2013 20:08:21 -0400 Subject: [PATCH 1217/8469] Resave with excess whitespace removed --- pkg_resources.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5b095562e7..ea6cf8bba5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1201,14 +1201,14 @@ def _pyimp(): elif '__pypy__' in sys.builtin_module_names: return 'PyPy' else: - return 'CPython' + return 'CPython' def invalid_marker(text): """Validate text as a PEP 426 environment marker; return exception or False""" try: evaluate_marker(text) except SyntaxError: - return sys.exc_info()[1] + return sys.exc_info()[1] return False def evaluate_marker(text, extra=None, _ops={}): @@ -1218,15 +1218,15 @@ def evaluate_marker(text, extra=None, _ops={}): from token import NAME, STRING import token, symbol, operator - + def and_test(nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! return reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - + def test(nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! return reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - + def atom(nodelist): t = nodelist[1][0] if t == token.LPAR: @@ -1234,7 +1234,7 @@ def atom(nodelist): raise SyntaxError("Empty parentheses") return interpret(nodelist[2]) raise SyntaxError("Language feature not supported in environment markers") - + def comparison(nodelist): if len(nodelist)>4: raise SyntaxError("Chained comparison not allowed in environment markers") @@ -1251,7 +1251,7 @@ def comparison(nodelist): except KeyError: raise SyntaxError(repr(cop)+" operator not allowed in environment markers") return cop(evaluate(nodelist[1]), evaluate(nodelist[3])) - + _ops.update({ symbol.test: test, symbol.and_test: and_test, symbol.atom: atom, symbol.comparison: comparison, 'not in': lambda x,y: x not in y, @@ -1268,7 +1268,7 @@ def interpret(nodelist): raise SyntaxError("Comparison or logical expression expected") raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]]) return op(nodelist) - + def evaluate(nodelist): while len(nodelist)==2: nodelist = nodelist[1] kind = nodelist[0] @@ -1289,7 +1289,7 @@ def evaluate(nodelist): return s[1:-1] raise SyntaxError("Language feature not supported in environment markers") - import parser + import parser return interpret(parser.expr(text).totuple(1)[1]) @@ -2393,7 +2393,7 @@ def _dep_map(self): reqs=[] # XXX warn elif not evaluate_marker(marker): reqs=[] - extra = safe_extra(extra) or None + extra = safe_extra(extra) or None dm.setdefault(extra,[]).extend(parse_requirements(reqs)) return dm _dep_map = property(_dep_map) From 1541dc716cc580c95883347832b689d3b8eb009b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Jun 2013 11:51:21 -0400 Subject: [PATCH 1218/8469] Use markerlib for markers in 'extras' --- CHANGES.txt | 1 + pkg_resources.py | 88 +++++------------------------------------------- 2 files changed, 10 insertions(+), 79 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a7bf1ac678..0a679ec32c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.7.2 ----- +* Issue #14: Prefer markerlib for evaluation of marker expressions in extras. * Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI. ----- diff --git a/pkg_resources.py b/pkg_resources.py index ea6cf8bba5..cdd732d2b2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1211,86 +1211,16 @@ def invalid_marker(text): return sys.exc_info()[1] return False -def evaluate_marker(text, extra=None, _ops={}): +def evaluate_marker(text): """Evaluate a PEP 426 environment marker; SyntaxError if marker is invalid""" - - if not _ops: - - from token import NAME, STRING - import token, symbol, operator - - def and_test(nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - - def test(nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - - def atom(nodelist): - t = nodelist[1][0] - if t == token.LPAR: - if nodelist[2][0] == token.RPAR: - raise SyntaxError("Empty parentheses") - return interpret(nodelist[2]) - raise SyntaxError("Language feature not supported in environment markers") - - def comparison(nodelist): - if len(nodelist)>4: - raise SyntaxError("Chained comparison not allowed in environment markers") - comp = nodelist[2][1] - cop = comp[1] - if comp[0] == NAME: - if len(nodelist[2]) == 3: - if cop == 'not': - cop = 'not in' - else: - cop = 'is not' - try: - cop = _ops[cop] - except KeyError: - raise SyntaxError(repr(cop)+" operator not allowed in environment markers") - return cop(evaluate(nodelist[1]), evaluate(nodelist[3])) - - _ops.update({ - symbol.test: test, symbol.and_test: and_test, symbol.atom: atom, - symbol.comparison: comparison, 'not in': lambda x,y: x not in y, - 'in': lambda x,y: x in y, '==': operator.eq, '!=': operator.ne, - }) - if hasattr(symbol,'or_test'): - _ops[symbol.or_test] = test - - def interpret(nodelist): - while len(nodelist)==2: nodelist = nodelist[1] - try: - op = _ops[nodelist[0]] - except KeyError: - raise SyntaxError("Comparison or logical expression expected") - raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]]) - return op(nodelist) - - def evaluate(nodelist): - while len(nodelist)==2: nodelist = nodelist[1] - kind = nodelist[0] - name = nodelist[1] - #while len(name)==2: name = name[1] - if kind==NAME: - try: - op = _marker_values[name] - except KeyError: - raise SyntaxError("Unknown name %r" % name) - return op() - if kind==STRING: - s = nodelist[1] - if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \ - or '\\' in s: - raise SyntaxError( - "Only plain strings allowed in environment markers") - return s[1:-1] - raise SyntaxError("Language feature not supported in environment markers") - - import parser - return interpret(parser.expr(text).totuple(1)[1]) + import _markerlib + # markerlib implements Metadata 1.2 (PEP 345) environment markers. + # Translate the variables to Metadata 2.0 (PEP 426). + env = _markerlib.default_environment() + for key in env.keys(): + new_key = key.replace('.', '_') + env[new_key] = env.pop(key) + return _markerlib.interpret(text, env) class NullProvider: From 468bb206e7a97aecb6df3cfec463b77c94acaf9c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Jun 2013 12:08:18 -0400 Subject: [PATCH 1219/8469] Expand documentation on evaluate_marker and indicate its legacy status. --- pkg_resources.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index ea6cf8bba5..4dbbba59d1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1211,8 +1211,16 @@ def invalid_marker(text): return sys.exc_info()[1] return False -def evaluate_marker(text, extra=None, _ops={}): - """Evaluate a PEP 426 environment marker; SyntaxError if marker is invalid""" +def _evaluate_marker_legacy(text, extra=None, _ops={}): + """ + Evaluate a PEP 426 environment marker on CPython 2.4+. + Return a boolean indicating the marker result in this environment. + Raise SyntaxError if marker is invalid. + + This implementation uses the 'parser' module, which is not implemented on + Jython and has been superseded by the 'ast' module in Python 2.6 and + later. + """ if not _ops: @@ -1292,6 +1300,7 @@ def evaluate(nodelist): import parser return interpret(parser.expr(text).totuple(1)[1]) +evaluate_marker = _evaluate_marker_legacy class NullProvider: """Try to implement resources and metadata for arbitrary PEP 302 loaders""" From 0cfd8865097b9093ee1fd50c49ceabad411c885e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Jun 2013 16:04:12 -0400 Subject: [PATCH 1220/8469] Translate NameError into SyntaxError to meet prescribed API --HG-- extra : histedit_source : 6ed89212bff75512c980d3fc0f98117510f3b576 --- pkg_resources.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4225ae55f8..83901bb897 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1316,7 +1316,12 @@ def evaluate_marker(text): for key in env.keys(): new_key = key.replace('.', '_') env[new_key] = env.pop(key) - return _markerlib.interpret(text, env) + try: + result = _markerlib.interpret(text, env) + except NameError: + e = sys.exc_info()[1] + raise SyntaxError(e.args[0]) + return result # support marker evaluation on Python 2.4+ if sys.version_info < (2,6) and _pyimp() == 'CPython': From 7ae6e5e399dfd2274395aa11570184e47ee7144e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 09:23:43 -0400 Subject: [PATCH 1221/8469] Prefer local implementation to markerlib implementation as markerlib implementation is not as complete. --HG-- extra : histedit_source : 3855347db7042dc34032b6bfa7b4c4e5239c1c3f --- CHANGES.txt | 4 +--- pkg_resources.py | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 01c70cce3a..34177d6347 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,9 +6,7 @@ CHANGES 0.7.2 ----- -* Issue #14: Prefer markerlib for evaluation of marker expressions in extras. - Fall back to implementation based on 'parser' for Python 2.5 and 2.4 - clients. +* Issue #14: Use markerlib when the `parser` module is not available. * Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI. ----- diff --git a/pkg_resources.py b/pkg_resources.py index 83901bb897..1706dcd42f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -39,6 +39,11 @@ else: importlib_bootstrap = None +try: + import parser +except ImportError: + pass + def _bypass_ensure_directory(name, mode=0777): # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: @@ -1211,7 +1216,7 @@ def invalid_marker(text): return sys.exc_info()[1] return False -def _evaluate_marker_legacy(text, extra=None, _ops={}): +def evaluate_marker(text, extra=None, _ops={}): """ Evaluate a PEP 426 environment marker on CPython 2.4+. Return a boolean indicating the marker result in this environment. @@ -1297,17 +1302,13 @@ def evaluate(nodelist): return s[1:-1] raise SyntaxError("Language feature not supported in environment markers") - import parser return interpret(parser.expr(text).totuple(1)[1]) -def evaluate_marker(text): +def _markerlib_evaluate(text): """ - Evaluate a PEP 426 environment marker. + Evaluate a PEP 426 environment marker using markerlib. Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. - - Note the implementation is incomplete as it does not support parentheses - for grouping. """ import _markerlib # markerlib implements Metadata 1.2 (PEP 345) environment markers. @@ -1323,9 +1324,10 @@ def evaluate_marker(text): raise SyntaxError(e.args[0]) return result -# support marker evaluation on Python 2.4+ -if sys.version_info < (2,6) and _pyimp() == 'CPython': - evaluate_marker = _evaluate_marker_legacy +if 'parser' not in globals(): + # fallback to less-complete _markerlib implementation if 'parser' module + # is not available. + evaluate_marker = _markerlib_evaluate class NullProvider: """Try to implement resources and metadata for arbitrary PEP 302 loaders""" From 87db22d06a93278635e4fc551872be3b40c5a249 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:03:05 -0400 Subject: [PATCH 1222/8469] Allow uploading the docs --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index b43233c4bb..70ca05abb3 100644 --- a/release.py +++ b/release.py @@ -173,7 +173,7 @@ def upload_to_pypi(): ] if has_docs: cmd.extend([ - #'upload_docs', '-r', PACKAGE_INDEX + 'upload_docs', '-r', PACKAGE_INDEX ]) subprocess.check_call(cmd) From acce77b1dfb768dd7fdec3b76dc5c64d27320f82 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:14:32 -0400 Subject: [PATCH 1223/8469] Moved MERGE.txt into the setuptools documentation. --HG-- rename : MERGE.txt => docs/merge.txt --- CHANGES.txt | 2 +- docs/index.txt | 1 + MERGE.txt => docs/merge.txt | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) rename MERGE.txt => docs/merge.txt (96%) diff --git a/CHANGES.txt b/CHANGES.txt index 34177d6347..aac22ad0ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,7 +19,7 @@ CHANGES 0.7 --- -* Merged Setuptools and Distribute. See MERGE.txt for details. +* Merged Setuptools and Distribute. See docs/merge.txt for details. Added several features that were slated for setuptools 0.6c12: diff --git a/docs/index.txt b/docs/index.txt index 21442b93b5..162a5f6f7c 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -16,6 +16,7 @@ Documentation content: .. toctree:: :maxdepth: 2 + merge roadmap python3 using diff --git a/MERGE.txt b/docs/merge.txt similarity index 96% rename from MERGE.txt rename to docs/merge.txt index 16fbdc68a6..23d1e8579f 100644 --- a/MERGE.txt +++ b/docs/merge.txt @@ -1,3 +1,9 @@ +Merge with Distribute +~~~~~~~~~~~~~~~~~~~~~ + +In 2013, the fork of Distribute was merged back into Setuptools. This +document describes some of the details of the merge. + Process ======= From cc7cbd0f79e527ba94490686a53cec6e4182384a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:18:39 -0400 Subject: [PATCH 1224/8469] Adding merge FAQ as part of the project docs. --- docs/merge-faq.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/merge-faq.txt diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt new file mode 100644 index 0000000000..db26afb937 --- /dev/null +++ b/docs/merge-faq.txt @@ -0,0 +1,44 @@ +#Where does the merge occur?# + +The merge is occurring between the heads of the default branch of Distribute and the setuptools-0.6 branch of Setuptools. The Setuptools SVN repo has been converted to a Mercurial repo hosted on Bitbucket. The work is still underway, so the exact changesets included may change, although the anticipated merge targets are Setuptools at 0.6c12 and Distribute at 0.6.35. + +#What happens to other branches?# + +Distribute 0.7 was abandoned long ago and won't be included in the resulting code tree, but may be retained for posterity in the original repo. +Setuptools default branch (also 0.7 development) may also be abandoned or may be incorporated into the new merged line if desirable (and as resources allow). + +#What history is lost/changed?# + +As setuptools was not on Mercurial when the fork occurred and as Distribute did not include the full setuptools history (prior to the creation of the setuptools-0.6 branch), the two source trees were not compatible. In order to most effectively communicate the code history, the Distribute code was grafted onto the (originally private) setuptools Mercurial repo. Although this grafting maintained the full code history with names, dates, and changes, it did lose the original hashes of those changes. Therefore, references to changes by hash (including tags) are lost. +Additionally, any heads that were not actively merged into the Distribute 0.6.35 release were also omitted. As a result, the changesets included in the merge repo are those from the original setuptools repo and all changesets ancestral to the Distribute 0.6.35 release. + +#What features will be in the merged code base?# + +In general, all "features" added in distribute will be included in setuptools. Where there exist conflicts or undesirable features, we will be explicit about what these limitations are. Changes that are backward-incompatible from setuptools 0.6 to distribute will likely be removed, and these also will be well documented. +Bootstrapping scripts (ez_setup/distribute_setup) and docs, as with distribute, will be maintained in the repository and built as part of the release process. Documentation and bootstrapping scripts will be hosted at python.org, as they are with distribute now. Documentation at telecommunity will be updated to refer or redirect to the new, merged docs. +On the whole, the merged setuptools should be largely compatible with the latest releases of both setuptools and distribute and will be an easy transition for users of either library. + +#Who is invited to contribute? Who is excluded?# + +While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. + +We have lots of ideas for how we'd like to improve the codebase, release process, everything. Like distribute, the post-merge setuptools will have its source hosted on bitbucket. (So if you're currently a distribute contributor, about the only thing that's going to change is the URL of the repository you follow.) Also like distribute, it'll support Python 3, and hopefully we'll soon merge Vinay Sajip's patches to make it run on Python 3 without needing 2to3 to be run on the code first. +While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. + +#Why Setuptools and not Distribute or another name?# + +We do, however, understand that this announcement might be unsettling for some. The setuptools name has been subjected to a lot of deprecation in recent years, so the idea that it will now be the preferred name instead of distribute might be somewhat difficult or disorienting for some. We considered use of another name (Distribute or an entirely new name), but that would serve to only complicate matters further. Instead, our goal is to simplify the packaging landscape but without losing any hard-won advancements. We hope that the people who worked to spread the first message will be equally enthusiastic about spreading the new one, and we especially look forward to seeing the new posters and slogans celebrating setuptools. + +#What is the timeframe of release?# + +There are no hard timeframes for any of this effort, although progress is underway and a draft merge is underway and being tested privately. As an unfunded volunteer effort, our time to put in on it is limited, and we've both had some recent health and other challenges that have made working on this difficult, which in part explains why we haven't met our original deadline of a completed merge before PyCon. + +The final Setuptools 0.7 was cut on June 1, 2013 and will be released to PyPI shortly thereafter. + +#What version number can I expect for the new release?# + +The new release will roughly follow the previous trend for setuptools and release the new release as 0.7. This number is somewhat arbitrary, but we wanted something other than 0.6 to distinguish it from its ancestor forks but not 1.0 to avoid putting too much emphasis on the release itself and to focus on merging the functionality. In the future, the project will likely adopt a versioning scheme similar to semver to convey semantic meaning about the release in the version number. + +#How specifically was the merge enacted?# + +Details about the actual merge process are included in the repository as MERGE.txt. From bede52c54ea4b7bd36ba5d5ce148648a7c296976 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:23:33 -0400 Subject: [PATCH 1225/8469] Reformatted faq for RST --- docs/merge-faq.txt | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt index db26afb937..c2f90e7f49 100644 --- a/docs/merge-faq.txt +++ b/docs/merge-faq.txt @@ -1,44 +1,53 @@ -#Where does the merge occur?# +Where does the merge occur? +======================================================== The merge is occurring between the heads of the default branch of Distribute and the setuptools-0.6 branch of Setuptools. The Setuptools SVN repo has been converted to a Mercurial repo hosted on Bitbucket. The work is still underway, so the exact changesets included may change, although the anticipated merge targets are Setuptools at 0.6c12 and Distribute at 0.6.35. -#What happens to other branches?# +What happens to other branches? +======================================================== Distribute 0.7 was abandoned long ago and won't be included in the resulting code tree, but may be retained for posterity in the original repo. + Setuptools default branch (also 0.7 development) may also be abandoned or may be incorporated into the new merged line if desirable (and as resources allow). -#What history is lost/changed?# +What history is lost/changed? +======================================================== As setuptools was not on Mercurial when the fork occurred and as Distribute did not include the full setuptools history (prior to the creation of the setuptools-0.6 branch), the two source trees were not compatible. In order to most effectively communicate the code history, the Distribute code was grafted onto the (originally private) setuptools Mercurial repo. Although this grafting maintained the full code history with names, dates, and changes, it did lose the original hashes of those changes. Therefore, references to changes by hash (including tags) are lost. + Additionally, any heads that were not actively merged into the Distribute 0.6.35 release were also omitted. As a result, the changesets included in the merge repo are those from the original setuptools repo and all changesets ancestral to the Distribute 0.6.35 release. -#What features will be in the merged code base?# +What features will be in the merged code base? +======================================================== In general, all "features" added in distribute will be included in setuptools. Where there exist conflicts or undesirable features, we will be explicit about what these limitations are. Changes that are backward-incompatible from setuptools 0.6 to distribute will likely be removed, and these also will be well documented. + Bootstrapping scripts (ez_setup/distribute_setup) and docs, as with distribute, will be maintained in the repository and built as part of the release process. Documentation and bootstrapping scripts will be hosted at python.org, as they are with distribute now. Documentation at telecommunity will be updated to refer or redirect to the new, merged docs. + On the whole, the merged setuptools should be largely compatible with the latest releases of both setuptools and distribute and will be an easy transition for users of either library. -#Who is invited to contribute? Who is excluded?# +Who is invited to contribute? Who is excluded? +======================================================== While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. We have lots of ideas for how we'd like to improve the codebase, release process, everything. Like distribute, the post-merge setuptools will have its source hosted on bitbucket. (So if you're currently a distribute contributor, about the only thing that's going to change is the URL of the repository you follow.) Also like distribute, it'll support Python 3, and hopefully we'll soon merge Vinay Sajip's patches to make it run on Python 3 without needing 2to3 to be run on the code first. + While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. -#Why Setuptools and not Distribute or another name?# +Why Setuptools and not Distribute or another name? +======================================================== We do, however, understand that this announcement might be unsettling for some. The setuptools name has been subjected to a lot of deprecation in recent years, so the idea that it will now be the preferred name instead of distribute might be somewhat difficult or disorienting for some. We considered use of another name (Distribute or an entirely new name), but that would serve to only complicate matters further. Instead, our goal is to simplify the packaging landscape but without losing any hard-won advancements. We hope that the people who worked to spread the first message will be equally enthusiastic about spreading the new one, and we especially look forward to seeing the new posters and slogans celebrating setuptools. -#What is the timeframe of release?# +What is the timeframe of release? +======================================================== There are no hard timeframes for any of this effort, although progress is underway and a draft merge is underway and being tested privately. As an unfunded volunteer effort, our time to put in on it is limited, and we've both had some recent health and other challenges that have made working on this difficult, which in part explains why we haven't met our original deadline of a completed merge before PyCon. The final Setuptools 0.7 was cut on June 1, 2013 and will be released to PyPI shortly thereafter. -#What version number can I expect for the new release?# +What version number can I expect for the new release? +======================================================== The new release will roughly follow the previous trend for setuptools and release the new release as 0.7. This number is somewhat arbitrary, but we wanted something other than 0.6 to distinguish it from its ancestor forks but not 1.0 to avoid putting too much emphasis on the release itself and to focus on merging the functionality. In the future, the project will likely adopt a versioning scheme similar to semver to convey semantic meaning about the release in the version number. - -#How specifically was the merge enacted?# - -Details about the actual merge process are included in the repository as MERGE.txt. From 5c041343fab9b643998e4390e109f69171841d94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:26:56 -0400 Subject: [PATCH 1226/8469] Add heading --- docs/merge-faq.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt index c2f90e7f49..65fce3c0ba 100644 --- a/docs/merge-faq.txt +++ b/docs/merge-faq.txt @@ -1,3 +1,6 @@ +Setuptools/Distribute Merge FAQ +------------------------------- + Where does the merge occur? ======================================================== From 6790d075bfbe3723fd1ac88e202938f63edde164 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:29:25 -0400 Subject: [PATCH 1227/8469] Linked FAQ --- docs/merge.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/merge.txt b/docs/merge.txt index 23d1e8579f..ba37d6e4ca 100644 --- a/docs/merge.txt +++ b/docs/merge.txt @@ -4,6 +4,11 @@ Merge with Distribute In 2013, the fork of Distribute was merged back into Setuptools. This document describes some of the details of the merge. +.. toctree:: + :maxdepth: 2 + + merge-faq + Process ======= From 50e511b8292c08d1cf049e7f4060014491579ea1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 10:51:47 -0400 Subject: [PATCH 1228/8469] Added sections on upgrading --- docs/merge-faq.txt | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt index 65fce3c0ba..520130985e 100644 --- a/docs/merge-faq.txt +++ b/docs/merge-faq.txt @@ -1,5 +1,29 @@ Setuptools/Distribute Merge FAQ -------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +How do I upgrade from Distribute? +================================= + +Distribute specifically prohibits installation of Setuptools 0.7 from Distribute 0.6. There are then two options for upgrading. + +Note that after upgrading using either technique, the only option to downgrade to either version is to completely uninstall Distribute and Setuptools 0.7 versions before reinstalling an 0.6 release. + +Use Distribute 0.7 +------------------ + +The PYPA has put together a compatibility wrapper, a new release of Distribute version 0.7. This package will install over Distribute 0.6.x installations and will replace Distribute with a simple wrapper that requires Setuptools 0.7 or later. This technique is experimental, but initial results indicate this technique is the easiest upgrade path. + + +Uninstall +--------- + +First, completely uninstall Distribute. Since Distribute does not have an automated installation routine, this process is manual. Follow the instructions in the README for uninstalling. + + +How do I upgrade from Setuptools 0.6? +===================================== + +There are no special instructions for upgrading over older versions of Setuptools. Simply use `easy_install -U` or run the latest `ez_setup.py`. Where does the merge occur? ======================================================== From 248d2bf54df0e592505508b9523b4102a3ca7cdd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 11:01:15 -0400 Subject: [PATCH 1229/8469] Fix 'set_versions' --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 70ca05abb3..733314376b 100644 --- a/release.py +++ b/release.py @@ -27,7 +27,7 @@ def set_versions(): global VERSION - version = raw_input("Release as version [%s]> " % VERSION) + version = raw_input("Release as version [%s]> " % VERSION) or VERSION if version != VERSION: VERSION = bump_versions(version) From ffa2bfc63255aba2d74bbd89ee4c95be92d09b56 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 11:01:23 -0400 Subject: [PATCH 1230/8469] Added tag 0.7.2 for changeset d04c05f035e3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 667a02aac0..e08a06c209 100644 --- a/.hgtags +++ b/.hgtags @@ -61,3 +61,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 7f2c08e9ca22023d1499c512fccc1513813b7dc4 0.7 024dd30ed702135f5328975042566e48cc479d7d 0.7.1 +d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 From 91c8bc673be3727f707f58251afa6a35bb6da3d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 11:01:36 -0400 Subject: [PATCH 1231/8469] Bumped to 0.7.3 in preparation for next release. --- README.txt | 10 +++++----- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index 3b7563bc3d..b4a2383074 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7.2 over Distribute. +Currently, Distribute disallows installing Setuptools 0.7.3 over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.2$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.3$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index e28153942f..3861b79a55 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.2' +version = '0.7.3' # The full version, including alpha/beta/rc tags. -release = '0.7.2' +release = '0.7.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 7f09dae453..ba0d781e7d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.2" +DEFAULT_VERSION = "0.7.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 733314376b..0e3cd34f5a 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.2' +VERSION = '0.7.3' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index d650ab752f..1433bb2f68 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.2" +VERSION = "0.7.3" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 74264d3bf2de7cc80b084639e427b7d3127601d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 22:10:49 -0400 Subject: [PATCH 1232/8469] Bump version so it's reported correctly --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 414b4b5de1..0f29f575e5 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7' +__version__ = '0.7.3' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 4e455160ca42bc6cf1eb628de5f2098120fbf03f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Jun 2013 22:11:38 -0400 Subject: [PATCH 1233/8469] Add __init__.py to the list of 'files with versions' --- release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/release.py b/release.py index 0e3cd34f5a..0136c4b78f 100644 --- a/release.py +++ b/release.py @@ -58,6 +58,7 @@ def incr(match): files_with_versions = ( 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'README.txt', + 'setuptools/__init__.py', ) def get_repo_name(): From fbbc3e1980d80e113852951f36aaaccc72c57c9e Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 11 Jun 2013 08:50:52 +0200 Subject: [PATCH 1234/8469] Update some URLs. --- DEVGUIDE.txt | 2 +- README.txt | 2 +- docs/_templates/indexsidebar.html | 4 ++-- docs/easy_install.txt | 8 ++++---- docs/setuptools.txt | 6 +++--- release.py | 2 +- setup.py | 14 +++++++------- setuptools/command/upload.py | 2 +- setuptools/tests/test_packageindex.py | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index db556480e7..f96d811556 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -6,7 +6,7 @@ Setuptools is developed using the DVCS Mercurial. Grab the code at bitbucket:: - $ hg clone https://bitbucket.org/jaraco/setuptools + $ hg clone https://bitbucket.org/pypa/setuptools If you want to contribute changes, we recommend you fork the repository on bitbucket, commit the changes to your repository, and then make a pull request diff --git a/README.txt b/README.txt index b4a2383074..23627e6660 100755 --- a/README.txt +++ b/README.txt @@ -82,7 +82,7 @@ Downloads All setuptools downloads can be found at `the project's home page in the Python Package Index`_. Scroll to the very bottom of the page to find the links. -.. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files +.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools In addition to the PyPI downloads, the development version of ``setuptools`` is available from the `Bitbucket repo`_, and in-development versions of the diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 9d49ae5dc2..a27c85fefd 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -1,8 +1,8 @@

Download

Current version: {{ version }}

-

Get Setuptools from the Python Package Index +

Get Setuptools from the Python Package Index

Questions? Suggestions? Contributions?

-

Visit the Setuptools project page

+

Visit the Setuptools project page

diff --git a/docs/easy_install.txt b/docs/easy_install.txt index dac0fa8fcb..12bc73ea87 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -31,7 +31,7 @@ Using "Easy Install" Installing "Easy Install" ------------------------- -Please see the `setuptools PyPI page `_ +Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. @@ -806,7 +806,7 @@ Command-Line Options ``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) Specifies the base URL of the Python Package Index. The default is - http://pypi.python.org/simple if not specified. When a package is requested + https://pypi.python.org/simple if not specified. When a package is requested that is not locally available or linked from a ``--find-links`` download page, the package index will be searched for download pages for the needed package, and those download pages will be searched for links to download @@ -995,7 +995,7 @@ that the User installation scheme alone does not provide, e.g. the ability to hi Please refer to the `virtualenv`_ documentation for more details. -.. _virtualenv: http://pypi.python.org/pypi/virtualenv +.. _virtualenv: https://pypi.python.org/pypi/virtualenv @@ -1128,7 +1128,7 @@ History 0.6c7 * ``ftp:`` download URLs now work correctly. - * The default ``--index-url`` is now ``http://pypi.python.org/simple``, to use + * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use the Python Package Index's new simpler (and faster!) REST API. 0.6c6 diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2504dcda17..543141f7ed 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -15,7 +15,7 @@ including just a single `bootstrap module`_ (an 8K .py file), your package will automatically download and install ``setuptools`` if the user is building your package from source and doesn't have a suitable version already installed. -.. _bootstrap module: http://bitbucket.org/jaraco/setuptools/downloads/ez_setup.py +.. _bootstrap module: https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py Feature Highlights: @@ -2406,7 +2406,7 @@ The ``upload`` command has a few options worth noting: ``--repository=URL, -r URL`` The URL of the repository to upload to. Defaults to - http://pypi.python.org/pypi (i.e., the main PyPI installation). + https://pypi.python.org/pypi (i.e., the main PyPI installation). .. _upload_docs: @@ -2468,7 +2468,7 @@ The ``upload_docs`` command has the following options: ``--repository=URL, -r URL`` The URL of the repository to upload to. Defaults to - http://pypi.python.org/pypi (i.e., the main PyPI installation). + https://pypi.python.org/pypi (i.e., the main PyPI installation). -------------------------------- diff --git a/release.py b/release.py index 0136c4b78f..632bf4cb38 100644 --- a/release.py +++ b/release.py @@ -234,7 +234,7 @@ def _linkified_text(rst_content): anchors = sorted(anchors) - bitroot = 'http://bitbucket.org/tarek/distribute' + bitroot = 'https://bitbucket.org/tarek/distribute' rst_content += "\n" for x in anchors: issue = re.findall(r'\d+', x)[0] diff --git a/setup.py b/setup.py index 1433bb2f68..4ea6ad00d9 100755 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ def run(self): license="PSF or ZPL", long_description = long_description, keywords = "CPAN PyPI distutils eggs package management", - url = "http://pypi.python.org/pypi/setuptools", + url = "https://pypi.python.org/pypi/setuptools", test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), @@ -210,12 +210,12 @@ def run(self): "certs": "certifi==0.0.8", }, dependency_links = [ - 'http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', - 'http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', - 'http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', - 'http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', - 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', - 'http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', + 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', + 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', + 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', + 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', + 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', ], scripts = [], # tests_require = "setuptools[ssl]", diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 21b9615c42..4b500f68c5 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -23,7 +23,7 @@ class upload(Command): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' user_options = [ ('repository=', 'r', diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index ad856e81f5..1060e787a5 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -97,7 +97,7 @@ def test_links_priority(self): """ Download links from the pypi simple index should be used before external download links. - http://bitbucket.org/tarek/distribute/issue/163/md5-validation-error + https://bitbucket.org/tarek/distribute/issue/163 Usecase : - someone uploads a package on pypi, a md5 is generated From 8385649c3afa07a8bc4924a5ad6572227bef0d29 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 11 Jun 2013 09:10:33 +0200 Subject: [PATCH 1235/8469] Update some URLs (packages.python.org -> pythonhosted.org). --- CHANGES.txt | 2 +- docs/setuptools.txt | 2 +- setuptools/command/easy_install.py | 6 +++--- setuptools/command/upload_docs.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index aac22ad0ce..c56a917b75 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -495,7 +495,7 @@ how it parses version numbers. This closes issue #52. * Added an upload_docs command to easily upload project documentation to - PyPI's http://packages.python.org. This close issue #56. + PyPI's https://pythonhosted.org. This close issue #56. * Fixed a bootstrap bug on the use_setuptools() API. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 543141f7ed..5d80b23096 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2414,7 +2414,7 @@ The ``upload`` command has a few options worth noting: ====================================================== PyPI now supports uploading project documentation to the dedicated URL -http://packages.python.org//. +https://pythonhosted.org//. The ``upload_docs`` command will create the necessary zip file out of a documentation directory and will post to the repository. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f29faf9d0c..b90fee0a03 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -7,7 +7,7 @@ packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ http://packages.python.org/setuptools/easy_install.html +__ https://pythonhosted.org/setuptools/easy_install.html """ import sys @@ -467,7 +467,7 @@ def cant_write_to_target(self): For information on other options, you may wish to consult the documentation at: - http://packages.python.org/setuptools/easy_install.html + https://pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. """ @@ -1254,7 +1254,7 @@ def no_default_version_msg(self): * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - http://packages.python.org/setuptools/easy_install.html#custom-installation-locations + https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" % ( self.install_dir, os.environ.get('PYTHONPATH','') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 1d5a744512..6df3f394e1 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -2,7 +2,7 @@ """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to -PyPI's packages.python.org). +PyPI's pythonhosted.org). """ import os @@ -185,7 +185,7 @@ def upload_file(self, filename): elif r.status == 301: location = r.getheader('Location') if location is None: - location = 'http://packages.python.org/%s/' % meta.get_name() + location = 'https://pythonhosted.org/%s/' % meta.get_name() self.announce('Upload successful. Visit %s' % location, log.INFO) else: From 91054c5ec0c8783b017e3874132c0c3e691272c9 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 11 Jun 2013 09:29:22 +0200 Subject: [PATCH 1236/8469] Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT. --- CHANGES.txt | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c56a917b75..0bda615353 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.7.3 +----- + +* Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment + variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT. + ----- 0.7.2 ----- diff --git a/setup.py b/setup.py index 4ea6ad00d9..d788f7a8f6 100755 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ scripts = [] console_scripts = ["easy_install = setuptools.command.easy_install:main"] -if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: +if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) # specific command that is used to generate windows .exe files From 0dfd7768a9a75bec3c2592b8d0b2a4fed4d825ab Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 12 Jun 2013 02:21:08 +0200 Subject: [PATCH 1237/8469] Issue #1: Disable installation of Windows-specific files on non-Windows systems. --- CHANGES.txt | 1 + setup.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0bda615353..9b1e48d94f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT. +* Issue #1: Disable installation of Windows-specific files on non-Windows systems. ----- 0.7.2 diff --git a/setup.py b/setup.py index d788f7a8f6..1260b17299 100755 --- a/setup.py +++ b/setup.py @@ -118,6 +118,11 @@ def run(self): readme_file.close() changes_file.close() +package_data = {'setuptools': ['site-patch.py']} +if sys.platform == 'win32': + package_data.setdefault('setuptools', []).extend(['*.exe']) + package_data.setdefault('setuptools.command', []).extend(['*.xml']) + dist = setup( name="setuptools", version=VERSION, @@ -132,7 +137,7 @@ def run(self): test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), - package_data = {'setuptools':['*.exe', 'site-patch.py'], 'setuptools.command':['*.xml']}, + package_data = package_data, py_modules = ['pkg_resources', 'easy_install'], From c04abca662dcbffd00d928e06fbf32b9f49f8e57 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 12 Jun 2013 03:53:21 +0200 Subject: [PATCH 1238/8469] Use new sysconfig module with Python 2.7 or >=3.2. --- CHANGES.txt | 1 + pkg_resources.py | 5 +++-- setuptools/command/bdist_egg.py | 12 ++++++++---- setuptools/command/build_ext.py | 24 +++++++++++++++--------- setuptools/command/easy_install.py | 18 +++++++++++++++--- 5 files changed, 42 insertions(+), 18 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9b1e48d94f..59e37ad675 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ CHANGES * Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT. * Issue #1: Disable installation of Windows-specific files on non-Windows systems. +* Use new sysconfig module with Python 2.7 or >=3.2. ----- 0.7.2 diff --git a/pkg_resources.py b/pkg_resources.py index 1706dcd42f..4d816e2ac0 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -245,9 +245,10 @@ def get_build_platform(): needs some hacks for Linux and Mac OS X. """ try: - from distutils.util import get_platform - except ImportError: + # Python 2.7 or >=3.2 from sysconfig import get_platform + except ImportError: + from distutils.util import get_platform plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index c3356bb7d0..1ba0499e92 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -7,10 +7,14 @@ from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: - from distutils.sysconfig import get_python_version, get_python_lib + # Python 2.7 or >=3.2 + from sysconfig import get_path, get_python_version + def _get_purelib(): + return get_path("purelib") except ImportError: - from sysconfig import get_python_version - from distutils.sysconfig import get_python_lib + from distutils.sysconfig import get_python_lib, get_python_version + def _get_purelib(): + return get_python_lib(False) from distutils import log from distutils.errors import DistutilsSetupError @@ -130,7 +134,7 @@ def do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir - site_packages = os.path.normcase(os.path.realpath(get_python_lib())) + site_packages = os.path.normcase(os.path.realpath(_get_purelib())) old, self.distribution.data_files = self.distribution.data_files,[] for item in old: diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index f2a53258cd..50a039ce50 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -9,9 +9,15 @@ from distutils.file_util import copy_file from setuptools.extension import Library from distutils.ccompiler import new_compiler -from distutils.sysconfig import customize_compiler, get_config_var -get_config_var("LDSHARED") # make sure _config_vars is initialized -from distutils.sysconfig import _config_vars +from distutils.sysconfig import customize_compiler +try: + # Python 2.7 or >=3.2 + from sysconfig import _CONFIG_VARS +except ImportError: + from distutils.sysconfig import get_config_var + get_config_var("LDSHARED") # make sure _config_vars is initialized + del get_config_var + from distutils.sysconfig import _config_vars as _CONFIG_VARS from distutils import log from distutils.errors import * @@ -131,16 +137,16 @@ def setup_shlib_compiler(self): compiler=self.compiler, dry_run=self.dry_run, force=self.force ) if sys.platform == "darwin": - tmp = _config_vars.copy() + tmp = _CONFIG_VARS.copy() try: # XXX Help! I don't have any idea whether these are right... - _config_vars['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" - _config_vars['CCSHARED'] = " -dynamiclib" - _config_vars['SO'] = ".dylib" + _CONFIG_VARS['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" + _CONFIG_VARS['CCSHARED'] = " -dynamiclib" + _CONFIG_VARS['SO'] = ".dylib" customize_compiler(compiler) finally: - _config_vars.clear() - _config_vars.update(tmp) + _CONFIG_VARS.clear() + _CONFIG_VARS.update(tmp) else: customize_compiler(compiler) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b90fee0a03..60b3e01104 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -25,9 +25,22 @@ from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from distutils import log, dir_util +try: + # Python 2.7 or >=3.2 + from sysconfig import get_config_vars, get_path + def _get_platlib(): + return get_path("platlib") + def _get_purelib(): + return get_path("purelib") +except ImportError: + from distutils.sysconfig import get_config_vars, get_python_lib + def _get_platlib(): + return get_python_lib(True) + def _get_purelib(): + return get_python_lib(False) + from distutils.util import get_platform from distutils.util import convert_path, subst_vars -from distutils.sysconfig import get_python_lib, get_config_vars from distutils.errors import DistutilsArgError, DistutilsOptionError, \ DistutilsError, DistutilsPlatformError from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS @@ -1398,8 +1411,7 @@ def get_site_dirs(): 'Python', sys.version[:3], 'site-packages')) - for plat_specific in (0,1): - site_lib = get_python_lib(plat_specific) + for site_lib in (_get_purelib(), _get_platlib()): if site_lib not in sitedirs: sitedirs.append(site_lib) if HAS_USER_SITE: From 8e657eac1ef02faedca99df319fff6b63f4a4305 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sat, 15 Jun 2013 15:34:53 +0100 Subject: [PATCH 1239/8469] Initial commit. All tests pass on 2.7, 3.2 and 3.3, though there are some atexit errors in the multiprocessing module in 2.7/3.2 (seemingly unrelated to setuptools). --HG-- branch : single-codebase --- .hgignore | 1 + pkg_resources.py | 69 ++++++++++++------ setup.py | 6 +- setuptools.egg-info/dependency_links.txt | 12 ++-- setuptools.egg-info/requires.txt | 14 ++-- setuptools/command/alias.py | 10 +-- setuptools/command/bdist_egg.py | 3 +- setuptools/command/easy_install.py | 53 ++++++++------ setuptools/command/egg_info.py | 11 +-- setuptools/command/install_egg_info.py | 1 + setuptools/command/install_scripts.py | 2 +- setuptools/command/rotate.py | 1 + setuptools/command/sdist.py | 2 +- setuptools/command/setopt.py | 4 +- setuptools/command/upload.py | 15 ++-- setuptools/command/upload_docs.py | 18 +++-- setuptools/compat.py | 91 ++++++++++++++++++++++++ setuptools/depends.py | 2 +- setuptools/dist.py | 9 ++- setuptools/package_index.py | 88 ++++++++++++----------- setuptools/sandbox.py | 16 +++-- setuptools/ssl_support.py | 7 +- setuptools/tests/__init__.py | 10 +-- setuptools/tests/doctest.py | 58 +++++++-------- setuptools/tests/server.py | 18 ++--- setuptools/tests/test_bdist_egg.py | 2 +- setuptools/tests/test_develop.py | 11 +-- setuptools/tests/test_easy_install.py | 18 +++-- setuptools/tests/test_packageindex.py | 23 +++--- setuptools/tests/test_resources.py | 17 ++--- setuptools/tests/test_sdist.py | 15 ++-- setuptools/tests/test_test.py | 2 +- tests/api_tests.txt | 6 +- tests/manual_test.py | 2 +- 34 files changed, 389 insertions(+), 228 deletions(-) create mode 100644 setuptools/compat.py diff --git a/.hgignore b/.hgignore index 4e5d0bcfca..56be0c948c 100644 --- a/.hgignore +++ b/.hgignore @@ -4,6 +4,7 @@ syntax: glob *.swp .coverage distribute.egg-info +setuptools.egg-info build dist lib diff --git a/pkg_resources.py b/pkg_resources.py index 4d816e2ac0..03aa75ad03 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,13 +13,41 @@ method. """ -import sys, os, time, re, imp, types, zipfile, zipimport -from urlparse import urlparse, urlunparse +import sys, os, zipfile, zipimport, time, re, imp, types +try: + from urlparse import urlparse, urlunparse +except ImportError: + from urllib.parse import urlparse, urlunparse try: frozenset except NameError: from sets import ImmutableSet as frozenset +try: + basestring + next = lambda o: o.next() + from cStringIO import StringIO + def exec_(code, globs=None, locs=None): + if globs is None: + frame = sys._getframe(1) + globs = frame.f_globals + if locs is None: + locs = frame.f_locals + del frame + elif locs is None: + locs = globs + exec("""exec code in globs, locs""") +except NameError: + basestring = str + from io import StringIO + from functools import reduce + exec_ = eval("exec") + def execfile(fn, globs=None, locs=None): + if globs is None: + globs = globals() + if locs is None: + locs = globs + exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) # capture these to bypass sandboxing from os import utime @@ -44,7 +72,7 @@ except ImportError: pass -def _bypass_ensure_directory(name, mode=0777): +def _bypass_ensure_directory(name, mode=0x1FF): # 0777 # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') @@ -58,20 +86,20 @@ def _bypass_ensure_directory(name, mode=0777): def _declare_state(vartype, **kw): g = globals() - for name, val in kw.iteritems(): + for name, val in kw.items(): g[name] = val _state_vars[name] = vartype def __getstate__(): state = {} g = globals() - for k, v in _state_vars.iteritems(): + for k, v in _state_vars.items(): state[k] = g['_sget_'+v](g[k]) return state def __setstate__(state): g = globals() - for k, v in state.iteritems(): + for k, v in state.items(): g['_sset_'+_state_vars[k]](k, g[k], v) return state @@ -650,7 +678,7 @@ def find_plugins(self, env = full_env + plugin_env shadow_set = self.__class__([]) - map(shadow_set.add, self) # put all our entries in shadow_set + list(map(shadow_set.add, self)) # put all our entries in shadow_set for project_name in plugin_projects: @@ -661,7 +689,8 @@ def find_plugins(self, try: resolvees = shadow_set.resolve(req, env, installer) - except ResolutionError,v: + except ResolutionError: + v = sys.exc_info()[1] error_info[dist] = v # save error info if fallback: continue # try the next older version of project @@ -669,7 +698,7 @@ def find_plugins(self, break # give up on this project, keep going else: - map(shadow_set.add, resolvees) + list(map(shadow_set.add, resolvees)) distributions.update(dict.fromkeys(resolvees)) # success, no need to try any more versions of this project @@ -718,7 +747,8 @@ def __getstate__(self): self.callbacks[:] ) - def __setstate__(self, (entries, keys, by_key, callbacks)): + def __setstate__(self, e_k_b_c): + entries, keys, by_key, callbacks = e_k_b_c self.entries = entries[:] self.entry_keys = keys.copy() self.by_key = by_key.copy() @@ -1029,7 +1059,7 @@ def postprocess(self, tempname, filename): if os.name == 'posix': # Make the resource executable - mode = ((os.stat(tempname).st_mode) | 0555) & 07777 + mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777 os.chmod(tempname, mode) @@ -1401,7 +1431,7 @@ def run_script(self,script_name,namespace): len(script_text), 0, script_text.split('\n'), script_filename ) script_code = compile(script_text,script_filename,'exec') - exec script_code in namespace, namespace + exec_(script_code, namespace, namespace) def _has(self, path): raise NotImplementedError( @@ -1921,7 +1951,7 @@ def StringIO(*args, **kw): try: from cStringIO import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO return StringIO(*args,**kw) def find_nothing(importer, path_item, only=False): @@ -2219,8 +2249,8 @@ def load(self, require=True, env=None, installer=None): def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) - map(working_set.add, - working_set.resolve(self.dist.requires(self.extras),env,installer)) + list(map(working_set.add, + working_set.resolve(self.dist.requires(self.extras),env,installer))) @@ -2491,7 +2521,7 @@ def __str__(self): def __getattr__(self,attr): """Delegate all unrecognized public attributes to .metadata provider""" if attr.startswith('_'): - raise AttributeError,attr + raise AttributeError(attr) return getattr(self._provider, attr) @@ -2672,7 +2702,7 @@ def _compute_dependencies(self): # Including any condition expressions for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: distvers, mark = self._preparse_requirement(req) - parsed = parse_requirements(distvers).next() + parsed = next(parse_requirements(distvers)) parsed.marker_fn = compile_marker(mark) reqs.append(parsed) @@ -2747,7 +2777,7 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): while not TERMINATOR(line,p): if CONTINUE(line,p): try: - line = lines.next(); p = 0 + line = next(lines); p = 0 except StopIteration: raise ValueError( "\\ must not appear on the last nonblank line" @@ -2976,6 +3006,5 @@ def _initialize(g): # all distributions added to the working set in the future (e.g. by # calling ``require()``) will get activated as well. add_activation_listener(lambda dist: dist.activate()) -working_set.entries=[]; map(working_set.add_entry,sys.path) # match order - +working_set.entries=[]; list(map(working_set.add_entry,sys.path)) # match order diff --git a/setup.py b/setup.py index 1260b17299..7ed396d056 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,8 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None -if sys.version_info >= (3,): +do_2to3 = False +if sys.version_info >= (3,) and do_2to3: tmp_src = os.path.join("build", "src") from distutils.filelist import FileList from distutils import dir_util, file_util, util, log @@ -75,7 +76,8 @@ def build_package_data(self): # previous version doesn't have convert_2to3_doctests) if not hasattr(self.distribution, 'convert_2to3_doctests'): continue - + if not do_2to3: + continue if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index a54d9039cc..c688b7eaab 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,6 +1,6 @@ -http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec -http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb -http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c -http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc -http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 -http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b +https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb +https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c +https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc +https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 +https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 91d84d9ca8..2f2a364fa2 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [certs] certifi==0.0.8 +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ssl==1.16 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 40c00b550b..4c08c48dad 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -43,10 +43,10 @@ def run(self): aliases = self.distribution.get_option_dict('aliases') if not self.args: - print "Command Aliases" - print "---------------" + print("Command Aliases") + print("---------------") for alias in aliases: - print "setup.py alias", format_alias(alias, aliases) + print("setup.py alias", format_alias(alias, aliases)) return elif len(self.args)==1: @@ -54,10 +54,10 @@ def run(self): if self.remove: command = None elif alias in aliases: - print "setup.py alias", format_alias(alias, aliases) + print("setup.py alias", format_alias(alias, aliases)) return else: - print "No alias definition found for %r" % alias + print("No alias definition found for %r" % alias) return else: alias = self.args[0] diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 1ba0499e92..de72ea0463 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -21,6 +21,7 @@ def _get_purelib(): from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint from types import CodeType +from setuptools.compat import basestring, next from setuptools.extension import Library def strip_module(filename): @@ -383,7 +384,7 @@ def get_ext_outputs(self): def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) - base,dirs,files = walker.next() + base,dirs,files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') yield base,dirs,files diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 60b3e01104..f71128b00f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -49,6 +49,8 @@ def _get_purelib(): from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info +from setuptools.compat import (iteritems, maxsize, xrange, basestring, unicode, + reraise) from pkg_resources import yield_lines, normalize_path, resource_string, \ ensure_directory, get_distribution, find_distributions, \ Environment, Requirement, Distribution, \ @@ -56,7 +58,10 @@ def _get_purelib(): DistributionNotFound, VersionConflict, \ DEVELOP_DIST -sys_executable = os.path.normpath(sys.executable) +if '__VENV_LAUNCHER__' in os.environ: + sys_executable = os.environ['__VENV_LAUNCHER__'] +else: + sys_executable = os.path.normpath(sys.executable) __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', @@ -215,7 +220,7 @@ def delete_blockers(self, blockers): def finalize_options(self): if self.version: - print 'setuptools %s' % get_distribution('setuptools').version + print('setuptools %s' % get_distribution('setuptools').version) sys.exit() py_version = sys.version.split()[0] @@ -395,7 +400,7 @@ def pseudo_tempname(self): try: pid = os.getpid() except: - pid = random.randint(0,sys.maxint) + pid = random.randint(0, maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) def warn_deprecated_options(self): @@ -698,11 +703,13 @@ def process_distribution(self, requirement, dist, deps=True, *info): distros = WorkingSet([]).resolve( [requirement], self.local_index, self.easy_install ) - except DistributionNotFound, e: + except DistributionNotFound: + e = sys.exc_info()[1] raise DistutilsError( "Could not find required distribution %s" % e.args ) - except VersionConflict, e: + except VersionConflict: + e = sys.exc_info()[1] raise DistutilsError( "Installed distribution %s conflicts with requirement %s" % e.args @@ -793,7 +800,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0777-mask) + chmod(target, 0o777-mask) @@ -1104,7 +1111,8 @@ def run_setup(self, setup_script, setup_base, args): ) try: run_setup(setup_script, args) - except SystemExit, v: + except SystemExit: + v = sys.exc_info()[1] raise DistutilsError("Setup script exited with %s" % (v.args[0],)) def build_and_install(self, setup_script, setup_base): @@ -1146,7 +1154,7 @@ def _set_fetcher_options(self, base): 'site_dirs', 'allow_hosts', ) fetch_options = {} - for key, val in ei_opts.iteritems(): + for key, val in iteritems(ei_opts): if key not in fetch_directives: continue fetch_options[key.replace('_', '-')] = val[1] # create a settings dictionary suitable for `edit_config` @@ -1211,7 +1219,7 @@ def pf(src,dst): self.byte_compile(to_compile) if not self.dry_run: for f in to_chmod: - mode = ((os.stat(f)[stat.ST_MODE]) | 0555) & 07755 + mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED # 0555, 07755 chmod(f, mode) def byte_compile(self, to_compile): @@ -1326,10 +1334,10 @@ def create_home_path(self): if not self.user: return home = convert_path(os.path.expanduser("~")) - for name, path in self.config_vars.iteritems(): + for name, path in iteritems(self.config_vars): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0700)" % path) - os.makedirs(path, 0700) + os.makedirs(path, 0x1C0) # 0700 @@ -1380,7 +1388,7 @@ def _expand(self, *attrs): def get_site_dirs(): # return a list of 'site' dirs - sitedirs = filter(None,os.environ.get('PYTHONPATH','').split(os.pathsep)) + sitedirs = list(filter(None,os.environ.get('PYTHONPATH','').split(os.pathsep))) prefixes = [sys.prefix] if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) @@ -1417,7 +1425,7 @@ def get_site_dirs(): if HAS_USER_SITE: sitedirs.append(site.USER_SITE) - sitedirs = map(normalize_path, sitedirs) + sitedirs = list(map(normalize_path, sitedirs)) return sitedirs @@ -1479,7 +1487,7 @@ def extract_wininst_cfg(dist_filename): return None f.seek(prepended-12) - import struct, StringIO, ConfigParser + from setuptools.compat import StringIO, ConfigParser tag, cfglen, bmlen = struct.unpack("= (3,): + if PY3: try: if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) @@ -336,7 +337,7 @@ def write_manifest (self): named by 'self.manifest'. """ # The manifest must be UTF-8 encodable. See #303. - if sys.version_info >= (3,): + if PY3: files = [] for file in self.filelist.files: try: @@ -415,7 +416,7 @@ def write_pkg_info(cmd, basename, filename): metadata.name, metadata.version = oldname, oldver safe = getattr(cmd.distribution,'zip_safe',None) - import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe) + from setuptools.command import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe) def warn_depends_obsolete(cmd, basename, filename): if os.path.exists(filename): diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index f44b34b555..87ddff9c17 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,5 +1,6 @@ from setuptools import Command from setuptools.archive_util import unpack_archive +from setuptools.compat import PY3 from distutils import log, dir_util import os, shutil, pkg_resources diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 8245603597..4e6b1a9a84 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -50,5 +50,5 @@ def write_script(self, script_name, contents, mode="t", *ignored): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0777-mask) + chmod(target, 0o777-mask) diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 11b6eae82b..b10acfb41f 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -1,5 +1,6 @@ import distutils, os from setuptools import Command +from setuptools.compat import basestring from distutils.util import convert_path from distutils import log from distutils.errors import * diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index f8f964b396..39cd604396 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -210,7 +210,7 @@ def add_defaults(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = filter(os.path.isfile, glob(pattern)) + files = list(filter(os.path.isfile, glob(pattern))) if files: self.filelist.extend(files) diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index dbf3a94ec1..aa468c88fe 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -47,9 +47,9 @@ 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 ConfigParser import RawConfigParser + from setuptools.compat import ConfigParser log.debug("Reading configuration from %s", filename) - opts = RawConfigParser() + opts = ConfigParser.RawConfigParser() opts.read([filename]) for section, options in settings.items(): if options is None: diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 4b500f68c5..7ef0e6ec58 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -13,11 +13,9 @@ import os import socket import platform -import ConfigParser -import httplib import base64 -import urlparse -import cStringIO as StringIO + +from setuptools.compat import urlparse, StringIO, httplib, ConfigParser class upload(Command): @@ -49,7 +47,7 @@ def finalize_options(self): raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) @@ -149,14 +147,14 @@ def upload_file(self, command, pyversion, filename): # We can't use urllib2 since we need to send the Basic # auth right with the first request schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) + urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': http = httplib.HTTPConnection(netloc) elif schema == 'https': http = httplib.HTTPSConnection(netloc) else: - raise AssertionError, "unsupported schema "+schema + raise AssertionError("unsupported schema " + schema) data = '' loglevel = log.INFO @@ -181,5 +179,4 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 - + print('-'*75, r.read(), '-'*75) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 6df3f394e1..0a54578904 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -8,8 +8,6 @@ import os import socket import zipfile -import httplib -import urlparse import tempfile import sys import shutil @@ -25,12 +23,19 @@ except ImportError: from setuptools.command.upload import upload +from setuptools.compat import httplib, urlparse + +if sys.version_info >= (3,): + errors = 'surrogateescape' +else: + errors = 'strict' + # This is not just a replacement for byte literals # but works as a general purpose encoder def b(s, encoding='utf-8'): if isinstance(s, unicode): - return s.encode(encoding) + return s.encode(encoding, errors) return s @@ -154,7 +159,7 @@ def upload_file(self, filename): # We can't use urllib2 since we need to send the Basic # auth right with the first request schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) + urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': conn = httplib.HTTPConnection(netloc) @@ -174,7 +179,8 @@ def upload_file(self, filename): conn.putheader('Authorization', auth) conn.endheaders() conn.send(body) - except socket.error, e: + except socket.error: + e = sys.exc_info()[1] self.announce(str(e), log.ERROR) return @@ -192,4 +198,4 @@ def upload_file(self, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 + print('-'*75, r.read(), '-'*75) diff --git a/setuptools/compat.py b/setuptools/compat.py new file mode 100644 index 0000000000..49438502fc --- /dev/null +++ b/setuptools/compat.py @@ -0,0 +1,91 @@ +import sys + +if sys.version_info[0] < 3: + PY3 = False + + basestring = basestring + import __builtin__ as builtins + import ConfigParser + from StringIO import StringIO + BytesIO = StringIO + execfile = execfile + func_code = lambda o: o.func_code + func_globals = lambda o: o.func_globals + im_func = lambda o: o.im_func + from htmlentitydefs import name2codepoint + import httplib + from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler + from SimpleHTTPServer import SimpleHTTPRequestHandler + iteritems = lambda o: o.iteritems() + long_type = long + maxsize = sys.maxint + next = lambda o: o.next() + numeric_types = (int, long, float) + reduce = reduce + unichr = unichr + unicode = unicode + from urllib import url2pathname, quote # Python 2.4 has no quote in urllib2 + import urllib2 + from urllib2 import urlopen, HTTPError, URLError, unquote, splituser + from urlparse import urlparse, urlunparse, urljoin + xrange = xrange + from itertools import ifilterfalse + + def exec_(code, globs=None, locs=None): + if globs is None: + frame = sys._getframe(1) + globs = frame.f_globals + if locs is None: + locs = frame.f_locals + del frame + elif locs is None: + locs = globs + exec("""exec code in globs, locs""") + + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb""") +else: + PY3 = True + + basestring = str + import builtins + import configparser as ConfigParser + exec_ = eval('exec') + from io import StringIO, BytesIO + func_code = lambda o: o.__code__ + func_globals = lambda o: o.__globals__ + im_func = lambda o: o.__func__ + from html.entities import name2codepoint + import http.client as httplib + from http.server import HTTPServer, SimpleHTTPRequestHandler, BaseHTTPRequestHandler + iteritems = lambda o: o.items() + long_type = int + maxsize = sys.maxsize + next = next + numeric_types = (int, float) + from functools import reduce + unichr = chr + unicode = str + from urllib.error import HTTPError, URLError + import urllib.request as urllib2 + from urllib.request import urlopen, url2pathname + from urllib.parse import urlparse, urlunparse, quote, unquote, splituser, urljoin + xrange = range + from itertools import filterfalse as ifilterfalse + + def execfile(fn, globs=None, locs=None): + if globs is None: + globs = globals() + if locs is None: + locs = globs + f = open(fn) + try: + source = f.read() + finally: + f.close() + exec_(compile(source, fn, 'exec'), globs, locs) + + def reraise(tp, value, tb=None): + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value diff --git a/setuptools/depends.py b/setuptools/depends.py index 5fdf2d7e57..f1ef2736bc 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -103,7 +103,7 @@ def _iter_code(code): ptr += 3 if op==EXTENDED_ARG: - extended_arg = arg * 65536L + extended_arg = arg * long_type(65536) continue else: diff --git a/setuptools/dist.py b/setuptools/dist.py index 907ce550e0..0188921540 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,11 +1,13 @@ __all__ = ['Distribution'] import re +import sys from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib +from setuptools.compat import numeric_types, basestring from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd @@ -100,7 +102,8 @@ def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: pkg_resources.EntryPoint.parse_map(value) - except ValueError, e: + except ValueError: + e = sys.exc_info()[1] raise DistutilsSetupError(e) def check_test_suite(dist, attr, value): @@ -264,7 +267,7 @@ def __init__ (self, attrs=None): if not hasattr(self,ep.name): setattr(self,ep.name,None) _Distribution.__init__(self,attrs) - if isinstance(self.metadata.version, (int,long,float)): + if isinstance(self.metadata.version, numeric_types): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) @@ -568,7 +571,7 @@ def _exclude_packages(self,packages): raise DistutilsSetupError( "packages: setting must be a list or tuple (%r)" % (packages,) ) - map(self.exclude_package, packages) + list(map(self.exclude_package, packages)) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4f39c70abb..5ee6fd27a6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,12 +1,14 @@ """PyPI and direct package downloading""" -import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO -import itertools -import base64 -import httplib, urllib -from setuptools import ssl_support +import sys, os.path, re, shutil, random, socket from pkg_resources import * from distutils import log from distutils.errors import DistutilsError + +from setuptools import ssl_support +from setuptools.compat import (urllib2, httplib, StringIO, HTTPError, + urlparse, urlunparse, unquote, splituser, + url2pathname, name2codepoint, ifilterfalse, + unichr, urljoin) try: from hashlib import md5 except ImportError: @@ -57,7 +59,7 @@ def parse_bdist_wininst(name): def egg_info_for_url(url): - scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) + scheme, server, path, parameters, query, fragment = urlparse(url) base = urllib2.unquote(path.split('/')[-1]) if server=='sourceforge.net' and base=='download': # XXX Yuck base = urllib2.unquote(path.split('/')[-2]) @@ -146,7 +148,7 @@ def unique_everseen(iterable, key=None): seen = set() seen_add = seen.add if key is None: - for element in itertools.ifilterfalse(seen.__contains__, iterable): + for element in ifilterfalse(seen.__contains__, iterable): seen_add(element) yield element else: @@ -178,14 +180,14 @@ def find_external_links(url, page): rels = map(str.strip, rel.lower().split(',')) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): - yield urlparse.urljoin(url, htmldecode(match.group(1))) + yield urljoin(url, htmldecode(match.group(1))) for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - yield urlparse.urljoin(url, htmldecode(match.group(1))) + yield urljoin(url, htmldecode(match.group(1))) user_agent = "Python-urllib/%s setuptools/%s" % ( sys.version[:3], require('setuptools')[0].version @@ -224,7 +226,7 @@ def process_url(self, url, retrieve=False): self.debug("Found link: %s", url) if dists or not retrieve or url in self.fetched_urls: - map(self.add, dists) + list(map(self.add, dists)) return # don't need the actual page if not self.url_ok(url): @@ -243,7 +245,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. - if isinstance(f, urllib2.HTTPError): + if isinstance(f, HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' else: @@ -251,7 +253,7 @@ def process_url(self, url, retrieve=False): page = page.decode(charset, "ignore") f.close() for match in HREF.finditer(page): - link = urlparse.urljoin(base, htmldecode(match.group(1))) + link = urljoin(base, htmldecode(match.group(1))) self.process_url(link) if url.startswith(self.index_url) and getattr(f,'code',None)!=404: page = self.process_index(url, page) @@ -270,11 +272,11 @@ def process_filename(self, fn, nested=False): dists = distros_for_filename(fn) if dists: self.debug("Found: %s", fn) - map(self.add, dists) + list(map(self.add, dists)) def url_ok(self, url, fatal=False): s = URL_SCHEME(url) - if (s and s.group(1).lower()=='file') or self.allows(urlparse.urlparse(url)[1]): + if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]): return True msg = "\nLink to % s ***BLOCKED*** by --allow-hosts\n" if fatal: @@ -290,7 +292,7 @@ def scan_egg_links(self, search_path): self.scan_egg_link(item, entry) def scan_egg_link(self, path, entry): - lines = filter(None, map(str.strip, open(os.path.join(path, entry)))) + lines = list(filter(None, map(str.strip, open(os.path.join(path, entry))))) if len(lines)==2: for dist in find_distributions(os.path.join(path, lines[0])): dist.location = os.path.join(path, *lines) @@ -302,9 +304,9 @@ def process_index(self,url,page): def scan(link): # Process a URL to see if it's for a package page if link.startswith(self.index_url): - parts = map( - urllib2.unquote, link[len(self.index_url):].split('/') - ) + parts = list(map( + unquote, link[len(self.index_url):].split('/') + )) if len(parts)==2 and '#' not in parts[1]: # it's a package page, sanitize and index it pkg = safe_name(parts[0]) @@ -316,7 +318,7 @@ def scan(link): # process an index page into the package-page index for match in HREF.finditer(page): try: - scan( urlparse.urljoin(url, htmldecode(match.group(1))) ) + scan( urljoin(url, htmldecode(match.group(1))) ) except ValueError: pass @@ -411,7 +413,7 @@ def add_find_links(self, urls): def prescan(self): """Scan urls scheduled for prescanning (e.g. --find-links)""" if self.to_scan: - map(self.scan_url, self.to_scan) + list(map(self.scan_url, self.to_scan)) self.to_scan = None # from now on, go ahead and process immediately def not_found_in_index(self, requirement): @@ -598,7 +600,7 @@ def _download_to(self, url, filename): if '#' in url: url, info = url.split('#', 1) fp = self.open_url(url) - if isinstance(fp, urllib2.HTTPError): + if isinstance(fp, HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) ) @@ -637,28 +639,33 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url, self.opener) - except (ValueError, httplib.InvalidURL), v: + except (ValueError, httplib.InvalidURL): + v = sys.exc_info()[1] msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) else: raise DistutilsError('%s %s' % (url, msg)) - except urllib2.HTTPError, v: + except urllib2.HTTPError: + v = sys.exc_info()[1] return v - except urllib2.URLError, v: + except urllib2.URLError: + v = sys.exc_info()[1] if warning: self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) - except httplib.BadStatusLine, v: + except httplib.BadStatusLine: + v = sys.exc_info()[1] if warning: self.warn(warning, v.line) else: raise DistutilsError('%s returned a bad status line. ' 'The server might be down, %s' % \ (url, v.line)) - except httplib.HTTPException, v: + except httplib.HTTPException: + v = sys.exc_info()[1] if warning: self.warn(warning, v) else: @@ -689,7 +696,7 @@ def _download_url(self, scheme, url, tmpdir): elif scheme.startswith('hg+'): return self._download_hg(url, filename) elif scheme=='file': - return urllib.url2pathname(urlparse.urlparse(url)[2]) + return url2pathname(urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) @@ -739,7 +746,7 @@ def _download_svn(self, url, filename): url = url.split('#',1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: - scheme, netloc, path, p, q, f = urlparse.urlparse(url) + scheme, netloc, path, p, q, f = urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/',1) auth, host = urllib.splituser(netloc) @@ -750,13 +757,13 @@ def _download_svn(self, url, filename): else: creds = " --username="+auth netloc = host - url = urlparse.urlunparse((scheme, netloc, url, p, q, f)) + url = urlunparse((scheme, netloc, url, p, q, f)) self.info("Doing subversion checkout from %s to %s", url, filename) os.system("svn checkout%s -q %s %s" % (creds, url, filename)) return filename def _vcs_split_rev_from_url(self, url, pop_prefix=False): - scheme, netloc, path, query, frag = urlparse.urlsplit(url) + scheme, netloc, path, query, frag = urlsplit(url) scheme = scheme.split('+', 1)[-1] @@ -768,7 +775,7 @@ def _vcs_split_rev_from_url(self, url, pop_prefix=False): path, rev = path.rsplit('@', 1) # Also, discard fragment - url = urlparse.urlunsplit((scheme, netloc, path, query, '')) + url = urlunsplit((scheme, netloc, path, query, '')) return url, rev @@ -842,7 +849,6 @@ def decode_entity(match): elif what.startswith('#'): what = int(what[1:]) else: - from htmlentitydefs import name2codepoint what = name2codepoint.get(what, match.group(0)) return uchr(what) @@ -896,7 +902,7 @@ def _encode_auth(auth): def open_with_auth(url, opener=urllib2.urlopen): """Open a urllib2 request, handling HTTP authentication""" - scheme, netloc, path, params, query, frag = urlparse.urlparse(url) + scheme, netloc, path, params, query, frag = urlparse(url) # Double scheme does not raise on Mac OS X as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. @@ -904,13 +910,13 @@ def open_with_auth(url, opener=urllib2.urlopen): raise httplib.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): - auth, host = urllib.splituser(netloc) + auth, host = splituser(netloc) else: auth = None if auth: auth = "Basic " + _encode_auth(auth) - new_url = urlparse.urlunparse((scheme,host,path,params,query,frag)) + new_url = urlunparse((scheme,host,path,params,query,frag)) request = urllib2.Request(new_url) request.add_header("Authorization", auth) else: @@ -922,9 +928,9 @@ def open_with_auth(url, opener=urllib2.urlopen): if auth: # Put authentication info back into request URL if same host, # so that links found on the page will work - s2, h2, path2, param2, query2, frag2 = urlparse.urlparse(fp.url) + s2, h2, path2, param2, query2, frag2 = urlparse(fp.url) if s2==scheme and h2==host: - fp.url = urlparse.urlunparse((s2,netloc,path2,param2,query2,frag2)) + fp.url = urlunparse((s2,netloc,path2,param2,query2,frag2)) return fp @@ -946,8 +952,8 @@ def fix_sf_url(url): def local_open(url): """Read a local path, with special support for directories""" - scheme, server, path, param, query, frag = urlparse.urlparse(url) - filename = urllib.url2pathname(path) + scheme, server, path, param, query, frag = urlparse(url) + filename = url2pathname(path) if os.path.isfile(filename): return urllib2.urlopen(url) elif path.endswith('/') and os.path.isdir(filename): @@ -968,8 +974,8 @@ def local_open(url): else: status, message, body = 404, "Path not found", "Not found" - return urllib2.HTTPError(url, status, message, - {'content-type':'text/html'}, cStringIO.StringIO(body)) + return HTTPError(url, status, message, + {'content-type':'text/html'}, StringIO(body)) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index f309512532..090cb34c3d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,4 +1,4 @@ -import os, sys, __builtin__, tempfile, operator, pkg_resources +import os, sys, tempfile, operator, pkg_resources if os.name == "java": import org.python.modules.posix.PosixModule as _os else: @@ -9,6 +9,7 @@ _file = None _open = open from distutils.errors import DistutilsError +from setuptools.compat import builtins, execfile, reduce from pkg_resources import working_set __all__ = [ @@ -69,7 +70,8 @@ def run_setup(setup_script, args): {'__file__':setup_script, '__name__':'__main__'} ) ) - except SystemExit, v: + except SystemExit: + v = sys.exc_info()[1] if v.args and v.args[0]: raise # Normal exit, just return @@ -111,15 +113,15 @@ def run(self, func): try: self._copy(self) if _file: - __builtin__.file = self._file - __builtin__.open = self._open + builtins.file = self._file + builtins.open = self._open self._active = True return func() finally: self._active = False if _file: - __builtin__.file = _file - __builtin__.open = _open + builtins.file = _file + builtins.open = _open self._copy(_os) def _mk_dual_path_wrapper(name): @@ -267,7 +269,7 @@ def _remap_pair(self,operation,src,dst,*args,**kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) - def open(self, file, flags, mode=0777): + def open(self, file, flags, mode=0x1FF): # 0777 """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 6dca5fab89..af718a4b6f 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,7 +1,12 @@ -import sys, os, socket, urllib2, atexit, re +import sys, os, socket, atexit, re import pkg_resources from pkg_resources import ResolutionError, ExtractionError +try: + import urllib2 +except ImportError: + import urllib.request as urllib2 + try: import ssl except ImportError: diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index b6988a08d7..cb26a05273 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -10,6 +10,7 @@ from distutils.core import Extension from distutils.version import LooseVersion +from setuptools.compat import func_code import setuptools.dist import setuptools.depends as dep from setuptools import Feature @@ -53,17 +54,18 @@ def f1(): x = "test" y = z + fc = func_code(f1) # unrecognized name - self.assertEqual(dep.extract_constant(f1.func_code,'q', -1), None) + self.assertEqual(dep.extract_constant(fc,'q', -1), None) # constant assigned - self.assertEqual(dep.extract_constant(f1.func_code,'x', -1), "test") + self.assertEqual(dep.extract_constant(fc,'x', -1), "test") # expression assigned - self.assertEqual(dep.extract_constant(f1.func_code,'y', -1), -1) + self.assertEqual(dep.extract_constant(fc,'y', -1), -1) # recognized name, not assigned - self.assertEqual(dep.extract_constant(f1.func_code,'z', -1), None) + self.assertEqual(dep.extract_constant(fc,'z', -1), None) def testFindModule(self): self.assertRaises(ImportError, dep.find_module, 'no-such.-thing') diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index cc1e06c398..35d588d074 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -9,7 +9,7 @@ try: basestring except NameError: - basestring = str,unicode + basestring = str try: enumerate @@ -109,7 +109,7 @@ def _test(): import sys, traceback, inspect, linecache, os, re, types import unittest, difflib, pdb, tempfile import warnings -from StringIO import StringIO +from setuptools.compat import StringIO, execfile, exec_, func_code, im_func # Don't whine about the deprecated is_private function in this # module's tests. @@ -240,7 +240,7 @@ def _normalize_module(module, depth=2): """ if inspect.ismodule(module): return module - elif isinstance(module, (str, unicode)): + elif isinstance(module, basestring): return __import__(module, globals(), locals(), ["*"]) elif module is None: return sys.modules[sys._getframe(depth).f_globals['__name__']] @@ -367,9 +367,9 @@ def trace_dispatch(self, *args): # [XX] Normalize with respect to os.path.pardir? def _module_relative_path(module, path): if not inspect.ismodule(module): - raise TypeError, 'Expected a module: %r' % module + raise TypeError('Expected a module: %r' % module) if path.startswith('/'): - raise ValueError, 'Module-relative files may not have absolute paths' + raise ValueError('Module-relative files may not have absolute paths') # Find the base directory for the path. if hasattr(module, '__file__'): @@ -877,7 +877,7 @@ def _from_module(self, module, object): if module is None: return True elif inspect.isfunction(object): - return module.__dict__ is object.func_globals + return module.__dict__ is func_globals(object) elif inspect.isclass(object): return module.__name__ == object.__module__ elif inspect.getmodule(object) is not None: @@ -895,7 +895,7 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen): add them to `tests`. """ if self._verbose: - print 'Finding tests in %s' % name + print('Finding tests in %s' % name) # If we've already processed this object, then ignore it. if id(obj) in seen: @@ -948,7 +948,7 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen): if isinstance(val, staticmethod): val = getattr(obj, valname) if isinstance(val, classmethod): - val = getattr(obj, valname).im_func + val = im_func(getattr(obj, valname)) # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or @@ -1020,8 +1020,8 @@ def _find_lineno(self, obj, source_lines): break # Find the line number for functions & methods. - if inspect.ismethod(obj): obj = obj.im_func - if inspect.isfunction(obj): obj = obj.func_code + if inspect.ismethod(obj): obj = im_func(obj) + if inspect.isfunction(obj): obj = func_code(obj) if inspect.istraceback(obj): obj = obj.tb_frame if inspect.isframe(obj): obj = obj.f_code if inspect.iscode(obj): @@ -1250,8 +1250,8 @@ def __run(self, test, compileflags, out): # keyboard interrupts.) try: # Don't blink! This is where the user's code gets run. - exec compile(example.source, filename, "single", - compileflags, 1) in test.globs + exec_(compile(example.source, filename, "single", + compileflags, 1), test.globs) self.debugger.set_continue() # ==== Example Finished ==== exception = None except KeyboardInterrupt: @@ -1335,7 +1335,7 @@ def __patched_linecache_getlines(self, filename, module_globals=None): if m and m.group('name') == self.test.name: example = self.test.examples[int(m.group('examplenum'))] return example.source.splitlines(True) - elif self.save_linecache_getlines.func_code.co_argcount>1: + elif func_code(self.save_linecache_getlines).co_argcount > 1: return self.save_linecache_getlines(filename, module_globals) else: return self.save_linecache_getlines(filename) @@ -1427,28 +1427,28 @@ def summarize(self, verbose=None): failed.append(x) if verbose: if notests: - print len(notests), "items had no tests:" + print(len(notests), "items had no tests:") notests.sort() for thing in notests: - print " ", thing + print(" ", thing) if passed: - print len(passed), "items passed all tests:" + print(len(passed), "items passed all tests:") passed.sort() for thing, count in passed: - print " %3d tests in %s" % (count, thing) + print(" %3d tests in %s" % (count, thing)) if failed: - print self.DIVIDER - print len(failed), "items had failures:" + print(self.DIVIDER) + print(len(failed), "items had failures:") failed.sort() for thing, (f, t) in failed: - print " %3d of %3d in %s" % (f, t, thing) + print(" %3d of %3d in %s" % (f, t, thing)) if verbose: - print totalt, "tests in", len(self._name2ft), "items." - print totalt - totalf, "passed and", totalf, "failed." + print(totalt, "tests in", len(self._name2ft), "items.") + print(totalt - totalf, "passed and", totalf, "failed.") if totalf: - print "***Test Failed***", totalf, "failures." + print("***Test Failed***", totalf, "failures.") elif verbose: - print "Test passed." + print("Test passed.") return totalf, totalt #///////////////////////////////////////////////////////////////// @@ -1458,8 +1458,8 @@ def merge(self, other): d = self._name2ft for name, (f, t) in other._name2ft.items(): if name in d: - print "*** DocTestRunner.merge: '" + name + "' in both" \ - " testers; summing outcomes." + print("*** DocTestRunner.merge: '" + name + "' in both" \ + " testers; summing outcomes.") f2, t2 = d[name] f = f + f2 t = t + t2 @@ -2039,10 +2039,10 @@ def __init__(self, mod=None, globs=None, verbose=None, def runstring(self, s, name): test = DocTestParser().get_doctest(s, self.globs, name, None, None) if self.verbose: - print "Running string", name + print("Running string", name) (f,t) = self.testrunner.run(test) if self.verbose: - print f, "of", t, "examples failed in string", name + print(f, "of", t, "examples failed in string", name) return (f,t) def rundoc(self, object, name=None, module=None): @@ -2556,7 +2556,7 @@ def debug_script(src, pm=False, globs=None): try: execfile(srcfilename, globs, globs) except: - print sys.exc_info()[1] + print(sys.exc_info()[1]) pdb.post_mortem(sys.exc_info()[2]) else: # Note that %r is vital here. '%s' instead can, e.g., cause diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index b2ab7acc7c..5f5ed6bbe1 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -1,12 +1,11 @@ """Basic http server for tests to simulate PyPI or custom indexes """ -import urllib2 import sys import time -import threading -import BaseHTTPServer -from BaseHTTPServer import HTTPServer -from SimpleHTTPServer import SimpleHTTPRequestHandler +from threading import Thread +from setuptools.compat import (urllib2, URLError, HTTPServer, + SimpleHTTPRequestHandler, + BaseHTTPRequestHandler) class IndexServer(HTTPServer): """Basic single-threaded http server simulating a package index @@ -29,7 +28,7 @@ def serve(self): self.handle_request() def start(self): - self.thread = threading.Thread(target=self.serve) + self.thread = Thread(target=self.serve) self.thread.start() def stop(self): @@ -52,25 +51,26 @@ def stop(self): # ignore any errors; all that's important is the request pass self.thread.join() + self.socket.close() def base_url(self): port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port -class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): +class RequestRecorder(BaseHTTPRequestHandler): def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) self.send_response(200, 'OK') -class MockServer(HTTPServer, threading.Thread): +class MockServer(HTTPServer, Thread): """ A simple HTTP Server that records the requests made to it. """ def __init__(self, server_address=('', 0), RequestHandlerClass=RequestRecorder): HTTPServer.__init__(self, server_address, RequestHandlerClass) - threading.Thread.__init__(self) + Thread.__init__(self) self.setDaemon(True) self.requests = [] diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 7da122cc31..1a12218645 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -4,9 +4,9 @@ import os, re, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError +from setuptools.compat import StringIO from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 315058c575..e2939fea66 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -4,11 +4,11 @@ import os, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError from setuptools.command.develop import develop from setuptools.command import easy_install as easy_install_pkg +from setuptools.compat import StringIO from setuptools.dist import Distribution SETUP_PY = """\ @@ -43,7 +43,7 @@ def setUp(self): f = open(init, 'w') f.write(INIT_PY) f.close() - + os.chdir(self.dir) self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() @@ -51,9 +51,9 @@ def setUp(self): site.USER_SITE = tempfile.mkdtemp() def tearDown(self): - if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + if sys.version < "2.6" or hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix): return - + os.chdir(self.old_cwd) shutil.rmtree(self.dir) shutil.rmtree(site.USER_BASE) @@ -109,7 +109,8 @@ def notest_develop_with_setup_requires(self): try: try: dist = Distribution({'setup_requires': ['I_DONT_EXIST']}) - except DistutilsError, e: + except DistutilsError: + e = sys.exc_info()[1] error = str(e) if error == wanted: pass diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 395056e723..66d43b624a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -8,10 +8,9 @@ import site import textwrap import tarfile -import urlparse -import StringIO import distutils.core +from setuptools.compat import StringIO, BytesIO, next, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args from setuptools.command.easy_install import PthDistributions @@ -78,7 +77,7 @@ def test_get_script_args(self): old_platform = sys.platform try: - name, script = [i for i in get_script_args(dist).next()][0:2] + name, script = [i for i in next(get_script_args(dist))][0:2] finally: sys.platform = old_platform @@ -104,8 +103,7 @@ def test_no_find_links(self): cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') cmd.args = ['ok'] cmd.ensure_finalized() - keys = cmd.package_index.scanned_urls.keys() - keys.sort() + keys = sorted(cmd.package_index.scanned_urls.keys()) self.assertEqual(keys, ['link1', 'link2']) @@ -269,8 +267,8 @@ def test_setup_requires(self): old_stdout = sys.stdout old_stderr = sys.stderr - sys.stdout = StringIO.StringIO() - sys.stderr = StringIO.StringIO() + sys.stdout = StringIO() + sys.stderr = StringIO() try: reset_setup_stop_context( lambda: run_setup(test_setup_py, ['install']) @@ -294,7 +292,7 @@ def test_setup_requires_honors_fetch_params(self): p_index = setuptools.tests.server.MockServer() p_index.start() netloc = 1 - p_index_loc = urlparse.urlparse(p_index.url)[netloc] + p_index_loc = urlparse(p_index.url)[netloc] if p_index_loc.endswith(':0'): # Some platforms (Jython) don't find a port to which to bind, # so skip this test for them. @@ -361,9 +359,9 @@ def make_trivial_sdist(dist_path, setup_py): setup_py_file = tarfile.TarInfo(name='setup.py') try: # Python 3 (StringIO gets converted to io module) - MemFile = StringIO.BytesIO + MemFile = BytesIO except AttributeError: - MemFile = StringIO.StringIO + MemFile = StringIO setup_py_bytes = MemFile(setup_py.encode('utf-8')) setup_py_file.size = len(setup_py_bytes.getvalue()) dist = tarfile.open(dist_path, 'w:gz') diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 1060e787a5..c2ff05392e 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -2,12 +2,11 @@ """ import sys import unittest -import urllib2 import pkg_resources -import httplib +from setuptools.compat import urllib2, httplib, HTTPError, unicode import distutils.errors import setuptools.package_index -from server import IndexServer +from setuptools.tests.server import IndexServer class TestPackageIndex(unittest.TestCase): @@ -16,10 +15,11 @@ def test_bad_url_bad_port(self): url = 'http://127.0.0.1:0/nonesuch/test_package_index' try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assertTrue(url in str(v)) else: - self.assertTrue(isinstance(v,urllib2.HTTPError)) + self.assertTrue(isinstance(v, HTTPError)) def test_bad_url_typo(self): # issue 16 @@ -32,10 +32,11 @@ def test_bad_url_typo(self): url = 'url:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunk' try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assertTrue(url in str(v)) else: - self.assertTrue(isinstance(v, urllib2.HTTPError)) + self.assertTrue(isinstance(v, HTTPError)) def test_bad_url_bad_status_line(self): index = setuptools.package_index.PackageIndex( @@ -43,14 +44,14 @@ def test_bad_url_bad_status_line(self): ) def _urlopen(*args): - import httplib raise httplib.BadStatusLine('line') index.opener = _urlopen url = 'http://example.com' try: v = index.open_url(url) - except Exception, v: + except Exception: + v = sys.exc_info()[1] self.assertTrue('line' in str(v)) else: raise AssertionError('Should have raise here!') @@ -67,8 +68,8 @@ def test_bad_url_double_scheme(self): url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' try: index.open_url(url) - except distutils.errors.DistutilsError, error: - msg = unicode(error) + except distutils.errors.DistutilsError: + msg = unicode(sys.exc_info()[1]) assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg or 'Name or service not known' in msg return raise RuntimeError("Did not raise") diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 34e341b535..df5261d1ff 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -3,7 +3,8 @@ # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh -import os, pkg_resources, sys, StringIO, tempfile, shutil +from setuptools.compat import StringIO, iteritems +import os, pkg_resources, sys, tempfile, shutil try: frozenset except NameError: from sets import ImmutableSet as frozenset @@ -149,7 +150,7 @@ def testResolve(self): for i in range(3): targets = list(ws.resolve(parse_requirements("Foo"), ad)) self.assertEqual(targets, [Foo]) - map(ws.add,targets) + list(map(ws.add,targets)) self.assertRaises(VersionConflict, ws.resolve, parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset @@ -249,7 +250,7 @@ def testRejects(self): def checkSubMap(self, m): self.assertEqual(len(m), len(self.submap_expect)) - for key, ep in self.submap_expect.iteritems(): + for key, ep in iteritems(self.submap_expect): self.assertEqual(repr(m.get(key)), repr(ep)) submap_expect = dict( @@ -273,10 +274,10 @@ def testParseList(self): def testParseMap(self): m = EntryPoint.parse_map({'xyz':self.submap_str}) self.checkSubMap(m['xyz']) - self.assertEqual(m.keys(),['xyz']) + self.assertEqual(list(m.keys()),['xyz']) m = EntryPoint.parse_map("[xyz]\n"+self.submap_str) self.checkSubMap(m['xyz']) - self.assertEqual(m.keys(),['xyz']) + self.assertEqual(list(m.keys()),['xyz']) self.assertRaises(ValueError, EntryPoint.parse_map, ["[xyz]", "[xyz]"]) self.assertRaises(ValueError, EntryPoint.parse_map, self.submap_str) @@ -537,12 +538,12 @@ def getProperty(property): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = sys.stderr = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = sys.stderr = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) @@ -602,7 +603,7 @@ def test_two_levels_deep(self): self._assertIn("pkg1", pkg_resources._namespace_packages.keys()) try: import pkg1.pkg2 - except ImportError, e: + except ImportError: self.fail("Setuptools tried to import the parent namespace package") # check the _namespace_packages dict self._assertIn("pkg1.pkg2", pkg_resources._namespace_packages.keys()) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f51d45678f..c1e7864b29 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -7,11 +7,10 @@ import sys import tempfile import unittest -import urllib import unicodedata -from StringIO import StringIO +from setuptools.compat import StringIO, quote, unicode from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -149,7 +148,8 @@ def test_manifest_is_written_with_utf8_encoding(self): # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -190,7 +190,8 @@ def test_write_manifest_allows_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -228,7 +229,8 @@ def test_write_manifest_skips_non_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The Latin-1 filename should have been skipped @@ -307,7 +309,8 @@ def test_read_manifest_skips_non_utf8_filenames(self): try: try: cmd.read_manifest() - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) finally: unquiet() diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index ad7cbd0f96..d6e68590ab 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -6,9 +6,9 @@ import os, shutil, tempfile, unittest import tempfile import site -from StringIO import StringIO from distutils.errors import DistutilsError +from setuptools.compat import StringIO from setuptools.command.test import test from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution diff --git a/tests/api_tests.txt b/tests/api_tests.txt index d03da14e12..86ca245d80 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -39,7 +39,7 @@ Distributions have various introspectable attributes:: >>> dist.py_version == sys.version[:3] True - >>> print dist.platform + >>> print(dist.platform) None Including various computed attributes:: @@ -199,7 +199,7 @@ shows up once when iterating the working set: You can ask a WorkingSet to ``find()`` a distribution matching a requirement:: >>> from pkg_resources import Requirement - >>> print ws.find(Requirement.parse("Foo==1.0")) # no match, return None + >>> print(ws.find(Requirement.parse("Foo==1.0"))) # no match, return None None >>> ws.find(Requirement.parse("Bar==0.9")) # match, return distribution @@ -222,7 +222,7 @@ distribution is added to a working set. The callback is immediately invoked once for each existing distribution in the working set, and then is called again for new distributions added thereafter:: - >>> def added(dist): print "Added", dist + >>> def added(dist): print("Added %s" % dist) >>> ws.subscribe(added) Added Bar 0.9 >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12") diff --git a/tests/manual_test.py b/tests/manual_test.py index 44cf2d0657..3eab99e1c7 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -9,7 +9,7 @@ import tempfile from distutils.command.install import INSTALL_SCHEMES from string import Template -from urllib2 import urlopen +from setuptools.compat import urlopen try: import subprocess From c003c86fc22b8d20b81226d1e74c95a5c885e314 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sat, 15 Jun 2013 15:56:28 +0100 Subject: [PATCH 1240/8469] Updated to fix errors on 2.5. --HG-- branch : single-codebase --- setuptools/command/easy_install.py | 2 +- setuptools/command/install_scripts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f71128b00f..cf80926c9b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -800,7 +800,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0o777-mask) + chmod(target,0x1FF - mask) # 0777 diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 4e6b1a9a84..ad522f6cef 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -50,5 +50,5 @@ def write_script(self, script_name, contents, mode="t", *ignored): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0o777-mask) + chmod(target,0x1FF - mask) # 0777 From 67f9020e66d82dbf0b0ada5772a960ecc054d850 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 14:18:30 -0500 Subject: [PATCH 1241/8469] Remove unused import --HG-- branch : distribute --- setuptools/tests/test_sdist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index ececa765dc..f48decf6c4 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,7 @@ import unittest import unicodedata -from setuptools.compat import StringIO, urllib +from setuptools.compat import StringIO from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -337,7 +337,7 @@ def test_sdist_with_utf8_encoded_filename(self): if sys.version_info >= (3,): fs_enc = sys.getfilesystemencoding() - if sys.platform == 'win32': + if sys.platform == 'win32': if fs_enc == 'cp1252': # Python 3 mangles the UTF-8 filename filename = filename.decode('cp1252') @@ -372,14 +372,14 @@ def test_sdist_with_latin1_encoded_filename(self): if sys.version_info >= (3,): #not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': - # Latin-1 is similar to Windows-1252 however + # Latin-1 is similar to Windows-1252 however # on mbcs filesys it is not in latin-1 encoding fs_enc = sys.getfilesystemencoding() if fs_enc == 'mbcs': filename = filename.decode('mbcs') else: filename = filename.decode('latin-1') - + self.assertTrue(filename in cmd.filelist.files) else: # The Latin-1 filename should have been skipped From b827baba9c89188f92579fe943da4f0dadde9fda Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Jun 2013 08:23:32 -0500 Subject: [PATCH 1242/8469] Update exceptions for Python 3 compatibility --HG-- branch : distribute extra : rebase_source : 354795c0a0b8a864583f2549ce869e719be265d2 --- setuptools/tests/test_sdist.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f48decf6c4..1682989aea 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -147,7 +147,8 @@ def test_manifest_is_written_with_utf8_encoding(self): # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -188,7 +189,8 @@ def test_write_manifest_allows_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -226,7 +228,8 @@ def test_write_manifest_skips_non_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The Latin-1 filename should have been skipped @@ -305,7 +308,8 @@ def test_read_manifest_skips_non_utf8_filenames(self): try: try: cmd.read_manifest() - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) finally: unquiet() From f52d063aa81f64bbb71562510a87d3aedbad2ed9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Jun 2013 10:20:56 -0500 Subject: [PATCH 1243/8469] Re-save test modules with UTF-8 encoding --HG-- branch : distribute extra : rebase_source : 6728580b2f2f10026fe0f196db7ea5510acac704 extra : histedit_source : f4fbf02bbe3e4e39caf1aa2f5a354c99d9249e65 --- setuptools/tests/test_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index e7022995dc..7a06a40329 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,4 +1,4 @@ -# -*- coding: UTF-8 -*- +# -*- coding: UTF-8 -*- """develop tests """ @@ -23,7 +23,7 @@ ) """ -NS_INIT = """# -*- coding: Latin-1 -*- +NS_INIT = """# -*- coding: Latin-1 -*- # Söme Arbiträry Ünicode to test Issüé 310 try: __import__('pkg_resources').declare_namespace(__name__) @@ -77,7 +77,7 @@ def setUp(self): f = open(init, 'wt') f.write(TEST_PY) f.close() - + os.chdir(self.dir) self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() @@ -87,7 +87,7 @@ def setUp(self): def tearDown(self): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return - + os.chdir(self.old_cwd) shutil.rmtree(self.dir) shutil.rmtree(site.USER_BASE) @@ -98,7 +98,7 @@ def tearDown(self): def test_test(self): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return - + dist = Distribution(dict( name='foo', packages=['name', 'name.space', 'name.space.tests'], @@ -121,4 +121,4 @@ def test_test(self): pass finally: sys.stdout = old_stdout - + From 4d2396983ae8db3429a4e1a96f6112ef0c659422 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Jun 2013 10:38:20 -0500 Subject: [PATCH 1244/8469] Use unicode from compat module --HG-- branch : distribute extra : rebase_source : c4dd03dba58146eed2f620cd6d6b7ab52ee9d109 extra : histedit_source : 02c194ea1c97e8aea64fd23d77efc1bade185c0a --- setuptools/tests/test_sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 1682989aea..438f7cedbd 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,7 @@ import unittest import unicodedata -from setuptools.compat import StringIO +from setuptools.compat import StringIO, unicode from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -55,7 +55,7 @@ def b(s, encoding='utf-8'): # Convert to POSIX path def posix(path): - if sys.version_info >= (3,) and not isinstance(path, unicode): + if sys.version_info >= (3,) and not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b('/')) else: return path.replace(os.sep, '/') From 3c86c861ab9665df0e502f250a7471d09240e413 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Jun 2013 10:55:09 -0500 Subject: [PATCH 1245/8469] Fix Python3 compatibility issue in filterfalse --HG-- branch : distribute extra : rebase_source : 71e3e89efe6483924a07e7f9819ee86f08dbf1f2 extra : histedit_source : fa75c7bc174b248c74da7b4efd5f6f05c36b6ae4 --- setuptools/compat.py | 3 +++ setuptools/package_index.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 05417c6e32..e2f64de236 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -1,4 +1,5 @@ import sys +import itertools if sys.version_info[0] < 3: PY3 = False @@ -30,6 +31,7 @@ from urllib2 import urlopen, HTTPError, URLError, unquote, splituser from urlparse import urlparse, urlunparse, urljoin xrange = xrange + filterfalse = itertools.ifilterfalse def exec_(code, globs=None, locs=None): if globs is None: @@ -72,6 +74,7 @@ def exec_(code, globs=None, locs=None): from urllib.request import urlopen, url2pathname from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin xrange = range + filterfalse = itertools.filterfalse def execfile(fn, globs=None, locs=None): if globs is None: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 85a1deebe8..1e2a086dc1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,6 +1,5 @@ """PyPI and direct package downloading""" import sys, os.path, re, shutil, random, socket -import itertools import base64 from pkg_resources import * from distutils import log @@ -9,6 +8,7 @@ urlparse, urlunparse, unquote, splituser, url2pathname, name2codepoint, unichr, urljoin) +from setuptools.compat import filterfalse try: from hashlib import md5 except ImportError: @@ -148,7 +148,7 @@ def unique_everseen(iterable, key=None): seen = set() seen_add = seen.add if key is None: - for element in itertools.ifilterfalse(seen.__contains__, iterable): + for element in filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: From 744a61f18bbfcbf7dfaa08886185b4595d8b7bcb Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 17 Jun 2013 19:23:33 +0100 Subject: [PATCH 1246/8469] Misc. updates following 2to3 checks. --HG-- branch : single-codebase --- docs/conf.py | 8 +- pkg_resources.py | 3 +- release.py | 17 ++++- setuptools.egg-info/entry_points.txt | 92 +++++++++++------------ setuptools.egg-info/requires.txt | 6 +- setuptools/command/easy_install.py | 2 + setuptools/command/egg_info.py | 4 +- setuptools/command/test.py | 2 +- setuptools/command/upload.py | 4 +- setuptools/command/upload_docs.py | 4 +- setuptools/extension.py | 2 +- setuptools/package_index.py | 4 +- setuptools/sandbox.py | 2 +- setuptools/script template (dev).py | 5 +- setuptools/tests/__init__.py | 2 +- tests/test_ez_setup.py | 5 +- tests/test_pkg_resources.py | 107 ++++++++++++++------------- 17 files changed, 147 insertions(+), 122 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3861b79a55..44d8378a01 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'Setuptools' -copyright = u'2009-2013, The fellowship of the packaging' +project = 'Setuptools' +copyright = '2009-2013, The fellowship of the packaging' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -175,8 +175,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Setuptools.tex', ur'Setuptools Documentation', - ur'The fellowship of the packaging', 'manual'), + ('index', 'Setuptools.tex', 'Setuptools Documentation', + 'The fellowship of the packaging', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/pkg_resources.py b/pkg_resources.py index 03aa75ad03..521a7e0007 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2492,7 +2492,8 @@ def activate(self,path=None): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - map(declare_namespace, self._get_metadata('namespace_packages.txt')) + list(map(declare_namespace, + self._get_metadata('namespace_packages.txt'))) def egg_name(self): diff --git a/release.py b/release.py index 632bf4cb38..2e35feb127 100644 --- a/release.py +++ b/release.py @@ -17,6 +17,15 @@ import itertools import re +try: + from urllib2 import urlopen, Request, HTTPError + from itertools import izip_longest +except ImportError: + from urllib.request import urlopen, Request + from urllib.error import HTTPError + raw_input = input + from itertools import zip_longest as izip_longest + try: import keyring except Exception: @@ -99,11 +108,11 @@ def add_milestone_and_version(version): for type in 'milestones', 'versions': url = (base + '/1.0/repositories/{repo}/issues/{type}' .format(repo = get_repo_name(), type=type)) - req = urllib2.Request(url = url, headers = headers, + req = Request(url = url, headers = headers, data='name='+version) try: - urllib2.urlopen(req) - except urllib2.HTTPError as e: + urlopen(req) + except HTTPError as e: print(e.fp.read()) def bump_versions(target_ver): @@ -225,7 +234,7 @@ def _linkified_text(rst_content): anchors = [] linkified_parts = [_linkified_part(part, anchors) for part in plain_text_parts] - pairs = itertools.izip_longest( + pairs = izip_longest( linkified_parts, HREF_pattern.findall(rst_content), fillvalue='', diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 663882d630..64d167676d 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +namespace_packages = setuptools.dist:check_nsp +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements +entry_points = setuptools.dist:check_entry_points +convert_2to3_doctests = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +use_2to3_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras +include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +zip_safe = setuptools.dist:assert_bool + [distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +test = setuptools.command.test:test +easy_install = setuptools.command.easy_install:easy_install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +upload_docs = setuptools.command.upload_docs:upload_docs setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py +install = setuptools.command.install:install +bdist_egg = setuptools.command.bdist_egg:bdist_egg +alias = setuptools.command.alias:alias saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info +sdist = setuptools.command.sdist:sdist +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install +build_py = setuptools.command.build_py:build_py install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names namespace_packages.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries +top_level.txt = setuptools.command.egg_info:write_toplevel_names depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 2f2a364fa2..5ff415da83 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,11 +1,11 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] wincertstore==0.1 +[certs] +certifi==0.0.8 + [ssl:python_version in '2.4, 2.5'] ssl==1.16 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cf80926c9b..c53ca9f284 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -285,6 +285,8 @@ def finalize_options(self): self.script_dir = self.install_scripts # default --record from the install command self.set_undefined_options('install', ('record', 'record')) + # Should this be moved to the if statement below? It's not used + # elsewhere normpath = map(normalize_path, sys.path) self.all_site_dirs = get_site_dirs() if self.site_dirs is not None: diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index c77bd69db4..1a61dfcbb9 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -235,8 +235,8 @@ def get_svn_revision(self): log.warn("unrecognized .svn/entries format; skipping %s", base) dirs[:] = [] continue - - data = map(str.splitlines,data.split('\n\x0c\n')) + + data = list(map(str.splitlines,data.split('\n\x0c\n'))) del data[0][0] # get rid of the '8' or '9' or '10' dirurl = data[0][3] localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index a02ac14240..db2fc7b140 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -154,7 +154,7 @@ def run_tests(self): for name in sys.modules: if name.startswith(module): del_modules.append(name) - map(sys.modules.__delitem__, del_modules) + list(map(sys.modules.__delitem__, del_modules)) loader_ep = EntryPoint.parse("x="+self.test_loader) loader_class = loader_ep.load(require=False) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 7ef0e6ec58..02d955eda6 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -11,6 +11,7 @@ except ImportError: from md5 import md5 import os +import sys import socket import platform import base64 @@ -167,7 +168,8 @@ def upload_file(self, command, pyversion, filename): http.putheader('Authorization', auth) http.endheaders() http.send(body) - except socket.error, e: + except socket.error: + e = sys.exc_info()[1] self.announce(str(e), log.ERROR) return diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 0a54578904..e07b885d9d 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -23,7 +23,7 @@ except ImportError: from setuptools.command.upload import upload -from setuptools.compat import httplib, urlparse +from setuptools.compat import httplib, urlparse, unicode, iteritems if sys.version_info >= (3,): errors = 'surrogateescape' @@ -131,7 +131,7 @@ def upload_file(self, filename): sep_boundary = b('\n--') + b(boundary) end_boundary = sep_boundary + b('--') body = [] - for key, values in data.iteritems(): + for key, values in iteritems(data): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if type(values) != type([]): diff --git a/setuptools/extension.py b/setuptools/extension.py index eb8b836cc3..d7892d3d9f 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -35,7 +35,7 @@ def pyx_to_c(source): if source.endswith('.pyx'): source = source[:-4] + '.c' return source - self.sources = map(pyx_to_c, self.sources) + self.sources = list(map(pyx_to_c, self.sources)) class Library(Extension): """Just like a regular Extension, but built as a library instead""" diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5ee6fd27a6..25936b9158 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -177,7 +177,7 @@ def find_external_links(url, page): for match in REL.finditer(page): tag, rel = match.groups() - rels = map(str.strip, rel.lower().split(',')) + rels = set(map(str.strip, rel.lower().split(','))) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): yield urljoin(url, htmldecode(match.group(1))) @@ -749,7 +749,7 @@ def _download_svn(self, url, filename): scheme, netloc, path, p, q, f = urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/',1) - auth, host = urllib.splituser(netloc) + auth, host = splituser(netloc) if auth: if ':' in auth: user, pw = auth.split(':',1) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 090cb34c3d..a5a01a4642 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -85,7 +85,7 @@ def run_setup(setup_script, args): # exclude any encodings modules. See #285 and not mod_name.startswith('encodings.') ] - map(sys.modules.__delitem__, del_modules) + list(map(sys.modules.__delitem__, del_modules)) os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv diff --git a/setuptools/script template (dev).py b/setuptools/script template (dev).py index 6dd9dd4525..901790e7bd 100644 --- a/setuptools/script template (dev).py +++ b/setuptools/script template (dev).py @@ -3,4 +3,7 @@ from pkg_resources import require; require("""%(spec)r""") del require __file__ = """%(dev_path)r""" -execfile(__file__) +try: + execfile(__file__) +except NameError: + exec(compile(open(__file__).read(), __file__, 'exec')) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index cb26a05273..1cd5df2bac 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -2,7 +2,7 @@ import sys import os import unittest -import doctest +from setuptools.tests import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 922bd88465..6dd4c0558d 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -27,7 +27,10 @@ def setUp(self): "--dist-dir", "%s" % self.tmpdir) tarball = os.listdir(self.tmpdir)[0] self.tarball = os.path.join(self.tmpdir, tarball) - import urllib2 + try: + import urllib2 + except ImportError: + import urllib.request as urllib2 urllib2.urlopen = self.urlopen def tearDown(self): diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 7009b4abc0..b05ea44b37 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -5,57 +5,62 @@ import pkg_resources +try: + unicode +except NameError: + unicode = str + class EggRemover(unicode): - def __call__(self): - if self in sys.path: - sys.path.remove(self) - if os.path.exists(self): - os.remove(self) + def __call__(self): + if self in sys.path: + sys.path.remove(self) + if os.path.exists(self): + os.remove(self) class TestZipProvider(object): - finalizers = [] - - @classmethod - def setup_class(cls): - "create a zip egg and add it to sys.path" - egg = tempfile.NamedTemporaryFile(suffix='.egg', delete=False) - zip_egg = zipfile.ZipFile(egg, 'w') - zip_info = zipfile.ZipInfo() - zip_info.filename = 'mod.py' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 - zip_egg.writestr(zip_info, 'x = 3\n') - zip_info = zipfile.ZipInfo() - zip_info.filename = 'data.dat' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 - zip_egg.writestr(zip_info, 'hello, world!') - zip_egg.close() - egg.close() - - sys.path.append(egg.name) - cls.finalizers.append(EggRemover(egg.name)) - - @classmethod - def teardown_class(cls): - for finalizer in cls.finalizers: - finalizer() - - def test_resource_filename_rewrites_on_change(self): - """ - If a previous call to get_resource_filename has saved the file, but - the file has been subsequently mutated with different file of the - same size and modification time, it should not be overwritten on a - subsequent call to get_resource_filename. - """ - import mod - manager = pkg_resources.ResourceManager() - zp = pkg_resources.ZipProvider(mod) - filename = zp.get_resource_filename(manager, 'data.dat') - assert os.stat(filename).st_mtime == 1368379500 - f = open(filename, 'wb') - f.write('hello, world?') - f.close() - os.utime(filename, (1368379500, 1368379500)) - filename = zp.get_resource_filename(manager, 'data.dat') - f = open(filename) - assert f.read() == 'hello, world!' - manager.cleanup_resources() + finalizers = [] + + @classmethod + def setup_class(cls): + "create a zip egg and add it to sys.path" + egg = tempfile.NamedTemporaryFile(suffix='.egg', delete=False) + zip_egg = zipfile.ZipFile(egg, 'w') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'mod.py' + zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_egg.writestr(zip_info, 'x = 3\n') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'data.dat' + zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_egg.writestr(zip_info, 'hello, world!') + zip_egg.close() + egg.close() + + sys.path.append(egg.name) + cls.finalizers.append(EggRemover(egg.name)) + + @classmethod + def teardown_class(cls): + for finalizer in cls.finalizers: + finalizer() + + def test_resource_filename_rewrites_on_change(self): + """ + If a previous call to get_resource_filename has saved the file, but + the file has been subsequently mutated with different file of the + same size and modification time, it should not be overwritten on a + subsequent call to get_resource_filename. + """ + import mod + manager = pkg_resources.ResourceManager() + zp = pkg_resources.ZipProvider(mod) + filename = zp.get_resource_filename(manager, 'data.dat') + assert os.stat(filename).st_mtime == 1368379500 + f = open(filename, 'wb') + f.write('hello, world?') + f.close() + os.utime(filename, (1368379500, 1368379500)) + filename = zp.get_resource_filename(manager, 'data.dat') + f = open(filename) + assert f.read() == 'hello, world!' + manager.cleanup_resources() From 38af6239b1823908c3c2522245d41bd4105ec1e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 15:31:41 -0500 Subject: [PATCH 1247/8469] Update release script to run under Python 3 --- release.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/release.py b/release.py index 632bf4cb38..0a2e2bde12 100644 --- a/release.py +++ b/release.py @@ -11,12 +11,21 @@ import shutil import os import sys -import urllib2 import getpass import collections import itertools import re +try: + import urllib.request as urllib_request +except ImportError: + import urllib2 as urllib_request + +try: + input = raw_input +except NameError: + pass + try: import keyring except Exception: @@ -27,7 +36,7 @@ def set_versions(): global VERSION - version = raw_input("Release as version [%s]> " % VERSION) or VERSION + version = input("Release as version [%s]> " % VERSION) or VERSION if version != VERSION: VERSION = bump_versions(version) @@ -99,11 +108,11 @@ def add_milestone_and_version(version): for type in 'milestones', 'versions': url = (base + '/1.0/repositories/{repo}/issues/{type}' .format(repo = get_repo_name(), type=type)) - req = urllib2.Request(url = url, headers = headers, + req = urllib_request.Request(url = url, headers = headers, data='name='+version) try: - urllib2.urlopen(req) - except urllib2.HTTPError as e: + urllib_request.urlopen(req) + except urllib_request.HTTPError as e: print(e.fp.read()) def bump_versions(target_ver): @@ -116,7 +125,10 @@ def bump_versions(target_ver): def bump_version(filename, target_ver): with open(filename, 'rb') as f: - lines = [line.replace(VERSION, target_ver) for line in f] + lines = [ + line.replace(VERSION.encode('ascii'), target_ver.encode('ascii')) + for line in f + ] with open(filename, 'wb') as f: f.writelines(lines) From 49baf51edde145b96913aaf0151eb4dff400b3e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 15:31:53 -0500 Subject: [PATCH 1248/8469] Bumped to 0.8 in preparation for next release. --- README.txt | 10 +++++----- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.txt b/README.txt index 23627e6660..10cde2cfcd 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7.3 over Distribute. +Currently, Distribute disallows installing Setuptools 0.8 over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.3$ python setup.py --prefix=/opt/setuptools + setuptools-0.8$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 3861b79a55..d2e5276cc0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.3' +version = '0.8' # The full version, including alpha/beta/rc tags. -release = '0.7.3' +release = '0.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index ba0d781e7d..c225c6ae6d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.3" +DEFAULT_VERSION = "0.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 0a2e2bde12..937fadfcb9 100644 --- a/release.py +++ b/release.py @@ -31,7 +31,7 @@ except Exception: pass -VERSION = '0.7.3' +VERSION = '0.8' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index 7ed396d056..c88e6c7554 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.3" +VERSION = "0.8" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 0f29f575e5..a8e7617abc 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.3' +__version__ = '0.8' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From f17e432dd427e2f894232e57a6b47143f85f7d97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 15:35:42 -0500 Subject: [PATCH 1249/8469] Updated changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 59e37ad675..d75d769f03 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +0.8 +--- + +* Code base now runs on Python 2.4 - Python 3.3 without Python 2to3 + conversion. + ----- 0.7.3 ----- From a5bbf67399a6c56e8611a3747faaa52d6b835649 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 15:50:27 -0500 Subject: [PATCH 1250/8469] Backed out changeset: 7292c3a723e3 See https://bitbucket.org/pypa/setuptools/commits/7292c3a723e3b7b6fdd2bede2374dd1777809e7d for discussion --- CHANGES.txt | 2 -- setup.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 59e37ad675..77ab44aadb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,8 +6,6 @@ CHANGES 0.7.3 ----- -* Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment - variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT. * Issue #1: Disable installation of Windows-specific files on non-Windows systems. * Use new sysconfig module with Python 2.7 or >=3.2. diff --git a/setup.py b/setup.py index 1260b17299..eeae866ee1 100755 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ scripts = [] console_scripts = ["easy_install = setuptools.command.easy_install:main"] -if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: +if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) # specific command that is used to generate windows .exe files From 1b793f1d7fc075506cf16e9bdb1abfb610f0e151 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 16:06:33 -0500 Subject: [PATCH 1251/8469] Added tag 0.7.3 for changeset d212e48e0cef --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e08a06c209..cc2b422560 100644 --- a/.hgtags +++ b/.hgtags @@ -62,3 +62,4 @@ ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 7f2c08e9ca22023d1499c512fccc1513813b7dc4 0.7 024dd30ed702135f5328975042566e48cc479d7d 0.7.1 d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 +d212e48e0cef689acba57ed017289c027660b23c 0.7.3 From 1e5582e523ce94c205884548ef200ea3a29aff13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 16:07:13 -0500 Subject: [PATCH 1252/8469] Bumped to 0.7.4 in preparation for next release. --- README.txt | 10 +++++----- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools.egg-info/dependency_links.txt | 12 ++++++------ setuptools/__init__.py | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.txt b/README.txt index 23627e6660..f9270e9354 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7.3 over Distribute. +Currently, Distribute disallows installing Setuptools 0.7.4 over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.3/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.3$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.4$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 3861b79a55..909a551048 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.3' +version = '0.7.4' # The full version, including alpha/beta/rc tags. -release = '0.7.3' +release = '0.7.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index ba0d781e7d..668224937c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.3" +DEFAULT_VERSION = "0.7.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 632bf4cb38..c3ed3f4536 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.3' +VERSION = '0.7.4' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index eeae866ee1..ece0370eef 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.3" +VERSION = "0.7.4" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index a54d9039cc..c688b7eaab 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,6 +1,6 @@ -http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec -http://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb -http://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c -http://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc -http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 -http://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b +https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb +https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c +https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc +https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 +https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 0f29f575e5..f7612bce09 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.3' +__version__ = '0.7.4' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 16b2bc31e07f8fa14d27bc504dc0bbc73da900be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 16:15:34 -0500 Subject: [PATCH 1253/8469] Update version to indicate a range of versions when discussing upgrade from Distribute --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index f9270e9354..19b7c4713e 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions Upgrading from Distribute ========================= -Currently, Distribute disallows installing Setuptools 0.7.4 over Distribute. +Currently, Distribute disallows installing Setuptools 0.7+ over Distribute. You must first uninstall any active version of Distribute first (see `Uninstalling`_). From 5d9d3930f400a754f38be2a4de21a7f9ed00f5f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Jun 2013 16:19:49 -0500 Subject: [PATCH 1254/8469] Added tag 0.8b1 for changeset 74c6c1226805 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cc2b422560..6e35338e09 100644 --- a/.hgtags +++ b/.hgtags @@ -63,3 +63,4 @@ ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 024dd30ed702135f5328975042566e48cc479d7d 0.7.1 d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 d212e48e0cef689acba57ed017289c027660b23c 0.7.3 +74c6c12268059986f9cc0b535399594f1d131201 0.8b1 From 49b893267e951f9e53d9e7611286c95319beaf20 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 19 Jun 2013 11:50:14 +0100 Subject: [PATCH 1255/8469] Post-merge fixes. --HG-- branch : single-codebase --- setuptools.egg-info/requires.txt | 11 ++++------- setuptools/command/egg_info.py | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 77cddef252..c06a8a0b3e 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,16 +1,13 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:sys_platform=='win32'] wincertstore==0.1 -[certs] -certifi==0.0.8 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 [ssl:python_version in '2.4, 2.5'] ssl==1.16 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6b0d242699..5a71415629 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -283,7 +283,7 @@ def append(self, item): item = item[:-1] path = convert_path(item) - if PY3: + if sys.version_info >= (3,): try: if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) @@ -337,7 +337,7 @@ def write_manifest (self): named by 'self.manifest'. """ # The manifest must be UTF-8 encodable. See #303. - if PY3: + if sys.version_info >= (3,): files = [] for file in self.filelist.files: try: From 7161829fd5e4515903ce56b711e551bc75c35ba7 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 19 Jun 2013 12:07:26 +0100 Subject: [PATCH 1256/8469] More post-merge fixes. --HG-- branch : single-codebase --- setuptools.egg-info/requires.txt | 12 ++++++------ setuptools/command/install_egg_info.py | 1 - setuptools/compat.py | 4 ++-- setuptools/sandbox.py | 1 - setuptools/tests/test_sdist.py | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index c06a8a0b3e..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 87ddff9c17..f44b34b555 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,6 +1,5 @@ from setuptools import Command from setuptools.archive_util import unpack_archive -from setuptools.compat import PY3 from distutils import log, dir_util import os, shutil, pkg_resources diff --git a/setuptools/compat.py b/setuptools/compat.py index 437fb7109c..e2f64de236 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -26,7 +26,7 @@ reduce = reduce unichr = unichr unicode = unicode - from urllib import url2pathname, quote # Python 2.4 has no quote in urllib2 + from urllib import url2pathname import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser from urlparse import urlparse, urlunparse, urljoin @@ -72,7 +72,7 @@ def exec_(code, globs=None, locs=None): from urllib.error import HTTPError, URLError import urllib.request as urllib2 from urllib.request import urlopen, url2pathname - from urllib.parse import urlparse, urlunparse, quote, unquote, splituser, urljoin + from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin xrange = range filterfalse = itertools.filterfalse diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 91dfc5195f..4e527446ce 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -9,7 +9,6 @@ _file = None _open = open from distutils.errors import DistutilsError -from setuptools.compat import builtins, execfile, reduce from pkg_resources import working_set from setuptools.compat import builtins, execfile, reduce diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index a58b749c95..b8f89e0628 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -10,7 +10,7 @@ import unicodedata -from setuptools.compat import StringIO, quote, unicode +from setuptools.compat import StringIO, unicode from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution From f91bf3924a2f4e3d4c7f075b792002dae97d46b4 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 19 Jun 2013 12:19:32 +0100 Subject: [PATCH 1257/8469] Add back accidentally deleted import. --HG-- branch : single-codebase --- setuptools.egg-info/requires.txt | 10 +++++----- setuptools/command/easy_install.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..221040f812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 000fefa0c9..3194644e84 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1491,6 +1491,7 @@ def extract_wininst_cfg(dist_filename): f.seek(prepended-12) from setuptools.compat import StringIO, ConfigParser + import struct tag, cfglen, bmlen = struct.unpack(" Date: Wed, 19 Jun 2013 12:32:17 +0100 Subject: [PATCH 1258/8469] Tidied up imports. --HG-- branch : single-codebase --- setuptools.egg-info/requires.txt | 6 +++--- setuptools/ssl_support.py | 5 ----- setuptools/tests/test_sdist.py | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 221040f812..0b577c9748 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,11 +1,11 @@ -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + [certs] certifi==0.0.8 diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index e749b3127f..2aec655a09 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,11 +3,6 @@ from pkg_resources import ResolutionError, ExtractionError from setuptools.compat import urllib2 -try: - import urllib2 -except ImportError: - import urllib.request as urllib2 - try: import ssl except ImportError: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index b8f89e0628..438f7cedbd 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,6 @@ import unittest import unicodedata - from setuptools.compat import StringIO, unicode from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker @@ -56,7 +55,7 @@ def b(s, encoding='utf-8'): # Convert to POSIX path def posix(path): - if sys.version_info >= (3,) and not isinstance(path, unicode): + if sys.version_info >= (3,) and not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b('/')) else: return path.replace(os.sep, '/') From 2eb4eeaf4e06d8bcf3cf1288ae2d6a53ef96f59d Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 19 Jun 2013 12:38:18 +0100 Subject: [PATCH 1259/8469] Minor change to minimise diffs with upstream. --HG-- branch : single-codebase --- pkg_resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index e03667e098..0978836466 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -40,7 +40,6 @@ def exec_(code, globs=None, locs=None): except NameError: basestring = str from io import StringIO - from functools import reduce exec_ = eval("exec") def execfile(fn, globs=None, locs=None): if globs is None: @@ -48,6 +47,8 @@ def execfile(fn, globs=None, locs=None): if locs is None: locs = globs exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) + import functools + reduce = functools.reduce # capture these to bypass sandboxing from os import utime From 1c5400fd8216c101b7d120e1b079e46add869ade Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 19 Jun 2013 12:39:48 +0100 Subject: [PATCH 1260/8469] Minor change to minimise diffs with upstream. --HG-- branch : single-codebase --- pkg_resources.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 0978836466..3dc85525e0 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2493,8 +2493,7 @@ def activate(self,path=None): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - list(map(declare_namespace, - self._get_metadata('namespace_packages.txt'))) + list(map(declare_namespace, self._get_metadata('namespace_packages.txt'))) def egg_name(self): From 5a3dbe5d5b8cb07a292b8fee2cd83fbc1bcbd16f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 08:38:55 -0500 Subject: [PATCH 1261/8469] Add test capturing failure on Python 3 in egg_info.get_svn_revision (#20). egg_info.get_svn_revision is now a staticmethod. --- MANIFEST.in | 2 +- setuptools/command/egg_info.py | 5 +- setuptools/tests/entries-v10 | 615 ++++++++++++++++++++++++++++++ setuptools/tests/test_egg_info.py | 40 ++ 4 files changed, 659 insertions(+), 3 deletions(-) create mode 100644 setuptools/tests/entries-v10 create mode 100644 setuptools/tests/test_egg_info.py diff --git a/MANIFEST.in b/MANIFEST.in index 68337800cc..ff1021234a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ recursive-include setuptools *.py *.txt *.exe *.xml recursive-include tests *.py *.c *.pyx *.txt -recursive-include setuptools/tests *.html +recursive-include setuptools/tests *.html entries* recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html recursive-include _markerlib *.py include *.py diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index cd3ea19895..5863d2d4bb 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -210,7 +210,8 @@ def tags(self): - def get_svn_revision(self): + @staticmethod + def get_svn_revision(): revision = 0 urlre = re.compile('url="([^"]+)"') revre = re.compile('committed-rev="(\d+)"') @@ -234,7 +235,7 @@ def get_svn_revision(self): log.warn("unrecognized .svn/entries format; skipping %s", base) dirs[:] = [] continue - + data = map(str.splitlines,data.split('\n\x0c\n')) del data[0][0] # get rid of the '8' or '9' or '10' dirurl = data[0][3] diff --git a/setuptools/tests/entries-v10 b/setuptools/tests/entries-v10 new file mode 100644 index 0000000000..4446c50137 --- /dev/null +++ b/setuptools/tests/entries-v10 @@ -0,0 +1,615 @@ +10 + +dir +89001 +http://svn.python.org/projects/sandbox/branches/setuptools-0.6 +http://svn.python.org/projects + + + +2013-06-03T17:26:03.052972Z +89000 +phillip.eby + + + + + + + + + + + + + + +6015fed2-1504-0410-9fe1-9d1591cc4771 + +api_tests.txt +file + + + + +2013-06-19T13:20:47.948712Z +dec366372ca14fbeaeb26f492bcf5725 +2013-05-15T22:04:59.389374Z +88997 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +12312 + +setuptools.egg-info +dir + +README.txt +file + + + + +2013-06-19T13:20:47.948712Z +26f0dd5d095522ba3ad999b6b6777b92 +2011-05-31T20:10:56.416725Z +88846 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +7615 + +easy_install.py +file + + + + +2013-06-19T13:20:47.948712Z +97b52fe7253bf4683f9f626f015eb72e +2006-09-20T20:48:18.716070Z +51935 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +126 + +setuptools +dir + +launcher.c +file + + + + +2013-06-19T13:20:47.924700Z +e5a8e77de9022688b80f77fc6d742fee +2009-10-19T21:03:29.785400Z +75544 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +7476 + +ez_setup.py +file + + + + +2013-06-19T13:20:47.924700Z +17e8ec5e08faccfcb08b5f8d5167ca14 +2011-01-20T18:50:00.815420Z +88124 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +8350 + +version +file + + + + +2013-06-19T13:20:47.924700Z +e456da09e0c9e224a56302f8316b6dbf +2007-01-09T19:21:05.921317Z +53317 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +1143 + +setup.py +file + + + + +2013-06-19T13:20:47.924700Z +d4e5b3c16bd61bfef6c0bb9377a3a3ea +2013-05-15T22:04:59.389374Z +88997 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +5228 + +release.sh +file + + + + +2013-06-19T13:20:47.932704Z +b1fd4054a1c107ff0f27baacd97be94c +2009-10-28T17:12:45.227140Z +75925 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +1044 + +pkg_resources.txt +file + + + + +2013-06-19T13:20:47.928702Z +f497e7c92a4de207cbd9ab1943f93388 +2009-10-12T20:00:02.336146Z +75385 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +94518 + +site.py +file + + + + +2013-06-19T13:20:47.932704Z +ebaac6fb6525f77ca950d22e6f8315df +2006-03-11T00:39:09.666740Z +42965 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +2362 + +version.dat +file + + + + +2013-06-19T13:20:47.932704Z +8e14ecea32b9874cd7d29277494554c0 +2009-10-28T17:12:45.227140Z +75925 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +80 + +virtual-python.py +file + + + + +2013-06-19T13:20:47.932704Z +aa857add3b5563238f0a904187f5ded9 +2005-10-17T02:26:39.000000Z +41262 +pje +has-props + + + + + + + + + + + + + + + + + + + + +3898 + +setup.cfg +file + + + + +2013-06-19T13:20:47.932704Z +eda883e744fce83f8107ad8dc8303536 +2006-09-21T22:26:48.050256Z +51965 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +296 + +setuptools.txt +file + + + + +2013-06-19T13:20:47.940708Z +11926256f06046b196eaf814772504e7 +2013-05-15T22:04:59.389374Z +88997 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +149832 + +pkg_resources.py +file + + + + +2013-06-19T13:20:47.940708Z +b63a30f5f0f0225a788c2c0e3430b3cf +2013-05-15T22:04:59.389374Z +88997 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +90397 + +tests +dir + +wikiup.cfg +file + + + + +2013-06-19T13:20:47.944710Z +34ad845a5e0a0b46458557fa910bf429 +2008-08-21T17:23:50.797633Z +65935 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +136 + +EasyInstall.txt +file + + + + +2013-06-19T13:20:47.944710Z +e97387c517f70fc18a377e42d19d64d4 +2013-05-15T22:04:59.389374Z +88997 +phillip.eby +has-props + + + + + + + + + + + + + + + + + + + + +82495 + diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py new file mode 100644 index 0000000000..f26a1f5191 --- /dev/null +++ b/setuptools/tests/test_egg_info.py @@ -0,0 +1,40 @@ +import os +import tempfile +import shutil +import unittest + +import pkg_resources +from setuptools.command import egg_info + +ENTRIES_V10 = pkg_resources.resource_string(__name__, 'entries-v10') +"An entries file generated with svn 1.6.17 against the legacy Setuptools repo" + +class TestEggInfo(unittest.TestCase): + + def setUp(self): + self.test_dir = tempfile.mkdtemp() + os.mkdir(os.path.join(self.test_dir, '.svn')) + + self.old_cwd = os.getcwd() + os.chdir(self.test_dir) + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.test_dir) + + def _write_entries(self, entries): + fn = os.path.join(self.test_dir, '.svn', 'entries') + entries_f = open(fn, 'wb') + entries_f.write(entries) + entries_f.close() + + def test_version_10_format(self): + """ + """ + self._write_entries(ENTRIES_V10) + rev = egg_info.egg_info.get_svn_revision() + self.assertEqual(rev, '89000') + + +def test_suite(): + return unittest.defaultTestLoader.loadTestsFromName(__name__) From e2b6f95a403f2152dacba8229ea8b91aecc3328e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 08:47:43 -0500 Subject: [PATCH 1262/8469] Reference parsed svn version variable instead of the whole of the data. Fixes #20 --- CHANGES.txt | 6 ++++++ setuptools/command/egg_info.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 77ab44aadb..d736ca2ca6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.4 +----- + +* Issue #20: Fix comparison of parsed SVN version on Python 3. + ----- 0.7.3 ----- diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5863d2d4bb..b283b28af1 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -231,7 +231,7 @@ def get_svn_revision(): else: try: svnver = int(data.splitlines()[0]) except: svnver=-1 - if data<8: + if svnver<8: log.warn("unrecognized .svn/entries format; skipping %s", base) dirs[:] = [] continue From af8cbefb0b5e07834e80bacc7278350b183ca63d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 08:51:21 -0500 Subject: [PATCH 1263/8469] Added tag 0.7.4 for changeset 85640475dda0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cc2b422560..1cc2fd4850 100644 --- a/.hgtags +++ b/.hgtags @@ -63,3 +63,4 @@ ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 024dd30ed702135f5328975042566e48cc479d7d 0.7.1 d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 d212e48e0cef689acba57ed017289c027660b23c 0.7.3 +85640475dda0621f20e11db0995fa07f51744a98 0.7.4 From aa2269f68c8708f6498300f7d0a93a3a5eba562f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 08:51:59 -0500 Subject: [PATCH 1264/8469] Bumped to 0.7.5 in preparation for next release. --- README.txt | 8 ++++---- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index 19b7c4713e..e0329345a2 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.4$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.5$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 909a551048..88d9540d30 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.4' +version = '0.7.5' # The full version, including alpha/beta/rc tags. -release = '0.7.4' +release = '0.7.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 668224937c..a0aa1299b3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.4" +DEFAULT_VERSION = "0.7.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index c3ed3f4536..8d2f0bc76f 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.4' +VERSION = '0.7.5' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index ece0370eef..8986e94935 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.4" +VERSION = "0.7.5" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index f7612bce09..6be7006a02 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.4' +__version__ = '0.7.5' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From cc4d57dcb6b12fe3b4bf20b9f848d71986723763 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 15:22:49 -0500 Subject: [PATCH 1265/8469] Restore Python 2.4 compatibility in test_easy_install. Fixes #21 --- setuptools/tests/test_easy_install.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 395056e723..d17a534047 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -272,11 +272,12 @@ def test_setup_requires(self): sys.stdout = StringIO.StringIO() sys.stderr = StringIO.StringIO() try: - reset_setup_stop_context( - lambda: run_setup(test_setup_py, ['install']) - ) - except SandboxViolation: - self.fail('Installation caused SandboxViolation') + try: + reset_setup_stop_context( + lambda: run_setup(test_setup_py, ['install']) + ) + except SandboxViolation: + self.fail('Installation caused SandboxViolation') finally: sys.stdout = old_stdout sys.stderr = old_stderr From 54cea58c9eb477f8d53c44a6555dbc1f7531fbb8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Jun 2013 15:24:41 -0500 Subject: [PATCH 1266/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d736ca2ca6..078b532f21 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.5 +----- + +* Issue #21: Restore Python 2.4 compatibility in ``test_easy_install``. + ----- 0.7.4 ----- From 0016f3777955977828aecdc47a9814506a434d7b Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 20 Jun 2013 09:43:59 +0200 Subject: [PATCH 1267/8469] Include Windows-specific files in tarball even when MANIFEST.in does not include them. --- release.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index 937fadfcb9..175e14631f 100644 --- a/release.py +++ b/release.py @@ -188,7 +188,9 @@ def upload_to_pypi(): cmd.extend([ 'upload_docs', '-r', PACKAGE_INDEX ]) - subprocess.check_call(cmd) + env = os.environ.copy() + env["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" + subprocess.check_call(cmd, env=env) def has_sphinx(): try: diff --git a/setup.py b/setup.py index 8afdf23531..432a43b5d2 100755 --- a/setup.py +++ b/setup.py @@ -121,7 +121,7 @@ def run(self): changes_file.close() package_data = {'setuptools': ['site-patch.py']} -if sys.platform == 'win32': +if sys.platform == 'win32' or os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0"): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) From 6d6dddc57e58e2387930040dfb56dd270408cb24 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 20 Jun 2013 10:03:23 +0200 Subject: [PATCH 1268/8469] Add support for SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT variable. Support for old DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT variable is kept temporarily for backward compatibility. --HG-- extra : source : eb58c3fe7c0881cbb28de1c523f083ad8e7f427d --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8986e94935..fcf61e753c 100755 --- a/setup.py +++ b/setup.py @@ -55,7 +55,8 @@ scripts = [] console_scripts = ["easy_install = setuptools.command.easy_install:main"] -if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: +if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \ + os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"): console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) # specific command that is used to generate windows .exe files From 72495bf98af2c556721126fceff8a5e7d8283a91 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 20 Jun 2013 10:03:23 +0200 Subject: [PATCH 1269/8469] Add support for SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT variable. Support for old DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT variable is kept temporarily for backward compatibility. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 432a43b5d2..d56c491ad9 100755 --- a/setup.py +++ b/setup.py @@ -56,7 +56,8 @@ scripts = [] console_scripts = ["easy_install = setuptools.command.easy_install:main"] -if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: +if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \ + os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"): console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) # specific command that is used to generate windows .exe files From d26d42296c45c25703e7c1fb76bf78fc5aa8347e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Fri, 28 Jun 2013 21:55:47 -0500 Subject: [PATCH 1270/8469] Quick addition to get past svn test in another package. --HG-- extra : rebase_source : a36601a66f574d7c0919b7c885dcae7b820bb7dd --- setuptools/command/egg_info.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 642687b23f..7daaee0f50 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -15,6 +15,9 @@ safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename from setuptools.command.sdist import walk_revctrl +#requires python >= 2.4 +from subprocess import Popen as _Popen, PIPE as _PIPE + class egg_info(Command): description = "create a distribution's .egg-info directory" @@ -216,6 +219,8 @@ def get_svn_revision(): revision = 0 urlre = re.compile('url="([^"]+)"') revre = re.compile('committed-rev="(\d+)"') + urlre11 = re.compile('([^<>]+)') + revre11 = re.compile(']*revision="(\d+)"') for base,dirs,files in os.walk(os.curdir): if '.svn' not in dirs: @@ -236,11 +241,17 @@ def get_svn_revision(): log.warn("unrecognized .svn/entries format; skipping %s", base) dirs[:] = [] continue + elif svnver > 10: + p = _Popen(['svn', 'info', '--xml'], stdout=_PIPE, shell=(sys.platform=='win32')) + data = unicode(p.communicate()[0], encoding='utf-8') + dirurl = urlre11.search(data).group(1) + localrev = max([int(m.group(1)) for m in revre11.finditer(data)]+[0]) + else: + data = list(map(str.splitlines,data.split('\n\x0c\n'))) + del data[0][0] # get rid of the '8' or '9' or '10' + dirurl = data[0][3] + localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) - data = list(map(str.splitlines,data.split('\n\x0c\n'))) - del data[0][0] # get rid of the '8' or '9' or '10' - dirurl = data[0][3] - localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) if base==os.curdir: base_url = dirurl+'/' # save the root url elif not dirurl.startswith(base_url): @@ -253,6 +264,8 @@ def get_svn_revision(): + + def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info,"SOURCES.txt") From d259c91f17d0bf9a0ac91d61d0ea0c0b5e7f618f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:40:04 -0400 Subject: [PATCH 1271/8469] update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4036e94919..e4fcc37ea9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,10 @@ CHANGES ----- * Issue #21: Restore Python 2.4 compatibility in ``test_easy_install``. +* Distribute #375: Merged additional warning from Distribute 0.6.46. +* Now honor the environment variable + ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now + deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``. ----- 0.7.4 From f5a609f696a9fdc85cefd09f97865282fa341631 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:47:03 -0400 Subject: [PATCH 1272/8469] Add comment to capture the purpose of the environment variable --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index fcf61e753c..cb0ce01230 100755 --- a/setup.py +++ b/setup.py @@ -55,6 +55,10 @@ scripts = [] console_scripts = ["easy_install = setuptools.command.easy_install:main"] + +# Gentoo distributions manage the python-version-specific scripts themselves, +# so they define an environment variable to suppress the creation of the +# version-specific scripts. if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \ os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"): console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) From 0c7de199c1a686ba1577ceb5bfce8ac43667faf7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:53:50 -0400 Subject: [PATCH 1273/8469] Added tag 0.7.5 for changeset dd5bbc116c53 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1cc2fd4850..f67224cd68 100644 --- a/.hgtags +++ b/.hgtags @@ -64,3 +64,4 @@ ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 d212e48e0cef689acba57ed017289c027660b23c 0.7.3 85640475dda0621f20e11db0995fa07f51744a98 0.7.4 +dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 From b99749aa06cc7c235cb456a81ad50187d701fc4c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:54:10 -0400 Subject: [PATCH 1274/8469] Bumped to 0.7.6 in preparation for next release. --- README.txt | 8 ++++---- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index e0329345a2..bb57ea7674 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.5/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.5$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.6$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 88d9540d30..0cae162181 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.5' +version = '0.7.6' # The full version, including alpha/beta/rc tags. -release = '0.7.5' +release = '0.7.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index a0aa1299b3..f68388f11a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.5" +DEFAULT_VERSION = "0.7.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 8d2f0bc76f..46f32bbc9a 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.5' +VERSION = '0.7.6' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index cb0ce01230..f2bd1fd526 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.5" +VERSION = "0.7.6" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 6be7006a02..5920170ba3 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.5' +__version__ = '0.7.6' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 3013f393422403874c383cf8a07783cbe770b339 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 11:09:12 -0400 Subject: [PATCH 1275/8469] Added tag 0.8b2 for changeset 512744f3f306 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cf5cd38e36..2ee2b6682b 100644 --- a/.hgtags +++ b/.hgtags @@ -67,3 +67,4 @@ d212e48e0cef689acba57ed017289c027660b23c 0.7.3 85640475dda0621f20e11db0995fa07f51744a98 0.7.4 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 +512744f3f306aea0fdde4cfd600af8b2d6e773e7 0.8b2 From 0f89549e4bfdbc404deaf1f62fe8d95f5220416d Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 29 Jun 2013 16:54:17 -0500 Subject: [PATCH 1276/8469] Add svn_util.py http://bugs.python.org/setuptools/file51/svn_versioning_2.patch by Jason Coombs --HG-- extra : rebase_source : 4004028579ee1efa18c8326c664876f99048e6f6 --- setuptools/svn_utils.py | 110 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 setuptools/svn_utils.py diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py new file mode 100644 index 0000000000..2a200fdf7b --- /dev/null +++ b/setuptools/svn_utils.py @@ -0,0 +1,110 @@ +import os +import re + +def get_entries_files(base, recurse=True): + for base,dirs,files in os.walk(os.curdir): + if '.svn' not in dirs: + dirs[:] = [] + continue # no sense walking uncontrolled subdirs + dirs.remove('.svn') + f = open(os.path.join(base,'.svn','entries')) + yield f.read() + f.close() + +class SVNEntries(object): + def __init__(self, data): + self.data = data + + @classmethod + def load(class_, base): + filename = os.path.join(base, '.svn', 'entries') + f = open(filename) + result = SVNEntries.read(f) + f.close() + return result + + @classmethod + def read(class_, file): + data = file.read() + is_xml = data.startswith('revision_line_number + and section[revision_line_number] + ] + return rev_numbers + + def get_undeleted_records(self): + undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') + result = [ + section[0] + for section in self.get_sections() + if undeleted(section) + ] + return result + +class SVNEntriesXML(SVNEntries): + def is_valid(self): + return True + + def get_url(self): + "Get repository URL" + urlre = re.compile('url="([^"]+)"') + return urlre.search(self.data).group(1) + + def parse_revision_numbers(self): + revre = re.compile('committed-rev="(\d+)"') + return [ + int(m.group(1)) + for m in revre.finditer(self.data) + ] + + def get_undeleted_records(self): + entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I) + results = [ + unescape(match.group(1)) + for match in entries_pattern.finditer(self.data) + ] + return results + From 89e84d11a149696aab37645db0b9c4f50fded1f7 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 00:13:56 -0500 Subject: [PATCH 1277/8469] Added a class for getting SVN information with a cmd. Using XML because the regular output is probably internationalized. Need to inspect setuptools/command/egg_info.py setuptools/command/sdist.py setuptools/package_index.py to see how used again to see if we will every be parsing a raw XML file or if always from .svn/enteries, if so looks like we can just replace the whole of the file parsing. --HG-- extra : rebase_source : 5e10e3b43fbe12f890d09923c1050f8384db7f84 --- setuptools/svn_utils.py | 116 ++++++++++++++++++++++++++++++++++------ 1 file changed, 100 insertions(+), 16 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 2a200fdf7b..ad3b5f1585 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -1,6 +1,10 @@ import os import re +#requires python >= 2.4 +from subprocess import Popen as _Popen, PIPE as _PIPE + + def get_entries_files(base, recurse=True): for base,dirs,files in os.walk(os.curdir): if '.svn' not in dirs: @@ -12,6 +16,17 @@ def get_entries_files(base, recurse=True): f.close() class SVNEntries(object): + known_svn_versions = { + '1.4.x': 8, + '1.5.x': 9, + '1.6.x': 10, + #11 didn't exist (maybe 1.7-dev) + #12 is the number in the file there is another + #number in .svn/wb.db that is at larger so + #looks like they won't be updating it any longer. + '1.7.x+': 12, + } + def __init__(self, data): self.data = data @@ -26,8 +41,27 @@ def load(class_, base): @classmethod def read(class_, file): data = file.read() - is_xml = data.startswith(']*path="(\.+)">', re.I) + entryre = re.compile(r'', re.M or re.I) + urlre = re.compile('(.*?)', re.I) + revre = re.compile(']*revision="(\d+)"', re.I) + namere = re.compile('(.*?)', re.I) + + def __get_cached_dir_data(self): + return self.dir_data + + def __get_cached_entries(self): + return self.entries + + def is_valid(self): + return bool(self.get_dir_data()) + + def get_dir_data(self): + #regard the shell argument, see: http://bugs.python.org/issue8557 + # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path + proc = _Popen(['svn', 'info', '--xml', self.path], + stdout=_PIPE, shell=(sys.platform=='win32')) + data = unicode(proc.communicate()[0], encoding='utf-8') + self.dir_data = self.entryre.findall(data) + self.get_dir_data = self.__get_cached_dir_data + return self.dir_data + + def get_entries(self): + #regard the shell argument, see: http://bugs.python.org/issue8557 + # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path + proc = _Popen(['svn', 'list', '--xml', self.path], + stdout=_PIPE, shell=(sys.platform=='win32')) + data = unicode(proc.communicate()[0], encoding='utf-8') + self.dir_data = self.entryre.findall(data) + self.get_dir_data = self.__get_cached_dir_data + return self.dir_data + + def get_url(self): + "Get repository URL" + return self.urlre.search(self.get_sections()[0]).group(1) + + def parse_revision_numbers(self): + #NOTE: if one has recently commited, the new revision doesn't get updated until svn update + if not self.is_valid(): + return list() + else: + return [ + int(m.group(1)) + for entry in self.get_enteries() + for m in self.revre.finditer(entry) + ] + + def get_undeleted_records(self): + #NOTE: Need to pars enteries? + if not self.is_valid(): + return list() + else: + return [ + m.group(1)) + for entry in self.get_enteries() + for m in self.namere.finditer(entry) + ] + From fa323cad32fa1804f84b6421417828fbc9b15da0 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 00:30:48 -0500 Subject: [PATCH 1278/8469] cleaned up the svn module, I think I can drop the old entry parsing all together --HG-- extra : rebase_source : 16b995fc27ea40fff0dd51734aea47775ff0033a --- setuptools/svn_utils.py | 86 +++++++---------------------------------- 1 file changed, 15 insertions(+), 71 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index ad3b5f1585..3311d9cf32 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -15,96 +15,40 @@ def get_entries_files(base, recurse=True): yield f.read() f.close() +#It would seem that svn info --xml and svn list --xml were fully supported by 1.3.x +#the special casing of the entry files seem to start at 1.4.x, so if we check +#for xml in entries and then fall back to the command line, this should catch everything. + class SVNEntries(object): - known_svn_versions = { - '1.4.x': 8, - '1.5.x': 9, - '1.6.x': 10, - #11 didn't exist (maybe 1.7-dev) - #12 is the number in the file there is another - #number in .svn/wb.db that is at larger so - #looks like they won't be updating it any longer. - '1.7.x+': 12, - } - - def __init__(self, data): + + def __init__(self, path, data): + self.path = path self.data = data @classmethod def load(class_, base): filename = os.path.join(base, '.svn', 'entries') f = open(filename) - result = SVNEntries.read(f) + result = SVNEntries.read(f, None) f.close() return result @classmethod - def read(class_, file): + def read(class_, file, path=None): data = file.read() if data.startswith('revision_line_number - and section[revision_line_number] - ] - return rev_numbers - - def get_undeleted_records(self): - undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') - result = [ - section[0] - for section in self.get_sections() - if undeleted(section) - ] - return result - class SVNEntriesXML(SVNEntries): def is_valid(self): return True @@ -171,7 +115,7 @@ def get_url(self): return self.urlre.search(self.get_sections()[0]).group(1) def parse_revision_numbers(self): - #NOTE: if one has recently commited, the new revision doesn't get updated until svn update + #NOTE: if one has recently committed, the new revision doesn't get updated until SVN update if not self.is_valid(): return list() else: @@ -182,7 +126,7 @@ def parse_revision_numbers(self): ] def get_undeleted_records(self): - #NOTE: Need to pars enteries? + #NOTE: Need to parse entities? if not self.is_valid(): return list() else: From 82a8940be2ae4f000a95a964b0d945175a0a7cd7 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 02:04:47 -0500 Subject: [PATCH 1279/8469] added querying externals to the classes --HG-- extra : rebase_source : 9b76763b0ba0dc1ac6de130b04f6bb5ebf546fe6 --- setuptools/svn_utils.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 3311d9cf32..d36f64eaa5 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -49,6 +49,28 @@ def parse_revision(self): all_revs = self.parse_revision_numbers() + [0] return max(all_revs) + def __get_cached_external_dirs(self): + return self.external_dirs + + def get_external_dirs(self): + #regard the shell argument, see: http://bugs.python.org/issue8557 + # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path + proc = _Popen(['svn', 'propget', self.path], + stdout=_PIPE, shell=(sys.platform=='win32')) + data = unicode(proc.communicate()[0], encoding='utf-8').splitlines() + data = [line.split() for line in data] + + # http://svnbook.red-bean.com/en/1.6/svn.advanced.externals.html + #there appears to be three possible formats for externals since 1.5 + #but looks like we only need the local relative path names so it's just + #2 either the first column or the last (of 2 or 3) + index = -1 + if all("://" in line[-1] for line in data): + index = 0 + + self.external_dirs = [line[index] for line in data] + return self.dir_data + class SVNEntriesXML(SVNEntries): def is_valid(self): return True From fa86abbd33b3576c3218bc6003042b1a635b6519 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Jun 2013 13:04:07 -0400 Subject: [PATCH 1280/8469] Added tag 0.8b3 for changeset 8af9839a7640 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2ee2b6682b..905e248cdf 100644 --- a/.hgtags +++ b/.hgtags @@ -68,3 +68,4 @@ d212e48e0cef689acba57ed017289c027660b23c 0.7.3 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 512744f3f306aea0fdde4cfd600af8b2d6e773e7 0.8b2 +8af9839a76407eebf3610fcd3e7973f1625abaa2 0.8b3 From 8d389a37b8237d9dfb3f2b92baf79acda9c5b3f1 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 13:13:33 -0500 Subject: [PATCH 1281/8469] Added SVNTextEntries for the moment as a fallback for no SVN/Rev8-10 Added Externals processing for all formats Will use dir-prop[-base] as a fallback otherwise CMD. --HG-- extra : rebase_source : dc27f779f22d5f9795c425b92d34db29d62b495d --- setuptools/command/egg_info.py | 36 +++------ setuptools/command/sdist.py | 45 ++--------- setuptools/svn_utils.py | 135 +++++++++++++++++++++++++++++---- 3 files changed, 135 insertions(+), 81 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 7daaee0f50..7ed50d7374 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -9,6 +9,7 @@ from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring +from setuptools import svn_util from distutils.util import convert_path from distutils.filelist import FileList as _FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ @@ -217,40 +218,21 @@ def tags(self): @staticmethod def get_svn_revision(): revision = 0 - urlre = re.compile('url="([^"]+)"') - revre = re.compile('committed-rev="(\d+)"') - urlre11 = re.compile('([^<>]+)') - revre11 = re.compile(']*revision="(\d+)"') for base,dirs,files in os.walk(os.curdir): if '.svn' not in dirs: dirs[:] = [] continue # no sense walking uncontrolled subdirs dirs.remove('.svn') - f = open(os.path.join(base,'.svn','entries')) - data = f.read() - f.close() - if data.startswith(' 10: - p = _Popen(['svn', 'info', '--xml'], stdout=_PIPE, shell=(sys.platform=='win32')) - data = unicode(p.communicate()[0], encoding='utf-8') - dirurl = urlre11.search(data).group(1) - localrev = max([int(m.group(1)) for m in revre11.finditer(data)]+[0]) - else: - data = list(map(str.splitlines,data.split('\n\x0c\n'))) - del data[0][0] # get rid of the '8' or '9' or '10' - dirurl = data[0][3] - localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) + enteries = svn_util.SVNEntries.load(base) + if not entries.is_valid: + log.warn(" get_svn_revision: Cannot determine how to read enteries.") + dirs[:] = [] + continue + + localrev = entries.parse_revsion() + dirurl = entries.get_url() if base==os.curdir: base_url = dirurl+'/' # save the root url diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 39cd604396..e0c4b7e51c 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,6 +4,7 @@ from glob import glob import os, re, sys, pkg_resources from glob import glob +from setuptools.svn_util import SVNEntries READMES = ('README', 'README.rst', 'README.txt') @@ -61,49 +62,13 @@ def _default_revctrl(dirname=''): def externals_finder(dirname, filename): """Find any 'svn:externals' directories""" - found = False - f = open(filename,'rt') - for line in iter(f.readline, ''): # can't use direct iter! - parts = line.split() - if len(parts)==2: - kind,length = parts - data = f.read(int(length)) - if kind=='K' and data=='svn:externals': - found = True - elif kind=='V' and found: - f.close() - break - else: - f.close() - return - - for line in data.splitlines(): - parts = line.split() - if parts: - yield joinpath(dirname, parts[0]) - + for name in SVNEntries.load(dirname).get_external_dirs(filename): + yield joinpath(dirname, name) -entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I) def entries_finder(dirname, filename): - f = open(filename,'rU') - data = f.read() - f.close() - if data.startswith('=6 and record[5]=="delete": - continue # skip deleted - yield joinpath(dirname, record[0]) + for record in SVNEntries.load(dirname).get_undeleted_records(): + yield joinpath(dirname, record) finders = [ diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index d36f64eaa5..dff1c4b0e4 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -19,14 +19,29 @@ def get_entries_files(base, recurse=True): #the special casing of the entry files seem to start at 1.4.x, so if we check #for xml in entries and then fall back to the command line, this should catch everything. +#TODO add the text entry back, and make its use dependent on the non existence of svn? + class SVNEntries(object): + svn_tool_version = '' def __init__(self, path, data): self.path = path self.data = data + if not self.svn_tool_version: + self.svn_tool_version = self.get_svn_tool_version() + + @staticmethod + def get_svn_tool_version(): + proc = _Popen(['svn', 'propget', self.path], + stdout=_PIPE, shell=(sys.platform=='win32')) + data = unicode(proc.communicate()[0], encoding='utf-8') + if data is not not: + return data.strip() + else: + return '' @classmethod - def load(class_, base): + def load_dir(class_, base): filename = os.path.join(base, '.svn', 'entries') f = open(filename) result = SVNEntries.read(f, None) @@ -41,9 +56,14 @@ def read(class_, file, path=None): #entries were originally xml so pre-1.4.x return SVNEntriesXML(data, path) else if path is None: - raise ValueError('Must have path to call svn') + result = SVNEntriesText(data, path) else: - return SVNEntriesCMD(data, path) + class_.svn_tool_version = class_.get_svn_tool_version() + result = SVNEntriesText(data, path) + if result.is_valid(): + return svnentriescmd(data, path) + else: + return result def parse_revision(self): all_revs = self.parse_revision_numbers() + [0] @@ -52,12 +72,29 @@ def parse_revision(self): def __get_cached_external_dirs(self): return self.external_dirs - def get_external_dirs(self): - #regard the shell argument, see: http://bugs.python.org/issue8557 - # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path - proc = _Popen(['svn', 'propget', self.path], - stdout=_PIPE, shell=(sys.platform=='win32')) - data = unicode(proc.communicate()[0], encoding='utf-8').splitlines() + def __get_externals_data(self, filename): + found = False + f = open(filename,'rt') + for line in iter(f.readline, ''): # can't use direct iter! + parts = line.split() + if len(parts)==2: + kind,length = parts + data = f.read(int(length)) + if kind=='K' and data=='svn:externals': + found = True + elif kind=='V' and found: + f.close() + break + else: + f.close() + return '' + + def get_external_dirs(self, filename): + data = self.__get_externals_data(filename) + + if not data: + return + data = [line.split() for line in data] # http://svnbook.red-bean.com/en/1.6/svn.advanced.externals.html @@ -65,11 +102,63 @@ def get_external_dirs(self): #but looks like we only need the local relative path names so it's just #2 either the first column or the last (of 2 or 3) index = -1 - if all("://" in line[-1] for line in data): + if all("://" in line[-1] or not line[-1] for line in data): index = 0 - - self.external_dirs = [line[index] for line in data] - return self.dir_data + + self.external_dirs = [line[index] for line in data if line[index]] + self.get_external_dirs = self.__get_cached_external_dirs + return self.external_dirs + +class SVNEntriesText(SVNEntries): + known_svn_versions = { + '1.4.x': 8, + '1.5.x': 9, + '1.6.x': 10, + } + + def __get_cached_sections(self): + return self.sections + + def get_sections(self): + SECTION_DIVIDER = '\f\n' # or '\n\x0c\n'? + sections = self.data.split(SECTION_DIVIDER) + sections = list(map(str.splitlines, sections)) + try: + # remove the SVN version number from the first line + svn_version = int(sections[0].pop(0)) + if not svn_version in self.known_svn_versions.values(): + log.warn("Unknown subversion verson %d", svn_version) + except ValueError: + return + self.sections = sections + self.get_sections = self.__get_cached_sections + return self.sections + + def is_valid(self): + return bool(self.get_sections()) + + def get_url(self): + return self.get_sections()[0][4] + + def parse_revision_numbers(self): + revision_line_number = 9 + rev_numbers = [ + int(section[revision_line_number]) + for section in self.get_sections() + if len(section)>revision_line_number + and section[revision_line_number] + ] + return rev_numbers + + def get_undeleted_records(self): + undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') + result = [ + section[0] + for section in self.get_sections() + if undeleted(section) + ] + return result + class SVNEntriesXML(SVNEntries): def is_valid(self): @@ -85,6 +174,7 @@ def parse_revision_numbers(self): return [ int(m.group(1)) for m in revre.finditer(self.data) + if m.group(1) ] def get_undeleted_records(self): @@ -92,6 +182,7 @@ def get_undeleted_records(self): results = [ unescape(match.group(1)) for match in entries_pattern.finditer(self.data) + if m.group(1) ] return results @@ -145,6 +236,7 @@ def parse_revision_numbers(self): int(m.group(1)) for entry in self.get_enteries() for m in self.revre.finditer(entry) + if m.group(1) ] def get_undeleted_records(self): @@ -155,6 +247,21 @@ def get_undeleted_records(self): return [ m.group(1)) for entry in self.get_enteries() - for m in self.namere.finditer(entry) + for m in self.namere.finditer(entry) + if m.group(1) ] + def __get_externals_data(self, filename): + + #othewise will be called twice. + if filename.lower() != 'dir-props': + return '' + + #regard the shell argument, see: http://bugs.python.org/issue8557 + # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path + proc = _Popen(['svn', 'propget', self.path], + stdout=_PIPE, shell=(sys.platform=='win32')) + try: + return unicode(proc.communicate()[0], encoding='utf-8').splitlines() + except ValueError: + return '' From e944e616cd78173151a2533b50ce664a8bffa526 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 17:16:31 -0500 Subject: [PATCH 1282/8469] Added an svn test module (needs fixing) Added a small externals example for tests (currently not used) --HG-- extra : rebase_source : 5f2b31f8aa68a4b4f30e071b8b4bdad98c2cc595 --- setuptools/tests/svn17_example.zip | Bin 0 -> 1656 bytes setuptools/tests/test_svn.py | 73 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 setuptools/tests/svn17_example.zip create mode 100644 setuptools/tests/test_svn.py diff --git a/setuptools/tests/svn17_example.zip b/setuptools/tests/svn17_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..d208f42c052187c23ff5c59870948278194c241c GIT binary patch literal 1656 zcmWIWW@h1H0D-C1_ng2CC?Nu*i_7v1&Er!m5_1c3QuXsoGE$5515k97Oiz+v2dV^N zX&gFAQj1IU3MvZ{i;ER_xe)q)RNZqjKkn$k4b%t15*Yf6QWH~hQ}s$JN}z5qL^0qX z&;XzwIFJIeP@POoi@uRcSN{g@WF+69OaXMhpN z03!^SKZty@jyMC1K?WG37$Dn$>UGSpNAkK6lHWlZk^QcK&+kV1SUgXX)yCvnZH&um zE}fM;Y9;l`cLfnfjy0uTx<3Bgi5stM@n9;B6#K>= 2.4 +from subprocess import call as _call + +def _remove_dir(target): + + #on windows this seems to a problem + for dir_path, dirs, files in os.walk(target): + os.chmod(dir_path, stat.S_IWRITE) + for filename in files: + os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE) + shutil.rmtree(target) + +class TestEmptySvn(unittest.TestCase): + + + + def setUp(self): + self.temp_dir = tempfile.mkdtemp() + self.old_cwd = os.getcwd() + os.chdir(self.temp_dir) + #apparently there is a standing bug in python about having + #to use shell=True in windows to get a path search. + if _call(['svnadmin', 'create', 'svn'], shell=(sys.platform == 'win32')): + raise 'Failed to create SVN repository' + + self.svnrepo = os.path.join(self.temp_dir, 'svn') + + if _call(['svn', 'checkout', 'file:///' + self.svnrepo.replace('\\','/'), 'co']): + os.chdir(self.old_cwd) + _remove_dir(self.temp_dir) + raise 'Failed to checkout SVN repository' + + os.chdir(os.path.join(self.temp_dir, 'co')) + + def tearDown(self): + os.chdir(self.old_cwd) + _remove_dir(self.temp_dir) + + def test_can_get_revision_empty(self): + """Check that svn revision can be retrieved from an working set on an empty repository.""" + self.assertEquals('0', egg_info._get_svn_revision()) + + def test_can_get_revision_single_commit(self): + """Check that svn revision can be retrieved from an working set on an empty repository.""" + + open('README', 'w').close() + exitcode = _call(['svn', 'add', 'README'], shell=(sys.platform == 'win32')) + self.assertEqual(0, exitcode) + + exitcode = _call(['svn', 'commit', '-m', '"README added"'], shell=(sys.platform == 'win32')) + self.assertEqual(0, exitcode) + + exitcode = _call(['svn', 'update'], shell=(sys.platform == 'win32')) + self.assertEqual(0, exitcode) + + self.assertEquals('1', egg_info._get_svn_revision()) + + +def test_suite(): + return unittest.defaultTestLoader.loadTestsFromName(__name__) + From 05fbc85a834bbd43850e736ffbe3b081f4fc4a26 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 19:03:56 -0500 Subject: [PATCH 1283/8469] minor naming issues in egg_info.py --HG-- extra : rebase_source : d5877c7a9fe537d567d557bbcc7e89a596fa3c87 --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 7ed50d7374..4332111989 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -9,7 +9,7 @@ from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring -from setuptools import svn_util +from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ @@ -225,7 +225,7 @@ def get_svn_revision(): continue # no sense walking uncontrolled subdirs dirs.remove('.svn') - enteries = svn_util.SVNEntries.load(base) + entries = svn_utils.SVNEntries.load_dir(base) if not entries.is_valid: log.warn(" get_svn_revision: Cannot determine how to read enteries.") dirs[:] = [] From 0fd60933763224ddc0fe96b1c94831dd091da25b Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 19:04:15 -0500 Subject: [PATCH 1284/8469] minor naming issues sdist --HG-- extra : rebase_source : e7def1d2445a55291163753761d52922d1252dcb --- setuptools/command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index e0c4b7e51c..3614da5e7f 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,7 +4,7 @@ from glob import glob import os, re, sys, pkg_resources from glob import glob -from setuptools.svn_util import SVNEntries +from setuptools.svn_utils import SVNEntries READMES = ('README', 'README.rst', 'README.txt') @@ -62,7 +62,7 @@ def _default_revctrl(dirname=''): def externals_finder(dirname, filename): """Find any 'svn:externals' directories""" - for name in SVNEntries.load(dirname).get_external_dirs(filename): + for name in SVNEnteries.load(dirname).get_external_dirs(filename): yield joinpath(dirname, name) From 67212a8d81a3694ee075f75f5041542f1655dab1 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 19:05:00 -0500 Subject: [PATCH 1285/8469] minor cleanups, added imports, --HG-- extra : rebase_source : 3761997a8747b58e3d85bec53097116b9d6e166d --- setuptools/svn_utils.py | 118 +++++++++++++++++++++++----------------- 1 file changed, 68 insertions(+), 50 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index dff1c4b0e4..34adc75e95 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -1,25 +1,37 @@ import os import re +import sys +from distutils import log +from xml.sax.saxutils import unescape #requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE def get_entries_files(base, recurse=True): - for base,dirs,files in os.walk(os.curdir): + for base, dirs, _ in os.walk(os.curdir): if '.svn' not in dirs: dirs[:] = [] continue # no sense walking uncontrolled subdirs dirs.remove('.svn') - f = open(os.path.join(base,'.svn','entries')) + f = open(os.path.join(base, '.svn', 'entries')) yield f.read() f.close() -#It would seem that svn info --xml and svn list --xml were fully supported by 1.3.x -#the special casing of the entry files seem to start at 1.4.x, so if we check -#for xml in entries and then fall back to the command line, this should catch everything. +#It would seem that svn info --xml and svn list --xml were fully +#supported by 1.3.x the special casing of the entry files seem to start at +#1.4.x, so if we check for xml in entries and then fall back to the command +#line, this should catch everything. -#TODO add the text entry back, and make its use dependent on the non existence of svn? +#subprocess is called several times with shell=(sys.platform=='win32') +#see the follow for more information: +# http://bugs.python.org/issue8557 +# http://stackoverflow.com/questions/5658622/ +# python-subprocess-popen-environment-path + + +#TODO add the text entry back, and make its use dependent on the +# non existence of svn? class SVNEntries(object): svn_tool_version = '' @@ -30,12 +42,12 @@ def __init__(self, path, data): if not self.svn_tool_version: self.svn_tool_version = self.get_svn_tool_version() - @staticmethod + @staticmethod def get_svn_tool_version(): - proc = _Popen(['svn', 'propget', self.path], + proc = _Popen(['svn', '--version', '--quiet'], stdout=_PIPE, shell=(sys.platform=='win32')) data = unicode(proc.communicate()[0], encoding='utf-8') - if data is not not: + if data: return data.strip() else: return '' @@ -55,13 +67,13 @@ def read(class_, file, path=None): if data.startswith(']+deleted="true")', re.I) + entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', + re.I) results = [ unescape(match.group(1)) for match in entries_pattern.finditer(self.data) - if m.group(1) + if match.group(1) ] return results @@ -190,9 +210,9 @@ def get_undeleted_records(self): class SVNEntriesCMD(SVNEntries): entrypathre = re.compile(r']*path="(\.+)">', re.I) entryre = re.compile(r'', re.M or re.I) - urlre = re.compile('(.*?)', re.I) - revre = re.compile(']*revision="(\d+)"', re.I) - namere = re.compile('(.*?)', re.I) + urlre = re.compile(r'(.*?)', re.I) + revre = re.compile(r']*revision="(\d+)"', re.I) + namere = re.compile(r'(.*?)', re.I) def __get_cached_dir_data(self): return self.dir_data @@ -204,9 +224,8 @@ def is_valid(self): return bool(self.get_dir_data()) def get_dir_data(self): - #regard the shell argument, see: http://bugs.python.org/issue8557 - # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path - proc = _Popen(['svn', 'info', '--xml', self.path], + #regarding the shell argument, see: http://bugs.python.org/issue8557 + proc = _Popen(['svn', 'info', '--xml', self.path], stdout=_PIPE, shell=(sys.platform=='win32')) data = unicode(proc.communicate()[0], encoding='utf-8') self.dir_data = self.entryre.findall(data) @@ -214,39 +233,39 @@ def get_dir_data(self): return self.dir_data def get_entries(self): - #regard the shell argument, see: http://bugs.python.org/issue8557 - # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path - proc = _Popen(['svn', 'list', '--xml', self.path], + #regarding the shell argument, see: http://bugs.python.org/issue8557 + proc = _Popen(['svn', 'list', '--xml', self.path], stdout=_PIPE, shell=(sys.platform=='win32')) data = unicode(proc.communicate()[0], encoding='utf-8') - self.dir_data = self.entryre.findall(data) + self.entries = self.entryre.findall(data) self.get_dir_data = self.__get_cached_dir_data - return self.dir_data + return self.entries def get_url(self): "Get repository URL" - return self.urlre.search(self.get_sections()[0]).group(1) + return self.urlre.search(self.get_entries()[0]).group(1) def parse_revision_numbers(self): - #NOTE: if one has recently committed, the new revision doesn't get updated until SVN update + #NOTE: if one has recently committed, + # the new revision doesn't get updated until SVN update if not self.is_valid(): return list() else: return [ - int(m.group(1)) - for entry in self.get_enteries() + int(m.group(1)) + for entry in self.get_enries() for m in self.revre.finditer(entry) if m.group(1) ] - + def get_undeleted_records(self): #NOTE: Need to parse entities? if not self.is_valid(): return list() else: return [ - m.group(1)) - for entry in self.get_enteries() + m.group(1) + for entry in self.get_entries() for m in self.namere.finditer(entry) if m.group(1) ] @@ -258,8 +277,7 @@ def __get_externals_data(self, filename): return '' #regard the shell argument, see: http://bugs.python.org/issue8557 - # and http://stackoverflow.com/questions/5658622/python-subprocess-popen-environment-path - proc = _Popen(['svn', 'propget', self.path], + proc = _Popen(['svn', 'propget', self.path], stdout=_PIPE, shell=(sys.platform=='win32')) try: return unicode(proc.communicate()[0], encoding='utf-8').splitlines() From ec450c5e222fa97ff401ab80a650cbedf268f98c Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 19:06:22 -0500 Subject: [PATCH 1286/8469] Oops didn't return a value --HG-- extra : rebase_source : aebdebb47c60311cf7f81c4c7238dd25b6b8cadb --- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools.egg-info/requires.txt | 10 +-- setuptools/svn_utils.py | 2 +- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 64d167676d..2965458969 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -namespace_packages = setuptools.dist:check_nsp -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool - -[distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -test = setuptools.command.test:test -easy_install = setuptools.command.easy_install:easy_install -install_egg_info = setuptools.command.install_egg_info:install_egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -bdist_egg = setuptools.command.bdist_egg:bdist_egg -alias = setuptools.command.alias:alias -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -register = setuptools.command.register:register -build_py = setuptools.command.build_py:build_py -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -egg_info = setuptools.command.egg_info:egg_info -build_ext = setuptools.command.build_ext:build_ext - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..91d84d9ca8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 34adc75e95..52a1c07b80 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -68,7 +68,7 @@ def read(class_, file, path=None): #entries were originally xml so pre-1.4.x return SVNEntriesXML(data, path) elif path is None: - result = SVNEntriesText(data, path) + return SVNEntriesText(data, path) else: class_.svn_tool_version = class_.get_svn_tool_version() result = SVNEntriesText(data, path) From c7bd44256ce9f77a54e22561405b06690a805e94 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 21:11:35 -0500 Subject: [PATCH 1287/8469] Finished some 1.7 tests, and updated the zip file to include the .svn dirs Several fixes to get the code to pass the tests --HG-- extra : rebase_source : 76e13888a6efc871cc254076c7e58f201af24472 --- setuptools/command/egg_info.py | 2 +- setuptools/svn_utils.py | 69 +++++++++++++---------- setuptools/tests/svn17_example.zip | Bin 1656 -> 19342 bytes setuptools/tests/test_svn.py | 85 +++++++++++++++++------------ 4 files changed, 92 insertions(+), 64 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4332111989..9d30b12541 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -231,7 +231,7 @@ def get_svn_revision(): dirs[:] = [] continue - localrev = entries.parse_revsion() + localrev = entries.parse_revision() dirurl = entries.get_url() if base==os.curdir: diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 52a1c07b80..7d30d32258 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -45,7 +45,8 @@ def __init__(self, path, data): @staticmethod def get_svn_tool_version(): proc = _Popen(['svn', '--version', '--quiet'], - stdout=_PIPE, shell=(sys.platform=='win32')) + stdout=_PIPE, stderr=_PIPE, + shell=(sys.platform=='win32')) data = unicode(proc.communicate()[0], encoding='utf-8') if data: return data.strip() @@ -56,7 +57,7 @@ def get_svn_tool_version(): def load_dir(class_, base): filename = os.path.join(base, '.svn', 'entries') f = open(filename) - result = SVNEntries.read(f, None) + result = SVNEntries.read(f, base) f.close() return result @@ -66,16 +67,15 @@ def read(class_, file, path=None): if data.startswith(']*path="(\.+)">', re.I) - entryre = re.compile(r'', re.M or re.I) - urlre = re.compile(r'(.*?)', re.I) + entryre = re.compile(r'', re.DOTALL or re.I) + urlre = re.compile(r'(.*?)', re.I) revre = re.compile(r']*revision="(\d+)"', re.I) namere = re.compile(r'(.*?)', re.I) @@ -238,12 +247,12 @@ def get_entries(self): stdout=_PIPE, shell=(sys.platform=='win32')) data = unicode(proc.communicate()[0], encoding='utf-8') self.entries = self.entryre.findall(data) - self.get_dir_data = self.__get_cached_dir_data + self.get_entries = self.__get_cached_entries return self.entries def get_url(self): "Get repository URL" - return self.urlre.search(self.get_entries()[0]).group(1) + return self.urlre.search(self.get_dir_data()[0]).group(1) def parse_revision_numbers(self): #NOTE: if one has recently committed, @@ -253,7 +262,7 @@ def parse_revision_numbers(self): else: return [ int(m.group(1)) - for entry in self.get_enries() + for entry in self.get_entries() for m in self.revre.finditer(entry) if m.group(1) ] @@ -270,16 +279,18 @@ def get_undeleted_records(self): if m.group(1) ] - def __get_externals_data(self, filename): + def _get_externals_data(self, filename): #othewise will be called twice. - if filename.lower() != 'dir-props': + if os.path.basename(filename).lower() != 'dir-props': return '' #regard the shell argument, see: http://bugs.python.org/issue8557 - proc = _Popen(['svn', 'propget', self.path], + proc = _Popen(['svn', 'propget', 'svn:externals', self.path], stdout=_PIPE, shell=(sys.platform=='win32')) try: - return unicode(proc.communicate()[0], encoding='utf-8').splitlines() + lines = unicode(proc.communicate()[0], encoding='utf-8') + lines = [line for line in lines.splitlines() if line] + return lines except ValueError: return '' diff --git a/setuptools/tests/svn17_example.zip b/setuptools/tests/svn17_example.zip index d208f42c052187c23ff5c59870948278194c241c..cfabd2b2d4cb975d4bf160f5bd991e7bf28f8ec8 100644 GIT binary patch literal 19342 zcmch81zc2H7cVFwB@)uoNOy;zgmiaHcc-*SNK1E0hXT@#lynHv-60I1G|Zb3zk3nA zdi}ol-u8FqoWa@uz1BKw?{ofZuO%aX6AB&z+@f7)_`hC!`#=Ys?Hnx`*|iOvbu6sS z4d|`xjSXz+WxnfSAFGQ63;HGa!2O3F_6BzLbkLOCf8;X5&))G!1Oe0! zd|>_1-_}4!-@<^--r4?}42<6aG=l&@eg0}VpsVjiwl_Ah)z`Mxv9*7CMR0IGv+!jo zDA4c02f;72@aV`RGGuGhO_|6sYVT@9^lEp+U^>zQ_KYT^C7r?st#oxO>r!4;ET@A;#r zejW3#o{a3*I$xciGQSxX)R~c;*-&4PgM;0`kVTJ!#gLPgiGf|;kd4_;Plth($$-UB zmtCL1kQqEGt*(xp!4H%APbFq!y(aP172$UhgF3UZGU~H18!+f`>M*nD=yK?=>oGBL za4<4(GB7ad8nCkHbLz9ObNnswPgj!bQe*zyRQ49uU!?`Fjkh2uK~o9(0(DOa5%l%N z&(^Q6H^)hjPG9$vhPL@+J2u~*{$SbSS>9%8=wgE9P~5Cw0aawYbuzTPpl{ErevZOm+ld?Wy4r1qdcA-g|w~xmROp z_ALEo1-BfksA{P`y-D(sM@8=9w9~8;aHqC*r_7%7H7-snZOmS2Gwd^18FXjwRY-{L zwS9)-U5FEBydCrt#OKK+h;EhmpZIUn*ZIy8_@y>W&vyU>jv(uVzQ~_jEO?^CZSC6H zwV)3m*AvfE;g9l3C{W%otO|IP|1J)lk+OjSGeA6iUpy#$ zII`QW)7KZBI~JXUGF+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_dKm%9L{#&the+~4*eZ0=*3BSpBsbuD_(SEp**NbESp0*dTX4I?Ap(``e($PZaV~==S7EN#bAl^wFB^E~sQ(=1O7P@w zqhCk*kB445RrGI=zSiS@4|a8Zk@+UnrFKKV2m9mt++P{xdsT!%wdg;w?O#UuTB!TI zD%VSO!P;D^;`4j3KQ7$;l`7zR-OC2Pzvn+6{W69ER^gxPcP~K*K_@2YpW5SV80D%c z;6?gsjsiHh0NgGOQG{|GK@87Ga{Aa*_Tng|j z6-h4L3G@ke)REsya((dtKR&M)27oay9Tem4Z*BI&LIOs-x{!dAoxtr9F^cdPh~K9^ zUDf+K==ZDB)V~1zaVY^~f(83e1E)bP!P~T!7o9Wy}5$`G1;f*KG$*nYwIXC7FqTZ@Zs4;`J0NFyf_h4*vr24?Xb) z?JtDK1L$8B LXzDj{fxrD9{;(+L delta 34 kcmeC1&iI38!waU(hpcLtMOfJwfPe=GYnT}ro-u)V0JoF}kpKVy diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 90f213b475..1a41e4271c 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -3,18 +3,20 @@ import os +import zipfile import sys import tempfile import unittest import shutil import stat -import setuptools.command.egg_info as egg_info +from setuptools import svn_utils + #requires python >= 2.4 from subprocess import call as _call def _remove_dir(target): - + #on windows this seems to a problem for dir_path, dirs, files in os.walk(target): os.chmod(dir_path, stat.S_IWRITE) @@ -22,50 +24,65 @@ def _remove_dir(target): os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE) shutil.rmtree(target) -class TestEmptySvn(unittest.TestCase): +class TestSvnVersion(unittest.TestCase): + def test_no_svn_found(self): + old_path = os.environ['path'] + os.environ['path'] = '' + try: + version = svn_utils.SVNEntries.get_svn_tool_version() + self.assertEqual(version, '') + finally: + os.environ['path'] = old_path + def test_svn_should_exist(self): + version = svn_utils.SVNEntries.get_svn_tool_version() + self.assertNotEqual(version, '') - def setUp(self): - self.temp_dir = tempfile.mkdtemp() - self.old_cwd = os.getcwd() - os.chdir(self.temp_dir) - #apparently there is a standing bug in python about having - #to use shell=True in windows to get a path search. - if _call(['svnadmin', 'create', 'svn'], shell=(sys.platform == 'win32')): - raise 'Failed to create SVN repository' - self.svnrepo = os.path.join(self.temp_dir, 'svn') +class TestSvn_1_7(unittest.TestCase): - if _call(['svn', 'checkout', 'file:///' + self.svnrepo.replace('\\','/'), 'co']): - os.chdir(self.old_cwd) - _remove_dir(self.temp_dir) - raise 'Failed to checkout SVN repository' + def setUp(self): + self.temp_dir = tempfile.mkdtemp() + zip_file, source, target = [None, None, None] + try: + zip_file = zipfile.ZipFile(os.path.join('setuptools', 'tests', + 'svn17_example.zip')) + for files in zip_file.namelist(): + zip_file.extract(files, self.temp_dir) + finally: + if zip_file: + zip_file.close() + del zip_file - os.chdir(os.path.join(self.temp_dir, 'co')) + self.old_cwd = os.getcwd() + os.chdir(os.path.join(self.temp_dir, 'svn17_example')) def tearDown(self): os.chdir(self.old_cwd) _remove_dir(self.temp_dir) - def test_can_get_revision_empty(self): - """Check that svn revision can be retrieved from an working set on an empty repository.""" - self.assertEquals('0', egg_info._get_svn_revision()) - - def test_can_get_revision_single_commit(self): - """Check that svn revision can be retrieved from an working set on an empty repository.""" - - open('README', 'w').close() - exitcode = _call(['svn', 'add', 'README'], shell=(sys.platform == 'win32')) - self.assertEqual(0, exitcode) - - exitcode = _call(['svn', 'commit', '-m', '"README added"'], shell=(sys.platform == 'win32')) - self.assertEqual(0, exitcode) - - exitcode = _call(['svn', 'update'], shell=(sys.platform == 'win32')) - self.assertEqual(0, exitcode) + def test_svnentrycmd_is_valid(self): + entries = svn_utils.SVNEntries.load_dir('.') + self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) + self.assertTrue(entries.is_valid()) + + def test_svnentrycmd_is_valid(self): + entries = svn_utils.SVNEntries.load_dir('.') + self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) + self.assertTrue(entries.is_valid()) + self.assertEqual(entries.get_url(), + 'file:///C:/development/svn_example/repo1') + + def test_svnentrycmd_enteries(self): + entries = svn_utils.SVNEntries.load_dir('.') + self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) + self.assertEqual(entries.parse_revision(), 3) + self.assertEqual(set(entries.get_undeleted_records()), + set([u'readme.txt', u'other'])) + self.assertEqual(set(entries.get_external_dirs('dir-props')), + set([u'third_party3', u'third_party2', u'third_party'])) - self.assertEquals('1', egg_info._get_svn_revision()) def test_suite(): From bac43dea180fde8c14b990ee1117fba56b9ab435 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sun, 30 Jun 2013 22:02:20 -0500 Subject: [PATCH 1288/8469] py3 fixes --HG-- extra : rebase_source : 29629f51bacee1ae8394c559e4440dafcb9179d1 --- setuptools.egg-info/entry_points.txt | 96 ++++++++++++++-------------- setuptools/svn_utils.py | 41 ++++++------ 2 files changed, 66 insertions(+), 71 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2965458969..e5b7443aec 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - [console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points +zip_safe = setuptools.dist:assert_bool extras_require = setuptools.dist:check_extras use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages +use_2to3 = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +entry_points = setuptools.dist:check_entry_points +namespace_packages = setuptools.dist:check_nsp convert_2to3_doctests = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +use_2to3_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements tests_require = setuptools.dist:check_requirements +include_package_data = setuptools.dist:assert_bool -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +requires.txt = setuptools.command.egg_info:write_requirements +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[distutils.commands] +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_scripts = setuptools.command.install_scripts:install_scripts +build_ext = setuptools.command.build_ext:build_ext +install_lib = setuptools.command.install_lib:install_lib +develop = setuptools.command.develop:develop +sdist = setuptools.command.sdist:sdist +saveopts = setuptools.command.saveopts:saveopts +easy_install = setuptools.command.easy_install:easy_install +rotate = setuptools.command.rotate:rotate +install = setuptools.command.install:install +alias = setuptools.command.alias:alias +install_egg_info = setuptools.command.install_egg_info:install_egg_info +register = setuptools.command.register:register +egg_info = setuptools.command.egg_info:egg_info +bdist_egg = setuptools.command.bdist_egg:bdist_egg +test = setuptools.command.test:test +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 7d30d32258..86fed4d1b2 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -1,6 +1,7 @@ import os import re import sys +import codecs from distutils import log from xml.sax.saxutils import unescape @@ -8,15 +9,6 @@ from subprocess import Popen as _Popen, PIPE as _PIPE -def get_entries_files(base, recurse=True): - for base, dirs, _ in os.walk(os.curdir): - if '.svn' not in dirs: - dirs[:] = [] - continue # no sense walking uncontrolled subdirs - dirs.remove('.svn') - f = open(os.path.join(base, '.svn', 'entries')) - yield f.read() - f.close() #It would seem that svn info --xml and svn list --xml were fully #supported by 1.3.x the special casing of the entry files seem to start at @@ -28,7 +20,19 @@ def get_entries_files(base, recurse=True): # http://bugs.python.org/issue8557 # http://stackoverflow.com/questions/5658622/ # python-subprocess-popen-environment-path +def _run_command(args, stdout=_PIPE, stderr=_PIPE): + #regarding the shell argument, see: http://bugs.python.org/issue8557 + proc = _Popen(args, stdout=stdout, stderr=stderr, + shell=(sys.platform=='win32')) + data = proc.communicate()[0] + #TODO: this is probably NOT always utf-8 + try: + data = unicode(data, encoding='utf-8') + except NameError: + data = str(data, encoding='utf-8') + + return proc.returncode, data #TODO add the text entry back, and make its use dependent on the # non existence of svn? @@ -44,10 +48,7 @@ def __init__(self, path, data): @staticmethod def get_svn_tool_version(): - proc = _Popen(['svn', '--version', '--quiet'], - stdout=_PIPE, stderr=_PIPE, - shell=(sys.platform=='win32')) - data = unicode(proc.communicate()[0], encoding='utf-8') + _, data = _run_command(['svn', '--version', '--quiet']) if data: return data.strip() else: @@ -234,18 +235,14 @@ def is_valid(self): def get_dir_data(self): #regarding the shell argument, see: http://bugs.python.org/issue8557 - proc = _Popen(['svn', 'info', '--xml', self.path], - stdout=_PIPE, shell=(sys.platform=='win32')) - data = unicode(proc.communicate()[0], encoding='utf-8') + _, data = _run_command(['svn', 'info', '--xml', self.path]) self.dir_data = self.entryre.findall(data) self.get_dir_data = self.__get_cached_dir_data return self.dir_data def get_entries(self): #regarding the shell argument, see: http://bugs.python.org/issue8557 - proc = _Popen(['svn', 'list', '--xml', self.path], - stdout=_PIPE, shell=(sys.platform=='win32')) - data = unicode(proc.communicate()[0], encoding='utf-8') + _, data = _run_command(['svn', 'list', '--xml', self.path]) self.entries = self.entryre.findall(data) self.get_entries = self.__get_cached_entries return self.entries @@ -285,11 +282,9 @@ def _get_externals_data(self, filename): if os.path.basename(filename).lower() != 'dir-props': return '' - #regard the shell argument, see: http://bugs.python.org/issue8557 - proc = _Popen(['svn', 'propget', 'svn:externals', self.path], - stdout=_PIPE, shell=(sys.platform=='win32')) try: - lines = unicode(proc.communicate()[0], encoding='utf-8') + _, lines = _run_command(['svn', + 'propget', 'svn:externals', self.path]) lines = [line for line in lines.splitlines() if line] return lines except ValueError: From 4b83e45e7990de017b4982c963752dac0015e78c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:33:29 -0400 Subject: [PATCH 1289/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a2084ddbd0..587e336c51 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.6 +----- + +* Distribute #375: Repair AttributeError created in last release. + ----- 0.7.5 ----- From a6a5e085c5161eff974d4838a1d28c87af0305da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:33:54 -0400 Subject: [PATCH 1290/8469] Added tag 0.7.6 for changeset 48d3d26cbea6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 04e46e5cc8..b8bea36e42 100644 --- a/.hgtags +++ b/.hgtags @@ -67,3 +67,4 @@ d212e48e0cef689acba57ed017289c027660b23c 0.7.3 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 ee2c967017024197b38e39ced852808265387a4b 0.6.47 +48d3d26cbea68e21c96e51f01092e8fdead5cd60 0.7.6 From b69b0368a7201f5b21e8d4fd0fb1379db87090c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:34:20 -0400 Subject: [PATCH 1291/8469] Bumped to 0.7.7 in preparation for next release. --- README.txt | 8 ++++---- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index bb57ea7674..c3d5b3c640 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.6/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.6$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.7$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 0cae162181..a90d886676 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.6' +version = '0.7.7' # The full version, including alpha/beta/rc tags. -release = '0.7.6' +release = '0.7.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index f68388f11a..62bc0361ab 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.6" +DEFAULT_VERSION = "0.7.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 46f32bbc9a..a4f72f7251 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.6' +VERSION = '0.7.7' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index f2bd1fd526..9b1c67f70f 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.6" +VERSION = "0.7.7" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 5920170ba3..e93245abec 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.6' +__version__ = '0.7.7' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 50b0b7602fcda151cbf4ddfdade6abef96c9dd3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:44:43 -0400 Subject: [PATCH 1292/8469] Added tag 0.8b4 for changeset 5b3c7981a02b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 00e2bade8c..a9c0a4ccf7 100644 --- a/.hgtags +++ b/.hgtags @@ -71,3 +71,4 @@ dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 8af9839a76407eebf3610fcd3e7973f1625abaa2 0.8b3 ee2c967017024197b38e39ced852808265387a4b 0.6.47 48d3d26cbea68e21c96e51f01092e8fdead5cd60 0.7.6 +5b3c7981a02b4a86af1b10ae16492899b515d485 0.8b4 From b487b362c4c93cc90f0ad783040679ac2cebfdd9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:50:40 -0400 Subject: [PATCH 1293/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 31d6bc89de..2ea4ef4233 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.7 +----- + +* Distribute #375: Repair AttributeError created in last release (redo). + ----- 0.7.6 ----- From 1bc7b7b3dd81a74d4be2bc0c4e95ba8d29dc58d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:55:26 -0400 Subject: [PATCH 1294/8469] Issue #30: Added test for get_cache_path (but it doesn't yet get run) --- CHANGES.txt | 1 + tests/test_pkg_resources.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2ea4ef4233..b9a9e9f032 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ----- * Distribute #375: Repair AttributeError created in last release (redo). +* Issue #30: Added test for get_cache_path. ----- 0.7.6 diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 7009b4abc0..6e4a93482a 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -59,3 +59,11 @@ def test_resource_filename_rewrites_on_change(self): f = open(filename) assert f.read() == 'hello, world!' manager.cleanup_resources() + +class TestResourceManager(object): + def test_get_cache_path(self): + mgr = pkg_resources.ResourceManager() + path = mgr.get_cache_path('foo') + type_ = str(type(path)) + message = "Unexpected type from get_cache_path: " + type_ + assert isinstance(path, (unicode, str)), message From 178a4ab5c3af80c077572fd01d748084b35844e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 12:00:35 -0400 Subject: [PATCH 1295/8469] Patched test so it can be run on Python 3 --- tests/test_pkg_resources.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 6e4a93482a..f32561735c 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -5,6 +5,11 @@ import pkg_resources +try: + unicode +except NameError: + unicode = str + class EggRemover(unicode): def __call__(self): if self in sys.path: From d9b32bd186ce6804fca2df9ece07c2fabb1737e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 12:01:19 -0400 Subject: [PATCH 1296/8469] Added tag 0.7.7 for changeset 1506fa538fff --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 19abdaf7c5..d3012fe842 100644 --- a/.hgtags +++ b/.hgtags @@ -69,3 +69,4 @@ dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 ee2c967017024197b38e39ced852808265387a4b 0.6.47 48d3d26cbea68e21c96e51f01092e8fdead5cd60 0.7.6 cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 +1506fa538fff01e70424530a32a44e070720cf3c 0.7.7 From 83c974c56ebc4689171913da1a6af3249b56ec6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 12:01:32 -0400 Subject: [PATCH 1297/8469] Bumped to 0.7.8 in preparation for next release. --- README.txt | 8 ++++---- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index c3d5b3c640..77acd2bac1 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.7/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.7$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.8$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index a90d886676..8bbf4bea88 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.7' +version = '0.7.8' # The full version, including alpha/beta/rc tags. -release = '0.7.7' +release = '0.7.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 62bc0361ab..6baa9b9921 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.7" +DEFAULT_VERSION = "0.7.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index a4f72f7251..61e6862d88 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.7' +VERSION = '0.7.8' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index 9b1c67f70f..a4d6d55633 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.7" +VERSION = "0.7.8" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index e93245abec..104ea06498 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.7' +__version__ = '0.7.8' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 78c3e6b7b3a12d74416f43995d50b04bdb817f0b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 12:08:16 -0400 Subject: [PATCH 1298/8469] Fix test failure --- tests/test_pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 398f1acc04..dfa27120e8 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -56,7 +56,7 @@ def test_resource_filename_rewrites_on_change(self): zp = pkg_resources.ZipProvider(mod) filename = zp.get_resource_filename(manager, 'data.dat') assert os.stat(filename).st_mtime == 1368379500 - f = open(filename, 'wb') + f = open(filename, 'w') f.write('hello, world?') f.close() os.utime(filename, (1368379500, 1368379500)) From e0764d14a608fa8c2f420ea9f843072987a18a16 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 12:24:57 -0400 Subject: [PATCH 1299/8469] Added tag 0.8b5 for changeset 567939379497 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 426fff2ede..0bfb4aca92 100644 --- a/.hgtags +++ b/.hgtags @@ -74,3 +74,4 @@ ee2c967017024197b38e39ced852808265387a4b 0.6.47 5b3c7981a02b4a86af1b10ae16492899b515d485 0.8b4 cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 1506fa538fff01e70424530a32a44e070720cf3c 0.7.7 +5679393794978a1d3e1e087472b8a0fdf3d8423c 0.8b5 From ed30b72b2d7a36ca72cf5aedf84d771bbfbeef81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Jul 2013 14:16:40 -0400 Subject: [PATCH 1300/8469] No need to thunk here - the preferred module is already imported above --- pkg_resources.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index ec1ba1fb4a..74ab231ddb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1972,15 +1972,6 @@ def find_in_zip(importer, path_item, only=False): register_finder(zipimport.zipimporter, find_in_zip) -def StringIO(*args, **kw): - """Thunk to load the real StringIO on demand""" - global StringIO - try: - from cStringIO import StringIO - except ImportError: - from io import StringIO - return StringIO(*args,**kw) - def find_nothing(importer, path_item, only=False): return () register_finder(object,find_nothing) From 1cd926faeaf2c6206200317f328f16f9503879a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Jul 2013 14:21:23 -0400 Subject: [PATCH 1301/8469] Issue #32: Fixed TypeError in get_resource_stream on zipped eggs --- pkg_resources.py | 6 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 ++--- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 74ab231ddb..bbc2f09a10 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -28,7 +28,7 @@ try: basestring next = lambda o: o.next() - from cStringIO import StringIO + from cStringIO import StringIO as BytesIO def exec_(code, globs=None, locs=None): if globs is None: frame = sys._getframe(1) @@ -41,7 +41,7 @@ def exec_(code, globs=None, locs=None): exec("""exec code in globs, locs""") except NameError: basestring = str - from io import StringIO + from io import BytesIO exec_ = eval("exec") def execfile(fn, globs=None, locs=None): if globs is None: @@ -1402,7 +1402,7 @@ def get_resource_filename(self, manager, resource_name): return self._fn(self.module_path, resource_name) def get_resource_stream(self, manager, resource_name): - return StringIO(self.get_resource_string(manager, resource_name)) + return BytesIO(self.get_resource_string(manager, resource_name)) def get_resource_string(self, manager, resource_name): return self._get(self._fn(self.module_path, resource_name)) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 64d167676d..24461149e1 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -namespace_packages = setuptools.dist:check_nsp -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool - [distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -test = setuptools.command.test:test -easy_install = setuptools.command.easy_install:easy_install +build_py = setuptools.command.build_py:build_py install_egg_info = setuptools.command.install_egg_info:install_egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -bdist_egg = setuptools.command.bdist_egg:bdist_egg -alias = setuptools.command.alias:alias -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib register = setuptools.command.register:register -build_py = setuptools.command.build_py:build_py install_scripts = setuptools.command.install_scripts:install_scripts +alias = setuptools.command.alias:alias +saveopts = setuptools.command.saveopts:saveopts bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install = setuptools.command.install:install +setopt = setuptools.command.setopt:setopt +easy_install = setuptools.command.easy_install:easy_install egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_lib = setuptools.command.install_lib:install_lib +test = setuptools.command.test:test +rotate = setuptools.command.rotate:rotate [egg_info.writers] requires.txt = setuptools.command.egg_info:write_requirements -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries -top_level.txt = setuptools.command.egg_info:write_toplevel_names depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +use_2to3_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements +entry_points = setuptools.dist:check_entry_points +zip_safe = setuptools.dist:assert_bool +include_package_data = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages +eager_resources = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements +exclude_package_data = setuptools.dist:check_package_data +extras_require = setuptools.dist:check_extras +test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..2f2a364fa2 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [certs] certifi==0.0.8 [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file From 6ac7256ce1b286f9870ea203308333666fa552bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Jul 2013 14:26:25 -0400 Subject: [PATCH 1302/8469] Added tag 0.8b6 for changeset 26f59ec0f0f6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0bfb4aca92..816334d2c0 100644 --- a/.hgtags +++ b/.hgtags @@ -75,3 +75,4 @@ ee2c967017024197b38e39ced852808265387a4b 0.6.47 cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 1506fa538fff01e70424530a32a44e070720cf3c 0.7.7 5679393794978a1d3e1e087472b8a0fdf3d8423c 0.8b5 +26f59ec0f0f69714d28a891aaad048e3b9fcd6f7 0.8b6 From a40c11b0e8c045bc5b1f6e83e1014f3d6b94fe66 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 09:55:43 -0500 Subject: [PATCH 1303/8469] If using a command, we can query the working copy version directly. --HG-- extra : rebase_source : e329ddea4345c4acd90997e8994bd3715926cfbb --- setuptools/svn_utils.py | 52 +++++++++++++++++++++++++++--------- setuptools/tests/test_svn.py | 2 +- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 86fed4d1b2..c052f67147 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -216,14 +216,40 @@ def get_undeleted_records(self): ] return results +import xml.dom.pulldom class SVNEntriesCMD(SVNEntries): + # + # + # + # + # ... + # ... + # + # + # ... + # + # + # ... + # + # + # ... + # entrypathre = re.compile(r']*path="(\.+)">', re.I) entryre = re.compile(r'', re.DOTALL or re.I) urlre = re.compile(r'(.*?)', re.I) revre = re.compile(r']*revision="(\d+)"', re.I) namere = re.compile(r'(.*?)', re.I) + #svnversion return values (previous implementations return max revision) + # 4123:4168 mixed revision working copy + # 4168M modified working copy + # 4123S switched working copy + # 4123:4168MS mixed revision, modified, switched working copy + svnverre = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) + def __get_cached_dir_data(self): return self.dir_data @@ -251,18 +277,20 @@ def get_url(self): "Get repository URL" return self.urlre.search(self.get_dir_data()[0]).group(1) - def parse_revision_numbers(self): - #NOTE: if one has recently committed, - # the new revision doesn't get updated until SVN update - if not self.is_valid(): - return list() - else: - return [ - int(m.group(1)) - for entry in self.get_entries() - for m in self.revre.finditer(entry) - if m.group(1) - ] + + def parse_revision(self): + _, data = _run_command(['svnversion', self.path]) + parsed = self.svnverre.match(data) + if parsed: + log.warn('Parsed!') + try: + #No max needed this command summarizes working copy since 1.0 + return int(parsed.group(2)) + except ValueError: + #This should only happen if the revision is WAY too big. + pass + log.warn(repr(data)) + return 0 def get_undeleted_records(self): #NOTE: Need to parse entities? diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 1a41e4271c..b6950ea3fe 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -77,7 +77,7 @@ def test_svnentrycmd_is_valid(self): def test_svnentrycmd_enteries(self): entries = svn_utils.SVNEntries.load_dir('.') self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) - self.assertEqual(entries.parse_revision(), 3) + self.assertEqual(entries.parse_revision(), 4) self.assertEqual(set(entries.get_undeleted_records()), set([u'readme.txt', u'other'])) self.assertEqual(set(entries.get_external_dirs('dir-props')), From 6e9b5f8ca3b25013702055e1ffcec2c9ac074933 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 10:01:05 -0500 Subject: [PATCH 1304/8469] If using a command, we can query the working copy version directly. --HG-- extra : rebase_source : 0990530647692240d7b7126df1e1cdd5ae463ebb --- setuptools/svn_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index c052f67147..bbf10da7bc 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -277,6 +277,8 @@ def get_url(self): "Get repository URL" return self.urlre.search(self.get_dir_data()[0]).group(1) + def __get_cached_revision(self): + return self.revision def parse_revision(self): _, data = _run_command(['svnversion', self.path]) @@ -285,11 +287,12 @@ def parse_revision(self): log.warn('Parsed!') try: #No max needed this command summarizes working copy since 1.0 - return int(parsed.group(2)) + self.revision = int(parsed.group(2)) + self.parse_revision = self.__get_cached_revision + return self.revision except ValueError: #This should only happen if the revision is WAY too big. pass - log.warn(repr(data)) return 0 def get_undeleted_records(self): From 59532e4f0735aaf782119b5e9f353ab17a2b06ad Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 10:01:55 -0500 Subject: [PATCH 1305/8469] Remove some temporary logging --HG-- extra : rebase_source : f613c3c009ab69ab51c7de82b49ffaef63ea7461 --- setuptools/svn_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index bbf10da7bc..e46e5ab604 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -284,7 +284,6 @@ def parse_revision(self): _, data = _run_command(['svnversion', self.path]) parsed = self.svnverre.match(data) if parsed: - log.warn('Parsed!') try: #No max needed this command summarizes working copy since 1.0 self.revision = int(parsed.group(2)) From 6937c39c7f21cd6cda8271092b7672712e012674 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 11:06:35 -0500 Subject: [PATCH 1306/8469] get_url now uses pulldom --HG-- extra : rebase_source : 233926ea03e438c2e86546c62e555a007654cacd --- setuptools/svn_utils.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index e46e5ab604..57cf6849fc 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -4,12 +4,12 @@ import codecs from distutils import log from xml.sax.saxutils import unescape +import xml.dom.pulldom #requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE - #It would seem that svn info --xml and svn list --xml were fully #supported by 1.3.x the special casing of the entry files seem to start at #1.4.x, so if we check for xml in entries and then fall back to the command @@ -180,6 +180,7 @@ def parse_revision_numbers(self): return rev_numbers def get_undeleted_records(self): + #Note for self this skip and only returns the children undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') result = [ section[0] @@ -239,8 +240,6 @@ class SVNEntriesCMD(SVNEntries): # entrypathre = re.compile(r']*path="(\.+)">', re.I) entryre = re.compile(r'', re.DOTALL or re.I) - urlre = re.compile(r'(.*?)', re.I) - revre = re.compile(r']*revision="(\d+)"', re.I) namere = re.compile(r'(.*?)', re.I) #svnversion return values (previous implementations return max revision) @@ -257,13 +256,22 @@ def __get_cached_entries(self): return self.entries def is_valid(self): - return bool(self.get_dir_data()) + return self.get_dir_data() is not None def get_dir_data(self): - #regarding the shell argument, see: http://bugs.python.org/issue8557 + #This returns the info entry for the directory ONLY _, data = _run_command(['svn', 'info', '--xml', self.path]) - self.dir_data = self.entryre.findall(data) - self.get_dir_data = self.__get_cached_dir_data + + doc = xml.dom.pulldom.parseString(data) + self.dir_data = None + for event, node in doc: + if event=='START_ELEMENT' and node.nodeName=='entry': + doc.expandNode(node) + self.dir_data = node + break + + if self.dir_data: + self.get_dir_data = self.__get_cached_dir_data return self.dir_data def get_entries(self): @@ -273,9 +281,14 @@ def get_entries(self): self.get_entries = self.__get_cached_entries return self.entries + + def get_url(self): "Get repository URL" - return self.urlre.search(self.get_dir_data()[0]).group(1) + url_element = self.get_dir_data().getElementsByTagName("url")[0] + url_text = [t.nodeValue for t in url_element.childNodes + if t.nodeType == t.TEXT_NODE] + return "".join(url_text) def __get_cached_revision(self): return self.revision From b46fff3b028fb1c0c423eddd6d53ca9f70a10bb0 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 11:20:20 -0500 Subject: [PATCH 1307/8469] get_svn_method now direectly called svn_utils.parse_revision --HG-- extra : rebase_source : 4af53ce7fcf4d69c0d65800e57fabec7d081ce35 --- setuptools/command/egg_info.py | 26 +-------------------- setuptools/svn_utils.py | 41 ++++++++++++++++++---------------- setuptools/tests/test_svn.py | 4 ++++ 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9d30b12541..345ec8aec0 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -217,31 +217,7 @@ def tags(self): @staticmethod def get_svn_revision(): - revision = 0 - - for base,dirs,files in os.walk(os.curdir): - if '.svn' not in dirs: - dirs[:] = [] - continue # no sense walking uncontrolled subdirs - dirs.remove('.svn') - - entries = svn_utils.SVNEntries.load_dir(base) - if not entries.is_valid: - log.warn(" get_svn_revision: Cannot determine how to read enteries.") - dirs[:] = [] - continue - - localrev = entries.parse_revision() - dirurl = entries.get_url() - - if base==os.curdir: - base_url = dirurl+'/' # save the root url - elif not dirurl.startswith(base_url): - dirs[:] = [] - continue # not part of the same svn tree, skip it - revision = max(revision, localrev) - - return str(revision or get_pkg_info_revision()) + return str(svn_utils.parse_revision(os.curdir)) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 57cf6849fc..e45f05bca6 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -34,6 +34,25 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE): return proc.returncode, data +#svnversion return values (previous implementations return max revision) +# 4123:4168 mixed revision working copy +# 4168M modified working copy +# 4123S switched working copy +# 4123:4168MS mixed revision, modified, switched working copy +_SVN_VER_RE = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) + +def parse_revision(path): + _, data = _run_command(['svnversion', path]) + parsed = _SVN_VER_RE.match(data) + if parsed: + try: + #No max needed this command summarizes working copy since 1.0 + return int(parsed.group(2)) + except ValueError: + #This should only happen if the revision is WAY too big. + pass + return 0 + #TODO add the text entry back, and make its use dependent on the # non existence of svn? @@ -242,13 +261,6 @@ class SVNEntriesCMD(SVNEntries): entryre = re.compile(r'', re.DOTALL or re.I) namere = re.compile(r'(.*?)', re.I) - #svnversion return values (previous implementations return max revision) - # 4123:4168 mixed revision working copy - # 4168M modified working copy - # 4123S switched working copy - # 4123:4168MS mixed revision, modified, switched working copy - svnverre = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) - def __get_cached_dir_data(self): return self.dir_data @@ -294,18 +306,9 @@ def __get_cached_revision(self): return self.revision def parse_revision(self): - _, data = _run_command(['svnversion', self.path]) - parsed = self.svnverre.match(data) - if parsed: - try: - #No max needed this command summarizes working copy since 1.0 - self.revision = int(parsed.group(2)) - self.parse_revision = self.__get_cached_revision - return self.revision - except ValueError: - #This should only happen if the revision is WAY too big. - pass - return 0 + self.revision = parse_revision(self.path) + self.parse_revision = self.__get_cached_revision + return self.revision def get_undeleted_records(self): #NOTE: Need to parse entities? diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index b6950ea3fe..5e8a3e1baf 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -11,6 +11,7 @@ import stat from setuptools import svn_utils +from setuptools.command import egg_info #requires python >= 2.4 from subprocess import call as _call @@ -83,6 +84,9 @@ def test_svnentrycmd_enteries(self): self.assertEqual(set(entries.get_external_dirs('dir-props')), set([u'third_party3', u'third_party2', u'third_party'])) + def test_egg_info(self): + rev = egg_info.egg_info.get_svn_revision() + self.assertEqual(rev, '4') def test_suite(): From dda57f982edf3a5f6758bfcc0016f66ec138c510 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 11:27:45 -0500 Subject: [PATCH 1308/8469] get_svn_method now direectly called svn_utils.parse_revision --HG-- extra : rebase_source : c902dd83f2c3df73f3a6f84e08bd8a77b201cc21 --- setuptools/command/sdist.py | 3 ++- setuptools/svn_utils.py | 15 --------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 3614da5e7f..2a37c3085c 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,6 +5,7 @@ import os, re, sys, pkg_resources from glob import glob from setuptools.svn_utils import SVNEntries +from setuptools import svn_utils READMES = ('README', 'README.rst', 'README.txt') @@ -69,7 +70,7 @@ def externals_finder(dirname, filename): def entries_finder(dirname, filename): for record in SVNEntries.load(dirname).get_undeleted_records(): yield joinpath(dirname, record) - + finders = [ (convert_path('CVS/Entries'), diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index e45f05bca6..93912b1a71 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -185,9 +185,6 @@ def get_sections(self): def is_valid(self): return bool(self.get_sections()) - def get_url(self): - return self.get_sections()[0][4] - def parse_revision_numbers(self): revision_line_number = 9 rev_numbers = [ @@ -213,11 +210,6 @@ class SVNEntriesXML(SVNEntries): def is_valid(self): return True - def get_url(self): - "Get repository URL" - urlre = re.compile(r'url="([^"]+)"') - return urlre.search(self.data).group(1) - def parse_revision_numbers(self): revre = re.compile(r'committed-rev="(\d+)"') return [ @@ -295,13 +287,6 @@ def get_entries(self): - def get_url(self): - "Get repository URL" - url_element = self.get_dir_data().getElementsByTagName("url")[0] - url_text = [t.nodeValue for t in url_element.childNodes - if t.nodeType == t.TEXT_NODE] - return "".join(url_text) - def __get_cached_revision(self): return self.revision From d30f79227d14b87b2610bcf726de1c20e7cbf10f Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 11:28:54 -0500 Subject: [PATCH 1309/8469] finished remove get_url() doesn't seem needed --HG-- extra : rebase_source : 7dc845ac0d00407fe087e15d04fc3f75962d0fe6 --- setuptools/tests/test_svn.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 5e8a3e1baf..d4216491a6 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -72,8 +72,6 @@ def test_svnentrycmd_is_valid(self): entries = svn_utils.SVNEntries.load_dir('.') self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) self.assertTrue(entries.is_valid()) - self.assertEqual(entries.get_url(), - 'file:///C:/development/svn_example/repo1') def test_svnentrycmd_enteries(self): entries = svn_utils.SVNEntries.load_dir('.') From 44989bd50e225241c1dfc7e60c5a973586a4fc13 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 12:24:21 -0500 Subject: [PATCH 1310/8469] cannot use list since that requires repo access, initial recurse parsing --HG-- extra : rebase_source : 87deb8066a0cb067e7bccc63cc156b7fed30ea29 --- setuptools/command/sdist.py | 2 +- setuptools/svn_utils.py | 62 ++++++++++++++++++++++++------------ setuptools/tests/test_svn.py | 9 ++++++ 3 files changed, 52 insertions(+), 21 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2a37c3085c..92f8d46843 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -68,7 +68,7 @@ def externals_finder(dirname, filename): def entries_finder(dirname, filename): - for record in SVNEntries.load(dirname).get_undeleted_records(): + for record in svn_utils.parse_manifest(dirname): yield joinpath(dirname, record) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 93912b1a71..5ada2e316f 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -53,6 +53,36 @@ def parse_revision(path): pass return 0 +#svn list returns relative o +def parse_manifest(path): + #NOTE: Need to parse entities? + _, data = _run_command(['svn', 'info', '-R', '--xml', path]) + + doc = xml.dom.pulldom.parseString(data) + entries = list() + for event, node in doc: + if event=='START_ELEMENT' and node.nodeName=='entry': + doc.expandNode(node) + entries.append(node) + + if entries: + return [ + _get_entry_name(element) + for element in entries[1:] + if _get_entry_schedule(element).lower() != 'deleted' + ] + else: + return [] + +def _get_entry_name(entry): + return entry.getAttribute('path') + +def _get_entry_schedule(entry): + schedule = entry.getElementsByTagName('schedule')[0] + return "".join([t.nodeValue for t in schedule.childNodes + if t.nodeType == t.TEXT_NODE]) + + #TODO add the text entry back, and make its use dependent on the # non existence of svn? @@ -253,35 +283,28 @@ class SVNEntriesCMD(SVNEntries): entryre = re.compile(r'', re.DOTALL or re.I) namere = re.compile(r'(.*?)', re.I) - def __get_cached_dir_data(self): - return self.dir_data - def __get_cached_entries(self): return self.entries def is_valid(self): - return self.get_dir_data() is not None + return bool(self.get_entries()) def get_dir_data(self): #This returns the info entry for the directory ONLY - _, data = _run_command(['svn', 'info', '--xml', self.path]) + return self.get_entries()[0] + + def get_entries(self): + #regarding the shell argument, see: http://bugs.python.org/issue8557 + _, data = _run_command(['svn', 'info', + '--depth', 'immediates', '--xml', self.path]) doc = xml.dom.pulldom.parseString(data) - self.dir_data = None + self.entries = list() for event, node in doc: if event=='START_ELEMENT' and node.nodeName=='entry': doc.expandNode(node) - self.dir_data = node - break + self.entries.append(node) - if self.dir_data: - self.get_dir_data = self.__get_cached_dir_data - return self.dir_data - - def get_entries(self): - #regarding the shell argument, see: http://bugs.python.org/issue8557 - _, data = _run_command(['svn', 'list', '--xml', self.path]) - self.entries = self.entryre.findall(data) self.get_entries = self.__get_cached_entries return self.entries @@ -301,10 +324,9 @@ def get_undeleted_records(self): return list() else: return [ - m.group(1) - for entry in self.get_entries() - for m in self.namere.finditer(entry) - if m.group(1) + _get_entry_name(element) + for element in self.get_entries()[1:] + if _get_entry_schedule(element).lower() != 'deleted' ] def _get_externals_data(self, filename): diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index d4216491a6..678508c0f5 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -12,6 +12,7 @@ from setuptools import svn_utils from setuptools.command import egg_info +from setuptools.command import sdist #requires python >= 2.4 from subprocess import call as _call @@ -86,6 +87,14 @@ def test_egg_info(self): rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '4') + def test_entry_iterator(self): + expected = set([ + os.path.join('.', 'readme.txt'), + os.path.join('.', 'other'), + os.path.join('.', 'other', 'test.py'), + ]) + self.assertEqual(set(x for x in sdist.entries_finder('.', '')), + expected) def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 3ca3f2d64dfcd377227cc2bbdfbc2e4c528e0098 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 12:44:57 -0500 Subject: [PATCH 1311/8469] cannot use list since that requires repo access, initial recurse parsing --HG-- extra : rebase_source : 23fbf9ca969a6a0205247ec69e5b674452839f2e --- setuptools/command/sdist.py | 2 +- setuptools/svn_utils.py | 88 +++++++++++++++++++++---------------- 2 files changed, 52 insertions(+), 38 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 92f8d46843..81b92f4411 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -68,7 +68,7 @@ def externals_finder(dirname, filename): def entries_finder(dirname, filename): - for record in svn_utils.parse_manifest(dirname): + for record in svn_utils.parse_dir_entries(dirname): yield joinpath(dirname, record) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 5ada2e316f..f373379c16 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -9,11 +9,10 @@ #requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE - -#It would seem that svn info --xml and svn list --xml were fully -#supported by 1.3.x the special casing of the entry files seem to start at -#1.4.x, so if we check for xml in entries and then fall back to the command -#line, this should catch everything. +#NOTE: Use of the command line options +# require SVN 1.3 or newer (December 2005) +# and SVN 1.3 hsan't been supported by the +# developers since mid 2008. #subprocess is called several times with shell=(sys.platform=='win32') #see the follow for more information: @@ -42,7 +41,12 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE): _SVN_VER_RE = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) def parse_revision(path): - _, data = _run_command(['svnversion', path]) + code, data = _run_command(['svnversion', path]) + + if code: + log.warn("svnversion failed") + return [] + parsed = _SVN_VER_RE.match(data) if parsed: try: @@ -53,10 +57,14 @@ def parse_revision(path): pass return 0 -#svn list returns relative o -def parse_manifest(path): - #NOTE: Need to parse entities? - _, data = _run_command(['svn', 'info', '-R', '--xml', path]) + +def parse_dir_entries(path): + code, data = _run_command(['svn', 'info', + '--depth', 'immediates', '--xml', path]) + + if code: + log.warn("svn info failed") + return [] doc = xml.dom.pulldom.parseString(data) entries = list() @@ -82,6 +90,38 @@ def _get_entry_schedule(entry): return "".join([t.nodeValue for t in schedule.childNodes if t.nodeType == t.TEXT_NODE]) +#--xml wasn't supported until 1.5.x +#-R without --xml parses a bit funny +def parse_externals(path): + try: + _, lines = _run_command(['svn', + 'propget', 'svn:externals', path]) + + if code: + log.warn("svn propget failed") + return [] + + lines = [line for line in lines.splitlines() if line] + except ValueError: + lines = [] + + externals = [] + for line in lines: + line = line.split() + if not line: + continue + + #TODO: urlparse? + if "://" in line[-1] or ":\\\\" in line[-1]: + externals.append(line[0]) + else: + externals.append(line[-1]) + + return externals + + + + #TODO add the text entry back, and make its use dependent on the # non existence of svn? @@ -155,33 +195,7 @@ def _get_externals_data(self, filename): return '' def get_external_dirs(self, filename): - filename = os.path.join(self.path, '.svn', filename) - - data = self._get_externals_data(filename) - - if not data: - return - - # http://svnbook.red-bean.com/en/1.6/svn.advanced.externals.html - #there appears to be three possible formats for externals since 1.5 - #but looks like we only need the local relative path names so it's just - #2 either the first column or the last (of 2 or 3) Looks like - #mix and matching is allowed. - externals = list() - for line in data: - line = line.split() - if not line: - continue - - #TODO: urlparse? - if "://" in line[-1] or ":\\\\" in line[-1]: - externals.append(line[0]) - else: - externals.append(line[-1]) - - self.external_dirs = externals - self.get_external_dirs = self.__get_cached_external_dirs - return self.external_dirs + return parse_externals(self.path) class SVNEntriesText(SVNEntries): known_svn_versions = { From e6a901a1f7d454f64fb6f1b13d8f777f3a836abd Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 12:49:15 -0500 Subject: [PATCH 1312/8469] got some global version done, SVN 1.3.x or later now required --HG-- extra : rebase_source : def9ab923ee6455791c92334ee79c09d9164c43e --- setuptools/command/sdist.py | 2 +- setuptools/svn_utils.py | 2 +- setuptools/tests/test_svn.py | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 81b92f4411..70ab2c84d4 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -63,7 +63,7 @@ def _default_revctrl(dirname=''): def externals_finder(dirname, filename): """Find any 'svn:externals' directories""" - for name in SVNEnteries.load(dirname).get_external_dirs(filename): + for name in svn_utils.parse_externals(dirname): yield joinpath(dirname, name) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index f373379c16..5783489cd9 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -94,7 +94,7 @@ def _get_entry_schedule(entry): #-R without --xml parses a bit funny def parse_externals(path): try: - _, lines = _run_command(['svn', + code, lines = _run_command(['svn', 'propget', 'svn:externals', path]) if code: diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 678508c0f5..44637909bd 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -91,11 +91,19 @@ def test_entry_iterator(self): expected = set([ os.path.join('.', 'readme.txt'), os.path.join('.', 'other'), - os.path.join('.', 'other', 'test.py'), ]) self.assertEqual(set(x for x in sdist.entries_finder('.', '')), expected) + def test_external_iterator(self): + expected = set([ + os.path.join('.', 'third_party'), + os.path.join('.', 'third_party2'), + os.path.join('.', 'third_party3'), + ]) + self.assertEqual(set(x for x in sdist.externals_finder('.', '')), + expected) + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 0fb7894e8fca0cbd3454fbff2afc45f51cfdd156 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 12:53:02 -0500 Subject: [PATCH 1313/8469] removed the objects --HG-- extra : rebase_source : 19c8be226a698813103dc2393b3b154060d90669 --- setuptools/command/sdist.py | 1 - setuptools/svn_utils.py | 242 +---------------------------------- setuptools/tests/test_svn.py | 23 +--- 3 files changed, 8 insertions(+), 258 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 70ab2c84d4..081d3c98d2 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,7 +4,6 @@ from glob import glob import os, re, sys, pkg_resources from glob import glob -from setuptools.svn_utils import SVNEntries from setuptools import svn_utils READMES = ('README', 'README.rst', 'README.txt') diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 5783489cd9..657393e2e5 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -119,240 +119,10 @@ def parse_externals(path): return externals +def get_svn_tool_version(): + _, data = _run_command(['svn', '--version', '--quiet']) + if data: + return data.strip() + else: + return '' - - - -#TODO add the text entry back, and make its use dependent on the -# non existence of svn? - -class SVNEntries(object): - svn_tool_version = '' - - def __init__(self, path, data): - self.path = path - self.data = data - if not self.svn_tool_version: - self.svn_tool_version = self.get_svn_tool_version() - - @staticmethod - def get_svn_tool_version(): - _, data = _run_command(['svn', '--version', '--quiet']) - if data: - return data.strip() - else: - return '' - - @classmethod - def load_dir(class_, base): - filename = os.path.join(base, '.svn', 'entries') - f = open(filename) - result = SVNEntries.read(f, base) - f.close() - return result - - @classmethod - def read(class_, file, path=None): - data = file.read() - - if data.startswith('revision_line_number - and section[revision_line_number] - ] - return rev_numbers - - def get_undeleted_records(self): - #Note for self this skip and only returns the children - undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') - result = [ - section[0] - for section in self.get_sections() - if undeleted(section) - ] - return result - - -class SVNEntriesXML(SVNEntries): - def is_valid(self): - return True - - def parse_revision_numbers(self): - revre = re.compile(r'committed-rev="(\d+)"') - return [ - int(m.group(1)) - for m in revre.finditer(self.data) - if m.group(1) - ] - - def get_undeleted_records(self): - entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', - re.I) - results = [ - unescape(match.group(1)) - for match in entries_pattern.finditer(self.data) - if match.group(1) - ] - return results - -import xml.dom.pulldom - -class SVNEntriesCMD(SVNEntries): - # - # - # - # - # ... - # ... - # - # - # ... - # - # - # ... - # - # - # ... - # - entrypathre = re.compile(r']*path="(\.+)">', re.I) - entryre = re.compile(r'', re.DOTALL or re.I) - namere = re.compile(r'(.*?)', re.I) - - def __get_cached_entries(self): - return self.entries - - def is_valid(self): - return bool(self.get_entries()) - - def get_dir_data(self): - #This returns the info entry for the directory ONLY - return self.get_entries()[0] - - def get_entries(self): - #regarding the shell argument, see: http://bugs.python.org/issue8557 - _, data = _run_command(['svn', 'info', - '--depth', 'immediates', '--xml', self.path]) - - doc = xml.dom.pulldom.parseString(data) - self.entries = list() - for event, node in doc: - if event=='START_ELEMENT' and node.nodeName=='entry': - doc.expandNode(node) - self.entries.append(node) - - self.get_entries = self.__get_cached_entries - return self.entries - - - - def __get_cached_revision(self): - return self.revision - - def parse_revision(self): - self.revision = parse_revision(self.path) - self.parse_revision = self.__get_cached_revision - return self.revision - - def get_undeleted_records(self): - #NOTE: Need to parse entities? - if not self.is_valid(): - return list() - else: - return [ - _get_entry_name(element) - for element in self.get_entries()[1:] - if _get_entry_schedule(element).lower() != 'deleted' - ] - - def _get_externals_data(self, filename): - - #othewise will be called twice. - if os.path.basename(filename).lower() != 'dir-props': - return '' - - try: - _, lines = _run_command(['svn', - 'propget', 'svn:externals', self.path]) - lines = [line for line in lines.splitlines() if line] - return lines - except ValueError: - return '' diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 44637909bd..6f8399dd93 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -32,13 +32,13 @@ def test_no_svn_found(self): old_path = os.environ['path'] os.environ['path'] = '' try: - version = svn_utils.SVNEntries.get_svn_tool_version() + version = svn_utils.get_svn_tool_version() self.assertEqual(version, '') finally: os.environ['path'] = old_path def test_svn_should_exist(self): - version = svn_utils.SVNEntries.get_svn_tool_version() + version = svn_utils.get_svn_tool_version() self.assertNotEqual(version, '') @@ -64,25 +64,6 @@ def tearDown(self): os.chdir(self.old_cwd) _remove_dir(self.temp_dir) - def test_svnentrycmd_is_valid(self): - entries = svn_utils.SVNEntries.load_dir('.') - self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) - self.assertTrue(entries.is_valid()) - - def test_svnentrycmd_is_valid(self): - entries = svn_utils.SVNEntries.load_dir('.') - self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) - self.assertTrue(entries.is_valid()) - - def test_svnentrycmd_enteries(self): - entries = svn_utils.SVNEntries.load_dir('.') - self.assertIsInstance(entries, svn_utils.SVNEntriesCMD) - self.assertEqual(entries.parse_revision(), 4) - self.assertEqual(set(entries.get_undeleted_records()), - set([u'readme.txt', u'other'])) - self.assertEqual(set(entries.get_external_dirs('dir-props')), - set([u'third_party3', u'third_party2', u'third_party'])) - def test_egg_info(self): rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '4') From f553edb0df7c17b81457820e9333adc56b04d8b9 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 12:59:35 -0500 Subject: [PATCH 1314/8469] use urlparse for url detection --HG-- extra : rebase_source : 0c502ce268425d0236072fe11c5631e8282956f0 --- setuptools/svn_utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 657393e2e5..0f54ba54ca 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -3,8 +3,8 @@ import sys import codecs from distutils import log -from xml.sax.saxutils import unescape import xml.dom.pulldom +import urlparse #requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE @@ -82,9 +82,11 @@ def parse_dir_entries(path): else: return [] + def _get_entry_name(entry): return entry.getAttribute('path') + def _get_entry_schedule(entry): schedule = entry.getElementsByTagName('schedule')[0] return "".join([t.nodeValue for t in schedule.childNodes @@ -111,14 +113,14 @@ def parse_externals(path): if not line: continue - #TODO: urlparse? - if "://" in line[-1] or ":\\\\" in line[-1]: + if urlparse.urlsplit(line[-1])[0]: externals.append(line[0]) else: externals.append(line[-1]) return externals + def get_svn_tool_version(): _, data = _run_command(['svn', '--version', '--quiet']) if data: From adb810246108bfe67f4ac92ab0f644d250cce515 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 4 Jul 2013 13:10:35 -0500 Subject: [PATCH 1315/8469] consolidated externals and enteries because enteries need to file to interate over and both get called by the same callback. pep8 on svn_utils --HG-- extra : rebase_source : fa65ebfc167041b5c2e1b2bd901e9354cfaea57e --- setuptools/command/sdist.py | 16 ++++++------- setuptools/svn_utils.py | 46 ++++++++++++++++++++---------------- setuptools/tests/test_svn.py | 13 ++++------ 3 files changed, 37 insertions(+), 38 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 081d3c98d2..5cc2139be6 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -60,23 +60,21 @@ def _default_revctrl(dirname=''): for item in _default_revctrl(path): yield item -def externals_finder(dirname, filename): - """Find any 'svn:externals' directories""" - for name in svn_utils.parse_externals(dirname): - yield joinpath(dirname, name) - -def entries_finder(dirname, filename): +def entries_externals_finder(dirname, filename): for record in svn_utils.parse_dir_entries(dirname): yield joinpath(dirname, record) + for name in svn_utils.parse_externals(dirname): + yield joinpath(dirname, name) + finders = [ (convert_path('CVS/Entries'), re_finder(re.compile(r"^\w?/([^/]+)/", re.M))), - (convert_path('.svn/entries'), entries_finder), - (convert_path('.svn/dir-props'), externals_finder), - (convert_path('.svn/dir-prop-base'), externals_finder), # svn 1.4 + #combined externals due to common interface + #combined externals and enteries due to lack of dir_props in 1.7 + (convert_path('.svn/entries'), entries_externals_finder), ] diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 0f54ba54ca..350f17c85e 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -14,6 +14,15 @@ # and SVN 1.3 hsan't been supported by the # developers since mid 2008. + +#svnversion return values (previous implementations return max revision) +# 4123:4168 mixed revision working copy +# 4168M modified working copy +# 4123S switched working copy +# 4123:4168MS mixed revision, modified, switched working copy +_SVN_VER_RE = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) + + #subprocess is called several times with shell=(sys.platform=='win32') #see the follow for more information: # http://bugs.python.org/issue8557 @@ -22,7 +31,7 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE): #regarding the shell argument, see: http://bugs.python.org/issue8557 proc = _Popen(args, stdout=stdout, stderr=stderr, - shell=(sys.platform=='win32')) + shell=(sys.platform == 'win32')) data = proc.communicate()[0] #TODO: this is probably NOT always utf-8 @@ -33,12 +42,17 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE): return proc.returncode, data -#svnversion return values (previous implementations return max revision) -# 4123:4168 mixed revision working copy -# 4168M modified working copy -# 4123S switched working copy -# 4123:4168MS mixed revision, modified, switched working copy -_SVN_VER_RE = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) + +def _get_entry_name(entry): + return entry.getAttribute('path') + + +def _get_entry_schedule(entry): + schedule = entry.getElementsByTagName('schedule')[0] + return "".join([t.nodeValue + for t in schedule.childNodes + if t.nodeType == t.TEXT_NODE]) + def parse_revision(path): code, data = _run_command(['svnversion', path]) @@ -60,7 +74,7 @@ def parse_revision(path): def parse_dir_entries(path): code, data = _run_command(['svn', 'info', - '--depth', 'immediates', '--xml', path]) + '--depth', 'immediates', '--xml', path]) if code: log.warn("svn info failed") @@ -69,7 +83,7 @@ def parse_dir_entries(path): doc = xml.dom.pulldom.parseString(data) entries = list() for event, node in doc: - if event=='START_ELEMENT' and node.nodeName=='entry': + if event == 'START_ELEMENT' and node.nodeName == 'entry': doc.expandNode(node) entries.append(node) @@ -78,26 +92,17 @@ def parse_dir_entries(path): _get_entry_name(element) for element in entries[1:] if _get_entry_schedule(element).lower() != 'deleted' - ] + ] else: return [] -def _get_entry_name(entry): - return entry.getAttribute('path') - - -def _get_entry_schedule(entry): - schedule = entry.getElementsByTagName('schedule')[0] - return "".join([t.nodeValue for t in schedule.childNodes - if t.nodeType == t.TEXT_NODE]) - #--xml wasn't supported until 1.5.x #-R without --xml parses a bit funny def parse_externals(path): try: code, lines = _run_command(['svn', - 'propget', 'svn:externals', path]) + 'propget', 'svn:externals', path]) if code: log.warn("svn propget failed") @@ -127,4 +132,3 @@ def get_svn_tool_version(): return data.strip() else: return '' - diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 6f8399dd93..7f5f6108e8 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -17,6 +17,7 @@ #requires python >= 2.4 from subprocess import call as _call + def _remove_dir(target): #on windows this seems to a problem @@ -26,6 +27,7 @@ def _remove_dir(target): os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE) shutil.rmtree(target) + class TestSvnVersion(unittest.TestCase): def test_no_svn_found(self): @@ -68,21 +70,16 @@ def test_egg_info(self): rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '4') - def test_entry_iterator(self): + def test_iterator(self): expected = set([ os.path.join('.', 'readme.txt'), os.path.join('.', 'other'), - ]) - self.assertEqual(set(x for x in sdist.entries_finder('.', '')), - expected) - - def test_external_iterator(self): - expected = set([ os.path.join('.', 'third_party'), os.path.join('.', 'third_party2'), os.path.join('.', 'third_party3'), ]) - self.assertEqual(set(x for x in sdist.externals_finder('.', '')), + self.assertEqual(set(x for x + in sdist.entries_externals_finder('.', '')), expected) def test_suite(): From 1286069e4cf50a575f1a98fff46f12a324de7c67 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 22:06:56 -0400 Subject: [PATCH 1316/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1a47f4db68..172a858289 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.7.8 +----- + +* Distribute #375: Yet another fix for yet another regression. + ----- 0.7.7 ----- From 60eebc12f4f00c1fc2e928957bf62926aecbe444 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 22:09:07 -0400 Subject: [PATCH 1317/8469] Added tag 0.7.8 for changeset 236de1de68b1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b626edfa60..5fd7f2ad8a 100644 --- a/.hgtags +++ b/.hgtags @@ -71,3 +71,4 @@ ee2c967017024197b38e39ced852808265387a4b 0.6.47 cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 1506fa538fff01e70424530a32a44e070720cf3c 0.7.7 f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 +236de1de68b14230036147c7c9e7c09b215b53ee 0.7.8 From 3d3aae58dbe4b67aaf39238e6508af83e95c7b5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 22:09:24 -0400 Subject: [PATCH 1318/8469] Bumped to 0.7.9 in preparation for next release. --- README.txt | 8 ++++---- docs/conf.py | 4 ++-- ez_setup.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index 77acd2bac1..9b17a260af 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.7.9/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.9/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.7.8/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.7.9/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.7.8$ python setup.py --prefix=/opt/setuptools + setuptools-0.7.9$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 8bbf4bea88..5d6a58e9fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.7.8' +version = '0.7.9' # The full version, including alpha/beta/rc tags. -release = '0.7.8' +release = '0.7.9' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 6baa9b9921..91819da992 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.7.8" +DEFAULT_VERSION = "0.7.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 61e6862d88..6d7bc3a9b5 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.7.8' +VERSION = '0.7.9' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index a4d6d55633..5226ae4ed6 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.7.8" +VERSION = "0.7.9" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 104ea06498..e740e3d038 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.7.8' +__version__ = '0.7.9' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From f113f36b29298a1428b17315b8c35740c69d5725 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 22:14:45 -0400 Subject: [PATCH 1319/8469] Added tag 0.8b7 for changeset 979d598822bc --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4d6efc9866..910f608ad5 100644 --- a/.hgtags +++ b/.hgtags @@ -78,3 +78,4 @@ cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 26f59ec0f0f69714d28a891aaad048e3b9fcd6f7 0.8b6 f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 236de1de68b14230036147c7c9e7c09b215b53ee 0.7.8 +979d598822bc64b05fb177a2ba221e75ee5b44d3 0.8b7 From 5b7992850b0cddec9bc405042359cf751d970d59 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Fri, 5 Jul 2013 08:23:44 -0500 Subject: [PATCH 1320/8469] urlparse --> urllib.parse in py3 --HG-- extra : rebase_source : b845737250a36a725f75aa04109ea357f09955d0 --- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/command/egg_info.py | 2 +- setuptools/svn_utils.py | 7 ++- 4 files changed, 55 insertions(+), 50 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index e5b7443aec..aa01bde9f2 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +convert_2to3_doctests = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data -eager_resources = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras entry_points = setuptools.dist:check_entry_points -namespace_packages = setuptools.dist:check_nsp -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -use_2to3_fixers = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements -tests_require = setuptools.dist:check_requirements -include_package_data = setuptools.dist:assert_bool - -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -requires.txt = setuptools.command.egg_info:write_requirements -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete +exclude_package_data = setuptools.dist:check_package_data +dependency_links = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list [distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install_scripts = setuptools.command.install_scripts:install_scripts -build_ext = setuptools.command.build_ext:build_ext -install_lib = setuptools.command.install_lib:install_lib +upload_docs = setuptools.command.upload_docs:upload_docs +build_py = setuptools.command.build_py:build_py develop = setuptools.command.develop:develop -sdist = setuptools.command.sdist:sdist -saveopts = setuptools.command.saveopts:saveopts -easy_install = setuptools.command.easy_install:easy_install +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm rotate = setuptools.command.rotate:rotate -install = setuptools.command.install:install -alias = setuptools.command.alias:alias install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +setopt = setuptools.command.setopt:setopt +saveopts = setuptools.command.saveopts:saveopts +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +test = setuptools.command.test:test register = setuptools.command.register:register -egg_info = setuptools.command.egg_info:egg_info +easy_install = setuptools.command.easy_install:easy_install +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist bdist_egg = setuptools.command.bdist_egg:bdist_egg -test = setuptools.command.test:test -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py +egg_info = setuptools.command.egg_info:egg_info + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +entry_points.txt = setuptools.command.egg_info:write_entries +PKG-INFO = setuptools.command.egg_info:write_pkg_info +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +eager_resources.txt = setuptools.command.egg_info:overwrite_arg [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 91d84d9ca8..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,11 +1,11 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [certs] certifi==0.0.8 diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 345ec8aec0..cb557361ba 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -9,7 +9,7 @@ from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring -from setuptools import svn_utils +from .. import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 350f17c85e..10c5861dee 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -4,7 +4,11 @@ import codecs from distutils import log import xml.dom.pulldom -import urlparse + +try: + import urlparse +except ImportError: + import urllib.parse as urlparse #requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE @@ -40,6 +44,7 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE): except NameError: data = str(data, encoding='utf-8') + #communciate calls wait() return proc.returncode, data From 0c39ec94423bda77dc46dc6c82294cdfd7447f89 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Fri, 5 Jul 2013 10:37:42 -0500 Subject: [PATCH 1321/8469] fixed some issues with OSError have to emulate zipfile extract on py2.5 and earlier for tests --HG-- extra : rebase_source : c6ad4eab19a2a454b8b8043d88d9582168f617aa --- setuptools/command/egg_info.py | 2 +- setuptools/svn_utils.py | 16 +++++-- setuptools/tests/test_svn.py | 87 ++++++++++++++++++++++++++++++++-- 3 files changed, 95 insertions(+), 10 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index cb557361ba..345ec8aec0 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -9,7 +9,7 @@ from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring -from .. import svn_utils +from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 10c5861dee..932ee75cc0 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -34,10 +34,14 @@ # python-subprocess-popen-environment-path def _run_command(args, stdout=_PIPE, stderr=_PIPE): #regarding the shell argument, see: http://bugs.python.org/issue8557 - proc = _Popen(args, stdout=stdout, stderr=stderr, - shell=(sys.platform == 'win32')) + try: + proc = _Popen(args, stdout=stdout, stderr=stderr, + shell=(sys.platform == 'win32')) + + data = proc.communicate()[0] + except OSError: + return 1, '' - data = proc.communicate()[0] #TODO: this is probably NOT always utf-8 try: data = unicode(data, encoding='utf-8') @@ -60,11 +64,13 @@ def _get_entry_schedule(entry): def parse_revision(path): - code, data = _run_command(['svnversion', path]) + code, data = _run_command(['svnversion', '-c', path]) if code: log.warn("svnversion failed") - return [] + return 0 + else: + log.warn('Version: %s' % data.strip()) parsed = _SVN_VER_RE.match(data) if parsed: diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 7f5f6108e8..8b73452ffa 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -17,6 +17,54 @@ #requires python >= 2.4 from subprocess import call as _call +def _extract(self, member, path=None, pwd=None): + """for zipfile py2.5 borrowed from cpython""" + if not isinstance(member, zipfile.ZipInfo): + member = self.getinfo(member) + + if path is None: + path = os.getcwd() + + return _extract_member(self, member, path, pwd) + +def _extract_from_zip(self, name, dest_path): + dest_file = open(dest_path, 'wb') + try: + dest_file.write(self.read(name)) + finally: + dest_file.close() + +def _extract_member(self, member, targetpath, pwd): + """for zipfile py2.5 borrowed from cpython""" + # build the destination pathname, replacing + # forward slashes to platform specific separators. + # Strip trailing path separator, unless it represents the root. + if (targetpath[-1:] in (os.path.sep, os.path.altsep) + and len(os.path.splitdrive(targetpath)[1]) > 1): + targetpath = targetpath[:-1] + + # don't include leading "/" from file name if present + if member.filename[0] == '/': + targetpath = os.path.join(targetpath, member.filename[1:]) + else: + targetpath = os.path.join(targetpath, member.filename) + + targetpath = os.path.normpath(targetpath) + + # Create all upper directories if necessary. + upperdirs = os.path.dirname(targetpath) + if upperdirs and not os.path.exists(upperdirs): + os.makedirs(upperdirs) + + if member.filename[-1] == '/': + if not os.path.isdir(targetpath): + os.mkdir(targetpath) + return targetpath + + _extract_from_zip(self, member.filename, targetpath) + + return targetpath + def _remove_dir(target): @@ -31,13 +79,21 @@ def _remove_dir(target): class TestSvnVersion(unittest.TestCase): def test_no_svn_found(self): - old_path = os.environ['path'] - os.environ['path'] = '' + path_variable = None + for env in os.environ: + if env.lower() == 'path': + path_variable = env + + if path_variable is None: + self.skipTest('Cannot figure out how to modify path') + + old_path = os.environ[path_variable] + os.environ[path_variable] = '' try: version = svn_utils.get_svn_tool_version() self.assertEqual(version, '') finally: - os.environ['path'] = old_path + os.environ[path_variable] = old_path def test_svn_should_exist(self): version = svn_utils.get_svn_tool_version() @@ -47,13 +103,21 @@ def test_svn_should_exist(self): class TestSvn_1_7(unittest.TestCase): def setUp(self): + version = svn_utils.get_svn_tool_version() + ver_list = [int(x) for x in version.split('.')] + if ver_list < [1,7,0]: + self.version_err = 'Insufficent Subversion (%s)' % version + else: + self.version_err = None + + self.temp_dir = tempfile.mkdtemp() zip_file, source, target = [None, None, None] try: zip_file = zipfile.ZipFile(os.path.join('setuptools', 'tests', 'svn17_example.zip')) for files in zip_file.namelist(): - zip_file.extract(files, self.temp_dir) + _extract(zip_file, files, self.temp_dir) finally: if zip_file: zip_file.close() @@ -66,11 +130,26 @@ def tearDown(self): os.chdir(self.old_cwd) _remove_dir(self.temp_dir) + def _chk_skip(self): + if self.version_err is not None: + if hasattr(self, 'skipTest'): + self.skipTest(self.version_err) + else: + sys.stderr.write(self.version_error + "\n") + return True + return False + def test_egg_info(self): + if self._chk_skip: + return + rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '4') def test_iterator(self): + if self._chk_skip: + return + expected = set([ os.path.join('.', 'readme.txt'), os.path.join('.', 'other'), From 9a9486878f01e21b86e7a2ab317bfe10f3352665 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Fri, 5 Jul 2013 10:43:04 -0500 Subject: [PATCH 1322/8469] some odd errors.. not sure what still has the directory in use.. --HG-- extra : rebase_source : c3c3369ee8fc51f6625e8e59552ccf01f5332887 --- setuptools/tests/test_svn.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 8b73452ffa..6036f85c80 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -127,8 +127,12 @@ def setUp(self): os.chdir(os.path.join(self.temp_dir, 'svn17_example')) def tearDown(self): - os.chdir(self.old_cwd) - _remove_dir(self.temp_dir) + try: + os.chdir(self.old_cwd) + _remove_dir(self.temp_dir) + except OSError: + #sigh? + pass def _chk_skip(self): if self.version_err is not None: From 16088e1dd88bbe5497c4e6e1f5239eacec583bef Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Fri, 5 Jul 2013 11:30:40 -0500 Subject: [PATCH 1323/8469] added some cmdline testing for svn_util and allowed negative numbers in the min number from svnversion. --HG-- extra : rebase_source : 8d9c8557e3702b3194fc20d47f5fc07c21521fbe --- setuptools/svn_utils.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 932ee75cc0..193528218d 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -24,7 +24,7 @@ # 4168M modified working copy # 4123S switched working copy # 4123:4168MS mixed revision, modified, switched working copy -_SVN_VER_RE = re.compile(r'(?:(\d+):)?(\d+)([a-z]*)\s*$', re.I) +_SVN_VER_RE = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I) #subprocess is called several times with shell=(sys.platform=='win32') @@ -91,6 +91,8 @@ def parse_dir_entries(path): log.warn("svn info failed") return [] + data = codecs.encode(data, 'UTF-8') + doc = xml.dom.pulldom.parseString(data) entries = list() for event, node in doc: @@ -143,3 +145,14 @@ def get_svn_tool_version(): return data.strip() else: return '' + +if __name__ == '__main__': + def entries_externals_finder(dirname): + for record in parse_dir_entries(dirname): + yield os.path.join(dirname, record) + + for name in parse_externals(dirname): + yield os.path.join(dirname, name) + + for name in entries_externals_finder(sys.argv[1]): + print(name) \ No newline at end of file From a4db48e4c0fb7955d79cc798101438620a81f056 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:06:22 -0400 Subject: [PATCH 1324/8469] Re-enable automatic registration and upload of the released package --- release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index 175e14631f..3afa7fb595 100644 --- a/release.py +++ b/release.py @@ -181,8 +181,8 @@ def upload_to_pypi(): sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '', 'sdist', - #'register', '-r', PACKAGE_INDEX, - #'upload', '-r', PACKAGE_INDEX, + 'register', '-r', PACKAGE_INDEX, + 'upload', '-r', PACKAGE_INDEX, ] if has_docs: cmd.extend([ From 937eface0298a04427d97491de4c16a9889d7fe0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:07:34 -0400 Subject: [PATCH 1325/8469] Fixed two more NameErrors on Python 3 in release script --- release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index 3afa7fb595..39d0b61398 100644 --- a/release.py +++ b/release.py @@ -140,7 +140,7 @@ def do_release(): set_versions() - res = raw_input('Have you read through the SCM changelog and ' + res = input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) if not res.lower().startswith('y'): @@ -148,7 +148,7 @@ def do_release(): raise SystemExit(1) print("Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools") - res = raw_input('Have you or has someone verified that the tests ' + res = input('Have you or has someone verified that the tests ' 'pass on this revision? ') if not res.lower().startswith('y'): print("Please do that") From bfca4fa13f18c4b92486fb075c5f25779123d105 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:10:10 -0400 Subject: [PATCH 1326/8469] Fixed AttributeError around izip_longest --- release.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release.py b/release.py index 39d0b61398..654db012f3 100644 --- a/release.py +++ b/release.py @@ -26,6 +26,11 @@ except NameError: pass +try: + zip_longest = itertools.zip_longest +except AttributeError: + zip_longest = itertools.izip_longest + try: import keyring except Exception: @@ -239,7 +244,7 @@ def _linkified_text(rst_content): anchors = [] linkified_parts = [_linkified_part(part, anchors) for part in plain_text_parts] - pairs = itertools.izip_longest( + pairs = zip_longest( linkified_parts, HREF_pattern.findall(rst_content), fillvalue='', From 73e4762324f76746d03c89306b2b2bb7917a13a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:11:54 -0400 Subject: [PATCH 1327/8469] Added tag 0.8 for changeset e3d70539e79f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 910f608ad5..96b3c0bb0a 100644 --- a/.hgtags +++ b/.hgtags @@ -79,3 +79,4 @@ cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 236de1de68b14230036147c7c9e7c09b215b53ee 0.7.8 979d598822bc64b05fb177a2ba221e75ee5b44d3 0.8b7 +e3d70539e79f39a97f69674ab038661961a1eb43 0.8 From 70dc35dcc21fdb1918e5562d105427aeea424c28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:12:49 -0400 Subject: [PATCH 1328/8469] Bumped to 0.9 in preparation for next release. --- README.txt | 8 ++-- docs/conf.py | 4 +- ez_setup.py | 2 +- release.py | 2 +- setup.py | 6 +-- setuptools.egg-info/entry_points.txt | 72 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +-- setuptools/__init__.py | 2 +- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/README.txt b/README.txt index 7fe2d64af2..2fa3d872d4 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.8$ python setup.py --prefix=/opt/setuptools + setuptools-0.9$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/docs/conf.py b/docs/conf.py index 3fccd87f72..7113c36535 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.8' +version = '0.9' # The full version, including alpha/beta/rc tags. -release = '0.8' +release = '0.9' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index c225c6ae6d..61187113b5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.8" +DEFAULT_VERSION = "0.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 654db012f3..69899988de 100644 --- a/release.py +++ b/release.py @@ -36,7 +36,7 @@ except Exception: pass -VERSION = '0.8' +VERSION = '0.9' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): diff --git a/setup.py b/setup.py index e6d62b183a..61a4308a69 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.8" +VERSION = "0.9" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py @@ -219,10 +219,10 @@ def run(self): "ssl:sys_platform=='win32'": "wincertstore==0.1", "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", "ssl:python_version in '2.4, 2.5'":"ssl==1.16", - "certs": "certifi==0.0.8", + "certs": "certifi==0.0.9", }, dependency_links = [ - 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 24461149e1..5db5e49550 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + [distutils.commands] -build_py = setuptools.command.build_py:build_py -install_egg_info = setuptools.command.install_egg_info:install_egg_info -register = setuptools.command.register:register -install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias -saveopts = setuptools.command.saveopts:saveopts bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install = setuptools.command.install:install +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_lib = setuptools.command.install_lib:install_lib setopt = setuptools.command.setopt:setopt -easy_install = setuptools.command.easy_install:easy_install -egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext +build_py = setuptools.command.build_py:build_py +install_scripts = setuptools.command.install_scripts:install_scripts +saveopts = setuptools.command.saveopts:saveopts +alias = setuptools.command.alias:alias sdist = setuptools.command.sdist:sdist -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg +rotate = setuptools.command.rotate:rotate upload_docs = setuptools.command.upload_docs:upload_docs -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install_lib = setuptools.command.install_lib:install_lib +bdist_egg = setuptools.command.bdist_egg:bdist_egg +egg_info = setuptools.command.egg_info:egg_info test = setuptools.command.test:test -rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +install = setuptools.command.install:install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +easy_install = setuptools.command.easy_install:easy_install +register = setuptools.command.register:register [egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries +PKG-INFO = setuptools.command.egg_info:write_pkg_info depends.txt = setuptools.command.egg_info:warn_depends_obsolete dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -use_2to3_fixers = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -zip_safe = setuptools.dist:assert_bool include_package_data = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages +zip_safe = setuptools.dist:assert_bool +use_2to3 = setuptools.dist:assert_bool eager_resources = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements -exclude_package_data = setuptools.dist:check_package_data +test_loader = setuptools.dist:check_importable extras_require = setuptools.dist:check_extras -test_suite = setuptools.dist:check_test_suite +exclude_package_data = setuptools.dist:check_package_data use_2to3_exclude_fixers = setuptools.dist:assert_string_list dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 2f2a364fa2..bf85f734f5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a8e7617abc..bc62cf82ab 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.8' +__version__ = '0.9' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From e8aebd11d3f1c50140ae8143a29387b8f5280393 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jul 2013 13:24:44 -0400 Subject: [PATCH 1329/8469] Use requests for updating milestone and version --- release.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/release.py b/release.py index 69899988de..d54b249539 100644 --- a/release.py +++ b/release.py @@ -16,10 +16,7 @@ import itertools import re -try: - import urllib.request as urllib_request -except ImportError: - import urllib2 as urllib_request +import requests try: input = raw_input @@ -79,7 +76,7 @@ def get_repo_name(): """ Get the repo name from the hgrc default path. """ - default = subprocess.check_output('hg paths default').strip() + default = subprocess.check_output('hg paths default').strip().decode('utf-8') parts = default.split('/') if parts[-1] == '': parts.pop() @@ -105,20 +102,13 @@ def get_mercurial_creds(system='https://bitbucket.org', username=None): return Credential(username, password) def add_milestone_and_version(version): - auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip() - headers = { - 'Authorization': auth, - } base = 'https://api.bitbucket.org' for type in 'milestones', 'versions': url = (base + '/1.0/repositories/{repo}/issues/{type}' .format(repo = get_repo_name(), type=type)) - req = urllib_request.Request(url = url, headers = headers, - data='name='+version) - try: - urllib_request.urlopen(req) - except urllib_request.HTTPError as e: - print(e.fp.read()) + resp = requests.post(url=url, + data='name='+version, auth=get_mercurial_creds()) + resp.raise_for_status() def bump_versions(target_ver): for filename in files_with_versions: From 411379b73db3bc4955e369affc448cd10ac025e6 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 6 Jul 2013 06:24:30 -0500 Subject: [PATCH 1330/8469] some notes on things that needs to be fixed after all --HG-- extra : rebase_source : 5777bafbb7069238b8aa485cfbc23c13b019080f --- setuptools.egg-info/entry_points.txt | 88 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/svn_utils.py | 13 +++- 3 files changed, 58 insertions(+), 49 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index aa01bde9f2..20002e2547 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -packages = setuptools.dist:check_packages -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -zip_safe = setuptools.dist:assert_bool -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points -use_2to3 = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list - [distutils.commands] -upload_docs = setuptools.command.upload_docs:upload_docs -build_py = setuptools.command.build_py:build_py -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm rotate = setuptools.command.rotate:rotate -install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +develop = setuptools.command.develop:develop setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg install = setuptools.command.install:install test = setuptools.command.test:test -register = setuptools.command.register:register -easy_install = setuptools.command.easy_install:easy_install -alias = setuptools.command.alias:alias +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext sdist = setuptools.command.sdist:sdist -bdist_egg = setuptools.command.bdist_egg:bdist_egg -egg_info = setuptools.command.egg_info:egg_info - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap [egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries depends.txt = setuptools.command.egg_info:warn_depends_obsolete -eager_resources.txt = setuptools.command.egg_info:overwrite_arg + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.5 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..91d84d9ca8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,11 +1,11 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:sys_platform=='win32'] wincertstore==0.1 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [certs] certifi==0.0.8 diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 193528218d..a4c53f154b 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -82,7 +82,7 @@ def parse_revision(path): pass return 0 - +#TODO: Need to do this with the -R because only root has .svn in 1.7.x def parse_dir_entries(path): code, data = _run_command(['svn', 'info', '--depth', 'immediates', '--xml', path]) @@ -110,7 +110,16 @@ def parse_dir_entries(path): return [] -#--xml wasn't supported until 1.5.x +#--xml wasn't supported until 1.5.x need to do -R +#TODO: -R looks like directories are seperated by blank lines +# with dir - prepened to first directory +# what about directories with spaces? +# put quotes around them +# what about the URL's? +# same +# convert to UTF-8 and use csv +# delimiter = space +# #-R without --xml parses a bit funny def parse_externals(path): try: From 5ae92f8fba0d7fe8d59477011816c0aef7b25db7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jul 2013 09:15:39 -0400 Subject: [PATCH 1331/8469] Point to permalink for ez_setup.py in README. Fixes #25. --- README.txt | 8 ++++---- release.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.txt b/README.txt index 2fa3d872d4..0a3bb21db4 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/0.9/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py > python ez_setup.py --user @@ -66,7 +66,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-0.9$ python setup.py --prefix=/opt/setuptools + setuptools-x.x$ python setup.py --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section diff --git a/release.py b/release.py index d54b249539..152f0d9aab 100644 --- a/release.py +++ b/release.py @@ -68,7 +68,7 @@ def incr(match): return re.sub('\d*$', incr, version) files_with_versions = ( - 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'README.txt', + 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'setuptools/__init__.py', ) From 22ee649e178479934b2c658acf8de044e53d1670 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jul 2013 09:19:36 -0400 Subject: [PATCH 1332/8469] Added stubbed upload_ez_setup function --- release.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release.py b/release.py index 152f0d9aab..28be68b63f 100644 --- a/release.py +++ b/release.py @@ -154,6 +154,7 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) upload_to_pypi() + upload_ez_setup() # update to the tip for the next operation subprocess.check_call(['hg', 'update']) @@ -187,6 +188,13 @@ def upload_to_pypi(): env["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" subprocess.check_call(cmd, env=env) +def upload_ez_setup(): + """ + TODO: upload ez_setup.py to a permalinked location. Currently, this + location is https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py . + In the long term, it should be on PyPI. + """ + def has_sphinx(): try: devnull = open(os.path.devnull, 'wb') From 7a7469f9828f0d54f24e207cdc19fcf4ec126d45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jul 2013 09:20:04 -0400 Subject: [PATCH 1333/8469] Spaces for indent --- release.py | 376 ++++++++++++++++++++++++++--------------------------- 1 file changed, 188 insertions(+), 188 deletions(-) diff --git a/release.py b/release.py index 28be68b63f..3631799355 100644 --- a/release.py +++ b/release.py @@ -19,259 +19,259 @@ import requests try: - input = raw_input + input = raw_input except NameError: - pass + pass try: - zip_longest = itertools.zip_longest + zip_longest = itertools.zip_longest except AttributeError: - zip_longest = itertools.izip_longest + zip_longest = itertools.izip_longest try: - import keyring + import keyring except Exception: - pass + pass VERSION = '0.9' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): - global VERSION - version = input("Release as version [%s]> " % VERSION) or VERSION - if version != VERSION: - VERSION = bump_versions(version) + global VERSION + version = input("Release as version [%s]> " % VERSION) or VERSION + if version != VERSION: + VERSION = bump_versions(version) def infer_next_version(version): - """ - Infer a next version from the current version by incrementing the last - number or appending a number. + """ + Infer a next version from the current version by incrementing the last + number or appending a number. - >>> infer_next_version('1.0') - '1.1' + >>> infer_next_version('1.0') + '1.1' - >>> infer_next_version('1.0b') - '1.0b1' + >>> infer_next_version('1.0b') + '1.0b1' - >>> infer_next_version('1.0.9') - '1.0.10' + >>> infer_next_version('1.0.9') + '1.0.10' - >>> infer_next_version('1') - '2' + >>> infer_next_version('1') + '2' - >>> infer_next_version('') - '1' - """ - def incr(match): - ver = int(match.group(0) or '0') - return str(ver + 1) - return re.sub('\d*$', incr, version) + >>> infer_next_version('') + '1' + """ + def incr(match): + ver = int(match.group(0) or '0') + return str(ver + 1) + return re.sub('\d*$', incr, version) files_with_versions = ( - 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', - 'setuptools/__init__.py', + 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', + 'setuptools/__init__.py', ) def get_repo_name(): - """ - Get the repo name from the hgrc default path. - """ - default = subprocess.check_output('hg paths default').strip().decode('utf-8') - parts = default.split('/') - if parts[-1] == '': - parts.pop() - return '/'.join(parts[-2:]) + """ + Get the repo name from the hgrc default path. + """ + default = subprocess.check_output('hg paths default').strip().decode('utf-8') + parts = default.split('/') + if parts[-1] == '': + parts.pop() + return '/'.join(parts[-2:]) def get_mercurial_creds(system='https://bitbucket.org', username=None): - """ - Return named tuple of username,password in much the same way that - Mercurial would (from the keyring). - """ - # todo: consider getting this from .hgrc - username = username or getpass.getuser() - keyring_username = '@@'.join((username, system)) - system = 'Mercurial' - password = ( - keyring.get_password(system, keyring_username) - if 'keyring' in globals() - else None - ) - if not password: - password = getpass.getpass() - Credential = collections.namedtuple('Credential', 'username password') - return Credential(username, password) + """ + Return named tuple of username,password in much the same way that + Mercurial would (from the keyring). + """ + # todo: consider getting this from .hgrc + username = username or getpass.getuser() + keyring_username = '@@'.join((username, system)) + system = 'Mercurial' + password = ( + keyring.get_password(system, keyring_username) + if 'keyring' in globals() + else None + ) + if not password: + password = getpass.getpass() + Credential = collections.namedtuple('Credential', 'username password') + return Credential(username, password) def add_milestone_and_version(version): - base = 'https://api.bitbucket.org' - for type in 'milestones', 'versions': - url = (base + '/1.0/repositories/{repo}/issues/{type}' - .format(repo = get_repo_name(), type=type)) - resp = requests.post(url=url, - data='name='+version, auth=get_mercurial_creds()) - resp.raise_for_status() + base = 'https://api.bitbucket.org' + for type in 'milestones', 'versions': + url = (base + '/1.0/repositories/{repo}/issues/{type}' + .format(repo = get_repo_name(), type=type)) + resp = requests.post(url=url, + data='name='+version, auth=get_mercurial_creds()) + resp.raise_for_status() def bump_versions(target_ver): - for filename in files_with_versions: - bump_version(filename, target_ver) - subprocess.check_call(['hg', 'ci', '-m', - 'Bumped to {target_ver} in preparation for next ' - 'release.'.format(**vars())]) - return target_ver + for filename in files_with_versions: + bump_version(filename, target_ver) + subprocess.check_call(['hg', 'ci', '-m', + 'Bumped to {target_ver} in preparation for next ' + 'release.'.format(**vars())]) + return target_ver def bump_version(filename, target_ver): - with open(filename, 'rb') as f: - lines = [ - line.replace(VERSION.encode('ascii'), target_ver.encode('ascii')) - for line in f - ] - with open(filename, 'wb') as f: - f.writelines(lines) + with open(filename, 'rb') as f: + lines = [ + line.replace(VERSION.encode('ascii'), target_ver.encode('ascii')) + for line in f + ] + with open(filename, 'wb') as f: + f.writelines(lines) def do_release(): - assert all(map(os.path.exists, files_with_versions)), ( - "Expected file(s) missing") + assert all(map(os.path.exists, files_with_versions)), ( + "Expected file(s) missing") - assert has_sphinx(), "You must have Sphinx installed to release" + assert has_sphinx(), "You must have Sphinx installed to release" - set_versions() + set_versions() - res = input('Have you read through the SCM changelog and ' - 'confirmed the changelog is current for releasing {VERSION}? ' - .format(**globals())) - if not res.lower().startswith('y'): - print("Please do that") - raise SystemExit(1) + res = input('Have you read through the SCM changelog and ' + 'confirmed the changelog is current for releasing {VERSION}? ' + .format(**globals())) + if not res.lower().startswith('y'): + print("Please do that") + raise SystemExit(1) - print("Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools") - res = input('Have you or has someone verified that the tests ' - 'pass on this revision? ') - if not res.lower().startswith('y'): - print("Please do that") - raise SystemExit(2) + print("Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools") + res = input('Have you or has someone verified that the tests ' + 'pass on this revision? ') + if not res.lower().startswith('y'): + print("Please do that") + raise SystemExit(2) - subprocess.check_call(['hg', 'tag', VERSION]) + subprocess.check_call(['hg', 'tag', VERSION]) - subprocess.check_call(['hg', 'update', VERSION]) + subprocess.check_call(['hg', 'update', VERSION]) - upload_to_pypi() - upload_ez_setup() + upload_to_pypi() + upload_ez_setup() - # update to the tip for the next operation - subprocess.check_call(['hg', 'update']) + # update to the tip for the next operation + subprocess.check_call(['hg', 'update']) - # we just tagged the current version, bump for the next release. - next_ver = bump_versions(infer_next_version(VERSION)) + # we just tagged the current version, bump for the next release. + next_ver = bump_versions(infer_next_version(VERSION)) - # push the changes - subprocess.check_call(['hg', 'push']) + # push the changes + subprocess.check_call(['hg', 'push']) - add_milestone_and_version(next_ver) + add_milestone_and_version(next_ver) def upload_to_pypi(): - linkify('CHANGES.txt', 'CHANGES (links).txt') - - has_docs = build_docs() - if os.path.isdir('./dist'): - shutil.rmtree('./dist') - cmd = [ - sys.executable, 'setup.py', '-q', - 'egg_info', '-RD', '-b', '', - 'sdist', - 'register', '-r', PACKAGE_INDEX, - 'upload', '-r', PACKAGE_INDEX, - ] - if has_docs: - cmd.extend([ - 'upload_docs', '-r', PACKAGE_INDEX - ]) - env = os.environ.copy() - env["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" - subprocess.check_call(cmd, env=env) + linkify('CHANGES.txt', 'CHANGES (links).txt') + + has_docs = build_docs() + if os.path.isdir('./dist'): + shutil.rmtree('./dist') + cmd = [ + sys.executable, 'setup.py', '-q', + 'egg_info', '-RD', '-b', '', + 'sdist', + 'register', '-r', PACKAGE_INDEX, + 'upload', '-r', PACKAGE_INDEX, + ] + if has_docs: + cmd.extend([ + 'upload_docs', '-r', PACKAGE_INDEX + ]) + env = os.environ.copy() + env["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" + subprocess.check_call(cmd, env=env) def upload_ez_setup(): - """ - TODO: upload ez_setup.py to a permalinked location. Currently, this - location is https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py . - In the long term, it should be on PyPI. - """ + """ + TODO: upload ez_setup.py to a permalinked location. Currently, this + location is https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py . + In the long term, it should be on PyPI. + """ def has_sphinx(): - try: - devnull = open(os.path.devnull, 'wb') - subprocess.Popen(['sphinx-build', '--version'], stdout=devnull, - stderr=subprocess.STDOUT).wait() - except Exception: - return False - return True + try: + devnull = open(os.path.devnull, 'wb') + subprocess.Popen(['sphinx-build', '--version'], stdout=devnull, + stderr=subprocess.STDOUT).wait() + except Exception: + return False + return True def build_docs(): - if not os.path.isdir('docs'): - return - if os.path.isdir('docs/build'): - shutil.rmtree('docs/build') - cmd = [ - 'sphinx-build', - '-b', 'html', - '-d', 'build/doctrees', - '.', - 'build/html', - ] - subprocess.check_call(cmd, cwd='docs') - return True + if not os.path.isdir('docs'): + return + if os.path.isdir('docs/build'): + shutil.rmtree('docs/build') + cmd = [ + 'sphinx-build', + '-b', 'html', + '-d', 'build/doctrees', + '.', + 'build/html', + ] + subprocess.check_call(cmd, cwd='docs') + return True def linkify(source, dest): - with open(source) as source: - out = _linkified_text(source.read()) - with open(dest, 'w') as dest: - dest.write(out) + with open(source) as source: + out = _linkified_text(source.read()) + with open(dest, 'w') as dest: + dest.write(out) def _linkified(rst_path): - "return contents of reStructureText file with linked issue references" - rst_file = open(rst_path) - rst_content = rst_file.read() - rst_file.close() + "return contents of reStructureText file with linked issue references" + rst_file = open(rst_path) + rst_content = rst_file.read() + rst_file.close() - return _linkified_text(rst_content) + return _linkified_text(rst_content) def _linkified_text(rst_content): - # first identify any existing HREFs so they're not changed - HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) - - # split on the HREF pattern, returning the parts to be linkified - plain_text_parts = HREF_pattern.split(rst_content) - anchors = [] - linkified_parts = [_linkified_part(part, anchors) - for part in plain_text_parts] - pairs = zip_longest( - linkified_parts, - HREF_pattern.findall(rst_content), - fillvalue='', - ) - rst_content = ''.join(flatten(pairs)) - - anchors = sorted(anchors) - - bitroot = 'https://bitbucket.org/tarek/distribute' - rst_content += "\n" - for x in anchors: - issue = re.findall(r'\d+', x)[0] - rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) - rst_content += "\n" - return rst_content + # first identify any existing HREFs so they're not changed + HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) + + # split on the HREF pattern, returning the parts to be linkified + plain_text_parts = HREF_pattern.split(rst_content) + anchors = [] + linkified_parts = [_linkified_part(part, anchors) + for part in plain_text_parts] + pairs = zip_longest( + linkified_parts, + HREF_pattern.findall(rst_content), + fillvalue='', + ) + rst_content = ''.join(flatten(pairs)) + + anchors = sorted(anchors) + + bitroot = 'https://bitbucket.org/tarek/distribute' + rst_content += "\n" + for x in anchors: + issue = re.findall(r'\d+', x)[0] + rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) + rst_content += "\n" + return rst_content def flatten(listOfLists): - "Flatten one level of nesting" - return itertools.chain.from_iterable(listOfLists) + "Flatten one level of nesting" + return itertools.chain.from_iterable(listOfLists) def _linkified_part(text, anchors): - """ - Linkify a part and collect any anchors generated - """ - revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) + """ + Linkify a part and collect any anchors generated + """ + revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) - anchors.extend(revision.findall(text)) # ['Issue #43', ...] - return revision.sub(r'`\1`_', text) + anchors.extend(revision.findall(text)) # ['Issue #43', ...] + return revision.sub(r'`\1`_', text) if __name__ == '__main__': - do_release() + do_release() From 9c45197cdf596b15822e5b15e3442c75322af130 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 9 Jul 2013 21:12:09 -0400 Subject: [PATCH 1334/8469] Creating branch for 0.7 maintenance --HG-- branch : 0.7-maintenance From 2a05cb8c9f72d15f953d932e5343235fc024fec3 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Tue, 9 Jul 2013 22:05:50 -0400 Subject: [PATCH 1335/8469] Add the pure python sha implementations from PyPy to handle Python 2.4 --HG-- extra : rebase_source : ffdfb8a18db6ad43a669231a47e2674964776b48 --- setuptools/_backport/__init__.py | 0 setuptools/_backport/hashlib/__init__.py | 146 +++++++++ setuptools/_backport/hashlib/_sha.py | 359 +++++++++++++++++++++++ setuptools/_backport/hashlib/_sha256.py | 260 ++++++++++++++++ setuptools/_backport/hashlib/_sha512.py | 288 ++++++++++++++++++ 5 files changed, 1053 insertions(+) create mode 100644 setuptools/_backport/__init__.py create mode 100644 setuptools/_backport/hashlib/__init__.py create mode 100644 setuptools/_backport/hashlib/_sha.py create mode 100644 setuptools/_backport/hashlib/_sha256.py create mode 100644 setuptools/_backport/hashlib/_sha512.py diff --git a/setuptools/_backport/__init__.py b/setuptools/_backport/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/_backport/hashlib/__init__.py b/setuptools/_backport/hashlib/__init__.py new file mode 100644 index 0000000000..5aeab496af --- /dev/null +++ b/setuptools/_backport/hashlib/__init__.py @@ -0,0 +1,146 @@ +# $Id$ +# +# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) +# Licensed to PSF under a Contributor Agreement. +# + +__doc__ = """hashlib module - A common interface to many hash functions. + +new(name, string='') - returns a new hash object implementing the + given hash function; initializing the hash + using the given string data. + +Named constructor functions are also available, these are much faster +than using new(): + +md5(), sha1(), sha224(), sha256(), sha384(), and sha512() + +More algorithms may be available on your platform but the above are +guaranteed to exist. + +NOTE: If you want the adler32 or crc32 hash functions they are available in +the zlib module. + +Choose your hash function wisely. Some have known collision weaknesses. +sha384 and sha512 will be slow on 32 bit platforms. + +Hash objects have these methods: + - update(arg): Update the hash object with the string arg. Repeated calls + are equivalent to a single call with the concatenation of all + the arguments. + - digest(): Return the digest of the strings passed to the update() method + so far. This may contain non-ASCII characters, including + NUL bytes. + - hexdigest(): Like digest() except the digest is returned as a string of + double length, containing only hexadecimal digits. + - copy(): Return a copy (clone) of the hash object. This can be used to + efficiently compute the digests of strings that share a common + initial substring. + +For example, to obtain the digest of the string 'Nobody inspects the +spammish repetition': + + >>> import hashlib + >>> m = hashlib.md5() + >>> m.update("Nobody inspects") + >>> m.update(" the spammish repetition") + >>> m.digest() + '\\xbbd\\x9c\\x83\\xdd\\x1e\\xa5\\xc9\\xd9\\xde\\xc9\\xa1\\x8d\\xf0\\xff\\xe9' + +More condensed: + + >>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest() + 'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2' + +""" + +# This tuple and __get_builtin_constructor() must be modified if a new +# always available algorithm is added. +__always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512') + +algorithms = __always_supported + +__all__ = __always_supported + ('new', 'algorithms') + + +def __get_builtin_constructor(name): + try: + if name in ('SHA1', 'sha1'): + import _sha + return _sha.new + elif name in ('MD5', 'md5'): + import md5 + return md5.new + elif name in ('SHA256', 'sha256', 'SHA224', 'sha224'): + import _sha256 + bs = name[3:] + if bs == '256': + return _sha256.sha256 + elif bs == '224': + return _sha256.sha224 + elif name in ('SHA512', 'sha512', 'SHA384', 'sha384'): + import _sha512 + bs = name[3:] + if bs == '512': + return _sha512.sha512 + elif bs == '384': + return _sha512.sha384 + except ImportError: + pass # no extension module, this hash is unsupported. + + raise ValueError('unsupported hash type %s' % name) + + +def __get_openssl_constructor(name): + try: + f = getattr(_hashlib, 'openssl_' + name) + # Allow the C module to raise ValueError. The function will be + # defined but the hash not actually available thanks to OpenSSL. + f() + # Use the C function directly (very fast) + return f + except (AttributeError, ValueError): + return __get_builtin_constructor(name) + + +def __py_new(name, string=''): + """new(name, string='') - Return a new hashing object using the named algorithm; + optionally initialized with a string. + """ + return __get_builtin_constructor(name)(string) + + +def __hash_new(name, string=''): + """new(name, string='') - Return a new hashing object using the named algorithm; + optionally initialized with a string. + """ + try: + return _hashlib.new(name, string) + except ValueError: + # If the _hashlib module (OpenSSL) doesn't support the named + # hash, try using our builtin implementations. + # This allows for SHA224/256 and SHA384/512 support even though + # the OpenSSL library prior to 0.9.8 doesn't provide them. + return __get_builtin_constructor(name)(string) + + +try: + import _hashlib + new = __hash_new + __get_hash = __get_openssl_constructor +except ImportError: + new = __py_new + __get_hash = __get_builtin_constructor + +for __func_name in __always_supported: + # try them all, some may not work due to the OpenSSL + # version not supporting that algorithm. + try: + globals()[__func_name] = __get_hash(__func_name) + except ValueError: + import logging + logging.exception('code for hash %s was not found.', __func_name) + +# Cleanup locals() +del __always_supported, __func_name, __get_hash +del __py_new, __hash_new, __get_openssl_constructor diff --git a/setuptools/_backport/hashlib/_sha.py b/setuptools/_backport/hashlib/_sha.py new file mode 100644 index 0000000000..d49993c887 --- /dev/null +++ b/setuptools/_backport/hashlib/_sha.py @@ -0,0 +1,359 @@ +# -*- coding: iso-8859-1 -*- +"""A sample implementation of SHA-1 in pure Python. + + Framework adapted from Dinu Gherman's MD5 implementation by + J. Hallén and L. Creighton. SHA-1 implementation based directly on + the text of the NIST standard FIPS PUB 180-1. +""" + + +__date__ = '2004-11-17' +__version__ = 0.91 # Modernised by J. Hallén and L. Creighton for Pypy + + +import struct, copy + + +# ====================================================================== +# Bit-Manipulation helpers +# +# _long2bytes() was contributed by Barry Warsaw +# and is reused here with tiny modifications. +# ====================================================================== + +def _long2bytesBigEndian(n, blocksize=0): + """Convert a long integer to a byte string. + + If optional blocksize is given and greater than zero, pad the front + of the byte string with binary zeros so that the length is a multiple + of blocksize. + """ + + # After much testing, this algorithm was deemed to be the fastest. + s = '' + pack = struct.pack + while n > 0: + s = pack('>I', n & 0xffffffff) + s + n = n >> 32 + + # Strip off leading zeros. + for i in range(len(s)): + if s[i] != '\000': + break + else: + # Only happens when n == 0. + s = '\000' + i = 0 + + s = s[i:] + + # Add back some pad bytes. This could be done more efficiently + # w.r.t. the de-padding being done above, but sigh... + if blocksize > 0 and len(s) % blocksize: + s = (blocksize - len(s) % blocksize) * '\000' + s + + return s + + +def _bytelist2longBigEndian(list): + "Transform a list of characters into a list of longs." + + imax = len(list) // 4 + hl = [0] * imax + + j = 0 + i = 0 + while i < imax: + b0 = ord(list[j]) << 24 + b1 = ord(list[j+1]) << 16 + b2 = ord(list[j+2]) << 8 + b3 = ord(list[j+3]) + hl[i] = b0 | b1 | b2 | b3 + i = i+1 + j = j+4 + + return hl + + +def _rotateLeft(x, n): + "Rotate x (32 bit) left n bits circularly." + + return (x << n) | (x >> (32-n)) + + +# ====================================================================== +# The SHA transformation functions +# +# ====================================================================== + +def f0_19(B, C, D): + return (B & C) | ((~ B) & D) + +def f20_39(B, C, D): + return B ^ C ^ D + +def f40_59(B, C, D): + return (B & C) | (B & D) | (C & D) + +def f60_79(B, C, D): + return B ^ C ^ D + + +f = [f0_19, f20_39, f40_59, f60_79] + +# Constants to be used +K = [ + 0x5A827999, # ( 0 <= t <= 19) + 0x6ED9EBA1, # (20 <= t <= 39) + 0x8F1BBCDC, # (40 <= t <= 59) + 0xCA62C1D6 # (60 <= t <= 79) + ] + +class sha: + "An implementation of the MD5 hash function in pure Python." + + digest_size = digestsize = 20 + block_size = 1 + + def __init__(self): + "Initialisation." + + # Initial message length in bits(!). + self.length = 0 + self.count = [0, 0] + + # Initial empty message as a sequence of bytes (8 bit characters). + self.input = [] + + # Call a separate init function, that can be used repeatedly + # to start from scratch on the same object. + self.init() + + + def init(self): + "Initialize the message-digest and set all fields to zero." + + self.length = 0 + self.input = [] + + # Initial 160 bit message digest (5 times 32 bit). + self.H0 = 0x67452301 + self.H1 = 0xEFCDAB89 + self.H2 = 0x98BADCFE + self.H3 = 0x10325476 + self.H4 = 0xC3D2E1F0 + + def _transform(self, W): + + for t in range(16, 80): + W.append(_rotateLeft( + W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1) & 0xffffffff) + + A = self.H0 + B = self.H1 + C = self.H2 + D = self.H3 + E = self.H4 + + """ + This loop was unrolled to gain about 10% in speed + for t in range(0, 80): + TEMP = _rotateLeft(A, 5) + f[t/20] + E + W[t] + K[t/20] + E = D + D = C + C = _rotateLeft(B, 30) & 0xffffffff + B = A + A = TEMP & 0xffffffff + """ + + for t in range(0, 20): + TEMP = _rotateLeft(A, 5) + ((B & C) | ((~ B) & D)) + E + W[t] + K[0] + E = D + D = C + C = _rotateLeft(B, 30) & 0xffffffff + B = A + A = TEMP & 0xffffffff + + for t in range(20, 40): + TEMP = _rotateLeft(A, 5) + (B ^ C ^ D) + E + W[t] + K[1] + E = D + D = C + C = _rotateLeft(B, 30) & 0xffffffff + B = A + A = TEMP & 0xffffffff + + for t in range(40, 60): + TEMP = _rotateLeft(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2] + E = D + D = C + C = _rotateLeft(B, 30) & 0xffffffff + B = A + A = TEMP & 0xffffffff + + for t in range(60, 80): + TEMP = _rotateLeft(A, 5) + (B ^ C ^ D) + E + W[t] + K[3] + E = D + D = C + C = _rotateLeft(B, 30) & 0xffffffff + B = A + A = TEMP & 0xffffffff + + + self.H0 = (self.H0 + A) & 0xffffffff + self.H1 = (self.H1 + B) & 0xffffffff + self.H2 = (self.H2 + C) & 0xffffffff + self.H3 = (self.H3 + D) & 0xffffffff + self.H4 = (self.H4 + E) & 0xffffffff + + + # Down from here all methods follow the Python Standard Library + # API of the sha module. + + def update(self, inBuf): + """Add to the current message. + + Update the md5 object with the string arg. Repeated calls + are equivalent to a single call with the concatenation of all + the arguments, i.e. m.update(a); m.update(b) is equivalent + to m.update(a+b). + + The hash is immediately calculated for all full blocks. The final + calculation is made in digest(). It will calculate 1-2 blocks, + depending on how much padding we have to add. This allows us to + keep an intermediate value for the hash, so that we only need to + make minimal recalculation if we call update() to add more data + to the hashed string. + """ + + leninBuf = len(inBuf) + + # Compute number of bytes mod 64. + index = (self.count[1] >> 3) & 0x3F + + # Update number of bits. + self.count[1] = self.count[1] + (leninBuf << 3) + if self.count[1] < (leninBuf << 3): + self.count[0] = self.count[0] + 1 + self.count[0] = self.count[0] + (leninBuf >> 29) + + partLen = 64 - index + + if leninBuf >= partLen: + self.input[index:] = list(inBuf[:partLen]) + self._transform(_bytelist2longBigEndian(self.input)) + i = partLen + while i + 63 < leninBuf: + self._transform(_bytelist2longBigEndian(list(inBuf[i:i+64]))) + i = i + 64 + else: + self.input = list(inBuf[i:leninBuf]) + else: + i = 0 + self.input = self.input + list(inBuf) + + + def digest(self): + """Terminate the message-digest computation and return digest. + + Return the digest of the strings passed to the update() + method so far. This is a 16-byte string which may contain + non-ASCII characters, including null bytes. + """ + + H0 = self.H0 + H1 = self.H1 + H2 = self.H2 + H3 = self.H3 + H4 = self.H4 + input = [] + self.input + count = [] + self.count + + index = (self.count[1] >> 3) & 0x3f + + if index < 56: + padLen = 56 - index + else: + padLen = 120 - index + + padding = ['\200'] + ['\000'] * 63 + self.update(padding[:padLen]) + + # Append length (before padding). + bits = _bytelist2longBigEndian(self.input[:56]) + count + + self._transform(bits) + + # Store state in digest. + digest = _long2bytesBigEndian(self.H0, 4) + \ + _long2bytesBigEndian(self.H1, 4) + \ + _long2bytesBigEndian(self.H2, 4) + \ + _long2bytesBigEndian(self.H3, 4) + \ + _long2bytesBigEndian(self.H4, 4) + + self.H0 = H0 + self.H1 = H1 + self.H2 = H2 + self.H3 = H3 + self.H4 = H4 + self.input = input + self.count = count + + return digest + + + def hexdigest(self): + """Terminate and return digest in HEX form. + + Like digest() except the digest is returned as a string of + length 32, containing only hexadecimal digits. This may be + used to exchange the value safely in email or other non- + binary environments. + """ + return ''.join(['%02x' % ord(c) for c in self.digest()]) + + def copy(self): + """Return a clone object. + + Return a copy ('clone') of the md5 object. This can be used + to efficiently compute the digests of strings that share + a common initial substring. + """ + + return copy.deepcopy(self) + + +# ====================================================================== +# Mimic Python top-level functions from standard library API +# for consistency with the _sha module of the standard library. +# ====================================================================== + +# These are mandatory variables in the module. They have constant values +# in the SHA standard. + +digest_size = 20 +digestsize = 20 +blocksize = 1 + +def new(arg=None): + """Return a new sha crypto object. + + If arg is present, the method call update(arg) is made. + """ + + crypto = sha() + if arg: + crypto.update(arg) + + return crypto + + +if __name__ == "__main__": + a_str = "just a test string" + + assert 'da39a3ee5e6b4b0d3255bfef95601890afd80709' == new().hexdigest() + assert '3f0cf2e3d9e5903e839417dfc47fed6bfa6457f6' == new(a_str).hexdigest() + assert '0852b254078fe3772568a4aba37b917f3d4066ba' == new(a_str*7).hexdigest() + + s = new(a_str) + s.update(a_str) + assert '8862c1b50967f39d3db6bdc2877d9ccebd3102e5' == s.hexdigest() diff --git a/setuptools/_backport/hashlib/_sha256.py b/setuptools/_backport/hashlib/_sha256.py new file mode 100644 index 0000000000..805dbd086c --- /dev/null +++ b/setuptools/_backport/hashlib/_sha256.py @@ -0,0 +1,260 @@ +import struct + +SHA_BLOCKSIZE = 64 +SHA_DIGESTSIZE = 32 + + +def new_shaobject(): + return { + 'digest': [0]*8, + 'count_lo': 0, + 'count_hi': 0, + 'data': [0]* SHA_BLOCKSIZE, + 'local': 0, + 'digestsize': 0 + } + +ROR = lambda x, y: (((x & 0xffffffff) >> (y & 31)) | (x << (32 - (y & 31)))) & 0xffffffff +Ch = lambda x, y, z: (z ^ (x & (y ^ z))) +Maj = lambda x, y, z: (((x | y) & z) | (x & y)) +S = lambda x, n: ROR(x, n) +R = lambda x, n: (x & 0xffffffff) >> n +Sigma0 = lambda x: (S(x, 2) ^ S(x, 13) ^ S(x, 22)) +Sigma1 = lambda x: (S(x, 6) ^ S(x, 11) ^ S(x, 25)) +Gamma0 = lambda x: (S(x, 7) ^ S(x, 18) ^ R(x, 3)) +Gamma1 = lambda x: (S(x, 17) ^ S(x, 19) ^ R(x, 10)) + +def sha_transform(sha_info): + W = [] + + d = sha_info['data'] + for i in xrange(0,16): + W.append( (d[4*i]<<24) + (d[4*i+1]<<16) + (d[4*i+2]<<8) + d[4*i+3]) + + for i in xrange(16,64): + W.append( (Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]) & 0xffffffff ) + + ss = sha_info['digest'][:] + + def RND(a,b,c,d,e,f,g,h,i,ki): + t0 = h + Sigma1(e) + Ch(e, f, g) + ki + W[i]; + t1 = Sigma0(a) + Maj(a, b, c); + d += t0; + h = t0 + t1; + return d & 0xffffffff, h & 0xffffffff + + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],0,0x428a2f98); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],1,0x71374491); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],2,0xb5c0fbcf); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],3,0xe9b5dba5); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],4,0x3956c25b); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],5,0x59f111f1); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],6,0x923f82a4); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],7,0xab1c5ed5); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],8,0xd807aa98); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],9,0x12835b01); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],10,0x243185be); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],11,0x550c7dc3); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],12,0x72be5d74); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],13,0x80deb1fe); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],14,0x9bdc06a7); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],15,0xc19bf174); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],16,0xe49b69c1); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],17,0xefbe4786); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],18,0x0fc19dc6); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],19,0x240ca1cc); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],20,0x2de92c6f); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],21,0x4a7484aa); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],22,0x5cb0a9dc); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],23,0x76f988da); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],24,0x983e5152); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],25,0xa831c66d); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],26,0xb00327c8); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],27,0xbf597fc7); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],28,0xc6e00bf3); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],29,0xd5a79147); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],30,0x06ca6351); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],31,0x14292967); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],32,0x27b70a85); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],33,0x2e1b2138); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],34,0x4d2c6dfc); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],35,0x53380d13); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],36,0x650a7354); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],37,0x766a0abb); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],38,0x81c2c92e); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],39,0x92722c85); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],40,0xa2bfe8a1); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],41,0xa81a664b); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],42,0xc24b8b70); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],43,0xc76c51a3); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],44,0xd192e819); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],45,0xd6990624); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],46,0xf40e3585); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],47,0x106aa070); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],48,0x19a4c116); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],49,0x1e376c08); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],50,0x2748774c); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],51,0x34b0bcb5); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],52,0x391c0cb3); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],53,0x4ed8aa4a); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],54,0x5b9cca4f); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],55,0x682e6ff3); + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],56,0x748f82ee); + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],57,0x78a5636f); + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],58,0x84c87814); + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],59,0x8cc70208); + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],60,0x90befffa); + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],61,0xa4506ceb); + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],62,0xbef9a3f7); + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],63,0xc67178f2); + + dig = [] + for i, x in enumerate(sha_info['digest']): + dig.append( (x + ss[i]) & 0xffffffff ) + sha_info['digest'] = dig + +def sha_init(): + sha_info = new_shaobject() + sha_info['digest'] = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19] + sha_info['count_lo'] = 0 + sha_info['count_hi'] = 0 + sha_info['local'] = 0 + sha_info['digestsize'] = 32 + return sha_info + +def sha224_init(): + sha_info = new_shaobject() + sha_info['digest'] = [0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4] + sha_info['count_lo'] = 0 + sha_info['count_hi'] = 0 + sha_info['local'] = 0 + sha_info['digestsize'] = 28 + return sha_info + +def getbuf(s): + if isinstance(s, str): + return s + elif isinstance(s, unicode): + return str(s) + else: + return buffer(s) + +def sha_update(sha_info, buffer): + count = len(buffer) + buffer_idx = 0 + clo = (sha_info['count_lo'] + (count << 3)) & 0xffffffff + if clo < sha_info['count_lo']: + sha_info['count_hi'] += 1 + sha_info['count_lo'] = clo + + sha_info['count_hi'] += (count >> 29) + + if sha_info['local']: + i = SHA_BLOCKSIZE - sha_info['local'] + if i > count: + i = count + + # copy buffer + for x in enumerate(buffer[buffer_idx:buffer_idx+i]): + sha_info['data'][sha_info['local']+x[0]] = struct.unpack('B', x[1])[0] + + count -= i + buffer_idx += i + + sha_info['local'] += i + if sha_info['local'] == SHA_BLOCKSIZE: + sha_transform(sha_info) + sha_info['local'] = 0 + else: + return + + while count >= SHA_BLOCKSIZE: + # copy buffer + sha_info['data'] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + SHA_BLOCKSIZE]] + count -= SHA_BLOCKSIZE + buffer_idx += SHA_BLOCKSIZE + sha_transform(sha_info) + + + # copy buffer + pos = sha_info['local'] + sha_info['data'][pos:pos+count] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + count]] + sha_info['local'] = count + +def sha_final(sha_info): + lo_bit_count = sha_info['count_lo'] + hi_bit_count = sha_info['count_hi'] + count = (lo_bit_count >> 3) & 0x3f + sha_info['data'][count] = 0x80; + count += 1 + if count > SHA_BLOCKSIZE - 8: + # zero the bytes in data after the count + sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) + sha_transform(sha_info) + # zero bytes in data + sha_info['data'] = [0] * SHA_BLOCKSIZE + else: + sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) + + sha_info['data'][56] = (hi_bit_count >> 24) & 0xff + sha_info['data'][57] = (hi_bit_count >> 16) & 0xff + sha_info['data'][58] = (hi_bit_count >> 8) & 0xff + sha_info['data'][59] = (hi_bit_count >> 0) & 0xff + sha_info['data'][60] = (lo_bit_count >> 24) & 0xff + sha_info['data'][61] = (lo_bit_count >> 16) & 0xff + sha_info['data'][62] = (lo_bit_count >> 8) & 0xff + sha_info['data'][63] = (lo_bit_count >> 0) & 0xff + + sha_transform(sha_info) + + dig = [] + for i in sha_info['digest']: + dig.extend([ ((i>>24) & 0xff), ((i>>16) & 0xff), ((i>>8) & 0xff), (i & 0xff) ]) + return ''.join([chr(i) for i in dig]) + +class sha256(object): + digest_size = digestsize = SHA_DIGESTSIZE + block_size = SHA_BLOCKSIZE + + def __init__(self, s=None): + self._sha = sha_init() + if s: + sha_update(self._sha, getbuf(s)) + + def update(self, s): + sha_update(self._sha, getbuf(s)) + + def digest(self): + return sha_final(self._sha.copy())[:self._sha['digestsize']] + + def hexdigest(self): + return ''.join(['%.2x' % ord(i) for i in self.digest()]) + + def copy(self): + new = sha256.__new__(sha256) + new._sha = self._sha.copy() + return new + +class sha224(sha256): + digest_size = digestsize = 28 + + def __init__(self, s=None): + self._sha = sha224_init() + if s: + sha_update(self._sha, getbuf(s)) + + def copy(self): + new = sha224.__new__(sha224) + new._sha = self._sha.copy() + return new + +if __name__ == "__main__": + a_str = "just a test string" + + assert 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' == sha256().hexdigest() + assert 'd7b553c6f09ac85d142415f857c5310f3bbbe7cdd787cce4b985acedd585266f' == sha256(a_str).hexdigest() + assert '8113ebf33c97daa9998762aacafe750c7cefc2b2f173c90c59663a57fe626f21' == sha256(a_str*7).hexdigest() + + s = sha256(a_str) + s.update(a_str) + assert '03d9963e05a094593190b6fc794cb1a3e1ac7d7883f0b5855268afeccc70d461' == s.hexdigest() diff --git a/setuptools/_backport/hashlib/_sha512.py b/setuptools/_backport/hashlib/_sha512.py new file mode 100644 index 0000000000..68ff46f308 --- /dev/null +++ b/setuptools/_backport/hashlib/_sha512.py @@ -0,0 +1,288 @@ +""" +This code was Ported from CPython's sha512module.c +""" + +import struct + +SHA_BLOCKSIZE = 128 +SHA_DIGESTSIZE = 64 + + +def new_shaobject(): + return { + 'digest': [0]*8, + 'count_lo': 0, + 'count_hi': 0, + 'data': [0]* SHA_BLOCKSIZE, + 'local': 0, + 'digestsize': 0 + } + +ROR64 = lambda x, y: (((x & 0xffffffffffffffff) >> (y & 63)) | (x << (64 - (y & 63)))) & 0xffffffffffffffff +Ch = lambda x, y, z: (z ^ (x & (y ^ z))) +Maj = lambda x, y, z: (((x | y) & z) | (x & y)) +S = lambda x, n: ROR64(x, n) +R = lambda x, n: (x & 0xffffffffffffffff) >> n +Sigma0 = lambda x: (S(x, 28) ^ S(x, 34) ^ S(x, 39)) +Sigma1 = lambda x: (S(x, 14) ^ S(x, 18) ^ S(x, 41)) +Gamma0 = lambda x: (S(x, 1) ^ S(x, 8) ^ R(x, 7)) +Gamma1 = lambda x: (S(x, 19) ^ S(x, 61) ^ R(x, 6)) + +def sha_transform(sha_info): + W = [] + + d = sha_info['data'] + for i in xrange(0,16): + W.append( (d[8*i]<<56) + (d[8*i+1]<<48) + (d[8*i+2]<<40) + (d[8*i+3]<<32) + (d[8*i+4]<<24) + (d[8*i+5]<<16) + (d[8*i+6]<<8) + d[8*i+7]) + + for i in xrange(16,80): + W.append( (Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]) & 0xffffffffffffffff ) + + ss = sha_info['digest'][:] + + def RND(a,b,c,d,e,f,g,h,i,ki): + t0 = (h + Sigma1(e) + Ch(e, f, g) + ki + W[i]) & 0xffffffffffffffff + t1 = (Sigma0(a) + Maj(a, b, c)) & 0xffffffffffffffff + d = (d + t0) & 0xffffffffffffffff + h = (t0 + t1) & 0xffffffffffffffff + return d & 0xffffffffffffffff, h & 0xffffffffffffffff + + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],0,0x428a2f98d728ae22) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],1,0x7137449123ef65cd) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],2,0xb5c0fbcfec4d3b2f) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],3,0xe9b5dba58189dbbc) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],4,0x3956c25bf348b538) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],5,0x59f111f1b605d019) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],6,0x923f82a4af194f9b) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],7,0xab1c5ed5da6d8118) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],8,0xd807aa98a3030242) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],9,0x12835b0145706fbe) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],10,0x243185be4ee4b28c) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],11,0x550c7dc3d5ffb4e2) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],12,0x72be5d74f27b896f) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],13,0x80deb1fe3b1696b1) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],14,0x9bdc06a725c71235) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],15,0xc19bf174cf692694) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],16,0xe49b69c19ef14ad2) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],17,0xefbe4786384f25e3) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],18,0x0fc19dc68b8cd5b5) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],19,0x240ca1cc77ac9c65) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],20,0x2de92c6f592b0275) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],21,0x4a7484aa6ea6e483) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],22,0x5cb0a9dcbd41fbd4) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],23,0x76f988da831153b5) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],24,0x983e5152ee66dfab) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],25,0xa831c66d2db43210) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],26,0xb00327c898fb213f) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],27,0xbf597fc7beef0ee4) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],28,0xc6e00bf33da88fc2) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],29,0xd5a79147930aa725) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],30,0x06ca6351e003826f) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],31,0x142929670a0e6e70) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],32,0x27b70a8546d22ffc) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],33,0x2e1b21385c26c926) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],34,0x4d2c6dfc5ac42aed) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],35,0x53380d139d95b3df) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],36,0x650a73548baf63de) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],37,0x766a0abb3c77b2a8) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],38,0x81c2c92e47edaee6) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],39,0x92722c851482353b) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],40,0xa2bfe8a14cf10364) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],41,0xa81a664bbc423001) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],42,0xc24b8b70d0f89791) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],43,0xc76c51a30654be30) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],44,0xd192e819d6ef5218) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],45,0xd69906245565a910) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],46,0xf40e35855771202a) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],47,0x106aa07032bbd1b8) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],48,0x19a4c116b8d2d0c8) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],49,0x1e376c085141ab53) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],50,0x2748774cdf8eeb99) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],51,0x34b0bcb5e19b48a8) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],52,0x391c0cb3c5c95a63) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],53,0x4ed8aa4ae3418acb) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],54,0x5b9cca4f7763e373) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],55,0x682e6ff3d6b2b8a3) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],56,0x748f82ee5defb2fc) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],57,0x78a5636f43172f60) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],58,0x84c87814a1f0ab72) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],59,0x8cc702081a6439ec) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],60,0x90befffa23631e28) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],61,0xa4506cebde82bde9) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],62,0xbef9a3f7b2c67915) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],63,0xc67178f2e372532b) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],64,0xca273eceea26619c) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],65,0xd186b8c721c0c207) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],66,0xeada7dd6cde0eb1e) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],67,0xf57d4f7fee6ed178) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],68,0x06f067aa72176fba) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],69,0x0a637dc5a2c898a6) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],70,0x113f9804bef90dae) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],71,0x1b710b35131c471b) + ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],72,0x28db77f523047d84) + ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],73,0x32caab7b40c72493) + ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],74,0x3c9ebe0a15c9bebc) + ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],75,0x431d67c49c100d4c) + ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],76,0x4cc5d4becb3e42b6) + ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],77,0x597f299cfc657e2a) + ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],78,0x5fcb6fab3ad6faec) + ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],79,0x6c44198c4a475817) + + dig = [] + for i, x in enumerate(sha_info['digest']): + dig.append( (x + ss[i]) & 0xffffffffffffffff ) + sha_info['digest'] = dig + +def sha_init(): + sha_info = new_shaobject() + sha_info['digest'] = [ 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179] + sha_info['count_lo'] = 0 + sha_info['count_hi'] = 0 + sha_info['local'] = 0 + sha_info['digestsize'] = 64 + return sha_info + +def sha384_init(): + sha_info = new_shaobject() + sha_info['digest'] = [ 0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4] + sha_info['count_lo'] = 0 + sha_info['count_hi'] = 0 + sha_info['local'] = 0 + sha_info['digestsize'] = 48 + return sha_info + +def getbuf(s): + if isinstance(s, str): + return s + elif isinstance(s, unicode): + return str(s) + else: + return buffer(s) + +def sha_update(sha_info, buffer): + count = len(buffer) + buffer_idx = 0 + clo = (sha_info['count_lo'] + (count << 3)) & 0xffffffff + if clo < sha_info['count_lo']: + sha_info['count_hi'] += 1 + sha_info['count_lo'] = clo + + sha_info['count_hi'] += (count >> 29) + + if sha_info['local']: + i = SHA_BLOCKSIZE - sha_info['local'] + if i > count: + i = count + + # copy buffer + for x in enumerate(buffer[buffer_idx:buffer_idx+i]): + sha_info['data'][sha_info['local']+x[0]] = struct.unpack('B', x[1])[0] + + count -= i + buffer_idx += i + + sha_info['local'] += i + if sha_info['local'] == SHA_BLOCKSIZE: + sha_transform(sha_info) + sha_info['local'] = 0 + else: + return + + while count >= SHA_BLOCKSIZE: + # copy buffer + sha_info['data'] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + SHA_BLOCKSIZE]] + count -= SHA_BLOCKSIZE + buffer_idx += SHA_BLOCKSIZE + sha_transform(sha_info) + + # copy buffer + pos = sha_info['local'] + sha_info['data'][pos:pos+count] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + count]] + sha_info['local'] = count + +def sha_final(sha_info): + lo_bit_count = sha_info['count_lo'] + hi_bit_count = sha_info['count_hi'] + count = (lo_bit_count >> 3) & 0x7f + sha_info['data'][count] = 0x80; + count += 1 + if count > SHA_BLOCKSIZE - 16: + # zero the bytes in data after the count + sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) + sha_transform(sha_info) + # zero bytes in data + sha_info['data'] = [0] * SHA_BLOCKSIZE + else: + sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) + + sha_info['data'][112] = 0; + sha_info['data'][113] = 0; + sha_info['data'][114] = 0; + sha_info['data'][115] = 0; + sha_info['data'][116] = 0; + sha_info['data'][117] = 0; + sha_info['data'][118] = 0; + sha_info['data'][119] = 0; + + sha_info['data'][120] = (hi_bit_count >> 24) & 0xff + sha_info['data'][121] = (hi_bit_count >> 16) & 0xff + sha_info['data'][122] = (hi_bit_count >> 8) & 0xff + sha_info['data'][123] = (hi_bit_count >> 0) & 0xff + sha_info['data'][124] = (lo_bit_count >> 24) & 0xff + sha_info['data'][125] = (lo_bit_count >> 16) & 0xff + sha_info['data'][126] = (lo_bit_count >> 8) & 0xff + sha_info['data'][127] = (lo_bit_count >> 0) & 0xff + + sha_transform(sha_info) + + dig = [] + for i in sha_info['digest']: + dig.extend([ ((i>>56) & 0xff), ((i>>48) & 0xff), ((i>>40) & 0xff), ((i>>32) & 0xff), ((i>>24) & 0xff), ((i>>16) & 0xff), ((i>>8) & 0xff), (i & 0xff) ]) + return ''.join([chr(i) for i in dig]) + +class sha512(object): + digest_size = digestsize = SHA_DIGESTSIZE + block_size = SHA_BLOCKSIZE + + def __init__(self, s=None): + self._sha = sha_init() + if s: + sha_update(self._sha, getbuf(s)) + + def update(self, s): + sha_update(self._sha, getbuf(s)) + + def digest(self): + return sha_final(self._sha.copy())[:self._sha['digestsize']] + + def hexdigest(self): + return ''.join(['%.2x' % ord(i) for i in self.digest()]) + + def copy(self): + new = sha512.__new__(sha512) + new._sha = self._sha.copy() + return new + +class sha384(sha512): + digest_size = digestsize = 48 + + def __init__(self, s=None): + self._sha = sha384_init() + if s: + sha_update(self._sha, getbuf(s)) + + def copy(self): + new = sha384.__new__(sha384) + new._sha = self._sha.copy() + return new + +if __name__ == "__main__": + a_str = "just a test string" + + assert sha512().hexdigest() == "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" + assert sha512(a_str).hexdigest() == "68be4c6664af867dd1d01c8d77e963d87d77b702400c8fabae355a41b8927a5a5533a7f1c28509bbd65c5f3ac716f33be271fbda0ca018b71a84708c9fae8a53" + assert sha512(a_str*7).hexdigest() == "3233acdbfcfff9bff9fc72401d31dbffa62bd24e9ec846f0578d647da73258d9f0879f7fde01fe2cc6516af3f343807fdef79e23d696c923d79931db46bf1819" + + s = sha512(a_str) + s.update(a_str) + assert s.hexdigest() == "341aeb668730bbb48127d5531115f3c39d12cb9586a6ca770898398aff2411087cfe0b570689adf328cddeb1f00803acce6737a19f310b53bbdb0320828f75bb" From dcba8b90b84506a7325f8e576d10ccb8d2e9a415 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Tue, 9 Jul 2013 22:12:15 -0400 Subject: [PATCH 1336/8469] Add a shim for python 2.4 compatability with hashlib --HG-- extra : rebase_source : 5f573e600aadbe9c95561ee28c05cee02c7db559 --- setuptools/py24compat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/py24compat.py b/setuptools/py24compat.py index c5d7d2045d..40e9ae0f74 100644 --- a/setuptools/py24compat.py +++ b/setuptools/py24compat.py @@ -9,3 +9,9 @@ def wraps(func): "Just return the function unwrapped" return lambda x: x + + +try: + import hashlib +except ImportError: + from setuptools._backport import hashlib From 37e2f6f5395586e12eb57a4b6fd598b29744de0c Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Tue, 9 Jul 2013 22:30:25 -0400 Subject: [PATCH 1337/8469] Enable using any guarenteed hash as a hash function --HG-- extra : rebase_source : 1c5040c4a89dfcd4ec8cf2ad64825d5bc73ebe30 --- setuptools/package_index.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 61a66c6d2f..e29a142cc6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -11,11 +11,8 @@ url2pathname, name2codepoint, unichr, urljoin) from setuptools.compat import filterfalse -try: - from hashlib import md5 -except ImportError: - from md5 import md5 from fnmatch import translate +from setuptools.py24compat import hashlib from setuptools.py24compat import wraps from setuptools.py27compat import get_all_headers @@ -28,6 +25,7 @@ ) URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() +_HASH_RE = re.compile(r'(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)') __all__ = [ 'PackageIndex', 'distros_for_url', 'parse_bdist_wininst', @@ -387,15 +385,19 @@ def obtain(self, requirement, installer=None): - def check_md5(self, cs, info, filename, tfp): - if re.match('md5=[0-9a-f]{32}$', info): - self.debug("Validating md5 checksum for %s", filename) - if cs.hexdigest() != info[4:]: + def check_hash(self, cs, info, filename, tfp): + match = _HASH_RE.search(info) + if match: + hash_name = match.group(1) + hash_data = match.group(2) + self.debug("Validating %s checksum for %s", hash_name, filename) + if cs.hexdigest() != hash_data: tfp.close() os.unlink(filename) raise DistutilsError( - "MD5 validation failed for "+os.path.basename(filename)+ - "; possible download problem?" + "%s validation failed for %s; " + "possible download problem?" % ( + hash_name, os.path.basename(filename)) ) def add_find_links(self, urls): @@ -598,16 +600,19 @@ def gen_setup(self, filename, fragment, tmpdir): def _download_to(self, url, filename): self.info("Downloading %s", url) # Download the file - fp, tfp, info = None, None, None + fp, tfp, cs, info = None, None, None, None try: if '#' in url: url, info = url.split('#', 1) + hmatch = _HASH_RE.search(info) + hash_name = hmatch.group(1) + hash_data = hmatch.group(2) + cs = hashlib.new(hash_name) fp = self.open_url(url) if isinstance(fp, HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) ) - cs = md5() headers = fp.info() blocknum = 0 bs = self.dl_blocksize @@ -621,13 +626,14 @@ def _download_to(self, url, filename): while True: block = fp.read(bs) if block: - cs.update(block) + if cs is not None: + cs.update(block) tfp.write(block) blocknum += 1 self.reporthook(url, filename, blocknum, bs, size) else: break - if info: self.check_md5(cs, info, filename, tfp) + if info: self.check_hash(cs, info, filename, tfp) return headers finally: if fp: fp.close() From 1ba2a40c16a04be7daec1f9c032c0553e5124fc8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 11:51:03 -0400 Subject: [PATCH 1338/8469] Updated changelog and contributors --- CHANGES.txt | 6 ++++++ CONTRIBUTORS.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index bec396bd51..166eb74635 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +--- +0.9 +--- + +* `package_index` now validates hashes other than MD5 in download links. + --- 0.8 --- diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8515babe6c..f1966505a7 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -9,6 +9,7 @@ Contributors * Daniel Stutzbach * Daniel Holth * Dirley Rodrigues +* Donald Stufft * Grigory Petrov * Hanno Schlichting * Jannis Leidel From f72612a28fad26d2538a2e260bd158aaacf378e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 11:53:03 -0400 Subject: [PATCH 1339/8469] Added tag 0.9 for changeset 3078b1e56639 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 96b3c0bb0a..ad33c10ba0 100644 --- a/.hgtags +++ b/.hgtags @@ -80,3 +80,4 @@ f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 236de1de68b14230036147c7c9e7c09b215b53ee 0.7.8 979d598822bc64b05fb177a2ba221e75ee5b44d3 0.8b7 e3d70539e79f39a97f69674ab038661961a1eb43 0.8 +3078b1e566399bf0c5590f3528df03d0c23a0777 0.9 From 87750d2cf138ed8f0e600e61db9a4b340f0f4b9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 11:54:35 -0400 Subject: [PATCH 1340/8469] Bumped to 0.10 in preparation for next release. --- docs/conf.py | 4 +- ez_setup.py | 2 +- release.py | 4 +- setup.py | 6 +- setuptools.egg-info/dependency_links.txt | 2 +- setuptools.egg-info/entry_points.txt | 72 ++++++++++++------------ setuptools.egg-info/requires.txt | 8 +-- setuptools/__init__.py | 2 +- 8 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7113c36535..d99639d6f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.9' +version = '0.10' # The full version, including alpha/beta/rc tags. -release = '0.9' +release = '0.10' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 61187113b5..14eef9245e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9" +DEFAULT_VERSION = "0.10" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/release.py b/release.py index 3631799355..443d455d21 100644 --- a/release.py +++ b/release.py @@ -33,7 +33,7 @@ except Exception: pass -VERSION = '0.9' +VERSION = '0.10' PACKAGE_INDEX = 'https://pypi.python.org/pypi' def set_versions(): @@ -53,7 +53,7 @@ def infer_next_version(version): >>> infer_next_version('1.0b') '1.0b1' - >>> infer_next_version('1.0.9') + >>> infer_next_version('1.0.10') '1.0.10' >>> infer_next_version('1') diff --git a/setup.py b/setup.py index 61a4308a69..c748f07c16 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.9" +VERSION = "0.10" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py @@ -219,10 +219,10 @@ def run(self): "ssl:sys_platform=='win32'": "wincertstore==0.1", "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", "ssl:python_version in '2.4, 2.5'":"ssl==1.16", - "certs": "certifi==0.0.9", + "certs": "certifi==0.0.10", }, dependency_links = [ - 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.10.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index c688b7eaab..643fcf123c 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,4 +1,4 @@ -https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 5db5e49550..33d6692145 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - [distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install_lib = setuptools.command.install_lib:install_lib -setopt = setuptools.command.setopt:setopt build_ext = setuptools.command.build_ext:build_ext build_py = setuptools.command.build_py:build_py -install_scripts = setuptools.command.install_scripts:install_scripts -saveopts = setuptools.command.saveopts:saveopts -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist +install = setuptools.command.install:install rotate = setuptools.command.rotate:rotate upload_docs = setuptools.command.upload_docs:upload_docs -bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_egg_info = setuptools.command.install_egg_info:install_egg_info +sdist = setuptools.command.sdist:sdist +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst egg_info = setuptools.command.egg_info:egg_info -test = setuptools.command.test:test +setopt = setuptools.command.setopt:setopt +register = setuptools.command.register:register develop = setuptools.command.develop:develop -install = setuptools.command.install:install -install_egg_info = setuptools.command.install_egg_info:install_egg_info +saveopts = setuptools.command.saveopts:saveopts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +bdist_egg = setuptools.command.bdist_egg:bdist_egg +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib easy_install = setuptools.command.easy_install:easy_install -register = setuptools.command.register:register +alias = setuptools.command.alias:alias [egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -include_package_data = setuptools.dist:assert_bool -zip_safe = setuptools.dist:assert_bool -use_2to3 = setuptools.dist:assert_bool eager_resources = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements test_loader = setuptools.dist:check_importable -extras_require = setuptools.dist:check_extras -exclude_package_data = setuptools.dist:check_package_data +test_suite = setuptools.dist:check_test_suite use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points package_data = setuptools.dist:check_package_data +convert_2to3_doctests = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras use_2to3_fixers = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data tests_require = setuptools.dist:check_requirements +entry_points = setuptools.dist:check_entry_points +dependency_links = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool packages = setuptools.dist:check_packages +zip_safe = setuptools.dist:assert_bool namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index bf85f734f5..7fe852184e 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [certs] -certifi==0.0.8 +certifi==0.0.9 [ssl:python_version in '2.4, 2.5'] ssl==1.16 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index bc62cf82ab..9158fd75ff 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9' +__version__ = '0.10' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From aff12162f1b2278a6c41c0abb9896f8b4ec5c5b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 15:10:38 -0400 Subject: [PATCH 1341/8469] Factored out the setuptools-specific code from release.py and moved the common functionality into jaraco.packaging. Use jaraco.packaging to enact releases. --- release.py | 214 +++-------------------------------------------------- 1 file changed, 9 insertions(+), 205 deletions(-) diff --git a/release.py b/release.py index 443d455d21..e44ca0f105 100644 --- a/release.py +++ b/release.py @@ -1,225 +1,32 @@ -#!/usr/bin/env python - """ -Script to fully automate the release process. Requires Python 2.6+ -with sphinx installed and the 'hg' command on the path. +Setuptools is released using 'jaraco.packaging.release'. To make a release, +install jaraco.packaging and run 'python -m jaraco.packaging.release' """ -from __future__ import print_function - -import subprocess -import shutil +import re import os -import sys -import getpass -import collections import itertools -import re - -import requests - -try: - input = raw_input -except NameError: - pass try: zip_longest = itertools.zip_longest except AttributeError: zip_longest = itertools.izip_longest -try: - import keyring -except Exception: - pass - -VERSION = '0.10' -PACKAGE_INDEX = 'https://pypi.python.org/pypi' - -def set_versions(): - global VERSION - version = input("Release as version [%s]> " % VERSION) or VERSION - if version != VERSION: - VERSION = bump_versions(version) - -def infer_next_version(version): - """ - Infer a next version from the current version by incrementing the last - number or appending a number. +def before_upload(): + _linkify('CHANGES.txt', 'CHANGES (linked).txt') - >>> infer_next_version('1.0') - '1.1' - - >>> infer_next_version('1.0b') - '1.0b1' - - >>> infer_next_version('1.0.10') - '1.0.10' - - >>> infer_next_version('1') - '2' - - >>> infer_next_version('') - '1' - """ - def incr(match): - ver = int(match.group(0) or '0') - return str(ver + 1) - return re.sub('\d*$', incr, version) +version = '0.10' files_with_versions = ( 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', 'setuptools/__init__.py', ) -def get_repo_name(): - """ - Get the repo name from the hgrc default path. - """ - default = subprocess.check_output('hg paths default').strip().decode('utf-8') - parts = default.split('/') - if parts[-1] == '': - parts.pop() - return '/'.join(parts[-2:]) - -def get_mercurial_creds(system='https://bitbucket.org', username=None): - """ - Return named tuple of username,password in much the same way that - Mercurial would (from the keyring). - """ - # todo: consider getting this from .hgrc - username = username or getpass.getuser() - keyring_username = '@@'.join((username, system)) - system = 'Mercurial' - password = ( - keyring.get_password(system, keyring_username) - if 'keyring' in globals() - else None - ) - if not password: - password = getpass.getpass() - Credential = collections.namedtuple('Credential', 'username password') - return Credential(username, password) +test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" -def add_milestone_and_version(version): - base = 'https://api.bitbucket.org' - for type in 'milestones', 'versions': - url = (base + '/1.0/repositories/{repo}/issues/{type}' - .format(repo = get_repo_name(), type=type)) - resp = requests.post(url=url, - data='name='+version, auth=get_mercurial_creds()) - resp.raise_for_status() +os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" -def bump_versions(target_ver): - for filename in files_with_versions: - bump_version(filename, target_ver) - subprocess.check_call(['hg', 'ci', '-m', - 'Bumped to {target_ver} in preparation for next ' - 'release.'.format(**vars())]) - return target_ver - -def bump_version(filename, target_ver): - with open(filename, 'rb') as f: - lines = [ - line.replace(VERSION.encode('ascii'), target_ver.encode('ascii')) - for line in f - ] - with open(filename, 'wb') as f: - f.writelines(lines) - -def do_release(): - assert all(map(os.path.exists, files_with_versions)), ( - "Expected file(s) missing") - - assert has_sphinx(), "You must have Sphinx installed to release" - - set_versions() - - res = input('Have you read through the SCM changelog and ' - 'confirmed the changelog is current for releasing {VERSION}? ' - .format(**globals())) - if not res.lower().startswith('y'): - print("Please do that") - raise SystemExit(1) - - print("Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools") - res = input('Have you or has someone verified that the tests ' - 'pass on this revision? ') - if not res.lower().startswith('y'): - print("Please do that") - raise SystemExit(2) - - subprocess.check_call(['hg', 'tag', VERSION]) - - subprocess.check_call(['hg', 'update', VERSION]) - - upload_to_pypi() - upload_ez_setup() - - # update to the tip for the next operation - subprocess.check_call(['hg', 'update']) - - # we just tagged the current version, bump for the next release. - next_ver = bump_versions(infer_next_version(VERSION)) - - # push the changes - subprocess.check_call(['hg', 'push']) - - add_milestone_and_version(next_ver) - -def upload_to_pypi(): - linkify('CHANGES.txt', 'CHANGES (links).txt') - - has_docs = build_docs() - if os.path.isdir('./dist'): - shutil.rmtree('./dist') - cmd = [ - sys.executable, 'setup.py', '-q', - 'egg_info', '-RD', '-b', '', - 'sdist', - 'register', '-r', PACKAGE_INDEX, - 'upload', '-r', PACKAGE_INDEX, - ] - if has_docs: - cmd.extend([ - 'upload_docs', '-r', PACKAGE_INDEX - ]) - env = os.environ.copy() - env["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" - subprocess.check_call(cmd, env=env) - -def upload_ez_setup(): - """ - TODO: upload ez_setup.py to a permalinked location. Currently, this - location is https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py . - In the long term, it should be on PyPI. - """ - -def has_sphinx(): - try: - devnull = open(os.path.devnull, 'wb') - subprocess.Popen(['sphinx-build', '--version'], stdout=devnull, - stderr=subprocess.STDOUT).wait() - except Exception: - return False - return True - -def build_docs(): - if not os.path.isdir('docs'): - return - if os.path.isdir('docs/build'): - shutil.rmtree('docs/build') - cmd = [ - 'sphinx-build', - '-b', 'html', - '-d', 'build/doctrees', - '.', - 'build/html', - ] - subprocess.check_call(cmd, cwd='docs') - return True - -def linkify(source, dest): +def _linkify(source, dest): with open(source) as source: out = _linkified_text(source.read()) with open(dest, 'w') as dest: @@ -272,6 +79,3 @@ def _linkified_part(text, anchors): anchors.extend(revision.findall(text)) # ['Issue #43', ...] return revision.sub(r'`\1`_', text) - -if __name__ == '__main__': - do_release() From cf134c837ad5f63d6a2497a0e14c76bff3c4b18f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 15:12:29 -0400 Subject: [PATCH 1342/8469] Remove unused import --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index c748f07c16..8a320ee325 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ import sys import os import textwrap -import re # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) From a90b375539ee0b1c3279508b65dc5b94b687719f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 15:15:56 -0400 Subject: [PATCH 1343/8469] Remove 2to3 build support for setuptools itself --- setup.py | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/setup.py b/setup.py index 8a320ee325..a88fd0413f 100755 --- a/setup.py +++ b/setup.py @@ -8,34 +8,6 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None -do_2to3 = False -if sys.version_info >= (3,) and do_2to3: - tmp_src = os.path.join("build", "src") - from distutils.filelist import FileList - from distutils import dir_util, file_util, util, log - log.set_verbosity(1) - fl = FileList() - manifest_file = open("MANIFEST.in") - for line in manifest_file: - fl.process_template_line(line) - manifest_file.close() - dir_util.create_tree(tmp_src, fl.files) - outfiles_2to3 = [] - dist_script = os.path.join("build", "src", "ez_setup.py") - for f in fl.files: - outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1) - if copied and outf.endswith(".py") and outf != dist_script: - outfiles_2to3.append(outf) - if copied and outf.endswith('api_tests.txt'): - # XXX support this in distutils as well - from lib2to3.main import main - main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')]) - - util.run_2to3(outfiles_2to3) - - # arrange setup to use the copy - sys.path.insert(0, os.path.abspath(tmp_src)) - src_root = tmp_src from distutils.util import convert_path @@ -76,15 +48,6 @@ def build_package_data(self): outf, copied = self.copy_file(srcfile, target) srcfile = os.path.abspath(srcfile) - # avoid a bootstrapping issue with easy_install -U (when the - # previous version doesn't have convert_2to3_doctests) - if not hasattr(self.distribution, 'convert_2to3_doctests'): - continue - if not do_2to3: - continue - if copied and srcfile in self.distribution.convert_2to3_doctests: - self.__doctests_2to3.append(outf) - class test(_test): """Specific test class to avoid rewriting the entry_points.txt""" def run(self): From 392032ad941ffd8cd56f8908ebcdbb768c62c156 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 15:19:28 -0400 Subject: [PATCH 1344/8469] Allow setup script to be imported --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a88fd0413f..49dcd79fe4 100755 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ def run(self): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) -dist = setup( +setup_params = dict( name="setuptools", version=VERSION, description="Easily download, build, install, upgrade, and uninstall " @@ -194,3 +194,6 @@ def run(self): scripts = [], # tests_require = "setuptools[ssl]", ) + +if __name__ == '__main__': + dist = setup(**setup_params) From fb535e22bf4e09b0f6f8a91d33b9757052dd8ada Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 15:20:41 -0400 Subject: [PATCH 1345/8469] Now that setup script is importable, the release script can grab the version from setup.py --- release.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/release.py b/release.py index e44ca0f105..5dae8cea38 100644 --- a/release.py +++ b/release.py @@ -15,11 +15,8 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (linked).txt') -version = '0.10' - files_with_versions = ( - 'docs/conf.py', 'setup.py', 'release.py', 'ez_setup.py', - 'setuptools/__init__.py', + 'docs/conf.py', 'setup.py', 'ez_setup.py', 'setuptools/__init__.py', ) test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" From 0be93889e5c04b7573736d312dc4f904c23f6a2e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 16:14:20 -0400 Subject: [PATCH 1346/8469] Allow other arguments and kwargs to os.open when in the sandbox. Fixes Distribute #386. --- CHANGES.txt | 6 ++++++ setuptools/sandbox.py | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 166eb74635..23a198ce45 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.9.1 +----- + +* Distribute #386: Allow other positional and keyword arguments to os.open. + --- 0.9 --- diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 4e527446ce..29fc07b8d9 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -270,11 +270,11 @@ def _remap_pair(self,operation,src,dst,*args,**kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) - def open(self, file, flags, mode=0x1FF): # 0777 + def open(self, file, flags, mode=0x1FF, *args, **kw): # 0777 """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): - self._violation("os.open", file, flags, mode) - return _os.open(file,flags,mode) + self._violation("os.open", file, flags, mode, *args, **kw) + return _os.open(file,flags,mode, *args, **kw) WRITE_FLAGS = reduce( operator.or_, [getattr(_os, a, 0) for a in From 9298e5f23a1edbbab4b2da4ca9e9496b8e69c0dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 16:16:01 -0400 Subject: [PATCH 1347/8469] Regenerated bundled egg-info --- setuptools.egg-info/dependency_links.txt | 2 +- setuptools.egg-info/entry_points.txt | 92 ++++++++++++------------ setuptools.egg-info/requires.txt | 14 ++-- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index 643fcf123c..aea106c504 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,4 +1,4 @@ -https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/c/certifi/certifi-0.0.10.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 33d6692145..45cc56a1bf 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -build_ext = setuptools.command.build_ext:build_ext -build_py = setuptools.command.build_py:build_py -install = setuptools.command.install:install -rotate = setuptools.command.rotate:rotate -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -sdist = setuptools.command.sdist:sdist -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -egg_info = setuptools.command.egg_info:egg_info -setopt = setuptools.command.setopt:setopt -register = setuptools.command.register:register -develop = setuptools.command.develop:develop -saveopts = setuptools.command.saveopts:saveopts -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -bdist_egg = setuptools.command.bdist_egg:bdist_egg -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -easy_install = setuptools.command.easy_install:easy_install -alias = setuptools.command.alias:alias - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -eager_resources = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp +dependency_links = setuptools.dist:assert_string_list use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data convert_2to3_doctests = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool extras_require = setuptools.dist:check_extras +eager_resources = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +install_requires = setuptools.dist:check_requirements use_2to3_fixers = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite entry_points = setuptools.dist:check_entry_points -dependency_links = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages zip_safe = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp +use_2to3 = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data +tests_require = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main +[egg_info.writers] +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap +[distutils.commands] +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_ext = setuptools.command.build_ext:build_ext +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_py = setuptools.command.build_py:build_py +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +setopt = setuptools.command.setopt:setopt +egg_info = setuptools.command.egg_info:egg_info +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +easy_install = setuptools.command.easy_install:easy_install +alias = setuptools.command.alias:alias +rotate = setuptools.command.rotate:rotate +install = setuptools.command.install:install +bdist_egg = setuptools.command.bdist_egg:bdist_egg +develop = setuptools.command.develop:develop +register = setuptools.command.register:register +install_scripts = setuptools.command.install_scripts:install_scripts +upload_docs = setuptools.command.upload_docs:upload_docs + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 7fe852184e..66f2468830 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[certs] -certifi==0.0.9 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 +[certs] +certifi==0.0.10 + [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +ctypes==1.0.2 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file From 21ba9de1f81928b82344d3f61031cb14f1451cdc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 16:16:58 -0400 Subject: [PATCH 1348/8469] Bumped to 0.9.1 in preparation for next release. --- docs/conf.py | 4 ++-- ez_setup.py | 2 +- setup.py | 6 +++--- setuptools/__init__.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d99639d6f3..3c71f326d0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.10' +version = '0.9.1' # The full version, including alpha/beta/rc tags. -release = '0.10' +release = '0.9.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ez_setup.py b/ez_setup.py index 14eef9245e..0b11f1a7a1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.10" +DEFAULT_VERSION = "0.9.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setup.py b/setup.py index 49dcd79fe4..a82475cd07 100755 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.10" +VERSION = "0.9.1" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py @@ -181,10 +181,10 @@ def run(self): "ssl:sys_platform=='win32'": "wincertstore==0.1", "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", "ssl:python_version in '2.4, 2.5'":"ssl==1.16", - "certs": "certifi==0.0.10", + "certs": "certifi==0.0.9.1", }, dependency_links = [ - 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.10.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.1.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9158fd75ff..7da5a3bdfc 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.10' +__version__ = '0.9.1' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From d6507eda8166ce8929019bfb65518ad747d01007 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 20:25:56 -0400 Subject: [PATCH 1349/8469] Correct reference to certifi version (updated incorrectly by release.py script) --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a82475cd07..14c3995954 100755 --- a/setup.py +++ b/setup.py @@ -181,10 +181,10 @@ def run(self): "ssl:sys_platform=='win32'": "wincertstore==0.1", "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", "ssl:python_version in '2.4, 2.5'":"ssl==1.16", - "certs": "certifi==0.0.9.1", + "certs": "certifi==0.0.8", }, dependency_links = [ - 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.9.1.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', From 2de1c553de6472ce3e830b32fcbf39043321ba2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 20:33:57 -0400 Subject: [PATCH 1350/8469] Updated egg_info with corrected metadata --- setuptools.egg-info/dependency_links.txt | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++------------ setuptools.egg-info/requires.txt | 14 ++-- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index aea106c504..c688b7eaab 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,4 +1,4 @@ -https://pypi.python.org/packages/source/c/certifi/certifi-0.0.10.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 45cc56a1bf..6a9cb799d3 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[distutils.commands] +install_scripts = setuptools.command.install_scripts:install_scripts +install_lib = setuptools.command.install_lib:install_lib +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +register = setuptools.command.register:register +easy_install = setuptools.command.easy_install:easy_install +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +install = setuptools.command.install:install +build_ext = setuptools.command.build_ext:build_ext +develop = setuptools.command.develop:develop +egg_info = setuptools.command.egg_info:egg_info +upload_docs = setuptools.command.upload_docs:upload_docs +saveopts = setuptools.command.saveopts:saveopts +setopt = setuptools.command.setopt:setopt +sdist = setuptools.command.sdist:sdist +rotate = setuptools.command.rotate:rotate +alias = setuptools.command.alias:alias +build_py = setuptools.command.build_py:build_py + [console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +easy_install-3.3 = setuptools.command.easy_install:main [distutils.setup_keywords] -namespace_packages = setuptools.dist:check_nsp -dependency_links = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable extras_require = setuptools.dist:check_extras -eager_resources = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages install_requires = setuptools.dist:check_requirements use_2to3_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data entry_points = setuptools.dist:check_entry_points zip_safe = setuptools.dist:assert_bool -use_2to3 = setuptools.dist:assert_bool -package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -include_package_data = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data +include_package_data = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp +tests_require = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +use_2to3 = setuptools.dist:assert_bool -[egg_info.writers] -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap -[distutils.commands] -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_py = setuptools.command.build_py:build_py -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -setopt = setuptools.command.setopt:setopt -egg_info = setuptools.command.egg_info:egg_info -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -easy_install = setuptools.command.easy_install:easy_install -alias = setuptools.command.alias:alias -rotate = setuptools.command.rotate:rotate -install = setuptools.command.install:install -bdist_egg = setuptools.command.bdist_egg:bdist_egg -develop = setuptools.command.develop:develop -register = setuptools.command.register:register -install_scripts = setuptools.command.install_scripts:install_scripts -upload_docs = setuptools.command.upload_docs:upload_docs +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.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 +entry_points.txt = setuptools.command.egg_info:write_entries diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 66f2468830..dac9e411a4 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - -[certs] -certifi==0.0.10 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + +[certs] +certifi==0.0.8 \ No newline at end of file From 0cb9cd7aaa256fc5e14900958250a8911afa08ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 20:44:13 -0400 Subject: [PATCH 1351/8469] setup.py now loads the version from setuptools/__init__.py, limiting the places where release.py must keep in sync. --- release.py | 2 +- setup.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/release.py b/release.py index 5dae8cea38..34b250b2e2 100644 --- a/release.py +++ b/release.py @@ -16,7 +16,7 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (linked).txt') files_with_versions = ( - 'docs/conf.py', 'setup.py', 'ez_setup.py', 'setuptools/__init__.py', + 'docs/conf.py', 'ez_setup.py', 'setuptools/__init__.py', ) test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" diff --git a/setup.py b/setup.py index 14c3995954..b6bb7e526f 100755 --- a/setup.py +++ b/setup.py @@ -18,9 +18,8 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.9.1" -from setuptools import setup, find_packages +import setuptools from setuptools.command.build_py import build_py as _build_py from setuptools.command.test import test as _test @@ -94,7 +93,7 @@ def run(self): setup_params = dict( name="setuptools", - version=VERSION, + version=setuptools.__version__, description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="The fellowship of the packaging", @@ -105,7 +104,7 @@ def run(self): url = "https://pypi.python.org/pypi/setuptools", test_suite = 'setuptools.tests', src_root = src_root, - packages = find_packages(), + packages = setuptools.find_packages(), package_data = package_data, py_modules = ['pkg_resources', 'easy_install'], @@ -196,4 +195,4 @@ def run(self): ) if __name__ == '__main__': - dist = setup(**setup_params) + dist = setuptools.setup(**setup_params) From 5896424c4061b74ed9625077131df0f8e4cd2a10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 20:48:26 -0400 Subject: [PATCH 1352/8469] Have the documentation also grab the version from setuptools/__init__.py --- docs/conf.py | 5 +++-- release.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3c71f326d0..fbdb8b51e6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ # serve to show the default. import sys, os +import setuptools # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -48,9 +49,9 @@ # built documents. # # The short X.Y version. -version = '0.9.1' +version = setuptools.__version__ # The full version, including alpha/beta/rc tags. -release = '0.9.1' +release = setuptools.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 34b250b2e2..0e1a539707 100644 --- a/release.py +++ b/release.py @@ -16,7 +16,7 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (linked).txt') files_with_versions = ( - 'docs/conf.py', 'ez_setup.py', 'setuptools/__init__.py', + 'ez_setup.py', 'setuptools/__init__.py', ) test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" From c652e7e73d2ff6865085a8ca6af54f441104a908 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 21:51:15 -0400 Subject: [PATCH 1353/8469] Re-wrote link inference to now respect specific patterns and generate links to known issue trackers. --- CHANGES.txt | 281 ++++++++++++++++++++++++++-------------------------- release.py | 75 +++++--------- 2 files changed, 165 insertions(+), 191 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 23a198ce45..94403c8fc6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -106,7 +106,7 @@ Added several features that were slated for setuptools 0.6c12: * Move warning check in ``get_cache_path`` to follow the directory creation to avoid errors when the cache path does not yet exist. Fixes the error - reported in #375. + reported in Distribute #375. ------ 0.6.48 @@ -126,7 +126,7 @@ Added several features that were slated for setuptools 0.6c12: 0.6.46 ------ -* Issue #375: Issue a warning if the PYTHON_EGG_CACHE or otherwise +* Distribute #375: Issue a warning if the PYTHON_EGG_CACHE or otherwise customized egg cache location specifies a directory that's group- or world-writable. @@ -134,7 +134,7 @@ Added several features that were slated for setuptools 0.6c12: 0.6.45 ------ -* Issue #379: ``distribute_setup.py`` now traps VersionConflict as well, +* Distribute #379: ``distribute_setup.py`` now traps VersionConflict as well, restoring ability to upgrade from an older setuptools version. ------ @@ -148,21 +148,21 @@ Added several features that were slated for setuptools 0.6c12: 0.6.43 ------ -* Issue #378: Restore support for Python 2.4 Syntax (regression in 0.6.42). +* Distribute #378: Restore support for Python 2.4 Syntax (regression in 0.6.42). ------ 0.6.42 ------ * External links finder no longer yields duplicate links. -* Issue #337: Moved site.py to setuptools/site-patch.py (graft of very old +* Distribute #337: Moved site.py to setuptools/site-patch.py (graft of very old patch from setuptools trunk which inspired PR #31). ------ 0.6.41 ------ -* Issue #27: Use public api for loading resources from zip files rather than +* Distribute #27: Use public api for loading resources from zip files rather than the private method `_zip_directory_cache`. * Added a new function ``easy_install.get_win_launcher`` which may be used by third-party libraries such as buildout to get a suitable script launcher. @@ -171,7 +171,7 @@ Added several features that were slated for setuptools 0.6c12: 0.6.40 ------ -* Issue #376: brought back cli.exe and gui.exe that were deleted in the +* Distribute #376: brought back cli.exe and gui.exe that were deleted in the previous release. ------ @@ -182,7 +182,7 @@ Added several features that were slated for setuptools 0.6c12: * Fix possible issue in GUI launchers where the subsystem was not supplied to the linker. * Launcher build script now refactored for robustness. -* Issue #375: Resources extracted from a zip egg to the file system now also +* Distribute #375: Resources extracted from a zip egg to the file system now also check the contents of the file against the zip contents during each invocation of get_resource_filename. @@ -190,13 +190,13 @@ Added several features that were slated for setuptools 0.6c12: 0.6.38 ------ -* Issue #371: The launcher manifest file is now installed properly. +* Distribute #371: The launcher manifest file is now installed properly. ------ 0.6.37 ------ -* Issue #143: Launcher scripts, including easy_install itself, are now +* Distribute #143: Launcher scripts, including easy_install itself, are now accompanied by a manifest on 32-bit Windows environments to avoid the Installer Detection Technology and thus undesirable UAC elevation described in `this Microsoft article @@ -206,8 +206,7 @@ Added several features that were slated for setuptools 0.6c12: 0.6.36 ------ -* Pull Request #35: In `Buildout issue 64 - `_, it was reported that +* Pull Request #35: In Buildout #64, it was reported that under Python 3, installation of distutils scripts could attempt to copy the ``__pycache__`` directory as a file, causing an error, apparently only under Windows. Easy_install now skips all directories when processing @@ -221,7 +220,7 @@ Added several features that were slated for setuptools 0.6c12: Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in how it parses version numbers. -* Issue #278: Restored compatibility with distribute 0.6.22 and setuptools +* Distribute #278: Restored compatibility with distribute 0.6.22 and setuptools 0.6. Updated the documentation to match more closely with the version parsing as intended in setuptools 0.6. @@ -229,7 +228,7 @@ how it parses version numbers. 0.6.34 ------ -* Issue #341: 0.6.33 fails to build under Python 2.4. +* Distribute #341: 0.6.33 fails to build under Python 2.4. ------ 0.6.33 @@ -238,11 +237,11 @@ how it parses version numbers. * Fix 2 errors with Jython 2.5. * Fix 1 failure with Jython 2.5 and 2.7. * Disable workaround for Jython scripts on Linux systems. -* Issue #336: `setup.py` no longer masks failure exit code when tests fail. +* Distribute #336: `setup.py` no longer masks failure exit code when tests fail. * Fix issue in pkg_resources where try/except around a platform-dependent import would trigger hook load failures on Mercurial. See pull request 32 for details. -* Issue #341: Fix a ResourceWarning. +* Distribute #341: Fix a ResourceWarning. ------ 0.6.32 @@ -250,19 +249,18 @@ how it parses version numbers. * Fix test suite with Python 2.6. * Fix some DeprecationWarnings and ResourceWarnings. -* Issue #335: Backed out `setup_requires` superceding installed requirements +* Distribute #335: Backed out `setup_requires` superceding installed requirements until regression can be addressed. ------ 0.6.31 ------ -* Issue #303: Make sure the manifest only ever contains UTF-8 in Python 3. -* Issue #329: Properly close files created by tests for compatibility with +* Distribute #303: Make sure the manifest only ever contains UTF-8 in Python 3. +* Distribute #329: Properly close files created by tests for compatibility with Jython. -* Work around Jython bugs `#1980 `_ and - `#1981 `_. -* Issue #334: Provide workaround for packages that reference `sys.__stdout__` +* Work around Jython #1980 and Jython #1981. +* Distribute #334: Provide workaround for packages that reference `sys.__stdout__` such as numpy does. This change should address `virtualenv #359 `_ as long as the system encoding is UTF-8 or the IO encoding is specified in the @@ -271,7 +269,7 @@ how it parses version numbers. PYTHONIOENCODING=utf8 pip install numpy * Fix for encoding issue when installing from Windows executable on Python 3. -* Issue #323: Allow `setup_requires` requirements to supercede installed +* Distribute #323: Allow `setup_requires` requirements to supercede installed requirements. Added some new keyword arguments to existing pkg_resources methods. Also had to updated how __path__ is handled for namespace packages to ensure that when a new egg distribution containing a namespace package is @@ -283,7 +281,7 @@ how it parses version numbers. 0.6.30 ------ -* Issue #328: Clean up temporary directories in distribute_setup.py. +* Distribute #328: Clean up temporary directories in distribute_setup.py. * Fix fatal bug in distribute_setup.py. ------ @@ -291,28 +289,28 @@ how it parses version numbers. ------ * Pull Request #14: Honor file permissions in zip files. -* Issue #327: Merged pull request #24 to fix a dependency problem with pip. +* Distribute #327: Merged pull request #24 to fix a dependency problem with pip. * Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301. * If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` to produce uploadable documentation. -* Issue #326: `upload_docs` provided mangled auth credentials under Python 3. -* Issue #320: Fix check for "createable" in distribute_setup.py. -* Issue #305: Remove a warning that was triggered during normal operations. -* Issue #311: Print metadata in UTF-8 independent of platform. -* Issue #303: Read manifest file with UTF-8 encoding under Python 3. -* Issue #301: Allow to run tests of namespace packages when using 2to3. -* Issue #304: Prevent import loop in site.py under Python 3.3. -* Issue #283: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3. -* Issue #299: The develop command didn't work on Python 3, when using 2to3, +* Distribute #326: `upload_docs` provided mangled auth credentials under Python 3. +* Distribute #320: Fix check for "createable" in distribute_setup.py. +* Distribute #305: Remove a warning that was triggered during normal operations. +* Distribute #311: Print metadata in UTF-8 independent of platform. +* Distribute #303: Read manifest file with UTF-8 encoding under Python 3. +* Distribute #301: Allow to run tests of namespace packages when using 2to3. +* Distribute #304: Prevent import loop in site.py under Python 3.3. +* Distribute #283: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3. +* Distribute #299: The develop command didn't work on Python 3, when using 2to3, as the egg link would go to the Python 2 source. Linking to the 2to3'd code in build/lib makes it work, although you will have to rebuild the module before testing it. -* Issue #306: Even if 2to3 is used, we build in-place under Python 2. -* Issue #307: Prints the full path when .svn/entries is broken. -* Issue #313: Support for sdist subcommands (Python 2.7) -* Issue #314: test_local_index() would fail an OS X. -* Issue #310: Non-ascii characters in a namespace __init__.py causes errors. -* Issue #218: Improved documentation on behavior of `package_data` and +* Distribute #306: Even if 2to3 is used, we build in-place under Python 2. +* Distribute #307: Prints the full path when .svn/entries is broken. +* Distribute #313: Support for sdist subcommands (Python 2.7) +* Distribute #314: test_local_index() would fail an OS X. +* Distribute #310: Non-ascii characters in a namespace __init__.py causes errors. +* Distribute #218: Improved documentation on behavior of `package_data` and `include_package_data`. Files indicated by `package_data` are now included in the manifest. * `distribute_setup.py` now allows a `--download-base` argument for retrieving @@ -322,10 +320,10 @@ how it parses version numbers. 0.6.28 ------ -* Issue #294: setup.py can now be invoked from any directory. +* Distribute #294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. * Added support for .dist-info directories. -* Issue #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on +* Distribute #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on Python 3.3. ------ @@ -336,15 +334,15 @@ how it parses version numbers. * Distribute now recognizes README.rst as a standard, default readme file. * Exclude 'encodings' modules when removing modules from sys.modules. Workaround for #285. -* Issue #231: Don't fiddle with system python when used with buildout +* Distribute #231: Don't fiddle with system python when used with buildout (bootstrap.py) ------ 0.6.26 ------ -* Issue #183: Symlinked files are now extracted from source distributions. -* Issue #227: Easy_install fetch parameters are now passed during the +* Distribute #183: Symlinked files are now extracted from source distributions. +* Distribute #227: Easy_install fetch parameters are now passed during the installation of a source distribution; now fulfillment of setup_requires dependencies will honor the parameters passed to easy_install. @@ -352,65 +350,65 @@ how it parses version numbers. 0.6.25 ------ -* Issue #258: Workaround a cache issue -* Issue #260: distribute_setup.py now accepts the --user parameter for +* Distribute #258: Workaround a cache issue +* Distribute #260: distribute_setup.py now accepts the --user parameter for Python 2.6 and later. -* Issue #262: package_index.open_with_auth no longer throws LookupError +* Distribute #262: package_index.open_with_auth no longer throws LookupError on Python 3. -* Issue #269: AttributeError when an exception occurs reading Manifest.in +* Distribute #269: AttributeError when an exception occurs reading Manifest.in on late releases of Python. -* Issue #272: Prevent TypeError when namespace package names are unicode +* Distribute #272: Prevent TypeError when namespace package names are unicode and single-install-externally-managed is used. Also fixes PIP issue 449. -* Issue #273: Legacy script launchers now install with Python2/3 support. +* Distribute #273: Legacy script launchers now install with Python2/3 support. ------ 0.6.24 ------ -* Issue #249: Added options to exclude 2to3 fixers +* Distribute #249: Added options to exclude 2to3 fixers ------ 0.6.23 ------ -* Issue #244: Fixed a test -* Issue #243: Fixed a test -* Issue #239: Fixed a test -* Issue #240: Fixed a test -* Issue #241: Fixed a test -* Issue #237: Fixed a test -* Issue #238: easy_install now uses 64bit executable wrappers on 64bit Python -* Issue #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation -* Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process -* Issue #227: easy_install now passes its arguments to setup.py bdist_egg -* Issue #225: Fixed a NameError on Python 2.5, 2.4 +* Distribute #244: Fixed a test +* Distribute #243: Fixed a test +* Distribute #239: Fixed a test +* Distribute #240: Fixed a test +* Distribute #241: Fixed a test +* Distribute #237: Fixed a test +* Distribute #238: easy_install now uses 64bit executable wrappers on 64bit Python +* Distribute #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation +* Distribute #207: Windows cli and gui wrappers pass CTRL-C to child python process +* Distribute #227: easy_install now passes its arguments to setup.py bdist_egg +* Distribute #225: Fixed a NameError on Python 2.5, 2.4 ------ 0.6.21 ------ -* Issue #225: FIxed a regression on py2.4 +* Distribute #225: FIxed a regression on py2.4 ------ 0.6.20 ------ -* Issue #135: Include url in warning when processing URLs in package_index. -* Issue #212: Fix issue where easy_instal fails on Python 3 on windows installer. -* Issue #213: Fix typo in documentation. +* Distribute #135: Include url in warning when processing URLs in package_index. +* Distribute #212: Fix issue where easy_instal fails on Python 3 on windows installer. +* Distribute #213: Fix typo in documentation. ------ 0.6.19 ------ -* Issue 206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' +* Distribute #206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' ------ 0.6.18 ------ -* Issue 210: Fixed a regression introduced by Issue 204 fix. +* Distribute #210: Fixed a regression introduced by Distribute #204 fix. ------ 0.6.17 @@ -419,21 +417,21 @@ how it parses version numbers. * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment variable to allow to disable installation of easy_install-${version} script. * Support Python >=3.1.4 and >=3.2.1. -* Issue 204: Don't try to import the parent of a namespace package in +* Distribute #204: Don't try to import the parent of a namespace package in declare_namespace -* Issue 196: Tolerate responses with multiple Content-Length headers -* Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires +* Distribute #196: Tolerate responses with multiple Content-Length headers +* Distribute #205: Sandboxing doesn't preserve working_set. Leads to setup_requires problems. ------ 0.6.16 ------ -* Builds sdist gztar even on Windows (avoiding Issue 193). -* Issue 192: Fixed metadata omitted on Windows when package_dir +* Builds sdist gztar even on Windows (avoiding Distribute #193). +* Distribute #192: Fixed metadata omitted on Windows when package_dir specified with forward-slash. -* Issue 195: Cython build support. -* Issue 200: Issues with recognizing 64-bit packages on Windows. +* Distribute #195: Cython build support. +* Distribute #200: Issues with recognizing 64-bit packages on Windows. ------ 0.6.15 @@ -441,49 +439,49 @@ how it parses version numbers. * Fixed typo in bdist_egg * Several issues under Python 3 has been solved. -* Issue 146: Fixed missing DLL files after easy_install of windows exe package. +* Distribute #146: Fixed missing DLL files after easy_install of windows exe package. ------ 0.6.14 ------ -* Issue 170: Fixed unittest failure. Thanks to Toshio. -* Issue 171: Fixed race condition in unittests cause deadlocks in test suite. -* Issue 143: Fixed a lookup issue with easy_install. +* Distribute #170: Fixed unittest failure. Thanks to Toshio. +* Distribute #171: Fixed race condition in unittests cause deadlocks in test suite. +* Distribute #143: Fixed a lookup issue with easy_install. Thanks to David and Zooko. -* Issue 174: Fixed the edit mode when its used with setuptools itself +* Distribute #174: Fixed the edit mode when its used with setuptools itself ------ 0.6.13 ------ -* Issue 160: 2.7 gives ValueError("Invalid IPv6 URL") -* Issue 150: Fixed using ~/.local even in a --no-site-packages virtualenv -* Issue 163: scan index links before external links, and don't use the md5 when +* Distribute #160: 2.7 gives ValueError("Invalid IPv6 URL") +* Distribute #150: Fixed using ~/.local even in a --no-site-packages virtualenv +* Distribute #163: scan index links before external links, and don't use the md5 when comparing two distributions ------ 0.6.12 ------ -* Issue 149: Fixed various failures on 2.3/2.4 +* Distribute #149: Fixed various failures on 2.3/2.4 ------ 0.6.11 ------ * Found another case of SandboxViolation - fixed -* Issue 15 and 48: Introduced a socket timeout of 15 seconds on url openings +* Distribute #15 and Distribute #48: Introduced a socket timeout of 15 seconds on url openings * Added indexsidebar.html into MANIFEST.in -* Issue 108: Fixed TypeError with Python3.1 -* Issue 121: Fixed --help install command trying to actually install. -* Issue 112: Added an os.makedirs so that Tarek's solution will work. -* Issue 133: Added --no-find-links to easy_install +* Distribute #108: Fixed TypeError with Python3.1 +* Distribute #121: Fixed --help install command trying to actually install. +* Distribute #112: Added an os.makedirs so that Tarek's solution will work. +* Distribute #133: Added --no-find-links to easy_install * Added easy_install --user -* Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account -* Issue 134: removed spurious UserWarnings. Patch by VanLindberg -* Issue 138: cant_write_to_target error when setup_requires is used. -* Issue 147: respect the sys.dont_write_bytecode flag +* Distribute #100: Fixed develop --user not taking '.' in PYTHONPATH into account +* Distribute #134: removed spurious UserWarnings. Patch by VanLindberg +* Distribute #138: cant_write_to_target error when setup_requires is used. +* Distribute #147: respect the sys.dont_write_bytecode flag ------ 0.6.10 @@ -497,27 +495,27 @@ how it parses version numbers. 0.6.9 ----- -* Issue 90: unknown setuptools version can be added in the working set -* Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore +* Distribute #90: unknown setuptools version can be added in the working set +* Distribute #87: setupt.py doesn't try to convert distribute_setup.py anymore Initial Patch by arfrever. -* Issue 89: added a side bar with a download link to the doc. -* Issue 86: fixed missing sentence in pkg_resources doc. +* Distribute #89: added a side bar with a download link to the doc. +* Distribute #86: fixed missing sentence in pkg_resources doc. * Added a nicer error message when a DistributionNotFound is raised. -* Issue 80: test_develop now works with Python 3.1 -* Issue 93: upload_docs now works if there is an empty sub-directory. -* Issue 70: exec bit on non-exec files -* Issue 99: now the standalone easy_install command doesn't uses a +* Distribute #80: test_develop now works with Python 3.1 +* Distribute #93: upload_docs now works if there is an empty sub-directory. +* Distribute #70: exec bit on non-exec files +* Distribute #99: now the standalone easy_install command doesn't uses a "setup.cfg" if any exists in the working directory. It will use it only if triggered by ``install_requires`` from a setup.py call (install, develop, etc). -* Issue 101: Allowing ``os.devnull`` in Sandbox -* Issue 92: Fixed the "no eggs" found error with MacPort +* Distribute #101: Allowing ``os.devnull`` in Sandbox +* Distribute #92: Fixed the "no eggs" found error with MacPort (platform.mac_ver() fails) -* Issue 103: test_get_script_header_jython_workaround not run +* Distribute #103: test_get_script_header_jython_workaround not run anymore under py3 with C or POSIX local. Contributed by Arfrever. -* Issue 104: remvoved the assertion when the installation fails, +* Distribute #104: remvoved the assertion when the installation fails, with a nicer message for the end user. -* Issue 100: making sure there's no SandboxViolation when +* Distribute #100: making sure there's no SandboxViolation when the setup script patches setuptools. ----- @@ -531,8 +529,8 @@ how it parses version numbers. 0.6.7 ----- -* Issue 58: Added --user support to the develop command -* Issue 11: Generated scripts now wrap their call to the script entry point +* Distribute #58: Added --user support to the develop command +* Distribute #11: Generated scripts now wrap their call to the script entry point in the standard "if name == 'main'" * Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv can drive an installation that doesn't patch a global setuptools. @@ -540,17 +538,17 @@ how it parses version numbers. http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719 and determined that it no longer applies. Distribute should work fine with Unladen Swallow 2009Q3. -* Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a +* Distribute #21: Allow PackageIndex.open_url to gracefully handle all cases of a httplib.HTTPException instead of just InvalidURL and BadStatusLine. * Removed virtual-python.py from this distribution and updated documentation to point to the actively maintained virtualenv instead. -* Issue 64: use_setuptools no longer rebuilds the distribute egg every +* Distribute #64: use_setuptools no longer rebuilds the distribute egg every time it is run * use_setuptools now properly respects the requested version * use_setuptools will no longer try to import a distribute egg for the wrong Python version -* Issue 74: no_fake should be True by default. -* Issue 72: avoid a bootstrapping issue with easy_install -U +* Distribute #74: no_fake should be True by default. +* Distribute #72: avoid a bootstrapping issue with easy_install -U ----- 0.6.6 @@ -563,10 +561,10 @@ how it parses version numbers. 0.6.5 ----- -* Issue 65: cli.exe and gui.exe are now generated at build time, +* Distribute #65: cli.exe and gui.exe are now generated at build time, depending on the platform in use. -* Issue 67: Fixed doc typo (PEP 381/382) +* Distribute #67: Fixed doc typo (PEP 381/382) * Distribute no longer shadows setuptools if we require a 0.7-series setuptools. And an error is raised when installing a 0.7 setuptools with @@ -583,10 +581,10 @@ how it parses version numbers. ----- * Added the generation of `distribute_setup_3k.py` during the release. - This closes issue #52. + This closes Distribute #52. * Added an upload_docs command to easily upload project documentation to - PyPI's https://pythonhosted.org. This close issue #56. + PyPI's https://pythonhosted.org. This close issue Distribute #56. * Fixed a bootstrap bug on the use_setuptools() API. @@ -612,29 +610,29 @@ setuptools ========== * Added Python 3 support; see docs/python3.txt. - This closes http://bugs.python.org/setuptools/issue39. + This closes Old Setuptools #39. * Added option to run 2to3 automatically when installing on Python 3. - This closes issue #31. + This closes issue Distribute #31. * Fixed invalid usage of requirement.parse, that broke develop -d. - This closes http://bugs.python.org/setuptools/issue44. + This closes Old Setuptools #44. * Fixed script launcher for 64-bit Windows. - This closes http://bugs.python.org/setuptools/issue2. + This closes Old Setuptools #2. * KeyError when compiling extensions. - This closes http://bugs.python.org/setuptools/issue41. + This closes Old Setuptools #41. bootstrapping ============= -* Fixed bootstrap not working on Windows. This closes issue #49. +* Fixed bootstrap not working on Windows. This closes issue Distribute #49. -* Fixed 2.6 dependencies. This closes issue #50. +* Fixed 2.6 dependencies. This closes issue Distribute #50. * Make sure setuptools is patched when running through easy_install - This closes http://bugs.python.org/setuptools/issue40. + This closes Old Setuptools #40. ----- 0.6.1 @@ -644,14 +642,13 @@ setuptools ========== * package_index.urlopen now catches BadStatusLine and malformed url errors. - This closes issue #16 and issue #18. + This closes Distribute #16 and Distribute #18. -* zip_ok is now False by default. This closes - http://bugs.python.org/setuptools/issue33. +* zip_ok is now False by default. This closes Old Setuptools #33. -* Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. +* Fixed invalid URL error catching. Old Setuptools #20. -* Fixed invalid bootstraping with easy_install installation (issue #40). +* Fixed invalid bootstraping with easy_install installation (Distribute #40). Thanks to Florian Schulze for the help. * Removed buildout/bootstrap.py. A new repository will create a specific @@ -663,7 +660,7 @@ bootstrapping * The boostrap process leave setuptools alone if detected in the system and --root or --prefix is provided, but is not in the same location. - This closes issue #10. + This closes Distribute #10. --- 0.6 @@ -673,18 +670,18 @@ setuptools ========== * Packages required at build time where not fully present at install time. - This closes issue #12. + This closes Distribute #12. -* Protected against failures in tarfile extraction. This closes issue #10. +* Protected against failures in tarfile extraction. This closes Distribute #10. -* Made Jython api_tests.txt doctest compatible. This closes issue #7. +* Made Jython api_tests.txt doctest compatible. This closes Distribute #7. * sandbox.py replaced builtin type file with builtin function open. This - closes issue #6. + closes Distribute #6. -* Immediately close all file handles. This closes issue #3. +* Immediately close all file handles. This closes Distribute #3. -* Added compatibility with Subversion 1.6. This references issue #1. +* Added compatibility with Subversion 1.6. This references Distribute #1. pkg_resources ============= @@ -693,18 +690,18 @@ pkg_resources instead. Based on a patch from ronaldoussoren. This closes issue #5. * Fixed a SandboxViolation for mkdir that could occur in certain cases. - This closes issue #13. + This closes Distribute #13. * Allow to find_on_path on systems with tight permissions to fail gracefully. - This closes issue #9. + This closes Distribute #9. * Corrected inconsistency between documentation and code of add_entry. - This closes issue #8. + This closes Distribute #8. -* Immediately close all file handles. This closes issue #3. +* Immediately close all file handles. This closes Distribute #3. easy_install ============ -* Immediately close all file handles. This closes issue #3. +* Immediately close all file handles. This closes Distribute #3. diff --git a/release.py b/release.py index 0e1a539707..5e99e74cfd 100644 --- a/release.py +++ b/release.py @@ -13,7 +13,7 @@ zip_longest = itertools.izip_longest def before_upload(): - _linkify('CHANGES.txt', 'CHANGES (linked).txt') + _linkify('CHANGES.txt', 'CHANGES (links).txt') files_with_versions = ( 'ez_setup.py', 'setuptools/__init__.py', @@ -23,56 +23,33 @@ def before_upload(): os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" +link_patterns = [ + r"(Issue )?#(?P\d+)", + r"Distribute #(?P\d+)", + r"Buildout #(?P\d+)", + r"Old Setuptools #(?P\d+)", + r"Jython #(?P\d+)", +] + +issue_urls = dict( + issue='https://bitbucket.org/pypa/setuptools/issue/{issue}', + distribute='https://bitbucket.org/tarek/distribute/issue/{distribute}', + buildout='https://github.com/buildout/buildout/issues/{buildout}', + old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', + jython='http://bugs.jython.org/issue{jython}', +) + def _linkify(source, dest): + pattern = '|'.join(link_patterns) with open(source) as source: - out = _linkified_text(source.read()) + out = re.sub(pattern, replacer, source.read()) with open(dest, 'w') as dest: dest.write(out) -def _linkified(rst_path): - "return contents of reStructureText file with linked issue references" - rst_file = open(rst_path) - rst_content = rst_file.read() - rst_file.close() - - return _linkified_text(rst_content) - -def _linkified_text(rst_content): - # first identify any existing HREFs so they're not changed - HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) - - # split on the HREF pattern, returning the parts to be linkified - plain_text_parts = HREF_pattern.split(rst_content) - anchors = [] - linkified_parts = [_linkified_part(part, anchors) - for part in plain_text_parts] - pairs = zip_longest( - linkified_parts, - HREF_pattern.findall(rst_content), - fillvalue='', - ) - rst_content = ''.join(flatten(pairs)) - - anchors = sorted(anchors) - - bitroot = 'https://bitbucket.org/tarek/distribute' - rst_content += "\n" - for x in anchors: - issue = re.findall(r'\d+', x)[0] - rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) - rst_content += "\n" - return rst_content - -def flatten(listOfLists): - "Flatten one level of nesting" - return itertools.chain.from_iterable(listOfLists) - - -def _linkified_part(text, anchors): - """ - Linkify a part and collect any anchors generated - """ - revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) - - anchors.extend(revision.findall(text)) # ['Issue #43', ...] - return revision.sub(r'`\1`_', text) +def replacer(match): + text = match.group(0) + match_dict = match.groupdict() + for key in match_dict: + if match_dict[key]: + url = issue_urls[key].format(**match_dict) + return "`{text} <{url}>`_".format(text=text, url=url) From 76e2e18d7f610731aac39200257da2e412fa004d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 22:00:41 -0400 Subject: [PATCH 1354/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 94403c8fc6..ba965b6911 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ----- * Distribute #386: Allow other positional and keyword arguments to os.open. +* Corrected dependency on certifi mis-referenced in 0.9. --- 0.9 From 6b915734dcc4cdeaaaa6e03ac9aca1c9279e528f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 22:02:40 -0400 Subject: [PATCH 1355/8469] Added tag 0.9.1 for changeset 9e5a8f734662 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ad33c10ba0..e289751a40 100644 --- a/.hgtags +++ b/.hgtags @@ -81,3 +81,4 @@ f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 979d598822bc64b05fb177a2ba221e75ee5b44d3 0.8b7 e3d70539e79f39a97f69674ab038661961a1eb43 0.8 3078b1e566399bf0c5590f3528df03d0c23a0777 0.9 +9e5a8f734662dd36e6fd6e4ba9031d0e2d294632 0.9.1 From bbd4994b81eefd1a652f3fa9dca7d6e93107b392 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jul 2013 22:03:28 -0400 Subject: [PATCH 1356/8469] Bumped to 0.9.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 102 +++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/__init__.py | 2 +- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0b11f1a7a1..f90a2b9a8c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.1" +DEFAULT_VERSION = "0.9.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 6a9cb799d3..b804cc292d 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -install_scripts = setuptools.command.install_scripts:install_scripts -install_lib = setuptools.command.install_lib:install_lib -install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -register = setuptools.command.register:register -easy_install = setuptools.command.easy_install:easy_install -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -install = setuptools.command.install:install -build_ext = setuptools.command.build_ext:build_ext -develop = setuptools.command.develop:develop -egg_info = setuptools.command.egg_info:egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -saveopts = setuptools.command.saveopts:saveopts -setopt = setuptools.command.setopt:setopt -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -alias = setuptools.command.alias:alias -build_py = setuptools.command.build_py:build_py +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +[egg_info.writers] +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +top_level.txt = setuptools.command.egg_info:write_toplevel_names +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.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 + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list eager_resources = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -entry_points = setuptools.dist:check_entry_points +install_requires = setuptools.dist:check_requirements zip_safe = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite +extras_require = setuptools.dist:check_extras +entry_points = setuptools.dist:check_entry_points +test_loader = setuptools.dist:check_importable +use_2to3_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +dependency_links = setuptools.dist:assert_string_list packages = setuptools.dist:check_packages use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[distutils.commands] +build_ext = setuptools.command.build_ext:build_ext +saveopts = setuptools.command.saveopts:saveopts +rotate = setuptools.command.rotate:rotate +upload_docs = setuptools.command.upload_docs:upload_docs +build_py = setuptools.command.build_py:build_py +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_egg_info = setuptools.command.install_egg_info:install_egg_info +egg_info = setuptools.command.egg_info:egg_info +setopt = setuptools.command.setopt:setopt +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +test = setuptools.command.test:test +register = setuptools.command.register:register +easy_install = setuptools.command.easy_install:easy_install -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.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 -entry_points.txt = setuptools.command.egg_info:write_entries +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index dac9e411a4..e7f0f3b867 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,8 +1,5 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:sys_platform=='win32'] wincertstore==0.1 @@ -10,4 +7,7 @@ wincertstore==0.1 ssl==1.16 [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 7da5a3bdfc..e698bb4eeb 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.1' +__version__ = '0.9.2' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 95bf90f3dae23f3d672450d94adfbcc55f9e252a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 12:06:54 -0400 Subject: [PATCH 1357/8469] Extracted hash-checking functionality into its own classes. Hashes are no longer checked when the proper pattern isn't detected. Fixes #42. --- setuptools/package_index.py | 99 +++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 26 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e29a142cc6..4c4a647d4a 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -25,7 +25,6 @@ ) URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() -_HASH_RE = re.compile(r'(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)') __all__ = [ 'PackageIndex', 'distros_for_url', 'parse_bdist_wininst', @@ -193,6 +192,61 @@ def find_external_links(url, page): sys.version[:3], require('setuptools')[0].version ) +class ContentChecker(object): + """ + A null content checker that defines the interface for checking content + """ + def feed(self, block): + """ + Feed a block of data to the hash. + """ + return + + def check(self): + """ + Check the hash. Return False if validation fails. + """ + return True + + def report(self, reporter, template): + """ + Call reporter with information about the checker (hash name) + substituted into the template. + """ + return + +class HashChecker(ContentChecker): + pattern = re.compile( + r'(?Psha1|sha224|sha384|sha256|sha512|md5)=' + r'(?P[a-f0-9]+)' + ) + + def __init__(self, hash_name, expected): + self.hash = hashlib.new(hash_name) + self.expected = expected + + @classmethod + def from_url(cls, url): + "Construct a (possibly null) ContentChecker from a URL" + fragment = urlparse(url)[-1] + if not fragment: + return ContentChecker() + match = cls.pattern.search(fragment) + if not match: + return ContentChecker() + return cls(**match.groupdict()) + + def feed(self, block): + self.hash.update(block) + + def check(self): + return self.hash.hexdigest() == self.expected + + def report(self, reporter, template): + msg = template % self.hash.name + return reporter(msg) + + class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" @@ -385,20 +439,20 @@ def obtain(self, requirement, installer=None): - def check_hash(self, cs, info, filename, tfp): - match = _HASH_RE.search(info) - if match: - hash_name = match.group(1) - hash_data = match.group(2) - self.debug("Validating %s checksum for %s", hash_name, filename) - if cs.hexdigest() != hash_data: - tfp.close() - os.unlink(filename) - raise DistutilsError( - "%s validation failed for %s; " - "possible download problem?" % ( - hash_name, os.path.basename(filename)) - ) + def check_hash(self, checker, filename, tfp): + """ + checker is a ContentChecker + """ + checker.report(self.debug, + "Validating %%s checksum for %s" % filename) + if not checker.valid(): + tfp.close() + os.unlink(filename) + raise DistutilsError( + "%s validation failed for %s; " + "possible download problem?" % ( + checker.hash.name, os.path.basename(filename)) + ) def add_find_links(self, urls): """Add `urls` to the list that will be prescanned for searches""" @@ -600,14 +654,9 @@ def gen_setup(self, filename, fragment, tmpdir): def _download_to(self, url, filename): self.info("Downloading %s", url) # Download the file - fp, tfp, cs, info = None, None, None, None + fp, tfp, info = None, None, None try: - if '#' in url: - url, info = url.split('#', 1) - hmatch = _HASH_RE.search(info) - hash_name = hmatch.group(1) - hash_data = hmatch.group(2) - cs = hashlib.new(hash_name) + checker = HashChecker.from_url(url) fp = self.open_url(url) if isinstance(fp, HTTPError): raise DistutilsError( @@ -626,14 +675,13 @@ def _download_to(self, url, filename): while True: block = fp.read(bs) if block: - if cs is not None: - cs.update(block) + checker.feed(block) tfp.write(block) blocknum += 1 self.reporthook(url, filename, blocknum, bs, size) else: break - if info: self.check_hash(cs, info, filename, tfp) + self.check_hash(checker, filename, tfp) return headers finally: if fp: fp.close() @@ -642,7 +690,6 @@ def _download_to(self, url, filename): def reporthook(self, url, filename, blocknum, blksize, size): pass # no-op - def open_url(self, url, warning=None): if url.startswith('file:'): return local_open(url) From fdb212207c256eea656a21742aad8fba56a29bab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 12:19:12 -0400 Subject: [PATCH 1358/8469] Added a test to prove the basic usage of content checks --- setuptools/tests/test_packageindex.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 92d1e2e037..4fceee3999 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -141,3 +141,14 @@ def test_parse_bdist_wininst(self): 'reportlab-2.5.win-amd64-py2.7.exe'), ('reportlab-2.5', '2.7', 'win-amd64')) self.assertEqual(setuptools.package_index.parse_bdist_wininst( 'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64')) + +class TestContentCheckers(unittest.TestCase): + + def test_md5(self): + checker = setuptools.package_index.HashChecker.from_url( + 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') + self.assertEqual(checker.hash.name, 'md5') + checker.feed('You should probably not be using MD5'.encode('ascii')) + self.assertEqual(checker.hash.hexdigest(), + 'f12895fdffbd45007040d2e44df98478') + self.assertTrue(checker.check()) From d4cd26a8fa8df163a03a61366fba2eebf1424a35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:01:02 -0400 Subject: [PATCH 1359/8469] Added a couple of additional tests, including one capturing #42. --- setuptools/tests/test_packageindex.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 4fceee3999..d3698c9e60 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -152,3 +152,17 @@ def test_md5(self): self.assertEqual(checker.hash.hexdigest(), 'f12895fdffbd45007040d2e44df98478') self.assertTrue(checker.check()) + + def test_other_fragment(self): + "Content checks should succeed silently if no hash is present" + checker = setuptools.package_index.HashChecker.from_url( + 'http://foo/bar#something%20completely%20different') + checker.feed('anything'.encode('ascii')) + self.assertTrue(checker.check()) + + def test_blank_md5(self): + "Content checks should succeed if a hash is empty" + checker = setuptools.package_index.HashChecker.from_url( + 'http://foo/bar#md5=') + checker.feed('anything'.encode('ascii')) + self.assertTrue(checker.check()) From 8750c6386b57142cbc6a28e78a68b2075baf610e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:09:32 -0400 Subject: [PATCH 1360/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ba965b6911..48eca12b99 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.9.2 +----- + +* Issue #42: Fix regression where blank checksums would trigger an + ``AttributeError``. + ----- 0.9.1 ----- From d898bb88343082816677b868996cbb33d52b4d80 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:12:21 -0400 Subject: [PATCH 1361/8469] Added tag 0.9.2 for changeset 37444bb32e17 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e289751a40..0087dff932 100644 --- a/.hgtags +++ b/.hgtags @@ -82,3 +82,4 @@ f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 e3d70539e79f39a97f69674ab038661961a1eb43 0.8 3078b1e566399bf0c5590f3528df03d0c23a0777 0.9 9e5a8f734662dd36e6fd6e4ba9031d0e2d294632 0.9.1 +37444bb32e172aaacbc0aeafdf5a778ee471723d 0.9.2 From b34eec598da6d2668de58cba166f5ac5d063ba9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:13:25 -0400 Subject: [PATCH 1362/8469] Bumped to 0.9.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 82 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 10 ++-- setuptools/__init__.py | 2 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f90a2b9a8c..943a00ea9c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.2" +DEFAULT_VERSION = "0.9.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index b804cc292d..f85b03e565 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[egg_info.writers] -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.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 - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [distutils.setup_keywords] -eager_resources = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements -zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points +use_2to3 = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data test_loader = setuptools.dist:check_importable use_2to3_fixers = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp +packages = setuptools.dist:check_packages +dependency_links = setuptools.dist:assert_string_list test_suite = setuptools.dist:check_test_suite include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +eager_resources = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data +entry_points = setuptools.dist:check_entry_points use_2to3_exclude_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras +package_data = setuptools.dist:check_package_data +zip_safe = setuptools.dist:assert_bool + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.commands] -build_ext = setuptools.command.build_ext:build_ext -saveopts = setuptools.command.saveopts:saveopts -rotate = setuptools.command.rotate:rotate -upload_docs = setuptools.command.upload_docs:upload_docs -build_py = setuptools.command.build_py:build_py -develop = setuptools.command.develop:develop install_lib = setuptools.command.install_lib:install_lib -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg sdist = setuptools.command.sdist:sdist -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_egg_info = setuptools.command.install_egg_info:install_egg_info -egg_info = setuptools.command.egg_info:egg_info +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +register = setuptools.command.register:register setopt = setuptools.command.setopt:setopt -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_scripts = setuptools.command.install_scripts:install_scripts +saveopts = setuptools.command.saveopts:saveopts install = setuptools.command.install:install +build_ext = setuptools.command.build_ext:build_ext +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_py = setuptools.command.build_py:build_py +rotate = setuptools.command.rotate:rotate test = setuptools.command.test:test -register = setuptools.command.register:register +develop = setuptools.command.develop:develop +install_scripts = setuptools.command.install_scripts:install_scripts easy_install = setuptools.command.easy_install:easy_install +egg_info = setuptools.command.egg_info:egg_info [console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +requires.txt = setuptools.command.egg_info:write_requirements +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +PKG-INFO = setuptools.command.egg_info:write_pkg_info + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e7f0f3b867..221040f812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index e698bb4eeb..55c149c353 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.2' +__version__ = '0.9.3' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 915f05b7445af2c51b63d22e429d9a7397221518 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:31:00 -0400 Subject: [PATCH 1363/8469] Use 'is_valid' instead of simply 'valid' or 'check', which are less clear about the purpose of the method. Fixes AttributeError introduces in 0.9.2. Fixes #42. --- CHANGES.txt | 6 ++++++ setuptools/package_index.py | 6 +++--- setuptools/tests/test_packageindex.py | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 48eca12b99..010e56153f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.9.3 +----- + +* Issue #42: Fix new ``AttributeError`` introduced in last fix. + ----- 0.9.2 ----- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4c4a647d4a..70aabd1bd6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -202,7 +202,7 @@ def feed(self, block): """ return - def check(self): + def is_valid(self): """ Check the hash. Return False if validation fails. """ @@ -239,7 +239,7 @@ def from_url(cls, url): def feed(self, block): self.hash.update(block) - def check(self): + def is_valid(self): return self.hash.hexdigest() == self.expected def report(self, reporter, template): @@ -445,7 +445,7 @@ def check_hash(self, checker, filename, tfp): """ checker.report(self.debug, "Validating %%s checksum for %s" % filename) - if not checker.valid(): + if not checker.is_valid(): tfp.close() os.unlink(filename) raise DistutilsError( diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index d3698c9e60..4f2d382c35 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -151,18 +151,18 @@ def test_md5(self): checker.feed('You should probably not be using MD5'.encode('ascii')) self.assertEqual(checker.hash.hexdigest(), 'f12895fdffbd45007040d2e44df98478') - self.assertTrue(checker.check()) + self.assertTrue(checker.is_valid()) def test_other_fragment(self): "Content checks should succeed silently if no hash is present" checker = setuptools.package_index.HashChecker.from_url( 'http://foo/bar#something%20completely%20different') checker.feed('anything'.encode('ascii')) - self.assertTrue(checker.check()) + self.assertTrue(checker.is_valid()) def test_blank_md5(self): "Content checks should succeed if a hash is empty" checker = setuptools.package_index.HashChecker.from_url( 'http://foo/bar#md5=') checker.feed('anything'.encode('ascii')) - self.assertTrue(checker.check()) + self.assertTrue(checker.is_valid()) From 541c84c09ba12ccba4110aa2eb086e3cf5c9b4ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:33:12 -0400 Subject: [PATCH 1364/8469] Added tag 0.9.3 for changeset 3e9d2e89de3a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0087dff932..259cf484e4 100644 --- a/.hgtags +++ b/.hgtags @@ -83,3 +83,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 3078b1e566399bf0c5590f3528df03d0c23a0777 0.9 9e5a8f734662dd36e6fd6e4ba9031d0e2d294632 0.9.1 37444bb32e172aaacbc0aeafdf5a778ee471723d 0.9.2 +3e9d2e89de3aa499382d6be2ec8b64d2a29f7f13 0.9.3 From 8cbf071653bf990df550d6fa9b7b0b10f23143aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 13:34:57 -0400 Subject: [PATCH 1365/8469] Bumped to 0.9.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 88 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 12 ++-- setuptools/__init__.py | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 943a00ea9c..b9b2fd3f66 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.3" +DEFAULT_VERSION = "0.9.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index f85b03e565..7d399be6ad 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -test_loader = setuptools.dist:check_importable -use_2to3_fixers = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -dependency_links = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -include_package_data = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -eager_resources = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info +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 [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.commands] -install_lib = setuptools.command.install_lib:install_lib -bdist_egg = setuptools.command.bdist_egg:bdist_egg +rotate = setuptools.command.rotate:rotate sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -alias = setuptools.command.alias:alias -register = setuptools.command.register:register -setopt = setuptools.command.setopt:setopt saveopts = setuptools.command.saveopts:saveopts +bdist_egg = setuptools.command.bdist_egg:bdist_egg install = setuptools.command.install:install +setopt = setuptools.command.setopt:setopt +upload_docs = setuptools.command.upload_docs:upload_docs +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_scripts = setuptools.command.install_scripts:install_scripts build_ext = setuptools.command.build_ext:build_ext +egg_info = setuptools.command.egg_info:egg_info bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm install_egg_info = setuptools.command.install_egg_info:install_egg_info build_py = setuptools.command.build_py:build_py -rotate = setuptools.command.rotate:rotate test = setuptools.command.test:test +register = setuptools.command.register:register +install_lib = setuptools.command.install_lib:install_lib develop = setuptools.command.develop:develop -install_scripts = setuptools.command.install_scripts:install_scripts -easy_install = setuptools.command.easy_install:easy_install -egg_info = setuptools.command.egg_info:egg_info + +[distutils.setup_keywords] +use_2to3_fixers = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +use_2to3 = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +eager_resources = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements +extras_require = setuptools.dist:check_extras +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +test_suite = setuptools.dist:check_test_suite +include_package_data = setuptools.dist:assert_bool [console_scripts] -easy_install = setuptools.command.easy_install:main easy_install-3.3 = setuptools.command.easy_install:main - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -requires.txt = setuptools.command.egg_info:write_requirements -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +easy_install = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 221040f812..c06a8a0b3e 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[certs] -certifi==0.0.8 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 -[ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 55c149c353..597b128181 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.3' +__version__ = '0.9.4' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 6cd0dbf7751bdce24975f384f5d810f5175b98a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 14:30:13 -0400 Subject: [PATCH 1366/8469] better variable name --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index b6bb7e526f..4b90dfbd5a 100755 --- a/setup.py +++ b/setup.py @@ -11,13 +11,13 @@ from distutils.util import convert_path -d = {} +command_ns = {} init_path = convert_path('setuptools/command/__init__.py') init_file = open(init_path) -exec(init_file.read(), d) +exec(init_file.read(), command_ns) init_file.close() -SETUP_COMMANDS = d['__all__'] +SETUP_COMMANDS = command_ns['__all__'] import setuptools from setuptools.command.build_py import build_py as _build_py From bae650322899670688e66ff7167cbf1ab34d8dd0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 14:40:17 -0400 Subject: [PATCH 1367/8469] Load version from the file rather than by importing the module (which is subject to variance based on sys.path). Fixes #43. --- CHANGES.txt | 7 +++++++ setup.py | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 010e56153f..fa8bd09364 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.9.4 +----- + +* Issue #43: Fix issue (introduced in 0.9.1) with version resolution when + upgrading over other releases of Setuptools. + ----- 0.9.3 ----- diff --git a/setup.py b/setup.py index 4b90dfbd5a..d716ee2ec9 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,12 @@ SETUP_COMMANDS = command_ns['__all__'] +main_ns = {} +init_path = convert_path('setuptools/__init__.py') +init_file = open(init_path) +exec(init_file.read(), main_ns) +init_file.close() + import setuptools from setuptools.command.build_py import build_py as _build_py from setuptools.command.test import test as _test @@ -93,7 +99,7 @@ def run(self): setup_params = dict( name="setuptools", - version=setuptools.__version__, + version=main_ns['__version__'], description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="The fellowship of the packaging", From b7cf45dbdd48c26901d256df5a028bf41a90536e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 14:45:36 -0400 Subject: [PATCH 1368/8469] Added tag 0.9.4 for changeset 1aef141fc968 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 259cf484e4..8c6482c0b4 100644 --- a/.hgtags +++ b/.hgtags @@ -84,3 +84,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 9e5a8f734662dd36e6fd6e4ba9031d0e2d294632 0.9.1 37444bb32e172aaacbc0aeafdf5a778ee471723d 0.9.2 3e9d2e89de3aa499382d6be2ec8b64d2a29f7f13 0.9.3 +1aef141fc968113e4c521d1edf6ea863c4ff7e00 0.9.4 From 15b5b526ba4c6502a827069aead546b77ac3d4a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 14:46:29 -0400 Subject: [PATCH 1369/8469] Bumped to 0.9.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 72 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 +++--- setuptools/__init__.py | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b9b2fd3f66..fc1d6170cc 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.4" +DEFAULT_VERSION = "0.9.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 7d399be6ad..26422c4d46 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [egg_info.writers] eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete PKG-INFO = setuptools.command.egg_info:write_pkg_info entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete requires.txt = setuptools.command.egg_info:write_requirements - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names [distutils.commands] -rotate = setuptools.command.rotate:rotate -sdist = setuptools.command.sdist:sdist -saveopts = setuptools.command.saveopts:saveopts +alias = setuptools.command.alias:alias +register = setuptools.command.register:register +build_ext = setuptools.command.build_ext:build_ext bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install +install_lib = setuptools.command.install_lib:install_lib setopt = setuptools.command.setopt:setopt upload_docs = setuptools.command.upload_docs:upload_docs -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install_scripts = setuptools.command.install_scripts:install_scripts -build_ext = setuptools.command.build_ext:build_ext +test = setuptools.command.test:test egg_info = setuptools.command.egg_info:egg_info +saveopts = setuptools.command.saveopts:saveopts bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_egg_info = setuptools.command.install_egg_info:install_egg_info +install = setuptools.command.install:install build_py = setuptools.command.build_py:build_py -test = setuptools.command.test:test -register = setuptools.command.register:register -install_lib = setuptools.command.install_lib:install_lib -develop = setuptools.command.develop:develop +rotate = setuptools.command.rotate:rotate +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -use_2to3_fixers = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -dependency_links = setuptools.dist:assert_string_list packages = setuptools.dist:check_packages -use_2to3 = setuptools.dist:assert_bool -package_data = setuptools.dist:check_package_data +convert_2to3_doctests = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras use_2to3_exclude_fixers = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool +dependency_links = setuptools.dist:assert_string_list exclude_package_data = setuptools.dist:check_package_data -eager_resources = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements -extras_require = setuptools.dist:check_extras -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list test_loader = setuptools.dist:check_importable -test_suite = setuptools.dist:check_test_suite +zip_safe = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data include_package_data = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +entry_points = setuptools.dist:check_entry_points +use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite [console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index c06a8a0b3e..6d385dc746 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 597b128181..2ef6b3be67 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.4' +__version__ = '0.9.5' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 7ddd872c63a9465340eadae59868d85ac1d43e67 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 15 Jul 2013 12:35:21 -0700 Subject: [PATCH 1370/8469] Fix backported ssl_match_hostname for http://bugs.python.org/issue17980 --- setuptools/ssl_support.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 2aec655a09..f8a780a95b 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -88,9 +88,16 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, class CertificateError(ValueError): pass - def _dnsname_to_pat(dn): + def _dnsname_to_pat(dn, max_wildcards=1): pats = [] for frag in dn.split(r'.'): + if frag.count('*') > max_wildcards: + # Issue #17980: avoid denials of service by refusing more + # than one wildcard per fragment. A survery of established + # policy among SSL implementations showed it to be a + # reasonable choice. + raise CertificateError( + "too many wildcards in certificate DNS name: " + repr(dn)) if frag == '*': # When '*' is a fragment by itself, it matches a non-empty dotless # fragment. From fe0cad564d7e036d3b7b6d4ac59dc30d9abdb338 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 16:41:50 -0400 Subject: [PATCH 1371/8469] Update changelog --- CHANGES.txt | 6 ++++++ release.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index fa8bd09364..2c1af0c519 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.9.5 +----- + +* Python #17980: Fix security vulnerability in SSL certificate validation. + ----- 0.9.4 ----- diff --git a/release.py b/release.py index 5e99e74cfd..659b408668 100644 --- a/release.py +++ b/release.py @@ -29,6 +29,7 @@ def before_upload(): r"Buildout #(?P\d+)", r"Old Setuptools #(?P\d+)", r"Jython #(?P\d+)", + r"Python #(?P\d+)", ] issue_urls = dict( @@ -37,6 +38,7 @@ def before_upload(): buildout='https://github.com/buildout/buildout/issues/{buildout}', old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', jython='http://bugs.jython.org/issue{jython}', + python='http://bugs.python.org/issue{python}', ) def _linkify(source, dest): From fae1bf32e9e161646a9a1c8932e04d5593edf933 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 17:13:07 -0400 Subject: [PATCH 1372/8469] Added tag 0.9.5 for changeset 88e3d6788fac --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8c6482c0b4..54f16ccdd3 100644 --- a/.hgtags +++ b/.hgtags @@ -85,3 +85,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 37444bb32e172aaacbc0aeafdf5a778ee471723d 0.9.2 3e9d2e89de3aa499382d6be2ec8b64d2a29f7f13 0.9.3 1aef141fc968113e4c521d1edf6ea863c4ff7e00 0.9.4 +88e3d6788facbb2dd6467a23c4f35529a5ce20a1 0.9.5 From d00b66d5f530da930fdd89cdfdf0ff954f88a141 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jul 2013 17:13:48 -0400 Subject: [PATCH 1373/8469] Bumped to 0.9.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 82 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 12 ++-- setuptools/__init__.py | 2 +- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index fc1d6170cc..2535472190 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.5" +DEFAULT_VERSION = "0.9.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 26422c4d46..669a59d644 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + [egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg depends.txt = setuptools.command.egg_info:warn_depends_obsolete -requires.txt = setuptools.command.egg_info:write_requirements namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg [distutils.commands] -alias = setuptools.command.alias:alias -register = setuptools.command.register:register -build_ext = setuptools.command.build_ext:build_ext -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_lib = setuptools.command.install_lib:install_lib -setopt = setuptools.command.setopt:setopt -upload_docs = setuptools.command.upload_docs:upload_docs install_egg_info = setuptools.command.install_egg_info:install_egg_info -sdist = setuptools.command.sdist:sdist -develop = setuptools.command.develop:develop -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -test = setuptools.command.test:test egg_info = setuptools.command.egg_info:egg_info saveopts = setuptools.command.saveopts:saveopts -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install = setuptools.command.install:install -build_py = setuptools.command.build_py:build_py +develop = setuptools.command.develop:develop +test = setuptools.command.test:test rotate = setuptools.command.rotate:rotate +build_py = setuptools.command.build_py:build_py +register = setuptools.command.register:register +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm easy_install = setuptools.command.easy_install:easy_install +install = setuptools.command.install:install +setopt = setuptools.command.setopt:setopt +build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +sdist = setuptools.command.sdist:sdist +bdist_egg = setuptools.command.bdist_egg:bdist_egg install_scripts = setuptools.command.install_scripts:install_scripts - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +install_lib = setuptools.command.install_lib:install_lib [distutils.setup_keywords] -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras +zip_safe = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list test_loader = setuptools.dist:check_importable -zip_safe = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +tests_require = setuptools.dist:check_requirements package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list namespace_packages = setuptools.dist:check_nsp -entry_points = setuptools.dist:check_entry_points +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list use_2to3 = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -test_suite = setuptools.dist:check_test_suite - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +exclude_package_data = setuptools.dist:check_package_data +use_2to3_fixers = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 6d385dc746..256342f0e4 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +ctypes==1.0.2 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2ef6b3be67..74b1029421 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.5' +__version__ = '0.9.6' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 3e72e7f7eacca7db638f7230f93cf696d49c77bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 17 Jul 2013 11:28:44 -0400 Subject: [PATCH 1374/8469] Add compatibility for Python 2.4 when querying the hash name. Fixes #44 --- CHANGES.txt | 7 ++ setuptools.egg-info/entry_points.txt | 124 +++++++++++++------------- setuptools.egg-info/requires.txt | 6 +- setuptools/package_index.py | 17 +++- setuptools/tests/test_packageindex.py | 16 +++- 5 files changed, 103 insertions(+), 67 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2c1af0c519..6e993ada5c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.9.6 +----- + +* Issue #44: Test failure on Python 2.4 when MD5 hash doesn't have a `.name` + attribute. + ----- 0.9.5 ----- diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 669a59d644..870a6dbee6 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -dependency_links.txt = setuptools.command.egg_info:overwrite_arg - -[distutils.commands] -install_egg_info = setuptools.command.install_egg_info:install_egg_info -egg_info = setuptools.command.egg_info:egg_info -saveopts = setuptools.command.saveopts:saveopts -develop = setuptools.command.develop:develop -test = setuptools.command.test:test -rotate = setuptools.command.rotate:rotate -build_py = setuptools.command.build_py:build_py -register = setuptools.command.register:register -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -easy_install = setuptools.command.easy_install:easy_install -install = setuptools.command.install:install -setopt = setuptools.command.setopt:setopt -build_ext = setuptools.command.build_ext:build_ext -upload_docs = setuptools.command.upload_docs:upload_docs -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -sdist = setuptools.command.sdist:sdist -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_scripts = setuptools.command.install_scripts:install_scripts -install_lib = setuptools.command.install_lib:install_lib - -[distutils.setup_keywords] -zip_safe = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -entry_points = setuptools.dist:check_entry_points -tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -eager_resources = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -include_package_data = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -use_2to3_fixers = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements - +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg + +[distutils.commands] +install_egg_info = setuptools.command.install_egg_info:install_egg_info +egg_info = setuptools.command.egg_info:egg_info +saveopts = setuptools.command.saveopts:saveopts +develop = setuptools.command.develop:develop +test = setuptools.command.test:test +rotate = setuptools.command.rotate:rotate +build_py = setuptools.command.build_py:build_py +register = setuptools.command.register:register +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +easy_install = setuptools.command.easy_install:easy_install +install = setuptools.command.install:install +setopt = setuptools.command.setopt:setopt +build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +sdist = setuptools.command.sdist:sdist +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_scripts = setuptools.command.install_scripts:install_scripts +install_lib = setuptools.command.install_lib:install_lib + +[distutils.setup_keywords] +zip_safe = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +entry_points = setuptools.dist:check_entry_points +tests_require = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +eager_resources = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +use_2to3_fixers = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 256342f0e4..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [ssl:sys_platform=='win32'] wincertstore==0.1 [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 \ No newline at end of file diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 70aabd1bd6..47f00c0012 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -242,8 +242,23 @@ def feed(self, block): def is_valid(self): return self.hash.hexdigest() == self.expected + def _get_hash_name(self): + """ + Python 2.4 implementation of MD5 doesn't supply a .name attribute + so provide that name. + + When Python 2.4 is no longer required, replace invocations of this + method with simply 'self.hash.name'. + """ + try: + return self.hash.name + except AttributeError: + if 'md5' in str(type(self.hash)): + return 'md5' + raise + def report(self, reporter, template): - msg = template % self.hash.name + msg = template % self._get_hash_name() return reporter(msg) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 4f2d382c35..3791914ac6 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -147,7 +147,6 @@ class TestContentCheckers(unittest.TestCase): def test_md5(self): checker = setuptools.package_index.HashChecker.from_url( 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') - self.assertEqual(checker.hash.name, 'md5') checker.feed('You should probably not be using MD5'.encode('ascii')) self.assertEqual(checker.hash.hexdigest(), 'f12895fdffbd45007040d2e44df98478') @@ -166,3 +165,18 @@ def test_blank_md5(self): 'http://foo/bar#md5=') checker.feed('anything'.encode('ascii')) self.assertTrue(checker.is_valid()) + + def test_get_hash_name_md5(self): + checker = setuptools.package_index.HashChecker.from_url( + 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') + if sys.version_info >= (2,5): + self.assertEqual(checker.hash.name, 'md5') + else: + # Python 2.4 compatability + self.assertEqual(checker._get_hash_name(), 'md5') + + def test_report(self): + checker = setuptools.package_index.HashChecker.from_url( + 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') + rep = checker.report(lambda x: x, 'My message about %s') + self.assertEqual(rep, 'My message about md5') From 55d6e17857d97eb80ef1eb5905227b1f3d71e627 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 17 Jul 2013 21:08:22 -0400 Subject: [PATCH 1375/8469] Added tag 0.9.6 for changeset acc6c5d61d0f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 54f16ccdd3..bb4ffc144b 100644 --- a/.hgtags +++ b/.hgtags @@ -86,3 +86,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 3e9d2e89de3aa499382d6be2ec8b64d2a29f7f13 0.9.3 1aef141fc968113e4c521d1edf6ea863c4ff7e00 0.9.4 88e3d6788facbb2dd6467a23c4f35529a5ce20a1 0.9.5 +acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 From d748f5e7c9107123704a0907bdb87a2eb5e149a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 17 Jul 2013 21:08:57 -0400 Subject: [PATCH 1376/8469] Bumped to 0.9.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +- setuptools/__init__.py | 2 +- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2535472190..22f14f7332 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.6" +DEFAULT_VERSION = "0.9.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 870a6dbee6..d64b3c288e 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -dependency_links.txt = setuptools.command.egg_info:overwrite_arg - -[distutils.commands] -install_egg_info = setuptools.command.install_egg_info:install_egg_info -egg_info = setuptools.command.egg_info:egg_info -saveopts = setuptools.command.saveopts:saveopts -develop = setuptools.command.develop:develop -test = setuptools.command.test:test -rotate = setuptools.command.rotate:rotate -build_py = setuptools.command.build_py:build_py -register = setuptools.command.register:register -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -easy_install = setuptools.command.easy_install:easy_install -install = setuptools.command.install:install -setopt = setuptools.command.setopt:setopt -build_ext = setuptools.command.build_ext:build_ext -upload_docs = setuptools.command.upload_docs:upload_docs -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -sdist = setuptools.command.sdist:sdist -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_scripts = setuptools.command.install_scripts:install_scripts -install_lib = setuptools.command.install_lib:install_lib - -[distutils.setup_keywords] -zip_safe = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -entry_points = setuptools.dist:check_entry_points -tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -eager_resources = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -include_package_data = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -use_2to3_fixers = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements - +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +exclude_package_data = setuptools.dist:check_package_data +extras_require = setuptools.dist:check_extras +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages +entry_points = setuptools.dist:check_entry_points +zip_safe = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +convert_2to3_doctests = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[egg_info.writers] +top_level.txt = setuptools.command.egg_info:write_toplevel_names +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements + +[distutils.commands] +test = setuptools.command.test:test +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +setopt = setuptools.command.setopt:setopt +egg_info = setuptools.command.egg_info:egg_info +build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +easy_install = setuptools.command.easy_install:easy_install +install = setuptools.command.install:install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_lib = setuptools.command.install_lib:install_lib +rotate = setuptools.command.rotate:rotate +saveopts = setuptools.command.saveopts:saveopts +install_scripts = setuptools.command.install_scripts:install_scripts +build_py = setuptools.command.build_py:build_py +register = setuptools.command.register:register + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..0b577c9748 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:sys_platform=='win32'] -wincertstore==0.1 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 74b1029421..18dd363d12 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.6' +__version__ = '0.9.7' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From b8a80d2f4a95c4d6c7db7536fc00f1fc5708321d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Jul 2013 09:09:52 -0400 Subject: [PATCH 1377/8469] Updated README and setup.py to reference PyPA --- README.txt | 6 +++++- setup.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 0a3bb21db4..d57e1258fd 100755 --- a/README.txt +++ b/README.txt @@ -157,7 +157,7 @@ Credits aspects of ``easy_install``, and supplied the doctests for the command-line ``.exe`` wrappers on Windows. -* Phillip J. Eby is the principal author and maintainer of setuptools, and +* Phillip J. Eby is the seminal author of setuptools, and first proposed the idea of an importable binary distribution format for Python application plug-ins. @@ -167,4 +167,8 @@ Credits "Code Bear" Taylor) contributed their time and stress as guinea pigs for the use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) +* Since the merge with Distribute, Jason R. Coombs is the + maintainer of setuptools. The project is maintained in coordination with + the Python Packaging Authority (PyPA) and the larger Python community. + .. _files: diff --git a/setup.py b/setup.py index d716ee2ec9..978644d223 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def run(self): version=main_ns['__version__'], description="Easily download, build, install, upgrade, and uninstall " "Python packages", - author="The fellowship of the packaging", + author="Python Packaging Authority", author_email="distutils-sig@python.org", license="PSF or ZPL", long_description = long_description, From d01d1da2bed3f0ebefde89878e1e1597f3c50ca1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Jul 2013 09:10:24 -0400 Subject: [PATCH 1378/8469] Remove excess whitespace --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 978644d223..629f2fff24 100755 --- a/setup.py +++ b/setup.py @@ -119,7 +119,7 @@ def run(self): cmdclass = {'test': test}, entry_points = { - "distutils.commands" : [ + "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() for cmd in SETUP_COMMANDS ], From 32ce1f20d60722db8cc99eecdc4b7bf6e627730e Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Fri, 19 Jul 2013 19:02:37 -0400 Subject: [PATCH 1379/8469] Make certain no previous imports of old versions of pkg_resources are floating around before importing the newly installed setuptools. --- ez_setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 22f14f7332..6b2a023b33 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -100,6 +100,8 @@ def _do_download(version, download_base, to_dir, download_delay): to_dir, download_delay) _build_egg(egg, tarball, to_dir) sys.path.insert(0, egg) + if 'pkg_resources' in sys.modules: + del sys.modules['pkg_resources'] import setuptools setuptools.bootstrap_install_from = egg From 28efa26aa909ea60533c0719ed5f7aaa6adf8fb2 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 20 Jul 2013 11:15:20 -0400 Subject: [PATCH 1380/8469] add _-separated keys to environment markers --- _markerlib/markers.py | 4 ++++ setuptools/tests/test_markerlib.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/_markerlib/markers.py b/_markerlib/markers.py index c93d7f3b67..fa837061e0 100644 --- a/_markerlib/markers.py +++ b/_markerlib/markers.py @@ -49,6 +49,10 @@ def python_implementation(): 'extra': None # wheel extension } +for var in list(_VARS.keys()): + if '.' in var: + _VARS[var.replace('.', '_')] = _VARS[var] + def default_environment(): """Return copy of default PEP 385 globals dictionary.""" return dict(_VARS) diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py index aa461846b6..dae71cba46 100644 --- a/setuptools/tests/test_markerlib.py +++ b/setuptools/tests/test_markerlib.py @@ -19,20 +19,24 @@ def test_markers(self): self.assertTrue(interpret("")) self.assertTrue(interpret("os.name != 'buuuu'")) + self.assertTrue(interpret("os_name != 'buuuu'")) self.assertTrue(interpret("python_version > '1.0'")) self.assertTrue(interpret("python_version < '5.0'")) self.assertTrue(interpret("python_version <= '5.0'")) self.assertTrue(interpret("python_version >= '1.0'")) self.assertTrue(interpret("'%s' in os.name" % os_name)) + self.assertTrue(interpret("'%s' in os_name" % os_name)) self.assertTrue(interpret("'buuuu' not in os.name")) self.assertFalse(interpret("os.name == 'buuuu'")) + self.assertFalse(interpret("os_name == 'buuuu'")) self.assertFalse(interpret("python_version < '1.0'")) self.assertFalse(interpret("python_version > '5.0'")) self.assertFalse(interpret("python_version >= '5.0'")) self.assertFalse(interpret("python_version <= '1.0'")) self.assertFalse(interpret("'%s' not in os.name" % os_name)) self.assertFalse(interpret("'buuuu' in os.name and python_version >= '5.0'")) + self.assertFalse(interpret("'buuuu' in os_name and python_version >= '5.0'")) environment = default_environment() environment['extra'] = 'test' From fae83a533275d9c6e21d2ede79aaa942ceacd5dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Jul 2013 05:09:34 -0400 Subject: [PATCH 1381/8469] Add comment and link back to justification. --HG-- extra : rebase_source : e6f4e62a87e24933c8821fdef141d194b90874d3 --- ez_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 6b2a023b33..55434eb71e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -100,8 +100,12 @@ def _do_download(version, download_base, to_dir, download_delay): to_dir, download_delay) _build_egg(egg, tarball, to_dir) sys.path.insert(0, egg) + + # Remove previously-imported pkg_resources if present (see + # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: del sys.modules['pkg_resources'] + import setuptools setuptools.bootstrap_install_from = egg From 370e8115107724f358c753cfd7395586c7eb4081 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Jul 2013 23:57:00 -0400 Subject: [PATCH 1382/8469] #34: Update the 'bootstrap' bookmark as part of the release process. --HG-- extra : rebase_source : 549f10a7b864152871edccf3d0f9e0bf57fb8bf0 --- release.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release.py b/release.py index 659b408668..6635033505 100644 --- a/release.py +++ b/release.py @@ -6,6 +6,7 @@ import re import os import itertools +import subprocess try: zip_longest = itertools.zip_longest @@ -14,6 +15,7 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') + _add_bootstrap_bookmark() files_with_versions = ( 'ez_setup.py', 'setuptools/__init__.py', @@ -55,3 +57,8 @@ def replacer(match): if match_dict[key]: url = issue_urls[key].format(**match_dict) return "`{text} <{url}>`_".format(text=text, url=url) + + +def _add_bootstrap_bookmark(): + cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f'] + subprocess.Popen(cmd) From 76d45c48ae73175e0aca44286c4323b631daac46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Jul 2013 00:00:08 -0400 Subject: [PATCH 1383/8469] #34: Refer to the new canonical location of the bootstrap script --HG-- extra : rebase_source : 4468b50706cd9ab6d0ae990ee6f785b314837dba --- README.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index d57e1258fd..53608bae8e 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py For best results, uninstall previous versions FIRST (see `Uninstalling`_). @@ -45,7 +45,7 @@ Unix-based Systems including Mac OS X Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py -O - | python + > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python. @@ -53,7 +53,7 @@ install to the system Python. Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py + > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py > python ez_setup.py --user From b9928121417a205e64f18b98f7d3cea05f41511b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Jul 2013 00:00:50 -0400 Subject: [PATCH 1384/8469] Add whitespace to remove linter warnings --HG-- extra : rebase_source : 2f37f043a6cc87cc015efa318699bc09785dbd87 --- release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.py b/release.py index 6635033505..31cb64e439 100644 --- a/release.py +++ b/release.py @@ -13,6 +13,7 @@ except AttributeError: zip_longest = itertools.izip_longest + def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') _add_bootstrap_bookmark() @@ -43,6 +44,7 @@ def before_upload(): python='http://bugs.python.org/issue{python}', ) + def _linkify(source, dest): pattern = '|'.join(link_patterns) with open(source) as source: @@ -50,6 +52,7 @@ def _linkify(source, dest): with open(dest, 'w') as dest: dest.write(out) + def replacer(match): text = match.group(0) match_dict = match.groupdict() From 70067439d3b2b53cf2112ed0faf52c30b30ef3cd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Jul 2013 00:01:32 -0400 Subject: [PATCH 1385/8469] Remove unused imports in release script (usage masked by compatibilty technique). --HG-- extra : rebase_source : 4f9aabd0efe87de76f85f91c4c379e48f68ffac4 --- release.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/release.py b/release.py index 31cb64e439..bad7e0eea7 100644 --- a/release.py +++ b/release.py @@ -5,14 +5,8 @@ import re import os -import itertools import subprocess -try: - zip_longest = itertools.zip_longest -except AttributeError: - zip_longest = itertools.izip_longest - def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') From b4ba33898f4d67af70319a0bb64edca72fc3ecee Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 20 Jul 2013 17:45:04 -0500 Subject: [PATCH 1386/8469] Additional Tests, Various fixes, and encoding dealings --HG-- extra : rebase_source : 2734e79e08e194923eab8c70f92cb77bce7daccf --- setuptools/command/egg_info.py | 2 +- setuptools/command/sdist.py | 84 ++--- setuptools/compat.py | 2 + setuptools/svn_utils.py | 376 +++++++++++++------ setuptools/tests/environment.py | 104 +++++ setuptools/tests/svn_data/svn13_example.zip | Bin 0 -> 48818 bytes setuptools/tests/svn_data/svn13_ext_list.txt | 3 + setuptools/tests/svn_data/svn13_ext_list.xml | 0 setuptools/tests/svn_data/svn13_info.xml | 121 ++++++ setuptools/tests/svn_data/svn14_example.zip | Bin 0 -> 31077 bytes setuptools/tests/svn_data/svn14_ext_list.txt | 4 + setuptools/tests/svn_data/svn14_ext_list.xml | 0 setuptools/tests/svn_data/svn14_info.xml | 119 ++++++ setuptools/tests/svn_data/svn15_example.zip | Bin 0 -> 31143 bytes setuptools/tests/svn_data/svn15_ext_list.txt | 4 + setuptools/tests/svn_data/svn15_ext_list.xml | 19 + setuptools/tests/svn_data/svn15_info.xml | 125 ++++++ setuptools/tests/svn_data/svn16_example.zip | Bin 0 -> 29418 bytes setuptools/tests/svn_data/svn16_ext_list.txt | 4 + setuptools/tests/svn_data/svn16_ext_list.xml | 19 + setuptools/tests/svn_data/svn16_info.xml | 125 ++++++ setuptools/tests/svn_data/svn17_example.zip | Bin 0 -> 46954 bytes setuptools/tests/svn_data/svn17_ext_list.txt | 4 + setuptools/tests/svn_data/svn17_ext_list.xml | 19 + setuptools/tests/svn_data/svn17_info.xml | 130 +++++++ setuptools/tests/svn_data/svn18_example.zip | Bin 0 -> 47477 bytes setuptools/tests/svn_data/svn18_ext_list.txt | 4 + setuptools/tests/svn_data/svn18_ext_list.xml | 19 + setuptools/tests/svn_data/svn18_info.xml | 136 +++++++ setuptools/tests/test_egg_info.py | 13 + setuptools/tests/test_sdist.py | 64 +++- setuptools/tests/test_svn.py | 305 +++++++++------ 32 files changed, 1528 insertions(+), 277 deletions(-) create mode 100644 setuptools/tests/environment.py create mode 100644 setuptools/tests/svn_data/svn13_example.zip create mode 100644 setuptools/tests/svn_data/svn13_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn13_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn13_info.xml create mode 100644 setuptools/tests/svn_data/svn14_example.zip create mode 100644 setuptools/tests/svn_data/svn14_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn14_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn14_info.xml create mode 100644 setuptools/tests/svn_data/svn15_example.zip create mode 100644 setuptools/tests/svn_data/svn15_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn15_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn15_info.xml create mode 100644 setuptools/tests/svn_data/svn16_example.zip create mode 100644 setuptools/tests/svn_data/svn16_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn16_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn16_info.xml create mode 100644 setuptools/tests/svn_data/svn17_example.zip create mode 100644 setuptools/tests/svn_data/svn17_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn17_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn17_info.xml create mode 100644 setuptools/tests/svn_data/svn18_example.zip create mode 100644 setuptools/tests/svn_data/svn18_ext_list.txt create mode 100644 setuptools/tests/svn_data/svn18_ext_list.xml create mode 100644 setuptools/tests/svn_data/svn18_info.xml diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 345ec8aec0..3170064815 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -217,7 +217,7 @@ def tags(self): @staticmethod def get_svn_revision(): - return str(svn_utils.parse_revision(os.curdir)) + return str(svn_utils.SvnInfo.load(os.curdir).get_revision()) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 5cc2139be6..e1112ff930 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -8,73 +8,58 @@ READMES = ('README', 'README.rst', 'README.txt') -entities = [ - ("<","<"), (">", ">"), (""", '"'), ("'", "'"), - ("&", "&") -] -def unescape(data): - for old,new in entities: - data = data.replace(old,new) - return data +def walk_revctrl(dirname=''): + """Find all files under revision control""" + for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): + for item in ep.load()(dirname): + yield item + + +#TODO will need test case +class re_finder(object): -def re_finder(pattern, postproc=None): - def find(dirname, filename): + def __init__(self, path, pattern, postproc=None): + self.pattern = pattern + self.postproc = postproc + self.path = convert_path(path) + + def _finder(self, dirname, filename): f = open(filename,'rU') - data = f.read() - f.close() - for match in pattern.finditer(data): + try: + data = f.read() + finally: + f.close() + for match in self.pattern.finditer(data): path = match.group(1) if postproc: + #postproc used to be used when the svn finder + #was an re_finder for calling unescape path = postproc(path) - yield joinpath(dirname,path) - return find - -def joinpath(prefix,suffix): - if not prefix: - return suffix - return os.path.join(prefix,suffix) - - - + yield svn_utils.joinpath(dirname,path) + def __call__(self, dirname=''): + path = svn_utils.joinpath(dirname, self.path) - - - - -def walk_revctrl(dirname=''): - """Find all files under revision control""" - for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): - for item in ep.load()(dirname): - yield item - -def _default_revctrl(dirname=''): - for path, finder in finders: - path = joinpath(dirname,path) if os.path.isfile(path): - for path in finder(dirname,path): + for path in self._finder(dirname,path): if os.path.isfile(path): yield path elif os.path.isdir(path): - for item in _default_revctrl(path): + for item in self.find(path): yield item -def entries_externals_finder(dirname, filename): - for record in svn_utils.parse_dir_entries(dirname): - yield joinpath(dirname, record) - - for name in svn_utils.parse_externals(dirname): - yield joinpath(dirname, name) +def _default_revctrl(dirname=''): + 'Primary svn_cvs entry point' + for finder in finders: + for item in finder(dirname): + yield item finders = [ - (convert_path('CVS/Entries'), - re_finder(re.compile(r"^\w?/([^/]+)/", re.M))), - #combined externals due to common interface - #combined externals and enteries due to lack of dir_props in 1.7 - (convert_path('.svn/entries'), entries_externals_finder), + re_finder('CVS/Entries', re.compile(r"^\w?/([^/]+)/", re.M)), + svn_utils.svn_finder, ] @@ -88,6 +73,7 @@ def entries_externals_finder(dirname, filename): + class sdist(_sdist): """Smart sdist that finds anything supported by revision control""" diff --git a/setuptools/compat.py b/setuptools/compat.py index e2f64de236..94fe23e92d 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -26,6 +26,7 @@ reduce = reduce unichr = unichr unicode = unicode + bytes = str from urllib import url2pathname import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser @@ -69,6 +70,7 @@ def exec_(code, globs=None, locs=None): from functools import reduce unichr = chr unicode = str + bytes = bytes from urllib.error import HTTPError, URLError import urllib.request as urllib2 from urllib.request import urlopen, url2pathname diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index a4c53f154b..09aa5e25c8 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -1,31 +1,22 @@ import os import re import sys -import codecs from distutils import log import xml.dom.pulldom +import shlex +import locale +import unicodedata +from setuptools.compat import unicode, bytes try: import urlparse except ImportError: import urllib.parse as urlparse -#requires python >= 2.4 from subprocess import Popen as _Popen, PIPE as _PIPE -#NOTE: Use of the command line options -# require SVN 1.3 or newer (December 2005) -# and SVN 1.3 hsan't been supported by the -# developers since mid 2008. - - -#svnversion return values (previous implementations return max revision) -# 4123:4168 mixed revision working copy -# 4168M modified working copy -# 4123S switched working copy -# 4123:4168MS mixed revision, modified, switched working copy -_SVN_VER_RE = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I) - +#NOTE: Use of the command line options require SVN 1.3 or newer (December 2005) +# and SVN 1.3 hasn't been supported by the developers since mid 2008. #subprocess is called several times with shell=(sys.platform=='win32') #see the follow for more information: @@ -33,27 +24,20 @@ # http://stackoverflow.com/questions/5658622/ # python-subprocess-popen-environment-path def _run_command(args, stdout=_PIPE, stderr=_PIPE): - #regarding the shell argument, see: http://bugs.python.org/issue8557 - try: - proc = _Popen(args, stdout=stdout, stderr=stderr, - shell=(sys.platform == 'win32')) - - data = proc.communicate()[0] - except OSError: - return 1, '' - - #TODO: this is probably NOT always utf-8 - try: - data = unicode(data, encoding='utf-8') - except NameError: - data = str(data, encoding='utf-8') + #regarding the shell argument, see: http://bugs.python.org/issue8557 + try: + args = [fsdecode(x) for x in args] + proc = _Popen(args, stdout=stdout, stderr=stderr, + shell=(sys.platform == 'win32')) - #communciate calls wait() - return proc.returncode, data + data = proc.communicate()[0] + except OSError: + return 1, '' + data = consoledecode(data) -def _get_entry_name(entry): - return entry.getAttribute('path') + #communciate calls wait() + return proc.returncode, data def _get_entry_schedule(entry): @@ -63,105 +47,283 @@ def _get_entry_schedule(entry): if t.nodeType == t.TEXT_NODE]) -def parse_revision(path): - code, data = _run_command(['svnversion', '-c', path]) +def _get_target_property(target): + property_text = target.getElementsByTagName('property')[0] + return "".join([t.nodeValue + for t in property_text.childNodes + if t.nodeType == t.TEXT_NODE]) - if code: - log.warn("svnversion failed") - return 0 + +def _get_xml_data(decoded_str): + if sys.version_info < (3, 0): + #old versions want an encoded string + data = decoded_str.encode('utf-8') else: - log.warn('Version: %s' % data.strip()) + data = decoded_str + return data - parsed = _SVN_VER_RE.match(data) - if parsed: - try: - #No max needed this command summarizes working copy since 1.0 - return int(parsed.group(2)) - except ValueError: - #This should only happen if the revision is WAY too big. - pass - return 0 - -#TODO: Need to do this with the -R because only root has .svn in 1.7.x -def parse_dir_entries(path): - code, data = _run_command(['svn', 'info', - '--depth', 'immediates', '--xml', path]) - - if code: - log.warn("svn info failed") - return [] - data = codecs.encode(data, 'UTF-8') +def joinpath(prefix, suffix): + if not prefix or prefix == '.': + return suffix + return os.path.join(prefix, suffix) + + +def fsencode(path): + "Path must be unicode or in file system encoding already" + encoding = sys.getfilesystemencoding() + + if isinstance(path, unicode): + path = path.encode() + elif not isinstance(path, bytes): + raise TypeError('%s is not a string or byte type' + % type(path).__name__) + + #getfilessystemencoding doesn't have the mac-roman issue + if encoding == 'utf-8' and sys.platform == 'darwin': + path = path.decode('utf-8') + path = unicodedata.normalize('NFD', path) + path = path.encode('utf-8') - doc = xml.dom.pulldom.parseString(data) + return path + +def fsdecode(path): + "Path must be unicode or in file system encoding already" + encoding = sys.getfilesystemencoding() + if isinstance(path, bytes): + path = path.decode(encoding) + elif not isinstance(path, unicode): + raise TypeError('%s is not a byte type' + % type(path).__name__) + + return unicodedata.normalize('NFC', path) + +def consoledecode(text): + encoding = locale.getpreferredencoding() + return text.decode(encoding) + + +def parse_dir_entries(decoded_str): + '''Parse the entries from a recursive info xml''' + doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str)) entries = list() + for event, node in doc: if event == 'START_ELEMENT' and node.nodeName == 'entry': doc.expandNode(node) - entries.append(node) - - if entries: - return [ - _get_entry_name(element) - for element in entries[1:] - if _get_entry_schedule(element).lower() != 'deleted' - ] - else: - return [] + if not _get_entry_schedule(node).startswith('delete'): + entries.append((node.getAttribute('path'), + node.getAttribute('kind'))) + return entries[1:] # do not want the root directory -#--xml wasn't supported until 1.5.x need to do -R -#TODO: -R looks like directories are seperated by blank lines -# with dir - prepened to first directory -# what about directories with spaces? -# put quotes around them -# what about the URL's? -# same -# convert to UTF-8 and use csv -# delimiter = space -# -#-R without --xml parses a bit funny -def parse_externals(path): - try: - code, lines = _run_command(['svn', - 'propget', 'svn:externals', path]) - if code: - log.warn("svn propget failed") - return [] +def parse_externals_xml(decoded_str, prefix=''): + '''Parse a propget svn:externals xml''' + prefix = os.path.normpath(prefix) + + doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str)) + externals = list() + + for event, node in doc: + if event == 'START_ELEMENT' and node.nodeName == 'target': + doc.expandNode(node) + path = os.path.normpath(node.getAttribute('path')) + if os.path.normcase(path).startswith(prefix): + path = path[len(prefix)+1:] - lines = [line for line in lines.splitlines() if line] - except ValueError: - lines = [] + data = _get_target_property(node) + for external in parse_external_prop(data): + externals.append(joinpath(path, external)) + return externals # do not want the root directory + + +def parse_external_prop(lines): + """ + Parse the value of a retrieved svn:externals entry. + + possible token setups (with quotng and backscaping in laters versions) + URL[@#] EXT_FOLDERNAME + [-r#] URL EXT_FOLDERNAME + EXT_FOLDERNAME [-r#] URL + """ externals = [] - for line in lines: - line = line.split() + for line in lines.splitlines(): + line = line.lstrip() #there might be a "\ " if not line: continue + if sys.version_info < (3, 0): + #shlex handles NULLs just fine and shlex in 2.7 tries to encode + #as ascii automatiically + line = line.encode('utf-8') + line = shlex.split(line) + if sys.version_info < (3, 0): + line = [x.decode('utf-8') for x in line] + + #EXT_FOLDERNAME is either the first or last depending on where + #the URL falls if urlparse.urlsplit(line[-1])[0]: - externals.append(line[0]) + external = line[0] else: - externals.append(line[-1]) + external = line[-1] + + externals.append(os.path.normpath(external)) return externals -def get_svn_tool_version(): - _, data = _run_command(['svn', '--version', '--quiet']) - if data: - return data.strip() - else: - return '' +class SvnInfo(object): + ''' + Generic svn_info object. No has little knowledge of how to extract + information. Use cls.load to instatiate according svn version. -if __name__ == '__main__': - def entries_externals_finder(dirname): - for record in parse_dir_entries(dirname): - yield os.path.join(dirname, record) + Paths are not filesystem encoded. + ''' - for name in parse_externals(dirname): - yield os.path.join(dirname, name) + @staticmethod + def get_svn_version(): + code, data = _run_command(['svn', '--version', '--quiet']) + if code == 0 and data: + return unicode(data).strip() + else: + return unicode('') + + #svnversion return values (previous implementations return max revision) + # 4123:4168 mixed revision working copy + # 4168M modified working copy + # 4123S switched working copy + # 4123:4168MS mixed revision, modified, switched working copy + revision_re = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I) + + @classmethod + def load(cls, dirname=''): + code, data = _run_command(['svn', 'info', os.path.normpath(dirname)]) + svn_version = tuple(cls.get_svn_version().split('.')) + base_svn_version = tuple(int(x) for x in svn_version[:2]) + if code and base_svn_version: + #Not an SVN repository or compatible one + return SvnInfo(dirname) + elif base_svn_version < (1, 3): + log.warn('Insufficent version of SVN found') + return SvnInfo(dirname) + elif base_svn_version < (1, 5): + return Svn13Info(dirname) + else: + return Svn15Info(dirname) + + def __init__(self, path=''): + self.path = path + self._entries = None + self._externals = None + + def get_revision(self): + 'Retrieve the directory revision informatino using svnversion' + code, data = _run_command(['svnversion', '-c', self.path]) + if code: + log.warn("svnversion failed") + return 0 - for name in entries_externals_finder(sys.argv[1]): + parsed = self.revision_re.match(data) + if parsed: + return int(parsed.group(2)) + else: + return 0 + + @property + def entries(self): + if self._entries is None: + self._entries = self.get_entries() + return self._entries + + @property + def externals(self): + if self._externals is None: + self._externals = self.get_externals() + return self._externals + + def iter_externals(self): + ''' + Iterate over the svn:external references in the repository path. + ''' + for item in self.externals: + yield item + + def iter_files(self): + ''' + Iterate over the non-deleted file entries in the repository path + ''' + for item, kind in self.entries: + if kind.lower()=='file': + yield item + + def iter_dirs(self, include_root=True): + ''' + Iterate over the non-deleted file entries in the repository path + ''' + if include_root: + yield self.path + for item, kind in self.entries: + if kind.lower()=='dir': + yield item + + def get_entries(self): + return [] + + def get_externals(self): + return [] + +class Svn13Info(SvnInfo): + def get_entries(self): + code, data = _run_command(['svn', 'info', '-R', '--xml', self.path]) + + if code: + log.debug("svn info failed") + return [] + + return parse_dir_entries(data) + + def get_externals(self): + #Previous to 1.5 --xml was not supported for svn propget and the -R + #output format breaks the shlex compatible semantics. + cmd = ['svn', 'propget', 'svn:externals'] + result = [] + for folder in self.iter_dirs(): + code, lines = _run_command(cmd + [folder]) + if code != 0: + log.warn("svn propget failed") + return [] + for external in parse_external_prop(lines): + if folder: + external = os.path.join(folder, external) + result.append(os.path.normpath(external)) + + return result + + +class Svn15Info(Svn13Info): + def get_externals(self): + cmd = ['svn', 'propget', 'svn:externals', self.path, '-R', '--xml'] + code, lines = _run_command(cmd) + if code: + log.debug("svn propget failed") + return [] + return parse_externals_xml(lines, prefix=os.path.abspath(self.path)) + + +def svn_finder(dirname=''): + #combined externals due to common interface + #combined externals and entries due to lack of dir_props in 1.7 + info = SvnInfo.load(dirname) + for path in info.iter_files(): + yield fsencode(path) + + for path in info.iter_externals(): + sub_info = SvnInfo.load(path) + for sub_path in sub_info.iter_files(): + yield fsencode(sub_path) + +if __name__ == '__main__': + for name in svn_finder(sys.argv[1]): print(name) \ No newline at end of file diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py new file mode 100644 index 0000000000..7c754b8e8c --- /dev/null +++ b/setuptools/tests/environment.py @@ -0,0 +1,104 @@ +import os +import zipfile +import sys +import tempfile +import unittest +import shutil +import stat + + +def _extract(self, member, path=None, pwd=None): + """for zipfile py2.5 borrowed from cpython""" + if not isinstance(member, zipfile.ZipInfo): + member = self.getinfo(member) + + if path is None: + path = os.getcwd() + + return _extract_member(self, member, path, pwd) + + +def _extract_from_zip(self, name, dest_path): + dest_file = open(dest_path, 'wb') + try: + dest_file.write(self.read(name)) + finally: + dest_file.close() + +def _extract_member(self, member, targetpath, pwd): + """for zipfile py2.5 borrowed from cpython""" + # build the destination pathname, replacing + # forward slashes to platform specific separators. + # Strip trailing path separator, unless it represents the root. + if (targetpath[-1:] in (os.path.sep, os.path.altsep) + and len(os.path.splitdrive(targetpath)[1]) > 1): + targetpath = targetpath[:-1] + + # don't include leading "/" from file name if present + if member.filename[0] == '/': + targetpath = os.path.join(targetpath, member.filename[1:]) + else: + targetpath = os.path.join(targetpath, member.filename) + + targetpath = os.path.normpath(targetpath) + + # Create all upper directories if necessary. + upperdirs = os.path.dirname(targetpath) + if upperdirs and not os.path.exists(upperdirs): + os.makedirs(upperdirs) + + if member.filename[-1] == '/': + if not os.path.isdir(targetpath): + os.mkdir(targetpath) + return targetpath + + _extract_from_zip(self, member.filename, targetpath) + + return targetpath + + +def _remove_dir(target): + + #on windows this seems to a problem + for dir_path, dirs, files in os.walk(target): + os.chmod(dir_path, stat.S_IWRITE) + for filename in files: + os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE) + shutil.rmtree(target) + + +class ZippedEnvironment(unittest.TestCase): + + datafile = None + dataname = None + old_cwd = None + + def setUp(self): + if not os.path.isfile(self.datafile): + self.old_cwd = None + return + + self.old_cwd = os.getcwd() + + self.temp_dir = tempfile.mkdtemp() + zip_file, source, target = [None, None, None] + try: + zip_file = zipfile.ZipFile(self.datafile) + for files in zip_file.namelist(): + _extract(zip_file, files, self.temp_dir) + finally: + if zip_file: + zip_file.close() + del zip_file + + os.chdir(os.path.join(self.temp_dir, self.dataname)) + + def tearDown(self): + try: + if self.old_cwd: + os.chdir(self.old_cwd) + _remove_dir(self.temp_dir) + except OSError: + #sigh? + pass + diff --git a/setuptools/tests/svn_data/svn13_example.zip b/setuptools/tests/svn_data/svn13_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..d85fb84f2ba03bc03ab2386b40e244924c614d36 GIT binary patch literal 48818 zcmdU21zZ)|)<*>|rJy2Valk@U8si!W3IGd) zg(#xfiDLWB%weA$GiS~W_x;|x-+8}t7jxg8{a?M--m_;PH|JW)I!g4%!t0F#^GDS` z>QXdvVyLC{DF4YmA>qOP=5BKT+Xk%v){MGUc7v)?J8JNOT^IEVq5i|S)K|iN!;q85WBK`N|TdL2t&~|zp=dx6z-G0l0duu5vHIj2{XjDXyf8=`4%MlMG+Q;7w-f^UPk3OniDX|yK z%gPokNO12zB*UT4-Jh}AYsWnC3f>j7wfuUqb#8I4|MUHIewL_@0Y(&;YVE<;kzt(g#XJ!@f|`KP;m^gCZ*qiLqR?@n%^@yv9Ot9*wbTfT{!S;^r>+hZZs$;S1E{FGa)>8`od4^E*{%l@j>tAv%QV$%{^}I^Sfwv z^dSxB9y6RLFPrx?DXpI2aJ9>w+x|AOzB+njO7z^Ac(oc0P14(raCg~erF-jcpGF!w ze*)F|w(mT-yU*0DYdt$Xa(%XY>*h|c-&J1x_3CO$em}nzuT8q?9Y}I&Gq7L$i!noP zg1td`^(aw;~ocmf0nU!s>bin^U}IT{FqX?eIso?Xn9@LR*h;>W~09b+~x}i ziwNgexx_>!7k>+HJ;2{z|+tWPE+x}2G0xM;UiP$$R1 zhvMB2X$0*Iwkay>YSn67vk?{Q?}|1$oiELa^*vCob!GDb$x!0}cdzT3hxXb|(fU5M z7SxBiun>y!pB%*`Bt|f)4cbz-Ww|p<|H#m&{PcAz=~z zl7Q$?V@VyxLegPLj?5Je8x=NcjDN6y6dW0fM<#SVIfI3S%Pht=w2}Oqg!qXZgGW)A zxUVQFk+Sn3L$yL_$$V%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`xwLUK^hiaC4v4#x3zcO6^hJW zBq7BF*HBz`BMCK4PxP93D1?RU0;pGk-4%ceF>+T~mY^l}7XuCBiL*snba*DCZ<6vU z0_vYu#7SY?;H41=52z3&bi$NS(^HWCIe$S0H3um;xP}T~KWc=YK%2u`F(=RnC^T?7 zl0s-jPFT}Rp%S=T1E6<6<>?`&l}8#HL0fr_;+w=pGU&A%LtBtC9<=yx={w{Upw-~(zF0*y<)Q5ZD8?*Vw+ z_qZj;-y(Y{44$hu1hSHpFXrHxDYV+H2Pw2V7ch{Lq*7p5+tG-F&x<7#@MK + + +file:///C:/development/svn_example/repos/svn13/main + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +normal +2013-07-13T15:33:23.187500Z + + +ptt +2013-07-13T15:33:28.359375Z + + + +file:///C:/development/svn_example/repos/svn13/main/a%20file + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +normal +2013-07-13T15:33:21.109375Z +a6166e5e98a5a503089cde9bc8031293 + + +ptt +2013-07-13T15:33:21.312500Z + + + +file:///C:/development/svn_example/repos/svn13/main/to_delete + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +delete +2013-07-13T15:33:28.140625Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:33:28.359375Z + + + +file:///C:/development/svn_example/repos/svn13/main/folder + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +normal +2013-07-13T15:33:26.187500Z + + +ptt +2013-07-13T15:33:26.312500Z + + + +file:///C:/development/svn_example/repos/svn13/main/folder/quest.txt + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +normal +2013-07-13T15:33:20.109375Z +795240c6a830c14f83961e57e07dad12 + + +ptt +2013-07-13T15:33:20.312500Z + + + +file:///C:/development/svn_example/repos/svn13/main/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn13/main +d2996769-47b0-9946-b618-da1aa3eceda3 + + +normal +2013-07-13T15:33:19.375000Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:33:19.609375Z + + + diff --git a/setuptools/tests/svn_data/svn14_example.zip b/setuptools/tests/svn_data/svn14_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..57093c0b7cc51ace56f71c7eadb4c450c6814493 GIT binary patch literal 31077 zcmdsfd0b8T|Nl+2NQ)&)qN_qmi15>dxM z{}(Rwm%2Z6fQ(Cs>R}%oHZ>$NCL+vwh{Au{lJ#$`z@_pFG(;X?@ZnC2+#4qqQ%Mb5skiX)C*nJ_)10l zK9l#(d{q=Eag}Jd9-Y?sNz47)lTyqUXTJ%OW+iS)J6B@+@6Fi7`pNU`TpquUzjfEp zd8FP-Y3s;CBOkt5zU|uJj^i>nMw`EhPL_(GZ5p&6j*C{@(NqzMR2qpy2HdKKMM+~N zVR38yjzpE%G`l-*hFfy~=5Gr-@A)#fTNMoLI0kqi7YC+7d*I2(a=%PDx0qf{$hXpw4}42S(*9Rb&H}0 zm-W`^Cspk;EqQ)x`j!QYB3gCYJJ#K}AS*#J$@kjVb(YWD$IXgb26?9C zzCF|4e^OA!qch|DG@o7@To`+CyvdGxA)^mjuJl@c;K`-n_qH9c6rXJEd(HTc-dgXB zO>Xy0#l6G3neGVl{r2ZOk>uRc8(&^(f2JMS6u3$x>H}hJ;F)~@_)bK9+JO(ANOW>c zjE;>Ak@ji|JuedVCNi)C_l5EVk>?ltQU#dQrE$n*UcwNiVN<1aO466gtaJyL9;xi- zp$(LzKHa&MWiAa7Pn1N2QKr*F8AnFPhKVP}M;VK?X&=ajB{j0HZ&+z`@Px34Fex)K z<504s+b9?;G6wMp6+ZCq=s%(W1jUA36+zM05u~`cX{t>t zj|X4+x{uAf+a~-qt*@H1vi;)T^V&pP$Aalg_= z|Ks)GJ1Q`hG(?oCousb1YJe3#fDb!1sHu<~7vCFn%0_S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wd1HQQ*rPDwGh#dU` z1cXw2QVTJanO79|4_aVXi$b!hGnL&xKpaw{E+**;rwcy;xZG3)ol8nSY^Gc(s$4A) z8>cA}51#Yk;x^wCfXhu$FqNUiv6(n4?jJgXJzn+2nZZUFi?e^YHdl|%vxhs|&=Q`@ ze8K1goGm|?dmyTBU8$5liXKE+Rkxt=Ny)^dzCNZ#DLwf5n2bUCv@S44P$$wSiu;(8 z;J0jq$B1EC&JaO(7$SI1s)Ozm?jyftqeA3vt&BQw6EUYUFh8J=;5ic~HYMXt)kz`B z5KR?iMJOR#p{OKF;f;l=jQ|(aJwIV@(1CcQoUKSqc+Q87+rCmDHp3d| zj1Q{-N*teI2$ZoHmKKBbtK!E;CLlJq>U)k;7wdlTV5L(YTIdX#bOZSiv_mZ|F zJ)Mx=MO!&0sPs~heZ7XVJ2?nr7So4@gXgG!NseS5HR=KX=GG6(-N->GQu0AF7E{nw z!k}?xB;nvWA1rQh7l(Qs%}t7M`4mb#w-|Cl3)e|rK~#(*m4Rl;m~&E|UG7YW9BKp4 zQAd#LtV}&q{(mJv8)8m|X%3|j?=uhdDbOC^mz@;yGxPfkKQ8C+;Li{a|NVJ~TV5gz znmhMkbfLr@&z*Zr3nm7R*8#sVuGsNRvZ3@1(bzfG1nlz^iPFJ;HwK7A)2QDs7yUm= CQJJFv literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/svn14_ext_list.txt b/setuptools/tests/svn_data/svn14_ext_list.txt new file mode 100644 index 0000000000..800a09659d --- /dev/null +++ b/setuptools/tests/svn_data/svn14_ext_list.txt @@ -0,0 +1,4 @@ +third_party3 file:///C:/development/svn_example/repos/svn13/extra1 +third_party2 -r3 file:///C:/development/svn_example/repos/svn13/extra1 +third_party -r1 file:///C:/development/svn_example/repos/svn13/extra1 + diff --git a/setuptools/tests/svn_data/svn14_ext_list.xml b/setuptools/tests/svn_data/svn14_ext_list.xml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/tests/svn_data/svn14_info.xml b/setuptools/tests/svn_data/svn14_info.xml new file mode 100644 index 0000000000..a896a77f74 --- /dev/null +++ b/setuptools/tests/svn_data/svn14_info.xml @@ -0,0 +1,119 @@ + + + +file:///C:/development/svn_example/repos/svn14/main + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +normal + + +ptt +2013-07-13T15:34:14.406250Z + + + +file:///C:/development/svn_example/repos/svn14/main/a%20file + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +normal +2013-07-13T15:34:08.109375Z +a6166e5e98a5a503089cde9bc8031293 + + +ptt +2013-07-13T15:34:08.390625Z + + + +file:///C:/development/svn_example/repos/svn14/main/to_delete + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +delete +2013-07-13T15:34:14.125000Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:34:14.406250Z + + + +file:///C:/development/svn_example/repos/svn14/main/folder + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +normal + + +ptt +2013-07-13T15:34:12.390625Z + + + +file:///C:/development/svn_example/repos/svn14/main/folder/quest.txt + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +normal +2013-07-13T15:34:07.109375Z +795240c6a830c14f83961e57e07dad12 + + +ptt +2013-07-13T15:34:07.390625Z + + + +file:///C:/development/svn_example/repos/svn14/main/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn14/main +c75942e5-8b7a-354d-b1cf-73dee23fa94f + + +normal +2013-07-13T15:34:06.250000Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:34:06.531250Z + + + diff --git a/setuptools/tests/svn_data/svn15_example.zip b/setuptools/tests/svn_data/svn15_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..52a1d45bb7516bdf8acf951c5e6ccaa39c5de500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Z>>t{g^T65@)x7ZXH|bUgIDS6%LVAwu%FbZ2fAHf6 zWAzV(oyQXW0~=A+KaiXKaXL*AfXLB5KwvnY+**UFirlHVfA|^fYEhUvb$dnG{R70I zN8H5xbg@zZE;m&{Bt`0XQ*LW+ih`jGM-m(PS#kdm zsuDKFSe*Ss+{74rIQ}vG!VW_4Gvf`4q*QIYql3639sp?}RzyyjPgNXiRvHGJ{=l z$)@UtKx~v9c*TcV0Buj=BZj~k3$e5qWTqH=doE9AVid)N3-RGdXCVNPALJX(Gx>3; zM>TMMdPH_+GZ5Lt9plI2XyRxrcuwnxGY#3qCED@Y7Ew!mOp7y0XE~#Yfw>>@!$Jzd zK_QFMBeE~MnM1G0GmAl<_B^_>pM$`yQ}Av8-W?!7SuaO^g#q5nEl>`~(aJ$wIQnI^ z!R`Q2!r-kOaw=2GHaaL(l- + + +third_party3 file:///C:/development/svn_example/repos/svn15/extra2 +-r3 file:///C:/development/svn_example/repos/svn15/extra2 third_party2 +file:///C:/development/svn_example/repos/svn15/extra2@r1 third_party大介 + + + +third_party3 file:///C:/development/svn_example/repos/svn15/extra1 +-r3 file:///C:/development/svn_example/repos/svn15/extra1 third_party2 +file:///C:/development/svn_example/repos/svn15/extra1@r1 third_party大介 + + + diff --git a/setuptools/tests/svn_data/svn15_info.xml b/setuptools/tests/svn_data/svn15_info.xml new file mode 100644 index 0000000000..0b3550afb8 --- /dev/null +++ b/setuptools/tests/svn_data/svn15_info.xml @@ -0,0 +1,125 @@ + + + +file:///C:/development/svn_example/repos/svn15/main + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +normal +infinity + + +ptt +2013-07-13T15:34:49.562500Z + + + +file:///C:/development/svn_example/repos/svn15/main/a%20file + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +normal +infinity +2013-07-13T15:34:43.109375Z +a6166e5e98a5a503089cde9bc8031293 + + +ptt +2013-07-13T15:34:43.484375Z + + + +file:///C:/development/svn_example/repos/svn15/main/to_delete + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +delete +infinity +2013-07-13T15:34:49.125000Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:34:49.562500Z + + + +file:///C:/development/svn_example/repos/svn15/main/folder + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +normal +infinity + + +ptt +2013-07-13T15:34:47.515625Z + + + +file:///C:/development/svn_example/repos/svn15/main/folder/quest.txt + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +normal +infinity +2013-07-13T15:34:42.109375Z +795240c6a830c14f83961e57e07dad12 + + +ptt +2013-07-13T15:34:42.484375Z + + + +file:///C:/development/svn_example/repos/svn15/main/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn15/main +4eab6983-54fe-384b-a282-9306f52d948f + + +normal +infinity +2013-07-13T15:34:41.375000Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:34:41.734375Z + + + diff --git a/setuptools/tests/svn_data/svn16_example.zip b/setuptools/tests/svn_data/svn16_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..e886b2afde2150efda58d1f7f999e43846ac721f GIT binary patch literal 29418 zcmdsAd0b8D|G!x(p^}i2ZrLidXDOmo6k%*plGLTEy>6Q*gsjO{ld)yVz7%80k~KRi zN({1O$zUvFtKoOfxjpwh&vVW__uQI4=KH(zx;`CW=XrnD_vdq#r|-z2jhpBS$d7o; z8yD(_x<51t850+7-OFE;5D*p_DzY3Y_usZ={96m+RM`pYf?#6tf?I1%5{ZBKp7;vc zPY4o6_l%5=i0nBfAV#$Q`f-hORxRc~_8VcG-!4bbA;J96dJRLzHgkgMOrnmlih3;L+q#mvM_q=1X*l3ESaq0Ix zLD925xtK={xqmj^$3AvxCXwZnsGuv4A#N#9%Z-hLz0 zZPrL2&}Ua$6fTJti(=NV@S1*}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Zm$31`bb^qfv!QK}NZ*HHoCD4k@CA|%|cW5o#zD1<*K`*TWquLs%fcrl`9K5!1torIT1kNlCBr#^hW0{32kb_3mT_hO4!otZc|eoUaTtUAwHE7-)e@E=SNsO#0v6R-ymN_b%Zg z26+Y~oA>d2Ltl7`;|KchUO-`%`f**$Ft`ieN#zDM0+$RJe_QC dxbfTq$0LU}RV9`bq!9nLbs`?x6Ke|u{|AJ}{!0J= literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/svn16_ext_list.txt b/setuptools/tests/svn_data/svn16_ext_list.txt new file mode 100644 index 0000000000..3ca54893cf --- /dev/null +++ b/setuptools/tests/svn_data/svn16_ext_list.txt @@ -0,0 +1,4 @@ +"third party3" file:///C:/development/svn_example/repos/svn16/extra1 +'third party3b' file:///C:/development/svn_example/repos/svn16/extra1 +-r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2 +file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party diff --git a/setuptools/tests/svn_data/svn16_ext_list.xml b/setuptools/tests/svn_data/svn16_ext_list.xml new file mode 100644 index 0000000000..8ddaed0a19 --- /dev/null +++ b/setuptools/tests/svn_data/svn16_ext_list.xml @@ -0,0 +1,19 @@ + + + +"third party3" file:///C:/development/svn_example/repos/svn16/extra2 +-r3 file:///C:/development/svn_example/repos/svn16/extra2 third\ party2 +file:///C:/development/svn_example/repos/svn16/extra2@r1 third_party大介 + + + +"third party3" file:///C:/development/svn_example/repos/svn16/extra1 +-r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2 +file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介 + + + diff --git a/setuptools/tests/svn_data/svn16_info.xml b/setuptools/tests/svn_data/svn16_info.xml new file mode 100644 index 0000000000..745469c958 --- /dev/null +++ b/setuptools/tests/svn_data/svn16_info.xml @@ -0,0 +1,125 @@ + + + +file:///C:/development/svn_example/repos/svn16/main + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +normal +infinity + + +ptt +2013-07-13T15:35:17.390625Z + + + +file:///C:/development/svn_example/repos/svn16/main/a%20file + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +normal +infinity +2013-07-13T15:35:14.578125Z +a6166e5e98a5a503089cde9bc8031293 + + +ptt +2013-07-13T15:35:14.906250Z + + + +file:///C:/development/svn_example/repos/svn16/main/to_delete + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +delete +infinity +2013-07-13T15:35:17.046875Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:35:17.390625Z + + + +file:///C:/development/svn_example/repos/svn16/main/folder + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +normal +infinity + + +ptt +2013-07-13T15:35:16.406250Z + + + +file:///C:/development/svn_example/repos/svn16/main/folder/quest.txt + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +normal +infinity +2013-07-13T15:35:14.078125Z +795240c6a830c14f83961e57e07dad12 + + +ptt +2013-07-13T15:35:14.421875Z + + + +file:///C:/development/svn_example/repos/svn16/main/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn16/main +bd8d2cfc-1a74-de45-b166-262010c17c0a + + +normal +infinity +2013-07-13T15:35:12.171875Z +d41d8cd98f00b204e9800998ecf8427e + + +ptt +2013-07-13T15:35:13.906250Z + + + diff --git a/setuptools/tests/svn_data/svn17_example.zip b/setuptools/tests/svn_data/svn17_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..ba0e8823fe5849788881274d87ba878a6e52d43c GIT binary patch literal 46954 zcmd?R1ymf_*7uDB2_D>n6M{=)jRtoK8Z)aw23eRfx!I{R09m$DrEJzSW(mxJ1l==V3j{D*P3&)J5Z z=Q-Hb(Av%l%&PnkKa2B+&$2*GzZ;-@m$QM2&uuA8!$beN+lc?%0BqxEZw_`~=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os/svn16/extra1 third\ party2 +file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介 + + + +"third party3" file:///C:/development/svn_example/repos/svn17/extra2 +-r3 file:///C:/development/svn_example/repos/svn17/extra2 third\ party2 +file:///C:/development/svn_example/repos/svn17/extra2@r1 third_party大介 + + + diff --git a/setuptools/tests/svn_data/svn17_info.xml b/setuptools/tests/svn_data/svn17_info.xml new file mode 100644 index 0000000000..6cffeffd2e --- /dev/null +++ b/setuptools/tests/svn_data/svn17_info.xml @@ -0,0 +1,130 @@ + + + +file:///C:/development/svn_example/repos/svn17/main + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +normal +infinity + + +ptt +2013-07-13T15:35:36.171875Z + + + +file:///C:/development/svn_example/repos/svn17/main/folder + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +normal +infinity + + +ptt +2013-07-13T15:35:34.859375Z + + + +file:///C:/development/svn_example/repos/svn17/main/folder/quest.txt + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +normal +infinity +2013-07-13T15:35:32.812500Z +bc80eba9e7a10c0a571a4678c520bc9683f3bac2 + + +ptt +2013-07-13T15:35:33.109375Z + + + +file:///C:/development/svn_example/repos/svn17/main/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +normal +infinity +2013-07-13T15:35:32.343750Z +da39a3ee5e6b4b0d3255bfef95601890afd80709 + + +ptt +2013-07-13T15:35:32.687500Z + + + +file:///C:/development/svn_example/repos/svn17/main/a%20file + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +normal +infinity +2013-07-13T15:35:33.187500Z +43785ab4b1816b49f242990883292813cd4f486c + + +ptt +2013-07-13T15:35:33.515625Z + + + +file:///C:/development/svn_example/repos/svn17/main/to_delete + +file:///C:/development/svn_example/repos/svn17/main +5ba45434-5197-164e-afab-81923f4744f5 + + +C:/development/svn_example/svn17_example +delete +infinity +da39a3ee5e6b4b0d3255bfef95601890afd80709 + + +ptt +2013-07-13T15:35:36.171875Z + + + diff --git a/setuptools/tests/svn_data/svn18_example.zip b/setuptools/tests/svn_data/svn18_example.zip new file mode 100644 index 0000000000000000000000000000000000000000..4362f8e9ea7416ab16ac73f9e49aae8374ccce06 GIT binary patch literal 47477 zcmd?R1#nzRvbHToiXT2uRWIehA<#jdAHJ%GqCcMe@(U68*V)yMgDTgUA-$u+PY^)p{MrNjFJRF?NEZjWIhGr(*%v{VozefJ|&j0pz-3kl% zzW+E-esq2pTZbPZK3^G_AEWD&%=Dz)^RS8m0m1%rBR6A46Qe_2O$$B=?5uwBG#ieR znH7%d`4aP-9hH3SMF6|CZzKSAC<#-DLWZM>uXe<WcGF6|2u#~jZb-#@a?}RB2)X1@{Vj&{6BeW{AXs2s` z7#_x`qN2}88p`tCzF6-N&CJppG(G33U>5T7B%vA}9@!j5U7+rM?=kiflZvh;PML;w zAd(}m0rhLdIXp>R8;yc#gFgc9#&@pU?JBClt>W2iYO6wN<^CPTZwz7NIr(N-BbZA4 z84PCdx9{gXQ1>Sny`Nx2cV%VJ&l{@F%ot@1ZXATD@UgyAz>~FPn=FE}2`a)Uw4E!k zylm}Ww1k(dx_#dbOm%)qHr}V|F3$Jdnq^a|YdB@$a-W#_j3;h%bRtGw8IyIg3)Uu( zsqo)%^J^!6NI8Z2dV{LNP$T52%W4CkUQAnb19OJHJd1VrJ`}dzv1WKeam>|2C*8)U zO7gAH%DOV)nol@DT z-mdbdS>5_25skomChO_M56Z(Ptb59|sB-zTv2nP)vGQ6BQV#r@ial(vX$HRCX8O%h zAza0gQ?V6PqDJOA@M89xz}#;oq(+c$s`3|nHbJfTX1wt4F*uk|DGF0hl!K)=H%gJF zLDP=P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`C> z2`+qj&}Eh)eYX2=R0c1JwA0#}I_3n#s%OnU+=z`+5rPV(n0m)LPx zi9)YkSSGs$agY?LNhmJdfRtCp#Z9h}a9|ssE_W>%5PI?*xiajs)whl7(lMF@DIv)4 zh3%GAAS1?f5EMy~(uTV0>7{O?{f5m|GX{p)Mar!9F7CF_m@e SiGZIY@ZTw5Rh`5K-TGgxyk=Yg literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/svn18_ext_list.txt b/setuptools/tests/svn_data/svn18_ext_list.txt new file mode 100644 index 0000000000..c90a5f1137 --- /dev/null +++ b/setuptools/tests/svn_data/svn18_ext_list.txt @@ -0,0 +1,4 @@ +"third party3" file:///C:/development/svn_example/repos/svn18/extra1 +'third party3b' file:///C:/development/svn_example/repos/svn18/extra1 +-r3 file:///C:/development/svn_example/repos/svn18/extra1 third\ party2 +file:///C:/development/svn_example/repos/svn18/extra1@r1 third_party diff --git a/setuptools/tests/svn_data/svn18_ext_list.xml b/setuptools/tests/svn_data/svn18_ext_list.xml new file mode 100644 index 0000000000..9b5e9e96fa --- /dev/null +++ b/setuptools/tests/svn_data/svn18_ext_list.xml @@ -0,0 +1,19 @@ + + + +"third party3" file:///C:/development/svn_example/repos/svn16/extra1 +-r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2 +file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介 + + + +"third party3" file:///C:/development/svn_example/repos/svn18/extra2 +-r3 file:///C:/development/svn_example/repos/svn18/extra2 third\ party2 +file:///C:/development/svn_example/repos/svn18/extra2@r1 third_party大介 + + + diff --git a/setuptools/tests/svn_data/svn18_info.xml b/setuptools/tests/svn_data/svn18_info.xml new file mode 100644 index 0000000000..7ca55995d0 --- /dev/null +++ b/setuptools/tests/svn_data/svn18_info.xml @@ -0,0 +1,136 @@ + + + +file:///C:/development/svn_example/repos/svn18/main +^/ + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +normal +infinity + + +ptt +2013-07-13T15:35:57.796875Z + + + +file:///C:/development/svn_example/repos/svn18/main/a%20file +^/a%20file + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +normal +infinity +2013-07-13T15:35:54.906250Z +43785ab4b1816b49f242990883292813cd4f486c + + +ptt +2013-07-13T15:35:55.265625Z + + + +file:///C:/development/svn_example/repos/svn18/main/to_delete +^/to_delete + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +delete +infinity +da39a3ee5e6b4b0d3255bfef95601890afd80709 + + +ptt +2013-07-13T15:35:57.796875Z + + + +file:///C:/development/svn_example/repos/svn18/main/folder +^/folder + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +normal +infinity + + +ptt +2013-07-13T15:35:56.750000Z + + + +file:///C:/development/svn_example/repos/svn18/main/folder/quest.txt +^/folder/quest.txt + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +normal +infinity +2013-07-13T15:35:54.484375Z +bc80eba9e7a10c0a571a4678c520bc9683f3bac2 + + +ptt +2013-07-13T15:35:54.843750Z + + + +file:///C:/development/svn_example/repos/svn18/main/folder/lalala.txt +^/folder/lalala.txt + +file:///C:/development/svn_example/repos/svn18/main +3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9 + + +C:/development/svn_example/svn18_example +normal +infinity +2013-07-13T15:35:54.015625Z +da39a3ee5e6b4b0d3255bfef95601890afd80709 + + +ptt +2013-07-13T15:35:54.375000Z + + + diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index f26a1f5191..95667b696a 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,10 +1,12 @@ import os +import sys import tempfile import shutil import unittest import pkg_resources from setuptools.command import egg_info +from setuptools import svn_utils ENTRIES_V10 = pkg_resources.resource_string(__name__, 'entries-v10') "An entries file generated with svn 1.6.17 against the legacy Setuptools repo" @@ -31,6 +33,17 @@ def _write_entries(self, entries): def test_version_10_format(self): """ """ + #keeping this set for 1.6 is a good check on the get_svn_revision + #to ensure I return using svnversion what would had been returned + version_str = svn_utils.SvnInfo.get_svn_version() + version = [int(x) for x in version_str.split('.')[:2]] + if version != [1,6]: + if hasattr(self, 'skipTest'): + self.skipTest('') + else: + sys.stderr.write('\n Skipping due to SVN Version\n') + return + self._write_entries(ENTRIES_V10) rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '89000') diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 438f7cedbd..8d6aff1969 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -8,12 +8,14 @@ import tempfile import unittest import unicodedata +from setuptools.tests import environment from setuptools.compat import StringIO, unicode -from setuptools.command.sdist import sdist +from setuptools.command.sdist import sdist, walk_revctrl from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution - +from setuptools import svn_utils +from setuptools.svn_utils import fsencode SETUP_ATTRS = { 'name': 'sdist_test', @@ -395,6 +397,64 @@ def test_sdist_with_latin1_encoded_filename(self): self.assertTrue(filename in cmd.filelist.files) +class TestSvn(environment.ZippedEnvironment): + + def setUp(self): + version = svn_utils.SvnInfo.get_svn_version() + self.base_version = tuple([int(x) for x in version.split('.')][:2]) + + if not self.base_version: + raise ValueError('No SVN tools installed') + elif self.base_version < (1,3): + raise ValueError('Insufficient SVN Version %s' % version) + elif self.base_version >= (1,9): + #trying the latest version + self.base_version = (1,8) + + self.dataname = "svn%i%i_example" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvn, self).setUp() + + def test_walksvn(self): + if self.base_version >= (1,6): + folder2 = 'third party2' + folder3 = 'third party3' + else: + folder2 = 'third_party2' + folder3 = 'third_party3' + + #TODO is this right + expected = set([ + os.path.join('a file'), + os.path.join(folder2, 'Changes.txt'), + os.path.join(folder2, 'MD5SUMS'), + os.path.join(folder2, 'README.txt'), + os.path.join(folder3, 'Changes.txt'), + os.path.join(folder3, 'MD5SUMS'), + os.path.join(folder3, 'README.txt'), + os.path.join(folder3, 'TODO.txt'), + os.path.join(folder3, 'fin'), + os.path.join('third_party', 'README.txt'), + os.path.join('folder', folder2, 'Changes.txt'), + os.path.join('folder', folder2, 'MD5SUMS'), + os.path.join('folder', folder2, 'WatashiNiYomimasu.txt'), + os.path.join( 'folder', folder3, 'Changes.txt'), + os.path.join('folder', folder3, 'fin'), + os.path.join('folder', folder3, 'MD5SUMS'), + os.path.join('folder', folder3, 'oops'), + os.path.join('folder', folder3, 'WatashiNiYomimasu.txt'), + os.path.join('folder', folder3, 'ZuMachen.txt'), + os.path.join('folder', 'third_party', 'WatashiNiYomimasu.txt'), + os.path.join('folder', 'lalala.txt'), + os.path.join('folder', 'quest.txt'), + #The example will have a deleted file (or should) but shouldn't return it + ]) + expected = set(fsencode(x) for x in expected) + self.assertEqual(set(x for x in walk_revctrl()), expected) + + + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 6036f85c80..4a6e7effab 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -3,77 +3,20 @@ import os -import zipfile import sys -import tempfile import unittest -import shutil -import stat +import codecs +from setuptools.tests import environment +from setuptools.svn_utils import fsencode +from setuptools.compat import unicode, unichr from setuptools import svn_utils -from setuptools.command import egg_info -from setuptools.command import sdist #requires python >= 2.4 from subprocess import call as _call -def _extract(self, member, path=None, pwd=None): - """for zipfile py2.5 borrowed from cpython""" - if not isinstance(member, zipfile.ZipInfo): - member = self.getinfo(member) +from distutils import log - if path is None: - path = os.getcwd() - - return _extract_member(self, member, path, pwd) - -def _extract_from_zip(self, name, dest_path): - dest_file = open(dest_path, 'wb') - try: - dest_file.write(self.read(name)) - finally: - dest_file.close() - -def _extract_member(self, member, targetpath, pwd): - """for zipfile py2.5 borrowed from cpython""" - # build the destination pathname, replacing - # forward slashes to platform specific separators. - # Strip trailing path separator, unless it represents the root. - if (targetpath[-1:] in (os.path.sep, os.path.altsep) - and len(os.path.splitdrive(targetpath)[1]) > 1): - targetpath = targetpath[:-1] - - # don't include leading "/" from file name if present - if member.filename[0] == '/': - targetpath = os.path.join(targetpath, member.filename[1:]) - else: - targetpath = os.path.join(targetpath, member.filename) - - targetpath = os.path.normpath(targetpath) - - # Create all upper directories if necessary. - upperdirs = os.path.dirname(targetpath) - if upperdirs and not os.path.exists(upperdirs): - os.makedirs(upperdirs) - - if member.filename[-1] == '/': - if not os.path.isdir(targetpath): - os.mkdir(targetpath) - return targetpath - - _extract_from_zip(self, member.filename, targetpath) - - return targetpath - - -def _remove_dir(target): - - #on windows this seems to a problem - for dir_path, dirs, files in os.walk(target): - os.chmod(dir_path, stat.S_IWRITE) - for filename in files: - os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE) - shutil.rmtree(target) class TestSvnVersion(unittest.TestCase): @@ -90,81 +33,207 @@ def test_no_svn_found(self): old_path = os.environ[path_variable] os.environ[path_variable] = '' try: - version = svn_utils.get_svn_tool_version() + version = svn_utils.SvnInfo.get_svn_version() self.assertEqual(version, '') finally: os.environ[path_variable] = old_path def test_svn_should_exist(self): - version = svn_utils.get_svn_tool_version() + version = svn_utils.SvnInfo.get_svn_version() self.assertNotEqual(version, '') +def _read_utf8_file(path): + fileobj = None + try: + fileobj = codecs.open(path, 'r', 'utf-8') + data = fileobj.read() + return data + finally: + if fileobj: + fileobj.close() -class TestSvn_1_7(unittest.TestCase): - def setUp(self): - version = svn_utils.get_svn_tool_version() - ver_list = [int(x) for x in version.split('.')] - if ver_list < [1,7,0]: - self.version_err = 'Insufficent Subversion (%s)' % version +class ParserInfoXML(unittest.TestCase): + + def parse_tester(self, svn_name, ext_spaces): + path = os.path.join('setuptools', 'tests', + 'svn_data', svn_name + '_info.xml') + #Remember these are pre-generated to test XML parsing + # so these paths might not valid on your system + example_base = "%s_example" % svn_name + + data = _read_utf8_file(path) + + if ext_spaces: + folder2 = 'third party2' + folder3 = 'third party3' else: - self.version_err = None + folder2 = 'third_party2' + folder3 = 'third_party3' + expected = set([ + ("\\".join((example_base, 'a file')), 'file'), + ("\\".join((example_base, 'folder')), 'dir'), + ("\\".join((example_base, 'folder', 'lalala.txt')), 'file'), + ("\\".join((example_base, 'folder', 'quest.txt')), 'file'), + ]) + self.assertEqual(set(x for x in svn_utils.parse_dir_entries(data)), + expected) - self.temp_dir = tempfile.mkdtemp() - zip_file, source, target = [None, None, None] - try: - zip_file = zipfile.ZipFile(os.path.join('setuptools', 'tests', - 'svn17_example.zip')) - for files in zip_file.namelist(): - _extract(zip_file, files, self.temp_dir) - finally: - if zip_file: - zip_file.close() - del zip_file + def test_svn13(self): + self.parse_tester('svn13', False) - self.old_cwd = os.getcwd() - os.chdir(os.path.join(self.temp_dir, 'svn17_example')) + def test_svn14(self): + self.parse_tester('svn14', False) - def tearDown(self): - try: - os.chdir(self.old_cwd) - _remove_dir(self.temp_dir) - except OSError: - #sigh? - pass - - def _chk_skip(self): - if self.version_err is not None: - if hasattr(self, 'skipTest'): - self.skipTest(self.version_err) - else: - sys.stderr.write(self.version_error + "\n") - return True - return False - - def test_egg_info(self): - if self._chk_skip: - return - - rev = egg_info.egg_info.get_svn_revision() - self.assertEqual(rev, '4') - - def test_iterator(self): - if self._chk_skip: - return + def test_svn15(self): + self.parse_tester('svn15', False) + + def test_svn16(self): + self.parse_tester('svn16', True) + + def test_svn17(self): + self.parse_tester('svn17', True) + + def test_svn18(self): + self.parse_tester('svn18', True) + +class ParserExternalXML(unittest.TestCase): + + def parse_tester(self, svn_name, ext_spaces): + path = os.path.join('setuptools', 'tests', + 'svn_data', svn_name + '_ext_list.xml') + example_base = svn_name + '_example' + data = _read_utf8_file(path) + + if ext_spaces: + folder2 = 'third party2' + folder3 = 'third party3' + else: + folder2 = 'third_party2' + folder3 = 'third_party3' expected = set([ - os.path.join('.', 'readme.txt'), - os.path.join('.', 'other'), - os.path.join('.', 'third_party'), - os.path.join('.', 'third_party2'), - os.path.join('.', 'third_party3'), + "\\".join((example_base, folder2)), + "\\".join((example_base, folder3)), + #third_party大介 + "\\".join((example_base, + unicode('third_party') + + unichr(0x5927) + unichr(0x4ecb))), + "\\".join((example_base, 'folder', folder2)), + "\\".join((example_base, 'folder', folder3)), + "\\".join((example_base, 'folder', + unicode('third_party') + + unichr(0x5927) + unichr(0x4ecb))), ]) - self.assertEqual(set(x for x - in sdist.entries_externals_finder('.', '')), + + dir_base = r'c:\development\svn_example' + self.assertEqual(set(x for x \ + in svn_utils.parse_externals_xml(data, dir_base)), expected) + + def test_svn15(self): + self.parse_tester('svn15', False) + + def test_svn16(self): + self.parse_tester('svn16', True) + + def test_svn17(self): + self.parse_tester('svn17', True) + + def test_svn18(self): + self.parse_tester('svn18', True) + + +class ParseExternal(unittest.TestCase): + + def parse_tester(self, svn_name, ext_spaces): + path = os.path.join('setuptools', 'tests', + 'svn_data', svn_name + '_ext_list.txt') + example_base = svn_name + '_example' + data = _read_utf8_file(path) + + if ext_spaces: + expected = set(['third party2', 'third party3', + 'third party3b', 'third_party']) + else: + expected = set(['third_party2', 'third_party3', 'third_party']) + + self.assertEqual(set(x for x in svn_utils.parse_external_prop(data)), expected) + def test_svn13(self): + self.parse_tester('svn13', False) + + def test_svn14(self): + self.parse_tester('svn14', False) + + def test_svn15(self): + self.parse_tester('svn15', False) + + def test_svn16(self): + self.parse_tester('svn16', True) + + def test_svn17(self): + self.parse_tester('svn17', True) + + def test_svn18(self): + self.parse_tester('svn18', True) + + +class TestSvn(environment.ZippedEnvironment): + + def setUp(self): + version = svn_utils.SvnInfo.get_svn_version() + self.base_version = tuple([int(x) for x in version.split('.')[:2]]) + + if not self.base_version: + raise ValueError('No SVN tools installed') + elif self.base_version < (1,3): + raise ValueError('Insufficient SVN Version %s' % version) + elif self.base_version >= (1,9): + #trying the latest version + self.base_version = (1,8) + + self.dataname = "svn%i%i_example" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvn, self).setUp() + + def test_revision(self): + rev = svn_utils.SvnInfo.load('.').get_revision() + self.assertEqual(rev, 6) + + def test_entries(self): + expected = set([ + (os.path.join('a file'), 'file'), + (os.path.join('folder'), 'dir'), + (os.path.join('folder', 'lalala.txt'), 'file'), + (os.path.join('folder', 'quest.txt'), 'file'), + #The example will have a deleted file (or should) + #but shouldn't return it + ]) + info = svn_utils.SvnInfo.load('.') + self.assertEqual(set(x for x in info.entries), expected) + + def test_externals(self): + if self.base_version >= (1,6): + folder2 = 'third party2' + folder3 = 'third party3' + else: + folder2 = 'third_party2' + folder3 = 'third_party3' + + expected = set([ + os.path.join(folder2), + os.path.join(folder3), + os.path.join('third_party'), + os.path.join('folder', folder2), + os.path.join('folder', folder3), + os.path.join('folder', 'third_party'), + ]) + info = svn_utils.SvnInfo.load('.') + self.assertEqual(set([x for x in info.externals]), expected) + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 37c48a4da11b40a5a8a3c801525b637bb2934df1 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 20 Jul 2013 18:06:14 -0500 Subject: [PATCH 1387/8469] using git for travis-ci.org --HG-- extra : rebase_source : 88756de63c01ff057d8e6deebb0682c68feebd7f --- .hgignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgignore b/.hgignore index 56be0c948c..13367726df 100644 --- a/.hgignore +++ b/.hgignore @@ -13,3 +13,5 @@ include \.Python *.swp CHANGES (links).txt +.git2 +.gitignore From 469a541cb5fca1a161fdc888679c1868870c5c8e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 20 Jul 2013 19:15:23 -0500 Subject: [PATCH 1388/8469] Tweaks to get everything to pass again. --HG-- extra : rebase_source : 352b6baf81e891d13f7310bbeb94d2cfce9dbad8 --- setuptools/svn_utils.py | 4 ++++ setuptools/tests/test_svn.py | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 09aa5e25c8..17b211d7c1 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -121,6 +121,7 @@ def parse_dir_entries(decoded_str): def parse_externals_xml(decoded_str, prefix=''): '''Parse a propget svn:externals xml''' prefix = os.path.normpath(prefix) + prefix = os.path.normcase(prefix) doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str)) externals = list() @@ -129,6 +130,9 @@ def parse_externals_xml(decoded_str, prefix=''): if event == 'START_ELEMENT' and node.nodeName == 'target': doc.expandNode(node) path = os.path.normpath(node.getAttribute('path')) + log.warn('') + log.warn('PRE: %s' % prefix) + log.warn('PTH: %s' % path) if os.path.normcase(path).startswith(prefix): path = path[len(prefix)+1:] diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 4a6e7effab..59ecb25b1a 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -114,20 +114,21 @@ def parse_tester(self, svn_name, ext_spaces): folder3 = 'third_party3' expected = set([ - "\\".join((example_base, folder2)), - "\\".join((example_base, folder3)), + os.sep.join((example_base, folder2)), + os.sep.join((example_base, folder3)), #third_party大介 - "\\".join((example_base, + os.sep.join((example_base, unicode('third_party') + unichr(0x5927) + unichr(0x4ecb))), - "\\".join((example_base, 'folder', folder2)), - "\\".join((example_base, 'folder', folder3)), - "\\".join((example_base, 'folder', + os.sep.join((example_base, 'folder', folder2)), + os.sep.join((example_base, 'folder', folder3)), + os.sep.join((example_base, 'folder', unicode('third_party') + unichr(0x5927) + unichr(0x4ecb))), ]) - dir_base = r'c:\development\svn_example' + expected = set(os.path.normpath(x) for x in expected) + dir_base = os.sep.join(('C:', 'development', 'svn_example')) self.assertEqual(set(x for x \ in svn_utils.parse_externals_xml(data, dir_base)), expected) From 8c645eb0c310e8ff4efe73849279ea391d25bced Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 20 Jul 2013 19:53:07 -0500 Subject: [PATCH 1389/8469] Removed extra stuff in egg_info --HG-- extra : rebase_source : 4b3cf921154e759744963b34aaf42018477deb29 --- setuptools/command/egg_info.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 3170064815..a0ba530590 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -16,8 +16,6 @@ safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename from setuptools.command.sdist import walk_revctrl -#requires python >= 2.4 -from subprocess import Popen as _Popen, PIPE as _PIPE class egg_info(Command): description = "create a distribution's .egg-info directory" From 937a7dee0b5de773f164d7e3b143113c270733eb Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 22 Jul 2013 17:32:14 +0000 Subject: [PATCH 1390/8469] package_index.py : fix hash_name --- setuptools/package_index.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 47f00c0012..b1b38f03ec 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -222,7 +222,8 @@ class HashChecker(ContentChecker): ) def __init__(self, hash_name, expected): - self.hash = hashlib.new(hash_name) + self.hash_name = hash_name + self.hash = hashlib.new(hash_name) self.expected = expected @classmethod @@ -242,23 +243,8 @@ def feed(self, block): def is_valid(self): return self.hash.hexdigest() == self.expected - def _get_hash_name(self): - """ - Python 2.4 implementation of MD5 doesn't supply a .name attribute - so provide that name. - - When Python 2.4 is no longer required, replace invocations of this - method with simply 'self.hash.name'. - """ - try: - return self.hash.name - except AttributeError: - if 'md5' in str(type(self.hash)): - return 'md5' - raise - def report(self, reporter, template): - msg = template % self._get_hash_name() + msg = template % self.hash_name return reporter(msg) From 99c854fe2766858883ef6a248462627ba137ca14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 22:19:08 +0200 Subject: [PATCH 1391/8469] Add pypy to Travis platforms --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 83efa5a439..b684935f92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,6 @@ python: - 2.7 - 3.2 - 3.3 + - pypy # command to run tests script: python setup.py test From 9caf92acf6972f283f368aa42ed186aafb28502b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 22:34:04 +0200 Subject: [PATCH 1392/8469] Update test to reflect the copy of the hash name stored because pypy doesn't implement the undocumented .name attribute on HASH objects. --- setuptools/tests/test_packageindex.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 3791914ac6..7f5dc585d3 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -169,11 +169,7 @@ def test_blank_md5(self): def test_get_hash_name_md5(self): checker = setuptools.package_index.HashChecker.from_url( 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') - if sys.version_info >= (2,5): - self.assertEqual(checker.hash.name, 'md5') - else: - # Python 2.4 compatability - self.assertEqual(checker._get_hash_name(), 'md5') + self.assertEqual(checker.hash_name, 'md5') def test_report(self): checker = setuptools.package_index.HashChecker.from_url( From 3762e907f5a0a081c79eaa571051f38c711308af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 22:54:58 +0200 Subject: [PATCH 1393/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6e993ada5c..301b718132 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.9.7 +----- + +* Issue #49: Correct AttributeError on PyPy where a hashlib.HASH object does + not have a `.name` attribute. + ----- 0.9.6 ----- From c7a99e2ccc7dedfd5beb04698abf05b216ab7460 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 22:56:01 +0200 Subject: [PATCH 1394/8469] Added tag 0.9.7 for changeset 19965a03c1d5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bb4ffc144b..8f492918f0 100644 --- a/.hgtags +++ b/.hgtags @@ -87,3 +87,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 1aef141fc968113e4c521d1edf6ea863c4ff7e00 0.9.4 88e3d6788facbb2dd6467a23c4f35529a5ce20a1 0.9.5 acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 +19965a03c1d5231c894e0fabfaf45af1fd99f484 0.9.7 From 429e83e9c0fb2b0cf4ba038dc4340367bef4e735 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 22:57:09 +0200 Subject: [PATCH 1395/8469] Bumped to 0.9.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 56 ++++++++++++++-------------- setuptools/__init__.py | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 55434eb71e..8f11fa2f16 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.7" +DEFAULT_VERSION = "0.9.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index d64b3c288e..55aa158eb7 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,11 +1,8 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - [distutils.setup_keywords] +exclude_package_data = setuptools.dist:check_package_data +packages = setuptools.dist:check_packages +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list use_2to3 = setuptools.dist:assert_bool namespace_packages = setuptools.dist:check_nsp package_data = setuptools.dist:check_package_data @@ -13,50 +10,53 @@ use_2to3_exclude_fixers = setuptools.dist:assert_string_list dependency_links = setuptools.dist:assert_string_list use_2to3_fixers = setuptools.dist:assert_string_list test_suite = setuptools.dist:check_test_suite -exclude_package_data = setuptools.dist:check_package_data -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +convert_2to3_doctests = setuptools.dist:assert_string_list include_package_data = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages +extras_require = setuptools.dist:check_extras entry_points = setuptools.dist:check_entry_points zip_safe = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements PKG-INFO = setuptools.command.egg_info:write_pkg_info eager_resources.txt = setuptools.command.egg_info:overwrite_arg namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -requires.txt = setuptools.command.egg_info:write_requirements [distutils.commands] -test = setuptools.command.test:test -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist develop = setuptools.command.develop:develop bdist_egg = setuptools.command.bdist_egg:bdist_egg setopt = setuptools.command.setopt:setopt egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext -upload_docs = setuptools.command.upload_docs:upload_docs -easy_install = setuptools.command.easy_install:easy_install +test = setuptools.command.test:test install = setuptools.command.install:install install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_lib = setuptools.command.install_lib:install_lib -rotate = setuptools.command.rotate:rotate +upload_docs = setuptools.command.upload_docs:upload_docs saveopts = setuptools.command.saveopts:saveopts +alias = setuptools.command.alias:alias install_scripts = setuptools.command.install_scripts:install_scripts build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist +easy_install = setuptools.command.easy_install:easy_install +rotate = setuptools.command.rotate:rotate +install_lib = setuptools.command.install_lib:install_lib register = setuptools.command.register:register +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 18dd363d12..8c708bd628 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.7' +__version__ = '0.9.8' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 8fa3b1dce8af41e3fd9acbb1b2db0dd38bcfb09b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Jul 2013 23:03:43 +0200 Subject: [PATCH 1396/8469] Update changelog to reflect other minor changes included in the latest release --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 301b718132..41d5949a8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ CHANGES * Issue #49: Correct AttributeError on PyPy where a hashlib.HASH object does not have a `.name` attribute. +* Issue #34: Documentation now refers to bootstrap script in code repository + referenced by bookmark. +* Add underscore-separated keys to environment markers (markerlib). ----- 0.9.6 From a09c0b0efd3b71306b9293837850aec1887f6b98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 22:31:56 +0200 Subject: [PATCH 1397/8469] Remove unused imports --- setuptools/package_index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b1b38f03ec..88f0480919 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,6 +1,5 @@ """PyPI and direct package downloading""" -import sys, os.path, re, shutil, random, socket -import itertools +import sys, os.path, re, shutil, socket import base64 from setuptools import ssl_support from pkg_resources import * @@ -223,7 +222,7 @@ class HashChecker(ContentChecker): def __init__(self, hash_name, expected): self.hash_name = hash_name - self.hash = hashlib.new(hash_name) + self.hash = hashlib.new(hash_name) self.expected = expected @classmethod From 9505e8bf8b0ca5cf33befc3f8818cb519c74cc0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 22:33:16 +0200 Subject: [PATCH 1398/8469] Clean up imports in package_index --- setuptools/package_index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 88f0480919..76421c3b81 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,6 +1,11 @@ """PyPI and direct package downloading""" -import sys, os.path, re, shutil, socket +import sys +import os +import re +import shutil +import socket import base64 + from setuptools import ssl_support from pkg_resources import * from distutils import log From a58abed83f51c263547294fbfb57e5a44a32e5a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 22:38:26 +0200 Subject: [PATCH 1399/8469] Re-indent several function signatures to reduce linter warnings --- setuptools/package_index.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 76421c3b81..4c2e10f9f7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -109,9 +109,10 @@ def distros_for_filename(filename, metadata=None): ) -def interpret_distro_name(location, basename, metadata, - py_version=None, precedence=SOURCE_DIST, platform=None -): +def interpret_distro_name( + location, basename, metadata, py_version=None, precedence=SOURCE_DIST, + platform=None + ): """Generate alternative interpretations of a source distro name Note: if `location` is a filesystem filename, you should call @@ -255,9 +256,10 @@ def report(self, reporter, template): class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" - def __init__(self, index_url="https://pypi.python.org/simple", hosts=('*',), - ca_bundle=None, verify_ssl=True, *args, **kw - ): + def __init__( + self, index_url="https://pypi.python.org/simple", hosts=('*',), + ca_bundle=None, verify_ssl=True, *args, **kw + ): Environment.__init__(self,*args,**kw) self.index_url = index_url + "/"[:not index_url.endswith('/')] self.scanned_urls = {} @@ -378,7 +380,7 @@ def scan(link): # process an index page into the package-page index for match in HREF.finditer(page): try: - scan( urljoin(url, htmldecode(match.group(1))) ) + scan(urljoin(url, htmldecode(match.group(1)))) except ValueError: pass @@ -530,10 +532,10 @@ def download(self, spec, tmpdir): return getattr(self.fetch_distribution(spec, tmpdir),'location',None) - def fetch_distribution(self, - requirement, tmpdir, force_scan=False, source=False, develop_ok=False, - local_index=None - ): + def fetch_distribution( + self, requirement, tmpdir, force_scan=False, source=False, + develop_ok=False, local_index=None + ): """Obtain a distribution suitable for fulfilling `requirement` `requirement` must be a ``pkg_resources.Requirement`` instance. @@ -616,7 +618,8 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) - dists = match and [d for d in + dists = match and [ + d for d in interpret_distro_name(filename, match.group(1), None) if d.version ] or [] @@ -722,9 +725,11 @@ def open_url(self, url, warning=None): if warning: self.warn(warning, v.line) else: - raise DistutilsError('%s returned a bad status line. ' - 'The server might be down, %s' % \ - (url, v.line)) + raise DistutilsError( + '%s returned a bad status line. The server might be ' + 'down, %s' % + (url, v.line) + ) except httplib.HTTPException: v = sys.exc_info()[1] if warning: From 7b42936dc2dacbf91504c495b6cae569a1d88c95 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 22:40:18 +0200 Subject: [PATCH 1400/8469] Normalize whitespace in package_index.py --- setuptools/package_index.py | 79 +------------------------------------ 1 file changed, 2 insertions(+), 77 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4c2e10f9f7..9abd967950 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -403,8 +403,6 @@ def scan(link): else: return "" # no sense double-scanning non-package pages - - def need_version_info(self, url): self.scan_all( "Page at %s links to .py file(s) without version info; an index " @@ -435,17 +433,14 @@ def find_packages(self, requirement): self.scan_url(url) def obtain(self, requirement, installer=None): - self.prescan(); self.find_packages(requirement) + self.prescan() + self.find_packages(requirement) for dist in self[requirement.key]: if dist in requirement: return dist self.debug("%s does not match %s", requirement, dist) return super(PackageIndex, self).obtain(requirement,installer) - - - - def check_hash(self, checker, filename, tfp): """ checker is a ContentChecker @@ -531,7 +526,6 @@ def download(self, spec, tmpdir): ) return getattr(self.fetch_distribution(spec, tmpdir),'location',None) - def fetch_distribution( self, requirement, tmpdir, force_scan=False, source=False, develop_ok=False, local_index=None @@ -573,8 +567,6 @@ def find(req, env=None): if dist in req and (dist.precedence<=SOURCE_DIST or not source): return dist - - if force_scan: self.prescan() self.find_packages(requirement) @@ -601,7 +593,6 @@ def find(req, env=None): self.info("Best match: %s", dist) return dist.clone(location=self.download(dist.location, tmpdir)) - def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` @@ -615,7 +606,6 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): return dist.location return None - def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) dists = match and [ @@ -770,7 +760,6 @@ def _download_url(self, scheme, url, tmpdir): def scan_url(self, url): self.process_url(url, True) - def _attempt_download(self, url, filename): headers = self._download_to(url, filename) if 'html' in headers.get('content-type','').lower(): @@ -793,21 +782,6 @@ def _download_html(self, url, headers, filename): os.unlink(filename) raise DistutilsError("Unexpected HTML page found at "+url) - - - - - - - - - - - - - - - def _download_svn(self, url, filename): url = url.split('#',1)[0] # remove any fragment for svn's sake creds = '' @@ -886,18 +860,6 @@ def info(self, msg, *args): def warn(self, msg, *args): log.warn(msg, *args) - - - - - - - - - - - - # This pattern matches a character entity reference (a decimal numeric # references, a hexadecimal numeric reference, or a named reference). entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub @@ -922,20 +884,6 @@ def htmldecode(text): """Decode HTML entities in the given text.""" return entity_sub(decode_entity, text) - - - - - - - - - - - - - - def socket_timeout(timeout=15): def _socket_timeout(func): def _socket_timeout(*args, **kwargs): @@ -1004,15 +952,6 @@ def open_with_auth(url, opener=urllib2.urlopen): open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth) - - - - - - - - - def fix_sf_url(url): return url # backward compatibility @@ -1042,17 +981,3 @@ def local_open(url): return HTTPError(url, status, message, {'content-type':'text/html'}, StringIO(body)) - - - - - - - - - - - - - -# this line is a kludge to keep the trailing blank lines for pje's editor From 9a3cc1cd285136180c9b59c821a01f755ddf8874 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 22:47:05 +0200 Subject: [PATCH 1401/8469] Replace import * with explicit imports, allowing linter to detect the missing imports reported in #53. --- setuptools/package_index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9abd967950..f2ef50d8ba 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -6,8 +6,12 @@ import socket import base64 +from pkg_resources import ( + CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, + require, Environment, find_distributions, safe_name, safe_version, + to_filename, Requirement, DEVELOP_DIST, +) from setuptools import ssl_support -from pkg_resources import * from distutils import log from distutils.errors import DistutilsError from setuptools.compat import (urllib2, httplib, StringIO, HTTPError, From fd77197ba1cc95ddfd2744ff8e9953bbf9f11def Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 23:00:24 +0200 Subject: [PATCH 1402/8469] Add 'urlsplit' and 'urlunsplit' to compat module --- setuptools/compat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index e2f64de236..3a961c0e3e 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -29,7 +29,7 @@ from urllib import url2pathname import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser - from urlparse import urlparse, urlunparse, urljoin + from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit xrange = xrange filterfalse = itertools.ifilterfalse @@ -72,7 +72,10 @@ def exec_(code, globs=None, locs=None): from urllib.error import HTTPError, URLError import urllib.request as urllib2 from urllib.request import urlopen, url2pathname - from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin + from urllib.parse import ( + urlparse, urlunparse, unquote, splituser, urljoin, urlsplit, + urlunsplit, + ) xrange = range filterfalse = itertools.filterfalse From d2f68c57b5fbca47a9389c6cf3399f956a6c2aa6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 23:01:43 +0200 Subject: [PATCH 1403/8469] Import urlsplit and urlunsplit from compat module. Fixes #53. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f2ef50d8ba..26b6583c75 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -17,7 +17,7 @@ from setuptools.compat import (urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote, splituser, url2pathname, name2codepoint, - unichr, urljoin) + unichr, urljoin, urlsplit, urlunsplit) from setuptools.compat import filterfalse from fnmatch import translate from setuptools.py24compat import hashlib From 3d5510a01906bebf369cde304706ce5f52117afe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 23:03:19 +0200 Subject: [PATCH 1404/8469] Make PackageIndex._vcs_split_rev_from_url a static method (as it doesn't have any instance or class references). --- setuptools/package_index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 26b6583c75..9c9d76a186 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -806,7 +806,8 @@ def _download_svn(self, url, filename): os.system("svn checkout%s -q %s %s" % (creds, url, filename)) return filename - def _vcs_split_rev_from_url(self, url, pop_prefix=False): + @staticmethod + def _vcs_split_rev_from_url(url, pop_prefix=False): scheme, netloc, path, query, frag = urlsplit(url) scheme = scheme.split('+', 1)[-1] From 7d0d8a87e47b174e006760cc5d938c862766af60 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jul 2013 23:10:05 +0200 Subject: [PATCH 1405/8469] Add test to exercise the basic functionality of _vcs_split_rev_from_url --- setuptools/tests/test_packageindex.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 7f5dc585d3..08969b7e8c 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -142,6 +142,15 @@ def test_parse_bdist_wininst(self): self.assertEqual(setuptools.package_index.parse_bdist_wininst( 'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64')) + def test__vcs_split_rev_from_url(self): + """ + Test the basic usage of _vcs_split_rev_from_url + """ + vsrfu = setuptools.package_index.PackageIndex._vcs_split_rev_from_url + url, rev = vsrfu('https://example.com/bar@2995') + self.assertEqual(url, 'https://example.com/bar') + self.assertEqual(rev, '2995') + class TestContentCheckers(unittest.TestCase): def test_md5(self): From 5b54c7a2e277685dd7d2c88ddf36ce0c0106b343 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Jul 2013 10:26:18 +0200 Subject: [PATCH 1406/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 41d5949a8b..34bdf6510f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.9.8 +----- + +* Issue #53: Fix NameErrors in `_vcs_split_rev_from_url`. + ----- 0.9.7 ----- From 9dcc92c2c65b80ce6f7a101af327af109f77324f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Jul 2013 10:28:04 +0200 Subject: [PATCH 1407/8469] Added tag 0.9.8 for changeset e0a6e225ad6b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8f492918f0..21e59929e2 100644 --- a/.hgtags +++ b/.hgtags @@ -88,3 +88,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 88e3d6788facbb2dd6467a23c4f35529a5ce20a1 0.9.5 acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 19965a03c1d5231c894e0fabfaf45af1fd99f484 0.9.7 +e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 From 2f182743da1da836ec7b0cf56fa5e3453cd27ca8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Jul 2013 10:28:27 +0200 Subject: [PATCH 1408/8469] Bumped to 0.9.9 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 88 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/__init__.py | 2 +- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 8f11fa2f16..4eb79510d0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.8" +DEFAULT_VERSION = "0.9.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 55aa158eb7..4b9fe8a60f 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -exclude_package_data = setuptools.dist:check_package_data -packages = setuptools.dist:check_packages -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -tests_require = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points -zip_safe = setuptools.dist:assert_bool - [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg depends.txt = setuptools.command.egg_info:warn_depends_obsolete top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +exclude_package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +test_loader = setuptools.dist:check_importable +namespace_packages = setuptools.dist:check_nsp +convert_2to3_doctests = setuptools.dist:assert_string_list [distutils.commands] -develop = setuptools.command.develop:develop bdist_egg = setuptools.command.bdist_egg:bdist_egg -setopt = setuptools.command.setopt:setopt egg_info = setuptools.command.egg_info:egg_info -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -install = setuptools.command.install:install -install_egg_info = setuptools.command.install_egg_info:install_egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -saveopts = setuptools.command.saveopts:saveopts alias = setuptools.command.alias:alias -install_scripts = setuptools.command.install_scripts:install_scripts -build_py = setuptools.command.build_py:build_py sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test easy_install = setuptools.command.easy_install:easy_install -rotate = setuptools.command.rotate:rotate -install_lib = setuptools.command.install_lib:install_lib register = setuptools.command.register:register +setopt = setuptools.command.setopt:setopt +install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +build_ext = setuptools.command.build_ext:build_ext +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..668f4ee242 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 +[certs] +certifi==0.0.8 [ssl:python_version in '2.4, 2.5'] ssl==1.16 -[certs] -certifi==0.0.8 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 [ssl:sys_platform=='win32'] wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8c708bd628..6dc64e5ed9 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ import os import sys -__version__ = '0.9.8' +__version__ = '0.9.9' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' From 43f8c9aaff8c71c1c1e841827509c405c20ce909 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Jul 2013 10:34:33 +0200 Subject: [PATCH 1409/8469] For docs, load the setuptools version from the setup script, where it's authoritative, rather than from the library, which might not be ./setuptools --- docs/conf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index fbdb8b51e6..661ac48602 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,8 +14,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os -import setuptools +import setup # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -49,9 +48,9 @@ # built documents. # # The short X.Y version. -version = setuptools.__version__ +version = setup.setup_params['version'] # The full version, including alpha/beta/rc tags. -release = setuptools.__version__ +release = setup.setup_params['version'] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 3a53d2576dc84c77e7d2b9a8099f97cea3047215 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Jul 2013 09:52:26 +0200 Subject: [PATCH 1410/8469] Update release script to always push the bootstrap bookmark. --- release.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release.py b/release.py index bad7e0eea7..da8ee85931 100644 --- a/release.py +++ b/release.py @@ -7,6 +7,9 @@ import os import subprocess +import pkg_resources + +pkg_resources.require('jaraco.packaging>=1.1') def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') @@ -20,6 +23,9 @@ def before_upload(): os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" +# override the push command to include the bootstrap bookmark. +push_command = ['hg', 'push', '-B', 'bootstrap'] + link_patterns = [ r"(Issue )?#(?P\d+)", r"Distribute #(?P\d+)", From 1ead1921de7de5c980b5a75a668fcf4b4e6567bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 5 Aug 2013 00:21:36 +0200 Subject: [PATCH 1411/8469] Unlink destination file before writing scripts. --- setuptools/command/easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3194644e84..dd1e3b2524 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -799,6 +799,8 @@ def write_script(self, script_name, contents, mode="t", blockers=()): mask = current_umask() if not self.dry_run: ensure_directory(target) + if os.path.exists(target): + os.unlink(target) f = open(target,"w"+mode) f.write(contents) f.close() From 2311414e0a72615785c4dcc9a1a2590b44430ab5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 07:08:48 +0200 Subject: [PATCH 1412/8469] Hint to wheel that the code is universal --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 176cc47e09..0a0079e055 100755 --- a/setup.cfg +++ b/setup.cfg @@ -16,3 +16,6 @@ upload-dir = docs/build/html [sdist] formats=gztar + +[wheel] +universal=1 From 2acd7e9e1223672687a5c628407fc8528f64246a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 17:14:16 +0200 Subject: [PATCH 1413/8469] Move version into its own file so that setuptools machinery isn't necessary to elicit the version. --HG-- extra : rebase_source : 1611131e6765a30fd0fe94d8455418ccd3ae46ae --- release.py | 2 +- setuptools/__init__.py | 2 +- setuptools/version.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 setuptools/version.py diff --git a/release.py b/release.py index da8ee85931..c2b331c712 100644 --- a/release.py +++ b/release.py @@ -16,7 +16,7 @@ def before_upload(): _add_bootstrap_bookmark() files_with_versions = ( - 'ez_setup.py', 'setuptools/__init__.py', + 'ez_setup.py', 'setuptools/version.py', ) test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 6dc64e5ed9..45b95f90b1 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,8 +7,8 @@ from distutils.util import convert_path import os import sys +from setuptools.version import __version__ -__version__ = '0.9.9' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' diff --git a/setuptools/version.py b/setuptools/version.py new file mode 100644 index 0000000000..1b1a934d4b --- /dev/null +++ b/setuptools/version.py @@ -0,0 +1 @@ +__version__ = '0.9.9' From 047f8663da4dfe9ef6c2aa4e804d1621fde4563f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 17:16:04 +0200 Subject: [PATCH 1414/8469] Use version from version module in setup script --HG-- extra : rebase_source : b262af35810ec8ef1eacec3dd91806f53a9a6ea2 --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 629f2fff24..d08d714420 100755 --- a/setup.py +++ b/setup.py @@ -20,10 +20,10 @@ SETUP_COMMANDS = command_ns['__all__'] main_ns = {} -init_path = convert_path('setuptools/__init__.py') -init_file = open(init_path) -exec(init_file.read(), main_ns) -init_file.close() +ver_path = convert_path('setuptools/version.py') +ver_file = open(ver_path) +exec(ver_file.read(), main_ns) +ver_file.close() import setuptools from setuptools.command.build_py import build_py as _build_py From 3e53e141e0a0f03738b3943d0b0d77b1bf49883e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 17:20:10 +0200 Subject: [PATCH 1415/8469] Sphinx allows a callable named 'setup' to be provided in the config. If present, it attempts to call it. Therefore, use another name when importing the setup module. The docs may now be built using 'setup.py build_sphinx'. --HG-- extra : rebase_source : a5f5e0d9d624f976b7a12e44adf3cc94d4f6ac44 --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 661ac48602..9929aaf692 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import setup +import setup as setup_script # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = setup.setup_params['version'] +version = setup_script.setup_params['version'] # The full version, including alpha/beta/rc tags. -release = setup.setup_params['version'] +release = setup_script.setup_params['version'] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From d16ffd375e9c8211c4520cab688d5c2a44e5b66b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 17:37:49 +0200 Subject: [PATCH 1416/8469] Created a new section of the documentation pertaining to development. --HG-- extra : rebase_source : 4d756b98daa068d888074b53f5708c1245fa70ba --- docs/development.txt | 35 +++++++++++++++++++++++++++++++++++ docs/formats.txt | 20 -------------------- docs/index.txt | 1 + docs/releases.txt | 4 ++++ 4 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 docs/development.txt create mode 100644 docs/releases.txt diff --git a/docs/development.txt b/docs/development.txt new file mode 100644 index 0000000000..ba927c7360 --- /dev/null +++ b/docs/development.txt @@ -0,0 +1,35 @@ +------------------------- +Development on Setuptools +------------------------- + +Setuptools is maintained by the Python community under the Python Packaging +Authority (PyPA) and led by Jason R. Coombs. + +This document describes the process by which Setuptools is developed. +This document assumes the reader has some passing familiarity with +*using* setuptools, the ``pkg_resources`` module, and EasyInstall. It +does not attempt to explain basic concepts like inter-project +dependencies, nor does it contain detailed lexical syntax for most +file formats. Neither does it explain concepts like "namespace +packages" or "resources" in any detail, as all of these subjects are +covered at length in the setuptools developer's guide and the +``pkg_resources`` reference manual. + +Instead, this is **internal** documentation for how those concepts and +features are *implemented* in concrete terms. It is intended for people +who are working on the setuptools code base, who want to be able to +troubleshoot setuptools problems, want to write code that reads the file +formats involved, or want to otherwise tinker with setuptools-generated +files and directories. + +Note, however, that these are all internal implementation details and +are therefore subject to change; stick to the published API if you don't +want to be responsible for keeping your code from breaking when +setuptools changes. You have been warned. + +.. toctree:: + :maxdepth: 1 + + formats + releases + diff --git a/docs/formats.txt b/docs/formats.txt index dbfc28129f..ef28353e6a 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -4,26 +4,6 @@ The Internal Structure of Python Eggs STOP! This is not the first document you should read! -This document assumes you have at least some passing familiarity with -*using* setuptools, the ``pkg_resources`` module, and EasyInstall. It -does not attempt to explain basic concepts like inter-project -dependencies, nor does it contain detailed lexical syntax for most -file formats. Neither does it explain concepts like "namespace -packages" or "resources" in any detail, as all of these subjects are -covered at length in the setuptools developer's guide and the -``pkg_resources`` reference manual. - -Instead, this is **internal** documentation for how those concepts and -features are *implemented* in concrete terms. It is intended for people -who are working on the setuptools code base, who want to be able to -troubleshoot setuptools problems, want to write code that reads the file -formats involved, or want to otherwise tinker with setuptools-generated -files and directories. - -Note, however, that these are all internal implementation details and -are therefore subject to change; stick to the published API if you don't -want to be responsible for keeping your code from breaking when -setuptools changes. You have been warned. .. contents:: **Table of Contents** diff --git a/docs/index.txt b/docs/index.txt index 162a5f6f7c..8c68651def 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -23,3 +23,4 @@ Documentation content: setuptools easy_install pkg_resources + development diff --git a/docs/releases.txt b/docs/releases.txt new file mode 100644 index 0000000000..8119e8cf66 --- /dev/null +++ b/docs/releases.txt @@ -0,0 +1,4 @@ +========================== +Setuptools Release Process +========================== + From e324a315edb8512f59a424a7aa2038d270870a41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 21:13:58 +0200 Subject: [PATCH 1417/8469] Fleshed out a few details on the release process. --HG-- extra : rebase_source : 6d4ed995049ac55ae4d4526960865bac2fa3d251 --- docs/releases.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/releases.txt b/docs/releases.txt index 8119e8cf66..5d1419be7c 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -1,4 +1,18 @@ -========================== -Setuptools Release Process -========================== +=============== +Release Process +=============== +In order to allow for rapid, predictable releases, Setuptools uses a +mechanical technique for releases. The release script, ``release.py`` in the +repository, defines the details of the releases, and is executed by the +`jaraco.packaging `_ release +module. The script does some checks (some interactive) and fully automates +the release process. + +A Setuptools release manager must have maintainer access on PyPI to the +project and administrative access to the BitBucket project. + +Release Managers +---------------- + +Currently, the project has one release manager, Jason R. Coombs. From e550b63a52654c4c22127d373ad4e02ce1ce149d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 22:43:21 +0200 Subject: [PATCH 1418/8469] Syntax update for easy_install command --HG-- extra : rebase_source : d7fa5f788d2151d0aecf0bc7730ad73c5379320f --- setuptools/command/easy_install.py | 229 +++++++++++------------------ 1 file changed, 85 insertions(+), 144 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dd1e3b2524..febfdcd10c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1,5 +1,6 @@ #!python -"""\ + +""" Easy Install ------------ @@ -10,6 +11,7 @@ __ https://pythonhosted.org/setuptools/easy_install.html """ + import sys import os import zipimport @@ -21,10 +23,11 @@ import random import platform from glob import glob +from distutils import log, dir_util + import pkg_resources from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup -from distutils import log, dir_util try: # Python 2.7 or >=3.2 from sysconfig import get_config_vars, get_path @@ -51,12 +54,12 @@ def _get_purelib(): from setuptools.command import bdist_egg, egg_info from setuptools.compat import (iteritems, maxsize, xrange, basestring, unicode, reraise) -from pkg_resources import yield_lines, normalize_path, resource_string, \ - ensure_directory, get_distribution, find_distributions, \ - Environment, Requirement, Distribution, \ - PathMetadata, EggMetadata, WorkingSet, \ - DistributionNotFound, VersionConflict, \ - DEVELOP_DIST +from pkg_resources import ( + yield_lines, normalize_path, resource_string, ensure_directory, + get_distribution, find_distributions, Environment, Requirement, + Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, + VersionConflict, DEVELOP_DIST, +) if '__VENV_LAUNCHER__' in os.environ: sys_executable = os.environ['__VENV_LAUNCHER__'] @@ -75,7 +78,7 @@ def _get_purelib(): def is_64bit(): return struct.calcsize("P") == 8 -def samefile(p1,p2): +def samefile(p1, p2): if hasattr(os.path,'samefile') and ( os.path.exists(p1) and os.path.exists(p2) ): @@ -126,19 +129,20 @@ class easy_install(Command): ("build-directory=", "b", "download/extract/build in DIR; keep the results"), ('optimize=', 'O', - "also compile with optimization: -O1 for \"python -O\", " - "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('record=', None, - "filename in which to record list of installed files"), + "filename in which to record list of installed files"), ('always-unzip', 'Z', "don't install as a zipfile, no matter what"), ('site-dirs=','S',"list of directories where .pth files work"), ('editable', 'e', "Install specified packages in editable form"), ('no-deps', 'N', "don't install dependencies"), ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), - ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"), + ('local-snapshots-ok', 'l', + "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), ('no-find-links', None, - "Don't load find-links defined in packages being installed") + "Don't load find-links defined in packages being installed") ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', @@ -147,11 +151,10 @@ class easy_install(Command): ] if HAS_USER_SITE: - user_options.append(('user', None, - "install in user site-package '%s'" % site.USER_SITE)) + help_msg = "install in user site-package '%s'" % site.USER_SITE + user_options.append(('user', None, help_msg)) boolean_options.append('user') - negative_opt = {'always-unzip': 'zip-ok'} create_index = PackageIndex @@ -226,19 +229,20 @@ def finalize_options(self): py_version = sys.version.split()[0] prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') - self.config_vars = {'dist_name': self.distribution.get_name(), - 'dist_version': self.distribution.get_version(), - 'dist_fullname': self.distribution.get_fullname(), - 'py_version': py_version, - 'py_version_short': py_version[0:3], - 'py_version_nodot': py_version[0] + py_version[2], - 'sys_prefix': prefix, - 'prefix': prefix, - 'sys_exec_prefix': exec_prefix, - 'exec_prefix': exec_prefix, - # Only python 3.2+ has abiflags - 'abiflags': getattr(sys, 'abiflags', ''), - } + self.config_vars = { + 'dist_name': self.distribution.get_name(), + 'dist_version': self.distribution.get_version(), + 'dist_fullname': self.distribution.get_fullname(), + 'py_version': py_version, + 'py_version_short': py_version[0:3], + 'py_version_nodot': py_version[0] + py_version[2], + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, + # Only python 3.2+ has abiflags + 'abiflags': getattr(sys, 'abiflags', ''), + } if HAS_USER_SITE: self.config_vars['userbase'] = self.install_userbase @@ -351,7 +355,6 @@ def finalize_options(self): self.outputs = [] - def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) @@ -456,7 +459,7 @@ def check_site_dir(self): self.install_dir = instdir def cant_write_to_target(self): - msg = """can't create or remove files in install directory + template = """can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: @@ -467,7 +470,8 @@ def cant_write_to_target(self): the distutils default setting) was: %s -""" % (sys.exc_info()[1], self.install_dir,) +""" + msg = template % (sys.exc_info()[1], self.install_dir,) if not os.path.exists(self.install_dir): msg += """ @@ -493,9 +497,6 @@ def cant_write_to_target(self): """ raise DistutilsError(msg) - - - def check_pth_processing(self): """Empirically verify whether .pth files are supported in inst. dir""" instdir = self.install_dir @@ -580,11 +581,6 @@ def check_editable(self,spec): (spec.key, self.build_directory) ) - - - - - def easy_install(self, spec, deps=False): tmpdir = tempfile.mkdtemp(prefix="easy_install-") download = None @@ -662,8 +658,6 @@ def install_item(self, spec, download, tmpdir, deps, install_needed=False): if dist in spec: return dist - - def select_scheme(self, name): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! @@ -673,9 +667,6 @@ def select_scheme(self, name): if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) - - - def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) @@ -684,7 +675,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) if (dist.has_metadata('dependency_links.txt') and - not self.no_find_links): + not self.no_find_links): self.package_index.add_find_links( dist.get_metadata_lines('dependency_links.txt') ) @@ -735,10 +726,8 @@ def should_unzip(self, dist): def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) if os.path.exists(dst): - log.warn( - "%r already exists in %s; build directory %s will not be kept", - spec.key, self.build_directory, setup_base - ) + msg = "%r already exists in %s; build directory %s will not be kept" + log.warn(msg, spec.key, self.build_directory, setup_base) return setup_base if os.path.isdir(dist_filename): setup_base = dist_filename @@ -751,7 +740,8 @@ def maybe_move(self, spec, dist_filename, setup_base): if os.path.isdir(dist_filename): # if the only thing there is a directory, move it instead setup_base = dist_filename - ensure_directory(dst); shutil.move(setup_base, dst) + ensure_directory(dst) + shutil.move(setup_base, dst) return dst def install_wrapper_scripts(self, dist): @@ -759,8 +749,6 @@ def install_wrapper_scripts(self, dist): for args in get_script_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""" spec = str(dist.as_requirement()) @@ -806,9 +794,6 @@ def write_script(self, script_name, contents, mode="t", blockers=()): f.close() chmod(target, 0x1FF-mask) # 0777 - - - def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them if dist_filename.lower().endswith('.egg'): @@ -824,8 +809,7 @@ def install_eggs(self, spec, dist_filename, tmpdir): setup_base = os.path.abspath(dist_filename) if (setup_base.startswith(tmpdir) # something we downloaded - and self.build_directory and spec is not None - ): + and self.build_directory and spec is not None): setup_base = self.maybe_move(spec, dist_filename, setup_base) # Find the setup.py file @@ -899,14 +883,15 @@ def install_exe(self, dist_filename, tmpdir): "%s is not a valid distutils Windows .exe" % dist_filename ) # Create a dummy distribution object until we build the real distro - dist = Distribution(None, + dist = Distribution( + None, project_name=cfg.get('metadata','name'), - version=cfg.get('metadata','version'), platform=get_platform() + version=cfg.get('metadata','version'), platform=get_platform(), ) # Convert the .exe to an unpacked egg egg_path = dist.location = os.path.join(tmpdir, dist.egg_name()+'.egg') - egg_tmp = egg_path+'.tmp' + egg_tmp = egg_path + '.tmp' egg_info = os.path.join(egg_tmp, 'EGG-INFO') pkg_inf = os.path.join(egg_info, 'PKG-INFO') ensure_directory(pkg_inf) # make sure EGG-INFO dir exists @@ -967,7 +952,8 @@ def process(src,dst): resource = parts[-1] parts[-1] = bdist_egg.strip_module(parts[-1])+'.py' pyfile = os.path.join(egg_tmp, *parts) - to_compile.append(pyfile); stubs.append(pyfile) + to_compile.append(pyfile) + stubs.append(pyfile) bdist_egg.write_stub(resource, pyfile) self.byte_compile(to_compile) # compile .py's bdist_egg.write_safety_flag(os.path.join(egg_tmp,'EGG-INFO'), @@ -1166,8 +1152,7 @@ def _set_fetcher_options(self, base): cfg_filename = os.path.join(base, 'setup.cfg') setopt.edit_config(cfg_filename, settings) - - def update_pth(self,dist): + def update_pth(self, dist): if self.pth_file is None: return @@ -1209,9 +1194,10 @@ def unpack_progress(self, src, dst): return dst # only unpack-and-compile skips files for dry run def unpack_and_compile(self, egg_path, destination): - to_compile = []; to_chmod = [] + to_compile = [] + to_chmod = [] - def pf(src,dst): + def pf(src, dst): if dst.endswith('.py') and not src.startswith('EGG-INFO/'): to_compile.append(dst) elif dst.endswith('.dll') or dst.endswith('.so'): @@ -1245,16 +1231,8 @@ def byte_compile(self, to_compile): finally: log.set_verbosity(self.verbose) # restore original verbosity - - - - - - - - def no_default_version_msg(self): - return """bad install directory or PYTHONPATH + template = """bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The @@ -1281,18 +1259,8 @@ def no_default_version_msg(self): https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations -Please make the appropriate changes for your system and try again.""" % ( - self.install_dir, os.environ.get('PYTHONPATH','') - ) - - - - - - - - - +Please make the appropriate changes for your system and try again.""" + return template % self.install_dir, os.environ.get('PYTHONPATH','') def install_site_py(self): """Make sure there's a site.py in the target dir, if needed""" @@ -1330,9 +1298,6 @@ def install_site_py(self): self.sitepy_installed = True - - - def create_home_path(self): """Create directories under ~.""" if not self.user: @@ -1343,22 +1308,16 @@ def create_home_path(self): self.debug_print("os.makedirs('%s', 0700)" % path) os.makedirs(path, 0x1C0) # 0700 - - - - - - INSTALL_SCHEMES = dict( posix = dict( install_dir = '$base/lib/python$py_version_short/site-packages', - script_dir = '$base/bin', + script_dir = '$base/bin', ), ) DEFAULT_SCHEME = dict( install_dir = '$base/Lib/site-packages', - script_dir = '$base/Scripts', + script_dir = '$base/Scripts', ) def _expand(self, *attrs): @@ -1382,14 +1341,6 @@ def _expand(self, *attrs): val = os.path.expanduser(val) setattr(self, attr, val) - - - - - - - - def get_site_dirs(): # return a list of 'site' dirs sitedirs = [_f for _f in os.environ.get('PYTHONPATH', @@ -1524,12 +1475,6 @@ def extract_wininst_cfg(dist_filename): f.close() - - - - - - def get_exe_prefixes(exe_filename): """Get exe->egg path translations for a given .exe file""" @@ -1563,7 +1508,8 @@ def get_exe_prefixes(exe_filename): finally: z.close() prefixes = [(x.lower(),y) for x, y in prefixes] - prefixes.sort(); prefixes.reverse() + prefixes.sort() + prefixes.reverse() return prefixes @@ -1584,7 +1530,8 @@ def __init__(self, filename, sitedirs=()): self.filename = filename self.sitedirs = list(map(normalize_path, sitedirs)) self.basedir = normalize_path(os.path.dirname(self.filename)) - self._load(); Environment.__init__(self, [], None, None) + self._load() + Environment.__init__(self, [], None, None) for path in yield_lines(self.paths): list(map(self.add, find_distributions(path, True))) @@ -1639,7 +1586,8 @@ def save(self): if os.path.islink(self.filename): os.unlink(self.filename) f = open(self.filename,'wt') - f.write(data); f.close() + f.write(data) + f.close() elif os.path.exists(self.filename): log.debug("Deleting empty %s", self.filename) @@ -1647,22 +1595,22 @@ def save(self): self.dirty = False - def add(self,dist): + def add(self, dist): """Add `dist` to the distribution map""" if (dist.location not in self.paths and ( dist.location not in self.sitedirs or - dist.location == os.getcwd() #account for '.' being in PYTHONPATH + dist.location == os.getcwd() # account for '.' being in PYTHONPATH )): self.paths.append(dist.location) self.dirty = True - Environment.add(self,dist) + Environment.add(self, dist) - def remove(self,dist): + def remove(self, dist): """Remove `dist` from the distribution map""" while dist.location in self.paths: - self.paths.remove(dist.location); self.dirty = True - Environment.remove(self,dist) - + self.paths.remove(dist.location) + self.dirty = True + Environment.remove(self, dist) def make_relative(self,path): npath, last = os.path.split(normalize_path(path)) @@ -1784,14 +1732,6 @@ def nt_quote_arg(arg): return ''.join(result) - - - - - - - - def is_python_script(script_text, filename): """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc. """ @@ -1830,10 +1770,11 @@ def fix_jython_executable(executable, options): # shebang line interpreter) if options: # Can't apply the workaround, leave it broken - log.warn("WARNING: Unable to adapt shebang line for Jython," - " the following script is NOT executable\n" - " see http://bugs.jython.org/issue1112 for" - " more information.") + log.warn( + "WARNING: Unable to adapt shebang line for Jython," + " the following script is NOT executable\n" + " see http://bugs.jython.org/issue1112 for" + " more information.") else: return '/usr/bin/env %s' % executable return executable @@ -1957,8 +1898,11 @@ def current_umask(): def bootstrap(): # This function is called when setuptools*.egg is run using /bin/sh - import setuptools; argv0 = os.path.dirname(setuptools.__path__[0]) - sys.argv[0] = argv0; sys.argv.append(argv0); main() + import setuptools + argv0 = os.path.dirname(setuptools.__path__[0]) + sys.argv[0] = argv0 + sys.argv.append(argv0) + main() def main(argv=None, **kw): from setuptools import setup @@ -1970,9 +1914,10 @@ def main(argv=None, **kw): or: %(script)s --help """ - def gen_usage (script_name): - script = os.path.basename(script_name) - return USAGE % vars() + def gen_usage(script_name): + return USAGE % dict( + script=os.path.basename(script_name), + ) def with_ei_usage(f): old_gen_usage = distutils.core.gen_usage @@ -1998,7 +1943,3 @@ def _show_help(self,*args,**kw): distclass=DistributionWithoutHelpCommands, **kw ) ) - - - - From e15ad8afcac113fb1091a4a8951d8e59adbd5ba9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 22:56:52 +0200 Subject: [PATCH 1419/8469] Beginning extraction of ScriptWriter classes for writing console and gui scripts --HG-- extra : rebase_source : 24c34791314ba58ecb0c7dca7bd7fa02a3a84949 --- setuptools/command/easy_install.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index febfdcd10c..bac38d7610 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1780,24 +1780,27 @@ def fix_jython_executable(executable, options): return executable +class ScriptWriter(object): + template = ( + "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" + "__requires__ = %(spec)r\n" + "import sys\n" + "from pkg_resources import load_entry_point\n" + "\n" + "if __name__ == '__main__':" + "\n" + " sys.exit(\n" + " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" + " )\n" + ) + def get_script_args(dist, executable=sys_executable, wininst=False): """Yield write_script() argument tuples for a distribution's entrypoints""" spec = str(dist.as_requirement()) header = get_script_header("", executable, wininst) for group in 'console_scripts', 'gui_scripts': for name, ep in dist.get_entry_map(group).items(): - script_text = ( - "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" - "__requires__ = %(spec)r\n" - "import sys\n" - "from pkg_resources import load_entry_point\n" - "\n" - "if __name__ == '__main__':" - "\n" - " sys.exit(\n" - " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" - " )\n" - ) % locals() + script_text = ScriptWriter.template % locals() if sys.platform=='win32' or wininst: # On Windows/wininst, add a .py extension and an .exe launcher if group=='gui_scripts': From 46196e8239a9a8f523774f7d48bdf3b810bd083b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:00:28 +0200 Subject: [PATCH 1420/8469] extract launcher type indication --HG-- extra : rebase_source : 940b4a8a2c6efe60a2c532e943173ccff0515790 --- setuptools/command/easy_install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bac38d7610..e667d0a339 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1798,12 +1798,13 @@ def get_script_args(dist, executable=sys_executable, wininst=False): """Yield write_script() argument tuples for a distribution's entrypoints""" spec = str(dist.as_requirement()) header = get_script_header("", executable, wininst) - for group in 'console_scripts', 'gui_scripts': + for type_ in 'console', 'gui': + group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): script_text = ScriptWriter.template % locals() if sys.platform=='win32' or wininst: # On Windows/wininst, add a .py extension and an .exe launcher - if group=='gui_scripts': + if type_=='gui': launcher_type = 'gui' ext = '-script.pyw' old = ['.pyw'] From c1d0c2734b87687777adf584c2e2a9a457de3307 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:04:36 +0200 Subject: [PATCH 1421/8469] Moved get_script_args into a ScriptWriter class method --HG-- extra : rebase_source : 2acd6e7c81e54fa495f8b0eaf667b77f40c6495a --- setuptools/command/easy_install.py | 84 ++++++++++++++++-------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e667d0a339..49bf20c34f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1794,47 +1794,51 @@ class ScriptWriter(object): " )\n" ) -def get_script_args(dist, executable=sys_executable, wininst=False): - """Yield write_script() argument tuples for a distribution's entrypoints""" - spec = str(dist.as_requirement()) - header = get_script_header("", executable, wininst) - for type_ in 'console', 'gui': - group = type_ + '_scripts' - for name, ep in dist.get_entry_map(group).items(): - script_text = ScriptWriter.template % locals() - if sys.platform=='win32' or wininst: - # On Windows/wininst, add a .py extension and an .exe launcher - if type_=='gui': - launcher_type = 'gui' - ext = '-script.pyw' - old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) - else: - launcher_type = 'cli' - ext = '-script.py' - old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': - hdr = new_header + @classmethod + def get_script_args(cls, dist, executable=sys_executable, wininst=False): + """Yield write_script() argument tuples for a distribution's entrypoints""" + spec = str(dist.as_requirement()) + header = get_script_header("", executable, wininst) + for type_ in 'console', 'gui': + group = type_ + '_scripts' + for name, ep in dist.get_entry_map(group).items(): + script_text = cls.template % locals() + if sys.platform=='win32' or wininst: + # On Windows/wininst, add a .py extension and an .exe launcher + if type_=='gui': + launcher_type = 'gui' + ext = '-script.pyw' + old = ['.pyw'] + new_header = re.sub('(?i)python.exe','pythonw.exe',header) + else: + launcher_type = 'cli' + ext = '-script.py' + old = ['.py','.pyc','.pyo'] + new_header = re.sub('(?i)pythonw.exe','python.exe',header) + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': + hdr = new_header + else: + hdr = header + yield (name+ext, hdr+script_text, 't', [name+x for x in old]) + yield ( + name+'.exe', get_win_launcher(launcher_type), + 'b' # write in binary mode + ) + if not is_64bit(): + # install a manifest for the launcher to prevent Windows + # from detecting it as an installer (which it will for + # launchers like easy_install.exe). Consider only + # adding a manifest for launchers detected as installers. + # See Distribute #143 for details. + m_name = name + '.exe.manifest' + yield (m_name, load_launcher_manifest(name), 't') else: - hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) - yield ( - name+'.exe', get_win_launcher(launcher_type), - 'b' # write in binary mode - ) - if not is_64bit(): - # install a manifest for the launcher to prevent Windows - # from detecting it as an installer (which it will for - # launchers like easy_install.exe). Consider only - # adding a manifest for launchers detected as installers. - # See Distribute #143 for details. - m_name = name + '.exe.manifest' - yield (m_name, load_launcher_manifest(name), 't') - else: - # On other platforms, we assume the right thing to do is to - # just write the stub with no extension. - yield (name, header+script_text) + # On other platforms, we assume the right thing to do is to + # just write the stub with no extension. + yield (name, header+script_text) + +# for backward-compatibility +get_script_args = ScriptWriter.get_script_args def get_win_launcher(type): """ From 82d2bd87c1019450433d6be2188381cacdeb4b29 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:10:27 +0200 Subject: [PATCH 1422/8469] Extract protected _get_script_args to capture type parameter. --HG-- extra : rebase_source : d5458d1469b8b411d3937fa52996fdf96e601029 --- setuptools/command/easy_install.py | 77 ++++++++++++++++-------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 49bf20c34f..b766074482 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1797,45 +1797,50 @@ class ScriptWriter(object): @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): """Yield write_script() argument tuples for a distribution's entrypoints""" + for type_ in 'console', 'gui': + for res in cls._get_script_args(type_, dist, executable, wininst): + yield res + + @classmethod + def _get_script_args(cls, type_, dist, executable, wininst): spec = str(dist.as_requirement()) header = get_script_header("", executable, wininst) - for type_ in 'console', 'gui': - group = type_ + '_scripts' - for name, ep in dist.get_entry_map(group).items(): - script_text = cls.template % locals() - if sys.platform=='win32' or wininst: - # On Windows/wininst, add a .py extension and an .exe launcher - if type_=='gui': - launcher_type = 'gui' - ext = '-script.pyw' - old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) - else: - launcher_type = 'cli' - ext = '-script.py' - old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': - hdr = new_header - else: - hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) - yield ( - name+'.exe', get_win_launcher(launcher_type), - 'b' # write in binary mode - ) - if not is_64bit(): - # install a manifest for the launcher to prevent Windows - # from detecting it as an installer (which it will for - # launchers like easy_install.exe). Consider only - # adding a manifest for launchers detected as installers. - # See Distribute #143 for details. - m_name = name + '.exe.manifest' - yield (m_name, load_launcher_manifest(name), 't') + group = type_ + '_scripts' + for name, ep in dist.get_entry_map(group).items(): + script_text = cls.template % locals() + if sys.platform=='win32' or wininst: + # On Windows/wininst, add a .py extension and an .exe launcher + if type_=='gui': + launcher_type = 'gui' + ext = '-script.pyw' + old = ['.pyw'] + new_header = re.sub('(?i)python.exe','pythonw.exe',header) + else: + launcher_type = 'cli' + ext = '-script.py' + old = ['.py','.pyc','.pyo'] + new_header = re.sub('(?i)pythonw.exe','python.exe',header) + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': + hdr = new_header else: - # On other platforms, we assume the right thing to do is to - # just write the stub with no extension. - yield (name, header+script_text) + hdr = header + yield (name+ext, hdr+script_text, 't', [name+x for x in old]) + yield ( + name+'.exe', get_win_launcher(launcher_type), + 'b' # write in binary mode + ) + if not is_64bit(): + # install a manifest for the launcher to prevent Windows + # from detecting it as an installer (which it will for + # launchers like easy_install.exe). Consider only + # adding a manifest for launchers detected as installers. + # See Distribute #143 for details. + m_name = name + '.exe.manifest' + yield (m_name, load_launcher_manifest(name), 't') + else: + # On other platforms, we assume the right thing to do is to + # just write the stub with no extension. + yield (name, header+script_text) # for backward-compatibility get_script_args = ScriptWriter.get_script_args From 29e0ce1ef9eaa7854167f281c98c4fe9eb3891ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:30:30 +0200 Subject: [PATCH 1423/8469] Adapted signature on _get_script_args so it accurately abstracts windows/other behavior. --HG-- extra : rebase_source : f57970b6ee6a79e0ef4dc277356e789ff8a341ff --- setuptools/command/easy_install.py | 85 ++++++++++++++++-------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b766074482..cbcc7c8524 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1796,51 +1796,54 @@ class ScriptWriter(object): @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): - """Yield write_script() argument tuples for a distribution's entrypoints""" + """ + Yield write_script() argument tuples for a distribution's entrypoints + """ + spec = str(dist.as_requirement()) + header = get_script_header("", executable, wininst) for type_ in 'console', 'gui': - for res in cls._get_script_args(type_, dist, executable, wininst): - yield res + group = type_ + '_scripts' + for name, ep in dist.get_entry_map(group).items(): + script_text = cls.template % locals() + for res in cls._get_script_args(type_, name, header, + script_text, wininst): + yield res @classmethod - def _get_script_args(cls, type_, dist, executable, wininst): - spec = str(dist.as_requirement()) - header = get_script_header("", executable, wininst) - group = type_ + '_scripts' - for name, ep in dist.get_entry_map(group).items(): - script_text = cls.template % locals() - if sys.platform=='win32' or wininst: - # On Windows/wininst, add a .py extension and an .exe launcher - if type_=='gui': - launcher_type = 'gui' - ext = '-script.pyw' - old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) - else: - launcher_type = 'cli' - ext = '-script.py' - old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': - hdr = new_header - else: - hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) - yield ( - name+'.exe', get_win_launcher(launcher_type), - 'b' # write in binary mode - ) - if not is_64bit(): - # install a manifest for the launcher to prevent Windows - # from detecting it as an installer (which it will for - # launchers like easy_install.exe). Consider only - # adding a manifest for launchers detected as installers. - # See Distribute #143 for details. - m_name = name + '.exe.manifest' - yield (m_name, load_launcher_manifest(name), 't') + def _get_script_args(cls, type_, name, dist, executable, wininst): + if sys.platform=='win32' or wininst: + # On Windows/wininst, add a .py extension and an .exe launcher + if type_=='gui': + launcher_type = 'gui' + ext = '-script.pyw' + old = ['.pyw'] + new_header = re.sub('(?i)python.exe','pythonw.exe',header) else: - # On other platforms, we assume the right thing to do is to - # just write the stub with no extension. - yield (name, header+script_text) + launcher_type = 'cli' + ext = '-script.py' + old = ['.py','.pyc','.pyo'] + new_header = re.sub('(?i)pythonw.exe','python.exe',header) + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': + hdr = new_header + else: + hdr = header + yield (name+ext, hdr+script_text, 't', [name+x for x in old]) + yield ( + name+'.exe', get_win_launcher(launcher_type), + 'b' # write in binary mode + ) + if not is_64bit(): + # install a manifest for the launcher to prevent Windows + # from detecting it as an installer (which it will for + # launchers like easy_install.exe). Consider only + # adding a manifest for launchers detected as installers. + # See Distribute #143 for details. + m_name = name + '.exe.manifest' + yield (m_name, load_launcher_manifest(name), 't') + else: + # On other platforms, we assume the right thing to do is to + # just write the stub with no extension. + yield (name, header+script_text) # for backward-compatibility get_script_args = ScriptWriter.get_script_args From 1c7102c9ffa7735769b90ab5c7d02357c6dfa41d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:40:20 +0200 Subject: [PATCH 1424/8469] Move specialized Windows behavior to a specialized subclass --HG-- extra : rebase_source : f56a411c3cace611952133b96a48ed92888f75a1 --- setuptools/command/easy_install.py | 84 +++++++++++++++++------------- 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cbcc7c8524..fbf3245cc9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1799,51 +1799,63 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): """ Yield write_script() argument tuples for a distribution's entrypoints """ + gen_class = cls.get_writer(wininst) spec = str(dist.as_requirement()) header = get_script_header("", executable, wininst) for type_ in 'console', 'gui': group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): - script_text = cls.template % locals() - for res in cls._get_script_args(type_, name, header, - script_text, wininst): + script_text = gen_class.template % locals() + for res in gen_class._get_script_args(type_, name, header, + script_text): yield res @classmethod - def _get_script_args(cls, type_, name, dist, executable, wininst): - if sys.platform=='win32' or wininst: - # On Windows/wininst, add a .py extension and an .exe launcher - if type_=='gui': - launcher_type = 'gui' - ext = '-script.pyw' - old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) - else: - launcher_type = 'cli' - ext = '-script.py' - old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': - hdr = new_header - else: - hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) - yield ( - name+'.exe', get_win_launcher(launcher_type), - 'b' # write in binary mode - ) - if not is_64bit(): - # install a manifest for the launcher to prevent Windows - # from detecting it as an installer (which it will for - # launchers like easy_install.exe). Consider only - # adding a manifest for launchers detected as installers. - # See Distribute #143 for details. - m_name = name + '.exe.manifest' - yield (m_name, load_launcher_manifest(name), 't') + def get_writer(cls, force_windows): + if force_windows or sys.platform=='win32': + return WindowsScriptWriter + return cls + + @classmethod + def _get_script_args(cls, type_, name, header, script_text): + # Simply write the stub with no extension. + yield (name, header+script_text) + + +class WindowsScriptWriter(ScriptWriter): + @classmethod + def _get_script_args(cls, type_, name, header, script_text): + """ + For Windows, add a .py extension and an .exe launcher + """ + if type_=='gui': + launcher_type = 'gui' + ext = '-script.pyw' + old = ['.pyw'] + new_header = re.sub('(?i)python.exe','pythonw.exe',header) else: - # On other platforms, we assume the right thing to do is to - # just write the stub with no extension. - yield (name, header+script_text) + launcher_type = 'cli' + ext = '-script.py' + old = ['.py','.pyc','.pyo'] + new_header = re.sub('(?i)pythonw.exe','python.exe',header) + if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': + hdr = new_header + else: + hdr = header + yield (name+ext, hdr+script_text, 't', [name+x for x in old]) + yield ( + name+'.exe', get_win_launcher(launcher_type), + 'b' # write in binary mode + ) + if not is_64bit(): + # install a manifest for the launcher to prevent Windows + # from detecting it as an installer (which it will for + # launchers like easy_install.exe). Consider only + # adding a manifest for launchers detected as installers. + # See Distribute #143 for details. + m_name = name + '.exe.manifest' + yield (m_name, load_launcher_manifest(name), 't') + # for backward-compatibility get_script_args = ScriptWriter.get_script_args From 8d09363e908c030761026e9400283db10213b625 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Aug 2013 23:57:22 +0200 Subject: [PATCH 1425/8469] Name variable for clarity --HG-- extra : rebase_source : 6787fb9e99b28fa2d9504d18018878ccf193d521 --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fbf3245cc9..5066d6663e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1842,7 +1842,8 @@ def _get_script_args(cls, type_, name, header, script_text): hdr = new_header else: hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) + blockers = [name+x for x in old] + yield (name+ext, hdr+script_text, 't', blockers) yield ( name+'.exe', get_win_launcher(launcher_type), 'b' # write in binary mode From 6c256c7653a517912e603187111cfafc7c82d7dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Aug 2013 00:25:19 +0200 Subject: [PATCH 1426/8469] Extract _adjust_header method --HG-- extra : rebase_source : 63809401ac0769504a143981e518ef31488ea400 --- setuptools/command/easy_install.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5066d6663e..b18380242b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1832,16 +1832,11 @@ def _get_script_args(cls, type_, name, header, script_text): launcher_type = 'gui' ext = '-script.pyw' old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) else: launcher_type = 'cli' ext = '-script.py' old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if os.path.exists(new_header[2:-1].strip('"')) or sys.platform!='win32': - hdr = new_header - else: - hdr = header + hdr = cls._adjust_header(type_, header) blockers = [name+x for x in old] yield (name+ext, hdr+script_text, 't', blockers) yield ( @@ -1857,6 +1852,23 @@ def _get_script_args(cls, type_, name, header, script_text): m_name = name + '.exe.manifest' yield (m_name, load_launcher_manifest(name), 't') + @staticmethod + def _adjust_header(type_, orig_header): + """ + Make sure 'pythonw' is used for gui and and 'python' is used for + console (regardless of what sys.executable is). + """ + pattern = 'pythonw.exe' + repl = 'python.exe' + if type_ == 'gui': + pattern, repl = repl, pattern + new_header = re.sub(string=orig_header, pattern=re.escape(pattern), + repl=repl, flags=re.IGNORECASE) + 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 # for backward-compatibility get_script_args = ScriptWriter.get_script_args From a78c722a5cb3756dd0fb83badc66c50fda85c144 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Aug 2013 10:38:01 +0200 Subject: [PATCH 1427/8469] Use a pattern object to invoke the substitution in _adjust_header, restoring Python 2.4-2.6 compatibility. --HG-- extra : rebase_source : 4245d65731ca4433c80cf260906085500ab6c357 --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b18380242b..f82125d64f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1862,8 +1862,8 @@ def _adjust_header(type_, orig_header): repl = 'python.exe' if type_ == 'gui': pattern, repl = repl, pattern - new_header = re.sub(string=orig_header, pattern=re.escape(pattern), - repl=repl, flags=re.IGNORECASE) + pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) + new_header = pattern_ob.sub(string=orig_header, repl=repl) 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 From e8319c9ece0460cb905e92c31756fd86d6b88cc7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Aug 2013 10:48:46 +0200 Subject: [PATCH 1428/8469] Add docstring --HG-- extra : rebase_source : 79c95e70593d4e4177c3c1f9625e427d9ce0a16c --- setuptools/command/easy_install.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f82125d64f..6c1ea631d9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1781,6 +1781,11 @@ def fix_jython_executable(executable, options): class ScriptWriter(object): + """ + Encapsulates behavior around writing entry point scripts for console and + gui apps. + """ + template = ( "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" "__requires__ = %(spec)r\n" From 89132919af71ebee6af2ab46288321e56c48a780 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Aug 2013 10:52:43 +0200 Subject: [PATCH 1429/8469] Use a single, multiline literal to express the template for clarity. --HG-- extra : rebase_source : df5f817f45451b3a2c4093c12bb7b2b51f8ff3b7 --- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools/command/easy_install.py | 24 +++--- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 4b9fe8a60f..ba887a084a 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -entry_points.txt = setuptools.command.egg_info:write_entries - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -test_loader = setuptools.dist:check_importable -namespace_packages = setuptools.dist:check_nsp -convert_2to3_doctests = setuptools.dist:assert_string_list - -[distutils.commands] -bdist_egg = setuptools.command.bdist_egg:bdist_egg -egg_info = setuptools.command.egg_info:egg_info -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -easy_install = setuptools.command.easy_install:easy_install -register = setuptools.command.register:register -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -build_ext = setuptools.command.build_ext:build_ext -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts - +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[egg_info.writers] +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +entry_points.txt = setuptools.command.egg_info:write_entries + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +exclude_package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +test_loader = setuptools.dist:check_importable +namespace_packages = setuptools.dist:check_nsp +convert_2to3_doctests = setuptools.dist:assert_string_list + +[distutils.commands] +bdist_egg = setuptools.command.bdist_egg:bdist_egg +egg_info = setuptools.command.egg_info:egg_info +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +easy_install = setuptools.command.easy_install:easy_install +register = setuptools.command.register:register +setopt = setuptools.command.setopt:setopt +install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +build_ext = setuptools.command.build_ext:build_ext +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts + diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6c1ea631d9..5be48bb1e8 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -22,6 +22,7 @@ import stat import random import platform +import textwrap from glob import glob from distutils import log, dir_util @@ -1786,18 +1787,17 @@ class ScriptWriter(object): gui apps. """ - template = ( - "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" - "__requires__ = %(spec)r\n" - "import sys\n" - "from pkg_resources import load_entry_point\n" - "\n" - "if __name__ == '__main__':" - "\n" - " sys.exit(\n" - " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" - " )\n" - ) + template = textwrap.dedent(""" + # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r + __requires__ = %(spec)r + import sys + from pkg_resources import load_entry_point + + if __name__ == '__main__': + sys.exit( + load_entry_point(%(spec)r, %(group)r, %(name)r)() + ) + """).lstrip() @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): From 81329a6d0753e879e67f279f5f0e7a4ef3346966 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 06:12:27 -0400 Subject: [PATCH 1430/8469] Update link to bug tracker. --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5d80b23096..a9368caa29 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -3226,5 +3226,5 @@ confirmed via the list are actual bugs, and which you have reduced to a minimal set of steps to reproduce. .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ -.. _setuptools bug tracker: http://bugs.python.org/setuptools/ +.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/ From c05e0003478a36d698e938121978aafb43223599 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 06:21:36 -0400 Subject: [PATCH 1431/8469] Corrected syntax in setuptools documentation around console scripts with extra requirements. Fixes #62. --- docs/setuptools.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index a9368caa29..6dfe0b4c8d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -713,10 +713,11 @@ declare it like this, so that the "PDF" requirements are only resolved if the name="Project-A", ... entry_points = { - 'console_scripts': - ['rst2pdf = project_a.tools.pdfgen [PDF]'], - ['rst2html = project_a.tools.htmlgen'], + 'console_scripts': [ + 'rst2pdf = project_a.tools.pdfgen [PDF]', + 'rst2html = project_a.tools.htmlgen', # more script entry points ... + ], } ) From b748722cdd854504dea3209b722ee868302d8541 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 06:54:34 -0400 Subject: [PATCH 1432/8469] Removed references to distribute_setup.py --- docs/setuptools.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 6dfe0b4c8d..b46e59398f 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -72,7 +72,7 @@ is available from the `Python SVN sandbox`_, and in-development versions of the .. contents:: **Table of Contents** -.. _distribute_setup.py: `bootstrap module`_ +.. _ez_setup.py: `bootstrap module`_ ----------------- @@ -95,7 +95,7 @@ other than Python's ``site-packages`` directory. If you want the current in-development version of setuptools, you should first install a stable version, and then run:: - distribute_setup.py setuptools==dev + ez_setup.py setuptools==dev This will download and install the latest development (i.e. unstable) version of setuptools from the Python Subversion sandbox. @@ -529,7 +529,7 @@ Python must be available via the ``PATH`` environment variable, under its "long" name. That is, if the egg is built for Python 2.3, there must be a ``python2.3`` executable present in a directory on ``PATH``. -This feature is primarily intended to support distribute_setup the installation of +This feature is primarily intended to support ez_setup the installation of setuptools itself on non-Windows platforms, but may also be useful for other projects as well. @@ -1148,20 +1148,20 @@ Using ``setuptools``... Without bundling it! Your users might not have ``setuptools`` installed on their machines, or even if they do, it might not be the right version. Fixing this is easy; just -download `distribute_setup.py`_, and put it in the same directory as your ``setup.py`` +download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` script. (Be sure to add it to your revision control system, too.) Then add these two lines to the very top of your setup script, before the script imports anything from setuptools: .. code-block:: python - import distribute_setup - distribute_setup.use_setuptools() + import ez_setup + ez_setup.use_setuptools() -That's it. The ``distribute_setup`` module will automatically download a matching +That's it. The ``ez_setup`` module will automatically download a matching version of ``setuptools`` from PyPI, if it isn't present on the target system. Whenever you install an updated version of setuptools, you should also update -your projects' ``distribute_setup.py`` files, so that a matching version gets installed +your projects' ``ez_setup.py`` files, so that a matching version gets installed on the target machine(s). By the way, setuptools supports the new PyPI "upload" command, so you can use @@ -1191,7 +1191,7 @@ relevant to your project and your target audience isn't already familiar with setuptools and ``easy_install``. Network Access - If your project is using ``distribute_setup``, you should inform users of the + If your project is using ``ez_setup``, you should inform users of the need to either have network access, or to preinstall the correct version of setuptools using the `EasyInstall installation instructions`_. Those instructions also have tips for dealing with firewalls as well as how to @@ -1271,27 +1271,27 @@ Creating System Packages Managing Multiple Projects -------------------------- -If you're managing several projects that need to use ``distribute_setup``, and you +If you're managing several projects that need to use ``ez_setup``, and you are using Subversion as your revision control system, you can use the -"svn:externals" property to share a single copy of ``distribute_setup`` between +"svn:externals" property to share a single copy of ``ez_setup`` between projects, so that it will always be up-to-date whenever you check out or update an individual project, without having to manually update each project to use a new version. However, because Subversion only supports using directories as externals, you -have to turn ``distribute_setup.py`` into ``distribute_setup/__init__.py`` in order -to do this, then create "externals" definitions that map the ``distribute_setup`` +have to turn ``ez_setup.py`` into ``ez_setup/__init__.py`` in order +to do this, then create "externals" definitions that map the ``ez_setup`` directory into each project. Also, if any of your projects use ``find_packages()`` on their setup directory, you will need to exclude the -resulting ``distribute_setup`` package, to keep it from being included in your +resulting ``ez_setup`` package, to keep it from being included in your distributions, e.g.:: setup( ... - packages = find_packages(exclude=['distribute_setup']), + packages = find_packages(exclude=['ez_setup']), ) -Of course, the ``distribute_setup`` package will still be included in your +Of course, the ``ez_setup`` package will still be included in your packages' source distributions, as it needs to be. For your convenience, you may use the following external definition, which will @@ -2700,8 +2700,8 @@ XXX Reusing ``setuptools`` Code =========================== -``distribute_setup`` --------------------- +``ez_setup`` +------------ XXX From 244412f118232255578bb99afee7cd22872a9839 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 06:57:36 -0400 Subject: [PATCH 1433/8469] Removed section on Managing Multiple Projects. It only works for Subversion, which is substantially replaced by other SCM systems. --- docs/setuptools.txt | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index b46e59398f..235a85b53a 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1267,45 +1267,6 @@ Creating System Packages resolve the issue. - -Managing Multiple Projects --------------------------- - -If you're managing several projects that need to use ``ez_setup``, and you -are using Subversion as your revision control system, you can use the -"svn:externals" property to share a single copy of ``ez_setup`` between -projects, so that it will always be up-to-date whenever you check out or update -an individual project, without having to manually update each project to use -a new version. - -However, because Subversion only supports using directories as externals, you -have to turn ``ez_setup.py`` into ``ez_setup/__init__.py`` in order -to do this, then create "externals" definitions that map the ``ez_setup`` -directory into each project. Also, if any of your projects use -``find_packages()`` on their setup directory, you will need to exclude the -resulting ``ez_setup`` package, to keep it from being included in your -distributions, e.g.:: - - setup( - ... - packages = find_packages(exclude=['ez_setup']), - ) - -Of course, the ``ez_setup`` package will still be included in your -packages' source distributions, as it needs to be. - -For your convenience, you may use the following external definition, which will -track the latest version of setuptools:: - - ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup - -You can set this by executing this command in your project directory:: - - svn propedit svn:externals . - -And then adding the line shown above to the file that comes up for editing. - - Setting the ``zip_safe`` flag ----------------------------- From 06123063b78bab12b523f5d6f09125f7282504ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 07:02:53 -0400 Subject: [PATCH 1434/8469] Update transitional note to reflect that the change never took place. --- docs/setuptools.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 235a85b53a..7bc307e062 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1378,20 +1378,21 @@ other copies will ever be loaded!) TRANSITIONAL NOTE ~~~~~~~~~~~~~~~~~ -Setuptools 0.6a automatically calls ``declare_namespace()`` for you at runtime, -but the 0.7a versions will *not*. This is because the automatic declaration +Setuptools automatically calls ``declare_namespace()`` for you at runtime, +but future versions may *not*. This is because the automatic declaration feature has some negative side effects, such as needing to import all namespace packages during the initialization of the ``pkg_resources`` runtime, and also the need for ``pkg_resources`` to be explicitly imported before any namespace -packages work at all. Beginning with the 0.7a releases, you'll be responsible +packages work at all. In some future releases, you'll be responsible for including your own declaration lines, and the automatic declaration feature will be dropped to get rid of the negative side effects. -During the remainder of the 0.6 development cycle, therefore, setuptools will -warn you about missing ``declare_namespace()`` calls in your ``__init__.py`` -files, and you should correct these as soon as possible before setuptools 0.7a1 -is released. Namespace packages without declaration lines will not work -correctly once a user has upgraded to setuptools 0.7a1, so it's important that +During the remainder of the current development cycle, therefore, setuptools +will warn you about missing ``declare_namespace()`` calls in your +``__init__.py`` files, and you should correct these as soon as possible +before the compatibility support is removed. +Namespace packages without declaration lines will not work +correctly once a user has upgraded to a later version, so it's important that you make this change now in order to avoid having your code break in the field. Our apologies for the inconvenience, and thank you for your patience. From c0e1e72eade9a007bb1f22da0bab39befb5301c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 07:09:55 -0400 Subject: [PATCH 1435/8469] Moved 'history' to changes.txt --- CHANGES.txt | 584 ++++++++++++++++++++++++++++++++++++++++++++ docs/setuptools.txt | 494 ------------------------------------- 2 files changed, 584 insertions(+), 494 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 34bdf6510f..b2729aaca1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -755,3 +755,587 @@ easy_install * Immediately close all file handles. This closes Distribute #3. +----- +0.6c9 +----- + + * Fixed a missing files problem when using Windows source distributions on + non-Windows platforms, due to distutils not handling manifest file line + endings correctly. + + * Updated Pyrex support to work with Pyrex 0.9.6 and higher. + + * Minor changes for Jython compatibility, including skipping tests that can't + work on Jython. + + * Fixed not installing eggs in ``install_requires`` if they were also used for + ``setup_requires`` or ``tests_require``. + + * Fixed not fetching eggs in ``install_requires`` when running tests. + + * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools + installations when called from a standalone ``setup.py``. + + * Added a warning if a namespace package is declared, but its parent package + is not also declared as a namespace. + + * Support Subversion 1.5 + + * Removed use of deprecated ``md5`` module if ``hashlib`` is available + + * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice + + * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's + ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``. + + * Ensure that _full_name is set on all shared libs before extensions are + checked for shared lib usage. (Fixes a bug in the experimental shared + library build support.) + + * Fix to allow unpacked eggs containing native libraries to fail more + gracefully under Google App Engine (with an ``ImportError`` loading the + C-based module, instead of getting a ``NameError``). + +----- +0.6c7 +----- + + * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and + ``egg_info`` command failing on new, uncommitted SVN directories. + + * Fix import problems with nested namespace packages installed via + ``--root`` or ``--single-version-externally-managed``, due to the + parent package not having the child package as an attribute. + +----- +0.6c6 +----- + + * Added ``--egg-path`` option to ``develop`` command, allowing you to force + ``.egg-link`` files to use relative paths (allowing them to be shared across + platforms on a networked drive). + + * Fix not building binary RPMs correctly. + + * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with + bash-compatible shells. + + * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there + was whitespace inside a quoted argument or at the end of the ``#!`` line + (a regression introduced in 0.6c4). + + * Fix ``test`` command possibly failing if an older version of the project + being tested was installed on ``sys.path`` ahead of the test source + directory. + + * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in + their names as packages. + +----- +0.6c5 +----- + + * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg`` + packages under Python versions less than 2.5. + + * Fix uploaded ``bdist_wininst`` packages being described as suitable for + "any" version by Python 2.5, even if a ``--target-version`` was specified. + +----- +0.6c4 +----- + + * Overhauled Windows script wrapping to support ``bdist_wininst`` better. + Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or + ``#!pythonw.exe`` as the executable name (even when built on non-Windows + platforms!), and the wrappers will look for the executable in the script's + parent directory (which should find the right version of Python). + + * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or + ``bdist_wininst`` under Python 2.3 and 2.4. + + * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is + prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish + platforms. (This is mainly so that setuptools itself can have a single-file + installer on Unix, without doing multiple downloads, dealing with firewalls, + etc.) + + * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files + + * Use cross-platform relative paths in ``easy-install.pth`` when doing + ``develop`` and the source directory is a subdirectory of the installation + target directory. + + * Fix a problem installing eggs with a system packaging tool if the project + contained an implicit namespace package; for example if the ``setup()`` + listed a namespace package ``foo.bar`` without explicitly listing ``foo`` + as a namespace package. + +----- +0.6c3 +----- + + * Fixed breakages caused by Subversion 1.4's new "working copy" format + +----- +0.6c2 +----- + + * The ``ez_setup`` module displays the conflicting version of setuptools (and + its installation location) when a script requests a version that's not + available. + + * Running ``setup.py develop`` on a setuptools-using project will now install + setuptools if needed, instead of only downloading the egg. + +----- +0.6c1 +----- + + * Fixed ``AttributeError`` when trying to download a ``setup_requires`` + dependency when a distribution lacks a ``dependency_links`` setting. + + * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so + as to play better with packaging tools that complain about zero-length + files. + + * Made ``setup.py develop`` respect the ``--no-deps`` option, which it + previously was ignoring. + + * Support ``extra_path`` option to ``setup()`` when ``install`` is run in + backward-compatibility mode. + + * Source distributions now always include a ``setup.cfg`` file that explicitly + sets ``egg_info`` options such that they produce an identical version number + to the source distribution's version number. (Previously, the default + version number could be different due to the use of ``--tag-date``, or if + the version was overridden on the command line that built the source + distribution.) + +----- +0.6b4 +----- + + * Fix ``register`` not obeying name/version set by ``egg_info`` command, if + ``egg_info`` wasn't explicitly run first on the same command line. + + * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info`` + command, to allow suppressing tags configured in ``setup.cfg``. + + * Fixed redundant warnings about missing ``README`` file(s); it should now + appear only if you are actually a source distribution. + +----- +0.6b3 +----- + + * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``. + + * Allow ``.py`` files found by the ``include_package_data`` option to be + automatically included. Remove duplicate data file matches if both + ``include_package_data`` and ``package_data`` are used to refer to the same + files. + +----- +0.6b1 +----- + + * Strip ``module`` from the end of compiled extension modules when computing + the name of a ``.py`` loader/wrapper. (Python's import machinery ignores + this suffix when searching for an extension module.) + +------ +0.6a11 +------ + + * Added ``test_loader`` keyword to support custom test loaders + + * Added ``setuptools.file_finders`` entry point group to allow implementing + revision control plugins. + + * Added ``--identity`` option to ``upload`` command. + + * Added ``dependency_links`` to allow specifying URLs for ``--find-links``. + + * Enhanced test loader to scan packages as well as modules, and call + ``additional_tests()`` if present to get non-unittest tests. + + * Support namespace packages in conjunction with system packagers, by omitting + the installation of any ``__init__.py`` files for namespace packages, and + adding a special ``.pth`` file to create a working package in + ``sys.modules``. + + * Made ``--single-version-externally-managed`` automatic when ``--root`` is + used, so that most system packagers won't require special support for + setuptools. + + * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or + other configuration files for their option defaults when installing, and + also made the install use ``--multi-version`` mode so that the project + directory doesn't need to support .pth files. + + * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading + it. Previously, the file could be left open and the actual error would be + masked by problems trying to remove the open file on Windows systems. + +------ +0.6a10 +------ + + * Fixed the ``develop`` command ignoring ``--find-links``. + +----- +0.6a9 +----- + + * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to + create source distributions. ``MANIFEST.in`` is still read and processed, + as are the standard defaults and pruning. But the manifest is built inside + the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt + every time the ``egg_info`` command is run. + + * Added the ``include_package_data`` keyword to ``setup()``, allowing you to + automatically include any package data listed in revision control or + ``MANIFEST.in`` + + * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to + trim back files included via the ``package_data`` and + ``include_package_data`` options. + + * Fixed ``--tag-svn-revision`` not working when run from a source + distribution. + + * Added warning for namespace packages with missing ``declare_namespace()`` + + * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages + requiring ``nose`` to run unit tests can make this dependency optional + unless the ``test`` command is run. + + * Made all commands that use ``easy_install`` respect its configuration + options, as this was causing some problems with ``setup.py install``. + + * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so + that you can process a directory tree through a processing filter as if it + were a zipfile or tarfile. + + * Added an internal ``install_egg_info`` command to use as part of old-style + ``install`` operations, that installs an ``.egg-info`` directory with the + package. + + * Added a ``--single-version-externally-managed`` option to the ``install`` + command so that you can more easily wrap a "flat" egg in a system package. + + * Enhanced ``bdist_rpm`` so that it installs single-version eggs that + don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, + since all RPMs are now built in a more backwards-compatible format. + + * Support full roundtrip translation of eggs to and from ``bdist_wininst`` + format. Running ``bdist_wininst`` on a setuptools-based package wraps the + egg in an .exe that will safely install it as an egg (i.e., with metadata + and entry-point wrapper scripts), and ``easy_install`` can turn the .exe + back into an ``.egg`` file or directory and install it as such. + + +----- +0.6a8 +----- + + * Fixed some problems building extensions when Pyrex was installed, especially + with Python 2.4 and/or packages using SWIG. + + * Made ``develop`` command accept all the same options as ``easy_install``, + and use the ``easy_install`` command's configuration settings as defaults. + + * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision + number from ``PKG-INFO`` in case it is being run on a source distribution of + a snapshot taken from a Subversion-based project. + + * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being + installed as data, adding them to ``native_libs.txt`` automatically. + + * Fixed some problems with fresh checkouts of projects that don't include + ``.egg-info/PKG-INFO`` under revision control and put the project's source + code directly in the project directory. If such a package had any + requirements that get processed before the ``egg_info`` command can be run, + the setup scripts would fail with a "Missing 'Version:' header and/or + PKG-INFO file" error, because the egg runtime interpreted the unbuilt + metadata in a directory on ``sys.path`` (i.e. the current directory) as + being a corrupted egg. Setuptools now monkeypatches the distribution + metadata cache to pretend that the egg has valid version information, until + it has a chance to make it actually be so (via the ``egg_info`` command). + +----- +0.6a5 +----- + + * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. + +----- +0.6a3 +----- + + * Added ``gui_scripts`` entry point group to allow installing GUI scripts + on Windows and other platforms. (The special handling is only for Windows; + other platforms are treated the same as for ``console_scripts``.) + +----- +0.6a2 +----- + + * Added ``console_scripts`` entry point group to allow installing scripts + without the need to create separate script files. On Windows, console + scripts get an ``.exe`` wrapper so you can just type their name. On other + platforms, the scripts are written without a file extension. + +----- +0.6a1 +----- + + * Added support for building "old-style" RPMs that don't install an egg for + the target package, using a ``--no-egg`` option. + + * The ``build_ext`` command now works better when using the ``--inplace`` + option and multiple Python versions. It now makes sure that all extensions + match the current Python version, even if newer copies were built for a + different Python version. + + * The ``upload`` command no longer attaches an extra ``.zip`` when uploading + eggs, as PyPI now supports egg uploads without trickery. + + * The ``ez_setup`` script/module now displays a warning before downloading + the setuptools egg, and attempts to check the downloaded egg against an + internal MD5 checksum table. + + * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the + latest revision number; it was using the revision number of the directory + containing ``setup.py``, not the highest revision number in the project. + + * Added ``eager_resources`` setup argument + + * The ``sdist`` command now recognizes Subversion "deleted file" entries and + does not include them in source distributions. + + * ``setuptools`` now embeds itself more thoroughly into the distutils, so that + other distutils extensions (e.g. py2exe, py2app) will subclass setuptools' + versions of things, rather than the native distutils ones. + + * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``; + ``setup_requires`` allows you to automatically find and download packages + that are needed in order to *build* your project (as opposed to running it). + + * ``setuptools`` now finds its commands, ``setup()`` argument validators, and + metadata writers using entry points, so that they can be extended by + third-party packages. See `Creating distutils Extensions`_ above for more + details. + + * The vestigial ``depends`` command has been removed. It was never finished + or documented, and never would have worked without EasyInstall - which it + pre-dated and was never compatible with. + +------ +0.5a12 +------ + + * The zip-safety scanner now checks for modules that might be used with + ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't + handle ``-m`` on zipped modules. + +------ +0.5a11 +------ + + * Fix breakage of the "develop" command that was caused by the addition of + ``--always-unzip`` to the ``easy_install`` command. + +----- +0.5a9 +----- + + * Include ``svn:externals`` directories in source distributions as well as + normal subversion-controlled files and directories. + + * Added ``exclude=patternlist`` option to ``setuptools.find_packages()`` + + * Changed --tag-svn-revision to include an "r" in front of the revision number + for better readability. + + * Added ability to build eggs without including source files (except for any + scripts, of course), using the ``--exclude-source-files`` option to + ``bdist_egg``. + + * ``setup.py install`` now automatically detects when an "unmanaged" package + or module is going to be on ``sys.path`` ahead of a package being installed, + thereby preventing the newer version from being imported. If this occurs, + a warning message is output to ``sys.stderr``, but installation proceeds + anyway. The warning message informs the user what files or directories + need deleting, and advises them they can also use EasyInstall (with the + ``--delete-conflicting`` option) to do it automatically. + + * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata + directory that lists all top-level modules and packages in the distribution. + This is used by the ``easy_install`` command to find possibly-conflicting + "unmanaged" packages when installing the distribution. + + * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``. + Added package analysis to determine zip-safety if the ``zip_safe`` flag + is not given, and advise the author regarding what code might need changing. + + * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``. + +----- +0.5a8 +----- + + * The "egg_info" command now always sets the distribution metadata to "safe" + forms of the distribution name and version, so that distribution files will + be generated with parseable names (i.e., ones that don't include '-' in the + name or version). Also, this means that if you use the various ``--tag`` + options of "egg_info", any distributions generated will use the tags in the + version, not just egg distributions. + + * Added support for defining command aliases in distutils configuration files, + under the "[aliases]" section. To prevent recursion and to allow aliases to + call the command of the same name, a given alias can be expanded only once + per command-line invocation. You can define new aliases with the "alias" + command, either for the local, global, or per-user configuration. + + * Added "rotate" command to delete old distribution files, given a set of + patterns to match and the number of files to keep. (Keeps the most + recently-modified distribution files matching each pattern.) + + * Added "saveopts" command that saves all command-line options for the current + invocation to the local, global, or per-user configuration file. Useful for + setting defaults without having to hand-edit a configuration file. + + * Added a "setopt" command that sets a single option in a specified distutils + configuration file. + +----- +0.5a7 +----- + + * Added "upload" support for egg and source distributions, including a bug + fix for "upload" and a temporary workaround for lack of .egg support in + PyPI. + +----- +0.5a6 +----- + + * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it + will include all files under revision control (CVS or Subversion) in the + current directory, and it will regenerate the list every time you create a + source distribution, not just when you tell it to. This should make the + default "do what you mean" more often than the distutils' default behavior + did, while still retaining the old behavior in the presence of MANIFEST.in. + + * Fixed the "develop" command always updating .pth files, even if you + specified ``-n`` or ``--dry-run``. + + * Slightly changed the format of the generated version when you use + ``--tag-build`` on the "egg_info" command, so that you can make tagged + revisions compare *lower* than the version specified in setup.py (e.g. by + using ``--tag-build=dev``). + +----- +0.5a5 +----- + + * Added ``develop`` command to ``setuptools``-based packages. This command + installs an ``.egg-link`` pointing to the package's source directory, and + script wrappers that ``execfile()`` the source versions of the package's + scripts. This lets you put your development checkout(s) on sys.path without + having to actually install them. (To uninstall the link, use + use ``setup.py develop --uninstall``.) + + * Added ``egg_info`` command to ``setuptools``-based packages. This command + just creates or updates the "projectname.egg-info" directory, without + building an egg. (It's used by the ``bdist_egg``, ``test``, and ``develop`` + commands.) + + * Enhanced the ``test`` command so that it doesn't install the package, but + instead builds any C extensions in-place, updates the ``.egg-info`` + metadata, adds the source directory to ``sys.path``, and runs the tests + directly on the source. This avoids an "unmanaged" installation of the + package to ``site-packages`` or elsewhere. + + * Made ``easy_install`` a standard ``setuptools`` command, moving it from + the ``easy_install`` module to ``setuptools.command.easy_install``. Note + that if you were importing or extending it, you must now change your imports + accordingly. ``easy_install.py`` is still installed as a script, but not as + a module. + +----- +0.5a4 +----- + + * Setup scripts using setuptools can now list their dependencies directly in + the setup.py file, without having to manually create a ``depends.txt`` file. + The ``install_requires`` and ``extras_require`` arguments to ``setup()`` + are used to create a dependencies file automatically. If you are manually + creating ``depends.txt`` right now, please switch to using these setup + arguments as soon as practical, because ``depends.txt`` support will be + removed in the 0.6 release cycle. For documentation on the new arguments, + see the ``setuptools.dist.Distribution`` class. + + * Setup scripts using setuptools now always install using ``easy_install`` + internally, for ease of uninstallation and upgrading. + +----- +0.5a1 +----- + + * Added support for "self-installation" bootstrapping. Packages can now + include ``ez_setup.py`` in their source distribution, and add the following + to their ``setup.py``, in order to automatically bootstrap installation of + setuptools as part of their setup process:: + + from ez_setup import use_setuptools + use_setuptools() + + from setuptools import setup + # etc... + +----- +0.4a2 +----- + + * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools + installation easier, and to allow distributions using setuptools to avoid + having to include setuptools in their source distribution. + + * All downloads are now managed by the ``PackageIndex`` class (which is now + subclassable and replaceable), so that embedders can more easily override + download logic, give download progress reports, etc. The class has also + been moved to the new ``setuptools.package_index`` module. + + * The ``Installer`` class no longer handles downloading, manages a temporary + directory, or tracks the ``zip_ok`` option. Downloading is now handled + by ``PackageIndex``, and ``Installer`` has become an ``easy_install`` + command class based on ``setuptools.Command``. + + * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup + script in a directory sandbox, and a new ``setuptools.archive_util`` module + with an ``unpack_archive()`` API. These were split out of EasyInstall to + allow reuse by other tools and applications. + + * ``setuptools.Command`` now supports reinitializing commands using keyword + arguments to set/reset options. Also, ``Command`` subclasses can now set + their ``command_consumes_arguments`` attribute to ``True`` in order to + receive an ``args`` option containing the rest of the command line. + +----- +0.3a2 +----- + + * Added new options to ``bdist_egg`` to allow tagging the egg's version number + with a subversion revision number, the current date, or an explicit tag + value. Run ``setup.py bdist_egg --help`` to get more information. + + * Misc. bug fixes + +----- +0.3a1 +----- + + * Initial release. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7bc307e062..6e9a692741 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2685,500 +2685,6 @@ XXX XXX -History -======= - -0.6c9 - * Fixed a missing files problem when using Windows source distributions on - non-Windows platforms, due to distutils not handling manifest file line - endings correctly. - - * Updated Pyrex support to work with Pyrex 0.9.6 and higher. - - * Minor changes for Jython compatibility, including skipping tests that can't - work on Jython. - - * Fixed not installing eggs in ``install_requires`` if they were also used for - ``setup_requires`` or ``tests_require``. - - * Fixed not fetching eggs in ``install_requires`` when running tests. - - * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools - installations when called from a standalone ``setup.py``. - - * Added a warning if a namespace package is declared, but its parent package - is not also declared as a namespace. - - * Support Subversion 1.5 - - * Removed use of deprecated ``md5`` module if ``hashlib`` is available - - * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice - - * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's - ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``. - - * Ensure that _full_name is set on all shared libs before extensions are - checked for shared lib usage. (Fixes a bug in the experimental shared - library build support.) - - * Fix to allow unpacked eggs containing native libraries to fail more - gracefully under Google App Engine (with an ``ImportError`` loading the - C-based module, instead of getting a ``NameError``). - -0.6c7 - * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and - ``egg_info`` command failing on new, uncommitted SVN directories. - - * Fix import problems with nested namespace packages installed via - ``--root`` or ``--single-version-externally-managed``, due to the - parent package not having the child package as an attribute. - -0.6c6 - * Added ``--egg-path`` option to ``develop`` command, allowing you to force - ``.egg-link`` files to use relative paths (allowing them to be shared across - platforms on a networked drive). - - * Fix not building binary RPMs correctly. - - * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with - bash-compatible shells. - - * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there - was whitespace inside a quoted argument or at the end of the ``#!`` line - (a regression introduced in 0.6c4). - - * Fix ``test`` command possibly failing if an older version of the project - being tested was installed on ``sys.path`` ahead of the test source - directory. - - * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in - their names as packages. - -0.6c5 - * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg`` - packages under Python versions less than 2.5. - - * Fix uploaded ``bdist_wininst`` packages being described as suitable for - "any" version by Python 2.5, even if a ``--target-version`` was specified. - -0.6c4 - * Overhauled Windows script wrapping to support ``bdist_wininst`` better. - Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or - ``#!pythonw.exe`` as the executable name (even when built on non-Windows - platforms!), and the wrappers will look for the executable in the script's - parent directory (which should find the right version of Python). - - * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or - ``bdist_wininst`` under Python 2.3 and 2.4. - - * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is - prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish - platforms. (This is mainly so that setuptools itself can have a single-file - installer on Unix, without doing multiple downloads, dealing with firewalls, - etc.) - - * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files - - * Use cross-platform relative paths in ``easy-install.pth`` when doing - ``develop`` and the source directory is a subdirectory of the installation - target directory. - - * Fix a problem installing eggs with a system packaging tool if the project - contained an implicit namespace package; for example if the ``setup()`` - listed a namespace package ``foo.bar`` without explicitly listing ``foo`` - as a namespace package. - -0.6c3 - * Fixed breakages caused by Subversion 1.4's new "working copy" format - -0.6c2 - * The ``ez_setup`` module displays the conflicting version of setuptools (and - its installation location) when a script requests a version that's not - available. - - * Running ``setup.py develop`` on a setuptools-using project will now install - setuptools if needed, instead of only downloading the egg. - -0.6c1 - * Fixed ``AttributeError`` when trying to download a ``setup_requires`` - dependency when a distribution lacks a ``dependency_links`` setting. - - * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so - as to play better with packaging tools that complain about zero-length - files. - - * Made ``setup.py develop`` respect the ``--no-deps`` option, which it - previously was ignoring. - - * Support ``extra_path`` option to ``setup()`` when ``install`` is run in - backward-compatibility mode. - - * Source distributions now always include a ``setup.cfg`` file that explicitly - sets ``egg_info`` options such that they produce an identical version number - to the source distribution's version number. (Previously, the default - version number could be different due to the use of ``--tag-date``, or if - the version was overridden on the command line that built the source - distribution.) - -0.6b4 - * Fix ``register`` not obeying name/version set by ``egg_info`` command, if - ``egg_info`` wasn't explicitly run first on the same command line. - - * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info`` - command, to allow suppressing tags configured in ``setup.cfg``. - - * Fixed redundant warnings about missing ``README`` file(s); it should now - appear only if you are actually a source distribution. - -0.6b3 - * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``. - - * Allow ``.py`` files found by the ``include_package_data`` option to be - automatically included. Remove duplicate data file matches if both - ``include_package_data`` and ``package_data`` are used to refer to the same - files. - -0.6b1 - * Strip ``module`` from the end of compiled extension modules when computing - the name of a ``.py`` loader/wrapper. (Python's import machinery ignores - this suffix when searching for an extension module.) - -0.6a11 - * Added ``test_loader`` keyword to support custom test loaders - - * Added ``setuptools.file_finders`` entry point group to allow implementing - revision control plugins. - - * Added ``--identity`` option to ``upload`` command. - - * Added ``dependency_links`` to allow specifying URLs for ``--find-links``. - - * Enhanced test loader to scan packages as well as modules, and call - ``additional_tests()`` if present to get non-unittest tests. - - * Support namespace packages in conjunction with system packagers, by omitting - the installation of any ``__init__.py`` files for namespace packages, and - adding a special ``.pth`` file to create a working package in - ``sys.modules``. - - * Made ``--single-version-externally-managed`` automatic when ``--root`` is - used, so that most system packagers won't require special support for - setuptools. - - * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or - other configuration files for their option defaults when installing, and - also made the install use ``--multi-version`` mode so that the project - directory doesn't need to support .pth files. - - * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading - it. Previously, the file could be left open and the actual error would be - masked by problems trying to remove the open file on Windows systems. - -0.6a10 - * Fixed the ``develop`` command ignoring ``--find-links``. - -0.6a9 - * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to - create source distributions. ``MANIFEST.in`` is still read and processed, - as are the standard defaults and pruning. But the manifest is built inside - the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt - every time the ``egg_info`` command is run. - - * Added the ``include_package_data`` keyword to ``setup()``, allowing you to - automatically include any package data listed in revision control or - ``MANIFEST.in`` - - * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to - trim back files included via the ``package_data`` and - ``include_package_data`` options. - - * Fixed ``--tag-svn-revision`` not working when run from a source - distribution. - - * Added warning for namespace packages with missing ``declare_namespace()`` - - * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages - requiring ``nose`` to run unit tests can make this dependency optional - unless the ``test`` command is run. - - * Made all commands that use ``easy_install`` respect its configuration - options, as this was causing some problems with ``setup.py install``. - - * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so - that you can process a directory tree through a processing filter as if it - were a zipfile or tarfile. - - * Added an internal ``install_egg_info`` command to use as part of old-style - ``install`` operations, that installs an ``.egg-info`` directory with the - package. - - * Added a ``--single-version-externally-managed`` option to the ``install`` - command so that you can more easily wrap a "flat" egg in a system package. - - * Enhanced ``bdist_rpm`` so that it installs single-version eggs that - don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, - since all RPMs are now built in a more backwards-compatible format. - - * Support full roundtrip translation of eggs to and from ``bdist_wininst`` - format. Running ``bdist_wininst`` on a setuptools-based package wraps the - egg in an .exe that will safely install it as an egg (i.e., with metadata - and entry-point wrapper scripts), and ``easy_install`` can turn the .exe - back into an ``.egg`` file or directory and install it as such. - - -0.6a8 - * Fixed some problems building extensions when Pyrex was installed, especially - with Python 2.4 and/or packages using SWIG. - - * Made ``develop`` command accept all the same options as ``easy_install``, - and use the ``easy_install`` command's configuration settings as defaults. - - * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision - number from ``PKG-INFO`` in case it is being run on a source distribution of - a snapshot taken from a Subversion-based project. - - * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being - installed as data, adding them to ``native_libs.txt`` automatically. - - * Fixed some problems with fresh checkouts of projects that don't include - ``.egg-info/PKG-INFO`` under revision control and put the project's source - code directly in the project directory. If such a package had any - requirements that get processed before the ``egg_info`` command can be run, - the setup scripts would fail with a "Missing 'Version:' header and/or - PKG-INFO file" error, because the egg runtime interpreted the unbuilt - metadata in a directory on ``sys.path`` (i.e. the current directory) as - being a corrupted egg. Setuptools now monkeypatches the distribution - metadata cache to pretend that the egg has valid version information, until - it has a chance to make it actually be so (via the ``egg_info`` command). - -0.6a5 - * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. - -0.6a3 - * Added ``gui_scripts`` entry point group to allow installing GUI scripts - on Windows and other platforms. (The special handling is only for Windows; - other platforms are treated the same as for ``console_scripts``.) - -0.6a2 - * Added ``console_scripts`` entry point group to allow installing scripts - without the need to create separate script files. On Windows, console - scripts get an ``.exe`` wrapper so you can just type their name. On other - platforms, the scripts are written without a file extension. - -0.6a1 - * Added support for building "old-style" RPMs that don't install an egg for - the target package, using a ``--no-egg`` option. - - * The ``build_ext`` command now works better when using the ``--inplace`` - option and multiple Python versions. It now makes sure that all extensions - match the current Python version, even if newer copies were built for a - different Python version. - - * The ``upload`` command no longer attaches an extra ``.zip`` when uploading - eggs, as PyPI now supports egg uploads without trickery. - - * The ``ez_setup`` script/module now displays a warning before downloading - the setuptools egg, and attempts to check the downloaded egg against an - internal MD5 checksum table. - - * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the - latest revision number; it was using the revision number of the directory - containing ``setup.py``, not the highest revision number in the project. - - * Added ``eager_resources`` setup argument - - * The ``sdist`` command now recognizes Subversion "deleted file" entries and - does not include them in source distributions. - - * ``setuptools`` now embeds itself more thoroughly into the distutils, so that - other distutils extensions (e.g. py2exe, py2app) will subclass setuptools' - versions of things, rather than the native distutils ones. - - * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``; - ``setup_requires`` allows you to automatically find and download packages - that are needed in order to *build* your project (as opposed to running it). - - * ``setuptools`` now finds its commands, ``setup()`` argument validators, and - metadata writers using entry points, so that they can be extended by - third-party packages. See `Creating distutils Extensions`_ above for more - details. - - * The vestigial ``depends`` command has been removed. It was never finished - or documented, and never would have worked without EasyInstall - which it - pre-dated and was never compatible with. - -0.5a12 - * The zip-safety scanner now checks for modules that might be used with - ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't - handle ``-m`` on zipped modules. - -0.5a11 - * Fix breakage of the "develop" command that was caused by the addition of - ``--always-unzip`` to the ``easy_install`` command. - -0.5a9 - * Include ``svn:externals`` directories in source distributions as well as - normal subversion-controlled files and directories. - - * Added ``exclude=patternlist`` option to ``setuptools.find_packages()`` - - * Changed --tag-svn-revision to include an "r" in front of the revision number - for better readability. - - * Added ability to build eggs without including source files (except for any - scripts, of course), using the ``--exclude-source-files`` option to - ``bdist_egg``. - - * ``setup.py install`` now automatically detects when an "unmanaged" package - or module is going to be on ``sys.path`` ahead of a package being installed, - thereby preventing the newer version from being imported. If this occurs, - a warning message is output to ``sys.stderr``, but installation proceeds - anyway. The warning message informs the user what files or directories - need deleting, and advises them they can also use EasyInstall (with the - ``--delete-conflicting`` option) to do it automatically. - - * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata - directory that lists all top-level modules and packages in the distribution. - This is used by the ``easy_install`` command to find possibly-conflicting - "unmanaged" packages when installing the distribution. - - * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``. - Added package analysis to determine zip-safety if the ``zip_safe`` flag - is not given, and advise the author regarding what code might need changing. - - * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``. - -0.5a8 - * The "egg_info" command now always sets the distribution metadata to "safe" - forms of the distribution name and version, so that distribution files will - be generated with parseable names (i.e., ones that don't include '-' in the - name or version). Also, this means that if you use the various ``--tag`` - options of "egg_info", any distributions generated will use the tags in the - version, not just egg distributions. - - * Added support for defining command aliases in distutils configuration files, - under the "[aliases]" section. To prevent recursion and to allow aliases to - call the command of the same name, a given alias can be expanded only once - per command-line invocation. You can define new aliases with the "alias" - command, either for the local, global, or per-user configuration. - - * Added "rotate" command to delete old distribution files, given a set of - patterns to match and the number of files to keep. (Keeps the most - recently-modified distribution files matching each pattern.) - - * Added "saveopts" command that saves all command-line options for the current - invocation to the local, global, or per-user configuration file. Useful for - setting defaults without having to hand-edit a configuration file. - - * Added a "setopt" command that sets a single option in a specified distutils - configuration file. - -0.5a7 - * Added "upload" support for egg and source distributions, including a bug - fix for "upload" and a temporary workaround for lack of .egg support in - PyPI. - -0.5a6 - * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it - will include all files under revision control (CVS or Subversion) in the - current directory, and it will regenerate the list every time you create a - source distribution, not just when you tell it to. This should make the - default "do what you mean" more often than the distutils' default behavior - did, while still retaining the old behavior in the presence of MANIFEST.in. - - * Fixed the "develop" command always updating .pth files, even if you - specified ``-n`` or ``--dry-run``. - - * Slightly changed the format of the generated version when you use - ``--tag-build`` on the "egg_info" command, so that you can make tagged - revisions compare *lower* than the version specified in setup.py (e.g. by - using ``--tag-build=dev``). - -0.5a5 - * Added ``develop`` command to ``setuptools``-based packages. This command - installs an ``.egg-link`` pointing to the package's source directory, and - script wrappers that ``execfile()`` the source versions of the package's - scripts. This lets you put your development checkout(s) on sys.path without - having to actually install them. (To uninstall the link, use - use ``setup.py develop --uninstall``.) - - * Added ``egg_info`` command to ``setuptools``-based packages. This command - just creates or updates the "projectname.egg-info" directory, without - building an egg. (It's used by the ``bdist_egg``, ``test``, and ``develop`` - commands.) - - * Enhanced the ``test`` command so that it doesn't install the package, but - instead builds any C extensions in-place, updates the ``.egg-info`` - metadata, adds the source directory to ``sys.path``, and runs the tests - directly on the source. This avoids an "unmanaged" installation of the - package to ``site-packages`` or elsewhere. - - * Made ``easy_install`` a standard ``setuptools`` command, moving it from - the ``easy_install`` module to ``setuptools.command.easy_install``. Note - that if you were importing or extending it, you must now change your imports - accordingly. ``easy_install.py`` is still installed as a script, but not as - a module. - -0.5a4 - * Setup scripts using setuptools can now list their dependencies directly in - the setup.py file, without having to manually create a ``depends.txt`` file. - The ``install_requires`` and ``extras_require`` arguments to ``setup()`` - are used to create a dependencies file automatically. If you are manually - creating ``depends.txt`` right now, please switch to using these setup - arguments as soon as practical, because ``depends.txt`` support will be - removed in the 0.6 release cycle. For documentation on the new arguments, - see the ``setuptools.dist.Distribution`` class. - - * Setup scripts using setuptools now always install using ``easy_install`` - internally, for ease of uninstallation and upgrading. - -0.5a1 - * Added support for "self-installation" bootstrapping. Packages can now - include ``ez_setup.py`` in their source distribution, and add the following - to their ``setup.py``, in order to automatically bootstrap installation of - setuptools as part of their setup process:: - - from ez_setup import use_setuptools - use_setuptools() - - from setuptools import setup - # etc... - -0.4a2 - * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools - installation easier, and to allow distributions using setuptools to avoid - having to include setuptools in their source distribution. - - * All downloads are now managed by the ``PackageIndex`` class (which is now - subclassable and replaceable), so that embedders can more easily override - download logic, give download progress reports, etc. The class has also - been moved to the new ``setuptools.package_index`` module. - - * The ``Installer`` class no longer handles downloading, manages a temporary - directory, or tracks the ``zip_ok`` option. Downloading is now handled - by ``PackageIndex``, and ``Installer`` has become an ``easy_install`` - command class based on ``setuptools.Command``. - - * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup - script in a directory sandbox, and a new ``setuptools.archive_util`` module - with an ``unpack_archive()`` API. These were split out of EasyInstall to - allow reuse by other tools and applications. - - * ``setuptools.Command`` now supports reinitializing commands using keyword - arguments to set/reset options. Also, ``Command`` subclasses can now set - their ``command_consumes_arguments`` attribute to ``True`` in order to - receive an ``args`` option containing the rest of the command line. - -0.3a2 - * Added new options to ``bdist_egg`` to allow tagging the egg's version number - with a subversion revision number, the current date, or an explicit tag - value. Run ``setup.py bdist_egg --help`` to get more information. - - * Misc. bug fixes - -0.3a1 - * Initial release. Mailing List and Bug Tracker ============================ From 7f2f3ad3ef977afd8973abd180390692e23c2e10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 07:15:41 -0400 Subject: [PATCH 1436/8469] Update links to point to local documentation, not legacy docs. --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 6e9a692741..9cda719558 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -88,9 +88,9 @@ current stable version of setuptools. In particular, be sure to read the section on `Custom Installation Locations`_ if you are installing anywhere other than Python's ``site-packages`` directory. -.. _EasyInstall Installation Instructions: http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions +.. _EasyInstall Installation Instructions: easy_install.html#installation-instructions -.. _Custom Installation Locations: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations +.. _Custom Installation Locations: easy_install.html#custom-installation-locations If you want the current in-development version of setuptools, you should first install a stable version, and then run:: From b0126d08b69e1eb9e238db49767e2120f6079a12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 07:16:06 -0400 Subject: [PATCH 1437/8469] Fix typo --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 9cda719558..bd80b960d0 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -652,7 +652,7 @@ A more complete example would be: ``vcs+proto://host/path@revision#egg=project-version`` Be careful with the version. It should match the one inside the project files. -If you want do disregard the version, you have to omit it both in the +If you want to disregard the version, you have to omit it both in the ``requires`` and in the URL's fragment. This will do a checkout (or a clone, in Git and Mercurial parlance) to a From 82cff1a329896a88f3ee53a9303c295efc99206e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Aug 2013 07:23:37 -0400 Subject: [PATCH 1438/8469] Updated more references to EasyInstall documentation. --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index bd80b960d0..dfa9ecdd1c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -20,7 +20,7 @@ package from source and doesn't have a suitable version already installed. Feature Highlights: * Automatically find/download/install/upgrade dependencies at build time using - the `EasyInstall tool `_, + the `EasyInstall tool `_, which supports downloading via HTTP, FTP, Subversion, and SourceForge, and automatically scans web pages linked from PyPI to find download links. (It's the closest thing to CPAN currently available for Python.) @@ -1947,7 +1947,7 @@ them in a ``[develop]`` section or on the command line. ============================================ This command runs the `EasyInstall tool -`_ for you. It is exactly +`_ for you. It is exactly equivalent to running the ``easy_install`` command. All command line arguments following this command are consumed and not processed further by the distutils, so this must be the last command listed on the command line. Please see From 409327e443b73125a1a8803a5323a6dadbef7119 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 20:25:04 -0400 Subject: [PATCH 1439/8469] Clean up imports --- setuptools.egg-info/requires.txt | 14 +++++++------- setuptools/tests/test_resources.py | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 668f4ee242..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[certs] -certifi==0.0.8 - -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[certs] +certifi==0.0.8 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index df5261d1ff..949ebef4f6 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -1,11 +1,21 @@ #!/usr/bin/python # -*- coding: utf-8 -*- # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove -from unittest import TestCase, makeSuite; from pkg_resources import * + +import os +import sys +import tempfile +import shutil +from unittest import TestCase + +import pkg_resources +from pkg_resources import * + from setuptools.command.easy_install import get_script_header, is_sh from setuptools.compat import StringIO, iteritems -import os, pkg_resources, sys, tempfile, shutil -try: frozenset + +try: + frozenset except NameError: from sets import ImmutableSet as frozenset From a2d99b96997341955cd281ab8454b60555c0af48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 20:36:15 -0400 Subject: [PATCH 1440/8469] Spruce up syntax to to address linter warnings --- setuptools/tests/test_resources.py | 68 ++++++++++++------------------ 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 949ebef4f6..909f1df356 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove +# NOTE: the shebang and encoding lines are for ScriptHeaderTests do not remove import os import sys @@ -83,14 +83,20 @@ def testCollection(self): # Nominal case: no distros on path, should yield all applicable self.assertEqual(ad.best_match(req,ws).version, '1.9') # If a matching distro is already installed, should return only that - ws.add(foo14); self.assertEqual(ad.best_match(req,ws).version, '1.4') + ws.add(foo14) + self.assertEqual(ad.best_match(req,ws).version, '1.4') # If the first matching distro is unsuitable, it's a version conflict - ws = WorkingSet([]); ws.add(foo12); ws.add(foo14) + ws = WorkingSet([]) + ws.add(foo12) + ws.add(foo14) self.assertRaises(VersionConflict, ad.best_match, req, ws) # If more than one match on the path, the first one takes precedence - ws = WorkingSet([]); ws.add(foo14); ws.add(foo12); ws.add(foo14); + ws = WorkingSet([]) + ws.add(foo14) + ws.add(foo12) + ws.add(foo14) self.assertEqual(ad.best_match(req,ws).version, '1.4') def checkFooPkg(self,d): @@ -127,7 +133,6 @@ def testDistroMetadata(self): ) self.checkFooPkg(d) - def distRequires(self, txt): return Distribution("/foo", metadata=Metadata(('depends.txt', txt))) @@ -141,11 +146,11 @@ def testDistroDependsSimple(self): for v in "Twisted>=1.5", "Twisted>=1.5\nZConfig>=2.0": self.checkRequires(self.distRequires(v), v) - def testResolve(self): - ad = Environment([]); ws = WorkingSet([]) + ad = Environment([]) + ws = WorkingSet([]) # Resolving no requirements -> nothing to install - self.assertEqual( list(ws.resolve([],ad)), [] ) + self.assertEqual(list(ws.resolve([],ad)), []) # Request something not in the collection -> DistributionNotFound self.assertRaises( DistributionNotFound, ws.resolve, parse_requirements("Foo"), ad @@ -154,7 +159,8 @@ def testResolve(self): "/foo_dir/Foo-1.2.egg", metadata=Metadata(('depends.txt', "[bar]\nBaz>=2.0")) ) - ad.add(Foo); ad.add(Distribution.from_filename("Foo-0.9.egg")) + ad.add(Foo) + ad.add(Distribution.from_filename("Foo-0.9.egg")) # Request thing(s) that are available -> list to activate for i in range(3): @@ -179,9 +185,8 @@ def testResolve(self): list(ws.resolve(parse_requirements("Foo[bar]"), ad)), [Foo,Baz] ) # Requests for conflicting versions produce VersionConflict - self.assertRaises( VersionConflict, - ws.resolve, parse_requirements("Foo==1.2\nFoo!=1.2"), ad - ) + self.assertRaises(VersionConflict, + ws.resolve, parse_requirements("Foo==1.2\nFoo!=1.2"), ad) def testDistroDependsOptions(self): d = self.distRequires(""" @@ -314,8 +319,8 @@ def testOrdering(self): def testBasicContains(self): r = Requirement("Twisted", [('>=','1.2')], ()) foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") - twist11 = Distribution.from_filename("Twisted-1.1.egg") - twist12 = Distribution.from_filename("Twisted-1.2.egg") + twist11 = Distribution.from_filename("Twisted-1.1.egg") + twist12 = Distribution.from_filename("Twisted-1.2.egg") self.assertTrue(parse_version('1.2') in r) self.assertTrue(parse_version('1.1') not in r) self.assertTrue('1.2' in r) @@ -331,7 +336,6 @@ def testAdvancedContains(self): for v in ('1.2c1','1.3.1','1.5','1.9.1','2.0','2.5','3.0','4.0'): self.assertTrue(v not in r, (v,r)) - def testOptionsAndHashing(self): r1 = Requirement.parse("Twisted[foo,bar]>=1.2") r2 = Requirement.parse("Twisted[bar,FOO]>=1.2") @@ -376,15 +380,6 @@ def testSetuptoolsProjectName(self): Requirement.parse('setuptools >= 0.7').project_name, 'setuptools') - - - - - - - - - class ParseTests(TestCase): def testEmptyParse(self): @@ -398,9 +393,7 @@ def testYielding(self): self.assertEqual(list(pkg_resources.yield_lines(inp)),out) def testSplitting(self): - self.assertEqual( - list( - pkg_resources.split_sections(""" + sample = """ x [Y] z @@ -413,8 +406,7 @@ def testSplitting(self): [q] v """ - ) - ), + self.assertEqual(list(pkg_resources.split_sections(sample)), [(None,["x"]), ("Y",["z","a"]), ("b",["c"]), ("d",[]), ("q",["v"])] ) self.assertRaises(ValueError,list,pkg_resources.split_sections("[foo")) @@ -465,7 +457,8 @@ def c(s1,s2): c('0pre1', '0.0c1') c('0.0.0preview1', '0c1') c('0.0c1', '0-rc1') - c('1.2a1', '1.2.a.1'); c('1.2...a', '1.2a') + c('1.2a1', '1.2.a.1') + c('1.2...a', '1.2a') def testVersionOrdering(self): def c(s1,s2): @@ -502,12 +495,6 @@ def c(s1,s2): c(v2,v1) - - - - - - class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' @@ -525,7 +512,7 @@ def test_get_script_header(self): def test_get_script_header_jython_workaround(self): # This test doesn't work with Python 3 in some locales if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE") - in (None, "C", "POSIX")): + in (None, "C", "POSIX")): return class java: @@ -564,8 +551,6 @@ def getProperty(property): sys.stdout, sys.stderr = stdout, stderr - - class NamespaceTests(TestCase): def setUp(self): @@ -620,6 +605,5 @@ def test_two_levels_deep(self): self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) # check the __path__ attribute contains both paths self.assertEqual(pkg1.pkg2.__path__, [ - os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"), - os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2") ]) - + os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"), + os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2")]) From 27d755c7c26d3b677134accf6a92de58e6e97827 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 21:18:21 -0400 Subject: [PATCH 1441/8469] Remove import * --- setuptools.egg-info/requires.txt | 8 +++--- setuptools/tests/test_resources.py | 40 ++++++++++++++++-------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..5ff415da83 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,8 +1,5 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:sys_platform=='win32'] wincertstore==0.1 @@ -10,4 +7,7 @@ wincertstore==0.1 certifi==0.0.8 [ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ssl==1.16 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 909f1df356..06fbba502d 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -9,7 +9,9 @@ from unittest import TestCase import pkg_resources -from pkg_resources import * +from pkg_resources import (parse_requirements, VersionConflict, parse_version, + Distribution, EntryPoint, Requirement, safe_version, safe_name, + WorkingSet) from setuptools.command.easy_install import get_script_header, is_sh from setuptools.compat import StringIO, iteritems @@ -25,11 +27,11 @@ def safe_repr(obj, short=False): result = repr(obj) except Exception: result = object.__repr__(obj) - if not short or len(result) < _MAX_LENGTH: + if not short or len(result) < pkg_resources._MAX_LENGTH: return result - return result[:_MAX_LENGTH] + ' [truncated]...' + return result[:pkg_resources._MAX_LENGTH] + ' [truncated]...' -class Metadata(EmptyProvider): +class Metadata(pkg_resources.EmptyProvider): """Mock object to return metadata as if from an on-disk distribution""" def __init__(self,*pairs): @@ -42,18 +44,20 @@ def get_metadata(self,name): return self.metadata[name] def get_metadata_lines(self,name): - return yield_lines(self.get_metadata(name)) + return pkg_resources.yield_lines(self.get_metadata(name)) + +dist_from_fn = pkg_resources.Distribution.from_filename class DistroTests(TestCase): def testCollection(self): # empty path should produce no distributions - ad = Environment([], platform=None, python=None) + ad = pkg_resources.Environment([], platform=None, python=None) self.assertEqual(list(ad), []) self.assertEqual(ad['FooPkg'],[]) - ad.add(Distribution.from_filename("FooPkg-1.3_1.egg")) - ad.add(Distribution.from_filename("FooPkg-1.4-py2.4-win32.egg")) - ad.add(Distribution.from_filename("FooPkg-1.2-py2.4.egg")) + ad.add(dist_from_fn("FooPkg-1.3_1.egg")) + ad.add(dist_from_fn("FooPkg-1.4-py2.4-win32.egg")) + ad.add(dist_from_fn("FooPkg-1.2-py2.4.egg")) # Name is in there now self.assertTrue(ad['FooPkg']) @@ -70,14 +74,14 @@ def testCollection(self): [dist.version for dist in ad['FooPkg']], ['1.4','1.2'] ) # And inserting adds them in order - ad.add(Distribution.from_filename("FooPkg-1.9.egg")) + ad.add(dist_from_fn("FooPkg-1.9.egg")) self.assertEqual( [dist.version for dist in ad['FooPkg']], ['1.9','1.4','1.2'] ) ws = WorkingSet([]) - foo12 = Distribution.from_filename("FooPkg-1.2-py2.4.egg") - foo14 = Distribution.from_filename("FooPkg-1.4-py2.4-win32.egg") + foo12 = dist_from_fn("FooPkg-1.2-py2.4.egg") + foo14 = dist_from_fn("FooPkg-1.4-py2.4-win32.egg") req, = parse_requirements("FooPkg>=1.3") # Nominal case: no distros on path, should yield all applicable @@ -119,9 +123,9 @@ def testDistroBasics(self): self.assertEqual(d.platform, None) def testDistroParse(self): - d = Distribution.from_filename("FooPkg-1.3_1-py2.4-win32.egg") + d = dist_from_fn("FooPkg-1.3_1-py2.4-win32.egg") self.checkFooPkg(d) - d = Distribution.from_filename("FooPkg-1.3_1-py2.4-win32.egg-info") + d = dist_from_fn("FooPkg-1.3_1-py2.4-win32.egg-info") self.checkFooPkg(d) def testDistroMetadata(self): @@ -147,13 +151,13 @@ def testDistroDependsSimple(self): self.checkRequires(self.distRequires(v), v) def testResolve(self): - ad = Environment([]) + ad = pkg_resources.Environment([]) ws = WorkingSet([]) # Resolving no requirements -> nothing to install self.assertEqual(list(ws.resolve([],ad)), []) # Request something not in the collection -> DistributionNotFound self.assertRaises( - DistributionNotFound, ws.resolve, parse_requirements("Foo"), ad + pkg_resources.DistributionNotFound, ws.resolve, parse_requirements("Foo"), ad ) Foo = Distribution.from_filename( "/foo_dir/Foo-1.2.egg", @@ -173,7 +177,7 @@ def testResolve(self): # Request an extra that causes an unresolved dependency for "Baz" self.assertRaises( - DistributionNotFound, ws.resolve,parse_requirements("Foo[bar]"), ad + pkg_resources.DistributionNotFound, ws.resolve,parse_requirements("Foo[bar]"), ad ) Baz = Distribution.from_filename( "/foo_dir/Baz-2.1.egg", metadata=Metadata(('depends.txt', "Foo")) @@ -211,7 +215,7 @@ def testDistroDependsOptions(self): d,"Twisted>=1.5 fcgiapp>=0.1 ZConfig>=2.0 docutils>=0.3".split(), ["fastcgi", "docgen"] ) - self.assertRaises(UnknownExtra, d.requires, ["foo"]) + self.assertRaises(pkg_resources.UnknownExtra, d.requires, ["foo"]) class EntryPointTests(TestCase): From 4378eda9d4c5d20a79d6df6770ed83421fc1abcb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 21:52:34 -0400 Subject: [PATCH 1442/8469] Fixed test_get_script_header failures on Windows when Python is in a directory with spaces --- setuptools/tests/test_resources.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 06fbba502d..15f44da4a8 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -13,7 +13,8 @@ Distribution, EntryPoint, Requirement, safe_version, safe_name, WorkingSet) -from setuptools.command.easy_install import get_script_header, is_sh +from setuptools.command.easy_install import (get_script_header, is_sh, + nt_quote_arg) from setuptools.compat import StringIO, iteritems try: @@ -505,10 +506,12 @@ class ScriptHeaderTests(TestCase): def test_get_script_header(self): if not sys.platform.startswith('java') or not is_sh(sys.executable): # This test is for non-Jython platforms + expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) self.assertEqual(get_script_header('#!/usr/local/bin/python'), - '#!%s\n' % os.path.normpath(sys.executable)) + expected) + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) self.assertEqual(get_script_header('#!/usr/bin/python -x'), - '#!%s -x\n' % os.path.normpath(sys.executable)) + expected) self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) From c5779cbe9f0e1b77ad650c2ce19e4358ddce7226 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 22:02:00 -0400 Subject: [PATCH 1443/8469] Added test to capture behavior expected behavior on Windows with spaces in the filename --- setuptools.egg-info/requires.txt | 12 ++++++------ setuptools/tests/test_resources.py | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 5ff415da83..5de4d6e7c8 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +ctypes==1.0.2 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 15f44da4a8..c9fcf76c9b 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -502,6 +502,7 @@ def c(s1,s2): class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' + exe_with_spaces = r'C:\Program Files\Python33\python.exe' def test_get_script_header(self): if not sys.platform.startswith('java') or not is_sh(sys.executable): @@ -515,6 +516,9 @@ def test_get_script_header(self): self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) + candidate = get_script_header('#!/usr/bin/python', + executable=self.exe_with_spaces) + self.assertEqual(candidate, '#!"%s"\n' % self.exe_with_spaces) def test_get_script_header_jython_workaround(self): # This test doesn't work with Python 3 in some locales From f3f0c144dcfec41924e2e3eac3cbbaa81cb53819 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 22:12:06 -0400 Subject: [PATCH 1444/8469] Fixed script header generation in easy_install tests. Fixes #37. --- setuptools/tests/test_easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2732bb3ee5..189e3d55df 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,7 +14,7 @@ from setuptools.compat import StringIO, BytesIO, next, urlparse from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args +from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, nt_quote_arg from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -52,7 +52,7 @@ def as_requirement(self): sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) -""" % fix_jython_executable(sys.executable, "") +""" % nt_quote_arg(fix_jython_executable(sys.executable, "")) SETUP_PY = """\ from setuptools import setup From 4b432e0f50e9f5871a2f7375b406be7258bfa22c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 22:45:59 -0400 Subject: [PATCH 1445/8469] Issue 50: Removed filename and line number from SyntaxErrors returned by invalid_marker. This change simplifies the test and paves the way for supporting PyPy. --- CHANGES.txt | 10 ++++++++++ pkg_resources.py | 12 +++++++++++- tests/api_tests.txt | 8 ++++---- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b2729aaca1..d3c6f9897e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +--- +1.0 +--- + +* Issue #50: Normalized API of environment marker support. Specifically, + removed line number and filename from SyntaxErrors when returned from + `pkg_resources.invalid_marker`. Any clients depending on the specific + string representation of exceptions returned by that function may need to + be updated to account for this change. + ----- 0.9.8 ----- diff --git a/pkg_resources.py b/pkg_resources.py index 36a0e6ed30..7c3bdccde0 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1267,12 +1267,22 @@ def _pyimp(): else: return 'CPython' +def normalize_exception(exc): + """ + Given a SyntaxError from a marker evaluation, normalize the error message: + - Remove indications of filename and line number. + """ + exc.filename = None + exc.lineno = None + return exc + + def invalid_marker(text): """Validate text as a PEP 426 environment marker; return exception or False""" try: evaluate_marker(text) except SyntaxError: - return sys.exc_info()[1] + return normalize_exception(sys.exc_info()[1]) return False def evaluate_marker(text, extra=None, _ops={}): diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 86ca245d80..38b762d2d2 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -341,8 +341,8 @@ Environment Markers >>> print(im("sys_platform")) Comparison or logical expression expected - >>> print(im("sys_platform==")) # doctest: +ELLIPSIS - unexpected EOF while parsing (...line 1) + >>> print(im("sys_platform==")) + unexpected EOF while parsing >>> print(im("sys_platform=='win32'")) False @@ -353,8 +353,8 @@ Environment Markers >>> print(im("(extra)")) Comparison or logical expression expected - >>> print(im("(extra")) # doctest: +ELLIPSIS - unexpected EOF while parsing (...line 1) + >>> print(im("(extra")) + unexpected EOF while parsing >>> print(im("os.open('foo')=='y'")) Language feature not supported in environment markers From b383fe311089ed6488916614acbf085521c12e48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 22:53:38 -0400 Subject: [PATCH 1446/8469] Replaced overly-specific error messages with more general ones for improved cross-implementation compatibility. Fixes #50. --- CHANGES.txt | 2 ++ pkg_resources.py | 6 ++++++ tests/api_tests.txt | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d3c6f9897e..b9a53a0cb9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES `pkg_resources.invalid_marker`. Any clients depending on the specific string representation of exceptions returned by that function may need to be updated to account for this change. +* Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are + normalized for cross-implementation consistency. ----- 0.9.8 diff --git a/pkg_resources.py b/pkg_resources.py index 7c3bdccde0..5514a09902 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1271,9 +1271,15 @@ def normalize_exception(exc): """ Given a SyntaxError from a marker evaluation, normalize the error message: - Remove indications of filename and line number. + - Replace platform-specific error messages with standard error messages. """ + subs = { + 'unexpected EOF while parsing': 'invalid syntax', + 'parenthesis is never closed': 'invalid syntax', + } exc.filename = None exc.lineno = None + exc.msg = subs.get(exc.msg, exc.msg) return exc diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 38b762d2d2..d34f231410 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -342,7 +342,7 @@ Environment Markers Comparison or logical expression expected >>> print(im("sys_platform==")) - unexpected EOF while parsing + invalid syntax >>> print(im("sys_platform=='win32'")) False @@ -354,7 +354,7 @@ Environment Markers Comparison or logical expression expected >>> print(im("(extra")) - unexpected EOF while parsing + invalid syntax >>> print(im("os.open('foo')=='y'")) Language feature not supported in environment markers From da1761c890a5d754caece50df870c30f9dfdd4f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Aug 2013 22:57:08 -0400 Subject: [PATCH 1447/8469] Bumped to 1.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4eb79510d0..5a5ff26084 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -28,7 +28,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "0.9.9" +DEFAULT_VERSION = "1.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 1b1a934d4b..7e49527e38 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '0.9.9' +__version__ = '1.0' From 3e6dd67c4ae9a6df3c25fb4a04d62f7297d47f3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 09:04:34 -0400 Subject: [PATCH 1448/8469] Issue 60: Implemented experimental opt-in support for using native launchers rather than installing launcher executables. My initial experience with this technique has been very positive. --- CHANGES.txt | 7 ++++ docs/easy_install.txt | 9 +++++ setuptools/command/easy_install.py | 63 +++++++++++++++++++++--------- 3 files changed, 60 insertions(+), 19 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b9a53a0cb9..c45b793b79 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,13 @@ CHANGES 1.0 --- +* On Windows, Setuptools supports deferring to Vinay Sajip's `pylauncher + `_ (included with Python 3.3) to + launch console and GUI scripts and not install its own launcher + executables. This experimental functionality is currently only enabled if + the ``SETUPTOOLS_USE_PYLAUNCHER`` environment variable is set (to anything). + In the future, this behavior may become default, but only after it has + matured and seen substantial adoption. * Issue #50: Normalized API of environment marker support. Specifically, removed line number and filename from SyntaxErrors when returned from `pkg_resources.invalid_marker`. Any clients depending on the specific diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 12bc73ea87..92e770b7bd 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -96,6 +96,15 @@ sections below on `Command-Line Options`_ and `Configuration Files`_. You can pass command line options (such as ``--script-dir``) to ``ez_setup.py`` to control where ``easy_install.exe`` will be installed. +Setuptools also supports deferring to an external launcher such as +`pylauncher `_ for launching scripts. +Enable this experimental functionality by setting the +``SETUPTOOLS_USE_PYLAUNCHER`` environment variable. Setuptools will then not +install its own launcher executable, but will install scripts as simple +scripts with a .py (or .pyw) extension appended. If these extensions are +associated with the pylauncher and listed in the PATHEXT environment variable, +these scripts can then be invoked simply and directly just like any other +executable. Downloading and Installing a Package diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5be48bb1e8..6a45e59617 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1818,7 +1818,7 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): @classmethod def get_writer(cls, force_windows): if force_windows or sys.platform=='win32': - return WindowsScriptWriter + return WindowsScriptWriter.get_writer() return cls @classmethod @@ -1828,6 +1828,49 @@ def _get_script_args(cls, type_, name, header, script_text): class WindowsScriptWriter(ScriptWriter): + @classmethod + def get_writer(cls): + """ + Get a script writer suitable for Windows + """ + # for compatibility, return the writer that creates exe launchers + # unless the SETUPTOOLS_USE_PYLAUNCHER is set, indicating + # future behavior. + use_legacy = 'SETUPTOOLS_USE_PYLAUNCHER' not in os.environ + if use_legacy: + return WindowsLauncherScriptWriter + return cls + + @classmethod + def _get_script_args(cls, type_, name, header, script_text): + "For Windows, add a .py extension" + ext = dict(console='.py', gui='.pyw')[type_] + old = ['.py', '.pyc', '.pyo', '.pyw', '.exe'] + old.remove(ext) + header = cls._adjust_header(type_, header) + blockers = [name+x for x in old] + yield name+ext, header+script_text, 't', blockers + + @staticmethod + def _adjust_header(type_, orig_header): + """ + Make sure 'pythonw' is used for gui and and 'python' is used for + console (regardless of what sys.executable is). + """ + pattern = 'pythonw.exe' + repl = 'python.exe' + if type_ == 'gui': + pattern, repl = repl, pattern + pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) + new_header = pattern_ob.sub(string=orig_header, repl=repl) + 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 + + +class WindowsLauncherScriptWriter(WindowsScriptWriter): @classmethod def _get_script_args(cls, type_, name, header, script_text): """ @@ -1857,24 +1900,6 @@ def _get_script_args(cls, type_, name, header, script_text): m_name = name + '.exe.manifest' yield (m_name, load_launcher_manifest(name), 't') - @staticmethod - def _adjust_header(type_, orig_header): - """ - Make sure 'pythonw' is used for gui and and 'python' is used for - console (regardless of what sys.executable is). - """ - pattern = 'pythonw.exe' - repl = 'python.exe' - if type_ == 'gui': - pattern, repl = repl, pattern - pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) - new_header = pattern_ob.sub(string=orig_header, repl=repl) - 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 - # for backward-compatibility get_script_args = ScriptWriter.get_script_args From 8f7b0128ebb408b980162863eb865bf9e6e3ce22 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 09:27:33 -0400 Subject: [PATCH 1449/8469] Minimum Python version is 2.4 --- docs/easy_install.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 92e770b7bd..03f816de02 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -35,9 +35,8 @@ Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. -You will need at least Python 2.3.5, or if you are on a 64-bit platform, Python -2.4. An ``easy_install`` script will be installed in the normal location for -Python scripts on your platform. +You will need at least Python 2.4. An ``easy_install`` script will be +installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are are installling to Python's primary ``site-packages`` directory. If this is From e29ad44c0a1e8025c154c9afb4418f143019379f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 10:14:22 -0400 Subject: [PATCH 1450/8469] Issue #63: Initial implementation of a mechanism for securely bootstrapping setuptools, leveraging system tools for trust validation. --- ez_setup.py | 75 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5a5ff26084..98d15f22b1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -20,6 +20,7 @@ import tarfile import optparse import subprocess +import platform from distutils import log @@ -141,6 +142,59 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, return _do_download(version, download_base, to_dir, download_delay) +def download_file_powershell(url, target): + """ + Download the file at url to target using Powershell (which will validate + trust). Raise an exception if the command cannot complete. + """ + target = os.path.abspath(target) + cmd = [ + 'powershell', + '-Command', + "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), + ] + subprocess.check_call(cmd) + +download_file_powershell.viable = ( + lambda: platform.name() == 'Windows' and platform.win32_ver()[1] >= '6' +) + +def download_file_insecure(url, target): + """ + Use Python to download the file, even though it cannot authenticate the + connection. + """ + try: + from urllib.request import urlopen + except ImportError: + from urllib2 import urlopen + src = dst = None + try: + src = urlopen(url) + # Read/write all in one block, so we don't create a corrupt file + # if the download is interrupted. + data = src.read() + dst = open(target, "wb") + dst.write(data) + finally: + if src: + src.close() + if dst: + dst.close() + +download_file_insecure.viable = lambda: True + +def get_best_downloader(): + downloaders = [ + download_file_powershell, + #download_file_curl, + #download_file_wget, + download_file_insecure, + ] + + for dl in downloaders: + if dl.viable(): + return dl def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): @@ -154,28 +208,13 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen tgz_name = "setuptools-%s.tar.gz" % version url = download_base + tgz_name saveto = os.path.join(to_dir, tgz_name) - src = dst = None if not os.path.exists(saveto): # Avoid repeated downloads - try: - log.warn("Downloading %s", url) - src = urlopen(url) - # Read/write all in one block, so we don't create a corrupt file - # if the download is interrupted. - data = src.read() - dst = open(saveto, "wb") - dst.write(data) - finally: - if src: - src.close() - if dst: - dst.close() + log.warn("Downloading %s", url) + downloader = get_best_downloader() + downloader(url, saveto) return os.path.realpath(saveto) From f051b3d36871ccd9f0f5fc770047c497f196547a Mon Sep 17 00:00:00 2001 From: Kai Hoppert Date: Sat, 10 Aug 2013 18:24:23 +0200 Subject: [PATCH 1451/8469] Added .pypirc authentication support for getting eggs --HG-- extra : histedit_source : ebdc22b1f156f8af40265c5772addcfda6ae11d8 --- setuptools/package_index.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9c9d76a186..ca228997d6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -6,6 +6,8 @@ import socket import base64 +import ConfigParser + from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, require, Environment, find_distributions, safe_name, safe_version, @@ -918,6 +920,37 @@ def _encode_auth(auth): # strip the trailing carriage return return encoded.rstrip() +class PyPirc: + + def __init__(self): + """ + Extract pypirc authentication information from home directory + """ + self.dict_ = {} + + if os.environ.has_key('HOME'): + rc = os.path.join(os.environ['HOME'], '.pypirc') + if os.path.exists(rc): + config = ConfigParser.ConfigParser({ + 'username' : '', + 'password' : '', + 'repository' : ''}) + config.read(rc) + + for section in config.sections(): + if config.get(section, 'repository').strip(): + value = '%s:%s'%(config.get(section, 'username').strip(), + config.get(section, 'password').strip()) + self.dict_[config.get(section, 'repository').strip()] = value + + def __call__(self, url): + """ """ + for base_url, auth in self.dict_.items(): + if url.startswith(base_url): + return auth + + + def open_with_auth(url, opener=urllib2.urlopen): """Open a urllib2 request, handling HTTP authentication""" @@ -933,6 +966,10 @@ def open_with_auth(url, opener=urllib2.urlopen): else: auth = None + if not auth: + auth = PyPirc()(url) + log.info('Authentication found for URL: %s'%url) + if auth: auth = "Basic " + _encode_auth(auth) new_url = urlunparse((scheme,host,path,params,query,frag)) From 87a0b2190cb40c18f5dd98e7842c197e17a452e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 12:35:20 -0400 Subject: [PATCH 1452/8469] Implemented curl support for bootstrapping. --- ez_setup.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 98d15f22b1..3b0862602e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -159,6 +159,20 @@ def download_file_powershell(url, target): lambda: platform.name() == 'Windows' and platform.win32_ver()[1] >= '6' ) +def download_file_curl(url, target): + cmd = ['curl %(url)r -o %(target)s'] + subprocess.check_call(cmd) + +def has_curl(): + cmd = ['curl --version'] + try: + subprocess.check_call(cmd) + except: + return False + return True + +download_file_curl.viable = has_curl + def download_file_insecure(url, target): """ Use Python to download the file, even though it cannot authenticate the @@ -187,7 +201,7 @@ def download_file_insecure(url, target): def get_best_downloader(): downloaders = [ download_file_powershell, - #download_file_curl, + download_file_curl, #download_file_wget, download_file_insecure, ] From 6e757a7f0364d7a43ea2c2844b28690d30137661 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 12:43:23 -0400 Subject: [PATCH 1453/8469] Implemented download using wget --- ez_setup.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3b0862602e..3b41ab8bf3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -160,11 +160,11 @@ def download_file_powershell(url, target): ) def download_file_curl(url, target): - cmd = ['curl %(url)r -o %(target)s'] + cmd = ['curl', url, '-o', target] subprocess.check_call(cmd) def has_curl(): - cmd = ['curl --version'] + cmd = ['curl', '--version'] try: subprocess.check_call(cmd) except: @@ -173,6 +173,20 @@ def has_curl(): download_file_curl.viable = has_curl +def download_file_wget(url, target): + cmd = ['wget', url, '-q', '-O', target] + subprocess.check_call(cmd) + +def has_wget(): + cmd = ['wget', '--version'] + try: + subprocess.check_call(cmd) + except: + return False + return True + +download_file_curl.viable = has_wget + def download_file_insecure(url, target): """ Use Python to download the file, even though it cannot authenticate the @@ -202,7 +216,7 @@ def get_best_downloader(): downloaders = [ download_file_powershell, download_file_curl, - #download_file_wget, + download_file_wget, download_file_insecure, ] From 3f9eef3cde6b1a03d64535fa02dd4f1c5d8b2a08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 12:48:35 -0400 Subject: [PATCH 1454/8469] Use more explicit command-line parameters --- ez_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3b41ab8bf3..72d250a247 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -160,7 +160,7 @@ def download_file_powershell(url, target): ) def download_file_curl(url, target): - cmd = ['curl', url, '-o', target] + cmd = ['curl', url, '--silent', '--output', target] subprocess.check_call(cmd) def has_curl(): @@ -174,7 +174,7 @@ def has_curl(): download_file_curl.viable = has_curl def download_file_wget(url, target): - cmd = ['wget', url, '-q', '-O', target] + cmd = ['wget', url, '--quiet', '--output-document', target] subprocess.check_call(cmd) def has_wget(): From 8e7f9858be7f4869b4ff9d9b81fea2093086be3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 13:09:56 -0400 Subject: [PATCH 1455/8469] Suppress output when checking viability of wget/curl. Fixed viability assignment and Windows platform detection. --- ez_setup.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 72d250a247..a9c9cbf07e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -156,7 +156,7 @@ def download_file_powershell(url, target): subprocess.check_call(cmd) download_file_powershell.viable = ( - lambda: platform.name() == 'Windows' and platform.win32_ver()[1] >= '6' + lambda: platform.system() == 'Windows' and platform.win32_ver()[1] >= '6' ) def download_file_curl(url, target): @@ -165,10 +165,13 @@ def download_file_curl(url, target): def has_curl(): cmd = ['curl', '--version'] + devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd) + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except: return False + finally: + devnull.close() return True download_file_curl.viable = has_curl @@ -179,13 +182,16 @@ def download_file_wget(url, target): def has_wget(): cmd = ['wget', '--version'] + devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd) + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except: return False + finally: + devnull.close() return True -download_file_curl.viable = has_wget +download_file_wget.viable = has_wget def download_file_insecure(url, target): """ From 38798cd5dcb8c5353d31ed0f882118067f09547f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 13:18:06 -0400 Subject: [PATCH 1456/8469] Restore Python 2.4 compatibility in ez_setup --- ez_setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index a9c9cbf07e..00cf47aa35 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,6 +36,15 @@ def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 +def _check_call_py24(cmd, *args, **kwargs): + res = subprocess.call(cmd, *args, **kwargs) + class CalledProcessError(Exception): + pass + if not res == 0: + msg = "Command '%s' return non-zero exit status %d" % (cmd, res) + raise CalledProcessError(msg) +vars(subprocess).setdefault('check_call', _check_call_py24) + def _install(tarball, install_args=()): # extracting the tarball tmpdir = tempfile.mkdtemp() From ab7021eb36d66bbe00f711f31a5471af2bc73974 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 13:23:42 -0400 Subject: [PATCH 1457/8469] Updated changelog. Fixes #63. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c45b793b79..a030c15151 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,10 @@ CHANGES be updated to account for this change. * Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are normalized for cross-implementation consistency. +* Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or + wget for retrieving the Setuptools tarball for improved security of the + install. The script will still fall back to a simple ``urlopen`` on + platforms that do not have these tools. ----- 0.9.8 From 6f6edeb7c7b1fb95b02f78ff3794c387afce084c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Aug 2013 13:29:00 -0400 Subject: [PATCH 1458/8469] Added tag 1.0b1 for changeset 7b91ff93a30e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 21e59929e2..b91a42d7ee 100644 --- a/.hgtags +++ b/.hgtags @@ -89,3 +89,4 @@ e3d70539e79f39a97f69674ab038661961a1eb43 0.8 acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 19965a03c1d5231c894e0fabfaf45af1fd99f484 0.9.7 e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 +7b91ff93a30ef78634b7bb34f4a6229a5de281ee 1.0b1 From 8a33154bb30c9c0ca193d13d8b8ce3818e045d71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Aug 2013 08:24:29 -0400 Subject: [PATCH 1459/8469] Officially deprecated Features functionality (per #65). --- CHANGES.txt | 1 + setuptools/dist.py | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a030c15151..50310ef2af 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,7 @@ CHANGES wget for retrieving the Setuptools tarball for improved security of the install. The script will still fall back to a simple ``urlopen`` on platforms that do not have these tools. +* Issue #65: Deprecated the ``Features`` functionality. ----- 0.9.8 diff --git a/setuptools/dist.py b/setuptools/dist.py index 0188921540..e9d0b5a2b4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -2,6 +2,7 @@ import re import sys +import warnings from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install @@ -132,7 +133,7 @@ def check_packages(dist, attr, value): "WARNING: %r not a valid package name; please use only" ".-separated package names in setup.py", pkgname ) - + @@ -194,7 +195,8 @@ class Distribution(_Distribution): EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. - 'features' -- a dictionary mapping option names to 'setuptools.Feature' + 'features' **deprecated** -- a dictionary mapping option names to + 'setuptools.Feature' objects. Features are a portion of the distribution that can be included or excluded based on user options, inter-feature dependencies, and availability on the current system. Excluded features are omitted @@ -252,6 +254,8 @@ def __init__ (self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} + if 'features' in attrs or 'require_features' in attrs: + Feature.warn_deprecated() self.require_features = [] self.features = {} self.dist_files = [] @@ -745,7 +749,13 @@ def handle_display_options(self, option_order): class Feature: - """A subset of the distribution that can be excluded if unneeded/wanted + """ + **deprecated** -- The `Feature` facility was never completely implemented + or supported, `has reported issues + `_ and will be removed in + a future version. + + A subset of the distribution that can be excluded if unneeded/wanted Features are created using these keyword arguments: @@ -794,9 +804,17 @@ class Feature: Aside from the methods, the only feature attributes that distributions look at are 'description' and 'optional'. """ + + @staticmethod + def warn_deprecated(): + warnings.warn("Features are deprecated and will be removed in " + "a future version. See http://bitbucket.org/pypa/setuptools/65.", + DeprecationWarning) + def __init__(self, description, standard=False, available=True, optional=True, require_features=(), remove=(), **extras ): + self.warn_deprecated() self.description = description self.standard = standard From ebff930a7530b053c6d058d6213f2673331b350e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Aug 2013 08:44:47 -0400 Subject: [PATCH 1460/8469] Restored tunnel (proxy) support in SSL connections. Fixes #52. --- CHANGES.txt | 2 ++ setuptools/ssl_support.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 50310ef2af..be1061e97a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,6 +25,8 @@ CHANGES install. The script will still fall back to a simple ``urlopen`` on platforms that do not have these tools. * Issue #65: Deprecated the ``Features`` functionality. +* Issue #52: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied) + connection. ----- 0.9.8 diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index f8a780a95b..90359b2c51 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -194,6 +194,12 @@ def connect(self): sock = create_connection( (self.host, self.port), getattr(self,'source_address',None) ) + + # Handle the socket if a (proxy) tunnel is present + if hasattr(self, '_tunnel') and getattr(self, '_tunnel_host', None): + self.sock = sock + self._tunnel() + self.sock = ssl.wrap_socket( sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle ) From e621ce6f3099b83548cede7425a5af25b0f0ec8c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Aug 2013 08:54:56 -0400 Subject: [PATCH 1461/8469] Fix TypeError when no attrs were passed --- setuptools/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index e9d0b5a2b4..9dbf04bad7 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -254,7 +254,8 @@ def __init__ (self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} - if 'features' in attrs or 'require_features' in attrs: + _attrs_dict = attrs or {} + if 'features' in _attrs_dict or 'require_features' in _attrs_dict: Feature.warn_deprecated() self.require_features = [] self.features = {} From f9a347b122e96104599befa5c7d73ca1d74f4cd5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Aug 2013 08:57:35 -0400 Subject: [PATCH 1462/8469] Added tag 1.0b2 for changeset aba16323ec93 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b91a42d7ee..27fca8d483 100644 --- a/.hgtags +++ b/.hgtags @@ -90,3 +90,4 @@ acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 19965a03c1d5231c894e0fabfaf45af1fd99f484 0.9.7 e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 7b91ff93a30ef78634b7bb34f4a6229a5de281ee 1.0b1 +aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 From a64f2c39bc2e5d3382f2573a570a161a41499fa7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Aug 2013 09:18:52 -0400 Subject: [PATCH 1463/8469] Allow the test to fail on its own merits rather than failing with a not-so-useful message; removed Python 2.3 support. --- tests/manual_test.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 3eab99e1c7..e6489b1ced 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -1,31 +1,16 @@ #!/usr/bin/env python -import sys - -if sys.version_info[0] >= 3: - raise NotImplementedError('Py3 not supported in this test yet') +import sys import os import shutil import tempfile +import subprocess from distutils.command.install import INSTALL_SCHEMES from string import Template from setuptools.compat import urlopen -try: - import subprocess - def _system_call(*args): - assert subprocess.call(args) == 0 -except ImportError: - # Python 2.3 - def _system_call(*args): - # quoting arguments if windows - if sys.platform == 'win32': - def quote(arg): - if ' ' in arg: - return '"%s"' % arg - return arg - args = [quote(arg) for arg in args] - assert os.system(' '.join(args)) == 0 +def _system_call(*args): + assert subprocess.call(args) == 0 def tempdir(func): def _tempdir(*args, **kwargs): From 561255d9c8572edf080614ca6d9e2176e903cef5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 18:00:33 -0400 Subject: [PATCH 1464/8469] Reorganize imports --- pkg_resources.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5514a09902..0e079242fd 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,14 @@ method. """ -import sys, os, time, re, imp, types, zipfile, zipimport +import sys +import os +import time +import re +import imp +import types +import zipfile +import zipimport import warnings import stat try: From 578adf060369c2b705559754ac584c48cb61e0d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 18:00:46 -0400 Subject: [PATCH 1465/8469] Remove unused import --- pkg_resources.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 0e079242fd..c6f5708912 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -18,7 +18,6 @@ import time import re import imp -import types import zipfile import zipimport import warnings From dc61ad53fcfa41cfc6d980b0114c9ea5d9daf2ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 18:11:50 -0400 Subject: [PATCH 1466/8469] Normalize whitespace --- pkg_resources.py | 332 +++++++---------------------------------------- 1 file changed, 48 insertions(+), 284 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index c6f5708912..0297601629 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -128,8 +128,6 @@ def _sset_object(key, ob, state): _sget_none = _sset_none = lambda *args: None - - def get_supported_platform(): """Return this platform's maximum compatible version. @@ -143,33 +141,14 @@ def get_supported_platform(): If this condition occurs for any other platform with a version in its platform strings, this function should be extended accordingly. """ - plat = get_build_platform(); m = macosVersionString.match(plat) + plat = get_build_platform() + m = macosVersionString.match(plat) if m is not None and sys.platform == "darwin": try: plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3)) except ValueError: pass # not Mac OS X return plat - - - - - - - - - - - - - - - - - - - - __all__ = [ # Basic resource access and distribution/entry point discovery @@ -212,6 +191,7 @@ def get_supported_platform(): # Deprecated/backward compatibility only 'run_main', 'AvailableDistributions', ] + class ResolutionError(Exception): """Abstract base for dependency resolution errors""" def __repr__(self): @@ -228,7 +208,7 @@ class UnknownExtra(ResolutionError): _provider_factories = {} PY_MAJOR = sys.version[:3] -EGG_DIST = 3 +EGG_DIST = 3 BINARY_DIST = 2 SOURCE_DIST = 1 CHECKOUT_DIST = 0 @@ -305,11 +285,6 @@ def get_build_platform(): get_platform = get_build_platform # XXX backward compat - - - - - def compatible_platforms(provided,required): """Can code for the `provided` platform run on the `required` platform? @@ -335,7 +310,7 @@ def compatible_platforms(provided,required): dversion = int(provDarwin.group(1)) macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2)) if dversion == 7 and macosversion >= "10.3" or \ - dversion == 8 and macosversion >= "10.4": + dversion == 8 and macosversion >= "10.4": #import warnings #warnings.warn("Mac eggs should be rebuilt to " @@ -346,11 +321,9 @@ def compatible_platforms(provided,required): # are they the same major version and machine type? if provMac.group(1) != reqMac.group(1) or \ - provMac.group(3) != reqMac.group(3): + provMac.group(3) != reqMac.group(3): return False - - # is the required OS major update >= the provided one? if int(provMac.group(2)) > int(reqMac.group(2)): return False @@ -416,14 +389,6 @@ def run_script(script_name, namespace): """Execute the named script in the supplied namespace dictionary""" - - - - - - - - class IResourceProvider(IMetadataProvider): """An object that provides access to package resources""" @@ -452,19 +417,6 @@ def resource_listdir(resource_name): """List of resource names in the directory (like ``os.listdir()``)""" - - - - - - - - - - - - - class WorkingSet(object): """A collection of active distributions on sys.path (or a similar list)""" @@ -481,7 +433,6 @@ def __init__(self, entries=None): for entry in entries: self.add_entry(entry) - def add_entry(self, entry): """Add a path item to ``.entries``, finding any distributions on it @@ -497,15 +448,10 @@ def add_entry(self, entry): for dist in find_distributions(entry, True): self.add(dist, entry, False) - def __contains__(self,dist): """True if `dist` is the active distribution for its project""" return self.by_key.get(dist.key) == dist - - - - def find(self, req): """Find a distribution matching requirement `req` @@ -545,8 +491,6 @@ def run_script(self, requires, script_name): ns['__name__'] = name self.require(requires)[0].run_script(script_name, ns) - - def __iter__(self): """Yield distributions for non-duplicate projects in the working set @@ -639,9 +583,8 @@ def resolve(self, requirements, env=None, installer=None): return to_activate # return list of distros to activate - def find_plugins(self, - plugin_env, full_env=None, installer=None, fallback=True - ): + def find_plugins(self, plugin_env, full_env=None, installer=None, + fallback=True): """Find all activatable distributions in `plugin_env` Example usage:: @@ -718,10 +661,6 @@ def find_plugins(self, return distributions, error_info - - - - def require(self, *requirements): """Ensure that distributions matching `requirements` are activated @@ -799,7 +738,7 @@ def can_add(self, dist): """ return (self.python is None or dist.py_version is None or dist.py_version==self.python) \ - and compatible_platforms(dist.platform,self.platform) + and compatible_platforms(dist.platform,self.platform) def remove(self, dist): """Remove `dist` from the environment""" @@ -845,7 +784,6 @@ def add(self,dist): if dist.key in self._cache: _sort_dists(self._cache[dist.key]) - def best_match(self, req, working_set, installer=None): """Find distribution best matching `req` and usable on `working_set` @@ -884,9 +822,6 @@ def __iter__(self): for key in self._distmap.keys(): if self[key]: yield key - - - def __iadd__(self, other): """In-place addition of a distribution or environment""" if isinstance(other,Distribution): @@ -926,8 +861,6 @@ class ExtractionError(RuntimeError): """ - - class ResourceManager: """Manage resource extraction and packages""" extraction_path = None @@ -989,27 +922,13 @@ def extraction_error(self): Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. -""" % (old_exc, cache_path) +""" % (old_exc, cache_path) ) - err.manager = self - err.cache_path = cache_path + err.manager = self + err.cache_path = cache_path err.original_error = old_exc raise err - - - - - - - - - - - - - - def get_cache_path(self, archive_name, names=()): """Return absolute location in cache for `archive_name` and `names` @@ -1059,23 +978,6 @@ def _warn_unsafe_extraction_path(path): "PYTHON_EGG_CACHE environment variable)." % path) warnings.warn(msg, UserWarning) - - - - - - - - - - - - - - - - - def postprocess(self, tempname, filename): """Perform any platform-specific postprocessing of `tempname` @@ -1096,27 +998,6 @@ def postprocess(self, tempname, filename): mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777 os.chmod(tempname, mode) - - - - - - - - - - - - - - - - - - - - - def set_extraction_path(self, path): """Set the base path where resources will be extracted to, if needed. @@ -1156,8 +1037,6 @@ def cleanup_resources(self, force=False): """ # XXX - - def get_default_cache(): """Determine the default cache location @@ -1233,13 +1112,6 @@ def to_filename(name): """ return name.replace('-','_') - - - - - - - _marker_names = { 'os': ['name'], 'sys': ['platform'], 'platform': ['version','machine','python_implementation'], @@ -1311,7 +1183,9 @@ def evaluate_marker(text, extra=None, _ops={}): if not _ops: from token import NAME, STRING - import token, symbol, operator + import token + import symbol + import operator def and_test(nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! @@ -1377,7 +1251,7 @@ def evaluate(nodelist): if kind==STRING: s = nodelist[1] if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \ - or '\\' in s: + or '\\' in s: raise SyntaxError( "Only plain strings allowed in environment markers") return s[1:-1] @@ -1456,7 +1330,6 @@ def resource_isdir(self,resource_name): def metadata_isdir(self,name): return self.egg_info and self._isdir(self._fn(self.egg_info,name)) - def resource_listdir(self,resource_name): return self._listdir(self._fn(self.module_path,resource_name)) @@ -1534,11 +1407,6 @@ def _setup_prefix(self): old = path path, base = os.path.split(path) - - - - - class DefaultProvider(EggProvider): """Provides access to package resources in the filesystem""" @@ -1571,9 +1439,9 @@ class EmptyProvider(NullProvider): """Provider that returns nothing for all requests""" _isdir = _has = lambda self,path: False - _get = lambda self,path: '' - _listdir = lambda self,path: [] - module_path = None + _get = lambda self,path: '' + _listdir = lambda self,path: [] + module_path = None def __init__(self): pass @@ -1774,28 +1642,6 @@ def _resource_to_zip(self,resource_name): register_loader_type(zipimport.zipimporter, ZipProvider) - - - - - - - - - - - - - - - - - - - - - - class FileMetadata(EmptyProvider): """Metadata handler for standalone PKG-INFO files @@ -1826,20 +1672,6 @@ def get_metadata_lines(self,name): return yield_lines(self.get_metadata(name)) - - - - - - - - - - - - - - class PathMetadata(DefaultProvider): """Metadata provider for egg directories @@ -1920,8 +1752,6 @@ def load_module(self, fullname): return mod - - def get_importer(path_item): """Retrieve a PEP 302 "importer" for the given path item @@ -1959,10 +1789,6 @@ def get_importer(path_item): del ImpLoader, ImpImporter - - - - _declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): @@ -2186,12 +2012,12 @@ def yield_lines(strs): LINE_END = re.compile(r"\s*(#.*)?$").match # whitespace and comment CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match # line continuation -DISTRO = re.compile(r"\s*((\w|[-.])+)").match # Distribution or extra -VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match # ver. info -COMMA = re.compile(r"\s*,").match # comma between items +DISTRO = re.compile(r"\s*((\w|[-.])+)").match # Distribution or extra +VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match # ver. info +COMMA = re.compile(r"\s*,").match # comma between items OBRACKET = re.compile(r"\s*\[").match CBRACKET = re.compile(r"\s*\]").match -MODULE = re.compile(r"\w+(\.\w+)*$").match +MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( r"(?P[^-]+)" r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?", @@ -2293,8 +2119,6 @@ def require(self, env=None, installer=None): list(map(working_set.add, working_set.resolve(self.dist.requires(self.extras),env,installer))) - - #@classmethod def parse(cls, src, dist=None): """Parse a single entry point from string `src` @@ -2329,13 +2153,6 @@ def parse(cls, src, dist=None): parse = classmethod(parse) - - - - - - - #@classmethod def parse_group(cls, group, lines, dist=None): """Parse an entry point group""" @@ -2386,10 +2203,9 @@ class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' - def __init__(self, - location=None, metadata=None, project_name=None, version=None, - py_version=PY_MAJOR, platform=None, precedence = EGG_DIST - ): + def __init__(self, location=None, metadata=None, project_name=None, + version=None, py_version=PY_MAJOR, platform=None, + precedence=EGG_DIST): self.project_name = safe_name(project_name or 'Unknown') if version is not None: self._version = safe_version(version) @@ -2417,7 +2233,6 @@ def from_location(cls,location,basename,metadata=None,**kw): ) from_location = classmethod(from_location) - hashcmp = property( lambda self: ( getattr(self,'parsed_version',()), @@ -2483,9 +2298,6 @@ def version(self): ) version = property(version) - - - #@property def _dep_map(self): try: @@ -2525,8 +2337,6 @@ def _get_metadata(self,name): for line in self.get_metadata_lines(name): yield line - - def activate(self,path=None): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: path = sys.path @@ -2535,7 +2345,6 @@ def activate(self,path=None): fixup_namespace_packages(self.location) list(map(declare_namespace, self._get_metadata('namespace_packages.txt'))) - def egg_name(self): """Return what this distribution's standard .egg filename should be""" filename = "%s-%s-py%s" % ( @@ -2565,9 +2374,6 @@ def __getattr__(self,attr): raise AttributeError(attr) return getattr(self._provider, attr) - - - #@classmethod def from_filename(cls,filename,metadata=None, **kw): return cls.from_location( @@ -2603,12 +2409,6 @@ def get_entry_info(self, group, name): """Return the EntryPoint object for `group`+`name`, or ``None``""" return self.get_entry_map(group).get(name) - - - - - - def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" @@ -2649,7 +2449,6 @@ def insert_on(self, path, loc = None): return - def check_version_conflict(self): if self.key=='setuptools': return # ignore the inevitable setuptools self-conflicts :( @@ -2658,8 +2457,7 @@ def check_version_conflict(self): loc = normalize_path(self.location) for modname in self._get_metadata('top_level.txt'): if (modname not in sys.modules or modname in nsp - or modname in _namespace_packages - ): + or modname in _namespace_packages): continue if modname in ('pkg_resources', 'setuptools', 'site'): continue @@ -2690,9 +2488,6 @@ def clone(self,**kw): kw.setdefault('metadata', self._provider) return self.__class__(**kw) - - - #@property def extras(self): return [dep for dep in self._dep_map if dep] @@ -2762,9 +2557,11 @@ def reqs_for_extra(extra): return dm -_distributionImpl = {'.egg': Distribution, - '.egg-info': Distribution, - '.dist-info': DistInfoDistribution } +_distributionImpl = { + '.egg': Distribution, + '.egg-info': Distribution, + '.dist-info': DistInfoDistribution, + } def issue_warning(*args,**kw): @@ -2781,27 +2578,6 @@ def issue_warning(*args,**kw): warn(stacklevel = level+1, *args, **kw) - - - - - - - - - - - - - - - - - - - - - def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` @@ -2818,7 +2594,8 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): while not TERMINATOR(line,p): if CONTINUE(line,p): try: - line = next(lines); p = 0 + line = next(lines) + p = 0 except StopIteration: raise ValueError( "\\ must not appear on the last nonblank line" @@ -2869,21 +2646,6 @@ def _sort_dists(dists): dists[::-1] = [d for hc,d in tmp] - - - - - - - - - - - - - - - class Requirement: def __init__(self, project_name, specs, extras): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" @@ -2918,14 +2680,16 @@ def __contains__(self,item): compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1 for parsed,trans,op,ver in self.index: action = trans[compare(item,parsed)] # Indexing: 0, 1, -1 - if action=='F': return False - elif action=='T': return True - elif action=='+': last = True + if action=='F': + return False + elif action=='T': + return True + elif action=='+': + last = True elif action=='-' or last is None: last = False if last is None: last = True # no rules encountered return last - def __hash__(self): return self.__hash @@ -2944,12 +2708,12 @@ def parse(s): state_machine = { # =>< - '<' : '--T', - '<=': 'T-T', - '>' : 'F+F', - '>=': 'T+F', - '==': 'T..', - '!=': 'F++', + '<': '--T', + '<=': 'T-T', + '>': 'F+F', + '>=': 'T+F', + '==': 'T..', + '!=': 'F++', } @@ -3047,5 +2811,5 @@ def _initialize(g): # all distributions added to the working set in the future (e.g. by # calling ``require()``) will get activated as well. add_activation_listener(lambda dist: dist.activate()) -working_set.entries=[]; list(map(working_set.add_entry,sys.path)) # match order - +working_set.entries=[] +list(map(working_set.add_entry,sys.path)) # match order From e78ad5671effbd18d7e5c2a803c462d54c401b35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 23:20:09 -0400 Subject: [PATCH 1467/8469] Remove -script scripts also --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6a45e59617..6322c9b6b9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1845,7 +1845,7 @@ def get_writer(cls): def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" ext = dict(console='.py', gui='.pyw')[type_] - old = ['.py', '.pyc', '.pyo', '.pyw', '.exe'] + old = ['.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) blockers = [name+x for x in old] From 78baec3378b60814b0062d4f89a9fe6bec41885a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 23:34:30 -0400 Subject: [PATCH 1468/8469] Use .pya extension instead of simply .py to avoid creating scripts that are importable as modules. --HG-- extra : histedit_source : ef811b339d08652c845c5556fd7e2d0f38ee12df --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6322c9b6b9..53f2e7cf3b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1844,8 +1844,8 @@ def get_writer(cls): @classmethod def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" - ext = dict(console='.py', gui='.pyw')[type_] - old = ['.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] + ext = dict(console='.pya', gui='.pyw')[type_] + old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) blockers = [name+x for x in old] From 372be090c5acab13a5cc88893c50c09a7b7ec56e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2013 23:48:42 -0400 Subject: [PATCH 1469/8469] Warn when scripts are installed but PATHEXT isn't set --HG-- extra : histedit_source : a1c329f92ee71a707955e352b63987af9de6e120 --- setuptools/command/easy_install.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 53f2e7cf3b..a0171e3d23 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -23,6 +23,7 @@ import random import platform import textwrap +import warnings from glob import glob from distutils import log, dir_util @@ -1845,6 +1846,9 @@ def get_writer(cls): def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" ext = dict(console='.pya', gui='.pyw')[type_] + if ext not in os.environ['PATHEXT'].lower().split(';'): + warnings.warn("%s not listed in PATHEXT; scripts will not be " + "recognized as executables." % ext, UserWarning) old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) From 38c43e388fe9aeff84388ff73447504353adc3f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Aug 2013 13:30:54 -0400 Subject: [PATCH 1470/8469] Fix template rendering error --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index febfdcd10c..8b88cd1d45 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1260,7 +1260,7 @@ def no_default_version_msg(self): https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" - return template % self.install_dir, os.environ.get('PYTHONPATH','') + return template % (self.install_dir, os.environ.get('PYTHONPATH','')) def install_site_py(self): """Make sure there's a site.py in the target dir, if needed""" From 9ccb56080758c5056b5af308af8dec0ac2fe5568 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Aug 2013 13:33:53 -0400 Subject: [PATCH 1471/8469] Added tag 1.0b3 for changeset 8a98492f0d85 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 27fca8d483..35ccbea610 100644 --- a/.hgtags +++ b/.hgtags @@ -91,3 +91,4 @@ acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 7b91ff93a30ef78634b7bb34f4a6229a5de281ee 1.0b1 aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 +8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 From 25f13ea57a53b04866f1c3a0a961c951812bdb43 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Aug 2013 19:58:54 -0400 Subject: [PATCH 1472/8469] Set stacklevel on DeprecationWarning for more relevant locality. --- setuptools/dist.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 9dbf04bad7..5c84b8d4b9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -808,9 +808,12 @@ class Feature: @staticmethod def warn_deprecated(): - warnings.warn("Features are deprecated and will be removed in " - "a future version. See http://bitbucket.org/pypa/setuptools/65.", - DeprecationWarning) + warnings.warn( + "Features are deprecated and will be removed in a future " + "version. See http://bitbucket.org/pypa/setuptools/65.", + DeprecationWarning, + stacklevel=3, + ) def __init__(self, description, standard=False, available=True, optional=True, require_features=(), remove=(), **extras From bb513b623c58b69cc7cf846c99c9e10762fa76c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 10:24:43 -0400 Subject: [PATCH 1473/8469] Updated changelog to highlight backward-incompatible changes --- CHANGES.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index be1061e97a..16160f7aab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,13 +13,6 @@ CHANGES the ``SETUPTOOLS_USE_PYLAUNCHER`` environment variable is set (to anything). In the future, this behavior may become default, but only after it has matured and seen substantial adoption. -* Issue #50: Normalized API of environment marker support. Specifically, - removed line number and filename from SyntaxErrors when returned from - `pkg_resources.invalid_marker`. Any clients depending on the specific - string representation of exceptions returned by that function may need to - be updated to account for this change. -* Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are - normalized for cross-implementation consistency. * Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or wget for retrieving the Setuptools tarball for improved security of the install. The script will still fall back to a simple ``urlopen`` on @@ -28,6 +21,16 @@ CHANGES * Issue #52: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied) connection. +Backward-incompatible changes: + +* Issue #50: Normalized API of environment marker support. Specifically, + removed line number and filename from SyntaxErrors when returned from + `pkg_resources.invalid_marker`. Any clients depending on the specific + string representation of exceptions returned by that function may need to + be updated to account for this change. +* Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are + normalized for cross-implementation consistency. + ----- 0.9.8 ----- From 3eb3c69afbe1d2ebbc98943a896ccbfc913113c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 10:28:20 -0400 Subject: [PATCH 1474/8469] Updated changelog once more to provide a re-assuring narrative about the backward-incompatible changes. --- CHANGES.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 16160f7aab..db9c637ce9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,7 +21,11 @@ CHANGES * Issue #52: In ``VerifyingHTTPSConn``, handle a tunnelled (proxied) connection. -Backward-incompatible changes: +Backward-Incompatible Changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This release includes a couple of backward-incompatible changes, but most if +not all users will find 1.0 a drop-in replacement for 0.9. * Issue #50: Normalized API of environment marker support. Specifically, removed line number and filename from SyntaxErrors when returned from From 2473aa6da27cb95c1582aee1bb188f76e0deb258 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 10:44:18 -0400 Subject: [PATCH 1475/8469] Changed the launcher relevant environment variable to SETUPTOOLS_LAUNCHER and it now accepts different strings 'natural' and 'executable', instead of only reflecting a boolean value. --- CHANGES.txt | 6 ++++-- docs/easy_install.txt | 8 +++++--- setuptools/command/easy_install.py | 16 ++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index db9c637ce9..b2e2677035 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,9 +10,11 @@ CHANGES `_ (included with Python 3.3) to launch console and GUI scripts and not install its own launcher executables. This experimental functionality is currently only enabled if - the ``SETUPTOOLS_USE_PYLAUNCHER`` environment variable is set (to anything). + the ``SETUPTOOLS_LAUNCHER`` environment variable is set to "natural". In the future, this behavior may become default, but only after it has - matured and seen substantial adoption. + matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER`` also + accepts "executable" to force the default behavior of creating launcher + executables. * Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or wget for retrieving the Setuptools tarball for improved security of the install. The script will still fall back to a simple ``urlopen`` on diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 03f816de02..744b4967ae 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -98,12 +98,14 @@ can pass command line options (such as ``--script-dir``) to Setuptools also supports deferring to an external launcher such as `pylauncher `_ for launching scripts. Enable this experimental functionality by setting the -``SETUPTOOLS_USE_PYLAUNCHER`` environment variable. Setuptools will then not +``SETUPTOOLS_LAUNCHER`` environment variable to "natural". Setuptools will +then not install its own launcher executable, but will install scripts as simple -scripts with a .py (or .pyw) extension appended. If these extensions are +scripts with a .pya (or .pyw) extension appended. If these extensions are associated with the pylauncher and listed in the PATHEXT environment variable, these scripts can then be invoked simply and directly just like any other -executable. +executable. This behavior may become default in a future version. To force +the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable". Downloading and Installing a Package diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cf4402a5fd..19d6e49490 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1834,13 +1834,13 @@ def get_writer(cls): """ Get a script writer suitable for Windows """ - # for compatibility, return the writer that creates exe launchers - # unless the SETUPTOOLS_USE_PYLAUNCHER is set, indicating - # future behavior. - use_legacy = 'SETUPTOOLS_USE_PYLAUNCHER' not in os.environ - if use_legacy: - return WindowsLauncherScriptWriter - return cls + writer_lookup = dict( + executable=WindowsExecutableLauncherWriter, + natural=cls, + ) + # for compatibility, use the executable launcher by default + launcher = os.environ.get('SETUPTOOLS_LAUNCHER', 'executable') + return writer_lookup[launcher] @classmethod def _get_script_args(cls, type_, name, header, script_text): @@ -1874,7 +1874,7 @@ def _adjust_header(type_, orig_header): return new_header -class WindowsLauncherScriptWriter(WindowsScriptWriter): +class WindowsExecutableLauncherWriter(WindowsScriptWriter): @classmethod def _get_script_args(cls, type_, name, header, script_text): """ From dcbb8ac6ad28f5cdc924ddf7482fa9b856b49681 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 12:13:20 -0400 Subject: [PATCH 1476/8469] Reorganized the documentation to cover the different launcher techniques. --- docs/easy_install.txt | 92 +++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 30 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 744b4967ae..cb05aaccc0 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -76,36 +76,10 @@ section on `Custom Installation Locations`_ for more details. Windows Notes ~~~~~~~~~~~~~ -On Windows, an ``easy_install.exe`` launcher will also be installed, so that -you can just type ``easy_install`` as long as it's on your ``PATH``. If typing -``easy_install`` at the command prompt doesn't work, check to make sure your -``PATH`` includes the appropriate ``C:\\Python2X\\Scripts`` directory. On -most current versions of Windows, you can change the ``PATH`` by right-clicking -"My Computer", choosing "Properties" and selecting the "Advanced" tab, then -clicking the "Environment Variables" button. ``PATH`` will be in the "System -Variables" section, and you will need to exit and restart your command shell -(command.com, cmd.exe, bash, or other) for the change to take effect. Be sure -to add a ``;`` after the last item on ``PATH`` before adding the scripts -directory to it. - -Note that instead of changing your ``PATH`` to include the Python scripts -directory, you can also retarget the installation location for scripts so they -go on a directory that's already on the ``PATH``. For more information see the -sections below on `Command-Line Options`_ and `Configuration Files`_. You -can pass command line options (such as ``--script-dir``) to -``ez_setup.py`` to control where ``easy_install.exe`` will be installed. - -Setuptools also supports deferring to an external launcher such as -`pylauncher `_ for launching scripts. -Enable this experimental functionality by setting the -``SETUPTOOLS_LAUNCHER`` environment variable to "natural". Setuptools will -then not -install its own launcher executable, but will install scripts as simple -scripts with a .pya (or .pyw) extension appended. If these extensions are -associated with the pylauncher and listed in the PATHEXT environment variable, -these scripts can then be invoked simply and directly just like any other -executable. This behavior may become default in a future version. To force -the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable". +Installing setuptools will provide an ``easy_install`` command according to +the techniques described in `Executables and Launchers`_. If the +``easy_install`` command is not available after installation, that section +provides details on how to configure Windows to make the commands available. Downloading and Installing a Package @@ -315,6 +289,64 @@ installations, so that Python won't lock us out of using anything but the most recently-installed version of the package.) +Executables and Launchers +------------------------- + +On Unix systems, scripts are installed with as natural files with a "#!" +header and no extension and they launch under the Python version indicated in +the header. + +On Windows, there is no mechanism to "execute" files without extensions, so +EasyInstall provides two techniques to mirror the Unix behavior. The behavior +is indicated by the SETUPTOOLS_LAUNCHER environment variable, which may be +"executable" (default) or "natural". + +Regardless of the technique used, the script(s) will be installed to a Scripts +directory (by default in the Python installation directory). It is recommended +for EasyInstall that you ensure this directory is in the PATH environment +variable. The easiest way to ensure the Scripts directory is in the PATH is +to run ``Tools\Scripts\win_add2path.py`` from the Python directory (requires +Python 2.6 or later). + +Note that instead of changing your ``PATH`` to include the Python scripts +directory, you can also retarget the installation location for scripts so they +go on a directory that's already on the ``PATH``. For more information see +`Command-Line Options`_ and `Configuration Files`_. During installation, +pass command line options (such as ``--script-dir``) to +``ez_setup.py`` to control where ``easy_install.exe`` will be installed. + + +Windows Executable Launcher +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the "executable" launcher is used, EasyInstall will create a '.exe' +launcher of the same name beside each installed script (including +``easy_install`` itself). These small .exe files launch the script of the +same name using the Python version indicated in the '#!' header. + +This behavior is currently default. To force +the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable". + +Natural Script Launcher +~~~~~~~~~~~~~~~~~~~~~~~ + +EasyInstall also supports deferring to an external launcher such as +`pylauncher `_ for launching scripts. +Enable this experimental functionality by setting the +``SETUPTOOLS_LAUNCHER`` environment variable to "natural". EasyInstall will +then install scripts as simple +scripts with a .pya (or .pyw) extension appended. If these extensions are +associated with the pylauncher and listed in the PATHEXT environment variable, +these scripts can then be invoked simply and directly just like any other +executable. This behavior may become default in a future version. + +EasyInstall uses the .pya extension instead of simply +the typical '.py' extension. This distinct extension is necessary to prevent +Python +from treating the scripts as importable modules (where name conflicts exist). +Current releases of pylauncher do not yet associate with .pya files by +default, but future versions should do so. + Tips & Techniques ----------------- From d1d7dc6411b95ca5908c9628b4d74079b774f458 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 14:22:10 -0400 Subject: [PATCH 1477/8469] Updated docs in Multiple Python Versions to reference supported Python versions. --- docs/easy_install.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index cb05aaccc0..26001c75eb 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -351,20 +351,18 @@ default, but future versions should do so. Tips & Techniques ----------------- - Multiple Python Versions ~~~~~~~~~~~~~~~~~~~~~~~~ -As of version 0.6a11, EasyInstall installs itself under two names: +EasyInstall installs itself under two names: ``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version -used to install it. Thus, if you install EasyInstall for both Python 2.3 and -2.4, you can use the ``easy_install-2.3`` or ``easy_install-2.4`` scripts to -install packages for Python 2.3 or 2.4, respectively. - -Also, if you're working with Python version 2.4 or higher, you can run Python -with ``-m easy_install`` to run that particular Python version's -``easy_install`` command. +used to install it. Thus, if you install EasyInstall for both Python 3.2 and +2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to +install packages for the respective Python version. +Setuptools also supplies easy_install as a runnable module which may be +invoked using ``python -m easy_install`` for any Python with Setuptools +installed. Restricting Downloads with ``--allow-hosts`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e282a1f42c47484c4fa52b8321c4ee367a150f2d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 14:45:02 -0400 Subject: [PATCH 1478/8469] Removed the --delete-conflicting and --ignore-conflicts-at-my-risk options, which have long been deprecated and indicated that they're not used. --- CHANGES.txt | 2 ++ docs/easy_install.txt | 29 ++------------------ setuptools/command/easy_install.py | 44 +++--------------------------- 3 files changed, 9 insertions(+), 66 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b2e2677035..a075c3c8f7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,6 +36,8 @@ not all users will find 1.0 a drop-in replacement for 0.9. be updated to account for this change. * Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are normalized for cross-implementation consistency. +* Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting`` + options to easy_install. These options have been deprecated since 0.6a11. ----- 0.9.8 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 26001c75eb..42a5323d23 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -572,14 +572,12 @@ install``, becuase the ``distutils`` just install new packages on top of old ones, possibly combining two unrelated packages or leaving behind modules that have been deleted in the newer version of the package.) -By default, EasyInstall will stop the installation if it detects a conflict +EasyInstall will stop the installation if it detects a conflict between an existing, "unmanaged" package, and a module or package in any of the distributions you're installing. It will display a list of all of the existing files and directories that would need to be deleted for the new -package to be able to function correctly. You can then either delete these -conflicting files and directories yourself and re-run EasyInstall, or you can -just use the ``--delete-conflicting`` or ``--ignore-conflicts-at-my-risk`` -options, as described under `Command-Line Options`_, below. +package to be able to function correctly. To proceed, you must manually +delete these conflicting files and directories and re-run EasyInstall. Of course, once you've replaced all of your existing "unmanaged" packages with versions managed by EasyInstall, you won't have any more conflicts to worry @@ -823,27 +821,6 @@ Command-Line Options Added in Distribute 0.6.11 and Setuptools 0.7. -``--delete-conflicting, -D`` (Removed in 0.6a11) - (As of 0.6a11, this option is no longer necessary; please do not use it!) - - If you are replacing a package that was previously installed *without* - using EasyInstall, the old version may end up on ``sys.path`` before the - version being installed with EasyInstall. EasyInstall will normally abort - the installation of a package if it detects such a conflict, and ask you to - manually remove the conflicting files or directories. If you specify this - option, however, EasyInstall will attempt to delete the files or - directories itself, and then proceed with the installation. - -``--ignore-conflicts-at-my-risk`` (Removed in 0.6a11) - (As of 0.6a11, this option is no longer necessary; please do not use it!) - - Ignore conflicting packages and proceed with installation anyway, even - though it means the package probably won't work properly. If the - conflicting package is in a directory you can't write to, this may be your - only option, but you will need to take more invasive measures to get the - installed package to work, like manually adding it to ``PYTHONPATH`` or to - ``sys.path`` at runtime. - ``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) Specifies the base URL of the Python Package Index. The default is https://pypi.python.org/simple if not specified. When a package is requested diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 19d6e49490..66dc798bda 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -125,9 +125,6 @@ class easy_install(Command): ("always-copy", "a", "Copy all needed packages to install dir"), ("index-url=", "i", "base URL of Python Package Index"), ("find-links=", "f", "additional URL(s) to search for packages"), - ("delete-conflicting", "D", "no longer needed; don't use this"), - ("ignore-conflicts-at-my-risk", None, - "no longer needed; don't use this"), ("build-directory=", "b", "download/extract/build in DIR; keep the results"), ('optimize=', 'O', @@ -148,7 +145,7 @@ class easy_install(Command): ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', - 'delete-conflicting', 'ignore-conflicts-at-my-risk', 'editable', + 'editable', 'no-deps', 'local-snapshots-ok', 'version' ] @@ -197,8 +194,6 @@ def initialize_options(self): # Options not specifiable via command line self.package_index = None self.pth_file = self.always_copy_from = None - self.delete_conflicting = None - self.ignore_conflicts_at_my_risk = None self.site_dirs = None self.installed_projects = {} self.sitepy_installed = False @@ -342,11 +337,6 @@ def finalize_options(self): except ValueError: raise DistutilsOptionError("--optimize must be 0, 1, or 2") - if self.delete_conflicting and self.ignore_conflicts_at_my_risk: - raise DistutilsOptionError( - "Can't use both --delete-conflicting and " - "--ignore-conflicts-at-my-risk at the same time" - ) if self.editable and not self.build_directory: raise DistutilsArgError( "Must specify a build directory (-b) when using --editable" @@ -411,12 +401,7 @@ def pseudo_tempname(self): return os.path.join(self.install_dir, "test-easy-install-%s" % pid) def warn_deprecated_options(self): - if self.delete_conflicting or self.ignore_conflicts_at_my_risk: - log.warn( - "Note: The -D, --delete-conflicting and" - " --ignore-conflicts-at-my-risk no longer have any purpose" - " and should not be used." - ) + pass def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" @@ -1005,10 +990,6 @@ def check_conflicts(self, dist): return dist def found_conflicts(self, dist, blockers): - if self.delete_conflicting: - log.warn("Attempting to delete conflicting packages:") - return self.delete_blockers(blockers) - msg = """\ ------------------------------------------------------------------------- CONFLICT WARNING: @@ -1021,29 +1002,12 @@ def found_conflicts(self, dist, blockers): %s +------------------------------------------------------------------------- """ % '\n '.join(blockers) - if self.ignore_conflicts_at_my_risk: - msg += """\ -(Note: you can run EasyInstall on '%s' with the ---delete-conflicting option to attempt deletion of the above files -and/or directories.) -""" % dist.project_name - else: - msg += """\ -Note: you can attempt this installation again with EasyInstall, and use -either the --delete-conflicting (-D) option or the ---ignore-conflicts-at-my-risk option, to either delete the above files -and directories, or to ignore the conflicts, respectively. Note that if -you ignore the conflicts, the installed package(s) may not work. -""" - msg += """\ -------------------------------------------------------------------------- -""" sys.stderr.write(msg) sys.stderr.flush() - if not self.ignore_conflicts_at_my_risk: - raise DistutilsError("Installation aborted due to conflicts") + raise DistutilsError("Installation aborted due to conflicts") def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" From 6af26d45169f1632beb50f3071155c0bfd0d5b38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:28:07 -0400 Subject: [PATCH 1479/8469] Added tag 1.0 for changeset c385fdf1f976 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 35ccbea610..96735c09b3 100644 --- a/.hgtags +++ b/.hgtags @@ -92,3 +92,4 @@ e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 7b91ff93a30ef78634b7bb34f4a6229a5de281ee 1.0b1 aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 +c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 From 16e24b7f483babb855aaeb62f72d63b7315fe33d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:28:27 -0400 Subject: [PATCH 1480/8469] Bumped to 1.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +- setuptools/version.py | 2 +- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 00cf47aa35..3d835d3a1d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.0" +DEFAULT_VERSION = "1.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index ba887a084a..df9b9c2d76 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -entry_points.txt = setuptools.command.egg_info:write_entries - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -test_loader = setuptools.dist:check_importable -namespace_packages = setuptools.dist:check_nsp -convert_2to3_doctests = setuptools.dist:assert_string_list - -[distutils.commands] -bdist_egg = setuptools.command.bdist_egg:bdist_egg -egg_info = setuptools.command.egg_info:egg_info -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -easy_install = setuptools.command.easy_install:easy_install -register = setuptools.command.register:register -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -build_ext = setuptools.command.build_ext:build_ext -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts - +[distutils.commands] +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +setopt = setuptools.command.setopt:setopt +register = setuptools.command.register:register +easy_install = setuptools.command.easy_install:easy_install +test = setuptools.command.test:test +sdist = setuptools.command.sdist:sdist +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +egg_info = setuptools.command.egg_info:egg_info +bdist_egg = setuptools.command.bdist_egg:bdist_egg +build_py = setuptools.command.build_py:build_py +upload_docs = setuptools.command.upload_docs:upload_docs +install_lib = setuptools.command.install_lib:install_lib +develop = setuptools.command.develop:develop +rotate = setuptools.command.rotate:rotate +build_ext = setuptools.command.build_ext:build_ext +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +saveopts = setuptools.command.saveopts:saveopts +install_egg_info = setuptools.command.install_egg_info:install_egg_info + +[distutils.setup_keywords] +tests_require = setuptools.dist:check_requirements +install_requires = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +dependency_links = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +use_2to3 = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +entry_points = setuptools.dist:check_entry_points + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +entry_points.txt = setuptools.command.egg_info:write_entries +PKG-INFO = setuptools.command.egg_info:write_pkg_info +requires.txt = setuptools.command.egg_info:write_requirements +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 5de4d6e7c8..c06a8a0b3e 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,8 +1,5 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] wincertstore==0.1 @@ -10,4 +7,7 @@ wincertstore==0.1 ctypes==1.0.2 [ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ssl==1.16 + +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 7e49527e38..439eb0cd22 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.0' +__version__ = '1.1' From 3ce0aff78df0d02864946a34a622dd08d7a29c5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:44:47 -0400 Subject: [PATCH 1481/8469] Use jaraco.packaging 2.0 to invoke pushing the bookmark as a separate operation from pushing the other changesets. --- release.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index c2b331c712..221d8a6765 100644 --- a/release.py +++ b/release.py @@ -9,7 +9,7 @@ import pkg_resources -pkg_resources.require('jaraco.packaging>=1.1') +pkg_resources.require('jaraco.packaging>=2.0') def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') @@ -24,7 +24,15 @@ def before_upload(): os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" # override the push command to include the bootstrap bookmark. -push_command = ['hg', 'push', '-B', 'bootstrap'] +def after_push(): + """ + Push the bootstrap bookmark + """ + push_command = ['hg', 'push', '-B', 'bootstrap'] + # don't use check_call here because mercurial will return a non-zero + # code even if it succeeds at pushing the bookmark (because there are + # no changesets to be pushed). !dm mercurial + subprocess.call(push_command) link_patterns = [ r"(Issue )?#(?P\d+)", From 271dfce00c557029b348a170c9eab15e9f3a430b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:46:35 -0400 Subject: [PATCH 1482/8469] Refactor for clarity --- release.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/release.py b/release.py index 221d8a6765..4c9df8ccdf 100644 --- a/release.py +++ b/release.py @@ -15,6 +15,9 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') _add_bootstrap_bookmark() +def after_push(): + _push_bootstrap_bookmark() + files_with_versions = ( 'ez_setup.py', 'setuptools/version.py', ) @@ -23,17 +26,6 @@ def before_upload(): os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" -# override the push command to include the bootstrap bookmark. -def after_push(): - """ - Push the bootstrap bookmark - """ - push_command = ['hg', 'push', '-B', 'bootstrap'] - # don't use check_call here because mercurial will return a non-zero - # code even if it succeeds at pushing the bookmark (because there are - # no changesets to be pushed). !dm mercurial - subprocess.call(push_command) - link_patterns = [ r"(Issue )?#(?P\d+)", r"Distribute #(?P\d+)", @@ -73,3 +65,13 @@ def replacer(match): def _add_bootstrap_bookmark(): cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f'] subprocess.Popen(cmd) + +def _push_bootstrap_bookmark(): + """ + Push the bootstrap bookmark + """ + push_command = ['hg', 'push', '-B', 'bootstrap'] + # don't use check_call here because mercurial will return a non-zero + # code even if it succeeds at pushing the bookmark (because there are + # no changesets to be pushed). !dm mercurial + subprocess.call(push_command) From de71398660ecb616b5285334fa7c9fc10610126c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:48:00 -0400 Subject: [PATCH 1483/8469] Encapsulate bootstrap bookmark functionality --- release.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/release.py b/release.py index 4c9df8ccdf..edf6f4be75 100644 --- a/release.py +++ b/release.py @@ -13,10 +13,10 @@ def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') - _add_bootstrap_bookmark() + BootstrapBookmark.add() def after_push(): - _push_bootstrap_bookmark() + BootstrapBookmark.push() files_with_versions = ( 'ez_setup.py', 'setuptools/version.py', @@ -61,17 +61,19 @@ def replacer(match): url = issue_urls[key].format(**match_dict) return "`{text} <{url}>`_".format(text=text, url=url) - -def _add_bootstrap_bookmark(): - cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f'] - subprocess.Popen(cmd) - -def _push_bootstrap_bookmark(): - """ - Push the bootstrap bookmark - """ - push_command = ['hg', 'push', '-B', 'bootstrap'] - # don't use check_call here because mercurial will return a non-zero - # code even if it succeeds at pushing the bookmark (because there are - # no changesets to be pushed). !dm mercurial - subprocess.call(push_command) +class BootstrapBookmark: + @staticmethod + def add(): + cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f'] + subprocess.Popen(cmd) + + @staticmethod + def push(): + """ + Push the bootstrap bookmark + """ + push_command = ['hg', 'push', '-B', 'bootstrap'] + # don't use check_call here because mercurial will return a non-zero + # code even if it succeeds at pushing the bookmark (because there are + # no changesets to be pushed). !dm mercurial + subprocess.call(push_command) From d3eaf21c8918ce65bde30893b00adf18cf2f3a70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 15:48:59 -0400 Subject: [PATCH 1484/8469] Extract bookmark name into the class --- release.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/release.py b/release.py index edf6f4be75..85d8f86fd8 100644 --- a/release.py +++ b/release.py @@ -62,17 +62,19 @@ def replacer(match): return "`{text} <{url}>`_".format(text=text, url=url) class BootstrapBookmark: - @staticmethod - def add(): - cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f'] + name = 'bootstrap' + + @classmethod + def add(cls): + cmd = ['hg', 'bookmark', '-i', cls.name, '-f'] subprocess.Popen(cmd) - @staticmethod - def push(): + @classmethod + def push(cls): """ Push the bootstrap bookmark """ - push_command = ['hg', 'push', '-B', 'bootstrap'] + push_command = ['hg', 'push', '-B', cls.name] # don't use check_call here because mercurial will return a non-zero # code even if it succeeds at pushing the bookmark (because there are # no changesets to be pushed). !dm mercurial From b7bff0cdb501916d9f99edcd5e9d453066f982a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 16:42:00 -0400 Subject: [PATCH 1485/8469] Remove linked changes file after upload and push --- release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.py b/release.py index 85d8f86fd8..15f71a2d69 100644 --- a/release.py +++ b/release.py @@ -11,11 +11,14 @@ pkg_resources.require('jaraco.packaging>=2.0') + def before_upload(): _linkify('CHANGES.txt', 'CHANGES (links).txt') BootstrapBookmark.add() + def after_push(): + os.remove('CHANGES (links).txt') BootstrapBookmark.push() files_with_versions = ( From cc220f8f36d5b873e377329906dbd1a7d1f99833 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Aug 2013 16:55:20 -0400 Subject: [PATCH 1486/8469] Corrected title formatting and hyperlink to correct Sphinx errors --- CHANGES.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a075c3c8f7..9f1d15b302 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,7 +24,7 @@ CHANGES connection. Backward-Incompatible Changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +============================= This release includes a couple of backward-incompatible changes, but most if not all users will find 1.0 a drop-in replacement for 0.9. @@ -1162,8 +1162,9 @@ easy_install * ``setuptools`` now finds its commands, ``setup()`` argument validators, and metadata writers using entry points, so that they can be extended by - third-party packages. See `Creating distutils Extensions`_ above for more - details. + third-party packages. See `Creating distutils Extensions + `_ + for more details. * The vestigial ``depends`` command has been removed. It was never finished or documented, and never would have worked without EasyInstall - which it From a72b003bd4caedb79e8e1d2c168fd8b5f111b5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=A9ri?= Date: Sun, 18 Aug 2013 21:03:04 +0200 Subject: [PATCH 1487/8469] Fix spelling --- docs/using.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using.txt b/docs/using.txt index 6f93c3867c..e44847d642 100644 --- a/docs/using.txt +++ b/docs/using.txt @@ -4,7 +4,7 @@ Using Setuptools in your project To use Setuptools in your project, the recommended way is to ship `ez_setup.py` alongside your `setup.py` script and call -it at the very begining of `setup.py` like this:: +it at the very beginning of `setup.py` like this:: from ez_setup import use_setuptools use_setuptools() From c8d8126ffba6a9201b293fab0c8b0fc6346c129b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 19 Aug 2013 09:59:04 -0400 Subject: [PATCH 1488/8469] Powershell isn't installed by default on Windows Server 2008. Also it's possible that Powershell is present on older systems. Now use direct detection of a Powershell executable to determine viability of that technique for a downloader. Fixes #67. --- ez_setup.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 00cf47aa35..837ef3f347 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -164,9 +164,20 @@ def download_file_powershell(url, target): ] subprocess.check_call(cmd) -download_file_powershell.viable = ( - lambda: platform.system() == 'Windows' and platform.win32_ver()[1] >= '6' -) +def has_powershell(): + if platform.system() != 'Windows': + return False + cmd = ['powershell', '-Command', 'echo test'] + devnull = open(os.path.devnull, 'wb') + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False + finally: + devnull.close() + return True + +download_file_powershell.viable = has_powershell def download_file_curl(url, target): cmd = ['curl', url, '--silent', '--output', target] From b72b9d1d538f200a3531903c6cd7a1bf7e3e22bd Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 25 Aug 2013 20:56:46 +1000 Subject: [PATCH 1489/8469] Document __main__.__requires__ Also modernises the initial overview for pkg_resources, and helps make it clear that it covers anything with an egg-info directory, not just egg files. --HG-- branch : docs_update_for_requires --- docs/pkg_resources.txt | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 480f9547ce..b2166b546a 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -18,19 +18,16 @@ packages. Overview -------- -Eggs are a distribution format for Python modules, similar in concept to Java's -"jars" or Ruby's "gems". They differ from previous Python distribution formats -in that they are importable (i.e. they can be added to ``sys.path``), and they -are *discoverable*, meaning that they carry metadata that unambiguously -identifies their contents and dependencies, and thus can be *automatically* -found and added to ``sys.path`` in response to simple requests of the form, -"get me everything I need to use docutils' PDF support". - The ``pkg_resources`` module provides runtime facilities for finding, -introspecting, activating and using eggs and other "pluggable" distribution -formats. Because these are new concepts in Python (and not that well- -established in other languages either), it helps to have a few special terms -for talking about eggs and how they can be used: +introspecting, activating and using installed Python distributions. Some +of the more advanced features (notably the support for parallel installation +of multiple versions) rely specifically on the "egg" format (either as a +zip archive or subdirectory), while others (such as plugin discovery) will +work correctly so long as "egg-info" metadata directories are available for +relevant distributions. + +The following terms are needed in order to explain the capabilities offered +by this module: project A library, framework, script, plugin, application, or collection of data @@ -79,9 +76,13 @@ eggs with ``.egg`` and follows the egg naming conventions, and contain an ``EGG-INFO`` subdirectory (zipped or otherwise). Development eggs are normal directories of Python code with one or more ``ProjectName.egg-info`` - subdirectories. And egg links are ``*.egg-link`` files that contain the - name of a built or development egg, to support symbolic linking on - platforms that do not have native symbolic links. + subdirectories. The development egg format is also used to provide a + default version of a distribution that is available to software that + doesn't use ``pkg_resources`` to request specific versions. Egg links + are ``*.egg-link`` files that contain the name of a built or + development egg, to support symbolic linking on platforms that do not + have native symbolic links (or where the symbolic link support is + limited). (For more information about these terms and concepts, see also this `architectural overview`_ of ``pkg_resources`` and Python Eggs in general.) @@ -190,6 +191,17 @@ not provide any way to detect arbitrary changes to a list object like is designed so that the ``working_set`` is used by default, such that you don't have to explicitly refer to it most of the time. +All distributions available directly on ``sys.path`` will be activated +automatically when ``pkg_resources`` is imported. This behaviour can cause +version conflicts for applications which require non-default versions of +those distributions. To handle this situation, ``pkg_resources`` checks for a +``__requires__`` attribute in the ``__main__`` module when initializing the +default working set, and uses this to ensure a suitable version of each +affected distribution is activated. For example:: + + __requires__ = ["CherryPy < 3"] # Must be set before pkg_resources import + import pkg_resources + Basic ``WorkingSet`` Methods ---------------------------- From 0c3e350abfd455c6bf2678308cc26bef015b8d48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 14:39:24 -0400 Subject: [PATCH 1490/8469] Reorganize imports --- setuptools/dist.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 5c84b8d4b9..dfce015daf 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,18 +1,23 @@ __all__ = ['Distribution'] import re +import os import sys import warnings +import distutils.log +import distutils.core +import distutils.cmd from distutils.core import Distribution as _Distribution +from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, + DistutilsSetupError) + from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib from setuptools.compat import numeric_types, basestring -from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils.errors import DistutilsSetupError -import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd -import os, distutils.log +import setuptools +import pkg_resources def _get_unpatched(cls): """Protect against re-patching the distutils if reloaded From aece98c7d09ab1107ad77d2d4bfbec8d91fca127 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 14:40:08 -0400 Subject: [PATCH 1491/8469] Remove unused imports --- setuptools/dist.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index dfce015daf..c90f73c2cb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -12,11 +12,7 @@ DistutilsSetupError) from setuptools.depends import Require -from setuptools.command.install import install -from setuptools.command.sdist import sdist -from setuptools.command.install_lib import install_lib from setuptools.compat import numeric_types, basestring -import setuptools import pkg_resources def _get_unpatched(cls): From 2ec8add337856baa2fba48b161ef380d5d007a02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 14:42:33 -0400 Subject: [PATCH 1492/8469] Trim excess whitespace --- setuptools/dist.py | 127 ++------------------------------------------- 1 file changed, 4 insertions(+), 123 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index c90f73c2cb..c5b02f99f4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -136,38 +136,6 @@ def check_packages(dist, attr, value): ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -251,7 +219,7 @@ def patch_missing_pkg_info(self, attrs): dist._version = pkg_resources.safe_version(str(attrs['version'])) self._patched_dist = dist - def __init__ (self, attrs=None): + def __init__(self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} @@ -368,23 +336,6 @@ def _set_global_opts_from_features(self): self.global_options = self.feature_options = go + self.global_options self.negative_opt = self.feature_negopt = no - - - - - - - - - - - - - - - - - def _finalize_features(self): """Add/remove features and resolve dependencies between them""" @@ -402,7 +353,6 @@ def _finalize_features(self): feature.exclude_from(self) self._set_feature(name,0) - def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: @@ -422,10 +372,6 @@ def print_commands(self): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) - - - - def _set_feature(self,name,status): """Set feature's inclusion status""" setattr(self,self._feature_attrname(name),status) @@ -440,8 +386,8 @@ def include_feature(self,name): if self.feature_is_included(name)==0: descr = self.features[name].description raise DistutilsOptionError( - descr + " is required, but was excluded or is not available" - ) + descr + " is required, but was excluded or is not available" + ) self.features[name].include_in(self) self._set_feature(name,1) @@ -489,7 +435,6 @@ def exclude_package(self,package): if p.name != package and not p.name.startswith(pfx) ] - def has_contents_for(self,package): """Return true if 'exclude_package(package)' would do something""" @@ -499,15 +444,6 @@ def has_contents_for(self,package): if p==package or p.startswith(pfx): return True - - - - - - - - - def _exclude_misc(self,name,value): """Handle 'exclude()' for list/tuple attrs without a special handler""" if not isinstance(value,sequence): @@ -579,17 +515,6 @@ def _exclude_packages(self,packages): ) list(map(self.exclude_package, packages)) - - - - - - - - - - - def _parse_command_opts(self, parser, args): # Remove --with-X/--without-X options when processing command args self.global_options = self.__class__.global_options @@ -616,21 +541,6 @@ def _parse_command_opts(self, parser, args): return nargs - - - - - - - - - - - - - - - def get_cmdline_options(self): """Return a '{cmd: {opt:val}}' map of all command-line options @@ -671,7 +581,6 @@ def get_cmdline_options(self): return d - def iter_distribution_names(self): """Yield all packages, modules, and extension names in distribution""" @@ -690,7 +599,6 @@ def iter_distribution_names(self): name = name[:-6] yield name - def handle_display_options(self, option_order): """If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command @@ -732,24 +640,6 @@ def handle_display_options(self, option_order): module.Distribution = Distribution - - - - - - - - - - - - - - - - - - class Feature: """ **deprecated** -- The `Feature` facility was never completely implemented @@ -817,8 +707,7 @@ def warn_deprecated(): ) def __init__(self, description, standard=False, available=True, - optional=True, require_features=(), remove=(), **extras - ): + optional=True, require_features=(), remove=(), **extras): self.warn_deprecated() self.description = description @@ -870,8 +759,6 @@ def include_in(self,dist): for f in self.require_features: dist.include_feature(f) - - def exclude_from(self,dist): """Ensure feature is excluded from distribution @@ -888,8 +775,6 @@ def exclude_from(self,dist): for item in self.remove: dist.exclude_package(item) - - def validate(self,dist): """Verify that feature makes sense in context of distribution @@ -909,7 +794,3 @@ def validate(self,dist): " doesn't contain any packages or modules under %s" % (self.description, item, item) ) - - - - From 4041d1f4667aa4bd7f7373ff7cc626b0d9f5d10c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 21:22:34 -0400 Subject: [PATCH 1493/8469] Updated error message reported when `--allow-hosts` blocks a link to provide a less startling user experience. Fixes #71. --- CHANGES.txt | 7 +++++++ setuptools/package_index.py | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9f1d15b302..b95b71027a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +1.1 +--- + +* Issue #71 (Distribute Issue #333): EasyInstall now puts less emphasis on the + condition when a host is blocked via ``--allow-hosts``. + --- 1.0 --- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9c9d76a186..d949063eda 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -343,7 +343,8 @@ def url_ok(self, url, fatal=False): s = URL_SCHEME(url) if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]): return True - msg = "\nLink to % s ***BLOCKED*** by --allow-hosts\n" + msg = ("\nNote: Bypassing %s (disallowed host; see " + "http://bit.ly/1dg9ijs for details).\n") if fatal: raise DistutilsError(msg % url) else: From 57e2b3119270044162edf4263b4ec7ea1e2adca9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 21:27:33 -0400 Subject: [PATCH 1494/8469] Updated changelog entry to reference the pertinent issue. --- CHANGES.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b95b71027a..70c0ffd6f6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,14 +13,14 @@ CHANGES 1.0 --- -* On Windows, Setuptools supports deferring to Vinay Sajip's `pylauncher - `_ (included with Python 3.3) to - launch console and GUI scripts and not install its own launcher - executables. This experimental functionality is currently only enabled if - the ``SETUPTOOLS_LAUNCHER`` environment variable is set to "natural". - In the future, this behavior may become default, but only after it has - matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER`` also - accepts "executable" to force the default behavior of creating launcher +* Issue #60: On Windows, Setuptools supports deferring to another launcher, + such as Vinay Sajip's `pylauncher `_ + (included with Python 3.3) to launch console and GUI scripts and not install + its own launcher executables. This experimental functionality is currently + only enabled if the ``SETUPTOOLS_LAUNCHER`` environment variable is set to + "natural". In the future, this behavior may become default, but only after + it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER`` + also accepts "executable" to force the default behavior of creating launcher executables. * Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or wget for retrieving the Setuptools tarball for improved security of the From ae675b923b2079bad5d2bba83502cefc83a1edc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Aug 2013 21:27:34 -0400 Subject: [PATCH 1495/8469] Nest try/except/finally for use on Python 2.4. Fixes #72. --- CHANGES.txt | 1 + ez_setup.py | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 70c0ffd6f6..3e2caeb0ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Issue #71 (Distribute Issue #333): EasyInstall now puts less emphasis on the condition when a host is blocked via ``--allow-hosts``. +* Issue #72: Restored Python 2.4 compatibility in ``ez_setup.py``. --- 1.0 diff --git a/ez_setup.py b/ez_setup.py index 40db5a577f..7a597d2226 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -170,9 +170,10 @@ def has_powershell(): cmd = ['powershell', '-Command', 'echo test'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True @@ -187,9 +188,10 @@ def has_curl(): cmd = ['curl', '--version'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True @@ -204,9 +206,10 @@ def has_wget(): cmd = ['wget', '--version'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True From 7fa044fd170dc56ac8c484aa4739285d568150a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Aug 2013 21:42:33 -0400 Subject: [PATCH 1496/8469] Added tag 1.1 for changeset d943b67fe80d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 96735c09b3..3957034c42 100644 --- a/.hgtags +++ b/.hgtags @@ -93,3 +93,4 @@ e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 +d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 From db4b127a0370bb7f2bfaa77b3163c0f26ee980ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Aug 2013 21:43:00 -0400 Subject: [PATCH 1497/8469] Bumped to 1.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 ++--- setuptools/version.py | 2 +- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 7a597d2226..13d0949f61 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1" +DEFAULT_VERSION = "1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index df9b9c2d76..abcafd65e7 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -setopt = setuptools.command.setopt:setopt -register = setuptools.command.register:register -easy_install = setuptools.command.easy_install:easy_install -test = setuptools.command.test:test -sdist = setuptools.command.sdist:sdist -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -egg_info = setuptools.command.egg_info:egg_info -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_py = setuptools.command.build_py:build_py -upload_docs = setuptools.command.upload_docs:upload_docs -install_lib = setuptools.command.install_lib:install_lib -develop = setuptools.command.develop:develop -rotate = setuptools.command.rotate:rotate -build_ext = setuptools.command.build_ext:build_ext -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -saveopts = setuptools.command.saveopts:saveopts -install_egg_info = setuptools.command.install_egg_info:install_egg_info +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -tests_require = setuptools.dist:check_requirements -install_requires = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data packages = setuptools.dist:check_packages -eager_resources = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +entry_points = setuptools.dist:check_entry_points include_package_data = setuptools.dist:assert_bool +use_2to3_exclude_fixers = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main +test_loader = setuptools.dist:check_importable +install_requires = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info +dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.commands] +easy_install = setuptools.command.easy_install:easy_install +build_ext = setuptools.command.build_ext:build_ext +install = setuptools.command.install:install +saveopts = setuptools.command.saveopts:saveopts +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +install_scripts = setuptools.command.install_scripts:install_scripts +egg_info = setuptools.command.egg_info:egg_info +upload_docs = setuptools.command.upload_docs:upload_docs +sdist = setuptools.command.sdist:sdist +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +rotate = setuptools.command.rotate:rotate +register = setuptools.command.register:register +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_lib = setuptools.command.install_lib:install_lib +build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index c06a8a0b3e..6d385dc746 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 439eb0cd22..64477cf292 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1' +__version__ = '1.2' From 48ab068f3683139591a03a47ffc50f0b42b767cd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Aug 2013 21:45:05 -0400 Subject: [PATCH 1498/8469] Update reference to distribute. --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3e2caeb0ce..928673bc9b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 1.1 --- -* Issue #71 (Distribute Issue #333): EasyInstall now puts less emphasis on the +* Issue #71 (Distribute #333): EasyInstall now puts less emphasis on the condition when a host is blocked via ``--allow-hosts``. * Issue #72: Restored Python 2.4 compatibility in ``ez_setup.py``. From afe5e690c83adb9efea6f2eb774d9bf9798053fb Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Fri, 30 Aug 2013 21:55:23 +1000 Subject: [PATCH 1499/8469] Add back a more descriptive intro --HG-- branch : docs_update_for_requires --- docs/pkg_resources.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index b2166b546a..6c93b57d88 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -26,6 +26,21 @@ zip archive or subdirectory), while others (such as plugin discovery) will work correctly so long as "egg-info" metadata directories are available for relevant distributions. +Eggs are a distribution format for Python modules, similar in concept to +Java's "jars" or Ruby's "gems", or the "wheel" format defined in PEP 427. +However, unlike a pure distribution format, egg can also be installed and +added directly to ``sys.path`` as an import location. When installed in +this way, eggs are *discoverable*, meaning that they carry metadata that +unambiguously identifies their contents and dependencies. This means that +an installed egg can be *automatically* found and added to ``sys.path`` in +response to simple requests of the form, "get me everything I need to use +docutils' PDF support". This feature allows mutually conflicting versions of +a distribution to co-exist in the same Python installation, with individual +applications activating the desired version at runtime by manipulating the +contents of ``sys.path`` (this differs from the virtual environment +approach, which involves creating isolated environments for each +application). + The following terms are needed in order to explain the capabilities offered by this module: From b9ae0569d22adc9f83301f180ebcb17ae7ae2e6f Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Fri, 30 Aug 2013 21:58:51 +1000 Subject: [PATCH 1500/8469] Typo fix --HG-- branch : docs_update_for_requires --- docs/pkg_resources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 6c93b57d88..3aac47203f 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -28,7 +28,7 @@ relevant distributions. Eggs are a distribution format for Python modules, similar in concept to Java's "jars" or Ruby's "gems", or the "wheel" format defined in PEP 427. -However, unlike a pure distribution format, egg can also be installed and +However, unlike a pure distribution format, eggs can also be installed and added directly to ``sys.path`` as an import location. When installed in this way, eggs are *discoverable*, meaning that they carry metadata that unambiguously identifies their contents and dependencies. This means that From 0424d55854a4814a17377460975b791a8cb24a62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 31 Aug 2013 12:12:16 -0400 Subject: [PATCH 1501/8469] ez_setup.py now takes a --insecure argument to bypass the secure downloaders. download_setuptools also now accepts a new keyword argument 'download_factory', enabling programmitic invocation to customize the downloader resolution. Fixes #75. Thanks to Pablo Algarvio for the report and suggestions. --- CHANGES.txt | 7 +++++++ CONTRIBUTORS.txt | 1 + ez_setup.py | 16 +++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3e2caeb0ce..7ac75d7dc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +next +---- + +* Issue #75: Add ``--insecure`` option to ez_setup.py to accommodate + environments where a trusted SSL connection cannot be validated. + --- 1.1 --- diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f1966505a7..dd0b8c7f11 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -21,6 +21,7 @@ Contributors * Marc Abramowitz * Martin von Löwis * Noufal Ibrahim +* Pedro Algarvio * Pete Hollobon * Phillip J. Eby * Philip Jenvey diff --git a/ez_setup.py b/ez_setup.py index 7a597d2226..5c49446001 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -254,7 +254,8 @@ def get_best_downloader(): return dl def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, delay=15): + to_dir=os.curdir, delay=15, + downloader_factory=get_best_downloader): """Download setuptools from a specified location and return its filename `version` should be a valid setuptools version number that is available @@ -262,6 +263,9 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. + + ``downloader_factory`` should be a function taking no arguments and + returning a function for downloading a URL to a target. """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) @@ -270,7 +274,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, saveto = os.path.join(to_dir, tgz_name) if not os.path.exists(saveto): # Avoid repeated downloads log.warn("Downloading %s", url) - downloader = get_best_downloader() + downloader = downloader_factory() downloader(url, saveto) return os.path.realpath(saveto) @@ -346,6 +350,11 @@ def _parse_args(): '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, help='alternative URL from where to download the setuptools package') + parser.add_option( + '--insecure', dest='downloader_factory', action='store_const', + const=lambda: download_file_insecure, default=get_best_downloader, + help='Use internal, non-validating downloader' + ) options, args = parser.parse_args() # positional arguments are ignored return options @@ -353,7 +362,8 @@ def _parse_args(): def main(version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" options = _parse_args() - tarball = download_setuptools(download_base=options.download_base) + tarball = download_setuptools(download_base=options.download_base, + downloader_factory=options.downloader_factory) return _install(tarball, _build_install_args(options)) if __name__ == '__main__': From 2e0ef2a83c7e662b1bd48926c1dc82bc44aa5efd Mon Sep 17 00:00:00 2001 From: Kai Hoppert Date: Sun, 1 Sep 2013 14:41:44 +0200 Subject: [PATCH 1502/8469] Add documentation --HG-- extra : histedit_source : ff07b41a59ac22e1c05ce4fd42c6771378e80f13 --- docs/easy_install.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 03f816de02..ffe6a268e6 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -454,6 +454,30 @@ You can do this with both index page URLs and direct download URLs. As long as any HTML pages read by easy_install use *relative* links to point to the downloads, the same user ID and password will be used to do the downloading. +Authentication against privat repository +---------------------------------------- + +To get these things running. You need a .pypirc file in your home directory. The file should has the following format. + +Example + +:: + + [distutils] + index-servers = myrepos + + [myrepos] + repository: http://myrepos.com + username:MY_USER + password:MY_PASSORD + +In your buildout.cfg you have to add the eggserver url under find-links. The example is for an mypypi egg server. /eggs provides a flat package list. + +Example + +:: + + find-links = http://myrepos.com/eggs Controlling Build Options ~~~~~~~~~~~~~~~~~~~~~~~~~ From 01ef8a46f78d30526b57339e71f80f79e5a0d9dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 13:51:42 -0400 Subject: [PATCH 1503/8469] Remove unused import --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 45b95f90b1..266661bcbe 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,5 +1,5 @@ """Extensions to the 'distutils' for large or complex distributions""" -from setuptools.extension import Extension, Library +from setuptools.extension import Extension from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command from setuptools.depends import Require From 231b4c70dee105919e04c9ee3e1dcadb52546251 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 13:53:47 -0400 Subject: [PATCH 1504/8469] Remove unused import --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 266661bcbe..3373e240b5 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,7 +1,7 @@ """Extensions to the 'distutils' for large or complex distributions""" from setuptools.extension import Extension from setuptools.dist import Distribution, Feature, _get_unpatched -import distutils.core, setuptools.command +import distutils.core from setuptools.depends import Require from distutils.core import Command as _Command from distutils.util import convert_path From 396a217ad725e25c8761edf3678dea349d06e023 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 13:55:59 -0400 Subject: [PATCH 1505/8469] Reorganize imports --- setuptools/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 3373e240b5..b048d9fd12 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,19 +1,23 @@ """Extensions to the 'distutils' for large or complex distributions""" -from setuptools.extension import Extension -from setuptools.dist import Distribution, Feature, _get_unpatched + +import os +import sys import distutils.core -from setuptools.depends import Require from distutils.core import Command as _Command from distutils.util import convert_path -import os -import sys -from setuptools.version import __version__ + +import setuptools.version +from setuptools.extension import Extension +from setuptools.dist import Distribution, Feature, _get_unpatched +from setuptools.depends import Require __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' ] +__version__ = setuptools.version.__version__ + bootstrap_install_from = None # If we run 2to3 on .py files, should we also convert docstrings? From 053ed7e2f6885b001a85fc0a8759f2226a2f178a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:00:19 -0400 Subject: [PATCH 1506/8469] Refactor for clarity --- setuptools/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index b048d9fd12..2eb51a1f73 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -41,10 +41,14 @@ def find_packages(where='.', exclude=()): where,prefix = stack.pop(0) for name in os.listdir(where): fn = os.path.join(where,name) - if ('.' not in name and os.path.isdir(fn) and - os.path.isfile(os.path.join(fn,'__init__.py')) - ): - out.append(prefix+name); stack.append((fn,prefix+name+'.')) + looks_like_package = ( + '.' not in name + and os.path.isdir(fn) + and os.path.isfile(os.path.join(fn,'__init__.py')) + ) + if looks_like_package: + out.append(prefix+name) + stack.append((fn,prefix+name+'.')) for pat in list(exclude)+['ez_setup']: from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] From 26ea618c278baa8ea77bf3f81f8abf5e3c1cf416 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:01:55 -0400 Subject: [PATCH 1507/8469] Move imports to leader --- setuptools/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2eb51a1f73..820f7f556d 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -3,6 +3,7 @@ import os import sys import distutils.core +import distutils.filelist from distutils.core import Command as _Command from distutils.util import convert_path @@ -44,11 +45,11 @@ def find_packages(where='.', exclude=()): looks_like_package = ( '.' not in name and os.path.isdir(fn) - and os.path.isfile(os.path.join(fn,'__init__.py')) + and os.path.isfile(os.path.join(fn, '__init__.py')) ) if looks_like_package: out.append(prefix+name) - stack.append((fn,prefix+name+'.')) + stack.append((fn, prefix+name+'.')) for pat in list(exclude)+['ez_setup']: from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] @@ -75,7 +76,6 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): setattr(cmd,k,v) # update command with keywords return cmd -import distutils.core distutils.core.Command = Command # we can't patch distutils.cmd, alas def findall(dir = os.curdir): @@ -91,7 +91,6 @@ def findall(dir = os.curdir): all_files.extend(filter(os.path.isfile, files)) return all_files -import distutils.filelist distutils.filelist.findall = findall # fix findall bug in distutils. # sys.dont_write_bytecode was introduced in Python 2.6. From 352f5f5c49dbd9d0a71106b7d380adce2543d020 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:04:53 -0400 Subject: [PATCH 1508/8469] Refactor _dont_write_bytecode detection --- setuptools/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 820f7f556d..48bc1a4b75 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -94,8 +94,10 @@ def findall(dir = os.curdir): distutils.filelist.findall = findall # fix findall bug in distutils. # sys.dont_write_bytecode was introduced in Python 2.6. -if ((hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) or - (not hasattr(sys, "dont_write_bytecode") and os.environ.get("PYTHONDONTWRITEBYTECODE"))): - _dont_write_bytecode = True -else: - _dont_write_bytecode = False +_dont_write_bytecode = ( + (hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) + or ( + not hasattr(sys, "dont_write_bytecode") + and os.environ.get("PYTHONDONTWRITEBYTECODE") + ) +) From 420493f6338b6511cddb6b6bcafcdb33415afe4b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:12:15 -0400 Subject: [PATCH 1509/8469] More simply resolve _dont_write_bytecode. --- setuptools/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 48bc1a4b75..fc9b7b936c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -94,10 +94,5 @@ def findall(dir = os.curdir): distutils.filelist.findall = findall # fix findall bug in distutils. # sys.dont_write_bytecode was introduced in Python 2.6. -_dont_write_bytecode = ( - (hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) - or ( - not hasattr(sys, "dont_write_bytecode") - and os.environ.get("PYTHONDONTWRITEBYTECODE") - ) -) +_dont_write_bytecode = getattr(sys, 'dont_write_bytecode', + bool(os.environ.get("PYTHONDONTWRITEBYTECODE"))) From a81b616547845b80c52e642bfe56180676d46d0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:16:19 -0400 Subject: [PATCH 1510/8469] Move imports to header --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 66dc798bda..a7a40e267a 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -24,6 +24,8 @@ import platform import textwrap import warnings +import site +import struct from glob import glob from distutils import log, dir_util @@ -73,10 +75,8 @@ def _get_purelib(): 'main', 'get_exe_prefixes', ] -import site HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE -import struct def is_64bit(): return struct.calcsize("P") == 8 From 05ea2dae700821c491b3fd1cc665c26e1b7a5ed8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:18:14 -0400 Subject: [PATCH 1511/8469] Normalize style --- setuptools/command/easy_install.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a7a40e267a..7aff9c840b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -502,7 +502,8 @@ def check_pth_processing(self): else: try: f.write("import os; f = open(%r, 'w'); f.write('OK'); f.close()\n" % (ok_file,)) - f.close(); f=None + f.close() + f=None executable = sys.executable if os.name=='nt': dirname,basename = os.path.split(executable) @@ -521,9 +522,12 @@ def check_pth_processing(self): ) return True finally: - if f: f.close() - if os.path.exists(ok_file): os.unlink(ok_file) - if os.path.exists(pth_file): os.unlink(pth_file) + if f: + f.close() + if os.path.exists(ok_file): + os.unlink(ok_file) + if os.path.exists(pth_file): + os.unlink(pth_file) if not self.multi_version: log.warn("TEST FAILED: %s does NOT support .pth files", instdir) return False From 3860484b6cc33cc499b56c96a6332263be562bfe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:21:33 -0400 Subject: [PATCH 1512/8469] Refactor for nicer indentation --- setuptools/command/easy_install.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7aff9c840b..755b15d63e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -81,14 +81,13 @@ def is_64bit(): return struct.calcsize("P") == 8 def samefile(p1, p2): - if hasattr(os.path,'samefile') and ( - os.path.exists(p1) and os.path.exists(p2) - ): - return os.path.samefile(p1,p2) - return ( - os.path.normpath(os.path.normcase(p1)) == - os.path.normpath(os.path.normcase(p2)) - ) + both_exist = os.path.exists(p1) and os.path.exists(p2) + use_samefile = hasattr(os.path, 'samefile') and both_exist + if use_samefile: + return os.path.samefile(p1, p2) + norm_p1 = os.path.normpath(os.path.normcase(p1)) + norm_p2 = os.path.normpath(os.path.normcase(p2)) + return norm_p1 == norm_p2 if sys.version_info <= (3,): def _to_ascii(s): From b1dfe6c40f83f5b1efab707c356aa08fdeb1b62b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:23:39 -0400 Subject: [PATCH 1513/8469] Rename variable to avoid conflation with global --- setuptools/command/easy_install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 755b15d63e..78d96696b2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -882,10 +882,10 @@ def install_exe(self, dist_filename, tmpdir): # Convert the .exe to an unpacked egg egg_path = dist.location = os.path.join(tmpdir, dist.egg_name()+'.egg') egg_tmp = egg_path + '.tmp' - egg_info = os.path.join(egg_tmp, 'EGG-INFO') - pkg_inf = os.path.join(egg_info, 'PKG-INFO') + _egg_info = os.path.join(egg_tmp, 'EGG-INFO') + pkg_inf = os.path.join(_egg_info, 'PKG-INFO') ensure_directory(pkg_inf) # make sure EGG-INFO dir exists - dist._provider = PathMetadata(egg_tmp, egg_info) # XXX + dist._provider = PathMetadata(egg_tmp, _egg_info) # XXX self.exe_to_egg(dist_filename, egg_tmp) # Write EGG-INFO/PKG-INFO @@ -896,7 +896,7 @@ def install_exe(self, dist_filename, tmpdir): if k != 'target_version': f.write('%s: %s\n' % (k.replace('_','-').title(), v)) f.close() - script_dir = os.path.join(egg_info,'scripts') + script_dir = os.path.join(_egg_info,'scripts') self.delete_blockers( # delete entry-point scripts to avoid duping [os.path.join(script_dir,args[0]) for args in get_script_args(dist)] ) From 6826957239fac24794af05c81a8fb176467c698f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:24:03 -0400 Subject: [PATCH 1514/8469] Remove unused import --- setuptools/command/easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 78d96696b2..737a6fc363 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -962,7 +962,6 @@ def check_conflicts(self, dist): return dist # XXX temporarily disable until new strategy is stable from imp import find_module, get_suffixes - from glob import glob blockers = [] names = dict.fromkeys(dist._get_metadata('top_level.txt')) # XXX private attr From 234c0fc5d3ecde835fd130a8d072fcffba7e172c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:29:35 -0400 Subject: [PATCH 1515/8469] Remove long-disabled functionality 'check_conflicts'. --- setuptools/command/easy_install.py | 57 +----------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 737a6fc363..6ce19fa4df 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -640,7 +640,7 @@ def install_item(self, spec, download, tmpdir, deps, install_needed=False): for dist in dists: self.process_distribution(spec, dist, deps) else: - dists = [self.check_conflicts(self.egg_distribution(download))] + dists = [self.egg_distribution(download)] self.process_distribution(spec, dists[0], deps, "Using") if spec is not None: @@ -838,7 +838,6 @@ def install_egg(self, egg_path, tmpdir): ensure_directory(destination) dist = self.egg_distribution(egg_path) - self.check_conflicts(dist) if not samefile(egg_path, destination): if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) @@ -957,60 +956,6 @@ def process(src,dst): f.write('\n'.join(locals()[name])+'\n') f.close() - def check_conflicts(self, dist): - """Verify that there are no conflicting "old-style" packages""" - - return dist # XXX temporarily disable until new strategy is stable - from imp import find_module, get_suffixes - - blockers = [] - names = dict.fromkeys(dist._get_metadata('top_level.txt')) # XXX private attr - - exts = {'.pyc':1, '.pyo':1} # get_suffixes() might leave one out - for ext,mode,typ in get_suffixes(): - exts[ext] = 1 - - for path,files in expand_paths([self.install_dir]+self.all_site_dirs): - for filename in files: - base,ext = os.path.splitext(filename) - if base in names: - if not ext: - # no extension, check for package - try: - f, filename, descr = find_module(base, [path]) - except ImportError: - continue - else: - if f: f.close() - if filename not in blockers: - blockers.append(filename) - elif ext in exts and base!='site': # XXX ugh - blockers.append(os.path.join(path,filename)) - if blockers: - self.found_conflicts(dist, blockers) - - return dist - - def found_conflicts(self, dist, blockers): - msg = """\ -------------------------------------------------------------------------- -CONFLICT WARNING: - -The following modules or packages have the same names as modules or -packages being installed, and will be *before* the installed packages in -Python's search path. You MUST remove all of the relevant files and -directories before you will be able to use the package(s) you are -installing: - - %s - -------------------------------------------------------------------------- -""" % '\n '.join(blockers) - - sys.stderr.write(msg) - sys.stderr.flush() - raise DistutilsError("Installation aborted due to conflicts") - def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" msg = "\n%(what)s %(eggloc)s%(extras)s" From bd959a59df72cacea485bedccd8f5d452e0aa353 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:39:26 -0400 Subject: [PATCH 1516/8469] Remove import * --- setuptools/command/upload.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 02d955eda6..8d258d5a89 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -2,10 +2,10 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" -from distutils.errors import * +from distutils import errors +from distutils import log from distutils.core import Command from distutils.spawn import spawn -from distutils import log try: from hashlib import md5 except ImportError: @@ -45,7 +45,7 @@ def initialize_options(self): def finalize_options(self): if self.identity and not self.sign: - raise DistutilsOptionError( + raise errors.DistutilsOptionError( "Must use --sign for --identity to have meaning" ) if 'HOME' in os.environ: @@ -68,7 +68,7 @@ def finalize_options(self): def run(self): if not self.distribution.dist_files: - raise DistutilsOptionError("No dist file created in earlier command") + raise errors.DistutilsOptionError("No dist file created in earlier command") for command, pyversion, filename in self.distribution.dist_files: self.upload_file(command, pyversion, filename) From 701115d88ba8b59b890672d131bc061c80e889c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:40:40 -0400 Subject: [PATCH 1517/8469] Use isinstance for type comparison --- setuptools/command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 8d258d5a89..93da7a395a 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -122,7 +122,7 @@ def upload_file(self, command, pyversion, filename): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if type(value) != type([]): + if isinstance(value, list): value = [value] for value in value: if type(value) is tuple: From aa3e70d8a887dc71ecc8170d04a623fa5542360f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:41:05 -0400 Subject: [PATCH 1518/8469] Remove unused variable --- setuptools/command/upload.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 93da7a395a..dde4decd7f 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -158,7 +158,6 @@ def upload_file(self, command, pyversion, filename): raise AssertionError("unsupported schema " + schema) data = '' - loglevel = log.INFO try: http.connect() http.putrequest("POST", url) From ca3e8a370652c0735cb3921d43152e1014bbd946 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:46:55 -0400 Subject: [PATCH 1519/8469] Correct AttributeError in upload command on Python 2.4. Fixes #76 --- CHANGES.txt | 7 ++++--- setuptools/command/upload.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5a73957118..b0d0da3ef4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,13 @@ CHANGES ======= ----- -next ----- +----- +1.1.1 +----- * Issue #75: Add ``--insecure`` option to ez_setup.py to accommodate environments where a trusted SSL connection cannot be validated. +* Issue #76: Fix AttributeError in upload command with Python 2.4. --- 1.1 diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index dde4decd7f..5476b5ecc2 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -119,7 +119,7 @@ def upload_file(self, command, pyversion, filename): boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary end_boundary = sep_boundary + '--' - body = StringIO.StringIO() + body = StringIO() for key, value in data.items(): # handle multiple entries for the same name if isinstance(value, list): From 5840ec69294a4ff2f499f2465434aaf9288a7177 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:48:50 -0400 Subject: [PATCH 1520/8469] Bumped to 1.1.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 975501e417..da0522f19e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.2" +DEFAULT_VERSION = "1.1.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 64477cf292..b3ddbc41f3 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.2' +__version__ = '1.1.1' From cd04261b69743dd545338cd9628ac18afc526d94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:48:52 -0400 Subject: [PATCH 1521/8469] Added tag 1.1.1 for changeset 2e42e8654610 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3957034c42..040273df88 100644 --- a/.hgtags +++ b/.hgtags @@ -94,3 +94,4 @@ aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 +2e42e86546100c9f6845b04eb31b75c5add05f78 1.1.1 From bb6bcc421feb339c8cb876edc1f3eb18159aa6a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2013 22:49:15 -0400 Subject: [PATCH 1522/8469] Bumped to 1.1.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/version.py | 2 +- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index da0522f19e..62bcd0a712 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.1" +DEFAULT_VERSION = "1.1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index abcafd65e7..73898c7291 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [distutils.setup_keywords] -exclude_package_data = setuptools.dist:check_package_data -eager_resources = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable convert_2to3_doctests = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp packages = setuptools.dist:check_packages -use_2to3 = setuptools.dist:assert_bool -entry_points = setuptools.dist:check_entry_points +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list include_package_data = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool use_2to3_exclude_fixers = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras -test_loader = setuptools.dist:check_importable -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +use_2to3 = setuptools.dist:assert_bool tests_require = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +exclude_package_data = setuptools.dist:check_package_data dependency_links = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.commands] +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +build_py = setuptools.command.build_py:build_py +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +install_egg_info = setuptools.command.install_egg_info:install_egg_info +setopt = setuptools.command.setopt:setopt +saveopts = setuptools.command.saveopts:saveopts +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +test = setuptools.command.test:test +register = setuptools.command.register:register +easy_install = setuptools.command.easy_install:easy_install +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist +bdist_egg = setuptools.command.bdist_egg:bdist_egg +egg_info = setuptools.command.egg_info:egg_info + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [egg_info.writers] +entry_points.txt = setuptools.command.egg_info:write_entries dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements +top_level.txt = setuptools.command.egg_info:write_toplevel_names depends.txt = setuptools.command.egg_info:warn_depends_obsolete eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -[distutils.commands] -easy_install = setuptools.command.easy_install:easy_install -build_ext = setuptools.command.build_ext:build_ext -install = setuptools.command.install:install -saveopts = setuptools.command.saveopts:saveopts -install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -install_scripts = setuptools.command.install_scripts:install_scripts -egg_info = setuptools.command.egg_info:egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -sdist = setuptools.command.sdist:sdist -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -alias = setuptools.command.alias:alias -rotate = setuptools.command.rotate:rotate -register = setuptools.command.register:register -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_lib = setuptools.command.install_lib:install_lib -build_py = setuptools.command.build_py:build_py -setopt = setuptools.command.setopt:setopt +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 6d385dc746..e7f0f3b867 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:python_version in '2.4, 2.5'] ssl==1.16 [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index b3ddbc41f3..7b344eca4a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.1' +__version__ = '1.1.2' From 705e6255fca83f5ff2b194e6529968017cefaaa3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:33:13 -0400 Subject: [PATCH 1523/8469] Correct 404 errors when URLs contain fragments. Fixes #69. --- setuptools/compat.py | 5 +++-- setuptools/package_index.py | 2 +- setuptools/py26compat.py | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 setuptools/py26compat.py diff --git a/setuptools/compat.py b/setuptools/compat.py index e2f64de236..6094ca7418 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -26,7 +26,7 @@ reduce = reduce unichr = unichr unicode = unicode - from urllib import url2pathname + from urllib import url2pathname, splittag import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser from urlparse import urlparse, urlunparse, urljoin @@ -72,7 +72,8 @@ def exec_(code, globs=None, locs=None): from urllib.error import HTTPError, URLError import urllib.request as urllib2 from urllib.request import urlopen, url2pathname - from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin + from urllib.parse import (urlparse, urlunparse, unquote, splituser, + urljoin, splittag) xrange = range filterfalse = itertools.filterfalse diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4c4a647d4a..a09048b446 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -657,7 +657,7 @@ def _download_to(self, url, filename): fp, tfp, info = None, None, None try: checker = HashChecker.from_url(url) - fp = self.open_url(url) + fp = self.open_url(strip_fragment(url)) if isinstance(fp, HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py new file mode 100644 index 0000000000..6fc0088312 --- /dev/null +++ b/setuptools/py26compat.py @@ -0,0 +1,19 @@ +""" +Compatibility Support for Python 2.6 and earlier +""" + +import sys + +from setuptools.compat import splittag + +def strip_fragment(url): + """ + In `Python 8280 `_, Python 2.7 and + later was patched to disregard the fragment when making URL requests. + Do the same for Python 2.6 and earlier. + """ + url, fragment = splittag(url) + return url + +if sys.version_info < (2,7): + strip_fragment = lambda x: x From ca2798727269cd4433ae355ef64a7cffd3807aaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:36:06 -0400 Subject: [PATCH 1524/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b0d0da3ef4..cb300d47c8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +1.1.2 +----- + +* Issue #69: Correct issue where 404 errors are returned for URLs with + fragments in them (such as #egg=). + ----- 1.1.1 ----- From eb61edf878f2c22cf88209bc241f46c37c684d69 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:37:04 -0400 Subject: [PATCH 1525/8469] Added tag 1.1.2 for changeset 462fe5ccd8be --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 040273df88..5f99eb5872 100644 --- a/.hgtags +++ b/.hgtags @@ -95,3 +95,4 @@ aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 2e42e86546100c9f6845b04eb31b75c5add05f78 1.1.1 +462fe5ccd8befeb2a235e8295d6d73eb3a49cc78 1.1.2 From 4c466d70b1625083222056be277b575e0446f185 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:37:25 -0400 Subject: [PATCH 1526/8469] Bumped to 1.1.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 84 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 10 ++-- setuptools/version.py | 2 +- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 62bcd0a712..01fcb9d2f4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.2" +DEFAULT_VERSION = "1.1.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 73898c7291..6edb7741d4 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ [distutils.setup_keywords] -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -packages = setuptools.dist:check_packages -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -zip_safe = setuptools.dist:assert_bool use_2to3_exclude_fixers = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points +install_requires = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list use_2to3 = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +include_package_data = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp tests_require = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +convert_2to3_doctests = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list use_2to3_fixers = setuptools.dist:assert_string_list +[egg_info.writers] +requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [distutils.commands] -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +sdist = setuptools.command.sdist:sdist +rotate = setuptools.command.rotate:rotate +test = setuptools.command.test:test +alias = setuptools.command.alias:alias build_py = setuptools.command.build_py:build_py -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib build_ext = setuptools.command.build_ext:build_ext +install_lib = setuptools.command.install_lib:install_lib +saveopts = setuptools.command.saveopts:saveopts +easy_install = setuptools.command.easy_install:easy_install +register = setuptools.command.register:register bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate +install = setuptools.command.install:install +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +develop = setuptools.command.develop:develop +install_scripts = setuptools.command.install_scripts:install_scripts +egg_info = setuptools.command.egg_info:egg_info install_egg_info = setuptools.command.install_egg_info:install_egg_info setopt = setuptools.command.setopt:setopt -saveopts = setuptools.command.saveopts:saveopts -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -test = setuptools.command.test:test -register = setuptools.command.register:register -easy_install = setuptools.command.easy_install:easy_install -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist +upload_docs = setuptools.command.upload_docs:upload_docs bdist_egg = setuptools.command.bdist_egg:bdist_egg -egg_info = setuptools.command.egg_info:egg_info - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -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 -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -eager_resources.txt = setuptools.command.egg_info:overwrite_arg [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e7f0f3b867..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [ssl:sys_platform=='win32'] wincertstore==0.1 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 7b344eca4a..7bb021e2f3 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.2' +__version__ = '1.1.3' From 559c85e2d4093e5a3163b7fe01cbb2f0180c9141 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:39:47 -0400 Subject: [PATCH 1527/8469] Add the import, omitted from the previous commit. --- CHANGES.txt | 6 ++++++ setuptools/package_index.py | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cb300d47c8..633e8d5f10 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +1.1.3 +----- + +* Fix NameError in previous patch. + ----- 1.1.2 ----- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a6672c70ba..4c9e40a7b1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -22,6 +22,7 @@ from fnmatch import translate from setuptools.py24compat import hashlib from setuptools.py24compat import wraps +from setuptools.py26compat import strip_fragment from setuptools.py27compat import get_all_headers EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$') From ad24b4aa2be03dd3dcd509c13171aefafb5e3008 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:40:03 -0400 Subject: [PATCH 1528/8469] Added tag 1.1.3 for changeset ddf3561d6a54 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5f99eb5872..800a5e4089 100644 --- a/.hgtags +++ b/.hgtags @@ -96,3 +96,4 @@ c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 2e42e86546100c9f6845b04eb31b75c5add05f78 1.1.1 462fe5ccd8befeb2a235e8295d6d73eb3a49cc78 1.1.2 +ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 From 6e15af98b61f4e12c25719ee2535fac722616c68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Sep 2013 09:40:24 -0400 Subject: [PATCH 1529/8469] Bumped to 1.1.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 96 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 01fcb9d2f4..79713bd814 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.3" +DEFAULT_VERSION = "1.1.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 6edb7741d4..d6b5406049 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -dependency_links = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -include_package_data = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data -use_2to3_fixers = setuptools.dist:assert_string_list - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main [distutils.commands] -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -test = setuptools.command.test:test -alias = setuptools.command.alias:alias -build_py = setuptools.command.build_py:build_py -build_ext = setuptools.command.build_ext:build_ext -install_lib = setuptools.command.install_lib:install_lib -saveopts = setuptools.command.saveopts:saveopts -easy_install = setuptools.command.easy_install:easy_install register = setuptools.command.register:register -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install = setuptools.command.install:install -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext develop = setuptools.command.develop:develop install_scripts = setuptools.command.install_scripts:install_scripts -egg_info = setuptools.command.egg_info:egg_info +build_py = setuptools.command.build_py:build_py install_egg_info = setuptools.command.install_egg_info:install_egg_info +egg_info = setuptools.command.egg_info:egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +easy_install = setuptools.command.easy_install:easy_install +test = setuptools.command.test:test +install = setuptools.command.install:install setopt = setuptools.command.setopt:setopt upload_docs = setuptools.command.upload_docs:upload_docs bdist_egg = setuptools.command.bdist_egg:bdist_egg +rotate = setuptools.command.rotate:rotate +sdist = setuptools.command.sdist:sdist +saveopts = setuptools.command.saveopts:saveopts + +[distutils.setup_keywords] +test_suite = setuptools.dist:check_test_suite +packages = setuptools.dist:check_packages +use_2to3_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +extras_require = setuptools.dist:check_extras +zip_safe = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +use_2to3 = setuptools.dist:assert_bool +entry_points = setuptools.dist:check_entry_points +dependency_links = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +requires.txt = setuptools.command.egg_info:write_requirements +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..0b577c9748 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:sys_platform=='win32'] -wincertstore==0.1 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 7bb021e2f3..bc50bee689 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.3' +__version__ = '1.1.4' From 3117a6c743787dc2d409d4c34934d3bcc8f27206 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Sep 2013 17:10:09 -0400 Subject: [PATCH 1530/8469] Fix boolean test, incorrectly changed. Off-by-one errors are particularly ugly with booleans ;) Fixes #77 --- setuptools/command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 93da7a395a..575e121e4e 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -122,7 +122,7 @@ def upload_file(self, command, pyversion, filename): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if isinstance(value, list): + if not isinstance(value, list): value = [value] for value in value: if type(value) is tuple: From 8aa2f12d9167bb0dadde5049420d980d18d07d7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Sep 2013 17:18:08 -0400 Subject: [PATCH 1531/8469] Added tag 1.1.4 for changeset f94c7e4fa030 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 800a5e4089..be682de63c 100644 --- a/.hgtags +++ b/.hgtags @@ -97,3 +97,4 @@ d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 2e42e86546100c9f6845b04eb31b75c5add05f78 1.1.1 462fe5ccd8befeb2a235e8295d6d73eb3a49cc78 1.1.2 ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 +f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 From a0645ece948f89821606db290c511cc391804472 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Sep 2013 17:18:31 -0400 Subject: [PATCH 1532/8469] Bumped to 1.1.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 68 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 +++--- setuptools/version.py | 2 +- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 79713bd814..4118de3b69 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.4" +DEFAULT_VERSION = "1.1.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index d6b5406049..139acb1d49 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,48 +1,48 @@ -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - [distutils.commands] +rotate = setuptools.command.rotate:rotate +build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install register = setuptools.command.register:register -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -develop = setuptools.command.develop:develop +saveopts = setuptools.command.saveopts:saveopts install_scripts = setuptools.command.install_scripts:install_scripts -build_py = setuptools.command.build_py:build_py -install_egg_info = setuptools.command.install_egg_info:install_egg_info -egg_info = setuptools.command.egg_info:egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm alias = setuptools.command.alias:alias bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst easy_install = setuptools.command.easy_install:easy_install -test = setuptools.command.test:test -install = setuptools.command.install:install +egg_info = setuptools.command.egg_info:egg_info setopt = setuptools.command.setopt:setopt upload_docs = setuptools.command.upload_docs:upload_docs -bdist_egg = setuptools.command.bdist_egg:bdist_egg -rotate = setuptools.command.rotate:rotate -sdist = setuptools.command.sdist:sdist -saveopts = setuptools.command.saveopts:saveopts +install_lib = setuptools.command.install_lib:install_lib +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_egg_info = setuptools.command.install_egg_info:install_egg_info +test = setuptools.command.test:test +build_ext = setuptools.command.build_ext:build_ext +develop = setuptools.command.develop:develop + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main [distutils.setup_keywords] -test_suite = setuptools.dist:check_test_suite -packages = setuptools.dist:check_packages +entry_points = setuptools.dist:check_entry_points +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data use_2to3_fixers = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements +install_requires = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite test_loader = setuptools.dist:check_importable -extras_require = setuptools.dist:check_extras +use_2to3 = setuptools.dist:assert_bool +convert_2to3_doctests = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data +tests_require = setuptools.dist:check_requirements eager_resources = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data namespace_packages = setuptools.dist:check_nsp -use_2to3 = setuptools.dist:assert_bool -entry_points = setuptools.dist:check_entry_points +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras dependency_links = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl @@ -51,12 +51,12 @@ svn_cvs = setuptools.command.sdist:_default_revctrl eggsecutable = setuptools.command.easy_install:bootstrap [egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -requires.txt = setuptools.command.egg_info:write_requirements -depends.txt = setuptools.command.egg_info:warn_depends_obsolete namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.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 +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..256342f0e4 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index bc50bee689..99d2a6fad1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.4' +__version__ = '1.1.5' From 61aacdd173df9aaf20698769b1715bfcc6b5e416 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Sep 2013 15:19:34 -0400 Subject: [PATCH 1533/8469] Reorganize imports --- setuptools/command/sdist.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 39cd604396..a7ce7ac0aa 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,9 +1,12 @@ +import os +import re +import sys +from glob import glob + +import pkg_resources from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path from distutils import log -from glob import glob -import os, re, sys, pkg_resources -from glob import glob READMES = ('README', 'README.rst', 'README.txt') @@ -98,13 +101,13 @@ def entries_finder(dirname, filename): except: pass if svnver<8: log.warn("unrecognized .svn/entries format in %s", os.path.abspath(dirname)) - return + return for record in map(str.splitlines, data.split('\n\x0c\n')[1:]): # subversion 1.6/1.5/1.4 if not record or len(record)>=6 and record[5]=="delete": continue # skip deleted yield joinpath(dirname, record[0]) - + finders = [ (convert_path('CVS/Entries'), From 2b6a00de2632bd044a260c86aec9e29083b2adf1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Sep 2013 15:21:41 -0400 Subject: [PATCH 1534/8469] Remove excess whitespace. Delint one if statement. --- setuptools/command/sdist.py | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a7ce7ac0aa..6d63e819e7 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -37,14 +37,6 @@ def joinpath(prefix,suffix): return suffix return os.path.join(prefix,suffix) - - - - - - - - def walk_revctrl(dirname=''): """Find all files under revision control""" for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): @@ -118,16 +110,6 @@ def entries_finder(dirname, filename): ] - - - - - - - - - - class sdist(_sdist): """Smart sdist that finds anything supported by revision control""" @@ -182,11 +164,12 @@ def __read_template_hack(self): # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle # has been fixed, so only override the method if we're using an earlier # Python. - if ( - sys.version_info < (2,7,2) - or (3,0) <= sys.version_info < (3,1,4) - or (3,2) <= sys.version_info < (3,2,1) - ): + has_leaky_handle = ( + sys.version_info < (2,7,2) + or (3,0) <= sys.version_info < (3,1,4) + or (3,2) <= sys.version_info < (3,2,1) + ) + if has_leaky_handle: read_template = __read_template_hack def add_defaults(self): @@ -251,7 +234,6 @@ def check_readme(self): "standard file not found: should have one of " +', '.join(READMES) ) - def make_release_tree(self, base_dir, files): _sdist.make_release_tree(self, base_dir, files) @@ -298,10 +280,3 @@ def read_manifest(self): continue self.filelist.append(line) manifest.close() - - - - - - -# From 60f74823070a2c4154d20ac8a87fd15cca6bb9a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Sep 2013 09:44:06 -0400 Subject: [PATCH 1535/8469] Correct boolean logic in fix for #69 --- setuptools/py26compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 6fc0088312..738b0cc40b 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -15,5 +15,5 @@ def strip_fragment(url): url, fragment = splittag(url) return url -if sys.version_info < (2,7): +if sys.version_info >= (2,7): strip_fragment = lambda x: x From a0c75a6cbda55a2b1ae1ab650491eacb3eb4a385 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Sep 2013 09:45:03 -0400 Subject: [PATCH 1536/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 634edd4e1c..de8285a2e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +1.1.5 +----- + +* Issue #69: Second attempt at fix (logic was reversed). + ----- 1.1.4 ----- From f9dc7c3a2b1360c0c0d85c3a2fc88701175e8d04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Sep 2013 09:59:38 -0400 Subject: [PATCH 1537/8469] Added tag 1.1.5 for changeset d9bb58331007 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index be682de63c..50bb2d5000 100644 --- a/.hgtags +++ b/.hgtags @@ -98,3 +98,4 @@ d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 462fe5ccd8befeb2a235e8295d6d73eb3a49cc78 1.1.2 ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 +d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 From 2b3d8ead29f777fe3e1c6d26c7d110cbc554c721 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Sep 2013 09:59:59 -0400 Subject: [PATCH 1538/8469] Bumped to 1.1.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 76 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4118de3b69..b02f3f17b0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.5" +DEFAULT_VERSION = "1.1.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 139acb1d49..4acc9af406 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [distutils.commands] +alias = setuptools.command.alias:alias +build_ext = setuptools.command.build_ext:build_ext +test = setuptools.command.test:test rotate = setuptools.command.rotate:rotate -build_py = setuptools.command.build_py:build_py -sdist = setuptools.command.sdist:sdist -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -register = setuptools.command.register:register -saveopts = setuptools.command.saveopts:saveopts install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias +saveopts = setuptools.command.saveopts:saveopts bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -easy_install = setuptools.command.easy_install:easy_install +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_egg_info = setuptools.command.install_egg_info:install_egg_info egg_info = setuptools.command.egg_info:egg_info -setopt = setuptools.command.setopt:setopt -upload_docs = setuptools.command.upload_docs:upload_docs -install_lib = setuptools.command.install_lib:install_lib bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_egg_info = setuptools.command.install_egg_info:install_egg_info -test = setuptools.command.test:test -build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +easy_install = setuptools.command.easy_install:easy_install +install = setuptools.command.install:install +register = setuptools.command.register:register develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib +build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt +sdist = setuptools.command.sdist:sdist -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras +namespace_packages = setuptools.dist:check_nsp +use_2to3 = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool entry_points = setuptools.dist:check_entry_points use_2to3_exclude_fixers = setuptools.dist:assert_string_list package_data = setuptools.dist:check_package_data -use_2to3_fixers = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements -test_suite = setuptools.dist:check_test_suite test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -include_package_data = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras dependency_links = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements packages = setuptools.dist:check_packages - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +convert_2to3_doctests = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite [egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg 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 -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info entry_points.txt = setuptools.command.egg_info:write_entries +top_level.txt = setuptools.command.egg_info:write_toplevel_names eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +depends.txt = setuptools.command.egg_info:warn_depends_obsolete diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 256342f0e4..e8e2105dd0 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,5 +1,8 @@ +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + [ssl:sys_platform=='win32'] wincertstore==0.1 @@ -7,7 +10,4 @@ wincertstore==0.1 certifi==0.0.8 [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 99d2a6fad1..6ebd335c55 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.5' +__version__ = '1.1.6' From 115bb41b011e5dd064fdc5a74aa7d5f71cdbe37d Mon Sep 17 00:00:00 2001 From: "Suresh V." Date: Tue, 17 Sep 2013 12:32:02 +0530 Subject: [PATCH 1539/8469] Don't leave junk file behind --- ez_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index b02f3f17b0..03458b701d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -200,7 +200,11 @@ def has_curl(): def download_file_wget(url, target): cmd = ['wget', url, '--quiet', '--output-document', target] - subprocess.check_call(cmd) + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: + os.unlink(target) + raise def has_wget(): cmd = ['wget', '--version'] From 9e4208becb775a69014c2e02b6a10f899efde1e7 Mon Sep 17 00:00:00 2001 From: Suresh V Date: Tue, 17 Sep 2013 23:14:42 +0530 Subject: [PATCH 1540/8469] implement for all downloaders and check file existence before removing --- ez_setup.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 03458b701d..945f55d90b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -162,7 +162,12 @@ def download_file_powershell(url, target): '-Command', "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), ] - subprocess.check_call(cmd) + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: + if os.access(target, os.F_OK): + os.unlink(target) + raise def has_powershell(): if platform.system() != 'Windows': @@ -182,7 +187,12 @@ def has_powershell(): def download_file_curl(url, target): cmd = ['curl', url, '--silent', '--output', target] - subprocess.check_call(cmd) + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: + if os.access(target, os.F_OK): + os.unlink(target) + raise def has_curl(): cmd = ['curl', '--version'] @@ -203,7 +213,8 @@ def download_file_wget(url, target): try: subprocess.check_call(cmd) except subprocess.CalledProcessError: - os.unlink(target) + if os.access(target, os.F_OK): + os.unlink(target) raise def has_wget(): From a7cac0e348ab9be0d56a390e87ea2ab74c69a12a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Sep 2013 10:01:46 -0400 Subject: [PATCH 1541/8469] Adding test capturing Distribute #349 --HG-- extra : amend_source : 2f401317ae94e6291ae91f8da75173781bc4c48c --- setuptools/tests/script-with-bom.py | 3 +++ setuptools/tests/test_sandbox.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 setuptools/tests/script-with-bom.py diff --git a/setuptools/tests/script-with-bom.py b/setuptools/tests/script-with-bom.py new file mode 100644 index 0000000000..22dee0d2a3 --- /dev/null +++ b/setuptools/tests/script-with-bom.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +result = 'passed' diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 1609ee861b..3dad137683 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -5,7 +5,10 @@ import shutil import unittest import tempfile +import types +import pkg_resources +import setuptools.sandbox from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): @@ -62,5 +65,15 @@ def test_win32com(self): finally: if os.path.exists(target): os.remove(target) + def test_setup_py_with_BOM(self): + """ + It should be possible to execute a setup.py with a Byte Order Mark + """ + target = pkg_resources.resource_filename(__name__, + 'script-with-bom.py') + namespace = types.ModuleType('namespace') + setuptools.sandbox.execfile(target, vars(namespace)) + assert namespace.result == 'passed' + if __name__ == '__main__': unittest.main() From 052e7b4453d950d11025107e9c98fa0be744d72f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Sep 2013 10:10:08 -0400 Subject: [PATCH 1542/8469] execfile now opens target in binary mode for better compatibility. Fixes Distribute #349. --- CHANGES.txt | 7 +++++++ setuptools/compat.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index de8285a2e0..1b91a2c269 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +1.1.6 +----- + +* Distribute #349: ``sandbox.execfile`` now opens the target file in binary + mode, thus honoring a BOM in the file when compiled. + ----- 1.1.5 ----- diff --git a/setuptools/compat.py b/setuptools/compat.py index 860c39f347..529a5fbc4d 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -84,7 +84,7 @@ def execfile(fn, globs=None, locs=None): globs = globals() if locs is None: locs = globs - f = open(fn) + f = open(fn, 'rb') try: source = f.read() finally: From 376c4fad8ed418c0371ffdcdcc2bc5066a525421 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Sep 2013 10:20:12 -0400 Subject: [PATCH 1543/8469] Added tag 1.1.6 for changeset 5e426bdeb46b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 50bb2d5000..bd3b7d3608 100644 --- a/.hgtags +++ b/.hgtags @@ -99,3 +99,4 @@ d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 +5e426bdeb46b87e299422adc419f4163b6c78d13 1.1.6 From 0d7e10fd181ad260256be32cb86125211cf46be9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Sep 2013 10:20:36 -0400 Subject: [PATCH 1544/8469] Bumped to 1.1.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 100 +++++++++++++-------------- setuptools.egg-info/requires.txt | 10 +-- setuptools/version.py | 2 +- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b02f3f17b0..9f2bd46103 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.6" +DEFAULT_VERSION = "1.1.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 4acc9af406..4a09dd1c26 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[distutils.commands] -alias = setuptools.command.alias:alias -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -rotate = setuptools.command.rotate:rotate -install_scripts = setuptools.command.install_scripts:install_scripts -saveopts = setuptools.command.saveopts:saveopts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_egg_info = setuptools.command.install_egg_info:install_egg_info -egg_info = setuptools.command.egg_info:egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -upload_docs = setuptools.command.upload_docs:upload_docs -easy_install = setuptools.command.easy_install:easy_install -install = setuptools.command.install:install -register = setuptools.command.register:register -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib -build_py = setuptools.command.build_py:build_py -setopt = setuptools.command.setopt:setopt -sdist = setuptools.command.sdist:sdist - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [distutils.setup_keywords] +packages = setuptools.dist:check_packages +install_requires = setuptools.dist:check_requirements eager_resources = setuptools.dist:assert_string_list include_package_data = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -namespace_packages = setuptools.dist:check_nsp -use_2to3 = setuptools.dist:assert_bool -zip_safe = setuptools.dist:assert_bool -entry_points = setuptools.dist:check_entry_points -use_2to3_exclude_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +tests_require = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements test_loader = setuptools.dist:check_importable +extras_require = setuptools.dist:check_extras +use_2to3_fixers = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool dependency_links = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite +entry_points = setuptools.dist:check_entry_points + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete top_level.txt = setuptools.command.egg_info:write_toplevel_names -eager_resources.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg + +[distutils.commands] +rotate = setuptools.command.rotate:rotate +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_scripts = setuptools.command.install_scripts:install_scripts +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_py = setuptools.command.build_py:build_py +build_ext = setuptools.command.build_ext:build_ext +install = setuptools.command.install:install +sdist = setuptools.command.sdist:sdist +upload_docs = setuptools.command.upload_docs:upload_docs +saveopts = setuptools.command.saveopts:saveopts +develop = setuptools.command.develop:develop +alias = setuptools.command.alias:alias +register = setuptools.command.register:register +setopt = setuptools.command.setopt:setopt +egg_info = setuptools.command.egg_info:egg_info +test = setuptools.command.test:test +easy_install = setuptools.command.easy_install:easy_install +install_lib = setuptools.command.install_lib:install_lib +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e8e2105dd0..0b577c9748 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [ssl:python_version in '2.4, 2.5'] ssl==1.16 -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 6ebd335c55..9910ac22e5 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.6' +__version__ = '1.1.7' From 621f405d07fc9f3509a186c7650c6752b0436e01 Mon Sep 17 00:00:00 2001 From: Niklas Rigemo Date: Thu, 19 Sep 2013 12:48:10 +0200 Subject: [PATCH 1545/8469] PEP8: Corrected multiple statements on one line (semicolon) --HG-- branch : patch1 --- setuptools/script template (dev).py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/script template (dev).py b/setuptools/script template (dev).py index 901790e7bd..1069cb0e52 100644 --- a/setuptools/script template (dev).py +++ b/setuptools/script template (dev).py @@ -1,6 +1,7 @@ # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r __requires__ = """%(spec)r""" -from pkg_resources import require; require("""%(spec)r""") +from pkg_resources import require +require("""%(spec)r""") del require __file__ = """%(dev_path)r""" try: From 1ed46282652e83edc8b88f64a279aacee182553d Mon Sep 17 00:00:00 2001 From: Niklas Rigemo Date: Thu, 19 Sep 2013 12:55:55 +0200 Subject: [PATCH 1546/8469] Bug Correction: Avoid double execution when the application throws NameError exception. --HG-- branch : patch1 --- setuptools/script template (dev).py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/script template (dev).py b/setuptools/script template (dev).py index 1069cb0e52..b3fe209ecb 100644 --- a/setuptools/script template (dev).py +++ b/setuptools/script template (dev).py @@ -1,10 +1,11 @@ # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r __requires__ = """%(spec)r""" +import sys from pkg_resources import require require("""%(spec)r""") del require __file__ = """%(dev_path)r""" -try: +if sys.version_info < (3, 0): execfile(__file__) -except NameError: +else: exec(compile(open(__file__).read(), __file__, 'exec')) From ce3c43cbd5e2c08ec63e6765fca8c590dd4df2b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Sep 2013 21:29:03 -0400 Subject: [PATCH 1547/8469] extract _clean_check call --- ez_setup.py | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 16b8016dcd..c3069e7a71 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -151,6 +151,18 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, return _do_download(version, download_base, to_dir, download_delay) +def _clean_check(cmd, target): + """ + Run the command to download target. If the command fails, clean up before + re-raising the error. + """ + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError: + if os.access(target, os.F_OK): + os.unlink(target) + raise + def download_file_powershell(url, target): """ Download the file at url to target using Powershell (which will validate @@ -162,12 +174,7 @@ def download_file_powershell(url, target): '-Command', "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), ] - try: - subprocess.check_call(cmd) - except subprocess.CalledProcessError: - if os.access(target, os.F_OK): - os.unlink(target) - raise + _clean_check(cmd, target) def has_powershell(): if platform.system() != 'Windows': @@ -187,12 +194,7 @@ def has_powershell(): def download_file_curl(url, target): cmd = ['curl', url, '--silent', '--output', target] - try: - subprocess.check_call(cmd) - except subprocess.CalledProcessError: - if os.access(target, os.F_OK): - os.unlink(target) - raise + _clean_check(cmd, target) def has_curl(): cmd = ['curl', '--version'] @@ -210,12 +212,7 @@ def has_curl(): def download_file_wget(url, target): cmd = ['wget', url, '--quiet', '--output-document', target] - try: - subprocess.check_call(cmd) - except subprocess.CalledProcessError: - if os.access(target, os.F_OK): - os.unlink(target) - raise + _clean_check(cmd, target) def has_wget(): cmd = ['wget', '--version'] From 49ce80613b7fcffd1882f7fb082e5bcc30e976f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Sep 2013 21:51:13 -0400 Subject: [PATCH 1548/8469] Update changelog --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1b91a2c269..f97dca3c18 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +----- +1.1.7 +----- + +* Fixed behavior of NameError handling in 'script template (dev).py' (script + launcher for 'develop' installs). +* ``ez_setup.py`` now ensures partial downloads are cleaned up following + a failed download. + ----- 1.1.6 ----- From 30bb58f069cf1624f35cfbdb725e8e443ff64330 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 28 Sep 2013 12:14:12 -0500 Subject: [PATCH 1549/8469] Added a legacy fallback test Added in code to after a deprecation warning parse the .svn files Should also parse externals. --HG-- extra : rebase_source : 9dd3bcf22cb56eb0826051f9e477f155e47cdbf6 --- setuptools.egg-info/entry_points.txt | 124 +++++++------- setuptools.egg-info/requires.txt | 8 +- setuptools/svn_utils.py | 240 +++++++++++++++++++++++++-- setuptools/tests/test_egg_info.py | 21 +++ 4 files changed, 310 insertions(+), 83 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index d64b3c288e..478fac7dc1 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -use_2to3 = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -exclude_package_data = setuptools.dist:check_package_data -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages -entry_points = setuptools.dist:check_entry_points -zip_safe = setuptools.dist:assert_bool -tests_require = setuptools.dist:check_requirements -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[egg_info.writers] -top_level.txt = setuptools.command.egg_info:write_toplevel_names -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -requires.txt = setuptools.command.egg_info:write_requirements - -[distutils.commands] -test = setuptools.command.test:test -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -alias = setuptools.command.alias:alias -sdist = setuptools.command.sdist:sdist -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg -setopt = setuptools.command.setopt:setopt -egg_info = setuptools.command.egg_info:egg_info -build_ext = setuptools.command.build_ext:build_ext -upload_docs = setuptools.command.upload_docs:upload_docs -easy_install = setuptools.command.easy_install:easy_install -install = setuptools.command.install:install -install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_lib = setuptools.command.install_lib:install_lib -rotate = setuptools.command.rotate:rotate -saveopts = setuptools.command.saveopts:saveopts -install_scripts = setuptools.command.install_scripts:install_scripts -build_py = setuptools.command.build_py:build_py -register = setuptools.command.register:register - +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +exclude_package_data = setuptools.dist:check_package_data +extras_require = setuptools.dist:check_extras +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages +entry_points = setuptools.dist:check_entry_points +zip_safe = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +convert_2to3_doctests = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[egg_info.writers] +top_level.txt = setuptools.command.egg_info:write_toplevel_names +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements + +[distutils.commands] +test = setuptools.command.test:test +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +setopt = setuptools.command.setopt:setopt +egg_info = setuptools.command.egg_info:egg_info +build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +easy_install = setuptools.command.easy_install:easy_install +install = setuptools.command.install:install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_lib = setuptools.command.install_lib:install_lib +rotate = setuptools.command.rotate:rotate +saveopts = setuptools.command.saveopts:saveopts +install_scripts = setuptools.command.install_scripts:install_scripts +build_py = setuptools.command.build_py:build_py +register = setuptools.command.register:register + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 91d84d9ca8..221040f812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 @@ -9,5 +9,5 @@ ctypes==1.0.2 [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 17b211d7c1..22b45cd7ea 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -6,7 +6,9 @@ import shlex import locale import unicodedata +import warnings from setuptools.compat import unicode, bytes +from xml.sax.saxutils import unescape try: import urlparse @@ -23,6 +25,8 @@ # http://bugs.python.org/issue8557 # http://stackoverflow.com/questions/5658622/ # python-subprocess-popen-environment-path + + def _run_command(args, stdout=_PIPE, stderr=_PIPE): #regarding the shell argument, see: http://bugs.python.org/issue8557 try: @@ -63,10 +67,10 @@ def _get_xml_data(decoded_str): return data -def joinpath(prefix, suffix): +def joinpath(prefix, *suffix): if not prefix or prefix == '.': - return suffix - return os.path.join(prefix, suffix) + return os.path.join(*suffix) + return os.path.join(prefix, *suffix) def fsencode(path): @@ -87,6 +91,7 @@ def fsencode(path): return path + def fsdecode(path): "Path must be unicode or in file system encoding already" encoding = sys.getfilesystemencoding() @@ -98,6 +103,7 @@ def fsdecode(path): return unicodedata.normalize('NFC', path) + def consoledecode(text): encoding = locale.getpreferredencoding() return text.decode(encoding) @@ -130,9 +136,7 @@ def parse_externals_xml(decoded_str, prefix=''): if event == 'START_ELEMENT' and node.nodeName == 'target': doc.expandNode(node) path = os.path.normpath(node.getAttribute('path')) - log.warn('') - log.warn('PRE: %s' % prefix) - log.warn('PTH: %s' % path) + if os.path.normcase(path).startswith(prefix): path = path[len(prefix)+1:] @@ -154,7 +158,7 @@ def parse_external_prop(lines): """ externals = [] for line in lines.splitlines(): - line = line.lstrip() #there might be a "\ " + line = line.lstrip() # there might be a "\ " if not line: continue @@ -178,6 +182,26 @@ def parse_external_prop(lines): return externals +def parse_prop_file(filename, key): + found = False + f = open(filename, 'rt') + data = '' + try: + for line in iter(f.readline, ''): # can't use direct iter! + parts = line.split() + if len(parts) == 2: + kind, length = parts + data = f.read(int(length)) + if kind == 'K' and data == key: + found = True + elif kind == 'V' and found: + break + finally: + f.close() + + return data + + class SvnInfo(object): ''' Generic svn_info object. No has little knowledge of how to extract @@ -203,14 +227,24 @@ def get_svn_version(): @classmethod def load(cls, dirname=''): - code, data = _run_command(['svn', 'info', os.path.normpath(dirname)]) + normdir = os.path.normpath(dirname) + code, data = _run_command(['svn', 'info', normdir]) + has_svn = os.path.isdir(os.path.join(normdir, '.svn')) svn_version = tuple(cls.get_svn_version().split('.')) - base_svn_version = tuple(int(x) for x in svn_version[:2]) - if code and base_svn_version: - #Not an SVN repository or compatible one - return SvnInfo(dirname) - elif base_svn_version < (1, 3): - log.warn('Insufficent version of SVN found') + + try: + base_svn_version = tuple(int(x) for x in svn_version[:2]) + except ValueError: + base_svn_version = tuple() + + if has_svn and (code or not base_svn_version + or base_svn_version < (1, 3)): + log.warn('Fallback onto .svn parsing') + warnings.warn(("No SVN 1.3+ command found: falling back " + "on pre 1.7 .svn parsing"), DeprecationWarning) + return SvnFileInfo(dirname) + elif not has_svn: + log.warn('Not SVN Repository') return SvnInfo(dirname) elif base_svn_version < (1, 5): return Svn13Info(dirname) @@ -259,7 +293,7 @@ def iter_files(self): Iterate over the non-deleted file entries in the repository path ''' for item, kind in self.entries: - if kind.lower()=='file': + if kind.lower() == 'file': yield item def iter_dirs(self, include_root=True): @@ -269,7 +303,7 @@ def iter_dirs(self, include_root=True): if include_root: yield self.path for item, kind in self.entries: - if kind.lower()=='dir': + if kind.lower() == 'dir': yield item def get_entries(self): @@ -278,6 +312,7 @@ def get_entries(self): def get_externals(self): return [] + class Svn13Info(SvnInfo): def get_entries(self): code, data = _run_command(['svn', 'info', '-R', '--xml', self.path]) @@ -316,6 +351,73 @@ def get_externals(self): return parse_externals_xml(lines, prefix=os.path.abspath(self.path)) +class SvnFileInfo(SvnInfo): + + def __init__(self, path=''): + super(SvnFileInfo, self).__init__(path) + self._directories = None + self._revision = None + + def _walk_svn(self, base): + entry_file = joinpath(base, '.svn', 'entries') + if os.path.isfile(entry_file): + entries = SVNEntriesFile.load(base) + yield (base, False, entries.parse_revision()) + for path in entries.get_undeleted_records(): + path = joinpath(base, path) + if os.path.isfile(path): + yield (path, True, None) + elif os.path.isdir(path): + for item in self._walk_svn(path): + yield item + + def _build_entries(self): + dirs = list() + files = list() + rev = 0 + for path, isfile, dir_rev in self._walk_svn(self.path): + if isfile: + files.append(path) + else: + dirs.append(path) + rev = max(rev, dir_rev) + + self._directories = dirs + self._entries = files + self._revision = rev + + def get_entries(self): + if self._entries is None: + self._build_entries() + return self._entries + + def get_revision(self): + if self._revision is None: + self._build_entries() + return self._revision + + def get_externals(self): + if self._directories is None: + self._build_entries() + + prop_files = [['.svn', 'dir-prop-base'], + ['.svn', 'dir-props']] + externals = [] + + for dirname in self._directories: + prop_file = None + for rel_parts in prop_files: + filename = joinpath(dirname, *rel_parts) + if os.path.isfile(filename): + prop_file = filename + + if prop_file is not None: + ext_prop = parse_prop_file(prop_file, 'svn:externals') + externals.extend(parse_external_prop(ext_prop)) + + return externals + + def svn_finder(dirname=''): #combined externals due to common interface #combined externals and entries due to lack of dir_props in 1.7 @@ -328,6 +430,110 @@ def svn_finder(dirname=''): for sub_path in sub_info.iter_files(): yield fsencode(sub_path) + +class SVNEntriesFile(object): + def __init__(self, data): + self.data = data + + @classmethod + def load(class_, base): + filename = os.path.join(base, '.svn', 'entries') + f = open(filename) + try: + result = SVNEntriesFile.read(f) + finally: + f.close() + return result + + @classmethod + def read(class_, fileobj): + data = fileobj.read() + is_xml = data.startswith(' revision_line_number + and section[revision_line_number]) + ] + return rev_numbers + + def get_undeleted_records(self): + undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete') + result = [ + section[0] + for section in self.get_sections() + if undeleted(section) + ] + return result + + +class SVNEntriesFileXML(SVNEntriesFile): + def is_valid(self): + return True + + def get_url(self): + "Get repository URL" + urlre = re.compile('url="([^"]+)"') + return urlre.search(self.data).group(1) + + def parse_revision_numbers(self): + revre = re.compile(r'committed-rev="(\d+)"') + return [ + int(m.group(1)) + for m in revre.finditer(self.data) + ] + + def get_undeleted_records(self): + entries_pattern = \ + re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I) + results = [ + unescape(match.group(1)) + for match in entries_pattern.finditer(self.data) + ] + return results + + if __name__ == '__main__': for name in svn_finder(sys.argv[1]): - print(name) \ No newline at end of file + print(name) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 95667b696a..7abafd7165 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -48,6 +48,27 @@ def test_version_10_format(self): rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '89000') + def test_version_10_format_legacy_parser(self): + """ + """ + path_variable = None + for env in os.environ: + if env.lower() == 'path': + path_variable = env + + if path_variable is None: + self.skipTest('Cannot figure out how to modify path') + + old_path = os.environ[path_variable] + os.environ[path_variable] = '' + try: + self._write_entries(ENTRIES_V10) + rev = egg_info.egg_info.get_svn_revision() + finally: + os.environ[path_variable] = old_path + + self.assertEqual(rev, '89000') + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 69cd661c7786c927a48c0a48f1438b6f13b3f1d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2013 21:44:40 -0400 Subject: [PATCH 1550/8469] Added tag 1.1.7 for changeset cc9b19cd0ec6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bd3b7d3608..db97710cd4 100644 --- a/.hgtags +++ b/.hgtags @@ -100,3 +100,4 @@ ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 5e426bdeb46b87e299422adc419f4163b6c78d13 1.1.6 +cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 From 1e0a9fb4a7f76e45970d11955caf5a1e5eb1db47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2013 21:45:02 -0400 Subject: [PATCH 1551/8469] Bumped to 1.1.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 86 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/version.py | 2 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c3069e7a71..a46b9005ab 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.7" +DEFAULT_VERSION = "1.1.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 4a09dd1c26..a5f253cec7 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -packages = setuptools.dist:check_packages -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -test_loader = setuptools.dist:check_importable -extras_require = setuptools.dist:check_extras -use_2to3_fixers = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points - [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg depends.txt = setuptools.command.egg_info:warn_depends_obsolete top_level.txt = setuptools.command.egg_info:write_toplevel_names -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 PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [distutils.commands] +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst rotate = setuptools.command.rotate:rotate -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_scripts = setuptools.command.install_scripts:install_scripts -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_py = setuptools.command.build_py:build_py build_ext = setuptools.command.build_ext:build_ext -install = setuptools.command.install:install -sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs -saveopts = setuptools.command.saveopts:saveopts +install_lib = setuptools.command.install_lib:install_lib develop = setuptools.command.develop:develop +saveopts = setuptools.command.saveopts:saveopts +build_py = setuptools.command.build_py:build_py +upload_docs = setuptools.command.upload_docs:upload_docs +egg_info = setuptools.command.egg_info:egg_info +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +sdist = setuptools.command.sdist:sdist alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install register = setuptools.command.register:register -setopt = setuptools.command.setopt:setopt -egg_info = setuptools.command.egg_info:egg_info test = setuptools.command.test:test -easy_install = setuptools.command.easy_install:easy_install -install_lib = setuptools.command.install_lib:install_lib -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts +setopt = setuptools.command.setopt:setopt -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +[distutils.setup_keywords] +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +zip_safe = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp +convert_2to3_doctests = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +use_2to3_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +packages = setuptools.dist:check_packages +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +tests_require = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..7a47af1df0 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [certs] certifi==0.0.8 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 + [ssl:sys_platform=='win32'] wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 9910ac22e5..f0be1393db 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.7' +__version__ = '1.1.8' From 78a4d637f1db446d06f68929d76e76acd7121628 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 28 Oct 2013 10:54:34 -0700 Subject: [PATCH 1552/8469] Import socket.error so the code throws the correct exception --- setuptools/ssl_support.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 2aec655a09..479b0d2fa2 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -44,6 +44,7 @@ try: from socket import create_connection except ImportError: + from socket import error _GLOBAL_DEFAULT_TIMEOUT = getattr(socket, '_GLOBAL_DEFAULT_TIMEOUT', object()) def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None): From 38fcb3e366ee7a21ff5f0f550fe190b1326fc04b Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 28 Oct 2013 10:35:37 -0700 Subject: [PATCH 1553/8469] Update ssl_match_hostname to match new stdlib code that fixes a security issue with IDNA domains. --- setuptools/ssl_support.py | 76 +++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 90359b2c51..4941d94e75 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -88,30 +88,62 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, class CertificateError(ValueError): pass - def _dnsname_to_pat(dn, max_wildcards=1): + def _dnsname_match(dn, hostname, max_wildcards=1): + """Matching according to RFC 6125, section 6.4.3 + + http://tools.ietf.org/html/rfc6125#section-6.4.3 + """ pats = [] - for frag in dn.split(r'.'): - if frag.count('*') > max_wildcards: - # Issue #17980: avoid denials of service by refusing more - # than one wildcard per fragment. A survery of established - # policy among SSL implementations showed it to be a - # reasonable choice. - raise CertificateError( - "too many wildcards in certificate DNS name: " + repr(dn)) - if frag == '*': - # When '*' is a fragment by itself, it matches a non-empty dotless - # fragment. - pats.append('[^.]+') - else: - # Otherwise, '*' matches any dotless fragment. - frag = re.escape(frag) - pats.append(frag.replace(r'\*', '[^.]*')) - return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) + if not dn: + return False + + # Ported from python3-syntax: + # leftmost, *remainder = dn.split(r'.') + parts = dn.split(r'.') + leftmost = parts[0] + remainder = parts[1:] + + wildcards = leftmost.count('*') + if wildcards > max_wildcards: + # Issue #17980: avoid denials of service by refusing more + # than one wildcard per fragment. A survey of established + # policy among SSL implementations showed it to be a + # reasonable choice. + raise CertificateError( + "too many wildcards in certificate DNS name: " + repr(dn)) + + # speed up common case w/o wildcards + if not wildcards: + return dn.lower() == hostname.lower() + + # RFC 6125, section 6.4.3, subitem 1. + # The client SHOULD NOT attempt to match a presented identifier in which + # the wildcard character comprises a label other than the left-most label. + if leftmost == '*': + # When '*' is a fragment by itself, it matches a non-empty dotless + # fragment. + pats.append('[^.]+') + elif leftmost.startswith('xn--') or hostname.startswith('xn--'): + # RFC 6125, section 6.4.3, subitem 3. + # The client SHOULD NOT attempt to match a presented identifier + # where the wildcard character is embedded within an A-label or + # U-label of an internationalized domain name. + pats.append(re.escape(leftmost)) + else: + # Otherwise, '*' matches any dotless string, e.g. www* + pats.append(re.escape(leftmost).replace(r'\*', '[^.]*')) + + # add the remaining fragments, ignore any wildcards + for frag in remainder: + pats.append(re.escape(frag)) + + pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) + return pat.match(hostname) def match_hostname(cert, hostname): """Verify that *cert* (in decoded format as returned by - SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 rules - are mostly followed, but IP addresses are not accepted for *hostname*. + SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125 + rules are followed, but IP addresses are not accepted for *hostname*. CertificateError is raised on failure. On success, the function returns nothing. @@ -122,7 +154,7 @@ def match_hostname(cert, hostname): san = cert.get('subjectAltName', ()) for key, value in san: if key == 'DNS': - if _dnsname_to_pat(value).match(hostname): + if _dnsname_match(value, hostname): return dnsnames.append(value) if not dnsnames: @@ -133,7 +165,7 @@ def match_hostname(cert, hostname): # XXX according to RFC 2818, the most specific Common Name # must be used. if key == 'commonName': - if _dnsname_to_pat(value).match(hostname): + if _dnsname_match(value, hostname): return dnsnames.append(value) if len(dnsnames) > 1: From ad6bce6ab02836ea6d90e69e5c6f3b851532874a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 28 Oct 2013 10:43:08 -0700 Subject: [PATCH 1554/8469] Look for the backports-ssl_match_hostname module from pypi before using our bundled/backported code --- setuptools/ssl_support.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 4941d94e75..e1cf8040ce 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -85,9 +85,18 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, try: from ssl import CertificateError, match_hostname except ImportError: + try: + from backports.ssl_match_hostname import CertificateError + from backports.ssl_match_hostname import match_hostname + except ImportError: + CertificateError = None + match_hostname = None + +if not CertificateError: class CertificateError(ValueError): pass +if not match_hostname: def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 From 035751b53a195645de0e51ba6b4a78f5774bed61 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Oct 2013 14:11:15 -0400 Subject: [PATCH 1555/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b97c10046a..b4e7846e58 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +1.2 +--- + +* Issue #26: Add support for SVN 1.7. Special thanks to Philip Thiem for the + contribution. + ----- 1.1.7 ----- From 55b1ecfe8fea02b83fcb055f71c9b4bc32800d14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Oct 2013 14:13:35 -0400 Subject: [PATCH 1556/8469] Bump to 1.2 in preparation for feature release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index f0be1393db..64477cf292 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1.8' +__version__ = '1.2' From f960a71cc4e03238bb20f92a32be96f058c95fc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Oct 2013 14:15:53 -0400 Subject: [PATCH 1557/8469] Added tag 1.2b1 for changeset 4c7dc4ae2440 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index db97710cd4..2e646d8fb0 100644 --- a/.hgtags +++ b/.hgtags @@ -101,3 +101,4 @@ f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 5e426bdeb46b87e299422adc419f4163b6c78d13 1.1.6 cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 +4c7dc4ae2440ae3e9ba26b4a12ffca3407e7030d 1.2b1 From 93bc29b8990b7976506be6aabc3bb50f3744909b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Oct 2013 14:40:50 -0400 Subject: [PATCH 1558/8469] Also bump version in ez_setup.py --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index a46b9005ab..5dd5ab9abe 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1.8" +DEFAULT_VERSION = "1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): From 45928d50cd992a38a0df25813bd13617c13c1462 Mon Sep 17 00:00:00 2001 From: Jonathan Dye Date: Thu, 31 Oct 2013 03:35:56 -0600 Subject: [PATCH 1559/8469] fixes a bug where a Basic auth digest header can get encoded with newlines inside --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4c9e40a7b1..94873620b8 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -918,7 +918,7 @@ def _encode_auth(auth): # convert back to a string encoded = encoded_bytes.decode() # strip the trailing carriage return - return encoded.rstrip() + return encoded.replace('\n','') def open_with_auth(url, opener=urllib2.urlopen): """Open a urllib2 request, handling HTTP authentication""" From af2c7f274540acf6a6d61c8b82383725a3c00056 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 14:10:30 -0400 Subject: [PATCH 1560/8469] Include wheels in standard release. Fixes #93. --HG-- extra : amend_source : 142fda8f9cdb6612326d2aed5712f8fe86aec8ac --- release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.py b/release.py index 15f71a2d69..f4dff0d29d 100644 --- a/release.py +++ b/release.py @@ -25,6 +25,8 @@ def after_push(): 'ez_setup.py', 'setuptools/version.py', ) +dist_commands = 'sdist', 'bdist_wheel' + test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" From af3fd3f34f11fc0019a7be355c54ddc2136c4539 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 14:27:11 -0400 Subject: [PATCH 1561/8469] Update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b4e7846e58..7934de0f51 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ CHANGES * Issue #26: Add support for SVN 1.7. Special thanks to Philip Thiem for the contribution. +* Issue #94: Wheels are now distributed with every release. +* Setuptools "natural" launcher support, introduced in 1.0, is now officially + supported. ----- 1.1.7 From ba69a7d1b51dab692c6efc58b1cc7350061bdbf0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 14:30:54 -0400 Subject: [PATCH 1562/8469] Added tag 1.2 for changeset 77921bbe3931 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2e646d8fb0..ee4f63a283 100644 --- a/.hgtags +++ b/.hgtags @@ -102,3 +102,4 @@ d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 5e426bdeb46b87e299422adc419f4163b6c78d13 1.1.6 cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 4c7dc4ae2440ae3e9ba26b4a12ffca3407e7030d 1.2b1 +77921bbe3931caf40474dc36e55d3d541981c749 1.2 From 2644c5e54c7d5dae012a09f7d73d473d31aa2857 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 14:31:25 -0400 Subject: [PATCH 1563/8469] Bumped to 1.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/version.py | 2 +- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5dd5ab9abe..64eaca559e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.2" +DEFAULT_VERSION = "1.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index a5f253cec7..718c478726 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[distutils.setup_keywords] +tests_require = setuptools.dist:check_requirements +include_package_data = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +use_2to3_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool +convert_2to3_doctests = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points + [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg depends.txt = setuptools.command.egg_info:warn_depends_obsolete top_level.txt = setuptools.command.egg_info:write_toplevel_names +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 -PKG-INFO = setuptools.command.egg_info:write_pkg_info dependency_links.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements [distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -rotate = setuptools.command.rotate:rotate -build_ext = setuptools.command.build_ext:build_ext -install_lib = setuptools.command.install_lib:install_lib -develop = setuptools.command.develop:develop -saveopts = setuptools.command.saveopts:saveopts -build_py = setuptools.command.build_py:build_py +test = setuptools.command.test:test upload_docs = setuptools.command.upload_docs:upload_docs -egg_info = setuptools.command.egg_info:egg_info +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_lib = setuptools.command.install_lib:install_lib install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_py = setuptools.command.build_py:build_py bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm sdist = setuptools.command.sdist:sdist -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install +develop = setuptools.command.develop:develop register = setuptools.command.register:register -test = setuptools.command.test:test -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -install_scripts = setuptools.command.install_scripts:install_scripts setopt = setuptools.command.setopt:setopt - -[distutils.setup_keywords] -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -zip_safe = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -convert_2to3_doctests = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -use_2to3_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -packages = setuptools.dist:check_packages -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool +rotate = setuptools.command.rotate:rotate +install_scripts = setuptools.command.install_scripts:install_scripts +saveopts = setuptools.command.saveopts:saveopts +alias = setuptools.command.alias:alias +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install = setuptools.command.install:install +easy_install = setuptools.command.easy_install:easy_install +egg_info = setuptools.command.egg_info:egg_info +build_ext = setuptools.command.build_ext:build_ext diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 7a47af1df0..0b577c9748 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -3,11 +3,11 @@ [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 -[certs] -certifi==0.0.8 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 +[certs] +certifi==0.0.8 + [ssl:sys_platform=='win32'] wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 64477cf292..6f4fa58fe0 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.2' +__version__ = '1.3' From e30f30948f572ee32229103a2f2438766a98e040 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 11:30:24 -0500 Subject: [PATCH 1564/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7934de0f51..73ba3df5ba 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +--- +1.3 +--- + +* Address security vulnerability in SSL match_hostname check as reported in + Python #17997. +* Prefer `backports.ssl_match_hostname + `_ for backport + implementation if present. + --- 1.2 --- From 14e2b1c3fdd82c926e1e1122d9656a07d41328c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 11:36:16 -0500 Subject: [PATCH 1565/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 73ba3df5ba..6ae840b3cf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ CHANGES * Prefer `backports.ssl_match_hostname `_ for backport implementation if present. +* Correct NameError in ``ssl_support`` module (``socket.error``). --- 1.2 From 816b15494393c74219373a268c29a6460a0a636e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 11:37:49 -0500 Subject: [PATCH 1566/8469] Added tag 1.3 for changeset 19873119647d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ee4f63a283..6d2e01aa2f 100644 --- a/.hgtags +++ b/.hgtags @@ -103,3 +103,4 @@ d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 4c7dc4ae2440ae3e9ba26b4a12ffca3407e7030d 1.2b1 77921bbe3931caf40474dc36e55d3d541981c749 1.2 +19873119647deae8a68e9ed683317b9ee170a8d8 1.3 From c92770125e3f86384d7a0020215dc7a7016af9f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 11:38:19 -0500 Subject: [PATCH 1567/8469] Bumped to 1.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 64eaca559e..72d35a5b42 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.3" +DEFAULT_VERSION = "1.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 718c478726..fdf63bf086 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [console_scripts] easy_install = setuptools.command.easy_install:main easy_install-3.3 = setuptools.command.easy_install:main -[distutils.setup_keywords] -tests_require = setuptools.dist:check_requirements -include_package_data = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [egg_info.writers] -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries requires.txt = setuptools.command.egg_info:write_requirements +top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg [distutils.commands] -test = setuptools.command.test:test -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install install_lib = setuptools.command.install_lib:install_lib -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_py = setuptools.command.build_py:build_py -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -sdist = setuptools.command.sdist:sdist -develop = setuptools.command.develop:develop register = setuptools.command.register:register -setopt = setuptools.command.setopt:setopt -rotate = setuptools.command.rotate:rotate -install_scripts = setuptools.command.install_scripts:install_scripts -saveopts = setuptools.command.saveopts:saveopts -alias = setuptools.command.alias:alias +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install = setuptools.command.install:install easy_install = setuptools.command.easy_install:easy_install +setopt = setuptools.command.setopt:setopt egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext +bdist_egg = setuptools.command.bdist_egg:bdist_egg +develop = setuptools.command.develop:develop +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +install_scripts = setuptools.command.install_scripts:install_scripts +build_py = setuptools.command.build_py:build_py +rotate = setuptools.command.rotate:rotate +install_egg_info = setuptools.command.install_egg_info:install_egg_info +upload_docs = setuptools.command.upload_docs:upload_docs +alias = setuptools.command.alias:alias + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +namespace_packages = setuptools.dist:check_nsp +packages = setuptools.dist:check_packages +zip_safe = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +tests_require = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite +include_package_data = setuptools.dist:assert_bool +convert_2to3_doctests = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 0b577c9748..6d385dc746 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,8 +1,5 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 @@ -10,4 +7,7 @@ ssl==1.16 certifi==0.0.8 [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 6f4fa58fe0..0f663085de 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.3' +__version__ = '1.4' From 71a3053e854c5f059a9d71d94cbb1bc8a4e641f3 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 4 Nov 2013 11:26:03 -0800 Subject: [PATCH 1568/8469] Add svn test data --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index ff1021234a..76822cbda2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ recursive-include setuptools *.py *.txt *.exe *.xml recursive-include tests *.py *.c *.pyx *.txt recursive-include setuptools/tests *.html entries* +recursive-include setuptools/tests/svn_data *.zip recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html recursive-include _markerlib *.py include *.py From 748f46273dbaf80b04cf69b8cbd0f4cf6e37a9b6 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Tue, 5 Nov 2013 14:11:53 +0000 Subject: [PATCH 1569/8469] Removed verbose warning from svn_utils.py --- setuptools/svn_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 22b45cd7ea..55dbb74d3c 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -244,7 +244,6 @@ def load(cls, dirname=''): "on pre 1.7 .svn parsing"), DeprecationWarning) return SvnFileInfo(dirname) elif not has_svn: - log.warn('Not SVN Repository') return SvnInfo(dirname) elif base_svn_version < (1, 5): return Svn13Info(dirname) From 69a13626755104a3e92294e31018c183c4eeefc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Nov 2013 19:46:13 -0500 Subject: [PATCH 1570/8469] Remove svn17_example.zip --- setuptools/tests/svn17_example.zip | Bin 19342 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 setuptools/tests/svn17_example.zip diff --git a/setuptools/tests/svn17_example.zip b/setuptools/tests/svn17_example.zip deleted file mode 100644 index cfabd2b2d4cb975d4bf160f5bd991e7bf28f8ec8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19342 zcmch81zc2H7cVFwB@)uoNOy;zgmiaHcc-*SNK1E0hXT@#lynHv-60I1G|Zb3zk3nA zdi}ol-u8FqoWa@uz1BKw?{ofZuO%aX6AB&z+@f7)_`hC!`#=Ys?Hnx`*|iOvbu6sS z4d|`xjSXz+WxnfSAFGQ63;HGa!2O3F_6BzLbkLOCf8;X5&))G!1Oe0! zd|>_1-_}4!-@<^--r4?}42<6aG=l&@eg0}VpsVjiwl_Ah)z`Mxv9*7CMR0IGv+!jo zDA4c02f;72@aV`RGGuGhO_|6sYVT@9^lEp+U^>zQ_KYT^C7r?st#oxO>r!4;ET@A;#r zejW3#o{a3*I$xciGQSxX)R~c;*-&4PgM;0`kVTJ!#gLPgiGf|;kd4_;Plth($$-UB zmtCL1kQqEGt*(xp!4H%APbFq!y(aP172$UhgF3UZGU~H18!+f`>M*nD=yK?=>oGBL za4<4(GB7ad8nCkHbLz9Ob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>8Vt@W}4U7bxoc1M#awpZyZ8a^`|^es$z`Y(KscvlHBg> z6%@?uMD7S3iykY7%{X2fw{`|MuZhp)@5-^IX2?TBvI9Q{gpd)3yn&AJ&lRkoZ3R%f zb9uU!PxzmD*6$InR?LB`D!~mBf)Mn{1UkOYNW4V&R^NJ6l%JKhf_i@gvi$+*??TtB zDA%*sz{QG}4Xn^x(DA)ES93nE<6PY)0#^}&+of8YpsRnz`C0&a9qcL#{2q)3@>gJA z3o@^RUCj>s9?asGU|*|ZuYz4Ci2u2Jm-qkmufV_+vVXe)80f0K2*JhzwM%<}%IE&s zUf(KaucKY|zx@1OEXo_dKm%9L{#&the+~4*eZ0=*3BSpBsbuD_(SEp**NbESp0*dTX4I?Ap(``e($PZaV~==S7EN#bAl^wFB^E~sQ(=1O7P@w zqhCk*kB445RrGI=zSiS@4|a8Zk@+UnrFKKV2m9mt++P{xdsT!%wdg;w?O#UuTB!TI zD%VSO!P;D^;`4j3KQ7$;l`7zR-OC2Pzvn+6{W69ER^gxPcP~K*K_@2YpW5SV80D%c z;6?gsjsiHh0NgGOQG{|GK@87Ga{Aa*_Tng|j z6-h4L3G@ke)REsya((dtKR&M)27oay9Tem4Z*BI&LIOs-x{!dAoxtr9F^cdPh~K9^ zUDf+K==ZDB)V~1zaVY^~f(83e1E)bP!P~T!7o9Wy}5$`G1;f*KG$*nYwIXC7FqTZ@Zs4;`J0NFyf_h4*vr24?Xb) z?JtDK1L$8B LXzDj{fxrD9{;(+L From 009ebf9ed37dc39af25a465219a082efab99cc13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Nov 2013 20:15:23 -0500 Subject: [PATCH 1571/8469] Delint (remove unused imports, excess whitespace, unnecessary syntax, and unused variables) --- setuptools/tests/test_svn.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 59ecb25b1a..5418b9a43e 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -3,21 +3,13 @@ import os -import sys import unittest import codecs from setuptools.tests import environment -from setuptools.svn_utils import fsencode from setuptools.compat import unicode, unichr from setuptools import svn_utils -#requires python >= 2.4 -from subprocess import call as _call - -from distutils import log - - class TestSvnVersion(unittest.TestCase): @@ -64,13 +56,6 @@ def parse_tester(self, svn_name, ext_spaces): data = _read_utf8_file(path) - if ext_spaces: - folder2 = 'third party2' - folder3 = 'third party3' - else: - folder2 = 'third_party2' - folder3 = 'third_party3' - expected = set([ ("\\".join((example_base, 'a file')), 'file'), ("\\".join((example_base, 'folder')), 'dir'), @@ -116,7 +101,7 @@ def parse_tester(self, svn_name, ext_spaces): expected = set([ os.sep.join((example_base, folder2)), os.sep.join((example_base, folder3)), - #third_party大介 + # folder is third_party大介 os.sep.join((example_base, unicode('third_party') + unichr(0x5927) + unichr(0x4ecb))), @@ -129,7 +114,7 @@ def parse_tester(self, svn_name, ext_spaces): expected = set(os.path.normpath(x) for x in expected) dir_base = os.sep.join(('C:', 'development', 'svn_example')) - self.assertEqual(set(x for x \ + self.assertEqual(set(x for x in svn_utils.parse_externals_xml(data, dir_base)), expected) def test_svn15(self): @@ -150,7 +135,6 @@ class ParseExternal(unittest.TestCase): def parse_tester(self, svn_name, ext_spaces): path = os.path.join('setuptools', 'tests', 'svn_data', svn_name + '_ext_list.txt') - example_base = svn_name + '_example' data = _read_utf8_file(path) if ext_spaces: @@ -237,4 +221,3 @@ def test_externals(self): def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) - From bfddd8a736a240ac17fa1641fec9214e0c1b44c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Nov 2013 01:07:16 -0500 Subject: [PATCH 1572/8469] Updated changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6ae840b3cf..11b8a50290 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +1.3.1 +----- + +* Remove exuberant warning in SVN support when SVN is not used. + --- 1.3 --- From 40b052c6cbb4349a43e6bf6c09bdab359e1a4689 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Nov 2013 01:14:46 -0500 Subject: [PATCH 1573/8469] Bumped to 1.3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 72d35a5b42..3536ff681b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.4" +DEFAULT_VERSION = "1.3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 0f663085de..72837bdc78 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.4' +__version__ = '1.3.1' From c2b98268b7bf2afa73a40680257207cce52d9469 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Nov 2013 01:14:48 -0500 Subject: [PATCH 1574/8469] Added tag 1.3.1 for changeset a197b626075a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6d2e01aa2f..c198d993de 100644 --- a/.hgtags +++ b/.hgtags @@ -104,3 +104,4 @@ cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 4c7dc4ae2440ae3e9ba26b4a12ffca3407e7030d 1.2b1 77921bbe3931caf40474dc36e55d3d541981c749 1.2 19873119647deae8a68e9ed683317b9ee170a8d8 1.3 +a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 From 52e317a70799cceedb959be2206ec5985d9c280d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Nov 2013 01:15:23 -0500 Subject: [PATCH 1575/8469] Bumped to 1.3.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3536ff681b..4da59fcd76 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.3.1" +DEFAULT_VERSION = "1.3.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index fdf63bf086..73498a4c3b 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -entry_points.txt = setuptools.command.egg_info:write_entries -requires.txt = setuptools.command.egg_info:write_requirements -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg - [distutils.commands] -install = setuptools.command.install:install -install_lib = setuptools.command.install_lib:install_lib -register = setuptools.command.register:register -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -easy_install = setuptools.command.easy_install:easy_install -setopt = setuptools.command.setopt:setopt -egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext +egg_info = setuptools.command.egg_info:egg_info +setopt = setuptools.command.setopt:setopt +install = setuptools.command.install:install bdist_egg = setuptools.command.bdist_egg:bdist_egg develop = setuptools.command.develop:develop -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -install_scripts = setuptools.command.install_scripts:install_scripts +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +register = setuptools.command.register:register +test = setuptools.command.test:test build_py = setuptools.command.build_py:build_py +install_scripts = setuptools.command.install_scripts:install_scripts rotate = setuptools.command.rotate:rotate -install_egg_info = setuptools.command.install_egg_info:install_egg_info -upload_docs = setuptools.command.upload_docs:upload_docs +saveopts = setuptools.command.saveopts:saveopts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm alias = setuptools.command.alias:alias +install_lib = setuptools.command.install_lib:install_lib +easy_install = setuptools.command.easy_install:easy_install +sdist = setuptools.command.sdist:sdist +upload_docs = setuptools.command.upload_docs:upload_docs -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[egg_info.writers] +requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -namespace_packages = setuptools.dist:check_nsp -packages = setuptools.dist:check_packages -zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -tests_require = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements exclude_package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list test_suite = setuptools.dist:check_test_suite -include_package_data = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +dependency_links = setuptools.dist:assert_string_list +use_2to3_exclude_fixers = setuptools.dist:assert_string_list package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements +namespace_packages = setuptools.dist:check_nsp use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +extras_require = setuptools.dist:check_extras +entry_points = setuptools.dist:check_entry_points +include_package_data = setuptools.dist:assert_bool -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 6d385dc746..5ff415da83 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 +[ssl:sys_platform=='win32'] +wincertstore==0.1 [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 [ssl:sys_platform=='win32' and python_version=='2.4'] ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 72837bdc78..e39833240e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.3.1' +__version__ = '1.3.2' From b42ef986b9ce537638ea931422063f97a18f8981 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 7 Nov 2013 21:11:18 -0600 Subject: [PATCH 1576/8469] removed fsencode and fsdecode replaced fsencode with decode_as_string - decoded utf8 or console input to decode_as_string should be called on encoded string before joining BUG_FIX - It would seem that there is a issue wiht the legacy file listing which this commit fits. I have no clue how any of the other stuff would had even worked. --- setuptools/svn_utils.py | 97 +++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 55dbb74d3c..6ac31a2471 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -27,18 +27,18 @@ # python-subprocess-popen-environment-path -def _run_command(args, stdout=_PIPE, stderr=_PIPE): +def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0): #regarding the shell argument, see: http://bugs.python.org/issue8557 try: - args = [fsdecode(x) for x in args] proc = _Popen(args, stdout=stdout, stderr=stderr, shell=(sys.platform == 'win32')) - data = proc.communicate()[0] + data = proc.communicate()[stream] except OSError: return 1, '' - data = consoledecode(data) + #doubled checked and + data = decode_as_string(data, encoding) #communciate calls wait() return proc.returncode, data @@ -73,40 +73,28 @@ def joinpath(prefix, *suffix): return os.path.join(prefix, *suffix) -def fsencode(path): - "Path must be unicode or in file system encoding already" - encoding = sys.getfilesystemencoding() - - if isinstance(path, unicode): - path = path.encode() - elif not isinstance(path, bytes): - raise TypeError('%s is not a string or byte type' - % type(path).__name__) - - #getfilessystemencoding doesn't have the mac-roman issue - if encoding == 'utf-8' and sys.platform == 'darwin': - path = path.decode('utf-8') - path = unicodedata.normalize('NFD', path) - path = path.encode('utf-8') - - return path - - -def fsdecode(path): - "Path must be unicode or in file system encoding already" - encoding = sys.getfilesystemencoding() - if isinstance(path, bytes): - path = path.decode(encoding) - elif not isinstance(path, unicode): - raise TypeError('%s is not a byte type' - % type(path).__name__) - - return unicodedata.normalize('NFC', path) +def decode_as_string(text, encoding=None): + """ + Decode the console or file output explicitly using getpreferredencoding. + The text paraemeter should be a encoded string, if not no decode occurs + If no encoding is given, getpreferredencoding is used. If encoding is + specified, that is used instead. This would be needed for SVN --xml + output. Unicode is explicitly put in composed NFC form. + + --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion + DEV List from 2007 seems to indicate the same. + """ + #text should be a byte string + if encoding is None: + encoding = locale.getpreferredencoding() -def consoledecode(text): - encoding = locale.getpreferredencoding() - return text.decode(encoding) + if not isinstance(text, unicode): + text = text.decode(encoding) + + text = unicodedata.normalize('NFC', text) + + return text def parse_dir_entries(decoded_str): @@ -141,6 +129,7 @@ def parse_externals_xml(decoded_str, prefix=''): path = path[len(prefix)+1:] data = _get_target_property(node) + #data should be decoded already for external in parse_external_prop(data): externals.append(joinpath(path, external)) @@ -177,6 +166,7 @@ def parse_external_prop(lines): else: external = line[-1] + external = decode_as_string(external, encoding="utf-8") externals.append(os.path.normpath(external)) return externals @@ -214,9 +204,9 @@ class SvnInfo(object): def get_svn_version(): code, data = _run_command(['svn', '--version', '--quiet']) if code == 0 and data: - return unicode(data).strip() + return data.strip() else: - return unicode('') + return '' #svnversion return values (previous implementations return max revision) # 4123:4168 mixed revision working copy @@ -314,7 +304,8 @@ def get_externals(self): class Svn13Info(SvnInfo): def get_entries(self): - code, data = _run_command(['svn', 'info', '-R', '--xml', self.path]) + code, data = _run_command(['svn', 'info', '-R', '--xml', self.path], + encoding="utf-8") if code: log.debug("svn info failed") @@ -328,10 +319,11 @@ def get_externals(self): cmd = ['svn', 'propget', 'svn:externals'] result = [] for folder in self.iter_dirs(): - code, lines = _run_command(cmd + [folder]) + code, lines = _run_command(cmd + [folder], encoding="utf-8") if code != 0: log.warn("svn propget failed") return [] + #lines should a str for external in parse_external_prop(lines): if folder: external = os.path.join(folder, external) @@ -343,7 +335,7 @@ def get_externals(self): class Svn15Info(Svn13Info): def get_externals(self): cmd = ['svn', 'propget', 'svn:externals', self.path, '-R', '--xml'] - code, lines = _run_command(cmd) + code, lines = _run_command(cmd, encoding="utf-8") if code: log.debug("svn propget failed") return [] @@ -363,6 +355,7 @@ def _walk_svn(self, base): entries = SVNEntriesFile.load(base) yield (base, False, entries.parse_revision()) for path in entries.get_undeleted_records(): + path = decode_as_string(path) path = joinpath(base, path) if os.path.isfile(path): yield (path, True, None) @@ -371,18 +364,17 @@ def _walk_svn(self, base): yield item def _build_entries(self): - dirs = list() - files = list() + entries = list() + rev = 0 for path, isfile, dir_rev in self._walk_svn(self.path): if isfile: - files.append(path) + entries.append((path, 'file')) else: - dirs.append(path) + entries.append((path, 'dir')) rev = max(rev, dir_rev) - self._directories = dirs - self._entries = files + self._entries = entries self._revision = rev def get_entries(self): @@ -396,14 +388,11 @@ def get_revision(self): return self._revision def get_externals(self): - if self._directories is None: - self._build_entries() - prop_files = [['.svn', 'dir-prop-base'], ['.svn', 'dir-props']] externals = [] - for dirname in self._directories: + for dirname in self.iter_dirs(): prop_file = None for rel_parts in prop_files: filename = joinpath(dirname, *rel_parts) @@ -412,6 +401,8 @@ def get_externals(self): if prop_file is not None: ext_prop = parse_prop_file(prop_file, 'svn:externals') + #ext_prop should be utf-8 coming from svn:externals + ext_prop = decode_as_string(ext_prop, encoding="utf-8") externals.extend(parse_external_prop(ext_prop)) return externals @@ -422,12 +413,12 @@ def svn_finder(dirname=''): #combined externals and entries due to lack of dir_props in 1.7 info = SvnInfo.load(dirname) for path in info.iter_files(): - yield fsencode(path) + yield path for path in info.iter_externals(): sub_info = SvnInfo.load(path) for sub_path in sub_info.iter_files(): - yield fsencode(sub_path) + yield sub_path class SVNEntriesFile(object): From d1e38c815d6b284caf5d5f15b358af9baa330b4a Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 7 Nov 2013 21:12:03 -0600 Subject: [PATCH 1577/8469] fixed imports on test_svn, look like it was an artifact anyway. --- setuptools/tests/test_svn.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 59ecb25b1a..cf98141aa6 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -7,7 +7,6 @@ import unittest import codecs from setuptools.tests import environment -from setuptools.svn_utils import fsencode from setuptools.compat import unicode, unichr from setuptools import svn_utils From d0526b9ca5baad5b23180d32cf8b387bfcea0eaa Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 7 Nov 2013 21:13:10 -0600 Subject: [PATCH 1578/8469] Fixed the various tests that depended on fsencode. Added a test to run egg_info on a dummy SVN package. Added a second similar test that invokes the legacy code. --- setuptools/tests/svn_data/dummy13.zip | Bin 0 -> 9243 bytes setuptools/tests/svn_data/dummy14.zip | Bin 0 -> 7496 bytes setuptools/tests/svn_data/dummy15.zip | Bin 0 -> 7506 bytes setuptools/tests/svn_data/dummy16.zip | Bin 0 -> 7155 bytes setuptools/tests/svn_data/dummy17.zip | Bin 0 -> 7512 bytes setuptools/tests/svn_data/dummy18.zip | Bin 0 -> 7639 bytes setuptools/tests/test_sdist.py | 82 +++++++++++++++++++++++++- 7 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 setuptools/tests/svn_data/dummy13.zip create mode 100644 setuptools/tests/svn_data/dummy14.zip create mode 100644 setuptools/tests/svn_data/dummy15.zip create mode 100644 setuptools/tests/svn_data/dummy16.zip create mode 100644 setuptools/tests/svn_data/dummy17.zip create mode 100644 setuptools/tests/svn_data/dummy18.zip diff --git a/setuptools/tests/svn_data/dummy13.zip b/setuptools/tests/svn_data/dummy13.zip new file mode 100644 index 0000000000000000000000000000000000000000..47764342d7c76f44ef5f210abc609f4c6a268574 GIT binary patch literal 9243 zcmc&)2~-qE8Xgo8xe-K=AcG=0gO9u5D3pP{w(+BTN{?R}nu%b)=wm~as{W66*S1wcC{XAN^&C~W|r^dFl zb6K`ob&ULTS=QRBeX;AEu5CN@!`CeW>&>Gz&sKzWH%Cq#e)L4u2tcx}0Z!CW}z9-{9hKh2} z2hF~P1~;Xnk~7cbu3LM_{Cr7>OO3bd2NL_z#IqH*niALiSoF=SF-uj)7P|&k)t;+( zk`*waO!G@zb&{sqf6S`CZ*LJ*b#}g}o%@%V($y*}zl6gLTfJ9rxn@f`W~ZsgnZW1~2;LZSIl0Q5 zF>}*YGAyLYMJyb!NTpj~OrunKh)dEbg9@k*E3j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LGYX( z2phaXc+edU2XC|$(h&#cK&c}u0!fyh4Dd;YggX&Sa){@&;A((~MkFPk1Ed8^`s?^D zz*+|<_%j1@8l05+z(oxDt^DBRAs_d9O@}=VOiDbA0c*T#FrZ+GqtY%?QX;;OL?KmbYpZ?^QQI11( z;`h4Hf#Jd|E-*OU;!tpRNQnmoxm$x6P`gQ}w};`Lv{73WQgL?;gTV?q&ZYgzngAg+ z7{xw|qUSFt@w6hRPJ0~}0MeiO6$qRp$im%wB<>T3g$@a%Q4oftJ%8Z(V>hZ>!NdsV zi?Zo7BYaoL2@<&rOptPxeozk>i3;aOC?Oc`F7nLfq$2^`wUrx$dzw7>B9G=oO2kP! zO)}pf!C3;#c`ZC}?3uFNI+-qWP>zqBN#B#y@R<@N5WpHi#UzXb?f%gIV^5YO9e9su z3Fvntluq4+ya+-enH!3`;K5BIr9L>s48U#ShhvsJ5(3^MD6Y3Y_=a8PhCP>L)#em*U3_CECTDsi$UJU%F zZ^Fl3GH{w8{m@dI6{N(@siX^-%`?o5+vCJY0DTN4)7RYP(nZG=1nok8pm&!i%xJ37 z56R3GGHBtwzTjmte9RB`zXUM1Q=J)3^``!sfTPBN*M(d?9C9Kh&XMdF%n?Y*4afxs zLxhxgdXT-`PRCA2h0J~y7|ch!>cE)+c33F&;h=g7aBi}2u)O=dP^hT`C>!ecJaEIX zQymuwoPD6w$H$W4w=fLk_35qm03htRUNyq509bs40br*z9OQEO5+fIC{(*1Mpw!1= zAcKVg^)3{;io4&york)i#4*_K9C0FE7zR9b;VcT1yS%|X3N=G1oz{;!bO;2V)W5lu L$99AFwu1ix{F!sx literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/dummy14.zip b/setuptools/tests/svn_data/dummy14.zip new file mode 100644 index 0000000000000000000000000000000000000000..02ed8cf08457e9183d39aadddf6688be2f728a52 GIT binary patch literal 7496 zcmc&(4Nz276y6mvTtN{HP*OofNVa7$)WjI&XAwhw?R0u;* z)UqtGA2AhwDnr9e$r?m0NyR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^z>pA%o?XP2 zEnq{ja~8)6OEDZfXElOlXo%R+5gfjjF)KSxXN_A0&lM~oXXp_kK!ks%BYbehlRX0N z<5~$7l90C}4&V>kgyv3TajEl18nlJiK246)N?)!bMBYOJ}lq+)w literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/dummy15.zip b/setuptools/tests/svn_data/dummy15.zip new file mode 100644 index 0000000000000000000000000000000000000000..ed8daeeba491cf3e4807d75c208392d4baf68fdd GIT binary patch literal 7506 zcmcgx2~bpZ7~ka*RzX%A6_HwyWARu(3@Dxebis%$FaY3{%~jLEUUp#7Wqo}WcyQ9)Ki||DV4d{Xn)jQ@-g$M)osttY^g-j zhZ*;X~tHgKC#4m;Csfv|63= z^n&-V^F!q8p1k4G zzPIXMidPLSJ`iG5HKu8fO+BJHT^E#?f1=Dd?AGDZ43D_MQP;n2iSBs1OF2HLYMLr~ z%c-{Vg6gk+ZEJ3`2F9sh4$lkUH^=AGdnv>AFL*b3VR_*VYy09@{pvol0heS=X62@| zReEc^v!ooQ#dA3lom%#qWRT#GKIAhYm+xp~*1QGD=2*jaXRT z&L4egmLgMO(a<+$nsxTDOC&Ut0}f&`0|t~Qq9_(!sfD1}tf83()2b1sxcJ!AiQ06P zrPPAbj+I2*LJNuz5i}_^V@ksKsTq@|bXA&&TJZ_#jG$>lC_ZECufV;ib9 zTLoslw)T83bNYb!ifEG(o0>2|o1UT48|{L!D|gA}EBa|m_LLNOwfjGM82?r8<4f|) z-hq3Ew_o4BC*adDHRe&pC#Pqo#BR!%F{EL)dV+_n;E~6ZZw7k$jmuje6R|Py%$#`0+j7m11+KPz!_etb*f3BlSaSCGc}@rNYt%RVK{P z57-q)RTF7Dv#5sP1-Mw}1JBX(2&!az7Dd?3V5^A{!9U-wXM`SOCR2Y0;VeVvY}&Uh z)@wn8xAuWg&%a&g>%&gpAF%bT_xiZsGZW(`);0FkB~;#+yX9%snvQ%)&6;uJZaSaZ zym`PmW#tEM6*GRg77-JYSXZ#B!|E2*O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/svn_data/dummy16.zip new file mode 100644 index 0000000000000000000000000000000000000000..b6e98d6c40a392cfd9c3f5413f5b91193f5d8a32 GIT binary patch literal 7155 zcmchb2~ZPP7=Sm33Q=wfSfmD_1_UD!$9kb41UV#102LJQ3K)k=5->Q{gLbU<&4}kz z9jl_w;MIDfh>jI4g+c38wL?`bYN^L~fZFcc@Us8D>~5LrG&A_KxbOeo|G)ow857&V z+Lc0|*e#ji%r9;K*wAuXL3VbLazNiP=C@W6Z`pyj6#Bv(^Q$%#diC=DS-XZwC~CDe zMIj7U$h@k}G34vC`k&TbQdb4JM!a%5?c8{?;;GLGjn(pqggv%ht`C|URnoF3X34|5 zzZ;TwuR316?__!AipbBT(G3GGSg$F+(bDr$zsA#VU)Hv6x$CfD$dkgx9nB7jZ|8Y0 zk=*y+>A%};dS#MiiEKyAgC5F;80k(|kD#3u!T#=x_DuHEEY{pR_DM?0hM~So%XH%& z&FVMD!F}P^@73E6QflksNy>}f1=WN1TZLYrPK~8f0&>3^(d*sSsppD2NL+m~49(wo zze#Y^rR^5fN=86M*G@Xf~aVPzqm!F&0XUb%~ z)_h15MJ{sTTcigI$N;dQ7_>$MOOew0C~76KwE&XBE((tdQ;$?7C=5me3KB*WvXNg= zkcgtu>O@WSh@`~Pn)YfF*;Z6^0<9>yo!gQNZ);R^xJsR%;@E~V!-jEE%Gm99(&?wg z^pD7H;=>3o@oYF6c}>Gn-tEpMW>xn5bAp?B#EF4NPKQL=N~gEjzTf9#=NX!@D){s1LoP&QMBbFFoxeJG@X`9T z?_$aVtD8Mv8G~j^gwLS2u(29dSVWvk#Azu9jvFKB_2|b>SdU(7D9BUf6`76A$j{A| zF@H7W=4R<-y6n8%e1qvPc2ed){BkB|YeVEr#gPZf3bpxqU2aZ@JV>EbDCPckQZ{qQ zn0B(*Np>Dc0WxPi`Ce~NvRUR1%|Q#r5{{R~<_~*LJvVX-I!tYlWx@+QfL-B4HnGmj zAadIttYVxGJV!bjZprj6I$`qyQx8%7oE*QOR$4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p5(AwWY00R|pEAz^k}OFuMdV9i*L WiS0;tM09KKMfIcee=n_vqW%G27!pVT literal 0 HcmV?d00001 diff --git a/setuptools/tests/svn_data/dummy17.zip b/setuptools/tests/svn_data/dummy17.zip new file mode 100644 index 0000000000000000000000000000000000000000..d96e15133499e6e6606d2c5893cd230e9a5508bb GIT binary patch literal 7512 zcmcgw2{@Gf*B<-6r7RIjh3sQ2gUB+nlbr}-M%l)g8C!^wT?nNt5mDAiA(gdcsmPio zl|8bhBx3$E(>oeU*Zcjy@A@9sIP>s3=RWuOEzfywV?7GW-2nWhpK)4)@a3Ohv^Wd% z_VDnRmX|c%9Cc~iC?=9o5@;U;VJJNz1Osm9z>Gm31?~?2!NU*(5{AMN7?cYfEe)i{ z$N#ev`*tU1Pn3rv<{zJ*nQzaDW4jL$<$}hzAmD%D!M&po7_{j|3&2C!SY!{|PH+V&DS0_Z7zifq=m>R$Il<)}Wu-w*Km{2mDFsJ)DR~&a7~)VzG~6!s z34MqF7sR*T_YCv&zSZyAH+Of3JEK_-G=QdO%j@^2D5aypK7A*x4AkzJ*@``=J*q`V ze`b|#qezg6=a_SX%%L+%&o!O32FQ{^F3TuZb)Cx7Ef8y+=lSL*b(U=BS=^bulOxHD z64;kj`)T4><3BsI$GJH<%EG`haA_C}CM_iem63Ilat6U=CcN|XNs`x6miTpubnC4++dC}U`H7^Tox_|1wo}?GC)~bs59IdEGs7^ ztpJvCbcQKN$xDGZDegQ2Y&gU%n*-y4+_vt5T`$ zi!UIxkwGM^Q#Lob8bifoyth)P3rXAA^oU2BUE8E}AGl0|39LJUV4%HO8Uk1hf4blA zSjba$frJoFN|uEt@%@y$ltWk}XUHxluxd*=DV1e}8f1lqz36+x*ZyM(D>Dk-;Kq*T zNyLa0yclo0l6?oYr={nStj{fxX|C3f+HF%~^EzKwC487E zaRMSZ1A2wc(Js4R>x-4~#=#r(^7R@&hPt)2XdZYeCKQIWd2ccLy3K-0VsAXHCDI_- z_Q0!;-9wn0>Ff;L(kI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j&QR9f;Szm>-MEl^Oj z*eSXf9-ct(2Op8CI_0ys-_lQFM7gvs*EBL6vc?wIELtdE^N1$*4p&o_!vW({r5U9! z4cPsrWbT!!4W%GBGE3_mSFU$Jt*s~iqWik0x?7w3d=~yjj;lk*60wTwn8weo#su^E z@zcfPsn_xk2b|3r@C^0|(D-~Zv(DM=c|!stxSVl+T$d;ZPXmSKMb}=Zhn=4>c4Wax zm9uU}wdECF4&hH){t}}nyZ#J6Pc=oQ>98h|<>KJT(xMxG;V3oZ=V;%qbq-E+DE7yE zppcDIIa;@?>w-|*4ZlxIqy4X@Q++<=wL&VRhm074py+B?um?6!>|Vm5&z=_d5^?&U z^4PpZW{hnix@Gx4zNHGC-1EHqA(?NNL$9{ z<{*qeX6Fu^fM-EXQxl8h`Wh!JOpkB%`n|lv0O+;x;0bun-yRZBP}yvYL7*{zjtcm^ zz1hdX!OhbRG9T*UYRf(sLX?1msh$mRcyY(lQI$?r4OQ%3yqW#tVW^(_jH!^QO+4Z%q9XiUK-y$}oelqu==$$t`+XYrZN)}RgXi|xh(aw8 zf}MMIgFearbKPw&hF|4eQl^RYGq*!*h`T@x(soF)zheCUtO0CPgoOL=`r2q z?Tl0ACu|@lqgoqVJIMmaar=SBxs@vd53&Lv$hOMlcSxkegJgkgboye10|!tw{coXu zodLc8C_tt4I}p-%knErG#<(>uL_YZdkiV<5e-A)hj=!tnw$=*a`yK!QprQkUbYuim z2>=elf5U?L7Zz|r-AEe!pJf^lgEaCa-y{pn)IW= (1,9): + #trying the latest version + self.base_version = (1,8) + + self.dataname = "dummy%i%i" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvnDummy, self).setUp() + + def test_sources(self): + soruce_test(self) + + +class TestSvnDummyLegacy(environment.ZippedEnvironment): + + def setUp(self): + self.base_version = (1,6) + self.path_variable = None + for env in os.environ: + if env.lower() == 'path': + self.path_variable = env + self.old_path = os.environ[self.path_variable] + os.environ[self.path_variable] = '' + + if self.path_variable is None: + self.skipTest('Cannot figure out how to modify path') + + self.dataname = "dummy%i%i" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvnDummyLegacy, self).setUp() + + def tearDown(self): + os.environ[self.path_variable] = self.old_path + super(TestSvnDummyLegacy, self).tearDown() + + def test_sources(self): + soruce_test(self) + + class TestSvn(environment.ZippedEnvironment): def setUp(self): @@ -453,11 +531,9 @@ def test_walksvn(self): os.path.join('folder', 'quest.txt'), #The example will have a deleted file (or should) but shouldn't return it ]) - expected = set(fsencode(x) for x in expected) self.assertEqual(set(x for x in walk_revctrl()), expected) - def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From ad255716d932f3ce553cc5319ef5acd905a49957 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Nov 2013 13:45:46 -0500 Subject: [PATCH 1579/8469] Update changelog. Fixes #99. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 11b8a50290..7110e23269 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +1.3.2 +----- + +* Issue #99: Fix filename encoding issues in SVN support. + ----- 1.3.1 ----- From cee23ae6e829d88a8902ce34de39c2a4a2843c19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Nov 2013 13:48:18 -0500 Subject: [PATCH 1580/8469] Added tag 1.3.2 for changeset 076b472a9e3f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c198d993de..b0b1a80723 100644 --- a/.hgtags +++ b/.hgtags @@ -105,3 +105,4 @@ cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 77921bbe3931caf40474dc36e55d3d541981c749 1.2 19873119647deae8a68e9ed683317b9ee170a8d8 1.3 a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 +076b472a9e3f840021e9d5509878337e6e5fcd89 1.3.2 From 4e9314f8dd906adf47410285bf9f68f59636f372 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Nov 2013 13:52:09 -0500 Subject: [PATCH 1581/8469] Bumped to 1.3.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 84 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 14 ++--- setuptools/version.py | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4da59fcd76..0057e2750b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.3.2" +DEFAULT_VERSION = "1.3.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 73498a4c3b..fb38112eb7 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [distutils.commands] +install_egg_info = setuptools.command.install_egg_info:install_egg_info build_ext = setuptools.command.build_ext:build_ext -egg_info = setuptools.command.egg_info:egg_info setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install +install_lib = setuptools.command.install_lib:install_lib bdist_egg = setuptools.command.bdist_egg:bdist_egg -develop = setuptools.command.develop:develop -install_egg_info = setuptools.command.install_egg_info:install_egg_info +sdist = setuptools.command.sdist:sdist +easy_install = setuptools.command.easy_install:easy_install +upload_docs = setuptools.command.upload_docs:upload_docs bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -register = setuptools.command.register:register test = setuptools.command.test:test -build_py = setuptools.command.build_py:build_py -install_scripts = setuptools.command.install_scripts:install_scripts -rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +alias = setuptools.command.alias:alias saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -alias = setuptools.command.alias:alias -install_lib = setuptools.command.install_lib:install_lib -easy_install = setuptools.command.easy_install:easy_install -sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info +build_py = setuptools.command.build_py:build_py +rotate = setuptools.command.rotate:rotate -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [distutils.setup_keywords] +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3_exclude_fixers = setuptools.dist:assert_string_list eager_resources = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +test_suite = setuptools.dist:check_test_suite install_requires = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list exclude_package_data = setuptools.dist:check_package_data -test_suite = setuptools.dist:check_test_suite -packages = setuptools.dist:check_packages -dependency_links = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp +extras_require = setuptools.dist:check_extras +test_loader = setuptools.dist:check_importable use_2to3 = setuptools.dist:assert_bool +packages = setuptools.dist:check_packages zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data tests_require = setuptools.dist:check_requirements -extras_require = setuptools.dist:check_extras entry_points = setuptools.dist:check_entry_points -include_package_data = setuptools.dist:assert_bool - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 5ff415da83..221040f812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - -[certs] -certifi==0.0.8 - [ssl:python_version in '2.4, 2.5'] ssl==1.16 [ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +ctypes==1.0.2 + +[certs] +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index e39833240e..07f744ca5d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.3.2' +__version__ = '1.3.3' From 76423012b5b51691dd059b1276351099e52c787e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Mon, 11 Nov 2013 17:07:52 -0600 Subject: [PATCH 1582/8469] For .svn legacy fallback, look for the files in the .svn not the directory. (Fixed unexpected deprecation warning from prombredanne) Also removed the warning from fallback, only a deprecation warning is issued. Environment.py whitespacing Created a specialized command executor for tests in Environment.py Legacy Test in test_egg_info now supresses the deprecation warning. PythonPath is now explicitly controlled to allow setup.py test on clean python installations. *Fixes Issue #101* Moved some dummy svn tests from test_sdist to test_egg_info since they are egg_info tests. Downgraded a with statement in a test since we haven't offically dropped 2.4 support, however, maybe it is time. Added a test case to ensure no extranuous output on sdist with a simple dummy package without rev ctrl. --- setuptools/svn_utils.py | 9 +- setuptools/tests/environment.py | 50 +++++++++- setuptools/tests/svn_data/dummy.zip | Bin 0 -> 1771 bytes setuptools/tests/test_egg_info.py | 96 +++++++++++++++++- setuptools/tests/test_sdist.py | 149 +++++++++++++--------------- 5 files changed, 221 insertions(+), 83 deletions(-) create mode 100644 setuptools/tests/svn_data/dummy.zip diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 6ac31a2471..224d11ea53 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -219,7 +219,13 @@ def get_svn_version(): def load(cls, dirname=''): normdir = os.path.normpath(dirname) code, data = _run_command(['svn', 'info', normdir]) - has_svn = os.path.isdir(os.path.join(normdir, '.svn')) + # Must check for some contents, as some use empty directories + # in testcases + svn_dir = os.path.join(normdir, '.svn') + has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or + os.path.isfile(os.path.join(svn_dir, 'dir-props')) or + os.path.isfile(os.path.join(svn_dir, 'dir-prop-base'))) + svn_version = tuple(cls.get_svn_version().split('.')) try: @@ -229,7 +235,6 @@ def load(cls, dirname=''): if has_svn and (code or not base_svn_version or base_svn_version < (1, 3)): - log.warn('Fallback onto .svn parsing') warnings.warn(("No SVN 1.3+ command found: falling back " "on pre 1.7 .svn parsing"), DeprecationWarning) return SvnFileInfo(dirname) diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index 7c754b8e8c..b41e15495e 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -5,6 +5,9 @@ import unittest import shutil import stat +import unicodedata + +from subprocess import Popen as _Popen, PIPE as _PIPE def _extract(self, member, path=None, pwd=None): @@ -25,13 +28,14 @@ def _extract_from_zip(self, name, dest_path): finally: dest_file.close() + def _extract_member(self, member, targetpath, pwd): """for zipfile py2.5 borrowed from cpython""" # build the destination pathname, replacing # forward slashes to platform specific separators. # Strip trailing path separator, unless it represents the root. if (targetpath[-1:] in (os.path.sep, os.path.altsep) - and len(os.path.splitdrive(targetpath)[1]) > 1): + and len(os.path.splitdrive(targetpath)[1]) > 1): targetpath = targetpath[:-1] # don't include leading "/" from file name if present @@ -102,3 +106,47 @@ def tearDown(self): #sigh? pass + +def run_setup_py(cmd, pypath=None, path=None, + data_stream=0, env=None): + """ + Execution command for tests, separate from those used by the + code directly to prevent accidental behavior issues + """ + if env is None: + env = dict() + + #override the python path if needed + if pypath is None: + env["PYTHONPATH"] = os.environ.get("PYTHONPATH", "") + else: + env["PYTHONPATH"] = pypath + + #oeride the execution path if needed + if path is None: + env["PATH"] = os.environ.get("PATH", "") + else: + env["PATH"] = pypath + + #Apparently this might be needed in windows platforms + if "SYSTEMROOT" in os.environ: + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + + cmd = [sys.executable, "setup.py"] + list(cmd) + + #regarding the shell argument, see: http://bugs.python.org/issue8557 + try: + proc = _Popen(cmd, stdout=_PIPE, stderr=_PIPE, + shell=(sys.platform == 'win32'), env=env) + + data = proc.communicate()[data_stream] + except OSError: + return 1, '' + + #decode the console string if needed + if hasattr(data, "decode"): + data = data.decode() # should use the preffered encoding + data = unicodedata.normalize('NFC', data) + + #communciate calls wait() + return proc.returncode, data diff --git a/setuptools/tests/svn_data/dummy.zip b/setuptools/tests/svn_data/dummy.zip new file mode 100644 index 0000000000000000000000000000000000000000..1347be53eb29eb8e4b9e0afe82372630708b3092 GIT binary patch literal 1771 zcmWIWW@Zs#00GOn>CRvVlwbqWDW$o&mHGidHC$j(rCF$I1mS9&JskbqU4!*XDoSuG z7egrb_X`Q~bP5ge4}$A~I3pU(89Z=3gd79X4^aalOHzwV@ViGGO-FouW?p7Ve7s&k zC2mh3{OsWw40L}aemi*KcKCQYyZQyYf=mWEm4o3rFf^mW7Tt>n@;ZSSVY08IpQoE^ zaEM-JUTn`^t_B4O*Ybnq8GNr~fBp1WC~~DOtynb>;$3WF*} z-2N1RJ3PqM(Z$yl)tizaw{P54;Q~|z!hCSm#i=Ew1;7wYE6UGR0CP(6^K*(7GII;^ zi%K9Oyj)-jjl9I%R9kg$bgAnol%*CGXXfYGsvGDT>KUqQ@^S@uGcwsT;7Xq=Ks!MI z^=|W;%?Rag`si=vDv*QxV*Fq|yZ0iVJgU*%Xm72P~7|^ML@04;YwW zfrKa`kZpkF4VcL=8rcTSf&|$UdT<+H#R{_dRdK(JKzR>lE{qQFW(Cz=4BS9y&ceVj J4`>Pl0|35xlF|SG literal 0 HcmV?d00001 diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7abafd7165..28682dfd0b 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,3 +1,4 @@ + import os import sys import tempfile @@ -5,12 +6,15 @@ import unittest import pkg_resources +import warnings from setuptools.command import egg_info +from setuptools.tests import environment from setuptools import svn_utils ENTRIES_V10 = pkg_resources.resource_string(__name__, 'entries-v10') "An entries file generated with svn 1.6.17 against the legacy Setuptools repo" + class TestEggInfo(unittest.TestCase): def setUp(self): @@ -37,7 +41,7 @@ def test_version_10_format(self): #to ensure I return using svnversion what would had been returned version_str = svn_utils.SvnInfo.get_svn_version() version = [int(x) for x in version_str.split('.')[:2]] - if version != [1,6]: + if version != [1, 6]: if hasattr(self, 'skipTest'): self.skipTest('') else: @@ -61,14 +65,104 @@ def test_version_10_format_legacy_parser(self): old_path = os.environ[path_variable] os.environ[path_variable] = '' + #catch_warnings not available until py26 + warning_filters = warnings.filters + warnings.filters = warning_filters[:] try: + warnings.simplefilter("ignore", DeprecationWarning) self._write_entries(ENTRIES_V10) rev = egg_info.egg_info.get_svn_revision() finally: + #restore the warning filters + warnings.filters = warning_filters + #restore the os path os.environ[path_variable] = old_path self.assertEqual(rev, '89000') +DUMMY_SOURCE_TXT = """CHANGES.txt +CONTRIBUTORS.txt +HISTORY.txt +LICENSE +MANIFEST.in +README.txt +setup.py +dummy/__init__.py +dummy/test.txt +dummy.egg-info/PKG-INFO +dummy.egg-info/SOURCES.txt +dummy.egg-info/dependency_links.txt +dummy.egg-info/top_level.txt""" + + +class TestSvnDummy(environment.ZippedEnvironment): + + def setUp(self): + version = svn_utils.SvnInfo.get_svn_version() + self.base_version = tuple([int(x) for x in version.split('.')][:2]) + + if not self.base_version: + raise ValueError('No SVN tools installed') + elif self.base_version < (1, 3): + raise ValueError('Insufficient SVN Version %s' % version) + elif self.base_version >= (1, 9): + #trying the latest version + self.base_version = (1, 8) + + self.dataname = "dummy%i%i" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvnDummy, self).setUp() + + def test_sources(self): + code, data = environment.run_setup_py(["sdist"], + pypath=self.old_cwd, + data_stream=1) + if code: + raise AssertionError(data) + + sources = os.path.join('dummy.egg-info', 'SOURCES.txt') + infile = open(sources, 'r') + try: + read_contents = infile.read() + finally: + infile.close() + del infile + + self.assertEqual(DUMMY_SOURCE_TXT, read_contents) + + return data + + +class TestSvnDummyLegacy(environment.ZippedEnvironment): + + def setUp(self): + self.base_version = (1, 6) + self.dataname = "dummy%i%i" % self.base_version + self.datafile = os.path.join('setuptools', 'tests', + 'svn_data', self.dataname + ".zip") + super(TestSvnDummyLegacy, self).setUp() + + def test_sources(self): + code, data = environment.run_setup_py(["sdist"], + pypath=self.old_cwd, + path="", + data_stream=1) + if code: + raise AssertionError(data) + + sources = os.path.join('dummy.egg-info', 'SOURCES.txt') + infile = open(sources, 'r') + try: + read_contents = infile.read() + finally: + infile.close() + del infile + + self.assertEqual(DUMMY_SOURCE_TXT, read_contents) + + return data + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 716893dcbe..b42dcc5769 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """sdist tests""" -from __future__ import with_statement import locale import os import shutil @@ -401,81 +400,73 @@ def test_sdist_with_latin1_encoded_filename(self): self.assertTrue(filename in cmd.filelist.files) -def soruce_test(self): - code, data = svn_utils._run_command([sys.executable, "setup.py", "egg_info"], stream=1) - - if code: - raise AssertionError(data) - - sources = os.path.join('dummy.egg-info', 'SOURCES.txt') - contents = """CHANGES.txt -CONTRIBUTORS.txt -HISTORY.txt -LICENSE -MANIFEST.in -README.txt -setup.py -dummy/__init__.py -dummy/test.txt -dummy.egg-info/PKG-INFO -dummy.egg-info/SOURCES.txt -dummy.egg-info/dependency_links.txt -dummy.egg-info/top_level.txt""" - - with open(sources, 'r') as infile: - read_contents = infile.read() - - self.assertEqual(contents, read_contents) - - -class TestSvnDummy(environment.ZippedEnvironment): - - def setUp(self): - version = svn_utils.SvnInfo.get_svn_version() - self.base_version = tuple([int(x) for x in version.split('.')][:2]) - - if not self.base_version: - raise ValueError('No SVN tools installed') - elif self.base_version < (1,3): - raise ValueError('Insufficient SVN Version %s' % version) - elif self.base_version >= (1,9): - #trying the latest version - self.base_version = (1,8) - - self.dataname = "dummy%i%i" % self.base_version - self.datafile = os.path.join('setuptools', 'tests', - 'svn_data', self.dataname + ".zip") - super(TestSvnDummy, self).setUp() - - def test_sources(self): - soruce_test(self) - - -class TestSvnDummyLegacy(environment.ZippedEnvironment): +class TestDummyOutput(environment.ZippedEnvironment): def setUp(self): - self.base_version = (1,6) - self.path_variable = None - for env in os.environ: - if env.lower() == 'path': - self.path_variable = env - self.old_path = os.environ[self.path_variable] - os.environ[self.path_variable] = '' - - if self.path_variable is None: - self.skipTest('Cannot figure out how to modify path') - - self.dataname = "dummy%i%i" % self.base_version self.datafile = os.path.join('setuptools', 'tests', - 'svn_data', self.dataname + ".zip") - super(TestSvnDummyLegacy, self).setUp() - - def tearDown(self): - os.environ[self.path_variable] = self.old_path - super(TestSvnDummyLegacy, self).tearDown() + 'svn_data', "dummy.zip") + self.dataname = "dummy" + super(TestDummyOutput, self).setUp() + + def _run(self): + code, data = environment.run_setup_py(["sdist"], + pypath=self.old_cwd, + data_stream=0) + if code: + info = "DIR: " + os.path.abspath('.') + info += "\n SDIST RETURNED: %i\n\n" % code + info += data + raise AssertionError(info) + + datalines = data.splitlines() + + possible = ( + "running sdist", + "running egg_info", + "creating dummy\.egg-info", + "writing dummy\.egg-info", + "writing top-level names to dummy\.egg-info", + "writing dependency_links to dummy\.egg-info", + "writing manifest file 'dummy\.egg-info", + "reading manifest file 'dummy\.egg-info", + "reading manifest template 'MANIFEST\.in'", + "writing manifest file 'dummy\.egg-info", + "creating dummy-0.1.1", + "making hard links in dummy-0\.1\.1", + "copying files to dummy-0\.1\.1", + "copying \S+ -> dummy-0\.1\.1", + "copying dummy", + "copying dummy\.egg-info", + "hard linking \S+ -> dummy-0\.1\.1", + "hard linking dummy", + "hard linking dummy\.egg-info", + "Writing dummy-0\.1\.1", + "creating dist", + "creating 'dist", + "Creating tar archive", + "running check", + "adding 'dummy-0\.1\.1", + "tar .+ dist/dummy-0\.1\.1\.tar dummy-0\.1\.1", + "gzip .+ dist/dummy-0\.1\.1\.tar", + "removing 'dummy-0\.1\.1' \\(and everything under it\\)", + ) + + print(" DIR: " + os.path.abspath('.')) + for line in datalines: + found = False + for pattern in possible: + if re.match(pattern, line): + print(" READ: " + line) + found = True + break + if not found: + raise AssertionError("Unexpexected: %s\n-in-\n%s" + % (line, data)) + + return data def test_sources(self): - soruce_test(self) + self._run() class TestSvn(environment.ZippedEnvironment): @@ -486,11 +477,11 @@ def setUp(self): if not self.base_version: raise ValueError('No SVN tools installed') - elif self.base_version < (1,3): + elif self.base_version < (1, 3): raise ValueError('Insufficient SVN Version %s' % version) - elif self.base_version >= (1,9): + elif self.base_version >= (1, 9): #trying the latest version - self.base_version = (1,8) + self.base_version = (1, 8) self.dataname = "svn%i%i_example" % self.base_version self.datafile = os.path.join('setuptools', 'tests', @@ -498,7 +489,7 @@ def setUp(self): super(TestSvn, self).setUp() def test_walksvn(self): - if self.base_version >= (1,6): + if self.base_version >= (1, 6): folder2 = 'third party2' folder3 = 'third party3' else: @@ -520,7 +511,7 @@ def test_walksvn(self): os.path.join('folder', folder2, 'Changes.txt'), os.path.join('folder', folder2, 'MD5SUMS'), os.path.join('folder', folder2, 'WatashiNiYomimasu.txt'), - os.path.join( 'folder', folder3, 'Changes.txt'), + os.path.join('folder', folder3, 'Changes.txt'), os.path.join('folder', folder3, 'fin'), os.path.join('folder', folder3, 'MD5SUMS'), os.path.join('folder', folder3, 'oops'), @@ -529,11 +520,11 @@ def test_walksvn(self): os.path.join('folder', 'third_party', 'WatashiNiYomimasu.txt'), os.path.join('folder', 'lalala.txt'), os.path.join('folder', 'quest.txt'), - #The example will have a deleted file (or should) but shouldn't return it - ]) + # The example will have a deleted file + # (or should) but shouldn't return it + ]) self.assertEqual(set(x for x in walk_revctrl()), expected) def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) - From 2988952f831be3769896f729f0d7f1ae07f6bdee Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Mon, 11 Nov 2013 18:27:52 -0600 Subject: [PATCH 1583/8469] Earlier Versions of python used gzip and tar directly. So I need to make sure they are in the paths for the legacy tests (why did it work before). Let us hope that svn is not in that directory... --- setuptools/tests/environment.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index b41e15495e..bd2c53d2a2 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -107,6 +107,15 @@ def tearDown(self): pass +def _which_dirs(cmd): + result = set() + for path in os.environ.get('PATH', '').split(os.pathsep): + filename = os.path.join(path, cmd) + if os.access(filename, os.X_OK): + result.add(path) + return result + + def run_setup_py(cmd, pypath=None, path=None, data_stream=0, env=None): """ @@ -115,22 +124,19 @@ def run_setup_py(cmd, pypath=None, path=None, """ if env is None: env = dict() + for envname in os.environ: + env[envname] = os.environ[envname] #override the python path if needed - if pypath is None: - env["PYTHONPATH"] = os.environ.get("PYTHONPATH", "") - else: + if pypath is not None: env["PYTHONPATH"] = pypath - #oeride the execution path if needed - if path is None: - env["PATH"] = os.environ.get("PATH", "") - else: - env["PATH"] = pypath - - #Apparently this might be needed in windows platforms - if "SYSTEMROOT" in os.environ: - env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + #overide the execution path if needed + if path is not None: + env["PATH"] = path + if not env.get("PATH", ""): + env["PATH"] = _which_dirs("tar").union(_which_dirs("gzip")) + env["PATH"] = os.pathsep.join(env["PATH"]) cmd = [sys.executable, "setup.py"] + list(cmd) From bc18704db50ff099b386e25fa7f3883ef3f3386b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 Nov 2013 08:14:38 -0500 Subject: [PATCH 1584/8469] Correct changelog entry. Fixes #104. --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7110e23269..865a89138f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -31,7 +31,7 @@ CHANGES * Issue #26: Add support for SVN 1.7. Special thanks to Philip Thiem for the contribution. -* Issue #94: Wheels are now distributed with every release. +* Issue #93: Wheels are now distributed with every release. * Setuptools "natural" launcher support, introduced in 1.0, is now officially supported. From 3822e3e7ad8cda5012b602f7e8f52cdd44665dd3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 09:35:20 -0500 Subject: [PATCH 1585/8469] Delint syntax --HG-- extra : amend_source : 0f58aa917ebc71efd2904638fac3838fd0b0e4dd --- setuptools/package_index.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ca228997d6..a0bb936dc5 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -920,29 +920,29 @@ def _encode_auth(auth): # strip the trailing carriage return return encoded.rstrip() -class PyPirc: +class PyPirc(object): def __init__(self): """ - Extract pypirc authentication information from home directory + Extract pypirc authentication information from home directory """ self.dict_ = {} - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): config = ConfigParser.ConfigParser({ - 'username' : '', - 'password' : '', - 'repository' : ''}) + 'username': '', + 'password': '', + 'repository': ''}) config.read(rc) for section in config.sections(): if config.get(section, 'repository').strip(): - value = '%s:%s'%(config.get(section, 'username').strip(), + value = '%s:%s' % (config.get(section, 'username').strip(), config.get(section, 'password').strip()) self.dict_[config.get(section, 'repository').strip()] = value - + def __call__(self, url): """ """ for base_url, auth in self.dict_.items(): @@ -950,7 +950,6 @@ def __call__(self, url): return auth - def open_with_auth(url, opener=urllib2.urlopen): """Open a urllib2 request, handling HTTP authentication""" @@ -968,7 +967,7 @@ def open_with_auth(url, opener=urllib2.urlopen): if not auth: auth = PyPirc()(url) - log.info('Authentication found for URL: %s'%url) + log.info('Authentication found for URL: %s' % url) if auth: auth = "Basic " + _encode_auth(auth) From b79e972b8928224516e5361342c4d2f11c83fb24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 09:44:07 -0500 Subject: [PATCH 1586/8469] Refactor for flatter code --- setuptools/package_index.py | 38 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a0bb936dc5..2e0f20920a 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -928,20 +928,30 @@ def __init__(self): """ self.dict_ = {} - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - config = ConfigParser.ConfigParser({ - 'username': '', - 'password': '', - 'repository': ''}) - config.read(rc) - - for section in config.sections(): - if config.get(section, 'repository').strip(): - value = '%s:%s' % (config.get(section, 'username').strip(), - config.get(section, 'password').strip()) - self.dict_[config.get(section, 'repository').strip()] = value + if 'HOME' not in os.environ: + return + + rc = os.path.join(os.environ['HOME'], '.pypirc') + if not os.path.exists(rc): + return + + initial = dict.fromkeys(['username', 'password', 'repository'], '') + config = ConfigParser.ConfigParser(initial) + config.read(rc) + + sections_with_repositories = [ + section for section in config.sections() + if config.get(section, 'repository').strip() + ] + + for section in sections_with_repositories: + auth = ( + config.get(section, 'username').strip(), + config.get(section, 'password').strip(), + ) + value = '%s:%s' % auth + repo = config.get(section, 'repository').strip() + self.dict_[repo] = value def __call__(self, url): """ """ From e405a2b4861216e3c6b50c79f7b26289656fdb41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 09:52:58 -0500 Subject: [PATCH 1587/8469] Extract 'Credential' class for representing a username/password credential --- setuptools/package_index.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 2e0f20920a..3154eccb05 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -920,6 +920,21 @@ def _encode_auth(auth): # strip the trailing carriage return return encoded.rstrip() +class Credential(object): + """ + A username/password pair. Use like a namedtuple. + """ + def __init__(self, username, password): + self.username = username + self.password = password + + def __iter__(self): + yield self.username + yield self.password + + def __str__(self): + return '%(username)s:%(password)s' % vars(self) + class PyPirc(object): def __init__(self): @@ -945,13 +960,12 @@ def __init__(self): ] for section in sections_with_repositories: - auth = ( + cred = Credential( config.get(section, 'username').strip(), config.get(section, 'password').strip(), ) - value = '%s:%s' % auth repo = config.get(section, 'repository').strip() - self.dict_[repo] = value + self.dict_[repo] = cred def __call__(self, url): """ """ @@ -976,7 +990,7 @@ def open_with_auth(url, opener=urllib2.urlopen): auth = None if not auth: - auth = PyPirc()(url) + auth = str(PyPirc()(url)) log.info('Authentication found for URL: %s' % url) if auth: From fccf9357c484e4b475348dfbef321e544e2a3cab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 09:56:22 -0500 Subject: [PATCH 1588/8469] Use 'expanduser' for better compatibilty. --- setuptools/package_index.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3154eccb05..5f328a03c6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -943,10 +943,7 @@ def __init__(self): """ self.dict_ = {} - if 'HOME' not in os.environ: - return - - rc = os.path.join(os.environ['HOME'], '.pypirc') + rc = os.path.join(os.path.expanduser('~'), '.pypirc') if not os.path.exists(rc): return From bf742c3f6069802d26c09118dd6c36d55634e22d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:08:50 -0500 Subject: [PATCH 1589/8469] Derive PyPirc from ConfigParser for more general purpose use. --- setuptools/package_index.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5f328a03c6..5b8dc35704 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -935,34 +935,35 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPirc(object): +class PyPirc(ConfigParser.ConfigParser): def __init__(self): """ - Extract pypirc authentication information from home directory + Load from ~/.pypirc """ - self.dict_ = {} + defaults = dict.fromkeys(['username', 'password', 'repository'], '') + super(PyPirc, self).__init__(defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') - if not os.path.exists(rc): - return - - initial = dict.fromkeys(['username', 'password', 'repository'], '') - config = ConfigParser.ConfigParser(initial) - config.read(rc) + if os.path.exists(rc): + self.read(rc) + @property + def dict_(self): + dict_ = {} sections_with_repositories = [ - section for section in config.sections() - if config.get(section, 'repository').strip() + section for section in self.sections() + if self.get(section, 'repository').strip() ] for section in sections_with_repositories: cred = Credential( - config.get(section, 'username').strip(), - config.get(section, 'password').strip(), + self.get(section, 'username').strip(), + self.get(section, 'password').strip(), ) - repo = config.get(section, 'repository').strip() - self.dict_[repo] = cred + repo = self.get(section, 'repository').strip() + dict_[repo] = cred + return dict_ def __call__(self, url): """ """ From b7ee88761b75f2c63eb5553f7b28e5e8a88be186 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:20:22 -0500 Subject: [PATCH 1590/8469] Replaced __call__ with find_credential (for clarity of purpose). Removed dict_. --- setuptools/package_index.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5b8dc35704..c63ae29a35 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -949,8 +949,8 @@ def __init__(self): self.read(rc) @property - def dict_(self): - dict_ = {} + def creds_by_repository(self): + creds = {} sections_with_repositories = [ section for section in self.sections() if self.get(section, 'repository').strip() @@ -962,14 +962,17 @@ def dict_(self): self.get(section, 'password').strip(), ) repo = self.get(section, 'repository').strip() - dict_[repo] = cred - return dict_ + creds[repo] = cred + return creds - def __call__(self, url): - """ """ - for base_url, auth in self.dict_.items(): - if url.startswith(base_url): - return auth + def find_credential(self, url): + """ + If the URL indicated appears to be a repository defined in this + config, return the credential for that repository. + """ + for repository, cred in self.creds_by_repository.items(): + if url.startswith(repository): + return cred def open_with_auth(url, opener=urllib2.urlopen): @@ -988,8 +991,10 @@ def open_with_auth(url, opener=urllib2.urlopen): auth = None if not auth: - auth = str(PyPirc()(url)) - log.info('Authentication found for URL: %s' % url) + cred = PyPirc().find_credential(url) + if cred: + auth = str(cred) + log.info('Authentication found for URL: %s' % url) if auth: auth = "Basic " + _encode_auth(auth) From 113f55577768c9434b33b799521e4f70fdecd8de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:22:59 -0500 Subject: [PATCH 1591/8469] Get ConfigParser module from compat module for Python 3 compatibility. --- setuptools/package_index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index c63ae29a35..482ba38b40 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -6,8 +6,6 @@ import socket import base64 -import ConfigParser - from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, require, Environment, find_distributions, safe_name, safe_version, @@ -19,7 +17,8 @@ from setuptools.compat import (urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote, splituser, url2pathname, name2codepoint, - unichr, urljoin, urlsplit, urlunsplit) + unichr, urljoin, urlsplit, urlunsplit, + ConfigParser) from setuptools.compat import filterfalse from fnmatch import translate from setuptools.py24compat import hashlib From 117a8a57a9a06521f028eb4e1afc1f6fd4dd8dc8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:28:27 -0500 Subject: [PATCH 1592/8469] Construct the 'creds' dictionary directly rather than building imperatively. --- setuptools/package_index.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 482ba38b40..0a409604ce 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -949,20 +949,19 @@ def __init__(self): @property def creds_by_repository(self): - creds = {} sections_with_repositories = [ section for section in self.sections() if self.get(section, 'repository').strip() ] - for section in sections_with_repositories: - cred = Credential( - self.get(section, 'username').strip(), - self.get(section, 'password').strip(), - ) - repo = self.get(section, 'repository').strip() - creds[repo] = cred - return creds + return dict(map(self._get_repo_cred, sections_with_repositories)) + + def _get_repo_cred(self, section): + repo = self.get(section, 'repository').strip() + return repo, Credential( + self.get(section, 'username').strip(), + self.get(section, 'password').strip(), + ) def find_credential(self, url): """ From 75345928c3e2cb0f88cdf44d33752e1ed6b19290 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:29:59 -0500 Subject: [PATCH 1593/8469] Renamed class for proper capitalization and for clarity. --- setuptools/package_index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0a409604ce..a61d3c743b 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -934,14 +934,14 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPirc(ConfigParser.ConfigParser): +class PyPIConfig(ConfigParser.ConfigParser): def __init__(self): """ Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - super(PyPirc, self).__init__(defaults) + super(PyPIConfig, self).__init__(defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): @@ -989,7 +989,7 @@ def open_with_auth(url, opener=urllib2.urlopen): auth = None if not auth: - cred = PyPirc().find_credential(url) + cred = PyPIConfig().find_credential(url) if cred: auth = str(cred) log.info('Authentication found for URL: %s' % url) From cee7279fb782fd97b8e7ce06642054ee45ca0564 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:34:14 -0500 Subject: [PATCH 1594/8469] Updated message when credentials used from .pypirc --- setuptools/package_index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a61d3c743b..231311ec4d 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -992,7 +992,8 @@ def open_with_auth(url, opener=urllib2.urlopen): cred = PyPIConfig().find_credential(url) if cred: auth = str(cred) - log.info('Authentication found for URL: %s' % url) + info = cred.username, url + log.info('Authenticating as %s for %s (from .pypirc)' % info) if auth: auth = "Basic " + _encode_auth(auth) From 915b99c8440fe0aa04609ce249a0e845f5b97e44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 10:39:19 -0500 Subject: [PATCH 1595/8469] Updated documentation on .pypirc support for credentials. --- docs/easy_install.txt | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index ffe6a268e6..a56dee496c 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -454,30 +454,15 @@ You can do this with both index page URLs and direct download URLs. As long as any HTML pages read by easy_install use *relative* links to point to the downloads, the same user ID and password will be used to do the downloading. -Authentication against privat repository ----------------------------------------- - -To get these things running. You need a .pypirc file in your home directory. The file should has the following format. - -Example - -:: - - [distutils] - index-servers = myrepos - - [myrepos] - repository: http://myrepos.com - username:MY_USER - password:MY_PASSORD - -In your buildout.cfg you have to add the eggserver url under find-links. The example is for an mypypi egg server. /eggs provides a flat package list. - -Example - -:: +Using .pypirc Credentials +------------------------- - find-links = http://myrepos.com/eggs +In additional to supplying credentials in the URL, ``easy_install`` will also +honor credentials if present in the .pypirc file. Teams maintaining a private +repository of packages may already have defined access credentials for +uploading packages according to the distutils documentation. ``easy_install`` +will attempt to honor those if present. Refer to the distutils documentation +for Python 2.5 or later for details on the syntax. Controlling Build Options ~~~~~~~~~~~~~~~~~~~~~~~~~ From 9b316f1fa946fa24d770ba8c03dcfeec700d37cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 14:48:29 -0500 Subject: [PATCH 1596/8469] ConfigParser is not a new style class. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 26d1d4add3..bc276a26fe 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -943,7 +943,7 @@ def __init__(self): Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - super(PyPIConfig, self).__init__(defaults) + ConfigParser.ConfigParser.__init__(self, defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): From 79f4299c37142ecc9643e38632ab8ee6695e0f65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 14:58:07 -0500 Subject: [PATCH 1597/8469] Updated changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 865a89138f..c991f221eb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +1.4 +--- + +* Issue #27: ``easy_install`` will now use credentials from .pypirc if + present for connecting to the package index. + ----- 1.3.2 ----- From 8b1bf6c0d690e91c095a2390592fb31ccf2294cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:00:11 -0500 Subject: [PATCH 1598/8469] Bumped to 1.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0057e2750b..72d35a5b42 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.3.3" +DEFAULT_VERSION = "1.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 07f744ca5d..0f663085de 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.3.3' +__version__ = '1.4' From c743916e11ca05fa36882346adba1434a696b8ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:00:28 -0500 Subject: [PATCH 1599/8469] Added tag 1.4b1 for changeset 0d1bdb99a535 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b0b1a80723..27fc93b6fa 100644 --- a/.hgtags +++ b/.hgtags @@ -106,3 +106,4 @@ cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 19873119647deae8a68e9ed683317b9ee170a8d8 1.3 a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 076b472a9e3f840021e9d5509878337e6e5fcd89 1.3.2 +0d1bdb99a535a2c7ed4edd37141fb0b54348b713 1.4b1 From 7ade322c4e685aef1adab02ca3bad6444acc2466 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:12:31 -0500 Subject: [PATCH 1600/8469] Update docstring to reflect failure reported in pull request #21 --- setuptools/package_index.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index bc276a26fe..2e8f62e222 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -908,8 +908,13 @@ def _encode_auth(auth): """ A function compatible with Python 2.3-3.3 that will encode auth from a URL suitable for an HTTP header. - >>> _encode_auth('username%3Apassword') - u'dXNlcm5hbWU6cGFzc3dvcmQ=' + >>> str(_encode_auth('username%3Apassword')) + 'dXNlcm5hbWU6cGFzc3dvcmQ=' + + Long auth strings should not cause a newline to be inserted. + >>> long_auth = 'username:' + 'password'*10 + >>> chr(10) in str(_encode_auth(long_auth)) + False """ auth_s = unquote(auth) # convert to bytes From 79a0eec1af142ea63590187bfffc1b48de633e97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:16:51 -0500 Subject: [PATCH 1601/8469] Add support for linking Pull Requests in changelog. --HG-- extra : rebase_source : f94412eefa4bf0f073a8ee30821dfc5a7a6f0d8a --- release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.py b/release.py index f4dff0d29d..3dbfac24ba 100644 --- a/release.py +++ b/release.py @@ -33,6 +33,7 @@ def after_push(): link_patterns = [ r"(Issue )?#(?P\d+)", + r"Pull Request ?#(?P\d+)", r"Distribute #(?P\d+)", r"Buildout #(?P\d+)", r"Old Setuptools #(?P\d+)", @@ -41,6 +42,8 @@ def after_push(): ] issue_urls = dict( + pull_request='https://bitbucket.org' + '/pypa/setuptools/pull-request/{pull_request}', issue='https://bitbucket.org/pypa/setuptools/issue/{issue}', distribute='https://bitbucket.org/tarek/distribute/issue/{distribute}', buildout='https://github.com/buildout/buildout/issues/{buildout}', From 3f0364fcc1b6f183f81f7e8774b6de803638b209 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Nov 2013 15:19:19 -0500 Subject: [PATCH 1602/8469] Update changelog for Pull Request #21. --HG-- extra : rebase_source : d89b8c105bd561122c6ae8d9b302db6f0eb6060c --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c991f221eb..e515f3bba6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Issue #27: ``easy_install`` will now use credentials from .pypirc if present for connecting to the package index. +* Pull Request #21: Omit unwanted newlines in ``package_index._encode_auth`` + when the username/password pair length indicates wrapping. ----- 1.3.2 From 6a5be25a5dad39bbba71aa2bd1ccb479e9e7814c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Nov 2013 10:05:02 -0500 Subject: [PATCH 1603/8469] Issue #108: Make a note about current limitations of setuptools wheels. --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index e515f3bba6..e23fa69236 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,7 +40,10 @@ CHANGES * Issue #26: Add support for SVN 1.7. Special thanks to Philip Thiem for the contribution. -* Issue #93: Wheels are now distributed with every release. +* Issue #93: Wheels are now distributed with every release. Note that as + reported in Issue #108, as of Pip 1.4, scripts aren't installed properly + from wheels. Therefore, if using Pip to install setuptools from a wheel, + the ``easy_install`` command will not be available. * Setuptools "natural" launcher support, introduced in 1.0, is now officially supported. From e72a9f07fc35f140531fb917a83962fc508a210e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Nov 2013 10:06:02 -0500 Subject: [PATCH 1604/8469] Added tag 1.4 for changeset a13f8c18ce74 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 27fc93b6fa..146ccec892 100644 --- a/.hgtags +++ b/.hgtags @@ -107,3 +107,4 @@ cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 076b472a9e3f840021e9d5509878337e6e5fcd89 1.3.2 0d1bdb99a535a2c7ed4edd37141fb0b54348b713 1.4b1 +a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 From 5219786775784fe0f8c3742e37e1889ad2c2307f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Nov 2013 10:06:32 -0500 Subject: [PATCH 1605/8469] Bumped to 1.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 10 ++-- setuptools/version.py | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 72d35a5b42..e611b05f5d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.4" +DEFAULT_VERSION = "1.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index fb38112eb7..0d2df68264 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[distutils.setup_keywords] +convert_2to3_doctests = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +entry_points = setuptools.dist:check_entry_points +include_package_data = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +zip_safe = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +packages = setuptools.dist:check_packages +install_requires = setuptools.dist:check_requirements +eager_resources = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list + [egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg 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 +PKG-INFO = setuptools.command.egg_info:write_pkg_info +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + [distutils.commands] -install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias build_ext = setuptools.command.build_ext:build_ext +rotate = setuptools.command.rotate:rotate +install = setuptools.command.install:install +easy_install = setuptools.command.easy_install:easy_install setopt = setuptools.command.setopt:setopt +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm install_lib = setuptools.command.install_lib:install_lib bdist_egg = setuptools.command.bdist_egg:bdist_egg -sdist = setuptools.command.sdist:sdist -easy_install = setuptools.command.easy_install:easy_install -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst test = setuptools.command.test:test -develop = setuptools.command.develop:develop -alias = setuptools.command.alias:alias -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register -install = setuptools.command.install:install +egg_info = setuptools.command.egg_info:egg_info install_scripts = setuptools.command.install_scripts:install_scripts -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm build_py = setuptools.command.build_py:build_py -rotate = setuptools.command.rotate:rotate - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data -extras_require = setuptools.dist:check_extras -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -packages = setuptools.dist:check_packages -zip_safe = setuptools.dist:assert_bool -include_package_data = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +saveopts = setuptools.command.saveopts:saveopts +upload_docs = setuptools.command.upload_docs:upload_docs +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop +install_egg_info = setuptools.command.install_egg_info:install_egg_info diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 221040f812..e7f0f3b867 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32'] +wincertstore==0.1 + [ssl:python_version in '2.4, 2.5'] ssl==1.16 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [certs] certifi==0.0.8 -[ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 0f663085de..fcb6b5dc0d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.4' +__version__ = '1.5' From f5cd7f424d0432cbca7d31648702249f2e76b087 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Thu, 21 Nov 2013 14:01:42 +0000 Subject: [PATCH 1606/8469] Made a more sophisticated encoding heuristic that runs at module load. --- setuptools/svn_utils.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 224d11ea53..98a1ff2e1e 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -5,6 +5,7 @@ import xml.dom.pulldom import shlex import locale +import codecs import unicodedata import warnings from setuptools.compat import unicode, bytes @@ -72,6 +73,32 @@ def joinpath(prefix, *suffix): return os.path.join(*suffix) return os.path.join(prefix, *suffix) +def determine_console_encoding(): + try: + #try for the preferred encoding + encoding = locale.getpreferredencoding() + + #see if the locale.getdefaultlocale returns null + #some versions of python\platforms return US-ASCII + #when it cannot determine an encoding + if not encoding or encoding == "US-ASCII": + encoding = locale.getdefaultlocale()[1] + + if encoding: + codecs.lookup(encoding) # make sure a lookup error is not made + + except locale.Error, LookupError: + encoding = None + + #olders pythons defaulted to this + if not encoding: + return "US-ASCII" + elif encoding.startswith("mac-") and os.platform == "darwin": + return "utf-8" + else: + return encoding + +_console_encoding = determine_console_encoding() def decode_as_string(text, encoding=None): """ @@ -87,7 +114,7 @@ def decode_as_string(text, encoding=None): #text should be a byte string if encoding is None: - encoding = locale.getpreferredencoding() + encoding = _console_encoding if not isinstance(text, unicode): text = text.decode(encoding) From 3f5053737eaf08ad854d40d23743f701d3bbdcc9 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Thu, 21 Nov 2013 14:11:23 +0000 Subject: [PATCH 1607/8469] small syntax error. --- setuptools/svn_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 98a1ff2e1e..93ddb292be 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -87,7 +87,7 @@ def determine_console_encoding(): if encoding: codecs.lookup(encoding) # make sure a lookup error is not made - except locale.Error, LookupError: + except (locale.Error, LookupError): encoding = None #olders pythons defaulted to this From 73c86d052de82327bdd0e22dd35de55f78d4186b Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 21 Nov 2013 17:25:55 -0600 Subject: [PATCH 1608/8469] forgot to add in the mac default. --- setuptools/svn_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 93ddb292be..e8570e5244 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -91,9 +91,12 @@ def determine_console_encoding(): encoding = None #olders pythons defaulted to this + is_osx = sys.platform == "darwin" if not encoding: - return "US-ASCII" - elif encoding.startswith("mac-") and os.platform == "darwin": + return ["utf-8", "US-ASCII"][is_osx] + elif encoding.startswith("mac-") and is_osx: + #certain version of pythons would return mac-roman as default + #OSX as a left over of earlier mac versions. return "utf-8" else: return encoding From 4319a969dc616c915d8e5091246df5faf0b080e8 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Thu, 21 Nov 2013 23:50:50 +0000 Subject: [PATCH 1609/8469] small logic error --- setuptools/svn_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index e8570e5244..f0960da622 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -93,7 +93,7 @@ def determine_console_encoding(): #olders pythons defaulted to this is_osx = sys.platform == "darwin" if not encoding: - return ["utf-8", "US-ASCII"][is_osx] + return ["US-ASCII", "utf-8"][is_osx] elif encoding.startswith("mac-") and is_osx: #certain version of pythons would return mac-roman as default #OSX as a left over of earlier mac versions. From cc90c5093d272397f08e33e4e75bf762d419df27 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Fri, 22 Nov 2013 00:51:45 +0000 Subject: [PATCH 1610/8469] extraneous comment left in --- setuptools/svn_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index f0960da622..0d65bd30eb 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -90,12 +90,11 @@ def determine_console_encoding(): except (locale.Error, LookupError): encoding = None - #olders pythons defaulted to this is_osx = sys.platform == "darwin" if not encoding: return ["US-ASCII", "utf-8"][is_osx] elif encoding.startswith("mac-") and is_osx: - #certain version of pythons would return mac-roman as default + #certain versions of python would return mac-roman as default #OSX as a left over of earlier mac versions. return "utf-8" else: From 63f856f5797afb3497818820f038c00ed10c0518 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 16:39:09 -0500 Subject: [PATCH 1611/8469] Use sys.getfilesystemencoding for decoding bdist_wininst config. Fixes #114. --- CHANGES.txt | 7 +++++++ setuptools/command/easy_install.py | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e23fa69236..9190aee290 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +1.4.1 +----- + +* Issue #114: Use ``sys.getfilesystemencoding`` for decoding config in + ``bdist_wininst`` distributions. + --- 1.4 --- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6ce19fa4df..d329f4cb50 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1373,10 +1373,9 @@ def extract_wininst_cfg(dist_filename): else: null_byte = chr(0) config = part.split(null_byte, 1)[0] - # Now the config is in bytes, but on Python 3, it must be - # unicode for the RawConfigParser, so decode it. Is this the - # right encoding? - config = config.decode('ascii') + # Now the config is in bytes, but for RawConfigParser, it should + # be text, so decode it. + config = config.decode(sys.getfilesystemencoding()) cfg.readfp(StringIO(config)) except ConfigParser.Error: return None From ed7e0cc37c7a3f451092783a8f68c5773a4c32e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 17:45:01 -0500 Subject: [PATCH 1612/8469] Update changelog. Fixes #105 and Fixes #113. --HG-- extra : amend_source : 10cadb252bc504ef25c9f9cf7f3cdc5bf03fd367 --- CHANGES.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9190aee290..b20d16839c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,29 @@ CHANGES * Issue #114: Use ``sys.getfilesystemencoding`` for decoding config in ``bdist_wininst`` distributions. +* Issue #105 and Issue #113: Establish a more robust technique for + determining the terminal encoding:: + + 1. Try ``getpreferredencoding`` + 2. If that returns US_ASCII or None, try the encoding from + ``getdefaultlocale``. If that encoding was a "fallback" because Python + could not figure it out from the environment or OS, encoding remains + unresolved. + 3. If the encoding is resolved, then make sure Python actually implements + the encoding. + 4. On the event of an error or unknown codec, revert to fallbacks + (UTF-8 on Darwin, ASCII on everything else). + 5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was + a bug on older Python releases. + + On a side note, it would seem that the encoding only matters for when SVN + does not yet support ``--xml`` and when getting repository and svn version + numbers. The ``--xml`` technique should yield UTF-8 according to some + messages on the SVN mailing lists. So if the version numbers are always + 7-bit ASCII clean, it may be best to only support the file parsing methods + for legacy SVN releases and support for SVN without the subprocess command + would simple go away as support for the older SVNs does. + --- 1.4 --- From d0fd5b0ea208361970897485deb5fac5b9a23224 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 17:50:44 -0500 Subject: [PATCH 1613/8469] Travis has dropped support for Python 2.5 (http://about.travis-ci.org/blog/2013-11-18-upcoming-build-environment-updates/). --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b684935f92..e13a5d4fde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 2.5 - 2.6 - 2.7 - 3.2 From 49860a858af9ba68fc332ef914ae650c843e62d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 17:53:20 -0500 Subject: [PATCH 1614/8469] Bumped to 1.4.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e611b05f5d..79e0896258 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.5" +DEFAULT_VERSION = "1.4.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index fcb6b5dc0d..8e3c933cd0 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.5' +__version__ = '1.4.1' From 617ffd19b3e13b46c1ab849ae394fb0ce8a0f6a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 17:53:23 -0500 Subject: [PATCH 1615/8469] Added tag 1.4.1 for changeset 9a5f26d7df8e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 146ccec892..c01565ac3d 100644 --- a/.hgtags +++ b/.hgtags @@ -108,3 +108,4 @@ a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 076b472a9e3f840021e9d5509878337e6e5fcd89 1.3.2 0d1bdb99a535a2c7ed4edd37141fb0b54348b713 1.4b1 a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 +9a5f26d7df8ef779cb5f40cc0389343fb4c61365 1.4.1 From 1e811c32250676cc83e79e4063d5420eb72a8f83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2013 17:53:50 -0500 Subject: [PATCH 1616/8469] Bumped to 1.4.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 66 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 10 ++--- setuptools/version.py | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 79e0896258..9dc2c8729b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.4.1" +DEFAULT_VERSION = "1.4.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 0d2df68264..2bf6c8ce4e 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ [distutils.setup_keywords] +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras +install_requires = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +use_2to3 = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -entry_points = setuptools.dist:check_entry_points +zip_safe = setuptools.dist:assert_bool include_package_data = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool use_2to3_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras packages = setuptools.dist:check_packages -install_requires = setuptools.dist:check_requirements -eager_resources = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +package_data = setuptools.dist:check_package_data dependency_links = setuptools.dist:assert_string_list exclude_package_data = setuptools.dist:check_package_data -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list [egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg top_level.txt = setuptools.command.egg_info:write_toplevel_names -PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete +entry_points.txt = setuptools.command.egg_info:write_entries +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg dependency_links.txt = setuptools.command.egg_info:overwrite_arg - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.commands] -alias = setuptools.command.alias:alias -build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist rotate = setuptools.command.rotate:rotate -install = setuptools.command.install:install -easy_install = setuptools.command.easy_install:easy_install -setopt = setuptools.command.setopt:setopt -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_lib = setuptools.command.install_lib:install_lib -bdist_egg = setuptools.command.bdist_egg:bdist_egg test = setuptools.command.test:test -register = setuptools.command.register:register -egg_info = setuptools.command.egg_info:egg_info -install_scripts = setuptools.command.install_scripts:install_scripts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm build_py = setuptools.command.build_py:build_py -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst saveopts = setuptools.command.saveopts:saveopts +build_ext = setuptools.command.build_ext:build_ext +install_lib = setuptools.command.install_lib:install_lib +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +easy_install = setuptools.command.easy_install:easy_install +register = setuptools.command.register:register +alias = setuptools.command.alias:alias +install = setuptools.command.install:install upload_docs = setuptools.command.upload_docs:upload_docs -sdist = setuptools.command.sdist:sdist develop = setuptools.command.develop:develop +install_scripts = setuptools.command.install_scripts:install_scripts +egg_info = setuptools.command.egg_info:egg_info install_egg_info = setuptools.command.install_egg_info:install_egg_info +setopt = setuptools.command.setopt:setopt +bdist_egg = setuptools.command.bdist_egg:bdist_egg diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e7f0f3b867..e4fb4954ff 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [ssl:sys_platform=='win32'] wincertstore==0.1 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 - [certs] certifi==0.0.8 -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 \ No newline at end of file +[ssl:python_version in '2.4, 2.5'] +ssl==1.16 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 8e3c933cd0..98d186bed7 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.4.1' +__version__ = '1.4.2' From dbe5fff6e83e67c7249c38ab4bde5d70e80e5ad0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:00:15 -0500 Subject: [PATCH 1617/8469] Drop support for Python 2.5 and Python 2.4. Fixes #41. --- CHANGES.txt | 7 +++++++ docs/easy_install.txt | 2 +- docs/pkg_resources.txt | 2 +- docs/setuptools.txt | 6 +++--- ez_setup.py | 2 +- pkg_resources.py | 2 +- setup.py | 8 -------- setuptools/version.py | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b20d16839c..1331de955d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +2.0 +--- + +* Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring + setuptools for those versions of Python should use setuptools 1.x. + ----- 1.4.1 ----- diff --git a/docs/easy_install.txt b/docs/easy_install.txt index a69ddd59f1..6739ba16ad 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -35,7 +35,7 @@ Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. -You will need at least Python 2.4. An ``easy_install`` script will be +You will need at least Python 2.6. An ``easy_install`` script will be installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 3aac47203f..8dd3e9abda 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -975,7 +975,7 @@ parsed_version py_version The major/minor Python version the distribution supports, as a string. - For example, "2.3" or "2.4". The default is the current version of Python. + For example, "2.7" or "3.4". The default is the current version of Python. platform A string representing the platform the distribution is intended for, or diff --git a/docs/setuptools.txt b/docs/setuptools.txt index dfa9ecdd1c..9bc8ea44b2 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -3,9 +3,9 @@ Building and Distributing Packages with Setuptools ================================================== ``Setuptools`` is a collection of enhancements to the Python ``distutils`` -(for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum -of Python 2.4) that allow you to more easily build and distribute Python -packages, especially ones that have dependencies on other packages. +(for Python 2.6 and up) that allow developers to more easily build and +distribute Python packages, especially ones that have dependencies on other +packages. Packages built and distributed using ``setuptools`` look to the user like ordinary Python packages based on the ``distutils``. Your users don't need to diff --git a/ez_setup.py b/ez_setup.py index 9dc2c8729b..a6f4815850 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.4.2" +DEFAULT_VERSION = "2.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/pkg_resources.py b/pkg_resources.py index 0297601629..2c19898bc1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -716,7 +716,7 @@ def __init__(self, search_path=None, platform=get_supported_platform(), python=P `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. ``'2.4'``); + optional string naming the desired version of Python (e.g. ``'3.3'``); it defaults to the current version. You may explicitly set `platform` (and/or `python`) to ``None`` if you diff --git a/setup.py b/setup.py index d08d714420..97cc68d019 100755 --- a/setup.py +++ b/setup.py @@ -169,8 +169,6 @@ def run(self): License :: OSI Approved :: Python Software Foundation License License :: OSI Approved :: Zope Public License Operating System :: OS Independent - Programming Language :: Python :: 2.4 - Programming Language :: Python :: 2.5 Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 @@ -184,17 +182,11 @@ def run(self): """).strip().splitlines(), extras_require = { "ssl:sys_platform=='win32'": "wincertstore==0.1", - "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2", - "ssl:python_version in '2.4, 2.5'":"ssl==1.16", "certs": "certifi==0.0.8", }, dependency_links = [ 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', - 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', - 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc', - 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5', - 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b', ], scripts = [], # tests_require = "setuptools[ssl]", diff --git a/setuptools/version.py b/setuptools/version.py index 98d186bed7..3b3dacb9af 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.4.2' +__version__ = '2.0' From 47e5462bc732ffd5f363b4a60d5a6dd9efa0af3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:07:33 -0500 Subject: [PATCH 1618/8469] Remove py24compat module --- setuptools/_backport/__init__.py | 0 setuptools/_backport/hashlib/__init__.py | 146 --------- setuptools/_backport/hashlib/_sha.py | 359 ----------------------- setuptools/_backport/hashlib/_sha256.py | 260 ---------------- setuptools/_backport/hashlib/_sha512.py | 288 ------------------ setuptools/package_index.py | 4 +- 6 files changed, 2 insertions(+), 1055 deletions(-) delete mode 100644 setuptools/_backport/__init__.py delete mode 100644 setuptools/_backport/hashlib/__init__.py delete mode 100644 setuptools/_backport/hashlib/_sha.py delete mode 100644 setuptools/_backport/hashlib/_sha256.py delete mode 100644 setuptools/_backport/hashlib/_sha512.py diff --git a/setuptools/_backport/__init__.py b/setuptools/_backport/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/setuptools/_backport/hashlib/__init__.py b/setuptools/_backport/hashlib/__init__.py deleted file mode 100644 index 5aeab496af..0000000000 --- a/setuptools/_backport/hashlib/__init__.py +++ /dev/null @@ -1,146 +0,0 @@ -# $Id$ -# -# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) -# Licensed to PSF under a Contributor Agreement. -# - -__doc__ = """hashlib module - A common interface to many hash functions. - -new(name, string='') - returns a new hash object implementing the - given hash function; initializing the hash - using the given string data. - -Named constructor functions are also available, these are much faster -than using new(): - -md5(), sha1(), sha224(), sha256(), sha384(), and sha512() - -More algorithms may be available on your platform but the above are -guaranteed to exist. - -NOTE: If you want the adler32 or crc32 hash functions they are available in -the zlib module. - -Choose your hash function wisely. Some have known collision weaknesses. -sha384 and sha512 will be slow on 32 bit platforms. - -Hash objects have these methods: - - update(arg): Update the hash object with the string arg. Repeated calls - are equivalent to a single call with the concatenation of all - the arguments. - - digest(): Return the digest of the strings passed to the update() method - so far. This may contain non-ASCII characters, including - NUL bytes. - - hexdigest(): Like digest() except the digest is returned as a string of - double length, containing only hexadecimal digits. - - copy(): Return a copy (clone) of the hash object. This can be used to - efficiently compute the digests of strings that share a common - initial substring. - -For example, to obtain the digest of the string 'Nobody inspects the -spammish repetition': - - >>> import hashlib - >>> m = hashlib.md5() - >>> m.update("Nobody inspects") - >>> m.update(" the spammish repetition") - >>> m.digest() - '\\xbbd\\x9c\\x83\\xdd\\x1e\\xa5\\xc9\\xd9\\xde\\xc9\\xa1\\x8d\\xf0\\xff\\xe9' - -More condensed: - - >>> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest() - 'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2' - -""" - -# This tuple and __get_builtin_constructor() must be modified if a new -# always available algorithm is added. -__always_supported = ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512') - -algorithms = __always_supported - -__all__ = __always_supported + ('new', 'algorithms') - - -def __get_builtin_constructor(name): - try: - if name in ('SHA1', 'sha1'): - import _sha - return _sha.new - elif name in ('MD5', 'md5'): - import md5 - return md5.new - elif name in ('SHA256', 'sha256', 'SHA224', 'sha224'): - import _sha256 - bs = name[3:] - if bs == '256': - return _sha256.sha256 - elif bs == '224': - return _sha256.sha224 - elif name in ('SHA512', 'sha512', 'SHA384', 'sha384'): - import _sha512 - bs = name[3:] - if bs == '512': - return _sha512.sha512 - elif bs == '384': - return _sha512.sha384 - except ImportError: - pass # no extension module, this hash is unsupported. - - raise ValueError('unsupported hash type %s' % name) - - -def __get_openssl_constructor(name): - try: - f = getattr(_hashlib, 'openssl_' + name) - # Allow the C module to raise ValueError. The function will be - # defined but the hash not actually available thanks to OpenSSL. - f() - # Use the C function directly (very fast) - return f - except (AttributeError, ValueError): - return __get_builtin_constructor(name) - - -def __py_new(name, string=''): - """new(name, string='') - Return a new hashing object using the named algorithm; - optionally initialized with a string. - """ - return __get_builtin_constructor(name)(string) - - -def __hash_new(name, string=''): - """new(name, string='') - Return a new hashing object using the named algorithm; - optionally initialized with a string. - """ - try: - return _hashlib.new(name, string) - except ValueError: - # If the _hashlib module (OpenSSL) doesn't support the named - # hash, try using our builtin implementations. - # This allows for SHA224/256 and SHA384/512 support even though - # the OpenSSL library prior to 0.9.8 doesn't provide them. - return __get_builtin_constructor(name)(string) - - -try: - import _hashlib - new = __hash_new - __get_hash = __get_openssl_constructor -except ImportError: - new = __py_new - __get_hash = __get_builtin_constructor - -for __func_name in __always_supported: - # try them all, some may not work due to the OpenSSL - # version not supporting that algorithm. - try: - globals()[__func_name] = __get_hash(__func_name) - except ValueError: - import logging - logging.exception('code for hash %s was not found.', __func_name) - -# Cleanup locals() -del __always_supported, __func_name, __get_hash -del __py_new, __hash_new, __get_openssl_constructor diff --git a/setuptools/_backport/hashlib/_sha.py b/setuptools/_backport/hashlib/_sha.py deleted file mode 100644 index d49993c887..0000000000 --- a/setuptools/_backport/hashlib/_sha.py +++ /dev/null @@ -1,359 +0,0 @@ -# -*- coding: iso-8859-1 -*- -"""A sample implementation of SHA-1 in pure Python. - - Framework adapted from Dinu Gherman's MD5 implementation by - J. Hallén and L. Creighton. SHA-1 implementation based directly on - the text of the NIST standard FIPS PUB 180-1. -""" - - -__date__ = '2004-11-17' -__version__ = 0.91 # Modernised by J. Hallén and L. Creighton for Pypy - - -import struct, copy - - -# ====================================================================== -# Bit-Manipulation helpers -# -# _long2bytes() was contributed by Barry Warsaw -# and is reused here with tiny modifications. -# ====================================================================== - -def _long2bytesBigEndian(n, blocksize=0): - """Convert a long integer to a byte string. - - If optional blocksize is given and greater than zero, pad the front - of the byte string with binary zeros so that the length is a multiple - of blocksize. - """ - - # After much testing, this algorithm was deemed to be the fastest. - s = '' - pack = struct.pack - while n > 0: - s = pack('>I', n & 0xffffffff) + s - n = n >> 32 - - # Strip off leading zeros. - for i in range(len(s)): - if s[i] != '\000': - break - else: - # Only happens when n == 0. - s = '\000' - i = 0 - - s = s[i:] - - # Add back some pad bytes. This could be done more efficiently - # w.r.t. the de-padding being done above, but sigh... - if blocksize > 0 and len(s) % blocksize: - s = (blocksize - len(s) % blocksize) * '\000' + s - - return s - - -def _bytelist2longBigEndian(list): - "Transform a list of characters into a list of longs." - - imax = len(list) // 4 - hl = [0] * imax - - j = 0 - i = 0 - while i < imax: - b0 = ord(list[j]) << 24 - b1 = ord(list[j+1]) << 16 - b2 = ord(list[j+2]) << 8 - b3 = ord(list[j+3]) - hl[i] = b0 | b1 | b2 | b3 - i = i+1 - j = j+4 - - return hl - - -def _rotateLeft(x, n): - "Rotate x (32 bit) left n bits circularly." - - return (x << n) | (x >> (32-n)) - - -# ====================================================================== -# The SHA transformation functions -# -# ====================================================================== - -def f0_19(B, C, D): - return (B & C) | ((~ B) & D) - -def f20_39(B, C, D): - return B ^ C ^ D - -def f40_59(B, C, D): - return (B & C) | (B & D) | (C & D) - -def f60_79(B, C, D): - return B ^ C ^ D - - -f = [f0_19, f20_39, f40_59, f60_79] - -# Constants to be used -K = [ - 0x5A827999, # ( 0 <= t <= 19) - 0x6ED9EBA1, # (20 <= t <= 39) - 0x8F1BBCDC, # (40 <= t <= 59) - 0xCA62C1D6 # (60 <= t <= 79) - ] - -class sha: - "An implementation of the MD5 hash function in pure Python." - - digest_size = digestsize = 20 - block_size = 1 - - def __init__(self): - "Initialisation." - - # Initial message length in bits(!). - self.length = 0 - self.count = [0, 0] - - # Initial empty message as a sequence of bytes (8 bit characters). - self.input = [] - - # Call a separate init function, that can be used repeatedly - # to start from scratch on the same object. - self.init() - - - def init(self): - "Initialize the message-digest and set all fields to zero." - - self.length = 0 - self.input = [] - - # Initial 160 bit message digest (5 times 32 bit). - self.H0 = 0x67452301 - self.H1 = 0xEFCDAB89 - self.H2 = 0x98BADCFE - self.H3 = 0x10325476 - self.H4 = 0xC3D2E1F0 - - def _transform(self, W): - - for t in range(16, 80): - W.append(_rotateLeft( - W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1) & 0xffffffff) - - A = self.H0 - B = self.H1 - C = self.H2 - D = self.H3 - E = self.H4 - - """ - This loop was unrolled to gain about 10% in speed - for t in range(0, 80): - TEMP = _rotateLeft(A, 5) + f[t/20] + E + W[t] + K[t/20] - E = D - D = C - C = _rotateLeft(B, 30) & 0xffffffff - B = A - A = TEMP & 0xffffffff - """ - - for t in range(0, 20): - TEMP = _rotateLeft(A, 5) + ((B & C) | ((~ B) & D)) + E + W[t] + K[0] - E = D - D = C - C = _rotateLeft(B, 30) & 0xffffffff - B = A - A = TEMP & 0xffffffff - - for t in range(20, 40): - TEMP = _rotateLeft(A, 5) + (B ^ C ^ D) + E + W[t] + K[1] - E = D - D = C - C = _rotateLeft(B, 30) & 0xffffffff - B = A - A = TEMP & 0xffffffff - - for t in range(40, 60): - TEMP = _rotateLeft(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2] - E = D - D = C - C = _rotateLeft(B, 30) & 0xffffffff - B = A - A = TEMP & 0xffffffff - - for t in range(60, 80): - TEMP = _rotateLeft(A, 5) + (B ^ C ^ D) + E + W[t] + K[3] - E = D - D = C - C = _rotateLeft(B, 30) & 0xffffffff - B = A - A = TEMP & 0xffffffff - - - self.H0 = (self.H0 + A) & 0xffffffff - self.H1 = (self.H1 + B) & 0xffffffff - self.H2 = (self.H2 + C) & 0xffffffff - self.H3 = (self.H3 + D) & 0xffffffff - self.H4 = (self.H4 + E) & 0xffffffff - - - # Down from here all methods follow the Python Standard Library - # API of the sha module. - - def update(self, inBuf): - """Add to the current message. - - Update the md5 object with the string arg. Repeated calls - are equivalent to a single call with the concatenation of all - the arguments, i.e. m.update(a); m.update(b) is equivalent - to m.update(a+b). - - The hash is immediately calculated for all full blocks. The final - calculation is made in digest(). It will calculate 1-2 blocks, - depending on how much padding we have to add. This allows us to - keep an intermediate value for the hash, so that we only need to - make minimal recalculation if we call update() to add more data - to the hashed string. - """ - - leninBuf = len(inBuf) - - # Compute number of bytes mod 64. - index = (self.count[1] >> 3) & 0x3F - - # Update number of bits. - self.count[1] = self.count[1] + (leninBuf << 3) - if self.count[1] < (leninBuf << 3): - self.count[0] = self.count[0] + 1 - self.count[0] = self.count[0] + (leninBuf >> 29) - - partLen = 64 - index - - if leninBuf >= partLen: - self.input[index:] = list(inBuf[:partLen]) - self._transform(_bytelist2longBigEndian(self.input)) - i = partLen - while i + 63 < leninBuf: - self._transform(_bytelist2longBigEndian(list(inBuf[i:i+64]))) - i = i + 64 - else: - self.input = list(inBuf[i:leninBuf]) - else: - i = 0 - self.input = self.input + list(inBuf) - - - def digest(self): - """Terminate the message-digest computation and return digest. - - Return the digest of the strings passed to the update() - method so far. This is a 16-byte string which may contain - non-ASCII characters, including null bytes. - """ - - H0 = self.H0 - H1 = self.H1 - H2 = self.H2 - H3 = self.H3 - H4 = self.H4 - input = [] + self.input - count = [] + self.count - - index = (self.count[1] >> 3) & 0x3f - - if index < 56: - padLen = 56 - index - else: - padLen = 120 - index - - padding = ['\200'] + ['\000'] * 63 - self.update(padding[:padLen]) - - # Append length (before padding). - bits = _bytelist2longBigEndian(self.input[:56]) + count - - self._transform(bits) - - # Store state in digest. - digest = _long2bytesBigEndian(self.H0, 4) + \ - _long2bytesBigEndian(self.H1, 4) + \ - _long2bytesBigEndian(self.H2, 4) + \ - _long2bytesBigEndian(self.H3, 4) + \ - _long2bytesBigEndian(self.H4, 4) - - self.H0 = H0 - self.H1 = H1 - self.H2 = H2 - self.H3 = H3 - self.H4 = H4 - self.input = input - self.count = count - - return digest - - - def hexdigest(self): - """Terminate and return digest in HEX form. - - Like digest() except the digest is returned as a string of - length 32, containing only hexadecimal digits. This may be - used to exchange the value safely in email or other non- - binary environments. - """ - return ''.join(['%02x' % ord(c) for c in self.digest()]) - - def copy(self): - """Return a clone object. - - Return a copy ('clone') of the md5 object. This can be used - to efficiently compute the digests of strings that share - a common initial substring. - """ - - return copy.deepcopy(self) - - -# ====================================================================== -# Mimic Python top-level functions from standard library API -# for consistency with the _sha module of the standard library. -# ====================================================================== - -# These are mandatory variables in the module. They have constant values -# in the SHA standard. - -digest_size = 20 -digestsize = 20 -blocksize = 1 - -def new(arg=None): - """Return a new sha crypto object. - - If arg is present, the method call update(arg) is made. - """ - - crypto = sha() - if arg: - crypto.update(arg) - - return crypto - - -if __name__ == "__main__": - a_str = "just a test string" - - assert 'da39a3ee5e6b4b0d3255bfef95601890afd80709' == new().hexdigest() - assert '3f0cf2e3d9e5903e839417dfc47fed6bfa6457f6' == new(a_str).hexdigest() - assert '0852b254078fe3772568a4aba37b917f3d4066ba' == new(a_str*7).hexdigest() - - s = new(a_str) - s.update(a_str) - assert '8862c1b50967f39d3db6bdc2877d9ccebd3102e5' == s.hexdigest() diff --git a/setuptools/_backport/hashlib/_sha256.py b/setuptools/_backport/hashlib/_sha256.py deleted file mode 100644 index 805dbd086c..0000000000 --- a/setuptools/_backport/hashlib/_sha256.py +++ /dev/null @@ -1,260 +0,0 @@ -import struct - -SHA_BLOCKSIZE = 64 -SHA_DIGESTSIZE = 32 - - -def new_shaobject(): - return { - 'digest': [0]*8, - 'count_lo': 0, - 'count_hi': 0, - 'data': [0]* SHA_BLOCKSIZE, - 'local': 0, - 'digestsize': 0 - } - -ROR = lambda x, y: (((x & 0xffffffff) >> (y & 31)) | (x << (32 - (y & 31)))) & 0xffffffff -Ch = lambda x, y, z: (z ^ (x & (y ^ z))) -Maj = lambda x, y, z: (((x | y) & z) | (x & y)) -S = lambda x, n: ROR(x, n) -R = lambda x, n: (x & 0xffffffff) >> n -Sigma0 = lambda x: (S(x, 2) ^ S(x, 13) ^ S(x, 22)) -Sigma1 = lambda x: (S(x, 6) ^ S(x, 11) ^ S(x, 25)) -Gamma0 = lambda x: (S(x, 7) ^ S(x, 18) ^ R(x, 3)) -Gamma1 = lambda x: (S(x, 17) ^ S(x, 19) ^ R(x, 10)) - -def sha_transform(sha_info): - W = [] - - d = sha_info['data'] - for i in xrange(0,16): - W.append( (d[4*i]<<24) + (d[4*i+1]<<16) + (d[4*i+2]<<8) + d[4*i+3]) - - for i in xrange(16,64): - W.append( (Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]) & 0xffffffff ) - - ss = sha_info['digest'][:] - - def RND(a,b,c,d,e,f,g,h,i,ki): - t0 = h + Sigma1(e) + Ch(e, f, g) + ki + W[i]; - t1 = Sigma0(a) + Maj(a, b, c); - d += t0; - h = t0 + t1; - return d & 0xffffffff, h & 0xffffffff - - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],0,0x428a2f98); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],1,0x71374491); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],2,0xb5c0fbcf); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],3,0xe9b5dba5); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],4,0x3956c25b); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],5,0x59f111f1); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],6,0x923f82a4); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],7,0xab1c5ed5); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],8,0xd807aa98); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],9,0x12835b01); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],10,0x243185be); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],11,0x550c7dc3); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],12,0x72be5d74); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],13,0x80deb1fe); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],14,0x9bdc06a7); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],15,0xc19bf174); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],16,0xe49b69c1); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],17,0xefbe4786); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],18,0x0fc19dc6); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],19,0x240ca1cc); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],20,0x2de92c6f); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],21,0x4a7484aa); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],22,0x5cb0a9dc); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],23,0x76f988da); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],24,0x983e5152); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],25,0xa831c66d); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],26,0xb00327c8); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],27,0xbf597fc7); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],28,0xc6e00bf3); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],29,0xd5a79147); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],30,0x06ca6351); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],31,0x14292967); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],32,0x27b70a85); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],33,0x2e1b2138); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],34,0x4d2c6dfc); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],35,0x53380d13); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],36,0x650a7354); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],37,0x766a0abb); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],38,0x81c2c92e); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],39,0x92722c85); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],40,0xa2bfe8a1); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],41,0xa81a664b); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],42,0xc24b8b70); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],43,0xc76c51a3); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],44,0xd192e819); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],45,0xd6990624); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],46,0xf40e3585); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],47,0x106aa070); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],48,0x19a4c116); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],49,0x1e376c08); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],50,0x2748774c); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],51,0x34b0bcb5); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],52,0x391c0cb3); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],53,0x4ed8aa4a); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],54,0x5b9cca4f); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],55,0x682e6ff3); - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],56,0x748f82ee); - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],57,0x78a5636f); - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],58,0x84c87814); - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],59,0x8cc70208); - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],60,0x90befffa); - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],61,0xa4506ceb); - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],62,0xbef9a3f7); - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],63,0xc67178f2); - - dig = [] - for i, x in enumerate(sha_info['digest']): - dig.append( (x + ss[i]) & 0xffffffff ) - sha_info['digest'] = dig - -def sha_init(): - sha_info = new_shaobject() - sha_info['digest'] = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19] - sha_info['count_lo'] = 0 - sha_info['count_hi'] = 0 - sha_info['local'] = 0 - sha_info['digestsize'] = 32 - return sha_info - -def sha224_init(): - sha_info = new_shaobject() - sha_info['digest'] = [0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4] - sha_info['count_lo'] = 0 - sha_info['count_hi'] = 0 - sha_info['local'] = 0 - sha_info['digestsize'] = 28 - return sha_info - -def getbuf(s): - if isinstance(s, str): - return s - elif isinstance(s, unicode): - return str(s) - else: - return buffer(s) - -def sha_update(sha_info, buffer): - count = len(buffer) - buffer_idx = 0 - clo = (sha_info['count_lo'] + (count << 3)) & 0xffffffff - if clo < sha_info['count_lo']: - sha_info['count_hi'] += 1 - sha_info['count_lo'] = clo - - sha_info['count_hi'] += (count >> 29) - - if sha_info['local']: - i = SHA_BLOCKSIZE - sha_info['local'] - if i > count: - i = count - - # copy buffer - for x in enumerate(buffer[buffer_idx:buffer_idx+i]): - sha_info['data'][sha_info['local']+x[0]] = struct.unpack('B', x[1])[0] - - count -= i - buffer_idx += i - - sha_info['local'] += i - if sha_info['local'] == SHA_BLOCKSIZE: - sha_transform(sha_info) - sha_info['local'] = 0 - else: - return - - while count >= SHA_BLOCKSIZE: - # copy buffer - sha_info['data'] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + SHA_BLOCKSIZE]] - count -= SHA_BLOCKSIZE - buffer_idx += SHA_BLOCKSIZE - sha_transform(sha_info) - - - # copy buffer - pos = sha_info['local'] - sha_info['data'][pos:pos+count] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + count]] - sha_info['local'] = count - -def sha_final(sha_info): - lo_bit_count = sha_info['count_lo'] - hi_bit_count = sha_info['count_hi'] - count = (lo_bit_count >> 3) & 0x3f - sha_info['data'][count] = 0x80; - count += 1 - if count > SHA_BLOCKSIZE - 8: - # zero the bytes in data after the count - sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) - sha_transform(sha_info) - # zero bytes in data - sha_info['data'] = [0] * SHA_BLOCKSIZE - else: - sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) - - sha_info['data'][56] = (hi_bit_count >> 24) & 0xff - sha_info['data'][57] = (hi_bit_count >> 16) & 0xff - sha_info['data'][58] = (hi_bit_count >> 8) & 0xff - sha_info['data'][59] = (hi_bit_count >> 0) & 0xff - sha_info['data'][60] = (lo_bit_count >> 24) & 0xff - sha_info['data'][61] = (lo_bit_count >> 16) & 0xff - sha_info['data'][62] = (lo_bit_count >> 8) & 0xff - sha_info['data'][63] = (lo_bit_count >> 0) & 0xff - - sha_transform(sha_info) - - dig = [] - for i in sha_info['digest']: - dig.extend([ ((i>>24) & 0xff), ((i>>16) & 0xff), ((i>>8) & 0xff), (i & 0xff) ]) - return ''.join([chr(i) for i in dig]) - -class sha256(object): - digest_size = digestsize = SHA_DIGESTSIZE - block_size = SHA_BLOCKSIZE - - def __init__(self, s=None): - self._sha = sha_init() - if s: - sha_update(self._sha, getbuf(s)) - - def update(self, s): - sha_update(self._sha, getbuf(s)) - - def digest(self): - return sha_final(self._sha.copy())[:self._sha['digestsize']] - - def hexdigest(self): - return ''.join(['%.2x' % ord(i) for i in self.digest()]) - - def copy(self): - new = sha256.__new__(sha256) - new._sha = self._sha.copy() - return new - -class sha224(sha256): - digest_size = digestsize = 28 - - def __init__(self, s=None): - self._sha = sha224_init() - if s: - sha_update(self._sha, getbuf(s)) - - def copy(self): - new = sha224.__new__(sha224) - new._sha = self._sha.copy() - return new - -if __name__ == "__main__": - a_str = "just a test string" - - assert 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' == sha256().hexdigest() - assert 'd7b553c6f09ac85d142415f857c5310f3bbbe7cdd787cce4b985acedd585266f' == sha256(a_str).hexdigest() - assert '8113ebf33c97daa9998762aacafe750c7cefc2b2f173c90c59663a57fe626f21' == sha256(a_str*7).hexdigest() - - s = sha256(a_str) - s.update(a_str) - assert '03d9963e05a094593190b6fc794cb1a3e1ac7d7883f0b5855268afeccc70d461' == s.hexdigest() diff --git a/setuptools/_backport/hashlib/_sha512.py b/setuptools/_backport/hashlib/_sha512.py deleted file mode 100644 index 68ff46f308..0000000000 --- a/setuptools/_backport/hashlib/_sha512.py +++ /dev/null @@ -1,288 +0,0 @@ -""" -This code was Ported from CPython's sha512module.c -""" - -import struct - -SHA_BLOCKSIZE = 128 -SHA_DIGESTSIZE = 64 - - -def new_shaobject(): - return { - 'digest': [0]*8, - 'count_lo': 0, - 'count_hi': 0, - 'data': [0]* SHA_BLOCKSIZE, - 'local': 0, - 'digestsize': 0 - } - -ROR64 = lambda x, y: (((x & 0xffffffffffffffff) >> (y & 63)) | (x << (64 - (y & 63)))) & 0xffffffffffffffff -Ch = lambda x, y, z: (z ^ (x & (y ^ z))) -Maj = lambda x, y, z: (((x | y) & z) | (x & y)) -S = lambda x, n: ROR64(x, n) -R = lambda x, n: (x & 0xffffffffffffffff) >> n -Sigma0 = lambda x: (S(x, 28) ^ S(x, 34) ^ S(x, 39)) -Sigma1 = lambda x: (S(x, 14) ^ S(x, 18) ^ S(x, 41)) -Gamma0 = lambda x: (S(x, 1) ^ S(x, 8) ^ R(x, 7)) -Gamma1 = lambda x: (S(x, 19) ^ S(x, 61) ^ R(x, 6)) - -def sha_transform(sha_info): - W = [] - - d = sha_info['data'] - for i in xrange(0,16): - W.append( (d[8*i]<<56) + (d[8*i+1]<<48) + (d[8*i+2]<<40) + (d[8*i+3]<<32) + (d[8*i+4]<<24) + (d[8*i+5]<<16) + (d[8*i+6]<<8) + d[8*i+7]) - - for i in xrange(16,80): - W.append( (Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]) & 0xffffffffffffffff ) - - ss = sha_info['digest'][:] - - def RND(a,b,c,d,e,f,g,h,i,ki): - t0 = (h + Sigma1(e) + Ch(e, f, g) + ki + W[i]) & 0xffffffffffffffff - t1 = (Sigma0(a) + Maj(a, b, c)) & 0xffffffffffffffff - d = (d + t0) & 0xffffffffffffffff - h = (t0 + t1) & 0xffffffffffffffff - return d & 0xffffffffffffffff, h & 0xffffffffffffffff - - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],0,0x428a2f98d728ae22) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],1,0x7137449123ef65cd) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],2,0xb5c0fbcfec4d3b2f) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],3,0xe9b5dba58189dbbc) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],4,0x3956c25bf348b538) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],5,0x59f111f1b605d019) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],6,0x923f82a4af194f9b) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],7,0xab1c5ed5da6d8118) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],8,0xd807aa98a3030242) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],9,0x12835b0145706fbe) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],10,0x243185be4ee4b28c) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],11,0x550c7dc3d5ffb4e2) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],12,0x72be5d74f27b896f) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],13,0x80deb1fe3b1696b1) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],14,0x9bdc06a725c71235) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],15,0xc19bf174cf692694) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],16,0xe49b69c19ef14ad2) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],17,0xefbe4786384f25e3) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],18,0x0fc19dc68b8cd5b5) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],19,0x240ca1cc77ac9c65) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],20,0x2de92c6f592b0275) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],21,0x4a7484aa6ea6e483) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],22,0x5cb0a9dcbd41fbd4) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],23,0x76f988da831153b5) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],24,0x983e5152ee66dfab) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],25,0xa831c66d2db43210) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],26,0xb00327c898fb213f) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],27,0xbf597fc7beef0ee4) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],28,0xc6e00bf33da88fc2) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],29,0xd5a79147930aa725) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],30,0x06ca6351e003826f) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],31,0x142929670a0e6e70) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],32,0x27b70a8546d22ffc) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],33,0x2e1b21385c26c926) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],34,0x4d2c6dfc5ac42aed) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],35,0x53380d139d95b3df) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],36,0x650a73548baf63de) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],37,0x766a0abb3c77b2a8) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],38,0x81c2c92e47edaee6) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],39,0x92722c851482353b) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],40,0xa2bfe8a14cf10364) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],41,0xa81a664bbc423001) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],42,0xc24b8b70d0f89791) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],43,0xc76c51a30654be30) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],44,0xd192e819d6ef5218) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],45,0xd69906245565a910) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],46,0xf40e35855771202a) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],47,0x106aa07032bbd1b8) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],48,0x19a4c116b8d2d0c8) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],49,0x1e376c085141ab53) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],50,0x2748774cdf8eeb99) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],51,0x34b0bcb5e19b48a8) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],52,0x391c0cb3c5c95a63) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],53,0x4ed8aa4ae3418acb) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],54,0x5b9cca4f7763e373) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],55,0x682e6ff3d6b2b8a3) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],56,0x748f82ee5defb2fc) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],57,0x78a5636f43172f60) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],58,0x84c87814a1f0ab72) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],59,0x8cc702081a6439ec) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],60,0x90befffa23631e28) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],61,0xa4506cebde82bde9) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],62,0xbef9a3f7b2c67915) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],63,0xc67178f2e372532b) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],64,0xca273eceea26619c) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],65,0xd186b8c721c0c207) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],66,0xeada7dd6cde0eb1e) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],67,0xf57d4f7fee6ed178) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],68,0x06f067aa72176fba) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],69,0x0a637dc5a2c898a6) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],70,0x113f9804bef90dae) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],71,0x1b710b35131c471b) - ss[3], ss[7] = RND(ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],72,0x28db77f523047d84) - ss[2], ss[6] = RND(ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],73,0x32caab7b40c72493) - ss[1], ss[5] = RND(ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],ss[5],74,0x3c9ebe0a15c9bebc) - ss[0], ss[4] = RND(ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],ss[4],75,0x431d67c49c100d4c) - ss[7], ss[3] = RND(ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],ss[3],76,0x4cc5d4becb3e42b6) - ss[6], ss[2] = RND(ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],ss[2],77,0x597f299cfc657e2a) - ss[5], ss[1] = RND(ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],ss[1],78,0x5fcb6fab3ad6faec) - ss[4], ss[0] = RND(ss[1],ss[2],ss[3],ss[4],ss[5],ss[6],ss[7],ss[0],79,0x6c44198c4a475817) - - dig = [] - for i, x in enumerate(sha_info['digest']): - dig.append( (x + ss[i]) & 0xffffffffffffffff ) - sha_info['digest'] = dig - -def sha_init(): - sha_info = new_shaobject() - sha_info['digest'] = [ 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179] - sha_info['count_lo'] = 0 - sha_info['count_hi'] = 0 - sha_info['local'] = 0 - sha_info['digestsize'] = 64 - return sha_info - -def sha384_init(): - sha_info = new_shaobject() - sha_info['digest'] = [ 0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4] - sha_info['count_lo'] = 0 - sha_info['count_hi'] = 0 - sha_info['local'] = 0 - sha_info['digestsize'] = 48 - return sha_info - -def getbuf(s): - if isinstance(s, str): - return s - elif isinstance(s, unicode): - return str(s) - else: - return buffer(s) - -def sha_update(sha_info, buffer): - count = len(buffer) - buffer_idx = 0 - clo = (sha_info['count_lo'] + (count << 3)) & 0xffffffff - if clo < sha_info['count_lo']: - sha_info['count_hi'] += 1 - sha_info['count_lo'] = clo - - sha_info['count_hi'] += (count >> 29) - - if sha_info['local']: - i = SHA_BLOCKSIZE - sha_info['local'] - if i > count: - i = count - - # copy buffer - for x in enumerate(buffer[buffer_idx:buffer_idx+i]): - sha_info['data'][sha_info['local']+x[0]] = struct.unpack('B', x[1])[0] - - count -= i - buffer_idx += i - - sha_info['local'] += i - if sha_info['local'] == SHA_BLOCKSIZE: - sha_transform(sha_info) - sha_info['local'] = 0 - else: - return - - while count >= SHA_BLOCKSIZE: - # copy buffer - sha_info['data'] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + SHA_BLOCKSIZE]] - count -= SHA_BLOCKSIZE - buffer_idx += SHA_BLOCKSIZE - sha_transform(sha_info) - - # copy buffer - pos = sha_info['local'] - sha_info['data'][pos:pos+count] = [struct.unpack('B',c)[0] for c in buffer[buffer_idx:buffer_idx + count]] - sha_info['local'] = count - -def sha_final(sha_info): - lo_bit_count = sha_info['count_lo'] - hi_bit_count = sha_info['count_hi'] - count = (lo_bit_count >> 3) & 0x7f - sha_info['data'][count] = 0x80; - count += 1 - if count > SHA_BLOCKSIZE - 16: - # zero the bytes in data after the count - sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) - sha_transform(sha_info) - # zero bytes in data - sha_info['data'] = [0] * SHA_BLOCKSIZE - else: - sha_info['data'] = sha_info['data'][:count] + ([0] * (SHA_BLOCKSIZE - count)) - - sha_info['data'][112] = 0; - sha_info['data'][113] = 0; - sha_info['data'][114] = 0; - sha_info['data'][115] = 0; - sha_info['data'][116] = 0; - sha_info['data'][117] = 0; - sha_info['data'][118] = 0; - sha_info['data'][119] = 0; - - sha_info['data'][120] = (hi_bit_count >> 24) & 0xff - sha_info['data'][121] = (hi_bit_count >> 16) & 0xff - sha_info['data'][122] = (hi_bit_count >> 8) & 0xff - sha_info['data'][123] = (hi_bit_count >> 0) & 0xff - sha_info['data'][124] = (lo_bit_count >> 24) & 0xff - sha_info['data'][125] = (lo_bit_count >> 16) & 0xff - sha_info['data'][126] = (lo_bit_count >> 8) & 0xff - sha_info['data'][127] = (lo_bit_count >> 0) & 0xff - - sha_transform(sha_info) - - dig = [] - for i in sha_info['digest']: - dig.extend([ ((i>>56) & 0xff), ((i>>48) & 0xff), ((i>>40) & 0xff), ((i>>32) & 0xff), ((i>>24) & 0xff), ((i>>16) & 0xff), ((i>>8) & 0xff), (i & 0xff) ]) - return ''.join([chr(i) for i in dig]) - -class sha512(object): - digest_size = digestsize = SHA_DIGESTSIZE - block_size = SHA_BLOCKSIZE - - def __init__(self, s=None): - self._sha = sha_init() - if s: - sha_update(self._sha, getbuf(s)) - - def update(self, s): - sha_update(self._sha, getbuf(s)) - - def digest(self): - return sha_final(self._sha.copy())[:self._sha['digestsize']] - - def hexdigest(self): - return ''.join(['%.2x' % ord(i) for i in self.digest()]) - - def copy(self): - new = sha512.__new__(sha512) - new._sha = self._sha.copy() - return new - -class sha384(sha512): - digest_size = digestsize = 48 - - def __init__(self, s=None): - self._sha = sha384_init() - if s: - sha_update(self._sha, getbuf(s)) - - def copy(self): - new = sha384.__new__(sha384) - new._sha = self._sha.copy() - return new - -if __name__ == "__main__": - a_str = "just a test string" - - assert sha512().hexdigest() == "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" - assert sha512(a_str).hexdigest() == "68be4c6664af867dd1d01c8d77e963d87d77b702400c8fabae355a41b8927a5a5533a7f1c28509bbd65c5f3ac716f33be271fbda0ca018b71a84708c9fae8a53" - assert sha512(a_str*7).hexdigest() == "3233acdbfcfff9bff9fc72401d31dbffa62bd24e9ec846f0578d647da73258d9f0879f7fde01fe2cc6516af3f343807fdef79e23d696c923d79931db46bf1819" - - s = sha512(a_str) - s.update(a_str) - assert s.hexdigest() == "341aeb668730bbb48127d5531115f3c39d12cb9586a6ca770898398aff2411087cfe0b570689adf328cddeb1f00803acce6737a19f310b53bbdb0320828f75bb" diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4a3f49c72c..12a062b522 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -5,6 +5,8 @@ import shutil import socket import base64 +import hashlib +from functools import wraps from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, @@ -21,8 +23,6 @@ ConfigParser) from setuptools.compat import filterfalse from fnmatch import translate -from setuptools.py24compat import hashlib -from setuptools.py24compat import wraps from setuptools.py26compat import strip_fragment from setuptools.py27compat import get_all_headers From 5da2968ad780b119434eac97712b2a69071c613f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:09:53 -0500 Subject: [PATCH 1619/8469] Clean up imports --- setuptools/ssl_support.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 346188f2f8..135d239b1c 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -1,4 +1,8 @@ -import sys, os, socket, atexit, re +import os +import socket +import atexit +import re + import pkg_resources from pkg_resources import ResolutionError, ExtractionError from setuptools.compat import urllib2 From ac003eead133c6fc031a6fc6d5991461b564a917 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:10:23 -0500 Subject: [PATCH 1620/8469] Remove excess whitespace --HG-- extra : amend_source : 28d918108715cbb5711ca31f67c5ed4d8978bb97 --- setuptools/ssl_support.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 135d239b1c..840c618ab9 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -41,10 +41,6 @@ is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection) - - - - try: from socket import create_connection except ImportError: @@ -195,28 +191,6 @@ def match_hostname(cert, hostname): "subjectAltName fields were found") - - - - - - - - - - - - - - - - - - - - - - class VerifyingHTTPSHandler(HTTPSHandler): """Simple verifying handler: no auth, subclasses, timeouts, etc.""" @@ -263,7 +237,6 @@ def opener_for(ca_bundle=None): ).open - _wincerts = None def get_win_certfile(): @@ -300,8 +273,3 @@ def find_ca_bundle(): return pkg_resources.resource_filename('certifi', 'cacert.pem') except (ImportError, ResolutionError, ExtractionError): return None - - - - - From f0e9b4a76e82216467de39f5a038946c7bc50255 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:13:28 -0500 Subject: [PATCH 1621/8469] Remove backward-compatiblity implementation of create_connection. --- setuptools/ssl_support.py | 45 ++------------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 840c618ab9..7b5f429f8f 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -41,47 +41,6 @@ is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection) -try: - from socket import create_connection -except ImportError: - from socket import error - _GLOBAL_DEFAULT_TIMEOUT = getattr(socket, '_GLOBAL_DEFAULT_TIMEOUT', object()) - def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, - source_address=None): - """Connect to *address* and return the socket object. - - Convenience function. Connect to *address* (a 2-tuple ``(host, - port)``) and return the socket object. Passing the optional - *timeout* parameter will set the timeout on the socket instance - before attempting to connect. If no *timeout* is supplied, the - global default timeout setting returned by :func:`getdefaulttimeout` - is used. If *source_address* is set it must be a tuple of (host, port) - for the socket to bind as a source address before making the connection. - An host of '' or port 0 tells the OS to use the default. - """ - host, port = address - err = None - for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): - af, socktype, proto, canonname, sa = res - sock = None - try: - sock = socket.socket(af, socktype, proto) - if timeout is not _GLOBAL_DEFAULT_TIMEOUT: - sock.settimeout(timeout) - if source_address: - sock.bind(source_address) - sock.connect(sa) - return sock - - except error: - err = True - if sock is not None: - sock.close() - if err: - raise - else: - raise error("getaddrinfo returns an empty list") - try: from ssl import CertificateError, match_hostname @@ -211,8 +170,8 @@ def __init__(self, host, ca_bundle, **kw): self.ca_bundle = ca_bundle def connect(self): - sock = create_connection( - (self.host, self.port), getattr(self,'source_address',None) + sock = socket.create_connection( + (self.host, self.port), getattr(self, 'source_address', None) ) # Handle the socket if a (proxy) tunnel is present From a2062b812cbf41ac6666975d05ab8c79de723d10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:14:38 -0500 Subject: [PATCH 1622/8469] Remove unused variable --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 97cc68d019..50d0e4c55b 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,6 @@ class build_py(_build_py): def build_package_data(self): """Copy data files into build directory""" - lastdir = None for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) From a37fa9563065819a8520b1a7c501949a5a5d8df4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:30:17 -0500 Subject: [PATCH 1623/8469] Updated environment-specific console script generation to use modern style. --- setup.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 50d0e4c55b..6cf52521fd 100755 --- a/setup.py +++ b/setup.py @@ -31,14 +31,23 @@ scripts = [] -console_scripts = ["easy_install = setuptools.command.easy_install:main"] - -# Gentoo distributions manage the python-version-specific scripts themselves, -# so they define an environment variable to suppress the creation of the -# version-specific scripts. -if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \ - os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"): - console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) +def _gen_console_scripts(): + yield "easy_install = setuptools.command.easy_install:main" + + # Gentoo distributions manage the python-version-specific scripts + # themselves, so those platforms define an environment variable to + # suppress the creation of the version-specific scripts. + var_names = ( + 'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', + 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', + ) + if any(os.environ.get(var) not in (None, "", "0") for var in var_names): + return + yield ("easy_install-{shortver} = setuptools.command.easy_install:main" + .format(shortver=sys.version[:3])) + +console_scripts = list(_gen_console_scripts()) + # specific command that is used to generate windows .exe files class build_py(_build_py): From 4c1a43d14d52098c269efc98dc004de85e52f19e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:41:06 -0500 Subject: [PATCH 1624/8469] Use with statement in setup.py --- setup.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/setup.py b/setup.py index 6cf52521fd..80d943adda 100755 --- a/setup.py +++ b/setup.py @@ -13,17 +13,15 @@ command_ns = {} init_path = convert_path('setuptools/command/__init__.py') -init_file = open(init_path) -exec(init_file.read(), command_ns) -init_file.close() +with open(init_path) as init_file: + exec(init_file.read(), command_ns) SETUP_COMMANDS = command_ns['__all__'] main_ns = {} ver_path = convert_path('setuptools/version.py') -ver_file = open(ver_path) -exec(ver_file.read(), main_ns) -ver_file.close() +with open(ver_path) as ver_file: + exec(ver_file.read(), main_ns) import setuptools from setuptools.command.build_py import build_py as _build_py @@ -70,23 +68,17 @@ def run(self): _test.run(self) return # even though _test.run will raise SystemExit - f = open(entry_points) - - # running the test - try: + # save the content + with open(entry_points) as f: ep_content = f.read() - finally: - f.close() + # run the test try: _test.run(self) finally: - # restoring the file - f = open(entry_points, 'w') - try: + # restore the file + with open(entry_points, 'w') as f: f.write(ep_content) - finally: - f.close() readme_file = open('README.txt') @@ -96,9 +88,9 @@ def run(self): else: # but if the release script has not run, fall back to the source file changes_file = open('CHANGES.txt') -long_description = readme_file.read() + '\n' + changes_file.read() -readme_file.close() -changes_file.close() +with readme_file: + with changes_file: + long_description = readme_file.read() + '\n' + changes_file.read() package_data = {'setuptools': ['site-patch.py']} if sys.platform == 'win32' or os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0"): From dfd8cf27fae82862038a4961107702f345c526ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:41:25 -0500 Subject: [PATCH 1625/8469] Fix long line in windows_specific_files override. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 80d943adda..15ba65f6d5 100755 --- a/setup.py +++ b/setup.py @@ -93,7 +93,11 @@ def run(self): long_description = readme_file.read() + '\n' + changes_file.read() package_data = {'setuptools': ['site-patch.py']} -if sys.platform == 'win32' or os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0"): +force_windows_specific_files = ( + os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") + not in (None, "", "0") +) +if sys.platform == 'win32' or force_windows_specific_files: package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) From 85e1c4f71cbc256ce0337ed775aacd3635e8ce5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:51:03 -0500 Subject: [PATCH 1626/8469] Use textwrap.dedent for multiline string. Use new style string formatter. --- ez_setup.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a6f4815850..c38e96e5bf 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -21,6 +21,7 @@ import optparse import subprocess import platform +import textwrap from distutils import log @@ -134,14 +135,16 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, pkg_resources.require("setuptools>=" + version) return except pkg_resources.VersionConflict: - e = sys.exc_info()[1] if was_imported: - sys.stderr.write( - "The required version of setuptools (>=%s) is not available,\n" - "and can't be installed while this script is running. Please\n" - "install a more recent version first, using\n" - "'easy_install -U setuptools'." - "\n\n(Currently using %r)\n" % (version, e.args[0])) + msg = textwrap.dedent(""" + The required version of setuptools (>={version}) is not available, + and can't be installed while this script is running. Please + install a more recent version first, using + 'easy_install -U setuptools'. + + (Currently using {VC_err.args[0]!r}) + """).format(VC_err = sys.exc_info()[1], version=version) + sys.stderr.write(msg) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok From e8e1b1d37b6ccfd0b46ceab1241c338159de8370 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:52:45 -0500 Subject: [PATCH 1627/8469] Remove obvious comment. --- ez_setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index c38e96e5bf..2b2eac0fe2 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -123,7 +123,6 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): - # making sure we use the absolute path to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ 'setuptools' in sys.modules From c070a1bb116494a694877eb8a2f30f1fd9e9eae5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:55:03 -0500 Subject: [PATCH 1628/8469] Remove empty logic branch. --- ez_setup.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2b2eac0fe2..0cc4a055d6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -145,13 +145,12 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, """).format(VC_err = sys.exc_info()[1], version=version) sys.stderr.write(msg) sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return _do_download(version, download_base, to_dir, - download_delay) + + # otherwise, reload ok + del pkg_resources, sys.modules['pkg_resources'] + return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.DistributionNotFound: - return _do_download(version, download_base, to_dir, - download_delay) + return _do_download(version, download_base, to_dir, download_delay) def _clean_check(cmd, target): """ From 833054f82f8d4389a66f8959ed8c9211ff5fa835 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:57:33 -0500 Subject: [PATCH 1629/8469] Reorder exception handlers to work around warning about 'pkg_resources' being undefined. --- ez_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0cc4a055d6..4703ed29c4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -133,6 +133,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: pkg_resources.require("setuptools>=" + version) return + except pkg_resources.DistributionNotFound: + return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.VersionConflict: if was_imported: msg = textwrap.dedent(""" @@ -149,8 +151,6 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, # otherwise, reload ok del pkg_resources, sys.modules['pkg_resources'] return _do_download(version, download_base, to_dir, download_delay) - except pkg_resources.DistributionNotFound: - return _do_download(version, download_base, to_dir, download_delay) def _clean_check(cmd, target): """ From eaa998caab3cd3c97161963bdc1957d2db974d76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 15:58:45 -0500 Subject: [PATCH 1630/8469] Remove Python 2.3 compatibility support --- ez_setup.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4703ed29c4..3c39ab4313 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -316,13 +316,7 @@ def _extractall(self, path=".", members=None): self.extract(tarinfo, path) # Reverse sort directories. - if sys.version_info < (2, 4): - def sorter(dir1, dir2): - return cmp(dir1.name, dir2.name) - directories.sort(sorter) - directories.reverse() - else: - directories.sort(key=operator.attrgetter('name'), reverse=True) + directories.sort(key=operator.attrgetter('name'), reverse=True) # Set correct owner, mtime and filemode on directories. for tarinfo in directories: From 4d327300b0139f159d1c24cd076572a99fd55b50 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:01:00 -0500 Subject: [PATCH 1631/8469] Updated size and link regarding bootstrap module --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 9bc8ea44b2..fd10d3d13c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -11,11 +11,11 @@ Packages built and distributed using ``setuptools`` look to the user like ordinary Python packages based on the ``distutils``. Your users don't need to install or even know about setuptools in order to use them, and you don't have to include the entire setuptools package in your distributions. By -including just a single `bootstrap module`_ (an 8K .py file), your package will +including just a single `bootstrap module`_ (a 12K .py file), your package will automatically download and install ``setuptools`` if the user is building your package from source and doesn't have a suitable version already installed. -.. _bootstrap module: https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py +.. _bootstrap module: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py Feature Highlights: From 2833cdcce09e10448c5a7846a58bdc22f0021b93 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:02:08 -0500 Subject: [PATCH 1632/8469] Remove feature highlight that's no longer relevant. --- docs/setuptools.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index fd10d3d13c..d48ad34f0d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -28,10 +28,7 @@ Feature Highlights: * Create `Python Eggs `_ - a single-file importable distribution format -* Include data files inside your package directories, where your code can - actually use them. (Python 2.4 distutils also supports this feature, but - setuptools provides the feature for Python 2.3 packages also, and supports - accessing data files in zipped packages too.) +* Enhanced support for accessing data files hosted in zipped packages. * Automatically include all packages in your source tree, without listing them individually in setup.py From 39dd5934be0a44d1f0452975a17784bddb276a82 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:04:34 -0500 Subject: [PATCH 1633/8469] Remove upload command (no longer relevant on Python 2.6+ --- setuptools/command/__init__.py | 6 +- setuptools/command/upload.py | 183 --------------------------------- 2 files changed, 1 insertion(+), 188 deletions(-) delete mode 100755 setuptools/command/upload.py diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index b063fa1925..29c9d75ad1 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -1,17 +1,13 @@ __all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', - 'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', + 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', 'upload_docs', ] from setuptools.command import install_scripts import sys -if sys.version>='2.5': - # In Python 2.5 and above, distutils includes its own upload command - __all__.remove('upload') - from distutils.command.bdist import bdist if 'egg' not in bdist.format_commands: diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py deleted file mode 100755 index a6eff3855b..0000000000 --- a/setuptools/command/upload.py +++ /dev/null @@ -1,183 +0,0 @@ -"""distutils.command.upload - -Implements the Distutils 'upload' subcommand (upload package to PyPI).""" - -from distutils import errors -from distutils import log -from distutils.core import Command -from distutils.spawn import spawn -try: - from hashlib import md5 -except ImportError: - from md5 import md5 -import os -import sys -import socket -import platform -import base64 - -from setuptools.compat import urlparse, StringIO, httplib, ConfigParser - -class upload(Command): - - description = "upload binary package to PyPI" - - DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]" % DEFAULT_REPOSITORY), - ('show-response', None, - 'display full response text from server'), - ('sign', 's', - 'sign files to upload using gpg'), - ('identity=', 'i', 'GPG identity used to sign files'), - ] - boolean_options = ['show-response', 'sign'] - - def initialize_options(self): - self.username = '' - self.password = '' - self.repository = '' - self.show_response = 0 - self.sign = False - self.identity = None - - def finalize_options(self): - if self.identity and not self.sign: - raise errors.DistutilsOptionError( - "Must use --sign for --identity to have meaning" - ) - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - self.announce('Using PyPI login from %s' % rc) - config = ConfigParser.ConfigParser({ - 'username':'', - 'password':'', - 'repository':''}) - config.read(rc) - if not self.repository: - self.repository = config.get('server-login', 'repository') - if not self.username: - self.username = config.get('server-login', 'username') - if not self.password: - self.password = config.get('server-login', 'password') - if not self.repository: - self.repository = self.DEFAULT_REPOSITORY - - def run(self): - if not self.distribution.dist_files: - raise errors.DistutilsOptionError("No dist file created in earlier command") - for command, pyversion, filename in self.distribution.dist_files: - self.upload_file(command, pyversion, filename) - - def upload_file(self, command, pyversion, filename): - # Sign if requested - if self.sign: - gpg_args = ["gpg", "--detach-sign", "-a", filename] - if self.identity: - gpg_args[2:2] = ["--local-user", self.identity] - spawn(gpg_args, - dry_run=self.dry_run) - - # Fill in the data - f = open(filename,'rb') - content = f.read() - f.close() - basename = os.path.basename(filename) - comment = '' - if command=='bdist_egg' and self.distribution.has_ext_modules(): - comment = "built on %s" % platform.platform(terse=1) - data = { - ':action':'file_upload', - 'protocol_version':'1', - 'name':self.distribution.get_name(), - 'version':self.distribution.get_version(), - 'content':(basename,content), - 'filetype':command, - 'pyversion':pyversion, - 'md5_digest':md5(content).hexdigest(), - } - if command == 'bdist_rpm': - dist, version, id = platform.dist() - if dist: - comment = 'built for %s %s' % (dist, version) - elif command == 'bdist_dumb': - comment = 'built for %s' % platform.platform(terse=1) - data['comment'] = comment - - if self.sign: - asc_file = open(filename + ".asc") - data['gpg_signature'] = (os.path.basename(filename) + ".asc", asc_file.read()) - asc_file.close() - - # set up the authentication - auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() - - # Build up the MIME payload for the POST data - boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = '\n--' + boundary - end_boundary = sep_boundary + '--' - body = StringIO() - for key, value in data.items(): - # handle multiple entries for the same name - if not isinstance(value, list): - value = [value] - for value in value: - if type(value) is tuple: - fn = ';filename="%s"' % value[0] - value = value[1] - else: - fn = "" - value = str(value) - body.write(sep_boundary) - body.write('\nContent-Disposition: form-data; name="%s"'%key) - body.write(fn) - body.write("\n\n") - body.write(value) - if value and value[-1] == '\r': - body.write('\n') # write an extra newline (lurve Macs) - body.write(end_boundary) - body.write("\n") - body = body.getvalue() - - self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) - - # build the Request - # We can't use urllib2 since we need to send the Basic - # auth right with the first request - schema, netloc, url, params, query, fragments = \ - urlparse(self.repository) - assert not params and not query and not fragments - if schema == 'http': - http = httplib.HTTPConnection(netloc) - elif schema == 'https': - http = httplib.HTTPSConnection(netloc) - else: - raise AssertionError("unsupported schema " + schema) - - data = '' - try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', - 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) - except socket.error: - e = sys.exc_info()[1] - self.announce(str(e), log.ERROR) - return - - r = http.getresponse() - if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), - log.INFO) - else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), - log.ERROR) - if self.show_response: - print('-'*75, r.read(), '-'*75) From ba268e837c5fd269c9030c28d85fff6423c1bdec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:07:54 -0500 Subject: [PATCH 1634/8469] Removing py24compat module --- setuptools/py24compat.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 setuptools/py24compat.py diff --git a/setuptools/py24compat.py b/setuptools/py24compat.py deleted file mode 100644 index 40e9ae0f74..0000000000 --- a/setuptools/py24compat.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Forward-compatibility support for Python 2.4 and earlier -""" - -# from jaraco.compat 1.2 -try: - from functools import wraps -except ImportError: - def wraps(func): - "Just return the function unwrapped" - return lambda x: x - - -try: - import hashlib -except ImportError: - from setuptools._backport import hashlib From aa90fa16d02e956b87e0a892683f0ba2e9ecdc03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:10:52 -0500 Subject: [PATCH 1635/8469] Use modern syntax for exception handling in ez_setup.py. This change will also prevent Python 2.4 and Python 2.5 users from invoking it. --- ez_setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3c39ab4313..147ab14d4f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -135,7 +135,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, return except pkg_resources.DistributionNotFound: return _do_download(version, download_base, to_dir, download_delay) - except pkg_resources.VersionConflict: + except pkg_resources.VersionConflict as VC_err: if was_imported: msg = textwrap.dedent(""" The required version of setuptools (>={version}) is not available, @@ -144,7 +144,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, 'easy_install -U setuptools'. (Currently using {VC_err.args[0]!r}) - """).format(VC_err = sys.exc_info()[1], version=version) + """).format(VC_err=VC_err, version=version) sys.stderr.write(msg) sys.exit(2) @@ -325,8 +325,7 @@ def _extractall(self, path=".", members=None): self.chown(tarinfo, dirpath) self.utime(tarinfo, dirpath) self.chmod(tarinfo, dirpath) - except ExtractError: - e = sys.exc_info()[1] + except ExtractError as e: if self.errorlevel > 1: raise else: From b14f0645fe1613c87dbb4e623b02f572d8af2c70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:13:08 -0500 Subject: [PATCH 1636/8469] Simplify _build_install_args now that Python 2.6 is required. --- ez_setup.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 147ab14d4f..79e5c46a3b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -336,13 +336,7 @@ def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package """ - install_args = [] - if options.user_install: - if sys.version_info < (2, 6): - log.warn("--user requires Python 2.6 or later") - raise SystemExit(1) - install_args.append('--user') - return install_args + return ['--user'] if options.user_install else [] def _parse_args(): """ From 6448b98096c81ee02505edaf38430912426665b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:14:37 -0500 Subject: [PATCH 1637/8469] Regenerate egg_info based on new setup.py --- setuptools.egg-info/dependency_links.txt | 4 - setuptools.egg-info/entry_points.txt | 96 ++++++++++++------------ setuptools.egg-info/requires.txt | 10 +-- 3 files changed, 50 insertions(+), 60 deletions(-) diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index c688b7eaab..b1c9a2c9c6 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,6 +1,2 @@ https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec -https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c -https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc -https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5 -https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2bf6c8ce4e..d423a67d0d 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -include_package_data = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [console_scripts] easy_install = setuptools.command.easy_install:main easy_install-3.3 = setuptools.command.easy_install:main +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.setup_keywords] +use_2to3_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +exclude_package_data = setuptools.dist:check_package_data +dependency_links = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements +include_package_data = setuptools.dist:assert_bool +convert_2to3_doctests = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements +zip_safe = setuptools.dist:assert_bool + [distutils.commands] -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate -test = setuptools.command.test:test -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -build_ext = setuptools.command.build_ext:build_ext -install_lib = setuptools.command.install_lib:install_lib bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -easy_install = setuptools.command.easy_install:easy_install -register = setuptools.command.register:register -alias = setuptools.command.alias:alias +test = setuptools.command.test:test install = setuptools.command.install:install -upload_docs = setuptools.command.upload_docs:upload_docs +register = setuptools.command.register:register develop = setuptools.command.develop:develop -install_scripts = setuptools.command.install_scripts:install_scripts +bdist_egg = setuptools.command.bdist_egg:bdist_egg egg_info = setuptools.command.egg_info:egg_info -install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_ext = setuptools.command.build_ext:build_ext setopt = setuptools.command.setopt:setopt -bdist_egg = setuptools.command.bdist_egg:bdist_egg +easy_install = setuptools.command.easy_install:easy_install +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_lib = setuptools.command.install_lib:install_lib +rotate = setuptools.command.rotate:rotate +sdist = setuptools.command.sdist:sdist +alias = setuptools.command.alias:alias +saveopts = setuptools.command.saveopts:saveopts +build_py = setuptools.command.build_py:build_py +install_egg_info = setuptools.command.install_egg_info:install_egg_info +install_scripts = setuptools.command.install_scripts:install_scripts + +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..9a6bf43731 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,7 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] certifi==0.0.8 -[ssl:python_version in '2.4, 2.5'] -ssl==1.16 \ No newline at end of file +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file From 6474847292f1cf4fcda55afe2cd5e46497ce339f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:19:00 -0500 Subject: [PATCH 1638/8469] The one use of xrange could also use range, so just use range. --- setuptools/command/easy_install.py | 4 ++-- setuptools/compat.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d329f4cb50..fd133b6c6e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -56,7 +56,7 @@ def _get_purelib(): from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info -from setuptools.compat import (iteritems, maxsize, xrange, basestring, unicode, +from setuptools.compat import (iteritems, maxsize, basestring, unicode, reraise) from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, @@ -376,7 +376,7 @@ def run(self): outputs = self.outputs if self.root: # strip any package prefix root_len = len(self.root) - for counter in xrange(len(outputs)): + for counter in range(len(outputs)): outputs[counter] = outputs[counter][root_len:] from distutils import file_util self.execute( diff --git a/setuptools/compat.py b/setuptools/compat.py index bbc98d6644..8b7ea90423 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -31,7 +31,6 @@ import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit - xrange = xrange filterfalse = itertools.ifilterfalse def exec_(code, globs=None, locs=None): @@ -78,7 +77,6 @@ def exec_(code, globs=None, locs=None): urlparse, urlunparse, unquote, splituser, urljoin, urlsplit, urlunsplit, splittag, ) - xrange = range filterfalse = itertools.filterfalse def execfile(fn, globs=None, locs=None): From f07c527906b54fa8245c6804ae8062c8ddd6c6d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:25:01 -0500 Subject: [PATCH 1639/8469] Drop compatibility function exec_, required for Python 2.5 and earlier. --- pkg_resources.py | 6 +++--- setuptools/compat.py | 16 ++-------------- setuptools/tests/doctest.py | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2c19898bc1..5642e3529c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -35,7 +35,7 @@ basestring next = lambda o: o.next() from cStringIO import StringIO as BytesIO - def exec_(code, globs=None, locs=None): + def exec(code, globs=None, locs=None): if globs is None: frame = sys._getframe(1) globs = frame.f_globals @@ -54,7 +54,7 @@ def execfile(fn, globs=None, locs=None): globs = globals() if locs is None: locs = globs - exec_(compile(open(fn).read(), fn, 'exec'), globs, locs) + exec(compile(open(fn).read(), fn, 'exec'), globs, locs) import functools reduce = functools.reduce @@ -1354,7 +1354,7 @@ def run_script(self,script_name,namespace): len(script_text), 0, script_text.split('\n'), script_filename ) script_code = compile(script_text,script_filename,'exec') - exec_(script_code, namespace, namespace) + exec(script_code, namespace, namespace) def _has(self, path): raise NotImplementedError( diff --git a/setuptools/compat.py b/setuptools/compat.py index 8b7ea90423..fdb7d8ed9f 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -33,18 +33,7 @@ from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit filterfalse = itertools.ifilterfalse - def exec_(code, globs=None, locs=None): - if globs is None: - frame = sys._getframe(1) - globs = frame.f_globals - if locs is None: - locs = frame.f_locals - del frame - elif locs is None: - locs = globs - exec("""exec code in globs, locs""") - - exec_("""def reraise(tp, value, tb=None): + exec("""def reraise(tp, value, tb=None): raise tp, value, tb""") else: PY3 = True @@ -52,7 +41,6 @@ def exec_(code, globs=None, locs=None): basestring = str import builtins import configparser as ConfigParser - exec_ = eval('exec') from io import StringIO, BytesIO func_code = lambda o: o.__code__ func_globals = lambda o: o.__globals__ @@ -89,7 +77,7 @@ def execfile(fn, globs=None, locs=None): source = f.read() finally: f.close() - exec_(compile(source, fn, 'exec'), globs, locs) + exec(compile(source, fn, 'exec'), globs, locs) def reraise(tp, value, tb=None): if value.__traceback__ is not tb: diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index 35d588d074..0c160fe4d4 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -1250,7 +1250,7 @@ def __run(self, test, compileflags, out): # keyboard interrupts.) try: # Don't blink! This is where the user's code gets run. - exec_(compile(example.source, filename, "single", + exec(compile(example.source, filename, "single", compileflags, 1), test.globs) self.debugger.set_continue() # ==== Example Finished ==== exception = None From e7a210418a9949a4b6e9b5ccbaf4c9349de1ad93 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:29:48 -0500 Subject: [PATCH 1640/8469] Remove exec compatibility from pkg_resources also. --- pkg_resources.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5642e3529c..5aeafc9ff3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -35,20 +35,9 @@ basestring next = lambda o: o.next() from cStringIO import StringIO as BytesIO - def exec(code, globs=None, locs=None): - if globs is None: - frame = sys._getframe(1) - globs = frame.f_globals - if locs is None: - locs = frame.f_locals - del frame - elif locs is None: - locs = globs - exec("""exec code in globs, locs""") except NameError: basestring = str from io import BytesIO - exec_ = eval("exec") def execfile(fn, globs=None, locs=None): if globs is None: globs = globals() From 7b7f1ed5a7a8b14269dcc69de42e383558308030 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:36:16 -0500 Subject: [PATCH 1641/8469] Remove stray import of exec_ --- setuptools/tests/doctest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index 0c160fe4d4..47293c3c9c 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -109,7 +109,7 @@ def _test(): import sys, traceback, inspect, linecache, os, re, types import unittest, difflib, pdb, tempfile import warnings -from setuptools.compat import StringIO, execfile, exec_, func_code, im_func +from setuptools.compat import StringIO, execfile, func_code, im_func # Don't whine about the deprecated is_private function in this # module's tests. From 715085069e4882ee67d6898f12b975c05dd6b769 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:42:28 -0500 Subject: [PATCH 1642/8469] Remove compatibility around reduce. --- pkg_resources.py | 8 ++++---- setuptools/sandbox.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5aeafc9ff3..be8c6c57f9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -22,6 +22,8 @@ import zipimport import warnings import stat +import functools + try: from urlparse import urlparse, urlunparse except ImportError: @@ -44,8 +46,6 @@ def execfile(fn, globs=None, locs=None): if locs is None: locs = globs exec(compile(open(fn).read(), fn, 'exec'), globs, locs) - import functools - reduce = functools.reduce # capture these to bypass sandboxing from os import utime @@ -1178,11 +1178,11 @@ def evaluate_marker(text, extra=None, _ops={}): def and_test(nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + return functools.reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) def test(nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + return functools.reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) def atom(nodelist): t = nodelist[1][0] diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 29fc07b8d9..27914f2ed0 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,4 +1,5 @@ import os, sys, tempfile, operator, pkg_resources +import functools if os.name == "java": import org.python.modules.posix.PosixModule as _os else: @@ -11,7 +12,7 @@ from distutils.errors import DistutilsError from pkg_resources import working_set -from setuptools.compat import builtins, execfile, reduce +from setuptools.compat import builtins, execfile __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", @@ -276,7 +277,7 @@ def open(self, file, flags, mode=0x1FF, *args, **kw): # 0777 self._violation("os.open", file, flags, mode, *args, **kw) return _os.open(file,flags,mode, *args, **kw) -WRITE_FLAGS = reduce( +WRITE_FLAGS = functools.reduce( operator.or_, [getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) From ecb026c64b97e1675ab830c4474331a6e03361a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:48:27 -0500 Subject: [PATCH 1643/8469] Modernize style on sandbox.py --- setuptools/sandbox.py | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 27914f2ed0..6dd1ca0784 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,5 +1,11 @@ -import os, sys, tempfile, operator, pkg_resources +import os +import sys +import tempfile +import operator import functools + +import pkg_resources + if os.name == "java": import org.python.modules.posix.PosixModule as _os else: @@ -18,34 +24,6 @@ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" old_dir = os.getcwd() @@ -94,7 +72,6 @@ def run_setup(setup_script, args): tempfile.tempdir = save_tmp - class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" @@ -137,7 +114,6 @@ def wrap(self,src,dst,*args,**kw): for name in ["rename", "link", "symlink"]: if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name) - def _mk_single_path_wrapper(name, original=None): original = original or getattr(_os,name) def wrap(self,path,*args,**kw): @@ -250,7 +226,7 @@ def _ok(self,path): self._active = False realpath = os.path.normcase(os.path.realpath(path)) if (self._exempted(realpath) or realpath == self._sandbox - or realpath.startswith(self._prefix)): + or realpath.startswith(self._prefix)): return True finally: self._active = active From 5535cfdb003ac412d4146617928c966fb5f5626e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:56:31 -0500 Subject: [PATCH 1644/8469] Resave with excess whitespace removed --- setuptools/svn_utils.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 0d65bd30eb..8388a8acc6 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -38,7 +38,7 @@ def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0): except OSError: return 1, '' - #doubled checked and + #doubled checked and data = decode_as_string(data, encoding) #communciate calls wait() @@ -77,19 +77,19 @@ def determine_console_encoding(): try: #try for the preferred encoding encoding = locale.getpreferredencoding() - + #see if the locale.getdefaultlocale returns null #some versions of python\platforms return US-ASCII #when it cannot determine an encoding if not encoding or encoding == "US-ASCII": encoding = locale.getdefaultlocale()[1] - + if encoding: codecs.lookup(encoding) # make sure a lookup error is not made - + except (locale.Error, LookupError): encoding = None - + is_osx = sys.platform == "darwin" if not encoding: return ["US-ASCII", "utf-8"][is_osx] @@ -99,30 +99,30 @@ def determine_console_encoding(): return "utf-8" else: return encoding - + _console_encoding = determine_console_encoding() def decode_as_string(text, encoding=None): """ Decode the console or file output explicitly using getpreferredencoding. The text paraemeter should be a encoded string, if not no decode occurs - If no encoding is given, getpreferredencoding is used. If encoding is - specified, that is used instead. This would be needed for SVN --xml + If no encoding is given, getpreferredencoding is used. If encoding is + specified, that is used instead. This would be needed for SVN --xml output. Unicode is explicitly put in composed NFC form. - - --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion + + --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion DEV List from 2007 seems to indicate the same. """ - #text should be a byte string + #text should be a byte string if encoding is None: encoding = _console_encoding if not isinstance(text, unicode): text = text.decode(encoding) - + text = unicodedata.normalize('NFC', text) - + return text @@ -158,7 +158,7 @@ def parse_externals_xml(decoded_str, prefix=''): path = path[len(prefix)+1:] data = _get_target_property(node) - #data should be decoded already + #data should be decoded already for external in parse_external_prop(data): externals.append(joinpath(path, external)) @@ -262,7 +262,7 @@ def load(cls, dirname=''): except ValueError: base_svn_version = tuple() - if has_svn and (code or not base_svn_version + if has_svn and (code or not base_svn_version or base_svn_version < (1, 3)): warnings.warn(("No SVN 1.3+ command found: falling back " "on pre 1.7 .svn parsing"), DeprecationWarning) From 8c12f1907e901d9791d25359c00db1e851aba931 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 16:56:46 -0500 Subject: [PATCH 1645/8469] Remove unused import --- setuptools/svn_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 8388a8acc6..7ee7867845 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -8,7 +8,7 @@ import codecs import unicodedata import warnings -from setuptools.compat import unicode, bytes +from setuptools.compat import unicode from xml.sax.saxutils import unescape try: From 9121e19a1f3923456855f816d1ec7385d33aa018 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 17:01:49 -0500 Subject: [PATCH 1646/8469] Refactor SvnInfo.load for cleaner logic and less wrapping. Also removed empty logic branch. --- setuptools/svn_utils.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 7ee7867845..a9bdc5c334 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -262,17 +262,18 @@ def load(cls, dirname=''): except ValueError: base_svn_version = tuple() - if has_svn and (code or not base_svn_version - or base_svn_version < (1, 3)): + if not has_svn: + return SvnInfo(dirname) + + if code or not base_svn_version or base_svn_version < (1, 3): warnings.warn(("No SVN 1.3+ command found: falling back " "on pre 1.7 .svn parsing"), DeprecationWarning) return SvnFileInfo(dirname) - elif not has_svn: - return SvnInfo(dirname) - elif base_svn_version < (1, 5): + + if base_svn_version < (1, 5): return Svn13Info(dirname) - else: - return Svn15Info(dirname) + + return Svn15Info(dirname) def __init__(self, path=''): self.path = path From 79e0d772345dd1ca9de73635c9eac47bb505ae03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Nov 2013 17:08:23 -0500 Subject: [PATCH 1647/8469] Remove reduce compatibility references (intended for earlier commit). --- setuptools/compat.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index fdb7d8ed9f..8af8aa742d 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -23,7 +23,6 @@ maxsize = sys.maxint next = lambda o: o.next() numeric_types = (int, long, float) - reduce = reduce unichr = unichr unicode = unicode bytes = str @@ -54,7 +53,6 @@ maxsize = sys.maxsize next = next numeric_types = (int, float) - from functools import reduce unichr = chr unicode = str bytes = bytes From 373ed664bf8d16b0a96edaa607a82e89f64453eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:12:11 -0500 Subject: [PATCH 1648/8469] Remove Python 2.4 compatibility from ez_setup.py --- ez_setup.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 79e5c46a3b..bb451114ac 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -37,15 +37,6 @@ def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 -def _check_call_py24(cmd, *args, **kwargs): - res = subprocess.call(cmd, *args, **kwargs) - class CalledProcessError(Exception): - pass - if not res == 0: - msg = "Command '%s' return non-zero exit status %d" % (cmd, res) - raise CalledProcessError(msg) -vars(subprocess).setdefault('check_call', _check_call_py24) - def _install(tarball, install_args=()): # extracting the tarball tmpdir = tempfile.mkdtemp() From 13f43fe5d5e468fef508c390912c715f02a51839 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:19:30 -0500 Subject: [PATCH 1649/8469] Use sets to determine presence of imported modules. --- ez_setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bb451114ac..4d76ec2713 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -115,8 +115,8 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): to_dir = os.path.abspath(to_dir) - was_imported = 'pkg_resources' in sys.modules or \ - 'setuptools' in sys.modules + rep_modules = 'pkg_resources', 'setuptools' + imported = set(sys.modules).intersection(rep_modules) try: import pkg_resources except ImportError: @@ -127,7 +127,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, except pkg_resources.DistributionNotFound: return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.VersionConflict as VC_err: - if was_imported: + if imported: msg = textwrap.dedent(""" The required version of setuptools (>={version}) is not available, and can't be installed while this script is running. Please From 727779f0ec69dea4624c684b551192f59211f697 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:21:20 -0500 Subject: [PATCH 1650/8469] Update documentation --- ez_setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4d76ec2713..2aa994b337 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,14 +1,14 @@ #!python """Bootstrap setuptools installation -If you want to use setuptools in your package's setup.py, just include this -file in the same directory with it, and add this to the top of your setup.py:: +To use setuptools in your package's setup.py, include this +file in the same directory and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() -If you want to require a specific version of setuptools, set a download -mirror, or use an alternate download directory, you can do so by supplying +To require a specific version of setuptools, set a download +mirror, or use an alternate download directory, simply supply the appropriate options to ``use_setuptools()``. This file can also be run as a script to install or upgrade setuptools. From 151c018dbea53c09c07f0483ffb05118cb6c51f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:31:11 -0500 Subject: [PATCH 1651/8469] upload module is no more --- setuptools/command/upload_docs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 12bc916bb1..4ad3433e0c 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -17,11 +17,7 @@ from distutils import log from distutils.errors import DistutilsOptionError - -try: - from distutils.command.upload import upload -except ImportError: - from setuptools.command.upload import upload +from distutils.command.upload import upload from setuptools.compat import httplib, urlparse, unicode, iteritems From df8f2c2c45fde489e92932e9a4094075566b617d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:32:06 -0500 Subject: [PATCH 1652/8469] Use PY3 from compat module --- setuptools/command/upload_docs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 4ad3433e0c..ef4cf80653 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -19,11 +19,9 @@ from distutils.errors import DistutilsOptionError from distutils.command.upload import upload -from setuptools.compat import httplib, urlparse, unicode, iteritems +from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 -_IS_PYTHON3 = sys.version > '3' - -if _IS_PYTHON3: +if PY3: errors = 'surrogateescape' else: errors = 'strict' From 5745e031d72cbfd141e059e716a97a11739fcac5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:35:35 -0500 Subject: [PATCH 1653/8469] Fix pyflakes warnings --- setuptools/command/upload_docs.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ef4cf80653..702bbadd68 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -130,7 +130,7 @@ def upload_file(self, filename): for key, values in iteritems(data): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name - if type(values) != type([]): + if isinstance(values, list): values = [values] for value in values: if type(value) is tuple: @@ -165,12 +165,11 @@ def upload_file(self, filename): raise AssertionError("unsupported schema "+schema) data = '' - loglevel = log.INFO try: conn.connect() conn.putrequest("POST", url) - conn.putheader('Content-type', - 'multipart/form-data; boundary=%s'%boundary) + content_type = 'multipart/form-data; boundary=%s' % boundary + conn.putheader('Content-type', content_type) conn.putheader('Content-length', str(len(body))) conn.putheader('Authorization', auth) conn.endheaders() From 76b703645976e4ca41e00fa7ebafa36d6805c7e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:36:51 -0500 Subject: [PATCH 1654/8469] Use PY3 indicator --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 702bbadd68..a69958d81e 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -118,7 +118,7 @@ def upload_file(self, filename): # set up the authentication credentials = b(self.username + ':' + self.password) credentials = standard_b64encode(credentials) - if sys.version_info >= (3,): + if PY3: credentials = credentials.decode('ascii') auth = "Basic " + credentials From bcf0e76db414d1c8f7a671289c642a7b4a4b77e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:38:46 -0500 Subject: [PATCH 1655/8469] Use ternary operator to select encoding error behavior. --- setuptools/command/upload_docs.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index a69958d81e..8ee35cb039 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -21,10 +21,7 @@ from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 -if PY3: - errors = 'surrogateescape' -else: - errors = 'strict' +errors = 'surrogateescape' if PY3 else 'strict' # This is not just a replacement for byte literals From fef4d5165d47e33a2143bba3961eefeff6ca218a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:46:03 -0500 Subject: [PATCH 1656/8469] Normalize whitespace, removing pyflakes warnings. --- setuptools/command/egg_info.py | 107 +++++++-------------------------- 1 file changed, 21 insertions(+), 86 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a0ba530590..a1ce862c04 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -3,7 +3,10 @@ Create a distribution's .egg-info directory and contents""" # This module should be kept compatible with Python 2.3 -import os, re, sys +import os +import re +import sys + from setuptools import Command from distutils.errors import * from distutils import log @@ -36,12 +39,6 @@ class egg_info(Command): negative_opt = {'no-svn-revision': 'tag-svn-revision', 'no-date': 'tag-date'} - - - - - - def initialize_options(self): self.egg_name = None self.egg_version = None @@ -55,35 +52,16 @@ def initialize_options(self): def save_version_info(self, filename): from setuptools.command.setopt import edit_config - edit_config( - filename, - {'egg_info': - {'tag_svn_revision':0, 'tag_date': 0, 'tag_build': self.tags()} - } + values = dict( + egg_info=dict( + tag_svn_revision=0, + tag_date=0, + tag_build=self.tags(), + ) ) + edit_config(filename, values) - - - - - - - - - - - - - - - - - - - - - - def finalize_options (self): + def finalize_options(self): self.egg_name = safe_name(self.distribution.get_name()) self.vtags = self.tags() self.egg_version = self.tagged_version() @@ -123,7 +101,6 @@ def finalize_options (self): pd._parsed_version = parse_version(self.egg_version) self.distribution._patched_dist = None - def write_or_delete_file(self, what, filename, data, force=False): """Write `data` to `filename` or delete if empty @@ -194,34 +171,14 @@ def tags(self): os.path.exists('.svn') or os.path.exists('PKG-INFO') ): version += '-r%s' % self.get_svn_revision() if self.tag_date: - import time; version += time.strftime("-%Y%m%d") + import time + version += time.strftime("-%Y%m%d") return version - - - - - - - - - - - - - - - - @staticmethod def get_svn_revision(): return str(svn_utils.SvnInfo.load(os.curdir).get_revision()) - - - - - def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info,"SOURCES.txt") @@ -269,17 +226,11 @@ def append(self, item): self.files.append(path) - - - - - - class manifest_maker(sdist): template = "MANIFEST.in" - def initialize_options (self): + def initialize_options(self): self.use_defaults = 1 self.prune = 1 self.manifest_only = 1 @@ -301,7 +252,7 @@ def run(self): self.filelist.remove_duplicates() self.write_manifest() - def write_manifest (self): + def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. @@ -340,7 +291,7 @@ def add_defaults(self): ei_cmd = self.get_finalized_command('egg_info') self.filelist.include_pattern("*", prefix=ei_cmd.egg_info) - def prune_file_list (self): + def prune_file_list(self): build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) @@ -349,7 +300,7 @@ def prune_file_list (self): self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1) -def write_file (filename, contents): +def write_file(filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ @@ -360,24 +311,12 @@ def write_file (filename, contents): f.write(contents) f.close() - - - - - - - - - - - - def write_pkg_info(cmd, basename, filename): log.info("writing %s", filename) if not cmd.dry_run: metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version - metadata.name, oldname = cmd.egg_name, metadata.name + metadata.name, oldname = cmd.egg_name, metadata.name try: # write unescaped data to PKG-INFO, so older pkg_resources # can still parse it @@ -406,14 +345,14 @@ def write_requirements(cmd, basename, filename): def write_toplevel_names(cmd, basename, filename): pkgs = dict.fromkeys( - [k.split('.',1)[0] + [ + k.split('.',1)[0] for k in cmd.distribution.iter_distribution_names() ] ) cmd.write_file("top-level names", filename, '\n'.join(pkgs)+'\n') - def overwrite_arg(cmd, basename, filename): write_arg(cmd, basename, filename, True) @@ -452,7 +391,3 @@ def get_pkg_info_revision(): return int(match.group(1)) f.close() return 0 - - - -# From b436cf3d092afc3021fe1d6bd1165762b60bf643 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:46:54 -0500 Subject: [PATCH 1657/8469] Remove import * --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a1ce862c04..b421612923 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -8,7 +8,7 @@ import sys from setuptools import Command -from distutils.errors import * +import distutils.errors from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring @@ -71,7 +71,7 @@ def finalize_options(self): parse_requirements('%s==%s' % (self.egg_name,self.egg_version)) ) except ValueError: - raise DistutilsOptionError( + raise distutils.errors.DistutilsOptionError( "Invalid distribution name or version syntax: %s-%s" % (self.egg_name,self.egg_version) ) From a14216e2f541e8b9f2f875ffeefeb4e5495eac1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:47:29 -0500 Subject: [PATCH 1658/8469] Prefer paranthetical import to line continuation. --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index b421612923..9b7e6b421a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -15,8 +15,8 @@ from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList -from pkg_resources import parse_requirements, safe_name, parse_version, \ - safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename +from pkg_resources import (parse_requirements, safe_name, parse_version, + safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) from setuptools.command.sdist import walk_revctrl From bc47a75d4d97f34f9ad49a5142c351c74354cd41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:48:22 -0500 Subject: [PATCH 1659/8469] Remove historical comment about compatibility. --- setuptools/command/egg_info.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9b7e6b421a..5953aad4f6 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -2,7 +2,6 @@ Create a distribution's .egg-info directory and contents""" -# This module should be kept compatible with Python 2.3 import os import re import sys From 8a94f99bfbb19859aed1d96e5d169c80b51936d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 13:58:22 -0500 Subject: [PATCH 1660/8469] Extract py31compat module for get_config_vars and get_path --- setuptools/command/easy_install.py | 17 +++-------------- setuptools/py31compat.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 setuptools/py31compat.py diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fd133b6c6e..61d5145032 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -32,19 +32,7 @@ import pkg_resources from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup -try: - # Python 2.7 or >=3.2 - from sysconfig import get_config_vars, get_path - def _get_platlib(): - return get_path("platlib") - def _get_purelib(): - return get_path("purelib") -except ImportError: - from distutils.sysconfig import get_config_vars, get_python_lib - def _get_platlib(): - return get_python_lib(True) - def _get_purelib(): - return get_python_lib(False) +from setuptools.py31compat import get_path, get_config_vars from distutils.util import get_platform from distutils.util import convert_path, subst_vars @@ -1288,7 +1276,8 @@ def get_site_dirs(): 'Python', sys.version[:3], 'site-packages')) - for site_lib in (_get_purelib(), _get_platlib()): + lib_paths = get_path('purelib'), get_path('platlib') + for site_lib in lib_paths: if site_lib not in sitedirs: sitedirs.append(site_lib) if HAS_USER_SITE: diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py new file mode 100644 index 0000000000..dbb324b0e3 --- /dev/null +++ b/setuptools/py31compat.py @@ -0,0 +1,11 @@ +__all__ = ['get_config_vars', 'get_path'] + +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') From 57bf0b99a118d93749fdeef7aad95c7d82e53be6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:00:50 -0500 Subject: [PATCH 1661/8469] Use dict lookup default for sys_executable --- setuptools/command/easy_install.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 61d5145032..2f422f4749 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -53,10 +53,8 @@ VersionConflict, DEVELOP_DIST, ) -if '__VENV_LAUNCHER__' in os.environ: - sys_executable = os.environ['__VENV_LAUNCHER__'] -else: - sys_executable = os.path.normpath(sys.executable) +sys_executable = os.environ.get('__VENV_LAUNCHER__', + os.path.normpath(sys.executable)) __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', From d52f1865ccc7cc10389ff731ff4e84302fd83010 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:12:05 -0500 Subject: [PATCH 1662/8469] Remove easy_install.HAS_USER_SITE and just defer to site.ENABLE_USER_SITE. --- CHANGES.txt | 3 +++ setuptools/command/easy_install.py | 14 ++++++-------- setuptools/tests/test_easy_install.py | 8 ++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1331de955d..2736d4c13c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ CHANGES * Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring setuptools for those versions of Python should use setuptools 1.x. +* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients + expecting this boolean variable should use ``site.ENABLE_USER_SITE`` + instead. ----- 1.4.1 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2f422f4749..9775bffcc2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -61,8 +61,6 @@ 'main', 'get_exe_prefixes', ] -HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE - def is_64bit(): return struct.calcsize("P") == 8 @@ -134,7 +132,7 @@ class easy_install(Command): 'no-deps', 'local-snapshots-ok', 'version' ] - if HAS_USER_SITE: + if site.ENABLE_USER_SITE: help_msg = "install in user site-package '%s'" % site.USER_SITE user_options.append(('user', None, help_msg)) boolean_options.append('user') @@ -143,7 +141,7 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): - if HAS_USER_SITE: + if site.ENABLE_USER_SITE: whereami = os.path.abspath(__file__) self.user = whereami.startswith(site.USER_SITE) else: @@ -168,7 +166,7 @@ def initialize_options(self): self.install_data = None self.install_base = None self.install_platbase = None - if HAS_USER_SITE: + if site.ENABLE_USER_SITE: self.install_userbase = site.USER_BASE self.install_usersite = site.USER_SITE else: @@ -226,13 +224,13 @@ def finalize_options(self): 'abiflags': getattr(sys, 'abiflags', ''), } - if HAS_USER_SITE: + if site.ENABLE_USER_SITE: self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite # fix the install_dir if "--user" was used #XXX: duplicate of the code in the setup command - if self.user and HAS_USER_SITE: + if self.user and site.ENABLE_USER_SITE: self.create_home_path() if self.install_userbase is None: raise DistutilsPlatformError( @@ -1278,7 +1276,7 @@ def get_site_dirs(): for site_lib in lib_paths: if site_lib not in sitedirs: sitedirs.append(site_lib) - if HAS_USER_SITE: + if site.ENABLE_USER_SITE: sitedirs.append(site.USER_SITE) sitedirs = list(map(normalize_path, sitedirs)) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 189e3d55df..bb1615d3f1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -141,7 +141,7 @@ def setUp(self): self.old_cwd = os.getcwd() os.chdir(self.dir) if sys.version >= "2.6": - self.old_has_site = easy_install_pkg.HAS_USER_SITE + self.old_enable_site = site.ENABLE_USER_SITE self.old_file = easy_install_pkg.__file__ self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() @@ -157,11 +157,11 @@ def tearDown(self): shutil.rmtree(site.USER_SITE) site.USER_BASE = self.old_base site.USER_SITE = self.old_site - easy_install_pkg.HAS_USER_SITE = self.old_has_site + site.ENABLE_USER_SITE = self.old_enable_site easy_install_pkg.__file__ = self.old_file def test_user_install_implied(self): - easy_install_pkg.HAS_USER_SITE = True # disabled sometimes + site.ENABLE_USER_SITE = True # disabled sometimes #XXX: replace with something meaningfull if sys.version < "2.6": return #SKIP @@ -178,7 +178,7 @@ def test_multiproc_atexit(self): _LOG.info('this should not break') def test_user_install_not_implied_without_usersite_enabled(self): - easy_install_pkg.HAS_USER_SITE = False # usually enabled + site.ENABLE_USER_SITE = False # usually enabled #XXX: replace with something meaningfull if sys.version < "2.6": return #SKIP From 6267e434d557e667edafe8842fe5c854e44105fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:16:02 -0500 Subject: [PATCH 1663/8469] Remove Python 2.5 compatibility in easy_install test setup. --- setuptools/tests/test_easy_install.py | 34 ++++++++++++--------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index bb1615d3f1..cdcad4fbb3 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -140,31 +140,29 @@ def setUp(self): f.close() self.old_cwd = os.getcwd() os.chdir(self.dir) - if sys.version >= "2.6": - self.old_enable_site = site.ENABLE_USER_SITE - self.old_file = easy_install_pkg.__file__ - self.old_base = site.USER_BASE - site.USER_BASE = tempfile.mkdtemp() - self.old_site = site.USER_SITE - site.USER_SITE = tempfile.mkdtemp() - easy_install_pkg.__file__ = site.USER_SITE + + self.old_enable_site = site.ENABLE_USER_SITE + self.old_file = easy_install_pkg.__file__ + self.old_base = site.USER_BASE + site.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = tempfile.mkdtemp() + easy_install_pkg.__file__ = site.USER_SITE def tearDown(self): os.chdir(self.old_cwd) shutil.rmtree(self.dir) - if sys.version >= "2.6": - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site - site.ENABLE_USER_SITE = self.old_enable_site - easy_install_pkg.__file__ = self.old_file + + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site + site.ENABLE_USER_SITE = self.old_enable_site + easy_install_pkg.__file__ = self.old_file def test_user_install_implied(self): site.ENABLE_USER_SITE = True # disabled sometimes #XXX: replace with something meaningfull - if sys.version < "2.6": - return #SKIP dist = Distribution() dist.script_name = 'setup.py' cmd = easy_install(dist) @@ -180,8 +178,6 @@ def test_multiproc_atexit(self): def test_user_install_not_implied_without_usersite_enabled(self): site.ENABLE_USER_SITE = False # usually enabled #XXX: replace with something meaningfull - if sys.version < "2.6": - return #SKIP dist = Distribution() dist.script_name = 'setup.py' cmd = easy_install(dist) From 88ce73b58748de6041073019f23d1aa6c23a3fb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:43:27 -0500 Subject: [PATCH 1664/8469] backout 983513e397f3 now that contextlib and with statements are available --- setuptools/tests/test_easy_install.py | 82 ++++++++++----------------- 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index cdcad4fbb3..5fba8c587b 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -6,6 +6,7 @@ import tempfile import unittest import site +import contextlib from setuptools.compat import StringIO, BytesIO, next from setuptools.compat import urlparse import textwrap @@ -269,9 +270,8 @@ def test_setup_requires(self): sys.stderr = StringIO() try: try: - reset_setup_stop_context( - lambda: run_setup(test_setup_py, ['install']) - ) + with reset_setup_stop_context(): + run_setup(test_setup_py, ['install']) except SandboxViolation: self.fail('Installation caused SandboxViolation') finally: @@ -296,45 +296,33 @@ def test_setup_requires_honors_fetch_params(self): # Some platforms (Jython) don't find a port to which to bind, # so skip this test for them. return - - # I realize this is all-but-impossible to read, because it was - # ported from some well-factored, safe code using 'with'. If you - # need to maintain this code, consider making the changes in - # the parent revision (of this comment) and then port the changes - # back for Python 2.4 (or deprecate Python 2.4). - - def install(dist_file): - def install_at(temp_install_dir): - def install_env(): + # create an sdist that has a build-time dependency. + with TestSetupRequires.create_sdist() as dist_file: + with tempdir_context() as temp_install_dir: + with environment_context(PYTHONPATH=temp_install_dir): ei_params = ['--index-url', p_index.url, '--allow-hosts', p_index_loc, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] - def install_clean_reset(): - def install_clean_argv(): + with reset_setup_stop_context(): + with argv_context(['easy_install']): # attempt to install the dist. It should fail because # it doesn't exist. self.assertRaises(SystemExit, easy_install_pkg.main, ei_params) - argv_context(install_clean_argv, ['easy_install']) - reset_setup_stop_context(install_clean_reset) - environment_context(install_env, PYTHONPATH=temp_install_dir) - tempdir_context(install_at) - - # create an sdist that has a build-time dependency. - self.create_sdist(install) - # there should have been two or three requests to the server # (three happens on Python 3.3a) self.assertTrue(2 <= len(p_index.requests) <= 3) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') - def create_sdist(self, installer): + @staticmethod + @contextlib.contextmanager + def create_sdist(): """ - Create an sdist with a setup_requires dependency (of something that - doesn't exist) and invoke installer on it. + Return an sdist with a setup_requires dependency (of something that + doesn't exist) """ - def build_sdist(dir): + with tempdir_context() as dir: dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz') make_trivial_sdist( dist_path, @@ -346,8 +334,7 @@ def build_sdist(dir): setup_requires = ['does-not-exist'], ) """).lstrip()) - installer(dist_path) - tempdir_context(build_sdist) + yield dist_path def make_trivial_sdist(dist_path, setup_py): @@ -370,44 +357,37 @@ def make_trivial_sdist(dist_path, setup_py): dist.close() -def tempdir_context(f, cd=lambda dir:None): - """ - Invoke f in the context - """ +@contextlib.contextmanager +def tempdir_context(cd=lambda dir:None): temp_dir = tempfile.mkdtemp() orig_dir = os.getcwd() try: cd(temp_dir) - f(temp_dir) + yield temp_dir finally: cd(orig_dir) shutil.rmtree(temp_dir) -def environment_context(f, **updates): - """ - Invoke f in the context - """ +@contextlib.contextmanager +def environment_context(**updates): old_env = os.environ.copy() os.environ.update(updates) try: - f() + yield finally: for key in updates: del os.environ[key] os.environ.update(old_env) -def argv_context(f, repl): - """ - Invoke f in the context - """ +@contextlib.contextmanager +def argv_context(repl): old_argv = sys.argv[:] sys.argv[:] = repl - try: - f() - finally: - sys.argv[:] = old_argv + yield + sys.argv[:] = old_argv -def reset_setup_stop_context(f): +@contextlib.contextmanager +def reset_setup_stop_context(): """ When the setuptools tests are run using setup.py test, and then one wants to invoke another setup() command (such as easy_install) @@ -416,7 +396,5 @@ def reset_setup_stop_context(f): """ setup_stop_after = distutils.core._setup_stop_after distutils.core._setup_stop_after = None - try: - f() - finally: - distutils.core._setup_stop_after = setup_stop_after + yield + distutils.core._setup_stop_after = setup_stop_after From 4ba80b5874929c4408f0af68a6ff2a152c03c314 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:49:22 -0500 Subject: [PATCH 1665/8469] Remove unused variable and clean whitespace --- setuptools/tests/test_easy_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 5fba8c587b..01f07e6734 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,7 +16,7 @@ from setuptools.compat import StringIO, BytesIO, next, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, nt_quote_arg -from setuptools.command.easy_install import PthDistributions +from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution from pkg_resources import Distribution as PRDistribution @@ -243,7 +243,6 @@ def test_setup_requires(self): test_pkg = os.path.join(self.dir, 'test_pkg') test_setup_py = os.path.join(test_pkg, 'setup.py') - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') os.mkdir(test_pkg) f = open(test_setup_py, 'w') From bb31268118c393bd686ec190e257e6e398a88855 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:49:48 -0500 Subject: [PATCH 1666/8469] Remove redundant imports --- setuptools/tests/test_easy_install.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 01f07e6734..f8663f0726 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -7,8 +7,6 @@ import unittest import site import contextlib -from setuptools.compat import StringIO, BytesIO, next -from setuptools.compat import urlparse import textwrap import tarfile import distutils.core From 074413b0804d00a6d1d62bad5b12fdef92291aeb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 14:51:14 -0500 Subject: [PATCH 1667/8469] Reindent long line --- setuptools/tests/test_easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f8663f0726..24436d7024 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,7 +13,8 @@ from setuptools.compat import StringIO, BytesIO, next, urlparse from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, nt_quote_arg +from setuptools.command.easy_install import ( + easy_install, fix_jython_executable, get_script_args, nt_quote_arg) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution From f8c923f27aa52c5447d8669e8246e3cc27282e21 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 15:00:08 -0500 Subject: [PATCH 1668/8469] Move the global import logic for test_multiproc_atexit into the test where it is used. --- setuptools/tests/test_easy_install.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 24436d7024..a90ae23fc1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -9,6 +9,7 @@ import contextlib import textwrap import tarfile +import logging import distutils.core from setuptools.compat import StringIO, BytesIO, next, urlparse @@ -21,17 +22,6 @@ from pkg_resources import Distribution as PRDistribution import setuptools.tests.server -try: - # import multiprocessing solely for the purpose of testing its existence - __import__('multiprocessing') - import logging - _LOG = logging.getLogger('test_easy_install') - logging.basicConfig(level=logging.INFO, stream=sys.stderr) - _MULTIPROC = True -except ImportError: - _MULTIPROC = False - _LOG = None - class FakeDist(object): def get_entry_map(self, group): if group != 'console_scripts': @@ -171,9 +161,15 @@ def test_user_install_implied(self): self.assertTrue(cmd.user, 'user should be implied') def test_multiproc_atexit(self): - if not _MULTIPROC: + try: + __import__('multiprocessing') + except ImportError: + # skip the test if multiprocessing is not available return - _LOG.info('this should not break') + + log = logging.getLogger('test_easy_install') + logging.basicConfig(level=logging.INFO, stream=sys.stderr) + log.info('this should not break') def test_user_install_not_implied_without_usersite_enabled(self): site.ENABLE_USER_SITE = False # usually enabled From 9c5b87a057da48d44457021e2dcb843eb7122977 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 15:08:41 -0500 Subject: [PATCH 1669/8469] Reorganize imports --- setuptools/command/build_py.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 8751acd493..c9aa07ed25 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -1,4 +1,6 @@ -import os.path, sys, fnmatch +import os +import sys +import fnmatch from distutils.command.build_py import build_py as _build_py from distutils.util import convert_path from glob import glob From 9ccef555dd1f257fd9fa15bdecdbf4c19196a180 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 15:20:38 -0500 Subject: [PATCH 1670/8469] Extracted module for lib2to3 Mixin customization. --- setuptools/command/build_py.py | 54 ++----------------------------- setuptools/lib2to3_ex.py | 58 ++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 52 deletions(-) create mode 100644 setuptools/lib2to3_ex.py diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index c9aa07ed25..0d8e8757f7 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -6,61 +6,11 @@ from glob import glob try: - from distutils.util import Mixin2to3 as _Mixin2to3 - # add support for converting doctests that is missing in 3.1 distutils - from distutils import log - from lib2to3.refactor import RefactoringTool, get_fixers_from_package - import setuptools - class DistutilsRefactoringTool(RefactoringTool): - def log_error(self, msg, *args, **kw): - log.error(msg, *args) - - def log_message(self, msg, *args): - log.info(msg, *args) - - def log_debug(self, msg, *args): - log.debug(msg, *args) - - class Mixin2to3(_Mixin2to3): - def run_2to3(self, files, doctests = False): - # See of the distribution option has been set, otherwise check the - # setuptools default. - if self.distribution.use_2to3 is not True: - return - if not files: - return - log.info("Fixing "+" ".join(files)) - self.__build_fixer_names() - self.__exclude_fixers() - if doctests: - if setuptools.run_2to3_on_doctests: - r = DistutilsRefactoringTool(self.fixer_names) - r.refactor(files, write=True, doctests_only=True) - else: - _Mixin2to3.run_2to3(self, files) - - def __build_fixer_names(self): - if self.fixer_names: return - self.fixer_names = [] - for p in setuptools.lib2to3_fixer_packages: - self.fixer_names.extend(get_fixers_from_package(p)) - if self.distribution.use_2to3_fixers is not None: - for p in self.distribution.use_2to3_fixers: - self.fixer_names.extend(get_fixers_from_package(p)) - - def __exclude_fixers(self): - excluded_fixers = getattr(self, 'exclude_fixers', []) - if self.distribution.use_2to3_exclude_fixers is not None: - excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers) - for fixer_name in excluded_fixers: - if fixer_name in self.fixer_names: - self.fixer_names.remove(fixer_name) - + from setuptools.lib2to3_ex import Mixin2to3 except ImportError: class Mixin2to3: def run_2to3(self, files, doctests=True): - # Nothing done in 2.x - pass + "do nothing" class build_py(_build_py, Mixin2to3): """Enhanced 'build_py' command that includes data files with packages diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py new file mode 100644 index 0000000000..feef591a88 --- /dev/null +++ b/setuptools/lib2to3_ex.py @@ -0,0 +1,58 @@ +""" +Customized Mixin2to3 support: + + - adds support for converting doctests + + +This module raises an ImportError on Python 2. +""" + +from distutils.util import Mixin2to3 as _Mixin2to3 +from distutils import log +from lib2to3.refactor import RefactoringTool, get_fixers_from_package +import setuptools + +class DistutilsRefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): + log.error(msg, *args) + + def log_message(self, msg, *args): + log.info(msg, *args) + + def log_debug(self, msg, *args): + log.debug(msg, *args) + +class Mixin2to3(_Mixin2to3): + def run_2to3(self, files, doctests = False): + # See of the distribution option has been set, otherwise check the + # setuptools default. + if self.distribution.use_2to3 is not True: + return + if not files: + return + log.info("Fixing "+" ".join(files)) + self.__build_fixer_names() + self.__exclude_fixers() + if doctests: + if setuptools.run_2to3_on_doctests: + r = DistutilsRefactoringTool(self.fixer_names) + r.refactor(files, write=True, doctests_only=True) + else: + _Mixin2to3.run_2to3(self, files) + + def __build_fixer_names(self): + if self.fixer_names: return + self.fixer_names = [] + for p in setuptools.lib2to3_fixer_packages: + self.fixer_names.extend(get_fixers_from_package(p)) + if self.distribution.use_2to3_fixers is not None: + for p in self.distribution.use_2to3_fixers: + self.fixer_names.extend(get_fixers_from_package(p)) + + def __exclude_fixers(self): + excluded_fixers = getattr(self, 'exclude_fixers', []) + if self.distribution.use_2to3_exclude_fixers is not None: + excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers) + for fixer_name in excluded_fixers: + if fixer_name in self.fixer_names: + self.fixer_names.remove(fixer_name) From a193991b4b347ecc403be76005e098d4abeef2b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 Nov 2013 15:25:35 -0500 Subject: [PATCH 1671/8469] Delint build_py --- setuptools/command/build_py.py | 43 +++++++++++++--------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 0d8e8757f7..090b44d265 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -1,6 +1,7 @@ import os import sys import fnmatch +import textwrap from distutils.command.build_py import build_py as _build_py from distutils.util import convert_path from glob import glob @@ -49,9 +50,10 @@ def run(self): # output files are. self.byte_compile(_build_py.get_outputs(self, include_bytecode=0)) - def __getattr__(self,attr): + def __getattr__(self, attr): if attr=='data_files': # lazily compute data files - self.data_files = files = self._get_data_files(); return files + self.data_files = files = self._get_data_files() + return files return _build_py.__getattr__(self,attr) def build_module(self, module, module_file, package): @@ -78,7 +80,7 @@ def _get_data_files(self): filenames = [ file[plen:] for file in self.find_data_files(package, src_dir) ] - data.append( (package, src_dir, build_dir, filenames) ) + data.append((package, src_dir, build_dir, filenames)) return data def find_data_files(self, package, src_dir): @@ -93,7 +95,6 @@ def find_data_files(self, package, src_dir): def build_package_data(self): """Copy data files into build directory""" - lastdir = None for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) @@ -104,7 +105,6 @@ def build_package_data(self): if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) - def analyze_manifest(self): self.manifest_files = mf = {} if not self.distribution.include_package_data: @@ -169,10 +169,10 @@ def check_package(self, package, package_dir): if 'declare_namespace'.encode() not in f.read(): from distutils import log log.warn( - "WARNING: %s is a namespace package, but its __init__.py does\n" - "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n" - '(See the setuptools manual under "Namespace Packages" for ' - "details.)\n", package + "WARNING: %s is a namespace package, but its __init__.py does\n" + "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n" + '(See the setuptools manual under "Namespace Packages" for ' + "details.)\n", package ) f.close() return init_py @@ -181,14 +181,12 @@ def initialize_options(self): self.packages_checked={} _build_py.initialize_options(self) - def get_package_dir(self, package): res = _build_py.get_package_dir(self, package) if self.distribution.src_root is not None: return os.path.join(self.distribution.src_root, res) return res - 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('', []) @@ -212,21 +210,12 @@ def assert_relative(path): if not os.path.isabs(path): return path from distutils.errors import DistutilsSetupError - raise DistutilsSetupError( -"""Error: setup script specifies an absolute path: - - %s - -setup() arguments must *always* be /-separated paths relative to the -setup.py directory, *never* absolute paths. -""" % path - ) - - - - - - - + msg = textwrap.dedent(""" + Error: setup script specifies an absolute path: + %s + setup() arguments must *always* be /-separated paths relative to the + setup.py directory, *never* absolute paths. + """).lstrip() % path + raise DistutilsSetupError(msg) From 698d467b411cef3fd3b06b522d9b70f6b5057976 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Nov 2013 12:24:41 -0500 Subject: [PATCH 1672/8469] Updated installation notes to describe installation on Python 2.4 and Python 2.5. --- README.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 53608bae8e..0cc3dd42fc 100755 --- a/README.txt +++ b/README.txt @@ -33,7 +33,7 @@ file and install it for you. For best results, uninstall previous versions FIRST (see `Uninstalling`_). -Once installation is complete, you will find an ``easy_install.exe`` program in +Once installation is complete, you will find an ``easy_install`` program in your Python ``Scripts`` subdirectory. For simple invocation and best results, add this directory to your ``PATH`` environment variable, if it is not already present. @@ -48,7 +48,9 @@ will download the appropriate version and install it for you:: > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to -install to the system Python. +install to the system Python:: + + > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: @@ -57,6 +59,14 @@ user-local path:: > python ez_setup.py --user +Python 2.4 and Python 2.5 support +================================= + +Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools +on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x: +https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py. + + Advanced Installation ===================== From 1199d17859540ba791ad81cf44d08f293c0acd64 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Nov 2013 12:27:44 -0500 Subject: [PATCH 1673/8469] Moved merge documentation to the end, reducing the prominence of the docs. --- docs/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index 8c68651def..53839beed9 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -16,7 +16,6 @@ Documentation content: .. toctree:: :maxdepth: 2 - merge roadmap python3 using @@ -24,3 +23,4 @@ Documentation content: easy_install pkg_resources development + merge From bf9c84eadae80290a5cd2cadd2c9b5b5e456e546 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Nov 2013 12:27:54 -0500 Subject: [PATCH 1674/8469] Updated roadmap to reflect current status. --- docs/roadmap.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 44bcdb0ff8..8f175b9f75 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -2,13 +2,5 @@ Roadmap ======= -Setuptools has merged with Distribute and to provide a unified codebase for -ongoing development. - -This new effort will draw from the resources of both projects to leverage -community contribution for ongoing advancement but also maintain stability -for the user base. - -An initial release of Setuptools 0.7 will attempt to be compatible both with -Setuptools 0.6c11 and Distribute 0.6.36. Where compatibility cannot be -achieved, the changes should be well-documented. +Setuptools is primarily in maintenance mode. The project attempts to address +user issues, concerns, and feature requests in a timely fashion. From f9bfe4d3011feff382adfbd8ee87a3701e03ce28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 05:21:03 -0500 Subject: [PATCH 1675/8469] Modernize syntax --- pkg_resources.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index be8c6c57f9..3334bdfab1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1891,14 +1891,17 @@ def _handle_ns(packageName, path_item): module = sys.modules.get(packageName) if module is None: module = sys.modules[packageName] = imp.new_module(packageName) - module.__path__ = []; _set_parent_ns(packageName) + module.__path__ = [] + _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) handler = _find_adapter(_namespace_handlers, importer) subpath = handler(importer,path_item,packageName,module) if subpath is not None: - path = module.__path__; path.append(subpath) - loader.load_module(packageName); module.__path__ = path + path = module.__path__ + path.append(subpath) + loader.load_module(packageName) + module.__path__ = path return subpath def declare_namespace(packageName): @@ -2409,7 +2412,6 @@ def insert_on(self, path, loc = None): bdir = os.path.dirname(nloc) npath= [(p and _normalize_cached(p) or p) for p in path] - bp = None for p, item in enumerate(npath): if item==nloc: break From 051b809052ca5531320cdfbfa5161b4afe9d6b2f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 05:24:31 -0500 Subject: [PATCH 1676/8469] Remove internal implementation of ImpImporter and ImpLoader as comments indicate they're only required for Python 2.4. --- pkg_resources.py | 76 +----------------------------------------------- 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 3334bdfab1..71f46f6055 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1701,81 +1701,7 @@ def __init__(self, importer): self.module_path = importer.archive self._setup_prefix() - -class ImpWrapper: - """PEP 302 Importer that wraps Python's "normal" import algorithm""" - - def __init__(self, path=None): - self.path = path - - def find_module(self, fullname, path=None): - subname = fullname.split(".")[-1] - if subname != fullname and self.path is None: - return None - if self.path is None: - path = None - else: - path = [self.path] - try: - file, filename, etc = imp.find_module(subname, path) - except ImportError: - return None - return ImpLoader(file, filename, etc) - - -class ImpLoader: - """PEP 302 Loader that wraps Python's "normal" import algorithm""" - - def __init__(self, file, filename, etc): - self.file = file - self.filename = filename - self.etc = etc - - def load_module(self, fullname): - try: - mod = imp.load_module(fullname, self.file, self.filename, self.etc) - finally: - if self.file: self.file.close() - # Note: we don't set __loader__ because we want the module to look - # normal; i.e. this is just a wrapper for standard import machinery - return mod - - -def get_importer(path_item): - """Retrieve a PEP 302 "importer" for the given path item - - If there is no importer, this returns a wrapper around the builtin import - machinery. The returned importer is only cached if it was created by a - path hook. - """ - try: - importer = sys.path_importer_cache[path_item] - except KeyError: - for hook in sys.path_hooks: - try: - importer = hook(path_item) - except ImportError: - pass - else: - break - else: - importer = None - - sys.path_importer_cache.setdefault(path_item,importer) - if importer is None: - try: - importer = ImpWrapper(path_item) - except ImportError: - pass - return importer - -try: - from pkgutil import get_importer, ImpImporter -except ImportError: - pass # Python 2.3 or 2.4, use our own implementation -else: - ImpWrapper = ImpImporter # Python 2.5, use pkgutil's implementation - del ImpLoader, ImpImporter +from pkgutil import get_importer, ImpImporter as ImpWrapper _declare_state('dict', _distribution_finders = {}) From 7e656969999482e4a51aabe16e8200180270e4f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 05:25:12 -0500 Subject: [PATCH 1677/8469] Move import to the header --- pkg_resources.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 71f46f6055..828f9443cd 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -23,6 +23,7 @@ import warnings import stat import functools +from pkgutil import get_importer, ImpImporter as ImpWrapper try: from urlparse import urlparse, urlunparse @@ -1701,9 +1702,6 @@ def __init__(self, importer): self.module_path = importer.archive self._setup_prefix() -from pkgutil import get_importer, ImpImporter as ImpWrapper - - _declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): From 4e2c005f8702ed7e2bce31425748eb83f3e9db0f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 05:33:34 -0500 Subject: [PATCH 1678/8469] Use pkgutil namespace. Still export get_importer as it's referenced in __all__. --HG-- extra : amend_source : fe3ad40ffbb67cc7f3407a37ac42671ea3ecb983 --- CHANGES.txt | 2 ++ pkg_resources.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2736d4c13c..d28b07beb9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES * Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients expecting this boolean variable should use ``site.ENABLE_USER_SITE`` instead. +* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class + should use ``pkgutil.ImpImporter`` instead. ----- 1.4.1 diff --git a/pkg_resources.py b/pkg_resources.py index 828f9443cd..36a7b3069e 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -23,7 +23,8 @@ import warnings import stat import functools -from pkgutil import get_importer, ImpImporter as ImpWrapper +import pkgutil +from pkgutil import get_importer try: from urlparse import urlparse, urlunparse @@ -1778,7 +1779,7 @@ def find_on_path(importer, path_item, only=False): for item in find_distributions(os.path.join(path_item,line.rstrip())): yield item break -register_finder(ImpWrapper,find_on_path) +register_finder(pkgutil.ImpImporter,find_on_path) if importlib_bootstrap is not None: register_finder(importlib_bootstrap.FileFinder, find_on_path) @@ -1882,7 +1883,7 @@ def file_ns_handler(importer, path_item, packageName, module): # Only return the path if it's not already there return subpath -register_namespace_handler(ImpWrapper,file_ns_handler) +register_namespace_handler(pkgutil.ImpImporter,file_ns_handler) register_namespace_handler(zipimport.zipimporter,file_ns_handler) if importlib_bootstrap is not None: From 35d9509cd23b7830c91398fa5b3f2ffe6ffe7403 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 05:49:33 -0500 Subject: [PATCH 1679/8469] Reindent for clarity --- setuptools/package_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4a3f49c72c..4ffafa286e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1053,5 +1053,5 @@ def local_open(url): else: status, message, body = 404, "Path not found", "Not found" - return HTTPError(url, status, message, - {'content-type':'text/html'}, StringIO(body)) + headers = {'content-type': 'text/html'} + return HTTPError(url, status, message, headers, StringIO(body)) From a87729f8b64b95cc203ae8e71fc6b5150725e1e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 06:05:38 -0500 Subject: [PATCH 1680/8469] Adding test capturing #116 --- setuptools/tests/test_packageindex.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 08969b7e8c..5a0c3946e4 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -151,6 +151,20 @@ def test__vcs_split_rev_from_url(self): self.assertEqual(url, 'https://example.com/bar') self.assertEqual(rev, '2995') + def test_local_index(self): + f = open('index.html', 'w') + f.write('
content
') + f.close() + try: + import urllib.request + import os + url = 'file:' + urllib.request.pathname2url(os.getcwd()) + '/' + res = setuptools.package_index.local_open(url) + finally: + os.remove('index.html') + assert 'content' in res.read() + + class TestContentCheckers(unittest.TestCase): def test_md5(self): From 4ae4faeb1262435260ee8a5f2a0ab910fe96ea23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 06:08:30 -0500 Subject: [PATCH 1681/8469] Moved imports to the top, made them compatible with Python 2, and added a docstring. --- setuptools/compat.py | 4 ++-- setuptools/tests/test_packageindex.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index bbc98d6644..9a191465bb 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -27,7 +27,7 @@ unichr = unichr unicode = unicode bytes = str - from urllib import url2pathname, splittag + from urllib import url2pathname, splittag, pathname2url import urllib2 from urllib2 import urlopen, HTTPError, URLError, unquote, splituser from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit @@ -73,7 +73,7 @@ def exec_(code, globs=None, locs=None): bytes = bytes from urllib.error import HTTPError, URLError import urllib.request as urllib2 - from urllib.request import urlopen, url2pathname + from urllib.request import urlopen, url2pathname, pathname2url from urllib.parse import ( urlparse, urlunparse, unquote, splituser, urljoin, urlsplit, urlunsplit, splittag, diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 5a0c3946e4..664566a36c 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,9 +1,10 @@ """Package Index Tests """ import sys +import os import unittest import pkg_resources -from setuptools.compat import urllib2, httplib, HTTPError, unicode +from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url import distutils.errors import setuptools.package_index from setuptools.tests.server import IndexServer @@ -152,13 +153,14 @@ def test__vcs_split_rev_from_url(self): self.assertEqual(rev, '2995') def test_local_index(self): + """ + local_open should be able to read an index from the file system. + """ f = open('index.html', 'w') f.write('
content
') f.close() try: - import urllib.request - import os - url = 'file:' + urllib.request.pathname2url(os.getcwd()) + '/' + url = 'file:' + pathname2url(os.getcwd()) + '/' res = setuptools.package_index.local_open(url) finally: os.remove('index.html') From ec3014377e1369116da3bf71b6c5acaa3168b9dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 06:12:06 -0500 Subject: [PATCH 1682/8469] Corrected a TypeError when reading a local package index on Python 3. Fixes #116. --- CHANGES.txt | 7 +++++++ setuptools/package_index.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b20d16839c..09c6479ea8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +1.4.2 +----- + +* Issue #116: Correct TypeError when reading a local package index on Python + 3. + ----- 1.4.1 ----- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4ffafa286e..ef247cf3c8 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1039,7 +1039,7 @@ def local_open(url): files = [] for f in os.listdir(filename): if f=='index.html': - fp = open(os.path.join(filename,f),'rb') + fp = open(os.path.join(filename,f),'r') body = fp.read() fp.close() break From 6d127bcf9ce4a600d5fea2120eb5c85e376d7b17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 06:15:19 -0500 Subject: [PATCH 1683/8469] Added tag 1.4.2 for changeset 274cb3beba4f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c01565ac3d..ab959fc35e 100644 --- a/.hgtags +++ b/.hgtags @@ -109,3 +109,4 @@ a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 0d1bdb99a535a2c7ed4edd37141fb0b54348b713 1.4b1 a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 9a5f26d7df8ef779cb5f40cc0389343fb4c61365 1.4.1 +274cb3beba4f22d5f461b0578b6d56e171d94f2e 1.4.2 From af3e8f78ae796b4e517547608a6cafaa835c430f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2013 06:15:45 -0500 Subject: [PATCH 1684/8469] Bumped to 1.4.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 92 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 6 +- setuptools/version.py | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9dc2c8729b..9b380b0131 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.4.2" +DEFAULT_VERSION = "1.4.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 2bf6c8ce4e..f574d18208 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -include_package_data = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data - -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info - [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap [console_scripts] -easy_install = setuptools.command.easy_install:main easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg [distutils.commands] -sdist = setuptools.command.sdist:sdist -rotate = setuptools.command.rotate:rotate +egg_info = setuptools.command.egg_info:egg_info +saveopts = setuptools.command.saveopts:saveopts +develop = setuptools.command.develop:develop test = setuptools.command.test:test -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -build_ext = setuptools.command.build_ext:build_ext -install_lib = setuptools.command.install_lib:install_lib -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst easy_install = setuptools.command.easy_install:easy_install -register = setuptools.command.register:register -alias = setuptools.command.alias:alias +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst install = setuptools.command.install:install +register = setuptools.command.register:register +setopt = setuptools.command.setopt:setopt +build_ext = setuptools.command.build_ext:build_ext upload_docs = setuptools.command.upload_docs:upload_docs -develop = setuptools.command.develop:develop -install_scripts = setuptools.command.install_scripts:install_scripts -egg_info = setuptools.command.egg_info:egg_info install_egg_info = setuptools.command.install_egg_info:install_egg_info -setopt = setuptools.command.setopt:setopt +alias = setuptools.command.alias:alias +sdist = setuptools.command.sdist:sdist bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_lib = setuptools.command.install_lib:install_lib + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +zip_safe = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +entry_points = setuptools.dist:check_entry_points +tests_require = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +dependency_links = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +include_package_data = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +eager_resources = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +use_2to3_fixers = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e4fb4954ff..256342f0e4 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[ssl:sys_platform=='win32' and python_version=='2.4'] -ctypes==1.0.2 - [ssl:sys_platform=='win32'] wincertstore==0.1 [certs] certifi==0.0.8 +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2 + [ssl:python_version in '2.4, 2.5'] ssl==1.16 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 98d186bed7..4e7c72a597 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.4.2' +__version__ = '1.4.3' From 8bbdac7d065e408f3f320e4523274e10e1c469fc Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 7 Dec 2013 00:13:19 -0600 Subject: [PATCH 1685/8469] Modified setuptools.test.environment.ZipEnvironment to not choke on a bypassed setUp. test_egg_info, test_sdist, and test_svn all had tests that needed to be bypassed when svn was not present. tests.py26compat contains a SkipIf decorator for skipping. This worked after ironing a few wrinkles. The conditions is evaluated and stored in test_svn._svn_check. --- setuptools/tests/environment.py | 7 +++++++ setuptools/tests/test_egg_info.py | 21 +++++++++++++-------- setuptools/tests/test_sdist.py | 7 ++++++- setuptools/tests/test_svn.py | 31 +++++++++++++++++++++++++++---- 4 files changed, 53 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index bd2c53d2a2..476d280ae2 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -78,6 +78,9 @@ class ZippedEnvironment(unittest.TestCase): old_cwd = None def setUp(self): + if self.datafile is None or self.dataname is None: + return + if not os.path.isfile(self.datafile): self.old_cwd = None return @@ -98,6 +101,10 @@ def setUp(self): os.chdir(os.path.join(self.temp_dir, self.dataname)) def tearDown(self): + #Assume setUp was never completed + if self.dataname is None or self.datafile is None: + return + try: if self.old_cwd: os.chdir(self.old_cwd) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 28682dfd0b..278543662f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -8,8 +8,9 @@ import pkg_resources import warnings from setuptools.command import egg_info -from setuptools.tests import environment from setuptools import svn_utils +from setuptools.tests import environment, test_svn +from setuptools.tests.py26compat import skipIf ENTRIES_V10 = pkg_resources.resource_string(__name__, 'entries-v10') "An entries file generated with svn 1.6.17 against the legacy Setuptools repo" @@ -33,7 +34,8 @@ def _write_entries(self, entries): entries_f = open(fn, 'wb') entries_f.write(entries) entries_f.close() - + + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_version_10_format(self): """ """ @@ -60,11 +62,9 @@ def test_version_10_format_legacy_parser(self): if env.lower() == 'path': path_variable = env - if path_variable is None: - self.skipTest('Cannot figure out how to modify path') - - old_path = os.environ[path_variable] - os.environ[path_variable] = '' + if path_variable: + old_path = os.environ[path_variable] + os.environ[path_variable] = '' #catch_warnings not available until py26 warning_filters = warnings.filters warnings.filters = warning_filters[:] @@ -76,7 +76,8 @@ def test_version_10_format_legacy_parser(self): #restore the warning filters warnings.filters = warning_filters #restore the os path - os.environ[path_variable] = old_path + if path_variable: + os.environ[path_variable] = old_path self.assertEqual(rev, '89000') @@ -99,6 +100,9 @@ class TestSvnDummy(environment.ZippedEnvironment): def setUp(self): version = svn_utils.SvnInfo.get_svn_version() + if not version: # None or Empty + return None + self.base_version = tuple([int(x) for x in version.split('.')][:2]) if not self.base_version: @@ -114,6 +118,7 @@ def setUp(self): 'svn_data', self.dataname + ".zip") super(TestSvnDummy, self).setUp() + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_sources(self): code, data = environment.run_setup_py(["sdist"], pypath=self.old_cwd, diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index b42dcc5769..71d10757bc 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,8 @@ import unittest import unicodedata import re -from setuptools.tests import environment +from setuptools.tests import environment, test_svn +from setuptools.tests.py26compat import skipIf from setuptools.compat import StringIO, unicode from setuptools.tests.py26compat import skipIf @@ -473,6 +474,9 @@ class TestSvn(environment.ZippedEnvironment): def setUp(self): version = svn_utils.SvnInfo.get_svn_version() + if not version: # None or Empty + return + self.base_version = tuple([int(x) for x in version.split('.')][:2]) if not self.base_version: @@ -488,6 +492,7 @@ def setUp(self): 'svn_data', self.dataname + ".zip") super(TestSvn, self).setUp() + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_walksvn(self): if self.base_version >= (1, 6): folder2 = 'third party2' diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 5418b9a43e..afee32b6d2 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -3,12 +3,25 @@ import os +import sys import unittest import codecs +import subprocess from setuptools.tests import environment from setuptools.compat import unicode, unichr from setuptools import svn_utils +from setuptools.tests.py26compat import skipIf + + +def _do_svn_check(): + try: + subprocess.check_call(["svn", "--version"], + shell=(sys.platform == 'win32')) + return True + except (OSError, subprocess.CalledProcessError): + return False +_svn_check = _do_svn_check() class TestSvnVersion(unittest.TestCase): @@ -20,7 +33,10 @@ def test_no_svn_found(self): path_variable = env if path_variable is None: - self.skipTest('Cannot figure out how to modify path') + try: + self.skipTest('Cannot figure out how to modify path') + except AttributeError: # PY26 doesn't have this + return old_path = os.environ[path_variable] os.environ[path_variable] = '' @@ -30,6 +46,7 @@ def test_no_svn_found(self): finally: os.environ[path_variable] = old_path + @skipIf(not _svn_check, "No SVN to text, in the first place") def test_svn_should_exist(self): version = svn_utils.SvnInfo.get_svn_version() self.assertNotEqual(version, '') @@ -169,11 +186,14 @@ class TestSvn(environment.ZippedEnvironment): def setUp(self): version = svn_utils.SvnInfo.get_svn_version() + if not version: # empty or null + self.dataname = None + self.datafile = None + return + self.base_version = tuple([int(x) for x in version.split('.')[:2]]) - if not self.base_version: - raise ValueError('No SVN tools installed') - elif self.base_version < (1,3): + if self.base_version < (1,3): raise ValueError('Insufficient SVN Version %s' % version) elif self.base_version >= (1,9): #trying the latest version @@ -184,10 +204,12 @@ def setUp(self): 'svn_data', self.dataname + ".zip") super(TestSvn, self).setUp() + @skipIf(not _svn_check, "No SVN to text, in the first place") def test_revision(self): rev = svn_utils.SvnInfo.load('.').get_revision() self.assertEqual(rev, 6) + @skipIf(not _svn_check, "No SVN to text, in the first place") def test_entries(self): expected = set([ (os.path.join('a file'), 'file'), @@ -200,6 +222,7 @@ def test_entries(self): info = svn_utils.SvnInfo.load('.') self.assertEqual(set(x for x in info.entries), expected) + @skipIf(not _svn_check, "No SVN to text, in the first place") def test_externals(self): if self.base_version >= (1,6): folder2 = 'third party2' From 7a8e4a536be8c6cc8f313e6f0e6b907ffc55b205 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 11:44:40 -0500 Subject: [PATCH 1686/8469] Normalize whitespace in function signatures --HG-- extra : histedit_source : 471b9c3fbde309c39492f2a567a26993c1dc94de --- setuptools/sandbox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 6dd1ca0784..7354e46a7f 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -220,7 +220,7 @@ def _open(self, path, mode='r', *args, **kw): def tmpnam(self): self._violation("tmpnam") - def _ok(self,path): + def _ok(self, path): active = self._active try: self._active = False @@ -235,13 +235,13 @@ def _exempted(self, filepath): exception_matches = map(filepath.startswith, self._exceptions) return True in exception_matches - def _remap_input(self,operation,path,*args,**kw): + def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" if operation in self.write_ops and not self._ok(path): self._violation(operation, os.path.realpath(path), *args, **kw) return path - def _remap_pair(self,operation,src,dst,*args,**kw): + def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" if not self._ok(src) or not self._ok(dst): self._violation(operation, src, dst, *args, **kw) From 47a464565e66612086c02d35c470ad20909e3931 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 11:55:44 -0500 Subject: [PATCH 1687/8469] Always return a boolean in DirectorySandbox._ok --HG-- extra : histedit_source : b0072af02db4ba170105a4eb3f8a033dce678869 --- setuptools/sandbox.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 7354e46a7f..49c4ea93ad 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -200,7 +200,10 @@ class DirectorySandbox(AbstractSandbox): def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) self._prefix = os.path.join(self._sandbox,'') - self._exceptions = [os.path.normcase(os.path.realpath(path)) for path in exceptions] + self._exceptions = [ + os.path.normcase(os.path.realpath(path)) + for path in exceptions + ] AbstractSandbox.__init__(self) def _violation(self, operation, *args, **kw): @@ -225,9 +228,11 @@ def _ok(self, path): try: self._active = False realpath = os.path.normcase(os.path.realpath(path)) - if (self._exempted(realpath) or realpath == self._sandbox - or realpath.startswith(self._prefix)): - return True + return ( + self._exempted(realpath) + or realpath == self._sandbox + or realpath.startswith(self._prefix) + ) finally: self._active = active From f196854eeb75ecd5b3e676e29b0f29137af25826 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 12:14:52 -0500 Subject: [PATCH 1688/8469] Use any for matching exceptions in DirectorySandbox. --HG-- extra : histedit_source : 9a99f28235a96543a3ca2da4ec691da0e1cd880c --- setuptools/sandbox.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 49c4ea93ad..d50f1f6629 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -237,8 +237,11 @@ def _ok(self, path): self._active = active def _exempted(self, filepath): - exception_matches = map(filepath.startswith, self._exceptions) - return True in exception_matches + exception_matches = any( + filepath.startswith(exception) + for exception in self._exceptions + ) + return exception_matches def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" From 3915375e6b94d7f41be271aec3c3e37efcba8c27 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 12:15:25 -0500 Subject: [PATCH 1689/8469] Use any on a generator instead --HG-- extra : histedit_source : 7924e09d06d2f6db58371735314caeee77aa2d3d --- setuptools/sandbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index d50f1f6629..50fb02a3f1 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -237,11 +237,11 @@ def _ok(self, path): self._active = active def _exempted(self, filepath): - exception_matches = any( + exception_matches = ( filepath.startswith(exception) for exception in self._exceptions ) - return exception_matches + return any(exception_matches) def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" From ef565f9ddd20ca66d1c1ff57da4ceb91038010e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 12:28:15 -0500 Subject: [PATCH 1690/8469] Add support for exempting a path based on a regular expression. --HG-- extra : histedit_source : 2f1f4146ec1d5196cb65602302185a12060cfa17 --- setuptools/sandbox.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 50fb02a3f1..26960846e9 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -3,6 +3,8 @@ import tempfile import operator import functools +import itertools +import re import pkg_resources @@ -197,6 +199,9 @@ class DirectorySandbox(AbstractSandbox): "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam", ]) + _exception_patterns = [] + "allow writing to paths that match the pattern" + def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) self._prefix = os.path.join(self._sandbox,'') @@ -237,11 +242,16 @@ def _ok(self, path): self._active = active def _exempted(self, filepath): - exception_matches = ( + start_matches = ( filepath.startswith(exception) for exception in self._exceptions ) - return any(exception_matches) + pattern_matches = ( + re.match(pattern, filepath) + for pattern in self._exception_patterns + ) + candidates = itertools.chain(start_matches, pattern_matches) + return any(candidates) def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" From d30d526eb40a4855a3589d895aac75900aedfc44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 12:36:45 -0500 Subject: [PATCH 1691/8469] Exempt lib2to3 pickled grammars from the DirectorySandboxing. Fixes #121. --HG-- extra : histedit_source : 6cd9a3c6003d3f6de2f8e676b61589db4dffafb0 --- CHANGES.txt | 1 + setuptools/sandbox.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f04f5b916a..90e2aaa8fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 2.0 --- +* Issue #121: Exempt lib2to3 pickled grammars from DirectorySandbox. * Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring setuptools for those versions of Python should use setuptools 1.x. * Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 26960846e9..042c595897 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -199,8 +199,11 @@ class DirectorySandbox(AbstractSandbox): "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam", ]) - _exception_patterns = [] - "allow writing to paths that match the pattern" + _exception_patterns = [ + # Allow lib2to3 to attempt to save a pickled grammar object (#121) + '.*lib2to3.*\.pickle$', + ] + "exempt writing to paths that match the pattern" def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) From 6e2a9a85733698257f6c5e8df571bb0b50ab8096 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 13:28:41 -0500 Subject: [PATCH 1692/8469] Added tag 2.0 for changeset 0bb1df93c2ea --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ab959fc35e..528c2336f7 100644 --- a/.hgtags +++ b/.hgtags @@ -110,3 +110,4 @@ a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 9a5f26d7df8ef779cb5f40cc0389343fb4c61365 1.4.1 274cb3beba4f22d5f461b0578b6d56e171d94f2e 1.4.2 +0bb1df93c2eaa50e95ccfce18208b0cca20ebae3 2.0 From 1b36a4f1bd2b098eb1b83f795ec0aa6fe6652e44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Dec 2013 13:29:08 -0500 Subject: [PATCH 1693/8469] Bumped to 2.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 94 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2aa994b337..371000f9bd 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.0" +DEFAULT_VERSION = "2.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index d423a67d0d..23b577f60a 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [distutils.setup_keywords] -use_2to3_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements +exclude_package_data = setuptools.dist:check_package_data include_package_data = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras -test_loader = setuptools.dist:check_importable +entry_points = setuptools.dist:check_entry_points +dependency_links = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +package_data = setuptools.dist:check_package_data tests_require = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite +namespace_packages = setuptools.dist:check_nsp zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +eager_resources = setuptools.dist:assert_string_list + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +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 +PKG-INFO = setuptools.command.egg_info:write_pkg_info +entry_points.txt = setuptools.command.egg_info:write_entries [distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install_egg_info = setuptools.command.install_egg_info:install_egg_info +egg_info = setuptools.command.egg_info:egg_info +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +rotate = setuptools.command.rotate:rotate +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +upload_docs = setuptools.command.upload_docs:upload_docs +build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt +develop = setuptools.command.develop:develop +install_lib = setuptools.command.install_lib:install_lib test = setuptools.command.test:test -install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts register = setuptools.command.register:register -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg -egg_info = setuptools.command.egg_info:egg_info build_ext = setuptools.command.build_ext:build_ext -setopt = setuptools.command.setopt:setopt easy_install = setuptools.command.easy_install:easy_install -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_lib = setuptools.command.install_lib:install_lib -rotate = setuptools.command.rotate:rotate -sdist = setuptools.command.sdist:sdist alias = setuptools.command.alias:alias -saveopts = setuptools.command.saveopts:saveopts -build_py = setuptools.command.build_py:build_py -install_egg_info = setuptools.command.install_egg_info:install_egg_info -install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +bdist_egg = setuptools.command.bdist_egg:bdist_egg +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 9a6bf43731..4fd464d812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 3b3dacb9af..d980f276af 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.0' +__version__ = '2.1' From ac8e93fa52d31e906391b937d9cfe98b3b98874d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Dec 2013 09:11:53 -0500 Subject: [PATCH 1694/8469] Remove unreachable code --- pkg_resources.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 36a7b3069e..4a69564a26 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1225,7 +1225,6 @@ def interpret(nodelist): op = _ops[nodelist[0]] except KeyError: raise SyntaxError("Comparison or logical expression expected") - raise SyntaxError("Language feature not supported in environment markers: "+symbol.sym_name[nodelist[0]]) return op(nodelist) def evaluate(nodelist): From 6dd1517317b3457df2370ac8bd9e0d070251e2bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Dec 2013 09:12:03 -0500 Subject: [PATCH 1695/8469] Remove commented code --- pkg_resources.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4a69564a26..cf81e7523b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1231,7 +1231,6 @@ def evaluate(nodelist): while len(nodelist)==2: nodelist = nodelist[1] kind = nodelist[0] name = nodelist[1] - #while len(name)==2: name = name[1] if kind==NAME: try: op = _marker_values[name] From 706797871041656997c422c76db0e834c9aa6b55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Dec 2013 10:00:57 -0500 Subject: [PATCH 1696/8469] Remove _marker_names (unused) --- pkg_resources.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index cf81e7523b..31411d22ba 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1103,12 +1103,6 @@ def to_filename(name): """ return name.replace('-','_') -_marker_names = { - 'os': ['name'], 'sys': ['platform'], - 'platform': ['version','machine','python_implementation'], - 'python_version': [], 'python_full_version': [], 'extra':[], -} - _marker_values = { 'os_name': lambda: os.name, 'sys_platform': lambda: sys.platform, From 5dfdad23a56b4187222274785b6ed9a7996a92e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Dec 2013 10:05:17 -0500 Subject: [PATCH 1697/8469] Encapsulate marker evaluation functionality in a class. --- pkg_resources.py | 212 ++++++++++++++++++++++++++--------------------- 1 file changed, 116 insertions(+), 96 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 31411d22ba..42b20e3a7f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -24,6 +24,9 @@ import stat import functools import pkgutil +import token +import symbol +import operator from pkgutil import get_importer try: @@ -1103,16 +1106,6 @@ def to_filename(name): """ return name.replace('-','_') -_marker_values = { - 'os_name': lambda: os.name, - 'sys_platform': lambda: sys.platform, - 'python_full_version': lambda: sys.version.split()[0], - 'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]), - 'platform_version': lambda: _platinfo('version'), - 'platform_machine': lambda: _platinfo('machine'), - 'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(), -} - def _platinfo(attr): try: import platform @@ -1130,108 +1123,133 @@ def _pyimp(): else: return 'CPython' -def normalize_exception(exc): - """ - Given a SyntaxError from a marker evaluation, normalize the error message: - - Remove indications of filename and line number. - - Replace platform-specific error messages with standard error messages. - """ - subs = { - 'unexpected EOF while parsing': 'invalid syntax', - 'parenthesis is never closed': 'invalid syntax', + +class MarkerEvaluation(object): + values = { + 'os_name': lambda: os.name, + 'sys_platform': lambda: sys.platform, + 'python_full_version': lambda: sys.version.split()[0], + 'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]), + 'platform_version': lambda: _platinfo('version'), + 'platform_machine': lambda: _platinfo('machine'), + 'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(), } - exc.filename = None - exc.lineno = None - exc.msg = subs.get(exc.msg, exc.msg) - return exc + @classmethod + def is_invalid_marker(cls, text): + """ + Validate text as a PEP 426 environment marker; return an exception + if invalid or False otherwise. + """ + try: + cls.evaluate_marker(text) + except SyntaxError: + return cls.normalize_exception(sys.exc_info()[1]) + return False -def invalid_marker(text): - """Validate text as a PEP 426 environment marker; return exception or False""" - try: - evaluate_marker(text) - except SyntaxError: - return normalize_exception(sys.exc_info()[1]) - return False + @staticmethod + def normalize_exception(exc): + """ + Given a SyntaxError from a marker evaluation, normalize the error message: + - Remove indications of filename and line number. + - Replace platform-specific error messages with standard error messages. + """ + subs = { + 'unexpected EOF while parsing': 'invalid syntax', + 'parenthesis is never closed': 'invalid syntax', + } + exc.filename = None + exc.lineno = None + exc.msg = subs.get(exc.msg, exc.msg) + return exc + + @classmethod + def and_test(cls, nodelist): + # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! + return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + + @classmethod + def test(cls, nodelist): + # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! + return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + + @classmethod + def atom(cls, nodelist): + t = nodelist[1][0] + if t == token.LPAR: + if nodelist[2][0] == token.RPAR: + raise SyntaxError("Empty parentheses") + return cls.interpret(nodelist[2]) + raise SyntaxError("Language feature not supported in environment markers") -def evaluate_marker(text, extra=None, _ops={}): - """ - Evaluate a PEP 426 environment marker on CPython 2.4+. - Return a boolean indicating the marker result in this environment. - Raise SyntaxError if marker is invalid. + @classmethod + def comparison(cls, nodelist): + if len(nodelist)>4: + raise SyntaxError("Chained comparison not allowed in environment markers") + comp = nodelist[2][1] + cop = comp[1] + if comp[0] == token.NAME: + if len(nodelist[2]) == 3: + if cop == 'not': + cop = 'not in' + else: + cop = 'is not' + try: + cop = cls.get_op(cop) + except KeyError: + raise SyntaxError(repr(cop)+" operator not allowed in environment markers") + return cop(cls.evaluate(nodelist[1]), cls.evaluate(nodelist[3])) + + @classmethod + def get_op(cls, op): + ops = { + symbol.test: cls.test, + symbol.and_test: cls.and_test, + symbol.atom: cls.atom, + symbol.comparison: cls.comparison, + 'not in': lambda x, y: x not in y, + 'in': lambda x, y: x in y, + '==': operator.eq, + '!=': operator.ne, + } + if hasattr(symbol, 'or_test'): + ops[symbol.or_test] = cls.test + return ops[op] + + @classmethod + def evaluate_marker(cls, text, extra=None): + """ + Evaluate a PEP 426 environment marker on CPython 2.4+. + Return a boolean indicating the marker result in this environment. + Raise SyntaxError if marker is invalid. - This implementation uses the 'parser' module, which is not implemented on - Jython and has been superseded by the 'ast' module in Python 2.6 and - later. - """ + This implementation uses the 'parser' module, which is not implemented on + Jython and has been superseded by the 'ast' module in Python 2.6 and + later. + """ + return cls.interpret(parser.expr(text).totuple(1)[1]) - if not _ops: - - from token import NAME, STRING - import token - import symbol - import operator - - def and_test(nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.and_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - - def test(nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.or_, [interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) - - def atom(nodelist): - t = nodelist[1][0] - if t == token.LPAR: - if nodelist[2][0] == token.RPAR: - raise SyntaxError("Empty parentheses") - return interpret(nodelist[2]) - raise SyntaxError("Language feature not supported in environment markers") - - def comparison(nodelist): - if len(nodelist)>4: - raise SyntaxError("Chained comparison not allowed in environment markers") - comp = nodelist[2][1] - cop = comp[1] - if comp[0] == NAME: - if len(nodelist[2]) == 3: - if cop == 'not': - cop = 'not in' - else: - cop = 'is not' - try: - cop = _ops[cop] - except KeyError: - raise SyntaxError(repr(cop)+" operator not allowed in environment markers") - return cop(evaluate(nodelist[1]), evaluate(nodelist[3])) - - _ops.update({ - symbol.test: test, symbol.and_test: and_test, symbol.atom: atom, - symbol.comparison: comparison, 'not in': lambda x,y: x not in y, - 'in': lambda x,y: x in y, '==': operator.eq, '!=': operator.ne, - }) - if hasattr(symbol,'or_test'): - _ops[symbol.or_test] = test - - def interpret(nodelist): + @classmethod + def interpret(cls, nodelist): while len(nodelist)==2: nodelist = nodelist[1] try: - op = _ops[nodelist[0]] + op = cls.get_op(nodelist[0]) except KeyError: raise SyntaxError("Comparison or logical expression expected") return op(nodelist) - def evaluate(nodelist): + @classmethod + def evaluate(cls, nodelist): while len(nodelist)==2: nodelist = nodelist[1] kind = nodelist[0] name = nodelist[1] - if kind==NAME: + if kind==token.NAME: try: - op = _marker_values[name] + op = cls.values[name] except KeyError: raise SyntaxError("Unknown name %r" % name) return op() - if kind==STRING: + if kind==token.STRING: s = nodelist[1] if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \ or '\\' in s: @@ -1240,8 +1258,6 @@ def evaluate(nodelist): return s[1:-1] raise SyntaxError("Language feature not supported in environment markers") - return interpret(parser.expr(text).totuple(1)[1]) - def _markerlib_evaluate(text): """ Evaluate a PEP 426 environment marker using markerlib. @@ -1262,7 +1278,11 @@ def _markerlib_evaluate(text): raise SyntaxError(e.args[0]) return result -if 'parser' not in globals(): +invalid_marker = MarkerEvaluation.is_invalid_marker + +if 'parser' in globals(): + evaluate_marker = MarkerEvaluation.evaluate_marker +else: # fallback to less-complete _markerlib implementation if 'parser' module # is not available. evaluate_marker = _markerlib_evaluate From 02a2d475691af0932df4306b24d101b2880f2e79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Dec 2013 10:07:17 -0500 Subject: [PATCH 1698/8469] Remove compatibility functions for platform information. --- pkg_resources.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 42b20e3a7f..c6228545d2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -27,6 +27,7 @@ import token import symbol import operator +import platform from pkgutil import get_importer try: @@ -1106,23 +1107,6 @@ def to_filename(name): """ return name.replace('-','_') -def _platinfo(attr): - try: - import platform - except ImportError: - return '' - return getattr(platform, attr, lambda:'')() - -def _pyimp(): - if sys.platform=='cli': - return 'IronPython' - elif sys.platform.startswith('java'): - return 'Jython' - elif '__pypy__' in sys.builtin_module_names: - return 'PyPy' - else: - return 'CPython' - class MarkerEvaluation(object): values = { @@ -1130,9 +1114,9 @@ class MarkerEvaluation(object): 'sys_platform': lambda: sys.platform, 'python_full_version': lambda: sys.version.split()[0], 'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]), - 'platform_version': lambda: _platinfo('version'), - 'platform_machine': lambda: _platinfo('machine'), - 'python_implementation': lambda: _platinfo('python_implementation') or _pyimp(), + 'platform_version': platform.version, + 'platform_machine': platform.machine, + 'python_implementation': platform.python_implementation, } @classmethod From 37d5f8a96d4708b336fc8c6655ef4b0789afd6ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Dec 2013 22:10:07 -0500 Subject: [PATCH 1699/8469] Correct regression in upload_docs in syntax adjustment. Fixes #124. --- CHANGES.txt | 6 ++++++ setuptools/command/upload_docs.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 90e2aaa8fd..0f5873344d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +2.0.1 +----- + +* Issue #124: Fixed error in list detection in upload_docs. + --- 2.0 --- diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 8ee35cb039..cad7a52d1b 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -127,7 +127,7 @@ def upload_file(self, filename): for key, values in iteritems(data): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name - if isinstance(values, list): + if not isinstance(values, list): values = [values] for value in values: if type(value) is tuple: From 5b632217631edcc9c9ea1d401d4537869f7a5c2f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Dec 2013 22:26:26 -0500 Subject: [PATCH 1700/8469] Bumped to 2.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 371000f9bd..b8abb6f4ea 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.1" +DEFAULT_VERSION = "2.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index d980f276af..3f3907994a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.1' +__version__ = '2.0.1' From 07b44aac6d5ae27e1a7ca7ffdbb17419e284d7bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Dec 2013 22:35:29 -0500 Subject: [PATCH 1701/8469] Require wheel in release script --- release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/release.py b/release.py index 3dbfac24ba..c5e8debbc9 100644 --- a/release.py +++ b/release.py @@ -10,6 +10,7 @@ import pkg_resources pkg_resources.require('jaraco.packaging>=2.0') +pkg_resources.require('wheel') def before_upload(): From b0371f722a076a35d4b5a0c271c5f2d870430c93 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Dec 2013 22:35:53 -0500 Subject: [PATCH 1702/8469] Added tag 2.0.1 for changeset bbdba51e1bc1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 528c2336f7..5cd010da8f 100644 --- a/.hgtags +++ b/.hgtags @@ -111,3 +111,4 @@ a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 9a5f26d7df8ef779cb5f40cc0389343fb4c61365 1.4.1 274cb3beba4f22d5f461b0578b6d56e171d94f2e 1.4.2 0bb1df93c2eaa50e95ccfce18208b0cca20ebae3 2.0 +bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 From 074f677e7212f97c4b3774b9c0d26c68ac4a92fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Dec 2013 22:37:16 -0500 Subject: [PATCH 1703/8469] Bumped to 2.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 82 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b8abb6f4ea..fca25de9ca 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.0.1" +DEFAULT_VERSION = "2.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 23b577f60a..0b71cbdfd5 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ [distutils.setup_keywords] +use_2to3 = setuptools.dist:assert_bool convert_2to3_doctests = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -exclude_package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras +install_requires = setuptools.dist:check_requirements entry_points = setuptools.dist:check_entry_points -dependency_links = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable use_2to3_exclude_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements test_suite = setuptools.dist:check_test_suite +packages = setuptools.dist:check_packages namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable +exclude_package_data = setuptools.dist:check_package_data +tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +include_package_data = setuptools.dist:assert_bool eager_resources = setuptools.dist:assert_string_list -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -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 -PKG-INFO = setuptools.command.egg_info:write_pkg_info -entry_points.txt = setuptools.command.egg_info:write_entries - [distutils.commands] -install_egg_info = setuptools.command.install_egg_info:install_egg_info egg_info = setuptools.command.egg_info:egg_info saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist rotate = setuptools.command.rotate:rotate -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -upload_docs = setuptools.command.upload_docs:upload_docs -build_py = setuptools.command.build_py:build_py +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install = setuptools.command.install:install setopt = setuptools.command.setopt:setopt -develop = setuptools.command.develop:develop -install_lib = setuptools.command.install_lib:install_lib +bdist_egg = setuptools.command.bdist_egg:bdist_egg +build_ext = setuptools.command.build_ext:build_ext test = setuptools.command.test:test -install_scripts = setuptools.command.install_scripts:install_scripts +alias = setuptools.command.alias:alias register = setuptools.command.register:register -build_ext = setuptools.command.build_ext:build_ext +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 +sdist = setuptools.command.sdist:sdist +upload_docs = setuptools.command.upload_docs:upload_docs easy_install = setuptools.command.easy_install:easy_install -alias = setuptools.command.alias:alias -install = setuptools.command.install:install -bdist_egg = setuptools.command.bdist_egg:bdist_egg -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +develop = setuptools.command.develop:develop +build_py = setuptools.command.build_py:build_py +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm [console_scripts] +easy_install-3.4 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main -easy_install-3.3 = setuptools.command.easy_install:main + +[egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 4fd464d812..9a6bf43731 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 3f3907994a..668c3446ee 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.0.1' +__version__ = '2.0.2' From a606f1f9b98810666dea3682e7def0d322988b3b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 17 Dec 2013 09:27:37 -0500 Subject: [PATCH 1704/8469] ENH: use #!/usr/bin/env python for the shebang instead of non-working on POSIX systems plain #!python --- ez_setup.py | 2 +- setuptools/command/easy_install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index fca25de9ca..9dd695a1d1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,4 +1,4 @@ -#!python +#!/usr/bin/env python """Bootstrap setuptools installation To use setuptools in your package's setup.py, include this diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9775bffcc2..08ebf3e589 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1,4 +1,4 @@ -#!python +#!/usr/bin/env python """ Easy Install From 03882a7d0d48dd842f95a2644d33f63d31f1e8a8 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 20 Dec 2013 22:09:39 +0100 Subject: [PATCH 1705/8469] Fix NameError during installation with Python implementations (e.g. Jython) not containing parser module. --- CHANGES.txt | 7 +++++++ pkg_resources.py | 54 ++++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0f5873344d..2db678f777 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +2.0.2 +----- + +* Fix NameError during installation with Python implementations (e.g. Jython) + not containing parser module. + ----- 2.0.1 ----- diff --git a/pkg_resources.py b/pkg_resources.py index c6228545d2..efe5d34d77 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1213,6 +1213,32 @@ def evaluate_marker(cls, text, extra=None): """ return cls.interpret(parser.expr(text).totuple(1)[1]) + @classmethod + def _markerlib_evaluate(cls, text): + """ + Evaluate a PEP 426 environment marker using markerlib. + Return a boolean indicating the marker result in this environment. + Raise SyntaxError if marker is invalid. + """ + import _markerlib + # markerlib implements Metadata 1.2 (PEP 345) environment markers. + # Translate the variables to Metadata 2.0 (PEP 426). + env = _markerlib.default_environment() + for key in env.keys(): + new_key = key.replace('.', '_') + env[new_key] = env.pop(key) + try: + result = _markerlib.interpret(text, env) + except NameError: + e = sys.exc_info()[1] + raise SyntaxError(e.args[0]) + return result + + if 'parser' not in globals(): + # Fall back to less-complete _markerlib implementation if 'parser' module + # is not available. + evaluate_marker = _markerlib_evaluate + @classmethod def interpret(cls, nodelist): while len(nodelist)==2: nodelist = nodelist[1] @@ -1242,34 +1268,8 @@ def evaluate(cls, nodelist): return s[1:-1] raise SyntaxError("Language feature not supported in environment markers") -def _markerlib_evaluate(text): - """ - Evaluate a PEP 426 environment marker using markerlib. - Return a boolean indicating the marker result in this environment. - Raise SyntaxError if marker is invalid. - """ - import _markerlib - # markerlib implements Metadata 1.2 (PEP 345) environment markers. - # Translate the variables to Metadata 2.0 (PEP 426). - env = _markerlib.default_environment() - for key in env.keys(): - new_key = key.replace('.', '_') - env[new_key] = env.pop(key) - try: - result = _markerlib.interpret(text, env) - except NameError: - e = sys.exc_info()[1] - raise SyntaxError(e.args[0]) - return result - invalid_marker = MarkerEvaluation.is_invalid_marker - -if 'parser' in globals(): - evaluate_marker = MarkerEvaluation.evaluate_marker -else: - # fallback to less-complete _markerlib implementation if 'parser' module - # is not available. - evaluate_marker = _markerlib_evaluate +evaluate_marker = MarkerEvaluation.evaluate_marker class NullProvider: """Try to implement resources and metadata for arbitrary PEP 302 loaders""" From 379096d8a1e4be86f8b2e36a0ec66fa75e2edbb8 Mon Sep 17 00:00:00 2001 From: Menghan Zheng Date: Tue, 24 Dec 2013 14:16:43 +0800 Subject: [PATCH 1706/8469] fix setuptools don't search download location in dependency_links bug --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0e51b72c55..167c34e5b4 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -582,8 +582,9 @@ def find(req, env=None): if local_index is not None: dist = dist or find(requirement, local_index) - if dist is None and self.to_scan is not None: - self.prescan() + if dist is None: + if self.to_scan is not None: + self.prescan() dist = find(requirement) if dist is None and not force_scan: From caa91ca543b5f68074da8d8fd79e842bb9634cae Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Wed, 25 Dec 2013 10:34:02 +0000 Subject: [PATCH 1707/8469] Fix postproc reference --HG-- branch : postproc --- setuptools/command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 6249e75c63..77a3852b96 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -35,10 +35,10 @@ def _finder(self, dirname, filename): f.close() for match in self.pattern.finditer(data): path = match.group(1) - if postproc: + if self.postproc: #postproc used to be used when the svn finder #was an re_finder for calling unescape - path = postproc(path) + path = self.postproc(path) yield svn_utils.joinpath(dirname,path) def __call__(self, dirname=''): path = svn_utils.joinpath(dirname, self.path) From e94241196cc546ab4a65b125066c7fab629b8fd3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2013 10:36:02 -0500 Subject: [PATCH 1708/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2db678f777..1ced30f823 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Fix NameError during installation with Python implementations (e.g. Jython) not containing parser module. +* Fix NameError in ``sdist:re_finder``. ----- 2.0.1 From a47d7746390d4e787115c629a98c5dfbf0c7246b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2013 10:39:48 -0500 Subject: [PATCH 1709/8469] Added tag 2.0.2 for changeset 5a62ac60ba31 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5cd010da8f..fb95f12667 100644 --- a/.hgtags +++ b/.hgtags @@ -112,3 +112,4 @@ a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 274cb3beba4f22d5f461b0578b6d56e171d94f2e 1.4.2 0bb1df93c2eaa50e95ccfce18208b0cca20ebae3 2.0 bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 +5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 From 465f771654baf972034a4e21648bac48ec132f3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2013 10:41:44 -0500 Subject: [PATCH 1710/8469] Bumped to 2.0.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 98 ++++++++++++++-------------- setuptools/version.py | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9dd695a1d1..1149df8108 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.0.2" +DEFAULT_VERSION = "2.0.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 0b71cbdfd5..1a9b384948 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.setup_keywords] -use_2to3 = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -packages = setuptools.dist:check_packages -namespace_packages = setuptools.dist:check_nsp -exclude_package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements -dependency_links = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list - -[distutils.commands] -egg_info = setuptools.command.egg_info:egg_info -saveopts = setuptools.command.saveopts:saveopts -rotate = setuptools.command.rotate:rotate -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -install = setuptools.command.install:install -setopt = setuptools.command.setopt:setopt -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -alias = setuptools.command.alias:alias -register = setuptools.command.register:register -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 -sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs -easy_install = setuptools.command.easy_install:easy_install -develop = setuptools.command.develop:develop -build_py = setuptools.command.build_py:build_py -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm - [console_scripts] -easy_install-3.4 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names requires.txt = setuptools.command.egg_info:write_requirements dependency_links.txt = setuptools.command.egg_info:overwrite_arg namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg + +[distutils.setup_keywords] +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements +install_requires = setuptools.dist:check_requirements +include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +dependency_links = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +test_suite = setuptools.dist:check_test_suite +entry_points = setuptools.dist:check_entry_points +use_2to3 = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.commands] +sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +build_py = setuptools.command.build_py:build_py +easy_install = setuptools.command.easy_install:easy_install +develop = setuptools.command.develop:develop +build_ext = setuptools.command.build_ext:build_ext +rotate = setuptools.command.rotate:rotate +egg_info = setuptools.command.egg_info:egg_info +install_lib = setuptools.command.install_lib:install_lib +bdist_egg = setuptools.command.bdist_egg:bdist_egg +register = setuptools.command.register:register +install_scripts = setuptools.command.install_scripts:install_scripts +alias = setuptools.command.alias:alias +upload_docs = setuptools.command.upload_docs:upload_docs +setopt = setuptools.command.setopt:setopt +saveopts = setuptools.command.saveopts:saveopts +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +install = setuptools.command.install:install diff --git a/setuptools/version.py b/setuptools/version.py index 668c3446ee..e7c12d2851 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.0.2' +__version__ = '2.0.3' From b7b28d118a55f4738c593055b9fcc30c2e8b4b59 Mon Sep 17 00:00:00 2001 From: Marcus Smith Date: Sat, 4 Jan 2014 18:58:03 -0800 Subject: [PATCH 1711/8469] convert "find_in_zip" into "find_eggs_in_zip" to prevent it from walking whl files this specifically prevents a failure when wheels are nested under an egg dir https://bitbucket.org/pypa/setuptools/issue/129 --HG-- branch : zip_path --- pkg_resources.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index efe5d34d77..39881b56b5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1717,7 +1717,14 @@ def find_distributions(path_item, only=False): finder = _find_adapter(_distribution_finders, importer) return finder(importer, path_item, only) -def find_in_zip(importer, path_item, only=False): +def find_eggs_in_zip(importer, path_item, only=False): + """ + Find eggs in zip files; possibly multiple nested eggs. + """ + if importer.archive.endswith('.whl'): + # wheels are not supported with this finder + # they don't have PKG-INFO metadata, and won't ever contain eggs + return metadata = EggMetadata(importer) if metadata.has_metadata('PKG-INFO'): yield Distribution.from_filename(path_item, metadata=metadata) @@ -1726,10 +1733,10 @@ def find_in_zip(importer, path_item, only=False): for subitem in metadata.resource_listdir('/'): if subitem.endswith('.egg'): subpath = os.path.join(path_item, subitem) - for dist in find_in_zip(zipimport.zipimporter(subpath), subpath): + for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath): yield dist -register_finder(zipimport.zipimporter, find_in_zip) +register_finder(zipimport.zipimporter, find_eggs_in_zip) def find_nothing(importer, path_item, only=False): return () From 818e80e00093764b261ac4c2595aedb9f194cf0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 Jan 2014 12:31:44 -0500 Subject: [PATCH 1712/8469] Fix Python 3 failure when constructing an egg_fetcher. Fixes #131. --- CHANGES.txt | 6 ++++++ setuptools/dist.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1ced30f823..83081957cf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +2.0.3 +----- + +* Issue #131: Fix RuntimeError when constructing an egg fetcher. + ----- 2.0.2 ----- diff --git a/setuptools/dist.py b/setuptools/dist.py index c5b02f99f4..3126cb96dd 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -295,7 +295,7 @@ def fetch_build_egg(self, req): 'find_links', 'site_dirs', 'index_url', 'optimize', 'site_dirs', 'allow_hosts' ) - for key in opts.keys(): + for key in list(opts): if key not in keep: del opts[key] # don't use any other settings if self.dependency_links: From e81800c109d87617f2c82a4f53a565f9c26e0614 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Jan 2014 10:21:11 -0500 Subject: [PATCH 1713/8469] Remove excess whitespace --HG-- extra : rebase_source : 4d1b9f2354d8966b2bd8c375662e5f29817adbb3 --- setuptools/command/install.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 247c4f259c..459cd3cd59 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,4 +1,6 @@ -import setuptools, sys, glob +import setuptools +import sys +import glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -15,7 +17,7 @@ class install(_install): ] new_commands = [ ('install_egg_info', lambda self: True), - ('install_scripts', lambda self: True), + ('install_scripts', lambda self: True), ] _nc = dict(new_commands) @@ -46,7 +48,6 @@ def handle_extra_path(self): self.path_file = None self.extra_dirs = '' - def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: @@ -72,11 +73,6 @@ def run(self): else: self.do_egg_install() - - - - - def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') @@ -105,20 +101,3 @@ def do_egg_install(self): install.sub_commands = [ cmd for cmd in _install.sub_commands if cmd[0] not in install._nc ] + install.new_commands - - - - - - - - - - - - - - - - -# From 40a5af7a50dc95b31da4745912c6f0aa016fb820 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Jan 2014 20:22:51 -0500 Subject: [PATCH 1714/8469] Update changelog --- CHANGES.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 83081957cf..d3ba1ee5c4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,10 +2,12 @@ CHANGES ======= ------ -2.0.3 ------ +--- +2.1 +--- +* Issue #129: Suppress inspection of '*.whl' files when searching for files + in a zip-imported file. * Issue #131: Fix RuntimeError when constructing an egg fetcher. ----- From 16d7da6bfd5995009e65787aad8bb71112b24156 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Jan 2014 21:23:41 -0500 Subject: [PATCH 1715/8469] Use native decorator syntax in pkg_resources --- pkg_resources.py | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 39881b56b5..4bc05e57f5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1,4 +1,5 @@ -"""Package resource API +""" +Package resource API -------------------- A resource is a logical file contained within a package, or a logical @@ -2039,7 +2040,7 @@ def require(self, env=None, installer=None): list(map(working_set.add, working_set.resolve(self.dist.requires(self.extras),env,installer))) - #@classmethod + @classmethod def parse(cls, src, dist=None): """Parse a single entry point from string `src` @@ -2071,9 +2072,7 @@ def parse(cls, src, dist=None): else: return cls(name.strip(), value.strip(), attrs, extras, dist) - parse = classmethod(parse) - - #@classmethod + @classmethod def parse_group(cls, group, lines, dist=None): """Parse an entry point group""" if not MODULE(group): @@ -2086,9 +2085,7 @@ def parse_group(cls, group, lines, dist=None): this[ep.name]=ep return this - parse_group = classmethod(parse_group) - - #@classmethod + @classmethod def parse_map(cls, data, dist=None): """Parse a map of entry point groups""" if isinstance(data,dict): @@ -2107,8 +2104,6 @@ def parse_map(cls, data, dist=None): maps[group] = cls.parse_group(group, lines, dist) return maps - parse_map = classmethod(parse_map) - def _remove_md5_fragment(location): if not location: @@ -2135,7 +2130,7 @@ def __init__(self, location=None, metadata=None, project_name=None, self.precedence = precedence self._provider = metadata or empty_provider - #@classmethod + @classmethod def from_location(cls,location,basename,metadata=None,**kw): project_name, version, py_version, platform = [None]*4 basename, ext = os.path.splitext(basename) @@ -2151,7 +2146,6 @@ def from_location(cls,location,basename,metadata=None,**kw): location, metadata, project_name=project_name, version=version, py_version=py_version, platform=platform, **kw ) - from_location = classmethod(from_location) hashcmp = property( lambda self: ( @@ -2184,16 +2178,15 @@ def __ne__(self, other): # metadata until/unless it's actually needed. (i.e., some distributions # may not know their name or version without loading PKG-INFO) - #@property + @property def key(self): try: return self._key except AttributeError: self._key = key = self.project_name.lower() return key - key = property(key) - #@property + @property def parsed_version(self): try: return self._parsed_version @@ -2201,9 +2194,7 @@ def parsed_version(self): self._parsed_version = pv = parse_version(self.version) return pv - parsed_version = property(parsed_version) - - #@property + @property def version(self): try: return self._version @@ -2216,9 +2207,8 @@ def version(self): raise ValueError( "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self ) - version = property(version) - #@property + @property def _dep_map(self): try: return self.__dep_map @@ -2236,7 +2226,6 @@ def _dep_map(self): extra = safe_extra(extra) or None dm.setdefault(extra,[]).extend(parse_requirements(reqs)) return dm - _dep_map = property(_dep_map) def requires(self,extras=()): """List of Requirements needed for this distro if `extras` are used""" @@ -2294,13 +2283,12 @@ def __getattr__(self,attr): raise AttributeError(attr) return getattr(self._provider, attr) - #@classmethod + @classmethod def from_filename(cls,filename,metadata=None, **kw): return cls.from_location( _normalize_cached(filename), os.path.basename(filename), metadata, **kw ) - from_filename = classmethod(from_filename) def as_requirement(self): """Return a ``Requirement`` that matches this distribution exactly""" @@ -2407,10 +2395,9 @@ def clone(self,**kw): kw.setdefault('metadata', self._provider) return self.__class__(**kw) - #@property + @property def extras(self): return [dep for dep in self._dep_map if dep] - extras = property(extras) class DistInfoDistribution(Distribution): @@ -2614,7 +2601,7 @@ def __hash__(self): def __repr__(self): return "Requirement.parse(%r)" % str(self) - #@staticmethod + @staticmethod def parse(s): reqs = list(parse_requirements(s)) if reqs: @@ -2623,8 +2610,6 @@ def parse(s): raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) - parse = staticmethod(parse) - state_machine = { # =>< '<': '--T', From e393331c51ab99ce33d9dfbbf88fb3b6f6081f4b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jan 2014 21:17:33 +0000 Subject: [PATCH 1716/8469] Bumped to 2.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1149df8108..ba03f0a7d7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.0.3" +DEFAULT_VERSION = "2.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index e7c12d2851..d980f276af 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.0.3' +__version__ = '2.1' From 379e0d4914f42134dd26d570be33ca3e41caed6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jan 2014 21:17:37 +0000 Subject: [PATCH 1717/8469] Added tag 2.1 for changeset c49c651997eb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fb95f12667..2de8cd9986 100644 --- a/.hgtags +++ b/.hgtags @@ -113,3 +113,4 @@ a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 0bb1df93c2eaa50e95ccfce18208b0cca20ebae3 2.0 bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 +c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 From bdea417e6e6f724447019e3e709c04b9249964f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jan 2014 21:19:08 +0000 Subject: [PATCH 1718/8469] Bumped to 2.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 80 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index ba03f0a7d7..a781d1d237 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.1" +DEFAULT_VERSION = "2.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 1a9b384948..6b10d6dcf4 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,3 +1,13 @@ +[egg_info.writers] +requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names + [console_scripts] easy_install = setuptools.command.easy_install:main easy_install-3.4 = setuptools.command.easy_install:main @@ -5,58 +15,48 @@ easy_install-3.4 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg - [distutils.setup_keywords] -test_loader = setuptools.dist:check_importable -tests_require = setuptools.dist:check_requirements -install_requires = setuptools.dist:check_requirements -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages +exclude_package_data = setuptools.dist:check_package_data use_2to3_exclude_fixers = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +dependency_links = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable convert_2to3_doctests = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -dependency_links = setuptools.dist:assert_string_list -exclude_package_data = setuptools.dist:check_package_data +include_package_data = setuptools.dist:assert_bool test_suite = setuptools.dist:check_test_suite -entry_points = setuptools.dist:check_entry_points -use_2to3 = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +entry_points = setuptools.dist:check_entry_points +namespace_packages = setuptools.dist:check_nsp +tests_require = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +use_2to3_fixers = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list [distutils.commands] -sdist = setuptools.command.sdist:sdist -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -test = setuptools.command.test:test -build_py = setuptools.command.build_py:build_py -easy_install = setuptools.command.easy_install:easy_install -develop = setuptools.command.develop:develop -build_ext = setuptools.command.build_ext:build_ext -rotate = setuptools.command.rotate:rotate +upload_docs = setuptools.command.upload_docs:upload_docs egg_info = setuptools.command.egg_info:egg_info -install_lib = setuptools.command.install_lib:install_lib -bdist_egg = setuptools.command.bdist_egg:bdist_egg +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst register = setuptools.command.register:register +install_lib = setuptools.command.install_lib:install_lib install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias -upload_docs = setuptools.command.upload_docs:upload_docs -setopt = setuptools.command.setopt:setopt +bdist_egg = setuptools.command.bdist_egg:bdist_egg saveopts = setuptools.command.saveopts:saveopts +rotate = setuptools.command.rotate:rotate install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +develop = setuptools.command.develop:develop +alias = setuptools.command.alias:alias install = setuptools.command.install:install +build_ext = setuptools.command.build_ext:build_ext +build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +easy_install = setuptools.command.easy_install:easy_install +setopt = setuptools.command.setopt:setopt +test = setuptools.command.test:test + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 9a6bf43731..4fd464d812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index d980f276af..2b9ccf1770 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.1' +__version__ = '2.2' From 14c283c0f3ee785359863ab4a347b53ee6f192a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jan 2014 21:26:49 +0000 Subject: [PATCH 1719/8469] Correct RST syntax --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index d3ba1ee5c4..a76a147b77 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 2.1 --- -* Issue #129: Suppress inspection of '*.whl' files when searching for files +* Issue #129: Suppress inspection of ``*.whl`` files when searching for files in a zip-imported file. * Issue #131: Fix RuntimeError when constructing an egg fetcher. From db9f0ca1c7741653a7b5ba538672172edf116876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2014 11:43:55 -0500 Subject: [PATCH 1720/8469] Add credit to Tarek for Distribute work. --HG-- extra : rebase_source : 1a0e14224de7b1e289582a557aafb17e6164e8cf --- README.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.txt b/README.txt index 0cc3dd42fc..ed1b41d47e 100755 --- a/README.txt +++ b/README.txt @@ -177,6 +177,10 @@ Credits "Code Bear" Taylor) contributed their time and stress as guinea pigs for the use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) +* Tarek Ziadé is the principal author of the Distribute fork, which + re-invigorated the community on the project, encouraged renewed innovation, + and addressed many defects. + * Since the merge with Distribute, Jason R. Coombs is the maintainer of setuptools. The project is maintained in coordination with the Python Packaging Authority (PyPA) and the larger Python community. From 1f261491243925164a2ff93be8a2e5c61b23a1e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2014 19:02:33 -0500 Subject: [PATCH 1721/8469] Correct usage in README. Fixes #136 --HG-- extra : rebase_source : f3c2a273556a2236d251c3d6ae49d96170b2db24 --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index ed1b41d47e..6079c2e555 100755 --- a/README.txt +++ b/README.txt @@ -76,7 +76,7 @@ tarball from `Setuptools on PyPI `_ and run setup.py with any supported distutils and Setuptools options. For example:: - setuptools-x.x$ python setup.py --prefix=/opt/setuptools + setuptools-x.x$ python setup.py install --prefix=/opt/setuptools Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section From f547377479ff30d39a121b3ba1b753dcaf544eb2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jan 2014 20:08:10 -0500 Subject: [PATCH 1722/8469] Add docstring --- ez_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index a781d1d237..1420c114df 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -34,6 +34,9 @@ DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): + """ + Return True if the command succeeded. + """ args = (sys.executable,) + args return subprocess.call(args) == 0 From 2c66805878d8f2b46241d8944e8b5af20eeeb9e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 27 Jan 2014 11:02:52 -0500 Subject: [PATCH 1723/8469] Backed out changeset: ef949e6e6de1, which was itself a backout of the fix for Distribute #323, so this backout restores that fix and also Fixes #141. --- pkg_resources.py | 39 +++++-- setuptools/dist.py | 5 +- setuptools/tests/test_easy_install.py | 141 +++++++++++++++++++------- 3 files changed, 135 insertions(+), 50 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4bc05e57f5..bde30989fe 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -504,7 +504,7 @@ def __iter__(self): seen[key]=1 yield self.by_key[key] - def add(self, dist, entry=None, insert=True): + def add(self, dist, entry=None, insert=True, replace=False): """Add `dist` to working set, associated with `entry` If `entry` is unspecified, it defaults to the ``.location`` of `dist`. @@ -512,8 +512,9 @@ def add(self, dist, entry=None, insert=True): set's ``.entries`` (if it wasn't already present). `dist` is only added to the working set if it's for a project that - doesn't already have a distribution in the set. If it's added, any - callbacks registered with the ``subscribe()`` method will be called. + doesn't already have a distribution in the set, unless `replace=True`. + If it's added, any callbacks registered with the ``subscribe()`` method + will be called. """ if insert: dist.insert_on(self.entries, entry) @@ -522,7 +523,7 @@ def add(self, dist, entry=None, insert=True): entry = dist.location keys = self.entry_keys.setdefault(entry,[]) keys2 = self.entry_keys.setdefault(dist.location,[]) - if dist.key in self.by_key: + if not replace and dist.key in self.by_key: return # ignore hidden distros self.by_key[dist.key] = dist @@ -532,7 +533,8 @@ def add(self, dist, entry=None, insert=True): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None): + def resolve(self, requirements, env=None, installer=None, + replace_conflicting=False): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -542,6 +544,12 @@ def resolve(self, requirements, env=None, installer=None): will be invoked with each requirement that cannot be met by an already-installed distribution; it should return a ``Distribution`` or ``None``. + + Unless `replace_conflicting=True`, raises a VersionConflict exception if + any requirements are found on the path that have the correct name but + the wrong version. Otherwise, if an `installer` is supplied it will be + invoked to obtain the correct version of the requirement and activate + it. """ requirements = list(requirements)[::-1] # set up the stack @@ -558,10 +566,18 @@ def resolve(self, requirements, env=None, installer=None): if dist is None: # Find the best distribution and add it to the map dist = self.by_key.get(req.key) - if dist is None: + if dist is None or (dist not in req and replace_conflicting): + ws = self if env is None: - env = Environment(self.entries) - dist = best[req.key] = env.best_match(req, self, installer) + if dist is None: + env = Environment(self.entries) + else: + # Use an empty environment and workingset to avoid + # any further conflicts with the conflicting + # distribution + env = Environment([]) + ws = WorkingSet([]) + dist = best[req.key] = env.best_match(req, ws, installer) if dist is None: #msg = ("The '%s' distribution was not found on this " # "system, and is required by this application.") @@ -1811,6 +1827,7 @@ def namespace_handler(importer,path_entry,moduleName,module): def _handle_ns(packageName, path_item): """Ensure that named package includes a subpath of path_item (if needed)""" + importer = get_importer(path_item) if importer is None: return None @@ -1825,12 +1842,14 @@ def _handle_ns(packageName, path_item): elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) handler = _find_adapter(_namespace_handlers, importer) - subpath = handler(importer,path_item,packageName,module) + subpath = handler(importer, path_item, packageName, module) if subpath is not None: path = module.__path__ path.append(subpath) loader.load_module(packageName) - module.__path__ = path + for path_item in path: + if path_item not in module.__path__: + module.__path__.append(path_item) return subpath def declare_namespace(packageName): diff --git a/setuptools/dist.py b/setuptools/dist.py index 3126cb96dd..0801ae74ff 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -260,9 +260,10 @@ def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" from pkg_resources import working_set, parse_requirements for dist in working_set.resolve( - parse_requirements(requires), installer=self.fetch_build_egg + parse_requirements(requires), installer=self.fetch_build_egg, + replace_conflicting=True ): - working_set.add(dist) + working_set.add(dist, replace=True) def finalize_options(self): _Distribution.finalize_options(self) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a90ae23fc1..8c797d550a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -19,8 +19,10 @@ from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution +from pkg_resources import working_set, VersionConflict from pkg_resources import Distribution as PRDistribution import setuptools.tests.server +import pkg_resources class FakeDist(object): def get_entry_map(self, group): @@ -230,47 +232,15 @@ def test_setup_requires(self): SandboxViolation. """ - test_setup_attrs = { - 'name': 'test_pkg', 'version': '0.0', - 'setup_requires': ['foobar'], - 'dependency_links': [os.path.abspath(self.dir)] - } - - test_pkg = os.path.join(self.dir, 'test_pkg') + test_pkg = create_setup_requires_package(self.dir) test_setup_py = os.path.join(test_pkg, 'setup.py') - os.mkdir(test_pkg) - - f = open(test_setup_py, 'w') - f.write(textwrap.dedent("""\ - import setuptools - setuptools.setup(**%r) - """ % test_setup_attrs)) - f.close() - foobar_path = os.path.join(self.dir, 'foobar-0.1.tar.gz') - make_trivial_sdist( - foobar_path, - textwrap.dedent("""\ - import setuptools - setuptools.setup( - name='foobar', - version='0.1' - ) - """)) - - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO() - sys.stderr = StringIO() try: - try: + with quiet_context(): with reset_setup_stop_context(): run_setup(test_setup_py, ['install']) - except SandboxViolation: - self.fail('Installation caused SandboxViolation') - finally: - sys.stdout = old_stdout - sys.stderr = old_stderr + except SandboxViolation: + self.fail('Installation caused SandboxViolation') class TestSetupRequires(unittest.TestCase): @@ -290,8 +260,10 @@ def test_setup_requires_honors_fetch_params(self): # Some platforms (Jython) don't find a port to which to bind, # so skip this test for them. return - # create an sdist that has a build-time dependency. - with TestSetupRequires.create_sdist() as dist_file: + with quiet_context(): + # TODO: correct indentation here + # create an sdist that has a build-time dependency. + with TestSetupRequires.create_sdist() as dist_file: with tempdir_context() as temp_install_dir: with environment_context(PYTHONPATH=temp_install_dir): ei_params = ['--index-url', p_index.url, @@ -330,6 +302,81 @@ def create_sdist(): """).lstrip()) yield dist_path + def test_setup_requires_overrides_version_conflict(self): + """ + Regression test for issue #323. + + Ensures that a distribution's setup_requires requirements can still be + installed and used locally even if a conflicting version of that + requirement is already on the path. + """ + + pr_state = pkg_resources.__getstate__() + fake_dist = PRDistribution('does-not-matter', project_name='foobar', + version='0.0') + working_set.add(fake_dist) + + def setup_and_run(temp_dir): + test_pkg = create_setup_requires_package(temp_dir) + test_setup_py = os.path.join(test_pkg, 'setup.py') + try: + stdout, stderr = quiet_context( + lambda: reset_setup_stop_context( + # Don't even need to install the package, just running + # the setup.py at all is sufficient + lambda: run_setup(test_setup_py, ['--name']) + )) + except VersionConflict: + self.fail('Installing setup.py requirements caused ' + 'VersionConflict') + + lines = stdout.splitlines() + self.assertTrue(len(lines) > 0) + self.assertTrue(lines[-1].strip(), 'test_pkg') + + try: + tempdir_context(setup_and_run) + finally: + pkg_resources.__setstate__(pr_state) + + +def create_setup_requires_package(path): + """Creates a source tree under path for a trivial test package that has a + single requirement in setup_requires--a tarball for that requirement is + also created and added to the dependency_links argument. + """ + + test_setup_attrs = { + 'name': 'test_pkg', 'version': '0.0', + 'setup_requires': ['foobar==0.1'], + 'dependency_links': [os.path.abspath(path)] + } + + test_pkg = os.path.join(path, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + + f = open(test_setup_py, 'w') + f.write(textwrap.dedent("""\ + import setuptools + setuptools.setup(**%r) + """ % test_setup_attrs)) + f.close() + + foobar_path = os.path.join(path, 'foobar-0.1.tar.gz') + make_trivial_sdist( + foobar_path, + textwrap.dedent("""\ + import setuptools + setuptools.setup( + name='foobar', + version='0.1' + ) + """)) + + return test_pkg + def make_trivial_sdist(dist_path, setup_py): """Create a simple sdist tarball at dist_path, containing just a @@ -392,3 +439,21 @@ def reset_setup_stop_context(): distutils.core._setup_stop_after = None yield distutils.core._setup_stop_after = setup_stop_after + + +@contextlib.contextmanager +def quiet_context(): + """ + Redirect stdout/stderr to StringIO objects to prevent console output from + distutils commands. + """ + + old_stdout = sys.stdout + old_stderr = sys.stderr + new_stdout = sys.stdout = StringIO.StringIO() + new_stderr = sys.stderr = StringIO.StringIO() + try: + yield new_stdout, new_stderr + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr From 15890a34456e31755d991bcbb2970591e32c8131 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 18:29:43 -0500 Subject: [PATCH 1724/8469] Normalize whitespace --HG-- extra : source : e4abff0dc46f1c089d8a61bac2406a57df406dcc --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 77a3852b96..aa6f47f00e 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -40,6 +40,7 @@ def _finder(self, dirname, filename): #was an re_finder for calling unescape path = self.postproc(path) yield svn_utils.joinpath(dirname,path) + def __call__(self, dirname=''): path = svn_utils.joinpath(dirname, self.path) @@ -65,7 +66,6 @@ def _default_revctrl(dirname=''): ] - class sdist(_sdist): """Smart sdist that finds anything supported by revision control""" From a61674f1324778f8b231c569325eab60e0e78482 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 18:33:57 -0500 Subject: [PATCH 1725/8469] Use a default that generates to the default behavior; no need to employ None as a sentry value. --HG-- extra : source : 2c7c7486ddc40ee4272b23e1fafd51ab1611dc28 --- setuptools/command/sdist.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index aa6f47f00e..b59cc390b9 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -22,7 +22,7 @@ def walk_revctrl(dirname=''): #TODO will need test case class re_finder(object): - def __init__(self, path, pattern, postproc=None): + def __init__(self, path, pattern, postproc=lambda x: x): self.pattern = pattern self.postproc = postproc self.path = convert_path(path) @@ -35,10 +35,9 @@ def _finder(self, dirname, filename): f.close() for match in self.pattern.finditer(data): path = match.group(1) - if self.postproc: - #postproc used to be used when the svn finder - #was an re_finder for calling unescape - path = self.postproc(path) + # postproc was formerly used when the svn finder + # was an re_finder for calling unescape + path = self.postproc(path) yield svn_utils.joinpath(dirname,path) def __call__(self, dirname=''): From d505855a1a59213b8a02d50870305c62c52d8399 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 18:57:02 -0500 Subject: [PATCH 1726/8469] Implement self.find. Fixes #139. --HG-- extra : amend_source : 98be824b4f846eb5fa8a8b046c3ef52a9fc2af4d --- setuptools/command/sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index e1112ff930..1bd07e6511 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -38,7 +38,7 @@ def _finder(self, dirname, filename): path = postproc(path) yield svn_utils.joinpath(dirname,path) - def __call__(self, dirname=''): + def find(self, dirname=''): path = svn_utils.joinpath(dirname, self.path) if os.path.isfile(path): @@ -48,6 +48,7 @@ def __call__(self, dirname=''): elif os.path.isdir(path): for item in self.find(path): yield item + __call__ = find def _default_revctrl(dirname=''): From dbdef26b5b1968b49b49966da045799b8553ebe1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:04:23 -0500 Subject: [PATCH 1727/8469] Rename the path attribute to entries_path for clarity. Added a docstring. Refactored 'find' method for flatness. --HG-- extra : source : 686317ef97be5076001b23e61f552dc1e85e29c8 --- setuptools/command/sdist.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 04cbccdf7f..76e1c5f18b 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -21,11 +21,15 @@ def walk_revctrl(dirname=''): #TODO will need test case class re_finder(object): + """ + Finder that locates files based on entries in a file matched by a + regular expression. + """ def __init__(self, path, pattern, postproc=lambda x: x): self.pattern = pattern self.postproc = postproc - self.path = convert_path(path) + self.entries_path = convert_path(path) def _finder(self, dirname, filename): f = open(filename,'rU') @@ -38,18 +42,20 @@ def _finder(self, dirname, filename): # postproc was formerly used when the svn finder # was an re_finder for calling unescape path = self.postproc(path) - yield svn_utils.joinpath(dirname,path) + yield svn_utils.joinpath(dirname, path) def find(self, dirname=''): - path = svn_utils.joinpath(dirname, self.path) - - if os.path.isfile(path): - for path in self._finder(dirname,path): - if os.path.isfile(path): - yield path - elif os.path.isdir(path): - for item in self.find(path): - yield item + path = svn_utils.joinpath(dirname, self.entries_path) + + if not os.path.isfile(path): + # entries file doesn't exist + return + for path in self._finder(dirname,path): + if os.path.isfile(path): + yield path + elif os.path.isdir(path): + for item in self.find(path): + yield item __call__ = find From b2e88257f67e94bc922265285e602fc5ecea5830 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:30:53 -0500 Subject: [PATCH 1728/8469] Disable bdist_wheel until issue #143 is solved. --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index c5e8debbc9..5735e10cd2 100644 --- a/release.py +++ b/release.py @@ -26,7 +26,7 @@ def after_push(): 'ez_setup.py', 'setuptools/version.py', ) -dist_commands = 'sdist', 'bdist_wheel' +dist_commands = 'sdist',# 'bdist_wheel' test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" From 5d7afc92bc7faeed4fdfdcfcaba324bd1b02d124 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:31:09 -0500 Subject: [PATCH 1729/8469] Bumped to 2.1.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1420c114df..b162118075 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.2" +DEFAULT_VERSION = "2.1.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 2b9ccf1770..55fa725bd5 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.2' +__version__ = '2.1.1' From e958dad9e656ac020ac62499c87f35fb2c0a4283 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:31:10 -0500 Subject: [PATCH 1730/8469] Added tag 2.1.1 for changeset b5be6c2b828c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2de8cd9986..c1b5f5efbe 100644 --- a/.hgtags +++ b/.hgtags @@ -114,3 +114,4 @@ a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 +b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 From fca0b24f0fa5b41d136b7083449c21ea2705d193 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:31:35 -0500 Subject: [PATCH 1731/8469] Bumped to 2.1.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 92 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b162118075..c768e3c719 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.1.1" +DEFAULT_VERSION = "2.1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 6b10d6dcf4..90ea9dde43 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [distutils.setup_keywords] -exclude_package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +use_2to3_fixers = setuptools.dist:assert_string_list test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list install_requires = setuptools.dist:check_requirements +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +namespace_packages = setuptools.dist:check_nsp +extras_require = setuptools.dist:check_extras zip_safe = setuptools.dist:assert_bool entry_points = setuptools.dist:check_entry_points -namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -use_2to3_fixers = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list +exclude_package_data = setuptools.dist:check_package_data +include_package_data = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main + +[egg_info.writers] +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +entry_points.txt = setuptools.command.egg_info:write_entries +PKG-INFO = setuptools.command.egg_info:write_pkg_info +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg [distutils.commands] +develop = setuptools.command.develop:develop +sdist = setuptools.command.sdist:sdist +install_lib = setuptools.command.install_lib:install_lib +saveopts = setuptools.command.saveopts:saveopts +install_egg_info = setuptools.command.install_egg_info:install_egg_info upload_docs = setuptools.command.upload_docs:upload_docs egg_info = setuptools.command.egg_info:egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst register = setuptools.command.register:register -install_lib = setuptools.command.install_lib:install_lib +setopt = setuptools.command.setopt:setopt install_scripts = setuptools.command.install_scripts:install_scripts -bdist_egg = setuptools.command.bdist_egg:bdist_egg -saveopts = setuptools.command.saveopts:saveopts -rotate = setuptools.command.rotate:rotate -install_egg_info = setuptools.command.install_egg_info:install_egg_info -develop = setuptools.command.develop:develop -alias = setuptools.command.alias:alias -install = setuptools.command.install:install -build_ext = setuptools.command.build_ext:build_ext +easy_install = setuptools.command.easy_install:easy_install build_py = setuptools.command.build_py:build_py -sdist = setuptools.command.sdist:sdist +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -easy_install = setuptools.command.easy_install:easy_install -setopt = setuptools.command.setopt:setopt +rotate = setuptools.command.rotate:rotate +build_ext = setuptools.command.build_ext:build_ext test = setuptools.command.test:test - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +alias = setuptools.command.alias:alias +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 4fd464d812..9a6bf43731 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 55fa725bd5..f811561263 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.1.1' +__version__ = '2.1.2' From e26fe38be5fd14ebff95ccb3d24765a0e81fd197 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:38:34 -0500 Subject: [PATCH 1732/8469] Bumped to 2.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c768e3c719..1420c114df 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.1.2" +DEFAULT_VERSION = "2.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index f811561263..2b9ccf1770 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.1.2' +__version__ = '2.2' From 7fef71ce0efb6ceb39522ac4ba78566734244c86 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:39:05 -0500 Subject: [PATCH 1733/8469] Added tag 2.2b1 for changeset ab1c2a26e06f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c1b5f5efbe..fe5e9da463 100644 --- a/.hgtags +++ b/.hgtags @@ -115,3 +115,4 @@ bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 +ab1c2a26e06f2a2006e8e867e4d41ccf1d6cf9b2 2.2b1 From 23c24bd67e7f2f2d5d53f9d0b09302dce21ef0b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 19:47:08 -0500 Subject: [PATCH 1734/8469] Missed the last two words. --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0937e02342..4b5f4e0c27 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES --- * Issue #141: Restored fix for allowing setup_requires dependencies to - override installed dependencies. + override installed dependencies during setup. ----- 2.1.1 From 92bed83a85874a95faa052b3ffab4f7cbf65c94c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:13:05 -0500 Subject: [PATCH 1735/8469] Update global reference. --- setuptools/tests/test_easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 8c797d550a..38ee83ea0d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -450,8 +450,8 @@ def quiet_context(): old_stdout = sys.stdout old_stderr = sys.stderr - new_stdout = sys.stdout = StringIO.StringIO() - new_stderr = sys.stderr = StringIO.StringIO() + new_stdout = sys.stdout = StringIO() + new_stderr = sys.stderr = StringIO() try: yield new_stdout, new_stderr finally: From 477d825d98155aa143bf6eb985d5d491368c63b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:16:45 -0500 Subject: [PATCH 1736/8469] Reindent according to TODO (indent was reserved to minimize the diff) --- setuptools/tests/test_easy_install.py | 29 +++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 38ee83ea0d..10c6fb617a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -261,21 +261,20 @@ def test_setup_requires_honors_fetch_params(self): # so skip this test for them. return with quiet_context(): - # TODO: correct indentation here - # create an sdist that has a build-time dependency. - with TestSetupRequires.create_sdist() as dist_file: - with tempdir_context() as temp_install_dir: - with environment_context(PYTHONPATH=temp_install_dir): - ei_params = ['--index-url', p_index.url, - '--allow-hosts', p_index_loc, - '--exclude-scripts', '--install-dir', temp_install_dir, - dist_file] - with reset_setup_stop_context(): - with argv_context(['easy_install']): - # attempt to install the dist. It should fail because - # it doesn't exist. - self.assertRaises(SystemExit, - easy_install_pkg.main, ei_params) + # create an sdist that has a build-time dependency. + with TestSetupRequires.create_sdist() as dist_file: + with tempdir_context() as temp_install_dir: + with environment_context(PYTHONPATH=temp_install_dir): + ei_params = ['--index-url', p_index.url, + '--allow-hosts', p_index_loc, + '--exclude-scripts', '--install-dir', temp_install_dir, + dist_file] + with reset_setup_stop_context(): + with argv_context(['easy_install']): + # attempt to install the dist. It should fail because + # it doesn't exist. + self.assertRaises(SystemExit, + easy_install_pkg.main, ei_params) # there should have been two or three requests to the server # (three happens on Python 3.3a) self.assertTrue(2 <= len(p_index.requests) <= 3) From 023cc7621f21b660b1eed7561f1a4c8caabb125c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:19:16 -0500 Subject: [PATCH 1737/8469] Remove unused variable --- setuptools/tests/test_easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 10c6fb617a..e58379aba9 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -353,7 +353,6 @@ def create_setup_requires_package(path): test_pkg = os.path.join(path, 'test_pkg') test_setup_py = os.path.join(test_pkg, 'setup.py') - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') os.mkdir(test_pkg) f = open(test_setup_py, 'w') From 929245d2582e5dba93540838981494fd5a57dbdf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:35:39 -0500 Subject: [PATCH 1738/8469] Rewrite merged tests to use context managers --- setuptools/tests/test_easy_install.py | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e58379aba9..fbba1803f1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -315,26 +315,23 @@ def test_setup_requires_overrides_version_conflict(self): version='0.0') working_set.add(fake_dist) - def setup_and_run(temp_dir): - test_pkg = create_setup_requires_package(temp_dir) - test_setup_py = os.path.join(test_pkg, 'setup.py') - try: - stdout, stderr = quiet_context( - lambda: reset_setup_stop_context( - # Don't even need to install the package, just running - # the setup.py at all is sufficient - lambda: run_setup(test_setup_py, ['--name']) - )) - except VersionConflict: - self.fail('Installing setup.py requirements caused ' - 'VersionConflict') - - lines = stdout.splitlines() - self.assertTrue(len(lines) > 0) - self.assertTrue(lines[-1].strip(), 'test_pkg') - try: - tempdir_context(setup_and_run) + with tempdir_context() as temp_dir: + test_pkg = create_setup_requires_package(temp_dir) + test_setup_py = os.path.join(test_pkg, 'setup.py') + with quiet_context() as (stdout, stderr): + with reset_setup_stop_context(): + try: + # Don't even need to install the package, just + # running the setup.py at all is sufficient + run_setup(test_setup_py, ['--name']) + except VersionConflict: + self.fail('Installing setup.py requirements ' + 'caused a VersionConflict') + + lines = stdout.splitlines() + self.assertTrue(len(lines) > 0) + self.assertTrue(lines[-1].strip(), 'test_pkg') finally: pkg_resources.__setstate__(pr_state) From 20f0eabf20453410b1beffdd2e0d686f4d711564 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:50:03 -0500 Subject: [PATCH 1739/8469] Use readlines on StringIO. Ensure quiet_context returns rewound buffers. --- setuptools/tests/test_easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fbba1803f1..d2cc7a0fe6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -329,7 +329,7 @@ def test_setup_requires_overrides_version_conflict(self): self.fail('Installing setup.py requirements ' 'caused a VersionConflict') - lines = stdout.splitlines() + lines = stdout.readlines() self.assertTrue(len(lines) > 0) self.assertTrue(lines[-1].strip(), 'test_pkg') finally: @@ -450,5 +450,7 @@ def quiet_context(): try: yield new_stdout, new_stderr finally: + new_stdout.seek(0) + new_stderr.seek(0) sys.stdout = old_stdout sys.stderr = old_stderr From f5167344b22647d8bc877019bd73c82c50dfb093 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 21:57:56 -0500 Subject: [PATCH 1740/8469] Open readme with codecs to enable explicit encoding declaration. Fixes #144. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 15ba65f6d5..de254361d6 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import sys import os import textwrap +import codecs # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -81,7 +82,8 @@ def run(self): f.write(ep_content) -readme_file = open('README.txt') +readme_file = codecs.open('README.txt', encoding='utf-8') + # the release script adds hyperlinks to issues if os.path.exists('CHANGES (links).txt'): changes_file = open('CHANGES (links).txt') From c87de5d6670c583184e2a33ffa8eb1146e4b98c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 22:00:39 -0500 Subject: [PATCH 1741/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index dbe33d0a12..455dada1a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +2.1.2 +----- + +* Issue #144: Read long_description using codecs module to avoid errors + installing on systems where LANG=C. + ----- 2.1.1 ----- From d7bca1babc543c8bcfef6b65ea230493d3467543 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 22:01:16 -0500 Subject: [PATCH 1742/8469] Added tag 2.1.2 for changeset caab085e829f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c1b5f5efbe..c54b5df01c 100644 --- a/.hgtags +++ b/.hgtags @@ -115,3 +115,4 @@ bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 +caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 From df38635fd938de9964ad4e3ab861bc7d1ce760f1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2014 22:01:42 -0500 Subject: [PATCH 1743/8469] Bumped to 2.1.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 76 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c768e3c719..eb2c3fac53 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.1.2" +DEFAULT_VERSION = "2.1.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 90ea9dde43..cd85d500be 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [distutils.setup_keywords] -packages = setuptools.dist:check_packages +entry_points = setuptools.dist:check_entry_points +exclude_package_data = setuptools.dist:check_package_data use_2to3_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable +extras_require = setuptools.dist:check_extras test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -namespace_packages = setuptools.dist:check_nsp -extras_require = setuptools.dist:check_extras -zip_safe = setuptools.dist:assert_bool -entry_points = setuptools.dist:check_entry_points -exclude_package_data = setuptools.dist:check_package_data +test_loader = setuptools.dist:check_importable +dependency_links = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages include_package_data = setuptools.dist:assert_bool package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +zip_safe = setuptools.dist:assert_bool +use_2to3_exclude_fixers = setuptools.dist:assert_string_list use_2to3 = setuptools.dist:assert_bool - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +namespace_packages = setuptools.dist:check_nsp +tests_require = setuptools.dist:check_requirements [egg_info.writers] -eager_resources.txt = setuptools.command.egg_info:overwrite_arg top_level.txt = setuptools.command.egg_info:write_toplevel_names -requires.txt = setuptools.command.egg_info:write_requirements +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 +requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.commands] develop = setuptools.command.develop:develop -sdist = setuptools.command.sdist:sdist -install_lib = setuptools.command.install_lib:install_lib saveopts = setuptools.command.saveopts:saveopts -install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias upload_docs = setuptools.command.upload_docs:upload_docs -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register +test = setuptools.command.test:test +build_ext = setuptools.command.build_ext:build_ext +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_egg_info = setuptools.command.install_egg_info:install_egg_info setopt = setuptools.command.setopt:setopt -install_scripts = setuptools.command.install_scripts:install_scripts +rotate = setuptools.command.rotate:rotate easy_install = setuptools.command.easy_install:easy_install +install_lib = setuptools.command.install_lib:install_lib +egg_info = setuptools.command.egg_info:egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm build_py = setuptools.command.build_py:build_py bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg +register = setuptools.command.register:register install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts +sdist = setuptools.command.sdist:sdist + +[console_scripts] +easy_install-3.4 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 9a6bf43731..4fd464d812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index f811561263..2d31b1c326 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.1.2' +__version__ = '2.1.3' From dc18e9bab9e5bca57269775572a4e77fcef98b78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Feb 2014 09:31:48 -0500 Subject: [PATCH 1744/8469] Added comment emphasizing the importance of bdist_wheel. Using Python 3.3 fixes #143. --HG-- extra : amend_source : 46787fd35452f54da1a8afd2bf8a30dff920d8a2 --- release.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release.py b/release.py index 5735e10cd2..d2f82775b6 100644 --- a/release.py +++ b/release.py @@ -26,7 +26,8 @@ def after_push(): 'ez_setup.py', 'setuptools/version.py', ) -dist_commands = 'sdist',# 'bdist_wheel' +# bdist_wheel must be included or pip will break +dist_commands = 'sdist', 'bdist_wheel' test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" From ed2b58f7db37491f8ffa83c7dafbdb4b5b2ddbb4 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 7 Feb 2014 17:38:25 +0100 Subject: [PATCH 1745/8469] Use io.open() instead of codecs.open(). (builtins.open() is io.open() in Python 3.) --- setup.py | 6 +++--- setuptools/tests/test_svn.py | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index de254361d6..dc4391c27a 100755 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ #!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" -import sys +import io import os +import sys import textwrap -import codecs # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -82,7 +82,7 @@ def run(self): f.write(ep_content) -readme_file = codecs.open('README.txt', encoding='utf-8') +readme_file = io.open('README.txt', encoding='utf-8') # the release script adds hyperlinks to issues if os.path.exists('CHANGES (links).txt'): diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index afee32b6d2..3340036210 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- """svn tests""" - +import io import os +import subprocess import sys import unittest -import codecs -import subprocess from setuptools.tests import environment from setuptools.compat import unicode, unichr @@ -54,7 +53,7 @@ def test_svn_should_exist(self): def _read_utf8_file(path): fileobj = None try: - fileobj = codecs.open(path, 'r', 'utf-8') + fileobj = io.open(path, 'r', encoding='utf-8') data = fileobj.read() return data finally: From 57f35446cba456564e83fbfe8b72189606228142 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Feb 2014 21:34:14 -0500 Subject: [PATCH 1746/8469] Update changelog; Fixes #128. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 86e843bae2..1ead9360d4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Issue #141: Restored fix for allowing setup_requires dependencies to override installed dependencies during setup. +* Issue #128: Fixed issue where only the first dependency link was honored + in a distribution where multiple dependency links were supplied. ----- 2.1.2 From 1fc1bb4cccc4414d39cdb4f94c3e0680c81ecb1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Feb 2014 21:37:07 -0500 Subject: [PATCH 1747/8469] Added tag 2.2 for changeset 39f7ef5ef221 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 19b3167da8..e3af502655 100644 --- a/.hgtags +++ b/.hgtags @@ -117,3 +117,4 @@ c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 ab1c2a26e06f2a2006e8e867e4d41ccf1d6cf9b2 2.2b1 caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 +39f7ef5ef22183f3eba9e05a46068e1d9fd877b0 2.2 From bc5fdecacdb06e44977e72aa17a18c486dba098c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Feb 2014 21:37:39 -0500 Subject: [PATCH 1748/8469] Bumped to 2.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 82 ++++++++++++++-------------- setuptools/version.py | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1420c114df..784a69b10f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.2" +DEFAULT_VERSION = "2.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index cd85d500be..5e417433f7 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[distutils.setup_keywords] -entry_points = setuptools.dist:check_entry_points -exclude_package_data = setuptools.dist:check_package_data -use_2to3_fixers = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -test_suite = setuptools.dist:check_test_suite -convert_2to3_doctests = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -dependency_links = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -include_package_data = setuptools.dist:assert_bool -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -zip_safe = setuptools.dist:assert_bool -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -tests_require = setuptools.dist:check_requirements - [egg_info.writers] top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete PKG-INFO = setuptools.command.egg_info:write_pkg_info -dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements -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 -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg [distutils.commands] +install = setuptools.command.install:install develop = setuptools.command.develop:develop +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +build_ext = setuptools.command.build_ext:build_ext +install_scripts = setuptools.command.install_scripts:install_scripts +rotate = setuptools.command.rotate:rotate saveopts = setuptools.command.saveopts:saveopts alias = setuptools.command.alias:alias -upload_docs = setuptools.command.upload_docs:upload_docs -test = setuptools.command.test:test -build_ext = setuptools.command.build_ext:build_ext bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_egg_info = setuptools.command.install_egg_info:install_egg_info -setopt = setuptools.command.setopt:setopt -rotate = setuptools.command.rotate:rotate easy_install = setuptools.command.easy_install:easy_install +install_egg_info = setuptools.command.install_egg_info:install_egg_info install_lib = setuptools.command.install_lib:install_lib egg_info = setuptools.command.egg_info:egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +sdist = setuptools.command.sdist:sdist build_py = setuptools.command.build_py:build_py -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +upload_docs = setuptools.command.upload_docs:upload_docs register = setuptools.command.register:register -install = setuptools.command.install:install -install_scripts = setuptools.command.install_scripts:install_scripts -sdist = setuptools.command.sdist:sdist +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +setopt = setuptools.command.setopt:setopt + +[distutils.setup_keywords] +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool +use_2to3 = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +extras_require = setuptools.dist:check_extras +convert_2to3_doctests = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements +tests_require = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +package_data = setuptools.dist:check_package_data +include_package_data = setuptools.dist:assert_bool +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +exclude_package_data = setuptools.dist:check_package_data + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [console_scripts] -easy_install-3.4 = setuptools.command.easy_install:main easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main diff --git a/setuptools/version.py b/setuptools/version.py index 2b9ccf1770..93bbb90e96 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.2' +__version__ = '2.3' From 646d7585da63b3fe5b4b2d5bf057b3795ac21241 Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Mon, 16 Dec 2013 22:44:35 -0200 Subject: [PATCH 1749/8469] Do not override _bytecode_filenames The overridden version cannot handle Python 3.x while distutils verion can handle it just fine. --HG-- extra : rebase_source : 86fa56285849e97780e91eff405881bfb72184d5 --- setuptools/command/install_lib.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 82afa1421b..c508cd3317 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -4,18 +4,6 @@ class install_lib(_install_lib): """Don't add compiled flags to filenames of non-Python files""" - def _bytecode_filenames (self, py_filenames): - bytecode_files = [] - for py_file in py_filenames: - if not py_file.endswith('.py'): - continue - if self.compile: - bytecode_files.append(py_file + "c") - if self.optimize > 0: - bytecode_files.append(py_file + "o") - - return bytecode_files - def run(self): self.build() outfiles = self.install() From bd83591f366938374961d42757d04b25b08004a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Feb 2014 22:06:55 -0500 Subject: [PATCH 1750/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1ead9360d4..4214aca5b9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +--- +2.3 +--- + +* Pull Request #28: Remove backport of ``_bytecode_filenames`` which is + available in Python 2.6 and later, but also has better compatibility with + Python 3 environments. + --- 2.2 --- From 69eb2865b8fae0760f9cb62d099ec7e92a908672 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Feb 2014 10:16:37 -0500 Subject: [PATCH 1751/8469] Adding comment referencing #134. --- setuptools/command/easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 08ebf3e589..8e39ee8024 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -743,6 +743,8 @@ def get_template(filename): return clean_template if is_script: + # See https://bitbucket.org/pypa/setuptools/issue/134 for info + # on script file naming and downstream issues with SVR4 template_name = 'script template.py' if dev_path: template_name = template_name.replace('.py', ' (dev).py') From e8e9a565526ac00b508da4717e9ae1f548083ae0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 13:19:29 -0500 Subject: [PATCH 1752/8469] More succinctly implement declare_state. --- pkg_resources.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index bde30989fe..73225e69bf 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -90,10 +90,8 @@ def _bypass_ensure_directory(name, mode=0x1FF): # 0777 _state_vars = {} def _declare_state(vartype, **kw): - g = globals() - for name, val in kw.items(): - g[name] = val - _state_vars[name] = vartype + globals().update(kw) + _state_vars.update(dict.from_keys(kw, vartype)) def __getstate__(): state = {} @@ -2339,6 +2337,8 @@ def get_entry_info(self, group, name): def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" + if 'foo' in path: + import pdb; pdb.set_trace() loc = loc or self.location if not loc: return From cdc3b090d087825fe13d7b04846658d2bc8dae3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 13:27:18 -0500 Subject: [PATCH 1753/8469] Move comments --- pkg_resources.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 73225e69bf..2f3fbd2e0e 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2704,26 +2704,33 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -_declare_state('object', working_set = WorkingSet()) +_declare_state('object', working_set=WorkingSet()) try: # Does the main program list any requirements? from __main__ import __requires__ except ImportError: - pass # No: just use the default working set based on sys.path + # No: just use the default working set based on sys.path + pass else: # Yes: ensure the requirements are met, by prefixing sys.path if necessary try: working_set.require(__requires__) - except VersionConflict: # try it without defaults already on sys.path - working_set = WorkingSet([]) # by starting with an empty path + except VersionConflict: + # try it without defaults already on sys.path + # by starting with an empty path + working_set = WorkingSet([]) for dist in working_set.resolve( parse_requirements(__requires__), Environment() ): working_set.add(dist) - for entry in sys.path: # add any missing entries from sys.path + + # add any missing entries from sys.path + for entry in sys.path: if entry not in working_set.entries: working_set.add_entry(entry) - sys.path[:] = working_set.entries # then copy back to sys.path + + # then copy back to sys.path + sys.path[:] = working_set.entries require = working_set.require iter_entry_points = working_set.iter_entry_points From be05a93a7e1aabf31a0f90be3851fa941115808a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 13:31:50 -0500 Subject: [PATCH 1754/8469] Simplify syntax of for loop --- pkg_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2f3fbd2e0e..0b987e8f99 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2719,9 +2719,9 @@ def _initialize(g): # try it without defaults already on sys.path # by starting with an empty path working_set = WorkingSet([]) - for dist in working_set.resolve( - parse_requirements(__requires__), Environment() - ): + reqs = parse_requirements(__requires__) + dists = working_set.resolve(reqs, Environment()) + for dist in dists: working_set.add(dist) # add any missing entries from sys.path From b884660784a7404aa16bd3649e2a768ccb93901d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 14:04:11 -0500 Subject: [PATCH 1755/8469] Moved master working set construction into classmethods of WorkingSet. --- pkg_resources.py | 71 ++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 0b987e8f99..0120ab4f6a 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -427,6 +427,48 @@ def __init__(self, entries=None): for entry in entries: self.add_entry(entry) + @classmethod + def _build_master(cls): + """ + Prepare the master working set. + """ + ws = cls() + try: + from __main__ import __requires__ + except ImportError: + # The main program does not list any requirements + return ws + + # ensure the requirements are met + try: + ws.require(__requires__) + except VersionConflict: + return cls._build_from_requirements(__requires__) + + return ws + + @classmethod + def _build_from_requirements(cls, req_spec): + """ + Build a working set from a requirement spec. Rewrites sys.path. + """ + # try it without defaults already on sys.path + # by starting with an empty path + ws = cls([]) + reqs = parse_requirements(req_spec) + dists = working_set.resolve(reqs, Environment()) + for dist in dists: + ws.add(dist) + + # add any missing entries from sys.path + for entry in sys.path: + if entry not in ws.entries: + ws.add_entry(entry) + + # then copy back to sys.path + sys.path[:] = ws.entries + return ws + def add_entry(self, entry): """Add a path item to ``.entries``, finding any distributions on it @@ -2704,33 +2746,8 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -_declare_state('object', working_set=WorkingSet()) -try: - # Does the main program list any requirements? - from __main__ import __requires__ -except ImportError: - # No: just use the default working set based on sys.path - pass -else: - # Yes: ensure the requirements are met, by prefixing sys.path if necessary - try: - working_set.require(__requires__) - except VersionConflict: - # try it without defaults already on sys.path - # by starting with an empty path - working_set = WorkingSet([]) - reqs = parse_requirements(__requires__) - dists = working_set.resolve(reqs, Environment()) - for dist in dists: - working_set.add(dist) - - # add any missing entries from sys.path - for entry in sys.path: - if entry not in working_set.entries: - working_set.add_entry(entry) - - # then copy back to sys.path - sys.path[:] = working_set.entries +working_set = WorkingSet._build_master() +_declare_state('object', working_set=working_set) require = working_set.require iter_entry_points = working_set.iter_entry_points From 0e44d6b2abc8aa8dba6569fe089d49c9359716ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 14:12:47 -0500 Subject: [PATCH 1756/8469] I checked this syntax, then failed to update the code before committing. --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 0120ab4f6a..9e98e67173 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -91,7 +91,7 @@ def _bypass_ensure_directory(name, mode=0x1FF): # 0777 def _declare_state(vartype, **kw): globals().update(kw) - _state_vars.update(dict.from_keys(kw, vartype)) + _state_vars.update(dict.fromkeys(kw, vartype)) def __getstate__(): state = {} From 8a1154915bef1dbf5c9b106f1037ae3bdf19749b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 14:25:59 -0500 Subject: [PATCH 1757/8469] Neglected to remove another reference to the global 'working_set' --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9e98e67173..b0acfcdf39 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -456,7 +456,7 @@ def _build_from_requirements(cls, req_spec): # by starting with an empty path ws = cls([]) reqs = parse_requirements(req_spec) - dists = working_set.resolve(reqs, Environment()) + dists = ws.resolve(reqs, Environment()) for dist in dists: ws.add(dist) From c7308a00fabc74f1a3315d676a7c93fff40d7224 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 14:28:11 -0500 Subject: [PATCH 1758/8469] Remove debug code, unintentionally committed. --- pkg_resources.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index b0acfcdf39..2a47c58b93 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2379,8 +2379,6 @@ def get_entry_info(self, group, name): def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" - if 'foo' in path: - import pdb; pdb.set_trace() loc = loc or self.location if not loc: return From 790486c38d8c3912b37ffdc326654de96dc0c862 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 14:49:19 -0500 Subject: [PATCH 1759/8469] Normalize indentation in docstrings and function params --- ez_setup.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 784a69b10f..65c92dc6d8 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -116,7 +116,7 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15): + to_dir=os.curdir, download_delay=15): to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) @@ -261,9 +261,9 @@ def get_best_downloader(): return dl def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, delay=15, - downloader_factory=get_best_downloader): - """Download setuptools from a specified location and return its filename + to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader): + """ + Download setuptools from a specified location and return its filename `version` should be a valid setuptools version number that is available as an egg for download under the `download_base` URL (which should end @@ -287,11 +287,12 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, def _extractall(self, path=".", members=None): - """Extract all members from the archive to the current working - directory and set owner, modification time and permissions on - directories afterwards. `path' specifies a different directory - to extract to. `members' is optional and must be a subset of the - list returned by getmembers(). + """ + Extract all members from the archive to the current working + directory and set owner, modification time and permissions on + directories afterwards. `path' specifies a different directory + to extract to. `members' is optional and must be a subset of the + list returned by getmembers(). """ import copy import operator From 2fbffe9bf4bf6c71c5bbe94e3386d69a2db5f37c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 15:08:37 -0500 Subject: [PATCH 1760/8469] Replace _extractall with the canonical TarFile.extractall. --- ez_setup.py | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 65c92dc6d8..3e5907dcf9 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -48,7 +48,7 @@ def _install(tarball, install_args=()): try: os.chdir(tmpdir) tar = tarfile.open(tarball) - _extractall(tar) + tar.extractall() tar.close() # going in the directory @@ -76,7 +76,7 @@ def _build_egg(egg, tarball, to_dir): try: os.chdir(tmpdir) tar = tarfile.open(tarball) - _extractall(tar) + tar.extractall() tar.close() # going in the directory @@ -285,48 +285,6 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, downloader(url, saveto) return os.path.realpath(saveto) - -def _extractall(self, path=".", members=None): - """ - Extract all members from the archive to the current working - directory and set owner, modification time and permissions on - directories afterwards. `path' specifies a different directory - to extract to. `members' is optional and must be a subset of the - list returned by getmembers(). - """ - import copy - import operator - from tarfile import ExtractError - directories = [] - - if members is None: - members = self - - for tarinfo in members: - if tarinfo.isdir(): - # Extract directories with a safe mode. - directories.append(tarinfo) - tarinfo = copy.copy(tarinfo) - tarinfo.mode = 448 # decimal for oct 0700 - self.extract(tarinfo, path) - - # Reverse sort directories. - directories.sort(key=operator.attrgetter('name'), reverse=True) - - # Set correct owner, mtime and filemode on directories. - for tarinfo in directories: - dirpath = os.path.join(path, tarinfo.name) - try: - self.chown(tarinfo, dirpath) - self.utime(tarinfo, dirpath) - self.chmod(tarinfo, dirpath) - except ExtractError as e: - if self.errorlevel > 1: - raise - else: - self._dbg(1, "tarfile: %s" % e) - - def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package From 52dcb6d1c888a4a7a047f380783f572055a175dc Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 14 Apr 2006 19:13:24 +0000 Subject: [PATCH 1761/8469] Don't eagerly import namespace packages. This was the big reason for branching to 0.7 now, as I wanted this wart gone before anything went into Python 2.5. But it's gone now, yay! --HG-- extra : source : f3c5c19842064dd4a497baef0171aac54464a484 extra : amend_source : 3f79e71eedfc5f37a1813967bb53cf9d92a11919 --- CHANGES.txt | 13 +++++++++++++ docs/pkg_resources.txt | 17 ++++++++++------- pkg_resources.py | 4 +++- setuptools/command/build_py.py | 10 +++++----- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4214aca5b9..8200b99a95 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,19 @@ CHANGES ======= +--- +3.0 +--- + +* Issue #12: Namespace packages are now imported lazily. That is, the mere + declaration of a namespace package in an egg on ``sys.path`` no longer + causes it to be imported when ``pkg_resources`` is imported. Note that this + change means that all of a namespace package's ``__init__.py`` files must + include a ``declare_namespace()`` call in order to ensure that they will be + handled properly at runtime. In 2.x it was possible to get away without + including the declaration, but only at the cost of forcing namespace + packages to be imported early, which 3.0 no longer does. + --- 2.3 --- diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 8dd3e9abda..18b68db731 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -137,13 +137,16 @@ Namespace Package Support A namespace package is a package that only contains other packages and modules, with no direct contents of its own. Such packages can be split across -multiple, separately-packaged distributions. Normally, you do not need to use -the namespace package APIs directly; instead you should supply the -``namespace_packages`` argument to ``setup()`` in your project's ``setup.py``. -See the `setuptools documentation on namespace packages`_ for more information. - -However, if for some reason you need to manipulate namespace packages or -directly alter ``sys.path`` at runtime, you may find these APIs useful: +multiple, separately-packaged distributions. They are normally used to split +up large packages produced by a single organization, such as in the ``zope`` +namespace package for Zope Corporation packages, and the ``peak`` namespace +package for the Python Enterprise Application Kit. + +To create a namespace package, you list it in the ``namespace_packages`` +argument to ``setup()``, in your project's ``setup.py``. (See the `setuptools +documentation on namespace packages`_ for more information on this.) Also, +you must add a ``declare_namespace()`` call in the package's ``__init__.py`` +file(s): ``declare_namespace(name)`` Declare that the dotted package name `name` is a "namespace package" whose diff --git a/pkg_resources.py b/pkg_resources.py index 2a47c58b93..2d656f1a2b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2311,7 +2311,9 @@ def activate(self,path=None): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - list(map(declare_namespace, self._get_metadata('namespace_packages.txt'))) + for pkg in self._get_metadata('namespace_packages.txt'): + if pkg in sys.modules: + declare_namespace(pkg) def egg_name(self): """Return what this distribution's standard .egg filename should be""" diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 090b44d265..1efabc02b7 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -167,12 +167,12 @@ def check_package(self, package, package_dir): f = open(init_py,'rbU') if 'declare_namespace'.encode() not in f.read(): - from distutils import log - log.warn( - "WARNING: %s is a namespace package, but its __init__.py does\n" - "not declare_namespace(); setuptools 0.7 will REQUIRE this!\n" + from distutils.errors import DistutilsError + raise 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 + "details.)\n" % (package,) ) f.close() return init_py From 027e75e50a80d91feaad81d496da4d7d1714804f Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 14 Apr 2006 19:17:37 +0000 Subject: [PATCH 1762/8469] Namespace package doc tweaks. --HG-- extra : source : 81bfac3cf9a11fbb52b43cb3106419085ac8aee5 extra : histedit_source : 942f45916acfe482998d0cb7adefc08f095dcf0c --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d48ad34f0d..d277dcb5d3 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1369,7 +1369,7 @@ You must include the ``declare_namespace()`` line in the ``__init__.py`` of order to ensure that the namespace will be declared regardless of which project's copy of ``__init__.py`` is loaded first. If the first loaded ``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded!) +other copies will ever be loaded! TRANSITIONAL NOTE From d9c4d3c51e93c08a76d310e549c6d5de260667bb Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 3 Apr 2013 02:02:44 +0400 Subject: [PATCH 1763/8469] Added support for Windows RT (arm). --HG-- branch : distribute extra : rebase_source : c181b8cc551936e48bdc88d9435018d0d9de00b2 --- launcher.c | 8 ++++++++ setuptools/cli-arm-32.exe | Bin 0 -> 9216 bytes setuptools/command/easy_install.py | 3 +++ setuptools/gui-arm-32.exe | Bin 0 -> 9216 bytes 4 files changed, 11 insertions(+) create mode 100644 setuptools/cli-arm-32.exe create mode 100644 setuptools/gui-arm-32.exe diff --git a/launcher.c b/launcher.c index ea4c80b5c4..be69f0c6e9 100755 --- a/launcher.c +++ b/launcher.c @@ -14,6 +14,14 @@ gcc -DGUI=0 -mno-cygwin -O -s -o setuptools/cli.exe launcher.c gcc -DGUI=1 -mwindows -mno-cygwin -O -s -o setuptools/gui.exe launcher.c + To build for Windows RT, install both Visual Studio Express for Windows 8 + and for Windows Desktop (both freeware), create "win32" application using + "Windows Desktop" version, create new "ARM" target via + "Configuration Manager" menu and modify ".vcxproj" file by adding + "true" tag + as child of "PropertyGroup" tags that has "Debug|ARM" and "Release|ARM" + properties. + It links to msvcrt.dll, but this shouldn't be a problem since it doesn't actually run Python in the same process. Note that using 'exec' instead of 'spawn' doesn't work, because on Windows this leads to the Python diff --git a/setuptools/cli-arm-32.exe b/setuptools/cli-arm-32.exe new file mode 100644 index 0000000000000000000000000000000000000000..e2d4c3224b7d0d351273f441138047b73da4448c GIT binary patch literal 9216 zcmeHMdvugVmcL&=k|qym31a7geo2Fggd`n7=sb|7lXQRti4d5`1k+9D3tvmW=&zdv zA?F}Cv+<3#yBh&#*jb$o0=r~=EOF(SRnDrjI-3^s-~-97&KLxprdLg8Oz8d9*WIyI z+?oAn=bSm#Ilr!3w{G3Kb?erx%9oYv_mYx`R6s07bR0D+Ci(Xd{BT55uX}zfJu~Hv z!sA@?8-=Z+L*l(Y&nBPE#oKLex5v+K6nJ02%{$zD{i-#*%hM^8XJ=>3PN;rsQFiUa z>+GH+rhWN@=daLS8|?E0<@z5I^-<4Va{Gwfet6wR&o9uP1Gz^~KexBvvsbR4O4R=- z*Q*_Nk?H=vm9#Vvo#fK!i~1kmnv@x)A}*85#Nxo25$E2Mi&_ittZjPo{bp)nu_k9{ey*WSnIF5d`F4{a?h& z{lYds`Y&eVhuOu}ny?#`TzDdDxv$gaw-I^M!2*Lcz;qy`m|%5zT#Q*b>n-O9aV z#80)TElSIZ{`Nv{e#Klagn0^r;M3eML*|H41)Ej%hbcH)y!)`~DaD}@%fZIS$20~i zT^4$LOlxQ_tslCQoB?vGJ_=uVS#>yHxBl8k#t5<$;;I=%e0yp7km}IAX4NUJclsE& zxV|w?Xc3;Pv?t9OK+pL z|M(@ERyx#Pf&IQ|tkBhAZki^<_=?b~FsI>$*-TXI(l+$_a@z~%Td+gAo1BL#5JB|%P+FARG5B$^x1C?yKi}fZ#mLO$NZLnwNY&(s-25Etim2ZDyMDHU zOsv4zA79NoQ8KXgjE2x-NNQsZ>oJ!nB|!I3<`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_~iJ`rR!5 z9TDIN%ffKv%hovg9%#6Me1VE+8(uC58_6P<8O0ed8wh07uXr* z^z7eUxO;gTMBIVbb8~~3Vw&R^#yW2 z^ptR!_d5eU@j4`a;XpS=5jtA@&Vx8F_Y2Z|V{&u7{5t^CZWIm*F5bnSn+xsIcF#d? zm*6ktyPaDd4ne})I_)k=DCEoL?bMY0_EBoezT{I)+5F_ty{0S?H&lLOEpAxFd;cyP zvV9kQA)oQUjsu4e{P4i52R=EV@TdD1`|t7l{eAwQ`9JV$q&uX;(gV^X(%aH!5+7I_ zs0_3PE(FE{mjc-pH5I0c`z!h?9v+`2qyOk4_A5>0O zK3vsb^?21_)ss~xtDdSFs(PmCY}L7{k*XJ}#;Pt*WqjN?XnfOn$@s2u!q~A< z-00fq+Zfo`-}7Y8P|vxZ4Tm2-tf|hf)>Y?K^VLPwYkQ5ob-gXUZM|Y|p!Z1c!@YyO pPxby?@5NsJ8^p){zCULeGh8rSG^oop Date: Wed, 3 Apr 2013 02:05:53 +0400 Subject: [PATCH 1764/8469] Respected PEP-8. --HG-- branch : distribute extra : rebase_source : 58252278f993ece0a9b96c58c58f2851fa07e048 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b675e55923..3a848269a7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1835,7 +1835,7 @@ def get_script_args(dist, executable=sys_executable, wininst=False): ext, launcher = '-script.py', 'cli.exe' old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if platform.machine().lower() == 'arm' : + if platform.machine().lower() == 'arm': launcher = launcher.replace(".", "-arm.") if is_64bit(): launcher = launcher.replace(".", "-64.") From d8189bb53bbd7b3c38ee6c31844087f100143f51 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 3 Apr 2013 02:06:39 +0400 Subject: [PATCH 1765/8469] Respected project coding standard. --HG-- branch : distribute extra : rebase_source : ca79464fdbf6a8765b8928b99c8ef2ab69e35e42 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3a848269a7..a6ca741fd1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1835,7 +1835,7 @@ def get_script_args(dist, executable=sys_executable, wininst=False): ext, launcher = '-script.py', 'cli.exe' old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if platform.machine().lower() == 'arm': + if platform.machine().lower()=='arm': launcher = launcher.replace(".", "-arm.") if is_64bit(): launcher = launcher.replace(".", "-64.") From abc8fccd3d4f1b4df28f53cdf6ab6ce993097573 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 8 May 2013 00:51:13 +0400 Subject: [PATCH 1766/8469] Refactoring before introducing Windows RT ARM build. --HG-- branch : distribute extra : rebase_source : 96035e75dcfab459652403b1001f34c12205fd7f --- msvc-build-launcher.cmd | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 3666d723a8..f6d7fcbbba 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -1,15 +1,30 @@ @echo off REM VCVARSALL may be in Program Files or Program Files (x86) -PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC;%PATH% -PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH% +REM Use old Visual Studio 2008 so created .exe will be compatible with +REM old Windows versions. Free express edition can be downloaded via: +REM http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso +set PATH_OLD=%PATH% +set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC;%PATH% +set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH% REM set up the environment to compile to x86 -call VCVARSALL x86 -cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/cli-32.exe -cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/gui-32.exe +call VCVARSALL x86 >nul 2>&1 +if "%ERRORLEVEL%"=="0" ( + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/cli-32.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/gui-32.exe +) else ( + echo Visual Studio ^(Express^) 2008 not found to build Windows 32-bit version +) REM now for 64-bit -call VCVARSALL x86_amd64 -cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/cli-64.exe -cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/gui-64.exe \ No newline at end of file +call VCVARSALL x86_amd64 >nul 2>&1 +if "%ERRORLEVEL%"=="0" ( + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/cli-64.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/gui-64.exe +) else ( + echo Visual Studio ^(Express^) 2008 not found to build Windows 64-bit version +) + +set PATH=%PATH_OLD% + From bc2687f1dbf1f96e79ab2afb06f19d3ed3fba672 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 8 May 2013 00:54:52 +0400 Subject: [PATCH 1767/8469] Added Windows 8 RT ARM build. --HG-- branch : distribute extra : rebase_source : 3ddd6c8cfc2d46a1b2aaffa482b87cd19e9687fa --- msvc-build-launcher.cmd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index f6d7fcbbba..fb5935c057 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -26,5 +26,21 @@ if "%ERRORLEVEL%"=="0" ( echo Visual Studio ^(Express^) 2008 not found to build Windows 64-bit version ) +REM Windows RT ARM build requires both freeware +REM "Visual Studio Express 2012 for Windows 8" and +REM "Visual Studio Express 2012 for Windows Desktop" to be installed from +REM http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products +set PATH=%PATH_OLD% +set PATH=C:\Program Files\Microsoft Visual Studio 11.0\VC;%PATH% +set PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC;%PATH% +call VCVARSALL x86_arm >nul 2>&1 +if "%ERRORLEVEL%"=="0" ( + echo Building Windows RT Version ... + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:CONSOLE /out:setuptools/cli-arm-32.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:WINDOWS /out:setuptools/gui-arm-32.exe +) else ( + echo Visual Studio ^(Express^) 2012 not found to build Windows RT Version +) + set PATH=%PATH_OLD% From 328600bdabf9645cd6f8a16c9f735384c8bfb2b0 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 8 May 2013 00:56:39 +0400 Subject: [PATCH 1768/8469] ARM executables rebuilt. --HG-- branch : distribute extra : rebase_source : 385d71111170f3cb8fcdea2fc807d4e409621078 --- setuptools/cli-arm-32.exe | Bin 9216 -> 69120 bytes setuptools/gui-arm-32.exe | Bin 9216 -> 69120 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/setuptools/cli-arm-32.exe b/setuptools/cli-arm-32.exe index e2d4c3224b7d0d351273f441138047b73da4448c..2f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HH!8HED~r=E$UQb&==SLj=nm!l{I_366x%5;_vDB{&nh6Ih}mQI+VQs7@T7s7VY<3{RYq ls7)mP@bGHE+@*6(bBpI9U;h34I|u%q1OLu}|D`$be*m(8q7(oC delta 7 OcmZpe!_wffKm`B`e*&!l From b07cff51a39f25ef1efd88bd0f672718e875978c Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 8 May 2013 01:00:00 +0400 Subject: [PATCH 1769/8469] Fixed a (probably) bug with GUI windows launcher actually being compiled as CONSOLE windows application. The "GUI=0" and "GUI=1" is a compiler definition that affects how compiled code will work (.py or .pyw file to launch etc). But executable type is defined by a linker and can be changed only via /SUBSYSTEM command-line key. --HG-- branch : distribute extra : rebase_source : f909e335ae948d7743e07e690c7d564ad0f98c15 --- msvc-build-launcher.cmd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index fb5935c057..939fb65636 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -11,8 +11,8 @@ set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH% REM set up the environment to compile to x86 call VCVARSALL x86 >nul 2>&1 if "%ERRORLEVEL%"=="0" ( - cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/cli-32.exe - cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/gui-32.exe + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:CONSOLE /out:setuptools/cli-32.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:WINDOWS /out:setuptools/gui-32.exe ) else ( echo Visual Studio ^(Express^) 2008 not found to build Windows 32-bit version ) @@ -20,8 +20,8 @@ if "%ERRORLEVEL%"=="0" ( REM now for 64-bit call VCVARSALL x86_amd64 >nul 2>&1 if "%ERRORLEVEL%"=="0" ( - cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/cli-64.exe - cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/gui-64.exe + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe ) else ( echo Visual Studio ^(Express^) 2008 not found to build Windows 64-bit version ) From 03be2a031c1a9a881d48ca6c206e61bd39d77881 Mon Sep 17 00:00:00 2001 From: Grigory Petrov Date: Wed, 8 May 2013 01:44:35 +0400 Subject: [PATCH 1770/8469] Added comment about Visual Studio 2008 Express and 64-bit compilation. --HG-- branch : distribute extra : rebase_source : fb9ba33e9eff145bb3e162f34ae2f0101079d0be --- msvc-build-launcher.cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 939fb65636..6d76284287 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -18,12 +18,15 @@ if "%ERRORLEVEL%"=="0" ( ) REM now for 64-bit +REM Visual Studio 2008 Express can't create 64-bit executable without +REM modifications. Either use higher edition or search google how to +REM modify Express installation. call VCVARSALL x86_amd64 >nul 2>&1 if "%ERRORLEVEL%"=="0" ( cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe ) else ( - echo Visual Studio ^(Express^) 2008 not found to build Windows 64-bit version + echo Visual Studio 2008 not found to build Windows 64-bit version ) REM Windows RT ARM build requires both freeware From dca1e7421f068482b0e307509c1624cb90dbbe3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 8 May 2013 13:53:28 +0100 Subject: [PATCH 1771/8469] Updated changelog and contributors --HG-- branch : distribute extra : rebase_source : 0af5a5ae5cd823756e3461f202571a4a9d0e8fc3 --- CHANGES.txt | 8 ++++++++ CONTRIBUTORS.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cae946e0dc..7acd35abb8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,14 @@ CHANGES ======= ------ +0.6.39 +------ + +* Add support for console launchers on ARM platforms. +* Fix possible issue in GUI launchers where the subsystem was not supplied to + the linker. +* Launcher build script now refactored for robustness. + 0.6.35 ------ diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 22c90aba19..487e0a44d7 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -8,6 +8,7 @@ Contributors * Christophe Combelles * Daniel Stutzbach * Daniel Holth +* Grigory Petrov * Hanno Schlichting * Jannis Leidel * Jason R. Coombs From 6cf20b5f3ea5e6cd05eae3838b4f296c32234f7d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 8 May 2013 19:31:29 +0100 Subject: [PATCH 1772/8469] Adapted msvc-build-launcher to use the SDK, which is freely available and will target x64. --HG-- branch : distribute extra : rebase_source : 3bb4cc57e38d6fc2d8043ce89c57a5016833d890 --- msvc-build-launcher.cmd | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 6d76284287..b59c510b3b 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -1,32 +1,30 @@ @echo off REM VCVARSALL may be in Program Files or Program Files (x86) -REM Use old Visual Studio 2008 so created .exe will be compatible with -REM old Windows versions. Free express edition can be downloaded via: -REM http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso +REM Use old Windows SDK 6.1 so created .exe will be compatible with +REM old Windows versions. +REM Windows SDK 6.1 may be downloaded at: +REM http://www.microsoft.com/en-us/download/details.aspx?id=11310 set PATH_OLD=%PATH% -set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC;%PATH% -set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH% +set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;%PATH% +set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;%PATH% REM set up the environment to compile to x86 -call VCVARSALL x86 >nul 2>&1 +call VCVARS32 if "%ERRORLEVEL%"=="0" ( cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:CONSOLE /out:setuptools/cli-32.exe cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:WINDOWS /out:setuptools/gui-32.exe ) else ( - echo Visual Studio ^(Express^) 2008 not found to build Windows 32-bit version + echo Windows SDK 6.1 not found to build Windows 32-bit version ) REM now for 64-bit -REM Visual Studio 2008 Express can't create 64-bit executable without -REM modifications. Either use higher edition or search google how to -REM modify Express installation. -call VCVARSALL x86_amd64 >nul 2>&1 +call VCVARS64 if "%ERRORLEVEL%"=="0" ( cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe ) else ( - echo Visual Studio 2008 not found to build Windows 64-bit version + echo Windows SDK 6.1 not found to build Windows 64-bit version ) REM Windows RT ARM build requires both freeware From 254034545b0e936fec613ef964ceb43528330e58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 8 May 2013 19:32:02 +0100 Subject: [PATCH 1773/8469] Rebuilt the launcher using MS Windows SDK 6.1 with the /SUBSYSTEM parameters --HG-- branch : distribute extra : rebase_source : 35455b8da14f931b6c4b77bb66b85416c3e13ec5 --- setuptools/cli-32.exe | Bin 69632 -> 65536 bytes setuptools/cli-64.exe | Bin 75264 -> 74752 bytes setuptools/gui-32.exe | Bin 65536 -> 65536 bytes setuptools/gui-64.exe | Bin 75264 -> 75264 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe index 9b7717b78bbf71f105ccde26746a0f6e3a4d12db..3671e959cabab1e3b82a13edfadbc5fd890a4d99 100644 GIT binary patch delta 12509 zcmeHti(ivR_V+U(K$Iw;pbejYywRIF%>1wHNsn7eJCqS|9{(kR2@P^OH%$zxM z=A1L zALU{qI#$+G5Uh=g2r=SoTfEw_wYVg;1WpRF z_*ILmy|PSm^=yqaR_XFfgxKUZH?c()A=)!Jb>DSvafzC5${VW1iq*X(T74%i#PP~& zatmroB*MJhr*j(C+)+Z0J(Yc8g@{I5m0E$8-hN1}LYZYhDwQ?v_Rp*8&3$VN)I#i} zF&24KtT?xZRMlI4s;yEhVG3RCdbO8K5YlQh)jsL9@oFDk7TeNGsDO4pmE~%M;90#7 z>Y%Ee>shr8RgB;x(`q+KBb|e4Q`A0bdN!{Y`s3As82r2KLQhtf%RT1S#>+h{J(DY= z=bC-FK$uafIa%7HNf0>Fa?d1WNdjh`fiQJ5yr-ZU@b9FsxNHI3YY4d*&P);kI;bC$ha z?QgGW?k>Mcu4C1F>LPWBwBY`>T)`IYdE8xR|HU>}?a#J@pS4k0U2pE=d3-iWN@MFJ zjJ&$ua<|4aX~M?>1=Ulm)YG~uJ#hlDK+tGf9@)AE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ify why 'Visual Studio' is referenced for the SDK. --HG-- branch : distribute extra : rebase_source : 1f0b5eeb82b7551c66b15fb4379ec03e61d68344 --- msvc-build-launcher.cmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index b59c510b3b..6097aaf881 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -1,11 +1,12 @@ @echo off -REM VCVARSALL may be in Program Files or Program Files (x86) REM Use old Windows SDK 6.1 so created .exe will be compatible with REM old Windows versions. REM Windows SDK 6.1 may be downloaded at: REM http://www.microsoft.com/en-us/download/details.aspx?id=11310 set PATH_OLD=%PATH% + +REM The SDK creates a false install of Visual Studio at one of these locations set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;%PATH% set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;%PATH% From 23e024076a9902aa8aeedd9947c0fa5a4e5408f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 May 2013 15:23:44 +0100 Subject: [PATCH 1775/8469] Use x64 cross tools for building 64-bit launcher. I'm suspicious the only impact this will have is to enable building 64-bit launcher on 32-bit hosts. Also rebuilt launchers. --HG-- branch : distribute extra : rebase_source : 329591eb07b9d25717caee614012c8278926559d --- msvc-build-launcher.cmd | 3 ++- setuptools/cli-32.exe | Bin 65536 -> 65536 bytes setuptools/cli-64.exe | Bin 74752 -> 74752 bytes setuptools/gui-32.exe | Bin 65536 -> 65536 bytes setuptools/gui-64.exe | Bin 75264 -> 75264 bytes 5 files changed, 2 insertions(+), 1 deletion(-) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 6097aaf881..07c474d4dd 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -20,7 +20,8 @@ if "%ERRORLEVEL%"=="0" ( ) REM now for 64-bit -call VCVARS64 +REM Use the x86_amd64 profile, which is the 32-bit cross compiler for amd64 +call VCVARSx86_amd64 if "%ERRORLEVEL%"=="0" ( cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe index 3671e959cabab1e3b82a13edfadbc5fd890a4d99..b1487b7819e7286577a043c7726fbe0ca1543083 100644 GIT binary patch delta 16 YcmZo@U} Date: Thu, 9 May 2013 15:24:43 +0100 Subject: [PATCH 1776/8469] Removing legacy word-size-agnostic launchers. --HG-- branch : distribute extra : rebase_source : 5c5d41bbbd0a6731f81cf48afd436be6e9524ec9 --- setuptools/cli.exe | Bin 69632 -> 0 bytes setuptools/gui.exe | Bin 65536 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 setuptools/cli.exe delete mode 100644 setuptools/gui.exe diff --git a/setuptools/cli.exe b/setuptools/cli.exe deleted file mode 100644 index 9b7717b78bbf71f105ccde26746a0f6e3a4d12db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69632 zcmeFae|%KM)jxhWyGb@=lU*Qz009<=iUtu~qKQjzA=wa=z{bdiRT8iQu3Ks`+za?f zAn|5tZZ5adR$Kd2S}FKE__Td$Kb0T0f?0wI;4gkuM4>h+)rm_rlr&i&=6>I2?&b&D zKHum2*XN%vymIf%+%q$0&YW{*=FFMdvir9QW z;vOTMAP9*R#lQZy;4>M-LYi6d)N??}N16G1;6;hTw9A4pm52Vt!($SBK;{4KUt`zT z`lKCkpz^Q&O&3>g5b?3>2p)tNwUs(~$UmnbET3Mp;z9921Q6kEpN#k0_#5)igQ}(* zV8Y>Cd~l#*DzkG45P}{-Xr5lPa`kr~5`^dNln{p#@E-EdBM5VcMF0Qb|3wPuVvd#m z*q&rTkefX|wk-*P!?sY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BhDl#=jVsncSw5=xxz|k9J#@S*M_FN-$zh#1zHuiaim_ zxkMhxEY(`ocGW4>S=9}?aXPims+*yk1B_9HUY(169A|jaP!e@HD#SR#IL3pTph{BBQrT5|Rkf-!s?Sw|szueR8mKm_SD~NQs@DVWm8&b% zThv=IKAY6%)PlN2eE_rfYmE$8`+D+PAGU$;Z|wC*k40o@7RhdM#`t*%2CqL0uI z)sNMy^>^!kqkl&KHD>We{YXQa;W5J>3?~eq7=ohSiF!Y(C2FoQ)A%>zcgA*OhIy&^ z&*o3f?Wk3#CETL0L|CkrWtK8ag=LFntK~tcHkk-y4-rVb&K@@ z%-(I*?bce%-4QY4VkX8+iBZMqVvI4C7+XwL%+{C(V;;ra?T9hO#>Xy$`MBP_CN*%5KRGqAOUGtviQ;k#`i_w{N^2dL+(Usg}jShN?k%k_^S?L0$~ zVLj&b+lC{Cj|^WL;-fYK!-pE}(Vs^TH9u*&)0%CK1jc$I=9w5b`W^|^fG&qIS(T&O zraGefK~tjr1SRjU8>Q3e5_ILdUAlXtc1JZu^)*hw%9&(bWh^%iHO-HnX?B|pX!%zy zHI`x4BDV<`#3Cxx*~QxQwt2w~Vt)vFI!oi_MZ?NwUnc z*nuS%SQc59TCy!JOZinJcDLnO%O1;1mVK5t(5eS42Q5b}jh2&^)0Q(>Q_oohON*to zYg9|EGHbY1VU4gxT8CSe)^XN})+tt%)rQ`fWwl#VtqZJ+tV_}7Io5pZTB|)KHO4>7 bsj9#HerbVUTHu!!_@xDYX@UROTi|~I?X2KC diff --git a/setuptools/gui.exe b/setuptools/gui.exe deleted file mode 100644 index 3f64af7de42fd6597b4c6cf50896d32a98a7d6a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeFae|S{YwLg3&Gf7U!gfqYdf&>^KC>m6Bh$aq!!DK>If)gVXMhIXw5a1P*= zK=91ioNT7$wt8#7Ew^&fZ|!aSz4l%~>=jH1O~9Z0sER^utWx9l%)N5(?7p>{`Zel z_&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DA2Rt zjCyDKg7K%t%qlagiY4uvja93>K4#kS*tzN1g_Tx2(i6jNU2Uf)G9KCDKuM4kol4%S^F_}Pvt*FF0H0|4Yuw0=MwkN`Ns zuK3Bj6hXcTPcHIJ(v`U4q6I_cA=5?t1_76ZLGm60i2qbT-qXVG>EU-4b`@t~*gq%i zvOKHw^Km6_mSL67YFszKLaU7ge1Mcy>LKN+0i?{eVRtjGeD?$LeG4GvkqdWM1K$n5 zZ^xDLJqAdAKL8}$Gl10T6+phf0m%168b#VC(q=q%tqn2q67`F`N8HG#$a`d)LcE@9ESSvQK-#jMVIZyn_df5KB<<@>rBxp4)bz_ZkcM!hm(YGFTTc6MS zTZ`JSphUjWq@Yb@o+}iTD zO5eI6Dx~#Td*tXJTcM*}ztM_W_8%6_Ez&$`6umz|A)&Z43F>o8;0kVLbfa$;#APKkzm;j6e+`vd65f}`(fCRt} zbo_-r0Zc%`x8fcJ4gvdsUjt79j{%PW4+GnP4L~K(&)(hV(x;QCPX>K{&((h)HidsO zMq-F3am9`Nq@CP-z9HRs!Jmwi=wD5x6~Fx>i=XAmSrq;GKmF{<_{ZWOqFyePQOTH& zWFGx2{0#y5$yiJQ{soY6@vnd=W_=C#7#KvuBmwgPxtJ1(GlOsWz*^t|;3?n;@E1TX mS6&BX17*Pf?Z3Y#vJ%_tXAA!#^)5TbeFWe(U=h%J{QQ3eaoo-T From a011aa8e2f3b911c809a5eb52f57e0584786ea4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 14:06:08 +0100 Subject: [PATCH 1777/8469] Updated tests of win_script_wrapper to use 32-bit wrappers --HG-- branch : distribute extra : source : 26421e9ba211b7e14171673c46c45692b6c8501d --- setuptools/tests/win_script_wrapper.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 9f7c81d6b7..9ccc96f07a 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -38,7 +38,7 @@ We'll also copy cli.exe to the sample-directory with the name foo.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb') >>> f.write( - ... pkg_resources.resource_string('setuptools', 'cli.exe') + ... pkg_resources.resource_string('setuptools', 'cli-32.exe') ... ) >>> f.close() @@ -83,7 +83,7 @@ enter the interpreter after running the script, you could use -Oi: >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') >>> f.write( - ... """#!%(python_exe)s -Oi + ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) ... print sys.argv[0][-14:] @@ -126,7 +126,7 @@ We'll also copy gui.exe to the sample-directory with the name bar.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb') >>> f.write( - ... pkg_resources.resource_string('setuptools', 'gui.exe') + ... pkg_resources.resource_string('setuptools', 'gui-32.exe') ... ) >>> f.close() From 8aeb4633600f478ad3ff743b58df55d6c22cd2cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 14:01:53 -0400 Subject: [PATCH 1778/8469] Added tag 0.6.39 for changeset d737b2039c5f --HG-- branch : distribute extra : rebase_source : 72d42023ba7b68f0f14f73dcbeb29b75cd334b94 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e01ab6986e..b433c91f43 100644 --- a/.hgtags +++ b/.hgtags @@ -48,3 +48,4 @@ c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 +d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 From 3ab400cd437e4839cb8d4cc70dd5889a5b0c7469 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 14:13:13 -0400 Subject: [PATCH 1779/8469] Bumped to 0.6.40 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 355bf27e11fdf906de100c2a47145d44fac082cc --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 7 ++++--- setup.py | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index c2bfc20f64..610c52ce33 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.39.tar.gz - $ tar -xzvf distribute-0.6.39.tar.gz - $ cd distribute-0.6.39 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.40.tar.gz + $ tar -xzvf distribute-0.6.40.tar.gz + $ cd distribute-0.6.40 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index f9dc2d7425..c098b9d269 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.39" +DEFAULT_VERSION = "0.6.40" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index fc60a00841..ac332deb98 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.39' +version = '0.6.40' # The full version, including alpha/beta/rc tags. -release = '0.6.39' +release = '0.6.40' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index aeb989d52b..0f64fe87e0 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,8 @@ except Exception: pass -VERSION = '0.6.39' +VERSION = '0.6.40' +PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(): digits = map(int, VERSION.split('.')) @@ -118,9 +119,9 @@ def do_release(): if os.path.isdir('./dist'): shutil.rmtree('./dist') cmd = [sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '', - 'sdist', 'register', 'upload'] + 'sdist', 'register', 'upload', '-r', PACKAGE_INDEX] if has_docs: - cmd.append('upload_docs') + cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) subprocess.check_call(cmd) upload_bootstrap_script() diff --git a/setup.py b/setup.py index eeec315368..9d15793cfd 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.39" +VERSION = "0.6.40" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From c814c26df28f82dc18c3000a130e6b7c4a4b41f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 14:18:08 -0400 Subject: [PATCH 1780/8469] Use HTTPS for uploading the distribution to PyPI. --HG-- branch : distribute extra : rebase_source : e80c6f51364bbc373c016479e4b9e3e11be2db97 --- release.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/release.py b/release.py index aeb989d52b..b39ed73b26 100644 --- a/release.py +++ b/release.py @@ -23,6 +23,7 @@ pass VERSION = '0.6.39' +PACKAGE_INDEX = 'https://pypi.python.org/pypi' def get_next_version(): digits = map(int, VERSION.split('.')) @@ -117,10 +118,15 @@ def do_release(): has_docs = build_docs() if os.path.isdir('./dist'): shutil.rmtree('./dist') - cmd = [sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '', - 'sdist', 'register', 'upload'] + cmd = [ + sys.executable, 'setup.py', '-q', + 'egg_info', '-RD', '-b', '', + 'sdist', + 'register', '-r', PACKAGE_INDEX, + 'upload', '-r', PACKAGE_INDEX, + ] if has_docs: - cmd.append('upload_docs') + cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) subprocess.check_call(cmd) upload_bootstrap_script() From 068ab0e3a6e5146137ee9f913e3b1fbc5b337c22 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 14:44:35 -0400 Subject: [PATCH 1781/8469] Fix error in changelog RST --HG-- branch : distribute extra : rebase_source : dce6b630b2c568a650c30a8e868d0d03cf36cb19 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 0f57bb95b8..6053c70376 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ CHANGES check the contents of the file against the zip contents during each invocation of get_resource_filename. +------ 0.6.38 ------ From 9c6e0172e04e260af141ddf0362c6141a375763a Mon Sep 17 00:00:00 2001 From: "guy@guyr-air.infinidat.com" Date: Mon, 13 May 2013 15:21:51 +0300 Subject: [PATCH 1782/8469] issue #376: copying cli-32.exe to cli.exe and gui-32.exe to gui.exe to prevent breakage of other modules that take the binaries from distribute --HG-- branch : distribute extra : rebase_source : fb86f5549568529753c0be2357128f41039ed740 --- setuptools/cli.exe | Bin 0 -> 65536 bytes setuptools/gui.exe | Bin 0 -> 65536 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 setuptools/cli.exe create mode 100644 setuptools/gui.exe diff --git a/setuptools/cli.exe b/setuptools/cli.exe new file mode 100644 index 0000000000000000000000000000000000000000..b1487b7819e7286577a043c7726fbe0ca1543083 GIT binary patch literal 65536 zcmeFae|%KMxj%k3yGc&ShO@v10t8qfC>m5WpovRhA=wa=z=p_%6%z1@blsvwI0vv2 zNIY4alVK~j)mwY3trY!Sy|tffZ$+^cObBMdpZutbN^PuECoa`kXb2K>zVBzw<_Fq) zU-$d^{_*|%@qt&)nVIv<%rnnC&oeX6JTqHy>n_PINs%4a-Xw9jfY!Ot@}WQUBkK=MqH|Mf{(O%J6=?F0E)R-u5-_q9XB5EmFjL zRMB1HZ7a&fd)b}0hpCKjVjS>G(qfxk>Uow`_J8Y;?6yo>h9td;lqFW`r_=Cu;je?@ zJ}aCeNvRaYzy7!6vsuJK8t7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nD{ zUI;0AZBh#_UPL+aM1mId;}Jl@dJ1YFB@dgH&UmLnQ-NQfb0DO-25NlP5=++ zgxDbvqNadY z+zJqvH^mpIpMZMQ4S!WLb^SXW zZ#UHsVSs)(BGh%}@h2ROKhSCQ&IKIem{5YK`6#{5Hu~| zx_bw@5;XT9_(Weno<|S>&FVKSEROo6z*{!HtQ78r+~^7)+IS4`i9Q@Ij$biUo}TBJ z#un)I(^#HBkhd@f*+f?Y!D0s70fyWvO!7E~seC5L|A|i+5rD55Un;B_tS7#fslp2ZBNdLW z3;&?+ClUp!j94HUffJXVpCCF@aF7>Gvp@KWgfX>jVoD|xi!LZ`qvHkE($ngJ^G|;hWMrgb(cj|AY^h{N2X#dvGde{ad-; z^Zd73PdEDi-j5DGKZjNe9S|){kNPCIk1iL7m|#TA2lGWw;CO&cjLrb!eF?*93r~*} zJV%7M(avDKH0v-r05QXUz<DLO27khkq7i+d zhFV^UwXnwE>GaZANI#0{_4OG3w|p!x#dZokNN;u;4MA|~tj(?I1q?7uvBTVTn(sHz4Olu`tS3eky2sKk0X%C~KR*nD_#&dyq z-Sjw!EB}O37?(jGTsF}d6l@K&wx6*xXu_CikN9)P`1f{#nY-3(?MEvV0&;i>8-_Lg z1Ty3f*pVK&L239u8pA6^NH-Kzs-^JhTd^ zn!>CP9Uyc*d|d!ODWodm@9d$lRzw&D=vNi_ZQ&uaOABn^w04+^Ohq156;YOvlUXmP zC- zm5B;=B5EqKf6iu#0NE*;W>cW@8;;XD-Cxa!U_{W?*59scZcfY0mFM^|Cl7P_Ft;C2 eH^#aBaBe@G+YjgV!@2!%Za+j1%KuyL2mc2HGCo}Z literal 0 HcmV?d00001 From a731ab145f5bca79f452269c2dfc52ab0ad6f6de Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 6 Oct 2006 13:18:26 +0000 Subject: [PATCH 1840/8469] [Bug #1545341] Allow 'classifier' parameter to be a tuple as well as a list. Will backport. --- command/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/register.py b/command/register.py index dec9aa2bf2..5fcc8d2764 100644 --- a/command/register.py +++ b/command/register.py @@ -251,7 +251,7 @@ def post_to_server(self, data, auth=None): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if type(value) != type([]): + if type(value) not in (type([]), type( () )): value = [value] for value in value: value = unicode(value).encode("utf-8") From 942bf846fffbdd0aa873115756281bd91d155dea Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 8 Oct 2006 17:49:52 +0000 Subject: [PATCH 1841/8469] MacOSX: distutils changes the values of BASECFLAGS and LDFLAGS when using a universal build of python on OSX 10.3 to ensure that those flags can be used to compile code (the universal build uses compiler flags that aren't supported on 10.3). This patches gives the same treatment to CFLAGS, PY_CFLAGS and BLDSHARED. --- sysconfig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index c3b1e4ecfb..0cfafab99b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -509,7 +509,10 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS'): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) From ab8b0e572d34555fd27810253833db03dd2efb0b Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 8 Oct 2006 17:50:26 +0000 Subject: [PATCH 1842/8469] Backport of r52233 --- sysconfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index c3b1e4ecfb..bf52a27474 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -509,7 +509,11 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS'): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) From e3d14a32164b47b216074647f6e3a05ede126198 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 8 Oct 2006 17:51:46 +0000 Subject: [PATCH 1843/8469] MacOSX: The universal build requires that users have the MacOSX10.4u SDK installed to build extensions. This patch makes distutils emit a warning when the compiler should use an SDK but that SDK is not installed, hopefully reducing some confusion. --- unixccompiler.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/unixccompiler.py b/unixccompiler.py index 6cd14f7728..d1fd1d9511 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -82,6 +82,22 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass + # Check if the SDK that is used during compilation actually exists, + # the universal build requires the usage of a universal SDK and not all + # users have that installed by default. + sysroot = None + if '-isysroot' in cc_args: + idx = cc_args.index('-isysroot') + sysroot = cc_args[idx+1] + elif '-isysroot' in compiler_so: + idx = compiler_so.index('-isysroot') + sysroot = compiler_so[idx+1] + + if sysroot and not os.path.isdir(sysroot): + log.warn("Compiling with an SDK that doesn't seem to exist: %s", + sysroot) + log.warn("Please check your Xcode installation") + return compiler_so class UnixCCompiler(CCompiler): From 364819cca89dfd6c2bfe1c7cdac42073baa01ba3 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 8 Oct 2006 17:52:37 +0000 Subject: [PATCH 1844/8469] Backport of r52236 --- unixccompiler.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/unixccompiler.py b/unixccompiler.py index 6cd14f7728..d1fd1d9511 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -82,6 +82,22 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass + # Check if the SDK that is used during compilation actually exists, + # the universal build requires the usage of a universal SDK and not all + # users have that installed by default. + sysroot = None + if '-isysroot' in cc_args: + idx = cc_args.index('-isysroot') + sysroot = cc_args[idx+1] + elif '-isysroot' in compiler_so: + idx = compiler_so.index('-isysroot') + sysroot = compiler_so[idx+1] + + if sysroot and not os.path.isdir(sysroot): + log.warn("Compiling with an SDK that doesn't seem to exist: %s", + sysroot) + log.warn("Please check your Xcode installation") + return compiler_so class UnixCCompiler(CCompiler): From 299c49adb264eb716796a042441fa013b094e2c2 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 9 Oct 2006 17:13:26 +0000 Subject: [PATCH 1845/8469] [Bug #1545341] Let the 'classifiers' parameter be a tuple as well as a list. --- command/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/register.py b/command/register.py index dec9aa2bf2..5fcc8d2764 100644 --- a/command/register.py +++ b/command/register.py @@ -251,7 +251,7 @@ def post_to_server(self, data, auth=None): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if type(value) != type([]): + if type(value) not in (type([]), type( () )): value = [value] for value in value: value = unicode(value).encode("utf-8") From 3624acc8638f40e03e87655ec596501dece3042f Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 18 Oct 2006 05:09:12 +0000 Subject: [PATCH 1846/8469] Whitespace normalization. --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index d1fd1d9511..75e8a5316e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -82,7 +82,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass - # Check if the SDK that is used during compilation actually exists, + # Check if the SDK that is used during compilation actually exists, # the universal build requires the usage of a universal SDK and not all # users have that installed by default. sysroot = None From a31ffb0ff77ad8260c85cab5c713d20688e2dc78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 4 Nov 2006 18:14:06 +0000 Subject: [PATCH 1847/8469] - Patch #1060577: Extract list of RPM files from spec file in bdist_rpm Will backport to 2.5. --- command/bdist_rpm.py | 60 ++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 5b09965867..03ef070c87 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -337,37 +337,47 @@ def run (self): if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) + # Determine the binary rpm names that should be built out of this spec + # file + # Note that some of these may not be really built (if the file + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" + non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" + q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( + src_rpm, non_src_rpm, spec_path) + + out = os.popen(q_cmd) + binary_rpms = [] + source_rpm = None + while 1: + line = out.readline() + if not line: + break + l = string.split(string.strip(line)) + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + self.spawn(rpm_cmd) - # XXX this is a nasty hack -- we really should have a proper way to - # find out the names of the RPM files created; also, this assumes - # that RPM creates exactly one source and one binary RPM. if not self.dry_run: if not self.binary_only: - srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) - assert len(srpms) == 1, \ - "unexpected number of SRPM files found: %s" % srpms - dist_file = ('bdist_rpm', 'any', - self._dist_path(srpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(srpms[0], self.dist_dir) + srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) + assert(os.path.exists(srpm)) + self.move_file(srpm, self.dist_dir) if not self.source_only: - rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], - "*/*debuginfo*.rpm")) - if debuginfo: - rpms.remove(debuginfo[0]) - assert len(rpms) == 1, \ - "unexpected number of RPM files found: %s" % rpms - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(rpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(rpms[0], self.dist_dir) - if debuginfo: - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(debuginfo[0])) - self.move_file(debuginfo[0], self.dist_dir) + for rpm in binary_rpms: + rpm = os.path.join(rpm_dir['RPMS'], rpm) + if os.path.exists(rpm): + self.move_file(rpm, self.dist_dir) # run() def _dist_path(self, path): From cf89211da249d28e2aa80ebb440380672878d59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 4 Nov 2006 18:14:22 +0000 Subject: [PATCH 1848/8469] Patch #1060577: Extract list of RPM files from spec file in bdist_rpm --- command/bdist_rpm.py | 60 ++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 5b09965867..03ef070c87 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -337,37 +337,47 @@ def run (self): if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) + # Determine the binary rpm names that should be built out of this spec + # file + # Note that some of these may not be really built (if the file + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" + non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" + q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( + src_rpm, non_src_rpm, spec_path) + + out = os.popen(q_cmd) + binary_rpms = [] + source_rpm = None + while 1: + line = out.readline() + if not line: + break + l = string.split(string.strip(line)) + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + self.spawn(rpm_cmd) - # XXX this is a nasty hack -- we really should have a proper way to - # find out the names of the RPM files created; also, this assumes - # that RPM creates exactly one source and one binary RPM. if not self.dry_run: if not self.binary_only: - srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) - assert len(srpms) == 1, \ - "unexpected number of SRPM files found: %s" % srpms - dist_file = ('bdist_rpm', 'any', - self._dist_path(srpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(srpms[0], self.dist_dir) + srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) + assert(os.path.exists(srpm)) + self.move_file(srpm, self.dist_dir) if not self.source_only: - rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], - "*/*debuginfo*.rpm")) - if debuginfo: - rpms.remove(debuginfo[0]) - assert len(rpms) == 1, \ - "unexpected number of RPM files found: %s" % rpms - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(rpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(rpms[0], self.dist_dir) - if debuginfo: - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(debuginfo[0])) - self.move_file(debuginfo[0], self.dist_dir) + for rpm in binary_rpms: + rpm = os.path.join(rpm_dir['RPMS'], rpm) + if os.path.exists(rpm): + self.move_file(rpm, self.dist_dir) # run() def _dist_path(self, path): From 5a83e9120fb4a858150b3ddfe7d7a9c7b7e9f7d6 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Fri, 10 Nov 2006 00:33:36 +0000 Subject: [PATCH 1849/8469] Fix SF#1566719: not creating site-packages (or other target directory) when installing .egg-info for a project that contains no modules or packages, while using --root (as in bdist_rpm). --- command/install_egg_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/install_egg_info.py b/command/install_egg_info.py index c31ac29668..c8880310df 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -35,6 +35,9 @@ def run(self): dir_util.remove_tree(target, dry_run=self.dry_run) elif os.path.exists(target): self.execute(os.unlink,(self.target,),"Removing "+target) + elif not os.path.isdir(self.install_dir): + self.execute(os.makedirs, (self.install_dir,), + "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: f = open(target, 'w') From cff70f8bd97d2c1072fcead0aab6a6ea16b8f473 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Fri, 10 Nov 2006 17:13:29 +0000 Subject: [PATCH 1850/8469] Fix SF#1566719: not creating site-packages (or other target directory) when installing .egg-info for a project that contains no modules or packages, while using --root (as in bdist_rpm). (Backport from trunk) --- command/install_egg_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/install_egg_info.py b/command/install_egg_info.py index c31ac29668..c8880310df 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -35,6 +35,9 @@ def run(self): dir_util.remove_tree(target, dry_run=self.dry_run) elif os.path.exists(target): self.execute(os.unlink,(self.target,),"Removing "+target) + elif not os.path.isdir(self.install_dir): + self.execute(os.makedirs, (self.install_dir,), + "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: f = open(target, 'w') From 1b618f36541a2feff0f6a9614b47605e3ca8add8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 12 Nov 2006 18:56:03 +0000 Subject: [PATCH 1851/8469] Patch #1360200: Use unmangled_version RPM spec field to deal with file name mangling. Will backport to 2.5. --- command/bdist_rpm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 03ef070c87..6f0e0d881c 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -391,6 +391,7 @@ def _make_spec_file(self): spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), + '%define unmangled_version ' + self.distribution.get_version(), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), @@ -412,9 +413,9 @@ def _make_spec_file(self): # but only after it has run: and we create the spec file before # running "sdist", in case of --spec-only. if self.use_bzip2: - spec_file.append('Source0: %{name}-%{version}.tar.bz2') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') else: - spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') spec_file.extend([ 'License: ' + self.distribution.get_license(), @@ -489,7 +490,7 @@ def _make_spec_file(self): # are just text that we drop in as-is. Hmmm. script_options = [ - ('prep', 'prep_script', "%setup"), + ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), ('install', 'install_script', ("%s install " From e63244103d3f57f2539f575704fe9f7fdad77aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 12 Nov 2006 18:56:18 +0000 Subject: [PATCH 1852/8469] Patch #1360200: Use unmangled_version RPM spec field to deal with file name mangling. --- command/bdist_rpm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 03ef070c87..6f0e0d881c 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -391,6 +391,7 @@ def _make_spec_file(self): spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), + '%define unmangled_version ' + self.distribution.get_version(), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), @@ -412,9 +413,9 @@ def _make_spec_file(self): # but only after it has run: and we create the spec file before # running "sdist", in case of --spec-only. if self.use_bzip2: - spec_file.append('Source0: %{name}-%{version}.tar.bz2') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') else: - spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') spec_file.extend([ 'License: ' + self.distribution.get_license(), @@ -489,7 +490,7 @@ def _make_spec_file(self): # are just text that we drop in as-is. Hmmm. script_options = [ - ('prep', 'prep_script', "%setup"), + ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), ('install', 'install_script', ("%s install " From 6188d82d9f938c426b361a467b459d7a0ff21db5 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sun, 3 Dec 2006 17:13:54 +0000 Subject: [PATCH 1853/8469] - Fix build failure on kfreebsd and on the hurd. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 00f8a6b9ae..2413829369 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - (sys.platform.startswith('linux') and + ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions From f2107aba5992adb79db1e79607b500541270f89b Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sun, 3 Dec 2006 17:16:41 +0000 Subject: [PATCH 1854/8469] - Fix build failure on kfreebsd and on the hurd. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 00f8a6b9ae..2413829369 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - (sys.platform.startswith('linux') and + ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions From 6c3e3687e30a200343363312dc6ee61e0dce9d8b Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Wed, 13 Dec 2006 04:49:30 +0000 Subject: [PATCH 1855/8469] Four months of trunk changes (including a few releases...) Merged revisions 51434-53004 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r51434 | neal.norwitz | 2006-08-21 20:20:10 +0200 (Mon, 21 Aug 2006) | 1 line Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-dev ........ r51439 | neal.norwitz | 2006-08-21 21:47:08 +0200 (Mon, 21 Aug 2006) | 6 lines Patch #1542451: disallow continue anywhere under a finally I'm undecided if this should be backported to 2.5 or 2.5.1. Armin suggested to wait (I'm of the same opinion). Thomas W thinks it's fine to go in 2.5. ........ r51443 | neal.norwitz | 2006-08-21 22:16:24 +0200 (Mon, 21 Aug 2006) | 4 lines Handle a few more error conditions. Klocwork 301 and 302. Will backport. ........ r51450 | neal.norwitz | 2006-08-22 00:21:19 +0200 (Tue, 22 Aug 2006) | 5 lines Patch #1541585: fix buffer overrun when performing repr() on a unicode string in a build with wide unicode (UCS-4) support. This code could be improved, so add an XXX comment. ........ r51456 | neal.norwitz | 2006-08-22 01:44:48 +0200 (Tue, 22 Aug 2006) | 1 line Try to get the windows bots working again with the new peephole.c ........ r51461 | anthony.baxter | 2006-08-22 09:36:59 +0200 (Tue, 22 Aug 2006) | 1 line patch for documentation for recent uuid changes (from ping) ........ r51473 | neal.norwitz | 2006-08-22 15:56:56 +0200 (Tue, 22 Aug 2006) | 1 line Alexander Belopolsky pointed out that pos is a size_t ........ r51489 | jeremy.hylton | 2006-08-22 22:46:00 +0200 (Tue, 22 Aug 2006) | 2 lines Expose column offset information in parse trees. ........ r51497 | andrew.kuchling | 2006-08-23 01:13:43 +0200 (Wed, 23 Aug 2006) | 1 line Move functional howto into trunk ........ r51515 | jeremy.hylton | 2006-08-23 20:37:43 +0200 (Wed, 23 Aug 2006) | 2 lines Baby steps towards better tests for tokenize ........ r51525 | alex.martelli | 2006-08-23 22:42:02 +0200 (Wed, 23 Aug 2006) | 6 lines x**2 should about equal x*x (including for a float x such that the result is inf) but didn't; added a test to test_float to verify that, and ignored the ERANGE value for errno in the pow operation to make the new test pass (with help from Marilyn Davis at the Google Python Sprint -- thanks!). ........ r51526 | jeremy.hylton | 2006-08-23 23:14:03 +0200 (Wed, 23 Aug 2006) | 20 lines Bug fixes large and small for tokenize. Small: Always generate a NL or NEWLINE token following a COMMENT token. The old code did not generate an NL token if the comment was on a line by itself. Large: The output of untokenize() will now match the input exactly if it is passed the full token sequence. The old, crufty output is still generated if a limited input sequence is provided, where limited means that it does not include position information for tokens. Remaining bug: There is no CONTINUATION token (\) so there is no way for untokenize() to handle such code. Also, expanded the number of doctests in hopes of eventually removing the old-style tests that compare against a golden file. Bug fix candidate for Python 2.5.1. (Sigh.) ........ r51527 | jeremy.hylton | 2006-08-23 23:26:46 +0200 (Wed, 23 Aug 2006) | 5 lines Replace dead code with an assert. Now that COMMENT tokens are reliably followed by NL or NEWLINE, there is never a need to add extra newlines in untokenize. ........ r51530 | alex.martelli | 2006-08-24 00:17:59 +0200 (Thu, 24 Aug 2006) | 7 lines Reverting the patch that tried to fix the issue whereby x**2 raises OverflowError while x*x succeeds and produces infinity; apparently these inconsistencies cannot be fixed across ``all'' platforms and there's a widespread feeling that therefore ``every'' platform should keep suffering forevermore. Ah well. ........ r51565 | thomas.wouters | 2006-08-24 20:40:20 +0200 (Thu, 24 Aug 2006) | 6 lines Fix SF bug #1545837: array.array borks on deepcopy. array.__deepcopy__() needs to take an argument, even if it doesn't actually use it. Will backport to 2.5 and 2.4 (if applicable.) ........ r51580 | martin.v.loewis | 2006-08-25 02:03:34 +0200 (Fri, 25 Aug 2006) | 3 lines Patch #1545507: Exclude ctypes package in Win64 MSI file. Will backport to 2.5. ........ r51589 | neal.norwitz | 2006-08-25 03:52:49 +0200 (Fri, 25 Aug 2006) | 1 line importing types is not necessary if we use isinstance ........ r51604 | thomas.heller | 2006-08-25 09:27:33 +0200 (Fri, 25 Aug 2006) | 3 lines Port _ctypes.pyd to win64 on AMD64. ........ r51605 | thomas.heller | 2006-08-25 09:34:51 +0200 (Fri, 25 Aug 2006) | 3 lines Add missing file for _ctypes.pyd port to win64 on AMD64. ........ r51606 | thomas.heller | 2006-08-25 11:26:33 +0200 (Fri, 25 Aug 2006) | 6 lines Build _ctypes.pyd for win AMD64 into the MSVC project file. Since MSVC doesn't know about .asm files, a helper batch file is needed to find ml64.exe in predefined locations. The helper script hardcodes the path to the MS Platform SDK. ........ r51608 | armin.rigo | 2006-08-25 14:44:28 +0200 (Fri, 25 Aug 2006) | 4 lines The regular expression engine in '_sre' can segfault when interpreting bogus bytecode. It is unclear whether this is a real bug or a "won't fix" case like bogus_code_obj.py. ........ r51617 | tim.peters | 2006-08-26 00:05:39 +0200 (Sat, 26 Aug 2006) | 2 lines Whitespace normalization. ........ r51618 | tim.peters | 2006-08-26 00:06:44 +0200 (Sat, 26 Aug 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r51619 | tim.peters | 2006-08-26 00:26:21 +0200 (Sat, 26 Aug 2006) | 3 lines A new test here relied on preserving invisible trailing whitespace in expected output. Stop that. ........ r51624 | jack.diederich | 2006-08-26 20:42:06 +0200 (Sat, 26 Aug 2006) | 4 lines - Move functions common to all path modules into genericpath.py and have the OS speicifc path modules import them. - Have os2emxpath import common functions fron ntpath instead of using copies ........ r51642 | neal.norwitz | 2006-08-29 07:40:58 +0200 (Tue, 29 Aug 2006) | 1 line Fix a couple of typos. ........ r51647 | marc-andre.lemburg | 2006-08-29 12:34:12 +0200 (Tue, 29 Aug 2006) | 5 lines Fix a buglet in the error reporting (SF bug report #1546372). This should probably go into Python 2.5 or 2.5.1 as well. ........ r51663 | armin.rigo | 2006-08-31 10:51:06 +0200 (Thu, 31 Aug 2006) | 3 lines Doc fix: hashlib objects don't always return a digest of 16 bytes. Backport candidate for 2.5. ........ r51664 | nick.coghlan | 2006-08-31 14:00:43 +0200 (Thu, 31 Aug 2006) | 1 line Fix the wrongheaded implementation of context management in the decimal module and add unit tests. (python-dev discussion is ongoing regarding what we do about Python 2.5) ........ r51665 | nick.coghlan | 2006-08-31 14:51:25 +0200 (Thu, 31 Aug 2006) | 1 line Remove the old decimal context management tests from test_contextlib (guess who didn't run the test suite before committing...) ........ r51669 | brett.cannon | 2006-08-31 20:54:26 +0200 (Thu, 31 Aug 2006) | 4 lines Make sure memory is properly cleaned up in file_init. Backport candidate. ........ r51671 | brett.cannon | 2006-08-31 23:47:52 +0200 (Thu, 31 Aug 2006) | 2 lines Fix comment about indentation level in C files. ........ r51674 | brett.cannon | 2006-09-01 00:42:37 +0200 (Fri, 01 Sep 2006) | 3 lines Have pre-existing C files use 8 spaces indents (to match old PEP 7 style), but have all new files use 4 spaces (to match current PEP 7 style). ........ r51676 | fred.drake | 2006-09-01 05:57:19 +0200 (Fri, 01 Sep 2006) | 3 lines - SF patch #1550263: Enhance and correct unittest docs - various minor cleanups for improved consistency ........ r51677 | georg.brandl | 2006-09-02 00:30:52 +0200 (Sat, 02 Sep 2006) | 2 lines evalfile() should be execfile(). ........ r51681 | neal.norwitz | 2006-09-02 04:43:17 +0200 (Sat, 02 Sep 2006) | 1 line SF #1547931, fix typo (missing and). Will backport to 2.5 ........ r51683 | neal.norwitz | 2006-09-02 04:50:35 +0200 (Sat, 02 Sep 2006) | 1 line Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport to 2.5.1 and earlier. ........ r51684 | neal.norwitz | 2006-09-02 04:58:13 +0200 (Sat, 02 Sep 2006) | 4 lines Bug #1550714: fix SystemError from itertools.tee on negative value for n. Needs backport to 2.5.1 and earlier. ........ r51685 | nick.coghlan | 2006-09-02 05:54:17 +0200 (Sat, 02 Sep 2006) | 1 line Make decimal.ContextManager a private implementation detail of decimal.localcontext() ........ r51686 | nick.coghlan | 2006-09-02 06:04:18 +0200 (Sat, 02 Sep 2006) | 1 line Further corrections to the decimal module context management documentation ........ r51688 | raymond.hettinger | 2006-09-02 19:07:23 +0200 (Sat, 02 Sep 2006) | 1 line Fix documentation nits for decimal context managers. ........ r51690 | neal.norwitz | 2006-09-02 20:51:34 +0200 (Sat, 02 Sep 2006) | 1 line Add missing word in comment ........ r51691 | neal.norwitz | 2006-09-02 21:40:19 +0200 (Sat, 02 Sep 2006) | 7 lines Hmm, this test has failed at least twice recently on the OpenBSD and Debian sparc buildbots. Since this goes through a lot of tests and hits the disk a lot it could be slow (especially if NFS is involved). I'm not sure if that's the problem, but printing periodic msgs shouldn't hurt. The code was stolen from test_compiler. ........ r51693 | nick.coghlan | 2006-09-03 03:02:00 +0200 (Sun, 03 Sep 2006) | 1 line Fix final documentation nits before backporting decimal module fixes to 2.5 ........ r51694 | nick.coghlan | 2006-09-03 03:06:07 +0200 (Sun, 03 Sep 2006) | 1 line Typo fix for decimal docs ........ r51697 | nick.coghlan | 2006-09-03 03:20:46 +0200 (Sun, 03 Sep 2006) | 1 line NEWS entry on trunk for decimal module changes ........ r51704 | raymond.hettinger | 2006-09-04 17:32:48 +0200 (Mon, 04 Sep 2006) | 1 line Fix endcase for str.rpartition() ........ r51716 | tim.peters | 2006-09-05 04:18:09 +0200 (Tue, 05 Sep 2006) | 12 lines "Conceptual" merge of rev 51711 from the 2.5 branch. i_divmod(): As discussed on Python-Dev, changed the overflow checking to live happily with recent gcc optimizations that assume signed integer arithmetic never overflows. This differs from the corresponding change on the 2.5 and 2.4 branches, using a less obscure approach, but one that /may/ tickle platform idiocies in their definitions of LONG_MIN. The 2.4 + 2.5 change avoided introducing a dependence on LONG_MIN, at the cost of substantially goofier code. ........ r51717 | tim.peters | 2006-09-05 04:21:19 +0200 (Tue, 05 Sep 2006) | 2 lines Whitespace normalization. ........ r51719 | tim.peters | 2006-09-05 04:22:17 +0200 (Tue, 05 Sep 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r51720 | neal.norwitz | 2006-09-05 04:24:03 +0200 (Tue, 05 Sep 2006) | 2 lines Fix SF bug #1546288, crash in dict_equal. ........ r51721 | neal.norwitz | 2006-09-05 04:25:41 +0200 (Tue, 05 Sep 2006) | 1 line Fix SF #1552093, eval docstring typo (3 ps in mapping) ........ r51724 | neal.norwitz | 2006-09-05 04:35:08 +0200 (Tue, 05 Sep 2006) | 1 line This was found by Guido AFAIK on p3yk (sic) branch. ........ r51725 | neal.norwitz | 2006-09-05 04:36:20 +0200 (Tue, 05 Sep 2006) | 1 line Add a NEWS entry for str.rpartition() change ........ r51728 | neal.norwitz | 2006-09-05 04:57:01 +0200 (Tue, 05 Sep 2006) | 1 line Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34]. ........ r51729 | neal.norwitz | 2006-09-05 05:53:08 +0200 (Tue, 05 Sep 2006) | 12 lines Bug #1520864 (again): unpacking singleton tuples in list comprehensions and generator expressions (x for x, in ... ) works again. Sigh, I only fixed for loops the first time, not list comps and genexprs too. I couldn't find any more unpacking cases where there is a similar bug lurking. This code should be refactored to eliminate the duplication. I'm sure the listcomp/genexpr code can be refactored. I'm not sure if the for loop can re-use any of the same code though. Will backport to 2.5 (the only place it matters). ........ r51731 | neal.norwitz | 2006-09-05 05:58:26 +0200 (Tue, 05 Sep 2006) | 1 line Add a comment about some refactoring. (There's probably more that should be done.) I will reformat this file in the next checkin due to the inconsistent tabs/spaces. ........ r51732 | neal.norwitz | 2006-09-05 06:00:12 +0200 (Tue, 05 Sep 2006) | 1 line M-x untabify ........ r51737 | hyeshik.chang | 2006-09-05 14:07:09 +0200 (Tue, 05 Sep 2006) | 7 lines Fix a few bugs on cjkcodecs found by Oren Tirosh: - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly. - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312 codepoints to conform the standard. - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2 codepoints now. ........ r51738 | hyeshik.chang | 2006-09-05 14:14:57 +0200 (Tue, 05 Sep 2006) | 2 lines Fix a typo: 2013 -> 0213 ........ r51740 | georg.brandl | 2006-09-05 14:44:58 +0200 (Tue, 05 Sep 2006) | 3 lines Bug #1552618: change docs of dict.has_key() to reflect recommendation to use "in". ........ r51742 | andrew.kuchling | 2006-09-05 15:02:40 +0200 (Tue, 05 Sep 2006) | 1 line Rearrange example a bit, and show rpartition() when separator is not found ........ r51744 | andrew.kuchling | 2006-09-05 15:15:41 +0200 (Tue, 05 Sep 2006) | 1 line [Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren ........ r51745 | andrew.kuchling | 2006-09-05 15:19:18 +0200 (Tue, 05 Sep 2006) | 3 lines [Bug #1526834] Fix crash in pdb when you do 'b f('; the function name was placed into a regex pattern and the unbalanced paren caused re.compile() to report an error ........ r51751 | kristjan.jonsson | 2006-09-05 19:58:12 +0200 (Tue, 05 Sep 2006) | 6 lines Update the PCBuild8 solution. Facilitate cross-compilation by having binaries in separate Win32 and x64 directories. Rationalized configs by making proper use of platforms/configurations. Remove pythoncore_pgo project. Add new PGIRelease and PGORelease configurations to perform Profile Guided Optimisation. Removed I64 support, but this can be easily added by copying the x64 platform settings. ........ r51758 | gustavo.niemeyer | 2006-09-06 03:58:52 +0200 (Wed, 06 Sep 2006) | 3 lines Fixing #1531862: Do not close standard file descriptors in the subprocess module. ........ r51760 | neal.norwitz | 2006-09-06 05:58:34 +0200 (Wed, 06 Sep 2006) | 1 line Revert 51758 because it broke all the buildbots ........ r51762 | georg.brandl | 2006-09-06 08:03:59 +0200 (Wed, 06 Sep 2006) | 3 lines Bug #1551427: fix a wrong NULL pointer check in the win32 version of os.urandom(). ........ r51765 | georg.brandl | 2006-09-06 08:09:31 +0200 (Wed, 06 Sep 2006) | 3 lines Bug #1550983: emit better error messages for erroneous relative imports (if not in package and if beyond toplevel package). ........ r51767 | neal.norwitz | 2006-09-06 08:28:06 +0200 (Wed, 06 Sep 2006) | 1 line with and as are now keywords. There are some generated files I can't recreate. ........ r51770 | georg.brandl | 2006-09-06 08:50:05 +0200 (Wed, 06 Sep 2006) | 5 lines Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack. Also make sure that every exception class has __module__ set to 'exceptions'. ........ r51785 | georg.brandl | 2006-09-06 22:05:58 +0200 (Wed, 06 Sep 2006) | 2 lines Fix missing import of the types module in logging.config. ........ r51789 | marc-andre.lemburg | 2006-09-06 22:40:22 +0200 (Wed, 06 Sep 2006) | 3 lines Add news item for bug fix of SF bug report #1546372. ........ r51797 | gustavo.niemeyer | 2006-09-07 02:48:33 +0200 (Thu, 07 Sep 2006) | 3 lines Fixed subprocess bug #1531862 again, after removing tests offending buildbot ........ r51798 | raymond.hettinger | 2006-09-07 04:42:48 +0200 (Thu, 07 Sep 2006) | 1 line Fix refcounts and add error checks. ........ r51803 | nick.coghlan | 2006-09-07 12:50:34 +0200 (Thu, 07 Sep 2006) | 1 line Fix the speed regression in inspect.py by adding another cache to speed up getmodule(). Patch #1553314 ........ r51805 | ronald.oussoren | 2006-09-07 14:03:10 +0200 (Thu, 07 Sep 2006) | 2 lines Fix a glaring error and update some version numbers. ........ r51814 | andrew.kuchling | 2006-09-07 15:56:23 +0200 (Thu, 07 Sep 2006) | 1 line Typo fix ........ r51815 | andrew.kuchling | 2006-09-07 15:59:38 +0200 (Thu, 07 Sep 2006) | 8 lines [Bug #1552726] Avoid repeatedly polling in interactive mode -- only put a timeout on the select() if an input hook has been defined. Patch by Richard Boulton. This select() code is only executed with readline 2.1, or if READLINE_CALLBACKS is defined. Backport candidate for 2.5, 2.4, probably earlier versions too. ........ r51816 | armin.rigo | 2006-09-07 17:06:00 +0200 (Thu, 07 Sep 2006) | 2 lines Add a warning notice on top of the generated grammar.txt. ........ r51819 | thomas.heller | 2006-09-07 20:56:28 +0200 (Thu, 07 Sep 2006) | 5 lines Anonymous structure fields that have a bit-width specified did not work, and they gave a strange error message from PyArg_ParseTuple: function takes exactly 2 arguments (3 given). With tests. ........ r51820 | thomas.heller | 2006-09-07 21:09:54 +0200 (Thu, 07 Sep 2006) | 4 lines The cast function did not accept c_char_p or c_wchar_p instances as first argument, and failed with a 'bad argument to internal function' error message. ........ r51827 | nick.coghlan | 2006-09-08 12:04:38 +0200 (Fri, 08 Sep 2006) | 1 line Add missing NEWS entry for rev 51803 ........ r51828 | andrew.kuchling | 2006-09-08 15:25:23 +0200 (Fri, 08 Sep 2006) | 1 line Add missing word ........ r51829 | andrew.kuchling | 2006-09-08 15:35:49 +0200 (Fri, 08 Sep 2006) | 1 line Explain SQLite a bit more clearly ........ r51830 | andrew.kuchling | 2006-09-08 15:36:36 +0200 (Fri, 08 Sep 2006) | 1 line Explain SQLite a bit more clearly ........ r51832 | andrew.kuchling | 2006-09-08 16:02:45 +0200 (Fri, 08 Sep 2006) | 1 line Use native SQLite types ........ r51833 | andrew.kuchling | 2006-09-08 16:03:01 +0200 (Fri, 08 Sep 2006) | 1 line Use native SQLite types ........ r51835 | andrew.kuchling | 2006-09-08 16:05:10 +0200 (Fri, 08 Sep 2006) | 1 line Fix typo in example ........ r51837 | brett.cannon | 2006-09-09 09:11:46 +0200 (Sat, 09 Sep 2006) | 6 lines Remove the __unicode__ method from exceptions. Allows unicode() to be called on exception classes. Would require introducing a tp_unicode slot to make it work otherwise. Fixes bug #1551432 and will be backported. ........ r51854 | neal.norwitz | 2006-09-11 06:24:09 +0200 (Mon, 11 Sep 2006) | 8 lines Forward port of 51850 from release25-maint branch. As mentioned on python-dev, reverting patch #1504333 because it introduced an infinite loop in rev 47154. This patch also adds a test to prevent the regression. ........ r51855 | neal.norwitz | 2006-09-11 06:28:16 +0200 (Mon, 11 Sep 2006) | 5 lines Properly handle a NULL returned from PyArena_New(). (Also fix some whitespace) Klocwork #364. ........ r51856 | neal.norwitz | 2006-09-11 06:32:57 +0200 (Mon, 11 Sep 2006) | 1 line Add a "crasher" taken from the sgml bug report referenced in the comment ........ r51858 | georg.brandl | 2006-09-11 11:38:35 +0200 (Mon, 11 Sep 2006) | 12 lines Forward-port of rev. 51857: Building with HP's cc on HP-UX turned up a couple of problems. _PyGILState_NoteThreadState was declared as static inconsistently. Make it static as it's not necessary outside of this module. Some tests failed because errno was reset to 0. (I think the tests that failed were at least: test_fcntl and test_mailbox). Ensure that errno doesn't change after a call to Py_END_ALLOW_THREADS. This only affected debug builds. ........ r51865 | martin.v.loewis | 2006-09-12 21:49:20 +0200 (Tue, 12 Sep 2006) | 2 lines Forward-port 51862: Add sgml_input.html. ........ r51866 | andrew.kuchling | 2006-09-12 22:50:23 +0200 (Tue, 12 Sep 2006) | 1 line Markup typo fix ........ r51867 | andrew.kuchling | 2006-09-12 23:09:02 +0200 (Tue, 12 Sep 2006) | 1 line Some editing, markup fixes ........ r51868 | andrew.kuchling | 2006-09-12 23:21:51 +0200 (Tue, 12 Sep 2006) | 1 line More wordsmithing ........ r51877 | andrew.kuchling | 2006-09-14 13:22:18 +0200 (Thu, 14 Sep 2006) | 1 line Make --help mention that -v can be supplied multiple times ........ r51878 | andrew.kuchling | 2006-09-14 13:28:50 +0200 (Thu, 14 Sep 2006) | 1 line Rewrite help message to remove some of the parentheticals. (There were a lot of them.) ........ r51883 | ka-ping.yee | 2006-09-15 02:34:19 +0200 (Fri, 15 Sep 2006) | 2 lines Fix grammar errors and improve clarity. ........ r51885 | georg.brandl | 2006-09-15 07:22:24 +0200 (Fri, 15 Sep 2006) | 3 lines Correct elementtree module index entry. ........ r51889 | fred.drake | 2006-09-15 17:18:04 +0200 (Fri, 15 Sep 2006) | 4 lines - fix module name in links in formatted documentation - minor markup cleanup (forward-ported from release25-maint revision 51888) ........ r51891 | fred.drake | 2006-09-15 18:11:27 +0200 (Fri, 15 Sep 2006) | 3 lines revise explanation of returns_unicode to reflect bool values and to include the default value (merged from release25-maint revision 51890) ........ r51897 | martin.v.loewis | 2006-09-16 19:36:37 +0200 (Sat, 16 Sep 2006) | 2 lines Patch #1557515: Add RLIMIT_SBSIZE. ........ r51903 | ronald.oussoren | 2006-09-17 20:42:53 +0200 (Sun, 17 Sep 2006) | 2 lines Port of revision 51902 in release25-maint to the trunk ........ r51904 | ronald.oussoren | 2006-09-17 21:23:27 +0200 (Sun, 17 Sep 2006) | 3 lines Tweak Mac/Makefile in to ensure that pythonw gets rebuild when the major version of python changes (2.5 -> 2.6). Bug #1552935. ........ r51913 | guido.van.rossum | 2006-09-18 23:36:16 +0200 (Mon, 18 Sep 2006) | 2 lines Make this thing executable. ........ r51920 | gregory.p.smith | 2006-09-19 19:35:04 +0200 (Tue, 19 Sep 2006) | 5 lines Fixes a bug with bsddb.DB.stat where the flags and txn keyword arguments are transposed. (reported by Louis Zechtzer) ..already committed to release24-maint ..needs committing to release25-maint ........ r51926 | brett.cannon | 2006-09-20 20:34:28 +0200 (Wed, 20 Sep 2006) | 3 lines Accidentally didn't commit Misc/NEWS entry on when __unicode__() was removed from exceptions. ........ r51927 | brett.cannon | 2006-09-20 20:43:13 +0200 (Wed, 20 Sep 2006) | 6 lines Allow exceptions to be directly sliced again (e.g., ``BaseException(1,2,3)[0:2]``). Discovered in Python 2.5.0 by Thomas Heller and reported to python-dev. This should be backported to 2.5 . ........ r51928 | brett.cannon | 2006-09-20 21:28:35 +0200 (Wed, 20 Sep 2006) | 2 lines Make python.vim output more deterministic. ........ r51949 | walter.doerwald | 2006-09-21 17:09:55 +0200 (Thu, 21 Sep 2006) | 2 lines Fix typo. ........ r51950 | jack.diederich | 2006-09-21 19:50:26 +0200 (Thu, 21 Sep 2006) | 5 lines * regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t which breaks negative counts * added test for negative numbers will backport to 2.5.1 ........ r51953 | jack.diederich | 2006-09-21 22:34:49 +0200 (Thu, 21 Sep 2006) | 1 line added itertools.count(-n) fix ........ r51971 | neal.norwitz | 2006-09-22 10:16:26 +0200 (Fri, 22 Sep 2006) | 10 lines Fix %zd string formatting on Mac OS X so it prints negative numbers. In addition to testing positive numbers, verify negative numbers work in configure. In order to avoid compiler warnings on OS X 10.4, also change the order of the check for the format character to use (PY_FORMAT_SIZE_T) in the sprintf format for Py_ssize_t. This patch changes PY_FORMAT_SIZE_T from "" to "l" if it wasn't defined at configure time. Need to verify the buildbot results. Backport candidate (if everyone thinks this patch can't be improved). ........ r51972 | neal.norwitz | 2006-09-22 10:18:10 +0200 (Fri, 22 Sep 2006) | 7 lines Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)). These tests should be improved. Hopefully this fixes variations when flipping back and forth between fpdef and fplist. Backport candidate. ........ r51975 | neal.norwitz | 2006-09-22 10:47:23 +0200 (Fri, 22 Sep 2006) | 4 lines Mostly revert this file to the same version as before. Only force setting of PY_FORMAT_SIZE_T to "l" for Mac OSX. I don't know a better define to use. This should get rid of the warnings on other platforms and Mac too. ........ r51986 | fred.drake | 2006-09-23 02:26:31 +0200 (Sat, 23 Sep 2006) | 1 line add boilerplate "What's New" document so the docs will build ........ r51987 | neal.norwitz | 2006-09-23 06:11:38 +0200 (Sat, 23 Sep 2006) | 1 line Remove extra semi-colons reported by Johnny Lee on python-dev. Backport if anyone cares. ........ r51989 | neal.norwitz | 2006-09-23 20:11:58 +0200 (Sat, 23 Sep 2006) | 1 line SF Bug #1563963, add missing word and cleanup first sentance ........ r51990 | brett.cannon | 2006-09-23 21:53:20 +0200 (Sat, 23 Sep 2006) | 3 lines Make output on test_strptime() be more verbose in face of failure. This is in hopes that more information will help debug the failing test on HPPA Ubuntu. ........ r51991 | georg.brandl | 2006-09-24 12:36:01 +0200 (Sun, 24 Sep 2006) | 2 lines Fix webbrowser.BackgroundBrowser on Windows. ........ r51993 | georg.brandl | 2006-09-24 14:35:36 +0200 (Sun, 24 Sep 2006) | 4 lines Fix a bug in the parser's future statement handling that led to "with" not being recognized as a keyword after, e.g., this statement: from __future__ import division, with_statement ........ r51995 | georg.brandl | 2006-09-24 14:50:24 +0200 (Sun, 24 Sep 2006) | 4 lines Fix a bug in traceback.format_exception_only() that led to an error being raised when print_exc() was called without an exception set. In version 2.4, this printed "None", restored that behavior. ........ r52000 | armin.rigo | 2006-09-25 17:16:26 +0200 (Mon, 25 Sep 2006) | 2 lines Another crasher. ........ r52011 | brett.cannon | 2006-09-27 01:38:24 +0200 (Wed, 27 Sep 2006) | 2 lines Make the error message for when the time data and format do not match clearer. ........ r52014 | andrew.kuchling | 2006-09-27 18:37:30 +0200 (Wed, 27 Sep 2006) | 1 line Add news item for rev. 51815 ........ r52018 | andrew.kuchling | 2006-09-27 21:23:05 +0200 (Wed, 27 Sep 2006) | 1 line Make examples do error checking on Py_InitModule ........ r52032 | brett.cannon | 2006-09-29 00:10:14 +0200 (Fri, 29 Sep 2006) | 2 lines Very minor grammatical fix in a comment. ........ r52048 | george.yoshida | 2006-09-30 07:14:02 +0200 (Sat, 30 Sep 2006) | 4 lines SF bug #1567976 : fix typo Will backport to 2.5. ........ r52051 | gregory.p.smith | 2006-09-30 08:08:20 +0200 (Sat, 30 Sep 2006) | 2 lines wording change ........ r52053 | georg.brandl | 2006-09-30 09:24:48 +0200 (Sat, 30 Sep 2006) | 2 lines Bug #1567375: a minor logical glitch in example description. ........ r52056 | georg.brandl | 2006-09-30 09:31:57 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1565661: in webbrowser, split() the command for the default GNOME browser in case it is a command with args. ........ r52058 | georg.brandl | 2006-09-30 10:43:30 +0200 (Sat, 30 Sep 2006) | 4 lines Patch #1567691: super() and new.instancemethod() now don't accept keyword arguments any more (previously they accepted them, but didn't use them). ........ r52061 | georg.brandl | 2006-09-30 11:03:42 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1566800: make sure that EnvironmentError can be called with any number of arguments, as was the case in Python 2.4. ........ r52063 | georg.brandl | 2006-09-30 11:06:45 +0200 (Sat, 30 Sep 2006) | 2 lines Bug #1566663: remove obsolete example from datetime docs. ........ r52065 | georg.brandl | 2006-09-30 11:13:21 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1566602: correct failure of posixpath unittest when $HOME ends with a slash. ........ r52068 | georg.brandl | 2006-09-30 12:58:01 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes keep_blank_values and strict_parsing keyword arguments. ........ r52069 | georg.brandl | 2006-09-30 13:06:47 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1560617: in pyclbr, return full module name not only for classes, but also for functions. ........ r52072 | georg.brandl | 2006-09-30 13:17:34 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1556784: allow format strings longer than 127 characters in datetime's strftime function. ........ r52075 | georg.brandl | 2006-09-30 13:22:28 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1446043: correctly raise a LookupError if an encoding name given to encodings.search_function() contains a dot. ........ r52078 | georg.brandl | 2006-09-30 14:02:57 +0200 (Sat, 30 Sep 2006) | 3 lines Bug #1546052: clarify that PyString_FromString(AndSize) copies the string pointed to by its parameter. ........ r52080 | georg.brandl | 2006-09-30 14:16:03 +0200 (Sat, 30 Sep 2006) | 3 lines Convert test_import to unittest. ........ r52083 | kurt.kaiser | 2006-10-01 23:16:45 +0200 (Sun, 01 Oct 2006) | 5 lines Some syntax errors were being caught by tokenize during the tabnanny check, resulting in obscure error messages. Do the syntax check first. Bug 1562716, 1562719 ........ r52084 | kurt.kaiser | 2006-10-01 23:54:37 +0200 (Sun, 01 Oct 2006) | 3 lines Add comment explaining that error msgs may be due to user code when running w/o subprocess. ........ r52086 | martin.v.loewis | 2006-10-02 16:55:51 +0200 (Mon, 02 Oct 2006) | 3 lines Fix test for uintptr_t. Fixes #1568842. Will backport. ........ r52089 | martin.v.loewis | 2006-10-02 17:20:37 +0200 (Mon, 02 Oct 2006) | 3 lines Guard uintptr_t test with HAVE_STDINT_H, test for stdint.h. Will backport. ........ r52100 | vinay.sajip | 2006-10-03 20:02:37 +0200 (Tue, 03 Oct 2006) | 1 line Documentation omitted the additional parameter to LogRecord.__init__ which was added in 2.5. (See SF #1569622). ........ r52101 | vinay.sajip | 2006-10-03 20:20:26 +0200 (Tue, 03 Oct 2006) | 1 line Documentation clarified to mention optional parameters. ........ r52102 | vinay.sajip | 2006-10-03 20:21:56 +0200 (Tue, 03 Oct 2006) | 1 line Modified LogRecord.__init__ to make the func parameter optional. (See SF #1569622). ........ r52121 | brett.cannon | 2006-10-03 23:58:55 +0200 (Tue, 03 Oct 2006) | 2 lines Fix minor typo in a comment. ........ r52123 | brett.cannon | 2006-10-04 01:23:14 +0200 (Wed, 04 Oct 2006) | 2 lines Convert test_imp over to unittest. ........ r52128 | barry.warsaw | 2006-10-04 04:06:36 +0200 (Wed, 04 Oct 2006) | 3 lines decode_rfc2231(): As Christian Robottom Reis points out, it makes no sense to test for parts > 3 when we use .split(..., 2). ........ r52129 | jeremy.hylton | 2006-10-04 04:24:52 +0200 (Wed, 04 Oct 2006) | 9 lines Fix for SF bug 1569998: break permitted inside try. The compiler was checking that there was something on the fblock stack, but not that there was a loop on the stack. Fixed that and added a test for the specific syntax error. Bug fix candidate. ........ r52130 | martin.v.loewis | 2006-10-04 07:47:34 +0200 (Wed, 04 Oct 2006) | 4 lines Fix integer negation and absolute value to not rely on undefined behaviour of the C compiler anymore. Will backport to 2.5 and 2.4. ........ r52135 | martin.v.loewis | 2006-10-04 11:21:20 +0200 (Wed, 04 Oct 2006) | 1 line Forward port r52134: Add uuids for 2.4.4. ........ r52137 | armin.rigo | 2006-10-04 12:23:57 +0200 (Wed, 04 Oct 2006) | 3 lines Compilation problem caused by conflicting typedefs for uint32_t (unsigned long vs. unsigned int). ........ r52139 | armin.rigo | 2006-10-04 14:17:45 +0200 (Wed, 04 Oct 2006) | 23 lines Forward-port of r52136,52138: a review of overflow-detecting code. * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests... ........ r52147 | andrew.kuchling | 2006-10-04 15:42:43 +0200 (Wed, 04 Oct 2006) | 6 lines Cause a PyObject_Malloc() failure to trigger a MemoryError, and then add 'if (PyErr_Occurred())' checks to various places so that NULL is returned properly. 2.4 backport candidate. ........ r52148 | martin.v.loewis | 2006-10-04 17:25:28 +0200 (Wed, 04 Oct 2006) | 1 line Add MSVC8 project files to create wininst-8.exe. ........ r52196 | brett.cannon | 2006-10-06 00:02:31 +0200 (Fri, 06 Oct 2006) | 7 lines Clarify what "re-initialization" means for init_builtin() and init_dynamic(). Also remove warning about re-initialization as possibly raising an execption as both call _PyImport_FindExtension() which pulls any module that was already imported from the Python process' extension cache and just copies the __dict__ into the module stored in sys.modules. ........ r52200 | fred.drake | 2006-10-06 02:03:45 +0200 (Fri, 06 Oct 2006) | 3 lines - update links - remove Sleepycat name now that they have been bought ........ r52204 | andrew.kuchling | 2006-10-06 12:41:01 +0200 (Fri, 06 Oct 2006) | 1 line Case fix ........ r52208 | georg.brandl | 2006-10-06 14:46:08 +0200 (Fri, 06 Oct 2006) | 3 lines Fix name. ........ r52211 | andrew.kuchling | 2006-10-06 15:18:26 +0200 (Fri, 06 Oct 2006) | 1 line [Bug #1545341] Allow 'classifier' parameter to be a tuple as well as a list. Will backport. ........ r52212 | armin.rigo | 2006-10-06 18:33:22 +0200 (Fri, 06 Oct 2006) | 4 lines A very minor bug fix: this code looks like it is designed to accept any hue value and do the modulo itself, except it doesn't quite do it in all cases. At least, the "cannot get here" comment was wrong. ........ r52213 | andrew.kuchling | 2006-10-06 20:51:55 +0200 (Fri, 06 Oct 2006) | 1 line Comment grammar ........ r52218 | skip.montanaro | 2006-10-07 13:05:02 +0200 (Sat, 07 Oct 2006) | 6 lines Note that the excel_tab class is registered as the "excel-tab" dialect. Fixes 1572471. Make a similar change for the excel class and clean up references to the Dialects and Formatting Parameters section in a few places. ........ r52221 | georg.brandl | 2006-10-08 09:11:54 +0200 (Sun, 08 Oct 2006) | 3 lines Add missing NEWS entry for rev. 52129. ........ r52223 | hyeshik.chang | 2006-10-08 15:48:34 +0200 (Sun, 08 Oct 2006) | 3 lines Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault when encoding non-BMP unicode characters. (Submitted by Ray Chason) ........ r52227 | ronald.oussoren | 2006-10-08 19:37:58 +0200 (Sun, 08 Oct 2006) | 4 lines Add version number to the link to the python documentation in /Developer/Documentation/Python, better for users that install multiple versions of python. ........ r52229 | ronald.oussoren | 2006-10-08 19:40:02 +0200 (Sun, 08 Oct 2006) | 2 lines Fix for bug #1570284 ........ r52233 | ronald.oussoren | 2006-10-08 19:49:52 +0200 (Sun, 08 Oct 2006) | 6 lines MacOSX: distutils changes the values of BASECFLAGS and LDFLAGS when using a universal build of python on OSX 10.3 to ensure that those flags can be used to compile code (the universal build uses compiler flags that aren't supported on 10.3). This patches gives the same treatment to CFLAGS, PY_CFLAGS and BLDSHARED. ........ r52236 | ronald.oussoren | 2006-10-08 19:51:46 +0200 (Sun, 08 Oct 2006) | 5 lines MacOSX: The universal build requires that users have the MacOSX10.4u SDK installed to build extensions. This patch makes distutils emit a warning when the compiler should use an SDK but that SDK is not installed, hopefully reducing some confusion. ........ r52238 | ronald.oussoren | 2006-10-08 20:18:26 +0200 (Sun, 08 Oct 2006) | 3 lines MacOSX: add more logic to recognize the correct startup file to patch to the shell profile patching post-install script. ........ r52242 | andrew.kuchling | 2006-10-09 19:10:12 +0200 (Mon, 09 Oct 2006) | 1 line Add news item for rev. 52211 change ........ r52245 | andrew.kuchling | 2006-10-09 20:05:19 +0200 (Mon, 09 Oct 2006) | 1 line Fix wording in comment ........ r52251 | georg.brandl | 2006-10-09 21:03:06 +0200 (Mon, 09 Oct 2006) | 2 lines Patch #1572724: fix typo ('=' instead of '==') in _msi.c. ........ r52255 | barry.warsaw | 2006-10-09 21:43:24 +0200 (Mon, 09 Oct 2006) | 2 lines List gc.get_count() in the module docstring. ........ r52257 | martin.v.loewis | 2006-10-09 22:44:25 +0200 (Mon, 09 Oct 2006) | 1 line Bug #1565150: Fix subsecond processing for os.utime on Windows. ........ r52268 | ronald.oussoren | 2006-10-10 09:55:06 +0200 (Tue, 10 Oct 2006) | 2 lines MacOSX: fix permission problem in the generated installer ........ r52293 | georg.brandl | 2006-10-12 09:38:04 +0200 (Thu, 12 Oct 2006) | 2 lines Bug #1575746: fix typo in property() docs. ........ r52295 | georg.brandl | 2006-10-12 09:57:21 +0200 (Thu, 12 Oct 2006) | 3 lines Bug #813342: Start the IDLE subprocess with -Qnew if the parent is started with that option. ........ r52297 | georg.brandl | 2006-10-12 10:22:53 +0200 (Thu, 12 Oct 2006) | 2 lines Bug #1565919: document set types in the Language Reference. ........ r52299 | georg.brandl | 2006-10-12 11:20:33 +0200 (Thu, 12 Oct 2006) | 3 lines Bug #1550524: better heuristics to find correct class definition in inspect.findsource(). ........ r52301 | georg.brandl | 2006-10-12 11:47:12 +0200 (Thu, 12 Oct 2006) | 4 lines Bug #1548891: The cStringIO.StringIO() constructor now encodes unicode arguments with the system default encoding just like the write() method does, instead of converting it to a raw buffer. ........ r52303 | georg.brandl | 2006-10-12 13:14:40 +0200 (Thu, 12 Oct 2006) | 2 lines Bug #1546628: add a note about urlparse.urljoin() and absolute paths. ........ r52305 | georg.brandl | 2006-10-12 13:27:59 +0200 (Thu, 12 Oct 2006) | 3 lines Bug #1545497: when given an explicit base, int() did ignore NULs embedded in the string to convert. ........ r52307 | georg.brandl | 2006-10-12 13:41:11 +0200 (Thu, 12 Oct 2006) | 3 lines Add a note to fpectl docs that it's not built by default (bug #1556261). ........ r52309 | georg.brandl | 2006-10-12 13:46:57 +0200 (Thu, 12 Oct 2006) | 3 lines Bug #1560114: the Mac filesystem does have accurate information about the case of filenames. ........ r52311 | georg.brandl | 2006-10-12 13:59:27 +0200 (Thu, 12 Oct 2006) | 2 lines Small grammar fix, thanks Sjoerd. ........ r52313 | georg.brandl | 2006-10-12 14:03:07 +0200 (Thu, 12 Oct 2006) | 2 lines Fix tarfile depending on buggy int('1\0', base) behavior. ........ r52315 | georg.brandl | 2006-10-12 14:33:07 +0200 (Thu, 12 Oct 2006) | 2 lines Bug #1283491: follow docstring convention wrt. keyword-able args in sum(). ........ r52316 | georg.brandl | 2006-10-12 15:08:16 +0200 (Thu, 12 Oct 2006) | 3 lines Bug #1560179: speed up posixpath.(dir|base)name ........ r52327 | brett.cannon | 2006-10-14 08:36:45 +0200 (Sat, 14 Oct 2006) | 3 lines Clean up the language of a sentence relating to the connect() function and user-defined datatypes. ........ r52332 | neal.norwitz | 2006-10-14 23:33:38 +0200 (Sat, 14 Oct 2006) | 3 lines Update the peephole optimizer to remove more dead code (jumps after returns) and inline jumps to returns. ........ r52333 | martin.v.loewis | 2006-10-15 09:54:40 +0200 (Sun, 15 Oct 2006) | 4 lines Patch #1576954: Update VC6 build directory; remove redundant files in VC7. Will backport to 2.5. ........ r52335 | martin.v.loewis | 2006-10-15 10:43:33 +0200 (Sun, 15 Oct 2006) | 1 line Patch #1576166: Support os.utime for directories on Windows NT+. ........ r52336 | martin.v.loewis | 2006-10-15 10:51:22 +0200 (Sun, 15 Oct 2006) | 2 lines Patch #1577551: Add ctypes and ET build support for VC6. Will backport to 2.5. ........ r52338 | martin.v.loewis | 2006-10-15 11:35:51 +0200 (Sun, 15 Oct 2006) | 1 line Loosen the test for equal time stamps. ........ r52339 | martin.v.loewis | 2006-10-15 11:43:39 +0200 (Sun, 15 Oct 2006) | 2 lines Bug #1567666: Emulate GetFileAttributesExA for Win95. Will backport to 2.5. ........ r52341 | martin.v.loewis | 2006-10-15 13:02:07 +0200 (Sun, 15 Oct 2006) | 2 lines Round to int, because some systems support sub-second time stamps in stat, but not in utime. Also be consistent with modifying only mtime, not atime. ........ r52342 | martin.v.loewis | 2006-10-15 13:57:40 +0200 (Sun, 15 Oct 2006) | 2 lines Set the eol-style for project files to "CRLF". ........ r52343 | martin.v.loewis | 2006-10-15 13:59:56 +0200 (Sun, 15 Oct 2006) | 3 lines Drop binary property on dsp files, set eol-style to CRLF instead. ........ r52344 | martin.v.loewis | 2006-10-15 14:01:43 +0200 (Sun, 15 Oct 2006) | 2 lines Remove binary property, set eol-style to CRLF instead. ........ r52346 | martin.v.loewis | 2006-10-15 16:30:38 +0200 (Sun, 15 Oct 2006) | 2 lines Mention the bdist_msi module. Will backport to 2.5. ........ r52354 | brett.cannon | 2006-10-16 05:09:52 +0200 (Mon, 16 Oct 2006) | 3 lines Fix turtle so that you can launch the demo2 function on its own instead of only when the module is launched as a script. ........ r52356 | martin.v.loewis | 2006-10-17 17:18:06 +0200 (Tue, 17 Oct 2006) | 2 lines Patch #1457736: Update VC6 to use current PCbuild settings. Will backport to 2.5. ........ r52360 | martin.v.loewis | 2006-10-17 20:09:55 +0200 (Tue, 17 Oct 2006) | 2 lines Remove obsolete file. Will backport. ........ r52363 | martin.v.loewis | 2006-10-17 20:59:23 +0200 (Tue, 17 Oct 2006) | 4 lines Forward-port r52358: - Bug #1578513: Cross compilation was broken by a change to configure. Repair so that it's back to how it was in 2.4.3. ........ r52365 | thomas.heller | 2006-10-17 21:30:48 +0200 (Tue, 17 Oct 2006) | 6 lines ctypes callback functions only support 'fundamental' result types. Check this and raise an error when something else is used - before this change ctypes would hang or crash when such a callback was called. This is a partial fix for #1574584. Will backport to release25-maint. ........ r52377 | tim.peters | 2006-10-18 07:06:06 +0200 (Wed, 18 Oct 2006) | 2 lines newIobject(): repaired incorrect cast to quiet MSVC warning. ........ r52378 | tim.peters | 2006-10-18 07:09:12 +0200 (Wed, 18 Oct 2006) | 2 lines Whitespace normalization. ........ r52379 | tim.peters | 2006-10-18 07:10:28 +0200 (Wed, 18 Oct 2006) | 2 lines Add missing svn:eol-style to text files. ........ r52387 | martin.v.loewis | 2006-10-19 12:58:46 +0200 (Thu, 19 Oct 2006) | 3 lines Add check for the PyArg_ParseTuple format, and declare it if it is supported. ........ r52388 | martin.v.loewis | 2006-10-19 13:00:37 +0200 (Thu, 19 Oct 2006) | 3 lines Fix various minor errors in passing arguments to PyArg_ParseTuple. ........ r52389 | martin.v.loewis | 2006-10-19 18:01:37 +0200 (Thu, 19 Oct 2006) | 2 lines Restore CFLAGS after checking for __attribute__ ........ r52390 | andrew.kuchling | 2006-10-19 23:55:55 +0200 (Thu, 19 Oct 2006) | 1 line [Bug #1576348] Fix typo in example ........ r52414 | walter.doerwald | 2006-10-22 10:59:41 +0200 (Sun, 22 Oct 2006) | 2 lines Port test___future__ to unittest. ........ r52415 | ronald.oussoren | 2006-10-22 12:45:18 +0200 (Sun, 22 Oct 2006) | 3 lines Patch #1580674: with this patch os.readlink uses the filesystem encoding to decode unicode objects and returns an unicode object when the argument is one. ........ r52416 | martin.v.loewis | 2006-10-22 12:46:18 +0200 (Sun, 22 Oct 2006) | 3 lines Patch #1580872: Remove duplicate declaration of PyCallable_Check. Will backport to 2.5. ........ r52418 | martin.v.loewis | 2006-10-22 12:55:15 +0200 (Sun, 22 Oct 2006) | 4 lines - Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that ctypes isn't considered as requiring executable stacks. Will backport to 2.5. ........ r52420 | martin.v.loewis | 2006-10-22 15:45:13 +0200 (Sun, 22 Oct 2006) | 3 lines Remove passwd.adjunct.byname from list of maps for test_nis. Will backport to 2.5. ........ r52431 | georg.brandl | 2006-10-24 18:54:16 +0200 (Tue, 24 Oct 2006) | 2 lines Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated ........ r52446 | andrew.kuchling | 2006-10-26 21:10:46 +0200 (Thu, 26 Oct 2006) | 1 line [Bug #1579796] Wrong syntax for PyDateTime_IMPORT in documentation. Reported by David Faure. ........ r52449 | andrew.kuchling | 2006-10-26 21:16:46 +0200 (Thu, 26 Oct 2006) | 1 line Typo fix ........ r52452 | martin.v.loewis | 2006-10-27 08:16:31 +0200 (Fri, 27 Oct 2006) | 3 lines Patch #1549049: Rewrite type conversion in structmember. Fixes #1545696 and #1566140. Will backport to 2.5. ........ r52454 | martin.v.loewis | 2006-10-27 08:42:27 +0200 (Fri, 27 Oct 2006) | 2 lines Check for values.h. Will backport. ........ r52456 | martin.v.loewis | 2006-10-27 09:06:52 +0200 (Fri, 27 Oct 2006) | 2 lines Get DBL_MAX from float.h not values.h. Will backport. ........ r52458 | martin.v.loewis | 2006-10-27 09:13:28 +0200 (Fri, 27 Oct 2006) | 2 lines Patch #1567274: Support SMTP over TLS. ........ r52459 | andrew.kuchling | 2006-10-27 13:33:29 +0200 (Fri, 27 Oct 2006) | 1 line Set svn:keywords property ........ r52460 | andrew.kuchling | 2006-10-27 13:36:41 +0200 (Fri, 27 Oct 2006) | 1 line Add item ........ r52461 | andrew.kuchling | 2006-10-27 13:37:01 +0200 (Fri, 27 Oct 2006) | 1 line Some wording changes and markup fixes ........ r52462 | andrew.kuchling | 2006-10-27 14:18:38 +0200 (Fri, 27 Oct 2006) | 1 line [Bug #1585690] Note that line_num was added in Python 2.5 ........ r52464 | andrew.kuchling | 2006-10-27 14:50:38 +0200 (Fri, 27 Oct 2006) | 1 line [Bug #1583946] Reword description of server and issuer ........ r52466 | andrew.kuchling | 2006-10-27 15:06:25 +0200 (Fri, 27 Oct 2006) | 1 line [Bug #1562583] Mention the set_reuse_addr() method ........ r52469 | andrew.kuchling | 2006-10-27 15:22:46 +0200 (Fri, 27 Oct 2006) | 4 lines [Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats() match its docstring. Backport candidate. Though it's an API change, this is a pretty obscure portion of the API. ........ r52473 | andrew.kuchling | 2006-10-27 16:53:41 +0200 (Fri, 27 Oct 2006) | 1 line Point users to the subprocess module in the docs for os.system, os.spawn*, os.popen2, and the popen2 and commands modules ........ r52476 | andrew.kuchling | 2006-10-27 18:39:10 +0200 (Fri, 27 Oct 2006) | 1 line [Bug #1576241] Let functools.wraps work with built-in functions ........ r52478 | andrew.kuchling | 2006-10-27 18:55:34 +0200 (Fri, 27 Oct 2006) | 1 line [Bug #1575506] The _singlefileMailbox class was using the wrong file object in its flush() method, causing an error ........ r52480 | andrew.kuchling | 2006-10-27 19:06:16 +0200 (Fri, 27 Oct 2006) | 1 line Clarify docstring ........ r52481 | andrew.kuchling | 2006-10-27 19:11:23 +0200 (Fri, 27 Oct 2006) | 5 lines [Patch #1574068 by Scott Dial] urllib and urllib2 were using base64.encodestring() for encoding authentication data. encodestring() can include newlines for very long input, which produced broken HTTP headers. ........ r52483 | andrew.kuchling | 2006-10-27 20:13:46 +0200 (Fri, 27 Oct 2006) | 1 line Check db_setup_debug for a few print statements; change sqlite_setup_debug to False ........ r52484 | andrew.kuchling | 2006-10-27 20:15:02 +0200 (Fri, 27 Oct 2006) | 1 line [Patch #1503717] Tiny patch from Chris AtLee to stop a lengthy line from being printed ........ r52485 | thomas.heller | 2006-10-27 20:31:36 +0200 (Fri, 27 Oct 2006) | 5 lines WindowsError.str should display the windows error code, not the posix error code; with test. Fixes #1576174. Will backport to release25-maint. ........ r52487 | thomas.heller | 2006-10-27 21:05:53 +0200 (Fri, 27 Oct 2006) | 4 lines Modulefinder now handles absolute and relative imports, including tests. Will backport to release25-maint. ........ r52488 | georg.brandl | 2006-10-27 22:39:43 +0200 (Fri, 27 Oct 2006) | 2 lines Patch #1552024: add decorator support to unparse.py demo script. ........ r52492 | walter.doerwald | 2006-10-28 12:47:12 +0200 (Sat, 28 Oct 2006) | 2 lines Port test_bufio to unittest. ........ r52493 | georg.brandl | 2006-10-28 15:10:17 +0200 (Sat, 28 Oct 2006) | 6 lines Convert test_global, test_scope and test_grammar to unittest. I tried to enclose all tests which must be run at the toplevel (instead of inside a method) in exec statements. ........ r52494 | georg.brandl | 2006-10-28 15:11:41 +0200 (Sat, 28 Oct 2006) | 3 lines Update outstanding bugs test file. ........ r52495 | georg.brandl | 2006-10-28 15:51:49 +0200 (Sat, 28 Oct 2006) | 3 lines Convert test_math to unittest. ........ r52496 | georg.brandl | 2006-10-28 15:56:58 +0200 (Sat, 28 Oct 2006) | 3 lines Convert test_opcodes to unittest. ........ r52497 | georg.brandl | 2006-10-28 18:04:04 +0200 (Sat, 28 Oct 2006) | 2 lines Fix nth() itertool recipe. ........ r52500 | georg.brandl | 2006-10-28 22:25:09 +0200 (Sat, 28 Oct 2006) | 2 lines make test_grammar pass with python -O ........ r52501 | neal.norwitz | 2006-10-28 23:15:30 +0200 (Sat, 28 Oct 2006) | 6 lines Add some asserts. In sysmodule, I think these were to try to silence some warnings from Klokwork. They verify the assumptions of the format of svn version output. The assert in the thread module helped debug a problem on HP-UX. ........ r52502 | neal.norwitz | 2006-10-28 23:16:54 +0200 (Sat, 28 Oct 2006) | 5 lines Fix warnings with HP's C compiler. It doesn't recognize that infinite loops are, um, infinite. These conditions should not be able to happen. Will backport. ........ r52503 | neal.norwitz | 2006-10-28 23:17:51 +0200 (Sat, 28 Oct 2006) | 5 lines Fix crash in test on HP-UX. Apparently, it's not possible to delete a lock if it's held (even by the current thread). Will backport. ........ r52504 | neal.norwitz | 2006-10-28 23:19:07 +0200 (Sat, 28 Oct 2006) | 6 lines Fix bug #1565514, SystemError not raised on too many nested blocks. It seems like this should be a different error than SystemError, but I don't have any great ideas and SystemError was raised in 2.4 and earlier. Will backport. ........ r52505 | neal.norwitz | 2006-10-28 23:20:12 +0200 (Sat, 28 Oct 2006) | 4 lines Prevent crash if alloc of garbage fails. Found by Typo.pl. Will backport. ........ r52506 | neal.norwitz | 2006-10-28 23:21:00 +0200 (Sat, 28 Oct 2006) | 4 lines Don't inline Py_ADDRESS_IN_RANGE with gcc 4+ either. Will backport. ........ r52513 | neal.norwitz | 2006-10-28 23:56:49 +0200 (Sat, 28 Oct 2006) | 2 lines Fix test_modulefinder so it doesn't fail when run after test_distutils. ........ r52514 | neal.norwitz | 2006-10-29 00:12:26 +0200 (Sun, 29 Oct 2006) | 4 lines From SF 1557890, fix problem of using wrong type in example. Will backport. ........ r52517 | georg.brandl | 2006-10-29 09:39:22 +0100 (Sun, 29 Oct 2006) | 4 lines Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and fix all codecs file wrappers to work correctly with the "with" statement (bug #1586513). ........ r52519 | georg.brandl | 2006-10-29 09:47:08 +0100 (Sun, 29 Oct 2006) | 3 lines Clean up a leftover from old listcomp generation code. ........ r52520 | georg.brandl | 2006-10-29 09:53:06 +0100 (Sun, 29 Oct 2006) | 4 lines Bug #1586448: the compiler module now emits the same bytecode for list comprehensions as the builtin compiler, using the LIST_APPEND opcode. ........ r52521 | georg.brandl | 2006-10-29 10:01:01 +0100 (Sun, 29 Oct 2006) | 3 lines Remove trailing comma. ........ r52522 | georg.brandl | 2006-10-29 10:05:04 +0100 (Sun, 29 Oct 2006) | 3 lines Bug #1357915: allow all sequence types for shell arguments in subprocess. ........ r52524 | georg.brandl | 2006-10-29 10:16:12 +0100 (Sun, 29 Oct 2006) | 3 lines Patch #1583880: fix tarfile's problems with long names and posix/ GNU modes. ........ r52526 | georg.brandl | 2006-10-29 10:18:00 +0100 (Sun, 29 Oct 2006) | 3 lines Test assert if __debug__ is true. ........ r52527 | georg.brandl | 2006-10-29 10:32:16 +0100 (Sun, 29 Oct 2006) | 2 lines Fix the new EncodedFile test to work with big endian platforms. ........ r52529 | georg.brandl | 2006-10-29 15:39:09 +0100 (Sun, 29 Oct 2006) | 2 lines Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders. ........ r52532 | georg.brandl | 2006-10-29 19:01:08 +0100 (Sun, 29 Oct 2006) | 2 lines Bug #1586773: extend hashlib docstring. ........ r52534 | neal.norwitz | 2006-10-29 19:30:10 +0100 (Sun, 29 Oct 2006) | 4 lines Update comments, remove commented out code. Move assembler structure next to assembler code to make it easier to move it to a separate file. ........ r52535 | georg.brandl | 2006-10-29 19:31:42 +0100 (Sun, 29 Oct 2006) | 3 lines Bug #1576657: when setting a KeyError for a tuple key, make sure that the tuple isn't used as the "exception arguments tuple". ........ r52537 | georg.brandl | 2006-10-29 20:13:40 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_mmap to unittest. ........ r52538 | georg.brandl | 2006-10-29 20:20:45 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_poll to unittest. ........ r52539 | georg.brandl | 2006-10-29 20:24:43 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_nis to unittest. ........ r52540 | georg.brandl | 2006-10-29 20:35:03 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_types to unittest. ........ r52541 | georg.brandl | 2006-10-29 20:51:16 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_cookie to unittest. ........ r52542 | georg.brandl | 2006-10-29 21:09:12 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_cgi to unittest. ........ r52543 | georg.brandl | 2006-10-29 21:24:01 +0100 (Sun, 29 Oct 2006) | 3 lines Completely convert test_httplib to unittest. ........ r52544 | georg.brandl | 2006-10-29 21:28:26 +0100 (Sun, 29 Oct 2006) | 2 lines Convert test_MimeWriter to unittest. ........ r52545 | georg.brandl | 2006-10-29 21:31:17 +0100 (Sun, 29 Oct 2006) | 3 lines Convert test_openpty to unittest. ........ r52546 | georg.brandl | 2006-10-29 21:35:12 +0100 (Sun, 29 Oct 2006) | 3 lines Remove leftover test output file. ........ r52547 | georg.brandl | 2006-10-29 22:54:18 +0100 (Sun, 29 Oct 2006) | 3 lines Move the check for openpty to the beginning. ........ r52548 | walter.doerwald | 2006-10-29 23:06:28 +0100 (Sun, 29 Oct 2006) | 2 lines Add tests for basic argument errors. ........ r52549 | walter.doerwald | 2006-10-30 00:02:27 +0100 (Mon, 30 Oct 2006) | 3 lines Add tests for incremental codecs with an errors argument. ........ r52550 | neal.norwitz | 2006-10-30 00:39:03 +0100 (Mon, 30 Oct 2006) | 1 line Fix refleak ........ r52552 | neal.norwitz | 2006-10-30 00:58:36 +0100 (Mon, 30 Oct 2006) | 1 line I'm assuming this is correct, it fixes the tests so they pass again ........ r52555 | vinay.sajip | 2006-10-31 18:32:37 +0100 (Tue, 31 Oct 2006) | 1 line Change to improve speed of _fixupChildren ........ r52556 | vinay.sajip | 2006-10-31 18:34:31 +0100 (Tue, 31 Oct 2006) | 1 line Added relativeCreated to Formatter doc (has been in the system for a long time - was unaccountably left out of the docs and not noticed until now). ........ r52588 | thomas.heller | 2006-11-02 20:48:24 +0100 (Thu, 02 Nov 2006) | 5 lines Replace the XXX marker in the 'Arrays and pointers' reference manual section with a link to the tutorial sections. Will backport to release25-maint. ........ r52592 | thomas.heller | 2006-11-02 21:22:29 +0100 (Thu, 02 Nov 2006) | 6 lines Fix a code example by adding a missing import. Fixes #1557890. Will backport to release25-maint. ........ r52598 | tim.peters | 2006-11-03 03:32:46 +0100 (Fri, 03 Nov 2006) | 2 lines Whitespace normalization. ........ r52619 | martin.v.loewis | 2006-11-04 19:14:06 +0100 (Sat, 04 Nov 2006) | 4 lines - Patch #1060577: Extract list of RPM files from spec file in bdist_rpm Will backport to 2.5. ........ r52621 | neal.norwitz | 2006-11-04 20:25:22 +0100 (Sat, 04 Nov 2006) | 4 lines Bug #1588287: fix invalid assertion for `1,2` in debug builds. Will backport ........ r52630 | andrew.kuchling | 2006-11-05 22:04:37 +0100 (Sun, 05 Nov 2006) | 1 line Update link ........ r52631 | skip.montanaro | 2006-11-06 15:34:52 +0100 (Mon, 06 Nov 2006) | 1 line note that user can control directory location even if default dir is used ........ r52644 | ronald.oussoren | 2006-11-07 16:53:38 +0100 (Tue, 07 Nov 2006) | 2 lines Fix a number of typos in strings and comments (sf#1589070) ........ r52647 | ronald.oussoren | 2006-11-07 17:00:34 +0100 (Tue, 07 Nov 2006) | 2 lines Whitespace changes to make the source more compliant with PEP8 (SF#1589070) ........ r52651 | thomas.heller | 2006-11-07 19:01:18 +0100 (Tue, 07 Nov 2006) | 3 lines Fix markup. Will backport to release25-maint. ........ r52653 | thomas.heller | 2006-11-07 19:20:47 +0100 (Tue, 07 Nov 2006) | 3 lines Fix grammatical error as well. Will backport to release25-maint. ........ r52657 | andrew.kuchling | 2006-11-07 21:39:16 +0100 (Tue, 07 Nov 2006) | 1 line Add missing word ........ r52662 | martin.v.loewis | 2006-11-08 07:46:37 +0100 (Wed, 08 Nov 2006) | 4 lines Correctly forward exception in instance_contains(). Fixes #1591996. Patch contributed by Neal Norwitz. Will backport. ........ r52664 | martin.v.loewis | 2006-11-08 07:48:36 +0100 (Wed, 08 Nov 2006) | 2 lines News entry for 52662. ........ r52665 | martin.v.loewis | 2006-11-08 08:35:55 +0100 (Wed, 08 Nov 2006) | 2 lines Patch #1351744: Add askyesnocancel helper for tkMessageBox. ........ r52666 | georg.brandl | 2006-11-08 08:45:59 +0100 (Wed, 08 Nov 2006) | 2 lines Patch #1592072: fix docs for return value of PyErr_CheckSignals. ........ r52668 | georg.brandl | 2006-11-08 11:04:29 +0100 (Wed, 08 Nov 2006) | 3 lines Bug #1592533: rename variable in heapq doc example, to avoid shadowing "sorted". ........ r52671 | andrew.kuchling | 2006-11-08 14:35:34 +0100 (Wed, 08 Nov 2006) | 1 line Add section on the functional module ........ r52672 | andrew.kuchling | 2006-11-08 15:14:30 +0100 (Wed, 08 Nov 2006) | 1 line Add section on operator module; make a few edits ........ r52673 | andrew.kuchling | 2006-11-08 15:24:03 +0100 (Wed, 08 Nov 2006) | 1 line Add table of contents; this required fixing a few headings. Some more smalle edits. ........ r52674 | andrew.kuchling | 2006-11-08 15:30:14 +0100 (Wed, 08 Nov 2006) | 1 line More edits ........ r52686 | martin.v.loewis | 2006-11-09 12:06:03 +0100 (Thu, 09 Nov 2006) | 3 lines Patch #838546: Make terminal become controlling in pty.fork(). Will backport to 2.5. ........ r52688 | martin.v.loewis | 2006-11-09 12:27:32 +0100 (Thu, 09 Nov 2006) | 2 lines Patch #1592250: Add elidge argument to Tkinter.Text.search. ........ r52690 | andrew.kuchling | 2006-11-09 14:27:07 +0100 (Thu, 09 Nov 2006) | 7 lines [Bug #1569790] mailbox.Maildir.get_folder() loses factory information Both the Maildir and MH classes had this bug; the patch fixes both classes and adds a test. Will backport to 25-maint. ........ r52692 | andrew.kuchling | 2006-11-09 14:51:14 +0100 (Thu, 09 Nov 2006) | 1 line [Patch #1514544 by David Watson] use fsync() to ensure data is really on disk ........ r52695 | walter.doerwald | 2006-11-09 17:23:26 +0100 (Thu, 09 Nov 2006) | 2 lines Replace C++ comment with C comment (fixes SF bug #1593525). ........ r52712 | andrew.kuchling | 2006-11-09 22:16:46 +0100 (Thu, 09 Nov 2006) | 11 lines [Patch #1514543] mailbox (Maildir): avoid losing messages on name clash Two changes: Where possible, use link()/remove() to move files into a directory; this makes it easier to avoid overwriting an existing file. Use _create_carefully() to create files in tmp/, which uses O_EXCL. Backport candidate. ........ r52716 | phillip.eby | 2006-11-10 01:33:36 +0100 (Fri, 10 Nov 2006) | 4 lines Fix SF#1566719: not creating site-packages (or other target directory) when installing .egg-info for a project that contains no modules or packages, while using --root (as in bdist_rpm). ........ r52719 | andrew.kuchling | 2006-11-10 14:14:01 +0100 (Fri, 10 Nov 2006) | 1 line Reword entry ........ r52725 | andrew.kuchling | 2006-11-10 15:39:01 +0100 (Fri, 10 Nov 2006) | 1 line [Feature request #1542920] Link to wsgi.org ........ r52731 | georg.brandl | 2006-11-11 19:29:11 +0100 (Sat, 11 Nov 2006) | 2 lines Bug #1594742: wrong word in stringobject doc. ........ r52733 | georg.brandl | 2006-11-11 19:32:47 +0100 (Sat, 11 Nov 2006) | 2 lines Bug #1594758: wording improvement for dict.update() docs. ........ r52736 | martin.v.loewis | 2006-11-12 11:32:47 +0100 (Sun, 12 Nov 2006) | 3 lines Patch #1065257: Support passing open files as body in HTTPConnection.request(). ........ r52737 | martin.v.loewis | 2006-11-12 11:41:39 +0100 (Sun, 12 Nov 2006) | 2 lines Patch #1355023: support whence argument for GzipFile.seek. ........ r52738 | martin.v.loewis | 2006-11-12 19:24:26 +0100 (Sun, 12 Nov 2006) | 2 lines Bug #1067760: Deprecate passing floats to file.seek. ........ r52739 | martin.v.loewis | 2006-11-12 19:48:13 +0100 (Sun, 12 Nov 2006) | 3 lines Patch #1359217: Ignore 2xx response before 150 response. Will backport to 2.5. ........ r52741 | martin.v.loewis | 2006-11-12 19:56:03 +0100 (Sun, 12 Nov 2006) | 4 lines Patch #1360200: Use unmangled_version RPM spec field to deal with file name mangling. Will backport to 2.5. ........ r52753 | walter.doerwald | 2006-11-15 17:23:46 +0100 (Wed, 15 Nov 2006) | 2 lines Fix typo. ........ r52754 | georg.brandl | 2006-11-15 18:42:03 +0100 (Wed, 15 Nov 2006) | 2 lines Bug #1594809: add a note to README regarding PYTHONPATH and make install. ........ r52762 | georg.brandl | 2006-11-16 16:05:14 +0100 (Thu, 16 Nov 2006) | 2 lines Bug #1597576: mention that the new base64 api has been introduced in py2.4. ........ r52764 | georg.brandl | 2006-11-16 17:50:59 +0100 (Thu, 16 Nov 2006) | 3 lines Bug #1597824: return the registered function from atexit.register() to facilitate usage as a decorator. ........ r52765 | georg.brandl | 2006-11-16 18:08:45 +0100 (Thu, 16 Nov 2006) | 4 lines Bug #1588217: don't parse "= " as a soft line break in binascii's a2b_qp() function, instead leave it in the string as quopri.decode() does. ........ r52776 | andrew.kuchling | 2006-11-17 14:30:25 +0100 (Fri, 17 Nov 2006) | 17 lines Remove file-locking in MH.pack() method. This change looks massive but it's mostly a re-indenting after removing some try...finally blocks. Also adds a test case that does a pack() while the mailbox is locked; this test would have turned up bugs in the original code on some platforms. In both nmh and GNU Mailutils' implementation of MH-format mailboxes, no locking is done of individual message files when renaming them. The original mailbox.py code did do locking, which meant that message files had to be opened. This code was buggy on certain platforms (found through reading the code); there were code paths that closed the file object and then called _unlock_file() on it. Will backport to 25-maint once I see how the buildbots react to this patch. ........ r52780 | martin.v.loewis | 2006-11-18 19:00:23 +0100 (Sat, 18 Nov 2006) | 5 lines Patch #1538878: Don't make tkSimpleDialog dialogs transient if the parent window is withdrawn. This mirrors what dialog.tcl does. Will backport to 2.5. ........ r52782 | martin.v.loewis | 2006-11-18 19:05:35 +0100 (Sat, 18 Nov 2006) | 4 lines Patch #1594554: Always close a tkSimpleDialog on ok(), even if an exception occurs. Will backport to 2.5. ........ r52784 | martin.v.loewis | 2006-11-18 19:42:11 +0100 (Sat, 18 Nov 2006) | 3 lines Patch #1472877: Fix Tix subwidget name resolution. Will backport to 2.5. ........ r52786 | andrew.kuchling | 2006-11-18 23:17:33 +0100 (Sat, 18 Nov 2006) | 1 line Expand checking in test_sha ........ r52787 | georg.brandl | 2006-11-19 09:48:30 +0100 (Sun, 19 Nov 2006) | 3 lines Patch [ 1586791 ] better error msgs for some TypeErrors ........ r52788 | martin.v.loewis | 2006-11-19 11:41:41 +0100 (Sun, 19 Nov 2006) | 4 lines Make cStringIO.truncate raise IOError for negative arguments (even for -1). Fixes the last bit of #1359365. ........ r52789 | andrew.kuchling | 2006-11-19 19:40:01 +0100 (Sun, 19 Nov 2006) | 1 line Add a test case of data w/ bytes > 127 ........ r52790 | martin.v.loewis | 2006-11-19 19:51:54 +0100 (Sun, 19 Nov 2006) | 3 lines Patch #1070046: Marshal new-style objects like InstanceType in xmlrpclib. ........ r52792 | neal.norwitz | 2006-11-19 22:26:53 +0100 (Sun, 19 Nov 2006) | 4 lines Speed up function calls into the math module by using METH_O. There should be no functional changes. However, the error msgs are slightly different. Also verified that the module dict is not NULL on init. ........ r52794 | george.yoshida | 2006-11-20 03:24:48 +0100 (Mon, 20 Nov 2006) | 2 lines markup fix ........ r52795 | georg.brandl | 2006-11-20 08:12:58 +0100 (Mon, 20 Nov 2006) | 3 lines Further markup fix. ........ r52800 | andrew.kuchling | 2006-11-20 14:39:37 +0100 (Mon, 20 Nov 2006) | 2 lines Jython compatibility fix: if uu.decode() opened its output file, be sure to close it. ........ r52811 | neal.norwitz | 2006-11-21 06:26:22 +0100 (Tue, 21 Nov 2006) | 9 lines Bug #1599782: Fix segfault on bsddb.db.DB().type(). The problem is that _DB_get_type() can't be called without the GIL because it calls a bunch of PyErr_* APIs when an error occurs. There were no other cases in this file that it was called without the GIL. Removing the BEGIN/END THREAD around _DB_get_type() made everything work. Will backport. ........ r52814 | neal.norwitz | 2006-11-21 06:51:51 +0100 (Tue, 21 Nov 2006) | 1 line Oops, convert tabs to spaces ........ r52815 | neal.norwitz | 2006-11-21 07:23:44 +0100 (Tue, 21 Nov 2006) | 1 line Fix SF #1599879, socket.gethostname should ref getfqdn directly. ........ r52817 | martin.v.loewis | 2006-11-21 19:20:25 +0100 (Tue, 21 Nov 2006) | 4 lines Conditionalize definition of _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE. Will backport. ........ r52821 | martin.v.loewis | 2006-11-22 09:50:02 +0100 (Wed, 22 Nov 2006) | 4 lines Patch #1362975: Rework CodeContext indentation algorithm to avoid hard-coding pixel widths. Also make the text's scrollbar a child of the text frame, not the top widget. ........ r52826 | walter.doerwald | 2006-11-23 06:03:56 +0100 (Thu, 23 Nov 2006) | 3 lines Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig')) SF bug #1601501. ........ r52833 | georg.brandl | 2006-11-23 10:55:07 +0100 (Thu, 23 Nov 2006) | 2 lines Bug #1601630: little improvement to getopt docs ........ r52835 | michael.hudson | 2006-11-23 14:54:04 +0100 (Thu, 23 Nov 2006) | 3 lines a test for an error condition not covered by existing tests (noticed this when writing the equivalent code for pypy) ........ r52839 | raymond.hettinger | 2006-11-23 22:06:03 +0100 (Thu, 23 Nov 2006) | 1 line Fix and/add typo ........ r52840 | raymond.hettinger | 2006-11-23 22:35:19 +0100 (Thu, 23 Nov 2006) | 1 line ... and the number of the counting shall be three. ........ r52841 | thomas.heller | 2006-11-24 19:45:39 +0100 (Fri, 24 Nov 2006) | 1 line Fix bug #1598620: A ctypes structure cannot contain itself. ........ r52843 | martin.v.loewis | 2006-11-25 16:39:19 +0100 (Sat, 25 Nov 2006) | 3 lines Disable _XOPEN_SOURCE on NetBSD 1.x. Will backport to 2.5 ........ r52845 | georg.brandl | 2006-11-26 20:27:47 +0100 (Sun, 26 Nov 2006) | 2 lines Bug #1603321: make pstats.Stats accept Unicode file paths. ........ r52850 | georg.brandl | 2006-11-27 19:46:21 +0100 (Mon, 27 Nov 2006) | 2 lines Bug #1603789: grammatical error in Tkinter docs. ........ r52855 | thomas.heller | 2006-11-28 21:21:54 +0100 (Tue, 28 Nov 2006) | 7 lines Fix #1563807: _ctypes built on AIX fails with ld ffi error. The contents of ffi_darwin.c must be compiled unless __APPLE__ is defined and __ppc__ is not. Will backport. ........ r52862 | armin.rigo | 2006-11-29 22:59:22 +0100 (Wed, 29 Nov 2006) | 3 lines Forgot a case where the locals can now be a general mapping instead of just a dictionary. (backporting...) ........ r52872 | guido.van.rossum | 2006-11-30 20:23:13 +0100 (Thu, 30 Nov 2006) | 2 lines Update version. ........ r52890 | walter.doerwald | 2006-12-01 17:59:47 +0100 (Fri, 01 Dec 2006) | 3 lines Move xdrlib tests from the module into a separate test script, port the tests to unittest and add a few new tests. ........ r52900 | raymond.hettinger | 2006-12-02 03:00:39 +0100 (Sat, 02 Dec 2006) | 1 line Add name to credits (for untokenize). ........ r52905 | martin.v.loewis | 2006-12-03 10:54:46 +0100 (Sun, 03 Dec 2006) | 2 lines Move IDLE news into NEWS.txt. ........ r52906 | martin.v.loewis | 2006-12-03 12:23:45 +0100 (Sun, 03 Dec 2006) | 4 lines Patch #1544279: Improve thread-safety of the socket module by moving the sock_addr_t storage out of the socket object. Will backport to 2.5. ........ r52908 | martin.v.loewis | 2006-12-03 13:01:53 +0100 (Sun, 03 Dec 2006) | 3 lines Patch #1371075: Make ConfigParser accept optional dict type for ordering, sorting, etc. ........ r52910 | matthias.klose | 2006-12-03 18:16:41 +0100 (Sun, 03 Dec 2006) | 2 lines - Fix build failure on kfreebsd and on the hurd. ........ r52915 | george.yoshida | 2006-12-04 12:41:54 +0100 (Mon, 04 Dec 2006) | 2 lines fix a versionchanged tag ........ r52917 | george.yoshida | 2006-12-05 06:39:50 +0100 (Tue, 05 Dec 2006) | 3 lines Fix pickle doc typo Patch #1608758 ........ r52938 | georg.brandl | 2006-12-06 23:21:18 +0100 (Wed, 06 Dec 2006) | 2 lines Patch #1610437: fix a tarfile bug with long filename headers. ........ r52945 | brett.cannon | 2006-12-07 00:38:48 +0100 (Thu, 07 Dec 2006) | 3 lines Fix a bad assumption that all objects assigned to '__loader__' on a module will have a '_files' attribute. ........ r52951 | georg.brandl | 2006-12-07 10:30:06 +0100 (Thu, 07 Dec 2006) | 3 lines RFE #1592899: mention string.maketrans() in docs for str.translate, remove reference to the old regex module in the former's doc. ........ r52962 | raymond.hettinger | 2006-12-08 04:17:18 +0100 (Fri, 08 Dec 2006) | 1 line Eliminate two redundant calls to PyObject_Hash(). ........ r52963 | raymond.hettinger | 2006-12-08 05:24:33 +0100 (Fri, 08 Dec 2006) | 3 lines Port Armin's fix for a dict resize vulnerability (svn revision 46589, sf bug 1456209). ........ r52964 | raymond.hettinger | 2006-12-08 05:57:50 +0100 (Fri, 08 Dec 2006) | 4 lines Port Georg's dictobject.c fix keys that were tuples got unpacked on the way to setting a KeyError (svn revision 52535, sf bug 1576657). ........ r52966 | raymond.hettinger | 2006-12-08 18:35:25 +0100 (Fri, 08 Dec 2006) | 2 lines Add test for SF bug 1576657 ........ r52970 | georg.brandl | 2006-12-08 21:46:11 +0100 (Fri, 08 Dec 2006) | 3 lines #1577756: svnversion doesn't react to LANG=C, use LC_ALL=C to force English output. ........ r52972 | georg.brandl | 2006-12-09 10:08:29 +0100 (Sat, 09 Dec 2006) | 3 lines Patch #1608267: fix a race condition in os.makedirs() is the directory to be created is already there. ........ r52975 | matthias.klose | 2006-12-09 13:15:27 +0100 (Sat, 09 Dec 2006) | 2 lines - Fix the build of the library reference in info format. ........ r52994 | neal.norwitz | 2006-12-11 02:01:06 +0100 (Mon, 11 Dec 2006) | 1 line Fix a typo ........ r52996 | georg.brandl | 2006-12-11 08:56:33 +0100 (Mon, 11 Dec 2006) | 2 lines Move errno imports back to individual functions. ........ r52998 | vinay.sajip | 2006-12-11 15:07:16 +0100 (Mon, 11 Dec 2006) | 1 line Patch by Jeremy Katz (SF #1609407) ........ r53000 | vinay.sajip | 2006-12-11 15:26:23 +0100 (Mon, 11 Dec 2006) | 1 line Patch by "cuppatea" (SF #1503765) ........ --- command/bdist_rpm.py | 67 +++++++++++++++++++++--------------- command/build_ext.py | 2 +- command/install_egg_info.py | 3 ++ command/register.py | 2 +- command/wininst-8.exe | Bin 0 -> 61440 bytes sysconfig.py | 5 ++- unixccompiler.py | 16 +++++++++ 7 files changed, 64 insertions(+), 31 deletions(-) create mode 100644 command/wininst-8.exe diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 5b09965867..6f0e0d881c 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -337,37 +337,47 @@ def run (self): if not self.keep_temp: rpm_cmd.append('--clean') rpm_cmd.append(spec_path) + # Determine the binary rpm names that should be built out of this spec + # file + # Note that some of these may not be really built (if the file + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" + non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" + q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( + src_rpm, non_src_rpm, spec_path) + + out = os.popen(q_cmd) + binary_rpms = [] + source_rpm = None + while 1: + line = out.readline() + if not line: + break + l = string.split(string.strip(line)) + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + self.spawn(rpm_cmd) - # XXX this is a nasty hack -- we really should have a proper way to - # find out the names of the RPM files created; also, this assumes - # that RPM creates exactly one source and one binary RPM. if not self.dry_run: if not self.binary_only: - srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) - assert len(srpms) == 1, \ - "unexpected number of SRPM files found: %s" % srpms - dist_file = ('bdist_rpm', 'any', - self._dist_path(srpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(srpms[0], self.dist_dir) + srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) + assert(os.path.exists(srpm)) + self.move_file(srpm, self.dist_dir) if not self.source_only: - rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) - debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], - "*/*debuginfo*.rpm")) - if debuginfo: - rpms.remove(debuginfo[0]) - assert len(rpms) == 1, \ - "unexpected number of RPM files found: %s" % rpms - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(rpms[0])) - self.distribution.dist_files.append(dist_file) - self.move_file(rpms[0], self.dist_dir) - if debuginfo: - dist_file = ('bdist_rpm', get_python_version(), - self._dist_path(debuginfo[0])) - self.move_file(debuginfo[0], self.dist_dir) + for rpm in binary_rpms: + rpm = os.path.join(rpm_dir['RPMS'], rpm) + if os.path.exists(rpm): + self.move_file(rpm, self.dist_dir) # run() def _dist_path(self, path): @@ -381,6 +391,7 @@ def _make_spec_file(self): spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version().replace('-','_'), + '%define unmangled_version ' + self.distribution.get_version(), '%define release ' + self.release.replace('-','_'), '', 'Summary: ' + self.distribution.get_description(), @@ -402,9 +413,9 @@ def _make_spec_file(self): # but only after it has run: and we create the spec file before # running "sdist", in case of --spec-only. if self.use_bzip2: - spec_file.append('Source0: %{name}-%{version}.tar.bz2') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') else: - spec_file.append('Source0: %{name}-%{version}.tar.gz') + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') spec_file.extend([ 'License: ' + self.distribution.get_license(), @@ -479,7 +490,7 @@ def _make_spec_file(self): # are just text that we drop in as-is. Hmmm. script_options = [ - ('prep', 'prep_script', "%setup"), + ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), ('install', 'install_script', ("%s install " diff --git a/command/build_ext.py b/command/build_ext.py index cd67544b7a..f79eee3b74 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - (sys.platform.startswith('linux') and + ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions diff --git a/command/install_egg_info.py b/command/install_egg_info.py index c31ac29668..c8880310df 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -35,6 +35,9 @@ def run(self): dir_util.remove_tree(target, dry_run=self.dry_run) elif os.path.exists(target): self.execute(os.unlink,(self.target,),"Removing "+target) + elif not os.path.isdir(self.install_dir): + self.execute(os.makedirs, (self.install_dir,), + "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: f = open(target, 'w') diff --git a/command/register.py b/command/register.py index f8912621c8..3177476b3b 100644 --- a/command/register.py +++ b/command/register.py @@ -256,7 +256,7 @@ def post_to_server(self, data, auth=None): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if type(value) != type([]): + if type(value) not in (type([]), type( () )): value = [value] for value in value: value = unicode(value).encode("utf-8") diff --git a/command/wininst-8.exe b/command/wininst-8.exe new file mode 100644 index 0000000000000000000000000000000000000000..7403bfabf5cc10c13ef2b6a2ea276b4f6d26ff37 GIT binary patch literal 61440 zcmeFa4_Fk}^*=nzF1R4Nt3o6ZlTE~g1T`dRDgl#4SwzF)Dgu&-h_E=U2n1&QlZt^X zq>SUHwl%43ZEC7*ZR@wSiT@Iff)GJt8vjMnn8YM}(;;gcl2AoMGwq_X&Fa``CR>X%SDj10!)cI4;9r;vPFT22a}G1KeLao{@+e8++Rhd9vCBn(?)u0JdcuDx=($QYgX+eoKWeRpQA?3d(zIy-3^!W@`QriLm`|RxuFs{9p0~0@g5JCt46Lz zx}ixN(eQV{lFJ{fvU8qb^&M|(xPMTt$DqEGmv^bfDn|3W(S;hhj%xp17;;_BLm~6i zMEQw={Dda^f|hLgqW5BWR!*)wWfN*AT-uA4O^Kpe9MtA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MA|~tj(?I1q?7uvBTVTn(sHz4Olu`tS3eky2sKk0X%C~KR*nD_#&dyq z-Sjw!EB}O37?(jGTsF}d6l@K&wx6*xXu_CikN9)P`1f{#nY-3(?MEvV0&;i>8-_Lg z1Ty3f*pVK&L239u8pA6^NH-Kzs-^JhTd^ zn!>CP9Uyc*d|d!ODWodm@9d$lRzw&D=vNi_ZQ&uaOABn^w04+^Ohq156;YOvlUXmP zC- zm5B;=B5EqKf6iu#0NE*;W>cW@8;;XD-Cxa!U_{W?*59scZcfY0mFM^|Cl7P_Ft;C2 eH^#aBaBe@G+YjgV!@2!%Za+j1%KuyL2mc2HGCo}Z literal 0 HcmV?d00001 diff --git a/sysconfig.py b/sysconfig.py index 96923bdca4..8989d92b4e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -509,7 +509,10 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS'): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) diff --git a/unixccompiler.py b/unixccompiler.py index 6cd14f7728..75e8a5316e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -82,6 +82,22 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass + # Check if the SDK that is used during compilation actually exists, + # the universal build requires the usage of a universal SDK and not all + # users have that installed by default. + sysroot = None + if '-isysroot' in cc_args: + idx = cc_args.index('-isysroot') + sysroot = cc_args[idx+1] + elif '-isysroot' in compiler_so: + idx = compiler_so.index('-isysroot') + sysroot = compiler_so[idx+1] + + if sysroot and not os.path.isdir(sysroot): + log.warn("Compiling with an SDK that doesn't seem to exist: %s", + sysroot) + log.warn("Please check your Xcode installation") + return compiler_so class UnixCCompiler(CCompiler): From ba04afa355a9b33a8dc4e52e11de3b11cae13afd Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 10 Jan 2007 16:19:56 +0000 Subject: [PATCH 1856/8469] SF patch 1631942 by Collin Winter: (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block --- bcppcompiler.py | 10 +++++----- command/register.py | 4 ++-- command/sdist.py | 2 +- command/upload.py | 2 +- core.py | 8 ++++---- cygwinccompiler.py | 6 +++--- dir_util.py | 7 ++++--- dist.py | 6 +++--- emxccompiler.py | 6 +++--- fancy_getopt.py | 2 +- file_util.py | 23 +++++++++++++++-------- msvccompiler.py | 12 ++++++------ spawn.py | 8 ++++---- sysconfig.py | 4 ++-- unixccompiler.py | 8 ++++---- util.py | 2 +- 16 files changed, 59 insertions(+), 51 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index ca524a5b88..6968cb8f6f 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -115,7 +115,7 @@ def compile(self, sources, # This needs to be compiled to a .res file -- do it now. try: self.spawn (["brcc32", "-fo", obj, src]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg continue # the 'for' loop @@ -139,7 +139,7 @@ def compile(self, sources, self.spawn ([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + extra_postargs + [src]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg return objects @@ -164,7 +164,7 @@ def create_static_lib (self, pass # XXX what goes here? try: self.spawn ([self.lib] + lib_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LibError, msg else: log.debug("skipping %s (up-to-date)", output_filename) @@ -298,7 +298,7 @@ def link (self, self.mkpath (os.path.dirname (output_filename)) try: self.spawn ([self.linker] + ld_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LinkError, msg else: @@ -391,7 +391,7 @@ def preprocess (self, self.mkpath(os.path.dirname(output_file)) try: self.spawn(pp_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: print msg raise CompileError, msg diff --git a/command/register.py b/command/register.py index 3177476b3b..cb9525ab0e 100644 --- a/command/register.py +++ b/command/register.py @@ -284,11 +284,11 @@ def post_to_server(self, data, auth=None): data = '' try: result = opener.open(req) - except urllib2.HTTPError, e: + except urllib2.HTTPError as e: if self.show_response: data = e.fp.read() result = e.code, e.msg - except urllib2.URLError, e: + except urllib2.URLError as e: result = 500, str(e) else: if self.show_response: diff --git a/command/sdist.py b/command/sdist.py index 3dfe6f21a7..eb2db505dd 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -333,7 +333,7 @@ def read_template (self): try: self.filelist.process_template_line(line) - except DistutilsTemplateError, msg: + except DistutilsTemplateError as msg: self.warn("%s, line %d: %s" % (template.filename, template.current_line, msg)) diff --git a/command/upload.py b/command/upload.py index 67ba080427..7f96a475b6 100644 --- a/command/upload.py +++ b/command/upload.py @@ -184,7 +184,7 @@ def upload_file(self, command, pyversion, filename): http.putheader('Authorization', auth) http.endheaders() http.send(body) - except socket.error, e: + except socket.error as e: self.announce(str(e), log.ERROR) return diff --git a/core.py b/core.py index 85a28fe795..4dc8eb01aa 100644 --- a/core.py +++ b/core.py @@ -110,7 +110,7 @@ class found in 'cmdclass' is used in place of the default, which is # (ie. everything except distclass) to initialize it try: _setup_distribution = dist = klass(attrs) - except DistutilsSetupError, msg: + except DistutilsSetupError as msg: if 'name' not in attrs: raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) @@ -135,7 +135,7 @@ class found in 'cmdclass' is used in place of the default, which is # fault, so turn them into SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() - except DistutilsArgError, msg: + except DistutilsArgError as msg: raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg if DEBUG: @@ -151,7 +151,7 @@ class found in 'cmdclass' is used in place of the default, which is dist.run_commands() except KeyboardInterrupt: raise SystemExit, "interrupted" - except (IOError, os.error), exc: + except (IOError, os.error) as exc: error = grok_environment_error(exc) if DEBUG: @@ -161,7 +161,7 @@ class found in 'cmdclass' is used in place of the default, which is raise SystemExit, error except (DistutilsError, - CCompilerError), msg: + CCompilerError) as msg: if DEBUG: raise else: diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 4fd23e6dc6..44b5850834 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -142,13 +142,13 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): # gcc needs '.res' and '.rc' compiled to object files !!! try: self.spawn(["windres", "-i", src, "-o", obj]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg def link (self, @@ -379,7 +379,7 @@ def check_config_h(): s = f.read() f.close() - except IOError, exc: + except IOError as exc: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing return (CONFIG_H_UNCERTAIN, diff --git a/dir_util.py b/dir_util.py index 92f49346f7..398f242974 100644 --- a/dir_util.py +++ b/dir_util.py @@ -75,7 +75,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): try: os.mkdir(head) created_dirs.append(head) - except OSError, exc: + except OSError as exc: raise DistutilsFileError, \ "could not create '%s': %s" % (head, exc[-1]) @@ -142,7 +142,8 @@ def copy_tree (src, dst, "cannot copy tree '%s': not a directory" % src try: names = os.listdir(src) - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e if dry_run: names = [] else: @@ -209,7 +210,7 @@ def remove_tree (directory, verbose=0, dry_run=0): abspath = os.path.abspath(cmd[1]) if abspath in _path_created: del _path_created[abspath] - except (IOError, OSError), exc: + except (IOError, OSError) as exc: log.warn(grok_environment_error( exc, "error removing %s: " % directory)) diff --git a/dist.py b/dist.py index d098cb9713..d21c5e2f1b 100644 --- a/dist.py +++ b/dist.py @@ -398,7 +398,7 @@ def parse_config_files (self, filenames=None): setattr(self, opt, strtobool(val)) else: setattr(self, opt, val) - except ValueError, msg: + except ValueError as msg: raise DistutilsOptionError, msg # parse_config_files () @@ -515,7 +515,7 @@ def _parse_command_opts (self, parser, args): # it takes. try: cmd_class = self.get_command_class(command) - except DistutilsModuleError, msg: + except DistutilsModuleError as msg: raise DistutilsArgError, msg # Require that the command class be derived from Command -- want @@ -917,7 +917,7 @@ def _set_command_options (self, command_obj, option_dict=None): raise DistutilsOptionError, \ ("error in %s: command '%s' has no such option '%s'" % (source, command_name, option)) - except ValueError, msg: + except ValueError as msg: raise DistutilsOptionError, msg def reinitialize_command (self, command, reinit_subcommands=0): diff --git a/emxccompiler.py b/emxccompiler.py index f52e63232d..8aef2b7a9d 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -79,13 +79,13 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): # gcc requires '.rc' compiled to binary ('.res') files !!! try: self.spawn(["rc", "-r", src]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg def link (self, @@ -275,7 +275,7 @@ def check_config_h(): s = f.read() f.close() - except IOError, exc: + except IOError as exc: # if we can't read this file, we cannot say it is wrong # the compiler will complain later about this file as missing return (CONFIG_H_UNCERTAIN, diff --git a/fancy_getopt.py b/fancy_getopt.py index 31cf0c5c3b..62a24e8524 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -256,7 +256,7 @@ def getopt (self, args=None, object=None): short_opts = string.join(self.short_opts) try: opts, args = getopt.getopt(args, short_opts, self.long_opts) - except getopt.error, msg: + except getopt.error as msg: raise DistutilsArgError, msg for opt, val in opts: diff --git a/file_util.py b/file_util.py index 37b152ed8a..c225ad3172 100644 --- a/file_util.py +++ b/file_util.py @@ -32,27 +32,31 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): try: try: fsrc = open(src, 'rb') - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e raise DistutilsFileError, \ "could not open '%s': %s" % (src, errstr) if os.path.exists(dst): try: os.unlink(dst) - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e raise DistutilsFileError, \ "could not delete '%s': %s" % (dst, errstr) try: fdst = open(dst, 'wb') - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e raise DistutilsFileError, \ "could not create '%s': %s" % (dst, errstr) while 1: try: buf = fsrc.read(buffer_size) - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e raise DistutilsFileError, \ "could not read from '%s': %s" % (src, errstr) @@ -61,7 +65,8 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): try: fdst.write(buf) - except os.error, (errno, errstr): + except os.error as e: + (errno, errstr) = e raise DistutilsFileError, \ "could not write to '%s': %s" % (dst, errstr) @@ -146,7 +151,7 @@ def copy_file (src, dst, import macostools try: macostools.copy(src, dst, 0, preserve_times) - except os.error, exc: + except os.error as exc: raise DistutilsFileError, \ "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) @@ -217,7 +222,8 @@ def move_file (src, dst, copy_it = 0 try: os.rename(src, dst) - except os.error, (num, msg): + except os.error as e: + (num, msg) = e if num == errno.EXDEV: copy_it = 1 else: @@ -228,7 +234,8 @@ def move_file (src, dst, copy_file(src, dst) try: os.unlink(src) - except os.error, (num, msg): + except os.error as e: + (num, msg) = e try: os.unlink(dst) except os.error: diff --git a/msvccompiler.py b/msvccompiler.py index 9ec3508c76..968a4ffd46 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -129,7 +129,7 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError, exc: # + except KeyError as exc: # raise DistutilsPlatformError, \ ("""Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. @@ -371,7 +371,7 @@ def compile(self, sources, try: self.spawn ([self.rc] + pp_opts + [output_opt] + [input_opt]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg continue elif ext in self._mc_extensions: @@ -400,7 +400,7 @@ def compile(self, sources, self.spawn ([self.rc] + ["/fo" + obj] + [rc_file]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg continue else: @@ -414,7 +414,7 @@ def compile(self, sources, self.spawn ([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + extra_postargs) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg return objects @@ -440,7 +440,7 @@ def create_static_lib (self, pass # XXX what goes here? try: self.spawn ([self.lib] + lib_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LibError, msg else: @@ -519,7 +519,7 @@ def link (self, self.mkpath (os.path.dirname (output_filename)) try: self.spawn ([self.linker] + ld_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LinkError, msg else: diff --git a/spawn.py b/spawn.py index e5654ff009..6b07f52ebe 100644 --- a/spawn.py +++ b/spawn.py @@ -78,7 +78,7 @@ def _spawn_nt (cmd, # spawn for NT requires a full path to the .exe try: rc = os.spawnv(os.P_WAIT, executable, cmd) - except OSError, exc: + except OSError as exc: # this seems to happen when the command isn't found raise DistutilsExecError, \ "command '%s' failed: %s" % (cmd[0], exc[-1]) @@ -103,7 +103,7 @@ def _spawn_os2 (cmd, # spawnv for OS/2 EMX requires a full path to the .exe try: rc = os.spawnv(os.P_WAIT, executable, cmd) - except OSError, exc: + except OSError as exc: # this seems to happen when the command isn't found raise DistutilsExecError, \ "command '%s' failed: %s" % (cmd[0], exc[-1]) @@ -131,7 +131,7 @@ def _spawn_posix (cmd, #print "cmd[0] =", cmd[0] #print "cmd =", cmd exec_fn(cmd[0], cmd) - except OSError, e: + except OSError as e: sys.stderr.write("unable to execute %s: %s\n" % (cmd[0], e.strerror)) os._exit(1) @@ -146,7 +146,7 @@ def _spawn_posix (cmd, while 1: try: (pid, status) = os.waitpid(pid, 0) - except OSError, exc: + except OSError as exc: import errno if exc.errno == errno.EINTR: continue diff --git a/sysconfig.py b/sysconfig.py index 8989d92b4e..9de7234683 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -344,7 +344,7 @@ def _init_posix(): try: filename = get_makefile_filename() parse_makefile(filename, g) - except IOError, msg: + except IOError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror @@ -355,7 +355,7 @@ def _init_posix(): try: filename = get_config_h_filename() parse_config_h(open(filename), g) - except IOError, msg: + except IOError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror diff --git a/unixccompiler.py b/unixccompiler.py index 75e8a5316e..0795f1206d 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -162,7 +162,7 @@ def preprocess(self, source, self.mkpath(os.path.dirname(output_file)) try: self.spawn(pp_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): @@ -172,7 +172,7 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): try: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError, msg def create_static_lib(self, objects, output_libname, @@ -196,7 +196,7 @@ def create_static_lib(self, objects, output_libname, if self.ranlib: try: self.spawn(self.ranlib + [output_filename]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LibError, msg else: log.debug("skipping %s (up-to-date)", output_filename) @@ -250,7 +250,7 @@ def link(self, target_desc, objects, linker = _darwin_compiler_fixup(linker, ld_args) self.spawn(linker + ld_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LinkError, msg else: log.debug("skipping %s (up-to-date)", output_filename) diff --git a/util.py b/util.py index 1bcda93fe0..16d8bcba4d 100644 --- a/util.py +++ b/util.py @@ -229,7 +229,7 @@ def _subst (match, local_vars=local_vars): try: return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) - except KeyError, var: + except KeyError as var: raise ValueError, "invalid variable '$%s'" % var # subst_vars () From 4e0a58cc6113aa5ab73196de13b16d500ff46fe6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 9 Feb 2007 05:37:30 +0000 Subject: [PATCH 1857/8469] Fix most trivially-findable print statements. There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.) --- bcppcompiler.py | 2 +- ccompiler.py | 2 +- cmd.py | 8 ++++---- command/bdist_rpm.py | 10 ++++----- command/config.py | 4 ++-- command/install.py | 6 +++--- command/register.py | 30 +++++++++++++-------------- command/upload.py | 2 +- core.py | 4 ++-- dist.py | 48 ++++++++++++++++++++++---------------------- fancy_getopt.py | 6 +++--- filelist.py | 2 +- log.py | 4 ++-- mwerkscompiler.py | 4 ++-- spawn.py | 2 +- tests/test_dist.py | 4 ++-- text_file.py | 12 +++++------ 17 files changed, 75 insertions(+), 75 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 6968cb8f6f..b6a3bf62ce 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -392,7 +392,7 @@ def preprocess (self, try: self.spawn(pp_args) except DistutilsExecError as msg: - print msg + print(msg) raise CompileError, msg # preprocess() diff --git a/ccompiler.py b/ccompiler.py index 0ed9a40a35..25d90c8a9a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1026,7 +1026,7 @@ def announce (self, msg, level=1): def debug_print (self, msg): from distutils.debug import DEBUG if DEBUG: - print msg + print(msg) def warn (self, msg): sys.stderr.write ("warning: %s\n" % msg) diff --git a/cmd.py b/cmd.py index 3cd5858920..be0a3e23f6 100644 --- a/cmd.py +++ b/cmd.py @@ -163,14 +163,14 @@ def dump_options (self, header=None, indent=""): from distutils.fancy_getopt import longopt_xlate if header is None: header = "command options for '%s':" % self.get_command_name() - print indent + header + print(indent + header) indent = indent + " " for (option, _, _) in self.user_options: option = string.translate(option, longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) - print indent + "%s = %s" % (option, value) + print(indent + "%s = %s" % (option, value)) def run (self): @@ -199,7 +199,7 @@ def debug_print (self, msg): """ from distutils.debug import DEBUG if DEBUG: - print msg + print(msg) sys.stdout.flush() @@ -475,4 +475,4 @@ def get_outputs (self): if __name__ == "__main__": - print "ok" + print("ok") diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 6f0e0d881c..bbcf2927dc 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -267,11 +267,11 @@ def finalize_package_data (self): def run (self): if DEBUG: - print "before _get_package_data():" - print "vendor =", self.vendor - print "packager =", self.packager - print "doc_files =", self.doc_files - print "changelog =", self.changelog + print("before _get_package_data():") + print("vendor =", self.vendor) + print("packager =", self.packager) + print("doc_files =", self.doc_files) + print("changelog =", self.changelog) # make directories if self.spec_only: diff --git a/command/config.py b/command/config.py index 520c1b0c76..42465693be 100644 --- a/command/config.py +++ b/command/config.py @@ -359,9 +359,9 @@ def check_header (self, header, include_dirs=None, def dump_file (filename, head=None): if head is None: - print filename + ":" + print(filename + ":") else: - print head + print(head) file = open(filename) sys.stdout.write(file.read()) diff --git a/command/install.py b/command/install.py index 453151d08b..fd5d6d1f39 100644 --- a/command/install.py +++ b/command/install.py @@ -292,7 +292,7 @@ def finalize_options (self): if DEBUG: from pprint import pprint - print "config vars:" + print("config vars:") pprint(self.config_vars) # Expand "~" and configuration variables in the installation @@ -347,7 +347,7 @@ def finalize_options (self): def dump_dirs (self, msg): if DEBUG: from distutils.fancy_getopt import longopt_xlate - print msg + ":" + print(msg + ":") for opt in self.user_options: opt_name = opt[0] if opt_name[-1] == "=": @@ -359,7 +359,7 @@ def dump_dirs (self, msg): else: opt_name = string.translate(opt_name, longopt_xlate) val = getattr(self, opt_name) - print " %s: %s" % (opt_name, val) + print(" %s: %s" % (opt_name, val)) def finalize_unix (self): diff --git a/command/register.py b/command/register.py index cb9525ab0e..48070ee83b 100644 --- a/command/register.py +++ b/command/register.py @@ -86,14 +86,14 @@ def classifiers(self): ''' Fetch the list of classifiers from the server. ''' response = urllib2.urlopen(self.repository+'?:action=list_classifiers') - print response.read() + print(response.read()) def verify_metadata(self): ''' Send the metadata to the package index server to be checked. ''' # send the info to the server and report the result (code, result) = self.post_to_server(self.build_post_data('verify')) - print 'Server response (%s): %s'%(code, result) + print('Server response (%s): %s'%(code, result)) def send_metadata(self): ''' Send the metadata to the package index server. @@ -128,7 +128,7 @@ def send_metadata(self): if os.environ.has_key('HOME'): rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): - print 'Using PyPI login from %s'%rc + print('Using PyPI login from %s'%rc) config = ConfigParser.ConfigParser() config.read(rc) username = config.get('server-login', 'username') @@ -138,17 +138,17 @@ def send_metadata(self): # get the user's login info choices = '1 2 3 4'.split() while choice not in choices: - print '''We need to know who you are, so please choose either: + print('''We need to know who you are, so please choose either: 1. use your existing login, 2. register as a new user, 3. have the server generate a new password for you (and email it to you), or 4. quit -Your selection [default 1]: ''', +Your selection [default 1]: ''', end=' ') choice = raw_input() if not choice: choice = '1' elif choice not in choices: - print 'Please choose one of the four options!' + print('Please choose one of the four options!') if choice == '1': # get the username and password @@ -165,13 +165,13 @@ def send_metadata(self): # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s'%(code, result) + print('Server response (%s): %s'%(code, result)) # possibly save the login if os.environ.has_key('HOME') and config is None and code == 200: rc = os.path.join(os.environ['HOME'], '.pypirc') - print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)'%rc + print('I can store your PyPI login so future submissions will be faster.') + print('(the login will be stored in %s)'%rc) choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') @@ -200,22 +200,22 @@ def send_metadata(self): if data['password'] != data['confirm']: data['password'] = '' data['confirm'] = None - print "Password and confirm don't match!" + print("Password and confirm don't match!") while not data['email']: data['email'] = raw_input(' EMail: ') code, result = self.post_to_server(data) if code != 200: - print 'Server response (%s): %s'%(code, result) + print('Server response (%s): %s'%(code, result)) else: - print 'You will receive an email shortly.' - print 'Follow the instructions in it to complete registration.' + print('You will receive an email shortly.') + print('Follow the instructions in it to complete registration.') elif choice == '3': data = {':action': 'password_reset'} data['email'] = '' while not data['email']: data['email'] = raw_input('Your email address: ') code, result = self.post_to_server(data) - print 'Server response (%s): %s'%(code, result) + print('Server response (%s): %s'%(code, result)) def build_post_data(self, action): # figure the data to send - the metadata plus some additional @@ -295,5 +295,5 @@ def post_to_server(self, data, auth=None): data = result.read() result = 200, 'OK' if self.show_response: - print '-'*75, data, '-'*75 + print('-'*75, data, '-'*75) return result diff --git a/command/upload.py b/command/upload.py index 7f96a475b6..438ae99a9c 100644 --- a/command/upload.py +++ b/command/upload.py @@ -196,4 +196,4 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 + print('-'*75, r.read(), '-'*75) diff --git a/core.py b/core.py index 4dc8eb01aa..6242775c11 100644 --- a/core.py +++ b/core.py @@ -125,7 +125,7 @@ class found in 'cmdclass' is used in place of the default, which is dist.parse_config_files() if DEBUG: - print "options (after parsing config files):" + print("options (after parsing config files):") dist.dump_option_dicts() if _setup_stop_after == "config": @@ -139,7 +139,7 @@ class found in 'cmdclass' is used in place of the default, which is raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg if DEBUG: - print "options (after parsing command line):" + print("options (after parsing command line):") dist.dump_option_dicts() if _setup_stop_after == "commandline": diff --git a/dist.py b/dist.py index d21c5e2f1b..ca7a2f9952 100644 --- a/dist.py +++ b/dist.py @@ -290,22 +290,22 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): commands.sort() if header is not None: - print indent + header + print(indent + header) indent = indent + " " if not commands: - print indent + "no commands known yet" + print(indent + "no commands known yet") return for cmd_name in commands: opt_dict = self.command_options.get(cmd_name) if opt_dict is None: - print indent + "no option dict for '%s' command" % cmd_name + print(indent + "no option dict for '%s' command" % cmd_name) else: - print indent + "option dict for '%s' command:" % cmd_name + print(indent + "option dict for '%s' command:" % cmd_name) out = pformat(opt_dict) for line in string.split(out, "\n"): - print indent + " " + line + print(indent + " " + line) # dump_option_dicts () @@ -365,11 +365,11 @@ def parse_config_files (self, filenames=None): if filenames is None: filenames = self.find_config_files() - if DEBUG: print "Distribution.parse_config_files():" + if DEBUG: print("Distribution.parse_config_files():") parser = ConfigParser() for filename in filenames: - if DEBUG: print " reading", filename + if DEBUG: print(" reading", filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) @@ -636,14 +636,14 @@ def _show_help (self, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - print + print() if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - print + print() for command in self.commands: if type(command) is ClassType and issubclass(command, Command): @@ -657,9 +657,9 @@ def _show_help (self, else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - print + print() - print gen_usage(self.script_name) + print(gen_usage(self.script_name)) return # _show_help () @@ -678,8 +678,8 @@ def handle_display_options (self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - print - print gen_usage(self.script_name) + print() + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -695,12 +695,12 @@ def handle_display_options (self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - print string.join(value, ',') + print(string.join(value, ',')) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - print string.join(value, '\n') + print(string.join(value, '\n')) else: - print value + print(value) any_display_options = 1 return any_display_options @@ -712,7 +712,7 @@ def print_command_list (self, commands, header, max_length): 'print_commands()'. """ - print header + ":" + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -723,7 +723,7 @@ def print_command_list (self, commands, header, max_length): except AttributeError: description = "(no description available)" - print " %-*s %s" % (max_length, cmd, description) + print(" %-*s %s" % (max_length, cmd, description)) # print_command_list () @@ -757,7 +757,7 @@ def print_commands (self): "Standard commands", max_length) if extra_commands: - print + print() self.print_command_list(extra_commands, "Extra commands", max_length) @@ -862,8 +862,8 @@ def get_command_obj (self, command, create=1): cmd_obj = self.command_obj.get(command) if not cmd_obj and create: if DEBUG: - print "Distribution.get_command_obj(): " \ - "creating '%s' command object" % command + print("Distribution.get_command_obj(): " \ + "creating '%s' command object" % command) klass = self.get_command_class(command) cmd_obj = self.command_obj[command] = klass(self) @@ -893,9 +893,9 @@ def _set_command_options (self, command_obj, option_dict=None): if option_dict is None: option_dict = self.get_option_dict(command_name) - if DEBUG: print " setting options for '%s' command:" % command_name + if DEBUG: print(" setting options for '%s' command:" % command_name) for (option, (source, value)) in option_dict.items(): - if DEBUG: print " %s = %s (from %s)" % (option, value, source) + if DEBUG: print(" %s = %s (from %s)" % (option, value, source)) try: bool_opts = map(translate_longopt, command_obj.boolean_options) except AttributeError: @@ -1219,4 +1219,4 @@ def fix_help_options (options): if __name__ == "__main__": dist = Distribution() - print "ok" + print("ok") diff --git a/fancy_getopt.py b/fancy_getopt.py index 62a24e8524..646f8e1ee6 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -497,6 +497,6 @@ def __init__ (self, options=[]): say, "How should I know?"].)""" for w in (10, 20, 30, 40): - print "width: %d" % w - print string.join(wrap_text(text, w), "\n") - print + print("width: %d" % w) + print(string.join(wrap_text(text, w), "\n")) + print() diff --git a/filelist.py b/filelist.py index 4bbdd1f00f..e4a83d6484 100644 --- a/filelist.py +++ b/filelist.py @@ -53,7 +53,7 @@ def debug_print (self, msg): """ from distutils.debug import DEBUG if DEBUG: - print msg + print(msg) # -- List-like methods --------------------------------------------- diff --git a/log.py b/log.py index 95d4c1c5a2..e4959d6492 100644 --- a/log.py +++ b/log.py @@ -23,9 +23,9 @@ def _log(self, level, msg, args): if not args: # msg may contain a '%'. If args is empty, # don't even try to string-format - print msg + print(msg) else: - print msg % args + print(msg % args) sys.stdout.flush() def log(self, level, msg, *args): diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 0de123d9e9..9db1a39b17 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -160,9 +160,9 @@ def link (self, settings['libraries'] = libraries settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs if self.dry_run: - print 'CALLING LINKER IN', os.getcwd() + print('CALLING LINKER IN', os.getcwd()) for key, value in settings.items(): - print '%20.20s %s'%(key, value) + print('%20.20s %s'%(key, value)) return # Build the export file exportfilename = os.path.join(build_temp, exportname) diff --git a/spawn.py b/spawn.py index 6b07f52ebe..c75931c3ab 100644 --- a/spawn.py +++ b/spawn.py @@ -109,7 +109,7 @@ def _spawn_os2 (cmd, "command '%s' failed: %s" % (cmd[0], exc[-1]) if rc != 0: # and this reflects the command running but failing - print "command '%s' failed with exit status %d" % (cmd[0], rc) + print("command '%s' failed with exit status %d" % (cmd[0], rc)) raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) diff --git a/tests/test_dist.py b/tests/test_dist.py index 4d2a7cdf1a..8d4b07037c 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -74,8 +74,8 @@ def test_command_packages_configfile(self): sys.argv.append("build") f = open(TESTFN, "w") try: - print >>f, "[global]" - print >>f, "command_packages = foo.bar, splat" + print("[global]", file=f) + print("command_packages = foo.bar, splat", file=f) f.close() d = self.create_distribution([TESTFN]) self.assertEqual(d.get_command_packages(), diff --git a/text_file.py b/text_file.py index ff2878de1b..10ee1be783 100644 --- a/text_file.py +++ b/text_file.py @@ -342,13 +342,13 @@ def test_input (count, description, file, expected_result): result = file.readlines () # result = string.join (result, '') if result == expected_result: - print "ok %d (%s)" % (count, description) + print("ok %d (%s)" % (count, description)) else: - print "not ok %d (%s):" % (count, description) - print "** expected:" - print expected_result - print "** received:" - print result + print("not ok %d (%s):" % (count, description)) + print("** expected:") + print(expected_result) + print("** received:") + print(result) filename = "test.txt" From 16a4375780a8081b708a0236c31c22555e2969e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 9 Feb 2007 12:36:48 +0000 Subject: [PATCH 1858/8469] Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config, on "linux" and "gnu" systems. Will backport. --- command/build_ext.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2413829369..542b77a7ad 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -185,9 +185,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and - sysconfig.get_config_var('Py_ENABLE_SHARED')): + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -197,6 +195,17 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') + # for extensions under Linux with a shared Python library, + # Python's library directory must be appended to library_dirs + if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ + and sysconfig.get_config_var('Py_ENABLE_SHARED'): + if string.find(sys.executable, sys.exec_prefix) != -1: + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: + # building python standard extensions + self.library_dirs.append('.') + # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option will be set to '1'. Multiple From 0624f6d5917587a042fd6ba4c3642c7bafeddcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 9 Feb 2007 12:37:12 +0000 Subject: [PATCH 1859/8469] Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config, on "linux" and "gnu" systems. --- command/build_ext.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2413829369..542b77a7ad 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -185,9 +185,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and - sysconfig.get_config_var('Py_ENABLE_SHARED')): + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -197,6 +195,17 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') + # for extensions under Linux with a shared Python library, + # Python's library directory must be appended to library_dirs + if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ + and sysconfig.get_config_var('Py_ENABLE_SHARED'): + if string.find(sys.executable, sys.exec_prefix) != -1: + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: + # building python standard extensions + self.library_dirs.append('.') + # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option will be set to '1'. Multiple From a8bf57767e4e8ba7c99e9a51f30861707124c642 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 9 Feb 2007 20:13:25 +0000 Subject: [PATCH 1860/8469] Fix a bunch of doctests with the -d option of refactor.py. We still have 27 failing tests (down from 39). --- versionpredicate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionpredicate.py b/versionpredicate.py index ba8b6c021b..434b34f184 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -40,7 +40,7 @@ class VersionPredicate: The str() of a `VersionPredicate` provides a normalized human-readable version of the expression:: - >>> print v + >>> print(v) pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3) The `satisfied_by()` method can be used to determine with a given From 0eaf9a8276f4587601ba9514243c1f06e4511cb8 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 11 Feb 2007 06:12:03 +0000 Subject: [PATCH 1861/8469] - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 9de7234683..220b03310c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -271,7 +271,7 @@ def parse_makefile(fn, g=None): # do variable interpolation here while notdone: - for name in notdone.keys(): + for name in list(notdone): value = notdone[name] m = _findvar1_rx.search(value) or _findvar2_rx.search(value) if m: From a67f7d4700f890ac5822401b756dc0b20a6eb421 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Fri, 23 Feb 2007 15:07:44 +0000 Subject: [PATCH 1862/8469] Merged revisions 53623-53858 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r53624 | peter.astrand | 2007-02-02 20:06:36 +0100 (Fri, 02 Feb 2007) | 1 line We had several if statements checking the value of a fd. This is unsafe, since valid fds might be zero. We should check for not None instead. ........ r53635 | kurt.kaiser | 2007-02-05 07:03:18 +0100 (Mon, 05 Feb 2007) | 2 lines Add 'raw' support to configHandler. Patch 1650174 Tal Einat. ........ r53641 | kurt.kaiser | 2007-02-06 00:02:16 +0100 (Tue, 06 Feb 2007) | 5 lines 1. Calltips now 'handle' tuples in the argument list (display '' :) Suggested solution by Christos Georgiou, Bug 791968. 2. Clean up tests, were not failing when they should have been. 4. Remove some camelcase and an unneeded try/except block. ........ r53644 | kurt.kaiser | 2007-02-06 04:21:40 +0100 (Tue, 06 Feb 2007) | 2 lines Clean up ModifiedInterpreter.runcode() structure ........ r53646 | peter.astrand | 2007-02-06 16:37:50 +0100 (Tue, 06 Feb 2007) | 1 line Applied patch 1124861.3.patch to solve bug #1124861: Automatically create pipes on Windows, if GetStdHandle fails. Will backport. ........ r53648 | lars.gustaebel | 2007-02-06 19:38:13 +0100 (Tue, 06 Feb 2007) | 4 lines Patch #1652681: create nonexistent files in append mode and allow appending to empty files. ........ r53649 | kurt.kaiser | 2007-02-06 20:09:43 +0100 (Tue, 06 Feb 2007) | 4 lines Updated patch (CodeContext.061217.patch) to [ 1362975 ] CodeContext - Improved text indentation Tal Einat 16Dec06 ........ r53650 | kurt.kaiser | 2007-02-06 20:21:19 +0100 (Tue, 06 Feb 2007) | 2 lines narrow exception per [ 1540849 ] except too broad ........ r53653 | kurt.kaiser | 2007-02-07 04:39:41 +0100 (Wed, 07 Feb 2007) | 4 lines [ 1621265 ] Auto-completion list placement Move AC window below input line unless not enough space, then put it above. Patch: Tal Einat ........ r53654 | kurt.kaiser | 2007-02-07 09:07:13 +0100 (Wed, 07 Feb 2007) | 2 lines Handle AttributeError during calltip lookup ........ r53656 | raymond.hettinger | 2007-02-07 21:08:22 +0100 (Wed, 07 Feb 2007) | 3 lines SF #1615701: make d.update(m) honor __getitem__() and keys() in dict subclasses ........ r53658 | raymond.hettinger | 2007-02-07 22:04:20 +0100 (Wed, 07 Feb 2007) | 1 line SF: 1397711 Set docs conflated immutable and hashable ........ r53660 | raymond.hettinger | 2007-02-07 22:42:17 +0100 (Wed, 07 Feb 2007) | 1 line Check for a common user error with defaultdict(). ........ r53662 | raymond.hettinger | 2007-02-07 23:24:07 +0100 (Wed, 07 Feb 2007) | 1 line Bug #1575169: operator.isSequenceType() now returns False for subclasses of dict. ........ r53664 | raymond.hettinger | 2007-02-08 00:49:03 +0100 (Thu, 08 Feb 2007) | 1 line Silence compiler warning ........ r53666 | raymond.hettinger | 2007-02-08 01:07:32 +0100 (Thu, 08 Feb 2007) | 1 line Do not let overflows in enumerate() and count() pass silently. ........ r53668 | raymond.hettinger | 2007-02-08 01:50:39 +0100 (Thu, 08 Feb 2007) | 1 line Bypass set specific optimizations for set and frozenset subclasses. ........ r53670 | raymond.hettinger | 2007-02-08 02:42:35 +0100 (Thu, 08 Feb 2007) | 1 line Fix docstring bug ........ r53671 | martin.v.loewis | 2007-02-08 10:13:36 +0100 (Thu, 08 Feb 2007) | 3 lines Bug #1653736: Complain about keyword arguments to time.isoformat. Will backport to 2.5. ........ r53679 | kurt.kaiser | 2007-02-08 23:58:18 +0100 (Thu, 08 Feb 2007) | 6 lines Corrected some bugs in AutoComplete. Also, Page Up/Down in ACW implemented; mouse and cursor selection in ACWindow implemented; double Tab inserts current selection and closes ACW (similar to double-click and Return); scroll wheel now works in ACW. Added AutoComplete instructions to IDLE Help. ........ r53689 | martin.v.loewis | 2007-02-09 13:19:32 +0100 (Fri, 09 Feb 2007) | 3 lines Bug #1653736: Properly discard third argument to slot_nb_inplace_power. Will backport. ........ r53691 | martin.v.loewis | 2007-02-09 13:36:48 +0100 (Fri, 09 Feb 2007) | 4 lines Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config, on "linux" and "gnu" systems. Will backport. ........ r53693 | martin.v.loewis | 2007-02-09 13:58:49 +0100 (Fri, 09 Feb 2007) | 2 lines Update broken link. Will backport to 2.5. ........ r53697 | georg.brandl | 2007-02-09 19:48:41 +0100 (Fri, 09 Feb 2007) | 2 lines Bug #1656078: typo in in profile docs. ........ r53731 | brett.cannon | 2007-02-11 06:36:00 +0100 (Sun, 11 Feb 2007) | 3 lines Change a very minor inconsistency (that is purely cosmetic) in the AST definition. ........ r53735 | skip.montanaro | 2007-02-11 19:24:37 +0100 (Sun, 11 Feb 2007) | 1 line fix trace.py --ignore-dir ........ r53741 | brett.cannon | 2007-02-11 20:44:41 +0100 (Sun, 11 Feb 2007) | 3 lines Check in changed Python-ast.c from a cosmetic change to Python.asdl (in r53731). ........ r53751 | brett.cannon | 2007-02-12 04:51:02 +0100 (Mon, 12 Feb 2007) | 5 lines Modify Parser/asdl_c.py so that the __version__ number for Python/Python-ast.c is specified at the top of the file. Also add a note that Python/Python-ast.c needs to be committed separately after a change to the AST grammar to capture the revision number of the change (which is what __version__ is set to). ........ r53752 | lars.gustaebel | 2007-02-12 10:25:53 +0100 (Mon, 12 Feb 2007) | 3 lines Bug #1656581: Point out that external file objects are supposed to be at position 0. ........ r53754 | martin.v.loewis | 2007-02-12 13:21:10 +0100 (Mon, 12 Feb 2007) | 3 lines Patch 1463026: Support default namespace in XMLGenerator. Fixes #847665. Will backport. ........ r53757 | armin.rigo | 2007-02-12 17:23:24 +0100 (Mon, 12 Feb 2007) | 4 lines Fix the line to what is my guess at the original author's meaning. (The line has no effect anyway, but is present because it's customary call the base class __init__). ........ r53763 | martin.v.loewis | 2007-02-13 09:34:45 +0100 (Tue, 13 Feb 2007) | 3 lines Patch #685268: Consider a package's __path__ in imputil. Will backport. ........ r53765 | martin.v.loewis | 2007-02-13 10:49:38 +0100 (Tue, 13 Feb 2007) | 2 lines Patch #698833: Support file decryption in zipfile. ........ r53766 | martin.v.loewis | 2007-02-13 11:10:39 +0100 (Tue, 13 Feb 2007) | 3 lines Patch #1517891: Make 'a' create the file if it doesn't exist. Fixes #1514451. ........ r53767 | martin.v.loewis | 2007-02-13 13:08:24 +0100 (Tue, 13 Feb 2007) | 3 lines Bug #1658794: Remove extraneous 'this'. Will backport to 2.5. ........ r53769 | martin.v.loewis | 2007-02-13 13:14:19 +0100 (Tue, 13 Feb 2007) | 3 lines Patch #1657276: Make NETLINK_DNRTMSG conditional. Will backport. ........ r53771 | lars.gustaebel | 2007-02-13 17:09:24 +0100 (Tue, 13 Feb 2007) | 4 lines Patch #1647484: Renamed GzipFile's filename attribute to name. The filename attribute is still accessible as a property that emits a DeprecationWarning. ........ r53772 | lars.gustaebel | 2007-02-13 17:24:00 +0100 (Tue, 13 Feb 2007) | 3 lines Strip the '.gz' extension from the filename that is written to the gzip header. ........ r53774 | martin.v.loewis | 2007-02-14 11:07:37 +0100 (Wed, 14 Feb 2007) | 2 lines Patch #1432399: Add HCI sockets. ........ r53775 | martin.v.loewis | 2007-02-14 12:30:07 +0100 (Wed, 14 Feb 2007) | 2 lines Update 1432399 to removal of _BT_SOCKADDR_MEMB. ........ r53776 | martin.v.loewis | 2007-02-14 12:30:56 +0100 (Wed, 14 Feb 2007) | 3 lines Ignore directory time stamps when considering whether to rerun libffi configure. ........ r53778 | lars.gustaebel | 2007-02-14 15:45:12 +0100 (Wed, 14 Feb 2007) | 4 lines A missing binary mode in AppendTest caused failures in Windows Buildbot. ........ r53782 | martin.v.loewis | 2007-02-15 10:51:35 +0100 (Thu, 15 Feb 2007) | 2 lines Patch #1397848: add the reasoning behind no-resize-on-shrinkage. ........ r53783 | georg.brandl | 2007-02-15 11:37:59 +0100 (Thu, 15 Feb 2007) | 2 lines Make functools.wraps() docs a bit clearer. ........ r53785 | georg.brandl | 2007-02-15 12:29:04 +0100 (Thu, 15 Feb 2007) | 2 lines Patch #1494140: Add documentation for the new struct.Struct object. ........ r53787 | georg.brandl | 2007-02-15 12:29:55 +0100 (Thu, 15 Feb 2007) | 2 lines Add missing \versionadded. ........ r53800 | brett.cannon | 2007-02-15 23:54:39 +0100 (Thu, 15 Feb 2007) | 11 lines Update the encoding package's search function to use absolute imports when calling __import__. This helps make the expected search locations for encoding modules be more explicit. One could use an explicit value for __path__ when making the call to __import__ to force the exact location searched for encodings. This would give the most strict search path possible if one is worried about malicious code being imported. The unfortunate side-effect of that is that if __path__ was modified on 'encodings' on purpose in a safe way it would not be picked up in future __import__ calls. ........ r53801 | brett.cannon | 2007-02-16 20:33:01 +0100 (Fri, 16 Feb 2007) | 2 lines Make the __import__ call in encodings.__init__ absolute with a level 0 call. ........ r53809 | vinay.sajip | 2007-02-16 23:36:24 +0100 (Fri, 16 Feb 2007) | 1 line Minor fix for currentframe (SF #1652788). ........ r53818 | raymond.hettinger | 2007-02-19 03:03:19 +0100 (Mon, 19 Feb 2007) | 3 lines Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash(). ........ r53820 | raymond.hettinger | 2007-02-19 05:08:43 +0100 (Mon, 19 Feb 2007) | 1 line Add merge() function to heapq. ........ r53821 | raymond.hettinger | 2007-02-19 06:28:28 +0100 (Mon, 19 Feb 2007) | 1 line Add tie-breaker count to preserve sort stability. ........ r53822 | raymond.hettinger | 2007-02-19 07:59:32 +0100 (Mon, 19 Feb 2007) | 1 line Use C heapreplace() instead of slower _siftup() in pure python. ........ r53823 | raymond.hettinger | 2007-02-19 08:30:21 +0100 (Mon, 19 Feb 2007) | 1 line Add test for merge stability ........ r53824 | raymond.hettinger | 2007-02-19 10:14:10 +0100 (Mon, 19 Feb 2007) | 1 line Provide an example of defaultdict with non-zero constant factory function. ........ r53825 | lars.gustaebel | 2007-02-19 10:54:47 +0100 (Mon, 19 Feb 2007) | 2 lines Moved misplaced news item. ........ r53826 | martin.v.loewis | 2007-02-19 11:55:19 +0100 (Mon, 19 Feb 2007) | 3 lines Patch #1490190: posixmodule now includes os.chflags() and os.lchflags() functions on platforms where the underlying system calls are available. ........ r53827 | raymond.hettinger | 2007-02-19 19:15:04 +0100 (Mon, 19 Feb 2007) | 1 line Fixup docstrings for merge(). ........ r53829 | raymond.hettinger | 2007-02-19 21:44:04 +0100 (Mon, 19 Feb 2007) | 1 line Fixup set/dict interoperability. ........ r53837 | raymond.hettinger | 2007-02-21 06:20:38 +0100 (Wed, 21 Feb 2007) | 1 line Add itertools.izip_longest(). ........ r53838 | raymond.hettinger | 2007-02-21 18:22:05 +0100 (Wed, 21 Feb 2007) | 1 line Remove filler struct item and fix leak. ........ --- command/build_ext.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index f79eee3b74..bbe514626d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -185,9 +185,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ - ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')) and - sysconfig.get_config_var('Py_ENABLE_SHARED')): + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -197,6 +195,17 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') + # for extensions under Linux with a shared Python library, + # Python's library directory must be appended to library_dirs + if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ + and sysconfig.get_config_var('Py_ENABLE_SHARED'): + if string.find(sys.executable, sys.exec_prefix) != -1: + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: + # building python standard extensions + self.library_dirs.append('.') + # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option will be set to '1'. Multiple From 4b5b20c7db13586c89f2de8110f9b3af5a8e69be Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 13 Mar 2007 10:19:22 +0000 Subject: [PATCH 1863/8469] Patch #1569798: fix a bug in distutils when building Python from a directory within sys.exec_prefix. --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 542b77a7ad..82474de823 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -199,7 +199,7 @@ def finalize_options (self): # Python's library directory must be appended to library_dirs if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: From e936d6d24f1cb257cb2a66a70c32c89f65306d0a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 13 Mar 2007 10:19:35 +0000 Subject: [PATCH 1864/8469] Patch #1569798: fix a bug in distutils when building Python from a directory within sys.exec_prefix. (backport from rev. 54331) --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 542b77a7ad..82474de823 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -199,7 +199,7 @@ def finalize_options (self): # Python's library directory must be appended to library_dirs if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: From b0ac75c972effad4c578498808683e20da236ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Fri, 30 Mar 2007 15:01:42 +0000 Subject: [PATCH 1865/8469] Bump the patch level version of distutils since there were a few bug fixes since the 2.5.0 release. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 21d34c767b..86ad44fe3a 100644 --- a/__init__.py +++ b/__init__.py @@ -20,4 +20,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.0" +__version__ = "2.5.1" From fcee36f5b542e0eee58aa86aaa14a447ae3c03c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Sat, 31 Mar 2007 21:02:43 +0000 Subject: [PATCH 1866/8469] Bump the patch level version of distutils since there were a few bug fixes since the 2.5.0 release. Backport of r54615. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 21d34c767b..86ad44fe3a 100644 --- a/__init__.py +++ b/__init__.py @@ -20,4 +20,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.0" +__version__ = "2.5.1" From e49345974375c27eddb6aa6a576e5b30688e3511 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 1 Apr 2007 18:24:22 +0000 Subject: [PATCH 1867/8469] SF #1685563, MSVCCompiler creates redundant and long PATH strings If MSVCCompiler.initialize() was called multiple times, the path would get duplicated. On Windows, this is a problem because the path is limited to 4k. There's no benefit in adding a path multiple times, so prevent that from occuring. We also normalize the path before checking for duplicates so things like /a and /a/ won't both be stored. Will backport. --- msvccompiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 0d72837ed3..29a9020956 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -187,6 +187,19 @@ def get_build_architecture(): j = string.find(sys.version, ")", i) return sys.version[i+len(prefix):j] +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths class MSVCCompiler (CCompiler) : @@ -270,6 +283,7 @@ def initialize(self): self.__paths.append(p) except KeyError: pass + self.__paths = normalize_and_reduce_paths(self.__paths) os.environ['path'] = string.join(self.__paths, ';') self.preprocess_options = None From 1085c6753feacd1c88d97e59031217679ef25e6a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 1 Apr 2007 18:29:47 +0000 Subject: [PATCH 1868/8469] Backport 54644: SF #1685563, MSVCCompiler creates redundant and long PATH strings If MSVCCompiler.initialize() was called multiple times, the path would get duplicated. On Windows, this is a problem because the path is limited to 4k. There's no benefit in adding a path multiple times, so prevent that from occuring. We also normalize the path before checking for duplicates so things like /a and /a/ won't both be stored. --- msvccompiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/msvccompiler.py b/msvccompiler.py index 0d72837ed3..29a9020956 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -187,6 +187,19 @@ def get_build_architecture(): j = string.find(sys.version, ")", i) return sys.version[i+len(prefix):j] +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths class MSVCCompiler (CCompiler) : @@ -270,6 +283,7 @@ def initialize(self): self.__paths.append(p) except KeyError: pass + self.__paths = normalize_and_reduce_paths(self.__paths) os.environ['path'] = string.join(self.__paths, ';') self.preprocess_options = None From 57e9dc4a5d61c5572467c3fe69e816c357647a6f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 17 Apr 2007 08:48:32 +0000 Subject: [PATCH 1869/8469] Remove functions in string module that are also string methods. Also remove: * all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used --- cmd.py | 6 +++--- command/bdist.py | 2 +- command/bdist_msi.py | 2 +- command/bdist_rpm.py | 18 +++++++++--------- command/bdist_wininst.py | 10 +++++----- command/build_clib.py | 5 ++--- command/build_ext.py | 24 ++++++++++++------------ command/build_py.py | 14 +++++++------- command/config.py | 10 +++++----- command/install.py | 12 ++++++------ command/install_lib.py | 2 +- command/register.py | 4 ++-- command/sdist.py | 6 +++--- cygwinccompiler.py | 5 ++--- dist.py | 24 ++++++++++++------------ emxccompiler.py | 5 ++--- extension.py | 6 +++--- fancy_getopt.py | 14 +++++++------- filelist.py | 16 ++++++++-------- msvccompiler.py | 22 +++++++++++----------- mwerkscompiler.py | 6 +++--- spawn.py | 12 ++++++------ sysconfig.py | 7 +++---- text_file.py | 22 +++++++++++----------- util.py | 26 ++++++++++++-------------- version.py | 17 ++++++++--------- 26 files changed, 145 insertions(+), 152 deletions(-) diff --git a/cmd.py b/cmd.py index be0a3e23f6..ebd99310ea 100644 --- a/cmd.py +++ b/cmd.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util @@ -166,7 +166,7 @@ def dump_options (self, header=None, indent=""): print(indent + header) indent = indent + " " for (option, _, _) in self.user_options: - option = string.translate(option, longopt_xlate) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) @@ -415,7 +415,7 @@ def make_file (self, infiles, outfile, func, args, """ if exec_msg is None: exec_msg = "generating %s from %s" % \ - (outfile, string.join(infiles, ', ')) + (outfile, ', '.join(infiles)) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile diff --git a/command/bdist.py b/command/bdist.py index 23c25a55a8..d6897d2d09 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string +import os from types import * from distutils.core import Command from distutils.errors import * diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 75db8773f1..f31bdedac6 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -7,7 +7,7 @@ Implements the bdist_msi command. """ -import sys, os, string +import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index bbcf2927dc..ef2bdfd808 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os import glob from types import * from distutils.core import Command @@ -354,7 +354,7 @@ def run (self): line = out.readline() if not line: break - l = string.split(string.strip(line)) + l = line.strip().split() assert(len(l) == 2) binary_rpms.append(l[1]) # The source rpm is named after the first entry in the spec file @@ -437,9 +437,9 @@ def _make_spec_file(self): 'Conflicts', 'Obsoletes', ): - val = getattr(self, string.lower(field)) + val = getattr(self, field.lower()) if type(val) is ListType: - spec_file.append('%s: %s' % (field, string.join(val))) + spec_file.append('%s: %s' % (field, ' '.join(val))) elif val is not None: spec_file.append('%s: %s' % (field, val)) @@ -452,7 +452,7 @@ def _make_spec_file(self): if self.build_requires: spec_file.append('BuildRequires: ' + - string.join(self.build_requires)) + ' '.join(self.build_requires)) if self.icon: spec_file.append('Icon: ' + os.path.basename(self.icon)) @@ -513,7 +513,7 @@ def _make_spec_file(self): '', '%' + rpm_opt,]) if val: - spec_file.extend(string.split(open(val, 'r').read(), '\n')) + spec_file.extend(open(val, 'r').read().split('\n')) else: spec_file.append(default) @@ -526,7 +526,7 @@ def _make_spec_file(self): ]) if self.doc_files: - spec_file.append('%doc ' + string.join(self.doc_files)) + spec_file.append('%doc ' + ' '.join(self.doc_files)) if self.changelog: spec_file.extend([ @@ -544,8 +544,8 @@ def _format_changelog(self, changelog): if not changelog: return changelog new_changelog = [] - for line in string.split(string.strip(changelog), '\n'): - line = string.strip(line) + for line in changelog.strip().split('\n'): + line = line.strip() if line[0] == '*': new_changelog.extend(['', line]) elif line[0] == '-': diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 49afca0472..21465a82ff 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree @@ -135,7 +135,7 @@ def run (self): # Use a custom scheme for the zip-file, because we have to decide # at installation time which scheme to use. for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): - value = string.upper(key) + value = key.upper() if key == 'headers': value = value + '/Include/$dist_name' setattr(install, @@ -192,14 +192,14 @@ def get_inidata (self): # Escape newline characters def escape(s): - return string.replace(s, "\n", "\\n") + return s.replace("\n", "\\n") for name in ["author", "author_email", "description", "maintainer", "maintainer_email", "name", "url", "version"]: data = getattr(metadata, name, "") if data: info = info + ("\n %s: %s" % \ - (string.capitalize(name), escape(data))) + (name.capitalize(), escape(data))) lines.append("%s=%s" % (name, escape(data))) # The [setup] section contains entries controlling @@ -220,7 +220,7 @@ def escape(s): build_info = "Built %s with distutils-%s" % \ (time.ctime(time.time()), distutils.__version__) lines.append("build_info=%s" % build_info) - return string.join(lines, "\n") + return "\n".join(lines) # get_inidata() diff --git a/command/build_clib.py b/command/build_clib.py index 69d8c75166..07f5817986 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -18,7 +18,7 @@ # two modules, mainly because a number of subtle details changed in the # cut 'n paste. Sigh. -import os, string +import os from types import * from distutils.core import Command from distutils.errors import * @@ -93,8 +93,7 @@ def finalize_options (self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, - os.pathsep) + self.include_dirs = self.include_dirs.split(os.pathsep) # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? diff --git a/command/build_ext.py b/command/build_ext.py index bbe514626d..d0cd16293b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from types import * from distutils.core import Command from distutils.errors import * @@ -138,7 +138,7 @@ def finalize_options (self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, os.pathsep) + self.include_dirs = self.include_dirs.split(os.pathsep) # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. @@ -156,12 +156,12 @@ def finalize_options (self): if self.library_dirs is None: self.library_dirs = [] elif type(self.library_dirs) is StringType: - self.library_dirs = string.split(self.library_dirs, os.pathsep) + self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] elif type(self.rpath) is StringType: - self.rpath = string.split(self.rpath, os.pathsep) + self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.find(sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -199,7 +199,7 @@ def finalize_options (self): # Python's library directory must be appended to library_dirs if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.find(sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: @@ -212,14 +212,14 @@ def finalize_options (self): # symbols can be separated with commas. if self.define: - defines = string.split(self.define, ',') + defines = self.define.split(',') self.define = map(lambda symbol: (symbol, '1'), defines) # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also # be separated with commas here. if self.undef: - self.undef = string.split(self.undef, ',') + self.undef = self.undef.split(',') if self.swig_opts is None: self.swig_opts = [] @@ -429,8 +429,8 @@ def build_extension(self, ext): # ignore build-lib -- put the compiled extension into # the source tree along with pure Python modules - modpath = string.split(fullname, '.') - package = string.join(modpath[0:-1], '.') + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) base = modpath[-1] build_py = self.get_finalized_command('build_py') @@ -617,7 +617,7 @@ def get_ext_filename (self, ext_name): """ from distutils.sysconfig import get_config_var - ext_path = string.split(ext_name, '.') + ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] @@ -634,7 +634,7 @@ def get_export_symbols (self, ext): the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "init" + string.split(ext.name,'.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/command/build_py.py b/command/build_py.py index 3b7ec62c59..990824bdff 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, string, os +import sys, os from types import * from glob import glob @@ -150,7 +150,7 @@ def get_package_dir (self, package): distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = string.split(package, '.') + path = package.split('.') if not self.package_dir: if path: @@ -161,7 +161,7 @@ def get_package_dir (self, package): tail = [] while path: try: - pdir = self.package_dir[string.join(path, '.')] + pdir = self.package_dir['.'.join(path)] except KeyError: tail.insert(0, path[-1]) del path[-1] @@ -272,8 +272,8 @@ def find_modules (self): # - don't check for __init__.py in directory for empty package for module in self.py_modules: - path = string.split(module, '.') - package = string.join(path[0:-1], '.') + path = module.split('.') + package = '.'.join(path[0:-1]) module_base = path[-1] try: @@ -342,7 +342,7 @@ def get_outputs (self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: - package = string.split(package, '.') + package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) outputs.append(filename) if include_bytecode: @@ -362,7 +362,7 @@ def get_outputs (self, include_bytecode=1): def build_module (self, module, module_file, package): if type(package) is StringType: - package = string.split(package, '.') + package = package.split('.') elif type(package) not in (ListType, TupleType): raise TypeError, \ "'package' must be a string (dot-separated), list, or tuple" diff --git a/command/config.py b/command/config.py index 42465693be..3374db9e66 100644 --- a/command/config.py +++ b/command/config.py @@ -13,7 +13,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from types import * from distutils.core import Command from distutils.errors import DistutilsExecError @@ -74,7 +74,7 @@ def finalize_options (self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] elif type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, os.pathsep) + self.include_dirs = self.include_dirs.split(os.pathsep) if self.libraries is None: self.libraries = [] @@ -84,7 +84,7 @@ def finalize_options (self): if self.library_dirs is None: self.library_dirs = [] elif type(self.library_dirs) is StringType: - self.library_dirs = string.split(self.library_dirs, os.pathsep) + self.library_dirs = self.library_dirs.split(os.pathsep) def run (self): @@ -163,7 +163,7 @@ def _clean (self, *filenames): if not filenames: filenames = self.temp_files self.temp_files = [] - log.info("removing: %s", string.join(filenames)) + log.info("removing: %s", ' '.join(filenames)) for filename in filenames: try: os.remove(filename) @@ -322,7 +322,7 @@ def check_func (self, func, else: body.append(" %s;" % func) body.append("}") - body = string.join(body, "\n") + "\n" + body = "\n".join(body) + "\n" return self.try_link(body, headers, include_dirs, libraries, library_dirs) diff --git a/command/install.py b/command/install.py index fd5d6d1f39..c03a90e82c 100644 --- a/command/install.py +++ b/command/install.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from types import * from distutils.core import Command from distutils.debug import DEBUG @@ -269,7 +269,7 @@ def finalize_options (self): # $platbase in the other installation directories and not worry # about needing recursive variable expansion (shudder). - py_version = (string.split(sys.version))[0] + py_version = sys.version.split()[0] (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), @@ -353,11 +353,11 @@ def dump_dirs (self, msg): if opt_name[-1] == "=": opt_name = opt_name[0:-1] if self.negative_opt.has_key(opt_name): - opt_name = string.translate(self.negative_opt[opt_name], - longopt_xlate) + opt_name = self.negative_opt[opt_name].translate( + longopt_xlate) val = not getattr(self, opt_name) else: - opt_name = string.translate(opt_name, longopt_xlate) + opt_name = opt_name.translate(longopt_xlate) val = getattr(self, opt_name) print(" %s: %s" % (opt_name, val)) @@ -464,7 +464,7 @@ def handle_extra_path (self): if self.extra_path is not None: if type(self.extra_path) is StringType: - self.extra_path = string.split(self.extra_path, ',') + self.extra_path = self.extra_path.split(',') if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] diff --git a/command/install_lib.py b/command/install_lib.py index 08ff543449..65d25f7af2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -2,7 +2,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError diff --git a/command/register.py b/command/register.py index 48070ee83b..33567981bb 100644 --- a/command/register.py +++ b/command/register.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os, string, urllib2, getpass, urlparse +import sys, os, urllib2, getpass, urlparse import StringIO, ConfigParser from distutils.core import Command @@ -67,7 +67,7 @@ def check_metadata(self): if missing: self.warn("missing required meta-data: " + - string.join(missing, ", ")) + ", ".join(missing)) if metadata.author: if not metadata.author_email: diff --git a/command/sdist.py b/command/sdist.py index eb2db505dd..8e1c066023 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from types import * from glob import glob from distutils.core import Command @@ -166,7 +166,7 @@ def check_metadata (self): if missing: self.warn("missing required meta-data: " + - string.join(missing, ", ")) + ", ".join(missing)) if metadata.author: if not metadata.author_email: @@ -279,7 +279,7 @@ def add_defaults (self): if not got_it: self.warn("standard file not found: should have one of " + - string.join(alts, ', ')) + ', '.join(alts)) else: if os.path.exists(fn): self.filelist.append(fn) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 44b5850834..fae6848165 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -365,10 +365,9 @@ def check_config_h(): # "pyconfig.h" check -- should probably be renamed... from distutils import sysconfig - import string # if sys.version contains GCC then python was compiled with # GCC, and the pyconfig.h file should be OK - if string.find(sys.version,"GCC") >= 0: + if sys.version.find("GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") fn = sysconfig.get_config_h_filename() @@ -387,7 +386,7 @@ def check_config_h(): else: # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar - if string.find(s,"__GNUC__") >= 0: + if s.find("__GNUC__") >= 0: return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) else: return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) diff --git a/dist.py b/dist.py index ca7a2f9952..7ed1b5cf2c 100644 --- a/dist.py +++ b/dist.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from types import * from copy import copy @@ -304,7 +304,7 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): else: print(indent + "option dict for '%s' command:" % cmd_name) out = pformat(opt_dict) - for line in string.split(out, "\n"): + for line in out.split("\n"): print(indent + " " + line) # dump_option_dicts () @@ -378,7 +378,7 @@ def parse_config_files (self, filenames=None): for opt in options: if opt != '__name__': val = parser.get(section,opt) - opt = string.replace(opt, '-', '_') + opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -599,14 +599,14 @@ def finalize_options (self): keywords = self.metadata.keywords if keywords is not None: if type(keywords) is StringType: - keywordlist = string.split(keywords, ',') - self.metadata.keywords = map(string.strip, keywordlist) + keywordlist = keywords.split(',') + self.metadata.keywords = [x.strip() for x in keywordlist] platforms = self.metadata.platforms if platforms is not None: if type(platforms) is StringType: - platformlist = string.split(platforms, ',') - self.metadata.platforms = map(string.strip, platformlist) + platformlist = platforms.split(',') + self.metadata.platforms = [x.strip() for x in platformlist] def _show_help (self, parser, @@ -695,10 +695,10 @@ def handle_display_options (self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - print(string.join(value, ',')) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - print(string.join(value, '\n')) + print('\n'.join(value)) else: print(value) any_display_options = 1 @@ -803,9 +803,9 @@ def get_command_packages (self): """Return a list of packages from which commands are loaded.""" pkgs = self.command_packages if not isinstance(pkgs, type([])): - pkgs = string.split(pkgs or "", ",") + pkgs = (pkgs or "").split(",") for i in range(len(pkgs)): - pkgs[i] = string.strip(pkgs[i]) + pkgs[i] = pkgs[i].strip() pkgs = filter(None, pkgs) if "distutils.command" not in pkgs: pkgs.insert(0, "distutils.command") @@ -1100,7 +1100,7 @@ def write_pkg_file (self, file): long_desc = rfc822_escape( self.get_long_description() ) file.write('Description: %s\n' % long_desc) - keywords = string.join( self.get_keywords(), ',') + keywords = ','.join(self.get_keywords()) if keywords: file.write('Keywords: %s\n' % keywords ) diff --git a/emxccompiler.py b/emxccompiler.py index 8aef2b7a9d..f4b90dcd00 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -261,10 +261,9 @@ def check_config_h(): # "pyconfig.h" check -- should probably be renamed... from distutils import sysconfig - import string # if sys.version contains GCC then python was compiled with # GCC, and the pyconfig.h file should be OK - if string.find(sys.version,"GCC") >= 0: + if sys.version.find("GCC") >= 0: return (CONFIG_H_OK, "sys.version mentions 'GCC'") fn = sysconfig.get_config_h_filename() @@ -283,7 +282,7 @@ def check_config_h(): else: # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar - if string.find(s,"__GNUC__") >= 0: + if s.find("__GNUC__") >= 0: return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) else: return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) diff --git a/extension.py b/extension.py index 440d128cdc..0fcbcc141a 100644 --- a/extension.py +++ b/extension.py @@ -5,7 +5,7 @@ __revision__ = "$Id$" -import os, string, sys +import os, sys from types import * try: @@ -128,7 +128,7 @@ def __init__ (self, name, sources, if len(kw): L = kw.keys() ; L.sort() L = map(repr, L) - msg = "Unknown Extension options: " + string.join(L, ', ') + msg = "Unknown Extension options: " + ', '.join(L) if warnings is not None: warnings.warn(msg) else: @@ -195,7 +195,7 @@ def read_setup_file (filename): elif switch == "-I": ext.include_dirs.append(value) elif switch == "-D": - equals = string.find(value, "=") + equals = value.find("=") if equals == -1: # bare "-DFOO" -- no value ext.define_macros.append((value, None)) else: # "-DFOO=blah" diff --git a/fancy_getopt.py b/fancy_getopt.py index 646f8e1ee6..317a3a4860 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -115,7 +115,7 @@ def get_attr_name (self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return string.translate(long_option, longopt_xlate) + return long_option.translate(longopt_xlate) def _check_alias_dict (self, aliases, what): @@ -253,7 +253,7 @@ def getopt (self, args=None, object=None): self._grok_option_table() - short_opts = string.join(self.short_opts) + short_opts = ' '.join(self.short_opts) try: opts, args = getopt.getopt(args, short_opts, self.long_opts) except getopt.error as msg: @@ -420,8 +420,8 @@ def wrap_text (text, width): if len(text) <= width: return [text] - text = string.expandtabs(text) - text = string.translate(text, WS_TRANS) + text = text.expandtabs() + text = text.translate(WS_TRANS) chunks = re.split(r'( +|-+)', text) chunks = filter(None, chunks) # ' - ' results in empty strings lines = [] @@ -460,7 +460,7 @@ def wrap_text (text, width): # and store this line in the list-of-all-lines -- as a single # string, of course! - lines.append(string.join(cur_line, '')) + lines.append(''.join(cur_line)) # while chunks @@ -473,7 +473,7 @@ def translate_longopt (opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return string.translate(opt, longopt_xlate) + return opt.translate(longopt_xlate) class OptionDummy: @@ -498,5 +498,5 @@ def __init__ (self, options=[]): for w in (10, 20, 30, 40): print("width: %d" % w) - print(string.join(wrap_text(text, w), "\n")) + print("\n".join(wrap_text(text, w))) print() diff --git a/filelist.py b/filelist.py index e4a83d6484..bc668cfad3 100644 --- a/filelist.py +++ b/filelist.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import os, string, re +import os, re import fnmatch from types import * from glob import glob @@ -84,7 +84,7 @@ def remove_duplicates (self): # -- "File template" methods --------------------------------------- def _parse_template_line (self, line): - words = string.split(line) + words = line.split() action = words[0] patterns = dir = dir_pattern = None @@ -133,28 +133,28 @@ def process_template_line (self, line): # right number of words on the line for that action -- so we # can proceed with minimal error-checking. if action == 'include': - self.debug_print("include " + string.join(patterns)) + self.debug_print("include " + ' '.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=1): log.warn("warning: no files found matching '%s'", pattern) elif action == 'exclude': - self.debug_print("exclude " + string.join(patterns)) + self.debug_print("exclude " + ' '.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=1): log.warn(("warning: no previously-included files " "found matching '%s'"), pattern) elif action == 'global-include': - self.debug_print("global-include " + string.join(patterns)) + self.debug_print("global-include " + ' '.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=0): log.warn(("warning: no files found matching '%s' " + "anywhere in distribution"), pattern) elif action == 'global-exclude': - self.debug_print("global-exclude " + string.join(patterns)) + self.debug_print("global-exclude " + ' '.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=0): log.warn(("warning: no previously-included files matching " @@ -163,7 +163,7 @@ def process_template_line (self, line): elif action == 'recursive-include': self.debug_print("recursive-include %s %s" % - (dir, string.join(patterns))) + (dir, ' '.join(patterns))) for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): log.warn(("warning: no files found matching '%s' " + @@ -172,7 +172,7 @@ def process_template_line (self, line): elif action == 'recursive-exclude': self.debug_print("recursive-exclude %s %s" % - (dir, string.join(patterns))) + (dir, ' '.join(patterns))) for pattern in patterns: if not self.exclude_pattern(pattern, prefix=dir): log.warn(("warning: no previously-included files matching " diff --git a/msvccompiler.py b/msvccompiler.py index 968a4ffd46..ca1feaa088 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -12,7 +12,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -148,7 +148,7 @@ def load_macros(self, version): def sub(self, s): for k, v in self.macros.items(): - s = string.replace(s, k, v) + s = s.replace(k, v) return s def get_build_version(): @@ -159,7 +159,7 @@ def get_build_version(): """ prefix = "MSC v." - i = string.find(sys.version, prefix) + i = sys.version.find(prefix) if i == -1: return 6 i = i + len(prefix) @@ -181,10 +181,10 @@ def get_build_architecture(): """ prefix = " bit (" - i = string.find(sys.version, prefix) + i = sys.version.find(prefix) if i == -1: return "Intel" - j = string.find(sys.version, ")", i) + j = sys.version.find(")", i) return sys.version[i+len(prefix):j] @@ -266,11 +266,11 @@ def initialize(self): # extend the MSVC path with the current path try: - for p in string.split(os.environ['path'], ';'): + for p in os.environ['path'].split(';'): self.__paths.append(p) except KeyError: pass - os.environ['path'] = string.join(self.__paths, ';') + os.environ['path'] = ';'.join(self.__paths) self.preprocess_options = None if self.__arch == "Intel": @@ -579,7 +579,7 @@ def find_exe(self, exe): return fn # didn't find it; try existing path - for p in string.split(os.environ['Path'],';'): + for p in os.environ['Path'].split(';'): fn = os.path.join(os.path.abspath(p),exe) if os.path.isfile(fn): return fn @@ -608,9 +608,9 @@ def get_msvc_paths(self, path, platform='x86'): d = read_values(base, key) if d: if self.__version >= 7: - return string.split(self.__macros.sub(d[path]), ";") + return self.__macros.sub(d[path]).split(";") else: - return string.split(d[path], ";") + return d[path].split(";") # MSVC 6 seems to create the registry entries we need only when # the GUI is run. if self.__version == 6: @@ -635,4 +635,4 @@ def set_path_env_var(self, name): else: p = self.get_msvc_paths(name) if p: - os.environ[name] = string.join(p, ';') + os.environ[name] = ';'.join(p) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 9db1a39b17..028ea8250d 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from types import * from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ @@ -213,11 +213,11 @@ def _filename_to_abs(self, filename): curdir = os.getcwd() filename = os.path.join(curdir, filename) # Finally remove .. components - components = string.split(filename, ':') + components = filename.split(':') for i in range(1, len(components)): if components[i] == '..': components[i] = '' - return string.join(components, ':') + return ':'.join(components) def library_dir_option (self, dir): """Return the compiler option to add 'dir' to the list of diff --git a/spawn.py b/spawn.py index c75931c3ab..c70c10bf7c 100644 --- a/spawn.py +++ b/spawn.py @@ -10,7 +10,7 @@ __revision__ = "$Id$" -import sys, os, string +import sys, os from distutils.errors import * from distutils import log @@ -59,7 +59,7 @@ def _nt_quote_args (args): # quoting?) for i in range(len(args)): - if string.find(args[i], ' ') != -1: + if args[i].find(' ') != -1: args[i] = '"%s"' % args[i] return args @@ -73,7 +73,7 @@ def _spawn_nt (cmd, if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - log.info(string.join([executable] + cmd[1:], ' ')) + log.info(' '.join([executable] + cmd[1:])) if not dry_run: # spawn for NT requires a full path to the .exe try: @@ -98,7 +98,7 @@ def _spawn_os2 (cmd, if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - log.info(string.join([executable] + cmd[1:], ' ')) + log.info(' '.join([executable] + cmd[1:])) if not dry_run: # spawnv for OS/2 EMX requires a full path to the .exe try: @@ -119,7 +119,7 @@ def _spawn_posix (cmd, verbose=0, dry_run=0): - log.info(string.join(cmd, ' ')) + log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv @@ -184,7 +184,7 @@ def find_executable(executable, path=None): """ if path is None: path = os.environ['PATH'] - paths = string.split(path, os.pathsep) + paths = path.split(os.pathsep) (base, ext) = os.path.splitext(executable) if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'): executable = executable + '.exe' diff --git a/sysconfig.py b/sysconfig.py index 220b03310c..ea2e059778 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -13,7 +13,6 @@ import os import re -import string import sys from .errors import DistutilsPlatformError @@ -261,7 +260,7 @@ def parse_makefile(fn, g=None): m = _variable_rx.match(line) if m: n, v = m.group(1, 2) - v = string.strip(v) + v = v.strip() if "$" in v: notdone[n] = v else: @@ -295,7 +294,7 @@ def parse_makefile(fn, g=None): else: try: value = int(value) except ValueError: - done[name] = string.strip(value) + done[name] = value.strip() else: done[name] = value del notdone[name] @@ -399,7 +398,7 @@ def _init_posix(): # relative to the srcdir, which after installation no longer makes # sense. python_lib = get_python_lib(standard_lib=1) - linkerscript_path = string.split(g['LDSHARED'])[0] + linkerscript_path = g['LDSHARED'].split()[0] linkerscript_name = os.path.basename(linkerscript_path) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) diff --git a/text_file.py b/text_file.py index 10ee1be783..c23a31dd9c 100644 --- a/text_file.py +++ b/text_file.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" from types import * -import sys, os, string +import sys, os class TextFile: @@ -142,7 +142,7 @@ def gen_error (self, msg, line=None): else: outmsg.append("line %d: " % line) outmsg.append(str(msg)) - return string.join(outmsg, "") + return "".join(outmsg) def error (self, msg, line=None): @@ -196,7 +196,7 @@ def readline (self): # unescape it (and any other escaped "#"'s that might be # lurking in there) and otherwise leave the line alone. - pos = string.find (line, "#") + pos = line.find ("#") if pos == -1: # no "#" -- no comments pass @@ -219,11 +219,11 @@ def readline (self): # # comment that should be ignored # there # result in "hello there". - if string.strip(line) == "": + if line.strip () == "": continue else: # it's an escaped "#" - line = string.replace (line, "\\#", "#") + line = line.replace("\\#", "#") # did previous line end with a backslash? then accumulate @@ -235,7 +235,7 @@ def readline (self): return buildup_line if self.collapse_join: - line = string.lstrip (line) + line = line.lstrip () line = buildup_line + line # careful: pay attention to line number when incrementing it @@ -259,11 +259,11 @@ def readline (self): # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) if self.lstrip_ws and self.rstrip_ws: - line = string.strip (line) + line = line.strip () elif self.lstrip_ws: - line = string.lstrip (line) + line = line.lstrip () elif self.rstrip_ws: - line = string.rstrip (line) + line = line.rstrip () # blank line (whether we rstrip'ed or not)? skip to next line # if appropriate @@ -313,7 +313,7 @@ def unreadline (self, line): continues on next line """ # result 1: no fancy options - result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) + result1 = map (lambda x: x + "\n", test_data.split ("\n")[0:-1]) # result 2: just strip comments result2 = ["\n", @@ -340,7 +340,7 @@ def unreadline (self, line): def test_input (count, description, file, expected_result): result = file.readlines () - # result = string.join (result, '') + # result = ''.join (result) if result == expected_result: print("ok %d (%s)" % (count, description)) else: diff --git a/util.py b/util.py index 16d8bcba4d..6f15ce8b5e 100644 --- a/util.py +++ b/util.py @@ -42,10 +42,9 @@ def get_platform (): # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") - osname = string.lower(osname) - osname = string.replace(osname, '/', '') - machine = string.replace(machine, ' ', '_') - machine = string.replace(machine, '/', '-') + osname = osname.lower().replace('/', '') + machine = machine.replace(' ', '_') + machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- @@ -139,7 +138,7 @@ def convert_path (pathname): if pathname[-1] == '/': raise ValueError, "path '%s' cannot end with '/'" % pathname - paths = string.split(pathname, '/') + paths = pathname.split('/') while '.' in paths: paths.remove('.') if not paths: @@ -178,7 +177,7 @@ def change_root (new_root, pathname): return os.path.join(new_root, pathname) else: # Chop off volume name from start of path - elements = string.split(pathname, ":", 1) + elements = pathname.split(":", 1) pathname = ":" + elements[1] return os.path.join(new_root, pathname) @@ -281,7 +280,7 @@ def split_quoted (s): # bit of a brain-bender to get it working right, though... if _wordchars_re is None: _init_regex() - s = string.strip(s) + s = s.strip() words = [] pos = 0 @@ -294,7 +293,7 @@ def split_quoted (s): if s[end] in string.whitespace: # unescaped, unquoted whitespace: now words.append(s[:end]) # we definitely have a word delimiter - s = string.lstrip(s[end:]) + s = s[end:].lstrip() pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; @@ -354,7 +353,7 @@ def strtobool (val): are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. """ - val = string.lower(val) + val = val.lower() if val in ('y', 'yes', 't', 'true', 'on', '1'): return 1 elif val in ('n', 'no', 'f', 'false', 'off', '0'): @@ -445,7 +444,7 @@ def byte_compile (py_files, #if prefix: # prefix = os.path.abspath(prefix) - script.write(string.join(map(repr, py_files), ",\n") + "]\n") + script.write(",\n".join(map(repr, py_files)) + "]\n") script.write(""" byte_compile(files, optimize=%r, force=%r, prefix=%r, base_dir=%r, @@ -507,7 +506,6 @@ def rfc822_escape (header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = string.split(header, '\n') - lines = map(string.strip, lines) - header = string.join(lines, '\n' + 8*' ') - return header + lines = [x.strip() for x in header.split('\n')] + sep = '\n' + 8*' ' + return sep.join(lines) diff --git a/version.py b/version.py index 2cd36365e7..2db6b18f1e 100644 --- a/version.py +++ b/version.py @@ -26,8 +26,7 @@ of the same class, thus must follow the same rules) """ -import string, re -from types import StringType +import re class Version: """Abstract base class for version numbering classes. Just provides @@ -147,12 +146,12 @@ def parse (self, vstring): match.group(1, 2, 4, 5, 6) if patch: - self.version = tuple(map(string.atoi, [major, minor, patch])) + self.version = tuple(map(int, [major, minor, patch])) else: - self.version = tuple(map(string.atoi, [major, minor]) + [0]) + self.version = tuple(map(int, [major, minor]) + [0]) if prerelease: - self.prerelease = (prerelease[0], string.atoi(prerelease_num)) + self.prerelease = (prerelease[0], int(prerelease_num)) else: self.prerelease = None @@ -160,9 +159,9 @@ def parse (self, vstring): def __str__ (self): if self.version[2] == 0: - vstring = string.join(map(str, self.version[0:2]), '.') + vstring = '.'.join(map(str, self.version[0:2])) else: - vstring = string.join(map(str, self.version), '.') + vstring = '.'.join(map(str, self.version)) if self.prerelease: vstring = vstring + self.prerelease[0] + str(self.prerelease[1]) @@ -171,7 +170,7 @@ def __str__ (self): def __cmp__ (self, other): - if isinstance(other, StringType): + if isinstance(other, str): other = StrictVersion(other) compare = cmp(self.version, other.version) @@ -327,7 +326,7 @@ def __repr__ (self): def __cmp__ (self, other): - if isinstance(other, StringType): + if isinstance(other, str): other = LooseVersion(other) return cmp(self.version, other.version) From 44168b43a0a197dc0295f0e80734880cecf658ea Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 24 Apr 2007 15:27:13 +0000 Subject: [PATCH 1870/8469] Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file (as opposed to the command line) will now write file names ending in ".cpp" too. --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 82474de823..12d4083743 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -533,7 +533,8 @@ def swig_sources (self, sources, extension): if self.swig_cpp: log.warn("--swig-cpp is deprecated - use --swig-opts=-c++") - if self.swig_cpp or ('-c++' in self.swig_opts): + if self.swig_cpp or ('-c++' in self.swig_opts) or \ + ('-c++' in extension.swig_opts): target_ext = '.cpp' else: target_ext = '.c' From 092ed8384228a0ca24fd297dde6243b6751a46a0 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 24 Apr 2007 15:27:25 +0000 Subject: [PATCH 1871/8469] Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file (as opposed to the command line) will now write file names ending in ".cpp" too. (backport from rev. 54941) --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 82474de823..12d4083743 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -533,7 +533,8 @@ def swig_sources (self, sources, extension): if self.swig_cpp: log.warn("--swig-cpp is deprecated - use --swig-opts=-c++") - if self.swig_cpp or ('-c++' in self.swig_opts): + if self.swig_cpp or ('-c++' in self.swig_opts) or \ + ('-c++' in extension.swig_opts): target_ext = '.cpp' else: target_ext = '.c' From 0086340118b6b5d4243cb84b3e4c6df726a064da Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 25 Apr 2007 06:42:41 +0000 Subject: [PATCH 1872/8469] Whitespace normalization --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index d1fd1d9511..75e8a5316e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -82,7 +82,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass - # Check if the SDK that is used during compilation actually exists, + # Check if the SDK that is used during compilation actually exists, # the universal build requires the usage of a universal SDK and not all # users have that installed by default. sysroot = None From 078fadd293abe8b159cb6185a3ded2e87210c5f8 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 27 Apr 2007 19:54:29 +0000 Subject: [PATCH 1873/8469] Merged revisions 53952-54987 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r53954 | jeremy.hylton | 2007-02-26 10:41:18 -0800 (Mon, 26 Feb 2007) | 10 lines Do not copy free variables to locals in class namespaces. Fixes bug 1569356, but at the cost of a minor incompatibility in locals(). Add test that verifies that the class namespace is not polluted. Also clarify the behavior in the library docs. Along the way, cleaned up the dict_to_map and map_to_dict implementations and added some comments that explain what they do. ........ r53955 | jeremy.hylton | 2007-02-26 11:00:20 -0800 (Mon, 26 Feb 2007) | 2 lines Fix assertion. ........ r53969 | neal.norwitz | 2007-02-26 14:41:45 -0800 (Mon, 26 Feb 2007) | 3 lines When printing an unraisable error, don't print exceptions. before the name. This duplicates the behavior whening normally printing exceptions. ........ r53970 | andrew.kuchling | 2007-02-26 15:02:47 -0800 (Mon, 26 Feb 2007) | 1 line Markup fix ........ r53975 | neal.norwitz | 2007-02-26 15:48:27 -0800 (Mon, 26 Feb 2007) | 3 lines SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions are gone. ........ r53976 | andrew.kuchling | 2007-02-26 15:54:17 -0800 (Mon, 26 Feb 2007) | 1 line Add some items ........ r53981 | jeremy.hylton | 2007-02-26 17:01:59 -0800 (Mon, 26 Feb 2007) | 4 lines Fix long-standing bug in name mangling for package imports Reported by Mike Verdone. ........ r53993 | jeremy.hylton | 2007-02-27 08:00:06 -0800 (Tue, 27 Feb 2007) | 2 lines tabify ........ r53994 | jeremy.hylton | 2007-02-27 08:13:23 -0800 (Tue, 27 Feb 2007) | 5 lines tabify Note that ast.c still has a mix of tabs and spaces, because it attempts to use four-space indents for more of the new code. ........ r53996 | jeremy.hylton | 2007-02-27 09:24:48 -0800 (Tue, 27 Feb 2007) | 2 lines whitespace normalization ........ r53997 | jeremy.hylton | 2007-02-27 10:29:45 -0800 (Tue, 27 Feb 2007) | 24 lines Add checking for a number of metaclass error conditions. We add some new rules that are required for preserving internal invariants of types. 1. If type (or a subclass of type) appears in bases, it must appear before any non-type bases. If a non-type base (like a regular new-style class) occurred first, it could trick type into allocating the new class an __dict__ which must be impossible. 2. There are several checks that are made of bases when creating a type. Those checks are now repeated when assigning to __bases__. We also add the restriction that assignment to __bases__ may not change the metaclass of the type. Add new tests for these cases and for a few other oddball errors that were no previously tested. Remove a crasher test that was fixed. Also some internal refactoring: Extract the code to find the most derived metaclass of a type and its bases. It is now needed in two places. Rewrite the TypeError checks in test_descr to use doctest. The tests now clearly show what exception they expect to see. ........ r53998 | jeremy.hylton | 2007-02-27 10:33:31 -0800 (Tue, 27 Feb 2007) | 2 lines Add news about changes to metaclasses and __bases__ error checking. ........ r54016 | armin.rigo | 2007-02-28 01:25:29 -0800 (Wed, 28 Feb 2007) | 3 lines Modify the segfaulting example to show why r53997 is not a solution to it. ........ r54022 | brett.cannon | 2007-02-28 10:15:00 -0800 (Wed, 28 Feb 2007) | 2 lines Add a test for instantiating SyntaxError with no arguments. ........ r54026 | raymond.hettinger | 2007-02-28 10:27:41 -0800 (Wed, 28 Feb 2007) | 1 line Docstring nit. ........ r54033 | raymond.hettinger | 2007-02-28 10:37:52 -0800 (Wed, 28 Feb 2007) | 1 line Prepare collections module for pure python code entries. ........ r54053 | raymond.hettinger | 2007-02-28 22:16:43 -0800 (Wed, 28 Feb 2007) | 1 line Add collections.NamedTuple ........ r54054 | neal.norwitz | 2007-02-28 23:04:41 -0800 (Wed, 28 Feb 2007) | 1 line Add Pat and Eric for work on PEP 3101 in the sandbox ........ r54061 | andrew.kuchling | 2007-03-01 06:36:12 -0800 (Thu, 01 Mar 2007) | 1 line Add NamedTuple ........ r54080 | georg.brandl | 2007-03-02 06:37:12 -0800 (Fri, 02 Mar 2007) | 2 lines Bug #1628895: some better tries to find HTML documentation in pydoc. ........ r54086 | raymond.hettinger | 2007-03-02 11:20:46 -0800 (Fri, 02 Mar 2007) | 1 line Fix embarrassing typo and fix constantification of None ........ r54088 | georg.brandl | 2007-03-02 12:30:14 -0800 (Fri, 02 Mar 2007) | 2 lines Bugs #1668032, #1668036, #1669304: clarify behavior of PyMem_Realloc and _Resize. ........ r54114 | georg.brandl | 2007-03-04 09:18:54 -0800 (Sun, 04 Mar 2007) | 2 lines Fix a bug in test_dict and test_userdict, found at the PyPy sprint. ........ r54124 | skip.montanaro | 2007-03-04 12:52:28 -0800 (Sun, 04 Mar 2007) | 2 lines Teach setup.py how to find Berkeley DB on Macs using MacPorts. ........ r54125 | skip.montanaro | 2007-03-04 12:54:12 -0800 (Sun, 04 Mar 2007) | 1 line note MacPorts/BerkDB change in setup.py ........ r54136 | neal.norwitz | 2007-03-04 23:52:01 -0800 (Sun, 04 Mar 2007) | 1 line Added Pete for 3101 too ........ r54138 | facundo.batista | 2007-03-05 08:31:54 -0800 (Mon, 05 Mar 2007) | 1 line Minor corrections to docs, and an explanation comentary ........ r54139 | georg.brandl | 2007-03-05 14:28:08 -0800 (Mon, 05 Mar 2007) | 3 lines Patch #1674228: when assigning a slice (old-style), check for the sq_ass_slice instead of the sq_slice slot. ........ r54149 | georg.brandl | 2007-03-06 01:33:01 -0800 (Tue, 06 Mar 2007) | 3 lines Nit: a struct field is set to GenericAlloc, not GenericAlloc(). ........ r54150 | georg.brandl | 2007-03-06 02:02:47 -0800 (Tue, 06 Mar 2007) | 3 lines Patch #1671450: add a section about subclassing builtin types to the "extending and embedding" tutorial. ........ r54152 | martin.v.loewis | 2007-03-06 02:41:24 -0800 (Tue, 06 Mar 2007) | 2 lines Patch #1121142: Implement ZipFile.open. ........ r54154 | georg.brandl | 2007-03-06 03:51:14 -0800 (Tue, 06 Mar 2007) | 2 lines A test case for the fix in #1674228. ........ r54156 | georg.brandl | 2007-03-06 03:52:24 -0800 (Tue, 06 Mar 2007) | 2 lines Patch #1672481: fix bug in idlelib.MultiCall. ........ r54159 | georg.brandl | 2007-03-06 04:17:50 -0800 (Tue, 06 Mar 2007) | 1 line Bug #1674503: close the file opened by execfile() in an error condition. ........ r54160 | georg.brandl | 2007-03-06 05:32:52 -0800 (Tue, 06 Mar 2007) | 3 lines Fix another reincarnation of bug #1576657 in defaultdict. ........ r54162 | georg.brandl | 2007-03-06 05:35:00 -0800 (Tue, 06 Mar 2007) | 2 lines A test case for the defaultdict KeyError bug. ........ r54164 | georg.brandl | 2007-03-06 05:37:45 -0800 (Tue, 06 Mar 2007) | 3 lines Patch #1663234: you can now run doctest on test files and modules using "python -m doctest [-v] filename ...". ........ r54165 | martin.v.loewis | 2007-03-06 06:43:00 -0800 (Tue, 06 Mar 2007) | 3 lines Patch #912410: Replace HTML entity references for attribute values in HTMLParser. ........ r54166 | skip.montanaro | 2007-03-06 07:41:38 -0800 (Tue, 06 Mar 2007) | 1 line patch 1673619 - identify extension modules which cannot be built ........ r54167 | guido.van.rossum | 2007-03-06 07:50:01 -0800 (Tue, 06 Mar 2007) | 5 lines Patch #1646728: datetime.fromtimestamp fails with negative fractional times. With unittest. Somebody please backport to 2.5. ........ r54169 | georg.brandl | 2007-03-06 09:49:14 -0800 (Tue, 06 Mar 2007) | 2 lines Fix cmp vs. key argument for list.sort. ........ r54170 | georg.brandl | 2007-03-06 10:21:32 -0800 (Tue, 06 Mar 2007) | 2 lines Small nit, found by Neal. ........ r54171 | georg.brandl | 2007-03-06 10:29:58 -0800 (Tue, 06 Mar 2007) | 3 lines Patch #1602128: clarify that richcmp methods can return NotImplemented and should return True or False otherwise. ........ r54173 | georg.brandl | 2007-03-06 10:41:12 -0800 (Tue, 06 Mar 2007) | 2 lines Patch #1638879: don't accept strings with embedded NUL bytes in long(). ........ r54175 | georg.brandl | 2007-03-06 10:47:31 -0800 (Tue, 06 Mar 2007) | 2 lines Patch #1673121: update README wrt. OSX default shell. ........ r54177 | georg.brandl | 2007-03-06 10:59:11 -0800 (Tue, 06 Mar 2007) | 3 lines Patch #1654417: make operator.{get,set,del}slice use the full range of Py_ssize_t. ........ r54180 | walter.doerwald | 2007-03-06 12:38:57 -0800 (Tue, 06 Mar 2007) | 4 lines Patch for bug #1633621: if curses.resizeterm() or curses.resize_term() is called, update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS. ........ r54182 | walter.doerwald | 2007-03-06 13:15:24 -0800 (Tue, 06 Mar 2007) | 2 lines Document change to curses. ........ r54188 | georg.brandl | 2007-03-06 16:34:46 -0800 (Tue, 06 Mar 2007) | 5 lines Variant of patch #697613: don't exit the interpreter on a SystemExit exception if the -i command line option or PYTHONINSPECT environment variable is given, but break into the interactive interpreter just like on other exceptions or normal program exit. (backport) ........ r54189 | georg.brandl | 2007-03-06 16:40:28 -0800 (Tue, 06 Mar 2007) | 4 lines Patch #703779: unset __file__ in __main__ after running a file. This makes the filenames the warning module prints much more sensible when a PYTHONSTARTUP file is used. ........ r54192 | george.yoshida | 2007-03-06 20:21:18 -0800 (Tue, 06 Mar 2007) | 2 lines add versionadded info ........ r54195 | georg.brandl | 2007-03-06 23:39:06 -0800 (Tue, 06 Mar 2007) | 2 lines Patch #812285: allow multiple auth schemes in AbstractBasicAuthHandler. ........ r54197 | georg.brandl | 2007-03-07 00:31:51 -0800 (Wed, 07 Mar 2007) | 3 lines Patch #1001604: glob.glob() now returns unicode filenames if it was given a unicode argument and os.listdir() returns unicode filenames. ........ r54199 | georg.brandl | 2007-03-07 01:09:40 -0800 (Wed, 07 Mar 2007) | 3 lines Patches #1550273, #1550272: fix a few bugs in unittest and add a comprehensive test suite for the module. ........ r54201 | georg.brandl | 2007-03-07 01:21:06 -0800 (Wed, 07 Mar 2007) | 3 lines Patch #787789: allow to pass custom TestRunner instances to unittest's main() function. ........ r54202 | georg.brandl | 2007-03-07 01:34:45 -0800 (Wed, 07 Mar 2007) | 2 lines Patch #1669331: clarify shutil.copyfileobj() behavior wrt. file position. ........ r54204 | martin.v.loewis | 2007-03-07 03:04:33 -0800 (Wed, 07 Mar 2007) | 2 lines Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', ''). ........ r54206 | georg.brandl | 2007-03-07 03:37:42 -0800 (Wed, 07 Mar 2007) | 2 lines Patch #1675471: convert test_pty to unittest. ........ r54207 | georg.brandl | 2007-03-07 03:54:49 -0800 (Wed, 07 Mar 2007) | 4 lines Add some sanity checks to unittest.TestSuite's addTest(s) methods. Fixes #878275. ........ r54209 | guido.van.rossum | 2007-03-07 07:16:29 -0800 (Wed, 07 Mar 2007) | 3 lines Windows doesn't support negative timestamps. Skip the tests involving them if os.name == "nt". ........ r54219 | martin.v.loewis | 2007-03-08 05:42:43 -0800 (Thu, 08 Mar 2007) | 2 lines Add missing ) in parenthical remark. ........ r54220 | georg.brandl | 2007-03-08 09:49:06 -0800 (Thu, 08 Mar 2007) | 2 lines Fix #1676656: \em is different from \emph... ........ r54222 | georg.brandl | 2007-03-08 10:37:31 -0800 (Thu, 08 Mar 2007) | 2 lines Add a NEWS entry for rev. 54207,8. ........ r54225 | raymond.hettinger | 2007-03-08 11:24:27 -0800 (Thu, 08 Mar 2007) | 1 line SF 1676321: empty() returned wrong result ........ r54227 | collin.winter | 2007-03-08 11:58:14 -0800 (Thu, 08 Mar 2007) | 1 line Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order. ........ r54230 | raymond.hettinger | 2007-03-08 13:33:47 -0800 (Thu, 08 Mar 2007) | 1 line SF #1637850: make_table in difflib did not work with unicode ........ r54232 | collin.winter | 2007-03-08 14:16:25 -0800 (Thu, 08 Mar 2007) | 1 line Patch #1668482: don't use '-' in mkstemp ........ r54233 | brett.cannon | 2007-03-08 15:58:11 -0800 (Thu, 08 Mar 2007) | 10 lines Introduce test.test_support.TransientResource. It's a context manager to surround calls to resources that may or may not be available. Specifying the expected exception and attributes to be raised if the resource is not available prevents overly broad catching of exceptions. This is meant to help suppress spurious failures by raising test.test_support.ResourceDenied if the exception matches. It would probably be good to go through the various network tests and surround the calls to catch connection timeouts (as done with test_socket_ssl in this commit). ........ r54234 | collin.winter | 2007-03-08 19:15:56 -0800 (Thu, 08 Mar 2007) | 1 line Patch #1481079: Support of HTTP_REFERER in CGIHTTPServer.py ........ r54235 | collin.winter | 2007-03-08 19:26:32 -0800 (Thu, 08 Mar 2007) | 1 line Add NEWS item for patch #1481079 (r54234). ........ r54237 | neal.norwitz | 2007-03-08 21:59:01 -0800 (Thu, 08 Mar 2007) | 1 line Fix SF #1676971, Complex OverflowError has a typo ........ r54239 | georg.brandl | 2007-03-09 04:58:41 -0800 (Fri, 09 Mar 2007) | 2 lines Typo. ........ r54240 | martin.v.loewis | 2007-03-09 07:35:55 -0800 (Fri, 09 Mar 2007) | 2 lines Patch #957003: Implement smtplib.LMTP. ........ r54243 | collin.winter | 2007-03-09 10:09:10 -0800 (Fri, 09 Mar 2007) | 2 lines Bug #1629566: clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822. ........ r54244 | thomas.heller | 2007-03-09 11:21:28 -0800 (Fri, 09 Mar 2007) | 3 lines Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0) returned string up to the first NUL character. ........ r54245 | martin.v.loewis | 2007-03-09 11:36:01 -0800 (Fri, 09 Mar 2007) | 2 lines Add Ziga Seilnacht. ........ r54247 | collin.winter | 2007-03-09 12:33:07 -0800 (Fri, 09 Mar 2007) | 2 lines Patch #1491866: change the complex() constructor to allow parthensized forms. This means complex(repr(x)) now works instead of raising a ValueError. ........ r54248 | thomas.heller | 2007-03-09 12:39:22 -0800 (Fri, 09 Mar 2007) | 7 lines Bug #1651235: When a tuple was passed to a ctypes function call, Python would crash instead of raising an error. The crash was caused by a section of code that should have been removed long ago, at that time ctypes had other ways to pass parameters to function calls. ........ r54250 | collin.winter | 2007-03-09 15:30:39 -0800 (Fri, 09 Mar 2007) | 1 line Hashing simplification pointed out by Thomas Wouters. ........ r54252 | collin.winter | 2007-03-09 18:23:40 -0800 (Fri, 09 Mar 2007) | 5 lines * Unlink test files before and after each test; hopefully this will cut down on recent buildbot failures in test_islink. * Drop safe_remove() in favor of test_support.unlink(). * Fix the indentation of test_samefile so that it runs. ........ r54253 | collin.winter | 2007-03-09 18:51:26 -0800 (Fri, 09 Mar 2007) | 3 lines Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket. Will backport. ........ r54254 | neal.norwitz | 2007-03-09 19:19:18 -0800 (Fri, 09 Mar 2007) | 4 lines Simplify a little by handling the TCP case first. Update to use predominant style of spaces around = in args list and print to stderr if debugging. ........ r54256 | collin.winter | 2007-03-09 19:35:34 -0800 (Fri, 09 Mar 2007) | 1 line Add proper attribution for a bug fix. ........ r54257 | georg.brandl | 2007-03-09 23:38:14 -0800 (Fri, 09 Mar 2007) | 2 lines Typos. ........ r54260 | collin.winter | 2007-03-10 06:33:32 -0800 (Sat, 10 Mar 2007) | 1 line Convert an assert to a raise so it works even in the presence of -O. ........ r54262 | collin.winter | 2007-03-10 06:41:48 -0800 (Sat, 10 Mar 2007) | 2 lines Patch #1599845: Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer. ........ r54268 | georg.brandl | 2007-03-11 00:28:46 -0800 (Sun, 11 Mar 2007) | 2 lines Add missing "return" statements in exception handler. ........ r54270 | ziga.seilnacht | 2007-03-11 08:54:54 -0700 (Sun, 11 Mar 2007) | 3 lines Patch #1675981: remove unreachable code from type.__new__() method. __dict__ and __weakref__ are removed from the slots tuple earlier in the code, in the loop that mangles slot names. Will backport. ........ r54271 | collin.winter | 2007-03-11 09:00:20 -0700 (Sun, 11 Mar 2007) | 3 lines Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number. Will backport. ........ r54274 | vinay.sajip | 2007-03-11 11:32:07 -0700 (Sun, 11 Mar 2007) | 1 line Fix resource leak reported in SF #1516995. ........ r54278 | collin.winter | 2007-03-11 18:55:54 -0700 (Sun, 11 Mar 2007) | 4 lines Patch #1678662: ftp.python.org does not exist. So the testcode in urllib.py must use a more stable FTP. Will backport. ........ r54280 | barry.warsaw | 2007-03-11 20:20:01 -0700 (Sun, 11 Mar 2007) | 8 lines Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the display name of an email address, e.g. Foo \tBar Test case added by Barry. ........ r54282 | skip.montanaro | 2007-03-11 20:30:50 -0700 (Sun, 11 Mar 2007) | 4 lines Sane humans would call these invalid tests, but Andrew McNamara pointed out that given the inputs in these tests Excel does indeed produce the output these tests expect. Document that for future confused folks. ........ r54283 | martin.v.loewis | 2007-03-12 03:50:39 -0700 (Mon, 12 Mar 2007) | 2 lines Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86. ........ r54285 | martin.v.loewis | 2007-03-12 04:01:10 -0700 (Mon, 12 Mar 2007) | 2 lines Patch #1677862: Require a space or tab after import in .pth files. ........ r54287 | georg.brandl | 2007-03-12 06:17:36 -0700 (Mon, 12 Mar 2007) | 8 lines Backport from Py3k branch: Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir. Had to change a few bits of the patch because classobjs and __methods__ are still in Py2.6. ........ r54288 | georg.brandl | 2007-03-12 07:30:05 -0700 (Mon, 12 Mar 2007) | 3 lines Bug #1678647: write a newline after printing an exception in any case, even when converting the value to a string failed. ........ r54290 | collin.winter | 2007-03-12 08:57:19 -0700 (Mon, 12 Mar 2007) | 1 line Patch #1678088: convert test_operations to use unittest, fold the result into test_dict. ........ r54291 | collin.winter | 2007-03-12 09:11:39 -0700 (Mon, 12 Mar 2007) | 3 lines Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167. Will backport. ........ r54292 | georg.brandl | 2007-03-12 09:15:09 -0700 (Mon, 12 Mar 2007) | 2 lines Typo fix. ........ r54295 | collin.winter | 2007-03-12 10:24:07 -0700 (Mon, 12 Mar 2007) | 1 line Patch #1670993: Refactor test_threadedtempfile.py to use unittest. ........ r54296 | tim.peters | 2007-03-12 11:07:52 -0700 (Mon, 12 Mar 2007) | 2 lines Whitespace normalization. ........ r54297 | tim.peters | 2007-03-12 11:09:22 -0700 (Mon, 12 Mar 2007) | 2 lines Set missing svn:eol-style property on text files. ........ r54315 | brett.cannon | 2007-03-12 19:34:09 -0700 (Mon, 12 Mar 2007) | 8 lines Add test.test_support.transient_internet . Returns a context manager that nests test.test_support.TransientResource context managers that capture exceptions raised when the Internet connection is flaky. Initially using in test_socket_ssl but should probably be expanded to cover any test that should not raise the captured exceptions if the Internet connection works. ........ r54316 | brett.cannon | 2007-03-12 20:05:40 -0700 (Mon, 12 Mar 2007) | 2 lines Fix a typo where the variable name was not updated. ........ r54318 | neal.norwitz | 2007-03-12 21:59:58 -0700 (Mon, 12 Mar 2007) | 1 line Add Jerry Seutter for a bunch of his recent patches refactoring tests ........ r54319 | neal.norwitz | 2007-03-12 22:07:14 -0700 (Mon, 12 Mar 2007) | 7 lines Add some other acks for recent checkins: Brian Leair - 922167 Tomer Filiba - 1591665 Jeremy Jones - 1192590 ........ r54321 | neal.norwitz | 2007-03-12 22:31:38 -0700 (Mon, 12 Mar 2007) | 9 lines Fix some style nits: * lines too long * wrong indentation * space after a function name * wrong function name in error string * simplifying some logic Also add an error check to PyDict_SetItemString. ........ r54322 | georg.brandl | 2007-03-13 00:23:16 -0700 (Tue, 13 Mar 2007) | 2 lines Typo and grammar fixes. ........ r54323 | georg.brandl | 2007-03-13 00:50:57 -0700 (Tue, 13 Mar 2007) | 2 lines Patch #1679379: add documentation for fnmatch.translate(). ........ r54325 | georg.brandl | 2007-03-13 00:57:51 -0700 (Tue, 13 Mar 2007) | 2 lines Patch #1642844: comments to clarify the complexobject constructor. ........ r54326 | georg.brandl | 2007-03-13 01:14:27 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1668100: urllib2 now correctly raises URLError instead of OSError if accessing a local file via the file:// protocol fails. ........ r54327 | georg.brandl | 2007-03-13 02:32:11 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1635454: the csv.DictWriter class now includes the offending field names in its exception message if you try to write a record with a dictionary containing fields not in the CSV field names list. ........ r54328 | georg.brandl | 2007-03-13 02:41:31 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1555098: use str.join() instead of repeated string concatenation in robotparser. ........ r54329 | georg.brandl | 2007-03-13 03:06:48 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to pydoc's help keywords. ........ r54331 | georg.brandl | 2007-03-13 03:19:22 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1569798: fix a bug in distutils when building Python from a directory within sys.exec_prefix. ........ r54333 | martin.v.loewis | 2007-03-13 03:24:00 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1449244: Support Unicode strings in email.message.Message.{set_charset,get_content_charset}. Will backport. ........ r54335 | lars.gustaebel | 2007-03-13 03:47:19 -0700 (Tue, 13 Mar 2007) | 34 lines This is the implementation of POSIX.1-2001 (pax) format read/write support. The TarInfo class now contains all necessary logic to process and create tar header data which has been moved there from the TarFile class. The fromtarfile() method was added. The new path and linkpath properties are aliases for the name and linkname attributes in correspondence to the pax naming scheme. The TarFile constructor and classmethods now accept a number of keyword arguments which could only be set as attributes before (e.g. dereference, ignore_zeros). The encoding and pax_headers arguments were added for pax support. There is a new tarinfo keyword argument that allows using subclassed TarInfo objects in TarFile. The boolean TarFile.posix attribute is deprecated, because now three tar formats are supported. Instead, the desired format for writing is specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT as the format keyword argument. This change affects TarInfo.tobuf() as well. The test suite has been heavily reorganized and partially rewritten. A new testtar.tar was added that contains sample data in many formats from 4 different tar programs. Some bugs and quirks that also have been fixed: Directory names do no longer have a trailing slash in TarInfo.name or TarFile.getnames(). Adding the same file twice does not create a hardlink file member. The TarFile constructor does no longer need a name argument. The TarFile._mode attribute was renamed to mode and contains either 'r', 'w' or 'a'. ........ r54336 | georg.brandl | 2007-03-13 05:34:25 -0700 (Tue, 13 Mar 2007) | 3 lines Bug #1622896: fix a rare corner case where the bz2 module raised an error in spite of a succesful compression. ........ r54338 | lars.gustaebel | 2007-03-13 08:47:07 -0700 (Tue, 13 Mar 2007) | 3 lines Quick fix for tests that fail on systems with an encoding other than 'iso8859-1'. ........ r54339 | georg.brandl | 2007-03-13 10:43:32 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1603688: ConfigParser.SafeConfigParser now checks values that are set for invalid interpolation sequences that would lead to errors on reading back those values. ........ r54341 | georg.brandl | 2007-03-13 11:15:41 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1581073: add a flag to textwrap that prevents the dropping of whitespace while wrapping. ........ r54343 | georg.brandl | 2007-03-13 11:24:40 -0700 (Tue, 13 Mar 2007) | 2 lines Patch #1605192: list allowed states in error messages for imaplib. ........ r54344 | georg.brandl | 2007-03-13 11:31:49 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter which can be set to False to prevent the default delete-on-close behavior. ........ r54345 | collin.winter | 2007-03-13 11:53:04 -0700 (Tue, 13 Mar 2007) | 9 lines Add acks for recent patch checkins: Arvin Schnell - 1668482 S?\195?\169bastien Martini - 1481079 Heiko Wundram - 1491866 Damon Kohler - 1545011 Peter Parente - 1599845 Bjorn Lindqvist - 1678662 ........ r54346 | georg.brandl | 2007-03-13 12:00:36 -0700 (Tue, 13 Mar 2007) | 2 lines Acks for recent patches. ........ r54347 | georg.brandl | 2007-03-13 12:18:18 -0700 (Tue, 13 Mar 2007) | 3 lines Fix a tab. ........ r54348 | georg.brandl | 2007-03-13 12:32:21 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1533909: the timeit module now accepts callables in addition to strings for the code to time and the setup code. Also added two convenience functions for instantiating a Timer and calling its methods. ........ r54352 | georg.brandl | 2007-03-13 13:02:57 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1530482: add pydoc.render_doc() which returns the documentation for a thing instead of paging it to stdout, which pydoc.doc() does. ........ r54357 | thomas.heller | 2007-03-13 13:42:52 -0700 (Tue, 13 Mar 2007) | 1 line Patch #1649190: Adding support for _Bool to ctypes as c_bool, by David Remahl. ........ r54358 | georg.brandl | 2007-03-13 13:46:32 -0700 (Tue, 13 Mar 2007) | 2 lines Patch #1444529: the builtin compile() now accepts keyword arguments. (backport) ........ r54359 | thomas.heller | 2007-03-13 14:01:39 -0700 (Tue, 13 Mar 2007) | 1 line Add versionadded marker for ctypes.c_bool. ........ r54360 | georg.brandl | 2007-03-13 14:08:15 -0700 (Tue, 13 Mar 2007) | 3 lines Patch #1393667: pdb now has a "run" command which restarts the debugged Python program, optionally with different arguments. ........ r54361 | georg.brandl | 2007-03-13 14:32:01 -0700 (Tue, 13 Mar 2007) | 3 lines Deprecate commands.getstatus(). ........ r54362 | georg.brandl | 2007-03-13 14:32:56 -0700 (Tue, 13 Mar 2007) | 2 lines NEWS entry for getstatus() deprecation. ........ r54363 | georg.brandl | 2007-03-13 14:58:44 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #1429539: pdb now correctly initializes the __main__ module for the debugged script, which means that imports from __main__ work correctly now. ........ r54364 | georg.brandl | 2007-03-13 15:07:36 -0700 (Tue, 13 Mar 2007) | 4 lines Patch #957650: "%var%" environment variable references are now properly expanded in ntpath.expandvars(), also "~user" home directory references are recognized and handled on Windows. ........ r54365 | georg.brandl | 2007-03-13 15:16:30 -0700 (Tue, 13 Mar 2007) | 2 lines Patch #1194449: correctly detect unbound methods in pydoc. ........ r54367 | georg.brandl | 2007-03-13 15:49:43 -0700 (Tue, 13 Mar 2007) | 5 lines Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters with ASCII value less than 32. Also, it correctly quotes dots only if they occur on a single line, as opposed to the previous behavior of quoting dots if they are the second character of any line. ........ r54368 | collin.winter | 2007-03-13 16:02:15 -0700 (Tue, 13 Mar 2007) | 1 line Inline PyImport_GetModulesReloading(). ........ r54371 | barry.warsaw | 2007-03-13 21:59:50 -0700 (Tue, 13 Mar 2007) | 6 lines SF bug #1582282; decode_header() incorrectly splits not-conformant RFC 2047-like headers where there is no whitespace between encoded words. This fix changes the matching regexp to include a trailing lookahead assertion that the closing ?= must be followed by whitespace, newline, or end-of-string. This also changes the regexp to add the MULTILINE flag. ........ r54372 | gregory.p.smith | 2007-03-14 00:17:40 -0700 (Wed, 14 Mar 2007) | 2 lines correct order and names of the less often used keyword parameters. ........ r54373 | gregory.p.smith | 2007-03-14 00:19:50 -0700 (Wed, 14 Mar 2007) | 5 lines Its time to stop listing (Unix, Windows) when we really mean "everything but Mac OS 9" now that nobody is likely to use Python on Mac OS 9 and most of the (Mac) platform items are all OS X special API specific since OS X is unixy enough for these modules to be available out of the box. ........ r54376 | georg.brandl | 2007-03-14 01:27:52 -0700 (Wed, 14 Mar 2007) | 4 lines Bug #767111: fix long-standing bug in urllib which caused an AttributeError instead of an IOError when the server's response didn't contain a valid HTTP status line. ........ r54378 | ziga.seilnacht | 2007-03-14 05:24:09 -0700 (Wed, 14 Mar 2007) | 4 lines Patch #1680015: Don't modify __slots__ tuple if it contains an unicode name. Remove a reference leak that happened if the name could not be converted to string. Will backport. ........ r54386 | martin.v.loewis | 2007-03-14 13:02:31 -0700 (Wed, 14 Mar 2007) | 3 lines Patch #1559413: Fix test_cmd_line if sys.executable contains a space. Will backport. ........ r54389 | brett.cannon | 2007-03-14 14:40:13 -0700 (Wed, 14 Mar 2007) | 3 lines Note how test_socket_ssl has various exceptions that deal with a flaky Net connection are silenced. ........ r54390 | brett.cannon | 2007-03-14 14:44:15 -0700 (Wed, 14 Mar 2007) | 2 lines Raise ResourceDenied in test_urllib2net when the Net connection goes bad. ........ r54391 | neal.norwitz | 2007-03-14 21:41:20 -0700 (Wed, 14 Mar 2007) | 1 line Wrap a long line and fix a typo (is -> if) ........ r54392 | georg.brandl | 2007-03-15 00:38:14 -0700 (Thu, 15 Mar 2007) | 3 lines Patch #1680978: consistently use "alive" instead of "active" in the thread lib doc. ........ r54394 | georg.brandl | 2007-03-15 00:41:30 -0700 (Thu, 15 Mar 2007) | 3 lines Patch #1681153: the wave module now closes a file object it opened if initialization failed. ........ r54397 | ziga.seilnacht | 2007-03-15 04:44:55 -0700 (Thu, 15 Mar 2007) | 3 lines Patch #1462488: prevent a segfault in object_reduce_ex() by splitting the implementation for __reduce__ and __reduce_ex__ into two separate functions. Fixes bug #931877. Will backport. ........ r54404 | collin.winter | 2007-03-15 21:11:30 -0700 (Thu, 15 Mar 2007) | 3 lines Patch #1642547: Fix an error/crash when encountering syntax errors in complex if statements. Will backport. ........ r54406 | georg.brandl | 2007-03-16 00:55:09 -0700 (Fri, 16 Mar 2007) | 5 lines Bug #1681228: the webbrowser module now correctly uses the default GNOME or KDE browser, depending on whether there is a session of one of those present. Also, it tries the Windows default browser before trying Mozilla variants. (backport) ........ r54407 | georg.brandl | 2007-03-16 01:22:40 -0700 (Fri, 16 Mar 2007) | 4 lines Patch #1273829: os.walk() now has a "followlinks" parameter. If set to True (which is not the default), it visits symlinks pointing to directories. ........ r54408 | georg.brandl | 2007-03-16 01:24:21 -0700 (Fri, 16 Mar 2007) | 2 lines Add \versionadded tag. ........ r54409 | georg.brandl | 2007-03-16 01:33:47 -0700 (Fri, 16 Mar 2007) | 2 lines RFE #1670167: fix in isinstance() docs. ........ r54412 | ziga.seilnacht | 2007-03-16 04:59:38 -0700 (Fri, 16 Mar 2007) | 3 lines Patch #1623563: allow __class__ assignment for classes with __slots__. The old and the new class are still required to have the same slot names, but the order in which they are specified is not relevant. ........ r54413 | ziga.seilnacht | 2007-03-16 05:11:11 -0700 (Fri, 16 Mar 2007) | 2 lines Whitespace cleanup. Also remove the empty lines from the previous check in. ........ r54414 | jeremy.hylton | 2007-03-16 07:49:11 -0700 (Fri, 16 Mar 2007) | 2 lines Remove warning: funcion declaration isn't a prototype ........ r54415 | jeremy.hylton | 2007-03-16 08:59:47 -0700 (Fri, 16 Mar 2007) | 11 lines Clean up formatting of this file. The file should now follow PEP 7, except that it uses 4 space indents (in the style of Py3k). This particular code would be really hard to read with the regular tab idents. Other changes: - reflow long lines - change multi-line conditionals to have test at end of line ........ r54417 | collin.winter | 2007-03-16 14:13:35 -0700 (Fri, 16 Mar 2007) | 1 line Patch #1676994: Refactor test_popen2 to use unittest. ........ r54418 | collin.winter | 2007-03-16 14:15:35 -0700 (Fri, 16 Mar 2007) | 1 line Remove test/output/test_popen2 (missed in r54417). ........ r54419 | collin.winter | 2007-03-16 15:16:08 -0700 (Fri, 16 Mar 2007) | 1 line Patch 1339796: add a relpath() function to os.path. ........ r54421 | georg.brandl | 2007-03-17 09:08:45 -0700 (Sat, 17 Mar 2007) | 5 lines Patch #1675423: PyComplex_AsCComplex() now tries to convert an object to complex using its __complex__() method before falling back to the __float__() method. Therefore, the functions in the cmath module now can operate on objects that define a __complex__() method. (backport) ........ r54423 | gregory.p.smith | 2007-03-17 15:33:35 -0700 (Sat, 17 Mar 2007) | 2 lines move note to the correct section ........ r54426 | georg.brandl | 2007-03-18 01:25:00 -0700 (Sun, 18 Mar 2007) | 2 lines Patch #1682878: the new socket methods are recv_into and recvfrom_into, not *_buf. ........ r54432 | georg.brandl | 2007-03-18 11:28:25 -0700 (Sun, 18 Mar 2007) | 2 lines Patch #1678339: test case for bug in difflib. ........ r54439 | collin.winter | 2007-03-19 11:52:08 -0700 (Mon, 19 Mar 2007) | 1 line Patch #1630118: add a SpooledTemporaryFile class to tempfile. ........ r54441 | georg.brandl | 2007-03-19 12:02:48 -0700 (Mon, 19 Mar 2007) | 2 lines Patch #1683328: fixes and enhancements for "unparse" demo. ........ r54456 | neal.norwitz | 2007-03-19 22:07:28 -0700 (Mon, 19 Mar 2007) | 1 line Add some doc that was left out from some change to platform.py ........ r54457 | neal.norwitz | 2007-03-19 22:08:23 -0700 (Mon, 19 Mar 2007) | 1 line Add a comment about 3k migration ........ r54458 | neal.norwitz | 2007-03-19 22:21:21 -0700 (Mon, 19 Mar 2007) | 1 line Get rid of deprecation warning when testing commands.getstatus() ........ r54459 | neal.norwitz | 2007-03-19 22:23:09 -0700 (Mon, 19 Mar 2007) | 4 lines Try backing out 54407 to see if it corrects the problems on the Windows buildbots. This rev was backported, so we will need to keep both branches in sync, pending the outcome of the test after this checkin. ........ r54460 | neal.norwitz | 2007-03-19 23:13:25 -0700 (Mon, 19 Mar 2007) | 1 line Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-) ........ r54461 | neal.norwitz | 2007-03-19 23:16:26 -0700 (Mon, 19 Mar 2007) | 1 line Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-) ........ r54462 | neal.norwitz | 2007-03-19 23:53:17 -0700 (Mon, 19 Mar 2007) | 5 lines Try to be a little more resilient to errors. This might help the test pass, but my guess is that it won't. I'm guessing that some other test is leaving this file open which means it can't be removed under Windows AFAIK. ........ r54463 | neal.norwitz | 2007-03-20 01:14:57 -0700 (Tue, 20 Mar 2007) | 8 lines Try to get test_urllib to pass on Windows by closing the file. I'm guessing that's the problem. h.getfile() must be called *after* h.getreply() and the fp can be None. I'm not entirely convinced this is the best fix (or even correct). The buildbots will tell us if things improve or not. I don't know if this needs to be backported (assuming it actually works). ........ r54465 | raymond.hettinger | 2007-03-20 14:27:24 -0700 (Tue, 20 Mar 2007) | 1 line Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability. ........ r54468 | georg.brandl | 2007-03-20 16:05:14 -0700 (Tue, 20 Mar 2007) | 2 lines Fix for glob.py if filesystem encoding is None. ........ r54479 | neal.norwitz | 2007-03-20 23:39:48 -0700 (Tue, 20 Mar 2007) | 1 line Remove unused file spotted by Paul Hankin ........ r54480 | georg.brandl | 2007-03-21 02:00:39 -0700 (Wed, 21 Mar 2007) | 3 lines Patch #1682205: a TypeError while unpacking an iterable is no longer masked by a generic one with the message "unpack non-sequence". ........ r54482 | georg.brandl | 2007-03-21 02:10:29 -0700 (Wed, 21 Mar 2007) | 2 lines New test for rev. 54407 which only uses directories under TESTFN. ........ r54483 | georg.brandl | 2007-03-21 02:16:53 -0700 (Wed, 21 Mar 2007) | 2 lines Patch #1684834: document some utility C API functions. ........ r54485 | georg.brandl | 2007-03-21 04:51:25 -0700 (Wed, 21 Mar 2007) | 2 lines Fix #1684254: split BROWSER contents with shlex to avoid displaying 'URL'. ........ r54487 | andrew.kuchling | 2007-03-21 07:32:43 -0700 (Wed, 21 Mar 2007) | 1 line Add comments on maintenance of this file ........ r54489 | andrew.kuchling | 2007-03-21 09:57:32 -0700 (Wed, 21 Mar 2007) | 1 line Fix sentence, and fix typo in example ........ r54490 | andrew.kuchling | 2007-03-21 09:59:20 -0700 (Wed, 21 Mar 2007) | 1 line Put code examples at left margin instead of indenting them ........ r54491 | facundo.batista | 2007-03-21 12:41:24 -0700 (Wed, 21 Mar 2007) | 1 line Minor clarification, saying that blocking means no timeout (from bug #882297) ........ r54492 | ziga.seilnacht | 2007-03-21 13:07:56 -0700 (Wed, 21 Mar 2007) | 2 lines Bug #1675967: re patterns pickled with older Python versions can now be unpickled. Will backport. ........ r54495 | raymond.hettinger | 2007-03-21 13:33:57 -0700 (Wed, 21 Mar 2007) | 1 line Add test and fix for fromkeys() optional argument. ........ r54524 | georg.brandl | 2007-03-22 01:05:45 -0700 (Thu, 22 Mar 2007) | 2 lines Bug #1685704: use -m switch in timeit docs. ........ r54533 | thomas.heller | 2007-03-22 12:44:31 -0700 (Thu, 22 Mar 2007) | 5 lines Back out "Patch #1643874: memory leak in ctypes fixed." The code in this patch leaves no way to give up the ownership of a BSTR instance. ........ r54538 | thomas.heller | 2007-03-22 13:34:37 -0700 (Thu, 22 Mar 2007) | 2 lines Explain the purpose of the b_needsfree flag (forward ported from release25-maint). ........ r54539 | guido.van.rossum | 2007-03-22 21:58:42 -0700 (Thu, 22 Mar 2007) | 12 lines - Bug #1683368: The object.__init__() and object.__new__() methods are now stricter in rejecting excess arguments. The only time when either allows excess arguments is when it is not overridden and the other one is. For backwards compatibility, when both are overridden, it is a deprecation warning (for now; maybe a Py3k warning later). When merging this into 3.0, the warnings should become errors. Note: without the change to string.py, lots of spurious warnings happen. What's going on there? ........ r54540 | neal.norwitz | 2007-03-22 22:17:23 -0700 (Thu, 22 Mar 2007) | 1 line Add Mark Dickinson for SF # 1675423. ........ r54541 | martin.v.loewis | 2007-03-23 03:35:49 -0700 (Fri, 23 Mar 2007) | 3 lines Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}. Will backport. ........ r54543 | martin.v.loewis | 2007-03-23 06:27:15 -0700 (Fri, 23 Mar 2007) | 3 lines Bug #978833: Revert r50844, as it broke _socketobject.dup. Will backport. ........ r54545 | guido.van.rossum | 2007-03-23 11:53:03 -0700 (Fri, 23 Mar 2007) | 8 lines Add a type.__init__() method that enforces the same signature as type.__new__(), and then calls object.__init__(cls), just to be anal. This allows us to restore the code in string.py's _TemplateMetaclass that called super(...).__init__(name, bases, dct), which I commented out yesterday since it broke due to the stricter argument checking added to object.__init__(). ........ r54546 | facundo.batista | 2007-03-23 11:54:07 -0700 (Fri, 23 Mar 2007) | 4 lines Added a 'create_connect()' function to socket.py, which creates a connection with an optional timeout, and modified httplib.py to use this function in HTTPConnection. Applies patch 1676823. ........ r54547 | guido.van.rossum | 2007-03-23 12:39:01 -0700 (Fri, 23 Mar 2007) | 2 lines Add note about type.__init__(). ........ r54553 | thomas.heller | 2007-03-23 12:55:27 -0700 (Fri, 23 Mar 2007) | 5 lines Prevent creation (followed by a segfault) of array types when the size overflows the valid Py_ssize_t range. Check return values of PyMem_Malloc. Will backport to release25-maint. ........ r54555 | facundo.batista | 2007-03-23 13:23:08 -0700 (Fri, 23 Mar 2007) | 6 lines Surrounded with try/finally to socket's default timeout setting changes in the tests, so failing one test won't produce strange results in others. Also relaxed the timeout settings in the test (where actually the value didn't mean anything). ........ r54556 | collin.winter | 2007-03-23 15:24:39 -0700 (Fri, 23 Mar 2007) | 1 line Make test_relpath() pass on Windows. ........ r54559 | ziga.seilnacht | 2007-03-24 07:24:26 -0700 (Sat, 24 Mar 2007) | 6 lines Patch #1489771: update syntax rules in Python Reference Manual. Python 2.5 added support for explicit relative import statements and yield expressions, which were missing in the manual. Also fix grammar productions that used the names from the Grammar file, markup that broke the generated grammar.txt, and wrap some lines that broke the pdf output. Will backport. ........ r54565 | georg.brandl | 2007-03-24 15:20:34 -0700 (Sat, 24 Mar 2007) | 2 lines Remove typo accent. ........ r54566 | georg.brandl | 2007-03-24 15:27:56 -0700 (Sat, 24 Mar 2007) | 2 lines Revert accidental change. ........ r54567 | brett.cannon | 2007-03-24 18:32:36 -0700 (Sat, 24 Mar 2007) | 3 lines Change the docs to no longer claim that unittest is preferred over doctest for regression tests. ........ r54568 | facundo.batista | 2007-03-24 18:53:21 -0700 (Sat, 24 Mar 2007) | 4 lines Redone the tests, using the infrastructure already present for threading and socket serving. ........ r54570 | facundo.batista | 2007-03-24 20:20:05 -0700 (Sat, 24 Mar 2007) | 3 lines Closing the HTTP connection after each test, and listening more. ........ r54572 | georg.brandl | 2007-03-25 11:44:35 -0700 (Sun, 25 Mar 2007) | 2 lines Markup fix. ........ r54573 | georg.brandl | 2007-03-25 12:04:55 -0700 (Sun, 25 Mar 2007) | 2 lines Markup fix. ........ r54580 | facundo.batista | 2007-03-26 13:18:31 -0700 (Mon, 26 Mar 2007) | 5 lines Added an optional timeout to FTP class. Also I started a test_ftplib.py file to test the ftp lib (right now I included a basic test, the timeout one, and nothing else). ........ r54581 | georg.brandl | 2007-03-26 13:28:28 -0700 (Mon, 26 Mar 2007) | 2 lines Some nits. ........ r54582 | facundo.batista | 2007-03-26 13:56:09 -0700 (Mon, 26 Mar 2007) | 4 lines Forgot to add the file before the previous commit, here go the ftplib tests. ........ r54585 | facundo.batista | 2007-03-27 11:23:21 -0700 (Tue, 27 Mar 2007) | 5 lines Added an optional timeout to poplib.POP3. Also created a test_poplib.py file with a basic test and the timeout ones. Docs are also updated. ........ r54586 | facundo.batista | 2007-03-27 11:50:29 -0700 (Tue, 27 Mar 2007) | 3 lines The basic test cases of poplib.py. ........ r54594 | facundo.batista | 2007-03-27 20:45:20 -0700 (Tue, 27 Mar 2007) | 4 lines Bug 1688393. Adds a control of negative values in socket.recvfrom, which caused an ugly crash. ........ r54599 | facundo.batista | 2007-03-28 11:25:54 -0700 (Wed, 28 Mar 2007) | 5 lines Added timeout to smtplib (to SMTP and SMTP_SSL). Also created the test_smtplib.py file, with a basic test and the timeout ones. Docs are updated too. ........ r54603 | collin.winter | 2007-03-28 16:34:06 -0700 (Wed, 28 Mar 2007) | 3 lines Consolidate patches #1690164, 1683397, and 1690169, all of which refactor XML-related test suites. The patches are applied together because they use a common output/xmltests file. Thanks to Jerry Seutter for all three patches. ........ r54604 | collin.winter | 2007-03-28 19:28:16 -0700 (Wed, 28 Mar 2007) | 1 line Make test_zipfile clean up its temporary files properly. ........ r54605 | georg.brandl | 2007-03-29 00:41:32 -0700 (Thu, 29 Mar 2007) | 2 lines These are actually methods. ........ r54606 | georg.brandl | 2007-03-29 05:42:07 -0700 (Thu, 29 Mar 2007) | 4 lines In Windows' time.clock(), when QueryPerformanceFrequency() fails, the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC as for the POSIX implementation (thanks to #pypy). ........ r54608 | facundo.batista | 2007-03-29 11:22:35 -0700 (Thu, 29 Mar 2007) | 5 lines Added timout parameter to telnetlib.Telnet. Also created test_telnetlib.py with a basic test and timeout ones. Docs are also updated. ........ r54613 | facundo.batista | 2007-03-30 06:00:35 -0700 (Fri, 30 Mar 2007) | 4 lines Added the posibility to pass the timeout to FTP.connect, not only when instantiating the class. Docs and tests are updated. ........ r54614 | collin.winter | 2007-03-30 07:01:25 -0700 (Fri, 30 Mar 2007) | 1 line Bug #1688274: add documentation for C-level class objects. ........ r54615 | marc-andre.lemburg | 2007-03-30 08:01:42 -0700 (Fri, 30 Mar 2007) | 4 lines Bump the patch level version of distutils since there were a few bug fixes since the 2.5.0 release. ........ r54617 | georg.brandl | 2007-03-30 08:49:05 -0700 (Fri, 30 Mar 2007) | 2 lines Markup fix. ........ r54618 | georg.brandl | 2007-03-30 10:39:39 -0700 (Fri, 30 Mar 2007) | 2 lines Label name fix. ........ r54619 | georg.brandl | 2007-03-30 10:47:21 -0700 (Fri, 30 Mar 2007) | 2 lines Duplicate label fix. ........ r54620 | georg.brandl | 2007-03-30 10:48:39 -0700 (Fri, 30 Mar 2007) | 2 lines Markup fix. ........ r54623 | andrew.kuchling | 2007-03-30 11:00:15 -0700 (Fri, 30 Mar 2007) | 1 line Add item. (Oops, accidentally checked this in on my branch) ........ r54624 | georg.brandl | 2007-03-30 12:01:38 -0700 (Fri, 30 Mar 2007) | 2 lines Duplicate label fix. ........ r54625 | georg.brandl | 2007-03-30 12:14:02 -0700 (Fri, 30 Mar 2007) | 2 lines Markup fix. ........ r54629 | georg.brandl | 2007-03-31 03:17:31 -0700 (Sat, 31 Mar 2007) | 2 lines repair string literal. ........ r54630 | georg.brandl | 2007-03-31 04:54:58 -0700 (Sat, 31 Mar 2007) | 2 lines Markup fix. ........ r54631 | georg.brandl | 2007-03-31 04:58:36 -0700 (Sat, 31 Mar 2007) | 2 lines Duplicate label fix. ........ r54632 | georg.brandl | 2007-03-31 04:59:54 -0700 (Sat, 31 Mar 2007) | 2 lines Typo fix. ........ r54633 | neal.norwitz | 2007-03-31 11:54:18 -0700 (Sat, 31 Mar 2007) | 1 line Fix method names. Will backport. ........ r54634 | georg.brandl | 2007-03-31 11:56:11 -0700 (Sat, 31 Mar 2007) | 4 lines Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS returned by python-config if Python was built with --enable-shared because that prevented the shared library from being used. ........ r54637 | collin.winter | 2007-03-31 12:31:34 -0700 (Sat, 31 Mar 2007) | 1 line Shut up an occaisonal buildbot error due to test files being left around. ........ r54644 | neal.norwitz | 2007-04-01 11:24:22 -0700 (Sun, 01 Apr 2007) | 11 lines SF #1685563, MSVCCompiler creates redundant and long PATH strings If MSVCCompiler.initialize() was called multiple times, the path would get duplicated. On Windows, this is a problem because the path is limited to 4k. There's no benefit in adding a path multiple times, so prevent that from occuring. We also normalize the path before checking for duplicates so things like /a and /a/ won't both be stored. Will backport. ........ r54646 | brett.cannon | 2007-04-01 11:47:27 -0700 (Sun, 01 Apr 2007) | 8 lines time.strptime's caching of its locale object was being recreated when the locale changed but not used during the function call it was recreated during. The test in this checkin is untested (OS X does not have the proper locale support for me to test), although the fix for the bug this deals with was tested by the OP (#1290505). Once the buildbots verify the test at least doesn't fail it becomes a backport candidate. ........ r54647 | brett.cannon | 2007-04-01 12:46:19 -0700 (Sun, 01 Apr 2007) | 3 lines Fix the test for recreating the locale cache object by not worrying about if one of the test locales cannot be set. ........ r54649 | georg.brandl | 2007-04-01 14:29:15 -0700 (Sun, 01 Apr 2007) | 2 lines Fix a lot of markup and meta-information glitches. ........ r54650 | georg.brandl | 2007-04-01 14:39:52 -0700 (Sun, 01 Apr 2007) | 2 lines Another fix. ........ r54651 | georg.brandl | 2007-04-01 15:39:10 -0700 (Sun, 01 Apr 2007) | 2 lines Lots of explicit class names for method and member descs. ........ r54652 | georg.brandl | 2007-04-01 15:40:12 -0700 (Sun, 01 Apr 2007) | 2 lines Explicit class names. ........ r54653 | georg.brandl | 2007-04-01 15:47:31 -0700 (Sun, 01 Apr 2007) | 2 lines Some semantic fixes. ........ r54654 | georg.brandl | 2007-04-01 16:29:10 -0700 (Sun, 01 Apr 2007) | 2 lines Remove bogus entry. ........ r54655 | georg.brandl | 2007-04-01 16:31:30 -0700 (Sun, 01 Apr 2007) | 2 lines Fix the class name of strings. ........ r54658 | raymond.hettinger | 2007-04-02 10:29:30 -0700 (Mon, 02 Apr 2007) | 1 line SF #1693079: Cannot save empty array in shelve ........ r54663 | raymond.hettinger | 2007-04-02 15:54:21 -0700 (Mon, 02 Apr 2007) | 3 lines Array module's buffer interface can now handle empty arrays. ........ r54664 | guido.van.rossum | 2007-04-02 16:55:37 -0700 (Mon, 02 Apr 2007) | 5 lines Fix warnings about object.__init__() signature. Two (test_array and test_descr) were bug IMO; the third (copy_reg) is a work-around which recognizes that object.__init__() doesn't do anything. ........ r54666 | raymond.hettinger | 2007-04-02 17:02:11 -0700 (Mon, 02 Apr 2007) | 1 line SF 1602378 Clarify docstrings for bisect ........ r54668 | raymond.hettinger | 2007-04-02 18:39:43 -0700 (Mon, 02 Apr 2007) | 3 lines SF #1382213: Tutorial section 9.5.1 ignores MRO for new-style classes ........ r54669 | matthias.klose | 2007-04-02 21:35:59 -0700 (Mon, 02 Apr 2007) | 4 lines - Fix an off-by-one bug in locale.strxfrm(). patch taken from http://bugs.debian.org/416934. ........ r54671 | georg.brandl | 2007-04-03 00:04:27 -0700 (Tue, 03 Apr 2007) | 9 lines Fix the strange case of \begin{methoddesc}[NNTP]{...} where \ifx#1\@undefined ended up comparing N and N, therefore executing the true part of the conditional, blowing up at \@undefined. ........ r54672 | facundo.batista | 2007-04-03 07:05:08 -0700 (Tue, 03 Apr 2007) | 4 lines Now using unittest for the tests infraestructure. Also split the tests in those who need the network, and that who doesn't. ........ r54673 | walter.doerwald | 2007-04-03 09:08:10 -0700 (Tue, 03 Apr 2007) | 4 lines Move the functionality for catching warnings in test_warnings.py into a separate class to that reusing the functionality in test_structmembers.py doesn't rerun the tests from test_warnings.py. ........ r54674 | walter.doerwald | 2007-04-03 09:16:24 -0700 (Tue, 03 Apr 2007) | 2 lines Document that CatchWarningTests is reused by test_structmembers.py. ........ r54675 | walter.doerwald | 2007-04-03 09:53:43 -0700 (Tue, 03 Apr 2007) | 4 lines Add tests for the filename. Test that the stacklevel is handled correctly. ........ r54676 | facundo.batista | 2007-04-03 10:29:48 -0700 (Tue, 03 Apr 2007) | 6 lines Added a SSL server to test_socket_ssl.py to be able to test locally. Now, it checks if have openssl available and run those specific tests (it starts openssl at the beggining of all the tests and then kills it at the end). ........ r54677 | walter.doerwald | 2007-04-03 11:33:29 -0700 (Tue, 03 Apr 2007) | 6 lines Implement a contextmanager test.test_support.catch_warning that can be used to catch the last warning issued by the warning framework. Change test_warnings.py and test_structmembers.py to use this new contextmanager. ........ r54678 | facundo.batista | 2007-04-03 14:15:34 -0700 (Tue, 03 Apr 2007) | 4 lines Changed the whole structure of startup and checking if the server is available. Hope to not get more false alarms. ........ r54681 | facundo.batista | 2007-04-04 07:10:40 -0700 (Wed, 04 Apr 2007) | 4 lines Fixed the way that the .pem files are looked for, and changed how to kill the process in win32 to use the _handle attribute. ........ r54682 | guido.van.rossum | 2007-04-04 10:43:02 -0700 (Wed, 04 Apr 2007) | 4 lines Fix a race condition in this test -- instead of assuming that it will take the test server thread at most 0.5 seconds to get ready, use an event variable. ........ r54683 | collin.winter | 2007-04-04 11:14:17 -0700 (Wed, 04 Apr 2007) | 1 line Clean up imports. ........ r54684 | collin.winter | 2007-04-04 11:16:24 -0700 (Wed, 04 Apr 2007) | 1 line Stop using test_support.verify(). ........ r54685 | martin.v.loewis | 2007-04-04 11:30:36 -0700 (Wed, 04 Apr 2007) | 2 lines Bug #1686475: Support stat'ing open files on Windows again. Will backport to 2.5. ........ r54687 | collin.winter | 2007-04-04 11:33:40 -0700 (Wed, 04 Apr 2007) | 1 line Make test_getopt use unittest. ........ r54688 | collin.winter | 2007-04-04 11:36:30 -0700 (Wed, 04 Apr 2007) | 1 line Make test_softspace use unittest. ........ r54689 | ziga.seilnacht | 2007-04-04 11:38:47 -0700 (Wed, 04 Apr 2007) | 2 lines Fix WalkTests.test_traversal() on Windows. The cleanup in MakedirTests.setUp() can now be removed. ........ r54695 | raymond.hettinger | 2007-04-05 11:00:03 -0700 (Thu, 05 Apr 2007) | 3 lines Bug #1563759: struct.unpack doens't support buffer protocol objects ........ r54697 | collin.winter | 2007-04-05 13:05:07 -0700 (Thu, 05 Apr 2007) | 1 line Convert test_long_future to use unittest. ........ r54698 | collin.winter | 2007-04-05 13:08:56 -0700 (Thu, 05 Apr 2007) | 1 line Convert test_normalization to use unittest. ........ r54699 | andrew.kuchling | 2007-04-05 18:11:58 -0700 (Thu, 05 Apr 2007) | 1 line Some grammar fixes ........ r54704 | collin.winter | 2007-04-06 12:27:40 -0700 (Fri, 06 Apr 2007) | 1 line Convert test_stringprep to use unittest. ........ r54705 | collin.winter | 2007-04-06 12:32:32 -0700 (Fri, 06 Apr 2007) | 1 line Import cleanup in test_crypt. ........ r54706 | collin.winter | 2007-04-06 13:00:05 -0700 (Fri, 06 Apr 2007) | 1 line Convert test_gc to use unittest. ........ r54707 | collin.winter | 2007-04-06 13:03:11 -0700 (Fri, 06 Apr 2007) | 1 line Convert test_module to use unittest. ........ r54711 | collin.winter | 2007-04-06 21:40:43 -0700 (Fri, 06 Apr 2007) | 1 line Convert test_fileinput to use unittest. ........ r54712 | brett.cannon | 2007-04-07 21:29:32 -0700 (Sat, 07 Apr 2007) | 5 lines Doc that file.next() has undefined behaviour when called on a file opened with 'w'. Closes bug #1569057. To be backported once 2.5 branch is unfrozen. ........ r54726 | vinay.sajip | 2007-04-09 09:16:10 -0700 (Mon, 09 Apr 2007) | 1 line Added optional timeout to SocketHandler.makeSocket (SF #1695948) ........ r54727 | ziga.seilnacht | 2007-04-09 12:10:29 -0700 (Mon, 09 Apr 2007) | 3 lines Patch #1695862: remove old test directory that causes test_urllib failures on Windows buildbots. The change is a one time fix and will be removed after a successful buildbot run. ........ r54729 | facundo.batista | 2007-04-09 20:00:37 -0700 (Mon, 09 Apr 2007) | 3 lines Minor fix to the tests pass ok even with -O. ........ r54730 | collin.winter | 2007-04-09 21:44:49 -0700 (Mon, 09 Apr 2007) | 1 line Typo fix. ........ r54732 | facundo.batista | 2007-04-10 05:58:45 -0700 (Tue, 10 Apr 2007) | 5 lines General clean-up. Lot of margin corrections, comments, some typos. Exceptions now are raised in the new style. And a mockup class is now also new style. Thanks Santiago Pereson. ........ r54741 | georg.brandl | 2007-04-10 14:39:38 -0700 (Tue, 10 Apr 2007) | 2 lines Repair a duplicate label and some obsolete uses of \setindexsubitem. ........ r54746 | andrew.kuchling | 2007-04-11 06:39:00 -0700 (Wed, 11 Apr 2007) | 1 line Add window.chgat() method, submitted via e-mail by Fabian Kreutz ........ r54747 | andrew.kuchling | 2007-04-11 06:42:25 -0700 (Wed, 11 Apr 2007) | 1 line Point readers at the patch submission instructions ........ r54748 | andrew.kuchling | 2007-04-11 06:47:13 -0700 (Wed, 11 Apr 2007) | 1 line Describe undocumented third argument to touchline() ........ r54757 | georg.brandl | 2007-04-11 10:16:24 -0700 (Wed, 11 Apr 2007) | 3 lines Add some missing NULL checks which trigger crashes on low-memory conditions. Found by Victor Stinner. Will backport when 2.5 branch is unfrozen. ........ r54760 | raymond.hettinger | 2007-04-11 11:40:58 -0700 (Wed, 11 Apr 2007) | 1 line SF 1191699: Make slices picklable ........ r54762 | georg.brandl | 2007-04-11 12:25:11 -0700 (Wed, 11 Apr 2007) | 2 lines Exceptions are no longer old-style instances. Fix accordingly. ........ r54763 | georg.brandl | 2007-04-11 16:28:44 -0700 (Wed, 11 Apr 2007) | 2 lines Repair missing spaces after \UNIX. ........ r54772 | raymond.hettinger | 2007-04-11 21:10:00 -0700 (Wed, 11 Apr 2007) | 1 line SF 1193128: Let str.translate(None) be an identity transformation ........ r54784 | georg.brandl | 2007-04-12 00:01:19 -0700 (Thu, 12 Apr 2007) | 2 lines Patch #1698951: clarify deprecation message in rexec and Bastion ........ r54785 | ziga.seilnacht | 2007-04-12 01:46:51 -0700 (Thu, 12 Apr 2007) | 2 lines Patch #1695862: remove the cleanup code, now that Windows buildbots are green again. ........ r54786 | walter.doerwald | 2007-04-12 03:35:00 -0700 (Thu, 12 Apr 2007) | 3 lines Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the first chunk fed to the decoder started with a BOM, but was longer than 3 bytes. ........ r54807 | barry.warsaw | 2007-04-13 11:47:14 -0700 (Fri, 13 Apr 2007) | 8 lines Port r54805 from python25-maint branch: Add code to read from master_fd in the parent, breaking when we get an OSError (EIO can occur on Linux) or there's no more data to read. Without this, test_pty.py can hang on the waitpid() because the child is blocking on the stdout write. This will definitely happen on Mac OS X and could potentially happen on other platforms. See the comment for details. ........ r54812 | kristjan.jonsson | 2007-04-13 15:07:33 -0700 (Fri, 13 Apr 2007) | 1 line Fix a bug when using the __lltrace__ opcode tracer, and a problem sith signed chars in frameobject.c which can occur with opcodes > 127 ........ r54814 | kristjan.jonsson | 2007-04-13 15:20:13 -0700 (Fri, 13 Apr 2007) | 1 line Fix potential crash in path manipulation on windows ........ r54816 | trent.mick | 2007-04-13 16:22:05 -0700 (Fri, 13 Apr 2007) | 4 lines Add the necessary dependency for the Windows VC6 build to ensure 'pythoncore' is built before '_ctypes' is attempted. Will backport to 2.5 once it is unfrozen for 2.5.1. ........ r54825 | neal.norwitz | 2007-04-13 22:25:50 -0700 (Fri, 13 Apr 2007) | 3 lines When __slots__ are set to a unicode string, make it work the same as setting a plain string, ie don't expand to single letter identifiers. ........ r54841 | neal.norwitz | 2007-04-16 00:37:55 -0700 (Mon, 16 Apr 2007) | 1 line SF #1701207, Fix bogus assertion (and test it!) ........ r54844 | collin.winter | 2007-04-16 15:10:32 -0700 (Mon, 16 Apr 2007) | 1 line Check the availability of the urlfetch resource earlier than before. ........ r54849 | martin.v.loewis | 2007-04-16 22:02:01 -0700 (Mon, 16 Apr 2007) | 2 lines Add Travis Oliphant. ........ r54873 | brett.cannon | 2007-04-18 20:44:17 -0700 (Wed, 18 Apr 2007) | 2 lines Silence a compiler warning about incompatible pointer types. ........ r54874 | neal.norwitz | 2007-04-18 22:52:37 -0700 (Wed, 18 Apr 2007) | 2 lines SF #1703270, add missing declaration in readline.c to avoid compiler warning. ........ r54875 | armin.rigo | 2007-04-19 07:44:48 -0700 (Thu, 19 Apr 2007) | 8 lines Revert r53997 as per http://mail.python.org/pipermail/python-dev/2007-March/071796.html . I've kept a couple of still-valid extra tests in test_descr, but didn't bother to sort through the new comments and refactorings added in r53997 to see if some of them could be kept. If so, they could go in a follow-up check-in. ........ r54876 | armin.rigo | 2007-04-19 07:56:48 -0700 (Thu, 19 Apr 2007) | 2 lines Fix a usage of the dangerous pattern decref - modify field - incref. ........ r54884 | neal.norwitz | 2007-04-19 22:20:38 -0700 (Thu, 19 Apr 2007) | 9 lines Add an optional address to copy the failure mails to. Detect a conflict in the only file that should have outstanding changes when this script is run. This doesn't matter on the trunk, but does when run on a branch. Trunk always has the date set to today in boilerplate.tex. Each time a release is cut with a different date, a conflict occurs. (We could copy a known good version, but then we would lose changes to this file.) ........ r54918 | georg.brandl | 2007-04-21 13:35:38 -0700 (Sat, 21 Apr 2007) | 3 lines Bug #1704790: bind name "sys" locally in __del__ method so that it is not cleared before __del__ is run. ........ r54920 | facundo.batista | 2007-04-21 18:18:56 -0700 (Sat, 21 Apr 2007) | 5 lines Added tests for other methods of SSL object. Now we cover all the object methods. This is the final step to close the #451607 bug. ........ r54927 | facundo.batista | 2007-04-23 10:08:31 -0700 (Mon, 23 Apr 2007) | 5 lines As specified in RFC 2616, 2xx code indicates that the client's request was successfully received, understood, and accepted. Now in these cases no error is raised. Also fixed tests. ........ r54929 | collin.winter | 2007-04-23 20:43:46 -0700 (Mon, 23 Apr 2007) | 1 line Convert PyUnit -> unittest. ........ r54931 | collin.winter | 2007-04-23 21:09:52 -0700 (Mon, 23 Apr 2007) | 1 line Remove code that hasn't been called in years. ........ r54932 | neal.norwitz | 2007-04-23 21:53:12 -0700 (Mon, 23 Apr 2007) | 1 line Fix SF #1703110, Incorrect example for add_password() (use uri, not host) ........ r54934 | georg.brandl | 2007-04-24 03:36:42 -0700 (Tue, 24 Apr 2007) | 2 lines Some new year updates. ........ r54938 | facundo.batista | 2007-04-24 06:54:38 -0700 (Tue, 24 Apr 2007) | 4 lines Added a comment about last change in urllib2.py (all 2xx responses are ok now). ........ r54939 | georg.brandl | 2007-04-24 08:10:09 -0700 (Tue, 24 Apr 2007) | 2 lines Bug #1705717: error in sys.argv docs. ........ r54941 | georg.brandl | 2007-04-24 08:27:13 -0700 (Tue, 24 Apr 2007) | 4 lines Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file (as opposed to the command line) will now write file names ending in ".cpp" too. ........ r54944 | raymond.hettinger | 2007-04-24 15:13:43 -0700 (Tue, 24 Apr 2007) | 1 line Fix markup ........ r54945 | kristjan.jonsson | 2007-04-24 17:10:50 -0700 (Tue, 24 Apr 2007) | 1 line Merge change 54909 from release25-maint: Fix several minor issues discovered using code analysis in VisualStudio 2005 Team Edition ........ r54947 | kristjan.jonsson | 2007-04-24 17:17:39 -0700 (Tue, 24 Apr 2007) | 1 line Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h ........ r54948 | kristjan.jonsson | 2007-04-24 17:19:26 -0700 (Tue, 24 Apr 2007) | 1 line Remove obsolete comment. Importing of .dll files has been discontinued, only .pyd files supported on windows now. ........ r54949 | georg.brandl | 2007-04-24 23:24:59 -0700 (Tue, 24 Apr 2007) | 2 lines Patch #1698768: updated the "using Python on the Mac" intro. ........ r54951 | georg.brandl | 2007-04-24 23:25:55 -0700 (Tue, 24 Apr 2007) | 2 lines Markup fix. ........ r54953 | neal.norwitz | 2007-04-24 23:30:05 -0700 (Tue, 24 Apr 2007) | 3 lines Whitespace normalization. Ugh, we really need to do this more often. You might want to review this change as it's my first time. Be gentle. :-) ........ r54956 | collin.winter | 2007-04-25 10:29:52 -0700 (Wed, 25 Apr 2007) | 1 line Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule(). ........ r54957 | collin.winter | 2007-04-25 10:37:35 -0700 (Wed, 25 Apr 2007) | 1 line Remove functionality from test_datetime.test_main() that does reference count checking; 'regrtest.py -R' is the way to do this kind of testing. ........ r54958 | collin.winter | 2007-04-25 10:57:53 -0700 (Wed, 25 Apr 2007) | 1 line Change test_support.have_unicode to use True/False instead of 1/0. ........ r54959 | tim.peters | 2007-04-25 11:47:18 -0700 (Wed, 25 Apr 2007) | 2 lines Whitespace normalization. ........ r54960 | tim.peters | 2007-04-25 11:48:35 -0700 (Wed, 25 Apr 2007) | 2 lines Set missing svn:eol-style property on text files. ........ r54961 | collin.winter | 2007-04-25 11:54:36 -0700 (Wed, 25 Apr 2007) | 1 line Import and raise statement cleanup. ........ r54969 | collin.winter | 2007-04-25 13:41:34 -0700 (Wed, 25 Apr 2007) | 1 line Convert test_ossaudiodev to use unittest. ........ r54974 | collin.winter | 2007-04-25 14:50:25 -0700 (Wed, 25 Apr 2007) | 1 line Fix an issue related to the unittest conversion. ........ r54979 | fred.drake | 2007-04-25 21:42:19 -0700 (Wed, 25 Apr 2007) | 1 line fix some markup errors ........ r54982 | kristjan.jonsson | 2007-04-26 02:15:08 -0700 (Thu, 26 Apr 2007) | 1 line Export function sanitize_the_mode from fileobject.c as _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile. ........ r54983 | kristjan.jonsson | 2007-04-26 06:44:16 -0700 (Thu, 26 Apr 2007) | 1 line The locale "En" appears not to be valid on windows underi VisualStudio.2005. Added "English" to the test_locale.py to make the testsuite pass for that build ........ r54984 | steve.holden | 2007-04-26 07:23:12 -0700 (Thu, 26 Apr 2007) | 1 line Minor wording change on slicing aide-memoire. ........ r54985 | kristjan.jonsson | 2007-04-26 08:24:54 -0700 (Thu, 26 Apr 2007) | 1 line Accomodate 64 bit time_t in the _bsddb module. ........ --- __init__.py | 2 +- command/build_ext.py | 7 ++++--- msvccompiler.py | 16 +++++++++++++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index 21d34c767b..86ad44fe3a 100644 --- a/__init__.py +++ b/__init__.py @@ -20,4 +20,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.0" +__version__ = "2.5.1" diff --git a/command/build_ext.py b/command/build_ext.py index d0cd16293b..2832d5717b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -186,7 +186,7 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': - if sys.executable.find(sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -199,7 +199,7 @@ def finalize_options (self): # Python's library directory must be appended to library_dirs if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if sys.executable.find(sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: @@ -533,7 +533,8 @@ def swig_sources (self, sources, extension): if self.swig_cpp: log.warn("--swig-cpp is deprecated - use --swig-opts=-c++") - if self.swig_cpp or ('-c++' in self.swig_opts): + if self.swig_cpp or ('-c++' in self.swig_opts) or \ + ('-c++' in extension.swig_opts): target_ext = '.cpp' else: target_ext = '.c' diff --git a/msvccompiler.py b/msvccompiler.py index ca1feaa088..07c76f1838 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -187,6 +187,19 @@ def get_build_architecture(): j = sys.version.find(")", i) return sys.version[i+len(prefix):j] +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths class MSVCCompiler (CCompiler) : @@ -270,7 +283,8 @@ def initialize(self): self.__paths.append(p) except KeyError: pass - os.environ['path'] = ';'.join(self.__paths) + self.__paths = normalize_and_reduce_paths(self.__paths) + os.environ['path'] = ";".join(self.__paths) self.preprocess_options = None if self.__arch == "Intel": From 3bf5ce40cfaf14aa42593b4c4e5c28338c31633a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 27 Apr 2007 23:53:51 +0000 Subject: [PATCH 1874/8469] Checkpoint. Manipulated things so that string literals are always unicode, and a few other compensating changes, e.g. str <- unicode, chr <- unichr, and repr() of a unicode string no longer starts with 'u'. Lots of unit tests are broken, but some basic things work, in particular distutils works so the extensions can be built, and test_builtin.py works. --- ccompiler.py | 12 ++++++------ cmd.py | 9 ++++----- command/build_clib.py | 4 ++-- command/build_ext.py | 10 +++++----- command/build_py.py | 2 +- command/config.py | 8 ++++---- command/install.py | 2 +- command/install_data.py | 3 +-- dir_util.py | 2 +- dist.py | 6 +++--- extension.py | 4 ++-- fancy_getopt.py | 4 ++-- filelist.py | 2 +- unixccompiler.py | 4 ++-- 14 files changed, 35 insertions(+), 37 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 25d90c8a9a..50905c1d44 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -168,7 +168,7 @@ class (via the 'executables' class attribute), but most will have: # set_executables () def set_executable(self, key, value): - if type(value) is StringType: + if isinstance(value, basestring): setattr(self, key, split_quoted(value)) else: setattr(self, key, value) @@ -193,8 +193,8 @@ def _check_macro_definitions (self, definitions): if not (type (defn) is TupleType and (len (defn) == 1 or (len (defn) == 2 and - (type (defn[1]) is StringType or defn[1] is None))) and - type (defn[0]) is StringType): + (isinstance (defn[1], basestring) or defn[1] is None))) and + isinstance (defn[0], basestring)): raise TypeError, \ ("invalid macro definition '%s': " % defn) + \ "must be tuple (string,), (string, string), or " + \ @@ -344,7 +344,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, """ if outdir is None: outdir = self.output_dir - elif type(outdir) is not StringType: + elif not isinstance(outdir, basestring): raise TypeError, "'output_dir' must be a string or None" if macros is None: @@ -442,7 +442,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): """ if output_dir is None: output_dir = self.output_dir - elif type (output_dir) is not StringType: + elif not isinstance(output_dir, basestring): raise TypeError, "'output_dir' must be a string or None" if macros is None: @@ -527,7 +527,7 @@ def _fix_object_args (self, objects, output_dir): if output_dir is None: output_dir = self.output_dir - elif type (output_dir) is not StringType: + elif not isinstance(output_dir, basestring): raise TypeError, "'output_dir' must be a string or None" return (objects, output_dir) diff --git a/cmd.py b/cmd.py index ebd99310ea..ea3799af16 100644 --- a/cmd.py +++ b/cmd.py @@ -222,7 +222,7 @@ def _ensure_stringlike (self, option, what, default=None): if val is None: setattr(self, option, default) return default - elif type(val) is not StringType: + elif not isinstance(val, basestring): raise DistutilsOptionError, \ "'%s' must be a %s (got `%s`)" % (option, what, val) return val @@ -242,12 +242,11 @@ def ensure_string_list (self, option): val = getattr(self, option) if val is None: return - elif type(val) is StringType: + elif isinstance(val, basestring): setattr(self, option, re.split(r',\s*|\s+', val)) else: if type(val) is ListType: - types = map(type, val) - ok = (types == [StringType] * len(val)) + ok = all(isinstance(v, basestring) for v in val) else: ok = 0 @@ -421,7 +420,7 @@ def make_file (self, infiles, outfile, func, args, # Allow 'infiles' to be a single string - if type(infiles) is StringType: + if isinstance(infiles, basestring): infiles = (infiles,) elif type(infiles) not in (ListType, TupleType): raise TypeError, \ diff --git a/command/build_clib.py b/command/build_clib.py index 07f5817986..5434e86c86 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -92,7 +92,7 @@ def finalize_options (self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type(self.include_dirs) is StringType: + if isinstance(self.include_dirs, basestring): self.include_dirs = self.include_dirs.split(os.pathsep) # XXX same as for build_ext -- what about 'self.define' and @@ -147,7 +147,7 @@ def check_library_list (self, libraries): raise DistutilsSetupError, \ "each element of 'libraries' must a 2-tuple" - if type(lib[0]) is not StringType: + if isinstance(lib[0], basestring) StringType: raise DistutilsSetupError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" diff --git a/command/build_ext.py b/command/build_ext.py index 2832d5717b..0236a26835 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -137,7 +137,7 @@ def finalize_options (self): plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type(self.include_dirs) is StringType: + if isinstance(self.include_dirs, basestring): self.include_dirs = self.include_dirs.split(os.pathsep) # Put the Python "system" include dir at the end, so that @@ -146,7 +146,7 @@ def finalize_options (self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if type(self.libraries) is StringType: + if isinstance(self.libraries, basestring): self.libraries = [self.libraries] # Life is easier if we're not forever checking for None, so @@ -155,12 +155,12 @@ def finalize_options (self): self.libraries = [] if self.library_dirs is None: self.library_dirs = [] - elif type(self.library_dirs) is StringType: + elif isinstance(self.library_dirs, basestring): self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] - elif type(self.rpath) is StringType: + elif isinstance(self.rpath, basestring): self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories @@ -321,7 +321,7 @@ def check_extensions_list (self, extensions): ("each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") - if not (type(ext_name) is StringType and + if not (isinstance(ext_name, basestring) and extension_name_re.match(ext_name)): raise DistutilsSetupError, \ ("first element of each tuple in 'ext_modules' " diff --git a/command/build_py.py b/command/build_py.py index 990824bdff..52534bdb47 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -361,7 +361,7 @@ def get_outputs (self, include_bytecode=1): def build_module (self, module, module_file, package): - if type(package) is StringType: + if isinstance(package, basestring): package = package.split('.') elif type(package) not in (ListType, TupleType): raise TypeError, \ diff --git a/command/config.py b/command/config.py index 3374db9e66..04cfcde736 100644 --- a/command/config.py +++ b/command/config.py @@ -73,17 +73,17 @@ def initialize_options (self): def finalize_options (self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - elif type(self.include_dirs) is StringType: + elif isinstance(self.include_dirs, basestring): self.include_dirs = self.include_dirs.split(os.pathsep) if self.libraries is None: self.libraries = [] - elif type(self.libraries) is StringType: + elif isinstance(self.libraries, basestring): self.libraries = [self.libraries] if self.library_dirs is None: self.library_dirs = [] - elif type(self.library_dirs) is StringType: + elif isinstance(self.library_dirs, basestring): self.library_dirs = self.library_dirs.split(os.pathsep) @@ -212,7 +212,7 @@ def search_cpp (self, pattern, body=None, self._check_compiler() (src, out) = self._preprocess(body, headers, include_dirs, lang) - if type(pattern) is StringType: + if isinstance(pattern, basestring): pattern = re.compile(pattern) file = open(out) diff --git a/command/install.py b/command/install.py index c03a90e82c..cc92e96368 100644 --- a/command/install.py +++ b/command/install.py @@ -463,7 +463,7 @@ def handle_extra_path (self): self.extra_path = self.distribution.extra_path if self.extra_path is not None: - if type(self.extra_path) is StringType: + if isinstance(self.extra_path, basestring): self.extra_path = self.extra_path.split(',') if len(self.extra_path) == 1: diff --git a/command/install_data.py b/command/install_data.py index 1069830fb3..a95194426b 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -10,7 +10,6 @@ __revision__ = "$Id$" import os -from types import StringType from distutils.core import Command from distutils.util import change_root, convert_path @@ -48,7 +47,7 @@ def finalize_options (self): def run (self): self.mkpath(self.install_dir) for f in self.data_files: - if type(f) is StringType: + if isinstance(f, basestring): # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: diff --git a/dir_util.py b/dir_util.py index 398f242974..c6f014b260 100644 --- a/dir_util.py +++ b/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if not isinstance(name, StringTypes): + if not isinstance(name, basestring): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) diff --git a/dist.py b/dist.py index 7ed1b5cf2c..89390fb2c5 100644 --- a/dist.py +++ b/dist.py @@ -598,13 +598,13 @@ def finalize_options (self): keywords = self.metadata.keywords if keywords is not None: - if type(keywords) is StringType: + if isinstance(keywords, basestring): keywordlist = keywords.split(',') self.metadata.keywords = [x.strip() for x in keywordlist] platforms = self.metadata.platforms if platforms is not None: - if type(platforms) is StringType: + if isinstance(platforms, basestring): platformlist = platforms.split(',') self.metadata.platforms = [x.strip() for x in platformlist] @@ -906,7 +906,7 @@ def _set_command_options (self, command_obj, option_dict=None): neg_opt = {} try: - is_string = type(value) is StringType + is_string = isinstance(value, basestring) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: diff --git a/extension.py b/extension.py index 0fcbcc141a..7fe846b8a8 100644 --- a/extension.py +++ b/extension.py @@ -103,9 +103,9 @@ def __init__ (self, name, sources, language=None, **kw # To catch unknown keywords ): - assert type(name) is StringType, "'name' must be a string" + assert isinstance(name, basestring), "'name' must be a string" assert (type(sources) is ListType and - map(type, sources) == [StringType]*len(sources)), \ + all(isinstance(v, basestring) for v in sources)), \ "'sources' must be a list of strings" self.name = name diff --git a/fancy_getopt.py b/fancy_getopt.py index 317a3a4860..82e1f4d1dc 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -166,13 +166,13 @@ def _grok_option_table (self): raise ValueError, "invalid option tuple: %r" % (option,) # Type- and value-check the option names - if type(long) is not StringType or len(long) < 2: + if not isinstance(long, basestring) or len(long) < 2: raise DistutilsGetoptError, \ ("invalid long option '%s': " "must be a string of length >= 2") % long if (not ((short is None) or - (type(short) is StringType and len(short) == 1))): + (isinstance(short, basestring) and len(short) == 1))): raise DistutilsGetoptError, \ ("invalid short option '%s': " "must a single character or None") % short diff --git a/filelist.py b/filelist.py index bc668cfad3..a0523531c7 100644 --- a/filelist.py +++ b/filelist.py @@ -333,7 +333,7 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): or just returned as-is (assumes it's a regex object). """ if is_regex: - if type(pattern) is StringType: + if isinstance(pattern, basestring): return re.compile(pattern) else: return pattern diff --git a/unixccompiler.py b/unixccompiler.py index 0795f1206d..a42ab5ed42 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -16,7 +16,7 @@ __revision__ = "$Id$" import os, sys -from types import StringType, NoneType +from types import NoneType from copy import copy from distutils import sysconfig @@ -212,7 +212,7 @@ def link(self, target_desc, objects, lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) - if type(output_dir) not in (StringType, NoneType): + if not isinstance(output_dir, (basestring, NoneType)): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) From 74aa5c74dd3dda2d8f3fef3c83107f3e006d724c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 2 May 2007 19:09:54 +0000 Subject: [PATCH 1875/8469] Rip out all the u"..." literals and calls to unicode(). --- command/bdist_wininst.py | 4 ++-- command/build_clib.py | 2 +- command/register.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 21465a82ff..5074a1a675 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -247,11 +247,11 @@ def create_exe (self, arcname, fullname, bitmap=None): # Convert cfgdata from unicode to ascii, mbcs encoded try: - unicode + str except NameError: pass else: - if isinstance(cfgdata, unicode): + if isinstance(cfgdata, str): cfgdata = cfgdata.encode("mbcs") # Append the pre-install script diff --git a/command/build_clib.py b/command/build_clib.py index 5434e86c86..bdf98bf3f2 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -147,7 +147,7 @@ def check_library_list (self, libraries): raise DistutilsSetupError, \ "each element of 'libraries' must a 2-tuple" - if isinstance(lib[0], basestring) StringType: + if isinstance(lib[0], basestring): raise DistutilsSetupError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" diff --git a/command/register.py b/command/register.py index 33567981bb..2ddabadf88 100644 --- a/command/register.py +++ b/command/register.py @@ -259,7 +259,7 @@ def post_to_server(self, data, auth=None): if type(value) not in (type([]), type( () )): value = [value] for value in value: - value = unicode(value).encode("utf-8") + value = str(value).encode("utf-8") body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") From b6944798d4c6fe91c594c4e64ef13820f0c1b266 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 7 May 2007 22:24:25 +0000 Subject: [PATCH 1876/8469] Merged revisions 55007-55179 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines Use the new print syntax, at least. ........ r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line remove old cruftiness ........ r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line make this work with the new Python ........ r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line Get asdl code gen working with Python 2.3. Should continue to work with 3.0 ........ r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line Verify checkins to p3yk (sic) branch go to 3000 list. ........ r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line Fix this test so it runs again by importing warnings_test properly. ........ r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines So long xrange. range() now supports values that are outside -sys.maxint to sys.maxint. floats raise a TypeError. This has been sitting for a long time. It probably has some problems and needs cleanup. Objects/rangeobject.c now uses 4-space indents since it is almost completely new. ........ r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines Fix two tests that were previously depending on significant spaces at the end of a line (and before that on Python 2.x print behavior that has no exact equivalent in 3.0). ........ --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index cc92e96368..a6543ba6a2 100644 --- a/command/install.py +++ b/command/install.py @@ -517,7 +517,7 @@ def run (self): outputs = self.get_outputs() if self.root: # strip any package prefix root_len = len(self.root) - for counter in xrange(len(outputs)): + for counter in range(len(outputs)): outputs[counter] = outputs[counter][root_len:] self.execute(write_file, (self.record, outputs), From 0a68cc8e653759fd3913f2bcbc85eeffbb02f194 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 22 May 2007 18:11:13 +0000 Subject: [PATCH 1877/8469] Merged revisions 55407-55513 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r55413 | fred.drake | 2007-05-17 12:30:10 -0700 (Thu, 17 May 2007) | 1 line fix argument name in documentation; match the implementation ................ r55430 | jack.diederich | 2007-05-18 06:39:59 -0700 (Fri, 18 May 2007) | 1 line Implements class decorators, PEP 3129. ................ r55432 | guido.van.rossum | 2007-05-18 08:09:41 -0700 (Fri, 18 May 2007) | 2 lines obsubmit. ................ r55434 | guido.van.rossum | 2007-05-18 09:39:10 -0700 (Fri, 18 May 2007) | 3 lines Fix bug in test_inspect. (I presume this is how it should be fixed; Jack Diedrich, please verify.) ................ r55460 | brett.cannon | 2007-05-20 00:31:57 -0700 (Sun, 20 May 2007) | 4 lines Remove the imageop module. With imgfile already removed in Python 3.0 and rgbimg gone in Python 2.6 the unit tests themselves were made worthless. Plus third-party libraries perform the same function much better. ................ r55469 | neal.norwitz | 2007-05-20 11:28:20 -0700 (Sun, 20 May 2007) | 118 lines Merged revisions 55324-55467 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55348 | georg.brandl | 2007-05-15 13:19:34 -0700 (Tue, 15 May 2007) | 4 lines HTML-escape the plain traceback in cgitb's HTML output, to prevent the traceback inadvertently or maliciously closing the comment and injecting HTML into the error page. ........ r55372 | neal.norwitz | 2007-05-15 21:33:50 -0700 (Tue, 15 May 2007) | 6 lines Port rev 55353 from Guido: Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC() fails. Will backport. ........ r55377 | neal.norwitz | 2007-05-15 22:06:33 -0700 (Tue, 15 May 2007) | 1 line Mention removal of some directories for obsolete platforms ........ r55380 | brett.cannon | 2007-05-15 22:50:03 -0700 (Tue, 15 May 2007) | 2 lines Change the maintainer of the BeOS port. ........ r55383 | georg.brandl | 2007-05-16 06:44:18 -0700 (Wed, 16 May 2007) | 2 lines Bug #1719995: don't use deprecated method in sets example. ........ r55386 | neal.norwitz | 2007-05-16 13:05:11 -0700 (Wed, 16 May 2007) | 5 lines Fix bug in marshal where bad data would cause a segfault due to lack of an infinite recursion check. Contributed by Damien Miller at Google. ........ r55389 | brett.cannon | 2007-05-16 15:42:29 -0700 (Wed, 16 May 2007) | 6 lines Remove the gopherlib module. It has been raising a DeprecationWarning since Python 2.5. Also remove gopher support from urllib/urllib2. As both imported gopherlib the usage of the support would have raised a DeprecationWarning. ........ r55394 | raymond.hettinger | 2007-05-16 18:08:04 -0700 (Wed, 16 May 2007) | 1 line calendar.py gets no benefit from xrange() instead of range() ........ r55395 | brett.cannon | 2007-05-16 19:02:56 -0700 (Wed, 16 May 2007) | 3 lines Complete deprecation of BaseException.message. Some subclasses were directly accessing the message attribute instead of using the descriptor. ........ r55396 | neal.norwitz | 2007-05-16 23:11:36 -0700 (Wed, 16 May 2007) | 4 lines Reduce the max stack depth to see if this fixes the segfaults on Windows and some other boxes. If this is successful, this rev should be backported. I'm not sure how close to the limit we should push this. ........ r55397 | neal.norwitz | 2007-05-16 23:23:50 -0700 (Wed, 16 May 2007) | 4 lines Set the depth to something very small to try to determine if the crashes on Windows are really due to the stack size or possibly some other problem. ........ r55398 | neal.norwitz | 2007-05-17 00:04:46 -0700 (Thu, 17 May 2007) | 4 lines Last try for tweaking the max stack depth. 5000 was the original value, 4000 didn't work either. 1000 does work on Windows. If 2000 works, that will hopefully be a reasonable balance. ........ r55412 | fred.drake | 2007-05-17 12:29:58 -0700 (Thu, 17 May 2007) | 1 line fix argument name in documentation; match the implementation ........ r55427 | neal.norwitz | 2007-05-17 22:47:16 -0700 (Thu, 17 May 2007) | 1 line Verify neither dumps or loads overflow the stack and segfault. ........ r55446 | collin.winter | 2007-05-18 16:11:24 -0700 (Fri, 18 May 2007) | 1 line Backport PEP 3110's new 'except' syntax to 2.6. ........ r55448 | raymond.hettinger | 2007-05-18 18:11:16 -0700 (Fri, 18 May 2007) | 1 line Improvements to NamedTuple's implementation, tests, and documentation ........ r55449 | raymond.hettinger | 2007-05-18 18:50:11 -0700 (Fri, 18 May 2007) | 1 line Fix beginner mistake -- don't mix spaces and tabs. ........ r55450 | neal.norwitz | 2007-05-18 20:48:47 -0700 (Fri, 18 May 2007) | 1 line Clear data so random memory does not get freed. Will backport. ........ r55452 | neal.norwitz | 2007-05-18 21:34:55 -0700 (Fri, 18 May 2007) | 3 lines Whoops, need to pay attention to those test failures. Move the clear to *before* the first use, not after. ........ r55453 | neal.norwitz | 2007-05-18 21:35:52 -0700 (Fri, 18 May 2007) | 1 line Give some clue as to what happened if the test fails. ........ r55455 | georg.brandl | 2007-05-19 11:09:26 -0700 (Sat, 19 May 2007) | 2 lines Fix docstring for add_package in site.py. ........ r55458 | brett.cannon | 2007-05-20 00:09:50 -0700 (Sun, 20 May 2007) | 2 lines Remove the rgbimg module. It has been deprecated since Python 2.5. ........ r55465 | nick.coghlan | 2007-05-20 04:12:49 -0700 (Sun, 20 May 2007) | 1 line Fix typo in example (should be backported, but my maintenance branch is woefully out of date) ........ ................ r55472 | brett.cannon | 2007-05-20 12:06:18 -0700 (Sun, 20 May 2007) | 2 lines Remove imageop from the Windows build process. ................ r55486 | neal.norwitz | 2007-05-20 23:59:52 -0700 (Sun, 20 May 2007) | 1 line Remove callable() builtin ................ r55506 | neal.norwitz | 2007-05-22 00:43:29 -0700 (Tue, 22 May 2007) | 78 lines Merged revisions 55468-55505 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55468 | neal.norwitz | 2007-05-20 11:06:27 -0700 (Sun, 20 May 2007) | 1 line rotor is long gone. ........ r55470 | neal.norwitz | 2007-05-20 11:43:00 -0700 (Sun, 20 May 2007) | 1 line Update directories/files at the top-level. ........ r55471 | brett.cannon | 2007-05-20 12:05:06 -0700 (Sun, 20 May 2007) | 2 lines Try to remove rgbimg from Windows builds. ........ r55474 | brett.cannon | 2007-05-20 16:17:38 -0700 (Sun, 20 May 2007) | 4 lines Remove the macfs module. This led to the deprecation of macostools.touched(); it completely relied on macfs and is a no-op on OS X according to code comments. ........ r55476 | brett.cannon | 2007-05-20 16:56:18 -0700 (Sun, 20 May 2007) | 3 lines Move imgfile import to the global namespace to trigger an import error ASAP to prevent creation of a test file. ........ r55477 | brett.cannon | 2007-05-20 16:57:38 -0700 (Sun, 20 May 2007) | 3 lines Cause posixfile to raise a DeprecationWarning. Documented as deprecated since Ptyhon 1.5. ........ r55479 | andrew.kuchling | 2007-05-20 17:03:15 -0700 (Sun, 20 May 2007) | 1 line Note removed modules ........ r55481 | martin.v.loewis | 2007-05-20 21:35:47 -0700 (Sun, 20 May 2007) | 2 lines Add Alexandre Vassalotti. ........ r55482 | george.yoshida | 2007-05-20 21:41:21 -0700 (Sun, 20 May 2007) | 4 lines fix against r55474 [Remove the macfs module] Remove "libmacfs.tex" from Makefile.deps and mac/mac.tex. ........ r55487 | raymond.hettinger | 2007-05-21 01:13:35 -0700 (Mon, 21 May 2007) | 1 line Replace assertion with straight error-checking. ........ r55489 | raymond.hettinger | 2007-05-21 09:40:10 -0700 (Mon, 21 May 2007) | 1 line Allow all alphanumeric and underscores in type and field names. ........ r55490 | facundo.batista | 2007-05-21 10:32:32 -0700 (Mon, 21 May 2007) | 5 lines Added timeout support to HTTPSConnection, through the socket.create_connection function. Also added a small test for this, and updated NEWS file. ........ r55495 | georg.brandl | 2007-05-21 13:34:16 -0700 (Mon, 21 May 2007) | 2 lines Patch #1686487: you can now pass any mapping after '**' in function calls. ........ r55502 | neal.norwitz | 2007-05-21 23:03:36 -0700 (Mon, 21 May 2007) | 1 line Document new params to HTTPSConnection ........ r55504 | neal.norwitz | 2007-05-22 00:16:10 -0700 (Tue, 22 May 2007) | 1 line Stop using METH_OLDARGS ........ r55505 | neal.norwitz | 2007-05-22 00:16:44 -0700 (Tue, 22 May 2007) | 1 line Stop using METH_OLDARGS implicitly ........ ................ --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 89390fb2c5..e89d942f15 100644 --- a/dist.py +++ b/dist.py @@ -569,7 +569,7 @@ def _parse_command_opts (self, parser, args): #print "showing help for option %s of command %s" % \ # (help_option[0],cmd_class) - if callable(func): + if hasattr(func, '__call__'): func() else: raise DistutilsClassError( From 846a6d17bc1356201efb984e23caafff578982f4 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 25 May 2007 18:39:29 +0000 Subject: [PATCH 1878/8469] Minimal fixes to save the bootstrap on OSX. --- sysconfig.py | 3 ++- text_file.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index ea2e059778..51f23a24a5 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -11,6 +11,7 @@ __revision__ = "$Id$" +import io import os import re import sys @@ -353,7 +354,7 @@ def _init_posix(): # load the installed pyconfig.h: try: filename = get_config_h_filename() - parse_config_h(open(filename), g) + parse_config_h(io.open(filename), g) except IOError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): diff --git a/text_file.py b/text_file.py index c23a31dd9c..9d4d42b4c6 100644 --- a/text_file.py +++ b/text_file.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" from types import * -import sys, os +import sys, os, io class TextFile: @@ -34,7 +34,7 @@ class TextFile: something that provides 'readline()' and 'close()' methods). It is recommended that you supply at least 'filename', so that TextFile can include it in warning messages. If 'file' is not supplied, - TextFile creates its own using the 'open()' builtin. + TextFile creates its own using 'io.open()'. The options are all boolean, and affect the value returned by 'readline()': @@ -118,7 +118,7 @@ def open (self, filename): 'filename' and 'file' arguments to the constructor.""" self.filename = filename - self.file = open (self.filename, 'r') + self.file = io.open (self.filename, 'r') self.current_line = 0 From 6d3419303b176f1986ec06a1421452f227a839c1 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 1 Jun 2007 07:29:12 +0000 Subject: [PATCH 1879/8469] SF 1668596/1720897: distutils now copies data files even if package_dir is empty. This needs to be backported. I'm too tired tonight. It would be great if someone backports this if the buildbots are ok with it. Otherwise, I will try to get to it tomorrow. --- command/build_py.py | 4 +++- tests/test_build_py.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 621bcb4af3..b9f39bae79 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -114,7 +114,9 @@ def get_data_files (self): build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 78e4c55ed4..54a4ed80fd 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ def test_package_data(self): self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) From 4951f23221c37e1b9a5b595397529ec8c301f705 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 2 Jun 2007 18:53:07 +0000 Subject: [PATCH 1880/8469] Backport 55731: SF 1668596/1720897: distutils now copies data files even if package_dir is empty. --- command/build_py.py | 4 +++- tests/test_build_py.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 621bcb4af3..b9f39bae79 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -114,7 +114,9 @@ def get_data_files (self): build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 78e4c55ed4..54a4ed80fd 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ def test_package_data(self): self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) From b56a8f9ed0bfc43878362c0d08e7292b146f9b81 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 7 Jun 2007 23:15:56 +0000 Subject: [PATCH 1881/8469] Merged revisions 55795-55816 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55797 | neal.norwitz | 2007-06-07 00:00:57 -0700 (Thu, 07 Jun 2007) | 3 lines Get rid of some remnants of classic classes. types.ClassType == type. Also get rid of almost all uses of the types module and use the builtin name. ........ r55798 | neal.norwitz | 2007-06-07 00:12:36 -0700 (Thu, 07 Jun 2007) | 1 line Remove a use of types, verify commit hook works ........ r55809 | guido.van.rossum | 2007-06-07 11:11:29 -0700 (Thu, 07 Jun 2007) | 2 lines Fix syntax error introduced by Neal in last checkin. ........ --- cmd.py | 5 ++--- dist.py | 11 +++++------ extension.py | 3 +-- text_file.py | 7 +++---- unixccompiler.py | 3 +-- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/cmd.py b/cmd.py index ea3799af16..8d77e7fb2b 100644 --- a/cmd.py +++ b/cmd.py @@ -9,7 +9,6 @@ __revision__ = "$Id$" import sys, os, re -from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log @@ -245,7 +244,7 @@ def ensure_string_list (self, option): elif isinstance(val, basestring): setattr(self, option, re.split(r',\s*|\s+', val)) else: - if type(val) is ListType: + if isinstance(val, list): ok = all(isinstance(v, basestring) for v in val) else: ok = 0 @@ -422,7 +421,7 @@ def make_file (self, infiles, outfile, func, args, # Allow 'infiles' to be a single string if isinstance(infiles, basestring): infiles = (infiles,) - elif type(infiles) not in (ListType, TupleType): + elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" diff --git a/dist.py b/dist.py index e89d942f15..c01724d83a 100644 --- a/dist.py +++ b/dist.py @@ -9,7 +9,6 @@ __revision__ = "$Id$" import sys, os, re -from types import * from copy import copy try: @@ -527,7 +526,7 @@ def _parse_command_opts (self, parser, args): # Also make sure that the command object provides a list of its # known options. if not (hasattr(cmd_class, 'user_options') and - type(cmd_class.user_options) is ListType): + isinstance(cmd_class.user_options, list)): raise DistutilsClassError, \ ("command class %s must provide " + "'user_options' attribute (a list of tuples)") % \ @@ -543,7 +542,7 @@ def _parse_command_opts (self, parser, args): # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_options = fix_help_options(cmd_class.help_options) else: help_options = [] @@ -561,7 +560,7 @@ def _parse_command_opts (self, parser, args): return if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_option_found=0 for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): @@ -646,12 +645,12 @@ def _show_help (self, print() for command in self.commands: - if type(command) is ClassType and issubclass(command, Command): + if isinstance(command, type) and issubclass(command, Command): klass = command else: klass = self.get_command_class(command) if (hasattr(klass, 'help_options') and - type(klass.help_options) is ListType): + isinstance(klass.help_options, list)): parser.set_option_table(klass.user_options + fix_help_options(klass.help_options)) else: diff --git a/extension.py b/extension.py index 7fe846b8a8..43b0d3fd00 100644 --- a/extension.py +++ b/extension.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import os, sys -from types import * try: import warnings @@ -104,7 +103,7 @@ def __init__ (self, name, sources, **kw # To catch unknown keywords ): assert isinstance(name, basestring), "'name' must be a string" - assert (type(sources) is ListType and + assert (isinstance(sources, list) and all(isinstance(v, basestring) for v in sources)), \ "'sources' must be a list of strings" diff --git a/text_file.py b/text_file.py index 9d4d42b4c6..3f6a220dcc 100644 --- a/text_file.py +++ b/text_file.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" -from types import * import sys, os, io @@ -137,7 +136,7 @@ def gen_error (self, msg, line=None): if line is None: line = self.current_line outmsg.append(self.filename + ", ") - if type (line) in (ListType, TupleType): + if isinstance (line, (list, tuple)): outmsg.append("lines %d-%d: " % tuple (line)) else: outmsg.append("line %d: " % line) @@ -239,7 +238,7 @@ def readline (self): line = buildup_line + line # careful: pay attention to line number when incrementing it - if type (self.current_line) is ListType: + if isinstance (self.current_line, list): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, @@ -250,7 +249,7 @@ def readline (self): return None # still have to be careful about incrementing the line number! - if type (self.current_line) is ListType: + if isinstance (self.current_line, list): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 diff --git a/unixccompiler.py b/unixccompiler.py index a42ab5ed42..d07ae1e358 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -16,7 +16,6 @@ __revision__ = "$Id$" import os, sys -from types import NoneType from copy import copy from distutils import sysconfig @@ -212,7 +211,7 @@ def link(self, target_desc, objects, lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) - if not isinstance(output_dir, (basestring, NoneType)): + if not isinstance(output_dir, (basestring, type(None))): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) From d9a8d08e4670a883b259554331b4372e8ae18f12 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 11 Jun 2007 05:28:45 +0000 Subject: [PATCH 1882/8469] Add all of the distuils modules that don't seem to have explicit tests. :-( Move an import in mworkscompiler so that this module can be imported on any platform. Hopefully this works on all platforms. --- mwerkscompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 0de123d9e9..343c6cecae 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -18,7 +18,6 @@ import distutils.util import distutils.dir_util from distutils import log -import mkcwproject class MWerksCompiler (CCompiler) : """Concrete class that implements an interface to MetroWerks CodeWarrior, @@ -188,6 +187,7 @@ def link (self, # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) log.debug("\tCreate XML file %s", xmlfilename) + import mkcwproject xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] From 8d56e63638d9152547d8b6f8a4cbdba90cf91a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Mon, 11 Jun 2007 21:38:39 +0000 Subject: [PATCH 1883/8469] Simplify various spots where: str() is called on something that already is a string or the existence of the str class is checked or a check is done for str twice. These all stem from the initial unicode->str replacement. --- command/bdist_wininst.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 5074a1a675..55d5d7e1b1 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -246,13 +246,8 @@ def create_exe (self, arcname, fullname, bitmap=None): file.write(bitmapdata) # Convert cfgdata from unicode to ascii, mbcs encoded - try: - str - except NameError: - pass - else: - if isinstance(cfgdata, str): - cfgdata = cfgdata.encode("mbcs") + if isinstance(cfgdata, str): + cfgdata = cfgdata.encode("mbcs") # Append the pre-install script cfgdata = cfgdata + "\0" From 4beaf762f12da3cb21e32d646c5f01c8bdb7e9ca Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 13 Jun 2007 18:07:49 +0000 Subject: [PATCH 1884/8469] Merged revisions 55817-55961 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r55837 | guido.van.rossum | 2007-06-08 16:04:42 -0700 (Fri, 08 Jun 2007) | 2 lines PEP 3119 -- the abc module. ................ r55838 | guido.van.rossum | 2007-06-08 17:38:55 -0700 (Fri, 08 Jun 2007) | 2 lines Implement part of PEP 3119 -- One Trick Ponies. ................ r55847 | guido.van.rossum | 2007-06-09 08:28:06 -0700 (Sat, 09 Jun 2007) | 2 lines Different way to do one trick ponies, allowing registration (per PEP strawman). ................ r55849 | guido.van.rossum | 2007-06-09 18:06:38 -0700 (Sat, 09 Jun 2007) | 3 lines Make sure that the magic looking for __hash__ (etc.) doesn't apply to real subclasses of Hashable. ................ r55852 | guido.van.rossum | 2007-06-10 08:29:51 -0700 (Sun, 10 Jun 2007) | 2 lines Add some more examples, e.g. generators and dict views. ................ r55853 | guido.van.rossum | 2007-06-10 08:31:59 -0700 (Sun, 10 Jun 2007) | 2 lines keys() and items() *are* containers -- just values() isn't. ................ r55864 | georg.brandl | 2007-06-10 15:29:40 -0700 (Sun, 10 Jun 2007) | 2 lines PEP 3127: new octal literals, binary literals. ................ r55865 | georg.brandl | 2007-06-10 15:31:37 -0700 (Sun, 10 Jun 2007) | 2 lines Some octal literal fixes in Tools. ................ r55866 | georg.brandl | 2007-06-10 15:37:43 -0700 (Sun, 10 Jun 2007) | 2 lines Tokenizer changes for PEP 3127. ................ r55867 | georg.brandl | 2007-06-10 15:37:55 -0700 (Sun, 10 Jun 2007) | 2 lines Some docs for PEP 3127. ................ r55868 | georg.brandl | 2007-06-10 15:44:39 -0700 (Sun, 10 Jun 2007) | 2 lines Missed a place in intobject.c. Is that used anymore anyway? ................ r55871 | neal.norwitz | 2007-06-10 18:31:49 -0700 (Sun, 10 Jun 2007) | 182 lines Merged revisions 55729-55868 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55731 | neal.norwitz | 2007-06-01 00:29:12 -0700 (Fri, 01 Jun 2007) | 7 lines SF 1668596/1720897: distutils now copies data files even if package_dir is empty. This needs to be backported. I'm too tired tonight. It would be great if someone backports this if the buildbots are ok with it. Otherwise, I will try to get to it tomorrow. ........ r55732 | georg.brandl | 2007-06-01 04:33:33 -0700 (Fri, 01 Jun 2007) | 2 lines Bug #1722484: remove docstrings again when running with -OO. ........ r55735 | georg.brandl | 2007-06-01 12:20:27 -0700 (Fri, 01 Jun 2007) | 2 lines Fix wrong issue number. ........ r55739 | brett.cannon | 2007-06-01 20:02:29 -0700 (Fri, 01 Jun 2007) | 3 lines Have configure raise an error when building on AtheOS. Code specific to AtheOS will be removed in Python 2.7. ........ r55746 | neal.norwitz | 2007-06-02 11:33:53 -0700 (Sat, 02 Jun 2007) | 1 line Update expected birthday of 2.6 ........ r55751 | neal.norwitz | 2007-06-03 13:32:50 -0700 (Sun, 03 Jun 2007) | 10 lines Backout the original 'fix' to 1721309 which had no effect. Different versions of Berkeley DB handle this differently. The comments and bug report should have the details. Memory is allocated in 4.4 (and presumably earlier), but not in 4.5. Thus 4.5 has the free error, but not earlier versions. Mostly update comments, plus make the free conditional. This fix was already applied to the 2.5 branch. ........ r55752 | brett.cannon | 2007-06-03 16:13:41 -0700 (Sun, 03 Jun 2007) | 6 lines Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead of ``\s*``. This prevents patterns from "stealing" bits from other patterns in order to make a match work. Closes bug #1730389. Will be backported. ........ r55766 | hyeshik.chang | 2007-06-05 11:16:52 -0700 (Tue, 05 Jun 2007) | 4 lines Fix build on FreeBSD. Bluetooth HCI API in FreeBSD is quite different from Linux's. Just fix the build for now but the code doesn't support the complete capability of HCI on FreeBSD yet. ........ r55770 | hyeshik.chang | 2007-06-05 11:58:51 -0700 (Tue, 05 Jun 2007) | 4 lines Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. ........ r55775 | hyeshik.chang | 2007-06-05 12:28:15 -0700 (Tue, 05 Jun 2007) | 2 lines Fix for Windows: close a temporary file before trying to delete it. ........ r55783 | guido.van.rossum | 2007-06-05 14:24:47 -0700 (Tue, 05 Jun 2007) | 2 lines Patch by Tim Delany (missing DECREF). SF #1731330. ........ r55785 | collin.winter | 2007-06-05 17:17:35 -0700 (Tue, 05 Jun 2007) | 3 lines Patch #1731049: make threading.py use a proper "raise" when checking internal state, rather than assert statements (which get stripped out by -O). ........ r55786 | facundo.batista | 2007-06-06 08:13:37 -0700 (Wed, 06 Jun 2007) | 4 lines FTP.ntransfercmd method now uses create_connection when passive, using the timeout received in connection time. ........ r55792 | facundo.batista | 2007-06-06 10:15:23 -0700 (Wed, 06 Jun 2007) | 7 lines Added an optional timeout parameter to function urllib2.urlopen, with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated. ........ r55793 | thomas.heller | 2007-06-06 13:19:19 -0700 (Wed, 06 Jun 2007) | 1 line Build _ctypes and _ctypes_test in the ReleaseAMD64 configuration. ........ r55802 | georg.brandl | 2007-06-07 06:23:24 -0700 (Thu, 07 Jun 2007) | 3 lines Disallow function calls like foo(None=1). Backport from py3k rev. 55708 by Guido. ........ r55804 | georg.brandl | 2007-06-07 06:30:24 -0700 (Thu, 07 Jun 2007) | 2 lines Make reindent.py executable. ........ r55805 | georg.brandl | 2007-06-07 06:34:10 -0700 (Thu, 07 Jun 2007) | 2 lines Patch #1667860: Fix UnboundLocalError in urllib2. ........ r55821 | kristjan.jonsson | 2007-06-07 16:53:49 -0700 (Thu, 07 Jun 2007) | 1 line Fixing changes to getbuildinfo.c that broke linux builds ........ r55828 | thomas.heller | 2007-06-08 09:10:27 -0700 (Fri, 08 Jun 2007) | 1 line Make this test work with older Python releases where struct has no 't' format character. ........ r55829 | martin.v.loewis | 2007-06-08 10:29:20 -0700 (Fri, 08 Jun 2007) | 3 lines Bug #1733488: Fix compilation of bufferobject.c on AIX. Will backport to 2.5. ........ r55831 | thomas.heller | 2007-06-08 11:20:09 -0700 (Fri, 08 Jun 2007) | 2 lines [ 1715718 ] x64 clean compile patch for _ctypes, by Kristj?n Valur with small modifications. ........ r55832 | thomas.heller | 2007-06-08 12:01:06 -0700 (Fri, 08 Jun 2007) | 1 line Fix gcc warnings intruduced by passing Py_ssize_t to PyErr_Format calls. ........ r55833 | thomas.heller | 2007-06-08 12:08:31 -0700 (Fri, 08 Jun 2007) | 2 lines Fix wrong documentation, and correct the punktuation. Closes [1700455]. ........ r55834 | thomas.heller | 2007-06-08 12:14:23 -0700 (Fri, 08 Jun 2007) | 1 line Fix warnings by using proper function prototype. ........ r55839 | neal.norwitz | 2007-06-08 20:36:34 -0700 (Fri, 08 Jun 2007) | 7 lines Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow. ........ r55841 | neal.norwitz | 2007-06-08 21:48:22 -0700 (Fri, 08 Jun 2007) | 1 line Use macro version of GET_SIZE to avoid Coverity warning (#150) about a possible error. ........ r55842 | martin.v.loewis | 2007-06-09 00:42:52 -0700 (Sat, 09 Jun 2007) | 3 lines Patch #1733960: Allow T_LONGLONG to accept ints. Will backport to 2.5. ........ r55843 | martin.v.loewis | 2007-06-09 00:58:05 -0700 (Sat, 09 Jun 2007) | 2 lines Fix Windows build. ........ r55845 | martin.v.loewis | 2007-06-09 03:10:26 -0700 (Sat, 09 Jun 2007) | 2 lines Provide LLONG_MAX for S390. ........ r55854 | thomas.heller | 2007-06-10 08:59:17 -0700 (Sun, 10 Jun 2007) | 4 lines First version of build scripts for Windows/AMD64 (no external components are built yet, and 'kill_python' is disabled). ........ r55855 | thomas.heller | 2007-06-10 10:55:51 -0700 (Sun, 10 Jun 2007) | 3 lines For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter modules in the ReleaseAMD64 configuration because they do not compile. ........ r55856 | thomas.heller | 2007-06-10 11:27:54 -0700 (Sun, 10 Jun 2007) | 1 line Need to set the environment variables, otherwise devenv.com is not found. ........ r55860 | thomas.heller | 2007-06-10 14:01:17 -0700 (Sun, 10 Jun 2007) | 1 line Revert commit 55855. ........ ................ r55880 | neal.norwitz | 2007-06-10 22:07:36 -0700 (Sun, 10 Jun 2007) | 5 lines Fix the refleak counter on test_collections. The ABC metaclass creates a registry which must be cleared on each run. Otherwise, there *seem* to be refleaks when there really aren't any. (The class is held within the registry even though it's no longer needed.) ................ r55884 | neal.norwitz | 2007-06-10 22:46:33 -0700 (Sun, 10 Jun 2007) | 1 line These tests have been removed, so they are no longer needed here ................ r55886 | georg.brandl | 2007-06-11 00:26:37 -0700 (Mon, 11 Jun 2007) | 3 lines Optimize access to True and False in the compiler (if True) and the peepholer (LOAD_NAME True). ................ r55905 | georg.brandl | 2007-06-11 10:02:26 -0700 (Mon, 11 Jun 2007) | 5 lines Remove __oct__ and __hex__ and use __index__ for converting non-ints before formatting in a base. Add a bin() builtin. ................ r55906 | georg.brandl | 2007-06-11 10:04:44 -0700 (Mon, 11 Jun 2007) | 2 lines int(x, 0) does not "guess". ................ r55907 | georg.brandl | 2007-06-11 10:05:47 -0700 (Mon, 11 Jun 2007) | 2 lines Add a comment to explain that nb_oct and nb_hex are nonfunctional. ................ r55908 | guido.van.rossum | 2007-06-11 10:49:18 -0700 (Mon, 11 Jun 2007) | 2 lines Get rid of unused imports and comment. ................ r55910 | guido.van.rossum | 2007-06-11 13:05:17 -0700 (Mon, 11 Jun 2007) | 2 lines _Abstract.__new__ now requires either no arguments or __init__ overridden. ................ r55911 | guido.van.rossum | 2007-06-11 13:07:49 -0700 (Mon, 11 Jun 2007) | 7 lines Move the collections ABCs to a separate file, _abcoll.py, in order to avoid needing to import _collections.so during the bootstrap (this will become apparent in the next submit of os.py). Add (plain and mutable) ABCs for Set, Mapping, Sequence. ................ r55912 | guido.van.rossum | 2007-06-11 13:09:31 -0700 (Mon, 11 Jun 2007) | 2 lines Rewrite the _Environ class to use the new collections ABCs. ................ r55913 | guido.van.rossum | 2007-06-11 13:59:45 -0700 (Mon, 11 Jun 2007) | 72 lines Merged revisions 55869-55912 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55869 | neal.norwitz | 2007-06-10 17:42:11 -0700 (Sun, 10 Jun 2007) | 1 line Add Atul Varma for patch # 1667860 ........ r55870 | neal.norwitz | 2007-06-10 18:22:03 -0700 (Sun, 10 Jun 2007) | 1 line Ignore valgrind problems on Ubuntu from ld ........ r55872 | neal.norwitz | 2007-06-10 18:48:46 -0700 (Sun, 10 Jun 2007) | 2 lines Ignore config.status.lineno which seems new (new autoconf?) ........ r55873 | neal.norwitz | 2007-06-10 19:14:39 -0700 (Sun, 10 Jun 2007) | 1 line Prevent these tests from running on Win64 since they don\'t apply there either ........ r55874 | neal.norwitz | 2007-06-10 19:16:10 -0700 (Sun, 10 Jun 2007) | 5 lines Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow. Will backport. ........ r55879 | neal.norwitz | 2007-06-10 21:52:37 -0700 (Sun, 10 Jun 2007) | 1 line Prevent hang if the port cannot be opened. ........ r55881 | neal.norwitz | 2007-06-10 22:28:45 -0700 (Sun, 10 Jun 2007) | 4 lines Add all of the distuils modules that don't seem to have explicit tests. :-( Move an import in mworkscompiler so that this module can be imported on any platform. Hopefully this works on all platforms. ........ r55882 | neal.norwitz | 2007-06-10 22:35:10 -0700 (Sun, 10 Jun 2007) | 4 lines SF #1734732, lower case the module names per PEP 8. Will backport. ........ r55885 | neal.norwitz | 2007-06-10 23:16:48 -0700 (Sun, 10 Jun 2007) | 4 lines Not sure why this only fails sometimes on Unix machines. Better to disable it and only import msvccompiler on Windows since that's the only place it can work anyways. ........ r55887 | neal.norwitz | 2007-06-11 00:29:43 -0700 (Mon, 11 Jun 2007) | 4 lines Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. Will backport ........ r55889 | neal.norwitz | 2007-06-11 00:36:24 -0700 (Mon, 11 Jun 2007) | 1 line Reflow long line ........ r55896 | thomas.heller | 2007-06-11 08:58:33 -0700 (Mon, 11 Jun 2007) | 3 lines Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k" or "K" codes. ........ r55901 | facundo.batista | 2007-06-11 09:27:08 -0700 (Mon, 11 Jun 2007) | 5 lines Added versionchanged flag to all the methods which received a new optional timeout parameter, and a versionadded flag to the socket.create_connection function. ........ ................ r55914 | guido.van.rossum | 2007-06-11 14:19:50 -0700 (Mon, 11 Jun 2007) | 3 lines New super() implementation, for PEP 3135 (though the PEP is not yet updated to this design, and small tweaks may still be made later). ................ r55923 | guido.van.rossum | 2007-06-11 21:15:24 -0700 (Mon, 11 Jun 2007) | 4 lines I'm guessing this module broke when Neal ripped out the types module -- it used 'list' both as a local variable and as the built-in list type. Renamed the local variable since that was easier. ................ r55924 | guido.van.rossum | 2007-06-11 21:20:05 -0700 (Mon, 11 Jun 2007) | 5 lines Change all occurrences of super(, ) to super(). Seems to have worked, all the tests still pass. Exception: test_descr and test_descrtut, which have tons of these and are there to test the various usages. ................ r55939 | collin.winter | 2007-06-12 13:57:33 -0700 (Tue, 12 Jun 2007) | 1 line Patch #1735485: remove StandardError from the exception hierarchy. ................ r55954 | neal.norwitz | 2007-06-12 21:56:32 -0700 (Tue, 12 Jun 2007) | 51 lines Merged revisions 55913-55950 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55926 | marc-andre.lemburg | 2007-06-12 02:09:58 -0700 (Tue, 12 Jun 2007) | 3 lines Apply patch #1734945 to support TurboLinux as distribution. ........ r55927 | marc-andre.lemburg | 2007-06-12 02:26:49 -0700 (Tue, 12 Jun 2007) | 3 lines Add patch #1726668: Windows Vista support. ........ r55929 | thomas.heller | 2007-06-12 08:36:22 -0700 (Tue, 12 Jun 2007) | 1 line Checkout, but do not yet try to build, exernal sources. ........ r55930 | thomas.heller | 2007-06-12 09:08:27 -0700 (Tue, 12 Jun 2007) | 6 lines Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). Set the /XP64 /RETAIL build enviroment in the makefile when building ReleaseAMD64. ........ r55931 | thomas.heller | 2007-06-12 09:23:19 -0700 (Tue, 12 Jun 2007) | 5 lines Revert this change, since it breaks the win32 build: Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). ........ r55934 | thomas.heller | 2007-06-12 10:28:31 -0700 (Tue, 12 Jun 2007) | 3 lines Specify the bufferoverflowU.lib to the makefile on the command line (for ReleaseAMD64 builds). ........ r55937 | thomas.heller | 2007-06-12 12:02:59 -0700 (Tue, 12 Jun 2007) | 3 lines Add bufferoverflowU.lib to PCBuild\_bsddb.vcproj. Build sqlite3.dll and bsddb. ........ r55938 | thomas.heller | 2007-06-12 12:56:12 -0700 (Tue, 12 Jun 2007) | 2 lines Don't rebuild Berkeley DB if not needed (this was committed by accident). ........ r55948 | martin.v.loewis | 2007-06-12 20:42:19 -0700 (Tue, 12 Jun 2007) | 3 lines Provide PY_LLONG_MAX on all systems having long long. Will backport to 2.5. ........ ................ r55959 | guido.van.rossum | 2007-06-13 09:22:41 -0700 (Wed, 13 Jun 2007) | 2 lines Fix a compilation warning. ................ --- ccompiler.py | 2 +- cmd.py | 2 +- command/build_py.py | 4 +++- command/build_scripts.py | 4 ++-- command/install_scripts.py | 2 +- command/register.py | 2 +- dir_util.py | 4 ++-- mwerkscompiler.py | 2 +- tests/support.py | 8 ++++---- tests/test_build_py.py | 35 +++++++++++++++++++++++++++++++++++ 10 files changed, 51 insertions(+), 14 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 50905c1d44..d4f4adea19 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1040,7 +1040,7 @@ def spawn (self, cmd): def move_file (self, src, dst): return move_file (src, dst, dry_run=self.dry_run) - def mkpath (self, name, mode=0777): + def mkpath (self, name, mode=0o777): mkpath (name, mode, self.dry_run) diff --git a/cmd.py b/cmd.py index 8d77e7fb2b..b2c952c38c 100644 --- a/cmd.py +++ b/cmd.py @@ -356,7 +356,7 @@ def execute (self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) - def mkpath (self, name, mode=0777): + def mkpath (self, name, mode=0o777): dir_util.mkpath(name, mode, dry_run=self.dry_run) diff --git a/command/build_py.py b/command/build_py.py index 52534bdb47..8f5609084c 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -114,7 +114,9 @@ def get_data_files (self): build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ diff --git a/command/build_scripts.py b/command/build_scripts.py index bda4480ca5..511b82f999 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -119,8 +119,8 @@ def copy_scripts (self): if self.dry_run: log.info("changing mode of %s", file) else: - oldmode = os.stat(file)[ST_MODE] & 07777 - newmode = (oldmode | 0555) & 07777 + oldmode = os.stat(file)[ST_MODE] & 0o7777 + newmode = (oldmode | 0o555) & 0o7777 if newmode != oldmode: log.info("changing mode of %s from %o to %o", file, oldmode, newmode) diff --git a/command/install_scripts.py b/command/install_scripts.py index fe93ef5af2..da2da358ba 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -53,7 +53,7 @@ def run (self): if self.dry_run: log.info("changing mode of %s", file) else: - mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777 + mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777 log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) diff --git a/command/register.py b/command/register.py index 2ddabadf88..53f4293e17 100644 --- a/command/register.py +++ b/command/register.py @@ -183,7 +183,7 @@ def send_metadata(self): username, password)) f.close() try: - os.chmod(rc, 0600) + os.chmod(rc, 0o600) except: pass elif choice == '2': diff --git a/dir_util.py b/dir_util.py index c6f014b260..0cfca2e8ff 100644 --- a/dir_util.py +++ b/dir_util.py @@ -18,7 +18,7 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0777, verbose=0, dry_run=0): +def mkpath (name, mode=0o777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do @@ -85,7 +85,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # mkpath () -def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): +def create_tree (base_dir, files, mode=0o777, verbose=0, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. 'base_dir' is just the a name of a directory diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 028ea8250d..662046ae22 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -18,7 +18,6 @@ import distutils.util import distutils.dir_util from distutils import log -import mkcwproject class MWerksCompiler (CCompiler) : """Concrete class that implements an interface to MetroWerks CodeWarrior, @@ -188,6 +187,7 @@ def link (self, # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) log.debug("\tCreate XML file %s", xmlfilename) + import mkcwproject xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] diff --git a/tests/support.py b/tests/support.py index 475ceee598..91e704cfcc 100644 --- a/tests/support.py +++ b/tests/support.py @@ -9,12 +9,12 @@ class LoggingSilencer(object): def setUp(self): - super(LoggingSilencer, self).setUp() + super().setUp() self.threshold = log.set_threshold(log.FATAL) def tearDown(self): log.set_threshold(self.threshold) - super(LoggingSilencer, self).tearDown() + super().tearDown() class TempdirManager(object): @@ -24,11 +24,11 @@ class TempdirManager(object): """ def setUp(self): - super(TempdirManager, self).setUp() + super().setUp() self.tempdirs = [] def tearDown(self): - super(TempdirManager, self).tearDown() + super().tearDown() while self.tempdirs: d = self.tempdirs.pop() shutil.rmtree(d) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 78e4c55ed4..54a4ed80fd 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ def test_package_data(self): self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) From a16a76a14958dc71e70971b0fc346e34491f734e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 30 Jun 2007 05:01:58 +0000 Subject: [PATCH 1885/8469] Merged revisions 56020-56124 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56037 | georg.brandl | 2007-06-19 05:33:20 -0700 (Tue, 19 Jun 2007) | 2 lines Patch #1739659: don't slice dict.keys() in pydoc. ................ r56060 | martin.v.loewis | 2007-06-21 13:00:02 -0700 (Thu, 21 Jun 2007) | 2 lines Regenerate to add True, False, None. ................ r56069 | neal.norwitz | 2007-06-21 22:31:56 -0700 (Thu, 21 Jun 2007) | 1 line Get the doctest working again after adding None, True, and False as kewyords. ................ r56070 | neal.norwitz | 2007-06-21 23:25:33 -0700 (Thu, 21 Jun 2007) | 1 line Add space to error message. ................ r56071 | neal.norwitz | 2007-06-21 23:40:04 -0700 (Thu, 21 Jun 2007) | 6 lines Get pybench working, primarily * Use print function * Stop using string module * Use sorted instead of assuming dict methods return lists * Convert range result to a list ................ r56089 | collin.winter | 2007-06-26 10:31:48 -0700 (Tue, 26 Jun 2007) | 1 line Fix AttributeError in distutils/dir_util.py. ................ r56124 | guido.van.rossum | 2007-06-29 18:04:31 -0700 (Fri, 29 Jun 2007) | 30 lines Merged revisions 56014-56123 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56019 | lars.gustaebel | 2007-06-18 04:42:11 -0700 (Mon, 18 Jun 2007) | 2 lines Added exclude keyword argument to the TarFile.add() method. ........ r56023 | lars.gustaebel | 2007-06-18 13:05:55 -0700 (Mon, 18 Jun 2007) | 3 lines Added missing \versionchanged tag for the new exclude parameter. ........ r56038 | georg.brandl | 2007-06-19 05:36:00 -0700 (Tue, 19 Jun 2007) | 2 lines Bug #1737864: allow empty message in logging format routines. ........ r56040 | georg.brandl | 2007-06-19 05:38:20 -0700 (Tue, 19 Jun 2007) | 2 lines Bug #1739115: make shutil.rmtree docs clear wrt. file deletion. ........ r56084 | georg.brandl | 2007-06-25 08:21:23 -0700 (Mon, 25 Jun 2007) | 2 lines Bug #1742901: document None behavior of shlex.split. ........ r56091 | georg.brandl | 2007-06-27 07:09:56 -0700 (Wed, 27 Jun 2007) | 2 lines Fix a variable name in winreg docs. ........ ................ --- dir_util.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dir_util.py b/dir_util.py index 0cfca2e8ff..a6c4416a6f 100644 --- a/dir_util.py +++ b/dir_util.py @@ -96,14 +96,12 @@ def create_tree (base_dir, files, mode=0o777, verbose=0, dry_run=0): for 'mkpath()'.""" # First get the list of directories to create - need_dir = {} + need_dir = set() for file in files: - need_dir[os.path.join(base_dir, os.path.dirname(file))] = 1 - need_dirs = need_dir.keys() - need_dirs.sort() + need_dir.add(os.path.join(base_dir, os.path.dirname(file))) # Now create them - for dir in need_dirs: + for dir in sorted(need_dir): mkpath(dir, mode, dry_run=dry_run) # create_tree () From 3abb62b2c71e85682cb45612ce358f174a71b545 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 3 Jul 2007 08:25:58 +0000 Subject: [PATCH 1886/8469] Merged revisions 56125-56153 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r56127 | georg.brandl | 2007-06-30 09:32:49 +0200 (Sat, 30 Jun 2007) | 2 lines Fix a place where floor division would be in order. ........ r56135 | guido.van.rossum | 2007-07-01 06:13:54 +0200 (Sun, 01 Jul 2007) | 28 lines Make map() and filter() identical to itertools.imap() and .ifilter(), respectively. I fixed two bootstrap issues, due to the dynamic import of itertools: 1. Starting python requires that map() and filter() are not used until site.py has added build/lib. to sys.path. 2. Building python requires that setup.py and distutils and everything they use is free of map() and filter() calls. Beyond this, I only fixed the tests in test_builtin.py. Others, please help fixing the remaining tests that are now broken! The fixes are usually simple: a. map(None, X) -> list(X) b. map(F, X) -> list(map(F, X)) c. map(lambda x: F(x), X) -> [F(x) for x in X] d. filter(F, X) -> list(filter(F, X)) e. filter(lambda x: P(x), X) -> [x for x in X if P(x)] Someone, please also contribute a fixer for 2to3 to do this. It can leave map()/filter() calls alone that are already inside a list() or sorted() call or for-loop. Only in rare cases have I seen code that depends on map() of lists of different lengths going to the end of the longest, or on filter() of a string or tuple returning an object of the same type; these will need more thought to fix. ........ r56136 | guido.van.rossum | 2007-07-01 06:22:01 +0200 (Sun, 01 Jul 2007) | 3 lines Make it so that test_decimal fails instead of hangs, to help automated test runners. ........ r56139 | georg.brandl | 2007-07-01 18:20:58 +0200 (Sun, 01 Jul 2007) | 2 lines Fix a few test cases after the map->imap change. ........ r56142 | neal.norwitz | 2007-07-02 06:38:12 +0200 (Mon, 02 Jul 2007) | 1 line Get a bunch more tests passing after converting map/filter to return iterators. ........ r56147 | guido.van.rossum | 2007-07-02 15:32:02 +0200 (Mon, 02 Jul 2007) | 4 lines Fix the remaining failing unit tests (at least on OSX). Also tweaked urllib2 so it doesn't raise socket.gaierror when all network interfaces are turned off. ........ --- dist.py | 5 ++--- sysconfig.py | 2 +- version.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dist.py b/dist.py index c01724d83a..8f614765ef 100644 --- a/dist.py +++ b/dist.py @@ -112,8 +112,7 @@ class Distribution: ('obsoletes', None, "print the list of packages/modules made obsolete") ] - display_option_names = map(lambda x: translate_longopt(x[0]), - display_options) + display_option_names = [translate_longopt(x[0]) for x in display_options] # negative options are options that exclude other options negative_opt = {'quiet': 'verbose'} @@ -805,7 +804,7 @@ def get_command_packages (self): pkgs = (pkgs or "").split(",") for i in range(len(pkgs)): pkgs[i] = pkgs[i].strip() - pkgs = filter(None, pkgs) + pkgs = [p for p in pkgs if p] if "distutils.command" not in pkgs: pkgs.insert(0, "distutils.command") self.command_packages = pkgs diff --git a/sysconfig.py b/sysconfig.py index 51f23a24a5..346707fa90 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -372,7 +372,7 @@ def _init_posix(): if cur_target == '': cur_target = cfg_target os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) - elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): + elif [int(x) for x in cfg_target.split('.')] > [int(x) for x in cur_target.split('.')]: my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) raise DistutilsPlatformError(my_msg) diff --git a/version.py b/version.py index 2db6b18f1e..de20e21f70 100644 --- a/version.py +++ b/version.py @@ -148,7 +148,7 @@ def parse (self, vstring): if patch: self.version = tuple(map(int, [major, minor, patch])) else: - self.version = tuple(map(int, [major, minor]) + [0]) + self.version = tuple(map(int, [major, minor])) + (0,) if prerelease: self.prerelease = (prerelease[0], int(prerelease_num)) From 8f2fa921c711ac7d3ff775023a9e85061fddd202 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 16 Jul 2007 23:10:57 +0000 Subject: [PATCH 1887/8469] Change a bunch of file encodings from Latin-1 to UTF-8. Remove the encoding from Tix.py (it doesn't seem to need one). Note: we still have to keep the "coding: utf-8" declaration for files that aren't pure ASCII, as the default per PEP 3120 hasn't been implemented yet. --- command/bdist_msi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f31bdedac6..012d06ea69 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2005, 2006 Martin v. Löwis +# -*- coding: utf-8 -*- +# Copyright (C) 2005, 2006 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst From 804a12d456aa7253cd54ce0e183277f4459f7d7d Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Tue, 17 Jul 2007 00:38:21 +0000 Subject: [PATCH 1888/8469] Fix a bug in distutils.core's error handling. --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 6242775c11..bd9b8542cd 100644 --- a/core.py +++ b/core.py @@ -112,10 +112,10 @@ class found in 'cmdclass' is used in place of the default, which is _setup_distribution = dist = klass(attrs) except DistutilsSetupError as msg: if 'name' not in attrs: + raise SystemExit, "error in setup command: %s" % msg + else: raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) - else: - raise SystemExit, "error in setup command: %s" % msg if _setup_stop_after == "init": return dist From 555f239ef6a7c03122bb5b73a3b229fd08634adc Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Tue, 17 Jul 2007 00:39:32 +0000 Subject: [PATCH 1889/8469] Fix two bugs from the map->itertools.imap switch. --- filelist.py | 3 +-- version.py | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/filelist.py b/filelist.py index a0523531c7..cc48e48e58 100644 --- a/filelist.py +++ b/filelist.py @@ -65,8 +65,7 @@ def extend (self, items): def sort (self): # Not a strict lexical sort! - sortable_files = map(os.path.split, self.files) - sortable_files.sort() + sortable_files = sorted(map(os.path.split, self.files)) self.files = [] for sort_tuple in sortable_files: self.files.append(os.path.join(*sort_tuple)) diff --git a/version.py b/version.py index de20e21f70..96b6552197 100644 --- a/version.py +++ b/version.py @@ -306,11 +306,11 @@ def parse (self, vstring): # from the parsed tuple -- so I just store the string here for # use by __str__ self.vstring = vstring - components = filter(lambda x: x and x != '.', - self.component_re.split(vstring)) - for i in range(len(components)): + components = [x for x in self.component_re.split(vstring) + if x and x != '.'] + for i, obj in enumerate(components): try: - components[i] = int(components[i]) + components[i] = int(obj) except ValueError: pass From 3bffc1fa4b8b251e239b69f32086413d12932441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 25 Jul 2007 16:24:08 +0000 Subject: [PATCH 1890/8469] Change location of the package index to pypi.python.org/pypi. --- command/register.py | 2 +- command/upload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/register.py b/command/register.py index 5fcc8d2764..200e61e240 100644 --- a/command/register.py +++ b/command/register.py @@ -17,7 +17,7 @@ class register(Command): description = ("register the distribution with the Python package index") - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', diff --git a/command/upload.py b/command/upload.py index 67ba080427..7461e5f453 100644 --- a/command/upload.py +++ b/command/upload.py @@ -20,7 +20,7 @@ class upload(Command): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', From 1b328f363d2ec8dc42735a5fae9e133e5e221d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 25 Jul 2007 16:24:23 +0000 Subject: [PATCH 1891/8469] Change location of the package index to pypi.python.org/pypi --- command/register.py | 2 +- command/upload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/register.py b/command/register.py index 5fcc8d2764..200e61e240 100644 --- a/command/register.py +++ b/command/register.py @@ -17,7 +17,7 @@ class register(Command): description = ("register the distribution with the Python package index") - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', diff --git a/command/upload.py b/command/upload.py index 67ba080427..7461e5f453 100644 --- a/command/upload.py +++ b/command/upload.py @@ -20,7 +20,7 @@ class upload(Command): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', From 8c45e5f857293b59b834acf6fbaa8428ae6dca70 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 6 Aug 2007 23:33:07 +0000 Subject: [PATCH 1892/8469] Merged revisions 56753-56781 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56760 | neal.norwitz | 2007-08-05 18:55:39 -0700 (Sun, 05 Aug 2007) | 178 lines Merged revisions 56477-56759 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56485 | facundo.batista | 2007-07-21 17:13:00 -0700 (Sat, 21 Jul 2007) | 5 lines Selectively enable tests for asyncore.readwrite based on the presence of poll support in the select module (since this is the only case in which readwrite can be called). [GSoC - Alan McIntyre] ........ r56488 | nick.coghlan | 2007-07-22 03:18:07 -0700 (Sun, 22 Jul 2007) | 1 line Add explicit relative import tests for runpy.run_module ........ r56509 | nick.coghlan | 2007-07-23 06:41:45 -0700 (Mon, 23 Jul 2007) | 5 lines Correctly cleanup sys.modules after executing runpy relative import tests Restore Python 2.4 ImportError when attempting to execute a package (as imports cannot be guaranteed to work properly if you try it) ........ r56519 | nick.coghlan | 2007-07-24 06:07:38 -0700 (Tue, 24 Jul 2007) | 1 line Tweak runpy test to do a better job of confirming that sys has been manipulated correctly ........ r56520 | nick.coghlan | 2007-07-24 06:58:28 -0700 (Tue, 24 Jul 2007) | 1 line Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates ........ r56523 | nick.coghlan | 2007-07-24 07:39:23 -0700 (Tue, 24 Jul 2007) | 1 line Try to get rid of spurious failure in test_resource on the Debian buildbots by changing the file size limit before attempting to close the file ........ r56533 | facundo.batista | 2007-07-24 14:20:42 -0700 (Tue, 24 Jul 2007) | 7 lines New tests for basic behavior of smtplib.SMTP and smtpd.DebuggingServer. Change to use global host & port number variables. Modified the 'server' to take a string to send back in order to vary test server responses. Added a test for the reaction of smtplib.SMTP to a non-200 HELO response. [GSoC - Alan McIntyre] ........ r56538 | nick.coghlan | 2007-07-25 05:57:48 -0700 (Wed, 25 Jul 2007) | 1 line More buildbot cleanup - let the OS assign the port for test_urllib2_localnet ........ r56539 | nick.coghlan | 2007-07-25 06:18:58 -0700 (Wed, 25 Jul 2007) | 1 line Add a temporary diagnostic message before a strange failure on the alpha Debian buildbot ........ r56543 | martin.v.loewis | 2007-07-25 09:24:23 -0700 (Wed, 25 Jul 2007) | 2 lines Change location of the package index to pypi.python.org/pypi ........ r56551 | georg.brandl | 2007-07-26 02:36:25 -0700 (Thu, 26 Jul 2007) | 2 lines tabs, newlines and crs are valid XML characters. ........ r56553 | nick.coghlan | 2007-07-26 07:03:00 -0700 (Thu, 26 Jul 2007) | 1 line Add explicit test for a misbehaving math.floor ........ r56561 | mark.hammond | 2007-07-26 21:52:32 -0700 (Thu, 26 Jul 2007) | 3 lines In consultation with Kristjan Jonsson, only define WINVER and _WINNT_WIN32 if (a) we are building Python itself and (b) no one previously defined them ........ r56562 | mark.hammond | 2007-07-26 22:08:54 -0700 (Thu, 26 Jul 2007) | 2 lines Correctly detect AMD64 architecture on VC2003 ........ r56566 | nick.coghlan | 2007-07-27 03:36:30 -0700 (Fri, 27 Jul 2007) | 1 line Make test_math error messages more meaningful for small discrepancies in results ........ r56588 | martin.v.loewis | 2007-07-27 11:28:22 -0700 (Fri, 27 Jul 2007) | 2 lines Bug #978833: Close https sockets by releasing the _ssl object. ........ r56601 | martin.v.loewis | 2007-07-28 00:03:05 -0700 (Sat, 28 Jul 2007) | 3 lines Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot represent the result in a single character. ........ r56604 | facundo.batista | 2007-07-28 07:21:22 -0700 (Sat, 28 Jul 2007) | 9 lines Moved all of the capture_server socket setup code into the try block so that the event gets set if a failure occurs during server setup (otherwise the test will block forever). Changed to let the OS assign the server port number, and client side of test waits for port number assignment before proceeding. The test data in DispatcherWithSendTests is also sent in multiple send() calls instead of one to make sure this works properly. [GSoC - Alan McIntyre] ........ r56611 | georg.brandl | 2007-07-29 01:26:10 -0700 (Sun, 29 Jul 2007) | 2 lines Clarify PEP 343 description. ........ r56614 | georg.brandl | 2007-07-29 02:11:15 -0700 (Sun, 29 Jul 2007) | 2 lines try-except-finally is new in 2.5. ........ r56617 | facundo.batista | 2007-07-29 07:23:08 -0700 (Sun, 29 Jul 2007) | 9 lines Added tests for asynchat classes simple_producer & fifo, and the find_prefix_at_end function. Check behavior of a string given as a producer. Added tests for behavior of asynchat.async_chat when given int, long, and None terminator arguments. Added usepoll attribute to TestAsynchat to allow running the asynchat tests with poll support chosen whether it's available or not (improves coverage of asyncore code). [GSoC - Alan McIntyre] ........ r56620 | georg.brandl | 2007-07-29 10:38:35 -0700 (Sun, 29 Jul 2007) | 2 lines Bug #1763149: use proper slice syntax in docstring. (backport) ........ r56624 | mark.hammond | 2007-07-29 17:45:29 -0700 (Sun, 29 Jul 2007) | 4 lines Correct use of Py_BUILD_CORE - now make sure it is defined before it is referenced, and also fix definition of _WIN32_WINNT. Resolves patch 1761803. ........ r56632 | facundo.batista | 2007-07-30 20:03:34 -0700 (Mon, 30 Jul 2007) | 8 lines When running asynchat tests on OS X (darwin), the test client now overrides asyncore.dispatcher.handle_expt to do nothing, since select.poll gives a POLLHUP error at the completion of these tests. Added timeout & count arguments to several asyncore.loop calls to avoid the possibility of a test hanging up a build. [GSoC - Alan McIntyre] ........ r56633 | nick.coghlan | 2007-07-31 06:38:01 -0700 (Tue, 31 Jul 2007) | 1 line Eliminate RLock race condition reported in SF bug #1764059 ........ r56636 | martin.v.loewis | 2007-07-31 12:57:56 -0700 (Tue, 31 Jul 2007) | 2 lines Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+. ........ r56653 | facundo.batista | 2007-08-01 16:18:36 -0700 (Wed, 01 Aug 2007) | 9 lines Allow the OS to select a free port for each test server. For DebuggingServerTests, construct SMTP objects with a localhost argument to avoid abysmally long FQDN lookups (not relevant to items under test) on some machines that would cause the test to fail. Moved server setup code in the server function inside the try block to avoid the possibility of setup failure hanging the test. Minor edits to conform to PEP 8. [GSoC - Alan McIntyre] ........ r56681 | matthias.klose | 2007-08-02 14:33:13 -0700 (Thu, 02 Aug 2007) | 2 lines - Allow Emacs 22 for building the documentation in info format. ........ r56689 | neal.norwitz | 2007-08-02 23:46:29 -0700 (Thu, 02 Aug 2007) | 1 line Py_ssize_t is defined regardless of HAVE_LONG_LONG. Will backport ........ r56727 | hyeshik.chang | 2007-08-03 21:10:18 -0700 (Fri, 03 Aug 2007) | 3 lines Fix gb18030 codec's bug that doesn't map two-byte characters on GB18030 extension in encoding. (bug reported by Bjorn Stabell) ........ r56751 | neal.norwitz | 2007-08-04 20:23:31 -0700 (Sat, 04 Aug 2007) | 7 lines Handle errors when generating a warning. The value is always written to the returned pointer if getting it was successful, even if a warning causes an error. (This probably doesn't matter as the caller will probably discard the value.) Will backport. ........ ................ --- command/register.py | 2 +- command/upload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/register.py b/command/register.py index 53f4293e17..10a903e33d 100644 --- a/command/register.py +++ b/command/register.py @@ -22,7 +22,7 @@ class register(Command): description = ("register the distribution with the Python package index") - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', diff --git a/command/upload.py b/command/upload.py index 438ae99a9c..d1cf87a871 100644 --- a/command/upload.py +++ b/command/upload.py @@ -20,7 +20,7 @@ class upload(Command): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://www.python.org/pypi' + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' user_options = [ ('repository=', 'r', From 913423ef2fd98c50b414f552f21604a699430a67 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 9 Aug 2007 01:03:29 +0000 Subject: [PATCH 1893/8469] SF patch# 1770008 by Christian Heimes (plus some extras). Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files. --- command/register.py | 4 ++-- command/upload.py | 3 +-- tests/test_build_py.py | 4 ++-- tests/test_dist.py | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/command/register.py b/command/register.py index 10a903e33d..91081ddb1b 100644 --- a/command/register.py +++ b/command/register.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" import sys, os, urllib2, getpass, urlparse -import StringIO, ConfigParser +import io, ConfigParser from distutils.core import Command from distutils.errors import * @@ -253,7 +253,7 @@ def post_to_server(self, data, auth=None): boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary end_boundary = sep_boundary + '--' - body = StringIO.StringIO() + body = io.StringIO() for key, value in data.items(): # handle multiple entries for the same name if type(value) not in (type([]), type( () )): diff --git a/command/upload.py b/command/upload.py index d1cf87a871..1ca2fb9052 100644 --- a/command/upload.py +++ b/command/upload.py @@ -14,7 +14,6 @@ import httplib import base64 import urlparse -import cStringIO as StringIO class upload(Command): @@ -135,7 +134,7 @@ def upload_file(self, command, pyversion, filename): boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary end_boundary = sep_boundary + '--' - body = StringIO.StringIO() + body = io.StringIO() for key, value in data.items(): # handle multiple entries for the same name if type(value) != type([]): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 54a4ed80fd..75b6624f5a 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -2,7 +2,7 @@ import os import sys -import StringIO +import io import unittest from distutils.command.build_py import build_py @@ -69,7 +69,7 @@ def test_empty_package_dir (self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) - sys.stdout = StringIO.StringIO() + sys.stdout = io.StringIO() try: dist = Distribution({"packages": ["pkg"], diff --git a/tests/test_dist.py b/tests/test_dist.py index 8d4b07037c..23506b5dae 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -4,7 +4,7 @@ import distutils.dist import os import shutil -import StringIO +import io import sys import tempfile import unittest @@ -177,7 +177,7 @@ def test_obsoletes_illegal(self): "obsoletes": ["my.pkg (splat)"]}) def format_metadata(self, dist): - sio = StringIO.StringIO() + sio = io.StringIO() dist.metadata.write_pkg_file(sio) return sio.getvalue() From 3a44c01ba5f3f9c0b34705d05e934cbae24d7d60 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 12 Aug 2007 00:43:29 +0000 Subject: [PATCH 1894/8469] Kill execfile(), use exec() instead --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index bd9b8542cd..d60998240f 100644 --- a/core.py +++ b/core.py @@ -179,7 +179,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): keyword args from 'script' to 'setup()', or the contents of the config files or command-line. - 'script_name' is a file that will be run with 'execfile()'; + 'script_name' is a file that will be read and run with 'exec()'; 'sys.argv[0]' will be replaced with 'script' for the duration of the call. 'script_args' is a list of strings; if supplied, 'sys.argv[1:]' will be replaced by 'script_args' for the duration of @@ -217,7 +217,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - execfile(script_name, g, l) + exec(open(script_name).read(), g, l) finally: sys.argv = save_argv _setup_stop_after = None From c2b4b26b086f52d2e029ebcbd5170f5092b39526 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 16 Aug 2007 14:35:24 +0000 Subject: [PATCH 1895/8469] Remove RISCOS support --- command/install_lib.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/install_lib.py b/command/install_lib.py index 65d25f7af2..4efaf9c671 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -9,10 +9,7 @@ # Extension for Python source files. -if hasattr(os, 'extsep'): - PYTHON_SOURCE_EXTENSION = os.extsep + "py" -else: - PYTHON_SOURCE_EXTENSION = ".py" +PYTHON_SOURCE_EXTENSION = ".py" class install_lib (Command): From 59cd99d0b267019cd9811bc03ec379827b8f8410 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Fri, 17 Aug 2007 12:57:41 +0000 Subject: [PATCH 1896/8469] Remove support for BeOS --- sysconfig.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 346707fa90..c40c2e7425 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -394,24 +394,6 @@ def _init_posix(): g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - elif sys.platform == 'beos': - # Linker script is in the config directory. In the Makefile it is - # relative to the srcdir, which after installation no longer makes - # sense. - python_lib = get_python_lib(standard_lib=1) - linkerscript_path = g['LDSHARED'].split()[0] - linkerscript_name = os.path.basename(linkerscript_path) - linkerscript = os.path.join(python_lib, 'config', - linkerscript_name) - - # XXX this isn't the right place to do this: adding the Python - # library to the link, if needed, should be in the "build_ext" - # command. (It's also needed for non-MS compilers on Windows, and - # it's taken care of for them by the 'build_ext.get_libraries()' - # method.) - g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, PREFIX, get_python_version())) - global _config_vars _config_vars = g From e9d9c100389e6d04f060f58eeb5e75921e82eb59 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Tue, 21 Aug 2007 01:04:47 +0000 Subject: [PATCH 1897/8469] [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows As discussed on distutils-sig: Allows the generated installer name on 64bit Windows platforms to be different than the name generated for 32bit Windows platforms. --- util.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index cfcc6a951e..8979634e4b 100644 --- a/util.py +++ b/util.py @@ -29,8 +29,27 @@ def get_platform (): irix-5.3 irix64-6.2 - For non-POSIX platforms, currently just returns 'sys.platform'. + Windows will return one of: + win-x86_64 (64bit Windows on x86_64 (AMD64)) + win-ia64 (64bit Windows on Itanium) + win32 (all others - specifically, sys.platform is returned) + + For other non-POSIX platforms, currently just returns 'sys.platform'. """ + if os.name == 'nt': + # sniff sys.version for architecture. + prefix = " bit (" + i = string.find(sys.version, prefix) + if i == -1: + return sys.platform + j = string.find(sys.version, ")", i) + look = sys.version[i+len(prefix):j].lower() + if look=='amd64': + return 'win-x86_64' + if look=='itanium': + return 'win-ia64' + return sys.platform + if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. From 8654a69ef372ec3dc466d9fe80f4991d43d1f6cc Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Tue, 21 Aug 2007 01:05:16 +0000 Subject: [PATCH 1898/8469] [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows As discussed on distutils-sig: Allows the generated installer name on 64bit Windows platforms to be different than the name generated for 32bit Windows platforms. --- command/bdist_msi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 75db8773f1..a1c0df4bc5 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -633,7 +633,8 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses + plat = get_platform() installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.msi" % - (fullname, self.target_version)) + "%s.%s-py%s.msi" % + (fullname, plat, self.target_version)) return installer_name From 04cd9c5fbf2d2bbdd8621c82fa07ac5347a45bf9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 Aug 2007 16:32:05 +0000 Subject: [PATCH 1899/8469] Merged revisions 57221-57391 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r57227 | facundo.batista | 2007-08-20 17:16:21 -0700 (Mon, 20 Aug 2007) | 5 lines Catch ProtocolError exceptions and include the header information in test output (to make it easier to debug test failures caused by problems in the server). [GSoC - Alan McIntyre] ........ r57229 | mark.hammond | 2007-08-20 18:04:47 -0700 (Mon, 20 Aug 2007) | 5 lines [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows As discussed on distutils-sig: Allows the generated installer name on 64bit Windows platforms to be different than the name generated for 32bit Windows platforms. ........ r57230 | mark.hammond | 2007-08-20 18:05:16 -0700 (Mon, 20 Aug 2007) | 5 lines [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows As discussed on distutils-sig: Allows the generated installer name on 64bit Windows platforms to be different than the name generated for 32bit Windows platforms. ........ r57253 | georg.brandl | 2007-08-20 23:01:18 -0700 (Mon, 20 Aug 2007) | 2 lines Demand version 2.5.1 since 2.5 has a bug with codecs.open context managers. ........ r57254 | georg.brandl | 2007-08-20 23:03:43 -0700 (Mon, 20 Aug 2007) | 2 lines Revert accidental checkins from last commit. ........ r57255 | georg.brandl | 2007-08-20 23:07:08 -0700 (Mon, 20 Aug 2007) | 2 lines Bug #1777160: mention explicitly that e.g. -1**2 is -1. ........ r57256 | georg.brandl | 2007-08-20 23:12:19 -0700 (Mon, 20 Aug 2007) | 3 lines Bug #1777168: replace operator names "opa"... with "op1"... and mark everything up as literal, to enhance readability. ........ r57259 | facundo.batista | 2007-08-21 09:57:18 -0700 (Tue, 21 Aug 2007) | 8 lines Added test for behavior of operations on an unconnected SMTP object, and tests for NOOP, RSET, and VRFY. Corrected typo in a comment for testNonnumericPort. Added a check for constructing SMTP objects when non-numeric ports are included in the host name. Derived a server from SMTPServer to test various ESMTP/SMTP capabilities. Check that a second HELO to DebuggingServer returns an error. [GSoC - Alan McIntyre] ........ r57279 | skip.montanaro | 2007-08-22 12:02:16 -0700 (Wed, 22 Aug 2007) | 2 lines Note that BeOS is unsupported as of Python 2.6. ........ r57280 | skip.montanaro | 2007-08-22 12:05:21 -0700 (Wed, 22 Aug 2007) | 1 line whoops - need to check in configure as well ........ r57284 | alex.martelli | 2007-08-22 14:14:17 -0700 (Wed, 22 Aug 2007) | 5 lines Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code object's co_consts tuple; add a test to show that the previous behavior (where these two constants were "collapsed" into one) causes serious malfunctioning. ........ r57286 | gregory.p.smith | 2007-08-22 14:32:34 -0700 (Wed, 22 Aug 2007) | 3 lines stop leaving log.0000001 __db.00* and xxx.db turds in developer sandboxes when bsddb3 tests are run. ........ r57301 | jeffrey.yasskin | 2007-08-22 16:14:27 -0700 (Wed, 22 Aug 2007) | 3 lines When setup.py fails to find the necessary bits to build some modules, have it print a slightly more informative message. ........ r57320 | brett.cannon | 2007-08-23 07:53:17 -0700 (Thu, 23 Aug 2007) | 2 lines Make test_runpy re-entrant. ........ r57324 | georg.brandl | 2007-08-23 10:54:11 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1768121: fix wrong/missing opcode docs. ........ r57326 | georg.brandl | 2007-08-23 10:57:05 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1766421: "return code" vs. "status code". ........ r57328 | georg.brandl | 2007-08-23 11:08:06 -0700 (Thu, 23 Aug 2007) | 2 lines Second half of #1752175: #ifdef out references to PyImport_DynLoadFiletab if HAVE_DYNAMIC_LOADING is not defined. ........ r57331 | georg.brandl | 2007-08-23 11:11:33 -0700 (Thu, 23 Aug 2007) | 2 lines Use try-except-finally in contextlib. ........ r57343 | georg.brandl | 2007-08-23 13:35:00 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1697820: document that the old slice protocol is still used by builtin types. ........ r57345 | georg.brandl | 2007-08-23 13:40:01 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1573854: fix docs for sqlite3 cursor rowcount attr. ........ r57347 | georg.brandl | 2007-08-23 13:50:23 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1694833: fix imp.find_module() docs wrt. packages. ........ r57348 | georg.brandl | 2007-08-23 13:53:28 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1594966: fix misleading usage example ........ r57349 | georg.brandl | 2007-08-23 13:55:44 -0700 (Thu, 23 Aug 2007) | 2 lines Clarify wording a bit. ........ r57351 | georg.brandl | 2007-08-23 14:18:44 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1752332: httplib no longer uses socket.getaddrinfo(). ........ r57352 | georg.brandl | 2007-08-23 14:21:36 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1734111: document struct.Struct.size. ........ r57353 | georg.brandl | 2007-08-23 14:27:57 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1688564: document os.path.join's absolute path behavior in the docstring. ........ r57354 | georg.brandl | 2007-08-23 14:36:05 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1625381: clarify match vs search introduction. ........ r57355 | georg.brandl | 2007-08-23 14:42:54 -0700 (Thu, 23 Aug 2007) | 2 lines Bug #1758696: more info about descriptors. ........ r57357 | georg.brandl | 2007-08-23 14:55:57 -0700 (Thu, 23 Aug 2007) | 2 lines Patch #1779550: remove redundant code in logging. ........ r57378 | gregory.p.smith | 2007-08-23 22:11:38 -0700 (Thu, 23 Aug 2007) | 2 lines Fix bug 1725856. ........ r57382 | georg.brandl | 2007-08-23 23:10:01 -0700 (Thu, 23 Aug 2007) | 2 lines uuid creation is now threadsafe, backport from py3k rev. 57375. ........ r57389 | georg.brandl | 2007-08-24 04:47:37 -0700 (Fri, 24 Aug 2007) | 2 lines Bug #1765375: fix stripping of unwanted LDFLAGS. ........ r57391 | guido.van.rossum | 2007-08-24 07:53:14 -0700 (Fri, 24 Aug 2007) | 2 lines Fix silly typo in test name. ........ --- command/bdist_msi.py | 5 +++-- util.py | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 012d06ea69..5225bed1b2 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -633,7 +633,8 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses + plat = get_platform() installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.msi" % - (fullname, self.target_version)) + "%s.%s-py%s.msi" % + (fullname, plat, self.target_version)) return installer_name diff --git a/util.py b/util.py index 6f15ce8b5e..9aa857052a 100644 --- a/util.py +++ b/util.py @@ -29,8 +29,27 @@ def get_platform (): irix-5.3 irix64-6.2 - For non-POSIX platforms, currently just returns 'sys.platform'. + Windows will return one of: + win-x86_64 (64bit Windows on x86_64 (AMD64)) + win-ia64 (64bit Windows on Itanium) + win32 (all others - specifically, sys.platform is returned) + + For other non-POSIX platforms, currently just returns 'sys.platform'. """ + if os.name == 'nt': + # sniff sys.version for architecture. + prefix = " bit (" + i = string.find(sys.version, prefix) + if i == -1: + return sys.platform + j = string.find(sys.version, ")", i) + look = sys.version[i+len(prefix):j].lower() + if look=='amd64': + return 'win-x86_64' + if look=='itanium': + return 'win-ia64' + return sys.platform + if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. From 767edf21398f72156adcea6a418eba9150d06a20 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 29 Aug 2007 13:18:47 +0000 Subject: [PATCH 1900/8469] Fix failure in error handler -- exc[-1] -> exc.args[-1]. --- dir_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dir_util.py b/dir_util.py index a6c4416a6f..7dc1205c49 100644 --- a/dir_util.py +++ b/dir_util.py @@ -76,8 +76,8 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): os.mkdir(head) created_dirs.append(head) except OSError as exc: - raise DistutilsFileError, \ - "could not create '%s': %s" % (head, exc[-1]) + raise DistutilsFileError( + "could not create '%s': %s" % (head, exc.args[-1])) _path_created[abs_head] = 1 return created_dirs From aabf8bf21c444cfae978e92e626ba7c0274a9f10 Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Thu, 30 Aug 2007 03:52:21 +0000 Subject: [PATCH 1901/8469] General cleanup, raise normalization in Lib/distutils. --- __init__.py | 2 - archive_util.py | 13 +- bcppcompiler.py | 17 +- ccompiler.py | 450 ++++++++++++++++--------------------- cmd.py | 166 ++++++-------- command/__init__.py | 2 - command/bdist.py | 34 +-- command/bdist_dumb.py | 33 +-- command/bdist_msi.py | 28 +-- command/bdist_rpm.py | 54 ++--- command/bdist_wininst.py | 39 +--- command/build.py | 26 +-- command/build_clib.py | 97 +++----- command/build_ext.py | 120 ++++------ command/build_py.py | 116 +++------- command/build_scripts.py | 20 +- command/clean.py | 6 +- command/command_template | 20 +- command/config.py | 102 ++++----- command/install.py | 85 +++---- command/install_data.py | 14 +- command/install_headers.py | 16 +- command/install_lib.py | 44 ++-- command/install_scripts.py | 16 +- command/sdist.py | 89 +++----- command/upload.py | 2 +- core.py | 24 +- cygwinccompiler.py | 11 +- debug.py | 2 - dep_util.py | 6 +- dir_util.py | 17 +- dist.py | 65 ++---- emxccompiler.py | 9 +- errors.py | 2 - extension.py | 12 +- fancy_getopt.py | 137 ++++------- file_util.py | 88 +++----- filelist.py | 97 +++----- log.py | 2 - msvccompiler.py | 202 ++++++++--------- mwerkscompiler.py | 11 +- spawn.py | 95 +++----- sysconfig.py | 18 +- text_file.py | 147 ++++++------ unixccompiler.py | 31 ++- util.py | 20 +- version.py | 2 +- 47 files changed, 966 insertions(+), 1643 deletions(-) diff --git a/__init__.py b/__init__.py index 86ad44fe3a..f71c3adb14 100644 --- a/__init__.py +++ b/__init__.py @@ -8,8 +8,6 @@ setup (...) """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" # Distutils version diff --git a/archive_util.py b/archive_util.py index 059d5447f6..f3f65c6a0c 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,8 +3,6 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -39,8 +37,8 @@ def make_tarball (base_name, base_dir, compress="gzip", 'bzip2': ['-f9']} if compress is not None and compress not in compress_ext.keys(): - raise ValueError, \ - "bad value for 'compress': must be None, 'gzip', or 'compress'" + raise ValueError( + "bad value for 'compress': must be None, 'gzip', or 'compress'") archive_name = base_name + ".tar" mkpath(os.path.dirname(archive_name), dry_run=dry_run) @@ -86,10 +84,9 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): except DistutilsExecError: # XXX really should distinguish between "couldn't find # external 'zip' command" and "zip failed". - raise DistutilsExecError, \ - ("unable to create zip file '%s': " + raise DistutilsExecError(("unable to create zip file '%s': " "could neither import the 'zipfile' module nor " - "find a standalone zip utility") % zip_filename + "find a standalone zip utility") % zip_filename) else: log.info("creating '%s' and adding '%s' to it", @@ -157,7 +154,7 @@ def make_archive (base_name, format, try: format_info = ARCHIVE_FORMATS[format] except KeyError: - raise ValueError, "unknown archive format '%s'" % format + raise ValueError("unknown archive format '%s'" % format) func = format_info[0] for (arg,val) in format_info[1]: diff --git a/bcppcompiler.py b/bcppcompiler.py index b6a3bf62ce..1ab76c5981 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,8 +11,6 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" @@ -116,7 +114,7 @@ def compile(self, sources, try: self.spawn (["brcc32", "-fo", obj, src]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) continue # the 'for' loop # The next two are both for the real compiler. @@ -140,7 +138,7 @@ def compile(self, sources, [input_opt, output_opt] + extra_postargs + [src]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) return objects @@ -165,7 +163,7 @@ def create_static_lib (self, try: self.spawn ([self.lib] + lib_args) except DistutilsExecError as msg: - raise LibError, msg + raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -299,7 +297,7 @@ def link (self, try: self.spawn ([self.linker] + ld_args) except DistutilsExecError as msg: - raise LinkError, msg + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -345,9 +343,8 @@ def object_filenames (self, # use normcase to make sure '.rc' is really '.rc' and not '.RC' (base, ext) = os.path.splitext (os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc','.res']): - raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % \ - (ext, src_name) + raise UnknownFileError("unknown file type '%s' (from '%s')" % \ + (ext, src_name)) if strip_dir: base = os.path.basename (base) if ext == '.res': @@ -393,6 +390,6 @@ def preprocess (self, self.spawn(pp_args) except DistutilsExecError as msg: print(msg) - raise CompileError, msg + raise CompileError(msg) # preprocess() diff --git a/ccompiler.py b/ccompiler.py index d4f4adea19..c33e5ab440 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,12 +3,9 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re -from types import * from copy import copy from distutils.errors import * from distutils.spawn import spawn @@ -88,11 +85,7 @@ class CCompiler: } language_order = ["c++", "objc", "c"] - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - + def __init__(self, verbose=0, dry_run=0, force=0): self.dry_run = dry_run self.force = force self.verbose = verbose @@ -128,11 +121,7 @@ def __init__ (self, for key in self.executables.keys(): self.set_executable(key, self.executables[key]) - # __init__ () - - - def set_executables (self, **args): - + def set_executables(self, **kwargs): """Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler @@ -158,14 +147,11 @@ class (via the 'executables' class attribute), but most will have: # discovered at run-time, since there are many different ways to do # basically the same things with Unix C compilers. - for key in args.keys(): + for key, value in kwargs.items(): if key not in self.executables: - raise ValueError, \ - "unknown executable '%s' for class %s" % \ - (key, self.__class__.__name__) - self.set_executable(key, args[key]) - - # set_executables () + raise ValueError("unknown executable '%s' for class %s" % \ + (key, self.__class__.__name__)) + self.set_executable(key, value) def set_executable(self, key, value): if isinstance(value, basestring): @@ -173,37 +159,32 @@ def set_executable(self, key, value): else: setattr(self, key, value) - - def _find_macro (self, name): + def _find_macro(self, name): i = 0 for defn in self.macros: if defn[0] == name: return i - i = i + 1 - + i += 1 return None - - def _check_macro_definitions (self, definitions): + def _check_macro_definitions(self, definitions): """Ensures that every element of 'definitions' is a valid macro definition, ie. either (name,value) 2-tuple or a (name,) tuple. Do nothing if all definitions are OK, raise TypeError otherwise. """ for defn in definitions: - if not (type (defn) is TupleType and - (len (defn) == 1 or - (len (defn) == 2 and - (isinstance (defn[1], basestring) or defn[1] is None))) and + if not (isinstance(defn, tuple) and + (len(defn) in (1, 2) and + (isinstance (defn[1], basestring) or defn[1] is None)) and isinstance (defn[0], basestring)): - raise TypeError, \ - ("invalid macro definition '%s': " % defn) + \ + raise TypeError(("invalid macro definition '%s': " % defn) + \ "must be tuple (string,), (string, string), or " + \ - "(string, None)" + "(string, None)") # -- Bookkeeping methods ------------------------------------------- - def define_macro (self, name, value=None): + def define_macro(self, name, value=None): """Define a preprocessor macro for all compilations driven by this compiler object. The optional parameter 'value' should be a string; if it is not supplied, then the macro will be defined @@ -216,11 +197,9 @@ def define_macro (self, name, value=None): if i is not None: del self.macros[i] - defn = (name, value) - self.macros.append (defn) + self.macros.append((name, value)) - - def undefine_macro (self, name): + def undefine_macro(self, name): """Undefine a preprocessor macro for all compilations driven by this compiler object. If the same macro is defined by 'define_macro()' and undefined by 'undefine_macro()' the last call @@ -236,18 +215,17 @@ def undefine_macro (self, name): del self.macros[i] undefn = (name,) - self.macros.append (undefn) - + self.macros.append(undefn) - def add_include_dir (self, dir): + def add_include_dir(self, dir): """Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to 'add_include_dir()'. """ - self.include_dirs.append (dir) + self.include_dirs.append(dir) - def set_include_dirs (self, dirs): + def set_include_dirs(self, dirs): """Set the list of directories that will be searched to 'dirs' (a list of strings). Overrides any preceding calls to 'add_include_dir()'; subsequence calls to 'add_include_dir()' add @@ -255,10 +233,9 @@ def set_include_dirs (self, dirs): any list of standard include directories that the compiler may search by default. """ - self.include_dirs = copy (dirs) - + self.include_dirs = copy(dirs) - def add_library (self, libname): + def add_library(self, libname): """Add 'libname' to the list of libraries that will be included in all links driven by this compiler object. Note that 'libname' should *not* be the name of a file containing a library, but the @@ -272,63 +249,60 @@ def add_library (self, libname): names; the linker will be instructed to link against libraries as many times as they are mentioned. """ - self.libraries.append (libname) + self.libraries.append(libname) - def set_libraries (self, libnames): + def set_libraries(self, libnames): """Set the list of libraries to be included in all links driven by this compiler object to 'libnames' (a list of strings). This does not affect any standard system libraries that the linker may include by default. """ - self.libraries = copy (libnames) + self.libraries = copy(libnames) - - def add_library_dir (self, dir): + def add_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for libraries specified to 'add_library()' and 'set_libraries()'. The linker will be instructed to search for libraries in the order they are supplied to 'add_library_dir()' and/or 'set_library_dirs()'. """ - self.library_dirs.append (dir) + self.library_dirs.append(dir) - def set_library_dirs (self, dirs): + def set_library_dirs(self, dirs): """Set the list of library search directories to 'dirs' (a list of strings). This does not affect any standard library search path that the linker may search by default. """ - self.library_dirs = copy (dirs) - + self.library_dirs = copy(dirs) - def add_runtime_library_dir (self, dir): + def add_runtime_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for shared libraries at runtime. """ - self.runtime_library_dirs.append (dir) + self.runtime_library_dirs.append(dir) - def set_runtime_library_dirs (self, dirs): + def set_runtime_library_dirs(self, dirs): """Set the list of directories to search for shared libraries at runtime to 'dirs' (a list of strings). This does not affect any standard search path that the runtime linker may search by default. """ - self.runtime_library_dirs = copy (dirs) - + self.runtime_library_dirs = copy(dirs) - def add_link_object (self, object): + def add_link_object(self, object): """Add 'object' to the list of object files (or analogues, such as explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. """ - self.objects.append (object) + self.objects.append(object) - def set_link_objects (self, objects): + def set_link_objects(self, objects): """Set the list of object files (or analogues) to be included in every link to 'objects'. This does not affect any standard object files that the linker may include by default (such as system libraries). """ - self.objects = copy (objects) + self.objects = copy(objects) # -- Private utility methods -------------------------------------- @@ -345,29 +319,28 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, if outdir is None: outdir = self.output_dir elif not isinstance(outdir, basestring): - raise TypeError, "'output_dir' must be a string or None" + raise TypeError("'output_dir' must be a string or None") if macros is None: macros = self.macros - elif type(macros) is ListType: + elif isinstance(macros, list): macros = macros + (self.macros or []) else: - raise TypeError, "'macros' (if supplied) must be a list of tuples" + raise TypeError("'macros' (if supplied) must be a list of tuples") if incdirs is None: incdirs = self.include_dirs - elif type(incdirs) in (ListType, TupleType): + elif isinstance(incdirs, (list, tuple)): incdirs = list(incdirs) + (self.include_dirs or []) else: - raise TypeError, \ - "'include_dirs' (if supplied) must be a list of strings" + raise TypeError( + "'include_dirs' (if supplied) must be a list of strings") if extra is None: extra = [] # Get the list of expected output (object) files - objects = self.object_filenames(sources, - strip_dir=0, + objects = self.object_filenames(sources, strip_dir=0, output_dir=outdir) assert len(objects) == len(sources) @@ -430,7 +403,7 @@ def _get_cc_args(self, pp_opts, debug, before): cc_args[:0] = before return cc_args - def _fix_compile_args (self, output_dir, macros, include_dirs): + def _fix_compile_args(self, output_dir, macros, include_dirs): """Typecheck and fix-up some of the arguments to the 'compile()' method, and return fixed-up values. Specifically: if 'output_dir' is None, replaces it with 'self.output_dir'; ensures that 'macros' @@ -443,28 +416,25 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): if output_dir is None: output_dir = self.output_dir elif not isinstance(output_dir, basestring): - raise TypeError, "'output_dir' must be a string or None" + raise TypeError("'output_dir' must be a string or None") if macros is None: macros = self.macros - elif type (macros) is ListType: + elif isinstance(macros, list): macros = macros + (self.macros or []) else: - raise TypeError, "'macros' (if supplied) must be a list of tuples" + raise TypeError("'macros' (if supplied) must be a list of tuples") if include_dirs is None: include_dirs = self.include_dirs - elif type (include_dirs) in (ListType, TupleType): - include_dirs = list (include_dirs) + (self.include_dirs or []) + elif isinstance(include_dirs, (list, tuple)): + include_dirs = list(include_dirs) + (self.include_dirs or []) else: - raise TypeError, \ - "'include_dirs' (if supplied) must be a list of strings" + raise TypeError( + "'include_dirs' (if supplied) must be a list of strings") return output_dir, macros, include_dirs - # _fix_compile_args () - - def _prep_compile(self, sources, output_dir, depends=None): """Decide which souce files must be recompiled. @@ -511,29 +481,25 @@ def _prep_compile(self, sources, output_dir, depends=None): return objects, skip_source - # _prep_compile () - - def _fix_object_args (self, objects, output_dir): + def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'. """ - if type (objects) not in (ListType, TupleType): - raise TypeError, \ - "'objects' must be a list or tuple of strings" - objects = list (objects) + if not isinstance(objects, (list, tuple)): + raise TypeError("'objects' must be a list or tuple of strings") + objects = list(objects) if output_dir is None: output_dir = self.output_dir elif not isinstance(output_dir, basestring): - raise TypeError, "'output_dir' must be a string or None" + raise TypeError("'output_dir' must be a string or None") return (objects, output_dir) - - def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): + def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions @@ -542,41 +508,37 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): """ if libraries is None: libraries = self.libraries - elif type (libraries) in (ListType, TupleType): + elif isinstance(libraries, (list, tuple)): libraries = list (libraries) + (self.libraries or []) else: - raise TypeError, \ - "'libraries' (if supplied) must be a list of strings" + raise TypeError( + "'libraries' (if supplied) must be a list of strings") if library_dirs is None: library_dirs = self.library_dirs - elif type (library_dirs) in (ListType, TupleType): + elif isinstance(library_dirs, (list, tuple)): library_dirs = list (library_dirs) + (self.library_dirs or []) else: - raise TypeError, \ - "'library_dirs' (if supplied) must be a list of strings" + raise TypeError( + "'library_dirs' (if supplied) must be a list of strings") if runtime_library_dirs is None: runtime_library_dirs = self.runtime_library_dirs - elif type (runtime_library_dirs) in (ListType, TupleType): - runtime_library_dirs = (list (runtime_library_dirs) + + elif isinstance(runtime_library_dirs, (list, tuple)): + runtime_library_dirs = (list(runtime_library_dirs) + (self.runtime_library_dirs or [])) else: - raise TypeError, \ - "'runtime_library_dirs' (if supplied) " + \ - "must be a list of strings" + raise TypeError("'runtime_library_dirs' (if supplied) " + "must be a list of strings") return (libraries, library_dirs, runtime_library_dirs) - # _fix_lib_args () - - - def _need_link (self, objects, output_file): + def _need_link(self, objects, output_file): """Return true if we need to relink the files listed in 'objects' to recreate 'output_file'. """ if self.force: - return 1 + return True else: if self.dry_run: newer = newer_group (objects, output_file, missing='newer') @@ -584,13 +546,11 @@ def _need_link (self, objects, output_file): newer = newer_group (objects, output_file) return newer - # _need_link () - - def detect_language (self, sources): + def detect_language(self, sources): """Detect the language of a given file, or list of files. Uses language_map, and language_order to do the job. """ - if type(sources) is not ListType: + if not isinstance(sources, list): sources = [sources] lang = None index = len(self.language_order) @@ -606,18 +566,12 @@ def detect_language (self, sources): pass return lang - # detect_language () # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) - def preprocess (self, - source, - output_file=None, - macros=None, - include_dirs=None, - extra_preargs=None, - extra_postargs=None): + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): """Preprocess a single C/C++ source file, named in 'source'. Output will be written to file named 'output_file', or stdout if 'output_file' not supplied. 'macros' is a list of macro @@ -680,10 +634,8 @@ def compile(self, sources, output_dir=None, macros=None, Raises CompileError on failure. """ - # A concrete compiler class can either override this method # entirely or implement _compile(). - macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) @@ -701,17 +653,12 @@ def compile(self, sources, output_dir=None, macros=None, def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): """Compile 'src' to product 'obj'.""" - # A concrete compiler class that does not override compile() # should implement _compile(). pass - def create_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0, - target_lang=None): + def create_static_lib(self, objects, output_libname, output_dir=None, + debug=0, target_lang=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to @@ -742,20 +689,20 @@ def create_static_lib (self, SHARED_LIBRARY = "shared_library" EXECUTABLE = "executable" - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. @@ -804,19 +751,19 @@ def link (self, # Old 'link_*()' methods, rewritten to use the new 'link()' method. - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_lib(self, + objects, + output_libname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, @@ -825,19 +772,19 @@ def link_shared_lib (self, extra_preargs, extra_postargs, build_temp, target_lang) - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_object(self, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, @@ -845,17 +792,17 @@ def link_shared_object (self, extra_preargs, extra_postargs, build_temp, target_lang) - def link_executable (self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - target_lang=None): + def link_executable(self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, @@ -867,34 +814,30 @@ def link_executable (self, # no appropriate default implementation so subclasses should # implement all of these. - def library_dir_option (self, dir): + def library_dir_option(self, dir): """Return the compiler option to add 'dir' to the list of directories searched for libraries. """ raise NotImplementedError - def runtime_library_dir_option (self, dir): + def runtime_library_dir_option(self, dir): """Return the compiler option to add 'dir' to the list of directories searched for runtime libraries. """ raise NotImplementedError - def library_option (self, lib): + def library_option(self, lib): """Return the compiler option to add 'dir' to the list of libraries linked into the shared library or executable. """ raise NotImplementedError - def has_function(self, funcname, - includes=None, - include_dirs=None, - libraries=None, - library_dirs=None): + def has_function(self, funcname, includes=None, include_dirs=None, + libraries=None, library_dirs=None): """Return a boolean indicating whether funcname is supported on the current platform. The optional arguments can be used to augment the compilation environment. """ - # this can't be included at module scope because it tries to # import math which might not be available at that point - maybe # the necessary logic should just be inlined? @@ -982,8 +925,8 @@ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): base = os.path.splitdrive(base)[1] # Chop off the drive base = base[os.path.isabs(base):] # If abs, chop off leading / if ext not in self.src_extensions: - raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % (ext, src_name) + raise UnknownFileError( + "unknown file type '%s' (from '%s')" % (ext, src_name)) if strip_dir: base = os.path.basename(base) obj_names.append(os.path.join(output_dir, @@ -993,24 +936,25 @@ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): def shared_object_filename(self, basename, strip_dir=0, output_dir=''): assert output_dir is not None if strip_dir: - basename = os.path.basename (basename) + basename = os.path.basename(basename) return os.path.join(output_dir, basename + self.shared_lib_extension) def executable_filename(self, basename, strip_dir=0, output_dir=''): assert output_dir is not None if strip_dir: - basename = os.path.basename (basename) + basename = os.path.basename(basename) return os.path.join(output_dir, basename + (self.exe_extension or '')) def library_filename(self, libname, lib_type='static', # or 'shared' strip_dir=0, output_dir=''): assert output_dir is not None if lib_type not in ("static", "shared", "dylib"): - raise ValueError, "'lib_type' must be \"static\", \"shared\" or \"dylib\"" + raise ValueError( + "'lib_type' must be \"static\", \"shared\" or \"dylib\"") fmt = getattr(self, lib_type + "_lib_format") ext = getattr(self, lib_type + "_lib_extension") - dir, base = os.path.split (libname) + dir, base = os.path.split(libname) filename = fmt % (base, ext) if strip_dir: dir = '' @@ -1020,31 +964,28 @@ def library_filename(self, libname, lib_type='static', # or 'shared' # -- Utility methods ----------------------------------------------- - def announce (self, msg, level=1): + def announce(self, msg, level=1): log.debug(msg) - def debug_print (self, msg): + def debug_print(self, msg): from distutils.debug import DEBUG if DEBUG: print(msg) - def warn (self, msg): - sys.stderr.write ("warning: %s\n" % msg) + def warn(self, msg): + sys.stderr.write("warning: %s\n" % msg) - def execute (self, func, args, msg=None, level=1): + def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run) - def spawn (self, cmd): - spawn (cmd, dry_run=self.dry_run) + def spawn(self, cmd): + spawn(cmd, dry_run=self.dry_run) - def move_file (self, src, dst): - return move_file (src, dst, dry_run=self.dry_run) + def move_file(self, src, dst): + return move_file(src, dst, dry_run=self.dry_run) - def mkpath (self, name, mode=0o777): - mkpath (name, mode, self.dry_run) - - -# class CCompiler + def mkpath(self, name, mode=0o777): + mkpath(name, mode, self.dry_run) # Map a sys.platform/os.name ('posix', 'nt') to the default compiler @@ -1068,16 +1009,14 @@ def mkpath (self, name, mode=0o777): ) def get_default_compiler(osname=None, platform=None): + """Determine the default compiler to use for the given platform. - """ Determine the default compiler to use for the given platform. - - osname should be one of the standard Python OS names (i.e. the - ones returned by os.name) and platform the common value - returned by sys.platform for the platform in question. - - The default values are os.name and sys.platform in case the - parameters are not given. + osname should be one of the standard Python OS names (i.e. the + ones returned by os.name) and platform the common value + returned by sys.platform for the platform in question. + The default values are os.name and sys.platform in case the + parameters are not given. """ if osname is None: osname = os.name @@ -1126,11 +1065,7 @@ def show_compilers(): pretty_printer.print_help("List of available compilers:") -def new_compiler (plat=None, - compiler=None, - verbose=0, - dry_run=0, - force=0): +def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0): """Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler @@ -1153,7 +1088,7 @@ def new_compiler (plat=None, msg = "don't know how to compile C/C++ code on platform '%s'" % plat if compiler is not None: msg = msg + " with '%s' compiler" % compiler - raise DistutilsPlatformError, msg + raise DistutilsPlatformError(msg) try: module_name = "distutils." + module_name @@ -1161,21 +1096,21 @@ def new_compiler (plat=None, module = sys.modules[module_name] klass = vars(module)[class_name] except ImportError: - raise DistutilsModuleError, \ + raise DistutilsModuleError( "can't compile C/C++ code: unable to load module '%s'" % \ - module_name + module_name) except KeyError: - raise DistutilsModuleError, \ - ("can't compile C/C++ code: unable to find class '%s' " + - "in module '%s'") % (class_name, module_name) + raise DistutilsModuleError( + "can't compile C/C++ code: unable to find class '%s' " + "in module '%s'" % (class_name, module_name)) # XXX The None is necessary to preserve backwards compatibility # with classes that expect verbose to be the first positional # argument. - return klass (None, dry_run, force) + return klass(None, dry_run, force) -def gen_preprocess_options (macros, include_dirs): +def gen_preprocess_options(macros, include_dirs): """Generate C pre-processor options (-D, -U, -I) as used by at least two types of compilers: the typical Unix compiler and Visual C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) @@ -1196,35 +1131,29 @@ def gen_preprocess_options (macros, include_dirs): # redundancies like this should probably be the province of # CCompiler, since the data structures used are inherited from it # and therefore common to all CCompiler classes. - pp_opts = [] for macro in macros: - - if not (type (macro) is TupleType and - 1 <= len (macro) <= 2): - raise TypeError, \ - ("bad macro definition '%s': " + - "each element of 'macros' list must be a 1- or 2-tuple") % \ - macro - - if len (macro) == 1: # undefine this macro - pp_opts.append ("-U%s" % macro[0]) - elif len (macro) == 2: + if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2): + raise TypeError( + "bad macro definition '%s': " + "each element of 'macros' list must be a 1- or 2-tuple" + % macro) + + if len(macro) == 1: # undefine this macro + pp_opts.append("-U%s" % macro[0]) + elif len(macro) == 2: if macro[1] is None: # define with no explicit value - pp_opts.append ("-D%s" % macro[0]) + pp_opts.append("-D%s" % macro[0]) else: # XXX *don't* need to be clever about quoting the # macro value here, because we're going to avoid the # shell at all costs when we spawn the command! - pp_opts.append ("-D%s=%s" % macro) + pp_opts.append("-D%s=%s" % macro) for dir in include_dirs: - pp_opts.append ("-I%s" % dir) - + pp_opts.append("-I%s" % dir) return pp_opts -# gen_preprocess_options () - def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and @@ -1236,14 +1165,14 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): lib_opts = [] for dir in library_dirs: - lib_opts.append (compiler.library_dir_option (dir)) + lib_opts.append(compiler.library_dir_option(dir)) for dir in runtime_library_dirs: - opt = compiler.runtime_library_dir_option (dir) - if type(opt) is ListType: + opt = compiler.runtime_library_dir_option(dir) + if isinstance(opt, list): lib_opts = lib_opts + opt else: - lib_opts.append (opt) + lib_opts.append(opt) # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to @@ -1252,17 +1181,14 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): # pretty nasty way to arrange your C code. for lib in libraries: - (lib_dir, lib_name) = os.path.split (lib) + (lib_dir, lib_name) = os.path.split(lib) if lib_dir: - lib_file = compiler.find_library_file ([lib_dir], lib_name) + lib_file = compiler.find_library_file([lib_dir], lib_name) if lib_file: - lib_opts.append (lib_file) + lib_opts.append(lib_file) else: - compiler.warn ("no library file corresponding to " - "'%s' found (skipping)" % lib) + compiler.warn("no library file corresponding to " + "'%s' found (skipping)" % lib) else: - lib_opts.append (compiler.library_option (lib)) - + lib_opts.append(compiler.library_option (lib)) return lib_opts - -# gen_lib_options () diff --git a/cmd.py b/cmd.py index b2c952c38c..66940f7799 100644 --- a/cmd.py +++ b/cmd.py @@ -4,8 +4,6 @@ in the distutils.command package. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re @@ -48,7 +46,7 @@ class Command: # -- Creation/initialization methods ------------------------------- - def __init__ (self, dist): + def __init__(self, dist): """Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being @@ -58,9 +56,9 @@ def __init__ (self, dist): from distutils.dist import Distribution if not isinstance(dist, Distribution): - raise TypeError, "dist must be a Distribution instance" + raise TypeError("dist must be a Distribution instance") if self.__class__ is Command: - raise RuntimeError, "Command is an abstract class" + raise RuntimeError("Command is an abstract class") self.distribution = dist self.initialize_options() @@ -95,11 +93,8 @@ def __init__ (self, dist): # always calls 'finalize_options()', to respect/update it. self.finalized = 0 - # __init__ () - # XXX A more explicit way to customize dry_run would be better. - def __getattr__ (self, attr): if attr == 'dry_run': myval = getattr(self, "_" + attr) @@ -108,15 +103,13 @@ def __getattr__ (self, attr): else: return myval else: - raise AttributeError, attr - + raise AttributeError(attr) def ensure_finalized (self): if not self.finalized: self.finalize_options() self.finalized = 1 - # Subclasses must define: # initialize_options() # provide default values for all options; may be customized by @@ -130,7 +123,7 @@ def ensure_finalized (self): # run the command: do whatever it is we're here to do, # controlled by the command's various option values - def initialize_options (self): + def initialize_options(self): """Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the @@ -140,10 +133,10 @@ def initialize_options (self): This method must be implemented by all command classes. """ - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ + raise RuntimeError("abstract method -- subclass %s must override" + % self.__class__) - def finalize_options (self): + def finalize_options(self): """Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been @@ -154,11 +147,11 @@ def finalize_options (self): This method must be implemented by all command classes. """ - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ + raise RuntimeError("abstract method -- subclass %s must override" + % self.__class__) - def dump_options (self, header=None, indent=""): + def dump_options(self, header=None, indent=""): from distutils.fancy_getopt import longopt_xlate if header is None: header = "command options for '%s':" % self.get_command_name() @@ -172,7 +165,7 @@ def dump_options (self, header=None, indent=""): print(indent + "%s = %s" % (option, value)) - def run (self): + def run(self): """A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup @@ -183,16 +176,16 @@ def run (self): This method must be implemented by all command classes. """ - raise RuntimeError, \ - "abstract method -- subclass %s must override" % self.__class__ + raise RuntimeError("abstract method -- subclass %s must override" + % self.__class__) - def announce (self, msg, level=1): + def announce(self, msg, level=1): """If the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout. """ log.log(level, msg) - def debug_print (self, msg): + def debug_print(self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ @@ -202,7 +195,6 @@ def debug_print (self, msg): sys.stdout.flush() - # -- Option validation methods ------------------------------------- # (these are very handy in writing the 'finalize_options()' method) # @@ -216,23 +208,23 @@ def debug_print (self, msg): # and they can be guaranteed that thereafter, self.foo will be # a list of strings. - def _ensure_stringlike (self, option, what, default=None): + def _ensure_stringlike(self, option, what, default=None): val = getattr(self, option) if val is None: setattr(self, option, default) return default elif not isinstance(val, basestring): - raise DistutilsOptionError, \ - "'%s' must be a %s (got `%s`)" % (option, what, val) + raise DistutilsOptionError("'%s' must be a %s (got `%s`)" + % (option, what, val)) return val - def ensure_string (self, option, default=None): + def ensure_string(self, option, default=None): """Ensure that 'option' is a string; if not defined, set it to 'default'. """ self._ensure_stringlike(option, "string", default) - def ensure_string_list (self, option): + def ensure_string_list(self, option): """Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become @@ -247,27 +239,26 @@ def ensure_string_list (self, option): if isinstance(val, list): ok = all(isinstance(v, basestring) for v in val) else: - ok = 0 - + ok = False if not ok: - raise DistutilsOptionError, \ - "'%s' must be a list of strings (got %r)" % \ - (option, val) + raise DistutilsOptionError( + "'%s' must be a list of strings (got %r)" + % (option, val)) - def _ensure_tested_string (self, option, tester, - what, error_fmt, default=None): + def _ensure_tested_string(self, option, tester, what, error_fmt, + default=None): val = self._ensure_stringlike(option, what, default) if val is not None and not tester(val): - raise DistutilsOptionError, \ - ("error in '%s' option: " + error_fmt) % (option, val) + raise DistutilsOptionError(("error in '%s' option: " + error_fmt) + % (option, val)) - def ensure_filename (self, option): + def ensure_filename(self, option): """Ensure that 'option' is the name of an existing file.""" self._ensure_tested_string(option, os.path.isfile, "filename", "'%s' does not exist or is not a file") - def ensure_dirname (self, option): + def ensure_dirname(self, option): self._ensure_tested_string(option, os.path.isdir, "directory name", "'%s' does not exist or is not a directory") @@ -275,14 +266,13 @@ def ensure_dirname (self, option): # -- Convenience methods for commands ------------------------------ - def get_command_name (self): + def get_command_name(self): if hasattr(self, 'command_name'): return self.command_name else: return self.__class__.__name__ - - def set_undefined_options (self, src_cmd, *option_pairs): + def set_undefined_options(self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option @@ -296,18 +286,14 @@ def set_undefined_options (self, src_cmd, *option_pairs): 'src_option' in the 'src_cmd' command object, and copy it to 'dst_option' in the current command object". """ - # Option_pairs: list of (src_option, dst_option) tuples - src_cmd_obj = self.distribution.get_command_obj(src_cmd) src_cmd_obj.ensure_finalized() for (src_option, dst_option) in option_pairs: if getattr(self, dst_option) is None: - setattr(self, dst_option, - getattr(src_cmd_obj, src_option)) + setattr(self, dst_option, getattr(src_cmd_obj, src_option)) - - def get_finalized_command (self, command, create=1): + def get_finalized_command(self, command, create=1): """Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command', call its 'ensure_finalized()' method, and return the @@ -319,19 +305,18 @@ def get_finalized_command (self, command, create=1): # XXX rename to 'get_reinitialized_command()'? (should do the # same in dist.py, if so) - def reinitialize_command (self, command, reinit_subcommands=0): - return self.distribution.reinitialize_command( - command, reinit_subcommands) + def reinitialize_command(self, command, reinit_subcommands=0): + return self.distribution.reinitialize_command(command, + reinit_subcommands) - def run_command (self, command): + def run_command(self, command): """Run some other command: uses the 'run_command()' method of Distribution, which creates and finalizes the command object if necessary and then invokes its 'run()' method. """ self.distribution.run_command(command) - - def get_sub_commands (self): + def get_sub_commands(self): """Determine the sub-commands that are relevant in the current distribution (ie., that need to be run). This is based on the 'sub_commands' class attribute: each tuple in that list may include @@ -347,62 +332,49 @@ def get_sub_commands (self): # -- External world manipulation ----------------------------------- - def warn (self, msg): - sys.stderr.write("warning: %s: %s\n" % - (self.get_command_name(), msg)) - + def warn(self, msg): + sys.stderr.write("warning: %s: %s\n" % (self.get_command_name(), msg)) - def execute (self, func, args, msg=None, level=1): + def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) - - def mkpath (self, name, mode=0o777): + def mkpath(self, name, mode=0o777): dir_util.mkpath(name, mode, dry_run=self.dry_run) - - def copy_file (self, infile, outfile, - preserve_mode=1, preserve_times=1, link=None, level=1): + def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1, + link=None, level=1): """Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)""" + return file_util.copy_file(infile, outfile, preserve_mode, + preserve_times, not self.force, link, + dry_run=self.dry_run) - return file_util.copy_file( - infile, outfile, - preserve_mode, preserve_times, - not self.force, - link, - dry_run=self.dry_run) - - - def copy_tree (self, infile, outfile, - preserve_mode=1, preserve_times=1, preserve_symlinks=0, - level=1): + def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, + preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, and force flags. """ - return dir_util.copy_tree( - infile, outfile, - preserve_mode,preserve_times,preserve_symlinks, - not self.force, - dry_run=self.dry_run) + return dir_util.copy_tree(infile, outfile, preserve_mode, + preserve_times, preserve_symlinks, + not self.force, dry_run=self.dry_run) def move_file (self, src, dst, level=1): """Move a file respectin dry-run flag.""" - return file_util.move_file(src, dst, dry_run = self.dry_run) + return file_util.move_file(src, dst, dry_run=self.dry_run) - def spawn (self, cmd, search_path=1, level=1): + def spawn(self, cmd, search_path=1, level=1): """Spawn an external command respecting dry-run flag.""" from distutils.spawn import spawn - spawn(cmd, search_path, dry_run= self.dry_run) + spawn(cmd, search_path, dry_run=self.dry_run) - def make_archive (self, base_name, format, - root_dir=None, base_dir=None): - return archive_util.make_archive( - base_name, format, root_dir, base_dir, dry_run=self.dry_run) + def make_archive(self, base_name, format, root_dir=None, base_dir=None): + return archive_util.make_archive(base_name, format, root_dir, base_dir, + dry_run=self.dry_run) - def make_file (self, infiles, outfile, func, args, - exec_msg=None, skip_msg=None, level=1): + def make_file(self, infiles, outfile, func, args, + exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different @@ -412,8 +384,7 @@ def make_file (self, infiles, outfile, func, args, timestamp checks. """ if exec_msg is None: - exec_msg = "generating %s from %s" % \ - (outfile, ', '.join(infiles)) + exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile @@ -422,30 +393,25 @@ def make_file (self, infiles, outfile, func, args, if isinstance(infiles, basestring): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): - raise TypeError, \ - "'infiles' must be a string, or a list or tuple of strings" + raise TypeError( + "'infiles' must be a string, or a list or tuple of strings") # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it if self.force or dep_util.newer_group (infiles, outfile): self.execute(func, args, exec_msg, level) - # Otherwise, print the "skip" message else: log.debug(skip_msg) - # make_file () - -# class Command - # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being. -class install_misc (Command): +class install_misc(Command): """Common base class for installing some files in a subdirectory. Currently used by install_data and install_scripts. """ diff --git a/command/__init__.py b/command/__init__.py index 0888c2712b..add83f8740 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -3,8 +3,6 @@ Package containing implementation of all the standard Distutils commands.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" __all__ = ['build', diff --git a/command/bdist.py b/command/bdist.py index d6897d2d09..69c1b28ff2 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,22 +3,19 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os -from types import * from distutils.core import Command from distutils.errors import * from distutils.util import get_platform -def show_formats (): +def show_formats(): """Print list of available formats (arguments to "--format" option). """ from distutils.fancy_getopt import FancyGetopt - formats=[] + formats = [] for format in bdist.format_commands: formats.append(("formats=" + format, None, bdist.format_command[format][1])) @@ -26,7 +23,7 @@ def show_formats (): pretty_printer.print_help("List of available distribution formats:") -class bdist (Command): +class bdist(Command): description = "create a built (binary) distribution" @@ -84,17 +81,14 @@ class bdist (Command): } - def initialize_options (self): + def initialize_options(self): self.bdist_base = None self.plat_name = None self.formats = None self.dist_dir = None self.skip_build = 0 - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' if self.plat_name is None: self.plat_name = get_platform() @@ -112,25 +106,21 @@ def finalize_options (self): try: self.formats = [self.default_format[os.name]] except KeyError: - raise DistutilsPlatformError, \ - "don't know how to create built distributions " + \ - "on platform %s" % os.name + raise DistutilsPlatformError( + "don't know how to create built distributions " + "on platform %s" % os.name) if self.dist_dir is None: self.dist_dir = "dist" - # finalize_options() - - - def run (self): - + def run(self): # Figure out which sub-commands we need to run. commands = [] for format in self.formats: try: commands.append(self.format_command[format][0]) except KeyError: - raise DistutilsOptionError, "invalid format '%s'" % format + raise DistutilsOptionError("invalid format '%s'" % format) # Reinitialize and run each command. for i in range(len(self.formats)): @@ -144,7 +134,3 @@ def run (self): if cmd_name in commands[i+1:]: sub_cmd.keep_temp = 1 self.run_command(cmd_name) - - # run() - -# class bdist diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index ccba00955a..f89961769c 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,8 +4,6 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -16,7 +14,7 @@ from distutils.sysconfig import get_python_version from distutils import log -class bdist_dumb (Command): +class bdist_dumb(Command): description = "create a \"dumb\" built distribution" @@ -45,8 +43,7 @@ class bdist_dumb (Command): 'nt': 'zip', 'os2': 'zip' } - - def initialize_options (self): + def initialize_options(self): self.bdist_dir = None self.plat_name = None self.format = None @@ -55,11 +52,7 @@ def initialize_options (self): self.skip_build = 0 self.relative = 0 - # initialize_options() - - - def finalize_options (self): - + def finalize_options(self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'dumb') @@ -68,19 +61,15 @@ def finalize_options (self): try: self.format = self.default_format[os.name] except KeyError: - raise DistutilsPlatformError, \ - ("don't know how to create dumb built distributions " + - "on platform %s") % os.name + raise DistutilsPlatformError( + "don't know how to create dumb built distributions " + "on platform %s" % os.name) self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), ('plat_name', 'plat_name')) - # finalize_options() - - - def run (self): - + def run(self): if not self.skip_build: self.run_command('build') @@ -108,8 +97,8 @@ def run (self): else: if (self.distribution.has_ext_modules() and (install.install_base != install.install_platbase)): - raise DistutilsPlatformError, \ - ("can't make a dumb built distribution where " + raise DistutilsPlatformError( + "can't make a dumb built distribution where " "base and platbase are different (%s, %s)" % (repr(install.install_base), repr(install.install_platbase))) @@ -129,7 +118,3 @@ def run (self): if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) - - # run() - -# class bdist_dumb diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 5225bed1b2..d313a5082f 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -81,7 +81,7 @@ def xbutton(self, name, title, next, xpos): Return the button, so that events can be associated""" return self.pushbutton(name, int(self.w*xpos - 28), self.h-27, 56, 17, 3, title, next) -class bdist_msi (Command): +class bdist_msi(Command): description = "create a Microsoft Installer (.msi) binary distribution" @@ -114,7 +114,7 @@ class bdist_msi (Command): boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', 'skip-build'] - def initialize_options (self): + def initialize_options(self): self.bdist_dir = None self.keep_temp = 0 self.no_target_compile = 0 @@ -125,7 +125,7 @@ def initialize_options (self): self.install_script = None self.pre_install_script = None - def finalize_options (self): + def finalize_options(self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') @@ -133,30 +133,29 @@ def finalize_options (self): if self.target_version: if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: - raise DistutilsOptionError, \ - "target version can only be %s, or the '--skip_build'" \ - " option must be specified" % (short_version,) + raise DistutilsOptionError( + "target version can only be %s, or the '--skip_build'" + " option must be specified" % (short_version,)) else: self.target_version = short_version self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) if self.pre_install_script: - raise DistutilsOptionError, "the pre-install-script feature is not yet implemented" + raise DistutilsOptionError( + "the pre-install-script feature is not yet implemented") if self.install_script: for script in self.distribution.scripts: if self.install_script == os.path.basename(script): break else: - raise DistutilsOptionError, \ - "install_script '%s' not found in scripts" % \ - self.install_script + raise DistutilsOptionError( + "install_script '%s' not found in scripts" + % self.install_script) self.install_script_key = None - # finalize_options() - - def run (self): + def run(self): if not self.skip_build: self.run_command('build') @@ -263,7 +262,8 @@ def add_files(self): key = dir.add_file(file) if file==self.install_script: if self.install_script_key: - raise DistutilsOptionError, "Multiple files with name %s" % file + raise DistutilsOptionError( + "Multiple files with name %s" % file) self.install_script_key = '[#%s]' % key cab.commit(db) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index ef2bdfd808..72f74f9c53 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,13 +3,10 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os import glob -from types import * from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform @@ -18,7 +15,7 @@ from distutils.sysconfig import get_python_version from distutils import log -class bdist_rpm (Command): +class bdist_rpm(Command): description = "create an RPM distribution" @@ -136,7 +133,7 @@ class bdist_rpm (Command): 'rpm2-mode': 'rpm3-mode'} - def initialize_options (self): + def initialize_options(self): self.bdist_base = None self.rpm_base = None self.dist_dir = None @@ -180,15 +177,12 @@ def initialize_options (self): self.force_arch = None - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) if self.rpm_base is None: if not self.rpm3_mode: - raise DistutilsOptionError, \ - "you must specify --rpm-base in RPM 2 mode" + raise DistutilsOptionError( + "you must specify --rpm-base in RPM 2 mode") self.rpm_base = os.path.join(self.bdist_base, "rpm") if self.python is None: @@ -197,16 +191,15 @@ def finalize_options (self): else: self.python = "python" elif self.fix_python: - raise DistutilsOptionError, \ - "--python and --fix-python are mutually exclusive options" + raise DistutilsOptionError( + "--python and --fix-python are mutually exclusive options") if os.name != 'posix': - raise DistutilsPlatformError, \ - ("don't know how to create RPM " + raise DistutilsPlatformError("don't know how to create RPM " "distributions on platform %s" % os.name) if self.binary_only and self.source_only: - raise DistutilsOptionError, \ - "cannot supply both '--source-only' and '--binary-only'" + raise DistutilsOptionError( + "cannot supply both '--source-only' and '--binary-only'") # don't pass CFLAGS to pure python distributions if not self.distribution.has_ext_modules(): @@ -215,16 +208,14 @@ def finalize_options (self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) self.finalize_package_data() - # finalize_options() - - def finalize_package_data (self): + def finalize_package_data(self): self.ensure_string('group', "Development/Libraries") self.ensure_string('vendor', "%s <%s>" % (self.distribution.get_contact(), self.distribution.get_contact_email())) self.ensure_string('packager') self.ensure_string_list('doc_files') - if type(self.doc_files) is ListType: + if isinstance(self.doc_files, list): for readme in ('README', 'README.txt'): if os.path.exists(readme) and readme not in self.doc_files: self.doc_files.append(readme) @@ -261,11 +252,8 @@ def finalize_package_data (self): self.ensure_string_list('obsoletes') self.ensure_string('force_arch') - # finalize_package_data () - - - def run (self): + def run(self): if DEBUG: print("before _get_package_data():") print("vendor =", self.vendor) @@ -315,9 +303,8 @@ def run (self): if os.path.exists(self.icon): self.copy_file(self.icon, source_dir) else: - raise DistutilsFileError, \ - "icon file '%s' does not exist" % self.icon - + raise DistutilsFileError( + "icon file '%s' does not exist" % self.icon) # build package log.info("building RPMs") @@ -350,7 +337,7 @@ def run (self): out = os.popen(q_cmd) binary_rpms = [] source_rpm = None - while 1: + while True: line = out.readline() if not line: break @@ -378,7 +365,6 @@ def run (self): rpm = os.path.join(rpm_dir['RPMS'], rpm) if os.path.exists(rpm): self.move_file(rpm, self.dist_dir) - # run() def _dist_path(self, path): return os.path.join(self.dist_dir, os.path.basename(path)) @@ -438,7 +424,7 @@ def _make_spec_file(self): 'Obsoletes', ): val = getattr(self, field.lower()) - if type(val) is ListType: + if isinstance(val, list): spec_file.append('%s: %s' % (field, ' '.join(val))) elif val is not None: spec_file.append('%s: %s' % (field, val)) @@ -536,8 +522,6 @@ def _make_spec_file(self): return spec_file - # _make_spec_file () - def _format_changelog(self, changelog): """Format the changelog correctly and convert it to a list of strings """ @@ -558,7 +542,3 @@ def _format_changelog(self, changelog): del new_changelog[0] return new_changelog - - # _format_changelog() - -# class bdist_rpm diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 55d5d7e1b1..249b74c1bb 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os @@ -15,7 +13,7 @@ from distutils.sysconfig import get_python_version from distutils import log -class bdist_wininst (Command): +class bdist_wininst(Command): description = "create an executable installer for MS Windows" @@ -52,7 +50,7 @@ class bdist_wininst (Command): boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', 'skip-build'] - def initialize_options (self): + def initialize_options(self): self.bdist_dir = None self.keep_temp = 0 self.no_target_compile = 0 @@ -65,10 +63,8 @@ def initialize_options (self): self.install_script = None self.pre_install_script = None - # initialize_options() - - def finalize_options (self): + def finalize_options(self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') @@ -77,9 +73,9 @@ def finalize_options (self): if not self.skip_build and self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: - raise DistutilsOptionError, \ + raise DistutilsOptionError( "target version can only be %s, or the '--skip_build'" \ - " option must be specified" % (short_version,) + " option must be specified" % (short_version,)) self.target_version = short_version self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) @@ -89,13 +85,11 @@ def finalize_options (self): if self.install_script == os.path.basename(script): break else: - raise DistutilsOptionError, \ - "install_script '%s' not found in scripts" % \ - self.install_script - # finalize_options() + raise DistutilsOptionError( + "install_script '%s' not found in scripts" + % self.install_script) - - def run (self): + def run(self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): @@ -175,11 +169,8 @@ def run (self): if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) - # run() - - def get_inidata (self): + def get_inidata(self): # Return data describing the installation. - lines = [] metadata = self.distribution.metadata @@ -222,9 +213,7 @@ def escape(s): lines.append("build_info=%s" % build_info) return "\n".join(lines) - # get_inidata() - - def create_exe (self, arcname, fullname, bitmap=None): + def create_exe(self, arcname, fullname, bitmap=None): import struct self.mkpath(self.dist_dir) @@ -272,8 +261,6 @@ def create_exe (self, arcname, fullname, bitmap=None): file.write(header) file.write(open(arcname, "rb").read()) - # create_exe() - def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses if self.target_version: @@ -286,9 +273,8 @@ def get_installer_filename(self, fullname): installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) return installer_name - # get_installer_filename() - def get_exe_bytes (self): + def get_exe_bytes(self): from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. @@ -320,4 +306,3 @@ def get_exe_bytes (self): # used for python. XXX What about mingw, borland, and so on? filename = os.path.join(directory, "wininst-%s.exe" % bv) return open(filename, "rb").read() -# class bdist_wininst diff --git a/command/build.py b/command/build.py index 9ae0a292a3..1f2ce06205 100644 --- a/command/build.py +++ b/command/build.py @@ -2,8 +2,6 @@ Implements the Distutils 'build' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os @@ -11,12 +9,12 @@ from distutils.util import get_platform -def show_compilers (): +def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() -class build (Command): +class build(Command): description = "build everything needed to install" @@ -51,7 +49,7 @@ class build (Command): "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.build_base = 'build' # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) @@ -65,8 +63,7 @@ def initialize_options (self): self.force = 0 self.executable = None - def finalize_options (self): - + def finalize_options(self): plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) # 'build_purelib' and 'build_platlib' just default to 'lib' and @@ -98,11 +95,8 @@ def finalize_options (self): if self.executable is None: self.executable = os.path.normpath(sys.executable) - # finalize_options () - - - def run (self): + def run(self): # Run all relevant sub-commands. This will be some subset of: # - build_py - pure Python modules # - build_clib - standalone C libraries @@ -114,16 +108,16 @@ def run (self): # -- Predicates for the sub-command list --------------------------- - def has_pure_modules (self): + def has_pure_modules(self): return self.distribution.has_pure_modules() - def has_c_libraries (self): + def has_c_libraries(self): return self.distribution.has_c_libraries() - def has_ext_modules (self): + def has_ext_modules(self): return self.distribution.has_ext_modules() - def has_scripts (self): + def has_scripts(self): return self.distribution.has_scripts() @@ -132,5 +126,3 @@ def has_scripts (self): ('build_ext', has_ext_modules), ('build_scripts', has_scripts), ] - -# class build diff --git a/command/build_clib.py b/command/build_clib.py index bdf98bf3f2..5f95207ca9 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,8 +4,6 @@ that is included in the module distribution and needed by an extension module.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" @@ -19,18 +17,17 @@ # cut 'n paste. Sigh. import os -from types import * from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler from distutils import log -def show_compilers (): +def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() -class build_clib (Command): +class build_clib(Command): description = "build C/C++ libraries used by Python extensions" @@ -54,7 +51,7 @@ class build_clib (Command): "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.build_clib = None self.build_temp = None @@ -69,11 +66,8 @@ def initialize_options (self): self.force = 0 self.compiler = None - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): # This might be confusing: both build-clib and build-temp default # to build-temp as defined by the "build" command. This is because # I think that C libraries are really just temporary build @@ -98,11 +92,8 @@ def finalize_options (self): # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? - # finalize_options() - - - def run (self): + def run(self): if not self.libraries: return @@ -125,51 +116,41 @@ def run (self): self.build_libraries(self.libraries) - # run() - - def check_library_list (self, libraries): + def check_library_list(self, libraries): """Ensure that the list of libraries (presumably provided as a command option 'libraries') is valid, i.e. it is a list of 2-tuples, where the tuples are (library_name, build_info_dict). Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise.""" - # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, # with only names changed to protect the innocent! - - if type(libraries) is not ListType: - raise DistutilsSetupError, \ - "'libraries' option must be a list of tuples" + if not isinstance(libraries, list): + raise DistutilsSetupError( + "'libraries' option must be a list of tuples") for lib in libraries: - if type(lib) is not TupleType and len(lib) != 2: - raise DistutilsSetupError, \ - "each element of 'libraries' must a 2-tuple" + if not isinstance(lib, tuple) and len(lib) != 2: + raise DistutilsSetupError( + "each element of 'libraries' must a 2-tuple") if isinstance(lib[0], basestring): - raise DistutilsSetupError, \ - "first element of each tuple in 'libraries' " + \ - "must be a string (the library name)" + raise DistutilsSetupError( + "first element of each tuple in 'libraries' " + "must be a string (the library name)") if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): - raise DistutilsSetupError, \ - ("bad library name '%s': " + - "may not contain directory separators") % \ - lib[0] - - if type(lib[1]) is not DictionaryType: - raise DistutilsSetupError, \ - "second element of each tuple in 'libraries' " + \ - "must be a dictionary (build info)" - # for lib + raise DistutilsSetupError("bad library name '%s': " + "may not contain directory separators" % lib[0]) - # check_library_list () + if not isinstance(lib[1], dict): + raise DistutilsSetupError( + "second element of each tuple in 'libraries' " + "must be a dictionary (build info)") - def get_library_names (self): + def get_library_names(self): # Assume the library list is valid -- 'check_library_list()' is # called from 'finalize_options()', so it should be! - if not self.libraries: return None @@ -178,36 +159,30 @@ def get_library_names (self): lib_names.append(lib_name) return lib_names - # get_library_names () - - def get_source_files (self): + def get_source_files(self): self.check_library_list(self.libraries) filenames = [] for (lib_name, build_info) in self.libraries: sources = build_info.get('sources') - if (sources is None or - type(sources) not in (ListType, TupleType) ): - raise DistutilsSetupError, \ - ("in 'libraries' option (library '%s'), " + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " "'sources' must be present and must be " - "a list of source filenames") % lib_name + "a list of source filenames" % lib_name) filenames.extend(sources) - return filenames - # get_source_files () - - def build_libraries (self, libraries): + def build_libraries(self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get('sources') - if sources is None or type(sources) not in (ListType, TupleType): - raise DistutilsSetupError, \ - ("in 'libraries' option (library '%s'), " + - "'sources' must be present and must be " + - "a list of source filenames") % lib_name + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames" % lib_name) sources = list(sources) log.info("building '%s' library", lib_name) @@ -229,9 +204,3 @@ def build_libraries (self, libraries): self.compiler.create_static_lib(objects, lib_name, output_dir=self.build_clib, debug=self.debug) - - # for libraries - - # build_libraries () - -# class build_lib diff --git a/command/build_ext.py b/command/build_ext.py index 0236a26835..a439c49ac6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,12 +4,9 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re -from types import * from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -28,7 +25,7 @@ def show_compilers (): show_compilers() -class build_ext (Command): +class build_ext(Command): description = "build C/C++ extensions (compile/link to build directory)" @@ -94,7 +91,7 @@ class build_ext (Command): "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.extensions = None self.build_lib = None self.build_temp = None @@ -115,7 +112,7 @@ def initialize_options (self): self.swig_cpp = None self.swig_opts = None - def finalize_options (self): + def finalize_options(self): from distutils import sysconfig self.set_undefined_options('build', @@ -130,7 +127,6 @@ def finalize_options (self): self.extensions = self.distribution.ext_modules - # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. py_include = sysconfig.get_python_inc() @@ -226,11 +222,7 @@ def finalize_options (self): else: self.swig_opts = self.swig_opts.split(' ') - # finalize_options () - - - def run (self): - + def run(self): from distutils.ccompiler import new_compiler # 'self.extensions', as supplied by setup.py, is a list of @@ -289,10 +281,7 @@ def run (self): # Now actually compile and link everything. self.build_extensions() - # run () - - - def check_extensions_list (self, extensions): + def check_extensions_list(self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, @@ -302,34 +291,33 @@ def check_extensions_list (self, extensions): Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise. """ - if type(extensions) is not ListType: - raise DistutilsSetupError, \ - "'ext_modules' option must be a list of Extension instances" + if not isinstance(extensions, list): + raise DistutilsSetupError( + "'ext_modules' option must be a list of Extension instances") - for i in range(len(extensions)): - ext = extensions[i] + for i, ext in enumerate(extensions): if isinstance(ext, Extension): continue # OK! (assume type-checking done # by Extension constructor) (ext_name, build_info) = ext - log.warn(("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name)) - if type(ext) is not TupleType and len(ext) != 2: - raise DistutilsSetupError, \ - ("each element of 'ext_modules' option must be an " + log.warn("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name) + if not isinstance(ext, tuple) and len(ext) != 2: + raise DistutilsSetupError( + "each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") if not (isinstance(ext_name, basestring) and extension_name_re.match(ext_name)): - raise DistutilsSetupError, \ - ("first element of each tuple in 'ext_modules' " + raise DistutilsSetupError( + "first element of each tuple in 'ext_modules' " "must be the extension name (a string)") - if type(build_info) is not DictionaryType: - raise DistutilsSetupError, \ - ("second element of each tuple in 'ext_modules' " + if not instance(build_info, DictionaryType): + raise DistutilsSetupError( + "second element of each tuple in 'ext_modules' " "must be a dictionary (build info)") # OK, the (ext_name, build_info) dict is type-safe: convert it @@ -361,11 +349,10 @@ def check_extensions_list (self, extensions): ext.define_macros = [] ext.undef_macros = [] for macro in macros: - if not (type(macro) is TupleType and - 1 <= len(macro) <= 2): - raise DistutilsSetupError, \ - ("'macros' element of build info dict " - "must be 1- or 2-tuple") + if not (isinstance(macro, tuple) and len(macro) in (1, 2)): + raise DistutilsSetupError( + "'macros' element of build info dict " + "must be 1- or 2-tuple") if len(macro) == 1: ext.undef_macros.append(macro[0]) elif len(macro) == 2: @@ -373,24 +360,16 @@ def check_extensions_list (self, extensions): extensions[i] = ext - # for extensions - - # check_extensions_list () - - - def get_source_files (self): + def get_source_files(self): self.check_extensions_list(self.extensions) filenames = [] # Wouldn't it be neat if we knew the names of header files too... for ext in self.extensions: filenames.extend(ext.sources) - return filenames - - def get_outputs (self): - + def get_outputs(self): # Sanity check the 'extensions' list -- can't assume this is being # done in the same run as a 'build_extensions()' call (in fact, we # can probably assume that it *isn't*!). @@ -406,8 +385,6 @@ def get_outputs (self): self.get_ext_filename(fullname))) return outputs - # get_outputs () - def build_extensions(self): # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) @@ -417,11 +394,11 @@ def build_extensions(self): def build_extension(self, ext): sources = ext.sources - if sources is None or type(sources) not in (ListType, TupleType): - raise DistutilsSetupError, \ - ("in 'ext_modules' option (extension '%s'), " + - "'sources' must be present and must be " + - "a list of source filenames") % ext.name + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + "in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + "a list of source filenames" % ext.name) sources = list(sources) fullname = self.get_ext_fullname(ext.name) @@ -512,15 +489,12 @@ def build_extension(self, ext): build_temp=self.build_temp, target_lang=language) - - def swig_sources (self, sources, extension): - + def swig_sources(self, sources, extension): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ - new_sources = [] swig_sources = [] swig_targets = {} @@ -569,18 +543,14 @@ def swig_sources (self, sources, extension): return new_sources - # swig_sources () - - def find_swig (self): + def find_swig(self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """ - if os.name == "posix": return "swig" elif os.name == "nt": - # Look for SWIG in its standard installation directory on # Windows (or so I presume!). If we find it there, great; # if not, act like Unix and assume it's in the PATH. @@ -590,33 +560,28 @@ def find_swig (self): return fn else: return "swig.exe" - elif os.name == "os2": # assume swig available in the PATH. return "swig.exe" - else: - raise DistutilsPlatformError, \ - ("I don't know how to find (much less run) SWIG " - "on platform '%s'") % os.name - - # find_swig () + raise DistutilsPlatformError( + "I don't know how to find (much less run) SWIG " + "on platform '%s'" % os.name) # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) - def get_ext_fullname (self, ext_name): + def get_ext_fullname(self, ext_name): if self.package is None: return ext_name else: return self.package + '.' + ext_name - def get_ext_filename (self, ext_name): + def get_ext_filename(self, ext_name): r"""Convert the name of an extension (eg. "foo.bar") into the name of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - from distutils.sysconfig import get_config_var ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( @@ -628,19 +593,18 @@ def get_ext_filename (self, ext_name): return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext - def get_export_symbols (self, ext): + def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "init" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols - def get_libraries (self, ext): + def get_libraries(self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows and OS/2, we add the Python library (eg. python20.dll). @@ -699,11 +663,9 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib, "m"] + extra - elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries - else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): @@ -713,5 +675,3 @@ def get_libraries (self, ext): return ext.libraries + [pythonlib] else: return ext.libraries - -# class build_ext diff --git a/command/build_py.py b/command/build_py.py index 8f5609084c..454424f333 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,12 +2,9 @@ Implements the Distutils 'build_py' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import * from glob import glob from distutils.core import Command @@ -32,8 +29,7 @@ class build_py (Command): boolean_options = ['compile', 'force'] negative_opt = {'no-compile' : 'compile'} - - def initialize_options (self): + def initialize_options(self): self.build_lib = None self.py_modules = None self.package = None @@ -43,7 +39,7 @@ def initialize_options (self): self.optimize = 0 self.force = None - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('build', ('build_lib', 'build_lib'), ('force', 'force')) @@ -61,15 +57,14 @@ def finalize_options (self): # Ick, copied straight from install_lib.py (fancy_getopt needs a # type system! Hell, *everything* needs a type system!!!) - if type(self.optimize) is not IntType: + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) assert 0 <= self.optimize <= 2 except (ValueError, AssertionError): - raise DistutilsOptionError, "optimize must be 0, 1, or 2" - - def run (self): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + def run(self): # XXX copy_file by default preserves atime and mtime. IMHO this is # the right thing to do, but perhaps it should be an option -- in # particular, a site administrator might want installed files to @@ -99,9 +94,7 @@ def run (self): self.byte_compile(self.get_outputs(include_bytecode=0)) - # run () - - def get_data_files (self): + def get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" data = [] if not self.packages: @@ -125,7 +118,7 @@ def get_data_files (self): data.append((package, src_dir, build_dir, filenames)) return data - def find_data_files (self, package, src_dir): + def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" globs = (self.package_data.get('', []) + self.package_data.get(package, [])) @@ -137,7 +130,7 @@ def find_data_files (self, package, src_dir): files.extend([fn for fn in filelist if fn not in files]) return files - def build_package_data (self): + def build_package_data(self): """Copy data files into build directory""" lastdir = None for package, src_dir, build_dir, filenames in self.data_files: @@ -147,11 +140,10 @@ def build_package_data (self): self.copy_file(os.path.join(src_dir, filename), target, preserve_mode=False) - def get_package_dir (self, package): + def get_package_dir(self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = package.split('.') if not self.package_dir: @@ -187,23 +179,19 @@ def get_package_dir (self, package): else: return '' - # get_package_dir () - - - def check_package (self, package, package_dir): - + def check_package(self, package, package_dir): # Empty dir name means current directory, which we can probably # assume exists. Also, os.path.exists and isdir don't know about # my "empty string means current dir" convention, so we have to # circumvent them. if package_dir != "": if not os.path.exists(package_dir): - raise DistutilsFileError, \ - "package directory '%s' does not exist" % package_dir + raise DistutilsFileError( + "package directory '%s' does not exist" % package_dir) if not os.path.isdir(package_dir): - raise DistutilsFileError, \ - ("supposed package directory '%s' exists, " + - "but is not a directory") % package_dir + raise DistutilsFileError( + "supposed package directory '%s' exists, " + "but is not a directory" % package_dir) # Require __init__.py for all but the "root package" if package: @@ -218,20 +206,14 @@ def check_package (self, package, package_dir): # __init__.py doesn't exist -- so don't return the filename. return None - # check_package () - - - def check_module (self, module, module_file): + def check_module(self, module, module_file): if not os.path.isfile(module_file): log.warn("file %s (for module %s) not found", module_file, module) - return 0 + return False else: - return 1 + return True - # check_module () - - - def find_package_modules (self, package, package_dir): + def find_package_modules(self, package, package_dir): self.check_package(package, package_dir) module_files = glob(os.path.join(package_dir, "*.py")) modules = [] @@ -246,8 +228,7 @@ def find_package_modules (self, package, package_dir): self.debug_print("excluding %s" % setup_script) return modules - - def find_modules (self): + def find_modules(self): """Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through @@ -256,7 +237,6 @@ def find_modules (self): ".py" file (relative to the distribution root) that implements the module. """ - # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for @@ -272,7 +252,6 @@ def find_modules (self): # just the "package" for a toplevel is empty (either an empty # string or empty list, depending on context). Differences: # - don't check for __init__.py in directory for empty package - for module in self.py_modules: path = module.split('.') package = '.'.join(path[0:-1]) @@ -301,16 +280,12 @@ def find_modules (self): return modules - # find_modules () - - - def find_all_modules (self): + def find_all_modules(self): """Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.""" - modules = [] if self.py_modules: modules.extend(self.find_modules()) @@ -319,28 +294,16 @@ def find_all_modules (self): package_dir = self.get_package_dir(package) m = self.find_package_modules(package, package_dir) modules.extend(m) - return modules - # find_all_modules () + def get_source_files(self): + return [module[-1] for module in self.find_all_modules()] - - def get_source_files (self): - - modules = self.find_all_modules() - filenames = [] - for module in modules: - filenames.append(module[-1]) - - return filenames - - - def get_module_outfile (self, build_dir, package, module): + def get_module_outfile(self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] return os.path.join(*outfile_path) - - def get_outputs (self, include_bytecode=1): + def get_outputs(self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: @@ -361,13 +324,12 @@ def get_outputs (self, include_bytecode=1): return outputs - - def build_module (self, module, module_file, package): + def build_module(self, module, module_file, package): if isinstance(package, basestring): package = package.split('.') - elif type(package) not in (ListType, TupleType): - raise TypeError, \ - "'package' must be a string (dot-separated), list, or tuple" + elif not isinstance(package, (list, tuple)): + raise TypeError( + "'package' must be a string (dot-separated), list, or tuple") # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_lib (the build @@ -377,25 +339,17 @@ def build_module (self, module, module_file, package): self.mkpath(dir) return self.copy_file(module_file, outfile, preserve_mode=0) - - def build_modules (self): - + def build_modules(self): modules = self.find_modules() for (package, module, module_file) in modules: - # Now "build" the module -- ie. copy the source file to # self.build_lib (the build directory for Python source). # (Actually, it gets copied to the directory for this package # under self.build_lib.) self.build_module(module, module_file, package) - # build_modules () - - - def build_packages (self): - + def build_packages(self): for package in self.packages: - # Get list of (package, module, module_file) tuples based on # scanning the package directory. 'package' is only included # in the tuple so that 'find_modules()' and @@ -414,10 +368,7 @@ def build_packages (self): assert package == package_ self.build_module(module, module_file, package) - # build_packages () - - - def byte_compile (self, files): + def byte_compile(self, files): from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: @@ -426,12 +377,9 @@ def byte_compile (self, files): # XXX this code is essentially the same as the 'byte_compile() # method of the "install_lib" command, except for the determination # of the 'prefix' string. Hmmm. - if self.compile: byte_compile(files, optimize=0, force=self.force, prefix=prefix, dry_run=self.dry_run) if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) - -# class build_py diff --git a/command/build_scripts.py b/command/build_scripts.py index 511b82f999..176e6e1073 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_scripts' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re @@ -17,7 +15,7 @@ # check if Python is called on the first line with this expression first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') -class build_scripts (Command): +class build_scripts(Command): description = "\"build\" scripts (copy and fixup #! line)" @@ -30,14 +28,14 @@ class build_scripts (Command): boolean_options = ['force'] - def initialize_options (self): + def initialize_options(self): self.build_dir = None self.scripts = None self.force = None self.executable = None self.outfiles = None - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('build', ('build_scripts', 'build_dir'), ('force', 'force'), @@ -47,13 +45,13 @@ def finalize_options (self): def get_source_files(self): return self.scripts - def run (self): + def run(self): if not self.scripts: return self.copy_scripts() - def copy_scripts (self): + def copy_scripts(self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first @@ -62,7 +60,7 @@ def copy_scripts (self): self.mkpath(self.build_dir) outfiles = [] for script in self.scripts: - adjust = 0 + adjust = False script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script)) outfiles.append(outfile) @@ -88,7 +86,7 @@ def copy_scripts (self): match = first_line_re.match(first_line) if match: - adjust = 1 + adjust = True post_interp = match.group(1) or '' if adjust: @@ -125,7 +123,3 @@ def copy_scripts (self): log.info("changing mode of %s from %o to %o", file, oldmode, newmode) os.chmod(file, newmode) - - # copy_scripts () - -# class build_scripts diff --git a/command/clean.py b/command/clean.py index 02189c531a..ae1d22c376 100644 --- a/command/clean.py +++ b/command/clean.py @@ -4,8 +4,6 @@ # contributed by Bastian Kleineidam , added 2000-03-18 -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -13,7 +11,7 @@ from distutils.dir_util import remove_tree from distutils import log -class clean (Command): +class clean(Command): description = "clean up temporary files from 'build' command" user_options = [ @@ -78,5 +76,3 @@ def run(self): log.info("removing '%s'", self.build_base) except OSError: pass - -# class clean diff --git a/command/command_template b/command/command_template index 50bbab7b6e..6106819db8 100644 --- a/command/command_template +++ b/command/command_template @@ -10,7 +10,7 @@ __revision__ = "$Id$" from distutils.core import Command -class x (Command): +class x(Command): # Brief (40-50 characters) description of the command description = "" @@ -21,25 +21,13 @@ class x (Command): ""), ] - - def initialize_options (self): + def initialize_options(self): self. = None self. = None self. = None - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): if self.x is None: self.x = - # finalize_options() - - - def run (self): - - - # run() - -# class x + def run(self): diff --git a/command/config.py b/command/config.py index 04cfcde736..a601234218 100644 --- a/command/config.py +++ b/command/config.py @@ -9,21 +9,17 @@ this header file lives". """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re -from types import * from distutils.core import Command from distutils.errors import DistutilsExecError from distutils.sysconfig import customize_compiler from distutils import log -LANG_EXT = {'c': '.c', - 'c++': '.cxx'} +LANG_EXT = {"c": ".c", "c++": ".cxx"} -class config (Command): +class config(Command): description = "prepare to build" @@ -53,7 +49,7 @@ class config (Command): # The three standard command methods: since the "config" command # does nothing by default, these are empty. - def initialize_options (self): + def initialize_options(self): self.compiler = None self.cc = None self.include_dirs = None @@ -70,7 +66,7 @@ def initialize_options (self): # to clean at some point self.temp_files = [] - def finalize_options (self): + def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] elif isinstance(self.include_dirs, basestring): @@ -86,16 +82,14 @@ def finalize_options (self): elif isinstance(self.library_dirs, basestring): self.library_dirs = self.library_dirs.split(os.pathsep) - - def run (self): + def run(self): pass - # Utility methods for actual "config" commands. The interfaces are # loosely based on Autoconf macros of similar names. Sub-classes # may use these freely. - def _check_compiler (self): + def _check_compiler(self): """Check that 'self.compiler' really is a CCompiler object; if not, make it one. """ @@ -113,8 +107,7 @@ def _check_compiler (self): if self.library_dirs: self.compiler.set_library_dirs(self.library_dirs) - - def _gen_temp_sourcefile (self, body, headers, lang): + def _gen_temp_sourcefile(self, body, headers, lang): filename = "_configtest" + LANG_EXT[lang] file = open(filename, "w") if headers: @@ -127,14 +120,14 @@ def _gen_temp_sourcefile (self, body, headers, lang): file.close() return filename - def _preprocess (self, body, headers, include_dirs, lang): + def _preprocess(self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) out = "_configtest.i" self.temp_files.extend([src, out]) self.compiler.preprocess(src, out, include_dirs=include_dirs) return (src, out) - def _compile (self, body, headers, include_dirs, lang): + def _compile(self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) if self.dump_source: dump_file(src, "compiling '%s':" % src) @@ -143,9 +136,8 @@ def _compile (self, body, headers, include_dirs, lang): self.compiler.compile([src], include_dirs=include_dirs) return (src, obj) - def _link (self, body, - headers, include_dirs, - libraries, library_dirs, lang): + def _link(self, body, headers, include_dirs, libraries, + library_dirs, lang): (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] self.compiler.link_executable([obj], prog, @@ -159,7 +151,7 @@ def _link (self, body, return (src, obj, prog) - def _clean (self, *filenames): + def _clean(self, *filenames): if not filenames: filenames = self.temp_files self.temp_files = [] @@ -181,7 +173,7 @@ def _clean (self, *filenames): # XXX need access to the header search path and maybe default macros. - def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): + def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): """Construct a source file from 'body' (a string containing lines of C/C++ code) and 'headers' (a list of header files to include) and run it through the preprocessor. Return true if the @@ -190,17 +182,17 @@ def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): """ from distutils.ccompiler import CompileError self._check_compiler() - ok = 1 + ok = True try: self._preprocess(body, headers, include_dirs, lang) except CompileError: - ok = 0 + ok = False self._clean() return ok - def search_cpp (self, pattern, body=None, - headers=None, include_dirs=None, lang="c"): + def search_cpp(self, pattern, body=None, headers=None, + include_dirs=None, lang="c"): """Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a @@ -216,20 +208,20 @@ def search_cpp (self, pattern, body=None, pattern = re.compile(pattern) file = open(out) - match = 0 - while 1: + match = False + while True: line = file.readline() if line == '': break if pattern.search(line): - match = 1 + match = True break file.close() self._clean() return match - def try_compile (self, body, headers=None, include_dirs=None, lang="c"): + def try_compile(self, body, headers=None, include_dirs=None, lang="c"): """Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise. """ @@ -237,18 +229,16 @@ def try_compile (self, body, headers=None, include_dirs=None, lang="c"): self._check_compiler() try: self._compile(body, headers, include_dirs, lang) - ok = 1 + ok = True except CompileError: - ok = 0 + ok = False log.info(ok and "success!" or "failure.") self._clean() return ok - def try_link (self, body, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - lang="c"): + def try_link(self, body, headers=None, include_dirs=None, + libraries=None, library_dirs=None, lang="c"): """Try to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise. @@ -258,18 +248,16 @@ def try_link (self, body, try: self._link(body, headers, include_dirs, libraries, library_dirs, lang) - ok = 1 + ok = True except (CompileError, LinkError): - ok = 0 + ok = False log.info(ok and "success!" or "failure.") self._clean() return ok - def try_run (self, body, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - lang="c"): + def try_run(self, body, headers=None, include_dirs=None, + libraries=None, library_dirs=None, lang="c"): """Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise. @@ -280,9 +268,9 @@ def try_run (self, body, src, obj, exe = self._link(body, headers, include_dirs, libraries, library_dirs, lang) self.spawn([exe]) - ok = 1 + ok = True except (CompileError, LinkError, DistutilsExecError): - ok = 0 + ok = False log.info(ok and "success!" or "failure.") self._clean() @@ -293,11 +281,8 @@ def try_run (self, body, # (these are the ones that are actually likely to be useful # when implementing a real-world config command!) - def check_func (self, func, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - decl=0, call=0): - + def check_func(self, func, headers=None, include_dirs=None, + libraries=None, library_dirs=None, decl=0, call=0): """Determine if function 'func' is available by constructing a source file that refers to 'func', and compiles and links it. If everything succeeds, returns true; otherwise returns false. @@ -311,7 +296,6 @@ def check_func (self, func, calls it. 'libraries' and 'library_dirs' are used when linking. """ - self._check_compiler() body = [] if decl: @@ -327,10 +311,8 @@ def check_func (self, func, return self.try_link(body, headers, include_dirs, libraries, library_dirs) - # check_func () - - def check_lib (self, library, library_dirs=None, - headers=None, include_dirs=None, other_libraries=[]): + def check_lib(self, library, library_dirs=None, headers=None, + include_dirs=None, other_libraries=[]): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to @@ -340,12 +322,11 @@ def check_lib (self, library, library_dirs=None, has symbols that depend on other libraries. """ self._check_compiler() - return self.try_link("int main (void) { }", - headers, include_dirs, - [library]+other_libraries, library_dirs) + return self.try_link("int main (void) { }", headers, include_dirs, + [library] + other_libraries, library_dirs) - def check_header (self, header, include_dirs=None, - library_dirs=None, lang="c"): + def check_header(self, header, include_dirs=None, library_dirs=None, + lang="c"): """Determine if the system header file named by 'header_file' exists and can be found by the preprocessor; return true if so, false otherwise. @@ -354,10 +335,7 @@ def check_header (self, header, include_dirs=None, include_dirs=include_dirs) -# class config - - -def dump_file (filename, head=None): +def dump_file(filename, head=None): if head is None: print(filename + ":") else: diff --git a/command/install.py b/command/install.py index a6543ba6a2..29cda1ebb7 100644 --- a/command/install.py +++ b/command/install.py @@ -4,12 +4,9 @@ from distutils import log -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import * from distutils.core import Command from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars @@ -141,7 +138,7 @@ class install (Command): negative_opt = {'no-compile' : 'compile'} - def initialize_options (self): + def initialize_options(self): # High-level options: these select both an installation base # and scheme. @@ -215,7 +212,7 @@ def initialize_options (self): # party Python modules on various platforms given a wide # array of user input is decided. Yes, it's quite complex!) - def finalize_options (self): + def finalize_options(self): # This method (and its pliant slaves, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default @@ -233,13 +230,13 @@ def finalize_options (self): if ((self.prefix or self.exec_prefix or self.home) and (self.install_base or self.install_platbase)): - raise DistutilsOptionError, \ - ("must supply either prefix/exec-prefix/home or " + + raise DistutilsOptionError( + "must supply either prefix/exec-prefix/home or " + "install-base/install-platbase -- not both") if self.home and (self.prefix or self.exec_prefix): - raise DistutilsOptionError, \ - "must supply either home or prefix/exec-prefix -- not both" + raise DistutilsOptionError( + "must supply either home or prefix/exec-prefix -- not both") # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name != "posix": @@ -341,10 +338,8 @@ def finalize_options (self): # Punt on doc directories for now -- after all, we're punting on # documentation completely! - # finalize_options () - - def dump_dirs (self, msg): + def dump_dirs(self, msg): if DEBUG: from distutils.fancy_getopt import longopt_xlate print(msg + ":") @@ -362,8 +357,7 @@ def dump_dirs (self, msg): print(" %s: %s" % (opt_name, val)) - def finalize_unix (self): - + def finalize_unix(self): if self.install_base is not None or self.install_platbase is not None: if ((self.install_lib is None and self.install_purelib is None and @@ -371,8 +365,8 @@ def finalize_unix (self): self.install_headers is None or self.install_scripts is None or self.install_data is None): - raise DistutilsOptionError, \ - ("install-base or install-platbase supplied, but " + raise DistutilsOptionError( + "install-base or install-platbase supplied, but " "installation scheme is incomplete") return @@ -382,8 +376,8 @@ def finalize_unix (self): else: if self.prefix is None: if self.exec_prefix is not None: - raise DistutilsOptionError, \ - "must not supply exec-prefix without prefix" + raise DistutilsOptionError( + "must not supply exec-prefix without prefix") self.prefix = os.path.normpath(sys.prefix) self.exec_prefix = os.path.normpath(sys.exec_prefix) @@ -396,11 +390,8 @@ def finalize_unix (self): self.install_platbase = self.exec_prefix self.select_scheme("unix_prefix") - # finalize_unix () - - - def finalize_other (self): # Windows and Mac OS for now + def finalize_other(self): # Windows and Mac OS for now if self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") @@ -412,13 +403,11 @@ def finalize_other (self): # Windows and Mac OS for now try: self.select_scheme(os.name) except KeyError: - raise DistutilsPlatformError, \ - "I don't know how to install stuff on '%s'" % os.name - - # finalize_other () + raise DistutilsPlatformError( + "I don't know how to install stuff on '%s'" % os.name) - def select_scheme (self, name): + def select_scheme(self, name): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in SCHEME_KEYS: @@ -427,7 +416,7 @@ def select_scheme (self, name): setattr(self, attrname, scheme[key]) - def _expand_attrs (self, attrs): + def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: @@ -437,12 +426,12 @@ def _expand_attrs (self, attrs): setattr(self, attr, val) - def expand_basedirs (self): + def expand_basedirs(self): self._expand_attrs(['install_base', 'install_platbase', 'root']) - def expand_dirs (self): + def expand_dirs(self): self._expand_attrs(['install_purelib', 'install_platlib', 'install_lib', @@ -451,14 +440,12 @@ def expand_dirs (self): 'install_data',]) - def convert_paths (self, *names): + def convert_paths(self, *names): for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) - - def handle_extra_path (self): - + def handle_extra_path(self): if self.extra_path is None: self.extra_path = self.distribution.extra_path @@ -471,8 +458,8 @@ def handle_extra_path (self): elif len(self.extra_path) == 2: (path_file, extra_dirs) = self.extra_path else: - raise DistutilsOptionError, \ - ("'extra_path' option must be a list, tuple, or " + raise DistutilsOptionError( + "'extra_path' option must be a list, tuple, or " "comma-separated string with 1 or 2 elements") # convert to local form in case Unix notation used (as it @@ -488,10 +475,7 @@ def handle_extra_path (self): self.path_file = path_file self.extra_dirs = extra_dirs - # handle_extra_path () - - - def change_roots (self, *names): + def change_roots(self, *names): for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) @@ -499,8 +483,7 @@ def change_roots (self, *names): # -- Command execution methods ------------------------------------- - def run (self): - + def run(self): # Obviously have to build before we can install if not self.skip_build: self.run_command('build') @@ -535,9 +518,7 @@ def run (self): "you'll have to change the search path yourself"), self.install_lib) - # run () - - def create_path_file (self): + def create_path_file(self): filename = os.path.join(self.install_libbase, self.path_file + ".pth") if self.install_path_file: @@ -550,7 +531,7 @@ def create_path_file (self): # -- Reporting methods --------------------------------------------- - def get_outputs (self): + def get_outputs(self): # Assemble the outputs of all the sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): @@ -567,7 +548,7 @@ def get_outputs (self): return outputs - def get_inputs (self): + def get_inputs(self): # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): @@ -579,19 +560,19 @@ def get_inputs (self): # -- Predicates for sub-command list ------------------------------- - def has_lib (self): + def has_lib(self): """Return true if the current distribution has any Python modules to install.""" return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) - def has_headers (self): + def has_headers(self): return self.distribution.has_headers() - def has_scripts (self): + def has_scripts(self): return self.distribution.has_scripts() - def has_data (self): + def has_data(self): return self.distribution.has_data_files() @@ -603,5 +584,3 @@ def has_data (self): ('install_data', has_data), ('install_egg_info', lambda self:True), ] - -# class install diff --git a/command/install_data.py b/command/install_data.py index a95194426b..2fbac63de0 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -5,15 +5,13 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os from distutils.core import Command from distutils.util import change_root, convert_path -class install_data (Command): +class install_data(Command): description = "install data files" @@ -28,7 +26,7 @@ class install_data (Command): boolean_options = ['force'] - def initialize_options (self): + def initialize_options(self): self.install_dir = None self.outfiles = [] self.root = None @@ -37,14 +35,14 @@ def initialize_options (self): self.data_files = self.distribution.data_files self.warn_dir = 1 - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('install', ('install_data', 'install_dir'), ('root', 'root'), ('force', 'force'), ) - def run (self): + def run(self): self.mkpath(self.install_dir) for f in self.data_files: if isinstance(f, basestring): @@ -77,8 +75,8 @@ def run (self): (out, _) = self.copy_file(data, dir) self.outfiles.append(out) - def get_inputs (self): + def get_inputs(self): return self.data_files or [] - def get_outputs (self): + def get_outputs(self): return self.outfiles diff --git a/command/install_headers.py b/command/install_headers.py index 2bd1b04367..7114eaf068 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,15 +3,13 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os from distutils.core import Command -class install_headers (Command): +class install_headers(Command): description = "install C/C++ header files" @@ -23,18 +21,18 @@ class install_headers (Command): boolean_options = ['force'] - def initialize_options (self): + def initialize_options(self): self.install_dir = None self.force = 0 self.outfiles = [] - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('install', ('install_headers', 'install_dir'), ('force', 'force')) - def run (self): + def run(self): headers = self.distribution.headers if not headers: return @@ -44,10 +42,8 @@ def run (self): (out, _) = self.copy_file(header, self.install_dir) self.outfiles.append(out) - def get_inputs (self): + def get_inputs(self): return self.distribution.headers or [] - def get_outputs (self): + def get_outputs(self): return self.outfiles - -# class install_headers diff --git a/command/install_lib.py b/command/install_lib.py index 4efaf9c671..ac620fccb9 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,9 +1,6 @@ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -11,7 +8,7 @@ # Extension for Python source files. PYTHON_SOURCE_EXTENSION = ".py" -class install_lib (Command): +class install_lib(Command): description = "install all Python modules (extensions and pure Python)" @@ -45,8 +42,7 @@ class install_lib (Command): boolean_options = ['force', 'compile', 'skip-build'] negative_opt = {'no-compile' : 'compile'} - - def initialize_options (self): + def initialize_options(self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None @@ -55,7 +51,7 @@ def initialize_options (self): self.optimize = None self.skip_build = None - def finalize_options (self): + def finalize_options(self): # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, @@ -70,19 +66,18 @@ def finalize_options (self): ) if self.compile is None: - self.compile = 1 + self.compile = True if self.optimize is None: - self.optimize = 0 + self.optimize = False - if type(self.optimize) is not IntType: + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) assert 0 <= self.optimize <= 2 except (ValueError, AssertionError): - raise DistutilsOptionError, "optimize must be 0, 1, or 2" - - def run (self): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + def run(self): # Make sure we have built everything we need first self.build() @@ -95,20 +90,18 @@ def run (self): if outfiles is not None and self.distribution.has_pure_modules(): self.byte_compile(outfiles) - # run () - # -- Top-level worker functions ------------------------------------ # (called from 'run()') - def build (self): + def build(self): if not self.skip_build: if self.distribution.has_pure_modules(): self.run_command('build_py') if self.distribution.has_ext_modules(): self.run_command('build_ext') - def install (self): + def install(self): if os.path.isdir(self.build_dir): outfiles = self.copy_tree(self.build_dir, self.install_dir) else: @@ -117,7 +110,7 @@ def install (self): return return outfiles - def byte_compile (self, files): + def byte_compile(self, files): from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, @@ -138,8 +131,7 @@ def byte_compile (self, files): # -- Utility methods ----------------------------------------------- - def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): - + def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir): if not has_any: return [] @@ -154,9 +146,7 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): return outputs - # _mutate_outputs () - - def _bytecode_filenames (self, py_filenames): + def _bytecode_filenames(self, py_filenames): bytecode_files = [] for py_file in py_filenames: # Since build_py handles package data installation, the @@ -176,7 +166,7 @@ def _bytecode_filenames (self, py_filenames): # -- External interface -------------------------------------------- # (called by outsiders) - def get_outputs (self): + def get_outputs(self): """Return the list of files that would be installed if this command were actually run. Not affected by the "dry-run" flag or whether modules have actually been built yet. @@ -197,9 +187,7 @@ def get_outputs (self): return pure_outputs + bytecode_outputs + ext_outputs - # get_outputs () - - def get_inputs (self): + def get_inputs(self): """Get the list of files that are input to this command, ie. the files that get installed as they are named in the build tree. The files in this list correspond one-to-one to the output @@ -216,5 +204,3 @@ def get_inputs (self): inputs.extend(build_ext.get_outputs()) return inputs - -# class install_lib diff --git a/command/install_scripts.py b/command/install_scripts.py index da2da358ba..ea8d5aa654 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -5,8 +5,6 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -14,7 +12,8 @@ from distutils import log from stat import ST_MODE -class install_scripts (Command): + +class install_scripts(Command): description = "install scripts (Python or otherwise)" @@ -27,14 +26,13 @@ class install_scripts (Command): boolean_options = ['force', 'skip-build'] - - def initialize_options (self): + def initialize_options(self): self.install_dir = None self.force = 0 self.build_dir = None self.skip_build = None - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('build', ('build_scripts', 'build_dir')) self.set_undefined_options('install', ('install_scripts', 'install_dir'), @@ -42,7 +40,7 @@ def finalize_options (self): ('skip_build', 'skip_build'), ) - def run (self): + def run(self): if not self.skip_build: self.run_command('build_scripts') self.outfiles = self.copy_tree(self.build_dir, self.install_dir) @@ -57,10 +55,8 @@ def run (self): log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) - def get_inputs (self): + def get_inputs(self): return self.distribution.scripts or [] def get_outputs(self): return self.outfiles or [] - -# class install_scripts diff --git a/command/sdist.py b/command/sdist.py index 8e1c066023..b1c76486ed 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,12 +2,9 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import * from glob import glob from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util @@ -82,7 +79,7 @@ class sdist (Command): default_format = { 'posix': 'gztar', 'nt': 'zip' } - def initialize_options (self): + def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. self.template = None @@ -103,7 +100,7 @@ def initialize_options (self): self.archive_files = None - def finalize_options (self): + def finalize_options(self): if self.manifest is None: self.manifest = "MANIFEST" if self.template is None: @@ -114,21 +111,20 @@ def finalize_options (self): try: self.formats = [self.default_format[os.name]] except KeyError: - raise DistutilsPlatformError, \ - "don't know how to create source distributions " + \ - "on platform %s" % os.name + raise DistutilsPlatformError( + "don't know how to create source distributions " + "on platform %s" % os.name) bad_format = archive_util.check_archive_formats(self.formats) if bad_format: - raise DistutilsOptionError, \ - "unknown archive format '%s'" % bad_format + raise DistutilsOptionError( + "unknown archive format '%s'" % bad_format) if self.dist_dir is None: self.dist_dir = "dist" - def run (self): - + def run(self): # 'filelist' contains the list of files that will make up the # manifest self.filelist = FileList() @@ -150,8 +146,7 @@ def run (self): # or zipfile, or whatever. self.make_distribution() - - def check_metadata (self): + def check_metadata(self): """Ensure that all required elements of meta-data (name, version, URL, (author and author_email) or (maintainer and maintainer_email)) are supplied by the Distribution object; warn if @@ -181,17 +176,13 @@ def check_metadata (self): "or (maintainer and maintainer_email) " + "must be supplied") - # check_metadata () - - - def get_file_list (self): + def get_file_list(self): """Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options and the state of the filesystem. """ - # If we have a manifest template, see if it's newer than the # manifest; if so, we'll regenerate the manifest. template_exists = os.path.isfile(self.template) @@ -231,9 +222,9 @@ def get_file_list (self): # Regenerate the manifest if necessary (or if explicitly told to) if manifest_outofdate or neither_exists or force_regen: if not template_exists: - self.warn(("manifest template '%s' does not exist " + - "(using default file list)") % - self.template) + self.warn("manifest template '%s' does not exist " + "(using default file list)" + % self.template) self.filelist.findall() if self.use_defaults: @@ -251,10 +242,8 @@ def get_file_list (self): else: self.read_manifest() - # get_file_list () - - def add_defaults (self): + def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt - setup.py @@ -265,15 +254,14 @@ def add_defaults (self): Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ - standards = [('README', 'README.txt'), self.distribution.script_name] for fn in standards: - if type(fn) is TupleType: + if isinstance(fn, tuple): alts = fn - got_it = 0 + got_it = False for fn in alts: if os.path.exists(fn): - got_it = 1 + got_it = True self.filelist.append(fn) break @@ -308,25 +296,18 @@ def add_defaults (self): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) - # add_defaults () - - - def read_template (self): + def read_template(self): """Read and parse manifest template file named by self.template. (usually "MANIFEST.in") The parsing and processing is done by 'self.filelist', which updates itself accordingly. """ log.info("reading manifest template '%s'", self.template) - template = TextFile(self.template, - strip_comments=1, - skip_blanks=1, - join_lines=1, - lstrip_ws=1, - rstrip_ws=1, + template = TextFile(self.template, strip_comments=1, skip_blanks=1, + join_lines=1, lstrip_ws=1, rstrip_ws=1, collapse_join=1) - while 1: + while True: line = template.readline() if line is None: # end of file break @@ -338,10 +319,7 @@ def read_template (self): template.current_line, msg)) - # read_template () - - - def prune_file_list (self): + def prune_file_list(self): """Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") @@ -356,8 +334,7 @@ def prune_file_list (self): self.filelist.exclude_pattern(None, prefix=base_dir) self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1) - - def write_manifest (self): + def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. @@ -366,17 +343,14 @@ def write_manifest (self): (self.manifest, self.filelist.files), "writing manifest file '%s'" % self.manifest) - # write_manifest () - - - def read_manifest (self): + def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. """ log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest) - while 1: + while True: line = manifest.readline() if line == '': # end of file break @@ -384,10 +358,7 @@ def read_manifest (self): line = line[0:-1] self.filelist.append(line) - # read_manifest () - - - def make_release_tree (self, base_dir, files): + def make_release_tree(self, base_dir, files): """Create the directory tree that will become the source distribution archive. All directories implied by the filenames in 'files' are created under 'base_dir', and then we hard link or copy @@ -429,9 +400,7 @@ def make_release_tree (self, base_dir, files): self.distribution.metadata.write_pkg_info(base_dir) - # make_release_tree () - - def make_distribution (self): + def make_distribution(self): """Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. @@ -456,10 +425,8 @@ def make_distribution (self): if not self.keep_temp: dir_util.remove_tree(base_dir, dry_run=self.dry_run) - def get_archive_files (self): + def get_archive_files(self): """Return the list of archive files created when the command was run, or None if the command hasn't run yet. """ return self.archive_files - -# class sdist diff --git a/command/upload.py b/command/upload.py index 1ca2fb9052..b49acd123a 100644 --- a/command/upload.py +++ b/command/upload.py @@ -170,7 +170,7 @@ def upload_file(self, command, pyversion, filename): elif schema == 'https': http = httplib.HTTPSConnection(netloc) else: - raise AssertionError, "unsupported schema "+schema + raise AssertionError("unsupported schema "+schema) data = '' loglevel = log.INFO diff --git a/core.py b/core.py index d60998240f..0490e6378b 100644 --- a/core.py +++ b/core.py @@ -6,12 +6,9 @@ really defined in distutils.dist and distutils.cmd. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import * from distutils.debug import DEBUG from distutils.errors import * @@ -112,10 +109,10 @@ class found in 'cmdclass' is used in place of the default, which is _setup_distribution = dist = klass(attrs) except DistutilsSetupError as msg: if 'name' not in attrs: - raise SystemExit, "error in setup command: %s" % msg + raise SystemExit("error in setup command: %s" % msg) else: - raise SystemExit, "error in %s setup command: %s" % \ - (attrs['name'], msg) + raise SystemExit("error in %s setup command: %s" % \ + (attrs['name'], msg)) if _setup_stop_after == "init": return dist @@ -136,7 +133,7 @@ class found in 'cmdclass' is used in place of the default, which is try: ok = dist.parse_command_line() except DistutilsArgError as msg: - raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg + raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg) if DEBUG: print("options (after parsing command line):") @@ -150,7 +147,7 @@ class found in 'cmdclass' is used in place of the default, which is try: dist.run_commands() except KeyboardInterrupt: - raise SystemExit, "interrupted" + raise SystemExit("interrupted") except (IOError, os.error) as exc: error = grok_environment_error(exc) @@ -158,14 +155,14 @@ class found in 'cmdclass' is used in place of the default, which is sys.stderr.write(error + "\n") raise else: - raise SystemExit, error + raise SystemExit(error) except (DistutilsError, CCompilerError) as msg: if DEBUG: raise else: - raise SystemExit, "error: " + str(msg) + raise SystemExit("error: " + str(msg)) return dist @@ -204,7 +201,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): used to drive the Distutils. """ if stop_after not in ('init', 'config', 'commandline', 'run'): - raise ValueError, "invalid value for 'stop_after': %r" % (stop_after,) + raise ValueError("invalid value for 'stop_after': %r" % (stop_after,)) global _setup_stop_after, _setup_distribution _setup_stop_after = stop_after @@ -229,10 +226,9 @@ def run_setup (script_name, script_args=None, stop_after="run"): raise if _setup_distribution is None: - raise RuntimeError, \ - ("'distutils.core.setup()' was never called -- " + raise RuntimeError(("'distutils.core.setup()' was never called -- " "perhaps '%s' is not a Distutils setup script?") % \ - script_name + script_name) # I wonder if the setup script's namespace -- g and l -- would be of # any interest to callers? diff --git a/cygwinccompiler.py b/cygwinccompiler.py index fae6848165..bec72ca3f1 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -45,8 +45,6 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os,sys,copy @@ -143,13 +141,13 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): try: self.spawn(["windres", "-i", src, "-o", obj]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) def link (self, target_desc, @@ -260,9 +258,8 @@ def object_filenames (self, # use normcase to make sure '.rc' is really '.rc' and not '.RC' (base, ext) = os.path.splitext (os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc','.res']): - raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % \ - (ext, src_name) + raise UnknownFileError("unknown file type '%s' (from '%s')" % \ + (ext, src_name)) if strip_dir: base = os.path.basename (base) if ext == '.res' or ext == '.rc': diff --git a/debug.py b/debug.py index b67139c7d4..2886744402 100644 --- a/debug.py +++ b/debug.py @@ -1,7 +1,5 @@ import os -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" # If DISTUTILS_DEBUG is anything other than the empty string, we run in diff --git a/dep_util.py b/dep_util.py index c139c852e4..a9d589a256 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,8 +4,6 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -19,7 +17,7 @@ def newer (source, target): Raise DistutilsFileError if 'source' does not exist. """ if not os.path.exists(source): - raise DistutilsFileError, "file '%s' does not exist" % source + raise DistutilsFileError("file '%s' does not exist" % source) if not os.path.exists(target): return 1 @@ -39,7 +37,7 @@ def newer_pairwise (sources, targets): of 'newer()'. """ if len(sources) != len(targets): - raise ValueError, "'sources' and 'targets' must be same length" + raise ValueError("'sources' and 'targets' must be same length") # build a pair of lists (sources, targets) where source is newer n_sources = [] diff --git a/dir_util.py b/dir_util.py index 7dc1205c49..30e352db42 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,12 +2,9 @@ Utility functions for manipulating directories and directory trees.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, sys -from types import * from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log @@ -32,8 +29,8 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): # Detect a common bug -- name is None if not isinstance(name, basestring): - raise DistutilsInternalError, \ - "mkpath: 'name' must be a string (got %r)" % (name,) + raise DistutilsInternalError( + "mkpath: 'name' must be a string (got %r)" % (name,)) # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce @@ -136,8 +133,8 @@ def copy_tree (src, dst, from distutils.file_util import copy_file if not dry_run and not os.path.isdir(src): - raise DistutilsFileError, \ - "cannot copy tree '%s': not a directory" % src + raise DistutilsFileError( + "cannot copy tree '%s': not a directory" % src) try: names = os.listdir(src) except os.error as e: @@ -145,8 +142,8 @@ def copy_tree (src, dst, if dry_run: names = [] else: - raise DistutilsFileError, \ - "error listing files in '%s': %s" % (src, errstr) + raise DistutilsFileError( + "error listing files in '%s': %s" % (src, errstr)) if not dry_run: mkpath(dst) @@ -176,8 +173,6 @@ def copy_tree (src, dst, return outputs -# copy_tree () - # Helper for remove_tree() def _build_cmdtuple(path, cmdtuples): for f in os.listdir(path): diff --git a/dist.py b/dist.py index 8f614765ef..974ee5163b 100644 --- a/dist.py +++ b/dist.py @@ -4,8 +4,6 @@ being built/installed/distributed. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re @@ -264,8 +262,6 @@ def __init__ (self, attrs=None): self.finalize_options() - # __init__ () - def get_option_dict (self, command): """Get the option dictionary for a given command. If that @@ -305,8 +301,6 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): for line in out.split("\n"): print(indent + " " + line) - # dump_option_dicts () - # -- Config file finding/parsing methods --------------------------- @@ -353,8 +347,6 @@ def find_config_files (self): return files - # find_config_files () - def parse_config_files (self, filenames=None): @@ -397,9 +389,7 @@ def parse_config_files (self, filenames=None): else: setattr(self, opt, val) except ValueError as msg: - raise DistutilsOptionError, msg - - # parse_config_files () + raise DistutilsOptionError(msg) # -- Command-line parsing methods ---------------------------------- @@ -472,12 +462,10 @@ def parse_command_line (self): # Oops, no commands found -- an end-user error if not self.commands: - raise DistutilsArgError, "no commands supplied" + raise DistutilsArgError("no commands supplied") # All is well: return true - return 1 - - # parse_command_line() + return True def _get_toplevel_options (self): """Return the non-display options recognized at the top level. @@ -505,7 +493,7 @@ def _parse_command_opts (self, parser, args): # Pull the current command from the head of the command line command = args[0] if not command_re.match(command): - raise SystemExit, "invalid command name '%s'" % command + raise SystemExit("invalid command name '%s'" % command) self.commands.append(command) # Dig up the command class that implements this command, so we @@ -514,22 +502,21 @@ def _parse_command_opts (self, parser, args): try: cmd_class = self.get_command_class(command) except DistutilsModuleError as msg: - raise DistutilsArgError, msg + raise DistutilsArgError(msg) # Require that the command class be derived from Command -- want # to be sure that the basic "command" interface is implemented. if not issubclass(cmd_class, Command): - raise DistutilsClassError, \ - "command class %s must subclass Command" % cmd_class + raise DistutilsClassError( + "command class %s must subclass Command" % cmd_class) # Also make sure that the command object provides a list of its # known options. if not (hasattr(cmd_class, 'user_options') and isinstance(cmd_class.user_options, list)): - raise DistutilsClassError, \ - ("command class %s must provide " + + raise DistutilsClassError(("command class %s must provide " + "'user_options' attribute (a list of tuples)") % \ - cmd_class + cmd_class) # If the command class has a list of negative alias options, # merge it in with the global negative aliases. @@ -586,8 +573,6 @@ def _parse_command_opts (self, parser, args): return args - # _parse_command_opts () - def finalize_options (self): """Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command @@ -660,8 +645,6 @@ def _show_help (self, print(gen_usage(self.script_name)) return - # _show_help () - def handle_display_options (self, option_order): """If there were any non-global "display-only" options @@ -703,13 +686,10 @@ def handle_display_options (self, option_order): return any_display_options - # handle_display_options() - def print_command_list (self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - print(header + ":") for cmd in commands: @@ -723,8 +703,6 @@ def print_command_list (self, commands, header, max_length): print(" %-*s %s" % (max_length, cmd, description)) - # print_command_list () - def print_commands (self): """Print out a help message listing all available commands with a @@ -734,7 +712,6 @@ def print_commands (self): descriptions come from the command class attribute 'description'. """ - import distutils.command std_commands = distutils.command.__all__ is_std = {} @@ -760,8 +737,6 @@ def print_commands (self): "Extra commands", max_length) - # print_commands () - def get_command_list (self): """Get a list of (command, description) tuples. The list is divided into "standard commands" (listed in @@ -771,7 +746,6 @@ def get_command_list (self): """ # Currently this is only used on Mac OS, for the Mac-only GUI # Distutils interface (by Jack Jansen) - import distutils.command std_commands = distutils.command.__all__ is_std = {} @@ -839,18 +813,15 @@ def get_command_class (self, command): try: klass = getattr(module, klass_name) except AttributeError: - raise DistutilsModuleError, \ - "invalid command '%s' (no class '%s' in module '%s')" \ - % (command, klass_name, module_name) + raise DistutilsModuleError( + "invalid command '%s' (no class '%s' in module '%s')" + % (command, klass_name, module_name)) self.cmdclass[command] = klass return klass raise DistutilsModuleError("invalid command '%s'" % command) - - # get_command_class () - def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no command @@ -912,11 +883,11 @@ def _set_command_options (self, command_obj, option_dict=None): elif hasattr(command_obj, option): setattr(command_obj, option, value) else: - raise DistutilsOptionError, \ - ("error in %s: command '%s' has no such option '%s'" - % (source, command_name, option)) + raise DistutilsOptionError( + "error in %s: command '%s' has no such option '%s'" + % (source, command_name, option)) except ValueError as msg: - raise DistutilsOptionError, msg + raise DistutilsOptionError(msg) def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first @@ -1075,8 +1046,6 @@ def write_pkg_info (self, base_dir): pkg_info.close() - # write_pkg_info () - def write_pkg_file (self, file): """Write the PKG-INFO format data to a file object. """ @@ -1202,8 +1171,6 @@ def set_obsoletes(self, value): distutils.versionpredicate.VersionPredicate(v) self.obsoletes = value -# class DistributionMetadata - def fix_help_options (options): """Convert a 4-tuple 'help_options' list as found in various command diff --git a/emxccompiler.py b/emxccompiler.py index f4b90dcd00..d9ee82d58a 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -80,13 +80,13 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): try: self.spawn(["rc", "-r", src]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) def link (self, target_desc, @@ -189,9 +189,8 @@ def object_filenames (self, # use normcase to make sure '.rc' is really '.rc' and not '.RC' (base, ext) = os.path.splitext (os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc']): - raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % \ - (ext, src_name) + raise UnknownFileError("unknown file type '%s' (from '%s')" % \ + (ext, src_name)) if strip_dir: base = os.path.basename (base) if ext == '.rc': diff --git a/errors.py b/errors.py index e72221bdba..963d83377c 100644 --- a/errors.py +++ b/errors.py @@ -8,8 +8,6 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" class DistutilsError (Exception): diff --git a/extension.py b/extension.py index 43b0d3fd00..7f5954e45c 100644 --- a/extension.py +++ b/extension.py @@ -86,7 +86,7 @@ class Extension: # When adding arguments to this constructor, be sure to update # setup_keywords in core.py. - def __init__ (self, name, sources, + def __init__(self, name, sources, include_dirs=None, define_macros=None, undef_macros=None, @@ -125,17 +125,15 @@ def __init__ (self, name, sources, # If there are unknown keyword options, warn about them if len(kw): - L = kw.keys() ; L.sort() - L = map(repr, L) + L = map(repr, sorted(kw)) msg = "Unknown Extension options: " + ', '.join(L) if warnings is not None: warnings.warn(msg) else: sys.stderr.write(msg + '\n') -# class Extension -def read_setup_file (filename): +def read_setup_file(filename): from distutils.sysconfig import \ parse_makefile, expand_makefile_vars, _variable_rx from distutils.text_file import TextFile @@ -151,7 +149,7 @@ def read_setup_file (filename): lstrip_ws=1, rstrip_ws=1) extensions = [] - while 1: + while True: line = file.readline() if line is None: # eof break @@ -241,5 +239,3 @@ def read_setup_file (filename): # 'lib_args': library_args } return extensions - -# read_setup_file () diff --git a/fancy_getopt.py b/fancy_getopt.py index 82e1f4d1dc..5434334e79 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,12 +8,9 @@ * options set attributes of a passed-in object """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, string, re -from types import * import getopt from distutils.errors import * @@ -43,8 +40,7 @@ class FancyGetopt: on the command line sets 'verbose' to false """ - def __init__ (self, option_table=None): - + def __init__(self, option_table=None): # The option table is (currently) a list of tuples. The # tuples may have 3 or four values: # (long_option, short_option, help_string [, repeatable]) @@ -84,58 +80,51 @@ def __init__ (self, option_table=None): # but expands short options, converts aliases, etc. self.option_order = [] - # __init__ () - - - def _build_index (self): + def _build_index(self): self.option_index.clear() for option in self.option_table: self.option_index[option[0]] = option - def set_option_table (self, option_table): + def set_option_table(self, option_table): self.option_table = option_table self._build_index() - def add_option (self, long_option, short_option=None, help_string=None): + def add_option(self, long_option, short_option=None, help_string=None): if long_option in self.option_index: - raise DistutilsGetoptError, \ - "option conflict: already an option '%s'" % long_option + raise DistutilsGetoptError( + "option conflict: already an option '%s'" % long_option) else: option = (long_option, short_option, help_string) self.option_table.append(option) self.option_index[long_option] = option - - def has_option (self, long_option): + def has_option(self, long_option): """Return true if the option table for this parser has an option with long name 'long_option'.""" return long_option in self.option_index - def get_attr_name (self, long_option): + def get_attr_name(self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" return long_option.translate(longopt_xlate) - - def _check_alias_dict (self, aliases, what): - assert type(aliases) is DictionaryType + def _check_alias_dict(self, aliases, what): + assert isinstance(aliases, dict) for (alias, opt) in aliases.items(): if alias not in self.option_index: - raise DistutilsGetoptError, \ - ("invalid %s '%s': " - "option '%s' not defined") % (what, alias, alias) + raise DistutilsGetoptError(("invalid %s '%s': " + "option '%s' not defined") % (what, alias, alias)) if opt not in self.option_index: - raise DistutilsGetoptError, \ - ("invalid %s '%s': " - "aliased option '%s' not defined") % (what, alias, opt) + raise DistutilsGetoptError(("invalid %s '%s': " + "aliased option '%s' not defined") % (what, alias, opt)) - def set_aliases (self, alias): + def set_aliases(self, alias): """Set the aliases for this option parser.""" self._check_alias_dict(alias, "alias") self.alias = alias - def set_negative_aliases (self, negative_alias): + def set_negative_aliases(self, negative_alias): """Set the negative aliases for this option parser. 'negative_alias' should be a dictionary mapping option names to option names, both the key and value must already be defined @@ -143,8 +132,7 @@ def set_negative_aliases (self, negative_alias): self._check_alias_dict(negative_alias, "negative alias") self.negative_alias = negative_alias - - def _grok_option_table (self): + def _grok_option_table(self): """Populate the various data structures that keep tabs on the option table. Called by 'getopt()' before it can do anything worthwhile. @@ -163,19 +151,17 @@ def _grok_option_table (self): else: # the option table is part of the code, so simply # assert that it is correct - raise ValueError, "invalid option tuple: %r" % (option,) + raise ValueError("invalid option tuple: %r" % (option,)) # Type- and value-check the option names if not isinstance(long, basestring) or len(long) < 2: - raise DistutilsGetoptError, \ - ("invalid long option '%s': " - "must be a string of length >= 2") % long + raise DistutilsGetoptError(("invalid long option '%s': " + "must be a string of length >= 2") % long) if (not ((short is None) or (isinstance(short, basestring) and len(short) == 1))): - raise DistutilsGetoptError, \ - ("invalid short option '%s': " - "must a single character or None") % short + raise DistutilsGetoptError("invalid short option '%s': " + "must a single character or None" % short) self.repeat[long] = repeat self.long_opts.append(long) @@ -185,54 +171,45 @@ def _grok_option_table (self): long = long[0:-1] self.takes_arg[long] = 1 else: - # Is option is a "negative alias" for some other option (eg. # "quiet" == "!verbose")? alias_to = self.negative_alias.get(long) if alias_to is not None: if self.takes_arg[alias_to]: - raise DistutilsGetoptError, \ - ("invalid negative alias '%s': " - "aliased option '%s' takes a value") % \ - (long, alias_to) + raise DistutilsGetoptError( + "invalid negative alias '%s': " + "aliased option '%s' takes a value" + % (long, alias_to)) self.long_opts[-1] = long # XXX redundant?! - self.takes_arg[long] = 0 - - else: - self.takes_arg[long] = 0 + self.takes_arg[long] = 0 # If this is an alias option, make sure its "takes arg" flag is # the same as the option it's aliased to. alias_to = self.alias.get(long) if alias_to is not None: if self.takes_arg[long] != self.takes_arg[alias_to]: - raise DistutilsGetoptError, \ - ("invalid alias '%s': inconsistent with " - "aliased option '%s' (one of them takes a value, " - "the other doesn't") % (long, alias_to) - + raise DistutilsGetoptError( + "invalid alias '%s': inconsistent with " + "aliased option '%s' (one of them takes a value, " + "the other doesn't" + % (long, alias_to)) # Now enforce some bondage on the long option name, so we can # later translate it to an attribute name on some object. Have # to do this a bit late to make sure we've removed any trailing # '='. if not longopt_re.match(long): - raise DistutilsGetoptError, \ - ("invalid long option name '%s' " + - "(must be letters, numbers, hyphens only") % long + raise DistutilsGetoptError( + "invalid long option name '%s' " + "(must be letters, numbers, hyphens only" % long) self.attr_name[long] = self.get_attr_name(long) if short: self.short_opts.append(short) self.short2long[short[0]] = long - # for option_table - - # _grok_option_table() - - - def getopt (self, args=None, object=None): + def getopt(self, args=None, object=None): """Parse command-line options in args. Store as attributes on object. If 'args' is None or not supplied, uses 'sys.argv[1:]'. If @@ -247,9 +224,9 @@ def getopt (self, args=None, object=None): args = sys.argv[1:] if object is None: object = OptionDummy() - created_object = 1 + created_object = True else: - created_object = 0 + created_object = False self._grok_option_table() @@ -257,7 +234,7 @@ def getopt (self, args=None, object=None): try: opts, args = getopt.getopt(args, short_opts, self.long_opts) except getopt.error as msg: - raise DistutilsArgError, msg + raise DistutilsArgError(msg) for opt, val in opts: if len(opt) == 2 and opt[0] == '-': # it's a short option @@ -293,21 +270,17 @@ def getopt (self, args=None, object=None): else: return args - # getopt() - - - def get_option_order (self): + def get_option_order(self): """Returns the list of (option, value) tuples processed by the previous run of 'getopt()'. Raises RuntimeError if 'getopt()' hasn't been called yet. """ if self.option_order is None: - raise RuntimeError, "'getopt()' hasn't been called yet" + raise RuntimeError("'getopt()' hasn't been called yet") else: return self.option_order - - def generate_help (self, header=None): + def generate_help(self, header=None): """Generate help text (a list of strings, one per suggested line of output) from the option table for this FancyGetopt object. """ @@ -384,23 +357,16 @@ def generate_help (self, header=None): for l in text[1:]: lines.append(big_indent + l) - - # for self.option_table - return lines - # generate_help () - - def print_help (self, header=None, file=None): + def print_help(self, header=None, file=None): if file is None: file = sys.stdout for line in self.generate_help(header): file.write(line + "\n") -# class FancyGetopt - -def fancy_getopt (options, negative_opt, object, args): +def fancy_getopt(options, negative_opt, object, args): parser = FancyGetopt(options) parser.set_negative_aliases(negative_opt) return parser.getopt(args, object) @@ -408,13 +374,12 @@ def fancy_getopt (options, negative_opt, object, args): WS_TRANS = string.maketrans(string.whitespace, ' ' * len(string.whitespace)) -def wrap_text (text, width): +def wrap_text(text, width): """wrap_text(text : string, width : int) -> [string] Split 'text' into multiple lines of no more than 'width' characters each, and return the list of strings that results. """ - if text is None: return [] if len(text) <= width: @@ -427,7 +392,6 @@ def wrap_text (text, width): lines = [] while chunks: - cur_line = [] # list of chunks (to-be-joined) cur_len = 0 # length of current line @@ -444,7 +408,6 @@ def wrap_text (text, width): break if chunks: # any chunks left to process? - # if the current line is still empty, then we had a single # chunk that's too big too fit on a line -- so we break # down and break it up at the line width @@ -462,14 +425,10 @@ def wrap_text (text, width): # string, of course! lines.append(''.join(cur_line)) - # while chunks - return lines -# wrap_text () - -def translate_longopt (opt): +def translate_longopt(opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ @@ -480,14 +439,12 @@ class OptionDummy: """Dummy class just used as a place to hold command-line option values as instance attributes.""" - def __init__ (self, options=[]): + def __init__(self, options=[]): """Create a new OptionDummy instance. The attributes listed in 'options' will be initialized to None.""" for opt in options: setattr(self, opt, None) -# class OptionDummy - if __name__ == "__main__": text = """\ diff --git a/file_util.py b/file_util.py index c225ad3172..e29e90e6d7 100644 --- a/file_util.py +++ b/file_util.py @@ -3,8 +3,6 @@ Utility functions for operating on single files. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os @@ -17,7 +15,7 @@ 'sym': 'symbolically linking' } -def _copy_file_contents (src, dst, buffer_size=16*1024): +def _copy_file_contents(src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'; both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' @@ -26,7 +24,6 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): """ # Stolen from shutil module in the standard library, but with # custom error-handling added. - fsrc = None fdst = None try: @@ -34,31 +31,30 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): fsrc = open(src, 'rb') except os.error as e: (errno, errstr) = e - raise DistutilsFileError, \ - "could not open '%s': %s" % (src, errstr) + raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) if os.path.exists(dst): try: os.unlink(dst) except os.error as e: (errno, errstr) = e - raise DistutilsFileError, \ - "could not delete '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not delete '%s': %s" % (dst, errstr)) try: fdst = open(dst, 'wb') except os.error as e: (errno, errstr) = e - raise DistutilsFileError, \ - "could not create '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not create '%s': %s" % (dst, errstr)) - while 1: + while True: try: buf = fsrc.read(buffer_size) except os.error as e: (errno, errstr) = e - raise DistutilsFileError, \ - "could not read from '%s': %s" % (src, errstr) + raise DistutilsFileError( + "could not read from '%s': %s" % (src, errstr)) if not buf: break @@ -67,25 +63,16 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): fdst.write(buf) except os.error as e: (errno, errstr) = e - raise DistutilsFileError, \ - "could not write to '%s': %s" % (dst, errstr) - + raise DistutilsFileError( + "could not write to '%s': %s" % (dst, errstr)) finally: if fdst: fdst.close() if fsrc: fsrc.close() -# _copy_file_contents() - -def copy_file (src, dst, - preserve_mode=1, - preserve_times=1, - update=0, - link=None, - verbose=0, - dry_run=0): - +def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, + link=None, verbose=0, dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a filename. (If the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' @@ -120,8 +107,8 @@ def copy_file (src, dst, from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): - raise DistutilsFileError, \ - "can't copy '%s': doesn't exist or not a regular file" % src + raise DistutilsFileError( + "can't copy '%s': doesn't exist or not a regular file" % src) if os.path.isdir(dst): dir = dst @@ -131,13 +118,12 @@ def copy_file (src, dst, if update and not newer(src, dst): log.debug("not copying %s (output up-to-date)", src) - return dst, 0 + return (dst, 0) try: action = _copy_action[link] except KeyError: - raise ValueError, \ - "invalid value '%s' for 'link' argument" % link + raise ValueError("invalid value '%s' for 'link' argument" % link) if os.path.basename(dst) == os.path.basename(src): log.info("%s %s -> %s", action, src, dir) else: @@ -152,8 +138,8 @@ def copy_file (src, dst, try: macostools.copy(src, dst, 0, preserve_times) except os.error as exc: - raise DistutilsFileError, \ - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) + raise DistutilsFileError( + "could not copy '%s' to '%s': %s" % (src, dst, exc[-1])) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) @@ -180,8 +166,6 @@ def copy_file (src, dst, return (dst, 1) -# copy_file () - # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, @@ -204,31 +188,30 @@ def move_file (src, dst, return dst if not isfile(src): - raise DistutilsFileError, \ - "can't move '%s': not a regular file" % src + raise DistutilsFileError("can't move '%s': not a regular file" % src) if isdir(dst): dst = os.path.join(dst, basename(src)) elif exists(dst): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' already exists" % \ - (src, dst) + raise DistutilsFileError( + "can't move '%s': destination '%s' already exists" % + (src, dst)) if not isdir(dirname(dst)): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' not a valid path" % \ - (src, dst) + raise DistutilsFileError( + "can't move '%s': destination '%s' not a valid path" % + (src, dst)) - copy_it = 0 + copy_it = False try: os.rename(src, dst) except os.error as e: (num, msg) = e if num == errno.EXDEV: - copy_it = 1 + copy_it = True else: - raise DistutilsFileError, \ - "couldn't move '%s' to '%s': %s" % (src, dst, msg) + raise DistutilsFileError( + "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: copy_file(src, dst) @@ -240,15 +223,12 @@ def move_file (src, dst, os.unlink(dst) except os.error: pass - raise DistutilsFileError, \ - ("couldn't move '%s' to '%s' by copy/delete: " + - "delete '%s' failed: %s") % \ - (src, dst, src, msg) - + raise DistutilsFileError( + "couldn't move '%s' to '%s' by copy/delete: " + "delete '%s' failed: %s" + % (src, dst, src, msg)) return dst -# move_file () - def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a diff --git a/filelist.py b/filelist.py index cc48e48e58..8f801073d5 100644 --- a/filelist.py +++ b/filelist.py @@ -4,20 +4,16 @@ and building lists of files. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, re import fnmatch -from types import * from glob import glob from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log class FileList: - """A list of files built by on exploring the filesystem and filtered by applying various patterns to what we find there. @@ -32,22 +28,19 @@ class FileList: filtering applied) """ - def __init__(self, - warn=None, - debug_print=None): + def __init__(self, warn=None, debug_print=None): # ignore argument to FileList, but keep them for backwards # compatibility - self.allfiles = None self.files = [] - def set_allfiles (self, allfiles): + def set_allfiles(self, allfiles): self.allfiles = allfiles - def findall (self, dir=os.curdir): + def findall(self, dir=os.curdir): self.allfiles = findall(dir) - def debug_print (self, msg): + def debug_print(self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ @@ -57,13 +50,13 @@ def debug_print (self, msg): # -- List-like methods --------------------------------------------- - def append (self, item): + def append(self, item): self.files.append(item) - def extend (self, items): + def extend(self, items): self.files.extend(items) - def sort (self): + def sort(self): # Not a strict lexical sort! sortable_files = sorted(map(os.path.split, self.files)) self.files = [] @@ -73,7 +66,7 @@ def sort (self): # -- Other miscellaneous utility methods --------------------------- - def remove_duplicates (self): + def remove_duplicates(self): # Assumes list has been sorted! for i in range(len(self.files) - 1, 0, -1): if self.files[i] == self.files[i - 1]: @@ -82,7 +75,7 @@ def remove_duplicates (self): # -- "File template" methods --------------------------------------- - def _parse_template_line (self, line): + def _parse_template_line(self, line): words = line.split() action = words[0] @@ -91,36 +84,26 @@ def _parse_template_line (self, line): if action in ('include', 'exclude', 'global-include', 'global-exclude'): if len(words) < 2: - raise DistutilsTemplateError, \ - "'%s' expects ..." % action - + raise DistutilsTemplateError( + "'%s' expects ..." % action) patterns = map(convert_path, words[1:]) - elif action in ('recursive-include', 'recursive-exclude'): if len(words) < 3: - raise DistutilsTemplateError, \ - "'%s' expects

..." % action - + raise DistutilsTemplateError( + "'%s' expects ..." % action) dir = convert_path(words[1]) patterns = map(convert_path, words[2:]) - elif action in ('graft', 'prune'): if len(words) != 2: - raise DistutilsTemplateError, \ - "'%s' expects a single " % action - + raise DistutilsTemplateError( + "'%s' expects a single " % action) dir_pattern = convert_path(words[1]) - else: - raise DistutilsTemplateError, "unknown action '%s'" % action + raise DistutilsTemplateError("unknown action '%s'" % action) return (action, patterns, dir, dir_pattern) - # _parse_template_line () - - - def process_template_line (self, line): - + def process_template_line(self, line): # Parse the line: split it up, make sure the right number of words # is there, and return the relevant words. 'action' is always # defined: it's the first word of the line. Which of the other @@ -149,7 +132,7 @@ def process_template_line (self, line): self.debug_print("global-include " + ' '.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=0): - log.warn(("warning: no files found matching '%s' " + + log.warn(("warning: no files found matching '%s' " "anywhere in distribution"), pattern) elif action == 'global-exclude': @@ -165,7 +148,7 @@ def process_template_line (self, line): (dir, ' '.join(patterns))) for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): - log.warn(("warning: no files found matching '%s' " + + log.warn(("warning: no files found matching '%s' " "under directory '%s'"), pattern, dir) @@ -187,19 +170,16 @@ def process_template_line (self, line): elif action == 'prune': self.debug_print("prune " + dir_pattern) if not self.exclude_pattern(None, prefix=dir_pattern): - log.warn(("no previously-included directories found " + + log.warn(("no previously-included directories found " "matching '%s'"), dir_pattern) else: - raise DistutilsInternalError, \ - "this cannot happen: invalid action '%s'" % action - - # process_template_line () + raise DistutilsInternalError( + "this cannot happen: invalid action '%s'" % action) # -- Filtering/selection methods ----------------------------------- - def include_pattern (self, pattern, - anchor=1, prefix=None, is_regex=0): + def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'self.files' that match 'pattern', a Unix-style wildcard (glob) pattern. Patterns are not quite the same as implemented by the 'fnmatch' module: '*' @@ -222,9 +202,9 @@ def include_pattern (self, pattern, Selected strings will be added to self.files. - Return 1 if files are found. + Return True if files are found, False otherwise. """ - files_found = 0 + files_found = False pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("include_pattern: applying regex r'%s'" % pattern_re.pattern) @@ -237,12 +217,9 @@ def include_pattern (self, pattern, if pattern_re.search(name): self.debug_print(" adding " + name) self.files.append(name) - files_found = 1 - + files_found = True return files_found - # include_pattern () - def exclude_pattern (self, pattern, anchor=1, prefix=None, is_regex=0): @@ -250,9 +227,9 @@ def exclude_pattern (self, pattern, 'pattern'. Other parameters are the same as for 'include_pattern()', above. The list 'self.files' is modified in place. - Return 1 if files are found. + Return True if files are found, False otherwise. """ - files_found = 0 + files_found = False pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("exclude_pattern: applying regex r'%s'" % pattern_re.pattern) @@ -260,19 +237,14 @@ def exclude_pattern (self, pattern, if pattern_re.search(self.files[i]): self.debug_print(" removing " + self.files[i]) del self.files[i] - files_found = 1 - + files_found = True return files_found - # exclude_pattern () - -# class FileList - # ---------------------------------------------------------------------- # Utility functions -def findall (dir = os.curdir): +def findall(dir=os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ @@ -300,11 +272,10 @@ def findall (dir = os.curdir): list.append(fullname) elif S_ISDIR(mode) and not S_ISLNK(mode): push(fullname) - return list -def glob_to_re (pattern): +def glob_to_re(pattern): """Translate a shell-like glob pattern to a regular expression; return a string containing the regex. Differs from 'fnmatch.translate()' in that '*' does not match "special characters" (which are @@ -322,10 +293,8 @@ def glob_to_re (pattern): pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re) return pattern_re -# glob_to_re () - -def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): +def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): """Translate a shell-like wildcard pattern to a compiled regular expression. Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) @@ -350,5 +319,3 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): pattern_re = "^" + pattern_re return re.compile(pattern_re) - -# translate_pattern () diff --git a/log.py b/log.py index e4959d6492..97319a07aa 100644 --- a/log.py +++ b/log.py @@ -1,7 +1,5 @@ """A simple log mechanism styled after PEP 282.""" -# This module should be kept compatible with Python 2.1. - # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. diff --git a/msvccompiler.py b/msvccompiler.py index 07c76f1838..f5b67049ef 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -8,8 +8,6 @@ # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os @@ -20,11 +18,11 @@ CCompiler, gen_preprocess_options, gen_lib_options from distutils import log -_can_read_reg = 0 +_can_read_reg = False try: import _winreg - _can_read_reg = 1 + _can_read_reg = True hkey_mod = _winreg RegOpenKeyEx = _winreg.OpenKeyEx @@ -36,14 +34,13 @@ try: import win32api import win32con - _can_read_reg = 1 + _can_read_reg = True hkey_mod = win32con RegOpenKeyEx = win32api.RegOpenKeyEx RegEnumKey = win32api.RegEnumKey RegEnumValue = win32api.RegEnumValue RegError = win32api.error - except ImportError: log.info("Warning: Can't read registry to find the " "necessary compiler setting\n" @@ -59,20 +56,19 @@ def read_keys(base, key): """Return list of registry keys.""" - try: handle = RegOpenKeyEx(base, key) except RegError: return None L = [] i = 0 - while 1: + while True: try: k = RegEnumKey(handle, i) except RegError: break L.append(k) - i = i + 1 + i += 1 return L def read_values(base, key): @@ -86,14 +82,14 @@ def read_values(base, key): return None d = {} i = 0 - while 1: + while True: try: name, value, type = RegEnumValue(handle, i) except RegError: break name = name.lower() d[convert_mbcs(name)] = convert_mbcs(value) - i = i + 1 + i += 1 return d def convert_mbcs(s): @@ -106,7 +102,6 @@ def convert_mbcs(s): return s class MacroExpander: - def __init__(self, version): self.macros = {} self.load_macros(version) @@ -130,8 +125,8 @@ def load_macros(self, version): else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError as exc: # - raise DistutilsPlatformError, \ - ("""Python was built with Visual Studio 2003; + raise DistutilsPlatformError( + """Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") @@ -157,7 +152,6 @@ def get_build_version(): For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. """ - prefix = "MSC v." i = sys.version.find(prefix) if i == -1: @@ -202,7 +196,7 @@ def normalize_and_reduce_paths(paths): return reduced_paths -class MSVCCompiler (CCompiler) : +class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" @@ -232,7 +226,7 @@ class MSVCCompiler (CCompiler) : static_lib_format = shared_lib_format = '%s%s' exe_extension = '.exe' - def __init__ (self, verbose=0, dry_run=0, force=0): + def __init__(self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) self.__version = get_build_version() self.__arch = get_build_architecture() @@ -263,11 +257,11 @@ def initialize(self): else: self.__paths = self.get_msvc_paths("path") - if len (self.__paths) == 0: - raise DistutilsPlatformError, \ - ("Python was built with %s, " + if len(self.__paths) == 0: + raise DistutilsPlatformError("Python was built with %s, " "and extensions need to be built with the same " - "version of the compiler, but it isn't installed." % self.__product) + "version of the compiler, but it isn't installed." + % self.__product) self.cc = self.find_exe("cl.exe") self.linker = self.find_exe("link.exe") @@ -314,10 +308,10 @@ def initialize(self): # -- Worker methods ------------------------------------------------ - def object_filenames (self, - source_filenames, - strip_dir=0, - output_dir=''): + def object_filenames(self, + source_filenames, + strip_dir=0, + output_dir=''): # Copied from ccompiler.py, extended to return .res as 'object'-file # for .rc input file if output_dir is None: output_dir = '' @@ -344,17 +338,16 @@ def object_filenames (self, base + self.obj_extension)) return obj_names - # object_filenames () - def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None): - if not self.initialized: self.initialize() - macros, objects, extra_postargs, pp_opts, build = \ - self._setup_compile(output_dir, macros, include_dirs, sources, - depends, extra_postargs) + if not self.initialized: + self.initialize() + compile_info = self._setup_compile(output_dir, macros, include_dirs, + sources, depends, extra_postargs) + macros, objects, extra_postargs, pp_opts, build = compile_info compile_opts = extra_preargs or [] compile_opts.append ('/c') @@ -383,13 +376,12 @@ def compile(self, sources, input_opt = src output_opt = "/fo" + obj try: - self.spawn ([self.rc] + pp_opts + - [output_opt] + [input_opt]) + self.spawn([self.rc] + pp_opts + + [output_opt] + [input_opt]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) continue elif ext in self._mc_extensions: - # Compile .MC to .RC file to .RES file. # * '-h dir' specifies the directory for the # generated include file @@ -401,99 +393,95 @@ def compile(self, sources, # we use the source-directory for the include file and # the build directory for the RC file and message # resources. This works at least for win32all. - - h_dir = os.path.dirname (src) - rc_dir = os.path.dirname (obj) + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) try: # first compile .MC to .RC and .H file - self.spawn ([self.mc] + - ['-h', h_dir, '-r', rc_dir] + [src]) + self.spawn([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) base, _ = os.path.splitext (os.path.basename (src)) rc_file = os.path.join (rc_dir, base + '.rc') # then compile .RC to .RES file - self.spawn ([self.rc] + - ["/fo" + obj] + [rc_file]) + self.spawn([self.rc] + + ["/fo" + obj] + [rc_file]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) continue else: # how to handle this file? - raise CompileError ( - "Don't know how to compile %s to %s" % \ - (src, obj)) + raise CompileError("Don't know how to compile %s to %s" + % (src, obj)) output_opt = "/Fo" + obj try: - self.spawn ([self.cc] + compile_opts + pp_opts + - [input_opt, output_opt] + - extra_postargs) + self.spawn([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) return objects - # compile () + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0, + target_lang=None): - def create_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0, - target_lang=None): + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, + output_dir=output_dir) - if not self.initialized: self.initialize() - (objects, output_dir) = self._fix_object_args (objects, output_dir) - output_filename = \ - self.library_filename (output_libname, output_dir=output_dir) - - if self._need_link (objects, output_filename): + if self._need_link(objects, output_filename): lib_args = objects + ['/OUT:' + output_filename] if debug: - pass # XXX what goes here? + pass # XXX what goes here? try: - self.spawn ([self.lib] + lib_args) + self.([self.lib] + lib_args) except DistutilsExecError as msg: - raise LibError, msg - + raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) - # create_static_lib () - - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - - if not self.initialized: self.initialize() - (objects, output_dir) = self._fix_object_args (objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + (libraries, library_dirs, runtime_library_dirs) = fixed_args if runtime_library_dirs: self.warn ("I don't know what to do with 'runtime_library_dirs': " + str (runtime_library_dirs)) - lib_opts = gen_lib_options (self, - library_dirs, runtime_library_dirs, - libraries) + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) if output_dir is not None: - output_filename = os.path.join (output_dir, output_filename) - - if self._need_link (objects, output_filename): + output_filename = os.path.join(output_dir, output_filename) + if self._need_link(objects, output_filename): if target_desc == CCompiler.EXECUTABLE: if debug: ldflags = self.ldflags_shared_debug[1:] @@ -530,34 +518,32 @@ def link (self, if extra_postargs: ld_args.extend(extra_postargs) - self.mkpath (os.path.dirname (output_filename)) + self.mkpath(os.path.dirname(output_filename)) try: - self.spawn ([self.linker] + ld_args) + self.spawn([self.linker] + ld_args) except DistutilsExecError as msg: - raise LinkError, msg + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) - # link () - # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in # ccompiler.py. - def library_dir_option (self, dir): + def library_dir_option(self, dir): return "/LIBPATH:" + dir - def runtime_library_dir_option (self, dir): - raise DistutilsPlatformError, \ - "don't know how to set runtime library search path for MSVC++" + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC++") - def library_option (self, lib): - return self.library_filename (lib) + def library_option(self, lib): + return self.library_filename(lib) - def find_library_file (self, dirs, lib, debug=0): + def find_library_file(self, dirs, lib, debug=0): # Prefer a debugging library if found (and requested), but deal # with it if we don't have one. if debug: @@ -573,8 +559,6 @@ def find_library_file (self, dirs, lib, debug=0): # Oops, didn't find it in *any* of 'dirs' return None - # find_library_file () - # Helper methods for using the MSVC registry settings def find_exe(self, exe): @@ -586,7 +570,6 @@ def find_exe(self, exe): absolute path that is known to exist. If none of them work, just return the original program name, 'exe'. """ - for p in self.__paths: fn = os.path.join(os.path.abspath(p), exe) if os.path.isfile(fn): @@ -606,7 +589,6 @@ def get_msvc_paths(self, path, platform='x86'): Return a list of strings. The list will be empty if unable to access the registry or appropriate registry keys not found. """ - if not _can_read_reg: return [] diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 662046ae22..25d48ae866 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -4,12 +4,9 @@ for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on Windows.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os -from types import * from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -96,13 +93,13 @@ def link (self, # First examine a couple of options for things that aren't implemented yet if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): - raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' + raise DistutilsPlatformError('Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac') if runtime_library_dirs: - raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' + raise DistutilsPlatformError('Runtime library dirs not implemented yet') if extra_preargs or extra_postargs: - raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' + raise DistutilsPlatformError('Runtime library dirs not implemented yet') if len(export_symbols) != 1: - raise DistutilsPlatformError, 'Need exactly one export symbol' + raise DistutilsPlatformError('Need exactly one export symbol') # Next there are various things for which we need absolute pathnames. # This is because we (usually) create the project in a subdirectory of # where we are now, and keeping the paths relative is too much work right diff --git a/spawn.py b/spawn.py index c70c10bf7c..0aee2bc3eb 100644 --- a/spawn.py +++ b/spawn.py @@ -6,19 +6,13 @@ executable name. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os from distutils.errors import * from distutils import log -def spawn (cmd, - search_path=1, - verbose=0, - dry_run=0): - +def spawn(cmd, search_path=1, verbose=0, dry_run=0): """Run another program, specified as a command list 'cmd', in a new process. 'cmd' is just the argument list for the new process, ie. cmd[0] is the program to run and cmd[1:] are the rest of its arguments. @@ -40,34 +34,26 @@ def spawn (cmd, elif os.name == 'os2': _spawn_os2(cmd, search_path, dry_run=dry_run) else: - raise DistutilsPlatformError, \ - "don't know how to spawn programs on platform '%s'" % os.name + raise DistutilsPlatformError( + "don't know how to spawn programs on platform '%s'" % os.name) -# spawn () - -def _nt_quote_args (args): +def _nt_quote_args(args): """Quote command-line arguments for DOS/Windows conventions: just wraps every argument which contains blanks in double quotes, and returns a new argument list. """ - # XXX this doesn't seem very robust to me -- but if the Windows guys # say it'll work, I guess I'll have to accept it. (What if an arg # contains quotes? What other magic characters, other than spaces, # have to be escaped? Is there an escaping mechanism other than # quoting?) - for i in range(len(args)): if args[i].find(' ') != -1: args[i] = '"%s"' % args[i] return args -def _spawn_nt (cmd, - search_path=1, - verbose=0, - dry_run=0): - +def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] cmd = _nt_quote_args(cmd) if search_path: @@ -80,19 +66,15 @@ def _spawn_nt (cmd, rc = os.spawnv(os.P_WAIT, executable, cmd) except OSError as exc: # this seems to happen when the command isn't found - raise DistutilsExecError, \ - "command '%s' failed: %s" % (cmd[0], exc[-1]) + raise DistutilsExecError( + "command '%s' failed: %s" % (cmd[0], exc[-1])) if rc != 0: # and this reflects the command running but failing - raise DistutilsExecError, \ - "command '%s' failed with exit status %d" % (cmd[0], rc) + raise DistutilsExecError( + "command '%s' failed with exit status %d" % (cmd[0], rc)) -def _spawn_os2 (cmd, - search_path=1, - verbose=0, - dry_run=0): - +def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] #cmd = _nt_quote_args(cmd) if search_path: @@ -105,75 +87,62 @@ def _spawn_os2 (cmd, rc = os.spawnv(os.P_WAIT, executable, cmd) except OSError as exc: # this seems to happen when the command isn't found - raise DistutilsExecError, \ - "command '%s' failed: %s" % (cmd[0], exc[-1]) + raise DistutilsExecError( + "command '%s' failed: %s" % (cmd[0], exc[-1])) if rc != 0: # and this reflects the command running but failing print("command '%s' failed with exit status %d" % (cmd[0], rc)) - raise DistutilsExecError, \ - "command '%s' failed with exit status %d" % (cmd[0], rc) - + raise DistutilsExecError( + "command '%s' failed with exit status %d" % (cmd[0], rc)) -def _spawn_posix (cmd, - search_path=1, - verbose=0, - dry_run=0): +def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv pid = os.fork() - - if pid == 0: # in the child + if pid == 0: # in the child try: - #print "cmd[0] =", cmd[0] - #print "cmd =", cmd exec_fn(cmd[0], cmd) except OSError as e: - sys.stderr.write("unable to execute %s: %s\n" % - (cmd[0], e.strerror)) + sys.stderr.write("unable to execute %s: %s\n" + % (cmd[0], e.strerror)) os._exit(1) sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0]) os._exit(1) - - - else: # in the parent + else: # in the parent # Loop until the child either exits or is terminated by a signal # (ie. keep waiting if it's merely stopped) - while 1: + while True: try: (pid, status) = os.waitpid(pid, 0) except OSError as exc: import errno if exc.errno == errno.EINTR: continue - raise DistutilsExecError, \ - "command '%s' failed: %s" % (cmd[0], exc[-1]) + raise DistutilsExecError( + "command '%s' failed: %s" % (cmd[0], exc[-1])) if os.WIFSIGNALED(status): - raise DistutilsExecError, \ - "command '%s' terminated by signal %d" % \ - (cmd[0], os.WTERMSIG(status)) - + raise DistutilsExecError( + "command '%s' terminated by signal %d" + % (cmd[0], os.WTERMSIG(status))) elif os.WIFEXITED(status): exit_status = os.WEXITSTATUS(status) if exit_status == 0: return # hey, it succeeded! else: - raise DistutilsExecError, \ - "command '%s' failed with exit status %d" % \ - (cmd[0], exit_status) - + raise DistutilsExecError( + "command '%s' failed with exit status %d" + % (cmd[0], exit_status)) elif os.WIFSTOPPED(status): continue - else: - raise DistutilsExecError, \ - "unknown error executing '%s': termination status %d" % \ - (cmd[0], status) -# _spawn_posix () + raise DistutilsExecError( + "unknown error executing '%s': termination status %d" + % (cmd[0], status)) def find_executable(executable, path=None): @@ -197,5 +166,3 @@ def find_executable(executable, path=None): return None else: return executable - -# find_executable() diff --git a/sysconfig.py b/sysconfig.py index c40c2e7425..70a279938c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -27,11 +27,7 @@ # different (hard-wired) directories. argv0_path = os.path.dirname(os.path.abspath(sys.executable)) -landmark = os.path.join(argv0_path, "Modules", "Setup") - -python_build = os.path.isfile(landmark) - -del landmark +python_build = os.path.isfile(os.path.join(argv0_path, "Modules", "Setup")) def get_python_version(): @@ -105,7 +101,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return libpython else: return os.path.join(libpython, "site-packages") - elif os.name == "nt": if standard_lib: return os.path.join(prefix, "Lib") @@ -114,7 +109,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return prefix else: return os.path.join(PREFIX, "Lib", "site-packages") - elif os.name == "mac": if plat_specific: if standard_lib: @@ -126,13 +120,11 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return os.path.join(prefix, "Lib") else: return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "os2": if standard_lib: return os.path.join(PREFIX, "Lib") else: return os.path.join(PREFIX, "Lib", "site-packages") - else: raise DistutilsPlatformError( "I don't know where Python installs its library " @@ -216,7 +208,7 @@ def parse_config_h(fp, g=None): define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") # - while 1: + while True: line = fp.readline() if not line: break @@ -254,9 +246,9 @@ def parse_makefile(fn, g=None): done = {} notdone = {} - while 1: + while True: line = fp.readline() - if line is None: # eof + if line is None: # eof break m = _variable_rx.match(line) if m: @@ -325,7 +317,7 @@ def expand_makefile_vars(s, vars): # 'parse_makefile()', which takes care of such expansions eagerly, # according to make's variable expansion semantics. - while 1: + while True: m = _findvar1_rx.search(s) or _findvar2_rx.search(s) if m: (beg, end) = m.span() diff --git a/text_file.py b/text_file.py index 3f6a220dcc..db054fd270 100644 --- a/text_file.py +++ b/text_file.py @@ -10,7 +10,6 @@ class TextFile: - """Provides a file-like object that takes care of all the things you commonly want to do when processing a text file that has some line-by-line syntax: strip comments (as long as "#" is your @@ -75,32 +74,29 @@ class TextFile: 'collapse_join': 0, } - def __init__ (self, filename=None, file=None, **options): + def __init__(self, filename=None, file=None, **options): """Construct a new TextFile object. At least one of 'filename' (a string) and 'file' (a file-like object) must be supplied. They keyword argument options are described above and affect the values returned by 'readline()'.""" - if filename is None and file is None: - raise RuntimeError, \ - "you must supply either or both of 'filename' and 'file'" + raise RuntimeError("you must supply either or both of 'filename' and 'file'") # set values for all options -- either from client option hash # or fallback to default_options for opt in self.default_options.keys(): if opt in options: - setattr (self, opt, options[opt]) - + setattr(self, opt, options[opt]) else: - setattr (self, opt, self.default_options[opt]) + setattr(self, opt, self.default_options[opt]) # sanity check client option hash for opt in options.keys(): if opt not in self.default_options: - raise KeyError, "invalid TextFile option '%s'" % opt + raise KeyError("invalid TextFile option '%s'" % opt) if file is None: - self.open (filename) + self.open(filename) else: self.filename = filename self.file = file @@ -111,43 +107,37 @@ def __init__ (self, filename=None, file=None, **options): # 'unreadline()' operation self.linebuf = [] - - def open (self, filename): + def open(self, filename): """Open a new file named 'filename'. This overrides both the 'filename' and 'file' arguments to the constructor.""" - self.filename = filename - self.file = io.open (self.filename, 'r') + self.file = io.open(self.filename, 'r') self.current_line = 0 - - def close (self): + def close(self): """Close the current file and forget everything we know about it (filename, current line number).""" - - self.file.close () + self.file.close() self.file = None self.filename = None self.current_line = None - - def gen_error (self, msg, line=None): + def gen_error(self, msg, line=None): outmsg = [] if line is None: line = self.current_line outmsg.append(self.filename + ", ") - if isinstance (line, (list, tuple)): - outmsg.append("lines %d-%d: " % tuple (line)) + if isinstance(line, (list, tuple)): + outmsg.append("lines %d-%d: " % tuple(line)) else: outmsg.append("line %d: " % line) outmsg.append(str(msg)) return "".join(outmsg) + def error(self, msg, line=None): + raise ValueError("error: " + self.gen_error(msg, line)) - def error (self, msg, line=None): - raise ValueError, "error: " + self.gen_error(msg, line) - - def warn (self, msg, line=None): + def warn(self, msg, line=None): """Print (to stderr) a warning message tied to the current logical line in the current file. If the current logical line in the file spans multiple physical lines, the warning refers to the @@ -157,8 +147,7 @@ def warn (self, msg, line=None): line.""" sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n") - - def readline (self): + def readline(self): """Read and return a single logical line from the current file (or from an internal buffer if lines have previously been "unread" with 'unreadline()'). If the 'join_lines' option is true, this @@ -168,7 +157,6 @@ def readline (self): line(s) just read. Returns None on end-of-file, since the empty string can occur if 'rstrip_ws' is true but 'strip_blanks' is not.""" - # If any "unread" lines waiting in 'linebuf', return the top # one. (We don't actually buffer read-ahead data -- lines only # get put in 'linebuf' if the client explicitly does an @@ -180,10 +168,11 @@ def readline (self): buildup_line = '' - while 1: + while True: # read the line, make it None if EOF line = self.file.readline() - if line == '': line = None + if line == '': + line = None if self.strip_comments and line: @@ -195,8 +184,8 @@ def readline (self): # unescape it (and any other escaped "#"'s that might be # lurking in there) and otherwise leave the line alone. - pos = line.find ("#") - if pos == -1: # no "#" -- no comments + pos = line.find("#") + if pos == -1: # no "#" -- no comments pass # It's definitely a comment -- either "#" is the first @@ -218,51 +207,48 @@ def readline (self): # # comment that should be ignored # there # result in "hello there". - if line.strip () == "": + if line.strip() == "": continue - - else: # it's an escaped "#" + else: # it's an escaped "#" line = line.replace("\\#", "#") - # did previous line end with a backslash? then accumulate if self.join_lines and buildup_line: # oops: end of file if line is None: - self.warn ("continuation line immediately precedes " - "end-of-file") + self.warn("continuation line immediately precedes " + "end-of-file") return buildup_line if self.collapse_join: - line = line.lstrip () + line = line.lstrip() line = buildup_line + line # careful: pay attention to line number when incrementing it - if isinstance (self.current_line, list): + if isinstance(self.current_line, list): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, - self.current_line+1] + self.current_line + 1] # just an ordinary line, read it as usual else: - if line is None: # eof + if line is None: # eof return None # still have to be careful about incrementing the line number! - if isinstance (self.current_line, list): + if isinstance(self.current_line, list): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 - # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) if self.lstrip_ws and self.rstrip_ws: - line = line.strip () + line = line.strip() elif self.lstrip_ws: - line = line.lstrip () + line = line.lstrip() elif self.rstrip_ws: - line = line.rstrip () + line = line.rstrip() # blank line (whether we rstrip'ed or not)? skip to next line # if appropriate @@ -281,27 +267,21 @@ def readline (self): # well, I guess there's some actual content there: return it return line - # readline () - - - def readlines (self): + def readlines(self): """Read and return the list of all logical lines remaining in the current file.""" - lines = [] - while 1: + while True: line = self.readline() if line is None: return lines - lines.append (line) + lines.append(line) - - def unreadline (self, line): + def unreadline(self, line): """Push 'line' (a string) onto an internal buffer that will be checked by future 'readline()' calls. Handy for implementing a parser with line-at-a-time lookahead.""" - - self.linebuf.append (line) + self.linebuf.append(line) if __name__ == "__main__": @@ -312,7 +292,7 @@ def unreadline (self, line): continues on next line """ # result 1: no fancy options - result1 = map (lambda x: x + "\n", test_data.split ("\n")[0:-1]) + result1 = map(lambda x: x + "\n", test_data.split("\n")[0:-1]) # result 2: just strip comments result2 = ["\n", @@ -337,9 +317,8 @@ def unreadline (self, line): # "collapse" joined lines result6 = ["line 3 continues on next line"] - def test_input (count, description, file, expected_result): - result = file.readlines () - # result = ''.join (result) + def test_input(count, description, file, expected_result): + result = file.readlines() if result == expected_result: print("ok %d (%s)" % (count, description)) else: @@ -351,31 +330,31 @@ def test_input (count, description, file, expected_result): filename = "test.txt" - out_file = open (filename, "w") - out_file.write (test_data) - out_file.close () + out_file = open(filename, "w") + out_file.write(test_data) + out_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (1, "no processing", in_file, result1) + in_file = TextFile(filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input(1, "no processing", in_file, result1) - in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (2, "strip comments", in_file, result2) + in_file = TextFile(filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input(2, "strip comments", in_file, result2) - in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input (3, "strip blanks", in_file, result3) + in_file = TextFile(filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + test_input(3, "strip blanks", in_file, result3) - in_file = TextFile (filename) - test_input (4, "default processing", in_file, result4) + in_file = TextFile(filename) + test_input(4, "default processing", in_file, result4) - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input (5, "join lines without collapsing", in_file, result5) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + test_input(5, "join lines without collapsing", in_file, result5) - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input (6, "join lines with collapsing", in_file, result6) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + test_input(6, "join lines with collapsing", in_file, result6) - os.remove (filename) + os.remove(filename) diff --git a/unixccompiler.py b/unixccompiler.py index d07ae1e358..91d0dffd76 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -50,7 +50,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysroot' arguments are present. """ - stripArch = stripSysroot = 0 + stripArch = stripSysroot = False compiler_so = list(compiler_so) kernel_version = os.uname()[2] # 8.4.3 @@ -65,7 +65,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): stripSysroot = '-isysroot' in cc_args if stripArch: - while 1: + while True: try: index = compiler_so.index('-arch') # Strip this argument and the next one: @@ -137,11 +137,10 @@ class UnixCCompiler(CCompiler): if sys.platform == "cygwin": exe_extension = ".exe" - def preprocess(self, source, - output_file=None, macros=None, include_dirs=None, - extra_preargs=None, extra_postargs=None): - ignore, macros, include_dirs = \ - self._fix_compile_args(None, macros, include_dirs) + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): + fixed_args = self._fix_compile_args(None, macros, include_dirs) + ignore, macros, include_dirs = fixed_args pp_opts = gen_preprocess_options(macros, include_dirs) pp_args = self.preprocessor + pp_opts if output_file: @@ -162,7 +161,7 @@ def preprocess(self, source, try: self.spawn(pp_args) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so @@ -172,7 +171,7 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) def create_static_lib(self, objects, output_libname, output_dir=None, debug=0, target_lang=None): @@ -196,7 +195,7 @@ def create_static_lib(self, objects, output_libname, try: self.spawn(self.ranlib + [output_filename]) except DistutilsExecError as msg: - raise LibError, msg + raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -206,13 +205,14 @@ def link(self, target_desc, objects, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): objects, output_dir = self._fix_object_args(objects, output_dir) - libraries, library_dirs, runtime_library_dirs = \ - self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + libraries, library_dirs, runtime_library_dirs = fixed_args lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) if not isinstance(output_dir, (basestring, type(None))): - raise TypeError, "'output_dir' must be a string or None" + raise TypeError("'output_dir' must be a string or None") if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) @@ -241,8 +241,7 @@ def link(self, target_desc, objects, if os.path.basename(linker[0]) == "env": i = 1 while '=' in linker[i]: - i = i + 1 - + i += 1 linker[i] = self.compiler_cxx[i] if sys.platform == 'darwin': @@ -250,7 +249,7 @@ def link(self, target_desc, objects, self.spawn(linker + ld_args) except DistutilsExecError as msg: - raise LinkError, msg + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) diff --git a/util.py b/util.py index 9aa857052a..22a8ba23e8 100644 --- a/util.py +++ b/util.py @@ -153,9 +153,9 @@ def convert_path (pathname): if not pathname: return pathname if pathname[0] == '/': - raise ValueError, "path '%s' cannot be absolute" % pathname + raise ValueError("path '%s' cannot be absolute" % pathname) if pathname[-1] == '/': - raise ValueError, "path '%s' cannot end with '/'" % pathname + raise ValueError("path '%s' cannot end with '/'" % pathname) paths = pathname.split('/') while '.' in paths: @@ -201,8 +201,7 @@ def change_root (new_root, pathname): return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError, \ - "nothing known about platform '%s'" % os.name + raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) _environ_checked = 0 @@ -248,7 +247,7 @@ def _subst (match, local_vars=local_vars): try: return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) except KeyError as var: - raise ValueError, "invalid variable '$%s'" % var + raise ValueError("invalid variable '$%s'" % var) # subst_vars () @@ -326,12 +325,10 @@ def split_quoted (s): elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: - raise RuntimeError, \ - "this can't happen (bad char '%c')" % s[end] + raise RuntimeError("this can't happen (bad char '%c')" % s[end]) if m is None: - raise ValueError, \ - "bad string (mismatched %s quotes?)" % s[end] + raise ValueError("bad string (mismatched %s quotes?)" % s[end]) (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] @@ -378,7 +375,7 @@ def strtobool (val): elif val in ('n', 'no', 'f', 'false', 'off', '0'): return 0 else: - raise ValueError, "invalid truth value %r" % (val,) + raise ValueError("invalid truth value %r" % (val,)) def byte_compile (py_files, @@ -502,8 +499,7 @@ def byte_compile (py_files, dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError, \ - ("invalid prefix: filename %r doesn't start with %r" + raise ValueError("invalid prefix: filename %r doesn't start with %r" % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: diff --git a/version.py b/version.py index 96b6552197..f71b2f6ce3 100644 --- a/version.py +++ b/version.py @@ -140,7 +140,7 @@ class StrictVersion (Version): def parse (self, vstring): match = self.version_re.match(vstring) if not match: - raise ValueError, "invalid version number '%s'" % vstring + raise ValueError("invalid version number '%s'" % vstring) (major, minor, patch, prerelease, prerelease_num) = \ match.group(1, 2, 4, 5, 6) From bf9ae3584f023df6f04f88e17cfe987e004de033 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 30 Aug 2007 05:35:41 +0000 Subject: [PATCH 1902/8469] Stop using the find function on the string module, use the string method. This will hopefully fix the problem on a Windows buildbot with test_sundry. --- util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util.py b/util.py index 22a8ba23e8..e0ae2e5ea2 100644 --- a/util.py +++ b/util.py @@ -39,14 +39,14 @@ def get_platform (): if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" - i = string.find(sys.version, prefix) + i = sys.version.find(prefix) if i == -1: return sys.platform - j = string.find(sys.version, ")", i) + j = sys.version.find(")", i) look = sys.version[i+len(prefix):j].lower() - if look=='amd64': + if look == 'amd64': return 'win-x86_64' - if look=='itanium': + if look == 'itanium': return 'win-ia64' return sys.platform From b7375849d526bedd70683539901013baaf9edcea Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Thu, 30 Aug 2007 18:46:25 +0000 Subject: [PATCH 1903/8469] Fix a typo in the distutils cleanup. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index f5b67049ef..d239057bac 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -442,7 +442,7 @@ def create_static_lib(self, if debug: pass # XXX what goes here? try: - self.([self.lib] + lib_args) + self.spawn([self.lib] + lib_args) except DistutilsExecError as msg: raise LibError(msg) else: From 70ba60503c5d76dd223ae450b64f757ade0b9b2c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 31 Aug 2007 10:37:15 +0000 Subject: [PATCH 1904/8469] string.maketrans() now produces translation tables for bytes.translate() -- wrong module? Fix all remaining instances that did bad things with the new str.translate(). --- command/install.py | 5 ++--- fancy_getopt.py | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/command/install.py b/command/install.py index 29cda1ebb7..ffd68db269 100644 --- a/command/install.py +++ b/command/install.py @@ -348,11 +348,10 @@ def dump_dirs(self, msg): if opt_name[-1] == "=": opt_name = opt_name[0:-1] if self.negative_opt.has_key(opt_name): - opt_name = self.negative_opt[opt_name].translate( - longopt_xlate) + opt_name = longopt_xlate(self.negative_opt[opt_name]) val = not getattr(self, opt_name) else: - opt_name = opt_name.translate(longopt_xlate) + opt_name = longopt_xlate(opt_name) val = getattr(self, opt_name) print(" %s: %s" % (opt_name, val)) diff --git a/fancy_getopt.py b/fancy_getopt.py index 5434334e79..15cbdd7162 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -26,7 +26,7 @@ # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = string.maketrans('-', '_') +longopt_xlate = lambda s: s.replace('-', '_') class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some @@ -107,7 +107,7 @@ def get_attr_name(self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return long_option.translate(longopt_xlate) + return longopt_xlate(long_option) def _check_alias_dict(self, aliases, what): assert isinstance(aliases, dict) @@ -372,7 +372,7 @@ def fancy_getopt(options, negative_opt, object, args): return parser.getopt(args, object) -WS_TRANS = string.maketrans(string.whitespace, ' ' * len(string.whitespace)) +WS_TRANS = {ord(_wschar) : ' ' for _wschar in string.whitespace} def wrap_text(text, width): """wrap_text(text : string, width : int) -> [string] @@ -432,7 +432,7 @@ def translate_longopt(opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return opt.translate(longopt_xlate) + return longopt_xlate(opt) class OptionDummy: From d597eb5b512b06572e8d5857ed0846c9f431cc6d Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Sat, 1 Sep 2007 20:37:22 +0000 Subject: [PATCH 1905/8469] Run 2to3's fix_has_key over distutils. --- command/install.py | 2 +- command/register.py | 4 ++-- command/upload.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index ffd68db269..f1ebcbf052 100644 --- a/command/install.py +++ b/command/install.py @@ -347,7 +347,7 @@ def dump_dirs(self, msg): opt_name = opt[0] if opt_name[-1] == "=": opt_name = opt_name[0:-1] - if self.negative_opt.has_key(opt_name): + if opt_name in self.negative_opt: opt_name = longopt_xlate(self.negative_opt[opt_name]) val = not getattr(self, opt_name) else: diff --git a/command/register.py b/command/register.py index 91081ddb1b..d123d327de 100644 --- a/command/register.py +++ b/command/register.py @@ -125,7 +125,7 @@ def send_metadata(self): # see if we can short-cut and get the username/password from the # config config = None - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): print('Using PyPI login from %s'%rc) @@ -168,7 +168,7 @@ def send_metadata(self): print('Server response (%s): %s'%(code, result)) # possibly save the login - if os.environ.has_key('HOME') and config is None and code == 200: + if 'HOME' in os.environ and config is None and code == 200: rc = os.path.join(os.environ['HOME'], '.pypirc') print('I can store your PyPI login so future submissions will be faster.') print('(the login will be stored in %s)'%rc) diff --git a/command/upload.py b/command/upload.py index b49acd123a..34b6692d04 100644 --- a/command/upload.py +++ b/command/upload.py @@ -45,7 +45,7 @@ def finalize_options(self): raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) From 69af9b586f1c9446c371b23a1c5d6e6a745f848e Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Sat, 8 Sep 2007 00:34:17 +0000 Subject: [PATCH 1906/8469] be explicit about the actual location of the missing file --- dep_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dep_util.py b/dep_util.py index c139c852e4..2c6d7927f0 100644 --- a/dep_util.py +++ b/dep_util.py @@ -19,7 +19,8 @@ def newer (source, target): Raise DistutilsFileError if 'source' does not exist. """ if not os.path.exists(source): - raise DistutilsFileError, "file '%s' does not exist" % source + raise DistutilsFileError, ("file '%s' does not exist" % + os.path.abspath(source)) if not os.path.exists(target): return 1 From be6286d3fa93348073baeaa554fe14dea328e7ce Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sat, 8 Sep 2007 17:39:28 +0000 Subject: [PATCH 1907/8469] Merged revisions 57778-58052 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r57820 | georg.brandl | 2007-08-31 08:59:27 +0200 (Fri, 31 Aug 2007) | 2 lines Document new shorthand notation for index entries. ........ r57827 | georg.brandl | 2007-08-31 10:47:51 +0200 (Fri, 31 Aug 2007) | 2 lines Fix subitem markup. ........ r57833 | martin.v.loewis | 2007-08-31 12:01:07 +0200 (Fri, 31 Aug 2007) | 1 line Mark registry components as 64-bit on Win64. ........ r57854 | bill.janssen | 2007-08-31 21:02:23 +0200 (Fri, 31 Aug 2007) | 1 line deprecate use of FakeSocket ........ r57855 | bill.janssen | 2007-08-31 21:02:46 +0200 (Fri, 31 Aug 2007) | 1 line remove mentions of socket.ssl in comments ........ r57856 | bill.janssen | 2007-08-31 21:03:31 +0200 (Fri, 31 Aug 2007) | 1 line remove use of non-existent SSLFakeSocket in apparently untested code ........ r57859 | martin.v.loewis | 2007-09-01 08:36:03 +0200 (Sat, 01 Sep 2007) | 3 lines Bug #1737210: Change Manufacturer of Windows installer to PSF. Will backport to 2.5. ........ r57865 | georg.brandl | 2007-09-01 09:51:24 +0200 (Sat, 01 Sep 2007) | 2 lines Fix RST link (backport from Py3k). ........ r57876 | georg.brandl | 2007-09-01 17:49:49 +0200 (Sat, 01 Sep 2007) | 2 lines Document sets' ">" and "<" operations (backport from py3k). ........ r57878 | skip.montanaro | 2007-09-01 19:40:03 +0200 (Sat, 01 Sep 2007) | 4 lines Added a note and examples to explain that re.split does not split on an empty pattern match. (issue 852532). ........ r57879 | walter.doerwald | 2007-09-01 20:18:09 +0200 (Sat, 01 Sep 2007) | 2 lines Fix wrong function names. ........ r57880 | walter.doerwald | 2007-09-01 20:34:05 +0200 (Sat, 01 Sep 2007) | 2 lines Fix typo. ........ r57889 | andrew.kuchling | 2007-09-01 22:31:59 +0200 (Sat, 01 Sep 2007) | 1 line Markup fix ........ r57892 | andrew.kuchling | 2007-09-01 22:43:36 +0200 (Sat, 01 Sep 2007) | 1 line Add various items ........ r57895 | andrew.kuchling | 2007-09-01 23:17:58 +0200 (Sat, 01 Sep 2007) | 1 line Wording change ........ r57896 | andrew.kuchling | 2007-09-01 23:18:31 +0200 (Sat, 01 Sep 2007) | 1 line Add more items ........ r57904 | ronald.oussoren | 2007-09-02 11:46:07 +0200 (Sun, 02 Sep 2007) | 3 lines Macosx: this patch ensures that the value of MACOSX_DEPLOYMENT_TARGET used by the Makefile is also used at configure-time. ........ r57925 | georg.brandl | 2007-09-03 09:16:46 +0200 (Mon, 03 Sep 2007) | 2 lines Fix #883466: don't allow Unicode as arguments to quopri and uu codecs. ........ r57936 | matthias.klose | 2007-09-04 01:33:04 +0200 (Tue, 04 Sep 2007) | 2 lines - Added support for linking the bsddb module against BerkeleyDB 4.6.x. ........ r57954 | mark.summerfield | 2007-09-04 10:16:15 +0200 (Tue, 04 Sep 2007) | 3 lines Added cross-references plus a note about dict & list shallow copying. ........ r57958 | martin.v.loewis | 2007-09-04 11:51:57 +0200 (Tue, 04 Sep 2007) | 3 lines Document that we rely on the OS to release the crypto context. Fixes #1626801. ........ r57960 | martin.v.loewis | 2007-09-04 15:13:14 +0200 (Tue, 04 Sep 2007) | 3 lines Patch #1388440: Add set_completion_display_matches_hook and get_completion_type to readline. ........ r57961 | martin.v.loewis | 2007-09-04 16:19:28 +0200 (Tue, 04 Sep 2007) | 3 lines Patch #1031213: Decode source line in SyntaxErrors back to its original source encoding. Will backport to 2.5. ........ r57972 | matthias.klose | 2007-09-04 20:17:36 +0200 (Tue, 04 Sep 2007) | 3 lines - Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify to include some information about the build environment. ........ r57973 | matthias.klose | 2007-09-04 21:05:38 +0200 (Tue, 04 Sep 2007) | 2 lines - Makefile.pre.in(buildbottest): Remove whitespace at eol. ........ r57975 | matthias.klose | 2007-09-04 22:46:02 +0200 (Tue, 04 Sep 2007) | 2 lines - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*. ........ r57980 | bill.janssen | 2007-09-05 02:46:27 +0200 (Wed, 05 Sep 2007) | 1 line SSL certificate distinguished names should be represented by tuples ........ r57985 | martin.v.loewis | 2007-09-05 08:39:17 +0200 (Wed, 05 Sep 2007) | 3 lines Patch #1105: Explain that one needs to build the solution to get dependencies right. ........ r57987 | armin.rigo | 2007-09-05 09:51:21 +0200 (Wed, 05 Sep 2007) | 4 lines PyDict_GetItem() returns a borrowed reference. There are probably a number of places that are open to attacks such as the following one, in bltinmodule.c:min_max(). ........ r57991 | martin.v.loewis | 2007-09-05 13:47:34 +0200 (Wed, 05 Sep 2007) | 3 lines Patch #786737: Allow building in a tree of symlinks pointing to a readonly source. ........ r57993 | georg.brandl | 2007-09-05 15:36:44 +0200 (Wed, 05 Sep 2007) | 2 lines Backport from Py3k: Bug #1684991: explain lookup semantics for __special__ methods (new-style classes only). ........ r58004 | armin.rigo | 2007-09-06 10:30:51 +0200 (Thu, 06 Sep 2007) | 4 lines Patch #1733973 by peaker: ptrace_enter_call() assumes no exception is currently set. This assumption is broken when throwing into a generator. ........ r58006 | armin.rigo | 2007-09-06 11:30:38 +0200 (Thu, 06 Sep 2007) | 4 lines PyDict_GetItem() returns a borrowed reference. This attack is against ceval.c:IMPORT_NAME, which calls an object (__builtin__.__import__) without holding a reference to it. ........ r58013 | georg.brandl | 2007-09-06 16:49:56 +0200 (Thu, 06 Sep 2007) | 2 lines Backport from 3k: #1116: fix reference to old filename. ........ r58021 | thomas.heller | 2007-09-06 22:26:20 +0200 (Thu, 06 Sep 2007) | 1 line Fix typo: c_float represents to C float type. ........ r58022 | skip.montanaro | 2007-09-07 00:29:06 +0200 (Fri, 07 Sep 2007) | 3 lines If this is correct for py3k branch and it's already in the release25-maint branch, seems like it ought to be on the trunk as well. ........ r58023 | gregory.p.smith | 2007-09-07 00:59:59 +0200 (Fri, 07 Sep 2007) | 4 lines Apply the fix from Issue1112 to make this test more robust and keep windows happy. ........ r58031 | brett.cannon | 2007-09-07 05:17:50 +0200 (Fri, 07 Sep 2007) | 4 lines Make uuid1 and uuid4 tests conditional on whether ctypes can be imported; implementation of either function depends on ctypes but uuid as a whole does not. ........ r58032 | brett.cannon | 2007-09-07 06:18:30 +0200 (Fri, 07 Sep 2007) | 6 lines Fix a crasher where Python code managed to infinitely recurse in C code without ever going back out to Python code in PyObject_Call(). Required introducing a static RuntimeError instance so that normalizing an exception there is no reliance on a recursive call that would put the exception system over the recursion check itself. ........ r58034 | thomas.heller | 2007-09-07 08:32:17 +0200 (Fri, 07 Sep 2007) | 1 line Add a 'c_longdouble' type to the ctypes module. ........ r58035 | thomas.heller | 2007-09-07 11:30:40 +0200 (Fri, 07 Sep 2007) | 1 line Remove unneeded #include. ........ r58036 | thomas.heller | 2007-09-07 11:33:24 +0200 (Fri, 07 Sep 2007) | 6 lines Backport from py3k branch: Add a workaround for a strange bug on win64, when _ctypes is compiled with the SDK compiler. This should fix the failing Lib\ctypes\test\test_as_parameter.py test. ........ r58037 | georg.brandl | 2007-09-07 16:14:40 +0200 (Fri, 07 Sep 2007) | 2 lines Fix a wrong indentation for sublists. ........ r58043 | georg.brandl | 2007-09-07 22:10:49 +0200 (Fri, 07 Sep 2007) | 2 lines #1095: ln -f doesn't work portably, fix in Makefile. ........ r58049 | skip.montanaro | 2007-09-08 02:34:17 +0200 (Sat, 08 Sep 2007) | 1 line be explicit about the actual location of the missing file ........ --- dep_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dep_util.py b/dep_util.py index a9d589a256..07b3549c6f 100644 --- a/dep_util.py +++ b/dep_util.py @@ -17,7 +17,8 @@ def newer (source, target): Raise DistutilsFileError if 'source' does not exist. """ if not os.path.exists(source): - raise DistutilsFileError("file '%s' does not exist" % source) + raise DistutilsFileError("file '%s' does not exist" % + os.path.abspath(source)) if not os.path.exists(target): return 1 From a68bb215508d8be88a6391cc760e2a203e1b526b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 12 Sep 2007 19:29:28 +0000 Subject: [PATCH 1908/8469] #1120: put explicit version in the shebang lines of pydoc, idle and smtpd.py scripts that are installed by setup.py. That way, they work when only "make altinstall" is used. --- command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index bda4480ca5..b4810c3eac 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -104,7 +104,8 @@ def copy_scripts (self): outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), - "python" + sysconfig.get_config_var("EXE")), + "python" + sysconfig.get_config_var("VERSION") + + sysconfig.get_config_var("EXE")), post_interp)) outf.writelines(f.readlines()) outf.close() From 02aa5e870e7910a62c992c30eaced5ef448d43fa Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Wed, 19 Sep 2007 03:06:30 +0000 Subject: [PATCH 1909/8469] Merged revisions 58095-58132,58136-58148,58151-58197 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r58096 | brett.cannon | 2007-09-10 23:38:27 +0200 (Mon, 10 Sep 2007) | 4 lines Fix a possible segfault from recursing too deep to get the repr of a list. Closes issue #1096. ........ r58097 | bill.janssen | 2007-09-10 23:51:02 +0200 (Mon, 10 Sep 2007) | 33 lines More work on SSL support. * Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing. ........ r58098 | guido.van.rossum | 2007-09-11 00:02:25 +0200 (Tue, 11 Sep 2007) | 9 lines Patch # 1140 (my code, approved by Effbot). Make sure the type of the return value of re.sub(x, y, z) is the type of y+x (i.e. unicode if either is unicode, str if they are both str) even if there are no substitutions or if x==z (which triggered various special cases in join_list()). Could be backported to 2.5; no need to port to 3.0. ........ r58099 | guido.van.rossum | 2007-09-11 00:36:02 +0200 (Tue, 11 Sep 2007) | 8 lines Patch # 1026 by Benjamin Aranguren (with Alex Martelli): Backport abc.py and isinstance/issubclass overloading to 2.6. I had to backport test_typechecks.py myself, and make one small change to abc.py to avoid duplicate work when x.__class__ and type(x) are the same. ........ r58100 | bill.janssen | 2007-09-11 01:41:24 +0200 (Tue, 11 Sep 2007) | 3 lines A better way of finding an open port to test with. ........ r58101 | bill.janssen | 2007-09-11 03:09:19 +0200 (Tue, 11 Sep 2007) | 4 lines Make sure test_ssl doesn't reference the ssl module in a context where it can't be imported. ........ r58102 | bill.janssen | 2007-09-11 04:42:07 +0200 (Tue, 11 Sep 2007) | 3 lines Fix some documentation bugs. ........ r58103 | nick.coghlan | 2007-09-11 16:01:18 +0200 (Tue, 11 Sep 2007) | 1 line Always use the -E flag when spawning subprocesses in test_cmd_line (Issue 1056) ........ r58106 | thomas.heller | 2007-09-11 21:17:48 +0200 (Tue, 11 Sep 2007) | 3 lines Disable some tests that fail on the 'ppc Debian unstable' buildbot to find out if they cause the segfault on the 'alpha Debian' machine. ........ r58108 | brett.cannon | 2007-09-11 23:02:28 +0200 (Tue, 11 Sep 2007) | 6 lines Generators had their throw() method allowing string exceptions. That's a no-no. Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string exception is passed in. ........ r58112 | georg.brandl | 2007-09-12 20:03:51 +0200 (Wed, 12 Sep 2007) | 3 lines New documentation page for the bdb module. (This doesn't need to be merged to Py3k.) ........ r58114 | georg.brandl | 2007-09-12 20:05:57 +0200 (Wed, 12 Sep 2007) | 2 lines Bug #1152: use non-deprecated name in example. ........ r58115 | georg.brandl | 2007-09-12 20:08:33 +0200 (Wed, 12 Sep 2007) | 2 lines Fix #1122: wrong return type documented for various _Size() functions. ........ r58117 | georg.brandl | 2007-09-12 20:10:56 +0200 (Wed, 12 Sep 2007) | 2 lines Fix #1139: PyFile_Encoding really is PyFile_SetEncoding. ........ r58119 | georg.brandl | 2007-09-12 20:29:18 +0200 (Wed, 12 Sep 2007) | 2 lines bug #1154: release memory allocated by "es" PyArg_ParseTuple format specifier. ........ r58121 | bill.janssen | 2007-09-12 20:52:05 +0200 (Wed, 12 Sep 2007) | 1 line root certificate for https://svn.python.org/, used in test_ssl ........ r58122 | georg.brandl | 2007-09-12 21:00:07 +0200 (Wed, 12 Sep 2007) | 3 lines Bug #1153: repr.repr() now doesn't require set and dictionary items to be orderable to properly represent them. ........ r58125 | georg.brandl | 2007-09-12 21:29:28 +0200 (Wed, 12 Sep 2007) | 4 lines #1120: put explicit version in the shebang lines of pydoc, idle and smtpd.py scripts that are installed by setup.py. That way, they work when only "make altinstall" is used. ........ r58139 | mark.summerfield | 2007-09-13 16:54:30 +0200 (Thu, 13 Sep 2007) | 9 lines Replaced variable o with obj in operator.rst because o is easy to confuse. Added a note about Python 3's collections.Mapping etc., above section that describes isMappingType() etc. Added xrefs between os, os.path, fileinput, and open(). ........ r58143 | facundo.batista | 2007-09-13 20:13:15 +0200 (Thu, 13 Sep 2007) | 7 lines Merged the decimal-branch (revisions 54886 to 58140). Decimal is now fully updated to the latests Decimal Specification (v1.66) and the latests test cases (v2.56). Thanks to Mark Dickinson for all his help during this process. ........ r58145 | facundo.batista | 2007-09-13 20:42:09 +0200 (Thu, 13 Sep 2007) | 7 lines Put the parameter watchexp back in (changed watchexp from an int to a bool). Also second argument to watchexp is now converted to Decimal, just as with all the other two-argument operations. Thanks Mark Dickinson. ........ r58147 | andrew.kuchling | 2007-09-14 00:49:34 +0200 (Fri, 14 Sep 2007) | 1 line Add various items ........ r58148 | andrew.kuchling | 2007-09-14 00:50:10 +0200 (Fri, 14 Sep 2007) | 1 line Make target unique ........ r58154 | facundo.batista | 2007-09-14 20:58:34 +0200 (Fri, 14 Sep 2007) | 3 lines Included the new functions, and new descriptions. ........ r58155 | thomas.heller | 2007-09-14 21:40:35 +0200 (Fri, 14 Sep 2007) | 2 lines ctypes.util.find_library uses dump(1) instead of objdump(1) on Solaris. Fixes issue #1777530; will backport to release25-maint. ........ r58159 | facundo.batista | 2007-09-14 23:29:52 +0200 (Fri, 14 Sep 2007) | 3 lines Some additions (examples and a bit on the tutorial). ........ r58160 | georg.brandl | 2007-09-15 18:53:36 +0200 (Sat, 15 Sep 2007) | 2 lines Remove bdb from the "undocumented modules" list. ........ r58164 | bill.janssen | 2007-09-17 00:06:00 +0200 (Mon, 17 Sep 2007) | 15 lines Add support for asyncore server-side SSL support. This requires adding the 'makefile' method to ssl.SSLSocket, and importing the requisite fakefile class from socket.py, and making the appropriate changes to it to make it use the SSL connection. Added sample HTTPS server to test_ssl.py, and test that uses it. Change SSL tests to use https://svn.python.org/, instead of www.sf.net and pop.gmail.com. Added utility function to ssl module, get_server_certificate, to wrap up the several things to be done to pull a certificate from a remote server. ........ r58173 | bill.janssen | 2007-09-17 01:16:46 +0200 (Mon, 17 Sep 2007) | 1 line use binary mode when reading files for testAsyncore to make Windows happy ........ r58175 | raymond.hettinger | 2007-09-17 02:55:00 +0200 (Mon, 17 Sep 2007) | 7 lines Sync-up named tuples with the latest version of the ASPN recipe. Allows optional commas in the field-name spec (help when named tuples are used in conjuction with sql queries). Adds the __fields__ attribute for introspection and to support conversion to dictionary form. Adds a __replace__() method similar to str.replace() but using a named field as a target. Clean-up spelling and presentation in doc-strings. ........ r58176 | brett.cannon | 2007-09-17 05:28:34 +0200 (Mon, 17 Sep 2007) | 5 lines Add a bunch of GIL release/acquire points in tp_print implementations and for PyObject_Print(). Closes issue #1164. ........ r58177 | sean.reifschneider | 2007-09-17 07:45:04 +0200 (Mon, 17 Sep 2007) | 2 lines issue1597011: Fix for bz2 module corner-case error due to error checking bug. ........ r58180 | facundo.batista | 2007-09-17 18:26:50 +0200 (Mon, 17 Sep 2007) | 3 lines Decimal is updated, :) ........ r58181 | facundo.batista | 2007-09-17 19:30:13 +0200 (Mon, 17 Sep 2007) | 5 lines The methods always return Decimal classes, even if they're executed through a subclass (thanks Mark Dickinson). Added a bit of testing for this. ........ r58183 | sean.reifschneider | 2007-09-17 22:53:21 +0200 (Mon, 17 Sep 2007) | 2 lines issue1082: Fixing platform and system for Vista. ........ r58185 | andrew.kuchling | 2007-09-18 03:36:16 +0200 (Tue, 18 Sep 2007) | 1 line Add item; sort properly ........ r58186 | raymond.hettinger | 2007-09-18 05:33:19 +0200 (Tue, 18 Sep 2007) | 1 line Handle corner cased on 0-tuples and 1-tuples. Add verbose option so people can see how it works. ........ r58192 | georg.brandl | 2007-09-18 09:24:40 +0200 (Tue, 18 Sep 2007) | 2 lines A bit of reordering, also show more subheadings in the lang ref index. ........ r58193 | facundo.batista | 2007-09-18 18:53:18 +0200 (Tue, 18 Sep 2007) | 4 lines Speed up of the various division operations (remainder, divide, divideint and divmod). Thanks Mark Dickinson. ........ r58197 | raymond.hettinger | 2007-09-19 00:18:02 +0200 (Wed, 19 Sep 2007) | 1 line Cleanup docs for NamedTuple. ........ --- command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 176e6e1073..227bb9c7a1 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -102,7 +102,8 @@ def copy_scripts(self): outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), - "python" + sysconfig.get_config_var("EXE")), + "python" + sysconfig.get_config_var("VERSION") + + sysconfig.get_config_var("EXE")), post_interp)) outf.writelines(f.readlines()) outf.close() From 4cb4040d3e7687c6e5ec99a6a52217ca9091db9a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 25 Sep 2007 21:48:09 +0000 Subject: [PATCH 1910/8469] Fix a straggler filter() call. --- fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_getopt.py b/fancy_getopt.py index 15cbdd7162..b3231c3de7 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -388,7 +388,7 @@ def wrap_text(text, width): text = text.expandtabs() text = text.translate(WS_TRANS) chunks = re.split(r'( +|-+)', text) - chunks = filter(None, chunks) # ' - ' results in empty strings + chunks = [ch for ch in chunks if ch] # ' - ' results in empty strings lines = [] while chunks: From 27cd6610b468d4cc03dea2c22d74aa3c281d3a66 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 15 Oct 2007 01:27:53 +0000 Subject: [PATCH 1911/8469] Fix yet another stray 2.x-ism (maybe merged?). --- dist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 974ee5163b..631df48cd0 100644 --- a/dist.py +++ b/dist.py @@ -280,8 +280,7 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): from pprint import pformat if commands is None: # dump all command option dicts - commands = self.command_options.keys() - commands.sort() + commands = sorted(self.command_options.keys()) if header is not None: print(indent + header) From d593487053de01cd756914a5cb5cc6b058c99c03 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 16 Oct 2007 18:12:55 +0000 Subject: [PATCH 1912/8469] Patch# 1258 by Christian Heimes: kill basestring. I like this because it makes the code shorter! :-) --- ccompiler.py | 12 ++++++------ cmd.py | 8 ++++---- command/build_clib.py | 4 ++-- command/build_ext.py | 10 +++++----- command/build_py.py | 2 +- command/config.py | 8 ++++---- command/install.py | 2 +- command/install_data.py | 2 +- dir_util.py | 2 +- dist.py | 6 +++--- extension.py | 4 ++-- fancy_getopt.py | 4 ++-- filelist.py | 2 +- unixccompiler.py | 2 +- 14 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index c33e5ab440..f4edb7c6a6 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -154,7 +154,7 @@ class (via the 'executables' class attribute), but most will have: self.set_executable(key, value) def set_executable(self, key, value): - if isinstance(value, basestring): + if isinstance(value, str): setattr(self, key, split_quoted(value)) else: setattr(self, key, value) @@ -175,8 +175,8 @@ def _check_macro_definitions(self, definitions): for defn in definitions: if not (isinstance(defn, tuple) and (len(defn) in (1, 2) and - (isinstance (defn[1], basestring) or defn[1] is None)) and - isinstance (defn[0], basestring)): + (isinstance (defn[1], str) or defn[1] is None)) and + isinstance (defn[0], str)): raise TypeError(("invalid macro definition '%s': " % defn) + \ "must be tuple (string,), (string, string), or " + \ "(string, None)") @@ -318,7 +318,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, """ if outdir is None: outdir = self.output_dir - elif not isinstance(outdir, basestring): + elif not isinstance(outdir, str): raise TypeError("'output_dir' must be a string or None") if macros is None: @@ -415,7 +415,7 @@ def _fix_compile_args(self, output_dir, macros, include_dirs): """ if output_dir is None: output_dir = self.output_dir - elif not isinstance(output_dir, basestring): + elif not isinstance(output_dir, str): raise TypeError("'output_dir' must be a string or None") if macros is None: @@ -494,7 +494,7 @@ def _fix_object_args(self, objects, output_dir): if output_dir is None: output_dir = self.output_dir - elif not isinstance(output_dir, basestring): + elif not isinstance(output_dir, str): raise TypeError("'output_dir' must be a string or None") return (objects, output_dir) diff --git a/cmd.py b/cmd.py index 66940f7799..bd560a661c 100644 --- a/cmd.py +++ b/cmd.py @@ -213,7 +213,7 @@ def _ensure_stringlike(self, option, what, default=None): if val is None: setattr(self, option, default) return default - elif not isinstance(val, basestring): + elif not isinstance(val, str): raise DistutilsOptionError("'%s' must be a %s (got `%s`)" % (option, what, val)) return val @@ -233,11 +233,11 @@ def ensure_string_list(self, option): val = getattr(self, option) if val is None: return - elif isinstance(val, basestring): + elif isinstance(val, str): setattr(self, option, re.split(r',\s*|\s+', val)) else: if isinstance(val, list): - ok = all(isinstance(v, basestring) for v in val) + ok = all(isinstance(v, str) for v in val) else: ok = False if not ok: @@ -390,7 +390,7 @@ def make_file(self, infiles, outfile, func, args, # Allow 'infiles' to be a single string - if isinstance(infiles, basestring): + if isinstance(infiles, str): infiles = (infiles,) elif not isinstance(infiles, (list, tuple)): raise TypeError( diff --git a/command/build_clib.py b/command/build_clib.py index 5f95207ca9..34f4983689 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -86,7 +86,7 @@ def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if isinstance(self.include_dirs, basestring): + if isinstance(self.include_dirs, str): self.include_dirs = self.include_dirs.split(os.pathsep) # XXX same as for build_ext -- what about 'self.define' and @@ -134,7 +134,7 @@ def check_library_list(self, libraries): raise DistutilsSetupError( "each element of 'libraries' must a 2-tuple") - if isinstance(lib[0], basestring): + if isinstance(lib[0], str): raise DistutilsSetupError( "first element of each tuple in 'libraries' " "must be a string (the library name)") diff --git a/command/build_ext.py b/command/build_ext.py index a439c49ac6..ddf8f723f8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -133,7 +133,7 @@ def finalize_options(self): plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if isinstance(self.include_dirs, basestring): + if isinstance(self.include_dirs, str): self.include_dirs = self.include_dirs.split(os.pathsep) # Put the Python "system" include dir at the end, so that @@ -142,7 +142,7 @@ def finalize_options(self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if isinstance(self.libraries, basestring): + if isinstance(self.libraries, str): self.libraries = [self.libraries] # Life is easier if we're not forever checking for None, so @@ -151,12 +151,12 @@ def finalize_options(self): self.libraries = [] if self.library_dirs is None: self.library_dirs = [] - elif isinstance(self.library_dirs, basestring): + elif isinstance(self.library_dirs, str): self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] - elif isinstance(self.rpath, basestring): + elif isinstance(self.rpath, str): self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories @@ -309,7 +309,7 @@ def check_extensions_list(self, extensions): "each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") - if not (isinstance(ext_name, basestring) and + if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): raise DistutilsSetupError( "first element of each tuple in 'ext_modules' " diff --git a/command/build_py.py b/command/build_py.py index 454424f333..63ced4b470 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -325,7 +325,7 @@ def get_outputs(self, include_bytecode=1): return outputs def build_module(self, module, module_file, package): - if isinstance(package, basestring): + if isinstance(package, str): package = package.split('.') elif not isinstance(package, (list, tuple)): raise TypeError( diff --git a/command/config.py b/command/config.py index a601234218..34f91884d8 100644 --- a/command/config.py +++ b/command/config.py @@ -69,17 +69,17 @@ def initialize_options(self): def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - elif isinstance(self.include_dirs, basestring): + elif isinstance(self.include_dirs, str): self.include_dirs = self.include_dirs.split(os.pathsep) if self.libraries is None: self.libraries = [] - elif isinstance(self.libraries, basestring): + elif isinstance(self.libraries, str): self.libraries = [self.libraries] if self.library_dirs is None: self.library_dirs = [] - elif isinstance(self.library_dirs, basestring): + elif isinstance(self.library_dirs, str): self.library_dirs = self.library_dirs.split(os.pathsep) def run(self): @@ -204,7 +204,7 @@ def search_cpp(self, pattern, body=None, headers=None, self._check_compiler() (src, out) = self._preprocess(body, headers, include_dirs, lang) - if isinstance(pattern, basestring): + if isinstance(pattern, str): pattern = re.compile(pattern) file = open(out) diff --git a/command/install.py b/command/install.py index f1ebcbf052..b768663c69 100644 --- a/command/install.py +++ b/command/install.py @@ -449,7 +449,7 @@ def handle_extra_path(self): self.extra_path = self.distribution.extra_path if self.extra_path is not None: - if isinstance(self.extra_path, basestring): + if isinstance(self.extra_path, str): self.extra_path = self.extra_path.split(',') if len(self.extra_path) == 1: diff --git a/command/install_data.py b/command/install_data.py index 2fbac63de0..06a70b4ad4 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -45,7 +45,7 @@ def finalize_options(self): def run(self): self.mkpath(self.install_dir) for f in self.data_files: - if isinstance(f, basestring): + if isinstance(f, str): # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: diff --git a/dir_util.py b/dir_util.py index 30e352db42..1f0d49c25f 100644 --- a/dir_util.py +++ b/dir_util.py @@ -28,7 +28,7 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if not isinstance(name, basestring): + if not isinstance(name, str): raise DistutilsInternalError( "mkpath: 'name' must be a string (got %r)" % (name,)) diff --git a/dist.py b/dist.py index 631df48cd0..ade2ab795c 100644 --- a/dist.py +++ b/dist.py @@ -580,13 +580,13 @@ def finalize_options (self): keywords = self.metadata.keywords if keywords is not None: - if isinstance(keywords, basestring): + if isinstance(keywords, str): keywordlist = keywords.split(',') self.metadata.keywords = [x.strip() for x in keywordlist] platforms = self.metadata.platforms if platforms is not None: - if isinstance(platforms, basestring): + if isinstance(platforms, str): platformlist = platforms.split(',') self.metadata.platforms = [x.strip() for x in platformlist] @@ -874,7 +874,7 @@ def _set_command_options (self, command_obj, option_dict=None): neg_opt = {} try: - is_string = isinstance(value, basestring) + is_string = isinstance(value, str) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: diff --git a/extension.py b/extension.py index 7f5954e45c..b271816844 100644 --- a/extension.py +++ b/extension.py @@ -102,9 +102,9 @@ def __init__(self, name, sources, language=None, **kw # To catch unknown keywords ): - assert isinstance(name, basestring), "'name' must be a string" + assert isinstance(name, str), "'name' must be a string" assert (isinstance(sources, list) and - all(isinstance(v, basestring) for v in sources)), \ + all(isinstance(v, str) for v in sources)), \ "'sources' must be a list of strings" self.name = name diff --git a/fancy_getopt.py b/fancy_getopt.py index b3231c3de7..72441fb43d 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -154,12 +154,12 @@ def _grok_option_table(self): raise ValueError("invalid option tuple: %r" % (option,)) # Type- and value-check the option names - if not isinstance(long, basestring) or len(long) < 2: + if not isinstance(long, str) or len(long) < 2: raise DistutilsGetoptError(("invalid long option '%s': " "must be a string of length >= 2") % long) if (not ((short is None) or - (isinstance(short, basestring) and len(short) == 1))): + (isinstance(short, str) and len(short) == 1))): raise DistutilsGetoptError("invalid short option '%s': " "must a single character or None" % short) diff --git a/filelist.py b/filelist.py index 8f801073d5..6506c30e6b 100644 --- a/filelist.py +++ b/filelist.py @@ -301,7 +301,7 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): or just returned as-is (assumes it's a regex object). """ if is_regex: - if isinstance(pattern, basestring): + if isinstance(pattern, str): return re.compile(pattern) else: return pattern diff --git a/unixccompiler.py b/unixccompiler.py index 91d0dffd76..ee975e15fa 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -211,7 +211,7 @@ def link(self, target_desc, objects, lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) - if not isinstance(output_dir, (basestring, type(None))): + if not isinstance(output_dir, (str, type(None))): raise TypeError("'output_dir' must be a string or None") if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) From 7fba7d60bbce7a9e20d887716e9b87b9496180f5 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 17 Nov 2007 11:46:54 +0000 Subject: [PATCH 1913/8469] The _winreg module returns bytes which must be decoded to unicode, not encoded. --- msvccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index d239057bac..6bf969f9d2 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -93,10 +93,10 @@ def read_values(base, key): return d def convert_mbcs(s): - enc = getattr(s, "encode", None) - if enc is not None: + dec = getattr(s, "decode", None) + if dec is not None: try: - s = enc("mbcs") + s = dec("mbcs") except UnicodeError: pass return s From 200d0eac23788226d0326f42258ced7ebf2431b2 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 22 Nov 2007 10:14:26 +0000 Subject: [PATCH 1914/8469] A test that should test for osx >= 10.4.0 actually tested for os versions <= 10.4. The end result is that a universal ("fat") build will claim to be a single-architecture on on OSX 10.5 (Leopard). This patch fixes this issue. --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index cfcc6a951e..731ee988b5 100644 --- a/util.py +++ b/util.py @@ -106,7 +106,7 @@ def get_platform (): osname = "macosx" - if (release + '.') < '10.4.' and \ + if (release + '.') >= '10.4.' and \ get_config_vars().get('UNIVERSALSDK', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 From 83cd6eeec1a6e2141517e7944b38efb712536537 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 3 Dec 2007 13:47:29 +0000 Subject: [PATCH 1915/8469] Applied my patch #1455 with some extra fixes for VS 2005 The new msvc9compiler module supports VS 2005 and VS 2008. I've also fixed build_ext to support PCbuild8 and PCbuild9 and backported my fix for xxmodule.c from py3k. The old code msvccompiler is still in place in case somebody likes to build an extension with VS 2003 or earlier. I've also updated the cygwin compiler module for VS 2005 and VS 2008. It works with VS 2005 but I'm unable to test it with VS 2008. We have to wait for a new version of cygwin. --- command/build_ext.py | 14 +- cygwinccompiler.py | 48 ++-- msvc9compiler.py | 658 +++++++++++++++++++++++++++++++++++++++++++ msvccompiler.py | 8 + 4 files changed, 706 insertions(+), 22 deletions(-) create mode 100644 msvc9compiler.py diff --git a/command/build_ext.py b/command/build_ext.py index 12d4083743..ecfa177d76 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -17,6 +17,10 @@ from distutils.extension import Extension from distutils import log +if os.name == 'nt': + from distutils.msvccompiler import get_build_version + MSVC_VERSION = int(get_build_version()) + # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). extension_name_re = re.compile \ @@ -176,7 +180,15 @@ def finalize_options (self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + if MSVC_VERSION == 9: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild9')) + elif MSVC_VERSION == 8: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild8', 'win32release')) + else: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 4fd23e6dc6..4ac11eb4b1 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -56,6 +56,29 @@ from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +def get_msvcr(): + """Include the appropriate MSVC runtime library if Python was built + with MSVC 7.0 or later. + """ + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + return ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + return ['msvcr71'] + elif msc_ver == '1400': + # VS2005 / MSVC 8.0 + return ['msvcr80'] + elif msc_ver == '1500': + # VS2008 / MSVC 9.0 + return ['msvcr90'] + else: + raise ValueError("Unknown MS Compiler version %i " % msc_Ver) + + class CygwinCCompiler (UnixCCompiler): compiler_type = 'cygwin' @@ -121,18 +144,9 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.warn( "Consider upgrading to a newer version of gcc") else: - self.dll_libraries=[] # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # with MSVC 7.0 or later. + self.dll_libraries = get_msvcr() # __init__ () @@ -320,16 +334,8 @@ def __init__ (self, self.dll_libraries=[] # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # with MSVC 7.0 or later. + self.dll_libraries = get_msvcr() # __init__ () diff --git a/msvc9compiler.py b/msvc9compiler.py new file mode 100644 index 0000000000..a6cff2c04e --- /dev/null +++ b/msvc9compiler.py @@ -0,0 +1,658 @@ +"""distutils.msvc9compiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for the Microsoft Visual Studio 2008. + +The module is compatible with VS 2005 and VS 2008. You can find legacy support +for older versions of VS in distutils.msvccompiler. +""" + +# Written by Perry Stoll +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) +# ported to VS2005 and VS 2008 by Christian Heimes + +__revision__ = "$Id$" + +import os +import subprocess +import sys +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import (CCompiler, gen_preprocess_options, + gen_lib_options) +from distutils import log + +import _winreg + +RegOpenKeyEx = _winreg.OpenKeyEx +RegEnumKey = _winreg.EnumKey +RegEnumValue = _winreg.EnumValue +RegError = _winreg.error + +HKEYS = (_winreg.HKEY_USERS, + _winreg.HKEY_CURRENT_USER, + _winreg.HKEY_LOCAL_MACHINE, + _winreg.HKEY_CLASSES_ROOT) + +VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" +WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" +NET_BASE = r"Software\Microsoft\.NETFramework" +ARCHS = {'DEFAULT' : 'x86', + 'intel' : 'x86', 'x86' : 'x86', + 'amd64' : 'x64', 'x64' : 'x64', + 'itanium' : 'ia64', 'ia64' : 'ia64', + } + +# The globals VERSION, ARCH, MACROS and VC_ENV are defined later + +class Reg: + """Helper class to read values from the registry + """ + + @classmethod + def get_value(cls, path, key): + for base in HKEYS: + d = cls.read_values(base, path) + if d and key in d: + return d[key] + raise KeyError(key) + + @classmethod + def read_keys(cls, base, key): + """Return list of registry keys.""" + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + L = [] + i = 0 + while True: + try: + k = RegEnumKey(handle, i) + except RegError: + break + L.append(k) + i += 1 + return L + + @classmethod + def read_values(cls, base, key): + """Return dict of registry keys and values. + + All names are converted to lowercase. + """ + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + d = {} + i = 0 + while True: + try: + name, value, type = RegEnumValue(handle, i) + except RegError: + break + name = name.lower() + d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) + i += 1 + return d + + @staticmethod + def convert_mbcs(s): + dec = getattr(s, "decode", None) + if dec is not None: + try: + s = dec("mbcs") + except UnicodeError: + pass + return s + +class MacroExpander: + + def __init__(self, version): + self.macros = {} + self.vsbase = VS_BASE % version + self.load_macros(version) + + def set_macro(self, macro, path, key): + self.macros["$(%s)" % macro] = Reg.get_value(path, key) + + def load_macros(self, version): + self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir") + self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir") + self.set_macro("FrameworkDir", NET_BASE, "installroot") + try: + if version >= 8.0: + self.set_macro("FrameworkSDKDir", NET_BASE, + "sdkinstallrootv2.0") + else: + raise KeyError("sdkinstallrootv2.0") + except KeyError as exc: # + raise DistutilsPlatformError( + """Python was built with Visual Studio 2008; +extensions must be built with a compiler than can generate compatible binaries. +Visual Studio 2008 was not found on this system. If you have Cygwin installed, +you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") + + if version >= 9.0: + self.set_macro("FrameworkVersion", self.vsbase, "clr version") + self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder") + else: + p = r"Software\Microsoft\NET Framework Setup\Product" + for base in HKEYS: + try: + h = RegOpenKeyEx(base, p) + except RegError: + continue + key = RegEnumKey(h, 0) + d = Reg.get_value(base, r"%s\%s" % (p, key)) + self.macros["$(FrameworkVersion)"] = d["version"] + + def sub(self, s): + for k, v in self.macros.items(): + s = s.replace(k, v) + return s + +def get_build_version(): + """Return the version of MSVC that was used to build Python. + + For Python 2.3 and up, the version number is included in + sys.version. For earlier versions, assume the compiler is MSVC 6. + """ + prefix = "MSC v." + i = sys.version.find(prefix) + if i == -1: + return 6 + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: + minorVersion = 0 + if majorVersion >= 6: + return majorVersion + minorVersion + # else we don't know what version of the compiler this is + return None + +def get_build_architecture(): + """Return the processor architecture. + + Possible results are "x86" or "amd64". + """ + prefix = " bit (" + i = sys.version.find(prefix) + if i == -1: + return "x86" + j = sys.version.find(")", i) + sysarch = sys.version[i+len(prefix):j].lower() + arch = ARCHS.get(sysarch, None) + if arch is None: + return ARCHS['DEFAULT'] + else: + return arch + +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths + +def find_vcvarsall(version): + """Find the vcvarsall.bat file + + At first it tries to find the productdir of VS 2008 in the registry. If + that fails it falls back to the VS90COMNTOOLS env var. + """ + vsbase = VS_BASE % version + try: + productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, + "productdir") + except KeyError: + log.debug("Unable to find productdir in registry") + productdir = None + + if not productdir or not os.path.isdir(productdir): + toolskey = "VS%0.f0COMNTOOLS" % version + toolsdir = os.environ.get(toolskey, None) + + if toolsdir and os.path.isdir(toolsdir): + productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") + productdir = os.path.abspath(productdir) + if not os.path.isdir(productdir): + log.debug("%s is not a valid directory" % productdir) + return None + else: + log.debug("Env var %s is not set or invalid" % toolskey) + if not productdir: + log.debug("No productdir found") + return None + vcvarsall = os.path.join(productdir, "vcvarsall.bat") + if os.path.isfile(vcvarsall): + return vcvarsall + log.debug("Unable to find vcvarsall.bat") + return None + +def query_vcvarsall(version, arch="x86"): + """Launch vcvarsall.bat and read the settings from its environment + """ + vcvarsall = find_vcvarsall(version) + interesting = set(("include", "lib", "libpath", "path")) + result = {} + + if vcvarsall is None: + raise IOError("Unable to find vcvarsall.bat") + popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if popen.wait() != 0: + raise IOError(popen.stderr.read()) + + for line in popen.stdout: + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=') + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = value + + if len(result) != len(interesting): + raise ValueError(str(list(result.keys()))) + + return result + +# More globals +VERSION = get_build_version() +if VERSION < 8.0: + raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) +ARCH = get_build_architecture() +# MACROS = MacroExpander(VERSION) +VC_ENV = query_vcvarsall(VERSION, ARCH) + +class MSVCCompiler(CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'msvc' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions + _mc_extensions) + res_extension = '.res' + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + def __init__(self, verbose=0, dry_run=0, force=0): + CCompiler.__init__ (self, verbose, dry_run, force) + self.__version = VERSION + self.__arch = ARCH + self.__root = r"Software\Microsoft\VisualStudio" + # self.__macros = MACROS + self.__path = [] + self.initialized = False + + def initialize(self): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): + # Assume that the SDK set up everything alright; don't try to be + # smarter + self.cc = "cl.exe" + self.linker = "link.exe" + self.lib = "lib.exe" + self.rc = "rc.exe" + self.mc = "mc.exe" + else: + self.__paths = VC_ENV['path'].split(os.pathsep) + os.environ['lib'] = VC_ENV['lib'] + os.environ['include'] = VC_ENV['include'] + + if len(self.__paths) == 0: + raise DistutilsPlatformError("Python was built with %s, " + "and extensions need to be built with the same " + "version of the compiler, but it isn't installed." + % self.__product) + + self.cc = self.find_exe("cl.exe") + self.linker = self.find_exe("link.exe") + self.lib = self.find_exe("lib.exe") + self.rc = self.find_exe("rc.exe") # resource compiler + self.mc = self.find_exe("mc.exe") # message compiler + #self.set_path_env_var('lib') + #self.set_path_env_var('include') + + # extend the MSVC path with the current path + try: + for p in os.environ['path'].split(';'): + self.__paths.append(p) + except KeyError: + pass + self.__paths = normalize_and_reduce_paths(self.__paths) + os.environ['path'] = ";".join(self.__paths) + + self.preprocess_options = None + if self.__arch == "x86": + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', + '/Z7', '/D_DEBUG'] + else: + # Win64 + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', + '/Z7', '/D_DEBUG'] + + self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' + ] + self.ldflags_static = [ '/nologo'] + + self.initialized = True + + # -- Worker methods ------------------------------------------------ + + def object_filenames(self, + source_filenames, + strip_dir=0, + output_dir=''): + # Copied from ccompiler.py, extended to return .res as 'object'-file + # for .rc input file + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + (base, ext) = os.path.splitext (src_name) + base = os.path.splitdrive(base)[1] # Chop off the drive + base = base[os.path.isabs(base):] # If abs, chop off leading / + if ext not in self.src_extensions: + # Better to raise an exception instead of silently continuing + # and later complain about sources and targets having + # different lengths + raise CompileError ("Don't know how to compile %s" % src_name) + if strip_dir: + base = os.path.basename (base) + if ext in self._rc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + elif ext in self._mc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + if not self.initialized: + self.initialize() + compile_info = self._setup_compile(output_dir, macros, include_dirs, + sources, depends, extra_postargs) + macros, objects, extra_postargs, pp_opts, build = compile_info + + compile_opts = extra_preargs or [] + compile_opts.append ('/c') + if debug: + compile_opts.extend(self.compile_options_debug) + else: + compile_opts.extend(self.compile_options) + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn([self.rc] + pp_opts + + [output_opt] + [input_opt]) + except DistutilsExecError as msg: + raise CompileError(msg) + continue + elif ext in self._mc_extensions: + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) + try: + # first compile .MC to .RC and .H file + self.spawn([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError as msg: + raise CompileError(msg) + continue + else: + # how to handle this file? + raise CompileError("Don't know how to compile %s to %s" + % (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + + return objects + + + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, + output_dir=output_dir) + + if self._need_link(objects, output_filename): + lib_args = objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + try: + self.spawn([self.lib] + lib_args) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + (libraries, library_dirs, runtime_library_dirs) = fixed_args + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + if target_desc == CCompiler.EXECUTABLE: + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + else: + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared + + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + os.path.dirname(objects[0]), + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + self.mkpath(os.path.dirname(output_filename)) + try: + self.spawn([self.linker] + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "/LIBPATH:" + dir + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC++") + + def library_option(self, lib): + return self.library_filename(lib) + + + def find_library_file(self, dirs, lib, debug=0): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] + for dir in dirs: + for name in try_names: + libfile = os.path.join(dir, self.library_filename (name)) + if os.path.exists(libfile): + return libfile + else: + # Oops, didn't find it in *any* of 'dirs' + return None + + # Helper methods for using the MSVC registry settings + + def find_exe(self, exe): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + for p in self.__paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + + # didn't find it; try existing path + for p in os.environ['Path'].split(';'): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn + + return exe diff --git a/msvccompiler.py b/msvccompiler.py index 29a9020956..fa123462ec 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -650,3 +650,11 @@ def set_path_env_var(self, name): p = self.get_msvc_paths(name) if p: os.environ[name] = string.join(p, ';') + + +if get_build_version() >= 8.0: + log.debug("Importing new compiler from distutils.msvc9compiler") + OldMSVCCompiler = MSVCCompiler + from distutils.msvc9compiler import MSVCCompiler + from distutils.msvc9compiler import get_build_architecture + from distutils.msvc9compiler import MacroExpander From c9618bff1c953979a37bc8a27bd2b4cd435b07b9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 3 Dec 2007 19:47:54 +0000 Subject: [PATCH 1916/8469] Patch #1537 from Chad Austin Change GeneratorExit's base class from Exception to BaseException --- msvc9compiler.py | 658 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 658 insertions(+) create mode 100644 msvc9compiler.py diff --git a/msvc9compiler.py b/msvc9compiler.py new file mode 100644 index 0000000000..a6cff2c04e --- /dev/null +++ b/msvc9compiler.py @@ -0,0 +1,658 @@ +"""distutils.msvc9compiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for the Microsoft Visual Studio 2008. + +The module is compatible with VS 2005 and VS 2008. You can find legacy support +for older versions of VS in distutils.msvccompiler. +""" + +# Written by Perry Stoll +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) +# ported to VS2005 and VS 2008 by Christian Heimes + +__revision__ = "$Id$" + +import os +import subprocess +import sys +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import (CCompiler, gen_preprocess_options, + gen_lib_options) +from distutils import log + +import _winreg + +RegOpenKeyEx = _winreg.OpenKeyEx +RegEnumKey = _winreg.EnumKey +RegEnumValue = _winreg.EnumValue +RegError = _winreg.error + +HKEYS = (_winreg.HKEY_USERS, + _winreg.HKEY_CURRENT_USER, + _winreg.HKEY_LOCAL_MACHINE, + _winreg.HKEY_CLASSES_ROOT) + +VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" +WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" +NET_BASE = r"Software\Microsoft\.NETFramework" +ARCHS = {'DEFAULT' : 'x86', + 'intel' : 'x86', 'x86' : 'x86', + 'amd64' : 'x64', 'x64' : 'x64', + 'itanium' : 'ia64', 'ia64' : 'ia64', + } + +# The globals VERSION, ARCH, MACROS and VC_ENV are defined later + +class Reg: + """Helper class to read values from the registry + """ + + @classmethod + def get_value(cls, path, key): + for base in HKEYS: + d = cls.read_values(base, path) + if d and key in d: + return d[key] + raise KeyError(key) + + @classmethod + def read_keys(cls, base, key): + """Return list of registry keys.""" + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + L = [] + i = 0 + while True: + try: + k = RegEnumKey(handle, i) + except RegError: + break + L.append(k) + i += 1 + return L + + @classmethod + def read_values(cls, base, key): + """Return dict of registry keys and values. + + All names are converted to lowercase. + """ + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + d = {} + i = 0 + while True: + try: + name, value, type = RegEnumValue(handle, i) + except RegError: + break + name = name.lower() + d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) + i += 1 + return d + + @staticmethod + def convert_mbcs(s): + dec = getattr(s, "decode", None) + if dec is not None: + try: + s = dec("mbcs") + except UnicodeError: + pass + return s + +class MacroExpander: + + def __init__(self, version): + self.macros = {} + self.vsbase = VS_BASE % version + self.load_macros(version) + + def set_macro(self, macro, path, key): + self.macros["$(%s)" % macro] = Reg.get_value(path, key) + + def load_macros(self, version): + self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir") + self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir") + self.set_macro("FrameworkDir", NET_BASE, "installroot") + try: + if version >= 8.0: + self.set_macro("FrameworkSDKDir", NET_BASE, + "sdkinstallrootv2.0") + else: + raise KeyError("sdkinstallrootv2.0") + except KeyError as exc: # + raise DistutilsPlatformError( + """Python was built with Visual Studio 2008; +extensions must be built with a compiler than can generate compatible binaries. +Visual Studio 2008 was not found on this system. If you have Cygwin installed, +you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") + + if version >= 9.0: + self.set_macro("FrameworkVersion", self.vsbase, "clr version") + self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder") + else: + p = r"Software\Microsoft\NET Framework Setup\Product" + for base in HKEYS: + try: + h = RegOpenKeyEx(base, p) + except RegError: + continue + key = RegEnumKey(h, 0) + d = Reg.get_value(base, r"%s\%s" % (p, key)) + self.macros["$(FrameworkVersion)"] = d["version"] + + def sub(self, s): + for k, v in self.macros.items(): + s = s.replace(k, v) + return s + +def get_build_version(): + """Return the version of MSVC that was used to build Python. + + For Python 2.3 and up, the version number is included in + sys.version. For earlier versions, assume the compiler is MSVC 6. + """ + prefix = "MSC v." + i = sys.version.find(prefix) + if i == -1: + return 6 + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: + minorVersion = 0 + if majorVersion >= 6: + return majorVersion + minorVersion + # else we don't know what version of the compiler this is + return None + +def get_build_architecture(): + """Return the processor architecture. + + Possible results are "x86" or "amd64". + """ + prefix = " bit (" + i = sys.version.find(prefix) + if i == -1: + return "x86" + j = sys.version.find(")", i) + sysarch = sys.version[i+len(prefix):j].lower() + arch = ARCHS.get(sysarch, None) + if arch is None: + return ARCHS['DEFAULT'] + else: + return arch + +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths + +def find_vcvarsall(version): + """Find the vcvarsall.bat file + + At first it tries to find the productdir of VS 2008 in the registry. If + that fails it falls back to the VS90COMNTOOLS env var. + """ + vsbase = VS_BASE % version + try: + productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, + "productdir") + except KeyError: + log.debug("Unable to find productdir in registry") + productdir = None + + if not productdir or not os.path.isdir(productdir): + toolskey = "VS%0.f0COMNTOOLS" % version + toolsdir = os.environ.get(toolskey, None) + + if toolsdir and os.path.isdir(toolsdir): + productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") + productdir = os.path.abspath(productdir) + if not os.path.isdir(productdir): + log.debug("%s is not a valid directory" % productdir) + return None + else: + log.debug("Env var %s is not set or invalid" % toolskey) + if not productdir: + log.debug("No productdir found") + return None + vcvarsall = os.path.join(productdir, "vcvarsall.bat") + if os.path.isfile(vcvarsall): + return vcvarsall + log.debug("Unable to find vcvarsall.bat") + return None + +def query_vcvarsall(version, arch="x86"): + """Launch vcvarsall.bat and read the settings from its environment + """ + vcvarsall = find_vcvarsall(version) + interesting = set(("include", "lib", "libpath", "path")) + result = {} + + if vcvarsall is None: + raise IOError("Unable to find vcvarsall.bat") + popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if popen.wait() != 0: + raise IOError(popen.stderr.read()) + + for line in popen.stdout: + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=') + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = value + + if len(result) != len(interesting): + raise ValueError(str(list(result.keys()))) + + return result + +# More globals +VERSION = get_build_version() +if VERSION < 8.0: + raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) +ARCH = get_build_architecture() +# MACROS = MacroExpander(VERSION) +VC_ENV = query_vcvarsall(VERSION, ARCH) + +class MSVCCompiler(CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'msvc' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions + _mc_extensions) + res_extension = '.res' + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + def __init__(self, verbose=0, dry_run=0, force=0): + CCompiler.__init__ (self, verbose, dry_run, force) + self.__version = VERSION + self.__arch = ARCH + self.__root = r"Software\Microsoft\VisualStudio" + # self.__macros = MACROS + self.__path = [] + self.initialized = False + + def initialize(self): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): + # Assume that the SDK set up everything alright; don't try to be + # smarter + self.cc = "cl.exe" + self.linker = "link.exe" + self.lib = "lib.exe" + self.rc = "rc.exe" + self.mc = "mc.exe" + else: + self.__paths = VC_ENV['path'].split(os.pathsep) + os.environ['lib'] = VC_ENV['lib'] + os.environ['include'] = VC_ENV['include'] + + if len(self.__paths) == 0: + raise DistutilsPlatformError("Python was built with %s, " + "and extensions need to be built with the same " + "version of the compiler, but it isn't installed." + % self.__product) + + self.cc = self.find_exe("cl.exe") + self.linker = self.find_exe("link.exe") + self.lib = self.find_exe("lib.exe") + self.rc = self.find_exe("rc.exe") # resource compiler + self.mc = self.find_exe("mc.exe") # message compiler + #self.set_path_env_var('lib') + #self.set_path_env_var('include') + + # extend the MSVC path with the current path + try: + for p in os.environ['path'].split(';'): + self.__paths.append(p) + except KeyError: + pass + self.__paths = normalize_and_reduce_paths(self.__paths) + os.environ['path'] = ";".join(self.__paths) + + self.preprocess_options = None + if self.__arch == "x86": + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', + '/Z7', '/D_DEBUG'] + else: + # Win64 + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', + '/Z7', '/D_DEBUG'] + + self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' + ] + self.ldflags_static = [ '/nologo'] + + self.initialized = True + + # -- Worker methods ------------------------------------------------ + + def object_filenames(self, + source_filenames, + strip_dir=0, + output_dir=''): + # Copied from ccompiler.py, extended to return .res as 'object'-file + # for .rc input file + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + (base, ext) = os.path.splitext (src_name) + base = os.path.splitdrive(base)[1] # Chop off the drive + base = base[os.path.isabs(base):] # If abs, chop off leading / + if ext not in self.src_extensions: + # Better to raise an exception instead of silently continuing + # and later complain about sources and targets having + # different lengths + raise CompileError ("Don't know how to compile %s" % src_name) + if strip_dir: + base = os.path.basename (base) + if ext in self._rc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + elif ext in self._mc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + if not self.initialized: + self.initialize() + compile_info = self._setup_compile(output_dir, macros, include_dirs, + sources, depends, extra_postargs) + macros, objects, extra_postargs, pp_opts, build = compile_info + + compile_opts = extra_preargs or [] + compile_opts.append ('/c') + if debug: + compile_opts.extend(self.compile_options_debug) + else: + compile_opts.extend(self.compile_options) + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn([self.rc] + pp_opts + + [output_opt] + [input_opt]) + except DistutilsExecError as msg: + raise CompileError(msg) + continue + elif ext in self._mc_extensions: + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) + try: + # first compile .MC to .RC and .H file + self.spawn([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError as msg: + raise CompileError(msg) + continue + else: + # how to handle this file? + raise CompileError("Don't know how to compile %s to %s" + % (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + + return objects + + + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, + output_dir=output_dir) + + if self._need_link(objects, output_filename): + lib_args = objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + try: + self.spawn([self.lib] + lib_args) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + (libraries, library_dirs, runtime_library_dirs) = fixed_args + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + if target_desc == CCompiler.EXECUTABLE: + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + else: + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared + + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + os.path.dirname(objects[0]), + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + self.mkpath(os.path.dirname(output_filename)) + try: + self.spawn([self.linker] + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "/LIBPATH:" + dir + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC++") + + def library_option(self, lib): + return self.library_filename(lib) + + + def find_library_file(self, dirs, lib, debug=0): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] + for dir in dirs: + for name in try_names: + libfile = os.path.join(dir, self.library_filename (name)) + if os.path.exists(libfile): + return libfile + else: + # Oops, didn't find it in *any* of 'dirs' + return None + + # Helper methods for using the MSVC registry settings + + def find_exe(self, exe): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + for p in self.__paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + + # didn't find it; try existing path + for p in os.environ['Path'].split(';'): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn + + return exe From 57ce0a030801c3b95c04c514bad06f556d5a9933 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 3 Dec 2007 19:53:57 +0000 Subject: [PATCH 1917/8469] Reverting last commit. I had some staled data from an attempted svnmerge in my local sandbox --- msvc9compiler.py | 658 ----------------------------------------------- 1 file changed, 658 deletions(-) delete mode 100644 msvc9compiler.py diff --git a/msvc9compiler.py b/msvc9compiler.py deleted file mode 100644 index a6cff2c04e..0000000000 --- a/msvc9compiler.py +++ /dev/null @@ -1,658 +0,0 @@ -"""distutils.msvc9compiler - -Contains MSVCCompiler, an implementation of the abstract CCompiler class -for the Microsoft Visual Studio 2008. - -The module is compatible with VS 2005 and VS 2008. You can find legacy support -for older versions of VS in distutils.msvccompiler. -""" - -# Written by Perry Stoll -# hacked by Robin Becker and Thomas Heller to do a better job of -# finding DevStudio (through the registry) -# ported to VS2005 and VS 2008 by Christian Heimes - -__revision__ = "$Id$" - -import os -import subprocess -import sys -from distutils.errors import (DistutilsExecError, DistutilsPlatformError, - CompileError, LibError, LinkError) -from distutils.ccompiler import (CCompiler, gen_preprocess_options, - gen_lib_options) -from distutils import log - -import _winreg - -RegOpenKeyEx = _winreg.OpenKeyEx -RegEnumKey = _winreg.EnumKey -RegEnumValue = _winreg.EnumValue -RegError = _winreg.error - -HKEYS = (_winreg.HKEY_USERS, - _winreg.HKEY_CURRENT_USER, - _winreg.HKEY_LOCAL_MACHINE, - _winreg.HKEY_CLASSES_ROOT) - -VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" -WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" -NET_BASE = r"Software\Microsoft\.NETFramework" -ARCHS = {'DEFAULT' : 'x86', - 'intel' : 'x86', 'x86' : 'x86', - 'amd64' : 'x64', 'x64' : 'x64', - 'itanium' : 'ia64', 'ia64' : 'ia64', - } - -# The globals VERSION, ARCH, MACROS and VC_ENV are defined later - -class Reg: - """Helper class to read values from the registry - """ - - @classmethod - def get_value(cls, path, key): - for base in HKEYS: - d = cls.read_values(base, path) - if d and key in d: - return d[key] - raise KeyError(key) - - @classmethod - def read_keys(cls, base, key): - """Return list of registry keys.""" - try: - handle = RegOpenKeyEx(base, key) - except RegError: - return None - L = [] - i = 0 - while True: - try: - k = RegEnumKey(handle, i) - except RegError: - break - L.append(k) - i += 1 - return L - - @classmethod - def read_values(cls, base, key): - """Return dict of registry keys and values. - - All names are converted to lowercase. - """ - try: - handle = RegOpenKeyEx(base, key) - except RegError: - return None - d = {} - i = 0 - while True: - try: - name, value, type = RegEnumValue(handle, i) - except RegError: - break - name = name.lower() - d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) - i += 1 - return d - - @staticmethod - def convert_mbcs(s): - dec = getattr(s, "decode", None) - if dec is not None: - try: - s = dec("mbcs") - except UnicodeError: - pass - return s - -class MacroExpander: - - def __init__(self, version): - self.macros = {} - self.vsbase = VS_BASE % version - self.load_macros(version) - - def set_macro(self, macro, path, key): - self.macros["$(%s)" % macro] = Reg.get_value(path, key) - - def load_macros(self, version): - self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir") - self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir") - self.set_macro("FrameworkDir", NET_BASE, "installroot") - try: - if version >= 8.0: - self.set_macro("FrameworkSDKDir", NET_BASE, - "sdkinstallrootv2.0") - else: - raise KeyError("sdkinstallrootv2.0") - except KeyError as exc: # - raise DistutilsPlatformError( - """Python was built with Visual Studio 2008; -extensions must be built with a compiler than can generate compatible binaries. -Visual Studio 2008 was not found on this system. If you have Cygwin installed, -you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") - - if version >= 9.0: - self.set_macro("FrameworkVersion", self.vsbase, "clr version") - self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder") - else: - p = r"Software\Microsoft\NET Framework Setup\Product" - for base in HKEYS: - try: - h = RegOpenKeyEx(base, p) - except RegError: - continue - key = RegEnumKey(h, 0) - d = Reg.get_value(base, r"%s\%s" % (p, key)) - self.macros["$(FrameworkVersion)"] = d["version"] - - def sub(self, s): - for k, v in self.macros.items(): - s = s.replace(k, v) - return s - -def get_build_version(): - """Return the version of MSVC that was used to build Python. - - For Python 2.3 and up, the version number is included in - sys.version. For earlier versions, assume the compiler is MSVC 6. - """ - prefix = "MSC v." - i = sys.version.find(prefix) - if i == -1: - return 6 - i = i + len(prefix) - s, rest = sys.version[i:].split(" ", 1) - majorVersion = int(s[:-2]) - 6 - minorVersion = int(s[2:3]) / 10.0 - # I don't think paths are affected by minor version in version 6 - if majorVersion == 6: - minorVersion = 0 - if majorVersion >= 6: - return majorVersion + minorVersion - # else we don't know what version of the compiler this is - return None - -def get_build_architecture(): - """Return the processor architecture. - - Possible results are "x86" or "amd64". - """ - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return "x86" - j = sys.version.find(")", i) - sysarch = sys.version[i+len(prefix):j].lower() - arch = ARCHS.get(sysarch, None) - if arch is None: - return ARCHS['DEFAULT'] - else: - return arch - -def normalize_and_reduce_paths(paths): - """Return a list of normalized paths with duplicates removed. - - The current order of paths is maintained. - """ - # Paths are normalized so things like: /a and /a/ aren't both preserved. - reduced_paths = [] - for p in paths: - np = os.path.normpath(p) - # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. - if np not in reduced_paths: - reduced_paths.append(np) - return reduced_paths - -def find_vcvarsall(version): - """Find the vcvarsall.bat file - - At first it tries to find the productdir of VS 2008 in the registry. If - that fails it falls back to the VS90COMNTOOLS env var. - """ - vsbase = VS_BASE % version - try: - productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, - "productdir") - except KeyError: - log.debug("Unable to find productdir in registry") - productdir = None - - if not productdir or not os.path.isdir(productdir): - toolskey = "VS%0.f0COMNTOOLS" % version - toolsdir = os.environ.get(toolskey, None) - - if toolsdir and os.path.isdir(toolsdir): - productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") - productdir = os.path.abspath(productdir) - if not os.path.isdir(productdir): - log.debug("%s is not a valid directory" % productdir) - return None - else: - log.debug("Env var %s is not set or invalid" % toolskey) - if not productdir: - log.debug("No productdir found") - return None - vcvarsall = os.path.join(productdir, "vcvarsall.bat") - if os.path.isfile(vcvarsall): - return vcvarsall - log.debug("Unable to find vcvarsall.bat") - return None - -def query_vcvarsall(version, arch="x86"): - """Launch vcvarsall.bat and read the settings from its environment - """ - vcvarsall = find_vcvarsall(version) - interesting = set(("include", "lib", "libpath", "path")) - result = {} - - if vcvarsall is None: - raise IOError("Unable to find vcvarsall.bat") - popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - if popen.wait() != 0: - raise IOError(popen.stderr.read()) - - for line in popen.stdout: - line = Reg.convert_mbcs(line) - if '=' not in line: - continue - line = line.strip() - key, value = line.split('=') - key = key.lower() - if key in interesting: - if value.endswith(os.pathsep): - value = value[:-1] - result[key] = value - - if len(result) != len(interesting): - raise ValueError(str(list(result.keys()))) - - return result - -# More globals -VERSION = get_build_version() -if VERSION < 8.0: - raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) -ARCH = get_build_architecture() -# MACROS = MacroExpander(VERSION) -VC_ENV = query_vcvarsall(VERSION, ARCH) - -class MSVCCompiler(CCompiler) : - """Concrete class that implements an interface to Microsoft Visual C++, - as defined by the CCompiler abstract class.""" - - compiler_type = 'msvc' - - # Just set this so CCompiler's constructor doesn't barf. We currently - # don't use the 'set_executables()' bureaucracy provided by CCompiler, - # as it really isn't necessary for this sort of single-compiler class. - # Would be nice to have a consistent interface with UnixCCompiler, - # though, so it's worth thinking about. - executables = {} - - # Private class data (need to distinguish C from C++ source for compiler) - _c_extensions = ['.c'] - _cpp_extensions = ['.cc', '.cpp', '.cxx'] - _rc_extensions = ['.rc'] - _mc_extensions = ['.mc'] - - # Needed for the filename generation methods provided by the - # base class, CCompiler. - src_extensions = (_c_extensions + _cpp_extensions + - _rc_extensions + _mc_extensions) - res_extension = '.res' - obj_extension = '.obj' - static_lib_extension = '.lib' - shared_lib_extension = '.dll' - static_lib_format = shared_lib_format = '%s%s' - exe_extension = '.exe' - - def __init__(self, verbose=0, dry_run=0, force=0): - CCompiler.__init__ (self, verbose, dry_run, force) - self.__version = VERSION - self.__arch = ARCH - self.__root = r"Software\Microsoft\VisualStudio" - # self.__macros = MACROS - self.__path = [] - self.initialized = False - - def initialize(self): - if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): - # Assume that the SDK set up everything alright; don't try to be - # smarter - self.cc = "cl.exe" - self.linker = "link.exe" - self.lib = "lib.exe" - self.rc = "rc.exe" - self.mc = "mc.exe" - else: - self.__paths = VC_ENV['path'].split(os.pathsep) - os.environ['lib'] = VC_ENV['lib'] - os.environ['include'] = VC_ENV['include'] - - if len(self.__paths) == 0: - raise DistutilsPlatformError("Python was built with %s, " - "and extensions need to be built with the same " - "version of the compiler, but it isn't installed." - % self.__product) - - self.cc = self.find_exe("cl.exe") - self.linker = self.find_exe("link.exe") - self.lib = self.find_exe("lib.exe") - self.rc = self.find_exe("rc.exe") # resource compiler - self.mc = self.find_exe("mc.exe") # message compiler - #self.set_path_env_var('lib') - #self.set_path_env_var('include') - - # extend the MSVC path with the current path - try: - for p in os.environ['path'].split(';'): - self.__paths.append(p) - except KeyError: - pass - self.__paths = normalize_and_reduce_paths(self.__paths) - os.environ['path'] = ";".join(self.__paths) - - self.preprocess_options = None - if self.__arch == "x86": - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', - '/DNDEBUG'] - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', - '/Z7', '/D_DEBUG'] - else: - # Win64 - self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , - '/DNDEBUG'] - self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', - '/Z7', '/D_DEBUG'] - - self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] - if self.__version >= 7: - self.ldflags_shared_debug = [ - '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' - ] - self.ldflags_static = [ '/nologo'] - - self.initialized = True - - # -- Worker methods ------------------------------------------------ - - def object_filenames(self, - source_filenames, - strip_dir=0, - output_dir=''): - # Copied from ccompiler.py, extended to return .res as 'object'-file - # for .rc input file - if output_dir is None: output_dir = '' - obj_names = [] - for src_name in source_filenames: - (base, ext) = os.path.splitext (src_name) - base = os.path.splitdrive(base)[1] # Chop off the drive - base = base[os.path.isabs(base):] # If abs, chop off leading / - if ext not in self.src_extensions: - # Better to raise an exception instead of silently continuing - # and later complain about sources and targets having - # different lengths - raise CompileError ("Don't know how to compile %s" % src_name) - if strip_dir: - base = os.path.basename (base) - if ext in self._rc_extensions: - obj_names.append (os.path.join (output_dir, - base + self.res_extension)) - elif ext in self._mc_extensions: - obj_names.append (os.path.join (output_dir, - base + self.res_extension)) - else: - obj_names.append (os.path.join (output_dir, - base + self.obj_extension)) - return obj_names - - - def compile(self, sources, - output_dir=None, macros=None, include_dirs=None, debug=0, - extra_preargs=None, extra_postargs=None, depends=None): - - if not self.initialized: - self.initialize() - compile_info = self._setup_compile(output_dir, macros, include_dirs, - sources, depends, extra_postargs) - macros, objects, extra_postargs, pp_opts, build = compile_info - - compile_opts = extra_preargs or [] - compile_opts.append ('/c') - if debug: - compile_opts.extend(self.compile_options_debug) - else: - compile_opts.extend(self.compile_options) - - for obj in objects: - try: - src, ext = build[obj] - except KeyError: - continue - if debug: - # pass the full pathname to MSVC in debug mode, - # this allows the debugger to find the source file - # without asking the user to browse for it - src = os.path.abspath(src) - - if ext in self._c_extensions: - input_opt = "/Tc" + src - elif ext in self._cpp_extensions: - input_opt = "/Tp" + src - elif ext in self._rc_extensions: - # compile .RC to .RES file - input_opt = src - output_opt = "/fo" + obj - try: - self.spawn([self.rc] + pp_opts + - [output_opt] + [input_opt]) - except DistutilsExecError as msg: - raise CompileError(msg) - continue - elif ext in self._mc_extensions: - # Compile .MC to .RC file to .RES file. - # * '-h dir' specifies the directory for the - # generated include file - # * '-r dir' specifies the target directory of the - # generated RC file and the binary message resource - # it includes - # - # For now (since there are no options to change this), - # we use the source-directory for the include file and - # the build directory for the RC file and message - # resources. This works at least for win32all. - h_dir = os.path.dirname(src) - rc_dir = os.path.dirname(obj) - try: - # first compile .MC to .RC and .H file - self.spawn([self.mc] + - ['-h', h_dir, '-r', rc_dir] + [src]) - base, _ = os.path.splitext (os.path.basename (src)) - rc_file = os.path.join (rc_dir, base + '.rc') - # then compile .RC to .RES file - self.spawn([self.rc] + - ["/fo" + obj] + [rc_file]) - - except DistutilsExecError as msg: - raise CompileError(msg) - continue - else: - # how to handle this file? - raise CompileError("Don't know how to compile %s to %s" - % (src, obj)) - - output_opt = "/Fo" + obj - try: - self.spawn([self.cc] + compile_opts + pp_opts + - [input_opt, output_opt] + - extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - - return objects - - - def create_static_lib(self, - objects, - output_libname, - output_dir=None, - debug=0, - target_lang=None): - - if not self.initialized: - self.initialize() - (objects, output_dir) = self._fix_object_args(objects, output_dir) - output_filename = self.library_filename(output_libname, - output_dir=output_dir) - - if self._need_link(objects, output_filename): - lib_args = objects + ['/OUT:' + output_filename] - if debug: - pass # XXX what goes here? - try: - self.spawn([self.lib] + lib_args) - except DistutilsExecError as msg: - raise LibError(msg) - else: - log.debug("skipping %s (up-to-date)", output_filename) - - - def link(self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - - if not self.initialized: - self.initialize() - (objects, output_dir) = self._fix_object_args(objects, output_dir) - fixed_args = self._fix_lib_args(libraries, library_dirs, - runtime_library_dirs) - (libraries, library_dirs, runtime_library_dirs) = fixed_args - - if runtime_library_dirs: - self.warn ("I don't know what to do with 'runtime_library_dirs': " - + str (runtime_library_dirs)) - - lib_opts = gen_lib_options(self, - library_dirs, runtime_library_dirs, - libraries) - if output_dir is not None: - output_filename = os.path.join(output_dir, output_filename) - - if self._need_link(objects, output_filename): - if target_desc == CCompiler.EXECUTABLE: - if debug: - ldflags = self.ldflags_shared_debug[1:] - else: - ldflags = self.ldflags_shared[1:] - else: - if debug: - ldflags = self.ldflags_shared_debug - else: - ldflags = self.ldflags_shared - - export_opts = [] - for sym in (export_symbols or []): - export_opts.append("/EXPORT:" + sym) - - ld_args = (ldflags + lib_opts + export_opts + - objects + ['/OUT:' + output_filename]) - - # The MSVC linker generates .lib and .exp files, which cannot be - # suppressed by any linker switches. The .lib files may even be - # needed! Make sure they are generated in the temporary build - # directory. Since they have different names for debug and release - # builds, they can go into the same directory. - if export_symbols is not None: - (dll_name, dll_ext) = os.path.splitext( - os.path.basename(output_filename)) - implib_file = os.path.join( - os.path.dirname(objects[0]), - self.library_filename(dll_name)) - ld_args.append ('/IMPLIB:' + implib_file) - - if extra_preargs: - ld_args[:0] = extra_preargs - if extra_postargs: - ld_args.extend(extra_postargs) - - self.mkpath(os.path.dirname(output_filename)) - try: - self.spawn([self.linker] + ld_args) - except DistutilsExecError as msg: - raise LinkError(msg) - - else: - log.debug("skipping %s (up-to-date)", output_filename) - - - # -- Miscellaneous methods ----------------------------------------- - # These are all used by the 'gen_lib_options() function, in - # ccompiler.py. - - def library_dir_option(self, dir): - return "/LIBPATH:" + dir - - def runtime_library_dir_option(self, dir): - raise DistutilsPlatformError( - "don't know how to set runtime library search path for MSVC++") - - def library_option(self, lib): - return self.library_filename(lib) - - - def find_library_file(self, dirs, lib, debug=0): - # Prefer a debugging library if found (and requested), but deal - # with it if we don't have one. - if debug: - try_names = [lib + "_d", lib] - else: - try_names = [lib] - for dir in dirs: - for name in try_names: - libfile = os.path.join(dir, self.library_filename (name)) - if os.path.exists(libfile): - return libfile - else: - # Oops, didn't find it in *any* of 'dirs' - return None - - # Helper methods for using the MSVC registry settings - - def find_exe(self, exe): - """Return path to an MSVC executable program. - - Tries to find the program in several places: first, one of the - MSVC program search paths from the registry; next, the directories - in the PATH environment variable. If any of those work, return an - absolute path that is known to exist. If none of them work, just - return the original program name, 'exe'. - """ - for p in self.__paths: - fn = os.path.join(os.path.abspath(p), exe) - if os.path.isfile(fn): - return fn - - # didn't find it; try existing path - for p in os.environ['Path'].split(';'): - fn = os.path.join(os.path.abspath(p),exe) - if os.path.isfile(fn): - return fn - - return exe From 04bca8195e91cd3520b869da61781cb5649d4164 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 3 Dec 2007 21:02:03 +0000 Subject: [PATCH 1918/8469] Merged revisions 59275-59303 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE: The merge does NOT contain the modified file Python/import.c from r59288. I can't get it running. Nick, please check in the PEP 366 manually. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ........ r59279 | georg.brandl | 2007-12-02 19:17:50 +0100 (Sun, 02 Dec 2007) | 2 lines Fix a sentence I missed before. Do not merge to 3k. ........ r59281 | georg.brandl | 2007-12-02 22:58:54 +0100 (Sun, 02 Dec 2007) | 3 lines Add documentation for PySys_* functions. Written by Charlie Shepherd for GHOP. Also fixes #1245. ........ r59288 | nick.coghlan | 2007-12-03 13:55:17 +0100 (Mon, 03 Dec 2007) | 1 line Implement PEP 366 ........ r59290 | christian.heimes | 2007-12-03 14:47:29 +0100 (Mon, 03 Dec 2007) | 3 lines Applied my patch #1455 with some extra fixes for VS 2005 The new msvc9compiler module supports VS 2005 and VS 2008. I've also fixed build_ext to support PCbuild8 and PCbuild9 and backported my fix for xxmodule.c from py3k. The old code msvccompiler is still in place in case somebody likes to build an extension with VS 2003 or earlier. I've also updated the cygwin compiler module for VS 2005 and VS 2008. It works with VS 2005 but I'm unable to test it with VS 2008. We have to wait for a new version of cygwin. ........ r59291 | christian.heimes | 2007-12-03 14:55:16 +0100 (Mon, 03 Dec 2007) | 1 line Added comment to Misc/NEWS for r59290 ........ r59292 | christian.heimes | 2007-12-03 15:28:04 +0100 (Mon, 03 Dec 2007) | 1 line I followed MA Lemberg's suggestion and added comments to the late initialization of the type slots. ........ r59293 | facundo.batista | 2007-12-03 17:29:52 +0100 (Mon, 03 Dec 2007) | 3 lines Speedup and cleaning of __str__. Thanks Mark Dickinson. ........ r59294 | facundo.batista | 2007-12-03 18:55:00 +0100 (Mon, 03 Dec 2007) | 4 lines Faster _fix function, and some reordering for a more elegant coding. Thanks Mark Dickinson. ........ r59295 | martin.v.loewis | 2007-12-03 20:20:02 +0100 (Mon, 03 Dec 2007) | 5 lines Issue #1727780: Support loading pickles of random.Random objects created on 32-bit systems on 64-bit systems, and vice versa. As a consequence of the change, Random pickles created by Python 2.6 cannot be loaded in Python 2.5. ........ r59297 | facundo.batista | 2007-12-03 20:49:54 +0100 (Mon, 03 Dec 2007) | 3 lines Two small fixes. Issue 1547. ........ r59299 | georg.brandl | 2007-12-03 20:57:02 +0100 (Mon, 03 Dec 2007) | 2 lines #1548: fix apostroph placement. ........ r59300 | christian.heimes | 2007-12-03 21:01:02 +0100 (Mon, 03 Dec 2007) | 3 lines Patch #1537 from Chad Austin Change GeneratorExit's base class from Exception to BaseException (This time I'm applying the patch to the correct sandbox.) ........ r59302 | georg.brandl | 2007-12-03 21:03:46 +0100 (Mon, 03 Dec 2007) | 3 lines Add examples to the xmlrpclib docs. Written for GHOP by Josip Dzolonga. ........ --- command/build_ext.py | 14 +- cygwinccompiler.py | 48 ++-- msvc9compiler.py | 658 +++++++++++++++++++++++++++++++++++++++++++ msvccompiler.py | 8 + 4 files changed, 706 insertions(+), 22 deletions(-) create mode 100644 msvc9compiler.py diff --git a/command/build_ext.py b/command/build_ext.py index ddf8f723f8..6d42278e40 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -14,6 +14,10 @@ from distutils.extension import Extension from distutils import log +if os.name == 'nt': + from distutils.msvccompiler import get_build_version + MSVC_VERSION = int(get_build_version()) + # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). extension_name_re = re.compile \ @@ -172,7 +176,15 @@ def finalize_options(self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild')) + if MSVC_VERSION == 9: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild9')) + elif MSVC_VERSION == 8: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild8', 'win32release')) + else: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PCBuild')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory diff --git a/cygwinccompiler.py b/cygwinccompiler.py index bec72ca3f1..488752300b 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -54,6 +54,29 @@ from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +def get_msvcr(): + """Include the appropriate MSVC runtime library if Python was built + with MSVC 7.0 or later. + """ + msc_pos = sys.version.find('MSC v.') + if msc_pos != -1: + msc_ver = sys.version[msc_pos+6:msc_pos+10] + if msc_ver == '1300': + # MSVC 7.0 + return ['msvcr70'] + elif msc_ver == '1310': + # MSVC 7.1 + return ['msvcr71'] + elif msc_ver == '1400': + # VS2005 / MSVC 8.0 + return ['msvcr80'] + elif msc_ver == '1500': + # VS2008 / MSVC 9.0 + return ['msvcr90'] + else: + raise ValueError("Unknown MS Compiler version %i " % msc_Ver) + + class CygwinCCompiler (UnixCCompiler): compiler_type = 'cygwin' @@ -119,18 +142,9 @@ def __init__ (self, verbose=0, dry_run=0, force=0): self.warn( "Consider upgrading to a newer version of gcc") else: - self.dll_libraries=[] # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # with MSVC 7.0 or later. + self.dll_libraries = get_msvcr() # __init__ () @@ -317,16 +331,8 @@ def __init__ (self, self.dll_libraries=[] # Include the appropriate MSVC runtime library if Python was built - # with MSVC 7.0 or 7.1. - msc_pos = sys.version.find('MSC v.') - if msc_pos != -1: - msc_ver = sys.version[msc_pos+6:msc_pos+10] - if msc_ver == '1300': - # MSVC 7.0 - self.dll_libraries = ['msvcr70'] - elif msc_ver == '1310': - # MSVC 7.1 - self.dll_libraries = ['msvcr71'] + # with MSVC 7.0 or later. + self.dll_libraries = get_msvcr() # __init__ () diff --git a/msvc9compiler.py b/msvc9compiler.py new file mode 100644 index 0000000000..a6cff2c04e --- /dev/null +++ b/msvc9compiler.py @@ -0,0 +1,658 @@ +"""distutils.msvc9compiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for the Microsoft Visual Studio 2008. + +The module is compatible with VS 2005 and VS 2008. You can find legacy support +for older versions of VS in distutils.msvccompiler. +""" + +# Written by Perry Stoll +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) +# ported to VS2005 and VS 2008 by Christian Heimes + +__revision__ = "$Id$" + +import os +import subprocess +import sys +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import (CCompiler, gen_preprocess_options, + gen_lib_options) +from distutils import log + +import _winreg + +RegOpenKeyEx = _winreg.OpenKeyEx +RegEnumKey = _winreg.EnumKey +RegEnumValue = _winreg.EnumValue +RegError = _winreg.error + +HKEYS = (_winreg.HKEY_USERS, + _winreg.HKEY_CURRENT_USER, + _winreg.HKEY_LOCAL_MACHINE, + _winreg.HKEY_CLASSES_ROOT) + +VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" +WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" +NET_BASE = r"Software\Microsoft\.NETFramework" +ARCHS = {'DEFAULT' : 'x86', + 'intel' : 'x86', 'x86' : 'x86', + 'amd64' : 'x64', 'x64' : 'x64', + 'itanium' : 'ia64', 'ia64' : 'ia64', + } + +# The globals VERSION, ARCH, MACROS and VC_ENV are defined later + +class Reg: + """Helper class to read values from the registry + """ + + @classmethod + def get_value(cls, path, key): + for base in HKEYS: + d = cls.read_values(base, path) + if d and key in d: + return d[key] + raise KeyError(key) + + @classmethod + def read_keys(cls, base, key): + """Return list of registry keys.""" + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + L = [] + i = 0 + while True: + try: + k = RegEnumKey(handle, i) + except RegError: + break + L.append(k) + i += 1 + return L + + @classmethod + def read_values(cls, base, key): + """Return dict of registry keys and values. + + All names are converted to lowercase. + """ + try: + handle = RegOpenKeyEx(base, key) + except RegError: + return None + d = {} + i = 0 + while True: + try: + name, value, type = RegEnumValue(handle, i) + except RegError: + break + name = name.lower() + d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) + i += 1 + return d + + @staticmethod + def convert_mbcs(s): + dec = getattr(s, "decode", None) + if dec is not None: + try: + s = dec("mbcs") + except UnicodeError: + pass + return s + +class MacroExpander: + + def __init__(self, version): + self.macros = {} + self.vsbase = VS_BASE % version + self.load_macros(version) + + def set_macro(self, macro, path, key): + self.macros["$(%s)" % macro] = Reg.get_value(path, key) + + def load_macros(self, version): + self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir") + self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir") + self.set_macro("FrameworkDir", NET_BASE, "installroot") + try: + if version >= 8.0: + self.set_macro("FrameworkSDKDir", NET_BASE, + "sdkinstallrootv2.0") + else: + raise KeyError("sdkinstallrootv2.0") + except KeyError as exc: # + raise DistutilsPlatformError( + """Python was built with Visual Studio 2008; +extensions must be built with a compiler than can generate compatible binaries. +Visual Studio 2008 was not found on this system. If you have Cygwin installed, +you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") + + if version >= 9.0: + self.set_macro("FrameworkVersion", self.vsbase, "clr version") + self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder") + else: + p = r"Software\Microsoft\NET Framework Setup\Product" + for base in HKEYS: + try: + h = RegOpenKeyEx(base, p) + except RegError: + continue + key = RegEnumKey(h, 0) + d = Reg.get_value(base, r"%s\%s" % (p, key)) + self.macros["$(FrameworkVersion)"] = d["version"] + + def sub(self, s): + for k, v in self.macros.items(): + s = s.replace(k, v) + return s + +def get_build_version(): + """Return the version of MSVC that was used to build Python. + + For Python 2.3 and up, the version number is included in + sys.version. For earlier versions, assume the compiler is MSVC 6. + """ + prefix = "MSC v." + i = sys.version.find(prefix) + if i == -1: + return 6 + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: + minorVersion = 0 + if majorVersion >= 6: + return majorVersion + minorVersion + # else we don't know what version of the compiler this is + return None + +def get_build_architecture(): + """Return the processor architecture. + + Possible results are "x86" or "amd64". + """ + prefix = " bit (" + i = sys.version.find(prefix) + if i == -1: + return "x86" + j = sys.version.find(")", i) + sysarch = sys.version[i+len(prefix):j].lower() + arch = ARCHS.get(sysarch, None) + if arch is None: + return ARCHS['DEFAULT'] + else: + return arch + +def normalize_and_reduce_paths(paths): + """Return a list of normalized paths with duplicates removed. + + The current order of paths is maintained. + """ + # Paths are normalized so things like: /a and /a/ aren't both preserved. + reduced_paths = [] + for p in paths: + np = os.path.normpath(p) + # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set. + if np not in reduced_paths: + reduced_paths.append(np) + return reduced_paths + +def find_vcvarsall(version): + """Find the vcvarsall.bat file + + At first it tries to find the productdir of VS 2008 in the registry. If + that fails it falls back to the VS90COMNTOOLS env var. + """ + vsbase = VS_BASE % version + try: + productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, + "productdir") + except KeyError: + log.debug("Unable to find productdir in registry") + productdir = None + + if not productdir or not os.path.isdir(productdir): + toolskey = "VS%0.f0COMNTOOLS" % version + toolsdir = os.environ.get(toolskey, None) + + if toolsdir and os.path.isdir(toolsdir): + productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") + productdir = os.path.abspath(productdir) + if not os.path.isdir(productdir): + log.debug("%s is not a valid directory" % productdir) + return None + else: + log.debug("Env var %s is not set or invalid" % toolskey) + if not productdir: + log.debug("No productdir found") + return None + vcvarsall = os.path.join(productdir, "vcvarsall.bat") + if os.path.isfile(vcvarsall): + return vcvarsall + log.debug("Unable to find vcvarsall.bat") + return None + +def query_vcvarsall(version, arch="x86"): + """Launch vcvarsall.bat and read the settings from its environment + """ + vcvarsall = find_vcvarsall(version) + interesting = set(("include", "lib", "libpath", "path")) + result = {} + + if vcvarsall is None: + raise IOError("Unable to find vcvarsall.bat") + popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if popen.wait() != 0: + raise IOError(popen.stderr.read()) + + for line in popen.stdout: + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=') + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = value + + if len(result) != len(interesting): + raise ValueError(str(list(result.keys()))) + + return result + +# More globals +VERSION = get_build_version() +if VERSION < 8.0: + raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) +ARCH = get_build_architecture() +# MACROS = MacroExpander(VERSION) +VC_ENV = query_vcvarsall(VERSION, ARCH) + +class MSVCCompiler(CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'msvc' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions + _mc_extensions) + res_extension = '.res' + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + def __init__(self, verbose=0, dry_run=0, force=0): + CCompiler.__init__ (self, verbose, dry_run, force) + self.__version = VERSION + self.__arch = ARCH + self.__root = r"Software\Microsoft\VisualStudio" + # self.__macros = MACROS + self.__path = [] + self.initialized = False + + def initialize(self): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): + # Assume that the SDK set up everything alright; don't try to be + # smarter + self.cc = "cl.exe" + self.linker = "link.exe" + self.lib = "lib.exe" + self.rc = "rc.exe" + self.mc = "mc.exe" + else: + self.__paths = VC_ENV['path'].split(os.pathsep) + os.environ['lib'] = VC_ENV['lib'] + os.environ['include'] = VC_ENV['include'] + + if len(self.__paths) == 0: + raise DistutilsPlatformError("Python was built with %s, " + "and extensions need to be built with the same " + "version of the compiler, but it isn't installed." + % self.__product) + + self.cc = self.find_exe("cl.exe") + self.linker = self.find_exe("link.exe") + self.lib = self.find_exe("lib.exe") + self.rc = self.find_exe("rc.exe") # resource compiler + self.mc = self.find_exe("mc.exe") # message compiler + #self.set_path_env_var('lib') + #self.set_path_env_var('include') + + # extend the MSVC path with the current path + try: + for p in os.environ['path'].split(';'): + self.__paths.append(p) + except KeyError: + pass + self.__paths = normalize_and_reduce_paths(self.__paths) + os.environ['path'] = ";".join(self.__paths) + + self.preprocess_options = None + if self.__arch == "x86": + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', + '/Z7', '/D_DEBUG'] + else: + # Win64 + self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' , + '/DNDEBUG'] + self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-', + '/Z7', '/D_DEBUG'] + + self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] + if self.__version >= 7: + self.ldflags_shared_debug = [ + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' + ] + self.ldflags_static = [ '/nologo'] + + self.initialized = True + + # -- Worker methods ------------------------------------------------ + + def object_filenames(self, + source_filenames, + strip_dir=0, + output_dir=''): + # Copied from ccompiler.py, extended to return .res as 'object'-file + # for .rc input file + if output_dir is None: output_dir = '' + obj_names = [] + for src_name in source_filenames: + (base, ext) = os.path.splitext (src_name) + base = os.path.splitdrive(base)[1] # Chop off the drive + base = base[os.path.isabs(base):] # If abs, chop off leading / + if ext not in self.src_extensions: + # Better to raise an exception instead of silently continuing + # and later complain about sources and targets having + # different lengths + raise CompileError ("Don't know how to compile %s" % src_name) + if strip_dir: + base = os.path.basename (base) + if ext in self._rc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + elif ext in self._mc_extensions: + obj_names.append (os.path.join (output_dir, + base + self.res_extension)) + else: + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) + return obj_names + + + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + if not self.initialized: + self.initialize() + compile_info = self._setup_compile(output_dir, macros, include_dirs, + sources, depends, extra_postargs) + macros, objects, extra_postargs, pp_opts, build = compile_info + + compile_opts = extra_preargs or [] + compile_opts.append ('/c') + if debug: + compile_opts.extend(self.compile_options_debug) + else: + compile_opts.extend(self.compile_options) + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn([self.rc] + pp_opts + + [output_opt] + [input_opt]) + except DistutilsExecError as msg: + raise CompileError(msg) + continue + elif ext in self._mc_extensions: + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) + try: + # first compile .MC to .RC and .H file + self.spawn([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError as msg: + raise CompileError(msg) + continue + else: + # how to handle this file? + raise CompileError("Don't know how to compile %s to %s" + % (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + + return objects + + + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, + output_dir=output_dir) + + if self._need_link(objects, output_filename): + lib_args = objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + try: + self.spawn([self.lib] + lib_args) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + + if not self.initialized: + self.initialize() + (objects, output_dir) = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + (libraries, library_dirs, runtime_library_dirs) = fixed_args + + if runtime_library_dirs: + self.warn ("I don't know what to do with 'runtime_library_dirs': " + + str (runtime_library_dirs)) + + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + if target_desc == CCompiler.EXECUTABLE: + if debug: + ldflags = self.ldflags_shared_debug[1:] + else: + ldflags = self.ldflags_shared[1:] + else: + if debug: + ldflags = self.ldflags_shared_debug + else: + ldflags = self.ldflags_shared + + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + os.path.dirname(objects[0]), + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + self.mkpath(os.path.dirname(output_filename)) + try: + self.spawn([self.linker] + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "/LIBPATH:" + dir + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC++") + + def library_option(self, lib): + return self.library_filename(lib) + + + def find_library_file(self, dirs, lib, debug=0): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] + for dir in dirs: + for name in try_names: + libfile = os.path.join(dir, self.library_filename (name)) + if os.path.exists(libfile): + return libfile + else: + # Oops, didn't find it in *any* of 'dirs' + return None + + # Helper methods for using the MSVC registry settings + + def find_exe(self, exe): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + for p in self.__paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + + # didn't find it; try existing path + for p in os.environ['Path'].split(';'): + fn = os.path.join(os.path.abspath(p),exe) + if os.path.isfile(fn): + return fn + + return exe diff --git a/msvccompiler.py b/msvccompiler.py index 6bf969f9d2..3b4e9c9d2d 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -632,3 +632,11 @@ def set_path_env_var(self, name): p = self.get_msvc_paths(name) if p: os.environ[name] = ';'.join(p) + + +if get_build_version() >= 8.0: + log.debug("Importing new compiler from distutils.msvc9compiler") + OldMSVCCompiler = MSVCCompiler + from distutils.msvc9compiler import MSVCCompiler + from distutils.msvc9compiler import get_build_architecture + from distutils.msvc9compiler import MacroExpander From c03780a3a80420dab6fb7ffa8471e135a7dec9a2 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 5 Dec 2007 20:10:38 +0000 Subject: [PATCH 1919/8469] Fixed bug #1557 by using popen.communicate() before popen.wait() --- msvc9compiler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index a6cff2c04e..828d7fbf7a 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -254,10 +254,13 @@ def query_vcvarsall(version, arch="x86"): popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + stdout, stderr = popen.communicate() if popen.wait() != 0: - raise IOError(popen.stderr.read()) + raise IOError(stderr.decode("mbcs")) - for line in popen.stdout: + stdout = stdout.decode("mbcs") + for line in stdout.split("\n"): line = Reg.convert_mbcs(line) if '=' not in line: continue From 7ea9ff425c9efeff99694a5e4f8d1123f76133d1 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 5 Dec 2007 20:18:38 +0000 Subject: [PATCH 1920/8469] Merged revisions 59333-59370 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59343 | georg.brandl | 2007-12-05 08:02:47 +0100 (Wed, 05 Dec 2007) | 2 lines Fix typo. ........ r59347 | christian.heimes | 2007-12-05 13:31:44 +0100 (Wed, 05 Dec 2007) | 1 line Fixed quoting and paths in the sqlite project file ........ r59348 | christian.heimes | 2007-12-05 13:45:11 +0100 (Wed, 05 Dec 2007) | 1 line Fixed error in regrtest. I must have missed the spot. ........ r59350 | christian.heimes | 2007-12-05 13:49:14 +0100 (Wed, 05 Dec 2007) | 1 line merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ can make list() raise a SystemError ........ r59352 | christian.heimes | 2007-12-05 13:52:34 +0100 (Wed, 05 Dec 2007) | 1 line Added msg to Misc/NEWS ........ r59354 | andrew.kuchling | 2007-12-05 14:27:20 +0100 (Wed, 05 Dec 2007) | 1 line Spelling fix ........ r59356 | georg.brandl | 2007-12-05 18:56:50 +0100 (Wed, 05 Dec 2007) | 3 lines Add examples to csv, pprint and traceback docs. Written by Ross for GHOP. ........ r59358 | raymond.hettinger | 2007-12-05 19:11:08 +0100 (Wed, 05 Dec 2007) | 1 line Error checking was too aggressive (reported by Chris Tismer) ........ r59359 | georg.brandl | 2007-12-05 19:30:48 +0100 (Wed, 05 Dec 2007) | 2 lines Add examples to re docs. Written for GHOP by Dan Finnie. ........ r59366 | georg.brandl | 2007-12-05 20:49:21 +0100 (Wed, 05 Dec 2007) | 2 lines Fix markup. ........ r59367 | christian.heimes | 2007-12-05 20:57:54 +0100 (Wed, 05 Dec 2007) | 1 line Updated documentation and build_tkinter.py script ........ r59368 | georg.brandl | 2007-12-05 21:03:57 +0100 (Wed, 05 Dec 2007) | 2 lines Another markup fix. ........ r59369 | ronald.oussoren | 2007-12-05 21:07:36 +0100 (Wed, 05 Dec 2007) | 7 lines This "fixes" compilation issues for the Carbon._OSA module on OSX Leopard by purging bindings to OSA's debug API's. Those APIs we're completely unsupported on OSX 10.4 and are no longer available on OSX 10.5. Note that this patches a generated file. This is somewhat acceptable because regenerating the file is non-trivial and wouldn't use system headers anyway. ........ r59370 | christian.heimes | 2007-12-05 21:10:38 +0100 (Wed, 05 Dec 2007) | 1 line Fixed bug #1557 by using popen.communicate() before popen.wait() ........ --- msvc9compiler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index a6cff2c04e..828d7fbf7a 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -254,10 +254,13 @@ def query_vcvarsall(version, arch="x86"): popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + stdout, stderr = popen.communicate() if popen.wait() != 0: - raise IOError(popen.stderr.read()) + raise IOError(stderr.decode("mbcs")) - for line in popen.stdout: + stdout = stdout.decode("mbcs") + for line in stdout.split("\n"): line = Reg.convert_mbcs(line) if '=' not in line: continue From ae50fdd2c427c6dbdb7990bfae890534240d5169 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 6 Dec 2007 13:15:13 +0000 Subject: [PATCH 1921/8469] Fixed get_config_h_filename for Windows. Without the patch it can't find the pyconfig.h file inside a build tree. Added several small unit tests for sysconfig. --- sysconfig.py | 22 ++++++++++++++-------- tests/test_sysconfig.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 tests/test_sysconfig.py diff --git a/sysconfig.py b/sysconfig.py index 0cfafab99b..2ea7c78b83 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -22,16 +22,17 @@ PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +# Path to the base directory of the project. On Windows the binary may +# live in project/PCBuild9 +project_base = os.path.dirname(os.path.abspath(sys.executable)) +if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. - -argv0_path = os.path.dirname(os.path.abspath(sys.executable)) -landmark = os.path.join(argv0_path, "Modules", "Setup") - -python_build = os.path.isfile(landmark) - -del landmark +python_build = os.path.isfile(os.path.join(project_base, "Modules", + "Setup.dist")) def get_python_version(): @@ -185,7 +186,10 @@ def customize_compiler(compiler): def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: - inc_dir = argv0_path + if os.name == "nt": + inc_dir = os.path.join(project_base, "PC") + else: + inc_dir = project_base else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': @@ -428,6 +432,8 @@ def _init_nt(): g['SO'] = '.pyd' g['EXE'] = ".exe" + g['VERSION'] = get_python_version().replace(".", "") + g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) global _config_vars _config_vars = g diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py new file mode 100644 index 0000000000..8337b0d25f --- /dev/null +++ b/tests/test_sysconfig.py @@ -0,0 +1,36 @@ +"""Tests for distutils.dist.""" + +from distutils import sysconfig +import os +import sys +import unittest + +from test.test_support import TESTFN + +class SysconfigTestCase(unittest.TestCase): + + def test_get_config_h_filename(self): + config_h = sysconfig.get_config_h_filename() + self.assert_(os.path.isfile(config_h), config_h) + + def test_get_python_lib(self): + lib_dir = sysconfig.get_python_lib() + self.assert_(os.path.isdir(lib_dir), lib_dir) + # test for pythonxx.lib? + + def test_get_python_inc(self): + inc_dir = sysconfig.get_python_inc() + self.assert_(os.path.isdir(inc_dir), inc_dir) + python_h = os.path.join(inc_dir, "Python.h") + self.assert_(os.path.isfile(python_h), python_h) + + def test_get_config_vars(self): + cvars = sysconfig.get_config_vars() + self.assert_(isinstance(cvars, dict)) + self.assert_(cvars) + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(SysconfigTestCase)) + return suite From d1f35e69fb4d6a4e274369771d5d9574e45ecc59 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 6 Dec 2007 13:55:01 +0000 Subject: [PATCH 1922/8469] Disabled one test that is failing on Unix --- tests/test_sysconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 8337b0d25f..ef7c38bf78 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -15,7 +15,8 @@ def test_get_config_h_filename(self): def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() - self.assert_(os.path.isdir(lib_dir), lib_dir) + # XXX doesn't work on Inux when Python was never installed before + #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? def test_get_python_inc(self): From 115bfed7f4bf7f00580c68cdc64e49e36434e7bb Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 8 Dec 2007 15:33:56 +0000 Subject: [PATCH 1923/8469] Merged revisions 59376-59406 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59377 | georg.brandl | 2007-12-06 01:24:23 +0100 (Thu, 06 Dec 2007) | 2 lines Add another GHOP student to ACKS. ........ r59378 | raymond.hettinger | 2007-12-06 01:56:53 +0100 (Thu, 06 Dec 2007) | 5 lines Fix Issue 1045. Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup. ........ r59380 | georg.brandl | 2007-12-06 02:52:24 +0100 (Thu, 06 Dec 2007) | 2 lines Diverse markup fixes. ........ r59383 | georg.brandl | 2007-12-06 10:45:39 +0100 (Thu, 06 Dec 2007) | 2 lines Better re.split examples. ........ r59386 | christian.heimes | 2007-12-06 14:15:13 +0100 (Thu, 06 Dec 2007) | 2 lines Fixed get_config_h_filename for Windows. Without the patch it can't find the pyconfig.h file inside a build tree. Added several small unit tests for sysconfig. ........ r59387 | christian.heimes | 2007-12-06 14:30:11 +0100 (Thu, 06 Dec 2007) | 1 line Silence more warnings, _CRT_NONSTDC_NO_DEPRECATE is already defined in pyconfig.h but several projects don't include it. ........ r59389 | christian.heimes | 2007-12-06 14:55:01 +0100 (Thu, 06 Dec 2007) | 1 line Disabled one test that is failing on Unix ........ r59399 | christian.heimes | 2007-12-06 22:13:06 +0100 (Thu, 06 Dec 2007) | 8 lines Several Windows related cleanups: * Removed a #define from pyconfig.h. The macro was already defined a few lines higher. * Fixed path to tix in the build_tkinter.py script * Changed make_buildinfo.c to use versions of unlink and strcat which are considered safe by Windows (as suggested by MvL). * Removed two defines from pyproject.vsprops that are no longer required. Both are defined in pyconfig.h and make_buildinfo.c doesn't use the unsafe versions any more (as suggested by MvL). * Added some more information about PGO and the property files to PCbuild9/readme.txt. Are you fine with the changes, Martin? ........ r59400 | raymond.hettinger | 2007-12-07 02:53:01 +0100 (Fri, 07 Dec 2007) | 4 lines Don't have the docs berate themselves. Keep a professional tone. If a todo is needed, put it in the tracker. ........ r59402 | georg.brandl | 2007-12-07 10:07:10 +0100 (Fri, 07 Dec 2007) | 3 lines Increase unit test coverage of SimpleXMLRPCServer. Written for GHOP by Turkay Eren. ........ r59406 | georg.brandl | 2007-12-07 16:16:57 +0100 (Fri, 07 Dec 2007) | 2 lines Update to windows doc from Robert. ........ --- sysconfig.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 70a279938c..191f3d1d18 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -22,13 +22,17 @@ PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +# Path to the base directory of the project. On Windows the binary may +# live in project/PCBuild9 +project_base = os.path.dirname(os.path.abspath(sys.executable)) +if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. - -argv0_path = os.path.dirname(os.path.abspath(sys.executable)) -python_build = os.path.isfile(os.path.join(argv0_path, "Modules", "Setup")) - +python_build = os.path.isfile(os.path.join(project_base, "Modules", + "Setup.dist")) def get_python_version(): """Return a string containing the major and minor Python version, @@ -177,7 +181,10 @@ def customize_compiler(compiler): def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: - inc_dir = argv0_path + if os.name == "nt": + inc_dir = os.path.join(project_base, "PC") + else: + inc_dir = project_base else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': @@ -402,6 +409,8 @@ def _init_nt(): g['SO'] = '.pyd' g['EXE'] = ".exe" + g['VERSION'] = get_python_version().replace(".", "") + g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) global _config_vars _config_vars = g From 329322869d65d079b3bdb40ecba5ecee0bb98d27 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 8 Dec 2007 15:34:59 +0000 Subject: [PATCH 1924/8469] Readded Lib/distutils/tests/test_sysconfig.py Somehow it went missing during the merge --- tests/test_sysconfig.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/test_sysconfig.py diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py new file mode 100644 index 0000000000..ef7c38bf78 --- /dev/null +++ b/tests/test_sysconfig.py @@ -0,0 +1,37 @@ +"""Tests for distutils.dist.""" + +from distutils import sysconfig +import os +import sys +import unittest + +from test.test_support import TESTFN + +class SysconfigTestCase(unittest.TestCase): + + def test_get_config_h_filename(self): + config_h = sysconfig.get_config_h_filename() + self.assert_(os.path.isfile(config_h), config_h) + + def test_get_python_lib(self): + lib_dir = sysconfig.get_python_lib() + # XXX doesn't work on Inux when Python was never installed before + #self.assert_(os.path.isdir(lib_dir), lib_dir) + # test for pythonxx.lib? + + def test_get_python_inc(self): + inc_dir = sysconfig.get_python_inc() + self.assert_(os.path.isdir(inc_dir), inc_dir) + python_h = os.path.join(inc_dir, "Python.h") + self.assert_(os.path.isfile(python_h), python_h) + + def test_get_config_vars(self): + cvars = sysconfig.get_config_vars() + self.assert_(isinstance(cvars, dict)) + self.assert_(cvars) + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(SysconfigTestCase)) + return suite From ed6b063cc4b7549d790cc4f83dcb1bf5fd4f93f6 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 13 Dec 2007 19:23:16 +0000 Subject: [PATCH 1925/8469] Fixed bug #1613: Makefile's VPATH feature is broken --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 2ea7c78b83..aead1a19ba 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -32,7 +32,7 @@ # building an extension with an un-installed Python, so we use # different (hard-wired) directories. python_build = os.path.isfile(os.path.join(project_base, "Modules", - "Setup.dist")) + "Setup.local")) def get_python_version(): From ebbd3f714cc3fb8da8fbc8d2f4daf42fffbef1b9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 14 Dec 2007 01:24:44 +0000 Subject: [PATCH 1926/8469] Merged revisions 59465-59487 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59467 | georg.brandl | 2007-12-11 17:32:49 +0100 (Tue, 11 Dec 2007) | 2 lines Add another GHOP contributor. ........ r59468 | kurt.kaiser | 2007-12-11 20:35:12 +0100 (Tue, 11 Dec 2007) | 3 lines IDLE_tabbedpages.071101.patch Tal Einat Cosmetic changes, one bug. Remove tabpage.py, replaced by tabbedpages.py ........ r59471 | gerhard.haering | 2007-12-11 22:07:40 +0100 (Tue, 11 Dec 2007) | 9 lines Forward-port of commit 59184. - Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a statement recompilation with no bound parameters lead to a segfault - Backported a fix necessary because of an SQLite API change in version 3.5. This prevents segfaults when executing empty queries, like our test suite does ........ r59475 | christian.heimes | 2007-12-12 19:09:06 +0100 (Wed, 12 Dec 2007) | 1 line Fixed a nasty problem in the xxmodule.c ........ r59478 | raymond.hettinger | 2007-12-13 01:08:37 +0100 (Thu, 13 Dec 2007) | 1 line Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate. ........ r59480 | alexandre.vassalotti | 2007-12-13 18:58:23 +0100 (Thu, 13 Dec 2007) | 2 lines Fix issue #1313119: urlparse "caches" parses regardless of encoding ........ r59482 | christian.heimes | 2007-12-13 20:23:16 +0100 (Thu, 13 Dec 2007) | 1 line Fixed bug #1613: Makefile's VPATH feature is broken ........ r59484 | guido.van.rossum | 2007-12-13 21:50:10 +0100 (Thu, 13 Dec 2007) | 3 lines Patch #1608. Someone with access to autoconf 2.61 or higher needs to run it and check in the resulting configure file. ........ r59485 | thomas.heller | 2007-12-13 22:20:29 +0100 (Thu, 13 Dec 2007) | 1 line Ran autoconf. ........ r59486 | raymond.hettinger | 2007-12-13 23:55:52 +0100 (Thu, 13 Dec 2007) | 1 line Simplify implementation of __replace__() ........ r59487 | raymond.hettinger | 2007-12-14 00:52:59 +0100 (Fri, 14 Dec 2007) | 1 line Small speedup ........ --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 191f3d1d18..c450cd5159 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -32,7 +32,7 @@ # building an extension with an un-installed Python, so we use # different (hard-wired) directories. python_build = os.path.isfile(os.path.join(project_base, "Modules", - "Setup.dist")) + "Setup.local")) def get_python_version(): """Return a string containing the major and minor Python version, From 4e9153cd047c24fc7c7c595885444a4a1e599b8b Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 14 Dec 2007 23:42:36 +0000 Subject: [PATCH 1927/8469] Fixed bug #1628 The detection now works on Unix with Makefile, Makefile with VPATH and on Windows. --- sysconfig.py | 6 ++++-- tests/test_sysconfig.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index aead1a19ba..32b165ffd1 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -31,8 +31,10 @@ # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. -python_build = os.path.isfile(os.path.join(project_base, "Modules", - "Setup.local")) +# Setup.local is available for Makefile builds including VPATH builds, +# Setup.dist is available on Windows +python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn)) + for fn in ("Setup.dist", "Setup.local")) def get_python_version(): diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index ef7c38bf78..770b7c376f 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -15,7 +15,7 @@ def test_get_config_h_filename(self): def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() - # XXX doesn't work on Inux when Python was never installed before + # XXX doesn't work on Linux when Python was never installed before #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? From 0f89abbb94e9b4c48d3a5356c564b31862602227 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 15 Dec 2007 01:27:15 +0000 Subject: [PATCH 1928/8469] Merged revisions 59488-59511 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59489 | christian.heimes | 2007-12-14 03:33:57 +0100 (Fri, 14 Dec 2007) | 1 line Silence a warning about an unsed variable in debug builds ........ r59490 | christian.heimes | 2007-12-14 03:35:23 +0100 (Fri, 14 Dec 2007) | 2 lines Fixed bug #1620: New @spam.getter property syntax modifies the property in place. I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property(). ........ r59491 | raymond.hettinger | 2007-12-14 03:49:47 +0100 (Fri, 14 Dec 2007) | 1 line Cleaner method naming convention ........ r59492 | christian.heimes | 2007-12-14 04:02:34 +0100 (Fri, 14 Dec 2007) | 1 line Fixed a warning in _codecs_iso2022.c and some non C89 conform // comments. ........ r59493 | christian.heimes | 2007-12-14 05:38:13 +0100 (Fri, 14 Dec 2007) | 1 line Fixed warning in ssl module ........ r59500 | raymond.hettinger | 2007-12-14 19:08:20 +0100 (Fri, 14 Dec 2007) | 1 line Add line spacing for readability ........ r59501 | raymond.hettinger | 2007-12-14 19:12:21 +0100 (Fri, 14 Dec 2007) | 3 lines Update method names for named tuples. ........ r59503 | georg.brandl | 2007-12-14 20:03:36 +0100 (Fri, 14 Dec 2007) | 3 lines Add a section about nested listcomps to the tutorial. Thanks to Ian Bruntlett and Robert Lehmann. ........ r59504 | raymond.hettinger | 2007-12-14 20:19:59 +0100 (Fri, 14 Dec 2007) | 1 line Faster and simpler _replace() method ........ r59505 | raymond.hettinger | 2007-12-14 22:51:50 +0100 (Fri, 14 Dec 2007) | 1 line Add usage note ........ r59507 | andrew.kuchling | 2007-12-14 23:41:18 +0100 (Fri, 14 Dec 2007) | 1 line Remove warning about URL ........ r59510 | andrew.kuchling | 2007-12-14 23:52:36 +0100 (Fri, 14 Dec 2007) | 1 line Bump the version number, and make a few small edits ........ r59511 | christian.heimes | 2007-12-15 00:42:36 +0100 (Sat, 15 Dec 2007) | 2 lines Fixed bug #1628 The detection now works on Unix with Makefile, Makefile with VPATH and on Windows. ........ --- sysconfig.py | 6 ++++-- tests/test_sysconfig.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index c450cd5159..ba89c3b864 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -31,8 +31,10 @@ # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. -python_build = os.path.isfile(os.path.join(project_base, "Modules", - "Setup.local")) +# Setup.local is available for Makefile builds including VPATH builds, +# Setup.dist is available on Windows +python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn)) + for fn in ("Setup.dist", "Setup.local")) def get_python_version(): """Return a string containing the major and minor Python version, diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index ef7c38bf78..770b7c376f 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -15,7 +15,7 @@ def test_get_config_h_filename(self): def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() - # XXX doesn't work on Inux when Python was never installed before + # XXX doesn't work on Linux when Python was never installed before #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? From c8533b41bab447f51d5e375f239163fcaafdd633 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 31 Dec 2007 14:47:07 +0000 Subject: [PATCH 1929/8469] Added wininst-9.0.exe executable for VS 2008 Integrated bdist_wininst into PCBuild9 directory --- command/bdist_wininst.py | 2 +- command/{wininst-6.exe => wininst-6.0.exe} | Bin command/{wininst-8.exe => wininst-8.0.exe} | Bin command/wininst-9.0.exe | Bin 0 -> 65536 bytes 4 files changed, 1 insertion(+), 1 deletion(-) rename command/{wininst-6.exe => wininst-6.0.exe} (100%) rename command/{wininst-8.exe => wininst-8.0.exe} (100%) create mode 100644 command/wininst-9.0.exe diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 49afca0472..b0691fb823 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -323,6 +323,6 @@ def get_exe_bytes (self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - filename = os.path.join(directory, "wininst-%s.exe" % bv) + filename = os.path.join(directory, "wininst-%.1f.exe" % bv) return open(filename, "rb").read() # class bdist_wininst diff --git a/command/wininst-6.exe b/command/wininst-6.0.exe similarity index 100% rename from command/wininst-6.exe rename to command/wininst-6.0.exe diff --git a/command/wininst-8.exe b/command/wininst-8.0.exe similarity index 100% rename from command/wininst-8.exe rename to command/wininst-8.0.exe diff --git a/command/wininst-9.0.exe b/command/wininst-9.0.exe new file mode 100644 index 0000000000000000000000000000000000000000..5e0144c92b58ea750211c540d15667e0b1d1a356 GIT binary patch literal 65536 zcmeFae_T{m{y%<)8F0kW854{WYf2~zHEOgK!FEt)#A0v|8KhK18N5sgEZmFQii-}k zTrbnQWxMWs-PY3HZ+F*E>u#o0rXVJ0w&9Ny(=BR!*U+#Gk|6Le((4F z{XRaQKfa^q+tOCZ_09ZeUd%f!+*@4?cu9ZN?ExZQ(kBJ zPp8zd>&BF2?D|u7T~M-u)gS7K)5dX`8Xc!q*31p1b#YqFD9uQYD@Dp?HFb`Ns|lf& zo~`PA7{`UvBYvSPXVoy`nT;9_*|iLi%28o<9lTH?cf!wc+v&!v;d-Lz=K8;mjT{$y z{VbNc=c8|pQ7y;q1_Iyrn<}{12*_OXC?dj(`bvX7>}Tea zVeBS--7#TQ?bUlk?NM&ARs6KoB@1ze`pd>TFL270OXH&Q~< zVCCfA{QUaMLP6fq2u_LKT8orU@7IcWr-#c^qPO6=zF8bs|98Qd$M6`jC6$)ed=GE8G1mJOW6FMAIHEOY_?gJpa80GTlTu9i71WpvI;c~e=VL3{)9%Gdw+4Rae z*``l9D&9zN)O}tDIE+fJ88omo7c70`m`ddt-WroWM_!_L-A=xg z5Su_?I;X#UHpk`XryLc=A#=2oUqsmG&=(+c88A+N%|bw+^kfylIvgNyqvdk4Xrgh9 zL0@wGElV(dM+|oK*nl1v$VXX!e7obU808H;Rt?8JyH1nFSzedw51> zWH)=|`ZKu6lV9t=#g{qa%qup!0ykS0tL zcN**Gg#qXR=R;bZv3?frjfZk>@itHO8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{QDSb4!G_nVE)g;1WW0!OW z+c^aYEt48a4kz~}LV9RKA5Jn`+Gk_VGd#FH1vXr0wfpa%j7~ Date: Mon, 31 Dec 2007 16:14:33 +0000 Subject: [PATCH 1930/8469] Merged revisions 59605-59624 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59606 | georg.brandl | 2007-12-29 11:57:00 +0100 (Sat, 29 Dec 2007) | 2 lines Some cleanup in the docs. ........ r59611 | martin.v.loewis | 2007-12-29 19:49:21 +0100 (Sat, 29 Dec 2007) | 2 lines Bug #1699: Define _BSD_SOURCE only on OpenBSD. ........ r59612 | raymond.hettinger | 2007-12-29 23:09:34 +0100 (Sat, 29 Dec 2007) | 1 line Simpler documentation for itertools.tee(). Should be backported. ........ r59613 | raymond.hettinger | 2007-12-29 23:16:24 +0100 (Sat, 29 Dec 2007) | 1 line Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object(). ........ r59620 | christian.heimes | 2007-12-31 15:47:07 +0100 (Mon, 31 Dec 2007) | 3 lines Added wininst-9.0.exe executable for VS 2008 Integrated bdist_wininst into PCBuild9 directory ........ r59621 | christian.heimes | 2007-12-31 15:51:18 +0100 (Mon, 31 Dec 2007) | 1 line Moved PCbuild directory to PC/VS7.1 ........ r59622 | christian.heimes | 2007-12-31 15:59:26 +0100 (Mon, 31 Dec 2007) | 1 line Fix paths for build bot ........ r59623 | christian.heimes | 2007-12-31 16:02:41 +0100 (Mon, 31 Dec 2007) | 1 line Fix paths for build bot, part 2 ........ r59624 | christian.heimes | 2007-12-31 16:18:55 +0100 (Mon, 31 Dec 2007) | 1 line Renamed PCBuild9 directory to PCBuild ........ --- command/bdist_wininst.py | 2 +- command/{wininst-6.exe => wininst-6.0.exe} | Bin command/{wininst-8.exe => wininst-8.0.exe} | Bin command/wininst-9.0.exe | Bin 0 -> 65536 bytes 4 files changed, 1 insertion(+), 1 deletion(-) rename command/{wininst-6.exe => wininst-6.0.exe} (100%) rename command/{wininst-8.exe => wininst-8.0.exe} (100%) create mode 100644 command/wininst-9.0.exe diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 249b74c1bb..2d75a38f74 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -304,5 +304,5 @@ def get_exe_bytes(self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - filename = os.path.join(directory, "wininst-%s.exe" % bv) + filename = os.path.join(directory, "wininst-%.1f.exe" % bv) return open(filename, "rb").read() diff --git a/command/wininst-6.exe b/command/wininst-6.0.exe similarity index 100% rename from command/wininst-6.exe rename to command/wininst-6.0.exe diff --git a/command/wininst-8.exe b/command/wininst-8.0.exe similarity index 100% rename from command/wininst-8.exe rename to command/wininst-8.0.exe diff --git a/command/wininst-9.0.exe b/command/wininst-9.0.exe new file mode 100644 index 0000000000000000000000000000000000000000..5e0144c92b58ea750211c540d15667e0b1d1a356 GIT binary patch literal 65536 zcmeFae_T{m{y%<)8F0kW854{WYf2~zHEOgK!FEt)#A0v|8KhK18N5sgEZmFQii-}k zTrbnQWxMWs-PY3HZ+F*E>u#o0rXVJ0w&9Ny(=BR!*U+#Gk|6Le((4F z{XRaQKfa^q+tOCZ_09ZeUd%f!+*@4?cu9ZN?ExZQ(kBJ zPp8zd>&BF2?D|u7T~M-u)gS7K)5dX`8Xc!q*31p1b#YqFD9uQYD@Dp?HFb`Ns|lf& zo~`PA7{`UvBYvSPXVoy`nT;9_*|iLi%28o<9lTH?cf!wc+v&!v;d-Lz=K8;mjT{$y z{VbNc=c8|pQ7y;q1_Iyrn<}{12*_OXC?dj(`bvX7>}Tea zVeBS--7#TQ?bUlk?NM&ARs6KoB@1ze`pd>TFL270OXH&Q~< zVCCfA{QUaMLP6fq2u_LKT8orU@7IcWr-#c^qPO6=zF8bs|98Qd$M6`jC6$)ed=GE8G1mJOW6FMAIHEOY_?gJpa80GTlTu9i71WpvI;c~e=VL3{)9%Gdw+4Rae z*``l9D&9zN)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2%B|)A4M^^c)Y;=OS2n^K z5FNxWgS41KX(w8z9G)SDG1*77dyLI_0;ktH+n^yH#&O{NTVfv#=-my`%X8qV(?dG-t{sQN7Vl^WlhJnF0xBGL z%fGCzTbBMPz2{Y791rt zBCzmMK36bCgVl0jpMh85Gm8i*U8;`~P33NbsXhhIHQ_@F+r?Z9Op6xJQmblR%|08TDw0mf1U?dnQsXY_yMsw)r3N~{QDSb4!G_nVE)g;1WW0!OW z+c^aYEt48a4kz~}LV9RKA5Jn`+Gk_VGd#FH1vXr0wfpa%j7~ Date: Tue, 1 Jan 2008 14:37:32 +0000 Subject: [PATCH 1931/8469] Added support for new Windows build dirs in PC/ to distutils.sysconfig --- sysconfig.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 32b165ffd1..3cd647becc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -27,6 +27,10 @@ project_base = os.path.dirname(os.path.abspath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) +# PC/VS7.1 +if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use From fdbce281befb4d8d7bf3c90e9a37f33164da71f7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 1 Jan 2008 14:42:15 +0000 Subject: [PATCH 1932/8469] Merged revisions 59628-59641 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59631 | christian.heimes | 2007-12-31 20:16:56 +0100 (Mon, 31 Dec 2007) | 1 line Fixed path ........ r59632 | christian.heimes | 2007-12-31 20:20:57 +0100 (Mon, 31 Dec 2007) | 1 line Fixed path to _ssl.c in Windows make file ........ r59633 | christian.heimes | 2007-12-31 20:23:22 +0100 (Mon, 31 Dec 2007) | 1 line Fixed path to _ssl.c in Windows make file, take two ........ r59634 | christian.heimes | 2007-12-31 20:25:22 +0100 (Mon, 31 Dec 2007) | 1 line Fixed path to _ssl.c in Windows make file, take three ... ........ r59635 | neal.norwitz | 2008-01-01 00:48:47 +0100 (Tue, 01 Jan 2008) | 1 line Fix refleak ........ r59637 | guido.van.rossum | 2008-01-01 05:15:29 +0100 (Tue, 01 Jan 2008) | 5 lines Fix an odd error which would only occur close to new year's eve, due to use of datetime.datetime.now() instead of utcnow() for comparison. (I think the test can still fail if it's executed pretty much *at* new year's eve, but that's not worth fixing.) ........ r59638 | christian.heimes | 2008-01-01 14:40:26 +0100 (Tue, 01 Jan 2008) | 1 line MSI uses back slashes as path separators ........ r59639 | christian.heimes | 2008-01-01 14:52:57 +0100 (Tue, 01 Jan 2008) | 1 line Added new wininst files to msi.py and adjusted some paths ........ r59640 | christian.heimes | 2008-01-01 14:58:16 +0100 (Tue, 01 Jan 2008) | 1 line The root of the project is two levels up from PC/VS7.1 ........ r59641 | christian.heimes | 2008-01-01 15:37:32 +0100 (Tue, 01 Jan 2008) | 1 line Added support for new Windows build dirs in PC/ to distutils.sysconfig ........ --- sysconfig.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index ba89c3b864..4d790ccbe5 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -27,6 +27,10 @@ project_base = os.path.dirname(os.path.abspath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) +# PC/VS7.1 +if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use From 30e73c78342c8397efc90d0c9dfbd9f1a7aebf8c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 2 Jan 2008 18:59:36 +0000 Subject: [PATCH 1933/8469] Patch #1696. Don't attempt to call None.close() in dry-run mode. --- command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index bda4480ca5..d26fe94b7e 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -111,7 +111,8 @@ def copy_scripts (self): if f: f.close() else: - f.close() + if f: + f.close() self.copy_file(script, outfile) if os.name == 'posix': From 667a1ea083db9823c816fd690d6d61ca0d931710 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 2 Jan 2008 19:00:46 +0000 Subject: [PATCH 1934/8469] Patch #1696. Don't attempt to close None in dry-run mode. --- command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index b4810c3eac..6af363b36d 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -112,7 +112,8 @@ def copy_scripts (self): if f: f.close() else: - f.close() + if f: + f.close() self.copy_file(script, outfile) if os.name == 'posix': From 2f672dbe9907466088c0283b1ad4bc23b23107b9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 3 Jan 2008 23:01:04 +0000 Subject: [PATCH 1935/8469] Merged revisions 59666-59679 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r59666 | christian.heimes | 2008-01-02 19:28:32 +0100 (Wed, 02 Jan 2008) | 1 line Made vs9to8 Unix compatible ........ r59669 | guido.van.rossum | 2008-01-02 20:00:46 +0100 (Wed, 02 Jan 2008) | 2 lines Patch #1696. Don't attempt to close None in dry-run mode. ........ r59671 | jeffrey.yasskin | 2008-01-03 03:21:52 +0100 (Thu, 03 Jan 2008) | 6 lines Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361, r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new documentation. The only significant difference is that round(x) returns a float to preserve backward-compatibility. See http://bugs.python.org/issue1689. ........ r59672 | christian.heimes | 2008-01-03 16:41:30 +0100 (Thu, 03 Jan 2008) | 1 line Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj ........ r59675 | guido.van.rossum | 2008-01-03 20:12:44 +0100 (Thu, 03 Jan 2008) | 4 lines Issue #1700, reported by Nguyen Quan Son, fix by Fredruk Lundh: Regular Expression inline flags not handled correctly for some unicode characters. (Forward port from 2.5.2.) ........ r59676 | christian.heimes | 2008-01-03 21:23:15 +0100 (Thu, 03 Jan 2008) | 1 line Added math.isinf() and math.isnan() ........ r59677 | christian.heimes | 2008-01-03 22:14:48 +0100 (Thu, 03 Jan 2008) | 1 line Some build bots don't compile mathmodule. There is an issue with the long definition of pi and euler ........ r59678 | christian.heimes | 2008-01-03 23:16:32 +0100 (Thu, 03 Jan 2008) | 2 lines Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports ........ r59679 | christian.heimes | 2008-01-03 23:32:26 +0100 (Thu, 03 Jan 2008) | 1 line Added copysign(x, y) function to the math module ........ --- command/build_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 227bb9c7a1..7b44264cc2 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -110,7 +110,8 @@ def copy_scripts(self): if f: f.close() else: - f.close() + if f: + f.close() self.copy_file(script, outfile) if os.name == 'posix': From 8b891e185114ca8306b56c80aef8866034f179c8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 6 Jan 2008 21:13:42 +0000 Subject: [PATCH 1936/8469] Fix more exception slicing. --- file_util.py | 2 +- spawn.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/file_util.py b/file_util.py index e29e90e6d7..69190601fb 100644 --- a/file_util.py +++ b/file_util.py @@ -139,7 +139,7 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, macostools.copy(src, dst, 0, preserve_times) except os.error as exc: raise DistutilsFileError( - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1])) + "could not copy '%s' to '%s': %s" % (src, dst, exc.args[-1])) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) diff --git a/spawn.py b/spawn.py index 0aee2bc3eb..4c536d28af 100644 --- a/spawn.py +++ b/spawn.py @@ -67,7 +67,7 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): except OSError as exc: # this seems to happen when the command isn't found raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc[-1])) + "command '%s' failed: %s" % (cmd[0], exc.args[-1])) if rc != 0: # and this reflects the command running but failing raise DistutilsExecError( @@ -88,7 +88,7 @@ def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): except OSError as exc: # this seems to happen when the command isn't found raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc[-1])) + "command '%s' failed: %s" % (cmd[0], exc.args[-1])) if rc != 0: # and this reflects the command running but failing print("command '%s' failed with exit status %d" % (cmd[0], rc)) @@ -124,7 +124,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): if exc.errno == errno.EINTR: continue raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc[-1])) + "command '%s' failed: %s" % (cmd[0], exc.args[-1])) if os.WIFSIGNALED(status): raise DistutilsExecError( "command '%s' terminated by signal %d" From 60d10b8328e3c77e3e722bb4015477c9ac7854dd Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 6 Jan 2008 21:41:49 +0000 Subject: [PATCH 1937/8469] Missed one because of indirection. --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index e0ae2e5ea2..917f1d0b93 100644 --- a/util.py +++ b/util.py @@ -269,7 +269,7 @@ def grok_environment_error (exc, prefix="error: "): # include the filename in the exception object! error = prefix + "%s" % exc.strerror else: - error = prefix + str(exc[-1]) + error = prefix + str(exc.args[-1]) return error From c39e9fa5952a01de7527da5fc1ec0d04451e300e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 21 Jan 2008 17:42:40 +0000 Subject: [PATCH 1938/8469] #1530959: change distutils build dir for --with-pydebug python builds. --- command/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/build.py b/command/build.py index 9ae0a292a3..bca031f730 100644 --- a/command/build.py +++ b/command/build.py @@ -69,6 +69,12 @@ def finalize_options (self): plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) + # Make it so Python 2.x and Python 2.x with --with-pydebug don't + # share the same build directories. Doing so confuses the build + # process for C modules + if hasattr(sys, 'gettotalrefcount'): + plat_specifier += '-pydebug' + # 'build_purelib' and 'build_platlib' just default to 'lib' and # 'lib.' under the base build directory. We only use one of # them for a given distribution, though -- From 32ff6ab5969de182ade4a74e0159e28e301d79d7 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 21 Jan 2008 20:36:10 +0000 Subject: [PATCH 1939/8469] Merged revisions 60151-60159,60161-60168,60170,60172-60173,60175 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60151 | christian.heimes | 2008-01-21 14:11:15 +0100 (Mon, 21 Jan 2008) | 1 line A bunch of header files were not listed as dependencies for object files. Changes to files like Parser/parser.h weren't picked up by make. ........ r60152 | georg.brandl | 2008-01-21 15:16:46 +0100 (Mon, 21 Jan 2008) | 3 lines #1087741: make mmap.mmap the type of mmap objects, not a factory function. Allow it to be subclassed. ........ r60153 | georg.brandl | 2008-01-21 15:18:14 +0100 (Mon, 21 Jan 2008) | 2 lines mmap is an extension module. ........ r60154 | georg.brandl | 2008-01-21 17:28:13 +0100 (Mon, 21 Jan 2008) | 2 lines Fix example. ........ r60155 | georg.brandl | 2008-01-21 17:34:07 +0100 (Mon, 21 Jan 2008) | 2 lines #1555501: document plistlib and move it to the general library. ........ r60156 | georg.brandl | 2008-01-21 17:36:00 +0100 (Mon, 21 Jan 2008) | 2 lines Add a stub for bundlebuilder documentation. ........ r60157 | georg.brandl | 2008-01-21 17:46:58 +0100 (Mon, 21 Jan 2008) | 2 lines Removing bundlebuilder docs again -- it's not to be used anymore (see #779825). ........ r60158 | georg.brandl | 2008-01-21 17:51:51 +0100 (Mon, 21 Jan 2008) | 2 lines #997912: acknowledge nested scopes in tutorial. ........ r60159 | vinay.sajip | 2008-01-21 18:02:26 +0100 (Mon, 21 Jan 2008) | 1 line Fix: #1836: Off-by-one bug in TimedRotatingFileHandler rollover calculation. Patch thanks to Kathryn M. Kowalski. ........ r60161 | georg.brandl | 2008-01-21 18:13:03 +0100 (Mon, 21 Jan 2008) | 2 lines Adapt pydoc to new doc URLs. ........ r60162 | georg.brandl | 2008-01-21 18:17:00 +0100 (Mon, 21 Jan 2008) | 2 lines Fix old link. ........ r60163 | georg.brandl | 2008-01-21 18:22:06 +0100 (Mon, 21 Jan 2008) | 2 lines #1726198: replace while 1: fp.readline() with file iteration. ........ r60164 | georg.brandl | 2008-01-21 18:29:23 +0100 (Mon, 21 Jan 2008) | 2 lines Clarify $ behavior in re docstring. #1631394. ........ r60165 | vinay.sajip | 2008-01-21 18:39:22 +0100 (Mon, 21 Jan 2008) | 1 line Minor documentation change - hyperlink tidied up. ........ r60166 | georg.brandl | 2008-01-21 18:42:40 +0100 (Mon, 21 Jan 2008) | 2 lines #1530959: change distutils build dir for --with-pydebug python builds. ........ r60167 | vinay.sajip | 2008-01-21 19:16:05 +0100 (Mon, 21 Jan 2008) | 1 line Updated to include news on recent logging fixes and documentation changes. ........ r60168 | georg.brandl | 2008-01-21 19:35:49 +0100 (Mon, 21 Jan 2008) | 3 lines Issue #1882: when compiling code from a string, encoding cookies in the second line of code were not always recognized correctly. ........ r60170 | georg.brandl | 2008-01-21 19:36:51 +0100 (Mon, 21 Jan 2008) | 2 lines Add NEWS entry for #1882. ........ r60172 | georg.brandl | 2008-01-21 19:41:24 +0100 (Mon, 21 Jan 2008) | 2 lines Use original location of document, which has translations. ........ r60173 | walter.doerwald | 2008-01-21 21:18:04 +0100 (Mon, 21 Jan 2008) | 2 lines Follow PEP 8 in module docstring. ........ r60175 | georg.brandl | 2008-01-21 21:20:53 +0100 (Mon, 21 Jan 2008) | 2 lines Adapt to latest doctools refactoring. ........ --- command/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/build.py b/command/build.py index 1f2ce06205..4fe95b0cfb 100644 --- a/command/build.py +++ b/command/build.py @@ -66,6 +66,12 @@ def initialize_options(self): def finalize_options(self): plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) + # Make it so Python 2.x and Python 2.x with --with-pydebug don't + # share the same build directories. Doing so confuses the build + # process for C modules + if hasattr(sys, 'gettotalrefcount'): + plat_specifier += '-pydebug' + # 'build_purelib' and 'build_platlib' just default to 'lib' and # 'lib.' under the base build directory. We only use one of # them for a given distribution, though -- From ef21fafddb93c89ba8bed432a50727c45d2132e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Fri, 1 Feb 2008 22:58:17 +0000 Subject: [PATCH 1940/8469] Bump distutils version number to match Python version. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 86ad44fe3a..8c954c2238 100644 --- a/__init__.py +++ b/__init__.py @@ -20,4 +20,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.1" +__version__ = "2.6.0" From 2f0340a9ac492d58a9220fe9eef0daccdf997b56 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 3 Feb 2008 14:34:18 +0000 Subject: [PATCH 1941/8469] Fixed paths to Windows build directories in build_ext.py Use vsbuild instead of devenv in build.bat and _bsddb.vcproj --- command/build_ext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index ecfa177d76..29d5668c61 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -182,13 +182,13 @@ def finalize_options (self): self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) if MSVC_VERSION == 9: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild9')) + 'PCbuild')) elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild8', 'win32release')) + 'PC', 'VS8.0', 'win32release')) else: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild')) + 'PC', 'VS7.1')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From e5260241bc5e4e91531a72a9efd5b0f46ad8704e Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 3 Feb 2008 16:51:08 +0000 Subject: [PATCH 1942/8469] Merged revisions 60481,60485,60489-60520,60523-60527,60530-60533,60535-60538,60540-60551 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk NOTE: I blocked the following revisions: svnmerge.py block -r 60521,60522,60528,60529,60534,60539 The new tests must be merged with lots of manual work. ........ r60493 | georg.brandl | 2008-02-01 12:59:08 +0100 (Fri, 01 Feb 2008) | 2 lines Update IPv6 RFC number. ........ r60497 | georg.brandl | 2008-02-01 16:50:15 +0100 (Fri, 01 Feb 2008) | 2 lines Add link checker builder, written for GHOP by Thomas Lamb. ........ r60500 | georg.brandl | 2008-02-01 19:08:09 +0100 (Fri, 01 Feb 2008) | 2 lines Rename batch file. ........ r60504 | christian.heimes | 2008-02-01 19:49:26 +0100 (Fri, 01 Feb 2008) | 1 line More int -> pid_t. ........ r60507 | georg.brandl | 2008-02-01 20:24:01 +0100 (Fri, 01 Feb 2008) | 2 lines Wording nit. ........ r60510 | georg.brandl | 2008-02-01 21:45:33 +0100 (Fri, 01 Feb 2008) | 2 lines Update for latest sphinx latex writer. ........ r60511 | raymond.hettinger | 2008-02-01 22:30:23 +0100 (Fri, 01 Feb 2008) | 1 line Issue #1996: float.as_integer_ratio() should return fraction in lowest terms. ........ r60512 | raymond.hettinger | 2008-02-01 23:15:52 +0100 (Fri, 01 Feb 2008) | 1 line Integer ratio should return ints instead of longs whereever possible. ........ r60513 | raymond.hettinger | 2008-02-01 23:22:50 +0100 (Fri, 01 Feb 2008) | 1 line labs() takes a long for an input. ........ r60514 | raymond.hettinger | 2008-02-01 23:42:59 +0100 (Fri, 01 Feb 2008) | 1 line Test round-trip on float.as_integer_ratio() and float.__truediv__(). ........ r60515 | marc-andre.lemburg | 2008-02-01 23:58:17 +0100 (Fri, 01 Feb 2008) | 3 lines Bump distutils version number to match Python version. ........ r60516 | raymond.hettinger | 2008-02-02 00:12:19 +0100 (Sat, 02 Feb 2008) | 1 line Fix int/long typecase. Add check for non-binary floating point. ........ r60517 | raymond.hettinger | 2008-02-02 00:45:44 +0100 (Sat, 02 Feb 2008) | 1 line Add protection from weirdness while scaling the mantissa to an integer. ........ r60518 | raymond.hettinger | 2008-02-02 06:11:40 +0100 (Sat, 02 Feb 2008) | 1 line Simpler solution to handling non-IEEE 754 environments. ........ r60519 | raymond.hettinger | 2008-02-02 06:24:44 +0100 (Sat, 02 Feb 2008) | 1 line Neaten-up a bit. ........ r60520 | georg.brandl | 2008-02-02 10:56:20 +0100 (Sat, 02 Feb 2008) | 2 lines Amendments to the urllib2 docs, written for GHOP by Thomas Lamb. ........ r60525 | georg.brandl | 2008-02-02 11:49:58 +0100 (Sat, 02 Feb 2008) | 3 lines Add email example how to send a multipart message. Written for GHOP by Martin Matejek. ........ r60526 | georg.brandl | 2008-02-02 12:05:00 +0100 (Sat, 02 Feb 2008) | 2 lines Rewrite test_socketserver as unittest, written for GHOP by Benjamin Petersen. ........ r60527 | georg.brandl | 2008-02-02 12:05:34 +0100 (Sat, 02 Feb 2008) | 2 lines Add GHOP contributor. ........ r60530 | mark.dickinson | 2008-02-02 18:16:13 +0100 (Sat, 02 Feb 2008) | 2 lines Make the Rational constructor accept '3.' and '.2' as well as '3.2'. ........ r60531 | neal.norwitz | 2008-02-02 19:52:51 +0100 (Sat, 02 Feb 2008) | 1 line Update the leaky tests (ie, ignore these tests if they report leaks). This version has been running for a while. ........ r60533 | skip.montanaro | 2008-02-02 20:11:57 +0100 (Sat, 02 Feb 2008) | 7 lines Split the refleak mail body into two parts, the first being those failing tests which are deemed more important issues, the second those which are known to have difficult to solve problems and are generally expected to leak. Hopefully this doesn't break the script... ........ r60535 | georg.brandl | 2008-02-03 01:04:50 +0100 (Sun, 03 Feb 2008) | 3 lines Wait for a delay before reaping children -- this should fix the test_socketserver failures on several platforms. ........ r60536 | brett.cannon | 2008-02-03 03:07:55 +0100 (Sun, 03 Feb 2008) | 2 lines Fix a minor typo. ........ r60537 | brett.cannon | 2008-02-03 03:08:45 +0100 (Sun, 03 Feb 2008) | 3 lines Directories from CPPFLAGS and LDFLAGS were being added in the reverse order for searches as to how they were listed in the environment variable. ........ r60538 | brett.cannon | 2008-02-03 03:34:14 +0100 (Sun, 03 Feb 2008) | 2 lines Remove extra tick marks and add a missing closing parenthesis. ........ r60540 | andrew.macintyre | 2008-02-03 07:58:06 +0100 (Sun, 03 Feb 2008) | 2 lines Update OS/2 EMX build bits for 2.6. ........ r60541 | andrew.macintyre | 2008-02-03 08:01:11 +0100 (Sun, 03 Feb 2008) | 2 lines Rename module definition file to reflect v2.6. ........ r60542 | andrew.macintyre | 2008-02-03 08:07:31 +0100 (Sun, 03 Feb 2008) | 6 lines The wrapper function is supposed to be for spawnvpe() so that's what we should call [this wrapper only available on OS/2]. Backport candidate to 2.5. ........ r60544 | gregory.p.smith | 2008-02-03 08:20:53 +0100 (Sun, 03 Feb 2008) | 6 lines Merge this fix from the pybsddb tree: r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines Solved memory leak when using cursors with databases without environment. ........ r60546 | gregory.p.smith | 2008-02-03 09:01:46 +0100 (Sun, 03 Feb 2008) | 2 lines remove a repeated occurance of a hardcoded berkeleydb library version number ........ r60549 | brett.cannon | 2008-02-03 10:59:21 +0100 (Sun, 03 Feb 2008) | 2 lines Add an entry for r60537. ........ r60550 | georg.brandl | 2008-02-03 13:29:00 +0100 (Sun, 03 Feb 2008) | 2 lines #2003: fix sentence. ........ r60551 | christian.heimes | 2008-02-03 15:34:18 +0100 (Sun, 03 Feb 2008) | 2 lines Fixed paths to Windows build directories in build_ext.py Use vsbuild instead of devenv in build.bat and _bsddb.vcproj ........ --- __init__.py | 2 +- command/build_ext.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index f71c3adb14..0c3d939dc3 100644 --- a/__init__.py +++ b/__init__.py @@ -18,4 +18,4 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.1" +__version__ = "2.6.0" diff --git a/command/build_ext.py b/command/build_ext.py index 6d42278e40..ff84bca7a0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -178,13 +178,13 @@ def finalize_options(self): self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) if MSVC_VERSION == 9: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild9')) + 'PCbuild')) elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild8', 'win32release')) + 'PC', 'VS8.0', 'win32release')) else: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild')) + 'PC', 'VS7.1')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From 21a51933d80f59b70313d7fb9689ed54093944fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Tue, 5 Feb 2008 14:50:40 +0000 Subject: [PATCH 1943/8469] Keep distutils Python 2.1 compatible (or even Python 2.4 in this case). --- sysconfig.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 3cd647becc..1aaaa28fbf 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -37,8 +37,12 @@ # different (hard-wired) directories. # Setup.local is available for Makefile builds including VPATH builds, # Setup.dist is available on Windows -python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn)) - for fn in ("Setup.dist", "Setup.local")) +def _python_build(): + for fn in ("Setup.dist", "Setup.local"): + if os.path.isfile(os.path.join(project_base, "Modules", fn)): + return True + return False +python_build = _python_build() def get_python_version(): From 71947cc1efed4a4f2ce1980ac465d70ea2542f29 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 6 Feb 2008 14:31:34 +0000 Subject: [PATCH 1944/8469] Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60568-60598,60600-60616 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60568 | christian.heimes | 2008-02-04 19:48:38 +0100 (Mon, 04 Feb 2008) | 1 line Increase debugging to investige failing tests on some build bots ........ r60570 | christian.heimes | 2008-02-04 20:30:05 +0100 (Mon, 04 Feb 2008) | 1 line Small adjustments for test compact freelist test. It's no passing on Windows as well. ........ r60573 | amaury.forgeotdarc | 2008-02-04 21:53:14 +0100 (Mon, 04 Feb 2008) | 2 lines Correct quotes in NEWS file ........ r60575 | amaury.forgeotdarc | 2008-02-04 22:45:05 +0100 (Mon, 04 Feb 2008) | 13 lines #1750076: Debugger did not step on every iteration of a while statement. The mapping between bytecode offsets and source lines (lnotab) did not contain an entry for the beginning of the loop. Now it does, and the lnotab can be a bit larger: in particular, several statements on the same line generate several entries. However, this does not bother the settrace function, which will trigger only one 'line' event. The lnotab seems to be exactly the same as with python2.4. ........ r60584 | amaury.forgeotdarc | 2008-02-05 01:26:21 +0100 (Tue, 05 Feb 2008) | 3 lines Change r60575 broke test_compile: there is no need to emit co_lnotab item when both offsets are zeros. ........ r60587 | skip.montanaro | 2008-02-05 03:32:16 +0100 (Tue, 05 Feb 2008) | 1 line sync with most recent version from python-mode sf project ........ r60588 | lars.gustaebel | 2008-02-05 12:51:40 +0100 (Tue, 05 Feb 2008) | 5 lines Issue #2004: Use mode 0700 for temporary directories and default permissions for missing directories. (will backport to 2.5) ........ r60590 | georg.brandl | 2008-02-05 13:01:24 +0100 (Tue, 05 Feb 2008) | 2 lines Convert external links to internal links. Fixes #2010. ........ r60592 | marc-andre.lemburg | 2008-02-05 15:50:40 +0100 (Tue, 05 Feb 2008) | 3 lines Keep distutils Python 2.1 compatible (or even Python 2.4 in this case). ........ r60593 | andrew.kuchling | 2008-02-05 17:06:57 +0100 (Tue, 05 Feb 2008) | 5 lines Update PEP URL. (This code is duplicated between pydoc and DocXMLRPCServer; maybe it should be refactored as a GHOP project.) 2.5.2 backport candidate. ........ r60596 | guido.van.rossum | 2008-02-05 18:32:15 +0100 (Tue, 05 Feb 2008) | 2 lines In the experimental 'Scanner' feature, the group count was set wrong. ........ r60602 | facundo.batista | 2008-02-05 20:03:32 +0100 (Tue, 05 Feb 2008) | 3 lines Issue 1951. Converts wave test cases to unittest. ........ r60603 | georg.brandl | 2008-02-05 20:07:10 +0100 (Tue, 05 Feb 2008) | 2 lines Actually run the test. ........ r60604 | skip.montanaro | 2008-02-05 20:24:30 +0100 (Tue, 05 Feb 2008) | 2 lines correct object name ........ r60605 | georg.brandl | 2008-02-05 20:58:17 +0100 (Tue, 05 Feb 2008) | 7 lines * Use the same code to profile for test_profile and test_cprofile. * Convert both to unittest. * Use the same unit testing code. * Include the expected output in both test files. * Make it possible to regenerate the expected output by running the file as a script with an '-r' argument. ........ r60613 | raymond.hettinger | 2008-02-06 02:49:00 +0100 (Wed, 06 Feb 2008) | 1 line Sync-up with Py3k work. ........ r60614 | christian.heimes | 2008-02-06 13:44:34 +0100 (Wed, 06 Feb 2008) | 1 line Limit free list of method and builtin function objects to 256 entries each. ........ r60616 | christian.heimes | 2008-02-06 14:33:44 +0100 (Wed, 06 Feb 2008) | 7 lines Unified naming convention for free lists and their limits. All free lists in Object/ are named ``free_list``, the counter ``numfree`` and the upper limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block. The chances should make it easier to adjust Python for platforms with less memory, e.g. mobile phones. ........ --- sysconfig.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 4d790ccbe5..39216a532f 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -37,8 +37,12 @@ # different (hard-wired) directories. # Setup.local is available for Makefile builds including VPATH builds, # Setup.dist is available on Windows -python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn)) - for fn in ("Setup.dist", "Setup.local")) +def _python_build(): + for fn in ("Setup.dist", "Setup.local"): + if os.path.isfile(os.path.join(project_base, "Modules", fn)): + return True + return False +python_build = _python_build() def get_python_version(): """Return a string containing the major and minor Python version, From b1165a0f3caf19626c96f1b397bd52a9d1c080f4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 21 Feb 2008 14:23:38 +0000 Subject: [PATCH 1945/8469] Close manifest file. This change doesn't make any difference to CPython, but is a necessary fix for Jython. --- command/sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/command/sdist.py b/command/sdist.py index 3dfe6f21a7..a06b1953b4 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -383,6 +383,7 @@ def read_manifest (self): if line[-1] == '\n': line = line[0:-1] self.filelist.append(line) + manifest.close() # read_manifest () From 36bf11e144f03aaf5cce1d8cd8efcdc1e3a53b35 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 21 Feb 2008 18:18:37 +0000 Subject: [PATCH 1946/8469] Removed uses of dict.has_key() from distutils, and uses of callable() from copy_reg.py, so the interpreter now starts up without warnings when '-3' is given. More work like this needs to be done in the rest of the stdlib. --- archive_util.py | 2 +- ccompiler.py | 2 +- command/build_ext.py | 2 +- command/install.py | 2 +- command/register.py | 4 ++-- command/upload.py | 2 +- core.py | 6 +++--- dir_util.py | 2 +- dist.py | 8 ++++---- fancy_getopt.py | 8 ++++---- msvccompiler.py | 2 +- sysconfig.py | 22 +++++++++++----------- text_file.py | 4 ++-- util.py | 6 +++--- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/archive_util.py b/archive_util.py index 6aa5e635d7..a9c6a5b488 100644 --- a/archive_util.py +++ b/archive_util.py @@ -124,7 +124,7 @@ def visit (z, dirname, names): def check_archive_formats (formats): for format in formats: - if not ARCHIVE_FORMATS.has_key(format): + if format not in ARCHIVE_FORMATS: return format else: return None diff --git a/ccompiler.py b/ccompiler.py index 1349abeb65..0ed9a40a35 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -159,7 +159,7 @@ class (via the 'executables' class attribute), but most will have: # basically the same things with Unix C compilers. for key in args.keys(): - if not self.executables.has_key(key): + if key not in self.executables: raise ValueError, \ "unknown executable '%s' for class %s" % \ (key, self.__class__.__name__) diff --git a/command/build_ext.py b/command/build_ext.py index 29d5668c61..3042fe0223 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -362,7 +362,7 @@ def check_extensions_list (self, extensions): # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') - if build_info.has_key('def_file'): + if 'def_file' in build_info: log.warn("'def_file' element of build info dict " "no longer supported") diff --git a/command/install.py b/command/install.py index 453151d08b..c62121023d 100644 --- a/command/install.py +++ b/command/install.py @@ -352,7 +352,7 @@ def dump_dirs (self, msg): opt_name = opt[0] if opt_name[-1] == "=": opt_name = opt_name[0:-1] - if self.negative_opt.has_key(opt_name): + if opt_name in self.negative_opt: opt_name = string.translate(self.negative_opt[opt_name], longopt_xlate) val = not getattr(self, opt_name) diff --git a/command/register.py b/command/register.py index 200e61e240..d1a9100de4 100644 --- a/command/register.py +++ b/command/register.py @@ -120,7 +120,7 @@ def send_metadata(self): # see if we can short-cut and get the username/password from the # config config = None - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): print 'Using PyPI login from %s'%rc @@ -163,7 +163,7 @@ def send_metadata(self): print 'Server response (%s): %s'%(code, result) # possibly save the login - if os.environ.has_key('HOME') and config is None and code == 200: + if 'HOME' in os.environ and config is None and code == 200: rc = os.path.join(os.environ['HOME'], '.pypirc') print 'I can store your PyPI login so future submissions will be faster.' print '(the login will be stored in %s)'%rc diff --git a/command/upload.py b/command/upload.py index 7461e5f453..301a159590 100644 --- a/command/upload.py +++ b/command/upload.py @@ -46,7 +46,7 @@ def finalize_options(self): raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) diff --git a/core.py b/core.py index c9c6f037a7..c40dd0a7aa 100644 --- a/core.py +++ b/core.py @@ -101,9 +101,9 @@ class found in 'cmdclass' is used in place of the default, which is else: klass = Distribution - if not attrs.has_key('script_name'): + if 'script_name' not in attrs: attrs['script_name'] = os.path.basename(sys.argv[0]) - if not attrs.has_key('script_args'): + if 'script_args' not in attrs: attrs['script_args'] = sys.argv[1:] # Create the Distribution instance, using the remaining arguments @@ -111,7 +111,7 @@ class found in 'cmdclass' is used in place of the default, which is try: _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: - if attrs.has_key('name'): + if 'name' in attrs: raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) else: diff --git a/dir_util.py b/dir_util.py index 43994db3ff..77f253255f 100644 --- a/dir_util.py +++ b/dir_util.py @@ -207,7 +207,7 @@ def remove_tree (directory, verbose=0, dry_run=0): apply(cmd[0], (cmd[1],)) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) - if _path_created.has_key(abspath): + if abspath in _path_created: del _path_created[abspath] except (IOError, OSError), exc: log.warn(grok_environment_error( diff --git a/dist.py b/dist.py index ff49886d97..d098cb9713 100644 --- a/dist.py +++ b/dist.py @@ -239,7 +239,7 @@ def __init__ (self, attrs=None): for (opt, val) in cmd_options.items(): opt_dict[opt] = ("setup script", val) - if attrs.has_key('licence'): + if 'licence' in attrs: attrs['license'] = attrs['licence'] del attrs['licence'] msg = "'licence' distribution option is deprecated; use 'license'" @@ -343,7 +343,7 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) @@ -388,7 +388,7 @@ def parse_config_files (self, filenames=None): # If there was a "global" section in the config file, use it # to set Distribution options. - if self.command_options.has_key('global'): + if 'global' in self.command_options: for (opt, (src, val)) in self.command_options['global'].items(): alias = self.negative_opt.get(opt) try: @@ -907,7 +907,7 @@ def _set_command_options (self, command_obj, option_dict=None): try: is_string = type(value) is StringType - if neg_opt.has_key(option) and is_string: + if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: setattr(command_obj, option, strtobool(value)) diff --git a/fancy_getopt.py b/fancy_getopt.py index 218ed73f98..31cf0c5c3b 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -97,7 +97,7 @@ def set_option_table (self, option_table): self._build_index() def add_option (self, long_option, short_option=None, help_string=None): - if self.option_index.has_key(long_option): + if long_option in self.option_index: raise DistutilsGetoptError, \ "option conflict: already an option '%s'" % long_option else: @@ -109,7 +109,7 @@ def add_option (self, long_option, short_option=None, help_string=None): def has_option (self, long_option): """Return true if the option table for this parser has an option with long name 'long_option'.""" - return self.option_index.has_key(long_option) + return long_option in self.option_index def get_attr_name (self, long_option): """Translate long option name 'long_option' to the form it @@ -121,11 +121,11 @@ def get_attr_name (self, long_option): def _check_alias_dict (self, aliases, what): assert type(aliases) is DictionaryType for (alias, opt) in aliases.items(): - if not self.option_index.has_key(alias): + if alias not in self.option_index: raise DistutilsGetoptError, \ ("invalid %s '%s': " "option '%s' not defined") % (what, alias, alias) - if not self.option_index.has_key(opt): + if opt not in self.option_index: raise DistutilsGetoptError, \ ("invalid %s '%s': " "aliased option '%s' not defined") % (what, alias, opt) diff --git a/msvccompiler.py b/msvccompiler.py index fa123462ec..f3acb53477 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -252,7 +252,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): def initialize(self): self.__paths = [] - if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" diff --git a/sysconfig.py b/sysconfig.py index 1aaaa28fbf..506cf385b6 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -161,22 +161,22 @@ def customize_compiler(compiler): get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') - if os.environ.has_key('CC'): + if 'CC' in os.environ: cc = os.environ['CC'] - if os.environ.has_key('CXX'): + if 'CXX' in os.environ: cxx = os.environ['CXX'] - if os.environ.has_key('LDSHARED'): + if 'LDSHARED' in os.environ: ldshared = os.environ['LDSHARED'] - if os.environ.has_key('CPP'): + if 'CPP' in os.environ: cpp = os.environ['CPP'] else: cpp = cc + " -E" # not always - if os.environ.has_key('LDFLAGS'): + if 'LDFLAGS' in os.environ: ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if os.environ.has_key('CFLAGS'): + if 'CFLAGS' in os.environ: cflags = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if os.environ.has_key('CPPFLAGS'): + if 'CPPFLAGS' in os.environ: cpp = cpp + ' ' + os.environ['CPPFLAGS'] cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] @@ -291,12 +291,12 @@ def parse_makefile(fn, g=None): if m: n = m.group(1) found = True - if done.has_key(n): + if n in done: item = str(done[n]) - elif notdone.has_key(n): + elif n in notdone: # get it on a subsequent round found = False - elif os.environ.has_key(n): + elif n in os.environ: # do it like make: fall back to environment item = os.environ[n] else: @@ -380,7 +380,7 @@ def _init_posix(): # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and g.has_key('MACOSX_DEPLOYMENT_TARGET'): + if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': diff --git a/text_file.py b/text_file.py index 67efd65e36..ff2878de1b 100644 --- a/text_file.py +++ b/text_file.py @@ -89,7 +89,7 @@ def __init__ (self, filename=None, file=None, **options): # set values for all options -- either from client option hash # or fallback to default_options for opt in self.default_options.keys(): - if options.has_key (opt): + if opt in options: setattr (self, opt, options[opt]) else: @@ -97,7 +97,7 @@ def __init__ (self, filename=None, file=None, **options): # sanity check client option hash for opt in options.keys(): - if not self.default_options.has_key (opt): + if opt not in self.default_options: raise KeyError, "invalid TextFile option '%s'" % opt if file is None: diff --git a/util.py b/util.py index 8979634e4b..deb9a0a0f1 100644 --- a/util.py +++ b/util.py @@ -219,11 +219,11 @@ def check_environ (): if _environ_checked: return - if os.name == 'posix' and not os.environ.has_key('HOME'): + if os.name == 'posix' and 'HOME' not in os.environ: import pwd os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] - if not os.environ.has_key('PLAT'): + if 'PLAT' not in os.environ: os.environ['PLAT'] = get_platform() _environ_checked = 1 @@ -241,7 +241,7 @@ def subst_vars (s, local_vars): check_environ() def _subst (match, local_vars=local_vars): var_name = match.group(1) - if local_vars.has_key(var_name): + if var_name in local_vars: return str(local_vars[var_name]) else: return os.environ[var_name] From a5c15c1aba945408f59b87959d31be1b74a2cb2a Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 22 Feb 2008 16:37:40 +0000 Subject: [PATCH 1947/8469] Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60751,60753,60756-60757,60759-60761,60763-60764,60766,60769-60770,60774-60784,60787-60789,60793,60796,60799-60809,60812-60813,60815-60821,60823-60826,60828-60829,60831-60834,60836,60838-60839,60846-60849,60852-60854,60856-60859,60861-60870,60874-60875,60880-60881,60886,60888-60890,60892,60894-60898,60900-60931,60933-60958 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60901 | eric.smith | 2008-02-19 14:21:56 +0100 (Tue, 19 Feb 2008) | 1 line Added PEP 3101. ........ r60907 | georg.brandl | 2008-02-20 20:12:36 +0100 (Wed, 20 Feb 2008) | 2 lines Fixes contributed by Ori Avtalion. ........ r60909 | eric.smith | 2008-02-21 00:34:22 +0100 (Thu, 21 Feb 2008) | 1 line Trim leading zeros from a floating point exponent, per C99. See issue 1600. As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description). ........ r60910 | eric.smith | 2008-02-21 00:39:28 +0100 (Thu, 21 Feb 2008) | 1 line Now that PyOS_ascii_formatd supports the 'n' format, simplify the float formatting code to just call it. ........ r60918 | andrew.kuchling | 2008-02-21 15:23:38 +0100 (Thu, 21 Feb 2008) | 2 lines Close manifest file. This change doesn't make any difference to CPython, but is a necessary fix for Jython. ........ r60921 | guido.van.rossum | 2008-02-21 18:46:16 +0100 (Thu, 21 Feb 2008) | 2 lines Remove news about float repr() -- issue 1580 is still in limbo. ........ r60923 | guido.van.rossum | 2008-02-21 19:18:37 +0100 (Thu, 21 Feb 2008) | 5 lines Removed uses of dict.has_key() from distutils, and uses of callable() from copy_reg.py, so the interpreter now starts up without warnings when '-3' is given. More work like this needs to be done in the rest of the stdlib. ........ r60924 | thomas.heller | 2008-02-21 19:28:48 +0100 (Thu, 21 Feb 2008) | 4 lines configure.ac: Remove the configure check for _Bool, it is already done in the top-level Python configure script. configure, fficonfig.h.in: regenerated. ........ r60925 | thomas.heller | 2008-02-21 19:52:20 +0100 (Thu, 21 Feb 2008) | 3 lines Replace 'has_key()' with 'in'. Replace 'raise Error, stuff' with 'raise Error(stuff)'. ........ r60927 | raymond.hettinger | 2008-02-21 20:24:53 +0100 (Thu, 21 Feb 2008) | 1 line Update more instances of has_key(). ........ r60928 | guido.van.rossum | 2008-02-21 20:46:35 +0100 (Thu, 21 Feb 2008) | 3 lines Fix a few typos and layout glitches (more work is needed). Move 2.5 news to Misc/HISTORY. ........ r60936 | georg.brandl | 2008-02-21 21:33:38 +0100 (Thu, 21 Feb 2008) | 2 lines #2079: typo in userdict docs. ........ r60938 | georg.brandl | 2008-02-21 21:38:13 +0100 (Thu, 21 Feb 2008) | 2 lines Part of #2154: minimal syntax fixes in doc example snippets. ........ r60942 | raymond.hettinger | 2008-02-22 04:16:42 +0100 (Fri, 22 Feb 2008) | 1 line First draft for itertools.product(). Docs and other updates forthcoming. ........ r60955 | nick.coghlan | 2008-02-22 11:54:06 +0100 (Fri, 22 Feb 2008) | 1 line Try to make command line error messages from runpy easier to understand (and suppress traceback cruft from the implicitly invoked runpy machinery) ........ r60956 | georg.brandl | 2008-02-22 13:31:45 +0100 (Fri, 22 Feb 2008) | 2 lines A lot more typo fixes by Ori Avtalion. ........ r60957 | georg.brandl | 2008-02-22 13:56:34 +0100 (Fri, 22 Feb 2008) | 2 lines Don't reference pyshell. ........ r60958 | georg.brandl | 2008-02-22 13:57:05 +0100 (Fri, 22 Feb 2008) | 2 lines Another fix. ........ --- ccompiler.py | 6 +++--- command/sdist.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index f4edb7c6a6..1e09123afc 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -147,11 +147,11 @@ class (via the 'executables' class attribute), but most will have: # discovered at run-time, since there are many different ways to do # basically the same things with Unix C compilers. - for key, value in kwargs.items(): + for key in kwargs: if key not in self.executables: - raise ValueError("unknown executable '%s' for class %s" % \ + raise ValueError("unknown executable '%s' for class %s" % (key, self.__class__.__name__)) - self.set_executable(key, value) + self.set_executable(key, kwargs[key]) def set_executable(self, key, value): if isinstance(value, str): diff --git a/command/sdist.py b/command/sdist.py index b1c76486ed..8289925785 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -357,6 +357,7 @@ def read_manifest(self): if line[-1] == '\n': line = line[0:-1] self.filelist.append(line) + manifest.close() def make_release_tree(self, base_dir, files): """Create the directory tree that will become the source From c3981d56adcbfdd1e06f1b4fabc554e470ce4646 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 23 Feb 2008 17:40:11 +0000 Subject: [PATCH 1948/8469] Patch #2167 from calvin: Remove unused imports --- bcppcompiler.py | 2 +- command/bdist.py | 2 +- command/bdist_dumb.py | 2 +- command/bdist_msi.py | 2 +- command/bdist_rpm.py | 1 - command/build_py.py | 2 +- command/build_scripts.py | 2 +- command/install.py | 1 - command/install_headers.py | 1 - command/install_lib.py | 2 +- command/register.py | 2 +- command/sdist.py | 2 +- filelist.py | 1 - tests/test_dist.py | 2 -- tests/test_sysconfig.py | 1 - unixccompiler.py | 1 - 16 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index ca524a5b88..d4fc53366f 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -16,7 +16,7 @@ __revision__ = "$Id$" -import sys, os +import os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError, UnknownFileError diff --git a/command/bdist.py b/command/bdist.py index 23c25a55a8..d6897d2d09 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import os, string +import os from types import * from distutils.core import Command from distutils.errors import * diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index ccba00955a..f740c468e7 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -11,7 +11,7 @@ import os from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree, ensure_relative +from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import * from distutils.sysconfig import get_python_version from distutils import log diff --git a/command/bdist_msi.py b/command/bdist_msi.py index a1c0df4bc5..a4014525b7 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -7,7 +7,7 @@ Implements the bdist_msi command. """ -import sys, os, string +import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 6f0e0d881c..9aa7030049 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -8,7 +8,6 @@ __revision__ = "$Id$" import sys, os, string -import glob from types import * from distutils.core import Command from distutils.debug import DEBUG diff --git a/command/build_py.py b/command/build_py.py index b9f39bae79..be6d2c5b4d 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, string, os +import string, os from types import * from glob import glob diff --git a/command/build_scripts.py b/command/build_scripts.py index 6af363b36d..104be0b349 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, re +import os, re from stat import ST_MODE from distutils import sysconfig from distutils.core import Command diff --git a/command/install.py b/command/install.py index c62121023d..0d39b91cc3 100644 --- a/command/install.py +++ b/command/install.py @@ -17,7 +17,6 @@ from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError -from glob import glob if sys.version < "2.2": WINDOWS_SCHEME = { diff --git a/command/install_headers.py b/command/install_headers.py index 2bd1b04367..4895240a4c 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -7,7 +7,6 @@ __revision__ = "$Id$" -import os from distutils.core import Command diff --git a/command/install_lib.py b/command/install_lib.py index 08ff543449..81107a85cb 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -2,7 +2,7 @@ __revision__ = "$Id$" -import sys, os, string +import os from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError diff --git a/command/register.py b/command/register.py index d1a9100de4..5c588effd3 100644 --- a/command/register.py +++ b/command/register.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os, string, urllib2, getpass, urlparse +import os, string, urllib2, getpass, urlparse import StringIO, ConfigParser from distutils.core import Command diff --git a/command/sdist.py b/command/sdist.py index a06b1953b4..9b37f78982 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, string +import os, string from types import * from glob import glob from distutils.core import Command diff --git a/filelist.py b/filelist.py index 43f9aaaf5b..6d27cce64f 100644 --- a/filelist.py +++ b/filelist.py @@ -11,7 +11,6 @@ import os, string, re import fnmatch from types import * -from glob import glob from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log diff --git a/tests/test_dist.py b/tests/test_dist.py index 4d2a7cdf1a..5ae79332c0 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -3,10 +3,8 @@ import distutils.cmd import distutils.dist import os -import shutil import StringIO import sys -import tempfile import unittest from test.test_support import TESTFN diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 770b7c376f..d56f7e9bc5 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,7 +2,6 @@ from distutils import sysconfig import os -import sys import unittest from test.test_support import TESTFN diff --git a/unixccompiler.py b/unixccompiler.py index 75e8a5316e..dc759ee8f5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,7 +17,6 @@ import os, sys from types import StringType, NoneType -from copy import copy from distutils import sysconfig from distutils.dep_util import newer From 6b8ac4a8066f127f3e2009e760eceda2354e3db1 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 23 Feb 2008 18:30:17 +0000 Subject: [PATCH 1949/8469] Merged revisions 60990-61002 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60990 | eric.smith | 2008-02-23 17:05:26 +0100 (Sat, 23 Feb 2008) | 1 line Removed duplicate Py_CHARMASK define. It's already defined in Python.h. ........ r60991 | andrew.kuchling | 2008-02-23 17:23:05 +0100 (Sat, 23 Feb 2008) | 4 lines #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances. Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link. ........ r60994 | andrew.kuchling | 2008-02-23 17:39:43 +0100 (Sat, 23 Feb 2008) | 1 line #835521: Add index entries for various pickle-protocol methods and attributes ........ r60995 | andrew.kuchling | 2008-02-23 18:10:46 +0100 (Sat, 23 Feb 2008) | 2 lines #1433694: minidom's .normalize() failed to set .nextSibling for last element. Fix by Malte Helmert ........ r61000 | christian.heimes | 2008-02-23 18:40:11 +0100 (Sat, 23 Feb 2008) | 1 line Patch #2167 from calvin: Remove unused imports ........ r61001 | christian.heimes | 2008-02-23 18:42:31 +0100 (Sat, 23 Feb 2008) | 1 line Patch #1957: syslogmodule: Release GIL when calling syslog(3) ........ r61002 | christian.heimes | 2008-02-23 18:52:07 +0100 (Sat, 23 Feb 2008) | 2 lines Issue #2051 and patch from Alexander Belopolsky: Permission for pyc and pyo files are inherited from the py file. ........ --- bcppcompiler.py | 2 +- command/bdist_dumb.py | 2 +- command/bdist_rpm.py | 1 - command/build_scripts.py | 2 +- command/install.py | 1 - command/install_headers.py | 1 - command/register.py | 2 +- filelist.py | 1 - tests/test_dist.py | 2 -- tests/test_sysconfig.py | 1 - unixccompiler.py | 1 - 11 files changed, 4 insertions(+), 12 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 1ab76c5981..c5e5cd2571 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -14,7 +14,7 @@ __revision__ = "$Id$" -import sys, os +import os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError, UnknownFileError diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index f89961769c..2d39922672 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -9,7 +9,7 @@ import os from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree, ensure_relative +from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import * from distutils.sysconfig import get_python_version from distutils import log diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 72f74f9c53..83efb8e043 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import sys, os -import glob from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform diff --git a/command/build_scripts.py b/command/build_scripts.py index 7b44264cc2..3ac5b0c0be 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -4,7 +4,7 @@ __revision__ = "$Id$" -import sys, os, re +import os, re from stat import ST_MODE from distutils import sysconfig from distutils.core import Command diff --git a/command/install.py b/command/install.py index b768663c69..e4ee680271 100644 --- a/command/install.py +++ b/command/install.py @@ -14,7 +14,6 @@ from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError -from glob import glob if sys.version < "2.2": WINDOWS_SCHEME = { diff --git a/command/install_headers.py b/command/install_headers.py index 7114eaf068..346daaad02 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -5,7 +5,6 @@ __revision__ = "$Id$" -import os from distutils.core import Command diff --git a/command/register.py b/command/register.py index d123d327de..40d9f20d1a 100644 --- a/command/register.py +++ b/command/register.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" -import sys, os, urllib2, getpass, urlparse +import os, string, urllib2, getpass, urlparse import io, ConfigParser from distutils.core import Command diff --git a/filelist.py b/filelist.py index 6506c30e6b..8eab0a95bf 100644 --- a/filelist.py +++ b/filelist.py @@ -8,7 +8,6 @@ import os, re import fnmatch -from glob import glob from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log diff --git a/tests/test_dist.py b/tests/test_dist.py index 23506b5dae..91acf45805 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -3,10 +3,8 @@ import distutils.cmd import distutils.dist import os -import shutil import io import sys -import tempfile import unittest from test.test_support import TESTFN diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 770b7c376f..d56f7e9bc5 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,7 +2,6 @@ from distutils import sysconfig import os -import sys import unittest from test.test_support import TESTFN diff --git a/unixccompiler.py b/unixccompiler.py index ee975e15fa..25a042d075 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -16,7 +16,6 @@ __revision__ = "$Id$" import os, sys -from copy import copy from distutils import sysconfig from distutils.dep_util import newer From 7eaf2c9799ea499603b40dbf7324c8adb60d8fad Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 6 Mar 2008 06:47:18 +0000 Subject: [PATCH 1950/8469] #1725737: ignore other VC directories other than CVS and SVN's too. --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 9b37f78982..961256c3ac 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -347,14 +347,14 @@ def prune_file_list (self): * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) - * any RCS, CVS and .svn directories + * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1) + self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) def write_manifest (self): From 5533c2dfe6f54d028b6164c6d6586b98c0f82d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 6 Mar 2008 07:14:26 +0000 Subject: [PATCH 1951/8469] Backport of r61263: #1725737: ignore other VC directories other than CVS and SVN's too. --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 3dfe6f21a7..b724a3b7d4 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -347,14 +347,14 @@ def prune_file_list (self): * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) - * any RCS, CVS and .svn directories + * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1) + self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) def write_manifest (self): From b41f4b8c277041837cda7062923b4cde662d5ebb Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 16 Mar 2008 00:07:10 +0000 Subject: [PATCH 1952/8469] Merged revisions 61239-61249,61252-61257,61260-61264,61269-61275,61278-61279,61285-61286,61288-61290,61298,61303-61305,61312-61314,61317,61329,61332,61344,61350-61351,61363-61376,61378-61379,61382-61383,61387-61388,61392,61395-61396,61402-61403 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r61239 | andrew.kuchling | 2008-03-05 01:44:41 +0100 (Wed, 05 Mar 2008) | 1 line Add more items; add fragmentary notes ........ r61240 | amaury.forgeotdarc | 2008-03-05 02:50:33 +0100 (Wed, 05 Mar 2008) | 13 lines Issue#2238: some syntax errors from *args or **kwargs expressions would give bogus error messages, because of untested exceptions:: >>> f(**g(1=2)) XXX undetected error Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable instead of the expected SyntaxError: keyword can't be an expression Will backport. ........ r61241 | neal.norwitz | 2008-03-05 06:10:48 +0100 (Wed, 05 Mar 2008) | 3 lines Remove the files/dirs after closing the DB so the tests work on Windows. Patch from Trent Nelson. Also simplified removing a file by using test_support. ........ r61242 | neal.norwitz | 2008-03-05 06:14:18 +0100 (Wed, 05 Mar 2008) | 3 lines Get this test to pass even when there is no sound card in the system. Patch from Trent Nelson. (I can't test this.) ........ r61243 | neal.norwitz | 2008-03-05 06:20:44 +0100 (Wed, 05 Mar 2008) | 3 lines Catch OSError when trying to remove a file in case removal fails. This should prevent a failure in tearDown masking any real test failure. ........ r61244 | neal.norwitz | 2008-03-05 06:38:06 +0100 (Wed, 05 Mar 2008) | 5 lines Make the timeout longer to give slow machines a chance to pass the test before timing out. This doesn't change the duration of the test under normal circumstances. This is targetted at fixing the spurious failures on the FreeBSD buildbot primarily. ........ r61245 | neal.norwitz | 2008-03-05 06:49:03 +0100 (Wed, 05 Mar 2008) | 1 line Tabs -> spaces ........ r61246 | neal.norwitz | 2008-03-05 06:50:20 +0100 (Wed, 05 Mar 2008) | 1 line Use -u urlfetch to run more tests ........ r61247 | neal.norwitz | 2008-03-05 06:51:20 +0100 (Wed, 05 Mar 2008) | 1 line test_smtplib sometimes reports leaks too, suppress it ........ r61248 | jeffrey.yasskin | 2008-03-05 07:19:56 +0100 (Wed, 05 Mar 2008) | 5 lines Fix test_socketserver on Windows after r61099 added several signal.alarm() calls (which don't exist on non-Unix platforms). Thanks to Trent Nelson for the report and patch. ........ r61249 | georg.brandl | 2008-03-05 08:10:35 +0100 (Wed, 05 Mar 2008) | 2 lines Fix some rst. ........ r61252 | thomas.heller | 2008-03-05 15:53:39 +0100 (Wed, 05 Mar 2008) | 2 lines News entry for yesterdays commit. ........ r61253 | thomas.heller | 2008-03-05 16:34:29 +0100 (Wed, 05 Mar 2008) | 3 lines Issue 1872: Changed the struct module typecode from 't' to '?', for compatibility with PEP3118. ........ r61254 | skip.montanaro | 2008-03-05 17:41:09 +0100 (Wed, 05 Mar 2008) | 4 lines Elaborate on the role of the altinstall target when installing multiple versions. ........ r61255 | georg.brandl | 2008-03-05 20:31:44 +0100 (Wed, 05 Mar 2008) | 2 lines #2239: PYTHONPATH delimiter is os.pathsep. ........ r61256 | raymond.hettinger | 2008-03-05 21:59:58 +0100 (Wed, 05 Mar 2008) | 1 line C implementation of itertools.permutations(). ........ r61257 | raymond.hettinger | 2008-03-05 22:04:32 +0100 (Wed, 05 Mar 2008) | 1 line Small code cleanup. ........ r61260 | martin.v.loewis | 2008-03-05 23:24:31 +0100 (Wed, 05 Mar 2008) | 2 lines cd PCbuild only after deleting all pyc files. ........ r61261 | raymond.hettinger | 2008-03-06 02:15:52 +0100 (Thu, 06 Mar 2008) | 1 line Add examples. ........ r61262 | andrew.kuchling | 2008-03-06 02:36:27 +0100 (Thu, 06 Mar 2008) | 1 line Add two items ........ r61263 | georg.brandl | 2008-03-06 07:47:18 +0100 (Thu, 06 Mar 2008) | 2 lines #1725737: ignore other VC directories other than CVS and SVN's too. ........ r61264 | martin.v.loewis | 2008-03-06 07:55:22 +0100 (Thu, 06 Mar 2008) | 4 lines Patch #2232: os.tmpfile might fail on Windows if the user has no permission to create files in the root directory. Will backport to 2.5. ........ r61269 | georg.brandl | 2008-03-06 08:19:15 +0100 (Thu, 06 Mar 2008) | 2 lines Expand on re.split behavior with captured expressions. ........ r61270 | georg.brandl | 2008-03-06 08:22:09 +0100 (Thu, 06 Mar 2008) | 2 lines Little clarification of assignments. ........ r61271 | georg.brandl | 2008-03-06 08:31:34 +0100 (Thu, 06 Mar 2008) | 2 lines Add isinstance/issubclass to tutorial. ........ r61272 | georg.brandl | 2008-03-06 08:34:52 +0100 (Thu, 06 Mar 2008) | 2 lines Add missing NEWS entry for r61263. ........ r61273 | georg.brandl | 2008-03-06 08:41:16 +0100 (Thu, 06 Mar 2008) | 2 lines #2225: return nonzero status code from py_compile if not all files could be compiled. ........ r61274 | georg.brandl | 2008-03-06 08:43:02 +0100 (Thu, 06 Mar 2008) | 2 lines #2220: handle matching failure more gracefully. ........ r61275 | georg.brandl | 2008-03-06 08:45:52 +0100 (Thu, 06 Mar 2008) | 2 lines Bug #2220: handle rlcompleter attribute match failure more gracefully. ........ r61278 | martin.v.loewis | 2008-03-06 14:49:47 +0100 (Thu, 06 Mar 2008) | 1 line Rely on x64 platform configuration when building _bsddb on AMD64. ........ r61279 | martin.v.loewis | 2008-03-06 14:50:28 +0100 (Thu, 06 Mar 2008) | 1 line Update db-4.4.20 build procedure. ........ r61285 | raymond.hettinger | 2008-03-06 21:52:01 +0100 (Thu, 06 Mar 2008) | 1 line More tests. ........ r61286 | raymond.hettinger | 2008-03-06 23:51:36 +0100 (Thu, 06 Mar 2008) | 1 line Issue 2246: itertools grouper object did not participate in GC (should be backported). ........ r61288 | raymond.hettinger | 2008-03-07 02:33:20 +0100 (Fri, 07 Mar 2008) | 1 line Tweak recipes and tests ........ r61289 | jeffrey.yasskin | 2008-03-07 07:22:15 +0100 (Fri, 07 Mar 2008) | 5 lines Progress on issue #1193577 by adding a polling .shutdown() method to SocketServers. The core of the patch was written by Pedro Werneck, but any bugs are mine. I've also rearranged the code for timeouts in order to avoid interfering with the shutdown poll. ........ r61290 | nick.coghlan | 2008-03-07 15:13:28 +0100 (Fri, 07 Mar 2008) | 1 line Speed up with statements by storing the __exit__ method on the stack instead of in a temp variable (bumps the magic number for pyc files) ........ r61298 | andrew.kuchling | 2008-03-07 22:09:23 +0100 (Fri, 07 Mar 2008) | 1 line Grammar fix ........ r61303 | georg.brandl | 2008-03-08 10:54:06 +0100 (Sat, 08 Mar 2008) | 2 lines #2253: fix continue vs. finally docs. ........ r61304 | marc-andre.lemburg | 2008-03-08 11:01:43 +0100 (Sat, 08 Mar 2008) | 3 lines Add new name for Mandrake: Mandriva. ........ r61305 | georg.brandl | 2008-03-08 11:05:24 +0100 (Sat, 08 Mar 2008) | 2 lines #1533486: fix types in refcount intro. ........ r61312 | facundo.batista | 2008-03-08 17:50:27 +0100 (Sat, 08 Mar 2008) | 5 lines Issue 1106316. post_mortem()'s parameter, traceback, is now optional: it defaults to the traceback of the exception that is currently being handled. ........ r61313 | jeffrey.yasskin | 2008-03-08 19:26:54 +0100 (Sat, 08 Mar 2008) | 2 lines Add tests for with and finally performance to pybench. ........ r61314 | jeffrey.yasskin | 2008-03-08 21:08:21 +0100 (Sat, 08 Mar 2008) | 2 lines Fix pybench for pythons < 2.6, tested back to 2.3. ........ r61317 | jeffrey.yasskin | 2008-03-08 22:35:15 +0100 (Sat, 08 Mar 2008) | 3 lines Well that was dumb. platform.python_implementation returns a function, not a string. ........ r61329 | georg.brandl | 2008-03-09 16:11:39 +0100 (Sun, 09 Mar 2008) | 2 lines #2249: document assertTrue and assertFalse. ........ r61332 | neal.norwitz | 2008-03-09 20:03:42 +0100 (Sun, 09 Mar 2008) | 4 lines Introduce a lock to fix a race condition which caused an exception in the test. Some buildbots were consistently failing (e.g., amd64). Also remove a couple of semi-colons. ........ r61344 | raymond.hettinger | 2008-03-11 01:19:07 +0100 (Tue, 11 Mar 2008) | 1 line Add recipe to docs. ........ r61350 | guido.van.rossum | 2008-03-11 22:18:06 +0100 (Tue, 11 Mar 2008) | 3 lines Fix the overflows in expandtabs(). "This time for sure!" (Exploit at request.) ........ r61351 | raymond.hettinger | 2008-03-11 22:37:46 +0100 (Tue, 11 Mar 2008) | 1 line Improve docs for itemgetter(). Show that it works with slices. ........ r61363 | georg.brandl | 2008-03-13 08:15:56 +0100 (Thu, 13 Mar 2008) | 2 lines #2265: fix example. ........ r61364 | georg.brandl | 2008-03-13 08:17:14 +0100 (Thu, 13 Mar 2008) | 2 lines #2270: fix typo. ........ r61365 | georg.brandl | 2008-03-13 08:21:41 +0100 (Thu, 13 Mar 2008) | 2 lines #1720705: add docs about import/threading interaction, wording by Nick. ........ r61366 | andrew.kuchling | 2008-03-13 12:07:35 +0100 (Thu, 13 Mar 2008) | 1 line Add class decorators ........ r61367 | raymond.hettinger | 2008-03-13 17:43:17 +0100 (Thu, 13 Mar 2008) | 1 line Add 2-to-3 support for the itertools moved to builtins or renamed. ........ r61368 | raymond.hettinger | 2008-03-13 17:43:59 +0100 (Thu, 13 Mar 2008) | 1 line Consistent tense. ........ r61369 | raymond.hettinger | 2008-03-13 20:03:51 +0100 (Thu, 13 Mar 2008) | 1 line Issue 2274: Add heapq.heappushpop(). ........ r61370 | raymond.hettinger | 2008-03-13 20:33:34 +0100 (Thu, 13 Mar 2008) | 1 line Simplify the nlargest() code using heappushpop(). ........ r61371 | brett.cannon | 2008-03-13 21:27:00 +0100 (Thu, 13 Mar 2008) | 4 lines Move test_thread over to unittest. Commits GHOP 237. Thanks Benjamin Peterson for the patch. ........ r61372 | brett.cannon | 2008-03-13 21:33:10 +0100 (Thu, 13 Mar 2008) | 4 lines Move test_tokenize to doctest. Done as GHOP 238 by Josip Dzolonga. ........ r61373 | brett.cannon | 2008-03-13 21:47:41 +0100 (Thu, 13 Mar 2008) | 4 lines Convert test_contains, test_crypt, and test_select to unittest. Patch from GHOP 294 by David Marek. ........ r61374 | brett.cannon | 2008-03-13 22:02:16 +0100 (Thu, 13 Mar 2008) | 4 lines Move test_gdbm to use unittest. Closes issue #1960. Thanks Giampaolo Rodola. ........ r61375 | brett.cannon | 2008-03-13 22:09:28 +0100 (Thu, 13 Mar 2008) | 4 lines Convert test_fcntl to unittest. Closes issue #2055. Thanks Giampaolo Rodola. ........ r61376 | raymond.hettinger | 2008-03-14 06:03:44 +0100 (Fri, 14 Mar 2008) | 1 line Leave heapreplace() unchanged. ........ r61378 | martin.v.loewis | 2008-03-14 14:56:09 +0100 (Fri, 14 Mar 2008) | 2 lines Patch #2284: add -x64 option to rt.bat. ........ r61379 | martin.v.loewis | 2008-03-14 14:57:59 +0100 (Fri, 14 Mar 2008) | 2 lines Use -x64 flag. ........ r61382 | brett.cannon | 2008-03-14 15:03:10 +0100 (Fri, 14 Mar 2008) | 2 lines Remove a bad test. ........ r61383 | mark.dickinson | 2008-03-14 15:23:37 +0100 (Fri, 14 Mar 2008) | 9 lines Issue 705836: Fix struct.pack(">f", 1e40) to behave consistently across platforms: it should now raise OverflowError on all platforms. (Previously it raised OverflowError only on non IEEE 754 platforms.) Also fix the (already existing) test for this behaviour so that it actually raises TestFailed instead of just referencing it. ........ r61387 | thomas.heller | 2008-03-14 22:06:21 +0100 (Fri, 14 Mar 2008) | 1 line Remove unneeded initializer. ........ r61388 | martin.v.loewis | 2008-03-14 22:19:28 +0100 (Fri, 14 Mar 2008) | 2 lines Run debug version, cd to PCbuild. ........ r61392 | georg.brandl | 2008-03-15 00:10:34 +0100 (Sat, 15 Mar 2008) | 2 lines Remove obsolete paragraph. #2288. ........ r61395 | georg.brandl | 2008-03-15 01:20:19 +0100 (Sat, 15 Mar 2008) | 2 lines Fix lots of broken links in the docs, found by Sphinx' external link checker. ........ r61396 | skip.montanaro | 2008-03-15 03:32:49 +0100 (Sat, 15 Mar 2008) | 1 line note that fork and forkpty raise OSError on failure ........ r61402 | skip.montanaro | 2008-03-15 17:04:45 +0100 (Sat, 15 Mar 2008) | 1 line add %f format to datetime - issue 1158 ........ r61403 | skip.montanaro | 2008-03-15 17:07:11 +0100 (Sat, 15 Mar 2008) | 2 lines . ........ --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 8289925785..b29fc64eca 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -325,14 +325,14 @@ def prune_file_list(self): * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) - * any RCS, CVS and .svn directories + * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1) + self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in From 7382bd51a39f785fee596182768da1b8deecf6c7 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Wed, 19 Mar 2008 06:28:24 +0000 Subject: [PATCH 1953/8469] Issue2290: Support x64 Windows builds that live in pcbuild/amd64. Without it, sysutils._python_build() returns the wrong directory, which causes the test_get_config_h_filename method in Lib/distutils/tests/test_sysconfig.py to fail. --- sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 506cf385b6..27a770b194 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -23,7 +23,8 @@ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) # Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9 +# live in project/PCBuild9. If we're dealing with an x64 Windows build, +# it'll live in project/PCbuild/amd64. project_base = os.path.dirname(os.path.abspath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) @@ -31,6 +32,10 @@ if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, os.path.pardir)) +# PC/AMD64 +if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use From 227cb3d385365b0716558d21804dbcf8d36b86ba Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 19 Mar 2008 21:50:51 +0000 Subject: [PATCH 1954/8469] Merged revisions 61538-61540,61556,61559-61560,61563,61565,61571,61575-61576,61580-61582,61586,61591,61593,61595,61605-61606,61613-61616,61618,61621-61623,61625,61627,61631-61634 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r61538 | steven.bethard | 2008-03-18 20:03:50 +0100 (Di, 18 Mär 2008) | 1 line cell_compare needs to return -2 instead of NULL. ........ r61539 | steven.bethard | 2008-03-18 20:04:32 +0100 (Di, 18 Mär 2008) | 1 line _have_soundcard() is a bad check for winsound.Beep, since you can have a soundcard but have the beep driver disabled. This revision basically disables the beep tests by wrapping them in a try/except. The Right Way To Do It is to come up with a _have_enabled_beep_driver() and use that. ........ r61540 | gregory.p.smith | 2008-03-18 20:05:32 +0100 (Di, 18 Mär 2008) | 8 lines Fix chown on 64-bit linux. It needed to take a long (64-bit on 64bit linux) as uid and gid input to accept values >=2**31 as valid while still accepting negative numbers to pass -1 to chown for "no change". Fixes issue1747858. This should be backported to release25-maint. ........ r61556 | steven.bethard | 2008-03-18 20:59:14 +0100 (Di, 18 Mär 2008) | 1 line Fix test_atexit so that it still passes when -3 is supplied. (It was catching the warning messages on stdio from using the reload() function.) ........ r61559 | neal.norwitz | 2008-03-18 21:30:38 +0100 (Di, 18 Mär 2008) | 1 line Import the test properly. This is especially important for py3k. ........ r61560 | gregory.p.smith | 2008-03-18 21:40:01 +0100 (Di, 18 Mär 2008) | 2 lines news entry for the chown fix ........ r61563 | brett.cannon | 2008-03-18 22:12:42 +0100 (Di, 18 Mär 2008) | 2 lines Ignore BIG5HKSCS-2004.TXT which is downloaded as part of a test. ........ r61565 | steven.bethard | 2008-03-18 22:30:13 +0100 (Di, 18 Mär 2008) | 1 line Have regrtest skip test_py3kwarn when the -3 flag is missing. ........ r61571 | gregory.p.smith | 2008-03-18 23:27:41 +0100 (Di, 18 Mär 2008) | 4 lines Add a test to make sure zlib.crc32 and binascii.crc32 return the same thing. Fix a buglet in binascii.crc32, the second optional argument could previously have a signedness mismatch with the C variable its going into. ........ r61575 | raymond.hettinger | 2008-03-19 00:22:29 +0100 (Mi, 19 Mär 2008) | 1 line Speed-up isinstance() for one easy case. ........ r61576 | raymond.hettinger | 2008-03-19 00:33:08 +0100 (Mi, 19 Mär 2008) | 1 line Issue: 2354: Add 3K warning for the cmp argument to list.sort() and sorted(). ........ r61580 | andrew.kuchling | 2008-03-19 02:05:35 +0100 (Mi, 19 Mär 2008) | 1 line Add Jeff Rush ........ r61581 | gregory.p.smith | 2008-03-19 02:38:35 +0100 (Mi, 19 Mär 2008) | 3 lines Mention that crc32 and adler32 are available in a different module (zlib). Some people look for them in hashlib. ........ r61582 | gregory.p.smith | 2008-03-19 02:46:10 +0100 (Mi, 19 Mär 2008) | 3 lines Use zlib's crc32 routine instead of binascii when available. zlib's is faster when compiled properly optimized and about the same speed otherwise. ........ r61586 | david.wolever | 2008-03-19 03:26:57 +0100 (Mi, 19 Mär 2008) | 1 line Added my name to ACKS ........ r61591 | gregory.p.smith | 2008-03-19 04:14:41 +0100 (Mi, 19 Mär 2008) | 5 lines Fix the struct module DeprecationWarnings that zipfile was triggering by removing all use of signed struct values. test_zipfile and test_zipfile64 pass. no more warnings. ........ r61593 | raymond.hettinger | 2008-03-19 04:56:59 +0100 (Mi, 19 Mär 2008) | 1 line Fix compiler warning. ........ r61595 | martin.v.loewis | 2008-03-19 05:39:13 +0100 (Mi, 19 Mär 2008) | 2 lines Issue #2400: Allow relative imports to "import *". ........ r61605 | martin.v.loewis | 2008-03-19 07:00:28 +0100 (Mi, 19 Mär 2008) | 2 lines Import relimport using a relative import. ........ r61606 | trent.nelson | 2008-03-19 07:28:24 +0100 (Mi, 19 Mär 2008) | 1 line Issue2290: Support x64 Windows builds that live in pcbuild/amd64. Without it, sysutils._python_build() returns the wrong directory, which causes the test_get_config_h_filename method in Lib/distutils/tests/test_sysconfig.py to fail. ........ r61613 | trent.nelson | 2008-03-19 08:45:19 +0100 (Mi, 19 Mär 2008) | 3 lines Refine the Visual Studio 2008 build solution in order to improve how we deal with external components, as well as fixing outstanding issues with Windows x64 build support. Introduce two new .vcproj files, _bsddb44.vcproj and sqlite3.vcproj, which replace the previous pre-link event scripts for _bsddb and _sqlite3 respectively. The new project files inherit from our property files as if they were any other Python module. This has numerous benefits. First, the components get built with exactly the same compiler flags and settings as the rest of Python. Second, it makes it much easier to debug problems in the external components when they're part of the build system. Third, they'll benefit from profile guided optimisation in the release builds, just like the rest of Python core. I've also introduced a slightly new pattern for managing externals in subversion. New components get checked in as -.x, where matches the exact vendor version string. After the initial import of the external component, the .x is tagged as .0 (i.e. tcl-8.4.18.x -> tcl-8.4.18.0). Some components may not need any tweaking, whereas there are others that might (tcl/tk fall into this bucket). In that case, the relevant modifications are made to the .x branch, which will be subsequently tagged as .1 (and then n+1 going forward) when they build successfully and all tests pass. Buildbots will be converted to rely on these explicit tags only, which makes it easy for us to switch them over to a new version as and when required. (Simple change to external(-amd64).bat: if we've bumped tcl to 8.4.18.1, change the .bat to rmdir 8.4.18.0 if it exists and check out a new .1 copy.) ........ r61614 | trent.nelson | 2008-03-19 08:56:39 +0100 (Mi, 19 Mär 2008) | 1 line Remove extraneous apostrophe and semi-colon from AdditionalIncludeDirectories. ........ r61615 | georg.brandl | 2008-03-19 08:56:40 +0100 (Mi, 19 Mär 2008) | 2 lines Remove footnote from versionchanged as it upsets LaTeX. ........ r61616 | georg.brandl | 2008-03-19 08:57:57 +0100 (Mi, 19 Mär 2008) | 2 lines Another one. ........ r61618 | trent.nelson | 2008-03-19 09:06:03 +0100 (Mi, 19 Mär 2008) | 1 line Fix the tcl-8.4.18.1 path and make sure we cd into the right directory when building tcl/tk. ........ r61621 | trent.nelson | 2008-03-19 10:23:08 +0100 (Mi, 19 Mär 2008) | 1 line Lets have another try at getting the Windows buildbots in a consistent state before rebuilding using the new process. ........ r61622 | eric.smith | 2008-03-19 13:09:55 +0100 (Mi, 19 Mär 2008) | 2 lines Use test.test_support.captured_stdout instead of a custom contextmanager. Thanks Nick Coghlan. ........ r61623 | eric.smith | 2008-03-19 13:15:10 +0100 (Mi, 19 Mär 2008) | 1 line Trivial typo. ........ r61625 | thomas.heller | 2008-03-19 17:10:57 +0100 (Mi, 19 Mär 2008) | 2 lines Checkout sqlite-source when it is not there. ........ r61627 | brett.cannon | 2008-03-19 17:50:13 +0100 (Mi, 19 Mär 2008) | 5 lines test_nis would fail if test.test_support.verbose was true but NIS was not set up on the machine. Closes issue2411. Thanks Michael Bishop. ........ r61631 | brett.cannon | 2008-03-19 18:37:43 +0100 (Mi, 19 Mär 2008) | 2 lines Use sys.py3kwarning instead of trying to trigger a Py3k-related warning. ........ r61632 | raymond.hettinger | 2008-03-19 18:45:19 +0100 (Mi, 19 Mär 2008) | 1 line Issue 2354: Fix-up compare warning. Patch contributed by Jeff Balogh. ........ r61633 | raymond.hettinger | 2008-03-19 18:58:59 +0100 (Mi, 19 Mär 2008) | 1 line The filter() function does support a None argument in Py3.0. ........ r61634 | raymond.hettinger | 2008-03-19 19:01:58 +0100 (Mi, 19 Mär 2008) | 1 line Remove itertools warnings I had added before the 2-to-3 handled the migration. ........ --- sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 39216a532f..d2b2c9a347 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -23,7 +23,8 @@ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) # Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9 +# live in project/PCBuild9. If we're dealing with an x64 Windows build, +# it'll live in project/PCbuild/amd64. project_base = os.path.dirname(os.path.abspath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) @@ -31,6 +32,10 @@ if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, os.path.pardir)) +# PC/AMD64 +if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use From dcf379739cccd5c8dd0d9a606ab52239e659d154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 22 Mar 2008 00:35:10 +0000 Subject: [PATCH 1955/8469] Add build_py_2to3. --- command/build_py.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index 63ced4b470..f39ffb878e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -383,3 +383,27 @@ def byte_compile(self, files): if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) + +class build_py_2to3(build_py): + def run(self): + from lib2to3.refactor import RefactoringTool + self.updated_files = [] + build_py.run(self) + class Options: + pass + o = Options() + o.doctests_only = False + o.fix = [] + o.list_fixes = [] + o.print_function = False + o.verbose = False + o.write = True + r = RefactoringTool(o) + r.refactor_args(self.updated_files) + + def build_module(self, module, module_file, package): + res = build_py.build_module(self, module, module_file, package) + if res[1]: + # file was copied + self.updated_files.append(res[0]) + return res From 143e8f4fe669de9fb9e1ed23be226c7a4b6b410a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 22 Mar 2008 22:07:43 +0000 Subject: [PATCH 1956/8469] Invoke byte-compilation after running 2to3. --- command/build_py.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index f39ffb878e..09f6d2331e 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -386,9 +386,17 @@ def byte_compile(self, files): class build_py_2to3(build_py): def run(self): - from lib2to3.refactor import RefactoringTool self.updated_files = [] - build_py.run(self) + + # Base class code + if self.py_modules: + self.build_modules() + if self.packages: + self.build_packages() + self.build_package_data() + + # 2to3 + from lib2to3.refactor import RefactoringTool class Options: pass o = Options() @@ -401,6 +409,9 @@ class Options: r = RefactoringTool(o) r.refactor_args(self.updated_files) + # Remaining base class code + self.byte_compile(self.get_outputs(include_bytecode=0)) + def build_module(self, module, module_file, package): res = build_py.build_module(self, module, module_file, package) if res[1]: From 3405aa3e09e63da9af1a4ca90c4ae1c5bf9dcc7d Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 2 Apr 2008 23:33:27 +0000 Subject: [PATCH 1957/8469] release.py induced and manual editing steps for 3.0a4. --- __init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0c3d939dc3..b583e397e2 100644 --- a/__init__.py +++ b/__init__.py @@ -18,4 +18,7 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.6.0" + +#--start constants-- +__version__ = "3.0a4" +#--end constants-- From b2c84945a0906325790271d2d8108fbe81483b70 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 3 Apr 2008 04:10:02 +0000 Subject: [PATCH 1958/8469] Updating for 2.6a2 --- __init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8c954c2238..d0dd03a3c5 100644 --- a/__init__.py +++ b/__init__.py @@ -20,4 +20,7 @@ # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.6.0" + +#--start constants-- +__version__ = "2.6a2" +#--end constants-- From fb68e5c8dd08660e12a945ace7487a7b2b4daff1 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 4 Apr 2008 05:41:30 +0000 Subject: [PATCH 1959/8469] - Issue #2385: distutils.core.run_script() makes __file__ available, so the controlled environment will more closely mirror the typical script environment. This supports setup.py scripts that refer to data files. --- core.py | 3 ++- tests/test_core.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 tests/test_core.py diff --git a/core.py b/core.py index c40dd0a7aa..640d6b5955 100644 --- a/core.py +++ b/core.py @@ -210,8 +210,9 @@ def run_setup (script_name, script_args=None, stop_after="run"): _setup_stop_after = stop_after save_argv = sys.argv - g = {} + g = {'__file__': script_name} l = {} + os.chdir(os.path.dirname(script_name) or os.curdir) try: try: sys.argv[0] = script_name diff --git a/tests/test_core.py b/tests/test_core.py new file mode 100644 index 0000000000..6de58d9284 --- /dev/null +++ b/tests/test_core.py @@ -0,0 +1,40 @@ +"""Tests for distutils.core.""" + +import StringIO +import distutils.core +import os +import test.test_support +import unittest + + +# setup script that uses __file__ +setup_using___file__ = """\ + +__file__ + +from distutils.core import setup +setup() +""" + + +class CoreTestCase(unittest.TestCase): + + def tearDown(self): + os.remove(test.test_support.TESTFN) + + def write_setup(self, text): + return fn + + def test_run_setup_provides_file(self): + # Make sure the script can use __file__; if that's missing, the test + # setup.py script will raise NameError. + fn = test.test_support.TESTFN + open(fn, "w").write(setup_using___file__) + distutils.core.run_setup(fn) + + +def test_suite(): + return unittest.makeSuite(CoreTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 2e06d2e918a1f2d6e7c8f87853dee6f04e86d6d9 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 4 Apr 2008 11:31:14 +0000 Subject: [PATCH 1960/8469] my previous change did what I said it should not: it changed the current directory to the directory in which the setup.py script lived (which made __file__ wrong) fixed, with test that the script is run in the current directory of the caller --- core.py | 1 - tests/test_core.py | 54 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/core.py b/core.py index 640d6b5955..32b9026999 100644 --- a/core.py +++ b/core.py @@ -212,7 +212,6 @@ def run_setup (script_name, script_args=None, stop_after="run"): save_argv = sys.argv g = {'__file__': script_name} l = {} - os.chdir(os.path.dirname(script_name) or os.curdir) try: try: sys.argv[0] = script_name diff --git a/tests/test_core.py b/tests/test_core.py index 6de58d9284..4356c21295 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3,6 +3,8 @@ import StringIO import distutils.core import os +import shutil +import sys import test.test_support import unittest @@ -16,21 +18,61 @@ setup() """ +setup_prints_cwd = """\ + +import os +print os.getcwd() + +from distutils.core import setup +setup() +""" + class CoreTestCase(unittest.TestCase): + def setUp(self): + self.old_stdout = sys.stdout + self.cleanup_testfn() + def tearDown(self): - os.remove(test.test_support.TESTFN) + sys.stdout = self.old_stdout + self.cleanup_testfn() + + def cleanup_testfn(self): + path = test.test_support.TESTFN + if os.path.isfile(path): + os.remove(path) + elif os.path.isdir(path): + shutil.rmtree(path) - def write_setup(self, text): - return fn + def write_setup(self, text, path=test.test_support.TESTFN): + open(path, "w").write(text) + return path def test_run_setup_provides_file(self): # Make sure the script can use __file__; if that's missing, the test # setup.py script will raise NameError. - fn = test.test_support.TESTFN - open(fn, "w").write(setup_using___file__) - distutils.core.run_setup(fn) + distutils.core.run_setup( + self.write_setup(setup_using___file__)) + + def test_run_setup_uses_current_dir(self): + # This tests that the setup script is run with the current directory + # as it's own current directory; this was temporarily broken by a + # previous patch when TESTFN did not use the current directory. + sys.stdout = StringIO.StringIO() + cwd = os.getcwd() + + # Create a directory and write the setup.py file there: + os.mkdir(test.test_support.TESTFN) + setup_py = os.path.join(test.test_support.TESTFN, "setup.py") + distutils.core.run_setup( + self.write_setup(setup_prints_cwd, path=setup_py)) + + output = sys.stdout.getvalue() + open("/dev/tty", "w").write("\n\n%r\n\n\n" % (output,)) + if output.endswith("\n"): + output = output[:-1] + self.assertEqual(cwd, output) def test_suite(): From 5ad3f56a92652c3996fb97ab7d923ca7e3647fe5 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 4 Apr 2008 11:38:51 +0000 Subject: [PATCH 1961/8469] stupid, stupid, stupid! --- tests/test_core.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index 4356c21295..55d2d5df7e 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -69,7 +69,6 @@ def test_run_setup_uses_current_dir(self): self.write_setup(setup_prints_cwd, path=setup_py)) output = sys.stdout.getvalue() - open("/dev/tty", "w").write("\n\n%r\n\n\n" % (output,)) if output.endswith("\n"): output = output[:-1] self.assertEqual(cwd, output) From dc94cc0477c3ef464ffc9cd41fac155898e72402 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 5 Apr 2008 04:47:45 +0000 Subject: [PATCH 1962/8469] Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464,61466-61467,61469-61470,61476-61477,61479,61481-61482,61485,61487,61490,61493-61494,61497,61499-61502,61505-61506,61508,61511-61514,61519,61521-61522,61530-61531,61533-61537,61541-61555,61557-61558,61561-61562,61566-61569,61572-61574,61578-61579,61583-61584,61588-61589,61592,61594,61598-61601,61603-61604,61607-61612,61617,61619-61620,61624,61626,61628-61630,61635-61638,61640-61643,61645,61648,61653-61655,61659-61662,61664,61666,61668-61671,61673,61675,61679-61680,61682,61685-61686,61689-61695,61697-61699,61701-61703,61706,61710,61713,61717,61723,61726-61730,61736,61738,61740,61742,61745-61752,61754-61760,61762-61764,61768,61770-61772,61774-61775,61784-61787,61789-61792,61794-61795,61797-61806,61808-61809,61811-61812,61814-61819,61824,61826-61833,61835-61840,61843-61845,61848,61850,61854-61862,61865-61866,61868,61872-61873,61876-61877,61883-61888,61890-61891,61893-61899,61901-61903,61905-61912,61914,61917,61920-61921,61927,61930,61932-61934,61939,61941-61942,61944-61951,61955,61960-61963,61980,61982-61983,61991,61994-61996,62001-62003,62008-62010,62016-62017,62022,62024,62027,62031-62034,62041,62045-62046,62055-62058,62060-62066,62068-62074,62076-62079,62081-62083,62086-62089,62092-62094,62098,62101,62104,62106-62109,62115-62122,62124-62125,62127-62128,62130,62132,62134-62137,62139-62142,62144,62146-62148,62150-62152,62155-62161 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62127 | trent.nelson | 2008-04-03 08:39:17 -0700 (Thu, 03 Apr 2008) | 1 line Remove the building of Berkeley DB step; _bsddb44.vcproj takes care of this for us now. ........ r62136 | amaury.forgeotdarc | 2008-04-03 16:07:55 -0700 (Thu, 03 Apr 2008) | 9 lines #1733757: the interpreter would hang on shutdown, if the function set by sys.settrace calls threading.currentThread. The correction somewhat improves the code, but it was close. Many thanks to the "with" construct, which turns python code into C calls. I wonder if it is not better to sys.settrace(None) just after running the __main__ module and before finalization. ........ r62141 | jeffrey.yasskin | 2008-04-03 21:51:19 -0700 (Thu, 03 Apr 2008) | 5 lines Doh! os.read() raises an OSError, not an IOError when it's interrupted. And fix some flakiness in test_itimer_prof, which could detect that the timer had reached 0 before the signal arrived announcing that fact. ........ r62142 | fred.drake | 2008-04-03 22:41:30 -0700 (Thu, 03 Apr 2008) | 4 lines - Issue #2385: distutils.core.run_script() makes __file__ available, so the controlled environment will more closely mirror the typical script environment. This supports setup.py scripts that refer to data files. ........ r62147 | fred.drake | 2008-04-04 04:31:14 -0700 (Fri, 04 Apr 2008) | 6 lines my previous change did what I said it should not: it changed the current directory to the directory in which the setup.py script lived (which made __file__ wrong) fixed, with test that the script is run in the current directory of the caller ........ r62148 | fred.drake | 2008-04-04 04:38:51 -0700 (Fri, 04 Apr 2008) | 2 lines stupid, stupid, stupid! ........ r62150 | jeffrey.yasskin | 2008-04-04 09:48:19 -0700 (Fri, 04 Apr 2008) | 2 lines Oops again. EINTR is in errno, not signal. ........ r62158 | andrew.kuchling | 2008-04-04 19:42:20 -0700 (Fri, 04 Apr 2008) | 1 line Minor edits ........ r62159 | andrew.kuchling | 2008-04-04 19:47:07 -0700 (Fri, 04 Apr 2008) | 1 line Markup fix; explain what interval timers do; typo fix ........ r62160 | andrew.kuchling | 2008-04-04 20:38:39 -0700 (Fri, 04 Apr 2008) | 1 line Various edits ........ r62161 | neal.norwitz | 2008-04-04 21:26:31 -0700 (Fri, 04 Apr 2008) | 9 lines Prevent test_sqlite from hanging on older versions of sqlite. The problem is that when trying to do the second insert, sqlite seems to sleep for a very long time. Here is the output from strace: read(6, "SQLite format 3\0\4\0\1\1\0@ \0\0\0\1\0\0\0\0"..., 1024) = 1024 nanosleep({4294, 966296000}, I don't know which version this was fixed in, but 3.2.1 definitely fails. ........ --- core.py | 2 +- tests/test_core.py | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 tests/test_core.py diff --git a/core.py b/core.py index 0490e6378b..a4c5e18033 100644 --- a/core.py +++ b/core.py @@ -207,7 +207,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): _setup_stop_after = stop_after save_argv = sys.argv - g = {} + g = {'__file__': script_name} l = {} try: try: diff --git a/tests/test_core.py b/tests/test_core.py new file mode 100644 index 0000000000..8e274dd40d --- /dev/null +++ b/tests/test_core.py @@ -0,0 +1,81 @@ +"""Tests for distutils.core.""" + +import io +import distutils.core +import os +import shutil +import sys +import test.test_support +import unittest + + +# setup script that uses __file__ +setup_using___file__ = """\ + +__file__ + +from distutils.core import setup +setup() +""" + +setup_prints_cwd = """\ + +import os +print(os.getcwd()) + +from distutils.core import setup +setup() +""" + + +class CoreTestCase(unittest.TestCase): + + def setUp(self): + self.old_stdout = sys.stdout + self.cleanup_testfn() + + def tearDown(self): + sys.stdout = self.old_stdout + self.cleanup_testfn() + + def cleanup_testfn(self): + path = test.test_support.TESTFN + if os.path.isfile(path): + os.remove(path) + elif os.path.isdir(path): + shutil.rmtree(path) + + def write_setup(self, text, path=test.test_support.TESTFN): + open(path, "w").write(text) + return path + + def test_run_setup_provides_file(self): + # Make sure the script can use __file__; if that's missing, the test + # setup.py script will raise NameError. + distutils.core.run_setup( + self.write_setup(setup_using___file__)) + + def test_run_setup_uses_current_dir(self): + # This tests that the setup script is run with the current directory + # as it's own current directory; this was temporarily broken by a + # previous patch when TESTFN did not use the current directory. + sys.stdout = io.StringIO() + cwd = os.getcwd() + + # Create a directory and write the setup.py file there: + os.mkdir(test.test_support.TESTFN) + setup_py = os.path.join(test.test_support.TESTFN, "setup.py") + distutils.core.run_setup( + self.write_setup(setup_prints_cwd, path=setup_py)) + + output = sys.stdout.getvalue() + if output.endswith("\n"): + output = output[:-1] + self.assertEqual(cwd, output) + + +def test_suite(): + return unittest.makeSuite(CoreTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From bbe02c7a83e5792122e71937f50787a18245f27b Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sat, 5 Apr 2008 23:39:15 +0000 Subject: [PATCH 1963/8469] Fix test_distutils to not fail when running 'make test' from a Python build directory that is not the source directory (ie, one created using '/path/to/source/configure'.) Leaves this test very slightly degraded in that particular case, compared to the build-in-sourcedir case, but that case isn't a particularly strong test either: neither test the actual path that will be used after installing. There isn't a particularly good way to test this, and a poor test beats a failing test. --- tests/test_sysconfig.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index d56f7e9bc5..aa1187e77b 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -19,7 +19,27 @@ def test_get_python_lib(self): # test for pythonxx.lib? def test_get_python_inc(self): - inc_dir = sysconfig.get_python_inc() + # The check for srcdir is copied from Python's setup.py, + # and is necessary to make this test pass when building + # Python in a directory other than the source directory. + (srcdir,) = sysconfig.get_config_vars('srcdir') + if not srcdir: + inc_dir = sysconfig.get_python_inc() + else: + # This test is not really a proper test: when building + # Python from source, even in the same directory, + # we won't be testing the same thing as when running + # distutils' tests on an installed Python. Nevertheless, + # let's try to do our best: if we are running Python's + # unittests from a build directory that is not the source + # directory, the normal inc_dir will exist, it will just not + # contain anything of interest. + inc_dir = sysconfig.get_python_inc() + self.assert_(os.path.isdir(inc_dir)) + # Now test the source location, to make sure Python.h does + # exist. + inc_dir = os.path.join(os.getcwd(), srcdir, 'Include') + inc_dir = os.path.normpath(inc_dir) self.assert_(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") self.assert_(os.path.isfile(python_h), python_h) From 6b17a395e92863f9bb6e93e067d487ed42c0de9b Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Mon, 7 Apr 2008 00:25:59 +0000 Subject: [PATCH 1964/8469] Merged revisions 62179 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62179 | thomas.wouters | 2008-04-06 01:39:15 +0200 (Sun, 06 Apr 2008) | 10 lines Fix test_distutils to not fail when running 'make test' from a Python build directory that is not the source directory (ie, one created using '/path/to/source/configure'.) Leaves this test very slightly degraded in that particular case, compared to the build-in-sourcedir case, but that case isn't a particularly strong test either: neither test the actual path that will be used after installing. There isn't a particularly good way to test this, and a poor test beats a failing test. ........ --- tests/test_sysconfig.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index d56f7e9bc5..aa1187e77b 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -19,7 +19,27 @@ def test_get_python_lib(self): # test for pythonxx.lib? def test_get_python_inc(self): - inc_dir = sysconfig.get_python_inc() + # The check for srcdir is copied from Python's setup.py, + # and is necessary to make this test pass when building + # Python in a directory other than the source directory. + (srcdir,) = sysconfig.get_config_vars('srcdir') + if not srcdir: + inc_dir = sysconfig.get_python_inc() + else: + # This test is not really a proper test: when building + # Python from source, even in the same directory, + # we won't be testing the same thing as when running + # distutils' tests on an installed Python. Nevertheless, + # let's try to do our best: if we are running Python's + # unittests from a build directory that is not the source + # directory, the normal inc_dir will exist, it will just not + # contain anything of interest. + inc_dir = sysconfig.get_python_inc() + self.assert_(os.path.isdir(inc_dir)) + # Now test the source location, to make sure Python.h does + # exist. + inc_dir = os.path.join(os.getcwd(), srcdir, 'Include') + inc_dir = os.path.normpath(inc_dir) self.assert_(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") self.assert_(os.path.isfile(python_h), python_h) From 9351875b842427a4cf795d32ecec02dbd992cff7 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 7 Apr 2008 01:53:39 +0000 Subject: [PATCH 1965/8469] Issue #2513: enable 64bit cross compilation on windows. --- command/bdist.py | 6 ++- command/bdist_msi.py | 20 ++++++---- command/bdist_wininst.py | 28 +++++++++---- command/build.py | 18 ++++++++- command/build_ext.py | 30 ++++++++++++-- command/install.py | 9 +++++ command/wininst-9.0-amd64.exe | Bin 0 -> 76288 bytes msvc9compiler.py | 72 ++++++++++++++++++++-------------- msvccompiler.py | 2 +- util.py | 4 +- 10 files changed, 135 insertions(+), 54 deletions(-) create mode 100644 command/wininst-9.0-amd64.exe diff --git a/command/bdist.py b/command/bdist.py index d6897d2d09..ca3da74c06 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -97,7 +97,10 @@ def initialize_options (self): def finalize_options (self): # have to finalize 'plat_name' before 'bdist_base' if self.plat_name is None: - self.plat_name = get_platform() + if self.skip_build: + self.plat_name = get_platform() + else: + self.plat_name = self.get_finalized_command('build').plat_name # 'bdist_base' -- parent of per-built-distribution-format # temporary directories (eg. we'll probably have @@ -121,7 +124,6 @@ def finalize_options (self): # finalize_options() - def run (self): # Figure out which sub-commands we need to run. diff --git a/command/bdist_msi.py b/command/bdist_msi.py index a4014525b7..f94d9579d2 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -9,11 +9,11 @@ import sys, os from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError +from distutils.util import get_platform from distutils import log import msilib from msilib import schema, sequence, text @@ -87,6 +87,9 @@ class bdist_msi (Command): user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), @@ -116,6 +119,7 @@ class bdist_msi (Command): def initialize_options (self): self.bdist_dir = None + self.plat_name = None self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 @@ -139,7 +143,10 @@ def finalize_options (self): else: self.target_version = short_version - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ) if self.pre_install_script: raise DistutilsOptionError, "the pre-install-script feature is not yet implemented" @@ -181,7 +188,7 @@ def run (self): if not target_version: assert self.skip_build, "Should have already checked this" target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) + plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, 'lib' + plat_specifier) @@ -633,8 +640,7 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses - plat = get_platform() - installer_name = os.path.join(self.dist_dir, - "%s.%s-py%s.msi" % - (fullname, plat, self.target_version)) + base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, + self.target_version) + installer_name = os.path.join(self.dist_dir, base_name) return installer_name diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b0691fb823..02542afbd3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -21,6 +21,9 @@ class bdist_wininst (Command): user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), @@ -54,6 +57,7 @@ class bdist_wininst (Command): def initialize_options (self): self.bdist_dir = None + self.plat_name = None self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 @@ -82,7 +86,10 @@ def finalize_options (self): " option must be specified" % (short_version,) self.target_version = short_version - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ) if self.install_script: for script in self.distribution.scripts: @@ -110,6 +117,7 @@ def run (self): install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = 0 + install.plat_name = self.plat_name install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files @@ -127,7 +135,7 @@ def run (self): if not target_version: assert self.skip_build, "Should have already checked this" target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) + plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, 'lib' + plat_specifier) @@ -285,11 +293,11 @@ def get_installer_filename(self, fullname): # if we create an installer for a specific python version, # it's better to include this in the name installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) + "%s.%s-py%s.exe" % + (fullname, self.plat_name, self.target_version)) else: installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) + "%s.%s.exe" % (fullname, self.plat_name)) return installer_name # get_installer_filename() @@ -312,9 +320,9 @@ def get_exe_bytes (self): bv = get_build_version() else: if self.target_version < "2.4": - bv = "6" + bv = 6.0 else: - bv = "7.1" + bv = 7.1 else: # for current version - use authoritative check. bv = get_build_version() @@ -323,6 +331,10 @@ def get_exe_bytes (self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - filename = os.path.join(directory, "wininst-%.1f.exe" % bv) + if self.plat_name == 'win32': + sfix = '' + else: + sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' + filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() # class bdist_wininst diff --git a/command/build.py b/command/build.py index bca031f730..7462e9348f 100644 --- a/command/build.py +++ b/command/build.py @@ -8,6 +8,7 @@ import sys, os from distutils.core import Command +from distutils.errors import DistutilsOptionError from distutils.util import get_platform @@ -34,6 +35,9 @@ class build (Command): "build directory for scripts"), ('build-temp=', 't', "temporary build directory"), + ('plat-name=', 'p', + "platform name to build for, if supported " + "(default: %s)" % get_platform()), ('compiler=', 'c', "specify the compiler type"), ('debug', 'g', @@ -61,13 +65,25 @@ def initialize_options (self): self.build_temp = None self.build_scripts = None self.compiler = None + self.plat_name = None self.debug = None self.force = 0 self.executable = None def finalize_options (self): - plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) + if self.plat_name is None: + self.plat_name = get_platform() + else: + # plat-name only supported for windows (other platforms are + # supported via ./configure flags, if at all). Avoid misleading + # other platforms. + if os.name != 'nt': + raise DistutilsOptionError( + "--plat-name only supported on Windows (try " + "using './configure --help' on your platform)") + + plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3]) # Make it so Python 2.x and Python 2.x with --with-pydebug don't # share the same build directories. Doing so confuses the build diff --git a/command/build_ext.py b/command/build_ext.py index 3042fe0223..bf5ad7e00b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -15,6 +15,7 @@ from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils.util import get_platform from distutils import log if os.name == 'nt': @@ -60,6 +61,9 @@ class build_ext (Command): "directory for compiled extension modules"), ('build-temp=', 't', "directory for temporary files (build by-products)"), + ('plat-name=', 'p', + "platform name to cross-compile for, if supported " + "(default: %s)" % get_platform()), ('inplace', 'i', "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules"), @@ -101,6 +105,7 @@ class build_ext (Command): def initialize_options (self): self.extensions = None self.build_lib = None + self.plat_name = None self.build_temp = None self.inplace = 0 self.package = None @@ -127,7 +132,9 @@ def finalize_options (self): ('build_temp', 'build_temp'), ('compiler', 'compiler'), ('debug', 'debug'), - ('force', 'force')) + ('force', 'force'), + ('plat_name', 'plat_name'), + ) if self.package is None: self.package = self.distribution.ext_package @@ -171,6 +178,9 @@ def finalize_options (self): # for Release and Debug builds. # also Python's library directory must be appended to library_dirs if os.name == 'nt': + # the 'libs' directory is for binary installs - we assume that + # must be the *native* platform. But we don't really support + # cross-compiling via a binary install anyway, so we let it go. self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) if self.debug: self.build_temp = os.path.join(self.build_temp, "Debug") @@ -181,8 +191,17 @@ def finalize_options (self): # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) if MSVC_VERSION == 9: - self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCbuild')) + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = '' + else: + # win-amd64 or win-ia64 + suffix = self.plat_name[4:] + new_lib = os.path.join(sys.exec_prefix, 'PCbuild') + if suffix: + new_lib = os.path.join(new_lib, suffix) + self.library_dirs.append(new_lib) + elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS8.0', 'win32release')) @@ -275,6 +294,11 @@ def run (self): dry_run=self.dry_run, force=self.force) customize_compiler(self.compiler) + # If we are cross-compiling, init the compiler now (if we are not + # cross-compiling, init would not hurt, but people may rely on + # late initialization of compiler even if they shouldn't...) + if os.name == 'nt' and self.plat_name != get_platform(): + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in diff --git a/command/install.py b/command/install.py index 0d39b91cc3..33a1212b0a 100644 --- a/command/install.py +++ b/command/install.py @@ -16,6 +16,7 @@ from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root +from distutils.util import get_platform from distutils.errors import DistutilsOptionError if sys.version < "2.2": @@ -503,6 +504,14 @@ def run (self): # Obviously have to build before we can install if not self.skip_build: self.run_command('build') + # If we built for any other platform, we can't install. + build_plat = self.distribution.get_command_obj('build').plat_name + # check warn_dir - it is a clue that the 'install' is happening + # internally, and not to sys.path, so we don't check the platform + # matches what we are running. + if self.warn_dir and build_plat != get_platform(): + raise DistutilsPlatformError("Can't install when " + "cross-compiling") # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe new file mode 100644 index 0000000000000000000000000000000000000000..c99ede4b3fcebe39b1a1e33283307e12c42b7b2e GIT binary patch literal 76288 zcmeFa3v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7%aTxJR#X$Qt7rO-YP$(XQENdShMf$m@;KA_4SKKEgWBockEm?>4UE73Y?<(P_ zSy|Y_kX2w#R=x&4A(`I;N=r>iOB*#dS?7}0*0GBS`z;X6$HME|kVTdCIz4i0N-HZY z*xzD?TpUoF-7>Z`y>whjsx5V_ExnWl6WkxUrx~L!J_a9MjMi8G#(aaxlsj!=VWEs% INt;an1b{yP$^ZZW literal 0 HcmV?d00001 diff --git a/msvc9compiler.py b/msvc9compiler.py index 828d7fbf7a..8b1cf9a910 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -22,6 +22,7 @@ from distutils.ccompiler import (CCompiler, gen_preprocess_options, gen_lib_options) from distutils import log +from distutils.util import get_platform import _winreg @@ -38,13 +39,15 @@ VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" NET_BASE = r"Software\Microsoft\.NETFramework" -ARCHS = {'DEFAULT' : 'x86', - 'intel' : 'x86', 'x86' : 'x86', - 'amd64' : 'x64', 'x64' : 'x64', - 'itanium' : 'ia64', 'ia64' : 'ia64', - } -# The globals VERSION, ARCH, MACROS and VC_ENV are defined later +# A map keyed by get_platform() return values to values accepted by +# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is +# the param to cross-compile on x86 targetting amd64.) +PLAT_TO_VCVARS = { + 'win32' : 'x86', + 'win-amd64' : 'amd64', + 'win-ia64' : 'ia64', +} class Reg: """Helper class to read values from the registry @@ -176,23 +179,6 @@ def get_build_version(): # else we don't know what version of the compiler this is return None -def get_build_architecture(): - """Return the processor architecture. - - Possible results are "x86" or "amd64". - """ - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return "x86" - j = sys.version.find(")", i) - sysarch = sys.version[i+len(prefix):j].lower() - arch = ARCHS.get(sysarch, None) - if arch is None: - return ARCHS['DEFAULT'] - else: - return arch - def normalize_and_reduce_paths(paths): """Return a list of normalized paths with duplicates removed. @@ -251,6 +237,7 @@ def query_vcvarsall(version, arch="x86"): if vcvarsall is None: raise IOError("Unable to find vcvarsall.bat") + log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -281,9 +268,7 @@ def query_vcvarsall(version, arch="x86"): VERSION = get_build_version() if VERSION < 8.0: raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) -ARCH = get_build_architecture() # MACROS = MacroExpander(VERSION) -VC_ENV = query_vcvarsall(VERSION, ARCH) class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -318,13 +303,25 @@ class MSVCCompiler(CCompiler) : def __init__(self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) self.__version = VERSION - self.__arch = ARCH self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS self.__path = [] + # target platform (.plat_name is consistent with 'bdist') + self.plat_name = None + self.__arch = None # deprecated name self.initialized = False - def initialize(self): + def initialize(self, plat_name=None): + # multi-init means we would need to check platform same each time... + assert not self.initialized, "don't init multiple times" + if plat_name is None: + plat_name = get_platform() + # sanity check for platforms to prevent obscure errors later. + ok_plats = 'win32', 'win-amd64', 'win-ia64' + if plat_name not in ok_plats: + raise DistutilsPlatformError("--plat-name must be one of %s" % + (ok_plats,)) + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter @@ -334,9 +331,24 @@ def initialize(self): self.rc = "rc.exe" self.mc = "mc.exe" else: - self.__paths = VC_ENV['path'].split(os.pathsep) - os.environ['lib'] = VC_ENV['lib'] - os.environ['include'] = VC_ENV['include'] + # On x86, 'vcvars32.bat amd64' creates an env that doesn't work; + # to cross compile, you use 'x86_amd64'. + # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross + # compile use 'x86' (ie, it runs the x86 compiler directly) + # No idea how itanium handles this, if at all. + if plat_name == get_platform() or plat_name == 'win32': + # native build or cross-compile to win32 + plat_spec = PLAT_TO_VCVARS[plat_name] + else: + # cross compile from win32 -> some 64bit + plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ + PLAT_TO_VCVARS[plat_name] + + vc_env = query_vcvarsall(VERSION, plat_spec) + + self.__paths = vc_env['path'].split(os.pathsep) + os.environ['lib'] = vc_env['lib'] + os.environ['include'] = vc_env['include'] if len(self.__paths) == 0: raise DistutilsPlatformError("Python was built with %s, " diff --git a/msvccompiler.py b/msvccompiler.py index f3acb53477..30a9fc6f22 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -656,5 +656,5 @@ def set_path_env_var(self, name): log.debug("Importing new compiler from distutils.msvc9compiler") OldMSVCCompiler = MSVCCompiler from distutils.msvc9compiler import MSVCCompiler - from distutils.msvc9compiler import get_build_architecture + # get_build_architecture not really relevant now we support cross-compile from distutils.msvc9compiler import MacroExpander diff --git a/util.py b/util.py index deb9a0a0f1..69d90cffb8 100644 --- a/util.py +++ b/util.py @@ -30,7 +30,7 @@ def get_platform (): irix64-6.2 Windows will return one of: - win-x86_64 (64bit Windows on x86_64 (AMD64)) + win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) @@ -45,7 +45,7 @@ def get_platform (): j = string.find(sys.version, ")", i) look = sys.version[i+len(prefix):j].lower() if look=='amd64': - return 'win-x86_64' + return 'win-amd64' if look=='itanium': return 'win-ia64' return sys.platform From f39783d33eeae201072044971535a43415e3e78f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 9 Apr 2008 08:37:03 +0000 Subject: [PATCH 1966/8469] Merged revisions 62194,62197-62198,62204-62205,62214,62219-62221,62227,62229-62231,62233-62235,62237-62239 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62194 | jeffrey.yasskin | 2008-04-07 01:04:28 +0200 (Mon, 07 Apr 2008) | 7 lines Add enough debugging information to diagnose failures where the HandlerBException is ignored, and fix one such problem, where it was thrown during the __del__ method of the previous Popen object. We may want to find a better way of printing verbose information so it's not spammy when the test passes. ........ r62197 | mark.hammond | 2008-04-07 03:53:39 +0200 (Mon, 07 Apr 2008) | 2 lines Issue #2513: enable 64bit cross compilation on windows. ........ r62198 | mark.hammond | 2008-04-07 03:59:40 +0200 (Mon, 07 Apr 2008) | 2 lines correct heading underline for new "Cross-compiling on Windows" section ........ r62204 | gregory.p.smith | 2008-04-07 08:33:21 +0200 (Mon, 07 Apr 2008) | 4 lines Use the new PyFile_IncUseCount & PyFile_DecUseCount calls appropriatly within the standard library. These modules use PyFile_AsFile and later release the GIL while operating on the previously returned FILE*. ........ r62205 | mark.summerfield | 2008-04-07 09:39:23 +0200 (Mon, 07 Apr 2008) | 4 lines changed "2500 components" to "several thousand" since the number keeps growning:-) ........ r62214 | georg.brandl | 2008-04-07 20:51:59 +0200 (Mon, 07 Apr 2008) | 2 lines #2525: update timezone info examples in the docs. ........ r62219 | andrew.kuchling | 2008-04-08 01:57:07 +0200 (Tue, 08 Apr 2008) | 1 line Write PEP 3127 section; add items ........ r62220 | andrew.kuchling | 2008-04-08 01:57:21 +0200 (Tue, 08 Apr 2008) | 1 line Typo fix ........ r62221 | andrew.kuchling | 2008-04-08 03:33:10 +0200 (Tue, 08 Apr 2008) | 1 line Typographical fix: 32bit -> 32-bit, 64bit -> 64-bit ........ r62227 | andrew.kuchling | 2008-04-08 23:22:53 +0200 (Tue, 08 Apr 2008) | 1 line Add items ........ r62229 | amaury.forgeotdarc | 2008-04-08 23:27:42 +0200 (Tue, 08 Apr 2008) | 7 lines Issue2564: Prevent a hang in "import test.autotest", which runs the entire test suite as a side-effect of importing the module. - in test_capi, a thread tried to import other modules - re.compile() imported sre_parse again on every call. ........ r62230 | amaury.forgeotdarc | 2008-04-08 23:51:57 +0200 (Tue, 08 Apr 2008) | 2 lines Prevent an error when inspect.isabstract() is called with something else than a new-style class. ........ r62231 | amaury.forgeotdarc | 2008-04-09 00:07:05 +0200 (Wed, 09 Apr 2008) | 8 lines Issue 2408: remove the _types module It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType), when they can easily be obtained with python code. These expressions even work with Jython. I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 ) at least this change makes it simpler. ........ r62233 | amaury.forgeotdarc | 2008-04-09 01:10:07 +0200 (Wed, 09 Apr 2008) | 2 lines Add a NEWS entry for previous checkin ........ r62234 | trent.nelson | 2008-04-09 01:47:30 +0200 (Wed, 09 Apr 2008) | 37 lines - Issue #2550: The approach used by client/server code for obtaining ports to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue. ........ r62235 | gregory.p.smith | 2008-04-09 02:25:17 +0200 (Wed, 09 Apr 2008) | 3 lines Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive. It tried to allocate negative or zero memory. That fails. ........ r62237 | trent.nelson | 2008-04-09 02:34:53 +0200 (Wed, 09 Apr 2008) | 1 line Fix typo with regards to self.PORT shadowing class variables with the same name. ........ r62238 | andrew.kuchling | 2008-04-09 03:08:32 +0200 (Wed, 09 Apr 2008) | 1 line Add items ........ r62239 | jerry.seutter | 2008-04-09 07:07:58 +0200 (Wed, 09 Apr 2008) | 1 line Changed test so it no longer runs as a side effect of importing. ........ --- command/bdist.py | 5 ++- command/bdist_msi.py | 20 ++++++---- command/bdist_wininst.py | 28 +++++++++---- command/build.py | 18 ++++++++- command/build_ext.py | 30 ++++++++++++-- command/install.py | 9 +++++ command/wininst-9.0-amd64.exe | Bin 0 -> 76288 bytes msvc9compiler.py | 72 ++++++++++++++++++++-------------- msvccompiler.py | 2 +- util.py | 4 +- 10 files changed, 135 insertions(+), 53 deletions(-) create mode 100644 command/wininst-9.0-amd64.exe diff --git a/command/bdist.py b/command/bdist.py index 69c1b28ff2..e3b047c66f 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -91,7 +91,10 @@ def initialize_options(self): def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' if self.plat_name is None: - self.plat_name = get_platform() + if self.skip_build: + self.plat_name = get_platform() + else: + self.plat_name = self.get_finalized_command('build').plat_name # 'bdist_base' -- parent of per-built-distribution-format # temporary directories (eg. we'll probably have diff --git a/command/bdist_msi.py b/command/bdist_msi.py index d313a5082f..aab89cd609 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -9,11 +9,11 @@ import sys, os from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError +from distutils.util import get_platform from distutils import log import msilib from msilib import schema, sequence, text @@ -87,6 +87,9 @@ class bdist_msi(Command): user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), @@ -116,6 +119,7 @@ class bdist_msi(Command): def initialize_options(self): self.bdist_dir = None + self.plat_name = None self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 @@ -139,7 +143,10 @@ def finalize_options(self): else: self.target_version = short_version - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ) if self.pre_install_script: raise DistutilsOptionError( @@ -180,7 +187,7 @@ def run(self): if not target_version: assert self.skip_build, "Should have already checked this" target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) + plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, 'lib' + plat_specifier) @@ -633,8 +640,7 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses - plat = get_platform() - installer_name = os.path.join(self.dist_dir, - "%s.%s-py%s.msi" % - (fullname, plat, self.target_version)) + base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, + self.target_version) + installer_name = os.path.join(self.dist_dir, base_name) return installer_name diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 2d75a38f74..bf8d022ae8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -19,6 +19,9 @@ class bdist_wininst(Command): user_options = [('bdist-dir=', None, "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), @@ -52,6 +55,7 @@ class bdist_wininst(Command): def initialize_options(self): self.bdist_dir = None + self.plat_name = None self.keep_temp = 0 self.no_target_compile = 0 self.no_target_optimize = 0 @@ -78,7 +82,10 @@ def finalize_options(self): " option must be specified" % (short_version,)) self.target_version = short_version - self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ) if self.install_script: for script in self.distribution.scripts: @@ -104,6 +111,7 @@ def run(self): install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = 0 + install.plat_name = self.plat_name install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files @@ -121,7 +129,7 @@ def run(self): if not target_version: assert self.skip_build, "Should have already checked this" target_version = sys.version[0:3] - plat_specifier = ".%s-%s" % (get_platform(), target_version) + plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, 'lib' + plat_specifier) @@ -267,11 +275,11 @@ def get_installer_filename(self, fullname): # if we create an installer for a specific python version, # it's better to include this in the name installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) + "%s.%s-py%s.exe" % + (fullname, self.plat_name, self.target_version)) else: installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) + "%s.%s.exe" % (fullname, self.plat_name)) return installer_name def get_exe_bytes(self): @@ -293,9 +301,9 @@ def get_exe_bytes(self): bv = get_build_version() else: if self.target_version < "2.4": - bv = "6" + bv = 6.0 else: - bv = "7.1" + bv = 7.1 else: # for current version - use authoritative check. bv = get_build_version() @@ -304,5 +312,9 @@ def get_exe_bytes(self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - filename = os.path.join(directory, "wininst-%.1f.exe" % bv) + if self.plat_name == 'win32': + sfix = '' + else: + sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' + filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() diff --git a/command/build.py b/command/build.py index 4fe95b0cfb..9c2667cfd2 100644 --- a/command/build.py +++ b/command/build.py @@ -6,6 +6,7 @@ import sys, os from distutils.core import Command +from distutils.errors import DistutilsOptionError from distutils.util import get_platform @@ -32,6 +33,9 @@ class build(Command): "build directory for scripts"), ('build-temp=', 't', "temporary build directory"), + ('plat-name=', 'p', + "platform name to build for, if supported " + "(default: %s)" % get_platform()), ('compiler=', 'c', "specify the compiler type"), ('debug', 'g', @@ -59,12 +63,24 @@ def initialize_options(self): self.build_temp = None self.build_scripts = None self.compiler = None + self.plat_name = None self.debug = None self.force = 0 self.executable = None def finalize_options(self): - plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) + if self.plat_name is None: + self.plat_name = get_platform() + else: + # plat-name only supported for windows (other platforms are + # supported via ./configure flags, if at all). Avoid misleading + # other platforms. + if os.name != 'nt': + raise DistutilsOptionError( + "--plat-name only supported on Windows (try " + "using './configure --help' on your platform)") + + plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3]) # Make it so Python 2.x and Python 2.x with --with-pydebug don't # share the same build directories. Doing so confuses the build diff --git a/command/build_ext.py b/command/build_ext.py index ff84bca7a0..e01121986c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -12,6 +12,7 @@ from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils.util import get_platform from distutils import log if os.name == 'nt': @@ -57,6 +58,9 @@ class build_ext(Command): "directory for compiled extension modules"), ('build-temp=', 't', "directory for temporary files (build by-products)"), + ('plat-name=', 'p', + "platform name to cross-compile for, if supported " + "(default: %s)" % get_platform()), ('inplace', 'i', "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules"), @@ -98,6 +102,7 @@ class build_ext(Command): def initialize_options(self): self.extensions = None self.build_lib = None + self.plat_name = None self.build_temp = None self.inplace = 0 self.package = None @@ -124,7 +129,9 @@ def finalize_options(self): ('build_temp', 'build_temp'), ('compiler', 'compiler'), ('debug', 'debug'), - ('force', 'force')) + ('force', 'force'), + ('plat_name', 'plat_name'), + ) if self.package is None: self.package = self.distribution.ext_package @@ -167,6 +174,9 @@ def finalize_options(self): # for Release and Debug builds. # also Python's library directory must be appended to library_dirs if os.name == 'nt': + # the 'libs' directory is for binary installs - we assume that + # must be the *native* platform. But we don't really support + # cross-compiling via a binary install anyway, so we let it go. self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) if self.debug: self.build_temp = os.path.join(self.build_temp, "Debug") @@ -177,8 +187,17 @@ def finalize_options(self): # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) if MSVC_VERSION == 9: - self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCbuild')) + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = '' + else: + # win-amd64 or win-ia64 + suffix = self.plat_name[4:] + new_lib = os.path.join(sys.exec_prefix, 'PCbuild') + if suffix: + new_lib = os.path.join(new_lib, suffix) + self.library_dirs.append(new_lib) + elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS8.0', 'win32release')) @@ -267,6 +286,11 @@ def run(self): dry_run=self.dry_run, force=self.force) customize_compiler(self.compiler) + # If we are cross-compiling, init the compiler now (if we are not + # cross-compiling, init would not hurt, but people may rely on + # late initialization of compiler even if they shouldn't...) + if os.name == 'nt' and self.plat_name != get_platform(): + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in diff --git a/command/install.py b/command/install.py index e4ee680271..50884c3337 100644 --- a/command/install.py +++ b/command/install.py @@ -13,6 +13,7 @@ from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root +from distutils.util import get_platform from distutils.errors import DistutilsOptionError if sys.version < "2.2": @@ -485,6 +486,14 @@ def run(self): # Obviously have to build before we can install if not self.skip_build: self.run_command('build') + # If we built for any other platform, we can't install. + build_plat = self.distribution.get_command_obj('build').plat_name + # check warn_dir - it is a clue that the 'install' is happening + # internally, and not to sys.path, so we don't check the platform + # matches what we are running. + if self.warn_dir and build_plat != get_platform(): + raise DistutilsPlatformError("Can't install when " + "cross-compiling") # Run all sub-commands (at least those that need to be run) for cmd_name in self.get_sub_commands(): diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe new file mode 100644 index 0000000000000000000000000000000000000000..c99ede4b3fcebe39b1a1e33283307e12c42b7b2e GIT binary patch literal 76288 zcmeFa3v^UPwm;lSr%8as6NQ6O5gO=dv=O5LC(xjMpqreQ4vD-~l*BwBV@P7s%|lQV zJJB>{`&;PggIh_aM+_~%i zzqP(^tuG6z>eOS`u3dZY+O@0B>D*f$HJME&Qv&{Ln#t6JnEsp`{x?CK$#mYx=JQOi z4BRoQDbBlN)SM+{HP))?%Ei@%ORYtP6%~~}>m4Q5YJY{btitNbn{8cMSzIzMC1sG! z0Nr@olb3Cu-0hG3zpJLgzYWiOD(>{}qMby^Fp`^)oL7ZtVB?{t9M}{KK zk2CG32|DYq_V*^!@U!y%<>OkDNwxfVjd8w`6+RT-6+l1;(bzGLzJFF=HLkk2&{t?O z&AT5ZYw@4zHR6AtKPT8{oL68fcC4AN{I*`*t!8Epq##5Q=c1Tk~I?wFjA+{2X!`TKvP*2F-WA8j{Zkw2*4?ip|=-=pa?R zy@94z+vhy7Db+t}!+Ls<%h4#-;NasX6KZcDw$}D-HUstcIH}=IP197d(3Yu+a$B}4 zd^TqjK~e)7t&1?MAB;TJaZ7nLgMI=`oRK;l#;f4)In~~chxx#9o*p_K> zXKit3wW#9F4wo&X7DXVDRgM>>uhC?H=(KnuP!Oy{2K* ze~2y*bm#j9iB3)a#UmzDbh_Gbz*nS-eH%!jXkDP)jK1A53Vr%S-&U?E-_+Z${|bU~ zDTtZOwCT`k(?#Umw;_=MXSGE3B0&{7mz0avC9Qwl_6ww>^$*zq&*TlcY)(!7Gf?w} zyf!C4tD!kIC(m67`AE1Mj{1`{c{vT>kA!Uo5hrVpJESDIbgF#xF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ask%(xH1i=L@3Z z5njN7?<@=d=z!gw6n421GWDM!{p~K8ho3M0tRLhXf^7?|aQvs{my6q$Vn34I^If4F zx+)cOI?pIP<6q8<%=ZrEP7tCaPrkyv*gU*fJBRhyd3pGvQ=+uR;`k!nJ6>Zp|D8>1q1x(p9C zba;5l_cB{cm+GOW+h(cZ4NsyS9gd7@+rk=fv01T`sTPZ-Wj41r(?2_VF{<+7@l;!_ ztrFi)$8|z-i96R(>s(-~PS({_7%aTxJR#X$Qt7rO-YP$(XQENdShMf$m@;KA_4SKKEgWBockEm?>4UE73Y?<(P_ zSy|Y_kX2w#R=x&4A(`I;N=r>iOB*#dS?7}0*0GBS`z;X6$HME|kVTdCIz4i0N-HZY z*xzD?TpUoF-7>Z`y>whjsx5V_ExnWl6WkxUrx~L!J_a9MjMi8G#(aaxlsj!=VWEs% INt;an1b{yP$^ZZW literal 0 HcmV?d00001 diff --git a/msvc9compiler.py b/msvc9compiler.py index 828d7fbf7a..8b1cf9a910 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -22,6 +22,7 @@ from distutils.ccompiler import (CCompiler, gen_preprocess_options, gen_lib_options) from distutils import log +from distutils.util import get_platform import _winreg @@ -38,13 +39,15 @@ VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" NET_BASE = r"Software\Microsoft\.NETFramework" -ARCHS = {'DEFAULT' : 'x86', - 'intel' : 'x86', 'x86' : 'x86', - 'amd64' : 'x64', 'x64' : 'x64', - 'itanium' : 'ia64', 'ia64' : 'ia64', - } -# The globals VERSION, ARCH, MACROS and VC_ENV are defined later +# A map keyed by get_platform() return values to values accepted by +# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is +# the param to cross-compile on x86 targetting amd64.) +PLAT_TO_VCVARS = { + 'win32' : 'x86', + 'win-amd64' : 'amd64', + 'win-ia64' : 'ia64', +} class Reg: """Helper class to read values from the registry @@ -176,23 +179,6 @@ def get_build_version(): # else we don't know what version of the compiler this is return None -def get_build_architecture(): - """Return the processor architecture. - - Possible results are "x86" or "amd64". - """ - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return "x86" - j = sys.version.find(")", i) - sysarch = sys.version[i+len(prefix):j].lower() - arch = ARCHS.get(sysarch, None) - if arch is None: - return ARCHS['DEFAULT'] - else: - return arch - def normalize_and_reduce_paths(paths): """Return a list of normalized paths with duplicates removed. @@ -251,6 +237,7 @@ def query_vcvarsall(version, arch="x86"): if vcvarsall is None: raise IOError("Unable to find vcvarsall.bat") + log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -281,9 +268,7 @@ def query_vcvarsall(version, arch="x86"): VERSION = get_build_version() if VERSION < 8.0: raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION) -ARCH = get_build_architecture() # MACROS = MacroExpander(VERSION) -VC_ENV = query_vcvarsall(VERSION, ARCH) class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, @@ -318,13 +303,25 @@ class MSVCCompiler(CCompiler) : def __init__(self, verbose=0, dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) self.__version = VERSION - self.__arch = ARCH self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS self.__path = [] + # target platform (.plat_name is consistent with 'bdist') + self.plat_name = None + self.__arch = None # deprecated name self.initialized = False - def initialize(self): + def initialize(self, plat_name=None): + # multi-init means we would need to check platform same each time... + assert not self.initialized, "don't init multiple times" + if plat_name is None: + plat_name = get_platform() + # sanity check for platforms to prevent obscure errors later. + ok_plats = 'win32', 'win-amd64', 'win-ia64' + if plat_name not in ok_plats: + raise DistutilsPlatformError("--plat-name must be one of %s" % + (ok_plats,)) + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter @@ -334,9 +331,24 @@ def initialize(self): self.rc = "rc.exe" self.mc = "mc.exe" else: - self.__paths = VC_ENV['path'].split(os.pathsep) - os.environ['lib'] = VC_ENV['lib'] - os.environ['include'] = VC_ENV['include'] + # On x86, 'vcvars32.bat amd64' creates an env that doesn't work; + # to cross compile, you use 'x86_amd64'. + # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross + # compile use 'x86' (ie, it runs the x86 compiler directly) + # No idea how itanium handles this, if at all. + if plat_name == get_platform() or plat_name == 'win32': + # native build or cross-compile to win32 + plat_spec = PLAT_TO_VCVARS[plat_name] + else: + # cross compile from win32 -> some 64bit + plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ + PLAT_TO_VCVARS[plat_name] + + vc_env = query_vcvarsall(VERSION, plat_spec) + + self.__paths = vc_env['path'].split(os.pathsep) + os.environ['lib'] = vc_env['lib'] + os.environ['include'] = vc_env['include'] if len(self.__paths) == 0: raise DistutilsPlatformError("Python was built with %s, " diff --git a/msvccompiler.py b/msvccompiler.py index 3b4e9c9d2d..71146dcfe3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -638,5 +638,5 @@ def set_path_env_var(self, name): log.debug("Importing new compiler from distutils.msvc9compiler") OldMSVCCompiler = MSVCCompiler from distutils.msvc9compiler import MSVCCompiler - from distutils.msvc9compiler import get_build_architecture + # get_build_architecture not really relevant now we support cross-compile from distutils.msvc9compiler import MacroExpander diff --git a/util.py b/util.py index 917f1d0b93..72039a7e6a 100644 --- a/util.py +++ b/util.py @@ -30,7 +30,7 @@ def get_platform (): irix64-6.2 Windows will return one of: - win-x86_64 (64bit Windows on x86_64 (AMD64)) + win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) @@ -45,7 +45,7 @@ def get_platform (): j = sys.version.find(")", i) look = sys.version[i+len(prefix):j].lower() if look == 'amd64': - return 'win-x86_64' + return 'win-amd64' if look == 'itanium': return 'win-ia64' return sys.platform From 6d3e6470c91a0dd98c587edd9ef353906a981a17 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Fri, 2 May 2008 12:48:15 +0000 Subject: [PATCH 1967/8469] #2581: Vista UAC/elevation support for bdist_wininst --- command/bdist_wininst.py | 7 +++++++ command/wininst-6.0.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes command/wininst-9.0-amd64.exe | Bin 76288 -> 77312 bytes command/wininst-9.0.exe | Bin 65536 -> 66048 bytes msvc9compiler.py | 25 ++++++++++++++++++++++++- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 02542afbd3..7c43e7459e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -50,6 +50,10 @@ class bdist_wininst (Command): "Fully qualified filename of a script to be run before " "any files are installed. This script need not be in the " "distribution"), + ('user-access-control=', None, + "specify Vista's UAC handling - 'none'/default=no " + "handling, 'auto'=use UAC if target Python installed for " + "all users, 'force'=always use UAC"), ] boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', @@ -68,6 +72,7 @@ def initialize_options (self): self.skip_build = 0 self.install_script = None self.pre_install_script = None + self.user_access_control = None # initialize_options() @@ -220,6 +225,8 @@ def escape(s): lines.append("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append("target_version=%s" % self.target_version) + if self.user_access_control: + lines.append("user_access_control=%s" % self.user_access_control) title = self.title or self.distribution.get_fullname() lines.append("title=%s" % escape(title)) diff --git a/command/wininst-6.0.exe b/command/wininst-6.0.exe index bd715250e780b37e94996e33820070987bcc77fd..10c981993ba2c2e3a977db8ded201a46d529749d 100644 GIT binary patch delta 19227 zcmeHue|!_ymG8(BAc8>xBoH7#fB+L4B9NWfkxc})iGxidBU{EX7)XFjR2Qg`2rZB? zmDD08>XHu0(v)_g(3ZAzmn@XHO#(JH2qx9yst$K4~q$&w3{}8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;=Bmuq;iERZu2iOI85pW1_6wm@V3%CUME8toPk1qfNF|iR~0o(;h2iyyo2Uq}D z40r&r67VQs9iRsA4B$Dy&jBw24grn=S^#GO^mjK@Vgrl-Bmuf!;JB-ROMuE2JPrYV z0eB9u1yBPB04f2C0R?~zfDJGVpapb7HJ1Tz0$KpC0O;?F-5hrX&<5bRgAZ0O9w4@E zFpB#(Sj5X4u1;F9$;FibynsSL79b5^2Iv5txEA(`pKjb{nrU@Ew&uy|hrY`PtTVH- zGpEf;Pj`s_v1yB@n45QS(o-*6L$`PrHx$0r!X~2$Ic^ASptzdj_Wn$%)3X3=_BCL( zPuqSlT#mM-ea03-I_-~h+<`uLt!T>t-o`#{0cea{!wutB>>~2Y-*ni*WpVS*M*e@F z`hVM}9{9iKQwKlaeOh(!%{_nBh!=i&b?9)_@`oOK5ZR`>s(RI9YgRpa@Z7%K{^Blm ziD)>mQ#Dik&4H2Q>9=ru54t!icP7g1D7OG=s4l*LAY~}^-qw21^xHD6W;J~H;otSc lugt~ZE13t6zA{=XZaEe_`024`jY@?rWbojFLs~yh`5*iDeg*&l diff --git a/command/wininst-7.1.exe b/command/wininst-7.1.exe index ee35713940177c0eb8e3cf0435d7a6a9287a27fc..6779aa8d4c1b0d5fb37255f1eea211d92ea6942a 100644 GIT binary patch delta 24325 zcmeHve|%KcweOi9gaHCGXaWHuj5ug&f<`B?iIdoYWI`kf9++f8%8w9D@GuPtP0mCV z@FdPm%XpYuya(^~_S$!~(3abJKUWLI_@k1Lm;|nE`JoV%w$aP&J263Hr4VTJyzkm) zh6J_t_P#&fKMy~9_OG?qUVE*z*Is+=6I%yNtpldrc?R1P`2|vLd)t{EZ+{eur-l>X z2|a@P*0+8hl34z|&~}y&u=-~wo@e!+T=|6M4JUNC&yWWI_uVTOLtByWc>BZ95F7V= zr~&yWzkZ&Lf8yi|Y}_Zm{srYXgjQ{OK%mLF*gxLGais<`_v&x1EK@QJsmAhpWx2sO zqx%JpJ4i4C9Jl&97 zt->Des8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kfx)3`$L;f>B6LAAL|PZ*zC07N6P~Fa4;W4-V5jn*2k7V z(YFIf^pyWudcJNT(-Vbmji93Icn$J7$SaY@ATLI4M7|X{T{*IlPez`Cd^Yk(twznLBII6$#3)Xzj+ueYL}JqMCdBaTsa3W(gb*9mG+FP~7aYRVYsi26TZ CX=EAz diff --git a/msvc9compiler.py b/msvc9compiler.py index 8b1cf9a910..c8d52c4237 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -594,14 +594,25 @@ def link(self, # needed! Make sure they are generated in the temporary build # directory. Since they have different names for debug and release # builds, they can go into the same directory. + build_temp = os.path.dirname(objects[0]) if export_symbols is not None: (dll_name, dll_ext) = os.path.splitext( os.path.basename(output_filename)) implib_file = os.path.join( - os.path.dirname(objects[0]), + build_temp, self.library_filename(dll_name)) ld_args.append ('/IMPLIB:' + implib_file) + # Embedded manifests are recommended - see MSDN article titled + # "How to: Embed a Manifest Inside a C/C++ Application" + # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) + # Ask the linker to generate the manifest in the temp dir, so + # we can embed it later. + temp_manifest = os.path.join( + build_temp, + os.path.basename(output_filename) + ".manifest") + ld_args.append('/MANIFESTFILE:' + temp_manifest) + if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -613,6 +624,18 @@ def link(self, except DistutilsExecError as msg: raise LinkError(msg) + # embed the manifest + # XXX - this is somewhat fragile - if mt.exe fails, distutils + # will still consider the DLL up-to-date, but it will not have a + # manifest. Maybe we should link to a temp file? OTOH, that + # implies a build environment error that shouldn't go undetected. + mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) + try: + self.spawn(['mt.exe', '-nologo', '-manifest', + temp_manifest, out_arg]) + except DistutilsExecError as msg: + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) From 2da7eca35531226358da395c9cd1aacaa81620e9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 4 May 2008 22:42:01 +0000 Subject: [PATCH 1968/8469] Merged revisions 62425-62429,62434-62436,62441,62444,62446-62448,62450-62455,62463,62465-62466,62469,62474,62476-62478,62480,62485,62492,62497-62498,62500,62507,62513-62514,62516,62521,62531,62535,62545-62546,62548-62551,62553-62559,62569,62574,62577,62593,62595,62604-62606,62608,62616,62626-62627,62636,62638,62644-62645,62647-62648,62651-62653,62656,62661,62663,62680,62686-62687,62696,62699-62703,62711 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r62425 | andrew.kuchling | 2008-04-21 03:45:57 +0200 (Mon, 21 Apr 2008) | 1 line Comment typo ................ r62426 | mark.dickinson | 2008-04-21 03:55:50 +0200 (Mon, 21 Apr 2008) | 2 lines Silence 'r may be used uninitialized' compiler warning. ................ r62427 | andrew.kuchling | 2008-04-21 04:08:00 +0200 (Mon, 21 Apr 2008) | 1 line Markup fix ................ r62428 | andrew.kuchling | 2008-04-21 04:08:13 +0200 (Mon, 21 Apr 2008) | 1 line Wording changes ................ r62429 | andrew.kuchling | 2008-04-21 04:14:24 +0200 (Mon, 21 Apr 2008) | 1 line Add various items ................ r62434 | thomas.heller | 2008-04-21 15:46:55 +0200 (Mon, 21 Apr 2008) | 1 line Fix typo. ................ r62435 | david.goodger | 2008-04-21 16:40:22 +0200 (Mon, 21 Apr 2008) | 1 line corrections ("reStructuredText" is one word) ................ r62436 | david.goodger | 2008-04-21 16:43:33 +0200 (Mon, 21 Apr 2008) | 1 line capitalization ................ r62441 | gregory.p.smith | 2008-04-21 19:46:40 +0200 (Mon, 21 Apr 2008) | 2 lines explicitly flush after the ... since there wasn't a newline ................ r62444 | jeroen.ruigrok | 2008-04-21 22:15:39 +0200 (Mon, 21 Apr 2008) | 2 lines Windows x64 also falls under VER_PLATFORM_WIN32_NT. ................ r62446 | gregory.p.smith | 2008-04-21 23:31:08 +0200 (Mon, 21 Apr 2008) | 3 lines If sys.stdin is not a tty, fall back to default_getpass after printing a warning instead of failing with a termios.error. ................ r62447 | mark.dickinson | 2008-04-22 00:32:24 +0200 (Tue, 22 Apr 2008) | 8 lines test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot, apparently because tanh(-0.) loses the sign of zero on that platform. If true, this is a bug in FreeBSD. Added a configure test to verify this. I still need to figure out how best to deal with this failure. ................ r62448 | amaury.forgeotdarc | 2008-04-22 00:35:30 +0200 (Tue, 22 Apr 2008) | 7 lines Issue 2665: On Windows, sys.stderr does not contain a valid file when running without a console. It seems to work, but will fail at the first flush. This causes IDLE to crash when too many warnings are printed. Will backport. ................ r62450 | benjamin.peterson | 2008-04-22 00:57:00 +0200 (Tue, 22 Apr 2008) | 2 lines Fix Sphinx warnings ................ r62451 | mark.dickinson | 2008-04-22 02:54:27 +0200 (Tue, 22 Apr 2008) | 3 lines Make configure test for tanh(-0.) == -0. committed in r62447 actually work. (The test wasn't properly linked with libm. Sigh.) ................ r62452 | benjamin.peterson | 2008-04-22 04:16:03 +0200 (Tue, 22 Apr 2008) | 2 lines Various io doc updates ................ r62453 | neal.norwitz | 2008-04-22 07:07:47 +0200 (Tue, 22 Apr 2008) | 1 line Add Thomas Lee ................ r62454 | gregory.p.smith | 2008-04-22 10:08:41 +0200 (Tue, 22 Apr 2008) | 8 lines Major improvements: * Default to using /dev/tty for the password prompt and input before falling back to sys.stdin and sys.stderr. * Use sys.stderr instead of sys.stdout. * print the 'password may be echoed' warning to stream used to display the prompt rather than always sys.stderr. * warn() with GetPassWarning when input may be echoed. ................ r62455 | gregory.p.smith | 2008-04-22 10:11:33 +0200 (Tue, 22 Apr 2008) | 2 lines update the getpass entry ................ r62463 | amaury.forgeotdarc | 2008-04-22 23:14:41 +0200 (Tue, 22 Apr 2008) | 5 lines Issue #2670: urllib2.build_opener() failed when two handlers derive the same default base class. Will backport. ................ r62465 | skip.montanaro | 2008-04-23 00:45:09 +0200 (Wed, 23 Apr 2008) | 3 lines Factor in documentation changes from issue 1753732. ................ r62466 | gregory.p.smith | 2008-04-23 03:06:42 +0200 (Wed, 23 Apr 2008) | 2 lines syntax fixup ................ r62469 | benjamin.peterson | 2008-04-23 22:38:06 +0200 (Wed, 23 Apr 2008) | 2 lines #2673 Fix example typo in optparse docs ................ r62474 | martin.v.loewis | 2008-04-24 11:50:50 +0200 (Thu, 24 Apr 2008) | 2 lines Add Guilherme Polo. ................ r62476 | martin.v.loewis | 2008-04-24 15:16:36 +0200 (Thu, 24 Apr 2008) | 3 lines Remove Py_Refcnt, Py_Type, Py_Size, as they were added only for backwards compatibility, yet 2.5 did not have them at all. ................ r62477 | martin.v.loewis | 2008-04-24 15:17:24 +0200 (Thu, 24 Apr 2008) | 2 lines Fix typo. ................ r62478 | martin.v.loewis | 2008-04-24 15:18:03 +0200 (Thu, 24 Apr 2008) | 2 lines Add Jesus Cea. ................ r62480 | amaury.forgeotdarc | 2008-04-24 20:07:05 +0200 (Thu, 24 Apr 2008) | 4 lines Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0). This happened only when 8 is the first digit. Credits go to Lukas Meuser. ................ r62485 | amaury.forgeotdarc | 2008-04-24 22:10:26 +0200 (Thu, 24 Apr 2008) | 5 lines Disable gc when running test_trace, or we may record the __del__ of collected objects. See http://mail.python.org/pipermail/python-checkins/2008-April/068633.html the extra events perfectly match several calls to socket._fileobject.__del__() ................ r62492 | neal.norwitz | 2008-04-25 05:40:17 +0200 (Fri, 25 Apr 2008) | 1 line Fix typo (now -> no) ................ r62497 | armin.rigo | 2008-04-25 11:35:18 +0200 (Fri, 25 Apr 2008) | 2 lines A new crasher. ................ r62498 | thomas.heller | 2008-04-25 17:44:16 +0200 (Fri, 25 Apr 2008) | 1 line Add from_buffer and from_buffer_copy class methods to ctypes types. ................ r62500 | mark.dickinson | 2008-04-25 18:59:09 +0200 (Fri, 25 Apr 2008) | 3 lines Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill. ................ r62507 | benjamin.peterson | 2008-04-25 23:43:56 +0200 (Fri, 25 Apr 2008) | 2 lines Allow test_import to work when it is invoked directly ................ r62513 | georg.brandl | 2008-04-26 20:31:07 +0200 (Sat, 26 Apr 2008) | 2 lines #2691: document PyLong (s)size_t APIs, patch by Alexander Belopolsky. ................ r62514 | georg.brandl | 2008-04-26 20:32:17 +0200 (Sat, 26 Apr 2008) | 2 lines Add missing return type to dealloc. ................ r62516 | alexandre.vassalotti | 2008-04-27 02:52:24 +0200 (Sun, 27 Apr 2008) | 2 lines Fixed URL of PEP 205 in weakref's module docstring. ................ r62521 | georg.brandl | 2008-04-27 11:39:59 +0200 (Sun, 27 Apr 2008) | 2 lines #2677: add note that not all functions may accept keyword args. ................ r62531 | georg.brandl | 2008-04-27 19:38:55 +0200 (Sun, 27 Apr 2008) | 2 lines Use correct XHTML tags. ................ r62535 | benjamin.peterson | 2008-04-27 20:14:39 +0200 (Sun, 27 Apr 2008) | 2 lines #2700 Document PyNumber_ToBase ................ r62545 | skip.montanaro | 2008-04-27 22:53:57 +0200 (Sun, 27 Apr 2008) | 1 line minor wording changes, rewrap a few lines ................ r62546 | kurt.kaiser | 2008-04-27 23:07:41 +0200 (Sun, 27 Apr 2008) | 7 lines Home / Control-A toggles between left margin and end of leading white space. Patch 1196903 Jeff Shute. M idlelib/PyShell.py M idlelib/EditorWindow.py M idlelib/NEWS.txt ................ r62548 | kurt.kaiser | 2008-04-27 23:38:05 +0200 (Sun, 27 Apr 2008) | 2 lines Improved AutoCompleteWindow logic. Patch 2062 Tal Einat. ................ r62549 | kurt.kaiser | 2008-04-27 23:52:19 +0200 (Sun, 27 Apr 2008) | 4 lines Autocompletion of filenames now support alternate separators, e.g. the '/' char on Windows. Patch 2061 Tal Einat. ................ r62550 | skip.montanaro | 2008-04-28 00:49:56 +0200 (Mon, 28 Apr 2008) | 6 lines A few small changes: * The only exception we should catch when trying to import cStringIO is an ImportError. * Delete the function signatures embedded in the mk*temp docstrings. * The tempdir global variable was initialized twice. ................ r62551 | skip.montanaro | 2008-04-28 00:52:02 +0200 (Mon, 28 Apr 2008) | 4 lines Wrap some long paragraphs and include the default values for optional function parameters. ................ r62553 | skip.montanaro | 2008-04-28 04:57:23 +0200 (Mon, 28 Apr 2008) | 7 lines Minor cleanups: * Avoid creating unused local variables where we can. Where we can't prefix the unused variables with '_'. * Avoid shadowing builtins where it won't change the external interface of a function. * Use None as default path arg to readmodule and readmodule_ex. ................ r62554 | skip.montanaro | 2008-04-28 04:59:45 +0200 (Mon, 28 Apr 2008) | 6 lines Correct documentation to match implementation: "Class" instead of "class_descriptor", "Function" instead of "function_descriptor". Note default path value for readmodule*. Wrap some long paragraphs. Don't mention 'inpackage' which isn't part of the public API. ................ r62555 | brett.cannon | 2008-04-28 05:23:50 +0200 (Mon, 28 Apr 2008) | 5 lines Fix a bug introduced by the warnings rewrite where tracebacks were being improperly indented. Closes issue #2699. ................ r62556 | skip.montanaro | 2008-04-28 05:25:37 +0200 (Mon, 28 Apr 2008) | 2 lines Wrap some long lines. ................ r62557 | skip.montanaro | 2008-04-28 05:27:53 +0200 (Mon, 28 Apr 2008) | 6 lines Get rid of _test(), _main(), _debug() and _check(). Tests are no longer needed (better set available in Lib/test/test_robotparser.py). Clean up a few PEP 8 nits (compound statements on a single line, whitespace around operators). ................ r62558 | brett.cannon | 2008-04-28 06:50:06 +0200 (Mon, 28 Apr 2008) | 3 lines Rename the test_traceback_print() function to traceback_print() to prevent test_capi from automatically calling the function. ................ r62559 | georg.brandl | 2008-04-28 07:16:30 +0200 (Mon, 28 Apr 2008) | 2 lines Fix markup. ................ r62569 | amaury.forgeotdarc | 2008-04-28 23:07:06 +0200 (Mon, 28 Apr 2008) | 5 lines test_sundry performs minimal tests (a simple import...) on modules that are not tested otherwise. Some of them now have tests and can be removed. Only 70 to go... ................ r62574 | andrew.kuchling | 2008-04-29 04:03:54 +0200 (Tue, 29 Apr 2008) | 1 line Strip down SSL docs; I'm not managing to get test programs working, so I'll just give a minimal description ................ r62577 | martin.v.loewis | 2008-04-29 08:10:53 +0200 (Tue, 29 Apr 2008) | 2 lines Add Rodrigo and Heiko. ................ r62593 | nick.coghlan | 2008-04-30 16:23:36 +0200 (Wed, 30 Apr 2008) | 1 line Update command line usage documentation to reflect 2.6 changes (also includes some minor cleanups). Addresses TODO list issue 2258 ................ r62595 | andrew.kuchling | 2008-04-30 18:19:55 +0200 (Wed, 30 Apr 2008) | 1 line Typo fix ................ r62604 | benjamin.peterson | 2008-04-30 23:03:58 +0200 (Wed, 30 Apr 2008) | 2 lines make test_support's captured_output a bit more robust when exceptions happen ................ r62605 | georg.brandl | 2008-04-30 23:08:42 +0200 (Wed, 30 Apr 2008) | 2 lines #1748: use functools.wraps instead of rolling own metadata update. ................ r62606 | benjamin.peterson | 2008-04-30 23:25:55 +0200 (Wed, 30 Apr 2008) | 2 lines Remove some from __future__ import with_statements ................ r62608 | benjamin.peterson | 2008-05-01 00:03:36 +0200 (Thu, 01 May 2008) | 2 lines Fix typo in whatsnew ................ r62616 | georg.brandl | 2008-05-01 20:24:32 +0200 (Thu, 01 May 2008) | 2 lines Fix synopsis. ................ r62626 | brett.cannon | 2008-05-02 04:25:09 +0200 (Fri, 02 May 2008) | 6 lines Fix a backwards-compatibility mistake where a new optional argument for warnings.showwarning() was being used. This broke pre-existing replacements for the function since they didn't support the extra argument. Closes issue 2705. ................ r62627 | gregory.p.smith | 2008-05-02 09:26:52 +0200 (Fri, 02 May 2008) | 20 lines This should fix issue2632. A long description of the two competing problems is in the bug report (one old, one recently introduced trying to fix the old one). In short: buffer data during socket._fileobject.read() and readlines() within a cStringIO object instead of a [] of str()s returned from the recv() call. This prevents excessive memory use due to the size parameter being passed to recv() being grossly larger than the actual size of the data returned *and* prevents excessive cpu usage due to looping in python calling recv() with a very tiny size value if min() is used as the previous memory-use bug "fix" did. It also documents what the socket._fileobject._rbufsize member is actually used for. This is a candidate for back porting to 2.5. ................ r62636 | mark.hammond | 2008-05-02 14:48:15 +0200 (Fri, 02 May 2008) | 2 lines #2581: Vista UAC/elevation support for bdist_wininst ................ r62638 | facundo.batista | 2008-05-02 19:39:00 +0200 (Fri, 02 May 2008) | 3 lines Fixed some test structures. Thanks Mark Dickinson. ................ r62644 | ronald.oussoren | 2008-05-02 21:45:11 +0200 (Fri, 02 May 2008) | 7 lines Fix for issue #2573: Can't change the framework name on OS X builds This introduces a new configure option: --with-framework-name=NAME (defaulting to 'Python'). This allows you to install several copies of the Python framework with different names (such as a normal build and a debug build). ................ r62645 | ronald.oussoren | 2008-05-02 21:58:56 +0200 (Fri, 02 May 2008) | 2 lines Finish fix for issue2573, previous patch was incomplete. ................ r62647 | martin.v.loewis | 2008-05-02 23:30:20 +0200 (Fri, 02 May 2008) | 13 lines Merged revisions 62263-62646 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r62470 | david.wolever | 2008-04-24 02:11:07 +0200 (Do, 24 Apr 2008) | 3 lines Fixed up and applied the patch for #2431 -- speeding up 2to3 with a lookup table. ........ r62646 | martin.v.loewis | 2008-05-02 23:29:27 +0200 (Fr, 02 Mai 2008) | 2 lines Fix whitespace. ........ ................ r62648 | ronald.oussoren | 2008-05-02 23:42:35 +0200 (Fri, 02 May 2008) | 4 lines Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard This fixes both Python Launchar and the terminalcommand module. ................ r62651 | ronald.oussoren | 2008-05-02 23:54:56 +0200 (Fri, 02 May 2008) | 2 lines Fix for issue #2520 (cannot import macerrors) ................ r62652 | benjamin.peterson | 2008-05-03 00:12:58 +0200 (Sat, 03 May 2008) | 2 lines capitalization nit for reStructuredText ................ r62653 | brett.cannon | 2008-05-03 03:02:41 +0200 (Sat, 03 May 2008) | 2 lines Fix some indentation errors. ................ r62656 | brett.cannon | 2008-05-03 05:19:39 +0200 (Sat, 03 May 2008) | 6 lines Fix the C implementation of 'warnings' to infer the filename of the module that raised an exception properly when __file__ is not set, __name__ == '__main__', and sys.argv[0] is a false value. Closes issue2743. ................ r62661 | amaury.forgeotdarc | 2008-05-03 14:21:13 +0200 (Sat, 03 May 2008) | 8 lines In test_io, StatefulIncrementalDecoderTest was not part of the test suite. And of course, the test failed: a bytearray was used without reason in io.TextIOWrapper.tell(). The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes, whereas bytearrays yield integers. This code should still work with python3.0 ................ r62663 | benjamin.peterson | 2008-05-03 17:56:42 +0200 (Sat, 03 May 2008) | 2 lines The compiling struct is now passed around to all AST helpers (see issue 2720) ................ r62680 | benjamin.peterson | 2008-05-03 23:35:18 +0200 (Sat, 03 May 2008) | 2 lines Moved testing of builtin types out of test_builtin and into type specific modules ................ r62686 | mark.dickinson | 2008-05-04 04:25:46 +0200 (Sun, 04 May 2008) | 4 lines Make sure that Context traps and flags dictionaries have values 0 and 1 (as documented) rather than True and False. ................ r62687 | benjamin.peterson | 2008-05-04 05:05:49 +0200 (Sun, 04 May 2008) | 2 lines Fix typo in whatsnew ................ r62696 | georg.brandl | 2008-05-04 11:15:04 +0200 (Sun, 04 May 2008) | 2 lines #2752: wrong meaning of '' for socket host. ................ r62699 | christian.heimes | 2008-05-04 13:50:53 +0200 (Sun, 04 May 2008) | 1 line Added note that Python requires at least Win2k SP4 ................ r62700 | gerhard.haering | 2008-05-04 14:59:57 +0200 (Sun, 04 May 2008) | 3 lines SQLite requires 64-bit integers in order to build. So the whole HAVE_LONG_LONG #ifdefing was useless. ................ r62701 | gerhard.haering | 2008-05-04 15:15:12 +0200 (Sun, 04 May 2008) | 3 lines Applied sqliterow-richcmp.diff patch from Thomas Heller in Issue2152. The sqlite3.Row type is now correctly hashable. ................ r62702 | gerhard.haering | 2008-05-04 15:42:44 +0200 (Sun, 04 May 2008) | 5 lines Implemented feature request 2157: Converter names are cut off at '(' characters. This avoids the common case of something like 'NUMBER(10)' not being parsed as 'NUMBER', like expected. Also corrected the docs about converter names being case-sensitive. They aren't any longer. ................ r62703 | georg.brandl | 2008-05-04 17:45:05 +0200 (Sun, 04 May 2008) | 2 lines #2757: Remove spare newline. ................ r62711 | benjamin.peterson | 2008-05-04 21:10:02 +0200 (Sun, 04 May 2008) | 2 lines Fix typo in bugs.rst ................ --- command/bdist_wininst.py | 7 +++++++ command/wininst-6.0.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 61440 bytes command/wininst-9.0-amd64.exe | Bin 76288 -> 77312 bytes command/wininst-9.0.exe | Bin 65536 -> 66048 bytes msvc9compiler.py | 25 ++++++++++++++++++++++++- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index bf8d022ae8..3f0e09bc4c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -48,6 +48,10 @@ class bdist_wininst(Command): "Fully qualified filename of a script to be run before " "any files are installed. This script need not be in the " "distribution"), + ('user-access-control=', None, + "specify Vista's UAC handling - 'none'/default=no " + "handling, 'auto'=use UAC if target Python installed for " + "all users, 'force'=always use UAC"), ] boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', @@ -66,6 +70,7 @@ def initialize_options(self): self.skip_build = 0 self.install_script = None self.pre_install_script = None + self.user_access_control = None def finalize_options(self): @@ -211,6 +216,8 @@ def escape(s): lines.append("target_optimize=%d" % (not self.no_target_optimize)) if self.target_version: lines.append("target_version=%s" % self.target_version) + if self.user_access_control: + lines.append("user_access_control=%s" % self.user_access_control) title = self.title or self.distribution.get_fullname() lines.append("title=%s" % escape(title)) diff --git a/command/wininst-6.0.exe b/command/wininst-6.0.exe index bd715250e780b37e94996e33820070987bcc77fd..10c981993ba2c2e3a977db8ded201a46d529749d 100644 GIT binary patch delta 19227 zcmeHue|!_ymG8(BAc8>xBoH7#fB+L4B9NWfkxc})iGxidBU{EX7)XFjR2Qg`2rZB? zmDD08>XHu0(v)_g(3ZAzmn@XHO#(JH2qx9yst$K4~q$&w3{}8Pjg8Db!`KPKec)$1u zv1&N0Z(?s6NB!o;aMic*e&(GQt1NgMfA?0^P`oGn=RdJ==i;F%6YBGyev+p-T;iXn zkmE`;InH)^Dj8sDJze#mhLY1B22TQEd=K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Km z?9e{UM`|IDlT1mHgrb($BW+Z)1tyTgTT9_nEmC+6U`k6Vyk|&5(1pO0?W+6>n0h_B z88H?}?DowlHt%|PT$EX|q^y@L@>;1`0ZD@q5&X69>??)HPfBeI{PWPlnd|*YhoBpg z1bQ1_i~$xJVAGA>RCfGEWIGa41YO#6d?PVn&pwc6?1L{$z1k&jIG?vBsJ@4 zN|JHYM_lq7A%)0MF_ zy|=rG{4W%TZh(PMgP`2fS8AE!C$;R^tRNqs6*c|VVdu!+B1wnuq5X+%Zx?9!_#m(8 zw;szb8;m+az(-5TJ|4j(8`+2imE$^PwTz=PQcmG!M$G#OwYh3asf7w3l zg4pt#w*Hgu;zh@7(l|$sRXTL+z@@iYJ@*ct}A37lXx?yv*# z$7%!nTb5fOiFa8Ly?Qfo}mk zo(2m6KM9zZE=hj)2$#bL5V8PI06gusLknci0{-H_tswA=fTn?{1l$*}A08KQ4uLNN z?gIR35dO6a@UH;}55vr5JLidJ0PZqbP+hgOL+Y7Y8q2Qq8En#z}+c8wr4{l zWC*5@l%y2k{Q#%uAdUi_4>)}^Oi4K41LL3^a68~RJo&(X1pIwGEC>8gz|u(w)_`vT z`~uI@zzOcilcdeS-vB(AhwB_%^`!mFNuc1i*czurBb%C-H8+42lBJEd$eHWELTV z6O{BFo-*J+0{()4_c`D=P)U6~PzZQGz=!ah1)dG~{5mKFd^6xTc)Y-I@RAzwGywNS zWc)533Ey%MJc=h8crBpsdaQ^s$Phwta|-YafH51eB7kQD`fP-GfmZ>xK`dPap%jI8 e#j_qb!9jQ$fm5tK50AZ_jMGq$-F_i*qw?SH`W&MG diff --git a/command/wininst-9.0.exe b/command/wininst-9.0.exe index 5e0144c92b58ea750211c540d15667e0b1d1a356..0d04a6678b94b8ecbdde10257396e8c0e85c038c 100644 GIT binary patch delta 14220 zcmeHue_YgMw*O~_0Vf3+bp{boM;#Oe5gjp1(7_l}BO4tVAb+5V_Hi=xg)=T~*q{UV zGJc%G9^EhXqArGRem8foyVNd~$+(c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#3)Xzj+ueYL}JqMCdBaTsa3W(gb*9mG+FP~7aYRVYsi26TZ CX=EAz diff --git a/msvc9compiler.py b/msvc9compiler.py index 8b1cf9a910..c8d52c4237 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -594,14 +594,25 @@ def link(self, # needed! Make sure they are generated in the temporary build # directory. Since they have different names for debug and release # builds, they can go into the same directory. + build_temp = os.path.dirname(objects[0]) if export_symbols is not None: (dll_name, dll_ext) = os.path.splitext( os.path.basename(output_filename)) implib_file = os.path.join( - os.path.dirname(objects[0]), + build_temp, self.library_filename(dll_name)) ld_args.append ('/IMPLIB:' + implib_file) + # Embedded manifests are recommended - see MSDN article titled + # "How to: Embed a Manifest Inside a C/C++ Application" + # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) + # Ask the linker to generate the manifest in the temp dir, so + # we can embed it later. + temp_manifest = os.path.join( + build_temp, + os.path.basename(output_filename) + ".manifest") + ld_args.append('/MANIFESTFILE:' + temp_manifest) + if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -613,6 +624,18 @@ def link(self, except DistutilsExecError as msg: raise LinkError(msg) + # embed the manifest + # XXX - this is somewhat fragile - if mt.exe fails, distutils + # will still consider the DLL up-to-date, but it will not have a + # manifest. Maybe we should link to a temp file? OTOH, that + # implies a build environment error that shouldn't go undetected. + mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) + try: + self.spawn(['mt.exe', '-nologo', '-manifest', + temp_manifest, out_arg]) + except DistutilsExecError as msg: + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) From e2aef69588355bb9ecd378a778b3d50f00ca14c0 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 6 May 2008 22:41:46 +0000 Subject: [PATCH 1969/8469] Implemented PEP 370 --- command/install.py | 83 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/command/install.py b/command/install.py index 33a1212b0a..44c76926ea 100644 --- a/command/install.py +++ b/command/install.py @@ -18,6 +18,9 @@ from distutils.util import convert_path, subst_vars, change_root from distutils.util import get_platform from distutils.errors import DistutilsOptionError +from site import USER_BASE +from site import USER_SITE + if sys.version < "2.2": WINDOWS_SCHEME = { @@ -51,7 +54,21 @@ 'scripts': '$base/bin', 'data' : '$base', }, + 'unix_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, 'nt': WINDOWS_SCHEME, + 'nt_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + }, 'mac': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -59,13 +76,27 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, + 'mac_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data' : '$base', - } + }, + 'os2_home': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, } # The keys to an installation scheme; if any new types of files are to be @@ -86,6 +117,8 @@ class install (Command): "(Unix only) prefix for platform-specific files"), ('home=', None, "(Unix only) home directory to install under"), + ('user', None, + "install in user site-package '%s'" % USER_SITE), # Or, just set the base director(y|ies) ('install-base=', None, @@ -137,7 +170,7 @@ class install (Command): "filename in which to record list of installed files"), ] - boolean_options = ['compile', 'force', 'skip-build'] + boolean_options = ['compile', 'force', 'skip-build', 'user'] negative_opt = {'no-compile' : 'compile'} @@ -148,6 +181,7 @@ def initialize_options (self): self.prefix = None self.exec_prefix = None self.home = None + self.user = 0 # These select only the installation base; it's up to the user to # specify the installation scheme (currently, that means supplying @@ -166,6 +200,8 @@ def initialize_options (self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE self.compile = None self.optimize = None @@ -241,6 +277,11 @@ def finalize_options (self): raise DistutilsOptionError, \ "must supply either home or prefix/exec-prefix -- not both" + if self.user and (self.prefix or self.exec_prefix or self.home or + self.install_base or self.install_platbase): + raise DistutilsOptionError("can't combine user with with prefix/" + "exec_prefix/home or install_(plat)base") + # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name != "posix": if self.exec_prefix: @@ -276,10 +317,13 @@ def finalize_options (self): 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, 'py_version_short': py_version[0:3], + 'py_version_nodot': py_version[0] + py_version[2], 'sys_prefix': prefix, 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + 'userbase': self.install_userbase, + 'usersite': self.install_usersite, } self.expand_basedirs() @@ -301,6 +345,10 @@ def finalize_options (self): self.dump_dirs("post-expand_dirs()") + # Create directories in the home dir: + if self.user: + self.create_home_path() + # Pick the actual directory to install all modules to: either # install_purelib or install_platlib, depending on whether this # module distribution is pure or not. Of course, if the user @@ -315,7 +363,8 @@ def finalize_options (self): # Convert directories from Unix /-separated syntax to the local # convention. self.convert_paths('lib', 'purelib', 'platlib', - 'scripts', 'data', 'headers') + 'scripts', 'data', 'headers', + 'userbase', 'usersite') # Well, we're not actually fully completely finalized yet: we still # have to deal with 'extra_path', which is the hack for allowing @@ -376,7 +425,13 @@ def finalize_unix (self): "installation scheme is incomplete") return - if self.home is not None: + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme("unix_user") + elif self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: @@ -401,7 +456,13 @@ def finalize_unix (self): def finalize_other (self): # Windows and Mac OS for now - if self.home is not None: + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme(os.name + "_user") + elif self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: @@ -431,7 +492,7 @@ def _expand_attrs (self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: - if os.name == 'posix': + if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) val = subst_vars(val, self.config_vars) setattr(self, attr, val) @@ -496,6 +557,16 @@ def change_roots (self, *names): attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) + def create_home_path(self): + """Create directories under ~ + """ + if not self.user: + return + home = convert_path(os.path.expanduser("~")) + for name, path in self.config_vars.iteritems(): + if path.startswith(home) and not os.path.isdir(path): + self.debug_print("os.makedirs('%s', 0700)" % path) + os.makedirs(path, 0700) # -- Command execution methods ------------------------------------- From dd58a30c84365eaa82aa6175dbc52a26ee63bb7f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 6 May 2008 23:45:46 +0000 Subject: [PATCH 1970/8469] Merged revisions 62774-62775,62785,62787-62788 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62774 | georg.brandl | 2008-05-06 19:11:42 +0200 (Tue, 06 May 2008) | 2 lines #2773: fix description of 'g' and 'G' formatting spec. ........ r62775 | georg.brandl | 2008-05-06 19:20:54 +0200 (Tue, 06 May 2008) | 2 lines > != (!<). ........ r62785 | benjamin.peterson | 2008-05-07 00:18:11 +0200 (Wed, 07 May 2008) | 2 lines Fix logic error in Python/_warnings.c and add a test to verify ........ r62787 | benjamin.peterson | 2008-05-07 00:31:52 +0200 (Wed, 07 May 2008) | 2 lines Make the Python implementation of warnings compatible with the C implementation regarding non-callable showwarning ........ r62788 | christian.heimes | 2008-05-07 00:41:46 +0200 (Wed, 07 May 2008) | 1 line Implemented PEP 370 ........ --- command/install.py | 83 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/command/install.py b/command/install.py index 50884c3337..0a902cee89 100644 --- a/command/install.py +++ b/command/install.py @@ -15,6 +15,9 @@ from distutils.util import convert_path, subst_vars, change_root from distutils.util import get_platform from distutils.errors import DistutilsOptionError +from site import USER_BASE +from site import USER_SITE + if sys.version < "2.2": WINDOWS_SCHEME = { @@ -48,7 +51,21 @@ 'scripts': '$base/bin', 'data' : '$base', }, + 'unix_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, 'nt': WINDOWS_SCHEME, + 'nt_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + }, 'mac': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -56,13 +73,27 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, + 'mac_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data' : '$base', - } + }, + 'os2_home': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, } # The keys to an installation scheme; if any new types of files are to be @@ -83,6 +114,8 @@ class install (Command): "(Unix only) prefix for platform-specific files"), ('home=', None, "(Unix only) home directory to install under"), + ('user', None, + "install in user site-package '%s'" % USER_SITE), # Or, just set the base director(y|ies) ('install-base=', None, @@ -134,7 +167,7 @@ class install (Command): "filename in which to record list of installed files"), ] - boolean_options = ['compile', 'force', 'skip-build'] + boolean_options = ['compile', 'force', 'skip-build', 'user'] negative_opt = {'no-compile' : 'compile'} @@ -145,6 +178,7 @@ def initialize_options(self): self.prefix = None self.exec_prefix = None self.home = None + self.user = 0 # These select only the installation base; it's up to the user to # specify the installation scheme (currently, that means supplying @@ -163,6 +197,8 @@ def initialize_options(self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE self.compile = None self.optimize = None @@ -238,6 +274,11 @@ def finalize_options(self): raise DistutilsOptionError( "must supply either home or prefix/exec-prefix -- not both") + if self.user and (self.prefix or self.exec_prefix or self.home or + self.install_base or self.install_platbase): + raise DistutilsOptionError("can't combine user with with prefix/" + "exec_prefix/home or install_(plat)base") + # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name != "posix": if self.exec_prefix: @@ -273,10 +314,13 @@ def finalize_options(self): 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, 'py_version_short': py_version[0:3], + 'py_version_nodot': py_version[0] + py_version[2], 'sys_prefix': prefix, 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + 'userbase': self.install_userbase, + 'usersite': self.install_usersite, } self.expand_basedirs() @@ -298,6 +342,10 @@ def finalize_options(self): self.dump_dirs("post-expand_dirs()") + # Create directories in the home dir: + if self.user: + self.create_home_path() + # Pick the actual directory to install all modules to: either # install_purelib or install_platlib, depending on whether this # module distribution is pure or not. Of course, if the user @@ -312,7 +360,8 @@ def finalize_options(self): # Convert directories from Unix /-separated syntax to the local # convention. self.convert_paths('lib', 'purelib', 'platlib', - 'scripts', 'data', 'headers') + 'scripts', 'data', 'headers', + 'userbase', 'usersite') # Well, we're not actually fully completely finalized yet: we still # have to deal with 'extra_path', which is the hack for allowing @@ -369,7 +418,13 @@ def finalize_unix(self): "installation scheme is incomplete") return - if self.home is not None: + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme("unix_user") + elif self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: @@ -391,7 +446,13 @@ def finalize_unix(self): def finalize_other(self): # Windows and Mac OS for now - if self.home is not None: + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme(os.name + "_user") + elif self.home is not None: self.install_base = self.install_platbase = self.home self.select_scheme("unix_home") else: @@ -419,7 +480,7 @@ def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: - if os.name == 'posix': + if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) val = subst_vars(val, self.config_vars) setattr(self, attr, val) @@ -479,6 +540,16 @@ def change_roots(self, *names): attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) + def create_home_path(self): + """Create directories under ~ + """ + if not self.user: + return + home = convert_path(os.path.expanduser("~")) + for name, path in self.config_vars.iteritems(): + if path.startswith(home) and not os.path.isdir(path): + self.debug_print("os.makedirs('%s', 0o700)" % path) + os.makedirs(path, 0o700) # -- Command execution methods ------------------------------------- From af488a5062e1af5b85b7c25c2a58087cb9905a86 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 8 May 2008 11:54:13 +0000 Subject: [PATCH 1971/8469] Bumping versions for 3.0a5 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b583e397e2..3618c4f727 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0a4" +__version__ = "3.0a5" #--end constants-- From a59a6118c2edd586a14b636043fc27f6509a62f2 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 8 May 2008 13:16:19 +0000 Subject: [PATCH 1972/8469] Bump to 2.6a3 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index d0dd03a3c5..e3e32f51bd 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6a2" +__version__ = "2.6a3" #--end constants-- From 8a2d33caa7898053d9c911a313660fc39a412bbe Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 8 May 2008 22:09:54 +0000 Subject: [PATCH 1973/8469] Replace instances of os.path.walk with os.walk --- archive_util.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/archive_util.py b/archive_util.py index a9c6a5b488..264e66faf2 100644 --- a/archive_util.py +++ b/archive_util.py @@ -95,18 +95,16 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) - def visit (z, dirname, names): - for name in names: - path = os.path.normpath(os.path.join(dirname, name)) - if os.path.isfile(path): - z.write(path, path) - log.info("adding '%s'" % path) - if not dry_run: z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) - os.path.walk(base_dir, visit, z) + for dirpath, dirnames, filenames in os.walk(base_dir): + for name in filenames: + path = os.path.normpath(os.path.join(dirpath, name)) + if os.path.isfile(path): + z.write(path, path) + log.info("adding '%s'" % path) z.close() return zip_filename From 2e52da55e1a498e632f64468c4babe7f2b542850 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 8 May 2008 22:27:58 +0000 Subject: [PATCH 1974/8469] Merged revisions 62873,62887,62892-62896,62904 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62873 | raymond.hettinger | 2008-05-08 12:18:13 -0500 (Thu, 08 May 2008) | 1 line Issue 2778. Document the temporary frozenset swap in __contains__(), remove(), and discard(). ........ r62887 | brett.cannon | 2008-05-08 14:50:51 -0500 (Thu, 08 May 2008) | 5 lines Make test.test_support.catch_warning() take an argument specifying if any triggered warnings should be captured. This allows the context manager to be used to just prevent the internal state of the 'warnings' framework and thus allow triggered warnings to be displayed. ........ r62892 | brett.cannon | 2008-05-08 15:20:24 -0500 (Thu, 08 May 2008) | 4 lines Fix a bug introduced by the addition of the 'record' argument to test.test_support.catch_warning() where showwarning() was not being set properly. ........ r62893 | brett.cannon | 2008-05-08 15:20:54 -0500 (Thu, 08 May 2008) | 2 lines Document the 'record' argument for test.test_support.catch_warning(). ........ r62894 | brett.cannon | 2008-05-08 15:23:06 -0500 (Thu, 08 May 2008) | 4 lines Fix sys.flags to properly expose bytes_warning. Closes issue #2790. ........ r62895 | brett.cannon | 2008-05-08 15:23:54 -0500 (Thu, 08 May 2008) | 2 lines Add a missing entry on the fix for issue #2790. ........ r62896 | brett.cannon | 2008-05-08 15:24:43 -0500 (Thu, 08 May 2008) | 2 lines Add test.test_support.catch_warning()'s new argument. ........ r62904 | benjamin.peterson | 2008-05-08 17:09:54 -0500 (Thu, 08 May 2008) | 2 lines Replace instances of os.path.walk with os.walk ........ --- archive_util.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/archive_util.py b/archive_util.py index f3f65c6a0c..9444ff012f 100644 --- a/archive_util.py +++ b/archive_util.py @@ -92,18 +92,16 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) - def visit (z, dirname, names): - for name in names: - path = os.path.normpath(os.path.join(dirname, name)) - if os.path.isfile(path): - z.write(path, path) - log.info("adding '%s'" % path) - if not dry_run: z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) - os.path.walk(base_dir, visit, z) + for dirpath, dirnames, filenames in os.walk(base_dir): + for name in filenames: + path = os.path.normpath(os.path.join(dirpath, name)) + if os.path.isfile(path): + z.write(path, path) + log.info("adding '%s'" % path) z.close() return zip_filename From 78cb86ae70da077547532ef552ebdaee33ac0a72 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 9 May 2008 12:19:09 +0000 Subject: [PATCH 1975/8469] Add --user option to build_ext --- command/build_ext.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index bf5ad7e00b..beb3319469 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -10,6 +10,7 @@ import sys, os, string, re from types import * +from site import USER_BASE, USER_SITE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -93,9 +94,11 @@ class build_ext (Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), + ('user', None, + "add user include, library and rpath"), ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] help_options = [ ('help-compiler', None, @@ -123,6 +126,7 @@ def initialize_options (self): self.swig = None self.swig_cpp = None self.swig_opts = None + self.user = None def finalize_options (self): from distutils import sysconfig @@ -257,6 +261,16 @@ def finalize_options (self): else: self.swig_opts = self.swig_opts.split(' ') + # Finally add the user include and library directories if requested + if self.user: + user_include = os.path.join(USER_BASE, "include") + user_lib = os.path.join(USER_BASE, "lib") + if os.path.isdir(user_include): + self.include_dirs.append(user_include) + if os.path.isdir(user_lib): + self.library_dirs.append(user_lib) + self.rpath.append(user_lib) + # finalize_options () From 22b54825ad9cfd0d15ebecb4b31b7886f6391833 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 10 May 2008 19:51:55 +0000 Subject: [PATCH 1976/8469] #1858 from Tarek Ziade: Allow multiple repositories in .pypirc; see http://wiki.python.org/moin/EnhancedPyPI for discussion. The patch is slightly revised from Tarek's last patch: I've simplified the PyPIRCCommand.finalize_options() method to not look at sys.argv. Tests still pass. --- command/register.py | 97 +++++++++++++++++++++++---------------------- command/upload.py | 41 ++++++------------- core.py | 1 + dist.py | 7 ++-- tests/test_dist.py | 47 ++++++++++++++++++++++ 5 files changed, 113 insertions(+), 80 deletions(-) diff --git a/command/register.py b/command/register.py index 5c588effd3..a9ab361a17 100644 --- a/command/register.py +++ b/command/register.py @@ -8,37 +8,29 @@ __revision__ = "$Id$" import os, string, urllib2, getpass, urlparse -import StringIO, ConfigParser +import StringIO -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.errors import * +from distutils import log -class register(Command): +class register(PyPIRCCommand): description = ("register the distribution with the Python package index") - - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]"%DEFAULT_REPOSITORY), + user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), - ('show-response', None, - 'display full response text from server'), ] - boolean_options = ['verify', 'show-response', 'list-classifiers'] + boolean_options = PyPIRCCommand.boolean_options + [ + 'verify', 'list-classifiers'] def initialize_options(self): - self.repository = None - self.show_response = 0 + PyPIRCCommand.initialize_options(self) self.list_classifiers = 0 - def finalize_options(self): - if self.repository is None: - self.repository = self.DEFAULT_REPOSITORY - def run(self): + self.finalize_options() + self._set_config() self.check_metadata() if self.dry_run: self.verify_metadata() @@ -77,6 +69,23 @@ def check_metadata(self): "or (maintainer and maintainer_email) " + "must be supplied") + def _set_config(self): + ''' Reads the configuration file and set attributes. + ''' + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] + self.has_config = True + else: + if self.repository not in ('pypi', self.DEFAULT_REPOSITORY): + raise ValueError('%s not found in .pypirc' % self.repository) + if self.repository == 'pypi': + self.repository = self.DEFAULT_REPOSITORY + self.has_config = False + def classifiers(self): ''' Fetch the list of classifiers from the server. ''' @@ -90,6 +99,7 @@ def verify_metadata(self): (code, result) = self.post_to_server(self.build_post_data('verify')) print 'Server response (%s): %s'%(code, result) + def send_metadata(self): ''' Send the metadata to the package index server. @@ -99,10 +109,14 @@ def send_metadata(self): First we try to read the username/password from $HOME/.pypirc, which is a ConfigParser-formatted file with a section - [server-login] containing username and password entries (both + [distutils] containing username and password entries (both in clear text). Eg: - [server-login] + [distutils] + index-servers = + pypi + + [pypi] username: fred password: sekrit @@ -114,21 +128,15 @@ def send_metadata(self): 3. set the password to a random string and email the user. ''' - choice = 'x' - username = password = '' - # see if we can short-cut and get the username/password from the # config - config = None - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - print 'Using PyPI login from %s'%rc - config = ConfigParser.ConfigParser() - config.read(rc) - username = config.get('server-login', 'username') - password = config.get('server-login', 'password') - choice = '1' + if self.has_config: + choice = '1' + username = self.username + password = self.password + else: + choice = 'x' + username = password = '' # get the user's login info choices = '1 2 3 4'.split() @@ -155,32 +163,24 @@ def send_metadata(self): # set up the authentication auth = urllib2.HTTPPasswordMgr() host = urlparse.urlparse(self.repository)[1] - auth.add_password('pypi', host, username, password) - + auth.add_password(self.realm, host, username, password) # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s'%(code, result) + print 'Server response (%s): %s' % (code, result) # possibly save the login - if 'HOME' in os.environ and config is None and code == 200: - rc = os.path.join(os.environ['HOME'], '.pypirc') + if not self.has_config and code == 200: print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)'%rc + print '(the login will be stored in %s)' % self._get_rc_file() choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') if not choice: choice = 'n' if choice.lower() == 'y': - f = open(rc, 'w') - f.write('[server-login]\nusername:%s\npassword:%s\n'%( - username, password)) - f.close() - try: - os.chmod(rc, 0600) - except: - pass + self._store_pypirc(username, password) + elif choice == '2': data = {':action': 'user'} data['name'] = data['password'] = data['email'] = '' @@ -243,7 +243,8 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - + self.announce('Registering %s to %s' % (data['name'], + self.repository), log.INFO) # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary diff --git a/command/upload.py b/command/upload.py index 301a159590..daf681128d 100644 --- a/command/upload.py +++ b/command/upload.py @@ -3,7 +3,7 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log from hashlib import md5 @@ -16,53 +16,38 @@ import urlparse import cStringIO as StringIO -class upload(Command): +class upload(PyPIRCCommand): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]" % DEFAULT_REPOSITORY), - ('show-response', None, - 'display full response text from server'), + user_options = PyPIRCCommand.user_options + [ ('sign', 's', 'sign files to upload using gpg'), ('identity=', 'i', 'GPG identity used to sign files'), ] - boolean_options = ['show-response', 'sign'] + + boolean_options = PyPIRCCommand.boolean_options + ['sign'] def initialize_options(self): + PyPIRCCommand.initialize_options(self) self.username = '' self.password = '' - self.repository = '' self.show_response = 0 self.sign = False self.identity = None def finalize_options(self): + PyPIRCCommand.finalize_options(self) if self.identity and not self.sign: raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - self.announce('Using PyPI login from %s' % rc) - config = ConfigParser.ConfigParser({ - 'username':'', - 'password':'', - 'repository':''}) - config.read(rc) - if not self.repository: - self.repository = config.get('server-login', 'repository') - if not self.username: - self.username = config.get('server-login', 'username') - if not self.password: - self.password = config.get('server-login', 'password') - if not self.repository: - self.repository = self.DEFAULT_REPOSITORY + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] def run(self): if not self.distribution.dist_files: diff --git a/core.py b/core.py index 32b9026999..de9ce7d7ff 100644 --- a/core.py +++ b/core.py @@ -20,6 +20,7 @@ # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution from distutils.cmd import Command +from distutils.config import PyPIRCCommand from distutils.extension import Extension # This is a barebones help message generated displayed when the user diff --git a/dist.py b/dist.py index d098cb9713..0b13c1e6c1 100644 --- a/dist.py +++ b/dist.py @@ -343,10 +343,9 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - if 'HOME' in os.environ: - user_file = os.path.join(os.environ.get('HOME'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" diff --git a/tests/test_dist.py b/tests/test_dist.py index 5ae79332c0..2857263730 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -55,6 +55,7 @@ def test_command_packages_unspecified(self): self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_command_packages_cmdline(self): + from distutils.tests.test_dist import test_dist sys.argv.extend(["--command-packages", "foo.bar,distutils.tests", "test_dist", @@ -65,6 +66,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") + print cmd.__class__, test_dist self.assert_(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") @@ -179,9 +181,54 @@ def format_metadata(self, dist): dist.metadata.write_pkg_file(sio) return sio.getvalue() + def test_custom_pydistutils(self): + # fixes #2166 + # make sure pydistutils.cfg is found + old = {} + for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): + value = os.environ.get(env) + old[env] = value + if value is not None: + del os.environ[env] + + if os.name == 'posix': + user_filename = ".pydistutils.cfg" + else: + user_filename = "pydistutils.cfg" + + curdir = os.path.dirname(__file__) + user_filename = os.path.join(curdir, user_filename) + f = open(user_filename, 'w') + f.write('.') + f.close() + + try: + dist = distutils.dist.Distribution() + + # linux-style + if sys.platform in ('linux', 'darwin'): + os.environ['HOME'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + + # win32-style + if sys.platform == 'win32': + # home drive should be found + os.environ['HOMEPATH'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + finally: + for key, value in old.items(): + if value is None: + continue + os.environ[key] = value + os.remove(user_filename) def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) suite.addTest(unittest.makeSuite(MetadataTestCase)) return suite + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a189b6be0df13ba6b77292b59ea501774804b422 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 10 May 2008 20:52:01 +0000 Subject: [PATCH 1977/8469] Revert r62998 as it broke the build (seems distutils.config is missing). --- command/register.py | 97 ++++++++++++++++++++++----------------------- command/upload.py | 41 +++++++++++++------ core.py | 1 - dist.py | 7 ++-- tests/test_dist.py | 47 ---------------------- 5 files changed, 80 insertions(+), 113 deletions(-) diff --git a/command/register.py b/command/register.py index a9ab361a17..5c588effd3 100644 --- a/command/register.py +++ b/command/register.py @@ -8,29 +8,37 @@ __revision__ = "$Id$" import os, string, urllib2, getpass, urlparse -import StringIO +import StringIO, ConfigParser -from distutils.core import PyPIRCCommand +from distutils.core import Command from distutils.errors import * -from distutils import log -class register(PyPIRCCommand): +class register(Command): description = ("register the distribution with the Python package index") - user_options = PyPIRCCommand.user_options + [ + + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]"%DEFAULT_REPOSITORY), ('list-classifiers', None, 'list the valid Trove classifiers'), + ('show-response', None, + 'display full response text from server'), ] - boolean_options = PyPIRCCommand.boolean_options + [ - 'verify', 'list-classifiers'] + boolean_options = ['verify', 'show-response', 'list-classifiers'] def initialize_options(self): - PyPIRCCommand.initialize_options(self) + self.repository = None + self.show_response = 0 self.list_classifiers = 0 + def finalize_options(self): + if self.repository is None: + self.repository = self.DEFAULT_REPOSITORY + def run(self): - self.finalize_options() - self._set_config() self.check_metadata() if self.dry_run: self.verify_metadata() @@ -69,23 +77,6 @@ def check_metadata(self): "or (maintainer and maintainer_email) " + "must be supplied") - def _set_config(self): - ''' Reads the configuration file and set attributes. - ''' - config = self._read_pypirc() - if config != {}: - self.username = config['username'] - self.password = config['password'] - self.repository = config['repository'] - self.realm = config['realm'] - self.has_config = True - else: - if self.repository not in ('pypi', self.DEFAULT_REPOSITORY): - raise ValueError('%s not found in .pypirc' % self.repository) - if self.repository == 'pypi': - self.repository = self.DEFAULT_REPOSITORY - self.has_config = False - def classifiers(self): ''' Fetch the list of classifiers from the server. ''' @@ -99,7 +90,6 @@ def verify_metadata(self): (code, result) = self.post_to_server(self.build_post_data('verify')) print 'Server response (%s): %s'%(code, result) - def send_metadata(self): ''' Send the metadata to the package index server. @@ -109,14 +99,10 @@ def send_metadata(self): First we try to read the username/password from $HOME/.pypirc, which is a ConfigParser-formatted file with a section - [distutils] containing username and password entries (both + [server-login] containing username and password entries (both in clear text). Eg: - [distutils] - index-servers = - pypi - - [pypi] + [server-login] username: fred password: sekrit @@ -128,15 +114,21 @@ def send_metadata(self): 3. set the password to a random string and email the user. ''' + choice = 'x' + username = password = '' + # see if we can short-cut and get the username/password from the # config - if self.has_config: - choice = '1' - username = self.username - password = self.password - else: - choice = 'x' - username = password = '' + config = None + if 'HOME' in os.environ: + rc = os.path.join(os.environ['HOME'], '.pypirc') + if os.path.exists(rc): + print 'Using PyPI login from %s'%rc + config = ConfigParser.ConfigParser() + config.read(rc) + username = config.get('server-login', 'username') + password = config.get('server-login', 'password') + choice = '1' # get the user's login info choices = '1 2 3 4'.split() @@ -163,24 +155,32 @@ def send_metadata(self): # set up the authentication auth = urllib2.HTTPPasswordMgr() host = urlparse.urlparse(self.repository)[1] - auth.add_password(self.realm, host, username, password) + auth.add_password('pypi', host, username, password) + # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s' % (code, result) + print 'Server response (%s): %s'%(code, result) # possibly save the login - if not self.has_config and code == 200: + if 'HOME' in os.environ and config is None and code == 200: + rc = os.path.join(os.environ['HOME'], '.pypirc') print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)' % self._get_rc_file() + print '(the login will be stored in %s)'%rc choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') if not choice: choice = 'n' if choice.lower() == 'y': - self._store_pypirc(username, password) - + f = open(rc, 'w') + f.write('[server-login]\nusername:%s\npassword:%s\n'%( + username, password)) + f.close() + try: + os.chmod(rc, 0600) + except: + pass elif choice == '2': data = {':action': 'user'} data['name'] = data['password'] = data['email'] = '' @@ -243,8 +243,7 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - self.announce('Registering %s to %s' % (data['name'], - self.repository), log.INFO) + # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary diff --git a/command/upload.py b/command/upload.py index daf681128d..301a159590 100644 --- a/command/upload.py +++ b/command/upload.py @@ -3,7 +3,7 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * -from distutils.core import PyPIRCCommand +from distutils.core import Command from distutils.spawn import spawn from distutils import log from hashlib import md5 @@ -16,38 +16,53 @@ import urlparse import cStringIO as StringIO -class upload(PyPIRCCommand): +class upload(Command): description = "upload binary package to PyPI" - user_options = PyPIRCCommand.user_options + [ + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]" % DEFAULT_REPOSITORY), + ('show-response', None, + 'display full response text from server'), ('sign', 's', 'sign files to upload using gpg'), ('identity=', 'i', 'GPG identity used to sign files'), ] - - boolean_options = PyPIRCCommand.boolean_options + ['sign'] + boolean_options = ['show-response', 'sign'] def initialize_options(self): - PyPIRCCommand.initialize_options(self) self.username = '' self.password = '' + self.repository = '' self.show_response = 0 self.sign = False self.identity = None def finalize_options(self): - PyPIRCCommand.finalize_options(self) if self.identity and not self.sign: raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - config = self._read_pypirc() - if config != {}: - self.username = config['username'] - self.password = config['password'] - self.repository = config['repository'] - self.realm = config['realm'] + if 'HOME' in os.environ: + rc = os.path.join(os.environ['HOME'], '.pypirc') + if os.path.exists(rc): + self.announce('Using PyPI login from %s' % rc) + config = ConfigParser.ConfigParser({ + 'username':'', + 'password':'', + 'repository':''}) + config.read(rc) + if not self.repository: + self.repository = config.get('server-login', 'repository') + if not self.username: + self.username = config.get('server-login', 'username') + if not self.password: + self.password = config.get('server-login', 'password') + if not self.repository: + self.repository = self.DEFAULT_REPOSITORY def run(self): if not self.distribution.dist_files: diff --git a/core.py b/core.py index de9ce7d7ff..32b9026999 100644 --- a/core.py +++ b/core.py @@ -20,7 +20,6 @@ # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution from distutils.cmd import Command -from distutils.config import PyPIRCCommand from distutils.extension import Extension # This is a barebones help message generated displayed when the user diff --git a/dist.py b/dist.py index 0b13c1e6c1..d098cb9713 100644 --- a/dist.py +++ b/dist.py @@ -343,9 +343,10 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - user_file = os.path.join(os.path.expanduser('~'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + if 'HOME' in os.environ: + user_file = os.path.join(os.environ.get('HOME'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" diff --git a/tests/test_dist.py b/tests/test_dist.py index 2857263730..5ae79332c0 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -55,7 +55,6 @@ def test_command_packages_unspecified(self): self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_command_packages_cmdline(self): - from distutils.tests.test_dist import test_dist sys.argv.extend(["--command-packages", "foo.bar,distutils.tests", "test_dist", @@ -66,7 +65,6 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - print cmd.__class__, test_dist self.assert_(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") @@ -181,54 +179,9 @@ def format_metadata(self, dist): dist.metadata.write_pkg_file(sio) return sio.getvalue() - def test_custom_pydistutils(self): - # fixes #2166 - # make sure pydistutils.cfg is found - old = {} - for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): - value = os.environ.get(env) - old[env] = value - if value is not None: - del os.environ[env] - - if os.name == 'posix': - user_filename = ".pydistutils.cfg" - else: - user_filename = "pydistutils.cfg" - - curdir = os.path.dirname(__file__) - user_filename = os.path.join(curdir, user_filename) - f = open(user_filename, 'w') - f.write('.') - f.close() - - try: - dist = distutils.dist.Distribution() - - # linux-style - if sys.platform in ('linux', 'darwin'): - os.environ['HOME'] = curdir - files = dist.find_config_files() - self.assert_(user_filename in files) - - # win32-style - if sys.platform == 'win32': - # home drive should be found - os.environ['HOMEPATH'] = curdir - files = dist.find_config_files() - self.assert_(user_filename in files) - finally: - for key, value in old.items(): - if value is None: - continue - os.environ[key] = value - os.remove(user_filename) def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) suite.addTest(unittest.makeSuite(MetadataTestCase)) return suite - -if __name__ == "__main__": - unittest.main(defaultTest="test_suite") From a76f1b7559518a73f906030946db7d12ea21fddc Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 10 May 2008 22:12:38 +0000 Subject: [PATCH 1978/8469] #1858: add distutils.config module --- config.py | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 config.py diff --git a/config.py b/config.py new file mode 100644 index 0000000000..cf547698a9 --- /dev/null +++ b/config.py @@ -0,0 +1,124 @@ +"""distutils.pypirc + +Provides the PyPIRCCommand class, the base class for the command classes +that uses .pypirc in the distutils.command package. +""" +import os +import sys +from ConfigParser import ConfigParser + +from distutils.core import Command + +DEFAULT_PYPIRC = """\ +[pypirc] +servers = + pypi + +[pypi] +username:%s +password:%s +""" + +class PyPIRCCommand(Command): + """Base command that knows how to handle the .pypirc file + """ + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + DEFAULT_REALM = 'pypi' + repository = None + realm = None + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]" % \ + DEFAULT_REPOSITORY), + ('show-response', None, + 'display full response text from server')] + + boolean_options = ['show-response'] + + def _get_rc_file(self): + """Returns rc file path.""" + return os.path.join(os.path.expanduser('~'), '.pypirc') + + def _store_pypirc(self, username, password): + """Creates a default .pypirc file.""" + rc = self._get_rc_file() + f = open(rc, 'w') + try: + f.write(DEFAULT_PYPIRC % (username, password)) + finally: + f.close() + try: + os.chmod(rc, 0600) + except OSError: + # should do something better here + pass + + def _read_pypirc(self): + """Reads the .pypirc file.""" + rc = self._get_rc_file() + if os.path.exists(rc): + print 'Using PyPI login from %s' % rc + repository = self.repository or self.DEFAULT_REPOSITORY + realm = self.realm or self.DEFAULT_REALM + + config = ConfigParser() + config.read(rc) + sections = config.sections() + if 'distutils' in sections: + # let's get the list of servers + index_servers = config.get('distutils', 'index-servers') + _servers = [server.strip() for server in + index_servers.split('\n') + if server.strip() != ''] + if _servers == []: + # nothing set, let's try to get the default pypi + if 'pypi' in sections: + _servers = ['pypi'] + else: + # the file is not properly defined, returning + # an empty dict + return {} + for server in _servers: + current = {'server': server} + current['username'] = config.get(server, 'username') + current['password'] = config.get(server, 'password') + + # optional params + for key, default in (('repository', + self.DEFAULT_REPOSITORY), + ('realm', self.DEFAULT_REALM)): + if config.has_option(server, key): + current[key] = config.get(server, key) + else: + current[key] = default + if (current['server'] == repository or + current['repository'] == repository): + return current + elif 'server-login' in sections: + # old format + server = 'server-login' + if config.has_option(server, 'repository'): + repository = config.get(server, 'repository') + else: + repository = self.DEFAULT_REPOSITORY + return {'username': config.get(server, 'username'), + 'password': config.get(server, 'password'), + 'repository': repository, + 'server': server, + 'realm': self.DEFAULT_REALM} + + return {} + + def initialize_options(self): + """Initialize options.""" + self.repository = None + self.realm = None + self.show_response = 0 + + def finalize_options(self): + """Finalizes options.""" + if self.repository is None: + self.repository = self.DEFAULT_REPOSITORY + if self.realm is None: + self.realm = self.DEFAULT_REALM From 650146240e3815b6cee42887e1919baf4077de40 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sun, 11 May 2008 14:00:00 +0000 Subject: [PATCH 1979/8469] #1858: re-apply patch for this, adding the missing files --- command/register.py | 97 +++++++++++++++++++-------------------- command/upload.py | 41 ++++++----------- core.py | 1 + dist.py | 7 ++- tests/test_config.py | 105 +++++++++++++++++++++++++++++++++++++++++++ tests/test_dist.py | 46 +++++++++++++++++++ tests/test_upload.py | 34 ++++++++++++++ 7 files changed, 251 insertions(+), 80 deletions(-) create mode 100644 tests/test_config.py create mode 100644 tests/test_upload.py diff --git a/command/register.py b/command/register.py index 5c588effd3..a9ab361a17 100644 --- a/command/register.py +++ b/command/register.py @@ -8,37 +8,29 @@ __revision__ = "$Id$" import os, string, urllib2, getpass, urlparse -import StringIO, ConfigParser +import StringIO -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.errors import * +from distutils import log -class register(Command): +class register(PyPIRCCommand): description = ("register the distribution with the Python package index") - - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]"%DEFAULT_REPOSITORY), + user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), - ('show-response', None, - 'display full response text from server'), ] - boolean_options = ['verify', 'show-response', 'list-classifiers'] + boolean_options = PyPIRCCommand.boolean_options + [ + 'verify', 'list-classifiers'] def initialize_options(self): - self.repository = None - self.show_response = 0 + PyPIRCCommand.initialize_options(self) self.list_classifiers = 0 - def finalize_options(self): - if self.repository is None: - self.repository = self.DEFAULT_REPOSITORY - def run(self): + self.finalize_options() + self._set_config() self.check_metadata() if self.dry_run: self.verify_metadata() @@ -77,6 +69,23 @@ def check_metadata(self): "or (maintainer and maintainer_email) " + "must be supplied") + def _set_config(self): + ''' Reads the configuration file and set attributes. + ''' + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] + self.has_config = True + else: + if self.repository not in ('pypi', self.DEFAULT_REPOSITORY): + raise ValueError('%s not found in .pypirc' % self.repository) + if self.repository == 'pypi': + self.repository = self.DEFAULT_REPOSITORY + self.has_config = False + def classifiers(self): ''' Fetch the list of classifiers from the server. ''' @@ -90,6 +99,7 @@ def verify_metadata(self): (code, result) = self.post_to_server(self.build_post_data('verify')) print 'Server response (%s): %s'%(code, result) + def send_metadata(self): ''' Send the metadata to the package index server. @@ -99,10 +109,14 @@ def send_metadata(self): First we try to read the username/password from $HOME/.pypirc, which is a ConfigParser-formatted file with a section - [server-login] containing username and password entries (both + [distutils] containing username and password entries (both in clear text). Eg: - [server-login] + [distutils] + index-servers = + pypi + + [pypi] username: fred password: sekrit @@ -114,21 +128,15 @@ def send_metadata(self): 3. set the password to a random string and email the user. ''' - choice = 'x' - username = password = '' - # see if we can short-cut and get the username/password from the # config - config = None - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - print 'Using PyPI login from %s'%rc - config = ConfigParser.ConfigParser() - config.read(rc) - username = config.get('server-login', 'username') - password = config.get('server-login', 'password') - choice = '1' + if self.has_config: + choice = '1' + username = self.username + password = self.password + else: + choice = 'x' + username = password = '' # get the user's login info choices = '1 2 3 4'.split() @@ -155,32 +163,24 @@ def send_metadata(self): # set up the authentication auth = urllib2.HTTPPasswordMgr() host = urlparse.urlparse(self.repository)[1] - auth.add_password('pypi', host, username, password) - + auth.add_password(self.realm, host, username, password) # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s'%(code, result) + print 'Server response (%s): %s' % (code, result) # possibly save the login - if 'HOME' in os.environ and config is None and code == 200: - rc = os.path.join(os.environ['HOME'], '.pypirc') + if not self.has_config and code == 200: print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)'%rc + print '(the login will be stored in %s)' % self._get_rc_file() choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') if not choice: choice = 'n' if choice.lower() == 'y': - f = open(rc, 'w') - f.write('[server-login]\nusername:%s\npassword:%s\n'%( - username, password)) - f.close() - try: - os.chmod(rc, 0600) - except: - pass + self._store_pypirc(username, password) + elif choice == '2': data = {':action': 'user'} data['name'] = data['password'] = data['email'] = '' @@ -243,7 +243,8 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - + self.announce('Registering %s to %s' % (data['name'], + self.repository), log.INFO) # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary diff --git a/command/upload.py b/command/upload.py index 301a159590..daf681128d 100644 --- a/command/upload.py +++ b/command/upload.py @@ -3,7 +3,7 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log from hashlib import md5 @@ -16,53 +16,38 @@ import urlparse import cStringIO as StringIO -class upload(Command): +class upload(PyPIRCCommand): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]" % DEFAULT_REPOSITORY), - ('show-response', None, - 'display full response text from server'), + user_options = PyPIRCCommand.user_options + [ ('sign', 's', 'sign files to upload using gpg'), ('identity=', 'i', 'GPG identity used to sign files'), ] - boolean_options = ['show-response', 'sign'] + + boolean_options = PyPIRCCommand.boolean_options + ['sign'] def initialize_options(self): + PyPIRCCommand.initialize_options(self) self.username = '' self.password = '' - self.repository = '' self.show_response = 0 self.sign = False self.identity = None def finalize_options(self): + PyPIRCCommand.finalize_options(self) if self.identity and not self.sign: raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - self.announce('Using PyPI login from %s' % rc) - config = ConfigParser.ConfigParser({ - 'username':'', - 'password':'', - 'repository':''}) - config.read(rc) - if not self.repository: - self.repository = config.get('server-login', 'repository') - if not self.username: - self.username = config.get('server-login', 'username') - if not self.password: - self.password = config.get('server-login', 'password') - if not self.repository: - self.repository = self.DEFAULT_REPOSITORY + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] def run(self): if not self.distribution.dist_files: diff --git a/core.py b/core.py index 32b9026999..de9ce7d7ff 100644 --- a/core.py +++ b/core.py @@ -20,6 +20,7 @@ # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution from distutils.cmd import Command +from distutils.config import PyPIRCCommand from distutils.extension import Extension # This is a barebones help message generated displayed when the user diff --git a/dist.py b/dist.py index d098cb9713..0b13c1e6c1 100644 --- a/dist.py +++ b/dist.py @@ -343,10 +343,9 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - if 'HOME' in os.environ: - user_file = os.path.join(os.environ.get('HOME'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" diff --git a/tests/test_config.py b/tests/test_config.py new file mode 100644 index 0000000000..bfce3e3e72 --- /dev/null +++ b/tests/test_config.py @@ -0,0 +1,105 @@ +"""Tests for distutils.pypirc.pypirc.""" +import sys +import os +import unittest + +from distutils.core import PyPIRCCommand +from distutils.core import Distribution + +from distutils.tests import support + +PYPIRC = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:secret + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + +PYPIRC_OLD = """\ +[server-login] +username:tarek +password:secret +""" + +class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): + + def setUp(self): + """Patches the environment.""" + if os.environ.has_key('HOME'): + self._old_home = os.environ['HOME'] + else: + self._old_home = None + curdir = os.path.dirname(__file__) + os.environ['HOME'] = curdir + self.rc = os.path.join(curdir, '.pypirc') + self.dist = Distribution() + + class command(PyPIRCCommand): + def __init__(self, dist): + PyPIRCCommand.__init__(self, dist) + def initialize_options(self): + pass + finalize_options = initialize_options + + self._cmd = command + + def tearDown(self): + """Removes the patch.""" + if self._old_home is None: + del os.environ['HOME'] + else: + os.environ['HOME'] = self._old_home + if os.path.exists(self.rc): + os.remove(self.rc) + + def test_server_registration(self): + # This test makes sure PyPIRCCommand knows how to: + # 1. handle several sections in .pypirc + # 2. handle the old format + + # new format + f = open(self.rc, 'w') + try: + f.write(PYPIRC) + finally: + f.close() + + cmd = self._cmd(self.dist) + config = cmd._read_pypirc() + + config = config.items() + config.sort() + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi'), + ('server', 'server1'), ('username', 'me')] + self.assertEquals(config, waited) + + # old format + f = open(self.rc, 'w') + f.write(PYPIRC_OLD) + f.close() + + config = cmd._read_pypirc() + config = config.items() + config.sort() + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi'), + ('server', 'server-login'), ('username', 'tarek')] + self.assertEquals(config, waited) + +def test_suite(): + return unittest.makeSuite(PyPIRCCommandTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_dist.py b/tests/test_dist.py index 5ae79332c0..804c8a4686 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -55,6 +55,7 @@ def test_command_packages_unspecified(self): self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_command_packages_cmdline(self): + from distutils.tests.test_dist import test_dist sys.argv.extend(["--command-packages", "foo.bar,distutils.tests", "test_dist", @@ -179,9 +180,54 @@ def format_metadata(self, dist): dist.metadata.write_pkg_file(sio) return sio.getvalue() + def test_custom_pydistutils(self): + # fixes #2166 + # make sure pydistutils.cfg is found + old = {} + for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): + value = os.environ.get(env) + old[env] = value + if value is not None: + del os.environ[env] + + if os.name == 'posix': + user_filename = ".pydistutils.cfg" + else: + user_filename = "pydistutils.cfg" + + curdir = os.path.dirname(__file__) + user_filename = os.path.join(curdir, user_filename) + f = open(user_filename, 'w') + f.write('.') + f.close() + + try: + dist = distutils.dist.Distribution() + + # linux-style + if sys.platform in ('linux', 'darwin'): + os.environ['HOME'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + + # win32-style + if sys.platform == 'win32': + # home drive should be found + os.environ['HOMEPATH'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + finally: + for key, value in old.items(): + if value is None: + continue + os.environ[key] = value + os.remove(user_filename) def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) suite.addTest(unittest.makeSuite(MetadataTestCase)) return suite + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_upload.py b/tests/test_upload.py new file mode 100644 index 0000000000..b05ab1f78b --- /dev/null +++ b/tests/test_upload.py @@ -0,0 +1,34 @@ +"""Tests for distutils.command.upload.""" +import sys +import os +import unittest + +from distutils.command.upload import upload +from distutils.core import Distribution + +from distutils.tests import support +from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase + +class uploadTestCase(PyPIRCCommandTestCase): + + def test_finalize_options(self): + + # new format + f = open(self.rc, 'w') + f.write(PYPIRC) + f.close() + + dist = Distribution() + cmd = upload(dist) + cmd.finalize_options() + for attr, waited in (('username', 'me'), ('password', 'secret'), + ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi')): + self.assertEquals(getattr(cmd, attr), waited) + + +def test_suite(): + return unittest.makeSuite(uploadTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 9dd1c5afa5e07e7da296484f3508464e9622a5bf Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sun, 11 May 2008 19:15:52 +0000 Subject: [PATCH 1980/8469] Add message to test assertion --- tests/test_dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 804c8a4686..05342af829 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -215,7 +215,8 @@ def test_custom_pydistutils(self): # home drive should be found os.environ['HOMEPATH'] = curdir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assert_(user_filename in files, + '%r not found in %r' % (user_filename, files)) finally: for key, value in old.items(): if value is None: From 34cbcc09ce17524bcef6b344b93a8968f2c34582 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sun, 11 May 2008 20:08:33 +0000 Subject: [PATCH 1981/8469] Try setting HOME env.var to fix test on Win32 --- tests/test_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 05342af829..8f1288e9f6 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -213,7 +213,7 @@ def test_custom_pydistutils(self): # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOMEPATH'] = curdir + os.environ['HOME'] = curdir files = dist.find_config_files() self.assert_(user_filename in files, '%r not found in %r' % (user_filename, files)) From 2a4ac571e1458d6871960e7fc687eaba5b6b778d Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Wed, 14 May 2008 22:44:22 +0000 Subject: [PATCH 1982/8469] Updated import statements to use the new `configparser` module name. Updated the documentation to use the new name. Revert addition of the stub entry for the old name. Georg, I am reverting your changes since this commit should propagate to py3k. --- command/upload.py | 2 +- config.py | 2 +- dist.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index daf681128d..ecc06f05ec 100644 --- a/command/upload.py +++ b/command/upload.py @@ -10,7 +10,7 @@ import os import socket import platform -import ConfigParser +import configparser import httplib import base64 import urlparse diff --git a/config.py b/config.py index cf547698a9..e9ba40260c 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,7 @@ """ import os import sys -from ConfigParser import ConfigParser +from configparser import ConfigParser from distutils.core import Command diff --git a/dist.py b/dist.py index 0b13c1e6c1..e4ab3363d8 100644 --- a/dist.py +++ b/dist.py @@ -359,7 +359,7 @@ def find_config_files (self): def parse_config_files (self, filenames=None): - from ConfigParser import ConfigParser + from configparser import ConfigParser if filenames is None: filenames = self.find_config_files() From 9285f7c07f1c115cfbf61b15b00925f1ea4be940 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Wed, 14 May 2008 22:59:42 +0000 Subject: [PATCH 1983/8469] Renamed ConfigParser to configparser. Merged revisions 63247-63248 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63247 | georg.brandl | 2008-05-14 18:30:31 -0400 (Wed, 14 May 2008) | 2 lines Update configparser docs for lowercasing rename. ........ r63248 | alexandre.vassalotti | 2008-05-14 18:44:22 -0400 (Wed, 14 May 2008) | 8 lines Updated import statements to use the new `configparser` module name. Updated the documentation to use the new name. Revert addition of the stub entry for the old name. Georg, I am reverting your changes since this commit should propagate to py3k. ........ --- command/upload.py | 2 +- dist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/upload.py b/command/upload.py index 34b6692d04..23999ae9ca 100644 --- a/command/upload.py +++ b/command/upload.py @@ -10,7 +10,7 @@ import os import socket import platform -import ConfigParser +import configparser import httplib import base64 import urlparse diff --git a/dist.py b/dist.py index ade2ab795c..847eb902cf 100644 --- a/dist.py +++ b/dist.py @@ -349,7 +349,7 @@ def find_config_files (self): def parse_config_files (self, filenames=None): - from ConfigParser import ConfigParser + from configparser import ConfigParser if filenames is None: filenames = self.find_config_files() From 04c09e98e06c0b9467e8f22c52d2fe052fd505e1 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Thu, 15 May 2008 00:33:57 +0000 Subject: [PATCH 1984/8469] Revert distutils changes done in r63248. As explained by Marc-Andre Lemburg, distutils needs to stay backward-compatible. Therefore, it should use the old ConfigParser module name. --- command/upload.py | 2 +- config.py | 2 +- dist.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index ecc06f05ec..daf681128d 100644 --- a/command/upload.py +++ b/command/upload.py @@ -10,7 +10,7 @@ import os import socket import platform -import configparser +import ConfigParser import httplib import base64 import urlparse diff --git a/config.py b/config.py index e9ba40260c..cf547698a9 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,7 @@ """ import os import sys -from configparser import ConfigParser +from ConfigParser import ConfigParser from distutils.core import Command diff --git a/dist.py b/dist.py index e4ab3363d8..0b13c1e6c1 100644 --- a/dist.py +++ b/dist.py @@ -359,7 +359,7 @@ def find_config_files (self): def parse_config_files (self, filenames=None): - from configparser import ConfigParser + from ConfigParser import ConfigParser if filenames is None: filenames = self.find_config_files() From 7af87d550e429290a39a66350c57fd30141080f1 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Thu, 15 May 2008 02:14:05 +0000 Subject: [PATCH 1985/8469] Fixed configparser import in distutils.config. --- config.py | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 config.py diff --git a/config.py b/config.py new file mode 100644 index 0000000000..e9ba40260c --- /dev/null +++ b/config.py @@ -0,0 +1,124 @@ +"""distutils.pypirc + +Provides the PyPIRCCommand class, the base class for the command classes +that uses .pypirc in the distutils.command package. +""" +import os +import sys +from configparser import ConfigParser + +from distutils.core import Command + +DEFAULT_PYPIRC = """\ +[pypirc] +servers = + pypi + +[pypi] +username:%s +password:%s +""" + +class PyPIRCCommand(Command): + """Base command that knows how to handle the .pypirc file + """ + DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + DEFAULT_REALM = 'pypi' + repository = None + realm = None + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]" % \ + DEFAULT_REPOSITORY), + ('show-response', None, + 'display full response text from server')] + + boolean_options = ['show-response'] + + def _get_rc_file(self): + """Returns rc file path.""" + return os.path.join(os.path.expanduser('~'), '.pypirc') + + def _store_pypirc(self, username, password): + """Creates a default .pypirc file.""" + rc = self._get_rc_file() + f = open(rc, 'w') + try: + f.write(DEFAULT_PYPIRC % (username, password)) + finally: + f.close() + try: + os.chmod(rc, 0600) + except OSError: + # should do something better here + pass + + def _read_pypirc(self): + """Reads the .pypirc file.""" + rc = self._get_rc_file() + if os.path.exists(rc): + print 'Using PyPI login from %s' % rc + repository = self.repository or self.DEFAULT_REPOSITORY + realm = self.realm or self.DEFAULT_REALM + + config = ConfigParser() + config.read(rc) + sections = config.sections() + if 'distutils' in sections: + # let's get the list of servers + index_servers = config.get('distutils', 'index-servers') + _servers = [server.strip() for server in + index_servers.split('\n') + if server.strip() != ''] + if _servers == []: + # nothing set, let's try to get the default pypi + if 'pypi' in sections: + _servers = ['pypi'] + else: + # the file is not properly defined, returning + # an empty dict + return {} + for server in _servers: + current = {'server': server} + current['username'] = config.get(server, 'username') + current['password'] = config.get(server, 'password') + + # optional params + for key, default in (('repository', + self.DEFAULT_REPOSITORY), + ('realm', self.DEFAULT_REALM)): + if config.has_option(server, key): + current[key] = config.get(server, key) + else: + current[key] = default + if (current['server'] == repository or + current['repository'] == repository): + return current + elif 'server-login' in sections: + # old format + server = 'server-login' + if config.has_option(server, 'repository'): + repository = config.get(server, 'repository') + else: + repository = self.DEFAULT_REPOSITORY + return {'username': config.get(server, 'username'), + 'password': config.get(server, 'password'), + 'repository': repository, + 'server': server, + 'realm': self.DEFAULT_REALM} + + return {} + + def initialize_options(self): + """Initialize options.""" + self.repository = None + self.realm = None + self.show_response = 0 + + def finalize_options(self): + """Finalizes options.""" + if self.repository is None: + self.repository = self.DEFAULT_REPOSITORY + if self.realm is None: + self.realm = self.DEFAULT_REALM From 1ea453fe09439490fd90dff0675db494b5b82b86 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 15 May 2008 20:06:51 +0000 Subject: [PATCH 1986/8469] Use lowercase version of module name --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index cf547698a9..e9ba40260c 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,7 @@ """ import os import sys -from ConfigParser import ConfigParser +from configparser import ConfigParser from distutils.core import Command From f543720ad42bf00329d322a6ae72f69a9e3d90b4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 15 May 2008 20:07:39 +0000 Subject: [PATCH 1987/8469] Import class from distutils.cmd, not .core, to avoid circular import --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index e9ba40260c..edba47f579 100644 --- a/config.py +++ b/config.py @@ -7,7 +7,7 @@ import sys from configparser import ConfigParser -from distutils.core import Command +from distutils.cmd import Command DEFAULT_PYPIRC = """\ [pypirc] From c926aa0be33963fb9fe9c776acf77df7a25770c1 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Thu, 15 May 2008 20:13:54 +0000 Subject: [PATCH 1988/8469] Fixed another missed ConfigParser import rename. --- command/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/register.py b/command/register.py index 40d9f20d1a..b6a36f5bfe 100644 --- a/command/register.py +++ b/command/register.py @@ -8,7 +8,7 @@ __revision__ = "$Id$" import os, string, urllib2, getpass, urlparse -import io, ConfigParser +import io, configparser from distutils.core import Command from distutils.errors import * From a2b4da6548ce557e87cbc6a40bf312fb308d4d4b Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Thu, 15 May 2008 20:30:56 +0000 Subject: [PATCH 1989/8469] Revert r63323: Use lowercase version of module name. The distutils module should continue to use the old ConfigParser name, for backward-compatibility. --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index edba47f579..f1117beed1 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,7 @@ """ import os import sys -from configparser import ConfigParser +from ConfigParser import ConfigParser from distutils.cmd import Command From 67495c271aba3864b15d2e9f2fab5cb7c775edc0 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Thu, 15 May 2008 22:09:29 +0000 Subject: [PATCH 1990/8469] Merged revisions 62914-62916,62918-62919,62921-62922,62924-62942,62944-62945,62947-62949 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62914 | skip.montanaro | 2008-05-08 20:45:00 -0400 (Thu, 08 May 2008) | 4 lines Add an example about using NamedTemporaryFile() to replace mktemp(). I'm unclear whether the verbatim text should have been indented or by how much. ........ r62915 | benjamin.peterson | 2008-05-08 20:50:40 -0400 (Thu, 08 May 2008) | 2 lines reindent example ........ r62927 | georg.brandl | 2008-05-09 02:09:25 -0400 (Fri, 09 May 2008) | 2 lines #2788: add .hgignore file. ........ r62928 | georg.brandl | 2008-05-09 02:10:43 -0400 (Fri, 09 May 2008) | 2 lines #2781: fix function name. ........ r62929 | georg.brandl | 2008-05-09 02:18:27 -0400 (Fri, 09 May 2008) | 2 lines Add a sentence to basicConfig() that is in the docstring. ........ r62930 | georg.brandl | 2008-05-09 02:26:54 -0400 (Fri, 09 May 2008) | 2 lines Add another link to colorsys docs. ........ r62931 | georg.brandl | 2008-05-09 02:36:07 -0400 (Fri, 09 May 2008) | 2 lines Add Kodos as a re reference. ........ r62932 | georg.brandl | 2008-05-09 02:39:58 -0400 (Fri, 09 May 2008) | 2 lines Add a note about using reload(). ........ r62933 | andrew.kuchling | 2008-05-09 07:46:05 -0400 (Fri, 09 May 2008) | 3 lines Update planned release date. Uncomment PEP 370 section. Add some module items ........ r62934 | christian.heimes | 2008-05-09 08:19:09 -0400 (Fri, 09 May 2008) | 1 line Add --user option to build_ext ........ r62948 | mark.dickinson | 2008-05-09 13:54:23 -0400 (Fri, 09 May 2008) | 3 lines Issue #2487. math.ldexp(x, n) raised OverflowError when n was large and negative; fix to return an (appropriately signed) zero instead. ........ r62949 | martin.v.loewis | 2008-05-09 14:21:55 -0400 (Fri, 09 May 2008) | 1 line Use the CHM file name that Sphinx assigns. ........ --- command/build_ext.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index e01121986c..73cc00ba0f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import sys, os, re +from site import USER_BASE, USER_SITE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -90,9 +91,11 @@ class build_ext(Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), + ('user', None, + "add user include, library and rpath"), ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] help_options = [ ('help-compiler', None, @@ -120,6 +123,7 @@ def initialize_options(self): self.swig = None self.swig_cpp = None self.swig_opts = None + self.user = None def finalize_options(self): from distutils import sysconfig @@ -253,6 +257,16 @@ def finalize_options(self): else: self.swig_opts = self.swig_opts.split(' ') + # Finally add the user include and library directories if requested + if self.user: + user_include = os.path.join(USER_BASE, "include") + user_lib = os.path.join(USER_BASE, "lib") + if os.path.isdir(user_include): + self.include_dirs.append(user_include) + if os.path.isdir(user_lib): + self.library_dirs.append(user_lib) + self.rpath.append(user_lib) + def run(self): from distutils.ccompiler import new_compiler From f71e81f1f9cf18ae21fe3e17c4ac17e83b3ef403 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Fri, 16 May 2008 00:03:33 +0000 Subject: [PATCH 1991/8469] Merged revisions 62998-63003,63005-63006,63009-63012,63014-63017,63019-63020,63022-63024,63026-63029,63031-63041,63043-63045,63047-63054,63056-63062 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r62998 | andrew.kuchling | 2008-05-10 15:51:55 -0400 (Sat, 10 May 2008) | 7 lines #1858 from Tarek Ziade: Allow multiple repositories in .pypirc; see http://wiki.python.org/moin/EnhancedPyPI for discussion. The patch is slightly revised from Tarek's last patch: I've simplified the PyPIRCCommand.finalize_options() method to not look at sys.argv. Tests still pass. ........ r63000 | alexandre.vassalotti | 2008-05-10 15:59:16 -0400 (Sat, 10 May 2008) | 5 lines Cleaned up io._BytesIO.write(). I am amazed that the old code, for inserting null-bytes, actually worked. Who wrote that thing? Oh, it is me... doh. ........ r63002 | brett.cannon | 2008-05-10 16:52:01 -0400 (Sat, 10 May 2008) | 2 lines Revert r62998 as it broke the build (seems distutils.config is missing). ........ r63014 | andrew.kuchling | 2008-05-10 18:12:38 -0400 (Sat, 10 May 2008) | 1 line #1858: add distutils.config module ........ r63027 | brett.cannon | 2008-05-10 21:09:32 -0400 (Sat, 10 May 2008) | 2 lines Flesh out the 3.0 deprecation to suggest using the ctypes module. ........ r63028 | skip.montanaro | 2008-05-10 22:59:30 -0400 (Sat, 10 May 2008) | 4 lines Copied two versions of the example from the interactive session. Delete one. ........ r63037 | georg.brandl | 2008-05-11 03:02:17 -0400 (Sun, 11 May 2008) | 2 lines reload() takes the module itself. ........ r63038 | alexandre.vassalotti | 2008-05-11 03:06:04 -0400 (Sun, 11 May 2008) | 4 lines Added test framework for handling module renames. Factored the import guard in test_py3kwarn.TestStdlibRemovals into a context manager, namely test_support.CleanImport. ........ r63039 | georg.brandl | 2008-05-11 03:06:05 -0400 (Sun, 11 May 2008) | 2 lines #2742: ``''`` is not converted to NULL in getaddrinfo. ........ r63040 | alexandre.vassalotti | 2008-05-11 03:08:12 -0400 (Sun, 11 May 2008) | 2 lines Fixed typo in a comment of test_support.CleanImport. ........ r63041 | alexandre.vassalotti | 2008-05-11 03:10:25 -0400 (Sun, 11 May 2008) | 2 lines Removed a dead line of code. ........ r63043 | georg.brandl | 2008-05-11 04:47:53 -0400 (Sun, 11 May 2008) | 2 lines #2812: document property.getter/setter/deleter. ........ r63049 | georg.brandl | 2008-05-11 05:06:30 -0400 (Sun, 11 May 2008) | 2 lines #1153769: document PEP 237 changes to string formatting. ........ r63050 | georg.brandl | 2008-05-11 05:11:40 -0400 (Sun, 11 May 2008) | 2 lines #2809: elaborate str.split docstring a bit. ........ r63051 | georg.brandl | 2008-05-11 06:13:59 -0400 (Sun, 11 May 2008) | 2 lines Fix typo. ........ r63052 | georg.brandl | 2008-05-11 06:33:27 -0400 (Sun, 11 May 2008) | 2 lines #2709: clarification. ........ r63053 | georg.brandl | 2008-05-11 06:42:28 -0400 (Sun, 11 May 2008) | 2 lines #2659: add ``break_on_hyphens`` to TextWrapper. ........ r63057 | georg.brandl | 2008-05-11 06:59:39 -0400 (Sun, 11 May 2008) | 2 lines #2741: clarification of value range for address_family. ........ r63058 | georg.brandl | 2008-05-11 07:09:35 -0400 (Sun, 11 May 2008) | 2 lines #2452: timeout is used for all blocking operations. ........ r63059 | andrew.kuchling | 2008-05-11 09:33:56 -0400 (Sun, 11 May 2008) | 2 lines #1792: Improve performance of marshal.dumps() on large objects by increasing the size of the buffer more quickly. ........ r63060 | andrew.kuchling | 2008-05-11 10:00:00 -0400 (Sun, 11 May 2008) | 1 line #1858: re-apply patch for this, adding the missing files ........ r63061 | benjamin.peterson | 2008-05-11 10:13:25 -0400 (Sun, 11 May 2008) | 2 lines Add the "until" command to pdb ........ r63062 | georg.brandl | 2008-05-11 10:17:13 -0400 (Sun, 11 May 2008) | 2 lines Add some sentence endings. ........ --- command/register.py | 95 +++++++++++++++++++-------------------- command/upload.py | 41 ++++++----------- config.py | 4 +- core.py | 1 + dist.py | 7 ++- tests/test_config.py | 103 +++++++++++++++++++++++++++++++++++++++++++ tests/test_dist.py | 46 +++++++++++++++++++ tests/test_upload.py | 34 ++++++++++++++ 8 files changed, 250 insertions(+), 81 deletions(-) create mode 100644 tests/test_config.py create mode 100644 tests/test_upload.py diff --git a/command/register.py b/command/register.py index b6a36f5bfe..89cb2d410c 100644 --- a/command/register.py +++ b/command/register.py @@ -8,42 +8,34 @@ __revision__ = "$Id$" import os, string, urllib2, getpass, urlparse -import io, configparser +import io -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.errors import * +from distutils import log def raw_input(prompt): sys.stdout.write(prompt) sys.stdout.flush() return sys.stdin.readline() -class register(Command): +class register(PyPIRCCommand): description = ("register the distribution with the Python package index") - - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]"%DEFAULT_REPOSITORY), + user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), - ('show-response', None, - 'display full response text from server'), ] - boolean_options = ['verify', 'show-response', 'list-classifiers'] + boolean_options = PyPIRCCommand.boolean_options + [ + 'verify', 'list-classifiers'] def initialize_options(self): - self.repository = None - self.show_response = 0 + PyPIRCCommand.initialize_options(self) self.list_classifiers = 0 - def finalize_options(self): - if self.repository is None: - self.repository = self.DEFAULT_REPOSITORY - def run(self): + self.finalize_options() + self._set_config() self.check_metadata() if self.dry_run: self.verify_metadata() @@ -82,6 +74,23 @@ def check_metadata(self): "or (maintainer and maintainer_email) " + "must be supplied") + def _set_config(self): + ''' Reads the configuration file and set attributes. + ''' + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] + self.has_config = True + else: + if self.repository not in ('pypi', self.DEFAULT_REPOSITORY): + raise ValueError('%s not found in .pypirc' % self.repository) + if self.repository == 'pypi': + self.repository = self.DEFAULT_REPOSITORY + self.has_config = False + def classifiers(self): ''' Fetch the list of classifiers from the server. ''' @@ -95,6 +104,7 @@ def verify_metadata(self): (code, result) = self.post_to_server(self.build_post_data('verify')) print('Server response (%s): %s'%(code, result)) + def send_metadata(self): ''' Send the metadata to the package index server. @@ -104,10 +114,14 @@ def send_metadata(self): First we try to read the username/password from $HOME/.pypirc, which is a ConfigParser-formatted file with a section - [server-login] containing username and password entries (both + [distutils] containing username and password entries (both in clear text). Eg: - [server-login] + [distutils] + index-servers = + pypi + + [pypi] username: fred password: sekrit @@ -119,21 +133,15 @@ def send_metadata(self): 3. set the password to a random string and email the user. ''' - choice = 'x' - username = password = '' - # see if we can short-cut and get the username/password from the # config - config = None - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - print('Using PyPI login from %s'%rc) - config = ConfigParser.ConfigParser() - config.read(rc) - username = config.get('server-login', 'username') - password = config.get('server-login', 'password') - choice = '1' + if self.has_config: + choice = '1' + username = self.username + password = self.password + else: + choice = 'x' + username = password = '' # get the user's login info choices = '1 2 3 4'.split() @@ -160,32 +168,24 @@ def send_metadata(self): # set up the authentication auth = urllib2.HTTPPasswordMgr() host = urlparse.urlparse(self.repository)[1] - auth.add_password('pypi', host, username, password) - + auth.add_password(self.realm, host, username, password) # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) print('Server response (%s): %s'%(code, result)) # possibly save the login - if 'HOME' in os.environ and config is None and code == 200: - rc = os.path.join(os.environ['HOME'], '.pypirc') + if not self.has_config and code == 200: print('I can store your PyPI login so future submissions will be faster.') - print('(the login will be stored in %s)'%rc) + print('(the login will be stored in %s)' % self._get_rc_file()) choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') if not choice: choice = 'n' if choice.lower() == 'y': - f = open(rc, 'w') - f.write('[server-login]\nusername:%s\npassword:%s\n'%( - username, password)) - f.close() - try: - os.chmod(rc, 0o600) - except: - pass + self._store_pypirc(username, password) + elif choice == '2': data = {':action': 'user'} data['name'] = data['password'] = data['email'] = '' @@ -248,7 +248,8 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - + self.announce('Registering %s to %s' % (data['name'], + self.repository), log.INFO) # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary diff --git a/command/upload.py b/command/upload.py index 23999ae9ca..603336c954 100644 --- a/command/upload.py +++ b/command/upload.py @@ -3,7 +3,7 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * -from distutils.core import Command +from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log from hashlib import md5 @@ -15,53 +15,38 @@ import base64 import urlparse -class upload(Command): +class upload(PyPIRCCommand): description = "upload binary package to PyPI" - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' - - user_options = [ - ('repository=', 'r', - "url of repository [default: %s]" % DEFAULT_REPOSITORY), - ('show-response', None, - 'display full response text from server'), + user_options = PyPIRCCommand.user_options + [ ('sign', 's', 'sign files to upload using gpg'), ('identity=', 'i', 'GPG identity used to sign files'), ] - boolean_options = ['show-response', 'sign'] + + boolean_options = PyPIRCCommand.boolean_options + ['sign'] def initialize_options(self): + PyPIRCCommand.initialize_options(self) self.username = '' self.password = '' - self.repository = '' self.show_response = 0 self.sign = False self.identity = None def finalize_options(self): + PyPIRCCommand.finalize_options(self) if self.identity and not self.sign: raise DistutilsOptionError( "Must use --sign for --identity to have meaning" ) - if 'HOME' in os.environ: - rc = os.path.join(os.environ['HOME'], '.pypirc') - if os.path.exists(rc): - self.announce('Using PyPI login from %s' % rc) - config = ConfigParser.ConfigParser({ - 'username':'', - 'password':'', - 'repository':''}) - config.read(rc) - if not self.repository: - self.repository = config.get('server-login', 'repository') - if not self.username: - self.username = config.get('server-login', 'username') - if not self.password: - self.password = config.get('server-login', 'password') - if not self.repository: - self.repository = self.DEFAULT_REPOSITORY + config = self._read_pypirc() + if config != {}: + self.username = config['username'] + self.password = config['password'] + self.repository = config['repository'] + self.realm = config['realm'] def run(self): if not self.distribution.dist_files: diff --git a/config.py b/config.py index e9ba40260c..a625aec5e6 100644 --- a/config.py +++ b/config.py @@ -49,7 +49,7 @@ def _store_pypirc(self, username, password): finally: f.close() try: - os.chmod(rc, 0600) + os.chmod(rc, 0o600) except OSError: # should do something better here pass @@ -58,7 +58,7 @@ def _read_pypirc(self): """Reads the .pypirc file.""" rc = self._get_rc_file() if os.path.exists(rc): - print 'Using PyPI login from %s' % rc + print('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY realm = self.realm or self.DEFAULT_REALM diff --git a/core.py b/core.py index a4c5e18033..6e4892039e 100644 --- a/core.py +++ b/core.py @@ -17,6 +17,7 @@ # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution from distutils.cmd import Command +from distutils.config import PyPIRCCommand from distutils.extension import Extension # This is a barebones help message generated displayed when the user diff --git a/dist.py b/dist.py index 847eb902cf..ddde909fbd 100644 --- a/dist.py +++ b/dist.py @@ -334,10 +334,9 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - if 'HOME' in os.environ: - user_file = os.path.join(os.environ.get('HOME'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" diff --git a/tests/test_config.py b/tests/test_config.py new file mode 100644 index 0000000000..016ba4cc70 --- /dev/null +++ b/tests/test_config.py @@ -0,0 +1,103 @@ +"""Tests for distutils.pypirc.pypirc.""" +import sys +import os +import unittest + +from distutils.core import PyPIRCCommand +from distutils.core import Distribution + +from distutils.tests import support + +PYPIRC = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:secret + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + +PYPIRC_OLD = """\ +[server-login] +username:tarek +password:secret +""" + +class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): + + def setUp(self): + """Patches the environment.""" + if 'HOME' in os.environ: + self._old_home = os.environ['HOME'] + else: + self._old_home = None + curdir = os.path.dirname(__file__) + os.environ['HOME'] = curdir + self.rc = os.path.join(curdir, '.pypirc') + self.dist = Distribution() + + class command(PyPIRCCommand): + def __init__(self, dist): + PyPIRCCommand.__init__(self, dist) + def initialize_options(self): + pass + finalize_options = initialize_options + + self._cmd = command + + def tearDown(self): + """Removes the patch.""" + if self._old_home is None: + del os.environ['HOME'] + else: + os.environ['HOME'] = self._old_home + if os.path.exists(self.rc): + os.remove(self.rc) + + def test_server_registration(self): + # This test makes sure PyPIRCCommand knows how to: + # 1. handle several sections in .pypirc + # 2. handle the old format + + # new format + f = open(self.rc, 'w') + try: + f.write(PYPIRC) + finally: + f.close() + + cmd = self._cmd(self.dist) + config = cmd._read_pypirc() + + config = list(sorted(config.items())) + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi'), + ('server', 'server1'), ('username', 'me')] + self.assertEquals(config, waited) + + # old format + f = open(self.rc, 'w') + f.write(PYPIRC_OLD) + f.close() + + config = cmd._read_pypirc() + config = list(sorted(config.items())) + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi'), + ('server', 'server-login'), ('username', 'tarek')] + self.assertEquals(config, waited) + +def test_suite(): + return unittest.makeSuite(PyPIRCCommandTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_dist.py b/tests/test_dist.py index 91acf45805..81459ace53 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -55,6 +55,7 @@ def test_command_packages_unspecified(self): self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_command_packages_cmdline(self): + from distutils.tests.test_dist import test_dist sys.argv.extend(["--command-packages", "foo.bar,distutils.tests", "test_dist", @@ -179,9 +180,54 @@ def format_metadata(self, dist): dist.metadata.write_pkg_file(sio) return sio.getvalue() + def test_custom_pydistutils(self): + # fixes #2166 + # make sure pydistutils.cfg is found + old = {} + for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): + value = os.environ.get(env) + old[env] = value + if value is not None: + del os.environ[env] + + if os.name == 'posix': + user_filename = ".pydistutils.cfg" + else: + user_filename = "pydistutils.cfg" + + curdir = os.path.dirname(__file__) + user_filename = os.path.join(curdir, user_filename) + f = open(user_filename, 'w') + f.write('.') + f.close() + + try: + dist = distutils.dist.Distribution() + + # linux-style + if sys.platform in ('linux', 'darwin'): + os.environ['HOME'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + + # win32-style + if sys.platform == 'win32': + # home drive should be found + os.environ['HOMEPATH'] = curdir + files = dist.find_config_files() + self.assert_(user_filename in files) + finally: + for key, value in old.items(): + if value is None: + continue + os.environ[key] = value + os.remove(user_filename) def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) suite.addTest(unittest.makeSuite(MetadataTestCase)) return suite + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_upload.py b/tests/test_upload.py new file mode 100644 index 0000000000..b05ab1f78b --- /dev/null +++ b/tests/test_upload.py @@ -0,0 +1,34 @@ +"""Tests for distutils.command.upload.""" +import sys +import os +import unittest + +from distutils.command.upload import upload +from distutils.core import Distribution + +from distutils.tests import support +from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase + +class uploadTestCase(PyPIRCCommandTestCase): + + def test_finalize_options(self): + + # new format + f = open(self.rc, 'w') + f.write(PYPIRC) + f.close() + + dist = Distribution() + cmd = upload(dist) + cmd.finalize_options() + for attr, waited in (('username', 'me'), ('password', 'secret'), + ('realm', 'pypi'), + ('repository', 'http://pypi.python.org/pypi')): + self.assertEquals(getattr(cmd, attr), waited) + + +def test_suite(): + return unittest.makeSuite(uploadTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 17a42fcbc36865bdf006384e396f968312103464 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Fri, 16 May 2008 00:41:41 +0000 Subject: [PATCH 1992/8469] Merged revisions 63066-63076,63079,63081-63085,63087-63097,63099,63101-63104 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63066 | georg.brandl | 2008-05-11 10:56:04 -0400 (Sun, 11 May 2008) | 2 lines #2709 followup: better description of Tk's pros and cons. ........ r63067 | georg.brandl | 2008-05-11 11:05:13 -0400 (Sun, 11 May 2008) | 2 lines #1326: document and test zipimporter.archive and zipimporter.prefix. ........ r63068 | georg.brandl | 2008-05-11 11:07:39 -0400 (Sun, 11 May 2008) | 2 lines #2816: clarify error messages for EOF while scanning strings. ........ r63069 | georg.brandl | 2008-05-11 11:17:41 -0400 (Sun, 11 May 2008) | 3 lines #2787: Flush stdout after writing test name, helpful when running hanging or long-running tests. Patch by Adam Olsen. ........ r63070 | georg.brandl | 2008-05-11 11:20:16 -0400 (Sun, 11 May 2008) | 3 lines #2803: fix wrong invocation of heappush in seldom-reached code. Thanks to Matt Harden. ........ r63073 | benjamin.peterson | 2008-05-11 12:38:07 -0400 (Sun, 11 May 2008) | 2 lines broaden .bzrignore ........ r63076 | andrew.kuchling | 2008-05-11 15:15:52 -0400 (Sun, 11 May 2008) | 1 line Add message to test assertion ........ r63083 | andrew.kuchling | 2008-05-11 16:08:33 -0400 (Sun, 11 May 2008) | 1 line Try setting HOME env.var to fix test on Win32 ........ r63092 | georg.brandl | 2008-05-11 16:53:55 -0400 (Sun, 11 May 2008) | 2 lines #2809 followup: even better split docstring. ........ r63094 | georg.brandl | 2008-05-11 17:03:42 -0400 (Sun, 11 May 2008) | 4 lines - #2250: Exceptions raised during evaluation of names in rlcompleter's ``Completer.complete()`` method are now caught and ignored. ........ r63095 | georg.brandl | 2008-05-11 17:16:37 -0400 (Sun, 11 May 2008) | 2 lines Clarify os.strerror()s exception behavior. ........ r63097 | georg.brandl | 2008-05-11 17:34:10 -0400 (Sun, 11 May 2008) | 2 lines #2535: remove duplicated method. ........ r63104 | alexandre.vassalotti | 2008-05-11 19:04:27 -0400 (Sun, 11 May 2008) | 2 lines Moved the Queue module stub in lib-old. ........ --- tests/test_dist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 81459ace53..dd0773508e 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -213,9 +213,10 @@ def test_custom_pydistutils(self): # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOMEPATH'] = curdir + os.environ['HOME'] = curdir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assert_(user_filename in files, + '%r not found in %r' % (user_filename, files)) finally: for key, value in old.items(): if value is None: From 372161eb00ab6befb04dd3a2a85d38238efd5b0e Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Fri, 16 May 2008 02:06:59 +0000 Subject: [PATCH 1993/8469] Fixed import of configparser in the distutils module. If configparser is unavailable, try to import configparser using its old name. This is required for backward-compatibility with older Python versions. --- command/upload.py | 7 ++++++- config.py | 6 +++++- dist.py | 7 +++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/command/upload.py b/command/upload.py index daf681128d..92c4bf204e 100644 --- a/command/upload.py +++ b/command/upload.py @@ -10,11 +10,16 @@ import os import socket import platform -import ConfigParser import httplib import base64 import urlparse import cStringIO as StringIO +try: + from configparser import ConfigParser +except ImportError: + # For backward-compatibility with Python versions < 2.6. + from ConfigParser import ConfigParser + class upload(PyPIRCCommand): diff --git a/config.py b/config.py index f1117beed1..35a21ec211 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,11 @@ """ import os import sys -from ConfigParser import ConfigParser +try: + from configparser import ConfigParser +except ImportError: + # For backward-compatibility with Python versions < 2.6. + from ConfigParser import ConfigParser from distutils.cmd import Command diff --git a/dist.py b/dist.py index 0b13c1e6c1..6299919fdf 100644 --- a/dist.py +++ b/dist.py @@ -358,8 +358,11 @@ def find_config_files (self): def parse_config_files (self, filenames=None): - - from ConfigParser import ConfigParser + try: + from configparser import ConfigParser + except ImportError: + # For backward-compatibility with Python versions < 2.6. + from ConfigParser import ConfigParser if filenames is None: filenames = self.find_config_files() From fbd52989678335fca9cbf0007209bd04513036eb Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Fri, 16 May 2008 04:39:54 +0000 Subject: [PATCH 1994/8469] Merged revisions 63208-63209,63211-63212,63214-63217,63219-63224,63226-63227,63229-63232,63234-63235,63237-63239,63241,63243-63246,63250-63254,63256-63259,63261,63263-63264,63266-63267,63269-63270,63272-63273,63275-63276,63278,63280-63281,63283-63284,63286-63287,63289-63290,63292-63293,63295-63296,63298-63299,63301-63302,63304-63305,63307,63309-63314,63316-63322,63324-63325,63327-63335,63337-63338,63340-63342,63344-63346,63348 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63208 | georg.brandl | 2008-05-13 15:04:54 -0400 (Tue, 13 May 2008) | 2 lines #2831: add start argument to enumerate(). Patch by Scott Dial and me. ........ r63209 | marc-andre.lemburg | 2008-05-13 15:10:45 -0400 (Tue, 13 May 2008) | 3 lines Remove leftovers from reverted setuptools checkin (they were added in r45525). ........ r63211 | georg.brandl | 2008-05-13 17:32:03 -0400 (Tue, 13 May 2008) | 2 lines Fix a refleak in the _warnings module. ........ r63212 | andrew.kuchling | 2008-05-13 20:46:41 -0400 (Tue, 13 May 2008) | 1 line List all the removes and renamed modules ........ r63214 | brett.cannon | 2008-05-13 21:09:40 -0400 (Tue, 13 May 2008) | 2 lines Rewrap some lines in test_py3kwarn. ........ r63219 | georg.brandl | 2008-05-14 02:34:15 -0400 (Wed, 14 May 2008) | 2 lines Add NEWS entry for #2831. ........ r63220 | neal.norwitz | 2008-05-14 02:47:56 -0400 (Wed, 14 May 2008) | 3 lines Fix "refleak" by restoring the tearDown method removed by accident (AFAICT) in r62788. ........ r63221 | georg.brandl | 2008-05-14 03:18:22 -0400 (Wed, 14 May 2008) | 2 lines Fix another "refleak" by clearing the filters after test. ........ r63222 | neal.norwitz | 2008-05-14 03:21:42 -0400 (Wed, 14 May 2008) | 5 lines Install the json package and tests as well as the lib2to3 tests so the tests work when run from an install directory. They are currently skipped on the daily runs (not from the buildbots) for checking refleaks, etc. ........ r63256 | andrew.kuchling | 2008-05-14 21:10:24 -0400 (Wed, 14 May 2008) | 1 line Note some removals and a rename ........ r63311 | brett.cannon | 2008-05-15 00:36:53 -0400 (Thu, 15 May 2008) | 2 lines Add a snippet for the deprecation directive for docs. ........ r63313 | gregory.p.smith | 2008-05-15 00:56:18 -0400 (Thu, 15 May 2008) | 5 lines disable the crashing test. I will also file a bug. This crash does not appear to be a new bug, its just that the test coverage went up recently exposing it. (I verified that by testing this test code on an older Modules/_bsddb.c) ........ r63320 | georg.brandl | 2008-05-15 11:08:32 -0400 (Thu, 15 May 2008) | 2 lines #2863: add gen.__name__ and add this name to generator repr(). ........ r63324 | andrew.kuchling | 2008-05-15 16:07:39 -0400 (Thu, 15 May 2008) | 1 line Import class from distutils.cmd, not .core, to avoid circular import ........ r63327 | alexandre.vassalotti | 2008-05-15 16:31:42 -0400 (Thu, 15 May 2008) | 2 lines Fixed typo in a doctest of test_genexps. ........ r63332 | benjamin.peterson | 2008-05-15 18:34:33 -0400 (Thu, 15 May 2008) | 2 lines add Mac modules to the list of deprecated ones ........ r63333 | benjamin.peterson | 2008-05-15 18:41:16 -0400 (Thu, 15 May 2008) | 2 lines fix typos in whatsnew ........ r63348 | benjamin.peterson | 2008-05-15 22:24:49 -0400 (Thu, 15 May 2008) | 2 lines make test_platform a bit more assertive (We'll see what the buildbots say.) ........ --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index a625aec5e6..6ffccaa095 100644 --- a/config.py +++ b/config.py @@ -7,7 +7,7 @@ import sys from configparser import ConfigParser -from distutils.core import Command +from distutils.cmd import Command DEFAULT_PYPIRC = """\ [pypirc] From 9c132229971073925b69493eb88596556c7a658c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 18 May 2008 11:52:36 +0000 Subject: [PATCH 1995/8469] GHOP #257: test distutils' build_ext command, written by Josip Dzolonga. --- tests/test_build_ext.py | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 tests/test_build_ext.py diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py new file mode 100644 index 0000000000..b5c2aa2339 --- /dev/null +++ b/tests/test_build_ext.py @@ -0,0 +1,72 @@ +import sys +import os +import tempfile +import shutil +from StringIO import StringIO + +from distutils.core import Extension, Distribution +from distutils.command.build_ext import build_ext +from distutils import sysconfig + +import unittest +from test import test_support + +class BuildExtTestCase(unittest.TestCase): + def setUp(self): + # Create a simple test environment + # Note that we're making changes to sys.path + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.sys_path = sys.path[:] + sys.path.append(self.tmp_dir) + + xx_c = os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') + shutil.copy(xx_c, self.tmp_dir) + + def test_build_ext(self): + xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') + xx_ext = Extension('xx', [xx_c]) + dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) + dist.package_dir = self.tmp_dir + cmd = build_ext(dist) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + old_stdout = sys.stdout + if not test_support.verbose: + # silence compiler output + sys.stdout = StringIO() + try: + cmd.ensure_finalized() + cmd.run() + finally: + sys.stdout = old_stdout + + import xx + + for attr in ('error', 'foo', 'new', 'roj'): + self.assert_(hasattr(xx, attr)) + + self.assertEquals(xx.foo(2, 5), 7) + self.assertEquals(xx.foo(13,15), 28) + self.assertEquals(xx.new().demo(), None) + doc = 'This is a template module just for instruction.' + self.assertEquals(xx.__doc__, doc) + self.assert_(isinstance(xx.Null(), xx.Null)) + self.assert_(isinstance(xx.Str(), xx.Str)) + + def tearDown(self): + # Get everything back to normal + test_support.unload('xx') + sys.path = self.sys_path + # XXX on Windows the test leaves a directory with xx.pyd in TEMP + shutil.rmtree(self.tmp_dir, False if os.name != "nt" else True) + +def test_suite(): + if not sysconfig.python_build: + if test_support.verbose: + print 'test_build_ext: The test must be run in a python build dir' + return unittest.TestSuite() + else: return unittest.makeSuite(BuildExtTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 0c96212a691e860e15ae057f59b5dab114d90c90 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 20 May 2008 21:35:26 +0000 Subject: [PATCH 1996/8469] #2621 rename test.test_support to test.support --- tests/test_core.py | 10 +++++----- tests/test_dist.py | 2 +- tests/test_sysconfig.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_core.py b/tests/test_core.py index 8e274dd40d..170d76751e 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -5,7 +5,7 @@ import os import shutil import sys -import test.test_support +import test.support import unittest @@ -39,13 +39,13 @@ def tearDown(self): self.cleanup_testfn() def cleanup_testfn(self): - path = test.test_support.TESTFN + path = test.support.TESTFN if os.path.isfile(path): os.remove(path) elif os.path.isdir(path): shutil.rmtree(path) - def write_setup(self, text, path=test.test_support.TESTFN): + def write_setup(self, text, path=test.support.TESTFN): open(path, "w").write(text) return path @@ -63,8 +63,8 @@ def test_run_setup_uses_current_dir(self): cwd = os.getcwd() # Create a directory and write the setup.py file there: - os.mkdir(test.test_support.TESTFN) - setup_py = os.path.join(test.test_support.TESTFN, "setup.py") + os.mkdir(test.support.TESTFN) + setup_py = os.path.join(test.support.TESTFN, "setup.py") distutils.core.run_setup( self.write_setup(setup_prints_cwd, path=setup_py)) diff --git a/tests/test_dist.py b/tests/test_dist.py index dd0773508e..f1b11c1745 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -7,7 +7,7 @@ import sys import unittest -from test.test_support import TESTFN +from test.support import TESTFN class test_dist(distutils.cmd.Command): diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index aa1187e77b..c6ab9aa5d5 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -4,7 +4,7 @@ import os import unittest -from test.test_support import TESTFN +from test.support import TESTFN class SysconfigTestCase(unittest.TestCase): From ca303a98aa60ae1678585125caeb983e27a2b096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 24 May 2008 09:00:04 +0000 Subject: [PATCH 1997/8469] Use announce instead of print, to suppress output in the testsuite. --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 35a21ec211..e07f8ac998 100644 --- a/config.py +++ b/config.py @@ -62,7 +62,7 @@ def _read_pypirc(self): """Reads the .pypirc file.""" rc = self._get_rc_file() if os.path.exists(rc): - print 'Using PyPI login from %s' % rc + self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY realm = self.realm or self.DEFAULT_REALM From f21c3f4abd01a3a0e8d94b71aa43e817ccebca98 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 25 May 2008 07:25:25 +0000 Subject: [PATCH 1998/8469] ConfigParser renaming reversal part 3: move module into place and adapt imports. --- command/upload.py | 6 +----- config.py | 6 +----- dist.py | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/command/upload.py b/command/upload.py index 92c4bf204e..8805d41da0 100644 --- a/command/upload.py +++ b/command/upload.py @@ -14,11 +14,7 @@ import base64 import urlparse import cStringIO as StringIO -try: - from configparser import ConfigParser -except ImportError: - # For backward-compatibility with Python versions < 2.6. - from ConfigParser import ConfigParser +from ConfigParser import ConfigParser class upload(PyPIRCCommand): diff --git a/config.py b/config.py index e07f8ac998..e3a4c57e33 100644 --- a/config.py +++ b/config.py @@ -5,11 +5,7 @@ """ import os import sys -try: - from configparser import ConfigParser -except ImportError: - # For backward-compatibility with Python versions < 2.6. - from ConfigParser import ConfigParser +from ConfigParser import ConfigParser from distutils.cmd import Command diff --git a/dist.py b/dist.py index 6299919fdf..0a21380973 100644 --- a/dist.py +++ b/dist.py @@ -358,11 +358,7 @@ def find_config_files (self): def parse_config_files (self, filenames=None): - try: - from configparser import ConfigParser - except ImportError: - # For backward-compatibility with Python versions < 2.6. - from ConfigParser import ConfigParser + from ConfigParser import ConfigParser if filenames is None: filenames = self.find_config_files() From 281cb13d4994a8d61b79b5d0fbc26eb3e2b29d23 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 25 May 2008 07:45:51 +0000 Subject: [PATCH 1999/8469] #2879: rename _winreg to winreg. --- msvc9compiler.py | 18 +++++++++--------- msvccompiler.py | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index c8d52c4237..fdb74aeabf 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -24,17 +24,17 @@ from distutils import log from distutils.util import get_platform -import _winreg +import winreg -RegOpenKeyEx = _winreg.OpenKeyEx -RegEnumKey = _winreg.EnumKey -RegEnumValue = _winreg.EnumValue -RegError = _winreg.error +RegOpenKeyEx = winreg.OpenKeyEx +RegEnumKey = winreg.EnumKey +RegEnumValue = winreg.EnumValue +RegError = winreg.error -HKEYS = (_winreg.HKEY_USERS, - _winreg.HKEY_CURRENT_USER, - _winreg.HKEY_LOCAL_MACHINE, - _winreg.HKEY_CLASSES_ROOT) +HKEYS = (winreg.HKEY_USERS, + winreg.HKEY_CURRENT_USER, + winreg.HKEY_LOCAL_MACHINE, + winreg.HKEY_CLASSES_ROOT) VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" diff --git a/msvccompiler.py b/msvccompiler.py index 71146dcfe3..1cd0f91d5f 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -20,15 +20,15 @@ _can_read_reg = False try: - import _winreg + import winreg _can_read_reg = True - hkey_mod = _winreg + hkey_mod = winreg - RegOpenKeyEx = _winreg.OpenKeyEx - RegEnumKey = _winreg.EnumKey - RegEnumValue = _winreg.EnumValue - RegError = _winreg.error + RegOpenKeyEx = winreg.OpenKeyEx + RegEnumKey = winreg.EnumKey + RegEnumValue = winreg.EnumValue + RegError = winreg.error except ImportError: try: @@ -44,7 +44,7 @@ except ImportError: log.info("Warning: Can't read registry to find the " "necessary compiler setting\n" - "Make sure that Python modules _winreg, " + "Make sure that Python modules winreg, " "win32api or win32con are installed.") pass From b923b203a06f4768e4793c212c10ab2594784536 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 25 May 2008 18:19:30 +0000 Subject: [PATCH 2000/8469] Merged revisions 63412,63445-63447,63449-63450,63452,63454,63459,63463,63465,63470,63483-63484,63496-63497,63499-63501,63530-63531,63540,63614 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63412 | georg.brandl | 2008-05-17 19:57:01 +0200 (Sat, 17 May 2008) | 2 lines #961805: fix Edit.text_modified(). ........ r63445 | georg.brandl | 2008-05-18 10:52:59 +0200 (Sun, 18 May 2008) | 2 lines GHOP #180 by Michael Schneider: add examples to the socketserver documentation. ........ r63446 | georg.brandl | 2008-05-18 11:12:20 +0200 (Sun, 18 May 2008) | 2 lines GHOP #134, #171, #137: unit tests for the three HTTPServer modules. ........ r63447 | georg.brandl | 2008-05-18 12:39:26 +0200 (Sun, 18 May 2008) | 3 lines Take namedtuple item names only from ascii_letters (this blew up on OSX), and make sure there are no duplicate names. ........ r63449 | georg.brandl | 2008-05-18 13:46:51 +0200 (Sun, 18 May 2008) | 2 lines GHOP #217: add support for compiling Python with coverage checking enabled. ........ r63450 | georg.brandl | 2008-05-18 13:52:36 +0200 (Sun, 18 May 2008) | 2 lines GHOP #257: test distutils' build_ext command, written by Josip Dzolonga. ........ r63452 | georg.brandl | 2008-05-18 15:34:06 +0200 (Sun, 18 May 2008) | 2 lines Add GHOP students. ........ r63454 | georg.brandl | 2008-05-18 18:32:48 +0200 (Sun, 18 May 2008) | 2 lines GHOP #121: improve test_pydoc, by Benjamin Peterson. ........ r63459 | benjamin.peterson | 2008-05-18 22:48:07 +0200 (Sun, 18 May 2008) | 2 lines bring test_pydoc up to my high standards (now that I have them) ........ r63463 | georg.brandl | 2008-05-18 23:10:19 +0200 (Sun, 18 May 2008) | 2 lines Fix test_pyclbr after another platform-dependent function was added to urllib. ........ r63465 | benjamin.peterson | 2008-05-19 01:07:07 +0200 (Mon, 19 May 2008) | 2 lines change some imports in tests so they will not be skipped in 3.0 ........ r63470 | georg.brandl | 2008-05-19 18:47:25 +0200 (Mon, 19 May 2008) | 2 lines test_httpservers has unpredictable refcount behavior. ........ r63483 | georg.brandl | 2008-05-20 08:15:36 +0200 (Tue, 20 May 2008) | 2 lines Activate two more test cases in test_httpservers. ........ r63484 | georg.brandl | 2008-05-20 08:47:31 +0200 (Tue, 20 May 2008) | 2 lines Argh, this is the *actual* test that works under Windows. ........ r63496 | georg.brandl | 2008-05-20 10:07:36 +0200 (Tue, 20 May 2008) | 2 lines Improve diffing logic and output for test_pydoc. ........ r63497 | georg.brandl | 2008-05-20 10:10:03 +0200 (Tue, 20 May 2008) | 2 lines Use inspect.getabsfile() to get the documented module's filename. ........ r63499 | georg.brandl | 2008-05-20 10:25:48 +0200 (Tue, 20 May 2008) | 3 lines Patch #1775025: allow opening zipfile members via ZipInfo instances. Patch by Graham Horler. ........ r63500 | georg.brandl | 2008-05-20 10:40:43 +0200 (Tue, 20 May 2008) | 2 lines #2592: delegate nb_index and the floor/truediv slots in weakref.proxy. ........ r63501 | georg.brandl | 2008-05-20 10:48:34 +0200 (Tue, 20 May 2008) | 2 lines #615772: raise a more explicit error from Tkinter.Misc.__contains__. ........ r63530 | benjamin.peterson | 2008-05-22 02:57:02 +0200 (Thu, 22 May 2008) | 2 lines use more specific asserts in test_opcode ........ r63531 | benjamin.peterson | 2008-05-22 03:02:23 +0200 (Thu, 22 May 2008) | 2 lines remove redundant invocation of json doctests ........ r63540 | benjamin.peterson | 2008-05-23 01:09:26 +0200 (Fri, 23 May 2008) | 3 lines fix test_pydoc so it works on make installed Python installations Also let it pass when invoked directly ........ r63614 | georg.brandl | 2008-05-25 10:07:37 +0200 (Sun, 25 May 2008) | 2 lines #2959: allow multiple close() calls for GzipFile. ........ --- tests/test_build_ext.py | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 tests/test_build_ext.py diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py new file mode 100644 index 0000000000..96c0a2395b --- /dev/null +++ b/tests/test_build_ext.py @@ -0,0 +1,72 @@ +import sys +import os +import tempfile +import shutil +from io import StringIO + +from distutils.core import Extension, Distribution +from distutils.command.build_ext import build_ext +from distutils import sysconfig + +import unittest +from test import support + +class BuildExtTestCase(unittest.TestCase): + def setUp(self): + # Create a simple test environment + # Note that we're making changes to sys.path + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.sys_path = sys.path[:] + sys.path.append(self.tmp_dir) + + xx_c = os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') + shutil.copy(xx_c, self.tmp_dir) + + def test_build_ext(self): + xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') + xx_ext = Extension('xx', [xx_c]) + dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) + dist.package_dir = self.tmp_dir + cmd = build_ext(dist) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + old_stdout = sys.stdout + if not support.verbose: + # silence compiler output + sys.stdout = StringIO() + try: + cmd.ensure_finalized() + cmd.run() + finally: + sys.stdout = old_stdout + + import xx + + for attr in ('error', 'foo', 'new', 'roj'): + self.assert_(hasattr(xx, attr)) + + self.assertEquals(xx.foo(2, 5), 7) + self.assertEquals(xx.foo(13,15), 28) + self.assertEquals(xx.new().demo(), None) + doc = 'This is a template module just for instruction.' + self.assertEquals(xx.__doc__, doc) + self.assert_(isinstance(xx.Null(), xx.Null)) + self.assert_(isinstance(xx.Str(), xx.Str)) + + def tearDown(self): + # Get everything back to normal + support.unload('xx') + sys.path = self.sys_path + # XXX on Windows the test leaves a directory with xx.pyd in TEMP + shutil.rmtree(self.tmp_dir, False if os.name != "nt" else True) + +def test_suite(): + if not sysconfig.python_build: + if support.verbose: + print('test_build_ext: The test must be run in a python build dir') + return unittest.TestSuite() + else: return unittest.makeSuite(BuildExtTestCase) + +if __name__ == '__main__': + support.run_unittest(test_suite()) From 46e1390e226138292126a2ffb6a8e960ff570e85 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 26 May 2008 11:42:40 +0000 Subject: [PATCH 2001/8469] On Windows, we must build a debug version iff running a debug build of Python --- tests/test_build_ext.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b5c2aa2339..a658f1aa1c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -28,6 +28,10 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) + if os.name == "nt": + # On Windows, we must build a debug version iff running + # a debug build of Python + cmd.debug = sys.executable.endswith("_d.exe") cmd.build_lib = self.tmp_dir cmd.build_temp = self.tmp_dir From 882263289e030cef4305d310473f9d80401caa56 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 26 May 2008 11:51:44 +0000 Subject: [PATCH 2002/8469] Merged revisions 63670 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63670 | thomas.heller | 2008-05-26 13:42:40 +0200 (Mo, 26 Mai 2008) | 4 lines On Windows, we must build a debug version iff running a debug build of Python ........ --- tests/test_build_ext.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 96c0a2395b..20c10745cb 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -28,6 +28,10 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) + if os.name == "nt": + # On Windows, we must build a debug version iff running + # a debug build of Python + cmd.debug = sys.executable.endswith("_d.exe") cmd.build_lib = self.tmp_dir cmd.build_temp = self.tmp_dir From 208bfafeaaa2900a5bacd8534cc7b8f3bab0b947 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 26 May 2008 16:32:26 +0000 Subject: [PATCH 2003/8469] Create http package. #2883. --- command/upload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index 603336c954..2cad2c7bd5 100644 --- a/command/upload.py +++ b/command/upload.py @@ -11,7 +11,7 @@ import socket import platform import configparser -import httplib +import http.client import base64 import urlparse @@ -151,9 +151,9 @@ def upload_file(self, command, pyversion, filename): urlparse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': - http = httplib.HTTPConnection(netloc) + http = http.client.HTTPConnection(netloc) elif schema == 'https': - http = httplib.HTTPSConnection(netloc) + http = http.client.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema "+schema) From 52ba3bb9b2d0a33e082e139a2a2e48154dbf60e2 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 26 May 2008 17:01:57 +0000 Subject: [PATCH 2004/8469] Merged revisions 63575 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63575 | martin.v.loewis | 2008-05-24 11:00:04 +0200 (Sat, 24 May 2008) | 3 lines Use announce instead of print, to suppress output in the testsuite. ........ --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 6ffccaa095..0ecfe0cc34 100644 --- a/config.py +++ b/config.py @@ -58,7 +58,7 @@ def _read_pypirc(self): """Reads the .pypirc file.""" rc = self._get_rc_file() if os.path.exists(rc): - print('Using PyPI login from %s' % rc) + self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY realm = self.realm or self.DEFAULT_REALM From 92a963ecf18661f11b3e8eea815b6a1bcb69cba3 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 28 May 2008 01:54:55 +0000 Subject: [PATCH 2005/8469] bdist_wininst now works correctly when both --skip-build and --plat-name are specified. --- command/bdist_wininst.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 7c43e7459e..f18e318cb9 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -79,6 +79,12 @@ def initialize_options (self): def finalize_options (self): if self.bdist_dir is None: + if self.skip_build and self.plat_name: + # If build is skipped and plat_name is overridden, bdist will + # not see the correct 'plat_name' - so set that up manually. + bdist = self.distribution.get_command_obj('bdist') + bdist.plat_name = self.plat_name + # next the command will be initialized using that name bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') if not self.target_version: From 4416152bdd4d21c96ac792ecefe9db9239460e73 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sat, 31 May 2008 05:11:07 +0000 Subject: [PATCH 2006/8469] Fix bdist_wininst --user-access-control for win2k --- command/wininst-6.0.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 65536 bytes command/wininst-9.0-amd64.exe | Bin 77312 -> 77824 bytes command/wininst-9.0.exe | Bin 66048 -> 66048 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.0.exe b/command/wininst-6.0.exe index 10c981993ba2c2e3a977db8ded201a46d529749d..f57c855a613e2de2b00fff1df431b8d08d171077 100644 GIT binary patch delta 9158 zcmeHMeOOf2nLl$G6?Kro%)sy=j4&!7Dmsur_;5f5iK1Qt%rFr@k~QfKF)5mvG~0lK z9VX4>I=d#vJhfR{H5g+)wlT#RqC`+YuyrkM{2+-<+^p?$DWst-Ye`FT_jm3c6q`Ix zcmLUcc6pxPoO|B$zURE}d*1gw=U$qwg*9CZ+nvu5&2xpt-koQPB70hv)K1`3M@sD( z^j~YAS9<|%X~*2!UZuZKX&E0I?`c_F>qPrXdwy*n+RiuYYrD{{K2~4bjrLFec}mN@ zoTjw*KKu^?lO?zRMG)RjNV!H!e)NH@?78s-%_lTgor1ZX4B`m)%2WZ zfu^4RL9>8cl}F>a`P}C8)?)4_5z8E++oJQ|h-~(OzgpaCF*wBri@vg{khtsXY8|q% zcAJfeBmNsMmwS`*>{LP*>&=|7o$~rrld#=J>ZZt-eBHXUQ)^2-;`&V+tev)vbhkc# z_4hHOY&>6YBfhaPPn_&A%O1V#(Mfm6vJ44-r{|r)zkWa`#{j%SN8|&4L-2pVyX1!WngVg@O3Bn zJKZ|J>`vze35yNIGd3+Roy{U7?<^c~2L>Z};UY6%D_?;z)*ImArHiWwfxhkxm7#sR zcM``?jP*vYN6(yKf^n77FI+IbTUS~s8@plqCh_dX_2;^(#o?X9sT!uXp;FwS50;1h zZ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jad6-2-nyyOT`tb6d3-bVwzYIo<$7_w-h$p;H8rI?h()RcAzxGV zcum=crDYq+m6G#6uz;tyenWXG=&EWsPHApgqMUqV#mMDAZc1HNwV|w1asOcnPJWy+ z{p<$C+BQMC+UimEolRFRoW+lKlm}WDDq?Fv)h07n@Ca0zrOywqMnP7~*H@I!Lj_4o2L4;8amwwy8XC0hef42R;?_1VTE$?g}Wxl49m(NFOte@wtC7c zBoga9VHQ+WZ7PSmQ$BlPn&nS~dAPc~5(w9pdCJVD&*qIy*d*47RbYM8xDLwWxc7`3 z$|@?V9z%d+D6N*n^2*KJI78{WO=6jdoy)jR*9^D7P`bYAQBILxT;x;@rJE|_cnfi? ze5`saHz+Sj*a@{-P&-(at3!W8#wek0Uk4E%7favM@ZS>S`EMN|3Y2Qu5a{`{pc#fyL zn%+%L%BpZ3cqZd{4$onDHsLuA&jWa3cj9*AnS^HuPZ5whZeUkfh4;y02i^GUQuZ8S^YcfQ>CK=tN3lsh^u&Hp3EnMW`- m>}yU8G7(k$)855#CK53I>A?TLJu>Ls`3cuJ^^fn|^?w0O%ix3n diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe index b4cb062c391d230dbf4a7fc3a16536aa3dbc5b42..9dedfcdc2398df99f9540120dba9421452795948 100644 GIT binary patch delta 11202 zcmeHNdstP~wx4Um7JO_WWeF(A7B_}sN#XfQ?YDz+8YKeWD>Xg@wf+a0> zK4zUfWv2G-^LVsf2Gmgu12rnElgH3wW@+1?vhpbTn)f&6nxx))zWc}hyZwD@{Kgz} zj5)@b@3o-xXlUv2&`nxm(U)$6soxpan{~9cXKWP&FIhs*8lI@#Y}>q!Ptt~Td#S6& z-lB>EjkQDp^E4J7$~S5YwB@|L?MAJM-(s8CAw1NoV(s`7wiK;CV8~(kXr_Bvybo^VG+W=oz{`CGg=%$yrhaLm+G^f; zz!t5A?-=0JE(SguP!eLB>fvM3W{-Le`531C)GvUvy+%d3YYil&S(%+R#!5odYMUo{ z{PqDT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Q-w@tSP({y2l&MZ$2h^fEXxxXMt-+o-gt=kIku07x@j92 b*}!e%=FMDW;|Z-f2=yp7Xb From dcd2eb88e377b96a037acf6da4729aafe95607d5 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 5 Jun 2008 12:58:24 +0000 Subject: [PATCH 2007/8469] MacOS X: Enable 4-way universal builds This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils. --- sysconfig.py | 20 ++++++++++++++++++++ unixccompiler.py | 8 +++++++- util.py | 11 +++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 27a770b194..9993fba1ab 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -539,6 +539,26 @@ def get_config_vars(*args): flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags + else: + + # Allow the user to override the architecture flags using + # an environment variable. + # NOTE: This name was introduced by Apple in OSX 10.5 and + # is used by several scripting languages distributed with + # that OS release. + + if 'ARCHFLAGS' in os.environ: + arch = os.environ['ARCHFLAGS'] + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = flags + ' ' + arch + _config_vars[key] = flags + if args: vals = [] for name in args: diff --git a/unixccompiler.py b/unixccompiler.py index dc759ee8f5..6144efc070 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -64,7 +64,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): stripArch = '-arch' in cc_args stripSysroot = '-isysroot' in cc_args - if stripArch: + if stripArch or 'ARCHFLAGS' in os.environ: while 1: try: index = compiler_so.index('-arch') @@ -73,6 +73,12 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: break + if 'ARCHFLAGS' in os.environ and not stripArch: + # User specified different -arch flags in the environ, + # see also distutils.sysconfig + compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS'] + + if stripSysroot: try: index = compiler_so.index('-isysroot') diff --git a/util.py b/util.py index 69d90cffb8..262a9b8b04 100644 --- a/util.py +++ b/util.py @@ -125,12 +125,19 @@ def get_platform (): osname = "macosx" - if (release + '.') < '10.4.' and \ - get_config_vars().get('UNIVERSALSDK', '').strip(): + if (release + '.') >= '10.4.' and \ + '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 + # + # Try to detect 4-way universal builds, those have machine-type + # 'universal' instead of 'fat'. + machine = 'fat' + if '-arch x86_64' in get_config_vars().get('CFLAGS'): + machine = 'universal' + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' From ff2fd5ca8a081c349f525318bbe8e07c8f1fcc3f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 10 Jun 2008 16:57:31 +0000 Subject: [PATCH 2008/8469] Merged revisions 63724,63726,63732,63744,63754-63755,63757-63758,63760,63775,63781-63782,63787,63805-63808,63818-63819,63823-63824 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63724 | gregory.p.smith | 2008-05-26 22:22:14 +0200 (Mon, 26 May 2008) | 6 lines Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until the last reference to the Popen instance was dropped. Adding explicit close() calls fixes it. Candidate for backport to release25-maint. ........ r63726 | benjamin.peterson | 2008-05-26 22:43:24 +0200 (Mon, 26 May 2008) | 2 lines fix minor grammar typo ........ r63732 | benjamin.peterson | 2008-05-26 23:44:26 +0200 (Mon, 26 May 2008) | 2 lines remove duplication in test module ........ r63744 | lars.gustaebel | 2008-05-27 14:39:23 +0200 (Tue, 27 May 2008) | 3 lines Do not close external file objects passed to tarfile.open(mode='w:bz2') when the TarFile is closed. ........ r63754 | benjamin.peterson | 2008-05-28 03:12:35 +0200 (Wed, 28 May 2008) | 2 lines update tutorial function with more appropiate one from Eric Smith ........ r63755 | mark.hammond | 2008-05-28 03:54:55 +0200 (Wed, 28 May 2008) | 2 lines bdist_wininst now works correctly when both --skip-build and --plat-name are specified. ........ r63757 | georg.brandl | 2008-05-28 13:21:39 +0200 (Wed, 28 May 2008) | 2 lines #2989: add PyType_Modified(). ........ r63758 | benjamin.peterson | 2008-05-28 13:51:41 +0200 (Wed, 28 May 2008) | 2 lines fix spelling ........ r63760 | georg.brandl | 2008-05-28 17:41:36 +0200 (Wed, 28 May 2008) | 2 lines #2990: prevent inconsistent state while updating method cache. ........ r63775 | georg.brandl | 2008-05-29 09:18:17 +0200 (Thu, 29 May 2008) | 2 lines Two fixes in bytearray docs. ........ r63781 | georg.brandl | 2008-05-29 09:38:37 +0200 (Thu, 29 May 2008) | 2 lines #2988: add note about catching CookieError when parsing untrusted cookie data. ........ r63782 | georg.brandl | 2008-05-29 09:45:26 +0200 (Thu, 29 May 2008) | 2 lines #2985: allow i8 in XMLRPC responses. ........ r63787 | georg.brandl | 2008-05-29 16:35:39 +0200 (Thu, 29 May 2008) | 2 lines Revert #2990 patch; it's not necessary as Armin showed. ........ r63805 | raymond.hettinger | 2008-05-30 08:37:27 +0200 (Fri, 30 May 2008) | 1 line Issue 2784: fix leaks in exception exit. ........ r63806 | raymond.hettinger | 2008-05-30 08:49:47 +0200 (Fri, 30 May 2008) | 1 line Issue 2855: Fix obscure crasher by slowing down the entire module. Mimics what was done to dictionaries in r59223. ........ r63807 | raymond.hettinger | 2008-05-30 09:16:53 +0200 (Fri, 30 May 2008) | 1 line Issue 2903: Add __name__ in globals for namedtuple namespace. ........ r63808 | georg.brandl | 2008-05-30 09:54:16 +0200 (Fri, 30 May 2008) | 2 lines #2999: fix name of third parameter in unicode.replace()'s docstring. ........ r63818 | georg.brandl | 2008-05-30 21:12:13 +0200 (Fri, 30 May 2008) | 2 lines getloadavg() is not available on Windows. ........ r63819 | georg.brandl | 2008-05-30 21:17:29 +0200 (Fri, 30 May 2008) | 2 lines Better quote with single quotes. ........ r63823 | benjamin.peterson | 2008-05-30 22:44:39 +0200 (Fri, 30 May 2008) | 2 lines fix grammar ........ r63824 | marc-andre.lemburg | 2008-05-30 22:52:18 +0200 (Fri, 30 May 2008) | 5 lines Update the locale module alias table. Closes #3011. ........ --- command/bdist_wininst.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3f0e09bc4c..ae7d4fde2e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -75,6 +75,12 @@ def initialize_options(self): def finalize_options(self): if self.bdist_dir is None: + if self.skip_build and self.plat_name: + # If build is skipped and plat_name is overridden, bdist will + # not see the correct 'plat_name' - so set that up manually. + bdist = self.distribution.get_command_obj('bdist') + bdist.plat_name = self.plat_name + # next the command will be initialized using that name bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') if not self.target_version: From a7d9be62dc156189214df813236f2ff56a66016a Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Wed, 11 Jun 2008 17:46:10 +0000 Subject: [PATCH 2009/8469] Follow-up of PEP 3121: Correct the exported symbol for extension modules built by distutils --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 73cc00ba0f..c0eef62815 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -646,10 +646,10 @@ def get_ext_filename(self, ext_name): def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "init" + module_name. Only relevant on Windows, where + provided, "PyInit_" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "init" + ext.name.split('.')[-1] + initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols From b06cbddbcbe9c30374cca3e0ecc4d96b61f39d7e Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 18 Jun 2008 20:49:58 +0000 Subject: [PATCH 2010/8469] Make a new urllib package . It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran. --- command/register.py | 20 +++++++++++--------- command/upload.py | 7 ++++--- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/command/register.py b/command/register.py index 89cb2d410c..6d5c459924 100644 --- a/command/register.py +++ b/command/register.py @@ -7,8 +7,9 @@ __revision__ = "$Id$" -import os, string, urllib2, getpass, urlparse +import os, string, getpass import io +import urllib.parse, urllib.request from distutils.core import PyPIRCCommand from distutils.errors import * @@ -94,7 +95,8 @@ def _set_config(self): def classifiers(self): ''' Fetch the list of classifiers from the server. ''' - response = urllib2.urlopen(self.repository+'?:action=list_classifiers') + url = self.repository+'?:action=list_classifiers' + response = urllib.request.urlopen(url) print(response.read()) def verify_metadata(self): @@ -166,8 +168,8 @@ def send_metadata(self): password = getpass.getpass('Password: ') # set up the authentication - auth = urllib2.HTTPPasswordMgr() - host = urlparse.urlparse(self.repository)[1] + auth = urllib.request.HTTPPasswordMgr() + host = urllib.parse.urlparse(self.repository)[1] auth.add_password(self.realm, host, username, password) # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), @@ -276,20 +278,20 @@ def post_to_server(self, data, auth=None): 'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'%boundary, 'Content-length': str(len(body)) } - req = urllib2.Request(self.repository, body, headers) + req = urllib.request.Request(self.repository, body, headers) # handle HTTP and include the Basic Auth handler - opener = urllib2.build_opener( - urllib2.HTTPBasicAuthHandler(password_mgr=auth) + opener = urllib.request.build_opener( + urllib.request.HTTPBasicAuthHandler(password_mgr=auth) ) data = '' try: result = opener.open(req) - except urllib2.HTTPError as e: + except urllib.error.HTTPError as e: if self.show_response: data = e.fp.read() result = e.code, e.msg - except urllib2.URLError as e: + except urllib.error.URLError as e: result = 500, str(e) else: if self.show_response: diff --git a/command/upload.py b/command/upload.py index 2cad2c7bd5..5049f03e93 100644 --- a/command/upload.py +++ b/command/upload.py @@ -13,7 +13,7 @@ import configparser import http.client import base64 -import urlparse +import urllib.parse class upload(PyPIRCCommand): @@ -145,10 +145,11 @@ def upload_file(self, command, pyversion, filename): self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) # build the Request - # We can't use urllib2 since we need to send the Basic + # We can't use urllib since we need to send the Basic # auth right with the first request + # TODO(jhylton): Can we fix urllib? schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) + urllib.parse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': http = http.client.HTTPConnection(netloc) From 6f6285e128b5c81398538d25ece8a9af988bfb4a Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 19 Jun 2008 00:35:43 +0000 Subject: [PATCH 2011/8469] Bump to 3.0b1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 3618c4f727..54fc2369d0 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0a5" +__version__ = "3.0b1" #--end constants-- From 07491092fe0ca819ef1c40ec6fb32710d4f2b872 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 19 Jun 2008 01:48:07 +0000 Subject: [PATCH 2012/8469] Bumping to 2.6b1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e3e32f51bd..a192357896 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6a3" +__version__ = "2.6b1" #--end constants-- From e518d13e52d41fc198d3c3f5fc42275b2ca2c614 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 16 Jul 2008 02:02:25 +0000 Subject: [PATCH 2013/8469] Merged revisions 63828 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63828 | mark.hammond | 2008-05-31 07:11:07 +0200 (Sat, 31 May 2008) | 2 lines Fix bdist_wininst --user-access-control for win2k ........ --- command/wininst-6.0.exe | Bin 61440 -> 61440 bytes command/wininst-7.1.exe | Bin 61440 -> 65536 bytes command/wininst-9.0-amd64.exe | Bin 77312 -> 77824 bytes command/wininst-9.0.exe | Bin 66048 -> 66048 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-6.0.exe b/command/wininst-6.0.exe index 10c981993ba2c2e3a977db8ded201a46d529749d..f57c855a613e2de2b00fff1df431b8d08d171077 100644 GIT binary patch delta 9158 zcmeHMeOOf2nLl$G6?Kro%)sy=j4&!7Dmsur_;5f5iK1Qt%rFr@k~QfKF)5mvG~0lK z9VX4>I=d#vJhfR{H5g+)wlT#RqC`+YuyrkM{2+-<+^p?$DWst-Ye`FT_jm3c6q`Ix zcmLUcc6pxPoO|B$zURE}d*1gw=U$qwg*9CZ+nvu5&2xpt-koQPB70hv)K1`3M@sD( z^j~YAS9<|%X~*2!UZuZKX&E0I?`c_F>qPrXdwy*n+RiuYYrD{{K2~4bjrLFec}mN@ zoTjw*KKu^?lO?zRMG)RjNV!H!e)NH@?78s-%_lTgor1ZX4B`m)%2WZ zfu^4RL9>8cl}F>a`P}C8)?)4_5z8E++oJQ|h-~(OzgpaCF*wBri@vg{khtsXY8|q% zcAJfeBmNsMmwS`*>{LP*>&=|7o$~rrld#=J>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Gpg0lokjAw(izEPy_KbWWeZNvP-; z;8}njb2pae575&DNdcDut$-%LF9CZ2PXjgs)&e|$`GDDgdjMkqUxL?7zz2Z00OtVo z*@sS#0-la{zM!UD2|jhOarbG_KpP~-7cX-aE}F0W;`iefYjc`$6Q?X~o-l5mRQZ^= zzN#{{vPw)X+g!H3qU_O%a<1|5<`RRFdVZer=ku>BO}~F|WoiEU%Cd^}PnL81)@4#< zseAo~>WXr=ShK$Jad6-2-nyyOT`tb6d3-bVwzYIo<$7_w-h$p;H8rI?h()RcAzxGV zcum=crDYq+m6G#6uz;tyenWXG=&EWsPHApgqMUqV#mMDAZc1HNwV|w1asOcnPJWy+ z{p<$C+BQMC+UimEolRFRoW+lKlm}WDDq?Fv)h07n@Ca0zrOywqMnP7~*H@I!Lj_4o2L4;8amwwy8XC0hef42R;?_1VTE$?g}Wxl49m(NFOte@wtC7c zBoga9VHQ+WZ7PSmQ$BlPn&nS~dAPc~5(w9pdCJVD&*qIy*d*47RbYM8xDLwWxc7`3 z$|@?V9z%d+D6N*n^2*KJI78{WO=6jdoy)jR*9^D7P`bYAQBILxT;x;@rJE|_cnfi? ze5`saHz+Sj*a@{-P&-(at3!W8#wek0Uk4E%7favM@ZS>S`EMN|3Y2Qu5a{`{pc#fyL zn%+%L%BpZ3cqZd{4$onDHsLuA&jWa3cj9*AnS^HuPZ5whZeUkfh4;y02i^GUQuZ8S^YcfQ>CK=tN3lsh^u&Hp3EnMW`- m>}yU8G7(k$)855#CK53I>A?TLJu>Ls`3cuJ^^fn|^?w0O%ix3n diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe index b4cb062c391d230dbf4a7fc3a16536aa3dbc5b42..9dedfcdc2398df99f9540120dba9421452795948 100644 GIT binary patch delta 11202 zcmeHNdstP~wx4Um7JO_WWeF(A7B_}sN#XfQ?YDz+8YKeWD>Xg@wf+a0> zK4zUfWv2G-^LVsf2Gmgu12rnElgH3wW@+1?vhpbTn)f&6nxx))zWc}hyZ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x|yV8UH!Rh%|ubQ?;-Qm6~iC`5oqKB4Iz) zYnF#r#u1SMTj^~_)1SS)rubfm-dSLz>=O4!`0TTJ&MJugXSeO%MuHgLRYZiYw zA7eI^^jE!nc`YNh z=BTu0wZ-FHhI*(Lr!(h8Lr!JIz&-TMR>1_uWOvhRMt(8du7Hnu$p)tae&L}7@08dcH*^Pd>L{x_ao0-cjjP5!{Mt8H$ zu)u}ShD+wzYB!ZQs>Ey8Q-w@tSP({y2l&MZ$2h^fEXxxXMt-+o-gt=kIku07x@j92 b*}!e%=FMDW;|Z-f2=yp7Xb From bd559affbcf751d932274da766e8e762c23e1f87 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 16 Jul 2008 02:17:56 +0000 Subject: [PATCH 2014/8469] Merged revisions 63955 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63955 | ronald.oussoren | 2008-06-05 14:58:24 +0200 (Thu, 05 Jun 2008) | 20 lines MacOS X: Enable 4-way universal builds This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils. ........ --- sysconfig.py | 20 ++++++++++++++++++++ unixccompiler.py | 8 +++++++- util.py | 11 +++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d2b2c9a347..3a120dd584 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -516,6 +516,26 @@ def get_config_vars(*args): flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags + else: + + # Allow the user to override the architecture flags using + # an environment variable. + # NOTE: This name was introduced by Apple in OSX 10.5 and + # is used by several scripting languages distributed with + # that OS release. + + if 'ARCHFLAGS' in os.environ: + arch = os.environ['ARCHFLAGS'] + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = flags + ' ' + arch + _config_vars[key] = flags + if args: vals = [] for name in args: diff --git a/unixccompiler.py b/unixccompiler.py index 25a042d075..87ce9217fd 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -63,7 +63,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): stripArch = '-arch' in cc_args stripSysroot = '-isysroot' in cc_args - if stripArch: + if stripArch or 'ARCHFLAGS' in os.environ: while True: try: index = compiler_so.index('-arch') @@ -72,6 +72,12 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: break + if 'ARCHFLAGS' in os.environ and not stripArch: + # User specified different -arch flags in the environ, + # see also distutils.sysconfig + compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS'] + + if stripSysroot: try: index = compiler_so.index('-isysroot') diff --git a/util.py b/util.py index 72039a7e6a..76798b9506 100644 --- a/util.py +++ b/util.py @@ -124,12 +124,19 @@ def get_platform (): osname = "macosx" - if (release + '.') < '10.4.' and \ - get_config_vars().get('UNIVERSALSDK', '').strip(): + if (release + '.') >= '10.4.' and \ + '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 + # + # Try to detect 4-way universal builds, those have machine-type + # 'universal' instead of 'fat'. + machine = 'fat' + if '-arch x86_64' in get_config_vars().get('CFLAGS'): + machine = 'universal' + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' From cc23416383cd1931421722ea974a8b8fcc273d10 Mon Sep 17 00:00:00 2001 From: Jesse Noller Date: Wed, 16 Jul 2008 13:24:06 +0000 Subject: [PATCH 2015/8469] Apply patch for issue 3090: ARCHFLAGS parsing incorrect --- unixccompiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 6144efc070..045368a925 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -76,8 +76,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, # see also distutils.sysconfig - compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS'] - + compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: try: From 859dfb6ac16f97bbbd9632c03ac655ad5e3e5d59 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 18 Jul 2008 02:28:44 +0000 Subject: [PATCH 2016/8469] Bumping to 3.0b2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 54fc2369d0..48bb00560b 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0b1" +__version__ = "3.0b2" #--end constants-- From 5656e21cbe602ccf223815c23bad6f8411d039d0 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 18 Jul 2008 03:20:07 +0000 Subject: [PATCH 2017/8469] Bumping to 2.6b2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a192357896..06ec0d4bf8 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6b1" +__version__ = "2.6b2" #--end constants-- From e6c78afba556f44c4d87f6e5392a7ffba98a45c9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 23 Jul 2008 16:10:53 +0000 Subject: [PATCH 2018/8469] Merged revisions 65012,65035,65037-65040,65048,65057,65077,65091-65095,65097-65099,65127-65128,65131,65133-65136,65139,65149-65151,65155,65158-65159,65176-65178,65183-65184,65187-65190,65192,65194 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65012 | jesse.noller | 2008-07-16 15:24:06 +0200 (Wed, 16 Jul 2008) | 2 lines Apply patch for issue 3090: ARCHFLAGS parsing incorrect ........ r65035 | georg.brandl | 2008-07-16 23:19:28 +0200 (Wed, 16 Jul 2008) | 2 lines #3045: fix pydoc behavior for TEMP path with spaces. ........ r65037 | georg.brandl | 2008-07-16 23:31:41 +0200 (Wed, 16 Jul 2008) | 2 lines #1608818: errno can get set by every call to readdir(). ........ r65038 | georg.brandl | 2008-07-17 00:04:20 +0200 (Thu, 17 Jul 2008) | 2 lines #3305: self->stream can be NULL. ........ r65039 | georg.brandl | 2008-07-17 00:09:17 +0200 (Thu, 17 Jul 2008) | 2 lines #3345: fix docstring. ........ r65040 | georg.brandl | 2008-07-17 00:33:18 +0200 (Thu, 17 Jul 2008) | 2 lines #3312: fix two sqlite3 crashes. ........ r65048 | georg.brandl | 2008-07-17 01:35:54 +0200 (Thu, 17 Jul 2008) | 2 lines #3388: add a paragraph about using "with" for file objects. ........ r65057 | gregory.p.smith | 2008-07-17 05:13:05 +0200 (Thu, 17 Jul 2008) | 2 lines news note for r63052 ........ r65077 | jesse.noller | 2008-07-17 23:01:05 +0200 (Thu, 17 Jul 2008) | 3 lines Fix issue 3395, update _debugInfo to be _debug_info ........ r65091 | ronald.oussoren | 2008-07-18 07:48:03 +0200 (Fri, 18 Jul 2008) | 2 lines Last bit of a fix for issue3381 (addon for my patch in r65061) ........ r65092 | vinay.sajip | 2008-07-18 10:59:06 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65093 | vinay.sajip | 2008-07-18 11:00:00 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65094 | vinay.sajip | 2008-07-18 11:00:35 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65095 | vinay.sajip | 2008-07-18 11:01:10 +0200 (Fri, 18 Jul 2008) | 1 line Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. ........ r65097 | georg.brandl | 2008-07-18 12:20:59 +0200 (Fri, 18 Jul 2008) | 2 lines Remove duplicate entry in __all__. ........ r65098 | georg.brandl | 2008-07-18 12:29:30 +0200 (Fri, 18 Jul 2008) | 2 lines Correct attribute name. ........ r65099 | georg.brandl | 2008-07-18 13:15:06 +0200 (Fri, 18 Jul 2008) | 3 lines Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. ........ r65127 | raymond.hettinger | 2008-07-19 02:42:03 +0200 (Sat, 19 Jul 2008) | 1 line Improve accuracy of gamma test function ........ r65128 | raymond.hettinger | 2008-07-19 02:43:00 +0200 (Sat, 19 Jul 2008) | 1 line Add recipe to the itertools docs. ........ r65131 | georg.brandl | 2008-07-19 12:08:55 +0200 (Sat, 19 Jul 2008) | 2 lines #3378: in case of no memory, don't leak even more memory. :) ........ r65133 | georg.brandl | 2008-07-19 14:39:10 +0200 (Sat, 19 Jul 2008) | 3 lines #3302: fix segfaults when passing None for arguments that can't be NULL for the C functions. ........ r65134 | georg.brandl | 2008-07-19 14:46:12 +0200 (Sat, 19 Jul 2008) | 2 lines #3303: fix crash with invalid Py_DECREF in strcoll(). ........ r65135 | georg.brandl | 2008-07-19 15:00:22 +0200 (Sat, 19 Jul 2008) | 3 lines #3319: don't raise ZeroDivisionError if number of rounds is so low that benchtime is zero. ........ r65136 | georg.brandl | 2008-07-19 15:09:42 +0200 (Sat, 19 Jul 2008) | 3 lines #3323: mention that if inheriting from a class without __slots__, the subclass will have a __dict__ available too. ........ r65139 | georg.brandl | 2008-07-19 15:48:44 +0200 (Sat, 19 Jul 2008) | 2 lines Add ordering info for findall and finditer. ........ r65149 | raymond.hettinger | 2008-07-20 01:21:57 +0200 (Sun, 20 Jul 2008) | 1 line Fix compress() recipe in docs to use itertools. ........ r65150 | raymond.hettinger | 2008-07-20 01:58:47 +0200 (Sun, 20 Jul 2008) | 1 line Clean-up itertools docs and recipes. ........ r65151 | gregory.p.smith | 2008-07-20 02:22:08 +0200 (Sun, 20 Jul 2008) | 9 lines fix issue3120 - don't truncate handles on 64-bit Windows. This is still messy, realistically PC/_subprocess.c should never cast pointers to python numbers and back at all. I don't have a 64-bit windows build environment because microsoft apparently thinks that should cost money. Time to watch the buildbots. It builds and passes tests on 32-bit windows. ........ r65155 | georg.brandl | 2008-07-20 13:50:29 +0200 (Sun, 20 Jul 2008) | 2 lines #926501: add info where to put the docstring. ........ r65158 | neal.norwitz | 2008-07-20 21:35:23 +0200 (Sun, 20 Jul 2008) | 1 line Fix a couple of names in error messages that were wrong ........ r65159 | neal.norwitz | 2008-07-20 22:39:36 +0200 (Sun, 20 Jul 2008) | 1 line Fix misspeeld method name (negative) ........ r65176 | amaury.forgeotdarc | 2008-07-21 23:36:24 +0200 (Mon, 21 Jul 2008) | 4 lines Increment version number in NEWS file, and move items that were added after 2.6b2. (I thought there was a script to automate this kind of updates) ........ r65177 | amaury.forgeotdarc | 2008-07-22 00:00:38 +0200 (Tue, 22 Jul 2008) | 5 lines Issue2378: pdb would delete free variables when stepping into a class statement. The problem was introduced by r53954, the correction is to restore the symmetry between PyFrame_FastToLocals and PyFrame_LocalsToFast ........ r65178 | benjamin.peterson | 2008-07-22 00:05:34 +0200 (Tue, 22 Jul 2008) | 1 line don't use assert statement ........ r65183 | ronald.oussoren | 2008-07-22 09:06:00 +0200 (Tue, 22 Jul 2008) | 2 lines Fix buglet in fix for issue3381 ........ r65184 | ronald.oussoren | 2008-07-22 09:06:33 +0200 (Tue, 22 Jul 2008) | 2 lines Fix build issue on OSX 10.4, somehow this wasn't committed before. ........ r65187 | raymond.hettinger | 2008-07-22 20:54:02 +0200 (Tue, 22 Jul 2008) | 1 line Remove out-of-date section on Exact/Inexact. ........ r65188 | raymond.hettinger | 2008-07-22 21:00:47 +0200 (Tue, 22 Jul 2008) | 1 line Tuples now have both count() and index(). ........ r65189 | raymond.hettinger | 2008-07-22 21:03:05 +0200 (Tue, 22 Jul 2008) | 1 line Fix credits for math.sum() ........ r65190 | raymond.hettinger | 2008-07-22 21:18:50 +0200 (Tue, 22 Jul 2008) | 1 line One more attribution. ........ r65192 | benjamin.peterson | 2008-07-23 01:44:37 +0200 (Wed, 23 Jul 2008) | 1 line remove unneeded import ........ r65194 | benjamin.peterson | 2008-07-23 15:25:06 +0200 (Wed, 23 Jul 2008) | 1 line use isinstance ........ --- unixccompiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index 87ce9217fd..d65ab321b6 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -75,8 +75,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, # see also distutils.sysconfig - compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS'] - + compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: try: From a52ff5544a4ddb9aa9b5e94543f45cf7ad7f348e Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Sat, 26 Jul 2008 20:09:45 +0000 Subject: [PATCH 2019/8469] Remove incorrect usages of map() in distutils. Reported by Lisandro Dalcin. --- cmd.py | 2 +- command/build_ext.py | 2 +- dist.py | 3 ++- filelist.py | 4 ++-- mwerkscompiler.py | 6 +++--- text_file.py | 3 ++- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd.py b/cmd.py index bd560a661c..c6572caa5f 100644 --- a/cmd.py +++ b/cmd.py @@ -158,7 +158,7 @@ def dump_options(self, header=None, indent=""): print(indent + header) indent = indent + " " for (option, _, _) in self.user_options: - option = option.translate(longopt_xlate) + option = longopt_xlate(option) if option[-1] == "=": option = option[:-1] value = getattr(self, option) diff --git a/command/build_ext.py b/command/build_ext.py index c0eef62815..2db53f134d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -244,7 +244,7 @@ def finalize_options(self): if self.define: defines = self.define.split(',') - self.define = map(lambda symbol: (symbol, '1'), defines) + self.define = [(symbol, '1') for symbol in defines] # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also diff --git a/dist.py b/dist.py index ddde909fbd..8bcb88c31b 100644 --- a/dist.py +++ b/dist.py @@ -864,7 +864,8 @@ def _set_command_options (self, command_obj, option_dict=None): for (option, (source, value)) in option_dict.items(): if DEBUG: print(" %s = %s (from %s)" % (option, value, source)) try: - bool_opts = map(translate_longopt, command_obj.boolean_options) + bool_opts = [translate_longopt(o) + for o in command_obj.boolean_options] except AttributeError: bool_opts = [] try: diff --git a/filelist.py b/filelist.py index 8eab0a95bf..a80c71e8c7 100644 --- a/filelist.py +++ b/filelist.py @@ -85,13 +85,13 @@ def _parse_template_line(self, line): if len(words) < 2: raise DistutilsTemplateError( "'%s' expects ..." % action) - patterns = map(convert_path, words[1:]) + patterns = [convert_path(w) for w in words[1:]] elif action in ('recursive-include', 'recursive-exclude'): if len(words) < 3: raise DistutilsTemplateError( "'%s' expects

..." % action) dir = convert_path(words[1]) - patterns = map(convert_path, words[2:]) + patterns = [convert_path(w) for w in words[2:]] elif action in ('graft', 'prune'): if len(words) != 2: raise DistutilsTemplateError( diff --git a/mwerkscompiler.py b/mwerkscompiler.py index 25d48ae866..130cd6147b 100644 --- a/mwerkscompiler.py +++ b/mwerkscompiler.py @@ -104,10 +104,10 @@ def link (self, # This is because we (usually) create the project in a subdirectory of # where we are now, and keeping the paths relative is too much work right # now. - sources = map(self._filename_to_abs, self.__sources) - include_dirs = map(self._filename_to_abs, self.__include_dirs) + sources = [self._filename_to_abs(s) for s in self.__sources] + include_dirs = [self._filename_to_abs(d) for d in self.__include_dirs] if objects: - objects = map(self._filename_to_abs, objects) + objects = [self._filename_to_abs(o) for o in objects] else: objects = [] if build_temp: diff --git a/text_file.py b/text_file.py index db054fd270..266466c1eb 100644 --- a/text_file.py +++ b/text_file.py @@ -292,7 +292,7 @@ def unreadline(self, line): continues on next line """ # result 1: no fancy options - result1 = map(lambda x: x + "\n", test_data.split("\n")[0:-1]) + result1 = [x + "\n" for x in test_data.split("\n")[:-1]] # result 2: just strip comments result2 = ["\n", @@ -357,4 +357,5 @@ def test_input(count, description, file, expected_result): join_lines=1, rstrip_ws=1, collapse_join=1) test_input(6, "join lines with collapsing", in_file, result6) + del in_file os.remove(filename) From 4c8a00dd7b5c30ef7f88deaf6e76be5815cee1fb Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Thu, 14 Aug 2008 05:50:43 +0000 Subject: [PATCH 2020/8469] Fixed test_distutils error (test_build_ext) on VC6. --- command/build_ext.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index beb3319469..8cf7888117 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -209,9 +209,12 @@ def finalize_options (self): elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS8.0', 'win32release')) - else: + elif MSVC_VERSION == 7: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1')) + else: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PC', 'VC6')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From dd8e87105079fbf52d866825dc56482a40732b99 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Thu, 14 Aug 2008 07:35:13 +0000 Subject: [PATCH 2021/8469] Merged revisions 65667 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65667 | hirokazu.yamamoto | 2008-08-14 14:50:43 +0900 | 1 line Fixed test_distutils error (test_build_ext) on VC6. ........ --- command/build_ext.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2db53f134d..7ef5becc6f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -205,9 +205,12 @@ def finalize_options(self): elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS8.0', 'win32release')) - else: + elif MSVC_VERSION == 7: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1')) + else: + self.library_dirs.append(os.path.join(sys.exec_prefix, + 'PC', 'VC6')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory From bc2dcae88fe834e1fe0de12f0b01df8763fa7d38 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 17 Aug 2008 04:16:04 +0000 Subject: [PATCH 2022/8469] Update distutils so that it triggers no warnings when run under -3. --- command/build_ext.py | 2 +- command/build_py.py | 4 ++-- core.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8cf7888117..1461409f60 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -679,7 +679,7 @@ def get_ext_filename (self, ext_name): so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: return apply(os.path.join, ext_path) + '_d' + so_ext - return apply(os.path.join, ext_path) + so_ext + return os.path.join(*ext_path) + so_ext def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to diff --git a/command/build_py.py b/command/build_py.py index be6d2c5b4d..3bf1267328 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -169,7 +169,7 @@ def get_package_dir (self, package): del path[-1] else: tail.insert(0, pdir) - return apply(os.path.join, tail) + return os.path.join(*tail) else: # Oops, got all the way through 'path' without finding a # match in package_dir. If package_dir defines a directory @@ -337,7 +337,7 @@ def get_source_files (self): def get_module_outfile (self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] - return apply(os.path.join, outfile_path) + return os.path.join(*outfile_path) def get_outputs (self, include_bytecode=1): diff --git a/core.py b/core.py index de9ce7d7ff..a0e44ea631 100644 --- a/core.py +++ b/core.py @@ -218,7 +218,8 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - execfile(script_name, g, l) + with open(script_name, 'r') as file: + exec file.read() in g, l finally: sys.argv = save_argv _setup_stop_after = None From 93cbbc9e4f93377f401d264b08561fe580ea2bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Mon, 18 Aug 2008 11:13:45 +0000 Subject: [PATCH 2023/8469] Restore Python 2.3 compatibility and remove "with" usage. --- core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core.py b/core.py index a0e44ea631..62a3389b53 100644 --- a/core.py +++ b/core.py @@ -218,8 +218,7 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - with open(script_name, 'r') as file: - exec file.read() in g, l + exec open(script_name, 'r').read() in g, l finally: sys.argv = save_argv _setup_stop_after = None From 07f55be128098cc6915ebd7671a1a13078291e9e Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Mon, 18 Aug 2008 19:23:47 +0000 Subject: [PATCH 2024/8469] #2234 distutils failed with mingw binutils 2.18.50.20080109. Be less strict when parsing these version numbers, they don't necessarily follow the python numbering scheme. --- cygwinccompiler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 4ac11eb4b1..94a7bd96ee 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -404,7 +404,7 @@ def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - from distutils.version import StrictVersion + from distutils.version import LooseVersion from distutils.spawn import find_executable import re @@ -415,7 +415,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: - gcc_version = StrictVersion(result.group(1)) + gcc_version = LooseVersion(result.group(1)) else: gcc_version = None else: @@ -427,7 +427,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: - ld_version = StrictVersion(result.group(1)) + ld_version = LooseVersion(result.group(1)) else: ld_version = None else: @@ -439,7 +439,7 @@ def get_versions(): out.close() result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) if result: - dllwrap_version = StrictVersion(result.group(1)) + dllwrap_version = LooseVersion(result.group(1)) else: dllwrap_version = None else: From 478e78efb66d39ece39152d4d41f3842f147a48b Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Mon, 18 Aug 2008 19:33:42 +0000 Subject: [PATCH 2025/8469] Issue #2234: distutils failed with mingw binutils 2.18.50.20080109. Be less strict when parsing these version numbers, they don't necessarily follow the python numbering scheme. Backport of r65834 --- cygwinccompiler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 4fd23e6dc6..6d1ba16be6 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -398,7 +398,7 @@ def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - from distutils.version import StrictVersion + from distutils.version import LooseVersion from distutils.spawn import find_executable import re @@ -409,7 +409,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: - gcc_version = StrictVersion(result.group(1)) + gcc_version = LooseVersion(result.group(1)) else: gcc_version = None else: @@ -421,7 +421,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: - ld_version = StrictVersion(result.group(1)) + ld_version = LooseVersion(result.group(1)) else: ld_version = None else: @@ -433,7 +433,7 @@ def get_versions(): out.close() result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) if result: - dllwrap_version = StrictVersion(result.group(1)) + dllwrap_version = LooseVersion(result.group(1)) else: dllwrap_version = None else: From 9b46d3fc54dc19f29a4d7503e8c06dcfbebd7b5a Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 19 Aug 2008 17:56:33 +0000 Subject: [PATCH 2026/8469] #2834: Change re module semantics, so that str and bytes mixing is forbidden, and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead. --- cygwinccompiler.py | 6 +++--- emxccompiler.py | 2 +- sysconfig.py | 2 +- util.py | 2 +- version.py | 2 +- versionpredicate.py | 6 ++++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 488752300b..da2c74a2b1 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -409,7 +409,7 @@ def get_versions(): out = os.popen(gcc_exe + ' -dumpversion','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: gcc_version = StrictVersion(result.group(1)) else: @@ -421,7 +421,7 @@ def get_versions(): out = os.popen(ld_exe + ' -v','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: ld_version = StrictVersion(result.group(1)) else: @@ -433,7 +433,7 @@ def get_versions(): out = os.popen(dllwrap_exe + ' --version','r') out_string = out.read() out.close() - result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) + result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: dllwrap_version = StrictVersion(result.group(1)) else: diff --git a/emxccompiler.py b/emxccompiler.py index d9ee82d58a..62a4c5b4e8 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -300,7 +300,7 @@ def get_versions(): out = os.popen(gcc_exe + ' -dumpversion','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+\.\d+)',out_string) + result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) if result: gcc_version = StrictVersion(result.group(1)) else: diff --git a/sysconfig.py b/sysconfig.py index 3a120dd584..b17743a865 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -512,7 +512,7 @@ def get_config_vars(*args): # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII) flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags diff --git a/util.py b/util.py index 76798b9506..b87dfbe065 100644 --- a/util.py +++ b/util.py @@ -81,7 +81,7 @@ def get_platform (): return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" - rel_re = re.compile (r'[\d.]+') + rel_re = re.compile (r'[\d.]+', re.ASCII) m = rel_re.match(release) if m: release = m.group() diff --git a/version.py b/version.py index f71b2f6ce3..907f71c313 100644 --- a/version.py +++ b/version.py @@ -134,7 +134,7 @@ class StrictVersion (Version): """ version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', - re.VERBOSE) + re.VERBOSE | re.ASCII) def parse (self, vstring): diff --git a/versionpredicate.py b/versionpredicate.py index 434b34f184..b0dd9f45bf 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -5,7 +5,8 @@ import operator -re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)") +re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)", + re.ASCII) # (package) (rest) re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses @@ -153,7 +154,8 @@ def split_provision(value): global _provision_rx if _provision_rx is None: _provision_rx = re.compile( - "([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$") + "([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", + re.ASCII) value = value.strip() m = _provision_rx.match(value) if not m: From 677cbea5d0294da0039c6645d0c5a8abce8efcd0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 19 Aug 2008 18:57:56 +0000 Subject: [PATCH 2027/8469] Merged revisions 65780,65782,65785,65809,65812,65834,65846,65859,65861 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65780 | antoine.pitrou | 2008-08-17 15:15:07 -0500 (Sun, 17 Aug 2008) | 3 lines #3580: fix a failure in test_os ........ r65782 | benjamin.peterson | 2008-08-17 15:33:45 -0500 (Sun, 17 Aug 2008) | 1 line set svn:executable on a script ........ r65785 | amaury.forgeotdarc | 2008-08-17 16:05:18 -0500 (Sun, 17 Aug 2008) | 3 lines Fix a refleak in bytearray.split and bytearray.rsplit, detected by regrtest.py -R:: test_bytes ........ r65809 | nick.coghlan | 2008-08-18 07:42:46 -0500 (Mon, 18 Aug 2008) | 1 line Belated NEWS entry for r65642 ........ r65812 | nick.coghlan | 2008-08-18 08:32:19 -0500 (Mon, 18 Aug 2008) | 1 line Fix typo ........ r65834 | amaury.forgeotdarc | 2008-08-18 14:23:47 -0500 (Mon, 18 Aug 2008) | 4 lines #2234 distutils failed with mingw binutils 2.18.50.20080109. Be less strict when parsing these version numbers, they don't necessarily follow the python numbering scheme. ........ r65846 | georg.brandl | 2008-08-18 18:09:49 -0500 (Mon, 18 Aug 2008) | 2 lines Fix grammar. ........ r65859 | thomas.heller | 2008-08-19 12:47:13 -0500 (Tue, 19 Aug 2008) | 2 lines Fix strange character in the docstring. ........ r65861 | benjamin.peterson | 2008-08-19 12:59:23 -0500 (Tue, 19 Aug 2008) | 1 line get unparse to at least unparse its self ........ --- cygwinccompiler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index da2c74a2b1..ea4c7971fd 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -400,7 +400,7 @@ def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - from distutils.version import StrictVersion + from distutils.version import LooseVersion from distutils.spawn import find_executable import re @@ -411,7 +411,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: - gcc_version = StrictVersion(result.group(1)) + gcc_version = LooseVersion(result.group(1)) else: gcc_version = None else: @@ -423,7 +423,7 @@ def get_versions(): out.close() result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: - ld_version = StrictVersion(result.group(1)) + ld_version = LooseVersion(result.group(1)) else: ld_version = None else: @@ -435,7 +435,7 @@ def get_versions(): out.close() result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: - dllwrap_version = StrictVersion(result.group(1)) + dllwrap_version = LooseVersion(result.group(1)) else: dllwrap_version = None else: From ce2fde27c45c1041550de710a9dce751742ed47d Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 21 Aug 2008 01:15:08 +0000 Subject: [PATCH 2028/8469] Bump to 2.6b3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 06ec0d4bf8..74d0a47d47 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6b2" +__version__ = "2.6b3" #--end constants-- From 82e68f4b495194b137f661c4ace674a857ab9a24 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 21 Aug 2008 02:39:51 +0000 Subject: [PATCH 2029/8469] Bumping to 3.0b3 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 48bb00560b..9af2d9208e 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0b2" +__version__ = "3.0b3" #--end constants-- From 031df9f3aba5b6fac4773f05107ad5e7c6d830c4 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Tue, 2 Sep 2008 23:19:56 +0000 Subject: [PATCH 2030/8469] Issue 2975: when compiling multiple extension modules with visual studio 2008 from the same python instance, some environment variables (LIB, INCLUDE) would grow without limit. Tested with these statements: distutils.ccompiler.new_compiler().initialize() print os.environ['LIB'] But I don't know how to turn them into reliable unit tests. --- msvc9compiler.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index c8d52c4237..0b27428d05 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -193,6 +193,17 @@ def normalize_and_reduce_paths(paths): reduced_paths.append(np) return reduced_paths +def removeDuplicates(variable): + """Remove duplicate values of an environment variable. + """ + oldList = variable.split(os.pathsep) + newList = [] + for i in oldList: + if i not in newList: + newList.append(i) + newVariable = os.pathsep.join(newList) + return newVariable + def find_vcvarsall(version): """Find the vcvarsall.bat file @@ -252,12 +263,12 @@ def query_vcvarsall(version, arch="x86"): if '=' not in line: continue line = line.strip() - key, value = line.split('=') + key, value = line.split('=', 1) key = key.lower() if key in interesting: if value.endswith(os.pathsep): value = value[:-1] - result[key] = value + result[key] = removeDuplicates(value) if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) From acd8349dbdd9b886e8e78d43238c32f7858c0c20 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Tue, 2 Sep 2008 23:22:56 +0000 Subject: [PATCH 2031/8469] Merged revisions 66171 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r66171 | amaury.forgeotdarc | 2008-09-03 01:19:56 +0200 (mer., 03 sept. 2008) | 9 lines Issue 2975: when compiling multiple extension modules with visual studio 2008 from the same python instance, some environment variables (LIB, INCLUDE) would grow without limit. Tested with these statements: distutils.ccompiler.new_compiler().initialize() print os.environ['LIB'] But I don't know how to turn them into reliable unit tests. ........ --- msvc9compiler.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index fdb74aeabf..465013dc33 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -193,6 +193,17 @@ def normalize_and_reduce_paths(paths): reduced_paths.append(np) return reduced_paths +def removeDuplicates(variable): + """Remove duplicate values of an environment variable. + """ + oldList = variable.split(os.pathsep) + newList = [] + for i in oldList: + if i not in newList: + newList.append(i) + newVariable = os.pathsep.join(newList) + return newVariable + def find_vcvarsall(version): """Find the vcvarsall.bat file @@ -252,12 +263,12 @@ def query_vcvarsall(version, arch="x86"): if '=' not in line: continue line = line.strip() - key, value = line.split('=') + key, value = line.split('=', 1) key = key.lower() if key in interesting: if value.endswith(os.pathsep): value = value[:-1] - result[key] = value + result[key] = removeDuplicates(value) if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) From 299925be446045f3df379da3ca13797087c43efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Wed, 3 Sep 2008 11:13:56 +0000 Subject: [PATCH 2032/8469] Issue #2562: Fix distutils PKG-INFO writing logic to allow having non-ascii characters and Unicode in setup.py meta-data. --- dist.py | 38 +++++++++++++++++++++++++------------- tests/test_dist.py | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/dist.py b/dist.py index 0a21380973..9ad94fbeb8 100644 --- a/dist.py +++ b/dist.py @@ -23,6 +23,9 @@ from distutils import log from distutils.debug import DEBUG +# Encoding used for the PKG-INFO files +PKG_INFO_ENCODING = 'utf-8' + # Regex to define acceptable Distutils command names. This is not *quite* # the same as a Python NAME -- I don't allow leading underscores. The fact # that they're very similar is no coincidence; the default naming scheme is @@ -1084,23 +1087,23 @@ def write_pkg_file (self, file): if self.provides or self.requires or self.obsoletes: version = '1.1' - file.write('Metadata-Version: %s\n' % version) - file.write('Name: %s\n' % self.get_name() ) - file.write('Version: %s\n' % self.get_version() ) - file.write('Summary: %s\n' % self.get_description() ) - file.write('Home-page: %s\n' % self.get_url() ) - file.write('Author: %s\n' % self.get_contact() ) - file.write('Author-email: %s\n' % self.get_contact_email() ) - file.write('License: %s\n' % self.get_license() ) + self._write_field(file, 'Metadata-Version', version) + self._write_field(file, 'Name', self.get_name()) + self._write_field(file, 'Version', self.get_version()) + self._write_field(file, 'Summary', self.get_description()) + self._write_field(file, 'Home-page', self.get_url()) + self._write_field(file, 'Author', self.get_contact()) + self._write_field(file, 'Author-email', self.get_contact_email()) + self._write_field(file, 'License', self.get_license()) if self.download_url: - file.write('Download-URL: %s\n' % self.download_url) + self._write_field(file, 'Download-URL', self.download_url) - long_desc = rfc822_escape( self.get_long_description() ) - file.write('Description: %s\n' % long_desc) + long_desc = rfc822_escape( self.get_long_description()) + self._write_field(file, 'Description', long_desc) keywords = string.join( self.get_keywords(), ',') if keywords: - file.write('Keywords: %s\n' % keywords ) + self._write_field(file, 'Keywords', keywords) self._write_list(file, 'Platform', self.get_platforms()) self._write_list(file, 'Classifier', self.get_classifiers()) @@ -1110,9 +1113,18 @@ def write_pkg_file (self, file): self._write_list(file, 'Provides', self.get_provides()) self._write_list(file, 'Obsoletes', self.get_obsoletes()) + def _write_field(self, file, name, value): + + if isinstance(value, unicode): + value = value.encode(PKG_INFO_ENCODING) + else: + value = str(value) + file.write('%s: %s\n' % (name, value)) + def _write_list (self, file, name, values): + for value in values: - file.write('%s: %s\n' % (name, value)) + self._write_field(file, name, value) # -- Metadata query methods ---------------------------------------- diff --git a/tests/test_dist.py b/tests/test_dist.py index 8f1288e9f6..6f5fe9c757 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,3 +1,5 @@ +# -*- coding: latin-1 -*- + """Tests for distutils.dist.""" import distutils.cmd @@ -95,6 +97,39 @@ def test_command_packages_configfile(self): finally: os.unlink(TESTFN) + def test_write_pkg_file(self): + # Check DistributionMetadata handling of Unicode fields + my_file = os.path.join(os.path.dirname(__file__), 'f') + klass = distutils.dist.Distribution + + dist = klass(attrs={'author': u'Mister Café', + 'name': 'my.package', + 'maintainer': u'Café Junior', + 'description': u'Café torréfié', + 'long_description': u'Héhéhé'}) + + + # let's make sure the file can be written + # with Unicode fields. they are encoded with + # PKG_INFO_ENCODING + try: + dist.metadata.write_pkg_file(open(my_file, 'w')) + finally: + if os.path.exists(my_file): + os.remove(my_file) + + # regular ascii is of course always usable + dist = klass(attrs={'author': 'Mister Cafe', + 'name': 'my.package', + 'maintainer': 'Cafe Junior', + 'description': 'Cafe torrefie', + 'long_description': 'Hehehe'}) + + try: + dist.metadata.write_pkg_file(open(my_file, 'w')) + finally: + if os.path.exists(my_file): + os.remove(my_file) class MetadataTestCase(unittest.TestCase): From a69032e129711e6b10e786a753ba6bde427272fc Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 4 Sep 2008 21:32:09 +0000 Subject: [PATCH 2033/8469] Issue #3160: the "bdist_wininst" distutils command didn't work. Reviewed by Trent Nelson. --- command/bdist_wininst.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index ae7d4fde2e..e997e8f094 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -260,13 +260,18 @@ def create_exe(self, arcname, fullname, bitmap=None): cfgdata = cfgdata.encode("mbcs") # Append the pre-install script - cfgdata = cfgdata + "\0" + cfgdata = cfgdata + b"\0" if self.pre_install_script: - script_data = open(self.pre_install_script, "r").read() - cfgdata = cfgdata + script_data + "\n\0" + # We need to normalize newlines, so we open in text mode and + # convert back to bytes. "latin1" simply avoids any possible + # failures. + with open(self.pre_install_script, "r", + encoding="latin1") as script: + script_data = script.read().encode("latin1") + cfgdata = cfgdata + script_data + b"\n\0" else: # empty pre-install script - cfgdata = cfgdata + "\0" + cfgdata = cfgdata + b"\0" file.write(cfgdata) # The 'magic number' 0x1234567B is used to make sure that the From a97c6df7180f7bd58a5fe5415023ed396a1e7d58 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 12 Sep 2008 23:25:57 +0000 Subject: [PATCH 2034/8469] Bumping to 2.6rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 74d0a47d47..b622f7d217 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6b3" +__version__ = "2.6rc1" #--end constants-- From d85f8e8c6760feba91c06d78299f7f3ccd06cf63 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 18 Sep 2008 03:00:28 +0000 Subject: [PATCH 2035/8469] bumping to 3.0rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9af2d9208e..2bc0ab040f 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0b3" +__version__ = "3.0rc1" #--end constants-- From 3c15d77130e62f3ce3799cd5e27aa1efea293169 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 18 Sep 2008 03:51:46 +0000 Subject: [PATCH 2036/8469] avoid putting unicode objects in the environment causing later test failures. As discussed on #python-dev --- msvc9compiler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 0b27428d05..804f1751ce 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -357,9 +357,10 @@ def initialize(self, plat_name=None): vc_env = query_vcvarsall(VERSION, plat_spec) - self.__paths = vc_env['path'].split(os.pathsep) - os.environ['lib'] = vc_env['lib'] - os.environ['include'] = vc_env['include'] + # take care to only use strings in the environment. + self.__paths = vc_env['path'].encode('mbcs').split(os.pathsep) + os.environ['lib'] = vc_env['lib'].encode('mbcs') + os.environ['include'] = vc_env['include'].encode('mbcs') if len(self.__paths) == 0: raise DistutilsPlatformError("Python was built with %s, " From b4b479dd9b72baf9837af27ee2d31adf0dda6f7e Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 18 Sep 2008 04:33:43 +0000 Subject: [PATCH 2037/8469] Bumping to 2.6rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b622f7d217..fb8043c370 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6rc1" +__version__ = "2.6rc2" #--end constants-- From 2bf49fbe89baac64f6d5487e888385e9797e6164 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 21 Sep 2008 20:48:41 +0000 Subject: [PATCH 2038/8469] Issue #3925: Ignores shutil.rmtree error on cygwin too. Reviewed by Benjamin Peterson. --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a658f1aa1c..31b8b48185 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -62,8 +62,8 @@ def tearDown(self): # Get everything back to normal test_support.unload('xx') sys.path = self.sys_path - # XXX on Windows the test leaves a directory with xx.pyd in TEMP - shutil.rmtree(self.tmp_dir, False if os.name != "nt" else True) + # XXX on Windows the test leaves a directory with xx module in TEMP + shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') def test_suite(): if not sysconfig.python_build: From 2e2fdd07fefbe699f2978e48c0ea70e51a85eb30 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 21 Sep 2008 20:52:42 +0000 Subject: [PATCH 2039/8469] Merged revisions 66542 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r66542 | hirokazu.yamamoto | 2008-09-22 05:48:41 +0900 | 2 lines Issue #3925: Ignores shutil.rmtree error on cygwin too. Reviewed by Benjamin Peterson. ........ --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 20c10745cb..552a3d1440 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -62,8 +62,8 @@ def tearDown(self): # Get everything back to normal support.unload('xx') sys.path = self.sys_path - # XXX on Windows the test leaves a directory with xx.pyd in TEMP - shutil.rmtree(self.tmp_dir, False if os.name != "nt" else True) + # XXX on Windows the test leaves a directory with xx module in TEMP + shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') def test_suite(): if not sysconfig.python_build: From 2ffea9b40a52bc8b1f8ee1595969d86d9d87ced7 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 1 Oct 2008 21:46:40 +0000 Subject: [PATCH 2040/8469] Bumping to 2.6 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index fb8043c370..7315a37271 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6rc2" +__version__ = "2.6" #--end constants-- From 9dda0b585406f106ef19ec45b300f89677d0197e Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Sun, 5 Oct 2008 09:00:28 +0000 Subject: [PATCH 2041/8469] Fix [issue4038] py3k error in distutils file_copy exception handlers. r=martin. --- file_util.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/file_util.py b/file_util.py index 69190601fb..b46b0da678 100644 --- a/file_util.py +++ b/file_util.py @@ -30,31 +30,27 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): try: fsrc = open(src, 'rb') except os.error as e: - (errno, errstr) = e - raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) + raise DistutilsFileError("could not open '%s': %s" % (src, e.strerror)) if os.path.exists(dst): try: os.unlink(dst) except os.error as e: - (errno, errstr) = e raise DistutilsFileError( - "could not delete '%s': %s" % (dst, errstr)) + "could not delete '%s': %s" % (dst, e.strerror)) try: fdst = open(dst, 'wb') except os.error as e: - (errno, errstr) = e raise DistutilsFileError( - "could not create '%s': %s" % (dst, errstr)) + "could not create '%s': %s" % (dst, e.strerror)) while True: try: buf = fsrc.read(buffer_size) except os.error as e: - (errno, errstr) = e raise DistutilsFileError( - "could not read from '%s': %s" % (src, errstr)) + "could not read from '%s': %s" % (src, e.strerror)) if not buf: break @@ -62,9 +58,8 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): try: fdst.write(buf) except os.error as e: - (errno, errstr) = e raise DistutilsFileError( - "could not write to '%s': %s" % (dst, errstr)) + "could not write to '%s': %s" % (dst, e.strerror)) finally: if fdst: fdst.close() From f6a06d79d04028e85bc6db7402d2cfbfd8bc0b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 15 Oct 2008 05:58:17 +0000 Subject: [PATCH 2042/8469] Issue #4072: Restore build_py_2to3. Add a distutils demo for build_py_2to3. --- command/build_py.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 09f6d2331e..77284894ec 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -384,6 +384,18 @@ def byte_compile(self, files): byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) +from lib2to3.refactor import RefactoringTool, get_fixers_from_package +class DistutilsRefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): + # XXX ignores kw + log.error(msg, *args) + + def log_message(self, msg, *args): + log.info(msg, *args) + + def log_debug(self, msg, *args): + log.debug(msg, *args) + class build_py_2to3(build_py): def run(self): self.updated_files = [] @@ -396,18 +408,12 @@ def run(self): self.build_package_data() # 2to3 - from lib2to3.refactor import RefactoringTool - class Options: - pass - o = Options() - o.doctests_only = False - o.fix = [] - o.list_fixes = [] - o.print_function = False - o.verbose = False - o.write = True - r = RefactoringTool(o) - r.refactor_args(self.updated_files) + fixers = get_fixers_from_package('lib2to3.fixes') + options = dict(fix=[], list_fixes=[], + print_function=False, verbose=False, + write=True) + r = DistutilsRefactoringTool(fixers, options) + r.refactor(self.updated_files, write=True) # Remaining base class code self.byte_compile(self.get_outputs(include_bytecode=0)) From f4beb1d3745aee6654e115b5da14424ff4933a9c Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 6 Nov 2008 03:29:32 +0000 Subject: [PATCH 2043/8469] Bumping to 3.0rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2bc0ab040f..5e4972fd2b 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0rc1" +__version__ = "3.0rc2" #--end constants-- From f5f5810be1fccf5d38fe34126b0422079ffd3934 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 8 Nov 2008 15:15:57 +0000 Subject: [PATCH 2044/8469] #4283: fix left-over iteritems() in distutils. --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 0a902cee89..b5c9554d61 100644 --- a/command/install.py +++ b/command/install.py @@ -546,7 +546,7 @@ def create_home_path(self): if not self.user: return home = convert_path(os.path.expanduser("~")) - for name, path in self.config_vars.iteritems(): + for name, path in self.config_vars.items(): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0o700)" % path) os.makedirs(path, 0o700) From 94f19788a970b7cd603e843207f06ade6f0dbd5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 20 Nov 2008 16:21:55 +0000 Subject: [PATCH 2045/8469] Issue #4354: Fix distutils register command. --- command/register.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/command/register.py b/command/register.py index 6d5c459924..045cbb6381 100644 --- a/command/register.py +++ b/command/register.py @@ -15,11 +15,6 @@ from distutils.errors import * from distutils import log -def raw_input(prompt): - sys.stdout.write(prompt) - sys.stdout.flush() - return sys.stdin.readline() - class register(PyPIRCCommand): description = ("register the distribution with the Python package index") @@ -154,7 +149,7 @@ def send_metadata(self): 3. have the server generate a new password for you (and email it to you), or 4. quit Your selection [default 1]: ''', end=' ') - choice = raw_input() + choice = input() if not choice: choice = '1' elif choice not in choices: @@ -163,7 +158,7 @@ def send_metadata(self): if choice == '1': # get the username and password while not username: - username = raw_input('Username: ') + username = input('Username: ') while not password: password = getpass.getpass('Password: ') @@ -182,7 +177,7 @@ def send_metadata(self): print('(the login will be stored in %s)' % self._get_rc_file()) choice = 'X' while choice.lower() not in 'yn': - choice = raw_input('Save your login (y/N)?') + choice = input('Save your login (y/N)?') if not choice: choice = 'n' if choice.lower() == 'y': @@ -193,7 +188,7 @@ def send_metadata(self): data['name'] = data['password'] = data['email'] = '' data['confirm'] = None while not data['name']: - data['name'] = raw_input('Username: ') + data['name'] = input('Username: ') while data['password'] != data['confirm']: while not data['password']: data['password'] = getpass.getpass('Password: ') @@ -204,7 +199,7 @@ def send_metadata(self): data['confirm'] = None print("Password and confirm don't match!") while not data['email']: - data['email'] = raw_input(' EMail: ') + data['email'] = input(' EMail: ') code, result = self.post_to_server(data) if code != 200: print('Server response (%s): %s'%(code, result)) @@ -215,7 +210,7 @@ def send_metadata(self): data = {':action': 'password_reset'} data['email'] = '' while not data['email']: - data['email'] = raw_input('Your email address: ') + data['email'] = input('Your email address: ') code, result = self.post_to_server(data) print('Server response (%s): %s'%(code, result)) @@ -262,7 +257,7 @@ def post_to_server(self, data, auth=None): if type(value) not in (type([]), type( () )): value = [value] for value in value: - value = str(value).encode("utf-8") + value = str(value) body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") @@ -271,7 +266,7 @@ def post_to_server(self, data, auth=None): body.write('\n') # write an extra newline (lurve Macs) body.write(end_boundary) body.write("\n") - body = body.getvalue() + body = body.getvalue().encode("utf-8") # build the Request headers = { From 2dd637745910d84b0c7342622a823ed0c3a2cd62 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 20 Nov 2008 23:53:46 +0000 Subject: [PATCH 2046/8469] #4338: Fix the distutils "setup.py upload" command. The code still mixed bytes and strings. Reviewed by Martin von Loewis. --- command/upload.py | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/command/upload.py b/command/upload.py index 5049f03e93..7ba7f5888a 100644 --- a/command/upload.py +++ b/command/upload.py @@ -7,11 +7,11 @@ from distutils.spawn import spawn from distutils import log from hashlib import md5 -import os +import os, io import socket import platform import configparser -import http.client +import http.client as httpclient import base64 import urllib.parse @@ -113,33 +113,35 @@ def upload_file(self, command, pyversion, filename): open(filename+".asc").read()) # set up the authentication - auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() + user_pass = (self.username + ":" + self.password).encode('ascii') + # The exact encoding of the authentication string is debated. + # Anyway PyPI only accepts ascii for both username or password. + auth = "Basic " + base64.encodestring(user_pass).strip().decode('ascii') # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = '\n--' + boundary - end_boundary = sep_boundary + '--' - body = io.StringIO() + sep_boundary = b'\n--' + boundary.encode('ascii') + end_boundary = sep_boundary + b'--' + body = io.BytesIO() for key, value in data.items(): + title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if type(value) != type([]): value = [value] for value in value: if type(value) is tuple: - fn = ';filename="%s"' % value[0] + title += '; filename="%s"' % value[0] value = value[1] else: - fn = "" - value = str(value) + value = str(value).encode('utf-8') body.write(sep_boundary) - body.write('\nContent-Disposition: form-data; name="%s"'%key) - body.write(fn) - body.write("\n\n") + body.write(title.encode('utf-8')) + body.write(b"\n\n") body.write(value) - if value and value[-1] == '\r': - body.write('\n') # write an extra newline (lurve Macs) + if value and value[-1:] == b'\r': + body.write(b'\n') # write an extra newline (lurve Macs) body.write(end_boundary) - body.write("\n") + body.write(b"\n") body = body.getvalue() self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) @@ -152,9 +154,9 @@ def upload_file(self, command, pyversion, filename): urllib.parse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': - http = http.client.HTTPConnection(netloc) + http = httpclient.HTTPConnection(netloc) elif schema == 'https': - http = http.client.HTTPSConnection(netloc) + http = httpclient.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema "+schema) From a122c2880d7b97fac4345692b4d9fedd58bec7b5 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 21 Nov 2008 01:18:21 +0000 Subject: [PATCH 2047/8469] Bump to 3.0rc3 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 5e4972fd2b..2cf9d4d304 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0rc2" +__version__ = "3.0rc3" #--end constants-- From c6338dae14e511f967554aaceb5ade0c698327a3 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 25 Nov 2008 21:21:32 +0000 Subject: [PATCH 2048/8469] Second fix for issue #4373 --- tests/test_build_ext.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 552a3d1440..527529777d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -11,6 +11,10 @@ import unittest from test import support +# http://bugs.python.org/issue4373 +# Don't load the xx module more than once. +ALREADY_TESTED = False + class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment @@ -23,6 +27,7 @@ def setUp(self): shutil.copy(xx_c, self.tmp_dir) def test_build_ext(self): + global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) @@ -45,6 +50,11 @@ def test_build_ext(self): finally: sys.stdout = old_stdout + if ALREADY_TESTED: + return + else: + ALREADY_TESTED = True + import xx for attr in ('error', 'foo', 'new', 'roj'): From 3b615290cad279b0375edf204b8c673c0353f27a Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 28 Nov 2008 11:02:32 +0000 Subject: [PATCH 2049/8469] Fixed issue ##3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 804f1751ce..4f72e78096 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -316,7 +316,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): self.__version = VERSION self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS - self.__path = [] + self.__paths = [] # target platform (.plat_name is consistent with 'bdist') self.plat_name = None self.__arch = None # deprecated name From 6850072391c86bfcfd01c6b0d65762f9d9c45d40 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 28 Nov 2008 11:03:48 +0000 Subject: [PATCH 2050/8469] Merged revisions 67414 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67414 | christian.heimes | 2008-11-28 12:02:32 +0100 (Fri, 28 Nov 2008) | 1 line Fixed issue ##3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception ........ --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 804f1751ce..4f72e78096 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -316,7 +316,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): self.__version = VERSION self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS - self.__path = [] + self.__paths = [] # target platform (.plat_name is consistent with 'bdist') self.plat_name = None self.__arch = None # deprecated name From e32c222776d9dff73e9ba246c7cb654764157bb9 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 28 Nov 2008 11:05:17 +0000 Subject: [PATCH 2051/8469] Merged revisions 67414 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67414 | christian.heimes | 2008-11-28 12:02:32 +0100 (Fri, 28 Nov 2008) | 1 line Fixed issue ##3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception ........ --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 465013dc33..eced0524b8 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -316,7 +316,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): self.__version = VERSION self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS - self.__path = [] + self.__paths = [] # target platform (.plat_name is consistent with 'bdist') self.plat_name = None self.__arch = None # deprecated name From c2ce44619f5637169f3a57efbd9fc6e97f476ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 1 Dec 2008 04:38:52 +0000 Subject: [PATCH 2052/8469] Issue #4073: Add 2to3 support to build_scripts, refactor that support in build_py. --- command/build_py.py | 23 +++---------------- command/build_scripts.py | 15 ++++++++++++- util.py | 48 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 21 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 77284894ec..99d85be96c 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -9,7 +9,7 @@ from distutils.core import Command from distutils.errors import * -from distutils.util import convert_path +from distutils.util import convert_path, Mixin2to3 from distutils import log class build_py (Command): @@ -384,19 +384,7 @@ def byte_compile(self, files): byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) -from lib2to3.refactor import RefactoringTool, get_fixers_from_package -class DistutilsRefactoringTool(RefactoringTool): - def log_error(self, msg, *args, **kw): - # XXX ignores kw - log.error(msg, *args) - - def log_message(self, msg, *args): - log.info(msg, *args) - - def log_debug(self, msg, *args): - log.debug(msg, *args) - -class build_py_2to3(build_py): +class build_py_2to3(build_py, Mixin2to3): def run(self): self.updated_files = [] @@ -408,12 +396,7 @@ def run(self): self.build_package_data() # 2to3 - fixers = get_fixers_from_package('lib2to3.fixes') - options = dict(fix=[], list_fixes=[], - print_function=False, verbose=False, - write=True) - r = DistutilsRefactoringTool(fixers, options) - r.refactor(self.updated_files, write=True) + self.run_2to3(self.updated_files) # Remaining base class code self.byte_compile(self.get_outputs(include_bytecode=0)) diff --git a/command/build_scripts.py b/command/build_scripts.py index 3ac5b0c0be..dc04a9fcdb 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -9,7 +9,7 @@ from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer -from distutils.util import convert_path +from distutils.util import convert_path, Mixin2to3 from distutils import log # check if Python is called on the first line with this expression @@ -59,6 +59,7 @@ def copy_scripts(self): """ self.mkpath(self.build_dir) outfiles = [] + updated_files = [] for script in self.scripts: adjust = False script = convert_path(script) @@ -92,6 +93,7 @@ def copy_scripts(self): if adjust: log.info("copying and adjusting %s -> %s", script, self.build_dir) + updated_files.append(outfile) if not self.dry_run: outf = open(outfile, "w") if not sysconfig.python_build: @@ -112,6 +114,7 @@ def copy_scripts(self): else: if f: f.close() + updated_files.append(outfile) self.copy_file(script, outfile) if os.name == 'posix': @@ -125,3 +128,13 @@ def copy_scripts(self): log.info("changing mode of %s from %o to %o", file, oldmode, newmode) os.chmod(file, newmode) + # XXX should we modify self.outfiles? + return outfiles, updated_files + +class build_scripts_2to3(build_scripts, Mixin2to3): + + def copy_scripts(self): + outfiles, updated_files = build_scripts.copy_scripts(self) + if not self.dry_run: + self.run_2to3(updated_files) + return outfiles, updated_files diff --git a/util.py b/util.py index b87dfbe065..28337fa9a0 100644 --- a/util.py +++ b/util.py @@ -531,3 +531,51 @@ def rfc822_escape (header): lines = [x.strip() for x in header.split('\n')] sep = '\n' + 8*' ' return sep.join(lines) + +# 2to3 support + +def run_2to3(files, fixer_names=None, options=None, explicit=None): + """Invoke 2to3 on a list of Python files. + The files should all come from the build area, as the + modification is done in-place. To reduce the build time, + only files modified since the last invocation of this + function should be passed in the files argument.""" + + if not files: + return + + # Make this class local, to delay import of 2to3 + from lib2to3.refactor import RefactoringTool, get_fixers_from_package + class DistutilsRefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): + log.error(msg, *args) + + def log_message(self, msg, *args): + log.info(msg, *args) + + def log_debug(self, msg, *args): + log.debug(msg, *args) + + if fixer_names is None: + fixer_names = get_fixers_from_package('lib2to3.fixes') + r = DistutilsRefactoringTool(fixer_names, options=options) + r.refactor(files, write=True) + +class Mixin2to3: + '''Mixin class for commands that run 2to3. + To configure 2to3, setup scripts may either change + the class variables, or inherit from individual commands + to override how 2to3 is invoked.''' + + # provide list of fixers to run; + # defaults to all from lib2to3.fixers + fixer_names = None + + # options dictionary + options = None + + # list of fixers to invoke even though they are marked as explicit + explicit = None + + def run_2to3(self, files): + return run_2to3(files, self.fixer_names, self.options, self.explicit) From e55ca00608e5c34e302a4ad0fc367fa55fd5cadb Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 3 Dec 2008 16:46:14 +0000 Subject: [PATCH 2053/8469] Prep for Python 3.1! --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2cf9d4d304..34fc008a58 100644 --- a/__init__.py +++ b/__init__.py @@ -20,5 +20,5 @@ # #--start constants-- -__version__ = "3.0rc3" +__version__ = "3.1a0" #--end constants-- From 78ad69e50bbf4f0948621c9805a65936b5bcee2e Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 4 Dec 2008 02:59:51 +0000 Subject: [PATCH 2054/8469] Prep for 2.6.1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7315a37271..8f7eb8427d 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6" +__version__ = "2.6.1" #--end constants-- From 30a3850d75b9050b79a65a4da14c58401e495443 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 11 Dec 2008 00:03:42 +0000 Subject: [PATCH 2055/8469] #1030250: correctly pass the dry_run option to the mkpath() function. --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 0ed9a40a35..87d6e27396 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1041,7 +1041,7 @@ def move_file (self, src, dst): return move_file (src, dst, dry_run=self.dry_run) def mkpath (self, name, mode=0777): - mkpath (name, mode, self.dry_run) + mkpath (name, mode, dry_run=self.dry_run) # class CCompiler From 73b7309d54071194b72b68c783eded336f96d9fb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 21 Dec 2008 00:06:59 +0000 Subject: [PATCH 2056/8469] Merged revisions 67654,67676-67677,67681,67692,67725,67761,67784-67785,67787-67788,67802,67848-67850,67862-67864,67880,67882 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67654 | georg.brandl | 2008-12-07 16:42:09 -0600 (Sun, 07 Dec 2008) | 2 lines #4457: rewrite __import__() documentation. ........ r67676 | benjamin.peterson | 2008-12-08 20:03:03 -0600 (Mon, 08 Dec 2008) | 1 line specify how things are copied ........ r67677 | benjamin.peterson | 2008-12-08 20:05:11 -0600 (Mon, 08 Dec 2008) | 1 line revert unrelated change to installer script ........ r67681 | jeremy.hylton | 2008-12-09 15:03:10 -0600 (Tue, 09 Dec 2008) | 2 lines Add simple unittests for Request ........ r67692 | amaury.forgeotdarc | 2008-12-10 18:03:42 -0600 (Wed, 10 Dec 2008) | 2 lines #1030250: correctly pass the dry_run option to the mkpath() function. ........ r67725 | benjamin.peterson | 2008-12-12 22:02:20 -0600 (Fri, 12 Dec 2008) | 1 line fix incorrect example ........ r67761 | benjamin.peterson | 2008-12-14 11:26:04 -0600 (Sun, 14 Dec 2008) | 1 line fix missing bracket ........ r67784 | georg.brandl | 2008-12-15 02:33:58 -0600 (Mon, 15 Dec 2008) | 2 lines #4446: document "platforms" argument for setup(). ........ r67785 | georg.brandl | 2008-12-15 02:36:11 -0600 (Mon, 15 Dec 2008) | 2 lines #4611: fix typo. ........ r67787 | georg.brandl | 2008-12-15 02:58:59 -0600 (Mon, 15 Dec 2008) | 2 lines #4578: fix has_key() usage in compiler package. ........ r67788 | georg.brandl | 2008-12-15 03:07:39 -0600 (Mon, 15 Dec 2008) | 2 lines #4568: remove limitation in varargs callback example. ........ r67802 | amaury.forgeotdarc | 2008-12-15 16:29:14 -0600 (Mon, 15 Dec 2008) | 4 lines #3632: the "pyo" macro from gdbinit can now run when the GIL is released. Patch by haypo. ........ r67848 | benjamin.peterson | 2008-12-18 20:28:56 -0600 (Thu, 18 Dec 2008) | 1 line fix typo ........ r67849 | benjamin.peterson | 2008-12-18 20:31:35 -0600 (Thu, 18 Dec 2008) | 1 line _call_method -> _callmethod and _get_value to _getvalue ........ r67850 | raymond.hettinger | 2008-12-19 03:06:07 -0600 (Fri, 19 Dec 2008) | 9 lines Fix-up and clean-up docs for int.bit_length(). * Replace dramatic footnote with in-line comment about possible round-off errors in logarithms of large numbers. * Add comments to the pure python code equivalent. * replace floor() with int() in the mathematical equivalent so the type is correct (should be an int, not a float). * add abs() to the mathematical equivalent so that it matches the previous line that it is supposed to be equivalent to. * make one combined example with a negative input. ........ r67862 | benjamin.peterson | 2008-12-19 20:48:02 -0600 (Fri, 19 Dec 2008) | 1 line copy sentence from docstring ........ r67863 | benjamin.peterson | 2008-12-19 20:51:26 -0600 (Fri, 19 Dec 2008) | 1 line add headings ........ r67864 | benjamin.peterson | 2008-12-19 20:57:19 -0600 (Fri, 19 Dec 2008) | 1 line beef up docstring ........ r67880 | benjamin.peterson | 2008-12-20 16:49:24 -0600 (Sat, 20 Dec 2008) | 1 line remove redundant sentence ........ r67882 | benjamin.peterson | 2008-12-20 16:59:49 -0600 (Sat, 20 Dec 2008) | 1 line add some recent releases to the list ........ --- ccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 1e09123afc..f5d1587d72 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -984,8 +984,8 @@ def spawn(self, cmd): def move_file(self, src, dst): return move_file(src, dst, dry_run=self.dry_run) - def mkpath(self, name, mode=0o777): - mkpath(name, mode, self.dry_run) + def mkpath (self, name, mode=0o777): + mkpath(name, mode, dry_run=self.dry_run) # Map a sys.platform/os.name ('posix', 'nt') to the default compiler From 058256f5d77a12162cd5ffd6d5249a53b7f44add Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 21 Dec 2008 17:01:26 +0000 Subject: [PATCH 2057/8469] Merged revisions 67654,67676-67677,67681,67692,67725,67746,67748,67761,67784-67785,67787-67788,67802,67832,67848-67849,67859,67862-67864,67880,67882,67885,67889-67892,67895 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r67654 | georg.brandl | 2008-12-07 16:42:09 -0600 (Sun, 07 Dec 2008) | 2 lines #4457: rewrite __import__() documentation. ................ r67676 | benjamin.peterson | 2008-12-08 20:03:03 -0600 (Mon, 08 Dec 2008) | 1 line specify how things are copied ................ r67677 | benjamin.peterson | 2008-12-08 20:05:11 -0600 (Mon, 08 Dec 2008) | 1 line revert unrelated change to installer script ................ r67681 | jeremy.hylton | 2008-12-09 15:03:10 -0600 (Tue, 09 Dec 2008) | 2 lines Add simple unittests for Request ................ r67692 | amaury.forgeotdarc | 2008-12-10 18:03:42 -0600 (Wed, 10 Dec 2008) | 2 lines #1030250: correctly pass the dry_run option to the mkpath() function. ................ r67725 | benjamin.peterson | 2008-12-12 22:02:20 -0600 (Fri, 12 Dec 2008) | 1 line fix incorrect example ................ r67746 | antoine.pitrou | 2008-12-13 17:12:30 -0600 (Sat, 13 Dec 2008) | 3 lines Issue #4163: Use unicode-friendly word splitting in the textwrap functions when given an unicode string. ................ r67748 | benjamin.peterson | 2008-12-13 19:46:11 -0600 (Sat, 13 Dec 2008) | 1 line remove has_key usage ................ r67761 | benjamin.peterson | 2008-12-14 11:26:04 -0600 (Sun, 14 Dec 2008) | 1 line fix missing bracket ................ r67784 | georg.brandl | 2008-12-15 02:33:58 -0600 (Mon, 15 Dec 2008) | 2 lines #4446: document "platforms" argument for setup(). ................ r67785 | georg.brandl | 2008-12-15 02:36:11 -0600 (Mon, 15 Dec 2008) | 2 lines #4611: fix typo. ................ r67787 | georg.brandl | 2008-12-15 02:58:59 -0600 (Mon, 15 Dec 2008) | 2 lines #4578: fix has_key() usage in compiler package. ................ r67788 | georg.brandl | 2008-12-15 03:07:39 -0600 (Mon, 15 Dec 2008) | 2 lines #4568: remove limitation in varargs callback example. ................ r67802 | amaury.forgeotdarc | 2008-12-15 16:29:14 -0600 (Mon, 15 Dec 2008) | 4 lines #3632: the "pyo" macro from gdbinit can now run when the GIL is released. Patch by haypo. ................ r67832 | antoine.pitrou | 2008-12-17 16:46:54 -0600 (Wed, 17 Dec 2008) | 4 lines Issue #2467: gc.DEBUG_STATS reports invalid elapsed times. Patch by Neil Schemenauer, very slightly modified. ................ r67848 | benjamin.peterson | 2008-12-18 20:28:56 -0600 (Thu, 18 Dec 2008) | 1 line fix typo ................ r67849 | benjamin.peterson | 2008-12-18 20:31:35 -0600 (Thu, 18 Dec 2008) | 1 line _call_method -> _callmethod and _get_value to _getvalue ................ r67859 | amaury.forgeotdarc | 2008-12-19 16:56:48 -0600 (Fri, 19 Dec 2008) | 4 lines #4700: crtlicense.txt is displayed by the license() command and should be kept ascii-only. Will port to 3.0 ................ r67862 | benjamin.peterson | 2008-12-19 20:48:02 -0600 (Fri, 19 Dec 2008) | 1 line copy sentence from docstring ................ r67863 | benjamin.peterson | 2008-12-19 20:51:26 -0600 (Fri, 19 Dec 2008) | 1 line add headings ................ r67864 | benjamin.peterson | 2008-12-19 20:57:19 -0600 (Fri, 19 Dec 2008) | 1 line beef up docstring ................ r67880 | benjamin.peterson | 2008-12-20 16:49:24 -0600 (Sat, 20 Dec 2008) | 1 line remove redundant sentence ................ r67882 | benjamin.peterson | 2008-12-20 16:59:49 -0600 (Sat, 20 Dec 2008) | 1 line add some recent releases to the list ................ r67885 | benjamin.peterson | 2008-12-20 17:48:54 -0600 (Sat, 20 Dec 2008) | 1 line silence annoying DeprecationWarning ................ r67889 | benjamin.peterson | 2008-12-20 19:04:32 -0600 (Sat, 20 Dec 2008) | 1 line sphinx.web is long gone ................ r67890 | benjamin.peterson | 2008-12-20 19:12:26 -0600 (Sat, 20 Dec 2008) | 1 line update readme ................ r67891 | benjamin.peterson | 2008-12-20 19:14:47 -0600 (Sat, 20 Dec 2008) | 1 line there are way too many places which need to have the current version added ................ r67892 | benjamin.peterson | 2008-12-20 19:29:32 -0600 (Sat, 20 Dec 2008) | 9 lines Merged revisions 67809 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line fix logic error ........ ................ r67895 | neal.norwitz | 2008-12-21 08:28:32 -0600 (Sun, 21 Dec 2008) | 2 lines Add Tarek for work on distutils. ................ --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 0ed9a40a35..87d6e27396 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1041,7 +1041,7 @@ def move_file (self, src, dst): return move_file (src, dst, dry_run=self.dry_run) def mkpath (self, name, mode=0777): - mkpath (name, mode, self.dry_run) + mkpath (name, mode, dry_run=self.dry_run) # class CCompiler From 0bcdf06224e998e958d9fc01aa27eb2655cbe6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 24 Dec 2008 19:10:05 +0000 Subject: [PATCH 2058/8469] fixed #4400 : distutils .pypirc default generated file was broken. --- command/register.py | 16 ++++-- config.py | 4 +- tests/test_config.py | 29 +++++++++++ tests/test_register.py | 109 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 151 insertions(+), 7 deletions(-) create mode 100644 tests/test_register.py diff --git a/command/register.py b/command/register.py index a9ab361a17..bf7be96096 100644 --- a/command/register.py +++ b/command/register.py @@ -141,12 +141,14 @@ def send_metadata(self): # get the user's login info choices = '1 2 3 4'.split() while choice not in choices: - print '''We need to know who you are, so please choose either: + self.announce('''\ +We need to know who you are, so please choose either: 1. use your existing login, 2. register as a new user, 3. have the server generate a new password for you (and email it to you), or 4. quit -Your selection [default 1]: ''', +Your selection [default 1]: ''', log.INFO) + choice = raw_input() if not choice: choice = '1' @@ -167,12 +169,16 @@ def send_metadata(self): # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s' % (code, result) + self.announce('Server response (%s): %s' % (code, result), + log.INFO) # possibly save the login if not self.has_config and code == 200: - print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)' % self._get_rc_file() + self.announce(('I can store your PyPI login so future ' + 'submissions will be faster.'), log.INFO) + self.announce('(the login will be stored in %s)' % \ + self._get_rc_file(), log.INFO) + choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') diff --git a/config.py b/config.py index e3a4c57e33..4186c9b1d8 100644 --- a/config.py +++ b/config.py @@ -10,8 +10,8 @@ from distutils.cmd import Command DEFAULT_PYPIRC = """\ -[pypirc] -servers = +[distutils] +index-servers = pypi [pypi] diff --git a/tests/test_config.py b/tests/test_config.py index bfce3e3e72..cae7689884 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -5,6 +5,8 @@ from distutils.core import PyPIRCCommand from distutils.core import Distribution +from distutils.log import set_threshold +from distutils.log import WARN from distutils.tests import support @@ -32,6 +34,17 @@ password:secret """ +WANTED = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + + class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): @@ -53,6 +66,7 @@ def initialize_options(self): finalize_options = initialize_options self._cmd = command + self.old_threshold = set_threshold(WARN) def tearDown(self): """Removes the patch.""" @@ -62,6 +76,7 @@ def tearDown(self): os.environ['HOME'] = self._old_home if os.path.exists(self.rc): os.remove(self.rc) + set_threshold(self.old_threshold) def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: @@ -98,6 +113,20 @@ def test_server_registration(self): ('server', 'server-login'), ('username', 'tarek')] self.assertEquals(config, waited) + def test_server_empty_registration(self): + + cmd = self._cmd(self.dist) + rc = cmd._get_rc_file() + self.assert_(not os.path.exists(rc)) + + cmd._store_pypirc('tarek', 'xxx') + + self.assert_(os.path.exists(rc)) + content = open(rc).read() + + self.assertEquals(content, WANTED) + + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_register.py b/tests/test_register.py new file mode 100644 index 0000000000..3a3a3b739b --- /dev/null +++ b/tests/test_register.py @@ -0,0 +1,109 @@ +"""Tests for distutils.command.register.""" +import sys +import os +import unittest + +from distutils.command.register import register +from distutils.core import Distribution + +from distutils.tests import support +from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase + +class RawInputs(object): + """Fakes user inputs.""" + def __init__(self, *answers): + self.answers = answers + self.index = 0 + + def __call__(self, prompt=''): + try: + return self.answers[self.index] + finally: + self.index += 1 + +WANTED_PYPIRC = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + +class registerTestCase(PyPIRCCommandTestCase): + + def test_create_pypirc(self): + # this test makes sure a .pypirc file + # is created when requested. + + # let's create a fake distribution + # and a register instance + dist = Distribution() + dist.metadata.url = 'xxx' + dist.metadata.author = 'xxx' + dist.metadata.author_email = 'xxx' + dist.metadata.name = 'xxx' + dist.metadata.version = 'xxx' + cmd = register(dist) + + # we shouldn't have a .pypirc file yet + self.assert_(not os.path.exists(self.rc)) + + # patching raw_input and getpass.getpass + # so register gets happy + # + # Here's what we are faking : + # use your existing login (choice 1.) + # Username : 'tarek' + # Password : 'xxx' + # Save your login (y/N)? : 'y' + inputs = RawInputs('1', 'tarek', 'y') + from distutils.command import register as register_module + register_module.raw_input = inputs.__call__ + def _getpass(prompt): + return 'xxx' + register_module.getpass.getpass = _getpass + class FakeServer(object): + def __init__(self): + self.calls = [] + + def __call__(self, *args): + # we want to compare them, so let's store + # something comparable + els = args[0].items() + els.sort() + self.calls.append(tuple(els)) + return 200, 'OK' + + cmd.post_to_server = pypi_server = FakeServer() + + # let's run the command + cmd.run() + + # we should have a brand new .pypirc file + self.assert_(os.path.exists(self.rc)) + + # with the content similar to WANTED_PYPIRC + content = open(self.rc).read() + self.assertEquals(content, WANTED_PYPIRC) + + # now let's make sure the .pypirc file generated + # really works : we shouldn't be asked anything + # if we run the command again + def _no_way(prompt=''): + raise AssertionError(prompt) + register_module.raw_input = _no_way + + cmd.run() + + # let's see what the server received : we should + # have 2 similar requests + self.assert_(len(pypi_server.calls), 2) + self.assert_(pypi_server.calls[0], pypi_server.calls[1]) + +def test_suite(): + return unittest.makeSuite(registerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 2f485bf7a6d9627d79b9ba753a6a68d8d142eeeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 27 Dec 2008 13:28:42 +0000 Subject: [PATCH 2059/8469] Merged revisions 67926 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67926 | tarek.ziade | 2008-12-24 20:10:05 +0100 (Wed, 24 Dec 2008) | 1 line fixed #4400 : distutils .pypirc default generated file was broken. ........ --- command/register.py | 16 ++++-- config.py | 4 +- tests/test_config.py | 29 +++++++++++ tests/test_register.py | 109 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 151 insertions(+), 7 deletions(-) create mode 100644 tests/test_register.py diff --git a/command/register.py b/command/register.py index a9ab361a17..bf7be96096 100644 --- a/command/register.py +++ b/command/register.py @@ -141,12 +141,14 @@ def send_metadata(self): # get the user's login info choices = '1 2 3 4'.split() while choice not in choices: - print '''We need to know who you are, so please choose either: + self.announce('''\ +We need to know who you are, so please choose either: 1. use your existing login, 2. register as a new user, 3. have the server generate a new password for you (and email it to you), or 4. quit -Your selection [default 1]: ''', +Your selection [default 1]: ''', log.INFO) + choice = raw_input() if not choice: choice = '1' @@ -167,12 +169,16 @@ def send_metadata(self): # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print 'Server response (%s): %s' % (code, result) + self.announce('Server response (%s): %s' % (code, result), + log.INFO) # possibly save the login if not self.has_config and code == 200: - print 'I can store your PyPI login so future submissions will be faster.' - print '(the login will be stored in %s)' % self._get_rc_file() + self.announce(('I can store your PyPI login so future ' + 'submissions will be faster.'), log.INFO) + self.announce('(the login will be stored in %s)' % \ + self._get_rc_file(), log.INFO) + choice = 'X' while choice.lower() not in 'yn': choice = raw_input('Save your login (y/N)?') diff --git a/config.py b/config.py index e3a4c57e33..4186c9b1d8 100644 --- a/config.py +++ b/config.py @@ -10,8 +10,8 @@ from distutils.cmd import Command DEFAULT_PYPIRC = """\ -[pypirc] -servers = +[distutils] +index-servers = pypi [pypi] diff --git a/tests/test_config.py b/tests/test_config.py index bfce3e3e72..cae7689884 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -5,6 +5,8 @@ from distutils.core import PyPIRCCommand from distutils.core import Distribution +from distutils.log import set_threshold +from distutils.log import WARN from distutils.tests import support @@ -32,6 +34,17 @@ password:secret """ +WANTED = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + + class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): @@ -53,6 +66,7 @@ def initialize_options(self): finalize_options = initialize_options self._cmd = command + self.old_threshold = set_threshold(WARN) def tearDown(self): """Removes the patch.""" @@ -62,6 +76,7 @@ def tearDown(self): os.environ['HOME'] = self._old_home if os.path.exists(self.rc): os.remove(self.rc) + set_threshold(self.old_threshold) def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: @@ -98,6 +113,20 @@ def test_server_registration(self): ('server', 'server-login'), ('username', 'tarek')] self.assertEquals(config, waited) + def test_server_empty_registration(self): + + cmd = self._cmd(self.dist) + rc = cmd._get_rc_file() + self.assert_(not os.path.exists(rc)) + + cmd._store_pypirc('tarek', 'xxx') + + self.assert_(os.path.exists(rc)) + content = open(rc).read() + + self.assertEquals(content, WANTED) + + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_register.py b/tests/test_register.py new file mode 100644 index 0000000000..3a3a3b739b --- /dev/null +++ b/tests/test_register.py @@ -0,0 +1,109 @@ +"""Tests for distutils.command.register.""" +import sys +import os +import unittest + +from distutils.command.register import register +from distutils.core import Distribution + +from distutils.tests import support +from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase + +class RawInputs(object): + """Fakes user inputs.""" + def __init__(self, *answers): + self.answers = answers + self.index = 0 + + def __call__(self, prompt=''): + try: + return self.answers[self.index] + finally: + self.index += 1 + +WANTED_PYPIRC = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + +class registerTestCase(PyPIRCCommandTestCase): + + def test_create_pypirc(self): + # this test makes sure a .pypirc file + # is created when requested. + + # let's create a fake distribution + # and a register instance + dist = Distribution() + dist.metadata.url = 'xxx' + dist.metadata.author = 'xxx' + dist.metadata.author_email = 'xxx' + dist.metadata.name = 'xxx' + dist.metadata.version = 'xxx' + cmd = register(dist) + + # we shouldn't have a .pypirc file yet + self.assert_(not os.path.exists(self.rc)) + + # patching raw_input and getpass.getpass + # so register gets happy + # + # Here's what we are faking : + # use your existing login (choice 1.) + # Username : 'tarek' + # Password : 'xxx' + # Save your login (y/N)? : 'y' + inputs = RawInputs('1', 'tarek', 'y') + from distutils.command import register as register_module + register_module.raw_input = inputs.__call__ + def _getpass(prompt): + return 'xxx' + register_module.getpass.getpass = _getpass + class FakeServer(object): + def __init__(self): + self.calls = [] + + def __call__(self, *args): + # we want to compare them, so let's store + # something comparable + els = args[0].items() + els.sort() + self.calls.append(tuple(els)) + return 200, 'OK' + + cmd.post_to_server = pypi_server = FakeServer() + + # let's run the command + cmd.run() + + # we should have a brand new .pypirc file + self.assert_(os.path.exists(self.rc)) + + # with the content similar to WANTED_PYPIRC + content = open(self.rc).read() + self.assertEquals(content, WANTED_PYPIRC) + + # now let's make sure the .pypirc file generated + # really works : we shouldn't be asked anything + # if we run the command again + def _no_way(prompt=''): + raise AssertionError(prompt) + register_module.raw_input = _no_way + + cmd.run() + + # let's see what the server received : we should + # have 2 similar requests + self.assert_(len(pypi_server.calls), 2) + self.assert_(pypi_server.calls[0], pypi_server.calls[1]) + +def test_suite(): + return unittest.makeSuite(registerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a89c58deedd83e10acf51ce48c0a8ee9b753cc98 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Dec 2008 16:00:54 +0000 Subject: [PATCH 2060/8469] Merged revisions 67889-67892,67895,67898,67904-67907,67912,67918,67920-67921,67923-67924,67926-67927,67930,67943 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r67889 | benjamin.peterson | 2008-12-20 19:04:32 -0600 (Sat, 20 Dec 2008) | 1 line sphinx.web is long gone ................ r67890 | benjamin.peterson | 2008-12-20 19:12:26 -0600 (Sat, 20 Dec 2008) | 1 line update readme ................ r67891 | benjamin.peterson | 2008-12-20 19:14:47 -0600 (Sat, 20 Dec 2008) | 1 line there are way too many places which need to have the current version added ................ r67892 | benjamin.peterson | 2008-12-20 19:29:32 -0600 (Sat, 20 Dec 2008) | 9 lines Merged revisions 67809 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line fix logic error ........ ................ r67895 | neal.norwitz | 2008-12-21 08:28:32 -0600 (Sun, 21 Dec 2008) | 2 lines Add Tarek for work on distutils. ................ r67898 | benjamin.peterson | 2008-12-21 15:00:53 -0600 (Sun, 21 Dec 2008) | 1 line compute DISTVERSION with patchlevel.py ................ r67904 | benjamin.peterson | 2008-12-22 14:44:58 -0600 (Mon, 22 Dec 2008) | 1 line less attitude ................ r67905 | benjamin.peterson | 2008-12-22 14:51:15 -0600 (Mon, 22 Dec 2008) | 1 line fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' ................ r67906 | benjamin.peterson | 2008-12-22 14:52:53 -0600 (Mon, 22 Dec 2008) | 1 line add NEWS note ................ r67907 | benjamin.peterson | 2008-12-22 16:12:19 -0600 (Mon, 22 Dec 2008) | 1 line silence compiler warning ................ r67912 | georg.brandl | 2008-12-23 06:37:21 -0600 (Tue, 23 Dec 2008) | 2 lines Fix missing "svn" command. ................ r67918 | georg.brandl | 2008-12-23 09:44:25 -0600 (Tue, 23 Dec 2008) | 2 lines Markup fix. ................ r67920 | benjamin.peterson | 2008-12-23 14:09:28 -0600 (Tue, 23 Dec 2008) | 1 line use a global variable, so the compiler doesn't optimize the assignment out ................ r67921 | benjamin.peterson | 2008-12-23 14:12:33 -0600 (Tue, 23 Dec 2008) | 1 line make global static ................ r67923 | benjamin.peterson | 2008-12-24 09:10:27 -0600 (Wed, 24 Dec 2008) | 1 line #4736 BufferRWPair.closed shouldn't try to call another property as a function ................ r67924 | benjamin.peterson | 2008-12-24 10:10:05 -0600 (Wed, 24 Dec 2008) | 1 line pretend exceptions don't exist a while longer ................ r67926 | tarek.ziade | 2008-12-24 13:10:05 -0600 (Wed, 24 Dec 2008) | 1 line fixed #4400 : distutils .pypirc default generated file was broken. ................ r67927 | benjamin.peterson | 2008-12-26 17:26:30 -0600 (Fri, 26 Dec 2008) | 1 line python version is included in file name now ................ r67930 | hirokazu.yamamoto | 2008-12-26 22:19:48 -0600 (Fri, 26 Dec 2008) | 2 lines Issue #4740: Use HIGHEST_PROTOCOL in pickle test. (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2) ................ r67943 | alexandre.vassalotti | 2008-12-27 04:02:59 -0600 (Sat, 27 Dec 2008) | 2 lines Fix bogus unicode tests in pickletester. ................ --- command/register.py | 17 ++++--- config.py | 4 +- tests/test_config.py | 29 +++++++++++ tests/test_register.py | 109 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 151 insertions(+), 8 deletions(-) create mode 100644 tests/test_register.py diff --git a/command/register.py b/command/register.py index 045cbb6381..bd9b8c0143 100644 --- a/command/register.py +++ b/command/register.py @@ -143,13 +143,14 @@ def send_metadata(self): # get the user's login info choices = '1 2 3 4'.split() while choice not in choices: - print('''We need to know who you are, so please choose either: + self.announce('''\ +We need to know who you are, so please choose either: 1. use your existing login, 2. register as a new user, 3. have the server generate a new password for you (and email it to you), or 4. quit -Your selection [default 1]: ''', end=' ') - choice = input() +Your selection [default 1]: ''', log.INFO) + choice = raw_input() if not choice: choice = '1' elif choice not in choices: @@ -169,12 +170,16 @@ def send_metadata(self): # send the info to the server and report the result code, result = self.post_to_server(self.build_post_data('submit'), auth) - print('Server response (%s): %s'%(code, result)) + self.announce('Server response (%s): %s' % (code, result), + log.INFO) # possibly save the login if not self.has_config and code == 200: - print('I can store your PyPI login so future submissions will be faster.') - print('(the login will be stored in %s)' % self._get_rc_file()) + self.announce(('I can store your PyPI login so future ' + 'submissions will be faster.'), log.INFO) + self.announce('(the login will be stored in %s)' % \ + self._get_rc_file(), log.INFO) + choice = 'X' while choice.lower() not in 'yn': choice = input('Save your login (y/N)?') diff --git a/config.py b/config.py index 0ecfe0cc34..73f326047a 100644 --- a/config.py +++ b/config.py @@ -10,8 +10,8 @@ from distutils.cmd import Command DEFAULT_PYPIRC = """\ -[pypirc] -servers = +[distutils] +index-servers = pypi [pypi] diff --git a/tests/test_config.py b/tests/test_config.py index 016ba4cc70..bdc9b2b539 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -5,6 +5,8 @@ from distutils.core import PyPIRCCommand from distutils.core import Distribution +from distutils.log import set_threshold +from distutils.log import WARN from distutils.tests import support @@ -32,6 +34,17 @@ password:secret """ +WANTED = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + + class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): @@ -53,6 +66,7 @@ def initialize_options(self): finalize_options = initialize_options self._cmd = command + self.old_threshold = set_threshold(WARN) def tearDown(self): """Removes the patch.""" @@ -62,6 +76,7 @@ def tearDown(self): os.environ['HOME'] = self._old_home if os.path.exists(self.rc): os.remove(self.rc) + set_threshold(self.old_threshold) def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: @@ -96,6 +111,20 @@ def test_server_registration(self): ('server', 'server-login'), ('username', 'tarek')] self.assertEquals(config, waited) + def test_server_empty_registration(self): + + cmd = self._cmd(self.dist) + rc = cmd._get_rc_file() + self.assert_(not os.path.exists(rc)) + + cmd._store_pypirc('tarek', 'xxx') + + self.assert_(os.path.exists(rc)) + content = open(rc).read() + + self.assertEquals(content, WANTED) + + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_register.py b/tests/test_register.py new file mode 100644 index 0000000000..3a3a3b739b --- /dev/null +++ b/tests/test_register.py @@ -0,0 +1,109 @@ +"""Tests for distutils.command.register.""" +import sys +import os +import unittest + +from distutils.command.register import register +from distutils.core import Distribution + +from distutils.tests import support +from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase + +class RawInputs(object): + """Fakes user inputs.""" + def __init__(self, *answers): + self.answers = answers + self.index = 0 + + def __call__(self, prompt=''): + try: + return self.answers[self.index] + finally: + self.index += 1 + +WANTED_PYPIRC = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + +class registerTestCase(PyPIRCCommandTestCase): + + def test_create_pypirc(self): + # this test makes sure a .pypirc file + # is created when requested. + + # let's create a fake distribution + # and a register instance + dist = Distribution() + dist.metadata.url = 'xxx' + dist.metadata.author = 'xxx' + dist.metadata.author_email = 'xxx' + dist.metadata.name = 'xxx' + dist.metadata.version = 'xxx' + cmd = register(dist) + + # we shouldn't have a .pypirc file yet + self.assert_(not os.path.exists(self.rc)) + + # patching raw_input and getpass.getpass + # so register gets happy + # + # Here's what we are faking : + # use your existing login (choice 1.) + # Username : 'tarek' + # Password : 'xxx' + # Save your login (y/N)? : 'y' + inputs = RawInputs('1', 'tarek', 'y') + from distutils.command import register as register_module + register_module.raw_input = inputs.__call__ + def _getpass(prompt): + return 'xxx' + register_module.getpass.getpass = _getpass + class FakeServer(object): + def __init__(self): + self.calls = [] + + def __call__(self, *args): + # we want to compare them, so let's store + # something comparable + els = args[0].items() + els.sort() + self.calls.append(tuple(els)) + return 200, 'OK' + + cmd.post_to_server = pypi_server = FakeServer() + + # let's run the command + cmd.run() + + # we should have a brand new .pypirc file + self.assert_(os.path.exists(self.rc)) + + # with the content similar to WANTED_PYPIRC + content = open(self.rc).read() + self.assertEquals(content, WANTED_PYPIRC) + + # now let's make sure the .pypirc file generated + # really works : we shouldn't be asked anything + # if we run the command again + def _no_way(prompt=''): + raise AssertionError(prompt) + register_module.raw_input = _no_way + + cmd.run() + + # let's see what the server received : we should + # have 2 similar requests + self.assert_(len(pypi_server.calls), 2) + self.assert_(pypi_server.calls[0], pypi_server.calls[1]) + +def test_suite(): + return unittest.makeSuite(registerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 326cd6e433ffd81a314773b3b24db40a0a1cd09e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Dec 2008 17:00:44 +0000 Subject: [PATCH 2061/8469] fix 2.x isms in distutils test --- command/register.py | 2 +- tests/test_register.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/command/register.py b/command/register.py index bd9b8c0143..30e9a37e6a 100644 --- a/command/register.py +++ b/command/register.py @@ -150,7 +150,7 @@ def send_metadata(self): 3. have the server generate a new password for you (and email it to you), or 4. quit Your selection [default 1]: ''', log.INFO) - choice = raw_input() + choice = input() if not choice: choice = '1' elif choice not in choices: diff --git a/tests/test_register.py b/tests/test_register.py index 3a3a3b739b..021b3ea884 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -60,7 +60,7 @@ def test_create_pypirc(self): # Save your login (y/N)? : 'y' inputs = RawInputs('1', 'tarek', 'y') from distutils.command import register as register_module - register_module.raw_input = inputs.__call__ + register_module.input = inputs.__call__ def _getpass(prompt): return 'xxx' register_module.getpass.getpass = _getpass @@ -71,8 +71,7 @@ def __init__(self): def __call__(self, *args): # we want to compare them, so let's store # something comparable - els = args[0].items() - els.sort() + els = sorted(args[0].items()) self.calls.append(tuple(els)) return 200, 'OK' From d2c6eebccda5f6a0d0b252729142548561441e0f Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 28 Dec 2008 19:40:56 +0000 Subject: [PATCH 2062/8469] Issue4064: architecture string for universal builds on OSX --- util.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/util.py b/util.py index 262a9b8b04..48cc17f624 100644 --- a/util.py +++ b/util.py @@ -100,7 +100,11 @@ def get_platform (): if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: + if 1: + # Always calculate the release of the running machine, + # needed to determine if we can build fat binaries or not. + + macrelease = macver # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) @@ -116,16 +120,18 @@ def get_platform (): r'(.*?)', f.read()) f.close() if m is not None: - macver = '.'.join(m.group(1).split('.')[:2]) + macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour + if not macver: + macver = macrelease + if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" - - if (release + '.') >= '10.4.' and \ + if (macrelease + '.') >= '10.4.' and \ '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 From be477751d0c5f8a5fb565a0e871a2ad8fb915d45 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 28 Dec 2008 19:42:55 +0000 Subject: [PATCH 2063/8469] Backport of r67988 --- util.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/util.py b/util.py index 262a9b8b04..48cc17f624 100644 --- a/util.py +++ b/util.py @@ -100,7 +100,11 @@ def get_platform (): if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: + if 1: + # Always calculate the release of the running machine, + # needed to determine if we can build fat binaries or not. + + macrelease = macver # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) @@ -116,16 +120,18 @@ def get_platform (): r'(.*?)', f.read()) f.close() if m is not None: - macver = '.'.join(m.group(1).split('.')[:2]) + macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour + if not macver: + macver = macrelease + if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" - - if (release + '.') >= '10.4.' and \ + if (macrelease + '.') >= '10.4.' and \ '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 From 99059691e42d8d443fbb3746eb7b6695226dc166 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 28 Dec 2008 19:50:40 +0000 Subject: [PATCH 2064/8469] Update the fix for issue4064 to deal correctly with all three variants of universal builds that are presented by the configure script. --- util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 48cc17f624..e9d29ff49c 100644 --- a/util.py +++ b/util.py @@ -140,9 +140,13 @@ def get_platform (): # 'universal' instead of 'fat'. machine = 'fat' + cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in get_config_vars().get('CFLAGS'): - machine = 'universal' + if '-arch x86_64' in cflags: + if '-arch i386' in cflags: + machine = 'universal' + else: + machine = 'fat64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From 48eeeee501e34167c0245d9a9121da0af6cda5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Dec 2008 22:23:53 +0000 Subject: [PATCH 2065/8469] fixed #4646 : distutils was choking on empty options arg in the setup function. --- dist.py | 2 +- tests/test_dist.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 9ad94fbeb8..c15ca9770d 100644 --- a/dist.py +++ b/dist.py @@ -235,7 +235,7 @@ def __init__ (self, attrs=None): # command options will override any supplied redundantly # through the general options dictionary. options = attrs.get('options') - if options: + if options is not None: del attrs['options'] for (command, cmd_options) in options.items(): opt_dict = self.get_option_dict(command) diff --git a/tests/test_dist.py b/tests/test_dist.py index 6f5fe9c757..bf59c41844 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,6 +8,7 @@ import StringIO import sys import unittest +import warnings from test.test_support import TESTFN @@ -131,6 +132,29 @@ def test_write_pkg_file(self): if os.path.exists(my_file): os.remove(my_file) + def test_empty_options(self): + # an empty options dictionary should not stay in the + # list of attributes + klass = distutils.dist.Distribution + + # catching warnings + warns = [] + def _warn(msg): + warns.append(msg) + + old_warn = warnings.warn + warnings.warn = _warn + try: + dist = klass(attrs={'author': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'url': 'xxxx', + 'options': {}}) + finally: + warnings.warn = old_warn + + self.assertEquals(len(warns), 0) + class MetadataTestCase(unittest.TestCase): def test_simple_metadata(self): From 4ebe0bf0afa6a11df205dd6091326658eb4993b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Dec 2008 22:36:22 +0000 Subject: [PATCH 2066/8469] Merged revisions 68033 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68033 | tarek.ziade | 2008-12-29 23:23:53 +0100 (Mon, 29 Dec 2008) | 1 line fixed #4646 : distutils was choking on empty options arg in the setup function. ........ --- dist.py | 2 +- tests/test_dist.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 9ad94fbeb8..c15ca9770d 100644 --- a/dist.py +++ b/dist.py @@ -235,7 +235,7 @@ def __init__ (self, attrs=None): # command options will override any supplied redundantly # through the general options dictionary. options = attrs.get('options') - if options: + if options is not None: del attrs['options'] for (command, cmd_options) in options.items(): opt_dict = self.get_option_dict(command) diff --git a/tests/test_dist.py b/tests/test_dist.py index 6f5fe9c757..bf59c41844 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,6 +8,7 @@ import StringIO import sys import unittest +import warnings from test.test_support import TESTFN @@ -131,6 +132,29 @@ def test_write_pkg_file(self): if os.path.exists(my_file): os.remove(my_file) + def test_empty_options(self): + # an empty options dictionary should not stay in the + # list of attributes + klass = distutils.dist.Distribution + + # catching warnings + warns = [] + def _warn(msg): + warns.append(msg) + + old_warn = warnings.warn + warnings.warn = _warn + try: + dist = klass(attrs={'author': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'url': 'xxxx', + 'options': {}}) + finally: + warnings.warn = old_warn + + self.assertEquals(len(warns), 0) + class MetadataTestCase(unittest.TestCase): def test_simple_metadata(self): From bf2af83b71d70127ece0c4ef573216c7570fca95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Dec 2008 22:38:38 +0000 Subject: [PATCH 2067/8469] Merged revisions 68033 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68033 | tarek.ziade | 2008-12-29 23:23:53 +0100 (Mon, 29 Dec 2008) | 1 line fixed #4646 : distutils was choking on empty options arg in the setup function. ........ --- dist.py | 2 +- tests/test_dist.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 8bcb88c31b..7903c2a783 100644 --- a/dist.py +++ b/dist.py @@ -228,7 +228,7 @@ def __init__ (self, attrs=None): # command options will override any supplied redundantly # through the general options dictionary. options = attrs.get('options') - if options: + if options is not None: del attrs['options'] for (command, cmd_options) in options.items(): opt_dict = self.get_option_dict(command) diff --git a/tests/test_dist.py b/tests/test_dist.py index f1b11c1745..8e7ef5d33c 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -6,6 +6,7 @@ import io import sys import unittest +import warnings from test.support import TESTFN @@ -96,6 +97,29 @@ def test_command_packages_configfile(self): os.unlink(TESTFN) + def test_empty_options(self): + # an empty options dictionary should not stay in the + # list of attributes + klass = distutils.dist.Distribution + + # catching warnings + warns = [] + def _warn(msg): + warns.append(msg) + + old_warn = warnings.warn + warnings.warn = _warn + try: + dist = klass(attrs={'author': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'url': 'xxxx', + 'options': {}}) + finally: + warnings.warn = old_warn + + self.assertEquals(len(warns), 0) + class MetadataTestCase(unittest.TestCase): def test_simple_metadata(self): From de38e65a4ea05f1b0924676bc9fb2ecccd182f40 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 30 Dec 2008 17:56:45 +0000 Subject: [PATCH 2068/8469] Merged revisions 67982,67988,67990 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67982 | benjamin.peterson | 2008-12-28 09:37:31 -0600 (Sun, 28 Dec 2008) | 1 line fix WORD_BIGEDIAN declaration in Universal builds; fixes #4060 and #4728 ........ r67988 | ronald.oussoren | 2008-12-28 13:40:56 -0600 (Sun, 28 Dec 2008) | 1 line Issue4064: architecture string for universal builds on OSX ........ r67990 | ronald.oussoren | 2008-12-28 13:50:40 -0600 (Sun, 28 Dec 2008) | 3 lines Update the fix for issue4064 to deal correctly with all three variants of universal builds that are presented by the configure script. ........ --- util.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/util.py b/util.py index 28337fa9a0..042306e913 100644 --- a/util.py +++ b/util.py @@ -99,7 +99,11 @@ def get_platform (): if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: + if 1: + # Always calculate the release of the running machine, + # needed to determine if we can build fat binaries or not. + + macrelease = macver # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) @@ -115,16 +119,18 @@ def get_platform (): r'(.*?)', f.read()) f.close() if m is not None: - macver = '.'.join(m.group(1).split('.')[:2]) + macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour + if not macver: + macver = macrelease + if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" - - if (release + '.') >= '10.4.' and \ + if (macrelease + '.') >= '10.4.' and \ '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 @@ -133,9 +139,13 @@ def get_platform (): # 'universal' instead of 'fat'. machine = 'fat' + cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in get_config_vars().get('CFLAGS'): - machine = 'universal' + if '-arch x86_64' in cflags: + if '-arch i386' in cflags: + machine = 'universal' + else: + machine = 'fat64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From 5a3897bfe4addcf975b3d99bdb1c9b2ecec604bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 30 Dec 2008 23:03:41 +0000 Subject: [PATCH 2069/8469] Fixed #4702: Throwing DistutilsPlatformError instead of IOError under win32 if MSVC is not found --- msvc9compiler.py | 4 ++-- tests/test_msvc9compiler.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/test_msvc9compiler.py diff --git a/msvc9compiler.py b/msvc9compiler.py index 4f72e78096..68b7775830 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -247,7 +247,7 @@ def query_vcvarsall(version, arch="x86"): result = {} if vcvarsall is None: - raise IOError("Unable to find vcvarsall.bat") + raise DistutilsPlatformError("Unable to find vcvarsall.bat") log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, @@ -255,7 +255,7 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: - raise IOError(stderr.decode("mbcs")) + raise DistutilsPlatformError(stderr.decode("mbcs")) stdout = stdout.decode("mbcs") for line in stdout.split("\n"): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py new file mode 100644 index 0000000000..1659cea510 --- /dev/null +++ b/tests/test_msvc9compiler.py @@ -0,0 +1,33 @@ +"""Tests for distutils.msvc9compiler.""" +import sys +import unittest + +from distutils.errors import DistutilsPlatformError + +class msvc9compilerTestCase(unittest.TestCase): + + def test_no_compiler(self): + # makes sure query_vcvarsall throws + # a DistutilsPlatformError if the compiler + # is not found + if sys.platform != 'win32': + # this test is only for win32 + return + from distutils.msvc9compiler import query_vcvarsall + def _find_vcvarsall(version): + return None + + from distutils import msvc9compiler + old_find_vcvarsall = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = _find_vcvarsall + try: + self.assertRaises(DistutilsPlatformError, query_vcvarsall, + 'wont find this version') + finally: + msvc9compiler.find_vcvarsall = old_find_vcvarsall + +def test_suite(): + return unittest.makeSuite(msvc9compilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a2dde29acd7c619ea5af0182c429e4bdf86cfb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 30 Dec 2008 23:06:46 +0000 Subject: [PATCH 2070/8469] Merged revisions 68081 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68081 | tarek.ziade | 2008-12-31 00:03:41 +0100 (Wed, 31 Dec 2008) | 1 line Fixed #4702: Throwing DistutilsPlatformError instead of IOError under win32 if MSVC is not found ........ --- msvc9compiler.py | 4 ++-- tests/test_msvc9compiler.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/test_msvc9compiler.py diff --git a/msvc9compiler.py b/msvc9compiler.py index 4f72e78096..68b7775830 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -247,7 +247,7 @@ def query_vcvarsall(version, arch="x86"): result = {} if vcvarsall is None: - raise IOError("Unable to find vcvarsall.bat") + raise DistutilsPlatformError("Unable to find vcvarsall.bat") log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, @@ -255,7 +255,7 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: - raise IOError(stderr.decode("mbcs")) + raise DistutilsPlatformError(stderr.decode("mbcs")) stdout = stdout.decode("mbcs") for line in stdout.split("\n"): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py new file mode 100644 index 0000000000..1659cea510 --- /dev/null +++ b/tests/test_msvc9compiler.py @@ -0,0 +1,33 @@ +"""Tests for distutils.msvc9compiler.""" +import sys +import unittest + +from distutils.errors import DistutilsPlatformError + +class msvc9compilerTestCase(unittest.TestCase): + + def test_no_compiler(self): + # makes sure query_vcvarsall throws + # a DistutilsPlatformError if the compiler + # is not found + if sys.platform != 'win32': + # this test is only for win32 + return + from distutils.msvc9compiler import query_vcvarsall + def _find_vcvarsall(version): + return None + + from distutils import msvc9compiler + old_find_vcvarsall = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = _find_vcvarsall + try: + self.assertRaises(DistutilsPlatformError, query_vcvarsall, + 'wont find this version') + finally: + msvc9compiler.find_vcvarsall = old_find_vcvarsall + +def test_suite(): + return unittest.makeSuite(msvc9compilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From fcd16e351d5e231cbf218bf33371a1bcbf7a225e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 30 Dec 2008 23:09:20 +0000 Subject: [PATCH 2071/8469] Merged revisions 68081 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68081 | tarek.ziade | 2008-12-31 00:03:41 +0100 (Wed, 31 Dec 2008) | 1 line Fixed #4702: Throwing DistutilsPlatformError instead of IOError under win32 if MSVC is not found ........ --- msvc9compiler.py | 4 ++-- tests/test_msvc9compiler.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/test_msvc9compiler.py diff --git a/msvc9compiler.py b/msvc9compiler.py index eced0524b8..aae0637394 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -247,7 +247,7 @@ def query_vcvarsall(version, arch="x86"): result = {} if vcvarsall is None: - raise IOError("Unable to find vcvarsall.bat") + raise DistutilsPlatformError("Unable to find vcvarsall.bat") log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, @@ -255,7 +255,7 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: - raise IOError(stderr.decode("mbcs")) + raise DistutilsPlatformError(stderr.decode("mbcs")) stdout = stdout.decode("mbcs") for line in stdout.split("\n"): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py new file mode 100644 index 0000000000..1659cea510 --- /dev/null +++ b/tests/test_msvc9compiler.py @@ -0,0 +1,33 @@ +"""Tests for distutils.msvc9compiler.""" +import sys +import unittest + +from distutils.errors import DistutilsPlatformError + +class msvc9compilerTestCase(unittest.TestCase): + + def test_no_compiler(self): + # makes sure query_vcvarsall throws + # a DistutilsPlatformError if the compiler + # is not found + if sys.platform != 'win32': + # this test is only for win32 + return + from distutils.msvc9compiler import query_vcvarsall + def _find_vcvarsall(version): + return None + + from distutils import msvc9compiler + old_find_vcvarsall = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = _find_vcvarsall + try: + self.assertRaises(DistutilsPlatformError, query_vcvarsall, + 'wont find this version') + finally: + msvc9compiler.find_vcvarsall = old_find_vcvarsall + +def test_suite(): + return unittest.makeSuite(msvc9compilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From b7024702a738bd1e31391b391cc073b97d94c008 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 1 Jan 2009 15:46:10 +0000 Subject: [PATCH 2072/8469] Merged revisions 67952-67953,67955,67957-67958,67960-67961,67963,67965,67967,67970-67971,67973,67982,67988,67990,67995,68014,68016,68030,68057,68061,68112,68115-68118,68120-68121,68123-68128 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67952 | georg.brandl | 2008-12-27 18:42:40 +0100 (Sat, 27 Dec 2008) | 2 lines #4752: actually use custom handler in example. ........ r67953 | georg.brandl | 2008-12-27 19:20:04 +0100 (Sat, 27 Dec 2008) | 3 lines Patch #4739 by David Laban: add symbols to pydoc help topics, so that ``help('@')`` works as expected. ........ r67955 | georg.brandl | 2008-12-27 19:27:53 +0100 (Sat, 27 Dec 2008) | 3 lines Follow-up to r67746 in order to restore backwards-compatibility for those who (monkey-)patch TextWrapper.wordsep_re with a custom RE. ........ r67957 | georg.brandl | 2008-12-27 19:49:19 +0100 (Sat, 27 Dec 2008) | 2 lines #4754: improve winsound documentation. ........ r67958 | georg.brandl | 2008-12-27 20:02:59 +0100 (Sat, 27 Dec 2008) | 2 lines #4682: 'b' is actually unsigned char. ........ r67960 | georg.brandl | 2008-12-27 20:04:44 +0100 (Sat, 27 Dec 2008) | 2 lines #4695: fix backslashery. ........ r67961 | georg.brandl | 2008-12-27 20:06:04 +0100 (Sat, 27 Dec 2008) | 2 lines Use :samp: role. ........ r67963 | georg.brandl | 2008-12-27 20:11:15 +0100 (Sat, 27 Dec 2008) | 2 lines #4671: document that pydoc imports modules. ........ r67965 | antoine.pitrou | 2008-12-27 21:34:52 +0100 (Sat, 27 Dec 2008) | 3 lines Issue #4677: add two list comprehension tests to pybench. ........ r67967 | benjamin.peterson | 2008-12-27 23:18:58 +0100 (Sat, 27 Dec 2008) | 1 line fix markup ........ r67970 | alexandre.vassalotti | 2008-12-28 02:52:58 +0100 (Sun, 28 Dec 2008) | 2 lines Fix name mangling of PyUnicode_ClearFreeList. ........ r67971 | alexandre.vassalotti | 2008-12-28 03:10:35 +0100 (Sun, 28 Dec 2008) | 2 lines Sort UCS-2/UCS-4 name mangling list. ........ r67973 | alexandre.vassalotti | 2008-12-28 03:58:22 +0100 (Sun, 28 Dec 2008) | 2 lines Document Py_VaBuildValue. ........ r67982 | benjamin.peterson | 2008-12-28 16:37:31 +0100 (Sun, 28 Dec 2008) | 1 line fix WORD_BIGEDIAN declaration in Universal builds; fixes #4060 and #4728 ........ r67988 | ronald.oussoren | 2008-12-28 20:40:56 +0100 (Sun, 28 Dec 2008) | 1 line Issue4064: architecture string for universal builds on OSX ........ r67990 | ronald.oussoren | 2008-12-28 20:50:40 +0100 (Sun, 28 Dec 2008) | 3 lines Update the fix for issue4064 to deal correctly with all three variants of universal builds that are presented by the configure script. ........ r67995 | benjamin.peterson | 2008-12-28 22:16:07 +0100 (Sun, 28 Dec 2008) | 1 line #4763 PyErr_ExceptionMatches won't blow up with NULL arguments ........ r68014 | benjamin.peterson | 2008-12-29 18:47:42 +0100 (Mon, 29 Dec 2008) | 1 line #4764 set IOError.filename when trying to open a directory on POSIX platforms ........ r68016 | benjamin.peterson | 2008-12-29 18:56:58 +0100 (Mon, 29 Dec 2008) | 1 line #4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms ........ r68030 | benjamin.peterson | 2008-12-29 22:38:14 +0100 (Mon, 29 Dec 2008) | 1 line fix French ........ r68057 | vinay.sajip | 2008-12-30 08:01:25 +0100 (Tue, 30 Dec 2008) | 1 line Minor documentation change relating to NullHandler. ........ r68061 | georg.brandl | 2008-12-30 11:15:49 +0100 (Tue, 30 Dec 2008) | 2 lines #4778: attributes can't be called. ........ r68112 | benjamin.peterson | 2009-01-01 00:48:39 +0100 (Thu, 01 Jan 2009) | 1 line #4795 inspect.isgeneratorfunction() should return False instead of None ........ r68115 | benjamin.peterson | 2009-01-01 05:04:41 +0100 (Thu, 01 Jan 2009) | 1 line simplfy code ........ r68116 | georg.brandl | 2009-01-01 12:46:51 +0100 (Thu, 01 Jan 2009) | 2 lines #4100: note that element children are not necessarily present on "start" events. ........ r68117 | georg.brandl | 2009-01-01 12:53:55 +0100 (Thu, 01 Jan 2009) | 2 lines #4156: make clear that "protocol" is to be replaced with the protocol name. ........ r68118 | georg.brandl | 2009-01-01 13:00:19 +0100 (Thu, 01 Jan 2009) | 2 lines #4185: clarify escape behavior of replacement strings. ........ r68120 | georg.brandl | 2009-01-01 13:15:31 +0100 (Thu, 01 Jan 2009) | 4 lines #4228: Pack negative values the same way as 2.4 in struct's L format. ........ r68121 | georg.brandl | 2009-01-01 13:43:33 +0100 (Thu, 01 Jan 2009) | 2 lines Point to types module in new module deprecation notice. ........ r68123 | georg.brandl | 2009-01-01 13:52:29 +0100 (Thu, 01 Jan 2009) | 2 lines #4784: ... on three counts ... ........ r68124 | georg.brandl | 2009-01-01 13:53:19 +0100 (Thu, 01 Jan 2009) | 2 lines #4782: Fix markup error that hid load() and loads(). ........ r68125 | georg.brandl | 2009-01-01 14:02:09 +0100 (Thu, 01 Jan 2009) | 2 lines #4776: add data_files and package_dir arguments. ........ r68126 | georg.brandl | 2009-01-01 14:05:13 +0100 (Thu, 01 Jan 2009) | 2 lines Handlers are in the `logging.handlers` module. ........ r68127 | georg.brandl | 2009-01-01 14:14:49 +0100 (Thu, 01 Jan 2009) | 2 lines #4767: Use correct submodules for all MIME classes. ........ r68128 | antoine.pitrou | 2009-01-01 15:11:22 +0100 (Thu, 01 Jan 2009) | 3 lines Issue #3680: Reference cycles created through a dict, set or deque iterator did not get collected. ........ --- util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 48cc17f624..e9d29ff49c 100644 --- a/util.py +++ b/util.py @@ -140,9 +140,13 @@ def get_platform (): # 'universal' instead of 'fat'. machine = 'fat' + cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in get_config_vars().get('CFLAGS'): - machine = 'universal' + if '-arch x86_64' in cflags: + if '-arch i386' in cflags: + machine = 'universal' + else: + machine = 'fat64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From 093c9524d2419914fb3d24a8d7f231c77432a3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 4 Jan 2009 00:04:49 +0000 Subject: [PATCH 2073/8469] fixed #1702551: distutils sdist was not pruning VCS directories under win32 --- command/sdist.py | 8 +++- tests/test_sdist.py | 110 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 tests/test_sdist.py diff --git a/command/sdist.py b/command/sdist.py index 961256c3ac..e10e25b37d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import os, string +import sys from types import * from glob import glob from distutils.core import Command @@ -354,8 +355,13 @@ def prune_file_list (self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) + # pruning out vcs directories + # both separators are used under win32 + seps = sys.platform == 'win32' and r'/|\\' or '/' + vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs'] + vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) + self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) def write_manifest (self): """Write the file list in 'self.filelist' (presumably as filled in diff --git a/tests/test_sdist.py b/tests/test_sdist.py new file mode 100644 index 0000000000..7cc04cfc0c --- /dev/null +++ b/tests/test_sdist.py @@ -0,0 +1,110 @@ +"""Tests for distutils.command.sdist.""" +import os +import unittest +import shutil +import zipfile +from os.path import join + +from distutils.command.sdist import sdist +from distutils.core import Distribution +from distutils.tests.test_config import PyPIRCCommandTestCase + +CURDIR = os.path.dirname(__file__) +TEMP_PKG = join(CURDIR, 'temppkg') + +SETUP_PY = """ +from distutils.core import setup +import somecode + +setup(name='fake') +""" + +MANIFEST_IN = """ +recursive-include somecode * +""" + +class sdistTestCase(PyPIRCCommandTestCase): + + def setUp(self): + PyPIRCCommandTestCase.setUp(self) + self.old_path = os.getcwd() + + def tearDown(self): + os.chdir(self.old_path) + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + PyPIRCCommandTestCase.tearDown(self) + + def _write(self, path, content): + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() + + def test_prune_file_list(self): + # this test creates a package with some vcs dirs in it + # and launch sdist to make sure they get pruned + # on all systems + if not os.path.exists(TEMP_PKG): + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + + # creating VCS directories with some files in them + os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) + self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) + self._write(join(TEMP_PKG, 'somecode', '.hg', + 'ok'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.git')) + self._write(join(TEMP_PKG, 'somecode', '.git', + 'ok'), 'xxx') + + os.chdir(TEMP_PKG) + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # zip is available universally + # (tar might not be installed under win32) + cmd.formats = ['zip'] + cmd.run() + + # now let's check what we have + dist_folder = join(TEMP_PKG, 'dist') + files = os.listdir(dist_folder) + self.assertEquals(files, ['fake-1.0.zip']) + + zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything has been pruned correctly + self.assertEquals(len(content), 4) + +def test_suite(): + return unittest.makeSuite(sdistTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From dea3bab1f658e3f4e696dc1f74e5c41cb4ade04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 4 Jan 2009 00:07:14 +0000 Subject: [PATCH 2074/8469] Merged revisions 68276 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68276 | tarek.ziade | 2009-01-04 01:04:49 +0100 (Sun, 04 Jan 2009) | 1 line fixed #1702551: distutils sdist was not pruning VCS directories under win32 ........ --- command/sdist.py | 8 +++- tests/test_sdist.py | 110 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 tests/test_sdist.py diff --git a/command/sdist.py b/command/sdist.py index 961256c3ac..e10e25b37d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import os, string +import sys from types import * from glob import glob from distutils.core import Command @@ -354,8 +355,13 @@ def prune_file_list (self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) + # pruning out vcs directories + # both separators are used under win32 + seps = sys.platform == 'win32' and r'/|\\' or '/' + vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs'] + vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) + self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) def write_manifest (self): """Write the file list in 'self.filelist' (presumably as filled in diff --git a/tests/test_sdist.py b/tests/test_sdist.py new file mode 100644 index 0000000000..7cc04cfc0c --- /dev/null +++ b/tests/test_sdist.py @@ -0,0 +1,110 @@ +"""Tests for distutils.command.sdist.""" +import os +import unittest +import shutil +import zipfile +from os.path import join + +from distutils.command.sdist import sdist +from distutils.core import Distribution +from distutils.tests.test_config import PyPIRCCommandTestCase + +CURDIR = os.path.dirname(__file__) +TEMP_PKG = join(CURDIR, 'temppkg') + +SETUP_PY = """ +from distutils.core import setup +import somecode + +setup(name='fake') +""" + +MANIFEST_IN = """ +recursive-include somecode * +""" + +class sdistTestCase(PyPIRCCommandTestCase): + + def setUp(self): + PyPIRCCommandTestCase.setUp(self) + self.old_path = os.getcwd() + + def tearDown(self): + os.chdir(self.old_path) + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + PyPIRCCommandTestCase.tearDown(self) + + def _write(self, path, content): + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() + + def test_prune_file_list(self): + # this test creates a package with some vcs dirs in it + # and launch sdist to make sure they get pruned + # on all systems + if not os.path.exists(TEMP_PKG): + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + + # creating VCS directories with some files in them + os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) + self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) + self._write(join(TEMP_PKG, 'somecode', '.hg', + 'ok'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.git')) + self._write(join(TEMP_PKG, 'somecode', '.git', + 'ok'), 'xxx') + + os.chdir(TEMP_PKG) + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # zip is available universally + # (tar might not be installed under win32) + cmd.formats = ['zip'] + cmd.run() + + # now let's check what we have + dist_folder = join(TEMP_PKG, 'dist') + files = os.listdir(dist_folder) + self.assertEquals(files, ['fake-1.0.zip']) + + zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything has been pruned correctly + self.assertEquals(len(content), 4) + +def test_suite(): + return unittest.makeSuite(sdistTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 3fa05608d6cbcdf5d59824a1edde412e5440ae8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 4 Jan 2009 10:37:52 +0000 Subject: [PATCH 2075/8469] using clearer syntax --- command/sdist.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index e10e25b37d..27883fd68b 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -358,8 +358,13 @@ def prune_file_list (self): # pruning out vcs directories # both separators are used under win32 - seps = sys.platform == 'win32' and r'/|\\' or '/' - vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs'] + if sys.platform == 'win32': + seps = r'/|\\' + else: + seps = '/' + + vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', + '_darcs'] vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) From 6d66c0011b6f80f3e04ed13872bddc2e48b12056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 4 Jan 2009 10:43:32 +0000 Subject: [PATCH 2076/8469] Merged revisions 68293 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68293 | tarek.ziade | 2009-01-04 11:37:52 +0100 (Sun, 04 Jan 2009) | 1 line using clearer syntax ........ --- command/sdist.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index e10e25b37d..27883fd68b 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -358,8 +358,13 @@ def prune_file_list (self): # pruning out vcs directories # both separators are used under win32 - seps = sys.platform == 'win32' and r'/|\\' or '/' - vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs'] + if sys.platform == 'win32': + seps = r'/|\\' + else: + seps = '/' + + vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', + '_darcs'] vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) From ecf83b1f901da44a7408bda6aba7d408b4f8155a Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Wed, 7 Jan 2009 09:42:28 +0000 Subject: [PATCH 2077/8469] Issue #4864: test_msvc9compiler failed on VC6/7. Reviewed by Amaury Forgeot d'Arc. --- tests/test_msvc9compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 1659cea510..0c8bd6e042 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -13,6 +13,10 @@ def test_no_compiler(self): if sys.platform != 'win32': # this test is only for win32 return + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None From 18a095cf8cedcd8e615a6dd6d71634b2fe35bb70 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Wed, 7 Jan 2009 09:53:35 +0000 Subject: [PATCH 2078/8469] Merged revisions 68373 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68373 | hirokazu.yamamoto | 2009-01-07 18:42:28 +0900 | 2 lines Issue #4864: test_msvc9compiler failed on VC6/7. Reviewed by Amaury Forgeot d'Arc. ........ --- tests/test_msvc9compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 1659cea510..0c8bd6e042 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -13,6 +13,10 @@ def test_no_compiler(self): if sys.platform != 'win32': # this test is only for win32 return + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None From 7da96ed6b364ce84ab7b0f2c563fda2779f641ec Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Wed, 7 Jan 2009 10:11:17 +0000 Subject: [PATCH 2079/8469] Merged revisions 68373 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68373 | hirokazu.yamamoto | 2009-01-07 18:42:28 +0900 | 2 lines Issue #4864: test_msvc9compiler failed on VC6/7. Reviewed by Amaury Forgeot d'Arc. ........ --- tests/test_msvc9compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 1659cea510..0c8bd6e042 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -13,6 +13,10 @@ def test_no_compiler(self): if sys.platform != 'win32': # this test is only for win32 return + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None From 31ca6309c1297c8539b0e6c54f6743c58f841922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 8 Jan 2009 23:56:31 +0000 Subject: [PATCH 2080/8469] fixed #4394 make the storage of the password optional in .pypirc --- command/register.py | 30 ++++++++------- command/upload.py | 5 +++ config.py | 4 +- dist.py | 1 + tests/test_register.py | 86 +++++++++++++++++++++++++++++++----------- tests/test_upload.py | 29 ++++++++++++++ 6 files changed, 117 insertions(+), 38 deletions(-) diff --git a/command/register.py b/command/register.py index bf7be96096..40661d8776 100644 --- a/command/register.py +++ b/command/register.py @@ -173,19 +173,23 @@ def send_metadata(self): log.INFO) # possibly save the login - if not self.has_config and code == 200: - self.announce(('I can store your PyPI login so future ' - 'submissions will be faster.'), log.INFO) - self.announce('(the login will be stored in %s)' % \ - self._get_rc_file(), log.INFO) - - choice = 'X' - while choice.lower() not in 'yn': - choice = raw_input('Save your login (y/N)?') - if not choice: - choice = 'n' - if choice.lower() == 'y': - self._store_pypirc(username, password) + if code == 200: + if self.has_config: + # sharing the password in the distribution instance + # so the upload command can reuse it + self.distribution.password = password + else: + self.announce(('I can store your PyPI login so future ' + 'submissions will be faster.'), log.INFO) + self.announce('(the login will be stored in %s)' % \ + self._get_rc_file(), log.INFO) + choice = 'X' + while choice.lower() not in 'yn': + choice = raw_input('Save your login (y/N)?') + if not choice: + choice = 'n' + if choice.lower() == 'y': + self._store_pypirc(username, password) elif choice == '2': data = {':action': 'user'} diff --git a/command/upload.py b/command/upload.py index 8805d41da0..e30347e507 100644 --- a/command/upload.py +++ b/command/upload.py @@ -50,6 +50,11 @@ def finalize_options(self): self.repository = config['repository'] self.realm = config['realm'] + # getting the password from the distribution + # if previously set by the register command + if not self.password and self.distribution.password: + self.password = self.distribution.password + def run(self): if not self.distribution.dist_files: raise DistutilsOptionError("No dist file created in earlier command") diff --git a/config.py b/config.py index 4186c9b1d8..9166199ea9 100644 --- a/config.py +++ b/config.py @@ -82,12 +82,12 @@ def _read_pypirc(self): for server in _servers: current = {'server': server} current['username'] = config.get(server, 'username') - current['password'] = config.get(server, 'password') # optional params for key, default in (('repository', self.DEFAULT_REPOSITORY), - ('realm', self.DEFAULT_REALM)): + ('realm', self.DEFAULT_REALM), + ('password', None)): if config.has_option(server, key): current[key] = config.get(server, key) else: diff --git a/dist.py b/dist.py index c15ca9770d..18cc910900 100644 --- a/dist.py +++ b/dist.py @@ -206,6 +206,7 @@ def __init__ (self, attrs=None): self.extra_path = None self.scripts = None self.data_files = None + self.password = '' # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to diff --git a/tests/test_register.py b/tests/test_register.py index 3a3a3b739b..b3543f50f8 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -2,6 +2,7 @@ import sys import os import unittest +import getpass from distutils.command.register import register from distutils.core import Distribution @@ -9,6 +10,26 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_NOPASSWORD = """\ +[distutils] + +index-servers = + server1 + +[server1] +username:me +""" + +WANTED_PYPIRC = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:password +""" + class RawInputs(object): """Fakes user inputs.""" def __init__(self, *answers): @@ -21,18 +42,33 @@ def __call__(self, prompt=''): finally: self.index += 1 -WANTED_PYPIRC = """\ -[distutils] -index-servers = - pypi +class FakeServer(object): + """Fakes a PyPI server""" + def __init__(self): + self.calls = [] -[pypi] -username:tarek -password:xxx -""" + def __call__(self, *args): + # we want to compare them, so let's store + # something comparable + els = args[0].items() + els.sort() + self.calls.append(tuple(els)) + return 200, 'OK' class registerTestCase(PyPIRCCommandTestCase): + def setUp(self): + PyPIRCCommandTestCase.setUp(self) + # patching the password prompt + self._old_getpass = getpass.getpass + def _getpass(prompt): + return 'password' + getpass.getpass = _getpass + + def tearDown(self): + getpass.getpass = self._old_getpass + PyPIRCCommandTestCase.tearDown(self) + def test_create_pypirc(self): # this test makes sure a .pypirc file # is created when requested. @@ -56,25 +92,11 @@ def test_create_pypirc(self): # Here's what we are faking : # use your existing login (choice 1.) # Username : 'tarek' - # Password : 'xxx' + # Password : 'password' # Save your login (y/N)? : 'y' inputs = RawInputs('1', 'tarek', 'y') from distutils.command import register as register_module register_module.raw_input = inputs.__call__ - def _getpass(prompt): - return 'xxx' - register_module.getpass.getpass = _getpass - class FakeServer(object): - def __init__(self): - self.calls = [] - - def __call__(self, *args): - # we want to compare them, so let's store - # something comparable - els = args[0].items() - els.sort() - self.calls.append(tuple(els)) - return 200, 'OK' cmd.post_to_server = pypi_server = FakeServer() @@ -102,6 +124,24 @@ def _no_way(prompt=''): self.assert_(len(pypi_server.calls), 2) self.assert_(pypi_server.calls[0], pypi_server.calls[1]) + def test_password_not_in_file(self): + + f = open(self.rc, 'w') + f.write(PYPIRC_NOPASSWORD) + f.close() + + dist = Distribution() + cmd = register(dist) + cmd.post_to_server = FakeServer() + + cmd._set_config() + cmd.finalize_options() + cmd.send_metadata() + + # dist.password should be set + # therefore used afterwards by other commands + self.assertEquals(dist.password, 'password') + def test_suite(): return unittest.makeSuite(registerTestCase) diff --git a/tests/test_upload.py b/tests/test_upload.py index b05ab1f78b..3f8ca6d6ad 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -9,6 +9,17 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_NOPASSWORD = """\ +[distutils] + +index-servers = + server1 + +[server1] +username:me +""" + + class uploadTestCase(PyPIRCCommandTestCase): def test_finalize_options(self): @@ -26,6 +37,24 @@ def test_finalize_options(self): ('repository', 'http://pypi.python.org/pypi')): self.assertEquals(getattr(cmd, attr), waited) + def test_saved_password(self): + # file with no password + f = open(self.rc, 'w') + f.write(PYPIRC_NOPASSWORD) + f.close() + + # make sure it passes + dist = Distribution() + cmd = upload(dist) + cmd.finalize_options() + self.assertEquals(cmd.password, None) + + # make sure we get it as well, if another command + # initialized it at the dist level + dist.password = 'xxx' + cmd = upload(dist) + cmd.finalize_options() + self.assertEquals(cmd.password, 'xxx') def test_suite(): return unittest.makeSuite(uploadTestCase) From 5b32d845dc21e255e9b1d40c5aa7b12aa9149271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 9 Jan 2009 00:15:45 +0000 Subject: [PATCH 2081/8469] Merged revisions 68415 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68415 | tarek.ziade | 2009-01-09 00:56:31 +0100 (Fri, 09 Jan 2009) | 1 line fixed #4394 make the storage of the password optional in .pypirc ........ --- command/register.py | 30 ++++++++------ command/upload.py | 5 +++ config.py | 4 +- dist.py | 1 + tests/test_register.py | 91 ++++++++++++++++++++++++++++++------------ tests/test_upload.py | 29 ++++++++++++++ 6 files changed, 120 insertions(+), 40 deletions(-) diff --git a/command/register.py b/command/register.py index 30e9a37e6a..c271b18c4c 100644 --- a/command/register.py +++ b/command/register.py @@ -174,19 +174,23 @@ def send_metadata(self): log.INFO) # possibly save the login - if not self.has_config and code == 200: - self.announce(('I can store your PyPI login so future ' - 'submissions will be faster.'), log.INFO) - self.announce('(the login will be stored in %s)' % \ - self._get_rc_file(), log.INFO) - - choice = 'X' - while choice.lower() not in 'yn': - choice = input('Save your login (y/N)?') - if not choice: - choice = 'n' - if choice.lower() == 'y': - self._store_pypirc(username, password) + if code == 200: + if self.has_config: + # sharing the password in the distribution instance + # so the upload command can reuse it + self.distribution.password = password + else: + self.announce(('I can store your PyPI login so future ' + 'submissions will be faster.'), log.INFO) + self.announce('(the login will be stored in %s)' % \ + self._get_rc_file(), log.INFO) + choice = 'X' + while choice.lower() not in 'yn': + choice = input('Save your login (y/N)?') + if not choice: + choice = 'n' + if choice.lower() == 'y': + self._store_pypirc(username, password) elif choice == '2': data = {':action': 'user'} diff --git a/command/upload.py b/command/upload.py index 7ba7f5888a..020e860a6d 100644 --- a/command/upload.py +++ b/command/upload.py @@ -48,6 +48,11 @@ def finalize_options(self): self.repository = config['repository'] self.realm = config['realm'] + # getting the password from the distribution + # if previously set by the register command + if not self.password and self.distribution.password: + self.password = self.distribution.password + def run(self): if not self.distribution.dist_files: raise DistutilsOptionError("No dist file created in earlier command") diff --git a/config.py b/config.py index 73f326047a..5b625f3f7d 100644 --- a/config.py +++ b/config.py @@ -82,12 +82,12 @@ def _read_pypirc(self): for server in _servers: current = {'server': server} current['username'] = config.get(server, 'username') - current['password'] = config.get(server, 'password') # optional params for key, default in (('repository', self.DEFAULT_REPOSITORY), - ('realm', self.DEFAULT_REALM)): + ('realm', self.DEFAULT_REALM), + ('password', None)): if config.has_option(server, key): current[key] = config.get(server, key) else: diff --git a/dist.py b/dist.py index 7903c2a783..6c4b4afbd1 100644 --- a/dist.py +++ b/dist.py @@ -199,6 +199,7 @@ def __init__ (self, attrs=None): self.extra_path = None self.scripts = None self.data_files = None + self.password = '' # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to diff --git a/tests/test_register.py b/tests/test_register.py index 021b3ea884..8826e90fe0 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -2,6 +2,7 @@ import sys import os import unittest +import getpass from distutils.command.register import register from distutils.core import Distribution @@ -9,7 +10,27 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase -class RawInputs(object): +PYPIRC_NOPASSWORD = """\ +[distutils] + +index-servers = + server1 + +[server1] +username:me +""" + +WANTED_PYPIRC = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:password +""" + +class Inputs(object): """Fakes user inputs.""" def __init__(self, *answers): self.answers = answers @@ -21,18 +42,33 @@ def __call__(self, prompt=''): finally: self.index += 1 -WANTED_PYPIRC = """\ -[distutils] -index-servers = - pypi +class FakeServer(object): + """Fakes a PyPI server""" + def __init__(self): + self.calls = [] -[pypi] -username:tarek -password:xxx -""" + def __call__(self, *args): + # we want to compare them, so let's store + # something comparable + els = list(args[0].items()) + els.sort() + self.calls.append(tuple(els)) + return 200, 'OK' class registerTestCase(PyPIRCCommandTestCase): + def setUp(self): + PyPIRCCommandTestCase.setUp(self) + # patching the password prompt + self._old_getpass = getpass.getpass + def _getpass(prompt): + return 'password' + getpass.getpass = _getpass + + def tearDown(self): + getpass.getpass = self._old_getpass + PyPIRCCommandTestCase.tearDown(self) + def test_create_pypirc(self): # this test makes sure a .pypirc file # is created when requested. @@ -50,30 +86,17 @@ def test_create_pypirc(self): # we shouldn't have a .pypirc file yet self.assert_(not os.path.exists(self.rc)) - # patching raw_input and getpass.getpass + # patching input and getpass.getpass # so register gets happy # # Here's what we are faking : # use your existing login (choice 1.) # Username : 'tarek' - # Password : 'xxx' + # Password : 'password' # Save your login (y/N)? : 'y' - inputs = RawInputs('1', 'tarek', 'y') + inputs = Inputs('1', 'tarek', 'y') from distutils.command import register as register_module register_module.input = inputs.__call__ - def _getpass(prompt): - return 'xxx' - register_module.getpass.getpass = _getpass - class FakeServer(object): - def __init__(self): - self.calls = [] - - def __call__(self, *args): - # we want to compare them, so let's store - # something comparable - els = sorted(args[0].items()) - self.calls.append(tuple(els)) - return 200, 'OK' cmd.post_to_server = pypi_server = FakeServer() @@ -101,6 +124,24 @@ def _no_way(prompt=''): self.assert_(len(pypi_server.calls), 2) self.assert_(pypi_server.calls[0], pypi_server.calls[1]) + def test_password_not_in_file(self): + + f = open(self.rc, 'w') + f.write(PYPIRC_NOPASSWORD) + f.close() + + dist = Distribution() + cmd = register(dist) + cmd.post_to_server = FakeServer() + + cmd._set_config() + cmd.finalize_options() + cmd.send_metadata() + + # dist.password should be set + # therefore used afterwards by other commands + self.assertEquals(dist.password, 'password') + def test_suite(): return unittest.makeSuite(registerTestCase) diff --git a/tests/test_upload.py b/tests/test_upload.py index b05ab1f78b..3f8ca6d6ad 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -9,6 +9,17 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_NOPASSWORD = """\ +[distutils] + +index-servers = + server1 + +[server1] +username:me +""" + + class uploadTestCase(PyPIRCCommandTestCase): def test_finalize_options(self): @@ -26,6 +37,24 @@ def test_finalize_options(self): ('repository', 'http://pypi.python.org/pypi')): self.assertEquals(getattr(cmd, attr), waited) + def test_saved_password(self): + # file with no password + f = open(self.rc, 'w') + f.write(PYPIRC_NOPASSWORD) + f.close() + + # make sure it passes + dist = Distribution() + cmd = upload(dist) + cmd.finalize_options() + self.assertEquals(cmd.password, None) + + # make sure we get it as well, if another command + # initialized it at the dist level + dist.password = 'xxx' + cmd = upload(dist) + cmd.finalize_options() + self.assertEquals(cmd.password, 'xxx') def test_suite(): return unittest.makeSuite(uploadTestCase) From d5b7603836bc49a68327aaa343590cb4e051cdf4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Jan 2009 04:11:44 +0000 Subject: [PATCH 2082/8469] Merged revisions 68167,68276,68292-68293,68344 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68167 | vinay.sajip | 2009-01-02 12:53:04 -0600 (Fri, 02 Jan 2009) | 1 line Minor documentation changes relating to NullHandler, the module used for handlers and references to ConfigParser. ........ r68276 | tarek.ziade | 2009-01-03 18:04:49 -0600 (Sat, 03 Jan 2009) | 1 line fixed #1702551: distutils sdist was not pruning VCS directories under win32 ........ r68292 | skip.montanaro | 2009-01-04 04:36:58 -0600 (Sun, 04 Jan 2009) | 3 lines If user configures --without-gcc give preference to $CC instead of blindly assuming the compiler will be "cc". ........ r68293 | tarek.ziade | 2009-01-04 04:37:52 -0600 (Sun, 04 Jan 2009) | 1 line using clearer syntax ........ r68344 | marc-andre.lemburg | 2009-01-05 13:43:35 -0600 (Mon, 05 Jan 2009) | 7 lines Fix #4846 (Py_UNICODE_ISSPACE causes linker error) by moving the declaration into the extern "C" section. Add a few more comments and apply some minor edits to make the file contents fit the original structure again. ........ --- command/sdist.py | 18 ++++++-- tests/test_sdist.py | 110 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 tests/test_sdist.py diff --git a/command/sdist.py b/command/sdist.py index b29fc64eca..96fb7fa1a7 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -4,7 +4,10 @@ __revision__ = "$Id$" -import sys, os +import os +import string +import sys +from types import * from glob import glob from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util @@ -332,9 +335,18 @@ def prune_file_list(self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) - def write_manifest(self): + if sys.platform == 'win32': + seps = r'/|\\' + else: + seps = '/' + + vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', + '_darcs'] + vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) + self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) + + def write_manifest (self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. diff --git a/tests/test_sdist.py b/tests/test_sdist.py new file mode 100644 index 0000000000..7cc04cfc0c --- /dev/null +++ b/tests/test_sdist.py @@ -0,0 +1,110 @@ +"""Tests for distutils.command.sdist.""" +import os +import unittest +import shutil +import zipfile +from os.path import join + +from distutils.command.sdist import sdist +from distutils.core import Distribution +from distutils.tests.test_config import PyPIRCCommandTestCase + +CURDIR = os.path.dirname(__file__) +TEMP_PKG = join(CURDIR, 'temppkg') + +SETUP_PY = """ +from distutils.core import setup +import somecode + +setup(name='fake') +""" + +MANIFEST_IN = """ +recursive-include somecode * +""" + +class sdistTestCase(PyPIRCCommandTestCase): + + def setUp(self): + PyPIRCCommandTestCase.setUp(self) + self.old_path = os.getcwd() + + def tearDown(self): + os.chdir(self.old_path) + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + PyPIRCCommandTestCase.tearDown(self) + + def _write(self, path, content): + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() + + def test_prune_file_list(self): + # this test creates a package with some vcs dirs in it + # and launch sdist to make sure they get pruned + # on all systems + if not os.path.exists(TEMP_PKG): + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + + # creating VCS directories with some files in them + os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) + self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) + self._write(join(TEMP_PKG, 'somecode', '.hg', + 'ok'), 'xxx') + + os.mkdir(join(TEMP_PKG, 'somecode', '.git')) + self._write(join(TEMP_PKG, 'somecode', '.git', + 'ok'), 'xxx') + + os.chdir(TEMP_PKG) + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # zip is available universally + # (tar might not be installed under win32) + cmd.formats = ['zip'] + cmd.run() + + # now let's check what we have + dist_folder = join(TEMP_PKG, 'dist') + files = os.listdir(dist_folder) + self.assertEquals(files, ['fake-1.0.zip']) + + zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything has been pruned correctly + self.assertEquals(len(content), 4) + +def test_suite(): + return unittest.makeSuite(sdistTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 5a672e9f309ce3c1bf808e839c00369b7e75a25d Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 20 Jan 2009 07:24:44 +0000 Subject: [PATCH 2083/8469] Issue 4998: Decimal should not subclass or register with numbers.Real. --- command/wininst-8.0.exe | Bin 61440 -> 73728 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-8.0.exe b/command/wininst-8.0.exe index 7403bfabf5cc10c13ef2b6a2ea276b4f6d26ff37..7407032d4b12d53cb4dd8f63b8f600e95eb8f1a8 100644 GIT binary patch delta 26694 zcmeIaeOQ#$_BVddFzBS{%qS=-Dkc<$nFWwb$Nz?X~xft;NUYR#n6)ImPCw5AeSZemd{%!j_nB7x%#{F*^a5?|CWa zO%^`w315!c0hnK3%V2)}ftc;A-1(RR49^+!0Sl{Q-eTbv7S7LG&Qsl+#{@oPG;rK3 zg^IHnEi*XJuZ8nb^jD}kt^f(ua^mJS2(@rFg7tD7u!=zZxCYW>9nvqtu0v@$l;QC!L z>fR&E5VaBL2@!Pv^r&k>_A)b}j1Pj>0Y^nUTyvD8`=NC%7!aq}y+--ifM>PQle3HU zoX}BvH6z2Em43JnCk0g5kaE`kZ^?3}iA$FPwg4`5TLzc@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 Jan 2009 21:25:32 +0000 Subject: [PATCH 2084/8469] Revert part of r68799 which unintentionally updated this file. --- command/wininst-8.0.exe | Bin 73728 -> 61440 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-8.0.exe b/command/wininst-8.0.exe index 7407032d4b12d53cb4dd8f63b8f600e95eb8f1a8..7403bfabf5cc10c13ef2b6a2ea276b4f6d26ff37 100644 GIT binary patch delta 17844 zcmeHue_T}8weOi>FcZbhsEne5k~k(Lnn;2e31B9cG2E!h(UBP@3gZvJ;{=t!ImRTK z!2&JQ!x)l7QhGl&)#B^pwSI0*!GtzOMj?W!X-PFoj7e$AOAm##zufHLVhYvW{3vsZN`ITN}F}DQ7u#cWWCc^U#85Q;xNWnDC?)(8|WvFdq+dgD?HDG zV;{;HQoM9C@|Tex+~C%vc(>o=2I4Rf9yy!va<6ugLH?iW5f5L4CX1?e-g8 zn#~N^T|uW=yC^%&nWv>0L}w*B6?FbsEibvMGcHY;GBckYJRsMcWtlp;rk7=!<(l)zxa9Bm zAPKFC`Qw6z;^Z~f1*fXi=|N{>%&C1D{L0t~!Gh}G>Uz``!wpbf!agR)!YG$j{vs^S7A2jr*4ID-A|VjoAo_2lGb4Fq?#ps)`SDp`6&ZptC`C9;jN%iJ3v?QQ3J^OI0gC%WG0AD`~dHMBZtw34<_TsXl@6 zY0ks)>cb&ZHyWau)D2;0Q4_s`BGw`f1-1Hbnnp-&TsxA5Ao z1dwP_1Mlb5FVR3(o7;$}{V_ADwO#RRG^v(X11tVc)d@9WU6881&77DZJC8Vc*;#LC zcT9v74gLvQUNc0Fpfu-^4CfI`-4kDG+Q3RYNcO~TElrhqjHSYaAut(tp=fFM&BDOt z)vYnz3!v1P=+&+2X4KHc=5<=x0Om3J)xbu^v}pWfFCsiDTEAn++8~;;7D>j3R=UC@Be_1DQ|m3Xe<2ZeA(=oci|3>D7$MWnON;NWbqWpQroe4+E9WYsYXYs;;UE^m$Nlm!p z=6ayO(*CxxF~N3!<5Bc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*njyvO%<%wDd$Gj>ZlTVdfm;*C&xbKQ(`M}21^~oxLxqIbmZl5A6 z7nX7Jy^(nlleu&M8sID0y7g!sP|#BwSkL6mpZ4 zS$Rb(9)38V7{#4a$+*6#bNPzw{FR&*`786xKwZJfA4&e7{L5*99eh`a2Q zWwopXIgfHLpc*g^h$0h z^?voLM{}~)EHf9a!p+Te#sRuL$t}pjrO7zu3?d#a?>>HDh$8;)kRZr@-f|4%b{5aZ zMb8cvV~Jb>YLF#xnoky!)p4MWWb+HxnA&f5@2bll@T^;v5r|t5x(V^~g!oQ~!CfVK zt^-blqx|k4;eU=a!l&>*;=2;+Vy#0^Y(KC_|JsRgIKnD~qrzDuIIiPDr*c#;#vTIJme}cyMuEhVMxMFgq?ur z_JXSc|GYcC?wn?UPQj_6Kwj{awT)14)ry;N@JI!x0zKXNA)^)CL%m?z7zIcFs<%78 i@^%HcVE2mVR$brwCf_&VzI!LT7JcvB{nPhD{Qei&3FGzv From 31b6b08aad43d5139d126dee38b1de471914423f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 18:19:25 +0000 Subject: [PATCH 2085/8469] Fixed #4863: removed distutils.mwerkscompiler --- ccompiler.py | 3 - mwerkscompiler.py | 248 ---------------------------------------------- 2 files changed, 251 deletions(-) delete mode 100644 mwerkscompiler.py diff --git a/ccompiler.py b/ccompiler.py index 87d6e27396..aa92a9f174 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1063,7 +1063,6 @@ def mkpath (self, name, mode=0777): # OS name mappings ('posix', 'unix'), ('nt', 'msvc'), - ('mac', 'mwerks'), ) @@ -1103,8 +1102,6 @@ def get_default_compiler(osname=None, platform=None): "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), - 'mwerks': ('mwerkscompiler', 'MWerksCompiler', - "MetroWerks CodeWarrior"), 'emx': ('emxccompiler', 'EMXCCompiler', "EMX port of GNU C Compiler for OS/2"), } diff --git a/mwerkscompiler.py b/mwerkscompiler.py deleted file mode 100644 index 343c6cecae..0000000000 --- a/mwerkscompiler.py +++ /dev/null @@ -1,248 +0,0 @@ -"""distutils.mwerkscompiler - -Contains MWerksCompiler, an implementation of the abstract CCompiler class -for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on -Windows.""" - -# This module should be kept compatible with Python 2.1. - -__revision__ = "$Id$" - -import sys, os, string -from types import * -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options -import distutils.util -import distutils.dir_util -from distutils import log - -class MWerksCompiler (CCompiler) : - """Concrete class that implements an interface to MetroWerks CodeWarrior, - as defined by the CCompiler abstract class.""" - - compiler_type = 'mwerks' - - # Just set this so CCompiler's constructor doesn't barf. We currently - # don't use the 'set_executables()' bureaucracy provided by CCompiler, - # as it really isn't necessary for this sort of single-compiler class. - # Would be nice to have a consistent interface with UnixCCompiler, - # though, so it's worth thinking about. - executables = {} - - # Private class data (need to distinguish C from C++ source for compiler) - _c_extensions = ['.c'] - _cpp_extensions = ['.cc', '.cpp', '.cxx'] - _rc_extensions = ['.r'] - _exp_extension = '.exp' - - # Needed for the filename generation methods provided by the - # base class, CCompiler. - src_extensions = (_c_extensions + _cpp_extensions + - _rc_extensions) - res_extension = '.rsrc' - obj_extension = '.obj' # Not used, really - static_lib_extension = '.lib' - shared_lib_extension = '.slb' - static_lib_format = shared_lib_format = '%s%s' - exe_extension = '' - - - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - - CCompiler.__init__ (self, verbose, dry_run, force) - - - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - depends=None): - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - self.__sources = sources - self.__macros = macros - self.__include_dirs = include_dirs - # Don't need extra_preargs and extra_postargs for CW - return [] - - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - # First fixup. - (objects, output_dir) = self._fix_object_args (objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) - - # First examine a couple of options for things that aren't implemented yet - if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): - raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' - if runtime_library_dirs: - raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' - if extra_preargs or extra_postargs: - raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' - if len(export_symbols) != 1: - raise DistutilsPlatformError, 'Need exactly one export symbol' - # Next there are various things for which we need absolute pathnames. - # This is because we (usually) create the project in a subdirectory of - # where we are now, and keeping the paths relative is too much work right - # now. - sources = map(self._filename_to_abs, self.__sources) - include_dirs = map(self._filename_to_abs, self.__include_dirs) - if objects: - objects = map(self._filename_to_abs, objects) - else: - objects = [] - if build_temp: - build_temp = self._filename_to_abs(build_temp) - else: - build_temp = os.curdir() - if output_dir: - output_filename = os.path.join(output_dir, output_filename) - # The output filename needs special handling: splitting it into dir and - # filename part. Actually I'm not sure this is really needed, but it - # can't hurt. - output_filename = self._filename_to_abs(output_filename) - output_dir, output_filename = os.path.split(output_filename) - # Now we need the short names of a couple of things for putting them - # into the project. - if output_filename[-8:] == '.ppc.slb': - basename = output_filename[:-8] - elif output_filename[-11:] == '.carbon.slb': - basename = output_filename[:-11] - else: - basename = os.path.strip(output_filename)[0] - projectname = basename + '.mcp' - targetname = basename - xmlname = basename + '.xml' - exportname = basename + '.mcp.exp' - prefixname = 'mwerks_%s_config.h'%basename - # Create the directories we need - distutils.dir_util.mkpath(build_temp, dry_run=self.dry_run) - distutils.dir_util.mkpath(output_dir, dry_run=self.dry_run) - # And on to filling in the parameters for the project builder - settings = {} - settings['mac_exportname'] = exportname - settings['mac_outputdir'] = output_dir - settings['mac_dllname'] = output_filename - settings['mac_targetname'] = targetname - settings['sysprefix'] = sys.prefix - settings['mac_sysprefixtype'] = 'Absolute' - sourcefilenames = [] - sourcefiledirs = [] - for filename in sources + objects: - dirname, filename = os.path.split(filename) - sourcefilenames.append(filename) - if not dirname in sourcefiledirs: - sourcefiledirs.append(dirname) - settings['sources'] = sourcefilenames - settings['libraries'] = libraries - settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs - if self.dry_run: - print 'CALLING LINKER IN', os.getcwd() - for key, value in settings.items(): - print '%20.20s %s'%(key, value) - return - # Build the export file - exportfilename = os.path.join(build_temp, exportname) - log.debug("\tCreate export file %s", exportfilename) - fp = open(exportfilename, 'w') - fp.write('%s\n'%export_symbols[0]) - fp.close() - # Generate the prefix file, if needed, and put it in the settings - if self.__macros: - prefixfilename = os.path.join(os.getcwd(), os.path.join(build_temp, prefixname)) - fp = open(prefixfilename, 'w') - fp.write('#include "mwerks_shcarbon_config.h"\n') - for name, value in self.__macros: - if value is None: - fp.write('#define %s\n'%name) - else: - fp.write('#define %s %s\n'%(name, value)) - fp.close() - settings['prefixname'] = prefixname - - # Build the XML file. We need the full pathname (only lateron, really) - # because we pass this pathname to CodeWarrior in an AppleEvent, and CW - # doesn't have a clue about our working directory. - xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) - log.debug("\tCreate XML file %s", xmlfilename) - import mkcwproject - xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) - xmlbuilder.generate() - xmldata = settings['tmp_projectxmldata'] - fp = open(xmlfilename, 'w') - fp.write(xmldata) - fp.close() - # Generate the project. Again a full pathname. - projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) - log.debug('\tCreate project file %s', projectfilename) - mkcwproject.makeproject(xmlfilename, projectfilename) - # And build it - log.debug('\tBuild project') - mkcwproject.buildproject(projectfilename) - - def _filename_to_abs(self, filename): - # Some filenames seem to be unix-like. Convert to Mac names. -## if '/' in filename and ':' in filename: -## raise DistutilsPlatformError, 'Filename may be Unix or Mac style: %s'%filename -## if '/' in filename: -## filename = macurl2path(filename) - filename = distutils.util.convert_path(filename) - if not os.path.isabs(filename): - curdir = os.getcwd() - filename = os.path.join(curdir, filename) - # Finally remove .. components - components = string.split(filename, ':') - for i in range(1, len(components)): - if components[i] == '..': - components[i] = '' - return string.join(components, ':') - - def library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of - directories searched for libraries. - """ - return # XXXX Not correct... - - def runtime_library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of - directories searched for runtime libraries. - """ - # Nothing needed or Mwerks/Mac. - return - - def library_option (self, lib): - """Return the compiler option to add 'dir' to the list of libraries - linked into the shared library or executable. - """ - return - - def find_library_file (self, dirs, lib, debug=0): - """Search the specified list of directories for a static or shared - library file 'lib' and return the full path to that file. If - 'debug' true, look for a debugging version (if that makes sense on - the current platform). Return None if 'lib' wasn't found in any of - the specified directories. - """ - return 0 From 0f5cedfabbc30367ff2a5a566e959254855aabc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 18:27:45 +0000 Subject: [PATCH 2086/8469] Merged revisions 68929 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68929 | tarek.ziade | 2009-01-25 19:19:25 +0100 (Sun, 25 Jan 2009) | 1 line Fixed #4863: removed distutils.mwerkscompiler ........ --- ccompiler.py | 3 - mwerkscompiler.py | 245 ---------------------------------------------- 2 files changed, 248 deletions(-) delete mode 100644 mwerkscompiler.py diff --git a/ccompiler.py b/ccompiler.py index f5d1587d72..cad663a348 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1004,7 +1004,6 @@ def mkpath (self, name, mode=0o777): # OS name mappings ('posix', 'unix'), ('nt', 'msvc'), - ('mac', 'mwerks'), ) @@ -1042,8 +1041,6 @@ def get_default_compiler(osname=None, platform=None): "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), - 'mwerks': ('mwerkscompiler', 'MWerksCompiler', - "MetroWerks CodeWarrior"), 'emx': ('emxccompiler', 'EMXCCompiler', "EMX port of GNU C Compiler for OS/2"), } diff --git a/mwerkscompiler.py b/mwerkscompiler.py deleted file mode 100644 index 130cd6147b..0000000000 --- a/mwerkscompiler.py +++ /dev/null @@ -1,245 +0,0 @@ -"""distutils.mwerkscompiler - -Contains MWerksCompiler, an implementation of the abstract CCompiler class -for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on -Windows.""" - -__revision__ = "$Id$" - -import sys, os -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options -import distutils.util -import distutils.dir_util -from distutils import log - -class MWerksCompiler (CCompiler) : - """Concrete class that implements an interface to MetroWerks CodeWarrior, - as defined by the CCompiler abstract class.""" - - compiler_type = 'mwerks' - - # Just set this so CCompiler's constructor doesn't barf. We currently - # don't use the 'set_executables()' bureaucracy provided by CCompiler, - # as it really isn't necessary for this sort of single-compiler class. - # Would be nice to have a consistent interface with UnixCCompiler, - # though, so it's worth thinking about. - executables = {} - - # Private class data (need to distinguish C from C++ source for compiler) - _c_extensions = ['.c'] - _cpp_extensions = ['.cc', '.cpp', '.cxx'] - _rc_extensions = ['.r'] - _exp_extension = '.exp' - - # Needed for the filename generation methods provided by the - # base class, CCompiler. - src_extensions = (_c_extensions + _cpp_extensions + - _rc_extensions) - res_extension = '.rsrc' - obj_extension = '.obj' # Not used, really - static_lib_extension = '.lib' - shared_lib_extension = '.slb' - static_lib_format = shared_lib_format = '%s%s' - exe_extension = '' - - - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - - CCompiler.__init__ (self, verbose, dry_run, force) - - - def compile (self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - depends=None): - (output_dir, macros, include_dirs) = \ - self._fix_compile_args (output_dir, macros, include_dirs) - self.__sources = sources - self.__macros = macros - self.__include_dirs = include_dirs - # Don't need extra_preargs and extra_postargs for CW - return [] - - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - # First fixup. - (objects, output_dir) = self._fix_object_args (objects, output_dir) - (libraries, library_dirs, runtime_library_dirs) = \ - self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) - - # First examine a couple of options for things that aren't implemented yet - if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): - raise DistutilsPlatformError('Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac') - if runtime_library_dirs: - raise DistutilsPlatformError('Runtime library dirs not implemented yet') - if extra_preargs or extra_postargs: - raise DistutilsPlatformError('Runtime library dirs not implemented yet') - if len(export_symbols) != 1: - raise DistutilsPlatformError('Need exactly one export symbol') - # Next there are various things for which we need absolute pathnames. - # This is because we (usually) create the project in a subdirectory of - # where we are now, and keeping the paths relative is too much work right - # now. - sources = [self._filename_to_abs(s) for s in self.__sources] - include_dirs = [self._filename_to_abs(d) for d in self.__include_dirs] - if objects: - objects = [self._filename_to_abs(o) for o in objects] - else: - objects = [] - if build_temp: - build_temp = self._filename_to_abs(build_temp) - else: - build_temp = os.curdir() - if output_dir: - output_filename = os.path.join(output_dir, output_filename) - # The output filename needs special handling: splitting it into dir and - # filename part. Actually I'm not sure this is really needed, but it - # can't hurt. - output_filename = self._filename_to_abs(output_filename) - output_dir, output_filename = os.path.split(output_filename) - # Now we need the short names of a couple of things for putting them - # into the project. - if output_filename[-8:] == '.ppc.slb': - basename = output_filename[:-8] - elif output_filename[-11:] == '.carbon.slb': - basename = output_filename[:-11] - else: - basename = os.path.strip(output_filename)[0] - projectname = basename + '.mcp' - targetname = basename - xmlname = basename + '.xml' - exportname = basename + '.mcp.exp' - prefixname = 'mwerks_%s_config.h'%basename - # Create the directories we need - distutils.dir_util.mkpath(build_temp, dry_run=self.dry_run) - distutils.dir_util.mkpath(output_dir, dry_run=self.dry_run) - # And on to filling in the parameters for the project builder - settings = {} - settings['mac_exportname'] = exportname - settings['mac_outputdir'] = output_dir - settings['mac_dllname'] = output_filename - settings['mac_targetname'] = targetname - settings['sysprefix'] = sys.prefix - settings['mac_sysprefixtype'] = 'Absolute' - sourcefilenames = [] - sourcefiledirs = [] - for filename in sources + objects: - dirname, filename = os.path.split(filename) - sourcefilenames.append(filename) - if not dirname in sourcefiledirs: - sourcefiledirs.append(dirname) - settings['sources'] = sourcefilenames - settings['libraries'] = libraries - settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs - if self.dry_run: - print('CALLING LINKER IN', os.getcwd()) - for key, value in settings.items(): - print('%20.20s %s'%(key, value)) - return - # Build the export file - exportfilename = os.path.join(build_temp, exportname) - log.debug("\tCreate export file %s", exportfilename) - fp = open(exportfilename, 'w') - fp.write('%s\n'%export_symbols[0]) - fp.close() - # Generate the prefix file, if needed, and put it in the settings - if self.__macros: - prefixfilename = os.path.join(os.getcwd(), os.path.join(build_temp, prefixname)) - fp = open(prefixfilename, 'w') - fp.write('#include "mwerks_shcarbon_config.h"\n') - for name, value in self.__macros: - if value is None: - fp.write('#define %s\n'%name) - else: - fp.write('#define %s %s\n'%(name, value)) - fp.close() - settings['prefixname'] = prefixname - - # Build the XML file. We need the full pathname (only lateron, really) - # because we pass this pathname to CodeWarrior in an AppleEvent, and CW - # doesn't have a clue about our working directory. - xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) - log.debug("\tCreate XML file %s", xmlfilename) - import mkcwproject - xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) - xmlbuilder.generate() - xmldata = settings['tmp_projectxmldata'] - fp = open(xmlfilename, 'w') - fp.write(xmldata) - fp.close() - # Generate the project. Again a full pathname. - projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) - log.debug('\tCreate project file %s', projectfilename) - mkcwproject.makeproject(xmlfilename, projectfilename) - # And build it - log.debug('\tBuild project') - mkcwproject.buildproject(projectfilename) - - def _filename_to_abs(self, filename): - # Some filenames seem to be unix-like. Convert to Mac names. -## if '/' in filename and ':' in filename: -## raise DistutilsPlatformError, 'Filename may be Unix or Mac style: %s'%filename -## if '/' in filename: -## filename = macurl2path(filename) - filename = distutils.util.convert_path(filename) - if not os.path.isabs(filename): - curdir = os.getcwd() - filename = os.path.join(curdir, filename) - # Finally remove .. components - components = filename.split(':') - for i in range(1, len(components)): - if components[i] == '..': - components[i] = '' - return ':'.join(components) - - def library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of - directories searched for libraries. - """ - return # XXXX Not correct... - - def runtime_library_dir_option (self, dir): - """Return the compiler option to add 'dir' to the list of - directories searched for runtime libraries. - """ - # Nothing needed or Mwerks/Mac. - return - - def library_option (self, lib): - """Return the compiler option to add 'dir' to the list of libraries - linked into the shared library or executable. - """ - return - - def find_library_file (self, dirs, lib, debug=0): - """Search the specified list of directories for a static or shared - library file 'lib' and return the full path to that file. If - 'debug' true, look for a debugging version (if that makes sense on - the current platform). Return None if 'lib' wasn't found in any of - the specified directories. - """ - return 0 From d404801cfcaaf114b9e8ac94f40cce68c293f671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 22:09:10 +0000 Subject: [PATCH 2087/8469] Issue #5052: removed backward compatibility information (out of date) --- __init__.py | 2 -- archive_util.py | 2 -- bcppcompiler.py | 2 -- ccompiler.py | 2 -- cmd.py | 2 -- command/__init__.py | 2 -- command/bdist.py | 2 -- command/bdist_dumb.py | 2 -- command/bdist_rpm.py | 2 -- command/bdist_wininst.py | 2 -- command/build.py | 2 -- command/build_clib.py | 2 -- command/build_ext.py | 2 -- command/build_py.py | 2 -- command/build_scripts.py | 2 -- command/clean.py | 2 -- command/config.py | 2 -- command/install.py | 2 -- command/install_data.py | 2 -- command/install_headers.py | 2 -- command/install_lib.py | 2 -- command/install_scripts.py | 2 -- command/sdist.py | 2 -- core.py | 2 -- cygwinccompiler.py | 2 -- debug.py | 2 -- dep_util.py | 2 -- dir_util.py | 2 -- dist.py | 2 -- errors.py | 2 -- fancy_getopt.py | 2 -- file_util.py | 2 -- filelist.py | 2 -- log.py | 2 -- msvccompiler.py | 2 -- spawn.py | 2 -- 36 files changed, 72 deletions(-) diff --git a/__init__.py b/__init__.py index 7315a37271..57fcf97602 100644 --- a/__init__.py +++ b/__init__.py @@ -8,8 +8,6 @@ setup (...) """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" # Distutils version diff --git a/archive_util.py b/archive_util.py index 264e66faf2..b50563e317 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,8 +3,6 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/bcppcompiler.py b/bcppcompiler.py index d4fc53366f..5a0fa727cd 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,8 +11,6 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" diff --git a/ccompiler.py b/ccompiler.py index aa92a9f174..a56a03880e 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,8 +3,6 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, re diff --git a/cmd.py b/cmd.py index 3cd5858920..267cf1802e 100644 --- a/cmd.py +++ b/cmd.py @@ -4,8 +4,6 @@ in the distutils.command package. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/__init__.py b/command/__init__.py index 0888c2712b..add83f8740 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -3,8 +3,6 @@ Package containing implementation of all the standard Distutils commands.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" __all__ = ['build', diff --git a/command/bdist.py b/command/bdist.py index ca3da74c06..3df5ef4c42 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index f740c468e7..7324c6c2fa 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,8 +4,6 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 9aa7030049..a48e0f186f 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index f18e318cb9..ad6eee8ea8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string diff --git a/command/build.py b/command/build.py index 7462e9348f..84e050204e 100644 --- a/command/build.py +++ b/command/build.py @@ -2,8 +2,6 @@ Implements the Distutils 'build' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os diff --git a/command/build_clib.py b/command/build_clib.py index 69d8c75166..fe921fb88b 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,8 +4,6 @@ that is included in the module distribution and needed by an extension module.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" diff --git a/command/build_ext.py b/command/build_ext.py index 1461409f60..fbf2a0b217 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,8 +4,6 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/build_py.py b/command/build_py.py index 3bf1267328..d9c15749d0 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_py' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import string, os diff --git a/command/build_scripts.py b/command/build_scripts.py index 104be0b349..48e06aa562 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_scripts' command.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, re diff --git a/command/clean.py b/command/clean.py index 02189c531a..ba03d1fff6 100644 --- a/command/clean.py +++ b/command/clean.py @@ -4,8 +4,6 @@ # contributed by Bastian Kleineidam , added 2000-03-18 -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/config.py b/command/config.py index 520c1b0c76..6b358cf250 100644 --- a/command/config.py +++ b/command/config.py @@ -9,8 +9,6 @@ this header file lives". """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string, re diff --git a/command/install.py b/command/install.py index 44c76926ea..adc9daf11a 100644 --- a/command/install.py +++ b/command/install.py @@ -4,8 +4,6 @@ from distutils import log -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string diff --git a/command/install_data.py b/command/install_data.py index 1069830fb3..cb11371023 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -5,8 +5,6 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/install_headers.py b/command/install_headers.py index 4895240a4c..c25b771246 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,8 +3,6 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" from distutils.core import Command diff --git a/command/install_lib.py b/command/install_lib.py index 81107a85cb..fed7e5363d 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,5 +1,3 @@ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/install_scripts.py b/command/install_scripts.py index fe93ef5af2..29cd9e7a0e 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -5,8 +5,6 @@ # contributed by Bastian Kleineidam -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/command/sdist.py b/command/sdist.py index 27883fd68b..6ce8c43ddc 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,8 +2,6 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, string diff --git a/core.py b/core.py index 62a3389b53..0e85ca6f06 100644 --- a/core.py +++ b/core.py @@ -6,8 +6,6 @@ really defined in distutils.dist and distutils.cmd. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 94a7bd96ee..3ac1dceb3e 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -45,8 +45,6 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os,sys,copy diff --git a/debug.py b/debug.py index b67139c7d4..2886744402 100644 --- a/debug.py +++ b/debug.py @@ -1,7 +1,5 @@ import os -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" # If DISTUTILS_DEBUG is anything other than the empty string, we run in diff --git a/dep_util.py b/dep_util.py index 2c6d7927f0..39eecfb248 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,8 +4,6 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/dir_util.py b/dir_util.py index 77f253255f..54f5c68e28 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,8 +2,6 @@ Utility functions for manipulating directories and directory trees.""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, sys diff --git a/dist.py b/dist.py index 18cc910900..3dd776ccd2 100644 --- a/dist.py +++ b/dist.py @@ -4,8 +4,6 @@ being built/installed/distributed. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string, re diff --git a/errors.py b/errors.py index e72221bdba..963d83377c 100644 --- a/errors.py +++ b/errors.py @@ -8,8 +8,6 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" class DistutilsError (Exception): diff --git a/fancy_getopt.py b/fancy_getopt.py index 31cf0c5c3b..e19319ae9d 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,8 +8,6 @@ * options set attributes of a passed-in object """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, string, re diff --git a/file_util.py b/file_util.py index 37b152ed8a..3af6344f11 100644 --- a/file_util.py +++ b/file_util.py @@ -3,8 +3,6 @@ Utility functions for operating on single files. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os diff --git a/filelist.py b/filelist.py index 6d27cce64f..51a1d57e13 100644 --- a/filelist.py +++ b/filelist.py @@ -4,8 +4,6 @@ and building lists of files. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os, string, re diff --git a/log.py b/log.py index 95d4c1c5a2..fcaa545a79 100644 --- a/log.py +++ b/log.py @@ -1,7 +1,5 @@ """A simple log mechanism styled after PEP 282.""" -# This module should be kept compatible with Python 2.1. - # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. diff --git a/msvccompiler.py b/msvccompiler.py index 30a9fc6f22..d38afb7223 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -8,8 +8,6 @@ # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string diff --git a/spawn.py b/spawn.py index e5654ff009..a6d3426390 100644 --- a/spawn.py +++ b/spawn.py @@ -6,8 +6,6 @@ executable name. """ -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import sys, os, string From f95cd9c07c8f71e37cbe442b9e1a6df70029df63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 22:11:04 +0000 Subject: [PATCH 2088/8469] added missing module docstring --- command/install_lib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/install_lib.py b/command/install_lib.py index fed7e5363d..4c62c7133a 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,3 +1,8 @@ +"""distutils.command.install_lib + +Implements the Distutils 'install_lib' command +(install all Python modules).""" + __revision__ = "$Id$" import os From e59b73327e824b92fd5ab54894b6ba1fd91e16d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 23:34:00 +0000 Subject: [PATCH 2089/8469] Fixed #1885: --formats=tar,gztar was not working properly in the sdist command --- command/sdist.py | 4 +++ tests/test_sdist.py | 77 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 6ce8c43ddc..e8b6bce9c9 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -456,6 +456,10 @@ def make_distribution (self): self.make_release_tree(base_dir, self.filelist.files) archive_files = [] # remember names of files we create + # tar archive must be created last to avoid overwrite and remove + if 'tar' in self.formats: + self.formats.append(self.formats.pop(self.formats.index('tar'))) + for fmt in self.formats: file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 7cc04cfc0c..96ec381ec6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -4,10 +4,13 @@ import shutil import zipfile from os.path import join +import sys from distutils.command.sdist import sdist from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase +from distutils.errors import DistutilsExecError +from distutils.spawn import spawn CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -35,6 +38,19 @@ def tearDown(self): shutil.rmtree(TEMP_PKG) PyPIRCCommandTestCase.tearDown(self) + def _init_tmp_pkg(self): + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + os.mkdir(join(TEMP_PKG, 'dist')) + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + os.chdir(TEMP_PKG) + def _write(self, path, content): f = open(path, 'w') try: @@ -46,15 +62,7 @@ def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned # on all systems - if not os.path.exists(TEMP_PKG): - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - - # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + self._init_tmp_pkg() # creating VCS directories with some files in them os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) @@ -68,8 +76,6 @@ def test_prune_file_list(self): self._write(join(TEMP_PKG, 'somecode', '.git', 'ok'), 'xxx') - os.chdir(TEMP_PKG) - # now building a sdist dist = Distribution() dist.script_name = 'setup.py' @@ -103,6 +109,55 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + def test_make_distribution(self): + + self._init_tmp_pkg() + + # check if tar is installed under win32 + if sys.platform == 'win32': + try: + spawn('tar --help') + except DistutilsExecError: + # let's return, no need to go further + return + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # creating a gztar then a tar + cmd.formats = ['gztar', 'tar'] + cmd.run() + + # making sure we have two files + dist_folder = join(TEMP_PKG, 'dist') + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + + os.remove(join(dist_folder, 'fake-1.0.tar')) + os.remove(join(dist_folder, 'fake-1.0.tar.gz')) + + # now trying a tar then a gztar + cmd.formats = ['tar', 'gztar'] + cmd.run() + + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def test_suite(): return unittest.makeSuite(sdistTestCase) From adc20e818b17882e3ef80dcd2c4a81decb9e9888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 26 Jan 2009 17:20:15 +0000 Subject: [PATCH 2090/8469] Merged revisions 68951 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68951 | tarek.ziade | 2009-01-26 00:34:00 +0100 (Mon, 26 Jan 2009) | 1 line Fixed #1885: --formats=tar,gztar was not working properly in the sdist command ........ --- command/sdist.py | 4 +++ tests/test_sdist.py | 77 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 27883fd68b..a366d1eaf6 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -458,6 +458,10 @@ def make_distribution (self): self.make_release_tree(base_dir, self.filelist.files) archive_files = [] # remember names of files we create + # tar archive must be created last to avoid overwrite and remove + if 'tar' in self.formats: + self.formats.append(self.formats.pop(self.formats.index('tar'))) + for fmt in self.formats: file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 7cc04cfc0c..96ec381ec6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -4,10 +4,13 @@ import shutil import zipfile from os.path import join +import sys from distutils.command.sdist import sdist from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase +from distutils.errors import DistutilsExecError +from distutils.spawn import spawn CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -35,6 +38,19 @@ def tearDown(self): shutil.rmtree(TEMP_PKG) PyPIRCCommandTestCase.tearDown(self) + def _init_tmp_pkg(self): + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + os.mkdir(join(TEMP_PKG, 'dist')) + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + os.chdir(TEMP_PKG) + def _write(self, path, content): f = open(path, 'w') try: @@ -46,15 +62,7 @@ def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned # on all systems - if not os.path.exists(TEMP_PKG): - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - - # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + self._init_tmp_pkg() # creating VCS directories with some files in them os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) @@ -68,8 +76,6 @@ def test_prune_file_list(self): self._write(join(TEMP_PKG, 'somecode', '.git', 'ok'), 'xxx') - os.chdir(TEMP_PKG) - # now building a sdist dist = Distribution() dist.script_name = 'setup.py' @@ -103,6 +109,55 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + def test_make_distribution(self): + + self._init_tmp_pkg() + + # check if tar is installed under win32 + if sys.platform == 'win32': + try: + spawn('tar --help') + except DistutilsExecError: + # let's return, no need to go further + return + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # creating a gztar then a tar + cmd.formats = ['gztar', 'tar'] + cmd.run() + + # making sure we have two files + dist_folder = join(TEMP_PKG, 'dist') + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + + os.remove(join(dist_folder, 'fake-1.0.tar')) + os.remove(join(dist_folder, 'fake-1.0.tar.gz')) + + # now trying a tar then a gztar + cmd.formats = ['tar', 'gztar'] + cmd.run() + + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def test_suite(): return unittest.makeSuite(sdistTestCase) From da4be9fd4435d184850ca6f2f1e2f00429ac7f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 26 Jan 2009 17:23:20 +0000 Subject: [PATCH 2091/8469] Merged revisions 68951 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68951 | tarek.ziade | 2009-01-26 00:34:00 +0100 (Mon, 26 Jan 2009) | 1 line Fixed #1885: --formats=tar,gztar was not working properly in the sdist command ........ --- command/sdist.py | 4 +++ tests/test_sdist.py | 77 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 96fb7fa1a7..054fe191d4 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -428,6 +428,10 @@ def make_distribution(self): self.make_release_tree(base_dir, self.filelist.files) archive_files = [] # remember names of files we create + # tar archive must be created last to avoid overwrite and remove + if 'tar' in self.formats: + self.formats.append(self.formats.pop(self.formats.index('tar'))) + for fmt in self.formats: file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 7cc04cfc0c..96ec381ec6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -4,10 +4,13 @@ import shutil import zipfile from os.path import join +import sys from distutils.command.sdist import sdist from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase +from distutils.errors import DistutilsExecError +from distutils.spawn import spawn CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -35,6 +38,19 @@ def tearDown(self): shutil.rmtree(TEMP_PKG) PyPIRCCommandTestCase.tearDown(self) + def _init_tmp_pkg(self): + if os.path.exists(TEMP_PKG): + shutil.rmtree(TEMP_PKG) + os.mkdir(TEMP_PKG) + os.mkdir(join(TEMP_PKG, 'somecode')) + os.mkdir(join(TEMP_PKG, 'dist')) + # creating a MANIFEST, a package, and a README + self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(TEMP_PKG, 'README'), 'xxx') + self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') + self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + os.chdir(TEMP_PKG) + def _write(self, path, content): f = open(path, 'w') try: @@ -46,15 +62,7 @@ def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned # on all systems - if not os.path.exists(TEMP_PKG): - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - - # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) + self._init_tmp_pkg() # creating VCS directories with some files in them os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) @@ -68,8 +76,6 @@ def test_prune_file_list(self): self._write(join(TEMP_PKG, 'somecode', '.git', 'ok'), 'xxx') - os.chdir(TEMP_PKG) - # now building a sdist dist = Distribution() dist.script_name = 'setup.py' @@ -103,6 +109,55 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + def test_make_distribution(self): + + self._init_tmp_pkg() + + # check if tar is installed under win32 + if sys.platform == 'win32': + try: + spawn('tar --help') + except DistutilsExecError: + # let's return, no need to go further + return + + # now building a sdist + dist = Distribution() + dist.script_name = 'setup.py' + dist.metadata.name = 'fake' + dist.metadata.version = '1.0' + dist.metadata.url = 'http://xxx' + dist.metadata.author = dist.metadata.author_email = 'xxx' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.manifest = 'MANIFEST' + cmd.template = 'MANIFEST.in' + cmd.dist_dir = 'dist' + + # creating a gztar then a tar + cmd.formats = ['gztar', 'tar'] + cmd.run() + + # making sure we have two files + dist_folder = join(TEMP_PKG, 'dist') + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + + os.remove(join(dist_folder, 'fake-1.0.tar')) + os.remove(join(dist_folder, 'fake-1.0.tar.gz')) + + # now trying a tar then a gztar + cmd.formats = ['tar', 'gztar'] + cmd.run() + + result = os.listdir(dist_folder) + result.sort() + self.assertEquals(result, + ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def test_suite(): return unittest.makeSuite(sdistTestCase) From 52141aae7f073fe917c841ddbb4531a9beb04ddc Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Tue, 27 Jan 2009 18:17:45 +0000 Subject: [PATCH 2092/8469] Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from the standard library and tests. --- version.py | 63 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/version.py b/version.py index 907f71c313..77814377a5 100644 --- a/version.py +++ b/version.py @@ -21,7 +21,7 @@ an equivalent string -- ie. one that will generate an equivalent version number instance) * __repr__ generates Python code to recreate the version number instance - * __cmp__ compares the current instance with either another instance + * _cmp compares the current instance with either another instance of the same class or a string (which will be parsed to an instance of the same class, thus must follow the same rules) """ @@ -32,7 +32,7 @@ class Version: """Abstract base class for version numbering classes. Just provides constructor (__init__) and reproducer (__repr__), because those seem to be the same for all version numbering classes; and route - rich comparisons to __cmp__. + rich comparisons to _cmp. """ def __init__ (self, vstring=None): @@ -43,37 +43,37 @@ def __repr__ (self): return "%s ('%s')" % (self.__class__.__name__, str(self)) def __eq__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c == 0 def __ne__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c != 0 def __lt__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c < 0 def __le__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c <= 0 def __gt__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c > 0 def __ge__(self, other): - c = self.__cmp__(other) + c = self._cmp(other) if c is NotImplemented: return c return c >= 0 @@ -91,7 +91,7 @@ def __ge__(self, other): # (if not identical to) the string supplied to parse # __repr__ (self) - generate Python code to recreate # the instance -# __cmp__ (self, other) - compare two version numbers ('other' may +# _cmp (self, other) - compare two version numbers ('other' may # be an unparsed version string, or another # instance of your version class) @@ -169,30 +169,39 @@ def __str__ (self): return vstring - def __cmp__ (self, other): + def _cmp (self, other): if isinstance(other, str): other = StrictVersion(other) - compare = cmp(self.version, other.version) - if (compare == 0): # have to compare prerelease - - # case 1: neither has prerelease; they're equal - # case 2: self has prerelease, other doesn't; other is greater - # case 3: self doesn't have prerelease, other does: self is greater - # case 4: both have prerelease: must compare them! + if self.version != other.version: + # numeric versions don't match + # prerelease stuff doesn't matter + if self.version < other.version: + return -1 + else: + return 1 - if (not self.prerelease and not other.prerelease): + # have to compare prerelease + # case 1: neither has prerelease; they're equal + # case 2: self has prerelease, other doesn't; other is greater + # case 3: self doesn't have prerelease, other does: self is greater + # case 4: both have prerelease: must compare them! + + if (not self.prerelease and not other.prerelease): + return 0 + elif (self.prerelease and not other.prerelease): + return -1 + elif (not self.prerelease and other.prerelease): + return 1 + elif (self.prerelease and other.prerelease): + if self.prerelease == other.prerelease: return 0 - elif (self.prerelease and not other.prerelease): + elif self.prerelease < other.prerelease: return -1 - elif (not self.prerelease and other.prerelease): + else: return 1 - elif (self.prerelease and other.prerelease): - return cmp(self.prerelease, other.prerelease) - - else: # numeric versions don't match -- - return compare # prerelease stuff doesn't matter - + else: + assert False, "never get here" # end class StrictVersion @@ -325,7 +334,7 @@ def __repr__ (self): return "LooseVersion ('%s')" % str(self) - def __cmp__ (self, other): + def _cmp (self, other): if isinstance(other, str): other = LooseVersion(other) From 8e32f7ad504aad7f9ed2603c282f0e9831c716ba Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 29 Jan 2009 12:13:31 +0000 Subject: [PATCH 2093/8469] Fix issue5075: bdist_wininst should not depend on the vc runtime? --- command/wininst-9.0-amd64.exe | Bin 77824 -> 223744 bytes command/wininst-9.0.exe | Bin 66048 -> 196096 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-9.0-amd64.exe b/command/wininst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`#?euTg$6z(5ivW)w#B4H9K?~N+olZY^fs&7TxtMRqv{5*t&Uh zH5a;bMh*8*%vHW+YejVpGorqxN(Aaw7Ii)CaJ=mv<@xq$Kds%tHQlm@;>yCyWS<#);>%c=3b%{a~ItTdiN+2 z%O>?uD3;fYQr(K0%Gx}3r*YlL%pzMD#wXOD(DwS9`YBcmZF%H4nKT-RhH8nd@|*e< z4f)^|vC08W2>rpP9}^vMcnqaTbZjSP?C2RN0FHi+)6 zq_*=KNR3d69m3|pwy)X(3H~-uS4eg2J3Pe;SvI(Z&6kA5%rv<8K25?((7rqa#Q=?3 zQ@$0JG7I6jQc*H9a--I{^@f5@!!MdX*59HlnxSK+@uXEXG~XN@>(E`#C*P^V2EU$9xl4z`>w4ZdU&rWQ zDHv(LZ-I_E^)J@+>!n-0$;mktZY);?HtVB{Cyr0XZ?r_rYiMw9-CR9VfhwF}ykrF$ zh&a=dX(#8-e59(zx?pB978{vWRa@$78)_@XdCsNKZ%fy%o0+^#J0x>wX3tBXw_twy zf(7%kW+vBpwR5btJ`dU$+IEX5)uV^)S$CsS+FV_=<$m|0>##v*7~x;eXi zzI%R_+q!w?;+(s_O3ug(?i!iYjZ?@OE$5TXxvTBBf6^y-9eMfrD^@QrDTyThm-F7` P|H}h@WxVLsyx{)=Bb7Hx From 4b0e22f7614b2454d2a1b0c1abc13e4cdad49707 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 29 Jan 2009 12:31:51 +0000 Subject: [PATCH 2094/8469] Merged revisions 69094 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69094 | mark.hammond | 2009-01-29 23:13:31 +1100 (Thu, 29 Jan 2009) | 2 lines Fix issue5075: bdist_wininst should not depend on the vc runtime? ........ --- command/wininst-9.0-amd64.exe | Bin 77824 -> 223744 bytes command/wininst-9.0.exe | Bin 66048 -> 196096 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64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6z(5ivW)w#B4H9K?~N+olZY^fs&7TxtMRqv{5*t&Uh zH5a;bMh*8*%vHW+YejVpGorqxN(Aaw7Ii)CaJ=mv<@xq$Kds%tHQlm@;>yCyWS<#);>%c=3b%{a~ItTdiN+2 z%O>?uD3;fYQr(K0%Gx}3r*YlL%pzMD#wXOD(DwS9`YBcmZF%H4nKT-RhH8nd@|*e< z4f)^|vC08W2>rpP9}^vMcnqaTbZjSP?C2RN0FHi+)6 zq_*=KNR3d69m3|pwy)X(3H~-uS4eg2J3Pe;SvI(Z&6kA5%rv<8K25?((7rqa#Q=?3 zQ@$0JG7I6jQc*H9a--I{^@f5@!!MdX*59HlnxSK+@uXEXG~XN@>(E`#C*P^V2EU$9xl4z`>w4ZdU&rWQ zDHv(LZ-I_E^)J@+>!n-0$;mktZY);?HtVB{Cyr0XZ?r_rYiMw9-CR9VfhwF}ykrF$ zh&a=dX(#8-e59(zx?pB978{vWRa@$78)_@XdCsNKZ%fy%o0+^#J0x>wX3tBXw_twy zf(7%kW+vBpwR5btJ`dU$+IEX5)uV^)S$CsS+FV_=<$m|0>##v*7~x;eXi zzI%R_+q!w?;+(s_O3ug(?i!iYjZ?@OE$5TXxvTBBf6^y-9eMfrD^@QrDTyThm-F7` P|H}h@WxVLsyx{)=Bb7Hx From 7036aee66775cdb74a5c8342e6d08c8df75d4048 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 29 Jan 2009 12:36:50 +0000 Subject: [PATCH 2095/8469] Merged revisions 69094 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69094 | mark.hammond | 2009-01-29 23:13:31 +1100 (Thu, 29 Jan 2009) | 2 lines Fix issue5075: bdist_wininst should not depend on the vc runtime? ........ --- command/wininst-9.0-amd64.exe | Bin 77824 -> 223744 bytes command/wininst-9.0.exe | Bin 66048 -> 196096 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe index 9dedfcd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4H9K?~N+olZY^fs&7TxtMRqv{5*t&Uh zH5a;bMh*8*%vHW+YejVpGorqxN(Aaw7Ii)CaJ=mv<@xq$Kds%tHQlm@;>yCyWS<#);>%c=3b%{a~ItTdiN+2 z%O>?uD3;fYQr(K0%Gx}3r*YlL%pzMD#wXOD(DwS9`YBcmZF%H4nKT-RhH8nd@|*e< z4f)^|vC08W2>rpP9}^vMcnqaTbZjSP?C2RN0FHi+)6 zq_*=KNR3d69m3|pwy)X(3H~-uS4eg2J3Pe;SvI(Z&6kA5%rv<8K25?((7rqa#Q=?3 zQ@$0JG7I6jQc*H9a--I{^@f5@!!MdX*59HlnxSK+@uXEXG~XN@>(E`#C*P^V2EU$9xl4z`>w4ZdU&rWQ zDHv(LZ-I_E^)J@+>!n-0$;mktZY);?HtVB{Cyr0XZ?r_rYiMw9-CR9VfhwF}ykrF$ zh&a=dX(#8-e59(zx?pB978{vWRa@$78)_@XdCsNKZ%fy%o0+^#J0x>wX3tBXw_twy zf(7%kW+vBpwR5btJ`dU$+IEX5)uV^)S$CsS+FV_=<$m|0>##v*7~x;eXi zzI%R_+q!w?;+(s_O3ug(?i!iYjZ?@OE$5TXxvTBBf6^y-9eMfrD^@QrDTyThm-F7` P|H}h@WxVLsyx{)=Bb7Hx From f7bf90fda5ccf81484f5bb114cd0115c62eb1c18 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 29 Jan 2009 13:08:01 +0000 Subject: [PATCH 2096/8469] Fix issue5076: bdist_wininst fails on py3k --- command/wininst-9.0-amd64.exe | Bin 223744 -> 224256 bytes command/wininst-9.0.exe | Bin 196096 -> 196096 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-9.0-amd64.exe b/command/wininst-9.0-amd64.exe index 11d8011c717c3a1c54afbe00e002fab6d37766c6..94fbd4341b2a140fb0aa38ed1e10ff69600d4911 100644 GIT binary patch delta 39360 zcmagH34Be*`#*kXl1oUg8aTqS2M zB^NAf(&;VJ+HTp7Gu4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509265926f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 29 Jan 2009 23:49:17 +0000 Subject: [PATCH 2097/8469] fixed test_make_distribution so it runs on any platform, as long as tar an gzip are available --- tests/test_sdist.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 96ec381ec6..0d839b5c6e 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -10,7 +10,7 @@ from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError -from distutils.spawn import spawn +from distutils.spawn import find_executable CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -111,15 +111,12 @@ def test_prune_file_list(self): def test_make_distribution(self): - self._init_tmp_pkg() + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return - # check if tar is installed under win32 - if sys.platform == 'win32': - try: - spawn('tar --help') - except DistutilsExecError: - # let's return, no need to go further - return + self._init_tmp_pkg() # now building a sdist dist = Distribution() From 2185915ff974a216f44b4ddaedab793f7c01c611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 29 Jan 2009 23:51:53 +0000 Subject: [PATCH 2098/8469] Merged revisions 69106 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69106 | tarek.ziade | 2009-01-30 00:49:17 +0100 (Fri, 30 Jan 2009) | 1 line fixed test_make_distribution so it runs on any platform, as long as tar an gzip are available ........ --- tests/test_sdist.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 96ec381ec6..0d839b5c6e 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -10,7 +10,7 @@ from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError -from distutils.spawn import spawn +from distutils.spawn import find_executable CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -111,15 +111,12 @@ def test_prune_file_list(self): def test_make_distribution(self): - self._init_tmp_pkg() + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return - # check if tar is installed under win32 - if sys.platform == 'win32': - try: - spawn('tar --help') - except DistutilsExecError: - # let's return, no need to go further - return + self._init_tmp_pkg() # now building a sdist dist = Distribution() From f11ca53664d739a8c8e8194de7afdc0437ac7994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 29 Jan 2009 23:54:06 +0000 Subject: [PATCH 2099/8469] Merged revisions 69106 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69106 | tarek.ziade | 2009-01-30 00:49:17 +0100 (Fri, 30 Jan 2009) | 1 line fixed test_make_distribution so it runs on any platform, as long as tar an gzip are available ........ --- tests/test_sdist.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 96ec381ec6..0d839b5c6e 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -10,7 +10,7 @@ from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError -from distutils.spawn import spawn +from distutils.spawn import find_executable CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -111,15 +111,12 @@ def test_prune_file_list(self): def test_make_distribution(self): - self._init_tmp_pkg() + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return - # check if tar is installed under win32 - if sys.platform == 'win32': - try: - spawn('tar --help') - except DistutilsExecError: - # let's return, no need to go further - return + self._init_tmp_pkg() # now building a sdist dist = Distribution() From 77931446b65e84f947756a3a32eecf0cf3a05fde Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 30 Jan 2009 04:00:29 +0000 Subject: [PATCH 2100/8469] Merged revisions 68840,68881,68943,68945 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68840 | andrew.kuchling | 2009-01-20 20:15:43 -0600 (Tue, 20 Jan 2009) | 1 line Add some items ........ r68881 | andrew.kuchling | 2009-01-23 21:28:18 -0600 (Fri, 23 Jan 2009) | 1 line Add various items ........ r68943 | tarek.ziade | 2009-01-25 16:09:10 -0600 (Sun, 25 Jan 2009) | 1 line Issue #5052: removed backward compatibility information (out of date) ........ r68945 | tarek.ziade | 2009-01-25 16:11:04 -0600 (Sun, 25 Jan 2009) | 1 line added missing module docstring ........ --- command/install_lib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/install_lib.py b/command/install_lib.py index ac620fccb9..94895f4269 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,3 +1,8 @@ +"""distutils.command.install_lib + +Implements the Distutils 'install_lib' command +(install all Python modules).""" + __revision__ = "$Id$" import sys, os From ec8ccd9e3fd60d7ffac44b54fef21c18efbd14ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 5 Feb 2009 09:06:23 +0000 Subject: [PATCH 2101/8469] Fix comment for #1835 --- __init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/__init__.py b/__init__.py index 57fcf97602..e418214c48 100644 --- a/__init__.py +++ b/__init__.py @@ -12,13 +12,8 @@ # Distutils version # -# Please coordinate with Marc-Andre Lemburg when adding -# new features to distutils that would warrant bumping the version number. +# Updated automatically by the Python release process. # -# In general, major and minor version should loosely follow the Python -# version number the distutils code was shipped with. -# - #--start constants-- __version__ = "2.6" #--end constants-- From 7126baf0a432aac54faee9bffcb78e93e67bced8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 5 Feb 2009 09:08:59 +0000 Subject: [PATCH 2102/8469] Merged revisions 69285 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69285 | tarek.ziade | 2009-02-05 10:06:23 +0100 (Thu, 05 Feb 2009) | 1 line Fix comment for #1835 ........ --- __init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/__init__.py b/__init__.py index 34fc008a58..1cf8a6ea56 100644 --- a/__init__.py +++ b/__init__.py @@ -12,13 +12,8 @@ # Distutils version # -# Please coordinate with Marc-Andre Lemburg when adding -# new features to distutils that would warrant bumping the version number. +# Updated automatically by the Python release process. # -# In general, major and minor version should loosely follow the Python -# version number the distutils code was shipped with. -# - #--start constants-- __version__ = "3.1a0" #--end constants-- From a1f7b98d85ddc39f6473eec042ddb6e85e39433f Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 5 Feb 2009 16:14:39 +0000 Subject: [PATCH 2103/8469] Fix get_python_inc() to work when building in a directory separate from the source. Also, define 'srcdir' on non-posix platforms. --- sysconfig.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 9993fba1ab..ec2f8a9c33 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -73,14 +73,17 @@ def get_python_inc(plat_specific=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: + # Assume the executable is in the build directory. The + # pyconfig.h file should be in the same directory. Since + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. base = os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: - inc_dir = base + return base else: - inc_dir = os.path.join(base, "Include") - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") - return inc_dir + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") @@ -521,6 +524,9 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + if 'srcdir' not in _config_vars: + _config_vars['srcdir'] = project_base + if sys.platform == 'darwin': kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) From d1ea619952d81916af8fcfdb82e1961ae114e4e1 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 5 Feb 2009 16:19:05 +0000 Subject: [PATCH 2104/8469] Since sysconfig.get_python_inc() now works when building in a directory other than the source directory, simplify the test code in test_sysconfig.py. --- tests/test_sysconfig.py | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index aa1187e77b..397bb12cfc 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -19,27 +19,10 @@ def test_get_python_lib(self): # test for pythonxx.lib? def test_get_python_inc(self): - # The check for srcdir is copied from Python's setup.py, - # and is necessary to make this test pass when building - # Python in a directory other than the source directory. - (srcdir,) = sysconfig.get_config_vars('srcdir') - if not srcdir: - inc_dir = sysconfig.get_python_inc() - else: - # This test is not really a proper test: when building - # Python from source, even in the same directory, - # we won't be testing the same thing as when running - # distutils' tests on an installed Python. Nevertheless, - # let's try to do our best: if we are running Python's - # unittests from a build directory that is not the source - # directory, the normal inc_dir will exist, it will just not - # contain anything of interest. - inc_dir = sysconfig.get_python_inc() - self.assert_(os.path.isdir(inc_dir)) - # Now test the source location, to make sure Python.h does - # exist. - inc_dir = os.path.join(os.getcwd(), srcdir, 'Include') - inc_dir = os.path.normpath(inc_dir) + inc_dir = sysconfig.get_python_inc() + # This is not much of a test. We make sure Python.h exists + # in the directory returned by get_python_inc() but we don't know + # it is the correct file. self.assert_(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") self.assert_(os.path.isfile(python_h), python_h) From bf94d914167a979fe2bc878bb594335fe3aaeb9b Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 5 Feb 2009 16:25:16 +0000 Subject: [PATCH 2105/8469] Fix test_build_ext.py to work when building in a separate directory. Since "srcdir" should now be defined on all platforms, use it to find the module source. --- tests/test_build_ext.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 31b8b48185..b268820fa2 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -11,6 +11,10 @@ import unittest from test import test_support +def _get_source_filename(): + srcdir = sysconfig.get_config_var('srcdir') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') + class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment @@ -18,9 +22,7 @@ def setUp(self): self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) - - xx_c = os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') - shutil.copy(xx_c, self.tmp_dir) + shutil.copy(_get_source_filename(), self.tmp_dir) def test_build_ext(self): xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -66,9 +68,11 @@ def tearDown(self): shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') def test_suite(): - if not sysconfig.python_build: + src = _get_source_filename() + if not os.path.exists(src): if test_support.verbose: - print 'test_build_ext: The test must be run in a python build dir' + print ('test_build_ext: Cannot find source code (test' + ' must run in python build dir)') return unittest.TestSuite() else: return unittest.makeSuite(BuildExtTestCase) From 092c2c911cf324eb35fe10416fe35d2fdb8d9e1c Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 5 Feb 2009 16:33:41 +0000 Subject: [PATCH 2106/8469] Fix get_python_inc() to work when building in a directory separate from the source. Also, define 'srcdir' on non-posix platforms. --- sysconfig.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index b17743a865..de8c5fccd6 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -72,14 +72,17 @@ def get_python_inc(plat_specific=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: + # Assume the executable is in the build directory. The + # pyconfig.h file should be in the same directory. Since + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. base = os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: - inc_dir = base + return base else: - inc_dir = os.path.join(base, "Include") - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") - return inc_dir + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") From 79a5c6b29982615cff8c78b6ee045cdd3a26ac55 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 5 Feb 2009 16:35:04 +0000 Subject: [PATCH 2107/8469] Since sysconfig.get_python_inc() now works when building in a directory other than the source directory, simplify the test code in test_sysconfig.py. --- tests/test_sysconfig.py | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index c6ab9aa5d5..490410e126 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -19,27 +19,10 @@ def test_get_python_lib(self): # test for pythonxx.lib? def test_get_python_inc(self): - # The check for srcdir is copied from Python's setup.py, - # and is necessary to make this test pass when building - # Python in a directory other than the source directory. - (srcdir,) = sysconfig.get_config_vars('srcdir') - if not srcdir: - inc_dir = sysconfig.get_python_inc() - else: - # This test is not really a proper test: when building - # Python from source, even in the same directory, - # we won't be testing the same thing as when running - # distutils' tests on an installed Python. Nevertheless, - # let's try to do our best: if we are running Python's - # unittests from a build directory that is not the source - # directory, the normal inc_dir will exist, it will just not - # contain anything of interest. - inc_dir = sysconfig.get_python_inc() - self.assert_(os.path.isdir(inc_dir)) - # Now test the source location, to make sure Python.h does - # exist. - inc_dir = os.path.join(os.getcwd(), srcdir, 'Include') - inc_dir = os.path.normpath(inc_dir) + inc_dir = sysconfig.get_python_inc() + # This is not much of a test. We make sure Python.h exists + # in the directory returned by get_python_inc() but we don't know + # it is the correct file. self.assert_(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") self.assert_(os.path.isfile(python_h), python_h) From efc1ec81a7cc219b13f025b3bc75a8e1a1cdb4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 5 Feb 2009 22:52:52 +0000 Subject: [PATCH 2108/8469] Fixed #5132: enable extensions to link on Solaris --- command/build_ext.py | 8 +++++--- tests/test_build_ext.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index fbf2a0b217..2ed3ef65cc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -231,10 +231,12 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') - # for extensions under Linux with a shared Python library, + # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ - and sysconfig.get_config_var('Py_ENABLE_SHARED'): + sysconfig.get_config_var('Py_ENABLE_SHARED') + if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') + or sys.platform.startswith('sunos')) + and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b268820fa2..780660da85 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -67,6 +67,27 @@ def tearDown(self): # XXX on Windows the test leaves a directory with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + def test_solaris_enable_shared(self): + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + old = sys.platform + + sys.platform = 'sunos' # fooling finalize_options + from distutils.sysconfig import _config_vars + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = 1 + try: + cmd.ensure_finalized() + finally: + sys.platform = old + if old_var is None: + del _config_vars['Py_ENABLE_SHARED'] + else: + _config_vars['Py_ENABLE_SHARED'] = old_var + + # make sur we get some lobrary dirs under solaris + self.assert_(len(cmd.library_dirs) > 0) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From f148277fd0221d779fe64e6d0715f7c713d24c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 5 Feb 2009 22:55:00 +0000 Subject: [PATCH 2109/8469] Merged revisions 69316 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69316 | tarek.ziade | 2009-02-05 23:52:52 +0100 (Thu, 05 Feb 2009) | 1 line Fixed #5132: enable extensions to link on Solaris ........ --- command/build_ext.py | 8 +++++--- tests/test_build_ext.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1461409f60..936ea8d099 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -233,10 +233,12 @@ def finalize_options (self): # building python standard extensions self.library_dirs.append('.') - # for extensions under Linux with a shared Python library, + # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ - and sysconfig.get_config_var('Py_ENABLE_SHARED'): + sysconfig.get_config_var('Py_ENABLE_SHARED') + if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') + or sys.platform.startswith('sunos')) + and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 31b8b48185..d0cce9ba1a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -65,6 +65,27 @@ def tearDown(self): # XXX on Windows the test leaves a directory with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + def test_solaris_enable_shared(self): + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + old = sys.platform + + sys.platform = 'sunos' # fooling finalize_options + from distutils.sysconfig import _config_vars + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = 1 + try: + cmd.ensure_finalized() + finally: + sys.platform = old + if old_var is None: + del _config_vars['Py_ENABLE_SHARED'] + else: + _config_vars['Py_ENABLE_SHARED'] = old_var + + # make sur we get some lobrary dirs under solaris + self.assert_(len(cmd.library_dirs) > 0) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 1ccb3b08c1c773ad4eaff4d253d7cddecb8a4b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 5 Feb 2009 22:56:14 +0000 Subject: [PATCH 2110/8469] Merged revisions 69316 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69316 | tarek.ziade | 2009-02-05 23:52:52 +0100 (Thu, 05 Feb 2009) | 1 line Fixed #5132: enable extensions to link on Solaris ........ --- command/build_ext.py | 8 +++++--- tests/test_build_ext.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7ef5becc6f..b12da63f84 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -229,10 +229,12 @@ def finalize_options(self): # building python standard extensions self.library_dirs.append('.') - # for extensions under Linux with a shared Python library, + # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ - and sysconfig.get_config_var('Py_ENABLE_SHARED'): + sysconfig.get_config_var('Py_ENABLE_SHARED') + if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') + or sys.platform.startswith('sunos')) + and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 527529777d..4c5723255a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -75,6 +75,27 @@ def tearDown(self): # XXX on Windows the test leaves a directory with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + def test_solaris_enable_shared(self): + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + old = sys.platform + + sys.platform = 'sunos' # fooling finalize_options + from distutils.sysconfig import _config_vars + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = 1 + try: + cmd.ensure_finalized() + finally: + sys.platform = old + if old_var is None: + del _config_vars['Py_ENABLE_SHARED'] + else: + _config_vars['Py_ENABLE_SHARED'] = old_var + + # make sur we get some lobrary dirs under solaris + self.assert_(len(cmd.library_dirs) > 0) + def test_suite(): if not sysconfig.python_build: if support.verbose: From fed87c12d428957f2341abafa44669549b649c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:31:59 +0000 Subject: [PATCH 2111/8469] Fixed #1276768: verbose option was not used in the code. --- dir_util.py | 30 +++++++------- file_util.py | 22 ++++++---- tests/test_dir_util.py | 91 +++++++++++++++++++++++++++++++++++++++++ tests/test_file_util.py | 66 ++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+), 24 deletions(-) create mode 100644 tests/test_dir_util.py create mode 100644 tests/test_file_util.py diff --git a/dir_util.py b/dir_util.py index 54f5c68e28..6d896ee408 100644 --- a/dir_util.py +++ b/dir_util.py @@ -16,7 +16,7 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0777, verbose=0, dry_run=0): +def mkpath (name, mode=0777, verbose=1, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do @@ -49,13 +49,9 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir(head): - #print "splitting '%s': " % head, (head, tail) = os.path.split(head) - #print "to ('%s','%s')" % (head, tail) tails.insert(0, tail) # push next higher dir onto stack - #print "stack of tails:", tails - # now 'head' contains the deepest directory that already exists # (that is, the child of 'head' in 'name' is the highest directory # that does *not* exist) @@ -67,7 +63,8 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): if _path_created.get(abs_head): continue - log.info("creating %s", head) + if verbose == 1: + log.info("creating %s", head) if not dry_run: try: @@ -83,7 +80,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): # mkpath () -def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): +def create_tree (base_dir, files, mode=0777, verbose=1, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. 'base_dir' is just the a name of a directory @@ -102,7 +99,7 @@ def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): # Now create them for dir in need_dirs: - mkpath(dir, mode, dry_run=dry_run) + mkpath(dir, mode, verbose=verbose, dry_run=dry_run) # create_tree () @@ -112,7 +109,7 @@ def copy_tree (src, dst, preserve_times=1, preserve_symlinks=0, update=0, - verbose=0, + verbose=1, dry_run=0): """Copy an entire directory tree 'src' to a new location 'dst'. Both @@ -148,7 +145,7 @@ def copy_tree (src, dst, "error listing files in '%s': %s" % (src, errstr) if not dry_run: - mkpath(dst) + mkpath(dst, verbose=verbose) outputs = [] @@ -158,7 +155,8 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) - log.info("linking %s -> %s", dst_name, link_dest) + if verbose == 1: + log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: os.symlink(link_dest, dst_name) outputs.append(dst_name) @@ -167,10 +165,11 @@ def copy_tree (src, dst, outputs.extend( copy_tree(src_name, dst_name, preserve_mode, preserve_times, preserve_symlinks, update, - dry_run=dry_run)) + verbose=verbose, dry_run=dry_run)) else: copy_file(src_name, dst_name, preserve_mode, - preserve_times, update, dry_run=dry_run) + preserve_times, update, verbose=verbose, + dry_run=dry_run) outputs.append(dst_name) return outputs @@ -188,14 +187,15 @@ def _build_cmdtuple(path, cmdtuples): cmdtuples.append((os.rmdir, path)) -def remove_tree (directory, verbose=0, dry_run=0): +def remove_tree (directory, verbose=1, dry_run=0): """Recursively remove an entire directory tree. Any errors are ignored (apart from being reported to stdout if 'verbose' is true). """ from distutils.util import grok_environment_error global _path_created - log.info("removing '%s' (and everything under it)", directory) + if verbose == 1: + log.info("removing '%s' (and everything under it)", directory) if dry_run: return cmdtuples = [] diff --git a/file_util.py b/file_util.py index 3af6344f11..82a8b0ad19 100644 --- a/file_util.py +++ b/file_util.py @@ -76,7 +76,7 @@ def copy_file (src, dst, preserve_times=1, update=0, link=None, - verbose=0, + verbose=1, dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is @@ -123,7 +123,8 @@ def copy_file (src, dst, dir = os.path.dirname(dst) if update and not newer(src, dst): - log.debug("not copying %s (output up-to-date)", src) + if verbose == 1: + log.debug("not copying %s (output up-to-date)", src) return dst, 0 try: @@ -131,10 +132,12 @@ def copy_file (src, dst, except KeyError: raise ValueError, \ "invalid value '%s' for 'link' argument" % link - if os.path.basename(dst) == os.path.basename(src): - log.info("%s %s -> %s", action, src, dir) - else: - log.info("%s %s -> %s", action, src, dst) + + if verbose == 1: + if os.path.basename(dst) == os.path.basename(src): + log.info("%s %s -> %s", action, src, dir) + else: + log.info("%s %s -> %s", action, src, dst) if dry_run: return (dst, 1) @@ -178,7 +181,7 @@ def copy_file (src, dst, # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, - verbose=0, + verbose=1, dry_run=0): """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will @@ -191,7 +194,8 @@ def move_file (src, dst, from os.path import exists, isfile, isdir, basename, dirname import errno - log.info("moving %s -> %s", src, dst) + if verbose == 1: + log.info("moving %s -> %s", src, dst) if dry_run: return dst @@ -223,7 +227,7 @@ def move_file (src, dst, "couldn't move '%s' to '%s': %s" % (src, dst, msg) if copy_it: - copy_file(src, dst) + copy_file(src, dst, verbose=verbose) try: os.unlink(src) except os.error, (num, msg): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py new file mode 100644 index 0000000000..edf93c40c5 --- /dev/null +++ b/tests/test_dir_util.py @@ -0,0 +1,91 @@ +"""Tests for distutils.dir_util.""" +import unittest +import os +import shutil + +from distutils.dir_util import mkpath +from distutils.dir_util import remove_tree +from distutils.dir_util import create_tree +from distutils.dir_util import copy_tree + +from distutils import log + +class DirUtilTestCase(unittest.TestCase): + + def _log(self, msg, *args): + if len(args) > 0: + self._logs.append(msg % args) + else: + self._logs.append(msg) + + def setUp(self): + self._logs = [] + self.root_target = os.path.join(os.path.dirname(__file__), 'deep') + self.target = os.path.join(self.root_target, 'here') + self.target2 = os.path.join(os.path.dirname(__file__), 'deep2') + self.old_log = log.info + log.info = self._log + + def tearDown(self): + for target in (self.target, self.target2): + if os.path.exists(target): + shutil.rmtree(target) + log.info = self.old_log + + def test_mkpath_remove_tree_verbosity(self): + + mkpath(self.target, verbose=0) + wanted = [] + self.assertEquals(self._logs, wanted) + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=1) + wanted = ['creating %s' % self.root_target, + 'creating %s' % self.target] + self.assertEquals(self._logs, wanted) + self._logs = [] + + remove_tree(self.root_target, verbose=1) + wanted = ["removing '%s' (and everything under it)" % self.root_target] + self.assertEquals(self._logs, wanted) + + def test_create_tree_verbosity(self): + + create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) + self.assertEquals(self._logs, []) + remove_tree(self.root_target, verbose=0) + + wanted = ['creating %s' % self.root_target] + create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) + self.assertEquals(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + + + def test_copy_tree_verbosity(self): + + mkpath(self.target, verbose=0) + + copy_tree(self.target, self.target2, verbose=0) + self.assertEquals(self._logs, []) + + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=0) + a_file = os.path.join(self.target, 'ok.txt') + f = open(a_file, 'w') + f.write('some content') + f.close() + + wanted = ['copying %s -> %s' % (a_file, self.target2)] + copy_tree(self.target, self.target2, verbose=1) + self.assertEquals(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + +def test_suite(): + return unittest.makeSuite(DirUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_file_util.py b/tests/test_file_util.py new file mode 100644 index 0000000000..523f1aef17 --- /dev/null +++ b/tests/test_file_util.py @@ -0,0 +1,66 @@ +"""Tests for distutils.file_util.""" +import unittest +import os +import shutil + +from distutils.file_util import move_file +from distutils import log + +class FileUtilTestCase(unittest.TestCase): + + def _log(self, msg, *args): + if len(args) > 0: + self._logs.append(msg % args) + else: + self._logs.append(msg) + + def setUp(self): + self._logs = [] + self.old_log = log.info + log.info = self._log + self.source = os.path.join(os.path.dirname(__file__), 'f1') + self.target = os.path.join(os.path.dirname(__file__), 'f2') + self.target_dir = os.path.join(os.path.dirname(__file__), 'd1') + + def tearDown(self): + log.info = self.old_log + for f in (self.source, self.target, self.target_dir): + if os.path.exists(f): + if os.path.isfile(f): + os.remove(f) + else: + shutil.rmtree(f) + + def test_move_file_verbosity(self): + + f = open(self.source, 'w') + f.write('some content') + f.close() + + move_file(self.source, self.target, verbose=0) + wanted = [] + self.assertEquals(self._logs, wanted) + + # back to original state + move_file(self.target, self.source, verbose=0) + + move_file(self.source, self.target, verbose=1) + wanted = ['moving %s -> %s' % (self.source, self.target)] + self.assertEquals(self._logs, wanted) + + # back to original state + move_file(self.target, self.source, verbose=0) + + self._logs = [] + # now the target is a dir + os.mkdir(self.target_dir) + move_file(self.source, self.target_dir, verbose=1) + wanted = ['moving %s -> %s' % (self.source, self.target_dir)] + self.assertEquals(self._logs, wanted) + + +def test_suite(): + return unittest.makeSuite(FileUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 96983b36bdea4053cc97656f1a6c10194a7f4fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:38:35 +0000 Subject: [PATCH 2112/8469] Merged revisions 69324 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69324 | tarek.ziade | 2009-02-06 01:31:59 +0100 (Fri, 06 Feb 2009) | 1 line Fixed #1276768: verbose option was not used in the code. ........ --- dir_util.py | 30 +++++++------- file_util.py | 22 ++++++---- tests/test_dir_util.py | 91 +++++++++++++++++++++++++++++++++++++++++ tests/test_file_util.py | 66 ++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+), 24 deletions(-) create mode 100644 tests/test_dir_util.py create mode 100644 tests/test_file_util.py diff --git a/dir_util.py b/dir_util.py index 1f0d49c25f..db754e5cec 100644 --- a/dir_util.py +++ b/dir_util.py @@ -15,7 +15,7 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0o777, verbose=0, dry_run=0): +def mkpath (name, mode=0o777, verbose=1, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do @@ -48,13 +48,9 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir(head): - #print "splitting '%s': " % head, (head, tail) = os.path.split(head) - #print "to ('%s','%s')" % (head, tail) tails.insert(0, tail) # push next higher dir onto stack - #print "stack of tails:", tails - # now 'head' contains the deepest directory that already exists # (that is, the child of 'head' in 'name' is the highest directory # that does *not* exist) @@ -66,7 +62,8 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): if _path_created.get(abs_head): continue - log.info("creating %s", head) + if verbose == 1: + log.info("creating %s", head) if not dry_run: try: @@ -82,7 +79,7 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0): # mkpath () -def create_tree (base_dir, files, mode=0o777, verbose=0, dry_run=0): +def create_tree (base_dir, files, mode=0o777, verbose=1, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. 'base_dir' is just the a name of a directory @@ -99,7 +96,7 @@ def create_tree (base_dir, files, mode=0o777, verbose=0, dry_run=0): # Now create them for dir in sorted(need_dir): - mkpath(dir, mode, dry_run=dry_run) + mkpath(dir, mode, verbose=verbose, dry_run=dry_run) # create_tree () @@ -109,7 +106,7 @@ def copy_tree (src, dst, preserve_times=1, preserve_symlinks=0, update=0, - verbose=0, + verbose=1, dry_run=0): """Copy an entire directory tree 'src' to a new location 'dst'. Both @@ -146,7 +143,7 @@ def copy_tree (src, dst, "error listing files in '%s': %s" % (src, errstr)) if not dry_run: - mkpath(dst) + mkpath(dst, verbose=verbose) outputs = [] @@ -156,7 +153,8 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) - log.info("linking %s -> %s", dst_name, link_dest) + if verbose == 1: + log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: os.symlink(link_dest, dst_name) outputs.append(dst_name) @@ -165,10 +163,11 @@ def copy_tree (src, dst, outputs.extend( copy_tree(src_name, dst_name, preserve_mode, preserve_times, preserve_symlinks, update, - dry_run=dry_run)) + verbose=verbose, dry_run=dry_run)) else: copy_file(src_name, dst_name, preserve_mode, - preserve_times, update, dry_run=dry_run) + preserve_times, update, verbose=verbose, + dry_run=dry_run) outputs.append(dst_name) return outputs @@ -184,14 +183,15 @@ def _build_cmdtuple(path, cmdtuples): cmdtuples.append((os.rmdir, path)) -def remove_tree (directory, verbose=0, dry_run=0): +def remove_tree (directory, verbose=1, dry_run=0): """Recursively remove an entire directory tree. Any errors are ignored (apart from being reported to stdout if 'verbose' is true). """ from distutils.util import grok_environment_error global _path_created - log.info("removing '%s' (and everything under it)", directory) + if verbose == 1: + log.info("removing '%s' (and everything under it)", directory) if dry_run: return cmdtuples = [] diff --git a/file_util.py b/file_util.py index b46b0da678..00c5bc5b8e 100644 --- a/file_util.py +++ b/file_util.py @@ -67,7 +67,7 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): fsrc.close() def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, - link=None, verbose=0, dry_run=0): + link=None, verbose=1, dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a filename. (If the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' @@ -112,17 +112,20 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, dir = os.path.dirname(dst) if update and not newer(src, dst): - log.debug("not copying %s (output up-to-date)", src) + if verbose == 1: + log.debug("not copying %s (output up-to-date)", src) return (dst, 0) try: action = _copy_action[link] except KeyError: raise ValueError("invalid value '%s' for 'link' argument" % link) - if os.path.basename(dst) == os.path.basename(src): - log.info("%s %s -> %s", action, src, dir) - else: - log.info("%s %s -> %s", action, src, dst) + + if verbose == 1: + if os.path.basename(dst) == os.path.basename(src): + log.info("%s %s -> %s", action, src, dir) + else: + log.info("%s %s -> %s", action, src, dst) if dry_run: return (dst, 1) @@ -164,7 +167,7 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, - verbose=0, + verbose=1, dry_run=0): """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will @@ -177,7 +180,8 @@ def move_file (src, dst, from os.path import exists, isfile, isdir, basename, dirname import errno - log.info("moving %s -> %s", src, dst) + if verbose == 1: + log.info("moving %s -> %s", src, dst) if dry_run: return dst @@ -209,7 +213,7 @@ def move_file (src, dst, "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: - copy_file(src, dst) + copy_file(src, dst, verbose=verbose) try: os.unlink(src) except os.error as e: diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py new file mode 100644 index 0000000000..edf93c40c5 --- /dev/null +++ b/tests/test_dir_util.py @@ -0,0 +1,91 @@ +"""Tests for distutils.dir_util.""" +import unittest +import os +import shutil + +from distutils.dir_util import mkpath +from distutils.dir_util import remove_tree +from distutils.dir_util import create_tree +from distutils.dir_util import copy_tree + +from distutils import log + +class DirUtilTestCase(unittest.TestCase): + + def _log(self, msg, *args): + if len(args) > 0: + self._logs.append(msg % args) + else: + self._logs.append(msg) + + def setUp(self): + self._logs = [] + self.root_target = os.path.join(os.path.dirname(__file__), 'deep') + self.target = os.path.join(self.root_target, 'here') + self.target2 = os.path.join(os.path.dirname(__file__), 'deep2') + self.old_log = log.info + log.info = self._log + + def tearDown(self): + for target in (self.target, self.target2): + if os.path.exists(target): + shutil.rmtree(target) + log.info = self.old_log + + def test_mkpath_remove_tree_verbosity(self): + + mkpath(self.target, verbose=0) + wanted = [] + self.assertEquals(self._logs, wanted) + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=1) + wanted = ['creating %s' % self.root_target, + 'creating %s' % self.target] + self.assertEquals(self._logs, wanted) + self._logs = [] + + remove_tree(self.root_target, verbose=1) + wanted = ["removing '%s' (and everything under it)" % self.root_target] + self.assertEquals(self._logs, wanted) + + def test_create_tree_verbosity(self): + + create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) + self.assertEquals(self._logs, []) + remove_tree(self.root_target, verbose=0) + + wanted = ['creating %s' % self.root_target] + create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) + self.assertEquals(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + + + def test_copy_tree_verbosity(self): + + mkpath(self.target, verbose=0) + + copy_tree(self.target, self.target2, verbose=0) + self.assertEquals(self._logs, []) + + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=0) + a_file = os.path.join(self.target, 'ok.txt') + f = open(a_file, 'w') + f.write('some content') + f.close() + + wanted = ['copying %s -> %s' % (a_file, self.target2)] + copy_tree(self.target, self.target2, verbose=1) + self.assertEquals(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + +def test_suite(): + return unittest.makeSuite(DirUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_file_util.py b/tests/test_file_util.py new file mode 100644 index 0000000000..523f1aef17 --- /dev/null +++ b/tests/test_file_util.py @@ -0,0 +1,66 @@ +"""Tests for distutils.file_util.""" +import unittest +import os +import shutil + +from distutils.file_util import move_file +from distutils import log + +class FileUtilTestCase(unittest.TestCase): + + def _log(self, msg, *args): + if len(args) > 0: + self._logs.append(msg % args) + else: + self._logs.append(msg) + + def setUp(self): + self._logs = [] + self.old_log = log.info + log.info = self._log + self.source = os.path.join(os.path.dirname(__file__), 'f1') + self.target = os.path.join(os.path.dirname(__file__), 'f2') + self.target_dir = os.path.join(os.path.dirname(__file__), 'd1') + + def tearDown(self): + log.info = self.old_log + for f in (self.source, self.target, self.target_dir): + if os.path.exists(f): + if os.path.isfile(f): + os.remove(f) + else: + shutil.rmtree(f) + + def test_move_file_verbosity(self): + + f = open(self.source, 'w') + f.write('some content') + f.close() + + move_file(self.source, self.target, verbose=0) + wanted = [] + self.assertEquals(self._logs, wanted) + + # back to original state + move_file(self.target, self.source, verbose=0) + + move_file(self.source, self.target, verbose=1) + wanted = ['moving %s -> %s' % (self.source, self.target)] + self.assertEquals(self._logs, wanted) + + # back to original state + move_file(self.target, self.source, verbose=0) + + self._logs = [] + # now the target is a dir + os.mkdir(self.target_dir) + move_file(self.source, self.target_dir, verbose=1) + wanted = ['moving %s -> %s' % (self.source, self.target_dir)] + self.assertEquals(self._logs, wanted) + + +def test_suite(): + return unittest.makeSuite(FileUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From f5de94cd2bf6253c15fdea5a9963847476c7233d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:46:57 +0000 Subject: [PATCH 2113/8469] README now reflects the current state --- README | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README b/README index 45c7ca8ca9..23f488506f 100644 --- a/README +++ b/README @@ -1,22 +1,11 @@ -This directory contains only a subset of the Distutils, specifically -the Python modules in the 'distutils' and 'distutils.command' -packages. This is all you need to distribute and install Python -modules using the Distutils. There is also a separately packaged -standalone version of the Distutils available for people who want to -upgrade the Distutils without upgrading Python, available from the -Distutils web page: +This directory contains the Distutils package. - http://www.python.org/sigs/distutils-sig/ +There's a full documentation available at: -The standalone version includes all of the code in this directory, -plus documentation, test scripts, examples, etc. + http://docs.python.org/distutils/ -The Distutils documentation is divided into two documents, "Installing -Python Modules", which explains how to install Python packages, and -"Distributing Python Modules", which explains how to write setup.py -files. Both documents are part of the standard Python documentation -set, and are available from http://www.python.org/doc/current/ . +The Distutils-SIG web page is also a good starting point: - Greg Ward (gward@python.net) + http://www.python.org/sigs/distutils-sig/ $Id$ From cbed4405dbe59d12aa1dbaea1437beff6709235a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:49:45 +0000 Subject: [PATCH 2114/8469] using >= so setting verbose to 2 will work as well --- dir_util.py | 6 +++--- file_util.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dir_util.py b/dir_util.py index 6d896ee408..5a134408fd 100644 --- a/dir_util.py +++ b/dir_util.py @@ -63,7 +63,7 @@ def mkpath (name, mode=0777, verbose=1, dry_run=0): if _path_created.get(abs_head): continue - if verbose == 1: + if verbose >= 1: log.info("creating %s", head) if not dry_run: @@ -155,7 +155,7 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) - if verbose == 1: + if verbose >= 1: log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: os.symlink(link_dest, dst_name) @@ -194,7 +194,7 @@ def remove_tree (directory, verbose=1, dry_run=0): from distutils.util import grok_environment_error global _path_created - if verbose == 1: + if verbose >= 1: log.info("removing '%s' (and everything under it)", directory) if dry_run: return diff --git a/file_util.py b/file_util.py index 82a8b0ad19..0c890559ee 100644 --- a/file_util.py +++ b/file_util.py @@ -123,7 +123,7 @@ def copy_file (src, dst, dir = os.path.dirname(dst) if update and not newer(src, dst): - if verbose == 1: + if verbose >= 1: log.debug("not copying %s (output up-to-date)", src) return dst, 0 @@ -133,7 +133,7 @@ def copy_file (src, dst, raise ValueError, \ "invalid value '%s' for 'link' argument" % link - if verbose == 1: + if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): log.info("%s %s -> %s", action, src, dir) else: @@ -194,7 +194,7 @@ def move_file (src, dst, from os.path import exists, isfile, isdir, basename, dirname import errno - if verbose == 1: + if verbose >= 1: log.info("moving %s -> %s", src, dst) if dry_run: From 24ce784984a61381cdc39cb0ed3f3d9cfe38439b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:52:52 +0000 Subject: [PATCH 2115/8469] Merged revisions 69330 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69330 | tarek.ziade | 2009-02-06 01:46:57 +0100 (Fri, 06 Feb 2009) | 1 line README now reflects the current state ........ --- README | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README b/README index 45c7ca8ca9..23f488506f 100644 --- a/README +++ b/README @@ -1,22 +1,11 @@ -This directory contains only a subset of the Distutils, specifically -the Python modules in the 'distutils' and 'distutils.command' -packages. This is all you need to distribute and install Python -modules using the Distutils. There is also a separately packaged -standalone version of the Distutils available for people who want to -upgrade the Distutils without upgrading Python, available from the -Distutils web page: +This directory contains the Distutils package. - http://www.python.org/sigs/distutils-sig/ +There's a full documentation available at: -The standalone version includes all of the code in this directory, -plus documentation, test scripts, examples, etc. + http://docs.python.org/distutils/ -The Distutils documentation is divided into two documents, "Installing -Python Modules", which explains how to install Python packages, and -"Distributing Python Modules", which explains how to write setup.py -files. Both documents are part of the standard Python documentation -set, and are available from http://www.python.org/doc/current/ . +The Distutils-SIG web page is also a good starting point: - Greg Ward (gward@python.net) + http://www.python.org/sigs/distutils-sig/ $Id$ From b01bd4697af5320818653fc06a17fde9a7770a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 00:53:43 +0000 Subject: [PATCH 2116/8469] Merged revisions 69332 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69332 | tarek.ziade | 2009-02-06 01:49:45 +0100 (Fri, 06 Feb 2009) | 1 line using >= so setting verbose to 2 will work as well ........ --- dir_util.py | 6 +++--- file_util.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dir_util.py b/dir_util.py index db754e5cec..ed54ccefd4 100644 --- a/dir_util.py +++ b/dir_util.py @@ -62,7 +62,7 @@ def mkpath (name, mode=0o777, verbose=1, dry_run=0): if _path_created.get(abs_head): continue - if verbose == 1: + if verbose >= 1: log.info("creating %s", head) if not dry_run: @@ -153,7 +153,7 @@ def copy_tree (src, dst, if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) - if verbose == 1: + if verbose >= 1: log.info("linking %s -> %s", dst_name, link_dest) if not dry_run: os.symlink(link_dest, dst_name) @@ -190,7 +190,7 @@ def remove_tree (directory, verbose=1, dry_run=0): from distutils.util import grok_environment_error global _path_created - if verbose == 1: + if verbose >= 1: log.info("removing '%s' (and everything under it)", directory) if dry_run: return diff --git a/file_util.py b/file_util.py index 00c5bc5b8e..65aa7e0fdd 100644 --- a/file_util.py +++ b/file_util.py @@ -112,7 +112,7 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, dir = os.path.dirname(dst) if update and not newer(src, dst): - if verbose == 1: + if verbose >= 1: log.debug("not copying %s (output up-to-date)", src) return (dst, 0) @@ -121,7 +121,7 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, except KeyError: raise ValueError("invalid value '%s' for 'link' argument" % link) - if verbose == 1: + if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): log.info("%s %s -> %s", action, src, dir) else: @@ -180,7 +180,7 @@ def move_file (src, dst, from os.path import exists, isfile, isdir, basename, dirname import errno - if verbose == 1: + if verbose >= 1: log.info("moving %s -> %s", src, dst) if dry_run: From 4ca827a930005d5a11aa21c4ee89374398c1baa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 01:15:51 +0000 Subject: [PATCH 2117/8469] fixed #1520877: now distutils reads Read from the environment/Makefile --- sysconfig.py | 9 ++++++--- tests/test_sysconfig.py | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index ec2f8a9c33..deb51a1c1a 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -165,9 +165,9 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO') + 'CCSHARED', 'LDSHARED', 'SO', 'AR') if 'CC' in os.environ: cc = os.environ['CC'] @@ -188,6 +188,8 @@ def customize_compiler(compiler): cpp = cpp + ' ' + os.environ['CPPFLAGS'] cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] cc_cmd = cc + ' ' + cflags compiler.set_executables( @@ -196,7 +198,8 @@ def customize_compiler(compiler): compiler_so=cc_cmd + ' ' + ccshared, compiler_cxx=cxx, linker_so=ldshared, - linker_exe=cc) + linker_exe=cc, + archiver=ar) compiler.shared_lib_extension = so_ext diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 397bb12cfc..7f0bce63c9 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -8,6 +8,13 @@ class SysconfigTestCase(unittest.TestCase): + def setUp(self): + self.old_AR = os.environ.get('AR') + + def tearDown(self): + if self.old_AR is not None: + os.environ['AR'] = self.old_AR + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assert_(os.path.isfile(config_h), config_h) @@ -32,6 +39,21 @@ def test_get_config_vars(self): self.assert_(isinstance(cvars, dict)) self.assert_(cvars) + def test_customize_compiler(self): + + os.environ['AR'] = 'xxx' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + sysconfig.customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'xxx') + def test_suite(): suite = unittest.TestSuite() From 6512d9fd3c7bf335a66ba8338956f3f545a9999c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 01:18:36 +0000 Subject: [PATCH 2118/8469] Merged revisions 69342 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69342 | tarek.ziade | 2009-02-06 02:15:51 +0100 (Fri, 06 Feb 2009) | 1 line fixed #1520877: now distutils reads Read from the environment/Makefile ........ --- sysconfig.py | 9 ++++++--- tests/test_sysconfig.py | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index de8c5fccd6..386ae89b83 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -160,9 +160,9 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO') + 'CCSHARED', 'LDSHARED', 'SO', 'AR') if 'CC' in os.environ: cc = os.environ['CC'] @@ -183,6 +183,8 @@ def customize_compiler(compiler): cpp = cpp + ' ' + os.environ['CPPFLAGS'] cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] cc_cmd = cc + ' ' + cflags compiler.set_executables( @@ -191,7 +193,8 @@ def customize_compiler(compiler): compiler_so=cc_cmd + ' ' + ccshared, compiler_cxx=cxx, linker_so=ldshared, - linker_exe=cc) + linker_exe=cc, + archiver=ar) compiler.shared_lib_extension = so_ext diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 490410e126..cb802c62db 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -8,6 +8,13 @@ class SysconfigTestCase(unittest.TestCase): + def setUp(self): + self.old_AR = os.environ.get('AR') + + def tearDown(self): + if self.old_AR is not None: + os.environ['AR'] = self.old_AR + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assert_(os.path.isfile(config_h), config_h) @@ -32,6 +39,21 @@ def test_get_config_vars(self): self.assert_(isinstance(cvars, dict)) self.assert_(cvars) + def test_customize_compiler(self): + + os.environ['AR'] = 'xxx' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + sysconfig.customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'xxx') + def test_suite(): suite = unittest.TestSuite() From bd73f62c8e0bd56c41e540072a6ed1a0fff7cbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 08:20:15 +0000 Subject: [PATCH 2119/8469] Fixed #3987 : removed unused import --- core.py | 1 - 1 file changed, 1 deletion(-) diff --git a/core.py b/core.py index 0e85ca6f06..0fb6f81efb 100644 --- a/core.py +++ b/core.py @@ -9,7 +9,6 @@ __revision__ = "$Id$" import sys, os -from types import * from distutils.debug import DEBUG from distutils.errors import * From 7f0b8ac04611f305e08185605d5be2825a7ee897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 08:55:23 +0000 Subject: [PATCH 2120/8469] removed types usage and added test coverage (work for #3986) --- cmd.py | 22 +++++++++++++--------- tests/test_cmd.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 tests/test_cmd.py diff --git a/cmd.py b/cmd.py index 267cf1802e..2d6cfb187b 100644 --- a/cmd.py +++ b/cmd.py @@ -7,8 +7,7 @@ __revision__ = "$Id$" import sys, os, string, re -from types import * -from distutils.errors import * +from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log @@ -220,7 +219,7 @@ def _ensure_stringlike (self, option, what, default=None): if val is None: setattr(self, option, default) return default - elif type(val) is not StringType: + elif not isinstance(val, str): raise DistutilsOptionError, \ "'%s' must be a %s (got `%s`)" % (option, what, val) return val @@ -240,19 +239,24 @@ def ensure_string_list (self, option): val = getattr(self, option) if val is None: return - elif type(val) is StringType: + elif isinstance(val, str): setattr(self, option, re.split(r',\s*|\s+', val)) else: - if type(val) is ListType: - types = map(type, val) - ok = (types == [StringType] * len(val)) + if isinstance(val, list): + # checks if all elements are str + ok = 1 + for element in val: + if not isinstance(element, str): + ok = 0 + break else: ok = 0 if not ok: raise DistutilsOptionError, \ - "'%s' must be a list of strings (got %r)" % \ - (option, val) + "'%s' must be a list of strings (got %r)" % \ + (option, val) + def _ensure_tested_string (self, option, tester, what, error_fmt, default=None): diff --git a/tests/test_cmd.py b/tests/test_cmd.py new file mode 100644 index 0000000000..19079c033f --- /dev/null +++ b/tests/test_cmd.py @@ -0,0 +1,38 @@ +"""Tests for distutils.cmd.""" +import unittest + +from distutils.cmd import Command +from distutils.dist import Distribution +from distutils.errors import DistutilsOptionError + +class CommandTestCase(unittest.TestCase): + + def test_ensure_string_list(self): + + class MyCmd(Command): + + def initialize_options(self): + pass + + dist = Distribution() + cmd = MyCmd(dist) + + cmd.not_string_list = ['one', 2, 'three'] + cmd.yes_string_list = ['one', 'two', 'three'] + cmd.not_string_list2 = object() + cmd.yes_string_list2 = 'ok' + + cmd.ensure_string_list('yes_string_list') + cmd.ensure_string_list('yes_string_list2') + + self.assertRaises(DistutilsOptionError, + cmd.ensure_string_list, 'not_string_list') + + self.assertRaises(DistutilsOptionError, + cmd.ensure_string_list, 'not_string_list2') + +def test_suite(): + return unittest.makeSuite(CommandTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 296683d31be7741dbd12ab7ffcc2b8575564b540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 09:03:10 +0000 Subject: [PATCH 2121/8469] Merged revisions 69360 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69360 | tarek.ziade | 2009-02-06 09:55:23 +0100 (Fri, 06 Feb 2009) | 1 line removed types usage and added test coverage (work for #3986) ........ --- cmd.py | 2 +- tests/test_cmd.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/test_cmd.py diff --git a/cmd.py b/cmd.py index c6572caa5f..4669dc2d97 100644 --- a/cmd.py +++ b/cmd.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" import sys, os, re -from distutils.errors import * +from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log diff --git a/tests/test_cmd.py b/tests/test_cmd.py new file mode 100644 index 0000000000..19079c033f --- /dev/null +++ b/tests/test_cmd.py @@ -0,0 +1,38 @@ +"""Tests for distutils.cmd.""" +import unittest + +from distutils.cmd import Command +from distutils.dist import Distribution +from distutils.errors import DistutilsOptionError + +class CommandTestCase(unittest.TestCase): + + def test_ensure_string_list(self): + + class MyCmd(Command): + + def initialize_options(self): + pass + + dist = Distribution() + cmd = MyCmd(dist) + + cmd.not_string_list = ['one', 2, 'three'] + cmd.yes_string_list = ['one', 'two', 'three'] + cmd.not_string_list2 = object() + cmd.yes_string_list2 = 'ok' + + cmd.ensure_string_list('yes_string_list') + cmd.ensure_string_list('yes_string_list2') + + self.assertRaises(DistutilsOptionError, + cmd.ensure_string_list, 'not_string_list') + + self.assertRaises(DistutilsOptionError, + cmd.ensure_string_list, 'not_string_list2') + +def test_suite(): + return unittest.makeSuite(CommandTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 1db73ee62c96d75e13a8740fe35642ea7a8ac9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 13:27:38 +0000 Subject: [PATCH 2122/8469] Fixed #5167: test_customize_compiler does not apply under non unix compilers --- tests/test_sysconfig.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 7f0bce63c9..4636c0c127 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,6 +1,8 @@ """Tests for distutils.dist.""" from distutils import sysconfig +from distutils.ccompiler import get_default_compiler + import os import unittest @@ -41,6 +43,10 @@ def test_get_config_vars(self): def test_customize_compiler(self): + # not testing if default compiler is not unix + if get_default_compiler() != 'unix': + return + os.environ['AR'] = 'xxx' # make sure AR gets caught From 04e222bc312426aa74df95a63623691e07324ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 6 Feb 2009 13:33:47 +0000 Subject: [PATCH 2123/8469] Merged revisions 69366 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69366 | tarek.ziade | 2009-02-06 14:27:38 +0100 (Fri, 06 Feb 2009) | 1 line Fixed #5167: test_customize_compiler does not apply under non unix compilers ........ --- tests/test_sysconfig.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index cb802c62db..af6f183097 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,6 +1,8 @@ """Tests for distutils.dist.""" from distutils import sysconfig +from distutils.ccompiler import get_default_compiler + import os import unittest @@ -41,6 +43,10 @@ def test_get_config_vars(self): def test_customize_compiler(self): + # not testing if default compiler is not unix + if get_default_compiler() != 'unix': + return + os.environ['AR'] = 'xxx' # make sure AR gets caught From ecaef925f14658bfbfc9d7ad6df97ec35a7b0591 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Fri, 6 Feb 2009 21:33:45 +0000 Subject: [PATCH 2124/8469] Convert "srcdir" into an absolute path if that seems prudent. Currrently the only user of this is Lib/distutils/tests/test_build_ext.py (in order to find the source for xxmodule.c). I'm not sure if other platforms need similar tweaks, I'm not brave enough to attempt it without being able to test. --- sysconfig.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index deb51a1c1a..4e06546acd 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -530,6 +530,20 @@ def get_config_vars(*args): if 'srcdir' not in _config_vars: _config_vars['srcdir'] = project_base + # Convert srcdir into an absolute path if it appears necessary. + # Normally it is relative to the build directory. However, during + # testing, for example, we might be running a non-installed python + # from a different directory. + if python_build and os.name == "posix": + base = os.path.dirname(os.path.abspath(sys.executable)) + if (not os.path.isabs(_config_vars['srcdir']) and + base != os.getcwd()): + # srcdir is relative and we are not in the same directory + # as the executable. Assume executable is in the build + # directory and make srcdir absolute. + srcdir = os.path.join(base, _config_vars['srcdir']) + _config_vars['srcdir'] = os.path.normpath(srcdir) + if sys.platform == 'darwin': kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) From a719c0dc5cddc1cab0881c42889ad3df0b0dfcbd Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Fri, 6 Feb 2009 21:42:05 +0000 Subject: [PATCH 2125/8469] Make test_build_ext.py use sysconfig "srcdir" to find the source for xxmodule.c. Have sysconfig make the srcdir path absolute if that seems necessary (running non-installed Python outside the build directory). --- sysconfig.py | 14 ++++++++++++++ tests/test_build_ext.py | 14 +++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 386ae89b83..a3ef3f6d88 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -504,6 +504,20 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + # Convert srcdir into an absolute path if it appears necessary. + # Normally it is relative to the build directory. However, during + # testing, for example, we might be running a non-installed python + # from a different directory. + if python_build and os.name == "posix": + base = os.path.dirname(os.path.abspath(sys.executable)) + if (not os.path.isabs(_config_vars['srcdir']) and + base != os.getcwd()): + # srcdir is relative and we are not in the same directory + # as the executable. Assume executable is in the build + # directory and make srcdir absolute. + srcdir = os.path.join(base, _config_vars['srcdir']) + _config_vars['srcdir'] = os.path.normpath(srcdir) + if sys.platform == 'darwin': kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4c5723255a..5e42943c38 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -15,6 +15,10 @@ # Don't load the xx module more than once. ALREADY_TESTED = False +def _get_source_filename(): + srcdir = sysconfig.get_config_var('srcdir') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') + class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment @@ -22,9 +26,7 @@ def setUp(self): self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) - - xx_c = os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') - shutil.copy(xx_c, self.tmp_dir) + shutil.copy(_get_source_filename(), self.tmp_dir) def test_build_ext(self): global ALREADY_TESTED @@ -97,9 +99,11 @@ def test_solaris_enable_shared(self): self.assert_(len(cmd.library_dirs) > 0) def test_suite(): - if not sysconfig.python_build: + src = _get_source_filename() + if not os.path.exists(src): if support.verbose: - print('test_build_ext: The test must be run in a python build dir') + print('test_build_ext: Cannot find source code (test' + ' must run in python build dir)') return unittest.TestSuite() else: return unittest.makeSuite(BuildExtTestCase) From d3802bd0332d6e460e0db6a66a230c261529bf09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 7 Feb 2009 00:05:39 +0000 Subject: [PATCH 2126/8469] #3986 replacing string and types call (like in the Py3k branch), and put exec_msg call at the right place --- cmd.py | 30 ++++++++++++++--------------- tests/test_cmd.py | 49 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 24 deletions(-) diff --git a/cmd.py b/cmd.py index 2d6cfb187b..1351f445c3 100644 --- a/cmd.py +++ b/cmd.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log @@ -156,19 +156,19 @@ def finalize_options (self): "abstract method -- subclass %s must override" % self.__class__ - def dump_options (self, header=None, indent=""): + def dump_options(self, header=None, indent=""): from distutils.fancy_getopt import longopt_xlate if header is None: header = "command options for '%s':" % self.get_command_name() - print indent + header + self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: - option = string.translate(option, longopt_xlate) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) - print indent + "%s = %s" % (option, value) - + self.announce(indent + "%s = %s" % (option, value), + level=log.INFO) def run (self): """A command's raison d'etre: carry out the action it exists to @@ -405,8 +405,8 @@ def make_archive (self, base_name, format, base_name, format, root_dir, base_dir, dry_run=self.dry_run) - def make_file (self, infiles, outfile, func, args, - exec_msg=None, skip_msg=None, level=1): + def make_file(self, infiles, outfile, func, args, + exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different @@ -415,24 +415,24 @@ def make_file (self, infiles, outfile, func, args, and it is true, then the command is unconditionally run -- does no timestamp checks. """ - if exec_msg is None: - exec_msg = "generating %s from %s" % \ - (outfile, string.join(infiles, ', ')) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile - # Allow 'infiles' to be a single string - if type(infiles) is StringType: + if isinstance(infiles, str): infiles = (infiles,) - elif type(infiles) not in (ListType, TupleType): + elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" + if exec_msg is None: + exec_msg = "generating %s from %s" % \ + (outfile, ', '.join(infiles)) + # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if self.force or dep_util.newer_group (infiles, outfile): + if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 19079c033f..a252c355e7 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -5,23 +5,23 @@ from distutils.dist import Distribution from distutils.errors import DistutilsOptionError -class CommandTestCase(unittest.TestCase): - - def test_ensure_string_list(self): - - class MyCmd(Command): +class MyCmd(Command): + def initialize_options(self): + pass - def initialize_options(self): - pass +class CommandTestCase(unittest.TestCase): + def setUp(self): dist = Distribution() - cmd = MyCmd(dist) + self.cmd = MyCmd(dist) + + def test_ensure_string_list(self): + cmd = self.cmd cmd.not_string_list = ['one', 2, 'three'] cmd.yes_string_list = ['one', 'two', 'three'] cmd.not_string_list2 = object() cmd.yes_string_list2 = 'ok' - cmd.ensure_string_list('yes_string_list') cmd.ensure_string_list('yes_string_list2') @@ -31,6 +31,37 @@ def initialize_options(self): self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, 'not_string_list2') + def test_make_file(self): + + cmd = self.cmd + + # making sure it raises when infiles is not a string or a list/tuple + self.assertRaises(TypeError, cmd.make_file, + infiles=1, outfile='', func='func', args=()) + + # making sure execute gets called properly + def _execute(func, args, exec_msg, level): + self.assertEquals(exec_msg, 'generating out from in') + cmd.force = True + cmd.execute = _execute + cmd.make_file(infiles='in', outfile='out', func='func', args=()) + + def test_dump_options(self): + + msgs = [] + def _announce(msg, level): + msgs.append(msg) + cmd = self.cmd + cmd.announce = _announce + cmd.option1 = 1 + cmd.option2 = 1 + cmd.user_options = [('option1', '', ''), ('option2', '', '')] + cmd.dump_options() + + wanted = ["command options for 'MyCmd':", ' option1 = 1', + ' option2 = 1'] + self.assertEquals(msgs, wanted) + def test_suite(): return unittest.makeSuite(CommandTestCase) From 27713a8ca68d6cd642e8fbf239d763fbf9571a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 7 Feb 2009 00:10:48 +0000 Subject: [PATCH 2127/8469] Merged revisions 69385 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69385 | tarek.ziade | 2009-02-07 01:05:39 +0100 (Sat, 07 Feb 2009) | 1 line #3986 replacing string and types call (like in the Py3k branch), and put exec_msg call at the right place ........ --- cmd.py | 14 +++++++------- tests/test_cmd.py | 49 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/cmd.py b/cmd.py index 4669dc2d97..295c914032 100644 --- a/cmd.py +++ b/cmd.py @@ -155,15 +155,15 @@ def dump_options(self, header=None, indent=""): from distutils.fancy_getopt import longopt_xlate if header is None: header = "command options for '%s':" % self.get_command_name() - print(indent + header) + self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: option = longopt_xlate(option) if option[-1] == "=": option = option[:-1] value = getattr(self, option) - print(indent + "%s = %s" % (option, value)) - + self.announce(indent + "%s = %s" % (option, value), + level=log.INFO) def run(self): """A command's raison d'etre: carry out the action it exists to @@ -383,12 +383,9 @@ def make_file(self, infiles, outfile, func, args, and it is true, then the command is unconditionally run -- does no timestamp checks. """ - if exec_msg is None: - exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) if skip_msg is None: skip_msg = "skipping %s (inputs unchanged)" % outfile - # Allow 'infiles' to be a single string if isinstance(infiles, str): infiles = (infiles,) @@ -396,10 +393,13 @@ def make_file(self, infiles, outfile, func, args, raise TypeError( "'infiles' must be a string, or a list or tuple of strings") + if exec_msg is None: + exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) + # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then # perform the action that presumably regenerates it - if self.force or dep_util.newer_group (infiles, outfile): + if self.force or dep_util.newer_group(infiles, outfile): self.execute(func, args, exec_msg, level) # Otherwise, print the "skip" message else: diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 19079c033f..a252c355e7 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -5,23 +5,23 @@ from distutils.dist import Distribution from distutils.errors import DistutilsOptionError -class CommandTestCase(unittest.TestCase): - - def test_ensure_string_list(self): - - class MyCmd(Command): +class MyCmd(Command): + def initialize_options(self): + pass - def initialize_options(self): - pass +class CommandTestCase(unittest.TestCase): + def setUp(self): dist = Distribution() - cmd = MyCmd(dist) + self.cmd = MyCmd(dist) + + def test_ensure_string_list(self): + cmd = self.cmd cmd.not_string_list = ['one', 2, 'three'] cmd.yes_string_list = ['one', 'two', 'three'] cmd.not_string_list2 = object() cmd.yes_string_list2 = 'ok' - cmd.ensure_string_list('yes_string_list') cmd.ensure_string_list('yes_string_list2') @@ -31,6 +31,37 @@ def initialize_options(self): self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, 'not_string_list2') + def test_make_file(self): + + cmd = self.cmd + + # making sure it raises when infiles is not a string or a list/tuple + self.assertRaises(TypeError, cmd.make_file, + infiles=1, outfile='', func='func', args=()) + + # making sure execute gets called properly + def _execute(func, args, exec_msg, level): + self.assertEquals(exec_msg, 'generating out from in') + cmd.force = True + cmd.execute = _execute + cmd.make_file(infiles='in', outfile='out', func='func', args=()) + + def test_dump_options(self): + + msgs = [] + def _announce(msg, level): + msgs.append(msg) + cmd = self.cmd + cmd.announce = _announce + cmd.option1 = 1 + cmd.option2 = 1 + cmd.user_options = [('option1', '', ''), ('option2', '', '')] + cmd.dump_options() + + wanted = ["command options for 'MyCmd':", ' option1 = 1', + ' option2 = 1'] + self.assertEquals(msgs, wanted) + def test_suite(): return unittest.makeSuite(CommandTestCase) From 9ab19ddedbd4daab9af83c485e616857950ab225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 10 Feb 2009 12:31:09 +0000 Subject: [PATCH 2128/8469] Fixed #3386: the optional prefix argument was ignored under OS2 and NT in distutils.sysconfig.get_python_lib --- sysconfig.py | 6 +++--- tests/test_sysconfig.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 4e06546acd..56cb861a6c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -132,7 +132,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if get_python_version() < "2.2": return prefix else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") elif os.name == "mac": if plat_specific: @@ -148,9 +148,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): elif os.name == "os2": if standard_lib: - return os.path.join(PREFIX, "Lib") + return os.path.join(prefix, "Lib") else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 4636c0c127..dd17eb347f 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -26,6 +26,8 @@ def test_get_python_lib(self): # XXX doesn't work on Linux when Python was never installed before #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? + self.assertNotEqual(sysconfig.get_python_lib(), + sysconfig.get_python_lib(prefix=TESTFN)) def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() From e21451406ffc2771198edca9bce2e5d5f570847d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 10 Feb 2009 12:33:42 +0000 Subject: [PATCH 2129/8469] Merged revisions 69485 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69485 | tarek.ziade | 2009-02-10 13:31:09 +0100 (Tue, 10 Feb 2009) | 1 line Fixed #3386: the optional prefix argument was ignored under OS2 and NT in distutils.sysconfig.get_python_lib ........ --- sysconfig.py | 6 +++--- tests/test_sysconfig.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 9993fba1ab..615da07e99 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -129,7 +129,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if get_python_version() < "2.2": return prefix else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") elif os.name == "mac": if plat_specific: @@ -145,9 +145,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): elif os.name == "os2": if standard_lib: - return os.path.join(PREFIX, "Lib") + return os.path.join(prefix, "Lib") else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index aa1187e77b..9f820575ab 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -17,6 +17,8 @@ def test_get_python_lib(self): # XXX doesn't work on Linux when Python was never installed before #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? + self.assertNotEqual(sysconfig.get_python_lib(), + sysconfig.get_python_lib(prefix=TESTFN)) def test_get_python_inc(self): # The check for srcdir is copied from Python's setup.py, From a80b2645dfdc8e78856c0328942a46828e0d7de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 10 Feb 2009 12:36:33 +0000 Subject: [PATCH 2130/8469] Merged revisions 69485 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69485 | tarek.ziade | 2009-02-10 13:31:09 +0100 (Tue, 10 Feb 2009) | 1 line Fixed #3386: the optional prefix argument was ignored under OS2 and NT in distutils.sysconfig.get_python_lib ........ --- sysconfig.py | 6 +++--- tests/test_sysconfig.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index a3ef3f6d88..fbeb45f8cc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -130,7 +130,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if get_python_version() < "2.2": return prefix else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") elif os.name == "mac": if plat_specific: if standard_lib: @@ -144,9 +144,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return os.path.join(prefix, "Lib", "site-packages") elif os.name == "os2": if standard_lib: - return os.path.join(PREFIX, "Lib") + return os.path.join(prefix, "Lib") else: - return os.path.join(PREFIX, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( "I don't know where Python installs its library " diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index af6f183097..1e9dbd542f 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -26,6 +26,8 @@ def test_get_python_lib(self): # XXX doesn't work on Linux when Python was never installed before #self.assert_(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? + self.assertNotEqual(sysconfig.get_python_lib(), + sysconfig.get_python_lib(prefix=TESTFN)) def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() From 99ce57fa1abba2aa6aa7dc3f49d08ff11338e624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 12 Feb 2009 20:56:21 +0000 Subject: [PATCH 2131/8469] fixing the leak introduced in r69304 --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 780660da85..1891e682bc 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,6 +1,5 @@ import sys import os -import tempfile import shutil from StringIO import StringIO @@ -19,7 +18,8 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') + os.mkdir(self.tmp_dir) self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) From 87c31b7e90c7799d4215ba2e59c503419e4052ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 12 Feb 2009 21:00:18 +0000 Subject: [PATCH 2132/8469] Merged revisions 69551 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69551 | tarek.ziade | 2009-02-12 21:56:21 +0100 (Thu, 12 Feb 2009) | 1 line fixing the leak introduced in r69304 ........ --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d0cce9ba1a..00630ab908 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,6 +1,5 @@ import sys import os -import tempfile import shutil from StringIO import StringIO @@ -15,7 +14,8 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') + os.mkdir(self.tmp_dir) self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) From f2c97b50ebcf21d37019bf8c1121d2e5e05597b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 12 Feb 2009 21:02:07 +0000 Subject: [PATCH 2133/8469] Merged revisions 69551 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69551 | tarek.ziade | 2009-02-12 21:56:21 +0100 (Thu, 12 Feb 2009) | 1 line fixing the leak introduced in r69304 ........ --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5e42943c38..aa5378c41a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,6 +1,5 @@ import sys import os -import tempfile import shutil from io import StringIO @@ -23,7 +22,8 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') + os.mkdir(self.tmp_dir) self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) From 456ea0886e7494aec1cf4f9ef765c2be6f8a5151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 16:13:16 +0000 Subject: [PATCH 2134/8469] reverted leak fix, to use the one done in py3k branch (r67382) --- tests/test_build_ext.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 1891e682bc..3c7d228da7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,5 +1,6 @@ import sys import os +import tempfile import shutil from StringIO import StringIO @@ -10,6 +11,10 @@ import unittest from test import test_support +# http://bugs.python.org/issue4373 +# Don't load the xx module more than once. +ALREADY_TESTED = False + def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -18,13 +23,13 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') - os.mkdir(self.tmp_dir) + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) def test_build_ext(self): + global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) @@ -47,6 +52,11 @@ def test_build_ext(self): finally: sys.stdout = old_stdout + if ALREADY_TESTED: + return + else: + ALREADY_TESTED = True + import xx for attr in ('error', 'foo', 'new', 'roj'): From afc614eb0d2c7cb40779d00c168eb420b43e088a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 16:20:24 +0000 Subject: [PATCH 2135/8469] Merged revisions 69585 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69585 | tarek.ziade | 2009-02-13 17:13:16 +0100 (Fri, 13 Feb 2009) | 1 line reverted leak fix, to use the one done in py3k branch (r67382) ........ --- tests/test_build_ext.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 00630ab908..dbec65e8d1 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,5 +1,6 @@ import sys import os +import tempfile import shutil from StringIO import StringIO @@ -10,12 +11,15 @@ import unittest from test import test_support +# http://bugs.python.org/issue4373 +# Don't load the xx module more than once. +ALREADY_TESTED = False + class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') - os.mkdir(self.tmp_dir) + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) @@ -23,6 +27,7 @@ def setUp(self): shutil.copy(xx_c, self.tmp_dir) def test_build_ext(self): + global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) @@ -45,6 +50,11 @@ def test_build_ext(self): finally: sys.stdout = old_stdout + if ALREADY_TESTED: + return + else: + ALREADY_TESTED = True + import xx for attr in ('error', 'foo', 'new', 'roj'): From 0f3bc82cb894b6fb67b3006b6b749a9171710062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 16:23:57 +0000 Subject: [PATCH 2136/8469] Merged revisions 69585 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69585 | tarek.ziade | 2009-02-13 17:13:16 +0100 (Fri, 13 Feb 2009) | 1 line reverted leak fix, to use the one done in py3k branch (r67382) ........ --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index aa5378c41a..5e42943c38 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,5 +1,6 @@ import sys import os +import tempfile import shutil from io import StringIO @@ -22,8 +23,7 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') - os.mkdir(self.tmp_dir) + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) From fcbbe9c25a4ae1020ea705adbbb2b13269b8c6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 22:22:03 +0000 Subject: [PATCH 2137/8469] Issue #2461: added tests for distutils.util --- tests/test_util.py | 213 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 tests/test_util.py diff --git a/tests/test_util.py b/tests/test_util.py new file mode 100644 index 0000000000..3505fe26e7 --- /dev/null +++ b/tests/test_util.py @@ -0,0 +1,213 @@ +"""Tests for distutils.util.""" +# not covered yet: +# - byte_compile +# +import os +import sys +import unittest + +from distutils.errors import DistutilsPlatformError + +from distutils.util import get_platform +from distutils.util import convert_path +from distutils.util import change_root +from distutils.util import check_environ +from distutils.util import split_quoted +from distutils.util import strtobool +from distutils.util import rfc822_escape + +from distutils import util # used to patch _environ_checked + +class utilTestCase(unittest.TestCase): + + def setUp(self): + # saving the environment + self.name = os.name + self.platform = sys.platform + self.version = sys.version + self.sep = os.sep + self.environ = os.environ + self.join = os.path.join + self.isabs = os.path.isabs + self.splitdrive = os.path.splitdrive + + # patching os.uname + if hasattr(os, 'uname'): + self.uname = os.uname + self._uname = os.uname() + os.uname = self._get_uname + else: + self.uname = None + self._uname = None + + def tearDown(self): + # getting back tne environment + os.name = self.name + sys.platform = self.platform + sys.version = self.version + os.sep = self.sep + os.environ = self.environ + os.path.join = self.join + os.path.isabs = self.isabs + os.path.splitdrive = self.splitdrive + if self.uname is not None: + os.uname = self.uname + + def _set_uname(self, uname): + self._uname = uname + + def _get_uname(self): + return self._uname + + def test_get_platform(self): + + # windows XP, 32bits + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Intel)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win32') + + # windows XP, amd64 + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Amd64)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-amd64') + + # windows XP, itanium + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Itanium)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-ia64') + + # macbook + os.name = 'posix' + sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' + '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') + sys.platform = 'darwin' + self._set_uname(('Darwin', 'macziade', '8.11.1', + ('Darwin Kernel Version 8.11.1: ' + 'Wed Oct 10 18:23:28 PDT 2007; ' + 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + + self.assertEquals(get_platform(), 'macosx-10.3-i386') + + # linux debian sarge + os.name = 'posix' + sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' + '\n[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]') + sys.platform = 'linux2' + self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', + '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) + + self.assertEquals(get_platform(), 'linux-i686') + + # XXX more platforms to tests here + + def test_convert_path(self): + # linux/mac + os.sep = '/' + def _join(path): + return '/'.join(path) + os.path.join = _join + + self.assertEquals(convert_path('/home/to/my/stuff'), + '/home/to/my/stuff') + + # win + os.sep = '\\' + def _join(*path): + return '\\'.join(path) + os.path.join = _join + + self.assertRaises(ValueError, convert_path, '/home/to/my/stuff') + self.assertRaises(ValueError, convert_path, 'home/to/my/stuff/') + + self.assertEquals(convert_path('home/to/my/stuff'), + 'home\\to\\my\\stuff') + self.assertEquals(convert_path('.'), + os.curdir) + + def test_change_root(self): + # linux/mac + os.name = 'posix' + def _isabs(path): + return path[0] == '/' + os.path.isabs = _isabs + + self.assertEquals(change_root('/root', '/old/its/here'), + '/root/old/its/here') + self.assertEquals(change_root('/root', 'its/here'), + '/root/its/here') + + # windows + os.name = 'nt' + def _isabs(path): + return path.startswith('c:\\') + os.path.isabs = _isabs + def _splitdrive(path): + if path.startswith('c:'): + return ('', path.replace('c:', '')) + return ('', path) + os.path.splitdrive = _splitdrive + def _join(*path): + return '\\'.join(path) + os.path.join = _join + + self.assertEquals(change_root('c:\\root', 'c:\\old\\its\\here'), + 'c:\\root\\old\\its\\here') + self.assertEquals(change_root('c:\\root', 'its\\here'), + 'c:\\root\\its\\here') + + # BugsBunny os (it's a great os) + os.name = 'BugsBunny' + self.assertRaises(DistutilsPlatformError, + change_root, 'c:\\root', 'its\\here') + + # XXX platforms to be covered: os2, mac + + def test_check_environ(self): + util._environ_checked = 0 + + # posix without HOME + if os.name == 'posix': # this test won't run on windows + os.environ = {} + check_environ() + + import pwd + self.assertEquals(os.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) + else: + check_environ() + + self.assertEquals(os.environ['PLAT'], get_platform()) + self.assertEquals(util._environ_checked, 1) + + def test_split_quoted(self): + self.assertEquals(split_quoted('""one"" "two" \'three\' \\four'), + ['one', 'two', 'three', 'four']) + + def test_strtobool(self): + yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') + no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') + + for y in yes: + self.assert_(strtobool(y)) + + for n in no: + self.assert_(not strtobool(n)) + + def test_rfc822_escape(self): + header = 'I am a\npoor\nlonesome\nheader\n' + res = rfc822_escape(header) + wanted = ('I am a%(8s)spoor%(8s)slonesome%(8s)s' + 'header%(8s)s') % {'8s': '\n'+8*' '} + self.assertEquals(res, wanted) + +def test_suite(): + return unittest.makeSuite(utilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 0bfae040eb480b3ac952d9ce384311f62af50825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 22:26:15 +0000 Subject: [PATCH 2138/8469] Merged revisions 69594 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69594 | tarek.ziade | 2009-02-13 23:22:03 +0100 (Fri, 13 Feb 2009) | 1 line Issue #2461: added tests for distutils.util ........ --- tests/test_util.py | 213 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 tests/test_util.py diff --git a/tests/test_util.py b/tests/test_util.py new file mode 100644 index 0000000000..3505fe26e7 --- /dev/null +++ b/tests/test_util.py @@ -0,0 +1,213 @@ +"""Tests for distutils.util.""" +# not covered yet: +# - byte_compile +# +import os +import sys +import unittest + +from distutils.errors import DistutilsPlatformError + +from distutils.util import get_platform +from distutils.util import convert_path +from distutils.util import change_root +from distutils.util import check_environ +from distutils.util import split_quoted +from distutils.util import strtobool +from distutils.util import rfc822_escape + +from distutils import util # used to patch _environ_checked + +class utilTestCase(unittest.TestCase): + + def setUp(self): + # saving the environment + self.name = os.name + self.platform = sys.platform + self.version = sys.version + self.sep = os.sep + self.environ = os.environ + self.join = os.path.join + self.isabs = os.path.isabs + self.splitdrive = os.path.splitdrive + + # patching os.uname + if hasattr(os, 'uname'): + self.uname = os.uname + self._uname = os.uname() + os.uname = self._get_uname + else: + self.uname = None + self._uname = None + + def tearDown(self): + # getting back tne environment + os.name = self.name + sys.platform = self.platform + sys.version = self.version + os.sep = self.sep + os.environ = self.environ + os.path.join = self.join + os.path.isabs = self.isabs + os.path.splitdrive = self.splitdrive + if self.uname is not None: + os.uname = self.uname + + def _set_uname(self, uname): + self._uname = uname + + def _get_uname(self): + return self._uname + + def test_get_platform(self): + + # windows XP, 32bits + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Intel)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win32') + + # windows XP, amd64 + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Amd64)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-amd64') + + # windows XP, itanium + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Itanium)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-ia64') + + # macbook + os.name = 'posix' + sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' + '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') + sys.platform = 'darwin' + self._set_uname(('Darwin', 'macziade', '8.11.1', + ('Darwin Kernel Version 8.11.1: ' + 'Wed Oct 10 18:23:28 PDT 2007; ' + 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + + self.assertEquals(get_platform(), 'macosx-10.3-i386') + + # linux debian sarge + os.name = 'posix' + sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' + '\n[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]') + sys.platform = 'linux2' + self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', + '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) + + self.assertEquals(get_platform(), 'linux-i686') + + # XXX more platforms to tests here + + def test_convert_path(self): + # linux/mac + os.sep = '/' + def _join(path): + return '/'.join(path) + os.path.join = _join + + self.assertEquals(convert_path('/home/to/my/stuff'), + '/home/to/my/stuff') + + # win + os.sep = '\\' + def _join(*path): + return '\\'.join(path) + os.path.join = _join + + self.assertRaises(ValueError, convert_path, '/home/to/my/stuff') + self.assertRaises(ValueError, convert_path, 'home/to/my/stuff/') + + self.assertEquals(convert_path('home/to/my/stuff'), + 'home\\to\\my\\stuff') + self.assertEquals(convert_path('.'), + os.curdir) + + def test_change_root(self): + # linux/mac + os.name = 'posix' + def _isabs(path): + return path[0] == '/' + os.path.isabs = _isabs + + self.assertEquals(change_root('/root', '/old/its/here'), + '/root/old/its/here') + self.assertEquals(change_root('/root', 'its/here'), + '/root/its/here') + + # windows + os.name = 'nt' + def _isabs(path): + return path.startswith('c:\\') + os.path.isabs = _isabs + def _splitdrive(path): + if path.startswith('c:'): + return ('', path.replace('c:', '')) + return ('', path) + os.path.splitdrive = _splitdrive + def _join(*path): + return '\\'.join(path) + os.path.join = _join + + self.assertEquals(change_root('c:\\root', 'c:\\old\\its\\here'), + 'c:\\root\\old\\its\\here') + self.assertEquals(change_root('c:\\root', 'its\\here'), + 'c:\\root\\its\\here') + + # BugsBunny os (it's a great os) + os.name = 'BugsBunny' + self.assertRaises(DistutilsPlatformError, + change_root, 'c:\\root', 'its\\here') + + # XXX platforms to be covered: os2, mac + + def test_check_environ(self): + util._environ_checked = 0 + + # posix without HOME + if os.name == 'posix': # this test won't run on windows + os.environ = {} + check_environ() + + import pwd + self.assertEquals(os.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) + else: + check_environ() + + self.assertEquals(os.environ['PLAT'], get_platform()) + self.assertEquals(util._environ_checked, 1) + + def test_split_quoted(self): + self.assertEquals(split_quoted('""one"" "two" \'three\' \\four'), + ['one', 'two', 'three', 'four']) + + def test_strtobool(self): + yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') + no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') + + for y in yes: + self.assert_(strtobool(y)) + + for n in no: + self.assert_(not strtobool(n)) + + def test_rfc822_escape(self): + header = 'I am a\npoor\nlonesome\nheader\n' + res = rfc822_escape(header) + wanted = ('I am a%(8s)spoor%(8s)slonesome%(8s)s' + 'header%(8s)s') % {'8s': '\n'+8*' '} + self.assertEquals(res, wanted) + +def test_suite(): + return unittest.makeSuite(utilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From c2f4d1be776acb70494ee8444cdf884c1a6cc32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 23:00:43 +0000 Subject: [PATCH 2139/8469] Fixed #4524: distutils build_script command failed with --with-suffix=3 --- command/build_scripts.py | 4 ++-- tests/test_build_scripts.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 48e06aa562..2ad4c7beb9 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -102,8 +102,8 @@ def copy_scripts (self): outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), - "python" + sysconfig.get_config_var("VERSION") - + sysconfig.get_config_var("EXE")), + "python%s%s" % (sysconfig.get_config_var("VERSION"), + sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 666ca44c1d..2acfab828e 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,6 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution +from distutils import sysconfig from distutils.tests import support @@ -73,6 +74,33 @@ def write_script(self, dir, name, text): f.write(text) f.close() + def test_version_int(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + + cmd = self.get_build_scripts_cmd(target, + [os.path.join(source, fn) + for fn in expected]) + cmd.finalize_options() + + # http://bugs.python.org/issue4524 + # + # On linux-g++-32 with command line `./configure --enable-ipv6 + # --with-suffix=3`, python is compiled okay but the build scripts + # failed when writing the name of the executable + old = sysconfig._config_vars.get('VERSION') + sysconfig._config_vars['VERSION'] = 4 + try: + cmd.run() + finally: + if old is not None: + sysconfig._config_vars['VERSION'] = old + + built = os.listdir(target) + for name in expected: + self.assert_(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) From adfa78507b8da0b97fc02a533eef0d015b9cae0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 23:02:44 +0000 Subject: [PATCH 2140/8469] Merged revisions 69598 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69598 | tarek.ziade | 2009-02-14 00:00:43 +0100 (Sat, 14 Feb 2009) | 1 line Fixed #4524: distutils build_script command failed with --with-suffix=3 ........ --- command/build_scripts.py | 4 ++-- tests/test_build_scripts.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 104be0b349..453330fea8 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -104,8 +104,8 @@ def copy_scripts (self): outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), - "python" + sysconfig.get_config_var("VERSION") - + sysconfig.get_config_var("EXE")), + "python%s%s" % (sysconfig.get_config_var("VERSION"), + sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 666ca44c1d..2acfab828e 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,6 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution +from distutils import sysconfig from distutils.tests import support @@ -73,6 +74,33 @@ def write_script(self, dir, name, text): f.write(text) f.close() + def test_version_int(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + + cmd = self.get_build_scripts_cmd(target, + [os.path.join(source, fn) + for fn in expected]) + cmd.finalize_options() + + # http://bugs.python.org/issue4524 + # + # On linux-g++-32 with command line `./configure --enable-ipv6 + # --with-suffix=3`, python is compiled okay but the build scripts + # failed when writing the name of the executable + old = sysconfig._config_vars.get('VERSION') + sysconfig._config_vars['VERSION'] = 4 + try: + cmd.run() + finally: + if old is not None: + sysconfig._config_vars['VERSION'] = old + + built = os.listdir(target) + for name in expected: + self.assert_(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) From e63773a4f880dbec08188c94df28cbf90bc70881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 23:04:17 +0000 Subject: [PATCH 2141/8469] Merged revisions 69598 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69598 | tarek.ziade | 2009-02-14 00:00:43 +0100 (Sat, 14 Feb 2009) | 1 line Fixed #4524: distutils build_script command failed with --with-suffix=3 ........ --- command/build_scripts.py | 4 ++-- tests/test_build_scripts.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index dc04a9fcdb..8b08bfeaf0 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -104,8 +104,8 @@ def copy_scripts(self): outf.write("#!%s%s\n" % (os.path.join( sysconfig.get_config_var("BINDIR"), - "python" + sysconfig.get_config_var("VERSION") - + sysconfig.get_config_var("EXE")), + "python%s%s" % (sysconfig.get_config_var("VERSION"), + sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 666ca44c1d..2acfab828e 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,6 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution +from distutils import sysconfig from distutils.tests import support @@ -73,6 +74,33 @@ def write_script(self, dir, name, text): f.write(text) f.close() + def test_version_int(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + + cmd = self.get_build_scripts_cmd(target, + [os.path.join(source, fn) + for fn in expected]) + cmd.finalize_options() + + # http://bugs.python.org/issue4524 + # + # On linux-g++-32 with command line `./configure --enable-ipv6 + # --with-suffix=3`, python is compiled okay but the build scripts + # failed when writing the name of the executable + old = sysconfig._config_vars.get('VERSION') + sysconfig._config_vars['VERSION'] = 4 + try: + cmd.run() + finally: + if old is not None: + sysconfig._config_vars['VERSION'] = old + + built = os.listdir(target) + for name in expected: + self.assert_(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) From a587bd4900a222cd112f56d03a88d3c8990c401c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 23:41:57 +0000 Subject: [PATCH 2142/8469] fix the environ for distutils test_util --- tests/test_util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 3505fe26e7..ca586268a3 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -35,11 +35,12 @@ def setUp(self): if hasattr(os, 'uname'): self.uname = os.uname self._uname = os.uname() - os.uname = self._get_uname else: self.uname = None self._uname = None + os.uname = self._get_uname + def tearDown(self): # getting back tne environment os.name = self.name @@ -91,6 +92,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' self.assertEquals(get_platform(), 'macosx-10.3-i386') @@ -136,6 +138,9 @@ def test_change_root(self): def _isabs(path): return path[0] == '/' os.path.isabs = _isabs + def _join(*path): + return '/'.join(path) + os.path.join = _join self.assertEquals(change_root('/root', '/old/its/here'), '/root/old/its/here') From e1e318222b20681c360d5743872aedc2b5dc1c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 13 Feb 2009 23:48:11 +0000 Subject: [PATCH 2143/8469] Merged revisions 69602 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69602 | tarek.ziade | 2009-02-14 00:41:57 +0100 (Sat, 14 Feb 2009) | 1 line fix the environ for distutils test_util ........ --- tests/test_util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 3505fe26e7..ca586268a3 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -35,11 +35,12 @@ def setUp(self): if hasattr(os, 'uname'): self.uname = os.uname self._uname = os.uname() - os.uname = self._get_uname else: self.uname = None self._uname = None + os.uname = self._get_uname + def tearDown(self): # getting back tne environment os.name = self.name @@ -91,6 +92,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' self.assertEquals(get_platform(), 'macosx-10.3-i386') @@ -136,6 +138,9 @@ def test_change_root(self): def _isabs(path): return path[0] == '/' os.path.isabs = _isabs + def _join(*path): + return '/'.join(path) + os.path.join = _join self.assertEquals(change_root('/root', '/old/its/here'), '/root/old/its/here') From 7c81709c02b41f3d673fbf9e12c9ee4f6f853e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 14 Feb 2009 14:10:23 +0000 Subject: [PATCH 2144/8469] Fix for #5257: refactored all tests in distutils, so they use a temporary directory. --- tests/support.py | 4 ++-- tests/test_build_ext.py | 9 ++++---- tests/test_config.py | 13 ++++++----- tests/test_dir_util.py | 13 ++++++----- tests/test_dist.py | 30 +++++++++++-------------- tests/test_file_util.py | 19 +++++++--------- tests/test_sdist.py | 50 +++++++++++++++++------------------------ 7 files changed, 64 insertions(+), 74 deletions(-) diff --git a/tests/support.py b/tests/support.py index 475ceee598..6dfc82cd5e 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,5 +1,5 @@ """Support code for distutils test cases.""" - +import os import shutil import tempfile @@ -31,7 +31,7 @@ def tearDown(self): super(TempdirManager, self).tearDown() while self.tempdirs: d = self.tempdirs.pop() - shutil.rmtree(d) + shutil.rmtree(d, os.name in ('nt', 'cygwin')) def mkdtemp(self): """Create a temporary directory that will be cleaned up. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 3c7d228da7..a38558b007 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -7,6 +7,7 @@ from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig +from distutils.tests import support import unittest from test import test_support @@ -19,11 +20,12 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -class BuildExtTestCase(unittest.TestCase): +class BuildExtTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + support.TempdirManager.setUp(self) + self.tmp_dir = self.mkdtemp() self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) @@ -74,8 +76,7 @@ def tearDown(self): # Get everything back to normal test_support.unload('xx') sys.path = self.sys_path - # XXX on Windows the test leaves a directory with xx module in TEMP - shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + support.TempdirManager.tearDown(self) def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) diff --git a/tests/test_config.py b/tests/test_config.py index cae7689884..d81276928a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -2,6 +2,8 @@ import sys import os import unittest +import tempfile +import shutil from distutils.core import PyPIRCCommand from distutils.core import Distribution @@ -49,13 +51,15 @@ class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): """Patches the environment.""" + support.TempdirManager.setUp(self) + if os.environ.has_key('HOME'): self._old_home = os.environ['HOME'] else: self._old_home = None - curdir = os.path.dirname(__file__) - os.environ['HOME'] = curdir - self.rc = os.path.join(curdir, '.pypirc') + self.tmp_dir = self.mkdtemp() + os.environ['HOME'] = self.tmp_dir + self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() class command(PyPIRCCommand): @@ -74,9 +78,8 @@ def tearDown(self): del os.environ['HOME'] else: os.environ['HOME'] = self._old_home - if os.path.exists(self.rc): - os.remove(self.rc) set_threshold(self.old_threshold) + support.TempdirManager.tearDown(self) def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index edf93c40c5..bf416b6d79 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -9,8 +9,9 @@ from distutils.dir_util import copy_tree from distutils import log +from distutils.tests import support -class DirUtilTestCase(unittest.TestCase): +class DirUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): if len(args) > 0: @@ -19,18 +20,18 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): + support.TempdirManager.setUp(self) self._logs = [] - self.root_target = os.path.join(os.path.dirname(__file__), 'deep') + tmp_dir = self.mkdtemp() + self.root_target = os.path.join(tmp_dir, 'deep') self.target = os.path.join(self.root_target, 'here') - self.target2 = os.path.join(os.path.dirname(__file__), 'deep2') + self.target2 = os.path.join(tmp_dir, 'deep2') self.old_log = log.info log.info = self._log def tearDown(self): - for target in (self.target, self.target2): - if os.path.exists(target): - shutil.rmtree(target) log.info = self.old_log + support.TempdirManager.tearDown(self) def test_mkpath_remove_tree_verbosity(self): diff --git a/tests/test_dist.py b/tests/test_dist.py index bf59c41844..0e9868ae67 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -11,7 +11,7 @@ import warnings from test.test_support import TESTFN - +from distutils.tests import support class test_dist(distutils.cmd.Command): """Sample distutils extension command.""" @@ -36,14 +36,16 @@ def find_config_files(self): return self._config_files -class DistributionTestCase(unittest.TestCase): +class DistributionTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): + support.TempdirManager.setUp(self) self.argv = sys.argv[:] del sys.argv[1:] def tearDown(self): sys.argv[:] = self.argv + support.TempdirManager.tearDown(self) def create_distribution(self, configfiles=()): d = TestDistribution() @@ -100,7 +102,8 @@ def test_command_packages_configfile(self): def test_write_pkg_file(self): # Check DistributionMetadata handling of Unicode fields - my_file = os.path.join(os.path.dirname(__file__), 'f') + tmp_dir = self.mkdtemp() + my_file = os.path.join(tmp_dir, 'f') klass = distutils.dist.Distribution dist = klass(attrs={'author': u'Mister Café', @@ -113,11 +116,7 @@ def test_write_pkg_file(self): # let's make sure the file can be written # with Unicode fields. they are encoded with # PKG_INFO_ENCODING - try: - dist.metadata.write_pkg_file(open(my_file, 'w')) - finally: - if os.path.exists(my_file): - os.remove(my_file) + dist.metadata.write_pkg_file(open(my_file, 'w')) # regular ascii is of course always usable dist = klass(attrs={'author': 'Mister Cafe', @@ -126,11 +125,8 @@ def test_write_pkg_file(self): 'description': 'Cafe torrefie', 'long_description': 'Hehehe'}) - try: - dist.metadata.write_pkg_file(open(my_file, 'w')) - finally: - if os.path.exists(my_file): - os.remove(my_file) + my_file2 = os.path.join(tmp_dir, 'f2') + dist.metadata.write_pkg_file(open(my_file, 'w')) def test_empty_options(self): # an empty options dictionary should not stay in the @@ -155,7 +151,7 @@ def _warn(msg): self.assertEquals(len(warns), 0) -class MetadataTestCase(unittest.TestCase): +class MetadataTestCase(support.TempdirManager, unittest.TestCase): def test_simple_metadata(self): attrs = {"name": "package", @@ -254,8 +250,8 @@ def test_custom_pydistutils(self): else: user_filename = "pydistutils.cfg" - curdir = os.path.dirname(__file__) - user_filename = os.path.join(curdir, user_filename) + temp_dir = self.mkdtemp() + user_filename = os.path.join(temp_dir, user_filename) f = open(user_filename, 'w') f.write('.') f.close() @@ -265,7 +261,7 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - os.environ['HOME'] = curdir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 523f1aef17..9373af8503 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -5,8 +5,9 @@ from distutils.file_util import move_file from distutils import log +from distutils.tests import support -class FileUtilTestCase(unittest.TestCase): +class FileUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): if len(args) > 0: @@ -15,24 +16,20 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): + support.TempdirManager.setUp(self) self._logs = [] self.old_log = log.info log.info = self._log - self.source = os.path.join(os.path.dirname(__file__), 'f1') - self.target = os.path.join(os.path.dirname(__file__), 'f2') - self.target_dir = os.path.join(os.path.dirname(__file__), 'd1') + tmp_dir = self.mkdtemp() + self.source = os.path.join(tmp_dir, 'f1') + self.target = os.path.join(tmp_dir, 'f2') + self.target_dir = os.path.join(tmp_dir, 'd1') def tearDown(self): log.info = self.old_log - for f in (self.source, self.target, self.target_dir): - if os.path.exists(f): - if os.path.isfile(f): - os.remove(f) - else: - shutil.rmtree(f) + support.TempdirManager.tearDown(self) def test_move_file_verbosity(self): - f = open(self.source, 'w') f.write('some content') f.close() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 0d839b5c6e..b2e9800888 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -5,6 +5,7 @@ import zipfile from os.path import join import sys +import tempfile from distutils.command.sdist import sdist from distutils.core import Distribution @@ -12,9 +13,6 @@ from distutils.errors import DistutilsExecError from distutils.spawn import find_executable -CURDIR = os.path.dirname(__file__) -TEMP_PKG = join(CURDIR, 'temppkg') - SETUP_PY = """ from distutils.core import setup import somecode @@ -29,28 +27,25 @@ class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): + # PyPIRCCommandTestCase creates a temp dir already + # and put it in self.tmp_dir PyPIRCCommandTestCase.setUp(self) + # setting up an environment self.old_path = os.getcwd() + os.mkdir(join(self.tmp_dir, 'somecode')) + os.mkdir(join(self.tmp_dir, 'dist')) + # creating a MANIFEST, a package, and a README + self._write(join(self.tmp_dir, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(self.tmp_dir, 'README'), 'xxx') + self._write(join(self.tmp_dir, 'somecode', '__init__.py'), '#') + self._write(join(self.tmp_dir, 'setup.py'), SETUP_PY) + os.chdir(self.tmp_dir) def tearDown(self): + # back to normal os.chdir(self.old_path) - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) PyPIRCCommandTestCase.tearDown(self) - def _init_tmp_pkg(self): - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - os.mkdir(join(TEMP_PKG, 'dist')) - # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) - os.chdir(TEMP_PKG) - def _write(self, path, content): f = open(path, 'w') try: @@ -62,18 +57,17 @@ def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned # on all systems - self._init_tmp_pkg() # creating VCS directories with some files in them - os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) - self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) + self._write(join(self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) - self._write(join(TEMP_PKG, 'somecode', '.hg', + os.mkdir(join(self.tmp_dir, 'somecode', '.hg')) + self._write(join(self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.git')) - self._write(join(TEMP_PKG, 'somecode', '.git', + os.mkdir(join(self.tmp_dir, 'somecode', '.git')) + self._write(join(self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') # now building a sdist @@ -96,7 +90,7 @@ def test_prune_file_list(self): cmd.run() # now let's check what we have - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) self.assertEquals(files, ['fake-1.0.zip']) @@ -116,8 +110,6 @@ def test_make_distribution(self): find_executable('gzip') is None): return - self._init_tmp_pkg() - # now building a sdist dist = Distribution() dist.script_name = 'setup.py' @@ -137,7 +129,7 @@ def test_make_distribution(self): cmd.run() # making sure we have two files - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.tmp_dir, 'dist') result = os.listdir(dist_folder) result.sort() self.assertEquals(result, From 9fa930f80d7a407b6a22441c9c2f04548f74eb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 14 Feb 2009 14:12:30 +0000 Subject: [PATCH 2145/8469] Replace variable --- tests/test_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 0e9868ae67..847df7bb60 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -268,7 +268,7 @@ def test_custom_pydistutils(self): # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOME'] = curdir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files, '%r not found in %r' % (user_filename, files)) From 181cd140aa9a1b02ba4e592755cabe67fb034d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 14 Feb 2009 14:35:51 +0000 Subject: [PATCH 2146/8469] Merged revisions 69609 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69609 | tarek.ziade | 2009-02-14 15:10:23 +0100 (Sat, 14 Feb 2009) | 1 line Fix for #5257: refactored all tests in distutils, so they use a temporary directory. ........ --- tests/support.py | 4 ++-- tests/test_build_ext.py | 9 ++++---- tests/test_config.py | 12 +++++----- tests/test_dir_util.py | 13 ++++++----- tests/test_dist.py | 11 ++++----- tests/test_file_util.py | 19 +++++++--------- tests/test_sdist.py | 50 +++++++++++++++++------------------------ 7 files changed, 56 insertions(+), 62 deletions(-) diff --git a/tests/support.py b/tests/support.py index 91e704cfcc..48bcbccfc5 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,5 +1,5 @@ """Support code for distutils test cases.""" - +import os import shutil import tempfile @@ -31,7 +31,7 @@ def tearDown(self): super().tearDown() while self.tempdirs: d = self.tempdirs.pop() - shutil.rmtree(d) + shutil.rmtree(d, os.name in ('nt', 'cygwin')) def mkdtemp(self): """Create a temporary directory that will be cleaned up. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5e42943c38..91b3de85d2 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -7,6 +7,7 @@ from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig +from distutils.tests.support import TempdirManager import unittest from test import support @@ -19,11 +20,12 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -class BuildExtTestCase(unittest.TestCase): +class BuildExtTestCase(TempdirManager, unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + TempdirManager.setUp(self) + self.tmp_dir = self.mkdtemp() self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) @@ -74,8 +76,7 @@ def tearDown(self): # Get everything back to normal support.unload('xx') sys.path = self.sys_path - # XXX on Windows the test leaves a directory with xx module in TEMP - shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + TempdirManager.tearDown(self) def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) diff --git a/tests/test_config.py b/tests/test_config.py index bdc9b2b539..0df6af8412 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -2,6 +2,7 @@ import sys import os import unittest +import tempfile from distutils.core import PyPIRCCommand from distutils.core import Distribution @@ -49,13 +50,15 @@ class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): """Patches the environment.""" + support.TempdirManager.setUp(self) + if 'HOME' in os.environ: self._old_home = os.environ['HOME'] else: self._old_home = None - curdir = os.path.dirname(__file__) - os.environ['HOME'] = curdir - self.rc = os.path.join(curdir, '.pypirc') + self.tmp_dir = self.mkdtemp() + os.environ['HOME'] = self.tmp_dir + self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() class command(PyPIRCCommand): @@ -74,9 +77,8 @@ def tearDown(self): del os.environ['HOME'] else: os.environ['HOME'] = self._old_home - if os.path.exists(self.rc): - os.remove(self.rc) set_threshold(self.old_threshold) + support.TempdirManager.tearDown(self) def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index edf93c40c5..bf416b6d79 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -9,8 +9,9 @@ from distutils.dir_util import copy_tree from distutils import log +from distutils.tests import support -class DirUtilTestCase(unittest.TestCase): +class DirUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): if len(args) > 0: @@ -19,18 +20,18 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): + support.TempdirManager.setUp(self) self._logs = [] - self.root_target = os.path.join(os.path.dirname(__file__), 'deep') + tmp_dir = self.mkdtemp() + self.root_target = os.path.join(tmp_dir, 'deep') self.target = os.path.join(self.root_target, 'here') - self.target2 = os.path.join(os.path.dirname(__file__), 'deep2') + self.target2 = os.path.join(tmp_dir, 'deep2') self.old_log = log.info log.info = self._log def tearDown(self): - for target in (self.target, self.target2): - if os.path.exists(target): - shutil.rmtree(target) log.info = self.old_log + support.TempdirManager.tearDown(self) def test_mkpath_remove_tree_verbosity(self): diff --git a/tests/test_dist.py b/tests/test_dist.py index 8e7ef5d33c..3ac0fdd1e1 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -9,6 +9,7 @@ import warnings from test.support import TESTFN +from distutils.tests import support class test_dist(distutils.cmd.Command): @@ -120,7 +121,7 @@ def _warn(msg): self.assertEquals(len(warns), 0) -class MetadataTestCase(unittest.TestCase): +class MetadataTestCase(support.TempdirManager, unittest.TestCase): def test_simple_metadata(self): attrs = {"name": "package", @@ -219,8 +220,8 @@ def test_custom_pydistutils(self): else: user_filename = "pydistutils.cfg" - curdir = os.path.dirname(__file__) - user_filename = os.path.join(curdir, user_filename) + temp_dir = self.mkdtemp() + user_filename = os.path.join(temp_dir, user_filename) f = open(user_filename, 'w') f.write('.') f.close() @@ -230,14 +231,14 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - os.environ['HOME'] = curdir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOME'] = curdir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files, '%r not found in %r' % (user_filename, files)) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 523f1aef17..9373af8503 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -5,8 +5,9 @@ from distutils.file_util import move_file from distutils import log +from distutils.tests import support -class FileUtilTestCase(unittest.TestCase): +class FileUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): if len(args) > 0: @@ -15,24 +16,20 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): + support.TempdirManager.setUp(self) self._logs = [] self.old_log = log.info log.info = self._log - self.source = os.path.join(os.path.dirname(__file__), 'f1') - self.target = os.path.join(os.path.dirname(__file__), 'f2') - self.target_dir = os.path.join(os.path.dirname(__file__), 'd1') + tmp_dir = self.mkdtemp() + self.source = os.path.join(tmp_dir, 'f1') + self.target = os.path.join(tmp_dir, 'f2') + self.target_dir = os.path.join(tmp_dir, 'd1') def tearDown(self): log.info = self.old_log - for f in (self.source, self.target, self.target_dir): - if os.path.exists(f): - if os.path.isfile(f): - os.remove(f) - else: - shutil.rmtree(f) + support.TempdirManager.tearDown(self) def test_move_file_verbosity(self): - f = open(self.source, 'w') f.write('some content') f.close() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 0d839b5c6e..b2e9800888 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -5,6 +5,7 @@ import zipfile from os.path import join import sys +import tempfile from distutils.command.sdist import sdist from distutils.core import Distribution @@ -12,9 +13,6 @@ from distutils.errors import DistutilsExecError from distutils.spawn import find_executable -CURDIR = os.path.dirname(__file__) -TEMP_PKG = join(CURDIR, 'temppkg') - SETUP_PY = """ from distutils.core import setup import somecode @@ -29,28 +27,25 @@ class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): + # PyPIRCCommandTestCase creates a temp dir already + # and put it in self.tmp_dir PyPIRCCommandTestCase.setUp(self) + # setting up an environment self.old_path = os.getcwd() + os.mkdir(join(self.tmp_dir, 'somecode')) + os.mkdir(join(self.tmp_dir, 'dist')) + # creating a MANIFEST, a package, and a README + self._write(join(self.tmp_dir, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(self.tmp_dir, 'README'), 'xxx') + self._write(join(self.tmp_dir, 'somecode', '__init__.py'), '#') + self._write(join(self.tmp_dir, 'setup.py'), SETUP_PY) + os.chdir(self.tmp_dir) def tearDown(self): + # back to normal os.chdir(self.old_path) - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) PyPIRCCommandTestCase.tearDown(self) - def _init_tmp_pkg(self): - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - os.mkdir(join(TEMP_PKG, 'dist')) - # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) - os.chdir(TEMP_PKG) - def _write(self, path, content): f = open(path, 'w') try: @@ -62,18 +57,17 @@ def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned # on all systems - self._init_tmp_pkg() # creating VCS directories with some files in them - os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) - self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) + self._write(join(self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) - self._write(join(TEMP_PKG, 'somecode', '.hg', + os.mkdir(join(self.tmp_dir, 'somecode', '.hg')) + self._write(join(self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.git')) - self._write(join(TEMP_PKG, 'somecode', '.git', + os.mkdir(join(self.tmp_dir, 'somecode', '.git')) + self._write(join(self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') # now building a sdist @@ -96,7 +90,7 @@ def test_prune_file_list(self): cmd.run() # now let's check what we have - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) self.assertEquals(files, ['fake-1.0.zip']) @@ -116,8 +110,6 @@ def test_make_distribution(self): find_executable('gzip') is None): return - self._init_tmp_pkg() - # now building a sdist dist = Distribution() dist.script_name = 'setup.py' @@ -137,7 +129,7 @@ def test_make_distribution(self): cmd.run() # making sure we have two files - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.tmp_dir, 'dist') result = os.listdir(dist_folder) result.sort() self.assertEquals(result, From 348e5075053db429b26d72a22fa7e671dd4935d0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 16 Feb 2009 18:22:15 +0000 Subject: [PATCH 2147/8469] remove another use of cmp() --- version.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/version.py b/version.py index 77814377a5..79d458d847 100644 --- a/version.py +++ b/version.py @@ -338,7 +338,12 @@ def _cmp (self, other): if isinstance(other, str): other = LooseVersion(other) - return cmp(self.version, other.version) + if self.version == other.version: + return 0 + if self.version < other.version: + return -1 + if self.version > other.version: + return 1 # end class LooseVersion From 31babd18fd9e32d764982b2585265c50d90faf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 16 Feb 2009 21:38:01 +0000 Subject: [PATCH 2148/8469] Fixed #2279: distutils.sdist.add_defaults now add files listed in package_data and data_files --- command/sdist.py | 22 ++++++- tests/support.py | 13 +++++ tests/test_sdist.py | 137 ++++++++++++++++++++++++++++++-------------- 3 files changed, 129 insertions(+), 43 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index e8b6bce9c9..291e8123b8 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -259,6 +259,9 @@ def add_defaults (self): - setup.py - test/test*.py - all pure Python modules mentioned in setup script + - all files pointed by package_data (build_py) + - all files defined in data_files. + - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything @@ -291,10 +294,27 @@ def add_defaults (self): if files: self.filelist.extend(files) + # build_py is used to get: + # - python modules + # - files defined in package_data + build_py = self.get_finalized_command('build_py') + + # getting python files if self.distribution.has_pure_modules(): - build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) + # getting package_data files + # (computed in build_py.data_files by build_py.finalize_options) + for pkg, src_dir, build_dir, filenames in build_py.data_files: + for filename in filenames: + self.filelist.append(os.path.join(src_dir, filename)) + + # getting distribution.data_files + if self.distribution.has_data_files(): + for dirname, filenames in self.distribution.data_files: + for filename in filenames: + self.filelist.append(os.path.join(dirname, filename)) + if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') self.filelist.extend(build_ext.get_source_files()) diff --git a/tests/support.py b/tests/support.py index 6dfc82cd5e..fbbf35d8ea 100644 --- a/tests/support.py +++ b/tests/support.py @@ -42,6 +42,19 @@ def mkdtemp(self): self.tempdirs.append(d) return d + def write_file(self, path, content): + """Writes a file in the given path. + + + path can be a string or a sequence. + """ + if isinstance(path, (list, tuple)): + path = os.path.join(*path) + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b2e9800888..de588112fd 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -12,6 +12,7 @@ from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError from distutils.spawn import find_executable +from distutils.tests import support SETUP_PY = """ from distutils.core import setup @@ -20,13 +21,20 @@ setup(name='fake') """ -MANIFEST_IN = """ -recursive-include somecode * +MANIFEST = """\ +README +setup.py +data/data.dt +scripts/script.py +somecode/__init__.py +somecode/doc.dat +somecode/doc.txt """ -class sdistTestCase(PyPIRCCommandTestCase): +class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): def setUp(self): + support.LoggingSilencer.setUp(self) # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir PyPIRCCommandTestCase.setUp(self) @@ -34,24 +42,34 @@ def setUp(self): self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) os.mkdir(join(self.tmp_dir, 'dist')) - # creating a MANIFEST, a package, and a README - self._write(join(self.tmp_dir, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(self.tmp_dir, 'README'), 'xxx') - self._write(join(self.tmp_dir, 'somecode', '__init__.py'), '#') - self._write(join(self.tmp_dir, 'setup.py'), SETUP_PY) + # a package, and a README + self.write_file((self.tmp_dir, 'README'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '__init__.py'), '#') + self.write_file((self.tmp_dir, 'setup.py'), SETUP_PY) os.chdir(self.tmp_dir) def tearDown(self): # back to normal os.chdir(self.old_path) PyPIRCCommandTestCase.tearDown(self) - - def _write(self, path, content): - f = open(path, 'w') - try: - f.write(content) - finally: - f.close() + support.LoggingSilencer.tearDown(self) + + def get_cmd(self, metadata=None): + """Returns a cmd""" + if metadata is None: + metadata = {'name': 'fake', 'version': '1.0', + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'} + dist = Distribution(metadata) + dist.script_name = 'setup.py' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.dist_dir = 'dist' + def _warn(*args): + pass + cmd.warn = _warn + return dist, cmd def test_prune_file_list(self): # this test creates a package with some vcs dirs in it @@ -60,33 +78,24 @@ def test_prune_file_list(self): # creating VCS directories with some files in them os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) - self._write(join(self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') os.mkdir(join(self.tmp_dir, 'somecode', '.hg')) - self._write(join(self.tmp_dir, 'somecode', '.hg', + self.write_file((self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx') os.mkdir(join(self.tmp_dir, 'somecode', '.git')) - self._write(join(self.tmp_dir, 'somecode', '.git', + self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') # now building a sdist - dist = Distribution() - dist.script_name = 'setup.py' - dist.metadata.name = 'fake' - dist.metadata.version = '1.0' - dist.metadata.url = 'http://xxx' - dist.metadata.author = dist.metadata.author_email = 'xxx' - dist.packages = ['somecode'] - dist.include_package_data = True - cmd = sdist(dist) - cmd.manifest = 'MANIFEST' - cmd.template = 'MANIFEST.in' - cmd.dist_dir = 'dist' + dist, cmd = self.get_cmd() # zip is available universally # (tar might not be installed under win32) cmd.formats = ['zip'] + + cmd.ensure_finalized() cmd.run() # now let's check what we have @@ -111,21 +120,11 @@ def test_make_distribution(self): return # now building a sdist - dist = Distribution() - dist.script_name = 'setup.py' - dist.metadata.name = 'fake' - dist.metadata.version = '1.0' - dist.metadata.url = 'http://xxx' - dist.metadata.author = dist.metadata.author_email = 'xxx' - dist.packages = ['somecode'] - dist.include_package_data = True - cmd = sdist(dist) - cmd.manifest = 'MANIFEST' - cmd.template = 'MANIFEST.in' - cmd.dist_dir = 'dist' + dist, cmd = self.get_cmd() # creating a gztar then a tar cmd.formats = ['gztar', 'tar'] + cmd.ensure_finalized() cmd.run() # making sure we have two files @@ -140,6 +139,8 @@ def test_make_distribution(self): # now trying a tar then a gztar cmd.formats = ['tar', 'gztar'] + + cmd.ensure_finalized() cmd.run() result = os.listdir(dist_folder) @@ -147,6 +148,58 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def test_add_defaults(self): + + # http://bugs.python.org/issue2279 + + # add_default should also include + # data_files and package_data + dist, cmd = self.get_cmd() + + # filling data_files by pointing files + # in package_data + dist.package_data = {'': ['*.cfg', '*.dat'], + 'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + self.write_file((self.tmp_dir, 'somecode', 'doc.dat'), '#') + + # adding some data in data_files + data_dir = join(self.tmp_dir, 'data') + os.mkdir(data_dir) + self.write_file((data_dir, 'data.dt'), '#') + dist.data_files = [('data', ['data.dt'])] + + # adding a script + script_dir = join(self.tmp_dir, 'scripts') + os.mkdir(script_dir) + self.write_file((script_dir, 'script.py'), '#') + dist.scripts = [join('scripts', 'script.py')] + + + cmd.formats = ['zip'] + cmd.use_defaults = True + + cmd.ensure_finalized() + cmd.run() + + # now let's check what we have + dist_folder = join(self.tmp_dir, 'dist') + files = os.listdir(dist_folder) + self.assertEquals(files, ['fake-1.0.zip']) + + zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything was added + self.assertEquals(len(content), 8) + + # checking the MANIFEST + manifest = open(join(self.tmp_dir, 'MANIFEST')).read() + self.assertEquals(manifest, MANIFEST) + def test_suite(): return unittest.makeSuite(sdistTestCase) From 25e6f089801d3a41b308953ae1adcbd842968ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 16 Feb 2009 21:41:54 +0000 Subject: [PATCH 2149/8469] #2279: use os.sep so the MANIFEST file test work on win32 --- tests/test_sdist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index de588112fd..b4e922f90c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -24,11 +24,11 @@ MANIFEST = """\ README setup.py -data/data.dt -scripts/script.py -somecode/__init__.py -somecode/doc.dat -somecode/doc.txt +data%(sep)sdata.dt +scripts%(sep)sscript.py +somecode%(sep)s__init__.py +somecode%(sep)sdoc.dat +somecode%(sep)sdoc.txt """ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): @@ -198,7 +198,7 @@ def test_add_defaults(self): # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() - self.assertEquals(manifest, MANIFEST) + self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) def test_suite(): return unittest.makeSuite(sdistTestCase) From edd4bb62c85ac3b9164bcf80930e849a78ae17e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 16 Feb 2009 21:49:12 +0000 Subject: [PATCH 2150/8469] Merged revisions 69692 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69692 | tarek.ziade | 2009-02-16 22:38:01 +0100 (Mon, 16 Feb 2009) | 1 line Fixed #2279: distutils.sdist.add_defaults now add files listed in package_data and data_files ........ --- command/sdist.py | 22 ++++++- tests/support.py | 13 +++++ tests/test_sdist.py | 137 ++++++++++++++++++++++++++++++-------------- 3 files changed, 129 insertions(+), 43 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 054fe191d4..c057b667e8 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -252,6 +252,9 @@ def add_defaults(self): - setup.py - test/test*.py - all pure Python modules mentioned in setup script + - all files pointed by package_data (build_py) + - all files defined in data_files. + - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything @@ -283,10 +286,27 @@ def add_defaults(self): if files: self.filelist.extend(files) + # build_py is used to get: + # - python modules + # - files defined in package_data + build_py = self.get_finalized_command('build_py') + + # getting python files if self.distribution.has_pure_modules(): - build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) + # getting package_data files + # (computed in build_py.data_files by build_py.finalize_options) + for pkg, src_dir, build_dir, filenames in build_py.data_files: + for filename in filenames: + self.filelist.append(os.path.join(src_dir, filename)) + + # getting distribution.data_files + if self.distribution.has_data_files(): + for dirname, filenames in self.distribution.data_files: + for filename in filenames: + self.filelist.append(os.path.join(dirname, filename)) + if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') self.filelist.extend(build_ext.get_source_files()) diff --git a/tests/support.py b/tests/support.py index 48bcbccfc5..ecc8da174e 100644 --- a/tests/support.py +++ b/tests/support.py @@ -42,6 +42,19 @@ def mkdtemp(self): self.tempdirs.append(d) return d + def write_file(self, path, content): + """Writes a file in the given path. + + + path can be a string or a sequence. + """ + if isinstance(path, (list, tuple)): + path = os.path.join(*path) + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b2e9800888..de588112fd 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -12,6 +12,7 @@ from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError from distutils.spawn import find_executable +from distutils.tests import support SETUP_PY = """ from distutils.core import setup @@ -20,13 +21,20 @@ setup(name='fake') """ -MANIFEST_IN = """ -recursive-include somecode * +MANIFEST = """\ +README +setup.py +data/data.dt +scripts/script.py +somecode/__init__.py +somecode/doc.dat +somecode/doc.txt """ -class sdistTestCase(PyPIRCCommandTestCase): +class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): def setUp(self): + support.LoggingSilencer.setUp(self) # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir PyPIRCCommandTestCase.setUp(self) @@ -34,24 +42,34 @@ def setUp(self): self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) os.mkdir(join(self.tmp_dir, 'dist')) - # creating a MANIFEST, a package, and a README - self._write(join(self.tmp_dir, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(self.tmp_dir, 'README'), 'xxx') - self._write(join(self.tmp_dir, 'somecode', '__init__.py'), '#') - self._write(join(self.tmp_dir, 'setup.py'), SETUP_PY) + # a package, and a README + self.write_file((self.tmp_dir, 'README'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '__init__.py'), '#') + self.write_file((self.tmp_dir, 'setup.py'), SETUP_PY) os.chdir(self.tmp_dir) def tearDown(self): # back to normal os.chdir(self.old_path) PyPIRCCommandTestCase.tearDown(self) - - def _write(self, path, content): - f = open(path, 'w') - try: - f.write(content) - finally: - f.close() + support.LoggingSilencer.tearDown(self) + + def get_cmd(self, metadata=None): + """Returns a cmd""" + if metadata is None: + metadata = {'name': 'fake', 'version': '1.0', + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'} + dist = Distribution(metadata) + dist.script_name = 'setup.py' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.dist_dir = 'dist' + def _warn(*args): + pass + cmd.warn = _warn + return dist, cmd def test_prune_file_list(self): # this test creates a package with some vcs dirs in it @@ -60,33 +78,24 @@ def test_prune_file_list(self): # creating VCS directories with some files in them os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) - self._write(join(self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') os.mkdir(join(self.tmp_dir, 'somecode', '.hg')) - self._write(join(self.tmp_dir, 'somecode', '.hg', + self.write_file((self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx') os.mkdir(join(self.tmp_dir, 'somecode', '.git')) - self._write(join(self.tmp_dir, 'somecode', '.git', + self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') # now building a sdist - dist = Distribution() - dist.script_name = 'setup.py' - dist.metadata.name = 'fake' - dist.metadata.version = '1.0' - dist.metadata.url = 'http://xxx' - dist.metadata.author = dist.metadata.author_email = 'xxx' - dist.packages = ['somecode'] - dist.include_package_data = True - cmd = sdist(dist) - cmd.manifest = 'MANIFEST' - cmd.template = 'MANIFEST.in' - cmd.dist_dir = 'dist' + dist, cmd = self.get_cmd() # zip is available universally # (tar might not be installed under win32) cmd.formats = ['zip'] + + cmd.ensure_finalized() cmd.run() # now let's check what we have @@ -111,21 +120,11 @@ def test_make_distribution(self): return # now building a sdist - dist = Distribution() - dist.script_name = 'setup.py' - dist.metadata.name = 'fake' - dist.metadata.version = '1.0' - dist.metadata.url = 'http://xxx' - dist.metadata.author = dist.metadata.author_email = 'xxx' - dist.packages = ['somecode'] - dist.include_package_data = True - cmd = sdist(dist) - cmd.manifest = 'MANIFEST' - cmd.template = 'MANIFEST.in' - cmd.dist_dir = 'dist' + dist, cmd = self.get_cmd() # creating a gztar then a tar cmd.formats = ['gztar', 'tar'] + cmd.ensure_finalized() cmd.run() # making sure we have two files @@ -140,6 +139,8 @@ def test_make_distribution(self): # now trying a tar then a gztar cmd.formats = ['tar', 'gztar'] + + cmd.ensure_finalized() cmd.run() result = os.listdir(dist_folder) @@ -147,6 +148,58 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def test_add_defaults(self): + + # http://bugs.python.org/issue2279 + + # add_default should also include + # data_files and package_data + dist, cmd = self.get_cmd() + + # filling data_files by pointing files + # in package_data + dist.package_data = {'': ['*.cfg', '*.dat'], + 'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + self.write_file((self.tmp_dir, 'somecode', 'doc.dat'), '#') + + # adding some data in data_files + data_dir = join(self.tmp_dir, 'data') + os.mkdir(data_dir) + self.write_file((data_dir, 'data.dt'), '#') + dist.data_files = [('data', ['data.dt'])] + + # adding a script + script_dir = join(self.tmp_dir, 'scripts') + os.mkdir(script_dir) + self.write_file((script_dir, 'script.py'), '#') + dist.scripts = [join('scripts', 'script.py')] + + + cmd.formats = ['zip'] + cmd.use_defaults = True + + cmd.ensure_finalized() + cmd.run() + + # now let's check what we have + dist_folder = join(self.tmp_dir, 'dist') + files = os.listdir(dist_folder) + self.assertEquals(files, ['fake-1.0.zip']) + + zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything was added + self.assertEquals(len(content), 8) + + # checking the MANIFEST + manifest = open(join(self.tmp_dir, 'MANIFEST')).read() + self.assertEquals(manifest, MANIFEST) + def test_suite(): return unittest.makeSuite(sdistTestCase) From 431e410a6959dcad8b91db6b35d04ab9b956e787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 16 Feb 2009 21:51:13 +0000 Subject: [PATCH 2151/8469] Merged revisions 69693 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69693 | tarek.ziade | 2009-02-16 22:41:54 +0100 (Mon, 16 Feb 2009) | 1 line #2279: use os.sep so the MANIFEST file test work on win32 ........ --- tests/test_sdist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index de588112fd..b4e922f90c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -24,11 +24,11 @@ MANIFEST = """\ README setup.py -data/data.dt -scripts/script.py -somecode/__init__.py -somecode/doc.dat -somecode/doc.txt +data%(sep)sdata.dt +scripts%(sep)sscript.py +somecode%(sep)s__init__.py +somecode%(sep)sdoc.dat +somecode%(sep)sdoc.txt """ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): @@ -198,7 +198,7 @@ def test_add_defaults(self): # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() - self.assertEquals(manifest, MANIFEST) + self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) def test_suite(): return unittest.makeSuite(sdistTestCase) From 681c04f6333588b00ded56b7725cddc3ab2629d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 17 Feb 2009 09:42:44 +0000 Subject: [PATCH 2152/8469] #2279 added the plain path case for data_files --- command/sdist.py | 16 ++++++++++++---- tests/test_sdist.py | 14 +++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 291e8123b8..a1a0fb799d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -14,7 +14,7 @@ from distutils.errors import * from distutils.filelist import FileList from distutils import log - +from distutils.util import convert_path def show_formats (): """Print all possible values for the 'formats' option (used by @@ -311,9 +311,17 @@ def add_defaults (self): # getting distribution.data_files if self.distribution.has_data_files(): - for dirname, filenames in self.distribution.data_files: - for filename in filenames: - self.filelist.append(os.path.join(dirname, filename)) + for item in self.distribution.data_files: + if isinstance(item, str): # plain file + item = convert_path(item) + if os.path.isfile(item): + self.filelist.append(item) + else: # a (dirname, filenames) tuple + dirname, filenames = item + for f in filenames: + f = convert_path(os.path.join(dirname, f)) + if os.path.isfile(f): + self.filelist.append(f) if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b4e922f90c..82e5dc6db6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -26,6 +26,8 @@ setup.py data%(sep)sdata.dt scripts%(sep)sscript.py +some%(sep)sfile.txt +some%(sep)sother_file.txt somecode%(sep)s__init__.py somecode%(sep)sdoc.dat somecode%(sep)sdoc.txt @@ -167,7 +169,14 @@ def test_add_defaults(self): data_dir = join(self.tmp_dir, 'data') os.mkdir(data_dir) self.write_file((data_dir, 'data.dt'), '#') - dist.data_files = [('data', ['data.dt'])] + some_dir = join(self.tmp_dir, 'some') + os.mkdir(some_dir) + self.write_file((some_dir, 'file.txt'), '#') + self.write_file((some_dir, 'other_file.txt'), '#') + + dist.data_files = [('data', ['data.dt', 'notexisting']), + 'some/file.txt', + 'some/other_file.txt'] # adding a script script_dir = join(self.tmp_dir, 'scripts') @@ -175,7 +184,6 @@ def test_add_defaults(self): self.write_file((script_dir, 'script.py'), '#') dist.scripts = [join('scripts', 'script.py')] - cmd.formats = ['zip'] cmd.use_defaults = True @@ -194,7 +202,7 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 8) + self.assertEquals(len(content), 10) # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() From 0040fcb0a57bed6b39e790e05fd542f37a43c2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 17 Feb 2009 09:47:25 +0000 Subject: [PATCH 2153/8469] Merged revisions 69710 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69710 | tarek.ziade | 2009-02-17 10:42:44 +0100 (Tue, 17 Feb 2009) | 1 line #2279 added the plain path case for data_files ........ --- command/sdist.py | 16 ++++++++++++---- tests/test_sdist.py | 14 +++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index c057b667e8..9bb2ae04e0 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -15,7 +15,7 @@ from distutils.errors import * from distutils.filelist import FileList from distutils import log - +from distutils.util import convert_path def show_formats (): """Print all possible values for the 'formats' option (used by @@ -303,9 +303,17 @@ def add_defaults(self): # getting distribution.data_files if self.distribution.has_data_files(): - for dirname, filenames in self.distribution.data_files: - for filename in filenames: - self.filelist.append(os.path.join(dirname, filename)) + for item in self.distribution.data_files: + if isinstance(item, str): # plain file + item = convert_path(item) + if os.path.isfile(item): + self.filelist.append(item) + else: # a (dirname, filenames) tuple + dirname, filenames = item + for f in filenames: + f = convert_path(os.path.join(dirname, f)) + if os.path.isfile(f): + self.filelist.append(f) if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b4e922f90c..82e5dc6db6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -26,6 +26,8 @@ setup.py data%(sep)sdata.dt scripts%(sep)sscript.py +some%(sep)sfile.txt +some%(sep)sother_file.txt somecode%(sep)s__init__.py somecode%(sep)sdoc.dat somecode%(sep)sdoc.txt @@ -167,7 +169,14 @@ def test_add_defaults(self): data_dir = join(self.tmp_dir, 'data') os.mkdir(data_dir) self.write_file((data_dir, 'data.dt'), '#') - dist.data_files = [('data', ['data.dt'])] + some_dir = join(self.tmp_dir, 'some') + os.mkdir(some_dir) + self.write_file((some_dir, 'file.txt'), '#') + self.write_file((some_dir, 'other_file.txt'), '#') + + dist.data_files = [('data', ['data.dt', 'notexisting']), + 'some/file.txt', + 'some/other_file.txt'] # adding a script script_dir = join(self.tmp_dir, 'scripts') @@ -175,7 +184,6 @@ def test_add_defaults(self): self.write_file((script_dir, 'script.py'), '#') dist.scripts = [join('scripts', 'script.py')] - cmd.formats = ['zip'] cmd.use_defaults = True @@ -194,7 +202,7 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 8) + self.assertEquals(len(content), 10) # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() From 2a11a83c076445fd2992eba94358bb0a3add5e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 17 Feb 2009 23:06:51 +0000 Subject: [PATCH 2154/8469] fixed the data_files inclusion behavior --- command/sdist.py | 2 +- tests/test_sdist.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index a1a0fb799d..a9ce28a7eb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -319,7 +319,7 @@ def add_defaults (self): else: # a (dirname, filenames) tuple dirname, filenames = item for f in filenames: - f = convert_path(os.path.join(dirname, f)) + f = convert_path(f) if os.path.isfile(f): self.filelist.append(f) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 82e5dc6db6..9c579b40cb 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -23,6 +23,7 @@ MANIFEST = """\ README +inroot.txt setup.py data%(sep)sdata.dt scripts%(sep)sscript.py @@ -171,10 +172,13 @@ def test_add_defaults(self): self.write_file((data_dir, 'data.dt'), '#') some_dir = join(self.tmp_dir, 'some') os.mkdir(some_dir) + self.write_file((self.tmp_dir, 'inroot.txt'), '#') self.write_file((some_dir, 'file.txt'), '#') self.write_file((some_dir, 'other_file.txt'), '#') - dist.data_files = [('data', ['data.dt', 'notexisting']), + dist.data_files = [('data', ['data/data.dt', + 'inroot.txt', + 'notexisting']), 'some/file.txt', 'some/other_file.txt'] @@ -202,7 +206,7 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 10) + self.assertEquals(len(content), 11) # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() From b235b6fad51c8f78e05ccc88e5eddf43f7e2aaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 17 Feb 2009 23:10:18 +0000 Subject: [PATCH 2155/8469] Merged revisions 69724 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69724 | tarek.ziade | 2009-02-18 00:06:51 +0100 (Wed, 18 Feb 2009) | 1 line fixed the data_files inclusion behavior ........ --- command/sdist.py | 2 +- tests/test_sdist.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 9bb2ae04e0..1a64d0e3c1 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -311,7 +311,7 @@ def add_defaults(self): else: # a (dirname, filenames) tuple dirname, filenames = item for f in filenames: - f = convert_path(os.path.join(dirname, f)) + f = convert_path(f) if os.path.isfile(f): self.filelist.append(f) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 82e5dc6db6..9c579b40cb 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -23,6 +23,7 @@ MANIFEST = """\ README +inroot.txt setup.py data%(sep)sdata.dt scripts%(sep)sscript.py @@ -171,10 +172,13 @@ def test_add_defaults(self): self.write_file((data_dir, 'data.dt'), '#') some_dir = join(self.tmp_dir, 'some') os.mkdir(some_dir) + self.write_file((self.tmp_dir, 'inroot.txt'), '#') self.write_file((some_dir, 'file.txt'), '#') self.write_file((some_dir, 'other_file.txt'), '#') - dist.data_files = [('data', ['data.dt', 'notexisting']), + dist.data_files = [('data', ['data/data.dt', + 'inroot.txt', + 'notexisting']), 'some/file.txt', 'some/other_file.txt'] @@ -202,7 +206,7 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 10) + self.assertEquals(len(content), 11) # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() From 9f19d45baca8e8371e5706a41dfe3d6352f7a2dc Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 21 Feb 2009 20:27:01 +0000 Subject: [PATCH 2156/8469] Issue #5341: Fix a variety of spelling errors. --- tests/test_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index 55d2d5df7e..e481e8de39 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -57,7 +57,7 @@ def test_run_setup_provides_file(self): def test_run_setup_uses_current_dir(self): # This tests that the setup script is run with the current directory - # as it's own current directory; this was temporarily broken by a + # as its own current directory; this was temporarily broken by a # previous patch when TESTFN did not use the current directory. sys.stdout = StringIO.StringIO() cwd = os.getcwd() From 763718d5ed62b5076d9c022846e703eafa932a2f Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 21 Feb 2009 20:59:32 +0000 Subject: [PATCH 2157/8469] Merged revisions 69846 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........ --- tests/test_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index 170d76751e..7f021dcb3b 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -57,7 +57,7 @@ def test_run_setup_provides_file(self): def test_run_setup_uses_current_dir(self): # This tests that the setup script is run with the current directory - # as it's own current directory; this was temporarily broken by a + # as its own current directory; this was temporarily broken by a # previous patch when TESTFN did not use the current directory. sys.stdout = io.StringIO() cwd = os.getcwd() From c0250c3b53f9dc239e467e52403e1dd464b59130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 22 Feb 2009 19:58:12 +0000 Subject: [PATCH 2158/8469] moved distutils.text_file tests into a real unittest class --- tests/test_text_file.py | 87 +++++++++++++++++++++++++++++++++++++++++ text_file.py | 77 ------------------------------------ 2 files changed, 87 insertions(+), 77 deletions(-) create mode 100644 tests/test_text_file.py diff --git a/tests/test_text_file.py b/tests/test_text_file.py new file mode 100644 index 0000000000..8f4f7e83c0 --- /dev/null +++ b/tests/test_text_file.py @@ -0,0 +1,87 @@ +"""Tests for distutils.text_file.""" +import os +import unittest +from distutils.text_file import TextFile +from distutils.tests import support + +TEST_DATA = """# test file + +line 3 \\ +# intervening comment + continues on next line +""" + +class TextFileTestCase(support.TempdirManager, unittest.TestCase): + + def test_class(self): + # old tests moved from text_file.__main__ + # so they are really called by the buildbots + + # result 1: no fancy options + result1 = map(lambda x: x + "\n", + TEST_DATA.split("\n")[0:-1]) + + # result 2: just strip comments + result2 = ["\n", + "line 3 \\\n", + " continues on next line\n"] + + # result 3: just strip blank lines + result3 = ["# test file\n", + "line 3 \\\n", + "# intervening comment\n", + " continues on next line\n"] + + # result 4: default, strip comments, blank lines, + # and trailing whitespace + result4 = ["line 3 \\", + " continues on next line"] + + # result 5: strip comments and blanks, plus join lines (but don't + # "collapse" joined lines + result5 = ["line 3 continues on next line"] + + # result 6: strip comments and blanks, plus join lines (and + # "collapse" joined lines + result6 = ["line 3 continues on next line"] + + def test_input(count, description, file, expected_result): + result = file.readlines() + self.assertEquals(result, expected_result) + + tmpdir = self.mkdtemp() + filename = os.path.join(tmpdir, "test.txt") + out_file = open(filename, "w") + try: + out_file.write(TEST_DATA) + finally: + out_file.close() + + in_file = TextFile (filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (1, "no processing", in_file, result1) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (2, "strip comments", in_file, result2) + + in_file = TextFile (filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + test_input (3, "strip blanks", in_file, result3) + + in_file = TextFile (filename) + test_input (4, "default processing", in_file, result4) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + test_input (5, "join lines without collapsing", in_file, result5) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + test_input (6, "join lines with collapsing", in_file, result6) + +def test_suite(): + return unittest.makeSuite(TextFileTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/text_file.py b/text_file.py index ff2878de1b..931f0bac19 100644 --- a/text_file.py +++ b/text_file.py @@ -303,80 +303,3 @@ def unreadline (self, line): a parser with line-at-a-time lookahead.""" self.linebuf.append (line) - - -if __name__ == "__main__": - test_data = """# test file - -line 3 \\ -# intervening comment - continues on next line -""" - # result 1: no fancy options - result1 = map (lambda x: x + "\n", string.split (test_data, "\n")[0:-1]) - - # result 2: just strip comments - result2 = ["\n", - "line 3 \\\n", - " continues on next line\n"] - - # result 3: just strip blank lines - result3 = ["# test file\n", - "line 3 \\\n", - "# intervening comment\n", - " continues on next line\n"] - - # result 4: default, strip comments, blank lines, and trailing whitespace - result4 = ["line 3 \\", - " continues on next line"] - - # result 5: strip comments and blanks, plus join lines (but don't - # "collapse" joined lines - result5 = ["line 3 continues on next line"] - - # result 6: strip comments and blanks, plus join lines (and - # "collapse" joined lines - result6 = ["line 3 continues on next line"] - - def test_input (count, description, file, expected_result): - result = file.readlines () - # result = string.join (result, '') - if result == expected_result: - print "ok %d (%s)" % (count, description) - else: - print "not ok %d (%s):" % (count, description) - print "** expected:" - print expected_result - print "** received:" - print result - - - filename = "test.txt" - out_file = open (filename, "w") - out_file.write (test_data) - out_file.close () - - in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (1, "no processing", in_file, result1) - - in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (2, "strip comments", in_file, result2) - - in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input (3, "strip blanks", in_file, result3) - - in_file = TextFile (filename) - test_input (4, "default processing", in_file, result4) - - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input (5, "join lines without collapsing", in_file, result5) - - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input (6, "join lines with collapsing", in_file, result6) - - os.remove (filename) From 91c68e1501720ba1fb7c6533c469a0972be2ebed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 22 Feb 2009 20:05:16 +0000 Subject: [PATCH 2159/8469] Merged revisions 69874 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69874 | tarek.ziade | 2009-02-22 20:58:12 +0100 (Sun, 22 Feb 2009) | 1 line moved distutils.text_file tests into a real unittest class ........ --- tests/test_text_file.py | 88 +++++++++++++++++++++++++++++++++++++++++ text_file.py | 77 ------------------------------------ 2 files changed, 88 insertions(+), 77 deletions(-) create mode 100644 tests/test_text_file.py diff --git a/tests/test_text_file.py b/tests/test_text_file.py new file mode 100644 index 0000000000..00f083a130 --- /dev/null +++ b/tests/test_text_file.py @@ -0,0 +1,88 @@ +"""Tests for distutils.text_file.""" +import os +import unittest +from distutils.text_file import TextFile +from distutils.tests import support + +TEST_DATA = """# test file + +line 3 \\ +# intervening comment + continues on next line +""" + +class TextFileTestCase(support.TempdirManager, unittest.TestCase): + + def test_class(self): + # old tests moved from text_file.__main__ + # so they are really called by the buildbots + + # result 1: no fancy options + result1 = ['# test file\n', '\n', 'line 3 \\\n', + '# intervening comment\n', + ' continues on next line\n'] + + # result 2: just strip comments + result2 = ["\n", + "line 3 \\\n", + " continues on next line\n"] + + # result 3: just strip blank lines + result3 = ["# test file\n", + "line 3 \\\n", + "# intervening comment\n", + " continues on next line\n"] + + # result 4: default, strip comments, blank lines, + # and trailing whitespace + result4 = ["line 3 \\", + " continues on next line"] + + # result 5: strip comments and blanks, plus join lines (but don't + # "collapse" joined lines + result5 = ["line 3 continues on next line"] + + # result 6: strip comments and blanks, plus join lines (and + # "collapse" joined lines + result6 = ["line 3 continues on next line"] + + def test_input(count, description, file, expected_result): + result = file.readlines() + self.assertEquals(result, expected_result) + + tmpdir = self.mkdtemp() + filename = os.path.join(tmpdir, "test.txt") + out_file = open(filename, "w") + try: + out_file.write(TEST_DATA) + finally: + out_file.close() + + in_file = TextFile (filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (1, "no processing", in_file, result1) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + test_input (2, "strip comments", in_file, result2) + + in_file = TextFile (filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + test_input (3, "strip blanks", in_file, result3) + + in_file = TextFile (filename) + test_input (4, "default processing", in_file, result4) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + test_input (5, "join lines without collapsing", in_file, result5) + + in_file = TextFile (filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + test_input (6, "join lines with collapsing", in_file, result6) + +def test_suite(): + return unittest.makeSuite(TextFileTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/text_file.py b/text_file.py index 266466c1eb..97459fbf73 100644 --- a/text_file.py +++ b/text_file.py @@ -282,80 +282,3 @@ def unreadline(self, line): checked by future 'readline()' calls. Handy for implementing a parser with line-at-a-time lookahead.""" self.linebuf.append(line) - - -if __name__ == "__main__": - test_data = """# test file - -line 3 \\ -# intervening comment - continues on next line -""" - # result 1: no fancy options - result1 = [x + "\n" for x in test_data.split("\n")[:-1]] - - # result 2: just strip comments - result2 = ["\n", - "line 3 \\\n", - " continues on next line\n"] - - # result 3: just strip blank lines - result3 = ["# test file\n", - "line 3 \\\n", - "# intervening comment\n", - " continues on next line\n"] - - # result 4: default, strip comments, blank lines, and trailing whitespace - result4 = ["line 3 \\", - " continues on next line"] - - # result 5: strip comments and blanks, plus join lines (but don't - # "collapse" joined lines - result5 = ["line 3 continues on next line"] - - # result 6: strip comments and blanks, plus join lines (and - # "collapse" joined lines - result6 = ["line 3 continues on next line"] - - def test_input(count, description, file, expected_result): - result = file.readlines() - if result == expected_result: - print("ok %d (%s)" % (count, description)) - else: - print("not ok %d (%s):" % (count, description)) - print("** expected:") - print(expected_result) - print("** received:") - print(result) - - - filename = "test.txt" - out_file = open(filename, "w") - out_file.write(test_data) - out_file.close() - - in_file = TextFile(filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input(1, "no processing", in_file, result1) - - in_file = TextFile(filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input(2, "strip comments", in_file, result2) - - in_file = TextFile(filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input(3, "strip blanks", in_file, result3) - - in_file = TextFile(filename) - test_input(4, "default processing", in_file, result4) - - in_file = TextFile(filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input(5, "join lines without collapsing", in_file, result5) - - in_file = TextFile(filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input(6, "join lines with collapsing", in_file, result6) - - del in_file - os.remove(filename) From df1fb3abf4e8b2bcaaedd4057dd3a4ff2d4231fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 22 Feb 2009 20:11:46 +0000 Subject: [PATCH 2160/8469] removing map and lambda usage, so the test is similar to py3k's branch one --- tests/test_text_file.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 8f4f7e83c0..00f083a130 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -18,8 +18,9 @@ def test_class(self): # so they are really called by the buildbots # result 1: no fancy options - result1 = map(lambda x: x + "\n", - TEST_DATA.split("\n")[0:-1]) + result1 = ['# test file\n', '\n', 'line 3 \\\n', + '# intervening comment\n', + ' continues on next line\n'] # result 2: just strip comments result2 = ["\n", From 305462a33f5cb3a50f50fb3c913b59e8e34eb4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 22 Feb 2009 20:15:41 +0000 Subject: [PATCH 2161/8469] Removing unused __main__ sections --- cmd.py | 4 ---- dist.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/cmd.py b/cmd.py index 1351f445c3..012fca15b5 100644 --- a/cmd.py +++ b/cmd.py @@ -474,7 +474,3 @@ def _copy_files (self, filelist): def get_outputs (self): return self.outfiles - - -if __name__ == "__main__": - print "ok" diff --git a/dist.py b/dist.py index 3dd776ccd2..2d57ad09e9 100644 --- a/dist.py +++ b/dist.py @@ -1224,8 +1224,3 @@ def fix_help_options (options): for help_tuple in options: new_options.append(help_tuple[0:3]) return new_options - - -if __name__ == "__main__": - dist = Distribution() - print "ok" From ead790166c33119b238f8d4b9356390dd8c2a9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 22 Feb 2009 20:20:59 +0000 Subject: [PATCH 2162/8469] Merged revisions 69881 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69881 | tarek.ziade | 2009-02-22 21:15:41 +0100 (Sun, 22 Feb 2009) | 1 line Removing unused __main__ sections ........ --- cmd.py | 4 ---- dist.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/cmd.py b/cmd.py index 295c914032..800425d4a9 100644 --- a/cmd.py +++ b/cmd.py @@ -436,7 +436,3 @@ def _copy_files (self, filelist): def get_outputs (self): return self.outfiles - - -if __name__ == "__main__": - print("ok") diff --git a/dist.py b/dist.py index 6c4b4afbd1..7c30e8856f 100644 --- a/dist.py +++ b/dist.py @@ -1180,8 +1180,3 @@ def fix_help_options (options): for help_tuple in options: new_options.append(help_tuple[0:3]) return new_options - - -if __name__ == "__main__": - dist = Distribution() - print("ok") From e092af3741d37b82a06bcefab24e76dd23baab8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 23 Feb 2009 12:41:29 +0000 Subject: [PATCH 2163/8469] more test coverage --- tests/test_bdist_dumb.py | 80 ++++++++++++++++++++++++++++++++++++++++ tests/test_version.py | 70 +++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 tests/test_bdist_dumb.py create mode 100644 tests/test_version.py diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py new file mode 100644 index 0000000000..2863b620db --- /dev/null +++ b/tests/test_bdist_dumb.py @@ -0,0 +1,80 @@ +"""Tests for distutils.command.bdist_dumb.""" + +import unittest +import sys +import os + +from distutils.core import Distribution +from distutils.command.bdist_dumb import bdist_dumb +from distutils.tests import support + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + +class BuildDumbTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def setUp(self): + support.TempdirManager.setUp(self) + support.LoggingSilencer.setUp(self) + self.old_location = os.getcwd() + self.old_sys_argv = sys.argv[:] + + def tearDown(self): + os.chdir(self.old_location) + sys.argv = self.old_sys_argv[:] + support.LoggingSilencer.tearDown(self) + support.TempdirManager.tearDown(self) + + def test_simple_built(self): + + # let's create a simple package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_dumb(dist) + + # so the output is the same no matter + # what is the platform + cmd.format = 'zip' + + cmd.ensure_finalized() + cmd.run() + + # see what we have + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + base = "%s.%s" % (dist.get_fullname(), cmd.plat_name) + if os.name == 'os2': + base = base.replace(':', '-') + + wanted = ['%s.zip' % base] + self.assertEquals(dist_created, wanted) + + # now let's check what we have in the zip file + # XXX to be done + +def test_suite(): + return unittest.makeSuite(BuildDumbTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000000..747db94804 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,70 @@ +"""Tests for distutils.version.""" +import unittest +from distutils.version import LooseVersion +from distutils.version import StrictVersion + +class VersionTestCase(unittest.TestCase): + + def test_prerelease(self): + version = StrictVersion('1.2.3a1') + self.assertEquals(version.version, (1, 2, 3)) + self.assertEquals(version.prerelease, ('a', 1)) + self.assertEquals(str(version), '1.2.3a1') + + version = StrictVersion('1.2.0') + self.assertEquals(str(version), '1.2') + + def test_cmp_strict(self): + versions = (('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', ValueError), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', ValueError), + ('3.2.pl0', '3.1.1.6', ValueError), + ('2g6', '11g', ValueError), + ('0.9', '2.2', -1), + ('1.2.1', '1.2', 1), + ('1.1', '1.2.2', -1), + ('1.2', '1.1', 1), + ('1.2.1', '1.2.2', -1), + ('1.2.2', '1.2', 1), + ('1.2', '1.2.2', -1), + ('0.4.0', '0.4', 0), + ('1.13++', '5.5.kw', ValueError)) + + for v1, v2, wanted in versions: + try: + res = StrictVersion(v1).__cmp__(StrictVersion(v2)) + except ValueError: + if wanted is ValueError: + continue + else: + raise AssertionError(("cmp(%s, %s) " + "shouldn't raise ValueError") + % (v1, v2)) + self.assertEquals(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + + + def test_cmp(self): + versions = (('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', 1), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', -1), + ('3.2.pl0', '3.1.1.6', 1), + ('2g6', '11g', -1), + ('0.960923', '2.2beta29', -1), + ('1.13++', '5.5.kw', -1)) + + + for v1, v2, wanted in versions: + res = LooseVersion(v1).__cmp__(LooseVersion(v2)) + self.assertEquals(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + +def test_suite(): + return unittest.makeSuite(VersionTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 3fa4cb44a2c238a7fe8569e149332937dc3e39ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 23 Feb 2009 12:47:55 +0000 Subject: [PATCH 2164/8469] Merged revisions 69902 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69902 | tarek.ziade | 2009-02-23 13:41:29 +0100 (Mon, 23 Feb 2009) | 1 line more test coverage ........ --- tests/test_bdist_dumb.py | 80 ++++++++++++++++++++++++++++++++++++++++ tests/test_version.py | 70 +++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 tests/test_bdist_dumb.py create mode 100644 tests/test_version.py diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py new file mode 100644 index 0000000000..2863b620db --- /dev/null +++ b/tests/test_bdist_dumb.py @@ -0,0 +1,80 @@ +"""Tests for distutils.command.bdist_dumb.""" + +import unittest +import sys +import os + +from distutils.core import Distribution +from distutils.command.bdist_dumb import bdist_dumb +from distutils.tests import support + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + +class BuildDumbTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def setUp(self): + support.TempdirManager.setUp(self) + support.LoggingSilencer.setUp(self) + self.old_location = os.getcwd() + self.old_sys_argv = sys.argv[:] + + def tearDown(self): + os.chdir(self.old_location) + sys.argv = self.old_sys_argv[:] + support.LoggingSilencer.tearDown(self) + support.TempdirManager.tearDown(self) + + def test_simple_built(self): + + # let's create a simple package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_dumb(dist) + + # so the output is the same no matter + # what is the platform + cmd.format = 'zip' + + cmd.ensure_finalized() + cmd.run() + + # see what we have + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + base = "%s.%s" % (dist.get_fullname(), cmd.plat_name) + if os.name == 'os2': + base = base.replace(':', '-') + + wanted = ['%s.zip' % base] + self.assertEquals(dist_created, wanted) + + # now let's check what we have in the zip file + # XXX to be done + +def test_suite(): + return unittest.makeSuite(BuildDumbTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000000..fa21433046 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,70 @@ +"""Tests for distutils.version.""" +import unittest +from distutils.version import LooseVersion +from distutils.version import StrictVersion + +class VersionTestCase(unittest.TestCase): + + def test_prerelease(self): + version = StrictVersion('1.2.3a1') + self.assertEquals(version.version, (1, 2, 3)) + self.assertEquals(version.prerelease, ('a', 1)) + self.assertEquals(str(version), '1.2.3a1') + + version = StrictVersion('1.2.0') + self.assertEquals(str(version), '1.2') + + def test_cmp_strict(self): + versions = (('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', ValueError), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', ValueError), + ('3.2.pl0', '3.1.1.6', ValueError), + ('2g6', '11g', ValueError), + ('0.9', '2.2', -1), + ('1.2.1', '1.2', 1), + ('1.1', '1.2.2', -1), + ('1.2', '1.1', 1), + ('1.2.1', '1.2.2', -1), + ('1.2.2', '1.2', 1), + ('1.2', '1.2.2', -1), + ('0.4.0', '0.4', 0), + ('1.13++', '5.5.kw', ValueError)) + + for v1, v2, wanted in versions: + try: + res = StrictVersion(v1)._cmp(StrictVersion(v2)) + except ValueError: + if wanted is ValueError: + continue + else: + raise AssertionError(("cmp(%s, %s) " + "shouldn't raise ValueError") + % (v1, v2)) + self.assertEquals(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + + + def test_cmp(self): + versions = (('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', 1), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', -1), + ('3.2.pl0', '3.1.1.6', 1), + ('2g6', '11g', -1), + ('0.960923', '2.2beta29', -1), + ('1.13++', '5.5.kw', -1)) + + + for v1, v2, wanted in versions: + res = LooseVersion(v1)._cmp(LooseVersion(v2)) + self.assertEquals(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + +def test_suite(): + return unittest.makeSuite(VersionTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 9841cdd9d6e09f214265adaefc1b5b43c25ade1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 25 Feb 2009 22:29:27 +0000 Subject: [PATCH 2165/8469] Fixed #5316 : test failure in test_site --- tests/test_config.py | 4 ++-- tests/test_sdist.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index d81276928a..a18f45359a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -51,7 +51,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): """Patches the environment.""" - support.TempdirManager.setUp(self) + super(PyPIRCCommandTestCase, self).setUp() if os.environ.has_key('HOME'): self._old_home = os.environ['HOME'] @@ -79,7 +79,7 @@ def tearDown(self): else: os.environ['HOME'] = self._old_home set_threshold(self.old_threshold) - support.TempdirManager.tearDown(self) + super(PyPIRCCommandTestCase, self).tearDown() def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 9c579b40cb..15a8c8087c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -37,10 +37,9 @@ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): def setUp(self): - support.LoggingSilencer.setUp(self) # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir - PyPIRCCommandTestCase.setUp(self) + super(sdistTestCase, self).setUp() # setting up an environment self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) @@ -54,8 +53,7 @@ def setUp(self): def tearDown(self): # back to normal os.chdir(self.old_path) - PyPIRCCommandTestCase.tearDown(self) - support.LoggingSilencer.tearDown(self) + super(sdistTestCase, self).tearDown() def get_cmd(self, metadata=None): """Returns a cmd""" From 706b92c2ebd63afe86a4d0e31d86011dcaf017f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 25 Feb 2009 22:31:38 +0000 Subject: [PATCH 2166/8469] Merged revisions 69976 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69976 | tarek.ziade | 2009-02-25 23:29:27 +0100 (Wed, 25 Feb 2009) | 1 line Fixed #5316 : test failure in test_site ........ --- tests/test_config.py | 4 ++-- tests/test_sdist.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 0df6af8412..09abfcd8ba 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -50,7 +50,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): """Patches the environment.""" - support.TempdirManager.setUp(self) + super(PyPIRCCommandTestCase, self).setUp() if 'HOME' in os.environ: self._old_home = os.environ['HOME'] @@ -78,7 +78,7 @@ def tearDown(self): else: os.environ['HOME'] = self._old_home set_threshold(self.old_threshold) - support.TempdirManager.tearDown(self) + super(PyPIRCCommandTestCase, self).tearDown() def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 9c579b40cb..15a8c8087c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -37,10 +37,9 @@ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): def setUp(self): - support.LoggingSilencer.setUp(self) # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir - PyPIRCCommandTestCase.setUp(self) + super(sdistTestCase, self).setUp() # setting up an environment self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) @@ -54,8 +53,7 @@ def setUp(self): def tearDown(self): # back to normal os.chdir(self.old_path) - PyPIRCCommandTestCase.tearDown(self) - support.LoggingSilencer.tearDown(self) + super(sdistTestCase, self).tearDown() def get_cmd(self, metadata=None): """Returns a cmd""" From 9daeb929f037438cec1b32dd526a5de62581b769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 26 Feb 2009 23:44:00 +0000 Subject: [PATCH 2167/8469] removed unused import --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2ed3ef65cc..ac0a0670a1 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -8,7 +8,7 @@ import sys, os, string, re from types import * -from site import USER_BASE, USER_SITE +from site import USER_BASE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version From 73ac2e14e27f78bd054a1192099437777bc87c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 26 Feb 2009 23:47:00 +0000 Subject: [PATCH 2168/8469] Merged revisions 70003 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70003 | tarek.ziade | 2009-02-27 00:44:00 +0100 (Fri, 27 Feb 2009) | 1 line removed unused import ........ --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index b12da63f84..1d5a75d2c5 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" import sys, os, re -from site import USER_BASE, USER_SITE +from site import USER_BASE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version From 8ac6d0fd24f52432843766fc24fbe20fb618ebb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 27 Feb 2009 12:53:34 +0000 Subject: [PATCH 2169/8469] Issue #5052: make Distutils compatible with 2.3 again. --- README | 2 + command/build_ext.py | 18 +++++++-- command/install.py | 83 ++++++++++++++++++++++++++--------------- command/upload.py | 7 +++- tests/test_build_ext.py | 47 ++++++++++++++++++++++- tests/test_install.py | 64 +++++++++++++++++++++++++++++++ 6 files changed, 183 insertions(+), 38 deletions(-) diff --git a/README b/README index 23f488506f..408a203b85 100644 --- a/README +++ b/README @@ -8,4 +8,6 @@ The Distutils-SIG web page is also a good starting point: http://www.python.org/sigs/distutils-sig/ +WARNING : Distutils must remain compatible with 2.3 + $Id$ diff --git a/command/build_ext.py b/command/build_ext.py index ac0a0670a1..125fa7f52d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -8,7 +8,6 @@ import sys, os, string, re from types import * -from site import USER_BASE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -17,6 +16,14 @@ from distutils.util import get_platform from distutils import log +# this keeps compatibility from 2.3 to 2.5 +if sys.version < "2.6": + USER_BASE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + HAS_USER_SITE = True + if os.name == 'nt': from distutils.msvccompiler import get_build_version MSVC_VERSION = int(get_build_version()) @@ -92,11 +99,14 @@ class build_ext (Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), - ('user', None, - "add user include, library and rpath"), ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + + if HAS_USER_SITE: + user_options.append(('user', None, + "add user include, library and rpath")) + boolean_options.append('user') help_options = [ ('help-compiler', None, diff --git a/command/install.py b/command/install.py index adc9daf11a..4fd66cbf60 100644 --- a/command/install.py +++ b/command/install.py @@ -16,9 +16,16 @@ from distutils.util import convert_path, subst_vars, change_root from distutils.util import get_platform from distutils.errors import DistutilsOptionError -from site import USER_BASE -from site import USER_SITE +# this keeps compatibility from 2.3 to 2.5 +if sys.version < "2.6": + USER_BASE = None + USER_SITE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True if sys.version < "2.2": WINDOWS_SCHEME = { @@ -52,21 +59,7 @@ 'scripts': '$base/bin', 'data' : '$base', }, - 'unix_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, 'nt': WINDOWS_SCHEME, - 'nt_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', - 'data' : '$userbase', - }, 'mac': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -74,13 +67,7 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, - 'mac_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, + 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -88,14 +75,41 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, - 'os2_home': { + } + +# user site schemes +if HAS_USER_SITE: + INSTALL_SCHEMES['nt_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + } + + INSTALL_SCHEMES['unix_user'] = { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', - }, - } + } + + INSTALL_SCHEMES['mac_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } + + INSTALL_SCHEMES['os2_home'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } # The keys to an installation scheme; if any new types of files are to be # installed, be sure to add an entry to every installation scheme above, @@ -115,8 +129,6 @@ class install (Command): "(Unix only) prefix for platform-specific files"), ('home=', None, "(Unix only) home directory to install under"), - ('user', None, - "install in user site-package '%s'" % USER_SITE), # Or, just set the base director(y|ies) ('install-base=', None, @@ -168,7 +180,13 @@ class install (Command): "filename in which to record list of installed files"), ] - boolean_options = ['compile', 'force', 'skip-build', 'user'] + boolean_options = ['compile', 'force', 'skip-build'] + + if HAS_USER_SITE: + user_options.append(('user', None, + "install in user site-package '%s'" % USER_SITE)) + boolean_options.append('user') + negative_opt = {'no-compile' : 'compile'} @@ -320,9 +338,12 @@ def finalize_options (self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, - 'userbase': self.install_userbase, - 'usersite': self.install_usersite, } + + if HAS_USER_SITE: + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite + self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") diff --git a/command/upload.py b/command/upload.py index e30347e507..df82e4ca56 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log -from hashlib import md5 +import sys import os import socket import platform @@ -16,6 +16,11 @@ import cStringIO as StringIO from ConfigParser import ConfigParser +# this keeps compatibility for 2.3 and 2.4 +if sys.version < "2.5": + from md5 import md5 +else: + from hashlib import md5 class upload(PyPIRCCommand): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a38558b007..ff60c12b1a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -24,11 +24,17 @@ class BuildExtTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - support.TempdirManager.setUp(self) + super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) + if sys.version > "2.6": + import site + self.old_user_base = site.USER_BASE + site.USER_BASE = self.mkdtemp() + from distutils.command import build_ext + build_ext.USER_BASE = site.USER_BASE def test_build_ext(self): global ALREADY_TESTED @@ -76,7 +82,13 @@ def tearDown(self): # Get everything back to normal test_support.unload('xx') sys.path = self.sys_path - support.TempdirManager.tearDown(self) + if sys.version > "2.6": + import site + site.USER_BASE = self.old_user_base + from distutils.command import build_ext + build_ext.USER_BASE = self.old_user_base + + super(BuildExtTestCase, self).tearDown() def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) @@ -99,6 +111,37 @@ def test_solaris_enable_shared(self): # make sur we get some lobrary dirs under solaris self.assert_(len(cmd.library_dirs) > 0) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + import site + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + + # making sure the suer option is there + options = [name for name, short, lable in + cmd.user_options] + self.assert_('user' in options) + + # setting a value + cmd.user = 1 + + # setting user based lib and include + lib = os.path.join(site.USER_BASE, 'lib') + incl = os.path.join(site.USER_BASE, 'include') + os.mkdir(lib) + os.mkdir(incl) + + # let's run finalize + cmd.ensure_finalized() + + # see if include_dirs and library_dirs + # were set + self.assert_(lib in cmd.library_dirs) + self.assert_(incl in cmd.include_dirs) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): diff --git a/tests/test_install.py b/tests/test_install.py index c834b91b38..9ceccf68cf 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,9 +1,14 @@ """Tests for distutils.command.install.""" import os +import os.path +import sys import unittest +import site from distutils.command.install import install +from distutils.command import install as install_module +from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.tests import support @@ -47,6 +52,65 @@ def check_path(got, expected): check_path(cmd.install_scripts, os.path.join(destination, "bin")) check_path(cmd.install_data, destination) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + # preparing the environement for the test + self.old_user_base = site.USER_BASE + self.old_user_site = site.USER_SITE + self.tmpdir = self.mkdtemp() + self.user_base = os.path.join(self.tmpdir, 'B') + self.user_site = os.path.join(self.tmpdir, 'S') + site.USER_BASE = self.user_base + site.USER_SITE = self.user_site + install_module.USER_BASE = self.user_base + install_module.USER_SITE = self.user_site + + def _expanduser(path): + return self.tmpdir + self.old_expand = os.path.expanduser + os.path.expanduser = _expanduser + + try: + # this is the actual test + self._test_user_site() + finally: + site.USER_BASE = self.old_user_base + site.USER_SITE = self.old_user_site + install_module.USER_BASE = self.old_user_base + install_module.USER_SITE = self.old_user_site + os.path.expanduser = self.old_expand + + def _test_user_site(self): + for key in ('nt_user', 'unix_user', 'os2_home'): + self.assert_(key in INSTALL_SCHEMES) + + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # making sure the user option is there + options = [name for name, short, lable in + cmd.user_options] + self.assert_('user' in options) + + # setting a value + cmd.user = 1 + + # user base and site shouldn't be created yet + self.assert_(not os.path.exists(self.user_base)) + self.assert_(not os.path.exists(self.user_site)) + + # let's run finalize + cmd.ensure_finalized() + + # now they should + self.assert_(os.path.exists(self.user_base)) + self.assert_(os.path.exists(self.user_site)) + + self.assert_('userbase' in cmd.config_vars) + self.assert_('usersite' in cmd.config_vars) def test_suite(): return unittest.makeSuite(InstallTestCase) From 42e1c973f8cb4baba16a761b1aa6263ee5f47278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 27 Feb 2009 12:58:56 +0000 Subject: [PATCH 2170/8469] Merged revisions 70017 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70017 | tarek.ziade | 2009-02-27 13:53:34 +0100 (Fri, 27 Feb 2009) | 1 line Issue #5052: make Distutils compatible with 2.3 again. ........ --- README | 2 + command/build_ext.py | 18 +++++++-- command/install.py | 83 ++++++++++++++++++++++++++--------------- command/upload.py | 8 +++- tests/test_build_ext.py | 46 ++++++++++++++++++++++- tests/test_install.py | 64 +++++++++++++++++++++++++++++++ 6 files changed, 183 insertions(+), 38 deletions(-) diff --git a/README b/README index 23f488506f..408a203b85 100644 --- a/README +++ b/README @@ -8,4 +8,6 @@ The Distutils-SIG web page is also a good starting point: http://www.python.org/sigs/distutils-sig/ +WARNING : Distutils must remain compatible with 2.3 + $Id$ diff --git a/command/build_ext.py b/command/build_ext.py index 1d5a75d2c5..1ed69f33c0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -7,7 +7,6 @@ __revision__ = "$Id$" import sys, os, re -from site import USER_BASE from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -16,6 +15,14 @@ from distutils.util import get_platform from distutils import log +# this keeps compatibility from 2.3 to 2.5 +if sys.version < "2.6": + USER_BASE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + HAS_USER_SITE = True + if os.name == 'nt': from distutils.msvccompiler import get_build_version MSVC_VERSION = int(get_build_version()) @@ -91,11 +98,14 @@ class build_ext(Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), - ('user', None, - "add user include, library and rpath"), ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] + + if HAS_USER_SITE: + user_options.append(('user', None, + "add user include, library and rpath")) + boolean_options.append('user') help_options = [ ('help-compiler', None, diff --git a/command/install.py b/command/install.py index b5c9554d61..de81173387 100644 --- a/command/install.py +++ b/command/install.py @@ -15,9 +15,16 @@ from distutils.util import convert_path, subst_vars, change_root from distutils.util import get_platform from distutils.errors import DistutilsOptionError -from site import USER_BASE -from site import USER_SITE +# this keeps compatibility from 2.3 to 2.5 +if sys.version < "2.6": + USER_BASE = None + USER_SITE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True if sys.version < "2.2": WINDOWS_SCHEME = { @@ -51,21 +58,7 @@ 'scripts': '$base/bin', 'data' : '$base', }, - 'unix_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, 'nt': WINDOWS_SCHEME, - 'nt_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', - 'data' : '$userbase', - }, 'mac': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -73,13 +66,7 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, - 'mac_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, + 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -87,14 +74,41 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, - 'os2_home': { + } + +# user site schemes +if HAS_USER_SITE: + INSTALL_SCHEMES['nt_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + } + + INSTALL_SCHEMES['unix_user'] = { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', - }, - } + } + + INSTALL_SCHEMES['mac_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } + + INSTALL_SCHEMES['os2_home'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } # The keys to an installation scheme; if any new types of files are to be # installed, be sure to add an entry to every installation scheme above, @@ -114,8 +128,6 @@ class install (Command): "(Unix only) prefix for platform-specific files"), ('home=', None, "(Unix only) home directory to install under"), - ('user', None, - "install in user site-package '%s'" % USER_SITE), # Or, just set the base director(y|ies) ('install-base=', None, @@ -167,7 +179,13 @@ class install (Command): "filename in which to record list of installed files"), ] - boolean_options = ['compile', 'force', 'skip-build', 'user'] + boolean_options = ['compile', 'force', 'skip-build'] + + if HAS_USER_SITE: + user_options.append(('user', None, + "install in user site-package '%s'" % USER_SITE)) + boolean_options.append('user') + negative_opt = {'no-compile' : 'compile'} @@ -319,9 +337,12 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, - 'userbase': self.install_userbase, - 'usersite': self.install_usersite, } + + if HAS_USER_SITE: + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite + self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") diff --git a/command/upload.py b/command/upload.py index 020e860a6d..eb2f51678a 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log -from hashlib import md5 +import sys import os, io import socket import platform @@ -15,6 +15,12 @@ import base64 import urllib.parse +# this keeps compatibility for 2.3 and 2.4 +if sys.version < "2.5": + from md5 import md5 +else: + from hashlib import md5 + class upload(PyPIRCCommand): description = "upload binary package to PyPI" diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 91b3de85d2..2e47953ee3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -24,11 +24,17 @@ class BuildExtTestCase(TempdirManager, unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - TempdirManager.setUp(self) + super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) + if sys.version > "2.6": + import site + self.old_user_base = site.USER_BASE + site.USER_BASE = self.mkdtemp() + from distutils.command import build_ext + build_ext.USER_BASE = site.USER_BASE def test_build_ext(self): global ALREADY_TESTED @@ -76,7 +82,12 @@ def tearDown(self): # Get everything back to normal support.unload('xx') sys.path = self.sys_path - TempdirManager.tearDown(self) + if sys.version > "2.6": + import site + site.USER_BASE = self.old_user_base + from distutils.command import build_ext + build_ext.USER_BASE = self.old_user_base + super(BuildExtTestCase, self).tearDown() def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) @@ -99,6 +110,37 @@ def test_solaris_enable_shared(self): # make sur we get some lobrary dirs under solaris self.assert_(len(cmd.library_dirs) > 0) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + import site + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + + # making sure the suer option is there + options = [name for name, short, lable in + cmd.user_options] + self.assert_('user' in options) + + # setting a value + cmd.user = 1 + + # setting user based lib and include + lib = os.path.join(site.USER_BASE, 'lib') + incl = os.path.join(site.USER_BASE, 'include') + os.mkdir(lib) + os.mkdir(incl) + + # let's run finalize + cmd.ensure_finalized() + + # see if include_dirs and library_dirs + # were set + self.assert_(lib in cmd.library_dirs) + self.assert_(incl in cmd.include_dirs) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): diff --git a/tests/test_install.py b/tests/test_install.py index c834b91b38..9ceccf68cf 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,9 +1,14 @@ """Tests for distutils.command.install.""" import os +import os.path +import sys import unittest +import site from distutils.command.install import install +from distutils.command import install as install_module +from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.tests import support @@ -47,6 +52,65 @@ def check_path(got, expected): check_path(cmd.install_scripts, os.path.join(destination, "bin")) check_path(cmd.install_data, destination) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + # preparing the environement for the test + self.old_user_base = site.USER_BASE + self.old_user_site = site.USER_SITE + self.tmpdir = self.mkdtemp() + self.user_base = os.path.join(self.tmpdir, 'B') + self.user_site = os.path.join(self.tmpdir, 'S') + site.USER_BASE = self.user_base + site.USER_SITE = self.user_site + install_module.USER_BASE = self.user_base + install_module.USER_SITE = self.user_site + + def _expanduser(path): + return self.tmpdir + self.old_expand = os.path.expanduser + os.path.expanduser = _expanduser + + try: + # this is the actual test + self._test_user_site() + finally: + site.USER_BASE = self.old_user_base + site.USER_SITE = self.old_user_site + install_module.USER_BASE = self.old_user_base + install_module.USER_SITE = self.old_user_site + os.path.expanduser = self.old_expand + + def _test_user_site(self): + for key in ('nt_user', 'unix_user', 'os2_home'): + self.assert_(key in INSTALL_SCHEMES) + + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # making sure the user option is there + options = [name for name, short, lable in + cmd.user_options] + self.assert_('user' in options) + + # setting a value + cmd.user = 1 + + # user base and site shouldn't be created yet + self.assert_(not os.path.exists(self.user_base)) + self.assert_(not os.path.exists(self.user_site)) + + # let's run finalize + cmd.ensure_finalized() + + # now they should + self.assert_(os.path.exists(self.user_base)) + self.assert_(os.path.exists(self.user_site)) + + self.assert_('userbase' in cmd.config_vars) + self.assert_('usersite' in cmd.config_vars) def test_suite(): return unittest.makeSuite(InstallTestCase) From 314bb85f3930ff28db2d3ba0e2802486c0738780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 28 Feb 2009 10:08:02 +0000 Subject: [PATCH 2171/8469] Issues #1533164 and #5378: Added quiet and force-optimize options to Distutils bdist_rpm command --- command/bdist_rpm.py | 36 ++++++++-- tests/test_bdist_rpm.py | 149 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+), 6 deletions(-) create mode 100644 tests/test_bdist_rpm.py diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index a48e0f186f..34822ec70a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -123,10 +123,21 @@ class bdist_rpm (Command): # Allow a packager to explicitly force an architecture ('force-arch=', None, "Force an architecture onto the RPM build process"), - ] + + ('quiet', 'q', + "Run the INSTALL phase of RPM building in quiet mode"), + + # Forces the -O1 option when calling the install command, + # so the rpm contains all files needed for proper operation under + # SELinux. Some systems checks for this on build-time and will + # fail without this. + ('force-optimize', None, + "Forces the -O1 option when calling the install command"), + + ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode', - 'no-autoreq'] + 'no-autoreq', 'quiet', 'force-optimize'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', @@ -176,6 +187,8 @@ def initialize_options (self): self.no_autoreq = 0 self.force_arch = None + self.quiet = 0 + self.force_optimize = 1 # initialize_options() @@ -322,6 +335,7 @@ def run (self): if os.path.exists('/usr/bin/rpmbuild') or \ os.path.exists('/bin/rpmbuild'): rpm_cmd = ['rpmbuild'] + if self.source_only: # what kind of RPMs? rpm_cmd.append('-bs') elif self.binary_only: @@ -333,6 +347,10 @@ def run (self): '_topdir %s' % os.path.abspath(self.rpm_base)]) if not self.keep_temp: rpm_cmd.append('--clean') + + if self.quiet: + rpm_cmd.append('--quiet') + rpm_cmd.append(spec_path) # Determine the binary rpm names that should be built out of this spec # file @@ -486,13 +504,19 @@ def _make_spec_file(self): # that we open and interpolate into the spec file, but the defaults # are just text that we drop in as-is. Hmmm. + # forcing -O1 if force-optimize + if self.force_optimize: + optimize = ' -O1' + else: + optimize = '' + + install_cmd = ('%s install%s --root=$RPM_BUILD_ROOT ' + '--record=INSTALLED_FILES') % (def_setup_call, optimize) + script_options = [ ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), - ('install', 'install_script', - ("%s install " - "--root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES") % def_setup_call), + ('install', 'install_script', install_cmd), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py new file mode 100644 index 0000000000..ff40628f42 --- /dev/null +++ b/tests/test_bdist_rpm.py @@ -0,0 +1,149 @@ +"""Tests for distutils.command.bdist_rpm.""" + +import unittest +import sys +import os +import tempfile +import shutil + +from distutils.core import Distribution +from distutils.command.bdist_rpm import bdist_rpm +from distutils.tests import support +from distutils.spawn import find_executable +from distutils import spawn +from distutils.errors import DistutilsExecError + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + +class BuildRpmTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def setUp(self): + super(BuildRpmTestCase, self).setUp() + self.old_location = os.getcwd() + self.old_sys_argv = sys.argv[:] + + def tearDown(self): + os.chdir(self.old_location) + sys.argv = self.old_sys_argv[:] + super(BuildRpmTestCase, self).tearDown() + + def test_quiet(self): + + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + if sys.platform != 'linux2': + return + + # this test will run only if the rpm commands are found + if (find_executable('rpm') is None or + find_executable('rpmbuild') is None): + return + + # let's create a package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + # running in quiet mode + cmd.quiet = 1 + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + + def test_no_optimize_flag(self): + + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + if sys.platform != 'linux2': + return + + # http://bugs.python.org/issue1533164 + # this test will run only if the rpm command is found + if (find_executable('rpm') is None or + find_executable('rpmbuild') is None): + return + + # let's create a package that brakes bdist_rpm + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + # running with force-optimize = 1 + # and quiet = 1 + cmd.quiet = 1 + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) + + # XXX I am unable yet to make this test work without + # spurious stderr output + # so returning until distutils.spawn acts better + return + + # running with force-optimize = 0 + cmd.force_optimize = 0 + try: + # XXX How to prevent the spawned + # rpmbuild command to display errors ? + # this can be a problem for buildbots + cmd.ensure_finalized() + cmd.run() + except DistutilsExecError: + # happens only under Fedora/RedHat + # and some flavors of Linux + # otherwise it's a bug + if sys.platform == 'linux2': + return + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + +def test_suite(): + return unittest.makeSuite(BuildRpmTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 476e03885b439b139121edd039dc77bcb1c00305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 28 Feb 2009 10:16:43 +0000 Subject: [PATCH 2172/8469] Merged revisions 70049 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70049 | tarek.ziade | 2009-02-28 11:08:02 +0100 (Sat, 28 Feb 2009) | 1 line Issues #1533164 and #5378: Added quiet and force-optimize options to Distutils bdist_rpm command ........ --- command/bdist_rpm.py | 36 ++++++++-- tests/test_bdist_rpm.py | 149 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+), 6 deletions(-) create mode 100644 tests/test_bdist_rpm.py diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 83efb8e043..3afdafefda 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -122,10 +122,21 @@ class bdist_rpm(Command): # Allow a packager to explicitly force an architecture ('force-arch=', None, "Force an architecture onto the RPM build process"), - ] + + ('quiet', 'q', + "Run the INSTALL phase of RPM building in quiet mode"), + + # Forces the -O1 option when calling the install command, + # so the rpm contains all files needed for proper operation under + # SELinux. Some systems checks for this on build-time and will + # fail without this. + ('force-optimize', None, + "Forces the -O1 option when calling the install command"), + + ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode', - 'no-autoreq'] + 'no-autoreq', 'quiet', 'force-optimize'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', @@ -175,6 +186,8 @@ def initialize_options(self): self.no_autoreq = 0 self.force_arch = None + self.quiet = 0 + self.force_optimize = 1 def finalize_options(self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) @@ -311,6 +324,7 @@ def run(self): if os.path.exists('/usr/bin/rpmbuild') or \ os.path.exists('/bin/rpmbuild'): rpm_cmd = ['rpmbuild'] + if self.source_only: # what kind of RPMs? rpm_cmd.append('-bs') elif self.binary_only: @@ -322,6 +336,10 @@ def run(self): '_topdir %s' % os.path.abspath(self.rpm_base)]) if not self.keep_temp: rpm_cmd.append('--clean') + + if self.quiet: + rpm_cmd.append('--quiet') + rpm_cmd.append(spec_path) # Determine the binary rpm names that should be built out of this spec # file @@ -474,13 +492,19 @@ def _make_spec_file(self): # that we open and interpolate into the spec file, but the defaults # are just text that we drop in as-is. Hmmm. + # forcing -O1 if force-optimize + if self.force_optimize: + optimize = ' -O1' + else: + optimize = '' + + install_cmd = ('%s install%s --root=$RPM_BUILD_ROOT ' + '--record=INSTALLED_FILES') % (def_setup_call, optimize) + script_options = [ ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), ('build', 'build_script', def_build), - ('install', 'install_script', - ("%s install " - "--root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES") % def_setup_call), + ('install', 'install_script', install_cmd), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py new file mode 100644 index 0000000000..ff40628f42 --- /dev/null +++ b/tests/test_bdist_rpm.py @@ -0,0 +1,149 @@ +"""Tests for distutils.command.bdist_rpm.""" + +import unittest +import sys +import os +import tempfile +import shutil + +from distutils.core import Distribution +from distutils.command.bdist_rpm import bdist_rpm +from distutils.tests import support +from distutils.spawn import find_executable +from distutils import spawn +from distutils.errors import DistutilsExecError + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + +class BuildRpmTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def setUp(self): + super(BuildRpmTestCase, self).setUp() + self.old_location = os.getcwd() + self.old_sys_argv = sys.argv[:] + + def tearDown(self): + os.chdir(self.old_location) + sys.argv = self.old_sys_argv[:] + super(BuildRpmTestCase, self).tearDown() + + def test_quiet(self): + + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + if sys.platform != 'linux2': + return + + # this test will run only if the rpm commands are found + if (find_executable('rpm') is None or + find_executable('rpmbuild') is None): + return + + # let's create a package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + # running in quiet mode + cmd.quiet = 1 + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + + def test_no_optimize_flag(self): + + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + if sys.platform != 'linux2': + return + + # http://bugs.python.org/issue1533164 + # this test will run only if the rpm command is found + if (find_executable('rpm') is None or + find_executable('rpmbuild') is None): + return + + # let's create a package that brakes bdist_rpm + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + # running with force-optimize = 1 + # and quiet = 1 + cmd.quiet = 1 + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) + + # XXX I am unable yet to make this test work without + # spurious stderr output + # so returning until distutils.spawn acts better + return + + # running with force-optimize = 0 + cmd.force_optimize = 0 + try: + # XXX How to prevent the spawned + # rpmbuild command to display errors ? + # this can be a problem for buildbots + cmd.ensure_finalized() + cmd.run() + except DistutilsExecError: + # happens only under Fedora/RedHat + # and some flavors of Linux + # otherwise it's a bug + if sys.platform == 'linux2': + return + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + +def test_suite(): + return unittest.makeSuite(BuildRpmTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 23fb0d98b0e7696ae54a1c1562117a8035aa6607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 2 Mar 2009 05:38:44 +0000 Subject: [PATCH 2173/8469] removing the force-optimized option as discussed in #1533164 --- command/bdist_rpm.py | 21 +++------------------ tests/test_bdist_rpm.py | 25 ------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 34822ec70a..1eccc6a48a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -126,18 +126,10 @@ class bdist_rpm (Command): ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"), - - # Forces the -O1 option when calling the install command, - # so the rpm contains all files needed for proper operation under - # SELinux. Some systems checks for this on build-time and will - # fail without this. - ('force-optimize', None, - "Forces the -O1 option when calling the install command"), - ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode', - 'no-autoreq', 'quiet', 'force-optimize'] + 'no-autoreq', 'quiet'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', @@ -188,7 +180,6 @@ def initialize_options (self): self.force_arch = None self.quiet = 0 - self.force_optimize = 1 # initialize_options() @@ -504,14 +495,8 @@ def _make_spec_file(self): # that we open and interpolate into the spec file, but the defaults # are just text that we drop in as-is. Hmmm. - # forcing -O1 if force-optimize - if self.force_optimize: - optimize = ' -O1' - else: - optimize = '' - - install_cmd = ('%s install%s --root=$RPM_BUILD_ROOT ' - '--record=INSTALLED_FILES') % (def_setup_call, optimize) + install_cmd = ('%s install -O1 --root=$RPM_BUILD_ROOT ' + '--record=INSTALLED_FILES') % def_setup_call script_options = [ ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index ff40628f42..2d84007f87 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -109,8 +109,6 @@ def test_no_optimize_flag(self): cmd = bdist_rpm(dist) cmd.fix_python = True - # running with force-optimize = 1 - # and quiet = 1 cmd.quiet = 1 cmd.ensure_finalized() cmd.run() @@ -119,29 +117,6 @@ def test_no_optimize_flag(self): self.assert_('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) - # XXX I am unable yet to make this test work without - # spurious stderr output - # so returning until distutils.spawn acts better - return - - # running with force-optimize = 0 - cmd.force_optimize = 0 - try: - # XXX How to prevent the spawned - # rpmbuild command to display errors ? - # this can be a problem for buildbots - cmd.ensure_finalized() - cmd.run() - except DistutilsExecError: - # happens only under Fedora/RedHat - # and some flavors of Linux - # otherwise it's a bug - if sys.platform == 'linux2': - return - - dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) - def test_suite(): return unittest.makeSuite(BuildRpmTestCase) From d3c376f3f1359f37e486775bb1b3009148e794c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 2 Mar 2009 05:41:25 +0000 Subject: [PATCH 2174/8469] Merged revisions 70094 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70094 | tarek.ziade | 2009-03-02 06:38:44 +0100 (Mon, 02 Mar 2009) | 1 line removing the force-optimized option as discussed in #1533164 ........ --- command/bdist_rpm.py | 21 +++------------------ tests/test_bdist_rpm.py | 25 ------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 3afdafefda..452f9502ad 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -125,18 +125,10 @@ class bdist_rpm(Command): ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"), - - # Forces the -O1 option when calling the install command, - # so the rpm contains all files needed for proper operation under - # SELinux. Some systems checks for this on build-time and will - # fail without this. - ('force-optimize', None, - "Forces the -O1 option when calling the install command"), - ] boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode', - 'no-autoreq', 'quiet', 'force-optimize'] + 'no-autoreq', 'quiet'] negative_opt = {'no-keep-temp': 'keep-temp', 'no-rpm-opt-flags': 'use-rpm-opt-flags', @@ -187,7 +179,6 @@ def initialize_options(self): self.force_arch = None self.quiet = 0 - self.force_optimize = 1 def finalize_options(self): self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) @@ -492,14 +483,8 @@ def _make_spec_file(self): # that we open and interpolate into the spec file, but the defaults # are just text that we drop in as-is. Hmmm. - # forcing -O1 if force-optimize - if self.force_optimize: - optimize = ' -O1' - else: - optimize = '' - - install_cmd = ('%s install%s --root=$RPM_BUILD_ROOT ' - '--record=INSTALLED_FILES') % (def_setup_call, optimize) + install_cmd = ('%s install -O1 --root=$RPM_BUILD_ROOT ' + '--record=INSTALLED_FILES') % def_setup_call script_options = [ ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index ff40628f42..2d84007f87 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -109,8 +109,6 @@ def test_no_optimize_flag(self): cmd = bdist_rpm(dist) cmd.fix_python = True - # running with force-optimize = 1 - # and quiet = 1 cmd.quiet = 1 cmd.ensure_finalized() cmd.run() @@ -119,29 +117,6 @@ def test_no_optimize_flag(self): self.assert_('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) - # XXX I am unable yet to make this test work without - # spurious stderr output - # so returning until distutils.spawn acts better - return - - # running with force-optimize = 0 - cmd.force_optimize = 0 - try: - # XXX How to prevent the spawned - # rpmbuild command to display errors ? - # this can be a problem for buildbots - cmd.ensure_finalized() - cmd.run() - except DistutilsExecError: - # happens only under Fedora/RedHat - # and some flavors of Linux - # otherwise it's a bug - if sys.platform == 'linux2': - return - - dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) - def test_suite(): return unittest.makeSuite(BuildRpmTestCase) From aee35e095b854dd8969b6e33a6a82a0b635fec39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 7 Mar 2009 00:32:45 +0000 Subject: [PATCH 2175/8469] Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler --- msvc9compiler.py | 36 ++++++++++++++++++++---------------- tests/test_msvc9compiler.py | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 68b7775830..00d76d4bea 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,10 +17,11 @@ import os import subprocess import sys -from distutils.errors import (DistutilsExecError, DistutilsPlatformError, - CompileError, LibError, LinkError) -from distutils.ccompiler import (CCompiler, gen_preprocess_options, - gen_lib_options) + +from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import CCompiler, gen_preprocess_options, \ + gen_lib_options from distutils import log from distutils.util import get_platform @@ -53,15 +54,14 @@ class Reg: """Helper class to read values from the registry """ - @classmethod def get_value(cls, path, key): for base in HKEYS: d = cls.read_values(base, path) if d and key in d: return d[key] raise KeyError(key) + get_value = classmethod(get_value) - @classmethod def read_keys(cls, base, key): """Return list of registry keys.""" try: @@ -78,8 +78,8 @@ def read_keys(cls, base, key): L.append(k) i += 1 return L + read_keys = classmethod(read_keys) - @classmethod def read_values(cls, base, key): """Return dict of registry keys and values. @@ -100,8 +100,8 @@ def read_values(cls, base, key): d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) i += 1 return d + read_values = classmethod(read_values) - @staticmethod def convert_mbcs(s): dec = getattr(s, "decode", None) if dec is not None: @@ -110,6 +110,7 @@ def convert_mbcs(s): except UnicodeError: pass return s + convert_mbcs = staticmethod(convert_mbcs) class MacroExpander: @@ -131,7 +132,7 @@ def load_macros(self, version): "sdkinstallrootv2.0") else: raise KeyError("sdkinstallrootv2.0") - except KeyError as exc: # + except KeyError: raise DistutilsPlatformError( """Python was built with Visual Studio 2008; extensions must be built with a compiler than can generate compatible binaries. @@ -479,7 +480,7 @@ def compile(self, sources, try: self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) continue elif ext in self._mc_extensions: @@ -506,7 +507,7 @@ def compile(self, sources, self.spawn([self.rc] + ["/fo" + obj] + [rc_file]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) continue else: @@ -519,7 +520,7 @@ def compile(self, sources, self.spawn([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + extra_postargs) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) return objects @@ -544,7 +545,7 @@ def create_static_lib(self, pass # XXX what goes here? try: self.spawn([self.lib] + lib_args) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -633,7 +634,7 @@ def link(self, self.mkpath(os.path.dirname(output_filename)) try: self.spawn([self.linker] + ld_args) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LinkError(msg) # embed the manifest @@ -641,12 +642,15 @@ def link(self, # will still consider the DLL up-to-date, but it will not have a # manifest. Maybe we should link to a temp file? OTOH, that # implies a build environment error that shouldn't go undetected. - mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 + if target_desc == CCompiler.EXECUTABLE: + mfid = 1 + else: + mfid = 2 out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', temp_manifest, out_arg]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 0c8bd6e042..bde614e9a4 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -30,6 +30,28 @@ def _find_vcvarsall(version): finally: msvc9compiler.find_vcvarsall = old_find_vcvarsall + def test_reg_class(self): + if sys.platform != 'win32': + # this test is only for win32 + return + + from distutils.msvc9compiler import Reg + self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') + + # looking for values that should exist on all + # windows registeries versions. + path = r'Software\Microsoft\Notepad' + v = Reg.get_value(path, u"lfitalic") + self.assert_(v in (0, 1)) + + import _winreg + HKCU = _winreg.HKEY_CURRENT_USER + keys = Reg.read_keys(HKCU, 'xxxx') + self.assertEquals(keys, None) + + keys = Reg.read_keys(HKCU, r'Software\Microsoft') + self.assert_('Notepad' in keys) + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From efe5ba3afc4aa141d408bac712301a121b2f4ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 7 Mar 2009 00:51:53 +0000 Subject: [PATCH 2176/8469] Merged revisions 70212 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70212 | tarek.ziade | 2009-03-07 01:32:45 +0100 (Sat, 07 Mar 2009) | 1 line Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler ........ --- msvc9compiler.py | 36 ++++++++++++++++++++---------------- tests/test_msvc9compiler.py | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index aae0637394..48551ddf51 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,10 +17,11 @@ import os import subprocess import sys -from distutils.errors import (DistutilsExecError, DistutilsPlatformError, - CompileError, LibError, LinkError) -from distutils.ccompiler import (CCompiler, gen_preprocess_options, - gen_lib_options) + +from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import CCompiler, gen_preprocess_options, \ + gen_lib_options from distutils import log from distutils.util import get_platform @@ -53,15 +54,14 @@ class Reg: """Helper class to read values from the registry """ - @classmethod def get_value(cls, path, key): for base in HKEYS: d = cls.read_values(base, path) if d and key in d: return d[key] raise KeyError(key) + get_value = classmethod(get_value) - @classmethod def read_keys(cls, base, key): """Return list of registry keys.""" try: @@ -78,8 +78,8 @@ def read_keys(cls, base, key): L.append(k) i += 1 return L + read_keys = classmethod(read_keys) - @classmethod def read_values(cls, base, key): """Return dict of registry keys and values. @@ -100,8 +100,8 @@ def read_values(cls, base, key): d[cls.convert_mbcs(name)] = cls.convert_mbcs(value) i += 1 return d + read_values = classmethod(read_values) - @staticmethod def convert_mbcs(s): dec = getattr(s, "decode", None) if dec is not None: @@ -110,6 +110,7 @@ def convert_mbcs(s): except UnicodeError: pass return s + convert_mbcs = staticmethod(convert_mbcs) class MacroExpander: @@ -131,7 +132,7 @@ def load_macros(self, version): "sdkinstallrootv2.0") else: raise KeyError("sdkinstallrootv2.0") - except KeyError as exc: # + except KeyError: raise DistutilsPlatformError( """Python was built with Visual Studio 2008; extensions must be built with a compiler than can generate compatible binaries. @@ -478,7 +479,7 @@ def compile(self, sources, try: self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) continue elif ext in self._mc_extensions: @@ -505,7 +506,7 @@ def compile(self, sources, self.spawn([self.rc] + ["/fo" + obj] + [rc_file]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) continue else: @@ -518,7 +519,7 @@ def compile(self, sources, self.spawn([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + extra_postargs) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise CompileError(msg) return objects @@ -543,7 +544,7 @@ def create_static_lib(self, pass # XXX what goes here? try: self.spawn([self.lib] + lib_args) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -632,7 +633,7 @@ def link(self, self.mkpath(os.path.dirname(output_filename)) try: self.spawn([self.linker] + ld_args) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LinkError(msg) # embed the manifest @@ -640,12 +641,15 @@ def link(self, # will still consider the DLL up-to-date, but it will not have a # manifest. Maybe we should link to a temp file? OTOH, that # implies a build environment error that shouldn't go undetected. - mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 + if target_desc == CCompiler.EXECUTABLE: + mfid = 1 + else: + mfid = 2 out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', temp_manifest, out_arg]) - except DistutilsExecError as msg: + except DistutilsExecError, msg: raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 0c8bd6e042..e7d1620fdd 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -30,6 +30,28 @@ def _find_vcvarsall(version): finally: msvc9compiler.find_vcvarsall = old_find_vcvarsall + def test_reg_class(self): + if sys.platform != 'win32': + # this test is only for win32 + return + + from distutils.msvc9compiler import Reg + self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') + + # looking for values that should exist on all + # windows registeries versions. + path = r'Software\Microsoft\Notepad' + v = Reg.get_value(path, "lfitalic") + self.assert_(v in (0, 1)) + + import _winreg + HKCU = _winreg.HKEY_CURRENT_USER + keys = Reg.read_keys(HKCU, 'xxxx') + self.assertEquals(keys, None) + + keys = Reg.read_keys(HKCU, r'Software\Microsoft') + self.assert_('Notepad' in keys) + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 57eb312a5abee5c02035c01b23853d7f8c9122cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 7 Mar 2009 01:12:09 +0000 Subject: [PATCH 2177/8469] fixed except syntax for py3 --- msvc9compiler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 48551ddf51..ef895422c6 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -479,7 +479,7 @@ def compile(self, sources, try: self.spawn([self.rc] + pp_opts + [output_opt] + [input_opt]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError(msg) continue elif ext in self._mc_extensions: @@ -506,7 +506,7 @@ def compile(self, sources, self.spawn([self.rc] + ["/fo" + obj] + [rc_file]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError(msg) continue else: @@ -519,7 +519,7 @@ def compile(self, sources, self.spawn([self.cc] + compile_opts + pp_opts + [input_opt, output_opt] + extra_postargs) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise CompileError(msg) return objects @@ -544,7 +544,7 @@ def create_static_lib(self, pass # XXX what goes here? try: self.spawn([self.lib] + lib_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LibError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) @@ -633,7 +633,7 @@ def link(self, self.mkpath(os.path.dirname(output_filename)) try: self.spawn([self.linker] + ld_args) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LinkError(msg) # embed the manifest @@ -649,7 +649,7 @@ def link(self, try: self.spawn(['mt.exe', '-nologo', '-manifest', temp_manifest, out_arg]) - except DistutilsExecError, msg: + except DistutilsExecError as msg: raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) From 2d5c28e86921686607c1f6d9e67a2eaddbefb447 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 7 Mar 2009 16:34:40 +0000 Subject: [PATCH 2178/8469] bump version to 3.1a1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 1cf8a6ea56..12a430ecdd 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1a0" +__version__ = "3.1a1" #--end constants-- From 9a76eb65587528397be4a18d14f3feb69871eb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 11 Mar 2009 12:48:04 +0000 Subject: [PATCH 2179/8469] Issue #5472: Fixed distutils.test_util tear down --- tests/test_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_util.py b/tests/test_util.py index ca586268a3..67474025d3 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -53,6 +53,8 @@ def tearDown(self): os.path.splitdrive = self.splitdrive if self.uname is not None: os.uname = self.uname + else: + del os.uname def _set_uname(self, uname): self._uname = uname From a5f88c28d9f7fdda89cb5e7528e3c27eae9403d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 11 Mar 2009 12:52:00 +0000 Subject: [PATCH 2180/8469] Merged revisions 70308 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70308 | tarek.ziade | 2009-03-11 13:48:04 +0100 (Wed, 11 Mar 2009) | 1 line Issue #5472: Fixed distutils.test_util tear down ........ --- tests/test_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_util.py b/tests/test_util.py index ca586268a3..67474025d3 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -53,6 +53,8 @@ def tearDown(self): os.path.splitdrive = self.splitdrive if self.uname is not None: os.uname = self.uname + else: + del os.uname def _set_uname(self, uname): self._uname = uname From 08c27fd41a67693d49c78ecbb512d3db78445a51 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 15 Mar 2009 22:43:14 +0000 Subject: [PATCH 2181/8469] Added skip for old MSVC. --- tests/test_msvc9compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index bde614e9a4..78ce3b7a84 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -34,6 +34,10 @@ def test_reg_class(self): if sys.platform != 'win32': # this test is only for win32 return + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') From 1f49eec84ddf546ae1b2c4ec7d28e611cc4c9d80 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 21 Mar 2009 17:31:58 +0000 Subject: [PATCH 2182/8469] Merged revisions 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line #5486: typos. ........ r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line fix tuple.index() error message #5495 ........ r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line #5496: fix docstring of lookup(). ........ r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line #5493: clarify __nonzero__ docs. ........ r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int. ........ r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line #5491: clarify nested() semantics. ........ r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line #5488: add missing struct member. ........ r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line #5478: fix copy-paste oversight in function signature. ........ r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line #5276: document IDLESTARTUP and .Idle.py. ........ r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines Fix markup in re docs and give a mail address in regex howto, so that the recommendation to send suggestions to the author can be followed. ........ r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines Move the previously local import of threading to module level. This is cleaner and avoids lockups in obscure cases where a Queue is instantiated while the import lock is already held by another thread. OKed by Tim Peters. ........ r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line Added skip for old MSVC. ........ r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line Add token markup. ........ r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line I thought this was begging for an example ........ r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line a much better example ........ r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line close files after comparing them ........ --- tests/test_msvc9compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index e7d1620fdd..aefadd6dc3 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -34,6 +34,10 @@ def test_reg_class(self): if sys.platform != 'win32': # this test is only for win32 return + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') From 48a187444772146188fbfb1ffb5483fc03a84e87 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 28 Mar 2009 00:48:48 +0000 Subject: [PATCH 2183/8469] Fix typo. --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 71a5614719..0fb5b6e204 100644 --- a/version.py +++ b/version.py @@ -162,7 +162,7 @@ def __cmp__ (self, other): # The rules according to Greg Stein: -# 1) a version number has 1 or more numbers separate by a period or by +# 1) a version number has 1 or more numbers separated by a period or by # sequences of letters. If only periods, then these are compared # left-to-right to determine an ordering. # 2) sequences of letters are part of the tuple for comparison and are From faad81c0beb9849650bd8673266556b2438bb73d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 30 Mar 2009 14:51:56 +0000 Subject: [PATCH 2184/8469] Merged revisions 70578,70599,70641-70642,70650,70660-70661,70674,70691,70697-70698,70700,70704 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70578 | benjamin.peterson | 2009-03-23 22:24:56 -0500 (Mon, 23 Mar 2009) | 1 line this is better written using assertRaises ........ r70599 | benjamin.peterson | 2009-03-25 16:42:51 -0500 (Wed, 25 Mar 2009) | 1 line this can be slightly less ugly ........ r70641 | guilherme.polo | 2009-03-27 16:43:08 -0500 (Fri, 27 Mar 2009) | 3 lines Adjusted _tkinter to compile without warnings when WITH_THREAD is not defined (part of issue #5035) ........ r70642 | georg.brandl | 2009-03-27 19:48:48 -0500 (Fri, 27 Mar 2009) | 1 line Fix typo. ........ r70650 | benjamin.peterson | 2009-03-28 14:16:10 -0500 (Sat, 28 Mar 2009) | 1 line give os.symlink and os.link() better parameter names #5564 ........ r70660 | georg.brandl | 2009-03-28 14:52:58 -0500 (Sat, 28 Mar 2009) | 1 line Switch to fixed Sphinx version. ........ r70661 | georg.brandl | 2009-03-28 14:57:36 -0500 (Sat, 28 Mar 2009) | 2 lines Add section numbering to some of the larger subdocuments. ........ r70674 | guilherme.polo | 2009-03-29 05:19:05 -0500 (Sun, 29 Mar 2009) | 1 line Typo fix. ........ r70691 | raymond.hettinger | 2009-03-29 13:51:11 -0500 (Sun, 29 Mar 2009) | 1 line Make life easier for non-CPython implementations. ........ r70697 | benjamin.peterson | 2009-03-29 16:22:35 -0500 (Sun, 29 Mar 2009) | 1 line this has been fixed since 2.6 (I love removing these) ........ r70698 | benjamin.peterson | 2009-03-29 16:31:05 -0500 (Sun, 29 Mar 2009) | 1 line thanks to guido's bytecode verifier, this is fixed ........ r70700 | benjamin.peterson | 2009-03-29 16:50:14 -0500 (Sun, 29 Mar 2009) | 1 line use the awesome new status iterator ........ r70704 | benjamin.peterson | 2009-03-29 21:49:32 -0500 (Sun, 29 Mar 2009) | 1 line there's actually three methods here #5600 ........ --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 79d458d847..ebcab84e4e 100644 --- a/version.py +++ b/version.py @@ -207,7 +207,7 @@ def _cmp (self, other): # The rules according to Greg Stein: -# 1) a version number has 1 or more numbers separate by a period or by +# 1) a version number has 1 or more numbers separated by a period or by # sequences of letters. If only periods, then these are compared # left-to-right to determine an ordering. # 2) sequences of letters are part of the tuple for comparison and are From 31b701a80d234c9782272d4ce02f38b8c365e119 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 31 Mar 2009 00:34:54 +0000 Subject: [PATCH 2185/8469] Add new copydir_run_2to3() function, for use e.g. in test runners to transparently convert and run tests written for Python 2. --- util.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/util.py b/util.py index 042306e913..4c1956a2b8 100644 --- a/util.py +++ b/util.py @@ -571,6 +571,39 @@ def log_debug(self, msg, *args): r = DistutilsRefactoringTool(fixer_names, options=options) r.refactor(files, write=True) +def copydir_run_2to3(src, dest, template=None, fixer_names=None, + options=None, explicit=None): + """Recursively copy a directory, only copying new and changed files, + running run_2to3 over all newly copied Python modules afterward. + + If you give a template string, it's parsed like a MANIFEST.in. + """ + from distutils.dir_util import mkpath + from distutils.file_util import copy_file + from distutils.filelist import FileList + filelist = FileList() + curdir = os.getcwd() + os.chdir(src) + try: + filelist.findall() + finally: + os.chdir(curdir) + filelist.files[:] = filelist.allfiles + if template: + for line in template.splitlines(): + line = line.strip() + if not line: continue + filelist.process_template_line(line) + copied = [] + for filename in filelist.files: + outname = os.path.join(dest, filename) + mkpath(os.path.dirname(outname)) + res = copy_file(os.path.join(src, filename), outname, update=1) + if res[1]: copied.append(outname) + run_2to3([fn for fn in copied if fn.lower().endswith('.py')], + fixer_names=fixer_names, options=options, explicit=explicit) + return copied + class Mixin2to3: '''Mixin class for commands that run 2to3. To configure 2to3, setup scripts may either change From 405478c9f8d1613cbc225ff13ea972b5039aa316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:48:31 +0000 Subject: [PATCH 2186/8469] using log.warn for sys.stderr --- cmd.py | 5 ++--- log.py | 13 +++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd.py b/cmd.py index 012fca15b5..dfcbe23537 100644 --- a/cmd.py +++ b/cmd.py @@ -352,9 +352,8 @@ def get_sub_commands (self): # -- External world manipulation ----------------------------------- def warn (self, msg): - sys.stderr.write("warning: %s: %s\n" % - (self.get_command_name(), msg)) - + log.warn("warning: %s: %s\n" % + (self.get_command_name(), msg)) def execute (self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) diff --git a/log.py b/log.py index fcaa545a79..6f949d5179 100644 --- a/log.py +++ b/log.py @@ -18,13 +18,14 @@ def __init__(self, threshold=WARN): def _log(self, level, msg, args): if level >= self.threshold: - if not args: - # msg may contain a '%'. If args is empty, - # don't even try to string-format - print msg + if args: + msg = msg % args + if level in (WARN, ERROR, FATAL): + stream = sys.stderr else: - print msg % args - sys.stdout.flush() + stream = sys.stdout + stream.write('%s\n' % msg) + stream.flush() def log(self, level, msg, *args): self._log(level, msg, args) From aca2cc988727dfa93fab949125562b1714f5ab69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:50:59 +0000 Subject: [PATCH 2187/8469] added tests for the clean command --- command/clean.py | 2 +- tests/support.py | 21 +++++++++++++++++-- tests/test_clean.py | 49 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 3 deletions(-) create mode 100755 tests/test_clean.py diff --git a/command/clean.py b/command/clean.py index ba03d1fff6..90ef35f1ca 100644 --- a/command/clean.py +++ b/command/clean.py @@ -11,7 +11,7 @@ from distutils.dir_util import remove_tree from distutils import log -class clean (Command): +class clean(Command): description = "clean up temporary files from 'build' command" user_options = [ diff --git a/tests/support.py b/tests/support.py index fbbf35d8ea..578cf40c09 100644 --- a/tests/support.py +++ b/tests/support.py @@ -4,7 +4,7 @@ import tempfile from distutils import log - +from distutils.core import Distribution class LoggingSilencer(object): @@ -42,7 +42,7 @@ def mkdtemp(self): self.tempdirs.append(d) return d - def write_file(self, path, content): + def write_file(self, path, content='xxx'): """Writes a file in the given path. @@ -56,6 +56,23 @@ def write_file(self, path, content): finally: f.close() + def create_dist(self, pkg_name='foo', **kw): + """Will generate a test environment. + + This function creates: + - a Distribution instance using keywords + - a temporary directory with a package structure + + It returns the package directory and the distribution + instance. + """ + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, pkg_name) + os.mkdir(pkg_dir) + dist = Distribution(attrs=kw) + + return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_clean.py b/tests/test_clean.py new file mode 100755 index 0000000000..a94a812b1f --- /dev/null +++ b/tests/test_clean.py @@ -0,0 +1,49 @@ +"""Tests for distutils.command.clean.""" +import sys +import os +import unittest +import getpass + +from distutils.command.clean import clean +from distutils.tests import support + +class cleanTestCase(support.TempdirManager, + unittest.TestCase): + + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = clean(dist) + + # let's add some elements clean should remove + dirs = [(d, os.path.join(pkg_dir, d)) + for d in ('build_temp', 'build_lib', 'bdist_base', + 'build_scripts', 'build_base')] + + for name, path in dirs: + os.mkdir(path) + setattr(cmd, name, path) + if name == 'build_base': + continue + for f in ('one', 'two', 'three'): + self.write_file(os.path.join(path, f)) + + # let's run the command + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + + # make sure the files where removed + for name, path in dirs: + self.assert_(not os.path.exists(path), + '%s was not removed' % path) + + # let's run the command again (should spit warnings but suceed) + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + +def test_suite(): + return unittest.makeSuite(cleanTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From ec2b5a008569d749c58f1ac688a165c12af051cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:53:13 +0000 Subject: [PATCH 2188/8469] more tests for the register command --- command/register.py | 23 +++++---- tests/test_register.py | 108 ++++++++++++++++++++++++++++------------- 2 files changed, 89 insertions(+), 42 deletions(-) diff --git a/command/register.py b/command/register.py index 40661d8776..f3463dc289 100644 --- a/command/register.py +++ b/command/register.py @@ -90,14 +90,14 @@ def classifiers(self): ''' Fetch the list of classifiers from the server. ''' response = urllib2.urlopen(self.repository+'?:action=list_classifiers') - print response.read() + log.info(response.read()) def verify_metadata(self): ''' Send the metadata to the package index server to be checked. ''' # send the info to the server and report the result (code, result) = self.post_to_server(self.build_post_data('verify')) - print 'Server response (%s): %s'%(code, result) + log.info('Server response (%s): %s' % (code, result)) def send_metadata(self): @@ -210,17 +210,18 @@ def send_metadata(self): data['email'] = raw_input(' EMail: ') code, result = self.post_to_server(data) if code != 200: - print 'Server response (%s): %s'%(code, result) + log.info('Server response (%s): %s' % (code, result)) else: - print 'You will receive an email shortly.' - print 'Follow the instructions in it to complete registration.' + log.info('You will receive an email shortly.') + log.info(('Follow the instructions in it to ' + 'complete registration.')) elif choice == '3': data = {':action': 'password_reset'} data['email'] = '' while not data['email']: data['email'] = raw_input('Your email address: ') code, result = self.post_to_server(data) - print 'Server response (%s): %s'%(code, result) + log.info('Server response (%s): %s' % (code, result)) def build_post_data(self, action): # figure the data to send - the metadata plus some additional @@ -253,8 +254,10 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - self.announce('Registering %s to %s' % (data['name'], - self.repository), log.INFO) + if 'name' in data: + self.announce('Registering %s to %s' % (data['name'], + self.repository), + log.INFO) # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary @@ -301,5 +304,7 @@ def post_to_server(self, data, auth=None): data = result.read() result = 200, 'OK' if self.show_response: - print '-'*75, data, '-'*75 + dashes = '-' * 75 + self.announce('%s%s%s' % (dashes, data, dashes)) + return result diff --git a/tests/test_register.py b/tests/test_register.py index b3543f50f8..7da8edb5d7 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -3,7 +3,9 @@ import os import unittest import getpass +import urllib2 +from distutils.command import register as register_module from distutils.command.register import register from distutils.core import Distribution @@ -42,18 +44,20 @@ def __call__(self, prompt=''): finally: self.index += 1 -class FakeServer(object): +class FakeOpener(object): """Fakes a PyPI server""" def __init__(self): - self.calls = [] + self.reqs = [] def __call__(self, *args): - # we want to compare them, so let's store - # something comparable - els = args[0].items() - els.sort() - self.calls.append(tuple(els)) - return 200, 'OK' + return self + + def open(self, req): + self.reqs.append(req) + return self + + def read(self): + return 'xxx' class registerTestCase(PyPIRCCommandTestCase): @@ -64,24 +68,27 @@ def setUp(self): def _getpass(prompt): return 'password' getpass.getpass = _getpass + self.old_opener = urllib2.build_opener + self.conn = urllib2.build_opener = FakeOpener() def tearDown(self): getpass.getpass = self._old_getpass + urllib2.build_opener = self.old_opener PyPIRCCommandTestCase.tearDown(self) + def _get_cmd(self): + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} + pkg_info, dist = self.create_dist(**metadata) + return register(dist) + def test_create_pypirc(self): # this test makes sure a .pypirc file # is created when requested. - # let's create a fake distribution - # and a register instance - dist = Distribution() - dist.metadata.url = 'xxx' - dist.metadata.author = 'xxx' - dist.metadata.author_email = 'xxx' - dist.metadata.name = 'xxx' - dist.metadata.version = 'xxx' - cmd = register(dist) + # let's create a register instance + cmd = self._get_cmd() # we shouldn't have a .pypirc file yet self.assert_(not os.path.exists(self.rc)) @@ -95,13 +102,12 @@ def test_create_pypirc(self): # Password : 'password' # Save your login (y/N)? : 'y' inputs = RawInputs('1', 'tarek', 'y') - from distutils.command import register as register_module register_module.raw_input = inputs.__call__ - - cmd.post_to_server = pypi_server = FakeServer() - # let's run the command - cmd.run() + try: + cmd.run() + finally: + del register_module.raw_input # we should have a brand new .pypirc file self.assert_(os.path.exists(self.rc)) @@ -117,30 +123,66 @@ def _no_way(prompt=''): raise AssertionError(prompt) register_module.raw_input = _no_way + cmd.show_response = 1 cmd.run() # let's see what the server received : we should # have 2 similar requests - self.assert_(len(pypi_server.calls), 2) - self.assert_(pypi_server.calls[0], pypi_server.calls[1]) - - def test_password_not_in_file(self): + self.assert_(self.conn.reqs, 2) + req1 = dict(self.conn.reqs[0].headers) + req2 = dict(self.conn.reqs[1].headers) - f = open(self.rc, 'w') - f.write(PYPIRC_NOPASSWORD) - f.close() + self.assertEquals(req1['Content-length'], '1374') + self.assertEquals(req2['Content-length'], '1374') + self.assert_('xxx' in self.conn.reqs[1].data) - dist = Distribution() - cmd = register(dist) - cmd.post_to_server = FakeServer() + def test_password_not_in_file(self): + self.write_file(self.rc, PYPIRC_NOPASSWORD) + cmd = self._get_cmd() cmd._set_config() cmd.finalize_options() cmd.send_metadata() # dist.password should be set # therefore used afterwards by other commands - self.assertEquals(dist.password, 'password') + self.assertEquals(cmd.distribution.password, 'password') + + def test_registering(self): + # this test runs choice 2 + cmd = self._get_cmd() + inputs = RawInputs('2', 'tarek', 'tarek@ziade.org') + register_module.raw_input = inputs.__call__ + try: + # let's run the command + cmd.run() + finally: + del register_module.raw_input + + # we should have send a request + self.assert_(self.conn.reqs, 1) + req = self.conn.reqs[0] + headers = dict(req.headers) + self.assertEquals(headers['Content-length'], '608') + self.assert_('tarek' in req.data) + + def test_password_reset(self): + # this test runs choice 3 + cmd = self._get_cmd() + inputs = RawInputs('3', 'tarek@ziade.org') + register_module.raw_input = inputs.__call__ + try: + # let's run the command + cmd.run() + finally: + del register_module.raw_input + + # we should have send a request + self.assert_(self.conn.reqs, 1) + req = self.conn.reqs[0] + headers = dict(req.headers) + self.assertEquals(headers['Content-length'], '290') + self.assert_('tarek' in req.data) def test_suite(): return unittest.makeSuite(registerTestCase) From 34a3369b79dad443a930c06247b9195fcd024837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:53:55 +0000 Subject: [PATCH 2189/8469] more tests for the upload command --- command/upload.py | 2 +- tests/test_upload.py | 70 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 8 deletions(-) diff --git a/command/upload.py b/command/upload.py index df82e4ca56..74b06283f5 100644 --- a/command/upload.py +++ b/command/upload.py @@ -192,4 +192,4 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print '-'*75, r.read(), '-'*75 + self.announce('-'*75, r.read(), '-'*75) diff --git a/tests/test_upload.py b/tests/test_upload.py index 3f8ca6d6ad..f57a4a3f33 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,6 +2,7 @@ import sys import os import unittest +import httplib from distutils.command.upload import upload from distutils.core import Distribution @@ -18,17 +19,52 @@ [server1] username:me """ +class Response(object): + def __init__(self, status=200, reason='OK'): + self.status = status + self.reason = reason +class FakeConnection(object): + + def __init__(self): + self.requests = [] + self.headers = [] + self.body = '' + + def __call__(self, netloc): + return self + + def connect(self): + pass + endheaders = connect + + def putrequest(self, method, url): + self.requests.append((method, url)) + + def putheader(self, name, value): + self.headers.append((name, value)) + + def send(self, body): + self.body = body + + def getresponse(self): + return Response() class uploadTestCase(PyPIRCCommandTestCase): + def setUp(self): + super(uploadTestCase, self).setUp() + self.old_class = httplib.HTTPConnection + self.conn = httplib.HTTPConnection = FakeConnection() + + def tearDown(self): + httplib.HTTPConnection = self.old_class + super(uploadTestCase, self).tearDown() + def test_finalize_options(self): # new format - f = open(self.rc, 'w') - f.write(PYPIRC) - f.close() - + self.write_file(self.rc, PYPIRC) dist = Distribution() cmd = upload(dist) cmd.finalize_options() @@ -39,9 +75,7 @@ def test_finalize_options(self): def test_saved_password(self): # file with no password - f = open(self.rc, 'w') - f.write(PYPIRC_NOPASSWORD) - f.close() + self.write_file(self.rc, PYPIRC_NOPASSWORD) # make sure it passes dist = Distribution() @@ -56,6 +90,28 @@ def test_saved_password(self): cmd.finalize_options() self.assertEquals(cmd.password, 'xxx') + def test_upload(self): + tmp = self.mkdtemp() + path = os.path.join(tmp, 'xxx') + self.write_file(path) + command, pyversion, filename = 'xxx', '2.6', path + dist_files = [(command, pyversion, filename)] + self.write_file(self.rc, PYPIRC) + + # lets run it + pkg_dir, dist = self.create_dist(dist_files=dist_files) + cmd = upload(dist) + cmd.ensure_finalized() + cmd.run() + + # what did we send ? + headers = dict(self.conn.headers) + self.assertEquals(headers['Content-length'], '2086') + self.assert_(headers['Content-type'].startswith('multipart/form-data')) + + self.assertEquals(self.conn.requests, [('POST', '/pypi')]) + self.assert_('xxx' in self.conn.body) + def test_suite(): return unittest.makeSuite(uploadTestCase) From 50dee054d28f60fc285f609e47e422dee1fcb161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:54:38 +0000 Subject: [PATCH 2190/8469] added test to the install_data command --- command/install_data.py | 11 +++--- tests/test_install_data.py | 75 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 tests/test_install_data.py diff --git a/command/install_data.py b/command/install_data.py index cb11371023..ec78ce3431 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -12,7 +12,7 @@ from distutils.core import Command from distutils.util import change_root, convert_path -class install_data (Command): +class install_data(Command): description = "install data files" @@ -27,12 +27,11 @@ class install_data (Command): boolean_options = ['force'] - def initialize_options (self): + def initialize_options(self): self.install_dir = None self.outfiles = [] self.root = None self.force = 0 - self.data_files = self.distribution.data_files self.warn_dir = 1 @@ -43,7 +42,7 @@ def finalize_options (self): ('force', 'force'), ) - def run (self): + def run(self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) is StringType: @@ -76,8 +75,8 @@ def run (self): (out, _) = self.copy_file(data, dir) self.outfiles.append(out) - def get_inputs (self): + def get_inputs(self): return self.data_files or [] - def get_outputs (self): + def get_outputs(self): return self.outfiles diff --git a/tests/test_install_data.py b/tests/test_install_data.py new file mode 100644 index 0000000000..73c40371d6 --- /dev/null +++ b/tests/test_install_data.py @@ -0,0 +1,75 @@ +"""Tests for distutils.command.install_data.""" +import sys +import os +import unittest +import getpass + +from distutils.command.install_data import install_data +from distutils.tests import support + +class InstallDataTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = install_data(dist) + cmd.install_dir = inst = os.path.join(pkg_dir, 'inst') + + # data_files can contain + # - simple files + # - a tuple with a path, and a list of file + one = os.path.join(pkg_dir, 'one') + self.write_file(one, 'xxx') + inst2 = os.path.join(pkg_dir, 'inst2') + two = os.path.join(pkg_dir, 'two') + self.write_file(two, 'xxx') + + cmd.data_files = [one, (inst2, [two])] + self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])]) + + # let's run the command + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 2) + rtwo = os.path.split(two)[-1] + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + rone = os.path.split(one)[-1] + self.assert_(os.path.exists(os.path.join(inst, rone))) + cmd.outfiles = [] + + # let's try with warn_dir one + cmd.warn_dir = 1 + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 2) + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assert_(os.path.exists(os.path.join(inst, rone))) + cmd.outfiles = [] + + # now using root and empty dir + cmd.root = os.path.join(pkg_dir, 'root') + inst3 = os.path.join(cmd.install_dir, 'inst3') + inst4 = os.path.join(pkg_dir, 'inst4') + three = os.path.join(cmd.install_dir, 'three') + self.write_file(three, 'xx') + cmd.data_files = [one, (inst2, [two]), + ('inst3', [three]), + (inst4, [])] + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 4) + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assert_(os.path.exists(os.path.join(inst, rone))) + +def test_suite(): + return unittest.makeSuite(InstallDataTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 8d75f8d30fef8621e6d3c585e7b2e93c15d1cf27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:55:21 +0000 Subject: [PATCH 2191/8469] added tests to the install_headers command --- command/install_headers.py | 13 ++++++------ tests/test_install_headers.py | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 tests/test_install_headers.py diff --git a/command/install_headers.py b/command/install_headers.py index c25b771246..d892416a8c 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -8,7 +8,8 @@ from distutils.core import Command -class install_headers (Command): +# XXX force is never used +class install_headers(Command): description = "install C/C++ header files" @@ -20,18 +21,18 @@ class install_headers (Command): boolean_options = ['force'] - def initialize_options (self): + def initialize_options(self): self.install_dir = None self.force = 0 self.outfiles = [] - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('install', ('install_headers', 'install_dir'), ('force', 'force')) - def run (self): + def run(self): headers = self.distribution.headers if not headers: return @@ -41,10 +42,10 @@ def run (self): (out, _) = self.copy_file(header, self.install_dir) self.outfiles.append(out) - def get_inputs (self): + def get_inputs(self): return self.distribution.headers or [] - def get_outputs (self): + def get_outputs(self): return self.outfiles # class install_headers diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py new file mode 100644 index 0000000000..2564563faf --- /dev/null +++ b/tests/test_install_headers.py @@ -0,0 +1,39 @@ +"""Tests for distutils.command.install_headers.""" +import sys +import os +import unittest +import getpass + +from distutils.command.install_headers import install_headers +from distutils.tests import support + +class InstallHeadersTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_simple_run(self): + # we have two headers + header_list = self.mkdtemp() + header1 = os.path.join(header_list, 'header1') + header2 = os.path.join(header_list, 'header2') + self.write_file(header1) + self.write_file(header2) + headers = [header1, header2] + + pkg_dir, dist = self.create_dist(headers=headers) + cmd = install_headers(dist) + self.assertEquals(cmd.get_inputs(), headers) + + # let's run the command + cmd.install_dir = os.path.join(pkg_dir, 'inst') + cmd.ensure_finalized() + cmd.run() + + # let's check the results + self.assertEquals(len(cmd.get_outputs()), 2) + +def test_suite(): + return unittest.makeSuite(InstallHeadersTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From e96f0dd0d6fbf5f13d206aa20d10dc5e3047770c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 20:56:11 +0000 Subject: [PATCH 2192/8469] making sdist and config test silents --- tests/test_config.py | 4 +++- tests/test_sdist.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index a18f45359a..7737538bf8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -47,7 +47,9 @@ """ -class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): +class PyPIRCCommandTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def setUp(self): """Patches the environment.""" diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 15a8c8087c..8af080f950 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -34,7 +34,7 @@ somecode%(sep)sdoc.txt """ -class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): +class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): # PyPIRCCommandTestCase creates a temp dir already From f2378909df4f8e5552bae53353a305b4775e9699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 21:37:16 +0000 Subject: [PATCH 2193/8469] Merged revisions 70886,70888-70892 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70886 | tarek.ziade | 2009-03-31 15:50:59 -0500 (Tue, 31 Mar 2009) | 1 line added tests for the clean command ........ r70888 | tarek.ziade | 2009-03-31 15:53:13 -0500 (Tue, 31 Mar 2009) | 1 line more tests for the register command ........ r70889 | tarek.ziade | 2009-03-31 15:53:55 -0500 (Tue, 31 Mar 2009) | 1 line more tests for the upload command ........ r70890 | tarek.ziade | 2009-03-31 15:54:38 -0500 (Tue, 31 Mar 2009) | 1 line added test to the install_data command ........ r70891 | tarek.ziade | 2009-03-31 15:55:21 -0500 (Tue, 31 Mar 2009) | 1 line added tests to the install_headers command ........ r70892 | tarek.ziade | 2009-03-31 15:56:11 -0500 (Tue, 31 Mar 2009) | 1 line making sdist and config test silents ........ --- cmd.py | 2 +- command/install_data.py | 1 - command/install_headers.py | 1 + command/register.py | 23 +++---- command/upload.py | 2 +- tests/support.py | 21 ++++++- tests/test_clean.py | 49 +++++++++++++++ tests/test_config.py | 4 +- tests/test_install_data.py | 75 +++++++++++++++++++++++ tests/test_install_headers.py | 39 ++++++++++++ tests/test_register.py | 110 +++++++++++++++++++++++----------- tests/test_sdist.py | 2 +- tests/test_upload.py | 70 +++++++++++++++++++--- 13 files changed, 341 insertions(+), 58 deletions(-) create mode 100755 tests/test_clean.py create mode 100644 tests/test_install_data.py create mode 100644 tests/test_install_headers.py diff --git a/cmd.py b/cmd.py index 800425d4a9..46055b4b2c 100644 --- a/cmd.py +++ b/cmd.py @@ -333,7 +333,7 @@ def get_sub_commands(self): # -- External world manipulation ----------------------------------- def warn(self, msg): - sys.stderr.write("warning: %s: %s\n" % (self.get_command_name(), msg)) + log.warn("warning: %s: %s\n" % (self.get_command_name(), msg)) def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) diff --git a/command/install_data.py b/command/install_data.py index 06a70b4ad4..ab40797b98 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -31,7 +31,6 @@ def initialize_options(self): self.outfiles = [] self.root = None self.force = 0 - self.data_files = self.distribution.data_files self.warn_dir = 1 diff --git a/command/install_headers.py b/command/install_headers.py index 346daaad02..38125b5513 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -8,6 +8,7 @@ from distutils.core import Command +# XXX force is never used class install_headers(Command): description = "install C/C++ header files" diff --git a/command/register.py b/command/register.py index c271b18c4c..7dd3099912 100644 --- a/command/register.py +++ b/command/register.py @@ -92,15 +92,14 @@ def classifiers(self): ''' url = self.repository+'?:action=list_classifiers' response = urllib.request.urlopen(url) - print(response.read()) + log.info(response.read()) def verify_metadata(self): ''' Send the metadata to the package index server to be checked. ''' # send the info to the server and report the result (code, result) = self.post_to_server(self.build_post_data('verify')) - print('Server response (%s): %s'%(code, result)) - + log.info('Server response (%s): %s' % (code, result)) def send_metadata(self): ''' Send the metadata to the package index server. @@ -211,17 +210,18 @@ def send_metadata(self): data['email'] = input(' EMail: ') code, result = self.post_to_server(data) if code != 200: - print('Server response (%s): %s'%(code, result)) + log.info('Server response (%s): %s' % (code, result)) else: - print('You will receive an email shortly.') - print('Follow the instructions in it to complete registration.') + log.info('You will receive an email shortly.') + log.info(('Follow the instructions in it to ' + 'complete registration.')) elif choice == '3': data = {':action': 'password_reset'} data['email'] = '' while not data['email']: data['email'] = input('Your email address: ') code, result = self.post_to_server(data) - print('Server response (%s): %s'%(code, result)) + log.info('Server response (%s): %s' % (code, result)) def build_post_data(self, action): # figure the data to send - the metadata plus some additional @@ -254,8 +254,10 @@ def build_post_data(self, action): def post_to_server(self, data, auth=None): ''' Post a query to the server, and return a string response. ''' - self.announce('Registering %s to %s' % (data['name'], - self.repository), log.INFO) + if 'name' in data: + self.announce('Registering %s to %s' % (data['name'], + self.repository), + log.INFO) # Build up the MIME payload for the urllib2 POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary @@ -302,5 +304,6 @@ def post_to_server(self, data, auth=None): data = result.read() result = 200, 'OK' if self.show_response: - print('-'*75, data, '-'*75) + dashes = '-' * 75 + self.announce('%s%s%s' % (dashes, data, dashes)) return result diff --git a/command/upload.py b/command/upload.py index eb2f51678a..9249427a43 100644 --- a/command/upload.py +++ b/command/upload.py @@ -194,4 +194,4 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print('-'*75, r.read(), '-'*75) + self.announce('-'*75, r.read(), '-'*75) diff --git a/tests/support.py b/tests/support.py index ecc8da174e..ab2af9a6aa 100644 --- a/tests/support.py +++ b/tests/support.py @@ -4,7 +4,7 @@ import tempfile from distutils import log - +from distutils.core import Distribution class LoggingSilencer(object): @@ -42,7 +42,7 @@ def mkdtemp(self): self.tempdirs.append(d) return d - def write_file(self, path, content): + def write_file(self, path, content='xxx'): """Writes a file in the given path. @@ -56,6 +56,23 @@ def write_file(self, path, content): finally: f.close() + def create_dist(self, pkg_name='foo', **kw): + """Will generate a test environment. + + This function creates: + - a Distribution instance using keywords + - a temporary directory with a package structure + + It returns the package directory and the distribution + instance. + """ + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, pkg_name) + os.mkdir(pkg_dir) + dist = Distribution(attrs=kw) + + return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_clean.py b/tests/test_clean.py new file mode 100755 index 0000000000..a94a812b1f --- /dev/null +++ b/tests/test_clean.py @@ -0,0 +1,49 @@ +"""Tests for distutils.command.clean.""" +import sys +import os +import unittest +import getpass + +from distutils.command.clean import clean +from distutils.tests import support + +class cleanTestCase(support.TempdirManager, + unittest.TestCase): + + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = clean(dist) + + # let's add some elements clean should remove + dirs = [(d, os.path.join(pkg_dir, d)) + for d in ('build_temp', 'build_lib', 'bdist_base', + 'build_scripts', 'build_base')] + + for name, path in dirs: + os.mkdir(path) + setattr(cmd, name, path) + if name == 'build_base': + continue + for f in ('one', 'two', 'three'): + self.write_file(os.path.join(path, f)) + + # let's run the command + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + + # make sure the files where removed + for name, path in dirs: + self.assert_(not os.path.exists(path), + '%s was not removed' % path) + + # let's run the command again (should spit warnings but suceed) + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + +def test_suite(): + return unittest.makeSuite(cleanTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_config.py b/tests/test_config.py index 09abfcd8ba..7506f93227 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -46,7 +46,9 @@ """ -class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): +class PyPIRCCommandTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def setUp(self): """Patches the environment.""" diff --git a/tests/test_install_data.py b/tests/test_install_data.py new file mode 100644 index 0000000000..73c40371d6 --- /dev/null +++ b/tests/test_install_data.py @@ -0,0 +1,75 @@ +"""Tests for distutils.command.install_data.""" +import sys +import os +import unittest +import getpass + +from distutils.command.install_data import install_data +from distutils.tests import support + +class InstallDataTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = install_data(dist) + cmd.install_dir = inst = os.path.join(pkg_dir, 'inst') + + # data_files can contain + # - simple files + # - a tuple with a path, and a list of file + one = os.path.join(pkg_dir, 'one') + self.write_file(one, 'xxx') + inst2 = os.path.join(pkg_dir, 'inst2') + two = os.path.join(pkg_dir, 'two') + self.write_file(two, 'xxx') + + cmd.data_files = [one, (inst2, [two])] + self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])]) + + # let's run the command + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 2) + rtwo = os.path.split(two)[-1] + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + rone = os.path.split(one)[-1] + self.assert_(os.path.exists(os.path.join(inst, rone))) + cmd.outfiles = [] + + # let's try with warn_dir one + cmd.warn_dir = 1 + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 2) + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assert_(os.path.exists(os.path.join(inst, rone))) + cmd.outfiles = [] + + # now using root and empty dir + cmd.root = os.path.join(pkg_dir, 'root') + inst3 = os.path.join(cmd.install_dir, 'inst3') + inst4 = os.path.join(pkg_dir, 'inst4') + three = os.path.join(cmd.install_dir, 'three') + self.write_file(three, 'xx') + cmd.data_files = [one, (inst2, [two]), + ('inst3', [three]), + (inst4, [])] + cmd.ensure_finalized() + cmd.run() + + # let's check the result + self.assertEquals(len(cmd.get_outputs()), 4) + self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assert_(os.path.exists(os.path.join(inst, rone))) + +def test_suite(): + return unittest.makeSuite(InstallDataTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py new file mode 100644 index 0000000000..2564563faf --- /dev/null +++ b/tests/test_install_headers.py @@ -0,0 +1,39 @@ +"""Tests for distutils.command.install_headers.""" +import sys +import os +import unittest +import getpass + +from distutils.command.install_headers import install_headers +from distutils.tests import support + +class InstallHeadersTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_simple_run(self): + # we have two headers + header_list = self.mkdtemp() + header1 = os.path.join(header_list, 'header1') + header2 = os.path.join(header_list, 'header2') + self.write_file(header1) + self.write_file(header2) + headers = [header1, header2] + + pkg_dir, dist = self.create_dist(headers=headers) + cmd = install_headers(dist) + self.assertEquals(cmd.get_inputs(), headers) + + # let's run the command + cmd.install_dir = os.path.join(pkg_dir, 'inst') + cmd.ensure_finalized() + cmd.run() + + # let's check the results + self.assertEquals(len(cmd.get_outputs()), 2) + +def test_suite(): + return unittest.makeSuite(InstallHeadersTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_register.py b/tests/test_register.py index 8826e90fe0..46f7761d80 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -3,7 +3,9 @@ import os import unittest import getpass +import urllib +from distutils.command import register as register_module from distutils.command.register import register from distutils.core import Distribution @@ -42,18 +44,20 @@ def __call__(self, prompt=''): finally: self.index += 1 -class FakeServer(object): +class FakeOpener(object): """Fakes a PyPI server""" def __init__(self): - self.calls = [] + self.reqs = [] def __call__(self, *args): - # we want to compare them, so let's store - # something comparable - els = list(args[0].items()) - els.sort() - self.calls.append(tuple(els)) - return 200, 'OK' + return self + + def open(self, req): + self.reqs.append(req) + return self + + def read(self): + return 'xxx' class registerTestCase(PyPIRCCommandTestCase): @@ -64,24 +68,27 @@ def setUp(self): def _getpass(prompt): return 'password' getpass.getpass = _getpass + self.old_opener = urllib.request.build_opener + self.conn = urllib.request.build_opener = FakeOpener() def tearDown(self): getpass.getpass = self._old_getpass + urllib.request.build_opener = self.old_opener PyPIRCCommandTestCase.tearDown(self) + def _get_cmd(self): + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} + pkg_info, dist = self.create_dist(**metadata) + return register(dist) + def test_create_pypirc(self): # this test makes sure a .pypirc file # is created when requested. - # let's create a fake distribution - # and a register instance - dist = Distribution() - dist.metadata.url = 'xxx' - dist.metadata.author = 'xxx' - dist.metadata.author_email = 'xxx' - dist.metadata.name = 'xxx' - dist.metadata.version = 'xxx' - cmd = register(dist) + # let's create a register instance + cmd = self._get_cmd() # we shouldn't have a .pypirc file yet self.assert_(not os.path.exists(self.rc)) @@ -95,13 +102,12 @@ def test_create_pypirc(self): # Password : 'password' # Save your login (y/N)? : 'y' inputs = Inputs('1', 'tarek', 'y') - from distutils.command import register as register_module register_module.input = inputs.__call__ - - cmd.post_to_server = pypi_server = FakeServer() - # let's run the command - cmd.run() + try: + cmd.run() + finally: + del register_module.input # we should have a brand new .pypirc file self.assert_(os.path.exists(self.rc)) @@ -115,32 +121,68 @@ def test_create_pypirc(self): # if we run the command again def _no_way(prompt=''): raise AssertionError(prompt) - register_module.raw_input = _no_way + register_module.input = _no_way + cmd.show_response = 1 cmd.run() # let's see what the server received : we should # have 2 similar requests - self.assert_(len(pypi_server.calls), 2) - self.assert_(pypi_server.calls[0], pypi_server.calls[1]) - - def test_password_not_in_file(self): + self.assert_(self.conn.reqs, 2) + req1 = dict(self.conn.reqs[0].headers) + req2 = dict(self.conn.reqs[1].headers) - f = open(self.rc, 'w') - f.write(PYPIRC_NOPASSWORD) - f.close() + self.assertEquals(req1['Content-length'], '1374') + self.assertEquals(req2['Content-length'], '1374') + self.assert_((b'xxx') in self.conn.reqs[1].data) - dist = Distribution() - cmd = register(dist) - cmd.post_to_server = FakeServer() + def test_password_not_in_file(self): + self.write_file(self.rc, PYPIRC_NOPASSWORD) + cmd = self._get_cmd() cmd._set_config() cmd.finalize_options() cmd.send_metadata() # dist.password should be set # therefore used afterwards by other commands - self.assertEquals(dist.password, 'password') + self.assertEquals(cmd.distribution.password, 'password') + + def test_registering(self): + # this test runs choice 2 + cmd = self._get_cmd() + inputs = Inputs('2', 'tarek', 'tarek@ziade.org') + register_module.input = inputs.__call__ + try: + # let's run the command + cmd.run() + finally: + del register_module.input + + # we should have send a request + self.assert_(self.conn.reqs, 1) + req = self.conn.reqs[0] + headers = dict(req.headers) + self.assertEquals(headers['Content-length'], '608') + self.assert_((b'tarek') in req.data) + + def test_password_reset(self): + # this test runs choice 3 + cmd = self._get_cmd() + inputs = Inputs('3', 'tarek@ziade.org') + register_module.input = inputs.__call__ + try: + # let's run the command + cmd.run() + finally: + del register_module.input + + # we should have send a request + self.assert_(self.conn.reqs, 1) + req = self.conn.reqs[0] + headers = dict(req.headers) + self.assertEquals(headers['Content-length'], '290') + self.assert_((b'tarek') in req.data) def test_suite(): return unittest.makeSuite(registerTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 15a8c8087c..8af080f950 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -34,7 +34,7 @@ somecode%(sep)sdoc.txt """ -class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): +class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): # PyPIRCCommandTestCase creates a temp dir already diff --git a/tests/test_upload.py b/tests/test_upload.py index 3f8ca6d6ad..95e4ac3315 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,6 +2,7 @@ import sys import os import unittest +import http.client as httpclient from distutils.command.upload import upload from distutils.core import Distribution @@ -18,17 +19,52 @@ [server1] username:me """ +class Response(object): + def __init__(self, status=200, reason='OK'): + self.status = status + self.reason = reason +class FakeConnection(object): + + def __init__(self): + self.requests = [] + self.headers = [] + self.body = '' + + def __call__(self, netloc): + return self + + def connect(self): + pass + endheaders = connect + + def putrequest(self, method, url): + self.requests.append((method, url)) + + def putheader(self, name, value): + self.headers.append((name, value)) + + def send(self, body): + self.body = body + + def getresponse(self): + return Response() class uploadTestCase(PyPIRCCommandTestCase): + def setUp(self): + super(uploadTestCase, self).setUp() + self.old_class = httpclient.HTTPConnection + self.conn = httpclient.HTTPConnection = FakeConnection() + + def tearDown(self): + httpclient.HTTPConnection = self.old_class + super(uploadTestCase, self).tearDown() + def test_finalize_options(self): # new format - f = open(self.rc, 'w') - f.write(PYPIRC) - f.close() - + self.write_file(self.rc, PYPIRC) dist = Distribution() cmd = upload(dist) cmd.finalize_options() @@ -39,9 +75,7 @@ def test_finalize_options(self): def test_saved_password(self): # file with no password - f = open(self.rc, 'w') - f.write(PYPIRC_NOPASSWORD) - f.close() + self.write_file(self.rc, PYPIRC_NOPASSWORD) # make sure it passes dist = Distribution() @@ -56,6 +90,28 @@ def test_saved_password(self): cmd.finalize_options() self.assertEquals(cmd.password, 'xxx') + def test_upload(self): + tmp = self.mkdtemp() + path = os.path.join(tmp, 'xxx') + self.write_file(path) + command, pyversion, filename = 'xxx', '2.6', path + dist_files = [(command, pyversion, filename)] + self.write_file(self.rc, PYPIRC) + + # lets run it + pkg_dir, dist = self.create_dist(dist_files=dist_files) + cmd = upload(dist) + cmd.ensure_finalized() + cmd.run() + + # what did we send ? + headers = dict(self.conn.headers) + self.assertEquals(headers['Content-length'], '2087') + self.assert_(headers['Content-type'].startswith('multipart/form-data')) + + self.assertEquals(self.conn.requests, [('POST', '/pypi')]) + self.assert_((b'xxx') in self.conn.body) + def test_suite(): return unittest.makeSuite(uploadTestCase) From d2f43a0e5bd8df91da76da9aa45b34f218914336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 22:27:23 +0000 Subject: [PATCH 2194/8469] #5583 Added optional Extensions in Distutils --- command/build_ext.py | 8 +++++++- extension.py | 5 +++++ tests/test_build_ext.py | 22 +++++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 125fa7f52d..905fa1ff7d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -476,7 +476,13 @@ def build_extensions(self): self.check_extensions_list(self.extensions) for ext in self.extensions: - self.build_extension(ext) + try: + self.build_extension(ext) + except (CCompilerError, DistutilsError), e: + if not ext.optional: + raise + self.warn('building extension "%s" failed: %s' % + (ext.name, e)) def build_extension(self, ext): sources = ext.sources diff --git a/extension.py b/extension.py index 440d128cdc..c80c61e35b 100644 --- a/extension.py +++ b/extension.py @@ -83,6 +83,9 @@ class Extension: language : string extension language (i.e. "c", "c++", "objc"). Will be detected from the source extensions if not provided. + optional : boolean + specifies that a build failure in the extension should not abort the + build process, but simply not install the failing extension. """ # When adding arguments to this constructor, be sure to update @@ -101,6 +104,7 @@ def __init__ (self, name, sources, swig_opts = None, depends=None, language=None, + optional=None, **kw # To catch unknown keywords ): assert type(name) is StringType, "'name' must be a string" @@ -123,6 +127,7 @@ def __init__ (self, name, sources, self.swig_opts = swig_opts or [] self.depends = depends or [] self.language = language + self.optional = optional # If there are unknown keyword options, warn about them if len(kw): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index ff60c12b1a..a27696d8cb 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -8,6 +8,8 @@ from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support +from distutils.extension import Extension +from distutils.errors import UnknownFileError import unittest from test import test_support @@ -20,7 +22,9 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -class BuildExtTestCase(support.TempdirManager, unittest.TestCase): +class BuildExtTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path @@ -142,6 +146,22 @@ def test_user_site(self): self.assert_(lib in cmd.library_dirs) self.assert_(incl in cmd.include_dirs) + def test_optional_extension(self): + + # this extension will fail, but let's ignore this failure + # with the optional argument. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertRaises(UnknownFileError, cmd.run) # should raise an error + + modules = [Extension('foo', ['xxx'], optional=True)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + cmd.run() # should pass + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 0aee51d142b182b216825edf7272e0d913064b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 22:37:55 +0000 Subject: [PATCH 2195/8469] Merged revisions 70910 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70910 | tarek.ziade | 2009-03-31 17:27:23 -0500 (Tue, 31 Mar 2009) | 1 line #5583 Added optional Extensions in Distutils ........ --- command/build_ext.py | 8 +++++++- extension.py | 5 +++++ tests/test_build_ext.py | 23 ++++++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1ed69f33c0..229590664c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -455,7 +455,13 @@ def build_extensions(self): self.check_extensions_list(self.extensions) for ext in self.extensions: - self.build_extension(ext) + try: + self.build_extension(ext) + except (CCompilerError, DistutilsError) as e: + if not ext.optional: + raise + self.warn('building extension "%s" failed: %s' % + (ext.name, e)) def build_extension(self, ext): sources = ext.sources diff --git a/extension.py b/extension.py index b271816844..f7e7b4edc9 100644 --- a/extension.py +++ b/extension.py @@ -82,6 +82,9 @@ class Extension: language : string extension language (i.e. "c", "c++", "objc"). Will be detected from the source extensions if not provided. + optional : boolean + specifies that a build failure in the extension should not abort the + build process, but simply not install the failing extension. """ # When adding arguments to this constructor, be sure to update @@ -100,6 +103,7 @@ def __init__(self, name, sources, swig_opts = None, depends=None, language=None, + optional=None, **kw # To catch unknown keywords ): assert isinstance(name, str), "'name' must be a string" @@ -122,6 +126,7 @@ def __init__(self, name, sources, self.swig_opts = swig_opts or [] self.depends = depends or [] self.language = language + self.optional = optional # If there are unknown keyword options, warn about them if len(kw): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 2e47953ee3..094f4b6644 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -8,6 +8,9 @@ from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests.support import TempdirManager +from distutils.tests.support import LoggingSilencer +from distutils.extension import Extension +from distutils.errors import UnknownFileError import unittest from test import support @@ -20,7 +23,9 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -class BuildExtTestCase(TempdirManager, unittest.TestCase): +class BuildExtTestCase(TempdirManager, + LoggingSilencer, + unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path @@ -141,6 +146,22 @@ def test_user_site(self): self.assert_(lib in cmd.library_dirs) self.assert_(incl in cmd.include_dirs) + def test_optional_extension(self): + + # this extension will fail, but let's ignore this failure + # with the optional argument. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertRaises(UnknownFileError, cmd.run) # should raise an error + + modules = [Extension('foo', ['xxx'], optional=True)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + cmd.run() # should pass + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 0396d17ef15568fc9260ec230ee523cf8649014b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 22:44:10 +0000 Subject: [PATCH 2196/8469] catching msvc9compiler error as well --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 905fa1ff7d..2c6df1d2cd 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -478,7 +478,7 @@ def build_extensions(self): for ext in self.extensions: try: self.build_extension(ext) - except (CCompilerError, DistutilsError), e: + except (CCompilerError, DistutilsError, CompileError), e: if not ext.optional: raise self.warn('building extension "%s" failed: %s' % From 8d3a9ec909afa64b86fc44749e9e8e70960b5eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 22:47:01 +0000 Subject: [PATCH 2197/8469] fixed the test for win32 CompileError --- tests/test_build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a27696d8cb..9097bee2e4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -10,6 +10,7 @@ from distutils.tests import support from distutils.extension import Extension from distutils.errors import UnknownFileError +from distutils.errors import CompileError import unittest from test import test_support @@ -154,7 +155,8 @@ def test_optional_extension(self): dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() - self.assertRaises(UnknownFileError, cmd.run) # should raise an error + self.assertRaises((UnknownFileError, CompileError), + cmd.run) # should raise an error modules = [Extension('foo', ['xxx'], optional=True)] dist = Distribution({'name': 'xx', 'ext_modules': modules}) From e7ed75cadeb3cc8d852182dbb771c3894921c88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 31 Mar 2009 22:50:54 +0000 Subject: [PATCH 2198/8469] Merged revisions 70920,70922 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70920 | tarek.ziade | 2009-03-31 17:44:10 -0500 (Tue, 31 Mar 2009) | 1 line catching msvc9compiler error as well ........ r70922 | tarek.ziade | 2009-03-31 17:47:01 -0500 (Tue, 31 Mar 2009) | 1 line fixed the test for win32 CompileError ........ --- command/build_ext.py | 2 +- tests/test_build_ext.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 229590664c..ade95be229 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -457,7 +457,7 @@ def build_extensions(self): for ext in self.extensions: try: self.build_extension(ext) - except (CCompilerError, DistutilsError) as e: + except (CCompilerError, DistutilsError, CompileError) as e: if not ext.optional: raise self.warn('building extension "%s" failed: %s' % diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 094f4b6644..5ea67bedb7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -11,6 +11,7 @@ from distutils.tests.support import LoggingSilencer from distutils.extension import Extension from distutils.errors import UnknownFileError +from distutils.errors import CompileError import unittest from test import support @@ -154,7 +155,8 @@ def test_optional_extension(self): dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() - self.assertRaises(UnknownFileError, cmd.run) # should raise an error + self.assertRaises((UnknownFileError, CompileError), + cmd.run) # should raise an error modules = [Extension('foo', ['xxx'], optional=True)] dist = Distribution({'name': 'xx', 'ext_modules': modules}) From 0c34a6afb92b1530da9c19f1b96b2371aa6ff606 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 1 Apr 2009 04:28:33 +0000 Subject: [PATCH 2199/8469] #5624: _winreg is winreg in Python 3. --- tests/test_msvc9compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index aefadd6dc3..11e5a47630 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -48,8 +48,8 @@ def test_reg_class(self): v = Reg.get_value(path, "lfitalic") self.assert_(v in (0, 1)) - import _winreg - HKCU = _winreg.HKEY_CURRENT_USER + import winreg + HKCU = winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') self.assertEquals(keys, None) From 865250689f39b67167b128293e9fb3ef3d0aad3e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 1 Apr 2009 04:32:39 +0000 Subject: [PATCH 2200/8469] #5631: add upload to list of possible commands, which is presented in --help-commands. --- command/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/__init__.py b/command/__init__.py index add83f8740..274cb010b8 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -22,6 +22,8 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', + 'upload', + # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', From 1b3f5a086d20cde5ddb2e399336974aac4291c8d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 4 Apr 2009 21:06:52 +0000 Subject: [PATCH 2201/8469] bump version to 3.1a2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 12a430ecdd..c66806361a 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1a1" +__version__ = "3.1a2" #--end constants-- From 528d035a1887b9cd0488a3e53b138b58a48842aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 18:31:24 +0000 Subject: [PATCH 2202/8469] Fixed 5694: removed spurious test output in Distutils --- tests/test_clean.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_clean.py b/tests/test_clean.py index a94a812b1f..3026032712 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -8,6 +8,7 @@ from distutils.tests import support class cleanTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_simple_run(self): From 9b5d00d842645f4226911f1f835a5bb90557e8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 18:33:34 +0000 Subject: [PATCH 2203/8469] Merged revisions 71253 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71253 | tarek.ziade | 2009-04-05 20:31:24 +0200 (Sun, 05 Apr 2009) | 1 line Fixed 5694: removed spurious test output in Distutils ........ --- tests/test_clean.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_clean.py b/tests/test_clean.py index a94a812b1f..3026032712 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -8,6 +8,7 @@ from distutils.tests import support class cleanTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_simple_run(self): From 7a3178f5a9438241874c2cbee10b89c43831e2d8 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 5 Apr 2009 19:13:16 +0000 Subject: [PATCH 2204/8469] Merged revisions 70712,70714,70764-70765,70769-70771,70773,70776-70777,70788-70789,70824,70828,70832,70836,70842,70851,70855,70857,70866-70872,70883,70885,70893-70894,70896-70897,70903,70905-70907,70915,70927,70933,70951,70960,70962-70964,70998,71001,71006,71008,71010-71011,71019,71037,71056,71094,71101-71103,71106,71119,71123,71149-71150,71203,71212,71214-71217,71221,71240 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70712 | benjamin.peterson | 2009-03-30 10:15:38 -0500 (Mon, 30 Mar 2009) | 1 line don't rely on the order dict repr #5605 ........ r70714 | brett.cannon | 2009-03-30 10:20:53 -0500 (Mon, 30 Mar 2009) | 1 line Add an entry to developers.txt. ........ r70764 | martin.v.loewis | 2009-03-30 17:06:33 -0500 (Mon, 30 Mar 2009) | 2 lines Add several VM developers. ........ r70765 | georg.brandl | 2009-03-30 17:09:34 -0500 (Mon, 30 Mar 2009) | 1 line #5199: make warning about vars() assignment more visible. ........ r70769 | andrew.kuchling | 2009-03-30 17:29:53 -0500 (Mon, 30 Mar 2009) | 1 line Remove comment ........ r70770 | andrew.kuchling | 2009-03-30 17:30:20 -0500 (Mon, 30 Mar 2009) | 1 line Add several items and placeholders ........ r70771 | andrew.kuchling | 2009-03-30 17:31:11 -0500 (Mon, 30 Mar 2009) | 1 line Many edits ........ r70773 | georg.brandl | 2009-03-30 17:43:00 -0500 (Mon, 30 Mar 2009) | 1 line #5039: make it clear that the impl. note refers to CPython. ........ r70776 | andrew.kuchling | 2009-03-30 18:08:24 -0500 (Mon, 30 Mar 2009) | 1 line typo fix ........ r70777 | andrew.kuchling | 2009-03-30 18:09:46 -0500 (Mon, 30 Mar 2009) | 1 line Add more items ........ r70788 | andrew.kuchling | 2009-03-30 20:21:01 -0500 (Mon, 30 Mar 2009) | 1 line Add various items ........ r70789 | georg.brandl | 2009-03-30 20:25:15 -0500 (Mon, 30 Mar 2009) | 1 line Fix a wrong struct field assignment (docstring as closure). ........ r70824 | georg.brandl | 2009-03-31 10:43:20 -0500 (Tue, 31 Mar 2009) | 1 line #5519: remove reference to Kodos, which seems dead. ........ r70828 | georg.brandl | 2009-03-31 10:50:16 -0500 (Tue, 31 Mar 2009) | 1 line #5581: fget argument of abstractproperty is optional as well. ........ r70832 | georg.brandl | 2009-03-31 11:31:11 -0500 (Tue, 31 Mar 2009) | 1 line #1386675: specify WindowsError as the exception, because it has a winerror attribute that EnvironmentError doesnt have. ........ r70836 | georg.brandl | 2009-03-31 11:50:25 -0500 (Tue, 31 Mar 2009) | 1 line #5417: replace references to undocumented functions by ones to documented functions. ........ r70842 | georg.brandl | 2009-03-31 12:13:06 -0500 (Tue, 31 Mar 2009) | 1 line #970783: document PyObject_Generic[GS]etAttr. ........ r70851 | georg.brandl | 2009-03-31 13:26:55 -0500 (Tue, 31 Mar 2009) | 1 line #837577: note cryptic return value of spawn*e on invalid env dicts. ........ r70855 | georg.brandl | 2009-03-31 13:30:37 -0500 (Tue, 31 Mar 2009) | 1 line #5245: note that PyRun_SimpleString doesnt return on SystemExit. ........ r70857 | georg.brandl | 2009-03-31 13:33:10 -0500 (Tue, 31 Mar 2009) | 1 line #5227: note that Py_Main doesnt return on SystemExit. ........ r70866 | georg.brandl | 2009-03-31 14:06:57 -0500 (Tue, 31 Mar 2009) | 1 line #4882: document named group behavior a bit better. ........ r70867 | georg.brandl | 2009-03-31 14:10:35 -0500 (Tue, 31 Mar 2009) | 1 line #1096310: document usage of sys.__std*__ a bit better. ........ r70868 | georg.brandl | 2009-03-31 14:12:17 -0500 (Tue, 31 Mar 2009) | 1 line #5190: export make_option in __all__. ........ r70869 | georg.brandl | 2009-03-31 14:14:42 -0500 (Tue, 31 Mar 2009) | 1 line Fix-up unwanted change. ........ r70870 | georg.brandl | 2009-03-31 14:26:24 -0500 (Tue, 31 Mar 2009) | 1 line #4411: document mro() and __mro__. (I hope I got it right.) ........ r70871 | georg.brandl | 2009-03-31 14:30:56 -0500 (Tue, 31 Mar 2009) | 1 line #5618: fix typo. ........ r70872 | r.david.murray | 2009-03-31 14:31:17 -0500 (Tue, 31 Mar 2009) | 3 lines Delete out-of-date and little-known README from the test directory by consensus of devs at pycon sprint. ........ r70883 | georg.brandl | 2009-03-31 15:41:08 -0500 (Tue, 31 Mar 2009) | 1 line #1674032: return value of flag from Event.wait(). OKed by Guido. ........ r70885 | tarek.ziade | 2009-03-31 15:48:31 -0500 (Tue, 31 Mar 2009) | 1 line using log.warn for sys.stderr ........ r70893 | georg.brandl | 2009-03-31 15:56:32 -0500 (Tue, 31 Mar 2009) | 1 line #1530012: move TQS section before raw strings. ........ r70894 | benjamin.peterson | 2009-03-31 16:06:30 -0500 (Tue, 31 Mar 2009) | 1 line take the usual lock precautions around _active_limbo_lock ........ r70896 | georg.brandl | 2009-03-31 16:15:33 -0500 (Tue, 31 Mar 2009) | 1 line #5598: document DocFileSuite *args argument. ........ r70897 | benjamin.peterson | 2009-03-31 16:34:42 -0500 (Tue, 31 Mar 2009) | 1 line fix Thread.ident when it is the main thread or a dummy thread #5632 ........ r70903 | georg.brandl | 2009-03-31 16:45:18 -0500 (Tue, 31 Mar 2009) | 1 line #1676135: remove trailing slashes from --prefix argument. ........ r70905 | georg.brandl | 2009-03-31 17:03:40 -0500 (Tue, 31 Mar 2009) | 1 line #5563: more documentation for bdist_msi. ........ r70906 | georg.brandl | 2009-03-31 17:11:53 -0500 (Tue, 31 Mar 2009) | 1 line #1651995: fix _convert_ref for non-ASCII characters. ........ r70907 | georg.brandl | 2009-03-31 17:18:19 -0500 (Tue, 31 Mar 2009) | 1 line #3427: document correct return type for urlopen().info(). ........ r70915 | georg.brandl | 2009-03-31 17:40:16 -0500 (Tue, 31 Mar 2009) | 1 line #5018: remove confusing paragraph. ........ r70927 | georg.brandl | 2009-03-31 18:01:27 -0500 (Tue, 31 Mar 2009) | 1 line Dont shout to users. ........ r70933 | georg.brandl | 2009-03-31 19:04:33 -0500 (Tue, 31 Mar 2009) | 2 lines Issue #5635: Fix running test_sys with tracing enabled. ........ r70951 | georg.brandl | 2009-04-01 09:02:27 -0500 (Wed, 01 Apr 2009) | 1 line Add Maksim, who worked on several issues at the sprint. ........ r70960 | jesse.noller | 2009-04-01 11:42:19 -0500 (Wed, 01 Apr 2009) | 1 line Issue 3270: document Listener address restrictions on windows ........ r70962 | brett.cannon | 2009-04-01 12:07:16 -0500 (Wed, 01 Apr 2009) | 2 lines Ron DuPlain was given commit privileges at PyCon 2009 to work on 3to2. ........ r70963 | georg.brandl | 2009-04-01 12:46:01 -0500 (Wed, 01 Apr 2009) | 1 line #5655: fix docstring oversight. ........ r70964 | brett.cannon | 2009-04-01 12:52:13 -0500 (Wed, 01 Apr 2009) | 2 lines Paul Kippes was given commit privileges to work on 3to2. ........ r70998 | georg.brandl | 2009-04-01 16:54:21 -0500 (Wed, 01 Apr 2009) | 1 line In Pdb, stop assigning values to __builtin__._ which interferes with the one commonly installed by gettext. ........ r71001 | brett.cannon | 2009-04-01 18:01:12 -0500 (Wed, 01 Apr 2009) | 3 lines Add my initials to Misc/developers.txt. Names are now sorted by number of characters in the person's name. ........ r71006 | georg.brandl | 2009-04-01 18:32:17 -0500 (Wed, 01 Apr 2009) | 1 line Cache the f_locals dict of the current frame, since every access to frame.f_locals overrides its contents with the real locals which undoes modifications made by the debugging user. ........ r71008 | andrew.kuchling | 2009-04-01 19:02:14 -0500 (Wed, 01 Apr 2009) | 1 line Typo fix ........ r71010 | benjamin.peterson | 2009-04-01 19:11:52 -0500 (Wed, 01 Apr 2009) | 1 line fix markup ........ r71011 | benjamin.peterson | 2009-04-01 19:12:47 -0500 (Wed, 01 Apr 2009) | 1 line this should be :noindex: ........ r71019 | georg.brandl | 2009-04-01 21:00:01 -0500 (Wed, 01 Apr 2009) | 1 line Fix test_doctest, missed two assignments to curframe. ........ r71037 | r.david.murray | 2009-04-01 23:34:04 -0500 (Wed, 01 Apr 2009) | 6 lines Clarify that datetime strftime does not produce leap seconds and datetime strptime does not accept it in the strftime behavior section of the datetime docs. Closes issue 2568. ........ r71056 | georg.brandl | 2009-04-02 12:43:07 -0500 (Thu, 02 Apr 2009) | 2 lines Actually the displayhook should print the repr. ........ r71094 | vinay.sajip | 2009-04-03 05:23:18 -0500 (Fri, 03 Apr 2009) | 1 line Added warning about logging use from asynchronous signal handlers. ........ r71101 | andrew.kuchling | 2009-04-03 16:43:00 -0500 (Fri, 03 Apr 2009) | 1 line Add some items ........ r71102 | andrew.kuchling | 2009-04-03 16:44:49 -0500 (Fri, 03 Apr 2009) | 1 line Fix 'the the'; grammar fix ........ r71103 | andrew.kuchling | 2009-04-03 16:45:29 -0500 (Fri, 03 Apr 2009) | 1 line Fix 'the the' duplication ........ r71106 | vinay.sajip | 2009-04-03 16:58:16 -0500 (Fri, 03 Apr 2009) | 1 line Clarified warning about logging use from asynchronous signal handlers. ........ r71119 | raymond.hettinger | 2009-04-04 00:37:47 -0500 (Sat, 04 Apr 2009) | 1 line Add helpful link. ........ r71123 | r.david.murray | 2009-04-04 01:39:56 -0500 (Sat, 04 Apr 2009) | 2 lines Fix error in description of 'oct' (issue 5678). ........ r71149 | georg.brandl | 2009-04-04 08:42:39 -0500 (Sat, 04 Apr 2009) | 1 line #5642: clarify map() compatibility to the builtin. ........ r71150 | georg.brandl | 2009-04-04 08:45:49 -0500 (Sat, 04 Apr 2009) | 1 line #5601: clarify that webbrowser is not meant for file names. ........ r71203 | benjamin.peterson | 2009-04-04 18:46:34 -0500 (Sat, 04 Apr 2009) | 1 line note how using iter* are unsafe while mutating and document iter(dict) ........ r71212 | georg.brandl | 2009-04-05 05:24:20 -0500 (Sun, 05 Apr 2009) | 1 line #1742837: expand HTTP server docs, and fix SocketServer ones to document methods as methods, not functions. ........ r71214 | georg.brandl | 2009-04-05 05:29:57 -0500 (Sun, 05 Apr 2009) | 1 line Normalize spelling of Mac OS X. ........ r71215 | georg.brandl | 2009-04-05 05:32:26 -0500 (Sun, 05 Apr 2009) | 1 line Avoid sure signs of a diseased mind. ........ r71216 | georg.brandl | 2009-04-05 05:41:02 -0500 (Sun, 05 Apr 2009) | 1 line #1718017: document the relation of os.path and the posixpath, ntpath etc. modules better. ........ r71217 | georg.brandl | 2009-04-05 05:48:47 -0500 (Sun, 05 Apr 2009) | 1 line #1726172: dont raise an unexpected IndexError if a voidresp() call has an empty response. ........ r71221 | vinay.sajip | 2009-04-05 06:06:24 -0500 (Sun, 05 Apr 2009) | 1 line Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings. ........ r71240 | georg.brandl | 2009-04-05 09:40:06 -0500 (Sun, 05 Apr 2009) | 1 line #5370: doc update about unpickling objects with custom __getattr__ etc. methods. ........ --- cmd.py | 3 ++- log.py | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd.py b/cmd.py index 46055b4b2c..5829a56639 100644 --- a/cmd.py +++ b/cmd.py @@ -333,7 +333,8 @@ def get_sub_commands(self): # -- External world manipulation ----------------------------------- def warn(self, msg): - log.warn("warning: %s: %s\n" % (self.get_command_name(), msg)) + log.warn("warning: %s: %s\n" % + (self.get_command_name(), msg)) def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) diff --git a/log.py b/log.py index 97319a07aa..6f949d5179 100644 --- a/log.py +++ b/log.py @@ -18,13 +18,14 @@ def __init__(self, threshold=WARN): def _log(self, level, msg, args): if level >= self.threshold: - if not args: - # msg may contain a '%'. If args is empty, - # don't even try to string-format - print(msg) + if args: + msg = msg % args + if level in (WARN, ERROR, FATAL): + stream = sys.stderr else: - print(msg % args) - sys.stdout.flush() + stream = sys.stdout + stream.write('%s\n' % msg) + stream.flush() def log(self, level, msg, *args): self._log(level, msg, args) From ba7be325ab789b28c9670887397c6924d42a8cf9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 5 Apr 2009 21:11:43 +0000 Subject: [PATCH 2205/8469] Merged revisions 70642,70648,70656,70661,70765,70773,70789,70824-70825,70828,70830,70832,70836,70838,70842,70851,70855,70857-70858 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r70642 | georg.brandl | 2009-03-28 01:48:48 +0100 (Sa, 28 Mär 2009) | 1 line Fix typo. ........ r70648 | georg.brandl | 2009-03-28 20:10:37 +0100 (Sa, 28 Mär 2009) | 1 line #5324: document __subclasses__(). ........ r70656 | georg.brandl | 2009-03-28 20:33:33 +0100 (Sa, 28 Mär 2009) | 2 lines Add a script to fixup rst files if the pre-commit hook rejects them. ........ r70661 | georg.brandl | 2009-03-28 20:57:36 +0100 (Sa, 28 Mär 2009) | 2 lines Add section numbering to some of the larger subdocuments. ........ r70765 | georg.brandl | 2009-03-31 00:09:34 +0200 (Di, 31 Mär 2009) | 1 line #5199: make warning about vars() assignment more visible. ........ r70773 | georg.brandl | 2009-03-31 00:43:00 +0200 (Di, 31 Mär 2009) | 1 line #5039: make it clear that the impl. note refers to CPython. ........ r70789 | georg.brandl | 2009-03-31 03:25:15 +0200 (Di, 31 Mär 2009) | 1 line Fix a wrong struct field assignment (docstring as closure). ........ r70824 | georg.brandl | 2009-03-31 17:43:20 +0200 (Di, 31 Mär 2009) | 1 line #5519: remove reference to Kodos, which seems dead. ........ r70825 | georg.brandl | 2009-03-31 17:46:30 +0200 (Di, 31 Mär 2009) | 1 line #5566: fix versionadded from PyLong ssize_t functions. ........ r70828 | georg.brandl | 2009-03-31 17:50:16 +0200 (Di, 31 Mär 2009) | 1 line #5581: fget argument of abstractproperty is optional as well. ........ r70830 | georg.brandl | 2009-03-31 18:11:45 +0200 (Di, 31 Mär 2009) | 1 line #5529: backport new docs of import semantics written by Brett to 2.x. ........ r70832 | georg.brandl | 2009-03-31 18:31:11 +0200 (Di, 31 Mär 2009) | 1 line #1386675: specify WindowsError as the exception, because it has a winerror attribute that EnvironmentError doesnt have. ........ r70836 | georg.brandl | 2009-03-31 18:50:25 +0200 (Di, 31 Mär 2009) | 1 line #5417: replace references to undocumented functions by ones to documented functions. ........ r70838 | georg.brandl | 2009-03-31 18:54:38 +0200 (Di, 31 Mär 2009) | 1 line #992207: document that the parser only accepts \\n newlines. ........ r70842 | georg.brandl | 2009-03-31 19:13:06 +0200 (Di, 31 Mär 2009) | 1 line #970783: document PyObject_Generic[GS]etAttr. ........ r70851 | georg.brandl | 2009-03-31 20:26:55 +0200 (Di, 31 Mär 2009) | 1 line #837577: note cryptic return value of spawn*e on invalid env dicts. ........ r70855 | georg.brandl | 2009-03-31 20:30:37 +0200 (Di, 31 Mär 2009) | 1 line #5245: note that PyRun_SimpleString doesnt return on SystemExit. ........ r70857 | georg.brandl | 2009-03-31 20:33:10 +0200 (Di, 31 Mär 2009) | 1 line #5227: note that Py_Main doesnt return on SystemExit. ........ r70858 | georg.brandl | 2009-03-31 20:38:56 +0200 (Di, 31 Mär 2009) | 1 line #5241: document missing U in regex howto. ........ --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 71a5614719..0fb5b6e204 100644 --- a/version.py +++ b/version.py @@ -162,7 +162,7 @@ def __cmp__ (self, other): # The rules according to Greg Stein: -# 1) a version number has 1 or more numbers separate by a period or by +# 1) a version number has 1 or more numbers separated by a period or by # sequences of letters. If only periods, then these are compared # left-to-right to determine an ordering. # 2) sequences of letters are part of the tuple for comparison and are From 443bc8fdb3ffe7aded9326275131e10a7bc6286b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 5 Apr 2009 21:21:05 +0000 Subject: [PATCH 2206/8469] Merged revisions 70866-70868,70870-70871,70893,70896,70902,70905,70907,70912,70915,70927,70933,70940,70944,70954,70963,70998,71056 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r70866 | georg.brandl | 2009-03-31 21:06:57 +0200 (Di, 31 Mär 2009) | 1 line #4882: document named group behavior a bit better. ........ r70867 | georg.brandl | 2009-03-31 21:10:35 +0200 (Di, 31 Mär 2009) | 1 line #1096310: document usage of sys.__std*__ a bit better. ........ r70868 | georg.brandl | 2009-03-31 21:12:17 +0200 (Di, 31 Mär 2009) | 1 line #5190: export make_option in __all__. ........ r70870 | georg.brandl | 2009-03-31 21:26:24 +0200 (Di, 31 Mär 2009) | 1 line #4411: document mro() and __mro__. (I hope I got it right.) ........ r70871 | georg.brandl | 2009-03-31 21:30:56 +0200 (Di, 31 Mär 2009) | 1 line #5618: fix typo. ........ r70893 | georg.brandl | 2009-03-31 22:56:32 +0200 (Di, 31 Mär 2009) | 1 line #1530012: move TQS section before raw strings. ........ r70896 | georg.brandl | 2009-03-31 23:15:33 +0200 (Di, 31 Mär 2009) | 1 line #5598: document DocFileSuite *args argument. ........ r70902 | georg.brandl | 2009-03-31 23:43:03 +0200 (Di, 31 Mär 2009) | 1 line #1675026: add a note about a strange Windows problem, and remove notes about AtheOS. ........ r70905 | georg.brandl | 2009-04-01 00:03:40 +0200 (Mi, 01 Apr 2009) | 1 line #5563: more documentation for bdist_msi. ........ r70907 | georg.brandl | 2009-04-01 00:18:19 +0200 (Mi, 01 Apr 2009) | 1 line #3427: document correct return type for urlopen().info(). ........ r70912 | georg.brandl | 2009-04-01 00:35:46 +0200 (Mi, 01 Apr 2009) | 1 line #5617: add a handy function to print a unicode string to gdbinit. ........ r70915 | georg.brandl | 2009-04-01 00:40:16 +0200 (Mi, 01 Apr 2009) | 1 line #5018: remove confusing paragraph. ........ r70927 | georg.brandl | 2009-04-01 01:01:27 +0200 (Mi, 01 Apr 2009) | 1 line Dont shout to users. ........ r70933 | georg.brandl | 2009-04-01 02:04:33 +0200 (Mi, 01 Apr 2009) | 2 lines Issue #5635: Fix running test_sys with tracing enabled. ........ r70940 | georg.brandl | 2009-04-01 06:21:14 +0200 (Mi, 01 Apr 2009) | 2 lines The SimpleXMLRPCServer's CGI handler now runs like a pony. ........ r70944 | georg.brandl | 2009-04-01 06:32:39 +0200 (Mi, 01 Apr 2009) | 1 line #5631: add upload to list of possible commands, which is presented in --help-commands. ........ r70954 | georg.brandl | 2009-04-01 17:23:43 +0200 (Mi, 01 Apr 2009) | 1 line Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH. ........ r70963 | georg.brandl | 2009-04-01 19:46:01 +0200 (Mi, 01 Apr 2009) | 1 line #5655: fix docstring oversight. ........ r70998 | georg.brandl | 2009-04-01 23:54:21 +0200 (Mi, 01 Apr 2009) | 1 line In Pdb, stop assigning values to __builtin__._ which interferes with the one commonly installed by gettext. ........ r71056 | georg.brandl | 2009-04-02 19:43:07 +0200 (Do, 02 Apr 2009) | 2 lines Actually the displayhook should print the repr. ........ --- command/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/__init__.py b/command/__init__.py index 0888c2712b..05c758a2aa 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -24,6 +24,8 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', + 'upload', + # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', From a8e0178ca10ed3610546d48949baef25dde94222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 21:44:08 +0000 Subject: [PATCH 2207/8469] Fixed #1491431: distutils.filelist.glob_to_re was broken for some edge cases (detailed in the test --- filelist.py | 5 +++-- tests/test_filelist.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/test_filelist.py diff --git a/filelist.py b/filelist.py index 51a1d57e13..3ba5720ca9 100644 --- a/filelist.py +++ b/filelist.py @@ -302,7 +302,7 @@ def findall (dir = os.curdir): return list -def glob_to_re (pattern): +def glob_to_re(pattern): """Translate a shell-like glob pattern to a regular expression; return a string containing the regex. Differs from 'fnmatch.translate()' in that '*' does not match "special characters" (which are @@ -317,7 +317,8 @@ def glob_to_re (pattern): # character except the special characters. # XXX currently the "special characters" are just slash -- i.e. this is # Unix-only. - pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re) + pattern_re = re.sub(r'((? Date: Sun, 5 Apr 2009 21:47:02 +0000 Subject: [PATCH 2208/8469] Merged revisions 71280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71280 | tarek.ziade | 2009-04-05 23:44:08 +0200 (Sun, 05 Apr 2009) | 1 line Fixed #1491431: distutils.filelist.glob_to_re was broken for some edge cases (detailed in the test ........ --- filelist.py | 5 +++-- tests/test_filelist.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/test_filelist.py diff --git a/filelist.py b/filelist.py index 6d27cce64f..3ce5635047 100644 --- a/filelist.py +++ b/filelist.py @@ -304,7 +304,7 @@ def findall (dir = os.curdir): return list -def glob_to_re (pattern): +def glob_to_re(pattern): """Translate a shell-like glob pattern to a regular expression; return a string containing the regex. Differs from 'fnmatch.translate()' in that '*' does not match "special characters" (which are @@ -319,7 +319,8 @@ def glob_to_re (pattern): # character except the special characters. # XXX currently the "special characters" are just slash -- i.e. this is # Unix-only. - pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re) + pattern_re = re.sub(r'((? Date: Sun, 5 Apr 2009 21:49:36 +0000 Subject: [PATCH 2209/8469] Merged revisions 71280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71280 | tarek.ziade | 2009-04-05 23:44:08 +0200 (Sun, 05 Apr 2009) | 1 line Fixed #1491431: distutils.filelist.glob_to_re was broken for some edge cases (detailed in the test ........ --- filelist.py | 3 ++- tests/test_filelist.py | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/test_filelist.py diff --git a/filelist.py b/filelist.py index a80c71e8c7..58a2bfb108 100644 --- a/filelist.py +++ b/filelist.py @@ -289,7 +289,8 @@ def glob_to_re(pattern): # character except the special characters. # XXX currently the "special characters" are just slash -- i.e. this is # Unix-only. - pattern_re = re.sub(r'(^|[^\\])\.', r'\1[^/]', pattern_re) + pattern_re = re.sub(r'((? Date: Sun, 5 Apr 2009 22:04:38 +0000 Subject: [PATCH 2210/8469] added a simplest test to distutils.spawn._nt_quote_args --- tests/test_spawn.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/test_spawn.py diff --git a/tests/test_spawn.py b/tests/test_spawn.py new file mode 100644 index 0000000000..33e8bcf6e9 --- /dev/null +++ b/tests/test_spawn.py @@ -0,0 +1,20 @@ +"""Tests for distutils.spawn.""" +import unittest +from distutils.spawn import _nt_quote_args + +class SpawnTestCase(unittest.TestCase): + + def test_nt_quote_args(self): + + for (args, wanted) in ((['with space', 'nospace'], + ['"with space"', 'nospace']), + (['nochange', 'nospace'], + ['nochange', 'nospace'])): + res = _nt_quote_args(args) + self.assertEquals(res, wanted) + +def test_suite(): + return unittest.makeSuite(SpawnTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 9dd99efbbbffa381dd119b49bfe43dc5a64484be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 22:51:09 +0000 Subject: [PATCH 2211/8469] Fixed #5095: msi missing from Distutils bdist formats --- command/bdist.py | 49 +++++++++++++++------------------------------ tests/test_bdist.py | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 tests/test_bdist.py diff --git a/command/bdist.py b/command/bdist.py index 3df5ef4c42..cb7598df70 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -12,7 +12,7 @@ from distutils.util import get_platform -def show_formats (): +def show_formats(): """Print list of available formats (arguments to "--format" option). """ from distutils.fancy_getopt import FancyGetopt @@ -24,7 +24,7 @@ def show_formats (): pretty_printer.print_help("List of available distribution formats:") -class bdist (Command): +class bdist(Command): description = "create a built (binary) distribution" @@ -50,35 +50,28 @@ class bdist (Command): ] # The following commands do not take a format option from bdist - no_format_option = ('bdist_rpm', - #'bdist_sdux', 'bdist_pkgtool' - ) + no_format_option = ('bdist_rpm',) # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. - default_format = { 'posix': 'gztar', - 'nt': 'zip', - 'os2': 'zip', } + default_format = {'posix': 'gztar', + 'nt': 'zip', + 'os2': 'zip'} # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', - 'wininst', 'zip', - #'pkgtool', 'sdux' - ] + 'wininst', 'zip', 'msi'] # And the real information. - format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), - 'zip': ('bdist_dumb', "ZIP file"), - 'gztar': ('bdist_dumb', "gzip'ed tar file"), - 'bztar': ('bdist_dumb', "bzip2'ed tar file"), - 'ztar': ('bdist_dumb', "compressed tar file"), - 'tar': ('bdist_dumb', "tar file"), - 'wininst': ('bdist_wininst', - "Windows executable installer"), - 'zip': ('bdist_dumb', "ZIP file"), - #'pkgtool': ('bdist_pkgtool', - # "Solaris pkgtool distribution"), - #'sdux': ('bdist_sdux', "HP-UX swinstall depot"), + format_command = {'rpm': ('bdist_rpm', "RPM distribution"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'ztar': ('bdist_dumb', "compressed tar file"), + 'tar': ('bdist_dumb', "tar file"), + 'wininst': ('bdist_wininst', + "Windows executable installer"), + 'zip': ('bdist_dumb', "ZIP file"), + 'msi': ('bdist_msi', "Microsoft Installer") } @@ -89,9 +82,6 @@ def initialize_options (self): self.dist_dir = None self.skip_build = 0 - # initialize_options() - - def finalize_options (self): # have to finalize 'plat_name' before 'bdist_base' if self.plat_name is None: @@ -120,10 +110,7 @@ def finalize_options (self): if self.dist_dir is None: self.dist_dir = "dist" - # finalize_options() - def run (self): - # Figure out which sub-commands we need to run. commands = [] for format in self.formats: @@ -144,7 +131,3 @@ def run (self): if cmd_name in commands[i+1:]: sub_cmd.keep_temp = 1 self.run_command(cmd_name) - - # run() - -# class bdist diff --git a/tests/test_bdist.py b/tests/test_bdist.py new file mode 100644 index 0000000000..be3ec74976 --- /dev/null +++ b/tests/test_bdist.py @@ -0,0 +1,43 @@ +"""Tests for distutils.command.bdist.""" +import unittest +import sys +import os +import tempfile +import shutil + +from distutils.core import Distribution +from distutils.command.bdist import bdist +from distutils.tests import support +from distutils.spawn import find_executable +from distutils import spawn +from distutils.errors import DistutilsExecError + +class BuildTestCase(support.TempdirManager, + unittest.TestCase): + + def test_formats(self): + + # let's create a command and make sure + # we can fix the format + pkg_pth, dist = self.create_dist() + cmd = bdist(dist) + cmd.formats = ['msi'] + cmd.ensure_finalized() + self.assertEquals(cmd.formats, ['msi']) + + # what format bdist offers ? + # XXX an explicit list in bdist is + # not the best way to bdist_* commands + # we should add a registry + formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar', + 'tar', 'wininst', 'msi'] + formats.sort() + founded = cmd.format_command.keys() + founded.sort() + self.assertEquals(founded, formats) + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From ae1a2a43aeb89b3afbe475cdd5715a9985cf7976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 22:57:21 +0000 Subject: [PATCH 2212/8469] Merged revisions 71291 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71291 | tarek.ziade | 2009-04-06 00:51:09 +0200 (Mon, 06 Apr 2009) | 1 line Fixed #5095: msi missing from Distutils bdist formats ........ --- command/bdist.py | 35 ++++++++++++++--------------------- tests/test_bdist.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 tests/test_bdist.py diff --git a/command/bdist.py b/command/bdist.py index e3b047c66f..1a360b59e3 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -49,35 +49,28 @@ class bdist(Command): ] # The following commands do not take a format option from bdist - no_format_option = ('bdist_rpm', - #'bdist_sdux', 'bdist_pkgtool' - ) + no_format_option = ('bdist_rpm',) # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. - default_format = { 'posix': 'gztar', - 'nt': 'zip', - 'os2': 'zip', } + default_format = {'posix': 'gztar', + 'nt': 'zip', + 'os2': 'zip'} # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', - 'wininst', 'zip', - #'pkgtool', 'sdux' - ] + 'wininst', 'zip', 'msi'] # And the real information. - format_command = { 'rpm': ('bdist_rpm', "RPM distribution"), - 'zip': ('bdist_dumb', "ZIP file"), - 'gztar': ('bdist_dumb', "gzip'ed tar file"), - 'bztar': ('bdist_dumb', "bzip2'ed tar file"), - 'ztar': ('bdist_dumb', "compressed tar file"), - 'tar': ('bdist_dumb', "tar file"), - 'wininst': ('bdist_wininst', - "Windows executable installer"), - 'zip': ('bdist_dumb', "ZIP file"), - #'pkgtool': ('bdist_pkgtool', - # "Solaris pkgtool distribution"), - #'sdux': ('bdist_sdux', "HP-UX swinstall depot"), + format_command = {'rpm': ('bdist_rpm', "RPM distribution"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'ztar': ('bdist_dumb', "compressed tar file"), + 'tar': ('bdist_dumb', "tar file"), + 'wininst': ('bdist_wininst', + "Windows executable installer"), + 'zip': ('bdist_dumb', "ZIP file"), + 'msi': ('bdist_msi', "Microsoft Installer") } diff --git a/tests/test_bdist.py b/tests/test_bdist.py new file mode 100644 index 0000000000..f2849a9756 --- /dev/null +++ b/tests/test_bdist.py @@ -0,0 +1,43 @@ +"""Tests for distutils.command.bdist.""" +import unittest +import sys +import os +import tempfile +import shutil + +from distutils.core import Distribution +from distutils.command.bdist import bdist +from distutils.tests import support +from distutils.spawn import find_executable +from distutils import spawn +from distutils.errors import DistutilsExecError + +class BuildTestCase(support.TempdirManager, + unittest.TestCase): + + def test_formats(self): + + # let's create a command and make sure + # we can fix the format + pkg_pth, dist = self.create_dist() + cmd = bdist(dist) + cmd.formats = ['msi'] + cmd.ensure_finalized() + self.assertEquals(cmd.formats, ['msi']) + + # what format bdist offers ? + # XXX an explicit list in bdist is + # not the best way to bdist_* commands + # we should add a registry + formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar', + 'tar', 'wininst', 'msi'] + formats.sort() + founded = list(cmd.format_command.keys()) + founded.sort() + self.assertEquals(founded, formats) + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 511f865b473f07c3d77f1507fd628f6d0a662a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 5 Apr 2009 23:03:10 +0000 Subject: [PATCH 2213/8469] pep8-fied method names --- command/bdist.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index cb7598df70..ec3375e5c4 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -75,14 +75,14 @@ class bdist(Command): } - def initialize_options (self): + def initialize_options(self): self.bdist_base = None self.plat_name = None self.formats = None self.dist_dir = None self.skip_build = 0 - def finalize_options (self): + def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' if self.plat_name is None: if self.skip_build: @@ -110,7 +110,7 @@ def finalize_options (self): if self.dist_dir is None: self.dist_dir = "dist" - def run (self): + def run(self): # Figure out which sub-commands we need to run. commands = [] for format in self.formats: From 67406893c1b9b727f313a374affe9868ec986fa6 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 7 Apr 2009 01:54:02 +0000 Subject: [PATCH 2214/8469] Bump to 2.6.2c1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8f7eb8427d..e8f55cf087 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.1" +__version__ = "2.6.2c1" #--end constants-- From 24cf99bffe579c9be03c0d69ea1298e83825d202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 9 Apr 2009 21:36:44 +0000 Subject: [PATCH 2215/8469] Fixed #5731: Distutils bdist_wininst no longer worked on non-Windows platforms --- command/bdist_wininst.py | 11 ++++++++--- tests/test_bdist_wininst.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 tests/test_bdist_wininst.py diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index ad6eee8ea8..8a6eca59d8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -342,10 +342,15 @@ def get_exe_bytes (self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - if self.plat_name == 'win32': - sfix = '' + + # if plat_name starts with "win" but is not "win32" + # we want to strip "win" and leave the rest (e.g. -amd64) + # for all other cases, we don't want any suffix + if self.plat_name != 'win32' and self.plat_name[:3] == 'win': + sfix = self.plat_name[3:] else: - sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' + sfix = '' + filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() # class bdist_wininst diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py new file mode 100644 index 0000000000..d851d6c799 --- /dev/null +++ b/tests/test_bdist_wininst.py @@ -0,0 +1,29 @@ +"""Tests for distutils.command.bdist_wininst.""" +import unittest + +from distutils.command.bdist_wininst import bdist_wininst +from distutils.tests import support + +class BuildWinInstTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_exe_bytes(self): + + # issue5731: command was broken on non-windows platforms + # this test makes sure it works now for every platform + # let's create a command + pkg_pth, dist = self.create_dist() + cmd = bdist_wininst(dist) + cmd.ensure_finalized() + + # let's run the code that finds the right wininst*.exe file + # and make sure it finds it and returns its content + # no matter what platform we have + exe_file = cmd.get_exe_bytes() + self.assert_(len(exe_file) > 10) + +def test_suite(): + return unittest.makeSuite(BuildWinInstTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 8723e53f8dcb017b1c6e0d84ced060fdcb336cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 9 Apr 2009 22:02:39 +0000 Subject: [PATCH 2216/8469] Merged revisions 71413 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71413 | tarek.ziade | 2009-04-09 23:36:44 +0200 (Thu, 09 Apr 2009) | 1 line Fixed #5731: Distutils bdist_wininst no longer worked on non-Windows platforms ........ --- command/bdist_wininst.py | 11 ++++++++--- tests/test_bdist_wininst.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 tests/test_bdist_wininst.py diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index e997e8f094..d6d01c630d 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -330,9 +330,14 @@ def get_exe_bytes(self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - if self.plat_name == 'win32': - sfix = '' + + # if plat_name starts with "win" but is not "win32" + # we want to strip "win" and leave the rest (e.g. -amd64) + # for all other cases, we don't want any suffix + if self.plat_name != 'win32' and self.plat_name[:3] == 'win': + sfix = self.plat_name[3:] else: - sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' + sfix = '' + filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py new file mode 100644 index 0000000000..d851d6c799 --- /dev/null +++ b/tests/test_bdist_wininst.py @@ -0,0 +1,29 @@ +"""Tests for distutils.command.bdist_wininst.""" +import unittest + +from distutils.command.bdist_wininst import bdist_wininst +from distutils.tests import support + +class BuildWinInstTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_exe_bytes(self): + + # issue5731: command was broken on non-windows platforms + # this test makes sure it works now for every platform + # let's create a command + pkg_pth, dist = self.create_dist() + cmd = bdist_wininst(dist) + cmd.ensure_finalized() + + # let's run the code that finds the right wininst*.exe file + # and make sure it finds it and returns its content + # no matter what platform we have + exe_file = cmd.get_exe_bytes() + self.assert_(len(exe_file) > 10) + +def test_suite(): + return unittest.makeSuite(BuildWinInstTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 2c03b265b9bbd461c0275c3d9dac16a57714ec8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 9 Apr 2009 22:48:19 +0000 Subject: [PATCH 2217/8469] Merged revisions 71413 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71413 | tarek.ziade | 2009-04-09 23:36:44 +0200 (Thu, 09 Apr 2009) | 1 line Fixed #5731: Distutils bdist_wininst no longer worked on non-Windows platforms ........ --- command/bdist_wininst.py | 11 ++++++++--- tests/test_bdist_wininst.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 tests/test_bdist_wininst.py diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index f18e318cb9..d153e2bc38 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -344,10 +344,15 @@ def get_exe_bytes (self): directory = os.path.dirname(__file__) # we must use a wininst-x.y.exe built with the same C compiler # used for python. XXX What about mingw, borland, and so on? - if self.plat_name == 'win32': - sfix = '' + + # if plat_name starts with "win" but is not "win32" + # we want to strip "win" and leave the rest (e.g. -amd64) + # for all other cases, we don't want any suffix + if self.plat_name != 'win32' and self.plat_name[:3] == 'win': + sfix = self.plat_name[3:] else: - sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' + sfix = '' + filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() # class bdist_wininst diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py new file mode 100644 index 0000000000..de6601fbb7 --- /dev/null +++ b/tests/test_bdist_wininst.py @@ -0,0 +1,34 @@ +"""Tests for distutils.command.bdist_wininst.""" +import unittest +import os + +from distutils.dist import Distribution +from distutils.command.bdist_wininst import bdist_wininst +from distutils.tests import support + +class BuildWinInstTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_exe_bytes(self): + + # issue5731: command was broken on non-windows platforms + # this test makes sure it works now for every platform + # let's create a command + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + dist = Distribution() + cmd = bdist_wininst(dist) + cmd.ensure_finalized() + + # let's run the code that finds the right wininst*.exe file + # and make sure it finds it and returns its content + # no matter what platform we have + exe_file = cmd.get_exe_bytes() + self.assert_(len(exe_file) > 10) + +def test_suite(): + return unittest.makeSuite(BuildWinInstTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 5ac71381e3864771cbe4d32dcad1630b98b660a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Apr 2009 14:55:07 +0000 Subject: [PATCH 2218/8469] #5732: added the check command into Distutils --- command/__init__.py | 2 +- command/check.py | 143 ++++++++++++++++++++++++++++++++++++++++++++ tests/test_check.py | 92 ++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 command/check.py create mode 100644 tests/test_check.py diff --git a/command/__init__.py b/command/__init__.py index 274cb010b8..20b159f74e 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -23,7 +23,7 @@ 'bdist_rpm', 'bdist_wininst', 'upload', - + 'check', # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', diff --git a/command/check.py b/command/check.py new file mode 100644 index 0000000000..c72914952e --- /dev/null +++ b/command/check.py @@ -0,0 +1,143 @@ +"""distutils.command.check + +Implements the Distutils 'check' command. +""" +__revision__ = "$Id$" + +from distutils.core import Command +from distutils.errors import DistutilsSetupError + +try: + # docutils is installed + from docutils.utils import Reporter + from docutils.parsers.rst import Parser + from docutils import frontend + from docutils import nodes + from StringIO import StringIO + + class SilentReporter(Reporter): + + def __init__(self, source, report_level, halt_level, stream=None, + debug=0, encoding='ascii', error_handler='replace'): + self.messages = [] + Reporter.__init__(self, source, report_level, halt_level, stream, + debug, encoding, error_handler) + + def system_message(self, level, message, *children, **kwargs): + self.messages.append((level, message, children, kwargs)) + + HAS_DOCUTILS = True +except ImportError: + # docutils is not installed + HAS_DOCUTILS = False + +class check(Command): + """This command checks the meta-data of the package. + """ + description = ("perform some checks on the package") + user_options = [('metadata', 'm', 'Verify meta-data'), + ('restructuredtext', 'r', + ('Checks if long string meta-data syntax ' + 'are reStructuredText-compliant')), + ('strict', 's', + 'Will exit with an error if a check fails')] + + boolean_options = ['metadata', 'restructuredtext', 'strict'] + + def initialize_options(self): + """Sets default values for options.""" + self.restructuredtext = 0 + self.metadata = 1 + self.strict = 0 + self._warnings = 0 + + def finalize_options(self): + pass + + def warn(self, msg): + """Counts the number of warnings that occurs.""" + self._warnings += 1 + return Command.warn(self, msg) + + def run(self): + """Runs the command.""" + # perform the various tests + if self.metadata: + self.check_metadata() + if self.restructuredtext: + if docutils: + self.check_restructuredtext() + elif self.strict: + raise DistutilsSetupError('The docutils package is needed.') + + # let's raise an error in strict mode, if we have at least + # one warning + if self.strict and self._warnings > 1: + raise DistutilsSetupError('Please correct your package.') + + def check_metadata(self): + """Ensures that all required elements of meta-data are supplied. + + name, version, URL, (author and author_email) or + (maintainer and maintainer_email)). + + Warns if any are missing. + """ + metadata = self.distribution.metadata + + missing = [] + for attr in ('name', 'version', 'url'): + if not (hasattr(metadata, attr) and getattr(metadata, attr)): + missing.append(attr) + + if missing: + self.warn("missing required meta-data: %s" % ' ,'.join(missing)) + if metadata.author: + if not metadata.author_email: + self.warn("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") + elif metadata.maintainer: + if not metadata.maintainer_email: + self.warn("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") + else: + self.warn("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + + "must be supplied") + + def check_restructuredtext(self): + """Checks if the long string fields are reST-compliant.""" + data = self.distribution.get_long_description() + for warning in self._check_rst_data(data): + line = warning[-1].get('line') + if line is None: + warning = warning[1] + else: + warning = '%s (line %s)' % (warning[1], line) + self.warn(warning) + + def _check_rst_data(self, data): + """Returns warnings when the provided data doesn't compile.""" + source_path = StringIO() + parser = Parser() + settings = frontend.OptionParser().get_default_values() + settings.tab_width = 4 + settings.pep_references = None + settings.rfc_references = None + reporter = SilentReporter(source_path, + settings.report_level, + settings.halt_level, + stream=settings.warning_stream, + debug=settings.debug, + encoding=settings.error_encoding, + error_handler=settings.error_encoding_error_handler) + + document = nodes.document(settings, reporter, source=source_path) + document.note_source(source_path, -1) + try: + parser.parse(data, document) + except AttributeError: + reporter.messages.append((-1, 'Could not finish the parsing.', + '', {})) + + return reporter.messages diff --git a/tests/test_check.py b/tests/test_check.py new file mode 100644 index 0000000000..443fa35baf --- /dev/null +++ b/tests/test_check.py @@ -0,0 +1,92 @@ +"""Tests for distutils.command.check.""" +import unittest + +from distutils.command.check import check, HAS_DOCUTILS +from distutils.tests import support +from distutils.errors import DistutilsSetupError + +class CheckTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _run(self, metadata=None, **options): + if metadata is None: + metadata = {} + pkg_info, dist = self.create_dist(**metadata) + cmd = check(dist) + cmd.initialize_options() + for name, value in options.items(): + setattr(cmd, name, value) + cmd.ensure_finalized() + cmd.run() + return cmd + + def test_check_metadata(self): + # let's run the command with no metadata at all + # by default, check is checking the metadata + # should have some warnings + cmd = self._run() + self.assertEquals(cmd._warnings, 2) + + # now let's add the required fields + # and run it again, to make sure we don't get + # any warning anymore + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} + cmd = self._run(metadata) + self.assertEquals(cmd._warnings, 0) + + # now with the strict mode, we should + # get an error if there are missing metadata + self.assertRaises(DistutilsSetupError, self._run, {}, **{'strict': 1}) + + # and of course, no error when all metadata are present + cmd = self._run(metadata, strict=1) + self.assertEquals(cmd._warnings, 0) + + def test_check_document(self): + if not HAS_DOCUTILS: # won't test without docutils + return + pkg_info, dist = self.create_dist() + cmd = check(dist) + + # let's see if it detects broken rest + broken_rest = 'title\n===\n\ntest' + msgs = cmd._check_rst_data(broken_rest) + self.assertEquals(len(msgs), 1) + + # and non-broken rest + rest = 'title\n=====\n\ntest' + msgs = cmd._check_rst_data(rest) + self.assertEquals(len(msgs), 0) + + def test_check_restructuredtext(self): + if not HAS_DOCUTILS: # won't test without docutils + return + # let's see if it detects broken rest in long_description + broken_rest = 'title\n===\n\ntest' + pkg_info, dist = self.create_dist(long_description=broken_rest) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEquals(cmd._warnings, 1) + + # let's see if we have an error with strict=1 + cmd = check(dist) + cmd.initialize_options() + cmd.strict = 1 + cmd.ensure_finalized() + self.assertRaises(DistutilsSetupError, cmd.run) + + # and non-broken rest + rest = 'title\n=====\n\ntest' + pkg_info, dist = self.create_dist(long_description=rest) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEquals(cmd._warnings, 0) + +def test_suite(): + return unittest.makeSuite(CheckTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 416e5b55de1ffbdb2ced47b9655e3f8facdc299d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Apr 2009 15:00:43 +0000 Subject: [PATCH 2219/8469] Merged revisions 71473 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71473 | tarek.ziade | 2009-04-11 16:55:07 +0200 (Sat, 11 Apr 2009) | 1 line #5732: added the check command into Distutils ........ --- command/__init__.py | 1 + command/check.py | 143 ++++++++++++++++++++++++++++++++++++++++++++ tests/test_check.py | 92 ++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 command/check.py create mode 100644 tests/test_check.py diff --git a/command/__init__.py b/command/__init__.py index add83f8740..f7dcde48ed 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -22,6 +22,7 @@ 'bdist_dumb', 'bdist_rpm', 'bdist_wininst', + 'check', # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', diff --git a/command/check.py b/command/check.py new file mode 100644 index 0000000000..c72914952e --- /dev/null +++ b/command/check.py @@ -0,0 +1,143 @@ +"""distutils.command.check + +Implements the Distutils 'check' command. +""" +__revision__ = "$Id$" + +from distutils.core import Command +from distutils.errors import DistutilsSetupError + +try: + # docutils is installed + from docutils.utils import Reporter + from docutils.parsers.rst import Parser + from docutils import frontend + from docutils import nodes + from StringIO import StringIO + + class SilentReporter(Reporter): + + def __init__(self, source, report_level, halt_level, stream=None, + debug=0, encoding='ascii', error_handler='replace'): + self.messages = [] + Reporter.__init__(self, source, report_level, halt_level, stream, + debug, encoding, error_handler) + + def system_message(self, level, message, *children, **kwargs): + self.messages.append((level, message, children, kwargs)) + + HAS_DOCUTILS = True +except ImportError: + # docutils is not installed + HAS_DOCUTILS = False + +class check(Command): + """This command checks the meta-data of the package. + """ + description = ("perform some checks on the package") + user_options = [('metadata', 'm', 'Verify meta-data'), + ('restructuredtext', 'r', + ('Checks if long string meta-data syntax ' + 'are reStructuredText-compliant')), + ('strict', 's', + 'Will exit with an error if a check fails')] + + boolean_options = ['metadata', 'restructuredtext', 'strict'] + + def initialize_options(self): + """Sets default values for options.""" + self.restructuredtext = 0 + self.metadata = 1 + self.strict = 0 + self._warnings = 0 + + def finalize_options(self): + pass + + def warn(self, msg): + """Counts the number of warnings that occurs.""" + self._warnings += 1 + return Command.warn(self, msg) + + def run(self): + """Runs the command.""" + # perform the various tests + if self.metadata: + self.check_metadata() + if self.restructuredtext: + if docutils: + self.check_restructuredtext() + elif self.strict: + raise DistutilsSetupError('The docutils package is needed.') + + # let's raise an error in strict mode, if we have at least + # one warning + if self.strict and self._warnings > 1: + raise DistutilsSetupError('Please correct your package.') + + def check_metadata(self): + """Ensures that all required elements of meta-data are supplied. + + name, version, URL, (author and author_email) or + (maintainer and maintainer_email)). + + Warns if any are missing. + """ + metadata = self.distribution.metadata + + missing = [] + for attr in ('name', 'version', 'url'): + if not (hasattr(metadata, attr) and getattr(metadata, attr)): + missing.append(attr) + + if missing: + self.warn("missing required meta-data: %s" % ' ,'.join(missing)) + if metadata.author: + if not metadata.author_email: + self.warn("missing meta-data: if 'author' supplied, " + + "'author_email' must be supplied too") + elif metadata.maintainer: + if not metadata.maintainer_email: + self.warn("missing meta-data: if 'maintainer' supplied, " + + "'maintainer_email' must be supplied too") + else: + self.warn("missing meta-data: either (author and author_email) " + + "or (maintainer and maintainer_email) " + + "must be supplied") + + def check_restructuredtext(self): + """Checks if the long string fields are reST-compliant.""" + data = self.distribution.get_long_description() + for warning in self._check_rst_data(data): + line = warning[-1].get('line') + if line is None: + warning = warning[1] + else: + warning = '%s (line %s)' % (warning[1], line) + self.warn(warning) + + def _check_rst_data(self, data): + """Returns warnings when the provided data doesn't compile.""" + source_path = StringIO() + parser = Parser() + settings = frontend.OptionParser().get_default_values() + settings.tab_width = 4 + settings.pep_references = None + settings.rfc_references = None + reporter = SilentReporter(source_path, + settings.report_level, + settings.halt_level, + stream=settings.warning_stream, + debug=settings.debug, + encoding=settings.error_encoding, + error_handler=settings.error_encoding_error_handler) + + document = nodes.document(settings, reporter, source=source_path) + document.note_source(source_path, -1) + try: + parser.parse(data, document) + except AttributeError: + reporter.messages.append((-1, 'Could not finish the parsing.', + '', {})) + + return reporter.messages diff --git a/tests/test_check.py b/tests/test_check.py new file mode 100644 index 0000000000..443fa35baf --- /dev/null +++ b/tests/test_check.py @@ -0,0 +1,92 @@ +"""Tests for distutils.command.check.""" +import unittest + +from distutils.command.check import check, HAS_DOCUTILS +from distutils.tests import support +from distutils.errors import DistutilsSetupError + +class CheckTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _run(self, metadata=None, **options): + if metadata is None: + metadata = {} + pkg_info, dist = self.create_dist(**metadata) + cmd = check(dist) + cmd.initialize_options() + for name, value in options.items(): + setattr(cmd, name, value) + cmd.ensure_finalized() + cmd.run() + return cmd + + def test_check_metadata(self): + # let's run the command with no metadata at all + # by default, check is checking the metadata + # should have some warnings + cmd = self._run() + self.assertEquals(cmd._warnings, 2) + + # now let's add the required fields + # and run it again, to make sure we don't get + # any warning anymore + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} + cmd = self._run(metadata) + self.assertEquals(cmd._warnings, 0) + + # now with the strict mode, we should + # get an error if there are missing metadata + self.assertRaises(DistutilsSetupError, self._run, {}, **{'strict': 1}) + + # and of course, no error when all metadata are present + cmd = self._run(metadata, strict=1) + self.assertEquals(cmd._warnings, 0) + + def test_check_document(self): + if not HAS_DOCUTILS: # won't test without docutils + return + pkg_info, dist = self.create_dist() + cmd = check(dist) + + # let's see if it detects broken rest + broken_rest = 'title\n===\n\ntest' + msgs = cmd._check_rst_data(broken_rest) + self.assertEquals(len(msgs), 1) + + # and non-broken rest + rest = 'title\n=====\n\ntest' + msgs = cmd._check_rst_data(rest) + self.assertEquals(len(msgs), 0) + + def test_check_restructuredtext(self): + if not HAS_DOCUTILS: # won't test without docutils + return + # let's see if it detects broken rest in long_description + broken_rest = 'title\n===\n\ntest' + pkg_info, dist = self.create_dist(long_description=broken_rest) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEquals(cmd._warnings, 1) + + # let's see if we have an error with strict=1 + cmd = check(dist) + cmd.initialize_options() + cmd.strict = 1 + cmd.ensure_finalized() + self.assertRaises(DistutilsSetupError, cmd.run) + + # and non-broken rest + rest = 'title\n=====\n\ntest' + pkg_info, dist = self.create_dist(long_description=rest) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEquals(cmd._warnings, 0) + +def test_suite(): + return unittest.makeSuite(CheckTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 2311950320c0ddea8f2d8fa834d052eaedf144f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Apr 2009 15:14:17 +0000 Subject: [PATCH 2220/8469] testing a full check case --- command/check.py | 2 +- tests/test_check.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/command/check.py b/command/check.py index c72914952e..d164f3f527 100644 --- a/command/check.py +++ b/command/check.py @@ -65,7 +65,7 @@ def run(self): if self.metadata: self.check_metadata() if self.restructuredtext: - if docutils: + if HAS_DOCUTILS: self.check_restructuredtext() elif self.strict: raise DistutilsSetupError('The docutils package is needed.') diff --git a/tests/test_check.py b/tests/test_check.py index 443fa35baf..5e0c453140 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -85,6 +85,13 @@ def test_check_restructuredtext(self): cmd.check_restructuredtext() self.assertEquals(cmd._warnings, 0) + def test_check_all(self): + + metadata = {'url': 'xxx', 'author': 'xxx'} + self.assertRaises(DistutilsSetupError, self._run, + {}, **{'strict': 1, + 'restructuredtext': 1}) + def test_suite(): return unittest.makeSuite(CheckTestCase) From ca1e9a291e3e1662fdfda0143c50aa654fa8b02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Apr 2009 15:17:04 +0000 Subject: [PATCH 2221/8469] Merged revisions 71478 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71478 | tarek.ziade | 2009-04-11 17:14:17 +0200 (Sat, 11 Apr 2009) | 1 line testing a full check case ........ --- command/check.py | 2 +- tests/test_check.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/command/check.py b/command/check.py index c72914952e..d164f3f527 100644 --- a/command/check.py +++ b/command/check.py @@ -65,7 +65,7 @@ def run(self): if self.metadata: self.check_metadata() if self.restructuredtext: - if docutils: + if HAS_DOCUTILS: self.check_restructuredtext() elif self.strict: raise DistutilsSetupError('The docutils package is needed.') diff --git a/tests/test_check.py b/tests/test_check.py index 443fa35baf..5e0c453140 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -85,6 +85,13 @@ def test_check_restructuredtext(self): cmd.check_restructuredtext() self.assertEquals(cmd._warnings, 0) + def test_check_all(self): + + metadata = {'url': 'xxx', 'author': 'xxx'} + self.assertRaises(DistutilsSetupError, self._run, + {}, **{'strict': 1, + 'restructuredtext': 1}) + def test_suite(): return unittest.makeSuite(CheckTestCase) From c22d66c04f50a075bb19cae0a0ebcc3f8ade5a14 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 11 Apr 2009 20:45:40 +0000 Subject: [PATCH 2222/8469] Merged revisions 70912,70944,70968,71033,71041,71208,71263,71286,71395-71396,71405-71406,71485,71492,71494 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70912 | georg.brandl | 2009-03-31 17:35:46 -0500 (Tue, 31 Mar 2009) | 1 line #5617: add a handy function to print a unicode string to gdbinit. ........ r70944 | georg.brandl | 2009-03-31 23:32:39 -0500 (Tue, 31 Mar 2009) | 1 line #5631: add upload to list of possible commands, which is presented in --help-commands. ........ r70968 | michael.foord | 2009-04-01 13:25:38 -0500 (Wed, 01 Apr 2009) | 1 line Adding Wing project file ........ r71033 | brett.cannon | 2009-04-01 22:34:53 -0500 (Wed, 01 Apr 2009) | 3 lines Fix two issues introduced by issue #71031 by changing the signature of PyImport_AppendInittab() to take a const char *. ........ r71041 | jesse.noller | 2009-04-02 00:17:26 -0500 (Thu, 02 Apr 2009) | 1 line Add custom initializer argument to multiprocess.Manager*, courtesy of lekma ........ r71208 | michael.foord | 2009-04-04 20:15:01 -0500 (Sat, 04 Apr 2009) | 4 lines Change the way unittest.TestSuite use their tests to always access them through iteration. Non behavior changing, this allows you to create custom subclasses that override __iter__. Issue #5693 ........ r71263 | michael.foord | 2009-04-05 14:19:28 -0500 (Sun, 05 Apr 2009) | 4 lines Adding assertIs and assertIsNot methods to unittest.TestCase Issue #2578 ........ r71286 | tarek.ziade | 2009-04-05 17:04:38 -0500 (Sun, 05 Apr 2009) | 1 line added a simplest test to distutils.spawn._nt_quote_args ........ r71395 | benjamin.peterson | 2009-04-08 08:27:29 -0500 (Wed, 08 Apr 2009) | 1 line these must be installed to correctly run tests ........ r71396 | benjamin.peterson | 2009-04-08 08:29:41 -0500 (Wed, 08 Apr 2009) | 1 line fix syntax ........ r71405 | andrew.kuchling | 2009-04-09 06:22:47 -0500 (Thu, 09 Apr 2009) | 1 line Add items ........ r71406 | andrew.kuchling | 2009-04-09 06:23:36 -0500 (Thu, 09 Apr 2009) | 1 line Typo fixes ........ r71485 | andrew.kuchling | 2009-04-11 11:12:23 -0500 (Sat, 11 Apr 2009) | 1 line Add various items ........ r71492 | georg.brandl | 2009-04-11 13:19:27 -0500 (Sat, 11 Apr 2009) | 1 line Take credit for a patch of mine. ........ r71494 | benjamin.peterson | 2009-04-11 14:31:00 -0500 (Sat, 11 Apr 2009) | 1 line ignore py3_test_grammar when compiling the library ........ --- command/__init__.py | 1 + command/check.py | 5 +++-- tests/test_spawn.py | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 tests/test_spawn.py diff --git a/command/__init__.py b/command/__init__.py index f7dcde48ed..c379edbed0 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -23,6 +23,7 @@ 'bdist_rpm', 'bdist_wininst', 'check', + 'upload', # These two are reserved for future use: #'bdist_sdux', #'bdist_pkgtool', diff --git a/command/check.py b/command/check.py index d164f3f527..5dd73b07af 100644 --- a/command/check.py +++ b/command/check.py @@ -27,8 +27,9 @@ def system_message(self, level, message, *children, **kwargs): self.messages.append((level, message, children, kwargs)) HAS_DOCUTILS = True -except ImportError: - # docutils is not installed +except Exception: + # Catch all exceptions because exceptions besides ImportError probably + # indicate that docutils is not ported to Py3k. HAS_DOCUTILS = False class check(Command): diff --git a/tests/test_spawn.py b/tests/test_spawn.py new file mode 100644 index 0000000000..33e8bcf6e9 --- /dev/null +++ b/tests/test_spawn.py @@ -0,0 +1,20 @@ +"""Tests for distutils.spawn.""" +import unittest +from distutils.spawn import _nt_quote_args + +class SpawnTestCase(unittest.TestCase): + + def test_nt_quote_args(self): + + for (args, wanted) in ((['with space', 'nospace'], + ['"with space"', 'nospace']), + (['nochange', 'nospace'], + ['nochange', 'nospace'])): + res = _nt_quote_args(args) + self.assertEquals(res, wanted) + +def test_suite(): + return unittest.makeSuite(SpawnTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 4589130e9c66f7d818ac17f854c48643b7bba95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 14:53:51 +0000 Subject: [PATCH 2223/8469] removed the print statements and added a test --- command/config.py | 16 +++++++++------ tests/test_config_cmd.py | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 tests/test_config_cmd.py diff --git a/command/config.py b/command/config.py index 6b358cf250..c36456ad6a 100644 --- a/command/config.py +++ b/command/config.py @@ -354,13 +354,17 @@ def check_header (self, header, include_dirs=None, # class config +def dump_file(filename, head=None): + """Dumps a file content into log.info. -def dump_file (filename, head=None): + If head is not None, will be dumped before the file content. + """ if head is None: - print filename + ":" + log.info('%s' % filename) else: - print head - + log.info(head) file = open(filename) - sys.stdout.write(file.read()) - file.close() + try: + log.info(file.read()) + finally: + file.close() diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py new file mode 100644 index 0000000000..6fd1776668 --- /dev/null +++ b/tests/test_config_cmd.py @@ -0,0 +1,42 @@ +"""Tests for distutils.command.config.""" +import unittest +import os + +from distutils.command.config import dump_file +from distutils.tests import support +from distutils import log + +class ConfigTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _info(self, msg): + for line in msg.splitlines(): + self._logs.append(line) + + def setUp(self): + super(ConfigTestCase, self).setUp() + self._logs = [] + self.old_log = log.info + log.info = self._info + + def tearDown(self): + log.info = self.old_log + super(ConfigTestCase, self).tearDown() + + def test_dump_file(self): + this_file = os.path.splitext(__file__)[0] + '.py' + f = open(this_file) + try: + numlines = len(f.readlines()) + finally: + f.close() + + dump_file(this_file, 'I am the header') + self.assertEquals(len(self._logs), numlines+1) + +def test_suite(): + return unittest.makeSuite(ConfigTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 46a2116c217f63b2a3059dafad7123f509fa46f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 14:57:46 +0000 Subject: [PATCH 2224/8469] Merged revisions 71509 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71509 | tarek.ziade | 2009-04-12 16:53:51 +0200 (Sun, 12 Apr 2009) | 1 line removed the print statements and added a test ........ --- command/config.py | 15 +++++++++----- tests/test_config_cmd.py | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 tests/test_config_cmd.py diff --git a/command/config.py b/command/config.py index 34f91884d8..144c5132b3 100644 --- a/command/config.py +++ b/command/config.py @@ -336,11 +336,16 @@ def check_header(self, header, include_dirs=None, library_dirs=None, def dump_file(filename, head=None): + """Dumps a file content into log.info. + + If head is not None, will be dumped before the file content. + """ if head is None: - print(filename + ":") + log.info('%s' % filename) else: - print(head) - + log.info(head) file = open(filename) - sys.stdout.write(file.read()) - file.close() + try: + log.info(file.read()) + finally: + file.close() diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py new file mode 100644 index 0000000000..6fd1776668 --- /dev/null +++ b/tests/test_config_cmd.py @@ -0,0 +1,42 @@ +"""Tests for distutils.command.config.""" +import unittest +import os + +from distutils.command.config import dump_file +from distutils.tests import support +from distutils import log + +class ConfigTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _info(self, msg): + for line in msg.splitlines(): + self._logs.append(line) + + def setUp(self): + super(ConfigTestCase, self).setUp() + self._logs = [] + self.old_log = log.info + log.info = self._info + + def tearDown(self): + log.info = self.old_log + super(ConfigTestCase, self).tearDown() + + def test_dump_file(self): + this_file = os.path.splitext(__file__)[0] + '.py' + f = open(this_file) + try: + numlines = len(f.readlines()) + finally: + f.close() + + dump_file(this_file, 'I am the header') + self.assertEquals(len(self._logs), numlines+1) + +def test_suite(): + return unittest.makeSuite(ConfigTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a3a55acac57195c9b2dab89f5086e30d6bebdf93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 15:03:50 +0000 Subject: [PATCH 2225/8469] pep8-fied the module before adding tests --- command/config.py | 62 +++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/command/config.py b/command/config.py index c36456ad6a..74eed78391 100644 --- a/command/config.py +++ b/command/config.py @@ -18,10 +18,9 @@ from distutils.sysconfig import customize_compiler from distutils import log -LANG_EXT = {'c': '.c', - 'c++': '.cxx'} +LANG_EXT = {'c': '.c', 'c++': '.cxx'} -class config (Command): +class config(Command): description = "prepare to build" @@ -51,12 +50,10 @@ class config (Command): # The three standard command methods: since the "config" command # does nothing by default, these are empty. - def initialize_options (self): + def initialize_options(self): self.compiler = None self.cc = None self.include_dirs = None - #self.define = None - #self.undef = None self.libraries = None self.library_dirs = None @@ -68,7 +65,7 @@ def initialize_options (self): # to clean at some point self.temp_files = [] - def finalize_options (self): + def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] elif type(self.include_dirs) is StringType: @@ -93,7 +90,7 @@ def run (self): # loosely based on Autoconf macros of similar names. Sub-classes # may use these freely. - def _check_compiler (self): + def _check_compiler(self): """Check that 'self.compiler' really is a CCompiler object; if not, make it one. """ @@ -112,7 +109,7 @@ def _check_compiler (self): self.compiler.set_library_dirs(self.library_dirs) - def _gen_temp_sourcefile (self, body, headers, lang): + def _gen_temp_sourcefile(self, body, headers, lang): filename = "_configtest" + LANG_EXT[lang] file = open(filename, "w") if headers: @@ -125,14 +122,14 @@ def _gen_temp_sourcefile (self, body, headers, lang): file.close() return filename - def _preprocess (self, body, headers, include_dirs, lang): + def _preprocess(self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) out = "_configtest.i" self.temp_files.extend([src, out]) self.compiler.preprocess(src, out, include_dirs=include_dirs) return (src, out) - def _compile (self, body, headers, include_dirs, lang): + def _compile(self, body, headers, include_dirs, lang): src = self._gen_temp_sourcefile(body, headers, lang) if self.dump_source: dump_file(src, "compiling '%s':" % src) @@ -141,9 +138,8 @@ def _compile (self, body, headers, include_dirs, lang): self.compiler.compile([src], include_dirs=include_dirs) return (src, obj) - def _link (self, body, - headers, include_dirs, - libraries, library_dirs, lang): + def _link(self, body, headers, include_dirs, libraries, library_dirs, + lang): (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] self.compiler.link_executable([obj], prog, @@ -157,7 +153,7 @@ def _link (self, body, return (src, obj, prog) - def _clean (self, *filenames): + def _clean(self, *filenames): if not filenames: filenames = self.temp_files self.temp_files = [] @@ -179,7 +175,7 @@ def _clean (self, *filenames): # XXX need access to the header search path and maybe default macros. - def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): + def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): """Construct a source file from 'body' (a string containing lines of C/C++ code) and 'headers' (a list of header files to include) and run it through the preprocessor. Return true if the @@ -197,8 +193,8 @@ def try_cpp (self, body=None, headers=None, include_dirs=None, lang="c"): self._clean() return ok - def search_cpp (self, pattern, body=None, - headers=None, include_dirs=None, lang="c"): + def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, + lang="c"): """Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a @@ -227,7 +223,7 @@ def search_cpp (self, pattern, body=None, self._clean() return match - def try_compile (self, body, headers=None, include_dirs=None, lang="c"): + def try_compile(self, body, headers=None, include_dirs=None, lang="c"): """Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise. """ @@ -243,10 +239,8 @@ def try_compile (self, body, headers=None, include_dirs=None, lang="c"): self._clean() return ok - def try_link (self, body, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - lang="c"): + def try_link(self, body, headers=None, include_dirs=None, libraries=None, + library_dirs=None, lang="c"): """Try to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise. @@ -264,10 +258,8 @@ def try_link (self, body, self._clean() return ok - def try_run (self, body, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - lang="c"): + def try_run(self, body, headers=None, include_dirs=None, libraries=None, + library_dirs=None, lang="c"): """Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise. @@ -291,10 +283,8 @@ def try_run (self, body, # (these are the ones that are actually likely to be useful # when implementing a real-world config command!) - def check_func (self, func, - headers=None, include_dirs=None, - libraries=None, library_dirs=None, - decl=0, call=0): + def check_func(self, func, headers=None, include_dirs=None, + libraries=None, library_dirs=None, decl=0, call=0): """Determine if function 'func' is available by constructing a source file that refers to 'func', and compiles and links it. @@ -327,8 +317,8 @@ def check_func (self, func, # check_func () - def check_lib (self, library, library_dirs=None, - headers=None, include_dirs=None, other_libraries=[]): + def check_lib(self, library, library_dirs=None, headers=None, + include_dirs=None, other_libraries=[]): """Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to @@ -342,8 +332,8 @@ def check_lib (self, library, library_dirs=None, headers, include_dirs, [library]+other_libraries, library_dirs) - def check_header (self, header, include_dirs=None, - library_dirs=None, lang="c"): + def check_header(self, header, include_dirs=None, library_dirs=None, + lang="c"): """Determine if the system header file named by 'header_file' exists and can be found by the preprocessor; return true if so, false otherwise. @@ -352,8 +342,6 @@ def check_header (self, header, include_dirs=None, include_dirs=include_dirs) -# class config - def dump_file(filename, head=None): """Dumps a file content into log.info. From 6a0952de72b896a4a74338f867d14205a0fe6394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 15:07:31 +0000 Subject: [PATCH 2226/8469] Merged revisions 71513 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71513 | tarek.ziade | 2009-04-12 17:03:50 +0200 (Sun, 12 Apr 2009) | 1 line pep8-fied the module before adding tests ........ --- command/config.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/command/config.py b/command/config.py index 144c5132b3..385a47a726 100644 --- a/command/config.py +++ b/command/config.py @@ -53,8 +53,6 @@ def initialize_options(self): self.compiler = None self.cc = None self.include_dirs = None - #self.define = None - #self.undef = None self.libraries = None self.library_dirs = None @@ -136,8 +134,8 @@ def _compile(self, body, headers, include_dirs, lang): self.compiler.compile([src], include_dirs=include_dirs) return (src, obj) - def _link(self, body, headers, include_dirs, libraries, - library_dirs, lang): + def _link(self, body, headers, include_dirs, libraries, library_dirs, + lang): (src, obj) = self._compile(body, headers, include_dirs, lang) prog = os.path.splitext(os.path.basename(src))[0] self.compiler.link_executable([obj], prog, @@ -191,8 +189,8 @@ def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): self._clean() return ok - def search_cpp(self, pattern, body=None, headers=None, - include_dirs=None, lang="c"): + def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, + lang="c"): """Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a @@ -237,8 +235,8 @@ def try_compile(self, body, headers=None, include_dirs=None, lang="c"): self._clean() return ok - def try_link(self, body, headers=None, include_dirs=None, - libraries=None, library_dirs=None, lang="c"): + def try_link(self, body, headers=None, include_dirs=None, libraries=None, + library_dirs=None, lang="c"): """Try to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise. @@ -256,8 +254,8 @@ def try_link(self, body, headers=None, include_dirs=None, self._clean() return ok - def try_run(self, body, headers=None, include_dirs=None, - libraries=None, library_dirs=None, lang="c"): + def try_run(self, body, headers=None, include_dirs=None, libraries=None, + library_dirs=None, lang="c"): """Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise. From 343e5f79fa09f634bc1b7273b1096ee370aa988f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 16:31:24 +0000 Subject: [PATCH 2227/8469] added a simple test for search_cpp --- command/config.py | 5 ++--- tests/test_config_cmd.py | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/command/config.py b/command/config.py index 74eed78391..43a8dc8439 100644 --- a/command/config.py +++ b/command/config.py @@ -202,11 +202,10 @@ def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, preprocesses an empty file -- which can be useful to determine the symbols the preprocessor and compiler set by default. """ - self._check_compiler() - (src, out) = self._preprocess(body, headers, include_dirs, lang) + src, out = self._preprocess(body, headers, include_dirs, lang) - if type(pattern) is StringType: + if isinstance(pattern, str): pattern = re.compile(pattern) file = open(out) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 6fd1776668..af16d4c821 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,7 +2,7 @@ import unittest import os -from distutils.command.config import dump_file +from distutils.command.config import dump_file, config from distutils.tests import support from distutils import log @@ -10,7 +10,7 @@ class ConfigTestCase(support.LoggingSilencer, support.TempdirManager, unittest.TestCase): - def _info(self, msg): + def _info(self, msg, *args): for line in msg.splitlines(): self._logs.append(line) @@ -35,6 +35,17 @@ def test_dump_file(self): dump_file(this_file, 'I am the header') self.assertEquals(len(self._logs), numlines+1) + def test_search_cpp(self): + pkg_dir, dist = self.create_dist() + cmd = config(dist) + + # simple pattern searches + match = cmd.search_cpp(pattern='xxx', body='// xxx') + self.assertEquals(match, 0) + + match = cmd.search_cpp(pattern='command', body='// xxx') + self.assertEquals(match, 1) + def test_suite(): return unittest.makeSuite(ConfigTestCase) From ea43ebbadd370b5247b600b4b46053f358541259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 16:34:34 +0000 Subject: [PATCH 2228/8469] Merged revisions 71523 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71523 | tarek.ziade | 2009-04-12 18:31:24 +0200 (Sun, 12 Apr 2009) | 1 line added a simple test for search_cpp ........ --- command/config.py | 3 +-- tests/test_config_cmd.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/command/config.py b/command/config.py index 385a47a726..c31220553c 100644 --- a/command/config.py +++ b/command/config.py @@ -198,9 +198,8 @@ def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, preprocesses an empty file -- which can be useful to determine the symbols the preprocessor and compiler set by default. """ - self._check_compiler() - (src, out) = self._preprocess(body, headers, include_dirs, lang) + src, out = self._preprocess(body, headers, include_dirs, lang) if isinstance(pattern, str): pattern = re.compile(pattern) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 6fd1776668..af16d4c821 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,7 +2,7 @@ import unittest import os -from distutils.command.config import dump_file +from distutils.command.config import dump_file, config from distutils.tests import support from distutils import log @@ -10,7 +10,7 @@ class ConfigTestCase(support.LoggingSilencer, support.TempdirManager, unittest.TestCase): - def _info(self, msg): + def _info(self, msg, *args): for line in msg.splitlines(): self._logs.append(line) @@ -35,6 +35,17 @@ def test_dump_file(self): dump_file(this_file, 'I am the header') self.assertEquals(len(self._logs), numlines+1) + def test_search_cpp(self): + pkg_dir, dist = self.create_dist() + cmd = config(dist) + + # simple pattern searches + match = cmd.search_cpp(pattern='xxx', body='// xxx') + self.assertEquals(match, 0) + + match = cmd.search_cpp(pattern='command', body='// xxx') + self.assertEquals(match, 1) + def test_suite(): return unittest.makeSuite(ConfigTestCase) From b4b74e3688d8bebe6d1dd2a7121a2032510412a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 16:45:32 +0000 Subject: [PATCH 2229/8469] added a test for finalize_options --- command/config.py | 13 ++++++------- tests/test_config_cmd.py | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/command/config.py b/command/config.py index 43a8dc8439..f2ebe37dc9 100644 --- a/command/config.py +++ b/command/config.py @@ -12,7 +12,7 @@ __revision__ = "$Id$" import sys, os, string, re -from types import * + from distutils.core import Command from distutils.errors import DistutilsExecError from distutils.sysconfig import customize_compiler @@ -68,19 +68,18 @@ def initialize_options(self): def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - elif type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, os.pathsep) + elif isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) if self.libraries is None: self.libraries = [] - elif type(self.libraries) is StringType: + elif isinstance(self.libraries, str): self.libraries = [self.libraries] if self.library_dirs is None: self.library_dirs = [] - elif type(self.library_dirs) is StringType: - self.library_dirs = string.split(self.library_dirs, os.pathsep) - + elif isinstance(self.library_dirs, str): + self.library_dirs = self.library_dirs.split(os.pathsep) def run (self): pass diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index af16d4c821..45d480ba5a 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -46,6 +46,21 @@ def test_search_cpp(self): match = cmd.search_cpp(pattern='command', body='// xxx') self.assertEquals(match, 1) + def test_finalize_options(self): + # finalize_options does a bit of transformation + # on options + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd.include_dirs = 'one%stwo' % os.pathsep + cmd.libraries = 'one' + cmd.library_dirs = 'three%sfour' % os.pathsep + cmd.ensure_finalized() + + self.assertEquals(cmd.include_dirs, ['one', 'two']) + self.assertEquals(cmd.libraries, ['one']) + self.assertEquals(cmd.library_dirs, ['three', 'four']) + + def test_suite(): return unittest.makeSuite(ConfigTestCase) From fe17289ba8c6ef976d19c69ac49cadce27ae1611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 16:49:20 +0000 Subject: [PATCH 2230/8469] Merged revisions 71528 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71528 | tarek.ziade | 2009-04-12 18:45:32 +0200 (Sun, 12 Apr 2009) | 1 line added a test for finalize_options ........ --- command/config.py | 1 + tests/test_config_cmd.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/command/config.py b/command/config.py index c31220553c..ac80a54eb1 100644 --- a/command/config.py +++ b/command/config.py @@ -12,6 +12,7 @@ __revision__ = "$Id$" import sys, os, re + from distutils.core import Command from distutils.errors import DistutilsExecError from distutils.sysconfig import customize_compiler diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index af16d4c821..45d480ba5a 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -46,6 +46,21 @@ def test_search_cpp(self): match = cmd.search_cpp(pattern='command', body='// xxx') self.assertEquals(match, 1) + def test_finalize_options(self): + # finalize_options does a bit of transformation + # on options + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd.include_dirs = 'one%stwo' % os.pathsep + cmd.libraries = 'one' + cmd.library_dirs = 'three%sfour' % os.pathsep + cmd.ensure_finalized() + + self.assertEquals(cmd.include_dirs, ['one', 'two']) + self.assertEquals(cmd.libraries, ['one']) + self.assertEquals(cmd.library_dirs, ['three', 'four']) + + def test_suite(): return unittest.makeSuite(ConfigTestCase) From 44c22c6f2b8bbf6c929777a17a2fadfec2afbd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 17:02:08 +0000 Subject: [PATCH 2231/8469] removed string usage and added a test for _clean --- command/config.py | 8 ++++---- tests/test_config_cmd.py | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/command/config.py b/command/config.py index f2ebe37dc9..134fa3892d 100644 --- a/command/config.py +++ b/command/config.py @@ -11,7 +11,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, re from distutils.core import Command from distutils.errors import DistutilsExecError @@ -81,7 +81,7 @@ def finalize_options(self): elif isinstance(self.library_dirs, str): self.library_dirs = self.library_dirs.split(os.pathsep) - def run (self): + def run(self): pass @@ -156,7 +156,7 @@ def _clean(self, *filenames): if not filenames: filenames = self.temp_files self.temp_files = [] - log.info("removing: %s", string.join(filenames)) + log.info("removing: %s", ' '.join(filenames)) for filename in filenames: try: os.remove(filename) @@ -308,7 +308,7 @@ def check_func(self, func, headers=None, include_dirs=None, else: body.append(" %s;" % func) body.append("}") - body = string.join(body, "\n") + "\n" + body = "\n".join(body) + "\n" return self.try_link(body, headers, include_dirs, libraries, library_dirs) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 45d480ba5a..f5c09e4f44 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -60,6 +60,24 @@ def test_finalize_options(self): self.assertEquals(cmd.libraries, ['one']) self.assertEquals(cmd.library_dirs, ['three', 'four']) + def test_clean(self): + # _clean removes files + tmp_dir = self.mkdtemp() + f1 = os.path.join(tmp_dir, 'one') + f2 = os.path.join(tmp_dir, 'two') + + self.write_file(f1, 'xxx') + self.write_file(f2, 'xxx') + + for f in (f1, f2): + self.assert_(os.path.exists(f)) + + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._clean(f1, f2) + + for f in (f1, f2): + self.assert_(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) From 3032240dde2e76b4bfe1c11c05eeaa7252e1b14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Apr 2009 17:04:39 +0000 Subject: [PATCH 2232/8469] Merged revisions 71533 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71533 | tarek.ziade | 2009-04-12 19:02:08 +0200 (Sun, 12 Apr 2009) | 1 line removed string usage and added a test for _clean ........ --- tests/test_config_cmd.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 45d480ba5a..f5c09e4f44 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -60,6 +60,24 @@ def test_finalize_options(self): self.assertEquals(cmd.libraries, ['one']) self.assertEquals(cmd.library_dirs, ['three', 'four']) + def test_clean(self): + # _clean removes files + tmp_dir = self.mkdtemp() + f1 = os.path.join(tmp_dir, 'one') + f2 = os.path.join(tmp_dir, 'two') + + self.write_file(f1, 'xxx') + self.write_file(f2, 'xxx') + + for f in (f1, f2): + self.assert_(os.path.exists(f)) + + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._clean(f1, f2) + + for f in (f1, f2): + self.assert_(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) From db733eec63b1e1cb294a2c83699c9ee095a22d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 12:34:01 +0000 Subject: [PATCH 2233/8469] Fixed #5607: Distutils test_get_platform was failing fo Mac OS X fat binaries. --- tests/test_util.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 67474025d3..f27c452404 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -5,6 +5,7 @@ import os import sys import unittest +from copy import copy from distutils.errors import DistutilsPlatformError @@ -17,6 +18,7 @@ from distutils.util import rfc822_escape from distutils import util # used to patch _environ_checked +from distutils.sysconfig import get_config_vars, _config_vars class utilTestCase(unittest.TestCase): @@ -30,6 +32,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive + self._config_vars = copy(_config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -42,7 +45,7 @@ def setUp(self): os.uname = self._get_uname def tearDown(self): - # getting back tne environment + # getting back the environment os.name = self.name sys.platform = self.platform sys.version = self.version @@ -55,6 +58,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname + _config_vars = copy(self._config_vars) def _set_uname(self, uname): self._uname = uname @@ -96,8 +100,34 @@ def test_get_platform(self): 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' + '-fwrapv -O3 -Wall -Wstrict-prototypes') + self.assertEquals(get_platform(), 'macosx-10.3-i386') + # macbook with fat binaries (fat, universal or fat64) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-universal') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat64') + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From b37e2b50392d2a4d5bff20f774f5cd10cbf094fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 12:37:57 +0000 Subject: [PATCH 2234/8469] Merged revisions 71560 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71560 | tarek.ziade | 2009-04-13 14:34:01 +0200 (Mon, 13 Apr 2009) | 1 line Fixed #5607: Distutils test_get_platform was failing fo Mac OS X fat binaries. ........ --- tests/test_util.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 67474025d3..f27c452404 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -5,6 +5,7 @@ import os import sys import unittest +from copy import copy from distutils.errors import DistutilsPlatformError @@ -17,6 +18,7 @@ from distutils.util import rfc822_escape from distutils import util # used to patch _environ_checked +from distutils.sysconfig import get_config_vars, _config_vars class utilTestCase(unittest.TestCase): @@ -30,6 +32,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive + self._config_vars = copy(_config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -42,7 +45,7 @@ def setUp(self): os.uname = self._get_uname def tearDown(self): - # getting back tne environment + # getting back the environment os.name = self.name sys.platform = self.platform sys.version = self.version @@ -55,6 +58,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname + _config_vars = copy(self._config_vars) def _set_uname(self, uname): self._uname = uname @@ -96,8 +100,34 @@ def test_get_platform(self): 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' + '-fwrapv -O3 -Wall -Wstrict-prototypes') + self.assertEquals(get_platform(), 'macosx-10.3-i386') + # macbook with fat binaries (fat, universal or fat64) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-universal') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat64') + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From f6f67fef03ad922f8e974cf41e0ed88a8a0931a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 12:42:26 +0000 Subject: [PATCH 2235/8469] deactivate test_search_cpp under win32 --- tests/test_config_cmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index f5c09e4f44..1e6ebfacf5 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -1,6 +1,7 @@ """Tests for distutils.command.config.""" import unittest import os +import sys from distutils.command.config import dump_file, config from distutils.tests import support @@ -36,6 +37,8 @@ def test_dump_file(self): self.assertEquals(len(self._logs), numlines+1) def test_search_cpp(self): + if sys.platform == 'win32': + return pkg_dir, dist = self.create_dist() cmd = config(dist) From c5ab35d770e11483e3c05ade821a28dafaa5c5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 12:59:03 +0000 Subject: [PATCH 2236/8469] Merged revisions 71569 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71569 | tarek.ziade | 2009-04-13 14:42:26 +0200 (Mon, 13 Apr 2009) | 1 line deactivate test_search_cpp under win32 ........ --- tests/test_config_cmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index f5c09e4f44..1e6ebfacf5 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -1,6 +1,7 @@ """Tests for distutils.command.config.""" import unittest import os +import sys from distutils.command.config import dump_file, config from distutils.tests import support @@ -36,6 +37,8 @@ def test_dump_file(self): self.assertEquals(len(self._logs), numlines+1) def test_search_cpp(self): + if sys.platform == 'win32': + return pkg_dir, dist = self.create_dist() cmd = config(dist) From f27b9ed76fd3444675d28d9d9632503466882551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 20:03:44 +0000 Subject: [PATCH 2237/8469] improved test coverage for distutils.cmd --- cmd.py | 14 +++++++------- tests/test_cmd.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/cmd.py b/cmd.py index dfcbe23537..0e56460036 100644 --- a/cmd.py +++ b/cmd.py @@ -214,7 +214,7 @@ def debug_print (self, msg): # and they can be guaranteed that thereafter, self.foo will be # a list of strings. - def _ensure_stringlike (self, option, what, default=None): + def _ensure_stringlike(self, option, what, default=None): val = getattr(self, option) if val is None: setattr(self, option, default) @@ -224,13 +224,13 @@ def _ensure_stringlike (self, option, what, default=None): "'%s' must be a %s (got `%s`)" % (option, what, val) return val - def ensure_string (self, option, default=None): + def ensure_string(self, option, default=None): """Ensure that 'option' is a string; if not defined, set it to 'default'. """ self._ensure_stringlike(option, "string", default) - def ensure_string_list (self, option): + def ensure_string_list(self, option): """Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become @@ -258,20 +258,20 @@ def ensure_string_list (self, option): (option, val) - def _ensure_tested_string (self, option, tester, - what, error_fmt, default=None): + def _ensure_tested_string(self, option, tester, + what, error_fmt, default=None): val = self._ensure_stringlike(option, what, default) if val is not None and not tester(val): raise DistutilsOptionError, \ ("error in '%s' option: " + error_fmt) % (option, val) - def ensure_filename (self, option): + def ensure_filename(self, option): """Ensure that 'option' is the name of an existing file.""" self._ensure_tested_string(option, os.path.isfile, "filename", "'%s' does not exist or is not a file") - def ensure_dirname (self, option): + def ensure_dirname(self, option): self._ensure_tested_string(option, os.path.isdir, "directory name", "'%s' does not exist or is not a directory") diff --git a/tests/test_cmd.py b/tests/test_cmd.py index a252c355e7..8f2b36fb1f 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,5 +1,6 @@ """Tests for distutils.cmd.""" import unittest +import os from distutils.cmd import Command from distutils.dist import Distribution @@ -62,6 +63,45 @@ def _announce(msg, level): ' option2 = 1'] self.assertEquals(msgs, wanted) + def test_ensure_string(self): + cmd = self.cmd + cmd.option1 = 'ok' + cmd.ensure_string('option1') + + cmd.option2 = None + cmd.ensure_string('option2', 'xxx') + self.assert_(hasattr(cmd, 'option2')) + + cmd.option3 = 1 + self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') + + def test_ensure_string_list(self): + cmd = self.cmd + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + self.assertEquals(cmd.option1, ['ok', 'dok']) + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, + 'option3') + + def test_ensure_filename(self): + cmd = self.cmd + cmd.option1 = __file__ + cmd.ensure_filename('option1') + cmd.option2 = 'xxx' + self.assertRaises(DistutilsOptionError, cmd.ensure_filename, 'option2') + + def test_ensure_dirname(self): + cmd = self.cmd + cmd.option1 = os.path.dirname(__file__) + cmd.ensure_dirname('option1') + cmd.option2 = 'xxx' + self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_suite(): return unittest.makeSuite(CommandTestCase) From 21748d58c6bac04eb31504bf976b216ee5e8d3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 20:07:23 +0000 Subject: [PATCH 2238/8469] Merged revisions 71585 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71585 | tarek.ziade | 2009-04-13 22:03:44 +0200 (Mon, 13 Apr 2009) | 1 line improved test coverage for distutils.cmd ........ --- tests/test_cmd.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index a252c355e7..8f2b36fb1f 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,5 +1,6 @@ """Tests for distutils.cmd.""" import unittest +import os from distutils.cmd import Command from distutils.dist import Distribution @@ -62,6 +63,45 @@ def _announce(msg, level): ' option2 = 1'] self.assertEquals(msgs, wanted) + def test_ensure_string(self): + cmd = self.cmd + cmd.option1 = 'ok' + cmd.ensure_string('option1') + + cmd.option2 = None + cmd.ensure_string('option2', 'xxx') + self.assert_(hasattr(cmd, 'option2')) + + cmd.option3 = 1 + self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') + + def test_ensure_string_list(self): + cmd = self.cmd + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + self.assertEquals(cmd.option1, ['ok', 'dok']) + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, + 'option3') + + def test_ensure_filename(self): + cmd = self.cmd + cmd.option1 = __file__ + cmd.ensure_filename('option1') + cmd.option2 = 'xxx' + self.assertRaises(DistutilsOptionError, cmd.ensure_filename, 'option2') + + def test_ensure_dirname(self): + cmd = self.cmd + cmd.option1 = os.path.dirname(__file__) + cmd.ensure_dirname('option1') + cmd.option2 = 'xxx' + self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_suite(): return unittest.makeSuite(CommandTestCase) From 1b8d985f66013fe20bbfd4181afc29248d19f35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 20:14:54 +0000 Subject: [PATCH 2239/8469] pep8-fied --- cmd.py | 65 +++++++++++++++++++++------------------------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/cmd.py b/cmd.py index 0e56460036..869258babb 100644 --- a/cmd.py +++ b/cmd.py @@ -46,7 +46,7 @@ class Command: # -- Creation/initialization methods ------------------------------- - def __init__ (self, dist): + def __init__(self, dist): """Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being @@ -93,12 +93,8 @@ def __init__ (self, dist): # always calls 'finalize_options()', to respect/update it. self.finalized = 0 - # __init__ () - - # XXX A more explicit way to customize dry_run would be better. - - def __getattr__ (self, attr): + def __getattr__(self, attr): if attr == 'dry_run': myval = getattr(self, "_" + attr) if myval is None: @@ -108,13 +104,11 @@ def __getattr__ (self, attr): else: raise AttributeError, attr - - def ensure_finalized (self): + def ensure_finalized(self): if not self.finalized: self.finalize_options() self.finalized = 1 - # Subclasses must define: # initialize_options() # provide default values for all options; may be customized by @@ -128,7 +122,7 @@ def ensure_finalized (self): # run the command: do whatever it is we're here to do, # controlled by the command's various option values - def initialize_options (self): + def initialize_options(self): """Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the @@ -141,7 +135,7 @@ def initialize_options (self): raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ - def finalize_options (self): + def finalize_options(self): """Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been @@ -170,7 +164,7 @@ def dump_options(self, header=None, indent=""): self.announce(indent + "%s = %s" % (option, value), level=log.INFO) - def run (self): + def run(self): """A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup @@ -180,17 +174,16 @@ def run (self): This method must be implemented by all command classes. """ - raise RuntimeError, \ "abstract method -- subclass %s must override" % self.__class__ - def announce (self, msg, level=1): + def announce(self, msg, level=1): """If the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout. """ log.log(level, msg) - def debug_print (self, msg): + def debug_print(self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ @@ -200,7 +193,6 @@ def debug_print (self, msg): sys.stdout.flush() - # -- Option validation methods ------------------------------------- # (these are very handy in writing the 'finalize_options()' method) # @@ -279,14 +271,13 @@ def ensure_dirname(self, option): # -- Convenience methods for commands ------------------------------ - def get_command_name (self): + def get_command_name(self): if hasattr(self, 'command_name'): return self.command_name else: return self.__class__.__name__ - - def set_undefined_options (self, src_cmd, *option_pairs): + def set_undefined_options(self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option @@ -311,7 +302,7 @@ def set_undefined_options (self, src_cmd, *option_pairs): getattr(src_cmd_obj, src_option)) - def get_finalized_command (self, command, create=1): + def get_finalized_command(self, command, create=1): """Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command', call its 'ensure_finalized()' method, and return the @@ -323,19 +314,18 @@ def get_finalized_command (self, command, create=1): # XXX rename to 'get_reinitialized_command()'? (should do the # same in dist.py, if so) - def reinitialize_command (self, command, reinit_subcommands=0): + def reinitialize_command(self, command, reinit_subcommands=0): return self.distribution.reinitialize_command( command, reinit_subcommands) - def run_command (self, command): + def run_command(self, command): """Run some other command: uses the 'run_command()' method of Distribution, which creates and finalizes the command object if necessary and then invokes its 'run()' method. """ self.distribution.run_command(command) - - def get_sub_commands (self): + def get_sub_commands(self): """Determine the sub-commands that are relevant in the current distribution (ie., that need to be run). This is based on the 'sub_commands' class attribute: each tuple in that list may include @@ -351,19 +341,17 @@ def get_sub_commands (self): # -- External world manipulation ----------------------------------- - def warn (self, msg): + def warn(self, msg): log.warn("warning: %s: %s\n" % (self.get_command_name(), msg)) - def execute (self, func, args, msg=None, level=1): + def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) - - def mkpath (self, name, mode=0777): + def mkpath(self, name, mode=0777): dir_util.mkpath(name, mode, dry_run=self.dry_run) - - def copy_file (self, infile, outfile, + def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): """Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and @@ -376,8 +364,7 @@ def copy_file (self, infile, outfile, link, dry_run=self.dry_run) - - def copy_tree (self, infile, outfile, + def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, @@ -403,7 +390,6 @@ def make_archive (self, base_name, format, return archive_util.make_archive( base_name, format, root_dir, base_dir, dry_run=self.dry_run) - def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or @@ -438,17 +424,12 @@ def make_file(self, infiles, outfile, func, args, else: log.debug(skip_msg) - # make_file () - -# class Command - - # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around # for the time being. -class install_misc (Command): +class install_misc(Command): """Common base class for installing some files in a subdirectory. Currently used by install_data and install_scripts. """ @@ -459,10 +440,10 @@ def initialize_options (self): self.install_dir = None self.outfiles = [] - def _install_dir_from (self, dirname): + def _install_dir_from(self, dirname): self.set_undefined_options('install', (dirname, 'install_dir')) - def _copy_files (self, filelist): + def _copy_files(self, filelist): self.outfiles = [] if not filelist: return @@ -471,5 +452,5 @@ def _copy_files (self, filelist): self.copy_file(f, self.install_dir) self.outfiles.append(os.path.join(self.install_dir, f)) - def get_outputs (self): + def get_outputs(self): return self.outfiles From 5ff3e0818920cd90da7e957d901ed9d42a9a21e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 13 Apr 2009 20:19:58 +0000 Subject: [PATCH 2240/8469] Merged revisions 71589 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71589 | tarek.ziade | 2009-04-13 22:14:54 +0200 (Mon, 13 Apr 2009) | 1 line pep8-fied ........ --- cmd.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/cmd.py b/cmd.py index 5829a56639..aff7d68e3c 100644 --- a/cmd.py +++ b/cmd.py @@ -93,9 +93,8 @@ def __init__(self, dist): # always calls 'finalize_options()', to respect/update it. self.finalized = 0 - # XXX A more explicit way to customize dry_run would be better. - def __getattr__ (self, attr): + def __getattr__(self, attr): if attr == 'dry_run': myval = getattr(self, "_" + attr) if myval is None: @@ -105,7 +104,7 @@ def __getattr__ (self, attr): else: raise AttributeError(attr) - def ensure_finalized (self): + def ensure_finalized(self): if not self.finalized: self.finalize_options() self.finalized = 1 @@ -175,7 +174,6 @@ def run(self): This method must be implemented by all command classes. """ - raise RuntimeError("abstract method -- subclass %s must override" % self.__class__) @@ -351,7 +349,7 @@ def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_times, not self.force, link, dry_run=self.dry_run) - def copy_tree (self, infile, outfile, preserve_mode=1, preserve_times=1, + def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1): """Copy an entire directory tree respecting verbose, dry-run, and force flags. @@ -373,7 +371,6 @@ def make_archive(self, base_name, format, root_dir=None, base_dir=None): return archive_util.make_archive(base_name, format, root_dir, base_dir, dry_run=self.dry_run) - def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): """Special case of 'execute()' for operations that process one or @@ -406,7 +403,6 @@ def make_file(self, infiles, outfile, func, args, else: log.debug(skip_msg) - # XXX 'install_misc' class not currently used -- it was the base class for # both 'install_scripts' and 'install_data', but they outgrew it. It might # still be useful for 'install_headers', though, so I'm keeping it around @@ -423,10 +419,10 @@ def initialize_options (self): self.install_dir = None self.outfiles = [] - def _install_dir_from (self, dirname): + def _install_dir_from(self, dirname): self.set_undefined_options('install', (dirname, 'install_dir')) - def _copy_files (self, filelist): + def _copy_files(self, filelist): self.outfiles = [] if not filelist: return @@ -435,5 +431,5 @@ def _copy_files (self, filelist): self.copy_file(f, self.install_dir) self.outfiles.append(os.path.join(self.install_dir, f)) - def get_outputs (self): + def get_outputs(self): return self.outfiles From 9c62b7799426d02dc52636b95a34f12988a19305 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 14 Apr 2009 13:16:19 +0000 Subject: [PATCH 2241/8469] Bumping to 2.6.2 (final). --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e8f55cf087..ba926063e1 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.2c1" +__version__ = "2.6.2" #--end constants-- From 452e5137d5612d5e68d72c5748b14a2fed3dbc61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 17 Apr 2009 14:29:56 +0000 Subject: [PATCH 2242/8469] DistutilsSetupError was not raised when one single warning occured --- command/check.py | 2 +- tests/test_check.py | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/command/check.py b/command/check.py index d164f3f527..7d56dfcf40 100644 --- a/command/check.py +++ b/command/check.py @@ -72,7 +72,7 @@ def run(self): # let's raise an error in strict mode, if we have at least # one warning - if self.strict and self._warnings > 1: + if self.strict and self._warnings > 0: raise DistutilsSetupError('Please correct your package.') def check_metadata(self): diff --git a/tests/test_check.py b/tests/test_check.py index 5e0c453140..372bae367b 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -72,17 +72,16 @@ def test_check_restructuredtext(self): self.assertEquals(cmd._warnings, 1) # let's see if we have an error with strict=1 - cmd = check(dist) - cmd.initialize_options() - cmd.strict = 1 - cmd.ensure_finalized() - self.assertRaises(DistutilsSetupError, cmd.run) + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': broken_rest} + self.assertRaises(DistutilsSetupError, self._run, metadata, + **{'strict': 1, 'restructuredtext': 1}) # and non-broken rest - rest = 'title\n=====\n\ntest' - pkg_info, dist = self.create_dist(long_description=rest) - cmd = check(dist) - cmd.check_restructuredtext() + metadata['long_description'] = 'title\n=====\n\ntest' + cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEquals(cmd._warnings, 0) def test_check_all(self): From a97cd0dee2cd722b7036319ce0aab8d03951f3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 17 Apr 2009 14:34:49 +0000 Subject: [PATCH 2243/8469] Merged revisions 71674 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71674 | tarek.ziade | 2009-04-17 16:29:56 +0200 (Fri, 17 Apr 2009) | 1 line DistutilsSetupError was not raised when one single warning occured ........ --- command/check.py | 2 +- tests/test_check.py | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/command/check.py b/command/check.py index 5dd73b07af..9a8fca1d5f 100644 --- a/command/check.py +++ b/command/check.py @@ -73,7 +73,7 @@ def run(self): # let's raise an error in strict mode, if we have at least # one warning - if self.strict and self._warnings > 1: + if self.strict and self._warnings > 0: raise DistutilsSetupError('Please correct your package.') def check_metadata(self): diff --git a/tests/test_check.py b/tests/test_check.py index 5e0c453140..372bae367b 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -72,17 +72,16 @@ def test_check_restructuredtext(self): self.assertEquals(cmd._warnings, 1) # let's see if we have an error with strict=1 - cmd = check(dist) - cmd.initialize_options() - cmd.strict = 1 - cmd.ensure_finalized() - self.assertRaises(DistutilsSetupError, cmd.run) + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': broken_rest} + self.assertRaises(DistutilsSetupError, self._run, metadata, + **{'strict': 1, 'restructuredtext': 1}) # and non-broken rest - rest = 'title\n=====\n\ntest' - pkg_info, dist = self.create_dist(long_description=rest) - cmd = check(dist) - cmd.check_restructuredtext() + metadata['long_description'] = 'title\n=====\n\ntest' + cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEquals(cmd._warnings, 0) def test_check_all(self): From 9e39129c58b8b48972a4b776ba7b10ed80107a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 20 Apr 2009 07:53:55 +0000 Subject: [PATCH 2244/8469] #5795 sysconfig._config_vars was shadowed in tearDown --- tests/test_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index f27c452404..29be0cfd2d 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -18,7 +18,8 @@ from distutils.util import rfc822_escape from distutils import util # used to patch _environ_checked -from distutils.sysconfig import get_config_vars, _config_vars +from distutils.sysconfig import get_config_vars +from distutils import sysconfig class utilTestCase(unittest.TestCase): @@ -32,7 +33,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive - self._config_vars = copy(_config_vars) + self._config_vars = copy(sysconfig._config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -58,7 +59,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname - _config_vars = copy(self._config_vars) + sysconfig._config_vars = copy(self._config_vars) def _set_uname(self, uname): self._uname = uname From e5374224727a94148777aeea1ff7d35d540e7e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 20 Apr 2009 10:33:47 +0000 Subject: [PATCH 2245/8469] making BuildWinInstTestCase silent in case bdist_wininst is not run under win32 --- tests/test_bdist_wininst.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index d851d6c799..f2cb4fdeba 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -5,6 +5,7 @@ from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_get_exe_bytes(self): From 39d9889757fcefa8fda44500a0ee02a72f9d5cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 20 Apr 2009 12:18:08 +0000 Subject: [PATCH 2246/8469] Merged revisions 71758 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71758 | tarek.ziade | 2009-04-20 09:53:55 +0200 (Mon, 20 Apr 2009) | 1 line #5795 sysconfig._config_vars was shadowed in tearDown ........ --- tests/test_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index f27c452404..29be0cfd2d 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -18,7 +18,8 @@ from distutils.util import rfc822_escape from distutils import util # used to patch _environ_checked -from distutils.sysconfig import get_config_vars, _config_vars +from distutils.sysconfig import get_config_vars +from distutils import sysconfig class utilTestCase(unittest.TestCase): @@ -32,7 +33,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive - self._config_vars = copy(_config_vars) + self._config_vars = copy(sysconfig._config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -58,7 +59,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname - _config_vars = copy(self._config_vars) + sysconfig._config_vars = copy(self._config_vars) def _set_uname(self, uname): self._uname = uname From a7d4678492b113544483d4e93a6e6cdca002f56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 20 Apr 2009 12:37:58 +0000 Subject: [PATCH 2247/8469] Merged revisions 71759 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71759 | tarek.ziade | 2009-04-20 12:33:47 +0200 (Mon, 20 Apr 2009) | 1 line making BuildWinInstTestCase silent in case bdist_wininst is not run under win32 ........ --- tests/test_bdist_wininst.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index d851d6c799..f2cb4fdeba 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -5,6 +5,7 @@ from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_get_exe_bytes(self): From 5717e2c0f80872e578d6292da94e0540063bc312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 20 Apr 2009 12:48:47 +0000 Subject: [PATCH 2248/8469] Merged revisions 71759 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71759 | tarek.ziade | 2009-04-20 12:33:47 +0200 (Mon, 20 Apr 2009) | 1 line making BuildWinInstTestCase silent in case bdist_wininst is not run under win32 ........ --- tests/test_bdist_wininst.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index de6601fbb7..85aa02a286 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -7,6 +7,7 @@ from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_get_exe_bytes(self): From 23ac9a3f5d25ac86966a339921a3fd032b1eb02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 25 Apr 2009 12:38:08 +0000 Subject: [PATCH 2249/8469] Issue #4951: Fixed failure in test_httpservers --- tests/test_util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 29be0cfd2d..348933e901 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -29,7 +29,7 @@ def setUp(self): self.platform = sys.platform self.version = sys.version self.sep = os.sep - self.environ = os.environ + self.environ = dict(os.environ) self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive @@ -51,7 +51,10 @@ def tearDown(self): sys.platform = self.platform sys.version = self.version os.sep = self.sep - os.environ = self.environ + for k, v in self.environ.items(): + os.environ[k] = v + for k in set(os.environ) - set(self.environ): + del os.environ[k] os.path.join = self.join os.path.isabs = self.isabs os.path.splitdrive = self.splitdrive From 53d92cb18d49ee06a6c23a299d97c06c2442566d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 25 Apr 2009 12:39:56 +0000 Subject: [PATCH 2250/8469] Merged revisions 71878 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71878 | tarek.ziade | 2009-04-25 14:38:08 +0200 (Sat, 25 Apr 2009) | 1 line Issue #4951: Fixed failure in test_httpservers ........ --- tests/test_util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 29be0cfd2d..348933e901 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -29,7 +29,7 @@ def setUp(self): self.platform = sys.platform self.version = sys.version self.sep = os.sep - self.environ = os.environ + self.environ = dict(os.environ) self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive @@ -51,7 +51,10 @@ def tearDown(self): sys.platform = self.platform sys.version = self.version os.sep = self.sep - os.environ = self.environ + for k, v in self.environ.items(): + os.environ[k] = v + for k in set(os.environ) - set(self.environ): + del os.environ[k] os.path.join = self.join os.path.isabs = self.isabs os.path.splitdrive = self.splitdrive From 5b4daec209610504336618f33489cec401a6850f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 25 Apr 2009 12:51:59 +0000 Subject: [PATCH 2251/8469] #5810: Fixed Distutils test_build_scripts --- tests/test_build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 2acfab828e..b55eb5857b 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -90,7 +90,7 @@ def test_version_int(self): # On linux-g++-32 with command line `./configure --enable-ipv6 # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable - old = sysconfig._config_vars.get('VERSION') + old = sysconfig.get_config_vars().get('VERSION') sysconfig._config_vars['VERSION'] = 4 try: cmd.run() From e557c16ec08bb6927410f65cf813ad20293859d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 25 Apr 2009 12:53:56 +0000 Subject: [PATCH 2252/8469] Merged revisions 71884 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71884 | tarek.ziade | 2009-04-25 14:51:59 +0200 (Sat, 25 Apr 2009) | 1 line #5810: Fixed Distutils test_build_scripts ........ --- tests/test_build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 2acfab828e..b55eb5857b 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -90,7 +90,7 @@ def test_version_int(self): # On linux-g++-32 with command line `./configure --enable-ipv6 # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable - old = sysconfig._config_vars.get('VERSION') + old = sysconfig.get_config_vars().get('VERSION') sysconfig._config_vars['VERSION'] = 4 try: cmd.run() From 3967ecc4455a2662822d000fc243a5bc56ca105a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 25 Apr 2009 12:55:56 +0000 Subject: [PATCH 2253/8469] Merged revisions 71884 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71884 | tarek.ziade | 2009-04-25 14:51:59 +0200 (Sat, 25 Apr 2009) | 1 line #5810: Fixed Distutils test_build_scripts ........ --- tests/test_build_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 2acfab828e..b55eb5857b 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -90,7 +90,7 @@ def test_version_int(self): # On linux-g++-32 with command line `./configure --enable-ipv6 # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable - old = sysconfig._config_vars.get('VERSION') + old = sysconfig.get_config_vars().get('VERSION') sysconfig._config_vars['VERSION'] = 4 try: cmd.run() From 9bb7e34ba2331d21bbad5abe79c3ebac63946e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 29 Apr 2009 08:03:46 +0000 Subject: [PATCH 2254/8469] Fixed #5874 : distutils.tests.test_config_cmd is not locale-sensitive anymore --- tests/test_config_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 1e6ebfacf5..bacf13a291 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -46,7 +46,7 @@ def test_search_cpp(self): match = cmd.search_cpp(pattern='xxx', body='// xxx') self.assertEquals(match, 0) - match = cmd.search_cpp(pattern='command', body='// xxx') + match = cmd.search_cpp(pattern='_configtest', body='// xxx') self.assertEquals(match, 1) def test_finalize_options(self): From 85120c6b47d6f8ccd1eb1e64a4308f08f1b4e517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 29 Apr 2009 08:07:44 +0000 Subject: [PATCH 2255/8469] Merged revisions 72094 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72094 | tarek.ziade | 2009-04-29 10:03:46 +0200 (Wed, 29 Apr 2009) | 1 line Fixed #5874 : distutils.tests.test_config_cmd is not locale-sensitive anymore ........ --- tests/test_config_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 1e6ebfacf5..bacf13a291 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -46,7 +46,7 @@ def test_search_cpp(self): match = cmd.search_cpp(pattern='xxx', body='// xxx') self.assertEquals(match, 0) - match = cmd.search_cpp(pattern='command', body='// xxx') + match = cmd.search_cpp(pattern='_configtest', body='// xxx') self.assertEquals(match, 1) def test_finalize_options(self): From 534e308892506dae6bf5aedd724dcbe975ed1149 Mon Sep 17 00:00:00 2001 From: Steven Bethard Date: Tue, 5 May 2009 01:31:22 +0000 Subject: [PATCH 2256/8469] Update bdist_msi so that the generated MSIs for pure Python modules can install to any version of Python, like the generated EXEs from bdist_wininst. (Previously, you had to create a new MSI for each version of Python.) --- command/bdist_msi.py | 237 +++++++++++++++++++++++++++++-------------- 1 file changed, 162 insertions(+), 75 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f94d9579d2..18bddeb483 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -117,6 +117,12 @@ class bdist_msi (Command): boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', 'skip-build'] + all_versions = ['2.0', '2.1', '2.2', '2.3', '2.4', + '2.5', '2.6', '2.7', '2.8', '2.9', + '3.0', '3.1', '3.2', '3.3', '3.4', + '3.5', '3.6', '3.7', '3.8', '3.9'] + other_version = 'X' + def initialize_options (self): self.bdist_dir = None self.plat_name = None @@ -128,6 +134,7 @@ def initialize_options (self): self.skip_build = 0 self.install_script = None self.pre_install_script = None + self.versions = None def finalize_options (self): if self.bdist_dir is None: @@ -135,13 +142,14 @@ def finalize_options (self): self.bdist_dir = os.path.join(bdist_base, 'msi') short_version = get_python_version() if self.target_version: + self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError, \ "target version can only be %s, or the '--skip_build'" \ " option must be specified" % (short_version,) else: - self.target_version = short_version + self.versions = list(self.all_versions) self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), @@ -223,8 +231,11 @@ def run (self): # Prefix ProductName with Python x.y, so that # it sorts together with the other Python packages # in Add-Remove-Programs (APR) - product_name = "Python %s %s" % (self.target_version, - self.distribution.get_fullname()) + fullname = self.distribution.get_fullname() + if self.target_version: + product_name = "Python %s %s" % (self.target_version, fullname) + else: + product_name = "Python %s" % (fullname) self.db = msilib.init_database(installer_name, schema, product_name, msilib.gen_uuid(), sversion, author) @@ -245,7 +256,8 @@ def run (self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - self.distribution.dist_files.append(('bdist_msi', self.target_version, fullname)) + tup = 'bdist_msi', self.target_version or 'any', fullname + self.distribution.dist_files.append(tup) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) @@ -253,65 +265,121 @@ def run (self): def add_files(self): db = self.db cab = msilib.CAB("distfiles") - f = Feature(db, "default", "Default Feature", "Everything", 1, directory="TARGETDIR") - f.set_current() rootdir = os.path.abspath(self.bdist_dir) + root = Directory(db, cab, None, rootdir, "TARGETDIR", "SourceDir") + f = Feature(db, "Python", "Python", "Everything", + 0, 1, directory="TARGETDIR") + + items = [(f, root, '')] + for version in self.versions + [self.other_version]: + target = "TARGETDIR" + version + name = default = "Python" + version + desc = "Everything" + if version is self.other_version: + title = "Python from another location" + level = 2 + else: + title = "Python %s from registry" % version + level = 1 + f = Feature(db, name, title, desc, 1, level, directory=target) + dir = Directory(db, cab, root, rootdir, target, default) + items.append((f, dir, version)) db.Commit() - todo = [root] - while todo: - dir = todo.pop() - for file in os.listdir(dir.absolute): - afile = os.path.join(dir.absolute, file) - if os.path.isdir(afile): - newdir = Directory(db, cab, dir, file, file, "%s|%s" % (dir.make_short(file), file)) - todo.append(newdir) - else: - key = dir.add_file(file) - if file==self.install_script: - if self.install_script_key: - raise DistutilsOptionError, "Multiple files with name %s" % file - self.install_script_key = '[#%s]' % key + + seen = {} + for feature, dir, version in items: + todo = [dir] + while todo: + dir = todo.pop() + for file in os.listdir(dir.absolute): + afile = os.path.join(dir.absolute, file) + if os.path.isdir(afile): + short = "%s|%s" % (dir.make_short(file), file) + default = file + version + newdir = Directory(db, cab, dir, file, default, short) + todo.append(newdir) + else: + if not dir.component: + dir.start_component(dir.logical, feature, 0) + if afile not in seen: + key = seen[afile] = dir.add_file(file) + if file==self.install_script: + if self.install_script_key: + raise DistutilsOptionError( + "Multiple files with name %s" % file) + self.install_script_key = '[#%s]' % key + else: + key = seen[afile] + add_data(self.db, "DuplicateFile", + [(key + version, dir.component, key, None, dir.logical)]) + cab.commit(db) def add_find_python(self): """Adds code to the installer to compute the location of Python. - Properties PYTHON.MACHINE, PYTHON.USER, PYTHONDIR and PYTHON will be set - in both the execute and UI sequences; PYTHONDIR will be set from - PYTHON.USER if defined, else from PYTHON.MACHINE. - PYTHON is PYTHONDIR\python.exe""" - install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version - add_data(self.db, "RegLocator", - [("python.machine", 2, install_path, None, 2), - ("python.user", 1, install_path, None, 2)]) - add_data(self.db, "AppSearch", - [("PYTHON.MACHINE", "python.machine"), - ("PYTHON.USER", "python.user")]) - add_data(self.db, "CustomAction", - [("PythonFromMachine", 51+256, "PYTHONDIR", "[PYTHON.MACHINE]"), - ("PythonFromUser", 51+256, "PYTHONDIR", "[PYTHON.USER]"), - ("PythonExe", 51+256, "PYTHON", "[PYTHONDIR]\\python.exe"), - ("InitialTargetDir", 51+256, "TARGETDIR", "[PYTHONDIR]")]) - add_data(self.db, "InstallExecuteSequence", - [("PythonFromMachine", "PYTHON.MACHINE", 401), - ("PythonFromUser", "PYTHON.USER", 402), - ("PythonExe", None, 403), - ("InitialTargetDir", 'TARGETDIR=""', 404), - ]) - add_data(self.db, "InstallUISequence", - [("PythonFromMachine", "PYTHON.MACHINE", 401), - ("PythonFromUser", "PYTHON.USER", 402), - ("PythonExe", None, 403), - ("InitialTargetDir", 'TARGETDIR=""', 404), - ]) - def add_scripts(self): - if self.install_script: + Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the + registry for each version of Python. + + Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined, + else from PYTHON.MACHINE.X.Y. + + Properties PYTHONX.Y will be set to TARGETDIRX.Y\\python.exe""" + + start = 402 + for ver in self.versions: + install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % ver + machine_reg = "python.machine." + ver + user_reg = "python.user." + ver + machine_prop = "PYTHON.MACHINE." + ver + user_prop = "PYTHON.USER." + ver + machine_action = "PythonFromMachine" + ver + user_action = "PythonFromUser" + ver + exe_action = "PythonExe" + ver + target_dir_prop = "TARGETDIR" + ver + exe_prop = "PYTHON" + ver + add_data(self.db, "RegLocator", + [(machine_reg, 2, install_path, None, 2), + (user_reg, 1, install_path, None, 2)]) + add_data(self.db, "AppSearch", + [(machine_prop, machine_reg), + (user_prop, user_reg)]) add_data(self.db, "CustomAction", - [("install_script", 50, "PYTHON", self.install_script_key)]) + [(machine_action, 51+256, target_dir_prop, "[" + machine_prop + "]"), + (user_action, 51+256, target_dir_prop, "[" + user_prop + "]"), + (exe_action, 51+256, exe_prop, "[" + target_dir_prop + "]\\python.exe"), + ]) add_data(self.db, "InstallExecuteSequence", - [("install_script", "NOT Installed", 6800)]) + [(machine_action, machine_prop, start), + (user_action, user_prop, start + 1), + (exe_action, None, start + 2), + ]) + add_data(self.db, "InstallUISequence", + [(machine_action, machine_prop, start), + (user_action, user_prop, start + 1), + (exe_action, None, start + 2), + ]) + add_data(self.db, "Condition", + [("Python" + ver, 0, "NOT TARGETDIR" + ver)]) + start += 4 + assert start < 500 + + def add_scripts(self): + if self.install_script: + start = 6800 + for ver in self.versions + [self.other_version]: + install_action = "install_script." + ver + exe_prop = "PYTHON" + ver + add_data(self.db, "CustomAction", + [(install_action, 50, exe_prop, self.install_script_key)]) + add_data(self.db, "InstallExecuteSequence", + [(install_action, "&Python%s=3" % ver, start)]) + start += 1 + # XXX pre-install scripts are currently refused in finalize_options() + # but if this feature is completed, it will also need to add + # entries for each version as the above code does if self.pre_install_script: scriptfn = os.path.join(self.bdist_dir, "preinstall.bat") f = open(scriptfn, "w") @@ -375,7 +443,7 @@ def add_ui(self): [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140), ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141), # In the user interface, assume all-users installation if privileged. - ("SelectDirectoryDlg", "Not Installed", 1230), + ("SelectFeaturesDlg", "Not Installed", 1230), # XXX no support for resume installations yet #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240), ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250), @@ -498,33 +566,49 @@ def add_ui(self): c.event("SpawnDialog", "CancelDlg") ##################################################################### - # Target directory selection - seldlg = PyDialog(db, "SelectDirectoryDlg", x, y, w, h, modal, title, + # Feature (Python directory) selection + seldlg = PyDialog(db, "SelectFeaturesDlg", x, y, w, h, modal, title, "Next", "Next", "Cancel") - seldlg.title("Select Destination Directory") + seldlg.title("Select Python Installations") - version = sys.version[:3]+" " - seldlg.text("Hint", 15, 30, 300, 40, 3, - "The destination directory should contain a Python %sinstallation" % version) + seldlg.text("Hint", 15, 30, 300, 20, 3, + "Select the Python locations where %s should be installed." + % self.distribution.get_fullname()) seldlg.back("< Back", None, active=0) c = seldlg.next("Next >", "Cancel") - c.event("SetTargetPath", "TARGETDIR", ordering=1) - c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=2) - c.event("EndDialog", "Return", ordering=3) - - c = seldlg.cancel("Cancel", "DirectoryCombo") + order = 1 + c.event("[TARGETDIR]", "[SourceDir]", ordering=order) + for version in self.versions + [self.other_version]: + order += 1 + c.event("[TARGETDIR]", "[TARGETDIR%s]" % version, + "FEATURE_SELECTED AND &Python%s=3" % version, + ordering=order) + c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=order + 1) + c.event("EndDialog", "Return", ordering=order + 2) + c = seldlg.cancel("Cancel", "Features") c.event("SpawnDialog", "CancelDlg") - seldlg.control("DirectoryCombo", "DirectoryCombo", 15, 70, 272, 80, 393219, - "TARGETDIR", None, "DirectoryList", None) - seldlg.control("DirectoryList", "DirectoryList", 15, 90, 308, 136, 3, "TARGETDIR", - None, "PathEdit", None) - seldlg.control("PathEdit", "PathEdit", 15, 230, 306, 16, 3, "TARGETDIR", None, "Next", None) - c = seldlg.pushbutton("Up", 306, 70, 18, 18, 3, "Up", None) - c.event("DirectoryListUp", "0") - c = seldlg.pushbutton("NewDir", 324, 70, 30, 18, 3, "New", None) - c.event("DirectoryListNew", "0") + c = seldlg.control("Features", "SelectionTree", 15, 60, 300, 120, 3, + "FEATURE", None, "PathEdit", None) + c.event("[FEATURE_SELECTED]", "1") + ver = self.other_version + install_other_cond = "FEATURE_SELECTED AND &Python%s=3" % ver + dont_install_other_cond = "FEATURE_SELECTED AND &Python%s<>3" % ver + + c = seldlg.text("Other", 15, 200, 300, 15, 3, + "Provide an alternate Python location") + c.condition("Enable", install_other_cond) + c.condition("Show", install_other_cond) + c.condition("Disable", dont_install_other_cond) + c.condition("Hide", dont_install_other_cond) + + c = seldlg.control("PathEdit", "PathEdit", 15, 215, 300, 16, 1, + "TARGETDIR" + ver, None, "Next", None) + c.condition("Enable", install_other_cond) + c.condition("Show", install_other_cond) + c.condition("Disable", dont_install_other_cond) + c.condition("Hide", dont_install_other_cond) ##################################################################### # Disk cost @@ -640,7 +724,10 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses - base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, - self.target_version) + if self.target_version: + base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, + self.target_version) + else: + base_name = "%s.%s.msi" % (fullname, self.plat_name) installer_name = os.path.join(self.dist_dir, base_name) return installer_name From f70dabd395a2452cafc0e2a526070ed71b8ea7bd Mon Sep 17 00:00:00 2001 From: Steven Bethard Date: Tue, 5 May 2009 02:22:38 +0000 Subject: [PATCH 2257/8469] Merged revisions 72306 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72306 | steven.bethard | 2009-05-04 18:31:22 -0700 (Mon, 04 May 2009) | 1 line Update bdist_msi so that the generated MSIs for pure Python modules can install to any version of Python, like the generated EXEs from bdist_wininst. (Previously, you had to create a new MSI for each version of Python.) ........ --- command/bdist_msi.py | 240 +++++++++++++++++++++++++++++-------------- 1 file changed, 163 insertions(+), 77 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index aab89cd609..ffd668eb0e 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2005, 2006 Martin v. Löwis +# Copyright (C) 2005, 2006 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst @@ -117,6 +117,12 @@ class bdist_msi(Command): boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', 'skip-build'] + all_versions = ['2.0', '2.1', '2.2', '2.3', '2.4', + '2.5', '2.6', '2.7', '2.8', '2.9', + '3.0', '3.1', '3.2', '3.3', '3.4', + '3.5', '3.6', '3.7', '3.8', '3.9'] + other_version = 'X' + def initialize_options(self): self.bdist_dir = None self.plat_name = None @@ -128,6 +134,7 @@ def initialize_options(self): self.skip_build = 0 self.install_script = None self.pre_install_script = None + self.versions = None def finalize_options(self): if self.bdist_dir is None: @@ -135,13 +142,14 @@ def finalize_options(self): self.bdist_dir = os.path.join(bdist_base, 'msi') short_version = get_python_version() if self.target_version: + self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError( "target version can only be %s, or the '--skip_build'" " option must be specified" % (short_version,)) else: - self.target_version = short_version + self.versions = list(self.all_versions) self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), @@ -222,8 +230,11 @@ def run(self): # Prefix ProductName with Python x.y, so that # it sorts together with the other Python packages # in Add-Remove-Programs (APR) - product_name = "Python %s %s" % (self.target_version, - self.distribution.get_fullname()) + fullname = self.distribution.get_fullname() + if self.target_version: + product_name = "Python %s %s" % (self.target_version, fullname) + else: + product_name = "Python %s" % (fullname) self.db = msilib.init_database(installer_name, schema, product_name, msilib.gen_uuid(), sversion, author) @@ -244,7 +255,8 @@ def run(self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - self.distribution.dist_files.append(('bdist_msi', self.target_version, fullname)) + tup = 'bdist_msi', self.target_version or 'any', fullname + self.distribution.dist_files.append(tup) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) @@ -252,66 +264,121 @@ def run(self): def add_files(self): db = self.db cab = msilib.CAB("distfiles") - f = Feature(db, "default", "Default Feature", "Everything", 1, directory="TARGETDIR") - f.set_current() rootdir = os.path.abspath(self.bdist_dir) + root = Directory(db, cab, None, rootdir, "TARGETDIR", "SourceDir") + f = Feature(db, "Python", "Python", "Everything", + 0, 1, directory="TARGETDIR") + + items = [(f, root, '')] + for version in self.versions + [self.other_version]: + target = "TARGETDIR" + version + name = default = "Python" + version + desc = "Everything" + if version is self.other_version: + title = "Python from another location" + level = 2 + else: + title = "Python %s from registry" % version + level = 1 + f = Feature(db, name, title, desc, 1, level, directory=target) + dir = Directory(db, cab, root, rootdir, target, default) + items.append((f, dir, version)) db.Commit() - todo = [root] - while todo: - dir = todo.pop() - for file in os.listdir(dir.absolute): - afile = os.path.join(dir.absolute, file) - if os.path.isdir(afile): - newdir = Directory(db, cab, dir, file, file, "%s|%s" % (dir.make_short(file), file)) - todo.append(newdir) - else: - key = dir.add_file(file) - if file==self.install_script: - if self.install_script_key: - raise DistutilsOptionError( - "Multiple files with name %s" % file) - self.install_script_key = '[#%s]' % key + + seen = {} + for feature, dir, version in items: + todo = [dir] + while todo: + dir = todo.pop() + for file in os.listdir(dir.absolute): + afile = os.path.join(dir.absolute, file) + if os.path.isdir(afile): + short = "%s|%s" % (dir.make_short(file), file) + default = file + version + newdir = Directory(db, cab, dir, file, default, short) + todo.append(newdir) + else: + if not dir.component: + dir.start_component(dir.logical, feature, 0) + if afile not in seen: + key = seen[afile] = dir.add_file(file) + if file==self.install_script: + if self.install_script_key: + raise DistutilsOptionError( + "Multiple files with name %s" % file) + self.install_script_key = '[#%s]' % key + else: + key = seen[afile] + add_data(self.db, "DuplicateFile", + [(key + version, dir.component, key, None, dir.logical)]) + cab.commit(db) def add_find_python(self): """Adds code to the installer to compute the location of Python. - Properties PYTHON.MACHINE, PYTHON.USER, PYTHONDIR and PYTHON will be set - in both the execute and UI sequences; PYTHONDIR will be set from - PYTHON.USER if defined, else from PYTHON.MACHINE. - PYTHON is PYTHONDIR\python.exe""" - install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version - add_data(self.db, "RegLocator", - [("python.machine", 2, install_path, None, 2), - ("python.user", 1, install_path, None, 2)]) - add_data(self.db, "AppSearch", - [("PYTHON.MACHINE", "python.machine"), - ("PYTHON.USER", "python.user")]) - add_data(self.db, "CustomAction", - [("PythonFromMachine", 51+256, "PYTHONDIR", "[PYTHON.MACHINE]"), - ("PythonFromUser", 51+256, "PYTHONDIR", "[PYTHON.USER]"), - ("PythonExe", 51+256, "PYTHON", "[PYTHONDIR]\\python.exe"), - ("InitialTargetDir", 51+256, "TARGETDIR", "[PYTHONDIR]")]) - add_data(self.db, "InstallExecuteSequence", - [("PythonFromMachine", "PYTHON.MACHINE", 401), - ("PythonFromUser", "PYTHON.USER", 402), - ("PythonExe", None, 403), - ("InitialTargetDir", 'TARGETDIR=""', 404), - ]) - add_data(self.db, "InstallUISequence", - [("PythonFromMachine", "PYTHON.MACHINE", 401), - ("PythonFromUser", "PYTHON.USER", 402), - ("PythonExe", None, 403), - ("InitialTargetDir", 'TARGETDIR=""', 404), - ]) - def add_scripts(self): - if self.install_script: + Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the + registry for each version of Python. + + Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined, + else from PYTHON.MACHINE.X.Y. + + Properties PYTHONX.Y will be set to TARGETDIRX.Y\\python.exe""" + + start = 402 + for ver in self.versions: + install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % ver + machine_reg = "python.machine." + ver + user_reg = "python.user." + ver + machine_prop = "PYTHON.MACHINE." + ver + user_prop = "PYTHON.USER." + ver + machine_action = "PythonFromMachine" + ver + user_action = "PythonFromUser" + ver + exe_action = "PythonExe" + ver + target_dir_prop = "TARGETDIR" + ver + exe_prop = "PYTHON" + ver + add_data(self.db, "RegLocator", + [(machine_reg, 2, install_path, None, 2), + (user_reg, 1, install_path, None, 2)]) + add_data(self.db, "AppSearch", + [(machine_prop, machine_reg), + (user_prop, user_reg)]) add_data(self.db, "CustomAction", - [("install_script", 50, "PYTHON", self.install_script_key)]) + [(machine_action, 51+256, target_dir_prop, "[" + machine_prop + "]"), + (user_action, 51+256, target_dir_prop, "[" + user_prop + "]"), + (exe_action, 51+256, exe_prop, "[" + target_dir_prop + "]\\python.exe"), + ]) add_data(self.db, "InstallExecuteSequence", - [("install_script", "NOT Installed", 6800)]) + [(machine_action, machine_prop, start), + (user_action, user_prop, start + 1), + (exe_action, None, start + 2), + ]) + add_data(self.db, "InstallUISequence", + [(machine_action, machine_prop, start), + (user_action, user_prop, start + 1), + (exe_action, None, start + 2), + ]) + add_data(self.db, "Condition", + [("Python" + ver, 0, "NOT TARGETDIR" + ver)]) + start += 4 + assert start < 500 + + def add_scripts(self): + if self.install_script: + start = 6800 + for ver in self.versions + [self.other_version]: + install_action = "install_script." + ver + exe_prop = "PYTHON" + ver + add_data(self.db, "CustomAction", + [(install_action, 50, exe_prop, self.install_script_key)]) + add_data(self.db, "InstallExecuteSequence", + [(install_action, "&Python%s=3" % ver, start)]) + start += 1 + # XXX pre-install scripts are currently refused in finalize_options() + # but if this feature is completed, it will also need to add + # entries for each version as the above code does if self.pre_install_script: scriptfn = os.path.join(self.bdist_dir, "preinstall.bat") f = open(scriptfn, "w") @@ -375,7 +442,7 @@ def add_ui(self): [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140), ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141), # In the user interface, assume all-users installation if privileged. - ("SelectDirectoryDlg", "Not Installed", 1230), + ("SelectFeaturesDlg", "Not Installed", 1230), # XXX no support for resume installations yet #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240), ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250), @@ -498,33 +565,49 @@ def add_ui(self): c.event("SpawnDialog", "CancelDlg") ##################################################################### - # Target directory selection - seldlg = PyDialog(db, "SelectDirectoryDlg", x, y, w, h, modal, title, + # Feature (Python directory) selection + seldlg = PyDialog(db, "SelectFeaturesDlg", x, y, w, h, modal, title, "Next", "Next", "Cancel") - seldlg.title("Select Destination Directory") + seldlg.title("Select Python Installations") - version = sys.version[:3]+" " - seldlg.text("Hint", 15, 30, 300, 40, 3, - "The destination directory should contain a Python %sinstallation" % version) + seldlg.text("Hint", 15, 30, 300, 20, 3, + "Select the Python locations where %s should be installed." + % self.distribution.get_fullname()) seldlg.back("< Back", None, active=0) c = seldlg.next("Next >", "Cancel") - c.event("SetTargetPath", "TARGETDIR", ordering=1) - c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=2) - c.event("EndDialog", "Return", ordering=3) - - c = seldlg.cancel("Cancel", "DirectoryCombo") + order = 1 + c.event("[TARGETDIR]", "[SourceDir]", ordering=order) + for version in self.versions + [self.other_version]: + order += 1 + c.event("[TARGETDIR]", "[TARGETDIR%s]" % version, + "FEATURE_SELECTED AND &Python%s=3" % version, + ordering=order) + c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=order + 1) + c.event("EndDialog", "Return", ordering=order + 2) + c = seldlg.cancel("Cancel", "Features") c.event("SpawnDialog", "CancelDlg") - seldlg.control("DirectoryCombo", "DirectoryCombo", 15, 70, 272, 80, 393219, - "TARGETDIR", None, "DirectoryList", None) - seldlg.control("DirectoryList", "DirectoryList", 15, 90, 308, 136, 3, "TARGETDIR", - None, "PathEdit", None) - seldlg.control("PathEdit", "PathEdit", 15, 230, 306, 16, 3, "TARGETDIR", None, "Next", None) - c = seldlg.pushbutton("Up", 306, 70, 18, 18, 3, "Up", None) - c.event("DirectoryListUp", "0") - c = seldlg.pushbutton("NewDir", 324, 70, 30, 18, 3, "New", None) - c.event("DirectoryListNew", "0") + c = seldlg.control("Features", "SelectionTree", 15, 60, 300, 120, 3, + "FEATURE", None, "PathEdit", None) + c.event("[FEATURE_SELECTED]", "1") + ver = self.other_version + install_other_cond = "FEATURE_SELECTED AND &Python%s=3" % ver + dont_install_other_cond = "FEATURE_SELECTED AND &Python%s<>3" % ver + + c = seldlg.text("Other", 15, 200, 300, 15, 3, + "Provide an alternate Python location") + c.condition("Enable", install_other_cond) + c.condition("Show", install_other_cond) + c.condition("Disable", dont_install_other_cond) + c.condition("Hide", dont_install_other_cond) + + c = seldlg.control("PathEdit", "PathEdit", 15, 215, 300, 16, 1, + "TARGETDIR" + ver, None, "Next", None) + c.condition("Enable", install_other_cond) + c.condition("Show", install_other_cond) + c.condition("Disable", dont_install_other_cond) + c.condition("Hide", dont_install_other_cond) ##################################################################### # Disk cost @@ -640,7 +723,10 @@ def add_ui(self): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses - base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, - self.target_version) + if self.target_version: + base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name, + self.target_version) + else: + base_name = "%s.%s.msi" % (fullname, self.plat_name) installer_name = os.path.join(self.dist_dir, base_name) return installer_name From 1cd9b19ad7991f6709ed553b2e752fd2d0b6d47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 07:17:52 +0000 Subject: [PATCH 2258/8469] Added a test and cleaned check_library_list to be ready to fix #5940 --- command/build_clib.py | 32 +++++++++++++-------------- tests/test_build_clib.py | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 tests/test_build_clib.py diff --git a/command/build_clib.py b/command/build_clib.py index fe921fb88b..1d8cd8c3fa 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -127,43 +127,41 @@ def run (self): # run() - def check_library_list (self, libraries): - """Ensure that the list of libraries (presumably provided as a - command option 'libraries') is valid, i.e. it is a list of - 2-tuples, where the tuples are (library_name, build_info_dict). - Raise DistutilsSetupError if the structure is invalid anywhere; - just returns otherwise.""" + def check_library_list(self, libraries): + """Ensure that the list of libraries is valid. - # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, - # with only names changed to protect the innocent! + `library` is presumably provided as a command option 'libraries'. + This method checks that it is a list of 2-tuples, where the tuples + are (library_name, build_info_dict). - if type(libraries) is not ListType: + Raise DistutilsSetupError if the structure is invalid anywhere; + just returns otherwise. + """ + if not isinstance(libraries, list): raise DistutilsSetupError, \ "'libraries' option must be a list of tuples" for lib in libraries: - if type(lib) is not TupleType and len(lib) != 2: + if not isinstance(lib, tuple) and len(lib) != 2: raise DistutilsSetupError, \ "each element of 'libraries' must a 2-tuple" - if type(lib[0]) is not StringType: + name, build_info = lib + + if not isinstance(name, str): raise DistutilsSetupError, \ "first element of each tuple in 'libraries' " + \ "must be a string (the library name)" - if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): + if '/' in name or (os.sep != '/' and os.sep in name): raise DistutilsSetupError, \ ("bad library name '%s': " + "may not contain directory separators") % \ lib[0] - if type(lib[1]) is not DictionaryType: + if not isinstance(build_info, dict): raise DistutilsSetupError, \ "second element of each tuple in 'libraries' " + \ "must be a dictionary (build info)" - # for lib - - # check_library_list () - def get_library_names (self): # Assume the library list is valid -- 'check_library_list()' is diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py new file mode 100644 index 0000000000..36c07b7953 --- /dev/null +++ b/tests/test_build_clib.py @@ -0,0 +1,47 @@ +"""Tests for distutils.command.build_clib.""" +import unittest + +from distutils.command.build_clib import build_clib +from distutils.errors import DistutilsSetupError +from distutils.tests import support + +class BuildCLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_check_library_dist(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # 'libraries' option must be a list + self.assertRaises(DistutilsSetupError, cmd.check_library_list, 'foo') + + # each element of 'libraries' must a 2-tuple + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + ['foo1', 'foo2']) + + # first element of each tuple in 'libraries' + # must be a string (the library name) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [(1, 'foo1'), ('name', 'foo2')]) + + # library name may not contain directory separators + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', 'foo1'), + ('another/name', 'foo2')]) + + # second element of each tuple must be a dictionary (build info) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', {}), + ('another', 'foo2')]) + + # those work + libs = [('name', {}), ('name', {'ok': 'good'})] + cmd.check_library_list(libs) + + +def test_suite(): + return unittest.makeSuite(BuildCLibTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 0a4c48c5ff377d4d8e7e5ee1c151dace8b57ef83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 07:26:24 +0000 Subject: [PATCH 2259/8469] Fixed #5940: distutils.command.build_clib.check_library_list is doing the right checkings again --- command/build_clib.py | 25 ++++++++++++--------- tests/test_build_clib.py | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 tests/test_build_clib.py diff --git a/command/build_clib.py b/command/build_clib.py index 34f4983689..258d7c10be 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -118,13 +118,15 @@ def run(self): def check_library_list(self, libraries): - """Ensure that the list of libraries (presumably provided as a - command option 'libraries') is valid, i.e. it is a list of - 2-tuples, where the tuples are (library_name, build_info_dict). - Raise DistutilsSetupError if the structure is invalid anywhere; - just returns otherwise.""" - # Yechh, blecch, ackk: this is ripped straight out of build_ext.py, - # with only names changed to protect the innocent! + """Ensure that the list of libraries is valid. + + `library` is presumably provided as a command option 'libraries'. + This method checks that it is a list of 2-tuples, where the tuples + are (library_name, build_info_dict). + + Raise DistutilsSetupError if the structure is invalid anywhere; + just returns otherwise. + """ if not isinstance(libraries, list): raise DistutilsSetupError( "'libraries' option must be a list of tuples") @@ -134,15 +136,18 @@ def check_library_list(self, libraries): raise DistutilsSetupError( "each element of 'libraries' must a 2-tuple") - if isinstance(lib[0], str): + name, build_info = lib + + if not isinstance(name, str): raise DistutilsSetupError( "first element of each tuple in 'libraries' " "must be a string (the library name)") - if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]): + + if '/' in name or (os.sep != '/' and os.sep in name): raise DistutilsSetupError("bad library name '%s': " "may not contain directory separators" % lib[0]) - if not isinstance(lib[1], dict): + if not isinstance(build_info, dict): raise DistutilsSetupError( "second element of each tuple in 'libraries' " "must be a dictionary (build info)") diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py new file mode 100644 index 0000000000..36c07b7953 --- /dev/null +++ b/tests/test_build_clib.py @@ -0,0 +1,47 @@ +"""Tests for distutils.command.build_clib.""" +import unittest + +from distutils.command.build_clib import build_clib +from distutils.errors import DistutilsSetupError +from distutils.tests import support + +class BuildCLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_check_library_dist(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # 'libraries' option must be a list + self.assertRaises(DistutilsSetupError, cmd.check_library_list, 'foo') + + # each element of 'libraries' must a 2-tuple + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + ['foo1', 'foo2']) + + # first element of each tuple in 'libraries' + # must be a string (the library name) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [(1, 'foo1'), ('name', 'foo2')]) + + # library name may not contain directory separators + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', 'foo1'), + ('another/name', 'foo2')]) + + # second element of each tuple must be a dictionary (build info) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', {}), + ('another', 'foo2')]) + + # those work + libs = [('name', {}), ('name', {'ok': 'good'})] + cmd.check_library_list(libs) + + +def test_suite(): + return unittest.makeSuite(BuildCLibTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 5c0bfa1ffda99f8f88c4f31360812dd8aa9633ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 07:41:53 +0000 Subject: [PATCH 2260/8469] pep8-fied build_clib module : it is now similar to the one in 3.x --- command/build_clib.py | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 1d8cd8c3fa..18415cfcf3 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -17,7 +17,6 @@ # cut 'n paste. Sigh. import os, string -from types import * from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler @@ -52,7 +51,7 @@ class build_clib (Command): "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.build_clib = None self.build_temp = None @@ -67,11 +66,8 @@ def initialize_options (self): self.force = 0 self.compiler = None - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): # This might be confusing: both build-clib and build-temp default # to build-temp as defined by the "build" command. This is because # I think that C libraries are really just temporary build @@ -97,11 +93,7 @@ def finalize_options (self): # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? - # finalize_options() - - - def run (self): - + def run(self): if not self.libraries: return @@ -124,8 +116,6 @@ def run (self): self.build_libraries(self.libraries) - # run() - def check_library_list(self, libraries): """Ensure that the list of libraries is valid. @@ -163,10 +153,9 @@ def check_library_list(self, libraries): "second element of each tuple in 'libraries' " + \ "must be a dictionary (build info)" - def get_library_names (self): + def get_library_names(self): # Assume the library list is valid -- 'check_library_list()' is # called from 'finalize_options()', so it should be! - if not self.libraries: return None @@ -175,10 +164,8 @@ def get_library_names (self): lib_names.append(lib_name) return lib_names - # get_library_names () - - def get_source_files (self): + def get_source_files(self): self.check_library_list(self.libraries) filenames = [] for (lib_name, build_info) in self.libraries: @@ -191,13 +178,9 @@ def get_source_files (self): "a list of source filenames") % lib_name filenames.extend(sources) - return filenames - # get_source_files () - def build_libraries (self, libraries): - for (lib_name, build_info) in libraries: sources = build_info.get('sources') if sources is None or type(sources) not in (ListType, TupleType): @@ -226,9 +209,3 @@ def build_libraries (self, libraries): self.compiler.create_static_lib(objects, lib_name, output_dir=self.build_clib, debug=self.debug) - - # for libraries - - # build_libraries () - -# class build_lib From d337edee8fe4fa9c4d9dbefa65c1829c97b231c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 08:05:47 +0000 Subject: [PATCH 2261/8469] more build_clib cleanup + test coverage --- command/build_clib.py | 7 +++-- tests/test_build_clib.py | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 18415cfcf3..447ea94989 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -86,7 +86,7 @@ def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type(self.include_dirs) is StringType: + if isinstance(self.include_dirs, str): self.include_dirs = string.split(self.include_dirs, os.pathsep) @@ -170,8 +170,7 @@ def get_source_files(self): filenames = [] for (lib_name, build_info) in self.libraries: sources = build_info.get('sources') - if (sources is None or - type(sources) not in (ListType, TupleType) ): + if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError, \ ("in 'libraries' option (library '%s'), " "'sources' must be present and must be " @@ -183,7 +182,7 @@ def get_source_files(self): def build_libraries (self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get('sources') - if sources is None or type(sources) not in (ListType, TupleType): + if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError, \ ("in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 36c07b7953..7374c4956a 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -39,6 +39,63 @@ def test_check_library_dist(self): libs = [('name', {}), ('name', {'ok': 'good'})] cmd.check_library_list(libs) + def test_get_source_files(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # "in 'libraries' option 'sources' must be present and must be + # a list of source filenames + cmd.libraries = [('name', {})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': 1})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': ['a', 'b']})] + self.assertEquals(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')})] + self.assertEquals(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')}), + ('name2', {'sources': ['c', 'd']})] + self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + + def test_build_libraries(self): + + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + class FakeCompiler: + def compile(*args, **kw): + pass + create_static_lib = compile + + cmd.compiler = FakeCompiler() + + # build_libraries is also doing a bit of typoe checking + lib = [('name', {'sources': 'notvalid'})] + self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib) + + lib = [('name', {'sources': list()})] + cmd.build_libraries(lib) + + lib = [('name', {'sources': tuple()})] + cmd.build_libraries(lib) + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + cmd.include_dirs = 'one-dir' + cmd.finalize_options() + self.assertEquals(cmd.include_dirs, ['one-dir']) + + cmd.include_dirs = None + cmd.finalize_options() + self.assertEquals(cmd.include_dirs, []) + + cmd.distribution.libraries = 'WONTWORK' + self.assertRaises(DistutilsSetupError, cmd.finalize_options) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) From 822b9626452ce994033db5ae7af1139eaeb5ff68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 08:08:26 +0000 Subject: [PATCH 2262/8469] Merged revisions 72388 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72388 | tarek.ziade | 2009-05-06 10:05:47 +0200 (Wed, 06 May 2009) | 1 line more build_clib cleanup + test coverage ........ --- tests/test_build_clib.py | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 36c07b7953..7374c4956a 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -39,6 +39,63 @@ def test_check_library_dist(self): libs = [('name', {}), ('name', {'ok': 'good'})] cmd.check_library_list(libs) + def test_get_source_files(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # "in 'libraries' option 'sources' must be present and must be + # a list of source filenames + cmd.libraries = [('name', {})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': 1})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': ['a', 'b']})] + self.assertEquals(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')})] + self.assertEquals(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')}), + ('name2', {'sources': ['c', 'd']})] + self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + + def test_build_libraries(self): + + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + class FakeCompiler: + def compile(*args, **kw): + pass + create_static_lib = compile + + cmd.compiler = FakeCompiler() + + # build_libraries is also doing a bit of typoe checking + lib = [('name', {'sources': 'notvalid'})] + self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib) + + lib = [('name', {'sources': list()})] + cmd.build_libraries(lib) + + lib = [('name', {'sources': tuple()})] + cmd.build_libraries(lib) + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + cmd.include_dirs = 'one-dir' + cmd.finalize_options() + self.assertEquals(cmd.include_dirs, ['one-dir']) + + cmd.include_dirs = None + cmd.finalize_options() + self.assertEquals(cmd.include_dirs, []) + + cmd.distribution.libraries = 'WONTWORK' + self.assertRaises(DistutilsSetupError, cmd.finalize_options) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) From a990c6a1f3084b141a9be5772685e1a8b7498515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 6 May 2009 08:11:00 +0000 Subject: [PATCH 2263/8469] removed string.split usage --- command/build_clib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 447ea94989..d475232bc3 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -16,7 +16,7 @@ # two modules, mainly because a number of subtle details changed in the # cut 'n paste. Sigh. -import os, string +import os from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler @@ -87,8 +87,7 @@ def finalize_options(self): if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): - self.include_dirs = string.split(self.include_dirs, - os.pathsep) + self.include_dirs = self.include_dirs.split(os.pathsep) # XXX same as for build_ext -- what about 'self.define' and # 'self.undef' ? From 14c20a579282de3d0fc983b150630d1f2f5d7f99 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 6 May 2009 20:43:28 +0000 Subject: [PATCH 2264/8469] bump version to 3.1b1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c66806361a..80ccf6113d 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1a2" +__version__ = "3.1b1" #--end constants-- From 8bbedf87070ecfa92b99ef0a704eab780c15e3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 21:13:02 +0000 Subject: [PATCH 2265/8469] removed remaining spaces --- command/build_clib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index d475232bc3..9545b27ad0 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -22,12 +22,12 @@ from distutils.sysconfig import customize_compiler from distutils import log -def show_compilers (): +def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() -class build_clib (Command): +class build_clib(Command): description = "build C/C++ libraries used by Python extensions" @@ -178,7 +178,7 @@ def get_source_files(self): filenames.extend(sources) return filenames - def build_libraries (self, libraries): + def build_libraries(self, libraries): for (lib_name, build_info) in libraries: sources = build_info.get('sources') if sources is None or not isinstance(sources, (list, tuple)): From afc36e0fa764d77b641b477a92f769fb225a4c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 21:20:34 +0000 Subject: [PATCH 2266/8469] Fixed #5941: added ARFLAGS for the archiver command. --- sysconfig.py | 10 +++++++--- tests/test_build_clib.py | 40 ++++++++++++++++++++++++++++++++++++++++ tests/test_sysconfig.py | 5 +++-- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 56cb861a6c..099e0586fd 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -165,9 +165,9 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR') + 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') if 'CC' in os.environ: cc = os.environ['CC'] @@ -190,6 +190,10 @@ def customize_compiler(compiler): ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] if 'AR' in os.environ: ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] + else: + archiver = ar + ' ' + ar_flags cc_cmd = cc + ' ' + cflags compiler.set_executables( @@ -199,7 +203,7 @@ def customize_compiler(compiler): compiler_cxx=cxx, linker_so=ldshared, linker_exe=cc, - archiver=ar) + archiver=archiver) compiler.shared_lib_extension = so_ext diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 7374c4956a..3c6643f354 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -1,9 +1,12 @@ """Tests for distutils.command.build_clib.""" import unittest +import os +import sys from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support +from distutils.spawn import find_executable class BuildCLibTestCase(support.TempdirManager, support.LoggingSilencer, @@ -97,6 +100,43 @@ def test_finalize_options(self): cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) + def test_run(self): + # can't test on windows + if sys.platform == 'win32': + return + + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + foo_c = os.path.join(pkg_dir, 'foo.c') + self.write_file(foo_c, 'int main(void) { return 1;}') + cmd.libraries = [('foo', {'sources': [foo_c]})] + + build_temp = os.path.join(pkg_dir, 'build') + os.mkdir(build_temp) + cmd.build_temp = build_temp + cmd.build_clib = build_temp + + # before we run the command, we want to make sure + # all commands are present on the system + # by creating a compiler and checking its executables + from distutils.ccompiler import new_compiler + from distutils.sysconfig import customize_compiler + + compiler = new_compiler() + customize_compiler(compiler) + for ccmd in compiler.executables.values(): + if ccmd is None: + continue + if find_executable(ccmd[0]) is None: + return # can't test + + # this should work + cmd.run() + + # let's check the result + self.assert_('libfoo.a' in os.listdir(build_temp)) + def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index dd17eb347f..040dfcb6ad 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -49,7 +49,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - os.environ['AR'] = 'xxx' + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: @@ -60,7 +61,7 @@ def set_executables(self, **kw): comp = compiler() sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'xxx') + self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') def test_suite(): From 40f8502c0bede251d25993361779f82b1ffe44db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 21:24:43 +0000 Subject: [PATCH 2267/8469] Merged revisions 72445 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72445 | tarek.ziade | 2009-05-07 23:20:34 +0200 (Thu, 07 May 2009) | 1 line Fixed #5941: added ARFLAGS for the archiver command. ........ --- sysconfig.py | 10 +++++++--- tests/test_build_clib.py | 40 ++++++++++++++++++++++++++++++++++++++++ tests/test_sysconfig.py | 5 +++-- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index fbeb45f8cc..223ff672b9 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -160,9 +160,9 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR') + 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') if 'CC' in os.environ: cc = os.environ['CC'] @@ -185,6 +185,10 @@ def customize_compiler(compiler): ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] if 'AR' in os.environ: ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] + else: + archiver = ar + ' ' + ar_flags cc_cmd = cc + ' ' + cflags compiler.set_executables( @@ -194,7 +198,7 @@ def customize_compiler(compiler): compiler_cxx=cxx, linker_so=ldshared, linker_exe=cc, - archiver=ar) + archiver=archiver) compiler.shared_lib_extension = so_ext diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 7374c4956a..3c6643f354 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -1,9 +1,12 @@ """Tests for distutils.command.build_clib.""" import unittest +import os +import sys from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support +from distutils.spawn import find_executable class BuildCLibTestCase(support.TempdirManager, support.LoggingSilencer, @@ -97,6 +100,43 @@ def test_finalize_options(self): cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) + def test_run(self): + # can't test on windows + if sys.platform == 'win32': + return + + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + foo_c = os.path.join(pkg_dir, 'foo.c') + self.write_file(foo_c, 'int main(void) { return 1;}') + cmd.libraries = [('foo', {'sources': [foo_c]})] + + build_temp = os.path.join(pkg_dir, 'build') + os.mkdir(build_temp) + cmd.build_temp = build_temp + cmd.build_clib = build_temp + + # before we run the command, we want to make sure + # all commands are present on the system + # by creating a compiler and checking its executables + from distutils.ccompiler import new_compiler + from distutils.sysconfig import customize_compiler + + compiler = new_compiler() + customize_compiler(compiler) + for ccmd in compiler.executables.values(): + if ccmd is None: + continue + if find_executable(ccmd[0]) is None: + return # can't test + + # this should work + cmd.run() + + # let's check the result + self.assert_('libfoo.a' in os.listdir(build_temp)) + def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 1e9dbd542f..971aac6daf 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -49,7 +49,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - os.environ['AR'] = 'xxx' + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: @@ -60,7 +61,7 @@ def set_executables(self, **kw): comp = compiler() sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'xxx') + self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') def test_suite(): From 217fe3228dd9a092a05ddf8d777ef5eca22bf600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 23:01:56 +0000 Subject: [PATCH 2268/8469] fixed AR/ARFLAGS values in test_sysconfig --- tests/test_sysconfig.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 040dfcb6ad..bf0043aa05 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -11,11 +11,15 @@ class SysconfigTestCase(unittest.TestCase): def setUp(self): - self.old_AR = os.environ.get('AR') + self.old_flags = [('AR', os.environ.get('AR')), + ('ARFLAGS', os.environ.get('ARFLAGS'))] def tearDown(self): - if self.old_AR is not None: - os.environ['AR'] = self.old_AR + for name, value in self.old_flags: + if value is not None: + os.environ[name] = value + elif name in os.environ: + del os.environ[name] def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() From 6218b5aeb11b942cdb54f15043086f55ac1927d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 23:11:34 +0000 Subject: [PATCH 2269/8469] Merged revisions 72454 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72454 | tarek.ziade | 2009-05-08 01:01:56 +0200 (Fri, 08 May 2009) | 1 line fixed AR/ARFLAGS values in test_sysconfig ........ --- tests/test_sysconfig.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 971aac6daf..f65bc725c6 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -11,11 +11,15 @@ class SysconfigTestCase(unittest.TestCase): def setUp(self): - self.old_AR = os.environ.get('AR') + self.old_flags = [('AR', os.environ.get('AR')), + ('ARFLAGS', os.environ.get('ARFLAGS'))] def tearDown(self): - if self.old_AR is not None: - os.environ['AR'] = self.old_AR + for name, value in self.old_flags: + if value is not None: + os.environ[name] = value + elif name in os.environ: + del os.environ[name] def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() From 9e299d5f4ef5f92ed722d5176e07d7d98c4292bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 9 May 2009 07:12:44 +0000 Subject: [PATCH 2270/8469] Revert encoding error from r72309. --- command/bdist_msi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index ffd668eb0e..9645158637 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2005, 2006 Martin v. Löwis +# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst From f2cc5e5fffe3aeb72a2d20bc2feffe5faa587c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 9 May 2009 08:28:53 +0000 Subject: [PATCH 2271/8469] Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used --- tests/test_build_ext.py | 3 +- tests/test_unixccompiler.py | 93 +++++++++++++++++++++++++++++++++++++ unixccompiler.py | 24 ++++++++-- 3 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 tests/test_unixccompiler.py diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 9097bee2e4..141c2869b5 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -125,7 +125,7 @@ def test_user_site(self): dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) - # making sure the suer option is there + # making sure the user option is there options = [name for name, short, lable in cmd.user_options] self.assert_('user' in options) @@ -145,6 +145,7 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set self.assert_(lib in cmd.library_dirs) + self.assert_(lib in cmd.rpath) self.assert_(incl in cmd.include_dirs) def test_optional_extension(self): diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py new file mode 100644 index 0000000000..94e9edfc09 --- /dev/null +++ b/tests/test_unixccompiler.py @@ -0,0 +1,93 @@ +"""Tests for distutils.unixccompiler.""" +import sys +import unittest + +from distutils import sysconfig +from distutils.unixccompiler import UnixCCompiler + +class UnixCCompilerTestCase(unittest.TestCase): + + def setUp(self): + self._backup_platform = sys.platform + self._backup_get_config_var = sysconfig.get_config_var + class CompilerWrapper(UnixCCompiler): + def rpath_foo(self): + return self.runtime_library_dir_option('/foo') + self.cc = CompilerWrapper() + + def tearDown(self): + sys.platform = self._backup_platform + sysconfig.get_config_var = self._backup_get_config_var + + def test_runtime_libdir_option(self): + + # not tested under windows + if sys.platform == 'win32': + return + + # Issue#5900 + # + # Ensure RUNPATH is added to extension modules with RPATH if + # GNU ld is used + + # darwin + sys.platform = 'darwin' + self.assertEqual(self.cc.rpath_foo(), '-L/foo') + + # hp-ux + sys.platform = 'hp-ux' + self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + + # irix646 + sys.platform = 'irix646' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # osf1V5 + sys.platform = 'osf1V5' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + + # GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + + # non-GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + + # non-GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + +def test_suite(): + return unittest.makeSuite(UnixCCompilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/unixccompiler.py b/unixccompiler.py index 045368a925..0b1dc4af7d 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -273,8 +273,9 @@ def runtime_library_dir_option(self, dir): # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library - # is sought. GCC has to be told to pass the -R option through - # to the linker, whereas other compilers just know this. + # is sought. GCC on GNU systems (Linux, FreeBSD, ...) has to + # be told to pass the -R option through to the linker, whereas + # other compilers and gcc on other systems just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so @@ -287,10 +288,23 @@ def runtime_library_dir_option(self, dir): return "+s -L" + dir elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir else: - return "-R" + dir + if compiler[:3] == "gcc" or compiler[:3] == "g++": + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir + else: + return "-Wl,-R" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib From fbc4ab332c9be99d822e2cbd8728cb34560f5ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 9 May 2009 10:06:00 +0000 Subject: [PATCH 2272/8469] #5976: fixed distutils test_check_environ --- tests/test_util.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 348933e901..ea7c5925b7 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -214,12 +214,17 @@ def test_check_environ(self): # posix without HOME if os.name == 'posix': # this test won't run on windows - os.environ = {} - check_environ() - - import pwd - self.assertEquals(os.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) + old_home = os.environ.get('HOME') + try: + check_environ() + import pwd + self.assertEquals(os.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) + finally: + if old_home is not None: + os.environ['HOME'] = old_home + else: + del os.environ['HOME'] else: check_environ() From 8faf60dd1c9f552ad552a6267ec8bcb894bd8792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 9 May 2009 10:09:11 +0000 Subject: [PATCH 2273/8469] Merged revisions 72500 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72500 | tarek.ziade | 2009-05-09 12:06:00 +0200 (Sat, 09 May 2009) | 1 line #5976: fixed distutils test_check_environ ........ --- tests/test_util.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 348933e901..ea7c5925b7 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -214,12 +214,17 @@ def test_check_environ(self): # posix without HOME if os.name == 'posix': # this test won't run on windows - os.environ = {} - check_environ() - - import pwd - self.assertEquals(os.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) + old_home = os.environ.get('HOME') + try: + check_environ() + import pwd + self.assertEquals(os.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) + finally: + if old_home is not None: + os.environ['HOME'] = old_home + else: + del os.environ['HOME'] else: check_environ() From 6625a07e76fff84d1f3ed50ded7d1861744ffce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 9 May 2009 11:55:12 +0000 Subject: [PATCH 2274/8469] Merged revisions 72497 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72497 | tarek.ziade | 2009-05-09 10:28:53 +0200 (Sat, 09 May 2009) | 1 line Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used ........ --- tests/test_build_ext.py | 3 +- tests/test_unixccompiler.py | 93 +++++++++++++++++++++++++++++++++++++ unixccompiler.py | 24 ++++++++-- 3 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 tests/test_unixccompiler.py diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5ea67bedb7..e4a02391af 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -125,7 +125,7 @@ def test_user_site(self): dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) - # making sure the suer option is there + # making sure the user option is there options = [name for name, short, lable in cmd.user_options] self.assert_('user' in options) @@ -145,6 +145,7 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set self.assert_(lib in cmd.library_dirs) + self.assert_(lib in cmd.rpath) self.assert_(incl in cmd.include_dirs) def test_optional_extension(self): diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py new file mode 100644 index 0000000000..94e9edfc09 --- /dev/null +++ b/tests/test_unixccompiler.py @@ -0,0 +1,93 @@ +"""Tests for distutils.unixccompiler.""" +import sys +import unittest + +from distutils import sysconfig +from distutils.unixccompiler import UnixCCompiler + +class UnixCCompilerTestCase(unittest.TestCase): + + def setUp(self): + self._backup_platform = sys.platform + self._backup_get_config_var = sysconfig.get_config_var + class CompilerWrapper(UnixCCompiler): + def rpath_foo(self): + return self.runtime_library_dir_option('/foo') + self.cc = CompilerWrapper() + + def tearDown(self): + sys.platform = self._backup_platform + sysconfig.get_config_var = self._backup_get_config_var + + def test_runtime_libdir_option(self): + + # not tested under windows + if sys.platform == 'win32': + return + + # Issue#5900 + # + # Ensure RUNPATH is added to extension modules with RPATH if + # GNU ld is used + + # darwin + sys.platform = 'darwin' + self.assertEqual(self.cc.rpath_foo(), '-L/foo') + + # hp-ux + sys.platform = 'hp-ux' + self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + + # irix646 + sys.platform = 'irix646' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # osf1V5 + sys.platform = 'osf1V5' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + + # GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + + # non-GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + + # non-GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + +def test_suite(): + return unittest.makeSuite(UnixCCompilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/unixccompiler.py b/unixccompiler.py index d65ab321b6..c11544d828 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -271,8 +271,9 @@ def runtime_library_dir_option(self, dir): # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library - # is sought. GCC has to be told to pass the -R option through - # to the linker, whereas other compilers just know this. + # is sought. GCC on GNU systems (Linux, FreeBSD, ...) has to + # be told to pass the -R option through to the linker, whereas + # other compilers and gcc on other systems just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so @@ -285,10 +286,23 @@ def runtime_library_dir_option(self, dir): return "+s -L" + dir elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir else: - return "-R" + dir + if compiler[:3] == "gcc" or compiler[:3] == "g++": + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir + else: + return "-Wl,-R" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib From c2b1e652ad5c124b958955a646efa51a17810609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 10:12:08 +0000 Subject: [PATCH 2275/8469] fixed #5984 and improved test coverage --- command/build_ext.py | 70 ++++++++-------------- tests/test_build_ext.py | 128 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 151 insertions(+), 47 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2c6df1d2cd..dfabf91091 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -136,7 +136,7 @@ def initialize_options (self): self.swig_opts = None self.user = None - def finalize_options (self): + def finalize_options(self): from distutils import sysconfig self.set_undefined_options('build', @@ -153,15 +153,14 @@ def finalize_options (self): self.extensions = self.distribution.ext_modules - # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. py_include = sysconfig.get_python_inc() plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, os.pathsep) + if isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. @@ -169,7 +168,7 @@ def finalize_options (self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if type(self.libraries) is StringType: + if isinstance(self.libraries, str): self.libraries = [self.libraries] # Life is easier if we're not forever checking for None, so @@ -260,14 +259,14 @@ def finalize_options (self): # symbols can be separated with commas. if self.define: - defines = string.split(self.define, ',') + defines = self.define.split(',') self.define = map(lambda symbol: (symbol, '1'), defines) # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also # be separated with commas here. if self.undef: - self.undef = string.split(self.undef, ',') + self.undef = self.undef.split(',') if self.swig_opts is None: self.swig_opts = [] @@ -284,11 +283,7 @@ def finalize_options (self): self.library_dirs.append(user_lib) self.rpath.append(user_lib) - # finalize_options () - - - def run (self): - + def run(self): from distutils.ccompiler import new_compiler # 'self.extensions', as supplied by setup.py, is a list of @@ -335,7 +330,7 @@ def run (self): self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name,value) in self.define: + for (name, value) in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -352,10 +347,7 @@ def run (self): # Now actually compile and link everything. self.build_extensions() - # run () - - - def check_extensions_list (self, extensions): + def check_extensions_list(self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, @@ -365,32 +357,33 @@ def check_extensions_list (self, extensions): Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise. """ - if type(extensions) is not ListType: + if not isinstance(extensions, list): raise DistutilsSetupError, \ "'ext_modules' option must be a list of Extension instances" - for i in range(len(extensions)): - ext = extensions[i] + for i, ext in enumerate(extensions): if isinstance(ext, Extension): continue # OK! (assume type-checking done # by Extension constructor) - (ext_name, build_info) = ext - log.warn(("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name)) - if type(ext) is not TupleType and len(ext) != 2: + if not isinstance(ext, tuple) or len(ext) != 2: raise DistutilsSetupError, \ ("each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") - if not (type(ext_name) is StringType and + ext_name, build_info = ext + + log.warn(("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name)) + + if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): raise DistutilsSetupError, \ ("first element of each tuple in 'ext_modules' " "must be the extension name (a string)") - if type(build_info) is not DictionaryType: + if not isinstance(build_info, dict): raise DistutilsSetupError, \ ("second element of each tuple in 'ext_modules' " "must be a dictionary (build info)") @@ -401,11 +394,8 @@ def check_extensions_list (self, extensions): # Easy stuff: one-to-one mapping from dict elements to # instance attributes. - for key in ('include_dirs', - 'library_dirs', - 'libraries', - 'extra_objects', - 'extra_compile_args', + for key in ('include_dirs', 'library_dirs', 'libraries', + 'extra_objects', 'extra_compile_args', 'extra_link_args'): val = build_info.get(key) if val is not None: @@ -424,8 +414,7 @@ def check_extensions_list (self, extensions): ext.define_macros = [] ext.undef_macros = [] for macro in macros: - if not (type(macro) is TupleType and - 1 <= len(macro) <= 2): + if not (isinstance(macro, tuple) and len(macro) in (1, 2)): raise DistutilsSetupError, \ ("'macros' element of build info dict " "must be 1- or 2-tuple") @@ -436,12 +425,7 @@ def check_extensions_list (self, extensions): extensions[i] = ext - # for extensions - - # check_extensions_list () - - - def get_source_files (self): + def get_source_files(self): self.check_extensions_list(self.extensions) filenames = [] @@ -451,9 +435,7 @@ def get_source_files (self): return filenames - - def get_outputs (self): - + def get_outputs(self): # Sanity check the 'extensions' list -- can't assume this is being # done in the same run as a 'build_extensions()' call (in fact, we # can probably assume that it *isn't*!). @@ -469,8 +451,6 @@ def get_outputs (self): self.get_ext_filename(fullname))) return outputs - # get_outputs () - def build_extensions(self): # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 141c2869b5..dab9712a56 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -9,8 +9,8 @@ from distutils import sysconfig from distutils.tests import support from distutils.extension import Extension -from distutils.errors import UnknownFileError -from distutils.errors import CompileError +from distutils.errors import (UnknownFileError, DistutilsSetupError, + CompileError) import unittest from test import test_support @@ -165,6 +165,130 @@ def test_optional_extension(self): cmd.ensure_finalized() cmd.run() # should pass + def test_finalize_options(self): + # Make sure Python's include directories (for Python.h, pyconfig.h, + # etc.) are in the include search path. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.finalize_options() + + from distutils import sysconfig + py_include = sysconfig.get_python_inc() + self.assert_(py_include in cmd.include_dirs) + + plat_py_include = sysconfig.get_python_inc(plat_specific=1) + self.assert_(plat_py_include in cmd.include_dirs) + + # make sure cmd.libraries is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.libraries = 'my_lib' + cmd.finalize_options() + self.assertEquals(cmd.libraries, ['my_lib']) + + # make sure cmd.library_dirs is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.library_dirs = 'my_lib_dir' + cmd.finalize_options() + self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + + # make sure rpath is turned into a list + # if it's a list of os.pathsep's paths + cmd = build_ext(dist) + cmd.rpath = os.pathsep.join(['one', 'two']) + cmd.finalize_options() + self.assertEquals(cmd.rpath, ['one', 'two']) + + # XXX more tests to perform for win32 + + # make sure define is turned into 2-tuples + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.define = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + + # make sure undef is turned into a list of + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.undef = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.undef, ['one', 'two']) + + # make sure swig_opts is turned into a list + cmd = build_ext(dist) + cmd.swig_opts = None + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, []) + + cmd = build_ext(dist) + cmd.swig_opts = '1 2' + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, ['1', '2']) + + def test_check_extensions_list(self): + dist = Distribution() + cmd = build_ext(dist) + cmd.finalize_options() + + #'extensions' option must be a list of Extension instances + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, 'foo') + + # each element of 'ext_modules' option must be an + # Extension instance or 2-tuple + exts = [('bar', 'foo', 'bar'), 'foo'] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # first element of each tuple in 'ext_modules' + # must be the extension name (a string) and match + # a python dotted-separated name + exts = [('foo-bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # second element of each tuple in 'ext_modules' + # must be a ary (build info) + exts = [('foo.bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # ok this one should pass + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar'})] + cmd.check_extensions_list(exts) + ext = exts[0] + self.assert_(isinstance(ext, Extension)) + + # check_extensions_list adds in ext the values passed + # when they are in ('include_dirs', 'library_dirs', 'libraries' + # 'extra_objects', 'extra_compile_args', 'extra_link_args') + self.assertEquals(ext.libraries, 'foo') + self.assert_(not hasattr(ext, 'some')) + + # 'macros' element of build info dict must be 1- or 2-tuple + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar', 'macros': [('1', '2', '3'), 'foo']})] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + exts[0][1]['macros'] = [('1', '2'), ('3',)] + cmd.check_extensions_list(exts) + self.assertEquals(exts[0].undef_macros, ['3']) + self.assertEquals(exts[0].define_macros, [('1', '2')]) + + def test_get_source_files(self): + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(cmd.get_source_files(), ['xxx']) + + def test_get_outputs(self): + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(len(cmd.get_outputs()), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From dc71622b4ce6db30451eb3393ad04c13623076dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 10:24:16 +0000 Subject: [PATCH 2276/8469] Merged revisions 72531 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72531 | tarek.ziade | 2009-05-10 12:12:08 +0200 (Sun, 10 May 2009) | 1 line fixed #5984 and improved test coverage ........ --- command/build_ext.py | 70 ++++++++------------- tests/test_build_ext.py | 132 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 156 insertions(+), 46 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 936ea8d099..c03951cb12 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -128,7 +128,7 @@ def initialize_options (self): self.swig_opts = None self.user = None - def finalize_options (self): + def finalize_options(self): from distutils import sysconfig self.set_undefined_options('build', @@ -145,15 +145,14 @@ def finalize_options (self): self.extensions = self.distribution.ext_modules - # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. py_include = sysconfig.get_python_inc() plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] - if type(self.include_dirs) is StringType: - self.include_dirs = string.split(self.include_dirs, os.pathsep) + if isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. @@ -161,7 +160,7 @@ def finalize_options (self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if type(self.libraries) is StringType: + if isinstance(self.libraries, str): self.libraries = [self.libraries] # Life is easier if we're not forever checking for None, so @@ -252,14 +251,14 @@ def finalize_options (self): # symbols can be separated with commas. if self.define: - defines = string.split(self.define, ',') + defines = self.define.split(',') self.define = map(lambda symbol: (symbol, '1'), defines) # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also # be separated with commas here. if self.undef: - self.undef = string.split(self.undef, ',') + self.undef = self.undef.split(',') if self.swig_opts is None: self.swig_opts = [] @@ -276,11 +275,7 @@ def finalize_options (self): self.library_dirs.append(user_lib) self.rpath.append(user_lib) - # finalize_options () - - - def run (self): - + def run(self): from distutils.ccompiler import new_compiler # 'self.extensions', as supplied by setup.py, is a list of @@ -327,7 +322,7 @@ def run (self): self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name,value) in self.define: + for (name, value) in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -344,10 +339,7 @@ def run (self): # Now actually compile and link everything. self.build_extensions() - # run () - - - def check_extensions_list (self, extensions): + def check_extensions_list(self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, @@ -357,32 +349,33 @@ def check_extensions_list (self, extensions): Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise. """ - if type(extensions) is not ListType: + if not isinstance(extensions, list): raise DistutilsSetupError, \ "'ext_modules' option must be a list of Extension instances" - for i in range(len(extensions)): - ext = extensions[i] + for i, ext in enumerate(extensions): if isinstance(ext, Extension): continue # OK! (assume type-checking done # by Extension constructor) - (ext_name, build_info) = ext - log.warn(("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name)) - if type(ext) is not TupleType and len(ext) != 2: + if not isinstance(ext, tuple) or len(ext) != 2: raise DistutilsSetupError, \ ("each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") - if not (type(ext_name) is StringType and + ext_name, build_info = ext + + log.warn(("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name)) + + if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): raise DistutilsSetupError, \ ("first element of each tuple in 'ext_modules' " "must be the extension name (a string)") - if type(build_info) is not DictionaryType: + if not isinstance(build_info, dict): raise DistutilsSetupError, \ ("second element of each tuple in 'ext_modules' " "must be a dictionary (build info)") @@ -393,11 +386,8 @@ def check_extensions_list (self, extensions): # Easy stuff: one-to-one mapping from dict elements to # instance attributes. - for key in ('include_dirs', - 'library_dirs', - 'libraries', - 'extra_objects', - 'extra_compile_args', + for key in ('include_dirs', 'library_dirs', 'libraries', + 'extra_objects', 'extra_compile_args', 'extra_link_args'): val = build_info.get(key) if val is not None: @@ -416,8 +406,7 @@ def check_extensions_list (self, extensions): ext.define_macros = [] ext.undef_macros = [] for macro in macros: - if not (type(macro) is TupleType and - 1 <= len(macro) <= 2): + if not (isinstance(macro, tuple) and len(macro) in (1, 2)): raise DistutilsSetupError, \ ("'macros' element of build info dict " "must be 1- or 2-tuple") @@ -428,12 +417,7 @@ def check_extensions_list (self, extensions): extensions[i] = ext - # for extensions - - # check_extensions_list () - - - def get_source_files (self): + def get_source_files(self): self.check_extensions_list(self.extensions) filenames = [] @@ -443,9 +427,7 @@ def get_source_files (self): return filenames - - def get_outputs (self): - + def get_outputs(self): # Sanity check the 'extensions' list -- can't assume this is being # done in the same run as a 'build_extensions()' call (in fact, we # can probably assume that it *isn't*!). @@ -461,8 +443,6 @@ def get_outputs (self): self.get_ext_filename(fullname))) return outputs - # get_outputs () - def build_extensions(self): # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index dbec65e8d1..98ae8cf3b4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -7,6 +7,8 @@ from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig +from distutils.tests import support +from distutils.errors import DistutilsSetupError import unittest from test import test_support @@ -15,10 +17,13 @@ # Don't load the xx module more than once. ALREADY_TESTED = False -class BuildExtTestCase(unittest.TestCase): +class BuildExtTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path + super(BuildExtTestCase, self).setUp() self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) @@ -74,6 +79,7 @@ def tearDown(self): sys.path = self.sys_path # XXX on Windows the test leaves a directory with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') + super(BuildExtTestCase, self).tearDown() def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) @@ -96,6 +102,130 @@ def test_solaris_enable_shared(self): # make sur we get some lobrary dirs under solaris self.assert_(len(cmd.library_dirs) > 0) + def test_finalize_options(self): + # Make sure Python's include directories (for Python.h, pyconfig.h, + # etc.) are in the include search path. + modules = [Extension('foo', ['xxx'])] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.finalize_options() + + from distutils import sysconfig + py_include = sysconfig.get_python_inc() + self.assert_(py_include in cmd.include_dirs) + + plat_py_include = sysconfig.get_python_inc(plat_specific=1) + self.assert_(plat_py_include in cmd.include_dirs) + + # make sure cmd.libraries is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.libraries = 'my_lib' + cmd.finalize_options() + self.assertEquals(cmd.libraries, ['my_lib']) + + # make sure cmd.library_dirs is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.library_dirs = 'my_lib_dir' + cmd.finalize_options() + self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + + # make sure rpath is turned into a list + # if it's a list of os.pathsep's paths + cmd = build_ext(dist) + cmd.rpath = os.pathsep.join(['one', 'two']) + cmd.finalize_options() + self.assertEquals(cmd.rpath, ['one', 'two']) + + # XXX more tests to perform for win32 + + # make sure define is turned into 2-tuples + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.define = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + + # make sure undef is turned into a list of + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.undef = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.undef, ['one', 'two']) + + # make sure swig_opts is turned into a list + cmd = build_ext(dist) + cmd.swig_opts = None + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, []) + + cmd = build_ext(dist) + cmd.swig_opts = '1 2' + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, ['1', '2']) + + def test_check_extensions_list(self): + dist = Distribution() + cmd = build_ext(dist) + cmd.finalize_options() + + #'extensions' option must be a list of Extension instances + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, 'foo') + + # each element of 'ext_modules' option must be an + # Extension instance or 2-tuple + exts = [('bar', 'foo', 'bar'), 'foo'] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # first element of each tuple in 'ext_modules' + # must be the extension name (a string) and match + # a python dotted-separated name + exts = [('foo-bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # second element of each tuple in 'ext_modules' + # must be a ary (build info) + exts = [('foo.bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # ok this one should pass + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar'})] + cmd.check_extensions_list(exts) + ext = exts[0] + self.assert_(isinstance(ext, Extension)) + + # check_extensions_list adds in ext the values passed + # when they are in ('include_dirs', 'library_dirs', 'libraries' + # 'extra_objects', 'extra_compile_args', 'extra_link_args') + self.assertEquals(ext.libraries, 'foo') + self.assert_(not hasattr(ext, 'some')) + + # 'macros' element of build info dict must be 1- or 2-tuple + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar', 'macros': [('1', '2', '3'), 'foo']})] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + exts[0][1]['macros'] = [('1', '2'), ('3',)] + cmd.check_extensions_list(exts) + self.assertEquals(exts[0].undef_macros, ['3']) + self.assertEquals(exts[0].define_macros, [('1', '2')]) + + def test_get_source_files(self): + modules = [Extension('foo', ['xxx'])] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(cmd.get_source_files(), ['xxx']) + + def test_get_outputs(self): + modules = [Extension('foo', ['xxx'])] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(len(cmd.get_outputs()), 1) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 7edd653b77f93b3d5fabdf7f419d90b86d1db93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 10:34:01 +0000 Subject: [PATCH 2277/8469] Merged revisions 72531 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72531 | tarek.ziade | 2009-05-10 12:12:08 +0200 (Sun, 10 May 2009) | 1 line fixed #5984 and improved test coverage ........ --- command/build_ext.py | 23 ++++---- tests/test_build_ext.py | 128 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 14 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index ade95be229..d3668e9f4c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -329,7 +329,7 @@ def run(self): self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name,value) in self.define: + for (name, value) in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -365,22 +365,24 @@ def check_extensions_list(self, extensions): continue # OK! (assume type-checking done # by Extension constructor) - (ext_name, build_info) = ext - log.warn("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name) - if not isinstance(ext, tuple) and len(ext) != 2: + if not isinstance(ext, tuple) or len(ext) != 2: raise DistutilsSetupError( "each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") + ext_name, build_info = ext + + log.warn(("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance" % ext_name)) + if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): raise DistutilsSetupError( "first element of each tuple in 'ext_modules' " "must be the extension name (a string)") - if not instance(build_info, DictionaryType): + if not isinstance(build_info, dict): raise DistutilsSetupError( "second element of each tuple in 'ext_modules' " "must be a dictionary (build info)") @@ -391,11 +393,8 @@ def check_extensions_list(self, extensions): # Easy stuff: one-to-one mapping from dict elements to # instance attributes. - for key in ('include_dirs', - 'library_dirs', - 'libraries', - 'extra_objects', - 'extra_compile_args', + for key in ('include_dirs', 'library_dirs', 'libraries', + 'extra_objects', 'extra_compile_args', 'extra_link_args'): val = build_info.get(key) if val is not None: diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e4a02391af..c22be2ac09 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -10,8 +10,8 @@ from distutils.tests.support import TempdirManager from distutils.tests.support import LoggingSilencer from distutils.extension import Extension -from distutils.errors import UnknownFileError -from distutils.errors import CompileError +from distutils.errors import (UnknownFileError, DistutilsSetupError, + CompileError) import unittest from test import support @@ -165,6 +165,130 @@ def test_optional_extension(self): cmd.ensure_finalized() cmd.run() # should pass + def test_finalize_options(self): + # Make sure Python's include directories (for Python.h, pyconfig.h, + # etc.) are in the include search path. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.finalize_options() + + from distutils import sysconfig + py_include = sysconfig.get_python_inc() + self.assert_(py_include in cmd.include_dirs) + + plat_py_include = sysconfig.get_python_inc(plat_specific=1) + self.assert_(plat_py_include in cmd.include_dirs) + + # make sure cmd.libraries is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.libraries = 'my_lib' + cmd.finalize_options() + self.assertEquals(cmd.libraries, ['my_lib']) + + # make sure cmd.library_dirs is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.library_dirs = 'my_lib_dir' + cmd.finalize_options() + self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + + # make sure rpath is turned into a list + # if it's a list of os.pathsep's paths + cmd = build_ext(dist) + cmd.rpath = os.pathsep.join(['one', 'two']) + cmd.finalize_options() + self.assertEquals(cmd.rpath, ['one', 'two']) + + # XXX more tests to perform for win32 + + # make sure define is turned into 2-tuples + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.define = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + + # make sure undef is turned into a list of + # strings if they are ','-separated strings + cmd = build_ext(dist) + cmd.undef = 'one,two' + cmd.finalize_options() + self.assertEquals(cmd.undef, ['one', 'two']) + + # make sure swig_opts is turned into a list + cmd = build_ext(dist) + cmd.swig_opts = None + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, []) + + cmd = build_ext(dist) + cmd.swig_opts = '1 2' + cmd.finalize_options() + self.assertEquals(cmd.swig_opts, ['1', '2']) + + def test_check_extensions_list(self): + dist = Distribution() + cmd = build_ext(dist) + cmd.finalize_options() + + #'extensions' option must be a list of Extension instances + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, 'foo') + + # each element of 'ext_modules' option must be an + # Extension instance or 2-tuple + exts = [('bar', 'foo', 'bar'), 'foo'] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # first element of each tuple in 'ext_modules' + # must be the extension name (a string) and match + # a python dotted-separated name + exts = [('foo-bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # second element of each tuple in 'ext_modules' + # must be a ary (build info) + exts = [('foo.bar', '')] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + # ok this one should pass + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar'})] + cmd.check_extensions_list(exts) + ext = exts[0] + self.assert_(isinstance(ext, Extension)) + + # check_extensions_list adds in ext the values passed + # when they are in ('include_dirs', 'library_dirs', 'libraries' + # 'extra_objects', 'extra_compile_args', 'extra_link_args') + self.assertEquals(ext.libraries, 'foo') + self.assert_(not hasattr(ext, 'some')) + + # 'macros' element of build info dict must be 1- or 2-tuple + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', + 'some': 'bar', 'macros': [('1', '2', '3'), 'foo']})] + self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) + + exts[0][1]['macros'] = [('1', '2'), ('3',)] + cmd.check_extensions_list(exts) + self.assertEquals(exts[0].undef_macros, ['3']) + self.assertEquals(exts[0].define_macros, [('1', '2')]) + + def test_get_source_files(self): + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(cmd.get_source_files(), ['xxx']) + + def test_get_outputs(self): + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = build_ext(dist) + cmd.ensure_finalized() + self.assertEquals(len(cmd.get_outputs()), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From a7de6ba0a764ace7b5430be8a3d709204850df39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 11:42:46 +0000 Subject: [PATCH 2278/8469] Added tests form install_lib and pep8-fied the module --- command/install_lib.py | 40 ++++++------------- tests/test_install_lib.py | 84 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 27 deletions(-) create mode 100644 tests/test_install_lib.py diff --git a/command/install_lib.py b/command/install_lib.py index 4c62c7133a..87e3c7aa04 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import os -from types import IntType from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -17,7 +16,7 @@ else: PYTHON_SOURCE_EXTENSION = ".py" -class install_lib (Command): +class install_lib(Command): description = "install all Python modules (extensions and pure Python)" @@ -51,8 +50,7 @@ class install_lib (Command): boolean_options = ['force', 'compile', 'skip-build'] negative_opt = {'no-compile' : 'compile'} - - def initialize_options (self): + def initialize_options(self): # let the 'install' command dictate our installation directory self.install_dir = None self.build_dir = None @@ -61,8 +59,7 @@ def initialize_options (self): self.optimize = None self.skip_build = None - def finalize_options (self): - + def finalize_options(self): # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. @@ -80,15 +77,14 @@ def finalize_options (self): if self.optimize is None: self.optimize = 0 - if type(self.optimize) is not IntType: + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - assert 0 <= self.optimize <= 2 + assert self.optimize in (0, 1, 2) except (ValueError, AssertionError): raise DistutilsOptionError, "optimize must be 0, 1, or 2" - def run (self): - + def run(self): # Make sure we have built everything we need first self.build() @@ -101,20 +97,17 @@ def run (self): if outfiles is not None and self.distribution.has_pure_modules(): self.byte_compile(outfiles) - # run () - - # -- Top-level worker functions ------------------------------------ # (called from 'run()') - def build (self): + def build(self): if not self.skip_build: if self.distribution.has_pure_modules(): self.run_command('build_py') if self.distribution.has_ext_modules(): self.run_command('build_ext') - def install (self): + def install(self): if os.path.isdir(self.build_dir): outfiles = self.copy_tree(self.build_dir, self.install_dir) else: @@ -123,7 +116,7 @@ def install (self): return return outfiles - def byte_compile (self, files): + def byte_compile(self, files): from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, @@ -144,8 +137,7 @@ def byte_compile (self, files): # -- Utility methods ----------------------------------------------- - def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): - + def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir): if not has_any: return [] @@ -160,9 +152,7 @@ def _mutate_outputs (self, has_any, build_cmd, cmd_option, output_dir): return outputs - # _mutate_outputs () - - def _bytecode_filenames (self, py_filenames): + def _bytecode_filenames(self, py_filenames): bytecode_files = [] for py_file in py_filenames: # Since build_py handles package data installation, the @@ -182,7 +172,7 @@ def _bytecode_filenames (self, py_filenames): # -- External interface -------------------------------------------- # (called by outsiders) - def get_outputs (self): + def get_outputs(self): """Return the list of files that would be installed if this command were actually run. Not affected by the "dry-run" flag or whether modules have actually been built yet. @@ -203,9 +193,7 @@ def get_outputs (self): return pure_outputs + bytecode_outputs + ext_outputs - # get_outputs () - - def get_inputs (self): + def get_inputs(self): """Get the list of files that are input to this command, ie. the files that get installed as they are named in the build tree. The files in this list correspond one-to-one to the output @@ -222,5 +210,3 @@ def get_inputs (self): inputs.extend(build_ext.get_outputs()) return inputs - -# class install_lib diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py new file mode 100644 index 0000000000..69a24faf71 --- /dev/null +++ b/tests/test_install_lib.py @@ -0,0 +1,84 @@ +"""Tests for distutils.command.install_data.""" +import sys +import os +import unittest + +from distutils.command.install_lib import install_lib +from distutils.extension import Extension +from distutils.tests import support +from distutils.errors import DistutilsOptionError + +class InstallLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + cmd.finalize_options() + self.assertEquals(cmd.compile, 1) + self.assertEquals(cmd.optimize, 0) + + # optimize must be 0, 1, or 2 + cmd.optimize = 'foo' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + cmd.optimize = '4' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + cmd.optimize = '2' + cmd.finalize_options() + self.assertEquals(cmd.optimize, 2) + + def test_byte_compile(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = cmd.optimize = 1 + + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.byte_compile([f]) + self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + + def test_get_outputs(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = pkg_dir + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.distribution.py_modules = [pkg_dir] + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = [pkg_dir] + cmd.distribution.script_name = 'setup.py' + + # get_output should return 4 elements + self.assertEquals(len(cmd.get_outputs()), 4) + + def test_get_inputs(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = pkg_dir + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.distribution.py_modules = [pkg_dir] + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = [pkg_dir] + cmd.distribution.script_name = 'setup.py' + + # get_input should return 2 elements + self.assertEquals(len(cmd.get_inputs()), 2) + + +def test_suite(): + return unittest.makeSuite(InstallLibTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From df1988a14be1c71891e64a2705f71691d1a8dfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 11:45:41 +0000 Subject: [PATCH 2279/8469] Merged revisions 72535 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72535 | tarek.ziade | 2009-05-10 13:42:46 +0200 (Sun, 10 May 2009) | 1 line Added tests form install_lib and pep8-fied the module ........ --- command/install_lib.py | 6 +-- tests/test_install_lib.py | 84 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 tests/test_install_lib.py diff --git a/command/install_lib.py b/command/install_lib.py index 94895f4269..022efa48fc 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -5,7 +5,7 @@ __revision__ = "$Id$" -import sys, os +import os from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -57,7 +57,6 @@ def initialize_options(self): self.skip_build = None def finalize_options(self): - # Get all the information we need to install pure Python modules # from the umbrella 'install' command -- build (source) directory, # install (target) directory, and whether to compile .py files. @@ -78,7 +77,7 @@ def finalize_options(self): if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - assert 0 <= self.optimize <= 2 + assert self.optimize in (0, 1, 2) except (ValueError, AssertionError): raise DistutilsOptionError("optimize must be 0, 1, or 2") @@ -95,7 +94,6 @@ def run(self): if outfiles is not None and self.distribution.has_pure_modules(): self.byte_compile(outfiles) - # -- Top-level worker functions ------------------------------------ # (called from 'run()') diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py new file mode 100644 index 0000000000..69a24faf71 --- /dev/null +++ b/tests/test_install_lib.py @@ -0,0 +1,84 @@ +"""Tests for distutils.command.install_data.""" +import sys +import os +import unittest + +from distutils.command.install_lib import install_lib +from distutils.extension import Extension +from distutils.tests import support +from distutils.errors import DistutilsOptionError + +class InstallLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + cmd.finalize_options() + self.assertEquals(cmd.compile, 1) + self.assertEquals(cmd.optimize, 0) + + # optimize must be 0, 1, or 2 + cmd.optimize = 'foo' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + cmd.optimize = '4' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + cmd.optimize = '2' + cmd.finalize_options() + self.assertEquals(cmd.optimize, 2) + + def test_byte_compile(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = cmd.optimize = 1 + + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.byte_compile([f]) + self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + + def test_get_outputs(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = pkg_dir + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.distribution.py_modules = [pkg_dir] + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = [pkg_dir] + cmd.distribution.script_name = 'setup.py' + + # get_output should return 4 elements + self.assertEquals(len(cmd.get_outputs()), 4) + + def test_get_inputs(self): + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = pkg_dir + f = os.path.join(pkg_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.distribution.py_modules = [pkg_dir] + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = [pkg_dir] + cmd.distribution.script_name = 'setup.py' + + # get_input should return 2 elements + self.assertEquals(len(cmd.get_inputs()), 2) + + +def test_suite(): + return unittest.makeSuite(InstallLibTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From a440b1ce0ae7a9e9ca14015c4d69b8e08b35c9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 11:59:30 +0000 Subject: [PATCH 2280/8469] refactored test_sysconfig so it uses test.test_support.EnvironmentVarGuard --- tests/support.py | 11 +++++++++++ tests/test_sysconfig.py | 27 ++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/support.py b/tests/support.py index 578cf40c09..668edf9f5a 100644 --- a/tests/support.py +++ b/tests/support.py @@ -5,6 +5,7 @@ from distutils import log from distutils.core import Distribution +from test.test_support import EnvironmentVarGuard class LoggingSilencer(object): @@ -82,3 +83,13 @@ def __init__(self, **kwargs): def ensure_finalized(self): pass + +class EnvironGuard(object): + + def setUp(self): + super(EnvironGuard, self).setUp() + self.environ = EnvironmentVarGuard() + + def tearDown(self): + self.environ.__exit__() + super(EnvironGuard, self).tearDown() diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index bf0043aa05..0a5ac2944a 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,25 +1,14 @@ -"""Tests for distutils.dist.""" - -from distutils import sysconfig -from distutils.ccompiler import get_default_compiler - +"""Tests for distutils.sysconfig.""" import os import unittest +from distutils import sysconfig +from distutils.ccompiler import get_default_compiler +from distutils.tests import support from test.test_support import TESTFN -class SysconfigTestCase(unittest.TestCase): - - def setUp(self): - self.old_flags = [('AR', os.environ.get('AR')), - ('ARFLAGS', os.environ.get('ARFLAGS'))] - - def tearDown(self): - for name, value in self.old_flags: - if value is not None: - os.environ[name] = value - elif name in os.environ: - del os.environ[name] +class SysconfigTestCase(support.EnvironGuard, + unittest.TestCase): def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() @@ -53,8 +42,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' + self.environ['AR'] = 'my_ar' + self.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: From a1969cc045a19e41674d2c929e6f802c02b2e8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 12:02:35 +0000 Subject: [PATCH 2281/8469] Merged revisions 72539 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72539 | tarek.ziade | 2009-05-10 13:59:30 +0200 (Sun, 10 May 2009) | 1 line refactored test_sysconfig so it uses test.test_support.EnvironmentVarGuard ........ --- tests/support.py | 11 +++++++++++ tests/test_sysconfig.py | 27 ++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/support.py b/tests/support.py index ab2af9a6aa..cdcbc37862 100644 --- a/tests/support.py +++ b/tests/support.py @@ -5,6 +5,7 @@ from distutils import log from distutils.core import Distribution +from test.support import EnvironmentVarGuard class LoggingSilencer(object): @@ -82,3 +83,13 @@ def __init__(self, **kwargs): def ensure_finalized(self): pass + +class EnvironGuard(object): + + def setUp(self): + super(EnvironGuard, self).setUp() + self.environ = EnvironmentVarGuard() + + def tearDown(self): + self.environ.__exit__() + super(EnvironGuard, self).tearDown() diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index f65bc725c6..322df39cf5 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,25 +1,14 @@ -"""Tests for distutils.dist.""" - -from distutils import sysconfig -from distutils.ccompiler import get_default_compiler - +"""Tests for distutils.sysconfig.""" import os import unittest +from distutils import sysconfig +from distutils.ccompiler import get_default_compiler +from distutils.tests import support from test.support import TESTFN -class SysconfigTestCase(unittest.TestCase): - - def setUp(self): - self.old_flags = [('AR', os.environ.get('AR')), - ('ARFLAGS', os.environ.get('ARFLAGS'))] - - def tearDown(self): - for name, value in self.old_flags: - if value is not None: - os.environ[name] = value - elif name in os.environ: - del os.environ[name] +class SysconfigTestCase(support.EnvironGuard, + unittest.TestCase): def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() @@ -53,8 +42,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' + self.environ['AR'] = 'my_ar' + self.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: From 5bc0f864c12dd6129366d7cc44ed23d942a2818f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 12:17:30 +0000 Subject: [PATCH 2282/8469] now using EnvironGuard everywhere --- tests/test_config.py | 29 ++++------------------------ tests/test_dist.py | 22 ++++++---------------- tests/test_util.py | 45 +++++++++++++++----------------------------- 3 files changed, 25 insertions(+), 71 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 7737538bf8..fd778d1ba5 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -49,18 +49,14 @@ class PyPIRCCommandTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): """Patches the environment.""" super(PyPIRCCommandTestCase, self).setUp() - - if os.environ.has_key('HOME'): - self._old_home = os.environ['HOME'] - else: - self._old_home = None self.tmp_dir = self.mkdtemp() - os.environ['HOME'] = self.tmp_dir + self.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() @@ -76,10 +72,6 @@ def initialize_options(self): def tearDown(self): """Removes the patch.""" - if self._old_home is None: - del os.environ['HOME'] - else: - os.environ['HOME'] = self._old_home set_threshold(self.old_threshold) super(PyPIRCCommandTestCase, self).tearDown() @@ -89,12 +81,7 @@ def test_server_registration(self): # 2. handle the old format # new format - f = open(self.rc, 'w') - try: - f.write(PYPIRC) - finally: - f.close() - + self.write_file(self.rc, PYPIRC) cmd = self._cmd(self.dist) config = cmd._read_pypirc() @@ -106,10 +93,7 @@ def test_server_registration(self): self.assertEquals(config, waited) # old format - f = open(self.rc, 'w') - f.write(PYPIRC_OLD) - f.close() - + self.write_file(self.rc, PYPIRC_OLD) config = cmd._read_pypirc() config = config.items() config.sort() @@ -119,19 +103,14 @@ def test_server_registration(self): self.assertEquals(config, waited) def test_server_empty_registration(self): - cmd = self._cmd(self.dist) rc = cmd._get_rc_file() self.assert_(not os.path.exists(rc)) - cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) content = open(rc).read() - self.assertEquals(content, WANTED) - def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index 847df7bb60..3304790b51 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -39,13 +39,13 @@ def find_config_files(self): class DistributionTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): - support.TempdirManager.setUp(self) + super(DistributionTestCase, self).setUp() self.argv = sys.argv[:] del sys.argv[1:] def tearDown(self): sys.argv[:] = self.argv - support.TempdirManager.tearDown(self) + super(DistributionTestCase, self).tearDown() def create_distribution(self, configfiles=()): d = TestDistribution() @@ -151,7 +151,8 @@ def _warn(msg): self.assertEquals(len(warns), 0) -class MetadataTestCase(support.TempdirManager, unittest.TestCase): +class MetadataTestCase(support.TempdirManager, support.EnvironGuard, + unittest.TestCase): def test_simple_metadata(self): attrs = {"name": "package", @@ -238,13 +239,6 @@ def format_metadata(self, dist): def test_custom_pydistutils(self): # fixes #2166 # make sure pydistutils.cfg is found - old = {} - for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): - value = os.environ.get(env) - old[env] = value - if value is not None: - del os.environ[env] - if os.name == 'posix': user_filename = ".pydistutils.cfg" else: @@ -261,22 +255,18 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - os.environ['HOME'] = temp_dir + self.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOME'] = temp_dir + self.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: - for key, value in old.items(): - if value is None: - continue - os.environ[key] = value os.remove(user_filename) def test_suite(): diff --git a/tests/test_util.py b/tests/test_util.py index ea7c5925b7..cee7d5263b 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -8,28 +8,23 @@ from copy import copy from distutils.errors import DistutilsPlatformError - -from distutils.util import get_platform -from distutils.util import convert_path -from distutils.util import change_root -from distutils.util import check_environ -from distutils.util import split_quoted -from distutils.util import strtobool -from distutils.util import rfc822_escape - +from distutils.util import (get_platform, convert_path, change_root, + check_environ, split_quoted, strtobool, + rfc822_escape) from distutils import util # used to patch _environ_checked from distutils.sysconfig import get_config_vars from distutils import sysconfig +from distutils.tests import support -class utilTestCase(unittest.TestCase): +class UtilTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): + super(UtilTestCase, self).setUp() # saving the environment self.name = os.name self.platform = sys.platform self.version = sys.version self.sep = os.sep - self.environ = dict(os.environ) self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive @@ -51,10 +46,6 @@ def tearDown(self): sys.platform = self.platform sys.version = self.version os.sep = self.sep - for k, v in self.environ.items(): - os.environ[k] = v - for k in set(os.environ) - set(self.environ): - del os.environ[k] os.path.join = self.join os.path.isabs = self.isabs os.path.splitdrive = self.splitdrive @@ -63,6 +54,7 @@ def tearDown(self): else: del os.uname sysconfig._config_vars = copy(self._config_vars) + super(UtilTestCase, self).tearDown() def _set_uname(self, uname): self._uname = uname @@ -102,7 +94,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -110,7 +102,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -214,21 +206,14 @@ def test_check_environ(self): # posix without HOME if os.name == 'posix': # this test won't run on windows - old_home = os.environ.get('HOME') - try: - check_environ() - import pwd - self.assertEquals(os.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) - finally: - if old_home is not None: - os.environ['HOME'] = old_home - else: - del os.environ['HOME'] + check_environ() + import pwd + self.assertEquals(self.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(os.environ['PLAT'], get_platform()) + self.assertEquals(self.environ['PLAT'], get_platform()) self.assertEquals(util._environ_checked, 1) def test_split_quoted(self): @@ -253,7 +238,7 @@ def test_rfc822_escape(self): self.assertEquals(res, wanted) def test_suite(): - return unittest.makeSuite(utilTestCase) + return unittest.makeSuite(UtilTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") From 08fd7deaae5c8a866f5f5efe67efd104e632ec96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 12:20:44 +0000 Subject: [PATCH 2283/8469] Merged revisions 72543 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72543 | tarek.ziade | 2009-05-10 14:17:30 +0200 (Sun, 10 May 2009) | 1 line now using EnvironGuard everywhere ........ --- tests/test_config.py | 29 ++++------------------------ tests/test_dist.py | 20 ++++++-------------- tests/test_util.py | 45 +++++++++++++++----------------------------- 3 files changed, 25 insertions(+), 69 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 7506f93227..0f97cf7a5e 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -48,18 +48,14 @@ class PyPIRCCommandTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): """Patches the environment.""" super(PyPIRCCommandTestCase, self).setUp() - - if 'HOME' in os.environ: - self._old_home = os.environ['HOME'] - else: - self._old_home = None self.tmp_dir = self.mkdtemp() - os.environ['HOME'] = self.tmp_dir + self.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() @@ -75,10 +71,6 @@ def initialize_options(self): def tearDown(self): """Removes the patch.""" - if self._old_home is None: - del os.environ['HOME'] - else: - os.environ['HOME'] = self._old_home set_threshold(self.old_threshold) super(PyPIRCCommandTestCase, self).tearDown() @@ -88,12 +80,7 @@ def test_server_registration(self): # 2. handle the old format # new format - f = open(self.rc, 'w') - try: - f.write(PYPIRC) - finally: - f.close() - + self.write_file(self.rc, PYPIRC) cmd = self._cmd(self.dist) config = cmd._read_pypirc() @@ -104,10 +91,7 @@ def test_server_registration(self): self.assertEquals(config, waited) # old format - f = open(self.rc, 'w') - f.write(PYPIRC_OLD) - f.close() - + self.write_file(self.rc, PYPIRC_OLD) config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), @@ -116,19 +100,14 @@ def test_server_registration(self): self.assertEquals(config, waited) def test_server_empty_registration(self): - cmd = self._cmd(self.dist) rc = cmd._get_rc_file() self.assert_(not os.path.exists(rc)) - cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) content = open(rc).read() - self.assertEquals(content, WANTED) - def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index 3ac0fdd1e1..092bd14f93 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -38,11 +38,13 @@ def find_config_files(self): class DistributionTestCase(unittest.TestCase): def setUp(self): + super(DistributionTestCase, self).setUp() self.argv = sys.argv[:] del sys.argv[1:] def tearDown(self): sys.argv[:] = self.argv + super(DistributionTestCase, self).tearDown() def create_distribution(self, configfiles=()): d = TestDistribution() @@ -121,7 +123,8 @@ def _warn(msg): self.assertEquals(len(warns), 0) -class MetadataTestCase(support.TempdirManager, unittest.TestCase): +class MetadataTestCase(support.TempdirManager, support.EnvironGuard, + unittest.TestCase): def test_simple_metadata(self): attrs = {"name": "package", @@ -208,13 +211,6 @@ def format_metadata(self, dist): def test_custom_pydistutils(self): # fixes #2166 # make sure pydistutils.cfg is found - old = {} - for env in ('HOME', 'HOMEPATH', 'HOMEDRIVE'): - value = os.environ.get(env) - old[env] = value - if value is not None: - del os.environ[env] - if os.name == 'posix': user_filename = ".pydistutils.cfg" else: @@ -231,22 +227,18 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - os.environ['HOME'] = temp_dir + self.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOME'] = temp_dir + self.environ['HOME'] = temp_dir files = dist.find_config_files() self.assert_(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: - for key, value in old.items(): - if value is None: - continue - os.environ[key] = value os.remove(user_filename) def test_suite(): diff --git a/tests/test_util.py b/tests/test_util.py index ea7c5925b7..cee7d5263b 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -8,28 +8,23 @@ from copy import copy from distutils.errors import DistutilsPlatformError - -from distutils.util import get_platform -from distutils.util import convert_path -from distutils.util import change_root -from distutils.util import check_environ -from distutils.util import split_quoted -from distutils.util import strtobool -from distutils.util import rfc822_escape - +from distutils.util import (get_platform, convert_path, change_root, + check_environ, split_quoted, strtobool, + rfc822_escape) from distutils import util # used to patch _environ_checked from distutils.sysconfig import get_config_vars from distutils import sysconfig +from distutils.tests import support -class utilTestCase(unittest.TestCase): +class UtilTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): + super(UtilTestCase, self).setUp() # saving the environment self.name = os.name self.platform = sys.platform self.version = sys.version self.sep = os.sep - self.environ = dict(os.environ) self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive @@ -51,10 +46,6 @@ def tearDown(self): sys.platform = self.platform sys.version = self.version os.sep = self.sep - for k, v in self.environ.items(): - os.environ[k] = v - for k in set(os.environ) - set(self.environ): - del os.environ[k] os.path.join = self.join os.path.isabs = self.isabs os.path.splitdrive = self.splitdrive @@ -63,6 +54,7 @@ def tearDown(self): else: del os.uname sysconfig._config_vars = copy(self._config_vars) + super(UtilTestCase, self).tearDown() def _set_uname(self, uname): self._uname = uname @@ -102,7 +94,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -110,7 +102,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -214,21 +206,14 @@ def test_check_environ(self): # posix without HOME if os.name == 'posix': # this test won't run on windows - old_home = os.environ.get('HOME') - try: - check_environ() - import pwd - self.assertEquals(os.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) - finally: - if old_home is not None: - os.environ['HOME'] = old_home - else: - del os.environ['HOME'] + check_environ() + import pwd + self.assertEquals(self.environ['HOME'], + pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(os.environ['PLAT'], get_platform()) + self.assertEquals(self.environ['PLAT'], get_platform()) self.assertEquals(util._environ_checked, 1) def test_split_quoted(self): @@ -253,7 +238,7 @@ def test_rfc822_escape(self): self.assertEquals(res, wanted) def test_suite(): - return unittest.makeSuite(utilTestCase) + return unittest.makeSuite(UtilTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") From f07c0de2be03f3de0a085d813069b42b71650cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 12:36:48 +0000 Subject: [PATCH 2284/8469] fixed test for all platforms --- tests/test_install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 69a24faf71..d768166829 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -57,7 +57,7 @@ def test_get_outputs(self): cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assertEquals(len(cmd.get_outputs()), 4) + self.assert_(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() From 61608597d3a2eb12e119267100a479ba2657bd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 12:38:16 +0000 Subject: [PATCH 2285/8469] Merged revisions 72547 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72547 | tarek.ziade | 2009-05-10 14:36:48 +0200 (Sun, 10 May 2009) | 1 line fixed test for all platforms ........ --- tests/test_install_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 69a24faf71..d768166829 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -57,7 +57,7 @@ def test_get_outputs(self): cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assertEquals(len(cmd.get_outputs()), 4) + self.assert_(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() From faf53a7e22608dcd7399ef71fb5b6bcc3e126e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 21:27:55 +0000 Subject: [PATCH 2286/8469] fixed test_build_ext for win32 --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index dab9712a56..54d6b96d34 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -192,7 +192,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + self.assert_('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths From f2e737ac9bcefdd21eaf377af03fb370b23c1997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 21:31:23 +0000 Subject: [PATCH 2287/8469] Merged revisions 72552 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72552 | tarek.ziade | 2009-05-10 23:27:55 +0200 (Sun, 10 May 2009) | 1 line fixed test_build_ext for win32 ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index c22be2ac09..6f71a4ab12 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -192,7 +192,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + self.assert_('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths From fb904cc2f4a3dc797b02f2d0fb8ad5684d35cd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 10 May 2009 21:33:09 +0000 Subject: [PATCH 2288/8469] Merged revisions 72552 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72552 | tarek.ziade | 2009-05-10 23:27:55 +0200 (Sun, 10 May 2009) | 1 line fixed test_build_ext for win32 ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 98ae8cf3b4..dc40d13fc7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -129,7 +129,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assertEquals(cmd.library_dirs, ['my_lib_dir']) + self.assert_('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths From 364368f687f823446e11af8b83a322ebba528f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 May 2009 08:45:17 +0000 Subject: [PATCH 2289/8469] distutils.test_build_clib added a new line at the end of the file, to avoid a warning with some compilers --- tests/test_build_clib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 3c6643f354..47d85cd8b4 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -109,7 +109,7 @@ def test_run(self): cmd = build_clib(dist) foo_c = os.path.join(pkg_dir, 'foo.c') - self.write_file(foo_c, 'int main(void) { return 1;}') + self.write_file(foo_c, 'int main(void) { return 1;}\n') cmd.libraries = [('foo', {'sources': [foo_c]})] build_temp = os.path.join(pkg_dir, 'build') From 34a3ad72ee75c89f2510ecf11c65a62a759944f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 May 2009 08:49:17 +0000 Subject: [PATCH 2290/8469] Merged revisions 72560 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72560 | tarek.ziade | 2009-05-11 10:45:17 +0200 (Mon, 11 May 2009) | 1 line distutils.test_build_clib added a new line at the end of the file, to avoid a warning with some compilers ........ --- tests/test_build_clib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 3c6643f354..47d85cd8b4 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -109,7 +109,7 @@ def test_run(self): cmd = build_clib(dist) foo_c = os.path.join(pkg_dir, 'foo.c') - self.write_file(foo_c, 'int main(void) { return 1;}') + self.write_file(foo_c, 'int main(void) { return 1;}\n') cmd.libraries = [('foo', {'sources': [foo_c]})] build_temp = os.path.join(pkg_dir, 'build') From cb0eb9b3590a42eae1cd86e70345fd86d5b923dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 07:01:29 +0000 Subject: [PATCH 2291/8469] removing the assert statement so the code works when Python is run with -O --- command/install_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 87e3c7aa04..411db79cc2 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -80,7 +80,8 @@ def finalize_options(self): if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - assert self.optimize in (0, 1, 2) + if self.optimize not in (0, 1, 2): + raise AssertionError except (ValueError, AssertionError): raise DistutilsOptionError, "optimize must be 0, 1, or 2" From 57df14c3ab3980b1245a959940e5a6d20e61dfde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 07:04:51 +0000 Subject: [PATCH 2292/8469] Merged revisions 72577 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72577 | tarek.ziade | 2009-05-12 09:01:29 +0200 (Tue, 12 May 2009) | 1 line removing the assert statement so the code works when Python is run with -O ........ --- command/install_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 81107a85cb..4ea61d78dc 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -80,7 +80,8 @@ def finalize_options (self): if type(self.optimize) is not IntType: try: self.optimize = int(self.optimize) - assert 0 <= self.optimize <= 2 + if self.optimize not in (0, 1, 2): + raise AssertionError except (ValueError, AssertionError): raise DistutilsOptionError, "optimize must be 0, 1, or 2" From 5c2bbef86612775eb376d2dd50d50242c87793ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 07:06:42 +0000 Subject: [PATCH 2293/8469] Merged revisions 72577 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72577 | tarek.ziade | 2009-05-12 09:01:29 +0200 (Tue, 12 May 2009) | 1 line removing the assert statement so the code works when Python is run with -O ........ --- command/install_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/install_lib.py b/command/install_lib.py index 022efa48fc..85fb3acd4e 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -77,7 +77,8 @@ def finalize_options(self): if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - assert self.optimize in (0, 1, 2) + if self.optimize not in (0, 1, 2): + raise AssertionError except (ValueError, AssertionError): raise DistutilsOptionError("optimize must be 0, 1, or 2") From 870adffdf536f9ce4762af9f1501dc4733a529f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 17:07:14 +0000 Subject: [PATCH 2294/8469] fixed #5977: distutils build_ext.get_outputs was not using the inplace option --- command/build_ext.py | 87 +++++++++++++++++++++-------------------- tests/test_build_ext.py | 43 ++++++++++++++++++-- 2 files changed, 85 insertions(+), 45 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index dfabf91091..73fd768026 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -311,38 +311,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=self.compiler, + self._compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self.compiler) + customize_compiler(self._compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self._compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self._compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self._compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self._compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self._compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self._compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self._compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self._compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -446,9 +446,7 @@ def get_outputs(self): # "build" tree. outputs = [] for ext in self.extensions: - fullname = self.get_ext_fullname(ext.name) - outputs.append(os.path.join(self.build_lib, - self.get_ext_filename(fullname))) + outputs.append(self.get_ext_fullpath(ext.name)) return outputs def build_extensions(self): @@ -473,24 +471,9 @@ def build_extension(self, ext): "a list of source filenames") % ext.name sources = list(sources) - fullname = self.get_ext_fullname(ext.name) - if self.inplace: - # ignore build-lib -- put the compiled extension into - # the source tree along with pure Python modules - - modpath = string.split(fullname, '.') - package = string.join(modpath[0:-1], '.') - base = modpath[-1] - - build_py = self.get_finalized_command('build_py') - package_dir = build_py.get_package_dir(package) - ext_filename = os.path.join(package_dir, - self.get_ext_filename(base)) - else: - ext_filename = os.path.join(self.build_lib, - self.get_ext_filename(fullname)) + ext_path = self.get_ext_fullpath(ext.name) depends = sources + ext.depends - if not (self.force or newer_group(depends, ext_filename, 'newer')): + if not (self.force or newer_group(depends, ext_path, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: @@ -521,13 +504,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self._compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -548,10 +531,10 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self._compiler.detect_language(sources) - self.compiler.link_shared_object( - objects, ext_filename, + self._compiler.link_shared_object( + objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, @@ -653,8 +636,28 @@ def find_swig (self): # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) + def get_ext_fullpath(self, ext_name): + """Returns the path of the filename for a given extension. + + The file is located in `build_lib` or directly in the package + (inplace option). + """ + if self.inplace: + fullname = self.get_ext_fullname(ext_name) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, base) + else: + filename = self.get_ext_filename(ext_name) + return os.path.join(self.build_lib, filename) + + def get_ext_fullname(self, ext_name): + """Returns the fullname of a given extension name. - def get_ext_fullname (self, ext_name): + Adds the `package.` prefix""" if self.package is None: return ext_name else: @@ -701,7 +704,7 @@ def get_libraries (self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self._compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 54d6b96d34..5cdfc2a9eb 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -113,7 +113,7 @@ def test_solaris_enable_shared(self): else: _config_vars['Py_ENABLE_SHARED'] = old_var - # make sur we get some lobrary dirs under solaris + # make sure we get some library dirs under solaris self.assert_(len(cmd.library_dirs) > 0) def test_user_site(self): @@ -282,13 +282,50 @@ def test_get_source_files(self): cmd.ensure_finalized() self.assertEquals(cmd.get_source_files(), ['xxx']) + def test_compiler_option(self): + # cmd.compiler is an option and + # should not be overriden by a compiler instance + # when the command is run + dist = Distribution() + cmd = build_ext(dist) + cmd.compiler = 'unix' + cmd.ensure_finalized() + cmd.run() + self.assertEquals(cmd.compiler, 'unix') + def test_get_outputs(self): - modules = [Extension('foo', ['xxx'], optional=False)] - dist = Distribution({'name': 'xx', 'ext_modules': modules}) + tmp_dir = self.mkdtemp() + c_file = os.path.join(tmp_dir, 'foo.c') + self.write_file(c_file, '') + ext = Extension('foo', [c_file], optional=False) + dist = Distribution({'name': 'xx', + 'ext_modules': [ext]}) cmd = build_ext(dist) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) + if os.name == "nt": + cmd.debug = sys.executable.endswith("_d.exe") + + cmd.build_lib = os.path.join(self.tmp_dir, 'build') + cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') + + # issue #5977 : distutils build_ext.get_outputs + # returns wrong result with --inplace + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, os.getcwd()) + + cmd.inplace = 0 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, cmd.build_lib) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 22a803701f441d9cc088ceb95c6c9559180158dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 17:11:54 +0000 Subject: [PATCH 2295/8469] Merged revisions 72585 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72585 | tarek.ziade | 2009-05-12 19:07:14 +0200 (Tue, 12 May 2009) | 1 line fixed #5977: distutils build_ext.get_outputs was not using the inplace option ........ --- command/build_ext.py | 87 +++++++++++++++++++++-------------------- tests/support.py | 12 ++++++ tests/test_build_ext.py | 43 ++++++++++++++++++-- 3 files changed, 97 insertions(+), 45 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c03951cb12..c611ad48c0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -303,38 +303,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=self.compiler, + self._compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self.compiler) + customize_compiler(self._compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self._compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self._compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self._compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self._compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self._compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self._compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self._compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self._compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -438,9 +438,7 @@ def get_outputs(self): # "build" tree. outputs = [] for ext in self.extensions: - fullname = self.get_ext_fullname(ext.name) - outputs.append(os.path.join(self.build_lib, - self.get_ext_filename(fullname))) + outputs.append(self.get_ext_fullpath(ext.name)) return outputs def build_extensions(self): @@ -459,24 +457,9 @@ def build_extension(self, ext): "a list of source filenames") % ext.name sources = list(sources) - fullname = self.get_ext_fullname(ext.name) - if self.inplace: - # ignore build-lib -- put the compiled extension into - # the source tree along with pure Python modules - - modpath = string.split(fullname, '.') - package = string.join(modpath[0:-1], '.') - base = modpath[-1] - - build_py = self.get_finalized_command('build_py') - package_dir = build_py.get_package_dir(package) - ext_filename = os.path.join(package_dir, - self.get_ext_filename(base)) - else: - ext_filename = os.path.join(self.build_lib, - self.get_ext_filename(fullname)) + ext_path = self.get_ext_fullpath(ext.name) depends = sources + ext.depends - if not (self.force or newer_group(depends, ext_filename, 'newer')): + if not (self.force or newer_group(depends, ext_path, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: @@ -507,13 +490,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self._compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -534,10 +517,10 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self._compiler.detect_language(sources) - self.compiler.link_shared_object( - objects, ext_filename, + self._compiler.link_shared_object( + objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, @@ -639,8 +622,28 @@ def find_swig (self): # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) + def get_ext_fullpath(self, ext_name): + """Returns the path of the filename for a given extension. + + The file is located in `build_lib` or directly in the package + (inplace option). + """ + if self.inplace: + fullname = self.get_ext_fullname(ext_name) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, base) + else: + filename = self.get_ext_filename(ext_name) + return os.path.join(self.build_lib, filename) + + def get_ext_fullname(self, ext_name): + """Returns the fullname of a given extension name. - def get_ext_fullname (self, ext_name): + Adds the `package.` prefix""" if self.package is None: return ext_name else: @@ -687,7 +690,7 @@ def get_libraries (self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self._compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' diff --git a/tests/support.py b/tests/support.py index 475ceee598..d24a18ea0e 100644 --- a/tests/support.py +++ b/tests/support.py @@ -42,6 +42,18 @@ def mkdtemp(self): self.tempdirs.append(d) return d + def write_file(self, path, content='xxx'): + """Writes a file in the given path. + + path can be a string or a sequence. + """ + if isinstance(path, (list, tuple)): + path = os.path.join(*path) + f = open(path, 'w') + try: + f.write(content) + finally: + f.close() class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index dc40d13fc7..8889798c88 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -99,7 +99,7 @@ def test_solaris_enable_shared(self): else: _config_vars['Py_ENABLE_SHARED'] = old_var - # make sur we get some lobrary dirs under solaris + # make sure we get some library dirs under solaris self.assert_(len(cmd.library_dirs) > 0) def test_finalize_options(self): @@ -219,13 +219,50 @@ def test_get_source_files(self): cmd.ensure_finalized() self.assertEquals(cmd.get_source_files(), ['xxx']) + def test_compiler_option(self): + # cmd.compiler is an option and + # should not be overriden by a compiler instance + # when the command is run + dist = Distribution() + cmd = build_ext(dist) + cmd.compiler = 'unix' + cmd.ensure_finalized() + cmd.run() + self.assertEquals(cmd.compiler, 'unix') + def test_get_outputs(self): - modules = [Extension('foo', ['xxx'])] - dist = Distribution({'name': 'xx', 'ext_modules': modules}) + tmp_dir = self.mkdtemp() + c_file = os.path.join(tmp_dir, 'foo.c') + self.write_file(c_file, '') + ext = Extension('foo', [c_file]) + dist = Distribution({'name': 'xx', + 'ext_modules': [ext]}) cmd = build_ext(dist) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) + if os.name == "nt": + cmd.debug = sys.executable.endswith("_d.exe") + + cmd.build_lib = os.path.join(self.tmp_dir, 'build') + cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') + + # issue #5977 : distutils build_ext.get_outputs + # returns wrong result with --inplace + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, os.getcwd()) + + cmd.inplace = 0 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, cmd.build_lib) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 8120d37484b292b246b7d0673a9faa0262a7696d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 17:14:01 +0000 Subject: [PATCH 2296/8469] Merged revisions 72585 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72585 | tarek.ziade | 2009-05-12 19:07:14 +0200 (Tue, 12 May 2009) | 1 line fixed #5977: distutils build_ext.get_outputs was not using the inplace option ........ --- command/build_ext.py | 85 +++++++++++++++++++++-------------------- tests/test_build_ext.py | 43 +++++++++++++++++++-- 2 files changed, 84 insertions(+), 44 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index d3668e9f4c..e305bde913 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -310,38 +310,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=self.compiler, + self._compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self.compiler) + customize_compiler(self._compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self._compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self._compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self._compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self._compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self._compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self._compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self._compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self._compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -444,9 +444,7 @@ def get_outputs(self): # "build" tree. outputs = [] for ext in self.extensions: - fullname = self.get_ext_fullname(ext.name) - outputs.append(os.path.join(self.build_lib, - self.get_ext_filename(fullname))) + outputs.append(self.get_ext_fullpath(ext.name)) return outputs def build_extensions(self): @@ -471,24 +469,9 @@ def build_extension(self, ext): "a list of source filenames" % ext.name) sources = list(sources) - fullname = self.get_ext_fullname(ext.name) - if self.inplace: - # ignore build-lib -- put the compiled extension into - # the source tree along with pure Python modules - - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - - build_py = self.get_finalized_command('build_py') - package_dir = build_py.get_package_dir(package) - ext_filename = os.path.join(package_dir, - self.get_ext_filename(base)) - else: - ext_filename = os.path.join(self.build_lib, - self.get_ext_filename(fullname)) + ext_path = self.get_ext_fullpath(ext.name) depends = sources + ext.depends - if not (self.force or newer_group(depends, ext_filename, 'newer')): + if not (self.force or newer_group(depends, ext_path, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: @@ -519,13 +502,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self._compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -546,10 +529,10 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self._compiler.detect_language(sources) - self.compiler.link_shared_object( - objects, ext_filename, + self._compiler.link_shared_object( + objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, @@ -640,8 +623,28 @@ def find_swig(self): # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) + def get_ext_fullpath(self, ext_name): + """Returns the path of the filename for a given extension. + + The file is located in `build_lib` or directly in the package + (inplace option). + """ + if self.inplace: + fullname = self.get_ext_fullname(ext_name) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, base) + else: + filename = self.get_ext_filename(ext_name) + return os.path.join(self.build_lib, filename) def get_ext_fullname(self, ext_name): + """Returns the fullname of a given extension name. + + Adds the `package.` prefix""" if self.package is None: return ext_name else: @@ -686,7 +689,7 @@ def get_libraries(self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self._compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6f71a4ab12..86064fccc1 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -113,7 +113,7 @@ def test_solaris_enable_shared(self): else: _config_vars['Py_ENABLE_SHARED'] = old_var - # make sur we get some lobrary dirs under solaris + # make sure we get some library dirs under solaris self.assert_(len(cmd.library_dirs) > 0) def test_user_site(self): @@ -282,13 +282,50 @@ def test_get_source_files(self): cmd.ensure_finalized() self.assertEquals(cmd.get_source_files(), ['xxx']) + def test_compiler_option(self): + # cmd.compiler is an option and + # should not be overriden by a compiler instance + # when the command is run + dist = Distribution() + cmd = build_ext(dist) + cmd.compiler = 'unix' + cmd.ensure_finalized() + cmd.run() + self.assertEquals(cmd.compiler, 'unix') + def test_get_outputs(self): - modules = [Extension('foo', ['xxx'], optional=False)] - dist = Distribution({'name': 'xx', 'ext_modules': modules}) + tmp_dir = self.mkdtemp() + c_file = os.path.join(tmp_dir, 'foo.c') + self.write_file(c_file, '') + ext = Extension('foo', [c_file], optional=False) + dist = Distribution({'name': 'xx', + 'ext_modules': [ext]}) cmd = build_ext(dist) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) + if os.name == "nt": + cmd.debug = sys.executable.endswith("_d.exe") + + cmd.build_lib = os.path.join(self.tmp_dir, 'build') + cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') + + # issue #5977 : distutils build_ext.get_outputs + # returns wrong result with --inplace + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, os.getcwd()) + + cmd.inplace = 0 + cmd.run() + so_file = cmd.get_outputs()[0] + self.assert_(os.path.exists(so_file)) + so_dir = os.path.dirname(so_file) + self.assertEquals(so_dir, cmd.build_lib) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 5042c7cc1026361bd2ce98f951a19ad2f3ece578 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 12 May 2009 21:06:05 +0000 Subject: [PATCH 2297/8469] the compiler attribute is used in setup.py; can't rename --- command/build_ext.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 73fd768026..10d50fade7 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -311,38 +311,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self._compiler = new_compiler(compiler=self.compiler, + self.compiler = new_compiler(compiler=None, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self._compiler) + customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self._compiler.initialize(self.plat_name) + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self._compiler.set_include_dirs(self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self._compiler.define_macro(name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self._compiler.undefine_macro(macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self._compiler.set_libraries(self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self._compiler.set_library_dirs(self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self._compiler.set_runtime_library_dirs(self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self._compiler.set_link_objects(self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -504,7 +504,7 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self._compiler.compile(sources, + objects = self.compiler.compile(sources, output_dir=self.build_temp, macros=macros, include_dirs=ext.include_dirs, @@ -531,9 +531,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self._compiler.detect_language(sources) + language = ext.language or self.compiler.detect_language(sources) - self._compiler.link_shared_object( + self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -704,7 +704,7 @@ def get_libraries (self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self._compiler, MSVCCompiler): + if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' From 431ef0a9555d0ccdd974e61a4cad5159dbdbc22a Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 12 May 2009 21:20:41 +0000 Subject: [PATCH 2298/8469] Merged revisions 72593 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72593 | benjamin.peterson | 2009-05-12 16:06:05 -0500 (Tue, 12 May 2009) | 1 line the compiler attribute is used in setup.py; can't rename ........ --- command/build_ext.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c611ad48c0..01bab3664f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -303,38 +303,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self._compiler = new_compiler(compiler=self.compiler, + self.compiler = new_compiler(compiler=None, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self._compiler) + customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self._compiler.initialize(self.plat_name) + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self._compiler.set_include_dirs(self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self._compiler.define_macro(name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self._compiler.undefine_macro(macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self._compiler.set_libraries(self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self._compiler.set_library_dirs(self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self._compiler.set_runtime_library_dirs(self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self._compiler.set_link_objects(self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -490,7 +490,7 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self._compiler.compile(sources, + objects = self.compiler.compile(sources, output_dir=self.build_temp, macros=macros, include_dirs=ext.include_dirs, @@ -517,9 +517,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self._compiler.detect_language(sources) + language = ext.language or self.compiler.detect_language(sources) - self._compiler.link_shared_object( + self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -690,7 +690,7 @@ def get_libraries (self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self._compiler, MSVCCompiler): + if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' From d39a44c5da79381e4ae7dd7502e8a398814072d1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 12 May 2009 21:21:26 +0000 Subject: [PATCH 2299/8469] Merged revisions 72593 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72593 | benjamin.peterson | 2009-05-12 16:06:05 -0500 (Tue, 12 May 2009) | 1 line the compiler attribute is used in setup.py; can't rename ........ --- command/build_ext.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index e305bde913..c39bd72d62 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -310,38 +310,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self._compiler = new_compiler(compiler=self.compiler, + self.compiler = new_compiler(compiler=None, verbose=self.verbose, dry_run=self.dry_run, force=self.force) - customize_compiler(self._compiler) + customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self._compiler.initialize(self.plat_name) + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self._compiler.set_include_dirs(self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self._compiler.define_macro(name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self._compiler.undefine_macro(macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self._compiler.set_libraries(self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self._compiler.set_library_dirs(self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self._compiler.set_runtime_library_dirs(self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self._compiler.set_link_objects(self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -502,7 +502,7 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self._compiler.compile(sources, + objects = self.compiler.compile(sources, output_dir=self.build_temp, macros=macros, include_dirs=ext.include_dirs, @@ -529,9 +529,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self._compiler.detect_language(sources) + language = ext.language or self.compiler.detect_language(sources) - self._compiler.link_shared_object( + self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -689,7 +689,7 @@ def get_libraries(self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self._compiler, MSVCCompiler): + if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' From f3af1e26187c79c6ff1e0a3ea442d354015654f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 13 May 2009 21:30:06 +0000 Subject: [PATCH 2300/8469] added an inifoo in the C file, to avoid a warning by the MSVC9 linker --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5cdfc2a9eb..6d3852cc4c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -296,7 +296,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, '') + self.write_file(c_file, 'void initfoo() {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 300d6e9a8f330cae08065bf5612f4c03eec5207b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 13 May 2009 22:08:54 +0000 Subject: [PATCH 2301/8469] Merged revisions 72610 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72610 | tarek.ziade | 2009-05-13 23:30:06 +0200 (Wed, 13 May 2009) | 1 line added an inifoo in the C file, to avoid a warning by the MSVC9 linker ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 8889798c88..20f0553985 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -233,7 +233,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, '') + self.write_file(c_file, 'void initfoo() {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 6378315ebc64b957142fb142058415a4210784e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 13 May 2009 22:16:03 +0000 Subject: [PATCH 2302/8469] adding void to the c function --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6d3852cc4c..45c5b39e0f 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -296,7 +296,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo() {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From fcca9f694a425f7e4c647977e32a48eda9033c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 13 May 2009 22:18:01 +0000 Subject: [PATCH 2303/8469] Merged revisions 72612 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72612 | tarek.ziade | 2009-05-14 00:16:03 +0200 (Thu, 14 May 2009) | 1 line adding void to the c function ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 20f0553985..cf254ac1c4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -233,7 +233,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo() {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 9cc675e40154417eefcd9ccc24d5284d37969387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 13 May 2009 22:20:49 +0000 Subject: [PATCH 2304/8469] Merged revisions 72610,72612 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72610 | tarek.ziade | 2009-05-13 23:30:06 +0200 (Wed, 13 May 2009) | 1 line added an inifoo in the C file, to avoid a warning by the MSVC9 linker ........ r72612 | tarek.ziade | 2009-05-14 00:16:03 +0200 (Thu, 14 May 2009) | 1 line adding void to the c function ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 86064fccc1..64ca6505c1 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -296,7 +296,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, '') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 1a7f413db150145be8fe3964d491c9ae9946be8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 12:40:59 +0000 Subject: [PATCH 2305/8469] more test coverage for distutils sdist command --- command/sdist.py | 7 +++---- tests/test_sdist.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index a9ce28a7eb..f77f52c174 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -16,19 +16,18 @@ from distutils import log from distutils.util import convert_path -def show_formats (): +def show_formats(): """Print all possible values for the 'formats' option (used by the "--help-formats" command-line option). """ from distutils.fancy_getopt import FancyGetopt from distutils.archive_util import ARCHIVE_FORMATS - formats=[] + formats = [] for format in ARCHIVE_FORMATS.keys(): formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2])) formats.sort() - pretty_printer = FancyGetopt(formats) - pretty_printer.print_help( + FancyGetopt(formats).print_help( "List of available source distribution formats:") class sdist (Command): diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 8af080f950..551357edc7 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -7,12 +7,16 @@ import sys import tempfile +from test.test_support import captured_stdout + from distutils.command.sdist import sdist +from distutils.command.sdist import show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError from distutils.spawn import find_executable from distutils.tests import support +from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ from distutils.core import setup @@ -210,6 +214,16 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + def test_show_formats(self): + with captured_stdout() as stdout: + show_formats() + + # the output should be a header line + one line per format + num_formats = len(ARCHIVE_FORMATS.keys()) + output = [line for line in stdout.getvalue().split('\n') + if line.strip().startswith('--formats=')] + self.assertEquals(len(output), num_formats) + def test_suite(): return unittest.makeSuite(sdistTestCase) From 8b08ff04c6c2e891754498db8908825b6c79444c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 12:45:48 +0000 Subject: [PATCH 2306/8469] Merged revisions 72618 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72618 | tarek.ziade | 2009-05-14 14:40:59 +0200 (Thu, 14 May 2009) | 1 line more test coverage for distutils sdist command ........ --- command/sdist.py | 7 +++---- tests/test_sdist.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 1a64d0e3c1..836b962059 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -17,19 +17,18 @@ from distutils import log from distutils.util import convert_path -def show_formats (): +def show_formats(): """Print all possible values for the 'formats' option (used by the "--help-formats" command-line option). """ from distutils.fancy_getopt import FancyGetopt from distutils.archive_util import ARCHIVE_FORMATS - formats=[] + formats = [] for format in ARCHIVE_FORMATS.keys(): formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2])) formats.sort() - pretty_printer = FancyGetopt(formats) - pretty_printer.print_help( + FancyGetopt(formats).print_help( "List of available source distribution formats:") class sdist (Command): diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 8af080f950..ec95ffb3aa 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -7,12 +7,16 @@ import sys import tempfile +from test.support import captured_stdout + from distutils.command.sdist import sdist +from distutils.command.sdist import show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError from distutils.spawn import find_executable from distutils.tests import support +from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ from distutils.core import setup @@ -210,6 +214,16 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + def test_show_formats(self): + with captured_stdout() as stdout: + show_formats() + + # the output should be a header line + one line per format + num_formats = len(ARCHIVE_FORMATS.keys()) + output = [line for line in stdout.getvalue().split('\n') + if line.strip().startswith('--formats=')] + self.assertEquals(len(output), num_formats) + def test_suite(): return unittest.makeSuite(sdistTestCase) From 6d9fe7ee5fca5acd065e820fb6ccb5ce3f665852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 14:56:14 +0000 Subject: [PATCH 2307/8469] pep8-fied distutils.command.sdist + more tests --- command/sdist.py | 59 ++++++++++++--------------------------------- tests/test_sdist.py | 24 +++++++++++++++++- 2 files changed, 39 insertions(+), 44 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f77f52c174..ab0ada1f45 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -30,7 +30,7 @@ def show_formats(): FancyGetopt(formats).print_help( "List of available source distribution formats:") -class sdist (Command): +class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -77,10 +77,10 @@ class sdist (Command): negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune' } - default_format = { 'posix': 'gztar', - 'nt': 'zip' } + default_format = {'posix': 'gztar', + 'nt': 'zip' } - def initialize_options (self): + def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. self.template = None @@ -100,8 +100,7 @@ def initialize_options (self): self.archive_files = None - - def finalize_options (self): + def finalize_options(self): if self.manifest is None: self.manifest = "MANIFEST" if self.template is None: @@ -124,9 +123,7 @@ def finalize_options (self): if self.dist_dir is None: self.dist_dir = "dist" - - def run (self): - + def run(self): # 'filelist' contains the list of files that will make up the # manifest self.filelist = FileList() @@ -148,8 +145,7 @@ def run (self): # or zipfile, or whatever. self.make_distribution() - - def check_metadata (self): + def check_metadata(self): """Ensure that all required elements of meta-data (name, version, URL, (author and author_email) or (maintainer and maintainer_email)) are supplied by the Distribution object; warn if @@ -179,17 +175,13 @@ def check_metadata (self): "or (maintainer and maintainer_email) " + "must be supplied") - # check_metadata () - - - def get_file_list (self): + def get_file_list(self): """Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options and the state of the filesystem. """ - # If we have a manifest template, see if it's newer than the # manifest; if so, we'll regenerate the manifest. template_exists = os.path.isfile(self.template) @@ -249,10 +241,7 @@ def get_file_list (self): else: self.read_manifest() - # get_file_list () - - - def add_defaults (self): + def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt - setup.py @@ -334,10 +323,7 @@ def add_defaults (self): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) - # add_defaults () - - - def read_template (self): + def read_template(self): """Read and parse manifest template file named by self.template. (usually "MANIFEST.in") The parsing and processing is done by @@ -364,10 +350,7 @@ def read_template (self): template.current_line, msg)) - # read_template () - - - def prune_file_list (self): + def prune_file_list(self): """Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") @@ -393,7 +376,7 @@ def prune_file_list (self): vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) - def write_manifest (self): + def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. @@ -402,10 +385,7 @@ def write_manifest (self): (self.manifest, self.filelist.files), "writing manifest file '%s'" % self.manifest) - # write_manifest () - - - def read_manifest (self): + def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. @@ -421,10 +401,7 @@ def read_manifest (self): self.filelist.append(line) manifest.close() - # read_manifest () - - - def make_release_tree (self, base_dir, files): + def make_release_tree(self, base_dir, files): """Create the directory tree that will become the source distribution archive. All directories implied by the filenames in 'files' are created under 'base_dir', and then we hard link or copy @@ -466,9 +443,7 @@ def make_release_tree (self, base_dir, files): self.distribution.metadata.write_pkg_info(base_dir) - # make_release_tree () - - def make_distribution (self): + def make_distribution(self): """Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. @@ -497,10 +472,8 @@ def make_distribution (self): if not self.keep_temp: dir_util.remove_tree(base_dir, dry_run=self.dry_run) - def get_archive_files (self): + def get_archive_files(self): """Return the list of archive files created when the command was run, or None if the command hasn't run yet. """ return self.archive_files - -# class sdist diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 551357edc7..4f3d4bb91d 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -13,7 +13,7 @@ from distutils.command.sdist import show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase -from distutils.errors import DistutilsExecError +from distutils.errors import DistutilsExecError, DistutilsOptionError from distutils.spawn import find_executable from distutils.tests import support from distutils.archive_util import ARCHIVE_FORMATS @@ -224,6 +224,28 @@ def test_show_formats(self): if line.strip().startswith('--formats=')] self.assertEquals(len(output), num_formats) + def test_finalize_options(self): + + dist, cmd = self.get_cmd() + cmd.finalize_options() + + # default options set by finalize + self.assertEquals(cmd.manifest, 'MANIFEST') + self.assertEquals(cmd.template, 'MANIFEST.in') + self.assertEquals(cmd.dist_dir, 'dist') + + # formats has to be a string splitable on (' ', ',') or + # a stringlist + cmd.formats = 1 + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + cmd.formats = ['zip'] + cmd.finalize_options() + + # formats has to be known + cmd.formats = 'supazipa' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + def test_suite(): return unittest.makeSuite(sdistTestCase) From 31ada7d3a3d7f87bec35033113c5a8fda4c93fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 15:21:26 +0000 Subject: [PATCH 2308/8469] Merged revisions 72624 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72624 | tarek.ziade | 2009-05-14 16:56:14 +0200 (Thu, 14 May 2009) | 1 line pep8-fied distutils.command.sdist + more tests ........ --- command/sdist.py | 11 ++++------- tests/test_sdist.py | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 836b962059..cbb77c212e 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -31,7 +31,7 @@ def show_formats(): FancyGetopt(formats).print_help( "List of available source distribution formats:") -class sdist (Command): +class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -78,8 +78,8 @@ class sdist (Command): negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune' } - default_format = { 'posix': 'gztar', - 'nt': 'zip' } + default_format = {'posix': 'gztar', + 'nt': 'zip' } def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of @@ -101,7 +101,6 @@ def initialize_options(self): self.archive_files = None - def finalize_options(self): if self.manifest is None: self.manifest = "MANIFEST" @@ -125,7 +124,6 @@ def finalize_options(self): if self.dist_dir is None: self.dist_dir = "dist" - def run(self): # 'filelist' contains the list of files that will make up the # manifest @@ -244,7 +242,6 @@ def get_file_list(self): else: self.read_manifest() - def add_defaults(self): """Add all the default files to self.filelist: - README or README.txt @@ -373,7 +370,7 @@ def prune_file_list(self): vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) - def write_manifest (self): + def write_manifest(self): """Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. diff --git a/tests/test_sdist.py b/tests/test_sdist.py index ec95ffb3aa..9e27933773 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -13,7 +13,7 @@ from distutils.command.sdist import show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase -from distutils.errors import DistutilsExecError +from distutils.errors import DistutilsExecError, DistutilsOptionError from distutils.spawn import find_executable from distutils.tests import support from distutils.archive_util import ARCHIVE_FORMATS @@ -224,6 +224,28 @@ def test_show_formats(self): if line.strip().startswith('--formats=')] self.assertEquals(len(output), num_formats) + def test_finalize_options(self): + + dist, cmd = self.get_cmd() + cmd.finalize_options() + + # default options set by finalize + self.assertEquals(cmd.manifest, 'MANIFEST') + self.assertEquals(cmd.template, 'MANIFEST.in') + self.assertEquals(cmd.dist_dir, 'dist') + + # formats has to be a string splitable on (' ', ',') or + # a stringlist + cmd.formats = 1 + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + cmd.formats = ['zip'] + cmd.finalize_options() + + # formats has to be known + cmd.formats = 'supazipa' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + def test_suite(): return unittest.makeSuite(sdistTestCase) From 904218f8a1f5be2a86fefee8fa68d19a640ba166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 20:14:13 +0000 Subject: [PATCH 2309/8469] #6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd --- tests/test_build_ext.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 45c5b39e0f..c6533ca9f7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -312,12 +312,18 @@ def test_get_outputs(self): # issue #5977 : distutils build_ext.get_outputs # returns wrong result with --inplace - cmd.inplace = 1 - cmd.run() - so_file = cmd.get_outputs()[0] + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + finally: + os.chdir(old_wd) self.assert_(os.path.exists(so_file)) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, os.getcwd()) + self.assertEquals(so_dir, other_tmp_dir) cmd.inplace = 0 cmd.run() From edb14dc6af62abfb53b444fab52b38a1e5366acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 20:17:32 +0000 Subject: [PATCH 2310/8469] Merged revisions 72636 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72636 | tarek.ziade | 2009-05-14 22:14:13 +0200 (Thu, 14 May 2009) | 1 line #6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd ........ --- tests/test_build_ext.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index cf254ac1c4..2bd2292e8c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -249,12 +249,18 @@ def test_get_outputs(self): # issue #5977 : distutils build_ext.get_outputs # returns wrong result with --inplace - cmd.inplace = 1 - cmd.run() - so_file = cmd.get_outputs()[0] + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + finally: + os.chdir(old_wd) self.assert_(os.path.exists(so_file)) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, os.getcwd()) + self.assertEquals(so_dir, other_tmp_dir) cmd.inplace = 0 cmd.run() From 15604e839e578d0b409d98f280e763621d33edb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 14 May 2009 20:20:47 +0000 Subject: [PATCH 2311/8469] Merged revisions 72636 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72636 | tarek.ziade | 2009-05-14 22:14:13 +0200 (Thu, 14 May 2009) | 1 line #6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd ........ --- tests/test_build_ext.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 64ca6505c1..6a463c0117 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -312,12 +312,18 @@ def test_get_outputs(self): # issue #5977 : distutils build_ext.get_outputs # returns wrong result with --inplace - cmd.inplace = 1 - cmd.run() - so_file = cmd.get_outputs()[0] + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] + finally: + os.chdir(old_wd) self.assert_(os.path.exists(so_file)) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, os.getcwd()) + self.assertEquals(so_dir, other_tmp_dir) cmd.inplace = 0 cmd.run() From 6f1556e53cd1edc7db121e1c0bafa91e061ca989 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 15 May 2009 17:27:30 +0000 Subject: [PATCH 2312/8469] Fix bootstrapping by removing uses of the copy module in distutils --- ccompiler.py | 11 +++++------ dist.py | 3 +-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index a56a03880e..5a9ff76d67 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -7,7 +7,6 @@ import sys, os, re from types import * -from copy import copy from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file @@ -253,7 +252,7 @@ def set_include_dirs (self, dirs): any list of standard include directories that the compiler may search by default. """ - self.include_dirs = copy (dirs) + self.include_dirs = dirs[:] def add_library (self, libname): @@ -278,7 +277,7 @@ def set_libraries (self, libnames): not affect any standard system libraries that the linker may include by default. """ - self.libraries = copy (libnames) + self.libraries = libnames[:] def add_library_dir (self, dir): @@ -294,7 +293,7 @@ def set_library_dirs (self, dirs): strings). This does not affect any standard library search path that the linker may search by default. """ - self.library_dirs = copy (dirs) + self.library_dirs = dirs[:] def add_runtime_library_dir (self, dir): @@ -309,7 +308,7 @@ def set_runtime_library_dirs (self, dirs): standard search path that the runtime linker may search by default. """ - self.runtime_library_dirs = copy (dirs) + self.runtime_library_dirs = dirs[:] def add_link_object (self, object): @@ -326,7 +325,7 @@ def set_link_objects (self, objects): files that the linker may include by default (such as system libraries). """ - self.objects = copy (objects) + self.objects = objects[:] # -- Private utility methods -------------------------------------- diff --git a/dist.py b/dist.py index 2d57ad09e9..5fe262b112 100644 --- a/dist.py +++ b/dist.py @@ -8,7 +8,6 @@ import sys, os, string, re from types import * -from copy import copy try: import warnings @@ -537,7 +536,7 @@ def _parse_command_opts (self, parser, args): # merge it in with the global negative aliases. negative_opt = self.negative_opt if hasattr(cmd_class, 'negative_opt'): - negative_opt = copy(negative_opt) + negative_opt = negative_opt.copy() negative_opt.update(cmd_class.negative_opt) # Check for help_options in command class. They have a different From fb1d44bd30704af391fa97fa93b7350a28b16826 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 15 May 2009 17:34:21 +0000 Subject: [PATCH 2313/8469] Merged revisions 72671 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72671 | antoine.pitrou | 2009-05-15 19:27:30 +0200 (ven., 15 mai 2009) | 3 lines Fix bootstrapping by removing uses of the copy module in distutils ........ --- ccompiler.py | 11 +++++------ dist.py | 3 +-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index cad663a348..875f96fac3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import sys, os, re -from copy import copy from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file @@ -233,7 +232,7 @@ def set_include_dirs(self, dirs): any list of standard include directories that the compiler may search by default. """ - self.include_dirs = copy(dirs) + self.include_dirs = dirs[:] def add_library(self, libname): """Add 'libname' to the list of libraries that will be included in @@ -257,7 +256,7 @@ def set_libraries(self, libnames): not affect any standard system libraries that the linker may include by default. """ - self.libraries = copy(libnames) + self.libraries = libnames[:] def add_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for @@ -272,7 +271,7 @@ def set_library_dirs(self, dirs): strings). This does not affect any standard library search path that the linker may search by default. """ - self.library_dirs = copy(dirs) + self.library_dirs = dirs[:] def add_runtime_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for @@ -286,7 +285,7 @@ def set_runtime_library_dirs(self, dirs): standard search path that the runtime linker may search by default. """ - self.runtime_library_dirs = copy(dirs) + self.runtime_library_dirs = dirs[:] def add_link_object(self, object): """Add 'object' to the list of object files (or analogues, such as @@ -302,7 +301,7 @@ def set_link_objects(self, objects): files that the linker may include by default (such as system libraries). """ - self.objects = copy(objects) + self.objects = objects[:] # -- Private utility methods -------------------------------------- diff --git a/dist.py b/dist.py index 7c30e8856f..91adc4d37f 100644 --- a/dist.py +++ b/dist.py @@ -7,7 +7,6 @@ __revision__ = "$Id$" import sys, os, re -from copy import copy try: import warnings @@ -521,7 +520,7 @@ def _parse_command_opts (self, parser, args): # merge it in with the global negative aliases. negative_opt = self.negative_opt if hasattr(cmd_class, 'negative_opt'): - negative_opt = copy(negative_opt) + negative_opt = negative_opt.copy() negative_opt.update(cmd_class.negative_opt) # Check for help_options in command class. They have a different From ae85790799ba86885d7aa8ae623b2584c218dddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 16 May 2009 16:37:06 +0000 Subject: [PATCH 2314/8469] #6041: sdist and register now use the check command. No more duplicate code for metadata checking --- command/register.py | 57 +++++++++++++++--------------- command/sdist.py | 56 +++++++++++++----------------- tests/support.py | 20 +++++++++++ tests/test_register.py | 79 ++++++++++++++++++++++++++++++++++++++---- tests/test_sdist.py | 39 ++++++++++++++++++--- 5 files changed, 179 insertions(+), 72 deletions(-) diff --git a/command/register.py b/command/register.py index f3463dc289..3b5b2080ec 100644 --- a/command/register.py +++ b/command/register.py @@ -9,6 +9,7 @@ import os, string, urllib2, getpass, urlparse import StringIO +from warnings import warn from distutils.core import PyPIRCCommand from distutils.errors import * @@ -20,18 +21,34 @@ class register(PyPIRCCommand): user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), + ('strict', None , + 'Will stop the registering if the meta-data are not fully compliant') ] boolean_options = PyPIRCCommand.boolean_options + [ - 'verify', 'list-classifiers'] + 'verify', 'list-classifiers', 'strict'] + + sub_commands = [('check', lambda self: True)] def initialize_options(self): PyPIRCCommand.initialize_options(self) self.list_classifiers = 0 + self.strict = 0 + + def finalize_options(self): + PyPIRCCommand.finalize_options(self) + # setting options for the `check` subcommand + check_options = {'strict': ('register', self.strict), + 'restructuredtext': ('register', 1)} + self.distribution.command_options['check'] = check_options def run(self): self.finalize_options() self._set_config() - self.check_metadata() + + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + if self.dry_run: self.verify_metadata() elif self.list_classifiers: @@ -40,34 +57,14 @@ def run(self): self.send_metadata() def check_metadata(self): - """Ensure that all required elements of meta-data (name, version, - URL, (author and author_email) or (maintainer and - maintainer_email)) are supplied by the Distribution object; warn if - any are missing. - """ - metadata = self.distribution.metadata - - missing = [] - for attr in ('name', 'version', 'url'): - if not (hasattr(metadata, attr) and getattr(metadata, attr)): - missing.append(attr) - - if missing: - self.warn("missing required meta-data: " + - string.join(missing, ", ")) - - if metadata.author: - if not metadata.author_email: - self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") - elif metadata.maintainer: - if not metadata.maintainer_email: - self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") - else: - self.warn("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") + """Deprecated API.""" + warn("distutils.command.register.check_metadata is deprecated, \ + use the check command instead", PendingDeprecationWarning) + check = self.distribution.get_command_obj('check') + check.ensure_finalized() + check.strict = self.strict + check.restructuredtext = 1 + check.run() def _set_config(self): ''' Reads the configuration file and set attributes. diff --git a/command/sdist.py b/command/sdist.py index ab0ada1f45..c21f3917b6 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -8,6 +8,8 @@ import sys from types import * from glob import glob +from warnings import warn + from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile @@ -34,6 +36,12 @@ class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" + def checking_metadata(self): + """Callable used for the check sub-command. + + Placed here so user_options can view it""" + return self.metadata_check + user_options = [ ('template=', 't', "name of manifest template file [default: MANIFEST.in]"), @@ -63,11 +71,14 @@ class sdist(Command): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), + ('medata-check', None, + "Ensure that all required elements of meta-data " + "are supplied. Warn if any missing. [default]"), ] boolean_options = ['use-defaults', 'prune', 'manifest-only', 'force-manifest', - 'keep-temp'] + 'keep-temp', 'metadata-check'] help_options = [ ('help-formats', None, @@ -80,6 +91,8 @@ class sdist(Command): default_format = {'posix': 'gztar', 'nt': 'zip' } + sub_commands = [('check', checking_metadata)] + def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. @@ -99,6 +112,7 @@ def initialize_options(self): self.dist_dir = None self.archive_files = None + self.metadata_check = 1 def finalize_options(self): if self.manifest is None: @@ -128,9 +142,9 @@ def run(self): # manifest self.filelist = FileList() - # Ensure that all required meta-data is given; warn if not (but - # don't die, it's not *that* serious!) - self.check_metadata() + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) # Do whatever it takes to get the list of files to process # (process the manifest template, read an existing manifest, @@ -146,34 +160,12 @@ def run(self): self.make_distribution() def check_metadata(self): - """Ensure that all required elements of meta-data (name, version, - URL, (author and author_email) or (maintainer and - maintainer_email)) are supplied by the Distribution object; warn if - any are missing. - """ - metadata = self.distribution.metadata - - missing = [] - for attr in ('name', 'version', 'url'): - if not (hasattr(metadata, attr) and getattr(metadata, attr)): - missing.append(attr) - - if missing: - self.warn("missing required meta-data: " + - string.join(missing, ", ")) - - if metadata.author: - if not metadata.author_email: - self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") - elif metadata.maintainer: - if not metadata.maintainer_email: - self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") - else: - self.warn("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") + """Deprecated API.""" + warn("distutils.command.sdist.check_metadata is deprecated, \ + use the check command instead", PendingDeprecationWarning) + check = self.distribution.get_command_obj('check') + check.ensure_finalized() + check.run() def get_file_list(self): """Figure out the list of files to include in the source diff --git a/tests/support.py b/tests/support.py index 668edf9f5a..bce034949e 100644 --- a/tests/support.py +++ b/tests/support.py @@ -12,11 +12,31 @@ class LoggingSilencer(object): def setUp(self): super(LoggingSilencer, self).setUp() self.threshold = log.set_threshold(log.FATAL) + # catching warnings + # when log will be replaced by logging + # we won't need such monkey-patch anymore + self._old_log = log.Log._log + log.Log._log = self._log + self.logs = [] def tearDown(self): log.set_threshold(self.threshold) + log.Log._log = self._old_log super(LoggingSilencer, self).tearDown() + def _log(self, level, msg, args): + self.logs.append((level, msg, args)) + + def get_logs(self, *levels): + def _format(msg, args): + if len(args) == 0: + return msg + return msg % args + return [_format(msg, args) for level, msg, args + in self.logs if level in levels] + + def clear_logs(self): + self.logs = [] class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. diff --git a/tests/test_register.py b/tests/test_register.py index 7da8edb5d7..91d3581373 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -4,10 +4,14 @@ import unittest import getpass import urllib2 +import warnings + +from test.test_support import check_warnings from distutils.command import register as register_module from distutils.command.register import register from distutils.core import Distribution +from distutils.errors import DistutilsSetupError from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase @@ -59,7 +63,7 @@ def open(self, req): def read(self): return 'xxx' -class registerTestCase(PyPIRCCommandTestCase): +class RegisterTestCase(PyPIRCCommandTestCase): def setUp(self): PyPIRCCommandTestCase.setUp(self) @@ -76,10 +80,11 @@ def tearDown(self): urllib2.build_opener = self.old_opener PyPIRCCommandTestCase.tearDown(self) - def _get_cmd(self): - metadata = {'url': 'xxx', 'author': 'xxx', - 'author_email': 'xxx', - 'name': 'xxx', 'version': 'xxx'} + def _get_cmd(self, metadata=None): + if metadata is None: + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} pkg_info, dist = self.create_dist(**metadata) return register(dist) @@ -184,8 +189,70 @@ def test_password_reset(self): self.assertEquals(headers['Content-length'], '290') self.assert_('tarek' in req.data) + def test_strict(self): + # testing the script option + # when on, the register command stops if + # the metadata is incomplete or if + # long_description is not reSt compliant + + # empty metadata + cmd = self._get_cmd({}) + cmd.ensure_finalized() + cmd.strict = 1 + self.assertRaises(DistutilsSetupError, cmd.run) + + # we don't test the reSt feature if docutils + # is not installed + try: + import docutils + except ImportError: + return + + # metadata are OK but long_description is broken + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': 'title\n==\n\ntext'} + + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + self.assertRaises(DistutilsSetupError, cmd.run) + + # now something that works + metadata['long_description'] = 'title\n=====\n\ntext' + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + inputs = RawInputs('1', 'tarek', 'y') + register_module.raw_input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.raw_input + + # strict is not by default + cmd = self._get_cmd() + cmd.ensure_finalized() + inputs = RawInputs('1', 'tarek', 'y') + register_module.raw_input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.raw_input + + def test_check_metadata_deprecated(self): + # makes sure make_metadata is deprecated + cmd = self._get_cmd() + with check_warnings() as w: + warnings.simplefilter("always") + cmd.check_metadata() + self.assertEquals(len(w.warnings), 1) + def test_suite(): - return unittest.makeSuite(registerTestCase) + return unittest.makeSuite(RegisterTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 4f3d4bb91d..5808ca16eb 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -6,7 +6,9 @@ from os.path import join import sys import tempfile +import warnings +from test.test_support import check_warnings from test.test_support import captured_stdout from distutils.command.sdist import sdist @@ -16,6 +18,7 @@ from distutils.errors import DistutilsExecError, DistutilsOptionError from distutils.spawn import find_executable from distutils.tests import support +from distutils.log import WARN from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ @@ -38,12 +41,12 @@ somecode%(sep)sdoc.txt """ -class sdistTestCase(PyPIRCCommandTestCase): +class SDistTestCase(PyPIRCCommandTestCase): def setUp(self): # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir - super(sdistTestCase, self).setUp() + super(SDistTestCase, self).setUp() # setting up an environment self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) @@ -57,7 +60,7 @@ def setUp(self): def tearDown(self): # back to normal os.chdir(self.old_path) - super(sdistTestCase, self).tearDown() + super(SDistTestCase, self).tearDown() def get_cmd(self, metadata=None): """Returns a cmd""" @@ -214,6 +217,34 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + def test_metadata_check_option(self): + # testing the `medata-check` option + dist, cmd = self.get_cmd(metadata={}) + + # this should raise some warnings ! + # with the `check` subcommand + cmd.ensure_finalized() + cmd.run() + warnings = self.get_logs(WARN) + self.assertEquals(len(warnings), 2) + + # trying with a complete set of metadata + self.clear_logs() + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.metadata_check = 0 + cmd.run() + warnings = self.get_logs(WARN) + self.assertEquals(len(warnings), 0) + + def test_check_metadata_deprecated(self): + # makes sure make_metadata is deprecated + dist, cmd = self.get_cmd() + with check_warnings() as w: + warnings.simplefilter("always") + cmd.check_metadata() + self.assertEquals(len(w.warnings), 1) + def test_show_formats(self): with captured_stdout() as stdout: show_formats() @@ -247,7 +278,7 @@ def test_finalize_options(self): def test_suite(): - return unittest.makeSuite(sdistTestCase) + return unittest.makeSuite(SDistTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") From 86a2297c6222d8f368ac05f7693aa32b526aae5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 16 May 2009 16:52:13 +0000 Subject: [PATCH 2315/8469] Merged revisions 72681 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72681 | tarek.ziade | 2009-05-16 18:37:06 +0200 (Sat, 16 May 2009) | 1 line #6041: sdist and register now use the check command. No more duplicate code for metadata checking ........ --- command/register.py | 57 +++++++++++++++--------------- command/sdist.py | 56 +++++++++++++----------------- tests/support.py | 20 +++++++++++ tests/test_register.py | 79 ++++++++++++++++++++++++++++++++++++++---- tests/test_sdist.py | 39 ++++++++++++++++++--- 5 files changed, 179 insertions(+), 72 deletions(-) diff --git a/command/register.py b/command/register.py index 7dd3099912..bdf5f8f09c 100644 --- a/command/register.py +++ b/command/register.py @@ -10,6 +10,7 @@ import os, string, getpass import io import urllib.parse, urllib.request +from warnings import warn from distutils.core import PyPIRCCommand from distutils.errors import * @@ -21,18 +22,34 @@ class register(PyPIRCCommand): user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), + ('strict', None , + 'Will stop the registering if the meta-data are not fully compliant') ] boolean_options = PyPIRCCommand.boolean_options + [ - 'verify', 'list-classifiers'] + 'verify', 'list-classifiers', 'strict'] + + sub_commands = [('check', lambda self: True)] def initialize_options(self): PyPIRCCommand.initialize_options(self) self.list_classifiers = 0 + self.strict = 0 + + def finalize_options(self): + PyPIRCCommand.finalize_options(self) + # setting options for the `check` subcommand + check_options = {'strict': ('register', self.strict), + 'restructuredtext': ('register', 1)} + self.distribution.command_options['check'] = check_options def run(self): self.finalize_options() self._set_config() - self.check_metadata() + + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + if self.dry_run: self.verify_metadata() elif self.list_classifiers: @@ -41,34 +58,14 @@ def run(self): self.send_metadata() def check_metadata(self): - """Ensure that all required elements of meta-data (name, version, - URL, (author and author_email) or (maintainer and - maintainer_email)) are supplied by the Distribution object; warn if - any are missing. - """ - metadata = self.distribution.metadata - - missing = [] - for attr in ('name', 'version', 'url'): - if not (hasattr(metadata, attr) and getattr(metadata, attr)): - missing.append(attr) - - if missing: - self.warn("missing required meta-data: " + - ", ".join(missing)) - - if metadata.author: - if not metadata.author_email: - self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") - elif metadata.maintainer: - if not metadata.maintainer_email: - self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") - else: - self.warn("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") + """Deprecated API.""" + warn("distutils.command.register.check_metadata is deprecated, \ + use the check command instead", PendingDeprecationWarning) + check = self.distribution.get_command_obj('check') + check.ensure_finalized() + check.strict = self.strict + check.restructuredtext = 1 + check.run() def _set_config(self): ''' Reads the configuration file and set attributes. diff --git a/command/sdist.py b/command/sdist.py index cbb77c212e..ace9eeeb61 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -9,6 +9,8 @@ import sys from types import * from glob import glob +from warnings import warn + from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile @@ -35,6 +37,12 @@ class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" + def checking_metadata(self): + """Callable used for the check sub-command. + + Placed here so user_options can view it""" + return self.metadata_check + user_options = [ ('template=', 't', "name of manifest template file [default: MANIFEST.in]"), @@ -64,11 +72,14 @@ class sdist(Command): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), + ('medata-check', None, + "Ensure that all required elements of meta-data " + "are supplied. Warn if any missing. [default]"), ] boolean_options = ['use-defaults', 'prune', 'manifest-only', 'force-manifest', - 'keep-temp'] + 'keep-temp', 'metadata-check'] help_options = [ ('help-formats', None, @@ -81,6 +92,8 @@ class sdist(Command): default_format = {'posix': 'gztar', 'nt': 'zip' } + sub_commands = [('check', checking_metadata)] + def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. @@ -100,6 +113,7 @@ def initialize_options(self): self.dist_dir = None self.archive_files = None + self.metadata_check = 1 def finalize_options(self): if self.manifest is None: @@ -129,9 +143,9 @@ def run(self): # manifest self.filelist = FileList() - # Ensure that all required meta-data is given; warn if not (but - # don't die, it's not *that* serious!) - self.check_metadata() + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) # Do whatever it takes to get the list of files to process # (process the manifest template, read an existing manifest, @@ -147,34 +161,12 @@ def run(self): self.make_distribution() def check_metadata(self): - """Ensure that all required elements of meta-data (name, version, - URL, (author and author_email) or (maintainer and - maintainer_email)) are supplied by the Distribution object; warn if - any are missing. - """ - metadata = self.distribution.metadata - - missing = [] - for attr in ('name', 'version', 'url'): - if not (hasattr(metadata, attr) and getattr(metadata, attr)): - missing.append(attr) - - if missing: - self.warn("missing required meta-data: " + - ", ".join(missing)) - - if metadata.author: - if not metadata.author_email: - self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") - elif metadata.maintainer: - if not metadata.maintainer_email: - self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") - else: - self.warn("missing meta-data: either (author and author_email) " + - "or (maintainer and maintainer_email) " + - "must be supplied") + """Deprecated API.""" + warn("distutils.command.sdist.check_metadata is deprecated, \ + use the check command instead", PendingDeprecationWarning) + check = self.distribution.get_command_obj('check') + check.ensure_finalized() + check.run() def get_file_list(self): """Figure out the list of files to include in the source diff --git a/tests/support.py b/tests/support.py index cdcbc37862..1255413989 100644 --- a/tests/support.py +++ b/tests/support.py @@ -12,11 +12,31 @@ class LoggingSilencer(object): def setUp(self): super().setUp() self.threshold = log.set_threshold(log.FATAL) + # catching warnings + # when log will be replaced by logging + # we won't need such monkey-patch anymore + self._old_log = log.Log._log + log.Log._log = self._log + self.logs = [] def tearDown(self): log.set_threshold(self.threshold) + log.Log._log = self._old_log super().tearDown() + def _log(self, level, msg, args): + self.logs.append((level, msg, args)) + + def get_logs(self, *levels): + def _format(msg, args): + if len(args) == 0: + return msg + return msg % args + return [_format(msg, args) for level, msg, args + in self.logs if level in levels] + + def clear_logs(self): + self.logs = [] class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. diff --git a/tests/test_register.py b/tests/test_register.py index 46f7761d80..f486cf797e 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -4,10 +4,14 @@ import unittest import getpass import urllib +import warnings + +from test.support import check_warnings from distutils.command import register as register_module from distutils.command.register import register from distutils.core import Distribution +from distutils.errors import DistutilsSetupError from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase @@ -59,7 +63,7 @@ def open(self, req): def read(self): return 'xxx' -class registerTestCase(PyPIRCCommandTestCase): +class RegisterTestCase(PyPIRCCommandTestCase): def setUp(self): PyPIRCCommandTestCase.setUp(self) @@ -76,10 +80,11 @@ def tearDown(self): urllib.request.build_opener = self.old_opener PyPIRCCommandTestCase.tearDown(self) - def _get_cmd(self): - metadata = {'url': 'xxx', 'author': 'xxx', - 'author_email': 'xxx', - 'name': 'xxx', 'version': 'xxx'} + def _get_cmd(self, metadata=None): + if metadata is None: + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} pkg_info, dist = self.create_dist(**metadata) return register(dist) @@ -184,8 +189,70 @@ def test_password_reset(self): self.assertEquals(headers['Content-length'], '290') self.assert_((b'tarek') in req.data) + def test_strict(self): + # testing the script option + # when on, the register command stops if + # the metadata is incomplete or if + # long_description is not reSt compliant + + # empty metadata + cmd = self._get_cmd({}) + cmd.ensure_finalized() + cmd.strict = 1 + self.assertRaises(DistutilsSetupError, cmd.run) + + # we don't test the reSt feature if docutils + # is not installed + try: + import docutils + except ImportError: + return + + # metadata are OK but long_description is broken + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': 'title\n==\n\ntext'} + + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + self.assertRaises(DistutilsSetupError, cmd.run) + + # now something that works + metadata['long_description'] = 'title\n=====\n\ntext' + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + inputs = RawInputs('1', 'tarek', 'y') + register_module.raw_input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.raw_input + + # strict is not by default + cmd = self._get_cmd() + cmd.ensure_finalized() + inputs = RawInputs('1', 'tarek', 'y') + register_module.raw_input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.raw_input + + def test_check_metadata_deprecated(self): + # makes sure make_metadata is deprecated + cmd = self._get_cmd() + with check_warnings() as w: + warnings.simplefilter("always") + cmd.check_metadata() + self.assertEquals(len(w.warnings), 1) + def test_suite(): - return unittest.makeSuite(registerTestCase) + return unittest.makeSuite(RegisterTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 9e27933773..b7e5859cb9 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -6,7 +6,9 @@ from os.path import join import sys import tempfile +import warnings +from test.support import check_warnings from test.support import captured_stdout from distutils.command.sdist import sdist @@ -16,6 +18,7 @@ from distutils.errors import DistutilsExecError, DistutilsOptionError from distutils.spawn import find_executable from distutils.tests import support +from distutils.log import WARN from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ @@ -38,12 +41,12 @@ somecode%(sep)sdoc.txt """ -class sdistTestCase(PyPIRCCommandTestCase): +class SDistTestCase(PyPIRCCommandTestCase): def setUp(self): # PyPIRCCommandTestCase creates a temp dir already # and put it in self.tmp_dir - super(sdistTestCase, self).setUp() + super(SDistTestCase, self).setUp() # setting up an environment self.old_path = os.getcwd() os.mkdir(join(self.tmp_dir, 'somecode')) @@ -57,7 +60,7 @@ def setUp(self): def tearDown(self): # back to normal os.chdir(self.old_path) - super(sdistTestCase, self).tearDown() + super(SDistTestCase, self).tearDown() def get_cmd(self, metadata=None): """Returns a cmd""" @@ -214,6 +217,34 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + def test_metadata_check_option(self): + # testing the `medata-check` option + dist, cmd = self.get_cmd(metadata={}) + + # this should raise some warnings ! + # with the `check` subcommand + cmd.ensure_finalized() + cmd.run() + warnings = self.get_logs(WARN) + self.assertEquals(len(warnings), 2) + + # trying with a complete set of metadata + self.clear_logs() + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.metadata_check = 0 + cmd.run() + warnings = self.get_logs(WARN) + self.assertEquals(len(warnings), 0) + + def test_check_metadata_deprecated(self): + # makes sure make_metadata is deprecated + dist, cmd = self.get_cmd() + with check_warnings() as w: + warnings.simplefilter("always") + cmd.check_metadata() + self.assertEquals(len(w.warnings), 1) + def test_show_formats(self): with captured_stdout() as stdout: show_formats() @@ -247,7 +278,7 @@ def test_finalize_options(self): def test_suite(): - return unittest.makeSuite(sdistTestCase) + return unittest.makeSuite(SDistTestCase) if __name__ == "__main__": unittest.main(defaultTest="test_suite") From 2bd69bbfb8b44521f1fda9b56567b1a3400b8cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 16 May 2009 18:29:40 +0000 Subject: [PATCH 2316/8469] pep8-fied distutils.dist module --- dist.py | 130 ++++++++++++++++---------------------------------------- 1 file changed, 37 insertions(+), 93 deletions(-) diff --git a/dist.py b/dist.py index 5fe262b112..0c77f85e7b 100644 --- a/dist.py +++ b/dist.py @@ -267,23 +267,18 @@ def __init__ (self, attrs=None): self.finalize_options() - # __init__ () - - - def get_option_dict (self, command): + def get_option_dict(self, command): """Get the option dictionary for a given command. If that command's option dictionary hasn't been created yet, then create it and return the new dictionary; otherwise, return the existing option dictionary. """ - dict = self.command_options.get(command) if dict is None: dict = self.command_options[command] = {} return dict - - def dump_option_dicts (self, header=None, commands=None, indent=""): + def dump_option_dicts(self, header=None, commands=None, indent=""): from pprint import pformat if commands is None: # dump all command option dicts @@ -308,13 +303,9 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): for line in string.split(out, "\n"): print indent + " " + line - # dump_option_dicts () - - - # -- Config file finding/parsing methods --------------------------- - def find_config_files (self): + def find_config_files(self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they should be parsed. The filenames returned are guaranteed to exist @@ -355,10 +346,7 @@ def find_config_files (self): return files - # find_config_files () - - - def parse_config_files (self, filenames=None): + def parse_config_files(self, filenames=None): from ConfigParser import ConfigParser if filenames is None: @@ -400,12 +388,9 @@ def parse_config_files (self, filenames=None): except ValueError, msg: raise DistutilsOptionError, msg - # parse_config_files () - - # -- Command-line parsing methods ---------------------------------- - def parse_command_line (self): + def parse_command_line(self): """Parse the setup script's command line, taken from the 'script_args' instance attribute (which defaults to 'sys.argv[1:]' -- see 'setup()' in core.py). This list is first processed for @@ -478,9 +463,7 @@ def parse_command_line (self): # All is well: return true return 1 - # parse_command_line() - - def _get_toplevel_options (self): + def _get_toplevel_options(self): """Return the non-display options recognized at the top level. This includes options that are recognized *only* at the top @@ -491,7 +474,7 @@ def _get_toplevel_options (self): "list of packages that provide distutils commands"), ] - def _parse_command_opts (self, parser, args): + def _parse_command_opts(self, parser, args): """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list of arguments, starting with the current command (whose options @@ -587,14 +570,11 @@ def _parse_command_opts (self, parser, args): return args - # _parse_command_opts () - - def finalize_options (self): + def finalize_options(self): """Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects. """ - keywords = self.metadata.keywords if keywords is not None: if type(keywords) is StringType: @@ -607,11 +587,8 @@ def finalize_options (self): platformlist = string.split(platforms, ',') self.metadata.platforms = map(string.strip, platformlist) - def _show_help (self, - parser, - global_options=1, - display_options=1, - commands=[]): + def _show_help(self, parser, global_options=1, display_options=1, + commands=[]): """Show help for the setup script command-line in the form of several lists of command-line options. 'parser' should be a FancyGetopt instance; do not expect it to be returned in the @@ -661,10 +638,7 @@ def _show_help (self, print gen_usage(self.script_name) return - # _show_help () - - - def handle_display_options (self, option_order): + def handle_display_options(self, option_order): """If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return @@ -704,13 +678,10 @@ def handle_display_options (self, option_order): return any_display_options - # handle_display_options() - - def print_command_list (self, commands, header, max_length): + def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - print header + ":" for cmd in commands: @@ -724,10 +695,7 @@ def print_command_list (self, commands, header, max_length): print " %-*s %s" % (max_length, cmd, description) - # print_command_list () - - - def print_commands (self): + def print_commands(self): """Print out a help message listing all available commands with a description of each. The list is divided into "standard commands" (listed in distutils.command.__all__) and "extra commands" @@ -735,7 +703,6 @@ def print_commands (self): descriptions come from the command class attribute 'description'. """ - import distutils.command std_commands = distutils.command.__all__ is_std = {} @@ -761,9 +728,7 @@ def print_commands (self): "Extra commands", max_length) - # print_commands () - - def get_command_list (self): + def get_command_list(self): """Get a list of (command, description) tuples. The list is divided into "standard commands" (listed in distutils.command.__all__) and "extra commands" (mentioned in @@ -798,7 +763,7 @@ def get_command_list (self): # -- Command class/object methods ---------------------------------- - def get_command_packages (self): + def get_command_packages(self): """Return a list of packages from which commands are loaded.""" pkgs = self.command_packages if not isinstance(pkgs, type([])): @@ -811,7 +776,7 @@ def get_command_packages (self): self.command_packages = pkgs return pkgs - def get_command_class (self, command): + def get_command_class(self, command): """Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the command is mentioned there, we fetch the class object from the @@ -850,9 +815,7 @@ def get_command_class (self, command): raise DistutilsModuleError("invalid command '%s'" % command) - # get_command_class () - - def get_command_obj (self, command, create=1): + def get_command_obj(self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no command object for 'command' is in the cache, then we either create and @@ -879,7 +842,7 @@ def get_command_obj (self, command, create=1): return cmd_obj - def _set_command_options (self, command_obj, option_dict=None): + def _set_command_options(self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). @@ -919,7 +882,7 @@ def _set_command_options (self, command_obj, option_dict=None): except ValueError, msg: raise DistutilsOptionError, msg - def reinitialize_command (self, command, reinit_subcommands=0): + def reinitialize_command(self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option @@ -958,13 +921,12 @@ def reinitialize_command (self, command, reinit_subcommands=0): return command - # -- Methods that operate on the Distribution ---------------------- - def announce (self, msg, level=1): + def announce(self, msg, level=1): log.debug(msg) - def run_commands (self): + def run_commands(self): """Run each command that was seen on the setup script command line. Uses the list of commands found and cache of command objects created by 'get_command_obj()'. @@ -972,10 +934,9 @@ def run_commands (self): for cmd in self.commands: self.run_command(cmd) - # -- Methods that operate on its Commands -------------------------- - def run_command (self, command): + def run_command(self, command): """Do whatever it takes to run a command (including nothing at all, if the command has already been run). Specifically: if we have already created and run the command named by 'command', return @@ -996,28 +957,28 @@ def run_command (self, command): # -- Distribution query methods ------------------------------------ - def has_pure_modules (self): + def has_pure_modules(self): return len(self.packages or self.py_modules or []) > 0 - def has_ext_modules (self): + def has_ext_modules(self): return self.ext_modules and len(self.ext_modules) > 0 - def has_c_libraries (self): + def has_c_libraries(self): return self.libraries and len(self.libraries) > 0 - def has_modules (self): + def has_modules(self): return self.has_pure_modules() or self.has_ext_modules() - def has_headers (self): + def has_headers(self): return self.headers and len(self.headers) > 0 - def has_scripts (self): + def has_scripts(self): return self.scripts and len(self.scripts) > 0 - def has_data_files (self): + def has_data_files(self): return self.data_files and len(self.data_files) > 0 - def is_pure (self): + def is_pure(self): return (self.has_pure_modules() and not self.has_ext_modules() and not self.has_c_libraries()) @@ -1029,9 +990,6 @@ def is_pure (self): # to self.metadata.get_XXX. The actual code is in the # DistributionMetadata class, below. -# class Distribution - - class DistributionMetadata: """Dummy class to hold the distribution meta-data: name, version, author, and so forth. @@ -1067,18 +1025,14 @@ def __init__ (self): self.requires = None self.obsoletes = None - def write_pkg_info (self, base_dir): + def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - self.write_pkg_file(pkg_info) - pkg_info.close() - # write_pkg_info () - - def write_pkg_file (self, file): + def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = '1.0' @@ -1112,7 +1066,6 @@ def write_pkg_file (self, file): self._write_list(file, 'Obsoletes', self.get_obsoletes()) def _write_field(self, file, name, value): - if isinstance(value, unicode): value = value.encode(PKG_INFO_ENCODING) else: @@ -1120,19 +1073,18 @@ def _write_field(self, file, name, value): file.write('%s: %s\n' % (name, value)) def _write_list (self, file, name, values): - for value in values: self._write_field(file, name, value) # -- Metadata query methods ---------------------------------------- - def get_name (self): + def get_name(self): return self.name or "UNKNOWN" def get_version(self): return self.version or "0.0.0" - def get_fullname (self): + def get_fullname(self): return "%s-%s" % (self.get_name(), self.get_version()) def get_author(self): @@ -1148,14 +1100,10 @@ def get_maintainer_email(self): return self.maintainer_email or "UNKNOWN" def get_contact(self): - return (self.maintainer or - self.author or - "UNKNOWN") + return self.maintainer or self.author or "UNKNOWN" def get_contact_email(self): - return (self.maintainer_email or - self.author_email or - "UNKNOWN") + return self.maintainer_email or self.author_email or "UNKNOWN" def get_url(self): return self.url or "UNKNOWN" @@ -1183,7 +1131,6 @@ def get_download_url(self): return self.download_url or "UNKNOWN" # PEP 314 - def get_requires(self): return self.requires or [] @@ -1212,10 +1159,7 @@ def set_obsoletes(self, value): distutils.versionpredicate.VersionPredicate(v) self.obsoletes = value -# class DistributionMetadata - - -def fix_help_options (options): +def fix_help_options(options): """Convert a 4-tuple 'help_options' list as found in various command classes to the 3-tuple form required by FancyGetopt. """ From a65846f388968a08b4187534689bc9cf4f8ecd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 16 May 2009 18:37:32 +0000 Subject: [PATCH 2317/8469] Merged revisions 72686 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72686 | tarek.ziade | 2009-05-16 20:29:40 +0200 (Sat, 16 May 2009) | 1 line pep8-fied distutils.dist module ........ --- dist.py | 103 +++++++++++++++++++++----------------------------------- 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/dist.py b/dist.py index 91adc4d37f..7969503507 100644 --- a/dist.py +++ b/dist.py @@ -262,21 +262,18 @@ def __init__ (self, attrs=None): self.finalize_options() - - def get_option_dict (self, command): + def get_option_dict(self, command): """Get the option dictionary for a given command. If that command's option dictionary hasn't been created yet, then create it and return the new dictionary; otherwise, return the existing option dictionary. """ - dict = self.command_options.get(command) if dict is None: dict = self.command_options[command] = {} return dict - - def dump_option_dicts (self, header=None, commands=None, indent=""): + def dump_option_dicts(self, header=None, commands=None, indent=""): from pprint import pformat if commands is None: # dump all command option dicts @@ -300,11 +297,9 @@ def dump_option_dicts (self, header=None, commands=None, indent=""): for line in out.split("\n"): print(indent + " " + line) - - # -- Config file finding/parsing methods --------------------------- - def find_config_files (self): + def find_config_files(self): """Find as many configuration files as should be processed for this platform, and return a list of filenames in the order in which they should be parsed. The filenames returned are guaranteed to exist @@ -345,9 +340,7 @@ def find_config_files (self): return files - - def parse_config_files (self, filenames=None): - + def parse_config_files(self, filenames=None): from configparser import ConfigParser if filenames is None: @@ -389,10 +382,9 @@ def parse_config_files (self, filenames=None): except ValueError as msg: raise DistutilsOptionError(msg) - # -- Command-line parsing methods ---------------------------------- - def parse_command_line (self): + def parse_command_line(self): """Parse the setup script's command line, taken from the 'script_args' instance attribute (which defaults to 'sys.argv[1:]' -- see 'setup()' in core.py). This list is first processed for @@ -465,7 +457,7 @@ def parse_command_line (self): # All is well: return true return True - def _get_toplevel_options (self): + def _get_toplevel_options(self): """Return the non-display options recognized at the top level. This includes options that are recognized *only* at the top @@ -476,7 +468,7 @@ def _get_toplevel_options (self): "list of packages that provide distutils commands"), ] - def _parse_command_opts (self, parser, args): + def _parse_command_opts(self, parser, args): """Parse the command-line options for a single command. 'parser' must be a FancyGetopt instance; 'args' must be the list of arguments, starting with the current command (whose options @@ -571,12 +563,11 @@ def _parse_command_opts (self, parser, args): return args - def finalize_options (self): + def finalize_options(self): """Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects. """ - keywords = self.metadata.keywords if keywords is not None: if isinstance(keywords, str): @@ -589,11 +580,8 @@ def finalize_options (self): platformlist = platforms.split(',') self.metadata.platforms = [x.strip() for x in platformlist] - def _show_help (self, - parser, - global_options=1, - display_options=1, - commands=[]): + def _show_help(self, parser, global_options=1, display_options=1, + commands=[]): """Show help for the setup script command-line in the form of several lists of command-line options. 'parser' should be a FancyGetopt instance; do not expect it to be returned in the @@ -643,8 +631,7 @@ def _show_help (self, print(gen_usage(self.script_name)) return - - def handle_display_options (self, option_order): + def handle_display_options(self, option_order): """If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return @@ -684,7 +671,7 @@ def handle_display_options (self, option_order): return any_display_options - def print_command_list (self, commands, header, max_length): + def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ @@ -701,8 +688,7 @@ def print_command_list (self, commands, header, max_length): print(" %-*s %s" % (max_length, cmd, description)) - - def print_commands (self): + def print_commands(self): """Print out a help message listing all available commands with a description of each. The list is divided into "standard commands" (listed in distutils.command.__all__) and "extra commands" @@ -735,7 +721,7 @@ def print_commands (self): "Extra commands", max_length) - def get_command_list (self): + def get_command_list(self): """Get a list of (command, description) tuples. The list is divided into "standard commands" (listed in distutils.command.__all__) and "extra commands" (mentioned in @@ -769,7 +755,7 @@ def get_command_list (self): # -- Command class/object methods ---------------------------------- - def get_command_packages (self): + def get_command_packages(self): """Return a list of packages from which commands are loaded.""" pkgs = self.command_packages if not isinstance(pkgs, type([])): @@ -782,7 +768,7 @@ def get_command_packages (self): self.command_packages = pkgs return pkgs - def get_command_class (self, command): + def get_command_class(self, command): """Return the class that implements the Distutils command named by 'command'. First we check the 'cmdclass' dictionary; if the command is mentioned there, we fetch the class object from the @@ -820,7 +806,7 @@ def get_command_class (self, command): raise DistutilsModuleError("invalid command '%s'" % command) - def get_command_obj (self, command, create=1): + def get_command_obj(self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no command object for 'command' is in the cache, then we either create and @@ -847,7 +833,7 @@ def get_command_obj (self, command, create=1): return cmd_obj - def _set_command_options (self, command_obj, option_dict=None): + def _set_command_options(self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command'). @@ -888,7 +874,7 @@ def _set_command_options (self, command_obj, option_dict=None): except ValueError as msg: raise DistutilsOptionError(msg) - def reinitialize_command (self, command, reinit_subcommands=0): + def reinitialize_command(self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option @@ -927,13 +913,12 @@ def reinitialize_command (self, command, reinit_subcommands=0): return command - # -- Methods that operate on the Distribution ---------------------- - def announce (self, msg, level=1): + def announce(self, msg, level=1): log.debug(msg) - def run_commands (self): + def run_commands(self): """Run each command that was seen on the setup script command line. Uses the list of commands found and cache of command objects created by 'get_command_obj()'. @@ -941,10 +926,9 @@ def run_commands (self): for cmd in self.commands: self.run_command(cmd) - # -- Methods that operate on its Commands -------------------------- - def run_command (self, command): + def run_command(self, command): """Do whatever it takes to run a command (including nothing at all, if the command has already been run). Specifically: if we have already created and run the command named by 'command', return @@ -965,28 +949,28 @@ def run_command (self, command): # -- Distribution query methods ------------------------------------ - def has_pure_modules (self): + def has_pure_modules(self): return len(self.packages or self.py_modules or []) > 0 - def has_ext_modules (self): + def has_ext_modules(self): return self.ext_modules and len(self.ext_modules) > 0 - def has_c_libraries (self): + def has_c_libraries(self): return self.libraries and len(self.libraries) > 0 - def has_modules (self): + def has_modules(self): return self.has_pure_modules() or self.has_ext_modules() - def has_headers (self): + def has_headers(self): return self.headers and len(self.headers) > 0 - def has_scripts (self): + def has_scripts(self): return self.scripts and len(self.scripts) > 0 - def has_data_files (self): + def has_data_files(self): return self.data_files and len(self.data_files) > 0 - def is_pure (self): + def is_pure(self): return (self.has_pure_modules() and not self.has_ext_modules() and not self.has_c_libraries()) @@ -998,9 +982,6 @@ def is_pure (self): # to self.metadata.get_XXX. The actual code is in the # DistributionMetadata class, below. -# class Distribution - - class DistributionMetadata: """Dummy class to hold the distribution meta-data: name, version, author, and so forth. @@ -1036,16 +1017,14 @@ def __init__ (self): self.requires = None self.obsoletes = None - def write_pkg_info (self, base_dir): + def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - self.write_pkg_file(pkg_info) - pkg_info.close() - def write_pkg_file (self, file): + def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = '1.0' @@ -1078,19 +1057,19 @@ def write_pkg_file (self, file): self._write_list(file, 'Provides', self.get_provides()) self._write_list(file, 'Obsoletes', self.get_obsoletes()) - def _write_list (self, file, name, values): + def _write_list(self, file, name, values): for value in values: file.write('%s: %s\n' % (name, value)) # -- Metadata query methods ---------------------------------------- - def get_name (self): + def get_name(self): return self.name or "UNKNOWN" def get_version(self): return self.version or "0.0.0" - def get_fullname (self): + def get_fullname(self): return "%s-%s" % (self.get_name(), self.get_version()) def get_author(self): @@ -1106,14 +1085,10 @@ def get_maintainer_email(self): return self.maintainer_email or "UNKNOWN" def get_contact(self): - return (self.maintainer or - self.author or - "UNKNOWN") + return self.maintainer or self.author or "UNKNOWN" def get_contact_email(self): - return (self.maintainer_email or - self.author_email or - "UNKNOWN") + return self.maintainer_email or self.author_email or "UNKNOWN" def get_url(self): return self.url or "UNKNOWN" @@ -1141,7 +1116,6 @@ def get_download_url(self): return self.download_url or "UNKNOWN" # PEP 314 - def get_requires(self): return self.requires or [] @@ -1170,8 +1144,7 @@ def set_obsoletes(self, value): distutils.versionpredicate.VersionPredicate(v) self.obsoletes = value - -def fix_help_options (options): +def fix_help_options(options): """Convert a 4-tuple 'help_options' list as found in various command classes to the 3-tuple form required by FancyGetopt. """ From 4b18d769629e294345acd8d714ec854d20bbc5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 10:07:48 +0000 Subject: [PATCH 2318/8469] not running this test with MSVC6 --- tests/test_build_ext.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index c6533ca9f7..7e3f716500 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,6 +19,12 @@ # Don't load the xx module more than once. ALREADY_TESTED = False +if sys.platform != 'win32': + UNDER_MSVC8 = False +else: + from distutils.msvccompiler import get_build_version + UNDER_MSVC8 = get_build_version() < 8.0 + def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -293,6 +299,7 @@ def test_compiler_option(self): cmd.run() self.assertEquals(cmd.compiler, 'unix') + @unittest.skipIf(UNDER_MSVC8, 'not running this test for MSVC < 8') def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') From c822bf11bbd7e21e4cccd81bbcaf4a7fce16edde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 10:10:51 +0000 Subject: [PATCH 2319/8469] Merged revisions 72713 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72713 | tarek.ziade | 2009-05-17 12:07:48 +0200 (Sun, 17 May 2009) | 1 line not running this test with MSVC6 ........ --- tests/test_build_ext.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 2bd2292e8c..21020d3927 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -17,6 +17,12 @@ # Don't load the xx module more than once. ALREADY_TESTED = False +if sys.platform != 'win32': + UNDER_MSVC8 = False +else: + from distutils.msvccompiler import get_build_version + UNDER_MSVC8 = get_build_version() < 8.0 + class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -231,6 +237,8 @@ def test_compiler_option(self): self.assertEquals(cmd.compiler, 'unix') def test_get_outputs(self): + if UNDER_MSVC8: + return # not running this test for MSVC < 8 tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') self.write_file(c_file, 'void initfoo(void) {};\n') From dc4754eb50a3b88a4e302dc27b474be6ba18eaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 10:12:02 +0000 Subject: [PATCH 2320/8469] Merged revisions 72713 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72713 | tarek.ziade | 2009-05-17 12:07:48 +0200 (Sun, 17 May 2009) | 1 line not running this test with MSVC6 ........ --- tests/test_build_ext.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6a463c0117..764aa727d1 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -20,6 +20,12 @@ # Don't load the xx module more than once. ALREADY_TESTED = False +if sys.platform != 'win32': + UNDER_MSVC8 = False +else: + from distutils.msvccompiler import get_build_version + UNDER_MSVC8 = get_build_version() < 8.0 + def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -293,6 +299,7 @@ def test_compiler_option(self): cmd.run() self.assertEquals(cmd.compiler, 'unix') + @unittest.skipIf(UNDER_MSVC8, 'not running this test for MSVC < 8') def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') From f05e22fcc970ca8879603dee6842e310027ee256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 10:44:12 +0000 Subject: [PATCH 2321/8469] removed sys.platform == 'mac' support in distutils.dist.parse_command_line and improved test coverage --- dist.py | 6 ----- tests/test_dist.py | 58 +++++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/dist.py b/dist.py index 0c77f85e7b..93325b9720 100644 --- a/dist.py +++ b/dist.py @@ -414,11 +414,6 @@ def parse_command_line(self): # that allows the user to interactively specify the "command line". # toplevel_options = self._get_toplevel_options() - if sys.platform == 'mac': - import EasyDialogs - cmdlist = self.get_command_list() - self.script_args = EasyDialogs.GetArgv( - toplevel_options + self.display_options, cmdlist) # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -438,7 +433,6 @@ def parse_command_line(self): # for display options we return immediately if self.handle_display_options(option_order): return - while args: args = self._parse_command_opts(parser, args) if args is None: # user asked for help (and got it) diff --git a/tests/test_dist.py b/tests/test_dist.py index 3304790b51..49230c54c0 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,19 +1,19 @@ # -*- coding: latin-1 -*- """Tests for distutils.dist.""" - -import distutils.cmd -import distutils.dist import os import StringIO import sys import unittest import warnings -from test.test_support import TESTFN +from distutils.dist import Distribution, fix_help_options +from distutils.cmd import Command + +from test.test_support import TESTFN, captured_stdout from distutils.tests import support -class test_dist(distutils.cmd.Command): +class test_dist(Command): """Sample distutils extension command.""" user_options = [ @@ -24,7 +24,7 @@ def initialize_options(self): self.sample_option = None -class TestDistribution(distutils.dist.Distribution): +class TestDistribution(Distribution): """Distribution subclasses that avoids the default search for configuration files. @@ -104,7 +104,7 @@ def test_write_pkg_file(self): # Check DistributionMetadata handling of Unicode fields tmp_dir = self.mkdtemp() my_file = os.path.join(tmp_dir, 'f') - klass = distutils.dist.Distribution + klass = Distribution dist = klass(attrs={'author': u'Mister Café', 'name': 'my.package', @@ -131,7 +131,7 @@ def test_write_pkg_file(self): def test_empty_options(self): # an empty options dictionary should not stay in the # list of attributes - klass = distutils.dist.Distribution + klass = Distribution # catching warnings warns = [] @@ -157,7 +157,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard, def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) meta = self.format_metadata(dist) self.assert_("Metadata-Version: 1.0" in meta) self.assert_("provides:" not in meta.lower()) @@ -168,7 +168,7 @@ def test_provides(self): attrs = {"name": "package", "version": "1.0", "provides": ["package", "package.sub"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_provides(), ["package", "package.sub"]) self.assertEqual(dist.get_provides(), @@ -179,8 +179,7 @@ def test_provides(self): self.assert_("obsoletes:" not in meta.lower()) def test_provides_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "provides": ["my.pkg (splat)"]}) @@ -189,7 +188,7 @@ def test_requires(self): attrs = {"name": "package", "version": "1.0", "requires": ["other", "another (==1.0)"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_requires(), ["other", "another (==1.0)"]) self.assertEqual(dist.get_requires(), @@ -202,8 +201,7 @@ def test_requires(self): self.assert_("obsoletes:" not in meta.lower()) def test_requires_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "requires": ["my.pkg (splat)"]}) @@ -212,7 +210,7 @@ def test_obsoletes(self): attrs = {"name": "package", "version": "1.0", "obsoletes": ["other", "another (<1.0)"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_obsoletes(), ["other", "another (<1.0)"]) self.assertEqual(dist.get_obsoletes(), @@ -225,8 +223,7 @@ def test_obsoletes(self): self.assert_("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) @@ -251,7 +248,7 @@ def test_custom_pydistutils(self): f.close() try: - dist = distutils.dist.Distribution() + dist = Distribution() # linux-style if sys.platform in ('linux', 'darwin'): @@ -269,6 +266,29 @@ def test_custom_pydistutils(self): finally: os.remove(user_filename) + def test_fix_help_options(self): + help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] + fancy_options = fix_help_options(help_tuples) + self.assertEquals(fancy_options[0], ('a', 'b', 'c')) + self.assertEquals(fancy_options[1], (1, 2, 3)) + + def test_show_help(self): + # smoke test, just makes sure some help is displayed + dist = Distribution() + old_argv = sys.argv + sys.argv = [] + try: + dist.help = 1 + dist.script_name = 'setup.py' + with captured_stdout() as s: + dist.parse_command_line() + finally: + sys.argv = old_argv + + output = [line for line in s.getvalue().split('\n') + if line.strip() != ''] + self.assert_(len(output) > 0) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From d3f1bdd3baedab6204777740c026f481305cbea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 10:50:24 +0000 Subject: [PATCH 2322/8469] Merged revisions 72721 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72721 | tarek.ziade | 2009-05-17 12:44:12 +0200 (Sun, 17 May 2009) | 1 line removed sys.platform == 'mac' support in distutils.dist.parse_command_line and improved test coverage ........ --- dist.py | 6 ----- tests/test_dist.py | 57 ++++++++++++++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/dist.py b/dist.py index 7969503507..65c1ce912e 100644 --- a/dist.py +++ b/dist.py @@ -408,11 +408,6 @@ def parse_command_line(self): # that allows the user to interactively specify the "command line". # toplevel_options = self._get_toplevel_options() - if sys.platform == 'mac': - import EasyDialogs - cmdlist = self.get_command_list() - self.script_args = EasyDialogs.GetArgv( - toplevel_options + self.display_options, cmdlist) # We have to parse the command line a bit at a time -- global # options, then the first command, then its options, and so on -- @@ -432,7 +427,6 @@ def parse_command_line(self): # for display options we return immediately if self.handle_display_options(option_order): return - while args: args = self._parse_command_opts(parser, args) if args is None: # user asked for help (and got it) diff --git a/tests/test_dist.py b/tests/test_dist.py index 092bd14f93..54b63f7ddf 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,18 +1,18 @@ """Tests for distutils.dist.""" - -import distutils.cmd -import distutils.dist import os import io import sys import unittest import warnings -from test.support import TESTFN +from distutils.dist import Distribution, fix_help_options +from distutils.cmd import Command + +from test.support import TESTFN, captured_stdout from distutils.tests import support -class test_dist(distutils.cmd.Command): +class test_dist(Command): """Sample distutils extension command.""" user_options = [ @@ -23,7 +23,7 @@ def initialize_options(self): self.sample_option = None -class TestDistribution(distutils.dist.Distribution): +class TestDistribution(Distribution): """Distribution subclasses that avoids the default search for configuration files. @@ -99,11 +99,10 @@ def test_command_packages_configfile(self): finally: os.unlink(TESTFN) - def test_empty_options(self): # an empty options dictionary should not stay in the # list of attributes - klass = distutils.dist.Distribution + klass = Distribution # catching warnings warns = [] @@ -129,7 +128,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard, def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) meta = self.format_metadata(dist) self.assert_("Metadata-Version: 1.0" in meta) self.assert_("provides:" not in meta.lower()) @@ -140,7 +139,7 @@ def test_provides(self): attrs = {"name": "package", "version": "1.0", "provides": ["package", "package.sub"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_provides(), ["package", "package.sub"]) self.assertEqual(dist.get_provides(), @@ -151,8 +150,7 @@ def test_provides(self): self.assert_("obsoletes:" not in meta.lower()) def test_provides_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "provides": ["my.pkg (splat)"]}) @@ -161,7 +159,7 @@ def test_requires(self): attrs = {"name": "package", "version": "1.0", "requires": ["other", "another (==1.0)"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_requires(), ["other", "another (==1.0)"]) self.assertEqual(dist.get_requires(), @@ -174,8 +172,7 @@ def test_requires(self): self.assert_("obsoletes:" not in meta.lower()) def test_requires_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "requires": ["my.pkg (splat)"]}) @@ -184,7 +181,7 @@ def test_obsoletes(self): attrs = {"name": "package", "version": "1.0", "obsoletes": ["other", "another (<1.0)"]} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) self.assertEqual(dist.metadata.get_obsoletes(), ["other", "another (<1.0)"]) self.assertEqual(dist.get_obsoletes(), @@ -197,8 +194,7 @@ def test_obsoletes(self): self.assert_("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): - self.assertRaises(ValueError, - distutils.dist.Distribution, + self.assertRaises(ValueError, Distribution, {"name": "package", "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) @@ -223,7 +219,7 @@ def test_custom_pydistutils(self): f.close() try: - dist = distutils.dist.Distribution() + dist = Distribution() # linux-style if sys.platform in ('linux', 'darwin'): @@ -241,6 +237,29 @@ def test_custom_pydistutils(self): finally: os.remove(user_filename) + def test_fix_help_options(self): + help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] + fancy_options = fix_help_options(help_tuples) + self.assertEquals(fancy_options[0], ('a', 'b', 'c')) + self.assertEquals(fancy_options[1], (1, 2, 3)) + + def test_show_help(self): + # smoke test, just makes sure some help is displayed + dist = Distribution() + old_argv = sys.argv + sys.argv = [] + try: + dist.help = 1 + dist.script_name = 'setup.py' + with captured_stdout() as s: + dist.parse_command_line() + finally: + sys.argv = old_argv + + output = [line for line in s.getvalue().split('\n') + if line.strip() != ''] + self.assert_(len(output) > 0) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From 9342187befd026978a753e2e41127ad0abddc35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 11:11:57 +0000 Subject: [PATCH 2323/8469] removed sys.platform == 'mac' usage in distutils.dir_util --- dir_util.py | 11 ++++------- tests/test_dir_util.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dir_util.py b/dir_util.py index 5a134408fd..9604c6d249 100644 --- a/dir_util.py +++ b/dir_util.py @@ -212,14 +212,11 @@ def remove_tree (directory, verbose=1, dry_run=0): exc, "error removing %s: " % directory)) -def ensure_relative (path): +def ensure_relative(path): """Take the full path 'path', and make it a relative path so it can be the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) - if sys.platform == 'mac': - return os.sep + path - else: - if path[0:1] == os.sep: - path = drive + path[1:] - return path + if path[0:1] == os.sep: + path = drive + path[1:] + return path diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index bf416b6d79..9bd6530c14 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,10 +3,8 @@ import os import shutil -from distutils.dir_util import mkpath -from distutils.dir_util import remove_tree -from distutils.dir_util import create_tree -from distutils.dir_util import copy_tree +from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, + ensure_relative) from distutils import log from distutils.tests import support @@ -85,6 +83,14 @@ def test_copy_tree_verbosity(self): remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) + def test_ensure_relative(self): + if os.sep == '/': + self.assertEquals(ensure_relative('/home/foo'), 'home/foo') + self.assertEquals(ensure_relative('some/path'), 'some/path') + else: # \\ + self.assertEquals(ensure_relative('c:\\home\\foo'), 'home\\foo') + self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') + def test_suite(): return unittest.makeSuite(DirUtilTestCase) From 67db2917c102fce286384cbbe3bd90c4d2d2642f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 11:14:15 +0000 Subject: [PATCH 2324/8469] Merged revisions 72727 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72727 | tarek.ziade | 2009-05-17 13:11:57 +0200 (Sun, 17 May 2009) | 1 line removed sys.platform == 'mac' usage in distutils.dir_util ........ --- dir_util.py | 11 ++++------- tests/test_dir_util.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dir_util.py b/dir_util.py index ed54ccefd4..82608d2c87 100644 --- a/dir_util.py +++ b/dir_util.py @@ -208,14 +208,11 @@ def remove_tree (directory, verbose=1, dry_run=0): exc, "error removing %s: " % directory)) -def ensure_relative (path): +def ensure_relative(path): """Take the full path 'path', and make it a relative path so it can be the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) - if sys.platform == 'mac': - return os.sep + path - else: - if path[0:1] == os.sep: - path = drive + path[1:] - return path + if path[0:1] == os.sep: + path = drive + path[1:] + return path diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index bf416b6d79..9bd6530c14 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,10 +3,8 @@ import os import shutil -from distutils.dir_util import mkpath -from distutils.dir_util import remove_tree -from distutils.dir_util import create_tree -from distutils.dir_util import copy_tree +from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, + ensure_relative) from distutils import log from distutils.tests import support @@ -85,6 +83,14 @@ def test_copy_tree_verbosity(self): remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) + def test_ensure_relative(self): + if os.sep == '/': + self.assertEquals(ensure_relative('/home/foo'), 'home/foo') + self.assertEquals(ensure_relative('some/path'), 'some/path') + else: # \\ + self.assertEquals(ensure_relative('c:\\home\\foo'), 'home\\foo') + self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') + def test_suite(): return unittest.makeSuite(DirUtilTestCase) From 7d5ed40f17e1b7f49b5af117c149730860c5560f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 11:22:36 +0000 Subject: [PATCH 2325/8469] pep8-fied distutils.dir_util --- dir_util.py | 110 +++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 61 deletions(-) diff --git a/dir_util.py b/dir_util.py index 9604c6d249..55607e5b53 100644 --- a/dir_util.py +++ b/dir_util.py @@ -5,7 +5,6 @@ __revision__ = "$Id$" import os, sys -from types import * from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log @@ -16,20 +15,21 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0777, verbose=1, dry_run=0): - """Create a directory and any missing ancestor directories. If the - directory already exists (or if 'name' is the empty string, which - means the current directory, which of course exists), then do - nothing. Raise DistutilsFileError if unable to create some - directory along the way (eg. some sub-path exists, but is a file - rather than a directory). If 'verbose' is true, print a one-line - summary of each mkdir to stdout. Return the list of directories - actually created.""" +def mkpath(name, mode=0777, verbose=1, dry_run=0): + """Create a directory and any missing ancestor directories. + + If the directory already exists (or if 'name' is the empty string, which + means the current directory, which of course exists), then do nothing. + Raise DistutilsFileError if unable to create some directory along the way + (eg. some sub-path exists, but is a file rather than a directory). + If 'verbose' is true, print a one-line summary of each mkdir to stdout. + Return the list of directories actually created. + """ global _path_created # Detect a common bug -- name is None - if not isinstance(name, StringTypes): + if not isinstance(name, basestring): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) @@ -77,19 +77,16 @@ def mkpath (name, mode=0777, verbose=1, dry_run=0): _path_created[abs_head] = 1 return created_dirs -# mkpath () - - -def create_tree (base_dir, files, mode=0777, verbose=1, dry_run=0): - - """Create all the empty directories under 'base_dir' needed to - put 'files' there. 'base_dir' is just the a name of a directory - which doesn't necessarily exist yet; 'files' is a list of filenames - to be interpreted relative to 'base_dir'. 'base_dir' + the - directory portion of every file in 'files' will be created if it - doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as - for 'mkpath()'.""" +def create_tree(base_dir, files, mode=0777, verbose=1, dry_run=0): + """Create all the empty directories under 'base_dir' needed to put 'files' + there. + 'base_dir' is just the a name of a directory which doesn't necessarily + exist yet; 'files' is a list of filenames to be interpreted relative to + 'base_dir'. 'base_dir' + the directory portion of every file in 'files' + will be created if it doesn't already exist. 'mode', 'verbose' and + 'dry_run' flags are as for 'mkpath()'. + """ # First get the list of directories to create need_dir = {} for file in files: @@ -101,35 +98,27 @@ def create_tree (base_dir, files, mode=0777, verbose=1, dry_run=0): for dir in need_dirs: mkpath(dir, mode, verbose=verbose, dry_run=dry_run) -# create_tree () - - -def copy_tree (src, dst, - preserve_mode=1, - preserve_times=1, - preserve_symlinks=0, - update=0, - verbose=1, - dry_run=0): - - """Copy an entire directory tree 'src' to a new location 'dst'. Both - 'src' and 'dst' must be directory names. If 'src' is not a - directory, raise DistutilsFileError. If 'dst' does not exist, it is - created with 'mkpath()'. The end result of the copy is that every - file in 'src' is copied to 'dst', and directories under 'src' are - recursively copied to 'dst'. Return the list of files that were - copied or might have been copied, using their output name. The - return value is unaffected by 'update' or 'dry_run': it is simply - the list of all files under 'src', with the names changed to be - under 'dst'. - - 'preserve_mode' and 'preserve_times' are the same as for - 'copy_file'; note that they only apply to regular files, not to - directories. If 'preserve_symlinks' is true, symlinks will be - copied as symlinks (on platforms that support them!); otherwise - (the default), the destination of the symlink will be copied. - 'update' and 'verbose' are the same as for 'copy_file'.""" - +def copy_tree(src, dst, preserve_mode=1, preserve_times=1, + preserve_symlinks=0, update=0, verbose=1, dry_run=0): + """Copy an entire directory tree 'src' to a new location 'dst'. + + Both 'src' and 'dst' must be directory names. If 'src' is not a + directory, raise DistutilsFileError. If 'dst' does not exist, it is + created with 'mkpath()'. The end result of the copy is that every + file in 'src' is copied to 'dst', and directories under 'src' are + recursively copied to 'dst'. Return the list of files that were + copied or might have been copied, using their output name. The + return value is unaffected by 'update' or 'dry_run': it is simply + the list of all files under 'src', with the names changed to be + under 'dst'. + + 'preserve_mode' and 'preserve_times' are the same as for + 'copy_file'; note that they only apply to regular files, not to + directories. If 'preserve_symlinks' is true, symlinks will be + copied as symlinks (on platforms that support them!); otherwise + (the default), the destination of the symlink will be copied. + 'update' and 'verbose' are the same as for 'copy_file'. + """ from distutils.file_util import copy_file if not dry_run and not os.path.isdir(src): @@ -174,10 +163,8 @@ def copy_tree (src, dst, return outputs -# copy_tree () - -# Helper for remove_tree() def _build_cmdtuple(path, cmdtuples): + """Helper for remove_tree().""" for f in os.listdir(path): real_f = os.path.join(path,f) if os.path.isdir(real_f) and not os.path.islink(real_f): @@ -186,10 +173,11 @@ def _build_cmdtuple(path, cmdtuples): cmdtuples.append((os.remove, real_f)) cmdtuples.append((os.rmdir, path)) +def remove_tree(directory, verbose=1, dry_run=0): + """Recursively remove an entire directory tree. -def remove_tree (directory, verbose=1, dry_run=0): - """Recursively remove an entire directory tree. Any errors are ignored - (apart from being reported to stdout if 'verbose' is true). + Any errors are ignored (apart from being reported to stdout if 'verbose' + is true). """ from distutils.util import grok_environment_error global _path_created @@ -211,10 +199,10 @@ def remove_tree (directory, verbose=1, dry_run=0): log.warn(grok_environment_error( exc, "error removing %s: " % directory)) - def ensure_relative(path): - """Take the full path 'path', and make it a relative path so - it can be the second argument to os.path.join(). + """Take the full path 'path', and make it a relative path. + + This is useful to make 'path' the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) if path[0:1] == os.sep: From 26aaaedf5db9750530cb20f8b71f1826a8ec8fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 11:25:57 +0000 Subject: [PATCH 2326/8469] Merged revisions 72730 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72730 | tarek.ziade | 2009-05-17 13:22:36 +0200 (Sun, 17 May 2009) | 1 line pep8-fied distutils.dir_util ........ --- dir_util.py | 105 ++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 57 deletions(-) diff --git a/dir_util.py b/dir_util.py index 82608d2c87..98e6252c6c 100644 --- a/dir_util.py +++ b/dir_util.py @@ -15,15 +15,16 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0o777, verbose=1, dry_run=0): - """Create a directory and any missing ancestor directories. If the - directory already exists (or if 'name' is the empty string, which - means the current directory, which of course exists), then do - nothing. Raise DistutilsFileError if unable to create some - directory along the way (eg. some sub-path exists, but is a file - rather than a directory). If 'verbose' is true, print a one-line - summary of each mkdir to stdout. Return the list of directories - actually created.""" +def mkpath(name, mode=0o777, verbose=1, dry_run=0): + """Create a directory and any missing ancestor directories. + + If the directory already exists (or if 'name' is the empty string, which + means the current directory, which of course exists), then do nothing. + Raise DistutilsFileError if unable to create some directory along the way + (eg. some sub-path exists, but is a file rather than a directory). + If 'verbose' is true, print a one-line summary of each mkdir to stdout. + Return the list of directories actually created. + """ global _path_created @@ -76,19 +77,16 @@ def mkpath (name, mode=0o777, verbose=1, dry_run=0): _path_created[abs_head] = 1 return created_dirs -# mkpath () - - -def create_tree (base_dir, files, mode=0o777, verbose=1, dry_run=0): - - """Create all the empty directories under 'base_dir' needed to - put 'files' there. 'base_dir' is just the a name of a directory - which doesn't necessarily exist yet; 'files' is a list of filenames - to be interpreted relative to 'base_dir'. 'base_dir' + the - directory portion of every file in 'files' will be created if it - doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as - for 'mkpath()'.""" +def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0): + """Create all the empty directories under 'base_dir' needed to put 'files' + there. + 'base_dir' is just the a name of a directory which doesn't necessarily + exist yet; 'files' is a list of filenames to be interpreted relative to + 'base_dir'. 'base_dir' + the directory portion of every file in 'files' + will be created if it doesn't already exist. 'mode', 'verbose' and + 'dry_run' flags are as for 'mkpath()'. + """ # First get the list of directories to create need_dir = set() for file in files: @@ -98,35 +96,27 @@ def create_tree (base_dir, files, mode=0o777, verbose=1, dry_run=0): for dir in sorted(need_dir): mkpath(dir, mode, verbose=verbose, dry_run=dry_run) -# create_tree () - - -def copy_tree (src, dst, - preserve_mode=1, - preserve_times=1, - preserve_symlinks=0, - update=0, - verbose=1, - dry_run=0): - - """Copy an entire directory tree 'src' to a new location 'dst'. Both - 'src' and 'dst' must be directory names. If 'src' is not a - directory, raise DistutilsFileError. If 'dst' does not exist, it is - created with 'mkpath()'. The end result of the copy is that every - file in 'src' is copied to 'dst', and directories under 'src' are - recursively copied to 'dst'. Return the list of files that were - copied or might have been copied, using their output name. The - return value is unaffected by 'update' or 'dry_run': it is simply - the list of all files under 'src', with the names changed to be - under 'dst'. - - 'preserve_mode' and 'preserve_times' are the same as for - 'copy_file'; note that they only apply to regular files, not to - directories. If 'preserve_symlinks' is true, symlinks will be - copied as symlinks (on platforms that support them!); otherwise - (the default), the destination of the symlink will be copied. - 'update' and 'verbose' are the same as for 'copy_file'.""" - +def copy_tree(src, dst, preserve_mode=1, preserve_times=1, + preserve_symlinks=0, update=0, verbose=1, dry_run=0): + """Copy an entire directory tree 'src' to a new location 'dst'. + + Both 'src' and 'dst' must be directory names. If 'src' is not a + directory, raise DistutilsFileError. If 'dst' does not exist, it is + created with 'mkpath()'. The end result of the copy is that every + file in 'src' is copied to 'dst', and directories under 'src' are + recursively copied to 'dst'. Return the list of files that were + copied or might have been copied, using their output name. The + return value is unaffected by 'update' or 'dry_run': it is simply + the list of all files under 'src', with the names changed to be + under 'dst'. + + 'preserve_mode' and 'preserve_times' are the same as for + 'copy_file'; note that they only apply to regular files, not to + directories. If 'preserve_symlinks' is true, symlinks will be + copied as symlinks (on platforms that support them!); otherwise + (the default), the destination of the symlink will be copied. + 'update' and 'verbose' are the same as for 'copy_file'. + """ from distutils.file_util import copy_file if not dry_run and not os.path.isdir(src): @@ -172,8 +162,8 @@ def copy_tree (src, dst, return outputs -# Helper for remove_tree() def _build_cmdtuple(path, cmdtuples): + """Helper for remove_tree().""" for f in os.listdir(path): real_f = os.path.join(path,f) if os.path.isdir(real_f) and not os.path.islink(real_f): @@ -182,10 +172,11 @@ def _build_cmdtuple(path, cmdtuples): cmdtuples.append((os.remove, real_f)) cmdtuples.append((os.rmdir, path)) +def remove_tree(directory, verbose=1, dry_run=0): + """Recursively remove an entire directory tree. -def remove_tree (directory, verbose=1, dry_run=0): - """Recursively remove an entire directory tree. Any errors are ignored - (apart from being reported to stdout if 'verbose' is true). + Any errors are ignored (apart from being reported to stdout if 'verbose' + is true). """ from distutils.util import grok_environment_error global _path_created @@ -207,10 +198,10 @@ def remove_tree (directory, verbose=1, dry_run=0): log.warn(grok_environment_error( exc, "error removing %s: " % directory)) - def ensure_relative(path): - """Take the full path 'path', and make it a relative path so - it can be the second argument to os.path.join(). + """Take the full path 'path', and make it a relative path. + + This is useful to make 'path' the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) if path[0:1] == os.sep: From 0f9f597d4519708a7866861403174320a81f2baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 12:04:57 +0000 Subject: [PATCH 2327/8469] pep8-fied distutils.archive_util + added minimum test coverage --- archive_util.py | 80 +++++++++++++++++++------------------- tests/test_archive_util.py | 70 +++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 40 deletions(-) create mode 100644 tests/test_archive_util.py diff --git a/archive_util.py b/archive_util.py index b50563e317..f5959f5e64 100644 --- a/archive_util.py +++ b/archive_util.py @@ -11,15 +11,16 @@ from distutils.dir_util import mkpath from distutils import log -def make_tarball (base_name, base_dir, compress="gzip", - verbose=0, dry_run=0): +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under - 'base_dir'. 'compress' must be "gzip" (the default), "compress", - "bzip2", or None. Both "tar" and the compression utility named by - 'compress' must be on the default program search path, so this is - probably Unix-specific. The output tar file will be named 'base_dir' + - ".tar", possibly plus the appropriate compression extension (".gz", - ".bz2" or ".Z"). Return the output filename. + 'base_dir'. + + 'compress' must be "gzip" (the default), "compress", "bzip2", or None. + Both "tar" and the compression utility named by 'compress' must be on + the default program search path, so this is probably Unix-specific. + The output tar file will be named 'base_dir' + ".tar", possibly plus + the appropriate compression extension (".gz", ".bz2" or ".Z"). + Returns the output filename. """ # XXX GNU tar 1.13 has a nifty option to add a prefix directory. # It's pretty new, though, so we certainly can't require it -- @@ -27,9 +28,9 @@ def make_tarball (base_name, base_dir, compress="gzip", # "create a tree of hardlinks" step! (Would also be nice to # detect GNU tar to use its 'z' option and save a step.) - compress_ext = { 'gzip': ".gz", - 'bzip2': '.bz2', - 'compress': ".Z" } + compress_ext = {'gzip': ".gz", + 'bzip2': '.bz2', + 'compress': ".Z" } # flags for compression program, each element of list will be an argument compress_flags = {'gzip': ["-f9"], @@ -52,15 +53,14 @@ def make_tarball (base_name, base_dir, compress="gzip", else: return archive_name -# make_tarball () +def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): + """Create a zip file from all the files under 'base_dir'. - -def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): - """Create a zip file from all the files under 'base_dir'. The output - zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" - Python module (if available) or the InfoZIP "zip" utility (if installed - and found on the default search path). If neither tool is available, - raises DistutilsExecError. Returns the name of the output zip file. + The output zip file will be named 'base_dir' + ".zip". Uses either the + "zipfile" Python module (if available) or the InfoZIP "zip" utility + (if installed and found on the default search path). If neither tool is + available, raises DistutilsExecError. Returns the name of the output zip + file. """ try: import zipfile @@ -94,22 +94,19 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): zip_filename, base_dir) if not dry_run: - z = zipfile.ZipFile(zip_filename, "w", - compression=zipfile.ZIP_DEFLATED) + zip = zipfile.ZipFile(zip_filename, "w", + compression=zipfile.ZIP_DEFLATED) for dirpath, dirnames, filenames in os.walk(base_dir): for name in filenames: path = os.path.normpath(os.path.join(dirpath, name)) if os.path.isfile(path): - z.write(path, path) + zip.write(path, path) log.info("adding '%s'" % path) - z.close() + zip.close() return zip_filename -# make_zipfile () - - ARCHIVE_FORMATS = { 'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"), 'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"), @@ -118,19 +115,24 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): 'zip': (make_zipfile, [],"ZIP file") } -def check_archive_formats (formats): +def check_archive_formats(formats): + """Returns the first format from the 'format' list that is unknown. + + If all formats are known, returns None + """ for format in formats: if format not in ARCHIVE_FORMATS: return format - else: - return None - -def make_archive (base_name, format, - root_dir=None, base_dir=None, - verbose=0, dry_run=0): - """Create an archive file (eg. zip or tar). 'base_name' is the name - of the file to create, minus any format-specific extension; 'format' - is the archive format: one of "zip", "tar", "ztar", or "gztar". + return None + +def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, + dry_run=0): + """Create an archive file (eg. zip or tar). + + 'base_name' is the name of the file to create, minus any format-specific + extension; 'format' is the archive format: one of "zip", "tar", "ztar", + or "gztar". + 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the archive. 'base_dir' is the directory where we start archiving from; @@ -148,7 +150,7 @@ def make_archive (base_name, format, if base_dir is None: base_dir = os.curdir - kwargs = { 'dry_run': dry_run } + kwargs = {'dry_run': dry_run} try: format_info = ARCHIVE_FORMATS[format] @@ -156,7 +158,7 @@ def make_archive (base_name, format, raise ValueError, "unknown archive format '%s'" % format func = format_info[0] - for (arg,val) in format_info[1]: + for arg, val in format_info[1]: kwargs[arg] = val filename = apply(func, (base_name, base_dir), kwargs) @@ -165,5 +167,3 @@ def make_archive (base_name, format, os.chdir(save_cwd) return filename - -# make_archive () diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py new file mode 100644 index 0000000000..f5fd9eabe4 --- /dev/null +++ b/tests/test_archive_util.py @@ -0,0 +1,70 @@ +"""Tests for distutils.archive_util.""" +__revision__ = "$Id:$" + +import unittest +import os + +from distutils.archive_util import (check_archive_formats, make_tarball, + make_zipfile, make_archive) +from distutils.spawn import find_executable +from distutils.tests import support + +try: + import zipfile + ZIP_SUPPORT = True +except ImportError: + ZIP_SUPPORT = find_executable('zip') + +class ArchiveUtilTestCase(support.TempdirManager, + unittest.TestCase): + + @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + def test_make_tarball(self): + # creating something to tar + tmpdir = self.mkdtemp() + self.write_file([tmpdir, 'file1'], 'xxx') + self.write_file([tmpdir, 'file2'], 'xxx') + + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + make_tarball(base_name, tmpdir) + + # check if the compressed tarball was created + tarball = base_name + '.tar.gz' + self.assert_(os.path.exists(tarball)) + + # trying an uncompressed one + base_name = os.path.join(tmpdir2, 'archive') + make_tarball(base_name, tmpdir, compress=None) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') + def test_make_tarball(self): + # creating something to tar + tmpdir = self.mkdtemp() + self.write_file([tmpdir, 'file1'], 'xxx') + self.write_file([tmpdir, 'file2'], 'xxx') + + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + make_zipfile(base_name, tmpdir) + + # check if the compressed tarball was created + tarball = base_name + '.zip' + + def test_check_archive_formats(self): + self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']), + 'xxx') + self.assertEquals(check_archive_formats(['gztar', 'zip']), None) + + def test_make_archive(self): + tmpdir = self.mkdtemp() + base_name = os.path.join(tmpdir, 'archive') + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + +def test_suite(): + return unittest.makeSuite(ArchiveUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 4a9bfc806815434110760ba83b05c58bc2fe3014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 12:12:02 +0000 Subject: [PATCH 2328/8469] Merged revisions 72736 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72736 | tarek.ziade | 2009-05-17 14:04:57 +0200 (Sun, 17 May 2009) | 1 line pep8-fied distutils.archive_util + added minimum test coverage ........ --- archive_util.py | 80 +++++++++++++++++++------------------- tests/test_archive_util.py | 70 +++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 40 deletions(-) create mode 100644 tests/test_archive_util.py diff --git a/archive_util.py b/archive_util.py index 9444ff012f..08a9e56901 100644 --- a/archive_util.py +++ b/archive_util.py @@ -11,15 +11,16 @@ from distutils.dir_util import mkpath from distutils import log -def make_tarball (base_name, base_dir, compress="gzip", - verbose=0, dry_run=0): +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under - 'base_dir'. 'compress' must be "gzip" (the default), "compress", - "bzip2", or None. Both "tar" and the compression utility named by - 'compress' must be on the default program search path, so this is - probably Unix-specific. The output tar file will be named 'base_dir' + - ".tar", possibly plus the appropriate compression extension (".gz", - ".bz2" or ".Z"). Return the output filename. + 'base_dir'. + + 'compress' must be "gzip" (the default), "compress", "bzip2", or None. + Both "tar" and the compression utility named by 'compress' must be on + the default program search path, so this is probably Unix-specific. + The output tar file will be named 'base_dir' + ".tar", possibly plus + the appropriate compression extension (".gz", ".bz2" or ".Z"). + Returns the output filename. """ # XXX GNU tar 1.13 has a nifty option to add a prefix directory. # It's pretty new, though, so we certainly can't require it -- @@ -27,9 +28,9 @@ def make_tarball (base_name, base_dir, compress="gzip", # "create a tree of hardlinks" step! (Would also be nice to # detect GNU tar to use its 'z' option and save a step.) - compress_ext = { 'gzip': ".gz", - 'bzip2': '.bz2', - 'compress': ".Z" } + compress_ext = {'gzip': ".gz", + 'bzip2': '.bz2', + 'compress': ".Z" } # flags for compression program, each element of list will be an argument compress_flags = {'gzip': ["-f9"], @@ -52,15 +53,14 @@ def make_tarball (base_name, base_dir, compress="gzip", else: return archive_name -# make_tarball () +def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): + """Create a zip file from all the files under 'base_dir'. - -def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): - """Create a zip file from all the files under 'base_dir'. The output - zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" - Python module (if available) or the InfoZIP "zip" utility (if installed - and found on the default search path). If neither tool is available, - raises DistutilsExecError. Returns the name of the output zip file. + The output zip file will be named 'base_dir' + ".zip". Uses either the + "zipfile" Python module (if available) or the InfoZIP "zip" utility + (if installed and found on the default search path). If neither tool is + available, raises DistutilsExecError. Returns the name of the output zip + file. """ try: import zipfile @@ -93,22 +93,19 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): zip_filename, base_dir) if not dry_run: - z = zipfile.ZipFile(zip_filename, "w", - compression=zipfile.ZIP_DEFLATED) + zip = zipfile.ZipFile(zip_filename, "w", + compression=zipfile.ZIP_DEFLATED) for dirpath, dirnames, filenames in os.walk(base_dir): for name in filenames: path = os.path.normpath(os.path.join(dirpath, name)) if os.path.isfile(path): - z.write(path, path) + zip.write(path, path) log.info("adding '%s'" % path) - z.close() + zip.close() return zip_filename -# make_zipfile () - - ARCHIVE_FORMATS = { 'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"), 'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"), @@ -117,19 +114,24 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): 'zip': (make_zipfile, [],"ZIP file") } -def check_archive_formats (formats): +def check_archive_formats(formats): + """Returns the first format from the 'format' list that is unknown. + + If all formats are known, returns None + """ for format in formats: if format not in ARCHIVE_FORMATS: return format - else: - return None - -def make_archive (base_name, format, - root_dir=None, base_dir=None, - verbose=0, dry_run=0): - """Create an archive file (eg. zip or tar). 'base_name' is the name - of the file to create, minus any format-specific extension; 'format' - is the archive format: one of "zip", "tar", "ztar", or "gztar". + return None + +def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, + dry_run=0): + """Create an archive file (eg. zip or tar). + + 'base_name' is the name of the file to create, minus any format-specific + extension; 'format' is the archive format: one of "zip", "tar", "ztar", + or "gztar". + 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the archive. 'base_dir' is the directory where we start archiving from; @@ -147,7 +149,7 @@ def make_archive (base_name, format, if base_dir is None: base_dir = os.curdir - kwargs = { 'dry_run': dry_run } + kwargs = {'dry_run': dry_run} try: format_info = ARCHIVE_FORMATS[format] @@ -155,7 +157,7 @@ def make_archive (base_name, format, raise ValueError("unknown archive format '%s'" % format) func = format_info[0] - for (arg,val) in format_info[1]: + for arg, val in format_info[1]: kwargs[arg] = val filename = func(base_name, base_dir, **kwargs) @@ -164,5 +166,3 @@ def make_archive (base_name, format, os.chdir(save_cwd) return filename - -# make_archive () diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py new file mode 100644 index 0000000000..f5fd9eabe4 --- /dev/null +++ b/tests/test_archive_util.py @@ -0,0 +1,70 @@ +"""Tests for distutils.archive_util.""" +__revision__ = "$Id:$" + +import unittest +import os + +from distutils.archive_util import (check_archive_formats, make_tarball, + make_zipfile, make_archive) +from distutils.spawn import find_executable +from distutils.tests import support + +try: + import zipfile + ZIP_SUPPORT = True +except ImportError: + ZIP_SUPPORT = find_executable('zip') + +class ArchiveUtilTestCase(support.TempdirManager, + unittest.TestCase): + + @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + def test_make_tarball(self): + # creating something to tar + tmpdir = self.mkdtemp() + self.write_file([tmpdir, 'file1'], 'xxx') + self.write_file([tmpdir, 'file2'], 'xxx') + + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + make_tarball(base_name, tmpdir) + + # check if the compressed tarball was created + tarball = base_name + '.tar.gz' + self.assert_(os.path.exists(tarball)) + + # trying an uncompressed one + base_name = os.path.join(tmpdir2, 'archive') + make_tarball(base_name, tmpdir, compress=None) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') + def test_make_tarball(self): + # creating something to tar + tmpdir = self.mkdtemp() + self.write_file([tmpdir, 'file1'], 'xxx') + self.write_file([tmpdir, 'file2'], 'xxx') + + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + make_zipfile(base_name, tmpdir) + + # check if the compressed tarball was created + tarball = base_name + '.zip' + + def test_check_archive_formats(self): + self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']), + 'xxx') + self.assertEquals(check_archive_formats(['gztar', 'zip']), None) + + def test_make_archive(self): + tmpdir = self.mkdtemp() + base_name = os.path.join(tmpdir, 'archive') + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + +def test_suite(): + return unittest.makeSuite(ArchiveUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 535f0f46a86e0b1625dc4bb7ebd6e1c9d89bb2e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 14:59:05 +0000 Subject: [PATCH 2329/8469] fixed the test name --- tests/test_archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index f5fd9eabe4..3e1e04a75f 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -1,5 +1,5 @@ """Tests for distutils.archive_util.""" -__revision__ = "$Id:$" +__revision__ = "$Id$" import unittest import os @@ -40,7 +40,7 @@ def test_make_tarball(self): self.assert_(os.path.exists(tarball)) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') - def test_make_tarball(self): + def test_make_zipfile(self): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') From 445d69ec9e89b0008380697c8337e0b8850d8bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 17 May 2009 15:03:23 +0000 Subject: [PATCH 2330/8469] Merged revisions 72746 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72746 | tarek.ziade | 2009-05-17 16:59:05 +0200 (Sun, 17 May 2009) | 1 line fixed the test name ........ --- tests/test_archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index f5fd9eabe4..3e1e04a75f 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -1,5 +1,5 @@ """Tests for distutils.archive_util.""" -__revision__ = "$Id:$" +__revision__ = "$Id$" import unittest import os @@ -40,7 +40,7 @@ def test_make_tarball(self): self.assert_(os.path.exists(tarball)) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') - def test_make_tarball(self): + def test_make_zipfile(self): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') From fba15990838934c09b76999ff14350ac8105feef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:03:37 +0000 Subject: [PATCH 2331/8469] Fixed the library extension when distutils build_ext is used inplace --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 11 ++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 10d50fade7..0c77aaa665 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -649,7 +649,8 @@ def get_ext_fullpath(self, ext_name): base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) - return os.path.join(package_dir, base) + filename = self.get_ext_filename(ext_name) + return os.path.join(package_dir, filename) else: filename = self.get_ext_filename(ext_name) return os.path.join(self.build_lib, filename) @@ -663,12 +664,11 @@ def get_ext_fullname(self, ext_name): else: return self.package + '.' + ext_name - def get_ext_filename (self, ext_name): + def get_ext_filename(self, ext_name): r"""Convert the name of an extension (eg. "foo.bar") into the name of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - from distutils.sysconfig import get_config_var ext_path = string.split(ext_name, '.') # OS/2 has an 8 character module (extension) limit :-( diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 7e3f716500..f1f80bea5d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,12 +19,6 @@ # Don't load the xx module more than once. ALREADY_TESTED = False -if sys.platform != 'win32': - UNDER_MSVC8 = False -else: - from distutils.msvccompiler import get_build_version - UNDER_MSVC8 = get_build_version() < 8.0 - def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -299,7 +293,6 @@ def test_compiler_option(self): cmd.run() self.assertEquals(cmd.compiler, 'unix') - @unittest.skipIf(UNDER_MSVC8, 'not running this test for MSVC < 8') def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') @@ -329,6 +322,8 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) @@ -336,6 +331,8 @@ def test_get_outputs(self): cmd.run() so_file = cmd.get_outputs()[0] self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) From 86915f4a6cb7244864725cc0c07daceee33fe8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:05:17 +0000 Subject: [PATCH 2332/8469] Merged revisions 72758 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72758 | tarek.ziade | 2009-05-18 10:03:37 +0200 (Mon, 18 May 2009) | 1 line Fixed the library extension when distutils build_ext is used inplace ........ --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 01bab3664f..85935d37bf 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -635,7 +635,8 @@ def get_ext_fullpath(self, ext_name): base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) - return os.path.join(package_dir, base) + filename = self.get_ext_filename(ext_name) + return os.path.join(package_dir, filename) else: filename = self.get_ext_filename(ext_name) return os.path.join(self.build_lib, filename) @@ -649,12 +650,11 @@ def get_ext_fullname(self, ext_name): else: return self.package + '.' + ext_name - def get_ext_filename (self, ext_name): + def get_ext_filename(self, ext_name): r"""Convert the name of an extension (eg. "foo.bar") into the name of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - from distutils.sysconfig import get_config_var ext_path = string.split(ext_name, '.') # OS/2 has an 8 character module (extension) limit :-( diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 21020d3927..bd906e35e5 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -17,12 +17,6 @@ # Don't load the xx module more than once. ALREADY_TESTED = False -if sys.platform != 'win32': - UNDER_MSVC8 = False -else: - from distutils.msvccompiler import get_build_version - UNDER_MSVC8 = get_build_version() < 8.0 - class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -267,6 +261,8 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) @@ -274,6 +270,8 @@ def test_get_outputs(self): cmd.run() so_file = cmd.get_outputs()[0] self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) From 2a6e4aeb17aaaa1618b9fbf66241e91fcd38d755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:07:46 +0000 Subject: [PATCH 2333/8469] Merged revisions 72758 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72758 | tarek.ziade | 2009-05-18 10:03:37 +0200 (Mon, 18 May 2009) | 1 line Fixed the library extension when distutils build_ext is used inplace ........ --- command/build_ext.py | 3 ++- tests/test_build_ext.py | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c39bd72d62..eb4cb051c4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -636,7 +636,8 @@ def get_ext_fullpath(self, ext_name): base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) - return os.path.join(package_dir, base) + filename = self.get_ext_filename(ext_name) + return os.path.join(package_dir, filename) else: filename = self.get_ext_filename(ext_name) return os.path.join(self.build_lib, filename) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 764aa727d1..add2923b87 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -20,12 +20,6 @@ # Don't load the xx module more than once. ALREADY_TESTED = False -if sys.platform != 'win32': - UNDER_MSVC8 = False -else: - from distutils.msvccompiler import get_build_version - UNDER_MSVC8 = get_build_version() < 8.0 - def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -299,7 +293,6 @@ def test_compiler_option(self): cmd.run() self.assertEquals(cmd.compiler, 'unix') - @unittest.skipIf(UNDER_MSVC8, 'not running this test for MSVC < 8') def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') @@ -329,6 +322,8 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) @@ -336,6 +331,8 @@ def test_get_outputs(self): cmd.run() so_file = cmd.get_outputs()[0] self.assert_(os.path.exists(so_file)) + self.assertEquals(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) From 081b45d279495030ace791b068945064d38565e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:08:31 +0000 Subject: [PATCH 2334/8469] removed badly merged section --- tests/test_build_ext.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index bd906e35e5..fcca2f0d96 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -231,8 +231,6 @@ def test_compiler_option(self): self.assertEquals(cmd.compiler, 'unix') def test_get_outputs(self): - if UNDER_MSVC8: - return # not running this test for MSVC < 8 tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') self.write_file(c_file, 'void initfoo(void) {};\n') From 339ad8b282de40378695f6858187fe1d78792e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:20:55 +0000 Subject: [PATCH 2335/8469] working with relative paths to avoid tar warnings on absolute paths --- tests/test_archive_util.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 3e1e04a75f..1c88457d01 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -27,7 +27,14 @@ def test_make_tarball(self): tmpdir2 = self.mkdtemp() base_name = os.path.join(tmpdir2, 'archive') - make_tarball(base_name, tmpdir) + + # working with relative paths to avoid tar warnings + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, '.') + finally: + os.chdir(old_dir) # check if the compressed tarball was created tarball = base_name + '.tar.gz' @@ -35,7 +42,12 @@ def test_make_tarball(self): # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') - make_tarball(base_name, tmpdir, compress=None) + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, '.', compress=None) + finally: + os.chdir(old_dir) tarball = base_name + '.tar' self.assert_(os.path.exists(tarball)) From 20cee3dea3f35f7c7b293828339f1b32f138a439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 08:22:38 +0000 Subject: [PATCH 2336/8469] Merged revisions 72764 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72764 | tarek.ziade | 2009-05-18 10:20:55 +0200 (Mon, 18 May 2009) | 1 line working with relative paths to avoid tar warnings on absolute paths ........ --- tests/test_archive_util.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 3e1e04a75f..1c88457d01 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -27,7 +27,14 @@ def test_make_tarball(self): tmpdir2 = self.mkdtemp() base_name = os.path.join(tmpdir2, 'archive') - make_tarball(base_name, tmpdir) + + # working with relative paths to avoid tar warnings + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, '.') + finally: + os.chdir(old_dir) # check if the compressed tarball was created tarball = base_name + '.tar.gz' @@ -35,7 +42,12 @@ def test_make_tarball(self): # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') - make_tarball(base_name, tmpdir, compress=None) + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, '.', compress=None) + finally: + os.chdir(old_dir) tarball = base_name + '.tar' self.assert_(os.path.exists(tarball)) From 74ddca391d68fdf88f9c8cd920c90b0b00e29952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 12:21:26 +0000 Subject: [PATCH 2337/8469] Fixed #6053 - win32 fixes for distutils tests --- tests/test_archive_util.py | 8 ++++++-- tests/test_dir_util.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 1c88457d01..cabb55bc15 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -3,6 +3,7 @@ import unittest import os +from os.path import splitdrive from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile, make_archive) @@ -26,13 +27,16 @@ def test_make_tarball(self): self.write_file([tmpdir, 'file2'], 'xxx') tmpdir2 = self.mkdtemp() + unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], + "Source and target should be on same drive") + base_name = os.path.join(tmpdir2, 'archive') # working with relative paths to avoid tar warnings old_dir = os.getcwd() os.chdir(tmpdir) try: - make_tarball(base_name, '.') + make_tarball(splitdrive(base_name)[1], '.') finally: os.chdir(old_dir) @@ -45,7 +49,7 @@ def test_make_tarball(self): old_dir = os.getcwd() os.chdir(tmpdir) try: - make_tarball(base_name, '.', compress=None) + make_tarball(splitdrive(base_name)[1], '.', compress=None) finally: os.chdir(old_dir) tarball = base_name + '.tar' diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 9bd6530c14..6b22f05ff0 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -88,7 +88,7 @@ def test_ensure_relative(self): self.assertEquals(ensure_relative('/home/foo'), 'home/foo') self.assertEquals(ensure_relative('some/path'), 'some/path') else: # \\ - self.assertEquals(ensure_relative('c:\\home\\foo'), 'home\\foo') + self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo') self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') def test_suite(): From a1f34fda85afa9ae18b3171d03dd258169d3f52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 18 May 2009 12:29:06 +0000 Subject: [PATCH 2338/8469] Merged revisions 72768 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72768 | tarek.ziade | 2009-05-18 14:21:26 +0200 (Mon, 18 May 2009) | 1 line Fixed #6053 - win32 fixes for distutils tests ........ --- tests/test_archive_util.py | 8 ++++++-- tests/test_dir_util.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 1c88457d01..cabb55bc15 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -3,6 +3,7 @@ import unittest import os +from os.path import splitdrive from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile, make_archive) @@ -26,13 +27,16 @@ def test_make_tarball(self): self.write_file([tmpdir, 'file2'], 'xxx') tmpdir2 = self.mkdtemp() + unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], + "Source and target should be on same drive") + base_name = os.path.join(tmpdir2, 'archive') # working with relative paths to avoid tar warnings old_dir = os.getcwd() os.chdir(tmpdir) try: - make_tarball(base_name, '.') + make_tarball(splitdrive(base_name)[1], '.') finally: os.chdir(old_dir) @@ -45,7 +49,7 @@ def test_make_tarball(self): old_dir = os.getcwd() os.chdir(tmpdir) try: - make_tarball(base_name, '.', compress=None) + make_tarball(splitdrive(base_name)[1], '.', compress=None) finally: os.chdir(old_dir) tarball = base_name + '.tar' diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 9bd6530c14..6b22f05ff0 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -88,7 +88,7 @@ def test_ensure_relative(self): self.assertEquals(ensure_relative('/home/foo'), 'home/foo') self.assertEquals(ensure_relative('some/path'), 'some/path') else: # \\ - self.assertEquals(ensure_relative('c:\\home\\foo'), 'home\\foo') + self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo') self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') def test_suite(): From f8d02d79647a15807b50a43f1a4614f0fdf288ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 19 May 2009 16:17:21 +0000 Subject: [PATCH 2339/8469] fixed the 'package' option of build_ext --- command/build_ext.py | 24 +++++++++++++----------- tests/test_build_ext.py | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0c77aaa665..293c214de7 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -642,19 +642,21 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ - if self.inplace: - fullname = self.get_ext_fullname(ext_name) - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - build_py = self.get_finalized_command('build_py') - package_dir = os.path.abspath(build_py.get_package_dir(package)) - filename = self.get_ext_filename(ext_name) - return os.path.join(package_dir, filename) - else: - filename = self.get_ext_filename(ext_name) + fullname = self.get_ext_fullname(ext_name) + filename = self.get_ext_filename(fullname) + if not self.inplace: + # no further work needed return os.path.join(self.build_lib, filename) + # the inplace option requires to find the package directory + # using the build_py command + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, filename) + def get_ext_fullname(self, ext_name): """Returns the fullname of a given extension name. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index f1f80bea5d..12b8581c97 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -336,6 +336,28 @@ def test_get_outputs(self): so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) + # inplace = 0, cmd.package = 'bar' + cmd.package = 'bar' + path = cmd.get_ext_fullpath('foo') + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + + # inplace = 1, cmd.package = 'bar' + cmd.inplace = 1 + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + path = cmd.get_ext_fullpath('foo') + finally: + os.chdir(old_wd) + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 7a61abeaf1519c93e89032e34b44b0a311015ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 19 May 2009 16:19:15 +0000 Subject: [PATCH 2340/8469] Merged revisions 72781 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72781 | tarek.ziade | 2009-05-19 18:17:21 +0200 (Tue, 19 May 2009) | 1 line fixed the 'package' option of build_ext ........ --- command/build_ext.py | 24 +++++++++++++----------- tests/test_build_ext.py | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 85935d37bf..e6e33ab95c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -628,19 +628,21 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ - if self.inplace: - fullname = self.get_ext_fullname(ext_name) - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - build_py = self.get_finalized_command('build_py') - package_dir = os.path.abspath(build_py.get_package_dir(package)) - filename = self.get_ext_filename(ext_name) - return os.path.join(package_dir, filename) - else: - filename = self.get_ext_filename(ext_name) + fullname = self.get_ext_fullname(ext_name) + filename = self.get_ext_filename(fullname) + if not self.inplace: + # no further work needed return os.path.join(self.build_lib, filename) + # the inplace option requires to find the package directory + # using the build_py command + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, filename) + def get_ext_fullname(self, ext_name): """Returns the fullname of a given extension name. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index fcca2f0d96..dc8df98fd7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -273,6 +273,28 @@ def test_get_outputs(self): so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) + # inplace = 0, cmd.package = 'bar' + cmd.package = 'bar' + path = cmd.get_ext_fullpath('foo') + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + + # inplace = 1, cmd.package = 'bar' + cmd.inplace = 1 + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + path = cmd.get_ext_fullpath('foo') + finally: + os.chdir(old_wd) + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 92ad4a19caeac451803ca1737b0d5514497e5be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 19 May 2009 16:22:57 +0000 Subject: [PATCH 2341/8469] Merged revisions 72781 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72781 | tarek.ziade | 2009-05-19 18:17:21 +0200 (Tue, 19 May 2009) | 1 line fixed the 'package' option of build_ext ........ --- command/build_ext.py | 24 +++++++++++++----------- tests/test_build_ext.py | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index eb4cb051c4..31e036bceb 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -629,19 +629,21 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ - if self.inplace: - fullname = self.get_ext_fullname(ext_name) - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - build_py = self.get_finalized_command('build_py') - package_dir = os.path.abspath(build_py.get_package_dir(package)) - filename = self.get_ext_filename(ext_name) - return os.path.join(package_dir, filename) - else: - filename = self.get_ext_filename(ext_name) + fullname = self.get_ext_fullname(ext_name) + filename = self.get_ext_filename(fullname) + if not self.inplace: + # no further work needed return os.path.join(self.build_lib, filename) + # the inplace option requires to find the package directory + # using the build_py command + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + return os.path.join(package_dir, filename) + def get_ext_fullname(self, ext_name): """Returns the fullname of a given extension name. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index add2923b87..4ea11a159d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -336,6 +336,28 @@ def test_get_outputs(self): so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) + # inplace = 0, cmd.package = 'bar' + cmd.package = 'bar' + path = cmd.get_ext_fullpath('foo') + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + + # inplace = 1, cmd.package = 'bar' + cmd.inplace = 1 + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + path = cmd.get_ext_fullpath('foo') + finally: + os.chdir(old_wd) + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + self.assertEquals(lastdir, cmd.package) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 0b15216368f28f9178947b1f2df283b73f4a5633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 22 May 2009 09:42:43 +0000 Subject: [PATCH 2342/8469] fixed encoding --- command/bdist_msi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 18bddeb483..4272b818bd 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2005, 2006 Martin v. Löwis +# -*- coding: utf-8 -*- +# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst From a81606b89db3da71c18ace79793438e7abb4aa42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 24 May 2009 19:10:52 +0000 Subject: [PATCH 2343/8469] Issue #6065: Do not try to build a version-independent installer if the package has extension modules. Also add NEWS entry for #5311. --- command/bdist_msi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 4272b818bd..b42e41b373 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -141,6 +141,8 @@ def finalize_options (self): bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') short_version = get_python_version() + if (not self.target_version) and self.distribution.has_ext_modules(): + self.target_version = short_version if self.target_version: self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ From 0c3b40e164295dbd4282d6ad7675934758d6e36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 24 May 2009 19:19:17 +0000 Subject: [PATCH 2344/8469] Merged revisions 72891 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72891 | martin.v.loewis | 2009-05-24 21:10:52 +0200 (So, 24 Mai 2009) | 5 lines Issue #6065: Do not try to build a version-independent installer if the package has extension modules. Also add NEWS entry for #5311. ........ --- command/bdist_msi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 9645158637..bca98cc23e 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -141,6 +141,8 @@ def finalize_options(self): bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') short_version = get_python_version() + if (not self.target_version) and self.distribution.has_ext_modules(): + self.target_version = short_version if self.target_version: self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ From 8488006f14d1c8008e2019f673a002e18062ff1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 28 May 2009 12:53:54 +0000 Subject: [PATCH 2345/8469] Fixed #6048: Distutils uses the tarfile module instead of the tar command now --- archive_util.py | 58 +++++++++++-------- tests/test_archive_util.py | 113 ++++++++++++++++++++++++++++++++++++- 2 files changed, 146 insertions(+), 25 deletions(-) diff --git a/archive_util.py b/archive_util.py index f5959f5e64..62150b0ddd 100644 --- a/archive_util.py +++ b/archive_util.py @@ -6,6 +6,9 @@ __revision__ = "$Id$" import os +from warnings import warn +import sys + from distutils.errors import DistutilsExecError from distutils.spawn import spawn from distutils.dir_util import mkpath @@ -22,36 +25,45 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): the appropriate compression extension (".gz", ".bz2" or ".Z"). Returns the output filename. """ - # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- - # but it would be nice to take advantage of it to skip the - # "create a tree of hardlinks" step! (Would also be nice to - # detect GNU tar to use its 'z' option and save a step.) - - compress_ext = {'gzip': ".gz", - 'bzip2': '.bz2', - 'compress': ".Z" } + tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} + compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'compress': '.Z'} # flags for compression program, each element of list will be an argument - compress_flags = {'gzip': ["-f9"], - 'compress': ["-f"], - 'bzip2': ['-f9']} - if compress is not None and compress not in compress_ext.keys(): raise ValueError, \ - "bad value for 'compress': must be None, 'gzip', or 'compress'" + ("bad value for 'compress': must be None, 'gzip', 'bzip2' " + "or 'compress'") + + archive_name = base_name + '.tar' + if compress != 'compress': + archive_name += compress_ext.get(compress, '') - archive_name = base_name + ".tar" mkpath(os.path.dirname(archive_name), dry_run=dry_run) - cmd = ["tar", "-cf", archive_name, base_dir] - spawn(cmd, dry_run=dry_run) - if compress: - spawn([compress] + compress_flags[compress] + [archive_name], - dry_run=dry_run) - return archive_name + compress_ext[compress] - else: - return archive_name + # creating the tarball + import tarfile # late import so Python build itself doesn't break + + log.info('Creating tar archive') + if not dry_run: + tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) + try: + tar.add(base_dir) + finally: + tar.close() + + # compression using `compress` + if compress == 'compress': + warn("'compress' will be deprecated.", PendingDeprecationWarning) + # the option varies depending on the platform + compressed_name = archive_name + compress_ext[compress] + if sys.platform == 'win32': + cmd = [compress, archive_name, compressed_name] + else: + cmd = [compress, '-f', archive_name] + spawn(cmd, dry_run=dry_run) + return compressed_name + + return archive_name def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index cabb55bc15..2b24152632 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -3,12 +3,15 @@ import unittest import os +import tarfile from os.path import splitdrive +import warnings from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile, make_archive) -from distutils.spawn import find_executable +from distutils.spawn import find_executable, spawn from distutils.tests import support +from test.test_support import check_warnings try: import zipfile @@ -19,12 +22,13 @@ class ArchiveUtilTestCase(support.TempdirManager, unittest.TestCase): - @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') self.write_file([tmpdir, 'file2'], 'xxx') + os.mkdir(os.path.join(tmpdir, 'sub')) + self.write_file([tmpdir, 'sub', 'file3'], 'xxx') tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], @@ -55,6 +59,111 @@ def test_make_tarball(self): tarball = base_name + '.tar' self.assert_(os.path.exists(tarball)) + def _tarinfo(self, path): + tar = tarfile.open(path) + try: + names = tar.getnames() + names.sort() + return tuple(names) + finally: + tar.close() + + def _create_files(self): + # creating something to tar + tmpdir = self.mkdtemp() + dist = os.path.join(tmpdir, 'dist') + os.mkdir(dist) + self.write_file([dist, 'file1'], 'xxx') + self.write_file([dist, 'file2'], 'xxx') + os.mkdir(os.path.join(dist, 'sub')) + self.write_file([dist, 'sub', 'file3'], 'xxx') + os.mkdir(os.path.join(dist, 'sub2')) + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + return tmpdir, tmpdir2, base_name + + @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + def test_tarfile_vs_tar(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist') + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + tarball = base_name + '.tar.gz' + self.assert_(os.path.exists(tarball)) + + # now create another tarball using `tar` + tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') + cmd = ['tar', '-czf', 'archive2.tar.gz', 'dist'] + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + spawn(cmd) + finally: + os.chdir(old_dir) + + self.assert_(os.path.exists(tarball2)) + # let's compare both tarballs + self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) + + # trying an uncompressed one + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist', compress=None) + finally: + os.chdir(old_dir) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + # now for a dry_run + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist', compress=None, dry_run=True) + finally: + os.chdir(old_dir) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + @unittest.skipUnless(find_executable('compress'), + 'The compress program is required') + def test_compress_deprecated(self): + tmpdir, tmpdir2, base_name = self._create_files() + + # using compress and testing the PendingDeprecationWarning + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + with check_warnings() as w: + warnings.simplefilter("always") + make_tarball(base_name, 'dist', compress='compress') + finally: + os.chdir(old_dir) + tarball = base_name + '.tar.Z' + self.assert_(os.path.exists(tarball)) + self.assertEquals(len(w.warnings), 1) + + # same test with dry_run + os.remove(tarball) + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + with check_warnings() as w: + warnings.simplefilter("always") + make_tarball(base_name, 'dist', compress='compress', + dry_run=True) + finally: + os.chdir(old_dir) + self.assert_(not os.path.exists(tarball)) + self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar From f8af27c626419e60e9f6df824d2fb96f9ee8d2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 28 May 2009 13:01:13 +0000 Subject: [PATCH 2346/8469] Merged revisions 72981 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72981 | tarek.ziade | 2009-05-28 14:53:54 +0200 (Thu, 28 May 2009) | 1 line Fixed #6048: Distutils uses the tarfile module instead of the tar command now ........ --- archive_util.py | 58 +++++++++++-------- tests/test_archive_util.py | 113 ++++++++++++++++++++++++++++++++++++- 2 files changed, 146 insertions(+), 25 deletions(-) diff --git a/archive_util.py b/archive_util.py index 08a9e56901..a568854e4e 100644 --- a/archive_util.py +++ b/archive_util.py @@ -6,6 +6,9 @@ __revision__ = "$Id$" import os +from warnings import warn +import sys + from distutils.errors import DistutilsExecError from distutils.spawn import spawn from distutils.dir_util import mkpath @@ -22,36 +25,45 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): the appropriate compression extension (".gz", ".bz2" or ".Z"). Returns the output filename. """ - # XXX GNU tar 1.13 has a nifty option to add a prefix directory. - # It's pretty new, though, so we certainly can't require it -- - # but it would be nice to take advantage of it to skip the - # "create a tree of hardlinks" step! (Would also be nice to - # detect GNU tar to use its 'z' option and save a step.) - - compress_ext = {'gzip': ".gz", - 'bzip2': '.bz2', - 'compress': ".Z" } + tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} + compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'compress': '.Z'} # flags for compression program, each element of list will be an argument - compress_flags = {'gzip': ["-f9"], - 'compress': ["-f"], - 'bzip2': ['-f9']} - if compress is not None and compress not in compress_ext.keys(): raise ValueError( - "bad value for 'compress': must be None, 'gzip', or 'compress'") + "bad value for 'compress': must be None, 'gzip', 'bzip2' " + "or 'compress'") + + archive_name = base_name + '.tar' + if compress != 'compress': + archive_name += compress_ext.get(compress, '') - archive_name = base_name + ".tar" mkpath(os.path.dirname(archive_name), dry_run=dry_run) - cmd = ["tar", "-cf", archive_name, base_dir] - spawn(cmd, dry_run=dry_run) - if compress: - spawn([compress] + compress_flags[compress] + [archive_name], - dry_run=dry_run) - return archive_name + compress_ext[compress] - else: - return archive_name + # creating the tarball + import tarfile # late import so Python build itself doesn't break + + log.info('Creating tar archive') + if not dry_run: + tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) + try: + tar.add(base_dir) + finally: + tar.close() + + # compression using `compress` + if compress == 'compress': + warn("'compress' will be deprecated.", PendingDeprecationWarning) + # the option varies depending on the platform + compressed_name = archive_name + compress_ext[compress] + if sys.platform == 'win32': + cmd = [compress, archive_name, compressed_name] + else: + cmd = [compress, '-f', archive_name] + spawn(cmd, dry_run=dry_run) + return compressed_name + + return archive_name def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index cabb55bc15..5db9a5d096 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -3,12 +3,15 @@ import unittest import os +import tarfile from os.path import splitdrive +import warnings from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile, make_archive) -from distutils.spawn import find_executable +from distutils.spawn import find_executable, spawn from distutils.tests import support +from test.support import check_warnings try: import zipfile @@ -19,12 +22,13 @@ class ArchiveUtilTestCase(support.TempdirManager, unittest.TestCase): - @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') self.write_file([tmpdir, 'file2'], 'xxx') + os.mkdir(os.path.join(tmpdir, 'sub')) + self.write_file([tmpdir, 'sub', 'file3'], 'xxx') tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], @@ -55,6 +59,111 @@ def test_make_tarball(self): tarball = base_name + '.tar' self.assert_(os.path.exists(tarball)) + def _tarinfo(self, path): + tar = tarfile.open(path) + try: + names = tar.getnames() + names.sort() + return tuple(names) + finally: + tar.close() + + def _create_files(self): + # creating something to tar + tmpdir = self.mkdtemp() + dist = os.path.join(tmpdir, 'dist') + os.mkdir(dist) + self.write_file([dist, 'file1'], 'xxx') + self.write_file([dist, 'file2'], 'xxx') + os.mkdir(os.path.join(dist, 'sub')) + self.write_file([dist, 'sub', 'file3'], 'xxx') + os.mkdir(os.path.join(dist, 'sub2')) + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + return tmpdir, tmpdir2, base_name + + @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + def test_tarfile_vs_tar(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist') + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + tarball = base_name + '.tar.gz' + self.assert_(os.path.exists(tarball)) + + # now create another tarball using `tar` + tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') + cmd = ['tar', '-czf', 'archive2.tar.gz', 'dist'] + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + spawn(cmd) + finally: + os.chdir(old_dir) + + self.assert_(os.path.exists(tarball2)) + # let's compare both tarballs + self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) + + # trying an uncompressed one + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist', compress=None) + finally: + os.chdir(old_dir) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + # now for a dry_run + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist', compress=None, dry_run=True) + finally: + os.chdir(old_dir) + tarball = base_name + '.tar' + self.assert_(os.path.exists(tarball)) + + @unittest.skipUnless(find_executable('compress'), + 'The compress program is required') + def test_compress_deprecated(self): + tmpdir, tmpdir2, base_name = self._create_files() + + # using compress and testing the PendingDeprecationWarning + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + with check_warnings() as w: + warnings.simplefilter("always") + make_tarball(base_name, 'dist', compress='compress') + finally: + os.chdir(old_dir) + tarball = base_name + '.tar.Z' + self.assert_(os.path.exists(tarball)) + self.assertEquals(len(w.warnings), 1) + + # same test with dry_run + os.remove(tarball) + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + with check_warnings() as w: + warnings.simplefilter("always") + make_tarball(base_name, 'dist', compress='compress', + dry_run=True) + finally: + os.chdir(old_dir) + self.assert_(not os.path.exists(tarball)) + self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar From 3917b17a0342869c54a033eb234c298b4e19a688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 28 May 2009 13:55:51 +0000 Subject: [PATCH 2347/8469] using 'tar' then 'gzip' in the test, because 'tar -czf' is not supported under some platforms --- tests/test_archive_util.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 2b24152632..29cd271faf 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -20,6 +20,7 @@ ZIP_SUPPORT = find_executable('zip') class ArchiveUtilTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_make_tarball(self): @@ -82,7 +83,8 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name - @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), + 'Need the tar command to run') def test_tarfile_vs_tar(self): tmpdir, tmpdir2, base_name = self._create_files() old_dir = os.getcwd() @@ -98,11 +100,13 @@ def test_tarfile_vs_tar(self): # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') - cmd = ['tar', '-czf', 'archive2.tar.gz', 'dist'] + tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist'] + gzip_cmd = ['gzip', '-f9', 'archive2.tar'] old_dir = os.getcwd() os.chdir(tmpdir) try: - spawn(cmd) + spawn(tar_cmd) + spawn(gzip_cmd) finally: os.chdir(old_dir) From 3418332f7bce309b6d404bd8e1a9775ea180e93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 28 May 2009 14:02:58 +0000 Subject: [PATCH 2348/8469] Merged revisions 72986 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72986 | tarek.ziade | 2009-05-28 15:55:51 +0200 (Thu, 28 May 2009) | 1 line using 'tar' then 'gzip' in the test, because 'tar -czf' is not supported under some platforms ........ --- tests/test_archive_util.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 5db9a5d096..663b33532a 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -20,6 +20,7 @@ ZIP_SUPPORT = find_executable('zip') class ArchiveUtilTestCase(support.TempdirManager, + support.LoggingSilencer, unittest.TestCase): def test_make_tarball(self): @@ -82,7 +83,8 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name - @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run') + @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), + 'Need the tar command to run') def test_tarfile_vs_tar(self): tmpdir, tmpdir2, base_name = self._create_files() old_dir = os.getcwd() @@ -98,11 +100,13 @@ def test_tarfile_vs_tar(self): # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') - cmd = ['tar', '-czf', 'archive2.tar.gz', 'dist'] + tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist'] + gzip_cmd = ['gzip', '-f9', 'archive2.tar'] old_dir = os.getcwd() os.chdir(tmpdir) try: - spawn(cmd) + spawn(tar_cmd) + spawn(gzip_cmd) finally: os.chdir(old_dir) From c9712ebc8749a8217c58091b11cf21f707a1a42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 29 May 2009 08:08:07 +0000 Subject: [PATCH 2349/8469] Fixed #6131: test_modulefinder leaked when run after test_distutils --- tests/test_bdist_dumb.py | 6 ++---- tests/test_dir_util.py | 4 ++-- tests/test_file_util.py | 4 ++-- tests/test_register.py | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 2863b620db..d2ea201bd4 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -22,16 +22,14 @@ class BuildDumbTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): - support.TempdirManager.setUp(self) - support.LoggingSilencer.setUp(self) + super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() self.old_sys_argv = sys.argv[:] def tearDown(self): os.chdir(self.old_location) sys.argv = self.old_sys_argv[:] - support.LoggingSilencer.tearDown(self) - support.TempdirManager.tearDown(self) + super(BuildDumbTestCase, self).tearDown() def test_simple_built(self): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 6b22f05ff0..0f694aa020 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -18,7 +18,7 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): - support.TempdirManager.setUp(self) + super(DirUtilTestCase, self).setUp() self._logs = [] tmp_dir = self.mkdtemp() self.root_target = os.path.join(tmp_dir, 'deep') @@ -29,7 +29,7 @@ def setUp(self): def tearDown(self): log.info = self.old_log - support.TempdirManager.tearDown(self) + super(DirUtilTestCase, self).tearDown() def test_mkpath_remove_tree_verbosity(self): diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 9373af8503..fac4a5d1a9 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -16,7 +16,7 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): - support.TempdirManager.setUp(self) + super(FileUtilTestCase, self).setUp() self._logs = [] self.old_log = log.info log.info = self._log @@ -27,7 +27,7 @@ def setUp(self): def tearDown(self): log.info = self.old_log - support.TempdirManager.tearDown(self) + super(FileUtilTestCase, self).tearDown() def test_move_file_verbosity(self): f = open(self.source, 'w') diff --git a/tests/test_register.py b/tests/test_register.py index 91d3581373..0c6bf66989 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -66,7 +66,7 @@ def read(self): class RegisterTestCase(PyPIRCCommandTestCase): def setUp(self): - PyPIRCCommandTestCase.setUp(self) + super(RegisterTestCase, self).setUp() # patching the password prompt self._old_getpass = getpass.getpass def _getpass(prompt): @@ -78,7 +78,7 @@ def _getpass(prompt): def tearDown(self): getpass.getpass = self._old_getpass urllib2.build_opener = self.old_opener - PyPIRCCommandTestCase.tearDown(self) + super(RegisterTestCase, self).tearDown() def _get_cmd(self, metadata=None): if metadata is None: From f9b04c5e43bf858c654b1557447ed19051bd85a4 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Fri, 29 May 2009 09:14:04 +0000 Subject: [PATCH 2350/8469] Merged revisions 73008 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73008 | tarek.ziade | 2009-05-29 17:08:07 +0900 | 1 line Fixed #6131: test_modulefinder leaked when run after test_distutils ........ --- tests/test_bdist_dumb.py | 6 ++---- tests/test_dir_util.py | 4 ++-- tests/test_file_util.py | 4 ++-- tests/test_register.py | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 2863b620db..d2ea201bd4 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -22,16 +22,14 @@ class BuildDumbTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): - support.TempdirManager.setUp(self) - support.LoggingSilencer.setUp(self) + super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() self.old_sys_argv = sys.argv[:] def tearDown(self): os.chdir(self.old_location) sys.argv = self.old_sys_argv[:] - support.LoggingSilencer.tearDown(self) - support.TempdirManager.tearDown(self) + super(BuildDumbTestCase, self).tearDown() def test_simple_built(self): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 6b22f05ff0..0f694aa020 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -18,7 +18,7 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): - support.TempdirManager.setUp(self) + super(DirUtilTestCase, self).setUp() self._logs = [] tmp_dir = self.mkdtemp() self.root_target = os.path.join(tmp_dir, 'deep') @@ -29,7 +29,7 @@ def setUp(self): def tearDown(self): log.info = self.old_log - support.TempdirManager.tearDown(self) + super(DirUtilTestCase, self).tearDown() def test_mkpath_remove_tree_verbosity(self): diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 9373af8503..fac4a5d1a9 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -16,7 +16,7 @@ def _log(self, msg, *args): self._logs.append(msg) def setUp(self): - support.TempdirManager.setUp(self) + super(FileUtilTestCase, self).setUp() self._logs = [] self.old_log = log.info log.info = self._log @@ -27,7 +27,7 @@ def setUp(self): def tearDown(self): log.info = self.old_log - support.TempdirManager.tearDown(self) + super(FileUtilTestCase, self).tearDown() def test_move_file_verbosity(self): f = open(self.source, 'w') diff --git a/tests/test_register.py b/tests/test_register.py index f486cf797e..d9ff3ec441 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -66,7 +66,7 @@ def read(self): class RegisterTestCase(PyPIRCCommandTestCase): def setUp(self): - PyPIRCCommandTestCase.setUp(self) + super(RegisterTestCase, self).setUp() # patching the password prompt self._old_getpass = getpass.getpass def _getpass(prompt): @@ -78,7 +78,7 @@ def _getpass(prompt): def tearDown(self): getpass.getpass = self._old_getpass urllib.request.build_opener = self.old_opener - PyPIRCCommandTestCase.tearDown(self) + super(RegisterTestCase, self).tearDown() def _get_cmd(self, metadata=None): if metadata is None: From 8e668444d71672740d52dfac4d6d87a89f43ab7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 29 May 2009 10:04:06 +0000 Subject: [PATCH 2351/8469] using super in distutils' sdistTestCase --- tests/test_sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 0d839b5c6e..59c24fd433 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,14 +29,14 @@ class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): - PyPIRCCommandTestCase.setUp(self) + super(sdistTestCase, self).setUp() self.old_path = os.getcwd() def tearDown(self): os.chdir(self.old_path) if os.path.exists(TEMP_PKG): shutil.rmtree(TEMP_PKG) - PyPIRCCommandTestCase.tearDown(self) + super(sdistTestCase, self).tearDown() def _init_tmp_pkg(self): if os.path.exists(TEMP_PKG): From 13e74436fe53eb88f4f20555c16df795b16987fc Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 30 May 2009 15:30:16 +0000 Subject: [PATCH 2352/8469] bump to 3.1rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 80ccf6113d..5a5db53272 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1b1" +__version__ = "3.1rc1" #--end constants-- From 49443195f5ba2fb76c120d5218b962cb32b2fc0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 1 Jun 2009 22:22:13 +0000 Subject: [PATCH 2353/8469] improved distutils.dist test coverage, pep-8 compliancy --- dist.py | 107 ++++++++++++++++++++++----------------------- tests/test_dist.py | 57 +++++++++++++++++++++--- 2 files changed, 103 insertions(+), 61 deletions(-) diff --git a/dist.py b/dist.py index 93325b9720..f4aecb419e 100644 --- a/dist.py +++ b/dist.py @@ -6,8 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re -from types import * +import sys, os, re try: import warnings @@ -251,7 +250,7 @@ def __init__ (self, attrs=None): # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! - for (key,val) in attrs.items(): + for (key, val) in attrs.items(): if hasattr(self.metadata, "set_" + key): getattr(self.metadata, "set_" + key)(val) elif hasattr(self.metadata, key): @@ -286,22 +285,24 @@ def dump_option_dicts(self, header=None, commands=None, indent=""): commands.sort() if header is not None: - print indent + header + self.announce(indent + header) indent = indent + " " if not commands: - print indent + "no commands known yet" + self.announce(indent + "no commands known yet") return for cmd_name in commands: opt_dict = self.command_options.get(cmd_name) if opt_dict is None: - print indent + "no option dict for '%s' command" % cmd_name + self.announce(indent + + "no option dict for '%s' command" % cmd_name) else: - print indent + "option dict for '%s' command:" % cmd_name + self.announce(indent + + "option dict for '%s' command:" % cmd_name) out = pformat(opt_dict) - for line in string.split(out, "\n"): - print indent + " " + line + for line in out.split('\n'): + self.announce(indent + " " + line) # -- Config file finding/parsing methods --------------------------- @@ -352,11 +353,13 @@ def parse_config_files(self, filenames=None): if filenames is None: filenames = self.find_config_files() - if DEBUG: print "Distribution.parse_config_files():" + if DEBUG: + self.announce("Distribution.parse_config_files():") parser = ConfigParser() for filename in filenames: - if DEBUG: print " reading", filename + if DEBUG: + self.announce(" reading", filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) @@ -365,7 +368,7 @@ def parse_config_files(self, filenames=None): for opt in options: if opt != '__name__': val = parser.get(section,opt) - opt = string.replace(opt, '-', '_') + opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -503,7 +506,7 @@ def _parse_command_opts(self, parser, args): # Also make sure that the command object provides a list of its # known options. if not (hasattr(cmd_class, 'user_options') and - type(cmd_class.user_options) is ListType): + isinstance(cmd_class.user_options, list)): raise DistutilsClassError, \ ("command class %s must provide " + "'user_options' attribute (a list of tuples)") % \ @@ -519,7 +522,7 @@ def _parse_command_opts(self, parser, args): # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_options = fix_help_options(cmd_class.help_options) else: help_options = [] @@ -537,14 +540,11 @@ def _parse_command_opts(self, parser, args): return if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_option_found=0 for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 - #print "showing help for option %s of command %s" % \ - # (help_option[0],cmd_class) - if callable(func): func() else: @@ -569,17 +569,13 @@ def finalize_options(self): instance, analogous to the .finalize_options() method of Command objects. """ - keywords = self.metadata.keywords - if keywords is not None: - if type(keywords) is StringType: - keywordlist = string.split(keywords, ',') - self.metadata.keywords = map(string.strip, keywordlist) - - platforms = self.metadata.platforms - if platforms is not None: - if type(platforms) is StringType: - platformlist = string.split(platforms, ',') - self.metadata.platforms = map(string.strip, platformlist) + for attr in ('keywords', 'platforms'): + value = getattr(self.metadata, attr) + if value is None: + continue + if isinstance(value, str): + value = [elm.strip() for elm in value.split(',')] + setattr(self.metadata, attr, value) def _show_help(self, parser, global_options=1, display_options=1, commands=[]): @@ -606,31 +602,30 @@ def _show_help(self, parser, global_options=1, display_options=1, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - print + self.announce('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - print + self.announce('') for command in self.commands: - if type(command) is ClassType and issubclass(command, Command): + if isinstance(command, type) and issubclass(command, Command): klass = command else: klass = self.get_command_class(command) if (hasattr(klass, 'help_options') and - type(klass.help_options) is ListType): + isinstance(klass.help_options, list)): parser.set_option_table(klass.user_options + fix_help_options(klass.help_options)) else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - print + self.announce('') - print gen_usage(self.script_name) - return + self.announce(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -645,8 +640,8 @@ def handle_display_options(self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - print - print gen_usage(self.script_name) + self.announce('') + self.announce(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -662,12 +657,12 @@ def handle_display_options(self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - print string.join(value, ',') + self.announce(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - print string.join(value, '\n') + self.announce('\n'.join(value)) else: - print value + self.announce(value) any_display_options = 1 return any_display_options @@ -676,7 +671,7 @@ def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - print header + ":" + self.announce(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -687,7 +682,7 @@ def print_command_list(self, commands, header, max_length): except AttributeError: description = "(no description available)" - print " %-*s %s" % (max_length, cmd, description) + self.announce(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a @@ -760,11 +755,10 @@ def get_command_list(self): def get_command_packages(self): """Return a list of packages from which commands are loaded.""" pkgs = self.command_packages - if not isinstance(pkgs, type([])): - pkgs = string.split(pkgs or "", ",") - for i in range(len(pkgs)): - pkgs[i] = string.strip(pkgs[i]) - pkgs = filter(None, pkgs) + if not isinstance(pkgs, list): + if pkgs is None: + pkgs = '' + pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != ''] if "distutils.command" not in pkgs: pkgs.insert(0, "distutils.command") self.command_packages = pkgs @@ -818,8 +812,8 @@ def get_command_obj(self, command, create=1): cmd_obj = self.command_obj.get(command) if not cmd_obj and create: if DEBUG: - print "Distribution.get_command_obj(): " \ - "creating '%s' command object" % command + self.announce("Distribution.get_command_obj(): " \ + "creating '%s' command object" % command) klass = self.get_command_class(command) cmd_obj = self.command_obj[command] = klass(self) @@ -849,9 +843,12 @@ def _set_command_options(self, command_obj, option_dict=None): if option_dict is None: option_dict = self.get_option_dict(command_name) - if DEBUG: print " setting options for '%s' command:" % command_name + if DEBUG: + self.announce(" setting options for '%s' command:" % command_name) for (option, (source, value)) in option_dict.items(): - if DEBUG: print " %s = %s (from %s)" % (option, value, source) + if DEBUG: + self.announce(" %s = %s (from %s)" % (option, value, + source)) try: bool_opts = map(translate_longopt, command_obj.boolean_options) except AttributeError: @@ -862,7 +859,7 @@ def _set_command_options(self, command_obj, option_dict=None): neg_opt = {} try: - is_string = type(value) is StringType + is_string = isinstance(value, str) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: @@ -1044,10 +1041,10 @@ def write_pkg_file(self, file): if self.download_url: self._write_field(file, 'Download-URL', self.download_url) - long_desc = rfc822_escape( self.get_long_description()) + long_desc = rfc822_escape(self.get_long_description()) self._write_field(file, 'Description', long_desc) - keywords = string.join( self.get_keywords(), ',') + keywords = ','.join(self.get_keywords()) if keywords: self._write_field(file, 'Keywords', keywords) diff --git a/tests/test_dist.py b/tests/test_dist.py index 49230c54c0..7ccdd53b79 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,4 +1,4 @@ -# -*- coding: latin-1 -*- +# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os @@ -36,7 +36,9 @@ def find_config_files(self): return self._config_files -class DistributionTestCase(support.TempdirManager, unittest.TestCase): +class DistributionTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def setUp(self): super(DistributionTestCase, self).setUp() @@ -106,11 +108,11 @@ def test_write_pkg_file(self): my_file = os.path.join(tmp_dir, 'f') klass = Distribution - dist = klass(attrs={'author': u'Mister Café', + dist = klass(attrs={'author': u'Mister Café', 'name': 'my.package', - 'maintainer': u'Café Junior', - 'description': u'Café torréfié', - 'long_description': u'Héhéhé'}) + 'maintainer': u'Café Junior', + 'description': u'Café torréfié', + 'long_description': u'Héhéhé'}) # let's make sure the file can be written @@ -151,6 +153,49 @@ def _warn(msg): self.assertEquals(len(warns), 0) + def test_finalize_options(self): + + attrs = {'keywords': 'one,two', + 'platforms': 'one,two'} + + dist = Distribution(attrs=attrs) + dist.finalize_options() + + # finalize_option splits platforms and keywords + self.assertEquals(dist.metadata.platforms, ['one', 'two']) + self.assertEquals(dist.metadata.keywords, ['one', 'two']) + + def test_show_help(self): + class FancyGetopt(object): + def __init__(self): + self.count = 0 + + def set_option_table(self, *args): + pass + + def print_help(self, *args): + self.count += 1 + + parser = FancyGetopt() + dist = Distribution() + dist.commands = ['sdist'] + dist.script_name = 'setup.py' + dist._show_help(parser) + self.assertEquals(parser.count, 3) + + def test_get_command_packages(self): + dist = Distribution() + self.assertEquals(dist.command_packages, None) + cmds = dist.get_command_packages() + self.assertEquals(cmds, ['distutils.command']) + self.assertEquals(dist.command_packages, + ['distutils.command']) + + dist.command_packages = 'one,two' + cmds = dist.get_command_packages() + self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From 4178fcef5d4b1fc1a9bc415c47c94ad6d33e3491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 1 Jun 2009 22:36:26 +0000 Subject: [PATCH 2354/8469] Merged revisions 73121 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73121 | tarek.ziade | 2009-06-02 00:22:13 +0200 (Tue, 02 Jun 2009) | 1 line improved distutils.dist test coverage, pep-8 compliancy ........ --- dist.py | 88 ++++++++++++++++++++++------------------------ tests/test_dist.py | 47 ++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 46 deletions(-) diff --git a/dist.py b/dist.py index 65c1ce912e..915d336431 100644 --- a/dist.py +++ b/dist.py @@ -246,7 +246,7 @@ def __init__ (self, attrs=None): # Now work on the rest of the attributes. Any attribute that's # not already defined is invalid! - for (key,val) in attrs.items(): + for (key, val) in attrs.items(): if hasattr(self.metadata, "set_" + key): getattr(self.metadata, "set_" + key)(val) elif hasattr(self.metadata, key): @@ -280,22 +280,24 @@ def dump_option_dicts(self, header=None, commands=None, indent=""): commands = sorted(self.command_options.keys()) if header is not None: - print(indent + header) + self.announce(indent + header) indent = indent + " " if not commands: - print(indent + "no commands known yet") + self.announce(indent + "no commands known yet") return for cmd_name in commands: opt_dict = self.command_options.get(cmd_name) if opt_dict is None: - print(indent + "no option dict for '%s' command" % cmd_name) + self.announce(indent + + "no option dict for '%s' command" % cmd_name) else: - print(indent + "option dict for '%s' command:" % cmd_name) + self.announce(indent + + "option dict for '%s' command:" % cmd_name) out = pformat(opt_dict) - for line in out.split("\n"): - print(indent + " " + line) + for line in out.split('\n'): + self.announce(indent + " " + line) # -- Config file finding/parsing methods --------------------------- @@ -346,11 +348,13 @@ def parse_config_files(self, filenames=None): if filenames is None: filenames = self.find_config_files() - if DEBUG: print("Distribution.parse_config_files():") + if DEBUG: + self.announce("Distribution.parse_config_files():") parser = ConfigParser() for filename in filenames: - if DEBUG: print(" reading", filename) + if DEBUG: + self.announce(" reading", filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) @@ -535,9 +539,6 @@ def _parse_command_opts(self, parser, args): for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 - #print "showing help for option %s of command %s" % \ - # (help_option[0],cmd_class) - if hasattr(func, '__call__'): func() else: @@ -562,17 +563,13 @@ def finalize_options(self): instance, analogous to the .finalize_options() method of Command objects. """ - keywords = self.metadata.keywords - if keywords is not None: - if isinstance(keywords, str): - keywordlist = keywords.split(',') - self.metadata.keywords = [x.strip() for x in keywordlist] - - platforms = self.metadata.platforms - if platforms is not None: - if isinstance(platforms, str): - platformlist = platforms.split(',') - self.metadata.platforms = [x.strip() for x in platformlist] + for attr in ('keywords', 'platforms'): + value = getattr(self.metadata, attr) + if value is None: + continue + if isinstance(value, str): + value = [elm.strip() for elm in value.split(',')] + setattr(self.metadata, attr, value) def _show_help(self, parser, global_options=1, display_options=1, commands=[]): @@ -599,14 +596,14 @@ def _show_help(self, parser, global_options=1, display_options=1, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - print() + self.announce('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - print() + self.announce('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -620,10 +617,9 @@ def _show_help(self, parser, global_options=1, display_options=1, else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - print() + self.announce('') - print(gen_usage(self.script_name)) - return + self.announce(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -638,8 +634,8 @@ def handle_display_options(self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - print() - print(gen_usage(self.script_name)) + self.announce('') + self.announce(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -655,12 +651,12 @@ def handle_display_options(self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - print(','.join(value)) + self.announce(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - print('\n'.join(value)) + self.announce('\n'.join(value)) else: - print(value) + self.announce(value) any_display_options = 1 return any_display_options @@ -669,7 +665,7 @@ def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - print(header + ":") + self.announce(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -680,7 +676,7 @@ def print_command_list(self, commands, header, max_length): except AttributeError: description = "(no description available)" - print(" %-*s %s" % (max_length, cmd, description)) + self.announce(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a @@ -752,11 +748,10 @@ def get_command_list(self): def get_command_packages(self): """Return a list of packages from which commands are loaded.""" pkgs = self.command_packages - if not isinstance(pkgs, type([])): - pkgs = (pkgs or "").split(",") - for i in range(len(pkgs)): - pkgs[i] = pkgs[i].strip() - pkgs = [p for p in pkgs if p] + if not isinstance(pkgs, list): + if pkgs is None: + pkgs = '' + pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != ''] if "distutils.command" not in pkgs: pkgs.insert(0, "distutils.command") self.command_packages = pkgs @@ -809,8 +804,8 @@ def get_command_obj(self, command, create=1): cmd_obj = self.command_obj.get(command) if not cmd_obj and create: if DEBUG: - print("Distribution.get_command_obj(): " \ - "creating '%s' command object" % command) + self.announce("Distribution.get_command_obj(): " \ + "creating '%s' command object" % command) klass = self.get_command_class(command) cmd_obj = self.command_obj[command] = klass(self) @@ -840,9 +835,12 @@ def _set_command_options(self, command_obj, option_dict=None): if option_dict is None: option_dict = self.get_option_dict(command_name) - if DEBUG: print(" setting options for '%s' command:" % command_name) + if DEBUG: + self.announce(" setting options for '%s' command:" % command_name) for (option, (source, value)) in option_dict.items(): - if DEBUG: print(" %s = %s (from %s)" % (option, value, source)) + if DEBUG: + self.announce(" %s = %s (from %s)" % (option, value, + source)) try: bool_opts = [translate_longopt(o) for o in command_obj.boolean_options] @@ -1036,7 +1034,7 @@ def write_pkg_file(self, file): if self.download_url: file.write('Download-URL: %s\n' % self.download_url) - long_desc = rfc822_escape( self.get_long_description() ) + long_desc = rfc822_escape(self.get_long_description()) file.write('Description: %s\n' % long_desc) keywords = ','.join(self.get_keywords()) diff --git a/tests/test_dist.py b/tests/test_dist.py index 54b63f7ddf..16ef68e962 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,3 +1,4 @@ +# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os import io @@ -35,7 +36,8 @@ def find_config_files(self): return self._config_files -class DistributionTestCase(unittest.TestCase): +class DistributionTestCase(support.LoggingSilencer, + unittest.TestCase): def setUp(self): super(DistributionTestCase, self).setUp() @@ -122,6 +124,49 @@ def _warn(msg): self.assertEquals(len(warns), 0) + def test_finalize_options(self): + + attrs = {'keywords': 'one,two', + 'platforms': 'one,two'} + + dist = Distribution(attrs=attrs) + dist.finalize_options() + + # finalize_option splits platforms and keywords + self.assertEquals(dist.metadata.platforms, ['one', 'two']) + self.assertEquals(dist.metadata.keywords, ['one', 'two']) + + def test_show_help(self): + class FancyGetopt(object): + def __init__(self): + self.count = 0 + + def set_option_table(self, *args): + pass + + def print_help(self, *args): + self.count += 1 + + parser = FancyGetopt() + dist = Distribution() + dist.commands = ['sdist'] + dist.script_name = 'setup.py' + dist._show_help(parser) + self.assertEquals(parser.count, 3) + + def test_get_command_packages(self): + dist = Distribution() + self.assertEquals(dist.command_packages, None) + cmds = dist.get_command_packages() + self.assertEquals(cmds, ['distutils.command']) + self.assertEquals(dist.command_packages, + ['distutils.command']) + + dist.command_packages = 'one,two' + cmds = dist.get_command_packages() + self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From c5920a8b3ab690885fe822a5178b1e29f5eddd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 2 Jun 2009 15:58:43 +0000 Subject: [PATCH 2355/8469] improved distutils.spawn test coverage + cleaned it up --- spawn.py | 90 ++++++++++++++++----------------------------- tests/test_spawn.py | 42 ++++++++++++++++++++- 2 files changed, 73 insertions(+), 59 deletions(-) diff --git a/spawn.py b/spawn.py index a6d3426390..5c014c4be2 100644 --- a/spawn.py +++ b/spawn.py @@ -8,17 +8,16 @@ __revision__ = "$Id$" -import sys, os, string -from distutils.errors import * +import sys +import os + +from distutils.errors import DistutilsPlatformError, DistutilsExecError from distutils import log -def spawn (cmd, - search_path=1, - verbose=0, - dry_run=0): +def spawn(cmd, search_path=1, verbose=0, dry_run=0): + """Run another program, specified as a command list 'cmd', in a new process. - """Run another program, specified as a command list 'cmd', in a new - process. 'cmd' is just the argument list for the new process, ie. + 'cmd' is just the argument list for the new process, ie. cmd[0] is the program to run and cmd[1:] are the rest of its arguments. There is no way to run a program with a name different from that of its executable. @@ -41,37 +40,29 @@ def spawn (cmd, raise DistutilsPlatformError, \ "don't know how to spawn programs on platform '%s'" % os.name -# spawn () - +def _nt_quote_args(args): + """Quote command-line arguments for DOS/Windows conventions. -def _nt_quote_args (args): - """Quote command-line arguments for DOS/Windows conventions: just - wraps every argument which contains blanks in double quotes, and + Just wraps every argument which contains blanks in double quotes, and returns a new argument list. """ - # XXX this doesn't seem very robust to me -- but if the Windows guys # say it'll work, I guess I'll have to accept it. (What if an arg # contains quotes? What other magic characters, other than spaces, # have to be escaped? Is there an escaping mechanism other than # quoting?) - - for i in range(len(args)): - if string.find(args[i], ' ') != -1: - args[i] = '"%s"' % args[i] + for i, arg in enumerate(args): + if ' ' in arg: + args[i] = '"%s"' % arg return args -def _spawn_nt (cmd, - search_path=1, - verbose=0, - dry_run=0): - +def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - log.info(string.join([executable] + cmd[1:], ' ')) + log.info(' '.join([executable] + cmd[1:])) if not dry_run: # spawn for NT requires a full path to the .exe try: @@ -85,18 +76,12 @@ def _spawn_nt (cmd, raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) - -def _spawn_os2 (cmd, - search_path=1, - verbose=0, - dry_run=0): - +def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] - #cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable - log.info(string.join([executable] + cmd[1:], ' ')) + log.info(' '.join([executable] + cmd[1:])) if not dry_run: # spawnv for OS/2 EMX requires a full path to the .exe try: @@ -107,27 +92,20 @@ def _spawn_os2 (cmd, "command '%s' failed: %s" % (cmd[0], exc[-1]) if rc != 0: # and this reflects the command running but failing - print "command '%s' failed with exit status %d" % (cmd[0], rc) + log.debug("command '%s' failed with exit status %d" % (cmd[0], rc)) raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) -def _spawn_posix (cmd, - search_path=1, - verbose=0, - dry_run=0): - - log.info(string.join(cmd, ' ')) +def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): + log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv - pid = os.fork() - if pid == 0: # in the child + if pid == 0: # in the child try: - #print "cmd[0] =", cmd[0] - #print "cmd =", cmd exec_fn(cmd[0], cmd) except OSError, e: sys.stderr.write("unable to execute %s: %s\n" % @@ -136,14 +114,12 @@ def _spawn_posix (cmd, sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0]) os._exit(1) - - - else: # in the parent + else: # in the parent # Loop until the child either exits or is terminated by a signal # (ie. keep waiting if it's merely stopped) while 1: try: - (pid, status) = os.waitpid(pid, 0) + pid, status = os.waitpid(pid, 0) except OSError, exc: import errno if exc.errno == errno.EINTR: @@ -158,7 +134,7 @@ def _spawn_posix (cmd, elif os.WIFEXITED(status): exit_status = os.WEXITSTATUS(status) if exit_status == 0: - return # hey, it succeeded! + return # hey, it succeeded! else: raise DistutilsExecError, \ "command '%s' failed with exit status %d" % \ @@ -171,21 +147,21 @@ def _spawn_posix (cmd, raise DistutilsExecError, \ "unknown error executing '%s': termination status %d" % \ (cmd[0], status) -# _spawn_posix () - def find_executable(executable, path=None): - """Try to find 'executable' in the directories listed in 'path' (a - string listing directories separated by 'os.pathsep'; defaults to - os.environ['PATH']). Returns the complete filename or None if not - found. + """Tries to find 'executable' in the directories listed in 'path'. + + A string listing directories separated by 'os.pathsep'; defaults to + os.environ['PATH']. Returns the complete filename or None if not found. """ if path is None: path = os.environ['PATH'] - paths = string.split(path, os.pathsep) - (base, ext) = os.path.splitext(executable) + paths = path.split(os.pathsep) + base, ext = os.path.splitext(executable) + if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'): executable = executable + '.exe' + if not os.path.isfile(executable): for p in paths: f = os.path.join(p, executable) @@ -195,5 +171,3 @@ def find_executable(executable, path=None): return None else: return executable - -# find_executable() diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 33e8bcf6e9..b9fd610e2f 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -1,8 +1,17 @@ """Tests for distutils.spawn.""" import unittest +import os +import time +from test.test_support import captured_stdout + from distutils.spawn import _nt_quote_args +from distutils.spawn import spawn, find_executable +from distutils.errors import DistutilsExecError +from distutils.tests import support -class SpawnTestCase(unittest.TestCase): +class SpawnTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_nt_quote_args(self): @@ -13,6 +22,37 @@ def test_nt_quote_args(self): res = _nt_quote_args(args) self.assertEquals(res, wanted) + + @unittest.skipUnless(os.name in ('nt', 'posix'), + 'Runs only under posix or nt') + def test_spawn(self): + tmpdir = self.mkdtemp() + + # creating something executable + # through the shell that returns 1 + if os.name == 'posix': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!/bin/sh\nexit 1') + os.chmod(exe, 0777) + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 1') + + os.chmod(exe, 0777) + self.assertRaises(DistutilsExecError, spawn, [exe]) + + # now something that works + if os.name == 'posix': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!/bin/sh\nexit 0') + os.chmod(exe, 0777) + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 0') + + os.chmod(exe, 0777) + spawn([exe]) # should work without any error + def test_suite(): return unittest.makeSuite(SpawnTestCase) From 38fc75e0ef9b8b57879ea2d405fab4818f7b7aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 2 Jun 2009 16:18:55 +0000 Subject: [PATCH 2356/8469] Merged revisions 73147 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73147 | tarek.ziade | 2009-06-02 17:58:43 +0200 (Tue, 02 Jun 2009) | 1 line improved distutils.spawn test coverage + cleaned it up ........ --- spawn.py | 47 +++++++++++++++++++++++---------------------- tests/test_spawn.py | 40 +++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 24 deletions(-) diff --git a/spawn.py b/spawn.py index 4c536d28af..8c476dc23f 100644 --- a/spawn.py +++ b/spawn.py @@ -8,13 +8,16 @@ __revision__ = "$Id$" -import sys, os -from distutils.errors import * +import sys +import os + +from distutils.errors import DistutilsPlatformError, DistutilsExecError from distutils import log def spawn(cmd, search_path=1, verbose=0, dry_run=0): - """Run another program, specified as a command list 'cmd', in a new - process. 'cmd' is just the argument list for the new process, ie. + """Run another program, specified as a command list 'cmd', in a new process. + + 'cmd' is just the argument list for the new process, ie. cmd[0] is the program to run and cmd[1:] are the rest of its arguments. There is no way to run a program with a name different from that of its executable. @@ -37,10 +40,10 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsPlatformError( "don't know how to spawn programs on platform '%s'" % os.name) - def _nt_quote_args(args): - """Quote command-line arguments for DOS/Windows conventions: just - wraps every argument which contains blanks in double quotes, and + """Quote command-line arguments for DOS/Windows conventions. + + Just wraps every argument which contains blanks in double quotes, and returns a new argument list. """ # XXX this doesn't seem very robust to me -- but if the Windows guys @@ -48,9 +51,9 @@ def _nt_quote_args(args): # contains quotes? What other magic characters, other than spaces, # have to be escaped? Is there an escaping mechanism other than # quoting?) - for i in range(len(args)): - if args[i].find(' ') != -1: - args[i] = '"%s"' % args[i] + for i, arg in enumerate(args): + if ' ' in arg: + args[i] = '"%s"' % arg return args def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): @@ -73,10 +76,8 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsExecError( "command '%s' failed with exit status %d" % (cmd[0], rc)) - def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] - #cmd = _nt_quote_args(cmd) if search_path: # either we find one or it stays the same executable = find_executable(executable) or executable @@ -91,17 +92,15 @@ def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): "command '%s' failed: %s" % (cmd[0], exc.args[-1])) if rc != 0: # and this reflects the command running but failing - print("command '%s' failed with exit status %d" % (cmd[0], rc)) + log.debug("command '%s' failed with exit status %d" % (cmd[0], rc)) raise DistutilsExecError( "command '%s' failed with exit status %d" % (cmd[0], rc)) - def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv - pid = os.fork() if pid == 0: # in the child try: @@ -118,7 +117,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): # (ie. keep waiting if it's merely stopped) while True: try: - (pid, status) = os.waitpid(pid, 0) + pid, status = os.waitpid(pid, 0) except OSError as exc: import errno if exc.errno == errno.EINTR: @@ -132,7 +131,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): elif os.WIFEXITED(status): exit_status = os.WEXITSTATUS(status) if exit_status == 0: - return # hey, it succeeded! + return # hey, it succeeded! else: raise DistutilsExecError( "command '%s' failed with exit status %d" @@ -144,19 +143,21 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): "unknown error executing '%s': termination status %d" % (cmd[0], status)) - def find_executable(executable, path=None): - """Try to find 'executable' in the directories listed in 'path' (a - string listing directories separated by 'os.pathsep'; defaults to - os.environ['PATH']). Returns the complete filename or None if not - found. + """Tries to find 'executable' in the directories listed in 'path'. + + A string listing directories separated by 'os.pathsep'; defaults to + os.environ['PATH']. Returns the complete filename or None if not found. """ if path is None: path = os.environ['PATH'] + paths = path.split(os.pathsep) - (base, ext) = os.path.splitext(executable) + base, ext = os.path.splitext(executable) + if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'): executable = executable + '.exe' + if not os.path.isfile(executable): for p in paths: f = os.path.join(p, executable) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 33e8bcf6e9..950e5789b5 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -1,8 +1,17 @@ """Tests for distutils.spawn.""" import unittest +import os +import time +from test.support import captured_stdout + from distutils.spawn import _nt_quote_args +from distutils.spawn import spawn, find_executable +from distutils.errors import DistutilsExecError +from distutils.tests import support -class SpawnTestCase(unittest.TestCase): +class SpawnTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_nt_quote_args(self): @@ -13,6 +22,35 @@ def test_nt_quote_args(self): res = _nt_quote_args(args) self.assertEquals(res, wanted) + + @unittest.skipUnless(os.name in ('nt', 'posix'), + 'Runs only under posix or nt') + def test_spawn(self): + tmpdir = self.mkdtemp() + + # creating something executable + # through the shell that returns 1 + if os.name == 'posix': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!/bin/sh\nexit 1') + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 1') + + os.chmod(exe, 0o777) + self.assertRaises(DistutilsExecError, spawn, [exe]) + + # now something that works + if os.name == 'posix': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!/bin/sh\nexit 0') + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 0') + + os.chmod(exe, 0o777) + spawn([exe]) # should work without any error + def test_suite(): return unittest.makeSuite(SpawnTestCase) From d05c768b5e48a25bc6008de7cde7d1db2e8488de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Jun 2009 10:26:26 +0000 Subject: [PATCH 2357/8469] added some tests for distutils.extension + code cleanup --- extension.py | 21 +++---------- tests/Setup.sample | 67 +++++++++++++++++++++++++++++++++++++++++ tests/test_extension.py | 36 ++++++++++++++++++++++ 3 files changed, 108 insertions(+), 16 deletions(-) create mode 100755 tests/Setup.sample create mode 100755 tests/test_extension.py diff --git a/extension.py b/extension.py index c80c61e35b..4d72c402ce 100644 --- a/extension.py +++ b/extension.py @@ -141,9 +141,11 @@ def __init__ (self, name, sources, # class Extension -def read_setup_file (filename): - from distutils.sysconfig import \ - parse_makefile, expand_makefile_vars, _variable_rx +def read_setup_file(filename): + """Reads a Setup file and returns Extension instances.""" + from distutils.sysconfig import (parse_makefile, expand_makefile_vars, + _variable_rx) + from distutils.text_file import TextFile from distutils.util import split_quoted @@ -168,10 +170,8 @@ def read_setup_file (filename): file.warn("'%s' lines not handled yet" % line) continue - #print "original line: " + line line = expand_makefile_vars(line, vars) words = split_quoted(line) - #print "expanded line: " + line # NB. this parses a slightly different syntax than the old # makesetup script: here, there must be exactly one extension per @@ -237,15 +237,4 @@ def read_setup_file (filename): extensions.append(ext) - #print "module:", module - #print "source files:", source_files - #print "cpp args:", cpp_args - #print "lib args:", library_args - - #extensions[module] = { 'sources': source_files, - # 'cpp_args': cpp_args, - # 'lib_args': library_args } - return extensions - -# read_setup_file () diff --git a/tests/Setup.sample b/tests/Setup.sample new file mode 100755 index 0000000000..36c4290d8f --- /dev/null +++ b/tests/Setup.sample @@ -0,0 +1,67 @@ +# Setup file from the pygame project + +#--StartConfig +SDL = -I/usr/include/SDL -D_REENTRANT -lSDL +FONT = -lSDL_ttf +IMAGE = -lSDL_image +MIXER = -lSDL_mixer +SMPEG = -lsmpeg +PNG = -lpng +JPEG = -ljpeg +SCRAP = -lX11 +PORTMIDI = -lportmidi +PORTTIME = -lporttime +#--EndConfig + +#DEBUG = -C-W -C-Wall +DEBUG = + +#the following modules are optional. you will want to compile +#everything you can, but you can ignore ones you don't have +#dependencies for, just comment them out + +imageext src/imageext.c $(SDL) $(IMAGE) $(PNG) $(JPEG) $(DEBUG) +font src/font.c $(SDL) $(FONT) $(DEBUG) +mixer src/mixer.c $(SDL) $(MIXER) $(DEBUG) +mixer_music src/music.c $(SDL) $(MIXER) $(DEBUG) +_numericsurfarray src/_numericsurfarray.c $(SDL) $(DEBUG) +_numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG) +movie src/movie.c $(SDL) $(SMPEG) $(DEBUG) +scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG) +_camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG) +pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) + +GFX = src/SDL_gfx/SDL_gfxPrimitives.c +#GFX = src/SDL_gfx/SDL_gfxBlitFunc.c src/SDL_gfx/SDL_gfxPrimitives.c +gfxdraw src/gfxdraw.c $(SDL) $(GFX) $(DEBUG) + + + +#these modules are required for pygame to run. they only require +#SDL as a dependency. these should not be altered + +base src/base.c $(SDL) $(DEBUG) +cdrom src/cdrom.c $(SDL) $(DEBUG) +color src/color.c $(SDL) $(DEBUG) +constants src/constants.c $(SDL) $(DEBUG) +display src/display.c $(SDL) $(DEBUG) +event src/event.c $(SDL) $(DEBUG) +fastevent src/fastevent.c src/fastevents.c $(SDL) $(DEBUG) +key src/key.c $(SDL) $(DEBUG) +mouse src/mouse.c $(SDL) $(DEBUG) +rect src/rect.c $(SDL) $(DEBUG) +rwobject src/rwobject.c $(SDL) $(DEBUG) +surface src/surface.c src/alphablit.c src/surface_fill.c $(SDL) $(DEBUG) +surflock src/surflock.c $(SDL) $(DEBUG) +time src/time.c $(SDL) $(DEBUG) +joystick src/joystick.c $(SDL) $(DEBUG) +draw src/draw.c $(SDL) $(DEBUG) +image src/image.c $(SDL) $(DEBUG) +overlay src/overlay.c $(SDL) $(DEBUG) +transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG) +mask src/mask.c src/bitmask.c $(SDL) $(DEBUG) +bufferproxy src/bufferproxy.c $(SDL) $(DEBUG) +pixelarray src/pixelarray.c $(SDL) $(DEBUG) +_arraysurfarray src/_arraysurfarray.c $(SDL) $(DEBUG) + + diff --git a/tests/test_extension.py b/tests/test_extension.py new file mode 100755 index 0000000000..1fcf0f5ecf --- /dev/null +++ b/tests/test_extension.py @@ -0,0 +1,36 @@ +"""Tests for distutils.extension.""" +import unittest +import os + +from distutils.extension import read_setup_file + +class ExtensionTestCase(unittest.TestCase): + + def test_read_setup_file(self): + # trying to read a Setup file + # (sample extracted from the PyGame project) + setup = os.path.join(os.path.dirname(__file__), 'Setup.sample') + + exts = read_setup_file(setup) + names = [ext.name for ext in exts] + names.sort() + + # here are the extensions read_setup_file should have created + # out of the file + wanted = ['_arraysurfarray', '_camera', '_numericsndarray', + '_numericsurfarray', 'base', 'bufferproxy', 'cdrom', + 'color', 'constants', 'display', 'draw', 'event', + 'fastevent', 'font', 'gfxdraw', 'image', 'imageext', + 'joystick', 'key', 'mask', 'mixer', 'mixer_music', + 'mouse', 'movie', 'overlay', 'pixelarray', 'pypm', + 'rect', 'rwobject', 'scrap', 'surface', 'surflock', + 'time', 'transform'] + + self.assertEquals(names, wanted) + + +def test_suite(): + return unittest.makeSuite(ExtensionTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From e179c582f459d632335552576808d13177b1757f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Jun 2009 10:31:15 +0000 Subject: [PATCH 2358/8469] Merged revisions 73166 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73166 | tarek.ziade | 2009-06-03 12:26:26 +0200 (Wed, 03 Jun 2009) | 1 line added some tests for distutils.extension + code cleanup ........ --- extension.py | 17 +++-------- tests/Setup.sample | 67 +++++++++++++++++++++++++++++++++++++++++ tests/test_extension.py | 36 ++++++++++++++++++++++ 3 files changed, 107 insertions(+), 13 deletions(-) create mode 100755 tests/Setup.sample create mode 100755 tests/test_extension.py diff --git a/extension.py b/extension.py index f7e7b4edc9..a4054ff454 100644 --- a/extension.py +++ b/extension.py @@ -139,8 +139,10 @@ def __init__(self, name, sources, def read_setup_file(filename): - from distutils.sysconfig import \ - parse_makefile, expand_makefile_vars, _variable_rx + """Reads a Setup file and returns Extension instances.""" + from distutils.sysconfig import (parse_makefile, expand_makefile_vars, + _variable_rx) + from distutils.text_file import TextFile from distutils.util import split_quoted @@ -165,10 +167,8 @@ def read_setup_file(filename): file.warn("'%s' lines not handled yet" % line) continue - #print "original line: " + line line = expand_makefile_vars(line, vars) words = split_quoted(line) - #print "expanded line: " + line # NB. this parses a slightly different syntax than the old # makesetup script: here, there must be exactly one extension per @@ -234,13 +234,4 @@ def read_setup_file(filename): extensions.append(ext) - #print "module:", module - #print "source files:", source_files - #print "cpp args:", cpp_args - #print "lib args:", library_args - - #extensions[module] = { 'sources': source_files, - # 'cpp_args': cpp_args, - # 'lib_args': library_args } - return extensions diff --git a/tests/Setup.sample b/tests/Setup.sample new file mode 100755 index 0000000000..36c4290d8f --- /dev/null +++ b/tests/Setup.sample @@ -0,0 +1,67 @@ +# Setup file from the pygame project + +#--StartConfig +SDL = -I/usr/include/SDL -D_REENTRANT -lSDL +FONT = -lSDL_ttf +IMAGE = -lSDL_image +MIXER = -lSDL_mixer +SMPEG = -lsmpeg +PNG = -lpng +JPEG = -ljpeg +SCRAP = -lX11 +PORTMIDI = -lportmidi +PORTTIME = -lporttime +#--EndConfig + +#DEBUG = -C-W -C-Wall +DEBUG = + +#the following modules are optional. you will want to compile +#everything you can, but you can ignore ones you don't have +#dependencies for, just comment them out + +imageext src/imageext.c $(SDL) $(IMAGE) $(PNG) $(JPEG) $(DEBUG) +font src/font.c $(SDL) $(FONT) $(DEBUG) +mixer src/mixer.c $(SDL) $(MIXER) $(DEBUG) +mixer_music src/music.c $(SDL) $(MIXER) $(DEBUG) +_numericsurfarray src/_numericsurfarray.c $(SDL) $(DEBUG) +_numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG) +movie src/movie.c $(SDL) $(SMPEG) $(DEBUG) +scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG) +_camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG) +pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG) + +GFX = src/SDL_gfx/SDL_gfxPrimitives.c +#GFX = src/SDL_gfx/SDL_gfxBlitFunc.c src/SDL_gfx/SDL_gfxPrimitives.c +gfxdraw src/gfxdraw.c $(SDL) $(GFX) $(DEBUG) + + + +#these modules are required for pygame to run. they only require +#SDL as a dependency. these should not be altered + +base src/base.c $(SDL) $(DEBUG) +cdrom src/cdrom.c $(SDL) $(DEBUG) +color src/color.c $(SDL) $(DEBUG) +constants src/constants.c $(SDL) $(DEBUG) +display src/display.c $(SDL) $(DEBUG) +event src/event.c $(SDL) $(DEBUG) +fastevent src/fastevent.c src/fastevents.c $(SDL) $(DEBUG) +key src/key.c $(SDL) $(DEBUG) +mouse src/mouse.c $(SDL) $(DEBUG) +rect src/rect.c $(SDL) $(DEBUG) +rwobject src/rwobject.c $(SDL) $(DEBUG) +surface src/surface.c src/alphablit.c src/surface_fill.c $(SDL) $(DEBUG) +surflock src/surflock.c $(SDL) $(DEBUG) +time src/time.c $(SDL) $(DEBUG) +joystick src/joystick.c $(SDL) $(DEBUG) +draw src/draw.c $(SDL) $(DEBUG) +image src/image.c $(SDL) $(DEBUG) +overlay src/overlay.c $(SDL) $(DEBUG) +transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG) +mask src/mask.c src/bitmask.c $(SDL) $(DEBUG) +bufferproxy src/bufferproxy.c $(SDL) $(DEBUG) +pixelarray src/pixelarray.c $(SDL) $(DEBUG) +_arraysurfarray src/_arraysurfarray.c $(SDL) $(DEBUG) + + diff --git a/tests/test_extension.py b/tests/test_extension.py new file mode 100755 index 0000000000..1fcf0f5ecf --- /dev/null +++ b/tests/test_extension.py @@ -0,0 +1,36 @@ +"""Tests for distutils.extension.""" +import unittest +import os + +from distutils.extension import read_setup_file + +class ExtensionTestCase(unittest.TestCase): + + def test_read_setup_file(self): + # trying to read a Setup file + # (sample extracted from the PyGame project) + setup = os.path.join(os.path.dirname(__file__), 'Setup.sample') + + exts = read_setup_file(setup) + names = [ext.name for ext in exts] + names.sort() + + # here are the extensions read_setup_file should have created + # out of the file + wanted = ['_arraysurfarray', '_camera', '_numericsndarray', + '_numericsurfarray', 'base', 'bufferproxy', 'cdrom', + 'color', 'constants', 'display', 'draw', 'event', + 'fastevent', 'font', 'gfxdraw', 'image', 'imageext', + 'joystick', 'key', 'mask', 'mixer', 'mixer_music', + 'mouse', 'movie', 'overlay', 'pixelarray', 'pypm', + 'rect', 'rwobject', 'scrap', 'surface', 'surflock', + 'time', 'transform'] + + self.assertEquals(names, wanted) + + +def test_suite(): + return unittest.makeSuite(ExtensionTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 131565299608d6a50c3b9be8d87b7de94983f71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Jun 2009 11:12:08 +0000 Subject: [PATCH 2359/8469] more cleanup and test coverage for distutils.extension --- extension.py | 33 ++++++++++++--------------------- tests/test_extension.py | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/extension.py b/extension.py index 4d72c402ce..98b841face 100644 --- a/extension.py +++ b/extension.py @@ -5,13 +5,9 @@ __revision__ = "$Id$" -import os, string, sys -from types import * - -try: - import warnings -except ImportError: - warnings = None +import os +import sys +import warnings # This class is really only used by the "build_ext" command, so it might # make sense to put it in distutils.command.build_ext. However, that @@ -107,9 +103,9 @@ def __init__ (self, name, sources, optional=None, **kw # To catch unknown keywords ): - assert type(name) is StringType, "'name' must be a string" - assert (type(sources) is ListType and - map(type, sources) == [StringType]*len(sources)), \ + assert isinstance(name, str) + assert (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)), \ "'sources' must be a list of strings" self.name = name @@ -130,16 +126,11 @@ def __init__ (self, name, sources, self.optional = optional # If there are unknown keyword options, warn about them - if len(kw): - L = kw.keys() ; L.sort() - L = map(repr, L) - msg = "Unknown Extension options: " + string.join(L, ', ') - if warnings is not None: - warnings.warn(msg) - else: - sys.stderr.write(msg + '\n') -# class Extension - + if len(kw) > 0: + options = [repr(option) for option in kw] + options = ', '.join(sorted(options)) + msg = "Unknown Extension options: %s" % options + warnings.warn(msg) def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" @@ -200,7 +191,7 @@ def read_setup_file(filename): elif switch == "-I": ext.include_dirs.append(value) elif switch == "-D": - equals = string.find(value, "=") + equals = value.find("=") if equals == -1: # bare "-DFOO" -- no value ext.define_macros.append((value, None)) else: # "-DFOO=blah" diff --git a/tests/test_extension.py b/tests/test_extension.py index 1fcf0f5ecf..159ac2b76e 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,8 +1,10 @@ """Tests for distutils.extension.""" import unittest import os +import warnings -from distutils.extension import read_setup_file +from test.test_support import check_warnings +from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): @@ -28,6 +30,37 @@ def test_read_setup_file(self): self.assertEquals(names, wanted) + def test_extension_init(self): + # the first argument, which is the name, must be a string + self.assertRaises(AssertionError, Extension, 1, []) + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') + + # the second argument, which is the list of files, must + # be a list of strings + self.assertRaises(AssertionError, Extension, 'name', 'file') + self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) + ext = Extension('name', ['file1', 'file2']) + self.assertEquals(ext.sources, ['file1', 'file2']) + + # others arguments have defaults + for attr in ('include_dirs', 'define_macros', 'undef_macros', + 'library_dirs', 'libraries', 'runtime_library_dirs', + 'extra_objects', 'extra_compile_args', 'extra_link_args', + 'export_symbols', 'swig_opts', 'depends'): + self.assertEquals(getattr(ext, attr), []) + + self.assertEquals(ext.language, None) + self.assertEquals(ext.optional, None) + + # if there are unknown keyword options, warn about them + with check_warnings() as w: + warnings.simplefilter('always') + ext = Extension('name', ['file1', 'file2'], chic=True) + + self.assertEquals(len(w.warnings), 1) + self.assertEquals(str(w.warnings[0].message), + "Unknown Extension options: 'chic'") def test_suite(): return unittest.makeSuite(ExtensionTestCase) From 1352d8a66b13e181d7ac00831c16a4de63a1e018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Jun 2009 11:17:15 +0000 Subject: [PATCH 2360/8469] Merged revisions 73170 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73170 | tarek.ziade | 2009-06-03 13:12:08 +0200 (Wed, 03 Jun 2009) | 1 line more cleanup and test coverage for distutils.extension ........ --- extension.py | 22 ++++++++-------------- tests/test_extension.py | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/extension.py b/extension.py index a4054ff454..16d2bef6f4 100644 --- a/extension.py +++ b/extension.py @@ -5,12 +5,9 @@ __revision__ = "$Id$" -import os, sys - -try: - import warnings -except ImportError: - warnings = None +import os +import sys +import warnings # This class is really only used by the "build_ext" command, so it might # make sense to put it in distutils.command.build_ext. However, that @@ -129,14 +126,11 @@ def __init__(self, name, sources, self.optional = optional # If there are unknown keyword options, warn about them - if len(kw): - L = map(repr, sorted(kw)) - msg = "Unknown Extension options: " + ', '.join(L) - if warnings is not None: - warnings.warn(msg) - else: - sys.stderr.write(msg + '\n') - + if len(kw) > 0: + options = [repr(option) for option in kw] + options = ', '.join(sorted(options)) + msg = "Unknown Extension options: %s" % options + warnings.warn(msg) def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" diff --git a/tests/test_extension.py b/tests/test_extension.py index 1fcf0f5ecf..1ee30585fa 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,8 +1,10 @@ """Tests for distutils.extension.""" import unittest import os +import warnings -from distutils.extension import read_setup_file +from test.support import check_warnings +from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): @@ -28,6 +30,37 @@ def test_read_setup_file(self): self.assertEquals(names, wanted) + def test_extension_init(self): + # the first argument, which is the name, must be a string + self.assertRaises(AssertionError, Extension, 1, []) + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') + + # the second argument, which is the list of files, must + # be a list of strings + self.assertRaises(AssertionError, Extension, 'name', 'file') + self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) + ext = Extension('name', ['file1', 'file2']) + self.assertEquals(ext.sources, ['file1', 'file2']) + + # others arguments have defaults + for attr in ('include_dirs', 'define_macros', 'undef_macros', + 'library_dirs', 'libraries', 'runtime_library_dirs', + 'extra_objects', 'extra_compile_args', 'extra_link_args', + 'export_symbols', 'swig_opts', 'depends'): + self.assertEquals(getattr(ext, attr), []) + + self.assertEquals(ext.language, None) + self.assertEquals(ext.optional, None) + + # if there are unknown keyword options, warn about them + with check_warnings() as w: + warnings.simplefilter('always') + ext = Extension('name', ['file1', 'file2'], chic=True) + + self.assertEquals(len(w.warnings), 1) + self.assertEquals(str(w.warnings[0].message), + "Unknown Extension options: 'chic'") def test_suite(): return unittest.makeSuite(ExtensionTestCase) From 086f2ea6187e05525d389c6b07be3e1b6396458f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Jun 2009 11:20:44 +0000 Subject: [PATCH 2361/8469] assertion message was dropped --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index 98b841face..53ca8fd0c5 100644 --- a/extension.py +++ b/extension.py @@ -103,7 +103,7 @@ def __init__ (self, name, sources, optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str) + assert isinstance(name, str), "'name' must be a string" assert (isinstance(sources, list) and all(isinstance(v, str) for v in sources)), \ "'sources' must be a list of strings" From 753a89c004584f096f307ade17484509e4782b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 4 Jun 2009 07:31:52 +0000 Subject: [PATCH 2362/8469] improved test coverage for distutils.command.install and cleaned it up --- command/install.py | 160 +++++++++++++++++++----------------------- tests/test_install.py | 73 ++++++++++++++++++- 2 files changed, 145 insertions(+), 88 deletions(-) diff --git a/command/install.py b/command/install.py index 4fd66cbf60..8f089c3172 100644 --- a/command/install.py +++ b/command/install.py @@ -2,12 +2,12 @@ Implements the Distutils 'install' command.""" -from distutils import log - __revision__ = "$Id$" -import sys, os, string -from types import * +import sys +import os + +from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars @@ -117,7 +117,7 @@ SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') -class install (Command): +class install(Command): description = "install everything from build directory" @@ -190,8 +190,8 @@ class install (Command): negative_opt = {'no-compile' : 'compile'} - def initialize_options (self): - + def initialize_options(self): + """Initializes options.""" # High-level options: these select both an installation base # and scheme. self.prefix = None @@ -267,8 +267,8 @@ def initialize_options (self): # party Python modules on various platforms given a wide # array of user input is decided. Yes, it's quite complex!) - def finalize_options (self): - + def finalize_options(self): + """Finalizes options.""" # This method (and its pliant slaves, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and @@ -326,7 +326,7 @@ def finalize_options (self): # $platbase in the other installation directories and not worry # about needing recursive variable expansion (shudder). - py_version = (string.split(sys.version))[0] + py_version = sys.version.split()[0] (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), @@ -409,29 +409,27 @@ def finalize_options (self): # Punt on doc directories for now -- after all, we're punting on # documentation completely! - # finalize_options () - - - def dump_dirs (self, msg): - if DEBUG: - from distutils.fancy_getopt import longopt_xlate - print msg + ":" - for opt in self.user_options: - opt_name = opt[0] - if opt_name[-1] == "=": - opt_name = opt_name[0:-1] - if opt_name in self.negative_opt: - opt_name = string.translate(self.negative_opt[opt_name], - longopt_xlate) - val = not getattr(self, opt_name) - else: - opt_name = string.translate(opt_name, longopt_xlate) - val = getattr(self, opt_name) - print " %s: %s" % (opt_name, val) - - - def finalize_unix (self): + def dump_dirs(self, msg): + """Dumps the list of user options.""" + if not DEBUG: + return + from distutils.fancy_getopt import longopt_xlate + log.debug(msg + ":") + for opt in self.user_options: + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + if opt_name in self.negative_opt: + opt_name = self.negative_opt[opt_name] + opt_name = opt_name.translate(longopt_xlate) + val = not getattr(self, opt_name) + else: + opt_name = opt_name.translate(longopt_xlate) + val = getattr(self, opt_name) + log.debug(" %s: %s" % (opt_name, val)) + def finalize_unix(self): + """Finalizes options for posix platforms.""" if self.install_base is not None or self.install_platbase is not None: if ((self.install_lib is None and self.install_purelib is None and @@ -470,11 +468,8 @@ def finalize_unix (self): self.install_platbase = self.exec_prefix self.select_scheme("unix_prefix") - # finalize_unix () - - - def finalize_other (self): # Windows and Mac OS for now - + def finalize_other(self): + """Finalizes options for non-posix platforms""" if self.user: if self.install_userbase is None: raise DistutilsPlatformError( @@ -495,10 +490,8 @@ def finalize_other (self): # Windows and Mac OS for now raise DistutilsPlatformError, \ "I don't know how to install stuff on '%s'" % os.name - # finalize_other () - - - def select_scheme (self, name): + def select_scheme(self, name): + """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in SCHEME_KEYS: @@ -506,8 +499,7 @@ def select_scheme (self, name): if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) - - def _expand_attrs (self, attrs): + def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: @@ -516,40 +508,36 @@ def _expand_attrs (self, attrs): val = subst_vars(val, self.config_vars) setattr(self, attr, val) + def expand_basedirs(self): + """Calls `os.path.expanduser` on install_base, install_platbase and + root.""" + self._expand_attrs(['install_base', 'install_platbase', 'root']) - def expand_basedirs (self): - self._expand_attrs(['install_base', - 'install_platbase', - 'root']) - - def expand_dirs (self): - self._expand_attrs(['install_purelib', - 'install_platlib', - 'install_lib', - 'install_headers', - 'install_scripts', - 'install_data',]) - + def expand_dirs(self): + """Calls `os.path.expanduser` on install dirs.""" + self._expand_attrs(['install_purelib', 'install_platlib', + 'install_lib', 'install_headers', + 'install_scripts', 'install_data',]) - def convert_paths (self, *names): + def convert_paths(self, *names): + """Call `convert_path` over `names`.""" for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) - - def handle_extra_path (self): - + def handle_extra_path(self): + """Set `path_file` and `extra_dirs` using `extra_path`.""" if self.extra_path is None: self.extra_path = self.distribution.extra_path if self.extra_path is not None: - if type(self.extra_path) is StringType: - self.extra_path = string.split(self.extra_path, ',') + if isinstance(self.extra_path, str): + self.extra_path = self.extra_path.split(',') if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] elif len(self.extra_path) == 2: - (path_file, extra_dirs) = self.extra_path + path_file, extra_dirs = self.extra_path else: raise DistutilsOptionError, \ ("'extra_path' option must be a list, tuple, or " @@ -558,7 +546,6 @@ def handle_extra_path (self): # convert to local form in case Unix notation used (as it # should be in setup scripts) extra_dirs = convert_path(extra_dirs) - else: path_file = None extra_dirs = '' @@ -568,17 +555,14 @@ def handle_extra_path (self): self.path_file = path_file self.extra_dirs = extra_dirs - # handle_extra_path () - - - def change_roots (self, *names): + def change_roots(self, *names): + """Change the install direcories pointed by name using root.""" for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) def create_home_path(self): - """Create directories under ~ - """ + """Create directories under ~.""" if not self.user: return home = convert_path(os.path.expanduser("~")) @@ -589,8 +573,8 @@ def create_home_path(self): # -- Command execution methods ------------------------------------- - def run (self): - + def run(self): + """Runs the command.""" # Obviously have to build before we can install if not self.skip_build: self.run_command('build') @@ -633,9 +617,8 @@ def run (self): "you'll have to change the search path yourself"), self.install_lib) - # run () - - def create_path_file (self): + def create_path_file(self): + """Creates the .pth file""" filename = os.path.join(self.install_libbase, self.path_file + ".pth") if self.install_path_file: @@ -648,8 +631,8 @@ def create_path_file (self): # -- Reporting methods --------------------------------------------- - def get_outputs (self): - # Assemble the outputs of all the sub-commands. + def get_outputs(self): + """Assembles the outputs of all the sub-commands.""" outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) @@ -665,7 +648,8 @@ def get_outputs (self): return outputs - def get_inputs (self): + def get_inputs(self): + """Returns the inputs of all the sub-commands""" # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): @@ -674,25 +658,29 @@ def get_inputs (self): return inputs - # -- Predicates for sub-command list ------------------------------- - def has_lib (self): - """Return true if the current distribution has any Python + def has_lib(self): + """Returns true if the current distribution has any Python modules to install.""" return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) - def has_headers (self): + def has_headers(self): + """Returns true if the current distribution has any headers to + install.""" return self.distribution.has_headers() - def has_scripts (self): + def has_scripts(self): + """Returns true if the current distribution has any scripts to. + install.""" return self.distribution.has_scripts() - def has_data (self): + def has_data(self): + """Returns true if the current distribution has any data to. + install.""" return self.distribution.has_data_files() - # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. sub_commands = [('install_lib', has_lib), @@ -701,5 +689,3 @@ def has_data (self): ('install_data', has_data), ('install_egg_info', lambda self:True), ] - -# class install diff --git a/tests/test_install.py b/tests/test_install.py index 9ceccf68cf..8d7e97227c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -10,11 +10,14 @@ from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution +from distutils.errors import DistutilsOptionError from distutils.tests import support -class InstallTestCase(support.TempdirManager, unittest.TestCase): +class InstallTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_home_installation_scheme(self): # This ensure two things: @@ -112,6 +115,74 @@ def _test_user_site(self): self.assert_('userbase' in cmd.config_vars) self.assert_('usersite' in cmd.config_vars) + def test_handle_extra_path(self): + dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) + cmd = install(dist) + + # two elements + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, ['path', 'dirs']) + self.assertEquals(cmd.extra_dirs, 'dirs') + self.assertEquals(cmd.path_file, 'path') + + # one element + cmd.extra_path = ['path'] + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, ['path']) + self.assertEquals(cmd.extra_dirs, 'path') + self.assertEquals(cmd.path_file, 'path') + + # none + dist.extra_path = cmd.extra_path = None + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, None) + self.assertEquals(cmd.extra_dirs, '') + self.assertEquals(cmd.path_file, None) + + # three elements (no way !) + cmd.extra_path = 'path,dirs,again' + self.assertRaises(DistutilsOptionError, cmd.handle_extra_path) + + def test_finalize_options(self): + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # must supply either prefix/exec-prefix/home or + # install-base/install-platbase -- not both + cmd.prefix = 'prefix' + cmd.install_base = 'base' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # must supply either home or prefix/exec-prefix -- not both + cmd.install_base = None + cmd.home = 'home' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # can't combine user with with prefix/exec_prefix/home or + # install_(plat)base + cmd.prefix = None + cmd.user = 'user' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + def test_record(self): + + install_dir = self.mkdtemp() + pkgdir, dist = self.create_dist() + + dist = Distribution() + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(pkgdir, 'RECORD') + cmd.ensure_finalized() + + cmd.run() + + # let's check the RECORD file was created with one + # line (the egg info file) + with open(cmd.record) as f: + self.assertEquals(len(f.readlines()), 1) + def test_suite(): return unittest.makeSuite(InstallTestCase) From 74ad50e5f25005d305d4ff74c7cd2de62a42b76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 4 Jun 2009 07:39:50 +0000 Subject: [PATCH 2363/8469] Merged revisions 73197 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73197 | tarek.ziade | 2009-06-04 09:31:52 +0200 (Thu, 04 Jun 2009) | 1 line improved test coverage for distutils.command.install and cleaned it up ........ --- command/install.py | 96 +++++++++++++++++++++++-------------------- tests/test_install.py | 73 +++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 46 deletions(-) diff --git a/command/install.py b/command/install.py index de81173387..2a905d92f8 100644 --- a/command/install.py +++ b/command/install.py @@ -2,11 +2,12 @@ Implements the Distutils 'install' command.""" -from distutils import log - __revision__ = "$Id$" -import sys, os +import sys +import os + +from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars @@ -116,7 +117,7 @@ SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') -class install (Command): +class install(Command): description = "install everything from build directory" @@ -190,7 +191,7 @@ class install (Command): def initialize_options(self): - + """Initializes options.""" # High-level options: these select both an installation base # and scheme. self.prefix = None @@ -267,7 +268,7 @@ def initialize_options(self): # array of user input is decided. Yes, it's quite complex!) def finalize_options(self): - + """Finalizes options.""" # This method (and its pliant slaves, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and @@ -408,25 +409,27 @@ def finalize_options(self): # Punt on doc directories for now -- after all, we're punting on # documentation completely! - def dump_dirs(self, msg): - if DEBUG: - from distutils.fancy_getopt import longopt_xlate - print(msg + ":") - for opt in self.user_options: - opt_name = opt[0] - if opt_name[-1] == "=": - opt_name = opt_name[0:-1] - if opt_name in self.negative_opt: - opt_name = longopt_xlate(self.negative_opt[opt_name]) - val = not getattr(self, opt_name) - else: - opt_name = longopt_xlate(opt_name) - val = getattr(self, opt_name) - print(" %s: %s" % (opt_name, val)) - + """Dumps the list of user options.""" + if not DEBUG: + return + from distutils.fancy_getopt import longopt_xlate + log.debug(msg + ":") + for opt in self.user_options: + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + if opt_name in self.negative_opt: + opt_name = self.negative_opt[opt_name] + opt_name = opt_name.translate(longopt_xlate) + val = not getattr(self, opt_name) + else: + opt_name = opt_name.translate(longopt_xlate) + val = getattr(self, opt_name) + log.debug(" %s: %s" % (opt_name, val)) def finalize_unix(self): + """Finalizes options for posix platforms.""" if self.install_base is not None or self.install_platbase is not None: if ((self.install_lib is None and self.install_purelib is None and @@ -465,8 +468,8 @@ def finalize_unix(self): self.install_platbase = self.exec_prefix self.select_scheme("unix_prefix") - - def finalize_other(self): # Windows and Mac OS for now + def finalize_other(self): + """Finalizes options for non-posix platforms""" if self.user: if self.install_userbase is None: raise DistutilsPlatformError( @@ -487,8 +490,8 @@ def finalize_other(self): # Windows and Mac OS for now raise DistutilsPlatformError( "I don't know how to install stuff on '%s'" % os.name) - def select_scheme(self, name): + """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in SCHEME_KEYS: @@ -496,7 +499,6 @@ def select_scheme(self, name): if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) - def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) @@ -506,27 +508,25 @@ def _expand_attrs(self, attrs): val = subst_vars(val, self.config_vars) setattr(self, attr, val) - def expand_basedirs(self): - self._expand_attrs(['install_base', - 'install_platbase', - 'root']) + """Calls `os.path.expanduser` on install_base, install_platbase and + root.""" + self._expand_attrs(['install_base', 'install_platbase', 'root']) def expand_dirs(self): - self._expand_attrs(['install_purelib', - 'install_platlib', - 'install_lib', - 'install_headers', - 'install_scripts', - 'install_data',]) - + """Calls `os.path.expanduser` on install dirs.""" + self._expand_attrs(['install_purelib', 'install_platlib', + 'install_lib', 'install_headers', + 'install_scripts', 'install_data',]) def convert_paths(self, *names): + """Call `convert_path` over `names`.""" for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) def handle_extra_path(self): + """Set `path_file` and `extra_dirs` using `extra_path`.""" if self.extra_path is None: self.extra_path = self.distribution.extra_path @@ -537,7 +537,7 @@ def handle_extra_path(self): if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] elif len(self.extra_path) == 2: - (path_file, extra_dirs) = self.extra_path + path_file, extra_dirs = self.extra_path else: raise DistutilsOptionError( "'extra_path' option must be a list, tuple, or " @@ -546,7 +546,6 @@ def handle_extra_path(self): # convert to local form in case Unix notation used (as it # should be in setup scripts) extra_dirs = convert_path(extra_dirs) - else: path_file = None extra_dirs = '' @@ -557,13 +556,13 @@ def handle_extra_path(self): self.extra_dirs = extra_dirs def change_roots(self, *names): + """Change the install direcories pointed by name using root.""" for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) def create_home_path(self): - """Create directories under ~ - """ + """Create directories under ~.""" if not self.user: return home = convert_path(os.path.expanduser("~")) @@ -575,6 +574,7 @@ def create_home_path(self): # -- Command execution methods ------------------------------------- def run(self): + """Runs the command.""" # Obviously have to build before we can install if not self.skip_build: self.run_command('build') @@ -618,6 +618,7 @@ def run(self): self.install_lib) def create_path_file(self): + """Creates the .pth file""" filename = os.path.join(self.install_libbase, self.path_file + ".pth") if self.install_path_file: @@ -631,7 +632,7 @@ def create_path_file(self): # -- Reporting methods --------------------------------------------- def get_outputs(self): - # Assemble the outputs of all the sub-commands. + """Assembles the outputs of all the sub-commands.""" outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) @@ -648,6 +649,7 @@ def get_outputs(self): return outputs def get_inputs(self): + """Returns the inputs of all the sub-commands""" # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): @@ -656,25 +658,29 @@ def get_inputs(self): return inputs - # -- Predicates for sub-command list ------------------------------- def has_lib(self): - """Return true if the current distribution has any Python + """Returns true if the current distribution has any Python modules to install.""" return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) def has_headers(self): + """Returns true if the current distribution has any headers to + install.""" return self.distribution.has_headers() def has_scripts(self): + """Returns true if the current distribution has any scripts to. + install.""" return self.distribution.has_scripts() def has_data(self): + """Returns true if the current distribution has any data to. + install.""" return self.distribution.has_data_files() - # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. sub_commands = [('install_lib', has_lib), diff --git a/tests/test_install.py b/tests/test_install.py index 9ceccf68cf..8d7e97227c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -10,11 +10,14 @@ from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution +from distutils.errors import DistutilsOptionError from distutils.tests import support -class InstallTestCase(support.TempdirManager, unittest.TestCase): +class InstallTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_home_installation_scheme(self): # This ensure two things: @@ -112,6 +115,74 @@ def _test_user_site(self): self.assert_('userbase' in cmd.config_vars) self.assert_('usersite' in cmd.config_vars) + def test_handle_extra_path(self): + dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) + cmd = install(dist) + + # two elements + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, ['path', 'dirs']) + self.assertEquals(cmd.extra_dirs, 'dirs') + self.assertEquals(cmd.path_file, 'path') + + # one element + cmd.extra_path = ['path'] + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, ['path']) + self.assertEquals(cmd.extra_dirs, 'path') + self.assertEquals(cmd.path_file, 'path') + + # none + dist.extra_path = cmd.extra_path = None + cmd.handle_extra_path() + self.assertEquals(cmd.extra_path, None) + self.assertEquals(cmd.extra_dirs, '') + self.assertEquals(cmd.path_file, None) + + # three elements (no way !) + cmd.extra_path = 'path,dirs,again' + self.assertRaises(DistutilsOptionError, cmd.handle_extra_path) + + def test_finalize_options(self): + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # must supply either prefix/exec-prefix/home or + # install-base/install-platbase -- not both + cmd.prefix = 'prefix' + cmd.install_base = 'base' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # must supply either home or prefix/exec-prefix -- not both + cmd.install_base = None + cmd.home = 'home' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # can't combine user with with prefix/exec_prefix/home or + # install_(plat)base + cmd.prefix = None + cmd.user = 'user' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + def test_record(self): + + install_dir = self.mkdtemp() + pkgdir, dist = self.create_dist() + + dist = Distribution() + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(pkgdir, 'RECORD') + cmd.ensure_finalized() + + cmd.run() + + # let's check the RECORD file was created with one + # line (the egg info file) + with open(cmd.record) as f: + self.assertEquals(len(f.readlines()), 1) + def test_suite(): return unittest.makeSuite(InstallTestCase) From 22e57debf56bf09cdf3e1bd12f6b6da4663037b7 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 4 Jun 2009 09:42:55 +0000 Subject: [PATCH 2364/8469] More codestring -> codebytes. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 9249427a43..3b4a036718 100644 --- a/command/upload.py +++ b/command/upload.py @@ -127,7 +127,7 @@ def upload_file(self, command, pyversion, filename): user_pass = (self.username + ":" + self.password).encode('ascii') # The exact encoding of the authentication string is debated. # Anyway PyPI only accepts ascii for both username or password. - auth = "Basic " + base64.encodestring(user_pass).strip().decode('ascii') + auth = "Basic " + base64.encodebytes(user_pass).strip().decode('ascii') # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' From 0368c370af04800297fc18864d39885cb90f4cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 5 Jun 2009 13:37:29 +0000 Subject: [PATCH 2365/8469] reverting r72823 : Python trunk has to use latin-1 encoding --- command/bdist_msi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index b42e41b373..52e193eb51 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2005, 2006 Martin von Löwis +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst From 831813f0d1e42703be6794b49e4ea144995fb9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 10 Jun 2009 18:49:50 +0000 Subject: [PATCH 2366/8469] Distutils: started code cleanup and test coverage for cygwinccompiler --- cygwinccompiler.py | 121 ++++++++++++++-------------------- tests/test_cygwinccompiler.py | 120 +++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 71 deletions(-) create mode 100644 tests/test_cygwinccompiler.py diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 3ac1dceb3e..df5ebaf9a6 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -47,12 +47,19 @@ __revision__ = "$Id$" -import os,sys,copy +import os +import sys +import copy +from subprocess import Popen, PIPE +import re + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.version import LooseVersion +from distutils.spawn import find_executable def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -348,16 +355,16 @@ def __init__ (self, CONFIG_H_UNCERTAIN = "uncertain" def check_config_h(): + """Check if the current Python installation appears amenable to building + extensions with GCC. + + Returns a tuple (status, details), where 'status' is one of the following + constants: + + - CONFIG_H_OK: all is well, go ahead and compile + - CONFIG_H_NOTOK: doesn't look good + - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h - """Check if the current Python installation (specifically, pyconfig.h) - appears amenable to building extensions with GCC. Returns a tuple - (status, details), where 'status' is one of the following constants: - CONFIG_H_OK - all is well, go ahead and compile - CONFIG_H_NOTOK - doesn't look good - CONFIG_H_UNCERTAIN - not sure -- unable to read pyconfig.h 'details' is a human-readable string explaining the situation. Note there are two ways to conclude "OK": either 'sys.version' contains @@ -369,77 +376,49 @@ def check_config_h(): # "pyconfig.h" check -- should probably be renamed... from distutils import sysconfig - import string - # if sys.version contains GCC then python was compiled with - # GCC, and the pyconfig.h file should be OK - if string.find(sys.version,"GCC") >= 0: - return (CONFIG_H_OK, "sys.version mentions 'GCC'") + # if sys.version contains GCC then python was compiled with GCC, and the + # pyconfig.h file should be OK + if "GCC" in sys.version: + return CONFIG_H_OK, "sys.version mentions 'GCC'" + + # let's see if __GNUC__ is mentioned in python.h fn = sysconfig.get_config_h_filename() try: - # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough - f = open(fn) - s = f.read() - f.close() - + with open(fn) as config_h: + if "__GNUC__" in config_h.read(): + return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn + else: + return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn except IOError, exc: - # if we can't read this file, we cannot say it is wrong - # the compiler will complain later about this file as missing return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) - else: - # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar - if string.find(s,"__GNUC__") >= 0: - return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) - else: - return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) +RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +def _find_exe_version(cmd): + """Find the version of an executable by running `cmd` in the shell. + If the command is not found, or the output does not match + `RE_VERSION`, returns None. + """ + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + out = Popen(cmd, shell=True, stdout=PIPE).stdout + try: + out_string = out.read() + finally: + out.close() + result = RE_VERSION.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1)) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. - If not possible it returns None for it. - """ - from distutils.version import LooseVersion - from distutils.spawn import find_executable - import re - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) - if result: - gcc_version = LooseVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None - ld_exe = find_executable('ld') - if ld_exe: - out = os.popen(ld_exe + ' -v','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) - if result: - ld_version = LooseVersion(result.group(1)) - else: - ld_version = None - else: - ld_version = None - dllwrap_exe = find_executable('dllwrap') - if dllwrap_exe: - out = os.popen(dllwrap_exe + ' --version','r') - out_string = out.read() - out.close() - result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) - if result: - dllwrap_version = LooseVersion(result.group(1)) - else: - dllwrap_version = None - else: - dllwrap_version = None - return (gcc_version, ld_version, dllwrap_version) + If not possible it returns None for it. + """ + commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] + return tuple([_find_exe_version(cmd) for cmd in commands]) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py new file mode 100644 index 0000000000..1d46580640 --- /dev/null +++ b/tests/test_cygwinccompiler.py @@ -0,0 +1,120 @@ +"""Tests for distutils.cygwinccompiler.""" +import unittest +import sys +import os +from StringIO import StringIO +import subprocess + +from distutils import cygwinccompiler +from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, + CONFIG_H_OK, CONFIG_H_NOTOK, + CONFIG_H_UNCERTAIN, get_versions) +from distutils.tests import support + +class FakePopen(object): + test_class = None + + def __init__(self, cmd, shell, stdout): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd in exes: + self.stdout = StringIO(exes[self.cmd]) + else: + self.stdout = os.popen(cmd, 'r') + + +class CygwinCCompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def setUp(self): + super(CygwinCCompilerTestCase, self).setUp() + self.version = sys.version + self.python_h = os.path.join(self.mkdtemp(), 'python.h') + from distutils import sysconfig + self.old_get_config_h_filename = sysconfig.get_config_h_filename + sysconfig.get_config_h_filename = self._get_config_h_filename + self.old_find_executable = cygwinccompiler.find_executable + cygwinccompiler.find_executable = self._find_executable + self._exes = {} + self.old_popen = cygwinccompiler.Popen + FakePopen.test_class = self + cygwinccompiler.Popen = FakePopen + + def tearDown(self): + sys.version = self.version + from distutils import sysconfig + sysconfig.get_config_h_filename = self.old_get_config_h_filename + cygwinccompiler.find_executable = self.old_find_executable + cygwinccompiler.Popen = self.old_popen + super(CygwinCCompilerTestCase, self).tearDown() + + def _get_config_h_filename(self): + return self.python_h + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_check_config_h(self): + + # check_config_h looks for "GCC" in sys.version first + # returns CONFIG_H_OK if found + sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' + '4.0.1 (Apple Computer, Inc. build 5370)]') + + self.assertEquals(check_config_h()[0], CONFIG_H_OK) + + # then it tries to see if it can find "__GNUC__" in pyconfig.h + sys.version = 'something without the *CC word' + + # if the file doesn't exist it returns CONFIG_H_UNCERTAIN + self.assertEquals(check_config_h()[0], CONFIG_H_UNCERTAIN) + + # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK + self.write_file(self.python_h, 'xxx') + self.assertEquals(check_config_h()[0], CONFIG_H_NOTOK) + + # and CONFIG_H_OK if __GNUC__ is found + self.write_file(self.python_h, 'xxx __GNUC__ xxx') + self.assertEquals(check_config_h()[0], CONFIG_H_OK) + + def test_get_versions(self): + + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = 'very strange output' + res = get_versions() + self.assertEquals(res[0], None) + + # same thing for ld + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_versions() + self.assertEquals(res[1], None) + + # and dllwrap + self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = 'Cheese Wrap' + res = get_versions() + self.assertEquals(res[2], None) + +def test_suite(): + return unittest.makeSuite(CygwinCCompilerTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 41510f823530aa882a2c08e1c807b3e8d3d5ebf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 10 Jun 2009 18:56:35 +0000 Subject: [PATCH 2367/8469] Merged revisions 73336 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73336 | tarek.ziade | 2009-06-10 20:49:50 +0200 (Wed, 10 Jun 2009) | 1 line Distutils: started code cleanup and test coverage for cygwinccompiler ........ --- cygwinccompiler.py | 120 ++++++++++++++-------------------- tests/test_cygwinccompiler.py | 120 ++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 70 deletions(-) create mode 100644 tests/test_cygwinccompiler.py diff --git a/cygwinccompiler.py b/cygwinccompiler.py index ea4c7971fd..f541489190 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -47,12 +47,19 @@ __revision__ = "$Id$" -import os,sys,copy +import os +import sys +import copy +from subprocess import Popen, PIPE +import re + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.version import LooseVersion +from distutils.spawn import find_executable def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -347,16 +354,16 @@ def __init__ (self, CONFIG_H_UNCERTAIN = "uncertain" def check_config_h(): + """Check if the current Python installation appears amenable to building + extensions with GCC. + + Returns a tuple (status, details), where 'status' is one of the following + constants: + + - CONFIG_H_OK: all is well, go ahead and compile + - CONFIG_H_NOTOK: doesn't look good + - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h - """Check if the current Python installation (specifically, pyconfig.h) - appears amenable to building extensions with GCC. Returns a tuple - (status, details), where 'status' is one of the following constants: - CONFIG_H_OK - all is well, go ahead and compile - CONFIG_H_NOTOK - doesn't look good - CONFIG_H_UNCERTAIN - not sure -- unable to read pyconfig.h 'details' is a human-readable string explaining the situation. Note there are two ways to conclude "OK": either 'sys.version' contains @@ -368,76 +375,49 @@ def check_config_h(): # "pyconfig.h" check -- should probably be renamed... from distutils import sysconfig - # if sys.version contains GCC then python was compiled with - # GCC, and the pyconfig.h file should be OK - if sys.version.find("GCC") >= 0: - return (CONFIG_H_OK, "sys.version mentions 'GCC'") + # if sys.version contains GCC then python was compiled with GCC, and the + # pyconfig.h file should be OK + if "GCC" in sys.version: + return CONFIG_H_OK, "sys.version mentions 'GCC'" + + # let's see if __GNUC__ is mentioned in python.h fn = sysconfig.get_config_h_filename() try: - # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough - f = open(fn) - s = f.read() - f.close() - + with open(fn) as config_h: + if "__GNUC__" in config_h.read(): + return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn + else: + return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn except IOError as exc: - # if we can't read this file, we cannot say it is wrong - # the compiler will complain later about this file as missing return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) - else: - # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar - if s.find("__GNUC__") >= 0: - return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) - else: - return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) +RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +def _find_exe_version(cmd): + """Find the version of an executable by running `cmd` in the shell. + If the command is not found, or the output does not match + `RE_VERSION`, returns None. + """ + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + out = Popen(cmd, shell=True, stdout=PIPE).stdout + try: + out_string = out.read() + finally: + out.close() + result = RE_VERSION.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1)) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. - If not possible it returns None for it. - """ - from distutils.version import LooseVersion - from distutils.spawn import find_executable - import re - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) - if result: - gcc_version = LooseVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None - ld_exe = find_executable('ld') - if ld_exe: - out = os.popen(ld_exe + ' -v','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) - if result: - ld_version = LooseVersion(result.group(1)) - else: - ld_version = None - else: - ld_version = None - dllwrap_exe = find_executable('dllwrap') - if dllwrap_exe: - out = os.popen(dllwrap_exe + ' --version','r') - out_string = out.read() - out.close() - result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII) - if result: - dllwrap_version = LooseVersion(result.group(1)) - else: - dllwrap_version = None - else: - dllwrap_version = None - return (gcc_version, ld_version, dllwrap_version) + If not possible it returns None for it. + """ + commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] + return tuple([_find_exe_version(cmd) for cmd in commands]) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py new file mode 100644 index 0000000000..42c5ea40a6 --- /dev/null +++ b/tests/test_cygwinccompiler.py @@ -0,0 +1,120 @@ +"""Tests for distutils.cygwinccompiler.""" +import unittest +import sys +import os +from io import StringIO +import subprocess + +from distutils import cygwinccompiler +from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, + CONFIG_H_OK, CONFIG_H_NOTOK, + CONFIG_H_UNCERTAIN, get_versions) +from distutils.tests import support + +class FakePopen(object): + test_class = None + + def __init__(self, cmd, shell, stdout): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd in exes: + self.stdout = StringIO(exes[self.cmd]) + else: + self.stdout = os.popen(cmd, 'r') + + +class CygwinCCompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def setUp(self): + super(CygwinCCompilerTestCase, self).setUp() + self.version = sys.version + self.python_h = os.path.join(self.mkdtemp(), 'python.h') + from distutils import sysconfig + self.old_get_config_h_filename = sysconfig.get_config_h_filename + sysconfig.get_config_h_filename = self._get_config_h_filename + self.old_find_executable = cygwinccompiler.find_executable + cygwinccompiler.find_executable = self._find_executable + self._exes = {} + self.old_popen = cygwinccompiler.Popen + FakePopen.test_class = self + cygwinccompiler.Popen = FakePopen + + def tearDown(self): + sys.version = self.version + from distutils import sysconfig + sysconfig.get_config_h_filename = self.old_get_config_h_filename + cygwinccompiler.find_executable = self.old_find_executable + cygwinccompiler.Popen = self.old_popen + super(CygwinCCompilerTestCase, self).tearDown() + + def _get_config_h_filename(self): + return self.python_h + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_check_config_h(self): + + # check_config_h looks for "GCC" in sys.version first + # returns CONFIG_H_OK if found + sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' + '4.0.1 (Apple Computer, Inc. build 5370)]') + + self.assertEquals(check_config_h()[0], CONFIG_H_OK) + + # then it tries to see if it can find "__GNUC__" in pyconfig.h + sys.version = 'something without the *CC word' + + # if the file doesn't exist it returns CONFIG_H_UNCERTAIN + self.assertEquals(check_config_h()[0], CONFIG_H_UNCERTAIN) + + # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK + self.write_file(self.python_h, 'xxx') + self.assertEquals(check_config_h()[0], CONFIG_H_NOTOK) + + # and CONFIG_H_OK if __GNUC__ is found + self.write_file(self.python_h, 'xxx __GNUC__ xxx') + self.assertEquals(check_config_h()[0], CONFIG_H_OK) + + def test_get_versions(self): + + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = 'very strange output' + res = get_versions() + self.assertEquals(res[0], None) + + # same thing for ld + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_versions() + self.assertEquals(res[1], None) + + # and dllwrap + self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = 'Cheese Wrap' + res = get_versions() + self.assertEquals(res[2], None) + +def test_suite(): + return unittest.makeSuite(CygwinCCompilerTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 0ba4f63285bbba4b9fedf8a46c16fe362fd8201a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 08:12:20 +0000 Subject: [PATCH 2368/8469] Fixed #5201: now distutils.sysconfig.parse_makefile() understands '53264' in Makefiles --- sysconfig.py | 21 ++++++++++++++------- tests/test_sysconfig.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 099e0586fd..4a4fadde92 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -285,18 +285,25 @@ def parse_makefile(fn, g=None): while 1: line = fp.readline() - if line is None: # eof + if line is None: # eof break m = _variable_rx.match(line) if m: n, v = m.group(1, 2) - v = string.strip(v) - if "$" in v: + v = v.strip() + # `$$' is a literal `$' in make + tmpv = v.replace('$$', '') + + if "$" in tmpv: notdone[n] = v else: - try: v = int(v) - except ValueError: pass - done[n] = v + try: + v = int(v) + except ValueError: + # insert literal `$' + done[n] = v.replace('$$', '$') + else: + done[n] = v # do variable interpolation here while notdone: @@ -324,7 +331,7 @@ def parse_makefile(fn, g=None): else: try: value = int(value) except ValueError: - done[name] = string.strip(value) + done[name] = value.strip() else: done[name] = value del notdone[name] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 0a5ac2944a..8534881c32 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,5 +1,6 @@ """Tests for distutils.sysconfig.""" import os +import test import unittest from distutils import sysconfig @@ -9,6 +10,14 @@ class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): + def setUp(self): + super(SysconfigTestCase, self).setUp() + self.makefile = None + + def tearDown(self): + if self.makefile is not None: + os.unlink(self.makefile) + super(SysconfigTestCase, self).tearDown() def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() @@ -56,8 +65,32 @@ def set_executables(self, **kw): sysconfig.customize_compiler(comp) self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + def test_parse_makefile_base(self): + self.makefile = test.test_support.TESTFN + fd = open(self.makefile, 'w') + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + fd.close() + d = sysconfig.parse_makefile(self.makefile) + self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", + 'OTHER': 'foo'}) + + def test_parse_makefile_literal_dollar(self): + self.makefile = test.test_support.TESTFN + fd = open(self.makefile, 'w') + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + fd.close() + d = sysconfig.parse_makefile(self.makefile) + self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(SysconfigTestCase)) return suite + + +if __name__ == '__main__': + test.test_support.run_unittest(test_suite()) From c242531d00417d756b1f0a83b70d29d818ececb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 08:26:40 +0000 Subject: [PATCH 2369/8469] Merged revisions 73341 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73341 | tarek.ziade | 2009-06-11 10:12:20 +0200 (Thu, 11 Jun 2009) | 1 line Fixed #5201: now distutils.sysconfig.parse_makefile() understands '53264' in Makefiles ........ --- sysconfig.py | 21 ++++++++++++++------- tests/test_sysconfig.py | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 615da07e99..6f99de28e3 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -275,18 +275,25 @@ def parse_makefile(fn, g=None): while 1: line = fp.readline() - if line is None: # eof + if line is None: # eof break m = _variable_rx.match(line) if m: n, v = m.group(1, 2) - v = string.strip(v) - if "$" in v: + v = v.strip() + # `$$' is a literal `$' in make + tmpv = v.replace('$$', '') + + if "$" in tmpv: notdone[n] = v else: - try: v = int(v) - except ValueError: pass - done[n] = v + try: + v = int(v) + except ValueError: + # insert literal `$' + done[n] = v.replace('$$', '$') + else: + done[n] = v # do variable interpolation here while notdone: @@ -314,7 +321,7 @@ def parse_makefile(fn, g=None): else: try: value = int(value) except ValueError: - done[name] = string.strip(value) + done[name] = value.strip() else: done[name] = value del notdone[name] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 9f820575ab..9f13952133 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,11 +2,20 @@ from distutils import sysconfig import os +import test import unittest from test.test_support import TESTFN class SysconfigTestCase(unittest.TestCase): + def setUp(self): + super(SysconfigTestCase, self).setUp() + self.makefile = None + + def tearDown(self): + if self.makefile is not None: + os.unlink(self.makefile) + super(SysconfigTestCase, self).tearDown() def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() @@ -51,8 +60,22 @@ def test_get_config_vars(self): self.assert_(isinstance(cvars, dict)) self.assert_(cvars) + def test_parse_makefile_literal_dollar(self): + self.makefile = test.test_support.TESTFN + fd = open(self.makefile, 'w') + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + fd.close() + d = sysconfig.parse_makefile(self.makefile) + self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(SysconfigTestCase)) return suite + + +if __name__ == '__main__': + test.test_support.run_unittest(test_suite()) From 0f2d78ce11da94cffa073fd8090b7c27933cc7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 08:31:17 +0000 Subject: [PATCH 2370/8469] Merged revisions 73341 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73341 | tarek.ziade | 2009-06-11 10:12:20 +0200 (Thu, 11 Jun 2009) | 1 line Fixed #5201: now distutils.sysconfig.parse_makefile() understands '53264' in Makefiles ........ --- sysconfig.py | 15 +++++++++++---- tests/test_sysconfig.py | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 223ff672b9..0fbd5412bc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -286,12 +286,19 @@ def parse_makefile(fn, g=None): if m: n, v = m.group(1, 2) v = v.strip() - if "$" in v: + # `$$' is a literal `$' in make + tmpv = v.replace('$$', '') + + if "$" in tmpv: notdone[n] = v else: - try: v = int(v) - except ValueError: pass - done[n] = v + try: + v = int(v) + except ValueError: + # insert literal `$' + done[n] = v.replace('$$', '$') + else: + done[n] = v # do variable interpolation here while notdone: diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 322df39cf5..2d8fa2710e 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,14 +1,23 @@ """Tests for distutils.sysconfig.""" import os +import test import unittest from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support -from test.support import TESTFN +from test.support import TESTFN, run_unittest class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): + def setUp(self): + super(SysconfigTestCase, self).setUp() + self.makefile = None + + def tearDown(self): + if self.makefile is not None: + os.unlink(self.makefile) + super(SysconfigTestCase, self).tearDown() def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() @@ -56,8 +65,32 @@ def set_executables(self, **kw): sysconfig.customize_compiler(comp) self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + def test_parse_makefile_base(self): + self.makefile = TESTFN + fd = open(self.makefile, 'w') + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + fd.close() + d = sysconfig.parse_makefile(self.makefile) + self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", + 'OTHER': 'foo'}) + + def test_parse_makefile_literal_dollar(self): + self.makefile = TESTFN + fd = open(self.makefile, 'w') + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + fd.close() + d = sysconfig.parse_makefile(self.makefile) + self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(SysconfigTestCase)) return suite + + +if __name__ == '__main__': + run_unittest(test_suite()) From d2dbee56d652758ae690ddd7272237c414d7d9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 08:43:26 +0000 Subject: [PATCH 2371/8469] removed the last string.split() call --- sysconfig.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 4a4fadde92..dcc7231ac5 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -13,7 +13,6 @@ import os import re -import string import sys from distutils.errors import DistutilsPlatformError @@ -435,7 +434,7 @@ def _init_posix(): # relative to the srcdir, which after installation no longer makes # sense. python_lib = get_python_lib(standard_lib=1) - linkerscript_path = string.split(g['LDSHARED'])[0] + linkerscript_path = g['LDSHARED'].split()[0] linkerscript_name = os.path.basename(linkerscript_path) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) From ea7ef1006672c0a59e837376234e4b70e44936a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 09:13:36 +0000 Subject: [PATCH 2372/8469] #6263 fixed syntax error in distutils.cygwinccompiler --- cygwinccompiler.py | 2 +- tests/test_cygwinccompiler.py | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index df5ebaf9a6..fd5296c358 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -81,7 +81,7 @@ def get_msvcr(): # VS2008 / MSVC 9.0 return ['msvcr90'] else: - raise ValueError("Unknown MS Compiler version %i " % msc_Ver) + raise ValueError("Unknown MS Compiler version %s " % msc_ver) class CygwinCCompiler (UnixCCompiler): diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 1d46580640..fb823e4d80 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -8,7 +8,8 @@ from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, - CONFIG_H_UNCERTAIN, get_versions) + CONFIG_H_UNCERTAIN, get_versions, + get_msvcr) from distutils.tests import support class FakePopen(object): @@ -113,6 +114,38 @@ def test_get_versions(self): res = get_versions() self.assertEquals(res[2], None) + def test_get_msvcr(self): + + # none + sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' + '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') + self.assertEquals(get_msvcr(), None) + + # MSVC 7.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1300 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr70']) + + # MSVC 7.1 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1310 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr71']) + + # VS2005 / MSVC 8.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1400 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr80']) + + # VS2008 / MSVC 9.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1500 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr90']) + + # unknown + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1999 32 bits (Intel)]') + self.assertRaises(ValueError, get_msvcr) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) From 27e7780a17e1afcfb81b3bded04ff2f673ca2e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 09:17:19 +0000 Subject: [PATCH 2373/8469] Merged revisions 73348 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73348 | tarek.ziade | 2009-06-11 11:13:36 +0200 (Thu, 11 Jun 2009) | 1 line #6263 fixed syntax error in distutils.cygwinccompiler ........ --- cygwinccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 94a7bd96ee..2dabc0f0fe 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -76,7 +76,7 @@ def get_msvcr(): # VS2008 / MSVC 9.0 return ['msvcr90'] else: - raise ValueError("Unknown MS Compiler version %i " % msc_Ver) + raise ValueError("Unknown MS Compiler version %s " % msc_ver) class CygwinCCompiler (UnixCCompiler): From e5ed970b227477740df0c7fea99a4326ad43bea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 09:25:41 +0000 Subject: [PATCH 2374/8469] Merged revisions 73348 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73348 | tarek.ziade | 2009-06-11 11:13:36 +0200 (Thu, 11 Jun 2009) | 1 line #6263 fixed syntax error in distutils.cygwinccompiler ........ --- cygwinccompiler.py | 2 +- tests/test_cygwinccompiler.py | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index f541489190..a552ffd934 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -81,7 +81,7 @@ def get_msvcr(): # VS2008 / MSVC 9.0 return ['msvcr90'] else: - raise ValueError("Unknown MS Compiler version %i " % msc_Ver) + raise ValueError("Unknown MS Compiler version %s " % msc_ver) class CygwinCCompiler (UnixCCompiler): diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 42c5ea40a6..c5a6495da5 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -8,7 +8,8 @@ from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, - CONFIG_H_UNCERTAIN, get_versions) + CONFIG_H_UNCERTAIN, get_versions, + get_msvcr) from distutils.tests import support class FakePopen(object): @@ -113,6 +114,38 @@ def test_get_versions(self): res = get_versions() self.assertEquals(res[2], None) + def test_get_msvcr(self): + + # none + sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' + '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') + self.assertEquals(get_msvcr(), None) + + # MSVC 7.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1300 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr70']) + + # MSVC 7.1 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1310 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr71']) + + # VS2005 / MSVC 8.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1400 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr80']) + + # VS2008 / MSVC 9.0 + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1500 32 bits (Intel)]') + self.assertEquals(get_msvcr(), ['msvcr90']) + + # unknown + sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' + '[MSC v.1999 32 bits (Intel)]') + self.assertRaises(ValueError, get_msvcr) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) From 36287e0beaf534918cae7634a9e9a2b7a89540f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 09:55:09 +0000 Subject: [PATCH 2375/8469] pep8-fied cygwinccompiler module --- cygwinccompiler.py | 95 +++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 65 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index fd5296c358..c35e49d713 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -84,8 +84,9 @@ def get_msvcr(): raise ValueError("Unknown MS Compiler version %s " % msc_ver) -class CygwinCCompiler (UnixCCompiler): - +class CygwinCCompiler(UnixCCompiler): + """ Handles the Cygwin port of the GNU C compiler to Windows. + """ compiler_type = 'cygwin' obj_extension = ".o" static_lib_extension = ".a" @@ -94,11 +95,11 @@ class CygwinCCompiler (UnixCCompiler): shared_lib_format = "%s%s" exe_extension = ".exe" - def __init__ (self, verbose=0, dry_run=0, force=0): + def __init__(self, verbose=0, dry_run=0, force=0): - UnixCCompiler.__init__ (self, verbose, dry_run, force) + UnixCCompiler.__init__(self, verbose, dry_run, force) - (status, details) = check_config_h() + status, details = check_config_h() self.debug_print("Python's GCC status: %s (details: %s)" % (status, details)) if status is not CONFIG_H_OK: @@ -153,10 +154,8 @@ def __init__ (self, verbose=0, dry_run=0, force=0): # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() - # __init__ () - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + """Compiles the source by spawing GCC and windres if needed.""" if ext == '.rc' or ext == '.res': # gcc needs '.res' and '.rc' compiled to object files !!! try: @@ -170,21 +169,11 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): except DistutilsExecError, msg: raise CompileError, msg - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - + def link(self, target_desc, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): + """Link the objects.""" # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) @@ -249,64 +238,44 @@ def link (self, if not debug: extra_preargs.append("-s") - UnixCCompiler.link(self, - target_desc, - objects, - output_filename, - output_dir, - libraries, - library_dirs, + UnixCCompiler.link(self, target_desc, objects, output_filename, + output_dir, libraries, library_dirs, runtime_library_dirs, None, # export_symbols, we do this in our def-file - debug, - extra_preargs, - extra_postargs, - build_temp, + debug, extra_preargs, extra_postargs, build_temp, target_lang) - # link () - # -- Miscellaneous methods ----------------------------------------- - # overwrite the one from CCompiler to support rc and res-files - def object_filenames (self, - source_filenames, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' + def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): + """Adds supports for rc and res files.""" + if output_dir is None: + output_dir = '' obj_names = [] for src_name in source_filenames: # use normcase to make sure '.rc' is really '.rc' and not '.RC' - (base, ext) = os.path.splitext (os.path.normcase(src_name)) + base, ext = os.path.splitext(os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc','.res']): raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % \ - (ext, src_name) + "unknown file type '%s' (from '%s')" % (ext, src_name) if strip_dir: base = os.path.basename (base) - if ext == '.res' or ext == '.rc': + if ext in ('.res', '.rc'): # these need to be compiled to object files - obj_names.append (os.path.join (output_dir, - base + ext + self.obj_extension)) + obj_names.append (os.path.join(output_dir, + base + ext + self.obj_extension)) else: - obj_names.append (os.path.join (output_dir, - base + self.obj_extension)) + obj_names.append (os.path.join(output_dir, + base + self.obj_extension)) return obj_names - # object_filenames () - -# class CygwinCCompiler - - # the same as cygwin plus some additional parameters -class Mingw32CCompiler (CygwinCCompiler): - +class Mingw32CCompiler(CygwinCCompiler): + """ Handles the Mingw32 port of the GNU C compiler to Windows. + """ compiler_type = 'mingw32' - def __init__ (self, - verbose=0, - dry_run=0, - force=0): + def __init__(self, verbose=0, dry_run=0, force=0): CygwinCCompiler.__init__ (self, verbose, dry_run, force) @@ -342,10 +311,6 @@ def __init__ (self, # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() - # __init__ () - -# class Mingw32CCompiler - # Because these compilers aren't configured in Python's pyconfig.h file by # default, we should at least warn the user if he is using a unmodified # version. From 781da5cf0f6777bd12a55daef6ecceddb42b302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 11 Jun 2009 10:00:56 +0000 Subject: [PATCH 2376/8469] Merged revisions 73354 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73354 | tarek.ziade | 2009-06-11 11:55:09 +0200 (Thu, 11 Jun 2009) | 1 line pep8-fied cygwinccompiler module ........ --- cygwinccompiler.py | 92 +++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 63 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index a552ffd934..5f3a389e29 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -84,8 +84,9 @@ def get_msvcr(): raise ValueError("Unknown MS Compiler version %s " % msc_ver) -class CygwinCCompiler (UnixCCompiler): - +class CygwinCCompiler(UnixCCompiler): + """ Handles the Cygwin port of the GNU C compiler to Windows. + """ compiler_type = 'cygwin' obj_extension = ".o" static_lib_extension = ".a" @@ -94,11 +95,11 @@ class CygwinCCompiler (UnixCCompiler): shared_lib_format = "%s%s" exe_extension = ".exe" - def __init__ (self, verbose=0, dry_run=0, force=0): + def __init__(self, verbose=0, dry_run=0, force=0): - UnixCCompiler.__init__ (self, verbose, dry_run, force) + UnixCCompiler.__init__(self, verbose, dry_run, force) - (status, details) = check_config_h() + status, details = check_config_h() self.debug_print("Python's GCC status: %s (details: %s)" % (status, details)) if status is not CONFIG_H_OK: @@ -153,10 +154,8 @@ def __init__ (self, verbose=0, dry_run=0, force=0): # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() - # __init__ () - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + """Compiles the source by spawing GCC and windres if needed.""" if ext == '.rc' or ext == '.res': # gcc needs '.res' and '.rc' compiled to object files !!! try: @@ -170,21 +169,11 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): except DistutilsExecError as msg: raise CompileError(msg) - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - + def link(self, target_desc, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): + """Link the objects.""" # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) @@ -249,63 +238,44 @@ def link (self, if not debug: extra_preargs.append("-s") - UnixCCompiler.link(self, - target_desc, - objects, - output_filename, - output_dir, - libraries, - library_dirs, + UnixCCompiler.link(self, target_desc, objects, output_filename, + output_dir, libraries, library_dirs, runtime_library_dirs, None, # export_symbols, we do this in our def-file - debug, - extra_preargs, - extra_postargs, - build_temp, + debug, extra_preargs, extra_postargs, build_temp, target_lang) - # link () - # -- Miscellaneous methods ----------------------------------------- - # overwrite the one from CCompiler to support rc and res-files - def object_filenames (self, - source_filenames, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' + def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): + """Adds supports for rc and res files.""" + if output_dir is None: + output_dir = '' obj_names = [] for src_name in source_filenames: # use normcase to make sure '.rc' is really '.rc' and not '.RC' - (base, ext) = os.path.splitext (os.path.normcase(src_name)) + base, ext = os.path.splitext(os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc','.res']): raise UnknownFileError("unknown file type '%s' (from '%s')" % \ (ext, src_name)) if strip_dir: base = os.path.basename (base) - if ext == '.res' or ext == '.rc': + if ext in ('.res', '.rc'): # these need to be compiled to object files - obj_names.append (os.path.join (output_dir, - base + ext + self.obj_extension)) + obj_names.append (os.path.join(output_dir, + base + ext + self.obj_extension)) else: - obj_names.append (os.path.join (output_dir, - base + self.obj_extension)) + obj_names.append (os.path.join(output_dir, + base + self.obj_extension)) return obj_names - # object_filenames () - -# class CygwinCCompiler - - # the same as cygwin plus some additional parameters -class Mingw32CCompiler (CygwinCCompiler): - +class Mingw32CCompiler(CygwinCCompiler): + """ Handles the Mingw32 port of the GNU C compiler to Windows. + """ compiler_type = 'mingw32' - def __init__ (self, - verbose=0, - dry_run=0, - force=0): + def __init__(self, verbose=0, dry_run=0, force=0): CygwinCCompiler.__init__ (self, verbose, dry_run, force) @@ -341,10 +311,6 @@ def __init__ (self, # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() - # __init__ () - -# class Mingw32CCompiler - # Because these compilers aren't configured in Python's pyconfig.h file by # default, we should at least warn the user if he is using a unmodified # version. From f7d0cca6103fa1de330212ce723836a63d95597f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 12 Jun 2009 17:28:31 +0000 Subject: [PATCH 2377/8469] Support AMD64 in msilib. Set Win64 on reglocator. Fixes #6258. --- command/bdist_msi.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 52e193eb51..d69c4b690c 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -342,9 +342,14 @@ def add_find_python(self): exe_action = "PythonExe" + ver target_dir_prop = "TARGETDIR" + ver exe_prop = "PYTHON" + ver + if msilib.Win64: + # type: msidbLocatorTypeRawValue + msidbLocatorType64bit + Type = 2+16 + else: + Type = 2 add_data(self.db, "RegLocator", - [(machine_reg, 2, install_path, None, 2), - (user_reg, 1, install_path, None, 2)]) + [(machine_reg, 2, install_path, None, Type), + (user_reg, 1, install_path, None, Type)]) add_data(self.db, "AppSearch", [(machine_prop, machine_reg), (user_prop, user_reg)]) From 7d083e9637d1f453b3a9226250e0bc44f93ed349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 12 Jun 2009 17:31:41 +0000 Subject: [PATCH 2378/8469] Merged revisions 73390 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73390 | martin.v.loewis | 2009-06-12 19:28:31 +0200 (Fr, 12 Jun 2009) | 3 lines Support AMD64 in msilib. Set Win64 on reglocator. Fixes #6258. ........ --- command/bdist_msi.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index bca98cc23e..2e5685f5c4 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -341,9 +341,14 @@ def add_find_python(self): exe_action = "PythonExe" + ver target_dir_prop = "TARGETDIR" + ver exe_prop = "PYTHON" + ver + if msilib.Win64: + # type: msidbLocatorTypeRawValue + msidbLocatorType64bit + Type = 2+16 + else: + Type = 2 add_data(self.db, "RegLocator", - [(machine_reg, 2, install_path, None, 2), - (user_reg, 1, install_path, None, 2)]) + [(machine_reg, 2, install_path, None, Type), + (user_reg, 1, install_path, None, Type)]) add_data(self.db, "AppSearch", [(machine_prop, machine_reg), (user_prop, user_reg)]) From 8da8bbb79ee7dea376212ba2b74319045dd9c929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 13 Jun 2009 09:07:01 +0000 Subject: [PATCH 2379/8469] Merged revisions 73390 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73390 | martin.v.loewis | 2009-06-12 19:28:31 +0200 (Fr, 12 Jun 2009) | 3 lines Support AMD64 in msilib. Set Win64 on reglocator. Fixes #6258. ........ --- command/bdist_msi.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f94d9579d2..da0b30d864 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -282,9 +282,14 @@ def add_find_python(self): PYTHON.USER if defined, else from PYTHON.MACHINE. PYTHON is PYTHONDIR\python.exe""" install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version + if msilib.Win64: + # type: msidbLocatorTypeRawValue + msidbLocatorType64bit + Type = 2+16 + else: + Type = 2 add_data(self.db, "RegLocator", - [("python.machine", 2, install_path, None, 2), - ("python.user", 1, install_path, None, 2)]) + [("python.machine", 2, install_path, None, Type), + ("python.user", 1, install_path, None, Type)]) add_data(self.db, "AppSearch", [("PYTHON.MACHINE", "python.machine"), ("PYTHON.USER", "python.user")]) From 3dae7e94d2ac0d05e9cb68e114ee0babb6cc015e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 13 Jun 2009 13:15:04 +0000 Subject: [PATCH 2380/8469] bump version to 3.1rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 5a5db53272..374ccf50e9 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1rc1" +__version__ = "3.1rc2" #--end constants-- From 130d9fa567ab96fcbe027b3fed83b757da8bca7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 15 Jun 2009 23:04:29 +0000 Subject: [PATCH 2381/8469] code cleanup --- command/upload.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/command/upload.py b/command/upload.py index 74b06283f5..d3066816b4 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,11 +1,6 @@ """distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" - -from distutils.errors import * -from distutils.core import PyPIRCCommand -from distutils.spawn import spawn -from distutils import log import sys import os import socket @@ -15,12 +10,12 @@ import urlparse import cStringIO as StringIO from ConfigParser import ConfigParser +from hashlib import md5 -# this keeps compatibility for 2.3 and 2.4 -if sys.version < "2.5": - from md5 import md5 -else: - from hashlib import md5 +from distutils.errors import * +from distutils.core import PyPIRCCommand +from distutils.spawn import spawn +from distutils import log class upload(PyPIRCCommand): @@ -125,7 +120,8 @@ def upload_file(self, command, pyversion, filename): open(filename+".asc").read()) # set up the authentication - auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() + auth = "Basic " + base64.encodestring(self.username + ":" + + self.password).strip() # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' @@ -134,10 +130,10 @@ def upload_file(self, command, pyversion, filename): body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name - if type(value) != type([]): + if not isinstance(value, list): value = [value] for value in value: - if type(value) is tuple: + if isinstance(value, tuple): fn = ';filename="%s"' % value[0] value = value[1] else: From 8fdd3d8d2ce340eee2ceda407bb9ca8f22e5c58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 15 Jun 2009 23:30:13 +0000 Subject: [PATCH 2382/8469] Issue #6286: distutils upload command now uses urllib2 --- command/upload.py | 56 +++++++++++++++++++++--------------------- tests/test_upload.py | 58 ++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 62 deletions(-) diff --git a/command/upload.py b/command/upload.py index d3066816b4..8114feb8f2 100644 --- a/command/upload.py +++ b/command/upload.py @@ -5,7 +5,7 @@ import os import socket import platform -import httplib +from urllib2 import urlopen, Request, HTTPError import base64 import urlparse import cStringIO as StringIO @@ -62,6 +62,15 @@ def run(self): self.upload_file(command, pyversion, filename) def upload_file(self, command, pyversion, filename): + # Makes sure the repository URL is compliant + schema, netloc, url, params, query, fragments = \ + urlparse.urlparse(self.repository) + if params or query or fragments: + raise AssertionError("Incompatible url %s" % self.repository) + + if schema not in ('http', 'https'): + raise AssertionError("unsupported schema " + schema) + # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] @@ -153,39 +162,30 @@ def upload_file(self, command, pyversion, filename): self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) # build the Request - # We can't use urllib2 since we need to send the Basic - # auth right with the first request - schema, netloc, url, params, query, fragments = \ - urlparse.urlparse(self.repository) - assert not params and not query and not fragments - if schema == 'http': - http = httplib.HTTPConnection(netloc) - elif schema == 'https': - http = httplib.HTTPSConnection(netloc) - else: - raise AssertionError, "unsupported schema "+schema - - data = '' - loglevel = log.INFO + headers = {'Content-type': + 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth} + + request = Request(self.repository, data=body, + headers=headers) + # send the data try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', - 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) + result = urlopen(request) + status = result.getcode() + reason = result.msg except socket.error, e: self.announce(str(e), log.ERROR) return + except HTTPError, e: + status = e.code + reason = e.msg - r = http.getresponse() - if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), + if status == 200: + self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), + self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - self.announce('-'*75, r.read(), '-'*75) + self.announce('-'*75, result.read(), '-'*75) diff --git a/tests/test_upload.py b/tests/test_upload.py index f57a4a3f33..bbcd80db56 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,8 +2,8 @@ import sys import os import unittest -import httplib +from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution @@ -19,48 +19,37 @@ [server1] username:me """ -class Response(object): - def __init__(self, status=200, reason='OK'): - self.status = status - self.reason = reason -class FakeConnection(object): +class FakeOpen(object): - def __init__(self): - self.requests = [] - self.headers = [] - self.body = '' + def __init__(self, url): + self.url = url + if not isinstance(url, str): + self.req = url + else: + self.req = None + self.msg = 'OK' - def __call__(self, netloc): - return self + def getcode(self): + return 200 - def connect(self): - pass - endheaders = connect - - def putrequest(self, method, url): - self.requests.append((method, url)) - - def putheader(self, name, value): - self.headers.append((name, value)) - - def send(self, body): - self.body = body - - def getresponse(self): - return Response() class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httplib.HTTPConnection - self.conn = httplib.HTTPConnection = FakeConnection() + self.old_open = upload_mod.urlopen + upload_mod.urlopen = self._urlopen + self.last_open = None def tearDown(self): - httplib.HTTPConnection = self.old_class + upload_mod.urlopen = self.old_open super(uploadTestCase, self).tearDown() + def _urlopen(self, url): + self.last_open = FakeOpen(url) + return self.last_open + def test_finalize_options(self): # new format @@ -105,12 +94,13 @@ def test_upload(self): cmd.run() # what did we send ? - headers = dict(self.conn.headers) + headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2086') self.assert_(headers['Content-type'].startswith('multipart/form-data')) - - self.assertEquals(self.conn.requests, [('POST', '/pypi')]) - self.assert_('xxx' in self.conn.body) + self.assertEquals(self.last_open.req.get_method(), 'POST') + self.assertEquals(self.last_open.req.get_full_url(), + 'http://pypi.python.org/pypi') + self.assert_('xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) From 5cb388ee6a901dba9802d428eafe4f0a9b5e612a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 16 Jun 2009 08:31:01 +0000 Subject: [PATCH 2383/8469] starting distutils.ccompiler test coverage and cleanup --- ccompiler.py | 42 ++++++++++++++++++++--------------------- tests/test_ccompiler.py | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 22 deletions(-) create mode 100644 tests/test_ccompiler.py diff --git a/ccompiler.py b/ccompiler.py index 5a9ff76d67..e093eef2e8 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1217,27 +1217,27 @@ def gen_preprocess_options (macros, include_dirs): return pp_opts -# gen_preprocess_options () - -def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): +def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and - linking with specific libraries. 'libraries' and 'library_dirs' are, - respectively, lists of library names (not filenames!) and search - directories. Returns a list of command-line options suitable for use - with some compiler (depending on the two format strings passed in). + linking with specific libraries. + + 'libraries' and 'library_dirs' are, respectively, lists of library names + (not filenames!) and search directories. Returns a list of command-line + options suitable for use with some compiler (depending on the two format + strings passed in). """ lib_opts = [] for dir in library_dirs: - lib_opts.append (compiler.library_dir_option (dir)) + lib_opts.append(compiler.library_dir_option(dir)) for dir in runtime_library_dirs: - opt = compiler.runtime_library_dir_option (dir) - if type(opt) is ListType: - lib_opts = lib_opts + opt + opt = compiler.runtime_library_dir_option(dir) + if isinstance(opt, list): + lib_opts.extend(opt) else: - lib_opts.append (opt) + lib_opts.append(opt) # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to @@ -1246,17 +1246,15 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): # pretty nasty way to arrange your C code. for lib in libraries: - (lib_dir, lib_name) = os.path.split (lib) - if lib_dir: - lib_file = compiler.find_library_file ([lib_dir], lib_name) - if lib_file: - lib_opts.append (lib_file) + lib_dir, lib_name = os.path.split(lib) + if lib_dir != '': + lib_file = compiler.find_library_file([lib_dir], lib_name) + if lib_file is not None: + lib_opts.append(lib_file) else: - compiler.warn ("no library file corresponding to " - "'%s' found (skipping)" % lib) + compiler.warn("no library file corresponding to " + "'%s' found (skipping)" % lib) else: - lib_opts.append (compiler.library_option (lib)) + lib_opts.append(compiler.library_option(lib)) return lib_opts - -# gen_lib_options () diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py new file mode 100644 index 0000000000..58c8c5da40 --- /dev/null +++ b/tests/test_ccompiler.py @@ -0,0 +1,37 @@ +"""Tests for distutils.ccompiler.""" +import os +import unittest + +from distutils.ccompiler import gen_lib_options + +class FakeCompiler(object): + def library_dir_option(self, dir): + return "-L" + dir + + def runtime_library_dir_option(self, dir): + return ["-cool", "-R" + dir] + + def find_library_file(self, dirs, lib, debug=0): + return 'found' + + def library_option(self, lib): + return "-l" + lib + +class CCompilerTestCase(unittest.TestCase): + + def test_gen_lib_options(self): + compiler = FakeCompiler() + libdirs = ['lib1', 'lib2'] + runlibdirs = ['runlib1'] + libs = [os.path.join('dir', 'name'), 'name2'] + + opts = gen_lib_options(compiler, libdirs, runlibdirs, libs) + wanted = ['-Llib1', '-Llib2', '-cool', '-Rrunlib1', 'found', + '-lname2'] + self.assertEquals(opts, wanted) + +def test_suite(): + return unittest.makeSuite(CCompilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 1b8ce2c6b9877396b49639ffed0feca4f18989a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 20 Jun 2009 13:57:20 +0000 Subject: [PATCH 2384/8469] Fixed #6164 AIX specific linker argument in Distutils unixcompiler --- tests/test_unixccompiler.py | 8 ++++++++ unixccompiler.py | 33 +++++++++++++++++---------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 94e9edfc09..96f5454e3e 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -86,6 +86,14 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-R/foo') + # AIX C/C++ linker + sys.platform = 'aix' + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-blibpath:/foo') + + def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) diff --git a/unixccompiler.py b/unixccompiler.py index 0b1dc4af7d..129ac8cf11 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -288,23 +288,24 @@ def runtime_library_dir_option(self, dir): return "+s -L" + dir elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - else: - if compiler[:3] == "gcc" or compiler[:3] == "g++": - # gcc on non-GNU systems does not need -Wl, but can - # use it anyway. Since distutils has always passed in - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": - # GNU ld needs an extra option to get a RUNPATH - # instead of just an RPATH. - return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir + elif compiler[:3] == "gcc" or compiler[:3] == "g++": + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir else: - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. - return "-R" + dir + return "-Wl,-R" + dir + elif sys.platform[:3] == "aix": + return "-blibpath:" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib From b7c54cd287ae36a0e91930dd390fbae077b91d85 Mon Sep 17 00:00:00 2001 From: Steven Bethard Date: Sun, 21 Jun 2009 21:03:41 +0000 Subject: [PATCH 2385/8469] Fix memory bug in bdist_msi. (Commit okayed in issue6319.) --- command/bdist_msi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index d69c4b690c..7a5ca807a6 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -315,8 +315,7 @@ def add_files(self): key = seen[afile] add_data(self.db, "DuplicateFile", [(key + version, dir.component, key, None, dir.logical)]) - - + db.Commit() cab.commit(db) def add_find_python(self): From 358676725f152706531025f7951588a1026f35b6 Mon Sep 17 00:00:00 2001 From: Steven Bethard Date: Sun, 21 Jun 2009 21:07:41 +0000 Subject: [PATCH 2386/8469] Merged revisions 73499 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73499 | steven.bethard | 2009-06-21 17:03:41 -0400 (Sun, 21 Jun 2009) | 1 line Fix memory bug in bdist_msi. (Commit okayed in issue6319.) ........ --- command/bdist_msi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 2e5685f5c4..c4be47b579 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -314,8 +314,7 @@ def add_files(self): key = seen[afile] add_data(self.db, "DuplicateFile", [(key + version, dir.component, key, None, dir.logical)]) - - + db.Commit() cab.commit(db) def add_find_python(self): From 32cbe82d88579474ca58b8e7d099a9b13b876e8c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 26 Jun 2009 13:11:28 +0000 Subject: [PATCH 2387/8469] bump version to 3.1 final :) --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 374ccf50e9..73c77f1fa6 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1rc2" +__version__ = "3.1" #--end constants-- From 66e12f773def859e16ea917cd0c03f90f00a43f5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Jun 2009 21:40:27 +0000 Subject: [PATCH 2388/8469] bump to 3.2a0 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 73c77f1fa6..18b02fc629 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1" +__version__ = "3.2a0" #--end constants-- From 94800550afc7760fb7c596a29c7f5f7bc8fa56cb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Jun 2009 22:03:18 +0000 Subject: [PATCH 2389/8469] version to 3.1.1a0 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 73c77f1fa6..994e91fa29 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1" +__version__ = "3.1.1a0" #--end constants-- From a538be9a7a15f703914e4ca8365d8756f07aa155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 28 Jun 2009 21:10:49 +0000 Subject: [PATCH 2390/8469] Merged revisions 73435 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73435 | tarek.ziade | 2009-06-16 01:04:29 +0200 (Tue, 16 Jun 2009) | 1 line code cleanup ........ --- command/upload.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/command/upload.py b/command/upload.py index 3b4a036718..2692377558 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,11 +1,6 @@ """distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" - -from distutils.errors import * -from distutils.core import PyPIRCCommand -from distutils.spawn import spawn -from distutils import log import sys import os, io import socket @@ -14,12 +9,12 @@ import http.client as httpclient import base64 import urllib.parse +from hashlib import md5 -# this keeps compatibility for 2.3 and 2.4 -if sys.version < "2.5": - from md5 import md5 -else: - from hashlib import md5 +from distutils.errors import * +from distutils.core import PyPIRCCommand +from distutils.spawn import spawn +from distutils import log class upload(PyPIRCCommand): @@ -137,10 +132,10 @@ def upload_file(self, command, pyversion, filename): for key, value in data.items(): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name - if type(value) != type([]): + if not isinstance(value, list): value = [value] for value in value: - if type(value) is tuple: + if isinstance(value, tuple): title += '; filename="%s"' % value[0] value = value[1] else: From c25f31bc19447133aaa2eb575b15e3b428eea569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 28 Jun 2009 21:26:27 +0000 Subject: [PATCH 2391/8469] Merged revisions 73436 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73436 | tarek.ziade | 2009-06-16 01:30:13 +0200 (Tue, 16 Jun 2009) | 1 line Issue #6286: distutils upload command now uses urllib2 ........ --- command/upload.py | 60 +++++++++++++++++++++----------------------- tests/test_upload.py | 58 ++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 65 deletions(-) diff --git a/command/upload.py b/command/upload.py index 2692377558..defdda642b 100644 --- a/command/upload.py +++ b/command/upload.py @@ -5,10 +5,9 @@ import os, io import socket import platform -import configparser -import http.client as httpclient +from urllib.request import urlopen, Request, HTTPError import base64 -import urllib.parse +from urllib.parse import urlparse from hashlib import md5 from distutils.errors import * @@ -61,6 +60,15 @@ def run(self): self.upload_file(command, pyversion, filename) def upload_file(self, command, pyversion, filename): + # Makes sure the repository URL is compliant + schema, netloc, url, params, query, fragments = \ + urlparse(self.repository) + if params or query or fragments: + raise AssertionError("Incompatible url %s" % self.repository) + + if schema not in ('http', 'https'): + raise AssertionError("unsupported schema " + schema) + # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] @@ -153,40 +161,30 @@ def upload_file(self, command, pyversion, filename): self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) # build the Request - # We can't use urllib since we need to send the Basic - # auth right with the first request - # TODO(jhylton): Can we fix urllib? - schema, netloc, url, params, query, fragments = \ - urllib.parse.urlparse(self.repository) - assert not params and not query and not fragments - if schema == 'http': - http = httpclient.HTTPConnection(netloc) - elif schema == 'https': - http = httpclient.HTTPSConnection(netloc) - else: - raise AssertionError("unsupported schema "+schema) - - data = '' - loglevel = log.INFO + headers = {'Content-type': + 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth} + + request = Request(self.repository, data=body, + headers=headers) + # send the data try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', - 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) + result = urlopen(request) + status = result.getcode() + reason = result.msg except socket.error as e: self.announce(str(e), log.ERROR) return + except HTTPError as e: + status = e.code + reason = e.msg - r = http.getresponse() - if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), + if status == 200: + self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), + self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - self.announce('-'*75, r.read(), '-'*75) + self.announce('-'*75, result.read(), '-'*75) diff --git a/tests/test_upload.py b/tests/test_upload.py index 95e4ac3315..aaeaffde1c 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,8 +2,8 @@ import sys import os import unittest -import http.client as httpclient +from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution @@ -19,48 +19,37 @@ [server1] username:me """ -class Response(object): - def __init__(self, status=200, reason='OK'): - self.status = status - self.reason = reason -class FakeConnection(object): +class FakeOpen(object): - def __init__(self): - self.requests = [] - self.headers = [] - self.body = '' + def __init__(self, url): + self.url = url + if not isinstance(url, str): + self.req = url + else: + self.req = None + self.msg = 'OK' - def __call__(self, netloc): - return self + def getcode(self): + return 200 - def connect(self): - pass - endheaders = connect - - def putrequest(self, method, url): - self.requests.append((method, url)) - - def putheader(self, name, value): - self.headers.append((name, value)) - - def send(self, body): - self.body = body - - def getresponse(self): - return Response() class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httpclient.HTTPConnection - self.conn = httpclient.HTTPConnection = FakeConnection() + self.old_open = upload_mod.urlopen + upload_mod.urlopen = self._urlopen + self.last_open = None def tearDown(self): - httpclient.HTTPConnection = self.old_class + upload_mod.urlopen = self.old_open super(uploadTestCase, self).tearDown() + def _urlopen(self, url): + self.last_open = FakeOpen(url) + return self.last_open + def test_finalize_options(self): # new format @@ -105,12 +94,13 @@ def test_upload(self): cmd.run() # what did we send ? - headers = dict(self.conn.headers) + headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2087') self.assert_(headers['Content-type'].startswith('multipart/form-data')) - - self.assertEquals(self.conn.requests, [('POST', '/pypi')]) - self.assert_((b'xxx') in self.conn.body) + self.assertEquals(self.last_open.req.get_method(), 'POST') + self.assertEquals(self.last_open.req.get_full_url(), + 'http://pypi.python.org/pypi') + self.assert_(b'xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) From 05df8a008c0f8fdf36a253a815390886eed089e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 28 Jun 2009 21:29:24 +0000 Subject: [PATCH 2392/8469] Merged revisions 73445 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73445 | tarek.ziade | 2009-06-16 10:31:01 +0200 (Tue, 16 Jun 2009) | 1 line starting distutils.ccompiler test coverage and cleanup ........ --- ccompiler.py | 22 ++++++++++++---------- tests/test_ccompiler.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 tests/test_ccompiler.py diff --git a/ccompiler.py b/ccompiler.py index 875f96fac3..ff7f9df1c3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -1151,12 +1151,14 @@ def gen_preprocess_options(macros, include_dirs): return pp_opts -def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): +def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and - linking with specific libraries. 'libraries' and 'library_dirs' are, - respectively, lists of library names (not filenames!) and search - directories. Returns a list of command-line options suitable for use - with some compiler (depending on the two format strings passed in). + linking with specific libraries. + + 'libraries' and 'library_dirs' are, respectively, lists of library names + (not filenames!) and search directories. Returns a list of command-line + options suitable for use with some compiler (depending on the two format + strings passed in). """ lib_opts = [] @@ -1166,7 +1168,7 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): for dir in runtime_library_dirs: opt = compiler.runtime_library_dir_option(dir) if isinstance(opt, list): - lib_opts = lib_opts + opt + lib_opts.extend(opt) else: lib_opts.append(opt) @@ -1177,14 +1179,14 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): # pretty nasty way to arrange your C code. for lib in libraries: - (lib_dir, lib_name) = os.path.split(lib) - if lib_dir: + lib_dir, lib_name = os.path.split(lib) + if lib_dir != '': lib_file = compiler.find_library_file([lib_dir], lib_name) - if lib_file: + if lib_file is not None: lib_opts.append(lib_file) else: compiler.warn("no library file corresponding to " "'%s' found (skipping)" % lib) else: - lib_opts.append(compiler.library_option (lib)) + lib_opts.append(compiler.library_option(lib)) return lib_opts diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py new file mode 100644 index 0000000000..58c8c5da40 --- /dev/null +++ b/tests/test_ccompiler.py @@ -0,0 +1,37 @@ +"""Tests for distutils.ccompiler.""" +import os +import unittest + +from distutils.ccompiler import gen_lib_options + +class FakeCompiler(object): + def library_dir_option(self, dir): + return "-L" + dir + + def runtime_library_dir_option(self, dir): + return ["-cool", "-R" + dir] + + def find_library_file(self, dirs, lib, debug=0): + return 'found' + + def library_option(self, lib): + return "-l" + lib + +class CCompilerTestCase(unittest.TestCase): + + def test_gen_lib_options(self): + compiler = FakeCompiler() + libdirs = ['lib1', 'lib2'] + runlibdirs = ['runlib1'] + libs = [os.path.join('dir', 'name'), 'name2'] + + opts = gen_lib_options(compiler, libdirs, runlibdirs, libs) + wanted = ['-Llib1', '-Llib2', '-cool', '-Rrunlib1', 'found', + '-lname2'] + self.assertEquals(opts, wanted) + +def test_suite(): + return unittest.makeSuite(CCompilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From d500c02486a30fad1e49244afd7cca46009d0c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 28 Jun 2009 21:30:52 +0000 Subject: [PATCH 2393/8469] Merged revisions 73490 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73490 | tarek.ziade | 2009-06-20 15:57:20 +0200 (Sat, 20 Jun 2009) | 1 line Fixed #6164 AIX specific linker argument in Distutils unixcompiler ........ --- tests/test_unixccompiler.py | 8 ++++++++ unixccompiler.py | 33 +++++++++++++++++---------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 94e9edfc09..96f5454e3e 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -86,6 +86,14 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-R/foo') + # AIX C/C++ linker + sys.platform = 'aix' + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-blibpath:/foo') + + def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) diff --git a/unixccompiler.py b/unixccompiler.py index c11544d828..26d2856ad4 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -286,23 +286,24 @@ def runtime_library_dir_option(self, dir): return "+s -L" + dir elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - else: - if compiler[:3] == "gcc" or compiler[:3] == "g++": - # gcc on non-GNU systems does not need -Wl, but can - # use it anyway. Since distutils has always passed in - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": - # GNU ld needs an extra option to get a RUNPATH - # instead of just an RPATH. - return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir + elif compiler[:3] == "gcc" or compiler[:3] == "g++": + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir else: - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. - return "-R" + dir + return "-Wl,-R" + dir + elif sys.platform[:3] == "aix": + return "-blibpath:" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib From ae2382ced6b44c8d41fdb6eb3763aa64ac708dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Jun 2009 16:13:39 +0000 Subject: [PATCH 2394/8469] Fixed 6365: wrong inplace location for build_ext if the extension had dots --- command/build_ext.py | 8 ++++---- tests/test_build_ext.py | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 293c214de7..c2c1bf13a3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -643,16 +643,16 @@ def get_ext_fullpath(self, ext_name): (inplace option). """ fullname = self.get_ext_fullname(ext_name) - filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + filename = self.get_ext_filename(base) if not self.inplace: # no further work needed return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory # using the build_py command - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) return os.path.join(package_dir, filename) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 12b8581c97..5f28b799a0 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -339,10 +339,9 @@ def test_get_outputs(self): # inplace = 0, cmd.package = 'bar' cmd.package = 'bar' path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -358,6 +357,19 @@ def test_get_outputs(self): lastdir = os.path.split(path)[-1] self.assertEquals(lastdir, cmd.package) + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 836436ecd7283a03864110e8aa71505605eb346b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Jun 2009 16:19:22 +0000 Subject: [PATCH 2395/8469] Merged revisions 73688 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73688 | tarek.ziade | 2009-06-29 18:13:39 +0200 (Mon, 29 Jun 2009) | 1 line Fixed 6365: wrong inplace location for build_ext if the extension had dots ........ --- command/build_ext.py | 8 ++++---- tests/test_build_ext.py | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 31e036bceb..57a110b0d9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -630,16 +630,16 @@ def get_ext_fullpath(self, ext_name): (inplace option). """ fullname = self.get_ext_fullname(ext_name) - filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + filename = self.get_ext_filename(base) if not self.inplace: # no further work needed return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory # using the build_py command - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) return os.path.join(package_dir, filename) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4ea11a159d..fe6009b617 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -339,10 +339,9 @@ def test_get_outputs(self): # inplace = 0, cmd.package = 'bar' cmd.package = 'bar' path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -358,6 +357,19 @@ def test_get_outputs(self): lastdir = os.path.split(path)[-1] self.assertEquals(lastdir, cmd.package) + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From fde1516d324741118bd201f845b1b1affc13d757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 29 Jun 2009 16:46:14 +0000 Subject: [PATCH 2396/8469] Merged revisions 73689 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73689 | tarek.ziade | 2009-06-29 18:19:22 +0200 (Mon, 29 Jun 2009) | 9 lines Merged revisions 73688 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73688 | tarek.ziade | 2009-06-29 18:13:39 +0200 (Mon, 29 Jun 2009) | 1 line Fixed 6365: wrong inplace location for build_ext if the extension had dots ........ ................ --- command/build_ext.py | 8 ++++---- tests/test_build_ext.py | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 31e036bceb..57a110b0d9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -630,16 +630,16 @@ def get_ext_fullpath(self, ext_name): (inplace option). """ fullname = self.get_ext_fullname(ext_name) - filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + package = '.'.join(modpath[0:-1]) + base = modpath[-1] + filename = self.get_ext_filename(base) if not self.inplace: # no further work needed return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory # using the build_py command - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) return os.path.join(package_dir, filename) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4ea11a159d..fe6009b617 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -339,10 +339,9 @@ def test_get_outputs(self): # inplace = 0, cmd.package = 'bar' cmd.package = 'bar' path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -358,6 +357,19 @@ def test_get_outputs(self): lastdir = os.path.split(path)[-1] self.assertEquals(lastdir, cmd.package) + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 0b41ce09e9dbf51c0c44d2211982691097de4a0b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 30 Jun 2009 22:57:08 +0000 Subject: [PATCH 2397/8469] convert usage of fail* to assert* --- tests/test_archive_util.py | 16 ++++++------- tests/test_bdist_rpm.py | 4 ++-- tests/test_bdist_wininst.py | 2 +- tests/test_build_clib.py | 2 +- tests/test_build_ext.py | 30 ++++++++++++------------- tests/test_build_py.py | 6 ++--- tests/test_build_scripts.py | 10 ++++----- tests/test_clean.py | 2 +- tests/test_cmd.py | 2 +- tests/test_config.py | 4 ++-- tests/test_config_cmd.py | 4 ++-- tests/test_dist.py | 42 +++++++++++++++++------------------ tests/test_install.py | 16 ++++++------- tests/test_install_data.py | 12 +++++----- tests/test_install_lib.py | 6 ++--- tests/test_install_scripts.py | 14 ++++++------ tests/test_msvc9compiler.py | 4 ++-- tests/test_register.py | 16 ++++++------- tests/test_sysconfig.py | 12 +++++----- tests/test_upload.py | 4 ++-- tests/test_util.py | 4 ++-- 21 files changed, 106 insertions(+), 106 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 29cd271faf..91bc4e3d7c 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -47,7 +47,7 @@ def test_make_tarball(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -58,7 +58,7 @@ def test_make_tarball(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) def _tarinfo(self, path): tar = tarfile.open(path) @@ -96,7 +96,7 @@ def test_tarfile_vs_tar(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') @@ -110,7 +110,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) - self.assert_(os.path.exists(tarball2)) + self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) @@ -123,7 +123,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now for a dry_run base_name = os.path.join(tmpdir2, 'archive') @@ -134,7 +134,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) @unittest.skipUnless(find_executable('compress'), 'The compress program is required') @@ -151,7 +151,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) tarball = base_name + '.tar.Z' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) # same test with dry_run @@ -165,7 +165,7 @@ def test_compress_deprecated(self): dry_run=True) finally: os.chdir(old_dir) - self.assert_(not os.path.exists(tarball)) + self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2d84007f87..c271567542 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -74,7 +74,7 @@ def test_quiet(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) def test_no_optimize_flag(self): @@ -114,7 +114,7 @@ def test_no_optimize_flag(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index f2cb4fdeba..9b1ba6d107 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -21,7 +21,7 @@ def test_get_exe_bytes(self): # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assert_(len(exe_file) > 10) + self.assertTrue(len(exe_file) > 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 47d85cd8b4..536cd67319 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -135,7 +135,7 @@ def test_run(self): cmd.run() # let's check the result - self.assert_('libfoo.a' in os.listdir(build_temp)) + self.assertTrue('libfoo.a' in os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5f28b799a0..467e90d94b 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -73,15 +73,15 @@ def test_build_ext(self): import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal @@ -114,7 +114,7 @@ def test_solaris_enable_shared(self): _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -128,7 +128,7 @@ def test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 @@ -144,9 +144,9 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set - self.assert_(lib in cmd.library_dirs) - self.assert_(lib in cmd.rpath) - self.assert_(incl in cmd.include_dirs) + self.assertTrue(lib in cmd.library_dirs) + self.assertTrue(lib in cmd.rpath) + self.assertTrue(incl in cmd.include_dirs) def test_optional_extension(self): @@ -175,10 +175,10 @@ def test_finalize_options(self): from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -192,7 +192,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -257,13 +257,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -321,7 +321,7 @@ def test_get_outputs(self): so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -330,7 +330,7 @@ def test_get_outputs(self): cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 54a4ed80fd..c815d8185e 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -52,9 +52,9 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assert_("__init__.py" in files) - self.assert_("__init__.pyc" in files) - self.assert_("README.txt" in files) + self.assertTrue("__init__.py" in files) + self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b55eb5857b..b1d2d079bd 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -16,12 +16,12 @@ class BuildScriptsTestCase(support.TempdirManager, def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assert_(not cmd.force) - self.assert_(cmd.build_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(cmd.build_dir is None) cmd.finalize_options() - self.assert_(cmd.force) + self.assertTrue(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): @@ -37,7 +37,7 @@ def test_build(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -100,7 +100,7 @@ def test_version_int(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) diff --git a/tests/test_clean.py b/tests/test_clean.py index 3026032712..dbc4ee2a18 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -35,7 +35,7 @@ def test_simple_run(self): # make sure the files where removed for name, path in dirs: - self.assert_(not os.path.exists(path), + self.assertTrue(not os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but suceed) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 8f2b36fb1f..d6438b5ea1 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -70,7 +70,7 @@ def test_ensure_string(self): cmd.option2 = None cmd.ensure_string('option2', 'xxx') - self.assert_(hasattr(cmd, 'option2')) + self.assertTrue(hasattr(cmd, 'option2')) cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') diff --git a/tests/test_config.py b/tests/test_config.py index fd778d1ba5..6947275569 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -105,9 +105,9 @@ def test_server_registration(self): def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assert_(not os.path.exists(rc)) + self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) + self.assertTrue(os.path.exists(rc)) content = open(rc).read() self.assertEquals(content, WANTED) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index bacf13a291..ef2e7bc317 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -73,14 +73,14 @@ def test_clean(self): self.write_file(f2, 'xxx') for f in (f1, f2): - self.assert_(os.path.exists(f)) + self.assertTrue(os.path.exists(f)) pkg_dir, dist = self.create_dist() cmd = config(dist) cmd._clean(f1, f2) for f in (f1, f2): - self.assert_(not os.path.exists(f)) + self.assertTrue(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index 7ccdd53b79..07f392c4ee 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -73,7 +73,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assert_(isinstance(cmd, test_dist)) + self.assertTrue(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -204,10 +204,10 @@ def test_simple_metadata(self): "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.0" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.0" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -219,9 +219,9 @@ def test_provides(self): self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -239,11 +239,11 @@ def test_requires(self): self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("Requires: other" in meta) - self.assert_("Requires: another (==1.0)" in meta) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("Requires: other" in meta) + self.assertTrue("Requires: another (==1.0)" in meta) + self.assertTrue("obsoletes:" not in meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -261,11 +261,11 @@ def test_obsoletes(self): self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("Obsoletes: other" in meta) - self.assert_("Obsoletes: another (<1.0)" in meta) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("Obsoletes: other" in meta) + self.assertTrue("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -299,14 +299,14 @@ def test_custom_pydistutils(self): if sys.platform in ('linux', 'darwin'): self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files, + self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -332,7 +332,7 @@ def test_show_help(self): output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assert_(len(output) > 0) + self.assertTrue(len(output) > 0) def test_suite(): suite = unittest.TestSuite() diff --git a/tests/test_install.py b/tests/test_install.py index 8d7e97227c..d0ad5ce159 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -88,7 +88,7 @@ def _expanduser(path): def _test_user_site(self): for key in ('nt_user', 'unix_user', 'os2_home'): - self.assert_(key in INSTALL_SCHEMES) + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -96,24 +96,24 @@ def _test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assert_(not os.path.exists(self.user_base)) - self.assert_(not os.path.exists(self.user_site)) + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() # now they should - self.assert_(os.path.exists(self.user_base)) - self.assert_(os.path.exists(self.user_site)) + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) - self.assert_('userbase' in cmd.config_vars) - self.assert_('usersite' in cmd.config_vars) + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 73c40371d6..7072136792 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -35,9 +35,9 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # let's try with warn_dir one @@ -47,8 +47,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # now using root and empty dir @@ -65,8 +65,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 4) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) def test_suite(): return unittest.makeSuite(InstallDataTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index d768166829..793b95cad6 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -39,8 +39,8 @@ def test_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() @@ -57,7 +57,7 @@ def test_get_outputs(self): cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assert_(len(cmd.get_outputs()) >= 2) + self.assertTrue(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index fffa6ef2c3..b7eb625ac5 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -23,15 +23,15 @@ def test_default_settings(self): skip_build=1, ) cmd = install_scripts(dist) - self.assert_(not cmd.force) - self.assert_(not cmd.skip_build) - self.assert_(cmd.build_dir is None) - self.assert_(cmd.install_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(not cmd.skip_build) + self.assertTrue(cmd.build_dir is None) + self.assertTrue(cmd.install_dir is None) cmd.finalize_options() - self.assert_(cmd.force) - self.assert_(cmd.skip_build) + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") @@ -69,7 +69,7 @@ def write_script(name, text): installed = os.listdir(target) for name in expected: - self.assert_(name in installed) + self.assertTrue(name in installed) def test_suite(): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 78ce3b7a84..21242a8eb9 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Software\Microsoft\Notepad' v = Reg.get_value(path, u"lfitalic") - self.assert_(v in (0, 1)) + self.assertTrue(v in (0, 1)) import _winreg HKCU = _winreg.HKEY_CURRENT_USER @@ -54,7 +54,7 @@ def test_reg_class(self): self.assertEquals(keys, None) keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assert_('Notepad' in keys) + self.assertTrue('Notepad' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) diff --git a/tests/test_register.py b/tests/test_register.py index 0c6bf66989..ada77a015a 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -96,7 +96,7 @@ def test_create_pypirc(self): cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assert_(not os.path.exists(self.rc)) + self.assertTrue(not os.path.exists(self.rc)) # patching raw_input and getpass.getpass # so register gets happy @@ -115,7 +115,7 @@ def test_create_pypirc(self): del register_module.raw_input # we should have a brand new .pypirc file - self.assert_(os.path.exists(self.rc)) + self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC content = open(self.rc).read() @@ -133,13 +133,13 @@ def _no_way(prompt=''): # let's see what the server received : we should # have 2 similar requests - self.assert_(self.conn.reqs, 2) + self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEquals(req1['Content-length'], '1374') self.assertEquals(req2['Content-length'], '1374') - self.assert_('xxx' in self.conn.reqs[1].data) + self.assertTrue('xxx' in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -165,11 +165,11 @@ def test_registering(self): del register_module.raw_input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '608') - self.assert_('tarek' in req.data) + self.assertTrue('tarek' in req.data) def test_password_reset(self): # this test runs choice 3 @@ -183,11 +183,11 @@ def test_password_reset(self): del register_module.raw_input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '290') - self.assert_('tarek' in req.data) + self.assertTrue('tarek' in req.data) def test_strict(self): # testing the script option diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 8534881c32..edc8fd8d60 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -21,12 +21,12 @@ def tearDown(self): def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() - self.assert_(os.path.isfile(config_h), config_h) + self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before - #self.assert_(os.path.isdir(lib_dir), lib_dir) + #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) @@ -36,14 +36,14 @@ def test_get_python_inc(self): # This is not much of a test. We make sure Python.h exists # in the directory returned by get_python_inc() but we don't know # it is the correct file. - self.assert_(os.path.isdir(inc_dir), inc_dir) + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assert_(isinstance(cvars, dict)) - self.assert_(cvars) + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) def test_customize_compiler(self): diff --git a/tests/test_upload.py b/tests/test_upload.py index bbcd80db56..0d95a0917e 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -96,11 +96,11 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2086') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') - self.assert_('xxx' in self.last_open.req.data) + self.assertTrue('xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index cee7d5263b..c0acf5f481 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -225,10 +225,10 @@ def test_strtobool(self): no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') for y in yes: - self.assert_(strtobool(y)) + self.assertTrue(strtobool(y)) for n in no: - self.assert_(not strtobool(n)) + self.assertTrue(not strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' From d42774082d0532c78405d5b46f7d9896efcfb7a6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 30 Jun 2009 23:06:06 +0000 Subject: [PATCH 2398/8469] convert old fail* assertions to assert* --- tests/test_archive_util.py | 16 ++++++------- tests/test_bdist_rpm.py | 4 ++-- tests/test_bdist_wininst.py | 2 +- tests/test_build_clib.py | 2 +- tests/test_build_ext.py | 30 ++++++++++++------------- tests/test_build_py.py | 6 ++--- tests/test_build_scripts.py | 10 ++++----- tests/test_clean.py | 2 +- tests/test_cmd.py | 2 +- tests/test_config.py | 4 ++-- tests/test_config_cmd.py | 4 ++-- tests/test_dist.py | 42 +++++++++++++++++------------------ tests/test_install.py | 16 ++++++------- tests/test_install_data.py | 12 +++++----- tests/test_install_lib.py | 6 ++--- tests/test_install_scripts.py | 14 ++++++------ tests/test_msvc9compiler.py | 4 ++-- tests/test_register.py | 16 ++++++------- tests/test_sysconfig.py | 12 +++++----- tests/test_upload.py | 4 ++-- tests/test_util.py | 4 ++-- 21 files changed, 106 insertions(+), 106 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 663b33532a..d88e0b350d 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -47,7 +47,7 @@ def test_make_tarball(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -58,7 +58,7 @@ def test_make_tarball(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) def _tarinfo(self, path): tar = tarfile.open(path) @@ -96,7 +96,7 @@ def test_tarfile_vs_tar(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') @@ -110,7 +110,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) - self.assert_(os.path.exists(tarball2)) + self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) @@ -123,7 +123,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now for a dry_run base_name = os.path.join(tmpdir2, 'archive') @@ -134,7 +134,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) @unittest.skipUnless(find_executable('compress'), 'The compress program is required') @@ -151,7 +151,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) tarball = base_name + '.tar.Z' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) # same test with dry_run @@ -165,7 +165,7 @@ def test_compress_deprecated(self): dry_run=True) finally: os.chdir(old_dir) - self.assert_(not os.path.exists(tarball)) + self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2d84007f87..c271567542 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -74,7 +74,7 @@ def test_quiet(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) def test_no_optimize_flag(self): @@ -114,7 +114,7 @@ def test_no_optimize_flag(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index f2cb4fdeba..9b1ba6d107 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -21,7 +21,7 @@ def test_get_exe_bytes(self): # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assert_(len(exe_file) > 10) + self.assertTrue(len(exe_file) > 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 47d85cd8b4..536cd67319 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -135,7 +135,7 @@ def test_run(self): cmd.run() # let's check the result - self.assert_('libfoo.a' in os.listdir(build_temp)) + self.assertTrue('libfoo.a' in os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index fe6009b617..08e3e1ff1c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -74,15 +74,15 @@ def test_build_ext(self): import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal @@ -114,7 +114,7 @@ def test_solaris_enable_shared(self): _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -128,7 +128,7 @@ def test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 @@ -144,9 +144,9 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set - self.assert_(lib in cmd.library_dirs) - self.assert_(lib in cmd.rpath) - self.assert_(incl in cmd.include_dirs) + self.assertTrue(lib in cmd.library_dirs) + self.assertTrue(lib in cmd.rpath) + self.assertTrue(incl in cmd.include_dirs) def test_optional_extension(self): @@ -175,10 +175,10 @@ def test_finalize_options(self): from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -192,7 +192,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -257,13 +257,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -321,7 +321,7 @@ def test_get_outputs(self): so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -330,7 +330,7 @@ def test_get_outputs(self): cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 75b6624f5a..8ad3bbc452 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -52,9 +52,9 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assert_("__init__.py" in files) - self.assert_("__init__.pyc" in files) - self.assert_("README.txt" in files) + self.assertTrue("__init__.py" in files) + self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b55eb5857b..b1d2d079bd 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -16,12 +16,12 @@ class BuildScriptsTestCase(support.TempdirManager, def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assert_(not cmd.force) - self.assert_(cmd.build_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(cmd.build_dir is None) cmd.finalize_options() - self.assert_(cmd.force) + self.assertTrue(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): @@ -37,7 +37,7 @@ def test_build(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -100,7 +100,7 @@ def test_version_int(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) diff --git a/tests/test_clean.py b/tests/test_clean.py index 3026032712..dbc4ee2a18 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -35,7 +35,7 @@ def test_simple_run(self): # make sure the files where removed for name, path in dirs: - self.assert_(not os.path.exists(path), + self.assertTrue(not os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but suceed) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 8f2b36fb1f..d6438b5ea1 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -70,7 +70,7 @@ def test_ensure_string(self): cmd.option2 = None cmd.ensure_string('option2', 'xxx') - self.assert_(hasattr(cmd, 'option2')) + self.assertTrue(hasattr(cmd, 'option2')) cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') diff --git a/tests/test_config.py b/tests/test_config.py index 0f97cf7a5e..879689d2bb 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -102,9 +102,9 @@ def test_server_registration(self): def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assert_(not os.path.exists(rc)) + self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) + self.assertTrue(os.path.exists(rc)) content = open(rc).read() self.assertEquals(content, WANTED) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index bacf13a291..ef2e7bc317 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -73,14 +73,14 @@ def test_clean(self): self.write_file(f2, 'xxx') for f in (f1, f2): - self.assert_(os.path.exists(f)) + self.assertTrue(os.path.exists(f)) pkg_dir, dist = self.create_dist() cmd = config(dist) cmd._clean(f1, f2) for f in (f1, f2): - self.assert_(not os.path.exists(f)) + self.assertTrue(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index 16ef68e962..c031cb85ac 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -72,7 +72,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assert_(isinstance(cmd, test_dist)) + self.assertTrue(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -175,10 +175,10 @@ def test_simple_metadata(self): "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.0" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.0" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -190,9 +190,9 @@ def test_provides(self): self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -210,11 +210,11 @@ def test_requires(self): self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("Requires: other" in meta) - self.assert_("Requires: another (==1.0)" in meta) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("Requires: other" in meta) + self.assertTrue("Requires: another (==1.0)" in meta) + self.assertTrue("obsoletes:" not in meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -232,11 +232,11 @@ def test_obsoletes(self): self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("Obsoletes: other" in meta) - self.assert_("Obsoletes: another (<1.0)" in meta) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("Obsoletes: other" in meta) + self.assertTrue("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -270,14 +270,14 @@ def test_custom_pydistutils(self): if sys.platform in ('linux', 'darwin'): self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files, + self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -303,7 +303,7 @@ def test_show_help(self): output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assert_(len(output) > 0) + self.assertTrue(len(output) > 0) def test_suite(): suite = unittest.TestSuite() diff --git a/tests/test_install.py b/tests/test_install.py index 8d7e97227c..d0ad5ce159 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -88,7 +88,7 @@ def _expanduser(path): def _test_user_site(self): for key in ('nt_user', 'unix_user', 'os2_home'): - self.assert_(key in INSTALL_SCHEMES) + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -96,24 +96,24 @@ def _test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assert_(not os.path.exists(self.user_base)) - self.assert_(not os.path.exists(self.user_site)) + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() # now they should - self.assert_(os.path.exists(self.user_base)) - self.assert_(os.path.exists(self.user_site)) + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) - self.assert_('userbase' in cmd.config_vars) - self.assert_('usersite' in cmd.config_vars) + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 73c40371d6..7072136792 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -35,9 +35,9 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # let's try with warn_dir one @@ -47,8 +47,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # now using root and empty dir @@ -65,8 +65,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 4) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) def test_suite(): return unittest.makeSuite(InstallDataTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index d768166829..793b95cad6 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -39,8 +39,8 @@ def test_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() @@ -57,7 +57,7 @@ def test_get_outputs(self): cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assert_(len(cmd.get_outputs()) >= 2) + self.assertTrue(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index fffa6ef2c3..b7eb625ac5 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -23,15 +23,15 @@ def test_default_settings(self): skip_build=1, ) cmd = install_scripts(dist) - self.assert_(not cmd.force) - self.assert_(not cmd.skip_build) - self.assert_(cmd.build_dir is None) - self.assert_(cmd.install_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(not cmd.skip_build) + self.assertTrue(cmd.build_dir is None) + self.assertTrue(cmd.install_dir is None) cmd.finalize_options() - self.assert_(cmd.force) - self.assert_(cmd.skip_build) + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") @@ -69,7 +69,7 @@ def write_script(name, text): installed = os.listdir(target) for name in expected: - self.assert_(name in installed) + self.assertTrue(name in installed) def test_suite(): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 11e5a47630..73827988bb 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Software\Microsoft\Notepad' v = Reg.get_value(path, "lfitalic") - self.assert_(v in (0, 1)) + self.assertTrue(v in (0, 1)) import winreg HKCU = winreg.HKEY_CURRENT_USER @@ -54,7 +54,7 @@ def test_reg_class(self): self.assertEquals(keys, None) keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assert_('Notepad' in keys) + self.assertTrue('Notepad' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) diff --git a/tests/test_register.py b/tests/test_register.py index d9ff3ec441..c03ad10147 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -96,7 +96,7 @@ def test_create_pypirc(self): cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assert_(not os.path.exists(self.rc)) + self.assertTrue(not os.path.exists(self.rc)) # patching input and getpass.getpass # so register gets happy @@ -115,7 +115,7 @@ def test_create_pypirc(self): del register_module.input # we should have a brand new .pypirc file - self.assert_(os.path.exists(self.rc)) + self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC content = open(self.rc).read() @@ -133,13 +133,13 @@ def _no_way(prompt=''): # let's see what the server received : we should # have 2 similar requests - self.assert_(self.conn.reqs, 2) + self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEquals(req1['Content-length'], '1374') self.assertEquals(req2['Content-length'], '1374') - self.assert_((b'xxx') in self.conn.reqs[1].data) + self.assertTrue((b'xxx') in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -165,11 +165,11 @@ def test_registering(self): del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '608') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_password_reset(self): # this test runs choice 3 @@ -183,11 +183,11 @@ def test_password_reset(self): del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '290') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_strict(self): # testing the script option diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 2d8fa2710e..eb36204439 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -21,12 +21,12 @@ def tearDown(self): def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() - self.assert_(os.path.isfile(config_h), config_h) + self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before - #self.assert_(os.path.isdir(lib_dir), lib_dir) + #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) @@ -36,14 +36,14 @@ def test_get_python_inc(self): # This is not much of a test. We make sure Python.h exists # in the directory returned by get_python_inc() but we don't know # it is the correct file. - self.assert_(os.path.isdir(inc_dir), inc_dir) + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assert_(isinstance(cvars, dict)) - self.assert_(cvars) + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) def test_customize_compiler(self): diff --git a/tests/test_upload.py b/tests/test_upload.py index aaeaffde1c..9281885876 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -96,11 +96,11 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) self.assertEquals(headers['Content-length'], '2087') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') - self.assert_(b'xxx' in self.last_open.req.data) + self.assertTrue(b'xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index cee7d5263b..c0acf5f481 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -225,10 +225,10 @@ def test_strtobool(self): no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') for y in yes: - self.assert_(strtobool(y)) + self.assertTrue(strtobool(y)) for n in no: - self.assert_(not strtobool(n)) + self.assertTrue(not strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' From b9706d78715b6195bb26fdf1e7f24715b9bcd56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 2 Jul 2009 12:47:54 +0000 Subject: [PATCH 2399/8469] raising bdist_dumb test coverage --- tests/test_bdist_dumb.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index d2ea201bd4..b28f89f5a5 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -71,6 +71,21 @@ def test_simple_built(self): # now let's check what we have in the zip file # XXX to be done + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + os.chdir(pkg_dir) + cmd = bdist_dumb(dist) + self.assertEquals(cmd.bdist_dir, None) + cmd.finalize_options() + + # bdist_dir is initialized to bdist_base/dumb if not set + base = cmd.get_finalized_command('bdist').bdist_base + self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) + + # the format is set to a default value depending on the os.name + default = cmd.default_format[os.name] + self.assertEquals(cmd.format, default) + def test_suite(): return unittest.makeSuite(BuildDumbTestCase) From 3eb63e2496e541c94db37e4d73a75cbd372be657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 2 Jul 2009 12:51:56 +0000 Subject: [PATCH 2400/8469] cleaned up the bdist_dumb module --- command/bdist_dumb.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 7324c6c2fa..3ab0330f83 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -7,16 +7,17 @@ __revision__ = "$Id$" import os + from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import * +from distutils.errors import DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb (Command): - description = "create a \"dumb\" built distribution" + description = 'create a "dumb" built distribution' user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), @@ -53,11 +54,7 @@ def initialize_options (self): self.skip_build = 0 self.relative = 0 - # initialize_options() - - - def finalize_options (self): - + def finalize_options(self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'dumb') @@ -74,11 +71,7 @@ def finalize_options (self): ('dist_dir', 'dist_dir'), ('plat_name', 'plat_name')) - # finalize_options() - - def run (self): - if not self.skip_build: self.run_command('build') @@ -127,7 +120,3 @@ def run (self): if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) - - # run() - -# class bdist_dumb From edea35d83e5b65b14a035dd01253f502a29c62d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 2 Jul 2009 13:02:21 +0000 Subject: [PATCH 2401/8469] Merged revisions 73756-73757 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73756 | tarek.ziade | 2009-07-02 14:47:54 +0200 (Thu, 02 Jul 2009) | 1 line raising bdist_dumb test coverage ........ r73757 | tarek.ziade | 2009-07-02 14:51:56 +0200 (Thu, 02 Jul 2009) | 1 line cleaned up the bdist_dumb module ........ --- command/bdist_dumb.py | 5 +++-- tests/test_bdist_dumb.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 2d39922672..63c0a47537 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -7,16 +7,17 @@ __revision__ = "$Id$" import os + from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import * +from distutils.errors import DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb(Command): - description = "create a \"dumb\" built distribution" + description = 'create a "dumb" built distribution' user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index d2ea201bd4..b28f89f5a5 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -71,6 +71,21 @@ def test_simple_built(self): # now let's check what we have in the zip file # XXX to be done + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + os.chdir(pkg_dir) + cmd = bdist_dumb(dist) + self.assertEquals(cmd.bdist_dir, None) + cmd.finalize_options() + + # bdist_dir is initialized to bdist_base/dumb if not set + base = cmd.get_finalized_command('bdist').bdist_base + self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) + + # the format is set to a default value depending on the os.name + default = cmd.default_format[os.name] + self.assertEquals(cmd.format, default) + def test_suite(): return unittest.makeSuite(BuildDumbTestCase) From d25aae0db2d96401cf8e3471d594dccf1a3b025c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 2 Jul 2009 14:20:47 +0000 Subject: [PATCH 2402/8469] pep8-fied and cleaned up distutils.util --- util.py | 142 ++++++++++++++++++++++++++------------------------------ 1 file changed, 67 insertions(+), 75 deletions(-) diff --git a/util.py b/util.py index e9d29ff49c..5bbbf22560 100644 --- a/util.py +++ b/util.py @@ -12,9 +12,10 @@ from distutils.spawn import spawn from distutils import log -def get_platform (): - """Return a string that identifies the current platform. This is used - mainly to distinguish platform-specific build directories and +def get_platform(): + """Return a string that identifies the current platform. + + This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX @@ -39,14 +40,14 @@ def get_platform (): if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" - i = string.find(sys.version, prefix) + i = sys.version.find(prefix) if i == -1: return sys.platform - j = string.find(sys.version, ")", i) + j = sys.version.find(")", i) look = sys.version[i+len(prefix):j].lower() - if look=='amd64': + if look == 'amd64': return 'win-amd64' - if look=='itanium': + if look == 'itanium': return 'win-ia64' return sys.platform @@ -61,10 +62,9 @@ def get_platform (): # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") - osname = string.lower(osname) - osname = string.replace(osname, '/', '') - machine = string.replace(machine, ' ', '_') - machine = string.replace(machine, '/', '-') + osname = osname.lower().replace('/', '') + machine = machine.replace(' ', '_') + machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- @@ -154,11 +154,10 @@ def get_platform (): return "%s-%s-%s" % (osname, release, machine) -# get_platform () +def convert_path(pathname): + """Return 'pathname' as a name that will work on the native filesystem. -def convert_path (pathname): - """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -171,23 +170,23 @@ def convert_path (pathname): if not pathname: return pathname if pathname[0] == '/': - raise ValueError, "path '%s' cannot be absolute" % pathname + raise ValueError("path '%s' cannot be absolute" % pathname) if pathname[-1] == '/': - raise ValueError, "path '%s' cannot end with '/'" % pathname + raise ValueError("path '%s' cannot end with '/'" % pathname) - paths = string.split(pathname, '/') + paths = pathname.split('/') while '.' in paths: paths.remove('.') if not paths: return os.curdir - return apply(os.path.join, paths) + return os.path.join(*paths) -# convert_path () +def change_root(new_root, pathname): + """Return 'pathname' with 'new_root' prepended. -def change_root (new_root, pathname): - """Return 'pathname' with 'new_root' prepended. If 'pathname' is - relative, this is equivalent to "os.path.join(new_root,pathname)". + If 'pathname' is relative, this is equivalent to + "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -214,19 +213,20 @@ def change_root (new_root, pathname): return os.path.join(new_root, pathname) else: # Chop off volume name from start of path - elements = string.split(pathname, ":", 1) + elements = pathname.split(":", 1) pathname = ":" + elements[1] return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError, \ - "nothing known about platform '%s'" % os.name - + raise DistutilsPlatformError("nothing known about " + "platform '%s'" % os.name) _environ_checked = 0 -def check_environ (): - """Ensure that 'os.environ' has all the environment variables we - guarantee that users can use in config files, command-line options, + +def check_environ(): + """Ensure that 'os.environ' has all the environment variables needed. + + We guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -245,10 +245,10 @@ def check_environ (): _environ_checked = 1 +def subst_vars(s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. -def subst_vars (s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. Every - occurrence of '$' followed by a name is considered a variable, and + Every occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -266,14 +266,13 @@ def _subst (match, local_vars=local_vars): try: return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) except KeyError, var: - raise ValueError, "invalid variable '$%s'" % var - -# subst_vars () + raise ValueError("invalid variable '$%s'" % var) +def grok_environment_error(exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError. -def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + This will generate an IOError or an OSError exception object. + Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -292,18 +291,20 @@ def grok_environment_error (exc, prefix="error: "): return error - # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None + def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted (s): +def split_quoted(s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. In short: words are delimited by spaces, as long as those + backslashes. + + In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -311,13 +312,12 @@ def split_quoted (s): characters are stripped from any quoted string. Returns a list of words. """ - # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... if _wordchars_re is None: _init_regex() - s = string.strip(s) + s = s.strip() words = [] pos = 0 @@ -330,7 +330,7 @@ def split_quoted (s): if s[end] in string.whitespace: # unescaped, unquoted whitespace: now words.append(s[:end]) # we definitely have a word delimiter - s = string.lstrip(s[end:]) + s = s[end:].lstrip() pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; @@ -344,12 +344,11 @@ def split_quoted (s): elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: - raise RuntimeError, \ - "this can't happen (bad char '%c')" % s[end] + raise RuntimeError("this can't happen " + "(bad char '%c')" % s[end]) if m is None: - raise ValueError, \ - "bad string (mismatched %s quotes?)" % s[end] + raise ValueError("bad string (mismatched %s quotes?)" % s[end]) (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] @@ -361,13 +360,12 @@ def split_quoted (s): return words -# split_quoted () +def execute(func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world. -def execute (func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world (eg. by - writing to the filesystem). Such actions are special because they - are disabled by the 'dry_run' flag. This method takes care of all + eg. by writing to the filesystem). Such actions are special because + they are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -380,17 +378,17 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): log.info(msg) if not dry_run: - apply(func, args) + func(*args) -def strtobool (val): +def strtobool(val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. """ - val = string.lower(val) + val = val.lower() if val in ('y', 'yes', 't', 'true', 'on', '1'): return 1 elif val in ('n', 'no', 'f', 'false', 'off', '0'): @@ -399,15 +397,13 @@ def strtobool (val): raise ValueError, "invalid truth value %r" % (val,) -def byte_compile (py_files, - optimize=0, force=0, - prefix=None, base_dir=None, - verbose=1, dry_run=0, - direct=None): +def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, + verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. 'py_files' is a list of files - to compile; any files that don't end in ".py" are silently skipped. - 'optimize' must be one of the following: + or .pyo files in the same directory. + + 'py_files' is a list of files to compile; any files that don't end in + ".py" are silently skipped. 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -432,7 +428,6 @@ def byte_compile (py_files, generated in indirect mode; unless you know what you're doing, leave it set to None. """ - # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is @@ -481,7 +476,7 @@ def byte_compile (py_files, #if prefix: # prefix = os.path.abspath(prefix) - script.write(string.join(map(repr, py_files), ",\n") + "]\n") + script.write(",\n".join(map(repr, py_files)) + "]\n") script.write(""" byte_compile(files, optimize=%r, force=%r, prefix=%r, base_dir=%r, @@ -520,9 +515,8 @@ def byte_compile (py_files, dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError, \ - ("invalid prefix: filename %r doesn't start with %r" - % (file, prefix)) + raise ValueError("invalid prefix: filename %r doesn't " + "start with %r" % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -537,13 +531,11 @@ def byte_compile (py_files, log.debug("skipping byte-compilation of %s to %s", file, cfile_base) -# byte_compile () -def rfc822_escape (header): +def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = string.split(header, '\n') - lines = map(string.strip, lines) - header = string.join(lines, '\n' + 8*' ') - return header + lines = [x.strip() for x in header.split('\n')] + sep = '\n' + 8*' ' + return sep.join(lines) From 21d1447442999782252d6c7942348cea9ca4240e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 2 Jul 2009 14:25:23 +0000 Subject: [PATCH 2403/8469] Merged revisions 73762 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73762 | tarek.ziade | 2009-07-02 16:20:47 +0200 (Thu, 02 Jul 2009) | 1 line pep8-fied and cleaned up distutils.util ........ --- util.py | 89 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/util.py b/util.py index 4c1956a2b8..ad7ae08d76 100644 --- a/util.py +++ b/util.py @@ -12,9 +12,10 @@ from distutils.spawn import spawn from distutils import log -def get_platform (): - """Return a string that identifies the current platform. This is used - mainly to distinguish platform-specific build directories and +def get_platform(): + """Return a string that identifies the current platform. + + This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX @@ -153,11 +154,10 @@ def get_platform (): return "%s-%s-%s" % (osname, release, machine) -# get_platform () +def convert_path(pathname): + """Return 'pathname' as a name that will work on the native filesystem. -def convert_path (pathname): - """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -181,12 +181,12 @@ def convert_path (pathname): return os.curdir return os.path.join(*paths) -# convert_path () +def change_root(new_root, pathname): + """Return 'pathname' with 'new_root' prepended. -def change_root (new_root, pathname): - """Return 'pathname' with 'new_root' prepended. If 'pathname' is - relative, this is equivalent to "os.path.join(new_root,pathname)". + If 'pathname' is relative, this is equivalent to + "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -218,13 +218,15 @@ def change_root (new_root, pathname): return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) - + raise DistutilsPlatformError("nothing known about " + "platform '%s'" % os.name) _environ_checked = 0 -def check_environ (): - """Ensure that 'os.environ' has all the environment variables we - guarantee that users can use in config files, command-line options, + +def check_environ(): + """Ensure that 'os.environ' has all the environment variables needed. + + We guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -243,10 +245,10 @@ def check_environ (): _environ_checked = 1 +def subst_vars(s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. -def subst_vars (s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. Every - occurrence of '$' followed by a name is considered a variable, and + Every occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -266,12 +268,11 @@ def _subst (match, local_vars=local_vars): except KeyError as var: raise ValueError("invalid variable '$%s'" % var) -# subst_vars () - +def grok_environment_error(exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError. -def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + This will generate an IOError or an OSError exception object. + Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -290,18 +291,20 @@ def grok_environment_error (exc, prefix="error: "): return error - # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None + def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted (s): +def split_quoted(s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. In short: words are delimited by spaces, as long as those + backslashes. + + In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -309,7 +312,6 @@ def split_quoted (s): characters are stripped from any quoted string. Returns a list of words. """ - # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... @@ -357,13 +359,12 @@ def split_quoted (s): return words -# split_quoted () +def execute(func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world. -def execute (func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world (eg. by - writing to the filesystem). Such actions are special because they - are disabled by the 'dry_run' flag. This method takes care of all + eg. by writing to the filesystem). Such actions are special because + they are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -379,7 +380,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): func(*args) -def strtobool (val): +def strtobool(val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values @@ -395,15 +396,13 @@ def strtobool (val): raise ValueError("invalid truth value %r" % (val,)) -def byte_compile (py_files, - optimize=0, force=0, - prefix=None, base_dir=None, - verbose=1, dry_run=0, - direct=None): +def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, + verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. 'py_files' is a list of files - to compile; any files that don't end in ".py" are silently skipped. - 'optimize' must be one of the following: + or .pyo files in the same directory. + + 'py_files' is a list of files to compile; any files that don't end in + ".py" are silently skipped. 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -428,7 +427,6 @@ def byte_compile (py_files, generated in indirect mode; unless you know what you're doing, leave it set to None. """ - # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is @@ -516,8 +514,8 @@ def byte_compile (py_files, dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError("invalid prefix: filename %r doesn't start with %r" - % (file, prefix)) + raise ValueError("invalid prefix: filename %r doesn't " + "start with %r" % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -532,9 +530,8 @@ def byte_compile (py_files, log.debug("skipping byte-compilation of %s to %s", file, cfile_base) -# byte_compile () -def rfc822_escape (header): +def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ From 414e03b9816532270f3f29a4f1777c9e8e67804c Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Thu, 2 Jul 2009 15:37:21 +0000 Subject: [PATCH 2404/8469] Merged revisions 69846 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 21:27:01 +0100 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........ --- tests/test_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index 55d2d5df7e..e481e8de39 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -57,7 +57,7 @@ def test_run_setup_provides_file(self): def test_run_setup_uses_current_dir(self): # This tests that the setup script is run with the current directory - # as it's own current directory; this was temporarily broken by a + # as its own current directory; this was temporarily broken by a # previous patch when TESTFN did not use the current directory. sys.stdout = StringIO.StringIO() cwd = os.getcwd() From 0884202338406bd0e3978c9ec4de6e9cd872ad2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 08:22:56 +0000 Subject: [PATCH 2405/8469] Fixed #6403 : package path usage for build_ext --- command/build_ext.py | 14 ++++++++++---- tests/test_build_ext.py | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c2c1bf13a3..96bd68be4c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -644,17 +644,23 @@ def get_ext_fullpath(self, ext_name): """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 467e90d94b..2ecead3c0d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -337,7 +337,8 @@ def test_get_outputs(self): self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ def test_build_ext_inplace(self): path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 8fde737bb947b2fe9b75f686d606b5cee236b317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 08:31:31 +0000 Subject: [PATCH 2406/8469] Merged revisions 73790 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ --- command/build_ext.py | 13 +++++++++++-- tests/test_build_ext.py | 43 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index e6e33ab95c..8cb1efe67e 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -629,18 +629,27 @@ def get_ext_fullpath(self, ext_name): (inplace option). """ fullname = self.get_ext_fullname(ext_name) - filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) modpath = fullname.split('.') package = '.'.join(modpath[0:-1]) base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index dc8df98fd7..e01c882069 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -274,12 +274,12 @@ def test_get_outputs(self): self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -293,7 +293,40 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') + + def test_ext_fullpath(self): + dist = Distribution() + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) def test_suite(): if not sysconfig.python_build: From 354b6e7100a54b04521cd57453c702386e4eae30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 08:33:28 +0000 Subject: [PATCH 2407/8469] Merged revisions 73790 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ --- command/build_ext.py | 14 ++++++++++---- tests/test_build_ext.py | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 57a110b0d9..30457026d4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -631,17 +631,23 @@ def get_ext_fullpath(self, ext_name): """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 08e3e1ff1c..6f0e2309d5 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -337,7 +337,8 @@ def test_get_outputs(self): self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ def test_build_ext_inplace(self): path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From f781d05ce0ced0e9e34201c464c5a1de6eee334e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 08:37:27 +0000 Subject: [PATCH 2408/8469] Merged revisions 73792 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73792 | tarek.ziade | 2009-07-03 10:33:28 +0200 (Fri, 03 Jul 2009) | 9 lines Merged revisions 73790 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line Fixed #6403 : package path usage for build_ext ........ ................ --- command/build_ext.py | 14 ++++++++++---- tests/test_build_ext.py | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 57a110b0d9..30457026d4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -631,17 +631,23 @@ def get_ext_fullpath(self, ext_name): """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] - filename = self.get_ext_filename(base) + filename = self.get_ext_filename(modpath[-1]) + if not self.inplace: # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory - # using the build_py command + # using the build_py command for that + package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index fe6009b617..f0580c1f0f 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -337,7 +337,8 @@ def test_get_outputs(self): self.assertEquals(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' - cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] @@ -355,12 +356,14 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(lastdir, 'bar') - def test_build_ext_inplace(self): - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + def test_ext_fullpath(self): + # building lxml.etree inplace + #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + #etree_ext = Extension('lxml.etree', [etree_c]) + #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} @@ -370,6 +373,28 @@ def test_build_ext_inplace(self): path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + # building lxml.etree not inplace + cmd.inplace = 0 + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', + 'portmap.so') + self.assertEquals(wanted, path) + + # building twisted.runner.portmap inplace + cmd.inplace = 1 + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From a09e1355e93bba0d5872beb36c2afe34760e17d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 09:01:07 +0000 Subject: [PATCH 2409/8469] cleaned up distutils.command.build_py --- command/build_py.py | 134 +++++++++++++++----------------------------- 1 file changed, 44 insertions(+), 90 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index d9c15749d0..5d249f3ddc 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -4,16 +4,15 @@ __revision__ = "$Id$" -import string, os -from types import * +import os from glob import glob from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path from distutils import log -class build_py (Command): +class build_py(Command): description = "\"build\" pure Python modules (copy to build directory)" @@ -30,8 +29,7 @@ class build_py (Command): boolean_options = ['compile', 'force'] negative_opt = {'no-compile' : 'compile'} - - def initialize_options (self): + def initialize_options(self): self.build_lib = None self.py_modules = None self.package = None @@ -41,7 +39,7 @@ def initialize_options (self): self.optimize = 0 self.force = None - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('build', ('build_lib', 'build_lib'), ('force', 'force')) @@ -59,15 +57,14 @@ def finalize_options (self): # Ick, copied straight from install_lib.py (fancy_getopt needs a # type system! Hell, *everything* needs a type system!!!) - if type(self.optimize) is not IntType: + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) assert 0 <= self.optimize <= 2 except (ValueError, AssertionError): - raise DistutilsOptionError, "optimize must be 0, 1, or 2" - - def run (self): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + def run(self): # XXX copy_file by default preserves atime and mtime. IMHO this is # the right thing to do, but perhaps it should be an option -- in # particular, a site administrator might want installed files to @@ -97,9 +94,7 @@ def run (self): self.byte_compile(self.get_outputs(include_bytecode=0)) - # run () - - def get_data_files (self): + def get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" data = [] if not self.packages: @@ -123,7 +118,7 @@ def get_data_files (self): data.append((package, src_dir, build_dir, filenames)) return data - def find_data_files (self, package, src_dir): + def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" globs = (self.package_data.get('', []) + self.package_data.get(package, [])) @@ -135,7 +130,7 @@ def find_data_files (self, package, src_dir): files.extend([fn for fn in filelist if fn not in files]) return files - def build_package_data (self): + def build_package_data(self): """Copy data files into build directory""" lastdir = None for package, src_dir, build_dir, filenames in self.data_files: @@ -145,23 +140,23 @@ def build_package_data (self): self.copy_file(os.path.join(src_dir, filename), target, preserve_mode=False) - def get_package_dir (self, package): + def get_package_dir(self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).""" - path = string.split(package, '.') + path = package.split('.') if not self.package_dir: if path: - return apply(os.path.join, path) + return os.path.join(*path) else: return '' else: tail = [] while path: try: - pdir = self.package_dir[string.join(path, '.')] + pdir = self.package_dir['.'.join(path)] except KeyError: tail.insert(0, path[-1]) del path[-1] @@ -181,27 +176,23 @@ def get_package_dir (self, package): tail.insert(0, pdir) if tail: - return apply(os.path.join, tail) + return os.path.join(*tail) else: return '' - # get_package_dir () - - - def check_package (self, package, package_dir): - + def check_package(self, package, package_dir): # Empty dir name means current directory, which we can probably # assume exists. Also, os.path.exists and isdir don't know about # my "empty string means current dir" convention, so we have to # circumvent them. if package_dir != "": if not os.path.exists(package_dir): - raise DistutilsFileError, \ - "package directory '%s' does not exist" % package_dir + raise DistutilsFileError( + "package directory '%s' does not exist" % package_dir) if not os.path.isdir(package_dir): - raise DistutilsFileError, \ - ("supposed package directory '%s' exists, " + - "but is not a directory") % package_dir + raise DistutilsFileError( + "supposed package directory '%s' exists, " + "but is not a directory" % package_dir) # Require __init__.py for all but the "root package" if package: @@ -216,20 +207,14 @@ def check_package (self, package, package_dir): # __init__.py doesn't exist -- so don't return the filename. return None - # check_package () - - - def check_module (self, module, module_file): + def check_module(self, module, module_file): if not os.path.isfile(module_file): log.warn("file %s (for module %s) not found", module_file, module) - return 0 + return False else: - return 1 + return True - # check_module () - - - def find_package_modules (self, package, package_dir): + def find_package_modules(self, package, package_dir): self.check_package(package, package_dir) module_files = glob(os.path.join(package_dir, "*.py")) modules = [] @@ -244,8 +229,7 @@ def find_package_modules (self, package, package_dir): self.debug_print("excluding %s" % setup_script) return modules - - def find_modules (self): + def find_modules(self): """Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through @@ -254,7 +238,6 @@ def find_modules (self): ".py" file (relative to the distribution root) that implements the module. """ - # Map package names to tuples of useful info about the package: # (package_dir, checked) # package_dir - the directory where we'll find source files for @@ -270,10 +253,9 @@ def find_modules (self): # just the "package" for a toplevel is empty (either an empty # string or empty list, depending on context). Differences: # - don't check for __init__.py in directory for empty package - for module in self.py_modules: - path = string.split(module, '.') - package = string.join(path[0:-1], '.') + path = module.split('.') + package = '.'.join(path[0:-1]) module_base = path[-1] try: @@ -299,16 +281,12 @@ def find_modules (self): return modules - # find_modules () - - - def find_all_modules (self): + def find_all_modules(self): """Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.""" - modules = [] if self.py_modules: modules.extend(self.find_modules()) @@ -317,32 +295,20 @@ def find_all_modules (self): package_dir = self.get_package_dir(package) m = self.find_package_modules(package, package_dir) modules.extend(m) - return modules - # find_all_modules () - - - def get_source_files (self): - - modules = self.find_all_modules() - filenames = [] - for module in modules: - filenames.append(module[-1]) + def get_source_files(self): + return [module[-1] for module in self.find_all_modules()] - return filenames - - - def get_module_outfile (self, build_dir, package, module): + def get_module_outfile(self, build_dir, package, module): outfile_path = [build_dir] + list(package) + [module + ".py"] return os.path.join(*outfile_path) - - def get_outputs (self, include_bytecode=1): + def get_outputs(self, include_bytecode=1): modules = self.find_all_modules() outputs = [] for (package, module, module_file) in modules: - package = string.split(package, '.') + package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) outputs.append(filename) if include_bytecode: @@ -359,13 +325,12 @@ def get_outputs (self, include_bytecode=1): return outputs - - def build_module (self, module, module_file, package): - if type(package) is StringType: - package = string.split(package, '.') - elif type(package) not in (ListType, TupleType): - raise TypeError, \ - "'package' must be a string (dot-separated), list, or tuple" + def build_module(self, module, module_file, package): + if isinstance(package, str): + package = package.split('.') + elif not isinstance(package, (list, tuple)): + raise TypeError( + "'package' must be a string (dot-separated), list, or tuple") # Now put the module source file into the "build" area -- this is # easy, we just copy it somewhere under self.build_lib (the build @@ -375,9 +340,7 @@ def build_module (self, module, module_file, package): self.mkpath(dir) return self.copy_file(module_file, outfile, preserve_mode=0) - - def build_modules (self): - + def build_modules(self): modules = self.find_modules() for (package, module, module_file) in modules: @@ -387,11 +350,7 @@ def build_modules (self): # under self.build_lib.) self.build_module(module, module_file, package) - # build_modules () - - - def build_packages (self): - + def build_packages(self): for package in self.packages: # Get list of (package, module, module_file) tuples based on @@ -412,10 +371,7 @@ def build_packages (self): assert package == package_ self.build_module(module, module_file, package) - # build_packages () - - - def byte_compile (self, files): + def byte_compile(self, files): from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: @@ -431,5 +387,3 @@ def byte_compile (self, files): if self.optimize > 0: byte_compile(files, optimize=self.optimize, force=self.force, prefix=prefix, dry_run=self.dry_run) - -# class build_py From 9357a7c74f276c20dd408a3394241c226d841b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 09:05:30 +0000 Subject: [PATCH 2410/8469] Merged revisions 73801 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73801 | tarek.ziade | 2009-07-03 11:01:07 +0200 (Fri, 03 Jul 2009) | 1 line cleaned up distutils.command.build_py ........ --- command/build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 99d85be96c..4cc80f7b4a 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -4,15 +4,15 @@ __revision__ = "$Id$" -import sys, os +import os from glob import glob from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path, Mixin2to3 from distutils import log -class build_py (Command): +class build_py(Command): description = "\"build\" pure Python modules (copy to build directory)" From 7c0126426802cc8186b46e808179d7c7a870514c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 19:01:12 +0000 Subject: [PATCH 2411/8469] basic tests to raise distutils.file_util coverage --- tests/test_file_util.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index fac4a5d1a9..99b421f73f 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -3,7 +3,7 @@ import os import shutil -from distutils.file_util import move_file +from distutils.file_util import move_file, write_file, copy_file from distutils import log from distutils.tests import support @@ -55,6 +55,21 @@ def test_move_file_verbosity(self): wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEquals(self._logs, wanted) + def test_write_file(self): + lines = ['a', 'b', 'c'] + dir = self.mkdtemp() + foo = os.path.join(dir, 'foo') + write_file(foo, lines) + content = [line.strip() for line in open(foo).readlines()] + self.assertEquals(content, lines) + + def test_copy_file(self): + src_dir = self.mkdtemp() + foo = os.path.join(src_dir, 'foo') + write_file(foo, 'content') + dst_dir = self.mkdtemp() + copy_file(foo, dst_dir) + self.assertTrue(os.path.exists(os.path.join(dst_dir, 'foo'))) def test_suite(): return unittest.makeSuite(FileUtilTestCase) From 570969b419d41a25ce8ed52e36fa756a01c751ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 19:14:49 +0000 Subject: [PATCH 2412/8469] cleaned distutils.file_util --- file_util.py | 121 ++++++++++++++++++++++----------------------------- 1 file changed, 52 insertions(+), 69 deletions(-) diff --git a/file_util.py b/file_util.py index 0c890559ee..d8e8fd5f8d 100644 --- a/file_util.py +++ b/file_util.py @@ -10,49 +10,48 @@ from distutils import log # for generating verbose output in 'copy_file()' -_copy_action = { None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking' } +_copy_action = {None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking'} -def _copy_file_contents (src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', raises - DistutilsFileError. Data is read/written in chunks of 'buffer_size' - bytes (default 16k). No attempt is made to handle anything apart from - regular files. +def _copy_file_contents(src, dst, buffer_size=16*1024): + """Copy the file 'src' to 'dst'. + + Both must be filenames. Any error opening either file, reading from + 'src', or writing to 'dst', raises DistutilsFileError. Data is + read/written in chunks of 'buffer_size' bytes (default 16k). No attempt + is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. - fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not open '%s': %s" % (src, errstr) + raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) if os.path.exists(dst): try: os.unlink(dst) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not delete '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not delete '%s': %s" % (dst, errstr)) try: fdst = open(dst, 'wb') except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not create '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not create '%s': %s" % (dst, errstr)) while 1: try: buf = fsrc.read(buffer_size) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not read from '%s': %s" % (src, errstr) + raise DistutilsFileError( + "could not read from '%s': %s" % (src, errstr)) if not buf: break @@ -60,8 +59,8 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): try: fdst.write(buf) except os.error, (errno, errstr): - raise DistutilsFileError, \ - "could not write to '%s': %s" % (dst, errstr) + raise DistutilsFileError( + "could not write to '%s': %s" % (dst, errstr)) finally: if fdst: @@ -69,25 +68,18 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): if fsrc: fsrc.close() -# _copy_file_contents() - -def copy_file (src, dst, - preserve_mode=1, - preserve_times=1, - update=0, - link=None, - verbose=1, - dry_run=0): - - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is - copied there with the same name; otherwise, it must be a filename. (If - the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' - is true (the default), the file's mode (type and permission bits, or - whatever is analogous on the current platform) is copied. If - 'preserve_times' is true (the default), the last-modified and - last-access times are copied as well. If 'update' is true, 'src' will - only be copied if 'dst' does not exist, or if 'dst' does exist but is - older than 'src'. +def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, + link=None, verbose=1, dry_run=0): + """Copy a file 'src' to 'dst'. + + If 'dst' is a directory, then 'src' is copied there with the same name; + otherwise, it must be a filename. (If the file exists, it will be + ruthlessly clobbered.) If 'preserve_mode' is true (the default), + the file's mode (type and permission bits, or whatever is analogous on + the current platform) is copied. If 'preserve_times' is true (the + default), the last-modified and last-access times are copied as well. + If 'update' is true, 'src' will only be copied if 'dst' does not exist, + or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -113,8 +105,8 @@ def copy_file (src, dst, from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): - raise DistutilsFileError, \ - "can't copy '%s': doesn't exist or not a regular file" % src + raise DistutilsFileError( + "can't copy '%s': doesn't exist or not a regular file" % src) if os.path.isdir(dst): dir = dst @@ -130,8 +122,7 @@ def copy_file (src, dst, try: action = _copy_action[link] except KeyError: - raise ValueError, \ - "invalid value '%s' for 'link' argument" % link + raise ValueError("invalid value '%s' for 'link' argument" % link) if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): @@ -148,8 +139,8 @@ def copy_file (src, dst, try: macostools.copy(src, dst, 0, preserve_times) except os.error, exc: - raise DistutilsFileError, \ - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) + raise DistutilsFileError( + "could not copy '%s' to '%s': %s" % (src, dst, exc[-1])) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) @@ -176,17 +167,13 @@ def copy_file (src, dst, return (dst, 1) -# copy_file () - - # XXX I suspect this is Unix-specific -- need porting help! -def move_file (src, dst, - verbose=1, - dry_run=0): +def move_file (src, dst, verbose=1, dry_run=0): + """Move a file 'src' to 'dst'. - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will - be moved into it with the same name; otherwise, 'src' is just renamed - to 'dst'. Return the new full name of the file. + If 'dst' is a directory, the file will be moved into it with the same + name; otherwise, 'src' is just renamed to 'dst'. Return the new + full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? @@ -201,20 +188,19 @@ def move_file (src, dst, return dst if not isfile(src): - raise DistutilsFileError, \ - "can't move '%s': not a regular file" % src + raise DistutilsFileError("can't move '%s': not a regular file" % src) if isdir(dst): dst = os.path.join(dst, basename(src)) elif exists(dst): - raise DistutilsFileError, \ - "can't move '%s': destination '%s' already exists" % \ - (src, dst) + raise DistutilsFileError( + "can't move '%s': destination '%s' already exists" % + (src, dst)) if not isdir(dirname(dst)): - raise DistutilsFileError, \ + raise DistutilsFileError( "can't move '%s': destination '%s' not a valid path" % \ - (src, dst) + (src, dst)) copy_it = 0 try: @@ -223,8 +209,8 @@ def move_file (src, dst, if num == errno.EXDEV: copy_it = 1 else: - raise DistutilsFileError, \ - "couldn't move '%s' to '%s': %s" % (src, dst, msg) + raise DistutilsFileError( + "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: copy_file(src, dst, verbose=verbose) @@ -235,15 +221,12 @@ def move_file (src, dst, os.unlink(dst) except os.error: pass - raise DistutilsFileError, \ + raise DistutilsFileError( ("couldn't move '%s' to '%s' by copy/delete: " + - "delete '%s' failed: %s") % \ - (src, dst, src, msg) - + "delete '%s' failed: %s") % + (src, dst, src, msg)) return dst -# move_file () - def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a From 3f8ca0456b7e12be4eabd74bde600ec3b1fac405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 3 Jul 2009 19:22:23 +0000 Subject: [PATCH 2413/8469] Merged revisions 73814-73815 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73814 | tarek.ziade | 2009-07-03 21:01:12 +0200 (Fri, 03 Jul 2009) | 1 line basic tests to raise distutils.file_util coverage ........ r73815 | tarek.ziade | 2009-07-03 21:14:49 +0200 (Fri, 03 Jul 2009) | 1 line cleaned distutils.file_util ........ --- file_util.py | 49 +++++++++++++++++++++-------------------- tests/test_file_util.py | 17 +++++++++++++- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/file_util.py b/file_util.py index 65aa7e0fdd..758bde38bf 100644 --- a/file_util.py +++ b/file_util.py @@ -10,17 +10,18 @@ from distutils import log # for generating verbose output in 'copy_file()' -_copy_action = { None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking' } +_copy_action = {None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking'} def _copy_file_contents(src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'; both must be filenames. Any error - opening either file, reading from 'src', or writing to 'dst', raises - DistutilsFileError. Data is read/written in chunks of 'buffer_size' - bytes (default 16k). No attempt is made to handle anything apart from - regular files. + """Copy the file 'src' to 'dst'. + + Both must be filenames. Any error opening either file, reading from + 'src', or writing to 'dst', raises DistutilsFileError. Data is + read/written in chunks of 'buffer_size' bytes (default 16k). No attempt + is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. @@ -68,15 +69,16 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=1, dry_run=0): - """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is - copied there with the same name; otherwise, it must be a filename. (If - the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' - is true (the default), the file's mode (type and permission bits, or - whatever is analogous on the current platform) is copied. If - 'preserve_times' is true (the default), the last-modified and - last-access times are copied as well. If 'update' is true, 'src' will - only be copied if 'dst' does not exist, or if 'dst' does exist but is - older than 'src'. + """Copy a file 'src' to 'dst'. + + If 'dst' is a directory, then 'src' is copied there with the same name; + otherwise, it must be a filename. (If the file exists, it will be + ruthlessly clobbered.) If 'preserve_mode' is true (the default), + the file's mode (type and permission bits, or whatever is analogous on + the current platform) is copied. If 'preserve_times' is true (the + default), the last-modified and last-access times are copied as well. + If 'update' is true, 'src' will only be copied if 'dst' does not exist, + or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -166,13 +168,12 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, # XXX I suspect this is Unix-specific -- need porting help! -def move_file (src, dst, - verbose=1, - dry_run=0): +def move_file(src, dst, verbose=1, dry_run=0): + """Move a file 'src' to 'dst'. - """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will - be moved into it with the same name; otherwise, 'src' is just renamed - to 'dst'. Return the new full name of the file. + If 'dst' is a directory, the file will be moved into it with the same + name; otherwise, 'src' is just renamed to 'dst'. Return the new + full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? @@ -229,7 +230,7 @@ def move_file (src, dst, return dst -def write_file (filename, contents): +def write_file(filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ diff --git a/tests/test_file_util.py b/tests/test_file_util.py index fac4a5d1a9..99b421f73f 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -3,7 +3,7 @@ import os import shutil -from distutils.file_util import move_file +from distutils.file_util import move_file, write_file, copy_file from distutils import log from distutils.tests import support @@ -55,6 +55,21 @@ def test_move_file_verbosity(self): wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEquals(self._logs, wanted) + def test_write_file(self): + lines = ['a', 'b', 'c'] + dir = self.mkdtemp() + foo = os.path.join(dir, 'foo') + write_file(foo, lines) + content = [line.strip() for line in open(foo).readlines()] + self.assertEquals(content, lines) + + def test_copy_file(self): + src_dir = self.mkdtemp() + foo = os.path.join(src_dir, 'foo') + write_file(foo, 'content') + dst_dir = self.mkdtemp() + copy_file(foo, dst_dir) + self.assertTrue(os.path.exists(os.path.join(dst_dir, 'foo'))) def test_suite(): return unittest.makeSuite(FileUtilTestCase) From a45e8e791dab0f958ec7df15b417023dcb3a4c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 02:02:41 +0000 Subject: [PATCH 2414/8469] Fixed #6413: fixed log level in distutils.dist.announce --- dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index f4aecb419e..7c29bf6ca7 100644 --- a/dist.py +++ b/dist.py @@ -914,8 +914,8 @@ def reinitialize_command(self, command, reinit_subcommands=0): # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. From 59dac0c53f0d28ea9cff2ea6bc497a8107ce5f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 02:04:21 +0000 Subject: [PATCH 2415/8469] Merged revisions 73827 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73827 | tarek.ziade | 2009-07-04 04:02:41 +0200 (Sat, 04 Jul 2009) | 1 line Fixed #6413: fixed log level in distutils.dist.announce ........ --- dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 915d336431..092ec0d220 100644 --- a/dist.py +++ b/dist.py @@ -907,8 +907,8 @@ def reinitialize_command(self, command, reinit_subcommands=0): # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. From cc8b5fb33d9dabdd7256e5da5582f8e6380927ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 02:05:51 +0000 Subject: [PATCH 2416/8469] Merged revisions 73828 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73828 | tarek.ziade | 2009-07-04 04:04:21 +0200 (Sat, 04 Jul 2009) | 9 lines Merged revisions 73827 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73827 | tarek.ziade | 2009-07-04 04:02:41 +0200 (Sat, 04 Jul 2009) | 1 line Fixed #6413: fixed log level in distutils.dist.announce ........ ................ --- dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist.py b/dist.py index 915d336431..092ec0d220 100644 --- a/dist.py +++ b/dist.py @@ -907,8 +907,8 @@ def reinitialize_command(self, command, reinit_subcommands=0): # -- Methods that operate on the Distribution ---------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=log.INFO): + log.log(level, msg) def run_commands(self): """Run each command that was seen on the setup script command line. From 6770846ebeb6751e80a877222f12b83dfe03fc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 02:59:19 +0000 Subject: [PATCH 2417/8469] using print statements when used for user interaction --- dist.py | 22 +++++++++++----------- tests/test_dist.py | 18 ------------------ 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/dist.py b/dist.py index 7c29bf6ca7..afed545d92 100644 --- a/dist.py +++ b/dist.py @@ -602,14 +602,14 @@ def _show_help(self, parser, global_options=1, display_options=1, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -623,9 +623,9 @@ def _show_help(self, parser, global_options=1, display_options=1, else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -640,8 +640,8 @@ def handle_display_options(self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -657,12 +657,12 @@ def handle_display_options(self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -671,7 +671,7 @@ def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -682,7 +682,7 @@ def print_command_list(self, commands, header, max_length): except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a diff --git a/tests/test_dist.py b/tests/test_dist.py index 07f392c4ee..75b74a2c28 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -165,24 +165,6 @@ def test_finalize_options(self): self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From 78e341ad759a608301a0e5a1f330bed09dc975b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 03:00:50 +0000 Subject: [PATCH 2418/8469] Merged revisions 73834 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73834 | tarek.ziade | 2009-07-04 04:59:19 +0200 (Sat, 04 Jul 2009) | 1 line using print statements when used for user interaction ........ --- dist.py | 22 +++++++++++----------- tests/test_dist.py | 18 ------------------ 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/dist.py b/dist.py index 092ec0d220..ac5a0ca012 100644 --- a/dist.py +++ b/dist.py @@ -596,14 +596,14 @@ def _show_help(self, parser, global_options=1, display_options=1, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -617,9 +617,9 @@ def _show_help(self, parser, global_options=1, display_options=1, else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -634,8 +634,8 @@ def handle_display_options(self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -651,12 +651,12 @@ def handle_display_options(self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -665,7 +665,7 @@ def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -676,7 +676,7 @@ def print_command_list(self, commands, header, max_length): except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a diff --git a/tests/test_dist.py b/tests/test_dist.py index c031cb85ac..9f795f4314 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -136,24 +136,6 @@ def test_finalize_options(self): self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From 876d6d4fad84a5abfd40bb09cc9f9164121f8594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 4 Jul 2009 03:01:33 +0000 Subject: [PATCH 2419/8469] Merged revisions 73835 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73835 | tarek.ziade | 2009-07-04 05:00:50 +0200 (Sat, 04 Jul 2009) | 9 lines Merged revisions 73834 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73834 | tarek.ziade | 2009-07-04 04:59:19 +0200 (Sat, 04 Jul 2009) | 1 line using print statements when used for user interaction ........ ................ --- dist.py | 22 +++++++++++----------- tests/test_dist.py | 18 ------------------ 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/dist.py b/dist.py index 092ec0d220..ac5a0ca012 100644 --- a/dist.py +++ b/dist.py @@ -596,14 +596,14 @@ def _show_help(self, parser, global_options=1, display_options=1, options = self.global_options parser.set_option_table(options) parser.print_help(self.common_usage + "\nGlobal options:") - self.announce('') + print('') if display_options: parser.set_option_table(self.display_options) parser.print_help( "Information display options (just display " + "information, ignore any commands)") - self.announce('') + print('') for command in self.commands: if isinstance(command, type) and issubclass(command, Command): @@ -617,9 +617,9 @@ def _show_help(self, parser, global_options=1, display_options=1, else: parser.set_option_table(klass.user_options) parser.print_help("Options for '%s' command:" % klass.__name__) - self.announce('') + print('') - self.announce(gen_usage(self.script_name)) + print(gen_usage(self.script_name)) def handle_display_options(self, option_order): """If there were any non-global "display-only" options @@ -634,8 +634,8 @@ def handle_display_options(self, option_order): # we ignore "foo bar"). if self.help_commands: self.print_commands() - self.announce('') - self.announce(gen_usage(self.script_name)) + print('') + print(gen_usage(self.script_name)) return 1 # If user supplied any of the "display metadata" options, then @@ -651,12 +651,12 @@ def handle_display_options(self, option_order): opt = translate_longopt(opt) value = getattr(self.metadata, "get_"+opt)() if opt in ['keywords', 'platforms']: - self.announce(','.join(value)) + print(','.join(value)) elif opt in ('classifiers', 'provides', 'requires', 'obsoletes'): - self.announce('\n'.join(value)) + print('\n'.join(value)) else: - self.announce(value) + print(value) any_display_options = 1 return any_display_options @@ -665,7 +665,7 @@ def print_command_list(self, commands, header, max_length): """Print a subset of the list of all commands -- used by 'print_commands()'. """ - self.announce(header + ":") + print(header + ":") for cmd in commands: klass = self.cmdclass.get(cmd) @@ -676,7 +676,7 @@ def print_command_list(self, commands, header, max_length): except AttributeError: description = "(no description available)" - self.announce(" %-*s %s" % (max_length, cmd, description)) + print(" %-*s %s" % (max_length, cmd, description)) def print_commands(self): """Print out a help message listing all available commands with a diff --git a/tests/test_dist.py b/tests/test_dist.py index 16ef68e962..40760390c8 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -136,24 +136,6 @@ def test_finalize_options(self): self.assertEquals(dist.metadata.platforms, ['one', 'two']) self.assertEquals(dist.metadata.keywords, ['one', 'two']) - def test_show_help(self): - class FancyGetopt(object): - def __init__(self): - self.count = 0 - - def set_option_table(self, *args): - pass - - def print_help(self, *args): - self.count += 1 - - parser = FancyGetopt() - dist = Distribution() - dist.commands = ['sdist'] - dist.script_name = 'setup.py' - dist._show_help(parser) - self.assertEquals(parser.count, 3) - def test_get_command_packages(self): dist = Distribution() self.assertEquals(dist.command_packages, None) From 54b37808bf90eb50889ee8761aa22e07969d6a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 6 Jul 2009 12:50:46 +0000 Subject: [PATCH 2420/8469] Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) --- command/build_ext.py | 78 +++++++++++++++++++++++++++++------------ tests/test_build_ext.py | 14 ++++++++ 2 files changed, 69 insertions(+), 23 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 96bd68be4c..be37313abc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -8,6 +8,8 @@ import sys, os, string, re from types import * +from warnings import warn + from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -113,6 +115,36 @@ class build_ext (Command): "list available compilers", show_compilers), ] + + # making 'compiler' a property to deprecate + # its usage as something else than a compiler type + # e.g. like a compiler instance + def __init__(self, dist): + self._compiler = None + Command.__init__(self, dist) + + def __setattr__(self, name, value): + # need this to make sure setattr() (used in distutils) + # doesn't kill our property + if name == 'compiler': + self._set_compiler(value) + else: + self.__dict__[name] = value + + def _set_compiler(self, compiler): + if not isinstance(compiler, str) and compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specify the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) + + self._compiler = compiler + + def _get_compiler(self): + return self._compiler + + compiler = property(_get_compiler, _set_compiler) + def initialize_options (self): self.extensions = None self.build_lib = None @@ -311,38 +343,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - customize_compiler(self.compiler) + self.compiler_obj = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self.compiler_obj.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self.compiler_obj.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self.compiler_obj.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self.compiler_obj.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self.compiler_obj.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self.compiler_obj.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self.compiler_obj.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self.compiler_obj.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -504,13 +536,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler_obj.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -531,9 +563,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self.compiler_obj.detect_language(sources) - self.compiler.link_shared_object( + self.compiler_obj.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -712,7 +744,7 @@ def get_libraries (self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self.compiler_obj, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 2ecead3c0d..afd0df32dc 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -3,6 +3,9 @@ import tempfile import shutil from StringIO import StringIO +import warnings +from test.test_support import check_warnings +from test.test_support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext @@ -395,6 +398,17 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') self.assertEquals(wanted, path) + def test_compiler_deprecation_warning(self): + dist = Distribution() + cmd = build_ext(dist) + + with check_warnings() as w: + warnings.simplefilter("always") + cmd.compiler = object() + self.assertEquals(len(w.warnings), 1) + cmd.compile = 'unix' + self.assertEquals(len(w.warnings), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 40f8dab3e0797b8cf84031702a7ba3a6802bf2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 6 Jul 2009 13:52:17 +0000 Subject: [PATCH 2421/8469] Merged revisions 73864 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73864 | tarek.ziade | 2009-07-06 14:50:46 +0200 (Mon, 06 Jul 2009) | 1 line Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) ........ --- command/build_ext.py | 77 +++++++++++++++++++++++++++++------------ tests/test_build_ext.py | 14 ++++++++ 2 files changed, 68 insertions(+), 23 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 30457026d4..4a3aec2a65 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -7,6 +7,8 @@ __revision__ = "$Id$" import sys, os, re +from warnings import warn + from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version @@ -112,6 +114,35 @@ class build_ext(Command): "list available compilers", show_compilers), ] + # making 'compiler' a property to deprecate + # its usage as something else than a compiler type + # e.g. like a compiler instance + def __init__(self, dist): + self._compiler = None + Command.__init__(self, dist) + + def __setattr__(self, name, value): + # need this to make sure setattr() (used in distutils) + # doesn't kill our property + if name == 'compiler': + self._set_compiler(value) + else: + self.__dict__[name] = value + + def _set_compiler(self, compiler): + if not isinstance(compiler, str) and compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specify the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) + + self._compiler = compiler + + def _get_compiler(self): + return self._compiler + + compiler = property(_get_compiler, _set_compiler) + def initialize_options(self): self.extensions = None self.build_lib = None @@ -310,38 +341,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - customize_compiler(self.compiler) + self.compiler_obj = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler.initialize(self.plat_name) + self.compiler_obj.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler.set_include_dirs(self.include_dirs) + self.compiler_obj.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler.define_macro(name, value) + self.compiler_obj.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler.undefine_macro(macro) + self.compiler_obj.undefine_macro(macro) if self.libraries is not None: - self.compiler.set_libraries(self.libraries) + self.compiler_obj.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler.set_library_dirs(self.library_dirs) + self.compiler_obj.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler.set_runtime_library_dirs(self.rpath) + self.compiler_obj.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler.set_link_objects(self.link_objects) + self.compiler_obj.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -502,13 +533,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler_obj.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -529,9 +560,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler.detect_language(sources) + language = ext.language or self.compiler_obj.detect_language(sources) - self.compiler.link_shared_object( + self.compiler_obj.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -698,7 +729,7 @@ def get_libraries(self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler, MSVCCompiler): + if not isinstance(self.compiler_obj, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6f0e2309d5..d531293015 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -3,6 +3,9 @@ import tempfile import shutil from io import StringIO +import warnings +from test.support import check_warnings +from test.support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext @@ -395,6 +398,17 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') self.assertEquals(wanted, path) + def test_compiler_deprecation_warning(self): + dist = Distribution() + cmd = build_ext(dist) + + with check_warnings() as w: + warnings.simplefilter("always") + cmd.compiler = object() + self.assertEquals(len(w.warnings), 1) + cmd.compile = 'unix' + self.assertEquals(len(w.warnings), 1) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): From 3d1571717a0bc82b7d050bc447e0714135aa0dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 8 Jul 2009 22:40:51 +0000 Subject: [PATCH 2422/8469] Sets the compiler attribute to keep the old behavior for third-party packages. --- command/build_ext.py | 22 +++++++++++++++++++--- tests/test_build_ext.py | 11 ++++++++++- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index be37313abc..fadd6337f7 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -134,13 +134,17 @@ def __setattr__(self, name, value): def _set_compiler(self, compiler): if not isinstance(compiler, str) and compiler is not None: # we don't want to allow that anymore in the future - warn("'compiler' specify the compiler type in build_ext. " + warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " "use 'compiler_obj'", PendingDeprecationWarning) - self._compiler = compiler def _get_compiler(self): + if not isinstance(self._compiler, str) and self._compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specifies the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) @@ -343,10 +347,22 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler_obj = new_compiler(compiler=self.compiler, + + # used to prevent the usage of an existing compiler for the + # compiler option when calling new_compiler() + # this will be removed in 3.3 and 2.8 + if not isinstance(self._compiler, str): + self._compiler = None + + self.compiler_obj = new_compiler(compiler=self._compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) + + # used to keep the compiler object reachable with + # "self.compiler". this will be removed in 3.3 and 2.8 + self._compiler = self.compiler_obj + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index afd0df32dc..9356ff806e 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -402,12 +402,21 @@ def test_compiler_deprecation_warning(self): dist = Distribution() cmd = build_ext(dist) + class MyCompiler(object): + def do_something(self): + pass + with check_warnings() as w: warnings.simplefilter("always") - cmd.compiler = object() + cmd.compiler = MyCompiler() self.assertEquals(len(w.warnings), 1) cmd.compile = 'unix' self.assertEquals(len(w.warnings), 1) + cmd.compiler = MyCompiler() + cmd.compiler.do_something() + # two more warnings genereated by the get + # and the set + self.assertEquals(len(w.warnings), 3) def test_suite(): src = _get_source_filename() From ea0bff08c9afaa3f0996dade7f847f8e397efa60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 8 Jul 2009 22:42:43 +0000 Subject: [PATCH 2423/8469] Merged revisions 73895 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73895 | tarek.ziade | 2009-07-09 00:40:51 +0200 (Thu, 09 Jul 2009) | 1 line Sets the compiler attribute to keep the old behavior for third-party packages. ........ --- command/build_ext.py | 22 +++++++++++++++++++--- tests/test_build_ext.py | 11 ++++++++++- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4a3aec2a65..d8bb251294 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -132,13 +132,17 @@ def __setattr__(self, name, value): def _set_compiler(self, compiler): if not isinstance(compiler, str) and compiler is not None: # we don't want to allow that anymore in the future - warn("'compiler' specify the compiler type in build_ext. " + warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " "use 'compiler_obj'", PendingDeprecationWarning) - self._compiler = compiler def _get_compiler(self): + if not isinstance(self._compiler, str) and self._compiler is not None: + # we don't want to allow that anymore in the future + warn("'compiler' specifies the compiler type in build_ext. " + "If you want to get the compiler object itself, " + "use 'compiler_obj'", PendingDeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) @@ -341,10 +345,22 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler_obj = new_compiler(compiler=self.compiler, + + # used to prevent the usage of an existing compiler for the + # compiler option when calling new_compiler() + # this will be removed in 3.3 and 2.8 + if not isinstance(self._compiler, str): + self._compiler = None + + self.compiler_obj = new_compiler(compiler=self._compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) + + # used to keep the compiler object reachable with + # "self.compiler". this will be removed in 3.3 and 2.8 + self._compiler = self.compiler_obj + customize_compiler(self.compiler_obj) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d531293015..6829583746 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -402,12 +402,21 @@ def test_compiler_deprecation_warning(self): dist = Distribution() cmd = build_ext(dist) + class MyCompiler(object): + def do_something(self): + pass + with check_warnings() as w: warnings.simplefilter("always") - cmd.compiler = object() + cmd.compiler = MyCompiler() self.assertEquals(len(w.warnings), 1) cmd.compile = 'unix' self.assertEquals(len(w.warnings), 1) + cmd.compiler = MyCompiler() + cmd.compiler.do_something() + # two more warnings genereated by the get + # and the set + self.assertEquals(len(w.warnings), 3) def test_suite(): src = _get_source_filename() From 29efe3a5fa50723fc6ca62dd6670889e69732f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 9 Jul 2009 07:42:42 +0000 Subject: [PATCH 2424/8469] PendingDeprecationWarning -> DeprecationWarning in build_ext --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index fadd6337f7..86513ea9e9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -136,7 +136,7 @@ def _set_compiler(self, compiler): # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) self._compiler = compiler def _get_compiler(self): @@ -144,7 +144,7 @@ def _get_compiler(self): # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) From 83f285d2a77f1d46292e759dbb90b1e025555fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 9 Jul 2009 07:46:10 +0000 Subject: [PATCH 2425/8469] Merged revisions 73901 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73901 | tarek.ziade | 2009-07-09 09:42:42 +0200 (Thu, 09 Jul 2009) | 1 line PendingDeprecationWarning -> DeprecationWarning in build_ext ........ --- command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index d8bb251294..6f90499229 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -134,7 +134,7 @@ def _set_compiler(self, compiler): # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) self._compiler = compiler def _get_compiler(self): @@ -142,7 +142,7 @@ def _get_compiler(self): # we don't want to allow that anymore in the future warn("'compiler' specifies the compiler type in build_ext. " "If you want to get the compiler object itself, " - "use 'compiler_obj'", PendingDeprecationWarning) + "use 'compiler_obj'", DeprecationWarning) return self._compiler compiler = property(_get_compiler, _set_compiler) From 2e8960b7459d92bcb1eac2bb9e3eeeac97aea91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 09:10:33 +0000 Subject: [PATCH 2426/8469] Fixed #6455 (the test shall use pyd files under win32, rather than so files) --- tests/test_build_ext.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 9356ff806e..4c09dd80a3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -362,6 +362,7 @@ def test_get_outputs(self): self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -372,14 +373,14 @@ def test_ext_fullpath(self): cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -389,13 +390,13 @@ def test_ext_fullpath(self): cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_compiler_deprecation_warning(self): From de551ca3893c39b20819e3da991b39f5892a4bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 09:13:17 +0000 Subject: [PATCH 2427/8469] Merged revisions 73921 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ --- tests/test_build_ext.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e01c882069..153c875644 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -296,20 +296,21 @@ def test_get_outputs(self): self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -319,13 +320,13 @@ def test_ext_fullpath(self): cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_suite(): From 6aecd94fef0f521cf3839365e53e7272d23327f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 09:14:31 +0000 Subject: [PATCH 2428/8469] Merged revisions 73921 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ --- tests/test_build_ext.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6829583746..d97a97eba0 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -362,6 +362,7 @@ def test_get_outputs(self): self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -372,14 +373,14 @@ def test_ext_fullpath(self): cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -389,13 +390,13 @@ def test_ext_fullpath(self): cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_compiler_deprecation_warning(self): From 0c03a8176da33be31b41552fb2f36ec985e35277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 09:16:07 +0000 Subject: [PATCH 2429/8469] Merged revisions 73923 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73923 | tarek.ziade | 2009-07-10 11:14:31 +0200 (Fri, 10 Jul 2009) | 9 lines Merged revisions 73921 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line Fixed #6455 (the test shall use pyd files under win32, rather than so files) ........ ................ --- tests/test_build_ext.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index f0580c1f0f..c671483622 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -359,6 +359,7 @@ def test_get_outputs(self): self.assertEquals(lastdir, 'bar') def test_ext_fullpath(self): + ext = sysconfig.get_config_vars()['SO'] # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) @@ -369,14 +370,14 @@ def test_ext_fullpath(self): cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') - wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) @@ -386,13 +387,13 @@ def test_ext_fullpath(self): cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', - 'portmap.so') + 'portmap' + ext) self.assertEquals(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') - wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) def test_suite(): From 015479841be6a07ee482f02cbd2aa6954a36729d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 09:57:15 +0000 Subject: [PATCH 2430/8469] Added test coverage for distutils.command.build --- tests/test_build.py | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tests/test_build.py diff --git a/tests/test_build.py b/tests/test_build.py new file mode 100644 index 0000000000..6bca27ee06 --- /dev/null +++ b/tests/test_build.py @@ -0,0 +1,54 @@ +"""Tests for distutils.command.build.""" +import unittest +import os +import sys + +from distutils.command.build import build +from distutils.tests import support +from distutils.util import get_platform + +class BuildTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build(dist) + cmd.finalize_options() + + # if not specified, plat_name gets the current platform + self.assertEquals(cmd.plat_name, get_platform()) + + # build_purelib is build + lib + wanted = os.path.join(cmd.build_base, 'lib') + self.assertEquals(cmd.build_purelib, wanted) + + # build_platlib is 'build/lib.platform-x.x[-pydebug]' + # examples: + # build/lib.macosx-10.3-i386-2.7 + plat_spec = '.%s-%s' % (cmd.plat_name, sys.version[0:3]) + if hasattr(sys, 'gettotalrefcount'): + self.assertTrue(cmd.build_platlib.endswith('-pydebug')) + plat_spec += '-pydebug' + wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) + self.assertEquals(cmd.build_platlib, wanted) + + # by default, build_lib = build_purelib + self.assertEquals(cmd.build_lib, cmd.build_purelib) + + # build_temp is build/temp. + wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) + self.assertEquals(cmd.build_temp, wanted) + + # build_scripts is build/scripts-x.x + wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) + self.assertEquals(cmd.build_scripts, wanted) + + # executable is os.path.normpath(sys.executable) + self.assertEquals(cmd.executable, os.path.normpath(sys.executable)) + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 56d544027577bfa402454b464e128f149c2929f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 10:00:21 +0000 Subject: [PATCH 2431/8469] cleaned up distutils.command.build --- command/build.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/command/build.py b/command/build.py index 84e050204e..d394e4b1da 100644 --- a/command/build.py +++ b/command/build.py @@ -9,13 +9,11 @@ from distutils.errors import DistutilsOptionError from distutils.util import get_platform - -def show_compilers (): +def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() - -class build (Command): +class build(Command): description = "build everything needed to install" @@ -53,7 +51,7 @@ class build (Command): "list available compilers", show_compilers), ] - def initialize_options (self): + def initialize_options(self): self.build_base = 'build' # these are decided only after 'build_base' has its final value # (unless overridden by the user or client) @@ -68,8 +66,7 @@ def initialize_options (self): self.force = 0 self.executable = None - def finalize_options (self): - + def finalize_options(self): if self.plat_name is None: self.plat_name = get_platform() else: @@ -118,11 +115,8 @@ def finalize_options (self): if self.executable is None: self.executable = os.path.normpath(sys.executable) - # finalize_options () - - - def run (self): + def run(self): # Run all relevant sub-commands. This will be some subset of: # - build_py - pure Python modules # - build_clib - standalone C libraries @@ -131,7 +125,6 @@ def run (self): for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # -- Predicates for the sub-command list --------------------------- def has_pure_modules (self): @@ -146,11 +139,8 @@ def has_ext_modules (self): def has_scripts (self): return self.distribution.has_scripts() - sub_commands = [('build_py', has_pure_modules), ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), ('build_scripts', has_scripts), ] - -# class build From 6375e0821736229bf071350a185e6a984f16d368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 10 Jul 2009 10:03:20 +0000 Subject: [PATCH 2432/8469] Merged revisions 73925-73926 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73925 | tarek.ziade | 2009-07-10 11:57:15 +0200 (Fri, 10 Jul 2009) | 1 line Added test coverage for distutils.command.build ........ r73926 | tarek.ziade | 2009-07-10 12:00:21 +0200 (Fri, 10 Jul 2009) | 1 line cleaned up distutils.command.build ........ --- command/build.py | 4 ---- tests/test_build.py | 54 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 tests/test_build.py diff --git a/command/build.py b/command/build.py index 9c2667cfd2..715621e1d7 100644 --- a/command/build.py +++ b/command/build.py @@ -9,12 +9,10 @@ from distutils.errors import DistutilsOptionError from distutils.util import get_platform - def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() - class build(Command): description = "build everything needed to install" @@ -127,7 +125,6 @@ def run(self): for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # -- Predicates for the sub-command list --------------------------- def has_pure_modules(self): @@ -142,7 +139,6 @@ def has_ext_modules(self): def has_scripts(self): return self.distribution.has_scripts() - sub_commands = [('build_py', has_pure_modules), ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), diff --git a/tests/test_build.py b/tests/test_build.py new file mode 100644 index 0000000000..6bca27ee06 --- /dev/null +++ b/tests/test_build.py @@ -0,0 +1,54 @@ +"""Tests for distutils.command.build.""" +import unittest +import os +import sys + +from distutils.command.build import build +from distutils.tests import support +from distutils.util import get_platform + +class BuildTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build(dist) + cmd.finalize_options() + + # if not specified, plat_name gets the current platform + self.assertEquals(cmd.plat_name, get_platform()) + + # build_purelib is build + lib + wanted = os.path.join(cmd.build_base, 'lib') + self.assertEquals(cmd.build_purelib, wanted) + + # build_platlib is 'build/lib.platform-x.x[-pydebug]' + # examples: + # build/lib.macosx-10.3-i386-2.7 + plat_spec = '.%s-%s' % (cmd.plat_name, sys.version[0:3]) + if hasattr(sys, 'gettotalrefcount'): + self.assertTrue(cmd.build_platlib.endswith('-pydebug')) + plat_spec += '-pydebug' + wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) + self.assertEquals(cmd.build_platlib, wanted) + + # by default, build_lib = build_purelib + self.assertEquals(cmd.build_lib, cmd.build_purelib) + + # build_temp is build/temp. + wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) + self.assertEquals(cmd.build_temp, wanted) + + # build_scripts is build/scripts-x.x + wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) + self.assertEquals(cmd.build_scripts, wanted) + + # executable is os.path.normpath(sys.executable) + self.assertEquals(cmd.executable, os.path.normpath(sys.executable)) + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From c7cb2d865ed19c68df148b0cd0018914c2a68b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 10:48:31 +0000 Subject: [PATCH 2433/8469] cleaned up distutils.build_ext module --- command/build_ext.py | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 86513ea9e9..0c79476bac 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -6,8 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re -from types import * +import sys, os, re from warnings import warn from distutils.core import Command @@ -41,7 +40,7 @@ def show_compilers (): show_compilers() -class build_ext (Command): +class build_ext(Command): description = "build C/C++ extensions (compile/link to build directory)" @@ -149,7 +148,7 @@ def _get_compiler(self): compiler = property(_get_compiler, _set_compiler) - def initialize_options (self): + def initialize_options(self): self.extensions = None self.build_lib = None self.plat_name = None @@ -213,13 +212,13 @@ def finalize_options(self): self.libraries = [] if self.library_dirs is None: self.library_dirs = [] - elif type(self.library_dirs) is StringType: - self.library_dirs = string.split(self.library_dirs, os.pathsep) + elif isinstance(self.library_dirs, str): + self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] - elif type(self.rpath) is StringType: - self.rpath = string.split(self.rpath, os.pathsep) + elif isinstance(self.rpath, str): + self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. @@ -296,7 +295,7 @@ def finalize_options(self): if self.define: defines = self.define.split(',') - self.define = map(lambda symbol: (symbol, '1'), defines) + self.define = [(symbol, '1') for symbol in defines] # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also @@ -512,7 +511,7 @@ def build_extensions(self): def build_extension(self, ext): sources = ext.sources - if sources is None or type(sources) not in (ListType, TupleType): + if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + @@ -593,14 +592,12 @@ def build_extension(self, ext): target_lang=language) - def swig_sources (self, sources, extension): - + def swig_sources(self, sources, extension): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ - new_sources = [] swig_sources = [] swig_targets = {} @@ -649,9 +646,7 @@ def swig_sources (self, sources, extension): return new_sources - # swig_sources () - - def find_swig (self): + def find_swig(self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. @@ -680,8 +675,6 @@ def find_swig (self): ("I don't know how to find (much less run) SWIG " "on platform '%s'") % os.name - # find_swig () - # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) def get_ext_fullpath(self, ext_name): @@ -726,29 +719,28 @@ def get_ext_filename(self, ext_name): "foo\bar.pyd"). """ from distutils.sysconfig import get_config_var - ext_path = string.split(ext_name, '.') + ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext + return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext - def get_export_symbols (self, ext): + def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "init" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "init" function. """ - - initfunc_name = "init" + string.split(ext.name,'.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols - def get_libraries (self, ext): + def get_libraries(self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows and OS/2, we add the Python library (eg. python20.dll). @@ -821,5 +813,3 @@ def get_libraries (self, ext): return ext.libraries + [pythonlib] else: return ext.libraries - -# class build_ext From 2bd17a600378485e8740d04c6715f2ce381254a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 10:55:27 +0000 Subject: [PATCH 2434/8469] fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0c79476bac..17cb26b526 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -732,10 +732,10 @@ def get_ext_filename(self, ext_name): def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "init" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + provided, "PyInit_" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "PyInit_" function. """ - initfunc_name = "init" + ext.name.split('.')[-1] + initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4c09dd80a3..7886c792bd 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -299,7 +299,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From d7048753d100a97e2251f20a7756c15499492d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 10:57:49 +0000 Subject: [PATCH 2435/8469] Merged revisions 73946 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ --- command/build_ext.py | 7 +++---- tests/test_build_ext.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8cb1efe67e..ccc3fe564c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -680,11 +680,10 @@ def get_ext_filename(self, ext_name): def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "init" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + provided, "PyInit_" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "PyInit_" function. """ - - initfunc_name = "init" + string.split(ext.name,'.')[-1] + initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 153c875644..d992548059 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -233,7 +233,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 72a548f960200f1057295b791828ec1698a5c639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 10:59:56 +0000 Subject: [PATCH 2436/8469] Merged revisions 73946 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ --- command/build_ext.py | 2 +- tests/test_build_ext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 6f90499229..14c529ac5b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -726,7 +726,7 @@ def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + the .pyd file (DLL) must export the module "PyInit_" function. """ initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d97a97eba0..7a27f343a7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -299,7 +299,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 3b8fc3f7befd6da629a7875863c6d1eadda34b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 11:01:14 +0000 Subject: [PATCH 2437/8469] Merged revisions 73948 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73948 | tarek.ziade | 2009-07-11 12:59:56 +0200 (Sat, 11 Jul 2009) | 9 lines Merged revisions 73946 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73946 | tarek.ziade | 2009-07-11 12:55:27 +0200 (Sat, 11 Jul 2009) | 1 line fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' ........ ................ --- command/build_ext.py | 2 +- tests/test_build_ext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 30457026d4..1596586499 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -679,7 +679,7 @@ def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "init" function. + the .pyd file (DLL) must export the module "PyInit_" function. """ initfunc_name = "PyInit_" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index c671483622..9861ee2993 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -296,7 +296,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void initfoo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From d901b9150542ff215c1a621991c10f3e5ec342c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 17:21:00 +0000 Subject: [PATCH 2438/8469] reverted changes for #6459 (doesn't apply on 2.x) --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 17cb26b526..0c79476bac 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -732,10 +732,10 @@ def get_ext_filename(self, ext_name): def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "PyInit_" function. + provided, "init" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "PyInit_" + ext.name.split('.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 7886c792bd..51a21a68b4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -299,7 +299,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void init_foo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 2ee6163d4df9600975467bbc57a6f6e9a3008ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Jul 2009 17:22:14 +0000 Subject: [PATCH 2439/8469] Merged revisions 73954 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73954 | tarek.ziade | 2009-07-11 19:21:00 +0200 (Sat, 11 Jul 2009) | 1 line reverted changes for #6459 (doesn't apply on 2.x) ........ --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index ccc3fe564c..db82f1d0d6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -680,10 +680,10 @@ def get_ext_filename(self, ext_name): def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not - provided, "PyInit_" + module_name. Only relevant on Windows, where - the .pyd file (DLL) must export the module "PyInit_" function. + provided, "init" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "init" function. """ - initfunc_name = "PyInit_" + ext.name.split('.')[-1] + initfunc_name = "init" + ext.name.split('.')[-1] if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d992548059..d0716485dc 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -233,7 +233,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void init_foo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 0e0874b3e717156832ea24bb06f46147af1103dd Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 12 Jul 2009 02:04:47 +0000 Subject: [PATCH 2440/8469] Fixed distutils test. --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 51a21a68b4..4c09dd80a3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -299,7 +299,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void init_foo(void) {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From da220af37e1ec7552ff8f8724d03136f6aa96b4d Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 12 Jul 2009 02:09:25 +0000 Subject: [PATCH 2441/8469] Merged revisions 73970 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73970 | hirokazu.yamamoto | 2009-07-12 11:04:47 +0900 | 1 line Fixed distutils test. ........ --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d0716485dc..153c875644 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -233,7 +233,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void init_foo(void) {};\n') + self.write_file(c_file, 'void initfoo(void) {};\n') ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From d28cb5fd8236e1d5949e62723a7688dcaa12f447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Jul 2009 08:27:26 +0000 Subject: [PATCH 2442/8469] Fixed #6438: distutils.cygwinccompiler.get_versions was trying to use a re string pattern on a bytes --- cygwinccompiler.py | 6 ++++-- tests/test_cygwinccompiler.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 5f3a389e29..8504371810 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -359,7 +359,7 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') def _find_exe_version(cmd): """Find the version of an executable by running `cmd` in the shell. @@ -378,7 +378,9 @@ def _find_exe_version(cmd): result = RE_VERSION.search(out_string) if result is None: return None - return LooseVersion(result.group(1)) + # LooseVersion works with strings + # so we need to decode our bytes + return LooseVersion(result.group(1).decode()) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index c5a6495da5..a57694d48e 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -2,7 +2,7 @@ import unittest import sys import os -from io import StringIO +from io import BytesIO import subprocess from distutils import cygwinccompiler @@ -19,7 +19,8 @@ def __init__(self, cmd, shell, stdout): self.cmd = cmd.split()[0] exes = self.test_class._exes if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) + # issue #6438 in Python 3.x, Popen returns bytes + self.stdout = BytesIO(exes[self.cmd]) else: self.stdout = os.popen(cmd, 'r') @@ -87,30 +88,30 @@ def test_get_versions(self): self.assertEquals(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() self.assertEquals(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' + self._exes['gcc'] = b'very strange output' res = get_versions() self.assertEquals(res[0], None) # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() self.assertEquals(res[1], None) # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' + self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() self.assertEquals(res[2], None) From 716024cb88a39f8550ed10b312b3f8cec75a1e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 12 Jul 2009 08:39:08 +0000 Subject: [PATCH 2443/8469] Merged revisions 73975 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r73975 | tarek.ziade | 2009-07-12 10:27:26 +0200 (Sun, 12 Jul 2009) | 1 line Fixed #6438: distutils.cygwinccompiler.get_versions was trying to use a re string pattern on a bytes ........ --- cygwinccompiler.py | 6 ++++-- tests/test_cygwinccompiler.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 5f3a389e29..8504371810 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -359,7 +359,7 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') def _find_exe_version(cmd): """Find the version of an executable by running `cmd` in the shell. @@ -378,7 +378,9 @@ def _find_exe_version(cmd): result = RE_VERSION.search(out_string) if result is None: return None - return LooseVersion(result.group(1)) + # LooseVersion works with strings + # so we need to decode our bytes + return LooseVersion(result.group(1).decode()) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index c5a6495da5..a57694d48e 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -2,7 +2,7 @@ import unittest import sys import os -from io import StringIO +from io import BytesIO import subprocess from distutils import cygwinccompiler @@ -19,7 +19,8 @@ def __init__(self, cmd, shell, stdout): self.cmd = cmd.split()[0] exes = self.test_class._exes if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) + # issue #6438 in Python 3.x, Popen returns bytes + self.stdout = BytesIO(exes[self.cmd]) else: self.stdout = os.popen(cmd, 'r') @@ -87,30 +88,30 @@ def test_get_versions(self): self.assertEquals(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() self.assertEquals(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' + self._exes['gcc'] = b'very strange output' res = get_versions() self.assertEquals(res[0], None) # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() self.assertEquals(res[1], None) # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' + self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() self.assertEquals(res[2], None) From 01a07bef9a2a900b2ae961c1cd8b98f4c43d5b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 16 Jul 2009 15:35:45 +0000 Subject: [PATCH 2444/8469] #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) --- cygwinccompiler.py | 42 +++++++-------- emxccompiler.py | 33 +++++------- tests/test_cygwinccompiler.py | 83 ++++++++---------------------- tests/test_emxccompiler.py | 33 ++++++++++++ tests/test_util.py | 97 +++++++++++++++++++++++++++++++++-- util.py | 54 ++++++++++++++++++- 6 files changed, 231 insertions(+), 111 deletions(-) create mode 100644 tests/test_emxccompiler.py diff --git a/cygwinccompiler.py b/cygwinccompiler.py index c35e49d713..a8476e6579 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -50,16 +50,15 @@ import os import sys import copy -from subprocess import Popen, PIPE import re +from warnings import warn from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log -from distutils.version import LooseVersion -from distutils.spawn import find_executable +from distutils.util import get_compiler_versions def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -110,7 +109,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_versions() + get_compiler_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -359,31 +358,26 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +class _Deprecated_SRE_Pattern(object): + def __init__(self, pattern): + self.pattern = pattern -def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. + def __getattr__(self, name): + if name in ('findall', 'finditer', 'match', 'scanner', 'search', + 'split', 'sub', 'subn'): + warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " + "and will be removed in the next version", DeprecationWarning) + return getattr(self.pattern, name) - If the command is not found, or the output does not match - `RE_VERSION`, returns None. - """ - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - out = Popen(cmd, shell=True, stdout=PIPE).stdout - try: - out_string = out.read() - finally: - out.close() - result = RE_VERSION.search(out_string) - if result is None: - return None - return LooseVersion(result.group(1)) +RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] - return tuple([_find_exe_version(cmd) for cmd in commands]) + warn("'distutils.cygwinccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + + return get_compiler_versions() diff --git a/emxccompiler.py b/emxccompiler.py index f52e63232d..a5a2ef88fe 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -21,12 +21,15 @@ __revision__ = "$Id$" -import os,sys,copy +import os, sys, copy +from warnings import warn + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): @@ -55,8 +58,8 @@ def __init__ (self, ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - (self.gcc_version, self.ld_version) = \ - get_versions() + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + self.gcc_version, self.ld_version = gcc_version, ld_version self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -293,23 +296,11 @@ def get_versions(): """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - from distutils.version import StrictVersion - from distutils.spawn import find_executable - import re - - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+\.\d+)',out_string) - if result: - gcc_version = StrictVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None + warn("'distutils.emxccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - ld_version = None - return (gcc_version, ld_version) + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + return gcc_version, None diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index fb823e4d80..b54ffff361 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -2,28 +2,19 @@ import unittest import sys import os -from StringIO import StringIO -import subprocess +import warnings + +from test.test_support import check_warnings +from test.test_support import captured_stdout from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, - get_msvcr) + get_msvcr, RE_VERSION) +from distutils.util import get_compiler_versions from distutils.tests import support -class FakePopen(object): - test_class = None - - def __init__(self, cmd, shell, stdout): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd in exes: - self.stdout = StringIO(exes[self.cmd]) - else: - self.stdout = os.popen(cmd, 'r') - - class CygwinCCompilerTestCase(support.TempdirManager, unittest.TestCase): @@ -34,29 +25,16 @@ def setUp(self): from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename - self.old_find_executable = cygwinccompiler.find_executable - cygwinccompiler.find_executable = self._find_executable - self._exes = {} - self.old_popen = cygwinccompiler.Popen - FakePopen.test_class = self - cygwinccompiler.Popen = FakePopen def tearDown(self): sys.version = self.version from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename - cygwinccompiler.find_executable = self.old_find_executable - cygwinccompiler.Popen = self.old_popen super(CygwinCCompilerTestCase, self).tearDown() def _get_config_h_filename(self): return self.python_h - def _find_executable(self, name): - if name in self._exes: - return name - return None - def test_check_config_h(self): # check_config_h looks for "GCC" in sys.version first @@ -80,40 +58,6 @@ def test_check_config_h(self): self.write_file(self.python_h, 'xxx __GNUC__ xxx') self.assertEquals(check_config_h()[0], CONFIG_H_OK) - def test_get_versions(self): - - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' - res = get_versions() - self.assertEquals(res[0], None) - - # same thing for ld - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' - res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_versions() - self.assertEquals(res[1], None) - - # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' - res = get_versions() - self.assertEquals(res[2], None) - def test_get_msvcr(self): # none @@ -146,6 +90,21 @@ def test_get_msvcr(self): '[MSC v.1999 32 bits (Intel)]') self.assertRaises(ValueError, get_msvcr) + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same thing + self.assertEquals(get_compiler_versions(), get_versions()) + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + # make sure any usage of RE_VERSION will also + # generate a warning, but till works + version = RE_VERSION.search('1.2').group(1) + self.assertEquals(version, '1.2') + self.assertEquals(len(w.warnings), 2) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py new file mode 100644 index 0000000000..6e1deced35 --- /dev/null +++ b/tests/test_emxccompiler.py @@ -0,0 +1,33 @@ +"""Tests for distutils.emxccompiler.""" +import unittest +import sys +import os +import warnings + +from test.test_support import check_warnings +from test.test_support import captured_stdout + +from distutils.emxccompiler import get_versions +from distutils.util import get_compiler_versions +from distutils.tests import support + +class EmxCCompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same gcc + gcc, ld, dllwrap = get_compiler_versions() + emx_gcc, emx_ld = get_versions() + self.assertEquals(gcc, emx_gcc) + + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + +def test_suite(): + return unittest.makeSuite(EmxCCompilerTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff --git a/tests/test_util.py b/tests/test_util.py index c0acf5f481..ffa92bd07e 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,15 +6,33 @@ import sys import unittest from copy import copy +from StringIO import StringIO +import subprocess from distutils.errors import DistutilsPlatformError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape) -from distutils import util # used to patch _environ_checked + rfc822_escape, get_compiler_versions, + _find_exe_version, _MAC_OS_X_LD_VERSION) +from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +from distutils.version import LooseVersion + +class FakePopen(object): + test_class = None + def __init__(self, cmd, shell, stdout, stderr): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd not in exes: + # we don't want to call the system, returning an empty + # output so it doesn't match + self.stdout = StringIO() + self.stderr = StringIO() + else: + self.stdout = StringIO(exes[self.cmd]) + self.stderr = StringIO() class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -37,9 +55,16 @@ def setUp(self): else: self.uname = None self._uname = None - os.uname = self._get_uname + # patching POpen + self.old_find_executable = util.find_executable + util.find_executable = self._find_executable + self._exes = {} + self.old_popen = subprocess.Popen + FakePopen.test_class = self + subprocess.Popen = FakePopen + def tearDown(self): # getting back the environment os.name = self.name @@ -54,6 +79,8 @@ def tearDown(self): else: del os.uname sysconfig._config_vars = copy(self._config_vars) + util.find_executable = self.old_find_executable + subprocess.Popen = self.old_popen super(UtilTestCase, self).tearDown() def _set_uname(self, uname): @@ -237,6 +264,70 @@ def test_rfc822_escape(self): 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) + def test_find_exe_version(self): + # the ld version scheme under MAC OS is: + # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION + # + # where VERSION is a 2-digit number for major + # revisions. For instance under Leopard, it's + # currently 77 + # + # Dots are used when branching is done. + # + # The SnowLeopard ld64 is currently 95.2.12 + + for output, version in (('@(#)PROGRAM:ld PROJECT:ld64-77', '77'), + ('@(#)PROGRAM:ld PROJECT:ld64-95.2.12', + '95.2.12')): + result = _MAC_OS_X_LD_VERSION.search(output) + self.assertEquals(result.group(1), version) + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_get_compiler_versions(self): + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_compiler_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = 'very strange output' + res = get_compiler_versions() + self.assertEquals(res[0], None) + + # same thing for ld + if sys.platform != 'darwin': + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(res[1], None) + else: + self._exes['ld'] = 'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(res[1], None) + self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '77') + + # and dllwrap + self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = 'Cheese Wrap' + res = get_compiler_versions() + self.assertEquals(res[2], None) + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index 5bbbf22560..459c36462d 100644 --- a/util.py +++ b/util.py @@ -7,10 +7,12 @@ __revision__ = "$Id$" import sys, os, string, re + from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn +from distutils.spawn import spawn, find_executable from distutils import log +from distutils.version import LooseVersion def get_platform(): """Return a string that identifies the current platform. @@ -539,3 +541,53 @@ def rfc822_escape(header): lines = [x.strip() for x in header.split('\n')] sep = '\n' + 8*' ' return sep.join(lines) + +_RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') +_MAC_OS_X_LD_VERSION = re.compile('^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') + +def _find_ld_version(): + """Finds the ld version. The version scheme differs under Mac OSX.""" + if sys.platform == 'darwin': + return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) + else: + return _find_exe_version('ld -v') + +def _find_exe_version(cmd, pattern=_RE_VERSION): + """Find the version of an executable by running `cmd` in the shell. + + `pattern` is a compiled regular expression. If not provided, default + to _RE_VERSION. If the command is not found, or the output does not + match the mattern, returns None. + """ + from subprocess import Popen, PIPE + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) + try: + stdout, stderr = pipe.stdout.read(), pipe.stderr.read() + finally: + pipe.stdout.close() + pipe.stderr.close() + # some commands like ld under MacOS X, will give the + # output in the stderr, rather than stdout. + if stdout != '': + out_string = stdout + else: + out_string = stderr + + result = pattern.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1)) + +def get_compiler_versions(): + """Returns a tuple providing the versions of gcc, ld and dllwrap + + For each command, if a command is not found, None is returned. + Otherwise a LooseVersion instance is returned. + """ + gcc = _find_exe_version('gcc -dumpversion') + ld = _find_ld_version() + dllwrap = _find_exe_version('dllwrap --version') + return gcc, ld, dllwrap From 36b50be6bf1f352ecd22b76b1d8f976cb2a8d1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 16 Jul 2009 16:18:19 +0000 Subject: [PATCH 2445/8469] Merged revisions 74024 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74024 | tarek.ziade | 2009-07-16 17:35:45 +0200 (Thu, 16 Jul 2009) | 1 line #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) ........ --- cygwinccompiler.py | 45 +++++++--------- emxccompiler.py | 33 +++++------- tests/test_cygwinccompiler.py | 83 ++++++++---------------------- tests/test_emxccompiler.py | 33 ++++++++++++ tests/test_util.py | 97 +++++++++++++++++++++++++++++++++-- util.py | 54 ++++++++++++++++++- 6 files changed, 232 insertions(+), 113 deletions(-) create mode 100644 tests/test_emxccompiler.py diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 8504371810..d9f4a43df7 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -50,16 +50,15 @@ import os import sys import copy -from subprocess import Popen, PIPE import re +from warnings import warn from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log -from distutils.version import LooseVersion -from distutils.spawn import find_executable +from distutils.util import get_compiler_versions def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -110,7 +109,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_versions() + get_compiler_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -359,33 +358,27 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') +class _Deprecated_SRE_Pattern(object): + def __init__(self, pattern): + self.pattern = pattern -def _find_exe_version(cmd): - """Find the version of an executable by running `cmd` in the shell. + def __getattr__(self, name): + if name in ('findall', 'finditer', 'match', 'scanner', 'search', + 'split', 'sub', 'subn'): + warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " + "and will be removed in the next version", DeprecationWarning) + return getattr(self.pattern, name) - If the command is not found, or the output does not match - `RE_VERSION`, returns None. - """ - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - out = Popen(cmd, shell=True, stdout=PIPE).stdout - try: - out_string = out.read() - finally: - out.close() - result = RE_VERSION.search(out_string) - if result is None: - return None - # LooseVersion works with strings - # so we need to decode our bytes - return LooseVersion(result.group(1).decode()) + +RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] - return tuple([_find_exe_version(cmd) for cmd in commands]) + warn("'distutils.cygwinccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + + return get_compiler_versions() diff --git a/emxccompiler.py b/emxccompiler.py index 62a4c5b4e8..50634d6c06 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -21,12 +21,15 @@ __revision__ = "$Id$" -import os,sys,copy +import os, sys, copy +from warnings import warn + from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError from distutils import log +from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): @@ -55,8 +58,8 @@ def __init__ (self, ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - (self.gcc_version, self.ld_version) = \ - get_versions() + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + self.gcc_version, self.ld_version = gcc_version, ld_version self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -291,23 +294,11 @@ def get_versions(): """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - from distutils.version import StrictVersion - from distutils.spawn import find_executable - import re - - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() - result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) - if result: - gcc_version = StrictVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None + warn("'distutils.emxccompiler.get_versions' is deprecated " + "use 'distutils.util.get_compiler_versions' instead", + DeprecationWarning) + # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - ld_version = None - return (gcc_version, ld_version) + gcc_version, ld_version, dllwrap_version = get_compiler_versions() + return gcc_version, None diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index a57694d48e..98f0f08ef1 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -2,29 +2,20 @@ import unittest import sys import os -from io import BytesIO import subprocess +import warnings + +from test.support import check_warnings +from test.support import captured_stdout from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, - get_msvcr) + get_msvcr, RE_VERSION) +from distutils.util import get_compiler_versions from distutils.tests import support -class FakePopen(object): - test_class = None - - def __init__(self, cmd, shell, stdout): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd in exes: - # issue #6438 in Python 3.x, Popen returns bytes - self.stdout = BytesIO(exes[self.cmd]) - else: - self.stdout = os.popen(cmd, 'r') - - class CygwinCCompilerTestCase(support.TempdirManager, unittest.TestCase): @@ -35,29 +26,16 @@ def setUp(self): from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename - self.old_find_executable = cygwinccompiler.find_executable - cygwinccompiler.find_executable = self._find_executable - self._exes = {} - self.old_popen = cygwinccompiler.Popen - FakePopen.test_class = self - cygwinccompiler.Popen = FakePopen def tearDown(self): sys.version = self.version from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename - cygwinccompiler.find_executable = self.old_find_executable - cygwinccompiler.Popen = self.old_popen super(CygwinCCompilerTestCase, self).tearDown() def _get_config_h_filename(self): return self.python_h - def _find_executable(self, name): - if name in self._exes: - return name - return None - def test_check_config_h(self): # check_config_h looks for "GCC" in sys.version first @@ -81,40 +59,6 @@ def test_check_config_h(self): self.write_file(self.python_h, 'xxx __GNUC__ xxx') self.assertEquals(check_config_h()[0], CONFIG_H_OK) - def test_get_versions(self): - - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = b'very strange output' - res = get_versions() - self.assertEquals(res[0], None) - - # same thing for ld - self._exes['ld'] = b'GNU ld version 2.17.50 20060824' - res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_versions() - self.assertEquals(res[1], None) - - # and dllwrap - self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = b'Cheese Wrap' - res = get_versions() - self.assertEquals(res[2], None) - def test_get_msvcr(self): # none @@ -147,6 +91,21 @@ def test_get_msvcr(self): '[MSC v.1999 32 bits (Intel)]') self.assertRaises(ValueError, get_msvcr) + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same thing + self.assertEquals(get_compiler_versions(), get_versions()) + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + # make sure any usage of RE_VERSION will also + # generate a warning, but till works + version = RE_VERSION.search('1.2').group(1) + self.assertEquals(version, '1.2') + self.assertEquals(len(w.warnings), 2) + def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py new file mode 100644 index 0000000000..2176d641d0 --- /dev/null +++ b/tests/test_emxccompiler.py @@ -0,0 +1,33 @@ +"""Tests for distutils.emxccompiler.""" +import unittest +import sys +import os +import warnings + +from test.support import check_warnings +from test.support import captured_stdout + +from distutils.emxccompiler import get_versions +from distutils.util import get_compiler_versions +from distutils.tests import support + +class EmxCCompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def test_get_version_deprecated(self): + with check_warnings() as w: + warnings.simplefilter("always") + # make sure get_compiler_versions and get_versions + # returns the same gcc + gcc, ld, dllwrap = get_compiler_versions() + emx_gcc, emx_ld = get_versions() + self.assertEquals(gcc, emx_gcc) + + # make sure using get_version() generated a warning + self.assertEquals(len(w.warnings), 1) + +def test_suite(): + return unittest.makeSuite(EmxCCompilerTestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff --git a/tests/test_util.py b/tests/test_util.py index c0acf5f481..e9065ff59c 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,15 +6,33 @@ import sys import unittest from copy import copy +from io import BytesIO +import subprocess from distutils.errors import DistutilsPlatformError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape) -from distutils import util # used to patch _environ_checked + rfc822_escape, get_compiler_versions, + _find_exe_version, _MAC_OS_X_LD_VERSION) +from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +from distutils.version import LooseVersion + +class FakePopen(object): + test_class = None + def __init__(self, cmd, shell, stdout, stderr): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd not in exes: + # we don't want to call the system, returning an empty + # output so it doesn't match + self.stdout = BytesIO() + self.stderr = BytesIO() + else: + self.stdout = BytesIO(exes[self.cmd]) + self.stderr = BytesIO() class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -37,9 +55,16 @@ def setUp(self): else: self.uname = None self._uname = None - os.uname = self._get_uname + # patching POpen + self.old_find_executable = util.find_executable + util.find_executable = self._find_executable + self._exes = {} + self.old_popen = subprocess.Popen + FakePopen.test_class = self + subprocess.Popen = FakePopen + def tearDown(self): # getting back the environment os.name = self.name @@ -54,6 +79,8 @@ def tearDown(self): else: del os.uname sysconfig._config_vars = copy(self._config_vars) + util.find_executable = self.old_find_executable + subprocess.Popen = self.old_popen super(UtilTestCase, self).tearDown() def _set_uname(self, uname): @@ -237,6 +264,70 @@ def test_rfc822_escape(self): 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) + def test_find_exe_version(self): + # the ld version scheme under MAC OS is: + # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION + # + # where VERSION is a 2-digit number for major + # revisions. For instance under Leopard, it's + # currently 77 + # + # Dots are used when branching is done. + # + # The SnowLeopard ld64 is currently 95.2.12 + + for output, version in ((b'@(#)PROGRAM:ld PROJECT:ld64-77', '77'), + (b'@(#)PROGRAM:ld PROJECT:ld64-95.2.12', + '95.2.12')): + result = _MAC_OS_X_LD_VERSION.search(output) + self.assertEquals(result.group(1).decode(), version) + + def _find_executable(self, name): + if name in self._exes: + return name + return None + + def test_get_compiler_versions(self): + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_compiler_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = b'very strange output' + res = get_compiler_versions() + self.assertEquals(res[0], None) + + # same thing for ld + if sys.platform != 'darwin': + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(res[1], None) + else: + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' + res = get_compiler_versions() + self.assertEquals(res[1], None) + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_compiler_versions() + self.assertEquals(str(res[1]), '77') + + # and dllwrap + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_compiler_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = b'Cheese Wrap' + res = get_compiler_versions() + self.assertEquals(res[2], None) + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index ad7ae08d76..0c88b8197d 100644 --- a/util.py +++ b/util.py @@ -7,10 +7,12 @@ __revision__ = "$Id$" import sys, os, string, re + from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn +from distutils.spawn import spawn, find_executable from distutils import log +from distutils.version import LooseVersion def get_platform(): """Return a string that identifies the current platform. @@ -539,6 +541,56 @@ def rfc822_escape(header): sep = '\n' + 8*' ' return sep.join(lines) +_RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') +_MAC_OS_X_LD_VERSION = re.compile(b'^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') + +def _find_ld_version(): + """Finds the ld version. The version scheme differs under Mac OSX.""" + if sys.platform == 'darwin': + return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) + else: + return _find_exe_version('ld -v') + +def _find_exe_version(cmd, pattern=_RE_VERSION): + """Find the version of an executable by running `cmd` in the shell. + + `pattern` is a compiled regular expression. If not provided, default + to _RE_VERSION. If the command is not found, or the output does not + match the mattern, returns None. + """ + from subprocess import Popen, PIPE + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) + try: + stdout, stderr = pipe.stdout.read(), pipe.stderr.read() + finally: + pipe.stdout.close() + pipe.stderr.close() + # some commands like ld under MacOS X, will give the + # output in the stderr, rather than stdout. + if stdout != b'': + out_string = stdout + else: + out_string = stderr + + result = pattern.search(out_string) + if result is None: + return None + return LooseVersion(result.group(1).decode()) + +def get_compiler_versions(): + """Returns a tuple providing the versions of gcc, ld and dllwrap + + For each command, if a command is not found, None is returned. + Otherwise a LooseVersion instance is returned. + """ + gcc = _find_exe_version('gcc -dumpversion') + ld = _find_ld_version() + dllwrap = _find_exe_version('dllwrap --version') + return gcc, ld, dllwrap + # 2to3 support def run_2to3(files, fixer_names=None, options=None, explicit=None): From fcfd0cb5014a3b4f0bda28a8210a1286e8e63f71 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 19 Jul 2009 21:52:02 +0000 Subject: [PATCH 2446/8469] skip test when distutils is not made for py3k --- tests/test_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_register.py b/tests/test_register.py index c03ad10147..acda1b1ac1 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -202,10 +202,10 @@ def test_strict(self): self.assertRaises(DistutilsSetupError, cmd.run) # we don't test the reSt feature if docutils - # is not installed + # is not installed or we our on py3k try: import docutils - except ImportError: + except Exception: return # metadata are OK but long_description is broken From 1d3e8e21722d7354f77ebd0c8b19855e7a8045c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 22 Jul 2009 08:55:19 +0000 Subject: [PATCH 2447/8469] Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O --- extension.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extension.py b/extension.py index 53ca8fd0c5..6af1810801 100644 --- a/extension.py +++ b/extension.py @@ -103,10 +103,11 @@ def __init__ (self, name, sources, optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources From 7d70ca7551824bdf4950932bd5d68e8a982cf1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 22 Jul 2009 08:57:28 +0000 Subject: [PATCH 2448/8469] Merged revisions 74163 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O ........ --- extension.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extension.py b/extension.py index 16d2bef6f4..5c07bdae82 100644 --- a/extension.py +++ b/extension.py @@ -103,10 +103,11 @@ def __init__(self, name, sources, optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources From 576fc43ebe6bd3b6f7707d8c8e9ba92cc9ed112b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 22 Jul 2009 09:03:01 +0000 Subject: [PATCH 2449/8469] Merged revisions 74164 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74164 | tarek.ziade | 2009-07-22 10:57:28 +0200 (Wed, 22 Jul 2009) | 9 lines Merged revisions 74163 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O ........ ................ --- extension.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extension.py b/extension.py index 16d2bef6f4..5c07bdae82 100644 --- a/extension.py +++ b/extension.py @@ -103,10 +103,11 @@ def __init__(self, name, sources, optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources From f2f22a0bbb568a277a34b248d6532350463c43d9 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 9 Aug 2009 02:04:10 +0200 Subject: [PATCH 2450/8469] Added tag 0.6 for changeset 1010d08fd8df --HG-- branch : distribute extra : rebase_source : 2b085195f037843390e2665ee3a31d1d8c4f8bd0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) create mode 100644 .hgtags diff --git a/.hgtags b/.hgtags new file mode 100644 index 0000000000..62272cce6b --- /dev/null +++ b/.hgtags @@ -0,0 +1 @@ +1010d08fd8dfd2f1496843b557b5369a0beba82a 0.6 From eb16649b8cca504ecde46bd3182333671e47250b Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 9 Aug 2009 02:08:34 +0200 Subject: [PATCH 2451/8469] strip line --HG-- branch : distribute extra : rebase_source : f711b4b4d47500006bf4abe8d11a56dbf081ec63 --- README.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/README.txt b/README.txt index ce8d641385..2a6e75dea5 100755 --- a/README.txt +++ b/README.txt @@ -199,4 +199,5 @@ Credits * Hanno Schlichting * Many other people that helped on Distutils-SIG (please add your name here) * Phillip Eby for the Setuptools project. + From c9029603df0ca944e958c6d753cf1257e02bd365 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Sun, 9 Aug 2009 16:40:17 -0700 Subject: [PATCH 2452/8469] remove duplicate -v arg (transplanted from 0131f4eddc7df6042e98e02799064f2f836802db) --HG-- branch : distribute extra : rebase_source : 7d55bb261fca44726f81331beaa03cce3742aa53 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 645098d72d..e50956fd22 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -311,7 +311,7 @@ def _easy_install(argv, egg=None): from setuptools.dist import Distribution import distutils.core if egg is not None: - setup_args = list(argv) + ['-v'] + [egg] + setup_args = list(argv) + [egg] else: setup_args = list(argv) try: From a95877cd71522f5a2f5af90e2e2bfaa5d33ab3e2 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Sun, 9 Aug 2009 19:39:18 -0700 Subject: [PATCH 2453/8469] add --version to easy_install fixes #4 (transplanted from 29b03bd8ae436ac26767f42bc77b0bfefa8a6e7a) --HG-- branch : distribute extra : rebase_source : e97203ec652e0fea0744ad60819cd52e686bf449 --- setuptools/command/easy_install.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 228a9a696c..3f8a6877b7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -71,11 +71,12 @@ class easy_install(Command): ('no-deps', 'N', "don't install dependencies"), ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"), + ('version', None, "print version information and exit"), ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', 'delete-conflicting', 'ignore-conflicts-at-my-risk', 'editable', - 'no-deps', 'local-snapshots-ok', + 'no-deps', 'local-snapshots-ok', 'version' ] negative_opt = {'always-unzip': 'zip-ok'} create_index = PackageIndex @@ -91,6 +92,7 @@ def initialize_options(self): self.upgrade = self.always_copy = self.multi_version = None self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None + self.version = None # Options not specifiable via command line self.package_index = None @@ -122,6 +124,10 @@ def delete_blockers(self, blockers): os.unlink(filename) def finalize_options(self): + if self.version: + print 'distribute %s' % get_distribution('distribute').version + sys.exit() + self._expand('install_dir','script_dir','build_directory','site_dirs') # If a non-default installation directory was specified, default the # script directory to match it. From 8c7f12ea567dc59e1031dbffdda12247dfce0b9e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 13 Aug 2009 08:51:18 +0000 Subject: [PATCH 2454/8469] Merged revisions 73715 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........ --- tests/test_archive_util.py | 16 ++++++------- tests/test_bdist_rpm.py | 4 ++-- tests/test_bdist_wininst.py | 2 +- tests/test_build_clib.py | 2 +- tests/test_build_ext.py | 30 ++++++++++++------------- tests/test_build_py.py | 6 ++--- tests/test_build_scripts.py | 10 ++++----- tests/test_clean.py | 2 +- tests/test_cmd.py | 2 +- tests/test_config.py | 4 ++-- tests/test_config_cmd.py | 4 ++-- tests/test_dist.py | 42 +++++++++++++++++------------------ tests/test_install.py | 16 ++++++------- tests/test_install_data.py | 12 +++++----- tests/test_install_lib.py | 6 ++--- tests/test_install_scripts.py | 14 ++++++------ tests/test_msvc9compiler.py | 4 ++-- tests/test_register.py | 16 ++++++------- tests/test_sysconfig.py | 12 +++++----- tests/test_upload.py | 2 +- tests/test_util.py | 4 ++-- 21 files changed, 105 insertions(+), 105 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 663b33532a..d88e0b350d 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -47,7 +47,7 @@ def test_make_tarball(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -58,7 +58,7 @@ def test_make_tarball(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) def _tarinfo(self, path): tar = tarfile.open(path) @@ -96,7 +96,7 @@ def test_tarfile_vs_tar(self): # check if the compressed tarball was created tarball = base_name + '.tar.gz' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') @@ -110,7 +110,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) - self.assert_(os.path.exists(tarball2)) + self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) @@ -123,7 +123,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) # now for a dry_run base_name = os.path.join(tmpdir2, 'archive') @@ -134,7 +134,7 @@ def test_tarfile_vs_tar(self): finally: os.chdir(old_dir) tarball = base_name + '.tar' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) @unittest.skipUnless(find_executable('compress'), 'The compress program is required') @@ -151,7 +151,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) tarball = base_name + '.tar.Z' - self.assert_(os.path.exists(tarball)) + self.assertTrue(os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) # same test with dry_run @@ -165,7 +165,7 @@ def test_compress_deprecated(self): dry_run=True) finally: os.chdir(old_dir) - self.assert_(not os.path.exists(tarball)) + self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2d84007f87..c271567542 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -74,7 +74,7 @@ def test_quiet(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) def test_no_optimize_flag(self): @@ -114,7 +114,7 @@ def test_no_optimize_flag(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assert_('foo-0.1-1.noarch.rpm' in dist_created) + self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index f2cb4fdeba..9b1ba6d107 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -21,7 +21,7 @@ def test_get_exe_bytes(self): # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assert_(len(exe_file) > 10) + self.assertTrue(len(exe_file) > 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 47d85cd8b4..536cd67319 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -135,7 +135,7 @@ def test_run(self): cmd.run() # let's check the result - self.assert_('libfoo.a' in os.listdir(build_temp)) + self.assertTrue('libfoo.a' in os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 9861ee2993..1221fd43af 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -74,15 +74,15 @@ def test_build_ext(self): import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal @@ -114,7 +114,7 @@ def test_solaris_enable_shared(self): _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -128,7 +128,7 @@ def test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 @@ -144,9 +144,9 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set - self.assert_(lib in cmd.library_dirs) - self.assert_(lib in cmd.rpath) - self.assert_(incl in cmd.include_dirs) + self.assertTrue(lib in cmd.library_dirs) + self.assertTrue(lib in cmd.rpath) + self.assertTrue(incl in cmd.include_dirs) def test_optional_extension(self): @@ -175,10 +175,10 @@ def test_finalize_options(self): from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -192,7 +192,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -257,13 +257,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -321,7 +321,7 @@ def test_get_outputs(self): so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -330,7 +330,7 @@ def test_get_outputs(self): cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) + self.assertTrue(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 75b6624f5a..8ad3bbc452 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -52,9 +52,9 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assert_("__init__.py" in files) - self.assert_("__init__.pyc" in files) - self.assert_("README.txt" in files) + self.assertTrue("__init__.py" in files) + self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b55eb5857b..b1d2d079bd 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -16,12 +16,12 @@ class BuildScriptsTestCase(support.TempdirManager, def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assert_(not cmd.force) - self.assert_(cmd.build_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(cmd.build_dir is None) cmd.finalize_options() - self.assert_(cmd.force) + self.assertTrue(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): @@ -37,7 +37,7 @@ def test_build(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -100,7 +100,7 @@ def test_version_int(self): built = os.listdir(target) for name in expected: - self.assert_(name in built) + self.assertTrue(name in built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) diff --git a/tests/test_clean.py b/tests/test_clean.py index 3026032712..dbc4ee2a18 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -35,7 +35,7 @@ def test_simple_run(self): # make sure the files where removed for name, path in dirs: - self.assert_(not os.path.exists(path), + self.assertTrue(not os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but suceed) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 8f2b36fb1f..d6438b5ea1 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -70,7 +70,7 @@ def test_ensure_string(self): cmd.option2 = None cmd.ensure_string('option2', 'xxx') - self.assert_(hasattr(cmd, 'option2')) + self.assertTrue(hasattr(cmd, 'option2')) cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') diff --git a/tests/test_config.py b/tests/test_config.py index 0f97cf7a5e..879689d2bb 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -102,9 +102,9 @@ def test_server_registration(self): def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assert_(not os.path.exists(rc)) + self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') - self.assert_(os.path.exists(rc)) + self.assertTrue(os.path.exists(rc)) content = open(rc).read() self.assertEquals(content, WANTED) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index bacf13a291..ef2e7bc317 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -73,14 +73,14 @@ def test_clean(self): self.write_file(f2, 'xxx') for f in (f1, f2): - self.assert_(os.path.exists(f)) + self.assertTrue(os.path.exists(f)) pkg_dir, dist = self.create_dist() cmd = config(dist) cmd._clean(f1, f2) for f in (f1, f2): - self.assert_(not os.path.exists(f)) + self.assertTrue(not os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index 40760390c8..9f795f4314 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -72,7 +72,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assert_(isinstance(cmd, test_dist)) + self.assertTrue(isinstance(cmd, test_dist)) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -157,10 +157,10 @@ def test_simple_metadata(self): "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.0" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.0" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -172,9 +172,9 @@ def test_provides(self): self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("requires:" not in meta.lower()) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("obsoletes:" not in meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -192,11 +192,11 @@ def test_requires(self): self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("Requires: other" in meta) - self.assert_("Requires: another (==1.0)" in meta) - self.assert_("obsoletes:" not in meta.lower()) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("Requires: other" in meta) + self.assertTrue("Requires: another (==1.0)" in meta) + self.assertTrue("obsoletes:" not in meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -214,11 +214,11 @@ def test_obsoletes(self): self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assert_("Metadata-Version: 1.1" in meta) - self.assert_("provides:" not in meta.lower()) - self.assert_("requires:" not in meta.lower()) - self.assert_("Obsoletes: other" in meta) - self.assert_("Obsoletes: another (<1.0)" in meta) + self.assertTrue("Metadata-Version: 1.1" in meta) + self.assertTrue("provides:" not in meta.lower()) + self.assertTrue("requires:" not in meta.lower()) + self.assertTrue("Obsoletes: other" in meta) + self.assertTrue("Obsoletes: another (<1.0)" in meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -252,14 +252,14 @@ def test_custom_pydistutils(self): if sys.platform in ('linux', 'darwin'): self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files) + self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found self.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assert_(user_filename in files, + self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -285,7 +285,7 @@ def test_show_help(self): output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assert_(len(output) > 0) + self.assertTrue(len(output) > 0) def test_suite(): suite = unittest.TestSuite() diff --git a/tests/test_install.py b/tests/test_install.py index 8d7e97227c..d0ad5ce159 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -88,7 +88,7 @@ def _expanduser(path): def _test_user_site(self): for key in ('nt_user', 'unix_user', 'os2_home'): - self.assert_(key in INSTALL_SCHEMES) + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -96,24 +96,24 @@ def _test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assert_('user' in options) + self.assertTrue('user' in options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assert_(not os.path.exists(self.user_base)) - self.assert_(not os.path.exists(self.user_site)) + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() # now they should - self.assert_(os.path.exists(self.user_base)) - self.assert_(os.path.exists(self.user_site)) + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) - self.assert_('userbase' in cmd.config_vars) - self.assert_('usersite' in cmd.config_vars) + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 73c40371d6..7072136792 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -35,9 +35,9 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # let's try with warn_dir one @@ -47,8 +47,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 2) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] # now using root and empty dir @@ -65,8 +65,8 @@ def test_simple_run(self): # let's check the result self.assertEquals(len(cmd.get_outputs()), 4) - self.assert_(os.path.exists(os.path.join(inst2, rtwo))) - self.assert_(os.path.exists(os.path.join(inst, rone))) + self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) + self.assertTrue(os.path.exists(os.path.join(inst, rone))) def test_suite(): return unittest.makeSuite(InstallDataTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index d768166829..793b95cad6 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -39,8 +39,8 @@ def test_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assert_(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() @@ -57,7 +57,7 @@ def test_get_outputs(self): cmd.distribution.script_name = 'setup.py' # get_output should return 4 elements - self.assert_(len(cmd.get_outputs()) >= 2) + self.assertTrue(len(cmd.get_outputs()) >= 2) def test_get_inputs(self): pkg_dir, dist = self.create_dist() diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index fffa6ef2c3..b7eb625ac5 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -23,15 +23,15 @@ def test_default_settings(self): skip_build=1, ) cmd = install_scripts(dist) - self.assert_(not cmd.force) - self.assert_(not cmd.skip_build) - self.assert_(cmd.build_dir is None) - self.assert_(cmd.install_dir is None) + self.assertTrue(not cmd.force) + self.assertTrue(not cmd.skip_build) + self.assertTrue(cmd.build_dir is None) + self.assertTrue(cmd.install_dir is None) cmd.finalize_options() - self.assert_(cmd.force) - self.assert_(cmd.skip_build) + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) self.assertEqual(cmd.build_dir, "/foo/bar") self.assertEqual(cmd.install_dir, "/splat/funk") @@ -69,7 +69,7 @@ def write_script(name, text): installed = os.listdir(target) for name in expected: - self.assert_(name in installed) + self.assertTrue(name in installed) def test_suite(): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 11e5a47630..73827988bb 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Software\Microsoft\Notepad' v = Reg.get_value(path, "lfitalic") - self.assert_(v in (0, 1)) + self.assertTrue(v in (0, 1)) import winreg HKCU = winreg.HKEY_CURRENT_USER @@ -54,7 +54,7 @@ def test_reg_class(self): self.assertEquals(keys, None) keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assert_('Notepad' in keys) + self.assertTrue('Notepad' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) diff --git a/tests/test_register.py b/tests/test_register.py index d9ff3ec441..c03ad10147 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -96,7 +96,7 @@ def test_create_pypirc(self): cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assert_(not os.path.exists(self.rc)) + self.assertTrue(not os.path.exists(self.rc)) # patching input and getpass.getpass # so register gets happy @@ -115,7 +115,7 @@ def test_create_pypirc(self): del register_module.input # we should have a brand new .pypirc file - self.assert_(os.path.exists(self.rc)) + self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC content = open(self.rc).read() @@ -133,13 +133,13 @@ def _no_way(prompt=''): # let's see what the server received : we should # have 2 similar requests - self.assert_(self.conn.reqs, 2) + self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEquals(req1['Content-length'], '1374') self.assertEquals(req2['Content-length'], '1374') - self.assert_((b'xxx') in self.conn.reqs[1].data) + self.assertTrue((b'xxx') in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -165,11 +165,11 @@ def test_registering(self): del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '608') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_password_reset(self): # this test runs choice 3 @@ -183,11 +183,11 @@ def test_password_reset(self): del register_module.input # we should have send a request - self.assert_(self.conn.reqs, 1) + self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEquals(headers['Content-length'], '290') - self.assert_((b'tarek') in req.data) + self.assertTrue((b'tarek') in req.data) def test_strict(self): # testing the script option diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 2d8fa2710e..eb36204439 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -21,12 +21,12 @@ def tearDown(self): def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() - self.assert_(os.path.isfile(config_h), config_h) + self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before - #self.assert_(os.path.isdir(lib_dir), lib_dir) + #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) @@ -36,14 +36,14 @@ def test_get_python_inc(self): # This is not much of a test. We make sure Python.h exists # in the directory returned by get_python_inc() but we don't know # it is the correct file. - self.assert_(os.path.isdir(inc_dir), inc_dir) + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assert_(isinstance(cvars, dict)) - self.assert_(cvars) + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) def test_customize_compiler(self): diff --git a/tests/test_upload.py b/tests/test_upload.py index 95e4ac3315..828f20c539 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -107,7 +107,7 @@ def test_upload(self): # what did we send ? headers = dict(self.conn.headers) self.assertEquals(headers['Content-length'], '2087') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.conn.requests, [('POST', '/pypi')]) self.assert_((b'xxx') in self.conn.body) diff --git a/tests/test_util.py b/tests/test_util.py index cee7d5263b..c0acf5f481 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -225,10 +225,10 @@ def test_strtobool(self): no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') for y in yes: - self.assert_(strtobool(y)) + self.assertTrue(strtobool(y)) for n in no: - self.assert_(not strtobool(n)) + self.assertTrue(not strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' From 7329a6d2504982f7ad4261bf7a1f24e4063ee2d2 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 13 Aug 2009 15:47:36 +0000 Subject: [PATCH 2455/8469] bump version to 3.1.1rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 994e91fa29..e7f21232fd 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.1a0" +__version__ = "3.1.1rc1" #--end constants-- From e5d9d64f150067264eedc7738da02f46d06e7827 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 16 Aug 2009 21:59:05 +0000 Subject: [PATCH 2456/8469] bump to 3.1.1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e7f21232fd..8c0e5a3cba 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.1rc1" +__version__ = "3.1.1" #--end constants-- From e5e2bce7407fa39872996bbadb033ff1def2eec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 Aug 2009 21:28:34 +0000 Subject: [PATCH 2457/8469] fixed how fnmatch.translate is used (since it has changed in r74475 for #6665). Now the code is not harcoding the usage of $ anymore --- filelist.py | 5 +++-- tests/test_filelist.py | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/filelist.py b/filelist.py index 3ba5720ca9..5a88fd4e21 100644 --- a/filelist.py +++ b/filelist.py @@ -342,12 +342,13 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): pattern_re = '' if prefix is not None: - prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ + # ditch end of pattern character + empty_pattern = glob_to_re('') + prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re return re.compile(pattern_re) - # translate_pattern () diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 86db557441..1faccfae7e 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -6,15 +6,15 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*$') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]$') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]$') + self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*$') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*$') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_suite(): return unittest.makeSuite(FileListTestCase) From cc6230244cd7ff8d13b3cc9c0c493682b5560ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 Aug 2009 21:35:46 +0000 Subject: [PATCH 2458/8469] Merged revisions 74493 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74493 | tarek.ziade | 2009-08-17 23:28:34 +0200 (Mon, 17 Aug 2009) | 1 line fixed how fnmatch.translate is used (since it has changed in r74475 for #6665). Now the code is not harcoding the usage of $ anymore ........ --- filelist.py | 4 +++- tests/test_filelist.py | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/filelist.py b/filelist.py index 58a2bfb108..06a8da9a07 100644 --- a/filelist.py +++ b/filelist.py @@ -312,7 +312,9 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): pattern_re = '' if prefix is not None: - prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ + # ditch end of pattern character + empty_pattern = glob_to_re('') + prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 86db557441..1faccfae7e 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -6,15 +6,15 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*$') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]$') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]$') + self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*$') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*$') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_suite(): return unittest.makeSuite(FileListTestCase) From 2adb920d5dce513c2743a1b1559559709c38caf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 Aug 2009 21:48:22 +0000 Subject: [PATCH 2459/8469] module cleanup --- filelist.py | 99 +++++++++++++++++++++++------------------------------ 1 file changed, 42 insertions(+), 57 deletions(-) diff --git a/filelist.py b/filelist.py index 5a88fd4e21..de665e7a8c 100644 --- a/filelist.py +++ b/filelist.py @@ -6,15 +6,13 @@ __revision__ = "$Id$" -import os, string, re +import os, re import fnmatch -from types import * from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log class FileList: - """A list of files built by on exploring the filesystem and filtered by applying various patterns to what we find there. @@ -29,22 +27,19 @@ class FileList: filtering applied) """ - def __init__(self, - warn=None, - debug_print=None): + def __init__(self, warn=None, debug_print=None): # ignore argument to FileList, but keep them for backwards # compatibility - self.allfiles = None self.files = [] - def set_allfiles (self, allfiles): + def set_allfiles(self, allfiles): self.allfiles = allfiles - def findall (self, dir=os.curdir): + def findall(self, dir=os.curdir): self.allfiles = findall(dir) - def debug_print (self, msg): + def debug_print(self, msg): """Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true. """ @@ -54,13 +49,13 @@ def debug_print (self, msg): # -- List-like methods --------------------------------------------- - def append (self, item): + def append(self, item): self.files.append(item) - def extend (self, items): + def extend(self, items): self.files.extend(items) - def sort (self): + def sort(self): # Not a strict lexical sort! sortable_files = map(os.path.split, self.files) sortable_files.sort() @@ -71,7 +66,7 @@ def sort (self): # -- Other miscellaneous utility methods --------------------------- - def remove_duplicates (self): + def remove_duplicates(self): # Assumes list has been sorted! for i in range(len(self.files) - 1, 0, -1): if self.files[i] == self.files[i - 1]: @@ -80,8 +75,8 @@ def remove_duplicates (self): # -- "File template" methods --------------------------------------- - def _parse_template_line (self, line): - words = string.split(line) + def _parse_template_line(self, line): + words = line.split() action = words[0] patterns = dir = dir_pattern = None @@ -114,11 +109,7 @@ def _parse_template_line (self, line): return (action, patterns, dir, dir_pattern) - # _parse_template_line () - - - def process_template_line (self, line): - + def process_template_line(self, line): # Parse the line: split it up, make sure the right number of words # is there, and return the relevant words. 'action' is always # defined: it's the first word of the line. Which of the other @@ -130,28 +121,28 @@ def process_template_line (self, line): # right number of words on the line for that action -- so we # can proceed with minimal error-checking. if action == 'include': - self.debug_print("include " + string.join(patterns)) + self.debug_print("include " + ' '.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=1): log.warn("warning: no files found matching '%s'", pattern) elif action == 'exclude': - self.debug_print("exclude " + string.join(patterns)) + self.debug_print("exclude " + ' '.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=1): log.warn(("warning: no previously-included files " "found matching '%s'"), pattern) elif action == 'global-include': - self.debug_print("global-include " + string.join(patterns)) + self.debug_print("global-include " + ' '.join(patterns)) for pattern in patterns: if not self.include_pattern(pattern, anchor=0): log.warn(("warning: no files found matching '%s' " + "anywhere in distribution"), pattern) elif action == 'global-exclude': - self.debug_print("global-exclude " + string.join(patterns)) + self.debug_print("global-exclude " + ' '.join(patterns)) for pattern in patterns: if not self.exclude_pattern(pattern, anchor=0): log.warn(("warning: no previously-included files matching " @@ -160,7 +151,7 @@ def process_template_line (self, line): elif action == 'recursive-include': self.debug_print("recursive-include %s %s" % - (dir, string.join(patterns))) + (dir, ' '.join(patterns))) for pattern in patterns: if not self.include_pattern(pattern, prefix=dir): log.warn(("warning: no files found matching '%s' " + @@ -169,7 +160,7 @@ def process_template_line (self, line): elif action == 'recursive-exclude': self.debug_print("recursive-exclude %s %s" % - (dir, string.join(patterns))) + (dir, ' '.join(patterns))) for pattern in patterns: if not self.exclude_pattern(pattern, prefix=dir): log.warn(("warning: no previously-included files matching " @@ -196,13 +187,13 @@ def process_template_line (self, line): # -- Filtering/selection methods ----------------------------------- - def include_pattern (self, pattern, - anchor=1, prefix=None, is_regex=0): + def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'self.files' that - match 'pattern', a Unix-style wildcard (glob) pattern. Patterns - are not quite the same as implemented by the 'fnmatch' module: '*' - and '?' match non-special characters, where "special" is platform- - dependent: slash on Unix; colon, slash, and backslash on + match 'pattern', a Unix-style wildcard (glob) pattern. + + Patterns are not quite the same as implemented by the 'fnmatch' + module: '*' and '?' match non-special characters, where "special" + is platform-dependent: slash on Unix; colon, slash, and backslash on DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more @@ -239,16 +230,14 @@ def include_pattern (self, pattern, return files_found - # include_pattern () - - def exclude_pattern (self, pattern, - anchor=1, prefix=None, is_regex=0): + def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match - 'pattern'. Other parameters are the same as for - 'include_pattern()', above. - The list 'self.files' is modified in place. - Return 1 if files are found. + 'pattern'. + + Other parameters are the same as for 'include_pattern()', above. + The list 'self.files' is modified in place. Return 1 if files are + found. """ files_found = 0 pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) @@ -262,15 +251,11 @@ def exclude_pattern (self, pattern, return files_found - # exclude_pattern () - -# class FileList - # ---------------------------------------------------------------------- # Utility functions -def findall (dir = os.curdir): +def findall(dir = os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ @@ -303,10 +288,11 @@ def findall (dir = os.curdir): def glob_to_re(pattern): - """Translate a shell-like glob pattern to a regular expression; return - a string containing the regex. Differs from 'fnmatch.translate()' in - that '*' does not match "special characters" (which are - platform-specific). + """Translate a shell-like glob pattern to a regular expression. + + Return a string containing the regex. Differs from + 'fnmatch.translate()' in that '*' does not match "special characters" + (which are platform-specific). """ pattern_re = fnmatch.translate(pattern) @@ -321,17 +307,17 @@ def glob_to_re(pattern): return pattern_re -# glob_to_re () - -def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): +def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): """Translate a shell-like wildcard pattern to a compiled regular - expression. Return the compiled regex. If 'is_regex' true, + expression. + + Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) or just returned as-is (assumes it's a regex object). """ if is_regex: - if type(pattern) is StringType: + if isinstance(pattern, str): return re.compile(pattern) else: return pattern @@ -344,11 +330,10 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): if prefix is not None: # ditch end of pattern character empty_pattern = glob_to_re('') - prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] + prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re return re.compile(pattern_re) -# translate_pattern () From 15409e57d2abff9f61fa6cd3b7e676da610a4514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 Aug 2009 21:50:37 +0000 Subject: [PATCH 2460/8469] Merged revisions 74495 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74495 | tarek.ziade | 2009-08-17 23:48:22 +0200 (Mon, 17 Aug 2009) | 1 line module cleanup ........ --- filelist.py | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/filelist.py b/filelist.py index 06a8da9a07..b6a1dfeebf 100644 --- a/filelist.py +++ b/filelist.py @@ -180,10 +180,11 @@ def process_template_line(self, line): def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'self.files' that - match 'pattern', a Unix-style wildcard (glob) pattern. Patterns - are not quite the same as implemented by the 'fnmatch' module: '*' - and '?' match non-special characters, where "special" is platform- - dependent: slash on Unix; colon, slash, and backslash on + match 'pattern', a Unix-style wildcard (glob) pattern. + + Patterns are not quite the same as implemented by the 'fnmatch' + module: '*' and '?' match non-special characters, where "special" + is platform-dependent: slash on Unix; colon, slash, and backslash on DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more @@ -220,13 +221,13 @@ def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): return files_found - def exclude_pattern (self, pattern, - anchor=1, prefix=None, is_regex=0): + def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match - 'pattern'. Other parameters are the same as for - 'include_pattern()', above. - The list 'self.files' is modified in place. - Return True if files are found, False otherwise. + 'pattern'. + + Other parameters are the same as for 'include_pattern()', above. + The list 'self.files' is modified in place. Return 1 if files are + found. """ files_found = False pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) @@ -275,10 +276,11 @@ def findall(dir=os.curdir): def glob_to_re(pattern): - """Translate a shell-like glob pattern to a regular expression; return - a string containing the regex. Differs from 'fnmatch.translate()' in - that '*' does not match "special characters" (which are - platform-specific). + """Translate a shell-like glob pattern to a regular expression. + + Return a string containing the regex. Differs from + 'fnmatch.translate()' in that '*' does not match "special characters" + (which are platform-specific). """ pattern_re = fnmatch.translate(pattern) @@ -296,7 +298,9 @@ def glob_to_re(pattern): def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): """Translate a shell-like wildcard pattern to a compiled regular - expression. Return the compiled regex. If 'is_regex' true, + expression. + + Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) or just returned as-is (assumes it's a regex object). """ @@ -314,7 +318,7 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): if prefix is not None: # ditch end of pattern character empty_pattern = glob_to_re('') - prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] + prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: From b3720fd2d9d4207a120738aacfdc3e99d7317dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 18 Aug 2009 08:16:33 +0000 Subject: [PATCH 2461/8469] added more test coverage for distutils.filelist to prevent regressions when fnmatch or re are changed --- filelist.py | 5 +---- tests/test_filelist.py | 45 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/filelist.py b/filelist.py index de665e7a8c..7cf05098ed 100644 --- a/filelist.py +++ b/filelist.py @@ -115,7 +115,7 @@ def process_template_line(self, line): # defined: it's the first word of the line. Which of the other # three are defined depends on the action; it'll be either # patterns, (dir and patterns), or (dir_pattern). - (action, patterns, dir, dir_pattern) = self._parse_template_line(line) + action, patterns, dir, dir_pattern = self._parse_template_line(line) # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we @@ -182,9 +182,6 @@ def process_template_line(self, line): raise DistutilsInternalError, \ "this cannot happen: invalid action '%s'" % action - # process_template_line () - - # -- Filtering/selection methods ----------------------------------- def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 1faccfae7e..181a58d815 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,6 +1,21 @@ """Tests for distutils.filelist.""" +from os.path import join import unittest -from distutils.filelist import glob_to_re +from distutils.filelist import glob_to_re, FileList + +MANIFEST_IN = """\ +include ok +include xo +exclude xo +include foo.tmp +global-include *.x +global-include *.txt +global-exclude *.tmp +recursive-include f *.oo +recursive-exclude global *.x +graft dir +prune dir3 +""" class FileListTestCase(unittest.TestCase): @@ -16,6 +31,34 @@ def test_glob_to_re(self): self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') + def test_process_template_line(self): + # testing all MANIFEST.in template patterns + file_list = FileList() + + # simulated file list + file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt' + join('global', 'one.txt'), + join('global', 'two.txt'), + join('global', 'files.x'), + join('global', 'here.tmp'), + join('f', 'o', 'f.oo'), + join('dir', 'graft-one'), + join('dir', 'dir2', 'graft2'), + join('dir3', 'ok'), + join('dir3', 'sub', 'ok.txt') + ] + + for line in MANIFEST_IN.split('\n'): + if line.strip() == '': + continue + file_list.process_template_line(line) + + wanted = ['ok', join('global', 'one.txt'), join('global', 'two.txt'), + 'four.txt', join('f', 'o', 'f.oo'), join('dir', 'graft-one'), + join('dir', 'dir2', 'graft2')] + + self.assertEquals(file_list.files, wanted) + def test_suite(): return unittest.makeSuite(FileListTestCase) From fa9880b2ce1357d28b14880d2d7398e32dccdf31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 18 Aug 2009 08:21:49 +0000 Subject: [PATCH 2462/8469] fixed typo --- tests/test_filelist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 181a58d815..cf64c744d2 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -36,7 +36,7 @@ def test_process_template_line(self): file_list = FileList() # simulated file list - file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt' + file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt', join('global', 'one.txt'), join('global', 'two.txt'), join('global', 'files.x'), @@ -53,9 +53,9 @@ def test_process_template_line(self): continue file_list.process_template_line(line) - wanted = ['ok', join('global', 'one.txt'), join('global', 'two.txt'), - 'four.txt', join('f', 'o', 'f.oo'), join('dir', 'graft-one'), - join('dir', 'dir2', 'graft2')] + wanted = ['ok', 'four.txt', join('global', 'one.txt'), + join('global', 'two.txt'), join('f', 'o', 'f.oo'), + join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')] self.assertEquals(file_list.files, wanted) From 8f6778cb615909aff25a6b77a78d07e195be85af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 18 Aug 2009 08:23:10 +0000 Subject: [PATCH 2463/8469] Merged revisions 74501 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74501 | tarek.ziade | 2009-08-18 10:16:33 +0200 (Tue, 18 Aug 2009) | 1 line added more test coverage for distutils.filelist to prevent regressions when fnmatch or re are changed ........ --- filelist.py | 3 +-- tests/test_filelist.py | 45 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/filelist.py b/filelist.py index b6a1dfeebf..bfc6df694a 100644 --- a/filelist.py +++ b/filelist.py @@ -108,7 +108,7 @@ def process_template_line(self, line): # defined: it's the first word of the line. Which of the other # three are defined depends on the action; it'll be either # patterns, (dir and patterns), or (dir_pattern). - (action, patterns, dir, dir_pattern) = self._parse_template_line(line) + action, patterns, dir, dir_pattern = self._parse_template_line(line) # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we @@ -175,7 +175,6 @@ def process_template_line(self, line): raise DistutilsInternalError( "this cannot happen: invalid action '%s'" % action) - # -- Filtering/selection methods ----------------------------------- def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 1faccfae7e..cf64c744d2 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,6 +1,21 @@ """Tests for distutils.filelist.""" +from os.path import join import unittest -from distutils.filelist import glob_to_re +from distutils.filelist import glob_to_re, FileList + +MANIFEST_IN = """\ +include ok +include xo +exclude xo +include foo.tmp +global-include *.x +global-include *.txt +global-exclude *.tmp +recursive-include f *.oo +recursive-exclude global *.x +graft dir +prune dir3 +""" class FileListTestCase(unittest.TestCase): @@ -16,6 +31,34 @@ def test_glob_to_re(self): self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') + def test_process_template_line(self): + # testing all MANIFEST.in template patterns + file_list = FileList() + + # simulated file list + file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt', + join('global', 'one.txt'), + join('global', 'two.txt'), + join('global', 'files.x'), + join('global', 'here.tmp'), + join('f', 'o', 'f.oo'), + join('dir', 'graft-one'), + join('dir', 'dir2', 'graft2'), + join('dir3', 'ok'), + join('dir3', 'sub', 'ok.txt') + ] + + for line in MANIFEST_IN.split('\n'): + if line.strip() == '': + continue + file_list.process_template_line(line) + + wanted = ['ok', 'four.txt', join('global', 'one.txt'), + join('global', 'two.txt'), join('f', 'o', 'f.oo'), + join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')] + + self.assertEquals(file_list.files, wanted) + def test_suite(): return unittest.makeSuite(FileListTestCase) From 81b3818500aef5efe1151c60a4ffb8d6ad28331e Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 25 Aug 2009 19:44:53 +0200 Subject: [PATCH 2464/8469] not removing a setuptools instance that is not part of the same root/prefix --HG-- branch : distribute extra : rebase_source : 2193299f01f96c29fb447c024b2051c91ae6bb7b --- distribute_setup.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/distribute_setup.py b/distribute_setup.py index e50956fd22..c2ef008f69 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -259,6 +259,20 @@ def before_install(): log.warn('Before install bootstrap.') fake_setuptools() +def _under_prefix(location): + args = sys.argv[sys.argv.index('install')+1:] + + for index, arg in enumerate(args): + for option in ('--root', '--prefix'): + if arg.startswith('%s=' % option): + top_dir = arg.split('root=')[-1] + return location.startswith(top_dir) + elif arg == option: + if len(args) > index: + top_dir = args[index+1] + return location.startswith(top_dir) + return True + def fake_setuptools(): log.warn('Scanning installed packages') try: @@ -276,6 +290,13 @@ def fake_setuptools(): setuptools_location = setuptools_dist.location log.warn('Setuptools installation detected at %s' % setuptools_location) + # if --root or --preix was provided, and if + # setuptools is not located in them, we don't patch it + if not _under_prefix(setuptools_location): + log.warn('Not patching, --root or --prefix is installing Distribute' + ' in another location') + return + # let's see if its an egg if not setuptools_location.endswith('.egg'): log.warn('Non-egg installation') From 6c31d16ce512c164e211aec0fa1d44437dfe5c61 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 25 Aug 2009 19:48:02 +0200 Subject: [PATCH 2465/8469] added change note + raise version --HG-- branch : distribute extra : rebase_source : dbba2f1fa3d5292746b9605a906e67c9373c7910 --- CHANGES.txt | 11 +++++++++++ docs/conf.py | 4 ++-- setup.py | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index dfc41bc12b..14920b3e7f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,17 @@ CHANGES ======= +----- +0.6.1 +----- + +bootstraping +============ + +* The boostrap process leave setuptools alone if detected in the system + and --root or --prefix is provided, but is not in the same location. + This closes http://bitbucket.org/tarek/distribute/issue/10. + --- 0.6 --- diff --git a/docs/conf.py b/docs/conf.py index 74bc7a6c46..d4ff4a1542 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,9 +49,9 @@ # built documents. # # The short X.Y version. -version = '0.6' +version = '0.6.1' # The full version, including alpha/beta/rc tags. -release = '0.6' +release = '0.6.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 4deaa1f628..10502748ba 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6" +VERSION = "0.6.1" from setuptools import setup, find_packages import sys From 0ae5113b9bc5824a09b0e2c4e317084a4402cc0c Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 26 Aug 2009 08:42:44 +0200 Subject: [PATCH 2466/8469] fixed #16 and #18: BadStatusLine and ValueError in package_index.urlopen --HG-- branch : distribute extra : rebase_source : 6159cf23c0dc4effd40b525066266eefd292b96e --- CHANGES.txt | 7 ++++++ setuptools/package_index.py | 17 +++++++++++++- setuptools/tests/test_packageindex.py | 33 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 14920b3e7f..dd2bfe3639 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,13 @@ CHANGES 0.6.1 ----- +setuptools +========== + +* package_index.urlopen now catches BadStatusLine and malformed url errors. + This closes http://bitbucket.org/tarek/distribute/issue/16 and + http://bitbucket.org/tarek/distribute/issue/18. + bootstraping ============ diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e601cc1548..fef6294215 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO +import httplib from pkg_resources import * from distutils import log from distutils.errors import DistutilsError @@ -577,13 +578,27 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url) + except ValueError, v: + msg = ' '.join([str(arg) for arg in v.args]) + if warning: + self.warn(warning, msg) + else: + raise DistutilsError('%s %s' % (url, msg)) except urllib2.HTTPError, v: return v except urllib2.URLError, v: - if warning: self.warn(warning, v.reason) + if warning: + self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) + except httplib.BadStatusLine, v: + if warning: + self.warn(warning, v.line) + else: + raise DistutilsError('%s returned a bad status line. ' + 'The server might be down, %s' % \ + (url, v.line)) def _download_url(self, scheme, url, tmpdir): # Determine download filename diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 0231eda87a..d7efe1bc18 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -18,6 +18,39 @@ def test_bad_urls(self): else: self.assert_(isinstance(v,urllib2.HTTPError)) + # issue 16 + # easy_install inquant.contentmirror.plone breaks because of a typo + # in its home URL + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) + + url = 'url:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunk' + try: + v = index.open_url(url) + except Exception, v: + self.assert_(url in str(v)) + else: + self.assert_(isinstance(v, urllib2.HTTPError)) + + def _urlopen(*args): + import httplib + raise httplib.BadStatusLine('line') + + old_urlopen = urllib2.urlopen + urllib2.urlopen = _urlopen + url = 'http://example.com' + try: + try: + v = index.open_url(url) + except Exception, v: + self.assert_('line' in str(v)) + else: + raise AssertionError('Should have raise here!') + finally: + urllib2.urlopen = old_urlopen + + def test_url_ok(self): index = setuptools.package_index.PackageIndex( hosts=('www.example.com',) From dd606e831affd2ace8bd5a276d3bcc1aa1433c11 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 28 Aug 2009 10:40:12 +0200 Subject: [PATCH 2467/8469] made zip_ok False by default #33 --HG-- branch : distribute extra : rebase_source : 593924801e8dd947c8e741f9d94e919dd0bdd2dd --- CHANGES.txt | 3 +++ setuptools/command/easy_install.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index dd2bfe3639..203618598a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ setuptools This closes http://bitbucket.org/tarek/distribute/issue/16 and http://bitbucket.org/tarek/distribute/issue/18. +* zip_ok is now True by default. This closes + http://bugs.python.org/setuptools/issue33. + bootstraping ============ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3f8a6877b7..0fa07845de 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -547,7 +547,7 @@ def should_unzip(self, dist): return True if not dist.has_metadata('zip-safe'): return True - return False + return True def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) From ae8f6226eacfce9c5519f562c750b9db7aa98bdf Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 28 Aug 2009 11:01:48 +0200 Subject: [PATCH 2468/8469] fixed #20 - catching invalid URL error from httplib --HG-- branch : distribute extra : rebase_source : 6c6a92f65f6ac2d6d071ce525d0ef3e41167d59e --- CHANGES.txt | 2 ++ setuptools/package_index.py | 2 +- setuptools/tests/test_packageindex.py | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 203618598a..b4645e0607 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,8 @@ setuptools * zip_ok is now True by default. This closes http://bugs.python.org/setuptools/issue33. +* Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. + bootstraping ============ diff --git a/setuptools/package_index.py b/setuptools/package_index.py index fef6294215..220cdec7bb 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -578,7 +578,7 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url) - except ValueError, v: + except (ValueError, httplib.InvalidURL), v: msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index d7efe1bc18..18a06de558 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -50,6 +50,12 @@ def _urlopen(*args): finally: urllib2.urlopen = old_urlopen + # issue 20 + url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' + try: + index.open_url(url) + except Exception, v: + self.assert_('nonnumeric port' in str(v)) def test_url_ok(self): index = setuptools.package_index.PackageIndex( From 89e9dfcd6d1d97f8439844a80e66c7c5a9dfaae3 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 13:12:44 +0200 Subject: [PATCH 2469/8469] easy_install Distribute now calls the setuptools fake machinery fixes #40 --HG-- branch : distribute extra : rebase_source : abcd8e82c2de583da133b160ba9e31248d5ae264 --- distribute_setup.py | 16 ++++++++++++++-- setup.py | 12 ++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index c2ef008f69..923a1e986a 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -13,6 +13,7 @@ This file can also be run as a script to install or upgrade setuptools. """ +from site import USER_SITE import sys import os import shutil @@ -162,7 +163,7 @@ def _patch_file(path, content): log.warn('Already patched.') return False log.warn('Patching...') - os.rename(path, path +'.OLD.%s' % time.time()) + _rename_path(path) f = open(path, 'w') try: f.write(content) @@ -176,6 +177,14 @@ def _same_content(path, content): def _rename_path(path): new_name = path + '.OLD.%s' % time.time() log.warn('Renaming %s into %s' % (path, new_name)) + try: + from setuptools.sandbox import DirectorySandbox + def _violation(*args): + pass + DirectorySandbox._violation = _violation + except ImportError: + pass + os.rename(path, new_name) return new_name @@ -260,8 +269,9 @@ def before_install(): fake_setuptools() def _under_prefix(location): + if 'install' not in sys.argv: + return True args = sys.argv[sys.argv.index('install')+1:] - for index, arg in enumerate(args): for option in ('--root', '--prefix'): if arg.startswith('%s=' % option): @@ -271,6 +281,8 @@ def _under_prefix(location): if len(args) > index: top_dir = args[index+1] return location.startswith(top_dir) + elif option == '--user': + return location.startswith(USER_SITE) return True def fake_setuptools(): diff --git a/setup.py b/setup.py index 10502748ba..59a3bfa297 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,14 @@ # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way -if 'install' in sys.argv[1:]: +def _being_installed(): + # easy_install marker + if (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and + sys.argv[3] == '--dist-dir'): + return True + return 'install' in sys.argv[1:] + +if _being_installed(): from distribute_setup import before_install before_install() @@ -100,7 +107,8 @@ Topic :: Utilities""".splitlines() if f.strip()], scripts = scripts, ) -if 'install' in sys.argv[1:]: + +if _being_installed(): from distribute_setup import after_install after_install(dist) From 10983835f0ad4d7df3a5bd0d6e3e7a6422cca877 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 13:17:47 +0200 Subject: [PATCH 2470/8469] added a note about #40 --HG-- branch : distribute extra : rebase_source : b7a645e678aece7467458cadeb296ff039e39020 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b4645e0607..d97bb77c1d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,9 @@ setuptools * Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. +* Fixed invalid bootstraping with easy_install installation + http://bitbucket.org/tarek/distribute/issue/40. + bootstraping ============ From af8e09cef0af66a824c0b675ab36522e72b0b388 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 15:35:39 +0200 Subject: [PATCH 2471/8469] 0.6.1 --HG-- branch : distribute extra : rebase_source : 30c5e5bb24e22d7e83ace71144562706ad1ae58c --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 344114aef8..fd4eb07961 100755 --- a/release.sh +++ b/release.sh @@ -1,6 +1,6 @@ #!/bin/sh -export VERSION="0.6" +export VERSION="0.6.1" # creating the releases rm -rf dist From 55c87e48495b5e05c4f3e985354159ea55b8d73f Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 15:37:41 +0200 Subject: [PATCH 2472/8469] the md5 hashes are made before the eggs are built --HG-- branch : distribute extra : rebase_source : e4c1f1420cf24aa2a8b12304b86f1b3d8c6a1aaf --- release.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release.sh b/release.sh index fd4eb07961..7cbaa0a2a5 100755 --- a/release.sh +++ b/release.sh @@ -5,18 +5,18 @@ export VERSION="0.6.1" # creating the releases rm -rf dist -# eggs -python2.3 setup.py -q egg_info -RDb '' bdist_egg # manual upload -python2.4 setup.py -q egg_info -RDb '' bdist_egg # manual upload -python2.5 setup.py -q egg_info -RDb '' bdist_egg register upload -python2.6 setup.py -q egg_info -RDb '' bdist_egg register upload - # updating the md5 hashes python distribute_setup.py --md5update dist/distribute-$VERSION-py2.3.egg python distribute_setup.py --md5update dist/distribute-$VERSION-py2.4.egg python distribute_setup.py --md5update dist/distribute-$VERSION-py2.5.egg python distribute_setup.py --md5update dist/distribute-$VERSION-py2.6.egg +# eggs +python2.3 setup.py -q egg_info -RDb '' bdist_egg # manual upload +python2.4 setup.py -q egg_info -RDb '' bdist_egg # manual upload +python2.5 setup.py -q egg_info -RDb '' bdist_egg register upload +python2.6 setup.py -q egg_info -RDb '' bdist_egg register upload + # now preparing the source release python2.6 setup.py -q egg_info -RDb '' sdist register upload From fab8f93ea32135cb746ae6e87922e1c9e69f57ea Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 18:08:57 +0200 Subject: [PATCH 2473/8469] no more bdist_egg release --HG-- branch : distribute extra : rebase_source : dc5bb933d711a32efee224b6d632cceb73efbdcf --- README.txt | 56 +++------------------------------------- distribute_setup.py | 62 +++------------------------------------------ release.sh | 16 ------------ 3 files changed, 7 insertions(+), 127 deletions(-) diff --git a/README.txt b/README.txt index 2a6e75dea5..0aa2746553 100755 --- a/README.txt +++ b/README.txt @@ -35,8 +35,7 @@ you start the installation of `Distribute`. Installation Instructions ------------------------- -Distribute comes in two flavors: in eggs or as a source distribution. Archives -are available at the PyPI page. +Distribute is only released as a source distribution. It can be installed using easy_install or pip, with the source tarball, with the eggs distribution, or using the ``distribute_setup.py`` script provided online. @@ -67,58 +66,11 @@ Source installation Download the source tarball, and uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.tar.gz - $ tar -xzvf distribute-0.6.tar.gz + $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1.tar.gz + $ tar -xzvf distribute-0.6.1.tar.gz $ cd distribute-0.6 $ python setup.py install -Egg installation -================ - -An Egg is a zip file with a `sh` script inserted in its head so it can be -`executed` in the shell. - -Cygwin, Linux anc Mac OS/X --------------------------- - -1. Download the appropriate egg for your version of Python (e.g. - ``distribute-0.6-py2.4.egg``). Do NOT rename it. - -2. Run it as if it were a shell script, e.g. ``sh distribute-0.6-py2.4.egg``. - Distutils will install itself using the matching version of Python (e.g. - ``python2.4``), and will place the ``easy_install`` executable in the - default location for installing Python scripts (as determined by the - standard distutils configuration files, or by the Python installation). - -If you want to install distribute to somewhere other than ``site-packages`` or -your default distutils installation locations for libraries and scripts, you -may include EasyInstall command-line options such as ``--prefix``, -``--install-dir``, and so on, following the ``.egg`` filename on the same -command line. For example:: - - sh distribute-0.6-py2.4.egg --prefix=~ - -Cygwin Note ------------ - -If you are trying to install Distribute for the **Windows** version of Python -(as opposed to the Cygwin version that lives in ``/usr/bin``), you must make -sure that an appropriate executable (``python2.3``, ``python2.4``, or -``python2.5``) is on your **Cygwin** ``PATH`` when invoking the egg. For -example, doing the following at a Cygwin bash prompt will install Distribute -for the **Windows** Python found at ``C:\\Python24``:: - - ln -s /cygdrive/c/Python24/python.exe python2.4 - PATH=.:$PATH sh distribute-0.6-py2.4.egg - rm python2.4 - -Windows -------- - -Don't install Distribute trying to execute the egg, because it's aimed to -sh-based shells. Instead, use the ``distribute_setup.py`` method, that will -download the egg for you, then install the egg. - --------------------------- Uninstallation Instructions --------------------------- @@ -179,7 +131,7 @@ Install FAQ You need in this case to build a virtualenv with the --no-site-packages option or to install `Distribute` globally. -- **How does in interacts with zc.buildout ?** +- **How does Distribute interacts with zc.buildout ?** Like virtualenv, Distribute has to be installed after setuptools. The simplest way is to add it in a `zc.recipe.egg` section so the job is done when you diff --git a/distribute_setup.py b/distribute_setup.py index 923a1e986a..85a12d8459 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -26,32 +26,9 @@ if is_jython: import subprocess -try: - from hashlib import md5 -except ImportError: - from md5 import md5 - -DEFAULT_VERSION = "0.6" +DEFAULT_VERSION = "0.6.1" DEFAULT_URL = "http://pypi.python.org/packages/%s/d/distribute/" % sys.version[:3] -md5_data = { - 'distribute-0.6-py2.3.egg': '66d06db7fc91227585f81b0b27b07bab', - 'distribute-0.6-py2.4.egg': '8fc3eb887ee98c506c38838955f9eee2', - 'distribute-0.6-py2.5.egg': 'd87f6492c53d192c62e0334859d18b59', - 'distribute-0.6-py2.6.egg': '89c46c2ed0c756dd278acc1482aa12f1', -} - -def _validate_md5(egg_name, data): - if egg_name in md5_data: - digest = md5(data).hexdigest() - if digest != md5_data[egg_name]: - print >>sys.stderr, ( - "md5 validation of %s failed! (Possible download problem?)" - % egg_name - ) - sys.exit(2) - return data - def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15 @@ -135,7 +112,7 @@ def download_setuptools( src = urllib2.urlopen(url) # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. - data = _validate_md5(egg_name, src.read()) + data = src.read() dst = open(saveto,"wb"); dst.write(data) finally: if src: src.close() @@ -425,39 +402,6 @@ def main(argv, version=DEFAULT_VERSION): print "distribute version",version,"or greater has been installed." print '(Run "distribute_setup.py -U distribute" to reinstall or upgrade.)' -def update_md5(filenames): - """Update our built-in md5 registry""" - - import re - - for name in filenames: - base = os.path.basename(name) - f = open(name,'rb') - md5_data[base] = md5(f.read()).hexdigest() - f.close() - - data = [" %r: %r,\n" % it for it in md5_data.items()] - data.sort() - repl = "".join(data) - - import inspect - srcfile = inspect.getsourcefile(sys.modules[__name__]) - f = open(srcfile, 'rb'); src = f.read(); f.close() - - match = re.search("\nmd5_data = {\n([^}]+)}", src) - if not match: - print >>sys.stderr, "Internal error!" - sys.exit(2) - - src = src[:match.start(1)] + repl + src[match.end(1):] - f = open(srcfile,'w') - f.write(src) - f.close() - - if __name__ == '__main__': - if len(sys.argv) > 2 and sys.argv[1] == '--md5update': - update_md5(sys.argv[2:]) - else: - main(sys.argv[1:]) + main(sys.argv[1:]) diff --git a/release.sh b/release.sh index 7cbaa0a2a5..992d4e268b 100755 --- a/release.sh +++ b/release.sh @@ -1,25 +1,9 @@ #!/bin/sh - export VERSION="0.6.1" # creating the releases rm -rf dist -# updating the md5 hashes -python distribute_setup.py --md5update dist/distribute-$VERSION-py2.3.egg -python distribute_setup.py --md5update dist/distribute-$VERSION-py2.4.egg -python distribute_setup.py --md5update dist/distribute-$VERSION-py2.5.egg -python distribute_setup.py --md5update dist/distribute-$VERSION-py2.6.egg - -# eggs -python2.3 setup.py -q egg_info -RDb '' bdist_egg # manual upload -python2.4 setup.py -q egg_info -RDb '' bdist_egg # manual upload -python2.5 setup.py -q egg_info -RDb '' bdist_egg register upload -python2.6 setup.py -q egg_info -RDb '' bdist_egg register upload - # now preparing the source release python2.6 setup.py -q egg_info -RDb '' sdist register upload -echo You need to commit the md5 changes - - From 81c979b40ca015e87bdad337106d0ee6a6f50083 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 18:59:02 +0200 Subject: [PATCH 2474/8469] simplifying the bootstrap process --HG-- branch : distribute extra : rebase_source : bf37715d8a5bc2c0be0867da88dbd717f716bb95 --- distribute_setup.py | 185 +++++++++----------------------------------- 1 file changed, 36 insertions(+), 149 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 85a12d8459..9b388b5717 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -26,55 +26,13 @@ if is_jython: import subprocess -DEFAULT_VERSION = "0.6.1" -DEFAULT_URL = "http://pypi.python.org/packages/%s/d/distribute/" % sys.version[:3] -def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - download_delay=15 -): - """Automatically find/download setuptools and make it available on sys.path - - `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end with - a '/'). `to_dir` is the directory where setuptools will be downloaded, if - it is not already available. If `download_delay` is specified, it should - be the number of seconds that will be paused before initiating a download, - should one be required. If an older version of setuptools is installed, - this routine will print a message to ``sys.stderr`` and raise SystemExit in - an attempt to abort the calling script. - """ - was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules - def do_download(): - egg = download_setuptools(version, download_base, to_dir, download_delay) - sys.path.insert(0, egg) - import setuptools; setuptools.bootstrap_install_from = egg - try: - import pkg_resources - if not hasattr(pkg_resources, '_distribute'): - raise ImportError - except ImportError: - return do_download() - try: - pkg_resources.require("distribute>="+version); return - except pkg_resources.VersionConflict, e: - if was_imported: - print >>sys.stderr, ( - "The required version of distribute (>=%s) is not available, and\n" - "can't be installed while this script is running. Please install\n" - " a more recent version first, using 'easy_install -U distribute'." - "\n\n(Currently using %r)" - ) % (version, e.args[0]) - sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return do_download() - except pkg_resources.DistributionNotFound: - return do_download() +DEFAULT_VERSION = "0.6.1" +#DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +DEFAULT_URL = "http://nightly.ziade.org/" def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - delay = 15 ): """Download distribute from a specified location and return its filename @@ -84,39 +42,25 @@ def download_setuptools( `delay` is the number of seconds to pause before an actual download attempt. """ import urllib2, shutil - egg_name = "distribute-%s-py%s.egg" % (version,sys.version[:3]) - url = download_base + egg_name - saveto = os.path.join(to_dir, egg_name) + tgz_name = "distribute-%s.tar.gz" % version + url = download_base + tgz_name + saveto = os.path.join(to_dir, tgz_name) src = dst = None if not os.path.exists(saveto): # Avoid repeated downloads try: from distutils import log - if delay: - log.warn(""" ---------------------------------------------------------------------------- -This script requires distribute version %s to run (even to display -help). I will attempt to download it for you (from -%s), but -you may need to enable firewall access for this script first. -I will start the download in %d seconds. - -(Note: if this machine does not have network access, please obtain the file - - %s - -and place it in this directory before rerunning this script.) ----------------------------------------------------------------------------""", - version, download_base, delay, url - ); from time import sleep; sleep(delay) log.warn("Downloading %s", url) src = urllib2.urlopen(url) # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = src.read() - dst = open(saveto,"wb"); dst.write(data) + dst = open(saveto, "wb") + dst.write(data) finally: - if src: src.close() - if dst: dst.close() + if src: + src.close() + if dst: + dst.close() return os.path.realpath(saveto) @@ -316,91 +260,34 @@ def _relaunch(): else: sys.exit(os.spawnv(os.P_WAIT, sys.executable, args)) -def _easy_install(argv, egg=None): - from setuptools import setup - from setuptools.dist import Distribution - import distutils.core - if egg is not None: - setup_args = list(argv) + [egg] - else: - setup_args = list(argv) +import tempfile +import tarfile + +def _install(tarball): + # extracting the tarball + tmpdir = tempfile.mkdtemp() + log.warn('Extracting in %s' % tmpdir) + old_wd = os.getcwd() try: - return setup(script_args = ['-q','easy_install', - '-v'] + setup_args, - script_name = sys.argv[0] or 'easy_install', - distclass=Distribution) - except DistutilsError: - return sys.exit(2) + os.chdir(tmpdir) + tar = tarfile.open(tarball) + tar.extractall() + tar.close() + + # going in the directory + subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) + os.chdir(subdir) + log.warn('Now working in %s' % subdir) + + # installing distribute + os.system('%s setup.py install' % sys.executable) + finally: + os.chdir(old_wd) def main(argv, version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" - # let's deactivate any existing setuptools installation first - fake_setuptools() - try: - import setuptools - # we need to check if the installed setuptools - # is from Distribute or from setuptools - if not hasattr(setuptools, '_distribute'): - # now we are ready to install distribute - raise ImportError - except ImportError: - egg = None - try: - egg = download_setuptools(version, delay=0) - sys.path.insert(0, egg) - import setuptools - if not hasattr(setuptools, '_distribute'): - placeholder = os.path.split(os.path.dirname(setuptools.__file__))[0] - if not placeholder.endswith('.egg'): - res = _remove_flat_installation(placeholder) - if res: - _relaunch() - print >> sys.stderr, ( - "The patch didn't work, Setuptools is still active.\n" - "Possible reason: your have a system-wide setuptools installed " - "and you are in a virtualenv.\n" - "If you are inside a virtualenv, make sure you used the --no-site-packages option" - ) - sys.exit(2) - dist = _easy_install(argv, egg) - after_install(dist) - return - #from setuptools.command import easy_install - #try: - # return easy_install.main(list(argv)+['-v']+[egg]) - #except DistutilsError: - # return sys.exit(2) - finally: - if egg and os.path.exists(egg): - os.unlink(egg) - else: - if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( - "You have an obsolete version of setuptools installed. Please\n" - "remove it from your system entirely before rerunning this script." - ) - sys.exit(2) - - req = "distribute>="+version - import pkg_resources - try: - pkg_resources.require(req) - except pkg_resources.VersionConflict: - try: - _easy_install(argv, [download_setuptools(delay=0)]) - #from setuptools.command.easy_install import main - except ImportError: - from easy_install import main - main(list(argv)+[download_setuptools(delay=0)]) - sys.exit(0) # try to force an exit - else: - if argv: - _easy_install(argv) - #from setuptools.command.easy_install import main - #main(argv) - else: - print "distribute version",version,"or greater has been installed." - print '(Run "distribute_setup.py -U distribute" to reinstall or upgrade.)' + tarball = download_setuptools() + _install(tarball) if __name__ == '__main__': main(sys.argv[1:]) From 321880f989c67fe471e2736f7be5517a098120c5 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 22:41:46 +0200 Subject: [PATCH 2475/8469] removed buildout --HG-- branch : distribute extra : rebase_source : 750c19c71792d672e51c503ca0b6654bfd1624ff --- CHANGES.txt | 5 + MANIFEST.in | 1 - buildout/bootstrap.py | 228 ------------------------------------------ 3 files changed, 5 insertions(+), 229 deletions(-) delete mode 100644 buildout/bootstrap.py diff --git a/CHANGES.txt b/CHANGES.txt index d97bb77c1d..3465828cb7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,11 @@ setuptools * Fixed invalid bootstraping with easy_install installation http://bitbucket.org/tarek/distribute/issue/40. + Thanks to Florian Shchulze for the help. + +* Removed buildout/bootstrap.py. A new repository will create a specific + bootstrap.py script. + bootstraping ============ diff --git a/MANIFEST.in b/MANIFEST.in index a2439ccd0c..c546d1ea98 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,6 @@ recursive-include setuptools *.py *.txt *.exe recursive-include tests *.py *.c *.pyx recursive-include docs *.py *.txt Makefile -recursive-include buildout *.py include *.py include *.txt include MANIFEST.in diff --git a/buildout/bootstrap.py b/buildout/bootstrap.py deleted file mode 100644 index d1e6938107..0000000000 --- a/buildout/bootstrap.py +++ /dev/null @@ -1,228 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. - -$Id$ -""" - -import os, shutil, sys, tempfile, urllib2 - -tmpeggs = tempfile.mkdtemp() - -is_jython = sys.platform.startswith('java') - -to_reload = False -try: - import pkg_resources - if not hasattr(pkg_resources, '_distribute'): - to_reload = True - raise ImportError -except ImportError: - ez = {} - exec urllib2.urlopen('http://nightly.ziade.org/distribute_setup.py' - ).read() in ez - ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) - if to_reload: - reload(pkg_resources) - else: - import pkg_resources - -if sys.platform == 'win32': - def quote(c): - if ' ' in c: - return '"%s"' % c # work around spawn lamosity on windows - else: - return c -else: - def quote (c): - return c - -cmd = 'from setuptools.command.easy_install import main; main()' -ws = pkg_resources.working_set - -if len(sys.argv) > 2 and sys.argv[1] == '--version': - VERSION = '==%s' % sys.argv[2] - args = sys.argv[3:] + ['bootstrap'] -else: - VERSION = '' - args = sys.argv[1:] + ['bootstrap'] - -if is_jython: - import subprocess - - assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', - quote(tmpeggs), 'zc.buildout' + VERSION], - env=dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('setuptools')).location - ), - ).wait() == 0 - assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', - quote(tmpeggs), 'zc.buildout' + VERSION], - env=dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('distribute')).location - ), - ).wait() == 0 - -else: - assert os.spawnle( - os.P_WAIT, sys.executable, quote (sys.executable), - '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION, - dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('setuptools')).location - ), - ) == 0 - assert os.spawnle( - os.P_WAIT, sys.executable, quote (sys.executable), - '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION, - dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('distribute')).location - ), - ) == 0 - -ws.add_entry(tmpeggs) -ws.require('zc.buildout' + VERSION) - -# patching zc.buildout.buildout so it uses distribute -from zc.buildout import buildout as zc_buildout -import zc.buildout -import pkg_resources - -def _bootstrap(self, args): - import pkg_resources - __doing__ = 'Bootstraping.' - self._setup_directories() - # Now copy buildout, distribute and setuptools eggs, and record destination eggs: - entries = [] - for name in 'setuptools', 'distribute', 'zc.buildout': - r = pkg_resources.Requirement.parse(name) - dist = pkg_resources.working_set.find(r) - if dist.precedence == pkg_resources.DEVELOP_DIST: - dest = os.path.join(self['buildout']['develop-eggs-directory'], - name+'.egg-link') - open(dest, 'w').write(dist.location) - entries.append(dist.location) - else: - dest = os.path.join(self['buildout']['eggs-directory'], - os.path.basename(dist.location)) - entries.append(dest) - if not os.path.exists(dest): - if os.path.isdir(dist.location): - shutil.copytree(dist.location, dest) - else: - shutil.copy2(dist.location, dest) - - # Create buildout script - ws = pkg_resources.WorkingSet(entries) - ws.require('zc.buildout') - zc.buildout.easy_install.scripts( - ['zc.buildout'], ws, sys.executable, - self['buildout']['bin-directory']) - -zc_buildout.Buildout.bootstrap = _bootstrap - -zc_buildout.pkg_resources_loc = pkg_resources.working_set.find( - pkg_resources.Requirement.parse('setuptools')).location - -realpath = zc.buildout.easy_install.realpath - -def _maybe_upgrade(self): - __doing__ = 'Checking for upgrades.' - if not self.newest: - return - ws = zc.buildout.easy_install.install( - [ - (spec + ' ' + self['buildout'].get(spec+'-version', '')).strip() - for spec in ('zc.buildout', 'setuptools') - ], - self['buildout']['eggs-directory'], - links = self['buildout'].get('find-links', '').split(), - index = self['buildout'].get('index'), - path = [self['buildout']['develop-eggs-directory']], - allow_hosts = self._allow_hosts - ) - - upgraded = [] - for project in 'zc.buildout', 'distribute': - req = pkg_resources.Requirement.parse(project) - if ws.find(req) != pkg_resources.working_set.find(req): - upgraded.append(ws.find(req)) - - if not upgraded: - return - - __doing__ = 'Upgrading.' - - should_run = realpath( - os.path.join(os.path.abspath(self['buildout']['bin-directory']), - 'buildout') - ) - if sys.platform == 'win32': - should_run += '-script.py' - - if (realpath(os.path.abspath(sys.argv[0])) != should_run): - self._logger.debug("Running %r.", realpath(sys.argv[0])) - self._logger.debug("Local buildout is %r.", should_run) - self._logger.warn("Not upgrading because not running a local " - "buildout command.") - return - - if sys.platform == 'win32' and not self.__windows_restart: - args = map(zc.buildout.easy_install._safe_arg, sys.argv) - args.insert(1, '-W') - if not __debug__: - args.insert(0, '-O') - args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable)) - os.execv(sys.executable, args) - - self._logger.info("Upgraded:\n %s;\nrestarting.", - ",\n ".join([("%s version %s" - % (dist.project_name, dist.version) - ) - for dist in upgraded - ] - ), - ) - - # the new dist is different, so we've upgraded. - # Update the scripts and return True - zc.buildout.easy_install.scripts( - ['zc.buildout'], ws, sys.executable, - self['buildout']['bin-directory'], - ) - - # Restart - args = map(zc.buildout.easy_install._safe_arg, sys.argv) - if not __debug__: - args.insert(0, '-O') - args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable)) - - if is_jython: - sys.exit(subprocess.Popen([sys.executable] + list(args)).wait()) - else: - sys.exit(os.spawnv(os.P_WAIT, sys.executable, args)) - -zc_buildout.Buildout._maybe_upgrade = _maybe_upgrade - -# now calling the bootstrap process as usual -zc_buildout.main(args) -shutil.rmtree(tmpeggs) - From e1b49ceae4787252de524b4c5210331be526c2cb Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 22:44:01 +0200 Subject: [PATCH 2476/8469] now with 2.4 support for tarfile --HG-- branch : distribute extra : rebase_source : 0c0159d0868dc3b1f7b68b3d748ef33551075627 --- distribute_setup.py | 49 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 9b388b5717..8f67829e2f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -16,11 +16,9 @@ from site import USER_SITE import sys import os -import shutil import time import fnmatch from distutils import log -from distutils.errors import DistutilsError is_jython = sys.platform.startswith('java') if is_jython: @@ -28,8 +26,7 @@ DEFAULT_VERSION = "0.6.1" -#DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" -DEFAULT_URL = "http://nightly.ziade.org/" +DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, @@ -41,7 +38,7 @@ def download_setuptools( with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. """ - import urllib2, shutil + import urllib2 tgz_name = "distribute-%s.tar.gz" % version url = download_base + tgz_name saveto = os.path.join(to_dir, tgz_name) @@ -263,6 +260,46 @@ def _relaunch(): import tempfile import tarfile +def extractall(self, path=".", members=None): + """Extract all members from the archive to the current working + directory and set owner, modification time and permissions on + directories afterwards. `path' specifies a different directory + to extract to. `members' is optional and must be a subset of the + list returned by getmembers(). + """ + import copy + import operator + from tarfile import ExtractError + directories = [] + + if members is None: + members = self + + for tarinfo in members: + if tarinfo.isdir(): + # Extract directories with a safe mode. + directories.append(tarinfo) + tarinfo = copy.copy(tarinfo) + tarinfo.mode = 0700 + self.extract(tarinfo, path) + + # Reverse sort directories. + directories.sort(key=operator.attrgetter('name')) + directories.reverse() + + # Set correct owner, mtime and filemode on directories. + for tarinfo in directories: + dirpath = os.path.join(path, tarinfo.name) + try: + self.chown(tarinfo, dirpath) + self.utime(tarinfo, dirpath) + self.chmod(tarinfo, dirpath) + except ExtractError, e: + if self.errorlevel > 1: + raise + else: + self._dbg(1, "tarfile: %s" % e) + def _install(tarball): # extracting the tarball tmpdir = tempfile.mkdtemp() @@ -271,7 +308,7 @@ def _install(tarball): try: os.chdir(tmpdir) tar = tarfile.open(tarball) - tar.extractall() + extractall(tar) tar.close() # going in the directory From cc278c1c8c13c02cb4d1675980160116656ed729 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 22:47:57 +0200 Subject: [PATCH 2477/8469] Added tag 0.6.1 for changeset 4d114c5f2a3e --HG-- branch : distribute extra : rebase_source : a5db5cf43c2fc780b7c44d40da20d9928f751df0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 62272cce6b..ff5a2353b8 100644 --- a/.hgtags +++ b/.hgtags @@ -1 +1,2 @@ 1010d08fd8dfd2f1496843b557b5369a0beba82a 0.6 +4d114c5f2a3ecb4a0fa552075dbbb221b19e291b 0.6.1 From d84216b635ebdf215e3dfc5b8a6df2861a151f25 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 22:50:40 +0200 Subject: [PATCH 2478/8469] starting 0.6.2 --HG-- branch : distribute extra : rebase_source : de67d8e28de624925d10501b025f046075d84114 --- CHANGES.txt | 5 +++++ README.txt | 6 +++--- release.sh | 2 +- setup.py | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3465828cb7..cff23b9c81 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,11 @@ CHANGES ======= +----- +0.6.2 +----- + + ----- 0.6.1 ----- diff --git a/README.txt b/README.txt index 0aa2746553..7adc47d888 100755 --- a/README.txt +++ b/README.txt @@ -66,9 +66,9 @@ Source installation Download the source tarball, and uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1.tar.gz - $ tar -xzvf distribute-0.6.1.tar.gz - $ cd distribute-0.6 + $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.2.tar.gz + $ tar -xzvf distribute-0.6.2.tar.gz + $ cd distribute-0.6.2 $ python setup.py install --------------------------- diff --git a/release.sh b/release.sh index 992d4e268b..0bd65efef9 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.1" +export VERSION="0.6.2" # creating the releases rm -rf dist diff --git a/setup.py b/setup.py index 59a3bfa297..9ef640de7d 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.1" +VERSION = "0.6.2" from setuptools import setup, find_packages import sys From 7a5b40fd7a6ffc4edff0d3aafacab5dad57384e7 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 22:53:10 +0200 Subject: [PATCH 2479/8469] added the scp to the release process --HG-- branch : distribute extra : rebase_source : b2c00661e65ae5afb94832143b2b27cdd7b20949 --- release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.sh b/release.sh index 0bd65efef9..6af72616b8 100755 --- a/release.sh +++ b/release.sh @@ -7,3 +7,6 @@ rm -rf dist # now preparing the source release python2.6 setup.py -q egg_info -RDb '' sdist register upload +# pushin the bootstrap script +scp distribute_setup.py ziade.org:nightly/build/ + From 03f3942553e39b62ae308784542eaf0b1427c0dd Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 8 Sep 2009 23:30:09 +0200 Subject: [PATCH 2480/8469] typo --HG-- branch : distribute extra : rebase_source : e532131d277db59590063100d2fed06f87248bc3 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index cff23b9c81..a82857b303 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,7 +25,7 @@ setuptools * Fixed invalid bootstraping with easy_install installation http://bitbucket.org/tarek/distribute/issue/40. - Thanks to Florian Shchulze for the help. + Thanks to Florian Schulze for the help. * Removed buildout/bootstrap.py. A new repository will create a specific bootstrap.py script. From efd119a512592c664043e9d66c2b311690bbe55b Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 9 Sep 2009 01:34:00 +0200 Subject: [PATCH 2481/8469] don't user USER_SITE on py < 2.6 --HG-- branch : distribute extra : rebase_source : caefe0a6171f53554178be6599aac67c4569e730 --- distribute_setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 8f67829e2f..a57fd2a8d1 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -13,7 +13,11 @@ This file can also be run as a script to install or upgrade setuptools. """ -from site import USER_SITE +try: + from site import USER_SITE +except ImportError: + USER_SITE = None + import sys import os import time @@ -199,7 +203,7 @@ def _under_prefix(location): if len(args) > index: top_dir = args[index+1] return location.startswith(top_dir) - elif option == '--user': + elif option == '--user' and USER_SITE is not None: return location.startswith(USER_SITE) return True From 0310beaafd54123056a2af0ae52c1aad81e9cf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 9 Sep 2009 08:14:20 +0000 Subject: [PATCH 2482/8469] Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler --- tests/test_unixccompiler.py | 18 +++++++++++++++++- unixccompiler.py | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 96f5454e3e..1b7dd4cd64 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -36,7 +36,23 @@ def test_runtime_libdir_option(self): # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' diff --git a/unixccompiler.py b/unixccompiler.py index 129ac8cf11..2083f82982 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -285,7 +285,9 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": From 8137c6cfbb6449e5d89705b91f44f6d31e99b39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 9 Sep 2009 08:34:06 +0000 Subject: [PATCH 2483/8469] Merged revisions 74728 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ --- unixccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 045368a925..7556cbdbf5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -284,7 +284,9 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": From 031ebb0fc2345b84cefb440c6cc83264cc9bd79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 9 Sep 2009 08:48:07 +0000 Subject: [PATCH 2484/8469] Merged revisions 74728 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ --- tests/test_unixccompiler.py | 18 +++++++++++++++++- unixccompiler.py | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 96f5454e3e..1b7dd4cd64 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -36,7 +36,23 @@ def test_runtime_libdir_option(self): # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' diff --git a/unixccompiler.py b/unixccompiler.py index 26d2856ad4..da85c89696 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -283,7 +283,9 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": From 2bf23a8289d1d71e4ab874a28812cecab3dd8604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 9 Sep 2009 09:07:13 +0000 Subject: [PATCH 2485/8469] Merged revisions 74730 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74730 | tarek.ziade | 2009-09-09 10:48:07 +0200 (Wed, 09 Sep 2009) | 9 lines Merged revisions 74728 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ ................ --- tests/test_unixccompiler.py | 18 +++++++++++++++++- unixccompiler.py | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 94e9edfc09..be2df5c6e3 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -36,7 +36,23 @@ def test_runtime_libdir_option(self): # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' diff --git a/unixccompiler.py b/unixccompiler.py index c11544d828..8bbdb4b329 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -283,7 +283,9 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] else: From bf6e05c74f29186165399ec4cd7939345c01154c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 9 Sep 2009 11:39:41 +0000 Subject: [PATCH 2486/8469] removed unecessary lines for clarity and added a the same test than in trunk for the inplace --- command/build_ext.py | 3 --- tests/test_build_ext.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index db82f1d0d6..a3e3982f6d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -642,9 +642,6 @@ def get_ext_fullpath(self, ext_name): # the inplace option requires to find the package directory # using the build_py command for that package = '.'.join(modpath[0:-1]) - modpath = fullname.split('.') - package = '.'.join(modpath[0:-1]) - base = modpath[-1] build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 153c875644..d8d3667751 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -329,6 +329,19 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From b863dd62d8defc800fcbff6fa07eb73d4351acb9 Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 10 Sep 2009 05:44:09 +0200 Subject: [PATCH 2487/8469] including txt files as well in tests --HG-- branch : distribute extra : rebase_source : 2d089514496c2b2b0d5246a7d1635560ffe5925f --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index c546d1ea98..b678dac4c9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ recursive-include setuptools *.py *.txt *.exe -recursive-include tests *.py *.c *.pyx +recursive-include tests *.py *.c *.pyx *.txt recursive-include docs *.py *.txt Makefile include *.py include *.txt From 364308e9ce78818d74e88987459e3c08f8e80d11 Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 10 Sep 2009 20:57:46 +0200 Subject: [PATCH 2488/8469] reintroduced use_setuptools in distribute_setup.py --HG-- branch : distribute extra : rebase_source : 3f0d0f085964feffdb07e97f25d508b7aaa88ffb --- distribute_setup.py | 129 ++++++++++++++++++++++++++------- tests/test_distribute_setup.py | 61 ++++++++++++++++ 2 files changed, 164 insertions(+), 26 deletions(-) create mode 100644 tests/test_distribute_setup.py diff --git a/distribute_setup.py b/distribute_setup.py index a57fd2a8d1..83b56d4d23 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -23,17 +23,115 @@ import time import fnmatch from distutils import log +import subprocess -is_jython = sys.platform.startswith('java') -if is_jython: - import subprocess +IS_JYTHON = sys.platform.startswith('java') +DEFAULT_VERSION = "0.6.2" +DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +def quote(c): + if sys.platform == 'win32': + if ' ' in c: + return '"%s"' % c + return c -DEFAULT_VERSION = "0.6.1" -DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +def python_cmd(cmd): + python = quote(sys.executable) + cmd = quote(cmd) + if IS_JYTHON: + return subprocess.Popen([python, cmd]).wait() == 0 + args = [os.P_WAIT, python, python] + cmd.split() + [os.environ] + return os.spawnle(*args) == 0 + +def _install(tarball): + # extracting the tarball + tmpdir = tempfile.mkdtemp() + log.warn('Extracting in %s' % tmpdir) + old_wd = os.getcwd() + try: + os.chdir(tmpdir) + tar = tarfile.open(tarball) + extractall(tar) + tar.close() + + # going in the directory + subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) + os.chdir(subdir) + log.warn('Now working in %s' % subdir) + + # installing + assert python_cmd('setup.py -q install') + finally: + os.chdir(old_wd) + +def _build_egg(tarball, to_dir=os.curdir): + # extracting the tarball + tmpdir = tempfile.mkdtemp() + log.warn('Extracting in %s' % tmpdir) + old_wd = os.getcwd() + try: + os.chdir(tmpdir) + tar = tarfile.open(tarball) + extractall(tar) + tar.close() + + # going in the directory + subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) + os.chdir(subdir) + log.warn('Now working in %s' % subdir) + + # building an egg + python_cmd('setup.py -v -q bdist_egg --dist-dir %s' % to_dir) + + # returning the result + for file in os.listdir(to_dir): + if fnmatch.fnmatch(file, 'distribute-%s*.egg' % DEFAULT_VERSION): + return os.path.join(to_dir, file) + + raise IOError('Could not build the egg.') + finally: + os.chdir(old_wd) + +def _do_download(version=DEFAULT_VERSION, download_base=DEFAULT_URL, + to_dir=os.curdir, download_delay=15): + tarball = download_setuptools(version, download_base, + to_dir, download_delay) + egg = _build_egg(tarball, to_dir) + sys.path.insert(0, egg) + import setuptools + setuptools.bootstrap_install_from = egg + +def use_setuptools( + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, + download_delay=15 +): + was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules + try: + import pkg_resources + if not hasattr(pkg_resources, '_distribute'): + raise ImportError + except ImportError: + return _do_download(version, download_base, to_dir, download_delay) + try: + pkg_resources.require("distribute>="+version); return + except pkg_resources.VersionConflict, e: + if was_imported: + print >>sys.stderr, ( + "The required version of distribute (>=%s) is not available, and\n" + "can't be installed while this script is running. Please install\n" + " a more recent version first, using 'easy_install -U distribute'." + "\n\n(Currently using %r)" + ) % (version, e.args[0]) + sys.exit(2) + else: + del pkg_resources, sys.modules['pkg_resources'] # reload ok + return _do_download(version, download_base, to_dir, download_delay) + except pkg_resources.DistributionNotFound: + return _do_download(version, download_base, to_dir, download_delay) def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, + delay=15, ): """Download distribute from a specified location and return its filename @@ -304,27 +402,6 @@ def extractall(self, path=".", members=None): else: self._dbg(1, "tarfile: %s" % e) -def _install(tarball): - # extracting the tarball - tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s' % tmpdir) - old_wd = os.getcwd() - try: - os.chdir(tmpdir) - tar = tarfile.open(tarball) - extractall(tar) - tar.close() - - # going in the directory - subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) - os.chdir(subdir) - log.warn('Now working in %s' % subdir) - - # installing distribute - os.system('%s setup.py install' % sys.executable) - finally: - os.chdir(old_wd) - def main(argv, version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" tarball = download_setuptools() diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py new file mode 100644 index 0000000000..6c004bd7b7 --- /dev/null +++ b/tests/test_distribute_setup.py @@ -0,0 +1,61 @@ +import sys +import os +import tempfile +import unittest +import shutil +import copy + +CURDIR = os.path.abspath(os.path.dirname(__file__)) +TOPDIR = os.path.split(CURDIR)[0] +sys.path.insert(0, TOPDIR) + +from distribute_setup import (use_setuptools, _build_egg, python_cmd, + _do_download, _install) +import distribute_setup + +class TestSetup(unittest.TestCase): + + def urlopen(self, url): + return open(self.tarball) + + def setUp(self): + self.old_sys_path = copy.copy(sys.path) + self.cwd = os.getcwd() + self.tmpdir = tempfile.mkdtemp() + os.chdir(TOPDIR) + python_cmd("setup.py -q egg_info -RDb '' sdist --dist-dir %s" % \ + self.tmpdir) + tarball = os.listdir(self.tmpdir)[0] + self.tarball = os.path.join(self.tmpdir, tarball) + import urllib2 + urllib2.urlopen = self.urlopen + + def tearDown(self): + shutil.rmtree(self.tmpdir) + os.chdir(self.cwd) + sys.path = copy.copy(self.old_sys_path) + + def test_build_egg(self): + # making it an egg + egg = _build_egg(self.tarball, self.tmpdir) + + # now trying to import it + sys.path[0] = egg + import setuptools + self.assert_(setuptools.__file__.startswith(egg)) + + def test_do_download(self): + + tmpdir = tempfile.mkdtemp() + _do_download(to_dir=tmpdir) + import setuptools + self.assert_(setuptools.bootstrap_install_from.startswith(tmpdir)) + + def test_install(self): + def _faked(*args): + return True + distribute_setup.python_cmd = _faked + _install(self.tarball) + +if __name__ == '__main__': + unittest.main() From 299a9d2f356de19fc6df0952655c79817aa2c1b1 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 11 Sep 2009 18:29:31 +0200 Subject: [PATCH 2489/8469] better marker for easy_install detection --HG-- branch : distribute extra : rebase_source : 2119ce08a6104dd1269137a28044684db358d402 --- distribute_setup.py | 8 +++++--- setup.py | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 83b56d4d23..060795eec7 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -26,7 +26,7 @@ import subprocess IS_JYTHON = sys.platform.startswith('java') -DEFAULT_VERSION = "0.6.2" +DEFAULT_VERSION = "0.6.1" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" def quote(c): @@ -60,7 +60,8 @@ def _install(tarball): log.warn('Now working in %s' % subdir) # installing - assert python_cmd('setup.py -q install') + log.warn('Installing Distribute') + assert python_cmd('setup.py install') finally: os.chdir(old_wd) @@ -81,7 +82,8 @@ def _build_egg(tarball, to_dir=os.curdir): log.warn('Now working in %s' % subdir) # building an egg - python_cmd('setup.py -v -q bdist_egg --dist-dir %s' % to_dir) + log.warn('Building a Distribute egg in %s' % to_dir) + python_cmd('setup.py -q bdist_egg --dist-dir %s' % to_dir) # returning the result for file in os.listdir(to_dir): diff --git a/setup.py b/setup.py index 9ef640de7d..da9b519a17 100755 --- a/setup.py +++ b/setup.py @@ -16,12 +16,13 @@ # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way +def _easy_install_marker(): + return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and + sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1]) + def _being_installed(): # easy_install marker - if (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and - sys.argv[3] == '--dist-dir'): - return True - return 'install' in sys.argv[1:] + return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): from distribute_setup import before_install From 6badc540234386ca7a27d3c90b22c565472475f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 22:46:00 +0200 Subject: [PATCH 2490/8469] Add sdist3 command. --HG-- branch : distribute extra : rebase_source : 47f2fee9a8361cabc8160df8dd30dacc67f0f42b --- distribute.egg-info/entry_points.txt | 5 ++-- setuptools/command/__init__.py | 2 +- setuptools/command/sdist3.py | 34 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 setuptools/command/sdist3.py diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index d69118d9ae..49763a6394 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,5 +1,6 @@ [distutils.commands] bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_scripts = setuptools.command.install_scripts:install_scripts rotate = setuptools.command.rotate:rotate develop = setuptools.command.develop:develop setopt = setuptools.command.setopt:setopt @@ -10,11 +11,11 @@ register = setuptools.command.register:register install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts +test = setuptools.command.test:test bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst bdist_egg = setuptools.command.bdist_egg:bdist_egg install = setuptools.command.install:install -test = setuptools.command.test:test +sdist3 = setuptools.command.sdist3:sdist3 install_lib = setuptools.command.install_lib:install_lib build_ext = setuptools.command.build_ext:build_ext sdist = setuptools.command.sdist:sdist diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index f898822bb1..8f5ba21cd4 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -1,7 +1,7 @@ __all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', - 'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', + 'sdist', 'sdist3', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', ] diff --git a/setuptools/command/sdist3.py b/setuptools/command/sdist3.py new file mode 100644 index 0000000000..4fbfa8dba7 --- /dev/null +++ b/setuptools/command/sdist3.py @@ -0,0 +1,34 @@ +from distutils import log +from sdist import sdist +from lib2to3.refactor import RefactoringTool, get_fixers_from_package + + +class _RefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): + log.error(msg, *args) + + def log_message(self, msg, *args): + log.info(msg, *args) + + def log_debug(self, msg, *args): + log.debug(msg, *args) + + +class sdist3(sdist): + description = "sdist version that runs 2to3 on all sources before packaging" + fixer_names = None + + def copy_file(self, file, dest, link=None): + # We ignore the link parameter, always demanding a copy, so that + # 2to3 won't overwrite the original file. + sdist.copy_file(self, file, dest) + + def make_release_tree(self, base_dir, files): + sdist.make_release_tree(self, base_dir, files) + + # run 2to3 on all files + fixer_names = self.fixer_names + if fixer_names is None: + fixer_names = get_fixers_from_package('lib2to3.fixes') + r = _RefactoringTool(fixer_names) + r.refactor([f for f in files if f.endswith(".py")], write=True) From 7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:23:25 +0200 Subject: [PATCH 2491/8469] Use types.ModuleType instead of new.module. --HG-- branch : distribute extra : rebase_source : 3327441a867ad2878553ed1d42418a7e68ee3067 --- pkg_resources.py | 4 ++-- setuptools/command/install_egg_info.py | 4 ++-- setuptools/tests/doctest.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index c636903c96..5a46487015 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,7 @@ method. """ -import sys, os, zipimport, time, re, imp, new +import sys, os, zipimport, time, re, imp, types try: frozenset @@ -1707,7 +1707,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = new.module(packageName) + module = sys.modules[packageName] = types.ModuleType(packageName) module.__path__ = []; _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 939340c503..00c8122114 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -97,12 +97,12 @@ def install_namespaces(self): % ('.'.join(pth[:-1]), pth[-1]) ) f.write( - "import sys,new,os; " + "import sys,types,os; " "p = os.path.join(sys._getframe(1).f_locals['sitedir'], " "*%(pth)r); " "ie = os.path.exists(os.path.join(p,'__init__.py')); " "m = not ie and " - "sys.modules.setdefault(%(pkg)r,new.module(%(pkg)r)); " + "sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); " "mp = (m or []) and m.__dict__.setdefault('__path__',[]); " "(p not in mp) and mp.append(p)%(trailer)s" % locals() diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index bffce58f4c..be399a9d22 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -2053,16 +2053,16 @@ def rundoc(self, object, name=None, module=None): return (f,t) def rundict(self, d, name, module=None): - import new - m = new.module(name) + import types + m = types.ModuleType(name) m.__dict__.update(d) if module is None: module = False return self.rundoc(m, name, module) def run__test__(self, d, name): - import new - m = new.module(name) + import types + m = types.ModuleType(name) m.__test__ = d return self.rundoc(m, name) From a6ab02d1e5737b09f2f3ea5df184a2bf33e8dba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:46:51 +0200 Subject: [PATCH 2492/8469] Open _get streams in binary mode. --HG-- branch : distribute extra : rebase_source : 81baa71c46d64e1d3431bae843a04f163976bf8f --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5a46487015..91af57defc 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1239,7 +1239,7 @@ def get_resource_stream(self, manager, resource_name): return open(self._fn(self.module_path, resource_name), 'rb') def _get(self, path): - stream = open(path, 'rb') + stream = open(path, 'rU') try: return stream.read() finally: From c4ea358c7cdcd76dc9bf35b54e22cc9be05dc62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:47:38 +0200 Subject: [PATCH 2493/8469] Correct path names for fixed files. --HG-- branch : distribute extra : rebase_source : d5bd9c6fdb8cf2208eca9e0e5f37cb7fea1d14a5 --- setuptools/command/sdist3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/sdist3.py b/setuptools/command/sdist3.py index 4fbfa8dba7..fc7ebb9788 100644 --- a/setuptools/command/sdist3.py +++ b/setuptools/command/sdist3.py @@ -1,3 +1,4 @@ +import os from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package @@ -31,4 +32,4 @@ def make_release_tree(self, base_dir, files): if fixer_names is None: fixer_names = get_fixers_from_package('lib2to3.fixes') r = _RefactoringTool(fixer_names) - r.refactor([f for f in files if f.endswith(".py")], write=True) + r.refactor([os.path.join(base_dir, f) for f in files if f.endswith(".py")], write=True) From c8fafe39c39a6814741b3f2825320c565c02058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:48:25 +0200 Subject: [PATCH 2494/8469] Work around apparent 3.x limitation wrt. variables in list comprehensions. --HG-- branch : distribute extra : rebase_source : 214eb64288ef1955fd06ba1cf594b6a780cccde8 --- setuptools/command/install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index a150c43505..247c4f259c 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -18,9 +18,6 @@ class install(_install): ('install_scripts', lambda self: True), ] _nc = dict(new_commands) - sub_commands = [ - cmd for cmd in _install.sub_commands if cmd[0] not in _nc - ] + new_commands def initialize_options(self): _install.initialize_options(self) @@ -104,6 +101,10 @@ def do_egg_install(self): cmd.run() setuptools.bootstrap_install_from = None +# XXX Python 3.1 doesn't see _nc if this is inside the class +install.sub_commands = [ + cmd for cmd in _install.sub_commands if cmd[0] not in install._nc + ] + install.new_commands From 6f3378c098a481588f5ec5813060376351e5a576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:49:34 +0200 Subject: [PATCH 2495/8469] Shortcut User-agent computation, as 2to3 won't update urllib2.__version__ correctly. --HG-- branch : distribute extra : rebase_source : 9035aa6fb13225181f7ce22429efa91c771247a6 --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 220cdec7bb..48494aff21 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -143,7 +143,7 @@ def find_external_links(url, page): yield urlparse.urljoin(url, htmldecode(match.group(1))) user_agent = "Python-urllib/%s distribute/%s" % ( - urllib2.__version__, require('distribute')[0].version + sys.version[:3], require('distribute')[0].version ) From 96c97c7b38ffe815a6f1cc6e76fea1d627610d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 11 Sep 2009 23:50:28 +0200 Subject: [PATCH 2496/8469] Conditionalize _file processing. --HG-- branch : distribute extra : rebase_source : fd07ce0e0541a269a88596e985884f688c86185e --- setuptools/sandbox.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 11c14938c6..67cedde6f0 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,6 +1,9 @@ import os, sys, __builtin__, tempfile, operator _os = sys.modules[os.name] -_file = file +try: + _file = file +except NameError: + _file = None _open = open from distutils.errors import DistutilsError __all__ = [ @@ -60,13 +63,15 @@ def run(self, func): """Run 'func' under os sandboxing""" try: self._copy(self) - __builtin__.file = self._file + if _file: + __builtin__.file = self._file __builtin__.open = self._open self._active = True return func() finally: self._active = False - __builtin__.file = _file + if _file: + __builtin__.file = _file __builtin__.open = _open self._copy(_os) @@ -92,7 +97,8 @@ def wrap(self,path,*args,**kw): return original(path,*args,**kw) return wrap - _file = _mk_single_path_wrapper('file', _file) + if _file: + _file = _mk_single_path_wrapper('file', _file) _open = _mk_single_path_wrapper('open', _open) for name in [ "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir", From 4fba5767d7d1d844ba0c27d0e3bb0931b621d8bd Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Sep 2009 09:06:05 +0200 Subject: [PATCH 2497/8469] next version is 0.6.2 --HG-- branch : distribute extra : rebase_source : 211d56770b60fcb1f69b75b25472440e814106c3 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 060795eec7..e554c9cbb3 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -26,7 +26,7 @@ import subprocess IS_JYTHON = sys.platform.startswith('java') -DEFAULT_VERSION = "0.6.1" +DEFAULT_VERSION = "0.6.2" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" def quote(c): From 41854a0e9535b9142811e7815937d15c1a7c5b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 12:36:46 +0200 Subject: [PATCH 2498/8469] Add src_root attribute to support installing from a copy. --HG-- branch : distribute extra : rebase_source : 95242b20ab228862aeef205f399869f79e342f0e --- setuptools/command/build_py.py | 8 +++++--- setuptools/dist.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 79570bc2e4..3fce7693e2 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -157,9 +157,11 @@ def initialize_options(self): _build_py.initialize_options(self) - - - + def get_package_dir(self, package): + res = _build_py.get_package_dir(self, package) + if self.distribution.src_root is not None: + return os.path.join(self.distribution.src_root, res) + return res def exclude_data_files(self, package, src_dir, files): diff --git a/setuptools/dist.py b/setuptools/dist.py index 30ff35e320..7e9ab5c9f9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -210,6 +210,7 @@ def __init__ (self, attrs=None): self.require_features = [] self.features = {} self.dist_files = [] + self.src_root = attrs.pop("src_root") self.patch_missing_pkg_info(attrs) # Make sure we have any eggs needed to interpret 'attrs' if attrs is not None: From 120542187d770d1698dcd01e10a2a6d47b89850d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 12:37:52 +0200 Subject: [PATCH 2499/8469] Support 3.x by copying all source files first and applying 2to3 to it. --HG-- branch : distribute extra : rebase_source : 410751a3a22e1b7f8830e360f39115c45c8d92eb --- setup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setup.py b/setup.py index 9ef640de7d..1582f6321c 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,27 @@ #!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" +import sys, os + +src_root = None +if sys.version_info >= (3,): + tmp_src = os.path.join("build", "src") + from distutils.filelist import FileList + from distutils import dir_util, file_util, util, log + log.set_verbosity(1) + fl = FileList() + for line in open("MANIFEST.in"): + fl.process_template_line(line) + dir_util.create_tree(tmp_src, fl.files) + outfiles_2to3 = [] + for f in fl.files: + outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1) + if copied and outf.endswith(".py"): + outfiles_2to3.append(outf) + util.run_2to3(outfiles_2to3) + sys.path.insert(0, tmp_src) + src_root = tmp_src + from distutils.util import convert_path d = {} @@ -39,6 +60,7 @@ def _being_installed(): keywords = "CPAN PyPI distutils eggs package management", url = "http://pypi.python.org/pypi/distribute", test_suite = 'setuptools.tests', + src_root = src_root, packages = find_packages(), package_data = {'setuptools':['*.exe']}, From 0fb87f9bdf3dd85bc4a0e2f17f2a7c98d0d0cf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 12:38:35 +0200 Subject: [PATCH 2500/8469] Explicitly encode data as UTF-8 before writing to a binary file. --HG-- branch : distribute extra : rebase_source : c9de4f92e3e50dd88fd1d29e2a9b2f3288fd4b88 --- setuptools/command/egg_info.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a8315d23ba..46cdf4e097 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -3,7 +3,7 @@ Create a distribution's .egg-info directory and contents""" # This module should be kept compatible with Python 2.3 -import os, re +import os, re, sys from setuptools import Command from distutils.errors import * from distutils import log @@ -148,6 +148,8 @@ def write_file(self, what, filename, data): to the file. """ log.info("writing %s to %s", what, filename) + if sys.version_info >= (3,): + data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') f.write(data) @@ -351,8 +353,11 @@ def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ + contents = "\n".join(contents) + if sys.version_info >= (3,): + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest - f.write("\n".join(contents)) + f.write(contents) f.close() From 1319d728ada3b4bd18a5e6c430439331c1ac7ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 12:56:22 +0200 Subject: [PATCH 2501/8469] Revert previous change: _get gives bytes in 3.x. Instead, have get_metadata decode from utf-8. --HG-- branch : distribute extra : rebase_source : 6050e699017705a297d45334e985978535fd245f --- pkg_resources.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 91af57defc..f34adfdac7 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1126,10 +1126,16 @@ def has_resource(self, resource_name): def has_metadata(self, name): return self.egg_info and self._has(self._fn(self.egg_info,name)) - def get_metadata(self, name): - if not self.egg_info: - return "" - return self._get(self._fn(self.egg_info,name)) + if sys.version_info <= (3,): + def get_metadata(self, name): + if not self.egg_info: + return "" + return self._get(self._fn(self.egg_info,name)) + else: + def get_metadata(self, name): + if not self.egg_info: + return "" + return self._get(self._fn(self.egg_info,name)).decode("utf-8") def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) @@ -1239,7 +1245,7 @@ def get_resource_stream(self, manager, resource_name): return open(self._fn(self.module_path, resource_name), 'rb') def _get(self, path): - stream = open(path, 'rU') + stream = open(path, 'rb') try: return stream.read() finally: From 7bb74b86b24f8f300907200e02d5319db044736f Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 12 Sep 2009 14:43:43 +0000 Subject: [PATCH 2502/8469] #6026 - fix tests that failed without zlib --- tests/test_archive_util.py | 10 ++++++++++ tests/test_bdist_dumb.py | 8 ++++++++ tests/test_sdist.py | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 91bc4e3d7c..d6fb676920 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -19,10 +19,18 @@ except ImportError: ZIP_SUPPORT = find_executable('zip') +# some tests will fail if zlib is not available +try: + import zlib +except ImportError: + zlib = None + + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): + @unittest.skipUnless(zlib, "Requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -83,6 +91,7 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), 'Need the tar command to run') def test_tarfile_vs_tar(self): @@ -168,6 +177,7 @@ def test_compress_deprecated(self): self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index b28f89f5a5..a838f73476 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -4,6 +4,13 @@ import sys import os +# zlib is not used here, but if it's not available +# test_simple_built will fail +try: + import zlib +except ImportError: + zlib = None + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -31,6 +38,7 @@ def tearDown(self): sys.argv = self.old_sys_argv[:] super(BuildDumbTestCase, self).tearDown() + @unittest.skipUnless(zlib, "requires zlib") def test_simple_built(self): # let's create a simple package diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 5808ca16eb..c2feccb3ce 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -3,6 +3,14 @@ import unittest import shutil import zipfile + +# zlib is not used here, but if it's not available +# the tests that use zipfile may fail +try: + import zlib +except ImportError: + zlib = None + from os.path import join import sys import tempfile @@ -79,6 +87,7 @@ def _warn(*args): cmd.warn = _warn return dist, cmd + @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -120,6 +129,7 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): # check if tar and gzip are installed @@ -156,6 +166,7 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -217,6 +228,7 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) From c1098e903f4eab3c673089fb60d3540e28fe0778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 16:58:06 +0200 Subject: [PATCH 2503/8469] Replace os.path.walk with os.walk. --HG-- branch : distribute extra : rebase_source : 9bc223da3173d759f3c59eb72138e7405b4384ed --- setuptools/command/bdist_egg.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9e852a3f15..32cebe9d5d 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -525,9 +525,11 @@ def visit(z, dirname, names): compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)] if not dry_run: z = zipfile.ZipFile(zip_filename, mode, compression=compression) - os.path.walk(base_dir, visit, z) + for dirname, dirs, files in os.walk(base_dir): + visit(z, dirname, files) z.close() else: - os.path.walk(base_dir, visit, None) + for dirname, dirs, files in os.walk(base_dir): + visit(None, dirname, file) return zip_filename # From a3efc4cae6bfa2e8a03a7b75380f29c660b876cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 17:05:03 +0200 Subject: [PATCH 2504/8469] Port writing text files to 3.x. --HG-- branch : distribute extra : rebase_source : 767d047dae23d5123bf412b5838d150091eea078 --- setuptools/command/easy_install.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0fa07845de..7ed467f0e5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -39,6 +39,13 @@ def samefile(p1,p2): os.path.normpath(os.path.normcase(p2)) ) +if sys.version_info <= (3,): + def _to_ascii(s): + return s +else: + def _to_ascii(s): + return s.encode('ascii') + class easy_install(Command): """Manage a download/build/install process""" description = "Find/get/install Python packages" @@ -599,7 +606,7 @@ def install_script(self, dist, script_name, script_text, dev_path=None): "import pkg_resources\n" "pkg_resources.run_script(%(spec)r, %(script_name)r)\n" ) % locals() - self.write_script(script_name, script_text, 'b') + self.write_script(script_name, _to_ascii(script_text), 'b') def write_script(self, script_name, contents, mode="t", blockers=()): """Write an executable file to the scripts directory""" @@ -1381,7 +1388,7 @@ def save(self): if os.path.islink(self.filename): os.unlink(self.filename) - f = open(self.filename,'wb') + f = open(self.filename,'wt') f.write(data); f.close() elif os.path.exists(self.filename): From 63ad9ff720754e36a2b0299f2c857228f32b0c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 17:16:22 +0200 Subject: [PATCH 2505/8469] Implement isascii. --HG-- branch : distribute extra : rebase_source : 6805617a1673859320ae278cfbb6f7136d20a0a8 --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/easy_install.py | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 49763a6394..c625317eba 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7ed467f0e5..9e1f871119 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -42,9 +42,21 @@ def samefile(p1,p2): if sys.version_info <= (3,): def _to_ascii(s): return s + def isascii(s): + try: + unicode(s, 'ascii') + return True + except UnicodeError: + return False else: def _to_ascii(s): return s.encode('ascii') + def isascii(s): + try: + s.encode('ascii') + return True + except UnicodeError: + return False class easy_install(Command): """Manage a download/build/install process""" @@ -1439,7 +1451,7 @@ def get_script_header(script_text, executable=sys_executable, wininst=False): else: executable = nt_quote_arg(executable) hdr = "#!%(executable)s%(options)s\n" % locals() - if unicode(hdr,'ascii','ignore').encode('ascii') != hdr: + if not isascii(hdr): # Non-ascii path to sys.executable, use -x to prevent warnings if options: if options.strip().startswith('-'): From f6747b162905d4fe48701a8655c857d8ef363b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 17:33:49 +0200 Subject: [PATCH 2506/8469] Add rich comparison to distribution object. --HG-- branch : distribute extra : rebase_source : 858ac6c7ad2389ba70d443480d955d3ec1e39d76 --- pkg_resources.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index f34adfdac7..910c30891c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2050,8 +2050,20 @@ def from_location(cls,location,basename,metadata=None,**kw): self.platform ) ) - def __cmp__(self, other): return cmp(self.hashcmp, other) def __hash__(self): return hash(self.hashcmp) + def __lt__(self, other): + return self.hashcmp < other.hashcmp + def __le__(self, other): + return self.hashcmp <= other.hashcmp + def __gt__(self, other): + return self.hashcmp > other.hashcmp + def __ge__(self, other): + return self.hashcmp >= other.hashcmp + def __eq__(self, other): + if not isinstance(other, self.__class__): + # It's not a Distribution, so they are not equal + return False + return self.hashcmp == other.hashcmp # These properties have to be lazy so that we don't have to load any # metadata until/unless it's actually needed. (i.e., some distributions From 401070a618a036ed6295e5e1c1b925a66471f86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 17:52:23 +0200 Subject: [PATCH 2507/8469] Replace cmp. --HG-- branch : distribute extra : rebase_source : 3d8d4d289d13bbb9fb9c946e31282c578264f626 --- pkg_resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 910c30891c..7c3d58fbe9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2466,8 +2466,9 @@ def __contains__(self,item): elif isinstance(item,basestring): item = parse_version(item) last = None + compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1 for parsed,trans,op,ver in self.index: - action = trans[cmp(item,parsed)] + action = trans[compare(item,parsed)] # Indexing: 0, 1, -1 if action=='F': return False elif action=='T': return True elif action=='+': last = True From 43bce73e470e6b73a8558b8bb362832a6a342820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 17:56:15 +0200 Subject: [PATCH 2508/8469] Revert unintended change. --HG-- branch : distribute extra : rebase_source : 1b5bc7b6ebd2bbee11dc05cc96670441f4af3f8b --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index c625317eba..49763a6394 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From ea27f15b0cfa0908704fc73611d42f6efae8e14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 18:02:40 +0200 Subject: [PATCH 2509/8469] Remove sdist3 command again. --HG-- branch : distribute extra : rebase_source : b2ae4e75c758eafa83057002ece9fb5dbc7aba92 --- distribute.egg-info/entry_points.txt | 1 - setuptools/command/__init__.py | 2 +- setuptools/command/sdist3.py | 35 ---------------------------- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 setuptools/command/sdist3.py diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 49763a6394..2c002f4c09 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -15,7 +15,6 @@ test = setuptools.command.test:test bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst bdist_egg = setuptools.command.bdist_egg:bdist_egg install = setuptools.command.install:install -sdist3 = setuptools.command.sdist3:sdist3 install_lib = setuptools.command.install_lib:install_lib build_ext = setuptools.command.build_ext:build_ext sdist = setuptools.command.sdist:sdist diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 8f5ba21cd4..f898822bb1 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -1,7 +1,7 @@ __all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', - 'sdist', 'sdist3', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', + 'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', ] diff --git a/setuptools/command/sdist3.py b/setuptools/command/sdist3.py deleted file mode 100644 index fc7ebb9788..0000000000 --- a/setuptools/command/sdist3.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -from distutils import log -from sdist import sdist -from lib2to3.refactor import RefactoringTool, get_fixers_from_package - - -class _RefactoringTool(RefactoringTool): - def log_error(self, msg, *args, **kw): - log.error(msg, *args) - - def log_message(self, msg, *args): - log.info(msg, *args) - - def log_debug(self, msg, *args): - log.debug(msg, *args) - - -class sdist3(sdist): - description = "sdist version that runs 2to3 on all sources before packaging" - fixer_names = None - - def copy_file(self, file, dest, link=None): - # We ignore the link parameter, always demanding a copy, so that - # 2to3 won't overwrite the original file. - sdist.copy_file(self, file, dest) - - def make_release_tree(self, base_dir, files): - sdist.make_release_tree(self, base_dir, files) - - # run 2to3 on all files - fixer_names = self.fixer_names - if fixer_names is None: - fixer_names = get_fixers_from_package('lib2to3.fixes') - r = _RefactoringTool(fixer_names) - r.refactor([os.path.join(base_dir, f) for f in files if f.endswith(".py")], write=True) From 42b976684874ad63f962946a67d03eae51884a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 18:06:05 +0200 Subject: [PATCH 2510/8469] Add default for pop. --HG-- branch : distribute extra : rebase_source : a4655cb42947b8ea089e72b3d4c2ff2482a31e6a --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 7e9ab5c9f9..c2e57f4b0b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -210,7 +210,7 @@ def __init__ (self, attrs=None): self.require_features = [] self.features = {} self.dist_files = [] - self.src_root = attrs.pop("src_root") + self.src_root = attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) # Make sure we have any eggs needed to interpret 'attrs' if attrs is not None: From 54ea65f8a9d2aff50c19fb311975d885635496bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 18:43:03 +0200 Subject: [PATCH 2511/8469] Redirect stderr as well. --HG-- branch : distribute extra : rebase_source : 9f4ab6d69461acfd64cb4519ff18533c6666adcd --- setuptools/tests/test_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 03e5d0f83b..8f100419c0 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -517,12 +517,12 @@ def test_get_script_header_jython_workaround(self): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) From 9290e81f1018c0c80e315958cb4b2977c38a4afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 19:05:10 +0200 Subject: [PATCH 2512/8469] Run 2to3 for api_tests.txt. --HG-- branch : distribute extra : rebase_source : 6249f2963461f6ada86facedbdd89b8fe2eb9e1a --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 1582f6321c..3a47a09cb8 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,12 @@ if copied and outf.endswith(".py"): outfiles_2to3.append(outf) util.run_2to3(outfiles_2to3) + + # XXX support this in distutils as well + from lib2to3.main import main + main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')]) + + # arrange setup to use the copy sys.path.insert(0, tmp_src) src_root = tmp_src From 62b9ce70f7cab7d9b1be27c5ec47c8d06377c3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 19:27:15 +0200 Subject: [PATCH 2513/8469] Fix tests to support 3.x. --HG-- branch : distribute extra : rebase_source : e3cf4ce257e2a7969753e386c2b4bd9f654cb7fc --- tests/api_tests.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index 823d815f0c..6cf6e66f27 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -119,7 +119,7 @@ editing are also a Distribution. (And, with a little attention to the directory names used, and including some additional metadata, such a "development distribution" can be made pluggable as well.) - >>> from pkg_resources import WorkingSet + >>> from pkg_resources import WorkingSet, VersionConflict A working set's entries are the sys.path entries that correspond to the active distributions. By default, the working set's entries are the items on @@ -208,11 +208,11 @@ You can ask a WorkingSet to ``find()`` a distribution matching a requirement:: Note that asking for a conflicting version of a distribution already in a working set triggers a ``pkg_resources.VersionConflict`` error: - >>> ws.find(Requirement.parse("Bar==1.0")) # doctest: +NORMALIZE_WHITESPACE - Traceback (most recent call last): - ... - VersionConflict: (Bar 0.9 (http://example.com/something), - Requirement.parse('Bar==1.0')) + >>> try: + ... ws.find(Requirement.parse("Bar==1.0")) + ... except VersionConflict: + ... print 'ok' + ok You can subscribe a callback function to receive notifications whenever a new distribution is added to a working set. The callback is immediately invoked From a706937e76582c6005306a391d08feecc68e0966 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 12 Sep 2009 18:41:20 +0000 Subject: [PATCH 2514/8469] Merged revisions 74754 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74754 | ezio.melotti | 2009-09-12 17:43:43 +0300 (Sat, 12 Sep 2009) | 1 line #6026 - fix tests that failed without zlib ........ --- tests/test_archive_util.py | 10 ++++++++++ tests/test_bdist_dumb.py | 8 ++++++++ tests/test_sdist.py | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index d88e0b350d..d33b7e15b1 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -19,10 +19,18 @@ except ImportError: ZIP_SUPPORT = find_executable('zip') +# some tests will fail if zlib is not available +try: + import zlib +except ImportError: + zlib = None + + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): + @unittest.skipUnless(zlib, "Requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -83,6 +91,7 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), 'Need the tar command to run') def test_tarfile_vs_tar(self): @@ -168,6 +177,7 @@ def test_compress_deprecated(self): self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index b28f89f5a5..a838f73476 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -4,6 +4,13 @@ import sys import os +# zlib is not used here, but if it's not available +# test_simple_built will fail +try: + import zlib +except ImportError: + zlib = None + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -31,6 +38,7 @@ def tearDown(self): sys.argv = self.old_sys_argv[:] super(BuildDumbTestCase, self).tearDown() + @unittest.skipUnless(zlib, "requires zlib") def test_simple_built(self): # let's create a simple package diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b7e5859cb9..986288e593 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -3,6 +3,14 @@ import unittest import shutil import zipfile + +# zlib is not used here, but if it's not available +# the tests that use zipfile may fail +try: + import zlib +except ImportError: + zlib = None + from os.path import join import sys import tempfile @@ -79,6 +87,7 @@ def _warn(*args): cmd.warn = _warn return dist, cmd + @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -120,6 +129,7 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): # check if tar and gzip are installed @@ -156,6 +166,7 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -217,6 +228,7 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) From ee89ffb19c6fa2aab91d95d1866e3c08866bc842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 23:12:36 +0200 Subject: [PATCH 2515/8469] Run 2to3 on doctest source. --HG-- branch : distribute extra : rebase_source : 6aeab2a32858c08883afcfd1f84ef8186083513f --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 3a47a09cb8..d91ea0693f 100755 --- a/setup.py +++ b/setup.py @@ -18,11 +18,12 @@ outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1) if copied and outf.endswith(".py"): outfiles_2to3.append(outf) - util.run_2to3(outfiles_2to3) + if copied and outf.endswith('api_tests.txt'): + # XXX support this in distutils as well + from lib2to3.main import main + main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')]) - # XXX support this in distutils as well - from lib2to3.main import main - main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')]) + util.run_2to3(outfiles_2to3) # arrange setup to use the copy sys.path.insert(0, tmp_src) From 709275f058fc9062b7a10db5123bd1ef91500832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 12 Sep 2009 23:22:28 +0200 Subject: [PATCH 2516/8469] Open zipsafe file in text mode. --HG-- branch : distribute extra : rebase_source : 3215e6d146816dc96a2cb23b6a6fb16fd63e1648 --- setuptools/command/bdist_egg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 32cebe9d5d..43589c239f 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -401,7 +401,7 @@ def write_safety_flag(egg_dir, safe): if safe is None or bool(safe)<>flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: - f=open(fn,'wb'); f.write('\n'); f.close() + f=open(fn,'wt'); f.write('\n'); f.close() safety_flags = { True: 'zip-safe', From 99ab2076b4e84718f9b034ab4e1394fd06d468f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 00:08:20 +0200 Subject: [PATCH 2517/8469] Open svn externals file in text mode. --HG-- branch : distribute extra : rebase_source : 0eec0f04099a978136350d3546c579bbd61ea6ec --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 50c4c00906..3442fe4be6 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -60,7 +60,7 @@ def _default_revctrl(dirname=''): def externals_finder(dirname, filename): """Find any 'svn:externals' directories""" found = False - f = open(filename,'rb') + f = open(filename,'rt') for line in iter(f.readline, ''): # can't use direct iter! parts = line.split() if len(parts)==2: From 5bf298f0e8b30f236b76997c66eee38de798f710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 00:15:41 +0200 Subject: [PATCH 2518/8469] Work around distutils 3.1 breaking ext_map. --HG-- branch : distribute extra : rebase_source : 47da1d81d1923e23aa70949c2a69000c01f8f81f --- setuptools/command/build_ext.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index c0aaa8e80c..b837375b8f 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -111,6 +111,11 @@ def finalize_options(self): for ext in self.extensions: fullname = ext._full_name self.ext_map[fullname] = ext + + # distutils 3.1 will also ask for module names + # XXX what to do with conflicts? + self.ext_map[fullname.split('.')[-1]] = ext + ltd = ext._links_to_dynamic = \ self.shlibs and self.links_to_dynamic(ext) or False ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library) From 5b568886e649fad8811f81484dc88fa5111faa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 00:17:03 +0200 Subject: [PATCH 2519/8469] Support running 2to3 on build_py. --HG-- branch : distribute extra : rebase_source : 7b3f06bc7b7745a7292e729c04053821340b6f49 --- setuptools/__init__.py | 8 ++++++ setuptools/command/build_py.py | 45 +++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index aaf634dae6..05b65e4d06 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -24,6 +24,14 @@ bootstrap_install_from = None +# Should we run 2to3 on all Python files, in Python 3.x? +# Default: no; assume that a distribution installed for 3.x is already +# written in 3.x +run_2to3 = False +# If we run 2to3 on .py files, should we also convert docstrings? +# Default: yes; assume that we can detect doctests reliably +run_2to3_on_doctests = True + def find_packages(where='.', exclude=()): """Return a list all Python packages found within directory 'where' diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 3fce7693e2..b27574a42a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -3,7 +3,41 @@ from distutils.util import convert_path from glob import glob -class build_py(_build_py): +try: + from distutils.util import Mixin2to3 as _Mixin2to3 + # add support for converting doctests that is missing in 3.1 distutils + from lib2to3.refactor import RefactoringTool, get_fixers_from_package + import setuptools + class DistutilsRefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): + log.error(msg, *args) + + def log_message(self, msg, *args): + log.info(msg, *args) + + def log_debug(self, msg, *args): + log.debug(msg, *args) + + class Mixin2to3(_Mixin2to3): + def run_2to3(self, files): + if not setuptools.run_2to3: + return files + files = _Mixin2to3.run_2to3(files) + if setuptools.run_2to3_on_doctests: + fixer_names = self.fixer_names + if fixer_names is None: + fixer_names = get_fixers_from_package('lib2to3.fixes') + r = DistutilsRefactoringTool(fixer_names) + r.refactor(files, write=True, doctests_only=True) + return files + +except ImportError: + class Mixin2to3: + def run_2to3(self, files): + # Nothing done in 2.x + pass + +class build_py(_build_py, Mixin2to3): """Enhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. @@ -23,6 +57,7 @@ def run(self): if not self.py_modules and not self.packages: return + self.__updated_files = [] if self.py_modules: self.build_modules() @@ -30,6 +65,8 @@ def run(self): self.build_packages() self.build_package_data() + self.run_2to3(self.__updated_files) + # Only compile actual .py files, using our base class' idea of what our # output files are. self.byte_compile(_build_py.get_outputs(self, include_bytecode=0)) @@ -39,6 +76,12 @@ def __getattr__(self,attr): self.data_files = files = self._get_data_files(); return files return _build_py.__getattr__(self,attr) + def build_module(self, module, module_file, package): + outfile, copied = _build_py.build_module(self, module, module_file, package) + if copied: + self.__updated_files.append(outfile) + return outfile, copied + def _get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" self.analyze_manifest() From b712de5a1170ddb843b1f8a5bff111286dc0fc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 00:30:44 +0200 Subject: [PATCH 2520/8469] Move initialization of updated_files into finalize_options --HG-- branch : distribute extra : rebase_source : 9961dacb889d0707d3d0fa67168f71eb6b577373 --- setuptools/command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b27574a42a..a80572fd4c 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -51,13 +51,13 @@ def finalize_options(self): self.package_data = self.distribution.package_data self.exclude_package_data = self.distribution.exclude_package_data or {} if 'data_files' in self.__dict__: del self.__dict__['data_files'] + self.__updated_files = [] def run(self): """Build modules, packages, and copy data files to build directory""" if not self.py_modules and not self.packages: return - self.__updated_files = [] if self.py_modules: self.build_modules() From f5adca61c9cb6797eaf9da2029c9132ec486b552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 00:36:04 +0200 Subject: [PATCH 2521/8469] Fix running 2to3. --HG-- branch : distribute extra : rebase_source : 2594ae17c6468d98288339c89cecd745f4dc181f --- setuptools/command/build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index a80572fd4c..d5890afe25 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -6,6 +6,7 @@ try: from distutils.util import Mixin2to3 as _Mixin2to3 # add support for converting doctests that is missing in 3.1 distutils + from distutils import log from lib2to3.refactor import RefactoringTool, get_fixers_from_package import setuptools class DistutilsRefactoringTool(RefactoringTool): @@ -21,15 +22,14 @@ def log_debug(self, msg, *args): class Mixin2to3(_Mixin2to3): def run_2to3(self, files): if not setuptools.run_2to3: - return files - files = _Mixin2to3.run_2to3(files) + return + _Mixin2to3.run_2to3(self, files) if setuptools.run_2to3_on_doctests: fixer_names = self.fixer_names if fixer_names is None: fixer_names = get_fixers_from_package('lib2to3.fixes') r = DistutilsRefactoringTool(fixer_names) r.refactor(files, write=True, doctests_only=True) - return files except ImportError: class Mixin2to3: From 745ef1b0e338b5160274f83900a10a99de46dcdb Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 13 Sep 2009 01:37:33 +0200 Subject: [PATCH 2522/8469] Now install_site works properly with distribute distribution. fixes #44 --HG-- branch : distribute extra : rebase_source : 5dacd496be767ed406f7f8c76a598e7f186acdbc --- CHANGES.txt | 8 +++++++- setuptools/command/easy_install.py | 2 +- setuptools/tests/test_easy_install.py | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 setuptools/tests/test_easy_install.py diff --git a/CHANGES.txt b/CHANGES.txt index a82857b303..2574300aa1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,12 @@ CHANGES 0.6.2 ----- +setuptools +========== + +* Fixed invalid usage of requirement.parse, that broke develop -d. + closed http://bugs.python.org/setuptools/issue44. + ----- 0.6.1 @@ -18,7 +24,7 @@ setuptools This closes http://bitbucket.org/tarek/distribute/issue/16 and http://bitbucket.org/tarek/distribute/issue/18. -* zip_ok is now True by default. This closes +* zip_ok is now False by default. This closes http://bugs.python.org/setuptools/issue33. * Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0fa07845de..67cf949fcf 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1078,7 +1078,7 @@ def install_site_py(self): return # already did it, or don't need to sitepy = os.path.join(self.install_dir, "site.py") - source = resource_string(Requirement.parse("setuptools"), "site.py") + source = resource_string(Requirement.parse("distribute"), "site.py") current = "" if os.path.exists(sitepy): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py new file mode 100644 index 0000000000..583c072b20 --- /dev/null +++ b/setuptools/tests/test_easy_install.py @@ -0,0 +1,20 @@ +"""Easy install Tests +""" +import os, shutil, tempfile, unittest +from setuptools.command.easy_install import easy_install +from setuptools.dist import Distribution + +class TestEasyInstallTest(unittest.TestCase): + + def test_install_site_py(self): + dist = Distribution() + cmd = easy_install(dist) + cmd.sitepy_installed = False + cmd.install_dir = tempfile.mkdtemp() + try: + cmd.install_site_py() + sitepy = os.path.join(cmd.install_dir, 'site.py') + self.assert_(os.path.exists(sitepy)) + finally: + shutil.rmtree(cmd.install_dir) + From 28c9b94a4da7a469bb726309bce461dd0843e744 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 13 Sep 2009 01:38:00 +0200 Subject: [PATCH 2523/8469] fixed typo --HG-- branch : distribute extra : rebase_source : d9b3c2bcaa5bdc3367650f4571eefd33ef45e43e --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index e554c9cbb3..fb27451851 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -356,7 +356,7 @@ def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process args = [sys.executable] + sys.argv - if is_jython: + if IS_JYTHON: sys.exit(subprocess.call(args)) else: sys.exit(os.spawnv(os.P_WAIT, sys.executable, args)) From 536c9838f3bd703c97b3816bb8b723e41cec7d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 10:19:07 +0200 Subject: [PATCH 2524/8469] Provide registry for fixer packages. --HG-- branch : distribute extra : rebase_source : 6a1259914751bdc18a32b98bd87680fb5fe94e70 --- setuptools/__init__.py | 2 ++ setuptools/command/build_py.py | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 05b65e4d06..8c3eeb6d77 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -31,6 +31,8 @@ # If we run 2to3 on .py files, should we also convert docstrings? # Default: yes; assume that we can detect doctests reliably run_2to3_on_doctests = True +# Package names for fixer packages +lib2to3_fixer_packages = ['lib2to3.fixes'] def find_packages(where='.', exclude=()): """Return a list all Python packages found within directory 'where' diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index d5890afe25..b570ddb596 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -23,12 +23,13 @@ class Mixin2to3(_Mixin2to3): def run_2to3(self, files): if not setuptools.run_2to3: return + if not self.fixer_names: + self.fixer_names = [] + for p in setuptools.lib2to3_fixer_packages: + self.fixer_names.extend(get_fixers_from_package(p)) _Mixin2to3.run_2to3(self, files) if setuptools.run_2to3_on_doctests: - fixer_names = self.fixer_names - if fixer_names is None: - fixer_names = get_fixers_from_package('lib2to3.fixes') - r = DistutilsRefactoringTool(fixer_names) + r = DistutilsRefactoringTool(self.fixer_names) r.refactor(files, write=True, doctests_only=True) except ImportError: From ff05819d89b83b7d1cb1915ef6d0eb738714ea12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 12:52:37 +0200 Subject: [PATCH 2525/8469] Document 2to3 features. --HG-- branch : distribute extra : rebase_source : 83d21c2b058553bf4c1cadf7aaa71bcf34ebfcdd --- docs/setuptools.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7de0ab086a..1c73d4a99a 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -404,6 +404,10 @@ unless you need the associated ``setuptools`` feature. mess with it. For more details on how this argument works, see the section below on `Automatic Resource Extraction`_. +``convert_doctests_2to3`` + List of doctest source files that need to be converted with 2to3. See + `Converting with 2to3`_ below for more details. + Using ``find_packages()`` ------------------------- @@ -446,6 +450,26 @@ argument in your setup script. Especially since it frees you from having to remember to modify your setup script whenever your project grows additional top-level packages or subpackages. +Converting with 2to3 +-------------------- + +When run under Python 3.x, setuptools will automatically run 2to3 on +all Python source files, if ``setuptools.run_2to3`` is set to True; by +default, this variable is False. It will also convert doctests inside +all Python source files, unless ``setuptools.run_2to3_on_doctests`` is +False; by default, this setting is True. If additional files +containing doctests need to be converted, the +``convert_doctests_2to3``setup option should provide a list of all +such files. + +By default, this conversion uses all fixers in the ``lib2to3.fixes`` +package. To use additional fixes, the list +``setuptools.lib2to3_fixer_packages`` must be extended with names +of packages containing fixes. If certain fixes are to be suppressed, +this again can be overridden with the list +``setuptools.commands.build_py.build_py.fixers``, which then contains +the list of all fixer class names. + Automatic Script Creation ========================= From 26f4380b49c0e50f3782a2edbb9ba5ddd340a1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 12:53:58 +0200 Subject: [PATCH 2526/8469] Add convert_doctests_2to3. --HG-- branch : distribute extra : rebase_source : 38832a69542ff3b96c403b32ec5b3663b08a61d0 --- setup.py | 1 + setuptools/command/build_py.py | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index d91ea0693f..20ea611367 100755 --- a/setup.py +++ b/setup.py @@ -96,6 +96,7 @@ def _being_installed(): "include_package_data = setuptools.dist:assert_bool", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", + "convert_doctests_2to3= setuptools.dist:convert_doctests_2to3" ], "egg_info.writers": [ diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b570ddb596..dd99b9d62c 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -20,21 +20,23 @@ def log_debug(self, msg, *args): log.debug(msg, *args) class Mixin2to3(_Mixin2to3): - def run_2to3(self, files): + def run_2to3(self, files, doctests = False): if not setuptools.run_2to3: return if not self.fixer_names: self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: self.fixer_names.extend(get_fixers_from_package(p)) - _Mixin2to3.run_2to3(self, files) - if setuptools.run_2to3_on_doctests: - r = DistutilsRefactoringTool(self.fixer_names) - r.refactor(files, write=True, doctests_only=True) + if doctests: + if setuptools.run_2to3_on_doctests: + r = DistutilsRefactoringTool(self.fixer_names) + r.refactor(files, write=True, doctests_only=True) + else: + _Mixin2to3.run_2to3(self, files) except ImportError: class Mixin2to3: - def run_2to3(self, files): + def run_2to3(self, files, doctests=True): # Nothing done in 2.x pass @@ -53,6 +55,7 @@ def finalize_options(self): self.exclude_package_data = self.distribution.exclude_package_data or {} if 'data_files' in self.__dict__: del self.__dict__['data_files'] self.__updated_files = [] + self.__doctests_2to3 = [] def run(self): """Build modules, packages, and copy data files to build directory""" @@ -66,7 +69,9 @@ def run(self): self.build_packages() self.build_package_data() - self.run_2to3(self.__updated_files) + self.run_2to3(self.__updated_files, False) + self.run_2to3(self.__updated_files, True) + self.run_2to3(self.__doctests_2to3, True) # Only compile actual .py files, using our base class' idea of what our # output files are. @@ -121,7 +126,9 @@ def build_package_data(self): for filename in filenames: target = os.path.join(build_dir, filename) self.mkpath(os.path.dirname(target)) - self.copy_file(os.path.join(src_dir, filename), target) + outf, copied = self.copy_file(os.path.join(src_dir, filename), target) + if copied and filename in setuptools.convert_doctests_2to3: + self.__doctests_2to3.append(outf) def analyze_manifest(self): From de9db4b432928776ed32c56c0338344abab9f4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 13:45:07 +0200 Subject: [PATCH 2527/8469] Fix processing of command line option. --HG-- branch : distribute extra : rebase_source : 43939b482ba840e06b03bf7a9888d8aed3805cec --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 20ea611367..6cca53f32c 100755 --- a/setup.py +++ b/setup.py @@ -96,7 +96,7 @@ def _being_installed(): "include_package_data = setuptools.dist:assert_bool", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", - "convert_doctests_2to3= setuptools.dist:convert_doctests_2to3" + "convert_doctests_2to3= setuptools.dist:assert_string_list" ], "egg_info.writers": [ From 1a8b650faf34b6205a8a26168ab7ef886833f85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 13:50:29 +0200 Subject: [PATCH 2528/8469] Fix processing of convert_doctests_2to3. --HG-- branch : distribute extra : rebase_source : 101f51e5f7c364407e27b742aec5e02336936d8c --- setuptools/command/build_py.py | 9 +++++++-- setuptools/dist.py | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index dd99b9d62c..2413b420a2 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -23,6 +23,9 @@ class Mixin2to3(_Mixin2to3): def run_2to3(self, files, doctests = False): if not setuptools.run_2to3: return + if not files: + return + log.info("Fixing "+" ".join(files)) if not self.fixer_names: self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: @@ -126,8 +129,10 @@ def build_package_data(self): for filename in filenames: target = os.path.join(build_dir, filename) self.mkpath(os.path.dirname(target)) - outf, copied = self.copy_file(os.path.join(src_dir, filename), target) - if copied and filename in setuptools.convert_doctests_2to3: + srcfile = os.path.join(src_dir, filename) + outf, copied = self.copy_file(srcfile, target) + srcfile = os.path.abspath(srcfile) + if copied and srcfile in self.distribution.convert_doctests_2to3: self.__doctests_2to3.append(outf) diff --git a/setuptools/dist.py b/setuptools/dist.py index c2e57f4b0b..f295ca4e9b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -255,6 +255,11 @@ def finalize_options(self): if value is not None: ep.require(installer=self.fetch_build_egg) ep.load()(self, ep.name, value) + if self.convert_doctests_2to3: + # XXX may convert to set here when we can rely on set being builtin + self.convert_doctests_2to3 = [os.path.abspath(p) for p in self.convert_doctests_2to3] + else: + self.convert_doctests_2to3 = [] def fetch_build_egg(self, req): """Fetch an egg needed for building""" From 15a0f215d79be0bd7cbf521395377fd7c3168dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 14:40:15 +0200 Subject: [PATCH 2529/8469] Deal with convert_doctests_2to3 not being set. --HG-- branch : distribute extra : rebase_source : c1952763f89af6f9c5e25e67982b96756d7336e3 --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index f295ca4e9b..fd23d9babb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -255,7 +255,7 @@ def finalize_options(self): if value is not None: ep.require(installer=self.fetch_build_egg) ep.load()(self, ep.name, value) - if self.convert_doctests_2to3: + if getattr(self, 'convert_doctests_2to3', None): # XXX may convert to set here when we can rely on set being builtin self.convert_doctests_2to3 = [os.path.abspath(p) for p in self.convert_doctests_2to3] else: From bd900046b3457bfd98ac36dfbdaac63d7acf0a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 15:33:43 +0200 Subject: [PATCH 2530/8469] Convert HTML pages to text. --HG-- branch : distribute extra : rebase_source : 9ab9cc8b84da2be50c520cd6f23efb15b8744bd9 --- setuptools/package_index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 48494aff21..b6283dbc2c 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -197,6 +197,8 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() + charset = f.headers.get_param('charset') or 'latin-1' + page = page.decode(charset, "ignore") f.close() if url.startswith(self.index_url) and getattr(f,'code',None)!=404: page = self.process_index(url, page) From cfa83c08e6c6248f0085dfaab5c4f7edad6f8ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 16:20:45 +0200 Subject: [PATCH 2531/8469] Support attrs is None. --HG-- branch : distribute extra : rebase_source : 7ab3d57b13cb2ec2d7d1b9aafc99f4ec0ea49b5a --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index fd23d9babb..531c94f440 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -210,7 +210,7 @@ def __init__ (self, attrs=None): self.require_features = [] self.features = {} self.dist_files = [] - self.src_root = attrs.pop("src_root", None) + self.src_root = attrs and attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) # Make sure we have any eggs needed to interpret 'attrs' if attrs is not None: From 55413ad562eddc5ffc235bde5471fdf010421f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 13 Sep 2009 21:30:44 +0200 Subject: [PATCH 2532/8469] Only decode HTML pages in 3.x. --HG-- branch : distribute extra : rebase_source : 58a286fe297947272398fc9ddd8f50594f54d4ae --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b6283dbc2c..084370d530 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -197,8 +197,9 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() - charset = f.headers.get_param('charset') or 'latin-1' - page = page.decode(charset, "ignore") + if sys.version_info >= (3,): + charset = f.headers.get_param('charset') or 'latin-1' + page = page.decode(charset, "ignore") f.close() if url.startswith(self.index_url) and getattr(f,'code',None)!=404: page = self.process_index(url, page) From 5132893c6fa2799cfb9d23b35ff1828f8c621421 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Sep 2009 19:13:15 +0000 Subject: [PATCH 2533/8469] Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) --- util.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index 459c36462d..fe6851cb87 100644 --- a/util.py +++ b/util.py @@ -144,11 +144,26 @@ def get_platform(): machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From d057f0f1b7dbf7446e4b979ccf8da90ce89995de Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Sep 2009 19:14:37 +0000 Subject: [PATCH 2534/8469] Merged revisions 74806 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ --- util.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index e9d29ff49c..ee5829b077 100644 --- a/util.py +++ b/util.py @@ -142,11 +142,26 @@ def get_platform (): machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From 589e2a746f2e3812fe1e7840391a61b20b3fdaf4 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Sep 2009 19:16:02 +0000 Subject: [PATCH 2535/8469] Merged revisions 74806 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ --- util.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index 0c88b8197d..6709bbfe42 100644 --- a/util.py +++ b/util.py @@ -144,11 +144,26 @@ def get_platform(): machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From b2dfd2fe8b6c80780cfa28e5ca013124fb1f45b6 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Sep 2009 19:16:40 +0000 Subject: [PATCH 2536/8469] Merged revisions 74808 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74808 | ronald.oussoren | 2009-09-15 21:16:02 +0200 (Tue, 15 Sep 2009) | 10 lines Merged revisions 74806 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ ................ --- util.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/util.py b/util.py index 4c1956a2b8..5054d0c867 100644 --- a/util.py +++ b/util.py @@ -141,11 +141,26 @@ def get_platform (): machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From 56e40eafce0c788acacca65aef4f0fc93640aedd Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Sep 2009 21:24:07 +0000 Subject: [PATCH 2537/8469] Update distutils.util tests after my changes to --with-universal-archs --- tests/test_util.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index ffa92bd07e..7190b2c9c6 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -142,15 +142,35 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From 3736fee0faddbbc93fa6b7a1b233d4c2dcf11d76 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Fri, 18 Sep 2009 17:22:17 +0200 Subject: [PATCH 2538/8469] Works with zope.interface now. --HG-- branch : distribute extra : rebase_source : c8cd9fd837bbac96c8949f0015d84051bd8ab5c7 --- distribute.egg-info/entry_points.txt | 9 ++++++--- setup.py | 30 +++++++++++++++------------- setuptools/__init__.py | 2 +- setuptools/command/build_py.py | 6 +++++- setuptools/command/test.py | 28 ++++++++++++++++++++------ 5 files changed, 50 insertions(+), 25 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2c002f4c09..e588745480 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,6 +1,5 @@ [distutils.commands] bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_scripts = setuptools.command.install_scripts:install_scripts rotate = setuptools.command.rotate:rotate develop = setuptools.command.develop:develop setopt = setuptools.command.setopt:setopt @@ -11,10 +10,11 @@ register = setuptools.command.register:register install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install -test = setuptools.command.test:test +install_scripts = setuptools.command.install_scripts:install_scripts bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst bdist_egg = setuptools.command.bdist_egg:bdist_egg install = setuptools.command.install:install +test = setuptools.command.test:test install_lib = setuptools.command.install_lib:install_lib build_ext = setuptools.command.build_ext:build_ext sdist = setuptools.command.sdist:sdist @@ -31,15 +31,17 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] +additional_2to3_fixers = setuptools.dist:assert_string_list dependency_links = setuptools.dist:assert_string_list entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras +run_2to3 = setuptools.dist:assert_bool package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements include_package_data = setuptools.dist:assert_bool @@ -49,6 +51,7 @@ test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable +convert_doctests_2to3 = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements [setuptools.installation] diff --git a/setup.py b/setup.py index 0bc261a957..a9a66918a0 100755 --- a/setup.py +++ b/setup.py @@ -84,20 +84,22 @@ def _being_installed(): ], "distutils.setup_keywords": [ - "eager_resources = setuptools.dist:assert_string_list", - "namespace_packages = setuptools.dist:check_nsp", - "extras_require = setuptools.dist:check_extras", - "install_requires = setuptools.dist:check_requirements", - "tests_require = setuptools.dist:check_requirements", - "entry_points = setuptools.dist:check_entry_points", - "test_suite = setuptools.dist:check_test_suite", - "zip_safe = setuptools.dist:assert_bool", - "package_data = setuptools.dist:check_package_data", - "exclude_package_data = setuptools.dist:check_package_data", - "include_package_data = setuptools.dist:assert_bool", - "dependency_links = setuptools.dist:assert_string_list", - "test_loader = setuptools.dist:check_importable", - "convert_doctests_2to3= setuptools.dist:assert_string_list" + "eager_resources = setuptools.dist:assert_string_list", + "namespace_packages = setuptools.dist:check_nsp", + "extras_require = setuptools.dist:check_extras", + "install_requires = setuptools.dist:check_requirements", + "tests_require = setuptools.dist:check_requirements", + "entry_points = setuptools.dist:check_entry_points", + "test_suite = setuptools.dist:check_test_suite", + "zip_safe = setuptools.dist:assert_bool", + "package_data = setuptools.dist:check_package_data", + "exclude_package_data = setuptools.dist:check_package_data", + "include_package_data = setuptools.dist:assert_bool", + "dependency_links = setuptools.dist:assert_string_list", + "test_loader = setuptools.dist:check_importable", + "run_2to3 = setuptools.dist:assert_bool", + "convert_doctests_2to3 = setuptools.dist:assert_string_list", + "additional_2to3_fixers = setuptools.dist:assert_string_list", ], "egg_info.writers": [ diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8c3eeb6d77..ac5e6e5e3b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -27,7 +27,7 @@ # Should we run 2to3 on all Python files, in Python 3.x? # Default: no; assume that a distribution installed for 3.x is already # written in 3.x -run_2to3 = False +run_2to3 = False # Default value if run_2to3 argument not given. # If we run 2to3 on .py files, should we also convert docstrings? # Default: yes; assume that we can detect doctests reliably run_2to3_on_doctests = True diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 2413b420a2..94f6674140 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -21,7 +21,9 @@ def log_debug(self, msg, *args): class Mixin2to3(_Mixin2to3): def run_2to3(self, files, doctests = False): - if not setuptools.run_2to3: + # See of the distribution option has been set, otherwise check the + # setuptools default. + if self.distribution.run_2to3 is not True and setuptools.run_2to3 is False: return if not files: return @@ -30,6 +32,8 @@ def run_2to3(self, files, doctests = False): self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: self.fixer_names.extend(get_fixers_from_package(p)) + for p in self.distribution.additional_2to3_fixers: + self.fixer_names.extend(get_fixers_from_package(p)) if doctests: if setuptools.run_2to3_on_doctests: r = DistutilsRefactoringTool(self.fixer_names) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index db918dae06..0f96e83ac1 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,4 +1,4 @@ -from setuptools import Command +from setuptools import Command, run_2to3 from distutils.errors import DistutilsOptionError import sys from pkg_resources import * @@ -81,12 +81,28 @@ def finalize_options(self): def with_project_on_sys_path(self, func): - # Ensure metadata is up-to-date - self.run_command('egg_info') + if getattr(self.distribution, 'run_2to3', run_2to3): + # If we run 2to3 we can not do this inplace: - # Build extensions in-place - self.reinitialize_command('build_ext', inplace=1) - self.run_command('build_ext') + # Ensure metadata is up-to-date + self.reinitialize_command('build_py', inplace=0) + self.run_command('build_py') + bpy_cmd = self.get_finalized_command("build_py") + build_path = normalize_path(bpy_cmd.build_lib) + + # Build extensions + self.reinitialize_command('egg_info', egg_base=build_path) + self.run_command('egg_info') + + self.reinitialize_command('build_ext', inplace=0) + self.run_command('build_ext') + else: + # Without 2to3 inplace works fine: + self.run_command('egg_info') + + # Build extensions in-place + self.reinitialize_command('build_ext', inplace=1) + self.run_command('build_ext') ei_cmd = self.get_finalized_command("egg_info") From d2f24d4c853603500381f1a4b34ae1d04d920ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 19 Sep 2009 09:58:51 +0000 Subject: [PATCH 2539/8469] Fixed #6947 - SO extension varies under windows --- tests/test_build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d8d3667751..94000a57d9 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -338,7 +338,8 @@ def test_build_ext_inplace(self): cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) From 95159c09e5bb2d1dc1f0ccf89ccbe90ecc6871a0 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Sat, 19 Sep 2009 22:39:32 +0200 Subject: [PATCH 2540/8469] Fixed a daft bug (my fault). --HG-- branch : distribute extra : rebase_source : 82e1e503282ced638da32690291923613a74e930 --- setuptools/command/build_py.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 94f6674140..910d67c8cb 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -32,8 +32,9 @@ def run_2to3(self, files, doctests = False): self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: self.fixer_names.extend(get_fixers_from_package(p)) - for p in self.distribution.additional_2to3_fixers: - self.fixer_names.extend(get_fixers_from_package(p)) + if self.distribution.additional_2to3_fixers is not None: + for p in self.distribution.additional_2to3_fixers: + self.fixer_names.extend(get_fixers_from_package(p)) if doctests: if setuptools.run_2to3_on_doctests: r = DistutilsRefactoringTool(self.fixer_names) From 19af16b0ec4149f3b00d4e05dfce8ad4f61310e1 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 20 Sep 2009 14:45:46 +0200 Subject: [PATCH 2541/8469] make sure setuptools does like distutils in get_ext_filename fixes #41 --HG-- branch : distribute extra : rebase_source : 4401307be98ca2fb74e715a258b7af74eaa62db2 --- setuptools/command/build_ext.py | 2 ++ setuptools/tests/test_build_ext.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 setuptools/tests/test_build_ext.py diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index c0aaa8e80c..a60ede0c3c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -82,6 +82,8 @@ def swig_sources(self, sources, *otherargs): def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) + if fullname not in self.ext_map: + return filename ext = self.ext_map[fullname] if isinstance(ext,Library): fn, ext = os.path.splitext(filename) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py new file mode 100644 index 0000000000..a520ced9d6 --- /dev/null +++ b/setuptools/tests/test_build_ext.py @@ -0,0 +1,20 @@ +"""build_ext tests +""" +import os, shutil, tempfile, unittest +from distutils.command.build_ext import build_ext as distutils_build_ext +from setuptools.command.build_ext import build_ext +from setuptools.dist import Distribution + +class TestBuildExtTest(unittest.TestCase): + + def test_get_ext_filename(self): + # setuptools needs to give back the same + # result than distutils, even if the fullname + # is not in ext_map + dist = Distribution() + cmd = build_ext(dist) + cmd.ext_map['foo/bar'] = '' + res = cmd.get_ext_filename('foo') + wanted = distutils_build_ext.get_ext_filename(cmd, 'foo') + assert res == wanted + From 1219c326683905695fbdf60c22367129075d2f8d Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 20 Sep 2009 14:47:00 +0200 Subject: [PATCH 2542/8469] merged + removed trailing spaces --HG-- branch : distribute extra : rebase_source : 343481c01063bac16767023dd7a24bb0b063b967 --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/develop.py | 6 +++--- tests/test_distribute_setup.py | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index d69118d9ae..3532a1fe11 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -31,7 +31,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index f128b8030b..3288805647 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -46,7 +46,7 @@ def finalize_options(self): "Please rename %r to %r before using 'develop'" % (ei.egg_info, ei.broken_egg_info) ) - self.args = [ei.egg_name] + self.args = [ei.egg_name] easy_install.finalize_options(self) # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) @@ -62,7 +62,7 @@ def finalize_options(self): "--egg-path must be a relative path from the install" " directory to "+target ) - + # Make a distribution for the package's source self.dist = Distribution( target, @@ -129,7 +129,7 @@ def install_egg_scripts(self, dist): # create wrapper scripts in the script dir, pointing to dist.scripts # new-style... - self.install_wrapper_scripts(dist) + self.install_wrapper_scripts(dist) # ...and old-style for script_name in self.distribution.scripts or []: diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 6c004bd7b7..76f8f8fa17 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -45,7 +45,6 @@ def test_build_egg(self): self.assert_(setuptools.__file__.startswith(egg)) def test_do_download(self): - tmpdir = tempfile.mkdtemp() _do_download(to_dir=tmpdir) import setuptools From e31bfe83544e77494aea179e9340a04c41baf4f9 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 21 Sep 2009 00:31:41 +0200 Subject: [PATCH 2543/8469] More docs for python 3 support. --HG-- branch : distribute extra : rebase_source : 5a012fd490441b1e72729d659b596a19dbbe0cb8 --- docs/index.txt | 1 + docs/python3.txt | 120 ++++++++++++++++++++++++++++++++++++++++++++ docs/setuptools.txt | 32 ++++-------- 3 files changed, 131 insertions(+), 22 deletions(-) create mode 100644 docs/python3.txt diff --git a/docs/index.txt b/docs/index.txt index 6f04ffb94c..f814ff9be5 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -9,6 +9,7 @@ Contents: setuptools easy_install pkg_resources + python3 Indices and tables diff --git a/docs/python3.txt b/docs/python3.txt new file mode 100644 index 0000000000..19a2b26853 --- /dev/null +++ b/docs/python3.txt @@ -0,0 +1,120 @@ +===================================================== +Supporting both Python 2 and Python 3 with Distribute +===================================================== + +Starting with version 0.6.2, Distribute supports Python 3. Installing and +using distribute for Python 3 code works exactly the same as for Python 2 +code, but Distribute also helps you to support Python 2 and Python 3 from +the same source code by letting you run 2to3 on the code as a part of the +build process. by setting the keyword parameter ``run_2to3`` to True. + + +Distrubute as help during porting +================================= + +Distribute can make the porting process much easier by automatically running +2to3 as a part of the test running. To do this you need to configure the +setup.py so that you can run the unit tests with ``python setup.py test``. + +See :ref:`test` for more information on this. + +Once you have the tests running under Python 2, you can add the run_2to3 +keyword parameters to setup(), and start running the tests under Python 3. +The test command will now first run the build command during which the code +will be converted with 2to3, and the tests will then be run from the build +directory, as opposed from the source directory as is normally done. + +Distribute will convert all Python files, and also all doctests in Python +files. However, if you have doctests located in separate text files, these +will not automatically be converted. By adding them to the +``convert_doctests_2to3`` keyword parameter Distrubute will convert them as +well. + +By default, the conversion uses all fixers in the ``lib2to3.fixers`` package. +To use additional fixes, the parameter ``additional_2to3_fixers`` can be set +to a list of names of packages containing fixers. + +A typical setup.py can look something like this:: + + from setuptools import setup + + setup(name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + run_2to3 = True, + convert_doctests_2to3 = ['src/your/module/README.txt'], + additional_2to3_fixers = ['your.fixers'] + ) + +Differential conversion +----------------------- + +Note that a file will only be copied and converted during the build process +if the source file has been changed. If you add a file to the doctests +that should be converted, it will not be converted the next time you run +the tests, since it hasn't been modified. You need to remove it from the +build directory. Also if you run the build, install or test commands before +adding the run_2to3 parameter, you will have to remove the build directory +before you run the test command, as the files otherwise will seem updated, +and no conversion will happen. + +In general, if code doesn't seem to be converted, deleting the build directory +and trying again is a good saferguard against the build directory getting +"out of sync" with teh source directory. + +Distributing Python 3 modules +============================= + +You can distribute your modules with Python 3 support in different ways. A +normal source distribution will work, but can be slow in installing, as the +2to3 process will be run during the install. But you can also distribute +the module in binary format, such as a binary egg. That egg will contain the +already converted code, and hence no 2to3 conversion is needed during install. + +Advanced features +================= + +If certain fixers are to be suppressed, this again can be overridden with the +list ``setuptools.commands.build_py.build_py.fixers``, which then contains the +list of all fixer class names. + +If you don't want to run the 2to3 conversion on the doctests in Python files, +you can turn that off by setting ``setuptools.run_2to3_on_doctests = False``. + +Note on compatibility with setuptools +===================================== + +Setuptools do not know about the new keyword parameters to support Python 3. +As a result it will warn about the unknown keyword parameters if you use +setuptools instead of Distribute under Python 2. This is not an error, and +install process will continue as normal, but if you want to get rid of that +error this is easy. Simply conditionally add the new parameters into an extra +dict and pass that dict into setup():: + + from setuptools import setup + import sys + + extra = {} + if sys.version_info >= (3,): + extra['run_2to3'] = True + extra['convert_doctests_2to3'] = ['src/your/module/README.txt'] + extra['additional_2to3_fixers'] = ['your.fixers'] + + setup(name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + **extra + ) + +This way the parameters will only be used under Python 3, where you have to +use Distribute. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 1c73d4a99a..e462e61ab5 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -404,9 +404,17 @@ unless you need the associated ``setuptools`` feature. mess with it. For more details on how this argument works, see the section below on `Automatic Resource Extraction`_. +``run_2to3`` + Convert the source code from Python 2 to Python 3 with 2to3 during the + build process. + ``convert_doctests_2to3`` - List of doctest source files that need to be converted with 2to3. See - `Converting with 2to3`_ below for more details. + List of doctest source files that need to be converted with 2to3. + See :doc:`python3` for more details. + +``additional_2to3_fixers`` + A list of modules to serach for additional fixers to be used during + the 2to3 conversion. See :doc:`python3` for more details. Using ``find_packages()`` @@ -450,26 +458,6 @@ argument in your setup script. Especially since it frees you from having to remember to modify your setup script whenever your project grows additional top-level packages or subpackages. -Converting with 2to3 --------------------- - -When run under Python 3.x, setuptools will automatically run 2to3 on -all Python source files, if ``setuptools.run_2to3`` is set to True; by -default, this variable is False. It will also convert doctests inside -all Python source files, unless ``setuptools.run_2to3_on_doctests`` is -False; by default, this setting is True. If additional files -containing doctests need to be converted, the -``convert_doctests_2to3``setup option should provide a list of all -such files. - -By default, this conversion uses all fixers in the ``lib2to3.fixes`` -package. To use additional fixes, the list -``setuptools.lib2to3_fixer_packages`` must be extended with names -of packages containing fixes. If certain fixes are to be suppressed, -this again can be overridden with the list -``setuptools.commands.build_py.build_py.fixers``, which then contains -the list of all fixer class names. - Automatic Script Creation ========================= From bec82b20d18cb0e81d305015307584abaa2b69bf Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 21 Sep 2009 11:53:47 +0200 Subject: [PATCH 2544/8469] Cut and paste error. --HG-- branch : distribute extra : rebase_source : 2dd0749f676a281b4a09fd050686ea0821dd64f8 --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e462e61ab5..d4c11a0f61 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -406,7 +406,7 @@ unless you need the associated ``setuptools`` feature. ``run_2to3`` Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. + build process. See :doc:`python3` for more details. ``convert_doctests_2to3`` List of doctest source files that need to be converted with 2to3. From e16bbeaf5a2c38ea024beb32eaee3f413acd7e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 12:19:07 +0000 Subject: [PATCH 2545/8469] improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) --- tests/test_ccompiler.py | 24 +++++++++++++++++++++++- tests/test_cmd.py | 18 ++++++++++++++++++ tests/test_core.py | 20 ++++++++++++++++++++ tests/test_filelist.py | 19 +++++++++++++++++++ tests/test_install.py | 14 +++++++++++++- 5 files changed, 93 insertions(+), 2 deletions(-) diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index 58c8c5da40..2c219b7b17 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -1,8 +1,10 @@ """Tests for distutils.ccompiler.""" import os import unittest +from test.test_support import captured_stdout -from distutils.ccompiler import gen_lib_options +from distutils.ccompiler import gen_lib_options, CCompiler +from distutils import debug class FakeCompiler(object): def library_dir_option(self, dir): @@ -30,6 +32,26 @@ def test_gen_lib_options(self): '-lname2'] self.assertEquals(opts, wanted) + def test_debug_print(self): + + class MyCCompiler(CCompiler): + executables = {} + + compiler = MyCCompiler() + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CCompilerTestCase) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index d6438b5ea1..2174efbf64 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.test_support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ def test_ensure_dirname(self): cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index e481e8de39..3c26fddbc6 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,6 +6,7 @@ import shutil import sys import test.test_support +from test.test_support import captured_stdout import unittest @@ -33,10 +34,12 @@ class CoreTestCase(unittest.TestCase): def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.test_support.TESTFN @@ -73,6 +76,23 @@ def test_run_setup_uses_current_dir(self): output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index cf64c744d2..0cbb48bcc6 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,7 +1,10 @@ """Tests for distutils.filelist.""" from os.path import join import unittest +from test.test_support import captured_stdout + from distutils.filelist import glob_to_re, FileList +from distutils import debug MANIFEST_IN = """\ include ok @@ -59,6 +62,22 @@ def test_process_template_line(self): self.assertEquals(file_list.files, wanted) + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index d0ad5ce159..d2b8c8e9b6 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -6,6 +6,8 @@ import unittest import site +from test.test_support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From f0f1b0325d3f06a06ab03c6912ea9743e9c30ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:01:54 +0000 Subject: [PATCH 2546/8469] Merged revisions 74988 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74988 | tarek.ziade | 2009-09-21 14:19:07 +0200 (Mon, 21 Sep 2009) | 1 line improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) ........ --- cmd.py | 2 +- fancy_getopt.py | 6 +++--- tests/test_ccompiler.py | 24 +++++++++++++++++++++++- tests/test_cmd.py | 18 ++++++++++++++++++ tests/test_core.py | 20 ++++++++++++++++++++ tests/test_filelist.py | 19 +++++++++++++++++++ tests/test_install.py | 14 +++++++++++++- 7 files changed, 97 insertions(+), 6 deletions(-) diff --git a/cmd.py b/cmd.py index aff7d68e3c..ae4efc7efc 100644 --- a/cmd.py +++ b/cmd.py @@ -157,7 +157,7 @@ def dump_options(self, header=None, indent=""): self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: - option = longopt_xlate(option) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) diff --git a/fancy_getopt.py b/fancy_getopt.py index 72441fb43d..879d4d25bf 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -26,7 +26,7 @@ # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = lambda s: s.replace('-', '_') +longopt_xlate = str.maketrans('-', '_') class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some @@ -107,7 +107,7 @@ def get_attr_name(self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return longopt_xlate(long_option) + return long_option.translate(longopt_xlate) def _check_alias_dict(self, aliases, what): assert isinstance(aliases, dict) @@ -432,7 +432,7 @@ def translate_longopt(opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return longopt_xlate(opt) + return opt.translate(longopt_xlate) class OptionDummy: diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index 58c8c5da40..9db8d24617 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -1,8 +1,10 @@ """Tests for distutils.ccompiler.""" import os import unittest +from test.support import captured_stdout -from distutils.ccompiler import gen_lib_options +from distutils.ccompiler import gen_lib_options, CCompiler +from distutils import debug class FakeCompiler(object): def library_dir_option(self, dir): @@ -30,6 +32,26 @@ def test_gen_lib_options(self): '-lname2'] self.assertEquals(opts, wanted) + def test_debug_print(self): + + class MyCCompiler(CCompiler): + executables = {} + + compiler = MyCCompiler() + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CCompilerTestCase) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index d6438b5ea1..55ae421d46 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ def test_ensure_dirname(self): cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index 7f021dcb3b..b5f391f57a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,6 +6,7 @@ import shutil import sys import test.support +from test.support import captured_stdout import unittest @@ -33,10 +34,12 @@ class CoreTestCase(unittest.TestCase): def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.support.TESTFN @@ -73,6 +76,23 @@ def test_run_setup_uses_current_dir(self): output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index cf64c744d2..d98325ae54 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,7 +1,10 @@ """Tests for distutils.filelist.""" from os.path import join import unittest +from test.support import captured_stdout + from distutils.filelist import glob_to_re, FileList +from distutils import debug MANIFEST_IN = """\ include ok @@ -59,6 +62,22 @@ def test_process_template_line(self): self.assertEquals(file_list.files, wanted) + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index d0ad5ce159..2087a0eba0 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -6,6 +6,8 @@ import unittest import site +from test.support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From ab2e256fe307738d2c0b4e9d4fa411b23f9be8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:10:05 +0000 Subject: [PATCH 2547/8469] Merged revisions 74990 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74990 | tarek.ziade | 2009-09-21 15:01:54 +0200 (Mon, 21 Sep 2009) | 9 lines Merged revisions 74988 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74988 | tarek.ziade | 2009-09-21 14:19:07 +0200 (Mon, 21 Sep 2009) | 1 line improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) ........ ................ --- cmd.py | 2 +- fancy_getopt.py | 6 +++--- tests/test_cmd.py | 18 ++++++++++++++++++ tests/test_core.py | 20 ++++++++++++++++++++ tests/test_filelist.py | 21 ++++++++++++++++++++- tests/test_install.py | 14 +++++++++++++- 6 files changed, 75 insertions(+), 6 deletions(-) diff --git a/cmd.py b/cmd.py index aff7d68e3c..ae4efc7efc 100644 --- a/cmd.py +++ b/cmd.py @@ -157,7 +157,7 @@ def dump_options(self, header=None, indent=""): self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: - option = longopt_xlate(option) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) diff --git a/fancy_getopt.py b/fancy_getopt.py index 72441fb43d..879d4d25bf 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -26,7 +26,7 @@ # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = lambda s: s.replace('-', '_') +longopt_xlate = str.maketrans('-', '_') class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some @@ -107,7 +107,7 @@ def get_attr_name(self, long_option): """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return longopt_xlate(long_option) + return long_option.translate(longopt_xlate) def _check_alias_dict(self, aliases, what): assert isinstance(aliases, dict) @@ -432,7 +432,7 @@ def translate_longopt(opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return longopt_xlate(opt) + return opt.translate(longopt_xlate) class OptionDummy: diff --git a/tests/test_cmd.py b/tests/test_cmd.py index d6438b5ea1..55ae421d46 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ def test_ensure_dirname(self): cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index 7f021dcb3b..b5f391f57a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,6 +6,7 @@ import shutil import sys import test.support +from test.support import captured_stdout import unittest @@ -33,10 +34,12 @@ class CoreTestCase(unittest.TestCase): def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.support.TESTFN @@ -73,6 +76,23 @@ def test_run_setup_uses_current_dir(self): output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 86db557441..b9db8f61fe 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,6 +1,9 @@ """Tests for distutils.filelist.""" import unittest -from distutils.filelist import glob_to_re + +from distutils.filelist import glob_to_re, FileList +from test.support import captured_stdout +from distutils import debug class FileListTestCase(unittest.TestCase): @@ -16,6 +19,22 @@ def test_glob_to_re(self): self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index d0ad5ce159..2087a0eba0 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -6,6 +6,8 @@ import unittest import site +from test.support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From 0610698781fd21cdc3dd80eb45640e6da374a1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:23:35 +0000 Subject: [PATCH 2548/8469] improving distutils coverage --- tests/test_dist.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_dist.py b/tests/test_dist.py index 75b74a2c28..553f30c748 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -9,6 +9,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command +import distutils.dist from test.test_support import TESTFN, captured_stdout from distutils.tests import support @@ -56,6 +57,27 @@ def create_distribution(self, configfiles=()): d.parse_command_line() return d + def test_debug_mode(self): + with open(TESTFN, "w") as f: + f.write("[global]") + f.write("command_packages = foo.bar, splat") + + files = [TESTFN] + sys.argv.append("build") + + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + distutils.dist.DEBUG = True + try: + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + finally: + distutils.dist.DEBUG = False + def test_command_packages_unspecified(self): sys.argv.append("build") d = self.create_distribution() From 142d88152055c80f02ee268f73aca04424c8e676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:41:08 +0000 Subject: [PATCH 2549/8469] #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. --- dist.py | 2 +- log.py | 3 +++ tests/test_dist.py | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index afed545d92..f49afcce13 100644 --- a/dist.py +++ b/dist.py @@ -359,7 +359,7 @@ def parse_config_files(self, filenames=None): parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) diff --git a/log.py b/log.py index 6f949d5179..758857081c 100644 --- a/log.py +++ b/log.py @@ -17,6 +17,9 @@ def __init__(self, threshold=WARN): self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args diff --git a/tests/test_dist.py b/tests/test_dist.py index 553f30c748..3d4b25f0fc 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -200,6 +200,13 @@ def test_get_command_packages(self): self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From 5b7317782101927604eb838784b8aab23c611b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:43:09 +0000 Subject: [PATCH 2550/8469] Merged revisions 74992 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74992 | tarek.ziade | 2009-09-21 15:23:35 +0200 (Mon, 21 Sep 2009) | 1 line improving distutils coverage ........ --- tests/test_dist.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_dist.py b/tests/test_dist.py index 9f795f4314..91297f0e15 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,6 +8,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command +import distutils.dist from test.support import TESTFN, captured_stdout from distutils.tests import support @@ -55,6 +56,27 @@ def create_distribution(self, configfiles=()): d.parse_command_line() return d + def test_debug_mode(self): + with open(TESTFN, "w") as f: + f.write("[global]") + f.write("command_packages = foo.bar, splat") + + files = [TESTFN] + sys.argv.append("build") + + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + distutils.dist.DEBUG = True + try: + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + finally: + distutils.dist.DEBUG = False + def test_command_packages_unspecified(self): sys.argv.append("build") d = self.create_distribution() From b620521f2e5b41994c054ca0ab7a361a41dab8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:49:57 +0000 Subject: [PATCH 2551/8469] forgot to commit a file in previous commit (r74994, issue #6954) --- tests/support.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/support.py b/tests/support.py index bce034949e..3c328cc9a6 100644 --- a/tests/support.py +++ b/tests/support.py @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.test_support import EnvironmentVarGuard @@ -25,6 +26,8 @@ def tearDown(self): super(LoggingSilencer, self).tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): From 6d4d4281a733ee9b1c6d622be50b14879947a3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:55:19 +0000 Subject: [PATCH 2552/8469] Merged revisions 74994,74997 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. ........ r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line forgot to commit a file in previous commit (r74994, issue #6954) ........ --- dist.py | 2 +- log.py | 3 +++ tests/support.py | 3 +++ tests/test_dist.py | 7 +++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index ac5a0ca012..1c1ea477db 100644 --- a/dist.py +++ b/dist.py @@ -354,7 +354,7 @@ def parse_config_files(self, filenames=None): parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) diff --git a/log.py b/log.py index 6f949d5179..758857081c 100644 --- a/log.py +++ b/log.py @@ -17,6 +17,9 @@ def __init__(self, threshold=WARN): self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args diff --git a/tests/support.py b/tests/support.py index 1255413989..ea122111ca 100644 --- a/tests/support.py +++ b/tests/support.py @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.support import EnvironmentVarGuard @@ -25,6 +26,8 @@ def tearDown(self): super().tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): diff --git a/tests/test_dist.py b/tests/test_dist.py index 91297f0e15..799b0c0603 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -171,6 +171,13 @@ def test_get_command_packages(self): self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From b55f637193312bf8e9c13b1b5a2c421147db1281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Sep 2009 13:59:07 +0000 Subject: [PATCH 2553/8469] Merged revisions 74999 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74999 | tarek.ziade | 2009-09-21 15:55:19 +0200 (Mon, 21 Sep 2009) | 13 lines Merged revisions 74994,74997 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. ........ r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line forgot to commit a file in previous commit (r74994, issue #6954) ........ ................ --- dist.py | 2 +- log.py | 3 +++ tests/support.py | 3 +++ tests/test_dist.py | 7 +++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index ac5a0ca012..1c1ea477db 100644 --- a/dist.py +++ b/dist.py @@ -354,7 +354,7 @@ def parse_config_files(self, filenames=None): parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) diff --git a/log.py b/log.py index 6f949d5179..758857081c 100644 --- a/log.py +++ b/log.py @@ -17,6 +17,9 @@ def __init__(self, threshold=WARN): self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args diff --git a/tests/support.py b/tests/support.py index 1255413989..ea122111ca 100644 --- a/tests/support.py +++ b/tests/support.py @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.support import EnvironmentVarGuard @@ -25,6 +26,8 @@ def tearDown(self): super().tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): diff --git a/tests/test_dist.py b/tests/test_dist.py index 9f795f4314..70c9ec50e2 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -149,6 +149,13 @@ def test_get_command_packages(self): self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From b9c31d02ce197add682c4bb6ab7614f6bc9abf7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 22 Sep 2009 10:08:13 +0000 Subject: [PATCH 2554/8469] Merged revisions 74812 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74812 | ronald.oussoren | 2009-09-15 23:24:07 +0200 (Tue, 15 Sep 2009) | 3 lines Update distutils.util tests after my changes to --with-universal-archs ........ --- tests/test_util.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index e9065ff59c..84caea5cac 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -142,15 +142,35 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From 99db2f54d353469fd4b48398994461efbbf61dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 22 Sep 2009 10:14:51 +0000 Subject: [PATCH 2555/8469] Merged revisions 75013 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75013 | tarek.ziade | 2009-09-22 12:08:13 +0200 (Tue, 22 Sep 2009) | 10 lines Merged revisions 74812 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74812 | ronald.oussoren | 2009-09-15 23:24:07 +0200 (Tue, 15 Sep 2009) | 3 lines Update distutils.util tests after my changes to --with-universal-archs ........ ................ --- tests/test_util.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index c0acf5f481..795edb8cdc 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -115,15 +115,35 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From 7596dc0cf93965df85e36dcbca683270f5e9ded2 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 22 Sep 2009 17:25:53 +0200 Subject: [PATCH 2556/8469] Name changes of the parameters. --HG-- branch : distribute extra : rebase_source : fc921b526cda13b02a4bb0215f91ee04d03dca57 --- distribute.egg-info/entry_points.txt | 8 ++++---- docs/python3.txt | 24 ++++++++++++------------ docs/setuptools.txt | 8 ++++---- setup.py | 6 +++--- setuptools/__init__.py | 6 +----- setuptools/command/build_py.py | 8 ++++---- setuptools/command/test.py | 4 ++-- setuptools/dist.py | 6 +++--- 8 files changed, 33 insertions(+), 37 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 7d44c6be0a..a1ea4ecedd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -31,19 +31,19 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -additional_2to3_fixers = setuptools.dist:assert_string_list dependency_links = setuptools.dist:assert_string_list entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras -run_2to3 = setuptools.dist:assert_bool package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list include_package_data = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data namespace_packages = setuptools.dist:check_nsp @@ -51,7 +51,7 @@ test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable -convert_doctests_2to3 = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements [setuptools.installation] diff --git a/docs/python3.txt b/docs/python3.txt index 19a2b26853..9ae9573506 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -6,7 +6,7 @@ Starting with version 0.6.2, Distribute supports Python 3. Installing and using distribute for Python 3 code works exactly the same as for Python 2 code, but Distribute also helps you to support Python 2 and Python 3 from the same source code by letting you run 2to3 on the code as a part of the -build process. by setting the keyword parameter ``run_2to3`` to True. +build process. by setting the keyword parameter ``use_2to3`` to True. Distrubute as help during porting @@ -18,7 +18,7 @@ setup.py so that you can run the unit tests with ``python setup.py test``. See :ref:`test` for more information on this. -Once you have the tests running under Python 2, you can add the run_2to3 +Once you have the tests running under Python 2, you can add the use_2to3 keyword parameters to setup(), and start running the tests under Python 3. The test command will now first run the build command during which the code will be converted with 2to3, and the tests will then be run from the build @@ -27,11 +27,11 @@ directory, as opposed from the source directory as is normally done. Distribute will convert all Python files, and also all doctests in Python files. However, if you have doctests located in separate text files, these will not automatically be converted. By adding them to the -``convert_doctests_2to3`` keyword parameter Distrubute will convert them as +``convert_2to3_doctests`` keyword parameter Distrubute will convert them as well. By default, the conversion uses all fixers in the ``lib2to3.fixers`` package. -To use additional fixes, the parameter ``additional_2to3_fixers`` can be set +To use additional fixes, the parameter ``use_2to3_fixers`` can be set to a list of names of packages containing fixers. A typical setup.py can look something like this:: @@ -46,9 +46,9 @@ A typical setup.py can look something like this:: package_dir = {'': 'src'}, packages = ['your', 'you.module'], test_suite = 'your.module.tests', - run_2to3 = True, - convert_doctests_2to3 = ['src/your/module/README.txt'], - additional_2to3_fixers = ['your.fixers'] + use_2to3 = True, + convert_2to3_doctests = ['src/your/module/README.txt'], + use_2to3_fixers = ['your.fixers'] ) Differential conversion @@ -59,7 +59,7 @@ if the source file has been changed. If you add a file to the doctests that should be converted, it will not be converted the next time you run the tests, since it hasn't been modified. You need to remove it from the build directory. Also if you run the build, install or test commands before -adding the run_2to3 parameter, you will have to remove the build directory +adding the use_2to3 parameter, you will have to remove the build directory before you run the test command, as the files otherwise will seem updated, and no conversion will happen. @@ -84,7 +84,7 @@ list ``setuptools.commands.build_py.build_py.fixers``, which then contains the list of all fixer class names. If you don't want to run the 2to3 conversion on the doctests in Python files, -you can turn that off by setting ``setuptools.run_2to3_on_doctests = False``. +you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. Note on compatibility with setuptools ===================================== @@ -101,9 +101,9 @@ dict and pass that dict into setup():: extra = {} if sys.version_info >= (3,): - extra['run_2to3'] = True - extra['convert_doctests_2to3'] = ['src/your/module/README.txt'] - extra['additional_2to3_fixers'] = ['your.fixers'] + extra['use_2to3'] = True + extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] + extra['use_2to3_fixers'] = ['your.fixers'] setup(name='your.module', version = '1.0', diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d4c11a0f61..06f632ecc7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -404,16 +404,16 @@ unless you need the associated ``setuptools`` feature. mess with it. For more details on how this argument works, see the section below on `Automatic Resource Extraction`_. -``run_2to3`` +``use_2to3`` Convert the source code from Python 2 to Python 3 with 2to3 during the build process. See :doc:`python3` for more details. -``convert_doctests_2to3`` +``convert_2to3_doctests`` List of doctest source files that need to be converted with 2to3. See :doc:`python3` for more details. -``additional_2to3_fixers`` - A list of modules to serach for additional fixers to be used during +``use_2to3_fixers`` + A list of modules to search for additional fixers to be used during the 2to3 conversion. See :doc:`python3` for more details. diff --git a/setup.py b/setup.py index a9a66918a0..65376bf93f 100755 --- a/setup.py +++ b/setup.py @@ -97,9 +97,9 @@ def _being_installed(): "include_package_data = setuptools.dist:assert_bool", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", - "run_2to3 = setuptools.dist:assert_bool", - "convert_doctests_2to3 = setuptools.dist:assert_string_list", - "additional_2to3_fixers = setuptools.dist:assert_string_list", + "use_2to3 = setuptools.dist:assert_bool", + "convert_2to3_doctests = setuptools.dist:assert_string_list", + "use_2to3_fixers = setuptools.dist:assert_string_list", ], "egg_info.writers": [ diff --git a/setuptools/__init__.py b/setuptools/__init__.py index ac5e6e5e3b..d03d0bf08b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -24,14 +24,10 @@ bootstrap_install_from = None -# Should we run 2to3 on all Python files, in Python 3.x? -# Default: no; assume that a distribution installed for 3.x is already -# written in 3.x -run_2to3 = False # Default value if run_2to3 argument not given. # If we run 2to3 on .py files, should we also convert docstrings? # Default: yes; assume that we can detect doctests reliably run_2to3_on_doctests = True -# Package names for fixer packages +# Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] def find_packages(where='.', exclude=()): diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 910d67c8cb..a01e28430a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -23,7 +23,7 @@ class Mixin2to3(_Mixin2to3): def run_2to3(self, files, doctests = False): # See of the distribution option has been set, otherwise check the # setuptools default. - if self.distribution.run_2to3 is not True and setuptools.run_2to3 is False: + if self.distribution.use_2to3 is not True: return if not files: return @@ -32,8 +32,8 @@ def run_2to3(self, files, doctests = False): self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: self.fixer_names.extend(get_fixers_from_package(p)) - if self.distribution.additional_2to3_fixers is not None: - for p in self.distribution.additional_2to3_fixers: + if self.distribution.use_2to3_fixers is not None: + for p in self.distribution.use_2to3_fixers: self.fixer_names.extend(get_fixers_from_package(p)) if doctests: if setuptools.run_2to3_on_doctests: @@ -137,7 +137,7 @@ def build_package_data(self): srcfile = os.path.join(src_dir, filename) outf, copied = self.copy_file(srcfile, target) srcfile = os.path.abspath(srcfile) - if copied and srcfile in self.distribution.convert_doctests_2to3: + if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 0f96e83ac1..b7aef9697a 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,4 +1,4 @@ -from setuptools import Command, run_2to3 +from setuptools import Command from distutils.errors import DistutilsOptionError import sys from pkg_resources import * @@ -81,7 +81,7 @@ def finalize_options(self): def with_project_on_sys_path(self, func): - if getattr(self.distribution, 'run_2to3', run_2to3): + if getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date diff --git a/setuptools/dist.py b/setuptools/dist.py index 531c94f440..2246ab96dd 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -255,11 +255,11 @@ def finalize_options(self): if value is not None: ep.require(installer=self.fetch_build_egg) ep.load()(self, ep.name, value) - if getattr(self, 'convert_doctests_2to3', None): + if getattr(self, 'convert_2to3_doctests', None): # XXX may convert to set here when we can rely on set being builtin - self.convert_doctests_2to3 = [os.path.abspath(p) for p in self.convert_doctests_2to3] + self.convert_2to3_doctests = [os.path.abspath(p) for p in self.convert_2to3_doctests] else: - self.convert_doctests_2to3 = [] + self.convert_2to3_doctests = [] def fetch_build_egg(self, req): """Fetch an egg needed for building""" From 1502d7426ed56d8235426db13e6cda4f4609f8a4 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 22 Sep 2009 17:33:49 +0200 Subject: [PATCH 2557/8469] Fixed a bug that gave a traceback when doing install --help under Python 3. --HG-- branch : distribute extra : rebase_source : 9fcc8ddc5a2f8f57660d940375e1356c9a600ac3 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index fb27451851..69e62190d9 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -245,7 +245,7 @@ def _remove_flat_installation(placeholder): def after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib - if not os.path.exists(placeholder): + if not placeholder or not os.path.exists(placeholder): log.warn('Could not find the install location') return pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1]) From 4d3db0dfec6a8abe6a78b20fb311dda6228fd43f Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 22 Sep 2009 17:42:15 +0200 Subject: [PATCH 2558/8469] Wrong file mode when creating bdists under Python 3.1. --HG-- branch : distribute extra : rebase_source : 3af8cc2ab10edeeeb75b03e1a63e8de008142176 --- setuptools/command/install_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 00c8122114..dd95552e0b 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -87,7 +87,7 @@ def install_namespaces(self): filename += '-nspkg.pth'; self.outputs.append(filename) log.info("Installing %s",filename) if not self.dry_run: - f = open(filename,'wb') + f = open(filename,'wt') for pkg in nsp: pth = tuple(pkg.split('.')) trailer = '\n' From 4c66627839fa1384e17f427eebf17adbc807376d Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 22 Sep 2009 19:27:44 +0000 Subject: [PATCH 2559/8469] Half of the fix for issue 6957: ensure that distutils ignores the '-isysroot' option on OSX when the corresponding SDK is not installed. This ensures that the user can compile extensions on OSX 10.6 using the Python.org installer and a default installation of Xcode. --- sysconfig.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index dcc7231ac5..6ca6720adb 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -592,6 +592,29 @@ def get_config_vars(*args): flags = flags + ' ' + arch _config_vars[key] = flags + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: From f7a196298b22da695467cb9494743ce15683fca2 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 22 Sep 2009 19:31:34 +0000 Subject: [PATCH 2560/8469] Merged revisions 75022 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75022 | ronald.oussoren | 2009-09-22 21:27:44 +0200 (Tue, 22 Sep 2009) | 8 lines Half of the fix for issue 6957: ensure that distutils ignores the '-isysroot' option on OSX when the corresponding SDK is not installed. This ensures that the user can compile extensions on OSX 10.6 using the Python.org installer and a default installation of Xcode. ........ --- sysconfig.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 6f99de28e3..8306202fb3 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -566,6 +566,29 @@ def get_config_vars(*args): flags = flags + ' ' + arch _config_vars[key] = flags + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: From e7932397a19380975ae6401d2f13f2f5d6ddb716 Mon Sep 17 00:00:00 2001 From: agronholm Date: Wed, 23 Sep 2009 01:57:24 +0300 Subject: [PATCH 2561/8469] PEP8 fixes --HG-- branch : distribute extra : rebase_source : ff3b0f50ec60054fd05b809edf77740ff7b506ec --- distribute_setup.py | 154 ++++++++++++++++++++++++-------------------- 1 file changed, 84 insertions(+), 70 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index fb27451851..e7630695f9 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -22,12 +22,27 @@ import os import time import fnmatch -from distutils import log +import tempfile +import tarfile import subprocess +from distutils import log + IS_JYTHON = sys.platform.startswith('java') DEFAULT_VERSION = "0.6.2" -DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +SETUPTOOLS_PKG_INFO = """\ +Metadata-Version: 1.0 +Name: setuptools +Version: 0.6c9 +Summary: xxxx +Home-page: xxx +Author: xxx +Author-email: xxx +License: xxx +Description: xxx +""" + def quote(c): if sys.platform == 'win32': @@ -35,6 +50,7 @@ def quote(c): return '"%s"' % c return c + def python_cmd(cmd): python = quote(sys.executable) cmd = quote(cmd) @@ -43,6 +59,7 @@ def python_cmd(cmd): args = [os.P_WAIT, python, python] + cmd.split() + [os.environ] return os.spawnle(*args) == 0 + def _install(tarball): # extracting the tarball tmpdir = tempfile.mkdtemp() @@ -65,6 +82,7 @@ def _install(tarball): finally: os.chdir(old_wd) + def _build_egg(tarball, to_dir=os.curdir): # extracting the tarball tmpdir = tempfile.mkdtemp() @@ -94,6 +112,7 @@ def _build_egg(tarball, to_dir=os.curdir): finally: os.chdir(old_wd) + def _do_download(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): tarball = download_setuptools(version, download_base, @@ -103,11 +122,11 @@ def _do_download(version=DEFAULT_VERSION, download_base=DEFAULT_URL, import setuptools setuptools.bootstrap_install_from = egg -def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - download_delay=15 -): - was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules + +def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, + to_dir=os.curdir, download_delay=15): + was_imported = 'pkg_resources' in sys.modules or \ + 'setuptools' in sys.modules try: import pkg_resources if not hasattr(pkg_resources, '_distribute'): @@ -115,15 +134,15 @@ def use_setuptools( except ImportError: return _do_download(version, download_base, to_dir, download_delay) try: - pkg_resources.require("distribute>="+version); return + pkg_resources.require("distribute>="+version) + return except pkg_resources.VersionConflict, e: if was_imported: print >>sys.stderr, ( "The required version of distribute (>=%s) is not available, and\n" "can't be installed while this script is running. Please install\n" " a more recent version first, using 'easy_install -U distribute'." - "\n\n(Currently using %r)" - ) % (version, e.args[0]) + "\n\n(Currently using %r)") % (version, e.args[0]) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok @@ -131,16 +150,16 @@ def use_setuptools( except pkg_resources.DistributionNotFound: return _do_download(version, download_base, to_dir, download_delay) -def download_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - delay=15, -): + +def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, + to_dir=os.curdir, delay=15): """Download distribute from a specified location and return its filename `version` should be a valid distribute version number that is available as an egg for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. - `delay` is the number of seconds to pause before an actual download attempt. + `delay` is the number of seconds to pause before an actual download + attempt. """ import urllib2 tgz_name = "distribute-%s.tar.gz" % version @@ -149,7 +168,6 @@ def download_setuptools( src = dst = None if not os.path.exists(saveto): # Avoid repeated downloads try: - from distutils import log log.warn("Downloading %s", url) src = urllib2.urlopen(url) # Read/write all in one block, so we don't create a corrupt file @@ -165,18 +183,6 @@ def download_setuptools( return os.path.realpath(saveto) -SETUPTOOLS_PKG_INFO = """\ -Metadata-Version: 1.0 -Name: setuptools -Version: 0.6c9 -Summary: xxxx -Home-page: xxx -Author: xxx -Author-email: xxx -License: xxx -Description: xxx -""" - def _patch_file(path, content): """Will backup the file then patch it""" existing_content = open(path).read() @@ -193,9 +199,11 @@ def _patch_file(path, content): f.close() return True + def _same_content(path, content): return open(path).read() == content + def _rename_path(path): new_name = path + '.OLD.%s' % time.time() log.warn('Renaming %s into %s' % (path, new_name)) @@ -210,6 +218,7 @@ def _violation(*args): os.rename(path, new_name) return new_name + def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): log.warn('Unkown installation at %s' % placeholder) @@ -242,6 +251,7 @@ def _remove_flat_installation(placeholder): 'Setuptools distribution' % element) return True + def after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib @@ -268,6 +278,7 @@ def after_install(dist): finally: f.close() + def _patch_egg_dir(path): # let's check if it's already patched pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') @@ -286,10 +297,12 @@ def _patch_egg_dir(path): f.close() return True + def before_install(): log.warn('Before install bootstrap.') fake_setuptools() + def _under_prefix(location): if 'install' not in sys.argv: return True @@ -307,6 +320,7 @@ def _under_prefix(location): return location.startswith(USER_SITE) return True + def fake_setuptools(): log.warn('Scanning installed packages') try: @@ -352,63 +366,63 @@ def fake_setuptools(): log.warn('Patched done.') _relaunch() + def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process - args = [sys.executable] + sys.argv + args = [sys.executable] + sys.argv if IS_JYTHON: sys.exit(subprocess.call(args)) else: sys.exit(os.spawnv(os.P_WAIT, sys.executable, args)) -import tempfile -import tarfile def extractall(self, path=".", members=None): - """Extract all members from the archive to the current working - directory and set owner, modification time and permissions on - directories afterwards. `path' specifies a different directory - to extract to. `members' is optional and must be a subset of the - list returned by getmembers(). - """ - import copy - import operator - from tarfile import ExtractError - directories = [] - - if members is None: - members = self - - for tarinfo in members: - if tarinfo.isdir(): - # Extract directories with a safe mode. - directories.append(tarinfo) - tarinfo = copy.copy(tarinfo) - tarinfo.mode = 0700 - self.extract(tarinfo, path) - - # Reverse sort directories. - directories.sort(key=operator.attrgetter('name')) - directories.reverse() - - # Set correct owner, mtime and filemode on directories. - for tarinfo in directories: - dirpath = os.path.join(path, tarinfo.name) - try: - self.chown(tarinfo, dirpath) - self.utime(tarinfo, dirpath) - self.chmod(tarinfo, dirpath) - except ExtractError, e: - if self.errorlevel > 1: - raise - else: - self._dbg(1, "tarfile: %s" % e) + """Extract all members from the archive to the current working + directory and set owner, modification time and permissions on + directories afterwards. `path' specifies a different directory + to extract to. `members' is optional and must be a subset of the + list returned by getmembers(). + """ + import copy + import operator + from tarfile import ExtractError + directories = [] + + if members is None: + members = self + + for tarinfo in members: + if tarinfo.isdir(): + # Extract directories with a safe mode. + directories.append(tarinfo) + tarinfo = copy.copy(tarinfo) + tarinfo.mode = 0700 + self.extract(tarinfo, path) + + # Reverse sort directories. + directories.sort(key=operator.attrgetter('name')) + directories.reverse() + + # Set correct owner, mtime and filemode on directories. + for tarinfo in directories: + dirpath = os.path.join(path, tarinfo.name) + try: + self.chown(tarinfo, dirpath) + self.utime(tarinfo, dirpath) + self.chmod(tarinfo, dirpath) + except ExtractError, e: + if self.errorlevel > 1: + raise + else: + self._dbg(1, "tarfile: %s" % e) + def main(argv, version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" tarball = download_setuptools() _install(tarball) + if __name__ == '__main__': main(sys.argv[1:]) - From f6611f2dd63baa7d7dad127d23cdcc4a6487802e Mon Sep 17 00:00:00 2001 From: agronholm Date: Wed, 23 Sep 2009 02:02:24 +0300 Subject: [PATCH 2562/8469] Convert string template arguments in logger calls to logger arguments --HG-- branch : distribute extra : rebase_source : 1b7daa92fb9bd814a4028ec9d51774bfbeff41f3 --- distribute_setup.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index e7630695f9..e8a1f2913b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -63,7 +63,7 @@ def python_cmd(cmd): def _install(tarball): # extracting the tarball tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s' % tmpdir) + log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) @@ -74,7 +74,7 @@ def _install(tarball): # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) - log.warn('Now working in %s' % subdir) + log.warn('Now working in %s', subdir) # installing log.warn('Installing Distribute') @@ -86,7 +86,7 @@ def _install(tarball): def _build_egg(tarball, to_dir=os.curdir): # extracting the tarball tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s' % tmpdir) + log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) @@ -97,10 +97,10 @@ def _build_egg(tarball, to_dir=os.curdir): # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) - log.warn('Now working in %s' % subdir) + log.warn('Now working in %s', subdir) # building an egg - log.warn('Building a Distribute egg in %s' % to_dir) + log.warn('Building a Distribute egg in %s', to_dir) python_cmd('setup.py -q bdist_egg --dist-dir %s' % to_dir) # returning the result @@ -206,7 +206,7 @@ def _same_content(path, content): def _rename_path(path): new_name = path + '.OLD.%s' % time.time() - log.warn('Renaming %s into %s' % (path, new_name)) + log.warn('Renaming %s into %s', path, new_name) try: from setuptools.sandbox import DirectorySandbox def _violation(*args): @@ -221,7 +221,7 @@ def _violation(*args): def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): - log.warn('Unkown installation at %s' % placeholder) + log.warn('Unkown installation at %s', placeholder) return False found = False for file in os.listdir(placeholder): @@ -239,7 +239,7 @@ def _remove_flat_installation(placeholder): patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) if not patched: - log.warn('%s already patched.' % pkg_info) + log.warn('%s already patched.', pkg_info) return False # now let's move the files out of the way for element in ('setuptools', 'pkg_resources.py', 'site.py'): @@ -248,7 +248,7 @@ def _remove_flat_installation(placeholder): _rename_path(element) else: log.warn('Could not find the %s element of the ' - 'Setuptools distribution' % element) + 'Setuptools distribution', element) return True @@ -262,16 +262,16 @@ def after_install(dist): setuptools_file = 'setuptools-0.6c9-py%s.egg-info' % pyver pkg_info = os.path.join(placeholder, setuptools_file) if os.path.exists(pkg_info): - log.warn('%s already exists' % pkg_info) + log.warn('%s already exists', pkg_info) return - log.warn('Creating %s' % pkg_info) + log.warn('Creating %s', pkg_info) f = open(pkg_info, 'w') try: f.write(SETUPTOOLS_PKG_INFO) finally: f.close() pth_file = os.path.join(placeholder, 'setuptools.pth') - log.warn('Creating %s' % pth_file) + log.warn('Creating %s', pth_file) f = open(pth_file, 'w') try: f.write(os.path.join(os.curdir, setuptools_file)) @@ -284,7 +284,7 @@ def _patch_egg_dir(path): pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') if os.path.exists(pkg_info): if _same_content(pkg_info, SETUPTOOLS_PKG_INFO): - log.warn('%s already patched.' % pkg_info) + log.warn('%s already patched.', pkg_info) return False _rename_path(path) os.mkdir(path) @@ -336,7 +336,7 @@ def fake_setuptools(): return # detecting if it was already faked setuptools_location = setuptools_dist.location - log.warn('Setuptools installation detected at %s' % setuptools_location) + log.warn('Setuptools installation detected at %s', setuptools_location) # if --root or --preix was provided, and if # setuptools is not located in them, we don't patch it From 2e5e7b750801a07eed519303d95799f0760b576b Mon Sep 17 00:00:00 2001 From: agronholm Date: Wed, 23 Sep 2009 02:35:15 +0300 Subject: [PATCH 2563/8469] Get rid of the ugly Jython hack since the subprocess module is now always available --HG-- branch : distribute extra : rebase_source : 029d8b3ffa7c7ed71ae2fcae0cfb969624cc67d0 --- distribute_setup.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index e8a1f2913b..836869320b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -28,7 +28,6 @@ from distutils import log -IS_JYTHON = sys.platform.startswith('java') DEFAULT_VERSION = "0.6.2" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ @@ -54,10 +53,7 @@ def quote(c): def python_cmd(cmd): python = quote(sys.executable) cmd = quote(cmd) - if IS_JYTHON: - return subprocess.Popen([python, cmd]).wait() == 0 - args = [os.P_WAIT, python, python] + cmd.split() + [os.environ] - return os.spawnle(*args) == 0 + return subprocess.call([python, cmd]) def _install(tarball): @@ -371,10 +367,7 @@ def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process args = [sys.executable] + sys.argv - if IS_JYTHON: - sys.exit(subprocess.call(args)) - else: - sys.exit(os.spawnv(os.P_WAIT, sys.executable, args)) + sys.exit(subprocess.call(args)) def extractall(self, path=".", members=None): From 269f12efa9ac5640bb9ad4a79c26e77c66f1a950 Mon Sep 17 00:00:00 2001 From: agronholm Date: Wed, 23 Sep 2009 03:10:40 +0300 Subject: [PATCH 2564/8469] Fix python_cmd return value --HG-- branch : distribute extra : rebase_source : 09f20b70ead91373507168c66a1f709a4eaba4f5 --- distribute_setup.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 836869320b..e099b37b86 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -43,17 +43,9 @@ """ -def quote(c): - if sys.platform == 'win32': - if ' ' in c: - return '"%s"' % c - return c - - -def python_cmd(cmd): - python = quote(sys.executable) - cmd = quote(cmd) - return subprocess.call([python, cmd]) +def python_cmd(*args): + args = (sys.executable,) + args + return subprocess.call(args) == 0 def _install(tarball): @@ -74,7 +66,7 @@ def _install(tarball): # installing log.warn('Installing Distribute') - assert python_cmd('setup.py install') + assert python_cmd('setup.py', 'install') finally: os.chdir(old_wd) From dea50c23d3d3f68f0dcd7bcf8a81b163a2c4e1c0 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 23 Sep 2009 09:50:14 +0200 Subject: [PATCH 2565/8469] Merging. --HG-- branch : distribute extra : rebase_source : 47f74854f8677234b45cf13c5ce6517c0eeb8358 --- distribute.egg-info/entry_points.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index a1ea4ecedd..4bbb6848df 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -7,6 +7,7 @@ build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register +upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -31,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.4 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 758eba50d92348b0f1ba43a2e6ee3a842f49ffed Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Thu, 24 Sep 2009 12:59:56 +0200 Subject: [PATCH 2566/8469] Apparently a __ne__ method is necessary, at least under Python 2.4, or you risk having both Distr1 == Distr2 be True, while Distr1 != Distr2 is also True. --HG-- branch : distribute extra : rebase_source : 3128c7105c4fdabd1bfceb105ca57cfb371eacec --- pkg_resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 7c3d58fbe9..4babb48e49 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2064,6 +2064,8 @@ def __eq__(self, other): # It's not a Distribution, so they are not equal return False return self.hashcmp == other.hashcmp + def __ne__(self, other): + return not self == other # These properties have to be lazy so that we don't have to load any # metadata until/unless it's actually needed. (i.e., some distributions From efa78ba0a0e1f89b92da4fa0fa6e5e029efecf3f Mon Sep 17 00:00:00 2001 From: agronholm Date: Fri, 25 Sep 2009 22:01:27 +0300 Subject: [PATCH 2567/8469] Fix script launcher creation on 64-bit Windows, patch by Jason R. Coombs (http://bugs.python.org/setuptools/issue2) --HG-- branch : distribute extra : rebase_source : 60c07b0639b77a3e8ff13eb12161ebe03ab47430 --- launcher.c | 14 +++++++++++--- msvc-build-launcher.cmd | 15 +++++++++++++++ setuptools/cli-32.exe | Bin 0 -> 65536 bytes setuptools/cli-64.exe | Bin 0 -> 74240 bytes setuptools/cli.exe | Bin 6656 -> 0 bytes setuptools/command/easy_install.py | 5 +++-- setuptools/gui-32.exe | Bin 0 -> 65536 bytes setuptools/gui-64.exe | Bin 0 -> 74240 bytes setuptools/gui.exe | Bin 7168 -> 0 bytes 9 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 msvc-build-launcher.cmd create mode 100644 setuptools/cli-32.exe create mode 100644 setuptools/cli-64.exe delete mode 100755 setuptools/cli.exe create mode 100644 setuptools/gui-32.exe create mode 100644 setuptools/gui-64.exe delete mode 100755 setuptools/gui.exe diff --git a/launcher.c b/launcher.c index c8022505f4..0dca2e168b 100755 --- a/launcher.c +++ b/launcher.c @@ -25,8 +25,9 @@ #include #include -#include +#include #include +#include "tchar.h" #include "windows.h" int fail(char *format, char *data) { @@ -236,11 +237,18 @@ int run(int argc, char **argv, int is_gui) { } /* We *do* need to wait for a CLI to finish, so use spawn */ - return spawnv(P_WAIT, ptr, (const char * const *)(newargs)); + return _spawnv(_P_WAIT, ptr, (const char * const *)(newargs)); } - +/* int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpCmd, int nShow) { return run(__argc, __argv, GUI); } +*/ + +int _tmain(int argc, _TCHAR* argv[]) +{ + return run(argc, argv, GUI); +} + diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd new file mode 100644 index 0000000000..3666d723a8 --- /dev/null +++ b/msvc-build-launcher.cmd @@ -0,0 +1,15 @@ +@echo off + +REM VCVARSALL may be in Program Files or Program Files (x86) +PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC;%PATH% +PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH% + +REM set up the environment to compile to x86 +call VCVARSALL x86 +cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/cli-32.exe +cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/gui-32.exe + +REM now for 64-bit +call VCVARSALL x86_amd64 +cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/cli-64.exe +cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/gui-64.exe \ No newline at end of file diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe new file mode 100644 index 0000000000000000000000000000000000000000..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W&nU>F^f z2rL6ifl!)xgyjKSfUf~h1IK|s0rAAU4#)&bfdB5lza;t)IpAjt{zB~@xXy(9|K|Sh H=z;$OkJaYk literal 0 HcmV?d00001 diff --git a/setuptools/cli-64.exe b/setuptools/cli-64.exe new file mode 100644 index 0000000000000000000000000000000000000000..cc7ced507f4bddb38dad3093514e3b58b469dbc3 GIT binary patch literal 74240 zcmeFadw5jU^*=n5nIS`x;e^XT6p;Z24F)k9F9`!W2PS$(CK?OcXi;OMl!})K=Kxl~ z#51uOwo_?qTYIP0wpM$wts)o2gg`FbLD3*qf_T}(s07g@T+i>b_MS-s>i743-uHRl zzur7BXPIai;J72k*XTlE;(f zPgR|LI_n2F{{HR>>Hl+Y9X%l;-tU<(1kcZRem-Fao;Pjlm@rQ~k4z{P&yOdJ6VERv z+<@n|zF#$$>i8yz%S&yxyB~Mj2EX^Ga5_(?ZJaGTW1!9UCSvZDv7H21t_TP1^q_Et z&E}#X{H33^YNQg<@CW?Wqzk3WB34$Ceo($t3pP15gKtRto44g3&5)b~_B5E6ero2_!v{JZbc@3Pr85|F6Vb`k!!E~LUP_$@*(U0|M&kT2DI30zx&&o`H4?s z?`Z58pP6a1X>qMG!kRSpHs9*PE1T^vTunr!nHzm~B7UP5t8iD z%iHxH^}0u^YtXL{;IDC_6Z|`Fif*UqA?j+1(%4RbX?b501rYd~2mnPunZ(xCtyF*B zx3$_&DlySC=F)}$j3VGL>Ms{Ddo|X$e4xgTCkJU(L(Q>E3}@wndAD{60Ry0}iyrUuaY67;ueXaJCYyLGXVnyh9d#Cx@~{ z{6W4`3_U`c)uuTbYl>&<9+9F28s}#>Bb(KVNF%A4cl&+)0U^-91tV+=Uq{GKy(d8d zTljBJTb9P2kbN!M$_D~kjs3=7Lw&E^NJ#m=($wcfnuP=(Yh8;`u<;!OKu`Nhi#}Dy zoUg@-BdkMXhtZ(bqO4c=LujL}!8j6JeidSZ(JuWvL1q1ReyfPrU8QxO>fvC`X`;KP z4i02I~!=WK;52 zXX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o8gxCxG<(elH!C>ho(B$f+)k@!Sh;M?aR;R1jA z{jCQ+Zx1Yc&;9cskA6Na6kq07=P9>l0`dbr?(xEV`H%i2KaqkA%}rbIS@TL|@}3fW zPYu4aY^XFVg8tb-myciNpNA`D^O383N^xC)e8%H|N=$|uxuKxY`#^VK_`vtS6#r7;p?v=5x$&3$S#5P)^7lWZFD^~Yw%T`TV(R~l_Dd@+ zIR%0{`z5D<>wiuk(31b=Q(~E3>e_z4`BW zM5U1X^vmB~`?gD4_jd8yH-yEs9&3)D_+2aXn(KF1DbxPlq79`6V}{o73ljd79^Z~l z>6gP_`!4kySXVKF9QwHf*suJ+tz~@Z*7n4uXnQDM;)^R|E%=W79())5`9LkO9gscu znCVuy$K$xNmv6xVs#wbt-6aediJAu_e7LWnBfmy&*zy%}# z@jx8l0PKJUbo~iivcOrO184_K;52X&I0hU7_5%`sAMR7Y9^jk6gFqdy9oP!!Kq0Ua z$N&b}`{sa*@eJBgz#RAi2CV)P>7&P0$-(uy1U$vkjH{eukSMSs%Y5-0TYR#@pf zKD78FS=lQ?LH{8)EA6jK-$A<)(Z(lpJXC@3XQAs0$WP{CGH^Q}^XDIdp8~G~XMkaJ zOd_xhCZn8C;|Sv|NfHbL*#&;E%*zyd*C_~^8cIr IzoQ5K59B51SpWb4 literal 0 HcmV?d00001 diff --git a/setuptools/gui-64.exe b/setuptools/gui-64.exe new file mode 100644 index 0000000000000000000000000000000000000000..7fbfb88973f21f7e2314e0634bd006b4cc39689f GIT binary patch literal 74240 zcmeFadwf*Y)jvFwnIS`x;e^XT5Rm}}1)~^E)r0|=0~0+X6UBlW6*V?W@gBoDfE6+E zOl&6GskGXvtxrp>ZMC+2dXuYSLLdqEiy}d+1hKk@Q3;|+xSrp4?LCtO)aUnn-uLr) z|9bO*Is5GE+H0@9*4k^Yy-(?_OKlFD&E~{^%d**4;z@r&@%umja3l{HwR(WaGWU6?Z-K(8Id#2lx1@jE8*pKI98sKg;*v!*|~^(c{VT zr>f3Ao%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WY z4nfWmNO*yw>o0DBqJuAPf#(^wz$=Zr6u88=MF(AU$0fW#(E}H^K+*9Q+yshVw)hJa tU0v}Pc#?4o6n$Fp7bv>25?i>}^!#7>{eP^m`a=K! literal 0 HcmV?d00001 diff --git a/setuptools/gui.exe b/setuptools/gui.exe deleted file mode 100755 index 53d4ff81af0e50b1996de048db0726d561613809..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7168 zcmeHM4Qx}_6~1;1I3bDM5?W{jHPrM+YqO-K6Bz^y!J(7@p^%L=3C1K2ahKSZ{azpw z*_=6^czU&zb5OFop;Z<=iGC?d+xdKT_+o#=wKO)F#||d8S6q%&BmXf{s=;yd)G_3>_q0- zMP0h`vx~MhxC0iS-@DuIY_ilkJsz)M+2ykMMUTbpv8>&^)zajxa~0&|WLcB0E9{Jw z>t?WmK^Nog7l09Z$(eC1w`nG$2j5EfvD$gC!P?@XSo`JMYE*| zGzTr&X+i~K=O_XH<5nQJ_6mq;%f*8L5lt)tJeq~EodtDH!3n-FIY4V>c_d6W8)MM| zzh;Q#XvSoB8wr!mhHwSD0s$KF(ZfcMn_H0lxix=0H{_JC&6{p(gWdFzFQm^}1}dd@ zL&Ni=nsK?(SaeGft4J93n8}Wv63GUb7H!-qhtn+R+TJ3C%z6xRA)t_ zl7JXHlQEt|jGre}YJcL{l4oF?crzLG6oHe+es6B3ml{`0p3&a6a7-?Xk>lXwIH=x<_0@BGF3Z-nTvKmu0Oc6+$r~G{uB3v3#;xtIOjPhK9O(k%Y@JR-% z^5RU!q;BPD*hu+S zMZWvGVfyv2Ve_(O(I}1GI0c;Qui1yc8hbO+qV{4QL5!?jl|l2i(Q54@akf~BtvLk+ zdzl`^*IFMAu2@(tW~@#u1hZJ26Yl$VW?WyrW_`HtJ7dHoW^j8`r(xlK{hHF^kM^BS zvsoNpqhqptB-E2#wZl{drvj%A};u^2o!J{G{ZNue=g_J~g=uDlrwGRk$g4e$+ z8sepDwW%|sbbqWpD*i1J9=w5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lfmPMbS{nQm9xW%O>ZCiAA|yO`QIO`zS7kg;){vkMKy^ zojHfbD5#YO&879;9PimtRo$K*FHeg%fOr$7z)NC_bP?53LO*By=C&c~Lz(PB>Jvlv zp8+pjkbW;4Wt&00fEntNs})Ff2R4Q`b%~NDUrLil(&XVZnXZsi{mo00v(sc-nru#! z?@N-D)jmL-8KcK0G&cC@j2x2Mih(L%RZ z3+}D8qTt-s=;BtTUa_&xLVw*Q1%^Ji`T4vrY+J?T3Lo9d*d@rmDPxB)#kGDmHrH{c>@w=xGEpJw8}${chCnT~lCA5Nc`eLz6Q1wL+6!o@Te->tSrACfC#d zUdX-za=;}xoIamJXz}r}7T|L2b<@8j*bsBLy}KB@OXp~Ee$(Z13Jq+B&f)bW4cc`y zUGw%dcweJi;6|96uXo}<8=9X*`dVjWqnBeW*4O*|ZjVq8nEAzWt_V;glC+vu$m z8(n4YM%N~16CY-qC&wR!c_WPmX>6 Date: Fri, 25 Sep 2009 23:34:18 +0200 Subject: [PATCH 2568/8469] make the bootstrap file py2.3+win32 compatible --HG-- branch : distribute extra : rebase_source : d75b734c889c3d23ad4df95066745d0d76588813 --- distribute_setup.py | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 3ed5bfb89b..4fe048753b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -13,20 +13,38 @@ This file can also be run as a script to install or upgrade setuptools. """ -try: - from site import USER_SITE -except ImportError: - USER_SITE = None - -import sys import os +import sys import time import fnmatch import tempfile import tarfile -import subprocess from distutils import log +try: + from site import USER_SITE +except ImportError: + USER_SITE = None + +try: + import subprocess + + def python_cmd(*args): + args = (sys.executable,) + args + return subprocess.call(args) == 0 + +except ImportError: + # will be used for python 2.3 + def python_cmd(*args): + args = (sys.executable,) + args + # quoting arguments if windows + if sys.platform == 'win32': + def quote(arg): + if ' ' in arg: + return '"%s"' % arg + return arg + args = [quote(arg) for arg in args] + return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 DEFAULT_VERSION = "0.6.2" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" @@ -43,11 +61,6 @@ """ -def python_cmd(*args): - args = (sys.executable,) + args - return subprocess.call(args) == 0 - - def _install(tarball): # extracting the tarball tmpdir = tempfile.mkdtemp() @@ -386,7 +399,9 @@ def extractall(self, path=".", members=None): self.extract(tarinfo, path) # Reverse sort directories. - directories.sort(key=operator.attrgetter('name')) + def sorter(dir1, dir2): + return cmp(dir1.name, dir2.name) + directories.sort(sorter) directories.reverse() # Set correct owner, mtime and filemode on directories. From 65c13cb2b3bcadd2e69f8032a32ef9fbbac6b3df Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 00:00:21 +0200 Subject: [PATCH 2569/8469] reorganized texts --HG-- branch : distribute extra : rebase_source : 82617065dd28e25a4f293e83d9c81a6cb1b56720 --- CONTRIBUTORS.txt | 13 ++++++++ README.txt | 86 ++++++++++++++++++++++++++++-------------------- 2 files changed, 63 insertions(+), 36 deletions(-) create mode 100644 CONTRIBUTORS.txt diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt new file mode 100644 index 0000000000..c4a84b702a --- /dev/null +++ b/CONTRIBUTORS.txt @@ -0,0 +1,13 @@ +============ +Contributors +============ + +* Alex Grönholm +* Hanno Schlichting +* Lennart Regebro +* Martin von Loewis +* Philip Envey +* Tarek Ziadé + +If you think you name is missing, please add it (alpha order by first name) + diff --git a/README.txt b/README.txt index 7adc47d888..30fb7ee200 100755 --- a/README.txt +++ b/README.txt @@ -11,10 +11,24 @@ Disclaimers About the fork ============== -`Distribute` is a friendly fork of the `Setuptools` project. The `Setuptools` -maintainer, Phillip J. Eby is not responsible of any aspect of this fork. +`Distribute` is a fork of the `Setuptools` project. -If you install `Distribute` and want to switch back for any reason to +Distribute is intended to replace Setuptools as the standard method +for working with Python module distributions. + +The fork has two goals: + +- Provides a backward compatible version to replace Setuptools + and make all distributions that depend on Setuptools work as + before, but with less bugs and behavior issues. + This version is also compatible with Python 3. + + This work is done in the 0.6.x series + +- Refactor the code, and release it in several distributions. + This work is done in the 0.7.x series but not yet released. + +If you install `Distribute` and want to switch back for any reason to `Setuptools`, get to the `Uninstallation instructions`_ section. About the installation process @@ -37,8 +51,9 @@ Installation Instructions Distribute is only released as a source distribution. -It can be installed using easy_install or pip, with the source tarball, with the -eggs distribution, or using the ``distribute_setup.py`` script provided online. +It can be installed using easy_install or pip, and can be done so with the source +tarball, the eggs distribution, or by using the ``distribute_setup.py`` script +provided online. ``distribute_setup.py`` is the simplest and preferred way on all systems. @@ -48,7 +63,7 @@ distribute_setup.py Download ``distribute_setup.py`` and execute it, using the Python interpreter of your choice. -If your shell has the `wget` program you can do:: +If your shell has the ``wget`` program you can do:: $ wget http://nightly.ziade.org/distribute_setup.py $ python distribute_setup.py @@ -64,11 +79,11 @@ Run easy_install or pip:: Source installation =================== -Download the source tarball, and uncompress it, then run the install command:: +Download the source tarball, uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.2.tar.gz - $ tar -xzvf distribute-0.6.2.tar.gz - $ cd distribute-0.6.2 + $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1.tar.gz + $ tar -xzvf distribute-0.6.1.tar.gz + $ cd distribute-0.6 $ python setup.py install --------------------------- @@ -76,29 +91,29 @@ Uninstallation Instructions --------------------------- Like other distutils-based distributions, Distribute doesn't provide an -uninstaller yet. It's all manual ! +uninstaller yet. It's all done manually! Distribute is installed in three steps: -1- it gets out of the way an existing installation of Setuptools -2- it installs a `fake` setuptools installation -3- it installs distribute +1. it gets out of the way an existing installation of Setuptools +2. it installs a `fake` setuptools installation +3. it installs distribute Distribute can be removed like this: -- run `easy_install -m Distribute`. This will remove the Distribute reference - from `easy-install.pth` *or* edit the file and remove it yourself. -- remove the distribute*.egg file located in your site-packages directory -- remove the setuptools.pth file located in you site-packages directory -- remove the easy_install script located in you sys.prefix/bin directory -- remove the setuptools*.egg directory located in your site-packages directory +- run ``easy_install -m Distribute``. This will remove the Distribute reference + from ``easy-install.pth``. Otherwise, edit the file and remove it yourself. +- remove the ``distribute*.egg`` file located in your site-packages directory +- remove the ``setuptools.pth`` file located in you site-packages directory +- remove the easy_install script located in you ``sys.prefix/bin`` directory +- remove the ``setuptools*.egg`` directory located in your site-packages directory, if any. If you want to get back to setuptools: - reinstall setuptools using its instruction. -Last: +Lastly: - remove the *.OLD.* directory located in your site-packages directory if any, **once you have checked everything was working correctly again**. @@ -107,7 +122,7 @@ Last: Install FAQ ----------- -- **Why Distribute turn my Setuptools installation into an fake one ?** +- **Why Distribute turn my Setuptools installation into an fake one?** Since Distribute is a fork, and since it provides the same package and modules, it fakes that the Setuptools installation is still present, so all the programs @@ -116,7 +131,7 @@ Install FAQ If it wasn't doing it, a program that would try to install Setuptools would overwrite in turn Distribute. -- **How does Distribute interacts with virtualenv ?** +- **How does Distribute interacts with virtualenv?** Everytime you create a virtualenv it will install setuptools, so you need to re-install Distribute in it right after. The Distribute project will not @@ -131,25 +146,24 @@ Install FAQ You need in this case to build a virtualenv with the --no-site-packages option or to install `Distribute` globally. -- **How does Distribute interacts with zc.buildout ?** +- **How does Distribute interact with zc.buildout?** + + Some work is being done on zc.buildout side to make its bootstrap + work with Distribute. Until then, using Distribute in zc.buildout is a bit + tricky. Like virtualenv, Distribute has to be installed after setuptools. The simplest - way is to add it in a `zc.recipe.egg` section so the job is done when you + way is to add it in a ``zc.recipe.egg`` section so the job is done when you build your buildout. If you are combining zc.buildout and virtualenv, you might fail in the problem described in the previous FAQ entry. - Last, you will need to use the provided special `bootstrap.py` file, - located in the buildout directory. - -------- -Credits -------- +----------------------------- +Feedback and getting involved +----------------------------- -* Tarek Ziadé -* Hanno Schlichting -* Many other people that helped on Distutils-SIG (please add your name here) -* Phillip Eby for the Setuptools project. +- Mailing list: http://mail.python.org/mailman/listinfo/distutils-sig +- Issue tracker: http://bitbucket.org/tarek/distribute/issues/ +- Code Repository: http://bitbucket.org/tarek/distribute - From 5730c613a0e6c6581145d508203446f11a0cb4a9 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 00:07:45 +0200 Subject: [PATCH 2570/8469] removed the salesy description --HG-- branch : distribute extra : rebase_source : 3382727121c2d8c2c07d464556803077e2b257e8 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 65376bf93f..fc4a9c6ad1 100755 --- a/setup.py +++ b/setup.py @@ -59,8 +59,8 @@ def _being_installed(): dist = setup( name="distribute", version=VERSION, - description="Download, build, install, upgrade, and uninstall Python " - "packages -- easily!", + description="Easily download, build, install, upgrade, and uninstall " + "Python packages", author="The fellowship of the packaging", author_email="distutils-sig@python.org", license="PSF or ZPL", From c7799d0af7ea2926821097e27baa730d5582c26c Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 00:46:43 +0200 Subject: [PATCH 2571/8469] started a dev guide for contributors --HG-- branch : distribute extra : rebase_source : 9592be3b368bdc8765c15f5030fff4e69de46e6b --- DEVGUIDE.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 DEVGUIDE.txt diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt new file mode 100644 index 0000000000..df25947343 --- /dev/null +++ b/DEVGUIDE.txt @@ -0,0 +1,28 @@ +============================ +Quick notes for contributors +============================ + +Distribute is using Mercurial. + +Grab the code at bitbucket:: + + + $ hg clone https://tarek@bitbucket.org/tarek/distribute distribute + +If you want to work in the 0.6 branch, you have to switch to it:: + + $ hg branch 0.6-maintenance + marked working directory as branch 0.6-maintenance + + $ hg branch + 0.6-maintenance + +If you make some changes, don't forget to: + +- backport it to the 0.7 branch +- add a note in CHANGES.txt + +And remember that 0.6 is only bug fixes, and the APIs should +be fully backward compatible with Setuptools. + + From f00b7464e93706770fba6b891dd9f7e979acb623 Mon Sep 17 00:00:00 2001 From: agronholm Date: Sat, 26 Sep 2009 19:46:11 +0300 Subject: [PATCH 2572/8469] Documented major changes in 0.6.2 --HG-- branch : distribute extra : rebase_source : 4e4c362c3d59494907c4abc025af02cbe98546fb --- CHANGES.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2574300aa1..9dfa80cfb1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,9 +9,24 @@ CHANGES setuptools ========== +* Added Python 3 support. + This closes http://bugs.python.org/setuptools/issue39. + +* Added option to run 2to3 automatically when installing on Python 3. + This closes http://bitbucket.org/tarek/distribute/issue/31. + * Fixed invalid usage of requirement.parse, that broke develop -d. - closed http://bugs.python.org/setuptools/issue44. + This closes http://bugs.python.org/setuptools/issue44. + +* Fixed script launcher for 64-bit Windows. + This closes http://bugs.python.org/setuptools/issue2. + + +bootstraping +============ +* Fixed bootstrap not working on Windows. + This closes http://bitbucket.org/tarek/distribute/issue/49. ----- 0.6.1 From ca17b4f5b4022392bb7013ea493b77fdc576509e Mon Sep 17 00:00:00 2001 From: agronholm Date: Sat, 26 Sep 2009 19:48:40 +0300 Subject: [PATCH 2573/8469] Fixed a spelling error --HG-- branch : distribute extra : rebase_source : 61228c1424382a1ab8305bacd6ed26fce300a8da --- CHANGES.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9dfa80cfb1..63a422fd12 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,8 +22,8 @@ setuptools This closes http://bugs.python.org/setuptools/issue2. -bootstraping -============ +bootstrapping +============= * Fixed bootstrap not working on Windows. This closes http://bitbucket.org/tarek/distribute/issue/49. @@ -52,8 +52,8 @@ setuptools bootstrap.py script. -bootstraping -============ +bootstrapping +============= * The boostrap process leave setuptools alone if detected in the system and --root or --prefix is provided, but is not in the same location. From 7b5cc0aaf4e8ca3dc6374f697f10be6288281950 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 19:58:09 +0200 Subject: [PATCH 2574/8469] more doc --HG-- branch : distribute extra : rebase_source : c8b0a440a80186f80a27d798b5bc4f5f536c88ee --- CHANGES.txt | 2 +- README.txt | 23 ++++++++++++++++++----- docs/python3.txt | 4 ++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 63a422fd12..acb45439cf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,7 @@ CHANGES setuptools ========== -* Added Python 3 support. +* Added Python 3 support. see docs/python3.txt This closes http://bugs.python.org/setuptools/issue39. * Added option to run 2to3 automatically when installing on Python 3. diff --git a/README.txt b/README.txt index 30fb7ee200..204ff092a6 100755 --- a/README.txt +++ b/README.txt @@ -18,19 +18,32 @@ for working with Python module distributions. The fork has two goals: -- Provides a backward compatible version to replace Setuptools +- Providing a backward compatible version to replace Setuptools and make all distributions that depend on Setuptools work as - before, but with less bugs and behavior issues. - This version is also compatible with Python 3. + before, but with less bugs and behaviorial issues. This work is done in the 0.6.x series -- Refactor the code, and release it in several distributions. - This work is done in the 0.7.x series but not yet released. + Starting with version 0.6.2, Distribute supports Python 3. + Installing and using distribute for Python 3 code works exactly + the same as for Python 2 code, but Distribute also helps you to support + Python 2 and Python 3 from the same source code by letting you run 2to3 + on the code as a part of the build process, by setting the keyword parameter + ``use_2to3`` to True. See docs/python3.txt for more information. + +- Refactoring the code, and releasing it in several distributions. + This work is being done in the 0.7.x series but not yet released. If you install `Distribute` and want to switch back for any reason to `Setuptools`, get to the `Uninstallation instructions`_ section. +More documentation +================== + +You can get more information in the Sphinx-based documentation, located +in the archive in `docs`. This documentation includes the old Setuptools +documentation that is slowly replaced, and brand new content. + About the installation process ============================== diff --git a/docs/python3.txt b/docs/python3.txt index 9ae9573506..9b5fa7972c 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -6,10 +6,10 @@ Starting with version 0.6.2, Distribute supports Python 3. Installing and using distribute for Python 3 code works exactly the same as for Python 2 code, but Distribute also helps you to support Python 2 and Python 3 from the same source code by letting you run 2to3 on the code as a part of the -build process. by setting the keyword parameter ``use_2to3`` to True. +build process, by setting the keyword parameter ``use_2to3`` to True. -Distrubute as help during porting +Distribute as help during porting ================================= Distribute can make the porting process much easier by automatically running From 2f2ef4a897642dda08a95e4544d05b4012850dcd Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:04:11 +0200 Subject: [PATCH 2575/8469] more changes --HG-- branch : distribute extra : rebase_source : 3c3037afbc1b3467650b99bcf56c1598464fb45e --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index acb45439cf..15adb6a47d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,8 @@ setuptools * Fixed script launcher for 64-bit Windows. This closes http://bugs.python.org/setuptools/issue2. +* KeyError when compiling extensions. + This closes http://bugs.python.org/setuptools/issue41. bootstrapping ============= @@ -28,6 +30,12 @@ bootstrapping * Fixed bootstrap not working on Windows. This closes http://bitbucket.org/tarek/distribute/issue/49. +* Fixed 2.6 dependencies. + This closes http://bitbucket.org/tarek/distribute/issue/50. + +* Make sure setuptools is patched when running through easy_install + This closes http://bugs.python.org/setuptools/issue40. + ----- 0.6.1 ----- From 775967de5b20d48a50f2ca050a87d8fa4890170d Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:12:50 +0200 Subject: [PATCH 2576/8469] this is not finished yet. lets make a clean work for 0.6.3 for zc.buildout support --HG-- branch : distribute extra : rebase_source : 39abb9d72dc676082ce0337453efe20884936dd5 --- README.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 204ff092a6..3ee5b58cfa 100755 --- a/README.txt +++ b/README.txt @@ -162,15 +162,12 @@ Install FAQ - **How does Distribute interact with zc.buildout?** Some work is being done on zc.buildout side to make its bootstrap - work with Distribute. Until then, using Distribute in zc.buildout is a bit - tricky. + work with Distribute. Until then, using Distribute in zc.buildout is a bit + tricky because the bootstrap process of zc.buildout hardcodes the + installation of Setuptools. - Like virtualenv, Distribute has to be installed after setuptools. The simplest - way is to add it in a ``zc.recipe.egg`` section so the job is done when you - build your buildout. - - If you are combining zc.buildout and virtualenv, you might fail in the - problem described in the previous FAQ entry. + The plan is to come with a working bootstrap.py for zc.buildout for the + 0.6.3 release. ----------------------------- Feedback and getting involved From 0906b2d312d39b4b957cc3196b0b2935873f55a7 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:14:03 +0200 Subject: [PATCH 2577/8469] typo --HG-- branch : distribute extra : rebase_source : 46cfa8ad9c0fba6bfdce61960ce97d85b473eae4 --- README.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 3ee5b58cfa..bd3e081f6d 100755 --- a/README.txt +++ b/README.txt @@ -159,15 +159,16 @@ Install FAQ You need in this case to build a virtualenv with the --no-site-packages option or to install `Distribute` globally. -- **How does Distribute interact with zc.buildout?** +- **How does Distribute interacts with zc.buildout?** Some work is being done on zc.buildout side to make its bootstrap work with Distribute. Until then, using Distribute in zc.buildout is a bit - tricky because the bootstrap process of zc.buildout hardcodes the + tricky because the bootstrap process of zc.buildout hardcodes the installation of Setuptools. - The plan is to come with a working bootstrap.py for zc.buildout for the - 0.6.3 release. + The plan is to come with a custom bootstrap.py for zc.buildout for the + 0.6.3 release, together with some small changes on zc.buildout side. + ----------------------------- Feedback and getting involved From 610e31a405f1129651ef5df3bcf0721ceec3076c Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:15:07 +0200 Subject: [PATCH 2578/8469] Added tag 0.6.2 for changeset 41415244ee90 --HG-- branch : distribute extra : rebase_source : 8fb22bb7a961241842e6460b18bef7a3d137eb86 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ff5a2353b8..113ea91cd6 100644 --- a/.hgtags +++ b/.hgtags @@ -1,2 +1,3 @@ 1010d08fd8dfd2f1496843b557b5369a0beba82a 0.6 4d114c5f2a3ecb4a0fa552075dbbb221b19e291b 0.6.1 +41415244ee90664042d277d0b1f0f59c04ddd0e4 0.6.2 From 7cdf5f6c30168ddc2a0bfbc321e75ef254e719b6 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:20:03 +0200 Subject: [PATCH 2579/8469] starting 0.6.3 development --HG-- branch : distribute extra : rebase_source : 2854b62a13986569c1ad9773c54c73eb62025f70 --- CHANGES.txt | 6 ++++++ distribute.egg-info/entry_points.txt | 3 +-- distribute_setup.py | 2 +- release.sh | 4 ++-- setup.py | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 15adb6a47d..c236c98e28 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.6.3 +----- + + + ----- 0.6.2 ----- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 4bbb6848df..d18df33807 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -7,7 +7,6 @@ build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register -upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -32,7 +31,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.4 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 4fe048753b..d88e0ebb92 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.2" +DEFAULT_VERSION = "0.6.3" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/release.sh b/release.sh index 6af72616b8..467a1c2418 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.2" +export VERSION="0.6.3" # creating the releases rm -rf dist @@ -7,6 +7,6 @@ rm -rf dist # now preparing the source release python2.6 setup.py -q egg_info -RDb '' sdist register upload -# pushin the bootstrap script +# pushing the bootstrap script scp distribute_setup.py ziade.org:nightly/build/ diff --git a/setup.py b/setup.py index fc4a9c6ad1..04f81ca8d8 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.2" +VERSION = "0.6.3" from setuptools import setup, find_packages import sys From c6026b93269fa497df2c55a3d8e05b431cd5b974 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 26 Sep 2009 20:43:52 +0200 Subject: [PATCH 2580/8469] fixed the version in README --HG-- branch : distribute extra : rebase_source : 042246c75eb4b39525d7861123661c2d39685f9e --- README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index bd3e081f6d..a8d1a85ee4 100755 --- a/README.txt +++ b/README.txt @@ -94,8 +94,8 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1.tar.gz - $ tar -xzvf distribute-0.6.1.tar.gz + $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.3.tar.gz + $ tar -xzvf distribute-0.6.3.tar.gz $ cd distribute-0.6 $ python setup.py install From ceb63ce0341593a12ed0064ea616e6418ccffd21 Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 27 Sep 2009 01:08:46 +0300 Subject: [PATCH 2581/8469] Fixed Python 3 compatibility issue introduced in #435 --HG-- branch : distribute extra : rebase_source : 6b45a12ed6d990d6a6b2bf25e9bb2bca53fbd5c6 --- distribute_setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index d88e0ebb92..b5cce268fc 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -399,10 +399,13 @@ def extractall(self, path=".", members=None): self.extract(tarinfo, path) # Reverse sort directories. - def sorter(dir1, dir2): - return cmp(dir1.name, dir2.name) - directories.sort(sorter) - directories.reverse() + if sys.version_info < (2, 4): + def sorter(dir1, dir2): + return cmp(dir1.name, dir2.name) + directories.sort(sorter) + directories.reverse() + else: + directories.sort(key=operator.attrgetter('name'), reverse=True) # Set correct owner, mtime and filemode on directories. for tarinfo in directories: From 3f06b14ae21d70149f4f404f2d9d82f3842c23dc Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 27 Sep 2009 01:12:15 +0300 Subject: [PATCH 2582/8469] Changed file() calls to open() calls --HG-- branch : distribute extra : rebase_source : a2567f3f28d896dd0abbbed8a2626cc4ecb3e44e --- pkg_resources.py | 2 +- setuptools/command/develop.py | 2 +- setuptools/package_index.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4babb48e49..d0e840b867 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1676,7 +1676,7 @@ def find_on_path(importer, path_item, only=False): for dist in find_distributions(os.path.join(path_item, entry)): yield dist elif not only and lower.endswith('.egg-link'): - for line in file(os.path.join(path_item, entry)): + for line in open(os.path.join(path_item, entry)): if not line.strip(): continue for item in find_distributions(os.path.join(path_item,line.rstrip())): yield item diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 3288805647..5643c77341 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -105,7 +105,7 @@ def install_for_development(self): def uninstall_link(self): if os.path.exists(self.egg_link): log.info("Removing %s (link to %s)", self.egg_link, self.egg_base) - contents = [line.rstrip() for line in file(self.egg_link)] + contents = [line.rstrip() for line in open(self.egg_link)] if contents not in ([self.egg_path], [self.egg_path, self.setup_path]): log.warn("Link points to %s: uninstall aborted", contents) return diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 084370d530..98799de535 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -241,7 +241,7 @@ def scan_egg_links(self, search_path): self.scan_egg_link(item, entry) def scan_egg_link(self, path, entry): - lines = filter(None, map(str.strip, file(os.path.join(path, entry)))) + lines = filter(None, map(str.strip, open(os.path.join(path, entry)))) if len(lines)==2: for dist in find_distributions(os.path.join(path, lines[0])): dist.location = os.path.join(path, *lines) From 652fa7853d69e6f8ea043657603b09f660758924 Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 27 Sep 2009 05:07:16 +0300 Subject: [PATCH 2583/8469] Added 0.6.3 changes --HG-- branch : distribute extra : rebase_source : f543e9cd782a3dee79a92756853efac5eb15551a --- CHANGES.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c236c98e28..9244400299 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,15 @@ CHANGES 0.6.3 ----- +setuptools +========== + +* Fixed a bunch of calls to file() that caused crashes on Python 3. + +bootstrapping +============= +* Fixed a bug in sorting that caused bootstrap to fail on Python 3. ----- 0.6.2 @@ -15,7 +23,7 @@ CHANGES setuptools ========== -* Added Python 3 support. see docs/python3.txt +* Added Python 3 support; see docs/python3.txt. This closes http://bugs.python.org/setuptools/issue39. * Added option to run 2to3 automatically when installing on Python 3. From ca0acdd53dbcb49e0f2c2f6c78c0312a2e304bce Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 27 Sep 2009 04:17:58 +0200 Subject: [PATCH 2584/8469] Added tag 0.6.3 for changeset e033bf2d3d05 --HG-- branch : distribute extra : rebase_source : 125bc1d7d1a7e3ff8b1b8f78c7d5d7023379e7a6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 113ea91cd6..dc3dfd6b69 100644 --- a/.hgtags +++ b/.hgtags @@ -1,3 +1,4 @@ 1010d08fd8dfd2f1496843b557b5369a0beba82a 0.6 4d114c5f2a3ecb4a0fa552075dbbb221b19e291b 0.6.1 41415244ee90664042d277d0b1f0f59c04ddd0e4 0.6.2 +e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 From 893c3f0078debd2585eb847a547b1748133417ab Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 27 Sep 2009 04:22:10 +0200 Subject: [PATCH 2585/8469] starting 0.6.4 --HG-- branch : distribute extra : rebase_source : c36bab6b9c5d0134caef0a0cbf7cdbe79ec781d7 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9244400299..d59d26ef20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.6.4 +----- + + + ----- 0.6.3 ----- diff --git a/README.txt b/README.txt index a8d1a85ee4..ef089646c0 100755 --- a/README.txt +++ b/README.txt @@ -94,8 +94,8 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.3.tar.gz - $ tar -xzvf distribute-0.6.3.tar.gz + $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.4.tar.gz + $ tar -xzvf distribute-0.6.4.tar.gz $ cd distribute-0.6 $ python setup.py install @@ -167,7 +167,7 @@ Install FAQ installation of Setuptools. The plan is to come with a custom bootstrap.py for zc.buildout for the - 0.6.3 release, together with some small changes on zc.buildout side. + 0.6.4 release, together with some small changes on zc.buildout side. ----------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index b5cce268fc..e54b0ca0db 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.3" +DEFAULT_VERSION = "0.6.4" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/release.sh b/release.sh index 467a1c2418..555499ef1b 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.3" +export VERSION="0.6.4" # creating the releases rm -rf dist diff --git a/setup.py b/setup.py index 04f81ca8d8..7f6cbdf6bf 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.3" +VERSION = "0.6.4" from setuptools import setup, find_packages import sys From 5668686f465e2c5c5a8facdb2ef444f93c56fd39 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 27 Sep 2009 04:37:35 +0200 Subject: [PATCH 2586/8469] added a note on distribute_setup_3k.py --HG-- branch : distribute extra : rebase_source : d1bfb9649c4d1b70eafbde5c5ea507232e13b899 --- README.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.txt b/README.txt index ef089646c0..d130cf90cc 100755 --- a/README.txt +++ b/README.txt @@ -81,6 +81,11 @@ If your shell has the ``wget`` program you can do:: $ wget http://nightly.ziade.org/distribute_setup.py $ python distribute_setup.py +If you are under Python 3, use ``distribute_setup_3k.py``:: + + $ wget http://nightly.ziade.org/distribute_setup_3k.py + $ python distribute_setup_3k.py + easy_install or pip =================== From 7964e7bcb02c1ad2e5c92be71db53a1f9a66cf6d Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 27 Sep 2009 07:48:26 +0300 Subject: [PATCH 2587/8469] Fixed two bugs in the bootstrapper that prevented use_setuptools() from working --HG-- branch : distribute extra : rebase_source : 63a606c73788fce5a09a8a423efd25a9804422d7 --- distribute_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index e54b0ca0db..44fe35a43d 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -102,12 +102,12 @@ def _build_egg(tarball, to_dir=os.curdir): # building an egg log.warn('Building a Distribute egg in %s', to_dir) - python_cmd('setup.py -q bdist_egg --dist-dir %s' % to_dir) + python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result for file in os.listdir(to_dir): if fnmatch.fnmatch(file, 'distribute-%s*.egg' % DEFAULT_VERSION): - return os.path.join(to_dir, file) + return os.path.join(subdir, file) raise IOError('Could not build the egg.') finally: From 93663d98ca27e93e6ed76eb85d4753b630623834 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 27 Sep 2009 20:38:59 +0200 Subject: [PATCH 2588/8469] some function don't need public exposition + fixed the os.curdir bug that was breaking use_setuptools --HG-- branch : distribute extra : rebase_source : 20788bf4396fabb49e7292611f1125bf2bdc2b29 --- distribute_setup.py | 29 ++++++++++++++++------------- setup.py | 8 ++++---- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 44fe35a43d..dcea856ecc 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -29,13 +29,13 @@ try: import subprocess - def python_cmd(*args): + def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 except ImportError: # will be used for python 2.3 - def python_cmd(*args): + def _python_cmd(*args): args = (sys.executable,) + args # quoting arguments if windows if sys.platform == 'win32': @@ -69,7 +69,7 @@ def _install(tarball): try: os.chdir(tmpdir) tar = tarfile.open(tarball) - extractall(tar) + _extractall(tar) tar.close() # going in the directory @@ -79,12 +79,12 @@ def _install(tarball): # installing log.warn('Installing Distribute') - assert python_cmd('setup.py', 'install') + assert _python_cmd('setup.py', 'install') finally: os.chdir(old_wd) -def _build_egg(tarball, to_dir=os.curdir): +def _build_egg(tarball, to_dir): # extracting the tarball tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) @@ -92,7 +92,7 @@ def _build_egg(tarball, to_dir=os.curdir): try: os.chdir(tmpdir) tar = tarfile.open(tarball) - extractall(tar) + _extractall(tar) tar.close() # going in the directory @@ -102,20 +102,19 @@ def _build_egg(tarball, to_dir=os.curdir): # building an egg log.warn('Building a Distribute egg in %s', to_dir) - python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) + _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result for file in os.listdir(to_dir): if fnmatch.fnmatch(file, 'distribute-%s*.egg' % DEFAULT_VERSION): - return os.path.join(subdir, file) + return os.path.join(to_dir, file) raise IOError('Could not build the egg.') finally: os.chdir(old_wd) -def _do_download(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15): +def _do_download(version, download_base, to_dir, download_delay): tarball = download_setuptools(version, download_base, to_dir, download_delay) egg = _build_egg(tarball, to_dir) @@ -126,6 +125,8 @@ def _do_download(version=DEFAULT_VERSION, download_base=DEFAULT_URL, def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): + # making sure we use the absolute path + to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ 'setuptools' in sys.modules try: @@ -162,6 +163,8 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, `delay` is the number of seconds to pause before an actual download attempt. """ + # making sure we use the absolute path + to_dir = os.path.abspath(to_dir) import urllib2 tgz_name = "distribute-%s.tar.gz" % version url = download_base + tgz_name @@ -253,7 +256,7 @@ def _remove_flat_installation(placeholder): return True -def after_install(dist): +def _after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib if not placeholder or not os.path.exists(placeholder): @@ -299,7 +302,7 @@ def _patch_egg_dir(path): return True -def before_install(): +def _before_install(): log.warn('Before install bootstrap.') fake_setuptools() @@ -375,7 +378,7 @@ def _relaunch(): sys.exit(subprocess.call(args)) -def extractall(self, path=".", members=None): +def _extractall(self, path=".", members=None): """Extract all members from the archive to the current working directory and set owner, modification time and permissions on directories afterwards. `path' specifies a different directory diff --git a/setup.py b/setup.py index 7f6cbdf6bf..fcd85eb2bc 100755 --- a/setup.py +++ b/setup.py @@ -53,8 +53,8 @@ def _being_installed(): return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): - from distribute_setup import before_install - before_install() + from distribute_setup import _before_install + _before_install() dist = setup( name="distribute", @@ -142,7 +142,7 @@ def _being_installed(): ) if _being_installed(): - from distribute_setup import after_install - after_install(dist) + from distribute_setup import _after_install + _after_install(dist) From 93ec26e2fde1f0a28c5ada2ee9a5323dd92de5c7 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 27 Sep 2009 20:45:58 +0200 Subject: [PATCH 2589/8469] fixed the test --HG-- branch : distribute extra : rebase_source : baa02e55e21c112f8ebef178ec7c54fd998f93ea --- tests/test_distribute_setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 76f8f8fa17..4c9079a79d 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -9,8 +9,9 @@ TOPDIR = os.path.split(CURDIR)[0] sys.path.insert(0, TOPDIR) -from distribute_setup import (use_setuptools, _build_egg, python_cmd, - _do_download, _install) +from distribute_setup import (use_setuptools, _build_egg, _python_cmd, + _do_download, _install, DEFAULT_URL, + DEFAULT_VERSION) import distribute_setup class TestSetup(unittest.TestCase): @@ -23,8 +24,8 @@ def setUp(self): self.cwd = os.getcwd() self.tmpdir = tempfile.mkdtemp() os.chdir(TOPDIR) - python_cmd("setup.py -q egg_info -RDb '' sdist --dist-dir %s" % \ - self.tmpdir) + _python_cmd("setup.py", "-q", "egg_info", "-RDb", "''", "sdist", + "--dist-dir", "%s" % self.tmpdir) tarball = os.listdir(self.tmpdir)[0] self.tarball = os.path.join(self.tmpdir, tarball) import urllib2 @@ -46,7 +47,7 @@ def test_build_egg(self): def test_do_download(self): tmpdir = tempfile.mkdtemp() - _do_download(to_dir=tmpdir) + _do_download(DEFAULT_VERSION, DEFAULT_URL, tmpdir, 1) import setuptools self.assert_(setuptools.bootstrap_install_from.startswith(tmpdir)) From 9c216a69630f8d8dfdf3365e5d26fe47b313b7ee Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 29 Sep 2009 22:41:09 +0000 Subject: [PATCH 2590/8469] Bumping for 2.6.3rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index ba926063e1..c8787040e2 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.2" +__version__ = "2.6.3rc1" #--end constants-- From 4d101962a4b4069c967df29bdea6e0be5e8071fd Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 1 Oct 2009 23:39:49 +0000 Subject: [PATCH 2591/8469] Bump to 2.6.3 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c8787040e2..fd52b8d7c5 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.3rc1" +__version__ = "2.6.3" #--end constants-- From e63325c644493b2d2a9cb352ea8a254d96e9dacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 2 Oct 2009 22:37:51 +0000 Subject: [PATCH 2592/8469] fixed the distutils tests that were not writing in temp --- tests/test_config.py | 10 +++++----- tests/test_sdist.py | 42 +++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index cae7689884..23291da819 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -49,13 +49,14 @@ class PyPIRCCommandTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): """Patches the environment.""" + super(PyPIRCCommandTestCase, self).setUp() if os.environ.has_key('HOME'): self._old_home = os.environ['HOME'] else: self._old_home = None - curdir = os.path.dirname(__file__) - os.environ['HOME'] = curdir - self.rc = os.path.join(curdir, '.pypirc') + tempdir = self.mkdtemp() + os.environ['HOME'] = tempdir + self.rc = os.path.join(tempdir, '.pypirc') self.dist = Distribution() class command(PyPIRCCommand): @@ -74,9 +75,8 @@ def tearDown(self): del os.environ['HOME'] else: os.environ['HOME'] = self._old_home - if os.path.exists(self.rc): - os.remove(self.rc) set_threshold(self.old_threshold) + super(PyPIRCCommandTestCase, self).tearDown() def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 59c24fd433..e322c1385c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -12,9 +12,6 @@ from distutils.errors import DistutilsExecError from distutils.spawn import find_executable -CURDIR = os.path.dirname(__file__) -TEMP_PKG = join(CURDIR, 'temppkg') - SETUP_PY = """ from distutils.core import setup import somecode @@ -31,25 +28,24 @@ class sdistTestCase(PyPIRCCommandTestCase): def setUp(self): super(sdistTestCase, self).setUp() self.old_path = os.getcwd() + self.temp_pkg = os.path.join(self.mkdtemp(), 'temppkg') def tearDown(self): os.chdir(self.old_path) - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) super(sdistTestCase, self).tearDown() def _init_tmp_pkg(self): - if os.path.exists(TEMP_PKG): - shutil.rmtree(TEMP_PKG) - os.mkdir(TEMP_PKG) - os.mkdir(join(TEMP_PKG, 'somecode')) - os.mkdir(join(TEMP_PKG, 'dist')) + if os.path.exists(self.temp_pkg): + shutil.rmtree(self.temp_pkg) + os.mkdir(self.temp_pkg) + os.mkdir(join(self.temp_pkg, 'somecode')) + os.mkdir(join(self.temp_pkg, 'dist')) # creating a MANIFEST, a package, and a README - self._write(join(TEMP_PKG, 'MANIFEST.in'), MANIFEST_IN) - self._write(join(TEMP_PKG, 'README'), 'xxx') - self._write(join(TEMP_PKG, 'somecode', '__init__.py'), '#') - self._write(join(TEMP_PKG, 'setup.py'), SETUP_PY) - os.chdir(TEMP_PKG) + self._write(join(self.temp_pkg, 'MANIFEST.in'), MANIFEST_IN) + self._write(join(self.temp_pkg, 'README'), 'xxx') + self._write(join(self.temp_pkg, 'somecode', '__init__.py'), '#') + self._write(join(self.temp_pkg, 'setup.py'), SETUP_PY) + os.chdir(self.temp_pkg) def _write(self, path, content): f = open(path, 'w') @@ -65,15 +61,15 @@ def test_prune_file_list(self): self._init_tmp_pkg() # creating VCS directories with some files in them - os.mkdir(join(TEMP_PKG, 'somecode', '.svn')) - self._write(join(TEMP_PKG, 'somecode', '.svn', 'ok.py'), 'xxx') + os.mkdir(join(self.temp_pkg, 'somecode', '.svn')) + self._write(join(self.temp_pkg, 'somecode', '.svn', 'ok.py'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.hg')) - self._write(join(TEMP_PKG, 'somecode', '.hg', + os.mkdir(join(self.temp_pkg, 'somecode', '.hg')) + self._write(join(self.temp_pkg, 'somecode', '.hg', 'ok'), 'xxx') - os.mkdir(join(TEMP_PKG, 'somecode', '.git')) - self._write(join(TEMP_PKG, 'somecode', '.git', + os.mkdir(join(self.temp_pkg, 'somecode', '.git')) + self._write(join(self.temp_pkg, 'somecode', '.git', 'ok'), 'xxx') # now building a sdist @@ -96,7 +92,7 @@ def test_prune_file_list(self): cmd.run() # now let's check what we have - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.temp_pkg, 'dist') files = os.listdir(dist_folder) self.assertEquals(files, ['fake-1.0.zip']) @@ -137,7 +133,7 @@ def test_make_distribution(self): cmd.run() # making sure we have two files - dist_folder = join(TEMP_PKG, 'dist') + dist_folder = join(self.temp_pkg, 'dist') result = os.listdir(dist_folder) result.sort() self.assertEquals(result, From 55b356b15ea7b45da30f7147e7825e6c3bdd7e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 2 Oct 2009 23:49:48 +0000 Subject: [PATCH 2593/8469] #6516 added owner/group support for tarfiles in Distutils --- archive_util.py | 72 ++++++++++++++++++++++++++++++++++---- cmd.py | 9 ++--- command/bdist.py | 13 +++++++ command/bdist_dumb.py | 13 +++++-- command/sdist.py | 9 ++++- tests/test_archive_util.py | 63 +++++++++++++++++++++++++++++++-- tests/test_sdist.py | 54 ++++++++++++++++++++++++++++ 7 files changed, 218 insertions(+), 15 deletions(-) diff --git a/archive_util.py b/archive_util.py index 62150b0ddd..75318eba61 100644 --- a/archive_util.py +++ b/archive_util.py @@ -14,15 +14,55 @@ from distutils.dir_util import mkpath from distutils import log -def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): +try: + from pwd import getpwnam +except AttributeError: + getpwnam = None + +try: + from grp import getgrnam +except AttributeError: + getgrnam = None + +def _get_gid(name): + """Returns a gid, given a group name.""" + if getgrnam is None or name is None: + return None + try: + result = getgrnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def _get_uid(name): + """Returns an uid, given a user name.""" + if getpwnam is None or name is None: + return None + try: + result = getpwnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, + owner=None, group=None): """Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", "bzip2", or None. - Both "tar" and the compression utility named by 'compress' must be on - the default program search path, so this is probably Unix-specific. + (compress will be deprecated in Python 3.2) + + 'owner' and 'group' can be used to define an owner and a group for the + archive that is being built. If not provided, the current owner and group + will be used. + The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). + Returns the output filename. """ tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} @@ -44,10 +84,23 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): import tarfile # late import so Python build itself doesn't break log.info('Creating tar archive') + + uid = _get_uid(owner) + gid = _get_gid(group) + + def _set_uid_gid(tarinfo): + if gid is not None: + tarinfo.gid = gid + tarinfo.gname = group + if uid is not None: + tarinfo.uid = uid + tarinfo.uname = owner + return tarinfo + if not dry_run: tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) try: - tar.add(base_dir) + tar.add(base_dir, filter=_set_uid_gid) finally: tar.close() @@ -138,7 +191,7 @@ def check_archive_formats(formats): return None def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, - dry_run=0): + dry_run=0, owner=None, group=None): """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific @@ -151,6 +204,9 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. + + 'owner' and 'group' are used when creating a tar archive. By default, + uses the current owner and group. """ save_cwd = os.getcwd() if root_dir is not None: @@ -172,8 +228,12 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, func = format_info[0] for arg, val in format_info[1]: kwargs[arg] = val - filename = apply(func, (base_name, base_dir), kwargs) + if format != 'zip': + kwargs['owner'] = owner + kwargs['group'] = group + + filename = apply(func, (base_name, base_dir), kwargs) if root_dir is not None: log.debug("changing back to '%s'", save_cwd) os.chdir(save_cwd) diff --git a/cmd.py b/cmd.py index 869258babb..dc40c14d61 100644 --- a/cmd.py +++ b/cmd.py @@ -385,10 +385,11 @@ def spawn (self, cmd, search_path=1, level=1): from distutils.spawn import spawn spawn(cmd, search_path, dry_run= self.dry_run) - def make_archive (self, base_name, format, - root_dir=None, base_dir=None): - return archive_util.make_archive( - base_name, format, root_dir, base_dir, dry_run=self.dry_run) + def make_archive(self, base_name, format, root_dir=None, base_dir=None, + owner=None, group=None): + return archive_util.make_archive(base_name, format, root_dir, + base_dir, dry_run=self.dry_run, + owner=owner, group=group) def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): diff --git a/command/bdist.py b/command/bdist.py index ec3375e5c4..8e0ad080b9 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -40,6 +40,12 @@ class bdist(Command): "[default: dist]"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['skip-build'] @@ -81,6 +87,8 @@ def initialize_options(self): self.formats = None self.dist_dir = None self.skip_build = 0 + self.group = None + self.owner = None def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' @@ -126,6 +134,11 @@ def run(self): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] + # passing the owner and group names for tar archiving + if cmd_name == 'bdist_dumb': + sub_cmd.owner = self.owner + sub_cmd.group = self.group + # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 3ab0330f83..358a70eacf 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -36,6 +36,12 @@ class bdist_dumb (Command): ('relative', None, "build the archive using relative paths" "(default: false)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['keep-temp', 'skip-build', 'relative'] @@ -53,6 +59,8 @@ def initialize_options (self): self.dist_dir = None self.skip_build = 0 self.relative = 0 + self.owner = None + self.group = None def finalize_options(self): if self.bdist_dir is None: @@ -71,7 +79,7 @@ def finalize_options(self): ('dist_dir', 'dist_dir'), ('plat_name', 'plat_name')) - def run (self): + def run(self): if not self.skip_build: self.run_command('build') @@ -110,7 +118,8 @@ def run (self): # Make the archive filename = self.make_archive(pseudoinstall_root, - self.format, root_dir=archive_root) + self.format, root_dir=archive_root, + owner=self.owner, group=self.group) if self.distribution.has_ext_modules(): pyversion = get_python_version() else: diff --git a/command/sdist.py b/command/sdist.py index c21f3917b6..5c74e5329f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -74,6 +74,10 @@ def checking_metadata(self): ('medata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), + ('owner=', 'u', + "Owner name used when creating a tar file [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file [default: current group]"), ] boolean_options = ['use-defaults', 'prune', @@ -113,6 +117,8 @@ def initialize_options(self): self.archive_files = None self.metadata_check = 1 + self.owner = None + self.group = None def finalize_options(self): if self.manifest is None: @@ -455,7 +461,8 @@ def make_distribution(self): self.formats.append(self.formats.pop(self.formats.index('tar'))) for fmt in self.formats: - file = self.make_archive(base_name, fmt, base_dir=base_dir) + file = self.make_archive(base_name, fmt, base_dir=base_dir, + owner=self.owner, group=self.group) archive_files.append(file) self.distribution.dist_files.append(('sdist', '', file)) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index d6fb676920..3faf5e0d3b 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -13,6 +13,13 @@ from distutils.tests import support from test.test_support import check_warnings +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False + try: import zipfile ZIP_SUPPORT = True @@ -30,7 +37,7 @@ class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(zlib, "requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -41,7 +48,7 @@ def test_make_tarball(self): tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], - "Source and target should be on same drive") + "source and target should be on same drive") base_name = os.path.join(tmpdir2, 'archive') @@ -202,6 +209,58 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support + if UID_GID_SUPPORT: + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + else: + group = owner = 'root' + + base_dir, root_dir, base_name = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner, + group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'zip', root_dir, base_dir) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner=owner, group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner='kjhkjhkjg', group='oihohoh') + self.assertTrue(os.path.exists(res)) + + @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() + os.chdir(tmpdir) + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + try: + archive_name = make_tarball(base_name, 'dist', compress=None, + owner=owner, group=group) + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + self.assertTrue(os.path.exists(archive_name)) + + # now checks the rights + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index c2feccb3ce..b8e3dca560 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -3,6 +3,7 @@ import unittest import shutil import zipfile +import tarfile # zlib is not used here, but if it's not available # the tests that use zipfile may fail @@ -11,6 +12,13 @@ except ImportError: zlib = None +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False + from os.path import join import sys import tempfile @@ -288,6 +296,52 @@ def test_finalize_options(self): cmd.formats = 'supazipa' self.assertRaises(DistutilsOptionError, cmd.finalize_options) + @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_make_distribution_owner_group(self): + + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return + + # now building a sdist + dist, cmd = self.get_cmd() + + # creating a gztar and specifying the owner+group + cmd.formats = ['gztar'] + cmd.owner = pwd.getpwuid(0)[0] + cmd.group = grp.getgrgid(0)[0] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + + # building a sdist again + dist, cmd = self.get_cmd() + + # creating a gztar + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, os.getuid()) + self.assertEquals(member.gid, os.getgid()) + finally: + archive.close() def test_suite(): return unittest.makeSuite(SDistTestCase) From 68a24d4967c877b3127b41f5f18b49f1b135429a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 2 Oct 2009 23:56:02 +0000 Subject: [PATCH 2594/8469] Merged revisions 75192 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75192 | tarek.ziade | 2009-10-03 01:49:48 +0200 (Sat, 03 Oct 2009) | 1 line #6516 added owner/group support for tarfiles in Distutils ........ --- archive_util.py | 71 +++++++++++++++++++++++++++++++++++--- cmd.py | 8 +++-- command/bdist.py | 13 +++++++ command/bdist_dumb.py | 11 +++++- command/sdist.py | 9 ++++- tests/test_archive_util.py | 63 +++++++++++++++++++++++++++++++-- tests/test_sdist.py | 54 +++++++++++++++++++++++++++++ 7 files changed, 217 insertions(+), 12 deletions(-) diff --git a/archive_util.py b/archive_util.py index a568854e4e..d4525998fd 100644 --- a/archive_util.py +++ b/archive_util.py @@ -14,15 +14,55 @@ from distutils.dir_util import mkpath from distutils import log -def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): +try: + from pwd import getpwnam +except AttributeError: + getpwnam = None + +try: + from grp import getgrnam +except AttributeError: + getgrnam = None + +def _get_gid(name): + """Returns a gid, given a group name.""" + if getgrnam is None or name is None: + return None + try: + result = getgrnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def _get_uid(name): + """Returns an uid, given a user name.""" + if getpwnam is None or name is None: + return None + try: + result = getpwnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, + owner=None, group=None): """Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", "bzip2", or None. - Both "tar" and the compression utility named by 'compress' must be on - the default program search path, so this is probably Unix-specific. + (compress will be deprecated in Python 3.2) + + 'owner' and 'group' can be used to define an owner and a group for the + archive that is being built. If not provided, the current owner and group + will be used. + The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). + Returns the output filename. """ tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} @@ -44,10 +84,23 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): import tarfile # late import so Python build itself doesn't break log.info('Creating tar archive') + + uid = _get_uid(owner) + gid = _get_gid(group) + + def _set_uid_gid(tarinfo): + if gid is not None: + tarinfo.gid = gid + tarinfo.gname = group + if uid is not None: + tarinfo.uid = uid + tarinfo.uname = owner + return tarinfo + if not dry_run: tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) try: - tar.add(base_dir) + tar.add(base_dir, filter=_set_uid_gid) finally: tar.close() @@ -137,7 +190,7 @@ def check_archive_formats(formats): return None def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, - dry_run=0): + dry_run=0, owner=None, group=None): """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific @@ -150,6 +203,9 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. + + 'owner' and 'group' are used when creating a tar archive. By default, + uses the current owner and group. """ save_cwd = os.getcwd() if root_dir is not None: @@ -171,6 +227,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, func = format_info[0] for arg, val in format_info[1]: kwargs[arg] = val + + if format != 'zip': + kwargs['owner'] = owner + kwargs['group'] = group + filename = func(base_name, base_dir, **kwargs) if root_dir is not None: diff --git a/cmd.py b/cmd.py index ae4efc7efc..08632099aa 100644 --- a/cmd.py +++ b/cmd.py @@ -367,9 +367,11 @@ def spawn(self, cmd, search_path=1, level=1): from distutils.spawn import spawn spawn(cmd, search_path, dry_run=self.dry_run) - def make_archive(self, base_name, format, root_dir=None, base_dir=None): - return archive_util.make_archive(base_name, format, root_dir, base_dir, - dry_run=self.dry_run) + def make_archive(self, base_name, format, root_dir=None, base_dir=None, + owner=None, group=None): + return archive_util.make_archive(base_name, format, root_dir, + base_dir, dry_run=self.dry_run, + owner=owner, group=group) def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): diff --git a/command/bdist.py b/command/bdist.py index 1a360b59e3..2c81f3a9c0 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -39,6 +39,12 @@ class bdist(Command): "[default: dist]"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['skip-build'] @@ -80,6 +86,8 @@ def initialize_options(self): self.formats = None self.dist_dir = None self.skip_build = 0 + self.group = None + self.owner = None def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' @@ -125,6 +133,11 @@ def run(self): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] + # passing the owner and group names for tar archiving + if cmd_name == 'bdist_dumb': + sub_cmd.owner = self.owner + sub_cmd.group = self.group + # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 63c0a47537..49fd653a19 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -36,6 +36,12 @@ class bdist_dumb(Command): ('relative', None, "build the archive using relative paths" "(default: false)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['keep-temp', 'skip-build', 'relative'] @@ -52,6 +58,8 @@ def initialize_options(self): self.dist_dir = None self.skip_build = 0 self.relative = 0 + self.owner = None + self.group = None def finalize_options(self): if self.bdist_dir is None: @@ -109,7 +117,8 @@ def run(self): # Make the archive filename = self.make_archive(pseudoinstall_root, - self.format, root_dir=archive_root) + self.format, root_dir=archive_root, + owner=self.owner, group=self.group) if self.distribution.has_ext_modules(): pyversion = get_python_version() else: diff --git a/command/sdist.py b/command/sdist.py index ace9eeeb61..76e1de8100 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -75,6 +75,10 @@ def checking_metadata(self): ('medata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), + ('owner=', 'u', + "Owner name used when creating a tar file [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file [default: current group]"), ] boolean_options = ['use-defaults', 'prune', @@ -114,6 +118,8 @@ def initialize_options(self): self.archive_files = None self.metadata_check = 1 + self.owner = None + self.group = None def finalize_options(self): if self.manifest is None: @@ -449,7 +455,8 @@ def make_distribution(self): self.formats.append(self.formats.pop(self.formats.index('tar'))) for fmt in self.formats: - file = self.make_archive(base_name, fmt, base_dir=base_dir) + file = self.make_archive(base_name, fmt, base_dir=base_dir, + owner=self.owner, group=self.group) archive_files.append(file) self.distribution.dist_files.append(('sdist', '', file)) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index d33b7e15b1..9990df36c3 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -13,6 +13,13 @@ from distutils.tests import support from test.support import check_warnings +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False + try: import zipfile ZIP_SUPPORT = True @@ -30,7 +37,7 @@ class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(zlib, "requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -41,7 +48,7 @@ def test_make_tarball(self): tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], - "Source and target should be on same drive") + "source and target should be on same drive") base_name = os.path.join(tmpdir2, 'archive') @@ -202,6 +209,58 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support + if UID_GID_SUPPORT: + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + else: + group = owner = 'root' + + base_dir, root_dir, base_name = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner, + group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'zip', root_dir, base_dir) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner=owner, group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner='kjhkjhkjg', group='oihohoh') + self.assertTrue(os.path.exists(res)) + + @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() + os.chdir(tmpdir) + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + try: + archive_name = make_tarball(base_name, 'dist', compress=None, + owner=owner, group=group) + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + self.assertTrue(os.path.exists(archive_name)) + + # now checks the rights + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 986288e593..c10e973ed7 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -3,6 +3,7 @@ import unittest import shutil import zipfile +import tarfile # zlib is not used here, but if it's not available # the tests that use zipfile may fail @@ -11,6 +12,13 @@ except ImportError: zlib = None +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False + from os.path import join import sys import tempfile @@ -288,6 +296,52 @@ def test_finalize_options(self): cmd.formats = 'supazipa' self.assertRaises(DistutilsOptionError, cmd.finalize_options) + @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_make_distribution_owner_group(self): + + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return + + # now building a sdist + dist, cmd = self.get_cmd() + + # creating a gztar and specifying the owner+group + cmd.formats = ['gztar'] + cmd.owner = pwd.getpwuid(0)[0] + cmd.group = grp.getgrgid(0)[0] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + + # building a sdist again + dist, cmd = self.get_cmd() + + # creating a gztar + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, os.getuid()) + self.assertEquals(member.gid, os.getgid()) + finally: + archive.close() def test_suite(): return unittest.makeSuite(SDistTestCase) From f6e2f956fb81947c730c6417d1d492210f2f2c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 3 Oct 2009 00:07:35 +0000 Subject: [PATCH 2595/8469] removing the last remaning apply() calls --- archive_util.py | 2 +- dir_util.py | 2 +- filelist.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archive_util.py b/archive_util.py index 75318eba61..4ace7bdbf0 100644 --- a/archive_util.py +++ b/archive_util.py @@ -233,7 +233,7 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, kwargs['owner'] = owner kwargs['group'] = group - filename = apply(func, (base_name, base_dir), kwargs) + filename = func(base_name, base_dir, **kwargs) if root_dir is not None: log.debug("changing back to '%s'", save_cwd) os.chdir(save_cwd) diff --git a/dir_util.py b/dir_util.py index 55607e5b53..3e2cd35385 100644 --- a/dir_util.py +++ b/dir_util.py @@ -190,7 +190,7 @@ def remove_tree(directory, verbose=1, dry_run=0): _build_cmdtuple(directory, cmdtuples) for cmd in cmdtuples: try: - apply(cmd[0], (cmd[1],)) + cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) if abspath in _path_created: diff --git a/filelist.py b/filelist.py index 7cf05098ed..4aac6d397a 100644 --- a/filelist.py +++ b/filelist.py @@ -61,7 +61,7 @@ def sort(self): sortable_files.sort() self.files = [] for sort_tuple in sortable_files: - self.files.append(apply(os.path.join, sort_tuple)) + self.files.append(os.path.join(*sort_tuple)) # -- Other miscellaneous utility methods --------------------------- From 8a0d79621f41405e1315f39118fdb713809dbb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 3 Oct 2009 01:21:38 +0000 Subject: [PATCH 2596/8469] Issue #7039: Fixed test_distutils when running tests on an installation with no build --- tests/test_sysconfig.py | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 9f13952133..88f9ed865d 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -30,30 +30,13 @@ def test_get_python_lib(self): sysconfig.get_python_lib(prefix=TESTFN)) def test_get_python_inc(self): - # The check for srcdir is copied from Python's setup.py, - # and is necessary to make this test pass when building - # Python in a directory other than the source directory. - (srcdir,) = sysconfig.get_config_vars('srcdir') - if not srcdir: - inc_dir = sysconfig.get_python_inc() - else: - # This test is not really a proper test: when building - # Python from source, even in the same directory, - # we won't be testing the same thing as when running - # distutils' tests on an installed Python. Nevertheless, - # let's try to do our best: if we are running Python's - # unittests from a build directory that is not the source - # directory, the normal inc_dir will exist, it will just not - # contain anything of interest. - inc_dir = sysconfig.get_python_inc() - self.assert_(os.path.isdir(inc_dir)) - # Now test the source location, to make sure Python.h does - # exist. - inc_dir = os.path.join(os.getcwd(), srcdir, 'Include') - inc_dir = os.path.normpath(inc_dir) - self.assert_(os.path.isdir(inc_dir), inc_dir) + inc_dir = sysconfig.get_python_inc() + # This is not much of a test. We make sure Python.h exists + # in the directory returned by get_python_inc() but we don't know + # it is the correct file. + self.assertTrue(os.path.isdir(inc_dir), inc_dir) python_h = os.path.join(inc_dir, "Python.h") - self.assert_(os.path.isfile(python_h), python_h) + self.assertTrue(os.path.isfile(python_h), python_h) def test_get_config_vars(self): cvars = sysconfig.get_config_vars() From c4b6ae4685dc181db793d5fff29b7cea8b7f3d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 3 Oct 2009 14:52:33 +0000 Subject: [PATCH 2597/8469] now uses the right exception type --- archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive_util.py b/archive_util.py index 4ace7bdbf0..bc5edfd864 100644 --- a/archive_util.py +++ b/archive_util.py @@ -16,12 +16,12 @@ try: from pwd import getpwnam -except AttributeError: +except ImportError: getpwnam = None try: from grp import getgrnam -except AttributeError: +except ImportError: getgrnam = None def _get_gid(name): From 50c7d916840891606674311b0643cd4a188b63c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 3 Oct 2009 14:54:15 +0000 Subject: [PATCH 2598/8469] Merged revisions 75209 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75209 | tarek.ziade | 2009-10-03 16:52:33 +0200 (Sat, 03 Oct 2009) | 1 line now uses the right exception type ........ --- archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive_util.py b/archive_util.py index d4525998fd..d051f917bb 100644 --- a/archive_util.py +++ b/archive_util.py @@ -16,12 +16,12 @@ try: from pwd import getpwnam -except AttributeError: +except ImportError: getpwnam = None try: from grp import getgrnam -except AttributeError: +except ImportError: getgrnam = None def _get_gid(name): From 77aaa5d7d3d3183687745120cc24c88bd4eb8f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 5 Oct 2009 17:35:51 +0000 Subject: [PATCH 2599/8469] Fixed #7064: making sure get_ext_filename is called as Setuptools is assuming so it doesn't break it --- command/build_ext.py | 3 +- tests/setuptools_build_ext.py | 287 ++++++++++++++++++++++++++++++++++ tests/setuptools_extension.py | 51 ++++++ tests/test_build_ext.py | 20 +++ 4 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 tests/setuptools_build_ext.py create mode 100644 tests/setuptools_extension.py diff --git a/command/build_ext.py b/command/build_ext.py index a3e3982f6d..1b7d310142 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -630,7 +630,8 @@ def get_ext_fullpath(self, ext_name): """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - filename = self.get_ext_filename(modpath[-1]) + filename = self.get_ext_filename(ext_name) + filename = os.path.split(filename)[-1] if not self.inplace: # no further work needed diff --git a/tests/setuptools_build_ext.py b/tests/setuptools_build_ext.py new file mode 100644 index 0000000000..21fa9e8f43 --- /dev/null +++ b/tests/setuptools_build_ext.py @@ -0,0 +1,287 @@ +from distutils.command.build_ext import build_ext as _du_build_ext +try: + # Attempt to use Pyrex for building extensions, if available + from Pyrex.Distutils.build_ext import build_ext as _build_ext +except ImportError: + _build_ext = _du_build_ext + +import os, sys +from distutils.file_util import copy_file + +from distutils.tests.setuptools_extension import Library + +from distutils.ccompiler import new_compiler +from distutils.sysconfig import customize_compiler, get_config_var +get_config_var("LDSHARED") # make sure _config_vars is initialized +from distutils.sysconfig import _config_vars +from distutils import log +from distutils.errors import * + +have_rtld = False +use_stubs = False +libtype = 'shared' + +if sys.platform == "darwin": + use_stubs = True +elif os.name != 'nt': + try: + from dl import RTLD_NOW + have_rtld = True + use_stubs = True + except ImportError: + pass + +def if_dl(s): + if have_rtld: + return s + return '' + + + + + + +class build_ext(_build_ext): + def run(self): + """Build extensions in build directory, then copy if --inplace""" + old_inplace, self.inplace = self.inplace, 0 + _build_ext.run(self) + self.inplace = old_inplace + if old_inplace: + self.copy_extensions_to_source() + + def copy_extensions_to_source(self): + build_py = self.get_finalized_command('build_py') + for ext in self.extensions: + fullname = self.get_ext_fullname(ext.name) + filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + package = '.'.join(modpath[:-1]) + package_dir = build_py.get_package_dir(package) + dest_filename = os.path.join(package_dir,os.path.basename(filename)) + src_filename = os.path.join(self.build_lib,filename) + + # Always copy, even if source is older than destination, to ensure + # that the right extensions for the current Python/platform are + # used. + copy_file( + src_filename, dest_filename, verbose=self.verbose, + dry_run=self.dry_run + ) + if ext._needs_stub: + self.write_stub(package_dir or os.curdir, ext, True) + + + if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'): + # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 + def swig_sources(self, sources, *otherargs): + # first do any Pyrex processing + sources = _build_ext.swig_sources(self, sources) or sources + # Then do any actual SWIG stuff on the remainder + return _du_build_ext.swig_sources(self, sources, *otherargs) + + + + def get_ext_filename(self, fullname): + filename = _build_ext.get_ext_filename(self,fullname) + ext = self.ext_map[fullname] + if isinstance(ext,Library): + fn, ext = os.path.splitext(filename) + return self.shlib_compiler.library_filename(fn,libtype) + elif use_stubs and ext._links_to_dynamic: + d,fn = os.path.split(filename) + return os.path.join(d,'dl-'+fn) + else: + return filename + + def initialize_options(self): + _build_ext.initialize_options(self) + self.shlib_compiler = None + self.shlibs = [] + self.ext_map = {} + + def finalize_options(self): + _build_ext.finalize_options(self) + self.extensions = self.extensions or [] + self.check_extensions_list(self.extensions) + self.shlibs = [ext for ext in self.extensions + if isinstance(ext,Library)] + if self.shlibs: + self.setup_shlib_compiler() + for ext in self.extensions: + ext._full_name = self.get_ext_fullname(ext.name) + for ext in self.extensions: + fullname = ext._full_name + self.ext_map[fullname] = ext + ltd = ext._links_to_dynamic = \ + self.shlibs and self.links_to_dynamic(ext) or False + ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library) + filename = ext._file_name = self.get_ext_filename(fullname) + libdir = os.path.dirname(os.path.join(self.build_lib,filename)) + if ltd and libdir not in ext.library_dirs: + ext.library_dirs.append(libdir) + if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs: + ext.runtime_library_dirs.append(os.curdir) + + def setup_shlib_compiler(self): + compiler = self.shlib_compiler = new_compiler( + compiler=self.compiler, dry_run=self.dry_run, force=self.force + ) + if sys.platform == "darwin": + tmp = _config_vars.copy() + try: + # XXX Help! I don't have any idea whether these are right... + _config_vars['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" + _config_vars['CCSHARED'] = " -dynamiclib" + _config_vars['SO'] = ".dylib" + customize_compiler(compiler) + finally: + _config_vars.clear() + _config_vars.update(tmp) + else: + customize_compiler(compiler) + + if self.include_dirs is not None: + compiler.set_include_dirs(self.include_dirs) + if self.define is not None: + # 'define' option is a list of (name,value) tuples + for (name,value) in self.define: + compiler.define_macro(name, value) + if self.undef is not None: + for macro in self.undef: + compiler.undefine_macro(macro) + if self.libraries is not None: + compiler.set_libraries(self.libraries) + if self.library_dirs is not None: + compiler.set_library_dirs(self.library_dirs) + if self.rpath is not None: + compiler.set_runtime_library_dirs(self.rpath) + if self.link_objects is not None: + compiler.set_link_objects(self.link_objects) + + # hack so distutils' build_extension() builds a library instead + compiler.link_shared_object = link_shared_object.__get__(compiler) + + + + def get_export_symbols(self, ext): + if isinstance(ext,Library): + return ext.export_symbols + return _build_ext.get_export_symbols(self,ext) + + def build_extension(self, ext): + _compiler = self.compiler + try: + if isinstance(ext,Library): + self.compiler = self.shlib_compiler + _build_ext.build_extension(self,ext) + if ext._needs_stub: + self.write_stub( + self.get_finalized_command('build_py').build_lib, ext + ) + finally: + self.compiler = _compiler + + def links_to_dynamic(self, ext): + """Return true if 'ext' links to a dynamic lib in the same package""" + # XXX this should check to ensure the lib is actually being built + # XXX as dynamic, and not just using a locally-found version or a + # XXX static-compiled version + libnames = dict.fromkeys([lib._full_name for lib in self.shlibs]) + pkg = '.'.join(ext._full_name.split('.')[:-1]+['']) + for libname in ext.libraries: + if pkg+libname in libnames: return True + return False + + def get_outputs(self): + outputs = _build_ext.get_outputs(self) + optimize = self.get_finalized_command('build_py').optimize + for ext in self.extensions: + if ext._needs_stub: + base = os.path.join(self.build_lib, *ext._full_name.split('.')) + outputs.append(base+'.py') + outputs.append(base+'.pyc') + if optimize: + outputs.append(base+'.pyo') + return outputs + + def write_stub(self, output_dir, ext, compile=False): + log.info("writing stub loader for %s to %s",ext._full_name, output_dir) + stub_file = os.path.join(output_dir, *ext._full_name.split('.'))+'.py' + if compile and os.path.exists(stub_file): + raise DistutilsError(stub_file+" already exists! Please delete.") + if not self.dry_run: + f = open(stub_file,'w') + f.write('\n'.join([ + "def __bootstrap__():", + " global __bootstrap__, __file__, __loader__", + " import sys, os, pkg_resources, imp"+if_dl(", dl"), + " __file__ = pkg_resources.resource_filename(__name__,%r)" + % os.path.basename(ext._file_name), + " del __bootstrap__", + " if '__loader__' in globals():", + " del __loader__", + if_dl(" old_flags = sys.getdlopenflags()"), + " old_dir = os.getcwd()", + " try:", + " os.chdir(os.path.dirname(__file__))", + if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), + " imp.load_dynamic(__name__,__file__)", + " finally:", + if_dl(" sys.setdlopenflags(old_flags)"), + " os.chdir(old_dir)", + "__bootstrap__()", + "" # terminal \n + ])) + f.close() + if compile: + from distutils.util import byte_compile + byte_compile([stub_file], optimize=0, + force=True, dry_run=self.dry_run) + optimize = self.get_finalized_command('install_lib').optimize + if optimize > 0: + byte_compile([stub_file], optimize=optimize, + force=True, dry_run=self.dry_run) + if os.path.exists(stub_file) and not self.dry_run: + os.unlink(stub_file) + + +if use_stubs or os.name=='nt': + # Build shared libraries + # + def link_shared_object(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None + ): self.link( + self.SHARED_LIBRARY, objects, output_libname, + output_dir, libraries, library_dirs, runtime_library_dirs, + export_symbols, debug, extra_preargs, extra_postargs, + build_temp, target_lang + ) +else: + # Build static libraries everywhere else + libtype = 'static' + + def link_shared_object(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None + ): + # XXX we need to either disallow these attrs on Library instances, + # or warn/abort here if set, or something... + #libraries=None, library_dirs=None, runtime_library_dirs=None, + #export_symbols=None, extra_preargs=None, extra_postargs=None, + #build_temp=None + + assert output_dir is None # distutils build_ext doesn't pass this + output_dir,filename = os.path.split(output_libname) + basename, ext = os.path.splitext(filename) + if self.library_filename("x").startswith('lib'): + # strip 'lib' prefix; this is kludgy if some platform uses + # a different prefix + basename = basename[3:] + + self.create_static_lib( + objects, basename, output_dir, debug, target_lang + ) diff --git a/tests/setuptools_extension.py b/tests/setuptools_extension.py new file mode 100644 index 0000000000..ec6b690cdb --- /dev/null +++ b/tests/setuptools_extension.py @@ -0,0 +1,51 @@ +from distutils.core import Extension as _Extension +from distutils.core import Distribution as _Distribution + +def _get_unpatched(cls): + """Protect against re-patching the distutils if reloaded + + Also ensures that no other distutils extension monkeypatched the distutils + first. + """ + while cls.__module__.startswith('setuptools'): + cls, = cls.__bases__ + if not cls.__module__.startswith('distutils'): + raise AssertionError( + "distutils has already been patched by %r" % cls + ) + return cls + +_Distribution = _get_unpatched(_Distribution) +_Extension = _get_unpatched(_Extension) + +try: + from Pyrex.Distutils.build_ext import build_ext +except ImportError: + have_pyrex = False +else: + have_pyrex = True + + +class Extension(_Extension): + """Extension that uses '.c' files in place of '.pyx' files""" + + if not have_pyrex: + # convert .pyx extensions to .c + def __init__(self,*args,**kw): + _Extension.__init__(self,*args,**kw) + sources = [] + for s in self.sources: + if s.endswith('.pyx'): + sources.append(s[:-3]+'c') + else: + sources.append(s) + self.sources = sources + +class Library(Extension): + """Just like a regular Extension, but built as a library instead""" + +import sys, distutils.core, distutils.extension +distutils.core.Extension = Extension +distutils.extension.Extension = Extension +if 'distutils.command.build_ext' in sys.modules: + sys.modules['distutils.command.build_ext'].Extension = Extension diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 94000a57d9..36e0bb84dd 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -13,6 +13,7 @@ import unittest from test import test_support + # http://bugs.python.org/issue4373 # Don't load the xx module more than once. ALREADY_TESTED = False @@ -334,6 +335,25 @@ def test_build_ext_inplace(self): etree_ext = Extension('lxml.etree', [etree_c]) dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) cmd = build_ext(dist) + cmd.ensure_finalized() + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + def test_setuptools_compat(self): + from setuptools_build_ext import build_ext as setuptools_build_ext + from setuptools_extension import Extension + + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = setuptools_build_ext(dist) + cmd.ensure_finalized() cmd.inplace = 1 cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] From 68342e4b2ffdf4ebf5334a2dd73e71f4d7dbe7c8 Mon Sep 17 00:00:00 2001 From: agronholm Date: Mon, 5 Oct 2009 21:56:24 +0300 Subject: [PATCH 2600/8469] Add the Python 3 classifier to make distribute visible on the Python 3 packages list on PyPI --HG-- branch : distribute extra : rebase_source : c4d4ddf6dce9ae7938bd4c017aa261bf5ceef364 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index fcd85eb2bc..c4116559a8 100755 --- a/setup.py +++ b/setup.py @@ -134,6 +134,7 @@ def _being_installed(): License :: OSI Approved :: Zope Public License Operating System :: OS Independent Programming Language :: Python + Programming Language :: Python :: 3 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From f08d60462aba52ea189fe6b20741ee1c6fe58684 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 5 Oct 2009 22:32:48 +0000 Subject: [PATCH 2601/8469] Use standard comma punctuation; reword some sentences in the docs --- command/check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/check.py b/command/check.py index 7d56dfcf40..bc29baaba4 100644 --- a/command/check.py +++ b/command/check.py @@ -91,7 +91,7 @@ def check_metadata(self): missing.append(attr) if missing: - self.warn("missing required meta-data: %s" % ' ,'.join(missing)) + self.warn("missing required meta-data: %s" % ', '.join(missing)) if metadata.author: if not metadata.author_email: self.warn("missing meta-data: if 'author' supplied, " + From 847659f5b6c3f71dcd6db1ba1fe76bbc89739732 Mon Sep 17 00:00:00 2001 From: agronholm Date: Tue, 6 Oct 2009 11:59:00 +0300 Subject: [PATCH 2602/8469] Changed wget references to use curl instead --HG-- branch : distribute extra : rebase_source : 03f4c91b3b2171f05df6d619681e7f2ae3b9fbd3 --- README.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index d130cf90cc..7e0c5eade4 100755 --- a/README.txt +++ b/README.txt @@ -76,14 +76,14 @@ distribute_setup.py Download ``distribute_setup.py`` and execute it, using the Python interpreter of your choice. -If your shell has the ``wget`` program you can do:: +If your shell has the ``curl`` program you can do:: - $ wget http://nightly.ziade.org/distribute_setup.py + $ curl -O http://nightly.ziade.org/distribute_setup.py $ python distribute_setup.py If you are under Python 3, use ``distribute_setup_3k.py``:: - $ wget http://nightly.ziade.org/distribute_setup_3k.py + $ curl -O http://nightly.ziade.org/distribute_setup_3k.py $ python distribute_setup_3k.py easy_install or pip @@ -99,7 +99,7 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.4.tar.gz + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.4.tar.gz $ tar -xzvf distribute-0.6.4.tar.gz $ cd distribute-0.6 $ python setup.py install From 82c7e63d170ca25fb083b729a1ebec9835010691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 6 Oct 2009 12:35:46 +0000 Subject: [PATCH 2603/8469] #7068: Fixed the partial renaming that occured in r72594 --- command/build_ext.py | 2 +- tests/test_build_ext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1b7d310142..da9cbfd574 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -303,7 +303,7 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, + self.compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 36e0bb84dd..00733a46a7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -264,7 +264,7 @@ def test_get_outputs(self): sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) - + cmd.compiler = None cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] From 7bbdd446ed91b60cfb54abb7e2a38b5657253759 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 6 Oct 2009 13:21:07 +0000 Subject: [PATCH 2604/8469] Bumping to 2.6.4rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index fd52b8d7c5..83c576f802 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.3" +__version__ = "2.6.4rc1" #--end constants-- From 45a293a430e41d37c583df639f4dcc9880565438 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Wed, 7 Oct 2009 18:50:17 +0200 Subject: [PATCH 2605/8469] Added a upload_docs command to upload project documentation to PyPI's packages.python.org --HG-- branch : distribute extra : rebase_source : e8d62df101ab017b71ec9c923f64bc3494ba8979 --- distribute.egg-info/entry_points.txt | 1 + docs/setuptools.txt | 55 ++++++++++ setup.cfg | 3 + setuptools/command/__init__.py | 2 +- setuptools/command/upload_docs.py | 153 +++++++++++++++++++++++++++ 5 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 setuptools/command/upload_docs.py diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index d18df33807..f4b74da0fd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -7,6 +7,7 @@ build_py = setuptools.command.build_py:build_py saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 06f632ecc7..7c679fd08f 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2369,6 +2369,61 @@ The ``upload`` command has a few options worth noting: The URL of the repository to upload to. Defaults to http://pypi.python.org/pypi (i.e., the main PyPI installation). +.. _upload_docs: + +``upload_docs`` - Upload package documentation to PyPI +====================================================== + +PyPI now supports uploading project documentation to the dedicated URL +http://packages.python.org//. + +The ``upload_docs`` command will create the necessary zip file out of a +documentation directory and will post to the repository. + +Note that to upload the documentation of a project, the corresponding version +must already be registered with PyPI, using the distutils ``register`` +command -- just like the ``upload`` command. + +Assuming there is an ``Example`` project with documentation in the +subdirectory ``docs``, e.g.:: + + Example/ + |-- example.py + |-- setup.cfg + |-- setup.py + |-- docs + | |-- build + | | `-- html + | | | |-- index.html + | | | `-- tips_tricks.html + | |-- conf.py + | |-- index.txt + | `-- tips_tricks.txt + +You can simply pass the documentation directory path to the ``upload_docs`` +command:: + + python setup.py upload_docs --upload-dir=docs/build/html + +As with any other ``setuptools`` based command, you can define useful +defaults in the ``setup.cfg`` of your Python project, e.g.:: + + [upload_docs] + upload-dir = docs/build/html + +The ``upload_docs`` command has the following options: + +``--upload-dir`` + The directory to be uploaded to the repository. + +``--show-response`` + Display the full response text from server; this is useful for debugging + PyPI problems. + +``--repository=URL, -r URL`` + The URL of the repository to upload to. Defaults to + http://pypi.python.org/pypi (i.e., the main PyPI installation). + ------------------------------------ Extending and Reusing ``setuptools`` diff --git a/setup.cfg b/setup.cfg index f7811000a3..f16664cb75 100755 --- a/setup.cfg +++ b/setup.cfg @@ -6,3 +6,6 @@ tag_svn_revision = 1 release = egg_info -RDb '' source = register sdist binary binary = bdist_egg upload --show-response + +[upload_docs] +upload-dir = docs/build/html \ No newline at end of file diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index f898822bb1..ea544b504e 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', + 'register', 'bdist_wininst', 'upload_docs', ] import sys diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py new file mode 100644 index 0000000000..5bbdc7f2ff --- /dev/null +++ b/setuptools/command/upload_docs.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +"""upload_docs + +Implements a Distutils 'upload_docs' subcommand (upload documentation to +PyPI's packages.python.org). +""" + +import os +import socket +import zipfile +import httplib +import base64 +import urlparse +import tempfile +import cStringIO as StringIO + +from distutils import log +from distutils.errors import DistutilsOptionError +from distutils.command.upload import upload + +class upload_docs(upload): + + description = 'Upload documentation to PyPI' + + user_options = [ + ('repository=', 'r', + "url of repository [default: %s]" % upload.DEFAULT_REPOSITORY), + ('show-response', None, + 'display full response text from server'), + ('upload-dir=', None, 'directory to upload'), + ] + boolean_options = upload.boolean_options + + def initialize_options(self): + upload.initialize_options(self) + self.upload_dir = None + + def finalize_options(self): + upload.finalize_options(self) + if self.upload_dir is None: + build = self.get_finalized_command('build') + self.upload_dir = os.path.join(build.build_base, 'docs') + self.mkpath(self.upload_dir) + self.ensure_dirname('upload_dir') + self.announce('Using upload directory %s' % self.upload_dir) + + def create_zipfile(self): + name = self.distribution.metadata.get_name() + tmp_dir = tempfile.mkdtemp() + tmp_file = os.path.join(tmp_dir, "%s.zip" % name) + zip_file = zipfile.ZipFile(tmp_file, "w") + for root, dirs, files in os.walk(self.upload_dir): + if not files: + raise DistutilsOptionError( + "no files found in upload directory '%s'" + % self.upload_dir) + for name in files: + full = os.path.join(root, name) + relative = root[len(self.upload_dir):].lstrip(os.path.sep) + dest = os.path.join(relative, name) + zip_file.write(full, dest) + zip_file.close() + return tmp_file + + def run(self): + zip_file = self.create_zipfile() + self.upload_file(zip_file) + + def upload_file(self, filename): + content = open(filename, 'rb').read() + meta = self.distribution.metadata + data = { + ':action': 'doc_upload', + 'name': meta.get_name(), + 'content': (os.path.basename(filename), content), + } + # set up the authentication + auth = "Basic " + base64.encodestring( + self.username + ":" + self.password).strip() + + # Build up the MIME payload for the POST data + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = '\n--' + boundary + end_boundary = sep_boundary + '--' + body = StringIO.StringIO() + for key, value in data.items(): + # handle multiple entries for the same name + if type(value) != type([]): + value = [value] + for value in value: + if type(value) is tuple: + fn = ';filename="%s"' % value[0] + value = value[1] + else: + fn = "" + value = str(value) + body.write(sep_boundary) + body.write('\nContent-Disposition: form-data; name="%s"'%key) + body.write(fn) + body.write("\n\n") + body.write(value) + if value and value[-1] == '\r': + body.write('\n') # write an extra newline (lurve Macs) + body.write(end_boundary) + body.write("\n") + body = body.getvalue() + + self.announce("Submitting documentation to %s" % (self.repository), + log.INFO) + + # build the Request + # We can't use urllib2 since we need to send the Basic + # auth right with the first request + schema, netloc, url, params, query, fragments = \ + urlparse.urlparse(self.repository) + assert not params and not query and not fragments + if schema == 'http': + http = httplib.HTTPConnection(netloc) + elif schema == 'https': + http = httplib.HTTPSConnection(netloc) + else: + raise AssertionError("unsupported schema "+schema) + + data = '' + loglevel = log.INFO + try: + http.connect() + http.putrequest("POST", url) + http.putheader('Content-type', + 'multipart/form-data; boundary=%s'%boundary) + http.putheader('Content-length', str(len(body))) + http.putheader('Authorization', auth) + http.endheaders() + http.send(body) + except socket.error, e: + self.announce(str(e), log.ERROR) + return + + r = http.getresponse() + if r.status == 200: + self.announce('Server response (%s): %s' % (r.status, r.reason), + log.INFO) + elif r.status == 301: + location = r.getheader('Location') + if location is None: + location = 'http://packages.python.org/%s/' % meta.get_name() + self.announce('Upload successful. Visit %s' % location, + log.INFO) + else: + self.announce('Upload failed (%s): %s' % (r.status, r.reason), + log.ERROR) + if self.show_response: + print '-'*75, r.read(), '-'*75 From e950cf009dc1ee0b4bbd9ac62a12bd434f6f37a1 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 8 Oct 2009 02:25:19 +0200 Subject: [PATCH 2606/8469] Added item to changelog and myself to the contributor list --HG-- branch : distribute extra : rebase_source : 19a1883a5c97362f14e7713948147f61c7ab55cb --- CHANGES.txt | 3 ++- CONTRIBUTORS.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index d59d26ef20..690367df7c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ CHANGES 0.6.4 ----- - +* Added an upload_docs command to easily upload project documentation to + PyPI's http://packages.python.org. ----- 0.6.3 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index c4a84b702a..5dcc3675e2 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -4,6 +4,7 @@ Contributors * Alex Grönholm * Hanno Schlichting +* Jannis Leidel * Lennart Regebro * Martin von Loewis * Philip Envey From 14bee6d350bf2bd306757ae7305c584374aec287 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 8 Oct 2009 15:07:36 +0200 Subject: [PATCH 2607/8469] Added configuration for build_sphinx command to simplify building --HG-- branch : distribute extra : rebase_source : 69ea754fdb336feb1016db3f5ab018e648f38097 --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.cfg b/setup.cfg index f16664cb75..dc4cfd970e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -7,5 +7,10 @@ release = egg_info -RDb '' source = register sdist binary binary = bdist_egg upload --show-response +[build_sphinx] +source-dir = docs/ +build-dir = docs/build +all_files = 1 + [upload_docs] upload-dir = docs/build/html \ No newline at end of file From 0867ba6e43bc687947b24d77efdbe416fcc38780 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 8 Oct 2009 15:09:35 +0200 Subject: [PATCH 2608/8469] Added nature Sphinx theme --HG-- branch : distribute extra : rebase_source : 76cc928d3a7080328c5c7d1bca3b4661a8fe7650 --- docs/_theme/nature/static/nature.css_t | 230 +++++++++++++++++++++++++ docs/_theme/nature/static/pygments.css | 54 ++++++ docs/_theme/nature/theme.conf | 4 + 3 files changed, 288 insertions(+) create mode 100644 docs/_theme/nature/static/nature.css_t create mode 100644 docs/_theme/nature/static/pygments.css create mode 100644 docs/_theme/nature/theme.conf diff --git a/docs/_theme/nature/static/nature.css_t b/docs/_theme/nature/static/nature.css_t new file mode 100644 index 0000000000..a29848e157 --- /dev/null +++ b/docs/_theme/nature/static/nature.css_t @@ -0,0 +1,230 @@ +/** + * Sphinx stylesheet -- default theme + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Arial, sans-serif; + font-size: 100%; + background-color: #111; + color: #555; + margin: 0; + padding: 0; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 300px; +} + +hr{ + border: 1px solid #B1B4B6; +} + +div.document { + background-color: #eee; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 30px 30px; + font-size: 0.8em; +} + +div.footer { + color: #555; + width: 100%; + padding: 13px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #444; + text-decoration: underline; +} + +div.related { + background-color: #6BA81E; + line-height: 32px; + color: #fff; + text-shadow: 0px 1px 0 #444; + font-size: 0.80em; +} + +div.related a { + color: #E2F3CC; +} + +div.sphinxsidebar { + font-size: 0.75em; + line-height: 1.5em; + width: 300px +} + +div.sphinxsidebarwrapper{ + padding: 20px 0; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Arial, sans-serif; + color: #222; + font-size: 1.2em; + font-weight: normal; + margin: 0; + padding: 5px 10px; + background-color: #ddd; + text-shadow: 1px 1px 0 white +} + +div.sphinxsidebar h4{ + font-size: 1.1em; +} + +div.sphinxsidebar h3 a { + color: #444; +} + + +div.sphinxsidebar p { + color: #888; + padding: 5px 20px; +} + +div.sphinxsidebar p.topless { +} + +div.sphinxsidebar ul { + margin: 10px 10px 10px 20px; + padding: 0; + color: #000; +} + +div.sphinxsidebar a { + color: #444; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar input[type=text]{ + margin-left: 20px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #005B81; + text-decoration: none; +} + +a:hover { + color: #E32E00; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Arial, sans-serif; + background-color: #BED4EB; + font-weight: normal; + color: #212224; + margin: 30px 0px 10px 0px; + padding: 5px 0 5px 10px; + text-shadow: 0px 1px 0 white +} + +div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 150%; background-color: #C8D5E3; } +div.body h3 { font-size: 120%; background-color: #D8DEE3; } +div.body h4 { font-size: 110%; background-color: #D8DEE3; } +div.body h5 { font-size: 100%; background-color: #D8DEE3; } +div.body h6 { font-size: 100%; background-color: #D8DEE3; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li { + line-height: 1.5em; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.highlight{ + background-color: white; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 10px; + background-color: White; + color: #222; + line-height: 1.2em; + border: 1px solid #C6C9CB; + font-size: 1.2em; + margin: 1.5em 0 1.5em 0; + -webkit-box-shadow: 1px 1px 1px #d8d8d8; + -moz-box-shadow: 1px 1px 1px #d8d8d8; +} + +tt { + background-color: #ecf0f3; + color: #222; + padding: 1px 2px; + font-size: 1.2em; + font-family: monospace; +} diff --git a/docs/_theme/nature/static/pygments.css b/docs/_theme/nature/static/pygments.css new file mode 100644 index 0000000000..652b76128b --- /dev/null +++ b/docs/_theme/nature/static/pygments.css @@ -0,0 +1,54 @@ +.c { color: #999988; font-style: italic } /* Comment */ +.k { font-weight: bold } /* Keyword */ +.o { font-weight: bold } /* Operator */ +.cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.cp { color: #999999; font-weight: bold } /* Comment.preproc */ +.c1 { color: #999988; font-style: italic } /* Comment.Single */ +.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #aa0000 } /* Generic.Error */ +.gh { color: #999999 } /* Generic.Heading */ +.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.go { color: #111 } /* Generic.Output */ +.gp { color: #555555 } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #aaaaaa } /* Generic.Subheading */ +.gt { color: #aa0000 } /* Generic.Traceback */ +.kc { font-weight: bold } /* Keyword.Constant */ +.kd { font-weight: bold } /* Keyword.Declaration */ +.kp { font-weight: bold } /* Keyword.Pseudo */ +.kr { font-weight: bold } /* Keyword.Reserved */ +.kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.m { color: #009999 } /* Literal.Number */ +.s { color: #bb8844 } /* Literal.String */ +.na { color: #008080 } /* Name.Attribute */ +.nb { color: #999999 } /* Name.Builtin */ +.nc { color: #445588; font-weight: bold } /* Name.Class */ +.no { color: #ff99ff } /* Name.Constant */ +.ni { color: #800080 } /* Name.Entity */ +.ne { color: #990000; font-weight: bold } /* Name.Exception */ +.nf { color: #990000; font-weight: bold } /* Name.Function */ +.nn { color: #555555 } /* Name.Namespace */ +.nt { color: #000080 } /* Name.Tag */ +.nv { color: purple } /* Name.Variable */ +.ow { font-weight: bold } /* Operator.Word */ +.mf { color: #009999 } /* Literal.Number.Float */ +.mh { color: #009999 } /* Literal.Number.Hex */ +.mi { color: #009999 } /* Literal.Number.Integer */ +.mo { color: #009999 } /* Literal.Number.Oct */ +.sb { color: #bb8844 } /* Literal.String.Backtick */ +.sc { color: #bb8844 } /* Literal.String.Char */ +.sd { color: #bb8844 } /* Literal.String.Doc */ +.s2 { color: #bb8844 } /* Literal.String.Double */ +.se { color: #bb8844 } /* Literal.String.Escape */ +.sh { color: #bb8844 } /* Literal.String.Heredoc */ +.si { color: #bb8844 } /* Literal.String.Interpol */ +.sx { color: #bb8844 } /* Literal.String.Other */ +.sr { color: #808000 } /* Literal.String.Regex */ +.s1 { color: #bb8844 } /* Literal.String.Single */ +.ss { color: #bb8844 } /* Literal.String.Symbol */ +.bp { color: #999999 } /* Name.Builtin.Pseudo */ +.vc { color: #ff99ff } /* Name.Variable.Class */ +.vg { color: #ff99ff } /* Name.Variable.Global */ +.vi { color: #ff99ff } /* Name.Variable.Instance */ +.il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_theme/nature/theme.conf b/docs/_theme/nature/theme.conf new file mode 100644 index 0000000000..1cc4004464 --- /dev/null +++ b/docs/_theme/nature/theme.conf @@ -0,0 +1,4 @@ +[theme] +inherit = basic +stylesheet = nature.css +pygments_style = tango From 079951a1532a2c9e3295253c65e06091758f9150 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 8 Oct 2009 15:10:08 +0200 Subject: [PATCH 2609/8469] Updated Sphinx config, e.g. to add theme support --HG-- branch : distribute extra : rebase_source : b23e8bc5fa516fc6d0a2b232127c9d8b43cdb067 --- docs/conf.py | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d4ff4a1542..bad1a578a3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,20 +16,19 @@ import sys, os -# If your extensions are in another directory, add it here. If the directory -# is relative to the documentation root, use os.path.abspath to make it -# absolute, like shown here. +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.append(os.path.abspath('.')) -# General configuration -# --------------------- +# -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [] # Add any paths that contain templates here, relative to this directory. -templates_path = ['.templates'] +templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.txt' @@ -49,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.1' +version = '0.6.4' # The full version, including alpha/beta/rc tags. -release = '0.6.1' +release = '0.6.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -87,21 +86,30 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] -# Options for HTML output -# ----------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'default.css' +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'nature' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ['_theme'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = "Distribute documentation" # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +html_short_title = "Distribute" # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -115,7 +123,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['.static'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -141,8 +149,8 @@ # If true, the index is split into individual pages for each letter. #html_split_index = False -# If true, the reST sources are included in the HTML build as _sources/. -#html_copy_source = True +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the @@ -156,8 +164,7 @@ htmlhelp_basename = 'Distributedoc' -# Options for LaTeX output -# ------------------------ +# -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' @@ -166,7 +173,7 @@ #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, document class [howto/manual]). +# (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Distribute.tex', ur'Distribute Documentation', ur'The fellowship of the packaging', 'manual'), From dcc66e813d10098aa88eaa3be169cbc2e8b301b6 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 8 Oct 2009 15:11:48 +0200 Subject: [PATCH 2610/8469] Added a bunch of code-block directives for better highlighting with Pygments, fixed typo --HG-- branch : distribute extra : rebase_source : e000e29a4c561a0397b134d2e451080b34f84b5d --- docs/easy_install.txt | 28 +++++++++++++----- docs/python3.txt | 68 ++++++++++++++++++++++--------------------- docs/setuptools.txt | 22 ++++++++++---- 3 files changed, 72 insertions(+), 46 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index ff0ad3d892..b821e5ca45 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -330,7 +330,9 @@ to restrict downloading to hosts in your own intranet. See the section below on `Command-Line Options`_ for more details on the ``--allow-hosts`` option. By default, there are no host restrictions in effect, but you can change this -default by editing the appropriate `configuration files`_ and adding:: +default by editing the appropriate `configuration files`_ and adding: + +.. code-block:: ini [easy_install] allow_hosts = *.myintranet.example.com,*.python.org @@ -411,7 +413,9 @@ generated directory listing (such as the Apache web server provides). If you are setting up an intranet site for package downloads, you may want to configure the target machines to use your download site by default, adding -something like this to their `configuration files`_:: +something like this to their `configuration files`_: + +.. code-block:: ini [easy_install] find_links = http://mypackages.example.com/somedir/ @@ -445,7 +449,9 @@ Controlling Build Options EasyInstall respects standard distutils `Configuration Files`_, so you can use them to configure build options for packages that it installs from source. For example, if you are on Windows using the MinGW compiler, you can configure the -default compiler by putting something like this:: +default compiler by putting something like this: + +.. code-block:: ini [build] compiler = mingw32 @@ -593,7 +599,9 @@ distutils configuration files, under the command heading ``easy_install``. EasyInstall will look first for a ``setup.cfg`` file in the current directory, then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes and Windows, respectively), and finally a ``distutils.cfg`` file in the -``distutils`` package directory. Here's a simple example:: +``distutils`` package directory. Here's a simple example: + +.. code-block:: ini [easy_install] @@ -986,7 +994,9 @@ The next step is to create or modify ``distutils.cfg`` in the ``distutils`` directory of your Python library. The correct directory will be something like ``/usr/lib/python2.X/distutils`` on most Posix systems and something like ``C:\\Python2X\Lib\distutils`` on Windows machines. Add the following lines -to the file, substituting the correct Python version if necessary:: +to the file, substituting the correct Python version if necessary: + +.. code-block:: ini [install] install_lib = ~/lib/python2.3 @@ -1031,7 +1041,9 @@ location, because it is already configured to process ``.pth`` files, and EasyInstall already knows this. Before installing EasyInstall/setuptools, just create a ``~/.pydistutils.cfg`` -file with the following contents (or add this to the existing contents):: +file with the following contents (or add this to the existing contents): + +.. code-block:: ini [install] install_lib = ~/Library/Python/$py_version_short/site-packages @@ -1105,7 +1117,9 @@ Assuming that you want to install packages in a directory called ``~/py-lib``, and scripts in ``~/bin``, here's what you need to do: First, edit ``~/.pydistutils.cfg`` to include these settings, if you don't -already have them:: +already have them: + +.. code-block:: ini [install] install_lib = ~/py-lib diff --git a/docs/python3.txt b/docs/python3.txt index 9b5fa7972c..d5c3da67f0 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -36,20 +36,21 @@ to a list of names of packages containing fixers. A typical setup.py can look something like this:: - from setuptools import setup - - setup(name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - use_2to3 = True, - convert_2to3_doctests = ['src/your/module/README.txt'], - use_2to3_fixers = ['your.fixers'] - ) + from setuptools import setup + + setup( + name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + use_2to3 = True, + convert_2to3_doctests = ['src/your/module/README.txt'], + use_2to3_fixers = ['your.fixers'] + ) Differential conversion ----------------------- @@ -96,25 +97,26 @@ install process will continue as normal, but if you want to get rid of that error this is easy. Simply conditionally add the new parameters into an extra dict and pass that dict into setup():: - from setuptools import setup - import sys - - extra = {} - if sys.version_info >= (3,): - extra['use_2to3'] = True - extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] - extra['use_2to3_fixers'] = ['your.fixers'] - - setup(name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - **extra - ) + from setuptools import setup + import sys + + extra = {} + if sys.version_info >= (3,): + extra['use_2to3'] = True + extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] + extra['use_2to3_fixers'] = ['your.fixers'] + + setup( + name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + **extra + ) This way the parameters will only be used under Python 3, where you have to use Distribute. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7c679fd08f..d5bd98b559 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -141,7 +141,7 @@ dependencies, and perhaps some data files and scripts:: '': ['*.txt', '*.rst'], # And include any *.msg files found in the 'hello' package, too: 'hello': ['*.msg'], - } + }, # metadata for upload to PyPI author = "Me", @@ -1117,7 +1117,9 @@ if they do, it might not be the right version. Fixing this is easy; just download `distribute_setup.py`_, and put it in the same directory as your ``setup.py`` script. (Be sure to add it to your revision control system, too.) Then add these two lines to the very top of your setup script, before the script imports -anything from setuptools:: +anything from setuptools: + +.. code-block:: python import distribute_setup distribute_setup.use_setuptools() @@ -1573,7 +1575,9 @@ Managing "Continuous Releases" Using Subversion If you expect your users to track in-development versions of your project via Subversion, there are a few additional steps you should take to ensure that things work smoothly with EasyInstall. First, you should add the following -to your project's ``setup.cfg`` file:: +to your project's ``setup.cfg`` file: + +.. code-block:: ini [egg_info] tag_build = .dev @@ -1603,7 +1607,9 @@ their checkout URL (as described in the previous section) with an to download ``projectname==dev`` in order to get the latest in-development code. Note that if your project depends on such in-progress code, you may wish to specify your ``install_requires`` (or other requirements) to include -``==dev``, e.g.:: +``==dev``, e.g.: + +.. code-block:: python install_requires = ["OtherProject>=0.2a1.dev-r143,==dev"] @@ -2406,7 +2412,9 @@ command:: python setup.py upload_docs --upload-dir=docs/build/html As with any other ``setuptools`` based command, you can define useful -defaults in the ``setup.cfg`` of your Python project, e.g.:: +defaults in the ``setup.cfg`` of your Python project, e.g.: + +.. code-block:: ini [upload_docs] upload-dir = docs/build/html @@ -2594,7 +2602,9 @@ all the filenames within that directory (and any subdirectories thereof) that are under revision control. For example, if you were going to create a plugin for a revision control system -called "foobar", you would write a function something like this:: +called "foobar", you would write a function something like this: + +.. code-block:: python def find_files_for_foobar(dirname): # loop to yield paths that start with `dirname` From 48655c2b41138dd4efe483e78931f53d3d6f928d Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 8 Oct 2009 19:54:27 +0200 Subject: [PATCH 2611/8469] added distribute_setup_3k.py generation --HG-- branch : distribute extra : rebase_source : ce029e2f6fd53b2f279698637acb4a7de52be76d --- CHANGES.txt | 1 + README.txt | 4 +++- release.sh | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index d59d26ef20..af02055210 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.4 ----- +* Added the generation of distribute_setup_3k.py during the release. ----- diff --git a/README.txt b/README.txt index d130cf90cc..d3dcf5fed7 100755 --- a/README.txt +++ b/README.txt @@ -74,7 +74,7 @@ distribute_setup.py =================== Download ``distribute_setup.py`` and execute it, using the Python interpreter of -your choice. +your choice. If your shell has the ``wget`` program you can do:: @@ -86,6 +86,8 @@ If you are under Python 3, use ``distribute_setup_3k.py``:: $ wget http://nightly.ziade.org/distribute_setup_3k.py $ python distribute_setup_3k.py +Notice that both files are provided in the source release. + easy_install or pip =================== diff --git a/release.sh b/release.sh index 555499ef1b..e0550535c6 100755 --- a/release.sh +++ b/release.sh @@ -1,6 +1,12 @@ #!/bin/sh export VERSION="0.6.4" +# creating the 3k script +cp distribute_setup.py distribute_setup.py.back +2to3 -w distribute_setup.py > /dev/null +mv distribute_setup.py distribute_setup_3k.py +mv distribute_setup.py.back distribute_setup.py + # creating the releases rm -rf dist From 5109e586c2ec65ba97803ebc171609e4c2243974 Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 8 Oct 2009 20:14:32 +0200 Subject: [PATCH 2612/8469] more details on doc+anchor for pypi doc --HG-- branch : distribute extra : rebase_source : ec795fb88a6fa30141f7ecf3929e39ed16a84eea --- README.txt | 57 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/README.txt b/README.txt index d3dcf5fed7..1f81342215 100755 --- a/README.txt +++ b/README.txt @@ -18,22 +18,26 @@ for working with Python module distributions. The fork has two goals: -- Providing a backward compatible version to replace Setuptools +- Providing a backward compatible version to replace Setuptools and make all distributions that depend on Setuptools work as before, but with less bugs and behaviorial issues. This work is done in the 0.6.x series - Starting with version 0.6.2, Distribute supports Python 3. - Installing and using distribute for Python 3 code works exactly - the same as for Python 2 code, but Distribute also helps you to support - Python 2 and Python 3 from the same source code by letting you run 2to3 - on the code as a part of the build process, by setting the keyword parameter - ``use_2to3`` to True. See docs/python3.txt for more information. + Starting with version 0.6.2, Distribute supports Python 3. + Installing and using distribute for Python 3 code works exactly + the same as for Python 2 code, but Distribute also helps you to support + Python 2 and Python 3 from the same source code by letting you run 2to3 + on the code as a part of the build process, by setting the keyword parameter + ``use_2to3`` to True. See XXX REPLACE WITH PYPI DOC XXXX + for more information. - Refactoring the code, and releasing it in several distributions. This work is being done in the 0.7.x series but not yet released. +The roadmap is still evolving, and the page that is up-to-date is +located at : `http://bitbucket.org/tarek/distribute/wiki/roadmap`. + If you install `Distribute` and want to switch back for any reason to `Setuptools`, get to the `Uninstallation instructions`_ section. @@ -41,21 +45,21 @@ More documentation ================== You can get more information in the Sphinx-based documentation, located -in the archive in `docs`. This documentation includes the old Setuptools +at XXX REPLACE WITH PYPI DOC XXXX. This documentation includes the old Setuptools documentation that is slowly replaced, and brand new content. About the installation process ============================== The `Distribute` installer modifies your installation by de-activating an -existing installation of `Setuptools` in a bootstrap process. This process -has been tested in various installation schemes and contexts but in case of a +existing installation of `Setuptools` in a bootstrap process. This process +has been tested in various installation schemes and contexts but in case of a bug during this process your Python installation might be left in a broken -state. Since all modified files and directories are copied before the -installation, you will be able to get back to a normal state by reading +state. Since all modified files and directories are copied before the +installation starts, you will be able to get back to a normal state by reading the instructions in the `Uninstallation instructions`_ section. -In any case, it is recommended to save you `site-packages` directory before +In any case, it is recommended to save you `site-packages` directory before you start the installation of `Distribute`. ------------------------- @@ -74,7 +78,7 @@ distribute_setup.py =================== Download ``distribute_setup.py`` and execute it, using the Python interpreter of -your choice. +your choice. If your shell has the ``wget`` program you can do:: @@ -110,13 +114,14 @@ Download the source tarball, uncompress it, then run the install command:: Uninstallation Instructions --------------------------- -Like other distutils-based distributions, Distribute doesn't provide an -uninstaller yet. It's all done manually! +Like other distutils-based distributions, Distribute doesn't provide an +uninstaller yet. It's all done manually! We are all waiting for PEP 376 +support in Python. Distribute is installed in three steps: 1. it gets out of the way an existing installation of Setuptools -2. it installs a `fake` setuptools installation +2. it installs a `fake` setuptools installation 3. it installs distribute Distribute can be removed like this: @@ -148,7 +153,7 @@ Install FAQ it fakes that the Setuptools installation is still present, so all the programs that where using Setuptools still work. - If it wasn't doing it, a program that would try to install Setuptools + If it wasn't doing it, a program that would try to install Setuptools would overwrite in turn Distribute. - **How does Distribute interacts with virtualenv?** @@ -156,6 +161,7 @@ Install FAQ Everytime you create a virtualenv it will install setuptools, so you need to re-install Distribute in it right after. The Distribute project will not attempt to patch virtualenv so it uses it when globally installed. + We will just wait for virtualenv to eventually switch to Distribute. Once installed, your virtualenv will use Distribute transparently. @@ -163,18 +169,15 @@ Install FAQ and if the virtualenv you are in was generated without the `--no-site-packages` option, the Distribute installation will stop. - You need in this case to build a virtualenv with the --no-site-packages option - or to install `Distribute` globally. + You need in this case to build a virtualenv with the `--no-site-packages` + option or to install `Distribute` globally. - **How does Distribute interacts with zc.buildout?** - Some work is being done on zc.buildout side to make its bootstrap - work with Distribute. Until then, using Distribute in zc.buildout is a bit - tricky because the bootstrap process of zc.buildout hardcodes the - installation of Setuptools. - - The plan is to come with a custom bootstrap.py for zc.buildout for the - 0.6.4 release, together with some small changes on zc.buildout side. + Starting at zc.buildout 1.4.0, you can use Distribute in your buildouts. + Although you have to run a specific `bootstrap.py` file that is available + at `http://nightly.ziade.org/bootstrap.py`. The code is located at + `http://bitbucket.org/tarek/buildout-distribute`. ----------------------------- From 31fa507de5ad50356bca8157340aec218a7573da Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 12:48:45 +0200 Subject: [PATCH 2613/8469] using the real URL --HG-- branch : distribute extra : rebase_source : 4dc1a0fb203789ce775b271a28ebb3817afadb06 --- README.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 49859c213e..a3f53d41b1 100755 --- a/README.txt +++ b/README.txt @@ -29,8 +29,8 @@ The fork has two goals: the same as for Python 2 code, but Distribute also helps you to support Python 2 and Python 3 from the same source code by letting you run 2to3 on the code as a part of the build process, by setting the keyword parameter - ``use_2to3`` to True. See XXX REPLACE WITH PYPI DOC XXXX - for more information. + ``use_2to3`` to True. See http://packages.python.org/distribute for more + information. - Refactoring the code, and releasing it in several distributions. This work is being done in the 0.7.x series but not yet released. @@ -45,8 +45,8 @@ More documentation ================== You can get more information in the Sphinx-based documentation, located -at XXX REPLACE WITH PYPI DOC XXXX. This documentation includes the old Setuptools -documentation that is slowly replaced, and brand new content. +at http://packages.python.org/distribute. This documentation includes the old +Setuptools documentation that is slowly replaced, and brand new content. About the installation process ============================== From bd51d25890b72b3beda8b5c7e919a77cfb18ed25 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 12:50:40 +0200 Subject: [PATCH 2614/8469] added issue references --HG-- branch : distribute extra : rebase_source : 852102dad24de79aa20c4b17a83cceb691772e7b --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6685a0e4ad..f07d4cb838 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,9 +7,11 @@ CHANGES ----- * Added the generation of `distribute_setup_3k.py` during the release. + This close http://bitbucket.org/tarek/distribute/issue/52. * Added an upload_docs command to easily upload project documentation to PyPI's http://packages.python.org. + This close http://bitbucket.org/tarek/distribute/issue/56. ----- 0.6.3 From 79f61d0c5d40e0d1e100d6f6754c9b1b4c003829 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 12:54:49 +0200 Subject: [PATCH 2615/8469] using a temp dir to avoid using the site.py that is in the current dir when 2to3 runs --HG-- branch : distribute extra : rebase_source : 18f1e97291dc5745849df981627630295acd601e --- release.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/release.sh b/release.sh index e0550535c6..772bba971c 100755 --- a/release.sh +++ b/release.sh @@ -2,17 +2,21 @@ export VERSION="0.6.4" # creating the 3k script -cp distribute_setup.py distribute_setup.py.back -2to3 -w distribute_setup.py > /dev/null -mv distribute_setup.py distribute_setup_3k.py -mv distribute_setup.py.back distribute_setup.py +mkdir ./temp +cp distribute_setup.py ./temp/distribute_setup.py +cd ./temp +2to3 -w distribute_setup.py > /dev/null +mv distribute_setup.py ../distribute_setup_3k.py +cd .. +rm -rf ./temp # creating the releases -rm -rf dist +rm -rf ./dist # now preparing the source release python2.6 setup.py -q egg_info -RDb '' sdist register upload -# pushing the bootstrap script +# pushing the bootstrap scripts scp distribute_setup.py ziade.org:nightly/build/ +scp distribute_setup_3k.py ziade.org:nightly/build/ From 45f3bc86a0829f76bc49d0167269987d97846bcd Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 13:13:31 +0200 Subject: [PATCH 2616/8469] included roadmap and a few typo fixes. fixes #47 --HG-- branch : distribute extra : rebase_source : a6677457030f92ff8da952fe47b4449f17b6f431 --- docs/index.txt | 4 +-- docs/roadmap.txt | 86 +++++++++++++++++++++++++++++++++++++++++++++ docs/setuptools.txt | 14 ++++---- 3 files changed, 95 insertions(+), 9 deletions(-) create mode 100644 docs/roadmap.txt diff --git a/docs/index.txt b/docs/index.txt index f814ff9be5..d733870219 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -6,11 +6,11 @@ Contents: .. toctree:: :maxdepth: 2 + roadmap + python3 setuptools easy_install pkg_resources - python3 - Indices and tables ================== diff --git a/docs/roadmap.txt b/docs/roadmap.txt new file mode 100644 index 0000000000..e97ab57dc5 --- /dev/null +++ b/docs/roadmap.txt @@ -0,0 +1,86 @@ +======= +Roadmap +======= + +Distribute has two branches: + +- 0.6.x : provides a Setuptools-0.6c9 compatible version +- 0.7.x : will provide a refactoring + +0.6.x +===== + +Not "much" is going to happen here, we want this branch to be helpful +to the community *today* by addressing the 40-or-so bugs +that were found in Setuptools and never fixed. This is eventually +happen soon because its development is +fast : there are up to 5 commiters that are working on it very often +(and the number grows weekly.) + +The biggest issue with this branch is that it is providing the same +packages and modules setuptools does, and this +requires some bootstrapping work where we make sure once Distribute is +installed, all Distribution that requires Setuptools +will continue to work. This is done by faking the metadata of +Setuptools 0.6c9. That's the only way we found to do this. + +There's one major thing though: thanks to the work of Lennart, Alex, +Martin, this branch supports Python 3, +which is great to have to speed up Py3 adoption. + +The goal of the 0.6.x is to remove as much bugs as we can, and try if +possible to remove the patches done +on Distutils. We will support 0.6.x maintenance for years and we will +promote its usage everywhere instead of +Setuptools. + +Some new commands are added there, when they are helpful and don't +interact with the rest. I am thinking +about "upload_docs" that let you upload documentation to PyPI. The +goal is to move it to Distutils +at some point, if the documentation feature of PyPI stays and starts to be used. + +0.7.x +===== + +We've started to refactor Distribute with this roadmap in mind (and +no, as someone said, it's not vaporware, +we've done a lot already) + +- 0.7.x can be installed and used with 0.6.x + +- easy_install is going to be deprecated ! use Pip ! + +- the version system will be deprecated, in favor of the one in Distutils + +- no more Distutils monkey-patch that happens once you use the code + (things like 'from distutils import cmd; cmd.Command = CustomCommand') + +- no more custom site.py (that is: if something misses in Python's + site.py we'll add it there instead of patching it) + +- no more namespaced packages system, if PEP 381 (namespaces package + support) makes it to 2.7 + +- The code is splitted in many packages and might be distributed under + several distributions. + + - distribute.resources: that's the old pkg_resources, but + reorganized in clean, pep-8 modules. This package will + only contain the query APIs and will focus on being PEP 376 + compatible. We will promote its usage and see if Pip wants + to use it as a basis. + It will probably shrink a lot though, once the stdlib provides PEP 376 support. + + - distribute.entrypoints: that's the old pkg_resources entry points + system, but on its own. it uses distribute.resources + + - distribute.index: that's package_index and a few other things. + everything required to interact with PyPI. We will promote + its usage and see if Pip wants to use it as a basis. + + - distribute.core (might be renamed to main): that's everything + else, and uses the other packages. + +Goal: A first release before (or when) Python 2.7 / 3.2 is out. + diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d5bd98b559..2e2366f639 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1,8 +1,8 @@ -====================================================== -Building and Distributing Packages with ``setuptools`` -====================================================== +================================================== +Building and Distributing Packages with Distribute +================================================== -``setuptools`` is a collection of enhancements to the Python ``distutils`` +``Distribute`` is a collection of enhancements to the Python ``distutils`` (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages. @@ -2433,9 +2433,9 @@ The ``upload_docs`` command has the following options: http://pypi.python.org/pypi (i.e., the main PyPI installation). ------------------------------------- -Extending and Reusing ``setuptools`` ------------------------------------- +-------------------------------- +Extending and Reusing Distribute +-------------------------------- Creating ``distutils`` Extensions ================================= From fc30a740e46df3e3baed16112fc141ff1625d4a6 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 13:14:24 +0200 Subject: [PATCH 2617/8469] updated the link to the roadmap --HG-- branch : distribute extra : rebase_source : e9d7a33b2dd618c95ff02d4ffe82f295d2e69826 --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index a3f53d41b1..c480aef10a 100755 --- a/README.txt +++ b/README.txt @@ -36,7 +36,7 @@ The fork has two goals: This work is being done in the 0.7.x series but not yet released. The roadmap is still evolving, and the page that is up-to-date is -located at : `http://bitbucket.org/tarek/distribute/wiki/roadmap`. +located at : `http://packages.python.org/distribute/roadmap`. If you install `Distribute` and want to switch back for any reason to `Setuptools`, get to the `Uninstallation instructions`_ section. From a5633e5ddf0063b1b58e2f0950ec50e1718cbdc7 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 13:51:09 +0200 Subject: [PATCH 2618/8469] pushing the doc as well --HG-- branch : distribute extra : rebase_source : 8b45c37dc3d3e4f2d3f91beb2f5867523f45f974 --- release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index 772bba971c..2b4d23387b 100755 --- a/release.sh +++ b/release.sh @@ -13,8 +13,8 @@ rm -rf ./temp # creating the releases rm -rf ./dist -# now preparing the source release -python2.6 setup.py -q egg_info -RDb '' sdist register upload +# now preparing the source release, pushing it and its doc +python2.6 setup.py -q egg_info -RDb '' sdist register upload sphinx_build upload_doc # pushing the bootstrap scripts scp distribute_setup.py ziade.org:nightly/build/ From 739f071eff009685fc70d6caa464c3eb799c9365 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 14:38:15 +0200 Subject: [PATCH 2619/8469] fixed use_setuptools --HG-- branch : distribute extra : rebase_source : ef32212ac795e851f32e63d1ec9fd7e3765caf92 --- CHANGES.txt | 2 ++ README.txt | 20 ++++++++++++++++++++ distribute_setup.py | 1 + 3 files changed, 23 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index f07d4cb838..6761b98ed2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,8 @@ CHANGES PyPI's http://packages.python.org. This close http://bitbucket.org/tarek/distribute/issue/56. +* Fixed a bootstrap bug on the use_setuptools() API. + ----- 0.6.3 ----- diff --git a/README.txt b/README.txt index c480aef10a..629a677fd1 100755 --- a/README.txt +++ b/README.txt @@ -143,6 +143,26 @@ Lastly: - remove the *.OLD.* directory located in your site-packages directory if any, **once you have checked everything was working correctly again**. +------------------------- +Quick help for developers +------------------------- + +To use Distribute in your package, the recommended way is to ship +`distribute_setup.py` alongside your `setup.py` script and call +it at the very begining of `setup.py` like this:: + + from distribute_setup import use_setuptools + use_setuptools() + + +Another way is to add ``Distribute`` in the ``install_requires`` option:: + + from setuptools import setup + + setup(... + install_requires=['distribute'] + ) + ----------- Install FAQ ----------- diff --git a/distribute_setup.py b/distribute_setup.py index dcea856ecc..bde6c762e6 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -132,6 +132,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: import pkg_resources if not hasattr(pkg_resources, '_distribute'): + fake_setuptools() raise ImportError except ImportError: return _do_download(version, download_base, to_dir, download_delay) From a4cbd95effcc0a57603bac0feffc44e6d5905e4c Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 14:58:40 +0200 Subject: [PATCH 2620/8469] starting more docs --HG-- branch : distribute extra : rebase_source : 9826d4158ddc98c84e56d2c54445ad9efba77be4 --- docs/index.txt | 1 + docs/using.txt | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docs/using.txt diff --git a/docs/index.txt b/docs/index.txt index d733870219..e64b8c8820 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -8,6 +8,7 @@ Contents: roadmap python3 + using setuptools easy_install pkg_resources diff --git a/docs/using.txt b/docs/using.txt new file mode 100644 index 0000000000..192f1dc234 --- /dev/null +++ b/docs/using.txt @@ -0,0 +1,21 @@ +================================ +Using Distribute in your project +================================ + +To use Distribute in your project, the recommended way is to ship +`distribute_setup.py` alongside your `setup.py` script and call +it at the very begining of `setup.py` like this:: + + from distribute_setup import use_setuptools + use_setuptools() + +Another way is to add ``Distribute`` in the ``install_requires`` option:: + + from setuptools import setup + + setup(... + install_requires=['distribute'] + ) + + +XXX to be finished From 4c9daf7b5983e6aecd04a35e51d1820b3702d4ba Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 9 Oct 2009 15:05:26 +0200 Subject: [PATCH 2621/8469] fixed zc.buildout rev --HG-- branch : distribute extra : rebase_source : 562654e69e7ff018b81d96bcb1e031cfa659273b --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 629a677fd1..219c65d9a6 100755 --- a/README.txt +++ b/README.txt @@ -194,7 +194,7 @@ Install FAQ - **How does Distribute interacts with zc.buildout?** - Starting at zc.buildout 1.4.0, you can use Distribute in your buildouts. + Starting at zc.buildout 1.4.2, you can use Distribute in your buildouts. Although you have to run a specific `bootstrap.py` file that is available at `http://nightly.ziade.org/bootstrap.py`. The code is located at `http://bitbucket.org/tarek/buildout-distribute`. From c048eb0e670dc6081c319ff83357d7a676dde723 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Oct 2009 22:05:45 +0000 Subject: [PATCH 2622/8469] replace callable() --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index f49afcce13..eb7d01c0e4 100644 --- a/dist.py +++ b/dist.py @@ -545,7 +545,7 @@ def _parse_command_opts(self, parser, args): for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 - if callable(func): + if hasattr(func, '__call__'): func() else: raise DistutilsClassError( From b76a5bf6c2386785eef7f3f3123878c22fba8145 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 10 Oct 2009 17:14:04 +0200 Subject: [PATCH 2623/8469] the parse API needs to return distribute when setuptools is asked --HG-- branch : distribute extra : rebase_source : 485e5999425fb57f1f0fce496ffc209a9bfe54e8 --- distribute_setup.py | 52 ++++++++++++++++++++++++++------------------- pkg_resources.py | 13 ++++++++++++ 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index bde6c762e6..b40a9499a5 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -130,29 +130,34 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, was_imported = 'pkg_resources' in sys.modules or \ 'setuptools' in sys.modules try: - import pkg_resources - if not hasattr(pkg_resources, '_distribute'): - fake_setuptools() - raise ImportError - except ImportError: - return _do_download(version, download_base, to_dir, download_delay) - try: - pkg_resources.require("distribute>="+version) - return - except pkg_resources.VersionConflict, e: - if was_imported: - print >>sys.stderr, ( - "The required version of distribute (>=%s) is not available, and\n" - "can't be installed while this script is running. Please install\n" - " a more recent version first, using 'easy_install -U distribute'." - "\n\n(Currently using %r)") % (version, e.args[0]) - sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok + try: + import pkg_resources + if not hasattr(pkg_resources, '_distribute'): + fake_setuptools() + raise ImportError + except ImportError: return _do_download(version, download_base, to_dir, download_delay) - except pkg_resources.DistributionNotFound: - return _do_download(version, download_base, to_dir, download_delay) - + try: + pkg_resources.require("distribute>="+version) + return + except pkg_resources.VersionConflict, e: + if was_imported: + print >>sys.stderr, ( + "The required version of distribute (>=%s) is not available,\n" + "and can't be installed while this script is running. Please\n" + "install a more recent version first, using\n" + "'easy_install -U distribute'." + "\n\n(Currently using %r)") % (version, e.args[0]) + sys.exit(2) + else: + del pkg_resources, sys.modules['pkg_resources'] # reload ok + return _do_download(version, download_base, to_dir, + download_delay) + except pkg_resources.DistributionNotFound: + return _do_download(version, download_base, to_dir, + download_delay) + finally: + _create_fake_setuptools_pkg_info(to_dir) def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): @@ -260,6 +265,9 @@ def _remove_flat_installation(placeholder): def _after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib + _create_fake_setuptools_pkg_info(placeholder) + +def _create_fake_setuptools_pkg_info(placeholder): if not placeholder or not os.path.exists(placeholder): log.warn('Could not find the install location') return diff --git a/pkg_resources.py b/pkg_resources.py index d0e840b867..20815ffe3b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2486,6 +2486,19 @@ def __repr__(self): return "Requirement.parse(%r)" % str(self) #@staticmethod def parse(s): + # if asked for setuptools distribution + # and if distribute is installed, we want to give + # distribute instead + stripped_s = s.replace(' ', '') + stripped_s = stripped_s.strip() + if stripped_s in ('setuptools', 'setuptools==0.6c9', + 'setuptools>0.6c9', 'setuptools>=0.6c9'): + reqs = list(parse_requirements('distribute')) + if reqs: + if len(reqs)==1: + # ok we can replace the requirement + return reqs[0] + reqs = list(parse_requirements(s)) if reqs: if len(reqs)==1: From 9a46d20ebd044b88c3d3c426f56c4b36372b2403 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 10 Oct 2009 17:19:20 +0200 Subject: [PATCH 2624/8469] added a note on shared eggs folder --HG-- branch : distribute extra : rebase_source : 09545a175010b1105b8223c90638e9180feeb1c2 --- README.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.txt b/README.txt index 219c65d9a6..ec167c2401 100755 --- a/README.txt +++ b/README.txt @@ -199,6 +199,10 @@ Install FAQ at `http://nightly.ziade.org/bootstrap.py`. The code is located at `http://bitbucket.org/tarek/buildout-distribute`. + Beware that if you use a shared eggs folder with buildout, you need to + switch all buildouts that use it to distribute. This is due to the fact + that the setuptools eggs located in the shared folder will be replaced + by a fake one, alongside distribute. ----------------------------- Feedback and getting involved From ac54adff1c0ba86a9f98adf791a92a493f8c1e7d Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 10 Oct 2009 17:24:03 +0200 Subject: [PATCH 2625/8469] works with < 1.4.2 now :) --HG-- branch : distribute extra : rebase_source : dcc9176ae8bf7273ace82220b64a89c14830971e --- README.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index ec167c2401..66e84fc2a5 100755 --- a/README.txt +++ b/README.txt @@ -194,7 +194,8 @@ Install FAQ - **How does Distribute interacts with zc.buildout?** - Starting at zc.buildout 1.4.2, you can use Distribute in your buildouts. + You can use Distribute in your zc.buildout. + Although you have to run a specific `bootstrap.py` file that is available at `http://nightly.ziade.org/bootstrap.py`. The code is located at `http://bitbucket.org/tarek/buildout-distribute`. From 71127d47493fdde7862410afce593b6a0607863b Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 10 Oct 2009 18:11:26 +0200 Subject: [PATCH 2626/8469] returning if setuptools is not found --HG-- branch : distribute extra : rebase_source : e39726368ef61d71c6bf4b023ba050083584a941 --- distribute_setup.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index b40a9499a5..59424ccc3f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -240,13 +240,14 @@ def _remove_flat_installation(placeholder): break if not found: log.warn('Could not locate setuptools*.egg-info') + return + + log.warn('Removing elements out of the way...') + pkg_info = os.path.join(placeholder, file) + if os.path.isdir(pkg_info): + patched = _patch_egg_dir(pkg_info) else: - log.warn('Removing elements out of the way...') - pkg_info = os.path.join(placeholder, file) - if os.path.isdir(pkg_info): - patched = _patch_egg_dir(pkg_info) - else: - patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) + patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) if not patched: log.warn('%s already patched.', pkg_info) From 5d7a14a28bc7d65a0b35af16a51e5d75e8459f27 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 11 Oct 2009 11:12:48 +0200 Subject: [PATCH 2627/8469] Added tag 0.6.4 for changeset e06c416e911c --HG-- branch : distribute extra : rebase_source : 8c16be7562d8dbf3143c9920182871e16f0025f9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dc3dfd6b69..3ca10b19b7 100644 --- a/.hgtags +++ b/.hgtags @@ -2,3 +2,4 @@ 4d114c5f2a3ecb4a0fa552075dbbb221b19e291b 0.6.1 41415244ee90664042d277d0b1f0f59c04ddd0e4 0.6.2 e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 +e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 From 009a483d58c57a15f469232daa0de302a877d186 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 11 Oct 2009 11:22:25 +0200 Subject: [PATCH 2628/8469] starting 0.6.5 --HG-- branch : distribute extra : rebase_source : 6925947fb2b7beef652eef8a2683cae710f46e58 --- CHANGES.txt | 5 +++++ README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 2 +- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 5 +++-- setup.py | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6761b98ed2..21624f3268 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,11 @@ CHANGES ======= +----- +0.6.5 +----- + + ----- 0.6.4 ----- diff --git a/README.txt b/README.txt index 66e84fc2a5..0d94730306 100755 --- a/README.txt +++ b/README.txt @@ -105,9 +105,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.4.tar.gz - $ tar -xzvf distribute-0.6.4.tar.gz - $ cd distribute-0.6 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.5.tar.gz + $ tar -xzvf distribute-0.6.5.tar.gz + $ cd distribute-0.6.5 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index f4b74da0fd..3728f74f78 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 59424ccc3f..c8c319bd9e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.4" +DEFAULT_VERSION = "0.6.5" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/docs/conf.py b/docs/conf.py index bad1a578a3..f7e762eb3d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.4' +version = '0.6.5' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 2b4d23387b..01c5daff83 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.4" +export VERSION="0.6.5" # creating the 3k script mkdir ./temp @@ -14,7 +14,8 @@ rm -rf ./temp rm -rf ./dist # now preparing the source release, pushing it and its doc -python2.6 setup.py -q egg_info -RDb '' sdist register upload sphinx_build upload_doc +python2.6 setup.py -q egg_info -RDb '' sdist register upload +python2.6 setup.py build_sphinx upload_docs # pushing the bootstrap scripts scp distribute_setup.py ziade.org:nightly/build/ diff --git a/setup.py b/setup.py index c4116559a8..13cbca7c5c 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.4" +VERSION = "0.6.5" from setuptools import setup, find_packages import sys From 2bb038c8b8d826f476b6f74867380c9a3a49810a Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 11 Oct 2009 11:30:06 +0200 Subject: [PATCH 2629/8469] added tagging --HG-- branch : distribute extra : rebase_source : a757058ecff1e3fbce98b32276a5075dc84b2157 --- release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release.sh b/release.sh index 01c5daff83..74be096561 100755 --- a/release.sh +++ b/release.sh @@ -1,6 +1,10 @@ #!/bin/sh export VERSION="0.6.5" +# tagging +hg tag $VERSION +hg ci -m "bumped revision" + # creating the 3k script mkdir ./temp cp distribute_setup.py ./temp/distribute_setup.py @@ -21,3 +25,5 @@ python2.6 setup.py build_sphinx upload_docs scp distribute_setup.py ziade.org:nightly/build/ scp distribute_setup_3k.py ziade.org:nightly/build/ +# starting the new dev + From 944ae98b10d38936e9493064ecc1d38a056307ed Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 11 Oct 2009 23:53:10 +0200 Subject: [PATCH 2630/8469] Make sure the Sphinx theme nature is included in the sdist --HG-- branch : distribute extra : rebase_source : 5dfd01f1594ebc0732bd6abe2ed93c8337adbd1e --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index b678dac4c9..1db36bfe99 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ recursive-include setuptools *.py *.txt *.exe recursive-include tests *.py *.c *.pyx *.txt -recursive-include docs *.py *.txt Makefile +recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile include *.py include *.txt include MANIFEST.in From 7ed4be906cc7195c4d15bdd7a8b2bfa8474cc6be Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Mon, 12 Oct 2009 14:47:40 -0700 Subject: [PATCH 2631/8469] fix a hole in sandboxing allowing builtin file to write outside of the sandbox --HG-- branch : distribute extra : rebase_source : 5ff181b30f41080ec0e0628c96abf270ffe1a730 --- CHANGES.txt | 2 ++ setuptools/sandbox.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 21624f3268..4c16f37aed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.5 ----- +* Fixed a hole in sandboxing allowing builtin file to write outside of + the sandbox. ----- 0.6.4 diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 67cedde6f0..7b48783344 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -168,6 +168,12 @@ def __init__(self,sandbox): def _violation(self, operation, *args, **kw): raise SandboxViolation(operation, args, kw) + if _file: + def _file(self, path, mode='r', *args, **kw): + if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): + self._violation("file", path, mode, *args, **kw) + return _file(path,mode,*args,**kw) + def _open(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("open", path, mode, *args, **kw) From c22811e5e0f706060027a9fb4bc66a11926c4b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 12 Oct 2009 22:38:34 +0000 Subject: [PATCH 2632/8469] Fixed #7115: using paths instead of dotted name for extensions works too in distutils.command.build_ext --- command/build_ext.py | 2 ++ tests/test_build_ext.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index da9cbfd574..abc1584180 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -628,6 +628,8 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ + if os.sep in ext_name: + ext_name = ext_name.replace(os.sep, '.') fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') filename = self.get_ext_filename(ext_name) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 00733a46a7..5dffe2ca03 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -363,6 +363,16 @@ def test_setuptools_compat(self): path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) + def test_build_ext_path_with_os_sep(self): + dist = Distribution({'name': 'UpdateManager'}) + cmd = build_ext(dist) + cmd.ensure_finalized() + ext = sysconfig.get_config_var("SO") + ext_name = os.path.join('UpdateManager', 'fdsend') + ext_path = cmd.get_ext_fullpath(ext_name) + wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) + self.assertEquals(ext_path, wanted) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 38407ff8a415196852c57b79531397e0799484ec Mon Sep 17 00:00:00 2001 From: agronholm Date: Tue, 13 Oct 2009 12:03:21 +0300 Subject: [PATCH 2633/8469] Updated bootstrap URLs to point to python-distribute.org, and added links for them --HG-- branch : distribute extra : rebase_source : 2756800a880c7a6c2c8bdc1afa3a22a4f08c047b --- README.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 0d94730306..5ce8a728e6 100755 --- a/README.txt +++ b/README.txt @@ -22,7 +22,7 @@ The fork has two goals: and make all distributions that depend on Setuptools work as before, but with less bugs and behaviorial issues. - This work is done in the 0.6.x series + This work is done in the 0.6.x series. Starting with version 0.6.2, Distribute supports Python 3. Installing and using distribute for Python 3 code works exactly @@ -77,17 +77,19 @@ provided online. distribute_setup.py =================== -Download ``distribute_setup.py`` and execute it, using the Python interpreter of -your choice. +Download +`distribute_setup.py `_ +and execute it, using the Python interpreter of your choice. If your shell has the ``curl`` program you can do:: - $ curl -O http://nightly.ziade.org/distribute_setup.py + $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py -If you are under Python 3, use ``distribute_setup_3k.py``:: +If you are under Python 3, use +`distribute_setup_3k.py `_:: - $ curl -O http://nightly.ziade.org/distribute_setup_3k.py + $ curl -O http://python-distribute.org/distribute_setup_3k.py $ python distribute_setup_3k.py Notice that both files are provided in the source release. @@ -197,7 +199,7 @@ Install FAQ You can use Distribute in your zc.buildout. Although you have to run a specific `bootstrap.py` file that is available - at `http://nightly.ziade.org/bootstrap.py`. The code is located at + at `http://python-distribute.org/bootstrap.py`. The code is located at `http://bitbucket.org/tarek/buildout-distribute`. Beware that if you use a shared eggs folder with buildout, you need to From 3bd277147c3c3a8342dbc3b3d51214d430049a6b Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Tue, 13 Oct 2009 13:28:17 +0200 Subject: [PATCH 2634/8469] Detecting buildout by looking in os.environ['_'] to see if it is a buildout command. If that is the case: do not fake setuptools, just let yourself be installed as a buildout-managed egg. --HG-- branch : distribute extra : rebase_source : 03ae13a4b93098ba76b971f26a01070ad47e361a --- setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.py b/setup.py index 13cbca7c5c..090d67032f 100755 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ VERSION = "0.6.5" from setuptools import setup, find_packages +import os import sys scripts = [] @@ -48,7 +49,15 @@ def _easy_install_marker(): return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1]) +def _buildout_marker(): + command = os.environ.get('_') + if command: + return 'buildout' in os.path.basename(command) + def _being_installed(): + if _buildout_marker(): + # Installed by buildout, don't mess with a global setuptools. + return False # easy_install marker return 'install' in sys.argv[1:] or _easy_install_marker() From 9ab857e33e35a1ad3901d2aae622dbedcea95ac2 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Tue, 13 Oct 2009 13:29:58 +0200 Subject: [PATCH 2635/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : 2fda957d09f002072e1eea759be2e8fd98ebca5b --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4c16f37aed..e92f9cbf3a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ CHANGES 0.6.5 ----- +* When run from within buildout, no attempt is made to modify an existing + setuptools egg, whether in a shared egg directory or a system setuptools. + * Fixed a hole in sandboxing allowing builtin file to write outside of the sandbox. From 0bb327642ab9d78f421eabb92ead2820e915ffaa Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 13 Oct 2009 16:16:33 +0200 Subject: [PATCH 2636/8469] making sure a setuptools requirement is turned into a distribute one --HG-- branch : distribute extra : rebase_source : 444d838a772b878838d54c9dfc78afee4dbe83f2 --- pkg_resources.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 20815ffe3b..30da98ed60 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -504,6 +504,12 @@ def resolve(self, requirements, env=None, installer=None): while requirements: req = requirements.pop(0) # process dependencies breadth-first + project_name = req.project_name.strip() + project_name = project_name.replace(' ', '') + if project_name in ('setuptools', 'setuptools>=0.6c9', + 'setuptools==0.6c9'): + req = Requirement.parse('distribute') + if req in processed: # Ignore cyclic or redundant dependencies continue From 7b7e4db5d14e58233ca22cd64e18e842e319cffe Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 13 Oct 2009 16:17:18 +0200 Subject: [PATCH 2637/8469] added a new option to drive the fakery when use_setuptools is called --HG-- branch : distribute extra : rebase_source : db0801762e31ee9414bbf6bca078681ce2b9b955 --- distribute_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index c8c319bd9e..cf56fb28ea 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -124,7 +124,7 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15): + to_dir=os.curdir, download_delay=15, no_fake=False): # making sure we use the absolute path to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ @@ -133,7 +133,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: import pkg_resources if not hasattr(pkg_resources, '_distribute'): - fake_setuptools() + if not no_fake: + fake_setuptools() raise ImportError except ImportError: return _do_download(version, download_base, to_dir, download_delay) From 6045d1576b41c9ac28064f2751ec07e1034cc182 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 13 Oct 2009 16:49:51 +0200 Subject: [PATCH 2638/8469] using project_name instead so we don't bother with the version --HG-- branch : distribute extra : rebase_source : c878e223405487eb8b58c69ba7d0b62b02c7d4cd --- distribute.egg-info/entry_points.txt | 2 +- pkg_resources.py | 30 ++++++++++------------------ 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 3728f74f78..f4b74da0fd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/pkg_resources.py b/pkg_resources.py index 30da98ed60..cb0b8cf014 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -504,10 +504,7 @@ def resolve(self, requirements, env=None, installer=None): while requirements: req = requirements.pop(0) # process dependencies breadth-first - project_name = req.project_name.strip() - project_name = project_name.replace(' ', '') - if project_name in ('setuptools', 'setuptools>=0.6c9', - 'setuptools==0.6c9'): + if req.project_name == 'setuptools': req = Requirement.parse('distribute') if req in processed: @@ -2492,23 +2489,18 @@ def __repr__(self): return "Requirement.parse(%r)" % str(self) #@staticmethod def parse(s): - # if asked for setuptools distribution - # and if distribute is installed, we want to give - # distribute instead - stripped_s = s.replace(' ', '') - stripped_s = stripped_s.strip() - if stripped_s in ('setuptools', 'setuptools==0.6c9', - 'setuptools>0.6c9', 'setuptools>=0.6c9'): - reqs = list(parse_requirements('distribute')) - if reqs: - if len(reqs)==1: - # ok we can replace the requirement - return reqs[0] - reqs = list(parse_requirements(s)) if reqs: - if len(reqs)==1: - return reqs[0] + if len(reqs) == 1: + founded_req = reqs[0] + # if asked for setuptools distribution + # and if distribute is installed, we want to give + # distribute instead + if founded_req.project_name == 'setuptools': + try: + return self.parse('distribute') + except ValueError: + return founded_req raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) From 18ab43df7b80c452bdfd3c574f2f6aaf9d0056f8 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 13 Oct 2009 16:51:00 +0200 Subject: [PATCH 2639/8469] no setuptools req are returned --HG-- branch : distribute extra : rebase_source : 9f1046762c344f8646742365d4beca34ae51c228 --- pkg_resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index cb0b8cf014..baee6fc7e4 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2501,6 +2501,8 @@ def parse(s): return self.parse('distribute') except ValueError: return founded_req + return founded_req + raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) From 4390fda55407b0fec9cedecc119381a51df09534 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 13 Oct 2009 17:25:42 +0200 Subject: [PATCH 2640/8469] fixed the parsed api when dealing with setuptools name --HG-- branch : distribute extra : rebase_source : 9490c98e075e2473c7a7310822103f375d5f3832 --- pkg_resources.py | 11 ++++++----- setuptools/tests/test_resources.py | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index baee6fc7e4..2712e9f13a 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2497,11 +2497,12 @@ def parse(s): # and if distribute is installed, we want to give # distribute instead if founded_req.project_name == 'setuptools': - try: - return self.parse('distribute') - except ValueError: - return founded_req - return founded_req + distribute = list(parse_requirements('distribute')) + if len(distribute) == 1: + return distribute[0] + return founded_req + else: + return founded_req raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 8f100419c0..d53aef5640 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -143,7 +143,7 @@ def testResolve(self): self.assertRaises(VersionConflict, ws.resolve, parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset - + # Request an extra that causes an unresolved dependency for "Baz" self.assertRaises( DistributionNotFound, ws.resolve,parse_requirements("Foo[bar]"), ad @@ -161,7 +161,7 @@ def testResolve(self): self.assertRaises( VersionConflict, ws.resolve, parse_requirements("Foo==1.2\nFoo!=1.2"), ad ) - + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 @@ -341,18 +341,18 @@ def testOptionsAndHashing(self): ) def testVersionEquality(self): - r1 = Requirement.parse("setuptools==0.3a2") - r2 = Requirement.parse("setuptools!=0.3a4") + r1 = Requirement.parse("foo==0.3a2") + r2 = Requirement.parse("foo!=0.3a4") d = Distribution.from_filename - self.failIf(d("setuptools-0.3a4.egg") in r1) - self.failIf(d("setuptools-0.3a1.egg") in r1) - self.failIf(d("setuptools-0.3a4.egg") in r2) + self.failIf(d("foo-0.3a4.egg") in r1) + self.failIf(d("foo-0.3a1.egg") in r1) + self.failIf(d("foo-0.3a4.egg") in r2) - self.failUnless(d("setuptools-0.3a2.egg") in r1) - self.failUnless(d("setuptools-0.3a2.egg") in r2) - self.failUnless(d("setuptools-0.3a3.egg") in r2) - self.failUnless(d("setuptools-0.3a5.egg") in r2) + self.failUnless(d("foo-0.3a2.egg") in r1) + self.failUnless(d("foo-0.3a2.egg") in r2) + self.failUnless(d("foo-0.3a3.egg") in r2) + self.failUnless(d("foo-0.3a5.egg") in r2) From 6d9f15b9f35719b016c34d96f2c23e05e1a0e1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 13 Oct 2009 21:17:34 +0000 Subject: [PATCH 2641/8469] complementary fix for #7115 --- command/build_ext.py | 6 ++++-- tests/test_build_ext.py | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index abc1584180..8248089fec 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -628,8 +628,10 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ - if os.sep in ext_name: - ext_name = ext_name.replace(os.sep, '.') + # makes sure the extension name is only using dots + all_dots = string.maketrans('/'+os.sep, '..') + ext_name = ext_name.translate(all_dots) + fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') filename = self.get_ext_filename(ext_name) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5dffe2ca03..93d18814bc 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -373,6 +373,19 @@ def test_build_ext_path_with_os_sep(self): wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) self.assertEquals(ext_path, wanted) + def test_build_ext_path_cross_platform(self): + if sys.platform != 'win32': + return + dist = Distribution({'name': 'UpdateManager'}) + cmd = build_ext(dist) + cmd.ensure_finalized() + ext = sysconfig.get_config_var("SO") + # this needs to work even under win32 + ext_name = 'UpdateManager/fdsend' + ext_path = cmd.get_ext_fullpath(ext_name) + wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) + self.assertEquals(ext_path, wanted) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From 774fb7a0387f33b8dbcd0cbb46e7ea0c15049260 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 12:20:53 +0200 Subject: [PATCH 2642/8469] tiny tweak in docstring to not throw off emacs' syntax highligting --HG-- branch : distribute extra : rebase_source : b5719cdd1428dc109af18925312b773cbaa0e22b --- distribute.egg-info/entry_points.txt | 2 +- pkg_resources.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index f4b74da0fd..0aaa28c086 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.5 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/pkg_resources.py b/pkg_resources.py index 2712e9f13a..fec60626d5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -540,7 +540,7 @@ def find_plugins(self, Environment(plugin_dirlist) ) map(working_set.add, distributions) # add plugins+libs to sys.path - print "Couldn't load", errors # display errors + print 'Could not load', errors # display errors The `plugin_env` should be an ``Environment`` instance that contains only distributions that are in the project's "plugin directory" or From 2bc44120a777de52ae38f4c932db074bc300f4c9 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 12:25:10 +0200 Subject: [PATCH 2643/8469] marked the two spots where a setuptools < 0.7 check needs to happen --HG-- branch : distribute extra : rebase_source : 1bca77205a947da3227c069e237951258fc72ffb --- pkg_resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index fec60626d5..2fbf415dcd 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -505,6 +505,7 @@ def resolve(self, requirements, env=None, installer=None): while requirements: req = requirements.pop(0) # process dependencies breadth-first if req.project_name == 'setuptools': + # TODO: only return distribute if setuptools < 0.7 req = Requirement.parse('distribute') if req in processed: @@ -2497,6 +2498,7 @@ def parse(s): # and if distribute is installed, we want to give # distribute instead if founded_req.project_name == 'setuptools': + # TODO: only return distribute if setuptools < 0.7 distribute = list(parse_requirements('distribute')) if len(distribute) == 1: return distribute[0] From f0daab74fc160d92ff534af1097c892140f6a46b Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 12:35:31 +0200 Subject: [PATCH 2644/8469] Indicated spot where extra setuptools >= 0.7 check needs to happen --HG-- branch : distribute extra : rebase_source : 6b80caf47a8c7642e629af9f271f33e25a7c890f --- pkg_resources.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 2fbf415dcd..1d5d864329 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2239,6 +2239,10 @@ def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" loc = loc or self.location + + # TODO: raise error if we're adding setuptools >= 0.7 as that is + # guaranteed to be incompatible with distribute. + if not loc: return From dd2b4ffb2f582bf8270c0ceed490bf035a9e553b Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 14:39:55 +0200 Subject: [PATCH 2645/8469] Distribute no longer shadows setuptools if we require a 0.7-series setuptools. Added _override_setuptools() checker method and calling it in two places that checks whether we request a setuptools from the 0.7 series. Including test. --HG-- branch : distribute extra : rebase_source : 51c89e02721de2e31c9392d1ead76ac1e828810c --- CHANGES.txt | 3 +++ pkg_resources.py | 26 ++++++++++++++++++++++---- setuptools/tests/test_resources.py | 24 ++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e92f9cbf3a..73a10b36a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ CHANGES 0.6.5 ----- +* Distribute no longer shadows setuptools if we require a 0.7-series + setuptools. + * When run from within buildout, no attempt is made to modify an existing setuptools egg, whether in a shared egg directory or a system setuptools. diff --git a/pkg_resources.py b/pkg_resources.py index 1d5d864329..510be536fa 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -504,8 +504,7 @@ def resolve(self, requirements, env=None, installer=None): while requirements: req = requirements.pop(0) # process dependencies breadth-first - if req.project_name == 'setuptools': - # TODO: only return distribute if setuptools < 0.7 + if _override_setuptools(req): req = Requirement.parse('distribute') if req in processed: @@ -2501,8 +2500,7 @@ def parse(s): # if asked for setuptools distribution # and if distribute is installed, we want to give # distribute instead - if founded_req.project_name == 'setuptools': - # TODO: only return distribute if setuptools < 0.7 + if _override_setuptools(founded_req): distribute = list(parse_requirements('distribute')) if len(distribute) == 1: return distribute[0] @@ -2526,6 +2524,26 @@ def parse(s): } +def _override_setuptools(req): + """Return True when distribute wants to override a setuptools dependency. + + We want to override when the requirement is setuptools and the version is + a variant of 0.6. + + """ + if req.project_name == 'setuptools': + if not len(req.specs): + # Just setuptools: ok + return True + for comparator, version in req.specs: + if comparator in ['==', '>=', '>']: + if '0.7' in version: + # We want some setuptools not from the 0.6 series. + return False + return True + return False + + def _get_mro(cls): """Get an mro for a type or classic class""" if not isinstance(cls,type): diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index d53aef5640..c9236e88f6 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -354,8 +354,28 @@ def testVersionEquality(self): self.failUnless(d("foo-0.3a3.egg") in r2) self.failUnless(d("foo-0.3a5.egg") in r2) - - + def testDistributeSetuptoolsOverride(self): + # Plain setuptools or distribute mean we return distribute. + self.assertEqual( + Requirement.parse('setuptools').project_name, 'distribute') + self.assertEqual( + Requirement.parse('distribute').project_name, 'distribute') + # setuptools lower than 0.7 means distribute + self.assertEqual( + Requirement.parse('setuptools==0.6c9').project_name, 'distribute') + self.assertEqual( + Requirement.parse('setuptools==0.6c10').project_name, 'distribute') + self.assertEqual( + Requirement.parse('setuptools>=0.6').project_name, 'distribute') + self.assertEqual( + Requirement.parse('setuptools < 0.7').project_name, 'distribute') + # setuptools 0.7 and higher means setuptools. + self.assertEqual( + Requirement.parse('setuptools == 0.7').project_name, 'setuptools') + self.assertEqual( + Requirement.parse('setuptools == 0.7a1').project_name, 'setuptools') + self.assertEqual( + Requirement.parse('setuptools >= 0.7').project_name, 'setuptools') From 03a95e191c1e128a04911ae415a36cbcb6ab1901 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 15:22:44 +0200 Subject: [PATCH 2646/8469] an error is raised when installing a 0.7 setuptools with distribute --HG-- branch : distribute extra : rebase_source : f68fe9818972a09d858f2bb59ef47682353f600d --- CHANGES.txt | 3 ++- pkg_resources.py | 7 +++++-- setuptools/tests/test_resources.py | 19 +++++++++++++++---- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 73a10b36a8..3229a83151 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,8 @@ CHANGES ----- * Distribute no longer shadows setuptools if we require a 0.7-series - setuptools. + setuptools. And an error is raised when installing a 0.7 setuptools with + distribute. * When run from within buildout, no attempt is made to modify an existing setuptools egg, whether in a shared egg directory or a system setuptools. diff --git a/pkg_resources.py b/pkg_resources.py index 510be536fa..c03718649b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2239,8 +2239,11 @@ def insert_on(self, path, loc = None): loc = loc or self.location - # TODO: raise error if we're adding setuptools >= 0.7 as that is - # guaranteed to be incompatible with distribute. + if self.project_name == 'setuptools': + if '0.7' in self.version: + raise ValueError( + "A 0.7-series setuptools cannot be installed " + "with distribute") if not loc: return diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index c9236e88f6..6a89e8a834 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -187,10 +187,21 @@ def testDistroDependsOptions(self): ) self.assertRaises(UnknownExtra, d.requires, ["foo"]) - - - - + def testSetuptoolsDistributeCombination(self): + # Ensure that installing a 0.7-series setuptools fails. PJE says that + # it will not co-exist. + ws = WorkingSet([]) + d = Distribution( + "/some/path", + project_name="setuptools", + version="0.7a1") + self.assertRaises(ValueError, ws.add, d) + # A 0.6-series is no problem + d2 = Distribution( + "/some/path", + project_name="setuptools", + version="0.6c9") + ws.add(d2) From 898ac3ef244465848be4748fc68a6ae4083fc394 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 14 Oct 2009 16:05:29 +0200 Subject: [PATCH 2647/8469] doc typo. fixes 67 --HG-- branch : distribute extra : rebase_source : 2f89aa2f065390966c0dad309e91ac8e30de5dfc --- CHANGES.txt | 2 ++ docs/roadmap.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3229a83151..88dd59b1e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.5 ----- +* Issue 67: Fixed doc typo (PEP 381/382) + * Distribute no longer shadows setuptools if we require a 0.7-series setuptools. And an error is raised when installing a 0.7 setuptools with distribute. diff --git a/docs/roadmap.txt b/docs/roadmap.txt index e97ab57dc5..6182ed3bf6 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -59,7 +59,7 @@ we've done a lot already) - no more custom site.py (that is: if something misses in Python's site.py we'll add it there instead of patching it) -- no more namespaced packages system, if PEP 381 (namespaces package +- no more namespaced packages system, if PEP 382 (namespaces package support) makes it to 2.7 - The code is splitted in many packages and might be distributed under From f35ccfd8afd630d3b3445fa74ee6fde4edd5ee3e Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 14 Oct 2009 19:49:51 +0200 Subject: [PATCH 2648/8469] removing windows EOL lines --HG-- branch : distribute extra : rebase_source : e5792b2f337a38b603dc6a920d3bfe418e3f2722 --- setuptools/tests/win_script_wrapper.txt | 274 ++++++++++++------------ 1 file changed, 137 insertions(+), 137 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 2d95502e35..2e1bff7434 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -1,137 +1,137 @@ -Python Script Wrapper for Windows -================================= - -setuptools includes wrappers for Python scripts that allows them to be -executed like regular windows programs. There are 2 wrappers, once -for command-line programs, cli.exe, and one for graphica programs, -gui.exe. These programs are almost identical, function pretty much -the same way, and are generated from the same source file. The -wrapper programs are used by copying them to the directory containing -the script they are to wrap and with the same name as the script they -are to wrap. In the rest of this document, we'll give an example that -will illustrate this. - -Let's create a simple script, foo-script.py: - - >>> import os, sys, tempfile - >>> from setuptools.command.easy_install import nt_quote_arg - >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( - ... """#!%(python_exe)s - ... import sys - ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input - ... if __debug__: - ... print 'non-optimized' - ... """ % dict(python_exe=nt_quote_arg(sys.executable))) - -Note that the script starts with a Unix-style '#!' line saying which -Python executable to run. The wrapper will use this to find the -correct Python executable. - -We'll also copy cli.exe to the sample-directory with the name foo.exe: - - >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'foo.exe'), 'wb').write( - ... pkg_resources.resource_string('setuptools', 'cli.exe') - ... ) - -When the copy of cli.exe, foo.exe in this example, runs, it examines -the path name it was run with and computes a Python script path name -by removing the '.exe' suffic and adding the '-script.py' suffix. (For -GUI programs, the suffix '-script-pyw' is added.) This is why we -named out script the way we did. Now we can run out script by running -the wrapper: - - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'foo.exe')) - ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') - >>> input.write('hello\nworld\n') - >>> input.close() - >>> print output.read(), - \foo-script.py - ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] - 'hello\nworld\n' - non-optimized - -This example was a little pathological in that it exercised windows -(MS C runtime) quoting rules: - -- Strings containing spaces are surrounded by double quotes. - -- Double quotes in strings need to be escaped by preceding them with - back slashes. - -- One or more backslashes preceding double quotes quotes need to be - escaped by preceding each of them them with back slashes. - - -Specifying Python Command-line Options --------------------------------------- - -You can specify a single argument on the '#!' line. This can be used -to specify Python options like -O, to run in optimized mode or -i -to start the interactive interpreter. You can combine multiple -options as usual. For example, to run in optimized mode and -enter the interpreter after running the script, you could use -Oi: - - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( - ... """#!%(python_exe)s -Oi - ... import sys - ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input - ... if __debug__: - ... print 'non-optimized' - ... sys.ps1 = '---' - ... """ % dict(python_exe=nt_quote_arg(sys.executable))) - - >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) - >>> input.close() - >>> print output.read(), - \foo-script.py - [] - '' - --- - -Testing the GUI Version ------------------------ - -Now let's test the GUI version with the simple scipt, bar-script.py: - - >>> import os, sys, tempfile - >>> from setuptools.command.easy_install import nt_quote_arg - >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'bar-script.pyw'), 'w').write( - ... """#!%(python_exe)s - ... import sys - ... open(sys.argv[1], 'wb').write(repr(sys.argv[2])) - ... """ % dict(python_exe=nt_quote_arg(sys.executable))) - -We'll also copy gui.exe to the sample-directory with the name bar.exe: - - >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'bar.exe'), 'wb').write( - ... pkg_resources.resource_string('setuptools', 'gui.exe') - ... ) - -Finally, we'll run the script and check the result: - - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')) - ... + r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) - >>> input.close() - >>> print output.read() - - >>> print open(os.path.join(sample_directory, 'test_output.txt'), 'rb').read() - 'Test Argument' - - -We're done with the sample_directory: - - >>> import shutil - >>> shutil.rmtree(sample_directory) - +Python Script Wrapper for Windows +================================= + +setuptools includes wrappers for Python scripts that allows them to be +executed like regular windows programs. There are 2 wrappers, once +for command-line programs, cli.exe, and one for graphica programs, +gui.exe. These programs are almost identical, function pretty much +the same way, and are generated from the same source file. The +wrapper programs are used by copying them to the directory containing +the script they are to wrap and with the same name as the script they +are to wrap. In the rest of this document, we'll give an example that +will illustrate this. + +Let's create a simple script, foo-script.py: + + >>> import os, sys, tempfile + >>> from setuptools.command.easy_install import nt_quote_arg + >>> sample_directory = tempfile.mkdtemp() + >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( + ... """#!%(python_exe)s + ... import sys + ... input = repr(sys.stdin.read()) + ... print sys.argv[0][-14:] + ... print sys.argv[1:] + ... print input + ... if __debug__: + ... print 'non-optimized' + ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + +Note that the script starts with a Unix-style '#!' line saying which +Python executable to run. The wrapper will use this to find the +correct Python executable. + +We'll also copy cli.exe to the sample-directory with the name foo.exe: + + >>> import pkg_resources + >>> open(os.path.join(sample_directory, 'foo.exe'), 'wb').write( + ... pkg_resources.resource_string('setuptools', 'cli.exe') + ... ) + +When the copy of cli.exe, foo.exe in this example, runs, it examines +the path name it was run with and computes a Python script path name +by removing the '.exe' suffic and adding the '-script.py' suffix. (For +GUI programs, the suffix '-script-pyw' is added.) This is why we +named out script the way we did. Now we can run out script by running +the wrapper: + + >>> import os + >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'foo.exe')) + ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') + >>> input.write('hello\nworld\n') + >>> input.close() + >>> print output.read(), + \foo-script.py + ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] + 'hello\nworld\n' + non-optimized + +This example was a little pathological in that it exercised windows +(MS C runtime) quoting rules: + +- Strings containing spaces are surrounded by double quotes. + +- Double quotes in strings need to be escaped by preceding them with + back slashes. + +- One or more backslashes preceding double quotes quotes need to be + escaped by preceding each of them them with back slashes. + + +Specifying Python Command-line Options +-------------------------------------- + +You can specify a single argument on the '#!' line. This can be used +to specify Python options like -O, to run in optimized mode or -i +to start the interactive interpreter. You can combine multiple +options as usual. For example, to run in optimized mode and +enter the interpreter after running the script, you could use -Oi: + + >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( + ... """#!%(python_exe)s -Oi + ... import sys + ... input = repr(sys.stdin.read()) + ... print sys.argv[0][-14:] + ... print sys.argv[1:] + ... print input + ... if __debug__: + ... print 'non-optimized' + ... sys.ps1 = '---' + ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + + >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) + >>> input.close() + >>> print output.read(), + \foo-script.py + [] + '' + --- + +Testing the GUI Version +----------------------- + +Now let's test the GUI version with the simple scipt, bar-script.py: + + >>> import os, sys, tempfile + >>> from setuptools.command.easy_install import nt_quote_arg + >>> sample_directory = tempfile.mkdtemp() + >>> open(os.path.join(sample_directory, 'bar-script.pyw'), 'w').write( + ... """#!%(python_exe)s + ... import sys + ... open(sys.argv[1], 'wb').write(repr(sys.argv[2])) + ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + +We'll also copy gui.exe to the sample-directory with the name bar.exe: + + >>> import pkg_resources + >>> open(os.path.join(sample_directory, 'bar.exe'), 'wb').write( + ... pkg_resources.resource_string('setuptools', 'gui.exe') + ... ) + +Finally, we'll run the script and check the result: + + >>> import os + >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')) + ... + r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) + >>> input.close() + >>> print output.read() + + >>> print open(os.path.join(sample_directory, 'test_output.txt'), 'rb').read() + 'Test Argument' + + +We're done with the sample_directory: + + >>> import shutil + >>> shutil.rmtree(sample_directory) + From 87213900312e662b805b2956d179a81521029487 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 14 Oct 2009 19:53:59 +0200 Subject: [PATCH 2649/8469] Now cli.exe and gui.exe are generated at build time - win_script_wrapper.txt covers this case - refs #65 --HG-- branch : distribute extra : rebase_source : 940bcb596a59153bc62056328b75cb670fa44273 --- CHANGES.txt | 3 +++ distribute.egg-info/entry_points.txt | 2 +- setup.py | 36 ++++++++++++++++++++++++---- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 88dd59b1e9..c9f1713e22 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ CHANGES 0.6.5 ----- +* Issue 65: cli.exe and gui.exe are not generated at build time, + depending on the platform in use. + * Issue 67: Fixed doc typo (PEP 381/382) * Distribute no longer shadows setuptools if we require a 0.7-series diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 0aaa28c086..f4b74da0fd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.5 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setup.py b/setup.py index 090d67032f..1459ffe945 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,8 @@ #!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" - -import sys, os +import sys +import os +import platform src_root = None if sys.version_info >= (3,): @@ -39,10 +40,36 @@ VERSION = "0.6.5" from setuptools import setup, find_packages -import os -import sys +from setuptools.command.build_py import build_py as _build_py scripts = [] +# specific command that is used to generate windows .exe files +class build_py(_build_py): + def build_package_data(self): + """Copy data files into build directory""" + lastdir = None + is_64 = platform.architecture()[0] == '64bit' + + for package, src_dir, build_dir, filenames in self.data_files: + for filename in filenames: + target = os.path.join(build_dir, filename) + self.mkpath(os.path.dirname(target)) + srcfile = os.path.join(src_dir, filename) + outf, copied = self.copy_file(srcfile, target) + + # creating cli.exe and gui.exe + if filename in ('gui-32.exe', 'cli-32.exe') and not is_64: + exe_target = os.path.join(build_dir, filename.replace('-32.exe', '.exe')) + self.copy_file(srcfile, exe_target) + + if filename in ('gui-64.exe', 'cli-64.exe') and is_64: + exe_target = os.path.join(build_dir, filename.replace('-64.exe', '.exe')) + self.copy_file(srcfile, exe_target) + + srcfile = os.path.abspath(srcfile) + if copied and srcfile in self.distribution.convert_2to3_doctests: + self.__doctests_2to3.append(outf) + # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way def _easy_install_marker(): @@ -149,6 +176,7 @@ def _being_installed(): Topic :: System :: Systems Administration Topic :: Utilities""".splitlines() if f.strip()], scripts = scripts, + cmdclass = {'build_py': build_py} ) if _being_installed(): From c4ba04373c08da643c5f1b9a0012857acc8e7262 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 14 Oct 2009 19:54:44 +0200 Subject: [PATCH 2650/8469] typo --HG-- branch : distribute extra : rebase_source : 61f2b4f32f0317b02463282d5dc41cb3f245e744 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c9f1713e22..5ccd32be82 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.5 ----- -* Issue 65: cli.exe and gui.exe are not generated at build time, +* Issue 65: cli.exe and gui.exe are now generated at build time, depending on the platform in use. * Issue 67: Fixed doc typo (PEP 381/382) From 10fa5646440cf7e8d341108fa7b85216a18a7828 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Thu, 15 Oct 2009 15:03:51 +0200 Subject: [PATCH 2651/8469] Fixed command to switch to the branch (the old instructions were for *making* a branch, not for switching to it). --HG-- branch : distribute extra : rebase_source : c073e3144648eb79ca6f24de23dfa80c6cc4dc67 --- DEVGUIDE.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index df25947343..a7968ce88d 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -11,8 +11,7 @@ Grab the code at bitbucket:: If you want to work in the 0.6 branch, you have to switch to it:: - $ hg branch 0.6-maintenance - marked working directory as branch 0.6-maintenance + $ hg update 0.6-maintenance $ hg branch 0.6-maintenance From 771be6089a83bb03edf8dc87cdce60d3a4d4e595 Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 16:16:55 +0200 Subject: [PATCH 2652/8469] we need to be able to use these API to detect the real setuptools at bootstrap time --HG-- branch : distribute extra : rebase_source : befcf5fc39937e17b8f830b8393fcc6b1bafa17a --- distribute_setup.py | 3 ++- pkg_resources.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index cf56fb28ea..0843b3c475 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -345,7 +345,8 @@ def fake_setuptools(): log.warn('Setuptools or Distribute does not seem to be installed.') return ws = pkg_resources.working_set - setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools')) + setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools', + replacement=False)) if setuptools_dist is None: log.warn('No setuptools distribution found') return diff --git a/pkg_resources.py b/pkg_resources.py index c03718649b..49c2662006 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -485,7 +485,7 @@ def add(self, dist, entry=None, insert=True): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None): + def resolve(self, requirements, env=None, installer=None, replacement=True): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -504,7 +504,7 @@ def resolve(self, requirements, env=None, installer=None): while requirements: req = requirements.pop(0) # process dependencies breadth-first - if _override_setuptools(req): + if _override_setuptools(req) and replacement: req = Requirement.parse('distribute') if req in processed: @@ -2495,7 +2495,7 @@ def __hash__(self): def __repr__(self): return "Requirement.parse(%r)" % str(self) #@staticmethod - def parse(s): + def parse(s, replacement=True): reqs = list(parse_requirements(s)) if reqs: if len(reqs) == 1: @@ -2503,7 +2503,7 @@ def parse(s): # if asked for setuptools distribution # and if distribute is installed, we want to give # distribute instead - if _override_setuptools(founded_req): + if _override_setuptools(founded_req) and replacement: distribute = list(parse_requirements('distribute')) if len(distribute) == 1: return distribute[0] From d7f3fac74d074474ef490535f3e8b366969bac7e Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 22:15:10 +0200 Subject: [PATCH 2653/8469] Added tag 0.6.5 for changeset 2df182df8a02 --HG-- branch : distribute extra : rebase_source : c355452db035caf2643bc621bef528200de600bc --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3ca10b19b7..4163b624c7 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ 41415244ee90664042d277d0b1f0f59c04ddd0e4 0.6.2 e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 +2df182df8a0224d429402de3cddccdb97af6ea21 0.6.5 From 5cbce15dc90730c38c1697b8011cecb0618ae89c Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 22:19:59 +0200 Subject: [PATCH 2654/8469] fixed reSt --HG-- branch : distribute extra : rebase_source : fd6a217d7357be4ee3957f683f55b3b2edf318bd --- docs/roadmap.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 6182ed3bf6..fcd5518578 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -54,7 +54,7 @@ we've done a lot already) - the version system will be deprecated, in favor of the one in Distutils - no more Distutils monkey-patch that happens once you use the code - (things like 'from distutils import cmd; cmd.Command = CustomCommand') + (things like 'from distutils import cmd; cmd.Command = CustomCommand') - no more custom site.py (that is: if something misses in Python's site.py we'll add it there instead of patching it) From 23229041ce73c90615ecefa80a720da785cd54cd Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 22:23:24 +0200 Subject: [PATCH 2655/8469] starting 0.6.6 --HG-- branch : distribute extra : rebase_source : 15b88555dec253c490ee91a6e71ec1c945fdf6b0 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5ccd32be82..ed37e1d811 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +0.6.6 +----- + + + ----- 0.6.5 ----- diff --git a/README.txt b/README.txt index 5ce8a728e6..2f7ddcc3a8 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.5.tar.gz - $ tar -xzvf distribute-0.6.5.tar.gz - $ cd distribute-0.6.5 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.6.tar.gz + $ tar -xzvf distribute-0.6.6.tar.gz + $ cd distribute-0.6.6 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 0843b3c475..1ab07f0d98 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.5" +DEFAULT_VERSION = "0.6.6" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/docs/conf.py b/docs/conf.py index f7e762eb3d..a050632257 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.5' +version = '0.6.6' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 74be096561..571b80f1e2 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.5" +export VERSION="0.6.6" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 1459ffe945..da59d365b5 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.5" +VERSION = "0.6.6" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 7785ccade4b92867c492f573e9b548c1ba612cd7 Mon Sep 17 00:00:00 2001 From: agronholm Date: Fri, 16 Oct 2009 00:02:35 +0300 Subject: [PATCH 2656/8469] Unified the bootstrap file so it works on both py2.x and py3k without 2to3 (patch by Holger Krekel) --HG-- branch : distribute extra : rebase_source : 7b8e41446e9b442adf35369b972e725f83b45d43 --- README.txt | 2 +- distribute_setup.py | 19 ++++++++++++------- release.sh | 12 +----------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/README.txt b/README.txt index 2f7ddcc3a8..90eff94358 100755 --- a/README.txt +++ b/README.txt @@ -92,7 +92,7 @@ If you are under Python 3, use $ curl -O http://python-distribute.org/distribute_setup_3k.py $ python distribute_setup_3k.py -Notice that both files are provided in the source release. +Notice this file is also provided in the source release. easy_install or pip =================== diff --git a/distribute_setup.py b/distribute_setup.py index 1ab07f0d98..7023b596aa 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -141,14 +141,15 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: pkg_resources.require("distribute>="+version) return - except pkg_resources.VersionConflict, e: + except pkg_resources.VersionConflict: + e = sys.exc_info()[1] if was_imported: - print >>sys.stderr, ( + sys.stderr.write( "The required version of distribute (>=%s) is not available,\n" "and can't be installed while this script is running. Please\n" "install a more recent version first, using\n" "'easy_install -U distribute'." - "\n\n(Currently using %r)") % (version, e.args[0]) + "\n\n(Currently using %r)\n" % (version, e.args[0])) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok @@ -172,7 +173,10 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) - import urllib2 + try: + from urllib.request import urlopen + except ImportError: + from urllib2 import urlopen tgz_name = "distribute-%s.tar.gz" % version url = download_base + tgz_name saveto = os.path.join(to_dir, tgz_name) @@ -180,7 +184,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, if not os.path.exists(saveto): # Avoid repeated downloads try: log.warn("Downloading %s", url) - src = urllib2.urlopen(url) + src = urlopen(url) # Read/write all in one block, so we don't create a corrupt file # if the download is interrupted. data = src.read() @@ -410,7 +414,7 @@ def _extractall(self, path=".", members=None): # Extract directories with a safe mode. directories.append(tarinfo) tarinfo = copy.copy(tarinfo) - tarinfo.mode = 0700 + tarinfo.mode = 448 # decimal for oct 0700 self.extract(tarinfo, path) # Reverse sort directories. @@ -429,7 +433,8 @@ def sorter(dir1, dir2): self.chown(tarinfo, dirpath) self.utime(tarinfo, dirpath) self.chmod(tarinfo, dirpath) - except ExtractError, e: + except ExtractError: + e = sys.exc_info()[1] if self.errorlevel > 1: raise else: diff --git a/release.sh b/release.sh index 571b80f1e2..4f6b3b8609 100755 --- a/release.sh +++ b/release.sh @@ -5,15 +5,6 @@ export VERSION="0.6.6" hg tag $VERSION hg ci -m "bumped revision" -# creating the 3k script -mkdir ./temp -cp distribute_setup.py ./temp/distribute_setup.py -cd ./temp -2to3 -w distribute_setup.py > /dev/null -mv distribute_setup.py ../distribute_setup_3k.py -cd .. -rm -rf ./temp - # creating the releases rm -rf ./dist @@ -21,9 +12,8 @@ rm -rf ./dist python2.6 setup.py -q egg_info -RDb '' sdist register upload python2.6 setup.py build_sphinx upload_docs -# pushing the bootstrap scripts +# pushing the bootstrap script scp distribute_setup.py ziade.org:nightly/build/ -scp distribute_setup_3k.py ziade.org:nightly/build/ # starting the new dev From 0f267465f3a0584dafc96a414dfe3338b9bbda73 Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 23:30:55 +0200 Subject: [PATCH 2657/8469] make sure the old api can be called in case of an old version --HG-- branch : distribute extra : rebase_source : 60119a660b567b7ba04f6ceae08900e7b7abbf60 --- distribute_setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 1ab07f0d98..4b2d78543b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -345,8 +345,13 @@ def fake_setuptools(): log.warn('Setuptools or Distribute does not seem to be installed.') return ws = pkg_resources.working_set - setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools', - replacement=False)) + try: + setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools', + replacement=False)) + except TypeError: + # old distribute API + setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools')) + if setuptools_dist is None: log.warn('No setuptools distribution found') return From d82690a2cc74d8ac0dcee5484a08c6346af68883 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Thu, 15 Oct 2009 23:35:24 +0200 Subject: [PATCH 2658/8469] updated changelog --HG-- branch : distribute extra : rebase_source : 6eb0ef4d64f43fd28095837abbdd53bf7c3e9a24 --- CHANGES.txt | 3 ++- distribute.egg-info/entry_points.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ed37e1d811..c3a5299ac8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ CHANGES 0.6.6 ----- - +* Unified the bootstrap file so it works on both py2.x and py3k without 2to3 + (patch by Holger Krekel) ----- 0.6.5 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index f4b74da0fd..0aaa28c086 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.5 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 748696a763c3b57aff3b4f39c4461c5a6b7ef4ee Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 15 Oct 2009 23:41:14 +0200 Subject: [PATCH 2659/8469] Added tag 0.6.6 for changeset f1fb564d6d67 --HG-- branch : distribute extra : rebase_source : 959930710c8dc66187d990c6eadec8b35320d382 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4163b624c7..b410ccb7ab 100644 --- a/.hgtags +++ b/.hgtags @@ -4,3 +4,4 @@ e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 2df182df8a0224d429402de3cddccdb97af6ea21 0.6.5 +f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 From 497a63db5fccb487bdd6212d8aae605dcb4fdae4 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 16 Oct 2009 12:08:48 +0200 Subject: [PATCH 2660/8469] change home url --HG-- branch : distribute extra : rebase_source : f27d75ac7caf74c1a2cb18bb27fdc1eff50413f5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index da59d365b5..5bf166403f 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def _being_installed(): license="PSF or ZPL", long_description = open('README.txt').read() + open('CHANGES.txt').read(), keywords = "CPAN PyPI distutils eggs package management", - url = "http://pypi.python.org/pypi/distribute", + url = "http://packages.python.org/distribute", test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), From fa9206561cd5483846b86c89206ced48d502018b Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 16 Oct 2009 12:11:24 +0200 Subject: [PATCH 2661/8469] starting 0.6.7 --HG-- branch : distribute extra : rebase_source : c4445b08d41ce91b2a7c03793110b07113edd9ea --- CHANGES.txt | 5 +++++ README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 2 +- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c3a5299ac8..e6816cfea5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,11 @@ CHANGES ======= +----- +0.6.7 +----- + + ----- 0.6.6 ----- diff --git a/README.txt b/README.txt index 90eff94358..271b397e7c 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.6.tar.gz - $ tar -xzvf distribute-0.6.6.tar.gz - $ cd distribute-0.6.6 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.7.tar.gz + $ tar -xzvf distribute-0.6.7.tar.gz + $ cd distribute-0.6.7 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 0aaa28c086..f4b74da0fd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.5 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 7285335606..d99120102b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.6" +DEFAULT_VERSION = "0.6.7" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/docs/conf.py b/docs/conf.py index a050632257..794e728cfb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.6' +version = '0.6.7' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 4f6b3b8609..294bc5781f 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.6" +export VERSION="0.6.7" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 5bf166403f..aaa7f3e312 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.6" +VERSION = "0.6.7" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 6529a376d21b45fbc8f8ca33bd797c21f4589f35 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 16 Oct 2009 13:45:19 +0200 Subject: [PATCH 2662/8469] Removed "shared eggs dir gets hosed" warning from the readme and replaced it with a "everything works great now" message. Tnx to Vincent Fretin for warning me about it. --HG-- branch : distribute extra : rebase_source : 7c8bca372a67bc3741ba376becc5a8337619bbd0 --- README.txt | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 271b397e7c..fbdf32798d 100755 --- a/README.txt +++ b/README.txt @@ -196,16 +196,21 @@ Install FAQ - **How does Distribute interacts with zc.buildout?** - You can use Distribute in your zc.buildout. - - Although you have to run a specific `bootstrap.py` file that is available - at `http://python-distribute.org/bootstrap.py`. The code is located at + You can use Distribute in your zc.buildout. *The only thing* you need to do + is use the bootstrap at `http://python-distribute.org/bootstrap.py`. Run + that bootstrap and ``bin/buildout`` (and all other buildout-generated + scripts) will transparently use distribute instead of setuptools. You do + not need a specific buildout release. + + A shared eggs directory is no problem (since 0.6.6): the setuptools egg is + left in place unmodified. So other buildouts that do not yet use the new + bootstrap continue to work just fine. And there is no need to list + ``distribute`` somewhere in your eggs: using the bootstrap is enough. + + The source code for the bootstrap script is located at `http://bitbucket.org/tarek/buildout-distribute`. - Beware that if you use a shared eggs folder with buildout, you need to - switch all buildouts that use it to distribute. This is due to the fact - that the setuptools eggs located in the shared folder will be replaced - by a fake one, alongside distribute. + ----------------------------- Feedback and getting involved From e9ef9f712767530e054cdea670a744ee96f25695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 16 Oct 2009 23:04:16 +0000 Subject: [PATCH 2663/8469] this test requires zlib support --- tests/test_archive_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 3faf5e0d3b..b91986ba95 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -209,6 +209,7 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') + @unittest.skipUnless(zlib, "Requires zlib") def test_make_archive_owner_group(self): # testing make_archive with owner and group, with various combinations # this works even if there's not gid/uid support From f11e9a88c284209f037ae002fa00133833d48921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 16 Oct 2009 23:07:19 +0000 Subject: [PATCH 2664/8469] Merged revisions 75450 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75450 | tarek.ziade | 2009-10-17 01:04:16 +0200 (Sat, 17 Oct 2009) | 1 line this test requires zlib support ........ --- tests/test_archive_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 9990df36c3..71d32dce19 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -209,6 +209,7 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') + @unittest.skipUnless(zlib, "Requires zlib") def test_make_archive_owner_group(self): # testing make_archive with owner and group, with various combinations # this works even if there's not gid/uid support From 032f6e8080b511c1f700e5d6133e7f68dbdbcf7d Mon Sep 17 00:00:00 2001 From: Daniel Stutzbach Date: Sat, 17 Oct 2009 22:01:07 -0500 Subject: [PATCH 2665/8469] Fix for Issue 64: setup.py rebuilds the distribute egg every.single.time. --HG-- branch : distribute extra : rebase_source : 2fe261e4ebf0fef8bb38e0d8fc9965b24cc02002 --- distribute_setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index d99120102b..0460619e29 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.7" +DEFAULT_VERSION = "0.6.6" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 @@ -115,9 +115,12 @@ def _build_egg(tarball, to_dir): def _do_download(version, download_base, to_dir, download_delay): - tarball = download_setuptools(version, download_base, - to_dir, download_delay) - egg = _build_egg(tarball, to_dir) + egg = 'distribute-%s-py%d.%d.egg' % (version, sys.version_info[0], + sys.version_info[1]) + if not os.path.exists(egg): + tarball = download_setuptools(version, download_base, + to_dir, download_delay) + egg = _build_egg(tarball, to_dir) sys.path.insert(0, egg) import setuptools setuptools.bootstrap_install_from = egg From b1bd773feed63e4037a9dab96f40c3b147f9414e Mon Sep 17 00:00:00 2001 From: Daniel Stutzbach Date: Sat, 17 Oct 2009 22:03:24 -0500 Subject: [PATCH 2666/8469] Fixed build_egg to test for the existence of the correct egg filename. --HG-- branch : distribute extra : rebase_source : c944237f4b1aff19e3f6838b83945b7e4bff48de --- distribute_setup.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 0460619e29..c91410cbb0 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -84,7 +84,7 @@ def _install(tarball): os.chdir(old_wd) -def _build_egg(tarball, to_dir): +def _build_egg(egg, tarball, to_dir): # extracting the tarball tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) @@ -105,11 +105,8 @@ def _build_egg(tarball, to_dir): _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result - for file in os.listdir(to_dir): - if fnmatch.fnmatch(file, 'distribute-%s*.egg' % DEFAULT_VERSION): - return os.path.join(to_dir, file) - - raise IOError('Could not build the egg.') + if not os.path.exists(egg): + raise IOError('Could not build the egg.') finally: os.chdir(old_wd) @@ -120,7 +117,7 @@ def _do_download(version, download_base, to_dir, download_delay): if not os.path.exists(egg): tarball = download_setuptools(version, download_base, to_dir, download_delay) - egg = _build_egg(tarball, to_dir) + _build_egg(egg, tarball, to_dir) sys.path.insert(0, egg) import setuptools setuptools.bootstrap_install_from = egg From 286608d122dcfc718e4a52d011b8b77efe0fbe5f Mon Sep 17 00:00:00 2001 From: Daniel Stutzbach Date: Sat, 17 Oct 2009 22:23:22 -0500 Subject: [PATCH 2667/8469] Fixed bug in previous patch (oops) --HG-- branch : distribute extra : rebase_source : 0e0d70648070a33cbdb759de87415a90984da7cd --- distribute_setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index c91410cbb0..026c7d3ced 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -104,11 +104,12 @@ def _build_egg(egg, tarball, to_dir): log.warn('Building a Distribute egg in %s', to_dir) _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) - # returning the result - if not os.path.exists(egg): - raise IOError('Could not build the egg.') finally: os.chdir(old_wd) + # returning the result + log.warn(egg) + if not os.path.exists(egg): + raise IOError('Could not build the egg.') def _do_download(version, download_base, to_dir, download_delay): From 7d43c924940cb749650db28fcdc9858517e4a4e5 Mon Sep 17 00:00:00 2001 From: Daniel Stutzbach Date: Sat, 17 Oct 2009 22:57:21 -0500 Subject: [PATCH 2668/8469] Fixed egg filename computation to respect to_dir --HG-- branch : distribute extra : rebase_source : 7fa5025839278ad3a0fe1971bf8e050e9f910c43 --- distribute_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 026c7d3ced..db75a3c656 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -113,8 +113,8 @@ def _build_egg(egg, tarball, to_dir): def _do_download(version, download_base, to_dir, download_delay): - egg = 'distribute-%s-py%d.%d.egg' % (version, sys.version_info[0], - sys.version_info[1]) + egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg' + % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): tarball = download_setuptools(version, download_base, to_dir, download_delay) From 8a3f574e110a28ee9b3feab1bec433bdcaf5368f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 18 Oct 2009 09:28:26 +0000 Subject: [PATCH 2669/8469] Changed distutils tests to avoid environment alteration --- tests/support.py | 13 ++++++++++--- tests/test_bdist_dumb.py | 6 ++++-- tests/test_bdist_rpm.py | 5 +++-- tests/test_build_ext.py | 5 +++-- tests/test_config.py | 2 +- tests/test_core.py | 11 +++++++---- tests/test_dist.py | 31 +++++++++++++++++++------------ tests/test_install.py | 1 + tests/test_install_data.py | 1 + tests/test_install_headers.py | 1 + tests/test_install_lib.py | 2 +- tests/test_sysconfig.py | 12 ++++++++++-- tests/test_util.py | 11 ++++++----- 13 files changed, 67 insertions(+), 34 deletions(-) diff --git a/tests/support.py b/tests/support.py index 3c328cc9a6..41d3cd3c66 100644 --- a/tests/support.py +++ b/tests/support.py @@ -2,11 +2,11 @@ import os import shutil import tempfile +from copy import deepcopy from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution -from test.test_support import EnvironmentVarGuard class LoggingSilencer(object): @@ -111,8 +111,15 @@ class EnvironGuard(object): def setUp(self): super(EnvironGuard, self).setUp() - self.environ = EnvironmentVarGuard() + self.old_environ = deepcopy(os.environ) def tearDown(self): - self.environ.__exit__() + for key, value in self.old_environ.items(): + if os.environ.get(key) != value: + os.environ[key] = value + + for key in os.environ.keys(): + if key not in self.old_environ: + del os.environ[key] + super(EnvironGuard, self).tearDown() diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index a838f73476..5eaef2a9d7 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -26,16 +26,18 @@ class BuildDumbTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() @unittest.skipUnless(zlib, "requires zlib") diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index c271567542..2aa257f7e6 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -29,11 +29,12 @@ class BuildRpmTestCase(support.TempdirManager, def setUp(self): super(BuildRpmTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildRpmTestCase, self).tearDown() def test_quiet(self): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4c09dd80a3..317ce2bca0 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -34,7 +34,7 @@ def setUp(self): # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path[:] + self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) if sys.version > "2.6": @@ -89,7 +89,8 @@ def test_build_ext(self): def tearDown(self): # Get everything back to normal test_support.unload('xx') - sys.path = self.sys_path + sys.path = self.sys_path[0] + sys.path[:] = self.sys_path[1] if sys.version > "2.6": import site site.USER_BASE = self.old_user_base diff --git a/tests/test_config.py b/tests/test_config.py index 6947275569..0a1bb961ff 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -56,7 +56,7 @@ def setUp(self): """Patches the environment.""" super(PyPIRCCommandTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.environ['HOME'] = self.tmp_dir + os.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() diff --git a/tests/test_core.py b/tests/test_core.py index 3c26fddbc6..48ec1b436e 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -8,7 +8,7 @@ import test.test_support from test.test_support import captured_stdout import unittest - +from distutils.tests import support # setup script that uses __file__ setup_using___file__ = """\ @@ -29,17 +29,20 @@ """ -class CoreTestCase(unittest.TestCase): +class CoreTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): + super(CoreTestCase, self).setUp() self.old_stdout = sys.stdout self.cleanup_testfn() - self.old_argv = sys.argv[:] + self.old_argv = sys.argv, sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() - sys.argv = self.old_argv[:] + sys.argv = self.old_argv[0] + sys.argv[:] = self.old_argv[1] + super(CoreTestCase, self).tearDown() def cleanup_testfn(self): path = test.test_support.TESTFN diff --git a/tests/test_dist.py b/tests/test_dist.py index 3d4b25f0fc..5f032ca60f 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -39,15 +39,17 @@ def find_config_files(self): class DistributionTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(DistributionTestCase, self).setUp() - self.argv = sys.argv[:] + self.argv = sys.argv, sys.argv[:] del sys.argv[1:] def tearDown(self): - sys.argv[:] = self.argv + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] super(DistributionTestCase, self).tearDown() def create_distribution(self, configfiles=()): @@ -210,6 +212,15 @@ def test_announce(self): class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): + def setUp(self): + super(MetadataTestCase, self).setUp() + self.argv = sys.argv, sys.argv[:] + + def tearDown(self): + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] + super(MetadataTestCase, self).tearDown() + def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} @@ -308,14 +319,14 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) @@ -331,15 +342,11 @@ def test_fix_help_options(self): def test_show_help(self): # smoke test, just makes sure some help is displayed dist = Distribution() - old_argv = sys.argv sys.argv = [] - try: - dist.help = 1 - dist.script_name = 'setup.py' - with captured_stdout() as s: - dist.parse_command_line() - finally: - sys.argv = old_argv + dist.help = 1 + dist.script_name = 'setup.py' + with captured_stdout() as s: + dist.parse_command_line() output = [line for line in s.getvalue().split('\n') if line.strip() != ''] diff --git a/tests/test_install.py b/tests/test_install.py index d2b8c8e9b6..d44156dd45 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -17,6 +17,7 @@ from distutils.tests import support class InstallTestCase(support.TempdirManager, + support.EnvironGuard, support.LoggingSilencer, unittest.TestCase): diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 7072136792..377ae86e2f 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -9,6 +9,7 @@ class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 2564563faf..5b32b13ee4 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -9,6 +9,7 @@ class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 793b95cad6..b2185b8442 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -10,9 +10,9 @@ class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): - def test_finalize_options(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index edc8fd8d60..498714de81 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -17,8 +17,16 @@ def setUp(self): def tearDown(self): if self.makefile is not None: os.unlink(self.makefile) + self.cleanup_testfn() super(SysconfigTestCase, self).tearDown() + def cleanup_testfn(self): + path = test.test_support.TESTFN + if os.path.isfile(path): + os.remove(path) + elif os.path.isdir(path): + shutil.rmtree(path) + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assertTrue(os.path.isfile(config_h), config_h) @@ -51,8 +59,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - self.environ['AR'] = 'my_ar' - self.environ['ARFLAGS'] = '-arflags' + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: diff --git a/tests/test_util.py b/tests/test_util.py index 7190b2c9c6..4099c950ad 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -121,7 +121,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -129,7 +129,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -250,17 +250,18 @@ def _join(*path): def test_check_environ(self): util._environ_checked = 0 + if 'HOME' in os.environ: + del os.environ['HOME'] # posix without HOME if os.name == 'posix': # this test won't run on windows check_environ() import pwd - self.assertEquals(self.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) + self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(self.environ['PLAT'], get_platform()) + self.assertEquals(os.environ['PLAT'], get_platform()) self.assertEquals(util._environ_checked, 1) def test_split_quoted(self): From b4af667a099c424589142dea0a2ed4e7c2cd71ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 18 Oct 2009 11:34:51 +0000 Subject: [PATCH 2670/8469] Merged revisions 75485 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75485 | tarek.ziade | 2009-10-18 11:28:26 +0200 (Sun, 18 Oct 2009) | 1 line Changed distutils tests to avoid environment alteration ........ --- tests/support.py | 13 ++++++++++--- tests/test_bdist_dumb.py | 6 ++++-- tests/test_bdist_rpm.py | 5 +++-- tests/test_build_ext.py | 5 +++-- tests/test_config.py | 2 +- tests/test_core.py | 11 +++++++---- tests/test_dist.py | 31 +++++++++++++++++++------------ tests/test_install.py | 1 + tests/test_install_data.py | 1 + tests/test_install_headers.py | 1 + tests/test_install_lib.py | 2 +- tests/test_sysconfig.py | 11 +++++++++-- tests/test_util.py | 11 ++++++----- 13 files changed, 66 insertions(+), 34 deletions(-) diff --git a/tests/support.py b/tests/support.py index ea122111ca..e258d2e58d 100644 --- a/tests/support.py +++ b/tests/support.py @@ -2,11 +2,11 @@ import os import shutil import tempfile +from copy import deepcopy from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution -from test.support import EnvironmentVarGuard class LoggingSilencer(object): @@ -111,8 +111,15 @@ class EnvironGuard(object): def setUp(self): super(EnvironGuard, self).setUp() - self.environ = EnvironmentVarGuard() + self.old_environ = deepcopy(os.environ) def tearDown(self): - self.environ.__exit__() + for key, value in self.old_environ.items(): + if os.environ.get(key) != value: + os.environ[key] = value + + for key in tuple(os.environ.keys()): + if key not in self.old_environ: + del os.environ[key] + super(EnvironGuard, self).tearDown() diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index a838f73476..5eaef2a9d7 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -26,16 +26,18 @@ class BuildDumbTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() @unittest.skipUnless(zlib, "requires zlib") diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index c271567542..2aa257f7e6 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -29,11 +29,12 @@ class BuildRpmTestCase(support.TempdirManager, def setUp(self): super(BuildRpmTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildRpmTestCase, self).tearDown() def test_quiet(self): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 7a27f343a7..ebbb39979c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -35,7 +35,7 @@ def setUp(self): # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path[:] + self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) if sys.version > "2.6": @@ -90,7 +90,8 @@ def test_build_ext(self): def tearDown(self): # Get everything back to normal support.unload('xx') - sys.path = self.sys_path + sys.path = self.sys_path[0] + sys.path[:] = self.sys_path[1] if sys.version > "2.6": import site site.USER_BASE = self.old_user_base diff --git a/tests/test_config.py b/tests/test_config.py index 879689d2bb..71c63678f8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -55,7 +55,7 @@ def setUp(self): """Patches the environment.""" super(PyPIRCCommandTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.environ['HOME'] = self.tmp_dir + os.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() diff --git a/tests/test_core.py b/tests/test_core.py index b5f391f57a..b478fa6291 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -8,7 +8,7 @@ import test.support from test.support import captured_stdout import unittest - +from distutils.tests import support # setup script that uses __file__ setup_using___file__ = """\ @@ -29,17 +29,20 @@ """ -class CoreTestCase(unittest.TestCase): +class CoreTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): + super(CoreTestCase, self).setUp() self.old_stdout = sys.stdout self.cleanup_testfn() - self.old_argv = sys.argv[:] + self.old_argv = sys.argv, sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() - sys.argv = self.old_argv[:] + sys.argv = self.old_argv[0] + sys.argv[:] = self.old_argv[1] + super(CoreTestCase, self).tearDown() def cleanup_testfn(self): path = test.support.TESTFN diff --git a/tests/test_dist.py b/tests/test_dist.py index 799b0c0603..be1010c611 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -38,15 +38,17 @@ def find_config_files(self): class DistributionTestCase(support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(DistributionTestCase, self).setUp() - self.argv = sys.argv[:] + self.argv = sys.argv, sys.argv[:] del sys.argv[1:] def tearDown(self): - sys.argv[:] = self.argv + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] super(DistributionTestCase, self).tearDown() def create_distribution(self, configfiles=()): @@ -181,6 +183,15 @@ def test_announce(self): class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): + def setUp(self): + super(MetadataTestCase, self).setUp() + self.argv = sys.argv, sys.argv[:] + + def tearDown(self): + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] + super(MetadataTestCase, self).tearDown() + def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} @@ -279,14 +290,14 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) @@ -302,15 +313,11 @@ def test_fix_help_options(self): def test_show_help(self): # smoke test, just makes sure some help is displayed dist = Distribution() - old_argv = sys.argv sys.argv = [] - try: - dist.help = 1 - dist.script_name = 'setup.py' - with captured_stdout() as s: - dist.parse_command_line() - finally: - sys.argv = old_argv + dist.help = 1 + dist.script_name = 'setup.py' + with captured_stdout() as s: + dist.parse_command_line() output = [line for line in s.getvalue().split('\n') if line.strip() != ''] diff --git a/tests/test_install.py b/tests/test_install.py index 2087a0eba0..76fa02acda 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -17,6 +17,7 @@ from distutils.tests import support class InstallTestCase(support.TempdirManager, + support.EnvironGuard, support.LoggingSilencer, unittest.TestCase): diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 7072136792..377ae86e2f 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -9,6 +9,7 @@ class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 2564563faf..5b32b13ee4 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -9,6 +9,7 @@ class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 793b95cad6..b2185b8442 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -10,9 +10,9 @@ class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): - def test_finalize_options(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index eb36204439..edc755ed15 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -17,8 +17,15 @@ def setUp(self): def tearDown(self): if self.makefile is not None: os.unlink(self.makefile) + self.cleanup_testfn() super(SysconfigTestCase, self).tearDown() + def cleanup_testfn(self): + if os.path.isfile(TESTFN): + os.remove(TESTFN) + elif os.path.isdir(TESTFN): + shutil.rmtree(TESTFN) + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assertTrue(os.path.isfile(config_h), config_h) @@ -51,8 +58,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - self.environ['AR'] = 'my_ar' - self.environ['ARFLAGS'] = '-arflags' + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: diff --git a/tests/test_util.py b/tests/test_util.py index 84caea5cac..8068726df1 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -121,7 +121,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -129,7 +129,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -250,17 +250,18 @@ def _join(*path): def test_check_environ(self): util._environ_checked = 0 + if 'HOME' in os.environ: + del os.environ['HOME'] # posix without HOME if os.name == 'posix': # this test won't run on windows check_environ() import pwd - self.assertEquals(self.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) + self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(self.environ['PLAT'], get_platform()) + self.assertEquals(os.environ['PLAT'], get_platform()) self.assertEquals(util._environ_checked, 1) def test_split_quoted(self): From 33e3ec5eadb59ece949d4cad1231ff23780e4c02 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 18 Oct 2009 14:32:54 +0200 Subject: [PATCH 2671/8469] make sure pkg_resources can be imported in GAE - refs #73 --HG-- branch : distribute extra : rebase_source : fa1f9aca1bb3b231b7e709de9fc78973cce053ed --- pkg_resources.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 49c2662006..31d83554e6 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -21,7 +21,14 @@ from sets import ImmutableSet as frozenset # capture these to bypass sandboxing -from os import utime, rename, unlink, mkdir +from os import utime +try: + from os import mkdir, rename, unlink + WRITE_SUPPORT = True +except ImportError: + # no write support, probably under GAE + WRITE_SUPPORT = False + from os import open as os_open from os.path import isdir, split @@ -36,6 +43,8 @@ def _bypass_ensure_directory(name, mode=0777): # Sandbox-bypassing version of ensure_directory() + if not WRITE_SUPPORT: + raise IOError('"os.mkdir" not supported on this platform.') dirname, filename = split(name) if dirname and filename and not isdir(dirname): _bypass_ensure_directory(dirname) @@ -1332,6 +1341,10 @@ def _extract_resource(self, manager, zip_path): timestamp = time.mktime(date_time) try: + if not WRITE_SUPPORT: + raise IOError('"os.rename" and "os.unlink" are not supported ' + 'on this platform') + real_path = manager.get_cache_path( self.egg_name, self._parts(zip_path) ) From 32a6241687d12965291bd1f62fb9c5eb85b9eab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 18 Oct 2009 12:41:30 +0000 Subject: [PATCH 2672/8469] Merged revisions 75491 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75491 | tarek.ziade | 2009-10-18 13:34:51 +0200 (Sun, 18 Oct 2009) | 9 lines Merged revisions 75485 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75485 | tarek.ziade | 2009-10-18 11:28:26 +0200 (Sun, 18 Oct 2009) | 1 line Changed distutils tests to avoid environment alteration ........ ................ --- tests/support.py | 13 ++++++++++--- tests/test_bdist_dumb.py | 6 ++++-- tests/test_bdist_rpm.py | 5 +++-- tests/test_build_ext.py | 5 +++-- tests/test_config.py | 2 +- tests/test_core.py | 11 +++++++---- tests/test_dist.py | 31 +++++++++++++++++++------------ tests/test_install.py | 1 + tests/test_install_data.py | 1 + tests/test_install_headers.py | 1 + tests/test_install_lib.py | 2 +- tests/test_sysconfig.py | 11 +++++++++-- tests/test_util.py | 11 ++++++----- 13 files changed, 66 insertions(+), 34 deletions(-) diff --git a/tests/support.py b/tests/support.py index ea122111ca..e258d2e58d 100644 --- a/tests/support.py +++ b/tests/support.py @@ -2,11 +2,11 @@ import os import shutil import tempfile +from copy import deepcopy from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution -from test.support import EnvironmentVarGuard class LoggingSilencer(object): @@ -111,8 +111,15 @@ class EnvironGuard(object): def setUp(self): super(EnvironGuard, self).setUp() - self.environ = EnvironmentVarGuard() + self.old_environ = deepcopy(os.environ) def tearDown(self): - self.environ.__exit__() + for key, value in self.old_environ.items(): + if os.environ.get(key) != value: + os.environ[key] = value + + for key in tuple(os.environ.keys()): + if key not in self.old_environ: + del os.environ[key] + super(EnvironGuard, self).tearDown() diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index d2ea201bd4..5e76809f23 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -19,16 +19,18 @@ class BuildDumbTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() def test_simple_built(self): diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index c271567542..2aa257f7e6 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -29,11 +29,12 @@ class BuildRpmTestCase(support.TempdirManager, def setUp(self): super(BuildRpmTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv[:] + self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[:] + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] super(BuildRpmTestCase, self).tearDown() def test_quiet(self): diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 1221fd43af..f992928d0a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -32,7 +32,7 @@ def setUp(self): # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path[:] + self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) if sys.version > "2.6": @@ -87,7 +87,8 @@ def test_build_ext(self): def tearDown(self): # Get everything back to normal support.unload('xx') - sys.path = self.sys_path + sys.path = self.sys_path[0] + sys.path[:] = self.sys_path[1] if sys.version > "2.6": import site site.USER_BASE = self.old_user_base diff --git a/tests/test_config.py b/tests/test_config.py index 879689d2bb..71c63678f8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -55,7 +55,7 @@ def setUp(self): """Patches the environment.""" super(PyPIRCCommandTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.environ['HOME'] = self.tmp_dir + os.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() diff --git a/tests/test_core.py b/tests/test_core.py index b5f391f57a..b478fa6291 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -8,7 +8,7 @@ import test.support from test.support import captured_stdout import unittest - +from distutils.tests import support # setup script that uses __file__ setup_using___file__ = """\ @@ -29,17 +29,20 @@ """ -class CoreTestCase(unittest.TestCase): +class CoreTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): + super(CoreTestCase, self).setUp() self.old_stdout = sys.stdout self.cleanup_testfn() - self.old_argv = sys.argv[:] + self.old_argv = sys.argv, sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() - sys.argv = self.old_argv[:] + sys.argv = self.old_argv[0] + sys.argv[:] = self.old_argv[1] + super(CoreTestCase, self).tearDown() def cleanup_testfn(self): path = test.support.TESTFN diff --git a/tests/test_dist.py b/tests/test_dist.py index 70c9ec50e2..5f96b97f9e 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -37,15 +37,17 @@ def find_config_files(self): class DistributionTestCase(support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(DistributionTestCase, self).setUp() - self.argv = sys.argv[:] + self.argv = sys.argv, sys.argv[:] del sys.argv[1:] def tearDown(self): - sys.argv[:] = self.argv + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] super(DistributionTestCase, self).tearDown() def create_distribution(self, configfiles=()): @@ -159,6 +161,15 @@ def test_announce(self): class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): + def setUp(self): + super(MetadataTestCase, self).setUp() + self.argv = sys.argv, sys.argv[:] + + def tearDown(self): + sys.argv = self.argv[0] + sys.argv[:] = self.argv[1] + super(MetadataTestCase, self).tearDown() + def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} @@ -257,14 +268,14 @@ def test_custom_pydistutils(self): # linux-style if sys.platform in ('linux', 'darwin'): - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files) # win32-style if sys.platform == 'win32': # home drive should be found - self.environ['HOME'] = temp_dir + os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertTrue(user_filename in files, '%r not found in %r' % (user_filename, files)) @@ -280,15 +291,11 @@ def test_fix_help_options(self): def test_show_help(self): # smoke test, just makes sure some help is displayed dist = Distribution() - old_argv = sys.argv sys.argv = [] - try: - dist.help = 1 - dist.script_name = 'setup.py' - with captured_stdout() as s: - dist.parse_command_line() - finally: - sys.argv = old_argv + dist.help = 1 + dist.script_name = 'setup.py' + with captured_stdout() as s: + dist.parse_command_line() output = [line for line in s.getvalue().split('\n') if line.strip() != ''] diff --git a/tests/test_install.py b/tests/test_install.py index 2087a0eba0..76fa02acda 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -17,6 +17,7 @@ from distutils.tests import support class InstallTestCase(support.TempdirManager, + support.EnvironGuard, support.LoggingSilencer, unittest.TestCase): diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 7072136792..377ae86e2f 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -9,6 +9,7 @@ class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 2564563faf..5b32b13ee4 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -9,6 +9,7 @@ class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def test_simple_run(self): diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 793b95cad6..b2185b8442 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -10,9 +10,9 @@ class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): - def test_finalize_options(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index eb36204439..edc755ed15 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -17,8 +17,15 @@ def setUp(self): def tearDown(self): if self.makefile is not None: os.unlink(self.makefile) + self.cleanup_testfn() super(SysconfigTestCase, self).tearDown() + def cleanup_testfn(self): + if os.path.isfile(TESTFN): + os.remove(TESTFN) + elif os.path.isdir(TESTFN): + shutil.rmtree(TESTFN) + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assertTrue(os.path.isfile(config_h), config_h) @@ -51,8 +58,8 @@ def test_customize_compiler(self): if get_default_compiler() != 'unix': return - self.environ['AR'] = 'my_ar' - self.environ['ARFLAGS'] = '-arflags' + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' # make sure AR gets caught class compiler: diff --git a/tests/test_util.py b/tests/test_util.py index 795edb8cdc..35f81a6b37 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -94,7 +94,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -102,7 +102,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) - self.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -223,17 +223,18 @@ def _join(*path): def test_check_environ(self): util._environ_checked = 0 + if 'HOME' in os.environ: + del os.environ['HOME'] # posix without HOME if os.name == 'posix': # this test won't run on windows check_environ() import pwd - self.assertEquals(self.environ['HOME'], - pwd.getpwuid(os.getuid())[5]) + self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(self.environ['PLAT'], get_platform()) + self.assertEquals(os.environ['PLAT'], get_platform()) self.assertEquals(util._environ_checked, 1) def test_split_quoted(self): From 07f1a31c3eb453aab91646834087f3258254990f Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 18 Oct 2009 14:46:54 +0200 Subject: [PATCH 2673/8469] no_fake needs to be True by default fixes #74 --HG-- branch : distribute extra : rebase_source : 158f5abb9528d7ea6cd436996d5022cb6bcda89e --- CHANGES.txt | 1 + distribute_setup.py | 11 ++++++----- tests/test_distribute_setup.py | 12 ++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e6816cfea5..44c62fa3fb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.7 ----- +* Issue 74: no_fake should be True by default. ----- 0.6.6 diff --git a/distribute_setup.py b/distribute_setup.py index d99120102b..e7aafbb1e8 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -124,7 +124,7 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15, no_fake=False): + to_dir=os.curdir, download_delay=15, no_fake=True): # making sure we use the absolute path to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ @@ -134,7 +134,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, import pkg_resources if not hasattr(pkg_resources, '_distribute'): if not no_fake: - fake_setuptools() + _fake_setuptools() raise ImportError except ImportError: return _do_download(version, download_base, to_dir, download_delay) @@ -159,7 +159,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, return _do_download(version, download_base, to_dir, download_delay) finally: - _create_fake_setuptools_pkg_info(to_dir) + if not no_fake: + _create_fake_setuptools_pkg_info(to_dir) def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): @@ -319,7 +320,7 @@ def _patch_egg_dir(path): def _before_install(): log.warn('Before install bootstrap.') - fake_setuptools() + _fake_setuptools() def _under_prefix(location): @@ -340,7 +341,7 @@ def _under_prefix(location): return True -def fake_setuptools(): +def _fake_setuptools(): log.warn('Scanning installed packages') try: import pkg_resources diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 4c9079a79d..4151587fcc 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -57,5 +57,17 @@ def _faked(*args): distribute_setup.python_cmd = _faked _install(self.tarball) + def test_use_setuptools(self): + self.assertEquals(use_setuptools(), None) + + # make sure fake_setuptools is not called by default + import pkg_resources + del pkg_resources._distribute + def fake_setuptools(*args): + raise AssertionError + + pkg_resources._fake_setuptools = fake_setuptools + use_setuptools() + if __name__ == '__main__': unittest.main() From fe015037cc3ff5c0061bd2f427775ad665bda61c Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 18 Oct 2009 15:12:43 +0200 Subject: [PATCH 2674/8469] avoid a bootstrapping issue with easy_install -U. Fixes #72 --HG-- branch : distribute extra : rebase_source : 52cd3211f5233e5c08cc34c59838f0fb3b9955f1 --- CHANGES.txt | 1 + setup.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 44c62fa3fb..866ba7d8b1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ----- * Issue 74: no_fake should be True by default. +* Issue 72: avoid a bootstrapping issue with easy_install -U ----- 0.6.6 diff --git a/setup.py b/setup.py index aaa7f3e312..cdc28e6547 100755 --- a/setup.py +++ b/setup.py @@ -67,6 +67,12 @@ def build_package_data(self): self.copy_file(srcfile, exe_target) srcfile = os.path.abspath(srcfile) + + # avoid a bootstrapping issue with easy_install -U (when the + # previous version doesn't have convert_2to3_doctests) + if not hasattr(self.distribution, 'convert_2to3_doctests'): + return + if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) From 39be786e197fd135dac23a9102d257877985ebf0 Mon Sep 17 00:00:00 2001 From: Daniel Stutzbach Date: Sun, 18 Oct 2009 09:31:33 -0500 Subject: [PATCH 2675/8469] Added information to CHANGES --HG-- branch : distribute extra : rebase_source : 7e92252bb4c8f96e6262e068606c8e10c11c8589 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index e6816cfea5..3aed457b13 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,11 @@ CHANGES 0.6.7 ----- +* Issue 64: use_setuptools no longer rebuilds the distribute egg every + time it is run +* use_setuptools now properly respects the requested version +* use_setuptools will no longer try to import a distribute egg for the + wrong Python version ----- 0.6.6 From 0b33d63b2cf8fae5959e157a8798007bbc7049c4 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 18 Oct 2009 16:50:06 +0000 Subject: [PATCH 2676/8469] Bump to 2.6.4rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 83c576f802..4c8cf042fd 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.4rc1" +__version__ = "2.6.4rc2" #--end constants-- From e6e0e5add9321df50c5da9ee2f1650740024c8ed Mon Sep 17 00:00:00 2001 From: agronholm Date: Tue, 20 Oct 2009 01:37:01 +0300 Subject: [PATCH 2677/8469] Reversing patch for 64-bit Windows script launcher, applied PJE's simpler solution instead --HG-- branch : distribute extra : rebase_source : 320927dbc962a262853cae7d8b3734794bb9f21d --- launcher.c | 25 +++++++++--------------- setup.py | 30 ----------------------------- setuptools/cli-32.exe | Bin 65536 -> 0 bytes setuptools/cli-64.exe | Bin 74240 -> 0 bytes setuptools/cli.exe | Bin 0 -> 7168 bytes setuptools/command/easy_install.py | 5 ++--- setuptools/gui-32.exe | Bin 65536 -> 0 bytes setuptools/gui-64.exe | Bin 74240 -> 0 bytes setuptools/gui.exe | Bin 0 -> 7168 bytes 9 files changed, 11 insertions(+), 49 deletions(-) delete mode 100644 setuptools/cli-32.exe delete mode 100644 setuptools/cli-64.exe create mode 100644 setuptools/cli.exe delete mode 100644 setuptools/gui-32.exe delete mode 100644 setuptools/gui-64.exe create mode 100644 setuptools/gui.exe diff --git a/launcher.c b/launcher.c index 0dca2e168b..201219cc46 100755 --- a/launcher.c +++ b/launcher.c @@ -25,9 +25,8 @@ #include #include -#include +#include #include -#include "tchar.h" #include "windows.h" int fail(char *format, char *data) { @@ -82,17 +81,18 @@ char *quoted(char *data) { char *loadable_exe(char *exename) { - HINSTANCE hPython; /* DLL handle for python executable */ + /* HINSTANCE hPython; DLL handle for python executable */ char *result; - hPython = LoadLibraryEx(exename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - if (!hPython) return NULL; + /* hPython = LoadLibraryEx(exename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (!hPython) return NULL; */ /* Return the absolute filename for spawnv */ result = calloc(MAX_PATH, sizeof(char)); - if (result) GetModuleFileName(hPython, result, MAX_PATH); + strncpy(result, exename, MAX_PATH); + /*if (result) GetModuleFileName(hPython, result, MAX_PATH); - FreeLibrary(hPython); + FreeLibrary(hPython); */ return result; } @@ -237,18 +237,11 @@ int run(int argc, char **argv, int is_gui) { } /* We *do* need to wait for a CLI to finish, so use spawn */ - return _spawnv(_P_WAIT, ptr, (const char * const *)(newargs)); + return spawnv(P_WAIT, ptr, (const char * const *)(newargs)); } -/* + int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpCmd, int nShow) { return run(__argc, __argv, GUI); } -*/ - -int _tmain(int argc, _TCHAR* argv[]) -{ - return run(argc, argv, GUI); -} - diff --git a/setup.py b/setup.py index da59d365b5..8065235af4 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,6 @@ """Distutils setup file, used to install or test 'setuptools'""" import sys import os -import platform src_root = None if sys.version_info >= (3,): @@ -40,36 +39,8 @@ VERSION = "0.6.6" from setuptools import setup, find_packages -from setuptools.command.build_py import build_py as _build_py scripts = [] -# specific command that is used to generate windows .exe files -class build_py(_build_py): - def build_package_data(self): - """Copy data files into build directory""" - lastdir = None - is_64 = platform.architecture()[0] == '64bit' - - for package, src_dir, build_dir, filenames in self.data_files: - for filename in filenames: - target = os.path.join(build_dir, filename) - self.mkpath(os.path.dirname(target)) - srcfile = os.path.join(src_dir, filename) - outf, copied = self.copy_file(srcfile, target) - - # creating cli.exe and gui.exe - if filename in ('gui-32.exe', 'cli-32.exe') and not is_64: - exe_target = os.path.join(build_dir, filename.replace('-32.exe', '.exe')) - self.copy_file(srcfile, exe_target) - - if filename in ('gui-64.exe', 'cli-64.exe') and is_64: - exe_target = os.path.join(build_dir, filename.replace('-64.exe', '.exe')) - self.copy_file(srcfile, exe_target) - - srcfile = os.path.abspath(srcfile) - if copied and srcfile in self.distribution.convert_2to3_doctests: - self.__doctests_2to3.append(outf) - # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way def _easy_install_marker(): @@ -176,7 +147,6 @@ def _being_installed(): Topic :: System :: Systems Administration Topic :: Utilities""".splitlines() if f.strip()], scripts = scripts, - cmdclass = {'build_py': build_py} ) if _being_installed(): diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe deleted file mode 100644 index dd63bbfcd647ae38f6670df57937fcffacd2bd06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeFae|S{YwLg3&Gf5`NgfmD20RjXFiUt)Oq6w40#AHGcf)gVXMhRd=8mH7EoWqZ= z1QJii=43OK-r9TVt+Z0~UfbGR@4cef3T6l<;1A?SRTQhSrn=)$jU`Qjj5+UT?KAm- zw)eU3^ZxO^f4q5~oOAZxYwx}G+H0@9_S$Rjsl0QyWR)bzhJVA5q=R_VpGQ3Z=Lbjf zm}$QoBR!k)`t*aArLRxFqwc;9@7o*i{%+1aci(^i_mrG(-J7#fy+7x^`*X@} ztIqlE_txHfU3z+IZoKH9`#x_wcSG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5B>eH>d#bYvqaN!?Ku{OS+!)PZMos8+?M63R6Gud?rLg+&2E%F zTUoT>?%-VgURWE0lZ-~*rsk+Z5Ld$YNvTq^mnZF~j7pHVF>t=7loe!G6qQ*Sf5o;! zFIiQ#1$0t-T-9`i$Lju-p_&Fq*>QeNc=E(H&2)_4Vbn(_`yUeXdc zPL)M>8Ssbj{k_aY@$F^*eMj|ScF{ewf0s1_Q>{Kq(H;uxq1z0-!qBDP?&}vTSL>2I z!&arO!Mdoz;ViPKRpeKCdV6qHe;<0{nB)*Pr*rZvi-hHpqTQOlVp;l9u=|3N5;)zq z6)+4WUrqa!m8Rgfjn?}l>EB@UWjzUQg5zkk{BSKwhV=@G<$_-%J`orA_IXISz~6p< z>w(YP1IylX|NO_JpHBp>M*%|s zpN;qp11<}Klsyp;|Ji`Nrv%?q zgYPUGD$RRc0aci~F750LO$ zKa{)@cl2vzf^cApZ|Go{3U-@TV0p@{moVe(nJFD?e~+86Uc}J#i`89?F;a;>uVHz9YW}-$j2uPz!7aWY0Zj zx)tv6IIisFTXAKNZ++jb(DkQrWsk1K72IPz?r_{$xPt3+z30|O` z1&5fAI{|kb?iINE{@~VJxL(|exOJ!9$})&aeYW!cI_@^ygShwLK8-7r?qwf5Mh5a2DtQ+5rB`|Hwo(5^(Z@yQ$yRUrIX==uWklew4-+z!b6`A6WV!0W&nU>F^f z2rL6ifl!)xgyjKSfUf~h1IK|s0rAAU4#)&bfdB5lza;t)IpAjt{zB~@xXy(9|K|Sh H=z;$OkJaYk diff --git a/setuptools/cli-64.exe b/setuptools/cli-64.exe deleted file mode 100644 index cc7ced507f4bddb38dad3093514e3b58b469dbc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74240 zcmeFadw5jU^*=n5nIS`x;e^XT6p;Z24F)k9F9`!W2PS$(CK?OcXi;OMl!})K=Kxl~ z#51uOwo_?qTYIP0wpM$wts)o2gg`FbLD3*qf_T}(s07g@T+i>b_MS-s>i743-uHRl zzur7B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xPlq79`6V}{o73ljd79^Z~l z>6gP_`!4kySXVKF9QwHf*suJ+tz~@Z*7n4uXnQDM;)^R|E%=W79())5`9LkO9gscu znCVuy$K$xNmv6xVs#wbt-6aediJAu_e7LWnBfmy&*zy%}# z@jx8l0PKJUbo~iivcOrO184_K;52X&I0hU7_5%`sAMR7Y9^jk6gFqdy9oP!!Kq0Ua z$N&b}`{sa*@eJBgz#RAi2CV)P>7&P0$-(uy1U$vkjH{eukSMSs%Y5-0TYR#@pf zKD78FS=lQ?LH{8)EA6jK-$A<)(Z(lpJXC@3XQAs0$WP{CGH^Q}^XDIdp8~G~XMkaJ zOd_xhCZn8C;|Sv|NfHbL*#&;E%*zyd*C_~^8cIr IzoQ5K59B51SpWb4 diff --git a/setuptools/gui-64.exe b/setuptools/gui-64.exe deleted file mode 100644 index 7fbfb88973f21f7e2314e0634bd006b4cc39689f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74240 zcmeFadwf*Y)jvFwnIS`x;e^XT5Rm}}1)~^E)r0|=0~0+X6UBlW6*V?W@gBoDfE6+E zOl&6GskGXvtxrp>ZMC+2dXuYSLLdqEiy}d+1hKk@Q3;|+xSrp4?LCtO)aUnn-uLr) z|9bO*Is5GE+H0@9*4k^Yy-(?_OKlFD&E~{^%d**4;z@r&@%umja3l{HwR(WaGWU6?Z-K(8Id#2lx1@jE8*pKI98sKg;*v!*|~^(c{VT zr>f3Ao%N&Ze{=VQ^#6IcjG7P;@Apg?gy)w#zML=v&l|S3Pq<$^k4z{L&rc_e70<6H zT!-iP@2!|eb$l1ZGfQl?yPtB}27dVaa5_(iZLBRjqrc7eE@JLW#g4->SA>IhdQdpS zW^>UG{?bodB~l4#_yhi`(}hxH5i2W6KPX=+hJv>7xpv!l5la1(+ihC_%Kz)X4x4SM z1od01nyBBiNJmP?JNO}hsPCzMASC{LHe30`s=M#f@3Ps}6OgFWb|L<^;eVgMAjo8* z%x3%eawPbGlc9KK2+Z~5M81ZJl`^B~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R+L*#|H1&+VW&I@}9s=&AfF1P}IBFsYI3p|3)X5fvp zZJOK++*D}Ob2IR!BD?M13|v`E*@?Rfcupzl;?4rj=Mnq`K4#nkzvY>azrf#Jh0GLp zGw=hR)wmxkQ|dFGHMqY77M0ueRSf*>M;xpaf8hA5Op9g_>{OrDQ$X8{lJ2p=8-zEov+5?ETzJb*r=4EPz3@YR>VA6-MerY%e2?c1+-W~k zs`m}h1a|^(7LW7;0zWqXZNLRLLMy^71YUfT?JfXrG48UTV~Y4z^xFwD4w!H!G^D>3 zxQ0jK3cTf4c0arZ*mRfez7@FYZrT;$1-{E8btLebd+d7j10TK@z9P&cz;+&?Ros1? z+x<2CiT`R~Gmpd-*yA_0+X>vvBm5xn-3P#l@B;fjXs43|e3Iv7{MQP62>Rd_IO!46 z!JQ9m=aK$L{T5pCsNUcMOn=nQOW<2P3HYnu!7u-Xd;_<@DxNyr)xiCa!{@kjpP(Oj z(oTOi@L6$#=X&6hr)~cgz*E-RJb4=M%5}6s;@$_`%d-zRHcr&QXKcP21YGqjV-x-Y zZ(mQnNO<5a&(XKS&$j|=Hqs~H_5%;|2tTMzN+oZ$-6_EB+i2s25qS1?yDj7b@8S_W z<*vXXEy#HY;|AXND(xEg&A=P~z!)lS;L<&$g}VWm`i{*HgMfFwha3Mjz>K|&5lk!v z?&6X5*aH03KH50`Yk+%sB;PjRIe(&EP%l|PIrnh~;RVXMhFb|Eu*tXu{?51szG>WY z4nfWmNO*yw>o0DBqJuAPf#(^wz$=Zr6u88=MF(AU$0fW#(E}H^K+*9Q+yshVw)hJa tU0v}Pc#?4o6n$Fp7bv>25?i>}^!#7>{eP^m`a=K! diff --git a/setuptools/gui.exe b/setuptools/gui.exe new file mode 100644 index 0000000000000000000000000000000000000000..474838d5220133fc3bd4898bce43e12ffd0be09f GIT binary patch literal 7168 zcmeHMeQ;FO6~DWAfh8pDRsxDeSTI;7y}|MyO@xUb|NxPrceut^~GI>j4)xr)a~!Q_ckBu z*ngak9lgVO=bn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UMpU_RifbBUdyXm#U8P?+DgCfk^n4rzso0x&f1M4?`yQqcUD*X7FuuF zzR>D-J!mv4DVU+hCxTh@ZJD#%f``hV|xwY?*TjxXanpAP3h*9a5MbPd-?jnM z0kZ%<1S|sB0P6wefbD=)_93$|hmUtwv-_CC?{)5S*RvlphhqmX)Hz*lr*DU!tpM$HI2<6b zb&5wRSXrl0yu04z^SBw?pwTt-KQD|`f%5Z$!|C-pghnqo5_35He%>drC*Tv`;1U?i zGB{kG?N|kaqt5vd?{x}0*`o%B$E}KAFpvq&-VyY@wJt$bVe5@f{J#cS*letF)?#Zj z_K>m0>vOq<8uqx+^FpzwuFmPME^)c}%e3iN4fVxwU&5$h__jA;%xG+ zao2d3v-gdgd7;d`Q`M-pH&pRn!R2woj==latPK4e!{h>Ag*fJRLpR3)$BRV{Ole?XQBh_D$>UC3oJTc|w){-`jrxhKjdU literal 0 HcmV?d00001 From a858356a4e28396a0828573d9a5074da67f6dc62 Mon Sep 17 00:00:00 2001 From: agronholm Date: Tue, 20 Oct 2009 02:55:01 +0300 Subject: [PATCH 2678/8469] Readded the custom build_py command for safely upgrading from older distribute versions --HG-- branch : distribute extra : rebase_source : 74f1706957dbe79303581f21947d17b06b74ef61 --- setup.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/setup.py b/setup.py index e57cf5cf34..07cfcd5ed9 100755 --- a/setup.py +++ b/setup.py @@ -39,8 +39,30 @@ VERSION = "0.6.7" from setuptools import setup, find_packages +from setuptools.command.build_py import build_py as _build_py scripts = [] +# specific command that is used to generate windows .exe files +class build_py(_build_py): + def build_package_data(self): + """Copy data files into build directory""" + lastdir = None + for package, src_dir, build_dir, filenames in self.data_files: + for filename in filenames: + target = os.path.join(build_dir, filename) + self.mkpath(os.path.dirname(target)) + srcfile = os.path.join(src_dir, filename) + outf, copied = self.copy_file(srcfile, target) + srcfile = os.path.abspath(srcfile) + + # avoid a bootstrapping issue with easy_install -U (when the + # previous version doesn't have convert_2to3_doctests) + if not hasattr(self.distribution, 'convert_2to3_doctests'): + continue + + if copied and srcfile in self.distribution.convert_2to3_doctests: + self.__doctests_2to3.append(outf) + # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way def _easy_install_marker(): From 43d34734c801d2d9a72d5fa6e7fc74d80bdc11c1 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 01:11:48 +0200 Subject: [PATCH 2679/8469] Removed virtual-python.py from this distribution and updated documentation to point to the actively maintained virtualenv instead. --HG-- branch : distribute extra : rebase_source : accfddb40177f981dbf0e5886039fcb27c1be573 --- CHANGES.txt | 2 + docs/easy_install.txt | 32 ++--------- virtual-python.py | 123 ------------------------------------------ 3 files changed, 6 insertions(+), 151 deletions(-) delete mode 100755 virtual-python.py diff --git a/CHANGES.txt b/CHANGES.txt index 3aceb5ac5d..445934eea8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.7 ----- +* Removed virtual-python.py from this distribution and updated documentation + to point to the actively maintained virtualenv instead. * Issue 64: use_setuptools no longer rebuilds the distribute egg every time it is run * use_setuptools now properly respects the requested version diff --git a/docs/easy_install.txt b/docs/easy_install.txt index b821e5ca45..5fa8354240 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -1073,34 +1073,10 @@ system, but don't have root access, you can create your own "virtual" Python installation, which uses its own library directories and some symlinks to the site-wide Python. -In the simplest case, your virtual Python installation will live under the -``~/lib/python2.x``, ``~/include/python2.x``, and ``~/bin`` directories. Just -download `virtual-python.py`_ and run it using the site-wide Python. If you -want to customize the location, you can use the ``--prefix`` option to specify -an installation base directory in place of ``~``. (Use ``--help`` to get the -complete list of options.) - -.. _virtual-python.py: http://peak.telecommunity.com/dist/virtual-python.py - -When you're done, you'll have a ``~/bin/python`` executable that's linked to -the local Python installation and inherits all its current libraries, but which -allows you to add as many new libraries as you want. Simply use this new -Python in place of your system-defined one, and you can modify it as you like -without breaking anything that relies on the system Python. You'll also still -need to follow the standard `installation instructions`_ to install setuptools -and EasyInstall, using your new ``~/bin/python`` executable in place of the -system Python. - -Note that if you were previously setting a ``PYTHONPATH`` and/or had other -special configuration options in your ``~/.pydistutils.cfg``, you may need to -remove these settings *before* running ``virtual-python.py``. This is because -your new Python executable will not need *any* custom configuration for the -distutils or EasyInstall; everything will go to the correct ``~/lib`` and -``~/bin`` directories automatically. - -You should, however, also make sure that the ``bin`` subdirectory of your -installation prefix (e.g. ``~/bin``) is on your ``PATH``, because that is where -EasyInstall and the distutils will install new Python scripts. +Please refer to the `virtualenv`_ documentation for creating such an +environment. + +.. _virtualenv: http://pypi.python.org/pypi/virtualenv "Traditional" ``PYTHONPATH``-based Installation diff --git a/virtual-python.py b/virtual-python.py deleted file mode 100755 index 73ef41224c..0000000000 --- a/virtual-python.py +++ /dev/null @@ -1,123 +0,0 @@ -"""Create a "virtual" Python installation - -Based on a script created by Ian Bicking.""" - -import sys, os, optparse, shutil -join = os.path.join -py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1]) - -def mkdir(path): - if not os.path.exists(path): - print 'Creating %s' % path - os.makedirs(path) - else: - if verbose: - print 'Directory %s already exists' - -def symlink(src, dest): - if not os.path.exists(dest): - if verbose: - print 'Creating symlink %s' % dest - os.symlink(src, dest) - else: - print 'Symlink %s already exists' % dest - - -def rmtree(dir): - if os.path.exists(dir): - print 'Deleting tree %s' % dir - shutil.rmtree(dir) - else: - if verbose: - print 'Do not need to delete %s; already gone' % dir - -def make_exe(fn): - if os.name == 'posix': - oldmode = os.stat(fn).st_mode & 07777 - newmode = (oldmode | 0555) & 07777 - os.chmod(fn, newmode) - if verbose: - print 'Changed mode of %s to %s' % (fn, oct(newmode)) - -def main(): - if os.name != 'posix': - print "This script only works on Unix-like platforms, sorry." - return - - parser = optparse.OptionParser() - - parser.add_option('-v', '--verbose', action='count', dest='verbose', - default=0, help="Increase verbosity") - - parser.add_option('--prefix', dest="prefix", default='~', - help="The base directory to install to (default ~)") - - parser.add_option('--clear', dest='clear', action='store_true', - help="Clear out the non-root install and start from scratch") - - parser.add_option('--no-site-packages', dest='no_site_packages', - action='store_true', - help="Don't copy the contents of the global site-packages dir to the " - "non-root site-packages") - - options, args = parser.parse_args() - global verbose - - home_dir = os.path.expanduser(options.prefix) - lib_dir = join(home_dir, 'lib', py_version) - inc_dir = join(home_dir, 'include', py_version) - bin_dir = join(home_dir, 'bin') - - if sys.executable.startswith(bin_dir): - print 'Please use the *system* python to run this script' - return - - verbose = options.verbose - assert not args, "No arguments allowed" - - if options.clear: - rmtree(lib_dir) - rmtree(inc_dir) - print 'Not deleting', bin_dir - - prefix = sys.prefix - mkdir(lib_dir) - stdlib_dir = join(prefix, 'lib', py_version) - for fn in os.listdir(stdlib_dir): - if fn != 'site-packages': - symlink(join(stdlib_dir, fn), join(lib_dir, fn)) - - mkdir(join(lib_dir, 'site-packages')) - if not options.no_site_packages: - for fn in os.listdir(join(stdlib_dir, 'site-packages')): - symlink(join(stdlib_dir, 'site-packages', fn), - join(lib_dir, 'site-packages', fn)) - - mkdir(inc_dir) - stdinc_dir = join(prefix, 'include', py_version) - for fn in os.listdir(stdinc_dir): - symlink(join(stdinc_dir, fn), join(inc_dir, fn)) - - if sys.exec_prefix != sys.prefix: - exec_dir = join(sys.exec_prefix, 'lib', py_version) - for fn in os.listdir(exec_dir): - symlink(join(exec_dir, fn), join(lib_dir, fn)) - - mkdir(bin_dir) - print 'Copying %s to %s' % (sys.executable, bin_dir) - py_executable = join(bin_dir, 'python') - if sys.executable != py_executable: - shutil.copyfile(sys.executable, py_executable) - make_exe(py_executable) - - pydistutils = os.path.expanduser('~/.pydistutils.cfg') - if os.path.exists(pydistutils): - print 'Please make sure you remove any previous custom paths from' - print "your", pydistutils, "file." - - print "You're now ready to download distribute_setup.py, and run" - print py_executable, "distribute_setup.py" - -if __name__ == '__main__': - main() - From 9b02ba04ef7690724330d3d8ff35cd38284d3b07 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 01:24:05 +0200 Subject: [PATCH 2680/8469] Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a httplib.HTTPException instead of just InvalidURL and BadStatusLine. --HG-- branch : distribute extra : rebase_source : 24986ae1074b564fbd8c34a227265afd3b90ebce --- CHANGES.txt | 2 ++ setuptools/package_index.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 445934eea8..7ef29cbe9a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.7 ----- +* Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a + httplib.HTTPException instead of just InvalidURL and BadStatusLine. * Removed virtual-python.py from this distribution and updated documentation to point to the actively maintained virtualenv instead. * Issue 64: use_setuptools no longer rebuilds the distribute egg every diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 98799de535..ee980214cf 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -602,6 +602,12 @@ def open_url(self, url, warning=None): raise DistutilsError('%s returned a bad status line. ' 'The server might be down, %s' % \ (url, v.line)) + except httplib.HTTPException, v: + if warning: + self.warn(warning, v) + else: + raise DistutilsError("Download error for %s: %s" + % (url, v)) def _download_url(self, scheme, url, tmpdir): # Determine download filename From b58dc072b50e4a7c8115b45e637393a321f0cc8c Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 01:39:50 +0200 Subject: [PATCH 2681/8469] Updated and fixed contributers --HG-- branch : distribute extra : rebase_source : 18217e823ba7b14c0b17f09575a8cd642bc8856c --- CONTRIBUTORS.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 5dcc3675e2..cf46bb95a1 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -3,11 +3,13 @@ Contributors ============ * Alex Grönholm +* Daniel Stutzbach * Hanno Schlichting * Jannis Leidel * Lennart Regebro -* Martin von Loewis -* Philip Envey +* Martin von Löwis +* Philip Jenvey +* Reinout van Rees * Tarek Ziadé If you think you name is missing, please add it (alpha order by first name) From 8a6435e3be9e93d3f3e2b2bb98b9c4051c2a0262 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 01:51:35 +0200 Subject: [PATCH 2682/8469] Removed outdated note about the special setup module for Python 3. --HG-- branch : distribute extra : rebase_source : 2c8190effa006ad4d7929abd756d5303c84be166 --- README.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.txt b/README.txt index fbdf32798d..09c547b405 100755 --- a/README.txt +++ b/README.txt @@ -86,12 +86,6 @@ If your shell has the ``curl`` program you can do:: $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py -If you are under Python 3, use -`distribute_setup_3k.py `_:: - - $ curl -O http://python-distribute.org/distribute_setup_3k.py - $ python distribute_setup_3k.py - Notice this file is also provided in the source release. easy_install or pip From 2ddbb439c45e3ea3a7103cd6cfd6308a07158078 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 01:56:08 +0200 Subject: [PATCH 2683/8469] Whitespace and added a note how to run the tests --HG-- branch : distribute extra : rebase_source : ce8146ff9d4e46e3e3b5e3a49e79debe7d260fab --- DEVGUIDE.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index a7968ce88d..54b7f71c4d 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -2,17 +2,16 @@ Quick notes for contributors ============================ -Distribute is using Mercurial. +Distribute is using Mercurial. Grab the code at bitbucket:: - $ hg clone https://tarek@bitbucket.org/tarek/distribute distribute - + If you want to work in the 0.6 branch, you have to switch to it:: $ hg update 0.6-maintenance - + $ hg branch 0.6-maintenance @@ -24,4 +23,6 @@ If you make some changes, don't forget to: And remember that 0.6 is only bug fixes, and the APIs should be fully backward compatible with Setuptools. +You can run the tests via:: + $ python setup.py test From 064e10630f9b8c7df65f62a2f2d0d48d63f0f825 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Sat, 24 Oct 2009 02:13:56 +0200 Subject: [PATCH 2684/8469] Reviewed unladen-swallow specific change from http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719 and determined that it no longer applies. Distribute should work fine with Unladen Swallow 2009Q3. --HG-- branch : distribute extra : rebase_source : 74d09eb0390667122b445860aea8ecc25a0d85d7 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7ef29cbe9a..a0276a328d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,10 @@ CHANGES 0.6.7 ----- +* Reviewed unladen-swallow specific change from + http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719 + and determined that it no longer applies. Distribute should work fine with + Unladen Swallow 2009Q3. * Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a httplib.HTTPException instead of just InvalidURL and BadStatusLine. * Removed virtual-python.py from this distribution and updated documentation From cef81109d0ce7c62311b88479f37f02a73f3e917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 13:29:44 +0000 Subject: [PATCH 2685/8469] #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd --- archive_util.py | 10 ++++++---- tests/test_archive_util.py | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/archive_util.py b/archive_util.py index bc5edfd864..c741cc0174 100644 --- a/archive_util.py +++ b/archive_util.py @@ -233,9 +233,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, kwargs['owner'] = owner kwargs['group'] = group - filename = func(base_name, base_dir, **kwargs) - if root_dir is not None: - log.debug("changing back to '%s'", save_cwd) - os.chdir(save_cwd) + try: + filename = func(base_name, base_dir, **kwargs) + finally: + if root_dir is not None: + log.debug("changing back to '%s'", save_cwd) + os.chdir(save_cwd) return filename diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index b91986ba95..a9b46d8e22 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -8,7 +8,8 @@ import warnings from distutils.archive_util import (check_archive_formats, make_tarball, - make_zipfile, make_archive) + make_zipfile, make_archive, + ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support from test.test_support import check_warnings @@ -262,6 +263,20 @@ def test_tarfile_root_owner(self): finally: archive.close() + def test_make_archive_cwd(self): + current_dir = os.getcwd() + def _breaks(*args, **kw): + raise RuntimeError() + ARCHIVE_FORMATS['xxx'] = (_breaks, [], 'xxx file') + try: + try: + make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) + except: + pass + self.assertEquals(os.getcwd(), current_dir) + finally: + del ARCHIVE_FORMATS['xxx'] + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) From 0d4e4028bd9f2f05037cda612970b0ed16870e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 13:38:27 +0000 Subject: [PATCH 2686/8469] Merged revisions 75659 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75659 | tarek.ziade | 2009-10-24 15:29:44 +0200 (Sat, 24 Oct 2009) | 1 line #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd ........ --- archive_util.py | 11 ++++++----- tests/test_archive_util.py | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/archive_util.py b/archive_util.py index d051f917bb..28e93fed78 100644 --- a/archive_util.py +++ b/archive_util.py @@ -232,10 +232,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, kwargs['owner'] = owner kwargs['group'] = group - filename = func(base_name, base_dir, **kwargs) - - if root_dir is not None: - log.debug("changing back to '%s'", save_cwd) - os.chdir(save_cwd) + try: + filename = func(base_name, base_dir, **kwargs) + finally: + if root_dir is not None: + log.debug("changing back to '%s'", save_cwd) + os.chdir(save_cwd) return filename diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 71d32dce19..682f19a2b3 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -8,7 +8,8 @@ import warnings from distutils.archive_util import (check_archive_formats, make_tarball, - make_zipfile, make_archive) + make_zipfile, make_archive, + ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support from test.support import check_warnings @@ -262,6 +263,20 @@ def test_tarfile_root_owner(self): finally: archive.close() + def test_make_archive_cwd(self): + current_dir = os.getcwd() + def _breaks(*args, **kw): + raise RuntimeError() + ARCHIVE_FORMATS['xxx'] = (_breaks, [], 'xxx file') + try: + try: + make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) + except: + pass + self.assertEquals(os.getcwd(), current_dir) + finally: + del ARCHIVE_FORMATS['xxx'] + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) From 57a2a657c29720facb1cd04f28751608323f9c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 13:42:10 +0000 Subject: [PATCH 2687/8469] Merged revisions 75662 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75662 | tarek.ziade | 2009-10-24 15:38:27 +0200 (Sat, 24 Oct 2009) | 9 lines Merged revisions 75659 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75659 | tarek.ziade | 2009-10-24 15:29:44 +0200 (Sat, 24 Oct 2009) | 1 line #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd ........ ................ --- archive_util.py | 11 ++++++----- tests/test_archive_util.py | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/archive_util.py b/archive_util.py index a568854e4e..16164c7f1f 100644 --- a/archive_util.py +++ b/archive_util.py @@ -171,10 +171,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, func = format_info[0] for arg, val in format_info[1]: kwargs[arg] = val - filename = func(base_name, base_dir, **kwargs) - - if root_dir is not None: - log.debug("changing back to '%s'", save_cwd) - os.chdir(save_cwd) + try: + filename = func(base_name, base_dir, **kwargs) + finally: + if root_dir is not None: + log.debug("changing back to '%s'", save_cwd) + os.chdir(save_cwd) return filename diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index d88e0b350d..c6e08cbc2b 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -8,7 +8,8 @@ import warnings from distutils.archive_util import (check_archive_formats, make_tarball, - make_zipfile, make_archive) + make_zipfile, make_archive, + ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support from test.support import check_warnings @@ -192,6 +193,20 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') + def test_make_archive_cwd(self): + current_dir = os.getcwd() + def _breaks(*args, **kw): + raise RuntimeError() + ARCHIVE_FORMATS['xxx'] = (_breaks, [], 'xxx file') + try: + try: + make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) + except: + pass + self.assertEquals(os.getcwd(), current_dir) + finally: + del ARCHIVE_FORMATS['xxx'] + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) From 9e0e2af955949e3f06652856f6812ab291e47b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 15:10:37 +0000 Subject: [PATCH 2688/8469] Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode --- command/build_py.py | 5 +++++ command/install_lib.py | 6 ++++++ errors.py | 2 ++ tests/test_build_py.py | 16 ++++++++++++++++ tests/test_install_lib.py | 17 +++++++++++++++++ tests/test_util.py | 18 +++++++++++++----- util.py | 5 +++++ 7 files changed, 64 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 5d249f3ddc..9b9f551830 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import os +import sys from glob import glob from distutils.core import Command @@ -372,6 +373,10 @@ def build_packages(self): self.build_module(module, module_file, package) def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compile not supported on this platform, skipping.') + return + from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: diff --git a/command/install_lib.py b/command/install_lib.py index 411db79cc2..7b4b45be79 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,6 +6,8 @@ __revision__ = "$Id$" import os +import sys + from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -118,6 +120,10 @@ def install(self): return outfiles def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compile not supported on this platform, skipping.') + return + from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, diff --git a/errors.py b/errors.py index 963d83377c..acecacccb5 100644 --- a/errors.py +++ b/errors.py @@ -74,6 +74,8 @@ class DistutilsInternalError (DistutilsError): class DistutilsTemplateError (DistutilsError): """Syntax error in a file list template.""" +class DistutilsByteCompileError(DistutilsError): + """Byte compile error.""" # Exception classes used by the CCompiler implementation classes class CCompilerError (Exception): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index c815d8185e..e8c7ca921c 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -89,6 +89,22 @@ def test_empty_package_dir (self): os.chdir(cwd) sys.stdout = sys.__stdout__ + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = build_py(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compile not supported ' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index b2185b8442..fab66d15ae 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -31,6 +31,8 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) + @unittest.skipUnless(not sys.dont_write_bytecode, + 'byte-compile not supported') def test_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) @@ -76,6 +78,21 @@ def test_get_inputs(self): # get_input should return 2 elements self.assertEquals(len(cmd.get_inputs()), 2) + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compile not supported ' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(InstallLibTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 4099c950ad..4da1e651ed 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,7 +1,4 @@ """Tests for distutils.util.""" -# not covered yet: -# - byte_compile -# import os import sys import unittest @@ -9,11 +6,12 @@ from StringIO import StringIO import subprocess -from distutils.errors import DistutilsPlatformError +from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, rfc822_escape, get_compiler_versions, - _find_exe_version, _MAC_OS_X_LD_VERSION) + _find_exe_version, _MAC_OS_X_LD_VERSION, + byte_compile) from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig @@ -349,6 +347,16 @@ def test_get_compiler_versions(self): res = get_compiler_versions() self.assertEquals(res[2], None) + def test_dont_write_bytecode(self): + # makes sure byte_compile raise a DistutilsError + # if sys.dont_write_bytecode is True + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + self.assertRaises(DistutilsByteCompileError, byte_compile, []) + finally: + sys.dont_write_bytecode = False + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index fe6851cb87..a87ef44a27 100644 --- a/util.py +++ b/util.py @@ -13,6 +13,7 @@ from distutils.spawn import spawn, find_executable from distutils import log from distutils.version import LooseVersion +from distutils.errors import DistutilsByteCompileError def get_platform(): """Return a string that identifies the current platform. @@ -445,6 +446,10 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, generated in indirect mode; unless you know what you're doing, leave it set to None. """ + # nothing is done if sys.dont_write_bytecode is True + if sys.dont_write_bytecode: + raise DistutilsByteCompileError('byte-compiling not supported.') + # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is From 32bc943918b21381298fc43df3f6d40b252a6937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 15:19:03 +0000 Subject: [PATCH 2689/8469] fixed finally state in distutils.test_util --- tests/test_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 4da1e651ed..55ef160f37 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -355,7 +355,7 @@ def test_dont_write_bytecode(self): try: self.assertRaises(DistutilsByteCompileError, byte_compile, []) finally: - sys.dont_write_bytecode = False + sys.dont_write_bytecode = old_dont_write_bytecode def test_suite(): return unittest.makeSuite(UtilTestCase) From ecff8b73e4ab2da659b208b66c3d72a104ba7d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 24 Oct 2009 15:51:30 +0000 Subject: [PATCH 2690/8469] fixed warning and error message --- command/build_py.py | 2 +- command/install_lib.py | 2 +- tests/test_build_py.py | 2 +- tests/test_install_lib.py | 2 +- util.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 9b9f551830..5c7b473b04 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -374,7 +374,7 @@ def build_packages(self): def byte_compile(self, files): if sys.dont_write_bytecode: - self.warn('byte-compile not supported on this platform, skipping.') + self.warn('byte-compiling is disabled, skipping.') return from distutils.util import byte_compile diff --git a/command/install_lib.py b/command/install_lib.py index 7b4b45be79..043e8b6e27 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -121,7 +121,7 @@ def install(self): def byte_compile(self, files): if sys.dont_write_bytecode: - self.warn('byte-compile not supported on this platform, skipping.') + self.warn('byte-compiling is disabled, skipping.') return from distutils.util import byte_compile diff --git a/tests/test_build_py.py b/tests/test_build_py.py index e8c7ca921c..bfe6154273 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -103,7 +103,7 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compile not supported ' in self.logs[0][1]) + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index fab66d15ae..99a6d90627 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -92,7 +92,7 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compile not supported ' in self.logs[0][1]) + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(InstallLibTestCase) diff --git a/util.py b/util.py index a87ef44a27..6bff44f786 100644 --- a/util.py +++ b/util.py @@ -448,7 +448,7 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, """ # nothing is done if sys.dont_write_bytecode is True if sys.dont_write_bytecode: - raise DistutilsByteCompileError('byte-compiling not supported.') + raise DistutilsByteCompileError('byte-compiling is disabled.') # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative From 283c3eac2d9e113f876c649e5ddb1dcbf9a6e096 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 24 Oct 2009 20:11:21 +0000 Subject: [PATCH 2691/8469] Remove AtheOS support, as per PEP 11 (which claims that all code was removed in Python 3.0). --- command/build_ext.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 14c529ac5b..70dd81f10d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -262,9 +262,9 @@ def finalize_options(self): if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) - # for extensions under Cygwin and AtheOS Python's library directory must be + # for extensions under Cygwin Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.platform[:6] == 'cygwin': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -776,22 +776,6 @@ def get_libraries(self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] - elif sys.platform[:6] == "atheos": - from distutils import sysconfig - - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - # Get SHLIBS from Makefile - extra = [] - for lib in sysconfig.get_config_var('SHLIBS').split(): - if lib.startswith('-l'): - extra.append(lib[2:]) - else: - extra.append(lib) - # don't extend ext.libraries, it may be shared with other - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib, "m"] + extra elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries From 389e4ff03d3ae338adf08fc8dc35693b07b332e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Oct 2009 23:08:47 +0000 Subject: [PATCH 2692/8469] Merged revisions 75669-75671 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75669 | tarek.ziade | 2009-10-24 17:10:37 +0200 (Sat, 24 Oct 2009) | 1 line Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode ........ r75670 | tarek.ziade | 2009-10-24 17:19:03 +0200 (Sat, 24 Oct 2009) | 1 line fixed finally state in distutils.test_util ........ r75671 | tarek.ziade | 2009-10-24 17:51:30 +0200 (Sat, 24 Oct 2009) | 1 line fixed warning and error message ........ --- command/build_py.py | 5 +++++ command/install_lib.py | 6 ++++++ errors.py | 2 ++ tests/test_build_py.py | 16 ++++++++++++++++ tests/test_install_lib.py | 17 +++++++++++++++++ tests/test_util.py | 18 +++++++++++++----- util.py | 5 +++++ 7 files changed, 64 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 4cc80f7b4a..fa08579652 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import os +import sys from glob import glob from distutils.core import Command @@ -369,6 +370,10 @@ def build_packages(self): self.build_module(module, module_file, package) def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: diff --git a/command/install_lib.py b/command/install_lib.py index 85fb3acd4e..6022d30f27 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,6 +6,8 @@ __revision__ = "$Id$" import os +import sys + from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -115,6 +117,10 @@ def install(self): return outfiles def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, diff --git a/errors.py b/errors.py index 963d83377c..acecacccb5 100644 --- a/errors.py +++ b/errors.py @@ -74,6 +74,8 @@ class DistutilsInternalError (DistutilsError): class DistutilsTemplateError (DistutilsError): """Syntax error in a file list template.""" +class DistutilsByteCompileError(DistutilsError): + """Byte compile error.""" # Exception classes used by the CCompiler implementation classes class CCompilerError (Exception): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 8ad3bbc452..582f24634a 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -89,6 +89,22 @@ def test_empty_package_dir (self): os.chdir(cwd) sys.stdout = sys.__stdout__ + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = build_py(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index b2185b8442..99a6d90627 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -31,6 +31,8 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) + @unittest.skipUnless(not sys.dont_write_bytecode, + 'byte-compile not supported') def test_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) @@ -76,6 +78,21 @@ def test_get_inputs(self): # get_input should return 2 elements self.assertEquals(len(cmd.get_inputs()), 2) + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(InstallLibTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 8068726df1..a2f8ed2b59 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,7 +1,4 @@ """Tests for distutils.util.""" -# not covered yet: -# - byte_compile -# import os import sys import unittest @@ -9,11 +6,12 @@ from io import BytesIO import subprocess -from distutils.errors import DistutilsPlatformError +from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, rfc822_escape, get_compiler_versions, - _find_exe_version, _MAC_OS_X_LD_VERSION) + _find_exe_version, _MAC_OS_X_LD_VERSION, + byte_compile) from distutils import util from distutils.sysconfig import get_config_vars from distutils import sysconfig @@ -349,6 +347,16 @@ def test_get_compiler_versions(self): res = get_compiler_versions() self.assertEquals(res[2], None) + def test_dont_write_bytecode(self): + # makes sure byte_compile raise a DistutilsError + # if sys.dont_write_bytecode is True + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + self.assertRaises(DistutilsByteCompileError, byte_compile, []) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index 6709bbfe42..a50621e3f4 100644 --- a/util.py +++ b/util.py @@ -13,6 +13,7 @@ from distutils.spawn import spawn, find_executable from distutils import log from distutils.version import LooseVersion +from distutils.errors import DistutilsByteCompileError def get_platform(): """Return a string that identifies the current platform. @@ -444,6 +445,10 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, generated in indirect mode; unless you know what you're doing, leave it set to None. """ + # nothing is done if sys.dont_write_bytecode is True + if sys.dont_write_bytecode: + raise DistutilsByteCompileError('byte-compiling is disabled.') + # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative # approach: choose direct mode *only* if the current interpreter is From 4d70c7aa04be70bf8fdf486d70c3c383271d7a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Oct 2009 23:16:51 +0000 Subject: [PATCH 2693/8469] Merged revisions 75704 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75704 | tarek.ziade | 2009-10-26 00:08:47 +0100 (Mon, 26 Oct 2009) | 17 lines Merged revisions 75669-75671 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75669 | tarek.ziade | 2009-10-24 17:10:37 +0200 (Sat, 24 Oct 2009) | 1 line Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode ........ r75670 | tarek.ziade | 2009-10-24 17:19:03 +0200 (Sat, 24 Oct 2009) | 1 line fixed finally state in distutils.test_util ........ r75671 | tarek.ziade | 2009-10-24 17:51:30 +0200 (Sat, 24 Oct 2009) | 1 line fixed warning and error message ........ ................ --- command/build_py.py | 5 +++++ command/install_lib.py | 6 ++++++ errors.py | 2 ++ tests/test_build_py.py | 16 ++++++++++++++++ tests/test_install_lib.py | 17 +++++++++++++++++ tests/test_util.py | 17 ++++++++++++----- util.py | 4 ++++ 7 files changed, 62 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 99d85be96c..26002e4b3f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import sys, os +import sys from glob import glob from distutils.core import Command @@ -369,6 +370,10 @@ def build_packages(self): self.build_module(module, module_file, package) def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: diff --git a/command/install_lib.py b/command/install_lib.py index 85fb3acd4e..6022d30f27 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -6,6 +6,8 @@ __revision__ = "$Id$" import os +import sys + from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -115,6 +117,10 @@ def install(self): return outfiles def byte_compile(self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, diff --git a/errors.py b/errors.py index 963d83377c..acecacccb5 100644 --- a/errors.py +++ b/errors.py @@ -74,6 +74,8 @@ class DistutilsInternalError (DistutilsError): class DistutilsTemplateError (DistutilsError): """Syntax error in a file list template.""" +class DistutilsByteCompileError(DistutilsError): + """Byte compile error.""" # Exception classes used by the CCompiler implementation classes class CCompilerError (Exception): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 8ad3bbc452..582f24634a 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -89,6 +89,22 @@ def test_empty_package_dir (self): os.chdir(cwd) sys.stdout = sys.__stdout__ + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = build_py(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index b2185b8442..99a6d90627 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -31,6 +31,8 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) + @unittest.skipUnless(not sys.dont_write_bytecode, + 'byte-compile not supported') def test_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) @@ -76,6 +78,21 @@ def test_get_inputs(self): # get_input should return 2 elements self.assertEquals(len(cmd.get_inputs()), 2) + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(InstallLibTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 35f81a6b37..dcc1a2069b 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,16 +1,13 @@ """Tests for distutils.util.""" -# not covered yet: -# - byte_compile -# import os import sys import unittest from copy import copy -from distutils.errors import DistutilsPlatformError +from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape) + rfc822_escape, byte_compile) from distutils import util # used to patch _environ_checked from distutils.sysconfig import get_config_vars from distutils import sysconfig @@ -258,6 +255,16 @@ def test_rfc822_escape(self): 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) + def test_dont_write_bytecode(self): + # makes sure byte_compile raise a DistutilsError + # if sys.dont_write_bytecode is True + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + self.assertRaises(DistutilsByteCompileError, byte_compile, []) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index 5054d0c867..4bc4c98413 100644 --- a/util.py +++ b/util.py @@ -11,6 +11,7 @@ from distutils.dep_util import newer from distutils.spawn import spawn from distutils import log +from distutils.errors import DistutilsByteCompileError def get_platform (): """Return a string that identifies the current platform. This is used @@ -443,6 +444,9 @@ def byte_compile (py_files, generated in indirect mode; unless you know what you're doing, leave it set to None. """ + # nothing is done if sys.dont_write_bytecode is True + if sys.dont_write_bytecode: + raise DistutilsByteCompileError('byte-compiling is disabled.') # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative From 34ac4d6b68ea3f6955282afdbc7f113a084d3f31 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 26 Oct 2009 01:48:07 +0000 Subject: [PATCH 2694/8469] bumping to 2.6.4 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 4c8cf042fd..b37308c578 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.4rc2" +__version__ = "2.6.4" #--end constants-- From 6f9e39534c8b0aca810553e5ebc34f789c67ca05 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 09:15:46 +0100 Subject: [PATCH 2695/8469] added DONT_PATCH_SETUPTOOLS environment marker --HG-- branch : distribute extra : rebase_source : 4fe53262211c90f2a90027014970f7e666de88f0 --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 07cfcd5ed9..69c23d4428 100755 --- a/setup.py +++ b/setup.py @@ -75,6 +75,8 @@ def _buildout_marker(): return 'buildout' in os.path.basename(command) def _being_installed(): + if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: + return True if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False From 5c93394f676cc340e8b2606a4fc6aa183f65b108 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 09:26:40 +0100 Subject: [PATCH 2696/8469] added a CHANGES note --HG-- branch : distribute extra : rebase_source : 27593bcdf57d0465696f959c0db2c196e0a485e6 --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a0276a328d..f74ea93be1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.7 ----- +* Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv + can drive an installation that doesn't patch a global setuptools. * Reviewed unladen-swallow specific change from http://code.google.com/p/unladen-swallow/source/detail?spec=svn875&r=719 and determined that it no longer applies. Distribute should work fine with From 9d29ae853126d08c8779e7e158905ae263d6f52a Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 09:30:16 +0100 Subject: [PATCH 2697/8469] removed PJE-style white lines --HG-- branch : distribute extra : rebase_source : b6f2b1983aa0e5994df5a29688348929fcd20628 --- setuptools/command/install_scripts.py | 38 +++------------------------ 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index c2dc2d5919..b1186dbac7 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -11,7 +11,7 @@ class install_scripts(_install_scripts): def initialize_options(self): _install_scripts.initialize_options(self) self.no_ep = False - + def run(self): self.run_command("egg_info") if self.distribution.scripts: @@ -20,9 +20,9 @@ def run(self): self.outfiles = [] if self.no_ep: # don't install entry point scripts into .egg file! - return + return - ei_cmd = self.get_finalized_command("egg_info") + ei_cmd = self.get_finalized_command("egg_info") dist = Distribution( ei_cmd.egg_base, PathMetadata(ei_cmd.egg_base, ei_cmd.egg_info), ei_cmd.egg_name, ei_cmd.egg_version, @@ -35,10 +35,6 @@ def run(self): for args in get_script_args(dist, executable, is_wininst): self.write_script(*args) - - - - def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" log.info("Installing %s script to %s", script_name, self.install_dir) @@ -52,31 +48,3 @@ def write_script(self, script_name, contents, mode="t", *ignored): f.close() chmod(target,0755) - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 6ef67c96970c10cc7cb5d4c4093abc40817fa2ba Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 09:44:07 +0100 Subject: [PATCH 2698/8469] Generated scripts now wraps their call in a __main__ section. Fixes #11 --HG-- branch : distribute extra : rebase_source : d69b879d01ca2690826cdf9b7541e541ae8e0f5a --- CHANGES.txt | 6 +++-- setuptools/command/easy_install.py | 10 +++++--- setuptools/tests/test_easy_install.py | 36 ++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f74ea93be1..935d4db8e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.7 ----- +* Issue 11: Generated scripts now wrap their call to the script entry point + in the standard "if name == 'main'" * Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv can drive an installation that doesn't patch a global setuptools. * Reviewed unladen-swallow specific change from @@ -38,7 +40,7 @@ CHANGES * Issue 65: cli.exe and gui.exe are now generated at build time, depending on the platform in use. -* Issue 67: Fixed doc typo (PEP 381/382) +* Issue 67: Fixed doc typo (PEP 381/382) * Distribute no longer shadows setuptools if we require a 0.7-series setuptools. And an error is raised when installing a 0.7 setuptools with @@ -122,7 +124,7 @@ setuptools This closes http://bitbucket.org/tarek/distribute/issue/16 and http://bitbucket.org/tarek/distribute/issue/18. -* zip_ok is now False by default. This closes +* zip_ok is now False by default. This closes http://bugs.python.org/setuptools/issue33. * Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 195139c711..c83e4283a7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1591,16 +1591,18 @@ def get_script_args(dist, executable=sys_executable, wininst=False): spec = str(dist.as_requirement()) header = get_script_header("", executable, wininst) for group in 'console_scripts', 'gui_scripts': - for name,ep in dist.get_entry_map(group).items(): + for name, ep in dist.get_entry_map(group).items(): script_text = ( "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" "__requires__ = %(spec)r\n" "import sys\n" "from pkg_resources import load_entry_point\n" "\n" - "sys.exit(\n" - " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" - ")\n" + "if __name__ == '__main__':" + "\n" + " sys.exit(\n" + " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" + " )\n" ) % locals() if sys.platform=='win32' or wininst: # On Windows/wininst, add a .py extension and an .exe launcher diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 583c072b20..6ce20e42f8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,9 +1,32 @@ """Easy install Tests """ +import sys import os, shutil, tempfile, unittest -from setuptools.command.easy_install import easy_install +from setuptools.command.easy_install import easy_install, get_script_args from setuptools.dist import Distribution +class FakeDist(object): + def get_entry_map(self, group): + if group != 'console_scripts': + return {} + return {'name': 'ep'} + + def as_requirement(self): + return 'spec' + +WANTED = """\ +#!%s +# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' +__requires__ = 'spec' +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.exit( + load_entry_point('spec', 'console_scripts', 'name')() + ) +""" % sys.executable + class TestEasyInstallTest(unittest.TestCase): def test_install_site_py(self): @@ -18,3 +41,14 @@ def test_install_site_py(self): finally: shutil.rmtree(cmd.install_dir) + def test_get_script_args(self): + dist = FakeDist() + + old_platform = sys.platform + try: + name, script = get_script_args(dist).next() + finally: + sys.platform = old_platform + + self.assertEquals(script, WANTED) + From e95226aa273fff543d1eccfaaabf7d58d52f5e95 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 09:54:46 +0100 Subject: [PATCH 2699/8469] removed empty lines --HG-- branch : distribute extra : rebase_source : a13127278ab77a12def12cfabc24f436f4700f1c --- setuptools/command/develop.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 5643c77341..88394c4870 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -34,11 +34,6 @@ def initialize_options(self): self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir - - - - - def finalize_options(self): ei = self.get_finalized_command("egg_info") if ei.broken_egg_info: @@ -117,10 +112,6 @@ def uninstall_link(self): # XXX should also check for entry point scripts! log.warn("Note: you must uninstall or replace scripts manually!") - - - - def install_egg_scripts(self, dist): if dist is not self.dist: # Installing a dependency, so fall back to normal behavior @@ -140,25 +131,3 @@ def install_egg_scripts(self, dist): f.close() self.install_script(dist, script_name, script_text, script_path) - - - - - - - - - - - - - - - - - - - - - - From 05ddf95fbac925bed8a75497e48a72e1d0ff6fdb Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 10:42:38 +0100 Subject: [PATCH 2700/8469] now develop supports the --user option fixes #58 --HG-- branch : distribute extra : rebase_source : 1f25aaecb7ff9c7b273430e68dc2bc2d2e23db7d --- CHANGES.txt | 1 + setuptools/command/develop.py | 106 ++++++++++++++++++++++++++++++- setuptools/tests/test_develop.py | 63 ++++++++++++++++++ 3 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 setuptools/tests/test_develop.py diff --git a/CHANGES.txt b/CHANGES.txt index 935d4db8e3..b2f0e27474 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.7 ----- +* Issue 58: Added --user support to the deveop command * Issue 11: Generated scripts now wrap their call to the script entry point in the standard "if name == 'main'" * Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 88394c4870..2be8bb1432 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -1,9 +1,20 @@ from setuptools.command.easy_install import easy_install -from distutils.util import convert_path +from distutils.util import convert_path, subst_vars from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log from distutils.errors import * import sys, os, setuptools, glob +from distutils.sysconfig import get_config_vars +from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS + +if sys.version < "2.6": + USER_BASE = None + USER_SITE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True class develop(easy_install): """Set up package for development""" @@ -17,6 +28,11 @@ class develop(easy_install): boolean_options = easy_install.boolean_options + ['uninstall'] + if HAS_USER_SITE: + user_options.append(('user', None, + "install in user site-package '%s'" % USER_SITE)) + boolean_options.append('user') + command_consumes_arguments = False # override base def run(self): @@ -33,6 +49,56 @@ def initialize_options(self): easy_install.initialize_options(self) self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir + self.user = 0 + self.install_purelib = None # for pure module distributions + self.install_platlib = None # non-pure (dists w/ extensions) + self.install_headers = None # for C/C++ headers + self.install_lib = None # set to either purelib or platlib + self.install_scripts = None + self.install_data = None + self.install_base = None + self.install_platbase = None + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE + + def select_scheme(self, name): + """Sets the install directories by applying the install schemes.""" + # it's the caller's problem if they supply a bad name! + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: + attrname = 'install_' + key + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) + + def create_home_path(self): + """Create directories under ~.""" + if not self.user: + return + home = convert_path(os.path.expanduser("~")) + for name, path in self.config_vars.iteritems(): + if path.startswith(home) and not os.path.isdir(path): + self.debug_print("os.makedirs('%s', 0700)" % path) + os.makedirs(path, 0700) + + def _expand_attrs(self, attrs): + for attr in attrs: + val = getattr(self, attr) + if val is not None: + if os.name == 'posix' or os.name == 'nt': + val = os.path.expanduser(val) + val = subst_vars(val, self.config_vars) + setattr(self, attr, val) + + def expand_basedirs(self): + """Calls `os.path.expanduser` on install_base, install_platbase and + root.""" + self._expand_attrs(['install_base', 'install_platbase', 'root']) + + def expand_dirs(self): + """Calls `os.path.expanduser` on install dirs.""" + self._expand_attrs(['install_purelib', 'install_platlib', + 'install_lib', 'install_headers', + 'install_scripts', 'install_data',]) def finalize_options(self): ei = self.get_finalized_command("egg_info") @@ -43,6 +109,44 @@ def finalize_options(self): ) self.args = [ei.egg_name] easy_install.finalize_options(self) + + py_version = sys.version.split()[0] + prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') + self.config_vars = {'dist_name': self.distribution.get_name(), + 'dist_version': self.distribution.get_version(), + 'dist_fullname': self.distribution.get_fullname(), + 'py_version': py_version, + 'py_version_short': py_version[0:3], + 'py_version_nodot': py_version[0] + py_version[2], + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, + } + + if HAS_USER_SITE: + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite + + # fix the install_dir if "--user" was used + if self.user: + self.create_home_path() + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + if os.name == 'posix': + self.select_scheme("unix_user") + else: + self.select_scheme(os.name + "_user") + + self.expand_basedirs() + self.expand_dirs() + + if self.user and self.install_purelib: + self.install_dir = self.install_purelib + self.script_dir = self.install_scripts + # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py new file mode 100644 index 0000000000..ff12d34537 --- /dev/null +++ b/setuptools/tests/test_develop.py @@ -0,0 +1,63 @@ +"""develop tests +""" +import sys +import os, shutil, tempfile, unittest +import tempfile +import site +from StringIO import StringIO + +from setuptools.command.develop import develop +from setuptools.command import develop as develop_pkg +from setuptools.dist import Distribution + +SETUP_PY = """\ +from setuptools import setup + +setup(name='foo') +""" + +class TestDevelopTest(unittest.TestCase): + + def setUp(self): + self.dir = tempfile.mkdtemp() + setup = os.path.join(self.dir, SETUP_PY) + f = open(setup, 'w') + f.write(SETUP_PY) + f.close() + self.old_cwd = os.getcwd() + os.chdir(self.dir) + if sys.version >= "2.6": + self.old_base = site.USER_BASE + site.USER_BASE = develop_pkg.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = develop_pkg.USER_SITE = tempfile.mkdtemp() + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.dir) + if sys.version >= "2.6": + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site + + def test_develop(self): + if sys.version < "2.6": + return + dist = Distribution() + dist.script_name = 'setup.py' + cmd = develop(dist) + cmd.user = 1 + cmd.ensure_finalized() + cmd.user = 1 + old_stdout = sys.stdout + sys.stdout = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + + # let's see if we got our egg link at the right place + content = os.listdir(site.USER_SITE) + self.assertEquals(content, ['UNKNOWN.egg-link']) + From d22b358d445d2634e6f502092a2b7ea3dcbcb8d6 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 10:44:46 +0100 Subject: [PATCH 2701/8469] typo --HG-- branch : distribute extra : rebase_source : d596c9394c22c7d9609e63ab7093a47714658ae3 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b2f0e27474..6a8455d043 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.7 ----- -* Issue 58: Added --user support to the deveop command +* Issue 58: Added --user support to the develop command * Issue 11: Generated scripts now wrap their call to the script entry point in the standard "if name == 'main'" * Added the 'DONT_PATCH_SETUPTOOLS' environment variable, so virtualenv From a5c7e0b5256ce53c49dabfe709b37f9644630b96 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 27 Oct 2009 16:23:23 +0100 Subject: [PATCH 2702/8469] make sure USER_SITE is listed as a sitedir in easy_install --HG-- branch : distribute extra : rebase_source : f632d56d77b31a6b4f2183728e770d00005b0060 --- setuptools/command/develop.py | 3 ++- setuptools/command/easy_install.py | 5 +++++ setuptools/tests/test_develop.py | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 2be8bb1432..330ba1680e 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -108,7 +108,7 @@ def finalize_options(self): % (ei.egg_info, ei.broken_egg_info) ) self.args = [ei.egg_name] - easy_install.finalize_options(self) + py_version = sys.version.split()[0] prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') @@ -147,6 +147,7 @@ def finalize_options(self): self.install_dir = self.install_purelib self.script_dir = self.install_scripts + easy_install.finalize_options(self) # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c83e4283a7..de6ea9459c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1211,7 +1211,12 @@ def get_site_dirs(): site_lib = get_python_lib(plat_specific) if site_lib not in sitedirs: sitedirs.append(site_lib) + if sys.version >= "2.6": + import site + sitedirs.append(site.USER_SITE) + sitedirs = map(normalize_path, sitedirs) + return sitedirs diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ff12d34537..85a6c337bc 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -59,5 +59,6 @@ def test_develop(self): # let's see if we got our egg link at the right place content = os.listdir(site.USER_SITE) - self.assertEquals(content, ['UNKNOWN.egg-link']) + content.sort() + self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) From 145e091da579f3d1e2cd591ca3d0eaac70b5aeb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 27 Oct 2009 23:06:10 +0000 Subject: [PATCH 2703/8469] Fixed #1180: Option to ignore ~/.pydistutils.cfg in Distutils --- core.py | 5 +++-- dist.py | 35 ++++++++++++++++++++++++++++++----- tests/test_dist.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/core.py b/core.py index 0fb6f81efb..8073a6bc2a 100644 --- a/core.py +++ b/core.py @@ -129,8 +129,9 @@ class found in 'cmdclass' is used in place of the default, which is if _setup_stop_after == "config": return dist - # Parse the command line; any command-line errors are the end user's - # fault, so turn them into SystemExit to suppress tracebacks. + # Parse the command line and override config files; any + # command-line errors are the end user's fault, so turn them into + # SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() except DistutilsArgError, msg: diff --git a/dist.py b/dist.py index eb7d01c0e4..8dc64d43da 100644 --- a/dist.py +++ b/dist.py @@ -56,7 +56,9 @@ class Distribution: ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('help', 'h', "show detailed help message"), - ] + ('no-user-cfg', None, + 'ignore pydistutils.cfg in your home directory'), + ] # 'common_usage' is a short (2-3 line) string describing the common # usage of the setup script. @@ -264,6 +266,22 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") + # no-user-cfg is handled before other command line args + # because other args override the config files, and this + # one is needed before we can load the config files. + # If attrs['script_args'] wasn't passed, assume false. + # + # This also make sure we just look at the global options + self.want_user_cfg = True + + if self.script_args is not None: + for arg in self.script_args: + if not arg.startswith('-'): + break + if arg == '--no-user-cfg': + self.want_user_cfg = False + break + self.finalize_options() def get_option_dict(self, command): @@ -316,7 +334,10 @@ def find_config_files(self): Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg - on Windows/Mac, and setup.cfg in the current directory. + on Windows/Mac; and setup.cfg in the current directory. + + The file in the user's home directory can be disabled with the + --no-user-cfg option. """ files = [] check_environ() @@ -336,15 +357,19 @@ def find_config_files(self): user_filename = "pydistutils.cfg" # And look for the user config file - user_file = os.path.join(os.path.expanduser('~'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + if self.want_user_cfg: + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" if os.path.isfile(local_file): files.append(local_file) + if DEBUG: + self.announce("using config files: %s" % ', '.join(files)) + return files def parse_config_files(self, filenames=None): diff --git a/tests/test_dist.py b/tests/test_dist.py index 5f032ca60f..573d0b9b4f 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -209,6 +209,35 @@ def test_announce(self): kwargs = {'level': 'ok2'} self.assertRaises(ValueError, dist.announce, args, kwargs) + def test_find_config_files_disable(self): + # Ticket #1180: Allow user to disable their home config file. + temp_home = self.mkdtemp() + if os.name == 'posix': + user_filename = os.path.join(temp_home, ".pydistutils.cfg") + else: + user_filename = os.path.join(temp_home, "pydistutils.cfg") + + with open(user_filename, 'w') as f: + f.write('[distutils]\n') + + def _expander(path): + return temp_home + + old_expander = os.path.expanduser + os.path.expanduser = _expander + try: + d = distutils.dist.Distribution() + all_files = d.find_config_files() + + d = distutils.dist.Distribution(attrs={'script_args': + ['--no-user-cfg']}) + files = d.find_config_files() + finally: + os.path.expanduser = old_expander + + # make sure --no-user-cfg disables the user cfg file + self.assertEquals(len(all_files)-1, len(files)) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From 76c1f4ad5d4d7ae75abcc44d2e1345648a137a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 27 Oct 2009 23:12:01 +0000 Subject: [PATCH 2704/8469] Merged revisions 75893 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75893 | tarek.ziade | 2009-10-28 00:06:10 +0100 (Wed, 28 Oct 2009) | 1 line Fixed #1180: Option to ignore ~/.pydistutils.cfg in Distutils ........ --- core.py | 5 +++-- dist.py | 35 ++++++++++++++++++++++++++++++----- tests/test_dist.py | 32 +++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/core.py b/core.py index 6e4892039e..95c035742e 100644 --- a/core.py +++ b/core.py @@ -129,8 +129,9 @@ class found in 'cmdclass' is used in place of the default, which is if _setup_stop_after == "config": return dist - # Parse the command line; any command-line errors are the end user's - # fault, so turn them into SystemExit to suppress tracebacks. + # Parse the command line and override config files; any + # command-line errors are the end user's fault, so turn them into + # SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() except DistutilsArgError as msg: diff --git a/dist.py b/dist.py index 1c1ea477db..90af6e2d3b 100644 --- a/dist.py +++ b/dist.py @@ -53,7 +53,9 @@ class Distribution: ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('help', 'h', "show detailed help message"), - ] + ('no-user-cfg', None, + 'ignore pydistutils.cfg in your home directory'), + ] # 'common_usage' is a short (2-3 line) string describing the common # usage of the setup script. @@ -260,6 +262,22 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") + # no-user-cfg is handled before other command line args + # because other args override the config files, and this + # one is needed before we can load the config files. + # If attrs['script_args'] wasn't passed, assume false. + # + # This also make sure we just look at the global options + self.want_user_cfg = True + + if self.script_args is not None: + for arg in self.script_args: + if not arg.startswith('-'): + break + if arg == '--no-user-cfg': + self.want_user_cfg = False + break + self.finalize_options() def get_option_dict(self, command): @@ -311,7 +329,10 @@ def find_config_files(self): Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg - on Windows/Mac, and setup.cfg in the current directory. + on Windows/Mac; and setup.cfg in the current directory. + + The file in the user's home directory can be disabled with the + --no-user-cfg option. """ files = [] check_environ() @@ -331,15 +352,19 @@ def find_config_files(self): user_filename = "pydistutils.cfg" # And look for the user config file - user_file = os.path.join(os.path.expanduser('~'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + if self.want_user_cfg: + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" if os.path.isfile(local_file): files.append(local_file) + if DEBUG: + self.announce("using config files: %s" % ', '.join(files)) + return files def parse_config_files(self, filenames=None): diff --git a/tests/test_dist.py b/tests/test_dist.py index be1010c611..b1b184ea18 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -37,7 +37,8 @@ def find_config_files(self): return self._config_files -class DistributionTestCase(support.LoggingSilencer, +class DistributionTestCase(support.TempdirManager, + support.LoggingSilencer, support.EnvironGuard, unittest.TestCase): @@ -180,6 +181,35 @@ def test_announce(self): kwargs = {'level': 'ok2'} self.assertRaises(ValueError, dist.announce, args, kwargs) + def test_find_config_files_disable(self): + # Ticket #1180: Allow user to disable their home config file. + temp_home = self.mkdtemp() + if os.name == 'posix': + user_filename = os.path.join(temp_home, ".pydistutils.cfg") + else: + user_filename = os.path.join(temp_home, "pydistutils.cfg") + + with open(user_filename, 'w') as f: + f.write('[distutils]\n') + + def _expander(path): + return temp_home + + old_expander = os.path.expanduser + os.path.expanduser = _expander + try: + d = distutils.dist.Distribution() + all_files = d.find_config_files() + + d = distutils.dist.Distribution(attrs={'script_args': + ['--no-user-cfg']}) + files = d.find_config_files() + finally: + os.path.expanduser = old_expander + + # make sure --no-user-cfg disables the user cfg file + self.assertEquals(len(all_files)-1, len(files)) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From cd4dc3e1269f9c6da842c6565ece1408979b42f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 28 Oct 2009 06:45:18 +0000 Subject: [PATCH 2705/8469] removed spurious spaces --- errors.py | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/errors.py b/errors.py index acecacccb5..d9c47c761c 100644 --- a/errors.py +++ b/errors.py @@ -10,90 +10,79 @@ __revision__ = "$Id$" -class DistutilsError (Exception): +class DistutilsError(Exception): """The root of all Distutils evil.""" - pass -class DistutilsModuleError (DistutilsError): +class DistutilsModuleError(DistutilsError): """Unable to load an expected module, or to find an expected class within some module (in particular, command modules and classes).""" - pass -class DistutilsClassError (DistutilsError): +class DistutilsClassError(DistutilsError): """Some command class (or possibly distribution class, if anyone feels a need to subclass Distribution) is found not to be holding up its end of the bargain, ie. implementing some part of the "command "interface.""" - pass -class DistutilsGetoptError (DistutilsError): +class DistutilsGetoptError(DistutilsError): """The option table provided to 'fancy_getopt()' is bogus.""" - pass -class DistutilsArgError (DistutilsError): +class DistutilsArgError(DistutilsError): """Raised by fancy_getopt in response to getopt.error -- ie. an error in the command line usage.""" - pass -class DistutilsFileError (DistutilsError): +class DistutilsFileError(DistutilsError): """Any problems in the filesystem: expected file not found, etc. Typically this is for problems that we detect before IOError or OSError could be raised.""" - pass -class DistutilsOptionError (DistutilsError): +class DistutilsOptionError(DistutilsError): """Syntactic/semantic errors in command options, such as use of mutually conflicting options, or inconsistent options, badly-spelled values, etc. No distinction is made between option values originating in the setup script, the command line, config files, or what-have-you -- but if we *know* something originated in the setup script, we'll raise DistutilsSetupError instead.""" - pass -class DistutilsSetupError (DistutilsError): +class DistutilsSetupError(DistutilsError): """For errors that can be definitely blamed on the setup script, such as invalid keyword arguments to 'setup()'.""" - pass -class DistutilsPlatformError (DistutilsError): +class DistutilsPlatformError(DistutilsError): """We don't know how to do something on the current platform (but we do know how to do it on some platform) -- eg. trying to compile C files on a platform not supported by a CCompiler subclass.""" - pass -class DistutilsExecError (DistutilsError): +class DistutilsExecError(DistutilsError): """Any problems executing an external program (such as the C compiler, when compiling C files).""" - pass -class DistutilsInternalError (DistutilsError): +class DistutilsInternalError(DistutilsError): """Internal inconsistencies or impossibilities (obviously, this should never be seen if the code is working!).""" - pass -class DistutilsTemplateError (DistutilsError): +class DistutilsTemplateError(DistutilsError): """Syntax error in a file list template.""" class DistutilsByteCompileError(DistutilsError): """Byte compile error.""" # Exception classes used by the CCompiler implementation classes -class CCompilerError (Exception): +class CCompilerError(Exception): """Some compile/link operation failed.""" -class PreprocessError (CCompilerError): +class PreprocessError(CCompilerError): """Failure to preprocess one or more C/C++ files.""" -class CompileError (CCompilerError): +class CompileError(CCompilerError): """Failure to compile one or more C/C++ source files.""" -class LibError (CCompilerError): +class LibError(CCompilerError): """Failure to create a static library from one or more C/C++ object files.""" -class LinkError (CCompilerError): +class LinkError(CCompilerError): """Failure to link one or more C/C++ object files into an executable or shared library file.""" -class UnknownFileError (CCompilerError): +class UnknownFileError(CCompilerError): """Attempt to process an unknown file type.""" From 3700b7dba0832dd3123775e0c74b8d6fb4ff25ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 28 Oct 2009 06:48:27 +0000 Subject: [PATCH 2706/8469] Merged revisions 75901 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75901 | tarek.ziade | 2009-10-28 07:45:18 +0100 (Wed, 28 Oct 2009) | 1 line removed spurious spaces ........ --- errors.py | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/errors.py b/errors.py index acecacccb5..d9c47c761c 100644 --- a/errors.py +++ b/errors.py @@ -10,90 +10,79 @@ __revision__ = "$Id$" -class DistutilsError (Exception): +class DistutilsError(Exception): """The root of all Distutils evil.""" - pass -class DistutilsModuleError (DistutilsError): +class DistutilsModuleError(DistutilsError): """Unable to load an expected module, or to find an expected class within some module (in particular, command modules and classes).""" - pass -class DistutilsClassError (DistutilsError): +class DistutilsClassError(DistutilsError): """Some command class (or possibly distribution class, if anyone feels a need to subclass Distribution) is found not to be holding up its end of the bargain, ie. implementing some part of the "command "interface.""" - pass -class DistutilsGetoptError (DistutilsError): +class DistutilsGetoptError(DistutilsError): """The option table provided to 'fancy_getopt()' is bogus.""" - pass -class DistutilsArgError (DistutilsError): +class DistutilsArgError(DistutilsError): """Raised by fancy_getopt in response to getopt.error -- ie. an error in the command line usage.""" - pass -class DistutilsFileError (DistutilsError): +class DistutilsFileError(DistutilsError): """Any problems in the filesystem: expected file not found, etc. Typically this is for problems that we detect before IOError or OSError could be raised.""" - pass -class DistutilsOptionError (DistutilsError): +class DistutilsOptionError(DistutilsError): """Syntactic/semantic errors in command options, such as use of mutually conflicting options, or inconsistent options, badly-spelled values, etc. No distinction is made between option values originating in the setup script, the command line, config files, or what-have-you -- but if we *know* something originated in the setup script, we'll raise DistutilsSetupError instead.""" - pass -class DistutilsSetupError (DistutilsError): +class DistutilsSetupError(DistutilsError): """For errors that can be definitely blamed on the setup script, such as invalid keyword arguments to 'setup()'.""" - pass -class DistutilsPlatformError (DistutilsError): +class DistutilsPlatformError(DistutilsError): """We don't know how to do something on the current platform (but we do know how to do it on some platform) -- eg. trying to compile C files on a platform not supported by a CCompiler subclass.""" - pass -class DistutilsExecError (DistutilsError): +class DistutilsExecError(DistutilsError): """Any problems executing an external program (such as the C compiler, when compiling C files).""" - pass -class DistutilsInternalError (DistutilsError): +class DistutilsInternalError(DistutilsError): """Internal inconsistencies or impossibilities (obviously, this should never be seen if the code is working!).""" - pass -class DistutilsTemplateError (DistutilsError): +class DistutilsTemplateError(DistutilsError): """Syntax error in a file list template.""" class DistutilsByteCompileError(DistutilsError): """Byte compile error.""" # Exception classes used by the CCompiler implementation classes -class CCompilerError (Exception): +class CCompilerError(Exception): """Some compile/link operation failed.""" -class PreprocessError (CCompilerError): +class PreprocessError(CCompilerError): """Failure to preprocess one or more C/C++ files.""" -class CompileError (CCompilerError): +class CompileError(CCompilerError): """Failure to compile one or more C/C++ source files.""" -class LibError (CCompilerError): +class LibError(CCompilerError): """Failure to create a static library from one or more C/C++ object files.""" -class LinkError (CCompilerError): +class LinkError(CCompilerError): """Failure to link one or more C/C++ object files into an executable or shared library file.""" -class UnknownFileError (CCompilerError): +class UnknownFileError(CCompilerError): """Attempt to process an unknown file type.""" From 8f0323993c18365d2ca04e1f05aa39b829fb1267 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 13:59:13 +0100 Subject: [PATCH 2707/8469] added the dev link with the #egg fragment --HG-- branch : distribute extra : rebase_source : 2d2044baa9ec0083be1eadd1c664dde576e72447 --- README.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 09c547b405..b40929574c 100755 --- a/README.txt +++ b/README.txt @@ -93,8 +93,14 @@ easy_install or pip Run easy_install or pip:: - $ easy_install Distribute - $ pip install Distribute + $ easy_install -U distribute + $ pip install distribute + +If you want to install the latest dev version, you can also run:: + + $ easy_install -U distribute==dev + +This will get the latest development version at: http://bitbucket.org/tarek/distribute/get/0.6-maintenance.zip#egg=distribute-dev Source installation =================== From 04d0bff4b0a71390c6e9fba1191461dd29f6e191 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 14:01:27 +0100 Subject: [PATCH 2708/8469] Added tag 0.6.7 for changeset 71f08668d050 --HG-- branch : distribute extra : rebase_source : 4fc584629f33a7051bf107da930bd69b09172424 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b410ccb7ab..242513bd09 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 2df182df8a0224d429402de3cddccdb97af6ea21 0.6.5 f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 +71f08668d050589b92ecd164a4f5a91f3484313b 0.6.7 From f0464d99bbc4d5e5b7d0a244d5f96befdabd1273 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 15:01:40 +0100 Subject: [PATCH 2709/8469] backporting the API Eby added in 0.6c11 --HG-- branch : distribute extra : rebase_source : 7e34c308ad98259f9344e10117750aeae3e8d2ea --- setuptools/dist.py | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 2246ab96dd..fd4ca66b93 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,5 +1,6 @@ __all__ = ['Distribution'] +import re from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install @@ -421,19 +422,19 @@ def exclude_package(self,package): if self.packages: self.packages = [ p for p in self.packages - if p<>package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.py_modules: self.py_modules = [ p for p in self.py_modules - if p<>package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.ext_modules: self.ext_modules = [ p for p in self.ext_modules - if p.name<>package and not p.name.startswith(pfx) + if p.name != package and not p.name.startswith(pfx) ] @@ -805,22 +806,11 @@ def validate(self,dist): - - - - - - - - - - - - - - - - - - +def check_packages(dist, attr, value): + for pkgname in value: + if not re.match(r'\w+(\.\w+)*', pkgname): + distutils.log.warn( + "WARNING: %r not a valid package name; please use only" + ".-separated package names in setup.py", pkgname + ) From 1b6bf2620558a3a4f793827393017ddf5ba6a323 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 15:06:06 +0100 Subject: [PATCH 2710/8469] started 0.6.8 --HG-- branch : distribute extra : rebase_source : 744dff4dd47fbc1c7fd8d482faa55f20f43e5843 --- CHANGES.txt | 4 ++++ README.txt | 6 +++--- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6a8455d043..a70f035ee5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,10 @@ CHANGES ======= +----- +0.6.8 +----- + ----- 0.6.7 ----- diff --git a/README.txt b/README.txt index b40929574c..d39915aab7 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.7.tar.gz - $ tar -xzvf distribute-0.6.7.tar.gz - $ cd distribute-0.6.7 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz + $ tar -xzvf distribute-0.6.8.tar.gz + $ cd distribute-0.6.8 $ python setup.py install --------------------------- diff --git a/docs/conf.py b/docs/conf.py index 794e728cfb..4c44b25d42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.7' +version = '0.6.8' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 294bc5781f..2a52b20ae2 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.7" +export VERSION="0.6.8" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 69c23d4428..48c77b0ce4 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.7" +VERSION = "0.6.8" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 4a3eabd1c6c8827f7cddc9818c0e86cbd38cbe75 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 15:07:23 +0100 Subject: [PATCH 2711/8469] added a CHANGE not about check_packages --HG-- branch : distribute extra : rebase_source : 503f2dd0c2ed7dc2fc4fa2c6a4a2bdb70b1e044c --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a70f035ee5..31b8f3118e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ CHANGES 0.6.8 ----- +* Added "check_packages" in dist. (added in Setuptools 0.6c11) +* + ----- 0.6.7 ----- From 7405419fb048f82ef142afd32d83dcb29bab59d4 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 15:15:49 +0100 Subject: [PATCH 2712/8469] raised version in distribute_setup as well --HG-- branch : distribute extra : rebase_source : 660ea268a383973b586ca0889c2ca8f9c87d36e8 --- distribute_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index de7b1f6d14..cfb3bbefb5 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.6" +DEFAULT_VERSION = "0.6.8" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 @@ -113,7 +113,7 @@ def _build_egg(egg, tarball, to_dir): def _do_download(version, download_base, to_dir, download_delay): - egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg' + egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): tarball = download_setuptools(version, download_base, From aaa33ec7239dd9f1929ce4925ef9cc6e3fb5a6e6 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 16:00:56 +0100 Subject: [PATCH 2713/8469] --distribute was added in zc.buildout 1.4.2 --HG-- branch : distribute extra : rebase_source : 754f8883e6b103a3d8487072e386eb7bad2ddb6b --- README.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index d39915aab7..4930872a90 100755 --- a/README.txt +++ b/README.txt @@ -196,7 +196,12 @@ Install FAQ - **How does Distribute interacts with zc.buildout?** - You can use Distribute in your zc.buildout. *The only thing* you need to do + You can use Distribute in your zc.buildout, with the --distribute option, + starting at zc.buildout 1.4.2:: + + $ python bootstrap.py --distribute + + For previous zc.buildout versions, *the only thing* you need to do is use the bootstrap at `http://python-distribute.org/bootstrap.py`. Run that bootstrap and ``bin/buildout`` (and all other buildout-generated scripts) will transparently use distribute instead of setuptools. You do From cc0aa57244be3c8aea598862db3ef867dc108ec6 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 1 Nov 2009 19:02:35 +0100 Subject: [PATCH 2714/8469] Fixed typo in code for DONT_PATCH_SETUPTOOLS environment marker --HG-- branch : distribute extra : rebase_source : 86ce375ee0f39fed222626a77fa897eefc5f4e01 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 48c77b0ce4..f9a2bcb2d0 100755 --- a/setup.py +++ b/setup.py @@ -76,7 +76,7 @@ def _buildout_marker(): def _being_installed(): if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: - return True + return False if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False From 42f4dfbbdfee2d95ca23f13f869b12da5eb170ce Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 1 Nov 2009 19:29:09 +0100 Subject: [PATCH 2715/8469] Minor README update for virtualenv support --HG-- branch : distribute extra : rebase_source : e8b42712bacf676aff921689119761724358b764 --- README.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.txt b/README.txt index 4930872a90..b6340b0497 100755 --- a/README.txt +++ b/README.txt @@ -178,12 +178,11 @@ Install FAQ If it wasn't doing it, a program that would try to install Setuptools would overwrite in turn Distribute. -- **How does Distribute interacts with virtualenv?** +- **How does Distribute interact with virtualenv?** - Everytime you create a virtualenv it will install setuptools, so you need to - re-install Distribute in it right after. The Distribute project will not - attempt to patch virtualenv so it uses it when globally installed. - We will just wait for virtualenv to eventually switch to Distribute. + Everytime you create a virtualenv it will install setuptools by default. + You either need to re-install Distribute in it right after or pass the + ``--distribute`` option when creating it. Once installed, your virtualenv will use Distribute transparently. From 4c4a3a0a44120223d14e1fd49d50f89a40322174 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 20:16:23 +0100 Subject: [PATCH 2716/8469] fixed CHANGES --HG-- branch : distribute extra : rebase_source : 4a959e9365eb894b4f71b66401f8caad748788ca --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 31b8f3118e..0963b1d8f9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES ----- * Added "check_packages" in dist. (added in Setuptools 0.6c11) -* +* Fixed the DONT_PATCH_SETUPTOOLS state. ----- 0.6.7 From ac52a1f3984ce1c198a1ba4118611be3083ea5e3 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 20:18:32 +0100 Subject: [PATCH 2717/8469] Added tag 0.6.8 for changeset 445547a5729e --HG-- branch : distribute extra : rebase_source : f896ab6e3c5ce4e63f7e254d2089520898aaa552 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 242513bd09..a02ce84ca1 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 2df182df8a0224d429402de3cddccdb97af6ea21 0.6.5 f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 71f08668d050589b92ecd164a4f5a91f3484313b 0.6.7 +445547a5729ed5517cf1a9baad595420a8831ef8 0.6.8 From f7a2000adabf8cca6bc691b6c946ccdbb0c81749 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 20:21:40 +0100 Subject: [PATCH 2718/8469] started 0.6.9 --HG-- branch : distribute extra : rebase_source : 2064f9b14f740b9dbd4bcfa61584d3667471d8d2 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index b6340b0497..602fae896b 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz - $ tar -xzvf distribute-0.6.8.tar.gz - $ cd distribute-0.6.8 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.9.tar.gz + $ tar -xzvf distribute-0.6.9.tar.gz + $ cd distribute-0.6.9 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index cfb3bbefb5..797a8d5cc1 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.8" +DEFAULT_VERSION = "0.6.9" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 diff --git a/docs/conf.py b/docs/conf.py index 4c44b25d42..4f13d857ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.8' +version = '0.6.9' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 2a52b20ae2..7be03cd2c9 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.8" +export VERSION="0.6.9" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index f9a2bcb2d0..8dad58c193 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.8" +VERSION = "0.6.9" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 717152f553567f458d69d78cb321daa2809b06ba Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 1 Nov 2009 20:22:03 +0100 Subject: [PATCH 2719/8469] make sure the tag is pushed --HG-- branch : distribute extra : rebase_source : e31a868a8725713493b55a0d31d8a7992edcc6b9 --- release.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release.sh b/release.sh index 7be03cd2c9..91d7ccb635 100755 --- a/release.sh +++ b/release.sh @@ -16,4 +16,5 @@ python2.6 setup.py build_sphinx upload_docs scp distribute_setup.py ziade.org:nightly/build/ # starting the new dev +hg push From 1c2453667055bf68b5ca93f65db3efac9fc4c1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 1 Nov 2009 22:33:45 +0000 Subject: [PATCH 2720/8469] fixed stdout alteration in test_distutils --- tests/test_build_py.py | 3 ++- tests/test_util.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index bfe6154273..472591dc09 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -69,6 +69,7 @@ def test_empty_package_dir (self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) + old_stdout = sys.stdout sys.stdout = StringIO.StringIO() try: @@ -87,7 +88,7 @@ def test_empty_package_dir (self): finally: # Restore state. os.chdir(cwd) - sys.stdout = sys.__stdout__ + sys.stdout = old_stdout def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_util.py b/tests/test_util.py index 55ef160f37..6722997f58 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -60,6 +60,8 @@ def setUp(self): util.find_executable = self._find_executable self._exes = {} self.old_popen = subprocess.Popen + self.old_stdout = sys.stdout + self.old_stderr = sys.stderr FakePopen.test_class = self subprocess.Popen = FakePopen @@ -79,6 +81,8 @@ def tearDown(self): sysconfig._config_vars = copy(self._config_vars) util.find_executable = self.old_find_executable subprocess.Popen = self.old_popen + sys.old_stdout = self.old_stdout + sys.old_stderr = self.old_stderr super(UtilTestCase, self).tearDown() def _set_uname(self, uname): From 77f13813e91f896c9e368bf4b979f85530e05f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 1 Nov 2009 22:38:44 +0000 Subject: [PATCH 2721/8469] Merged revisions 76042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76042 | tarek.ziade | 2009-11-01 23:33:45 +0100 (Sun, 01 Nov 2009) | 1 line fixed stdout alteration in test_distutils ........ --- tests/test_build_py.py | 3 ++- tests/test_util.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 582f24634a..3e45f6e89e 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -69,6 +69,7 @@ def test_empty_package_dir (self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) + old_stdout = sys.stdout sys.stdout = io.StringIO() try: @@ -87,7 +88,7 @@ def test_empty_package_dir (self): finally: # Restore state. os.chdir(cwd) - sys.stdout = sys.__stdout__ + sys.stdout = old_stdout def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_util.py b/tests/test_util.py index a2f8ed2b59..4172472658 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -60,6 +60,8 @@ def setUp(self): util.find_executable = self._find_executable self._exes = {} self.old_popen = subprocess.Popen + self.old_stdout = sys.stdout + self.old_stderr = sys.stderr FakePopen.test_class = self subprocess.Popen = FakePopen @@ -79,6 +81,8 @@ def tearDown(self): sysconfig._config_vars = copy(self._config_vars) util.find_executable = self.old_find_executable subprocess.Popen = self.old_popen + sys.old_stdout = self.old_stdout + sys.old_stderr = self.old_stderr super(UtilTestCase, self).tearDown() def _set_uname(self, uname): From 5f34bac6360a547a0797683883da85233e10a070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 1 Nov 2009 23:04:26 +0000 Subject: [PATCH 2722/8469] reapplied r74493 (after #6665 fix has been backported) --- filelist.py | 4 +++- tests/test_filelist.py | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/filelist.py b/filelist.py index 3ce5635047..88b33c7c94 100644 --- a/filelist.py +++ b/filelist.py @@ -344,7 +344,9 @@ def translate_pattern (pattern, anchor=1, prefix=None, is_regex=0): pattern_re = '' if prefix is not None: - prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ + # ditch end of pattern character + empty_pattern = glob_to_re('') + prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 86db557441..1faccfae7e 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -6,15 +6,15 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*$') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]$') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]$') + self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*$') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*$') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_suite(): return unittest.makeSuite(FileListTestCase) From 5ff2e55da5d92f0b33021ba205f787d6cb80358c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 1 Nov 2009 23:11:55 +0000 Subject: [PATCH 2723/8469] reapplied r74493 (after #6665 fix has been backported) --- filelist.py | 4 +++- tests/test_build_py.py | 3 ++- tests/test_filelist.py | 14 +++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/filelist.py b/filelist.py index 58a2bfb108..06a8da9a07 100644 --- a/filelist.py +++ b/filelist.py @@ -312,7 +312,9 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): pattern_re = '' if prefix is not None: - prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $ + # ditch end of pattern character + empty_pattern = glob_to_re('') + prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 582f24634a..3e45f6e89e 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -69,6 +69,7 @@ def test_empty_package_dir (self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) + old_stdout = sys.stdout sys.stdout = io.StringIO() try: @@ -87,7 +88,7 @@ def test_empty_package_dir (self): finally: # Restore state. os.chdir(cwd) - sys.stdout = sys.__stdout__ + sys.stdout = old_stdout def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_filelist.py b/tests/test_filelist.py index b9db8f61fe..331180d235 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -9,15 +9,15 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*$') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]$') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]$') + self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*$') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*$') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_debug_print(self): file_list = FileList() From bf2f5e7e511577261c9d9d41af73c090c9293a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 1 Nov 2009 23:17:51 +0000 Subject: [PATCH 2724/8469] Merged revisions 76042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76042 | tarek.ziade | 2009-11-01 23:33:45 +0100 (Sun, 01 Nov 2009) | 1 line fixed stdout alteration in test_distutils ........ --- tests/test_build_py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 54a4ed80fd..4b045474f1 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -69,6 +69,7 @@ def test_empty_package_dir (self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) + old_stdout = sys.stdout sys.stdout = StringIO.StringIO() try: @@ -87,7 +88,7 @@ def test_empty_package_dir (self): finally: # Restore state. os.chdir(cwd) - sys.stdout = sys.__stdout__ + sys.stdout = old_stdout def test_suite(): return unittest.makeSuite(BuildPyTestCase) From a2cf9c8a40e4e8d416ba976eb7a361d433586989 Mon Sep 17 00:00:00 2001 From: tarek Date: Tue, 3 Nov 2009 16:18:47 +0100 Subject: [PATCH 2725/8469] added missing entry point that was added in setuptools 0.6c11 --HG-- branch : distribute extra : rebase_source : d238f3b7a316d271428f061cd2f40132d2a8b485 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 8dad58c193..9a845c1cc9 100755 --- a/setup.py +++ b/setup.py @@ -126,6 +126,7 @@ def _being_installed(): "package_data = setuptools.dist:check_package_data", "exclude_package_data = setuptools.dist:check_package_data", "include_package_data = setuptools.dist:assert_bool", + "packages = setuptools.dist:check_packages", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", "use_2to3 = setuptools.dist:assert_bool", From 0118a1febd0bde436f3f0e392d016b8e7e7656c9 Mon Sep 17 00:00:00 2001 From: "mborch@valga.local" Date: Wed, 4 Nov 2009 15:19:47 +0100 Subject: [PATCH 2726/8469] Copy change. --HG-- branch : distribute extra : rebase_source : b4f1e4c6288fe607310aabaf14ac508ad01c69a3 --- README.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 602fae896b..fad5145f83 100755 --- a/README.txt +++ b/README.txt @@ -169,14 +169,16 @@ Another way is to add ``Distribute`` in the ``install_requires`` option:: Install FAQ ----------- -- **Why Distribute turn my Setuptools installation into an fake one?** +- **Why is Distribute wrapping my Setuptools installation?** - Since Distribute is a fork, and since it provides the same package and modules, - it fakes that the Setuptools installation is still present, so all the programs - that where using Setuptools still work. + Since Distribute is a fork, and since it provides the same package + and modules, it renames the existing Setuptools egg and inserts a + new one which merely wraps the Distribute code. This way, full + backwards compatibility is kept for packages which rely on the + Setuptools modules. - If it wasn't doing it, a program that would try to install Setuptools - would overwrite in turn Distribute. + At the same time, packages can meet their dependency on Setuptools + without actually installing it (which would disable Distribute). - **How does Distribute interact with virtualenv?** From 529f165dfbd7b654b646b1b42b1ba6419e5ce832 Mon Sep 17 00:00:00 2001 From: "mborch@valga.local" Date: Wed, 4 Nov 2009 17:26:28 +0100 Subject: [PATCH 2727/8469] Added instructions from Florian Schultze. --HG-- branch : distribute extra : rebase_source : bd41be5da388ce505e146bdb445342a585e732fd --- README.txt | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index fad5145f83..8ec73116d8 100755 --- a/README.txt +++ b/README.txt @@ -149,21 +149,37 @@ Lastly: Quick help for developers ------------------------- -To use Distribute in your package, the recommended way is to ship -`distribute_setup.py` alongside your `setup.py` script and call -it at the very begining of `setup.py` like this:: +To create an egg which is compatible with Distribute, use the same +practice as with Setuptools, e.g.: - from distribute_setup import use_setuptools - use_setuptools() +{{{ +from setuptools import setup +setup(... +) +}}} -Another way is to add ``Distribute`` in the ``install_requires`` option:: +To use `pkg_resources` to access data files in the egg, you should +require the Setuptools distribution explicitly: - from setuptools import setup +{{{ +from setuptools import setup - setup(... - install_requires=['distribute'] - ) +setup(... + install_requires=['setuptools'] +) +}}} + +Only if you need Distribute-specific functionality should you depend +on it explicitly. In this case, replace the Setuptools dependency: + +{{{ +from setuptools import setup + +setup(... + install_requires=['distribute'] +) +}}} ----------- Install FAQ From a0ca582da7e9322a6abc5d4ce028ee631ddbde70 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 7 Nov 2009 03:08:06 +0100 Subject: [PATCH 2728/8469] now faking Setuptools 0.6c11 --HG-- branch : distribute extra : rebase_source : 48be66266a279d893236d90bd77cf1d0c654a7cf --- distribute_setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 797a8d5cc1..94789e7e27 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -48,17 +48,19 @@ def quote(arg): DEFAULT_VERSION = "0.6.9" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +SETUPTOOLS_FAKED_VERSION = "0.6c11" + SETUPTOOLS_PKG_INFO = """\ Metadata-Version: 1.0 Name: setuptools -Version: 0.6c9 +Version: %s Summary: xxxx Home-page: xxx Author: xxx Author-email: xxx License: xxx Description: xxx -""" +""" % SETUPTOOLS_FAKED_VERSION def _install(tarball): @@ -280,7 +282,8 @@ def _create_fake_setuptools_pkg_info(placeholder): log.warn('Could not find the install location') return pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - setuptools_file = 'setuptools-0.6c9-py%s.egg-info' % pyver + setuptools_file = 'setuptools-%s-py%s.egg-info' % \ + (SETUPTOOLS_FAKED_VERSION, pyver) pkg_info = os.path.join(placeholder, setuptools_file) if os.path.exists(pkg_info): log.warn('%s already exists', pkg_info) From 4072145aebca513ceaa0d25a64cb60d29842b300 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 11 Nov 2009 19:39:04 +0100 Subject: [PATCH 2729/8469] unknown setuptools version can be added in the working set, refs #90 --HG-- branch : distribute extra : rebase_source : c0aabd45025465b61ffd23a2196994f4afece233 --- CHANGES.txt | 7 +++++++ distribute.egg-info/entry_points.txt | 1 + pkg_resources.py | 6 +++++- setuptools/tests/test_resources.py | 15 ++++++--------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0963b1d8f9..aa22f5f452 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +0.6.9 +----- + +* Issue 90: unknown setuptools version can be added in the working set +* + ----- 0.6.8 ----- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index f4b74da0fd..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -52,6 +52,7 @@ test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages convert_2to3_doctests = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements diff --git a/pkg_resources.py b/pkg_resources.py index 31d83554e6..963819326a 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2253,7 +2253,11 @@ def insert_on(self, path, loc = None): loc = loc or self.location if self.project_name == 'setuptools': - if '0.7' in self.version: + try: + version = self.version + except ValueError: + version = '' + if '0.7' in version: raise ValueError( "A 0.7-series setuptools cannot be installed " "with distribute") diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 6a89e8a834..d805d02a75 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -203,15 +203,12 @@ def testSetuptoolsDistributeCombination(self): version="0.6c9") ws.add(d2) - - - - - - - - - + # a unexisting version needs to work + ws = WorkingSet([]) + d3 = Distribution( + "/some/path", + project_name="setuptools") + ws.add(d3) class EntryPointTests(TestCase): From e589e51c764bda35f353bb32d107364dab97d8ae Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 11 Nov 2009 20:40:14 +0100 Subject: [PATCH 2730/8469] setup.py doesn't try to convert distribute_setup.py anymore. fixes #87 --HG-- branch : distribute extra : rebase_source : 4378f7defabaadaaa258eb69f07caf17569dd57a --- CHANGES.txt | 3 ++- setup.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index aa22f5f452..5a02a4fe4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,8 @@ CHANGES ----- * Issue 90: unknown setuptools version can be added in the working set -* +* Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore + Initial Patch by arfrever. ----- 0.6.8 diff --git a/setup.py b/setup.py index 9a845c1cc9..f0457b466c 100755 --- a/setup.py +++ b/setup.py @@ -14,9 +14,10 @@ fl.process_template_line(line) dir_util.create_tree(tmp_src, fl.files) outfiles_2to3 = [] + dist_script = os.path.join("build", "src", "distribute_setup.py") for f in fl.files: outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1) - if copied and outf.endswith(".py"): + if copied and outf.endswith(".py") and outf != dist_script: outfiles_2to3.append(outf) if copied and outf.endswith('api_tests.txt'): # XXX support this in distutils as well From 6b23a07b6263fe86a7e1cdd790e850508e8d1530 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 11 Nov 2009 22:11:02 +0100 Subject: [PATCH 2731/8469] added a side bar with a download link to the doc. fixes #89 --HG-- branch : distribute extra : rebase_source : 30b018e5e29225e00ffcb311af2cd0d4ad6eed6c --- CHANGES.txt | 1 + docs/_templates/indexsidebar.html | 8 ++++++++ docs/conf.py | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/_templates/indexsidebar.html diff --git a/CHANGES.txt b/CHANGES.txt index 5a02a4fe4c..4c194987f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ CHANGES * Issue 90: unknown setuptools version can be added in the working set * Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore Initial Patch by arfrever. +* Issue 89: added a side bar with a download link to the doc. ----- 0.6.8 diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html new file mode 100644 index 0000000000..932909f3e1 --- /dev/null +++ b/docs/_templates/indexsidebar.html @@ -0,0 +1,8 @@ +

Download

+ +

Current version: {{ version }}

+

Get Distribute from the Python Package Index + +

Questions? Suggestions? Contributions?

+ +

Visit the Distribute project page

diff --git a/docs/conf.py b/docs/conf.py index 4f13d857ba..74435672b5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,7 +134,8 @@ #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +html_sidebars = {'index': 'indexsidebar.html'} + # Additional templates that should be rendered to pages, maps page names to # template names. From 5e506639b211f4c30b3f77b060bd394262201c1a Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 11 Nov 2009 22:22:00 +0100 Subject: [PATCH 2732/8469] fixed doc - fixes #86 --HG-- branch : distribute extra : rebase_source : b7578a6884f1f24f52f16ec22b5d57d1aecb2a82 --- docs/pkg_resources.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 049082c849..480f9547ce 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1594,8 +1594,9 @@ Parsing Utilities ``Requirement`` string, as a distribution name, or a PyPI project name. All non-alphanumeric runs are condensed to single "-" characters, such that a name like "The $$$ Tree" becomes "The-Tree". Note that if you are - generating a filename from this value you should replace the "-" characters - with underscores ("_") because setuptools and the distutils + generating a filename from this value you should combine it with a call to + ``to_filename()`` so all dashes ("-") are replaced by underscores ("_"). + See ``to_filename()``. ``safe_version(version)`` Similar to ``safe_name()`` except that spaces in the input become dots, and @@ -1708,7 +1709,7 @@ History * Fix cache dir defaults on Windows when multiple environment vars are needed to construct a path. - + 0.6c4 * Fix "dev" versions being considered newer than release candidates. From a5319bc62245b80ed702f73519ac2c27805c3acf Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 11 Nov 2009 22:22:51 +0100 Subject: [PATCH 2733/8469] added a changes note for #86 --HG-- branch : distribute extra : rebase_source : 8eda7604342905bf2478907187a57973728b4aa3 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4c194987f3..4e7ce3e3c6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ CHANGES * Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore Initial Patch by arfrever. * Issue 89: added a side bar with a download link to the doc. +* Issue 86: fixed missing sentence in pkg_resources doc. ----- 0.6.8 From 868b46b50b94efc30bfdde021844d1020aafa4b6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 13 Nov 2009 02:25:08 +0000 Subject: [PATCH 2734/8469] Merged revisions 75149,75260-75263,75265-75267,75292,75300,75376,75405,75429-75433,75437,75445,75501,75551,75572,75589-75591,75657,75742,75868,75952-75957,76057,76105,76139,76143,76162,76223 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75149 | gregory.p.smith | 2009-09-29 16:56:31 -0500 (Tue, 29 Sep 2009) | 3 lines Mention issue6972 in extractall docs about overwriting things outside of the supplied path. ........ r75260 | andrew.kuchling | 2009-10-05 16:24:20 -0500 (Mon, 05 Oct 2009) | 1 line Wording fix ........ r75261 | andrew.kuchling | 2009-10-05 16:24:35 -0500 (Mon, 05 Oct 2009) | 1 line Fix narkup ........ r75262 | andrew.kuchling | 2009-10-05 16:25:03 -0500 (Mon, 05 Oct 2009) | 1 line Document 'skip' parameter to constructor ........ r75263 | andrew.kuchling | 2009-10-05 16:25:35 -0500 (Mon, 05 Oct 2009) | 1 line Note side benefit of socket.create_connection() ........ r75265 | andrew.kuchling | 2009-10-05 17:31:11 -0500 (Mon, 05 Oct 2009) | 1 line Reword sentence ........ r75266 | andrew.kuchling | 2009-10-05 17:32:48 -0500 (Mon, 05 Oct 2009) | 1 line Use standard comma punctuation; reword some sentences in the docs ........ r75267 | andrew.kuchling | 2009-10-05 17:42:56 -0500 (Mon, 05 Oct 2009) | 1 line Backport r73983: Document the thousands separator. ........ r75292 | benjamin.peterson | 2009-10-08 22:11:36 -0500 (Thu, 08 Oct 2009) | 1 line death to old CVS keyword ........ r75300 | benjamin.peterson | 2009-10-09 16:48:14 -0500 (Fri, 09 Oct 2009) | 1 line fix some coding style ........ r75376 | benjamin.peterson | 2009-10-11 20:26:07 -0500 (Sun, 11 Oct 2009) | 1 line platform we don't care about ........ r75405 | neil.schemenauer | 2009-10-14 12:17:14 -0500 (Wed, 14 Oct 2009) | 4 lines Issue #1754094: Improve the stack depth calculation in the compiler. There should be no other effect than a small decrease in memory use. Patch by Christopher Tur Lesniewski-Laas. ........ r75429 | benjamin.peterson | 2009-10-14 20:47:28 -0500 (Wed, 14 Oct 2009) | 1 line pep8ify if blocks ........ r75430 | benjamin.peterson | 2009-10-14 20:49:37 -0500 (Wed, 14 Oct 2009) | 1 line use floor division and add a test that exercises the tabsize codepath ........ r75431 | benjamin.peterson | 2009-10-14 20:56:25 -0500 (Wed, 14 Oct 2009) | 1 line change test to what I intended ........ r75432 | benjamin.peterson | 2009-10-14 22:05:39 -0500 (Wed, 14 Oct 2009) | 1 line some cleanups ........ r75433 | benjamin.peterson | 2009-10-14 22:06:55 -0500 (Wed, 14 Oct 2009) | 1 line make inspect.isabstract() always return a boolean; add a test for it, too #7069 ........ r75437 | benjamin.peterson | 2009-10-15 10:44:46 -0500 (Thu, 15 Oct 2009) | 1 line only clear a module's __dict__ if the module is the only one with a reference to it #7140 ........ r75445 | vinay.sajip | 2009-10-16 09:06:44 -0500 (Fri, 16 Oct 2009) | 1 line Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE. ........ r75501 | antoine.pitrou | 2009-10-18 13:37:11 -0500 (Sun, 18 Oct 2009) | 3 lines Add a comment about unreachable code, and fix a typo ........ r75551 | benjamin.peterson | 2009-10-19 22:14:10 -0500 (Mon, 19 Oct 2009) | 1 line use property api ........ r75572 | benjamin.peterson | 2009-10-20 16:55:17 -0500 (Tue, 20 Oct 2009) | 1 line clarify buffer arg #7178 ........ r75589 | benjamin.peterson | 2009-10-21 21:26:47 -0500 (Wed, 21 Oct 2009) | 1 line whitespace ........ r75590 | benjamin.peterson | 2009-10-21 21:36:47 -0500 (Wed, 21 Oct 2009) | 1 line rewrite to be nice to other implementations ........ r75591 | benjamin.peterson | 2009-10-21 21:50:38 -0500 (Wed, 21 Oct 2009) | 4 lines rewrite for style, clarify, and comments Also, use the hasattr() like scheme of allowing BaseException exceptions through. ........ r75657 | antoine.pitrou | 2009-10-24 07:41:27 -0500 (Sat, 24 Oct 2009) | 3 lines Fix compilation error in debug mode. ........ r75742 | benjamin.peterson | 2009-10-26 17:51:16 -0500 (Mon, 26 Oct 2009) | 1 line use 'is' instead of id() ........ r75868 | benjamin.peterson | 2009-10-27 15:59:18 -0500 (Tue, 27 Oct 2009) | 1 line test expect base classes ........ r75952 | georg.brandl | 2009-10-29 15:38:32 -0500 (Thu, 29 Oct 2009) | 1 line Use the correct function name in docstring. ........ r75953 | georg.brandl | 2009-10-29 15:39:50 -0500 (Thu, 29 Oct 2009) | 1 line Remove mention of the old -X command line switch. ........ r75954 | georg.brandl | 2009-10-29 15:53:00 -0500 (Thu, 29 Oct 2009) | 1 line Use constants instead of magic integers for test result. Do not re-run with --verbose3 for environment changing tests. ........ r75955 | georg.brandl | 2009-10-29 15:54:03 -0500 (Thu, 29 Oct 2009) | 1 line Use a single style for all the docstrings in the math module. ........ r75956 | georg.brandl | 2009-10-29 16:16:34 -0500 (Thu, 29 Oct 2009) | 1 line I do not think the "railroad" program mentioned is still available. ........ r75957 | georg.brandl | 2009-10-29 16:44:56 -0500 (Thu, 29 Oct 2009) | 1 line Fix constant name. ........ r76057 | benjamin.peterson | 2009-11-02 09:06:45 -0600 (Mon, 02 Nov 2009) | 1 line prevent a rather unlikely segfault ........ r76105 | georg.brandl | 2009-11-04 01:38:12 -0600 (Wed, 04 Nov 2009) | 1 line #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs. ........ r76139 | benjamin.peterson | 2009-11-06 19:04:38 -0600 (Fri, 06 Nov 2009) | 1 line spelling ........ r76143 | georg.brandl | 2009-11-07 02:26:07 -0600 (Sat, 07 Nov 2009) | 1 line #7271: fix typo. ........ r76162 | benjamin.peterson | 2009-11-08 22:10:53 -0600 (Sun, 08 Nov 2009) | 1 line discuss how to use -p ........ r76223 | georg.brandl | 2009-11-12 02:29:46 -0600 (Thu, 12 Nov 2009) | 1 line Give the profile module a module directive. ........ --- command/check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/check.py b/command/check.py index 9a8fca1d5f..12844cbf9f 100644 --- a/command/check.py +++ b/command/check.py @@ -92,7 +92,7 @@ def check_metadata(self): missing.append(attr) if missing: - self.warn("missing required meta-data: %s" % ' ,'.join(missing)) + self.warn("missing required meta-data: %s" % ', '.join(missing)) if metadata.author: if not metadata.author_email: self.warn("missing meta-data: if 'author' supplied, " + From 83b75ba535abc50e9f0c9ac860903e0f97b28703 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 13 Nov 2009 02:29:35 +0000 Subject: [PATCH 2735/8469] Merged revisions 76235 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76235 | benjamin.peterson | 2009-11-12 20:25:08 -0600 (Thu, 12 Nov 2009) | 170 lines Merged revisions 75149,75260-75263,75265-75267,75292,75300,75376,75405,75429-75433,75437,75445,75501,75551,75572,75589-75591,75657,75742,75868,75952-75957,76057,76105,76139,76143,76162,76223 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75149 | gregory.p.smith | 2009-09-29 16:56:31 -0500 (Tue, 29 Sep 2009) | 3 lines Mention issue6972 in extractall docs about overwriting things outside of the supplied path. ........ r75260 | andrew.kuchling | 2009-10-05 16:24:20 -0500 (Mon, 05 Oct 2009) | 1 line Wording fix ........ r75261 | andrew.kuchling | 2009-10-05 16:24:35 -0500 (Mon, 05 Oct 2009) | 1 line Fix narkup ........ r75262 | andrew.kuchling | 2009-10-05 16:25:03 -0500 (Mon, 05 Oct 2009) | 1 line Document 'skip' parameter to constructor ........ r75263 | andrew.kuchling | 2009-10-05 16:25:35 -0500 (Mon, 05 Oct 2009) | 1 line Note side benefit of socket.create_connection() ........ r75265 | andrew.kuchling | 2009-10-05 17:31:11 -0500 (Mon, 05 Oct 2009) | 1 line Reword sentence ........ r75266 | andrew.kuchling | 2009-10-05 17:32:48 -0500 (Mon, 05 Oct 2009) | 1 line Use standard comma punctuation; reword some sentences in the docs ........ r75267 | andrew.kuchling | 2009-10-05 17:42:56 -0500 (Mon, 05 Oct 2009) | 1 line Backport r73983: Document the thousands separator. ........ r75292 | benjamin.peterson | 2009-10-08 22:11:36 -0500 (Thu, 08 Oct 2009) | 1 line death to old CVS keyword ........ r75300 | benjamin.peterson | 2009-10-09 16:48:14 -0500 (Fri, 09 Oct 2009) | 1 line fix some coding style ........ r75376 | benjamin.peterson | 2009-10-11 20:26:07 -0500 (Sun, 11 Oct 2009) | 1 line platform we don't care about ........ r75405 | neil.schemenauer | 2009-10-14 12:17:14 -0500 (Wed, 14 Oct 2009) | 4 lines Issue #1754094: Improve the stack depth calculation in the compiler. There should be no other effect than a small decrease in memory use. Patch by Christopher Tur Lesniewski-Laas. ........ r75429 | benjamin.peterson | 2009-10-14 20:47:28 -0500 (Wed, 14 Oct 2009) | 1 line pep8ify if blocks ........ r75430 | benjamin.peterson | 2009-10-14 20:49:37 -0500 (Wed, 14 Oct 2009) | 1 line use floor division and add a test that exercises the tabsize codepath ........ r75431 | benjamin.peterson | 2009-10-14 20:56:25 -0500 (Wed, 14 Oct 2009) | 1 line change test to what I intended ........ r75432 | benjamin.peterson | 2009-10-14 22:05:39 -0500 (Wed, 14 Oct 2009) | 1 line some cleanups ........ r75433 | benjamin.peterson | 2009-10-14 22:06:55 -0500 (Wed, 14 Oct 2009) | 1 line make inspect.isabstract() always return a boolean; add a test for it, too #7069 ........ r75437 | benjamin.peterson | 2009-10-15 10:44:46 -0500 (Thu, 15 Oct 2009) | 1 line only clear a module's __dict__ if the module is the only one with a reference to it #7140 ........ r75445 | vinay.sajip | 2009-10-16 09:06:44 -0500 (Fri, 16 Oct 2009) | 1 line Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE. ........ r75501 | antoine.pitrou | 2009-10-18 13:37:11 -0500 (Sun, 18 Oct 2009) | 3 lines Add a comment about unreachable code, and fix a typo ........ r75551 | benjamin.peterson | 2009-10-19 22:14:10 -0500 (Mon, 19 Oct 2009) | 1 line use property api ........ r75572 | benjamin.peterson | 2009-10-20 16:55:17 -0500 (Tue, 20 Oct 2009) | 1 line clarify buffer arg #7178 ........ r75589 | benjamin.peterson | 2009-10-21 21:26:47 -0500 (Wed, 21 Oct 2009) | 1 line whitespace ........ r75590 | benjamin.peterson | 2009-10-21 21:36:47 -0500 (Wed, 21 Oct 2009) | 1 line rewrite to be nice to other implementations ........ r75591 | benjamin.peterson | 2009-10-21 21:50:38 -0500 (Wed, 21 Oct 2009) | 4 lines rewrite for style, clarify, and comments Also, use the hasattr() like scheme of allowing BaseException exceptions through. ........ r75657 | antoine.pitrou | 2009-10-24 07:41:27 -0500 (Sat, 24 Oct 2009) | 3 lines Fix compilation error in debug mode. ........ r75742 | benjamin.peterson | 2009-10-26 17:51:16 -0500 (Mon, 26 Oct 2009) | 1 line use 'is' instead of id() ........ r75868 | benjamin.peterson | 2009-10-27 15:59:18 -0500 (Tue, 27 Oct 2009) | 1 line test expect base classes ........ r75952 | georg.brandl | 2009-10-29 15:38:32 -0500 (Thu, 29 Oct 2009) | 1 line Use the correct function name in docstring. ........ r75953 | georg.brandl | 2009-10-29 15:39:50 -0500 (Thu, 29 Oct 2009) | 1 line Remove mention of the old -X command line switch. ........ r75954 | georg.brandl | 2009-10-29 15:53:00 -0500 (Thu, 29 Oct 2009) | 1 line Use constants instead of magic integers for test result. Do not re-run with --verbose3 for environment changing tests. ........ r75955 | georg.brandl | 2009-10-29 15:54:03 -0500 (Thu, 29 Oct 2009) | 1 line Use a single style for all the docstrings in the math module. ........ r75956 | georg.brandl | 2009-10-29 16:16:34 -0500 (Thu, 29 Oct 2009) | 1 line I do not think the "railroad" program mentioned is still available. ........ r75957 | georg.brandl | 2009-10-29 16:44:56 -0500 (Thu, 29 Oct 2009) | 1 line Fix constant name. ........ r76057 | benjamin.peterson | 2009-11-02 09:06:45 -0600 (Mon, 02 Nov 2009) | 1 line prevent a rather unlikely segfault ........ r76105 | georg.brandl | 2009-11-04 01:38:12 -0600 (Wed, 04 Nov 2009) | 1 line #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs. ........ r76139 | benjamin.peterson | 2009-11-06 19:04:38 -0600 (Fri, 06 Nov 2009) | 1 line spelling ........ r76143 | georg.brandl | 2009-11-07 02:26:07 -0600 (Sat, 07 Nov 2009) | 1 line #7271: fix typo. ........ r76162 | benjamin.peterson | 2009-11-08 22:10:53 -0600 (Sun, 08 Nov 2009) | 1 line discuss how to use -p ........ r76223 | georg.brandl | 2009-11-12 02:29:46 -0600 (Thu, 12 Nov 2009) | 1 line Give the profile module a module directive. ........ ................ --- command/check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/check.py b/command/check.py index 9a8fca1d5f..12844cbf9f 100644 --- a/command/check.py +++ b/command/check.py @@ -92,7 +92,7 @@ def check_metadata(self): missing.append(attr) if missing: - self.warn("missing required meta-data: %s" % ' ,'.join(missing)) + self.warn("missing required meta-data: %s" % ', '.join(missing)) if metadata.author: if not metadata.author_email: self.warn("missing meta-data: if 'author' supplied, " + From 4f06b3cc70d5a1457c0a158b3a2f1be1c4ea851c Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 14 Nov 2009 20:01:49 +0100 Subject: [PATCH 2736/8469] nicer message when DistributionNotFound is raised --HG-- branch : distribute extra : rebase_source : b25209fbcd33b497cb92ed7d8f442403c4eaf152 --- CHANGES.txt | 1 + pkg_resources.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4e7ce3e3c6..f3072470f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ CHANGES Initial Patch by arfrever. * Issue 89: added a side bar with a download link to the doc. * Issue 86: fixed missing sentence in pkg_resources doc. +* Added a nicer error message when a DistributionNotFound is raised. ----- 0.6.8 diff --git a/pkg_resources.py b/pkg_resources.py index 963819326a..4975680d16 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -528,7 +528,9 @@ def resolve(self, requirements, env=None, installer=None, replacement=True): env = Environment(self.entries) dist = best[req.key] = env.best_match(req, self, installer) if dist is None: - raise DistributionNotFound(req) # XXX put more info here + msg = ("The '%s' distribution was not found on this " + "system, and is required by this application.") + raise DistributionNotFound(msg % req) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency From 9fc8282b30e40eb2c02c3e7bd28be5156e109a5c Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 15 Nov 2009 00:16:38 +0100 Subject: [PATCH 2737/8469] Fixed #80: test_develop fails with Python 3.1. I don't understand why the module is shadowed at this stage, but importing it fixes the problem. --HG-- branch : distribute extra : rebase_source : 9cbb38022787d08f0c8399e25829b10286fb655d --- CHANGES.txt | 1 + setuptools/command/__init__.py | 3 +++ setuptools/command/install_scripts.py | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f3072470f3..d9d75c8642 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,7 @@ CHANGES * Issue 89: added a side bar with a download link to the doc. * Issue 86: fixed missing sentence in pkg_resources doc. * Added a nicer error message when a DistributionNotFound is raised. +* Issue 80: test_develop now works with Python 3.1 ----- 0.6.8 diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index ea544b504e..d608871e08 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -5,13 +5,16 @@ 'register', 'bdist_wininst', 'upload_docs', ] +from setuptools.command.install_scripts import install_scripts import sys + if sys.version>='2.5': # In Python 2.5 and above, distutils includes its own upload command __all__.remove('upload') from distutils.command.bdist import bdist + if 'egg' not in bdist.format_commands: bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") bdist.format_commands.append('egg') diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index b1186dbac7..ac797883c7 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,6 +1,5 @@ from distutils.command.install_scripts import install_scripts \ as _install_scripts -from easy_install import get_script_args, sys_executable, chmod from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log @@ -13,6 +12,9 @@ def initialize_options(self): self.no_ep = False def run(self): + from setuptools.command.easy_install import (get_script_args, + sys_executable) + self.run_command("egg_info") if self.distribution.scripts: _install_scripts.run(self) # run first to set up self.outfiles @@ -37,6 +39,7 @@ def run(self): def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" + from setuptools.command.easy_install import chmod log.info("Installing %s script to %s", script_name, self.install_dir) target = os.path.join(self.install_dir, script_name) self.outfiles.append(target) From bd0d051d1484be495e22d4ed0576951f339a1222 Mon Sep 17 00:00:00 2001 From: Alice Bevan-McGregor Date: Sun, 15 Nov 2009 01:34:29 -0800 Subject: [PATCH 2738/8469] Fixed empty folder issue during upload_docs. --HG-- branch : distribute extra : rebase_source : b1e08e29f75d14970b7d4d57692c2e0013449637 --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 5bbdc7f2ff..29c62f2a05 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -50,7 +50,7 @@ def create_zipfile(self): tmp_file = os.path.join(tmp_dir, "%s.zip" % name) zip_file = zipfile.ZipFile(tmp_file, "w") for root, dirs, files in os.walk(self.upload_dir): - if not files: + if root == self.upload_dir and not files: raise DistutilsOptionError( "no files found in upload directory '%s'" % self.upload_dir) From 33886a7ecce2ec6269eade7a31baf055bd673802 Mon Sep 17 00:00:00 2001 From: Alice Bevan-McGregor Date: Sun, 15 Nov 2009 05:41:43 -0800 Subject: [PATCH 2739/8469] Added upload_docs unit test and fixed a bug in test_develop. --HG-- branch : distribute extra : rebase_source : 0ce56dee9fbf2976d41f403fb86d8a2f714820c2 --- setuptools/tests/test_develop.py | 2 +- setuptools/tests/test_upload_docs.py | 65 ++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 setuptools/tests/test_upload_docs.py diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 85a6c337bc..1d5fa14175 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -20,7 +20,7 @@ class TestDevelopTest(unittest.TestCase): def setUp(self): self.dir = tempfile.mkdtemp() - setup = os.path.join(self.dir, SETUP_PY) + setup = os.path.join(self.dir, 'setup.py') f = open(setup, 'w') f.write(SETUP_PY) f.close() diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py new file mode 100644 index 0000000000..15db899f4f --- /dev/null +++ b/setuptools/tests/test_upload_docs.py @@ -0,0 +1,65 @@ +"""build_ext tests +""" +import sys, os, shutil, tempfile, unittest, site, zipfile +from setuptools.command.upload_docs import upload_docs +from setuptools.dist import Distribution + +SETUP_PY = """\ +from setuptools import setup + +setup(name='foo') +""" + +class TestUploadDocsTest(unittest.TestCase): + def setUp(self): + self.dir = tempfile.mkdtemp() + setup = os.path.join(self.dir, 'setup.py') + f = open(setup, 'w') + f.write(SETUP_PY) + f.close() + self.old_cwd = os.getcwd() + os.chdir(self.dir) + + self.upload_dir = os.path.join(self.dir, 'build') + os.mkdir(self.upload_dir) + + # A test document. + f = open(os.path.join(self.upload_dir, 'index.html'), 'w') + f.write("Hello world.") + f.close() + + # An empty folder. + os.mkdir(os.path.join(self.upload_dir, 'empty')) + + if sys.version >= "2.6": + self.old_base = site.USER_BASE + site.USER_BASE = upload_docs.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp() + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.dir) + if sys.version >= "2.6": + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site + + def test_create_zipfile(self): + # Test to make sure zipfile creation handles common cases. + # This explicitly includes a folder containing an empty folder. + + dist = Distribution() + + cmd = upload_docs(dist) + cmd.upload_dir = self.upload_dir + zip_file = cmd.create_zipfile() + + assert zipfile.is_zipfile(zip_file) + + zip_f = zipfile.ZipFile(zip_file) # woh... + + assert zip_f.namelist() == ['index.html'] + + From 392651beb17ce276eb440a9c248eb80fadfcada7 Mon Sep 17 00:00:00 2001 From: Alice Bevan-McGregor Date: Sun, 15 Nov 2009 05:46:35 -0800 Subject: [PATCH 2740/8469] Added reference to issue 93 and name to contributors. I fixed two bugs and made a unit test. ;) --HG-- branch : distribute extra : rebase_source : e165924bba03d13593eec1f24b12f1a6b450d743 --- CHANGES.txt | 1 + CONTRIBUTORS.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d9d75c8642..537238c017 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,7 @@ CHANGES * Issue 86: fixed missing sentence in pkg_resources doc. * Added a nicer error message when a DistributionNotFound is raised. * Issue 80: test_develop now works with Python 3.1 +* Issue 93: upload_docs now works if there is an empty sub-directory. ----- 0.6.8 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index cf46bb95a1..8eb0aebc90 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -3,6 +3,7 @@ Contributors ============ * Alex Grönholm +* Alice Bevan-McGregor * Daniel Stutzbach * Hanno Schlichting * Jannis Leidel From 7d4d795a364e5f4aa3e883c88d355aa14c7501de Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 15 Nov 2009 14:48:32 +0100 Subject: [PATCH 2741/8469] merge dance --HG-- branch : distribute extra : rebase_source : 24b845b422ec56666a604338178598b9e1029465 --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..e1f704d8cb 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 571304664849464344561f3a1f25453b50135759 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 15 Nov 2009 15:02:08 +0100 Subject: [PATCH 2742/8469] fixed 70 --HG-- branch : distribute extra : rebase_source : 00a83b36c485d99b934d0bfb39fc07e932ee77a5 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 537238c017..b27b9b138f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ CHANGES * Added a nicer error message when a DistributionNotFound is raised. * Issue 80: test_develop now works with Python 3.1 * Issue 93: upload_docs now works if there is an empty sub-directory. +* Issue 70: exec bit on non-exec files ----- 0.6.8 From bc0d08d5773c2fcfae1ded350a6ad378508a59cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 18 Nov 2009 08:46:56 +0000 Subject: [PATCH 2743/8469] #7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install --- tests/test_msvc9compiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 21242a8eb9..69a393caf8 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -44,17 +44,17 @@ def test_reg_class(self): # looking for values that should exist on all # windows registeries versions. - path = r'Software\Microsoft\Notepad' - v = Reg.get_value(path, u"lfitalic") - self.assertTrue(v in (0, 1)) + path = r'Control Panel\Desktop' + v = Reg.get_value(path, u'dragfullwindows') + self.assertTrue(v in (u'0', u'1')) import _winreg HKCU = _winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') self.assertEquals(keys, None) - keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assertTrue('Notepad' in keys) + keys = Reg.read_keys(HKCU, r'Control Panel') + self.assertTrue('Desktop' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 4927915841d4a7a3bcfd0b2f9d824e9e06fee118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 18 Nov 2009 09:32:34 +0000 Subject: [PATCH 2744/8469] Merged revisions 76358 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76358 | tarek.ziade | 2009-11-18 09:46:56 +0100 (Wed, 18 Nov 2009) | 1 line #7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install ........ --- tests/test_msvc9compiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 73827988bb..7cf1a12ec7 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -44,17 +44,17 @@ def test_reg_class(self): # looking for values that should exist on all # windows registeries versions. - path = r'Software\Microsoft\Notepad' - v = Reg.get_value(path, "lfitalic") - self.assertTrue(v in (0, 1)) + path = r'Control Panel\Desktop' + v = Reg.get_value(path, 'dragfullwindows') + self.assertTrue(v in ('0', '1')) import winreg HKCU = winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') self.assertEquals(keys, None) - keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assertTrue('Notepad' in keys) + keys = Reg.read_keys(HKCU, r'Control Panel') + self.assertTrue('Desktop' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 6485ce9b0c624eb39ffb08c0bb264fedb8835be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 18 Nov 2009 10:19:38 +0000 Subject: [PATCH 2745/8469] Merged revisions 76360 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76360 | tarek.ziade | 2009-11-18 10:32:34 +0100 (Wed, 18 Nov 2009) | 9 lines Merged revisions 76358 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76358 | tarek.ziade | 2009-11-18 09:46:56 +0100 (Wed, 18 Nov 2009) | 1 line #7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install ........ ................ --- tests/test_msvc9compiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 73827988bb..7cf1a12ec7 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -44,17 +44,17 @@ def test_reg_class(self): # looking for values that should exist on all # windows registeries versions. - path = r'Software\Microsoft\Notepad' - v = Reg.get_value(path, "lfitalic") - self.assertTrue(v in (0, 1)) + path = r'Control Panel\Desktop' + v = Reg.get_value(path, 'dragfullwindows') + self.assertTrue(v in ('0', '1')) import winreg HKCU = winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') self.assertEquals(keys, None) - keys = Reg.read_keys(HKCU, r'Software\Microsoft') - self.assertTrue('Notepad' in keys) + keys = Reg.read_keys(HKCU, r'Control Panel') + self.assertTrue('Desktop' in keys) def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From fc29160b3da4e5c53e03a50bf167ea8147cdab11 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 18 Nov 2009 14:48:57 +0100 Subject: [PATCH 2746/8469] added image and headlines --HG-- branch : distribute extra : rebase_source : b528a1d8ad82a3df588ba124b442ad8ada530e2a --- docs/index.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index e64b8c8820..1d3cb25e29 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,7 +1,21 @@ Welcome to Distribute's documentation! ====================================== -Contents: +`Distribute` is a fork of the `Setuptools` project. + +Distribute is intended to replace Setuptools as the standard method for +working with Python module distributions. + +For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple: + +- Distribute is a drop-in replacement for Setuptools +- The code is actively maintained, and has over 10 commiters +- Distribute offers Python 3 support ! + +.. image:: http://python-distribute.org/pip_distribute.png + + +Documentation content: .. toctree:: :maxdepth: 2 From 3608b265680a9a04e19dc7e014ab8a3333dbd6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 19 Nov 2009 05:33:16 +0000 Subject: [PATCH 2747/8469] dragfullwindows can have value 2 --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 69a393caf8..1264854d0d 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, u'dragfullwindows') - self.assertTrue(v in (u'0', u'1')) + self.assertTrue(v in (u'0', u'1', u'2')) import _winreg HKCU = _winreg.HKEY_CURRENT_USER From 83bf5a149567b658f71d0b78a622752019c03608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 19 Nov 2009 05:39:00 +0000 Subject: [PATCH 2748/8469] Merged revisions 76399 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76399 | tarek.ziade | 2009-11-19 06:33:16 +0100 (Thu, 19 Nov 2009) | 1 line dragfullwindows can have value 2 ........ --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 7cf1a12ec7..05d34e604c 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') - self.assertTrue(v in ('0', '1')) + self.assertTrue(v in ('0', '1', '2')) import winreg HKCU = winreg.HKEY_CURRENT_USER From 2ed389d59093022bf097e0ee48edd6c7ff5520b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 19 Nov 2009 05:41:34 +0000 Subject: [PATCH 2749/8469] Merged revisions 76401 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76401 | tarek.ziade | 2009-11-19 06:39:00 +0100 (Thu, 19 Nov 2009) | 9 lines Merged revisions 76399 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76399 | tarek.ziade | 2009-11-19 06:33:16 +0100 (Thu, 19 Nov 2009) | 1 line dragfullwindows can have value 2 ........ ................ --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 7cf1a12ec7..05d34e604c 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -46,7 +46,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') - self.assertTrue(v in ('0', '1')) + self.assertTrue(v in ('0', '1', '2')) import winreg HKCU = winreg.HKEY_CURRENT_USER From 6acee8f5f4c9fe09ebfc6a042b2684b8be769802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 29 Nov 2009 22:20:30 +0000 Subject: [PATCH 2750/8469] Fixed #7408: dropped group ownership checking because it relies on os-specific rules --- tests/test_sdist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b8e3dca560..20b20aae0b 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -336,10 +336,13 @@ def test_make_distribution_owner_group(self): # making sure we have the good rights archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') archive = tarfile.open(archive_name) + + # note that we are not testing the group ownership here + # because, depending on the platforms and the container + # rights (see #7408) try: for member in archive.getmembers(): self.assertEquals(member.uid, os.getuid()) - self.assertEquals(member.gid, os.getgid()) finally: archive.close() From 8e0598f5a5773af651590ef4905b9eb624fe8ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 29 Nov 2009 22:24:57 +0000 Subject: [PATCH 2751/8469] Merged revisions 76588 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76588 | tarek.ziade | 2009-11-29 23:20:30 +0100 (Sun, 29 Nov 2009) | 1 line Fixed #7408: dropped group ownership checking because it relies on os-specific rules ........ --- tests/test_sdist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index c10e973ed7..e0f1e93768 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -336,10 +336,13 @@ def test_make_distribution_owner_group(self): # making sure we have the good rights archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') archive = tarfile.open(archive_name) + + # note that we are not testing the group ownership here + # because, depending on the platforms and the container + # rights (see #7408) try: for member in archive.getmembers(): self.assertEquals(member.uid, os.getuid()) - self.assertEquals(member.gid, os.getgid()) finally: archive.close() From 8159dbb1f94821a8ec481662a87914826fb8c7c4 Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 30 Nov 2009 15:22:16 +0100 Subject: [PATCH 2752/8469] displaying the package location --HG-- branch : distribute extra : rebase_source : bdc220d0997e6a50027bdaa96bf69e2bccd3415b --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4975680d16..70a3271093 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2262,7 +2262,7 @@ def insert_on(self, path, loc = None): if '0.7' in version: raise ValueError( "A 0.7-series setuptools cannot be installed " - "with distribute") + "with distribute. Found one at %s" % str(self.location)) if not loc: return From 67b9811dc7c6b59e5815e5b27620ef3e416488ac Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 2 Dec 2009 16:47:26 +0100 Subject: [PATCH 2753/8469] easy_install doesn't use a setup.cfg located in the working dir - fixes #99 --HG-- branch : distribute extra : rebase_source : 0ddcfcf2eb8ef650c248a1d5d86fe1b95100df10 --- CHANGES.txt | 2 ++ setuptools/command/easy_install.py | 8 +++++- setuptools/tests/test_easy_install.py | 40 ++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b27b9b138f..e6d2a6783e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,8 @@ CHANGES * Issue 80: test_develop now works with Python 3.1 * Issue 93: upload_docs now works if there is an empty sub-directory. * Issue 70: exec bit on non-exec files +* Issue 99: now easy_install doesn't usesa "setup.cfg" if any exists in + the working directory. ----- 0.6.8 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index de6ea9459c..fb8cd74f7f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1674,7 +1674,6 @@ def bootstrap(): import setuptools; argv0 = os.path.dirname(setuptools.__path__[0]) sys.argv[0] = argv0; sys.argv.append(argv0); main() - def main(argv=None, **kw): from setuptools import setup from setuptools.dist import Distribution @@ -1699,9 +1698,16 @@ def with_ei_usage(f): class DistributionWithoutHelpCommands(Distribution): common_usage = "" + def _show_help(self,*args,**kw): with_ei_usage(lambda: Distribution._show_help(self,*args,**kw)) + def find_config_files(self): + files = Distribution.find_config_files(self) + if 'setup.cfg' in files: + files.remove('setup.cfg') + return files + if argv is None: argv = sys.argv[1:] diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6ce20e42f8..95909ca766 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -2,7 +2,7 @@ """ import sys import os, shutil, tempfile, unittest -from setuptools.command.easy_install import easy_install, get_script_args +from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.dist import Distribution class FakeDist(object): @@ -27,6 +27,12 @@ def as_requirement(self): ) """ % sys.executable +SETUP_PY = """\ +from setuptools import setup + +setup(name='foo') +""" + class TestEasyInstallTest(unittest.TestCase): def test_install_site_py(self): @@ -52,3 +58,35 @@ def test_get_script_args(self): self.assertEquals(script, WANTED) + def test_no_setup_cfg(self): + # makes sure easy_install as a command (main) + # doesn't use a setup.cfg file that is located + # in the current working directory + dir = tempfile.mkdtemp() + setup_cfg = open(os.path.join(dir, 'setup.cfg'), 'w') + setup_cfg.write('[easy_install]\nfind_links = http://example.com') + setup_cfg.close() + setup_py = open(os.path.join(dir, 'setup.py'), 'w') + setup_py.write(SETUP_PY) + setup_py.close() + + from setuptools.dist import Distribution + + def _parse_command_line(self): + msg = 'Error: a local setup.cfg was used' + opts = self.command_options + if 'easy_install' in opts: + assert 'find_links' not in opts['easy_install'], msg + return self._old_parse_command_line + + Distribution._old_parse_command_line = Distribution.parse_command_line + Distribution.parse_command_line = _parse_command_line + + old_wd = os.getcwd() + try: + os.chdir(dir) + main([]) + finally: + os.chdir(old_wd) + shutil.rmtree(dir) + From ca0105cf105e6d8a6c3e552c82650de93dbe13b1 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 2 Dec 2009 17:07:26 +0100 Subject: [PATCH 2754/8469] more info about easy_install and setup.cfg refs #99 --HG-- branch : distribute extra : rebase_source : 390f6492ac8aee653132791ac32f90bc1434433a --- CHANGES.txt | 6 ++++-- docs/easy_install.txt | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e6d2a6783e..608a278ed6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,8 +15,10 @@ CHANGES * Issue 80: test_develop now works with Python 3.1 * Issue 93: upload_docs now works if there is an empty sub-directory. * Issue 70: exec bit on non-exec files -* Issue 99: now easy_install doesn't usesa "setup.cfg" if any exists in - the working directory. +* Issue 99: now the standalone easy_install command doesn't uses a + "setup.cfg" if any exists in the working directory. It will use it + only if triggered by ``install_requires`` from a setup.py call + (install, develop, etc). ----- 0.6.8 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 5fa8354240..3e39b8111b 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -628,6 +628,9 @@ until and unless you override them explicitly in an ``[easy_install]`` section. For more information, see also the current Python documentation on the `use and location of distutils configuration files `_. +Notice that ``easy_install`` will use the ``setup.cfg`` from the current +working directory only if it was triggered from ``setup.py`` through the +``install_requires`` option. The standalone command will not use that file. Command-Line Options -------------------- @@ -904,7 +907,7 @@ Command-Line Options projects, not in-development ones, because such projects may not have a currently-valid version number. So, it usually only installs them when their ``setup.py`` directory is explicitly passed on the command line. - + However, if this option is used, then any in-development projects that were installed using the ``setup.py develop`` command, will be used to build eggs, effectively upgrading the "in-development" project to a snapshot @@ -1257,7 +1260,7 @@ History installed using ``setup.py develop``. * Fixed not HTML-decoding URLs scraped from web pages - + 0.6c5 * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg is installed unzipped. From 97ba6f9c79ad12e0fbefc6aa947e0351f9cca9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Dec 2009 20:53:51 +0000 Subject: [PATCH 2755/8469] Issue #4120: Drop reference to CRT from manifest when building extensions with msvc9compiler. --- msvc9compiler.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/msvc9compiler.py b/msvc9compiler.py index 00d76d4bea..c2287d9291 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,6 +17,7 @@ import os import subprocess import sys +import re from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -646,6 +647,28 @@ def link(self, mfid = 1 else: mfid = 2 + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(temp_manifest, "rb") + manifest_buf = manifest_f.read() + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(temp_manifest, "wb") + manifest_f.write(manifest_buf) + manifest_f.close() + except IOError: + pass out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', From 0222ecd7eaa7541d1515387342da5bb8ee3d4a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Dec 2009 20:56:15 +0000 Subject: [PATCH 2756/8469] Merged revisions 76651 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76651 | martin.v.loewis | 2009-12-03 21:53:51 +0100 (Do, 03 Dez 2009) | 3 lines Issue #4120: Drop reference to CRT from manifest when building extensions with msvc9compiler. ........ --- msvc9compiler.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 68b7775830..9bf54c102d 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,6 +17,7 @@ import os import subprocess import sys +import re from distutils.errors import (DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError) from distutils.ccompiler import (CCompiler, gen_preprocess_options, @@ -641,7 +642,32 @@ def link(self, # will still consider the DLL up-to-date, but it will not have a # manifest. Maybe we should link to a temp file? OTOH, that # implies a build environment error that shouldn't go undetected. - mfid = 1 if target_desc == CCompiler.EXECUTABLE else 2 + if target_desc == CCompiler.EXECUTABLE: + mfid = 1 + else: + mfid = 2 + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(temp_manifest, "rb") + manifest_buf = manifest_f.read() + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(temp_manifest, "wb") + manifest_f.write(manifest_buf) + manifest_f.close() + except IOError: + pass out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', From 14820811451bddfe8c54b9bf234bb18953575046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Dec 2009 20:57:49 +0000 Subject: [PATCH 2757/8469] Merged revisions 76651 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76651 | martin.v.loewis | 2009-12-03 21:53:51 +0100 (Do, 03 Dez 2009) | 3 lines Issue #4120: Drop reference to CRT from manifest when building extensions with msvc9compiler. ........ --- msvc9compiler.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/msvc9compiler.py b/msvc9compiler.py index ef895422c6..c84fb0b4a6 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,6 +17,7 @@ import os import subprocess import sys +import re from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -645,6 +646,28 @@ def link(self, mfid = 1 else: mfid = 2 + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(temp_manifest, "rb") + manifest_buf = manifest_f.read() + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(temp_manifest, "wb") + manifest_f.write(manifest_buf) + manifest_f.close() + except IOError: + pass out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', From 625012af0113a6500c0a95a81ba0fdda5a2f0b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 3 Dec 2009 21:14:10 +0000 Subject: [PATCH 2758/8469] Merged revisions 76653 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76653 | martin.v.loewis | 2009-12-03 21:57:49 +0100 (Do, 03 Dez 2009) | 10 lines Merged revisions 76651 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76651 | martin.v.loewis | 2009-12-03 21:53:51 +0100 (Do, 03 Dez 2009) | 3 lines Issue #4120: Drop reference to CRT from manifest when building extensions with msvc9compiler. ........ ................ --- msvc9compiler.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/msvc9compiler.py b/msvc9compiler.py index ef895422c6..c84fb0b4a6 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -17,6 +17,7 @@ import os import subprocess import sys +import re from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -645,6 +646,28 @@ def link(self, mfid = 1 else: mfid = 2 + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(temp_manifest, "rb") + manifest_buf = manifest_f.read() + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(temp_manifest, "wb") + manifest_f.write(manifest_buf) + manifest_f.close() + except IOError: + pass out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', From f7279ede282b895e789b05ababb65ba4f6436160 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 4 Dec 2009 11:20:36 +0100 Subject: [PATCH 2759/8469] Allowing 'os.devnull' in Sandbox, fixes #101 --HG-- branch : distribute extra : rebase_source : d6f63794621874eb637139f353314256e02e02df --- CHANGES.txt | 1 + setuptools/sandbox.py | 8 ++++++-- setuptools/tests/test_sandbox.py | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 setuptools/tests/test_sandbox.py diff --git a/CHANGES.txt b/CHANGES.txt index 608a278ed6..422685a916 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,7 @@ CHANGES "setup.cfg" if any exists in the working directory. It will use it only if triggered by ``install_requires`` from a setup.py call (install, develop, etc). +* Issue 101: Allowing ``os.devnull`` in Sandbox ----- 0.6.8 diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 7b48783344..502598ca4d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -152,6 +152,8 @@ def _remap_pair(self,operation,src,dst,*args,**kw): ) +_EXCEPTIONS = [os.devnull,] + class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" @@ -160,9 +162,10 @@ class DirectorySandbox(AbstractSandbox): "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam", ]) - def __init__(self,sandbox): + def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) self._prefix = os.path.join(self._sandbox,'') + self._exceptions = exceptions AbstractSandbox.__init__(self) def _violation(self, operation, *args, **kw): @@ -187,7 +190,8 @@ def _ok(self,path): try: self._active = False realpath = os.path.normcase(os.path.realpath(path)) - if realpath==self._sandbox or realpath.startswith(self._prefix): + if (realpath in self._exceptions or realpath == self._sandbox + or realpath.startswith(self._prefix)): return True finally: self._active = active diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py new file mode 100644 index 0000000000..1b0dc4eaba --- /dev/null +++ b/setuptools/tests/test_sandbox.py @@ -0,0 +1,28 @@ +"""develop tests +""" +import sys +import os +import shutil +import unittest +import tempfile + +from setuptools.sandbox import DirectorySandbox + +class TestSandbox(unittest.TestCase): + + def setUp(self): + self.dir = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.dir) + + def test_devnull(self): + sandbox = DirectorySandbox(self.dir) + + def _write(): + f = open(os.devnull, 'w') + f.write('xxx') + f.close() + + sandbox.run(_write) + From 7ed6e18a1d4705bf067be40df44b831d9bab21e6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 5 Dec 2009 17:47:56 +0000 Subject: [PATCH 2760/8469] bump version to 2.7a1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e418214c48..e8c213e4c7 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.6" +__version__ = "2.7a1" #--end constants-- From c9eb6ca234ce508e2232b761158c9439e59139f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 6 Dec 2009 09:22:40 +0000 Subject: [PATCH 2761/8469] Fixed #1923: make sure we don't strip meaningful whitespace in PKG-INFO Description field --- tests/test_dist.py | 16 ++++++++++++++++ util.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 573d0b9b4f..8b141ca675 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -6,6 +6,7 @@ import sys import unittest import warnings +import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command @@ -381,6 +382,21 @@ def test_show_help(self): if line.strip() != ''] self.assertTrue(len(output) > 0) + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = distutils.dist.Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertTrue(long_desc in meta) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) diff --git a/util.py b/util.py index 6bff44f786..b8e4952fee 100644 --- a/util.py +++ b/util.py @@ -558,8 +558,8 @@ def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = [x.strip() for x in header.split('\n')] - sep = '\n' + 8*' ' + lines = header.split('\n') + sep = '\n' + 8 * ' ' return sep.join(lines) _RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') From 22b0f60962726ce1e614393de0af8061572adff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 6 Dec 2009 09:26:45 +0000 Subject: [PATCH 2762/8469] Merged revisions 76684 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76684 | tarek.ziade | 2009-12-06 10:22:40 +0100 (Sun, 06 Dec 2009) | 1 line Fixed #1923: make sure we don't strip meaningful whitespace in PKG-INFO Description field ........ --- tests/test_dist.py | 16 ++++++++++++++++ util.py | 1 - 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index bf59c41844..af40186315 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -9,6 +9,7 @@ import sys import unittest import warnings +import textwrap from test.test_support import TESTFN @@ -283,6 +284,21 @@ def test_custom_pydistutils(self): os.environ[key] = value os.remove(user_filename) + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = distutils.dist.Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertTrue(long_desc in meta) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) diff --git a/util.py b/util.py index ee5829b077..7bc52f195b 100644 --- a/util.py +++ b/util.py @@ -559,6 +559,5 @@ def rfc822_escape (header): RFC-822 header, by ensuring there are 8 spaces space after each newline. """ lines = string.split(header, '\n') - lines = map(string.strip, lines) header = string.join(lines, '\n' + 8*' ') return header From 927dabee9d54b17bad408b8188ed533ffa38c694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 6 Dec 2009 09:28:17 +0000 Subject: [PATCH 2763/8469] Merged revisions 76684 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76684 | tarek.ziade | 2009-12-06 10:22:40 +0100 (Sun, 06 Dec 2009) | 1 line Fixed #1923: make sure we don't strip meaningful whitespace in PKG-INFO Description field ........ --- tests/test_dist.py | 16 ++++++++++++++++ util.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index b1b184ea18..0e7d532df0 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -5,6 +5,7 @@ import sys import unittest import warnings +import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command @@ -353,6 +354,21 @@ def test_show_help(self): if line.strip() != ''] self.assertTrue(len(output) > 0) + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = distutils.dist.Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertTrue(long_desc in meta) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) diff --git a/util.py b/util.py index a50621e3f4..cca7b49f5e 100644 --- a/util.py +++ b/util.py @@ -557,8 +557,8 @@ def rfc822_escape(header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = [x.strip() for x in header.split('\n')] - sep = '\n' + 8*' ' + lines = header.split('\n') + sep = '\n' + 8 * ' ' return sep.join(lines) _RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') From b42ca30f8ba473876220a2b63848c63bf22cbfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 6 Dec 2009 09:30:47 +0000 Subject: [PATCH 2764/8469] Merged revisions 76686 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76686 | tarek.ziade | 2009-12-06 10:28:17 +0100 (Sun, 06 Dec 2009) | 9 lines Merged revisions 76684 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76684 | tarek.ziade | 2009-12-06 10:22:40 +0100 (Sun, 06 Dec 2009) | 1 line Fixed #1923: make sure we don't strip meaningful whitespace in PKG-INFO Description field ........ ................ --- tests/test_dist.py | 16 ++++++++++++++++ util.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 5f96b97f9e..3b7637f3af 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -5,6 +5,7 @@ import sys import unittest import warnings +import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command @@ -301,6 +302,21 @@ def test_show_help(self): if line.strip() != ''] self.assertTrue(len(output) > 0) + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertTrue(long_desc in meta) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) diff --git a/util.py b/util.py index 4bc4c98413..50ad8fef98 100644 --- a/util.py +++ b/util.py @@ -557,8 +557,8 @@ def rfc822_escape (header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = [x.strip() for x in header.split('\n')] - sep = '\n' + 8*' ' + lines = header.split('\n') + sep = '\n' + 8 * ' ' return sep.join(lines) # 2to3 support From 3eb783e76d5bcac42d64a560aefceff662b5f8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 8 Dec 2009 08:56:49 +0000 Subject: [PATCH 2765/8469] Issue #7457: added a read_pkg_file method to distutils.dist.DistributionMetadata so we can read back PKG-INFO files --- dist.py | 91 +++++++++++++++++++++++++++++++++++++--------- tests/test_dist.py | 31 +++++++++++++++- 2 files changed, 103 insertions(+), 19 deletions(-) diff --git a/dist.py b/dist.py index 8dc64d43da..a1fc7b36fc 100644 --- a/dist.py +++ b/dist.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import sys, os, re +import rfc822 try: import warnings @@ -1006,6 +1007,20 @@ def is_pure(self): # to self.metadata.get_XXX. The actual code is in the # DistributionMetadata class, below. +class _MetadataMessage(rfc822.Message): + + def read_field(self, name): + value = self[name] + if value == 'UNKNOWN': + return None + return value + + def getheaders(self, name, default): + values = rfc822.Message.getheaders(self, name) + if values == []: + return None + return values + class DistributionMetadata: """Dummy class to hold the distribution meta-data: name, version, author, and so forth. @@ -1021,25 +1036,67 @@ class DistributionMetadata: "provides", "requires", "obsoletes", ) - def __init__ (self): - self.name = None - self.version = None - self.author = None - self.author_email = None + def __init__(self, path=None): + if path is not None: + self.read_pkg_file(open(path)) + else: + self.name = None + self.version = None + self.author = None + self.author_email = None + self.maintainer = None + self.maintainer_email = None + self.url = None + self.license = None + self.description = None + self.long_description = None + self.keywords = None + self.platforms = None + self.classifiers = None + self.download_url = None + # PEP 314 + self.provides = None + self.requires = None + self.obsoletes = None + + def read_pkg_file(self, file): + """Reads the metadata values from a file object.""" + msg = _MetadataMessage(file) + metadata_version = msg['metadata-version'] + self.name = msg.read_field('name') + self.version = msg.read_field('version') + self.description = msg.read_field('summary') + # we are filling author only. + self.author = msg.read_field('author') self.maintainer = None + self.author_email = msg.read_field('author-email') self.maintainer_email = None - self.url = None - self.license = None - self.description = None - self.long_description = None - self.keywords = None - self.platforms = None - self.classifiers = None - self.download_url = None - # PEP 314 - self.provides = None - self.requires = None - self.obsoletes = None + self.url = msg.read_field('home-page') + self.license = msg.read_field('license') + + if 'download-url' in msg: + self.download_url = msg.read_field('download-url') + else: + self.download_url = None + + self.long_description = msg.read_field('description') + self.description = msg.read_field('summary') + + if 'keywords' in msg: + self.keywords = msg.read_field('keywords').split(',') + + self.platforms = msg.getheaders('platform', None) + self.classifiers = msg.getheaders('classifier', None) + + # PEP 314 - these fields only exist in 1.1 + if metadata_version == '1.1': + self.requires = msg.getheaders('requires', None) + self.provides = msg.getheaders('provides', None) + self.obsoletes = msg.getheaders('obsoletes', None) + else: + self.requires = None + self.provides = None + self.obsoletes = None def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. diff --git a/tests/test_dist.py b/tests/test_dist.py index 8b141ca675..1eddf6d25c 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,10 +8,9 @@ import warnings import textwrap -from distutils.dist import Distribution, fix_help_options +from distutils.dist import Distribution, fix_help_options, DistributionMetadata from distutils.cmd import Command import distutils.dist - from test.test_support import TESTFN, captured_stdout from distutils.tests import support @@ -239,6 +238,7 @@ def _expander(path): # make sure --no-user-cfg disables the user cfg file self.assertEquals(len(all_files)-1, len(files)) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): @@ -397,6 +397,33 @@ def test_long_description(self): meta = meta.replace('\n' + 8 * ' ', '\n') self.assertTrue(long_desc in meta) + def test_read_metadata(self): + attrs = {"name": "package", + "version": "1.0", + "long_description": "desc", + "description": "xxx", + "download_url": "http://example.com", + "keywords": ['one', 'two'], + "requires": ['foo']} + + dist = Distribution(attrs) + metadata = dist.metadata + + # write it then reloads it + PKG_INFO = StringIO.StringIO() + metadata.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) + metadata.read_pkg_file(PKG_INFO) + + self.assertEquals(metadata.name, "package") + self.assertEquals(metadata.version, "1.0") + self.assertEquals(metadata.description, "xxx") + self.assertEquals(metadata.download_url, 'http://example.com') + self.assertEquals(metadata.keywords, ['one', 'two']) + self.assertEquals(metadata.platforms, ['UNKNOWN']) + self.assertEquals(metadata.obsoletes, None) + self.assertEquals(metadata.requires, ['foo']) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From b1a6b3c4c91509df552929a26e5bc1cc31ce6b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 8 Dec 2009 09:39:51 +0000 Subject: [PATCH 2766/8469] removed the usage of rfc822 in favor of email.message.Message --- dist.py | 63 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/dist.py b/dist.py index a1fc7b36fc..ee2cec9088 100644 --- a/dist.py +++ b/dist.py @@ -7,7 +7,7 @@ __revision__ = "$Id$" import sys, os, re -import rfc822 +from email import message_from_file try: import warnings @@ -1007,20 +1007,6 @@ def is_pure(self): # to self.metadata.get_XXX. The actual code is in the # DistributionMetadata class, below. -class _MetadataMessage(rfc822.Message): - - def read_field(self, name): - value = self[name] - if value == 'UNKNOWN': - return None - return value - - def getheaders(self, name, default): - values = rfc822.Message.getheaders(self, name) - if values == []: - return None - return values - class DistributionMetadata: """Dummy class to hold the distribution meta-data: name, version, author, and so forth. @@ -1061,38 +1047,51 @@ def __init__(self, path=None): def read_pkg_file(self, file): """Reads the metadata values from a file object.""" - msg = _MetadataMessage(file) + msg = message_from_file(file) + + def _read_field(name): + value = msg[name] + if value == 'UNKNOWN': + return None + return value + + def _read_list(name): + values = msg.get_all(name, None) + if values == []: + return None + return values + metadata_version = msg['metadata-version'] - self.name = msg.read_field('name') - self.version = msg.read_field('version') - self.description = msg.read_field('summary') + self.name = _read_field('name') + self.version = _read_field('version') + self.description = _read_field('summary') # we are filling author only. - self.author = msg.read_field('author') + self.author = _read_field('author') self.maintainer = None - self.author_email = msg.read_field('author-email') + self.author_email = _read_field('author-email') self.maintainer_email = None - self.url = msg.read_field('home-page') - self.license = msg.read_field('license') + self.url = _read_field('home-page') + self.license = _read_field('license') if 'download-url' in msg: - self.download_url = msg.read_field('download-url') + self.download_url = _read_field('download-url') else: self.download_url = None - self.long_description = msg.read_field('description') - self.description = msg.read_field('summary') + self.long_description = _read_field('description') + self.description = _read_field('summary') if 'keywords' in msg: - self.keywords = msg.read_field('keywords').split(',') + self.keywords = _read_field('keywords').split(',') - self.platforms = msg.getheaders('platform', None) - self.classifiers = msg.getheaders('classifier', None) + self.platforms = _read_list('platform') + self.classifiers = _read_list('classifier') # PEP 314 - these fields only exist in 1.1 if metadata_version == '1.1': - self.requires = msg.getheaders('requires', None) - self.provides = msg.getheaders('provides', None) - self.obsoletes = msg.getheaders('obsoletes', None) + self.requires = _read_list('requires') + self.provides = _read_list('provides') + self.obsoletes = _read_list('obsoletes') else: self.requires = None self.provides = None From 6b16b3a1e6c1519906b509b8f906e1605557b5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 8 Dec 2009 09:45:25 +0000 Subject: [PATCH 2767/8469] Merged revisions 76702,76704 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76702 | tarek.ziade | 2009-12-08 09:56:49 +0100 (Tue, 08 Dec 2009) | 1 line Issue #7457: added a read_pkg_file method to distutils.dist.DistributionMetadata so we can read back PKG-INFO files ........ r76704 | tarek.ziade | 2009-12-08 10:39:51 +0100 (Tue, 08 Dec 2009) | 1 line removed the usage of rfc822 in favor of email.message.Message ........ --- dist.py | 90 +++++++++++++++++++++++++++++++++++++--------- tests/test_dist.py | 29 ++++++++++++++- 2 files changed, 101 insertions(+), 18 deletions(-) diff --git a/dist.py b/dist.py index 90af6e2d3b..353525e17d 100644 --- a/dist.py +++ b/dist.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import sys, os, re +from email import message_from_file try: import warnings @@ -1014,25 +1015,80 @@ class DistributionMetadata: "provides", "requires", "obsoletes", ) - def __init__ (self): - self.name = None - self.version = None - self.author = None - self.author_email = None + def __init__(self, path=None): + if path is not None: + self.read_pkg_file(open(path)) + else: + self.name = None + self.version = None + self.author = None + self.author_email = None + self.maintainer = None + self.maintainer_email = None + self.url = None + self.license = None + self.description = None + self.long_description = None + self.keywords = None + self.platforms = None + self.classifiers = None + self.download_url = None + # PEP 314 + self.provides = None + self.requires = None + self.obsoletes = None + + def read_pkg_file(self, file): + """Reads the metadata values from a file object.""" + msg = message_from_file(file) + + def _read_field(name): + value = msg[name] + if value == 'UNKNOWN': + return None + return value + + def _read_list(name): + values = msg.get_all(name, None) + if values == []: + return None + return values + + metadata_version = msg['metadata-version'] + self.name = _read_field('name') + self.version = _read_field('version') + self.description = _read_field('summary') + # we are filling author only. + self.author = _read_field('author') self.maintainer = None + self.author_email = _read_field('author-email') self.maintainer_email = None - self.url = None - self.license = None - self.description = None - self.long_description = None - self.keywords = None - self.platforms = None - self.classifiers = None - self.download_url = None - # PEP 314 - self.provides = None - self.requires = None - self.obsoletes = None + self.url = _read_field('home-page') + self.license = _read_field('license') + + if 'download-url' in msg: + self.download_url = _read_field('download-url') + else: + self.download_url = None + + self.long_description = _read_field('description') + self.description = _read_field('summary') + + if 'keywords' in msg: + self.keywords = _read_field('keywords').split(',') + + self.platforms = _read_list('platform') + self.classifiers = _read_list('classifier') + + # PEP 314 - these fields only exist in 1.1 + if metadata_version == '1.1': + self.requires = _read_list('requires') + self.provides = _read_list('provides') + self.obsoletes = _read_list('obsoletes') + else: + self.requires = None + self.provides = None + self.obsoletes = None def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. diff --git a/tests/test_dist.py b/tests/test_dist.py index 0e7d532df0..4f51c16e51 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -7,7 +7,7 @@ import warnings import textwrap -from distutils.dist import Distribution, fix_help_options +from distutils.dist import Distribution, fix_help_options, DistributionMetadata from distutils.cmd import Command import distutils.dist @@ -369,6 +369,33 @@ def test_long_description(self): meta = meta.replace('\n' + 8 * ' ', '\n') self.assertTrue(long_desc in meta) + def test_read_metadata(self): + attrs = {"name": "package", + "version": "1.0", + "long_description": "desc", + "description": "xxx", + "download_url": "http://example.com", + "keywords": ['one', 'two'], + "requires": ['foo']} + + dist = Distribution(attrs) + metadata = dist.metadata + + # write it then reloads it + PKG_INFO = io.StringIO() + metadata.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) + metadata.read_pkg_file(PKG_INFO) + + self.assertEquals(metadata.name, "package") + self.assertEquals(metadata.version, "1.0") + self.assertEquals(metadata.description, "xxx") + self.assertEquals(metadata.download_url, 'http://example.com') + self.assertEquals(metadata.keywords, ['one', 'two']) + self.assertEquals(metadata.platforms, ['UNKNOWN']) + self.assertEquals(metadata.obsoletes, None) + self.assertEquals(metadata.requires, ['foo']) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From 769868e0309a3e8b454d1638cd50d5883ef5b2f2 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 10 Dec 2009 10:27:09 +0000 Subject: [PATCH 2768/8469] Fix an issue with the detection of a non-existing SDK on OSX. Without this patch it wasn't possible after all to compile extensions on OSX 10.6 with the binary installer unless the user had installed the (non-default) 10.4u SDK. --- sysconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 6ca6720adb..f3b2aca613 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -563,7 +563,7 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): @@ -582,7 +582,7 @@ def get_config_vars(*args): if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): @@ -606,7 +606,7 @@ def get_config_vars(*args): if m is not None: sdk = m.group(1) if not os.path.exists(sdk): - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): From dde1c67ea48a115d96ccddc0f0e4ff44dfd0d286 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 10 Dec 2009 10:29:05 +0000 Subject: [PATCH 2769/8469] Merged revisions 76738 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76738 | ronald.oussoren | 2009-12-10 11:27:09 +0100 (Thu, 10 Dec 2009) | 6 lines Fix an issue with the detection of a non-existing SDK on OSX. Without this patch it wasn't possible after all to compile extensions on OSX 10.6 with the binary installer unless the user had installed the (non-default) 10.4u SDK. ........ --- sysconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 8306202fb3..54ccec4953 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -537,7 +537,7 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): @@ -556,7 +556,7 @@ def get_config_vars(*args): if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): @@ -580,7 +580,7 @@ def get_config_vars(*args): if m is not None: sdk = m.group(1) if not os.path.exists(sdk): - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): From b74e204f60de97245539398db20bc1ab8e2152de Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 10 Dec 2009 13:30:30 +0100 Subject: [PATCH 2770/8469] fixed the MacPorts failure when platform.mac_ver() fails - fixes #92 --HG-- branch : distribute extra : rebase_source : b8bf9830479ce1433cf6c0b0c97c628a2876675c --- CHANGES.txt | 2 ++ pkg_resources.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 422685a916..34fb5d488a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,8 @@ CHANGES only if triggered by ``install_requires`` from a setup.py call (install, develop, etc). * Issue 101: Allowing ``os.devnull`` in Sandbox +* Issue 92: Fixed the "no eggs" found error with MacPort + (platform.mac_ver() fails) ----- 0.6.8 diff --git a/pkg_resources.py b/pkg_resources.py index 70a3271093..4684163149 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -186,6 +186,16 @@ def _macosx_vers(_cache=[]): if not _cache: import platform version = platform.mac_ver()[0] + # fallback for MacPorts + if version == '': + import re + version_file = '/System/Library/CoreServices/SystemVersion.plist' + version_regexp = r'ProductVersion\n\t(.*?)' + if os.path.exists(version_file): + osx_version = open(version_file).read() + osx_version = re.findall(version_regexp, osx_version, re.M) + if len(osx_version) > 0: + version = osx_version[0] _cache.append(version.split('.')) return _cache[0] From b9554b5bc4ca05034d3b9dce876b684fd0482c4a Mon Sep 17 00:00:00 2001 From: tarek Date: Thu, 10 Dec 2009 16:20:18 +0100 Subject: [PATCH 2771/8469] Uses plistlib instead of re. Thanks Florian refs #92 --HG-- branch : distribute extra : rebase_source : f3e61a21dc640a621364736b2a60fa9eb337ae1b --- pkg_resources.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 4684163149..9f1baca404 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -188,14 +188,13 @@ def _macosx_vers(_cache=[]): version = platform.mac_ver()[0] # fallback for MacPorts if version == '': - import re - version_file = '/System/Library/CoreServices/SystemVersion.plist' - version_regexp = r'ProductVersion\n\t(.*?)' - if os.path.exists(version_file): - osx_version = open(version_file).read() - osx_version = re.findall(version_regexp, osx_version, re.M) - if len(osx_version) > 0: - version = osx_version[0] + import plistlib + plist = '/System/Library/CoreServices/SystemVersion.plist' + if os.path.exists(plist): + plist_content = plistlib.readPlist(plist) + if 'ProductVersion' in plist_content: + version = plist_content['ProductVersion'] + _cache.append(version.split('.')) return _cache[0] From c96d565a9308ae6781dacdcc8d016445bbca75a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 10 Dec 2009 15:29:03 +0000 Subject: [PATCH 2772/8469] added test coverage for distutils.dep_util, and cleaned up the module --- dep_util.py | 68 +++++++++++++-------------- tests/test_dep_util.py | 101 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 37 deletions(-) create mode 100644 tests/test_dep_util.py diff --git a/dep_util.py b/dep_util.py index 39eecfb248..4e40df6899 100644 --- a/dep_util.py +++ b/dep_util.py @@ -9,29 +9,27 @@ import os from distutils.errors import DistutilsFileError +def newer(source, target): + """Tells if the target is newer than the source. -def newer (source, target): - """Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. Return false if - both exist and 'target' is the same age or younger than 'source'. - Raise DistutilsFileError if 'source' does not exist. + Return true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. + + Return false if both exist and 'target' is the same age or younger + than 'source'. Raise DistutilsFileError if 'source' does not exist. + + Note that this test is not very accurate: files created in the same second + will have the same "age". """ if not os.path.exists(source): - raise DistutilsFileError, ("file '%s' does not exist" % - os.path.abspath(source)) + raise DistutilsFileError("file '%s' does not exist" % + os.path.abspath(source)) if not os.path.exists(target): - return 1 - - from stat import ST_MTIME - mtime1 = os.stat(source)[ST_MTIME] - mtime2 = os.stat(target)[ST_MTIME] - - return mtime1 > mtime2 - -# newer () + return True + return os.stat(source).st_mtime > os.stat(target).st_mtime -def newer_pairwise (sources, targets): +def newer_pairwise(sources, targets): """Walk two filename lists in parallel, testing if each source is newer than its corresponding target. Return a pair of lists (sources, targets) where source is newer than target, according to the semantics @@ -43,19 +41,18 @@ def newer_pairwise (sources, targets): # build a pair of lists (sources, targets) where source is newer n_sources = [] n_targets = [] - for i in range(len(sources)): - if newer(sources[i], targets[i]): - n_sources.append(sources[i]) - n_targets.append(targets[i]) + for source, target in zip(sources, targets): + if newer(source, target): + n_sources.append(source) + n_targets.append(target) - return (n_sources, n_targets) + return n_sources, n_targets -# newer_pairwise () - - -def newer_group (sources, target, missing='error'): +def newer_group(sources, target, missing='error'): """Return true if 'target' is out-of-date with respect to any file - listed in 'sources'. In other words, if 'target' exists and is newer + listed in 'sources'. + + In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise return true. 'missing' controls what we do when a source file is missing; the default ("error") is to blow up with an OSError from inside 'stat()'; @@ -68,14 +65,14 @@ def newer_group (sources, target, missing='error'): """ # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists(target): - return 1 + return True # Otherwise we have to find out the hard way: if *any* source file # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. - from stat import ST_MTIME - target_mtime = os.stat(target)[ST_MTIME] + target_mtime = os.stat(target).st_mtime + for source in sources: if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file @@ -83,12 +80,9 @@ def newer_group (sources, target, missing='error'): elif missing == 'ignore': # missing source dropped from continue # target's dependency list elif missing == 'newer': # missing source means target is - return 1 # out-of-date + return True # out-of-date - source_mtime = os.stat(source)[ST_MTIME] - if source_mtime > target_mtime: - return 1 - else: - return 0 + if os.stat(source).st_mtime > target_mtime: + return True -# newer_group () + return False diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py new file mode 100644 index 0000000000..21fc7bc0b9 --- /dev/null +++ b/tests/test_dep_util.py @@ -0,0 +1,101 @@ +"""Tests for distutils.dep_util.""" +import unittest +import os +import time + +from distutils.dep_util import newer, newer_pairwise, newer_group +from distutils.errors import DistutilsFileError +from distutils.tests import support + +# XXX needs to be tuned for the various platforms +_ST_MIME_TIMER = 1 + +class DepUtilTestCase(support.TempdirManager, unittest.TestCase): + + def test_newer(self): + tmpdir = self.mkdtemp() + target = os.path.join(tmpdir, 'target') + source = os.path.join(tmpdir, 'source') + + # Raise DistutilsFileError if 'source' does not exist. + self.assertRaises(DistutilsFileError, newer, target, source) + + # Return true if 'source' exists and is more recently modified than + # 'target', or if 'source' exists and 'target' doesn't. + self.write_file(target) + self.assertTrue(newer(target, source)) + self.write_file(source, 'xox') + time.sleep(_ST_MIME_TIMER) # ensures ST_MTIME differs + self.write_file(target, 'xhx') + self.assertTrue(newer(target, source)) + + # Return false if both exist and 'target' is the same age or younger + # than 'source'. + self.write_file(source, 'xox'); self.write_file(target, 'xhx') + self.assertFalse(newer(target, source)) + self.write_file(target, 'xox') + time.sleep(_ST_MIME_TIMER) + self.write_file(source, 'xhx') + self.assertFalse(newer(target, source)) + + def test_newer_pairwise(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + targets = os.path.join(tmpdir, 'targets') + os.mkdir(sources) + os.mkdir(targets) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.join(targets, 'three') + four = os.path.join(targets, 'four') + + self.write_file(one) + self.write_file(three) + self.write_file(four) + time.sleep(_ST_MIME_TIMER) + self.write_file(two) + + self.assertEquals(newer_pairwise([one, two], [three, four]), + ([two],[four])) + + def test_newer_group(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + os.mkdir(sources) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.join(sources, 'three') + target = os.path.join(tmpdir, 'target') + + # return true if 'target' is out-of-date with respect to any file + # listed in 'sources'. + self.write_file(target) + time.sleep(_ST_MIME_TIMER) + self.write_file(one) + self.write_file(two) + self.write_file(three) + self.assertTrue(newer_group([one, two, three], target)) + + self.write_file(one) + self.write_file(three) + self.write_file(two) + time.sleep(0.1) + self.write_file(target) + self.assertFalse(newer_group([one, two, three], target)) + + # missing handling + os.remove(one) + self.assertRaises(OSError, newer_group, [one, two, three], target) + + self.assertFalse(newer_group([one, two, three], target, + missing='ignore')) + + self.assertTrue(newer_group([one, two, three], target, + missing='newer')) + + +def test_suite(): + return unittest.makeSuite(DepUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From e7ff58b757d214c4565d89b58b3efd77620d7a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 10 Dec 2009 15:35:35 +0000 Subject: [PATCH 2773/8469] Merged revisions 76746 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76746 | tarek.ziade | 2009-12-10 16:29:03 +0100 (Thu, 10 Dec 2009) | 1 line added test coverage for distutils.dep_util, and cleaned up the module ........ --- dep_util.py | 64 ++++++++++++-------------- tests/test_dep_util.py | 101 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 35 deletions(-) create mode 100644 tests/test_dep_util.py diff --git a/dep_util.py b/dep_util.py index 07b3549c6f..b91a62eb56 100644 --- a/dep_util.py +++ b/dep_util.py @@ -9,29 +9,27 @@ import os from distutils.errors import DistutilsFileError +def newer(source, target): + """Tells if the target is newer than the source. -def newer (source, target): - """Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. Return false if - both exist and 'target' is the same age or younger than 'source'. - Raise DistutilsFileError if 'source' does not exist. + Return true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. + + Return false if both exist and 'target' is the same age or younger + than 'source'. Raise DistutilsFileError if 'source' does not exist. + + Note that this test is not very accurate: files created in the same second + will have the same "age". """ if not os.path.exists(source): raise DistutilsFileError("file '%s' does not exist" % os.path.abspath(source)) if not os.path.exists(target): - return 1 - - from stat import ST_MTIME - mtime1 = os.stat(source)[ST_MTIME] - mtime2 = os.stat(target)[ST_MTIME] - - return mtime1 > mtime2 - -# newer () + return True + return os.stat(source).st_mtime > os.stat(target).st_mtime -def newer_pairwise (sources, targets): +def newer_pairwise(sources, targets): """Walk two filename lists in parallel, testing if each source is newer than its corresponding target. Return a pair of lists (sources, targets) where source is newer than target, according to the semantics @@ -43,19 +41,18 @@ def newer_pairwise (sources, targets): # build a pair of lists (sources, targets) where source is newer n_sources = [] n_targets = [] - for i in range(len(sources)): - if newer(sources[i], targets[i]): - n_sources.append(sources[i]) - n_targets.append(targets[i]) + for source, target in zip(sources, targets): + if newer(source, target): + n_sources.append(source) + n_targets.append(target) - return (n_sources, n_targets) + return n_sources, n_targets -# newer_pairwise () - - -def newer_group (sources, target, missing='error'): +def newer_group(sources, target, missing='error'): """Return true if 'target' is out-of-date with respect to any file - listed in 'sources'. In other words, if 'target' exists and is newer + listed in 'sources'. + + In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise return true. 'missing' controls what we do when a source file is missing; the default ("error") is to blow up with an OSError from inside 'stat()'; @@ -68,14 +65,14 @@ def newer_group (sources, target, missing='error'): """ # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists(target): - return 1 + return True # Otherwise we have to find out the hard way: if *any* source file # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. - from stat import ST_MTIME - target_mtime = os.stat(target)[ST_MTIME] + target_mtime = os.stat(target).st_mtime + for source in sources: if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file @@ -83,12 +80,9 @@ def newer_group (sources, target, missing='error'): elif missing == 'ignore': # missing source dropped from continue # target's dependency list elif missing == 'newer': # missing source means target is - return 1 # out-of-date + return True # out-of-date - source_mtime = os.stat(source)[ST_MTIME] - if source_mtime > target_mtime: - return 1 - else: - return 0 + if os.stat(source).st_mtime > target_mtime: + return True -# newer_group () + return False diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py new file mode 100644 index 0000000000..21fc7bc0b9 --- /dev/null +++ b/tests/test_dep_util.py @@ -0,0 +1,101 @@ +"""Tests for distutils.dep_util.""" +import unittest +import os +import time + +from distutils.dep_util import newer, newer_pairwise, newer_group +from distutils.errors import DistutilsFileError +from distutils.tests import support + +# XXX needs to be tuned for the various platforms +_ST_MIME_TIMER = 1 + +class DepUtilTestCase(support.TempdirManager, unittest.TestCase): + + def test_newer(self): + tmpdir = self.mkdtemp() + target = os.path.join(tmpdir, 'target') + source = os.path.join(tmpdir, 'source') + + # Raise DistutilsFileError if 'source' does not exist. + self.assertRaises(DistutilsFileError, newer, target, source) + + # Return true if 'source' exists and is more recently modified than + # 'target', or if 'source' exists and 'target' doesn't. + self.write_file(target) + self.assertTrue(newer(target, source)) + self.write_file(source, 'xox') + time.sleep(_ST_MIME_TIMER) # ensures ST_MTIME differs + self.write_file(target, 'xhx') + self.assertTrue(newer(target, source)) + + # Return false if both exist and 'target' is the same age or younger + # than 'source'. + self.write_file(source, 'xox'); self.write_file(target, 'xhx') + self.assertFalse(newer(target, source)) + self.write_file(target, 'xox') + time.sleep(_ST_MIME_TIMER) + self.write_file(source, 'xhx') + self.assertFalse(newer(target, source)) + + def test_newer_pairwise(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + targets = os.path.join(tmpdir, 'targets') + os.mkdir(sources) + os.mkdir(targets) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.join(targets, 'three') + four = os.path.join(targets, 'four') + + self.write_file(one) + self.write_file(three) + self.write_file(four) + time.sleep(_ST_MIME_TIMER) + self.write_file(two) + + self.assertEquals(newer_pairwise([one, two], [three, four]), + ([two],[four])) + + def test_newer_group(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + os.mkdir(sources) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.join(sources, 'three') + target = os.path.join(tmpdir, 'target') + + # return true if 'target' is out-of-date with respect to any file + # listed in 'sources'. + self.write_file(target) + time.sleep(_ST_MIME_TIMER) + self.write_file(one) + self.write_file(two) + self.write_file(three) + self.assertTrue(newer_group([one, two, three], target)) + + self.write_file(one) + self.write_file(three) + self.write_file(two) + time.sleep(0.1) + self.write_file(target) + self.assertFalse(newer_group([one, two, three], target)) + + # missing handling + os.remove(one) + self.assertRaises(OSError, newer_group, [one, two, three], target) + + self.assertFalse(newer_group([one, two, three], target, + missing='ignore')) + + self.assertTrue(newer_group([one, two, three], target, + missing='newer')) + + +def test_suite(): + return unittest.makeSuite(DepUtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From fa1b455a97e292e8a338fb07b72c8db7ca52658a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 10 Dec 2009 19:29:53 +0000 Subject: [PATCH 2774/8469] using an existing file to avoid dealing with a sleep to test file ages --- tests/test_dep_util.py | 73 +++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index 21fc7bc0b9..d81d9143b4 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -7,36 +7,26 @@ from distutils.errors import DistutilsFileError from distutils.tests import support -# XXX needs to be tuned for the various platforms -_ST_MIME_TIMER = 1 - class DepUtilTestCase(support.TempdirManager, unittest.TestCase): def test_newer(self): + tmpdir = self.mkdtemp() - target = os.path.join(tmpdir, 'target') - source = os.path.join(tmpdir, 'source') - - # Raise DistutilsFileError if 'source' does not exist. - self.assertRaises(DistutilsFileError, newer, target, source) - - # Return true if 'source' exists and is more recently modified than - # 'target', or if 'source' exists and 'target' doesn't. - self.write_file(target) - self.assertTrue(newer(target, source)) - self.write_file(source, 'xox') - time.sleep(_ST_MIME_TIMER) # ensures ST_MTIME differs - self.write_file(target, 'xhx') - self.assertTrue(newer(target, source)) - - # Return false if both exist and 'target' is the same age or younger - # than 'source'. - self.write_file(source, 'xox'); self.write_file(target, 'xhx') - self.assertFalse(newer(target, source)) - self.write_file(target, 'xox') - time.sleep(_ST_MIME_TIMER) - self.write_file(source, 'xhx') - self.assertFalse(newer(target, source)) + new_file = os.path.join(tmpdir, 'new') + old_file = os.path.abspath(__file__) + + # Raise DistutilsFileError if 'new_file' does not exist. + self.assertRaises(DistutilsFileError, newer, new_file, old_file) + + # Return true if 'new_file' exists and is more recently modified than + # 'old_file', or if 'new_file' exists and 'old_file' doesn't. + self.write_file(new_file) + self.assertTrue(newer(new_file, 'I_dont_exist')) + self.assertTrue(newer(new_file, old_file)) + + # Return false if both exist and 'old_file' is the same age or younger + # than 'new_file'. + self.assertFalse(newer(old_file, new_file)) def test_newer_pairwise(self): tmpdir = self.mkdtemp() @@ -46,17 +36,14 @@ def test_newer_pairwise(self): os.mkdir(targets) one = os.path.join(sources, 'one') two = os.path.join(sources, 'two') - three = os.path.join(targets, 'three') + three = os.path.abspath(__file__) # I am the old file four = os.path.join(targets, 'four') - self.write_file(one) - self.write_file(three) - self.write_file(four) - time.sleep(_ST_MIME_TIMER) self.write_file(two) + self.write_file(four) self.assertEquals(newer_pairwise([one, two], [three, four]), - ([two],[four])) + ([one],[three])) def test_newer_group(self): tmpdir = self.mkdtemp() @@ -65,32 +52,24 @@ def test_newer_group(self): one = os.path.join(sources, 'one') two = os.path.join(sources, 'two') three = os.path.join(sources, 'three') - target = os.path.join(tmpdir, 'target') + old_file = os.path.abspath(__file__) - # return true if 'target' is out-of-date with respect to any file + # return true if 'old_file' is out-of-date with respect to any file # listed in 'sources'. - self.write_file(target) - time.sleep(_ST_MIME_TIMER) self.write_file(one) self.write_file(two) self.write_file(three) - self.assertTrue(newer_group([one, two, three], target)) - - self.write_file(one) - self.write_file(three) - self.write_file(two) - time.sleep(0.1) - self.write_file(target) - self.assertFalse(newer_group([one, two, three], target)) + self.assertTrue(newer_group([one, two, three], old_file)) + self.assertFalse(newer_group([one, two, old_file], three)) # missing handling os.remove(one) - self.assertRaises(OSError, newer_group, [one, two, three], target) + self.assertRaises(OSError, newer_group, [one, two, old_file], three) - self.assertFalse(newer_group([one, two, three], target, + self.assertFalse(newer_group([one, two, old_file], three, missing='ignore')) - self.assertTrue(newer_group([one, two, three], target, + self.assertTrue(newer_group([one, two, old_file], three, missing='newer')) From 53e5b86d24ea8f12522a35ff9bf5767724d16938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 10 Dec 2009 19:37:05 +0000 Subject: [PATCH 2775/8469] Merged revisions 76750 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76750 | tarek.ziade | 2009-12-10 20:29:53 +0100 (Thu, 10 Dec 2009) | 1 line using an existing file to avoid dealing with a sleep to test file ages ........ --- tests/test_dep_util.py | 73 +++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index 21fc7bc0b9..d81d9143b4 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -7,36 +7,26 @@ from distutils.errors import DistutilsFileError from distutils.tests import support -# XXX needs to be tuned for the various platforms -_ST_MIME_TIMER = 1 - class DepUtilTestCase(support.TempdirManager, unittest.TestCase): def test_newer(self): + tmpdir = self.mkdtemp() - target = os.path.join(tmpdir, 'target') - source = os.path.join(tmpdir, 'source') - - # Raise DistutilsFileError if 'source' does not exist. - self.assertRaises(DistutilsFileError, newer, target, source) - - # Return true if 'source' exists and is more recently modified than - # 'target', or if 'source' exists and 'target' doesn't. - self.write_file(target) - self.assertTrue(newer(target, source)) - self.write_file(source, 'xox') - time.sleep(_ST_MIME_TIMER) # ensures ST_MTIME differs - self.write_file(target, 'xhx') - self.assertTrue(newer(target, source)) - - # Return false if both exist and 'target' is the same age or younger - # than 'source'. - self.write_file(source, 'xox'); self.write_file(target, 'xhx') - self.assertFalse(newer(target, source)) - self.write_file(target, 'xox') - time.sleep(_ST_MIME_TIMER) - self.write_file(source, 'xhx') - self.assertFalse(newer(target, source)) + new_file = os.path.join(tmpdir, 'new') + old_file = os.path.abspath(__file__) + + # Raise DistutilsFileError if 'new_file' does not exist. + self.assertRaises(DistutilsFileError, newer, new_file, old_file) + + # Return true if 'new_file' exists and is more recently modified than + # 'old_file', or if 'new_file' exists and 'old_file' doesn't. + self.write_file(new_file) + self.assertTrue(newer(new_file, 'I_dont_exist')) + self.assertTrue(newer(new_file, old_file)) + + # Return false if both exist and 'old_file' is the same age or younger + # than 'new_file'. + self.assertFalse(newer(old_file, new_file)) def test_newer_pairwise(self): tmpdir = self.mkdtemp() @@ -46,17 +36,14 @@ def test_newer_pairwise(self): os.mkdir(targets) one = os.path.join(sources, 'one') two = os.path.join(sources, 'two') - three = os.path.join(targets, 'three') + three = os.path.abspath(__file__) # I am the old file four = os.path.join(targets, 'four') - self.write_file(one) - self.write_file(three) - self.write_file(four) - time.sleep(_ST_MIME_TIMER) self.write_file(two) + self.write_file(four) self.assertEquals(newer_pairwise([one, two], [three, four]), - ([two],[four])) + ([one],[three])) def test_newer_group(self): tmpdir = self.mkdtemp() @@ -65,32 +52,24 @@ def test_newer_group(self): one = os.path.join(sources, 'one') two = os.path.join(sources, 'two') three = os.path.join(sources, 'three') - target = os.path.join(tmpdir, 'target') + old_file = os.path.abspath(__file__) - # return true if 'target' is out-of-date with respect to any file + # return true if 'old_file' is out-of-date with respect to any file # listed in 'sources'. - self.write_file(target) - time.sleep(_ST_MIME_TIMER) self.write_file(one) self.write_file(two) self.write_file(three) - self.assertTrue(newer_group([one, two, three], target)) - - self.write_file(one) - self.write_file(three) - self.write_file(two) - time.sleep(0.1) - self.write_file(target) - self.assertFalse(newer_group([one, two, three], target)) + self.assertTrue(newer_group([one, two, three], old_file)) + self.assertFalse(newer_group([one, two, old_file], three)) # missing handling os.remove(one) - self.assertRaises(OSError, newer_group, [one, two, three], target) + self.assertRaises(OSError, newer_group, [one, two, old_file], three) - self.assertFalse(newer_group([one, two, three], target, + self.assertFalse(newer_group([one, two, old_file], three, missing='ignore')) - self.assertTrue(newer_group([one, two, three], target, + self.assertTrue(newer_group([one, two, old_file], three, missing='newer')) From 7177009424e0afa0dffb1d6de5dc46dab24165c6 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 11 Dec 2009 00:26:33 +0100 Subject: [PATCH 2776/8469] avoid running test_get_script_header_jython_workaround undr some py3 environments fixes #103 --HG-- branch : distribute extra : rebase_source : a1a3381e889db52b3c81301dbd521f7266e254b8 --- CHANGES.txt | 2 ++ setuptools/tests/test_resources.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 34fb5d488a..5592fd6a5d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,8 @@ CHANGES * Issue 101: Allowing ``os.devnull`` in Sandbox * Issue 92: Fixed the "no eggs" found error with MacPort (platform.mac_ver() fails) +* Issue 103: test_get_script_header_jython_workaround not run + anymore under py3 with C or POSIX local. Contributed by Arfrever. ----- 0.6.8 diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index d805d02a75..5cb1baf004 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -533,6 +533,10 @@ def test_get_script_header(self): '#!%s -x\n' % self.non_ascii_exe) def test_get_script_header_jython_workaround(self): + # This test doesn't work with Python 3 in some locales + if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE") + in (None, "C", "POSIX")): + return platform = sys.platform sys.platform = 'java1.5.0_13' stdout = sys.stdout From ce6ac29bfa586e8646853b3f58e0c8c8e6891629 Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 11 Dec 2009 00:32:55 +0100 Subject: [PATCH 2777/8469] Remove an unecessary assertion fixes #104 --HG-- branch : distribute extra : rebase_source : e0a1a2a18085d418b039852b57b5adf6cc19017f --- CHANGES.txt | 2 ++ distribute_setup.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5592fd6a5d..13baf75ed6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,8 @@ CHANGES (platform.mac_ver() fails) * Issue 103: test_get_script_header_jython_workaround not run anymore under py3 with C or POSIX local. Contributed by Arfrever. +* Issue 104: remvoved the assertion when the installation fails, + with a nicer message for the end user. ----- 0.6.8 diff --git a/distribute_setup.py b/distribute_setup.py index 94789e7e27..7fd3b4d87f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -81,7 +81,9 @@ def _install(tarball): # installing log.warn('Installing Distribute') - assert _python_cmd('setup.py', 'install') + if not _python_cmd('setup.py', 'install'): + log.warn('Something went wrong during the installation.') + log.warn('See the error message above.') finally: os.chdir(old_wd) From fa3779fa3ec3d90437043321477c34d496dde38a Mon Sep 17 00:00:00 2001 From: tarek Date: Fri, 11 Dec 2009 01:10:45 +0100 Subject: [PATCH 2778/8469] avoid sandbox violations on installation fixes #100 --HG-- branch : distribute extra : rebase_source : 30a4c67f59ad25edf59133af2986191265811635 --- CHANGES.txt | 2 ++ distribute_setup.py | 34 ++++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 13baf75ed6..e317e90955 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -26,6 +26,8 @@ CHANGES anymore under py3 with C or POSIX local. Contributed by Arfrever. * Issue 104: remvoved the assertion when the installation fails, with a nicer message for the end user. +* Issue 100: making sure there's no SandboxViolation when + the setup script patches setuptools. ----- 0.6.8 diff --git a/distribute_setup.py b/distribute_setup.py index 7fd3b4d87f..fac916e60b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -224,22 +224,34 @@ def _patch_file(path, content): def _same_content(path, content): return open(path).read() == content +def _no_sandbox(function): + def __no_sandbox(*args, **kw): + try: + from setuptools.sandbox import DirectorySandbox + def violation(*args): + pass + DirectorySandbox._old = DirectorySandbox._violation + DirectorySandbox._violation = violation + patched = True + except ImportError: + patched = False + try: + return function(*args, **kw) + finally: + if patched: + DirectorySandbox._violation = DirectorySandbox._old + del DirectorySandbox._old + + return __no_sandbox + +@_no_sandbox def _rename_path(path): new_name = path + '.OLD.%s' % time.time() log.warn('Renaming %s into %s', path, new_name) - try: - from setuptools.sandbox import DirectorySandbox - def _violation(*args): - pass - DirectorySandbox._violation = _violation - except ImportError: - pass - os.rename(path, new_name) return new_name - def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): log.warn('Unkown installation at %s', placeholder) @@ -279,6 +291,7 @@ def _after_install(dist): placeholder = dist.get_command_obj('install').install_purelib _create_fake_setuptools_pkg_info(placeholder) +@_no_sandbox def _create_fake_setuptools_pkg_info(placeholder): if not placeholder or not os.path.exists(placeholder): log.warn('Could not find the install location') @@ -290,12 +303,14 @@ def _create_fake_setuptools_pkg_info(placeholder): if os.path.exists(pkg_info): log.warn('%s already exists', pkg_info) return + log.warn('Creating %s', pkg_info) f = open(pkg_info, 'w') try: f.write(SETUPTOOLS_PKG_INFO) finally: f.close() + pth_file = os.path.join(placeholder, 'setuptools.pth') log.warn('Creating %s', pth_file) f = open(pth_file, 'w') @@ -304,7 +319,6 @@ def _create_fake_setuptools_pkg_info(placeholder): finally: f.close() - def _patch_egg_dir(path): # let's check if it's already patched pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') From 6b4b0719df27f67524124ea1ef1b30d16131c8e2 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:04:11 +0100 Subject: [PATCH 2779/8469] Avoid shadowing the package fixes #80 --HG-- branch : distribute extra : rebase_source : 1cdd34df8c993d532101e25f6c1d3f5fb164817c --- setuptools/command/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index d608871e08..152406b332 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -5,7 +5,7 @@ 'register', 'bdist_wininst', 'upload_docs', ] -from setuptools.command.install_scripts import install_scripts +from setuptools.command import install_scripts import sys if sys.version>='2.5': From 3a805e9752277f2e27f1c4c4fbcdc0909d979216 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:06:05 +0100 Subject: [PATCH 2780/8469] removed trailing space --HG-- branch : distribute extra : rebase_source : 756e9dee7562e288a3fb6f69cd221ad47e70f25d --- docs/index.txt | 4 ++-- docs/roadmap.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 1d3cb25e29..3dc0b0d696 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -3,10 +3,10 @@ Welcome to Distribute's documentation! `Distribute` is a fork of the `Setuptools` project. -Distribute is intended to replace Setuptools as the standard method for +Distribute is intended to replace Setuptools as the standard method for working with Python module distributions. -For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple: +For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple: - Distribute is a drop-in replacement for Setuptools - The code is actively maintained, and has over 10 commiters diff --git a/docs/roadmap.txt b/docs/roadmap.txt index fcd5518578..ea5070eaaf 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -4,7 +4,7 @@ Roadmap Distribute has two branches: -- 0.6.x : provides a Setuptools-0.6c9 compatible version +- 0.6.x : provides a Setuptools-0.6cX compatible version - 0.7.x : will provide a refactoring 0.6.x @@ -69,7 +69,7 @@ we've done a lot already) reorganized in clean, pep-8 modules. This package will only contain the query APIs and will focus on being PEP 376 compatible. We will promote its usage and see if Pip wants - to use it as a basis. + to use it as a basis. It will probably shrink a lot though, once the stdlib provides PEP 376 support. - distribute.entrypoints: that's the old pkg_resources entry points From 9a36d7f1895e6ad1cd6ae055bdf64165d0b94e17 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:09:11 +0100 Subject: [PATCH 2781/8469] added Arfrever to contributors (bug fixes) --HG-- branch : distribute extra : rebase_source : 20c9b929a78c99f4fb1304a6fff9d70e17d76d56 --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8eb0aebc90..bc2b3fe73a 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -4,6 +4,7 @@ Contributors * Alex Grönholm * Alice Bevan-McGregor +* Arfrever Frehtes Taifersar Arahesis * Daniel Stutzbach * Hanno Schlichting * Jannis Leidel From 4eb8f94b29a2ac19c422c755466fe56fbaf073a6 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:12:10 +0100 Subject: [PATCH 2782/8469] changed the way the html is created --HG-- branch : distribute extra : rebase_source : 01c8d422fcecde15adbbdebfe15d336c83dcc599 --- distribute.egg-info/entry_points.txt | 2 +- release.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index e1f704d8cb..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/release.sh b/release.sh index 91d7ccb635..9ee85e6f24 100755 --- a/release.sh +++ b/release.sh @@ -10,7 +10,10 @@ rm -rf ./dist # now preparing the source release, pushing it and its doc python2.6 setup.py -q egg_info -RDb '' sdist register upload -python2.6 setup.py build_sphinx upload_docs +cd docs/ +make html +cd .. +python2.6 setup.py upload_docs # pushing the bootstrap script scp distribute_setup.py ziade.org:nightly/build/ From c0e0ad5b6e1df8a56d994d1033fd196ce2bfabac Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:12:38 +0100 Subject: [PATCH 2783/8469] Added tag 0.6.9 for changeset 669ed9388b17 --HG-- branch : distribute extra : rebase_source : 27ee72911516a50b2b57c72d9dae929135e69ee6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a02ce84ca1..0f2f7d3dfe 100644 --- a/.hgtags +++ b/.hgtags @@ -7,3 +7,4 @@ e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 71f08668d050589b92ecd164a4f5a91f3484313b 0.6.7 445547a5729ed5517cf1a9baad595420a8831ef8 0.6.8 +669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 From 4881ed310bd6d0c5fc361e882325c47dec7b8b3a Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:16:12 +0100 Subject: [PATCH 2784/8469] fixed Rest :/ --HG-- branch : distribute extra : rebase_source : 63f5b734530917bd660799cbc567b3bec48bb5be --- README.txt | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/README.txt b/README.txt index 8ec73116d8..cbca70f0c5 100755 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ The fork has two goals: the same as for Python 2 code, but Distribute also helps you to support Python 2 and Python 3 from the same source code by letting you run 2to3 on the code as a part of the build process, by setting the keyword parameter - ``use_2to3`` to True. See http://packages.python.org/distribute for more + ``use_2to3`` to True. See http://packages.python.org/distribute for more information. - Refactoring the code, and releasing it in several distributions. @@ -45,7 +45,7 @@ More documentation ================== You can get more information in the Sphinx-based documentation, located -at http://packages.python.org/distribute. This documentation includes the old +at http://packages.python.org/distribute. This documentation includes the old Setuptools documentation that is slowly replaced, and brand new content. About the installation process @@ -117,7 +117,7 @@ Uninstallation Instructions --------------------------- Like other distutils-based distributions, Distribute doesn't provide an -uninstaller yet. It's all done manually! We are all waiting for PEP 376 +uninstaller yet. It's all done manually! We are all waiting for PEP 376 support in Python. Distribute is installed in three steps: @@ -150,36 +150,30 @@ Quick help for developers ------------------------- To create an egg which is compatible with Distribute, use the same -practice as with Setuptools, e.g.: +practice as with Setuptools, e.g.:: -{{{ -from setuptools import setup + from setuptools import setup -setup(... -) -}}} + setup(... + ) To use `pkg_resources` to access data files in the egg, you should -require the Setuptools distribution explicitly: +require the Setuptools distribution explicitly:: -{{{ -from setuptools import setup + from setuptools import setup -setup(... - install_requires=['setuptools'] -) -}}} + setup(... + install_requires=['setuptools'] + ) Only if you need Distribute-specific functionality should you depend -on it explicitly. In this case, replace the Setuptools dependency: +on it explicitly. In this case, replace the Setuptools dependency:: -{{{ -from setuptools import setup + from setuptools import setup -setup(... - install_requires=['distribute'] -) -}}} + setup(... + install_requires=['distribute'] + ) ----------- Install FAQ @@ -208,7 +202,7 @@ Install FAQ and if the virtualenv you are in was generated without the `--no-site-packages` option, the Distribute installation will stop. - You need in this case to build a virtualenv with the `--no-site-packages` + You need in this case to build a virtualenv with the `--no-site-packages` option or to install `Distribute` globally. - **How does Distribute interacts with zc.buildout?** From 09456cafdbed30c72b00ed5e32e61cc710bf2c5d Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:16:24 +0100 Subject: [PATCH 2785/8469] Added tag 0.6.9 for changeset ac7d9b14ac43 --HG-- branch : distribute extra : rebase_source : b2c4d297d367d8230b54e0067e7e8c6cdda8c68e --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 0f2f7d3dfe..4b085ed85b 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,5 @@ f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 71f08668d050589b92ecd164a4f5a91f3484313b 0.6.7 445547a5729ed5517cf1a9baad595420a8831ef8 0.6.8 669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 +669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 +ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 From e651ea7e2583bf40f129a4d1b82a93d0de60c291 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:19:56 +0100 Subject: [PATCH 2786/8469] starting 0.6.10 development --HG-- branch : distribute extra : rebase_source : 47ee1886e326219ded82d6d9fc8412bdec62e03d --- README.txt | 6 +++--- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index cbca70f0c5..7cebd96211 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.9.tar.gz - $ tar -xzvf distribute-0.6.9.tar.gz - $ cd distribute-0.6.9 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz + $ tar -xzvf distribute-0.6.10.tar.gz + $ cd distribute-0.6.10 $ python setup.py install --------------------------- diff --git a/docs/conf.py b/docs/conf.py index 74435672b5..79ada8cb37 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.9' +version = '0.6.10' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index 9ee85e6f24..cebdc2216e 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.9" +export VERSION="0.6.10" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index f0457b466c..b917abfdb0 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.9" +VERSION = "0.6.10" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 14a94e3f8ca9cee5d74253689baf0cefc03b767f Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 13:41:36 +0100 Subject: [PATCH 2787/8469] added Idan credits --HG-- branch : distribute extra : rebase_source : ec3f6e58099421a08d4ebbbc1719386e5d28a9ce --- docs/index.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.txt b/docs/index.txt index 3dc0b0d696..b3cbcb5e66 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -14,6 +14,8 @@ For those who may wonder why they should switch to Distribute over Setuptools, i .. image:: http://python-distribute.org/pip_distribute.png +Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 + Documentation content: From e07754742050fe498d758fca8578da9babbc483a Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:02:19 +0100 Subject: [PATCH 2788/8469] fixed the error message used in DistributionNotFound, otherwise it breaks zc.buildout --HG-- branch : distribute extra : rebase_source : fbcd6099522983770243735997694c3da40cd59f --- pkg_resources.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9f1baca404..3660a2a5bb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -537,9 +537,13 @@ def resolve(self, requirements, env=None, installer=None, replacement=True): env = Environment(self.entries) dist = best[req.key] = env.best_match(req, self, installer) if dist is None: - msg = ("The '%s' distribution was not found on this " - "system, and is required by this application.") - raise DistributionNotFound(msg % req) + #msg = ("The '%s' distribution was not found on this " + # "system, and is required by this application.") + #raise DistributionNotFound(msg % req) + + # unfortunately, zc.buildout uses a str(err) + # to get the name of the distribution here.. + raise DistributionNotFound(req) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency From 99c9080351231b678f3daff856ebf5604da82bcd Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:13:39 +0100 Subject: [PATCH 2789/8469] added a not about the fix --HG-- branch : distribute extra : rebase_source : 168554aaf8761e070e453562665cd02a09dd3a54 --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index e317e90955..b452dccce7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +------ +0.6.10 +------ + +* Reverted change made for the DistributionNotFound exception because + zc.buildout uses the exception message to get the name of the + distribution. + ----- 0.6.9 ----- From a9694bf0462f460f4b7c59cebc7d7b23fae28487 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:14:03 +0100 Subject: [PATCH 2790/8469] Added tag 0.6.10 for changeset 0fd5c5060378 --HG-- branch : distribute extra : rebase_source : a71db1ff8133fab6555b328b7ccf5122fa8a3ca3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4b085ed85b..1c81efc040 100644 --- a/.hgtags +++ b/.hgtags @@ -10,3 +10,4 @@ f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 +0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 From a5b407d7b04286168ffceb4c9f9d21bf0dffa41f Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:17:59 +0100 Subject: [PATCH 2791/8469] fixed version in distribute_setup --HG-- branch : distribute extra : rebase_source : ae8e8ec713df64d370cfc30468775a287d641d50 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index fac916e60b..002133624d 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.9" +DEFAULT_VERSION = "0.6.10" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" From d11b2c01fbba4e2b51bf78ac11beace7dcab7103 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:19:56 +0100 Subject: [PATCH 2792/8469] Added tag 0.6.10 for changeset f18396c6e187 --HG-- branch : distribute extra : rebase_source : f46b380e30f9edf170dccc5a2cdaebe0fad2ae8a --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 1c81efc040..c904a24ae2 100644 --- a/.hgtags +++ b/.hgtags @@ -11,3 +11,5 @@ f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 +0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 +f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 From 93b983e6f2302007cedbf44bcf0b944415c05361 Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:22:47 +0100 Subject: [PATCH 2793/8469] starting 0.6.11 --HG-- branch : distribute extra : rebase_source : e69bd36f08c0407a0e818e67e5a5b7d633182a57 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b452dccce7..6623b44db0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.11 +------ + + + ------ 0.6.10 ------ diff --git a/README.txt b/README.txt index 7cebd96211..8e78bc885c 100755 --- a/README.txt +++ b/README.txt @@ -107,9 +107,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz - $ tar -xzvf distribute-0.6.10.tar.gz - $ cd distribute-0.6.10 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.11.tar.gz + $ tar -xzvf distribute-0.6.11.tar.gz + $ cd distribute-0.6.11 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 002133624d..844fd80f34 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.10" +DEFAULT_VERSION = "0.6.11" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 79ada8cb37..c9f8fef734 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.10' +version = '0.6.11' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index cebdc2216e..cdcba01f81 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.10" +export VERSION="0.6.11" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index b917abfdb0..b8612b5cd9 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.10" +VERSION = "0.6.11" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 4570438396d4ee5fe1255b39e2e6070b2e69a424 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 13 Dec 2009 12:50:37 +0100 Subject: [PATCH 2794/8469] Updated docs theme for higher readability --HG-- branch : distribute extra : rebase_source : ae453d7b4b32d8823d57ebe411eaf53e050ad9dd --- docs/_theme/nature/static/nature.css_t | 119 +++++++++++++------------ docs/conf.py | 7 +- docs/index.txt | 8 -- 3 files changed, 66 insertions(+), 68 deletions(-) diff --git a/docs/_theme/nature/static/nature.css_t b/docs/_theme/nature/static/nature.css_t index a29848e157..1a654264d1 100644 --- a/docs/_theme/nature/static/nature.css_t +++ b/docs/_theme/nature/static/nature.css_t @@ -10,8 +10,8 @@ body { font-family: Arial, sans-serif; font-size: 100%; - background-color: #111; - color: #555; + background-color: #111111; + color: #555555; margin: 0; padding: 0; } @@ -30,14 +30,14 @@ hr{ } div.document { - background-color: #eee; + background-color: #fafafa; } div.body { background-color: #ffffff; color: #3E4349; - padding: 0 30px 30px 30px; - font-size: 0.8em; + padding: 1em 30px 30px 30px; + font-size: 0.9em; } div.footer { @@ -49,26 +49,29 @@ div.footer { } div.footer a { - color: #444; - text-decoration: underline; + color: #444444; } div.related { background-color: #6BA81E; - line-height: 32px; - color: #fff; - text-shadow: 0px 1px 0 #444; - font-size: 0.80em; + line-height: 36px; + color: #ffffff; + text-shadow: 0px 1px 0 #444444; + font-size: 1.1em; } div.related a { color: #E2F3CC; } - + +div.related .right { + font-size: 0.9em; +} + div.sphinxsidebar { - font-size: 0.75em; + font-size: 0.9em; line-height: 1.5em; - width: 300px + width: 300px; } div.sphinxsidebarwrapper{ @@ -78,27 +81,22 @@ div.sphinxsidebarwrapper{ div.sphinxsidebar h3, div.sphinxsidebar h4 { font-family: Arial, sans-serif; - color: #222; + color: #222222; font-size: 1.2em; - font-weight: normal; + font-weight: bold; margin: 0; padding: 5px 10px; - background-color: #ddd; text-shadow: 1px 1px 0 white } -div.sphinxsidebar h4{ - font-size: 1.1em; -} - div.sphinxsidebar h3 a { - color: #444; + color: #444444; } - - + div.sphinxsidebar p { - color: #888; + color: #888888; padding: 5px 20px; + margin: 0.5em 0px; } div.sphinxsidebar p.topless { @@ -107,17 +105,22 @@ div.sphinxsidebar p.topless { div.sphinxsidebar ul { margin: 10px 10px 10px 20px; padding: 0; - color: #000; + color: #000000; } div.sphinxsidebar a { - color: #444; + color: #444444; } - + +div.sphinxsidebar a:hover { + color: #E32E00; +} + div.sphinxsidebar input { - border: 1px solid #ccc; + border: 1px solid #cccccc; font-family: sans-serif; - font-size: 1em; + font-size: 1.1em; + padding: 0.15em 0.3em; } div.sphinxsidebar input[type=text]{ @@ -133,7 +136,6 @@ a { a:hover { color: #E32E00; - text-decoration: underline; } div.body h1, @@ -143,20 +145,20 @@ div.body h4, div.body h5, div.body h6 { font-family: Arial, sans-serif; - background-color: #BED4EB; font-weight: normal; color: #212224; margin: 30px 0px 10px 0px; - padding: 5px 0 5px 10px; - text-shadow: 0px 1px 0 white + padding: 5px 0 5px 0px; + text-shadow: 0px 1px 0 white; + border-bottom: 1px solid #C8D5E3; } -div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 150%; background-color: #C8D5E3; } -div.body h3 { font-size: 120%; background-color: #D8DEE3; } -div.body h4 { font-size: 110%; background-color: #D8DEE3; } -div.body h5 { font-size: 100%; background-color: #D8DEE3; } -div.body h6 { font-size: 100%; background-color: #D8DEE3; } +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 150%; } +div.body h3 { font-size: 120%; } +div.body h4 { font-size: 110%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } a.headerlink { color: #c60f0f; @@ -171,7 +173,7 @@ a.headerlink:hover { } div.body p, div.body dd, div.body li { - line-height: 1.5em; + line-height: 1.8em; } div.admonition p.admonition-title + p { @@ -183,22 +185,23 @@ div.highlight{ } div.note { - background-color: #eee; - border: 1px solid #ccc; + background-color: #eeeeee; + border: 1px solid #cccccc; } div.seealso { - background-color: #ffc; - border: 1px solid #ff6; + background-color: #ffffcc; + border: 1px solid #ffff66; } div.topic { - background-color: #eee; + background-color: #fafafa; + border-width: 0; } div.warning { background-color: #ffe4e4; - border: 1px solid #f66; + border: 1px solid #ff6666; } p.admonition-title { @@ -211,20 +214,24 @@ p.admonition-title:after { pre { padding: 10px; - background-color: White; - color: #222; - line-height: 1.2em; - border: 1px solid #C6C9CB; - font-size: 1.2em; + background-color: #fafafa; + color: #222222; + line-height: 1.5em; + font-size: 1.1em; margin: 1.5em 0 1.5em 0; - -webkit-box-shadow: 1px 1px 1px #d8d8d8; - -moz-box-shadow: 1px 1px 1px #d8d8d8; + -webkit-box-shadow: 0px 0px 4px #d8d8d8; + -moz-box-shadow: 0px 0px 4px #d8d8d8; + box-shadow: 0px 0px 4px #d8d8d8; } tt { - background-color: #ecf0f3; - color: #222; + color: #222222; padding: 1px 2px; font-size: 1.2em; font-family: monospace; } + +#table-of-contents ul { + padding-left: 2em; +} + diff --git a/docs/conf.py b/docs/conf.py index c9f8fef734..3991c73c5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -131,21 +131,20 @@ # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_sidebars = {'index': 'indexsidebar.html'} - # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. -#html_use_modindex = True +html_use_modindex = False # If false, no index is generated. -#html_use_index = True +html_use_index = False # If true, the index is split into individual pages for each letter. #html_split_index = False diff --git a/docs/index.txt b/docs/index.txt index b3cbcb5e66..2bfe85c372 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -28,11 +28,3 @@ Documentation content: setuptools easy_install pkg_resources - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - From 0b112ddd5ee08e11850e4a00a4a691865f5dc438 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 13 Dec 2009 16:58:53 +0100 Subject: [PATCH 2795/8469] Moved documentation toc on index page above the propaganda --HG-- branch : distribute extra : rebase_source : 2afb4de1e6fef8d488aa6c476795b1878fac744d --- docs/index.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 2bfe85c372..fa87ac36b1 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -12,11 +12,6 @@ For those who may wonder why they should switch to Distribute over Setuptools, i - The code is actively maintained, and has over 10 commiters - Distribute offers Python 3 support ! -.. image:: http://python-distribute.org/pip_distribute.png - -Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 - - Documentation content: .. toctree:: @@ -28,3 +23,8 @@ Documentation content: setuptools easy_install pkg_resources + + +.. image:: http://python-distribute.org/pip_distribute.png + +Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 From 6f9d7dc8cb5b3bd62bfc305d43342b9f8c82b7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 15 Dec 2009 06:29:19 +0000 Subject: [PATCH 2796/8469] cleaned up the module (PEP 8 + old fashion test removal) --- command/install_data.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/command/install_data.py b/command/install_data.py index ec78ce3431..ab40797b98 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -8,7 +8,6 @@ __revision__ = "$Id$" import os -from types import StringType from distutils.core import Command from distutils.util import change_root, convert_path @@ -35,7 +34,7 @@ def initialize_options(self): self.data_files = self.distribution.data_files self.warn_dir = 1 - def finalize_options (self): + def finalize_options(self): self.set_undefined_options('install', ('install_data', 'install_dir'), ('root', 'root'), @@ -45,7 +44,7 @@ def finalize_options (self): def run(self): self.mkpath(self.install_dir) for f in self.data_files: - if type(f) is StringType: + if isinstance(f, str): # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: From a229fc6986028f2d830cdd3223bb2c459dfe8b7f Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 19 Dec 2009 21:51:03 +0100 Subject: [PATCH 2797/8469] fixed another sandbox viloation issue --HG-- branch : distribute extra : rebase_source : 9f4bc3640cd4f76834682b567ce4c7e7a14e59f7 --- CHANGES.txt | 1 + distribute_setup.py | 48 ++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6623b44db0..11498ab42a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.11 ------ +* Found another case of SandboxViolation - fixed ------ diff --git a/distribute_setup.py b/distribute_setup.py index 844fd80f34..3c23affa59 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -203,7 +203,31 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, dst.close() return os.path.realpath(saveto) +def _no_sandbox(function): + def __no_sandbox(*args, **kw): + try: + from setuptools.sandbox import DirectorySandbox + if not hasattr(DirectorySandbox, '_old'): + def violation(*args): + pass + DirectorySandbox._old = DirectorySandbox._violation + DirectorySandbox._violation = violation + patched = True + else: + patched = False + except ImportError: + patched = False + + try: + return function(*args, **kw) + finally: + if patched: + DirectorySandbox._violation = DirectorySandbox._old + del DirectorySandbox._old + return __no_sandbox + +@_no_sandbox def _patch_file(path, content): """Will backup the file then patch it""" existing_content = open(path).read() @@ -224,34 +248,13 @@ def _patch_file(path, content): def _same_content(path, content): return open(path).read() == content -def _no_sandbox(function): - def __no_sandbox(*args, **kw): - try: - from setuptools.sandbox import DirectorySandbox - def violation(*args): - pass - DirectorySandbox._old = DirectorySandbox._violation - DirectorySandbox._violation = violation - patched = True - except ImportError: - patched = False - - try: - return function(*args, **kw) - finally: - if patched: - DirectorySandbox._violation = DirectorySandbox._old - del DirectorySandbox._old - - return __no_sandbox - -@_no_sandbox def _rename_path(path): new_name = path + '.OLD.%s' % time.time() log.warn('Renaming %s into %s', path, new_name) os.rename(path, new_name) return new_name +@_no_sandbox def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): log.warn('Unkown installation at %s', placeholder) @@ -319,6 +322,7 @@ def _create_fake_setuptools_pkg_info(placeholder): finally: f.close() +@_no_sandbox def _patch_egg_dir(path): # let's check if it's already patched pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') From b3423443dc7a7b2d524c76959d6dd67013e2165c Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 19 Dec 2009 22:30:13 +0100 Subject: [PATCH 2798/8469] Introduced a socket timeout of 15 seconds on url openings fixes #48 --HG-- branch : distribute extra : rebase_source : d4e3831771aa049e71d64f22e315352fa8906dd1 --- CHANGES.txt | 2 +- setuptools/package_index.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 11498ab42a..14ce673427 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES ------ * Found another case of SandboxViolation - fixed - +* Issue 48: Introduced a socket timeout of 15 seconds on url openings ------ 0.6.10 diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ee980214cf..924c15e174 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -25,6 +25,8 @@ 'interpret_distro_name', ] +_SOCKET_TIMEOUT = 15 + def parse_bdist_wininst(name): """Return (base,pyversion) or (None,None) for possible .exe name""" @@ -717,6 +719,17 @@ def htmldecode(text): +def socket_timeout(timeout=15): + def _socket_timeout(func): + def _socket_timeout(*args, **kwargs): + old_timeout = socket.getdefaulttimeout() + socket.setdefaulttimeout(timeout) + try: + return func(*args, **kwargs) + finally: + socket.setdefaulttimeout(old_timeout) + return _socket_timeout + return _socket_timeout def open_with_auth(url): @@ -749,6 +762,8 @@ def open_with_auth(url): return fp +# adding a timeout to avoid freezing package_index +open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth) From 807501891521f68f9e3f273afd2a0c896c4bc0ec Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 19 Dec 2009 22:39:38 +0100 Subject: [PATCH 2799/8469] this also fixes #15 --HG-- branch : distribute extra : rebase_source : 3153bd3b76d9d2a40f6f1d0cfcef97924b646721 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 14ce673427..fc7e019749 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES ------ * Found another case of SandboxViolation - fixed -* Issue 48: Introduced a socket timeout of 15 seconds on url openings +* Issue 15 and 48: Introduced a socket timeout of 15 seconds on url openings ------ 0.6.10 From deb90e5287e5aedc705d9dd0aea8e7f163b9d484 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 20 Dec 2009 12:39:48 +0100 Subject: [PATCH 2800/8469] added manual functional tests for checking a release --HG-- branch : distribute extra : rebase_source : d7bc6ba1843217a020be419a8f3ed562e5ff4a3f --- tests/manual_test.py | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 tests/manual_test.py diff --git a/tests/manual_test.py b/tests/manual_test.py new file mode 100644 index 0000000000..1bafb0d9da --- /dev/null +++ b/tests/manual_test.py @@ -0,0 +1,79 @@ +#!/bin/python +import os +import shutil +import tempfile +import urllib2 +import subprocess +import sys + +def tempdir(func): + def _tempdir(*args, **kwargs): + test_dir = tempfile.mkdtemp() + old_dir = os.getcwd() + os.chdir(test_dir) + try: + return func(*args, **kwargs) + finally: + os.chdir(old_dir) + shutil.rmtree(test_dir) + return _tempdir + +SIMPLE_BUILDOUT = """\ +[buildout] + +parts = eggs + +[eggs] +recipe = zc.recipe.egg + +eggs = + extensions +""" + +BOOTSTRAP = 'http://python-distribute.org/bootstrap.py' +PYVER = sys.version.split()[0][:3] + +@tempdir +def test_virtualenv(): + """virtualenv with distribute""" + os.system('virtualenv --no-site-packages . --distribute') + os.system('bin/easy_install -q distribute==dev') + # linux specific + site_pkg = os.listdir(os.path.join('.', 'lib', 'python'+PYVER, 'site-packages')) + site_pkg.sort() + assert 'distribute' in site_pkg[0] + easy_install = os.path.join('.', 'lib', 'python'+PYVER, 'site-packages', + 'easy-install.pth') + with open(easy_install) as f: + res = f.read() + assert 'distribute' in res + assert 'setuptools' not in res + +@tempdir +def test_full(): + """virtualenv + pip + buildout""" + os.system('virtualenv --no-site-packages .') + os.system('bin/easy_install -q distribute==dev') + os.system('bin/easy_install -qU distribute==dev') + os.system('bin/easy_install -q pip') + os.system('bin/pip install -q zc.buildout') + with open('buildout.cfg', 'w') as f: + f.write(SIMPLE_BUILDOUT) + + with open('bootstrap.py', 'w') as f: + f.write(urllib2.urlopen(BOOTSTRAP).read()) + + os.system('bin/python bootstrap.py --distribute') + os.system('bin/buildout -q') + eggs = os.listdir('eggs') + eggs.sort() + assert len(eggs) == 3 + assert eggs[0].startswith('distribute') + assert eggs[1:] == ['extensions-0.3-py2.6.egg', + 'zc.recipe.egg-1.2.2-py2.6.egg'] + + +if __name__ == '__main__': + test_virtualenv() + + From 460a146b382827dd77f77a86d1daa524ab5e0345 Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 20 Dec 2009 13:58:23 +0100 Subject: [PATCH 2801/8469] added test_full to main --HG-- branch : distribute extra : rebase_source : d343619c60e76ece8c5e95d6aed1d8b48a4ea208 --- tests/manual_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 1bafb0d9da..1d2edc2a0e 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -75,5 +75,5 @@ def test_full(): if __name__ == '__main__': test_virtualenv() - + test_full() From 4dae8e432648fc0d4dcfcaa117b4e60031504596 Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 20 Dec 2009 15:05:15 +0200 Subject: [PATCH 2802/8469] Changed interpreter line to the recommended form --HG-- branch : distribute extra : rebase_source : bdef264a6d5109ec5433a8080cd03f3589992984 --- tests/manual_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 1d2edc2a0e..ad6b2b9be6 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -1,4 +1,4 @@ -#!/bin/python +#!/usr/bin/env python import os import shutil import tempfile From e197e57da318f00d84b559ccfa16fd0d1581441d Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 20 Dec 2009 15:09:32 +0200 Subject: [PATCH 2803/8469] Modified test script to be py3k compatible --HG-- branch : distribute extra : rebase_source : d29c168646125155f3664cec0b88686ac14fbb22 --- tests/manual_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index ad6b2b9be6..ce8d10f2a0 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -2,10 +2,14 @@ import os import shutil import tempfile -import urllib2 import subprocess import sys +if sys.version_info[0] < 3: + from urllib2 import urlopen +else: + from urllib.request import urlopen + def tempdir(func): def _tempdir(*args, **kwargs): test_dir = tempfile.mkdtemp() @@ -61,7 +65,7 @@ def test_full(): f.write(SIMPLE_BUILDOUT) with open('bootstrap.py', 'w') as f: - f.write(urllib2.urlopen(BOOTSTRAP).read()) + f.write(urlopen(BOOTSTRAP).read()) os.system('bin/python bootstrap.py --distribute') os.system('bin/buildout -q') From 6d2d1caa21a5224fec7eee1678857c354f8f4e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 20 Dec 2009 23:23:34 +0000 Subject: [PATCH 2804/8469] Fixed #7552: fixed distutils.command.upload failure on very long passwords --- command/upload.py | 6 +++--- tests/test_upload.py | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/command/upload.py b/command/upload.py index 8114feb8f2..5d6ebcfa4c 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ import socket import platform from urllib2 import urlopen, Request, HTTPError -import base64 +from base64 import standard_b64encode import urlparse import cStringIO as StringIO from ConfigParser import ConfigParser @@ -129,8 +129,8 @@ def upload_file(self, command, pyversion, filename): open(filename+".asc").read()) # set up the authentication - auth = "Basic " + base64.encodestring(self.username + ":" + - self.password).strip() + auth = "Basic " + standard_b64encode(self.username + ":" + + self.password) # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' diff --git a/tests/test_upload.py b/tests/test_upload.py index 0d95a0917e..8f6701cc9b 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -10,6 +10,25 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_LONG_PASSWORD = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + + PYPIRC_NOPASSWORD = """\ [distutils] @@ -85,7 +104,7 @@ def test_upload(self): self.write_file(path) command, pyversion, filename = 'xxx', '2.6', path dist_files = [(command, pyversion, filename)] - self.write_file(self.rc, PYPIRC) + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) # lets run it pkg_dir, dist = self.create_dist(dist_files=dist_files) @@ -101,6 +120,8 @@ def test_upload(self): self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') self.assertTrue('xxx' in self.last_open.req.data) + auth = self.last_open.req.headers['Authorization'] + self.assertFalse('\n' in auth) def test_suite(): return unittest.makeSuite(uploadTestCase) From 4de5e96120f3e583fc5d841220e6f9290c820014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 20 Dec 2009 23:54:52 +0000 Subject: [PATCH 2805/8469] Merged revisions 76952 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line Fixed #7552: fixed distutils.command.upload failure on very long passwords ........ --- command/upload.py | 5 +-- tests/support.py | 21 +++++++++-- tests/test_upload.py | 86 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 4 deletions(-) diff --git a/command/upload.py b/command/upload.py index 8805d41da0..9f1aae6aa4 100644 --- a/command/upload.py +++ b/command/upload.py @@ -11,7 +11,7 @@ import socket import platform import httplib -import base64 +from base64 import standard_b64encode import urlparse import cStringIO as StringIO from ConfigParser import ConfigParser @@ -115,7 +115,8 @@ def upload_file(self, command, pyversion, filename): open(filename+".asc").read()) # set up the authentication - auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() + auth = "Basic " + standard_b64encode(self.username + ":" + + self.password) # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' diff --git a/tests/support.py b/tests/support.py index d24a18ea0e..9d373e94e4 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,10 +1,10 @@ """Support code for distutils test cases.""" - +import os import shutil import tempfile from distutils import log - +from distutils.dist import Distribution class LoggingSilencer(object): @@ -55,6 +55,23 @@ def write_file(self, path, content='xxx'): finally: f.close() + def create_dist(self, pkg_name='foo', **kw): + """Will generate a test environment. + + This function creates: + - a Distribution instance using keywords + - a temporary directory with a package structure + + It returns the package directory and the distribution + instance. + """ + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, pkg_name) + os.mkdir(pkg_dir) + dist = Distribution(attrs=kw) + + return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" diff --git a/tests/test_upload.py b/tests/test_upload.py index b05ab1f78b..322beb778c 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,6 +2,7 @@ import sys import os import unittest +import httplib from distutils.command.upload import upload from distutils.core import Distribution @@ -9,8 +10,66 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_LONG_PASSWORD = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + +class _Resp(object): + def __init__(self, status): + self.status = status + self.reason = 'OK' + +_CONNECTIONS = [] + +class _FakeHTTPConnection(object): + def __init__(self, netloc): + self.requests = [] + self.headers = {} + self.body = None + self.netloc = netloc + _CONNECTIONS.append(self) + + def connect(self): + pass + endheaders = connect + + def send(self, body): + self.body = body + + def putrequest(self, type_, data): + self.requests.append((type_, data)) + + def putheader(self, name, value): + self.headers[name] = value + + def getresponse(self): + return _Resp(200) + class uploadTestCase(PyPIRCCommandTestCase): + def setUp(self): + super(uploadTestCase, self).setUp() + self.old_klass = httplib.HTTPConnection + httplib.HTTPConnection = _FakeHTTPConnection + + def tearDown(self): + httplib.HTTPConnection = self.old_klass + super(uploadTestCase, self).tearDown() + def test_finalize_options(self): # new format @@ -27,6 +86,33 @@ def test_finalize_options(self): self.assertEquals(getattr(cmd, attr), waited) + def test_upload(self): + tmp = self.mkdtemp() + path = os.path.join(tmp, 'xxx') + self.write_file(path) + command, pyversion, filename = 'xxx', '2.6', path + dist_files = [(command, pyversion, filename)] + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) + + # lets run it + pkg_dir, dist = self.create_dist(dist_files=dist_files) + cmd = upload(dist) + cmd.ensure_finalized() + cmd.run() + + # what did we send ? + res = _CONNECTIONS[-1] + + headers = res.headers + self.assertEquals(headers['Content-length'], '2086') + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) + + method, request = res.requests[-1] + self.assertEquals(method, 'POST') + self.assertEquals(res.netloc, 'pypi.python.org') + self.assertTrue('xxx' in res.body) + self.assertFalse('\n' in headers['Authorization']) + def test_suite(): return unittest.makeSuite(uploadTestCase) From 7553531b1974c77b2c51f9e22aaaa36eab115b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 00:02:20 +0000 Subject: [PATCH 2806/8469] Merged revisions 76952 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line Fixed #7552: fixed distutils.command.upload failure on very long passwords ........ --- command/upload.py | 4 ++-- tests/test_upload.py | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index defdda642b..674edd47c3 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ import socket import platform from urllib.request import urlopen, Request, HTTPError -import base64 +from base64 import standard_b64encode from urllib.parse import urlparse from hashlib import md5 @@ -130,7 +130,7 @@ def upload_file(self, command, pyversion, filename): user_pass = (self.username + ":" + self.password).encode('ascii') # The exact encoding of the authentication string is debated. # Anyway PyPI only accepts ascii for both username or password. - auth = "Basic " + base64.encodebytes(user_pass).strip().decode('ascii') + auth = "Basic " + standard_b64encode(user_pass).decode('ascii') # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' diff --git a/tests/test_upload.py b/tests/test_upload.py index 9281885876..979ab228dd 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -10,6 +10,25 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_LONG_PASSWORD = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + + PYPIRC_NOPASSWORD = """\ [distutils] @@ -85,7 +104,7 @@ def test_upload(self): self.write_file(path) command, pyversion, filename = 'xxx', '2.6', path dist_files = [(command, pyversion, filename)] - self.write_file(self.rc, PYPIRC) + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) # lets run it pkg_dir, dist = self.create_dist(dist_files=dist_files) @@ -101,6 +120,8 @@ def test_upload(self): self.assertEquals(self.last_open.req.get_full_url(), 'http://pypi.python.org/pypi') self.assertTrue(b'xxx' in self.last_open.req.data) + auth = self.last_open.req.headers['Authorization'] + self.assertFalse('\n' in auth) def test_suite(): return unittest.makeSuite(uploadTestCase) From 4a22e2d83c34290cda083fba276d73242d5a6983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 00:08:17 +0000 Subject: [PATCH 2807/8469] Merged revisions 76954 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76954 | tarek.ziade | 2009-12-21 01:02:20 +0100 (Mon, 21 Dec 2009) | 9 lines Merged revisions 76952 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line Fixed #7552: fixed distutils.command.upload failure on very long passwords ........ ................ --- command/upload.py | 4 ++-- tests/test_upload.py | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index 3b4a036718..f602fbeb68 100644 --- a/command/upload.py +++ b/command/upload.py @@ -12,7 +12,7 @@ import platform import configparser import http.client as httpclient -import base64 +from base64 import standard_b64encode import urllib.parse # this keeps compatibility for 2.3 and 2.4 @@ -127,7 +127,7 @@ def upload_file(self, command, pyversion, filename): user_pass = (self.username + ":" + self.password).encode('ascii') # The exact encoding of the authentication string is debated. # Anyway PyPI only accepts ascii for both username or password. - auth = "Basic " + base64.encodebytes(user_pass).strip().decode('ascii') + auth = "Basic " + standard_b64encode(user_pass).decode('ascii') # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' diff --git a/tests/test_upload.py b/tests/test_upload.py index 828f20c539..35e970051e 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -10,6 +10,25 @@ from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +PYPIRC_LONG_PASSWORD = """\ +[distutils] + +index-servers = + server1 + server2 + +[server1] +username:me +password:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ +""" + + PYPIRC_NOPASSWORD = """\ [distutils] @@ -96,7 +115,7 @@ def test_upload(self): self.write_file(path) command, pyversion, filename = 'xxx', '2.6', path dist_files = [(command, pyversion, filename)] - self.write_file(self.rc, PYPIRC) + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) # lets run it pkg_dir, dist = self.create_dist(dist_files=dist_files) @@ -108,6 +127,7 @@ def test_upload(self): headers = dict(self.conn.headers) self.assertEquals(headers['Content-length'], '2087') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) + self.assertFalse('\n' in headers['Authorization']) self.assertEquals(self.conn.requests, [('POST', '/pypi')]) self.assert_((b'xxx') in self.conn.body) From 3bd7aa023d339ea64ec5b381f2bf4f832dd50232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 01:22:46 +0000 Subject: [PATCH 2808/8469] massive import cleaning in Distutils --- bcppcompiler.py | 10 ++++------ ccompiler.py | 40 +++++++++++++++++++++------------------- command/bdist.py | 6 +++--- command/bdist_msi.py | 2 -- command/bdist_rpm.py | 15 ++++++++------- command/bdist_wininst.py | 9 ++++++--- command/build_clib.py | 2 +- command/build_ext.py | 3 ++- command/build_py.py | 1 - command/config.py | 3 ++- command/register.py | 5 +++-- command/sdist.py | 9 +++++---- command/upload.py | 4 +--- config.py | 3 --- core.py | 17 +++++++---------- cygwinccompiler.py | 2 -- dir_util.py | 2 +- dist.py | 3 ++- emxccompiler.py | 2 -- extension.py | 1 - fancy_getopt.py | 32 ++++++++------------------------ msvc9compiler.py | 7 +++---- msvccompiler.py | 15 ++++++++------- text_file.py | 25 ++++++++++++------------- 24 files changed, 97 insertions(+), 121 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index 5a0fa727cd..f26e7ae467 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -13,13 +13,11 @@ __revision__ = "$Id$" - import os -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError, UnknownFileError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options + +from distutils.errors import (DistutilsExecError, CompileError, LibError, + LinkError, UnknownFileError) +from distutils.ccompiler import CCompiler, gen_preprocess_options from distutils.file_util import write_file from distutils.dep_util import newer from distutils import log diff --git a/ccompiler.py b/ccompiler.py index e093eef2e8..c046915153 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -5,9 +5,11 @@ __revision__ = "$Id$" -import sys, os, re -from types import * -from distutils.errors import * +import sys +import os +import re + +from distutils.errors import CompileError, LinkError, UnknownFileError from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath @@ -165,7 +167,7 @@ class (via the 'executables' class attribute), but most will have: # set_executables () def set_executable(self, key, value): - if type(value) is StringType: + if isinstance(value, str): setattr(self, key, split_quoted(value)) else: setattr(self, key, value) @@ -187,11 +189,11 @@ def _check_macro_definitions (self, definitions): nothing if all definitions are OK, raise TypeError otherwise. """ for defn in definitions: - if not (type (defn) is TupleType and + if not (isinstance(defn, tuple) and (len (defn) == 1 or (len (defn) == 2 and - (type (defn[1]) is StringType or defn[1] is None))) and - type (defn[0]) is StringType): + (isinstance(defn[1], str) or defn[1] is None))) and + isinstance(defn[0], str)): raise TypeError, \ ("invalid macro definition '%s': " % defn) + \ "must be tuple (string,), (string, string), or " + \ @@ -341,19 +343,19 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, """ if outdir is None: outdir = self.output_dir - elif type(outdir) is not StringType: + elif not isinstance(outdir, str): raise TypeError, "'output_dir' must be a string or None" if macros is None: macros = self.macros - elif type(macros) is ListType: + elif isinstance(macros, list): macros = macros + (self.macros or []) else: raise TypeError, "'macros' (if supplied) must be a list of tuples" if incdirs is None: incdirs = self.include_dirs - elif type(incdirs) in (ListType, TupleType): + elif isinstance(incdirs, (list, tuple)): incdirs = list(incdirs) + (self.include_dirs or []) else: raise TypeError, \ @@ -444,14 +446,14 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): if macros is None: macros = self.macros - elif type (macros) is ListType: + elif isinstance(macros, list): macros = macros + (self.macros or []) else: raise TypeError, "'macros' (if supplied) must be a list of tuples" if include_dirs is None: include_dirs = self.include_dirs - elif type (include_dirs) in (ListType, TupleType): + elif isinstance(include_dirs, (list, tuple)): include_dirs = list (include_dirs) + (self.include_dirs or []) else: raise TypeError, \ @@ -517,14 +519,14 @@ def _fix_object_args (self, objects, output_dir): None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'. """ - if type (objects) not in (ListType, TupleType): + if not isinstance(objects, (list, tuple)): raise TypeError, \ "'objects' must be a list or tuple of strings" objects = list (objects) if output_dir is None: output_dir = self.output_dir - elif type (output_dir) is not StringType: + elif not isinstance(output_dir, str): raise TypeError, "'output_dir' must be a string or None" return (objects, output_dir) @@ -539,7 +541,7 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): """ if libraries is None: libraries = self.libraries - elif type (libraries) in (ListType, TupleType): + elif isinstance(libraries, (list, tuple)): libraries = list (libraries) + (self.libraries or []) else: raise TypeError, \ @@ -547,7 +549,7 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): if library_dirs is None: library_dirs = self.library_dirs - elif type (library_dirs) in (ListType, TupleType): + elif isinstance(library_dirs, (list, tuple)): library_dirs = list (library_dirs) + (self.library_dirs or []) else: raise TypeError, \ @@ -555,7 +557,7 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): if runtime_library_dirs is None: runtime_library_dirs = self.runtime_library_dirs - elif type (runtime_library_dirs) in (ListType, TupleType): + elif isinstance(runtime_library_dirs, (list, tuple)): runtime_library_dirs = (list (runtime_library_dirs) + (self.runtime_library_dirs or [])) else: @@ -587,7 +589,7 @@ def detect_language (self, sources): """Detect the language of a given file, or list of files. Uses language_map, and language_order to do the job. """ - if type(sources) is not ListType: + if not isinstance(sources, list): sources = [sources] lang = None index = len(self.language_order) @@ -1194,7 +1196,7 @@ def gen_preprocess_options (macros, include_dirs): pp_opts = [] for macro in macros: - if not (type (macro) is TupleType and + if not (isinstance(macro, tuple) and 1 <= len (macro) <= 2): raise TypeError, \ ("bad macro definition '%s': " + diff --git a/command/bdist.py b/command/bdist.py index 8e0ad080b9..8cd69701cf 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,9 +6,9 @@ __revision__ = "$Id$" import os -from types import * + from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsPlatformError, DistutilsOptionError from distutils.util import get_platform @@ -16,7 +16,7 @@ def show_formats(): """Print list of available formats (arguments to "--format" option). """ from distutils.fancy_getopt import FancyGetopt - formats=[] + formats = [] for format in bdist.format_commands: formats.append(("formats=" + format, None, bdist.format_command[format][1])) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 7a5ca807a6..f3791bedfe 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -28,7 +28,6 @@ def __init__(self, *args, **kw): default, cancel, bitmap=true)""" Dialog.__init__(self, *args) ruler = self.h - 36 - bmwidth = 152*ruler/328 #if kw.get("bitmap", True): # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin") self.line("BottomLine", 0, ruler, self.w, 0) @@ -420,7 +419,6 @@ def add_ui(self): # see "Dialog Style Bits" modal = 3 # visible | modal modeless = 1 # visible - track_disk_space = 32 # UI customization properties add_data(db, "Property", diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 1eccc6a48a..6d9d47d2eb 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -5,14 +5,15 @@ __revision__ = "$Id$" -import sys, os, string -from types import * +import sys +import os +import string + from distutils.core import Command from distutils.debug import DEBUG -from distutils.util import get_platform from distutils.file_util import write_file -from distutils.errors import * -from distutils.sysconfig import get_python_version +from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, + DistutilsFileError, DistutilsExecError) from distutils import log class bdist_rpm (Command): @@ -225,7 +226,7 @@ def finalize_package_data (self): self.distribution.get_contact_email())) self.ensure_string('packager') self.ensure_string_list('doc_files') - if type(self.doc_files) is ListType: + if isinstance(self.doc_files, list): for readme in ('README', 'README.txt'): if os.path.exists(readme) and readme not in self.doc_files: self.doc_files.append(readme) @@ -444,7 +445,7 @@ def _make_spec_file(self): 'Obsoletes', ): val = getattr(self, string.lower(field)) - if type(val) is ListType: + if isinstance(val, list): spec_file.append('%s: %s' % (field, string.join(val))) elif val is not None: spec_file.append('%s: %s' % (field, val)) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 8a6eca59d8..cf4282d83f 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -5,11 +5,14 @@ __revision__ = "$Id$" -import sys, os, string +import sys +import os +import string + from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree -from distutils.errors import * +from distutils.dir_util import remove_tree +from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log diff --git a/command/build_clib.py b/command/build_clib.py index 9545b27ad0..50b64dba25 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -18,7 +18,7 @@ import os from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsSetupError from distutils.sysconfig import customize_compiler from distutils import log diff --git a/command/build_ext.py b/command/build_ext.py index 0c79476bac..ff1a4be315 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -10,7 +10,8 @@ from warnings import warn from distutils.core import Command -from distutils.errors import * +from distutils.errors import (CCompilerError, DistutilsError, CompileError, + DistutilsSetupError, DistutilsPlatformError) from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension diff --git a/command/build_py.py b/command/build_py.py index 5c7b473b04..04c455f0eb 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -133,7 +133,6 @@ def find_data_files(self, package, src_dir): def build_package_data(self): """Copy data files into build directory""" - lastdir = None for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) diff --git a/command/config.py b/command/config.py index 134fa3892d..b084913563 100644 --- a/command/config.py +++ b/command/config.py @@ -11,7 +11,8 @@ __revision__ = "$Id$" -import sys, os, re +import os +import re from distutils.core import Command from distutils.errors import DistutilsExecError diff --git a/command/register.py b/command/register.py index 3b5b2080ec..fb547c93a8 100644 --- a/command/register.py +++ b/command/register.py @@ -7,12 +7,13 @@ __revision__ = "$Id$" -import os, string, urllib2, getpass, urlparse +import urllib2 +import getpass +import urlparse import StringIO from warnings import warn from distutils.core import PyPIRCCommand -from distutils.errors import * from distutils import log class register(PyPIRCCommand): diff --git a/command/sdist.py b/command/sdist.py index 5c74e5329f..f1335e6a36 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -4,16 +4,17 @@ __revision__ = "$Id$" -import os, string +import os +import string import sys -from types import * from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile -from distutils.errors import * +from distutils.errors import (DistutilsPlatformError, DistutilsOptionError, + DistutilsTemplateError) from distutils.filelist import FileList from distutils import log from distutils.util import convert_path @@ -256,7 +257,7 @@ def add_defaults(self): standards = [('README', 'README.txt'), self.distribution.script_name] for fn in standards: - if type(fn) is TupleType: + if isinstance(fn, tuple): alts = fn got_it = 0 for fn in alts: diff --git a/command/upload.py b/command/upload.py index 5d6ebcfa4c..3e18aeaad6 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,7 +1,6 @@ """distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" -import sys import os import socket import platform @@ -9,10 +8,9 @@ from base64 import standard_b64encode import urlparse import cStringIO as StringIO -from ConfigParser import ConfigParser from hashlib import md5 -from distutils.errors import * +from distutils.errors import DistutilsOptionError from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log diff --git a/config.py b/config.py index 9166199ea9..afa403f2da 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,6 @@ that uses .pypirc in the distutils.command package. """ import os -import sys from ConfigParser import ConfigParser from distutils.cmd import Command @@ -60,8 +59,6 @@ def _read_pypirc(self): if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY - realm = self.realm or self.DEFAULT_REALM - config = ConfigParser() config.read(rc) sections = config.sections() diff --git a/core.py b/core.py index 8073a6bc2a..0b725ff09d 100644 --- a/core.py +++ b/core.py @@ -8,10 +8,12 @@ __revision__ = "$Id$" -import sys, os +import sys +import os from distutils.debug import DEBUG -from distutils.errors import * +from distutils.errors import (DistutilsSetupError, DistutilsArgError, + DistutilsError, CCompilerError) from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. @@ -31,7 +33,7 @@ or: %(script)s cmd --help """ -def gen_usage (script_name): +def gen_usage(script_name): script = os.path.basename(script_name) return USAGE % vars() @@ -56,7 +58,7 @@ def gen_usage (script_name): 'extra_objects', 'extra_compile_args', 'extra_link_args', 'swig_opts', 'export_symbols', 'depends', 'language') -def setup (**attrs): +def setup(**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command @@ -168,10 +170,8 @@ class found in 'cmdclass' is used in place of the default, which is return dist -# setup () - -def run_setup (script_name, script_args=None, stop_after="run"): +def run_setup(script_name, script_args=None, stop_after="run"): """Run a setup script in a somewhat controlled environment, and return the Distribution instance that drives things. This is useful if you need to find out the distribution meta-data (passed as @@ -235,7 +235,4 @@ def run_setup (script_name, script_args=None, stop_after="run"): # I wonder if the setup script's namespace -- g and l -- would be of # any interest to callers? - #print "_setup_distribution:", _setup_distribution return _setup_distribution - -# run_setup () diff --git a/cygwinccompiler.py b/cygwinccompiler.py index a8476e6579..eed9c321af 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -53,11 +53,9 @@ import re from warnings import warn -from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils import log from distutils.util import get_compiler_versions def get_msvcr(): diff --git a/dir_util.py b/dir_util.py index 3e2cd35385..9b4d2adb5c 100644 --- a/dir_util.py +++ b/dir_util.py @@ -4,7 +4,7 @@ __revision__ = "$Id$" -import os, sys +import os from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log diff --git a/dist.py b/dist.py index ee2cec9088..f20a92a21d 100644 --- a/dist.py +++ b/dist.py @@ -14,7 +14,8 @@ except ImportError: warnings = None -from distutils.errors import * +from distutils.errors import (DistutilsOptionError, DistutilsArgError, + DistutilsModuleError, DistutilsClassError) from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape from distutils import log diff --git a/emxccompiler.py b/emxccompiler.py index a5a2ef88fe..f2f77e52d1 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -24,11 +24,9 @@ import os, sys, copy from warnings import warn -from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils import log from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): diff --git a/extension.py b/extension.py index 6af1810801..9988ec0c2c 100644 --- a/extension.py +++ b/extension.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import os -import sys import warnings # This class is really only used by the "build_ext" command, so it might diff --git a/fancy_getopt.py b/fancy_getopt.py index e19319ae9d..2dea948025 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -10,10 +10,11 @@ __revision__ = "$Id$" -import sys, string, re -from types import * +import sys +import string +import re import getopt -from distutils.errors import * +from distutils.errors import DistutilsGetoptError, DistutilsArgError # Much like command_re in distutils.core, this is close to but not quite # the same as a Python NAME -- except, in the spirit of most GNU @@ -117,7 +118,7 @@ def get_attr_name (self, long_option): def _check_alias_dict (self, aliases, what): - assert type(aliases) is DictionaryType + assert isinstance(aliases, dict) for (alias, opt) in aliases.items(): if alias not in self.option_index: raise DistutilsGetoptError, \ @@ -164,13 +165,13 @@ def _grok_option_table (self): raise ValueError, "invalid option tuple: %r" % (option,) # Type- and value-check the option names - if type(long) is not StringType or len(long) < 2: + if not isinstance(long, str) or len(long) < 2: raise DistutilsGetoptError, \ ("invalid long option '%s': " "must be a string of length >= 2") % long if (not ((short is None) or - (type(short) is StringType and len(short) == 1))): + (isinstance(short, str) and len(short) == 1))): raise DistutilsGetoptError, \ ("invalid short option '%s': " "must a single character or None") % short @@ -464,10 +465,8 @@ def wrap_text (text, width): return lines -# wrap_text () - -def translate_longopt (opt): +def translate_longopt(opt): """Convert a long option name to a valid Python identifier by changing "-" to "_". """ @@ -483,18 +482,3 @@ def __init__ (self, options=[]): 'options' will be initialized to None.""" for opt in options: setattr(self, opt, None) - -# class OptionDummy - - -if __name__ == "__main__": - text = """\ -Tra-la-la, supercalifragilisticexpialidocious. -How *do* you spell that odd word, anyways? -(Someone ask Mary -- she'll know [or she'll -say, "How should I know?"].)""" - - for w in (10, 20, 30, 40): - print "width: %d" % w - print string.join(wrap_text(text, w), "\n") - print diff --git a/msvc9compiler.py b/msvc9compiler.py index c2287d9291..2309d89488 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -19,10 +19,9 @@ import sys import re -from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import CCompiler, gen_preprocess_options, \ - gen_lib_options +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log from distutils.util import get_platform diff --git a/msvccompiler.py b/msvccompiler.py index d38afb7223..0e69fd368c 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -10,12 +10,13 @@ __revision__ = "$Id$" -import sys, os, string -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options +import sys +import os +import string + +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log _can_read_reg = 0 @@ -127,7 +128,7 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError, exc: # + except KeyError: raise DistutilsPlatformError, \ ("""Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. diff --git a/text_file.py b/text_file.py index 931f0bac19..09a798b190 100644 --- a/text_file.py +++ b/text_file.py @@ -6,8 +6,7 @@ __revision__ = "$Id$" -from types import * -import sys, os, string +import sys class TextFile: @@ -137,12 +136,12 @@ def gen_error (self, msg, line=None): if line is None: line = self.current_line outmsg.append(self.filename + ", ") - if type (line) in (ListType, TupleType): + if isinstance(line, (list, tuple)): outmsg.append("lines %d-%d: " % tuple (line)) else: outmsg.append("line %d: " % line) outmsg.append(str(msg)) - return string.join(outmsg, "") + return ''.join(outmsg) def error (self, msg, line=None): @@ -196,7 +195,7 @@ def readline (self): # unescape it (and any other escaped "#"'s that might be # lurking in there) and otherwise leave the line alone. - pos = string.find (line, "#") + pos = line.find("#") if pos == -1: # no "#" -- no comments pass @@ -219,11 +218,11 @@ def readline (self): # # comment that should be ignored # there # result in "hello there". - if string.strip(line) == "": + if line.strip() == "": continue else: # it's an escaped "#" - line = string.replace (line, "\\#", "#") + line = line.replace("\\#", "#") # did previous line end with a backslash? then accumulate @@ -235,11 +234,11 @@ def readline (self): return buildup_line if self.collapse_join: - line = string.lstrip (line) + line = line.lstrip() line = buildup_line + line # careful: pay attention to line number when incrementing it - if type (self.current_line) is ListType: + if isinstance(self.current_line, list): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, @@ -250,7 +249,7 @@ def readline (self): return None # still have to be careful about incrementing the line number! - if type (self.current_line) is ListType: + if isinstance(self.current_line, list): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 @@ -259,11 +258,11 @@ def readline (self): # strip whitespace however the client wants (leading and # trailing, or one or the other, or neither) if self.lstrip_ws and self.rstrip_ws: - line = string.strip (line) + line = line.strip() elif self.lstrip_ws: - line = string.lstrip (line) + line = line.lstrip() elif self.rstrip_ws: - line = string.rstrip (line) + line = line.rstrip() # blank line (whether we rstrip'ed or not)? skip to next line # if appropriate From 9414e0ddcaa3c08782325904d0d1d890dc8fa332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 01:49:00 +0000 Subject: [PATCH 2809/8469] Merged revisions 76956 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76956 | tarek.ziade | 2009-12-21 02:22:46 +0100 (Mon, 21 Dec 2009) | 1 line massive import cleaning in Distutils ........ --- bcppcompiler.py | 10 ++++------ ccompiler.py | 7 +++++-- command/bdist.py | 3 ++- command/bdist_msi.py | 2 -- command/bdist_rpm.py | 9 +++++---- command/bdist_wininst.py | 8 +++++--- command/build_clib.py | 2 +- command/build_ext.py | 3 ++- command/build_py.py | 1 - command/config.py | 3 ++- command/register.py | 8 +++++--- command/sdist.py | 4 ++-- command/upload.py | 6 +++--- config.py | 3 --- core.py | 17 +++++++---------- cygwinccompiler.py | 2 -- dir_util.py | 2 +- dist.py | 3 ++- emxccompiler.py | 2 -- extension.py | 1 - fancy_getopt.py | 19 ++++--------------- msvc9compiler.py | 7 +++---- msvccompiler.py | 14 +++++++------- text_file.py | 4 ++-- 24 files changed, 62 insertions(+), 78 deletions(-) diff --git a/bcppcompiler.py b/bcppcompiler.py index c5e5cd2571..77d94a59a2 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -13,13 +13,11 @@ __revision__ = "$Id$" - import os -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError, UnknownFileError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options + +from distutils.errors import (DistutilsExecError, CompileError, LibError, + LinkError, UnknownFileError) +from distutils.ccompiler import CCompiler, gen_preprocess_options from distutils.file_util import write_file from distutils.dep_util import newer from distutils import log diff --git a/ccompiler.py b/ccompiler.py index ff7f9df1c3..407cabda46 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -5,8 +5,11 @@ __revision__ = "$Id$" -import sys, os, re -from distutils.errors import * +import sys +import os +import re + +from distutils.errors import CompileError, LinkError, UnknownFileError from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath diff --git a/command/bdist.py b/command/bdist.py index 2c81f3a9c0..dd202ff449 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,8 +6,9 @@ __revision__ = "$Id$" import os + from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsPlatformError, DistutilsOptionError from distutils.util import get_platform diff --git a/command/bdist_msi.py b/command/bdist_msi.py index c4be47b579..f9205483d7 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -28,7 +28,6 @@ def __init__(self, *args, **kw): default, cancel, bitmap=true)""" Dialog.__init__(self, *args) ruler = self.h - 36 - bmwidth = 152*ruler/328 #if kw.get("bitmap", True): # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin") self.line("BottomLine", 0, ruler, self.w, 0) @@ -419,7 +418,6 @@ def add_ui(self): # see "Dialog Style Bits" modal = 3 # visible | modal modeless = 1 # visible - track_disk_space = 32 # UI customization properties add_data(db, "Property", diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 452f9502ad..0a579dbb93 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -5,13 +5,14 @@ __revision__ = "$Id$" -import sys, os +import sys +import os + from distutils.core import Command from distutils.debug import DEBUG -from distutils.util import get_platform from distutils.file_util import write_file -from distutils.errors import * -from distutils.sysconfig import get_python_version +from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, + DistutilsFileError, DistutilsExecError) from distutils import log class bdist_rpm(Command): diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d6d01c630d..0b7044a00e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -5,11 +5,13 @@ __revision__ = "$Id$" -import sys, os +import sys +import os + from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree -from distutils.errors import * +from distutils.dir_util import remove_tree +from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.sysconfig import get_python_version from distutils import log diff --git a/command/build_clib.py b/command/build_clib.py index 258d7c10be..12bf1d2fe3 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -18,7 +18,7 @@ import os from distutils.core import Command -from distutils.errors import * +from distutils.errors import DistutilsSetupError from distutils.sysconfig import customize_compiler from distutils import log diff --git a/command/build_ext.py b/command/build_ext.py index 70dd81f10d..de980bd841 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -10,7 +10,8 @@ from warnings import warn from distutils.core import Command -from distutils.errors import * +from distutils.errors import (CCompilerError, DistutilsError, CompileError, + DistutilsSetupError, DistutilsPlatformError) from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension diff --git a/command/build_py.py b/command/build_py.py index fa08579652..7cc935390f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -133,7 +133,6 @@ def find_data_files(self, package, src_dir): def build_package_data(self): """Copy data files into build directory""" - lastdir = None for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) diff --git a/command/config.py b/command/config.py index ac80a54eb1..830552cdc4 100644 --- a/command/config.py +++ b/command/config.py @@ -11,7 +11,8 @@ __revision__ = "$Id$" -import sys, os, re +import os +import re from distutils.core import Command from distutils.errors import DistutilsExecError diff --git a/command/register.py b/command/register.py index bdf5f8f09c..7d3dc53afe 100644 --- a/command/register.py +++ b/command/register.py @@ -7,13 +7,15 @@ __revision__ = "$Id$" -import os, string, getpass +import os +import string +import getpass import io -import urllib.parse, urllib.request +import urllib.parse +import urllib.request from warnings import warn from distutils.core import PyPIRCCommand -from distutils.errors import * from distutils import log class register(PyPIRCCommand): diff --git a/command/sdist.py b/command/sdist.py index 76e1de8100..f33406cd59 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -7,14 +7,14 @@ import os import string import sys -from types import * from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile -from distutils.errors import * +from distutils.errors import (DistutilsPlatformError, DistutilsOptionError, + DistutilsTemplateError) from distutils.filelist import FileList from distutils import log from distutils.util import convert_path diff --git a/command/upload.py b/command/upload.py index 674edd47c3..bb1b7fc4fe 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,8 +1,8 @@ """distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" -import sys -import os, io +import os +import io import socket import platform from urllib.request import urlopen, Request, HTTPError @@ -10,7 +10,7 @@ from urllib.parse import urlparse from hashlib import md5 -from distutils.errors import * +from distutils.errors import DistutilsOptionError from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log diff --git a/config.py b/config.py index 5b625f3f7d..fe41ce977e 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,6 @@ that uses .pypirc in the distutils.command package. """ import os -import sys from configparser import ConfigParser from distutils.cmd import Command @@ -60,8 +59,6 @@ def _read_pypirc(self): if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY - realm = self.realm or self.DEFAULT_REALM - config = ConfigParser() config.read(rc) sections = config.sections() diff --git a/core.py b/core.py index 95c035742e..c820a420b9 100644 --- a/core.py +++ b/core.py @@ -8,10 +8,12 @@ __revision__ = "$Id$" -import sys, os +import sys +import os from distutils.debug import DEBUG -from distutils.errors import * +from distutils.errors import (DistutilsSetupError, DistutilsArgError, + DistutilsError, CCompilerError) from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. @@ -31,7 +33,7 @@ or: %(script)s cmd --help """ -def gen_usage (script_name): +def gen_usage(script_name): script = os.path.basename(script_name) return USAGE % vars() @@ -56,7 +58,7 @@ def gen_usage (script_name): 'extra_objects', 'extra_compile_args', 'extra_link_args', 'swig_opts', 'export_symbols', 'depends', 'language') -def setup (**attrs): +def setup(**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command @@ -168,10 +170,8 @@ class found in 'cmdclass' is used in place of the default, which is return dist -# setup () - -def run_setup (script_name, script_args=None, stop_after="run"): +def run_setup(script_name, script_args=None, stop_after="run"): """Run a setup script in a somewhat controlled environment, and return the Distribution instance that drives things. This is useful if you need to find out the distribution meta-data (passed as @@ -234,7 +234,4 @@ def run_setup (script_name, script_args=None, stop_after="run"): # I wonder if the setup script's namespace -- g and l -- would be of # any interest to callers? - #print "_setup_distribution:", _setup_distribution return _setup_distribution - -# run_setup () diff --git a/cygwinccompiler.py b/cygwinccompiler.py index d9f4a43df7..3e2a634f7e 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -53,11 +53,9 @@ import re from warnings import warn -from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils import log from distutils.util import get_compiler_versions def get_msvcr(): diff --git a/dir_util.py b/dir_util.py index 98e6252c6c..370025b734 100644 --- a/dir_util.py +++ b/dir_util.py @@ -4,7 +4,7 @@ __revision__ = "$Id$" -import os, sys +import os from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log diff --git a/dist.py b/dist.py index 353525e17d..5a107e7d83 100644 --- a/dist.py +++ b/dist.py @@ -14,7 +14,8 @@ except ImportError: warnings = None -from distutils.errors import * +from distutils.errors import (DistutilsOptionError, DistutilsArgError, + DistutilsModuleError, DistutilsClassError) from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape from distutils import log diff --git a/emxccompiler.py b/emxccompiler.py index 50634d6c06..fd79aec2cf 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -24,11 +24,9 @@ import os, sys, copy from warnings import warn -from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils import log from distutils.util import get_compiler_versions class EMXCCompiler (UnixCCompiler): diff --git a/extension.py b/extension.py index 5c07bdae82..10aaf7c504 100644 --- a/extension.py +++ b/extension.py @@ -6,7 +6,6 @@ __revision__ = "$Id$" import os -import sys import warnings # This class is really only used by the "build_ext" command, so it might diff --git a/fancy_getopt.py b/fancy_getopt.py index 879d4d25bf..73343ad5af 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -10,9 +10,11 @@ __revision__ = "$Id$" -import sys, string, re +import sys +import string +import re import getopt -from distutils.errors import * +from distutils.errors import DistutilsGetoptError, DistutilsArgError # Much like command_re in distutils.core, this is close to but not quite # the same as a Python NAME -- except, in the spirit of most GNU @@ -444,16 +446,3 @@ def __init__(self, options=[]): 'options' will be initialized to None.""" for opt in options: setattr(self, opt, None) - - -if __name__ == "__main__": - text = """\ -Tra-la-la, supercalifragilisticexpialidocious. -How *do* you spell that odd word, anyways? -(Someone ask Mary -- she'll know [or she'll -say, "How should I know?"].)""" - - for w in (10, 20, 30, 40): - print("width: %d" % w) - print("\n".join(wrap_text(text, w))) - print() diff --git a/msvc9compiler.py b/msvc9compiler.py index c84fb0b4a6..4d05a44522 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -19,10 +19,9 @@ import sys import re -from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import CCompiler, gen_preprocess_options, \ - gen_lib_options +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log from distutils.util import get_platform diff --git a/msvccompiler.py b/msvccompiler.py index 1cd0f91d5f..dc3bd8de47 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -10,12 +10,12 @@ __revision__ = "$Id$" -import sys, os -from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ - CompileError, LibError, LinkError -from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options +import sys +import os + +from distutils.errors import (DistutilsExecError, DistutilsPlatformError, + CompileError, LibError, LinkError) +from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log _can_read_reg = False @@ -124,7 +124,7 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError as exc: # + except KeyError: raise DistutilsPlatformError( """Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. diff --git a/text_file.py b/text_file.py index 97459fbf73..53c8561a3e 100644 --- a/text_file.py +++ b/text_file.py @@ -6,8 +6,8 @@ __revision__ = "$Id$" -import sys, os, io - +import sys +import io class TextFile: """Provides a file-like object that takes care of all the things you From 6f01576b084ee29da8fd89ee34bda163be2ddf61 Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 21 Dec 2009 14:36:07 +0100 Subject: [PATCH 2810/8469] uses distutils install schemes now --HG-- branch : distribute extra : rebase_source : fe92fa9e0949f11f27bbc94197fc812ed841dccf --- tests/manual_test.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index ce8d10f2a0..6cbf62a868 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -4,6 +4,8 @@ import tempfile import subprocess import sys +from distutils.command.install import INSTALL_SCHEMES +from string import Template if sys.version_info[0] < 3: from urllib2 import urlopen @@ -37,17 +39,27 @@ def _tempdir(*args, **kwargs): BOOTSTRAP = 'http://python-distribute.org/bootstrap.py' PYVER = sys.version.split()[0][:3] + +_VARS = {'base': '.', + 'py_version_short': PYVER} + +if sys.platform == 'win32': + PURELIB = INSTALL_SCHEMES['nt']['purelib'] +else: + PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] + + @tempdir def test_virtualenv(): """virtualenv with distribute""" + purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) os.system('virtualenv --no-site-packages . --distribute') os.system('bin/easy_install -q distribute==dev') # linux specific - site_pkg = os.listdir(os.path.join('.', 'lib', 'python'+PYVER, 'site-packages')) + site_pkg = os.listdir(purelib) site_pkg.sort() assert 'distribute' in site_pkg[0] - easy_install = os.path.join('.', 'lib', 'python'+PYVER, 'site-packages', - 'easy-install.pth') + easy_install = os.path.join(purelib, 'easy-install.pth') with open(easy_install) as f: res = f.read() assert 'distribute' in res @@ -74,7 +86,7 @@ def test_full(): assert len(eggs) == 3 assert eggs[0].startswith('distribute') assert eggs[1:] == ['extensions-0.3-py2.6.egg', - 'zc.recipe.egg-1.2.2-py2.6.egg'] + 'zc.recipe.egg-1.2.2-py2.6.egg'] if __name__ == '__main__': From 8b91eb9ff7f2fa30d8c405b737d85e0165b4b99f Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 21 Dec 2009 14:48:33 +0100 Subject: [PATCH 2811/8469] disable Py3 --HG-- branch : distribute extra : rebase_source : 05a91504dccded377676a993266f9b619b721aaa --- tests/manual_test.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 6cbf62a868..d987883292 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -1,16 +1,16 @@ #!/usr/bin/env python +import sys + +if sys.version_info[0] >= 3: + raise NotImplementedError('Py3 not supported in this test yet') + import os import shutil import tempfile import subprocess -import sys from distutils.command.install import INSTALL_SCHEMES from string import Template - -if sys.version_info[0] < 3: - from urllib2 import urlopen -else: - from urllib.request import urlopen +from urllib2 import urlopen def tempdir(func): def _tempdir(*args, **kwargs): @@ -38,7 +38,7 @@ def _tempdir(*args, **kwargs): BOOTSTRAP = 'http://python-distribute.org/bootstrap.py' PYVER = sys.version.split()[0][:3] - +DEV_URL = 'http://bitbucket.org/tarek/distribute/get/0.6-maintenance.zip#egg=distribute-dev' _VARS = {'base': '.', 'py_version_short': PYVER} @@ -54,7 +54,7 @@ def test_virtualenv(): """virtualenv with distribute""" purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) os.system('virtualenv --no-site-packages . --distribute') - os.system('bin/easy_install -q distribute==dev') + os.system('bin/easy_install distribute==dev') # linux specific site_pkg = os.listdir(purelib) site_pkg.sort() @@ -88,7 +88,6 @@ def test_full(): assert eggs[1:] == ['extensions-0.3-py2.6.egg', 'zc.recipe.egg-1.2.2-py2.6.egg'] - if __name__ == '__main__': test_virtualenv() test_full() From 04ae5e1755822db9f2c7545e7925cc5a1576121a Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 21 Dec 2009 14:58:30 +0100 Subject: [PATCH 2812/8469] now using subprocess.call --HG-- branch : distribute extra : rebase_source : 62f83395c4d3d949b9e259c6d193a214e63aef41 --- tests/manual_test.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index d987883292..63464bc537 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -11,6 +11,7 @@ from distutils.command.install import INSTALL_SCHEMES from string import Template from urllib2 import urlopen +import subprocess def tempdir(func): def _tempdir(*args, **kwargs): @@ -48,13 +49,15 @@ def _tempdir(*args, **kwargs): else: PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] +def _system_call(*args): + assert subprocess.call(args) == 0 @tempdir def test_virtualenv(): """virtualenv with distribute""" purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) - os.system('virtualenv --no-site-packages . --distribute') - os.system('bin/easy_install distribute==dev') + _system_call('virtualenv', '--no-site-packages', '.', '--distribute') + _system_call('bin/easy_install', 'distribute==dev') # linux specific site_pkg = os.listdir(purelib) site_pkg.sort() @@ -68,19 +71,20 @@ def test_virtualenv(): @tempdir def test_full(): """virtualenv + pip + buildout""" - os.system('virtualenv --no-site-packages .') - os.system('bin/easy_install -q distribute==dev') - os.system('bin/easy_install -qU distribute==dev') - os.system('bin/easy_install -q pip') - os.system('bin/pip install -q zc.buildout') + _system_call('virtualenv', '--no-site-packages', '.') + _system_call('bin/easy_install', '-q', 'distribute==dev') + _system_call('bin/easy_install', '-qU', 'distribute==dev') + _system_call('bin/easy_install', '-q', 'pip') + _system_call('bin/pip', 'install', '-q', 'zc.buildout') + with open('buildout.cfg', 'w') as f: f.write(SIMPLE_BUILDOUT) with open('bootstrap.py', 'w') as f: f.write(urlopen(BOOTSTRAP).read()) - os.system('bin/python bootstrap.py --distribute') - os.system('bin/buildout -q') + _system_call('bin/python', 'bootstrap.py', '--distribute') + _system_call('bin/buildout', '-q') eggs = os.listdir('eggs') eggs.sort() assert len(eggs) == 3 From 64110315b99e2f3a3d900cdaa4edd593a47373ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 23:12:41 +0000 Subject: [PATCH 2813/8469] Fixed #7556: editing the MSVC manifest file with a regexp was throwing an error --- msvc9compiler.py | 51 ++++++++++++---------- tests/test_msvc9compiler.py | 87 ++++++++++++++++++++++++++++++++++--- 2 files changed, 109 insertions(+), 29 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 4d05a44522..6455fffa1f 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -645,28 +645,8 @@ def link(self, mfid = 1 else: mfid = 2 - try: - # Remove references to the Visual C runtime, so they will - # fall through to the Visual C dependency of Python.exe. - # This way, when installed for a restricted user (e.g. - # runtimes are not in WinSxS folder, but in Python's own - # folder), the runtimes do not need to be in every folder - # with .pyd's. - manifest_f = open(temp_manifest, "rb") - manifest_buf = manifest_f.read() - manifest_f.close() - pattern = re.compile( - r"""|)""", - re.DOTALL) - manifest_buf = re.sub(pattern, "", manifest_buf) - pattern = "\s*" - manifest_buf = re.sub(pattern, "", manifest_buf) - manifest_f = open(temp_manifest, "wb") - manifest_f.write(manifest_buf) - manifest_f.close() - except IOError: - pass + # Remove references to the Visual C runtime + self._remove_visual_c_ref(temp_manifest) out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', @@ -676,6 +656,33 @@ def link(self, else: log.debug("skipping %s (up-to-date)", output_filename) + def _remove_visual_c_ref(self, manifest_file): + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(manifest_file) + try: + manifest_buf = manifest_f.read() + finally: + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(manifest_file, 'w') + try: + manifest_f.write(manifest_buf) + finally: + manifest_f.close() + except IOError: + pass # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 05d34e604c..e1f08d8ad8 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -1,18 +1,73 @@ """Tests for distutils.msvc9compiler.""" import sys import unittest +import os from distutils.errors import DistutilsPlatformError +from distutils.tests import support -class msvc9compilerTestCase(unittest.TestCase): +_MANIFEST = """\ + + + + + + + + + + + + + + + + + + + + + + +""" + +_CLEANED_MANIFEST = """\ + + + + + + + + + + + + + + + + + + +""" + +@unittest.skip("These tests are only for win32") +class msvc9compilerTestCase(support.TempdirManager, + unittest.TestCase): def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -31,9 +86,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -56,6 +108,27 @@ def test_reg_class(self): keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) + def test_remove_visual_c_ref(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + f.write(_MANIFEST) + f.close() + + compiler = MSVCCompiler() + compiler._remove_visual_c_ref(manifest) + + # see what we got + f = open(manifest) + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + f.close() + + # makes sure the manifest was properly cleaned + self.assertEquals(content, _CLEANED_MANIFEST) + + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 8ea52f665aeeacfecc93f73974760b0c45a89c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 23:16:09 +0000 Subject: [PATCH 2814/8469] forgot to add the win32 test in the unittest skip call --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index e1f08d8ad8..8a908d9954 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -60,7 +60,7 @@ """ -@unittest.skip("These tests are only for win32") +@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): From 0c509da5a253d37dbb5a3890b5effe1948acd62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 23:18:02 +0000 Subject: [PATCH 2815/8469] Merged revisions 76993-76994 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76993 | tarek.ziade | 2009-12-22 00:12:41 +0100 (Tue, 22 Dec 2009) | 1 line Fixed #7556: editing the MSVC manifest file with a regexp was throwing an error ........ r76994 | tarek.ziade | 2009-12-22 00:16:09 +0100 (Tue, 22 Dec 2009) | 1 line forgot to add the win32 test in the unittest skip call ........ --- msvc9compiler.py | 51 ++++++++++++---------- tests/test_msvc9compiler.py | 87 ++++++++++++++++++++++++++++++++++--- 2 files changed, 109 insertions(+), 29 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index c84fb0b4a6..ad021b5754 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -646,28 +646,8 @@ def link(self, mfid = 1 else: mfid = 2 - try: - # Remove references to the Visual C runtime, so they will - # fall through to the Visual C dependency of Python.exe. - # This way, when installed for a restricted user (e.g. - # runtimes are not in WinSxS folder, but in Python's own - # folder), the runtimes do not need to be in every folder - # with .pyd's. - manifest_f = open(temp_manifest, "rb") - manifest_buf = manifest_f.read() - manifest_f.close() - pattern = re.compile( - r"""|)""", - re.DOTALL) - manifest_buf = re.sub(pattern, "", manifest_buf) - pattern = "\s*" - manifest_buf = re.sub(pattern, "", manifest_buf) - manifest_f = open(temp_manifest, "wb") - manifest_f.write(manifest_buf) - manifest_f.close() - except IOError: - pass + # Remove references to the Visual C runtime + self._remove_visual_c_ref(temp_manifest) out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', @@ -677,6 +657,33 @@ def link(self, else: log.debug("skipping %s (up-to-date)", output_filename) + def _remove_visual_c_ref(self, manifest_file): + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(manifest_file) + try: + manifest_buf = manifest_f.read() + finally: + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(manifest_file, 'w') + try: + manifest_f.write(manifest_buf) + finally: + manifest_f.close() + except IOError: + pass # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 05d34e604c..8a908d9954 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -1,18 +1,73 @@ """Tests for distutils.msvc9compiler.""" import sys import unittest +import os from distutils.errors import DistutilsPlatformError +from distutils.tests import support -class msvc9compilerTestCase(unittest.TestCase): +_MANIFEST = """\ + + + + + + + + + + + + + + + + + + + + + + +""" + +_CLEANED_MANIFEST = """\ + + + + + + + + + + + + + + + + + + +""" + +@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +class msvc9compilerTestCase(support.TempdirManager, + unittest.TestCase): def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -31,9 +86,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -56,6 +108,27 @@ def test_reg_class(self): keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) + def test_remove_visual_c_ref(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + f.write(_MANIFEST) + f.close() + + compiler = MSVCCompiler() + compiler._remove_visual_c_ref(manifest) + + # see what we got + f = open(manifest) + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + f.close() + + # makes sure the manifest was properly cleaned + self.assertEquals(content, _CLEANED_MANIFEST) + + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 9c871d1c7a99fb62f5682ec265fa354f3ff9af10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 21 Dec 2009 23:31:55 +0000 Subject: [PATCH 2816/8469] backported r76993 and r76994 so the trunk behaves the same way with MSVC Manifest files editing --- msvc9compiler.py | 50 +++++++++++---------- tests/test_msvc9compiler.py | 87 ++++++++++++++++++++++++++++++++++--- 2 files changed, 108 insertions(+), 29 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 2309d89488..41d67faf59 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -646,28 +646,7 @@ def link(self, mfid = 1 else: mfid = 2 - try: - # Remove references to the Visual C runtime, so they will - # fall through to the Visual C dependency of Python.exe. - # This way, when installed for a restricted user (e.g. - # runtimes are not in WinSxS folder, but in Python's own - # folder), the runtimes do not need to be in every folder - # with .pyd's. - manifest_f = open(temp_manifest, "rb") - manifest_buf = manifest_f.read() - manifest_f.close() - pattern = re.compile( - r"""|)""", - re.DOTALL) - manifest_buf = re.sub(pattern, "", manifest_buf) - pattern = "\s*" - manifest_buf = re.sub(pattern, "", manifest_buf) - manifest_f = open(temp_manifest, "wb") - manifest_f.write(manifest_buf) - manifest_f.close() - except IOError: - pass + self._remove_visual_c_ref(temp_manifest) out_arg = '-outputresource:%s;%s' % (output_filename, mfid) try: self.spawn(['mt.exe', '-nologo', '-manifest', @@ -677,6 +656,33 @@ def link(self, else: log.debug("skipping %s (up-to-date)", output_filename) + def _remove_visual_c_ref(self, manifest_file): + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + manifest_f = open(manifest_file) + try: + manifest_buf = manifest_f.read() + finally: + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + manifest_f = open(manifest_file, 'w') + try: + manifest_f.write(manifest_buf) + finally: + manifest_f.close() + except IOError: + pass # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 1264854d0d..503a5a8056 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -1,18 +1,73 @@ """Tests for distutils.msvc9compiler.""" import sys import unittest +import os from distutils.errors import DistutilsPlatformError +from distutils.tests import support -class msvc9compilerTestCase(unittest.TestCase): +_MANIFEST = """\ + + + + + + + + + + + + + + + + + + + + + + +""" + +_CLEANED_MANIFEST = """\ + + + + + + + + + + + + + + + + + + +""" + +@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +class msvc9compilerTestCase(support.TempdirManager, + unittest.TestCase): def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -31,9 +86,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - if sys.platform != 'win32': - # this test is only for win32 - return from distutils.msvccompiler import get_build_version if get_build_version() < 8.0: # this test is only for MSVC8.0 or above @@ -56,6 +108,27 @@ def test_reg_class(self): keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) + def test_remove_visual_c_ref(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + f.write(_MANIFEST) + f.close() + + compiler = MSVCCompiler() + compiler._remove_visual_c_ref(manifest) + + # see what we got + f = open(manifest) + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + f.close() + + # makes sure the manifest was properly cleaned + self.assertEquals(content, _CLEANED_MANIFEST) + + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 518952766c40646198629634cbf5fc5df9ba7ae6 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 24 Dec 2009 13:06:39 +0000 Subject: [PATCH 2817/8469] On OSX the output of "uname -m" always reflects the 32-bit architecture for the machine ("i386" or "ppc"), even if the executable is 64-bit. This patchs ensures that the distutils platform architecture represents the architecture for the executable when running a 64-bit only executable on OSX. --- util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.py b/util.py index b8e4952fee..f4bb0633c5 100644 --- a/util.py +++ b/util.py @@ -165,11 +165,21 @@ def get_platform(): raise ValueError( "Don't know machine value for archs=%r"%(archs,)) + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxint >= 2**32: + machine = 'x86_64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' + # See 'i386' case + if sys.maxint >= 2**32: + machine = 'ppc64' + return "%s-%s-%s" % (osname, release, machine) From 40baf32676d4421839d651e3a3e561e4c045c639 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 24 Dec 2009 13:07:53 +0000 Subject: [PATCH 2818/8469] Merged revisions 77026 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77026 | ronald.oussoren | 2009-12-24 14:06:39 +0100 (Thu, 24 Dec 2009) | 8 lines On OSX the output of "uname -m" always reflects the 32-bit architecture for the machine ("i386" or "ppc"), even if the executable is 64-bit. This patchs ensures that the distutils platform architecture represents the architecture for the executable when running a 64-bit only executable on OSX. ........ --- util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.py b/util.py index 7bc52f195b..d314961bf7 100644 --- a/util.py +++ b/util.py @@ -162,11 +162,21 @@ def get_platform (): raise ValueError( "Don't know machine value for archs=%r"%(archs,)) + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxint >= 2**32: + machine = 'x86_64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' + # See 'i386' case + if sys.maxint >= 2**32: + machine = 'ppc64' + return "%s-%s-%s" % (osname, release, machine) # get_platform () From 576fd8c16b2727a04bf59e08db0a6a166d5dd66e Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 24 Dec 2009 13:14:21 +0000 Subject: [PATCH 2819/8469] Merged revisions 77026 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77026 | ronald.oussoren | 2009-12-24 14:06:39 +0100 (Thu, 24 Dec 2009) | 8 lines On OSX the output of "uname -m" always reflects the 32-bit architecture for the machine ("i386" or "ppc"), even if the executable is 64-bit. This patchs ensures that the distutils platform architecture represents the architecture for the executable when running a 64-bit only executable on OSX. ........ --- util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.py b/util.py index cca7b49f5e..8adf6e0d29 100644 --- a/util.py +++ b/util.py @@ -165,11 +165,21 @@ def get_platform(): raise ValueError( "Don't know machine value for archs=%r"%(archs,)) + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxsize >= 2**32: + machine = 'x86_64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' + # See 'i386' case + if sys.maxsize >= 2**32: + machine = 'ppc64' + return "%s-%s-%s" % (osname, release, machine) From 152d8eb8e580c3e346e8a30688a55cd28efd6a06 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 24 Dec 2009 13:16:53 +0000 Subject: [PATCH 2820/8469] Merged revisions 77028 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77028 | ronald.oussoren | 2009-12-24 14:14:21 +0100 (Thu, 24 Dec 2009) | 15 lines Merged revisions 77026 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77026 | ronald.oussoren | 2009-12-24 14:06:39 +0100 (Thu, 24 Dec 2009) | 8 lines On OSX the output of "uname -m" always reflects the 32-bit architecture for the machine ("i386" or "ppc"), even if the executable is 64-bit. This patchs ensures that the distutils platform architecture represents the architecture for the executable when running a 64-bit only executable on OSX. ........ ................ --- util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util.py b/util.py index 50ad8fef98..9a77561fff 100644 --- a/util.py +++ b/util.py @@ -162,11 +162,21 @@ def get_platform (): raise ValueError( "Don't know machine value for archs=%r"%(archs,)) + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxsize >= 2**32: + machine = 'x86_64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' + # See 'i386' case + if sys.maxsize >= 2**32: + machine = 'ppc64' + return "%s-%s-%s" % (osname, release, machine) # get_platform () From 1be9d3f60881534ffd6251d3f76b098ef7a63f2f Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 24 Dec 2009 14:50:35 +0000 Subject: [PATCH 2821/8469] Unittests and news items for the patch in r77026. --- tests/test_util.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 6722997f58..80c5800961 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -119,6 +119,26 @@ def test_get_platform(self): sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') sys.platform = 'darwin' + + self._set_uname(('Darwin', 'macziade', '8.11.1', + ('Darwin Kernel Version 8.11.1: ' + 'Wed Oct 10 18:23:28 PDT 2007; ' + 'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC')) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + + get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' + '-fwrapv -O3 -Wall -Wstrict-prototypes') + + maxint = sys.maxint + try: + sys.maxint = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-ppc') + sys.maxint = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-ppc64') + finally: + sys.maxint = maxint + + self._set_uname(('Darwin', 'macziade', '8.11.1', ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' @@ -128,7 +148,15 @@ def test_get_platform(self): get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') - self.assertEquals(get_platform(), 'macosx-10.3-i386') + maxint = sys.maxint + try: + sys.maxint = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-i386') + sys.maxint = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-x86_64') + finally: + sys.maxint = maxint + # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' @@ -173,6 +201,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From 864559503a880c593e0333777b34f5e694d65fb5 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sat, 26 Dec 2009 13:16:15 +0000 Subject: [PATCH 2822/8469] Fix merge issue where I forgot to replace sys.maxint by sys.maxsize. --- tests/test_util.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index 4172472658..8f8d4a10c2 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -119,6 +119,26 @@ def test_get_platform(self): sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') sys.platform = 'darwin' + + self._set_uname(('Darwin', 'macziade', '8.11.1', + ('Darwin Kernel Version 8.11.1: ' + 'Wed Oct 10 18:23:28 PDT 2007; ' + 'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC')) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + + get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' + '-fwrapv -O3 -Wall -Wstrict-prototypes') + + maxsize = sys.maxsize + try: + sys.maxsize = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-ppc') + sys.maxsize = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-ppc64') + finally: + sys.maxsize = maxsize + + self._set_uname(('Darwin', 'macziade', '8.11.1', ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' @@ -128,7 +148,15 @@ def test_get_platform(self): get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') - self.assertEquals(get_platform(), 'macosx-10.3-i386') + maxsize = sys.maxsize + try: + sys.maxsize = 2147483647 + self.assertEquals(get_platform(), 'macosx-10.3-i386') + sys.maxsize = 9223372036854775807 + self.assertEquals(get_platform(), 'macosx-10.3-x86_64') + finally: + sys.maxsize = maxsize + # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' @@ -173,6 +201,7 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From 74a48f7df99973566897e0e907bea2b412861879 Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 28 Dec 2009 19:46:23 +0100 Subject: [PATCH 2823/8469] added indexsidebar.html into the MANIFEST.in --HG-- branch : distribute extra : rebase_source : c5110ba36fda356153e3147e05261acbd5bd6799 --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 1db36bfe99..97fef03aa1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ recursive-include setuptools *.py *.txt *.exe recursive-include tests *.py *.c *.pyx *.txt -recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile +recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html include *.py include *.txt include MANIFEST.in From b957465761ed97329b3ca94c9814ca37355b20db Mon Sep 17 00:00:00 2001 From: tarek Date: Mon, 28 Dec 2009 19:47:05 +0100 Subject: [PATCH 2824/8469] added an entry in CHANGES --HG-- branch : distribute extra : rebase_source : 6dd438df44c5f019f4a6c853d5ceef4678b88957 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index fc7e019749..068d1a41ad 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Found another case of SandboxViolation - fixed * Issue 15 and 48: Introduced a socket timeout of 15 seconds on url openings +* Added indexsidebar.html into MANIFEST.in ------ 0.6.10 From 58aef4573a45d88e82348d8e2978311de3bdd5ae Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 30 Dec 2009 08:37:38 +0100 Subject: [PATCH 2825/8469] make sure manual_test can be used under 2.3 --HG-- branch : distribute extra : rebase_source : 0186c52fe9d753201828f54f5e6b348829eb4821 --- tests/manual_test.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index 63464bc537..0d5051f165 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -7,11 +7,25 @@ import os import shutil import tempfile -import subprocess from distutils.command.install import INSTALL_SCHEMES from string import Template from urllib2 import urlopen -import subprocess + +try: + import subprocess + def _system_call(*args): + assert subprocess.call(args) == 0 +except ImportError: + # Python 2.3 + def _system_call(*args): + # quoting arguments if windows + if sys.platform == 'win32': + def quote(arg): + if ' ' in arg: + return '"%s"' % arg + return arg + args = [quote(arg) for arg in args] + assert os.system(' '.join(args)) == 0 def tempdir(func): def _tempdir(*args, **kwargs): @@ -49,8 +63,6 @@ def _tempdir(*args, **kwargs): else: PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] -def _system_call(*args): - assert subprocess.call(args) == 0 @tempdir def test_virtualenv(): From fc7a598edb4c87b12fd17ebb274cfddf731ad8c8 Mon Sep 17 00:00:00 2001 From: tarek Date: Wed, 6 Jan 2010 23:39:15 +0100 Subject: [PATCH 2826/8469] makes sure install_site_pyFixes #108 --HG-- branch : distribute extra : rebase_source : 1b1ddea2ccca03a0e67b35f2be573ef9a776a334 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 068d1a41ad..b16ad40f63 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ CHANGES * Found another case of SandboxViolation - fixed * Issue 15 and 48: Introduced a socket timeout of 15 seconds on url openings * Added indexsidebar.html into MANIFEST.in +* Issue 108: Fixed TypeError with Python3.1 ------ 0.6.10 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fb8cd74f7f..421d0c09cc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1104,6 +1104,10 @@ def install_site_py(self): log.debug("Checking existing site.py in %s", self.install_dir) f = open(sitepy,'rb') current = f.read() + # we want str, not bytes + if sys.version_info >= (3,): + current = current.decode() + f.close() if not current.startswith('def __boot():'): raise DistutilsError( From bbe3a4b6dfc6833ea2e3520691d0415c28f83979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 8 Jan 2010 23:27:23 +0000 Subject: [PATCH 2827/8469] Merged revisions 75669-75671 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75669 | tarek.ziade | 2009-10-24 17:10:37 +0200 (Sat, 24 Oct 2009) | 1 line Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode ........ r75670 | tarek.ziade | 2009-10-24 17:19:03 +0200 (Sat, 24 Oct 2009) | 1 line fixed finally state in distutils.test_util ........ r75671 | tarek.ziade | 2009-10-24 17:51:30 +0200 (Sat, 24 Oct 2009) | 1 line fixed warning and error message ........ --- command/build_py.py | 5 +++++ command/install_lib.py | 6 ++++++ errors.py | 2 ++ tests/support.py | 31 +++++++++++++++++++++++++++++++ tests/test_build_py.py | 16 ++++++++++++++++ util.py | 4 ++++ 6 files changed, 64 insertions(+) diff --git a/command/build_py.py b/command/build_py.py index 3bf1267328..708ef0f38f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -8,6 +8,7 @@ import string, os from types import * +import sys from glob import glob from distutils.core import Command @@ -418,6 +419,10 @@ def build_packages (self): def byte_compile (self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: diff --git a/command/install_lib.py b/command/install_lib.py index 4ea61d78dc..7e0c708888 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -4,6 +4,8 @@ import os from types import IntType +import sys + from distutils.core import Command from distutils.errors import DistutilsOptionError @@ -122,6 +124,10 @@ def install (self): return outfiles def byte_compile (self, files): + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile # Get the "--root" directory supplied to the "install" command, diff --git a/errors.py b/errors.py index e72221bdba..9d1756b20c 100644 --- a/errors.py +++ b/errors.py @@ -76,6 +76,8 @@ class DistutilsInternalError (DistutilsError): class DistutilsTemplateError (DistutilsError): """Syntax error in a file list template.""" +class DistutilsByteCompileError(DistutilsError): + """Byte compile error.""" # Exception classes used by the CCompiler implementation classes class CCompilerError (Exception): diff --git a/tests/support.py b/tests/support.py index 9d373e94e4..2a03765293 100644 --- a/tests/support.py +++ b/tests/support.py @@ -3,19 +3,50 @@ import shutil import tempfile +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils import log from distutils.dist import Distribution +from distutils.cmd import Command class LoggingSilencer(object): def setUp(self): super(LoggingSilencer, self).setUp() self.threshold = log.set_threshold(log.FATAL) + # catching warnings + # when log will be replaced by logging + # we won't need such monkey-patch anymore + self._old_log = log.Log._log + log.Log._log = self._log + self.logs = [] + self._old_warn = Command.warn + Command.warn = self._warn def tearDown(self): log.set_threshold(self.threshold) + log.Log._log = self._old_log + Command.warn = self._old_warn super(LoggingSilencer, self).tearDown() + def _warn(self, msg): + self.logs.append(('', msg, '')) + + def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + self.logs.append((level, msg, args)) + + def get_logs(self, *levels): + def _format(msg, args): + if len(args) == 0: + return msg + return msg % args + return [_format(msg, args) for level, msg, args + in self.logs if level in levels] + + def clear_logs(self): + self.logs = [] + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 4b045474f1..4a054f2a58 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -90,6 +90,22 @@ def test_empty_package_dir (self): os.chdir(cwd) sys.stdout = old_stdout + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = build_py(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/util.py b/util.py index d314961bf7..36ac721386 100644 --- a/util.py +++ b/util.py @@ -11,6 +11,7 @@ from distutils.dep_util import newer from distutils.spawn import spawn from distutils import log +from distutils.errors import DistutilsByteCompileError def get_platform (): """Return a string that identifies the current platform. This is used @@ -457,6 +458,9 @@ def byte_compile (py_files, generated in indirect mode; unless you know what you're doing, leave it set to None. """ + # nothing is done if sys.dont_write_bytecode is True + if sys.dont_write_bytecode: + raise DistutilsByteCompileError('byte-compiling is disabled.') # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative From eb7e9954b37373447c9c923374af56c8a8ac81e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 8 Jan 2010 23:42:23 +0000 Subject: [PATCH 2828/8469] Fixed #7617: all flavors of gcc should be recognized now --- tests/test_unixccompiler.py | 12 ++++++++++++ unixccompiler.py | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 1b7dd4cd64..008ae5d03a 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -82,6 +82,18 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + # GCC GNULD with fully qualified configuration prefix + # see #7617 + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'x86_64-pc-linux-gnu-gcc-4.4.2' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + + # non-GCC GNULD sys.platform = 'bar' def gcv(v): diff --git a/unixccompiler.py b/unixccompiler.py index 2083f82982..67adcfcf97 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -266,6 +266,9 @@ def link(self, target_desc, objects, def library_dir_option(self, dir): return "-L" + dir + def _is_gcc(self, compiler_name): + return "gcc" in compiler_name or "g++" in compiler_name + def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php @@ -285,12 +288,12 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - if "gcc" in compiler or "g++" in compiler: + if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": + elif self._is_gcc(compiler): # gcc on non-GNU systems does not need -Wl, but can # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably From 3028d15921718f24deeedb8a57960e6885e279b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 8 Jan 2010 23:48:37 +0000 Subject: [PATCH 2829/8469] Merged revisions 77377 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77377 | tarek.ziade | 2010-01-09 00:42:23 +0100 (Sat, 09 Jan 2010) | 1 line Fixed #7617: all flavors of gcc should be recognized now ........ --- tests/test_unixccompiler.py | 129 ++++++++++++++++++++++++++++++++++++ unixccompiler.py | 7 +- 2 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 tests/test_unixccompiler.py diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py new file mode 100644 index 0000000000..3f233e2823 --- /dev/null +++ b/tests/test_unixccompiler.py @@ -0,0 +1,129 @@ +"""Tests for distutils.unixccompiler.""" +import sys +import unittest + +from distutils import sysconfig +from distutils.unixccompiler import UnixCCompiler + +class UnixCCompilerTestCase(unittest.TestCase): + + def setUp(self): + self._backup_platform = sys.platform + self._backup_get_config_var = sysconfig.get_config_var + class CompilerWrapper(UnixCCompiler): + def rpath_foo(self): + return self.runtime_library_dir_option('/foo') + self.cc = CompilerWrapper() + + def tearDown(self): + sys.platform = self._backup_platform + sysconfig.get_config_var = self._backup_get_config_var + + def test_runtime_libdir_option(self): + + # not tested under windows + if sys.platform == 'win32': + return + + # Issue#5900 + # + # Ensure RUNPATH is added to extension modules with RPATH if + # GNU ld is used + + # darwin + sys.platform = 'darwin' + self.assertEqual(self.cc.rpath_foo(), '-L/foo') + + # hp-ux + sys.platform = 'hp-ux' + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv + + # irix646 + sys.platform = 'irix646' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # osf1V5 + sys.platform = 'osf1V5' + self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) + + # GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + + # GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + + # GCC GNULD with fully qualified configuration prefix + # see #7617 + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'x86_64-pc-linux-gnu-gcc-4.4.2' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + + + # non-GCC GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + + # non-GCC non-GNULD + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'no' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + + # AIX C/C++ linker + sys.platform = 'aix' + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-R/foo') + + +def test_suite(): + return unittest.makeSuite(UnixCCompilerTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/unixccompiler.py b/unixccompiler.py index 7556cbdbf5..783d4dca84 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -266,6 +266,9 @@ def link(self, target_desc, objects, def library_dir_option(self, dir): return "-L" + dir + def _is_gcc(self, compiler_name): + return "gcc" in compiler_name or "g++" in compiler_name + def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php @@ -284,12 +287,12 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - if "gcc" in compiler or "g++" in compiler: + if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": + elif self._is_gcc(compiler): return "-Wl,-R" + dir else: return "-R" + dir From 3cdc8c99c134ff274895533fc30536215fd3dca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 8 Jan 2010 23:54:15 +0000 Subject: [PATCH 2830/8469] added more test coverage from trunk for #7617 --- tests/test_install_lib.py | 35 +++++++++++++++++++++++++++++++++++ tests/test_util.py | 24 ++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 tests/test_install_lib.py create mode 100644 tests/test_util.py diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py new file mode 100644 index 0000000000..78922f4702 --- /dev/null +++ b/tests/test_install_lib.py @@ -0,0 +1,35 @@ +"""Tests for distutils.command.install_data.""" +import sys +import os +import unittest + +from distutils.command.install_lib import install_lib +from distutils.extension import Extension +from distutils.tests import support +from distutils.errors import DistutilsOptionError + +class InstallLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = install_lib(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + +def test_suite(): + return unittest.makeSuite(InstallLibTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") diff --git a/tests/test_util.py b/tests/test_util.py new file mode 100644 index 0000000000..981ad000da --- /dev/null +++ b/tests/test_util.py @@ -0,0 +1,24 @@ +"""Tests for distutils.util.""" +import sys +import unittest + +from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError +from distutils.util import byte_compile + +class UtilTestCase(unittest.TestCase): + + def test_dont_write_bytecode(self): + # makes sure byte_compile raise a DistutilsError + # if sys.dont_write_bytecode is True + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + self.assertRaises(DistutilsByteCompileError, byte_compile, []) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + +def test_suite(): + return unittest.makeSuite(UtilTestCase) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 2c8ac6208548ee8f8306964077359e0057e16d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 8 Jan 2010 23:57:53 +0000 Subject: [PATCH 2831/8469] Merged revisions 77377 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77377 | tarek.ziade | 2010-01-09 00:42:23 +0100 (Sat, 09 Jan 2010) | 1 line Fixed #7617: all flavors of gcc should be recognized now ........ --- tests/test_unixccompiler.py | 12 ++++++++++++ unixccompiler.py | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 1b7dd4cd64..008ae5d03a 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -82,6 +82,18 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + # GCC GNULD with fully qualified configuration prefix + # see #7617 + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'x86_64-pc-linux-gnu-gcc-4.4.2' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + + # non-GCC GNULD sys.platform = 'bar' def gcv(v): diff --git a/unixccompiler.py b/unixccompiler.py index da85c89696..51f6349a9e 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -264,6 +264,9 @@ def link(self, target_desc, objects, def library_dir_option(self, dir): return "-L" + dir + def _is_gcc(self, compiler_name): + return "gcc" in compiler_name or "g++" in compiler_name + def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php @@ -283,12 +286,12 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - if "gcc" in compiler or "g++" in compiler: + if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": + elif self._is_gcc(compiler): # gcc on non-GNU systems does not need -Wl, but can # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably From ddece8fad41398b0ae313a9a554eaecb219ec36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 9 Jan 2010 00:03:39 +0000 Subject: [PATCH 2832/8469] Merged revisions 77380 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77380 | tarek.ziade | 2010-01-09 00:57:53 +0100 (Sat, 09 Jan 2010) | 9 lines Merged revisions 77377 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77377 | tarek.ziade | 2010-01-09 00:42:23 +0100 (Sat, 09 Jan 2010) | 1 line Fixed #7617: all flavors of gcc should be recognized now ........ ................ --- tests/test_unixccompiler.py | 12 ++++++++++++ unixccompiler.py | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index be2df5c6e3..3a41e6fcaa 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -82,6 +82,18 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') + # GCC GNULD with fully qualified configuration prefix + # see #7617 + sys.platform = 'bar' + def gcv(v): + if v == 'CC': + return 'x86_64-pc-linux-gnu-gcc-4.4.2' + elif v == 'GNULD': + return 'yes' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + + # non-GCC GNULD sys.platform = 'bar' def gcv(v): diff --git a/unixccompiler.py b/unixccompiler.py index 8bbdb4b329..a33fdf0f7c 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -264,6 +264,9 @@ def link(self, target_desc, objects, def library_dir_option(self, dir): return "-L" + dir + def _is_gcc(self, compiler_name): + return "gcc" in compiler_name or "g++" in compiler_name + def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php @@ -283,13 +286,13 @@ def runtime_library_dir_option(self, dir): # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - if "gcc" in compiler or "g++" in compiler: + if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] else: - if compiler[:3] == "gcc" or compiler[:3] == "g++": + if self._is_gcc(compiler): # gcc on non-GNU systems does not need -Wl, but can # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably From 9692427a1f35e2911ad27ec342f939655d5fc337 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 9 Jan 2010 16:34:06 +0000 Subject: [PATCH 2833/8469] bump version to 2.7a2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e8c213e4c7..55aaf81a3d 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7a1" +__version__ = "2.7a2" #--end constants-- From 51c0c7aa736d410dae0179ad4f7304359240c397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 22:50:29 +0000 Subject: [PATCH 2834/8469] Fixed #5372: .o files are now always rebuilt because file age test don't work in some case --- ccompiler.py | 96 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 94 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index c046915153..83ba83a02b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -337,10 +337,7 @@ def set_link_objects (self, objects): def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): - """Process arguments and decide which source files to compile. - - Merges _fix_compile_args() and _prep_compile(). - """ + """Process arguments and decide which source files to compile.""" if outdir is None: outdir = self.output_dir elif not isinstance(outdir, str): @@ -370,41 +367,6 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, output_dir=outdir) assert len(objects) == len(sources) - # XXX should redo this code to eliminate skip_source entirely. - # XXX instead create build and issue skip messages inline - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - pp_opts = gen_preprocess_options(macros, incdirs) build = {} @@ -413,10 +375,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, obj = objects[i] ext = os.path.splitext(src)[1] self.mkpath(os.path.dirname(obj)) - if skip_source[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - build[obj] = src, ext + build[obj] = (src, ext) return macros, objects, extra, pp_opts, build @@ -463,56 +422,6 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): # _fix_compile_args () - - def _prep_compile(self, sources, output_dir, depends=None): - """Decide which souce files must be recompiled. - - Determine the list of object files corresponding to 'sources', - and figure out which ones really need to be recompiled. - Return a list of all object files and a dictionary telling - which source files can be skipped. - """ - # Get the list of expected output (object) files - objects = self.object_filenames(sources, output_dir=output_dir) - assert len(objects) == len(sources) - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - - return objects, skip_source - - # _prep_compile () - - def _fix_object_args (self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is @@ -679,7 +588,6 @@ def compile(self, sources, output_dir=None, macros=None, Raises CompileError on failure. """ - # A concrete compiler class can either override this method # entirely or implement _compile(). From 06cbacd4c16b16c8bc604418be4a796f9277d271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 22:54:57 +0000 Subject: [PATCH 2835/8469] Merged revisions 77424 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77424 | tarek.ziade | 2010-01-11 23:50:29 +0100 (Mon, 11 Jan 2010) | 1 line Fixed #5372: .o files are now always rebuilt because file age test don't work in some case ........ --- ccompiler.py | 86 +++------------------------------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 87d6e27396..bf92d78026 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -338,10 +338,7 @@ def set_link_objects (self, objects): def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): - """Process arguments and decide which source files to compile. - - Merges _fix_compile_args() and _prep_compile(). - """ + """Process arguments and decide which source files to compile.""" if outdir is None: outdir = self.output_dir elif type(outdir) is not StringType: @@ -371,41 +368,6 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, output_dir=outdir) assert len(objects) == len(sources) - # XXX should redo this code to eliminate skip_source entirely. - # XXX instead create build and issue skip messages inline - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - pp_opts = gen_preprocess_options(macros, incdirs) build = {} @@ -414,10 +376,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, obj = objects[i] ext = os.path.splitext(src)[1] self.mkpath(os.path.dirname(obj)) - if skip_source[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - build[obj] = src, ext + build[obj] = (src, ext) return macros, objects, extra, pp_opts, build @@ -464,7 +423,6 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): # _fix_compile_args () - def _prep_compile(self, sources, output_dir, depends=None): """Decide which souce files must be recompiled. @@ -477,42 +435,9 @@ def _prep_compile(self, sources, output_dir, depends=None): objects = self.object_filenames(sources, output_dir=output_dir) assert len(objects) == len(sources) - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - - return objects, skip_source - - # _prep_compile () - + # Return an empty dict for the "which source files can be skipped" + # return value to preserve API compatibility. + return objects, {} def _fix_object_args (self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. @@ -680,7 +605,6 @@ def compile(self, sources, output_dir=None, macros=None, Raises CompileError on failure. """ - # A concrete compiler class can either override this method # entirely or implement _compile(). From bab7bc91d6a99514935bcc12923920ede33f01c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 23:15:52 +0000 Subject: [PATCH 2836/8469] Merged revisions 77424 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77424 | tarek.ziade | 2010-01-11 23:50:29 +0100 (Mon, 11 Jan 2010) | 1 line Fixed #5372: .o files are now always rebuilt because file age test don't work in some case ........ --- ccompiler.py | 92 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 90 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 407cabda46..38c4ae8ec5 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -314,10 +314,7 @@ def set_link_objects(self, objects): def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): - """Process arguments and decide which source files to compile. - - Merges _fix_compile_args() and _prep_compile(). - """ + """Process arguments and decide which source files to compile.""" if outdir is None: outdir = self.output_dir elif not isinstance(outdir, str): @@ -346,41 +343,6 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, output_dir=outdir) assert len(objects) == len(sources) - # XXX should redo this code to eliminate skip_source entirely. - # XXX instead create build and issue skip messages inline - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - pp_opts = gen_preprocess_options(macros, incdirs) build = {} @@ -389,10 +351,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, obj = objects[i] ext = os.path.splitext(src)[1] self.mkpath(os.path.dirname(obj)) - if skip_source[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - build[obj] = src, ext + build[obj] = (src, ext) return macros, objects, extra, pp_opts, build @@ -437,53 +396,6 @@ def _fix_compile_args(self, output_dir, macros, include_dirs): return output_dir, macros, include_dirs - def _prep_compile(self, sources, output_dir, depends=None): - """Decide which souce files must be recompiled. - - Determine the list of object files corresponding to 'sources', - and figure out which ones really need to be recompiled. - Return a list of all object files and a dictionary telling - which source files can be skipped. - """ - # Get the list of expected output (object) files - objects = self.object_filenames(sources, output_dir=output_dir) - assert len(objects) == len(sources) - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - - return objects, skip_source - - def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is From 3b516635a07e4b381d313a4bf912c295849127b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 23:23:44 +0000 Subject: [PATCH 2837/8469] Merged revisions 77427 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77427 | tarek.ziade | 2010-01-12 00:15:52 +0100 (Tue, 12 Jan 2010) | 9 lines Merged revisions 77424 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77424 | tarek.ziade | 2010-01-11 23:50:29 +0100 (Mon, 11 Jan 2010) | 1 line Fixed #5372: .o files are now always rebuilt because file age test don't work in some case ........ ................ --- ccompiler.py | 82 ++++------------------------------------------------ 1 file changed, 5 insertions(+), 77 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 875f96fac3..34c77a37a3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -311,10 +311,7 @@ def set_link_objects(self, objects): def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): - """Process arguments and decide which source files to compile. - - Merges _fix_compile_args() and _prep_compile(). - """ + """Process arguments and decide which source files to compile.""" if outdir is None: outdir = self.output_dir elif not isinstance(outdir, str): @@ -343,41 +340,6 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, output_dir=outdir) assert len(objects) == len(sources) - # XXX should redo this code to eliminate skip_source entirely. - # XXX instead create build and issue skip messages inline - - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - pp_opts = gen_preprocess_options(macros, incdirs) build = {} @@ -386,10 +348,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, obj = objects[i] ext = os.path.splitext(src)[1] self.mkpath(os.path.dirname(obj)) - if skip_source[src]: - log.debug("skipping %s (%s up-to-date)", src, obj) - else: - build[obj] = src, ext + build[obj] = (src, ext) return macros, objects, extra, pp_opts, build @@ -446,40 +405,9 @@ def _prep_compile(self, sources, output_dir, depends=None): objects = self.object_filenames(sources, output_dir=output_dir) assert len(objects) == len(sources) - if self.force: - skip_source = {} # rebuild everything - for source in sources: - skip_source[source] = 0 - elif depends is None: - # If depends is None, figure out which source files we - # have to recompile according to a simplistic check. We - # just compare the source and object file, no deep - # dependency checking involving header files. - skip_source = {} # rebuild everything - for source in sources: # no wait, rebuild nothing - skip_source[source] = 1 - - n_sources, n_objects = newer_pairwise(sources, objects) - for source in n_sources: # no really, only rebuild what's - skip_source[source] = 0 # out-of-date - else: - # If depends is a list of files, then do a different - # simplistic check. Assume that each object depends on - # its source and all files in the depends list. - skip_source = {} - # L contains all the depends plus a spot at the end for a - # particular source file - L = depends[:] + [None] - for i in range(len(objects)): - source = sources[i] - L[-1] = source - if newer_group(L, objects[i]): - skip_source[source] = 0 - else: - skip_source[source] = 1 - - return objects, skip_source - + # Return an empty dict for the "which source files can be skipped" + # return value to preserve API compatibility. + return objects, {} def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. From aa70d631f51b21abea4f917d841e982f866f0f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 23:41:32 +0000 Subject: [PATCH 2838/8469] module cleanup --- ccompiler.py | 217 ++++++++++++++++----------------------------------- 1 file changed, 69 insertions(+), 148 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 83ba83a02b..97c61dd46f 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -9,11 +9,12 @@ import os import re -from distutils.errors import CompileError, LinkError, UnknownFileError +from distutils.errors import (CompileError, LinkError, UnknownFileError, + DistutilsPlatformError, DistutilsModuleError) from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath -from distutils.dep_util import newer_pairwise, newer_group +from distutils.dep_util import newer_group from distutils.util import split_quoted, execute from distutils import log @@ -87,11 +88,7 @@ class CCompiler: } language_order = ["c++", "objc", "c"] - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - + def __init__ (self, verbose=0, dry_run=0, force=0): self.dry_run = dry_run self.force = force self.verbose = verbose @@ -127,11 +124,7 @@ def __init__ (self, for key in self.executables.keys(): self.set_executable(key, self.executables[key]) - # __init__ () - - - def set_executables (self, **args): - + def set_executables(self, **args): """Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler @@ -164,26 +157,21 @@ class (via the 'executables' class attribute), but most will have: (key, self.__class__.__name__) self.set_executable(key, args[key]) - # set_executables () - def set_executable(self, key, value): if isinstance(value, str): setattr(self, key, split_quoted(value)) else: setattr(self, key, value) - - def _find_macro (self, name): + def _find_macro(self, name): i = 0 for defn in self.macros: if defn[0] == name: return i i = i + 1 - return None - - def _check_macro_definitions (self, definitions): + def _check_macro_definitions(self, definitions): """Ensures that every element of 'definitions' is a valid macro definition, ie. either (name,value) 2-tuple or a (name,) tuple. Do nothing if all definitions are OK, raise TypeError otherwise. @@ -202,7 +190,7 @@ def _check_macro_definitions (self, definitions): # -- Bookkeeping methods ------------------------------------------- - def define_macro (self, name, value=None): + def define_macro(self, name, value=None): """Define a preprocessor macro for all compilations driven by this compiler object. The optional parameter 'value' should be a string; if it is not supplied, then the macro will be defined @@ -218,8 +206,7 @@ def define_macro (self, name, value=None): defn = (name, value) self.macros.append (defn) - - def undefine_macro (self, name): + def undefine_macro(self, name): """Undefine a preprocessor macro for all compilations driven by this compiler object. If the same macro is defined by 'define_macro()' and undefined by 'undefine_macro()' the last call @@ -237,8 +224,7 @@ def undefine_macro (self, name): undefn = (name,) self.macros.append (undefn) - - def add_include_dir (self, dir): + def add_include_dir(self, dir): """Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to @@ -246,7 +232,7 @@ def add_include_dir (self, dir): """ self.include_dirs.append (dir) - def set_include_dirs (self, dirs): + def set_include_dirs(self, dirs): """Set the list of directories that will be searched to 'dirs' (a list of strings). Overrides any preceding calls to 'add_include_dir()'; subsequence calls to 'add_include_dir()' add @@ -256,8 +242,7 @@ def set_include_dirs (self, dirs): """ self.include_dirs = dirs[:] - - def add_library (self, libname): + def add_library(self, libname): """Add 'libname' to the list of libraries that will be included in all links driven by this compiler object. Note that 'libname' should *not* be the name of a file containing a library, but the @@ -273,7 +258,7 @@ def add_library (self, libname): """ self.libraries.append (libname) - def set_libraries (self, libnames): + def set_libraries(self, libnames): """Set the list of libraries to be included in all links driven by this compiler object to 'libnames' (a list of strings). This does not affect any standard system libraries that the linker may @@ -282,29 +267,28 @@ def set_libraries (self, libnames): self.libraries = libnames[:] - def add_library_dir (self, dir): + def add_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for libraries specified to 'add_library()' and 'set_libraries()'. The linker will be instructed to search for libraries in the order they are supplied to 'add_library_dir()' and/or 'set_library_dirs()'. """ - self.library_dirs.append (dir) + self.library_dirs.append(dir) - def set_library_dirs (self, dirs): + def set_library_dirs(self, dirs): """Set the list of library search directories to 'dirs' (a list of strings). This does not affect any standard library search path that the linker may search by default. """ self.library_dirs = dirs[:] - - def add_runtime_library_dir (self, dir): + def add_runtime_library_dir(self, dir): """Add 'dir' to the list of directories that will be searched for shared libraries at runtime. """ - self.runtime_library_dirs.append (dir) + self.runtime_library_dirs.append(dir) - def set_runtime_library_dirs (self, dirs): + def set_runtime_library_dirs(self, dirs): """Set the list of directories to search for shared libraries at runtime to 'dirs' (a list of strings). This does not affect any standard search path that the runtime linker may search by @@ -312,16 +296,15 @@ def set_runtime_library_dirs (self, dirs): """ self.runtime_library_dirs = dirs[:] - - def add_link_object (self, object): + def add_link_object(self, object): """Add 'object' to the list of object files (or analogues, such as explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object. """ - self.objects.append (object) + self.objects.append(object) - def set_link_objects (self, objects): + def set_link_objects(self, objects): """Set the list of object files (or analogues) to be included in every link to 'objects'. This does not affect any standard object files that the linker may include by default (such as system @@ -388,7 +371,7 @@ def _get_cc_args(self, pp_opts, debug, before): cc_args[:0] = before return cc_args - def _fix_compile_args (self, output_dir, macros, include_dirs): + def _fix_compile_args(self, output_dir, macros, include_dirs): """Typecheck and fix-up some of the arguments to the 'compile()' method, and return fixed-up values. Specifically: if 'output_dir' is None, replaces it with 'self.output_dir'; ensures that 'macros' @@ -400,7 +383,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): """ if output_dir is None: output_dir = self.output_dir - elif type (output_dir) is not StringType: + elif not isinstance(output_dir, str): raise TypeError, "'output_dir' must be a string or None" if macros is None: @@ -420,9 +403,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs): return output_dir, macros, include_dirs - # _fix_compile_args () - - def _fix_object_args (self, objects, output_dir): + def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of @@ -440,8 +421,7 @@ def _fix_object_args (self, objects, output_dir): return (objects, output_dir) - - def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): + def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions @@ -476,10 +456,7 @@ def _fix_lib_args (self, libraries, library_dirs, runtime_library_dirs): return (libraries, library_dirs, runtime_library_dirs) - # _fix_lib_args () - - - def _need_link (self, objects, output_file): + def _need_link(self, objects, output_file): """Return true if we need to relink the files listed in 'objects' to recreate 'output_file'. """ @@ -492,9 +469,7 @@ def _need_link (self, objects, output_file): newer = newer_group (objects, output_file) return newer - # _need_link () - - def detect_language (self, sources): + def detect_language(self, sources): """Detect the language of a given file, or list of files. Uses language_map, and language_order to do the job. """ @@ -514,18 +489,11 @@ def detect_language (self, sources): pass return lang - # detect_language () - # -- Worker methods ------------------------------------------------ # (must be implemented by subclasses) - def preprocess (self, - source, - output_file=None, - macros=None, - include_dirs=None, - extra_preargs=None, - extra_postargs=None): + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): """Preprocess a single C/C++ source file, named in 'source'. Output will be written to file named 'output_file', or stdout if 'output_file' not supplied. 'macros' is a list of macro @@ -613,12 +581,8 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): # should implement _compile(). pass - def create_static_lib (self, - objects, - output_libname, - output_dir=None, - debug=0, - target_lang=None): + def create_static_lib(self, objects, output_libname, output_dir=None, + debug=0, target_lang=None): """Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to @@ -643,26 +607,15 @@ def create_static_lib (self, """ pass - # values for target_desc parameter in link() SHARED_OBJECT = "shared_object" SHARED_LIBRARY = "shared_library" EXECUTABLE = "executable" - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link(self, target_desc, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. @@ -711,19 +664,11 @@ def link (self, # Old 'link_*()' methods, rewritten to use the new 'link()' method. - def link_shared_lib (self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_lib(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, + build_temp=None, target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, @@ -732,37 +677,21 @@ def link_shared_lib (self, extra_preargs, extra_postargs, build_temp, target_lang) - def link_shared_object (self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_object(self, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, + build_temp=None, target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang) - - def link_executable (self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - target_lang=None): + def link_executable(self, objects, output_progname, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, + extra_postargs=None, target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, @@ -774,29 +703,26 @@ def link_executable (self, # no appropriate default implementation so subclasses should # implement all of these. - def library_dir_option (self, dir): + def library_dir_option(self, dir): """Return the compiler option to add 'dir' to the list of directories searched for libraries. """ raise NotImplementedError - def runtime_library_dir_option (self, dir): + def runtime_library_dir_option(self, dir): """Return the compiler option to add 'dir' to the list of directories searched for runtime libraries. """ raise NotImplementedError - def library_option (self, lib): + def library_option(self, lib): """Return the compiler option to add 'dir' to the list of libraries linked into the shared library or executable. """ raise NotImplementedError - def has_function(self, funcname, - includes=None, - include_dirs=None, - libraries=None, - library_dirs=None): + def has_function(self, funcname, includes=None, include_dirs=None, + libraries=None, library_dirs=None): """Return a boolean indicating whether funcname is supported on the current platform. The optional arguments can be used to augment the compilation environment. @@ -927,28 +853,28 @@ def library_filename(self, libname, lib_type='static', # or 'shared' # -- Utility methods ----------------------------------------------- - def announce (self, msg, level=1): + def announce(self, msg, level=1): log.debug(msg) - def debug_print (self, msg): + def debug_print(self, msg): from distutils.debug import DEBUG if DEBUG: print msg - def warn (self, msg): - sys.stderr.write ("warning: %s\n" % msg) + def warn(self, msg): + sys.stderr.write("warning: %s\n" % msg) - def execute (self, func, args, msg=None, level=1): + def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run) - def spawn (self, cmd): - spawn (cmd, dry_run=self.dry_run) + def spawn(self, cmd): + spawn(cmd, dry_run=self.dry_run) - def move_file (self, src, dst): - return move_file (src, dst, dry_run=self.dry_run) + def move_file(self, src, dst): + return move_file(src, dst, dry_run=self.dry_run) - def mkpath (self, name, mode=0777): - mkpath (name, mode, dry_run=self.dry_run) + def mkpath(self, name, mode=0777): + mkpath(name, mode, dry_run=self.dry_run) # class CCompiler @@ -974,7 +900,6 @@ def mkpath (self, name, mode=0777): ) def get_default_compiler(osname=None, platform=None): - """ Determine the default compiler to use for the given platform. osname should be one of the standard Python OS names (i.e. the @@ -1030,11 +955,7 @@ def show_compilers(): pretty_printer.print_help("List of available compilers:") -def new_compiler (plat=None, - compiler=None, - verbose=0, - dry_run=0, - force=0): +def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0): """Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler @@ -1076,10 +997,10 @@ def new_compiler (plat=None, # XXX The None is necessary to preserve backwards compatibility # with classes that expect verbose to be the first positional # argument. - return klass (None, dry_run, force) + return klass(None, dry_run, force) -def gen_preprocess_options (macros, include_dirs): +def gen_preprocess_options(macros, include_dirs): """Generate C pre-processor options (-D, -U, -I) as used by at least two types of compilers: the typical Unix compiler and Visual C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) From 039104435cf43e73cc6d460637b95aac8ed4ef23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 11 Jan 2010 23:47:51 +0000 Subject: [PATCH 2839/8469] Merged revisions 77431 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77431 | tarek.ziade | 2010-01-12 00:41:32 +0100 (Tue, 12 Jan 2010) | 1 line module cleanup ........ --- ccompiler.py | 77 +++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 55 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 38c4ae8ec5..5a6bef447d 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -9,11 +9,12 @@ import os import re -from distutils.errors import CompileError, LinkError, UnknownFileError +from distutils.errors import (CompileError, LinkError, UnknownFileError, + DistutilsPlatformError, DistutilsModuleError) from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath -from distutils.dep_util import newer_pairwise, newer_group +from distutils.dep_util import newer_group from distutils.util import split_quoted, execute from distutils import log @@ -597,26 +598,15 @@ def create_static_lib(self, objects, output_libname, output_dir=None, """ pass - # values for target_desc parameter in link() SHARED_OBJECT = "shared_object" SHARED_LIBRARY = "shared_library" EXECUTABLE = "executable" - def link(self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link(self, target_desc, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. @@ -665,19 +655,11 @@ def link(self, # Old 'link_*()' methods, rewritten to use the new 'link()' method. - def link_shared_lib(self, - objects, - output_libname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_lib(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, + build_temp=None, target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, @@ -686,19 +668,11 @@ def link_shared_lib(self, extra_preargs, extra_postargs, build_temp, target_lang) - def link_shared_object(self, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): + def link_shared_object(self, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, + build_temp=None, target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, @@ -706,17 +680,10 @@ def link_shared_object(self, extra_preargs, extra_postargs, build_temp, target_lang) - def link_executable(self, - objects, - output_progname, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - target_lang=None): + def link_executable(self, objects, output_progname, output_dir=None, + libraries=None, library_dirs=None, + runtime_library_dirs=None, debug=0, extra_preargs=None, + extra_postargs=None, target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, @@ -898,7 +865,7 @@ def spawn(self, cmd): def move_file(self, src, dst): return move_file(src, dst, dry_run=self.dry_run) - def mkpath (self, name, mode=0o777): + def mkpath(self, name, mode=0o777): mkpath(name, mode, dry_run=self.dry_run) From 2cb71ea99a87e5897c8d9fbfd4921f7470957c2f Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 17 Jan 2010 18:52:29 +0000 Subject: [PATCH 2840/8469] Ensure that distutils.tests.test_util will pass in 64-bit builds. Fixes #7591 --- tests/test_util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_util.py b/tests/test_util.py index dcc1a2069b..0c732f8244 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -96,7 +96,12 @@ def test_get_platform(self): get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') - self.assertEquals(get_platform(), 'macosx-10.3-i386') + cursize = sys.maxsize + sys.maxsize = (2 ** 31)-1 + try: + self.assertEquals(get_platform(), 'macosx-10.3-i386') + finally: + sys.maxsize = cursize # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' From 3b04385b26f5921cc23593497b2c5a2dc596c417 Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 12:29:18 -0800 Subject: [PATCH 2841/8469] Ignore Vim swap files. --HG-- branch : distribute extra : rebase_source : 16e56c90065cf1325aadc76ef5f781ed66f2664e --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index bcd2437b02..3ccf2a3af4 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ syntax: glob *.pyc *~ +*.swp .coverage distribute.egg-info build From eca7db803f7c10ebce0a16e982351fbdd60c3321 Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 12:44:31 -0800 Subject: [PATCH 2842/8469] Change upload_docs so that its use of base64 does not fail under Python 3. While base64 accepts a string in Python 2, the module in Python 3 only works with bytes. Changed the code so that base64.encodebytes() is used, else catch the AttributeError and use base64.encodestring(). Not fully tested yet as there is another failure farther down under under Python 3. --HG-- branch : distribute extra : rebase_source : 37078c416d98ee7f6dff1715731ab3f0c186b6cf --- setuptools/command/upload_docs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 29c62f2a05..566a726827 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -75,8 +75,14 @@ def upload_file(self, filename): 'content': (os.path.basename(filename), content), } # set up the authentication - auth = "Basic " + base64.encodestring( - self.username + ":" + self.password).strip() + credentials = self.username + ':' + self.password + try: # base64 only works with bytes in Python 3. + encoded_creds = base64.encodebytes(credentials.encode('utf8')) + auth = b"Basic" + except AttributeError: + encoded_creds = base64.encodestring(credentials) + auth = "Basic" + auth += encoded_creds.strip() # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' From 8b1e0905135c56a9f66d5d6043ba33ac4ffab435 Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 12:55:33 -0800 Subject: [PATCH 2843/8469] Add back in a missing space between "Basic" and the base64-encoded credentials for uploading docs. --HG-- branch : distribute extra : rebase_source : 0de13aa44d415d7afef4218190ef0742999630ff --- setuptools/command/upload_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 566a726827..46e06bc6fa 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -78,10 +78,10 @@ def upload_file(self, filename): credentials = self.username + ':' + self.password try: # base64 only works with bytes in Python 3. encoded_creds = base64.encodebytes(credentials.encode('utf8')) - auth = b"Basic" + auth = b"Basic " except AttributeError: encoded_creds = base64.encodestring(credentials) - auth = "Basic" + auth = "Basic " auth += encoded_creds.strip() # Build up the MIME payload for the POST data From 07f219c589799bcb539ac79382f63cb5f1aafe2f Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 12:57:41 -0800 Subject: [PATCH 2844/8469] Rename variable 'http' to 'conn' as httplib is renamed http in Python 3. --HG-- branch : distribute extra : rebase_source : 50d0da5b2e099c4bfe55ad81dce0f73edb4f994c --- setuptools/command/upload_docs.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 46e06bc6fa..4548635cbe 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -121,28 +121,28 @@ def upload_file(self, filename): urlparse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': - http = httplib.HTTPConnection(netloc) + conn = httplib.HTTPConnection(netloc) elif schema == 'https': - http = httplib.HTTPSConnection(netloc) + conn = httplib.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema "+schema) data = '' loglevel = log.INFO try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', + conn.connect() + conn.putrequest("POST", url) + conn.putheader('Content-type', 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) + conn.putheader('Content-length', str(len(body))) + conn.putheader('Authorization', auth) + conn.endheaders() + conn.send(body) except socket.error, e: self.announce(str(e), log.ERROR) return - r = http.getresponse() + r = conn.getresponse() if r.status == 200: self.announce('Server response (%s): %s' % (r.status, r.reason), log.INFO) From 56d8bf130caec9061d304dbedf0a1b7e8f5ff396 Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 13:17:10 -0800 Subject: [PATCH 2845/8469] Use more reasonable variable names. --HG-- branch : distribute extra : rebase_source : f05e05486f624a3234e19af2d5b108e80b82df10 --- setuptools/command/upload_docs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 4548635cbe..d8c864e411 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -89,11 +89,11 @@ def upload_file(self, filename): sep_boundary = '\n--' + boundary end_boundary = sep_boundary + '--' body = StringIO.StringIO() - for key, value in data.items(): + for key, values in data.items(): # handle multiple entries for the same name - if type(value) != type([]): - value = [value] - for value in value: + if type(values) != type([]): + values = [values] + for value in values: if type(value) is tuple: fn = ';filename="%s"' % value[0] value = value[1] From 72d79d0466d0bfb566939075d651a9f111189137 Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 14:32:16 -0800 Subject: [PATCH 2846/8469] Add some compatibility code for upload_docs so it will work in both Python 2 and Python 3. At this point in manual testing, Python 2.6 still works fine, but Python 3 is getting a 200 from the upload which is not what is wanted; a 301 is what is expected for a successful upload. But at least Python 3 is not throwing any more exceptions. --HG-- branch : distribute extra : rebase_source : 00020ec37fec743077e9614f8b0141aab41cc932 --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/upload_docs.py | 48 +++++++++++++++++----------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..e1f704d8cb 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index d8c864e411..e961a0df18 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -12,12 +12,25 @@ import base64 import urlparse import tempfile -import cStringIO as StringIO from distutils import log from distutils.errors import DistutilsOptionError from distutils.command.upload import upload +try: + bytes +except NameError: + bytes = str + +def b(str_or_bytes): + """Return bytes by either encoding the argument as ASCII or simply return + the argument as-is.""" + if not isinstance(str_or_bytes, bytes): + return str_or_bytes.encode('ascii') + else: + return str_or_bytes + + class upload_docs(upload): description = 'Upload documentation to PyPI' @@ -85,31 +98,30 @@ def upload_file(self, filename): auth += encoded_creds.strip() # Build up the MIME payload for the POST data - boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = '\n--' + boundary - end_boundary = sep_boundary + '--' - body = StringIO.StringIO() + boundary = b('--------------GHSKFJDLGDS7543FJKLFHRE75642756743254') + sep_boundary = b('\n--') + boundary + end_boundary = sep_boundary + b('--') + body = [] for key, values in data.items(): # handle multiple entries for the same name if type(values) != type([]): values = [values] for value in values: if type(value) is tuple: - fn = ';filename="%s"' % value[0] + fn = b(';filename="%s"' % value[0]) value = value[1] else: - fn = "" - value = str(value) - body.write(sep_boundary) - body.write('\nContent-Disposition: form-data; name="%s"'%key) - body.write(fn) - body.write("\n\n") - body.write(value) - if value and value[-1] == '\r': - body.write('\n') # write an extra newline (lurve Macs) - body.write(end_boundary) - body.write("\n") - body = body.getvalue() + fn = b("") + body.append(sep_boundary) + body.append(b('\nContent-Disposition: form-data; name="%s"'%key)) + body.append(fn) + body.append(b("\n\n")) + body.append(b(value)) + if value and value[-1] == b('\r'): + body.append(b('\n')) # write an extra newline (lurve Macs) + body.append(end_boundary) + body.append(b("\n")) + body = b('').join(body) self.announce("Submitting documentation to %s" % (self.repository), log.INFO) From 8b3effb4f5fc0ee84fdf1e36d8bb7d8a17f1258d Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 14:33:03 -0800 Subject: [PATCH 2847/8469] Revert Python 3 change to entry_points.txt. --HG-- branch : distribute extra : rebase_source : a2dccb8f52e60f1e746ecfd72ff77b9a94080e23 --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index e1f704d8cb..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From efc2ae7c3f74eaf033d45215d6911fe030face88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 23 Jan 2010 09:23:15 +0000 Subject: [PATCH 2848/8469] taking sysconfig out of distutils --- ccompiler.py | 52 +++ command/bdist.py | 2 +- command/bdist_dumb.py | 4 +- command/bdist_wininst.py | 4 +- command/build.py | 3 +- command/build_clib.py | 2 +- command/build_ext.py | 37 +-- command/build_scripts.py | 10 +- command/config.py | 2 +- command/install.py | 163 +++------ core.py | 2 +- cygwinccompiler.py | 4 +- extension.py | 12 +- msvc9compiler.py | 10 +- sysconfig.py | 608 ++++------------------------------ tests/support.py | 8 + tests/test_build.py | 2 +- tests/test_build_clib.py | 3 +- tests/test_build_ext.py | 17 +- tests/test_build_scripts.py | 6 +- tests/test_ccompiler.py | 26 +- tests/test_cygwinccompiler.py | 3 +- tests/test_extension.py | 2 + tests/test_install.py | 53 +-- tests/test_sysconfig.py | 33 +- tests/test_unixccompiler.py | 2 +- tests/test_util.py | 42 +-- unixccompiler.py | 10 +- util.py | 170 +--------- 29 files changed, 307 insertions(+), 985 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 97c61dd46f..a34177e71f 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -18,6 +18,58 @@ from distutils.util import split_quoted, execute from distutils import log +_sysconfig = __import__('sysconfig') + +def customize_compiler(compiler): + """Do any platform-specific customization of a CCompiler instance. + + Mainly needed on Unix, so we can plug in the information that + varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ + _sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + 'CCSHARED', 'LDSHARED', 'SO', 'AR', + 'ARFLAGS') + + if 'CC' in os.environ: + cc = os.environ['CC'] + if 'CXX' in os.environ: + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] + else: + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, + linker_so=ldshared, + linker_exe=cc, + archiver=archiver) + + compiler.shared_lib_extension = so_ext + class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler classes. Also has some utility methods used by diff --git a/command/bdist.py b/command/bdist.py index 8cd69701cf..764024a008 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,10 +6,10 @@ __revision__ = "$Id$" import os +from sysconfig import get_platform from distutils.core import Command from distutils.errors import DistutilsPlatformError, DistutilsOptionError -from distutils.util import get_platform def show_formats(): diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 358a70eacf..f7331d59b9 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -8,11 +8,11 @@ import os +from sysconfig import get_python_version, get_platform + from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import DistutilsPlatformError -from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb (Command): diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index cf4282d83f..0ece0306bc 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -9,11 +9,11 @@ import os import string +from sysconfig import get_python_version, get_platform + from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils.sysconfig import get_python_version from distutils import log class bdist_wininst (Command): diff --git a/command/build.py b/command/build.py index d394e4b1da..b84e40d6c9 100644 --- a/command/build.py +++ b/command/build.py @@ -5,9 +5,10 @@ __revision__ = "$Id$" import sys, os +from sysconfig import get_platform + from distutils.core import Command from distutils.errors import DistutilsOptionError -from distutils.util import get_platform def show_compilers(): from distutils.ccompiler import show_compilers diff --git a/command/build_clib.py b/command/build_clib.py index 50b64dba25..8d49de75e1 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -19,7 +19,7 @@ import os from distutils.core import Command from distutils.errors import DistutilsSetupError -from distutils.sysconfig import customize_compiler +from distutils.ccompiler import customize_compiler from distutils import log def show_compilers(): diff --git a/command/build_ext.py b/command/build_ext.py index ff1a4be315..13bd030eb6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -9,13 +9,14 @@ import sys, os, re from warnings import warn +from sysconfig import get_platform + from distutils.core import Command -from distutils.errors import (CCompilerError, DistutilsError, CompileError, - DistutilsSetupError, DistutilsPlatformError) -from distutils.sysconfig import customize_compiler, get_python_version +from distutils.errors import * +from distutils.ccompiler import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension -from distutils.util import get_platform + from distutils import log # this keeps compatibility from 2.3 to 2.5 @@ -173,8 +174,7 @@ def initialize_options(self): self.user = None def finalize_options(self): - from distutils import sysconfig - + _sysconfig = __import__('sysconfig') self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), @@ -191,8 +191,8 @@ def finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. - py_include = sysconfig.get_python_inc() - plat_py_include = sysconfig.get_python_inc(plat_specific=1) + py_include = _sysconfig.get_path('include') + plat_py_include = _sysconfig.get_path('platinclude') if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): @@ -270,7 +270,7 @@ def finalize_options(self): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + get_python_version(), + "python" + _sysconfig.get_python_version(), "config")) else: # building python standard extensions @@ -278,13 +278,13 @@ def finalize_options(self): # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - sysconfig.get_config_var('Py_ENABLE_SHARED') + _sysconfig.get_config_var('Py_ENABLE_SHARED') if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): + and _sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions - self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + self.library_dirs.append(_sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') @@ -719,13 +719,13 @@ def get_ext_filename(self, ext_name): of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - from distutils.sysconfig import get_config_var + _sysconfig = __import__('sysconfig') ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows - so_ext = get_config_var('SO') + so_ext = _sysconfig.get_config_var('SO') if os.name == 'nt' and self.debug: return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext @@ -785,14 +785,13 @@ def get_libraries(self, ext): # extensions, it is a reference to the original list return ext.libraries + [pythonlib] elif sys.platform[:6] == "atheos": - from distutils import sysconfig - + _sysconfig = __import__('sysconfig') template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) # Get SHLIBS from Makefile extra = [] - for lib in sysconfig.get_config_var('SHLIBS').split(): + for lib in _sysconfig.get_config_var('SHLIBS').split(): if lib.startswith('-l'): extra.append(lib[2:]) else: @@ -806,8 +805,8 @@ def get_libraries(self, ext): return ext.libraries else: - from distutils import sysconfig - if sysconfig.get_config_var('Py_ENABLE_SHARED'): + _sysconfig = __import__('sysconfig') + if _sysconfig.get_config_var('Py_ENABLE_SHARED'): template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) diff --git a/command/build_scripts.py b/command/build_scripts.py index 2ad4c7beb9..567df6587e 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -6,7 +6,6 @@ import os, re from stat import ST_MODE -from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path @@ -57,6 +56,7 @@ def copy_scripts (self): ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ + _sysconfig = __import__('sysconfig') self.mkpath(self.build_dir) outfiles = [] for script in self.scripts: @@ -94,16 +94,16 @@ def copy_scripts (self): self.build_dir) if not self.dry_run: outf = open(outfile, "w") - if not sysconfig.python_build: + if not _sysconfig.is_python_build(): outf.write("#!%s%s\n" % (self.executable, post_interp)) else: outf.write("#!%s%s\n" % (os.path.join( - sysconfig.get_config_var("BINDIR"), - "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))), + _sysconfig.get_config_var("BINDIR"), + "python%s%s" % (_sysconfig.get_config_var("VERSION"), + _sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/command/config.py b/command/config.py index b084913563..da8da59538 100644 --- a/command/config.py +++ b/command/config.py @@ -16,7 +16,7 @@ from distutils.core import Command from distutils.errors import DistutilsExecError -from distutils.sysconfig import customize_compiler +from distutils.ccompiler import customize_compiler from distutils import log LANG_EXT = {'c': '.c', 'c++': '.cxx'} diff --git a/command/install.py b/command/install.py index 8f089c3172..68d6227ada 100644 --- a/command/install.py +++ b/command/install.py @@ -7,115 +7,25 @@ import sys import os +from sysconfig import (get_config_vars, get_platform, get_paths, get_path, + get_config_var) + from distutils import log from distutils.core import Command from distutils.debug import DEBUG -from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, subst_vars, change_root -from distutils.util import get_platform +from distutils.util import convert_path, change_root from distutils.errors import DistutilsOptionError -# this keeps compatibility from 2.3 to 2.5 -if sys.version < "2.6": - USER_BASE = None - USER_SITE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True - -if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', - 'platlib': '$base', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } -else: - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } - -INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/lib/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', - 'platlib': '$base/lib/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'nt': WINDOWS_SCHEME, - 'mac': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - - 'os2': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - } - -# user site schemes -if HAS_USER_SITE: - INSTALL_SCHEMES['nt_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['unix_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['mac_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['os2_home'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - -# The keys to an installation scheme; if any new types of files are to be -# installed, be sure to add an entry to every installation scheme above, -# and to SCHEME_KEYS here. -SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') - +def _subst_vars(s, local_vars): + try: + return s.format(**local_vars) + except KeyError: + try: + return s.format(**os.environ) + except KeyError, var: + raise AttributeError('{%s}' % var) class install(Command): @@ -182,11 +92,10 @@ class install(Command): boolean_options = ['compile', 'force', 'skip-build'] - if HAS_USER_SITE: - user_options.append(('user', None, - "install in user site-package '%s'" % USER_SITE)) - boolean_options.append('user') - + user_options.append(('user', None, + "install in user site-package '%s'" % \ + get_path('purelib', '%s_user' % os.name))) + boolean_options.append('user') negative_opt = {'no-compile' : 'compile'} @@ -216,8 +125,8 @@ def initialize_options(self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None - self.install_userbase = USER_BASE - self.install_usersite = USER_SITE + self.install_userbase = get_config_var('userbase') + self.install_usersite = get_path('purelib', '%s_user' % os.name) self.compile = None self.optimize = None @@ -327,7 +236,9 @@ def finalize_options(self): # about needing recursive variable expansion (shudder). py_version = sys.version.split()[0] - (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') + prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', + 'srcdir') + self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), @@ -338,12 +249,11 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + 'srcdir': srcdir, } - if HAS_USER_SITE: - self.config_vars['userbase'] = self.install_userbase - self.config_vars['usersite'] = self.install_usersite - + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") @@ -447,10 +357,10 @@ def finalize_unix(self): raise DistutilsPlatformError( "User base directory is not specified") self.install_base = self.install_platbase = self.install_userbase - self.select_scheme("unix_user") + self.select_scheme("posix_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("unix_home") + self.select_scheme("posix_home") else: if self.prefix is None: if self.exec_prefix is not None: @@ -466,7 +376,7 @@ def finalize_unix(self): self.install_base = self.prefix self.install_platbase = self.exec_prefix - self.select_scheme("unix_prefix") + self.select_scheme("posix_prefix") def finalize_other(self): """Finalizes options for non-posix platforms""" @@ -478,7 +388,7 @@ def finalize_other(self): self.select_scheme(os.name + "_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("unix_home") + self.select_scheme("posix_home") else: if self.prefix is None: self.prefix = os.path.normpath(sys.prefix) @@ -493,11 +403,15 @@ def finalize_other(self): def select_scheme(self, name): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! - scheme = INSTALL_SCHEMES[name] - for key in SCHEME_KEYS: + scheme = get_paths(name, expand=False) + for key, value in scheme.items(): + if key == 'platinclude': + key = 'headers' + value = os.path.join(value, self.distribution.get_name()) attrname = 'install_' + key - if getattr(self, attrname) is None: - setattr(self, attrname, scheme[key]) + if hasattr(self, attrname): + if getattr(self, attrname) is None: + setattr(self, attrname, value) def _expand_attrs(self, attrs): for attr in attrs: @@ -505,7 +419,10 @@ def _expand_attrs(self, attrs): if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - val = subst_vars(val, self.config_vars) + try: + val = _subst_vars(val, self.config_vars) + except: + import pdb; pdb.set_trace() setattr(self, attr, val) def expand_basedirs(self): diff --git a/core.py b/core.py index 0b725ff09d..99ccf44fad 100644 --- a/core.py +++ b/core.py @@ -35,7 +35,7 @@ def gen_usage(script_name): script = os.path.basename(script_name) - return USAGE % vars() + return USAGE % {'script': script} # Some mild magic to control the behaviour of 'setup()' from 'run_setup()'. diff --git a/cygwinccompiler.py b/cygwinccompiler.py index eed9c321af..2a61bd5ad7 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -337,7 +337,7 @@ def check_config_h(): # XXX since this function also checks sys.version, it's not strictly a # "pyconfig.h" check -- should probably be renamed... - from distutils import sysconfig + _sysconfig = __import__('sysconfig') # if sys.version contains GCC then python was compiled with GCC, and the # pyconfig.h file should be OK @@ -345,7 +345,7 @@ def check_config_h(): return CONFIG_H_OK, "sys.version mentions 'GCC'" # let's see if __GNUC__ is mentioned in python.h - fn = sysconfig.get_config_h_filename() + fn = _sysconfig.get_config_h_filename() try: with open(fn) as config_h: if "__GNUC__" in config_h.read(): diff --git a/extension.py b/extension.py index 9988ec0c2c..244b1e78ec 100644 --- a/extension.py +++ b/extension.py @@ -134,14 +134,17 @@ def __init__ (self, name, sources, def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" - from distutils.sysconfig import (parse_makefile, expand_makefile_vars, + warnings.warn('distutils.extensions.read_setup_file is deprecated. ' + 'It will be removed in the next Python release.') + _sysconfig = __import__('sysconfig') + from distutils.sysconfig import (expand_makefile_vars, _variable_rx) from distutils.text_file import TextFile from distutils.util import split_quoted # First pass over the file to gather "VAR = VALUE" assignments. - vars = parse_makefile(filename) + vars = _sysconfig._parse_makefile(filename) # Second pass to gobble up the real content: lines of the form # ... [ ...] [ ...] [ ...] @@ -161,7 +164,10 @@ def read_setup_file(filename): file.warn("'%s' lines not handled yet" % line) continue - line = expand_makefile_vars(line, vars) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + line = expand_makefile_vars(line, vars) + words = split_quoted(line) # NB. this parses a slightly different syntax than the old diff --git a/msvc9compiler.py b/msvc9compiler.py index 41d67faf59..6ac24f83dc 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -23,10 +23,10 @@ CompileError, LibError, LinkError) from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log -from distutils.util import get_platform - import _winreg +_sysconfig = __import__('sysconfig') + RegOpenKeyEx = _winreg.OpenKeyEx RegEnumKey = _winreg.EnumKey RegEnumValue = _winreg.EnumValue @@ -327,7 +327,7 @@ def initialize(self, plat_name=None): # multi-init means we would need to check platform same each time... assert not self.initialized, "don't init multiple times" if plat_name is None: - plat_name = get_platform() + plat_name = _sysconfig.get_platform() # sanity check for platforms to prevent obscure errors later. ok_plats = 'win32', 'win-amd64', 'win-ia64' if plat_name not in ok_plats: @@ -348,12 +348,12 @@ def initialize(self, plat_name=None): # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) # No idea how itanium handles this, if at all. - if plat_name == get_platform() or plat_name == 'win32': + if plat_name == _sysconfig.get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] else: # cross compile from win32 -> some 64bit - plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ + plat_spec = PLAT_TO_VCVARS[_sysconfig.get_platform()] + '_' + \ PLAT_TO_VCVARS[plat_name] vc_env = query_vcvarsall(VERSION, plat_spec) diff --git a/sysconfig.py b/sysconfig.py index f3b2aca613..bb8b5125e4 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -7,58 +7,42 @@ Written by: Fred L. Drake, Jr. Email: + +**This module has been moved out of Distutils and will be removed from +Python in the next version (3.2)** """ __revision__ = "$Id$" -import os import re -import sys - -from distutils.errors import DistutilsPlatformError - -# These are needed in a couple of spots, so just compute them once. -PREFIX = os.path.normpath(sys.prefix) -EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - -# Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9. If we're dealing with an x64 Windows build, -# it'll live in project/PCbuild/amd64. -project_base = os.path.dirname(os.path.abspath(sys.executable)) -if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) -# PC/VS7.1 -if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) -# PC/AMD64 -if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) - -# python_build: (Boolean) if true, we're either building Python or -# building an extension with an un-installed Python, so we use -# different (hard-wired) directories. -# Setup.local is available for Makefile builds including VPATH builds, -# Setup.dist is available on Windows -def _python_build(): - for fn in ("Setup.dist", "Setup.local"): - if os.path.isfile(os.path.join(project_base, "Modules", fn)): - return True - return False -python_build = _python_build() +from warnings import warn +# importing sysconfig from Lib +# to avoid this module to shadow it +_sysconfig = __import__('sysconfig') -def get_python_version(): - """Return a string containing the major and minor Python version, - leaving off the patchlevel. Sample return values could be '1.5' - or '2.2'. - """ - return sys.version[:3] +_DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " + "Use the APIs provided by the sysconfig module instead") + +def _get_project_base(): + return _sysconfig._PROJECT_BASE +project_base = _get_project_base() + +class _DeprecatedBool(int): + def __nonzero__(self): + warn(_DEPRECATION_MSG % 'get_python_version', DeprecationWarning) + return super(_DeprecatedBool, self).__nonzero__() + +def _python_build(): + return _DeprecatedBool(_sysconfig.is_python_build()) + +python_build = _python_build() def get_python_inc(plat_specific=0, prefix=None): - """Return the directory containing installed Python header files. + """This function is deprecated. + + Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; @@ -68,39 +52,22 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX - if os.name == "posix": - if python_build: - # Assume the executable is in the build directory. The - # pyconfig.h file should be in the same directory. Since - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) - if plat_specific: - return base - else: - incdir = os.path.join(get_config_var('srcdir'), 'Include') - return os.path.normpath(incdir) - return os.path.join(prefix, "include", "python" + get_python_version()) - elif os.name == "nt": - return os.path.join(prefix, "include") - elif os.name == "mac": - if plat_specific: - return os.path.join(prefix, "Mac", "Include") - else: - return os.path.join(prefix, "Include") - elif os.name == "os2": - return os.path.join(prefix, "Include") + warn(_DEPRECATION_MSG % 'get_python_inc', DeprecationWarning) + get_path = _sysconfig.get_path + + if prefix is not None: + vars = {'base': prefix} + return get_path('include', vars=vars) + + if not plat_specific: + return get_path('include') else: - raise DistutilsPlatformError( - "I don't know where Python installs its C header files " - "on platform '%s'" % os.name) + return get_path('platinclude') +def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): + """This function is deprecated. -def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - """Return the directory containing the Python library (standard or + Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing @@ -113,153 +80,33 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": - libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) - if standard_lib: - return libpython - else: - return os.path.join(libpython, "site-packages") - - elif os.name == "nt": - if standard_lib: - return os.path.join(prefix, "Lib") + warn(_DEPRECATION_MSG % 'get_python_lib', DeprecationWarning) + vars = {} + get_path = _sysconfig.get_path + if prefix is not None: + if plat_specific: + vars['platbase'] = prefix else: - if get_python_version() < "2.2": - return prefix - else: - return os.path.join(prefix, "Lib", "site-packages") + vars['base'] = prefix - elif os.name == "mac": + if standard_lib: if plat_specific: - if standard_lib: - return os.path.join(prefix, "Lib", "lib-dynload") - else: - return os.path.join(prefix, "Lib", "site-packages") - else: - if standard_lib: - return os.path.join(prefix, "Lib") - else: - return os.path.join(prefix, "Lib", "site-packages") - - elif os.name == "os2": - if standard_lib: - return os.path.join(prefix, "Lib") + return get_path('platstdlib', vars=vars) else: - return os.path.join(prefix, "Lib", "site-packages") - + return get_path('stdlib', vars=vars) else: - raise DistutilsPlatformError( - "I don't know where Python installs its library " - "on platform '%s'" % os.name) - - -def customize_compiler(compiler): - """Do any platform-specific customization of a CCompiler instance. - - Mainly needed on Unix, so we can plug in the information that - varies across Unices and is stored in Python's Makefile. - """ - if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') - - if 'CC' in os.environ: - cc = os.environ['CC'] - if 'CXX' in os.environ: - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: - archiver = ar + ' ' + os.environ['ARFLAGS'] - else: - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, - compiler_cxx=cxx, - linker_so=ldshared, - linker_exe=cc, - archiver=archiver) - - compiler.shared_lib_extension = so_ext - - -def get_config_h_filename(): - """Return full pathname of installed pyconfig.h file.""" - if python_build: - if os.name == "nt": - inc_dir = os.path.join(project_base, "PC") + if plat_specific: + return get_path('platlib', vars=vars) else: - inc_dir = project_base - else: - inc_dir = get_python_inc(plat_specific=1) - if get_python_version() < '2.2': - config_h = 'config.h' - else: - # The name of the config.h file changed in 2.2 - config_h = 'pyconfig.h' - return os.path.join(inc_dir, config_h) - + return get_path('purelib', vars=vars) def get_makefile_filename(): - """Return full pathname of installed Makefile from the Python build.""" - if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - return os.path.join(lib_dir, "config", "Makefile") - + """This function is deprecated. -def parse_config_h(fp, g=None): - """Parse a config.h-style file. - - A dictionary containing name/value pairs is returned. If an - optional dictionary is passed in as the second argument, it is - used instead of a new dictionary. + Return full pathname of installed Makefile from the Python build. """ - if g is None: - g = {} - define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") - undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") - # - while 1: - line = fp.readline() - if not line: - break - m = define_rx.match(line) - if m: - n, v = m.group(1, 2) - try: v = int(v) - except ValueError: pass - g[n] = v - else: - m = undef_rx.match(line) - if m: - g[m.group(1)] = 0 - return g - + warn(_DEPRECATION_MSG % 'get_makefile_filename', DeprecationWarning) + return _sysconfig._get_makefile_filename() # Regexes needed for parsing Makefile (and similar syntaxes, # like old-style Setup files). @@ -268,91 +115,29 @@ def parse_config_h(fp, g=None): _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") def parse_makefile(fn, g=None): - """Parse a Makefile-style file. + """This function is deprecated. + + Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ - from distutils.text_file import TextFile - fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) - - if g is None: - g = {} - done = {} - notdone = {} - - while 1: - line = fp.readline() - if line is None: # eof - break - m = _variable_rx.match(line) - if m: - n, v = m.group(1, 2) - v = v.strip() - # `$$' is a literal `$' in make - tmpv = v.replace('$$', '') - - if "$" in tmpv: - notdone[n] = v - else: - try: - v = int(v) - except ValueError: - # insert literal `$' - done[n] = v.replace('$$', '$') - else: - done[n] = v - - # do variable interpolation here - while notdone: - for name in notdone.keys(): - value = notdone[name] - m = _findvar1_rx.search(value) or _findvar2_rx.search(value) - if m: - n = m.group(1) - found = True - if n in done: - item = str(done[n]) - elif n in notdone: - # get it on a subsequent round - found = False - elif n in os.environ: - # do it like make: fall back to environment - item = os.environ[n] - else: - done[n] = item = "" - if found: - after = value[m.end():] - value = value[:m.start()] + item + after - if "$" in after: - notdone[name] = value - else: - try: value = int(value) - except ValueError: - done[name] = value.strip() - else: - done[name] = value - del notdone[name] - else: - # bogus variable reference; just drop it since we can't deal - del notdone[name] - - fp.close() - - # save the results in the global dictionary - g.update(done) - return g - + warn(_DEPRECATION_MSG % 'parse_makefile', DeprecationWarning) + return _sysconfig._parse_makefile(fn, g) def expand_makefile_vars(s, vars): - """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in + """This function is deprecated. + + Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. """ + warn('this function will be removed in then next version of Python', + DeprecationWarning) # This algorithm does multiple expansion, so if vars['foo'] contains # "${bar}", it will expand ${foo} to ${bar}, and then expand @@ -368,264 +153,3 @@ def expand_makefile_vars(s, vars): else: break return s - - -_config_vars = None - -def _init_posix(): - """Initialize the module as appropriate for POSIX systems.""" - g = {} - # load the installed Makefile: - try: - filename = get_makefile_filename() - parse_makefile(filename, g) - except IOError, msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # load the installed pyconfig.h: - try: - filename = get_config_h_filename() - parse_config_h(file(filename), g) - except IOError, msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # On MacOSX we need to check the setting of the environment variable - # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so - # it needs to be compatible. - # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: - cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] - cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') - if cur_target == '': - cur_target = cfg_target - os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) - elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): - my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' - % (cur_target, cfg_target)) - raise DistutilsPlatformError(my_msg) - - # On AIX, there are wrong paths to the linker scripts in the Makefile - # -- these paths are relative to the Python source, but when installed - # the scripts are in another directory. - if python_build: - g['LDSHARED'] = g['BLDSHARED'] - - elif get_python_version() < '2.1': - # The following two branches are for 1.5.2 compatibility. - if sys.platform == 'aix4': # what about AIX 3.x ? - # Linker script is in the config directory, not in Modules as the - # Makefile says. - python_lib = get_python_lib(standard_lib=1) - ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') - python_exp = os.path.join(python_lib, 'config', 'python.exp') - - g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - - elif sys.platform == 'beos': - # Linker script is in the config directory. In the Makefile it is - # relative to the srcdir, which after installation no longer makes - # sense. - python_lib = get_python_lib(standard_lib=1) - linkerscript_path = g['LDSHARED'].split()[0] - linkerscript_name = os.path.basename(linkerscript_path) - linkerscript = os.path.join(python_lib, 'config', - linkerscript_name) - - # XXX this isn't the right place to do this: adding the Python - # library to the link, if needed, should be in the "build_ext" - # command. (It's also needed for non-MS compilers on Windows, and - # it's taken care of for them by the 'build_ext.get_libraries()' - # method.) - g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, PREFIX, get_python_version())) - - global _config_vars - _config_vars = g - - -def _init_nt(): - """Initialize the module as appropriate for NT""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - g['SO'] = '.pyd' - g['EXE'] = ".exe" - g['VERSION'] = get_python_version().replace(".", "") - g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) - - global _config_vars - _config_vars = g - - -def _init_mac(): - """Initialize the module as appropriate for Macintosh systems""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - import MacOS - if not hasattr(MacOS, 'runtimemodel'): - g['SO'] = '.ppc.slb' - else: - g['SO'] = '.%s.slb' % MacOS.runtimemodel - - # XXX are these used anywhere? - g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") - g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") - - # These are used by the extension module build - g['srcdir'] = ':' - global _config_vars - _config_vars = g - - -def _init_os2(): - """Initialize the module as appropriate for OS/2""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - g['SO'] = '.pyd' - g['EXE'] = ".exe" - - global _config_vars - _config_vars = g - - -def get_config_vars(*args): - """With no arguments, return a dictionary of all configuration - variables relevant for the current platform. Generally this includes - everything needed to build extensions and install both pure modules and - extensions. On Unix, this means every variable defined in Python's - installed Makefile; on Windows and Mac OS it's a much smaller set. - - With arguments, return a list of values that result from looking up - each argument in the configuration variable dictionary. - """ - global _config_vars - if _config_vars is None: - func = globals().get("_init_" + os.name) - if func: - func() - else: - _config_vars = {} - - # Normalized versions of prefix and exec_prefix are handy to have; - # in fact, these are the standard versions used most places in the - # Distutils. - _config_vars['prefix'] = PREFIX - _config_vars['exec_prefix'] = EXEC_PREFIX - - if 'srcdir' not in _config_vars: - _config_vars['srcdir'] = project_base - - # Convert srcdir into an absolute path if it appears necessary. - # Normally it is relative to the build directory. However, during - # testing, for example, we might be running a non-installed python - # from a different directory. - if python_build and os.name == "posix": - base = os.path.dirname(os.path.abspath(sys.executable)) - if (not os.path.isabs(_config_vars['srcdir']) and - base != os.getcwd()): - # srcdir is relative and we are not in the same directory - # as the executable. Assume executable is in the build - # directory and make srcdir absolute. - srcdir = os.path.join(base, _config_vars['srcdir']) - _config_vars['srcdir'] = os.path.normpath(srcdir) - - if sys.platform == 'darwin': - kernel_version = os.uname()[2] # Kernel version (8.4.3) - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # On Mac OS X before 10.4, check if -arch and -isysroot - # are in CFLAGS or LDFLAGS and remove them if they are. - # This is needed when building extensions on a 10.3 system - # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = re.sub('-isysroot [^ \t]*', ' ', flags) - _config_vars[key] = flags - - else: - - # Allow the user to override the architecture flags using - # an environment variable. - # NOTE: This name was introduced by Apple in OSX 10.5 and - # is used by several scripting languages distributed with - # that OS release. - - if 'ARCHFLAGS' in os.environ: - arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = flags + ' ' + arch - _config_vars[key] = flags - - # If we're on OSX 10.5 or later and the user tries to - # compiles an extension using an SDK that is not present - # on the current machine it is better to not use an SDK - # than to fail. - # - # The major usecase for this is users using a Python.org - # binary installer on OSX 10.6: that installer uses - # the 10.4u SDK, but that SDK is not installed by default - # when you install Xcode. - # - m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) - if m is not None: - sdk = m.group(1) - if not os.path.exists(sdk): - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) - _config_vars[key] = flags - - if args: - vals = [] - for name in args: - vals.append(_config_vars.get(name)) - return vals - else: - return _config_vars - -def get_config_var(name): - """Return the value of a single variable using the dictionary - returned by 'get_config_vars()'. Equivalent to - get_config_vars().get(name) - """ - return get_config_vars().get(name) diff --git a/tests/support.py b/tests/support.py index 41d3cd3c66..783318e8d3 100644 --- a/tests/support.py +++ b/tests/support.py @@ -3,11 +3,19 @@ import shutil import tempfile from copy import deepcopy +import warnings from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution +def capture_warnings(func): + def _capture_warnings(*args, **kw): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + return func(*args, **kw) + return _capture_warnings + class LoggingSilencer(object): def setUp(self): diff --git a/tests/test_build.py b/tests/test_build.py index 6bca27ee06..2418e1656d 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -5,7 +5,7 @@ from distutils.command.build import build from distutils.tests import support -from distutils.util import get_platform +from sysconfig import get_platform class BuildTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 536cd67319..145eff5453 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -120,8 +120,7 @@ def test_run(self): # before we run the command, we want to make sure # all commands are present on the system # by creating a compiler and checking its executables - from distutils.ccompiler import new_compiler - from distutils.sysconfig import customize_compiler + from distutils.ccompiler import new_compiler, customize_compiler compiler = new_compiler() customize_compiler(compiler) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 317ce2bca0..0e3f33e437 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -9,7 +9,7 @@ from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext -from distutils import sysconfig +import sysconfig from distutils.tests import support from distutils.extension import Extension from distutils.errors import (UnknownFileError, DistutilsSetupError, @@ -105,17 +105,17 @@ def test_solaris_enable_shared(self): old = sys.platform sys.platform = 'sunos' # fooling finalize_options - from distutils.sysconfig import _config_vars - old_var = _config_vars.get('Py_ENABLE_SHARED') - _config_vars['Py_ENABLE_SHARED'] = 1 + from sysconfig import _CONFIG_VARS + old_var = _CONFIG_VARS.get('Py_ENABLE_SHARED') + _CONFIG_VARS['Py_ENABLE_SHARED'] = 1 try: cmd.ensure_finalized() finally: sys.platform = old if old_var is None: - del _config_vars['Py_ENABLE_SHARED'] + del _CONFIG_VARS['Py_ENABLE_SHARED'] else: - _config_vars['Py_ENABLE_SHARED'] = old_var + _CONFIG_VARS['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris self.assertTrue(len(cmd.library_dirs) > 0) @@ -177,11 +177,10 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.finalize_options() - from distutils import sysconfig - py_include = sysconfig.get_python_inc() + py_include = sysconfig.get_path('include') self.assertTrue(py_include in cmd.include_dirs) - plat_py_include = sysconfig.get_python_inc(plat_specific=1) + plat_py_include = sysconfig.get_path('platinclude') self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b1d2d079bd..72e8915c00 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,7 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution -from distutils import sysconfig +import sysconfig from distutils.tests import support @@ -91,12 +91,12 @@ def test_version_int(self): # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable old = sysconfig.get_config_vars().get('VERSION') - sysconfig._config_vars['VERSION'] = 4 + sysconfig._CONFIG_VARS['VERSION'] = 4 try: cmd.run() finally: if old is not None: - sysconfig._config_vars['VERSION'] = old + sysconfig._CONFIG_VARS['VERSION'] = old built = os.listdir(target) for name in expected: diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index 2c219b7b17..317e77fded 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -3,8 +3,10 @@ import unittest from test.test_support import captured_stdout -from distutils.ccompiler import gen_lib_options, CCompiler +from distutils.ccompiler import (gen_lib_options, CCompiler, + get_default_compiler, customize_compiler) from distutils import debug +from distutils.tests import support class FakeCompiler(object): def library_dir_option(self, dir): @@ -19,7 +21,7 @@ def find_library_file(self, dirs, lib, debug=0): def library_option(self, lib): return "-l" + lib -class CCompilerTestCase(unittest.TestCase): +class CCompilerTestCase(support.EnvironGuard, unittest.TestCase): def test_gen_lib_options(self): compiler = FakeCompiler() @@ -52,6 +54,26 @@ class MyCCompiler(CCompiler): finally: debug.DEBUG = False + def test_customize_compiler(self): + + # not testing if default compiler is not unix + if get_default_compiler() != 'unix': + return + + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + def test_suite(): return unittest.makeSuite(CCompilerTestCase) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index b54ffff361..b67f987e6b 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -3,6 +3,7 @@ import sys import os import warnings +import sysconfig from test.test_support import check_warnings from test.test_support import captured_stdout @@ -22,13 +23,11 @@ def setUp(self): super(CygwinCCompilerTestCase, self).setUp() self.version = sys.version self.python_h = os.path.join(self.mkdtemp(), 'python.h') - from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename def tearDown(self): sys.version = self.version - from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename super(CygwinCCompilerTestCase, self).tearDown() diff --git a/tests/test_extension.py b/tests/test_extension.py index 159ac2b76e..cffa9a0915 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -5,9 +5,11 @@ from test.test_support import check_warnings from distutils.extension import read_setup_file, Extension +from distutils.tests.support import capture_warnings class ExtensionTestCase(unittest.TestCase): + @capture_warnings def test_read_setup_file(self): # trying to read a Setup file # (sample extracted from the PyGame project) diff --git a/tests/test_install.py b/tests/test_install.py index d44156dd45..8e3e942f02 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -5,12 +5,14 @@ import sys import unittest import site +import sysconfig +from sysconfig import (get_scheme_names, _CONFIG_VARS, _INSTALL_SCHEMES, + get_config_var, get_path) from test.test_support import captured_stdout from distutils.command.install import install from distutils.command import install as install_module -from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.errors import DistutilsOptionError @@ -36,9 +38,23 @@ def test_home_installation_scheme(self): build_lib=os.path.join(builddir, "lib"), ) - cmd = install(dist) - cmd.home = destination - cmd.ensure_finalized() + + + posix_prefix = _INSTALL_SCHEMES['posix_prefix'] + old_posix_prefix = posix_prefix['platinclude'] + posix_prefix['platinclude'] = \ + '{platbase}/include/python{py_version_short}' + + posix_home = _INSTALL_SCHEMES['posix_home'] + old_posix_home = posix_home['platinclude'] + posix_home['platinclude'] = '{base}/include/python' + try: + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() + finally: + posix_home['platinclude'] = old_posix_home + posix_prefix['platinclude'] = old_posix_prefix self.assertEqual(cmd.install_base, destination) self.assertEqual(cmd.install_platbase, destination) @@ -63,18 +79,19 @@ def test_user_site(self): return # preparing the environement for the test - self.old_user_base = site.USER_BASE - self.old_user_site = site.USER_SITE + self.old_user_base = get_config_var('userbase') + self.old_user_site = get_path('purelib', '%s_user' % os.name) self.tmpdir = self.mkdtemp() self.user_base = os.path.join(self.tmpdir, 'B') self.user_site = os.path.join(self.tmpdir, 'S') - site.USER_BASE = self.user_base - site.USER_SITE = self.user_site - install_module.USER_BASE = self.user_base - install_module.USER_SITE = self.user_site + _CONFIG_VARS['userbase'] = self.user_base + scheme = _INSTALL_SCHEMES['%s_user' % os.name] + scheme['purelib'] = self.user_site def _expanduser(path): - return self.tmpdir + if path[0] == '~': + path = os.path.normpath(self.tmpdir) + path[1:] + return path self.old_expand = os.path.expanduser os.path.expanduser = _expanduser @@ -82,19 +99,17 @@ def _expanduser(path): # this is the actual test self._test_user_site() finally: - site.USER_BASE = self.old_user_base - site.USER_SITE = self.old_user_site - install_module.USER_BASE = self.old_user_base - install_module.USER_SITE = self.old_user_site + _CONFIG_VARS['userbase'] = self.old_user_base + scheme['purelib'] = self.old_user_site os.path.expanduser = self.old_expand def _test_user_site(self): - for key in ('nt_user', 'unix_user', 'os2_home'): - self.assertTrue(key in INSTALL_SCHEMES) + schemes = get_scheme_names() + for key in ('nt_user', 'posix_user', 'os2_home'): + self.assertTrue(key in schemes) dist = Distribution({'name': 'xx'}) cmd = install(dist) - # making sure the user option is there options = [name for name, short, lable in cmd.user_options] @@ -185,7 +200,7 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) - def test_debug_mode(self): + def _test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) install_module.DEBUG = True diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 498714de81..9013220ffb 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -4,7 +4,6 @@ import unittest from distutils import sysconfig -from distutils.ccompiler import get_default_compiler from distutils.tests import support from test.test_support import TESTFN @@ -27,10 +26,6 @@ def cleanup_testfn(self): elif os.path.isdir(path): shutil.rmtree(path) - def test_get_config_h_filename(self): - config_h = sysconfig.get_config_h_filename() - self.assertTrue(os.path.isfile(config_h), config_h) - def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before @@ -38,6 +33,9 @@ def test_get_python_lib(self): # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) + _sysconfig = __import__('sysconfig') + res = sysconfig.get_python_lib(True, True) + self.assertEquals(_sysconfig.get_path('platstdlib'), res) def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() @@ -48,31 +46,6 @@ def test_get_python_inc(self): python_h = os.path.join(inc_dir, "Python.h") self.assertTrue(os.path.isfile(python_h), python_h) - def test_get_config_vars(self): - cvars = sysconfig.get_config_vars() - self.assertTrue(isinstance(cvars, dict)) - self.assertTrue(cvars) - - def test_customize_compiler(self): - - # not testing if default compiler is not unix - if get_default_compiler() != 'unix': - return - - os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' - - # make sure AR gets caught - class compiler: - compiler_type = 'unix' - - def set_executables(self, **kw): - self.exes = kw - - comp = compiler() - sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') - def test_parse_makefile_base(self): self.makefile = test.test_support.TESTFN fd = open(self.makefile, 'w') diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 008ae5d03a..6976dd55f8 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,8 +1,8 @@ """Tests for distutils.unixccompiler.""" import sys import unittest +import sysconfig -from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): diff --git a/tests/test_util.py b/tests/test_util.py index 80c5800961..50f9ac173f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,15 +6,14 @@ from StringIO import StringIO import subprocess +from sysconfig import get_config_vars, get_platform from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError -from distutils.util import (get_platform, convert_path, change_root, +from distutils.util import (convert_path, change_root, check_environ, split_quoted, strtobool, rfc822_escape, get_compiler_versions, _find_exe_version, _MAC_OS_X_LD_VERSION, byte_compile) from distutils import util -from distutils.sysconfig import get_config_vars -from distutils import sysconfig from distutils.tests import support from distutils.version import LooseVersion @@ -44,7 +43,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive - self._config_vars = copy(sysconfig._config_vars) + #self._config_vars = copy(sysconfig._config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -78,7 +77,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname - sysconfig._config_vars = copy(self._config_vars) + #sysconfig._config_vars = copy(self._config_vars) util.find_executable = self.old_find_executable subprocess.Popen = self.old_popen sys.old_stdout = self.old_stdout @@ -91,7 +90,7 @@ def _set_uname(self, uname): def _get_uname(self): return self._uname - def test_get_platform(self): + def _test_get_platform(self): # windows XP, 32bits os.name = 'nt' @@ -119,26 +118,6 @@ def test_get_platform(self): sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') sys.platform = 'darwin' - - self._set_uname(('Darwin', 'macziade', '8.11.1', - ('Darwin Kernel Version 8.11.1: ' - 'Wed Oct 10 18:23:28 PDT 2007; ' - 'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' - - get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' - '-fwrapv -O3 -Wall -Wstrict-prototypes') - - maxint = sys.maxint - try: - sys.maxint = 2147483647 - self.assertEquals(get_platform(), 'macosx-10.3-ppc') - sys.maxint = 9223372036854775807 - self.assertEquals(get_platform(), 'macosx-10.3-ppc64') - finally: - sys.maxint = maxint - - self._set_uname(('Darwin', 'macziade', '8.11.1', ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' @@ -148,15 +127,7 @@ def test_get_platform(self): get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') - maxint = sys.maxint - try: - sys.maxint = 2147483647 - self.assertEquals(get_platform(), 'macosx-10.3-i386') - sys.maxint = 9223372036854775807 - self.assertEquals(get_platform(), 'macosx-10.3-x86_64') - finally: - sys.maxint = maxint - + self.assertEquals(get_platform(), 'macosx-10.3-i386') # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' @@ -201,7 +172,6 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) - # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' diff --git a/unixccompiler.py b/unixccompiler.py index 67adcfcf97..8fe1a6a13a 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -18,7 +18,6 @@ import os, sys from types import StringType, NoneType -from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -26,6 +25,7 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log + # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -75,7 +75,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, - # see also distutils.sysconfig + # see also the sysconfig compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: @@ -283,7 +283,9 @@ def runtime_library_dir_option(self, dir): # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. - compiler = os.path.basename(sysconfig.get_config_var("CC")) + _sysconfig = __import__('sysconfig') + + compiler = os.path.basename(_sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir @@ -298,7 +300,7 @@ def runtime_library_dir_option(self, dir): # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": + if _sysconfig.get_config_var("GNULD") == "yes": # GNU ld needs an extra option to get a RUNPATH # instead of just an RPATH. return "-Wl,--enable-new-dtags,-R" + dir diff --git a/util.py b/util.py index f4bb0633c5..18d0d2ef4c 100644 --- a/util.py +++ b/util.py @@ -15,173 +15,7 @@ from distutils.version import LooseVersion from distutils.errors import DistutilsByteCompileError -def get_platform(): - """Return a string that identifies the current platform. - - This is used mainly to distinguish platform-specific build directories and - platform-specific built distributions. Typically includes the OS name - and version and the architecture (as supplied by 'os.uname()'), - although the exact information included depends on the OS; eg. for IRIX - the architecture isn't particularly important (IRIX only runs on SGI - hardware), but for Linux the kernel version isn't particularly - important. - - Examples of returned values: - linux-i586 - linux-alpha (?) - solaris-2.6-sun4u - irix-5.3 - irix64-6.2 - - Windows will return one of: - win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) - win-ia64 (64bit Windows on Itanium) - win32 (all others - specifically, sys.platform is returned) - - For other non-POSIX platforms, currently just returns 'sys.platform'. - """ - if os.name == 'nt': - # sniff sys.version for architecture. - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return sys.platform - j = sys.version.find(")", i) - look = sys.version[i+len(prefix):j].lower() - if look == 'amd64': - return 'win-amd64' - if look == 'itanium': - return 'win-ia64' - return sys.platform - - if os.name != "posix" or not hasattr(os, 'uname'): - # XXX what about the architecture? NT is Intel or Alpha, - # Mac OS is M68k or PPC, etc. - return sys.platform - - # Try to distinguish various flavours of Unix - - (osname, host, release, version, machine) = os.uname() - - # Convert the OS name to lowercase, remove '/' characters - # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") - osname = osname.lower().replace('/', '') - machine = machine.replace(' ', '_') - machine = machine.replace('/', '-') - - if osname[:5] == "linux": - # At least on Linux/Intel, 'machine' is the processor -- - # i386, etc. - # XXX what about Alpha, SPARC, etc? - return "%s-%s" % (osname, machine) - elif osname[:5] == "sunos": - if release[0] >= "5": # SunOS 5 == Solaris 2 - osname = "solaris" - release = "%d.%s" % (int(release[0]) - 3, release[2:]) - # fall through to standard osname-release-machine representation - elif osname[:4] == "irix": # could be "irix64"! - return "%s-%s" % (osname, release) - elif osname[:3] == "aix": - return "%s-%s.%s" % (osname, version, release) - elif osname[:6] == "cygwin": - osname = "cygwin" - rel_re = re.compile (r'[\d.]+') - m = rel_re.match(release) - if m: - release = m.group() - elif osname[:6] == "darwin": - # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set - # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were - # MACOSX_DEPLOYMENT_TARGET. - from distutils.sysconfig import get_config_vars - cfgvars = get_config_vars() - - macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - - if 1: - # Always calculate the release of the running machine, - # needed to determine if we can build fat binaries or not. - - macrelease = macver - # Get the system version. Reading this plist is a documented - # way to get the system version (see the documentation for - # the Gestalt Manager) - try: - f = open('/System/Library/CoreServices/SystemVersion.plist') - except IOError: - # We're on a plain darwin box, fall back to the default - # behaviour. - pass - else: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - f.close() - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour - - if not macver: - macver = macrelease - - if macver: - from distutils.sysconfig import get_config_vars - release = macver - osname = "macosx" - - if (macrelease + '.') >= '10.4.' and \ - '-arch' in get_config_vars().get('CFLAGS', '').strip(): - # The universal build will build fat binaries, but not on - # systems before 10.4 - # - # Try to detect 4-way universal builds, those have machine-type - # 'universal' instead of 'fat'. - - machine = 'fat' - cflags = get_config_vars().get('CFLAGS') - - archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) - - if len(archs) == 1: - machine = archs[0] - elif archs == ('i386', 'ppc'): - machine = 'fat' - elif archs == ('i386', 'x86_64'): - machine = 'intel' - elif archs == ('i386', 'ppc', 'x86_64'): - machine = 'fat3' - elif archs == ('ppc64', 'x86_64'): - machine = 'fat64' - elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): - machine = 'universal' - else: - raise ValueError( - "Don't know machine value for archs=%r"%(archs,)) - - elif machine == 'i386': - # On OSX the machine type returned by uname is always the - # 32-bit variant, even if the executable architecture is - # the 64-bit variant - if sys.maxint >= 2**32: - machine = 'x86_64' - - elif machine in ('PowerPC', 'Power_Macintosh'): - # Pick a sane name for the PPC architecture. - machine = 'ppc' - - # See 'i386' case - if sys.maxint >= 2**32: - machine = 'ppc64' - - return "%s-%s-%s" % (osname, release, machine) - +_sysconfig = __import__('sysconfig') def convert_path(pathname): """Return 'pathname' as a name that will work on the native filesystem. @@ -269,7 +103,7 @@ def check_environ(): os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] if 'PLAT' not in os.environ: - os.environ['PLAT'] = get_platform() + os.environ['PLAT'] = _sysconfig.get_platform() _environ_checked = 1 From 36c50d5202caff909797ff127a7b830c90eac84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 24 Jan 2010 00:33:32 +0000 Subject: [PATCH 2849/8469] Fixed #7748: now upload and register commands don't need to force the encoding anymore : DistributionMetada returns utf8 strings --- command/register.py | 1 - command/upload.py | 2 +- dist.py | 24 ++++++++++++++---------- tests/test_register.py | 7 +++---- tests/test_upload.py | 6 ++++-- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/command/register.py b/command/register.py index fb547c93a8..dc089902f1 100644 --- a/command/register.py +++ b/command/register.py @@ -266,7 +266,6 @@ def post_to_server(self, data, auth=None): if type(value) not in (type([]), type( () )): value = [value] for value in value: - value = unicode(value).encode("utf-8") body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") diff --git a/command/upload.py b/command/upload.py index 3e18aeaad6..18a10a0b7f 100644 --- a/command/upload.py +++ b/command/upload.py @@ -145,7 +145,7 @@ def upload_file(self, command, pyversion, filename): value = value[1] else: fn = "" - value = str(value) + body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write(fn) diff --git a/dist.py b/dist.py index f20a92a21d..5dbdaef19c 100644 --- a/dist.py +++ b/dist.py @@ -1139,16 +1139,19 @@ def write_pkg_file(self, file): self._write_list(file, 'Obsoletes', self.get_obsoletes()) def _write_field(self, file, name, value): - if isinstance(value, unicode): - value = value.encode(PKG_INFO_ENCODING) - else: - value = str(value) - file.write('%s: %s\n' % (name, value)) + file.write('%s: %s\n' % (name, self._encode_field(value))) def _write_list (self, file, name, values): for value in values: self._write_field(file, name, value) + def _encode_field(self, value): + if value is None: + return None + if isinstance(value, unicode): + return value.encode(PKG_INFO_ENCODING) + return str(value) + # -- Metadata query methods ---------------------------------------- def get_name(self): @@ -1161,19 +1164,20 @@ def get_fullname(self): return "%s-%s" % (self.get_name(), self.get_version()) def get_author(self): - return self.author or "UNKNOWN" + return self._encode_field(self.author) or "UNKNOWN" def get_author_email(self): return self.author_email or "UNKNOWN" def get_maintainer(self): - return self.maintainer or "UNKNOWN" + return self._encode_field(self.maintainer) or "UNKNOWN" def get_maintainer_email(self): return self.maintainer_email or "UNKNOWN" def get_contact(self): - return self.maintainer or self.author or "UNKNOWN" + return (self._encode_field(self.maintainer) or + self._encode_field(self.author) or "UNKNOWN") def get_contact_email(self): return self.maintainer_email or self.author_email or "UNKNOWN" @@ -1186,10 +1190,10 @@ def get_license(self): get_licence = get_license def get_description(self): - return self.description or "UNKNOWN" + return self._encode_field(self.description) or "UNKNOWN" def get_long_description(self): - return self.long_description or "UNKNOWN" + return self._encode_field(self.long_description) or "UNKNOWN" def get_keywords(self): return self.keywords or [] diff --git a/tests/test_register.py b/tests/test_register.py index ada77a015a..370d659893 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -1,4 +1,5 @@ """Tests for distutils.command.register.""" +# -*- encoding: utf8 -*- import sys import os import unittest @@ -136,9 +137,7 @@ def _no_way(prompt=''): self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) - - self.assertEquals(req1['Content-length'], '1374') - self.assertEquals(req2['Content-length'], '1374') + self.assertEquals(req2['Content-length'], req1['Content-length']) self.assertTrue('xxx' in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -210,7 +209,7 @@ def test_strict(self): # metadata are OK but long_description is broken metadata = {'url': 'xxx', 'author': 'xxx', - 'author_email': 'xxx', + 'author_email': u'éxéxé', 'name': 'xxx', 'version': 'xxx', 'long_description': 'title\n==\n\ntext'} diff --git a/tests/test_upload.py b/tests/test_upload.py index 8f6701cc9b..3ae89498a1 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,4 +1,5 @@ """Tests for distutils.command.upload.""" +# -*- encoding: utf8 -*- import sys import os import unittest @@ -107,14 +108,15 @@ def test_upload(self): self.write_file(self.rc, PYPIRC_LONG_PASSWORD) # lets run it - pkg_dir, dist = self.create_dist(dist_files=dist_files) + pkg_dir, dist = self.create_dist(dist_files=dist_files, author=u'dédé') cmd = upload(dist) cmd.ensure_finalized() cmd.run() # what did we send ? + self.assertIn('dédé', self.last_open.req.data) headers = dict(self.last_open.req.headers) - self.assertEquals(headers['Content-length'], '2086') + self.assertEquals(headers['Content-length'], '2085') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), From a147462878fb6e26ffb40ff3d1b89d03803a7f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 24 Jan 2010 00:57:20 +0000 Subject: [PATCH 2850/8469] Merged revisions 77717 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77717 | tarek.ziade | 2010-01-24 01:33:32 +0100 (Sun, 24 Jan 2010) | 1 line Fixed #7748: now upload and register commands don't need to force the encoding anymore : DistributionMetada returns utf8 strings ........ --- command/register.py | 1 - command/upload.py | 2 +- dist.py | 27 ++++++++++++++------------- tests/test_upload.py | 6 ++++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/command/register.py b/command/register.py index bf7be96096..f531d0fc79 100644 --- a/command/register.py +++ b/command/register.py @@ -261,7 +261,6 @@ def post_to_server(self, data, auth=None): if type(value) not in (type([]), type( () )): value = [value] for value in value: - value = unicode(value).encode("utf-8") body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") diff --git a/command/upload.py b/command/upload.py index 9f1aae6aa4..93727aed62 100644 --- a/command/upload.py +++ b/command/upload.py @@ -133,7 +133,7 @@ def upload_file(self, command, pyversion, filename): value = value[1] else: fn = "" - value = str(value) + body.write(sep_boundary) body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write(fn) diff --git a/dist.py b/dist.py index c15ca9770d..30260f393b 100644 --- a/dist.py +++ b/dist.py @@ -1114,18 +1114,20 @@ def write_pkg_file (self, file): self._write_list(file, 'Obsoletes', self.get_obsoletes()) def _write_field(self, file, name, value): - - if isinstance(value, unicode): - value = value.encode(PKG_INFO_ENCODING) - else: - value = str(value) - file.write('%s: %s\n' % (name, value)) + file.write('%s: %s\n' % (name, self._encode_field(value))) def _write_list (self, file, name, values): for value in values: self._write_field(file, name, value) + def _encode_field(self, value): + if value is None: + return None + if isinstance(value, unicode): + return value.encode(PKG_INFO_ENCODING) + return str(value) + # -- Metadata query methods ---------------------------------------- def get_name (self): @@ -1138,21 +1140,20 @@ def get_fullname (self): return "%s-%s" % (self.get_name(), self.get_version()) def get_author(self): - return self.author or "UNKNOWN" + return self._encode_field(self.author) or "UNKNOWN" def get_author_email(self): return self.author_email or "UNKNOWN" def get_maintainer(self): - return self.maintainer or "UNKNOWN" + return self._encode_field(self.maintainer) or "UNKNOWN" def get_maintainer_email(self): return self.maintainer_email or "UNKNOWN" def get_contact(self): - return (self.maintainer or - self.author or - "UNKNOWN") + return (self._encode_field(self.maintainer) or + self._encode_field(self.author) or "UNKNOWN") def get_contact_email(self): return (self.maintainer_email or @@ -1167,10 +1168,10 @@ def get_license(self): get_licence = get_license def get_description(self): - return self.description or "UNKNOWN" + return self._encode_field(self.description) or "UNKNOWN" def get_long_description(self): - return self.long_description or "UNKNOWN" + return self._encode_field(self.long_description) or "UNKNOWN" def get_keywords(self): return self.keywords or [] diff --git a/tests/test_upload.py b/tests/test_upload.py index 322beb778c..382697fb74 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,4 +1,5 @@ """Tests for distutils.command.upload.""" +# -*- encoding: utf8 -*- import sys import os import unittest @@ -95,7 +96,7 @@ def test_upload(self): self.write_file(self.rc, PYPIRC_LONG_PASSWORD) # lets run it - pkg_dir, dist = self.create_dist(dist_files=dist_files) + pkg_dir, dist = self.create_dist(dist_files=dist_files, author=u'dédé') cmd = upload(dist) cmd.ensure_finalized() cmd.run() @@ -104,7 +105,8 @@ def test_upload(self): res = _CONNECTIONS[-1] headers = res.headers - self.assertEquals(headers['Content-length'], '2086') + self.assert_('dédé' in res.body) + self.assertEquals(headers['Content-length'], '2085') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) method, request = res.requests[-1] From 5c528f51ae4ce4dd5359c350af9f0b3cacee36ba Mon Sep 17 00:00:00 2001 From: tarek Date: Sun, 24 Jan 2010 23:17:23 +0100 Subject: [PATCH 2851/8469] Python 2.7 compat --HG-- branch : distribute extra : rebase_source : f60f3110e0dd27c406f8fc48c4ed49da4dec8cac --- docs/setuptools.txt | 10 +++++----- pkg_resources.py | 6 +++++- setuptools/command/bdist_egg.py | 7 ++++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2e2366f639..da159bfe54 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -405,13 +405,13 @@ unless you need the associated ``setuptools`` feature. below on `Automatic Resource Extraction`_. ``use_2to3`` - Convert the source code from Python 2 to Python 3 with 2to3 during the + Convert the source code from Python 2 to Python 3 with 2to3 during the build process. See :doc:`python3` for more details. ``convert_2to3_doctests`` - List of doctest source files that need to be converted with 2to3. + List of doctest source files that need to be converted with 2to3. See :doc:`python3` for more details. - + ``use_2to3_fixers`` A list of modules to search for additional fixers to be used during the 2to3 conversion. See :doc:`python3` for more details. @@ -2726,7 +2726,7 @@ History C-based module, instead of getting a ``NameError``). 0.6c7 - * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and + * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and ``egg_info`` command failing on new, uncommitted SVN directories. * Fix import problems with nested namespace packages installed via @@ -2753,7 +2753,7 @@ History * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in their names as packages. - + 0.6c5 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg`` packages under Python versions less than 2.5. diff --git a/pkg_resources.py b/pkg_resources.py index 3660a2a5bb..f31789e9e9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -207,7 +207,11 @@ 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. """ - from distutils.util import get_platform + try: + from distutils.util import get_platform + except ImportError: + from sysconfig import get_platform + plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): try: diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 43589c239f..90e1f52568 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -6,7 +6,12 @@ import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath -from distutils.sysconfig import get_python_version, get_python_lib +try: + from distutils.sysconfig import get_python_version, get_python_lib +except ImportError: + from sysconfig import get_python_version + from distutils.sysconfig import get_python_lib + from distutils import log from distutils.errors import DistutilsSetupError from pkg_resources import get_build_platform, Distribution, ensure_directory From b9018c0a933cdae3367543a28191514a8856d950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 26 Jan 2010 17:20:37 +0000 Subject: [PATCH 2852/8469] fixed bdist_msi imports and added a test module for distutils.command.bdist_msi --- command/bdist_msi.py | 6 +++--- tests/test_bdist_msi.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 tests/test_bdist_msi.py diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f3791bedfe..5ecf73b9e5 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -6,15 +6,15 @@ """ Implements the bdist_msi command. """ - import sys, os +from sysconfig import get_python_version, get_platform + from distutils.core import Command from distutils.dir_util import remove_tree -from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError -from distutils.util import get_platform from distutils import log + import msilib from msilib import schema, sequence, text from msilib import Directory, Feature, Dialog, add_data diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py new file mode 100644 index 0000000000..ba2d3e19c2 --- /dev/null +++ b/tests/test_bdist_msi.py @@ -0,0 +1,23 @@ +"""Tests for distutils.command.bdist_msi.""" +import unittest +import sys + +from distutils.tests import support + +@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +class BDistMSITestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_minial(self): + # minimal test XXX need more tests + from distutils.command.bdist_msi import bdist_msi + pkg_pth, dist = self.create_dist() + cmd = bdist_msi(dist) + cmd.ensure_finalized() + +def test_suite(): + return unittest.makeSuite(BDistMSITestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From be0a428e7d61e0dc61e859e1819f207490b7d5a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 26 Jan 2010 21:21:54 +0000 Subject: [PATCH 2853/8469] reintroduced the names in Distutils for APIs that were relocated --- sysconfig.py | 9 +++++++++ util.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index bb8b5125e4..2d92dabf7b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -21,6 +21,15 @@ # to avoid this module to shadow it _sysconfig = __import__('sysconfig') +# names defined here to keep backward compatibility +# for APIs that were relocated +get_python_version = _sysconfig.get_python_version +get_config_h_filename = _sysconfig.get_config_h_filename +parse_config_h = _sysconfig.parse_config_h +get_config_vars = _sysconfig.get_config_vars +get_config_var = _sysconfig.get_config_var +from distutils.ccompiler import customize_compiler + _DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " "Use the APIs provided by the sysconfig module instead") diff --git a/util.py b/util.py index 18d0d2ef4c..8650d450c3 100644 --- a/util.py +++ b/util.py @@ -17,6 +17,10 @@ _sysconfig = __import__('sysconfig') +# kept for backward compatibility +# since this API was relocated +get_platform = _sysconfig.get_platform + def convert_path(pathname): """Return 'pathname' as a name that will work on the native filesystem. From 389afeb0a49561ac5df341c508571b65349e3035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 26 Jan 2010 22:46:15 +0000 Subject: [PATCH 2854/8469] added local get_platform/set_platform APIs in distutils.sysconfig --- command/bdist.py | 2 +- command/bdist_dumb.py | 3 +- command/bdist_msi.py | 3 +- command/bdist_wininst.py | 3 +- command/build.py | 2 +- command/build_ext.py | 4 +- command/install.py | 5 +- msvc9compiler.py | 10 ++-- tests/test_util.py | 99 +++------------------------------------- util.py | 23 ++++++++-- 10 files changed, 42 insertions(+), 112 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index 764024a008..d7910b14d6 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,8 +6,8 @@ __revision__ = "$Id$" import os -from sysconfig import get_platform +from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsPlatformError, DistutilsOptionError diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index f7331d59b9..7c60d39be9 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -8,8 +8,9 @@ import os -from sysconfig import get_python_version, get_platform +from sysconfig import get_python_version +from distutils.util import get_platform from distutils.core import Command from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import DistutilsPlatformError diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 5ecf73b9e5..72578498f7 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -7,13 +7,14 @@ Implements the bdist_msi command. """ import sys, os -from sysconfig import get_python_version, get_platform +from sysconfig import get_python_version from distutils.core import Command from distutils.dir_util import remove_tree from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError from distutils import log +from distutils.util import get_platform import msilib from msilib import schema, sequence, text diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0ece0306bc..88c0532f81 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -9,12 +9,13 @@ import os import string -from sysconfig import get_python_version, get_platform +from sysconfig import get_python_version from distutils.core import Command from distutils.dir_util import remove_tree from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils import log +from distutils.util import get_platform class bdist_wininst (Command): diff --git a/command/build.py b/command/build.py index b84e40d6c9..f84bf359dc 100644 --- a/command/build.py +++ b/command/build.py @@ -5,8 +5,8 @@ __revision__ = "$Id$" import sys, os -from sysconfig import get_platform +from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsOptionError diff --git a/command/build_ext.py b/command/build_ext.py index 13bd030eb6..420d7f171d 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -9,14 +9,12 @@ import sys, os, re from warnings import warn -from sysconfig import get_platform - +from distutils.util import get_platform from distutils.core import Command from distutils.errors import * from distutils.ccompiler import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension - from distutils import log # this keeps compatibility from 2.3 to 2.5 diff --git a/command/install.py b/command/install.py index 68d6227ada..b5336fefd6 100644 --- a/command/install.py +++ b/command/install.py @@ -7,15 +7,14 @@ import sys import os -from sysconfig import (get_config_vars, get_platform, get_paths, get_path, - get_config_var) +from sysconfig import get_config_vars, get_paths, get_path, get_config_var from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, change_root +from distutils.util import convert_path, change_root, get_platform from distutils.errors import DistutilsOptionError def _subst_vars(s, local_vars): diff --git a/msvc9compiler.py b/msvc9compiler.py index 6ac24f83dc..41d67faf59 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -23,9 +23,9 @@ CompileError, LibError, LinkError) from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log -import _winreg +from distutils.util import get_platform -_sysconfig = __import__('sysconfig') +import _winreg RegOpenKeyEx = _winreg.OpenKeyEx RegEnumKey = _winreg.EnumKey @@ -327,7 +327,7 @@ def initialize(self, plat_name=None): # multi-init means we would need to check platform same each time... assert not self.initialized, "don't init multiple times" if plat_name is None: - plat_name = _sysconfig.get_platform() + plat_name = get_platform() # sanity check for platforms to prevent obscure errors later. ok_plats = 'win32', 'win-amd64', 'win-ia64' if plat_name not in ok_plats: @@ -348,12 +348,12 @@ def initialize(self, plat_name=None): # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) # No idea how itanium handles this, if at all. - if plat_name == _sysconfig.get_platform() or plat_name == 'win32': + if plat_name == get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] else: # cross compile from win32 -> some 64bit - plat_spec = PLAT_TO_VCVARS[_sysconfig.get_platform()] + '_' + \ + plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ PLAT_TO_VCVARS[plat_name] vc_env = query_vcvarsall(VERSION, plat_spec) diff --git a/tests/test_util.py b/tests/test_util.py index 50f9ac173f..348b42be03 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -90,99 +90,12 @@ def _set_uname(self, uname): def _get_uname(self): return self._uname - def _test_get_platform(self): - - # windows XP, 32bits - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Intel)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win32') - - # windows XP, amd64 - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Amd64)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-amd64') - - # windows XP, itanium - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Itanium)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-ia64') - - # macbook - os.name = 'posix' - sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' - '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') - sys.platform = 'darwin' - self._set_uname(('Darwin', 'macziade', '8.11.1', - ('Darwin Kernel Version 8.11.1: ' - 'Wed Oct 10 18:23:28 PDT 2007; ' - 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' - - get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' - '-fwrapv -O3 -Wall -Wstrict-prototypes') - - self.assertEquals(get_platform(), 'macosx-10.3-i386') - - # macbook with fat binaries (fat, universal or fat64) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' - get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-fat') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-intel') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat3') - - get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-universal') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-fat64') - - for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): - get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3'%(arch,)) - - self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) - - # linux debian sarge - os.name = 'posix' - sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' - '\n[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]') - sys.platform = 'linux2' - self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', - '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) - - self.assertEquals(get_platform(), 'linux-i686') - - # XXX more platforms to tests here + def test_get_platform(self): + platform = util.get_platform() + self.assertEquals(platform, get_platform()) + util.set_platform('MyOwnPlatform') + self.assertEquals('MyOwnPlatform', util.get_platform()) + util.set_platform(platform) def test_convert_path(self): # linux/mac diff --git a/util.py b/util.py index 8650d450c3..fbd3a67243 100644 --- a/util.py +++ b/util.py @@ -16,10 +16,27 @@ from distutils.errors import DistutilsByteCompileError _sysconfig = __import__('sysconfig') +_PLATFORM = None -# kept for backward compatibility -# since this API was relocated -get_platform = _sysconfig.get_platform +def get_platform(): + """Return a string that identifies the current platform. + + By default, will return the value returned by sysconfig.get_platform(), + but it can be changed by calling set_platform(). + """ + global _PLATFORM + if _PLATFORM is None: + _PLATFORM = _sysconfig.get_platform() + return _PLATFORM + +def set_platform(identifier): + """Sets the platform string identifier returned by get_platform(). + + Note that this change doesn't impact the value returned by + sysconfig.get_platform() and is local to Distutils + """ + global _PLATFORM + _PLATFORM = identifier def convert_path(pathname): """Return 'pathname' as a name that will work on the native filesystem. From 43788cbefa5bf8f9c6fde80b8a25a4c5a35505ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 29 Jan 2010 11:41:03 +0000 Subject: [PATCH 2855/8469] Merged revisions 77704,77752 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line taking sysconfig out of distutils ........ r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line switched the call order so this call works without suffering from issue #7774 ........ --- ccompiler.py | 52 ++++ command/bdist.py | 2 +- command/bdist_dumb.py | 4 +- command/bdist_wininst.py | 4 +- command/build.py | 3 +- command/build_clib.py | 2 +- command/build_ext.py | 32 +- command/build_scripts.py | 10 +- command/config.py | 2 +- command/install.py | 163 +++------- core.py | 2 +- cygwinccompiler.py | 4 +- extension.py | 12 +- msvc9compiler.py | 10 +- sysconfig.py | 562 +++++----------------------------- tests/support.py | 8 + tests/test_build.py | 2 +- tests/test_build_clib.py | 3 +- tests/test_build_ext.py | 17 +- tests/test_build_scripts.py | 6 +- tests/test_ccompiler.py | 26 +- tests/test_cygwinccompiler.py | 3 +- tests/test_extension.py | 2 + tests/test_install.py | 53 ++-- tests/test_sysconfig.py | 36 +-- tests/test_unixccompiler.py | 2 +- tests/test_util.py | 14 +- unixccompiler.py | 10 +- util.py | 170 +--------- 29 files changed, 310 insertions(+), 906 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 5a6bef447d..1a4e8fb2af 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -18,6 +18,58 @@ from distutils.util import split_quoted, execute from distutils import log +_sysconfig = __import__('sysconfig') + +def customize_compiler(compiler): + """Do any platform-specific customization of a CCompiler instance. + + Mainly needed on Unix, so we can plug in the information that + varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ + _sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + 'CCSHARED', 'LDSHARED', 'SO', 'AR', + 'ARFLAGS') + + if 'CC' in os.environ: + cc = os.environ['CC'] + if 'CXX' in os.environ: + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] + else: + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, + linker_so=ldshared, + linker_exe=cc, + archiver=archiver) + + compiler.shared_lib_extension = so_ext + class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler classes. Also has some utility methods used by diff --git a/command/bdist.py b/command/bdist.py index dd202ff449..a79982b645 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,10 +6,10 @@ __revision__ = "$Id$" import os +from sysconfig import get_platform from distutils.core import Command from distutils.errors import DistutilsPlatformError, DistutilsOptionError -from distutils.util import get_platform def show_formats(): diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 49fd653a19..c16125f229 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -8,11 +8,11 @@ import os +from sysconfig import get_python_version, get_platform + from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import DistutilsPlatformError -from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb(Command): diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0b7044a00e..2cf28234ec 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -8,11 +8,11 @@ import sys import os +from sysconfig import get_python_version, get_platform + from distutils.core import Command -from distutils.util import get_platform from distutils.dir_util import remove_tree from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils.sysconfig import get_python_version from distutils import log class bdist_wininst(Command): diff --git a/command/build.py b/command/build.py index 715621e1d7..d7b0e3c5f9 100644 --- a/command/build.py +++ b/command/build.py @@ -5,9 +5,10 @@ __revision__ = "$Id$" import sys, os +from sysconfig import get_platform + from distutils.core import Command from distutils.errors import DistutilsOptionError -from distutils.util import get_platform def show_compilers(): from distutils.ccompiler import show_compilers diff --git a/command/build_clib.py b/command/build_clib.py index 12bf1d2fe3..4c6443ca6e 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -19,7 +19,7 @@ import os from distutils.core import Command from distutils.errors import DistutilsSetupError -from distutils.sysconfig import customize_compiler +from distutils.ccompiler import customize_compiler from distutils import log def show_compilers(): diff --git a/command/build_ext.py b/command/build_ext.py index de980bd841..39d37dab84 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -9,13 +9,14 @@ import sys, os, re from warnings import warn +from sysconfig import get_platform + from distutils.core import Command -from distutils.errors import (CCompilerError, DistutilsError, CompileError, - DistutilsSetupError, DistutilsPlatformError) -from distutils.sysconfig import customize_compiler, get_python_version +from distutils.errors import * +from distutils.ccompiler import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension -from distutils.util import get_platform + from distutils import log # this keeps compatibility from 2.3 to 2.5 @@ -172,8 +173,7 @@ def initialize_options(self): self.user = None def finalize_options(self): - from distutils import sysconfig - + _sysconfig = __import__('sysconfig') self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), @@ -190,8 +190,8 @@ def finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. - py_include = sysconfig.get_python_inc() - plat_py_include = sysconfig.get_python_inc(plat_specific=1) + py_include = _sysconfig.get_path('include') + plat_py_include = _sysconfig.get_path('platinclude') if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): @@ -269,7 +269,7 @@ def finalize_options(self): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + get_python_version(), + "python" + _sysconfig.get_python_version(), "config")) else: # building python standard extensions @@ -277,13 +277,13 @@ def finalize_options(self): # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - sysconfig.get_config_var('Py_ENABLE_SHARED') + _sysconfig.get_config_var('Py_ENABLE_SHARED') if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): + and _sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions - self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + self.library_dirs.append(_sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') @@ -712,13 +712,13 @@ def get_ext_filename(self, ext_name): of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - from distutils.sysconfig import get_config_var + _sysconfig = __import__('sysconfig') ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows - so_ext = get_config_var('SO') + so_ext = _sysconfig.get_config_var('SO') if os.name == 'nt' and self.debug: return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext @@ -781,8 +781,8 @@ def get_libraries(self, ext): # Don't use the default code below return ext.libraries else: - from distutils import sysconfig - if sysconfig.get_config_var('Py_ENABLE_SHARED'): + _sysconfig = __import__('sysconfig') + if _sysconfig.get_config_var('Py_ENABLE_SHARED'): template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) diff --git a/command/build_scripts.py b/command/build_scripts.py index 8b08bfeaf0..a54d6ed742 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -6,7 +6,6 @@ import os, re from stat import ST_MODE -from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 @@ -57,6 +56,7 @@ def copy_scripts(self): ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ + _sysconfig = __import__('sysconfig') self.mkpath(self.build_dir) outfiles = [] updated_files = [] @@ -96,16 +96,16 @@ def copy_scripts(self): updated_files.append(outfile) if not self.dry_run: outf = open(outfile, "w") - if not sysconfig.python_build: + if not _sysconfig.is_python_build(): outf.write("#!%s%s\n" % (self.executable, post_interp)) else: outf.write("#!%s%s\n" % (os.path.join( - sysconfig.get_config_var("BINDIR"), - "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))), + _sysconfig.get_config_var("BINDIR"), + "python%s%s" % (_sysconfig.get_config_var("VERSION"), + _sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/command/config.py b/command/config.py index 830552cdc4..56f643c88b 100644 --- a/command/config.py +++ b/command/config.py @@ -16,7 +16,7 @@ from distutils.core import Command from distutils.errors import DistutilsExecError -from distutils.sysconfig import customize_compiler +from distutils.ccompiler import customize_compiler from distutils import log LANG_EXT = {"c": ".c", "c++": ".cxx"} diff --git a/command/install.py b/command/install.py index 2a905d92f8..1f8d238a2d 100644 --- a/command/install.py +++ b/command/install.py @@ -7,115 +7,25 @@ import sys import os +from sysconfig import (get_config_vars, get_platform, get_paths, get_path, + get_config_var) + from distutils import log from distutils.core import Command from distutils.debug import DEBUG -from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, subst_vars, change_root -from distutils.util import get_platform +from distutils.util import convert_path, change_root from distutils.errors import DistutilsOptionError -# this keeps compatibility from 2.3 to 2.5 -if sys.version < "2.6": - USER_BASE = None - USER_SITE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True - -if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', - 'platlib': '$base', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } -else: - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } - -INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/lib/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', - 'platlib': '$base/lib/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'nt': WINDOWS_SCHEME, - 'mac': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - - 'os2': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - } - -# user site schemes -if HAS_USER_SITE: - INSTALL_SCHEMES['nt_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['unix_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['mac_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - - INSTALL_SCHEMES['os2_home'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - -# The keys to an installation scheme; if any new types of files are to be -# installed, be sure to add an entry to every installation scheme above, -# and to SCHEME_KEYS here. -SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') - +def _subst_vars(s, local_vars): + try: + return s.format(**local_vars) + except KeyError: + try: + return s.format(**os.environ) + except KeyError as var: + raise AttributeError('{%s}' % var) class install(Command): @@ -182,11 +92,10 @@ class install(Command): boolean_options = ['compile', 'force', 'skip-build'] - if HAS_USER_SITE: - user_options.append(('user', None, - "install in user site-package '%s'" % USER_SITE)) - boolean_options.append('user') - + user_options.append(('user', None, + "install in user site-package '%s'" % \ + get_path('purelib', '%s_user' % os.name))) + boolean_options.append('user') negative_opt = {'no-compile' : 'compile'} @@ -216,8 +125,8 @@ def initialize_options(self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None - self.install_userbase = USER_BASE - self.install_usersite = USER_SITE + self.install_userbase = get_config_var('userbase') + self.install_usersite = get_path('purelib', '%s_user' % os.name) self.compile = None self.optimize = None @@ -327,7 +236,9 @@ def finalize_options(self): # about needing recursive variable expansion (shudder). py_version = sys.version.split()[0] - (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') + prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', + 'srcdir') + self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), @@ -338,12 +249,11 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + 'srcdir': srcdir, } - if HAS_USER_SITE: - self.config_vars['userbase'] = self.install_userbase - self.config_vars['usersite'] = self.install_usersite - + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") @@ -447,10 +357,10 @@ def finalize_unix(self): raise DistutilsPlatformError( "User base directory is not specified") self.install_base = self.install_platbase = self.install_userbase - self.select_scheme("unix_user") + self.select_scheme("posix_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("unix_home") + self.select_scheme("posix_home") else: if self.prefix is None: if self.exec_prefix is not None: @@ -466,7 +376,7 @@ def finalize_unix(self): self.install_base = self.prefix self.install_platbase = self.exec_prefix - self.select_scheme("unix_prefix") + self.select_scheme("posix_prefix") def finalize_other(self): """Finalizes options for non-posix platforms""" @@ -478,7 +388,7 @@ def finalize_other(self): self.select_scheme(os.name + "_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("unix_home") + self.select_scheme("posix_home") else: if self.prefix is None: self.prefix = os.path.normpath(sys.prefix) @@ -493,11 +403,15 @@ def finalize_other(self): def select_scheme(self, name): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! - scheme = INSTALL_SCHEMES[name] - for key in SCHEME_KEYS: + scheme = get_paths(name, expand=False) + for key, value in scheme.items(): + if key == 'platinclude': + key = 'headers' + value = os.path.join(value, self.distribution.get_name()) attrname = 'install_' + key - if getattr(self, attrname) is None: - setattr(self, attrname, scheme[key]) + if hasattr(self, attrname): + if getattr(self, attrname) is None: + setattr(self, attrname, value) def _expand_attrs(self, attrs): for attr in attrs: @@ -505,7 +419,10 @@ def _expand_attrs(self, attrs): if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - val = subst_vars(val, self.config_vars) + try: + val = _subst_vars(val, self.config_vars) + except: + import pdb; pdb.set_trace() setattr(self, attr, val) def expand_basedirs(self): diff --git a/core.py b/core.py index c820a420b9..6ed3e8fa97 100644 --- a/core.py +++ b/core.py @@ -35,7 +35,7 @@ def gen_usage(script_name): script = os.path.basename(script_name) - return USAGE % vars() + return USAGE % {'script': script} # Some mild magic to control the behaviour of 'setup()' from 'run_setup()'. diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 3e2a634f7e..f381f60875 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -337,7 +337,7 @@ def check_config_h(): # XXX since this function also checks sys.version, it's not strictly a # "pyconfig.h" check -- should probably be renamed... - from distutils import sysconfig + _sysconfig = __import__('sysconfig') # if sys.version contains GCC then python was compiled with GCC, and the # pyconfig.h file should be OK @@ -345,7 +345,7 @@ def check_config_h(): return CONFIG_H_OK, "sys.version mentions 'GCC'" # let's see if __GNUC__ is mentioned in python.h - fn = sysconfig.get_config_h_filename() + fn = _sysconfig.get_config_h_filename() try: with open(fn) as config_h: if "__GNUC__" in config_h.read(): diff --git a/extension.py b/extension.py index 10aaf7c504..ebe5437c22 100644 --- a/extension.py +++ b/extension.py @@ -134,14 +134,17 @@ def __init__(self, name, sources, def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" - from distutils.sysconfig import (parse_makefile, expand_makefile_vars, + warnings.warn('distutils.extensions.read_setup_file is deprecated. ' + 'It will be removed in the next Python release.') + _sysconfig = __import__('sysconfig') + from distutils.sysconfig import (expand_makefile_vars, _variable_rx) from distutils.text_file import TextFile from distutils.util import split_quoted # First pass over the file to gather "VAR = VALUE" assignments. - vars = parse_makefile(filename) + vars = _sysconfig._parse_makefile(filename) # Second pass to gobble up the real content: lines of the form # ... [ ...] [ ...] [ ...] @@ -161,7 +164,10 @@ def read_setup_file(filename): file.warn("'%s' lines not handled yet" % line) continue - line = expand_makefile_vars(line, vars) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + line = expand_makefile_vars(line, vars) + words = split_quoted(line) # NB. this parses a slightly different syntax than the old diff --git a/msvc9compiler.py b/msvc9compiler.py index 6455fffa1f..38fc96f867 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -23,10 +23,10 @@ CompileError, LibError, LinkError) from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log -from distutils.util import get_platform - import winreg +_sysconfig = __import__('sysconfig') + RegOpenKeyEx = winreg.OpenKeyEx RegEnumKey = winreg.EnumKey RegEnumValue = winreg.EnumValue @@ -327,7 +327,7 @@ def initialize(self, plat_name=None): # multi-init means we would need to check platform same each time... assert not self.initialized, "don't init multiple times" if plat_name is None: - plat_name = get_platform() + plat_name = _sysconfig.get_platform() # sanity check for platforms to prevent obscure errors later. ok_plats = 'win32', 'win-amd64', 'win-ia64' if plat_name not in ok_plats: @@ -348,12 +348,12 @@ def initialize(self, plat_name=None): # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) # No idea how itanium handles this, if at all. - if plat_name == get_platform() or plat_name == 'win32': + if plat_name == _sysconfig.get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] else: # cross compile from win32 -> some 64bit - plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ + plat_spec = PLAT_TO_VCVARS[_sysconfig.get_platform()] + '_' + \ PLAT_TO_VCVARS[plat_name] vc_env = query_vcvarsall(VERSION, plat_spec) diff --git a/sysconfig.py b/sysconfig.py index 0fbd5412bc..48f22ad734 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -7,6 +7,9 @@ Written by: Fred L. Drake, Jr. Email: + +**This module has been moved out of Distutils and will be removed from +Python in the next version (3.2)** """ __revision__ = "$Id$" @@ -14,51 +17,36 @@ import io import os import re -import sys - -from .errors import DistutilsPlatformError - -# These are needed in a couple of spots, so just compute them once. -PREFIX = os.path.normpath(sys.prefix) -EXEC_PREFIX = os.path.normpath(sys.exec_prefix) - -# Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9. If we're dealing with an x64 Windows build, -# it'll live in project/PCbuild/amd64. -project_base = os.path.dirname(os.path.abspath(sys.executable)) -if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) -# PC/VS7.1 -if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) -# PC/AMD64 -if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) - -# python_build: (Boolean) if true, we're either building Python or -# building an extension with an un-installed Python, so we use -# different (hard-wired) directories. -# Setup.local is available for Makefile builds including VPATH builds, -# Setup.dist is available on Windows -def _python_build(): - for fn in ("Setup.dist", "Setup.local"): - if os.path.isfile(os.path.join(project_base, "Modules", fn)): - return True - return False -python_build = _python_build() +from warnings import warn -def get_python_version(): - """Return a string containing the major and minor Python version, - leaving off the patchlevel. Sample return values could be '1.5' - or '2.2'. - """ - return sys.version[:3] +from distutils.errors import DistutilsPlatformError + +# importing sysconfig from Lib +# to avoid this module to shadow it +_sysconfig = __import__('sysconfig') +_DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " + "Use the APIs provided by the sysconfig module instead") + +def _get_project_base(): + return _sysconfig._PROJECT_BASE + +project_base = _get_project_base() + +class _DeprecatedBool(int): + def __nonzero__(self): + warn(_DEPRECATION_MSG % 'get_python_version', DeprecationWarning) + return super(_DeprecatedBool, self).__nonzero__() + +def _python_build(): + return _DeprecatedBool(_sysconfig.is_python_build()) + +python_build = _python_build() def get_python_inc(plat_specific=0, prefix=None): - """Return the directory containing installed Python header files. + """This function is deprecated. + + Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; @@ -68,39 +56,22 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX - if os.name == "posix": - if python_build: - # Assume the executable is in the build directory. The - # pyconfig.h file should be in the same directory. Since - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) - if plat_specific: - return base - else: - incdir = os.path.join(get_config_var('srcdir'), 'Include') - return os.path.normpath(incdir) - return os.path.join(prefix, "include", "python" + get_python_version()) - elif os.name == "nt": - return os.path.join(prefix, "include") - elif os.name == "mac": - if plat_specific: - return os.path.join(prefix, "Mac", "Include") - else: - return os.path.join(prefix, "Include") - elif os.name == "os2": - return os.path.join(prefix, "Include") + warn(_DEPRECATION_MSG % 'get_python_inc', DeprecationWarning) + get_path = _sysconfig.get_path + + if prefix is not None: + vars = {'base': prefix} + return get_path('include', vars=vars) + + if not plat_specific: + return get_path('include') else: - raise DistutilsPlatformError( - "I don't know where Python installs its C header files " - "on platform '%s'" % os.name) + return get_path('platinclude') +def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): + """This function is deprecated. -def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - """Return the directory containing the Python library (standard or + Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing @@ -113,149 +84,33 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": - libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) - if standard_lib: - return libpython - else: - return os.path.join(libpython, "site-packages") - elif os.name == "nt": - if standard_lib: - return os.path.join(prefix, "Lib") - else: - if get_python_version() < "2.2": - return prefix - else: - return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "mac": + warn(_DEPRECATION_MSG % 'get_python_lib', DeprecationWarning) + vars = {} + get_path = _sysconfig.get_path + if prefix is not None: if plat_specific: - if standard_lib: - return os.path.join(prefix, "Lib", "lib-dynload") - else: - return os.path.join(prefix, "Lib", "site-packages") + vars['platbase'] = prefix else: - if standard_lib: - return os.path.join(prefix, "Lib") - else: - return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "os2": - if standard_lib: - return os.path.join(prefix, "Lib") + vars['base'] = prefix + if standard_lib: + if plat_specific: + return get_path('platstdlib', vars=vars) else: - return os.path.join(prefix, "Lib", "site-packages") + return get_path('stdlib', vars=vars) else: - raise DistutilsPlatformError( - "I don't know where Python installs its library " - "on platform '%s'" % os.name) - - -def customize_compiler(compiler): - """Do any platform-specific customization of a CCompiler instance. - - Mainly needed on Unix, so we can plug in the information that - varies across Unices and is stored in Python's Makefile. - """ - if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') - - if 'CC' in os.environ: - cc = os.environ['CC'] - if 'CXX' in os.environ: - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: - archiver = ar + ' ' + os.environ['ARFLAGS'] - else: - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, - compiler_cxx=cxx, - linker_so=ldshared, - linker_exe=cc, - archiver=archiver) - - compiler.shared_lib_extension = so_ext - - -def get_config_h_filename(): - """Return full pathname of installed pyconfig.h file.""" - if python_build: - if os.name == "nt": - inc_dir = os.path.join(project_base, "PC") + if plat_specific: + return get_path('platlib', vars=vars) else: - inc_dir = project_base - else: - inc_dir = get_python_inc(plat_specific=1) - if get_python_version() < '2.2': - config_h = 'config.h' - else: - # The name of the config.h file changed in 2.2 - config_h = 'pyconfig.h' - return os.path.join(inc_dir, config_h) - + return get_path('purelib', vars=vars) def get_makefile_filename(): - """Return full pathname of installed Makefile from the Python build.""" - if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - return os.path.join(lib_dir, "config", "Makefile") - + """This function is deprecated. -def parse_config_h(fp, g=None): - """Parse a config.h-style file. - - A dictionary containing name/value pairs is returned. If an - optional dictionary is passed in as the second argument, it is - used instead of a new dictionary. + Return full pathname of installed Makefile from the Python build. """ - if g is None: - g = {} - define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") - undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") - # - while True: - line = fp.readline() - if not line: - break - m = define_rx.match(line) - if m: - n, v = m.group(1, 2) - try: v = int(v) - except ValueError: pass - g[n] = v - else: - m = undef_rx.match(line) - if m: - g[m.group(1)] = 0 - return g + warn(_DEPRECATION_MSG % 'get_makefile_filename', DeprecationWarning) + return _sysconfig._get_makefile_filename() # Regexes needed for parsing Makefile (and similar syntaxes, # like old-style Setup files). @@ -264,91 +119,29 @@ def parse_config_h(fp, g=None): _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") def parse_makefile(fn, g=None): - """Parse a Makefile-style file. + """This function is deprecated. + + Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ - from distutils.text_file import TextFile - fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) - - if g is None: - g = {} - done = {} - notdone = {} - - while True: - line = fp.readline() - if line is None: # eof - break - m = _variable_rx.match(line) - if m: - n, v = m.group(1, 2) - v = v.strip() - # `$$' is a literal `$' in make - tmpv = v.replace('$$', '') - - if "$" in tmpv: - notdone[n] = v - else: - try: - v = int(v) - except ValueError: - # insert literal `$' - done[n] = v.replace('$$', '$') - else: - done[n] = v - - # do variable interpolation here - while notdone: - for name in list(notdone): - value = notdone[name] - m = _findvar1_rx.search(value) or _findvar2_rx.search(value) - if m: - n = m.group(1) - found = True - if n in done: - item = str(done[n]) - elif n in notdone: - # get it on a subsequent round - found = False - elif n in os.environ: - # do it like make: fall back to environment - item = os.environ[n] - else: - done[n] = item = "" - if found: - after = value[m.end():] - value = value[:m.start()] + item + after - if "$" in after: - notdone[name] = value - else: - try: value = int(value) - except ValueError: - done[name] = value.strip() - else: - done[name] = value - del notdone[name] - else: - # bogus variable reference; just drop it since we can't deal - del notdone[name] - - fp.close() - - # save the results in the global dictionary - g.update(done) - return g - + warn(_DEPRECATION_MSG % 'parse_makefile', DeprecationWarning) + return _sysconfig._parse_makefile(fn, g) def expand_makefile_vars(s, vars): - """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in + """This function is deprecated. + + Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. """ + warn('this function will be removed in then next version of Python', + DeprecationWarning) # This algorithm does multiple expansion, so if vars['foo'] contains # "${bar}", it will expand ${foo} to ${bar}, and then expand @@ -364,220 +157,3 @@ def expand_makefile_vars(s, vars): else: break return s - - -_config_vars = None - -def _init_posix(): - """Initialize the module as appropriate for POSIX systems.""" - g = {} - # load the installed Makefile: - try: - filename = get_makefile_filename() - parse_makefile(filename, g) - except IOError as msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # load the installed pyconfig.h: - try: - filename = get_config_h_filename() - parse_config_h(io.open(filename), g) - except IOError as msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # On MacOSX we need to check the setting of the environment variable - # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so - # it needs to be compatible. - # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: - cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] - cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') - if cur_target == '': - cur_target = cfg_target - os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) - elif [int(x) for x in cfg_target.split('.')] > [int(x) for x in cur_target.split('.')]: - my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' - % (cur_target, cfg_target)) - raise DistutilsPlatformError(my_msg) - - # On AIX, there are wrong paths to the linker scripts in the Makefile - # -- these paths are relative to the Python source, but when installed - # the scripts are in another directory. - if python_build: - g['LDSHARED'] = g['BLDSHARED'] - - elif get_python_version() < '2.1': - # The following two branches are for 1.5.2 compatibility. - if sys.platform == 'aix4': # what about AIX 3.x ? - # Linker script is in the config directory, not in Modules as the - # Makefile says. - python_lib = get_python_lib(standard_lib=1) - ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') - python_exp = os.path.join(python_lib, 'config', 'python.exp') - - g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - - global _config_vars - _config_vars = g - - -def _init_nt(): - """Initialize the module as appropriate for NT""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - g['SO'] = '.pyd' - g['EXE'] = ".exe" - g['VERSION'] = get_python_version().replace(".", "") - g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) - - global _config_vars - _config_vars = g - - -def _init_mac(): - """Initialize the module as appropriate for Macintosh systems""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - import MacOS - if not hasattr(MacOS, 'runtimemodel'): - g['SO'] = '.ppc.slb' - else: - g['SO'] = '.%s.slb' % MacOS.runtimemodel - - # XXX are these used anywhere? - g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") - g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") - - # These are used by the extension module build - g['srcdir'] = ':' - global _config_vars - _config_vars = g - - -def _init_os2(): - """Initialize the module as appropriate for OS/2""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - g['SO'] = '.pyd' - g['EXE'] = ".exe" - - global _config_vars - _config_vars = g - - -def get_config_vars(*args): - """With no arguments, return a dictionary of all configuration - variables relevant for the current platform. Generally this includes - everything needed to build extensions and install both pure modules and - extensions. On Unix, this means every variable defined in Python's - installed Makefile; on Windows and Mac OS it's a much smaller set. - - With arguments, return a list of values that result from looking up - each argument in the configuration variable dictionary. - """ - global _config_vars - if _config_vars is None: - func = globals().get("_init_" + os.name) - if func: - func() - else: - _config_vars = {} - - # Normalized versions of prefix and exec_prefix are handy to have; - # in fact, these are the standard versions used most places in the - # Distutils. - _config_vars['prefix'] = PREFIX - _config_vars['exec_prefix'] = EXEC_PREFIX - - # Convert srcdir into an absolute path if it appears necessary. - # Normally it is relative to the build directory. However, during - # testing, for example, we might be running a non-installed python - # from a different directory. - if python_build and os.name == "posix": - base = os.path.dirname(os.path.abspath(sys.executable)) - if (not os.path.isabs(_config_vars['srcdir']) and - base != os.getcwd()): - # srcdir is relative and we are not in the same directory - # as the executable. Assume executable is in the build - # directory and make srcdir absolute. - srcdir = os.path.join(base, _config_vars['srcdir']) - _config_vars['srcdir'] = os.path.normpath(srcdir) - - if sys.platform == 'darwin': - kernel_version = os.uname()[2] # Kernel version (8.4.3) - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # On Mac OS X before 10.4, check if -arch and -isysroot - # are in CFLAGS or LDFLAGS and remove them if they are. - # This is needed when building extensions on a 10.3 system - # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII) - flags = re.sub('-isysroot [^ \t]*', ' ', flags) - _config_vars[key] = flags - - else: - - # Allow the user to override the architecture flags using - # an environment variable. - # NOTE: This name was introduced by Apple in OSX 10.5 and - # is used by several scripting languages distributed with - # that OS release. - - if 'ARCHFLAGS' in os.environ: - arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = flags + ' ' + arch - _config_vars[key] = flags - - if args: - vals = [] - for name in args: - vals.append(_config_vars.get(name)) - return vals - else: - return _config_vars - -def get_config_var(name): - """Return the value of a single variable using the dictionary - returned by 'get_config_vars()'. Equivalent to - get_config_vars().get(name) - """ - return get_config_vars().get(name) diff --git a/tests/support.py b/tests/support.py index e258d2e58d..d60da854be 100644 --- a/tests/support.py +++ b/tests/support.py @@ -3,11 +3,19 @@ import shutil import tempfile from copy import deepcopy +import warnings from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution +def capture_warnings(func): + def _capture_warnings(*args, **kw): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + return func(*args, **kw) + return _capture_warnings + class LoggingSilencer(object): def setUp(self): diff --git a/tests/test_build.py b/tests/test_build.py index 6bca27ee06..2418e1656d 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -5,7 +5,7 @@ from distutils.command.build import build from distutils.tests import support -from distutils.util import get_platform +from sysconfig import get_platform class BuildTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 536cd67319..145eff5453 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -120,8 +120,7 @@ def test_run(self): # before we run the command, we want to make sure # all commands are present on the system # by creating a compiler and checking its executables - from distutils.ccompiler import new_compiler - from distutils.sysconfig import customize_compiler + from distutils.ccompiler import new_compiler, customize_compiler compiler = new_compiler() customize_compiler(compiler) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index ebbb39979c..d09718366d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -9,7 +9,7 @@ from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext -from distutils import sysconfig +import sysconfig from distutils.tests.support import TempdirManager from distutils.tests.support import LoggingSilencer from distutils.extension import Extension @@ -105,17 +105,17 @@ def test_solaris_enable_shared(self): old = sys.platform sys.platform = 'sunos' # fooling finalize_options - from distutils.sysconfig import _config_vars - old_var = _config_vars.get('Py_ENABLE_SHARED') - _config_vars['Py_ENABLE_SHARED'] = 1 + from sysconfig import _CONFIG_VARS + old_var = _CONFIG_VARS.get('Py_ENABLE_SHARED') + _CONFIG_VARS['Py_ENABLE_SHARED'] = 1 try: cmd.ensure_finalized() finally: sys.platform = old if old_var is None: - del _config_vars['Py_ENABLE_SHARED'] + del _CONFIG_VARS['Py_ENABLE_SHARED'] else: - _config_vars['Py_ENABLE_SHARED'] = old_var + _CONFIG_VARS['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris self.assertTrue(len(cmd.library_dirs) > 0) @@ -177,11 +177,10 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.finalize_options() - from distutils import sysconfig - py_include = sysconfig.get_python_inc() + py_include = sysconfig.get_path('include') self.assertTrue(py_include in cmd.include_dirs) - plat_py_include = sysconfig.get_python_inc(plat_specific=1) + plat_py_include = sysconfig.get_path('platinclude') self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b1d2d079bd..72e8915c00 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,7 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution -from distutils import sysconfig +import sysconfig from distutils.tests import support @@ -91,12 +91,12 @@ def test_version_int(self): # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable old = sysconfig.get_config_vars().get('VERSION') - sysconfig._config_vars['VERSION'] = 4 + sysconfig._CONFIG_VARS['VERSION'] = 4 try: cmd.run() finally: if old is not None: - sysconfig._config_vars['VERSION'] = old + sysconfig._CONFIG_VARS['VERSION'] = old built = os.listdir(target) for name in expected: diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index 9db8d24617..27b51a0645 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -3,8 +3,10 @@ import unittest from test.support import captured_stdout -from distutils.ccompiler import gen_lib_options, CCompiler +from distutils.ccompiler import (gen_lib_options, CCompiler, + get_default_compiler, customize_compiler) from distutils import debug +from distutils.tests import support class FakeCompiler(object): def library_dir_option(self, dir): @@ -19,7 +21,7 @@ def find_library_file(self, dirs, lib, debug=0): def library_option(self, lib): return "-l" + lib -class CCompilerTestCase(unittest.TestCase): +class CCompilerTestCase(support.EnvironGuard, unittest.TestCase): def test_gen_lib_options(self): compiler = FakeCompiler() @@ -52,6 +54,26 @@ class MyCCompiler(CCompiler): finally: debug.DEBUG = False + def test_customize_compiler(self): + + # not testing if default compiler is not unix + if get_default_compiler() != 'unix': + return + + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + def test_suite(): return unittest.makeSuite(CCompilerTestCase) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 98f0f08ef1..4b95dfa3aa 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -4,6 +4,7 @@ import os import subprocess import warnings +import sysconfig from test.support import check_warnings from test.support import captured_stdout @@ -23,13 +24,11 @@ def setUp(self): super(CygwinCCompilerTestCase, self).setUp() self.version = sys.version self.python_h = os.path.join(self.mkdtemp(), 'python.h') - from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename def tearDown(self): sys.version = self.version - from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename super(CygwinCCompilerTestCase, self).tearDown() diff --git a/tests/test_extension.py b/tests/test_extension.py index 1ee30585fa..9d3cfe6f18 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -5,9 +5,11 @@ from test.support import check_warnings from distutils.extension import read_setup_file, Extension +from distutils.tests.support import capture_warnings class ExtensionTestCase(unittest.TestCase): + @capture_warnings def test_read_setup_file(self): # trying to read a Setup file # (sample extracted from the PyGame project) diff --git a/tests/test_install.py b/tests/test_install.py index 76fa02acda..59e90801f2 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -5,12 +5,14 @@ import sys import unittest import site +import sysconfig +from sysconfig import (get_scheme_names, _CONFIG_VARS, _INSTALL_SCHEMES, + get_config_var, get_path) from test.support import captured_stdout from distutils.command.install import install from distutils.command import install as install_module -from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.errors import DistutilsOptionError @@ -36,9 +38,23 @@ def test_home_installation_scheme(self): build_lib=os.path.join(builddir, "lib"), ) - cmd = install(dist) - cmd.home = destination - cmd.ensure_finalized() + + + posix_prefix = _INSTALL_SCHEMES['posix_prefix'] + old_posix_prefix = posix_prefix['platinclude'] + posix_prefix['platinclude'] = \ + '{platbase}/include/python{py_version_short}' + + posix_home = _INSTALL_SCHEMES['posix_home'] + old_posix_home = posix_home['platinclude'] + posix_home['platinclude'] = '{base}/include/python' + try: + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() + finally: + posix_home['platinclude'] = old_posix_home + posix_prefix['platinclude'] = old_posix_prefix self.assertEqual(cmd.install_base, destination) self.assertEqual(cmd.install_platbase, destination) @@ -63,18 +79,19 @@ def test_user_site(self): return # preparing the environement for the test - self.old_user_base = site.USER_BASE - self.old_user_site = site.USER_SITE + self.old_user_base = get_config_var('userbase') + self.old_user_site = get_path('purelib', '%s_user' % os.name) self.tmpdir = self.mkdtemp() self.user_base = os.path.join(self.tmpdir, 'B') self.user_site = os.path.join(self.tmpdir, 'S') - site.USER_BASE = self.user_base - site.USER_SITE = self.user_site - install_module.USER_BASE = self.user_base - install_module.USER_SITE = self.user_site + _CONFIG_VARS['userbase'] = self.user_base + scheme = _INSTALL_SCHEMES['%s_user' % os.name] + scheme['purelib'] = self.user_site def _expanduser(path): - return self.tmpdir + if path[0] == '~': + path = os.path.normpath(self.tmpdir) + path[1:] + return path self.old_expand = os.path.expanduser os.path.expanduser = _expanduser @@ -82,19 +99,17 @@ def _expanduser(path): # this is the actual test self._test_user_site() finally: - site.USER_BASE = self.old_user_base - site.USER_SITE = self.old_user_site - install_module.USER_BASE = self.old_user_base - install_module.USER_SITE = self.old_user_site + _CONFIG_VARS['userbase'] = self.old_user_base + scheme['purelib'] = self.old_user_site os.path.expanduser = self.old_expand def _test_user_site(self): - for key in ('nt_user', 'unix_user', 'os2_home'): - self.assertTrue(key in INSTALL_SCHEMES) + schemes = get_scheme_names() + for key in ('nt_user', 'posix_user', 'os2_home'): + self.assertTrue(key in schemes) dist = Distribution({'name': 'xx'}) cmd = install(dist) - # making sure the user option is there options = [name for name, short, lable in cmd.user_options] @@ -185,7 +200,7 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) - def test_debug_mode(self): + def _test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) install_module.DEBUG = True diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index edc755ed15..e7df803168 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -4,7 +4,6 @@ import unittest from distutils import sysconfig -from distutils.ccompiler import get_default_compiler from distutils.tests import support from test.support import TESTFN, run_unittest @@ -26,10 +25,7 @@ def cleanup_testfn(self): elif os.path.isdir(TESTFN): shutil.rmtree(TESTFN) - def test_get_config_h_filename(self): - config_h = sysconfig.get_config_h_filename() - self.assertTrue(os.path.isfile(config_h), config_h) - + @support.capture_warnings def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before @@ -37,7 +33,11 @@ def test_get_python_lib(self): # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) + _sysconfig = __import__('sysconfig') + res = sysconfig.get_python_lib(True, True) + self.assertEquals(_sysconfig.get_path('platstdlib'), res) + @support.capture_warnings def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() # This is not much of a test. We make sure Python.h exists @@ -47,31 +47,7 @@ def test_get_python_inc(self): python_h = os.path.join(inc_dir, "Python.h") self.assertTrue(os.path.isfile(python_h), python_h) - def test_get_config_vars(self): - cvars = sysconfig.get_config_vars() - self.assertTrue(isinstance(cvars, dict)) - self.assertTrue(cvars) - - def test_customize_compiler(self): - - # not testing if default compiler is not unix - if get_default_compiler() != 'unix': - return - - os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' - - # make sure AR gets caught - class compiler: - compiler_type = 'unix' - - def set_executables(self, **kw): - self.exes = kw - - comp = compiler() - sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') - + @support.capture_warnings def test_parse_makefile_base(self): self.makefile = TESTFN fd = open(self.makefile, 'w') diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 008ae5d03a..6976dd55f8 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,8 +1,8 @@ """Tests for distutils.unixccompiler.""" import sys import unittest +import sysconfig -from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): diff --git a/tests/test_util.py b/tests/test_util.py index 8f8d4a10c2..ae6671de4f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,15 +6,14 @@ from io import BytesIO import subprocess +from sysconfig import get_config_vars, get_platform from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError -from distutils.util import (get_platform, convert_path, change_root, +from distutils.util import (convert_path, change_root, check_environ, split_quoted, strtobool, rfc822_escape, get_compiler_versions, _find_exe_version, _MAC_OS_X_LD_VERSION, byte_compile) from distutils import util -from distutils.sysconfig import get_config_vars -from distutils import sysconfig from distutils.tests import support from distutils.version import LooseVersion @@ -44,7 +43,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive - self._config_vars = copy(sysconfig._config_vars) + #self._config_vars = copy(sysconfig._config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -78,7 +77,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname - sysconfig._config_vars = copy(self._config_vars) + #sysconfig._config_vars = copy(self._config_vars) util.find_executable = self.old_find_executable subprocess.Popen = self.old_popen sys.old_stdout = self.old_stdout @@ -91,7 +90,7 @@ def _set_uname(self, uname): def _get_uname(self): return self._uname - def test_get_platform(self): + def _test_get_platform(self): # windows XP, 32bits os.name = 'nt' @@ -119,7 +118,6 @@ def test_get_platform(self): sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') sys.platform = 'darwin' - self._set_uname(('Darwin', 'macziade', '8.11.1', ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' @@ -157,7 +155,6 @@ def test_get_platform(self): finally: sys.maxsize = maxsize - # macbook with fat binaries (fat, universal or fat64) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' @@ -201,7 +198,6 @@ def test_get_platform(self): self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) - # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' diff --git a/unixccompiler.py b/unixccompiler.py index 51f6349a9e..c14a5d3fc6 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,7 +17,6 @@ import os, sys -from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -25,6 +24,7 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log + # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -74,7 +74,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, - # see also distutils.sysconfig + # see also the sysconfig compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: @@ -281,7 +281,9 @@ def runtime_library_dir_option(self, dir): # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. - compiler = os.path.basename(sysconfig.get_config_var("CC")) + _sysconfig = __import__('sysconfig') + + compiler = os.path.basename(_sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir @@ -296,7 +298,7 @@ def runtime_library_dir_option(self, dir): # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": + if _sysconfig.get_config_var("GNULD") == "yes": # GNU ld needs an extra option to get a RUNPATH # instead of just an RPATH. return "-Wl,--enable-new-dtags,-R" + dir diff --git a/util.py b/util.py index 8adf6e0d29..0515fefd2f 100644 --- a/util.py +++ b/util.py @@ -15,173 +15,7 @@ from distutils.version import LooseVersion from distutils.errors import DistutilsByteCompileError -def get_platform(): - """Return a string that identifies the current platform. - - This is used mainly to distinguish platform-specific build directories and - platform-specific built distributions. Typically includes the OS name - and version and the architecture (as supplied by 'os.uname()'), - although the exact information included depends on the OS; eg. for IRIX - the architecture isn't particularly important (IRIX only runs on SGI - hardware), but for Linux the kernel version isn't particularly - important. - - Examples of returned values: - linux-i586 - linux-alpha (?) - solaris-2.6-sun4u - irix-5.3 - irix64-6.2 - - Windows will return one of: - win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) - win-ia64 (64bit Windows on Itanium) - win32 (all others - specifically, sys.platform is returned) - - For other non-POSIX platforms, currently just returns 'sys.platform'. - """ - if os.name == 'nt': - # sniff sys.version for architecture. - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return sys.platform - j = sys.version.find(")", i) - look = sys.version[i+len(prefix):j].lower() - if look == 'amd64': - return 'win-amd64' - if look == 'itanium': - return 'win-ia64' - return sys.platform - - if os.name != "posix" or not hasattr(os, 'uname'): - # XXX what about the architecture? NT is Intel or Alpha, - # Mac OS is M68k or PPC, etc. - return sys.platform - - # Try to distinguish various flavours of Unix - - (osname, host, release, version, machine) = os.uname() - - # Convert the OS name to lowercase, remove '/' characters - # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") - osname = osname.lower().replace('/', '') - machine = machine.replace(' ', '_') - machine = machine.replace('/', '-') - - if osname[:5] == "linux": - # At least on Linux/Intel, 'machine' is the processor -- - # i386, etc. - # XXX what about Alpha, SPARC, etc? - return "%s-%s" % (osname, machine) - elif osname[:5] == "sunos": - if release[0] >= "5": # SunOS 5 == Solaris 2 - osname = "solaris" - release = "%d.%s" % (int(release[0]) - 3, release[2:]) - # fall through to standard osname-release-machine representation - elif osname[:4] == "irix": # could be "irix64"! - return "%s-%s" % (osname, release) - elif osname[:3] == "aix": - return "%s-%s.%s" % (osname, version, release) - elif osname[:6] == "cygwin": - osname = "cygwin" - rel_re = re.compile (r'[\d.]+', re.ASCII) - m = rel_re.match(release) - if m: - release = m.group() - elif osname[:6] == "darwin": - # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set - # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were - # MACOSX_DEPLOYMENT_TARGET. - from distutils.sysconfig import get_config_vars - cfgvars = get_config_vars() - - macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - - if 1: - # Always calculate the release of the running machine, - # needed to determine if we can build fat binaries or not. - - macrelease = macver - # Get the system version. Reading this plist is a documented - # way to get the system version (see the documentation for - # the Gestalt Manager) - try: - f = open('/System/Library/CoreServices/SystemVersion.plist') - except IOError: - # We're on a plain darwin box, fall back to the default - # behaviour. - pass - else: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - f.close() - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour - - if not macver: - macver = macrelease - - if macver: - from distutils.sysconfig import get_config_vars - release = macver - osname = "macosx" - - if (macrelease + '.') >= '10.4.' and \ - '-arch' in get_config_vars().get('CFLAGS', '').strip(): - # The universal build will build fat binaries, but not on - # systems before 10.4 - # - # Try to detect 4-way universal builds, those have machine-type - # 'universal' instead of 'fat'. - - machine = 'fat' - cflags = get_config_vars().get('CFLAGS') - - archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) - - if len(archs) == 1: - machine = archs[0] - elif archs == ('i386', 'ppc'): - machine = 'fat' - elif archs == ('i386', 'x86_64'): - machine = 'intel' - elif archs == ('i386', 'ppc', 'x86_64'): - machine = 'fat3' - elif archs == ('ppc64', 'x86_64'): - machine = 'fat64' - elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): - machine = 'universal' - else: - raise ValueError( - "Don't know machine value for archs=%r"%(archs,)) - - elif machine == 'i386': - # On OSX the machine type returned by uname is always the - # 32-bit variant, even if the executable architecture is - # the 64-bit variant - if sys.maxsize >= 2**32: - machine = 'x86_64' - - elif machine in ('PowerPC', 'Power_Macintosh'): - # Pick a sane name for the PPC architecture. - machine = 'ppc' - - # See 'i386' case - if sys.maxsize >= 2**32: - machine = 'ppc64' - - return "%s-%s-%s" % (osname, release, machine) - +_sysconfig = __import__('sysconfig') def convert_path(pathname): """Return 'pathname' as a name that will work on the native filesystem. @@ -269,7 +103,7 @@ def check_environ(): os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] if 'PLAT' not in os.environ: - os.environ['PLAT'] = get_platform() + os.environ['PLAT'] = _sysconfig.get_platform() _environ_checked = 1 From 70ef6e5c8e5729c1f14e57d4423be5d6c72e35e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 29 Jan 2010 11:46:31 +0000 Subject: [PATCH 2856/8469] Merged revisions 77759,77761 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77759 | tarek.ziade | 2010-01-26 22:21:54 +0100 (Tue, 26 Jan 2010) | 1 line reintroduced the names in Distutils for APIs that were relocated ........ r77761 | tarek.ziade | 2010-01-26 23:46:15 +0100 (Tue, 26 Jan 2010) | 1 line added local get_platform/set_platform APIs in distutils.sysconfig ........ --- command/bdist.py | 2 +- command/bdist_dumb.py | 3 +- command/bdist_msi.py | 3 + command/bdist_wininst.py | 3 +- command/build.py | 2 +- command/build_ext.py | 4 +- command/install.py | 5 +- msvc9compiler.py | 10 ++-- sysconfig.py | 9 +++ tests/test_util.py | 125 ++------------------------------------- util.py | 21 +++++++ 11 files changed, 53 insertions(+), 134 deletions(-) diff --git a/command/bdist.py b/command/bdist.py index a79982b645..72b0cefe42 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,8 +6,8 @@ __revision__ = "$Id$" import os -from sysconfig import get_platform +from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsPlatformError, DistutilsOptionError diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index c16125f229..c2af95f13a 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -8,8 +8,9 @@ import os -from sysconfig import get_python_version, get_platform +from sysconfig import get_python_version +from distutils.util import get_platform from distutils.core import Command from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import DistutilsPlatformError diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f9205483d7..404f215f9b 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -6,6 +6,8 @@ """ Implements the bdist_msi command. """ +import sys, os +from sysconfig import get_python_version import sys, os from distutils.core import Command @@ -15,6 +17,7 @@ from distutils.errors import DistutilsOptionError from distutils.util import get_platform from distutils import log + import msilib from msilib import schema, sequence, text from msilib import Directory, Feature, Dialog, add_data diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 2cf28234ec..71cc79881a 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -8,12 +8,13 @@ import sys import os -from sysconfig import get_python_version, get_platform +from sysconfig import get_python_version from distutils.core import Command from distutils.dir_util import remove_tree from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils import log +from distutils.util import get_platform class bdist_wininst(Command): diff --git a/command/build.py b/command/build.py index d7b0e3c5f9..4d30f8ff2b 100644 --- a/command/build.py +++ b/command/build.py @@ -5,8 +5,8 @@ __revision__ = "$Id$" import sys, os -from sysconfig import get_platform +from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsOptionError diff --git a/command/build_ext.py b/command/build_ext.py index 39d37dab84..8f41facd4a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -9,14 +9,12 @@ import sys, os, re from warnings import warn -from sysconfig import get_platform - +from distutils.util import get_platform from distutils.core import Command from distutils.errors import * from distutils.ccompiler import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension - from distutils import log # this keeps compatibility from 2.3 to 2.5 diff --git a/command/install.py b/command/install.py index 1f8d238a2d..2a6d4dd127 100644 --- a/command/install.py +++ b/command/install.py @@ -7,15 +7,14 @@ import sys import os -from sysconfig import (get_config_vars, get_platform, get_paths, get_path, - get_config_var) +from sysconfig import get_config_vars, get_paths, get_path, get_config_var from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, change_root +from distutils.util import convert_path, change_root, get_platform from distutils.errors import DistutilsOptionError def _subst_vars(s, local_vars): diff --git a/msvc9compiler.py b/msvc9compiler.py index 38fc96f867..6455fffa1f 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -23,9 +23,9 @@ CompileError, LibError, LinkError) from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log -import winreg +from distutils.util import get_platform -_sysconfig = __import__('sysconfig') +import winreg RegOpenKeyEx = winreg.OpenKeyEx RegEnumKey = winreg.EnumKey @@ -327,7 +327,7 @@ def initialize(self, plat_name=None): # multi-init means we would need to check platform same each time... assert not self.initialized, "don't init multiple times" if plat_name is None: - plat_name = _sysconfig.get_platform() + plat_name = get_platform() # sanity check for platforms to prevent obscure errors later. ok_plats = 'win32', 'win-amd64', 'win-ia64' if plat_name not in ok_plats: @@ -348,12 +348,12 @@ def initialize(self, plat_name=None): # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) # No idea how itanium handles this, if at all. - if plat_name == _sysconfig.get_platform() or plat_name == 'win32': + if plat_name == get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] else: # cross compile from win32 -> some 64bit - plat_spec = PLAT_TO_VCVARS[_sysconfig.get_platform()] + '_' + \ + plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ PLAT_TO_VCVARS[plat_name] vc_env = query_vcvarsall(VERSION, plat_spec) diff --git a/sysconfig.py b/sysconfig.py index 48f22ad734..2561f573ea 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -25,6 +25,15 @@ # to avoid this module to shadow it _sysconfig = __import__('sysconfig') +# names defined here to keep backward compatibility +# for APIs that were relocated +get_python_version = _sysconfig.get_python_version +get_config_h_filename = _sysconfig.get_config_h_filename +parse_config_h = _sysconfig.parse_config_h +get_config_vars = _sysconfig.get_config_vars +get_config_var = _sysconfig.get_config_var +from distutils.ccompiler import customize_compiler + _DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " "Use the APIs provided by the sysconfig module instead") diff --git a/tests/test_util.py b/tests/test_util.py index ae6671de4f..896e1e07df 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -90,125 +90,12 @@ def _set_uname(self, uname): def _get_uname(self): return self._uname - def _test_get_platform(self): - - # windows XP, 32bits - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Intel)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win32') - - # windows XP, amd64 - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Amd64)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-amd64') - - # windows XP, itanium - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Itanium)]') - sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-ia64') - - # macbook - os.name = 'posix' - sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' - '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') - sys.platform = 'darwin' - self._set_uname(('Darwin', 'macziade', '8.11.1', - ('Darwin Kernel Version 8.11.1: ' - 'Wed Oct 10 18:23:28 PDT 2007; ' - 'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' - - get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' - '-fwrapv -O3 -Wall -Wstrict-prototypes') - - maxsize = sys.maxsize - try: - sys.maxsize = 2147483647 - self.assertEquals(get_platform(), 'macosx-10.3-ppc') - sys.maxsize = 9223372036854775807 - self.assertEquals(get_platform(), 'macosx-10.3-ppc64') - finally: - sys.maxsize = maxsize - - - self._set_uname(('Darwin', 'macziade', '8.11.1', - ('Darwin Kernel Version 8.11.1: ' - 'Wed Oct 10 18:23:28 PDT 2007; ' - 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' - - get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' - '-fwrapv -O3 -Wall -Wstrict-prototypes') - - maxsize = sys.maxsize - try: - sys.maxsize = 2147483647 - self.assertEquals(get_platform(), 'macosx-10.3-i386') - sys.maxsize = 9223372036854775807 - self.assertEquals(get_platform(), 'macosx-10.3-x86_64') - finally: - sys.maxsize = maxsize - - # macbook with fat binaries (fat, universal or fat64) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' - get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-fat') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-intel') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat3') - - get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-universal') - - get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3') - - self.assertEquals(get_platform(), 'macosx-10.4-fat64') - - for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): - get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' - '/Developer/SDKs/MacOSX10.4u.sdk ' - '-fno-strict-aliasing -fno-common ' - '-dynamic -DNDEBUG -g -O3'%(arch,)) - - self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) - - # linux debian sarge - os.name = 'posix' - sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' - '\n[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]') - sys.platform = 'linux2' - self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', - '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) - - self.assertEquals(get_platform(), 'linux-i686') - - # XXX more platforms to tests here + def test_get_platform(self): + platform = util.get_platform() + self.assertEquals(platform, get_platform()) + util.set_platform('MyOwnPlatform') + self.assertEquals('MyOwnPlatform', util.get_platform()) + util.set_platform(platform) def test_convert_path(self): # linux/mac diff --git a/util.py b/util.py index 0515fefd2f..8fd2ca077f 100644 --- a/util.py +++ b/util.py @@ -16,6 +16,27 @@ from distutils.errors import DistutilsByteCompileError _sysconfig = __import__('sysconfig') +_PLATFORM = None + +def get_platform(): + """Return a string that identifies the current platform. + + By default, will return the value returned by sysconfig.get_platform(), + but it can be changed by calling set_platform(). + """ + global _PLATFORM + if _PLATFORM is None: + _PLATFORM = _sysconfig.get_platform() + return _PLATFORM + +def set_platform(identifier): + """Sets the platform string identifier returned by get_platform(). + + Note that this change doesn't impact the value returned by + sysconfig.get_platform() and is local to Distutils + """ + global _PLATFORM + _PLATFORM = identifier def convert_path(pathname): """Return 'pathname' as a name that will work on the native filesystem. From f3b8f0e0dce15c006ebc11503282679119b7eb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 2 Feb 2010 22:55:00 +0000 Subject: [PATCH 2857/8469] fixed a typo on distutils.sysconfig. thanks arfever --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 2d92dabf7b..a247bc2cd7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -9,7 +9,7 @@ Email: **This module has been moved out of Distutils and will be removed from -Python in the next version (3.2)** +Python in the next version (3.3)** """ __revision__ = "$Id$" From 8f51dc176a1854fbf1f7c8612d67c63ca1c3d92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 2 Feb 2010 23:16:13 +0000 Subject: [PATCH 2858/8469] Merged revisions 77919,77921-77922 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77919 | tarek.ziade | 2010-02-02 23:50:23 +0100 (Tue, 02 Feb 2010) | 1 line module reorganization + missing doctests ........ r77921 | tarek.ziade | 2010-02-02 23:54:28 +0100 (Tue, 02 Feb 2010) | 1 line sysconfig.get_scheme_names now returns a sorted tuple ........ r77922 | tarek.ziade | 2010-02-02 23:55:00 +0100 (Tue, 02 Feb 2010) | 1 line fixed a typo on distutils.sysconfig. thanks arfever ........ --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 2561f573ea..4a8629e6bd 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -9,7 +9,7 @@ Email: **This module has been moved out of Distutils and will be removed from -Python in the next version (3.2)** +Python in the next version (3.3)** """ __revision__ = "$Id$" From efbb3664dba73095ae8d7ff40222b0dad5a13b75 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 3 Feb 2010 02:59:43 +0000 Subject: [PATCH 2859/8469] Merged revisions 77712,77740-77741,77756,77886,77902,77936 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77712 | tarek.ziade | 2010-01-23 11:52:57 -0600 (Sat, 23 Jan 2010) | 1 line fixed the 64bits tests for get_platform() - mac osx ........ r77740 | benjamin.peterson | 2010-01-24 21:58:21 -0600 (Sun, 24 Jan 2010) | 1 line compare types with is not == ........ r77741 | facundo.batista | 2010-01-25 00:15:01 -0600 (Mon, 25 Jan 2010) | 3 lines Added a note about Event.is_set() syntax being new to 2.6 ........ r77756 | tarek.ziade | 2010-01-26 11:20:37 -0600 (Tue, 26 Jan 2010) | 1 line fixed bdist_msi imports and added a test module for distutils.command.bdist_msi ........ r77886 | benjamin.peterson | 2010-01-31 12:09:34 -0600 (Sun, 31 Jan 2010) | 1 line move distutils.rst to different toc ........ r77902 | andrew.kuchling | 2010-01-31 20:04:26 -0600 (Sun, 31 Jan 2010) | 1 line Add various items ........ r77936 | andrew.kuchling | 2010-02-02 20:19:14 -0600 (Tue, 02 Feb 2010) | 1 line Add various items ........ --- command/bdist_msi.py | 5 +---- tests/test_bdist_msi.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 tests/test_bdist_msi.py diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 404f215f9b..f13c73b36d 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -7,15 +7,12 @@ Implements the bdist_msi command. """ import sys, os -from sysconfig import get_python_version +from sysconfig import get_python_version, get_platform -import sys, os from distutils.core import Command from distutils.dir_util import remove_tree -from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError -from distutils.util import get_platform from distutils import log import msilib diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py new file mode 100644 index 0000000000..ba2d3e19c2 --- /dev/null +++ b/tests/test_bdist_msi.py @@ -0,0 +1,23 @@ +"""Tests for distutils.command.bdist_msi.""" +import unittest +import sys + +from distutils.tests import support + +@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +class BDistMSITestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_minial(self): + # minimal test XXX need more tests + from distutils.command.bdist_msi import bdist_msi + pkg_pth, dist = self.create_dist() + cmd = bdist_msi(dist) + cmd.ensure_finalized() + +def test_suite(): + return unittest.makeSuite(BDistMSITestCase) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) From 375a738b125ed236d79369866fba47a360ddb6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Feb 2010 15:38:12 +0000 Subject: [PATCH 2860/8469] leaving global attributes for backward compat --- command/install.py | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/command/install.py b/command/install.py index b5336fefd6..60e4df0fea 100644 --- a/command/install.py +++ b/command/install.py @@ -17,6 +17,87 @@ from distutils.util import convert_path, change_root, get_platform from distutils.errors import DistutilsOptionError +# kept for backward compat, will be removed in 3.2 +if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', + 'platlib': '$base', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } +else: + WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } + +INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', + 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', + 'platlib': '$base/lib/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'nt': WINDOWS_SCHEME, + 'nt_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + }, + 'mac': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'mac_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'os2': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'os2_home': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + } + +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') +# end of backward compat + def _subst_vars(s, local_vars): try: return s.format(**local_vars) From a72113165de6217370d77b04b5abba938230953e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Wed, 3 Feb 2010 16:10:34 +0000 Subject: [PATCH 2861/8469] Merged revisions 77949 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77949 | tarek.ziade | 2010-02-03 16:38:12 +0100 (Wed, 03 Feb 2010) | 1 line leaving global attributes for backward compat ........ --- command/install.py | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/command/install.py b/command/install.py index 2a6d4dd127..cfebeeabd7 100644 --- a/command/install.py +++ b/command/install.py @@ -17,6 +17,87 @@ from distutils.util import convert_path, change_root, get_platform from distutils.errors import DistutilsOptionError +# kept for backward compat, will be removed in 3.2 +if sys.version < "2.2": + WINDOWS_SCHEME = { + 'purelib': '$base', + 'platlib': '$base', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } +else: + WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + } + +INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', + 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', + 'platlib': '$base/lib/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'nt': WINDOWS_SCHEME, + 'nt_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + }, + 'mac': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'mac_user': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + 'os2': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, + 'os2_home': { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + }, + } + +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') +# end of backward compat + def _subst_vars(s, local_vars): try: return s.format(**local_vars) From e04f6e5ca792f5ac3df0dac51226396914f83789 Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Wed, 3 Feb 2010 22:06:03 +0000 Subject: [PATCH 2862/8469] Merged revisions 69304 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r69304 | neil.schemenauer | 2009-02-05 08:25:16 -0800 (Thu, 05 Feb 2009) | 4 lines Fix test_build_ext.py to work when building in a separate directory. Since "srcdir" should now be defined on all platforms, use it to find the module source. ........ --- tests/test_build_ext.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 93d18814bc..a1c236aa15 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -13,11 +13,14 @@ import unittest from test import test_support - # http://bugs.python.org/issue4373 # Don't load the xx module more than once. ALREADY_TESTED = False +def _get_source_filename(): + srcdir = sysconfig.get_config_var('srcdir') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') + class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -28,9 +31,7 @@ def setUp(self): self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) - - xx_c = os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') - shutil.copy(xx_c, self.tmp_dir) + shutil.copy(_get_source_filename(), self.tmp_dir) def test_build_ext(self): global ALREADY_TESTED @@ -387,9 +388,11 @@ def test_build_ext_path_cross_platform(self): self.assertEquals(ext_path, wanted) def test_suite(): - if not sysconfig.python_build: + src = _get_source_filename() + if not os.path.exists(src): if test_support.verbose: - print 'test_build_ext: The test must be run in a python build dir' + print ('test_build_ext: Cannot find source code (test' + ' must run in python build dir)') return unittest.TestSuite() else: return unittest.makeSuite(BuildExtTestCase) From 6093446e3b99ec64d7b2207d36a9d9522114bd0e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 6 Feb 2010 16:37:32 +0000 Subject: [PATCH 2863/8469] bump version to 2.7a3 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 55aaf81a3d..977643bf34 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7a2" +__version__ = "2.7a3" #--end constants-- From eea5ca2f97e7bc3ff5477d01b0add5c0800b98a3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 6 Feb 2010 23:53:52 +0000 Subject: [PATCH 2864/8469] Add missing import when running these tests standalone. --- tests/test_bdist.py | 4 +++- tests/test_bdist_dumb.py | 4 +++- tests/test_bdist_msi.py | 4 +++- tests/test_bdist_rpm.py | 4 +++- tests/test_bdist_wininst.py | 4 +++- tests/test_cmd.py | 4 ++-- tests/test_cygwinccompiler.py | 4 ++-- tests/test_emxccompiler.py | 4 ++-- tests/test_sysconfig.py | 1 + 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index be3ec74976..a37f4a9b09 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -5,6 +5,8 @@ import tempfile import shutil +from test.test_support import run_unittest + from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support @@ -40,4 +42,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 5eaef2a9d7..f2220f474d 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -11,6 +11,8 @@ except ImportError: zlib = None +from test.test_support import run_unittest + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -100,4 +102,4 @@ def test_suite(): return unittest.makeSuite(BuildDumbTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index ba2d3e19c2..7554e9f170 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -2,6 +2,8 @@ import unittest import sys +from test.test_support import run_unittest + from distutils.tests import support @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") @@ -20,4 +22,4 @@ def test_suite(): return unittest.makeSuite(BDistMSITestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2aa257f7e6..25a5763a72 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -6,6 +6,8 @@ import tempfile import shutil +from test.test_support import run_unittest + from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support @@ -122,4 +124,4 @@ def test_suite(): return unittest.makeSuite(BuildRpmTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 9b1ba6d107..c2b13b314d 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,6 +1,8 @@ """Tests for distutils.command.bdist_wininst.""" import unittest +from test.test_support import run_unittest + from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -27,4 +29,4 @@ def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 2174efbf64..cfd6485113 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,7 +1,7 @@ """Tests for distutils.cmd.""" import unittest import os -from test.test_support import captured_stdout +from test.test_support import captured_stdout, run_unittest from distutils.cmd import Command from distutils.dist import Distribution @@ -124,4 +124,4 @@ def test_suite(): return unittest.makeSuite(CommandTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index b67f987e6b..e97ac666a6 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -5,7 +5,7 @@ import warnings import sysconfig -from test.test_support import check_warnings +from test.test_support import check_warnings, run_unittest from test.test_support import captured_stdout from distutils import cygwinccompiler @@ -108,4 +108,4 @@ def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py index 6e1deced35..d5e07dcede 100644 --- a/tests/test_emxccompiler.py +++ b/tests/test_emxccompiler.py @@ -4,7 +4,7 @@ import os import warnings -from test.test_support import check_warnings +from test.test_support import check_warnings, run_unittest from test.test_support import captured_stdout from distutils.emxccompiler import get_versions @@ -30,4 +30,4 @@ def test_suite(): return unittest.makeSuite(EmxCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 9013220ffb..3066486066 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,6 +2,7 @@ import os import test import unittest +import shutil from distutils import sysconfig from distutils.tests import support From dcd1dd3857242fe3463d68cb19abfe431f520f92 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 11 Feb 2010 14:47:04 +0100 Subject: [PATCH 2865/8469] fix develop --user for having '.' in PYTHON_PATH the pth file update wouldn't work if the distribution location is in the side dirs so we special-case for the location being the cwd --HG-- branch : distribute extra : rebase_source : 4c80082825c25f7f4692fcdd3580da5d1948ef89 --- setuptools/command/easy_install.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 421d0c09cc..4b42a537ce 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1420,8 +1420,12 @@ def save(self): def add(self,dist): """Add `dist` to the distribution map""" - if dist.location not in self.paths and dist.location not in self.sitedirs: - self.paths.append(dist.location); self.dirty = True + if (dist.location not in self.paths and ( + dist.location not in self.sitedirs or + dist.location == os.getcwd() #account for '.' being in PYTHONPATH + )): + self.paths.append(dist.location) + self.dirty = True Environment.add(self,dist) def remove(self,dist): From 2de12a23118f5eff414f232e0fdb50dd74362fa9 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 11 Feb 2010 17:04:22 +0100 Subject: [PATCH 2866/8469] add some tests for the pth writer/manager --HG-- branch : distribute extra : rebase_source : b7e6abf35a947b39b6290b076f618ce75211757e --- setuptools/tests/test_easy_install.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 95909ca766..ff9fa31def 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -3,7 +3,9 @@ import sys import os, shutil, tempfile, unittest from setuptools.command.easy_install import easy_install, get_script_args, main +from setuptools.command.easy_install import PthDistributions from setuptools.dist import Distribution +from pkg_resources import Distribution as PRDistribution class FakeDist(object): def get_entry_map(self, group): @@ -90,3 +92,19 @@ def _parse_command_line(self): os.chdir(old_wd) shutil.rmtree(dir) +class TestPTHFileWriter(unittest.TestCase): + def test_add_from_cwd_site_sets_dirty(self): + '''a pth file manager should set dirty + if a distribution is in site but also the cwd + ''' + pth = PthDistributions('does-not_exist', [os.getcwd()]) + self.assertFalse(pth.dirty) + pth.add(PRDistribution(os.getcwd())) + self.assertTrue(pth.dirty) + + def test_add_from_site_is_ignored(self): + pth = PthDistributions('does-not_exist', ['/test/location/does-not-have-to-exist']) + self.assertFalse(pth.dirty) + pth.add(PRDistribution('/test/location/does-not-have-to-exist')) + self.assertFalse(pth.dirty) + From c14e1a1398cf7ece7a4bcb15317868163789d879 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 11 Feb 2010 21:32:14 +0100 Subject: [PATCH 2867/8469] enable easy_install --user, *warning breaks tests* the test-isolation got borked and operates on the users home instead of the test-tempdirs --HG-- branch : distribute extra : rebase_source : 1e9bf310b6ba92629d7ba494af17f519cfe17dc5 --- setuptools/command/develop.py | 88 ++------------------------- setuptools/command/easy_install.py | 87 +++++++++++++++++++++++++- setuptools/tests/test_develop.py | 14 ++--- setuptools/tests/test_easy_install.py | 50 +++++++++++++++ 4 files changed, 147 insertions(+), 92 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 330ba1680e..d88d0990ce 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -2,19 +2,8 @@ from distutils.util import convert_path, subst_vars from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log -from distutils.errors import * -import sys, os, setuptools, glob -from distutils.sysconfig import get_config_vars -from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS - -if sys.version < "2.6": - USER_BASE = None - USER_SITE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True +from distutils.errors import DistutilsError, DistutilsOptionError +import os, setuptools, glob class develop(easy_install): """Set up package for development""" @@ -28,11 +17,6 @@ class develop(easy_install): boolean_options = easy_install.boolean_options + ['uninstall'] - if HAS_USER_SITE: - user_options.append(('user', None, - "install in user site-package '%s'" % USER_SITE)) - boolean_options.append('user') - command_consumes_arguments = False # override base def run(self): @@ -49,36 +33,7 @@ def initialize_options(self): easy_install.initialize_options(self) self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir - self.user = 0 - self.install_purelib = None # for pure module distributions - self.install_platlib = None # non-pure (dists w/ extensions) - self.install_headers = None # for C/C++ headers - self.install_lib = None # set to either purelib or platlib - self.install_scripts = None - self.install_data = None - self.install_base = None - self.install_platbase = None - self.install_userbase = USER_BASE - self.install_usersite = USER_SITE - - def select_scheme(self, name): - """Sets the install directories by applying the install schemes.""" - # it's the caller's problem if they supply a bad name! - scheme = INSTALL_SCHEMES[name] - for key in SCHEME_KEYS: - attrname = 'install_' + key - if getattr(self, attrname) is None: - setattr(self, attrname, scheme[key]) - - def create_home_path(self): - """Create directories under ~.""" - if not self.user: - return - home = convert_path(os.path.expanduser("~")) - for name, path in self.config_vars.iteritems(): - if path.startswith(home) and not os.path.isdir(path): - self.debug_print("os.makedirs('%s', 0700)" % path) - os.makedirs(path, 0700) + def _expand_attrs(self, attrs): for attr in attrs: @@ -110,44 +65,11 @@ def finalize_options(self): self.args = [ei.egg_name] - py_version = sys.version.split()[0] - prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') - self.config_vars = {'dist_name': self.distribution.get_name(), - 'dist_version': self.distribution.get_version(), - 'dist_fullname': self.distribution.get_fullname(), - 'py_version': py_version, - 'py_version_short': py_version[0:3], - 'py_version_nodot': py_version[0] + py_version[2], - 'sys_prefix': prefix, - 'prefix': prefix, - 'sys_exec_prefix': exec_prefix, - 'exec_prefix': exec_prefix, - } - - if HAS_USER_SITE: - self.config_vars['userbase'] = self.install_userbase - self.config_vars['usersite'] = self.install_usersite - - # fix the install_dir if "--user" was used - if self.user: - self.create_home_path() - if self.install_userbase is None: - raise DistutilsPlatformError( - "User base directory is not specified") - self.install_base = self.install_platbase = self.install_userbase - if os.name == 'posix': - self.select_scheme("unix_user") - else: - self.select_scheme(os.name + "_user") - self.expand_basedirs() - self.expand_dirs() - - if self.user and self.install_purelib: - self.install_dir = self.install_purelib - self.script_dir = self.install_scripts easy_install.finalize_options(self) + self.expand_basedirs() + self.expand_dirs() # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4b42a537ce..d709806030 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -14,9 +14,11 @@ from setuptools import Command from setuptools.sandbox import run_setup from distutils import log, dir_util -from distutils.sysconfig import get_python_lib +from distutils.util import convert_path, subst_vars +from distutils.sysconfig import get_python_lib, get_config_vars from distutils.errors import DistutilsArgError, DistutilsOptionError, \ DistutilsError +from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS from setuptools.archive_util import unpack_archive from setuptools.package_index import PackageIndex, parse_bdist_wininst from setuptools.package_index import URL_SCHEME @@ -29,6 +31,16 @@ 'main', 'get_exe_prefixes', ] + +if sys.version < "2.6": + USER_BASE = None + USER_SITE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True + def samefile(p1,p2): if hasattr(os.path,'samefile') and ( os.path.exists(p1) and os.path.exists(p2) @@ -97,10 +109,18 @@ class easy_install(Command): 'delete-conflicting', 'ignore-conflicts-at-my-risk', 'editable', 'no-deps', 'local-snapshots-ok', 'version' ] + + if HAS_USER_SITE: + user_options.append(('user', None, + "install in user site-package '%s'" % USER_SITE)) + boolean_options.append('user') + + negative_opt = {'always-unzip': 'zip-ok'} create_index = PackageIndex def initialize_options(self): + self.user = 0 self.zip_ok = self.local_snapshots_ok = None self.install_dir = self.script_dir = self.exclude_scripts = None self.index_url = None @@ -112,6 +132,16 @@ def initialize_options(self): self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None self.version = None + self.install_purelib = None # for pure module distributions + self.install_platlib = None # non-pure (dists w/ extensions) + self.install_headers = None # for C/C++ headers + self.install_lib = None # set to either purelib or platlib + self.install_scripts = None + self.install_data = None + self.install_base = None + self.install_platbase = None + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE # Options not specifiable via command line self.package_index = None @@ -147,6 +177,42 @@ def finalize_options(self): print 'distribute %s' % get_distribution('distribute').version sys.exit() + py_version = sys.version.split()[0] + prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') + + self.config_vars = {'dist_name': self.distribution.get_name(), + 'dist_version': self.distribution.get_version(), + 'dist_fullname': self.distribution.get_fullname(), + 'py_version': py_version, + 'py_version_short': py_version[0:3], + 'py_version_nodot': py_version[0] + py_version[2], + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, + } + + if HAS_USER_SITE: + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite + + # fix the install_dir if "--user" was used + #XXX: duplicate of the code in the setup command + if self.user: + self.create_home_path() + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + if os.name == 'posix': + self.select_scheme("unix_user") + else: + self.select_scheme(os.name + "_user") + + if self.user and self.install_purelib: + self.install_dir = self.install_purelib + self.script_dir = self.install_scripts + self._expand('install_dir','script_dir','build_directory','site_dirs') # If a non-default installation directory was specified, default the # script directory to match it. @@ -512,6 +578,15 @@ def install_item(self, spec, download, tmpdir, deps, install_needed=False): + def select_scheme(self, name): + """Sets the install directories by applying the install schemes.""" + # it's the caller's problem if they supply a bad name! + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: + attrname = 'install_' + key + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) + @@ -1129,7 +1204,15 @@ def install_site_py(self): - + def create_home_path(self): + """Create directories under ~.""" + if not self.user: + return + home = convert_path(os.path.expanduser("~")) + for name, path in self.config_vars.iteritems(): + if path.startswith(home) and not os.path.isdir(path): + self.debug_print("os.makedirs('%s', 0700)" % path) + os.makedirs(path, 0700) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 1d5fa14175..315c1ac802 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -7,7 +7,7 @@ from StringIO import StringIO from setuptools.command.develop import develop -from setuptools.command import develop as develop_pkg +from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution SETUP_PY = """\ @@ -18,7 +18,7 @@ class TestDevelopTest(unittest.TestCase): - def setUp(self): + def setUp(self): self.dir = tempfile.mkdtemp() setup = os.path.join(self.dir, 'setup.py') f = open(setup, 'w') @@ -28,18 +28,18 @@ def setUp(self): os.chdir(self.dir) if sys.version >= "2.6": self.old_base = site.USER_BASE - site.USER_BASE = develop_pkg.USER_BASE = tempfile.mkdtemp() + site.USER_BASE = easy_install_pkg.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE - site.USER_SITE = develop_pkg.USER_SITE = tempfile.mkdtemp() + site.USER_SITE = easy_install_pkg.USER_SITE = tempfile.mkdtemp() - def tearDown(self): + def tearDown(self): os.chdir(self.old_cwd) shutil.rmtree(self.dir) if sys.version >= "2.6": shutil.rmtree(site.USER_BASE) shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site + easy_install_pkg.USER_BASE = site.USER_BASE = self.old_base + easy_install_pkg.USER_SITE = site.USER_SITE = self.old_site def test_develop(self): if sys.version < "2.6": diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ff9fa31def..be1513cc98 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -2,8 +2,10 @@ """ import sys import os, shutil, tempfile, unittest +import site from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions +from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution from pkg_resources import Distribution as PRDistribution @@ -108,3 +110,51 @@ def test_add_from_site_is_ignored(self): pth.add(PRDistribution('/test/location/does-not-have-to-exist')) self.assertFalse(pth.dirty) + + +class TestUserInstallTest(unittest.TestCase): + + def setUp(self): + self.dir = tempfile.mkdtemp() + setup = os.path.join(self.dir, 'setup.py') + f = open(setup, 'w') + f.write(SETUP_PY) + f.close() + self.old_cwd = os.getcwd() + os.chdir(self.dir) + if sys.version >= "2.6": + self.old_base = site.USER_BASE + site.USER_BASE = easy_install_pkg.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = easy_install_pkg.USER_SITE = tempfile.mkdtemp() + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.dir) + if sys.version >= "2.6": + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + easy_install_pkg.USER_BASE = site.USER_BASE = self.old_base + easy_install_pkg.USER_SITE = site.USER_SITE = self.old_site + + def test_install(self): + if sys.version < "2.6": + return + dist = Distribution() + dist.script_name = 'setup.py' + cmd = easy_install(dist) + cmd.user = 1 + cmd.ensure_finalized() + cmd.user = 1 + old_stdout = sys.stdout + sys.stdout = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + + # let's see if we got our egg link at the right place + content = os.listdir(site.USER_SITE) + content.sort() + self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) + From 0b3d2302b8b209c7bed8bdad6e1a6cff34889779 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 11 Feb 2010 23:57:28 +0100 Subject: [PATCH 2868/8469] move the rest of the path handling code from develop to easy_install also resuffle the path handlers a bit, hopefully everything works now --HG-- branch : distribute extra : rebase_source : dc8e4217f5832b15e8f7287c95732bc68d1e1cf5 --- setuptools/command/develop.py | 19 -------- setuptools/command/easy_install.py | 62 +++++++++++++++++++-------- setuptools/tests/test_develop.py | 9 ++-- setuptools/tests/test_easy_install.py | 12 ++++-- 4 files changed, 56 insertions(+), 46 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index d88d0990ce..93b7773ccc 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -35,25 +35,6 @@ def initialize_options(self): self.always_copy_from = '.' # always copy eggs installed in curdir - def _expand_attrs(self, attrs): - for attr in attrs: - val = getattr(self, attr) - if val is not None: - if os.name == 'posix' or os.name == 'nt': - val = os.path.expanduser(val) - val = subst_vars(val, self.config_vars) - setattr(self, attr, val) - - def expand_basedirs(self): - """Calls `os.path.expanduser` on install_base, install_platbase and - root.""" - self._expand_attrs(['install_base', 'install_platbase', 'root']) - - def expand_dirs(self): - """Calls `os.path.expanduser` on install dirs.""" - self._expand_attrs(['install_purelib', 'install_platlib', - 'install_lib', 'install_headers', - 'install_scripts', 'install_data',]) def finalize_options(self): ei = self.get_finalized_command("egg_info") diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d709806030..134f1b8066 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -17,13 +17,19 @@ from distutils.util import convert_path, subst_vars from distutils.sysconfig import get_python_lib, get_config_vars from distutils.errors import DistutilsArgError, DistutilsOptionError, \ - DistutilsError + DistutilsError, DistutilsPlatformError from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS from setuptools.archive_util import unpack_archive -from setuptools.package_index import PackageIndex, parse_bdist_wininst +from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info -from pkg_resources import * +from pkg_resources import yield_lines, normalize_path, resource_string, \ + ensure_directory, get_distribution, find_distributions, \ + Environment, Requirement, Distribution, \ + PathMetadata, EggMetadata, WorkingSet, \ + DistributionNotFound, VersionConflict, \ + DEVELOP_DIST + sys_executable = os.path.normpath(sys.executable) __all__ = [ @@ -31,15 +37,8 @@ 'main', 'get_exe_prefixes', ] - -if sys.version < "2.6": - USER_BASE = None - USER_SITE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True +import site +HAS_USER_SITE = not sys.version < "2.6" def samefile(p1,p2): if hasattr(os.path,'samefile') and ( @@ -112,7 +111,7 @@ class easy_install(Command): if HAS_USER_SITE: user_options.append(('user', None, - "install in user site-package '%s'" % USER_SITE)) + "install in user site-package '%s'" % site.USER_SITE)) boolean_options.append('user') @@ -140,8 +139,8 @@ def initialize_options(self): self.install_data = None self.install_base = None self.install_platbase = None - self.install_userbase = USER_BASE - self.install_usersite = USER_SITE + self.install_userbase = site.USER_BASE + self.install_usersite = site.USER_SITE # Options not specifiable via command line self.package_index = None @@ -209,10 +208,9 @@ def finalize_options(self): else: self.select_scheme(os.name + "_user") - if self.user and self.install_purelib: - self.install_dir = self.install_purelib - self.script_dir = self.install_scripts - + self.expand_basedirs() + self.expand_dirs() + self._expand('install_dir','script_dir','build_directory','site_dirs') # If a non-default installation directory was specified, default the # script directory to match it. @@ -229,6 +227,10 @@ def finalize_options(self): self.set_undefined_options('install_scripts', ('install_dir', 'script_dir') ) + + if self.user and self.install_purelib: + self.install_dir = self.install_purelib + self.script_dir = self.install_scripts # default --record from the install command self.set_undefined_options('install', ('record', 'record')) normpath = map(normalize_path, sys.path) @@ -294,6 +296,27 @@ def finalize_options(self): self.outputs = [] + + def _expand_attrs(self, attrs): + for attr in attrs: + val = getattr(self, attr) + if val is not None: + if os.name == 'posix' or os.name == 'nt': + val = os.path.expanduser(val) + val = subst_vars(val, self.config_vars) + setattr(self, attr, val) + + def expand_basedirs(self): + """Calls `os.path.expanduser` on install_base, install_platbase and + root.""" + self._expand_attrs(['install_base', 'install_platbase', 'root']) + + def expand_dirs(self): + """Calls `os.path.expanduser` on install dirs.""" + self._expand_attrs(['install_purelib', 'install_platlib', + 'install_lib', 'install_headers', + 'install_scripts', 'install_data',]) + def run(self): if self.verbose<>self.distribution.verbose: log.set_verbosity(self.verbose) @@ -337,6 +360,7 @@ def warn_deprecated_options(self): def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" + print 'install_dir', self.install_dir instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir,'easy-install.pth') diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 315c1ac802..10b2be9e73 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -28,9 +28,9 @@ def setUp(self): os.chdir(self.dir) if sys.version >= "2.6": self.old_base = site.USER_BASE - site.USER_BASE = easy_install_pkg.USER_BASE = tempfile.mkdtemp() + site.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE - site.USER_SITE = easy_install_pkg.USER_SITE = tempfile.mkdtemp() + site.USER_SITE = tempfile.mkdtemp() def tearDown(self): os.chdir(self.old_cwd) @@ -38,8 +38,8 @@ def tearDown(self): if sys.version >= "2.6": shutil.rmtree(site.USER_BASE) shutil.rmtree(site.USER_SITE) - easy_install_pkg.USER_BASE = site.USER_BASE = self.old_base - easy_install_pkg.USER_SITE = site.USER_SITE = self.old_site + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site def test_develop(self): if sys.version < "2.6": @@ -49,6 +49,7 @@ def test_develop(self): cmd = develop(dist) cmd.user = 1 cmd.ensure_finalized() + cmd.install_dir = site.USER_SITE cmd.user = 1 old_stdout = sys.stdout sys.stdout = StringIO() diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index be1513cc98..071ba51368 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -3,6 +3,7 @@ import sys import os, shutil, tempfile, unittest import site +from StringIO import StringIO from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -124,9 +125,9 @@ def setUp(self): os.chdir(self.dir) if sys.version >= "2.6": self.old_base = site.USER_BASE - site.USER_BASE = easy_install_pkg.USER_BASE = tempfile.mkdtemp() + site.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE - site.USER_SITE = easy_install_pkg.USER_SITE = tempfile.mkdtemp() + site.USER_SITE = tempfile.mkdtemp() def tearDown(self): os.chdir(self.old_cwd) @@ -134,16 +135,19 @@ def tearDown(self): if sys.version >= "2.6": shutil.rmtree(site.USER_BASE) shutil.rmtree(site.USER_SITE) - easy_install_pkg.USER_BASE = site.USER_BASE = self.old_base - easy_install_pkg.USER_SITE = site.USER_SITE = self.old_site + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site def test_install(self): + #XXX: replace with something meaningfull + return if sys.version < "2.6": return dist = Distribution() dist.script_name = 'setup.py' cmd = easy_install(dist) cmd.user = 1 + cmd.args = ['py'] cmd.ensure_finalized() cmd.user = 1 old_stdout = sys.stdout From 16a89c229e8b67af66d6951bcd4146ea4bf091da Mon Sep 17 00:00:00 2001 From: nibrahim Date: Mon, 22 Feb 2010 16:21:06 -0500 Subject: [PATCH 2869/8469] --help install command no longer tries to install fixes #121 --HG-- branch : distribute extra : rebase_source : 11dab4d1ff0d41ef9b7e808ce7e41592b18a7270 --- CHANGES.txt | 1 + CONTRIBUTORS.txt | 1 + setup.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b16ad40f63..7d1ff00320 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ CHANGES * Issue 15 and 48: Introduced a socket timeout of 15 seconds on url openings * Added indexsidebar.html into MANIFEST.in * Issue 108: Fixed TypeError with Python3.1 +* Issue 121: Fixed --help install command trying to actually install. ------ 0.6.10 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index bc2b3fe73a..da9e021974 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -10,6 +10,7 @@ Contributors * Jannis Leidel * Lennart Regebro * Martin von Löwis +* Noufal Ibrahim * Philip Jenvey * Reinout van Rees * Tarek Ziadé diff --git a/setup.py b/setup.py index b8612b5cd9..064c2afd7a 100755 --- a/setup.py +++ b/setup.py @@ -82,7 +82,9 @@ def _being_installed(): # Installed by buildout, don't mess with a global setuptools. return False # easy_install marker - return 'install' in sys.argv[1:] or _easy_install_marker() + if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: # Don't bother doing anything if they're just asking for help + return False + return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): from distribute_setup import _before_install From 2762c22f7a4dd3a288c04bb10af98605114bb08e Mon Sep 17 00:00:00 2001 From: nibrahim Date: Mon, 22 Feb 2010 18:17:37 -0500 Subject: [PATCH 2870/8469] Added an os.makedirs so that Tarek's solution will work --HG-- branch : distribute extra : rebase_source : 91e7070818115d6ff2bcbf6db1912788e70b8d59 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7d1ff00320..eeab73c642 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ CHANGES * Added indexsidebar.html into MANIFEST.in * Issue 108: Fixed TypeError with Python3.1 * Issue 121: Fixed --help install command trying to actually install. +* Issue 112: Added an os.makedirs so that Tarek's solution will work. ------ 0.6.10 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 421d0c09cc..366ac7bcf8 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -9,7 +9,7 @@ __ http://peak.telecommunity.com/DevCenter/EasyInstall """ -import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob from setuptools import Command from setuptools.sandbox import run_setup @@ -360,6 +360,7 @@ def check_pth_processing(self): ok_exists = os.path.exists(ok_file) try: if ok_exists: os.unlink(ok_file) + os.makedirs(os.path.dirname(ok_file)) f = open(pth_file,'w') except (OSError,IOError): self.cant_write_to_target() From 98075501e10ea81e40f9f0e5aff17083d0ff96aa Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Tue, 23 Feb 2010 00:24:49 +0000 Subject: [PATCH 2871/8469] Issue 6292: for the moment at least, the test suite passes if run with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch. --- tests/test_build_py.py | 13 +++++++++++-- tests/test_extension.py | 17 ++++++++++++----- tests/test_install_lib.py | 17 +++++++++++------ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 472591dc09..3c8bc41bae 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -16,7 +16,7 @@ class BuildPyTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def test_package_data(self): + def _setup_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") f.write("# Pretend this is a package.") @@ -52,10 +52,19 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) + return files + + def test_package_data(self): + files = self._setup_package_data() self.assertTrue("__init__.py" in files) - self.assertTrue("__init__.pyc" in files) self.assertTrue("README.txt" in files) + @unittest.skipIf(sys.flags.optimize >= 2, + "pyc files are not written with -O2 and above") + def test_package_data_pyc(self): + files = self._setup_package_data() + self.assertTrue("__init__.pyc" in files) + def test_empty_package_dir (self): # See SF 1668596/1720897. cwd = os.getcwd() diff --git a/tests/test_extension.py b/tests/test_extension.py index cffa9a0915..0b5dfb826f 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,6 +1,7 @@ """Tests for distutils.extension.""" -import unittest import os +import sys +import unittest import warnings from test.test_support import check_warnings @@ -32,16 +33,22 @@ def test_read_setup_file(self): self.assertEquals(names, wanted) - def test_extension_init(self): - # the first argument, which is the name, must be a string + @unittest.skipIf(sys.flags.optimize >= 2, + "Assertions are omitted with -O2 and above") + def test_extension_init_assertions(self): + # The first argument, which is the name, must be a string. self.assertRaises(AssertionError, Extension, 1, []) - ext = Extension('name', []) - self.assertEquals(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) + + def test_extension_init(self): + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') + + ext = Extension('name', ['file1', 'file2']) self.assertEquals(ext.sources, ['file1', 'file2']) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 99a6d90627..13d27abac0 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -1,6 +1,6 @@ """Tests for distutils.command.install_data.""" -import sys import os +import sys import unittest from distutils.command.install_lib import install_lib @@ -31,9 +31,7 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) - @unittest.skipUnless(not sys.dont_write_bytecode, - 'byte-compile not supported') - def test_byte_compile(self): + def _setup_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) cmd.compile = cmd.optimize = 1 @@ -41,8 +39,15 @@ def test_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + return pkg_dir + + @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not enabled') + def test_byte_compile(self): + pkg_dir = self._setup_byte_compile() + if sys.flags.optimize < 1: + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + else: + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() From b9da3bd8418678235816f840f4cd86c68527097a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Feb 2010 20:03:59 -0500 Subject: [PATCH 2872/8469] Added test to capture issue #118 --HG-- branch : distribute extra : rebase_source : 5c247cafcbecb311469147a46f7f82df47ea5341 --- setuptools/tests/test_sandbox.py | 47 ++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 1b0dc4eaba..8b9e08e65d 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -6,7 +6,20 @@ import unittest import tempfile -from setuptools.sandbox import DirectorySandbox +from setuptools.sandbox import DirectorySandbox, SandboxViolation + +def has_win32com(): + """ + Run this to determine if the local machine has win32com, and if it + does, include additional tests. + """ + if not sys.platform.startswith('win32'): + return False + try: + mod = __import__('win32com') + except ImportError: + return False + return True class TestSandbox(unittest.TestCase): @@ -18,11 +31,33 @@ def tearDown(self): def test_devnull(self): sandbox = DirectorySandbox(self.dir) + sandbox.run(self._file_writer(os.devnull)) - def _write(): - f = open(os.devnull, 'w') + @staticmethod + def _file_writer(path): + def do_write(): + f = open(path, 'w') f.write('xxx') f.close() - - sandbox.run(_write) - + return do_write + + + if has_win32com(): + def test_win32com(self): + """ + win32com should not be prevented from caching COM interfaces + in gen_py. + """ + import win32com + gen_py = win32com.__gen_path__ + target = os.path.join(gen_py, 'test_write') + sandbox = DirectorySandbox(self.dir) + try: + sandbox.run(self._file_writer(target)) + except SandboxViolation: + self.fail("Could not create gen_py file due to SandboxViolation") + finally: + if os.path.exists(target): os.remove(target) + +if __name__ == '__main__': + unittest.main() From aac05903b0f3f790dbdd01e413a497ecf00cc1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 23 Feb 2010 04:57:05 +0000 Subject: [PATCH 2873/8469] removed debugging code --- command/install.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index 60e4df0fea..fb17b4f6ea 100644 --- a/command/install.py +++ b/command/install.py @@ -499,10 +499,7 @@ def _expand_attrs(self, attrs): if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - try: - val = _subst_vars(val, self.config_vars) - except: - import pdb; pdb.set_trace() + val = _subst_vars(val, self.config_vars) setattr(self, attr, val) def expand_basedirs(self): From 8943dd0fe879512f88742a42893da24553cca38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 23 Feb 2010 05:03:26 +0000 Subject: [PATCH 2874/8469] Merged revisions 78354 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78354 | tarek.ziade | 2010-02-22 23:57:05 -0500 (Mon, 22 Feb 2010) | 1 line removed debugging code ........ --- command/install.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/install.py b/command/install.py index cfebeeabd7..31d0387195 100644 --- a/command/install.py +++ b/command/install.py @@ -499,10 +499,7 @@ def _expand_attrs(self, attrs): if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - try: - val = _subst_vars(val, self.config_vars) - except: - import pdb; pdb.set_trace() + val = _subst_vars(val, self.config_vars) setattr(self, attr, val) def expand_basedirs(self): From 0d43be6127018ead86b1a3f2d20a9f97a85c92f3 Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Wed, 24 Feb 2010 01:46:21 +0000 Subject: [PATCH 2875/8469] Merged revisions 78351 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines Issue 6292: for the moment at least, the test suite passes if run with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch. ........ --- tests/test_build_py.py | 13 +++++++++++-- tests/test_extension.py | 17 ++++++++++++----- tests/test_install_lib.py | 17 +++++++++++------ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 3e45f6e89e..61e213a586 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -16,7 +16,7 @@ class BuildPyTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def test_package_data(self): + def _setup_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") f.write("# Pretend this is a package.") @@ -52,10 +52,19 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) + return files + + def test_package_data(self): + files = self._setup_package_data() self.assertTrue("__init__.py" in files) - self.assertTrue("__init__.pyc" in files) self.assertTrue("README.txt" in files) + @unittest.skipIf(sys.flags.optimize >= 2, + "pyc files are not written with -O2 and above") + def test_package_data_pyc(self): + files = self._setup_package_data() + self.assertTrue("__init__.pyc" in files) + def test_empty_package_dir (self): # See SF 1668596/1720897. cwd = os.getcwd() diff --git a/tests/test_extension.py b/tests/test_extension.py index 9d3cfe6f18..857284dd55 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,6 +1,7 @@ """Tests for distutils.extension.""" -import unittest import os +import sys +import unittest import warnings from test.support import check_warnings @@ -32,16 +33,22 @@ def test_read_setup_file(self): self.assertEquals(names, wanted) - def test_extension_init(self): - # the first argument, which is the name, must be a string + @unittest.skipIf(sys.flags.optimize >= 2, + "Assertions are omitted with -O2 and above") + def test_extension_init_assertions(self): + # The first argument, which is the name, must be a string. self.assertRaises(AssertionError, Extension, 1, []) - ext = Extension('name', []) - self.assertEquals(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) + + def test_extension_init(self): + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') + + ext = Extension('name', ['file1', 'file2']) self.assertEquals(ext.sources, ['file1', 'file2']) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 99a6d90627..13d27abac0 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -1,6 +1,6 @@ """Tests for distutils.command.install_data.""" -import sys import os +import sys import unittest from distutils.command.install_lib import install_lib @@ -31,9 +31,7 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) - @unittest.skipUnless(not sys.dont_write_bytecode, - 'byte-compile not supported') - def test_byte_compile(self): + def _setup_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) cmd.compile = cmd.optimize = 1 @@ -41,8 +39,15 @@ def test_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + return pkg_dir + + @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not enabled') + def test_byte_compile(self): + pkg_dir = self._setup_byte_compile() + if sys.flags.optimize < 1: + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + else: + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() From fa53c90a8e494240036abe332b3a0d4c1376ddd7 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 1 Mar 2010 22:10:45 +0000 Subject: [PATCH 2876/8469] Bump to 2.6.5 rc 1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b37308c578..8c2ab8f3e5 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.4" +__version__ = "2.6.5rc1" #--end constants-- From 2cb36ad98366b3cad72f2be6b7a55fb51b43677c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Mar 2010 18:02:00 -0500 Subject: [PATCH 2877/8469] Worked out a fix for failing sandbox errors in Windows. Fixes #118. --HG-- branch : distribute extra : rebase_source : 69c8e59604f9d711cd29bb55e9edd3caab2b36a0 --- setuptools/sandbox.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 502598ca4d..630d5792b5 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -154,6 +154,12 @@ def _remap_pair(self,operation,src,dst,*args,**kw): _EXCEPTIONS = [os.devnull,] +try: + gen_py = os.path.dirname(__import__('win32com.gen_py', fromlist=['__name__']).__file__) + _EXCEPTIONS.append(gen_py) +except ImportError: + pass + class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" @@ -165,7 +171,7 @@ class DirectorySandbox(AbstractSandbox): def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) self._prefix = os.path.join(self._sandbox,'') - self._exceptions = exceptions + self._exceptions = [os.path.normcase(os.path.realpath(path)) for path in exceptions] AbstractSandbox.__init__(self) def _violation(self, operation, *args, **kw): @@ -190,12 +196,16 @@ def _ok(self,path): try: self._active = False realpath = os.path.normcase(os.path.realpath(path)) - if (realpath in self._exceptions or realpath == self._sandbox + if (self._exempted(realpath) or realpath == self._sandbox or realpath.startswith(self._prefix)): return True finally: self._active = active + def _exempted(self, filepath): + exception_matches = map(filepath.startswith, self._exceptions) + return any(exception_matches) + def _remap_input(self,operation,path,*args,**kw): """Called for path inputs""" if operation in self.write_ops and not self._ok(path): From 687b1f10c00ef4970614a1450a74b8a9e3f5b9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 5 Mar 2010 00:16:02 +0000 Subject: [PATCH 2878/8469] reverting partially distutils to its 2.6.x state so 2.7a4 looks more like the 2.7b1 in this. the whole revert will occur after a4 is tagged --- command/build_ext.py | 200 +++++------- command/install.py | 227 ++++++------- cygwinccompiler.py | 220 ++++++++----- emxccompiler.py | 35 +- extension.py | 71 ++-- sysconfig.py | 591 +++++++++++++++++++++++++++++----- tests/test_cygwinccompiler.py | 111 ------- tests/test_emxccompiler.py | 33 -- tests/test_extension.py | 78 ----- tests/test_install.py | 173 +--------- tests/test_unixccompiler.py | 8 +- tests/test_util.py | 260 +-------------- unixccompiler.py | 29 +- util.py | 355 ++++++++++++-------- 14 files changed, 1157 insertions(+), 1234 deletions(-) delete mode 100644 tests/test_cygwinccompiler.py delete mode 100644 tests/test_emxccompiler.py delete mode 100755 tests/test_extension.py diff --git a/command/build_ext.py b/command/build_ext.py index 420d7f171d..8248089fec 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,27 +4,21 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -__revision__ = "$Id$" +# This module should be kept compatible with Python 2.1. -import sys, os, re -from warnings import warn +__revision__ = "$Id$" -from distutils.util import get_platform +import sys, os, string, re +from types import * +from site import USER_BASE, USER_SITE from distutils.core import Command from distutils.errors import * -from distutils.ccompiler import customize_compiler +from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils.util import get_platform from distutils import log -# this keeps compatibility from 2.3 to 2.5 -if sys.version < "2.6": - USER_BASE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - HAS_USER_SITE = True - if os.name == 'nt': from distutils.msvccompiler import get_build_version MSVC_VERSION = int(get_build_version()) @@ -40,7 +34,7 @@ def show_compilers (): show_compilers() -class build_ext(Command): +class build_ext (Command): description = "build C/C++ extensions (compile/link to build directory)" @@ -100,55 +94,18 @@ class build_ext(Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), + ('user', None, + "add user include, library and rpath"), ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] - - if HAS_USER_SITE: - user_options.append(('user', None, - "add user include, library and rpath")) - boolean_options.append('user') + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] help_options = [ ('help-compiler', None, "list available compilers", show_compilers), ] - - # making 'compiler' a property to deprecate - # its usage as something else than a compiler type - # e.g. like a compiler instance - def __init__(self, dist): - self._compiler = None - Command.__init__(self, dist) - - def __setattr__(self, name, value): - # need this to make sure setattr() (used in distutils) - # doesn't kill our property - if name == 'compiler': - self._set_compiler(value) - else: - self.__dict__[name] = value - - def _set_compiler(self, compiler): - if not isinstance(compiler, str) and compiler is not None: - # we don't want to allow that anymore in the future - warn("'compiler' specifies the compiler type in build_ext. " - "If you want to get the compiler object itself, " - "use 'compiler_obj'", DeprecationWarning) - self._compiler = compiler - - def _get_compiler(self): - if not isinstance(self._compiler, str) and self._compiler is not None: - # we don't want to allow that anymore in the future - warn("'compiler' specifies the compiler type in build_ext. " - "If you want to get the compiler object itself, " - "use 'compiler_obj'", DeprecationWarning) - return self._compiler - - compiler = property(_get_compiler, _set_compiler) - - def initialize_options(self): + def initialize_options (self): self.extensions = None self.build_lib = None self.plat_name = None @@ -172,7 +129,8 @@ def initialize_options(self): self.user = None def finalize_options(self): - _sysconfig = __import__('sysconfig') + from distutils import sysconfig + self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), @@ -189,8 +147,8 @@ def finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. - py_include = _sysconfig.get_path('include') - plat_py_include = _sysconfig.get_path('platinclude') + py_include = sysconfig.get_python_inc() + plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): @@ -211,13 +169,13 @@ def finalize_options(self): self.libraries = [] if self.library_dirs is None: self.library_dirs = [] - elif isinstance(self.library_dirs, str): - self.library_dirs = self.library_dirs.split(os.pathsep) + elif type(self.library_dirs) is StringType: + self.library_dirs = string.split(self.library_dirs, os.pathsep) if self.rpath is None: self.rpath = [] - elif isinstance(self.rpath, str): - self.rpath = self.rpath.split(os.pathsep) + elif type(self.rpath) is StringType: + self.rpath = string.split(self.rpath, os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. @@ -268,7 +226,7 @@ def finalize_options(self): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + _sysconfig.get_python_version(), + "python" + get_python_version(), "config")) else: # building python standard extensions @@ -276,13 +234,13 @@ def finalize_options(self): # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - _sysconfig.get_config_var('Py_ENABLE_SHARED') + sysconfig.get_config_var('Py_ENABLE_SHARED') if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) - and _sysconfig.get_config_var('Py_ENABLE_SHARED')): + and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions - self.library_dirs.append(_sysconfig.get_config_var('LIBDIR')) + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') @@ -294,7 +252,7 @@ def finalize_options(self): if self.define: defines = self.define.split(',') - self.define = [(symbol, '1') for symbol in defines] + self.define = map(lambda symbol: (symbol, '1'), defines) # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also @@ -345,50 +303,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - - # used to prevent the usage of an existing compiler for the - # compiler option when calling new_compiler() - # this will be removed in 3.3 and 2.8 - if not isinstance(self._compiler, str): - self._compiler = None - - self.compiler_obj = new_compiler(compiler=self._compiler, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - - # used to keep the compiler object reachable with - # "self.compiler". this will be removed in 3.3 and 2.8 - self._compiler = self.compiler_obj - - customize_compiler(self.compiler_obj) + self.compiler = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler_obj.initialize(self.plat_name) + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler_obj.set_include_dirs(self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler_obj.define_macro(name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler_obj.undefine_macro(macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler_obj.set_libraries(self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler_obj.set_library_dirs(self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler_obj.set_runtime_library_dirs(self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler_obj.set_link_objects(self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -500,17 +446,11 @@ def build_extensions(self): self.check_extensions_list(self.extensions) for ext in self.extensions: - try: - self.build_extension(ext) - except (CCompilerError, DistutilsError, CompileError), e: - if not ext.optional: - raise - self.warn('building extension "%s" failed: %s' % - (ext.name, e)) + self.build_extension(ext) def build_extension(self, ext): sources = ext.sources - if sources is None or not isinstance(sources, (list, tuple)): + if sources is None or type(sources) not in (ListType, TupleType): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + @@ -550,13 +490,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler_obj.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -577,9 +517,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler_obj.detect_language(sources) + language = ext.language or self.compiler.detect_language(sources) - self.compiler_obj.link_shared_object( + self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -591,12 +531,14 @@ def build_extension(self, ext): target_lang=language) - def swig_sources(self, sources, extension): + def swig_sources (self, sources, extension): + """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ + new_sources = [] swig_sources = [] swig_targets = {} @@ -645,7 +587,9 @@ def swig_sources(self, sources, extension): return new_sources - def find_swig(self): + # swig_sources () + + def find_swig (self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. @@ -674,6 +618,8 @@ def find_swig(self): ("I don't know how to find (much less run) SWIG " "on platform '%s'") % os.name + # find_swig () + # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) def get_ext_fullpath(self, ext_name): @@ -682,9 +628,14 @@ def get_ext_fullpath(self, ext_name): The file is located in `build_lib` or directly in the package (inplace option). """ + # makes sure the extension name is only using dots + all_dots = string.maketrans('/'+os.sep, '..') + ext_name = ext_name.translate(all_dots) + fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') - filename = self.get_ext_filename(modpath[-1]) + filename = self.get_ext_filename(ext_name) + filename = os.path.split(filename)[-1] if not self.inplace: # no further work needed @@ -717,18 +668,18 @@ def get_ext_filename(self, ext_name): of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - _sysconfig = __import__('sysconfig') - ext_path = ext_name.split('.') + from distutils.sysconfig import get_config_var + ext_path = string.split(ext_name, '.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows - so_ext = _sysconfig.get_config_var('SO') + so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return os.path.join(*ext_path) + '_d' + so_ext + return apply(os.path.join, ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext - def get_export_symbols(self, ext): + def get_export_symbols (self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "init" + module_name. Only relevant on Windows, where @@ -739,7 +690,7 @@ def get_export_symbols(self, ext): ext.export_symbols.append(initfunc_name) return ext.export_symbols - def get_libraries(self, ext): + def get_libraries (self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows and OS/2, we add the Python library (eg. python20.dll). @@ -751,7 +702,7 @@ def get_libraries(self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler_obj, MSVCCompiler): + if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' @@ -783,13 +734,14 @@ def get_libraries(self, ext): # extensions, it is a reference to the original list return ext.libraries + [pythonlib] elif sys.platform[:6] == "atheos": - _sysconfig = __import__('sysconfig') + from distutils import sysconfig + template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) # Get SHLIBS from Makefile extra = [] - for lib in _sysconfig.get_config_var('SHLIBS').split(): + for lib in sysconfig.get_config_var('SHLIBS').split(): if lib.startswith('-l'): extra.append(lib[2:]) else: @@ -803,11 +755,13 @@ def get_libraries(self, ext): return ext.libraries else: - _sysconfig = __import__('sysconfig') - if _sysconfig.get_config_var('Py_ENABLE_SHARED'): + from distutils import sysconfig + if sysconfig.get_config_var('Py_ENABLE_SHARED'): template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) return ext.libraries + [pythonlib] else: return ext.libraries + +# class build_ext diff --git a/command/install.py b/command/install.py index fb17b4f6ea..44c76926ea 100644 --- a/command/install.py +++ b/command/install.py @@ -2,22 +2,26 @@ Implements the Distutils 'install' command.""" -__revision__ = "$Id$" +from distutils import log -import sys -import os +# This module should be kept compatible with Python 2.1. -from sysconfig import get_config_vars, get_paths, get_path, get_config_var +__revision__ = "$Id$" -from distutils import log +import sys, os, string +from types import * from distutils.core import Command from distutils.debug import DEBUG +from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, change_root, get_platform +from distutils.util import convert_path, subst_vars, change_root +from distutils.util import get_platform from distutils.errors import DistutilsOptionError +from site import USER_BASE +from site import USER_SITE + -# kept for backward compat, will be removed in 3.2 if sys.version < "2.2": WINDOWS_SCHEME = { 'purelib': '$base', @@ -95,19 +99,13 @@ }, } +# The keys to an installation scheme; if any new types of files are to be +# installed, be sure to add an entry to every installation scheme above, +# and to SCHEME_KEYS here. SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') -# end of backward compat -def _subst_vars(s, local_vars): - try: - return s.format(**local_vars) - except KeyError: - try: - return s.format(**os.environ) - except KeyError, var: - raise AttributeError('{%s}' % var) -class install(Command): +class install (Command): description = "install everything from build directory" @@ -119,6 +117,8 @@ class install(Command): "(Unix only) prefix for platform-specific files"), ('home=', None, "(Unix only) home directory to install under"), + ('user', None, + "install in user site-package '%s'" % USER_SITE), # Or, just set the base director(y|ies) ('install-base=', None, @@ -170,17 +170,12 @@ class install(Command): "filename in which to record list of installed files"), ] - boolean_options = ['compile', 'force', 'skip-build'] - - user_options.append(('user', None, - "install in user site-package '%s'" % \ - get_path('purelib', '%s_user' % os.name))) - boolean_options.append('user') + boolean_options = ['compile', 'force', 'skip-build', 'user'] negative_opt = {'no-compile' : 'compile'} - def initialize_options(self): - """Initializes options.""" + def initialize_options (self): + # High-level options: these select both an installation base # and scheme. self.prefix = None @@ -205,8 +200,8 @@ def initialize_options(self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None - self.install_userbase = get_config_var('userbase') - self.install_usersite = get_path('purelib', '%s_user' % os.name) + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE self.compile = None self.optimize = None @@ -256,8 +251,8 @@ def initialize_options(self): # party Python modules on various platforms given a wide # array of user input is decided. Yes, it's quite complex!) - def finalize_options(self): - """Finalizes options.""" + def finalize_options (self): + # This method (and its pliant slaves, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and @@ -315,10 +310,8 @@ def finalize_options(self): # $platbase in the other installation directories and not worry # about needing recursive variable expansion (shudder). - py_version = sys.version.split()[0] - prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', - 'srcdir') - + py_version = (string.split(sys.version))[0] + (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), @@ -329,11 +322,9 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, - 'srcdir': srcdir, + 'userbase': self.install_userbase, + 'usersite': self.install_usersite, } - - self.config_vars['userbase'] = self.install_userbase - self.config_vars['usersite'] = self.install_usersite self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") @@ -399,27 +390,29 @@ def finalize_options(self): # Punt on doc directories for now -- after all, we're punting on # documentation completely! - def dump_dirs(self, msg): - """Dumps the list of user options.""" - if not DEBUG: - return - from distutils.fancy_getopt import longopt_xlate - log.debug(msg + ":") - for opt in self.user_options: - opt_name = opt[0] - if opt_name[-1] == "=": - opt_name = opt_name[0:-1] - if opt_name in self.negative_opt: - opt_name = self.negative_opt[opt_name] - opt_name = opt_name.translate(longopt_xlate) - val = not getattr(self, opt_name) - else: - opt_name = opt_name.translate(longopt_xlate) - val = getattr(self, opt_name) - log.debug(" %s: %s" % (opt_name, val)) + # finalize_options () + + + def dump_dirs (self, msg): + if DEBUG: + from distutils.fancy_getopt import longopt_xlate + print msg + ":" + for opt in self.user_options: + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + if opt_name in self.negative_opt: + opt_name = string.translate(self.negative_opt[opt_name], + longopt_xlate) + val = not getattr(self, opt_name) + else: + opt_name = string.translate(opt_name, longopt_xlate) + val = getattr(self, opt_name) + print " %s: %s" % (opt_name, val) + + + def finalize_unix (self): - def finalize_unix(self): - """Finalizes options for posix platforms.""" if self.install_base is not None or self.install_platbase is not None: if ((self.install_lib is None and self.install_purelib is None and @@ -437,10 +430,10 @@ def finalize_unix(self): raise DistutilsPlatformError( "User base directory is not specified") self.install_base = self.install_platbase = self.install_userbase - self.select_scheme("posix_user") + self.select_scheme("unix_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("posix_home") + self.select_scheme("unix_home") else: if self.prefix is None: if self.exec_prefix is not None: @@ -456,10 +449,13 @@ def finalize_unix(self): self.install_base = self.prefix self.install_platbase = self.exec_prefix - self.select_scheme("posix_prefix") + self.select_scheme("unix_prefix") + + # finalize_unix () + + + def finalize_other (self): # Windows and Mac OS for now - def finalize_other(self): - """Finalizes options for non-posix platforms""" if self.user: if self.install_userbase is None: raise DistutilsPlatformError( @@ -468,7 +464,7 @@ def finalize_other(self): self.select_scheme(os.name + "_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("posix_home") + self.select_scheme("unix_home") else: if self.prefix is None: self.prefix = os.path.normpath(sys.prefix) @@ -480,58 +476,61 @@ def finalize_other(self): raise DistutilsPlatformError, \ "I don't know how to install stuff on '%s'" % os.name - def select_scheme(self, name): - """Sets the install directories by applying the install schemes.""" + # finalize_other () + + + def select_scheme (self, name): # it's the caller's problem if they supply a bad name! - scheme = get_paths(name, expand=False) - for key, value in scheme.items(): - if key == 'platinclude': - key = 'headers' - value = os.path.join(value, self.distribution.get_name()) + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: attrname = 'install_' + key - if hasattr(self, attrname): - if getattr(self, attrname) is None: - setattr(self, attrname, value) + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) + - def _expand_attrs(self, attrs): + def _expand_attrs (self, attrs): for attr in attrs: val = getattr(self, attr) if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - val = _subst_vars(val, self.config_vars) + val = subst_vars(val, self.config_vars) setattr(self, attr, val) - def expand_basedirs(self): - """Calls `os.path.expanduser` on install_base, install_platbase and - root.""" - self._expand_attrs(['install_base', 'install_platbase', 'root']) - def expand_dirs(self): - """Calls `os.path.expanduser` on install dirs.""" - self._expand_attrs(['install_purelib', 'install_platlib', - 'install_lib', 'install_headers', - 'install_scripts', 'install_data',]) + def expand_basedirs (self): + self._expand_attrs(['install_base', + 'install_platbase', + 'root']) - def convert_paths(self, *names): - """Call `convert_path` over `names`.""" + def expand_dirs (self): + self._expand_attrs(['install_purelib', + 'install_platlib', + 'install_lib', + 'install_headers', + 'install_scripts', + 'install_data',]) + + + def convert_paths (self, *names): for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) - def handle_extra_path(self): - """Set `path_file` and `extra_dirs` using `extra_path`.""" + + def handle_extra_path (self): + if self.extra_path is None: self.extra_path = self.distribution.extra_path if self.extra_path is not None: - if isinstance(self.extra_path, str): - self.extra_path = self.extra_path.split(',') + if type(self.extra_path) is StringType: + self.extra_path = string.split(self.extra_path, ',') if len(self.extra_path) == 1: path_file = extra_dirs = self.extra_path[0] elif len(self.extra_path) == 2: - path_file, extra_dirs = self.extra_path + (path_file, extra_dirs) = self.extra_path else: raise DistutilsOptionError, \ ("'extra_path' option must be a list, tuple, or " @@ -540,6 +539,7 @@ def handle_extra_path(self): # convert to local form in case Unix notation used (as it # should be in setup scripts) extra_dirs = convert_path(extra_dirs) + else: path_file = None extra_dirs = '' @@ -549,14 +549,17 @@ def handle_extra_path(self): self.path_file = path_file self.extra_dirs = extra_dirs - def change_roots(self, *names): - """Change the install direcories pointed by name using root.""" + # handle_extra_path () + + + def change_roots (self, *names): for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) def create_home_path(self): - """Create directories under ~.""" + """Create directories under ~ + """ if not self.user: return home = convert_path(os.path.expanduser("~")) @@ -567,8 +570,8 @@ def create_home_path(self): # -- Command execution methods ------------------------------------- - def run(self): - """Runs the command.""" + def run (self): + # Obviously have to build before we can install if not self.skip_build: self.run_command('build') @@ -611,8 +614,9 @@ def run(self): "you'll have to change the search path yourself"), self.install_lib) - def create_path_file(self): - """Creates the .pth file""" + # run () + + def create_path_file (self): filename = os.path.join(self.install_libbase, self.path_file + ".pth") if self.install_path_file: @@ -625,8 +629,8 @@ def create_path_file(self): # -- Reporting methods --------------------------------------------- - def get_outputs(self): - """Assembles the outputs of all the sub-commands.""" + def get_outputs (self): + # Assemble the outputs of all the sub-commands. outputs = [] for cmd_name in self.get_sub_commands(): cmd = self.get_finalized_command(cmd_name) @@ -642,8 +646,7 @@ def get_outputs(self): return outputs - def get_inputs(self): - """Returns the inputs of all the sub-commands""" + def get_inputs (self): # XXX gee, this looks familiar ;-( inputs = [] for cmd_name in self.get_sub_commands(): @@ -652,29 +655,25 @@ def get_inputs(self): return inputs + # -- Predicates for sub-command list ------------------------------- - def has_lib(self): - """Returns true if the current distribution has any Python + def has_lib (self): + """Return true if the current distribution has any Python modules to install.""" return (self.distribution.has_pure_modules() or self.distribution.has_ext_modules()) - def has_headers(self): - """Returns true if the current distribution has any headers to - install.""" + def has_headers (self): return self.distribution.has_headers() - def has_scripts(self): - """Returns true if the current distribution has any scripts to. - install.""" + def has_scripts (self): return self.distribution.has_scripts() - def has_data(self): - """Returns true if the current distribution has any data to. - install.""" + def has_data (self): return self.distribution.has_data_files() + # 'sub_commands': a list of commands this command might have to run to # get its work done. See cmd.py for more info. sub_commands = [('install_lib', has_lib), @@ -683,3 +682,5 @@ def has_data(self): ('install_data', has_data), ('install_egg_info', lambda self:True), ] + +# class install diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 2a61bd5ad7..2dabc0f0fe 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -45,18 +45,16 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -__revision__ = "$Id$" +# This module should be kept compatible with Python 2.1. -import os -import sys -import copy -import re -from warnings import warn +__revision__ = "$Id$" +import os,sys,copy +from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils.util import get_compiler_versions +from distutils import log def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -81,9 +79,8 @@ def get_msvcr(): raise ValueError("Unknown MS Compiler version %s " % msc_ver) -class CygwinCCompiler(UnixCCompiler): - """ Handles the Cygwin port of the GNU C compiler to Windows. - """ +class CygwinCCompiler (UnixCCompiler): + compiler_type = 'cygwin' obj_extension = ".o" static_lib_extension = ".a" @@ -92,11 +89,11 @@ class CygwinCCompiler(UnixCCompiler): shared_lib_format = "%s%s" exe_extension = ".exe" - def __init__(self, verbose=0, dry_run=0, force=0): + def __init__ (self, verbose=0, dry_run=0, force=0): - UnixCCompiler.__init__(self, verbose, dry_run, force) + UnixCCompiler.__init__ (self, verbose, dry_run, force) - status, details = check_config_h() + (status, details) = check_config_h() self.debug_print("Python's GCC status: %s (details: %s)" % (status, details)) if status is not CONFIG_H_OK: @@ -107,7 +104,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_compiler_versions() + get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -151,8 +148,10 @@ def __init__(self, verbose=0, dry_run=0, force=0): # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() + # __init__ () + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - """Compiles the source by spawing GCC and windres if needed.""" if ext == '.rc' or ext == '.res': # gcc needs '.res' and '.rc' compiled to object files !!! try: @@ -166,11 +165,21 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): except DistutilsExecError, msg: raise CompileError, msg - def link(self, target_desc, objects, output_filename, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None): - """Link the objects.""" + def link (self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or []) @@ -235,44 +244,64 @@ def link(self, target_desc, objects, output_filename, output_dir=None, if not debug: extra_preargs.append("-s") - UnixCCompiler.link(self, target_desc, objects, output_filename, - output_dir, libraries, library_dirs, + UnixCCompiler.link(self, + target_desc, + objects, + output_filename, + output_dir, + libraries, + library_dirs, runtime_library_dirs, None, # export_symbols, we do this in our def-file - debug, extra_preargs, extra_postargs, build_temp, + debug, + extra_preargs, + extra_postargs, + build_temp, target_lang) + # link () + # -- Miscellaneous methods ----------------------------------------- - def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): - """Adds supports for rc and res files.""" - if output_dir is None: - output_dir = '' + # overwrite the one from CCompiler to support rc and res-files + def object_filenames (self, + source_filenames, + strip_dir=0, + output_dir=''): + if output_dir is None: output_dir = '' obj_names = [] for src_name in source_filenames: # use normcase to make sure '.rc' is really '.rc' and not '.RC' - base, ext = os.path.splitext(os.path.normcase(src_name)) + (base, ext) = os.path.splitext (os.path.normcase(src_name)) if ext not in (self.src_extensions + ['.rc','.res']): raise UnknownFileError, \ - "unknown file type '%s' (from '%s')" % (ext, src_name) + "unknown file type '%s' (from '%s')" % \ + (ext, src_name) if strip_dir: base = os.path.basename (base) - if ext in ('.res', '.rc'): + if ext == '.res' or ext == '.rc': # these need to be compiled to object files - obj_names.append (os.path.join(output_dir, - base + ext + self.obj_extension)) + obj_names.append (os.path.join (output_dir, + base + ext + self.obj_extension)) else: - obj_names.append (os.path.join(output_dir, - base + self.obj_extension)) + obj_names.append (os.path.join (output_dir, + base + self.obj_extension)) return obj_names + # object_filenames () + +# class CygwinCCompiler + + # the same as cygwin plus some additional parameters -class Mingw32CCompiler(CygwinCCompiler): - """ Handles the Mingw32 port of the GNU C compiler to Windows. - """ +class Mingw32CCompiler (CygwinCCompiler): + compiler_type = 'mingw32' - def __init__(self, verbose=0, dry_run=0, force=0): + def __init__ (self, + verbose=0, + dry_run=0, + force=0): CygwinCCompiler.__init__ (self, verbose, dry_run, force) @@ -308,6 +337,10 @@ def __init__(self, verbose=0, dry_run=0, force=0): # with MSVC 7.0 or later. self.dll_libraries = get_msvcr() + # __init__ () + +# class Mingw32CCompiler + # Because these compilers aren't configured in Python's pyconfig.h file by # default, we should at least warn the user if he is using a unmodified # version. @@ -317,16 +350,16 @@ def __init__(self, verbose=0, dry_run=0, force=0): CONFIG_H_UNCERTAIN = "uncertain" def check_config_h(): - """Check if the current Python installation appears amenable to building - extensions with GCC. - - Returns a tuple (status, details), where 'status' is one of the following - constants: - - - CONFIG_H_OK: all is well, go ahead and compile - - CONFIG_H_NOTOK: doesn't look good - - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h + """Check if the current Python installation (specifically, pyconfig.h) + appears amenable to building extensions with GCC. Returns a tuple + (status, details), where 'status' is one of the following constants: + CONFIG_H_OK + all is well, go ahead and compile + CONFIG_H_NOTOK + doesn't look good + CONFIG_H_UNCERTAIN + not sure -- unable to read pyconfig.h 'details' is a human-readable string explaining the situation. Note there are two ways to conclude "OK": either 'sys.version' contains @@ -337,45 +370,78 @@ def check_config_h(): # XXX since this function also checks sys.version, it's not strictly a # "pyconfig.h" check -- should probably be renamed... - _sysconfig = __import__('sysconfig') + from distutils import sysconfig + import string + # if sys.version contains GCC then python was compiled with + # GCC, and the pyconfig.h file should be OK + if string.find(sys.version,"GCC") >= 0: + return (CONFIG_H_OK, "sys.version mentions 'GCC'") - # if sys.version contains GCC then python was compiled with GCC, and the - # pyconfig.h file should be OK - if "GCC" in sys.version: - return CONFIG_H_OK, "sys.version mentions 'GCC'" - - # let's see if __GNUC__ is mentioned in python.h - fn = _sysconfig.get_config_h_filename() + fn = sysconfig.get_config_h_filename() try: - with open(fn) as config_h: - if "__GNUC__" in config_h.read(): - return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn - else: - return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn + # It would probably better to read single lines to search. + # But we do this only once, and it is fast enough + f = open(fn) + s = f.read() + f.close() + except IOError, exc: + # if we can't read this file, we cannot say it is wrong + # the compiler will complain later about this file as missing return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -class _Deprecated_SRE_Pattern(object): - def __init__(self, pattern): - self.pattern = pattern + else: + # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar + if string.find(s,"__GNUC__") >= 0: + return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) + else: + return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) - def __getattr__(self, name): - if name in ('findall', 'finditer', 'match', 'scanner', 'search', - 'split', 'sub', 'subn'): - warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " - "and will be removed in the next version", DeprecationWarning) - return getattr(self.pattern, name) -RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. - - If not possible it returns None for it. + If not possible it returns None for it. """ - warn("'distutils.cygwinccompiler.get_versions' is deprecated " - "use 'distutils.util.get_compiler_versions' instead", - DeprecationWarning) - - return get_compiler_versions() + from distutils.version import LooseVersion + from distutils.spawn import find_executable + import re + + gcc_exe = find_executable('gcc') + if gcc_exe: + out = os.popen(gcc_exe + ' -dumpversion','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + if result: + gcc_version = LooseVersion(result.group(1)) + else: + gcc_version = None + else: + gcc_version = None + ld_exe = find_executable('ld') + if ld_exe: + out = os.popen(ld_exe + ' -v','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + if result: + ld_version = LooseVersion(result.group(1)) + else: + ld_version = None + else: + ld_version = None + dllwrap_exe = find_executable('dllwrap') + if dllwrap_exe: + out = os.popen(dllwrap_exe + ' --version','r') + out_string = out.read() + out.close() + result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) + if result: + dllwrap_version = LooseVersion(result.group(1)) + else: + dllwrap_version = None + else: + dllwrap_version = None + return (gcc_version, ld_version, dllwrap_version) diff --git a/emxccompiler.py b/emxccompiler.py index f2f77e52d1..f52e63232d 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -21,13 +21,12 @@ __revision__ = "$Id$" -import os, sys, copy -from warnings import warn - +import os,sys,copy +from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils.util import get_compiler_versions +from distutils import log class EMXCCompiler (UnixCCompiler): @@ -56,8 +55,8 @@ def __init__ (self, ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - gcc_version, ld_version, dllwrap_version = get_compiler_versions() - self.gcc_version, self.ld_version = gcc_version, ld_version + (self.gcc_version, self.ld_version) = \ + get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -294,11 +293,23 @@ def get_versions(): """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - warn("'distutils.emxccompiler.get_versions' is deprecated " - "use 'distutils.util.get_compiler_versions' instead", - DeprecationWarning) - + from distutils.version import StrictVersion + from distutils.spawn import find_executable + import re + + gcc_exe = find_executable('gcc') + if gcc_exe: + out = os.popen(gcc_exe + ' -dumpversion','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+\.\d+)',out_string) + if result: + gcc_version = StrictVersion(result.group(1)) + else: + gcc_version = None + else: + gcc_version = None # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - gcc_version, ld_version, dllwrap_version = get_compiler_versions() - return gcc_version, None + ld_version = None + return (gcc_version, ld_version) diff --git a/extension.py b/extension.py index 244b1e78ec..440d128cdc 100644 --- a/extension.py +++ b/extension.py @@ -5,8 +5,13 @@ __revision__ = "$Id$" -import os -import warnings +import os, string, sys +from types import * + +try: + import warnings +except ImportError: + warnings = None # This class is really only used by the "build_ext" command, so it might # make sense to put it in distutils.command.build_ext. However, that @@ -78,9 +83,6 @@ class Extension: language : string extension language (i.e. "c", "c++", "objc"). Will be detected from the source extensions if not provided. - optional : boolean - specifies that a build failure in the extension should not abort the - build process, but simply not install the failing extension. """ # When adding arguments to this constructor, be sure to update @@ -99,14 +101,12 @@ def __init__ (self, name, sources, swig_opts = None, depends=None, language=None, - optional=None, **kw # To catch unknown keywords ): - if not isinstance(name, str): - raise AssertionError("'name' must be a string") - if not (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)): - raise AssertionError("'sources' must be a list of strings") + assert type(name) is StringType, "'name' must be a string" + assert (type(sources) is ListType and + map(type, sources) == [StringType]*len(sources)), \ + "'sources' must be a list of strings" self.name = name self.sources = sources @@ -123,28 +123,27 @@ def __init__ (self, name, sources, self.swig_opts = swig_opts or [] self.depends = depends or [] self.language = language - self.optional = optional # If there are unknown keyword options, warn about them - if len(kw) > 0: - options = [repr(option) for option in kw] - options = ', '.join(sorted(options)) - msg = "Unknown Extension options: %s" % options - warnings.warn(msg) - -def read_setup_file(filename): - """Reads a Setup file and returns Extension instances.""" - warnings.warn('distutils.extensions.read_setup_file is deprecated. ' - 'It will be removed in the next Python release.') - _sysconfig = __import__('sysconfig') - from distutils.sysconfig import (expand_makefile_vars, - _variable_rx) + if len(kw): + L = kw.keys() ; L.sort() + L = map(repr, L) + msg = "Unknown Extension options: " + string.join(L, ', ') + if warnings is not None: + warnings.warn(msg) + else: + sys.stderr.write(msg + '\n') +# class Extension + +def read_setup_file (filename): + from distutils.sysconfig import \ + parse_makefile, expand_makefile_vars, _variable_rx from distutils.text_file import TextFile from distutils.util import split_quoted # First pass over the file to gather "VAR = VALUE" assignments. - vars = _sysconfig._parse_makefile(filename) + vars = parse_makefile(filename) # Second pass to gobble up the real content: lines of the form # ... [ ...] [ ...] [ ...] @@ -164,11 +163,10 @@ def read_setup_file(filename): file.warn("'%s' lines not handled yet" % line) continue - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - line = expand_makefile_vars(line, vars) - + #print "original line: " + line + line = expand_makefile_vars(line, vars) words = split_quoted(line) + #print "expanded line: " + line # NB. this parses a slightly different syntax than the old # makesetup script: here, there must be exactly one extension per @@ -197,7 +195,7 @@ def read_setup_file(filename): elif switch == "-I": ext.include_dirs.append(value) elif switch == "-D": - equals = value.find("=") + equals = string.find(value, "=") if equals == -1: # bare "-DFOO" -- no value ext.define_macros.append((value, None)) else: # "-DFOO=blah" @@ -234,4 +232,15 @@ def read_setup_file(filename): extensions.append(ext) + #print "module:", module + #print "source files:", source_files + #print "cpp args:", cpp_args + #print "lib args:", library_args + + #extensions[module] = { 'sources': source_files, + # 'cpp_args': cpp_args, + # 'lib_args': library_args } + return extensions + +# read_setup_file () diff --git a/sysconfig.py b/sysconfig.py index a247bc2cd7..54ccec4953 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -7,51 +7,59 @@ Written by: Fred L. Drake, Jr. Email: - -**This module has been moved out of Distutils and will be removed from -Python in the next version (3.3)** """ __revision__ = "$Id$" +import os import re -from warnings import warn - -# importing sysconfig from Lib -# to avoid this module to shadow it -_sysconfig = __import__('sysconfig') - -# names defined here to keep backward compatibility -# for APIs that were relocated -get_python_version = _sysconfig.get_python_version -get_config_h_filename = _sysconfig.get_config_h_filename -parse_config_h = _sysconfig.parse_config_h -get_config_vars = _sysconfig.get_config_vars -get_config_var = _sysconfig.get_config_var -from distutils.ccompiler import customize_compiler - -_DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " - "Use the APIs provided by the sysconfig module instead") - -def _get_project_base(): - return _sysconfig._PROJECT_BASE - -project_base = _get_project_base() +import string +import sys + +from distutils.errors import DistutilsPlatformError + +# These are needed in a couple of spots, so just compute them once. +PREFIX = os.path.normpath(sys.prefix) +EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + +# Path to the base directory of the project. On Windows the binary may +# live in project/PCBuild9. If we're dealing with an x64 Windows build, +# it'll live in project/PCbuild/amd64. +project_base = os.path.dirname(os.path.abspath(sys.executable)) +if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) +# PC/VS7.1 +if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) +# PC/AMD64 +if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) + +# python_build: (Boolean) if true, we're either building Python or +# building an extension with an un-installed Python, so we use +# different (hard-wired) directories. +# Setup.local is available for Makefile builds including VPATH builds, +# Setup.dist is available on Windows +def _python_build(): + for fn in ("Setup.dist", "Setup.local"): + if os.path.isfile(os.path.join(project_base, "Modules", fn)): + return True + return False +python_build = _python_build() -class _DeprecatedBool(int): - def __nonzero__(self): - warn(_DEPRECATION_MSG % 'get_python_version', DeprecationWarning) - return super(_DeprecatedBool, self).__nonzero__() -def _python_build(): - return _DeprecatedBool(_sysconfig.is_python_build()) +def get_python_version(): + """Return a string containing the major and minor Python version, + leaving off the patchlevel. Sample return values could be '1.5' + or '2.2'. + """ + return sys.version[:3] -python_build = _python_build() def get_python_inc(plat_specific=0, prefix=None): - """This function is deprecated. - - Return the directory containing installed Python header files. + """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; @@ -61,22 +69,36 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - warn(_DEPRECATION_MSG % 'get_python_inc', DeprecationWarning) - get_path = _sysconfig.get_path - - if prefix is not None: - vars = {'base': prefix} - return get_path('include', vars=vars) - - if not plat_specific: - return get_path('include') + if prefix is None: + prefix = plat_specific and EXEC_PREFIX or PREFIX + if os.name == "posix": + if python_build: + base = os.path.dirname(os.path.abspath(sys.executable)) + if plat_specific: + inc_dir = base + else: + inc_dir = os.path.join(base, "Include") + if not os.path.exists(inc_dir): + inc_dir = os.path.join(os.path.dirname(base), "Include") + return inc_dir + return os.path.join(prefix, "include", "python" + get_python_version()) + elif os.name == "nt": + return os.path.join(prefix, "include") + elif os.name == "mac": + if plat_specific: + return os.path.join(prefix, "Mac", "Include") + else: + return os.path.join(prefix, "Include") + elif os.name == "os2": + return os.path.join(prefix, "Include") else: - return get_path('platinclude') + raise DistutilsPlatformError( + "I don't know where Python installs its C header files " + "on platform '%s'" % os.name) -def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): - """This function is deprecated. - Return the directory containing the Python library (standard or +def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + """Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing @@ -89,33 +111,146 @@ def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - warn(_DEPRECATION_MSG % 'get_python_lib', DeprecationWarning) - vars = {} - get_path = _sysconfig.get_path - if prefix is not None: - if plat_specific: - vars['platbase'] = prefix + if prefix is None: + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": + libpython = os.path.join(prefix, + "lib", "python" + get_python_version()) + if standard_lib: + return libpython else: - vars['base'] = prefix + return os.path.join(libpython, "site-packages") - if standard_lib: + elif os.name == "nt": + if standard_lib: + return os.path.join(prefix, "Lib") + else: + if get_python_version() < "2.2": + return prefix + else: + return os.path.join(prefix, "Lib", "site-packages") + + elif os.name == "mac": if plat_specific: - return get_path('platstdlib', vars=vars) + if standard_lib: + return os.path.join(prefix, "Lib", "lib-dynload") + else: + return os.path.join(prefix, "Lib", "site-packages") else: - return get_path('stdlib', vars=vars) + if standard_lib: + return os.path.join(prefix, "Lib") + else: + return os.path.join(prefix, "Lib", "site-packages") + + elif os.name == "os2": + if standard_lib: + return os.path.join(prefix, "Lib") + else: + return os.path.join(prefix, "Lib", "site-packages") + else: - if plat_specific: - return get_path('platlib', vars=vars) + raise DistutilsPlatformError( + "I don't know where Python installs its library " + "on platform '%s'" % os.name) + + +def customize_compiler(compiler): + """Do any platform-specific customization of a CCompiler instance. + + Mainly needed on Unix, so we can plug in the information that + varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ + get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + 'CCSHARED', 'LDSHARED', 'SO') + + if 'CC' in os.environ: + cc = os.environ['CC'] + if 'CXX' in os.environ: + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + + cc_cmd = cc + ' ' + cflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, + linker_so=ldshared, + linker_exe=cc) + + compiler.shared_lib_extension = so_ext + + +def get_config_h_filename(): + """Return full pathname of installed pyconfig.h file.""" + if python_build: + if os.name == "nt": + inc_dir = os.path.join(project_base, "PC") else: - return get_path('purelib', vars=vars) + inc_dir = project_base + else: + inc_dir = get_python_inc(plat_specific=1) + if get_python_version() < '2.2': + config_h = 'config.h' + else: + # The name of the config.h file changed in 2.2 + config_h = 'pyconfig.h' + return os.path.join(inc_dir, config_h) + def get_makefile_filename(): - """This function is deprecated. + """Return full pathname of installed Makefile from the Python build.""" + if python_build: + return os.path.join(os.path.dirname(sys.executable), "Makefile") + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + return os.path.join(lib_dir, "config", "Makefile") + - Return full pathname of installed Makefile from the Python build. +def parse_config_h(fp, g=None): + """Parse a config.h-style file. + + A dictionary containing name/value pairs is returned. If an + optional dictionary is passed in as the second argument, it is + used instead of a new dictionary. """ - warn(_DEPRECATION_MSG % 'get_makefile_filename', DeprecationWarning) - return _sysconfig._get_makefile_filename() + if g is None: + g = {} + define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") + undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") + # + while 1: + line = fp.readline() + if not line: + break + m = define_rx.match(line) + if m: + n, v = m.group(1, 2) + try: v = int(v) + except ValueError: pass + g[n] = v + else: + m = undef_rx.match(line) + if m: + g[m.group(1)] = 0 + return g + # Regexes needed for parsing Makefile (and similar syntaxes, # like old-style Setup files). @@ -124,29 +259,91 @@ def get_makefile_filename(): _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") def parse_makefile(fn, g=None): - """This function is deprecated. - - Parse a Makefile-style file. + """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ - warn(_DEPRECATION_MSG % 'parse_makefile', DeprecationWarning) - return _sysconfig._parse_makefile(fn, g) + from distutils.text_file import TextFile + fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) -def expand_makefile_vars(s, vars): - """This function is deprecated. + if g is None: + g = {} + done = {} + notdone = {} - Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in + while 1: + line = fp.readline() + if line is None: # eof + break + m = _variable_rx.match(line) + if m: + n, v = m.group(1, 2) + v = v.strip() + # `$$' is a literal `$' in make + tmpv = v.replace('$$', '') + + if "$" in tmpv: + notdone[n] = v + else: + try: + v = int(v) + except ValueError: + # insert literal `$' + done[n] = v.replace('$$', '$') + else: + done[n] = v + + # do variable interpolation here + while notdone: + for name in notdone.keys(): + value = notdone[name] + m = _findvar1_rx.search(value) or _findvar2_rx.search(value) + if m: + n = m.group(1) + found = True + if n in done: + item = str(done[n]) + elif n in notdone: + # get it on a subsequent round + found = False + elif n in os.environ: + # do it like make: fall back to environment + item = os.environ[n] + else: + done[n] = item = "" + if found: + after = value[m.end():] + value = value[:m.start()] + item + after + if "$" in after: + notdone[name] = value + else: + try: value = int(value) + except ValueError: + done[name] = value.strip() + else: + done[name] = value + del notdone[name] + else: + # bogus variable reference; just drop it since we can't deal + del notdone[name] + + fp.close() + + # save the results in the global dictionary + g.update(done) + return g + + +def expand_makefile_vars(s, vars): + """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. """ - warn('this function will be removed in then next version of Python', - DeprecationWarning) # This algorithm does multiple expansion, so if vars['foo'] contains # "${bar}", it will expand ${foo} to ${bar}, and then expand @@ -162,3 +359,247 @@ def expand_makefile_vars(s, vars): else: break return s + + +_config_vars = None + +def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" + g = {} + # load the installed Makefile: + try: + filename = get_makefile_filename() + parse_makefile(filename, g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # load the installed pyconfig.h: + try: + filename = get_config_h_filename() + parse_config_h(file(filename), g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # On MacOSX we need to check the setting of the environment variable + # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so + # it needs to be compatible. + # If it isn't set we set it to the configure-time value + if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: + cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] + cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') + if cur_target == '': + cur_target = cfg_target + os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) + elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): + my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' + % (cur_target, cfg_target)) + raise DistutilsPlatformError(my_msg) + + # On AIX, there are wrong paths to the linker scripts in the Makefile + # -- these paths are relative to the Python source, but when installed + # the scripts are in another directory. + if python_build: + g['LDSHARED'] = g['BLDSHARED'] + + elif get_python_version() < '2.1': + # The following two branches are for 1.5.2 compatibility. + if sys.platform == 'aix4': # what about AIX 3.x ? + # Linker script is in the config directory, not in Modules as the + # Makefile says. + python_lib = get_python_lib(standard_lib=1) + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') + python_exp = os.path.join(python_lib, 'config', 'python.exp') + + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) + + elif sys.platform == 'beos': + # Linker script is in the config directory. In the Makefile it is + # relative to the srcdir, which after installation no longer makes + # sense. + python_lib = get_python_lib(standard_lib=1) + linkerscript_path = string.split(g['LDSHARED'])[0] + linkerscript_name = os.path.basename(linkerscript_path) + linkerscript = os.path.join(python_lib, 'config', + linkerscript_name) + + # XXX this isn't the right place to do this: adding the Python + # library to the link, if needed, should be in the "build_ext" + # command. (It's also needed for non-MS compilers on Windows, and + # it's taken care of for them by the 'build_ext.get_libraries()' + # method.) + g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % + (linkerscript, PREFIX, get_python_version())) + + global _config_vars + _config_vars = g + + +def _init_nt(): + """Initialize the module as appropriate for NT""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + g['SO'] = '.pyd' + g['EXE'] = ".exe" + g['VERSION'] = get_python_version().replace(".", "") + g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) + + global _config_vars + _config_vars = g + + +def _init_mac(): + """Initialize the module as appropriate for Macintosh systems""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + import MacOS + if not hasattr(MacOS, 'runtimemodel'): + g['SO'] = '.ppc.slb' + else: + g['SO'] = '.%s.slb' % MacOS.runtimemodel + + # XXX are these used anywhere? + g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") + g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") + + # These are used by the extension module build + g['srcdir'] = ':' + global _config_vars + _config_vars = g + + +def _init_os2(): + """Initialize the module as appropriate for OS/2""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + g['SO'] = '.pyd' + g['EXE'] = ".exe" + + global _config_vars + _config_vars = g + + +def get_config_vars(*args): + """With no arguments, return a dictionary of all configuration + variables relevant for the current platform. Generally this includes + everything needed to build extensions and install both pure modules and + extensions. On Unix, this means every variable defined in Python's + installed Makefile; on Windows and Mac OS it's a much smaller set. + + With arguments, return a list of values that result from looking up + each argument in the configuration variable dictionary. + """ + global _config_vars + if _config_vars is None: + func = globals().get("_init_" + os.name) + if func: + func() + else: + _config_vars = {} + + # Normalized versions of prefix and exec_prefix are handy to have; + # in fact, these are the standard versions used most places in the + # Distutils. + _config_vars['prefix'] = PREFIX + _config_vars['exec_prefix'] = EXEC_PREFIX + + if sys.platform == 'darwin': + kernel_version = os.uname()[2] # Kernel version (8.4.3) + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # On Mac OS X before 10.4, check if -arch and -isysroot + # are in CFLAGS or LDFLAGS and remove them if they are. + # This is needed when building extensions on a 10.3 system + # using a universal build of python. + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = re.sub('-isysroot [^ \t]*', ' ', flags) + _config_vars[key] = flags + + else: + + # Allow the user to override the architecture flags using + # an environment variable. + # NOTE: This name was introduced by Apple in OSX 10.5 and + # is used by several scripting languages distributed with + # that OS release. + + if 'ARCHFLAGS' in os.environ: + arch = os.environ['ARCHFLAGS'] + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = flags + ' ' + arch + _config_vars[key] = flags + + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + + if args: + vals = [] + for name in args: + vals.append(_config_vars.get(name)) + return vals + else: + return _config_vars + +def get_config_var(name): + """Return the value of a single variable using the dictionary + returned by 'get_config_vars()'. Equivalent to + get_config_vars().get(name) + """ + return get_config_vars().get(name) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py deleted file mode 100644 index e97ac666a6..0000000000 --- a/tests/test_cygwinccompiler.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Tests for distutils.cygwinccompiler.""" -import unittest -import sys -import os -import warnings -import sysconfig - -from test.test_support import check_warnings, run_unittest -from test.test_support import captured_stdout - -from distutils import cygwinccompiler -from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, - CONFIG_H_OK, CONFIG_H_NOTOK, - CONFIG_H_UNCERTAIN, get_versions, - get_msvcr, RE_VERSION) -from distutils.util import get_compiler_versions -from distutils.tests import support - -class CygwinCCompilerTestCase(support.TempdirManager, - unittest.TestCase): - - def setUp(self): - super(CygwinCCompilerTestCase, self).setUp() - self.version = sys.version - self.python_h = os.path.join(self.mkdtemp(), 'python.h') - self.old_get_config_h_filename = sysconfig.get_config_h_filename - sysconfig.get_config_h_filename = self._get_config_h_filename - - def tearDown(self): - sys.version = self.version - sysconfig.get_config_h_filename = self.old_get_config_h_filename - super(CygwinCCompilerTestCase, self).tearDown() - - def _get_config_h_filename(self): - return self.python_h - - def test_check_config_h(self): - - # check_config_h looks for "GCC" in sys.version first - # returns CONFIG_H_OK if found - sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' - '4.0.1 (Apple Computer, Inc. build 5370)]') - - self.assertEquals(check_config_h()[0], CONFIG_H_OK) - - # then it tries to see if it can find "__GNUC__" in pyconfig.h - sys.version = 'something without the *CC word' - - # if the file doesn't exist it returns CONFIG_H_UNCERTAIN - self.assertEquals(check_config_h()[0], CONFIG_H_UNCERTAIN) - - # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK - self.write_file(self.python_h, 'xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_NOTOK) - - # and CONFIG_H_OK if __GNUC__ is found - self.write_file(self.python_h, 'xxx __GNUC__ xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_OK) - - def test_get_msvcr(self): - - # none - sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' - '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') - self.assertEquals(get_msvcr(), None) - - # MSVC 7.0 - sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' - '[MSC v.1300 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr70']) - - # MSVC 7.1 - sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' - '[MSC v.1310 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr71']) - - # VS2005 / MSVC 8.0 - sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' - '[MSC v.1400 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr80']) - - # VS2008 / MSVC 9.0 - sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' - '[MSC v.1500 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr90']) - - # unknown - sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' - '[MSC v.1999 32 bits (Intel)]') - self.assertRaises(ValueError, get_msvcr) - - - def test_get_version_deprecated(self): - with check_warnings() as w: - warnings.simplefilter("always") - # make sure get_compiler_versions and get_versions - # returns the same thing - self.assertEquals(get_compiler_versions(), get_versions()) - # make sure using get_version() generated a warning - self.assertEquals(len(w.warnings), 1) - # make sure any usage of RE_VERSION will also - # generate a warning, but till works - version = RE_VERSION.search('1.2').group(1) - self.assertEquals(version, '1.2') - self.assertEquals(len(w.warnings), 2) - -def test_suite(): - return unittest.makeSuite(CygwinCCompilerTestCase) - -if __name__ == '__main__': - run_unittest(test_suite()) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py deleted file mode 100644 index d5e07dcede..0000000000 --- a/tests/test_emxccompiler.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Tests for distutils.emxccompiler.""" -import unittest -import sys -import os -import warnings - -from test.test_support import check_warnings, run_unittest -from test.test_support import captured_stdout - -from distutils.emxccompiler import get_versions -from distutils.util import get_compiler_versions -from distutils.tests import support - -class EmxCCompilerTestCase(support.TempdirManager, - unittest.TestCase): - - def test_get_version_deprecated(self): - with check_warnings() as w: - warnings.simplefilter("always") - # make sure get_compiler_versions and get_versions - # returns the same gcc - gcc, ld, dllwrap = get_compiler_versions() - emx_gcc, emx_ld = get_versions() - self.assertEquals(gcc, emx_gcc) - - # make sure using get_version() generated a warning - self.assertEquals(len(w.warnings), 1) - -def test_suite(): - return unittest.makeSuite(EmxCCompilerTestCase) - -if __name__ == '__main__': - run_unittest(test_suite()) diff --git a/tests/test_extension.py b/tests/test_extension.py deleted file mode 100755 index 0b5dfb826f..0000000000 --- a/tests/test_extension.py +++ /dev/null @@ -1,78 +0,0 @@ -"""Tests for distutils.extension.""" -import os -import sys -import unittest -import warnings - -from test.test_support import check_warnings -from distutils.extension import read_setup_file, Extension -from distutils.tests.support import capture_warnings - -class ExtensionTestCase(unittest.TestCase): - - @capture_warnings - def test_read_setup_file(self): - # trying to read a Setup file - # (sample extracted from the PyGame project) - setup = os.path.join(os.path.dirname(__file__), 'Setup.sample') - - exts = read_setup_file(setup) - names = [ext.name for ext in exts] - names.sort() - - # here are the extensions read_setup_file should have created - # out of the file - wanted = ['_arraysurfarray', '_camera', '_numericsndarray', - '_numericsurfarray', 'base', 'bufferproxy', 'cdrom', - 'color', 'constants', 'display', 'draw', 'event', - 'fastevent', 'font', 'gfxdraw', 'image', 'imageext', - 'joystick', 'key', 'mask', 'mixer', 'mixer_music', - 'mouse', 'movie', 'overlay', 'pixelarray', 'pypm', - 'rect', 'rwobject', 'scrap', 'surface', 'surflock', - 'time', 'transform'] - - self.assertEquals(names, wanted) - - @unittest.skipIf(sys.flags.optimize >= 2, - "Assertions are omitted with -O2 and above") - def test_extension_init_assertions(self): - # The first argument, which is the name, must be a string. - self.assertRaises(AssertionError, Extension, 1, []) - - # the second argument, which is the list of files, must - # be a list of strings - self.assertRaises(AssertionError, Extension, 'name', 'file') - self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) - - def test_extension_init(self): - ext = Extension('name', []) - self.assertEquals(ext.name, 'name') - - - ext = Extension('name', ['file1', 'file2']) - self.assertEquals(ext.sources, ['file1', 'file2']) - - # others arguments have defaults - for attr in ('include_dirs', 'define_macros', 'undef_macros', - 'library_dirs', 'libraries', 'runtime_library_dirs', - 'extra_objects', 'extra_compile_args', 'extra_link_args', - 'export_symbols', 'swig_opts', 'depends'): - self.assertEquals(getattr(ext, attr), []) - - self.assertEquals(ext.language, None) - self.assertEquals(ext.optional, None) - - # if there are unknown keyword options, warn about them - with check_warnings() as w: - warnings.simplefilter('always') - ext = Extension('name', ['file1', 'file2'], chic=True) - - self.assertEquals(len(w.warnings), 1) - self.assertEquals(str(w.warnings[0].message), - "Unknown Extension options: 'chic'") - -def test_suite(): - return unittest.makeSuite(ExtensionTestCase) - -if __name__ == "__main__": - unittest.main(defaultTest="test_suite") diff --git a/tests/test_install.py b/tests/test_install.py index 8e3e942f02..c834b91b38 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,27 +1,15 @@ """Tests for distutils.command.install.""" import os -import os.path -import sys import unittest -import site -import sysconfig -from sysconfig import (get_scheme_names, _CONFIG_VARS, _INSTALL_SCHEMES, - get_config_var, get_path) - -from test.test_support import captured_stdout from distutils.command.install import install -from distutils.command import install as install_module from distutils.core import Distribution -from distutils.errors import DistutilsOptionError from distutils.tests import support -class InstallTestCase(support.TempdirManager, - support.EnvironGuard, - support.LoggingSilencer, - unittest.TestCase): + +class InstallTestCase(support.TempdirManager, unittest.TestCase): def test_home_installation_scheme(self): # This ensure two things: @@ -38,23 +26,9 @@ def test_home_installation_scheme(self): build_lib=os.path.join(builddir, "lib"), ) - - - posix_prefix = _INSTALL_SCHEMES['posix_prefix'] - old_posix_prefix = posix_prefix['platinclude'] - posix_prefix['platinclude'] = \ - '{platbase}/include/python{py_version_short}' - - posix_home = _INSTALL_SCHEMES['posix_home'] - old_posix_home = posix_home['platinclude'] - posix_home['platinclude'] = '{base}/include/python' - try: - cmd = install(dist) - cmd.home = destination - cmd.ensure_finalized() - finally: - posix_home['platinclude'] = old_posix_home - posix_prefix['platinclude'] = old_posix_prefix + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() self.assertEqual(cmd.install_base, destination) self.assertEqual(cmd.install_platbase, destination) @@ -73,143 +47,6 @@ def check_path(got, expected): check_path(cmd.install_scripts, os.path.join(destination, "bin")) check_path(cmd.install_data, destination) - def test_user_site(self): - # site.USER_SITE was introduced in 2.6 - if sys.version < '2.6': - return - - # preparing the environement for the test - self.old_user_base = get_config_var('userbase') - self.old_user_site = get_path('purelib', '%s_user' % os.name) - self.tmpdir = self.mkdtemp() - self.user_base = os.path.join(self.tmpdir, 'B') - self.user_site = os.path.join(self.tmpdir, 'S') - _CONFIG_VARS['userbase'] = self.user_base - scheme = _INSTALL_SCHEMES['%s_user' % os.name] - scheme['purelib'] = self.user_site - - def _expanduser(path): - if path[0] == '~': - path = os.path.normpath(self.tmpdir) + path[1:] - return path - self.old_expand = os.path.expanduser - os.path.expanduser = _expanduser - - try: - # this is the actual test - self._test_user_site() - finally: - _CONFIG_VARS['userbase'] = self.old_user_base - scheme['purelib'] = self.old_user_site - os.path.expanduser = self.old_expand - - def _test_user_site(self): - schemes = get_scheme_names() - for key in ('nt_user', 'posix_user', 'os2_home'): - self.assertTrue(key in schemes) - - dist = Distribution({'name': 'xx'}) - cmd = install(dist) - # making sure the user option is there - options = [name for name, short, lable in - cmd.user_options] - self.assertTrue('user' in options) - - # setting a value - cmd.user = 1 - - # user base and site shouldn't be created yet - self.assertTrue(not os.path.exists(self.user_base)) - self.assertTrue(not os.path.exists(self.user_site)) - - # let's run finalize - cmd.ensure_finalized() - - # now they should - self.assertTrue(os.path.exists(self.user_base)) - self.assertTrue(os.path.exists(self.user_site)) - - self.assertTrue('userbase' in cmd.config_vars) - self.assertTrue('usersite' in cmd.config_vars) - - def test_handle_extra_path(self): - dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) - cmd = install(dist) - - # two elements - cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path', 'dirs']) - self.assertEquals(cmd.extra_dirs, 'dirs') - self.assertEquals(cmd.path_file, 'path') - - # one element - cmd.extra_path = ['path'] - cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path']) - self.assertEquals(cmd.extra_dirs, 'path') - self.assertEquals(cmd.path_file, 'path') - - # none - dist.extra_path = cmd.extra_path = None - cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, None) - self.assertEquals(cmd.extra_dirs, '') - self.assertEquals(cmd.path_file, None) - - # three elements (no way !) - cmd.extra_path = 'path,dirs,again' - self.assertRaises(DistutilsOptionError, cmd.handle_extra_path) - - def test_finalize_options(self): - dist = Distribution({'name': 'xx'}) - cmd = install(dist) - - # must supply either prefix/exec-prefix/home or - # install-base/install-platbase -- not both - cmd.prefix = 'prefix' - cmd.install_base = 'base' - self.assertRaises(DistutilsOptionError, cmd.finalize_options) - - # must supply either home or prefix/exec-prefix -- not both - cmd.install_base = None - cmd.home = 'home' - self.assertRaises(DistutilsOptionError, cmd.finalize_options) - - # can't combine user with with prefix/exec_prefix/home or - # install_(plat)base - cmd.prefix = None - cmd.user = 'user' - self.assertRaises(DistutilsOptionError, cmd.finalize_options) - - def test_record(self): - - install_dir = self.mkdtemp() - pkgdir, dist = self.create_dist() - - dist = Distribution() - cmd = install(dist) - dist.command_obj['install'] = cmd - cmd.root = install_dir - cmd.record = os.path.join(pkgdir, 'RECORD') - cmd.ensure_finalized() - - cmd.run() - - # let's check the RECORD file was created with one - # line (the egg info file) - with open(cmd.record) as f: - self.assertEquals(len(f.readlines()), 1) - - def _test_debug_mode(self): - # this covers the code called when DEBUG is set - old_logs_len = len(self.logs) - install_module.DEBUG = True - try: - with captured_stdout() as stdout: - self.test_record() - finally: - install_module.DEBUG = False - self.assertTrue(len(self.logs) > old_logs_len) def test_suite(): return unittest.makeSuite(InstallTestCase) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 6976dd55f8..3f233e2823 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,8 +1,8 @@ """Tests for distutils.unixccompiler.""" import sys import unittest -import sysconfig +from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): @@ -70,7 +70,7 @@ def gcv(v): elif v == 'GNULD': return 'yes' sysconfig.get_config_var = gcv - self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') # GCC non-GNULD sys.platform = 'bar' @@ -91,7 +91,7 @@ def gcv(v): elif v == 'GNULD': return 'yes' sysconfig.get_config_var = gcv - self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') + self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo') # non-GCC GNULD @@ -119,7 +119,7 @@ def gcv(v): def gcv(v): return 'xxx' sysconfig.get_config_var = gcv - self.assertEqual(self.cc.rpath_foo(), '-blibpath:/foo') + self.assertEqual(self.cc.rpath_foo(), '-R/foo') def test_suite(): diff --git a/tests/test_util.py b/tests/test_util.py index 348b42be03..981ad000da 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,267 +1,11 @@ """Tests for distutils.util.""" -import os import sys import unittest -from copy import copy -from StringIO import StringIO -import subprocess -from sysconfig import get_config_vars, get_platform from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError -from distutils.util import (convert_path, change_root, - check_environ, split_quoted, strtobool, - rfc822_escape, get_compiler_versions, - _find_exe_version, _MAC_OS_X_LD_VERSION, - byte_compile) -from distutils import util -from distutils.tests import support -from distutils.version import LooseVersion +from distutils.util import byte_compile -class FakePopen(object): - test_class = None - def __init__(self, cmd, shell, stdout, stderr): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd not in exes: - # we don't want to call the system, returning an empty - # output so it doesn't match - self.stdout = StringIO() - self.stderr = StringIO() - else: - self.stdout = StringIO(exes[self.cmd]) - self.stderr = StringIO() - -class UtilTestCase(support.EnvironGuard, unittest.TestCase): - - def setUp(self): - super(UtilTestCase, self).setUp() - # saving the environment - self.name = os.name - self.platform = sys.platform - self.version = sys.version - self.sep = os.sep - self.join = os.path.join - self.isabs = os.path.isabs - self.splitdrive = os.path.splitdrive - #self._config_vars = copy(sysconfig._config_vars) - - # patching os.uname - if hasattr(os, 'uname'): - self.uname = os.uname - self._uname = os.uname() - else: - self.uname = None - self._uname = None - os.uname = self._get_uname - - # patching POpen - self.old_find_executable = util.find_executable - util.find_executable = self._find_executable - self._exes = {} - self.old_popen = subprocess.Popen - self.old_stdout = sys.stdout - self.old_stderr = sys.stderr - FakePopen.test_class = self - subprocess.Popen = FakePopen - - def tearDown(self): - # getting back the environment - os.name = self.name - sys.platform = self.platform - sys.version = self.version - os.sep = self.sep - os.path.join = self.join - os.path.isabs = self.isabs - os.path.splitdrive = self.splitdrive - if self.uname is not None: - os.uname = self.uname - else: - del os.uname - #sysconfig._config_vars = copy(self._config_vars) - util.find_executable = self.old_find_executable - subprocess.Popen = self.old_popen - sys.old_stdout = self.old_stdout - sys.old_stderr = self.old_stderr - super(UtilTestCase, self).tearDown() - - def _set_uname(self, uname): - self._uname = uname - - def _get_uname(self): - return self._uname - - def test_get_platform(self): - platform = util.get_platform() - self.assertEquals(platform, get_platform()) - util.set_platform('MyOwnPlatform') - self.assertEquals('MyOwnPlatform', util.get_platform()) - util.set_platform(platform) - - def test_convert_path(self): - # linux/mac - os.sep = '/' - def _join(path): - return '/'.join(path) - os.path.join = _join - - self.assertEquals(convert_path('/home/to/my/stuff'), - '/home/to/my/stuff') - - # win - os.sep = '\\' - def _join(*path): - return '\\'.join(path) - os.path.join = _join - - self.assertRaises(ValueError, convert_path, '/home/to/my/stuff') - self.assertRaises(ValueError, convert_path, 'home/to/my/stuff/') - - self.assertEquals(convert_path('home/to/my/stuff'), - 'home\\to\\my\\stuff') - self.assertEquals(convert_path('.'), - os.curdir) - - def test_change_root(self): - # linux/mac - os.name = 'posix' - def _isabs(path): - return path[0] == '/' - os.path.isabs = _isabs - def _join(*path): - return '/'.join(path) - os.path.join = _join - - self.assertEquals(change_root('/root', '/old/its/here'), - '/root/old/its/here') - self.assertEquals(change_root('/root', 'its/here'), - '/root/its/here') - - # windows - os.name = 'nt' - def _isabs(path): - return path.startswith('c:\\') - os.path.isabs = _isabs - def _splitdrive(path): - if path.startswith('c:'): - return ('', path.replace('c:', '')) - return ('', path) - os.path.splitdrive = _splitdrive - def _join(*path): - return '\\'.join(path) - os.path.join = _join - - self.assertEquals(change_root('c:\\root', 'c:\\old\\its\\here'), - 'c:\\root\\old\\its\\here') - self.assertEquals(change_root('c:\\root', 'its\\here'), - 'c:\\root\\its\\here') - - # BugsBunny os (it's a great os) - os.name = 'BugsBunny' - self.assertRaises(DistutilsPlatformError, - change_root, 'c:\\root', 'its\\here') - - # XXX platforms to be covered: os2, mac - - def test_check_environ(self): - util._environ_checked = 0 - if 'HOME' in os.environ: - del os.environ['HOME'] - - # posix without HOME - if os.name == 'posix': # this test won't run on windows - check_environ() - import pwd - self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) - else: - check_environ() - - self.assertEquals(os.environ['PLAT'], get_platform()) - self.assertEquals(util._environ_checked, 1) - - def test_split_quoted(self): - self.assertEquals(split_quoted('""one"" "two" \'three\' \\four'), - ['one', 'two', 'three', 'four']) - - def test_strtobool(self): - yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') - no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') - - for y in yes: - self.assertTrue(strtobool(y)) - - for n in no: - self.assertTrue(not strtobool(n)) - - def test_rfc822_escape(self): - header = 'I am a\npoor\nlonesome\nheader\n' - res = rfc822_escape(header) - wanted = ('I am a%(8s)spoor%(8s)slonesome%(8s)s' - 'header%(8s)s') % {'8s': '\n'+8*' '} - self.assertEquals(res, wanted) - - def test_find_exe_version(self): - # the ld version scheme under MAC OS is: - # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION - # - # where VERSION is a 2-digit number for major - # revisions. For instance under Leopard, it's - # currently 77 - # - # Dots are used when branching is done. - # - # The SnowLeopard ld64 is currently 95.2.12 - - for output, version in (('@(#)PROGRAM:ld PROJECT:ld64-77', '77'), - ('@(#)PROGRAM:ld PROJECT:ld64-95.2.12', - '95.2.12')): - result = _MAC_OS_X_LD_VERSION.search(output) - self.assertEquals(result.group(1), version) - - def _find_executable(self, name): - if name in self._exes: - return name - return None - - def test_get_compiler_versions(self): - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_compiler_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = 'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_compiler_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = 'very strange output' - res = get_compiler_versions() - self.assertEquals(res[0], None) - - # same thing for ld - if sys.platform != 'darwin': - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' - res = get_compiler_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_compiler_versions() - self.assertEquals(res[1], None) - else: - self._exes['ld'] = 'GNU ld version 2.17.50 20060824' - res = get_compiler_versions() - self.assertEquals(res[1], None) - self._exes['ld'] = '@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_compiler_versions() - self.assertEquals(str(res[1]), '77') - - # and dllwrap - self._exes['dllwrap'] = 'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_compiler_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = 'Cheese Wrap' - res = get_compiler_versions() - self.assertEquals(res[2], None) +class UtilTestCase(unittest.TestCase): def test_dont_write_bytecode(self): # makes sure byte_compile raise a DistutilsError diff --git a/unixccompiler.py b/unixccompiler.py index 8fe1a6a13a..783d4dca84 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -18,6 +18,7 @@ import os, sys from types import StringType, NoneType +from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -25,7 +26,6 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log - # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -75,7 +75,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, - # see also the sysconfig + # see also distutils.sysconfig compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: @@ -276,16 +276,13 @@ def runtime_library_dir_option(self, dir): # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library - # is sought. GCC on GNU systems (Linux, FreeBSD, ...) has to - # be told to pass the -R option through to the linker, whereas - # other compilers and gcc on other systems just know this. + # is sought. GCC has to be told to pass the -R option through + # to the linker, whereas other compilers just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. - _sysconfig = __import__('sysconfig') - - compiler = os.path.basename(_sysconfig.get_config_var("CC")) + compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir @@ -296,22 +293,8 @@ def runtime_library_dir_option(self, dir): elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif self._is_gcc(compiler): - # gcc on non-GNU systems does not need -Wl, but can - # use it anyway. Since distutils has always passed in - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if _sysconfig.get_config_var("GNULD") == "yes": - # GNU ld needs an extra option to get a RUNPATH - # instead of just an RPATH. - return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir - elif sys.platform[:3] == "aix": - return "-blibpath:" + dir + return "-Wl,-R" + dir else: - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. return "-R" + dir def library_option(self, lib): diff --git a/util.py b/util.py index fbd3a67243..36ac721386 100644 --- a/util.py +++ b/util.py @@ -7,40 +7,184 @@ __revision__ = "$Id$" import sys, os, string, re - from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn, find_executable +from distutils.spawn import spawn from distutils import log -from distutils.version import LooseVersion from distutils.errors import DistutilsByteCompileError -_sysconfig = __import__('sysconfig') -_PLATFORM = None +def get_platform (): + """Return a string that identifies the current platform. This is used + mainly to distinguish platform-specific build directories and + platform-specific built distributions. Typically includes the OS name + and version and the architecture (as supplied by 'os.uname()'), + although the exact information included depends on the OS; eg. for IRIX + the architecture isn't particularly important (IRIX only runs on SGI + hardware), but for Linux the kernel version isn't particularly + important. + + Examples of returned values: + linux-i586 + linux-alpha (?) + solaris-2.6-sun4u + irix-5.3 + irix64-6.2 + + Windows will return one of: + win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) + win-ia64 (64bit Windows on Itanium) + win32 (all others - specifically, sys.platform is returned) + + For other non-POSIX platforms, currently just returns 'sys.platform'. + """ + if os.name == 'nt': + # sniff sys.version for architecture. + prefix = " bit (" + i = string.find(sys.version, prefix) + if i == -1: + return sys.platform + j = string.find(sys.version, ")", i) + look = sys.version[i+len(prefix):j].lower() + if look=='amd64': + return 'win-amd64' + if look=='itanium': + return 'win-ia64' + return sys.platform + + if os.name != "posix" or not hasattr(os, 'uname'): + # XXX what about the architecture? NT is Intel or Alpha, + # Mac OS is M68k or PPC, etc. + return sys.platform + + # Try to distinguish various flavours of Unix + + (osname, host, release, version, machine) = os.uname() + + # Convert the OS name to lowercase, remove '/' characters + # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") + osname = string.lower(osname) + osname = string.replace(osname, '/', '') + machine = string.replace(machine, ' ', '_') + machine = string.replace(machine, '/', '-') + + if osname[:5] == "linux": + # At least on Linux/Intel, 'machine' is the processor -- + # i386, etc. + # XXX what about Alpha, SPARC, etc? + return "%s-%s" % (osname, machine) + elif osname[:5] == "sunos": + if release[0] >= "5": # SunOS 5 == Solaris 2 + osname = "solaris" + release = "%d.%s" % (int(release[0]) - 3, release[2:]) + # fall through to standard osname-release-machine representation + elif osname[:4] == "irix": # could be "irix64"! + return "%s-%s" % (osname, release) + elif osname[:3] == "aix": + return "%s-%s.%s" % (osname, version, release) + elif osname[:6] == "cygwin": + osname = "cygwin" + rel_re = re.compile (r'[\d.]+') + m = rel_re.match(release) + if m: + release = m.group() + elif osname[:6] == "darwin": + # + # For our purposes, we'll assume that the system version from + # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set + # to. This makes the compatibility story a bit more sane because the + # machine is going to compile and link as if it were + # MACOSX_DEPLOYMENT_TARGET. + from distutils.sysconfig import get_config_vars + cfgvars = get_config_vars() + + macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') + if not macver: + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + + if 1: + # Always calculate the release of the running machine, + # needed to determine if we can build fat binaries or not. + + macrelease = macver + # Get the system version. Reading this plist is a documented + # way to get the system version (see the documentation for + # the Gestalt Manager) + try: + f = open('/System/Library/CoreServices/SystemVersion.plist') + except IOError: + # We're on a plain darwin box, fall back to the default + # behaviour. + pass + else: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + f.close() + if m is not None: + macrelease = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + + if not macver: + macver = macrelease + + if macver: + from distutils.sysconfig import get_config_vars + release = macver + osname = "macosx" + + if (macrelease + '.') >= '10.4.' and \ + '-arch' in get_config_vars().get('CFLAGS', '').strip(): + # The universal build will build fat binaries, but not on + # systems before 10.4 + # + # Try to detect 4-way universal builds, those have machine-type + # 'universal' instead of 'fat'. + + machine = 'fat' + cflags = get_config_vars().get('CFLAGS') + + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) -def get_platform(): - """Return a string that identifies the current platform. + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxint >= 2**32: + machine = 'x86_64' - By default, will return the value returned by sysconfig.get_platform(), - but it can be changed by calling set_platform(). - """ - global _PLATFORM - if _PLATFORM is None: - _PLATFORM = _sysconfig.get_platform() - return _PLATFORM + elif machine in ('PowerPC', 'Power_Macintosh'): + # Pick a sane name for the PPC architecture. + machine = 'ppc' -def set_platform(identifier): - """Sets the platform string identifier returned by get_platform(). + # See 'i386' case + if sys.maxint >= 2**32: + machine = 'ppc64' - Note that this change doesn't impact the value returned by - sysconfig.get_platform() and is local to Distutils - """ - global _PLATFORM - _PLATFORM = identifier + return "%s-%s-%s" % (osname, release, machine) + +# get_platform () -def convert_path(pathname): - """Return 'pathname' as a name that will work on the native filesystem. +def convert_path (pathname): + """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -53,23 +197,23 @@ def convert_path(pathname): if not pathname: return pathname if pathname[0] == '/': - raise ValueError("path '%s' cannot be absolute" % pathname) + raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': - raise ValueError("path '%s' cannot end with '/'" % pathname) + raise ValueError, "path '%s' cannot end with '/'" % pathname - paths = pathname.split('/') + paths = string.split(pathname, '/') while '.' in paths: paths.remove('.') if not paths: return os.curdir - return os.path.join(*paths) + return apply(os.path.join, paths) +# convert_path () -def change_root(new_root, pathname): - """Return 'pathname' with 'new_root' prepended. - If 'pathname' is relative, this is equivalent to - "os.path.join(new_root,pathname)". +def change_root (new_root, pathname): + """Return 'pathname' with 'new_root' prepended. If 'pathname' is + relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -96,20 +240,19 @@ def change_root(new_root, pathname): return os.path.join(new_root, pathname) else: # Chop off volume name from start of path - elements = pathname.split(":", 1) + elements = string.split(pathname, ":", 1) pathname = ":" + elements[1] return os.path.join(new_root, pathname) else: - raise DistutilsPlatformError("nothing known about " - "platform '%s'" % os.name) + raise DistutilsPlatformError, \ + "nothing known about platform '%s'" % os.name -_environ_checked = 0 - -def check_environ(): - """Ensure that 'os.environ' has all the environment variables needed. - We guarantee that users can use in config files, command-line options, +_environ_checked = 0 +def check_environ (): + """Ensure that 'os.environ' has all the environment variables we + guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -124,14 +267,14 @@ def check_environ(): os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] if 'PLAT' not in os.environ: - os.environ['PLAT'] = _sysconfig.get_platform() + os.environ['PLAT'] = get_platform() _environ_checked = 1 -def subst_vars(s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. - Every occurrence of '$' followed by a name is considered a variable, and +def subst_vars (s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. Every + occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -149,13 +292,14 @@ def _subst (match, local_vars=local_vars): try: return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s) except KeyError, var: - raise ValueError("invalid variable '$%s'" % var) + raise ValueError, "invalid variable '$%s'" % var + +# subst_vars () -def grok_environment_error(exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError. - This will generate an IOError or an OSError exception object. - Handles Python 1.5.1 and 1.5.2 styles, and +def grok_environment_error (exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError (IOError or + OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -174,20 +318,18 @@ def grok_environment_error(exc, prefix="error: "): return error + # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None - def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted(s): +def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. - - In short: words are delimited by spaces, as long as those + backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -195,12 +337,13 @@ def split_quoted(s): characters are stripped from any quoted string. Returns a list of words. """ + # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... if _wordchars_re is None: _init_regex() - s = s.strip() + s = string.strip(s) words = [] pos = 0 @@ -213,7 +356,7 @@ def split_quoted(s): if s[end] in string.whitespace: # unescaped, unquoted whitespace: now words.append(s[:end]) # we definitely have a word delimiter - s = s[end:].lstrip() + s = string.lstrip(s[end:]) pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; @@ -227,11 +370,12 @@ def split_quoted(s): elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: - raise RuntimeError("this can't happen " - "(bad char '%c')" % s[end]) + raise RuntimeError, \ + "this can't happen (bad char '%c')" % s[end] if m is None: - raise ValueError("bad string (mismatched %s quotes?)" % s[end]) + raise ValueError, \ + "bad string (mismatched %s quotes?)" % s[end] (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] @@ -243,12 +387,13 @@ def split_quoted(s): return words +# split_quoted () -def execute(func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world. - eg. by writing to the filesystem). Such actions are special because - they are disabled by the 'dry_run' flag. This method takes care of all +def execute (func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world (eg. by + writing to the filesystem). Such actions are special because they + are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -261,17 +406,17 @@ def execute(func, args, msg=None, verbose=0, dry_run=0): log.info(msg) if not dry_run: - func(*args) + apply(func, args) -def strtobool(val): +def strtobool (val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. """ - val = val.lower() + val = string.lower(val) if val in ('y', 'yes', 't', 'true', 'on', '1'): return 1 elif val in ('n', 'no', 'f', 'false', 'off', '0'): @@ -280,13 +425,15 @@ def strtobool(val): raise ValueError, "invalid truth value %r" % (val,) -def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, - verbose=1, dry_run=0, direct=None): +def byte_compile (py_files, + optimize=0, force=0, + prefix=None, base_dir=None, + verbose=1, dry_run=0, + direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. - - 'py_files' is a list of files to compile; any files that don't end in - ".py" are silently skipped. 'optimize' must be one of the following: + or .pyo files in the same directory. 'py_files' is a list of files + to compile; any files that don't end in ".py" are silently skipped. + 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -363,7 +510,7 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, #if prefix: # prefix = os.path.abspath(prefix) - script.write(",\n".join(map(repr, py_files)) + "]\n") + script.write(string.join(map(repr, py_files), ",\n") + "]\n") script.write(""" byte_compile(files, optimize=%r, force=%r, prefix=%r, base_dir=%r, @@ -402,8 +549,9 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError("invalid prefix: filename %r doesn't " - "start with %r" % (file, prefix)) + raise ValueError, \ + ("invalid prefix: filename %r doesn't start with %r" + % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -418,61 +566,12 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, log.debug("skipping byte-compilation of %s to %s", file, cfile_base) +# byte_compile () -def rfc822_escape(header): +def rfc822_escape (header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ - lines = header.split('\n') - sep = '\n' + 8 * ' ' - return sep.join(lines) - -_RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)') -_MAC_OS_X_LD_VERSION = re.compile('^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') - -def _find_ld_version(): - """Finds the ld version. The version scheme differs under Mac OSX.""" - if sys.platform == 'darwin': - return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) - else: - return _find_exe_version('ld -v') - -def _find_exe_version(cmd, pattern=_RE_VERSION): - """Find the version of an executable by running `cmd` in the shell. - - `pattern` is a compiled regular expression. If not provided, default - to _RE_VERSION. If the command is not found, or the output does not - match the mattern, returns None. - """ - from subprocess import Popen, PIPE - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) - try: - stdout, stderr = pipe.stdout.read(), pipe.stderr.read() - finally: - pipe.stdout.close() - pipe.stderr.close() - # some commands like ld under MacOS X, will give the - # output in the stderr, rather than stdout. - if stdout != '': - out_string = stdout - else: - out_string = stderr - - result = pattern.search(out_string) - if result is None: - return None - return LooseVersion(result.group(1)) - -def get_compiler_versions(): - """Returns a tuple providing the versions of gcc, ld and dllwrap - - For each command, if a command is not found, None is returned. - Otherwise a LooseVersion instance is returned. - """ - gcc = _find_exe_version('gcc -dumpversion') - ld = _find_ld_version() - dllwrap = _find_exe_version('dllwrap --version') - return gcc, ld, dllwrap + lines = string.split(header, '\n') + header = string.join(lines, '\n' + 8*' ') + return header From 17e4614fa2e3b907900dc2e4587a63c281db5425 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 5 Mar 2010 03:20:06 +0000 Subject: [PATCH 2879/8469] remove the svn:executable property from files that don't have shebang lines --- tests/test_clean.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/test_clean.py diff --git a/tests/test_clean.py b/tests/test_clean.py old mode 100755 new mode 100644 From a5dade0cc3debdff89c52fbbfc9d23c0a6d21062 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 5 Mar 2010 03:33:11 +0000 Subject: [PATCH 2880/8469] Merged revisions 78678,78680,78682 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78678 | benjamin.peterson | 2010-03-04 21:07:59 -0600 (Thu, 04 Mar 2010) | 1 line set svn:eol-style ........ r78680 | benjamin.peterson | 2010-03-04 21:15:07 -0600 (Thu, 04 Mar 2010) | 1 line set svn:eol-style on Lib files ........ r78682 | benjamin.peterson | 2010-03-04 21:20:06 -0600 (Thu, 04 Mar 2010) | 1 line remove the svn:executable property from files that don't have shebang lines ........ --- tests/test_clean.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/test_clean.py diff --git a/tests/test_clean.py b/tests/test_clean.py old mode 100755 new mode 100644 From 95ca0fbb62d6de3643c66af34ebfb842fabd0bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 01:04:14 +0000 Subject: [PATCH 2881/8469] copied back the build_ext tests from 2.6 --- tests/test_build_ext.py | 198 +++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 115 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 0e3f33e437..a1c236aa15 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -3,17 +3,12 @@ import tempfile import shutil from StringIO import StringIO -import warnings -from test.test_support import check_warnings -from test.test_support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext -import sysconfig +from distutils import sysconfig from distutils.tests import support -from distutils.extension import Extension -from distutils.errors import (UnknownFileError, DistutilsSetupError, - CompileError) +from distutils.errors import DistutilsSetupError import unittest from test import test_support @@ -33,16 +28,10 @@ def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() - self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path, sys.path[:] + self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.sys_path = sys.path[:] sys.path.append(self.tmp_dir) shutil.copy(_get_source_filename(), self.tmp_dir) - if sys.version > "2.6": - import site - self.old_user_base = site.USER_BASE - site.USER_BASE = self.mkdtemp() - from distutils.command import build_ext - build_ext.USER_BASE = site.USER_BASE def test_build_ext(self): global ALREADY_TESTED @@ -76,27 +65,22 @@ def test_build_ext(self): import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assertTrue(hasattr(xx, attr)) + self.assert_(hasattr(xx, attr)) self.assertEquals(xx.foo(2, 5), 7) self.assertEquals(xx.foo(13,15), 28) self.assertEquals(xx.new().demo(), None) doc = 'This is a template module just for instruction.' self.assertEquals(xx.__doc__, doc) - self.assertTrue(isinstance(xx.Null(), xx.Null)) - self.assertTrue(isinstance(xx.Str(), xx.Str)) + self.assert_(isinstance(xx.Null(), xx.Null)) + self.assert_(isinstance(xx.Str(), xx.Str)) def tearDown(self): # Get everything back to normal test_support.unload('xx') - sys.path = self.sys_path[0] - sys.path[:] = self.sys_path[1] - if sys.version > "2.6": - import site - site.USER_BASE = self.old_user_base - from distutils.command import build_ext - build_ext.USER_BASE = self.old_user_base - + sys.path = self.sys_path + # XXX on Windows the test leaves a directory with xx module in TEMP + shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') super(BuildExtTestCase, self).tearDown() def test_solaris_enable_shared(self): @@ -105,83 +89,35 @@ def test_solaris_enable_shared(self): old = sys.platform sys.platform = 'sunos' # fooling finalize_options - from sysconfig import _CONFIG_VARS - old_var = _CONFIG_VARS.get('Py_ENABLE_SHARED') - _CONFIG_VARS['Py_ENABLE_SHARED'] = 1 + from distutils.sysconfig import _config_vars + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = 1 try: cmd.ensure_finalized() finally: sys.platform = old if old_var is None: - del _CONFIG_VARS['Py_ENABLE_SHARED'] + del _config_vars['Py_ENABLE_SHARED'] else: - _CONFIG_VARS['Py_ENABLE_SHARED'] = old_var + _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assertTrue(len(cmd.library_dirs) > 0) - - def test_user_site(self): - # site.USER_SITE was introduced in 2.6 - if sys.version < '2.6': - return - - import site - dist = Distribution({'name': 'xx'}) - cmd = build_ext(dist) - - # making sure the user option is there - options = [name for name, short, lable in - cmd.user_options] - self.assertTrue('user' in options) - - # setting a value - cmd.user = 1 - - # setting user based lib and include - lib = os.path.join(site.USER_BASE, 'lib') - incl = os.path.join(site.USER_BASE, 'include') - os.mkdir(lib) - os.mkdir(incl) - - # let's run finalize - cmd.ensure_finalized() - - # see if include_dirs and library_dirs - # were set - self.assertTrue(lib in cmd.library_dirs) - self.assertTrue(lib in cmd.rpath) - self.assertTrue(incl in cmd.include_dirs) - - def test_optional_extension(self): - - # this extension will fail, but let's ignore this failure - # with the optional argument. - modules = [Extension('foo', ['xxx'], optional=False)] - dist = Distribution({'name': 'xx', 'ext_modules': modules}) - cmd = build_ext(dist) - cmd.ensure_finalized() - self.assertRaises((UnknownFileError, CompileError), - cmd.run) # should raise an error - - modules = [Extension('foo', ['xxx'], optional=True)] - dist = Distribution({'name': 'xx', 'ext_modules': modules}) - cmd = build_ext(dist) - cmd.ensure_finalized() - cmd.run() # should pass + self.assert_(len(cmd.library_dirs) > 0) def test_finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. - modules = [Extension('foo', ['xxx'], optional=False)] + modules = [Extension('foo', ['xxx'])] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.finalize_options() - py_include = sysconfig.get_path('include') - self.assertTrue(py_include in cmd.include_dirs) + from distutils import sysconfig + py_include = sysconfig.get_python_inc() + self.assert_(py_include in cmd.include_dirs) - plat_py_include = sysconfig.get_path('platinclude') - self.assertTrue(plat_py_include in cmd.include_dirs) + plat_py_include = sysconfig.get_python_inc(plat_specific=1) + self.assert_(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -195,7 +131,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assertTrue('my_lib_dir' in cmd.library_dirs) + self.assert_('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths @@ -260,13 +196,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assertTrue(isinstance(ext, Extension)) + self.assert_(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEquals(ext.libraries, 'foo') - self.assertTrue(not hasattr(ext, 'some')) + self.assert_(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -279,7 +215,7 @@ def test_check_extensions_list(self): self.assertEquals(exts[0].define_macros, [('1', '2')]) def test_get_source_files(self): - modules = [Extension('foo', ['xxx'], optional=False)] + modules = [Extension('foo', ['xxx'])] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() @@ -300,7 +236,7 @@ def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') self.write_file(c_file, 'void initfoo(void) {};\n') - ext = Extension('foo', [c_file], optional=False) + ext = Extension('foo', [c_file]) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) @@ -324,16 +260,16 @@ def test_get_outputs(self): so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assertTrue(os.path.exists(so_file)) + self.assert_(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) - + cmd.compiler = None cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assertTrue(os.path.exists(so_file)) + self.assert_(os.path.exists(so_file)) self.assertEquals(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) @@ -363,10 +299,6 @@ def test_get_outputs(self): def test_ext_fullpath(self): ext = sysconfig.get_config_vars()['SO'] - # building lxml.etree inplace - #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - #etree_ext = Extension('lxml.etree', [etree_c]) - #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) dist = Distribution() cmd = build_ext(dist) cmd.inplace = 1 @@ -399,25 +331,61 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) - def test_compiler_deprecation_warning(self): - dist = Distribution() + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) cmd = build_ext(dist) + cmd.ensure_finalized() + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + def test_setuptools_compat(self): + from setuptools_build_ext import build_ext as setuptools_build_ext + from setuptools_extension import Extension - class MyCompiler(object): - def do_something(self): - pass - - with check_warnings() as w: - warnings.simplefilter("always") - cmd.compiler = MyCompiler() - self.assertEquals(len(w.warnings), 1) - cmd.compile = 'unix' - self.assertEquals(len(w.warnings), 1) - cmd.compiler = MyCompiler() - cmd.compiler.do_something() - # two more warnings genereated by the get - # and the set - self.assertEquals(len(w.warnings), 3) + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = setuptools_build_ext(dist) + cmd.ensure_finalized() + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + + def test_build_ext_path_with_os_sep(self): + dist = Distribution({'name': 'UpdateManager'}) + cmd = build_ext(dist) + cmd.ensure_finalized() + ext = sysconfig.get_config_var("SO") + ext_name = os.path.join('UpdateManager', 'fdsend') + ext_path = cmd.get_ext_fullpath(ext_name) + wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) + self.assertEquals(ext_path, wanted) + + def test_build_ext_path_cross_platform(self): + if sys.platform != 'win32': + return + dist = Distribution({'name': 'UpdateManager'}) + cmd = build_ext(dist) + cmd.ensure_finalized() + ext = sysconfig.get_config_var("SO") + # this needs to work even under win32 + ext_name = 'UpdateManager/fdsend' + ext_path = cmd.get_ext_fullpath(ext_name) + wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) + self.assertEquals(ext_path, wanted) def test_suite(): src = _get_source_filename() From 5ca1f667648aa5161dff9c0725fbd30edb336e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 01:18:27 +0000 Subject: [PATCH 2882/8469] provide a fallback for xxmodule.c in case the buildir is not present --- tests/test_build_ext.py | 6 +- tests/xxmodule.c | 379 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 tests/xxmodule.c diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a1c236aa15..5dea4dde7b 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,7 +19,11 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') + xxmodule = os.path.join(srcdir, 'Modules', 'xxmodule.c') + if not os.path.exists(xxmodule): + # local fallback + xxmodule = os.path.join(os.path.dirname(__file__), 'xxmodule.c') + return xxmodule class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/xxmodule.c b/tests/xxmodule.c new file mode 100644 index 0000000000..6b498dd6ca --- /dev/null +++ b/tests/xxmodule.c @@ -0,0 +1,379 @@ + +/* Use this file as a template to start implementing a module that + also declares object types. All occurrences of 'Xxo' should be changed + to something reasonable for your objects. After that, all other + occurrences of 'xx' should be changed to something reasonable for your + module. If your module is named foo your sourcefile should be named + foomodule.c. + + You will probably want to delete all references to 'x_attr' and add + your own types of attributes instead. Maybe you want to name your + local variables other than 'self'. If your object type is needed in + other files, you'll have to create a file "foobarobject.h"; see + intobject.h for an example. */ + +/* Xxo objects */ + +#include "Python.h" + +static PyObject *ErrorObject; + +typedef struct { + PyObject_HEAD + PyObject *x_attr; /* Attributes dictionary */ +} XxoObject; + +static PyTypeObject Xxo_Type; + +#define XxoObject_Check(v) (Py_TYPE(v) == &Xxo_Type) + +static XxoObject * +newXxoObject(PyObject *arg) +{ + XxoObject *self; + self = PyObject_New(XxoObject, &Xxo_Type); + if (self == NULL) + return NULL; + self->x_attr = NULL; + return self; +} + +/* Xxo methods */ + +static void +Xxo_dealloc(XxoObject *self) +{ + Py_XDECREF(self->x_attr); + PyObject_Del(self); +} + +static PyObject * +Xxo_demo(XxoObject *self, PyObject *args) +{ + if (!PyArg_ParseTuple(args, ":demo")) + return NULL; + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef Xxo_methods[] = { + {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, + PyDoc_STR("demo() -> None")}, + {NULL, NULL} /* sentinel */ +}; + +static PyObject * +Xxo_getattr(XxoObject *self, char *name) +{ + if (self->x_attr != NULL) { + PyObject *v = PyDict_GetItemString(self->x_attr, name); + if (v != NULL) { + Py_INCREF(v); + return v; + } + } + return Py_FindMethod(Xxo_methods, (PyObject *)self, name); +} + +static int +Xxo_setattr(XxoObject *self, char *name, PyObject *v) +{ + if (self->x_attr == NULL) { + self->x_attr = PyDict_New(); + if (self->x_attr == NULL) + return -1; + } + if (v == NULL) { + int rv = PyDict_DelItemString(self->x_attr, name); + if (rv < 0) + PyErr_SetString(PyExc_AttributeError, + "delete non-existing Xxo attribute"); + return rv; + } + else + return PyDict_SetItemString(self->x_attr, name, v); +} + +static PyTypeObject Xxo_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Xxo", /*tp_name*/ + sizeof(XxoObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)Xxo_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + (getattrfunc)Xxo_getattr, /*tp_getattr*/ + (setattrfunc)Xxo_setattr, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; +/* --------------------------------------------------------------------- */ + +/* Function of two integers returning integer */ + +PyDoc_STRVAR(xx_foo_doc, +"foo(i,j)\n\ +\n\ +Return the sum of i and j."); + +static PyObject * +xx_foo(PyObject *self, PyObject *args) +{ + long i, j; + long res; + if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) + return NULL; + res = i+j; /* XXX Do something here */ + return PyInt_FromLong(res); +} + + +/* Function of no arguments returning new Xxo object */ + +static PyObject * +xx_new(PyObject *self, PyObject *args) +{ + XxoObject *rv; + + if (!PyArg_ParseTuple(args, ":new")) + return NULL; + rv = newXxoObject(args); + if (rv == NULL) + return NULL; + return (PyObject *)rv; +} + +/* Example with subtle bug from extensions manual ("Thin Ice"). */ + +static PyObject * +xx_bug(PyObject *self, PyObject *args) +{ + PyObject *list, *item; + + if (!PyArg_ParseTuple(args, "O:bug", &list)) + return NULL; + + item = PyList_GetItem(list, 0); + /* Py_INCREF(item); */ + PyList_SetItem(list, 1, PyInt_FromLong(0L)); + PyObject_Print(item, stdout, 0); + printf("\n"); + /* Py_DECREF(item); */ + + Py_INCREF(Py_None); + return Py_None; +} + +/* Test bad format character */ + +static PyObject * +xx_roj(PyObject *self, PyObject *args) +{ + PyObject *a; + long b; + if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) + return NULL; + Py_INCREF(Py_None); + return Py_None; +} + + +/* ---------- */ + +static PyTypeObject Str_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Str", /*tp_name*/ + 0, /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + 0, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /* see initxx */ /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + +/* ---------- */ + +static PyObject * +null_richcompare(PyObject *self, PyObject *other, int op) +{ + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + +static PyTypeObject Null_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Null", /*tp_name*/ + 0, /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + 0, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + null_richcompare, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /* see initxx */ /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /* see initxx */ /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + + +/* ---------- */ + + +/* List of functions defined in the module */ + +static PyMethodDef xx_methods[] = { + {"roj", xx_roj, METH_VARARGS, + PyDoc_STR("roj(a,b) -> None")}, + {"foo", xx_foo, METH_VARARGS, + xx_foo_doc}, + {"new", xx_new, METH_VARARGS, + PyDoc_STR("new() -> new Xx object")}, + {"bug", xx_bug, METH_VARARGS, + PyDoc_STR("bug(o) -> None")}, + {NULL, NULL} /* sentinel */ +}; + +PyDoc_STRVAR(module_doc, +"This is a template module just for instruction."); + +/* Initialization function for the module (*must* be called initxx) */ + +PyMODINIT_FUNC +initxx(void) +{ + PyObject *m; + + /* Due to cross platform compiler issues the slots must be filled + * here. It's required for portability to Windows without requiring + * C++. */ + Null_Type.tp_base = &PyBaseObject_Type; + Null_Type.tp_new = PyType_GenericNew; + Str_Type.tp_base = &PyUnicode_Type; + + /* Finalize the type object including setting type of the new type + * object; doing it here is required for portability, too. */ + if (PyType_Ready(&Xxo_Type) < 0) + return; + + /* Create the module and add the functions */ + m = Py_InitModule3("xx", xx_methods, module_doc); + if (m == NULL) + return; + + /* Add some symbolic constants to the module */ + if (ErrorObject == NULL) { + ErrorObject = PyErr_NewException("xx.error", NULL, NULL); + if (ErrorObject == NULL) + return; + } + Py_INCREF(ErrorObject); + PyModule_AddObject(m, "error", ErrorObject); + + /* Add Str */ + if (PyType_Ready(&Str_Type) < 0) + return; + PyModule_AddObject(m, "Str", (PyObject *)&Str_Type); + + /* Add Null */ + if (PyType_Ready(&Null_Type) < 0) + return; + PyModule_AddObject(m, "Null", (PyObject *)&Null_Type); +} From 205a0969d915976d9bd420ec5fa78a7e97e7a51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 01:23:21 +0000 Subject: [PATCH 2883/8469] simplified the fallback case --- tests/test_build_ext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5dea4dde7b..867ba96ec4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,11 +19,10 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') - xxmodule = os.path.join(srcdir, 'Modules', 'xxmodule.c') - if not os.path.exists(xxmodule): + if srcdir is None: # local fallback - xxmodule = os.path.join(os.path.dirname(__file__), 'xxmodule.c') - return xxmodule + return os.path.join(os.path.dirname(__file__), 'xxmodule.c') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, From 0d642959fe4e67e111f4306a187228ab2fcec179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 01:27:09 +0000 Subject: [PATCH 2884/8469] files used by win32 tests --- tests/setuptools_build_ext.py | 287 ++++++++++++++++++++++++++++++++++ tests/setuptools_extension.py | 51 ++++++ 2 files changed, 338 insertions(+) create mode 100644 tests/setuptools_build_ext.py create mode 100644 tests/setuptools_extension.py diff --git a/tests/setuptools_build_ext.py b/tests/setuptools_build_ext.py new file mode 100644 index 0000000000..21fa9e8f43 --- /dev/null +++ b/tests/setuptools_build_ext.py @@ -0,0 +1,287 @@ +from distutils.command.build_ext import build_ext as _du_build_ext +try: + # Attempt to use Pyrex for building extensions, if available + from Pyrex.Distutils.build_ext import build_ext as _build_ext +except ImportError: + _build_ext = _du_build_ext + +import os, sys +from distutils.file_util import copy_file + +from distutils.tests.setuptools_extension import Library + +from distutils.ccompiler import new_compiler +from distutils.sysconfig import customize_compiler, get_config_var +get_config_var("LDSHARED") # make sure _config_vars is initialized +from distutils.sysconfig import _config_vars +from distutils import log +from distutils.errors import * + +have_rtld = False +use_stubs = False +libtype = 'shared' + +if sys.platform == "darwin": + use_stubs = True +elif os.name != 'nt': + try: + from dl import RTLD_NOW + have_rtld = True + use_stubs = True + except ImportError: + pass + +def if_dl(s): + if have_rtld: + return s + return '' + + + + + + +class build_ext(_build_ext): + def run(self): + """Build extensions in build directory, then copy if --inplace""" + old_inplace, self.inplace = self.inplace, 0 + _build_ext.run(self) + self.inplace = old_inplace + if old_inplace: + self.copy_extensions_to_source() + + def copy_extensions_to_source(self): + build_py = self.get_finalized_command('build_py') + for ext in self.extensions: + fullname = self.get_ext_fullname(ext.name) + filename = self.get_ext_filename(fullname) + modpath = fullname.split('.') + package = '.'.join(modpath[:-1]) + package_dir = build_py.get_package_dir(package) + dest_filename = os.path.join(package_dir,os.path.basename(filename)) + src_filename = os.path.join(self.build_lib,filename) + + # Always copy, even if source is older than destination, to ensure + # that the right extensions for the current Python/platform are + # used. + copy_file( + src_filename, dest_filename, verbose=self.verbose, + dry_run=self.dry_run + ) + if ext._needs_stub: + self.write_stub(package_dir or os.curdir, ext, True) + + + if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'): + # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 + def swig_sources(self, sources, *otherargs): + # first do any Pyrex processing + sources = _build_ext.swig_sources(self, sources) or sources + # Then do any actual SWIG stuff on the remainder + return _du_build_ext.swig_sources(self, sources, *otherargs) + + + + def get_ext_filename(self, fullname): + filename = _build_ext.get_ext_filename(self,fullname) + ext = self.ext_map[fullname] + if isinstance(ext,Library): + fn, ext = os.path.splitext(filename) + return self.shlib_compiler.library_filename(fn,libtype) + elif use_stubs and ext._links_to_dynamic: + d,fn = os.path.split(filename) + return os.path.join(d,'dl-'+fn) + else: + return filename + + def initialize_options(self): + _build_ext.initialize_options(self) + self.shlib_compiler = None + self.shlibs = [] + self.ext_map = {} + + def finalize_options(self): + _build_ext.finalize_options(self) + self.extensions = self.extensions or [] + self.check_extensions_list(self.extensions) + self.shlibs = [ext for ext in self.extensions + if isinstance(ext,Library)] + if self.shlibs: + self.setup_shlib_compiler() + for ext in self.extensions: + ext._full_name = self.get_ext_fullname(ext.name) + for ext in self.extensions: + fullname = ext._full_name + self.ext_map[fullname] = ext + ltd = ext._links_to_dynamic = \ + self.shlibs and self.links_to_dynamic(ext) or False + ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library) + filename = ext._file_name = self.get_ext_filename(fullname) + libdir = os.path.dirname(os.path.join(self.build_lib,filename)) + if ltd and libdir not in ext.library_dirs: + ext.library_dirs.append(libdir) + if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs: + ext.runtime_library_dirs.append(os.curdir) + + def setup_shlib_compiler(self): + compiler = self.shlib_compiler = new_compiler( + compiler=self.compiler, dry_run=self.dry_run, force=self.force + ) + if sys.platform == "darwin": + tmp = _config_vars.copy() + try: + # XXX Help! I don't have any idea whether these are right... + _config_vars['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" + _config_vars['CCSHARED'] = " -dynamiclib" + _config_vars['SO'] = ".dylib" + customize_compiler(compiler) + finally: + _config_vars.clear() + _config_vars.update(tmp) + else: + customize_compiler(compiler) + + if self.include_dirs is not None: + compiler.set_include_dirs(self.include_dirs) + if self.define is not None: + # 'define' option is a list of (name,value) tuples + for (name,value) in self.define: + compiler.define_macro(name, value) + if self.undef is not None: + for macro in self.undef: + compiler.undefine_macro(macro) + if self.libraries is not None: + compiler.set_libraries(self.libraries) + if self.library_dirs is not None: + compiler.set_library_dirs(self.library_dirs) + if self.rpath is not None: + compiler.set_runtime_library_dirs(self.rpath) + if self.link_objects is not None: + compiler.set_link_objects(self.link_objects) + + # hack so distutils' build_extension() builds a library instead + compiler.link_shared_object = link_shared_object.__get__(compiler) + + + + def get_export_symbols(self, ext): + if isinstance(ext,Library): + return ext.export_symbols + return _build_ext.get_export_symbols(self,ext) + + def build_extension(self, ext): + _compiler = self.compiler + try: + if isinstance(ext,Library): + self.compiler = self.shlib_compiler + _build_ext.build_extension(self,ext) + if ext._needs_stub: + self.write_stub( + self.get_finalized_command('build_py').build_lib, ext + ) + finally: + self.compiler = _compiler + + def links_to_dynamic(self, ext): + """Return true if 'ext' links to a dynamic lib in the same package""" + # XXX this should check to ensure the lib is actually being built + # XXX as dynamic, and not just using a locally-found version or a + # XXX static-compiled version + libnames = dict.fromkeys([lib._full_name for lib in self.shlibs]) + pkg = '.'.join(ext._full_name.split('.')[:-1]+['']) + for libname in ext.libraries: + if pkg+libname in libnames: return True + return False + + def get_outputs(self): + outputs = _build_ext.get_outputs(self) + optimize = self.get_finalized_command('build_py').optimize + for ext in self.extensions: + if ext._needs_stub: + base = os.path.join(self.build_lib, *ext._full_name.split('.')) + outputs.append(base+'.py') + outputs.append(base+'.pyc') + if optimize: + outputs.append(base+'.pyo') + return outputs + + def write_stub(self, output_dir, ext, compile=False): + log.info("writing stub loader for %s to %s",ext._full_name, output_dir) + stub_file = os.path.join(output_dir, *ext._full_name.split('.'))+'.py' + if compile and os.path.exists(stub_file): + raise DistutilsError(stub_file+" already exists! Please delete.") + if not self.dry_run: + f = open(stub_file,'w') + f.write('\n'.join([ + "def __bootstrap__():", + " global __bootstrap__, __file__, __loader__", + " import sys, os, pkg_resources, imp"+if_dl(", dl"), + " __file__ = pkg_resources.resource_filename(__name__,%r)" + % os.path.basename(ext._file_name), + " del __bootstrap__", + " if '__loader__' in globals():", + " del __loader__", + if_dl(" old_flags = sys.getdlopenflags()"), + " old_dir = os.getcwd()", + " try:", + " os.chdir(os.path.dirname(__file__))", + if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), + " imp.load_dynamic(__name__,__file__)", + " finally:", + if_dl(" sys.setdlopenflags(old_flags)"), + " os.chdir(old_dir)", + "__bootstrap__()", + "" # terminal \n + ])) + f.close() + if compile: + from distutils.util import byte_compile + byte_compile([stub_file], optimize=0, + force=True, dry_run=self.dry_run) + optimize = self.get_finalized_command('install_lib').optimize + if optimize > 0: + byte_compile([stub_file], optimize=optimize, + force=True, dry_run=self.dry_run) + if os.path.exists(stub_file) and not self.dry_run: + os.unlink(stub_file) + + +if use_stubs or os.name=='nt': + # Build shared libraries + # + def link_shared_object(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None + ): self.link( + self.SHARED_LIBRARY, objects, output_libname, + output_dir, libraries, library_dirs, runtime_library_dirs, + export_symbols, debug, extra_preargs, extra_postargs, + build_temp, target_lang + ) +else: + # Build static libraries everywhere else + libtype = 'static' + + def link_shared_object(self, objects, output_libname, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None + ): + # XXX we need to either disallow these attrs on Library instances, + # or warn/abort here if set, or something... + #libraries=None, library_dirs=None, runtime_library_dirs=None, + #export_symbols=None, extra_preargs=None, extra_postargs=None, + #build_temp=None + + assert output_dir is None # distutils build_ext doesn't pass this + output_dir,filename = os.path.split(output_libname) + basename, ext = os.path.splitext(filename) + if self.library_filename("x").startswith('lib'): + # strip 'lib' prefix; this is kludgy if some platform uses + # a different prefix + basename = basename[3:] + + self.create_static_lib( + objects, basename, output_dir, debug, target_lang + ) diff --git a/tests/setuptools_extension.py b/tests/setuptools_extension.py new file mode 100644 index 0000000000..ec6b690cdb --- /dev/null +++ b/tests/setuptools_extension.py @@ -0,0 +1,51 @@ +from distutils.core import Extension as _Extension +from distutils.core import Distribution as _Distribution + +def _get_unpatched(cls): + """Protect against re-patching the distutils if reloaded + + Also ensures that no other distutils extension monkeypatched the distutils + first. + """ + while cls.__module__.startswith('setuptools'): + cls, = cls.__bases__ + if not cls.__module__.startswith('distutils'): + raise AssertionError( + "distutils has already been patched by %r" % cls + ) + return cls + +_Distribution = _get_unpatched(_Distribution) +_Extension = _get_unpatched(_Extension) + +try: + from Pyrex.Distutils.build_ext import build_ext +except ImportError: + have_pyrex = False +else: + have_pyrex = True + + +class Extension(_Extension): + """Extension that uses '.c' files in place of '.pyx' files""" + + if not have_pyrex: + # convert .pyx extensions to .c + def __init__(self,*args,**kw): + _Extension.__init__(self,*args,**kw) + sources = [] + for s in self.sources: + if s.endswith('.pyx'): + sources.append(s[:-3]+'c') + else: + sources.append(s) + self.sources = sources + +class Library(Extension): + """Just like a regular Extension, but built as a library instead""" + +import sys, distutils.core, distutils.extension +distutils.core.Extension = Extension +distutils.extension.Extension = Extension +if 'distutils.command.build_ext' in sys.modules: + sys.modules['distutils.command.build_ext'].Extension = Extension From e8fce7b386235ac8943372a062330694090a7533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 02:11:14 +0000 Subject: [PATCH 2885/8469] fixed various failures and environment alterations in distutils.test_build_ext --- tests/test_build_ext.py | 62 +++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 867ba96ec4..4860c9bf24 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,10 +19,15 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') + fallback_path = os.path.join(os.path.dirname(__file__), 'xxmodule.c') if srcdir is None: - # local fallback - return os.path.join(os.path.dirname(__file__), 'xxmodule.c') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') + return fallback_path + locations = (srcdir, os.path.dirname(sys.executable)) + for location in locations: + path = os.path.join(location, 'Modules', 'xxmodule.c') + if os.path.exists(path): + return path + return fallback_path class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, @@ -81,7 +86,7 @@ def test_build_ext(self): def tearDown(self): # Get everything back to normal test_support.unload('xx') - sys.path = self.sys_path + sys.path[:] = self.sys_path # XXX on Windows the test leaves a directory with xx module in TEMP shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') super(BuildExtTestCase, self).tearDown() @@ -350,22 +355,31 @@ def test_build_ext_inplace(self): self.assertEquals(wanted, path) def test_setuptools_compat(self): - from setuptools_build_ext import build_ext as setuptools_build_ext - from setuptools_extension import Extension - - etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') - etree_ext = Extension('lxml.etree', [etree_c]) - dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) - cmd = setuptools_build_ext(dist) - cmd.ensure_finalized() - cmd.inplace = 1 - cmd.distribution.package_dir = {'': 'src'} - cmd.distribution.packages = ['lxml', 'lxml.html'] - curdir = os.getcwd() - ext = sysconfig.get_config_var("SO") - wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) - path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + import distutils.core, distutils.extension, distutils.command.build_ext + saved_ext = distutils.extension.Extension + try: + # theses import patch Distutils' Extension class + from setuptools_build_ext import build_ext as setuptools_build_ext + from setuptools_extension import Extension + + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = setuptools_build_ext(dist) + cmd.ensure_finalized() + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + finally: + # restoring Distutils' Extension class otherwise its broken + distutils.extension.Extension = saved_ext + distutils.core.Extension = saved_ext + distutils.command.build_ext.Extension = saved_ext def test_build_ext_path_with_os_sep(self): dist = Distribution({'name': 'UpdateManager'}) @@ -391,13 +405,7 @@ def test_build_ext_path_cross_platform(self): self.assertEquals(ext_path, wanted) def test_suite(): - src = _get_source_filename() - if not os.path.exists(src): - if test_support.verbose: - print ('test_build_ext: Cannot find source code (test' - ' must run in python build dir)') - return unittest.TestSuite() - else: return unittest.makeSuite(BuildExtTestCase) + return unittest.makeSuite(BuildExtTestCase) if __name__ == '__main__': test_support.run_unittest(test_suite()) From 77d34a843c3d00ae2dc37cd7b071a47a2b460aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 6 Mar 2010 02:17:28 +0000 Subject: [PATCH 2886/8469] search in the alternative location for VCExpress --- msvc9compiler.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 41d67faf59..932b6ea2d9 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -38,6 +38,7 @@ _winreg.HKEY_CLASSES_ROOT) VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" +VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f" WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" NET_BASE = r"Software\Microsoft\.NETFramework" @@ -216,9 +217,18 @@ def find_vcvarsall(version): productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, "productdir") except KeyError: - log.debug("Unable to find productdir in registry") productdir = None + # trying Express edition + if productdir is None: + vsbase = VSEXPRESS_BASE % version + try: + productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, + "productdir") + except KeyError: + productdir = None + log.debug("Unable to find productdir in registry") + if not productdir or not os.path.isdir(productdir): toolskey = "VS%0.f0COMNTOOLS" % version toolsdir = os.environ.get(toolskey, None) From 1e6721ca45da49df064748cdd8161fc717140487 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 6 Mar 2010 20:28:33 +0000 Subject: [PATCH 2887/8469] bump to 3.1.2rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8c0e5a3cba..2e6a6fb634 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.1" +__version__ = "3.1.2rc1" #--end constants-- From d9daa5ddcc3f32e2acd377eb210a3a061976c0ce Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 6 Mar 2010 20:34:14 +0000 Subject: [PATCH 2888/8469] bump version to 2.7a4 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 977643bf34..0158996441 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7a3" +__version__ = "2.7a4" #--end constants-- From 32c211ba3c57c6d0405a86f29291c56f105a86f4 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Sun, 7 Mar 2010 12:14:25 +0000 Subject: [PATCH 2889/8469] Fix some py3k warnings in the standard library. --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index 36ac721386..1a55f70894 100644 --- a/util.py +++ b/util.py @@ -406,7 +406,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): log.info(msg) if not dry_run: - apply(func, args) + func(*args) def strtobool (val): From c0dac00e8b014f7b9180438f8e056f411f10a2c0 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 9 Mar 2010 22:31:52 +0000 Subject: [PATCH 2890/8469] Bumping to 2.6.5rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8c2ab8f3e5..888dd54a6b 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.5rc1" +__version__ = "2.6.5rc2" #--end constants-- From e14cbce6b42677bd762a5b2d351451e14ee3e3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 12 Mar 2010 18:27:13 +0000 Subject: [PATCH 2891/8469] Merged revisions 78707,78709 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78707 | tarek.ziade | 2010-03-05 20:18:27 -0500 (Fri, 05 Mar 2010) | 1 line provide a fallback for xxmodule.c in case the buildir is not present ........ r78709 | tarek.ziade | 2010-03-05 20:23:21 -0500 (Fri, 05 Mar 2010) | 1 line simplified the fallback case ........ --- tests/test_build_ext.py | 3 +- tests/xxmodule.c | 379 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 380 insertions(+), 2 deletions(-) create mode 100644 tests/xxmodule.c diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a1c236aa15..b6c521bf76 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -18,8 +18,7 @@ ALREADY_TESTED = False def _get_source_filename(): - srcdir = sysconfig.get_config_var('srcdir') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') + return os.path.join(os.path.dirname(__file__), 'xxmodule.c') class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/xxmodule.c b/tests/xxmodule.c new file mode 100644 index 0000000000..6b498dd6ca --- /dev/null +++ b/tests/xxmodule.c @@ -0,0 +1,379 @@ + +/* Use this file as a template to start implementing a module that + also declares object types. All occurrences of 'Xxo' should be changed + to something reasonable for your objects. After that, all other + occurrences of 'xx' should be changed to something reasonable for your + module. If your module is named foo your sourcefile should be named + foomodule.c. + + You will probably want to delete all references to 'x_attr' and add + your own types of attributes instead. Maybe you want to name your + local variables other than 'self'. If your object type is needed in + other files, you'll have to create a file "foobarobject.h"; see + intobject.h for an example. */ + +/* Xxo objects */ + +#include "Python.h" + +static PyObject *ErrorObject; + +typedef struct { + PyObject_HEAD + PyObject *x_attr; /* Attributes dictionary */ +} XxoObject; + +static PyTypeObject Xxo_Type; + +#define XxoObject_Check(v) (Py_TYPE(v) == &Xxo_Type) + +static XxoObject * +newXxoObject(PyObject *arg) +{ + XxoObject *self; + self = PyObject_New(XxoObject, &Xxo_Type); + if (self == NULL) + return NULL; + self->x_attr = NULL; + return self; +} + +/* Xxo methods */ + +static void +Xxo_dealloc(XxoObject *self) +{ + Py_XDECREF(self->x_attr); + PyObject_Del(self); +} + +static PyObject * +Xxo_demo(XxoObject *self, PyObject *args) +{ + if (!PyArg_ParseTuple(args, ":demo")) + return NULL; + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef Xxo_methods[] = { + {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, + PyDoc_STR("demo() -> None")}, + {NULL, NULL} /* sentinel */ +}; + +static PyObject * +Xxo_getattr(XxoObject *self, char *name) +{ + if (self->x_attr != NULL) { + PyObject *v = PyDict_GetItemString(self->x_attr, name); + if (v != NULL) { + Py_INCREF(v); + return v; + } + } + return Py_FindMethod(Xxo_methods, (PyObject *)self, name); +} + +static int +Xxo_setattr(XxoObject *self, char *name, PyObject *v) +{ + if (self->x_attr == NULL) { + self->x_attr = PyDict_New(); + if (self->x_attr == NULL) + return -1; + } + if (v == NULL) { + int rv = PyDict_DelItemString(self->x_attr, name); + if (rv < 0) + PyErr_SetString(PyExc_AttributeError, + "delete non-existing Xxo attribute"); + return rv; + } + else + return PyDict_SetItemString(self->x_attr, name, v); +} + +static PyTypeObject Xxo_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Xxo", /*tp_name*/ + sizeof(XxoObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)Xxo_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + (getattrfunc)Xxo_getattr, /*tp_getattr*/ + (setattrfunc)Xxo_setattr, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; +/* --------------------------------------------------------------------- */ + +/* Function of two integers returning integer */ + +PyDoc_STRVAR(xx_foo_doc, +"foo(i,j)\n\ +\n\ +Return the sum of i and j."); + +static PyObject * +xx_foo(PyObject *self, PyObject *args) +{ + long i, j; + long res; + if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) + return NULL; + res = i+j; /* XXX Do something here */ + return PyInt_FromLong(res); +} + + +/* Function of no arguments returning new Xxo object */ + +static PyObject * +xx_new(PyObject *self, PyObject *args) +{ + XxoObject *rv; + + if (!PyArg_ParseTuple(args, ":new")) + return NULL; + rv = newXxoObject(args); + if (rv == NULL) + return NULL; + return (PyObject *)rv; +} + +/* Example with subtle bug from extensions manual ("Thin Ice"). */ + +static PyObject * +xx_bug(PyObject *self, PyObject *args) +{ + PyObject *list, *item; + + if (!PyArg_ParseTuple(args, "O:bug", &list)) + return NULL; + + item = PyList_GetItem(list, 0); + /* Py_INCREF(item); */ + PyList_SetItem(list, 1, PyInt_FromLong(0L)); + PyObject_Print(item, stdout, 0); + printf("\n"); + /* Py_DECREF(item); */ + + Py_INCREF(Py_None); + return Py_None; +} + +/* Test bad format character */ + +static PyObject * +xx_roj(PyObject *self, PyObject *args) +{ + PyObject *a; + long b; + if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) + return NULL; + Py_INCREF(Py_None); + return Py_None; +} + + +/* ---------- */ + +static PyTypeObject Str_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Str", /*tp_name*/ + 0, /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + 0, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /* see initxx */ /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + +/* ---------- */ + +static PyObject * +null_richcompare(PyObject *self, PyObject *other, int op) +{ + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + +static PyTypeObject Null_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(NULL, 0) + "xxmodule.Null", /*tp_name*/ + 0, /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + 0, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + null_richcompare, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /* see initxx */ /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /* see initxx */ /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + + +/* ---------- */ + + +/* List of functions defined in the module */ + +static PyMethodDef xx_methods[] = { + {"roj", xx_roj, METH_VARARGS, + PyDoc_STR("roj(a,b) -> None")}, + {"foo", xx_foo, METH_VARARGS, + xx_foo_doc}, + {"new", xx_new, METH_VARARGS, + PyDoc_STR("new() -> new Xx object")}, + {"bug", xx_bug, METH_VARARGS, + PyDoc_STR("bug(o) -> None")}, + {NULL, NULL} /* sentinel */ +}; + +PyDoc_STRVAR(module_doc, +"This is a template module just for instruction."); + +/* Initialization function for the module (*must* be called initxx) */ + +PyMODINIT_FUNC +initxx(void) +{ + PyObject *m; + + /* Due to cross platform compiler issues the slots must be filled + * here. It's required for portability to Windows without requiring + * C++. */ + Null_Type.tp_base = &PyBaseObject_Type; + Null_Type.tp_new = PyType_GenericNew; + Str_Type.tp_base = &PyUnicode_Type; + + /* Finalize the type object including setting type of the new type + * object; doing it here is required for portability, too. */ + if (PyType_Ready(&Xxo_Type) < 0) + return; + + /* Create the module and add the functions */ + m = Py_InitModule3("xx", xx_methods, module_doc); + if (m == NULL) + return; + + /* Add some symbolic constants to the module */ + if (ErrorObject == NULL) { + ErrorObject = PyErr_NewException("xx.error", NULL, NULL); + if (ErrorObject == NULL) + return; + } + Py_INCREF(ErrorObject); + PyModule_AddObject(m, "error", ErrorObject); + + /* Add Str */ + if (PyType_Ready(&Str_Type) < 0) + return; + PyModule_AddObject(m, "Str", (PyObject *)&Str_Type); + + /* Add Null */ + if (PyType_Ready(&Null_Type) < 0) + return; + PyModule_AddObject(m, "Null", (PyObject *)&Null_Type); +} From 9b4f204172ebab821cb677c978625c2e2479de5e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 13 Mar 2010 13:10:52 -0500 Subject: [PATCH 2892/8469] removing the easy_install installation process -- too much problem with sandboxing violations through easy_install --HG-- branch : distribute extra : rebase_source : e1528eb57170fd7dc5edf318eb56f0e7683c3332 --- README.txt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/README.txt b/README.txt index 8e78bc885c..bd08477091 100755 --- a/README.txt +++ b/README.txt @@ -68,9 +68,8 @@ Installation Instructions Distribute is only released as a source distribution. -It can be installed using easy_install or pip, and can be done so with the source -tarball, the eggs distribution, or by using the ``distribute_setup.py`` script -provided online. +It can be installed using pip, and can be done so with the source tarball, +or by using the ``distribute_setup.py`` script provided online. ``distribute_setup.py`` is the simplest and preferred way on all systems. @@ -88,20 +87,13 @@ If your shell has the ``curl`` program you can do:: Notice this file is also provided in the source release. -easy_install or pip -=================== +pip +=== Run easy_install or pip:: - $ easy_install -U distribute $ pip install distribute -If you want to install the latest dev version, you can also run:: - - $ easy_install -U distribute==dev - -This will get the latest development version at: http://bitbucket.org/tarek/distribute/get/0.6-maintenance.zip#egg=distribute-dev - Source installation =================== @@ -128,8 +120,6 @@ Distribute is installed in three steps: Distribute can be removed like this: -- run ``easy_install -m Distribute``. This will remove the Distribute reference - from ``easy-install.pth``. Otherwise, edit the file and remove it yourself. - remove the ``distribute*.egg`` file located in your site-packages directory - remove the ``setuptools.pth`` file located in you site-packages directory - remove the easy_install script located in you ``sys.prefix/bin`` directory From 90552b30f6c3938cb7a5953734a536fb0950ed9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 13 Mar 2010 18:37:30 +0000 Subject: [PATCH 2893/8469] following Barry suggestion for test_build_ext (see #8107) --- tests/test_build_ext.py | 5 +- tests/xxmodule.c | 379 ---------------------------------------- 2 files changed, 4 insertions(+), 380 deletions(-) delete mode 100644 tests/xxmodule.c diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b6c521bf76..5ecfe15bff 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -18,7 +18,10 @@ ALREADY_TESTED = False def _get_source_filename(): - return os.path.join(os.path.dirname(__file__), 'xxmodule.c') + srcdir = sysconfig.get_config_var('srcdir') + if srcdir is None: + return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/xxmodule.c b/tests/xxmodule.c deleted file mode 100644 index 6b498dd6ca..0000000000 --- a/tests/xxmodule.c +++ /dev/null @@ -1,379 +0,0 @@ - -/* Use this file as a template to start implementing a module that - also declares object types. All occurrences of 'Xxo' should be changed - to something reasonable for your objects. After that, all other - occurrences of 'xx' should be changed to something reasonable for your - module. If your module is named foo your sourcefile should be named - foomodule.c. - - You will probably want to delete all references to 'x_attr' and add - your own types of attributes instead. Maybe you want to name your - local variables other than 'self'. If your object type is needed in - other files, you'll have to create a file "foobarobject.h"; see - intobject.h for an example. */ - -/* Xxo objects */ - -#include "Python.h" - -static PyObject *ErrorObject; - -typedef struct { - PyObject_HEAD - PyObject *x_attr; /* Attributes dictionary */ -} XxoObject; - -static PyTypeObject Xxo_Type; - -#define XxoObject_Check(v) (Py_TYPE(v) == &Xxo_Type) - -static XxoObject * -newXxoObject(PyObject *arg) -{ - XxoObject *self; - self = PyObject_New(XxoObject, &Xxo_Type); - if (self == NULL) - return NULL; - self->x_attr = NULL; - return self; -} - -/* Xxo methods */ - -static void -Xxo_dealloc(XxoObject *self) -{ - Py_XDECREF(self->x_attr); - PyObject_Del(self); -} - -static PyObject * -Xxo_demo(XxoObject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":demo")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static PyMethodDef Xxo_methods[] = { - {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, - PyDoc_STR("demo() -> None")}, - {NULL, NULL} /* sentinel */ -}; - -static PyObject * -Xxo_getattr(XxoObject *self, char *name) -{ - if (self->x_attr != NULL) { - PyObject *v = PyDict_GetItemString(self->x_attr, name); - if (v != NULL) { - Py_INCREF(v); - return v; - } - } - return Py_FindMethod(Xxo_methods, (PyObject *)self, name); -} - -static int -Xxo_setattr(XxoObject *self, char *name, PyObject *v) -{ - if (self->x_attr == NULL) { - self->x_attr = PyDict_New(); - if (self->x_attr == NULL) - return -1; - } - if (v == NULL) { - int rv = PyDict_DelItemString(self->x_attr, name); - if (rv < 0) - PyErr_SetString(PyExc_AttributeError, - "delete non-existing Xxo attribute"); - return rv; - } - else - return PyDict_SetItemString(self->x_attr, name, v); -} - -static PyTypeObject Xxo_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Xxo", /*tp_name*/ - sizeof(XxoObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)Xxo_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - (getattrfunc)Xxo_getattr, /*tp_getattr*/ - (setattrfunc)Xxo_setattr, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; -/* --------------------------------------------------------------------- */ - -/* Function of two integers returning integer */ - -PyDoc_STRVAR(xx_foo_doc, -"foo(i,j)\n\ -\n\ -Return the sum of i and j."); - -static PyObject * -xx_foo(PyObject *self, PyObject *args) -{ - long i, j; - long res; - if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) - return NULL; - res = i+j; /* XXX Do something here */ - return PyInt_FromLong(res); -} - - -/* Function of no arguments returning new Xxo object */ - -static PyObject * -xx_new(PyObject *self, PyObject *args) -{ - XxoObject *rv; - - if (!PyArg_ParseTuple(args, ":new")) - return NULL; - rv = newXxoObject(args); - if (rv == NULL) - return NULL; - return (PyObject *)rv; -} - -/* Example with subtle bug from extensions manual ("Thin Ice"). */ - -static PyObject * -xx_bug(PyObject *self, PyObject *args) -{ - PyObject *list, *item; - - if (!PyArg_ParseTuple(args, "O:bug", &list)) - return NULL; - - item = PyList_GetItem(list, 0); - /* Py_INCREF(item); */ - PyList_SetItem(list, 1, PyInt_FromLong(0L)); - PyObject_Print(item, stdout, 0); - printf("\n"); - /* Py_DECREF(item); */ - - Py_INCREF(Py_None); - return Py_None; -} - -/* Test bad format character */ - -static PyObject * -xx_roj(PyObject *self, PyObject *args) -{ - PyObject *a; - long b; - if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -/* ---------- */ - -static PyTypeObject Str_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Str", /*tp_name*/ - 0, /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - 0, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /* see initxx */ /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; - -/* ---------- */ - -static PyObject * -null_richcompare(PyObject *self, PyObject *other, int op) -{ - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - -static PyTypeObject Null_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Null", /*tp_name*/ - 0, /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - 0, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - null_richcompare, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /* see initxx */ /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /* see initxx */ /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; - - -/* ---------- */ - - -/* List of functions defined in the module */ - -static PyMethodDef xx_methods[] = { - {"roj", xx_roj, METH_VARARGS, - PyDoc_STR("roj(a,b) -> None")}, - {"foo", xx_foo, METH_VARARGS, - xx_foo_doc}, - {"new", xx_new, METH_VARARGS, - PyDoc_STR("new() -> new Xx object")}, - {"bug", xx_bug, METH_VARARGS, - PyDoc_STR("bug(o) -> None")}, - {NULL, NULL} /* sentinel */ -}; - -PyDoc_STRVAR(module_doc, -"This is a template module just for instruction."); - -/* Initialization function for the module (*must* be called initxx) */ - -PyMODINIT_FUNC -initxx(void) -{ - PyObject *m; - - /* Due to cross platform compiler issues the slots must be filled - * here. It's required for portability to Windows without requiring - * C++. */ - Null_Type.tp_base = &PyBaseObject_Type; - Null_Type.tp_new = PyType_GenericNew; - Str_Type.tp_base = &PyUnicode_Type; - - /* Finalize the type object including setting type of the new type - * object; doing it here is required for portability, too. */ - if (PyType_Ready(&Xxo_Type) < 0) - return; - - /* Create the module and add the functions */ - m = Py_InitModule3("xx", xx_methods, module_doc); - if (m == NULL) - return; - - /* Add some symbolic constants to the module */ - if (ErrorObject == NULL) { - ErrorObject = PyErr_NewException("xx.error", NULL, NULL); - if (ErrorObject == NULL) - return; - } - Py_INCREF(ErrorObject); - PyModule_AddObject(m, "error", ErrorObject); - - /* Add Str */ - if (PyType_Ready(&Str_Type) < 0) - return; - PyModule_AddObject(m, "Str", (PyObject *)&Str_Type); - - /* Add Null */ - if (PyType_Ready(&Null_Type) < 0) - return; - PyModule_AddObject(m, "Null", (PyObject *)&Null_Type); -} From 38ae8ecbdc6a9f285a56add8c695b10b2786c679 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 13 Mar 2010 16:53:19 -0500 Subject: [PATCH 2894/8469] added the --no-find-links option --HG-- branch : distribute extra : rebase_source : fc2cbd4d369f7d5c77cae03e39354245b185cc60 --- CHANGES.txt | 3 ++- docs/easy_install.txt | 5 +++++ setuptools/command/easy_install.py | 14 +++++++++++--- setuptools/tests/test_easy_install.py | 25 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index eeab73c642..803045b6a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,7 +11,8 @@ CHANGES * Added indexsidebar.html into MANIFEST.in * Issue 108: Fixed TypeError with Python3.1 * Issue 121: Fixed --help install command trying to actually install. -* Issue 112: Added an os.makedirs so that Tarek's solution will work. +* Issue 112: Added an os.makedirs so that Tarek's solution will work. +* Issue 133: Added --no-find-links to easy_install ------ 0.6.10 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 3e39b8111b..a469bb55a3 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -768,6 +768,11 @@ Command-Line Options package not being available locally, or due to the use of the ``--update`` or ``-U`` option. +``--no-find-links`` Blocks the addition of any link. (New in Distribute 0.6.11) + This is useful if you want to avoid adding links defined in a project + easy_install is installing (wether it's a requested project or a + dependency.). When used, ``--find-links`` is ignored. + ``--delete-conflicting, -D`` (Removed in 0.6a11) (As of 0.6a11, this option is no longer necessary; please do not use it!) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 366ac7bcf8..33b14bf7a1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -91,6 +91,8 @@ class easy_install(Command): ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), + ('no-find-links', None, + "Don't load find-links defined in packages being installed") ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', @@ -112,6 +114,7 @@ def initialize_options(self): self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None self.version = None + self.no_find_links = None # Options not specifiable via command line self.package_index = None @@ -153,6 +156,9 @@ def finalize_options(self): if self.script_dir is None: self.script_dir = self.install_dir + if self.no_find_links is None: + self.no_find_links = False + # Let install_dir get set by install_lib command, which in turn # gets its info from the install command, and takes into account # --prefix and --home and all that other crud. @@ -204,7 +210,8 @@ def finalize_options(self): self.find_links = [] if self.local_snapshots_ok: self.package_index.scan_egg_links(self.shadow_path+sys.path) - self.package_index.add_find_links(self.find_links) + if not self.no_find_links: + self.package_index.add_find_links(self.find_links) self.set_undefined_options('install_lib', ('optimize','optimize')) if not isinstance(self.optimize,int): try: @@ -229,7 +236,7 @@ def finalize_options(self): self.outputs = [] def run(self): - if self.verbose<>self.distribution.verbose: + if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: for spec in self.args: @@ -523,7 +530,8 @@ def process_distribution(self, requirement, dist, deps=True, *info): self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) - if dist.has_metadata('dependency_links.txt'): + if (dist.has_metadata('dependency_links.txt') and + not self.no_find_links): self.package_index.add_find_links( dist.get_metadata_lines('dependency_links.txt') ) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 95909ca766..6f660a1e11 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -90,3 +90,28 @@ def _parse_command_line(self): os.chdir(old_wd) shutil.rmtree(dir) + def test_no_find_links(self): + # new option '--no-find-links', that blocks find-links added at + # the project level + dist = Distribution() + cmd = easy_install(dist) + cmd.check_pth_processing = lambda : True + cmd.no_find_links = True + cmd.find_links = ['link1', 'link2'] + cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') + cmd.args = ['ok'] + cmd.ensure_finalized() + self.assertEquals(cmd.package_index.scanned_urls, {}) + + # let's try without it (default behavior) + cmd = easy_install(dist) + cmd.check_pth_processing = lambda : True + cmd.find_links = ['link1', 'link2'] + cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') + cmd.args = ['ok'] + cmd.ensure_finalized() + keys = cmd.package_index.scanned_urls.keys() + keys.sort() + self.assertEquals(keys, ['link1', 'link2']) + + From 892006c7928c6f51cc81fa3238429b758f0cf719 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 14 Mar 2010 10:23:39 +0000 Subject: [PATCH 2895/8469] Merged revisions 78018,78035-78040,78042-78043,78046,78048-78052,78054,78059,78075-78080 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78018 | georg.brandl | 2010-02-06 11:08:21 +0100 (Sa, 06 Feb 2010) | 1 line #7864: make deprecation notices a bit clearer. ........ r78035 | georg.brandl | 2010-02-06 23:44:17 +0100 (Sa, 06 Feb 2010) | 1 line Fix duplicate import. ........ r78036 | georg.brandl | 2010-02-06 23:49:47 +0100 (Sa, 06 Feb 2010) | 1 line Remove unused import. ........ r78037 | georg.brandl | 2010-02-06 23:59:15 +0100 (Sa, 06 Feb 2010) | 1 line No need to assign the results of expressions used only for side effects. ........ r78038 | georg.brandl | 2010-02-07 00:02:29 +0100 (So, 07 Feb 2010) | 1 line Add a missing import. ........ r78039 | georg.brandl | 2010-02-07 00:06:24 +0100 (So, 07 Feb 2010) | 1 line Add missing imports. ........ r78040 | georg.brandl | 2010-02-07 00:08:00 +0100 (So, 07 Feb 2010) | 1 line Fix a few UnboundLocalErrors in test_long. ........ r78042 | georg.brandl | 2010-02-07 00:12:12 +0100 (So, 07 Feb 2010) | 1 line Add missing import. ........ r78043 | georg.brandl | 2010-02-07 00:12:19 +0100 (So, 07 Feb 2010) | 1 line Remove duplicate test method. ........ r78046 | georg.brandl | 2010-02-07 00:18:00 +0100 (So, 07 Feb 2010) | 1 line Fix various missing import/unbound name errors. ........ r78048 | georg.brandl | 2010-02-07 00:23:45 +0100 (So, 07 Feb 2010) | 1 line We heard you like test failures so we put unbound locals in your test so that you can fail while you fail. ........ r78049 | georg.brandl | 2010-02-07 00:33:33 +0100 (So, 07 Feb 2010) | 1 line Fix import/access for some identifiers. _TestSharedCTypes does not seem to be executed? ........ r78050 | georg.brandl | 2010-02-07 00:34:10 +0100 (So, 07 Feb 2010) | 1 line Fix more unbound locals in code paths that do not seem to be used. ........ r78051 | georg.brandl | 2010-02-07 00:53:52 +0100 (So, 07 Feb 2010) | 1 line Add missing import when running these tests standalone. ........ r78052 | georg.brandl | 2010-02-07 00:54:04 +0100 (So, 07 Feb 2010) | 1 line Add missing import when running these tests standalone. ........ r78054 | georg.brandl | 2010-02-07 00:58:25 +0100 (So, 07 Feb 2010) | 1 line Add missing import. ........ r78059 | georg.brandl | 2010-02-07 12:34:15 +0100 (So, 07 Feb 2010) | 1 line Use "regexp" consistently. ........ r78075 | georg.brandl | 2010-02-07 13:16:12 +0100 (So, 07 Feb 2010) | 1 line Fix another duplicated test method. ........ r78076 | georg.brandl | 2010-02-07 13:19:43 +0100 (So, 07 Feb 2010) | 1 line Fix wrong usage of "except X, Y:". ........ r78077 | georg.brandl | 2010-02-07 13:25:50 +0100 (So, 07 Feb 2010) | 1 line Fix two redefined test methods. ........ r78078 | georg.brandl | 2010-02-07 13:27:06 +0100 (So, 07 Feb 2010) | 1 line Fix a redefined test method. ........ r78079 | georg.brandl | 2010-02-07 13:34:26 +0100 (So, 07 Feb 2010) | 1 line Add a minimal test for fnmatchcase(). ........ r78080 | georg.brandl | 2010-02-07 13:55:12 +0100 (So, 07 Feb 2010) | 1 line Remove duplicate test method. ........ --- tests/test_bdist.py | 4 +++- tests/test_bdist_dumb.py | 4 +++- tests/test_bdist_msi.py | 4 +++- tests/test_bdist_rpm.py | 4 +++- tests/test_bdist_wininst.py | 4 +++- tests/test_cmd.py | 4 ++-- tests/test_cygwinccompiler.py | 4 ++-- tests/test_emxccompiler.py | 4 ++-- tests/test_sysconfig.py | 1 + 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index f2849a9756..29dcc7c8ba 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -5,6 +5,8 @@ import tempfile import shutil +from test.support import run_unittest + from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support @@ -40,4 +42,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 5eaef2a9d7..746144bf5b 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -11,6 +11,8 @@ except ImportError: zlib = None +from test.support import run_unittest + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -100,4 +102,4 @@ def test_suite(): return unittest.makeSuite(BuildDumbTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index ba2d3e19c2..2b2d8542ee 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -2,6 +2,8 @@ import unittest import sys +from test.support import run_unittest + from distutils.tests import support @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") @@ -20,4 +22,4 @@ def test_suite(): return unittest.makeSuite(BDistMSITestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2aa257f7e6..1014e549af 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -6,6 +6,8 @@ import tempfile import shutil +from test.support import run_unittest + from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support @@ -122,4 +124,4 @@ def test_suite(): return unittest.makeSuite(BuildRpmTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 9b1ba6d107..ffe413536c 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,6 +1,8 @@ """Tests for distutils.command.bdist_wininst.""" import unittest +from test.support import run_unittest + from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -27,4 +29,4 @@ def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 55ae421d46..728652e2ca 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,7 +1,7 @@ """Tests for distutils.cmd.""" import unittest import os -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.cmd import Command from distutils.dist import Distribution @@ -124,4 +124,4 @@ def test_suite(): return unittest.makeSuite(CommandTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 4b95dfa3aa..374f392d61 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -6,7 +6,7 @@ import warnings import sysconfig -from test.support import check_warnings +from test.support import check_warnings, run_unittest from test.support import captured_stdout from distutils import cygwinccompiler @@ -109,4 +109,4 @@ def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py index 2176d641d0..1360f8297a 100644 --- a/tests/test_emxccompiler.py +++ b/tests/test_emxccompiler.py @@ -4,7 +4,7 @@ import os import warnings -from test.support import check_warnings +from test.support import check_warnings, run_unittest from test.support import captured_stdout from distutils.emxccompiler import get_versions @@ -30,4 +30,4 @@ def test_suite(): return unittest.makeSuite(EmxCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index e7df803168..9496950f70 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,6 +2,7 @@ import os import test import unittest +import shutil from distutils import sysconfig from distutils.tests import support From b99d0e8aefe94a718630cb6be3369e290a6ec060 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Mon, 15 Mar 2010 22:13:19 -0400 Subject: [PATCH 2896/8469] removed unsused imports --HG-- branch : distribute extra : rebase_source : 6c1870024a04c1b5393c85a5782809ef409c66a6 --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 33b14bf7a1..c96a43fd1e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -9,7 +9,7 @@ __ http://peak.telecommunity.com/DevCenter/EasyInstall """ -import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob from setuptools import Command from setuptools.sandbox import run_setup @@ -18,7 +18,7 @@ from distutils.errors import DistutilsArgError, DistutilsOptionError, \ DistutilsError from setuptools.archive_util import unpack_archive -from setuptools.package_index import PackageIndex, parse_bdist_wininst +from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info from pkg_resources import * From dee0ec5d40f2be83be1596fd12dbdb9b5eb159d0 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Mon, 15 Mar 2010 22:24:45 -0400 Subject: [PATCH 2897/8469] updated links to the new location of the easy_install docs --HG-- branch : distribute extra : rebase_source : 9d757c4d6c0d0c0b14b381961af69907e079d0ce --- setuptools/command/easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c96a43fd1e..843c261c38 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -7,7 +7,8 @@ packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ http://peak.telecommunity.com/DevCenter/EasyInstall +__ http://packages.python.org/distribute/easy_install.html + """ import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob @@ -349,7 +350,7 @@ def cant_write_to_target(self): For information on other options, you may wish to consult the documentation at: - http://peak.telecommunity.com/EasyInstall.html + http://packages.python.org/distribute/easy_install.html Please make the appropriate changes for your system and try again. """ @@ -1084,7 +1085,7 @@ def no_default_version_msg(self): * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations + http://packages.python.org/distribute/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" % ( self.install_dir, os.environ.get('PYTHONPATH','') From ff3ee4aa6c6800d813162c09a58c6265c4675701 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Mon, 15 Mar 2010 22:41:40 -0400 Subject: [PATCH 2898/8469] fixed spelling typo --HG-- branch : distribute extra : rebase_source : 5ae197eeead6eae5f689f01ced730be068e8c64a --- setuptools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index d03d0bf08b..c8a631a04c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -19,7 +19,8 @@ # a distribution with the same version. # # The distribute_setup script for instance, will check if this -# attribute is present to decide wether to reinstall the package +# attribute is present to decide whether to reinstall the package +# or not. _distribute = True bootstrap_install_from = None From 4b756caf706ee500a8b2fc334dd4d382188d57fa Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 16 Mar 2010 20:33:24 +0100 Subject: [PATCH 2899/8469] document the --user cli flag --HG-- branch : distribute extra : rebase_source : 5d5028ddde7b61624792d6670cd00f57d7ed8646 --- CHANGES.txt | 2 ++ docs/easy_install.txt | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 803045b6a7..86ed052152 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,8 @@ CHANGES * Issue 121: Fixed --help install command trying to actually install. * Issue 112: Added an os.makedirs so that Tarek's solution will work. * Issue 133: Added --no-find-links to easy_install +* Added easy_install --user +* Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account ------ 0.6.10 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index a469bb55a3..ab008a1d90 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -144,6 +144,10 @@ and Viewing Source Packages`_ below for more info.):: easy_install --editable --build-directory ~/projects SQLObject +**Example 7**. (New in 0.6.11) Install a distribution within your home dir:: + + easy_install --user SQLAlchemy + Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils`` "distribution" names), and package+version specifiers. In each case, it will attempt to locate the latest available version that meets your criteria. @@ -716,6 +720,10 @@ Command-Line Options versions of a package, but do not want to reset the version that will be run by scripts that are already installed. +``--user`` (New in 0.6.11) + Use the the user-site-packages as specified in :pep:`370` + instead of the global site-packages. + ``--always-copy, -a`` (New in 0.5a4) Copy all needed distributions to the installation directory, even if they are already present in a directory on sys.path. In older versions of From 1e0efd73526d8014b1eeb4e238f5a288fa0d75a7 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 18 Mar 2010 22:14:36 +0000 Subject: [PATCH 2900/8469] Bumping to 2.6.5 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 888dd54a6b..9e7ab903d2 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.5rc2" +__version__ = "2.6.5" #--end constants-- From ad8054f8a9cc39437ae2280e4b04e9a38eb8ed65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 19 Mar 2010 21:56:34 +0000 Subject: [PATCH 2901/8469] Fixed #2698 - now reads the compiler option when creating the compiler --- command/build_ext.py | 2 +- tests/test_build_ext.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1596586499..bd61bc56f3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -310,7 +310,7 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - self.compiler = new_compiler(compiler=None, + self.compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index f992928d0a..b7cdc20aa4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -329,6 +329,7 @@ def test_get_outputs(self): self.assertEquals(so_dir, other_tmp_dir) cmd.inplace = 0 + cmd.compiler = None cmd.run() so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) From 2fd59dc3b01d05c832ac667d16b3355315c35608 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 20 Mar 2010 20:47:27 +0000 Subject: [PATCH 2902/8469] version becomes 3.1.2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2e6a6fb634..6dca599fd6 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.2rc1" +__version__ = "3.1.2" #--end constants-- From 5db75ca65fe87f9aa02424394ac2c0dcc3ec1c7b Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Sun, 21 Mar 2010 11:50:17 +0000 Subject: [PATCH 2903/8469] No more deprecation warnings for distutils.sysconfig, following r78666. But when the "dl" module is available, it gives a py3k deprecation warning. --- tests/test_build_ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4860c9bf24..f97ae1a7be 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -358,6 +358,9 @@ def test_setuptools_compat(self): import distutils.core, distutils.extension, distutils.command.build_ext saved_ext = distutils.extension.Extension try: + # on some platforms, it loads the deprecated "dl" module + test_support.import_module('setuptools_build_ext', deprecated=True) + # theses import patch Distutils' Extension class from setuptools_build_ext import build_ext as setuptools_build_ext from setuptools_extension import Extension From 0ad92a85f3a3c1fc73154c6e95c2d39d6e189ae2 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Thu, 1 Apr 2010 18:17:09 +0000 Subject: [PATCH 2904/8469] #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote. --- command/build_ext.py | 2 +- util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8248089fec..aeb6b744dc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -676,7 +676,7 @@ def get_ext_filename(self, ext_name): # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext + return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext def get_export_symbols (self, ext): diff --git a/util.py b/util.py index 1a55f70894..994dd211be 100644 --- a/util.py +++ b/util.py @@ -206,7 +206,7 @@ def convert_path (pathname): paths.remove('.') if not paths: return os.curdir - return apply(os.path.join, paths) + return os.path.join(*paths) # convert_path () From fbd4a04bd57b59a25516e4d66f93b29219f3f51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 2 Apr 2010 21:14:04 +0000 Subject: [PATCH 2905/8469] removed the local copy of xxmodule, and skip only test_build_ext when xxmodule is not found, not the whole unittest --- tests/test_build_ext.py | 40 +++-- tests/xxmodule.c | 379 ---------------------------------------- 2 files changed, 21 insertions(+), 398 deletions(-) delete mode 100644 tests/xxmodule.c diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index f97ae1a7be..beb6d96c8b 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,15 +19,11 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') - fallback_path = os.path.join(os.path.dirname(__file__), 'xxmodule.c') if srcdir is None: - return fallback_path - locations = (srcdir, os.path.dirname(sys.executable)) - for location in locations: - path = os.path.join(location, 'Modules', 'xxmodule.c') - if os.path.exists(path): - return path - return fallback_path + return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') + return os.path.join(srcdir, 'Modules', 'xxmodule.c') + +_XX_MODULE_PATH = _get_source_filename() class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, @@ -37,10 +33,24 @@ def setUp(self): # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") - self.sys_path = sys.path[:] - sys.path.append(self.tmp_dir) - shutil.copy(_get_source_filename(), self.tmp_dir) + if os.path.exists(_XX_MODULE_PATH): + self.sys_path = sys.path[:] + sys.path.append(self.tmp_dir) + shutil.copy(_XX_MODULE_PATH, self.tmp_dir) + + def tearDown(self): + # Get everything back to normal + if os.path.exists(_XX_MODULE_PATH): + test_support.unload('xx') + sys.path[:] = self.sys_path + # XXX on Windows the test leaves a directory + # with xx module in TEMP + shutil.rmtree(self.tmp_dir, os.name == 'nt' or + sys.platform == 'cygwin') + super(BuildExtTestCase, self).tearDown() + @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), + 'xxmodule.c not found') def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -83,14 +93,6 @@ def test_build_ext(self): self.assert_(isinstance(xx.Null(), xx.Null)) self.assert_(isinstance(xx.Str(), xx.Str)) - def tearDown(self): - # Get everything back to normal - test_support.unload('xx') - sys.path[:] = self.sys_path - # XXX on Windows the test leaves a directory with xx module in TEMP - shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') - super(BuildExtTestCase, self).tearDown() - def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) diff --git a/tests/xxmodule.c b/tests/xxmodule.c deleted file mode 100644 index 6b498dd6ca..0000000000 --- a/tests/xxmodule.c +++ /dev/null @@ -1,379 +0,0 @@ - -/* Use this file as a template to start implementing a module that - also declares object types. All occurrences of 'Xxo' should be changed - to something reasonable for your objects. After that, all other - occurrences of 'xx' should be changed to something reasonable for your - module. If your module is named foo your sourcefile should be named - foomodule.c. - - You will probably want to delete all references to 'x_attr' and add - your own types of attributes instead. Maybe you want to name your - local variables other than 'self'. If your object type is needed in - other files, you'll have to create a file "foobarobject.h"; see - intobject.h for an example. */ - -/* Xxo objects */ - -#include "Python.h" - -static PyObject *ErrorObject; - -typedef struct { - PyObject_HEAD - PyObject *x_attr; /* Attributes dictionary */ -} XxoObject; - -static PyTypeObject Xxo_Type; - -#define XxoObject_Check(v) (Py_TYPE(v) == &Xxo_Type) - -static XxoObject * -newXxoObject(PyObject *arg) -{ - XxoObject *self; - self = PyObject_New(XxoObject, &Xxo_Type); - if (self == NULL) - return NULL; - self->x_attr = NULL; - return self; -} - -/* Xxo methods */ - -static void -Xxo_dealloc(XxoObject *self) -{ - Py_XDECREF(self->x_attr); - PyObject_Del(self); -} - -static PyObject * -Xxo_demo(XxoObject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":demo")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static PyMethodDef Xxo_methods[] = { - {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, - PyDoc_STR("demo() -> None")}, - {NULL, NULL} /* sentinel */ -}; - -static PyObject * -Xxo_getattr(XxoObject *self, char *name) -{ - if (self->x_attr != NULL) { - PyObject *v = PyDict_GetItemString(self->x_attr, name); - if (v != NULL) { - Py_INCREF(v); - return v; - } - } - return Py_FindMethod(Xxo_methods, (PyObject *)self, name); -} - -static int -Xxo_setattr(XxoObject *self, char *name, PyObject *v) -{ - if (self->x_attr == NULL) { - self->x_attr = PyDict_New(); - if (self->x_attr == NULL) - return -1; - } - if (v == NULL) { - int rv = PyDict_DelItemString(self->x_attr, name); - if (rv < 0) - PyErr_SetString(PyExc_AttributeError, - "delete non-existing Xxo attribute"); - return rv; - } - else - return PyDict_SetItemString(self->x_attr, name, v); -} - -static PyTypeObject Xxo_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Xxo", /*tp_name*/ - sizeof(XxoObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)Xxo_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - (getattrfunc)Xxo_getattr, /*tp_getattr*/ - (setattrfunc)Xxo_setattr, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; -/* --------------------------------------------------------------------- */ - -/* Function of two integers returning integer */ - -PyDoc_STRVAR(xx_foo_doc, -"foo(i,j)\n\ -\n\ -Return the sum of i and j."); - -static PyObject * -xx_foo(PyObject *self, PyObject *args) -{ - long i, j; - long res; - if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) - return NULL; - res = i+j; /* XXX Do something here */ - return PyInt_FromLong(res); -} - - -/* Function of no arguments returning new Xxo object */ - -static PyObject * -xx_new(PyObject *self, PyObject *args) -{ - XxoObject *rv; - - if (!PyArg_ParseTuple(args, ":new")) - return NULL; - rv = newXxoObject(args); - if (rv == NULL) - return NULL; - return (PyObject *)rv; -} - -/* Example with subtle bug from extensions manual ("Thin Ice"). */ - -static PyObject * -xx_bug(PyObject *self, PyObject *args) -{ - PyObject *list, *item; - - if (!PyArg_ParseTuple(args, "O:bug", &list)) - return NULL; - - item = PyList_GetItem(list, 0); - /* Py_INCREF(item); */ - PyList_SetItem(list, 1, PyInt_FromLong(0L)); - PyObject_Print(item, stdout, 0); - printf("\n"); - /* Py_DECREF(item); */ - - Py_INCREF(Py_None); - return Py_None; -} - -/* Test bad format character */ - -static PyObject * -xx_roj(PyObject *self, PyObject *args) -{ - PyObject *a; - long b; - if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -/* ---------- */ - -static PyTypeObject Str_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Str", /*tp_name*/ - 0, /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - 0, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /* see initxx */ /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; - -/* ---------- */ - -static PyObject * -null_richcompare(PyObject *self, PyObject *other, int op) -{ - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - -static PyTypeObject Null_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) - "xxmodule.Null", /*tp_name*/ - 0, /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - 0, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - null_richcompare, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /* see initxx */ /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /* see initxx */ /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ -}; - - -/* ---------- */ - - -/* List of functions defined in the module */ - -static PyMethodDef xx_methods[] = { - {"roj", xx_roj, METH_VARARGS, - PyDoc_STR("roj(a,b) -> None")}, - {"foo", xx_foo, METH_VARARGS, - xx_foo_doc}, - {"new", xx_new, METH_VARARGS, - PyDoc_STR("new() -> new Xx object")}, - {"bug", xx_bug, METH_VARARGS, - PyDoc_STR("bug(o) -> None")}, - {NULL, NULL} /* sentinel */ -}; - -PyDoc_STRVAR(module_doc, -"This is a template module just for instruction."); - -/* Initialization function for the module (*must* be called initxx) */ - -PyMODINIT_FUNC -initxx(void) -{ - PyObject *m; - - /* Due to cross platform compiler issues the slots must be filled - * here. It's required for portability to Windows without requiring - * C++. */ - Null_Type.tp_base = &PyBaseObject_Type; - Null_Type.tp_new = PyType_GenericNew; - Str_Type.tp_base = &PyUnicode_Type; - - /* Finalize the type object including setting type of the new type - * object; doing it here is required for portability, too. */ - if (PyType_Ready(&Xxo_Type) < 0) - return; - - /* Create the module and add the functions */ - m = Py_InitModule3("xx", xx_methods, module_doc); - if (m == NULL) - return; - - /* Add some symbolic constants to the module */ - if (ErrorObject == NULL) { - ErrorObject = PyErr_NewException("xx.error", NULL, NULL); - if (ErrorObject == NULL) - return; - } - Py_INCREF(ErrorObject); - PyModule_AddObject(m, "error", ErrorObject); - - /* Add Str */ - if (PyType_Ready(&Str_Type) < 0) - return; - PyModule_AddObject(m, "Str", (PyObject *)&Str_Type); - - /* Add Null */ - if (PyType_Ready(&Null_Type) < 0) - return; - PyModule_AddObject(m, "Null", (PyObject *)&Null_Type); -} From 147849f8190ccae1b36126562b12e04fe4d58a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 2 Apr 2010 21:24:55 +0000 Subject: [PATCH 2906/8469] Merged revisions 79618 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79618 | tarek.ziade | 2010-04-02 23:14:04 +0200 (Fri, 02 Apr 2010) | 1 line removed the local copy of xxmodule, and skip only test_build_ext when xxmodule is not found, not the whole unittest ........ --- tests/test_build_ext.py | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d09718366d..aca2be2180 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -25,19 +25,23 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') + if srcdir is None: + return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -class BuildExtTestCase(TempdirManager, - LoggingSilencer, - unittest.TestCase): +_XX_MODULE_PATH = _get_source_filename() + +class BuildExtTestCase(TempdirManager, LoggingSilencer, unittest.TestCase): + def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path, sys.path[:] - sys.path.append(self.tmp_dir) - shutil.copy(_get_source_filename(), self.tmp_dir) + if os.path.exists(_XX_MODULE_PATH): + self.sys_path = sys.path[:] + sys.path.append(self.tmp_dir) + shutil.copy(_XX_MODULE_PATH, self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -45,6 +49,19 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE + def tearDown(self): + # Get everything back to normal + if os.path.exists(_XX_MODULE_PATH): + test_support.unload('xx') + sys.path[:] = self.sys_path + # XXX on Windows the test leaves a directory + # with xx module in TEMP + shutil.rmtree(self.tmp_dir, os.name == 'nt' or + sys.platform == 'cygwin') + super(BuildExtTestCase, self).tearDown() + + @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), + 'xxmodule.c not found') def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -87,18 +104,6 @@ def test_build_ext(self): self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) - def tearDown(self): - # Get everything back to normal - support.unload('xx') - sys.path = self.sys_path[0] - sys.path[:] = self.sys_path[1] - if sys.version > "2.6": - import site - site.USER_BASE = self.old_user_base - from distutils.command import build_ext - build_ext.USER_BASE = self.old_user_base - super(BuildExtTestCase, self).tearDown() - def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) From 7b1cf0becdb877baafa3aa1ce8af17ac4c1ad0f7 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Fri, 2 Apr 2010 22:38:52 +0000 Subject: [PATCH 2907/8469] Change test_support to support. Fixes a failing test on Windows. --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index aca2be2180..e41a824fde 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -52,7 +52,7 @@ def setUp(self): def tearDown(self): # Get everything back to normal if os.path.exists(_XX_MODULE_PATH): - test_support.unload('xx') + support.unload('xx') sys.path[:] = self.sys_path # XXX on Windows the test leaves a directory # with xx module in TEMP From 53b099f959636719525be988ee6e4a653f2d748f Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 21:54:35 +0200 Subject: [PATCH 2908/8469] auth=b'Basic ' will throw a SyntaxError on 2.5 --HG-- branch : distribute extra : rebase_source : cbac0260bc300fc00ce3517ecd96d5bedc5cd896 --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index e961a0df18..381ba1df4a 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -92,7 +92,7 @@ def upload_file(self, filename): try: # base64 only works with bytes in Python 3. encoded_creds = base64.encodebytes(credentials.encode('utf8')) auth = b"Basic " - except AttributeError: + except (AttributeError, SyntaxError): encoded_creds = base64.encodestring(credentials) auth = "Basic " auth += encoded_creds.strip() From 4c4b93069581da0279ef1b037367592040a25532 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 22:18:39 +0200 Subject: [PATCH 2909/8469] proper fix to avoid a syntax error on 2.5 --HG-- branch : distribute extra : rebase_source : 320da069dcb5d4c3ffb94e6e4f0e78a1bef8a305 --- setuptools/command/upload_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 381ba1df4a..176862651e 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -91,8 +91,8 @@ def upload_file(self, filename): credentials = self.username + ':' + self.password try: # base64 only works with bytes in Python 3. encoded_creds = base64.encodebytes(credentials.encode('utf8')) - auth = b"Basic " - except (AttributeError, SyntaxError): + auth = bytes("Basic ") + except AttributeError: encoded_creds = base64.encodestring(credentials) auth = "Basic " auth += encoded_creds.strip() From 58ec0860c3fef3a4c1a3da60b8340a21420724bd Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 22:26:07 +0200 Subject: [PATCH 2910/8469] using a py3 marker instead of a try..except --HG-- branch : distribute extra : rebase_source : e3ccffb120f1fdaddfa0746c0a592d6fbaf0dcd1 --- setuptools/command/upload_docs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 176862651e..ea2bad7e26 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -12,11 +12,14 @@ import base64 import urlparse import tempfile +import sys from distutils import log from distutils.errors import DistutilsOptionError from distutils.command.upload import upload +_IS_PYTHON3 = sys.version > '3' + try: bytes except NameError: @@ -89,10 +92,10 @@ def upload_file(self, filename): } # set up the authentication credentials = self.username + ':' + self.password - try: # base64 only works with bytes in Python 3. + if _IS_PYTHON3: # base64 only works with bytes in Python 3. encoded_creds = base64.encodebytes(credentials.encode('utf8')) auth = bytes("Basic ") - except AttributeError: + else: encoded_creds = base64.encodestring(credentials) auth = "Basic " auth += encoded_creds.strip() From c8f35c14f32aa8c074530413600386bf0bd8b55e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 22:36:37 +0200 Subject: [PATCH 2911/8469] make sure site.USER_BASE is used only if python is >=2.6 --HG-- branch : distribute extra : rebase_source : aece7b87a7f0b48949f2859fa2174bfa93b04048 --- setuptools/command/easy_install.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5d29550d3c..975f70e4c6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -142,8 +142,12 @@ def initialize_options(self): self.install_data = None self.install_base = None self.install_platbase = None - self.install_userbase = site.USER_BASE - self.install_usersite = site.USER_SITE + if HAS_USER_SITE: + self.install_userbase = site.USER_BASE + self.install_usersite = site.USER_SITE + else: + self.install_userbase = None + self.install_usersite = None self.no_find_links = None # Options not specifiable via command line @@ -201,7 +205,7 @@ def finalize_options(self): # fix the install_dir if "--user" was used #XXX: duplicate of the code in the setup command - if self.user: + if self.user and HAS_USER_SITE: self.create_home_path() if self.install_userbase is None: raise DistutilsPlatformError( @@ -214,7 +218,7 @@ def finalize_options(self): self.expand_basedirs() self.expand_dirs() - + self._expand('install_dir','script_dir','build_directory','site_dirs') # If a non-default installation directory was specified, default the # script directory to match it. From 4da7cdd3ea61af90e56e0cbe63811b8ef13cd484 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 22:59:48 +0200 Subject: [PATCH 2912/8469] Removed spurious UserWarnings. Fixes #134 --HG-- branch : distribute extra : rebase_source : be9d958a083e556228597d044267d7e15a826649 --- CHANGES.txt | 1 + pkg_resources.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 86ed052152..8907fa2277 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,7 @@ CHANGES * Issue 133: Added --no-find-links to easy_install * Added easy_install --user * Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account +* Issue 134: removed spurious UserWarnings. Patch by VanLindberg ------ 0.6.10 diff --git a/pkg_resources.py b/pkg_resources.py index f31789e9e9..6d96f5c22b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2332,7 +2332,8 @@ def check_version_conflict(self): if modname in ('pkg_resources', 'setuptools', 'site'): continue fn = getattr(sys.modules[modname], '__file__', None) - if fn and normalize_path(fn).startswith(loc): + if fn and (normalize_path(fn).startswith(loc) or + fn.startswith(self.location)): continue issue_warning( "Module %s was already imported from %s, but %s is being added" From 4331740bfbdc6e148808375c406dab795ae43d9b Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 7 Apr 2010 10:00:46 +0200 Subject: [PATCH 2913/8469] make sure we test that the directory exists before we install stuff asked by setup_requires fixes #138 --HG-- branch : distribute extra : rebase_source : 1078501b886e4f0864b4ce84517b2fbc5399da35 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 4 +++- setuptools/tests/test_develop.py | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8907fa2277..e74f1714ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,7 @@ CHANGES * Added easy_install --user * Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account * Issue 134: removed spurious UserWarnings. Patch by VanLindberg +* Issue 138: cant_write_to_target error when setup_requires is used. ------ 0.6.10 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 975f70e4c6..2d85475513 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -462,7 +462,9 @@ def check_pth_processing(self): ok_exists = os.path.exists(ok_file) try: if ok_exists: os.unlink(ok_file) - os.makedirs(os.path.dirname(ok_file)) + dirname = os.path.dirname(ok_file) + if not os.path.exists(dirname): + os.makedirs(dirname) f = open(pth_file,'w') except (OSError,IOError): self.cant_write_to_target() diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 10b2be9e73..a567dd5a74 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -6,6 +6,7 @@ import site from StringIO import StringIO +from distutils.errors import DistutilsError from setuptools.command.develop import develop from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -18,7 +19,7 @@ class TestDevelopTest(unittest.TestCase): - def setUp(self): + def setUp(self): self.dir = tempfile.mkdtemp() setup = os.path.join(self.dir, 'setup.py') f = open(setup, 'w') @@ -32,7 +33,7 @@ def setUp(self): self.old_site = site.USER_SITE site.USER_SITE = tempfile.mkdtemp() - def tearDown(self): + def tearDown(self): os.chdir(self.old_cwd) shutil.rmtree(self.dir) if sys.version >= "2.6": @@ -63,3 +64,19 @@ def test_develop(self): content.sort() self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) + def test_develop_with_setup_requires(self): + + wanted = ("Could not find suitable distribution for " + "Requirement.parse('I-DONT-EXIST')") + old_dir = os.getcwd() + os.chdir(self.dir) + try: + try: + dist = Distribution({'setup_requires': ['I_DONT_EXIST']}) + except DistutilsError, e: + error = str(e) + if error == wanted: + pass + finally: + os.chdir(old_dir) + From 4a4731eda22170a77bb24dd3c7fc8ff4cafecf9d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 10 Apr 2010 16:22:05 +0000 Subject: [PATCH 2914/8469] bump version to 2.7b1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0158996441..aa55cccb77 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7a4" +__version__ = "2.7b1" #--end constants-- From ecfcbac59e57961b85a43bc7216ad4acd1797822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 12 Apr 2010 08:23:49 +0000 Subject: [PATCH 2915/8469] Fixed #8375 - test_distutils now checks what remains to be cleaned up during tearDown --- tests/support.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/support.py b/tests/support.py index d60da854be..45c94411ee 100644 --- a/tests/support.py +++ b/tests/support.py @@ -63,6 +63,8 @@ def tearDown(self): super().tearDown() while self.tempdirs: d = self.tempdirs.pop() + if not os.path.exists(d): + continue shutil.rmtree(d, os.name in ('nt', 'cygwin')) def mkdtemp(self): From b53fad8a9e4e807564d11db3ed5a75187e3e1f6c Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 29 Apr 2010 09:39:43 +0200 Subject: [PATCH 2916/8469] imply --user for install commands if installed in user-site --HG-- branch : distribute extra : rebase_source : 26878b87685bbd1b65c12763039a059937ca2228 --- setuptools/command/easy_install.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2d85475513..7af42c6546 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -122,7 +122,13 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): - self.user = 0 + if HAS_USER_SITE: + whereami = os.path.abspath(__file__) + self.user = (whereami.startswith(site.USER_SITE) + or whereami.startswith(site.USER_BASE)) + else: + self.user = 0 + self.zip_ok = self.local_snapshots_ok = None self.install_dir = self.script_dir = self.exclude_scripts = None self.index_url = None From 48467da45e5b9e8a9c91eccfba55a9f0d483debd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 30 Apr 2010 12:15:12 +0000 Subject: [PATCH 2917/8469] Fixed #8577. distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir --- sysconfig.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 54ccec4953..bb53315bca 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -71,15 +71,19 @@ def get_python_inc(plat_specific=0, prefix=None): """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX + if os.name == "posix": if python_build: - base = os.path.dirname(os.path.abspath(sys.executable)) + buildir = os.path.dirname(sys.executable) if plat_specific: - inc_dir = base + # python.h is located in the buildir + inc_dir = buildir else: - inc_dir = os.path.join(base, "Include") - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") + # the source dir is relative to the buildir + srcdir = os.path.abspath(os.path.join(buildir, + get_config_var('srcdir'))) + # Include is located in the srcdir + inc_dir = os.path.join(srcdir, "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": From 8a6ec7a027bb2594b0e3c4f2499893a215cf2021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 30 Apr 2010 12:18:51 +0000 Subject: [PATCH 2918/8469] Merged revisions 80649 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80649 | tarek.ziade | 2010-04-30 14:15:12 +0200 (Fri, 30 Apr 2010) | 1 line Fixed #8577. distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir ........ --- sysconfig.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 54ccec4953..bb53315bca 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -71,15 +71,19 @@ def get_python_inc(plat_specific=0, prefix=None): """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX + if os.name == "posix": if python_build: - base = os.path.dirname(os.path.abspath(sys.executable)) + buildir = os.path.dirname(sys.executable) if plat_specific: - inc_dir = base + # python.h is located in the buildir + inc_dir = buildir else: - inc_dir = os.path.join(base, "Include") - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") + # the source dir is relative to the buildir + srcdir = os.path.abspath(os.path.join(buildir, + get_config_var('srcdir'))) + # Include is located in the srcdir + inc_dir = os.path.join(srcdir, "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": From f17c61c16afd4fd00634424511127c1086b39ef0 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sun, 2 May 2010 22:46:54 +0200 Subject: [PATCH 2919/8469] add a partial test for user install umplication if installed in user-site --HG-- branch : distribute extra : rebase_source : 395e549d507def44d1b7a4454076bb84a47cc1eb --- setuptools/tests/test_easy_install.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f2655d750d..af2e94628a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -148,10 +148,12 @@ def setUp(self): self.old_cwd = os.getcwd() os.chdir(self.dir) if sys.version >= "2.6": + self.old_file = easy_install_pkg.__file__ self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE site.USER_SITE = tempfile.mkdtemp() + easy_install_pkg.__file__ = site.USER_SITE def tearDown(self): os.chdir(self.old_cwd) @@ -161,19 +163,21 @@ def tearDown(self): shutil.rmtree(site.USER_SITE) site.USER_BASE = self.old_base site.USER_SITE = self.old_site + easy_install_pkg.__file__ = self.old_file def test_install(self): #XXX: replace with something meaningfull - return if sys.version < "2.6": - return + return #SKIP dist = Distribution() dist.script_name = 'setup.py' cmd = easy_install(dist) - cmd.user = 1 cmd.args = ['py'] cmd.ensure_finalized() - cmd.user = 1 + self.assertTrue(cmd.user, 'user should be implied') + + return + # this part is disabled it currently fails old_stdout = sys.stdout sys.stdout = StringIO() try: From dd745deff5b10a162a986ed9e8c886b70a2f9d32 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Wed, 5 May 2010 19:09:31 +0000 Subject: [PATCH 2920/8469] In a number of places code still revers to "sys.platform == 'mac'" and that is dead code because it refers to a platform that is no longer supported (and hasn't been supported for several releases). Fixes issue #7908 for the trunk. --- command/install.py | 14 -------------- file_util.py | 11 +---------- sysconfig.py | 17 ----------------- util.py | 9 --------- 4 files changed, 1 insertion(+), 50 deletions(-) diff --git a/command/install.py b/command/install.py index 44c76926ea..f1f3bd5c6f 100644 --- a/command/install.py +++ b/command/install.py @@ -69,20 +69,6 @@ 'scripts': '$userbase/Scripts', 'data' : '$userbase', }, - 'mac': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - 'mac_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', diff --git a/file_util.py b/file_util.py index d8e8fd5f8d..b3d9d54ec0 100644 --- a/file_util.py +++ b/file_util.py @@ -133,18 +133,9 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, if dry_run: return (dst, 1) - # On Mac OS, use the native file copy routine - if os.name == 'mac': - import macostools - try: - macostools.copy(src, dst, 0, preserve_times) - except os.error, exc: - raise DistutilsFileError( - "could not copy '%s' to '%s': %s" % (src, dst, exc[-1])) - # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) - elif link == 'hard': + if link == 'hard': if not (os.path.exists(dst) and os.path.samefile(src, dst)): os.link(src, dst) elif link == 'sym': diff --git a/sysconfig.py b/sysconfig.py index bb53315bca..4d16b2674c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -88,11 +88,6 @@ def get_python_inc(plat_specific=0, prefix=None): return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") - elif os.name == "mac": - if plat_specific: - return os.path.join(prefix, "Mac", "Include") - else: - return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: @@ -135,18 +130,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): else: return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "mac": - if plat_specific: - if standard_lib: - return os.path.join(prefix, "Lib", "lib-dynload") - else: - return os.path.join(prefix, "Lib", "site-packages") - else: - if standard_lib: - return os.path.join(prefix, "Lib") - else: - return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "os2": if standard_lib: return os.path.join(prefix, "Lib") diff --git a/util.py b/util.py index 994dd211be..b3ec6e9606 100644 --- a/util.py +++ b/util.py @@ -235,15 +235,6 @@ def change_root (new_root, pathname): path = path[1:] return os.path.join(new_root, path) - elif os.name == 'mac': - if not os.path.isabs(pathname): - return os.path.join(new_root, pathname) - else: - # Chop off volume name from start of path - elements = string.split(pathname, ":", 1) - pathname = ":" + elements[1] - return os.path.join(new_root, pathname) - else: raise DistutilsPlatformError, \ "nothing known about platform '%s'" % os.name From fde15c22137823177d21001b7d4e302d4986791d Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Wed, 5 May 2010 19:11:21 +0000 Subject: [PATCH 2921/8469] Remove traces of MacOS9 support. Fix for issue #7908 --- command/install.py | 14 -------------- file_util.py | 9 --------- util.py | 9 --------- 3 files changed, 32 deletions(-) diff --git a/command/install.py b/command/install.py index 31d0387195..3c28c660ec 100644 --- a/command/install.py +++ b/command/install.py @@ -65,20 +65,6 @@ 'scripts': '$userbase/Scripts', 'data' : '$userbase', }, - 'mac': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - 'mac_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', diff --git a/file_util.py b/file_util.py index 758bde38bf..3a71bfd1ac 100644 --- a/file_util.py +++ b/file_util.py @@ -132,15 +132,6 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, if dry_run: return (dst, 1) - # On Mac OS, use the native file copy routine - if os.name == 'mac': - import macostools - try: - macostools.copy(src, dst, 0, preserve_times) - except os.error as exc: - raise DistutilsFileError( - "could not copy '%s' to '%s': %s" % (src, dst, exc.args[-1])) - # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': diff --git a/util.py b/util.py index 8fd2ca077f..c8bf0064cd 100644 --- a/util.py +++ b/util.py @@ -91,15 +91,6 @@ def change_root(new_root, pathname): path = path[1:] return os.path.join(new_root, path) - elif os.name == 'mac': - if not os.path.isabs(pathname): - return os.path.join(new_root, pathname) - else: - # Chop off volume name from start of path - elements = pathname.split(":", 1) - pathname = ":" + elements[1] - return os.path.join(new_root, pathname) - else: raise DistutilsPlatformError("nothing known about " "platform '%s'" % os.name) From 3a9c591f47b69048b513e5654e5d98efe3f2365a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 16:50:18 +0200 Subject: [PATCH 2922/8469] respect the sys.dont_write_bytecode flag. Fixes #147 --HG-- branch : distribute extra : rebase_source : 889c1badc92b1de14352a141865172b0a39384fa --- CHANGES.txt | 1 + setuptools/__init__.py | 10 ++++++++-- setuptools/command/easy_install.py | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e74f1714ae..9824beff46 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,7 @@ CHANGES * Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account * Issue 134: removed spurious UserWarnings. Patch by VanLindberg * Issue 138: cant_write_to_target error when setup_requires is used. +* Issue 147: respect the sys.dont_write_bytecode flag ------ 0.6.10 diff --git a/setuptools/__init__.py b/setuptools/__init__.py index c8a631a04c..9de373f98e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -5,7 +5,8 @@ from setuptools.depends import Require from distutils.core import Command as _Command from distutils.util import convert_path -import os.path +import os +import sys __version__ = '0.6' __all__ = [ @@ -95,4 +96,9 @@ def findall(dir = os.curdir): import distutils.filelist distutils.filelist.findall = findall # fix findall bug in distutils. - +# sys.dont_write_bytecode was introduced in Python 2.6. +if ((hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) or + (not hasattr(sys, "dont_write_bytecode") and os.environ.get("PYTHONDONTWRITEBYTECODE"))): + _dont_write_bytecode = True +else: + _dont_write_bytecode = False diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7af42c6546..8aab6f1e4e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -12,7 +12,7 @@ """ import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob -from setuptools import Command +from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from distutils import log, dir_util from distutils.util import convert_path, subst_vars @@ -1149,6 +1149,10 @@ def pf(src,dst): chmod(f, mode) def byte_compile(self, to_compile): + if _dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + from distutils.util import byte_compile try: # try to make the byte compile messages quieter From 27acee722f7ef9dac177675866cd2f03361407a1 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 17:16:54 +0200 Subject: [PATCH 2923/8469] Added tag 0.6.11 for changeset e00987890c0b --HG-- branch : distribute extra : rebase_source : 1ddbe2d35b888a6f6d4ab05c55c5584536151d35 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c904a24ae2..f670ee9b4a 100644 --- a/.hgtags +++ b/.hgtags @@ -13,3 +13,4 @@ ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 +e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 From 2f739b228bd633ac7281e8a2cc91eaf35212fe7a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 17:39:52 +0200 Subject: [PATCH 2924/8469] fixed the scp path --HG-- branch : distribute extra : rebase_source : ae8298b2d46787fcd9cf30dd987fdcd0a0a4cc43 --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index cdcba01f81..fa1151c850 100755 --- a/release.sh +++ b/release.sh @@ -16,7 +16,7 @@ cd .. python2.6 setup.py upload_docs # pushing the bootstrap script -scp distribute_setup.py ziade.org:nightly/build/ +scp distribute_setup.py ziade.org:websites/python-distribute.org/ # starting the new dev hg push From 43329058964f3021d997b8e2b35d3fec913e7692 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 17:47:03 +0200 Subject: [PATCH 2925/8469] starting 0.6.12 --HG-- branch : distribute extra : rebase_source : 206e8a982bbd49a697579b98d6728a0a61bfd31c --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 3 ++- distribute_setup.py | 2 +- docs/conf.py | 2 +- release.sh | 2 +- setup.py | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9824beff46..b347ae9435 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.12 +------ + +* + ------ 0.6.11 ------ diff --git a/README.txt b/README.txt index bd08477091..dba817db2d 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.11.tar.gz - $ tar -xzvf distribute-0.6.11.tar.gz - $ cd distribute-0.6.11 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.12.tar.gz + $ tar -xzvf distribute-0.6.12.tar.gz + $ cd distribute-0.6.12 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..7ff3d25395 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,6 +8,7 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs +upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -32,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.4 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 3c23affa59..4f7bd08c01 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.11" +DEFAULT_VERSION = "0.6.12" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 3991c73c5e..42a072fece 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.11' +version = '0.6.12' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/release.sh b/release.sh index fa1151c850..8388e9937e 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.11" +export VERSION="0.6.12" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 064c2afd7a..43aa1540b1 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.11" +VERSION = "0.6.12" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 3cd5038930832fce95fb41d20150e173eb9894b5 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 17:49:43 +0200 Subject: [PATCH 2926/8469] making sure all supported Python version are called when running tests refs #149 --HG-- branch : distribute extra : rebase_source : eda59671622f85a9c2596572a959ea6b8fe75ed1 --- distribute.egg-info/entry_points.txt | 3 +-- test.sh | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test.sh diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 7ff3d25395..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,7 +8,6 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs -upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -33,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.4 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/test.sh b/test.sh new file mode 100644 index 0000000000..ac309dec7e --- /dev/null +++ b/test.sh @@ -0,0 +1,6 @@ +python2.3 setup.py test +python2.4 setup.py test +python2.5 setup.py test +python2.6 setup.py test +python3.1 setup.py test + From 6a6a261fa50522d77fba6d6345fb71ba9f00c311 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 18:10:32 +0200 Subject: [PATCH 2927/8469] make sure all tests passes on all python versions fixes #149 --HG-- branch : distribute extra : rebase_source : 6288f4fcf65083b9d4ffb0ea8b35af44e699b4d5 --- CHANGES.txt | 2 +- distribute.egg-info/entry_points.txt | 3 ++- pkg_resources.py | 7 ++++--- setuptools/command/install_scripts.py | 4 ++-- setuptools/command/test.py | 6 +++++- setuptools/command/upload_docs.py | 6 +++++- setuptools/sandbox.py | 19 ++++++++++++------- setuptools/tests/test_easy_install.py | 10 +++++----- setuptools/tests/test_sandbox.py | 11 +++++++---- setuptools/tests/test_upload_docs.py | 22 +++++++++++----------- 10 files changed, 54 insertions(+), 36 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b347ae9435..eec6a3da2a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.12 ------ -* +* Issue 149: Fixed various failures on 2.3/2.4 ------ 0.6.11 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..3b205225af 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,6 +8,7 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs +upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -32,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.3 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/pkg_resources.py b/pkg_resources.py index 6d96f5c22b..6ec51fa06c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -191,9 +191,10 @@ def _macosx_vers(_cache=[]): import plistlib plist = '/System/Library/CoreServices/SystemVersion.plist' if os.path.exists(plist): - plist_content = plistlib.readPlist(plist) - if 'ProductVersion' in plist_content: - version = plist_content['ProductVersion'] + if hasattr(plistlib, 'readPlist'): + plist_content = plistlib.readPlist(plist) + if 'ProductVersion' in plist_content: + version = plist_content['ProductVersion'] _cache.append(version.split('.')) return _cache[0] diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index ac797883c7..6ce1b99319 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -12,8 +12,8 @@ def initialize_options(self): self.no_ep = False def run(self): - from setuptools.command.easy_install import (get_script_args, - sys_executable) + from setuptools.command.easy_install import get_script_args + from setuptools.command.easy_install import sys_executable self.run_command("egg_info") if self.distribution.scripts: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index b7aef9697a..0399f5bfe3 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -31,7 +31,11 @@ def loadTestsFromModule(self, module): submodule = module.__name__+'.'+file else: continue - tests.append(self.loadTestsFromName(submodule)) + try: + tests.append(self.loadTestsFromName(submodule)) + except Exception, e: + import pdb; pdb.set_trace() + self.loadTestsFromName(submodule) if len(tests)!=1: return self.suiteClass(tests) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ea2bad7e26..213f7b588e 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,7 +16,11 @@ from distutils import log from distutils.errors import DistutilsOptionError -from distutils.command.upload import upload + +try: + from distutils.command.upload import upload +except ImportError: + from setuptools.command.upload import upload _IS_PYTHON3 = sys.version > '3' diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 630d5792b5..13cbe10978 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -152,13 +152,18 @@ def _remap_pair(self,operation,src,dst,*args,**kw): ) -_EXCEPTIONS = [os.devnull,] +if hasattr(os, 'devnull'): + _EXCEPTIONS = [os.devnull,] +else: + _EXCEPTIONS = [] -try: - gen_py = os.path.dirname(__import__('win32com.gen_py', fromlist=['__name__']).__file__) - _EXCEPTIONS.append(gen_py) -except ImportError: - pass +if not sys.version < '2.5': + try: + gen_py = os.path.dirname(__import__('win32com.gen_py', + fromlist=['__name__']).__file__) + _EXCEPTIONS.append(gen_py) + except ImportError: + pass class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" @@ -204,7 +209,7 @@ def _ok(self,path): def _exempted(self, filepath): exception_matches = map(filepath.startswith, self._exceptions) - return any(exception_matches) + return False not in exception_matches def _remap_input(self,operation,path,*args,**kw): """Called for path inputs""" diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f2655d750d..e02798c628 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -122,19 +122,19 @@ def test_no_find_links(self): class TestPTHFileWriter(unittest.TestCase): def test_add_from_cwd_site_sets_dirty(self): - '''a pth file manager should set dirty + '''a pth file manager should set dirty if a distribution is in site but also the cwd ''' pth = PthDistributions('does-not_exist', [os.getcwd()]) - self.assertFalse(pth.dirty) + self.assert_(not pth.dirty) pth.add(PRDistribution(os.getcwd())) - self.assertTrue(pth.dirty) + self.assert_(pth.dirty) def test_add_from_site_is_ignored(self): pth = PthDistributions('does-not_exist', ['/test/location/does-not-have-to-exist']) - self.assertFalse(pth.dirty) + self.assert_(not pth.dirty) pth.add(PRDistribution('/test/location/does-not-have-to-exist')) - self.assertFalse(pth.dirty) + self.assert_(not pth.dirty) class TestUserInstallTest(unittest.TestCase): diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 8b9e08e65d..1609ee861b 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -30,10 +30,11 @@ def tearDown(self): shutil.rmtree(self.dir) def test_devnull(self): + if sys.version < '2.4': + return sandbox = DirectorySandbox(self.dir) sandbox.run(self._file_writer(os.devnull)) - @staticmethod def _file_writer(path): def do_write(): f = open(path, 'w') @@ -41,6 +42,7 @@ def do_write(): f.close() return do_write + _file_writer = staticmethod(_file_writer) if has_win32com(): def test_win32com(self): @@ -53,9 +55,10 @@ def test_win32com(self): target = os.path.join(gen_py, 'test_write') sandbox = DirectorySandbox(self.dir) try: - sandbox.run(self._file_writer(target)) - except SandboxViolation: - self.fail("Could not create gen_py file due to SandboxViolation") + try: + sandbox.run(self._file_writer(target)) + except SandboxViolation: + self.fail("Could not create gen_py file due to SandboxViolation") finally: if os.path.exists(target): os.remove(target) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 15db899f4f..8b2dc89220 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -19,24 +19,24 @@ def setUp(self): f.close() self.old_cwd = os.getcwd() os.chdir(self.dir) - + self.upload_dir = os.path.join(self.dir, 'build') os.mkdir(self.upload_dir) - + # A test document. f = open(os.path.join(self.upload_dir, 'index.html'), 'w') f.write("Hello world.") f.close() - + # An empty folder. os.mkdir(os.path.join(self.upload_dir, 'empty')) - + if sys.version >= "2.6": self.old_base = site.USER_BASE site.USER_BASE = upload_docs.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp() - + def tearDown(self): os.chdir(self.old_cwd) shutil.rmtree(self.dir) @@ -49,17 +49,17 @@ def tearDown(self): def test_create_zipfile(self): # Test to make sure zipfile creation handles common cases. # This explicitly includes a folder containing an empty folder. - + dist = Distribution() - + cmd = upload_docs(dist) cmd.upload_dir = self.upload_dir zip_file = cmd.create_zipfile() - + assert zipfile.is_zipfile(zip_file) - + zip_f = zipfile.ZipFile(zip_file) # woh... - + assert zip_f.namelist() == ['index.html'] - + From ec003ad49247813ba1fbbaed4a541c99cf0ac4f3 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 18:13:28 +0200 Subject: [PATCH 2928/8469] removed pdb --HG-- branch : distribute extra : rebase_source : 2f4a32416a6ac72579ecc6fc65e513f3d28e6b62 --- setuptools/command/test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 0399f5bfe3..b7aef9697a 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -31,11 +31,7 @@ def loadTestsFromModule(self, module): submodule = module.__name__+'.'+file else: continue - try: - tests.append(self.loadTestsFromName(submodule)) - except Exception, e: - import pdb; pdb.set_trace() - self.loadTestsFromName(submodule) + tests.append(self.loadTestsFromName(submodule)) if len(tests)!=1: return self.suiteClass(tests) From 6695e537c69743d1ef1b0e2c62b7bc7734e66446 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 18:14:53 +0200 Subject: [PATCH 2929/8469] we want any(), not all() --HG-- branch : distribute extra : rebase_source : c740917424bbc5efdfb91360399f1f17a09ea3a1 --- setuptools/sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 13cbe10978..c2f14e7fb3 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -209,7 +209,7 @@ def _ok(self,path): def _exempted(self, filepath): exception_matches = map(filepath.startswith, self._exceptions) - return False not in exception_matches + return True in exception_matches def _remap_input(self,operation,path,*args,**kw): """Called for path inputs""" From 9b57c33a36e8350fb8ec0ebc619774e46d9f2292 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 6 May 2010 20:25:31 +0200 Subject: [PATCH 2930/8469] Use assertTrue and assertFalse instead of deprecated failUnless and failIf. --HG-- branch : distribute extra : rebase_source : 51c527a19483fc1b11084e4d2770d88015588822 --- setuptools/tests/__init__.py | 64 +++++++++++++++--------------- setuptools/tests/test_resources.py | 38 +++++++++--------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index f540103ec2..4fb382ca7b 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -94,21 +94,21 @@ def testRequire(self): from email import __version__ self.assertEqual(req.get_version(), __version__) - self.failUnless(req.version_ok('1.0.9')) - self.failIf(req.version_ok('0.9.1')) - self.failIf(req.version_ok('unknown')) + self.assertTrue(req.version_ok('1.0.9')) + self.assertFalse(req.version_ok('0.9.1')) + self.assertFalse(req.version_ok('unknown')) - self.failUnless(req.is_present()) - self.failUnless(req.is_current()) + self.assertTrue(req.is_present()) + self.assertTrue(req.is_current()) req = Require('Email 3000','03000','email',format=LooseVersion) - self.failUnless(req.is_present()) - self.failIf(req.is_current()) - self.failIf(req.version_ok('unknown')) + self.assertTrue(req.is_present()) + self.assertFalse(req.is_current()) + self.assertFalse(req.version_ok('unknown')) req = Require('Do-what-I-mean','1.0','d-w-i-m') - self.failIf(req.is_present()) - self.failIf(req.is_current()) + self.assertFalse(req.is_present()) + self.assertFalse(req.is_current()) req = Require('Tests', None, 'tests', homepage="http://example.com") self.assertEqual(req.format, None) @@ -118,8 +118,8 @@ def testRequire(self): self.assertEqual(req.homepage, 'http://example.com') paths = [os.path.dirname(p) for p in __path__] - self.failUnless(req.is_present(paths)) - self.failUnless(req.is_current(paths)) + self.assertTrue(req.is_present(paths)) + self.assertTrue(req.is_current(paths)) class DistroTests(TestCase): @@ -137,7 +137,7 @@ def setUp(self): def testDistroType(self): - self.failUnless(isinstance(self.dist,setuptools.dist.Distribution)) + self.assertTrue(isinstance(self.dist,setuptools.dist.Distribution)) def testExcludePackage(self): @@ -189,17 +189,17 @@ def testEmpty(self): dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) def testContents(self): - self.failUnless(self.dist.has_contents_for('a')) + self.assertTrue(self.dist.has_contents_for('a')) self.dist.exclude_package('a') - self.failIf(self.dist.has_contents_for('a')) + self.assertFalse(self.dist.has_contents_for('a')) - self.failUnless(self.dist.has_contents_for('b')) + self.assertTrue(self.dist.has_contents_for('b')) self.dist.exclude_package('b') - self.failIf(self.dist.has_contents_for('b')) + self.assertFalse(self.dist.has_contents_for('b')) - self.failUnless(self.dist.has_contents_for('c')) + self.assertTrue(self.dist.has_contents_for('c')) self.dist.exclude_package('c') - self.failIf(self.dist.has_contents_for('c')) + self.assertFalse(self.dist.has_contents_for('c')) @@ -269,12 +269,12 @@ def setUp(self): ) def testDefaults(self): - self.failIf( + self.assertFalse( Feature( "test",standard=True,remove='x',available=False ).include_by_default() ) - self.failUnless( + self.assertTrue( Feature("test",standard=True,remove='x').include_by_default() ) # Feature must have either kwargs, removes, or require_features @@ -288,33 +288,33 @@ def testAvailability(self): def testFeatureOptions(self): dist = self.dist - self.failUnless( + self.assertTrue( ('with-dwim',None,'include DWIM') in dist.feature_options ) - self.failUnless( + self.assertTrue( ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options ) - self.failUnless( + self.assertTrue( ('with-bar',None,'include bar (default)') in dist.feature_options ) - self.failUnless( + self.assertTrue( ('without-bar',None,'exclude bar') in dist.feature_options ) self.assertEqual(dist.feature_negopt['without-foo'],'with-foo') self.assertEqual(dist.feature_negopt['without-bar'],'with-bar') self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim') - self.failIf('without-baz' in dist.feature_negopt) + self.assertFalse('without-baz' in dist.feature_negopt) def testUseFeatures(self): dist = self.dist self.assertEqual(dist.with_foo,1) self.assertEqual(dist.with_bar,0) self.assertEqual(dist.with_baz,1) - self.failIf('bar_et' in dist.py_modules) - self.failIf('pkg.bar' in dist.packages) - self.failUnless('pkg.baz' in dist.packages) - self.failUnless('scripts/baz_it' in dist.scripts) - self.failUnless(('libfoo','foo/foofoo.c') in dist.libraries) + self.assertFalse('bar_et' in dist.py_modules) + self.assertFalse('pkg.bar' in dist.packages) + self.assertTrue('pkg.baz' in dist.packages) + self.assertTrue('scripts/baz_it' in dist.scripts) + self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries) self.assertEqual(dist.ext_modules,[]) self.assertEqual(dist.require_features, [self.req]) @@ -331,7 +331,7 @@ class TestCommandTests(TestCase): def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') - self.failUnless(isinstance(test_cmd, distutils.cmd.Command)) + self.assertTrue(isinstance(test_cmd, distutils.cmd.Command)) def testLongOptSuiteWNoDefault(self): ts1 = makeSetup(script_args=['test','--test-suite=foo.tests.suite']) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 5cb1baf004..c1dc488712 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -35,7 +35,7 @@ def testCollection(self): ad.add(Distribution.from_filename("FooPkg-1.2-py2.4.egg")) # Name is in there now - self.failUnless(ad['FooPkg']) + self.assertTrue(ad['FooPkg']) # But only 1 package self.assertEqual(list(ad), ['foopkg']) @@ -218,7 +218,7 @@ def assertfields(self, ep): self.assertEqual(ep.module_name,"setuptools.tests.test_resources") self.assertEqual(ep.attrs, ("EntryPointTests",)) self.assertEqual(ep.extras, ("x",)) - self.failUnless(ep.load() is EntryPointTests) + self.assertTrue(ep.load() is EntryPointTests) self.assertEqual( str(ep), "foo = setuptools.tests.test_resources:EntryPointTests [x]" @@ -318,20 +318,20 @@ def testBasicContains(self): foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") twist11 = Distribution.from_filename("Twisted-1.1.egg") twist12 = Distribution.from_filename("Twisted-1.2.egg") - self.failUnless(parse_version('1.2') in r) - self.failUnless(parse_version('1.1') not in r) - self.failUnless('1.2' in r) - self.failUnless('1.1' not in r) - self.failUnless(foo_dist not in r) - self.failUnless(twist11 not in r) - self.failUnless(twist12 in r) + self.assertTrue(parse_version('1.2') in r) + self.assertTrue(parse_version('1.1') not in r) + self.assertTrue('1.2' in r) + self.assertTrue('1.1' not in r) + self.assertTrue(foo_dist not in r) + self.assertTrue(twist11 not in r) + self.assertTrue(twist12 in r) def testAdvancedContains(self): r, = parse_requirements("Foo>=1.2,<=1.3,==1.9,>2.0,!=2.5,<3.0,==4.5") for v in ('1.2','1.2.2','1.3','1.9','2.0.1','2.3','2.6','3.0c1','4.5'): - self.failUnless(v in r, (v,r)) + self.assertTrue(v in r, (v,r)) for v in ('1.2c1','1.3.1','1.5','1.9.1','2.0','2.5','3.0','4.0'): - self.failUnless(v not in r, (v,r)) + self.assertTrue(v not in r, (v,r)) def testOptionsAndHashing(self): @@ -353,14 +353,14 @@ def testVersionEquality(self): r2 = Requirement.parse("foo!=0.3a4") d = Distribution.from_filename - self.failIf(d("foo-0.3a4.egg") in r1) - self.failIf(d("foo-0.3a1.egg") in r1) - self.failIf(d("foo-0.3a4.egg") in r2) + self.assertFalse(d("foo-0.3a4.egg") in r1) + self.assertFalse(d("foo-0.3a1.egg") in r1) + self.assertFalse(d("foo-0.3a4.egg") in r2) - self.failUnless(d("foo-0.3a2.egg") in r1) - self.failUnless(d("foo-0.3a2.egg") in r2) - self.failUnless(d("foo-0.3a3.egg") in r2) - self.failUnless(d("foo-0.3a5.egg") in r2) + self.assertTrue(d("foo-0.3a2.egg") in r1) + self.assertTrue(d("foo-0.3a2.egg") in r2) + self.assertTrue(d("foo-0.3a3.egg") in r2) + self.assertTrue(d("foo-0.3a5.egg") in r2) def testDistributeSetuptoolsOverride(self): # Plain setuptools or distribute mean we return distribute. @@ -480,7 +480,7 @@ def c(s1,s2): def testVersionOrdering(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - self.failUnless(p1 Date: Thu, 6 May 2010 22:12:26 +0200 Subject: [PATCH 2931/8469] Added tag 0.6.12 for changeset 48a97bc89e2f --HG-- branch : distribute extra : rebase_source : bc9f626b135f1283d1860af008742d4fc9592cc0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f670ee9b4a..eb90dab58c 100644 --- a/.hgtags +++ b/.hgtags @@ -14,3 +14,4 @@ ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 +48a97bc89e2f65fc9b78b358d7dc89ba9ec9524a 0.6.12 From de6e3bcc3c77bff17a6609b31bc1b6a9212bbd88 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 23:14:00 +0200 Subject: [PATCH 2932/8469] raised the revision --HG-- branch : distribute extra : rebase_source : 294117170d32ada89385db57b12e25ab2fbb8523 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 3 +-- distribute_setup.py | 2 +- docs/conf.py | 2 +- setup.py | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index eec6a3da2a..ad743ae7c7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.13 +------ + +* + ------ 0.6.12 ------ diff --git a/README.txt b/README.txt index dba817db2d..72d897e713 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.12.tar.gz - $ tar -xzvf distribute-0.6.12.tar.gz - $ cd distribute-0.6.12 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.13.tar.gz + $ tar -xzvf distribute-0.6.13.tar.gz + $ cd distribute-0.6.13 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 3b205225af..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,7 +8,6 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs -upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -33,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.3 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 4f7bd08c01..3cb043e24e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.12" +DEFAULT_VERSION = "0.6.13" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 42a072fece..53614ed586 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ # built documents. # # The short X.Y version. -version = '0.6.12' +version = '0.6.13' # The full version, including alpha/beta/rc tags. release = '0.6.4' diff --git a/setup.py b/setup.py index 43aa1540b1..3ae40817ee 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.12" +VERSION = "0.6.13" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 152c6fa220df3ce8c3f211d490bfe547b155b0e2 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Fri, 7 May 2010 00:03:18 +0200 Subject: [PATCH 2933/8469] account for the possibility that site.ENABLE_USER_SITE may be False --HG-- branch : distribute extra : rebase_source : 4f763cb0a4dd4cddef1df333a4ded2a2728fedcd --- setuptools/command/easy_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8aab6f1e4e..d68943faf3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -122,10 +122,9 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): - if HAS_USER_SITE: + if HAS_USER_SITE and site.ENABLE_USER_SITE: whereami = os.path.abspath(__file__) - self.user = (whereami.startswith(site.USER_SITE) - or whereami.startswith(site.USER_BASE)) + self.user = whereami.startswith(site.USER_SITE) else: self.user = 0 From 7337895492390e5fc7b8573ebfa9f3b43d5af94b Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sat, 8 May 2010 08:44:37 +0000 Subject: [PATCH 2934/8469] Fix for issue #7724: make it possible to build using the OSX 10.4u SDK on MacOSX 10.6 by honoring the specified SDK when looking for files. --- unixccompiler.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 783d4dca84..ba831f7b57 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys +import os, sys, re from types import StringType, NoneType from distutils import sysconfig @@ -305,10 +305,29 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') + if sys.platform == 'darwin': + # On OSX users can specify an alternate SDK using + # '-isysroot', calculate the SDK root if it is specified + # (and use it further on) + cflags = sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + + + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + + if sys.platform == 'darwin' and (dir.startswith('/System/') or dir.startswith('/usr/')): + shared = os.path.join(sysroot, dir[1:], shared_f) + dylib = os.path.join(sysroot, dir[1:], dylib_f) + static = os.path.join(sysroot, dir[1:], static_f) + # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From edfa9c8bc18c53f3fd81697b251f5f84726182a3 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 8 May 2010 15:23:57 +0000 Subject: [PATCH 2935/8469] Revert r80963 - it broke compilation everywhere --- unixccompiler.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index ba831f7b57..783d4dca84 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys, re +import os, sys from types import StringType, NoneType from distutils import sysconfig @@ -305,29 +305,10 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') - if sys.platform == 'darwin': - # On OSX users can specify an alternate SDK using - # '-isysroot', calculate the SDK root if it is specified - # (and use it further on) - cflags = sysconfig.get_config_var('CFLAGS') - m = re.search(r'-isysroot\s+(\S+)', cflags) - if m is None: - sysroot = '/' - else: - sysroot = m.group(1) - - - for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) - - if sys.platform == 'darwin' and (dir.startswith('/System/') or dir.startswith('/usr/')): - shared = os.path.join(sysroot, dir[1:], shared_f) - dylib = os.path.join(sysroot, dir[1:], dylib_f) - static = os.path.join(sysroot, dir[1:], static_f) - # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From 5b183062b39a966eeac553886793c3eef3c706e7 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 8 May 2010 17:08:17 +0000 Subject: [PATCH 2936/8469] bump version to 2.7 beta 2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index aa55cccb77..5f401709cf 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7b1" +__version__ = "2.7b2" #--end constants-- From 4353f3f6eaabc04859bcbd592c58df985bd2ad3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 May 2010 07:24:02 -1000 Subject: [PATCH 2937/8469] Fix for #151 - attribute error when gen_py doesn't have __init__ module --HG-- branch : distribute extra : rebase_source : 6d42ed6e7f4d1ab4500aa8a695ee64af6a3f63f8 --- distribute.egg-info/entry_points.txt | 2 +- setuptools/sandbox.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..9fd4175819 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 630d5792b5..b2ae991f17 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -155,9 +155,14 @@ def _remap_pair(self,operation,src,dst,*args,**kw): _EXCEPTIONS = [os.devnull,] try: - gen_py = os.path.dirname(__import__('win32com.gen_py', fromlist=['__name__']).__file__) - _EXCEPTIONS.append(gen_py) + win32com_pkg = os.path.dirname(__import__('win32com').__file__) + gen_py_pkg = os.path.join(win32com_pkg, 'gen_py') + _EXCEPTIONS.append(gen_py_pkg) except ImportError: + # it appears pywin32 is not installed, so no need to exclude. + pass +except AttributeError: + # unexpected error getting __file__ from win32com pass class DirectorySandbox(AbstractSandbox): From 50900e7b3129467091d7fb03a716755fcf0b0c52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 May 2010 11:01:24 -1000 Subject: [PATCH 2938/8469] Updated gen_py exception to use attribute of win32com rather than infer the location of gen_py --HG-- branch : distribute extra : rebase_source : 55f1f3c23dc20edf9c91ea223fc5762fda22f5b2 --- setuptools/sandbox.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 37fc60af06..0d6724d177 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -158,14 +158,13 @@ def _remap_pair(self,operation,src,dst,*args,**kw): _EXCEPTIONS = [] try: - win32com_pkg = os.path.dirname(__import__('win32com').__file__) - gen_py_pkg = os.path.join(win32com_pkg, 'gen_py') - _EXCEPTIONS.append(gen_py_pkg) + import win32com + _EXCEPTIONS.append(win32com.__gen_path__) except ImportError: # it appears pywin32 is not installed, so no need to exclude. pass except AttributeError: - # unexpected error getting __file__ from win32com + # it appears __gen_path__ is not available, so fail silently pass class DirectorySandbox(AbstractSandbox): From 1569d2e22e7e7aa897eaa3ff1c9f2d7a2d5f581a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 May 2010 11:23:22 -1000 Subject: [PATCH 2939/8469] Found a public API method which is preferable to using the private attribute for ascertaining the location of the gen_py cache --HG-- branch : distribute extra : rebase_source : 6feed4430505ad2d2680b141d41dccb95d9e80af --- setuptools/sandbox.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 0d6724d177..a06d44837c 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -158,14 +158,12 @@ def _remap_pair(self,operation,src,dst,*args,**kw): _EXCEPTIONS = [] try: - import win32com - _EXCEPTIONS.append(win32com.__gen_path__) + from win32com.client.gencache import GetGeneratePath + _EXCEPTIONS.append(GetGeneratePath()) + del GetGeneratePath except ImportError: # it appears pywin32 is not installed, so no need to exclude. pass -except AttributeError: - # it appears __gen_path__ is not available, so fail silently - pass class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" From f23648b7d06b99e8eadfc45a75a703927dd038e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 10:06:20 +0000 Subject: [PATCH 2940/8469] Fixed #8688: Distutils now recalculates MANIFEST everytime. --- command/sdist.py | 82 ++++++++++++++------------------------------- tests/test_sdist.py | 41 +++++++++++++++++++++++ 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f1335e6a36..4cede72988 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -179,66 +179,34 @@ def get_file_list(self): distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all - depends on the user's options and the state of the filesystem. + depends on the user's options. """ - # If we have a manifest template, see if it's newer than the - # manifest; if so, we'll regenerate the manifest. + # new behavior: + # the file list is recalculated everytime because + # even if MANIFEST.in or setup.py are not changed + # the user might have added some files in the tree that + # need to be included. + # + # This makes --force the default and only behavior. template_exists = os.path.isfile(self.template) + if not template_exists: + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + if template_exists: - template_newer = dep_util.newer(self.template, self.manifest) - - # The contents of the manifest file almost certainly depend on the - # setup script as well as the manifest template -- so if the setup - # script is newer than the manifest, we'll regenerate the manifest - # from the template. (Well, not quite: if we already have a - # manifest, but there's no template -- which will happen if the - # developer elects to generate a manifest some other way -- then we - # can't regenerate the manifest, so we don't.) - self.debug_print("checking if %s newer than %s" % - (self.distribution.script_name, self.manifest)) - setup_newer = dep_util.newer(self.distribution.script_name, - self.manifest) - - # cases: - # 1) no manifest, template exists: generate manifest - # (covered by 2a: no manifest == template newer) - # 2) manifest & template exist: - # 2a) template or setup script newer than manifest: - # regenerate manifest - # 2b) manifest newer than both: - # do nothing (unless --force or --manifest-only) - # 3) manifest exists, no template: - # do nothing (unless --force or --manifest-only) - # 4) no manifest, no template: generate w/ warning ("defaults only") - - manifest_outofdate = (template_exists and - (template_newer or setup_newer)) - force_regen = self.force_manifest or self.manifest_only - manifest_exists = os.path.isfile(self.manifest) - neither_exists = (not template_exists and not manifest_exists) - - # Regenerate the manifest if necessary (or if explicitly told to) - if manifest_outofdate or neither_exists or force_regen: - if not template_exists: - self.warn(("manifest template '%s' does not exist " + - "(using default file list)") % - self.template) - self.filelist.findall() - - if self.use_defaults: - self.add_defaults() - if template_exists: - self.read_template() - if self.prune: - self.prune_file_list() - - self.filelist.sort() - self.filelist.remove_duplicates() - self.write_manifest() - - # Don't regenerate the manifest, just read it in. - else: - self.read_manifest() + self.read_template() + + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() def add_defaults(self): """Add all the default files to self.filelist: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 20b20aae0b..76f5b77471 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -346,6 +346,47 @@ def test_make_distribution_owner_group(self): finally: archive.close() + def test_get_file_list(self): + # make sure MANIFEST is recalculated + dist, cmd = self.get_cmd() + + # filling data_files by pointing files in package_data + dist.package_data = {'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEquals(len(manifest), 4) + + # adding a file + self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') + + # make sure build_py is reinitinialized, like a fresh run + build_py = dist.get_command_obj('build_py') + build_py.finalized = False + build_py.ensure_finalized() + + cmd.run() + + f = open(cmd.manifest) + try: + manifest2 = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + # do we have the new file in MANIFEST ? + self.assertEquals(len(manifest2), 5) + self.assertIn('doc2.txt', manifest2[-1]) + + def test_suite(): return unittest.makeSuite(SDistTestCase) From d27e915abdcc0ffa04c26e6eb7a9ea297fabffd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 10:26:15 +0000 Subject: [PATCH 2941/8469] Merged revisions 81255 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81255 | tarek.ziade | 2010-05-17 12:06:20 +0200 (Mon, 17 May 2010) | 1 line Fixed #8688: Distutils now recalculates MANIFEST everytime. ........ --- command/sdist.py | 83 ++++++++++++++------------------------------- tests/test_sdist.py | 62 +++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 58 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index a366d1eaf6..b93994d07f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -190,67 +190,34 @@ def get_file_list (self): distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all - depends on the user's options and the state of the filesystem. + depends on the user's options. """ - - # If we have a manifest template, see if it's newer than the - # manifest; if so, we'll regenerate the manifest. + # new behavior: + # the file list is recalculated everytime because + # even if MANIFEST.in or setup.py are not changed + # the user might have added some files in the tree that + # need to be included. + # + # This makes --force the default and only behavior. template_exists = os.path.isfile(self.template) + if not template_exists: + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + if template_exists: - template_newer = dep_util.newer(self.template, self.manifest) - - # The contents of the manifest file almost certainly depend on the - # setup script as well as the manifest template -- so if the setup - # script is newer than the manifest, we'll regenerate the manifest - # from the template. (Well, not quite: if we already have a - # manifest, but there's no template -- which will happen if the - # developer elects to generate a manifest some other way -- then we - # can't regenerate the manifest, so we don't.) - self.debug_print("checking if %s newer than %s" % - (self.distribution.script_name, self.manifest)) - setup_newer = dep_util.newer(self.distribution.script_name, - self.manifest) - - # cases: - # 1) no manifest, template exists: generate manifest - # (covered by 2a: no manifest == template newer) - # 2) manifest & template exist: - # 2a) template or setup script newer than manifest: - # regenerate manifest - # 2b) manifest newer than both: - # do nothing (unless --force or --manifest-only) - # 3) manifest exists, no template: - # do nothing (unless --force or --manifest-only) - # 4) no manifest, no template: generate w/ warning ("defaults only") - - manifest_outofdate = (template_exists and - (template_newer or setup_newer)) - force_regen = self.force_manifest or self.manifest_only - manifest_exists = os.path.isfile(self.manifest) - neither_exists = (not template_exists and not manifest_exists) - - # Regenerate the manifest if necessary (or if explicitly told to) - if manifest_outofdate or neither_exists or force_regen: - if not template_exists: - self.warn(("manifest template '%s' does not exist " + - "(using default file list)") % - self.template) - self.filelist.findall() - - if self.use_defaults: - self.add_defaults() - if template_exists: - self.read_template() - if self.prune: - self.prune_file_list() - - self.filelist.sort() - self.filelist.remove_duplicates() - self.write_manifest() - - # Don't regenerate the manifest, just read it in. - else: - self.read_manifest() + self.read_template() + + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() # get_file_list () diff --git a/tests/test_sdist.py b/tests/test_sdist.py index e322c1385c..6b8784ac3d 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,6 +29,7 @@ def setUp(self): super(sdistTestCase, self).setUp() self.old_path = os.getcwd() self.temp_pkg = os.path.join(self.mkdtemp(), 'temppkg') + self.tmp_dir = self.mkdtemp() def tearDown(self): os.chdir(self.old_path) @@ -151,6 +152,67 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + def get_cmd(self, metadata=None): + """Returns a cmd""" + if metadata is None: + metadata = {'name': 'fake', 'version': '1.0', + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'} + dist = Distribution(metadata) + dist.script_name = 'setup.py' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.dist_dir = 'dist' + def _warn(*args): + pass + cmd.warn = _warn + return dist, cmd + + def test_get_file_list(self): + # make sure MANIFEST is recalculated + dist, cmd = self.get_cmd() + + os.chdir(self.tmp_dir) + + # filling data_files by pointing files in package_data + os.mkdir(os.path.join(self.tmp_dir, 'somecode')) + self.write_file((self.tmp_dir, 'somecode', '__init__.py'), '#') + self.write_file((self.tmp_dir, 'somecode', 'one.py'), '#') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEquals(len(manifest), 2) + + # adding a file + self.write_file((self.tmp_dir, 'somecode', 'two.py'), '#') + + # make sure build_py is reinitinialized, like a fresh run + build_py = dist.get_command_obj('build_py') + build_py.finalized = False + build_py.ensure_finalized() + + cmd.run() + + f = open(cmd.manifest) + try: + manifest2 = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + # do we have the new file in MANIFEST ? + self.assertEquals(len(manifest2), 3) + self.assert_('two.py' in manifest2[-1]) + + def test_suite(): return unittest.makeSuite(sdistTestCase) From f842b86d7f34fade4059ab3e9fd224534f3fc664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 10:38:53 +0000 Subject: [PATCH 2942/8469] Merged revisions 81255 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81255 | tarek.ziade | 2010-05-17 12:06:20 +0200 (Mon, 17 May 2010) | 1 line Fixed #8688: Distutils now recalculates MANIFEST everytime. ........ --- command/sdist.py | 82 ++++++++++++++------------------------------- tests/test_sdist.py | 41 +++++++++++++++++++++++ 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f33406cd59..b2088f98d1 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -179,66 +179,34 @@ def get_file_list(self): distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all - depends on the user's options and the state of the filesystem. + depends on the user's options. """ - # If we have a manifest template, see if it's newer than the - # manifest; if so, we'll regenerate the manifest. + # new behavior: + # the file list is recalculated everytime because + # even if MANIFEST.in or setup.py are not changed + # the user might have added some files in the tree that + # need to be included. + # + # This makes --force the default and only behavior. template_exists = os.path.isfile(self.template) + if not template_exists: + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + if template_exists: - template_newer = dep_util.newer(self.template, self.manifest) - - # The contents of the manifest file almost certainly depend on the - # setup script as well as the manifest template -- so if the setup - # script is newer than the manifest, we'll regenerate the manifest - # from the template. (Well, not quite: if we already have a - # manifest, but there's no template -- which will happen if the - # developer elects to generate a manifest some other way -- then we - # can't regenerate the manifest, so we don't.) - self.debug_print("checking if %s newer than %s" % - (self.distribution.script_name, self.manifest)) - setup_newer = dep_util.newer(self.distribution.script_name, - self.manifest) - - # cases: - # 1) no manifest, template exists: generate manifest - # (covered by 2a: no manifest == template newer) - # 2) manifest & template exist: - # 2a) template or setup script newer than manifest: - # regenerate manifest - # 2b) manifest newer than both: - # do nothing (unless --force or --manifest-only) - # 3) manifest exists, no template: - # do nothing (unless --force or --manifest-only) - # 4) no manifest, no template: generate w/ warning ("defaults only") - - manifest_outofdate = (template_exists and - (template_newer or setup_newer)) - force_regen = self.force_manifest or self.manifest_only - manifest_exists = os.path.isfile(self.manifest) - neither_exists = (not template_exists and not manifest_exists) - - # Regenerate the manifest if necessary (or if explicitly told to) - if manifest_outofdate or neither_exists or force_regen: - if not template_exists: - self.warn("manifest template '%s' does not exist " - "(using default file list)" - % self.template) - self.filelist.findall() - - if self.use_defaults: - self.add_defaults() - if template_exists: - self.read_template() - if self.prune: - self.prune_file_list() - - self.filelist.sort() - self.filelist.remove_duplicates() - self.write_manifest() - - # Don't regenerate the manifest, just read it in. - else: - self.read_manifest() + self.read_template() + + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() def add_defaults(self): """Add all the default files to self.filelist: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index e0f1e93768..1bc36c5c8f 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -346,6 +346,47 @@ def test_make_distribution_owner_group(self): finally: archive.close() + def test_get_file_list(self): + # make sure MANIFEST is recalculated + dist, cmd = self.get_cmd() + + # filling data_files by pointing files in package_data + dist.package_data = {'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEquals(len(manifest), 4) + + # adding a file + self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') + + # make sure build_py is reinitinialized, like a fresh run + build_py = dist.get_command_obj('build_py') + build_py.finalized = False + build_py.ensure_finalized() + + cmd.run() + + f = open(cmd.manifest) + try: + manifest2 = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + # do we have the new file in MANIFEST ? + self.assertEquals(len(manifest2), 5) + self.assertIn('doc2.txt', manifest2[-1]) + + def test_suite(): return unittest.makeSuite(SDistTestCase) From 32b6f83c0cdc4ec43cda11decb3c4bade7a8880d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 10:48:29 +0000 Subject: [PATCH 2943/8469] Merged revisions 81258 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81258 | tarek.ziade | 2010-05-17 12:38:53 +0200 (Mon, 17 May 2010) | 9 lines Merged revisions 81255 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81255 | tarek.ziade | 2010-05-17 12:06:20 +0200 (Mon, 17 May 2010) | 1 line Fixed #8688: Distutils now recalculates MANIFEST everytime. ........ ................ --- command/sdist.py | 82 ++++++++++++++------------------------------- tests/test_sdist.py | 41 +++++++++++++++++++++++ 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index ace9eeeb61..88fde46c30 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -173,66 +173,34 @@ def get_file_list(self): distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all - depends on the user's options and the state of the filesystem. + depends on the user's options. """ - # If we have a manifest template, see if it's newer than the - # manifest; if so, we'll regenerate the manifest. + # new behavior: + # the file list is recalculated everytime because + # even if MANIFEST.in or setup.py are not changed + # the user might have added some files in the tree that + # need to be included. + # + # This makes --force the default and only behavior. template_exists = os.path.isfile(self.template) + if not template_exists: + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + if template_exists: - template_newer = dep_util.newer(self.template, self.manifest) - - # The contents of the manifest file almost certainly depend on the - # setup script as well as the manifest template -- so if the setup - # script is newer than the manifest, we'll regenerate the manifest - # from the template. (Well, not quite: if we already have a - # manifest, but there's no template -- which will happen if the - # developer elects to generate a manifest some other way -- then we - # can't regenerate the manifest, so we don't.) - self.debug_print("checking if %s newer than %s" % - (self.distribution.script_name, self.manifest)) - setup_newer = dep_util.newer(self.distribution.script_name, - self.manifest) - - # cases: - # 1) no manifest, template exists: generate manifest - # (covered by 2a: no manifest == template newer) - # 2) manifest & template exist: - # 2a) template or setup script newer than manifest: - # regenerate manifest - # 2b) manifest newer than both: - # do nothing (unless --force or --manifest-only) - # 3) manifest exists, no template: - # do nothing (unless --force or --manifest-only) - # 4) no manifest, no template: generate w/ warning ("defaults only") - - manifest_outofdate = (template_exists and - (template_newer or setup_newer)) - force_regen = self.force_manifest or self.manifest_only - manifest_exists = os.path.isfile(self.manifest) - neither_exists = (not template_exists and not manifest_exists) - - # Regenerate the manifest if necessary (or if explicitly told to) - if manifest_outofdate or neither_exists or force_regen: - if not template_exists: - self.warn("manifest template '%s' does not exist " - "(using default file list)" - % self.template) - self.filelist.findall() - - if self.use_defaults: - self.add_defaults() - if template_exists: - self.read_template() - if self.prune: - self.prune_file_list() - - self.filelist.sort() - self.filelist.remove_duplicates() - self.write_manifest() - - # Don't regenerate the manifest, just read it in. - else: - self.read_manifest() + self.read_template() + + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() def add_defaults(self): """Add all the default files to self.filelist: diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b7e5859cb9..f95035dfb0 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -277,6 +277,47 @@ def test_finalize_options(self): self.assertRaises(DistutilsOptionError, cmd.finalize_options) + def test_get_file_list(self): + # make sure MANIFEST is recalculated + dist, cmd = self.get_cmd() + + # filling data_files by pointing files in package_data + dist.package_data = {'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEquals(len(manifest), 4) + + # adding a file + self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') + + # make sure build_py is reinitinialized, like a fresh run + build_py = dist.get_command_obj('build_py') + build_py.finalized = False + build_py.ensure_finalized() + + cmd.run() + + f = open(cmd.manifest) + try: + manifest2 = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + # do we have the new file in MANIFEST ? + self.assertEquals(len(manifest2), 5) + self.assertIn('doc2.txt', manifest2[-1]) + + def test_suite(): return unittest.makeSuite(SDistTestCase) From 170b952ecd0098e93237cbb1da234a8f2680035e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 10:54:43 +0000 Subject: [PATCH 2944/8469] upgraded distutils docs w.r.t. the manifest regeneration --- command/sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 4cede72988..087ae9dcc6 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -63,7 +63,8 @@ def checking_metadata(self): "just regenerate the manifest and then stop " "(implies --force-manifest)"), ('force-manifest', 'f', - "forcibly regenerate the manifest and carry on as usual"), + "forcibly regenerate the manifest and carry on as usual. " + "Deprecated: now the manifest is always regenerated."), ('formats=', None, "formats for source distribution (comma-separated list)"), ('keep-temp', 'k', From 457ae770b4bc93dc866776384ab4dd9f6958ab5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 11:00:17 +0000 Subject: [PATCH 2945/8469] Merged revisions 81261 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81261 | tarek.ziade | 2010-05-17 12:54:43 +0200 (Mon, 17 May 2010) | 1 line upgraded distutils docs w.r.t. the manifest regeneration ........ --- command/sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index b93994d07f..535b8d2aea 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -57,7 +57,8 @@ class sdist (Command): "just regenerate the manifest and then stop " "(implies --force-manifest)"), ('force-manifest', 'f', - "forcibly regenerate the manifest and carry on as usual"), + "forcibly regenerate the manifest and carry on as usual. " + "Deprecated: now the manifest is always regenerated."), ('formats=', None, "formats for source distribution (comma-separated list)"), ('keep-temp', 'k', From a99ff5b39025ea4dc8a72f9e7f1d51a17f1aacdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 11:01:57 +0000 Subject: [PATCH 2946/8469] Merged revisions 81261 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81261 | tarek.ziade | 2010-05-17 12:54:43 +0200 (Mon, 17 May 2010) | 1 line upgraded distutils docs w.r.t. the manifest regeneration ........ --- command/sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index b2088f98d1..f6e099b89f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -63,7 +63,8 @@ def checking_metadata(self): "just regenerate the manifest and then stop " "(implies --force-manifest)"), ('force-manifest', 'f', - "forcibly regenerate the manifest and carry on as usual"), + "forcibly regenerate the manifest and carry on as usual. " + "Deprecated: now the manifest is always regenerated."), ('formats=', None, "formats for source distribution (comma-separated list)"), ('keep-temp', 'k', From 86bffc2288f78b16f66e94e52c39c6e6fdf1c09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Mon, 17 May 2010 11:04:41 +0000 Subject: [PATCH 2947/8469] Merged revisions 81263 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81263 | tarek.ziade | 2010-05-17 13:01:57 +0200 (Mon, 17 May 2010) | 9 lines Merged revisions 81261 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81261 | tarek.ziade | 2010-05-17 12:54:43 +0200 (Mon, 17 May 2010) | 1 line upgraded distutils docs w.r.t. the manifest regeneration ........ ................ --- command/sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 88fde46c30..bb2106120a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -63,7 +63,8 @@ def checking_metadata(self): "just regenerate the manifest and then stop " "(implies --force-manifest)"), ('force-manifest', 'f', - "forcibly regenerate the manifest and carry on as usual"), + "forcibly regenerate the manifest and carry on as usual. " + "Deprecated: now the manifest is always regenerated."), ('formats=', None, "formats for source distribution (comma-separated list)"), ('keep-temp', 'k', From 8ea633f81832fc7cc959fa57b3ee97d886f1bd7d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 18 May 2010 23:37:50 +0000 Subject: [PATCH 2948/8469] Merged revisions 68750,68811,68945,69157 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68750 | benjamin.peterson | 2009-01-18 22:47:04 +0000 (So, 18 Jan 2009) | 1 line fix encoding cookie case ........ r68811 | benjamin.peterson | 2009-01-20 18:58:27 +0000 (Di, 20 Jan 2009) | 1 line fix url ........ r68945 | tarek.ziade | 2009-01-25 22:11:04 +0000 (So, 25 Jan 2009) | 1 line added missing module docstring ........ r69157 | benjamin.peterson | 2009-01-31 23:43:25 +0000 (Sa, 31 Jan 2009) | 1 line add explanatory comment ........ --- command/install_lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/install_lib.py b/command/install_lib.py index 7e0c708888..fb15530ead 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -1,4 +1,8 @@ # This module should be kept compatible with Python 2.1. +"""distutils.command.install_lib + +Implements the Distutils 'install_lib' command +(install all Python modules).""" __revision__ = "$Id$" From 74a3de058c276bc12ed9a7d9d63487b80fe73c5a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 19 May 2010 11:48:28 +0200 Subject: [PATCH 2949/8469] removed assertTrue/assertFalse occurrences --HG-- branch : distribute extra : rebase_source : b7e5bbfa9d90078fd763f728a5d57fb6bd3e3657 --- setuptools/tests/__init__.py | 64 +++++++++++++-------------- setuptools/tests/test_packageindex.py | 2 +- setuptools/tests/test_resources.py | 38 ++++++++-------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 4fb382ca7b..9af44a88bb 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -94,21 +94,21 @@ def testRequire(self): from email import __version__ self.assertEqual(req.get_version(), __version__) - self.assertTrue(req.version_ok('1.0.9')) - self.assertFalse(req.version_ok('0.9.1')) - self.assertFalse(req.version_ok('unknown')) + self.assert_(req.version_ok('1.0.9')) + self.assert_(not req.version_ok('0.9.1')) + self.assert_(not req.version_ok('unknown')) - self.assertTrue(req.is_present()) - self.assertTrue(req.is_current()) + self.assert_(req.is_present()) + self.assert_(req.is_current()) req = Require('Email 3000','03000','email',format=LooseVersion) - self.assertTrue(req.is_present()) - self.assertFalse(req.is_current()) - self.assertFalse(req.version_ok('unknown')) + self.assert_(req.is_present()) + self.assert_(not req.is_current()) + self.assert_(not req.version_ok('unknown')) req = Require('Do-what-I-mean','1.0','d-w-i-m') - self.assertFalse(req.is_present()) - self.assertFalse(req.is_current()) + self.assert_(not req.is_present()) + self.assert_(not req.is_current()) req = Require('Tests', None, 'tests', homepage="http://example.com") self.assertEqual(req.format, None) @@ -118,8 +118,8 @@ def testRequire(self): self.assertEqual(req.homepage, 'http://example.com') paths = [os.path.dirname(p) for p in __path__] - self.assertTrue(req.is_present(paths)) - self.assertTrue(req.is_current(paths)) + self.assert_(req.is_present(paths)) + self.assert_(req.is_current(paths)) class DistroTests(TestCase): @@ -137,7 +137,7 @@ def setUp(self): def testDistroType(self): - self.assertTrue(isinstance(self.dist,setuptools.dist.Distribution)) + self.assert_(isinstance(self.dist,setuptools.dist.Distribution)) def testExcludePackage(self): @@ -189,17 +189,17 @@ def testEmpty(self): dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) def testContents(self): - self.assertTrue(self.dist.has_contents_for('a')) + self.assert_(self.dist.has_contents_for('a')) self.dist.exclude_package('a') - self.assertFalse(self.dist.has_contents_for('a')) + self.assert_(not self.dist.has_contents_for('a')) - self.assertTrue(self.dist.has_contents_for('b')) + self.assert_(self.dist.has_contents_for('b')) self.dist.exclude_package('b') - self.assertFalse(self.dist.has_contents_for('b')) + self.assert_(not self.dist.has_contents_for('b')) - self.assertTrue(self.dist.has_contents_for('c')) + self.assert_(self.dist.has_contents_for('c')) self.dist.exclude_package('c') - self.assertFalse(self.dist.has_contents_for('c')) + self.assert_(not self.dist.has_contents_for('c')) @@ -269,12 +269,12 @@ def setUp(self): ) def testDefaults(self): - self.assertFalse( + self.assert_(not Feature( "test",standard=True,remove='x',available=False ).include_by_default() ) - self.assertTrue( + self.assert_( Feature("test",standard=True,remove='x').include_by_default() ) # Feature must have either kwargs, removes, or require_features @@ -288,33 +288,33 @@ def testAvailability(self): def testFeatureOptions(self): dist = self.dist - self.assertTrue( + self.assert_( ('with-dwim',None,'include DWIM') in dist.feature_options ) - self.assertTrue( + self.assert_( ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options ) - self.assertTrue( + self.assert_( ('with-bar',None,'include bar (default)') in dist.feature_options ) - self.assertTrue( + self.assert_( ('without-bar',None,'exclude bar') in dist.feature_options ) self.assertEqual(dist.feature_negopt['without-foo'],'with-foo') self.assertEqual(dist.feature_negopt['without-bar'],'with-bar') self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim') - self.assertFalse('without-baz' in dist.feature_negopt) + self.assert_(not 'without-baz' in dist.feature_negopt) def testUseFeatures(self): dist = self.dist self.assertEqual(dist.with_foo,1) self.assertEqual(dist.with_bar,0) self.assertEqual(dist.with_baz,1) - self.assertFalse('bar_et' in dist.py_modules) - self.assertFalse('pkg.bar' in dist.packages) - self.assertTrue('pkg.baz' in dist.packages) - self.assertTrue('scripts/baz_it' in dist.scripts) - self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries) + self.assert_(not 'bar_et' in dist.py_modules) + self.assert_(not 'pkg.bar' in dist.packages) + self.assert_('pkg.baz' in dist.packages) + self.assert_('scripts/baz_it' in dist.scripts) + self.assert_(('libfoo','foo/foofoo.c') in dist.libraries) self.assertEqual(dist.ext_modules,[]) self.assertEqual(dist.require_features, [self.req]) @@ -331,7 +331,7 @@ class TestCommandTests(TestCase): def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') - self.assertTrue(isinstance(test_cmd, distutils.cmd.Command)) + self.assert_(isinstance(test_cmd, distutils.cmd.Command)) def testLongOptSuiteWNoDefault(self): ts1 = makeSetup(script_args=['test','--test-suite=foo.tests.suite']) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 18a06de558..29359a9cf4 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -10,7 +10,7 @@ class TestPackageIndex(unittest.TestCase): def test_bad_urls(self): index = setuptools.package_index.PackageIndex() - url = 'http://127.0.0.1/nonesuch/test_package_index' + url = 'http://127.0.0.1:0/nonesuch/test_package_index' try: v = index.open_url(url) except Exception, v: diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index c1dc488712..883cfad19f 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -35,7 +35,7 @@ def testCollection(self): ad.add(Distribution.from_filename("FooPkg-1.2-py2.4.egg")) # Name is in there now - self.assertTrue(ad['FooPkg']) + self.assert_(ad['FooPkg']) # But only 1 package self.assertEqual(list(ad), ['foopkg']) @@ -218,7 +218,7 @@ def assertfields(self, ep): self.assertEqual(ep.module_name,"setuptools.tests.test_resources") self.assertEqual(ep.attrs, ("EntryPointTests",)) self.assertEqual(ep.extras, ("x",)) - self.assertTrue(ep.load() is EntryPointTests) + self.assert_(ep.load() is EntryPointTests) self.assertEqual( str(ep), "foo = setuptools.tests.test_resources:EntryPointTests [x]" @@ -318,20 +318,20 @@ def testBasicContains(self): foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") twist11 = Distribution.from_filename("Twisted-1.1.egg") twist12 = Distribution.from_filename("Twisted-1.2.egg") - self.assertTrue(parse_version('1.2') in r) - self.assertTrue(parse_version('1.1') not in r) - self.assertTrue('1.2' in r) - self.assertTrue('1.1' not in r) - self.assertTrue(foo_dist not in r) - self.assertTrue(twist11 not in r) - self.assertTrue(twist12 in r) + self.assert_(parse_version('1.2') in r) + self.assert_(parse_version('1.1') not in r) + self.assert_('1.2' in r) + self.assert_('1.1' not in r) + self.assert_(foo_dist not in r) + self.assert_(twist11 not in r) + self.assert_(twist12 in r) def testAdvancedContains(self): r, = parse_requirements("Foo>=1.2,<=1.3,==1.9,>2.0,!=2.5,<3.0,==4.5") for v in ('1.2','1.2.2','1.3','1.9','2.0.1','2.3','2.6','3.0c1','4.5'): - self.assertTrue(v in r, (v,r)) + self.assert_(v in r, (v,r)) for v in ('1.2c1','1.3.1','1.5','1.9.1','2.0','2.5','3.0','4.0'): - self.assertTrue(v not in r, (v,r)) + self.assert_(v not in r, (v,r)) def testOptionsAndHashing(self): @@ -353,14 +353,14 @@ def testVersionEquality(self): r2 = Requirement.parse("foo!=0.3a4") d = Distribution.from_filename - self.assertFalse(d("foo-0.3a4.egg") in r1) - self.assertFalse(d("foo-0.3a1.egg") in r1) - self.assertFalse(d("foo-0.3a4.egg") in r2) + self.assert_(d("foo-0.3a4.egg") not in r1) + self.assert_(d("foo-0.3a1.egg") not in r1) + self.assert_(d("foo-0.3a4.egg") not in r2) - self.assertTrue(d("foo-0.3a2.egg") in r1) - self.assertTrue(d("foo-0.3a2.egg") in r2) - self.assertTrue(d("foo-0.3a3.egg") in r2) - self.assertTrue(d("foo-0.3a5.egg") in r2) + self.assert_(d("foo-0.3a2.egg") in r1) + self.assert_(d("foo-0.3a2.egg") in r2) + self.assert_(d("foo-0.3a3.egg") in r2) + self.assert_(d("foo-0.3a5.egg") in r2) def testDistributeSetuptoolsOverride(self): # Plain setuptools or distribute mean we return distribute. @@ -480,7 +480,7 @@ def c(s1,s2): def testVersionOrdering(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - self.assertTrue(p1 Date: Wed, 19 May 2010 11:49:00 +0200 Subject: [PATCH 2950/8469] added the -q flag and make sure the build folder is removed when python 3 tests are run --HG-- branch : distribute extra : rebase_source : 5ebb6fedf532a2a517cbcf522cc9ec3a9066ea0a --- test.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test.sh b/test.sh index ac309dec7e..cc637f6863 100644 --- a/test.sh +++ b/test.sh @@ -1,6 +1,7 @@ -python2.3 setup.py test -python2.4 setup.py test -python2.5 setup.py test -python2.6 setup.py test -python3.1 setup.py test +python2.3 setup.py -q test +python2.4 setup.py -q test +python2.5 setup.py -q test +python2.6 setup.py -q test +rm -rf build +python3.1 setup.py -q test From a33917aed3c98e2537386bd904658f0b4f963d1c Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 19 May 2010 12:09:56 +0200 Subject: [PATCH 2951/8469] malformed urls in 2.7 are catched now - fixes #160 --HG-- branch : distribute extra : rebase_source : de334e49e876c8ea88f738e03995a461ea669879 --- CHANGES.txt | 1 + setuptools/package_index.py | 5 ++++- setuptools/tests/test_packageindex.py | 12 +++++++++++- test.sh | 2 ++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ad743ae7c7..89760759a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.13 ------ +* Issue 160: 2.7 gives ValueError("Invalid IPv6 URL") * ------ diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 924c15e174..1c50d86f47 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -268,7 +268,10 @@ def scan(link): # process an index page into the package-page index for match in HREF.finditer(page): - scan( urlparse.urljoin(url, htmldecode(match.group(1))) ) + try: + scan( urlparse.urljoin(url, htmldecode(match.group(1))) ) + except ValueError: + pass pkg, ver = scan(url) # ensure this page is in the page index if pkg: diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 29359a9cf4..8ae7a5b921 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,7 +1,7 @@ """Package Index Tests """ # More would be better! - +import sys import os, shutil, tempfile, unittest, urllib2 import pkg_resources import setuptools.package_index @@ -57,6 +57,16 @@ def _urlopen(*args): except Exception, v: self.assert_('nonnumeric port' in str(v)) + + # issue #160 + if sys.version_info[0] == 2 and sys.version_info[1] == 7: + # this should not fail + url = 'http://example.com' + page = ('') + index.process_index(url, page) + + def test_url_ok(self): index = setuptools.package_index.PackageIndex( hosts=('www.example.com',) diff --git a/test.sh b/test.sh index cc637f6863..61599adb55 100644 --- a/test.sh +++ b/test.sh @@ -2,6 +2,8 @@ python2.3 setup.py -q test python2.4 setup.py -q test python2.5 setup.py -q test python2.6 setup.py -q test +python2.7 setup.py -q test + rm -rf build python3.1 setup.py -q test From 92f39994d2c6c711fbd73a5589d4de7b0ed1b72a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 19 May 2010 13:38:09 +0200 Subject: [PATCH 2952/8469] added a test that is supposely breaking - refs #152 --HG-- branch : distribute extra : rebase_source : 2fa447a630d946a3adf5886115d89065a675ece2 --- distribute.egg-info/entry_points.txt | 2 +- setuptools/tests/test_easy_install.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9fd4175819..0ee586463a 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-2.5 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e02798c628..692982b36f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -10,6 +10,16 @@ from setuptools.dist import Distribution from pkg_resources import Distribution as PRDistribution +try: + import multiprocessing + import logging + _LOG = logging.getLogger('test_easy_install') + logging.basicConfig(level=logging.INFO, stream=sys.stderr) + _MULTIPROC = True +except ImportError: + _MULTIPROC = False + _LOG = None + class FakeDist(object): def get_entry_map(self, group): if group != 'console_scripts': @@ -186,3 +196,8 @@ def test_install(self): content.sort() self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) + def test_multiproc_atexit(self): + if not _MULTIPROC: + return + _LOG.info('this should not break') + From b78e3623ca34400e29297da0409211a7d83728c6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 19 May 2010 17:00:07 +0000 Subject: [PATCH 2953/8469] Issue #8663: distutils.log emulates backslashreplace error handler. Fix compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if stdout is not a TTY). --- log.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/log.py b/log.py index 758857081c..b301a8338c 100644 --- a/log.py +++ b/log.py @@ -27,6 +27,10 @@ def _log(self, level, msg, args): stream = sys.stderr else: stream = sys.stdout + if stream.errors == 'strict': + # emulate backslashreplace error handler + encoding = stream.encoding + msg = msg.encode(encoding, "backslashreplace").decode(encoding) stream.write('%s\n' % msg) stream.flush() From 727851619e008c1f44e79a60ddff41bb4ebf02b7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 19 May 2010 17:15:50 +0000 Subject: [PATCH 2954/8469] Oops, add the new test_log.py for distutils test suite (missing part of r81359) --- tests/test_log.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/test_log.py diff --git a/tests/test_log.py b/tests/test_log.py new file mode 100644 index 0000000000..d35de3456c --- /dev/null +++ b/tests/test_log.py @@ -0,0 +1,36 @@ +"""Tests for distutils.log""" + +import sys +import unittest +from tempfile import NamedTemporaryFile + +from distutils import log + +class TestLog(unittest.TestCase): + def test_non_ascii(self): + # Issue #8663: test that non-ASCII text is escaped with + # backslashreplace error handler (stream use ASCII encoding and strict + # error handler) + old_stdout = sys.stdout + old_stderr = sys.stderr + try: + log.set_threshold(log.DEBUG) + with NamedTemporaryFile(mode="w+", encoding='ascii') as stdout, \ + NamedTemporaryFile(mode="w+", encoding='ascii') as stderr: + sys.stdout = stdout + sys.stderr = stderr + log.debug("debug:\xe9") + log.fatal("fatal:\xe9") + stdout.seek(0) + self.assertEquals(stdout.read().rstrip(), "debug:\\xe9") + stderr.seek(0) + self.assertEquals(stderr.read().rstrip(), "fatal:\\xe9") + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + +def test_suite(): + return unittest.makeSuite(TestLog) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From 17502a06524accaf75c09baa817592bd0d38e75b Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 25 May 2010 10:52:23 +0200 Subject: [PATCH 2955/8469] changed test locally so distribute.egg-info/entry_points.txt is not changed when running tests --HG-- branch : distribute extra : rebase_source : ae42d5a7c843fb5dd3bede9ba44ece9742075cbf --- setup.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/setup.py b/setup.py index 3ae40817ee..41e0ce4035 100755 --- a/setup.py +++ b/setup.py @@ -41,6 +41,8 @@ from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py +from setuptools.command.test import test as _test + scripts = [] # specific command that is used to generate windows .exe files @@ -64,6 +66,36 @@ def build_package_data(self): if copied and srcfile in self.distribution.convert_2to3_doctests: self.__doctests_2to3.append(outf) +class test(_test): + """Specific test class to avoid rewriting the entry_points.txt""" + def run(self): + entry_points = os.path.join('distribute.egg-info', 'entry_points.txt') + + if not os.path.exists(entry_points): + try: + _test.run(self) + finally: + return + + f = open(entry_points) + + # running the test + try: + ep_content = f.read() + finally: + f.close() + + try: + _test.run(self) + finally: + # restoring the file + f = open(entry_points, 'w') + try: + f.write(ep_content) + finally: + f.close() + + # if we are installing Distribute using "python setup.py install" # we need to get setuptools out of the way def _easy_install_marker(): @@ -90,6 +122,7 @@ def _being_installed(): from distribute_setup import _before_install _before_install() + dist = setup( name="distribute", version=VERSION, @@ -110,6 +143,7 @@ def _being_installed(): zip_safe = (sys.version>="2.5"), # <2.5 needs unzipped for -m to work + cmdclass = {'test': test}, entry_points = { "distutils.commands" : [ From 29ffeae7d36c6e6c2a10dd230f8472226f51d955 Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Wed, 19 May 2010 21:54:20 +0200 Subject: [PATCH 2956/8469] set-up infrastructure to write tests with a real http server, and reproduced issue 163. --HG-- branch : distribute extra : rebase_source : dc3a9fb1663500c66febacbc2ede43eaa96c190e --- .hgignore | 1 + .../indexes/test_links_priority/external.html | 3 ++ .../simple/foobar/index.html | 4 ++ setuptools/tests/server.py | 39 +++++++++++++++++++ setuptools/tests/test_packageindex.py | 38 ++++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 setuptools/tests/indexes/test_links_priority/external.html create mode 100644 setuptools/tests/indexes/test_links_priority/simple/foobar/index.html create mode 100644 setuptools/tests/server.py diff --git a/.hgignore b/.hgignore index 3ccf2a3af4..21ec620a54 100644 --- a/.hgignore +++ b/.hgignore @@ -10,3 +10,4 @@ lib bin include \.Python +*.swp diff --git a/setuptools/tests/indexes/test_links_priority/external.html b/setuptools/tests/indexes/test_links_priority/external.html new file mode 100644 index 0000000000..883e979063 --- /dev/null +++ b/setuptools/tests/indexes/test_links_priority/external.html @@ -0,0 +1,3 @@ + +bad old link + diff --git a/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html b/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html new file mode 100644 index 0000000000..dc6273d1f7 --- /dev/null +++ b/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html @@ -0,0 +1,4 @@ + +foobar-0.1.tar.gz
+external homepage
+ diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py new file mode 100644 index 0000000000..00f4e07c3c --- /dev/null +++ b/setuptools/tests/server.py @@ -0,0 +1,39 @@ +"""Basic http server for tests to simulate PyPI or custom indexes +""" +import urllib2 +from threading import Thread +from BaseHTTPServer import HTTPServer +from SimpleHTTPServer import SimpleHTTPRequestHandler + +class IndexServer(HTTPServer): + """Basic single-threaded http server simulating a package index + + You can use this server in unittest like this:: + s = IndexServer() + s.start() + index_url = s.base_url() + 'mytestindex' + # do some test requests to the index + s.stop() + """ + def __init__(self): + HTTPServer.__init__(self, ('', 0), SimpleHTTPRequestHandler) + self._run = True + + def serve(self): + while True: + self.handle_request() + if not self._run: break + + def start(self): + self.thread = Thread(target=self.serve) + self.thread.start() + + def stop(self): + """self.shutdown is not supported on python < 2.6""" + self._run = False + urllib2.urlopen('http://127.0.0.1:%s/' % self.server_address[1]) + self.thread.join() + + def base_url(self): + port = self.server_address[1] + return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 8ae7a5b921..5c1c6970ef 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -5,6 +5,7 @@ import os, shutil, tempfile, unittest, urllib2 import pkg_resources import setuptools.package_index +from server import IndexServer class TestPackageIndex(unittest.TestCase): @@ -74,3 +75,40 @@ def test_url_ok(self): url = 'file:///tmp/test_package_index' self.assert_(index.url_ok(url, True)) + def test_links_priority(self): + """ + Download links from the pypi simple index should be used before + external download links. + http://bitbucket.org/tarek/distribute/issue/163/md5-validation-error + + Usecase : + - someone uploads a package on pypi, a md5 is generated + - someone manually copies this link (with the md5 in the url) onto an + external page accessible from the package page. + - someone reuploads the package (with a different md5) + - while easy_installing, an MD5 error occurs because the external link + is used + -> Distribute should use the link from pypi, not the external one. + """ + # start an index server + server = IndexServer() + server.start() + index_url = server.base_url() + 'test_links_priority/simple/' + + # scan a test index + pi = setuptools.package_index.PackageIndex(index_url) + requirement = pkg_resources.Requirement.parse('foobar') + pi.find_packages(requirement) + server.stop() + + # the distribution has been found + self.assert_('foobar' in pi) + # we have two links + self.assert_(len(pi['foobar'])==2) + # the first link should be from the index + self.assert_('correct_md5' in pi['foobar'][0].location) + # the second link should be the external one + self.assert_('bad_md5' in pi['foobar'][1].location) + + + From 6cf4f07323aac001c1c1a0e3aafbe55a84cec391 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 19 May 2010 20:30:19 +0000 Subject: [PATCH 2957/8469] Merged revisions 81359-81361 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81359 | victor.stinner | 2010-05-19 19:00:07 +0200 (mer., 19 mai 2010) | 4 lines Issue #8663: distutils.log emulates backslashreplace error handler. Fix compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if stdout is not a TTY). ........ r81360 | victor.stinner | 2010-05-19 19:11:19 +0200 (mer., 19 mai 2010) | 5 lines regrtest.py: call replace_stdout() before the first call to print() print("== ", os.getcwd()) fails if the current working directory is not ASCII whereas sys.stdout encoding is ASCII. ........ r81361 | victor.stinner | 2010-05-19 19:15:50 +0200 (mer., 19 mai 2010) | 2 lines Oops, add the new test_log.py for distutils test suite (missing part of r81359) ........ --- log.py | 4 ++++ tests/test_log.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/test_log.py diff --git a/log.py b/log.py index 758857081c..b301a8338c 100644 --- a/log.py +++ b/log.py @@ -27,6 +27,10 @@ def _log(self, level, msg, args): stream = sys.stderr else: stream = sys.stdout + if stream.errors == 'strict': + # emulate backslashreplace error handler + encoding = stream.encoding + msg = msg.encode(encoding, "backslashreplace").decode(encoding) stream.write('%s\n' % msg) stream.flush() diff --git a/tests/test_log.py b/tests/test_log.py new file mode 100644 index 0000000000..d35de3456c --- /dev/null +++ b/tests/test_log.py @@ -0,0 +1,36 @@ +"""Tests for distutils.log""" + +import sys +import unittest +from tempfile import NamedTemporaryFile + +from distutils import log + +class TestLog(unittest.TestCase): + def test_non_ascii(self): + # Issue #8663: test that non-ASCII text is escaped with + # backslashreplace error handler (stream use ASCII encoding and strict + # error handler) + old_stdout = sys.stdout + old_stderr = sys.stderr + try: + log.set_threshold(log.DEBUG) + with NamedTemporaryFile(mode="w+", encoding='ascii') as stdout, \ + NamedTemporaryFile(mode="w+", encoding='ascii') as stderr: + sys.stdout = stdout + sys.stderr = stderr + log.debug("debug:\xe9") + log.fatal("fatal:\xe9") + stdout.seek(0) + self.assertEquals(stdout.read().rstrip(), "debug:\\xe9") + stderr.seek(0) + self.assertEquals(stderr.read().rstrip(), "fatal:\\xe9") + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + +def test_suite(): + return unittest.makeSuite(TestLog) + +if __name__ == "__main__": + unittest.main(defaultTest="test_suite") From aa64b99eff47ac0aaf0e2b37c3973a2c8504e260 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 19 May 2010 22:33:33 +0200 Subject: [PATCH 2958/8469] removing decorators from the bootstrap file --HG-- branch : distribute extra : rebase_source : c8ab8493df6d120014ca8d8d39406e0c791272bd --- distribute_setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 3cb043e24e..194861b51b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -227,7 +227,6 @@ def violation(*args): return __no_sandbox -@_no_sandbox def _patch_file(path, content): """Will backup the file then patch it""" existing_content = open(path).read() @@ -244,6 +243,7 @@ def _patch_file(path, content): f.close() return True +_patch_file = _no_sandbox(_patch_file) def _same_content(path, content): return open(path).read() == content @@ -254,7 +254,6 @@ def _rename_path(path): os.rename(path, new_name) return new_name -@_no_sandbox def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): log.warn('Unkown installation at %s', placeholder) @@ -288,13 +287,13 @@ def _remove_flat_installation(placeholder): 'Setuptools distribution', element) return True +_remove_flat_installation = _no_sandbox(_remove_flat_installation) def _after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib _create_fake_setuptools_pkg_info(placeholder) -@_no_sandbox def _create_fake_setuptools_pkg_info(placeholder): if not placeholder or not os.path.exists(placeholder): log.warn('Could not find the install location') @@ -322,7 +321,8 @@ def _create_fake_setuptools_pkg_info(placeholder): finally: f.close() -@_no_sandbox +_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info) + def _patch_egg_dir(path): # let's check if it's already patched pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') @@ -341,6 +341,7 @@ def _patch_egg_dir(path): f.close() return True +_patch_egg_dir = _no_sandbox(_patch_egg_dir) def _before_install(): log.warn('Before install bootstrap.') From 0c8f3ad99a9b8d4a11e32ecf841df428a1cc7fa2 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 19 May 2010 22:43:52 +0200 Subject: [PATCH 2959/8469] update CHANGES.txt --HG-- branch : distribute extra : rebase_source : c5abfc00189b1fdc01f3d14e075df5bca4770252 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 89760759a8..f7119ada50 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES ------ * Issue 160: 2.7 gives ValueError("Invalid IPv6 URL") -* +* Issue 150: Fixed using ~/.local even in a --no-site-packages virtualenv ------ 0.6.12 From f3411291c4ec89df2f9fe18263a5509fb4caaddf Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Wed, 19 May 2010 23:11:22 +0200 Subject: [PATCH 2960/8469] fixed issue 163 : don't include md5 when comparing two distributions, and scan index links before external page links. --HG-- branch : distribute extra : rebase_source : d190057280e7cb27317eb4aa40e75f1c851ed6e5 --- pkg_resources.py | 7 +++++-- setuptools/package_index.py | 4 ++-- .../tests/indexes/test_links_priority/external.html | 2 +- .../indexes/test_links_priority/simple/foobar/index.html | 2 +- setuptools/tests/test_packageindex.py | 8 +++----- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 6ec51fa06c..bd31852201 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2081,8 +2081,11 @@ def from_location(cls,location,basename,metadata=None,**kw): hashcmp = property( lambda self: ( - getattr(self,'parsed_version',()), self.precedence, self.key, - -len(self.location or ''), self.location, self.py_version, + getattr(self,'parsed_version',()), + self.precedence, + self.key, + (self.location or '').split('#md5=')[0], + self.py_version, self.platform ) ) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1c50d86f47..ba43cfbf74 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -203,11 +203,11 @@ def process_url(self, url, retrieve=False): charset = f.headers.get_param('charset') or 'latin-1' page = page.decode(charset, "ignore") f.close() - if url.startswith(self.index_url) and getattr(f,'code',None)!=404: - page = self.process_index(url, page) for match in HREF.finditer(page): link = urlparse.urljoin(base, htmldecode(match.group(1))) self.process_url(link) + if url.startswith(self.index_url) and getattr(f,'code',None)!=404: + page = self.process_index(url, page) def process_filename(self, fn, nested=False): # process filenames or directories diff --git a/setuptools/tests/indexes/test_links_priority/external.html b/setuptools/tests/indexes/test_links_priority/external.html index 883e979063..92e4702f63 100644 --- a/setuptools/tests/indexes/test_links_priority/external.html +++ b/setuptools/tests/indexes/test_links_priority/external.html @@ -1,3 +1,3 @@ -bad old link +bad old link diff --git a/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html b/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html index dc6273d1f7..fefb028bd3 100644 --- a/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html +++ b/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html @@ -1,4 +1,4 @@ -foobar-0.1.tar.gz
+foobar-0.1.tar.gz
external homepage
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 5c1c6970ef..42cb8c1e5e 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -103,12 +103,10 @@ def test_links_priority(self): # the distribution has been found self.assert_('foobar' in pi) - # we have two links - self.assert_(len(pi['foobar'])==2) - # the first link should be from the index + # we have only one link, because links are compared without md5 + self.assert_(len(pi['foobar'])==1) + # the link should be from the index self.assert_('correct_md5' in pi['foobar'][0].location) - # the second link should be the external one - self.assert_('bad_md5' in pi['foobar'][1].location) From d7dc0ff754d8f3b3f2bf56087644a0a6d80c7061 Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Tue, 25 May 2010 11:16:27 +0200 Subject: [PATCH 2961/8469] fixed issue 163 : don't include md5 when comparing two distributions, and scan index links before external page links. --HG-- branch : distribute extra : rebase_source : 21315f22104e090324f7fe243a4f16516c0a49fa --- CHANGES.txt | 2 ++ setuptools/tests/server.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index f7119ada50..d35422b90d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Issue 160: 2.7 gives ValueError("Invalid IPv6 URL") * Issue 150: Fixed using ~/.local even in a --no-site-packages virtualenv +* Issue 163: scan index links before external links, and don't use the md5 when + comparing two distributions ------ 0.6.12 diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 00f4e07c3c..2f455e4161 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -13,6 +13,7 @@ class IndexServer(HTTPServer): s.start() index_url = s.base_url() + 'mytestindex' # do some test requests to the index + # The index files should be located in setuptools/tests/indexes s.stop() """ def __init__(self): From 641afae67627f4c6fb3c52a318a6c86b50a33ee2 Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Thu, 20 May 2010 00:02:46 +0200 Subject: [PATCH 2962/8469] Fix for python2.4 --HG-- branch : distribute extra : rebase_source : b4c2fb5521783c03bebcdb52e17c8e0063ab86aa --- setuptools/tests/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 2f455e4161..5e5e3e6104 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -32,9 +32,9 @@ def start(self): def stop(self): """self.shutdown is not supported on python < 2.6""" self._run = False - urllib2.urlopen('http://127.0.0.1:%s/' % self.server_address[1]) + urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port) self.thread.join() def base_url(self): - port = self.server_address[1] + port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port From c68c5c96f49efec1ad6768a7679e18afe6e0a45b Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Thu, 20 May 2010 00:06:10 +0200 Subject: [PATCH 2963/8469] updated contributors --HG-- branch : distribute extra : rebase_source : 7be4047ee158e00789764ef0cbf59daaa26b81d5 --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index da9e021974..8f6c4aa0e3 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -5,6 +5,7 @@ Contributors * Alex Grönholm * Alice Bevan-McGregor * Arfrever Frehtes Taifersar Arahesis +* Christophe Combelles * Daniel Stutzbach * Hanno Schlichting * Jannis Leidel From 72c44b3258e02b56ac106f878a64eca726a6f01f Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Thu, 20 May 2010 19:31:44 +0900 Subject: [PATCH 2964/8469] BUG: Fix #142 - easy_install ignore locally installed packages. Backport from setuptools 0.6c10. --HG-- branch : distribute extra : rebase_source : d06cbdae906a725410d4993d9e1a631e2acac345 --- setuptools/command/easy_install.py | 3 ++- setuptools/package_index.py | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d68943faf3..e13f676a95 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -565,7 +565,8 @@ def easy_install(self, spec, deps=False): self.check_editable(spec) dist = self.package_index.fetch_distribution( - spec, tmpdir, self.upgrade, self.editable, not self.always_copy + spec, tmpdir, self.upgrade, self.editable, not self.always_copy, + self.local_index ) if dist is None: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1c50d86f47..67e9f6ae09 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -418,7 +418,8 @@ def download(self, spec, tmpdir): def fetch_distribution(self, - requirement, tmpdir, force_scan=False, source=False, develop_ok=False + requirement, tmpdir, force_scan=False, source=False, develop_ok=False, + local_index=None ): """Obtain a distribution suitable for fulfilling `requirement` @@ -440,11 +441,14 @@ def fetch_distribution(self, # process a Requirement self.info("Searching for %s", requirement) skipped = {} + dist = None - def find(req): + def find(req, env=None): + if env is None: + env = self # Find a matching distribution; may be called more than once - for dist in self[req.key]: + for dist in env[req.key]: if dist.precedence==DEVELOP_DIST and not develop_ok: if dist not in skipped: @@ -461,8 +465,11 @@ def find(req): if force_scan: self.prescan() self.find_packages(requirement) + dist = find(requirement) + + if local_index is not None: + dist = dist or find(requirement, local_index) - dist = find(requirement) if dist is None and self.to_scan is not None: self.prescan() dist = find(requirement) From 9456da484efba996b190310fa39dca7db2c8ea81 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Fri, 21 May 2010 19:22:43 +0200 Subject: [PATCH 2965/8469] make HAS_USER_SITE depend on site.ENABLE_USER_SITE --HG-- branch : distribute extra : rebase_source : e7fb6337b41ea732acd41bab92a57471f3632777 --- setuptools/command/easy_install.py | 7 +++---- setuptools/tests/test_easy_install.py | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d68943faf3..a41841b319 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -39,7 +39,7 @@ ] import site -HAS_USER_SITE = not sys.version < "2.6" +HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE def samefile(p1,p2): if hasattr(os.path,'samefile') and ( @@ -122,7 +122,7 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): - if HAS_USER_SITE and site.ENABLE_USER_SITE: + if HAS_USER_SITE: whereami = os.path.abspath(__file__) self.user = whereami.startswith(site.USER_SITE) else: @@ -1347,8 +1347,7 @@ def get_site_dirs(): site_lib = get_python_lib(plat_specific) if site_lib not in sitedirs: sitedirs.append(site_lib) - if sys.version >= "2.6": - import site + if HAS_USER_SITE: sitedirs.append(site.USER_SITE) sitedirs = map(normalize_path, sitedirs) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4791e03cce..8caaeb87c6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -158,7 +158,7 @@ def setUp(self): self.old_cwd = os.getcwd() os.chdir(self.dir) if sys.version >= "2.6": - self.old_enable = site.ENABLE_USER_SITE + self.old_has_site = easy_install_pkg.HAS_USER_SITE self.old_file = easy_install_pkg.__file__ self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() @@ -174,11 +174,11 @@ def tearDown(self): shutil.rmtree(site.USER_SITE) site.USER_BASE = self.old_base site.USER_SITE = self.old_site - site.ENABLE_USER_SITE = self.old_enable + easy_install_pkg.HAS_USER_SITE = self.old_has_site easy_install_pkg.__file__ = self.old_file def test_user_install_implied(self): - site.ENABLE_USER_SITE = True # disabled sometimes + easy_install_pkg.HAS_USER_SITE = True # disabled sometimes #XXX: replace with something meaningfull if sys.version < "2.6": return #SKIP @@ -195,7 +195,7 @@ def test_multiproc_atexit(self): _LOG.info('this should not break') def test_user_install_not_implied_without_usersite_enabled(self): - site.ENABLE_USER_SITE = False # disabled sometimes + easy_install_pkg.HAS_USER_SITE = False # usually enabled #XXX: replace with something meaningfull if sys.version < "2.6": return #SKIP From dd45c0df44049d27db2b16ba5170cd00825dc960 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 25 May 2010 12:13:44 +0200 Subject: [PATCH 2966/8469] using urlparse to extract the fragment --HG-- branch : distribute extra : rebase_source : a377df45aa49dd8eb33c52875b590401c5ddbef8 --- pkg_resources.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index bd31852201..6ef0629643 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -14,6 +14,7 @@ """ import sys, os, zipimport, time, re, imp, types +from urlparse import urlparse, urlunparse try: frozenset @@ -2044,8 +2045,13 @@ def parse_map(cls, data, dist=None): parse_map = classmethod(parse_map) - - +def _remove_md5_fragment(location): + if not location: + return '' + parsed = urlparse(location) + if 'md5' in parsed[-1]: + return urlunparse(parsed[:-1] + ('',)) + return location class Distribution(object): @@ -2079,12 +2085,13 @@ def from_location(cls,location,basename,metadata=None,**kw): ) from_location = classmethod(from_location) + hashcmp = property( lambda self: ( getattr(self,'parsed_version',()), self.precedence, self.key, - (self.location or '').split('#md5=')[0], + _remove_md5_fragment(self.location), self.py_version, self.platform ) From 0756b06fcfc6bb9c045c6927605d1165cd7000cb Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 25 May 2010 12:22:42 +0200 Subject: [PATCH 2967/8469] avoiding name collisions when looking for md5 in fragment --HG-- branch : distribute extra : rebase_source : 8b9469b9b9b4d8769ee5e6655aa1b75c207905b8 --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 6ef0629643..30dbc18812 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2049,7 +2049,7 @@ def _remove_md5_fragment(location): if not location: return '' parsed = urlparse(location) - if 'md5' in parsed[-1]: + if parsed[-1].startswith('md5='): return urlunparse(parsed[:-1] + ('',)) return location From e1ad7a3ac2ee213f7ce9397fa68b85962b38f29c Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 25 May 2010 22:36:37 +0200 Subject: [PATCH 2968/8469] make sure tests.sh return the exit code, and nicer outputs --HG-- branch : distribute extra : rebase_source : 6e614dc25657d2b5ccabbf4ac48c778e712cff30 --- test.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/test.sh b/test.sh index 61599adb55..883271a4de 100644 --- a/test.sh +++ b/test.sh @@ -1,9 +1,47 @@ -python2.3 setup.py -q test -python2.4 setup.py -q test -python2.5 setup.py -q test -python2.6 setup.py -q test -python2.7 setup.py -q test +#!/bin/sh +echo -n "Running tests for Python 2.3..." +python2.3 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + +echo -n "Running tests for Python 2.4..." +python2.4 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + +echo -n "Running tests for Python 2.5..." +python2.5 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + +echo -n "Running tests for Python 2.6..." +python2.6 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi rm -rf build -python3.1 setup.py -q test +echo -n "Running tests for Python 3.1..." +python3.1 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi From db5c0b3692c021fbe92c34e367e05cf341946a67 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Fri, 28 May 2010 00:15:21 +0200 Subject: [PATCH 2969/8469] make self setup correctly consider --user when checking for setuptools, fixes #156 --HG-- branch : distribute extra : rebase_source : f0000d114975e2b952e1153f4a1a53167bb37b20 --- distribute_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 194861b51b..002e3a8579 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -361,8 +361,8 @@ def _under_prefix(location): if len(args) > index: top_dir = args[index+1] return location.startswith(top_dir) - elif option == '--user' and USER_SITE is not None: - return location.startswith(USER_SITE) + if arg == '--user' and USER_SITE is not None: + return location.startswith(USER_SITE) return True From 9e5db3812358c2dba88a56da07b39b18f3ce27ad Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 31 May 2010 18:46:25 +0200 Subject: [PATCH 2970/8469] pip uses python -c "... execfile(setup.py)" magic to run a package. This was breaking with the way we relaunch the script --HG-- branch : distribute extra : rebase_source : bb6d85b61b4c2c98b931ea456bd631da9291fb19 --- distribute_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribute_setup.py b/distribute_setup.py index 002e3a8579..37117b34eb 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -421,6 +421,9 @@ def _fake_setuptools(): def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process + # pip marker to avoid a relaunch bug + if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']: + sys.argv[0] = 'setup.py' args = [sys.executable] + sys.argv sys.exit(subprocess.call(args)) From b5ea11d2401a8f3768ba5bd9d4aed22f6a72d5b3 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 31 May 2010 19:12:00 +0200 Subject: [PATCH 2971/8469] updated version --HG-- branch : distribute extra : rebase_source : fd7343f221ea6588f92b4f24fdbc723aaf1efabc --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 8388e9937e..08ef0ee274 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.12" +export VERSION="0.6.13" # tagging hg tag $VERSION From 0fcf811dc7e0f7be7ebd624c84f5c371b15eba1e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 31 May 2010 19:13:34 +0200 Subject: [PATCH 2972/8469] Added tag 0.6.13 for changeset dae247400d0c --HG-- branch : distribute extra : rebase_source : fac3bb8ade7ea948c89e2f6d1e1756705f361e03 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index eb90dab58c..d55e3fd1e6 100644 --- a/.hgtags +++ b/.hgtags @@ -15,3 +15,4 @@ ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 48a97bc89e2f65fc9b78b358d7dc89ba9ec9524a 0.6.12 +dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 From c4318e2572b0158aa05fa241b85552073bb8400b Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 31 May 2010 19:39:15 +0200 Subject: [PATCH 2973/8469] starting 0.6.14 --HG-- branch : distribute extra : rebase_source : b9e623ce0a5b70680f18c48e1c5f64753b70d38c --- README.txt | 6 +++--- docs/conf.py | 4 ++-- release.sh | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 72d897e713..b004960e16 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.13.tar.gz - $ tar -xzvf distribute-0.6.13.tar.gz - $ cd distribute-0.6.13 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz + $ tar -xzvf distribute-0.6.14.tar.gz + $ cd distribute-0.6.14 $ python setup.py install --------------------------- diff --git a/docs/conf.py b/docs/conf.py index 53614ed586..59443dd117 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.13' +version = '0.6.14' # The full version, including alpha/beta/rc tags. -release = '0.6.4' +release = '0.6.14' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.sh b/release.sh index 08ef0ee274..37bdac5c70 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.13" +export VERSION="0.6.14" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 41e0ce4035..ce7cf1d058 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.13" +VERSION = "0.6.14" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From cdb97f5f0ebcf2aa7abf44d4e08696e01310b7c3 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 3 Jun 2010 09:47:21 +0000 Subject: [PATCH 2974/8469] Fix for issue #7724: ensure that distutils and python's own setup.py honor the MacOSX SDK when one is specified. This is needed to be able to build using the 10.4u SDK while running on OSX 10.6. This is a fixed version of the patch in r80963, I've tested this patch on OSX and Linux. --- unixccompiler.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 783d4dca84..b76f0d41cf 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys +import os, sys, re from types import StringType, NoneType from distutils import sysconfig @@ -305,10 +305,30 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') + if sys.platform == 'darwin': + # On OSX users can specify an alternate SDK using + # '-isysroot', calculate the SDK root if it is specified + # (and use it further on) + cflags = sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + + + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + + if sys.platform == 'darwin' and ( + dir.startswith('/System/') or dir.startswith('/usr/')): + shared = os.path.join(sysroot, dir[1:], shared_f) + dylib = os.path.join(sysroot, dir[1:], dylib_f) + static = os.path.join(sysroot, dir[1:], static_f) + # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From 0ca04fb2c44992cbbfbee30960d10ffafeb3f286 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 3 Jun 2010 14:42:25 +0000 Subject: [PATCH 2975/8469] Merged revisions 81662 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81662 | ronald.oussoren | 2010-06-03 11:47:21 +0200 (Thu, 03 Jun 2010) | 9 lines Fix for issue #7724: ensure that distutils and python's own setup.py honor the MacOSX SDK when one is specified. This is needed to be able to build using the 10.4u SDK while running on OSX 10.6. This is a fixed version of the patch in r80963, I've tested this patch on OSX and Linux. ........ --- unixccompiler.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index c14a5d3fc6..81a7de6191 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys +import os, sys, re from distutils.dep_util import newer from distutils.ccompiler import \ @@ -320,10 +320,31 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') + if sys.platform == 'darwin': + # On OSX users can specify an alternate SDK using + # '-isysroot', calculate the SDK root if it is specified + # (and use it further on) + _sysconfig = __import__('sysconfig') + cflags = _sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + + + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + + if sys.platform == 'darwin' and ( + dir.startswith('/System/') or dir.startswith('/usr/')): + shared = os.path.join(sysroot, dir[1:], shared_f) + dylib = os.path.join(sysroot, dir[1:], dylib_f) + static = os.path.join(sysroot, dir[1:], static_f) + # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From cd778292f149a5d71319f00c1bb22943d766683d Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 3 Jun 2010 14:59:56 +0000 Subject: [PATCH 2976/8469] Merged revisions 81662 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81662 | ronald.oussoren | 2010-06-03 11:47:21 +0200 (Thu, 03 Jun 2010) | 9 lines Fix for issue #7724: ensure that distutils and python's own setup.py honor the MacOSX SDK when one is specified. This is needed to be able to build using the 10.4u SDK while running on OSX 10.6. This is a fixed version of the patch in r80963, I've tested this patch on OSX and Linux. ........ --- unixccompiler.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 783d4dca84..b76f0d41cf 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys +import os, sys, re from types import StringType, NoneType from distutils import sysconfig @@ -305,10 +305,30 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') + if sys.platform == 'darwin': + # On OSX users can specify an alternate SDK using + # '-isysroot', calculate the SDK root if it is specified + # (and use it further on) + cflags = sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + + + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + + if sys.platform == 'darwin' and ( + dir.startswith('/System/') or dir.startswith('/usr/')): + shared = os.path.join(sysroot, dir[1:], shared_f) + dylib = os.path.join(sysroot, dir[1:], dylib_f) + static = os.path.join(sysroot, dir[1:], static_f) + # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From 9c55a255899d88a40630c4ec8396638d17ebd89b Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 3 Jun 2010 16:21:03 +0000 Subject: [PATCH 2977/8469] Merged revisions 81673 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81673 | ronald.oussoren | 2010-06-03 16:42:25 +0200 (Thu, 03 Jun 2010) | 16 lines Merged revisions 81662 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81662 | ronald.oussoren | 2010-06-03 11:47:21 +0200 (Thu, 03 Jun 2010) | 9 lines Fix for issue #7724: ensure that distutils and python's own setup.py honor the MacOSX SDK when one is specified. This is needed to be able to build using the 10.4u SDK while running on OSX 10.6. This is a fixed version of the patch in r80963, I've tested this patch on OSX and Linux. ........ ................ --- unixccompiler.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index a33fdf0f7c..f4605f3044 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -15,7 +15,7 @@ __revision__ = "$Id$" -import os, sys +import os, sys, re from distutils import sysconfig from distutils.dep_util import newer @@ -317,10 +317,30 @@ def find_library_file(self, dirs, lib, debug=0): dylib_f = self.library_filename(lib, lib_type='dylib') static_f = self.library_filename(lib, lib_type='static') + if sys.platform == 'darwin': + # On OSX users can specify an alternate SDK using + # '-isysroot', calculate the SDK root if it is specified + # (and use it further on) + cflags = sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + + + for dir in dirs: shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + + if sys.platform == 'darwin' and ( + dir.startswith('/System/') or dir.startswith('/usr/')): + shared = os.path.join(sysroot, dir[1:], shared_f) + dylib = os.path.join(sysroot, dir[1:], dylib_f) + static = os.path.join(sysroot, dir[1:], static_f) + # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm # assuming that *all* Unix C compilers do. And of course I'm From da66d6ba5d1d62159f678e9091f3946e9b096241 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 6 Jun 2010 00:22:09 +0000 Subject: [PATCH 2978/8469] bump version to 2.7 rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 5f401709cf..7f3021010b 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7b2" +__version__ = "2.7rc1" #--end constants-- From 7210ba8400fb48800ed4df24e25c2500423b70fa Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 3 Jul 2010 13:45:58 +0200 Subject: [PATCH 2979/8469] added missing files in the sdist fixes #170 --HG-- branch : distribute extra : rebase_source : 3d8f2228ca300091e8b7c50bbbf5bc2707372cb6 --- CHANGES.txt | 6 ++++++ CONTRIBUTORS.txt | 1 + MANIFEST.in | 1 + 3 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d35422b90d..cdea81352b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.14 +------ + +* Issue 170: fixed unittest failure. Thanks to Toshio. + ------ 0.6.13 ------ diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8f6c4aa0e3..f0ec2ba490 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -15,6 +15,7 @@ Contributors * Philip Jenvey * Reinout van Rees * Tarek Ziadé +* Toshio Kuratomi If you think you name is missing, please add it (alpha order by first name) diff --git a/MANIFEST.in b/MANIFEST.in index 97fef03aa1..461cfd4f13 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ recursive-include setuptools *.py *.txt *.exe recursive-include tests *.py *.c *.pyx *.txt +recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html include *.py include *.txt From e7a6afa8537161befb62ca5cd638f2bbc35a5842 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 10 Jun 2010 23:45:50 -0400 Subject: [PATCH 2980/8469] Fix race condition with the http server used in unittests --HG-- branch : distribute extra : rebase_source : e7093c7a63fe91ede0bdd52735e33ac780e95ec6 --- setuptools/tests/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 5e5e3e6104..f116a3fdb9 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -32,7 +32,10 @@ def start(self): def stop(self): """self.shutdown is not supported on python < 2.6""" self._run = False - urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port) + try: + urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port, None, 5) + except urllib2.URLError: + pass self.thread.join() def base_url(self): From 59d7c14ff6725c5dba040f899f9c145cca169185 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Jun 2010 16:05:20 +0000 Subject: [PATCH 2981/8469] Fix for issue #8577: without this patch test_distutils will fail when builddir != srcdir (that is, when you run configure in a directory that is not the top of the source tree). --- command/install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/install.py b/command/install.py index 3c28c660ec..e3e387ab5d 100644 --- a/command/install.py +++ b/command/install.py @@ -302,8 +302,8 @@ def finalize_options(self): # about needing recursive variable expansion (shudder). py_version = sys.version.split()[0] - prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', - 'srcdir') + prefix, exec_prefix, srcdir, projectbase = get_config_vars('prefix', 'exec_prefix', + 'srcdir', 'projectbase') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), @@ -316,6 +316,7 @@ def finalize_options(self): 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, 'srcdir': srcdir, + 'projectbase': projectbase, } self.config_vars['userbase'] = self.install_userbase From d42efce4a037530f77c8cc91e7f1735e3c14b96c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 21 Jun 2010 15:27:46 +0000 Subject: [PATCH 2982/8469] fix finding visual studio 2008 on 64 bit #8854 --- msvc9compiler.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 932b6ea2d9..d5d7f66528 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -37,10 +37,20 @@ _winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CLASSES_ROOT) -VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" -VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f" -WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" -NET_BASE = r"Software\Microsoft\.NETFramework" +NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32) +if NATIVE_WIN64: + # Visual C++ is a 32-bit application, so we need to look in + # the corresponding registry branch, if we're running a + # 64-bit Python on Win64 + VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f" + VSEXPRESS_BASE = r"Software\Wow6432Node\Microsoft\VCExpress\%0.1f" + WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework" +else: + VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" + VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f" + WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Microsoft\.NETFramework" # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is From 898a004e6eee52a5ab4f92e2e40acbcaf0bdfd05 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 21 Jun 2010 15:37:16 +0000 Subject: [PATCH 2983/8469] Merged revisions 82130 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82130 | benjamin.peterson | 2010-06-21 10:27:46 -0500 (Mon, 21 Jun 2010) | 1 line fix finding visual studio 2008 on 64 bit #8854 ........ --- msvc9compiler.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 6455fffa1f..15425d7194 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -37,9 +37,18 @@ winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CLASSES_ROOT) -VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" -WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" -NET_BASE = r"Software\Microsoft\.NETFramework" +NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32) +if NATIVE_WIN64: + # Visual C++ is a 32-bit application, so we need to look in + # the corresponding registry branch, if we're running a + # 64-bit Python on Win64 + VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework" +else: + VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Microsoft\.NETFramework" # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is From 39ba1bd353bca4a92a427e8e8ff3e9a870d47432 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 21 Jun 2010 15:39:28 +0000 Subject: [PATCH 2984/8469] Merged revisions 82130 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82130 | benjamin.peterson | 2010-06-21 10:27:46 -0500 (Mon, 21 Jun 2010) | 1 line fix finding visual studio 2008 on 64 bit #8854 ........ --- msvc9compiler.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 9bf54c102d..9fe8c744cb 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -37,9 +37,18 @@ _winreg.HKEY_LOCAL_MACHINE, _winreg.HKEY_CLASSES_ROOT) -VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" -WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" -NET_BASE = r"Software\Microsoft\.NETFramework" +NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32) +if NATIVE_WIN64: + # Visual C++ is a 32-bit application, so we need to look in + # the corresponding registry branch, if we're running a + # 64-bit Python on Win64 + VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework" +else: + VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Microsoft\.NETFramework" # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is From 7bed757e02f1ccf941a3b6210b46c0edda5ea9e8 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 21 Jun 2010 15:42:48 +0000 Subject: [PATCH 2985/8469] Merged revisions 82131 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82131 | benjamin.peterson | 2010-06-21 10:37:16 -0500 (Mon, 21 Jun 2010) | 9 lines Merged revisions 82130 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82130 | benjamin.peterson | 2010-06-21 10:27:46 -0500 (Mon, 21 Jun 2010) | 1 line fix finding visual studio 2008 on 64 bit #8854 ........ ................ --- msvc9compiler.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index ad021b5754..761b9ca236 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -38,9 +38,18 @@ winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CLASSES_ROOT) -VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" -WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" -NET_BASE = r"Software\Microsoft\.NETFramework" +NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32) +if NATIVE_WIN64: + # Visual C++ is a 32-bit application, so we need to look in + # the corresponding registry branch, if we're running a + # 64-bit Python on Win64 + VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework" +else: + VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f" + WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows" + NET_BASE = r"Software\Microsoft\.NETFramework" # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is From c54c55e5b4eeb636a400eff44da8f327ba383b93 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 21 Jun 2010 15:57:57 +0000 Subject: [PATCH 2986/8469] bump verson to 2.7rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7f3021010b..bdbf2b2d65 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7rc1" +__version__ = "2.7rc2" #--end constants-- From 0f327d043dda9cbd1d528ff9e4e4051a803bd41a Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 27 Jun 2010 12:36:16 +0000 Subject: [PATCH 2987/8469] Two small fixes for the support for SDKs on MacOSX: 1) The code that checks if an path should be located in the SDK explicitly excludes /usr/local. This fixes issue9046 2) The SDK variant for filtering "db_dirs_to_check" in setup.py was not doing anything because of a missing assignment. --- unixccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index b76f0d41cf..c49ac9ba91 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -324,7 +324,9 @@ def find_library_file(self, dirs, lib, debug=0): static = os.path.join(dir, static_f) if sys.platform == 'darwin' and ( - dir.startswith('/System/') or dir.startswith('/usr/')): + dir.startswith('/System/') or ( + dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): + shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) From 177cb25982dd05cc40f8612a8ae14cf334509226 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 27 Jun 2010 12:37:46 +0000 Subject: [PATCH 2988/8469] Merged revisions 82272 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82272 | ronald.oussoren | 2010-06-27 14:36:16 +0200 (Sun, 27 Jun 2010) | 8 lines Two small fixes for the support for SDKs on MacOSX: 1) The code that checks if an path should be located in the SDK explicitly excludes /usr/local. This fixes issue9046 2) The SDK variant for filtering "db_dirs_to_check" in setup.py was not doing anything because of a missing assignment. ........ --- unixccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index 81a7de6191..081790827d 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -340,7 +340,9 @@ def find_library_file(self, dirs, lib, debug=0): static = os.path.join(dir, static_f) if sys.platform == 'darwin' and ( - dir.startswith('/System/') or dir.startswith('/usr/')): + dir.startswith('/System/') or ( + dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): + shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) From 5d756882f69f443b18cf373e4a61b1e803905f99 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 27 Jun 2010 12:39:22 +0000 Subject: [PATCH 2989/8469] Merged revisions 82272 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82272 | ronald.oussoren | 2010-06-27 14:36:16 +0200 (Sun, 27 Jun 2010) | 8 lines Two small fixes for the support for SDKs on MacOSX: 1) The code that checks if an path should be located in the SDK explicitly excludes /usr/local. This fixes issue9046 2) The SDK variant for filtering "db_dirs_to_check" in setup.py was not doing anything because of a missing assignment. ........ --- unixccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index b76f0d41cf..c49ac9ba91 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -324,7 +324,9 @@ def find_library_file(self, dirs, lib, debug=0): static = os.path.join(dir, static_f) if sys.platform == 'darwin' and ( - dir.startswith('/System/') or dir.startswith('/usr/')): + dir.startswith('/System/') or ( + dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): + shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) From 1d311c0e512b4684b36e4a29a393a84d0452e8f5 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 27 Jun 2010 12:40:35 +0000 Subject: [PATCH 2990/8469] Merged revisions 82273 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82273 | ronald.oussoren | 2010-06-27 14:37:46 +0200 (Sun, 27 Jun 2010) | 15 lines Merged revisions 82272 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82272 | ronald.oussoren | 2010-06-27 14:36:16 +0200 (Sun, 27 Jun 2010) | 8 lines Two small fixes for the support for SDKs on MacOSX: 1) The code that checks if an path should be located in the SDK explicitly excludes /usr/local. This fixes issue9046 2) The SDK variant for filtering "db_dirs_to_check" in setup.py was not doing anything because of a missing assignment. ........ ................ --- unixccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index f4605f3044..bf73416154 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -336,7 +336,9 @@ def find_library_file(self, dirs, lib, debug=0): static = os.path.join(dir, static_f) if sys.platform == 'darwin' and ( - dir.startswith('/System/') or dir.startswith('/usr/')): + dir.startswith('/System/') or ( + dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): + shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) From 79a00a3182447a66a2106761dfabda0e16d0ba19 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 3 Jul 2010 13:50:15 +0200 Subject: [PATCH 2991/8469] added a note on Toshio change. Fixes #171 (with r734) --HG-- branch : distribute extra : rebase_source : 10d46a506636fd2fbf1ec9bbbdf55ec9909e5e8e --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index cdea81352b..f62356e793 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ CHANGES 0.6.14 ------ -* Issue 170: fixed unittest failure. Thanks to Toshio. +* Issue 170: Fixed unittest failure. Thanks to Toshio. +* Issue 171: Fixed race condition in unittests cause deadlocks in test suite. ------ 0.6.13 From 0342126c2eb6d6cecd585a296be6b111a63eaebd Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 3 Jul 2010 13:56:13 +0000 Subject: [PATCH 2992/8469] update to 2.7 final --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index bdbf2b2d65..665fd768d2 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7rc2" +__version__ = "2.7" #--end constants-- From 6586ed42561965fc19b2c6c94f751b85b79b2f1c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 3 Jul 2010 14:51:25 +0000 Subject: [PATCH 2993/8469] prepare for 2.7.1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 665fd768d2..2c69a1836a 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7" +__version__ = "2.7.1a0" #--end constants-- From 91cb8c7f93b69929938ceb8913ec4bc7bc7dd016 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 3 Jul 2010 19:16:38 +0200 Subject: [PATCH 2994/8469] added a test for #143 now that I understand it. fixes #143 --HG-- branch : distribute extra : rebase_source : e81153c1b0c81fe7783507553caa66c217e38ed5 --- setuptools/tests/test_easy_install.py | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 8caaeb87c6..85616605c2 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -205,3 +205,39 @@ def test_user_install_not_implied_without_usersite_enabled(self): cmd.args = ['py'] cmd.initialize_options() self.assertFalse(cmd.user, 'NOT user should be implied') + + def test_local_index(self): + # make sure the local index is used + # when easy_install looks for installed + # packages + new_location = tempfile.mkdtemp() + target = tempfile.mkdtemp() + egg_file = os.path.join(new_location, 'foo-1.0.egg-info') + f = open(egg_file, 'w') + try: + f.write('Name: foo\n') + except: + f.close() + + sys.path.append(target) + old_ppath = os.environ.get('PYTHONPATH') + os.environ['PYTHONPATH'] = ':'.join(sys.path) + try: + dist = Distribution() + dist.script_name = 'setup.py' + cmd = easy_install(dist) + cmd.install_dir = target + cmd.args = ['foo'] + cmd.ensure_finalized() + cmd.local_index.scan([new_location]) + res = cmd.easy_install('foo') + self.assertEquals(res.location, new_location) + finally: + sys.path.remove(target) + shutil.rmtree(new_location) + shutil.rmtree(target) + if old_ppath is not None: + os.environ['PYTHONPATH'] = old_ppath + else: + del os.environ['PYTHONPATH'] + From 9a1b14784687365ce119d0cc229765a4e50016a0 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 11 Jul 2010 08:52:52 +0000 Subject: [PATCH 2995/8469] Fix for issue #9164: with this patch sysconfig and distuls don't break when duplicate '-arch foo' flags end up in CFLAGS (which may happen when building a universal build using macports) --- util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util.py b/util.py index b3ec6e9606..4dcfeb5505 100644 --- a/util.py +++ b/util.py @@ -144,8 +144,7 @@ def get_platform (): cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) + archs = tuple(sorted(set(archs))) if len(archs) == 1: machine = archs[0] From 611bf70820557ab8c49303983449064d99360242 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 11 Jul 2010 09:08:11 +0000 Subject: [PATCH 2996/8469] Merged revisions 82791 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ........ r82791 | ronald.oussoren | 2010-07-11 10:52:52 +0200 (Sun, 11 Jul 2010) | 4 lines Fix for issue #9164: with this patch sysconfig and distuls don't break when duplicate '-arch foo' flags end up in CFLAGS (which may happen when building a universal build using macports) ........ --- util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util.py b/util.py index 36ac721386..c4a8711d08 100644 --- a/util.py +++ b/util.py @@ -144,8 +144,7 @@ def get_platform (): cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) + archs = tuple(sorted(set(archs))) if len(archs) == 1: machine = archs[0] From a74d1cd994eb527a565d5686fa315dcdafac6d31 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 11 Jul 2010 09:29:09 +0000 Subject: [PATCH 2997/8469] Fix for issue 9164 --- util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util.py b/util.py index 9a77561fff..8175434586 100644 --- a/util.py +++ b/util.py @@ -143,8 +143,7 @@ def get_platform (): cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) + archs = tuple(sorted(set(archs))) if len(archs) == 1: machine = archs[0] From b97dbcf42d529ab4dfb2896cef8c0d53960595d7 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 12 Jul 2010 19:49:41 +0000 Subject: [PATCH 2998/8469] #6026: skip test_get_file_list when zlib is not available. --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 1bc36c5c8f..9a76eacb65 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -346,6 +346,7 @@ def test_make_distribution_owner_group(self): finally: archive.close() + @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() From 0c1ee9af184f3d93215a250b609f2607c2edfd62 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 12 Jul 2010 19:52:15 +0000 Subject: [PATCH 2999/8469] Merged revisions 82839 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82839 | ezio.melotti | 2010-07-12 22:49:41 +0300 (Mon, 12 Jul 2010) | 1 line #6026: skip test_get_file_list when zlib is not available. ........ --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 76f5b77471..f83b9f29b6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -346,6 +346,7 @@ def test_make_distribution_owner_group(self): finally: archive.close() + @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() From 9562a276832b4f27e2b7666e6157fa95937a22e1 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 12 Jul 2010 20:00:39 +0000 Subject: [PATCH 3000/8469] Merged revisions 82839 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82839 | ezio.melotti | 2010-07-12 22:49:41 +0300 (Mon, 12 Jul 2010) | 1 line #6026: skip test_get_file_list when zlib is not available. ........ --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f95035dfb0..aa3a99fa3f 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -277,6 +277,7 @@ def test_finalize_options(self): self.assertRaises(DistutilsOptionError, cmd.finalize_options) + @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() From 6cdb93646957b4c0ef41fd23bc05278c6f949d73 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 12 Jul 2010 21:23:20 +0000 Subject: [PATCH 3001/8469] Revert r82841. --- tests/test_sdist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index aa3a99fa3f..f95035dfb0 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -277,7 +277,6 @@ def test_finalize_options(self): self.assertRaises(DistutilsOptionError, cmd.finalize_options) - @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() From 17826cc55c5fe3435767cea1e7cbb8ca9873e21d Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 15 Jul 2010 02:01:09 +0200 Subject: [PATCH 3002/8469] fixed the edit mode when its used by setuptools fixes #174 --HG-- branch : distribute extra : rebase_source : be43431f85dd946fc44128bb4967844e43885ea9 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 93381aaddc..342ad4bbcb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ CHANGES * Issue 171: Fixed race condition in unittests cause deadlocks in test suite. * Issue 143: Fixed a lookup issue with easy_install. Thanks to David and Zooko. +* Issue 174: Fixed the edit mode when its used with setuptools itself ------ 0.6.13 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2a227196d6..27fd00c7c0 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -639,7 +639,8 @@ def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) self.local_index.add(dist) - self.install_egg_scripts(dist) + if not self.editable: + self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) if (dist.has_metadata('dependency_links.txt') and From a19f0d463aaf53adc1f45deda60d33c0e9886556 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 15 Jul 2010 02:14:07 +0200 Subject: [PATCH 3003/8469] Added tag 0.6.14 for changeset 2b9d9977ea75 --HG-- branch : distribute extra : rebase_source : 337d2380513095b9b7f11a17bdc69de889a987d6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d55e3fd1e6..cefd3429e7 100644 --- a/.hgtags +++ b/.hgtags @@ -16,3 +16,4 @@ f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 48a97bc89e2f65fc9b78b358d7dc89ba9ec9524a 0.6.12 dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 +2b9d9977ea75b8eb3766bab808ef31f192d2b1bc 0.6.14 From 1e31cb66948b5306364b453bccada467408870ec Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 15 Jul 2010 02:47:08 +0200 Subject: [PATCH 3004/8469] 0.6.15 is starting --HG-- branch : distribute extra : rebase_source : 900799106c9cd4ce9c0dc4db4c3b137147a35776 --- README.txt | 6 +++--- docs/conf.py | 4 ++-- release.sh | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index b004960e16..6daeab03c9 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz - $ tar -xzvf distribute-0.6.14.tar.gz - $ cd distribute-0.6.14 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.15.tar.gz + $ tar -xzvf distribute-0.6.15.tar.gz + $ cd distribute-0.6.15 $ python setup.py install --------------------------- diff --git a/docs/conf.py b/docs/conf.py index 59443dd117..2bf4d37ee9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.14' +version = '0.6.15' # The full version, including alpha/beta/rc tags. -release = '0.6.14' +release = '0.6.15' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.sh b/release.sh index 37bdac5c70..0281e3528d 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.14" +export VERSION="0.6.15" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index ce7cf1d058..a78588239b 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.14" +VERSION = "0.6.15" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 72f0285dcb95a9026424b5bd06a284fde4daa677 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 22 Jul 2010 10:24:57 +0100 Subject: [PATCH 3005/8469] Updated bootstrapper to 0.6.14. --HG-- branch : distribute extra : rebase_source : 2d0c527df431d597a265a5e3311c64560099ef38 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 37117b34eb..3ea2e667f1 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.13" +DEFAULT_VERSION = "0.6.14" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" From 0853c24ca247b6e7abf19adf3c605b241c8d9e88 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 22 Jul 2010 11:35:17 +0200 Subject: [PATCH 3006/8469] raised to the current dev version --HG-- branch : distribute extra : rebase_source : ec71cd404a48f2e8d22b59c8048aa66c28c9a684 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 3ea2e667f1..e8f0ed06b0 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.14" +DEFAULT_VERSION = "0.6.15" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" From 07be936471d1459a64a755dc90a53121a8ca41e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 22 Jul 2010 12:50:05 +0000 Subject: [PATCH 3007/8469] reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen. --- archive_util.py | 71 +---- bcppcompiler.py | 10 +- ccompiler.py | 172 +++++----- cmd.py | 8 +- command/bdist.py | 18 +- command/bdist_dumb.py | 21 +- command/bdist_msi.py | 8 +- command/bdist_rpm.py | 9 +- command/bdist_wininst.py | 13 +- command/build.py | 7 +- command/build_clib.py | 4 +- command/build_ext.py | 140 ++++----- command/build_py.py | 7 +- command/build_scripts.py | 10 +- command/config.py | 5 +- command/install.py | 129 ++++---- command/register.py | 8 +- command/sdist.py | 13 +- command/upload.py | 83 ++--- config.py | 3 + core.py | 24 +- cygwinccompiler.py | 51 +-- dep_util.py | 64 ++-- dir_util.py | 2 +- dist.py | 128 ++------ emxccompiler.py | 35 ++- errors.py | 47 +-- extension.py | 13 +- fancy_getopt.py | 19 +- file_util.py | 58 ++-- filelist.py | 39 ++- msvc9compiler.py | 7 +- msvccompiler.py | 14 +- sysconfig.py | 571 +++++++++++++++++++++++++++++----- tests/support.py | 10 - tests/test_archive_util.py | 72 +---- tests/test_bdist.py | 4 +- tests/test_bdist_dumb.py | 27 +- tests/test_bdist_rpm.py | 4 +- tests/test_bdist_wininst.py | 4 +- tests/test_build_clib.py | 3 +- tests/test_build_ext.py | 82 ++--- tests/test_build_py.py | 13 +- tests/test_build_scripts.py | 6 +- tests/test_ccompiler.py | 81 ----- tests/test_cmd.py | 4 +- tests/test_cygwinccompiler.py | 88 ++++-- tests/test_dist.py | 85 +---- tests/test_emxccompiler.py | 33 -- tests/test_extension.py | 19 +- tests/test_file_util.py | 17 +- tests/test_filelist.py | 45 +-- tests/test_install.py | 53 ++-- tests/test_install_lib.py | 17 +- tests/test_register.py | 4 +- tests/test_sdist.py | 70 ----- tests/test_sysconfig.py | 37 ++- tests/test_unixccompiler.py | 10 +- tests/test_upload.py | 61 ++-- tests/test_util.py | 213 +++++++------ text_file.py | 4 +- unixccompiler.py | 44 ++- util.py | 325 ++++++++++++------- 63 files changed, 1597 insertions(+), 1649 deletions(-) delete mode 100644 tests/test_ccompiler.py delete mode 100644 tests/test_emxccompiler.py diff --git a/archive_util.py b/archive_util.py index 28e93fed78..16164c7f1f 100644 --- a/archive_util.py +++ b/archive_util.py @@ -14,55 +14,15 @@ from distutils.dir_util import mkpath from distutils import log -try: - from pwd import getpwnam -except ImportError: - getpwnam = None - -try: - from grp import getgrnam -except ImportError: - getgrnam = None - -def _get_gid(name): - """Returns a gid, given a group name.""" - if getgrnam is None or name is None: - return None - try: - result = getgrnam(name) - except KeyError: - result = None - if result is not None: - return result[2] - return None - -def _get_uid(name): - """Returns an uid, given a user name.""" - if getpwnam is None or name is None: - return None - try: - result = getpwnam(name) - except KeyError: - result = None - if result is not None: - return result[2] - return None - -def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, - owner=None, group=None): +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): """Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", "bzip2", or None. - (compress will be deprecated in Python 3.2) - - 'owner' and 'group' can be used to define an owner and a group for the - archive that is being built. If not provided, the current owner and group - will be used. - + Both "tar" and the compression utility named by 'compress' must be on + the default program search path, so this is probably Unix-specific. The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). - Returns the output filename. """ tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} @@ -84,23 +44,10 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, import tarfile # late import so Python build itself doesn't break log.info('Creating tar archive') - - uid = _get_uid(owner) - gid = _get_gid(group) - - def _set_uid_gid(tarinfo): - if gid is not None: - tarinfo.gid = gid - tarinfo.gname = group - if uid is not None: - tarinfo.uid = uid - tarinfo.uname = owner - return tarinfo - if not dry_run: tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) try: - tar.add(base_dir, filter=_set_uid_gid) + tar.add(base_dir) finally: tar.close() @@ -190,7 +137,7 @@ def check_archive_formats(formats): return None def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, - dry_run=0, owner=None, group=None): + dry_run=0): """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific @@ -203,9 +150,6 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. - - 'owner' and 'group' are used when creating a tar archive. By default, - uses the current owner and group. """ save_cwd = os.getcwd() if root_dir is not None: @@ -227,11 +171,6 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, func = format_info[0] for arg, val in format_info[1]: kwargs[arg] = val - - if format != 'zip': - kwargs['owner'] = owner - kwargs['group'] = group - try: filename = func(base_name, base_dir, **kwargs) finally: diff --git a/bcppcompiler.py b/bcppcompiler.py index 77d94a59a2..c5e5cd2571 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -13,11 +13,13 @@ __revision__ = "$Id$" -import os -from distutils.errors import (DistutilsExecError, CompileError, LibError, - LinkError, UnknownFileError) -from distutils.ccompiler import CCompiler, gen_preprocess_options +import os +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError, UnknownFileError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options from distutils.file_util import write_file from distutils.dep_util import newer from distutils import log diff --git a/ccompiler.py b/ccompiler.py index 1a4e8fb2af..34c77a37a3 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -5,71 +5,15 @@ __revision__ = "$Id$" -import sys -import os -import re - -from distutils.errors import (CompileError, LinkError, UnknownFileError, - DistutilsPlatformError, DistutilsModuleError) +import sys, os, re +from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath -from distutils.dep_util import newer_group +from distutils.dep_util import newer_pairwise, newer_group from distutils.util import split_quoted, execute from distutils import log -_sysconfig = __import__('sysconfig') - -def customize_compiler(compiler): - """Do any platform-specific customization of a CCompiler instance. - - Mainly needed on Unix, so we can plug in the information that - varies across Unices and is stored in Python's Makefile. - """ - if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ - _sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR', - 'ARFLAGS') - - if 'CC' in os.environ: - cc = os.environ['CC'] - if 'CXX' in os.environ: - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: - archiver = ar + ' ' + os.environ['ARFLAGS'] - else: - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, - compiler_cxx=cxx, - linker_so=ldshared, - linker_exe=cc, - archiver=archiver) - - compiler.shared_lib_extension = so_ext - class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler classes. Also has some utility methods used by @@ -449,6 +393,22 @@ def _fix_compile_args(self, output_dir, macros, include_dirs): return output_dir, macros, include_dirs + def _prep_compile(self, sources, output_dir, depends=None): + """Decide which souce files must be recompiled. + + Determine the list of object files corresponding to 'sources', + and figure out which ones really need to be recompiled. + Return a list of all object files and a dictionary telling + which source files can be skipped. + """ + # Get the list of expected output (object) files + objects = self.object_filenames(sources, output_dir=output_dir) + assert len(objects) == len(sources) + + # Return an empty dict for the "which source files can be skipped" + # return value to preserve API compatibility. + return objects, {} + def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is @@ -650,15 +610,26 @@ def create_static_lib(self, objects, output_libname, output_dir=None, """ pass + # values for target_desc parameter in link() SHARED_OBJECT = "shared_object" SHARED_LIBRARY = "shared_library" EXECUTABLE = "executable" - def link(self, target_desc, objects, output_filename, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None): + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): """Link a bunch of stuff together to create an executable or shared library file. @@ -707,11 +678,19 @@ def link(self, target_desc, objects, output_filename, output_dir=None, # Old 'link_*()' methods, rewritten to use the new 'link()' method. - def link_shared_lib(self, objects, output_libname, output_dir=None, - libraries=None, library_dirs=None, - runtime_library_dirs=None, export_symbols=None, - debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None, target_lang=None): + def link_shared_lib(self, + objects, + output_libname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_LIBRARY, objects, self.library_filename(output_libname, lib_type='shared'), output_dir, @@ -720,11 +699,19 @@ def link_shared_lib(self, objects, output_libname, output_dir=None, extra_preargs, extra_postargs, build_temp, target_lang) - def link_shared_object(self, objects, output_filename, output_dir=None, - libraries=None, library_dirs=None, - runtime_library_dirs=None, export_symbols=None, - debug=0, extra_preargs=None, extra_postargs=None, - build_temp=None, target_lang=None): + def link_shared_object(self, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): self.link(CCompiler.SHARED_OBJECT, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, @@ -732,10 +719,17 @@ def link_shared_object(self, objects, output_filename, output_dir=None, extra_preargs, extra_postargs, build_temp, target_lang) - def link_executable(self, objects, output_progname, output_dir=None, - libraries=None, library_dirs=None, - runtime_library_dirs=None, debug=0, extra_preargs=None, - extra_postargs=None, target_lang=None): + def link_executable(self, + objects, + output_progname, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + target_lang=None): self.link(CCompiler.EXECUTABLE, objects, self.executable_filename(output_progname), output_dir, libraries, library_dirs, runtime_library_dirs, None, @@ -917,7 +911,7 @@ def spawn(self, cmd): def move_file(self, src, dst): return move_file(src, dst, dry_run=self.dry_run) - def mkpath(self, name, mode=0o777): + def mkpath (self, name, mode=0o777): mkpath(name, mode, dry_run=self.dry_run) @@ -1085,14 +1079,12 @@ def gen_preprocess_options(macros, include_dirs): return pp_opts -def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): +def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): """Generate linker options for searching library directories and - linking with specific libraries. - - 'libraries' and 'library_dirs' are, respectively, lists of library names - (not filenames!) and search directories. Returns a list of command-line - options suitable for use with some compiler (depending on the two format - strings passed in). + linking with specific libraries. 'libraries' and 'library_dirs' are, + respectively, lists of library names (not filenames!) and search + directories. Returns a list of command-line options suitable for use + with some compiler (depending on the two format strings passed in). """ lib_opts = [] @@ -1102,7 +1094,7 @@ def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): for dir in runtime_library_dirs: opt = compiler.runtime_library_dir_option(dir) if isinstance(opt, list): - lib_opts.extend(opt) + lib_opts = lib_opts + opt else: lib_opts.append(opt) @@ -1113,14 +1105,14 @@ def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): # pretty nasty way to arrange your C code. for lib in libraries: - lib_dir, lib_name = os.path.split(lib) - if lib_dir != '': + (lib_dir, lib_name) = os.path.split(lib) + if lib_dir: lib_file = compiler.find_library_file([lib_dir], lib_name) - if lib_file is not None: + if lib_file: lib_opts.append(lib_file) else: compiler.warn("no library file corresponding to " "'%s' found (skipping)" % lib) else: - lib_opts.append(compiler.library_option(lib)) + lib_opts.append(compiler.library_option (lib)) return lib_opts diff --git a/cmd.py b/cmd.py index 08632099aa..ae4efc7efc 100644 --- a/cmd.py +++ b/cmd.py @@ -367,11 +367,9 @@ def spawn(self, cmd, search_path=1, level=1): from distutils.spawn import spawn spawn(cmd, search_path, dry_run=self.dry_run) - def make_archive(self, base_name, format, root_dir=None, base_dir=None, - owner=None, group=None): - return archive_util.make_archive(base_name, format, root_dir, - base_dir, dry_run=self.dry_run, - owner=owner, group=group) + def make_archive(self, base_name, format, root_dir=None, base_dir=None): + return archive_util.make_archive(base_name, format, root_dir, base_dir, + dry_run=self.dry_run) def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): diff --git a/command/bdist.py b/command/bdist.py index 72b0cefe42..1a360b59e3 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -6,10 +6,9 @@ __revision__ = "$Id$" import os - -from distutils.util import get_platform from distutils.core import Command -from distutils.errors import DistutilsPlatformError, DistutilsOptionError +from distutils.errors import * +from distutils.util import get_platform def show_formats(): @@ -40,12 +39,6 @@ class bdist(Command): "[default: dist]"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), - ('owner=', 'u', - "Owner name used when creating a tar file" - " [default: current user]"), - ('group=', 'g', - "Group name used when creating a tar file" - " [default: current group]"), ] boolean_options = ['skip-build'] @@ -87,8 +80,6 @@ def initialize_options(self): self.formats = None self.dist_dir = None self.skip_build = 0 - self.group = None - self.owner = None def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' @@ -134,11 +125,6 @@ def run(self): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] - # passing the owner and group names for tar archiving - if cmd_name == 'bdist_dumb': - sub_cmd.owner = self.owner - sub_cmd.group = self.group - # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index c2af95f13a..2d39922672 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -7,18 +7,16 @@ __revision__ = "$Id$" import os - -from sysconfig import get_python_version - -from distutils.util import get_platform from distutils.core import Command +from distutils.util import get_platform from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import DistutilsPlatformError +from distutils.errors import * +from distutils.sysconfig import get_python_version from distutils import log class bdist_dumb(Command): - description = 'create a "dumb" built distribution' + description = "create a \"dumb\" built distribution" user_options = [('bdist-dir=', 'd', "temporary directory for creating the distribution"), @@ -37,12 +35,6 @@ class bdist_dumb(Command): ('relative', None, "build the archive using relative paths" "(default: false)"), - ('owner=', 'u', - "Owner name used when creating a tar file" - " [default: current user]"), - ('group=', 'g', - "Group name used when creating a tar file" - " [default: current group]"), ] boolean_options = ['keep-temp', 'skip-build', 'relative'] @@ -59,8 +51,6 @@ def initialize_options(self): self.dist_dir = None self.skip_build = 0 self.relative = 0 - self.owner = None - self.group = None def finalize_options(self): if self.bdist_dir is None: @@ -118,8 +108,7 @@ def run(self): # Make the archive filename = self.make_archive(pseudoinstall_root, - self.format, root_dir=archive_root, - owner=self.owner, group=self.group) + self.format, root_dir=archive_root) if self.distribution.has_ext_modules(): pyversion = get_python_version() else: diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f13c73b36d..c4be47b579 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -6,15 +6,15 @@ """ Implements the bdist_msi command. """ -import sys, os -from sysconfig import get_python_version, get_platform +import sys, os from distutils.core import Command from distutils.dir_util import remove_tree +from distutils.sysconfig import get_python_version from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError +from distutils.util import get_platform from distutils import log - import msilib from msilib import schema, sequence, text from msilib import Directory, Feature, Dialog, add_data @@ -28,6 +28,7 @@ def __init__(self, *args, **kw): default, cancel, bitmap=true)""" Dialog.__init__(self, *args) ruler = self.h - 36 + bmwidth = 152*ruler/328 #if kw.get("bitmap", True): # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin") self.line("BottomLine", 0, ruler, self.w, 0) @@ -418,6 +419,7 @@ def add_ui(self): # see "Dialog Style Bits" modal = 3 # visible | modal modeless = 1 # visible + track_disk_space = 32 # UI customization properties add_data(db, "Property", diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 0a579dbb93..452f9502ad 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -5,14 +5,13 @@ __revision__ = "$Id$" -import sys -import os - +import sys, os from distutils.core import Command from distutils.debug import DEBUG +from distutils.util import get_platform from distutils.file_util import write_file -from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, - DistutilsFileError, DistutilsExecError) +from distutils.errors import * +from distutils.sysconfig import get_python_version from distutils import log class bdist_rpm(Command): diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 71cc79881a..d6d01c630d 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -5,16 +5,13 @@ __revision__ = "$Id$" -import sys -import os - -from sysconfig import get_python_version - +import sys, os from distutils.core import Command -from distutils.dir_util import remove_tree -from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils import log from distutils.util import get_platform +from distutils.dir_util import create_tree, remove_tree +from distutils.errors import * +from distutils.sysconfig import get_python_version +from distutils import log class bdist_wininst(Command): diff --git a/command/build.py b/command/build.py index 4d30f8ff2b..9c2667cfd2 100644 --- a/command/build.py +++ b/command/build.py @@ -5,15 +5,16 @@ __revision__ = "$Id$" import sys, os - -from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsOptionError +from distutils.util import get_platform + def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() + class build(Command): description = "build everything needed to install" @@ -126,6 +127,7 @@ def run(self): for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) + # -- Predicates for the sub-command list --------------------------- def has_pure_modules(self): @@ -140,6 +142,7 @@ def has_ext_modules(self): def has_scripts(self): return self.distribution.has_scripts() + sub_commands = [('build_py', has_pure_modules), ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), diff --git a/command/build_clib.py b/command/build_clib.py index 4c6443ca6e..258d7c10be 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -18,8 +18,8 @@ import os from distutils.core import Command -from distutils.errors import DistutilsSetupError -from distutils.ccompiler import customize_compiler +from distutils.errors import * +from distutils.sysconfig import customize_compiler from distutils import log def show_compilers(): diff --git a/command/build_ext.py b/command/build_ext.py index 8f41facd4a..bd61bc56f3 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -7,14 +7,12 @@ __revision__ = "$Id$" import sys, os, re -from warnings import warn - -from distutils.util import get_platform from distutils.core import Command from distutils.errors import * -from distutils.ccompiler import customize_compiler +from distutils.sysconfig import customize_compiler, get_python_version from distutils.dep_util import newer_group from distutils.extension import Extension +from distutils.util import get_platform from distutils import log # this keeps compatibility from 2.3 to 2.5 @@ -114,39 +112,6 @@ class build_ext(Command): "list available compilers", show_compilers), ] - # making 'compiler' a property to deprecate - # its usage as something else than a compiler type - # e.g. like a compiler instance - def __init__(self, dist): - self._compiler = None - Command.__init__(self, dist) - - def __setattr__(self, name, value): - # need this to make sure setattr() (used in distutils) - # doesn't kill our property - if name == 'compiler': - self._set_compiler(value) - else: - self.__dict__[name] = value - - def _set_compiler(self, compiler): - if not isinstance(compiler, str) and compiler is not None: - # we don't want to allow that anymore in the future - warn("'compiler' specifies the compiler type in build_ext. " - "If you want to get the compiler object itself, " - "use 'compiler_obj'", DeprecationWarning) - self._compiler = compiler - - def _get_compiler(self): - if not isinstance(self._compiler, str) and self._compiler is not None: - # we don't want to allow that anymore in the future - warn("'compiler' specifies the compiler type in build_ext. " - "If you want to get the compiler object itself, " - "use 'compiler_obj'", DeprecationWarning) - return self._compiler - - compiler = property(_get_compiler, _set_compiler) - def initialize_options(self): self.extensions = None self.build_lib = None @@ -171,7 +136,8 @@ def initialize_options(self): self.user = None def finalize_options(self): - _sysconfig = __import__('sysconfig') + from distutils import sysconfig + self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), @@ -188,8 +154,8 @@ def finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. - py_include = _sysconfig.get_path('include') - plat_py_include = _sysconfig.get_path('platinclude') + py_include = sysconfig.get_python_inc() + plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): @@ -261,13 +227,13 @@ def finalize_options(self): if os.name == 'os2': self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) - # for extensions under Cygwin Python's library directory must be + # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin': + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", - "python" + _sysconfig.get_python_version(), + "python" + get_python_version(), "config")) else: # building python standard extensions @@ -275,13 +241,13 @@ def finalize_options(self): # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs - _sysconfig.get_config_var('Py_ENABLE_SHARED') + sysconfig.get_config_var('Py_ENABLE_SHARED') if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) - and _sysconfig.get_config_var('Py_ENABLE_SHARED')): + and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions - self.library_dirs.append(_sysconfig.get_config_var('LIBDIR')) + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') @@ -344,50 +310,38 @@ def run(self): # Setup the CCompiler object that we'll use to do all the # compiling and linking - - # used to prevent the usage of an existing compiler for the - # compiler option when calling new_compiler() - # this will be removed in 3.3 and 2.8 - if not isinstance(self._compiler, str): - self._compiler = None - - self.compiler_obj = new_compiler(compiler=self._compiler, - verbose=self.verbose, - dry_run=self.dry_run, - force=self.force) - - # used to keep the compiler object reachable with - # "self.compiler". this will be removed in 3.3 and 2.8 - self._compiler = self.compiler_obj - - customize_compiler(self.compiler_obj) + self.compiler = new_compiler(compiler=self.compiler, + verbose=self.verbose, + dry_run=self.dry_run, + force=self.force) + customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): - self.compiler_obj.initialize(self.plat_name) + self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: - self.compiler_obj.set_include_dirs(self.include_dirs) + self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: - self.compiler_obj.define_macro(name, value) + self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: - self.compiler_obj.undefine_macro(macro) + self.compiler.undefine_macro(macro) if self.libraries is not None: - self.compiler_obj.set_libraries(self.libraries) + self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: - self.compiler_obj.set_library_dirs(self.library_dirs) + self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: - self.compiler_obj.set_runtime_library_dirs(self.rpath) + self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: - self.compiler_obj.set_link_objects(self.link_objects) + self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() @@ -548,13 +502,13 @@ def build_extension(self, ext): for undef in ext.undef_macros: macros.append((undef,)) - objects = self.compiler_obj.compile(sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=ext.include_dirs, - debug=self.debug, - extra_postargs=extra_args, - depends=ext.depends) + objects = self.compiler.compile(sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! # @@ -575,9 +529,9 @@ def build_extension(self, ext): extra_args = ext.extra_link_args or [] # Detect target language, if not provided - language = ext.language or self.compiler_obj.detect_language(sources) + language = ext.language or self.compiler.detect_language(sources) - self.compiler_obj.link_shared_object( + self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, @@ -710,13 +664,13 @@ def get_ext_filename(self, ext_name): of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ - _sysconfig = __import__('sysconfig') + from distutils.sysconfig import get_config_var ext_path = ext_name.split('.') # OS/2 has an 8 character module (extension) limit :-( if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows - so_ext = _sysconfig.get_config_var('SO') + so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext @@ -744,7 +698,7 @@ def get_libraries(self, ext): # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils.msvccompiler import MSVCCompiler - if not isinstance(self.compiler_obj, MSVCCompiler): + if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' @@ -775,12 +729,28 @@ def get_libraries(self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + elif sys.platform[:6] == "atheos": + from distutils import sysconfig + + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + # Get SHLIBS from Makefile + extra = [] + for lib in sysconfig.get_config_var('SHLIBS').split(): + if lib.startswith('-l'): + extra.append(lib[2:]) + else: + extra.append(lib) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib, "m"] + extra elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries else: - _sysconfig = __import__('sysconfig') - if _sysconfig.get_config_var('Py_ENABLE_SHARED'): + from distutils import sysconfig + if sysconfig.get_config_var('Py_ENABLE_SHARED'): template = "python%d.%d" pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) diff --git a/command/build_py.py b/command/build_py.py index 7cc935390f..26002e4b3f 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -4,16 +4,16 @@ __revision__ = "$Id$" -import os +import sys, os import sys from glob import glob from distutils.core import Command -from distutils.errors import DistutilsOptionError, DistutilsFileError +from distutils.errors import * from distutils.util import convert_path, Mixin2to3 from distutils import log -class build_py(Command): +class build_py (Command): description = "\"build\" pure Python modules (copy to build directory)" @@ -133,6 +133,7 @@ def find_data_files(self, package, src_dir): def build_package_data(self): """Copy data files into build directory""" + lastdir = None for package, src_dir, build_dir, filenames in self.data_files: for filename in filenames: target = os.path.join(build_dir, filename) diff --git a/command/build_scripts.py b/command/build_scripts.py index a54d6ed742..8b08bfeaf0 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -6,6 +6,7 @@ import os, re from stat import ST_MODE +from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 @@ -56,7 +57,6 @@ def copy_scripts(self): ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ - _sysconfig = __import__('sysconfig') self.mkpath(self.build_dir) outfiles = [] updated_files = [] @@ -96,16 +96,16 @@ def copy_scripts(self): updated_files.append(outfile) if not self.dry_run: outf = open(outfile, "w") - if not _sysconfig.is_python_build(): + if not sysconfig.python_build: outf.write("#!%s%s\n" % (self.executable, post_interp)) else: outf.write("#!%s%s\n" % (os.path.join( - _sysconfig.get_config_var("BINDIR"), - "python%s%s" % (_sysconfig.get_config_var("VERSION"), - _sysconfig.get_config_var("EXE"))), + sysconfig.get_config_var("BINDIR"), + "python%s%s" % (sysconfig.get_config_var("VERSION"), + sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() diff --git a/command/config.py b/command/config.py index 56f643c88b..ac80a54eb1 100644 --- a/command/config.py +++ b/command/config.py @@ -11,12 +11,11 @@ __revision__ = "$Id$" -import os -import re +import sys, os, re from distutils.core import Command from distutils.errors import DistutilsExecError -from distutils.ccompiler import customize_compiler +from distutils.sysconfig import customize_compiler from distutils import log LANG_EXT = {"c": ".c", "c++": ".cxx"} diff --git a/command/install.py b/command/install.py index e3e387ab5d..2a905d92f8 100644 --- a/command/install.py +++ b/command/install.py @@ -7,17 +7,26 @@ import sys import os -from sysconfig import get_config_vars, get_paths, get_path, get_config_var - from distutils import log from distutils.core import Command from distutils.debug import DEBUG +from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file -from distutils.util import convert_path, change_root, get_platform +from distutils.util import convert_path, subst_vars, change_root +from distutils.util import get_platform from distutils.errors import DistutilsOptionError -# kept for backward compat, will be removed in 3.2 +# this keeps compatibility from 2.3 to 2.5 +if sys.version < "2.6": + USER_BASE = None + USER_SITE = None + HAS_USER_SITE = False +else: + from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True + if sys.version < "2.2": WINDOWS_SCHEME = { 'purelib': '$base', @@ -50,21 +59,15 @@ 'scripts': '$base/bin', 'data' : '$base', }, - 'unix_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - }, 'nt': WINDOWS_SCHEME, - 'nt_user': { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', - 'data' : '$userbase', + 'mac': { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', }, + 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -72,26 +75,47 @@ 'scripts': '$base/Scripts', 'data' : '$base', }, - 'os2_home': { + } + +# user site schemes +if HAS_USER_SITE: + INSTALL_SCHEMES['nt_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', + 'scripts': '$userbase/Scripts', + 'data' : '$userbase', + } + + INSTALL_SCHEMES['unix_user'] = { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', - }, - } + } + + INSTALL_SCHEMES['mac_user'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/$py_version_short/include/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } + INSTALL_SCHEMES['os2_home'] = { + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } + +# The keys to an installation scheme; if any new types of files are to be +# installed, be sure to add an entry to every installation scheme above, +# and to SCHEME_KEYS here. SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') -# end of backward compat -def _subst_vars(s, local_vars): - try: - return s.format(**local_vars) - except KeyError: - try: - return s.format(**os.environ) - except KeyError as var: - raise AttributeError('{%s}' % var) class install(Command): @@ -158,10 +182,11 @@ class install(Command): boolean_options = ['compile', 'force', 'skip-build'] - user_options.append(('user', None, - "install in user site-package '%s'" % \ - get_path('purelib', '%s_user' % os.name))) - boolean_options.append('user') + if HAS_USER_SITE: + user_options.append(('user', None, + "install in user site-package '%s'" % USER_SITE)) + boolean_options.append('user') + negative_opt = {'no-compile' : 'compile'} @@ -191,8 +216,8 @@ def initialize_options(self): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None - self.install_userbase = get_config_var('userbase') - self.install_usersite = get_path('purelib', '%s_user' % os.name) + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE self.compile = None self.optimize = None @@ -302,9 +327,7 @@ def finalize_options(self): # about needing recursive variable expansion (shudder). py_version = sys.version.split()[0] - prefix, exec_prefix, srcdir, projectbase = get_config_vars('prefix', 'exec_prefix', - 'srcdir', 'projectbase') - + (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), @@ -315,12 +338,12 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, - 'srcdir': srcdir, - 'projectbase': projectbase, } - self.config_vars['userbase'] = self.install_userbase - self.config_vars['usersite'] = self.install_usersite + if HAS_USER_SITE: + self.config_vars['userbase'] = self.install_userbase + self.config_vars['usersite'] = self.install_usersite + self.expand_basedirs() self.dump_dirs("post-expand_basedirs()") @@ -424,10 +447,10 @@ def finalize_unix(self): raise DistutilsPlatformError( "User base directory is not specified") self.install_base = self.install_platbase = self.install_userbase - self.select_scheme("posix_user") + self.select_scheme("unix_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("posix_home") + self.select_scheme("unix_home") else: if self.prefix is None: if self.exec_prefix is not None: @@ -443,7 +466,7 @@ def finalize_unix(self): self.install_base = self.prefix self.install_platbase = self.exec_prefix - self.select_scheme("posix_prefix") + self.select_scheme("unix_prefix") def finalize_other(self): """Finalizes options for non-posix platforms""" @@ -455,7 +478,7 @@ def finalize_other(self): self.select_scheme(os.name + "_user") elif self.home is not None: self.install_base = self.install_platbase = self.home - self.select_scheme("posix_home") + self.select_scheme("unix_home") else: if self.prefix is None: self.prefix = os.path.normpath(sys.prefix) @@ -470,15 +493,11 @@ def finalize_other(self): def select_scheme(self, name): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! - scheme = get_paths(name, expand=False) - for key, value in scheme.items(): - if key == 'platinclude': - key = 'headers' - value = os.path.join(value, self.distribution.get_name()) + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: attrname = 'install_' + key - if hasattr(self, attrname): - if getattr(self, attrname) is None: - setattr(self, attrname, value) + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) def _expand_attrs(self, attrs): for attr in attrs: @@ -486,7 +505,7 @@ def _expand_attrs(self, attrs): if val is not None: if os.name == 'posix' or os.name == 'nt': val = os.path.expanduser(val) - val = _subst_vars(val, self.config_vars) + val = subst_vars(val, self.config_vars) setattr(self, attr, val) def expand_basedirs(self): diff --git a/command/register.py b/command/register.py index 7d3dc53afe..bdf5f8f09c 100644 --- a/command/register.py +++ b/command/register.py @@ -7,15 +7,13 @@ __revision__ = "$Id$" -import os -import string -import getpass +import os, string, getpass import io -import urllib.parse -import urllib.request +import urllib.parse, urllib.request from warnings import warn from distutils.core import PyPIRCCommand +from distutils.errors import * from distutils import log class register(PyPIRCCommand): diff --git a/command/sdist.py b/command/sdist.py index f6e099b89f..bb2106120a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -7,14 +7,14 @@ import os import string import sys +from types import * from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile -from distutils.errors import (DistutilsPlatformError, DistutilsOptionError, - DistutilsTemplateError) +from distutils.errors import * from distutils.filelist import FileList from distutils import log from distutils.util import convert_path @@ -76,10 +76,6 @@ def checking_metadata(self): ('medata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), - ('owner=', 'u', - "Owner name used when creating a tar file [default: current user]"), - ('group=', 'g', - "Group name used when creating a tar file [default: current group]"), ] boolean_options = ['use-defaults', 'prune', @@ -119,8 +115,6 @@ def initialize_options(self): self.archive_files = None self.metadata_check = 1 - self.owner = None - self.group = None def finalize_options(self): if self.manifest is None: @@ -424,8 +418,7 @@ def make_distribution(self): self.formats.append(self.formats.pop(self.formats.index('tar'))) for fmt in self.formats: - file = self.make_archive(base_name, fmt, base_dir=base_dir, - owner=self.owner, group=self.group) + file = self.make_archive(base_name, fmt, base_dir=base_dir) archive_files.append(file) self.distribution.dist_files.append(('sdist', '', file)) diff --git a/command/upload.py b/command/upload.py index bb1b7fc4fe..f602fbeb68 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,19 +1,25 @@ """distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" -import os -import io -import socket -import platform -from urllib.request import urlopen, Request, HTTPError -from base64 import standard_b64encode -from urllib.parse import urlparse -from hashlib import md5 -from distutils.errors import DistutilsOptionError +from distutils.errors import * from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log +import sys +import os, io +import socket +import platform +import configparser +import http.client as httpclient +from base64 import standard_b64encode +import urllib.parse + +# this keeps compatibility for 2.3 and 2.4 +if sys.version < "2.5": + from md5 import md5 +else: + from hashlib import md5 class upload(PyPIRCCommand): @@ -60,15 +66,6 @@ def run(self): self.upload_file(command, pyversion, filename) def upload_file(self, command, pyversion, filename): - # Makes sure the repository URL is compliant - schema, netloc, url, params, query, fragments = \ - urlparse(self.repository) - if params or query or fragments: - raise AssertionError("Incompatible url %s" % self.repository) - - if schema not in ('http', 'https'): - raise AssertionError("unsupported schema " + schema) - # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] @@ -140,10 +137,10 @@ def upload_file(self, command, pyversion, filename): for key, value in data.items(): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name - if not isinstance(value, list): + if type(value) != type([]): value = [value] for value in value: - if isinstance(value, tuple): + if type(value) is tuple: title += '; filename="%s"' % value[0] value = value[1] else: @@ -161,30 +158,40 @@ def upload_file(self, command, pyversion, filename): self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) # build the Request - headers = {'Content-type': - 'multipart/form-data; boundary=%s' % boundary, - 'Content-length': str(len(body)), - 'Authorization': auth} - - request = Request(self.repository, data=body, - headers=headers) - # send the data + # We can't use urllib since we need to send the Basic + # auth right with the first request + # TODO(jhylton): Can we fix urllib? + schema, netloc, url, params, query, fragments = \ + urllib.parse.urlparse(self.repository) + assert not params and not query and not fragments + if schema == 'http': + http = httpclient.HTTPConnection(netloc) + elif schema == 'https': + http = httpclient.HTTPSConnection(netloc) + else: + raise AssertionError("unsupported schema "+schema) + + data = '' + loglevel = log.INFO try: - result = urlopen(request) - status = result.getcode() - reason = result.msg + http.connect() + http.putrequest("POST", url) + http.putheader('Content-type', + 'multipart/form-data; boundary=%s'%boundary) + http.putheader('Content-length', str(len(body))) + http.putheader('Authorization', auth) + http.endheaders() + http.send(body) except socket.error as e: self.announce(str(e), log.ERROR) return - except HTTPError as e: - status = e.code - reason = e.msg - if status == 200: - self.announce('Server response (%s): %s' % (status, reason), + r = http.getresponse() + if r.status == 200: + self.announce('Server response (%s): %s' % (r.status, r.reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (status, reason), + self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - self.announce('-'*75, result.read(), '-'*75) + self.announce('-'*75, r.read(), '-'*75) diff --git a/config.py b/config.py index fe41ce977e..5b625f3f7d 100644 --- a/config.py +++ b/config.py @@ -4,6 +4,7 @@ that uses .pypirc in the distutils.command package. """ import os +import sys from configparser import ConfigParser from distutils.cmd import Command @@ -59,6 +60,8 @@ def _read_pypirc(self): if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY + realm = self.realm or self.DEFAULT_REALM + config = ConfigParser() config.read(rc) sections = config.sections() diff --git a/core.py b/core.py index 6ed3e8fa97..6e4892039e 100644 --- a/core.py +++ b/core.py @@ -8,12 +8,10 @@ __revision__ = "$Id$" -import sys -import os +import sys, os from distutils.debug import DEBUG -from distutils.errors import (DistutilsSetupError, DistutilsArgError, - DistutilsError, CCompilerError) +from distutils.errors import * from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. @@ -33,9 +31,9 @@ or: %(script)s cmd --help """ -def gen_usage(script_name): +def gen_usage (script_name): script = os.path.basename(script_name) - return USAGE % {'script': script} + return USAGE % vars() # Some mild magic to control the behaviour of 'setup()' from 'run_setup()'. @@ -58,7 +56,7 @@ def gen_usage(script_name): 'extra_objects', 'extra_compile_args', 'extra_link_args', 'swig_opts', 'export_symbols', 'depends', 'language') -def setup(**attrs): +def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command @@ -131,9 +129,8 @@ class found in 'cmdclass' is used in place of the default, which is if _setup_stop_after == "config": return dist - # Parse the command line and override config files; any - # command-line errors are the end user's fault, so turn them into - # SystemExit to suppress tracebacks. + # Parse the command line; any command-line errors are the end user's + # fault, so turn them into SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() except DistutilsArgError as msg: @@ -170,8 +167,10 @@ class found in 'cmdclass' is used in place of the default, which is return dist +# setup () -def run_setup(script_name, script_args=None, stop_after="run"): + +def run_setup (script_name, script_args=None, stop_after="run"): """Run a setup script in a somewhat controlled environment, and return the Distribution instance that drives things. This is useful if you need to find out the distribution meta-data (passed as @@ -234,4 +233,7 @@ def run_setup(script_name, script_args=None, stop_after="run"): # I wonder if the setup script's namespace -- g and l -- would be of # any interest to callers? + #print "_setup_distribution:", _setup_distribution return _setup_distribution + +# run_setup () diff --git a/cygwinccompiler.py b/cygwinccompiler.py index f381f60875..8504371810 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -50,13 +50,16 @@ import os import sys import copy +from subprocess import Popen, PIPE import re -from warnings import warn +from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils.util import get_compiler_versions +from distutils import log +from distutils.version import LooseVersion +from distutils.spawn import find_executable def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built @@ -107,7 +110,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): % details) self.gcc_version, self.ld_version, self.dllwrap_version = \ - get_compiler_versions() + get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, @@ -337,7 +340,7 @@ def check_config_h(): # XXX since this function also checks sys.version, it's not strictly a # "pyconfig.h" check -- should probably be renamed... - _sysconfig = __import__('sysconfig') + from distutils import sysconfig # if sys.version contains GCC then python was compiled with GCC, and the # pyconfig.h file should be OK @@ -345,7 +348,7 @@ def check_config_h(): return CONFIG_H_OK, "sys.version mentions 'GCC'" # let's see if __GNUC__ is mentioned in python.h - fn = _sysconfig.get_config_h_filename() + fn = sysconfig.get_config_h_filename() try: with open(fn) as config_h: if "__GNUC__" in config_h.read(): @@ -356,27 +359,33 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -class _Deprecated_SRE_Pattern(object): - def __init__(self, pattern): - self.pattern = pattern +RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') - def __getattr__(self, name): - if name in ('findall', 'finditer', 'match', 'scanner', 'search', - 'split', 'sub', 'subn'): - warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated " - "and will be removed in the next version", DeprecationWarning) - return getattr(self.pattern, name) +def _find_exe_version(cmd): + """Find the version of an executable by running `cmd` in the shell. - -RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)')) + If the command is not found, or the output does not match + `RE_VERSION`, returns None. + """ + executable = cmd.split()[0] + if find_executable(executable) is None: + return None + out = Popen(cmd, shell=True, stdout=PIPE).stdout + try: + out_string = out.read() + finally: + out.close() + result = RE_VERSION.search(out_string) + if result is None: + return None + # LooseVersion works with strings + # so we need to decode our bytes + return LooseVersion(result.group(1).decode()) def get_versions(): """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - warn("'distutils.cygwinccompiler.get_versions' is deprecated " - "use 'distutils.util.get_compiler_versions' instead", - DeprecationWarning) - - return get_compiler_versions() + commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] + return tuple([_find_exe_version(cmd) for cmd in commands]) diff --git a/dep_util.py b/dep_util.py index b91a62eb56..07b3549c6f 100644 --- a/dep_util.py +++ b/dep_util.py @@ -9,27 +9,29 @@ import os from distutils.errors import DistutilsFileError -def newer(source, target): - """Tells if the target is newer than the source. - Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. - - Return false if both exist and 'target' is the same age or younger - than 'source'. Raise DistutilsFileError if 'source' does not exist. - - Note that this test is not very accurate: files created in the same second - will have the same "age". +def newer (source, target): + """Return true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. Return false if + both exist and 'target' is the same age or younger than 'source'. + Raise DistutilsFileError if 'source' does not exist. """ if not os.path.exists(source): raise DistutilsFileError("file '%s' does not exist" % os.path.abspath(source)) if not os.path.exists(target): - return True + return 1 + + from stat import ST_MTIME + mtime1 = os.stat(source)[ST_MTIME] + mtime2 = os.stat(target)[ST_MTIME] + + return mtime1 > mtime2 + +# newer () - return os.stat(source).st_mtime > os.stat(target).st_mtime -def newer_pairwise(sources, targets): +def newer_pairwise (sources, targets): """Walk two filename lists in parallel, testing if each source is newer than its corresponding target. Return a pair of lists (sources, targets) where source is newer than target, according to the semantics @@ -41,18 +43,19 @@ def newer_pairwise(sources, targets): # build a pair of lists (sources, targets) where source is newer n_sources = [] n_targets = [] - for source, target in zip(sources, targets): - if newer(source, target): - n_sources.append(source) - n_targets.append(target) + for i in range(len(sources)): + if newer(sources[i], targets[i]): + n_sources.append(sources[i]) + n_targets.append(targets[i]) - return n_sources, n_targets + return (n_sources, n_targets) + +# newer_pairwise () -def newer_group(sources, target, missing='error'): - """Return true if 'target' is out-of-date with respect to any file - listed in 'sources'. - In other words, if 'target' exists and is newer +def newer_group (sources, target, missing='error'): + """Return true if 'target' is out-of-date with respect to any file + listed in 'sources'. In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise return true. 'missing' controls what we do when a source file is missing; the default ("error") is to blow up with an OSError from inside 'stat()'; @@ -65,14 +68,14 @@ def newer_group(sources, target, missing='error'): """ # If the target doesn't even exist, then it's definitely out-of-date. if not os.path.exists(target): - return True + return 1 # Otherwise we have to find out the hard way: if *any* source file # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. - target_mtime = os.stat(target).st_mtime - + from stat import ST_MTIME + target_mtime = os.stat(target)[ST_MTIME] for source in sources: if not os.path.exists(source): if missing == 'error': # blow up when we stat() the file @@ -80,9 +83,12 @@ def newer_group(sources, target, missing='error'): elif missing == 'ignore': # missing source dropped from continue # target's dependency list elif missing == 'newer': # missing source means target is - return True # out-of-date + return 1 # out-of-date - if os.stat(source).st_mtime > target_mtime: - return True + source_mtime = os.stat(source)[ST_MTIME] + if source_mtime > target_mtime: + return 1 + else: + return 0 - return False +# newer_group () diff --git a/dir_util.py b/dir_util.py index 370025b734..98e6252c6c 100644 --- a/dir_util.py +++ b/dir_util.py @@ -4,7 +4,7 @@ __revision__ = "$Id$" -import os +import os, sys from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log diff --git a/dist.py b/dist.py index 5a107e7d83..1c1ea477db 100644 --- a/dist.py +++ b/dist.py @@ -7,15 +7,13 @@ __revision__ = "$Id$" import sys, os, re -from email import message_from_file try: import warnings except ImportError: warnings = None -from distutils.errors import (DistutilsOptionError, DistutilsArgError, - DistutilsModuleError, DistutilsClassError) +from distutils.errors import * from distutils.fancy_getopt import FancyGetopt, translate_longopt from distutils.util import check_environ, strtobool, rfc822_escape from distutils import log @@ -55,9 +53,7 @@ class Distribution: ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('help', 'h', "show detailed help message"), - ('no-user-cfg', None, - 'ignore pydistutils.cfg in your home directory'), - ] + ] # 'common_usage' is a short (2-3 line) string describing the common # usage of the setup script. @@ -264,22 +260,6 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") - # no-user-cfg is handled before other command line args - # because other args override the config files, and this - # one is needed before we can load the config files. - # If attrs['script_args'] wasn't passed, assume false. - # - # This also make sure we just look at the global options - self.want_user_cfg = True - - if self.script_args is not None: - for arg in self.script_args: - if not arg.startswith('-'): - break - if arg == '--no-user-cfg': - self.want_user_cfg = False - break - self.finalize_options() def get_option_dict(self, command): @@ -331,10 +311,7 @@ def find_config_files(self): Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg - on Windows/Mac; and setup.cfg in the current directory. - - The file in the user's home directory can be disabled with the - --no-user-cfg option. + on Windows/Mac, and setup.cfg in the current directory. """ files = [] check_environ() @@ -354,19 +331,15 @@ def find_config_files(self): user_filename = "pydistutils.cfg" # And look for the user config file - if self.want_user_cfg: - user_file = os.path.join(os.path.expanduser('~'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" if os.path.isfile(local_file): files.append(local_file) - if DEBUG: - self.announce("using config files: %s" % ', '.join(files)) - return files def parse_config_files(self, filenames=None): @@ -1016,80 +989,25 @@ class DistributionMetadata: "provides", "requires", "obsoletes", ) - def __init__(self, path=None): - if path is not None: - self.read_pkg_file(open(path)) - else: - self.name = None - self.version = None - self.author = None - self.author_email = None - self.maintainer = None - self.maintainer_email = None - self.url = None - self.license = None - self.description = None - self.long_description = None - self.keywords = None - self.platforms = None - self.classifiers = None - self.download_url = None - # PEP 314 - self.provides = None - self.requires = None - self.obsoletes = None - - def read_pkg_file(self, file): - """Reads the metadata values from a file object.""" - msg = message_from_file(file) - - def _read_field(name): - value = msg[name] - if value == 'UNKNOWN': - return None - return value - - def _read_list(name): - values = msg.get_all(name, None) - if values == []: - return None - return values - - metadata_version = msg['metadata-version'] - self.name = _read_field('name') - self.version = _read_field('version') - self.description = _read_field('summary') - # we are filling author only. - self.author = _read_field('author') + def __init__ (self): + self.name = None + self.version = None + self.author = None + self.author_email = None self.maintainer = None - self.author_email = _read_field('author-email') self.maintainer_email = None - self.url = _read_field('home-page') - self.license = _read_field('license') - - if 'download-url' in msg: - self.download_url = _read_field('download-url') - else: - self.download_url = None - - self.long_description = _read_field('description') - self.description = _read_field('summary') - - if 'keywords' in msg: - self.keywords = _read_field('keywords').split(',') - - self.platforms = _read_list('platform') - self.classifiers = _read_list('classifier') - - # PEP 314 - these fields only exist in 1.1 - if metadata_version == '1.1': - self.requires = _read_list('requires') - self.provides = _read_list('provides') - self.obsoletes = _read_list('obsoletes') - else: - self.requires = None - self.provides = None - self.obsoletes = None + self.url = None + self.license = None + self.description = None + self.long_description = None + self.keywords = None + self.platforms = None + self.classifiers = None + self.download_url = None + # PEP 314 + self.provides = None + self.requires = None + self.obsoletes = None def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. diff --git a/emxccompiler.py b/emxccompiler.py index fd79aec2cf..62a4c5b4e8 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -21,13 +21,12 @@ __revision__ = "$Id$" -import os, sys, copy -from warnings import warn - +import os,sys,copy +from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils.util import get_compiler_versions +from distutils import log class EMXCCompiler (UnixCCompiler): @@ -56,8 +55,8 @@ def __init__ (self, ("Reason: %s." % details) + "Compiling may fail because of undefined preprocessor macros.") - gcc_version, ld_version, dllwrap_version = get_compiler_versions() - self.gcc_version, self.ld_version = gcc_version, ld_version + (self.gcc_version, self.ld_version) = \ + get_versions() self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % (self.gcc_version, self.ld_version) ) @@ -292,11 +291,23 @@ def get_versions(): """ Try to find out the versions of gcc and ld. If not possible it returns None for it. """ - warn("'distutils.emxccompiler.get_versions' is deprecated " - "use 'distutils.util.get_compiler_versions' instead", - DeprecationWarning) - + from distutils.version import StrictVersion + from distutils.spawn import find_executable + import re + + gcc_exe = find_executable('gcc') + if gcc_exe: + out = os.popen(gcc_exe + ' -dumpversion','r') + out_string = out.read() + out.close() + result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) + if result: + gcc_version = StrictVersion(result.group(1)) + else: + gcc_version = None + else: + gcc_version = None # EMX ld has no way of reporting version number, and we use GCC # anyway - so we can link OMF DLLs - gcc_version, ld_version, dllwrap_version = get_compiler_versions() - return gcc_version, None + ld_version = None + return (gcc_version, ld_version) diff --git a/errors.py b/errors.py index d9c47c761c..acecacccb5 100644 --- a/errors.py +++ b/errors.py @@ -10,79 +10,90 @@ __revision__ = "$Id$" -class DistutilsError(Exception): +class DistutilsError (Exception): """The root of all Distutils evil.""" + pass -class DistutilsModuleError(DistutilsError): +class DistutilsModuleError (DistutilsError): """Unable to load an expected module, or to find an expected class within some module (in particular, command modules and classes).""" + pass -class DistutilsClassError(DistutilsError): +class DistutilsClassError (DistutilsError): """Some command class (or possibly distribution class, if anyone feels a need to subclass Distribution) is found not to be holding up its end of the bargain, ie. implementing some part of the "command "interface.""" + pass -class DistutilsGetoptError(DistutilsError): +class DistutilsGetoptError (DistutilsError): """The option table provided to 'fancy_getopt()' is bogus.""" + pass -class DistutilsArgError(DistutilsError): +class DistutilsArgError (DistutilsError): """Raised by fancy_getopt in response to getopt.error -- ie. an error in the command line usage.""" + pass -class DistutilsFileError(DistutilsError): +class DistutilsFileError (DistutilsError): """Any problems in the filesystem: expected file not found, etc. Typically this is for problems that we detect before IOError or OSError could be raised.""" + pass -class DistutilsOptionError(DistutilsError): +class DistutilsOptionError (DistutilsError): """Syntactic/semantic errors in command options, such as use of mutually conflicting options, or inconsistent options, badly-spelled values, etc. No distinction is made between option values originating in the setup script, the command line, config files, or what-have-you -- but if we *know* something originated in the setup script, we'll raise DistutilsSetupError instead.""" + pass -class DistutilsSetupError(DistutilsError): +class DistutilsSetupError (DistutilsError): """For errors that can be definitely blamed on the setup script, such as invalid keyword arguments to 'setup()'.""" + pass -class DistutilsPlatformError(DistutilsError): +class DistutilsPlatformError (DistutilsError): """We don't know how to do something on the current platform (but we do know how to do it on some platform) -- eg. trying to compile C files on a platform not supported by a CCompiler subclass.""" + pass -class DistutilsExecError(DistutilsError): +class DistutilsExecError (DistutilsError): """Any problems executing an external program (such as the C compiler, when compiling C files).""" + pass -class DistutilsInternalError(DistutilsError): +class DistutilsInternalError (DistutilsError): """Internal inconsistencies or impossibilities (obviously, this should never be seen if the code is working!).""" + pass -class DistutilsTemplateError(DistutilsError): +class DistutilsTemplateError (DistutilsError): """Syntax error in a file list template.""" class DistutilsByteCompileError(DistutilsError): """Byte compile error.""" # Exception classes used by the CCompiler implementation classes -class CCompilerError(Exception): +class CCompilerError (Exception): """Some compile/link operation failed.""" -class PreprocessError(CCompilerError): +class PreprocessError (CCompilerError): """Failure to preprocess one or more C/C++ files.""" -class CompileError(CCompilerError): +class CompileError (CCompilerError): """Failure to compile one or more C/C++ source files.""" -class LibError(CCompilerError): +class LibError (CCompilerError): """Failure to create a static library from one or more C/C++ object files.""" -class LinkError(CCompilerError): +class LinkError (CCompilerError): """Failure to link one or more C/C++ object files into an executable or shared library file.""" -class UnknownFileError(CCompilerError): +class UnknownFileError (CCompilerError): """Attempt to process an unknown file type.""" diff --git a/extension.py b/extension.py index ebe5437c22..5c07bdae82 100644 --- a/extension.py +++ b/extension.py @@ -6,6 +6,7 @@ __revision__ = "$Id$" import os +import sys import warnings # This class is really only used by the "build_ext" command, so it might @@ -134,17 +135,14 @@ def __init__(self, name, sources, def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" - warnings.warn('distutils.extensions.read_setup_file is deprecated. ' - 'It will be removed in the next Python release.') - _sysconfig = __import__('sysconfig') - from distutils.sysconfig import (expand_makefile_vars, + from distutils.sysconfig import (parse_makefile, expand_makefile_vars, _variable_rx) from distutils.text_file import TextFile from distutils.util import split_quoted # First pass over the file to gather "VAR = VALUE" assignments. - vars = _sysconfig._parse_makefile(filename) + vars = parse_makefile(filename) # Second pass to gobble up the real content: lines of the form # ... [ ...] [ ...] [ ...] @@ -164,10 +162,7 @@ def read_setup_file(filename): file.warn("'%s' lines not handled yet" % line) continue - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - line = expand_makefile_vars(line, vars) - + line = expand_makefile_vars(line, vars) words = split_quoted(line) # NB. this parses a slightly different syntax than the old diff --git a/fancy_getopt.py b/fancy_getopt.py index 73343ad5af..879d4d25bf 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -10,11 +10,9 @@ __revision__ = "$Id$" -import sys -import string -import re +import sys, string, re import getopt -from distutils.errors import DistutilsGetoptError, DistutilsArgError +from distutils.errors import * # Much like command_re in distutils.core, this is close to but not quite # the same as a Python NAME -- except, in the spirit of most GNU @@ -446,3 +444,16 @@ def __init__(self, options=[]): 'options' will be initialized to None.""" for opt in options: setattr(self, opt, None) + + +if __name__ == "__main__": + text = """\ +Tra-la-la, supercalifragilisticexpialidocious. +How *do* you spell that odd word, anyways? +(Someone ask Mary -- she'll know [or she'll +say, "How should I know?"].)""" + + for w in (10, 20, 30, 40): + print("width: %d" % w) + print("\n".join(wrap_text(text, w))) + print() diff --git a/file_util.py b/file_util.py index 3a71bfd1ac..65aa7e0fdd 100644 --- a/file_util.py +++ b/file_util.py @@ -10,18 +10,17 @@ from distutils import log # for generating verbose output in 'copy_file()' -_copy_action = {None: 'copying', - 'hard': 'hard linking', - 'sym': 'symbolically linking'} +_copy_action = { None: 'copying', + 'hard': 'hard linking', + 'sym': 'symbolically linking' } def _copy_file_contents(src, dst, buffer_size=16*1024): - """Copy the file 'src' to 'dst'. - - Both must be filenames. Any error opening either file, reading from - 'src', or writing to 'dst', raises DistutilsFileError. Data is - read/written in chunks of 'buffer_size' bytes (default 16k). No attempt - is made to handle anything apart from regular files. + """Copy the file 'src' to 'dst'; both must be filenames. Any error + opening either file, reading from 'src', or writing to 'dst', raises + DistutilsFileError. Data is read/written in chunks of 'buffer_size' + bytes (default 16k). No attempt is made to handle anything apart from + regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. @@ -69,16 +68,15 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=1, dry_run=0): - """Copy a file 'src' to 'dst'. - - If 'dst' is a directory, then 'src' is copied there with the same name; - otherwise, it must be a filename. (If the file exists, it will be - ruthlessly clobbered.) If 'preserve_mode' is true (the default), - the file's mode (type and permission bits, or whatever is analogous on - the current platform) is copied. If 'preserve_times' is true (the - default), the last-modified and last-access times are copied as well. - If 'update' is true, 'src' will only be copied if 'dst' does not exist, - or if 'dst' does exist but is older than 'src'. + """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is + copied there with the same name; otherwise, it must be a filename. (If + the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' + is true (the default), the file's mode (type and permission bits, or + whatever is analogous on the current platform) is copied. If + 'preserve_times' is true (the default), the last-modified and + last-access times are copied as well. If 'update' is true, 'src' will + only be copied if 'dst' does not exist, or if 'dst' does exist but is + older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is @@ -132,6 +130,15 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, if dry_run: return (dst, 1) + # On Mac OS, use the native file copy routine + if os.name == 'mac': + import macostools + try: + macostools.copy(src, dst, 0, preserve_times) + except os.error as exc: + raise DistutilsFileError( + "could not copy '%s' to '%s': %s" % (src, dst, exc.args[-1])) + # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': @@ -159,12 +166,13 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, # XXX I suspect this is Unix-specific -- need porting help! -def move_file(src, dst, verbose=1, dry_run=0): - """Move a file 'src' to 'dst'. +def move_file (src, dst, + verbose=1, + dry_run=0): - If 'dst' is a directory, the file will be moved into it with the same - name; otherwise, 'src' is just renamed to 'dst'. Return the new - full name of the file. + """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will + be moved into it with the same name; otherwise, 'src' is just renamed + to 'dst'. Return the new full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? @@ -221,7 +229,7 @@ def move_file(src, dst, verbose=1, dry_run=0): return dst -def write_file(filename, contents): +def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ diff --git a/filelist.py b/filelist.py index bfc6df694a..06a8da9a07 100644 --- a/filelist.py +++ b/filelist.py @@ -108,7 +108,7 @@ def process_template_line(self, line): # defined: it's the first word of the line. Which of the other # three are defined depends on the action; it'll be either # patterns, (dir and patterns), or (dir_pattern). - action, patterns, dir, dir_pattern = self._parse_template_line(line) + (action, patterns, dir, dir_pattern) = self._parse_template_line(line) # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we @@ -175,15 +175,15 @@ def process_template_line(self, line): raise DistutilsInternalError( "this cannot happen: invalid action '%s'" % action) + # -- Filtering/selection methods ----------------------------------- def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): """Select strings (presumably filenames) from 'self.files' that - match 'pattern', a Unix-style wildcard (glob) pattern. - - Patterns are not quite the same as implemented by the 'fnmatch' - module: '*' and '?' match non-special characters, where "special" - is platform-dependent: slash on Unix; colon, slash, and backslash on + match 'pattern', a Unix-style wildcard (glob) pattern. Patterns + are not quite the same as implemented by the 'fnmatch' module: '*' + and '?' match non-special characters, where "special" is platform- + dependent: slash on Unix; colon, slash, and backslash on DOS/Windows; and colon on Mac OS. If 'anchor' is true (the default), then the pattern match is more @@ -220,13 +220,13 @@ def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): return files_found - def exclude_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): + def exclude_pattern (self, pattern, + anchor=1, prefix=None, is_regex=0): """Remove strings (presumably filenames) from 'files' that match - 'pattern'. - - Other parameters are the same as for 'include_pattern()', above. - The list 'self.files' is modified in place. Return 1 if files are - found. + 'pattern'. Other parameters are the same as for + 'include_pattern()', above. + The list 'self.files' is modified in place. + Return True if files are found, False otherwise. """ files_found = False pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) @@ -275,11 +275,10 @@ def findall(dir=os.curdir): def glob_to_re(pattern): - """Translate a shell-like glob pattern to a regular expression. - - Return a string containing the regex. Differs from - 'fnmatch.translate()' in that '*' does not match "special characters" - (which are platform-specific). + """Translate a shell-like glob pattern to a regular expression; return + a string containing the regex. Differs from 'fnmatch.translate()' in + that '*' does not match "special characters" (which are + platform-specific). """ pattern_re = fnmatch.translate(pattern) @@ -297,9 +296,7 @@ def glob_to_re(pattern): def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): """Translate a shell-like wildcard pattern to a compiled regular - expression. - - Return the compiled regex. If 'is_regex' true, + expression. Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) or just returned as-is (assumes it's a regex object). """ @@ -317,7 +314,7 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): if prefix is not None: # ditch end of pattern character empty_pattern = glob_to_re('') - prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] + prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) else: # no prefix -- respect anchor flag if anchor: diff --git a/msvc9compiler.py b/msvc9compiler.py index 15425d7194..761b9ca236 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -19,9 +19,10 @@ import sys import re -from distutils.errors import (DistutilsExecError, DistutilsPlatformError, - CompileError, LibError, LinkError) -from distutils.ccompiler import CCompiler, gen_lib_options +from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import CCompiler, gen_preprocess_options, \ + gen_lib_options from distutils import log from distutils.util import get_platform diff --git a/msvccompiler.py b/msvccompiler.py index dc3bd8de47..1cd0f91d5f 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -10,12 +10,12 @@ __revision__ = "$Id$" -import sys -import os - -from distutils.errors import (DistutilsExecError, DistutilsPlatformError, - CompileError, LibError, LinkError) -from distutils.ccompiler import CCompiler, gen_lib_options +import sys, os +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options from distutils import log _can_read_reg = False @@ -124,7 +124,7 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") - except KeyError: + except KeyError as exc: # raise DistutilsPlatformError( """Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. diff --git a/sysconfig.py b/sysconfig.py index 4a8629e6bd..0fbd5412bc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -7,9 +7,6 @@ Written by: Fred L. Drake, Jr. Email: - -**This module has been moved out of Distutils and will be removed from -Python in the next version (3.3)** """ __revision__ = "$Id$" @@ -17,45 +14,51 @@ import io import os import re -from warnings import warn - -from distutils.errors import DistutilsPlatformError - -# importing sysconfig from Lib -# to avoid this module to shadow it -_sysconfig = __import__('sysconfig') - -# names defined here to keep backward compatibility -# for APIs that were relocated -get_python_version = _sysconfig.get_python_version -get_config_h_filename = _sysconfig.get_config_h_filename -parse_config_h = _sysconfig.parse_config_h -get_config_vars = _sysconfig.get_config_vars -get_config_var = _sysconfig.get_config_var -from distutils.ccompiler import customize_compiler - -_DEPRECATION_MSG = ("distutils.sysconfig.%s is deprecated. " - "Use the APIs provided by the sysconfig module instead") - -def _get_project_base(): - return _sysconfig._PROJECT_BASE - -project_base = _get_project_base() - -class _DeprecatedBool(int): - def __nonzero__(self): - warn(_DEPRECATION_MSG % 'get_python_version', DeprecationWarning) - return super(_DeprecatedBool, self).__nonzero__() - +import sys + +from .errors import DistutilsPlatformError + +# These are needed in a couple of spots, so just compute them once. +PREFIX = os.path.normpath(sys.prefix) +EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + +# Path to the base directory of the project. On Windows the binary may +# live in project/PCBuild9. If we're dealing with an x64 Windows build, +# it'll live in project/PCbuild/amd64. +project_base = os.path.dirname(os.path.abspath(sys.executable)) +if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) +# PC/VS7.1 +if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) +# PC/AMD64 +if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, + os.path.pardir)) + +# python_build: (Boolean) if true, we're either building Python or +# building an extension with an un-installed Python, so we use +# different (hard-wired) directories. +# Setup.local is available for Makefile builds including VPATH builds, +# Setup.dist is available on Windows def _python_build(): - return _DeprecatedBool(_sysconfig.is_python_build()) - + for fn in ("Setup.dist", "Setup.local"): + if os.path.isfile(os.path.join(project_base, "Modules", fn)): + return True + return False python_build = _python_build() -def get_python_inc(plat_specific=0, prefix=None): - """This function is deprecated. +def get_python_version(): + """Return a string containing the major and minor Python version, + leaving off the patchlevel. Sample return values could be '1.5' + or '2.2'. + """ + return sys.version[:3] + - Return the directory containing installed Python header files. +def get_python_inc(plat_specific=0, prefix=None): + """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; @@ -65,22 +68,39 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - warn(_DEPRECATION_MSG % 'get_python_inc', DeprecationWarning) - get_path = _sysconfig.get_path - - if prefix is not None: - vars = {'base': prefix} - return get_path('include', vars=vars) - - if not plat_specific: - return get_path('include') + if prefix is None: + prefix = plat_specific and EXEC_PREFIX or PREFIX + if os.name == "posix": + if python_build: + # Assume the executable is in the build directory. The + # pyconfig.h file should be in the same directory. Since + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. + base = os.path.dirname(os.path.abspath(sys.executable)) + if plat_specific: + return base + else: + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) + return os.path.join(prefix, "include", "python" + get_python_version()) + elif os.name == "nt": + return os.path.join(prefix, "include") + elif os.name == "mac": + if plat_specific: + return os.path.join(prefix, "Mac", "Include") + else: + return os.path.join(prefix, "Include") + elif os.name == "os2": + return os.path.join(prefix, "Include") else: - return get_path('platinclude') + raise DistutilsPlatformError( + "I don't know where Python installs its C header files " + "on platform '%s'" % os.name) -def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): - """This function is deprecated. - Return the directory containing the Python library (standard or +def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + """Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing @@ -93,33 +113,149 @@ def get_python_lib(plat_specific=False, standard_lib=False, prefix=None): If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ - warn(_DEPRECATION_MSG % 'get_python_lib', DeprecationWarning) - vars = {} - get_path = _sysconfig.get_path - if prefix is not None: - if plat_specific: - vars['platbase'] = prefix + if prefix is None: + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": + libpython = os.path.join(prefix, + "lib", "python" + get_python_version()) + if standard_lib: + return libpython else: - vars['base'] = prefix - if standard_lib: + return os.path.join(libpython, "site-packages") + elif os.name == "nt": + if standard_lib: + return os.path.join(prefix, "Lib") + else: + if get_python_version() < "2.2": + return prefix + else: + return os.path.join(prefix, "Lib", "site-packages") + elif os.name == "mac": if plat_specific: - return get_path('platstdlib', vars=vars) + if standard_lib: + return os.path.join(prefix, "Lib", "lib-dynload") + else: + return os.path.join(prefix, "Lib", "site-packages") + else: + if standard_lib: + return os.path.join(prefix, "Lib") + else: + return os.path.join(prefix, "Lib", "site-packages") + elif os.name == "os2": + if standard_lib: + return os.path.join(prefix, "Lib") else: - return get_path('stdlib', vars=vars) + return os.path.join(prefix, "Lib", "site-packages") else: - if plat_specific: - return get_path('platlib', vars=vars) + raise DistutilsPlatformError( + "I don't know where Python installs its library " + "on platform '%s'" % os.name) + + +def customize_compiler(compiler): + """Do any platform-specific customization of a CCompiler instance. + + Mainly needed on Unix, so we can plug in the information that + varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ + get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') + + if 'CC' in os.environ: + cc = os.environ['CC'] + if 'CXX' in os.environ: + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] else: - return get_path('purelib', vars=vars) + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, + compiler_cxx=cxx, + linker_so=ldshared, + linker_exe=cc, + archiver=archiver) + + compiler.shared_lib_extension = so_ext + + +def get_config_h_filename(): + """Return full pathname of installed pyconfig.h file.""" + if python_build: + if os.name == "nt": + inc_dir = os.path.join(project_base, "PC") + else: + inc_dir = project_base + else: + inc_dir = get_python_inc(plat_specific=1) + if get_python_version() < '2.2': + config_h = 'config.h' + else: + # The name of the config.h file changed in 2.2 + config_h = 'pyconfig.h' + return os.path.join(inc_dir, config_h) + def get_makefile_filename(): - """This function is deprecated. + """Return full pathname of installed Makefile from the Python build.""" + if python_build: + return os.path.join(os.path.dirname(sys.executable), "Makefile") + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + return os.path.join(lib_dir, "config", "Makefile") + + +def parse_config_h(fp, g=None): + """Parse a config.h-style file. - Return full pathname of installed Makefile from the Python build. + A dictionary containing name/value pairs is returned. If an + optional dictionary is passed in as the second argument, it is + used instead of a new dictionary. """ + if g is None: + g = {} + define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") + undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") + # + while True: + line = fp.readline() + if not line: + break + m = define_rx.match(line) + if m: + n, v = m.group(1, 2) + try: v = int(v) + except ValueError: pass + g[n] = v + else: + m = undef_rx.match(line) + if m: + g[m.group(1)] = 0 + return g - warn(_DEPRECATION_MSG % 'get_makefile_filename', DeprecationWarning) - return _sysconfig._get_makefile_filename() # Regexes needed for parsing Makefile (and similar syntaxes, # like old-style Setup files). @@ -128,29 +264,91 @@ def get_makefile_filename(): _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") def parse_makefile(fn, g=None): - """This function is deprecated. - - Parse a Makefile-style file. + """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ - warn(_DEPRECATION_MSG % 'parse_makefile', DeprecationWarning) - return _sysconfig._parse_makefile(fn, g) + from distutils.text_file import TextFile + fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) -def expand_makefile_vars(s, vars): - """This function is deprecated. + if g is None: + g = {} + done = {} + notdone = {} - Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in + while True: + line = fp.readline() + if line is None: # eof + break + m = _variable_rx.match(line) + if m: + n, v = m.group(1, 2) + v = v.strip() + # `$$' is a literal `$' in make + tmpv = v.replace('$$', '') + + if "$" in tmpv: + notdone[n] = v + else: + try: + v = int(v) + except ValueError: + # insert literal `$' + done[n] = v.replace('$$', '$') + else: + done[n] = v + + # do variable interpolation here + while notdone: + for name in list(notdone): + value = notdone[name] + m = _findvar1_rx.search(value) or _findvar2_rx.search(value) + if m: + n = m.group(1) + found = True + if n in done: + item = str(done[n]) + elif n in notdone: + # get it on a subsequent round + found = False + elif n in os.environ: + # do it like make: fall back to environment + item = os.environ[n] + else: + done[n] = item = "" + if found: + after = value[m.end():] + value = value[:m.start()] + item + after + if "$" in after: + notdone[name] = value + else: + try: value = int(value) + except ValueError: + done[name] = value.strip() + else: + done[name] = value + del notdone[name] + else: + # bogus variable reference; just drop it since we can't deal + del notdone[name] + + fp.close() + + # save the results in the global dictionary + g.update(done) + return g + + +def expand_makefile_vars(s, vars): + """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. """ - warn('this function will be removed in then next version of Python', - DeprecationWarning) # This algorithm does multiple expansion, so if vars['foo'] contains # "${bar}", it will expand ${foo} to ${bar}, and then expand @@ -166,3 +364,220 @@ def expand_makefile_vars(s, vars): else: break return s + + +_config_vars = None + +def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" + g = {} + # load the installed Makefile: + try: + filename = get_makefile_filename() + parse_makefile(filename, g) + except IOError as msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # load the installed pyconfig.h: + try: + filename = get_config_h_filename() + parse_config_h(io.open(filename), g) + except IOError as msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # On MacOSX we need to check the setting of the environment variable + # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so + # it needs to be compatible. + # If it isn't set we set it to the configure-time value + if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: + cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] + cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') + if cur_target == '': + cur_target = cfg_target + os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) + elif [int(x) for x in cfg_target.split('.')] > [int(x) for x in cur_target.split('.')]: + my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' + % (cur_target, cfg_target)) + raise DistutilsPlatformError(my_msg) + + # On AIX, there are wrong paths to the linker scripts in the Makefile + # -- these paths are relative to the Python source, but when installed + # the scripts are in another directory. + if python_build: + g['LDSHARED'] = g['BLDSHARED'] + + elif get_python_version() < '2.1': + # The following two branches are for 1.5.2 compatibility. + if sys.platform == 'aix4': # what about AIX 3.x ? + # Linker script is in the config directory, not in Modules as the + # Makefile says. + python_lib = get_python_lib(standard_lib=1) + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') + python_exp = os.path.join(python_lib, 'config', 'python.exp') + + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) + + global _config_vars + _config_vars = g + + +def _init_nt(): + """Initialize the module as appropriate for NT""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + g['SO'] = '.pyd' + g['EXE'] = ".exe" + g['VERSION'] = get_python_version().replace(".", "") + g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) + + global _config_vars + _config_vars = g + + +def _init_mac(): + """Initialize the module as appropriate for Macintosh systems""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + import MacOS + if not hasattr(MacOS, 'runtimemodel'): + g['SO'] = '.ppc.slb' + else: + g['SO'] = '.%s.slb' % MacOS.runtimemodel + + # XXX are these used anywhere? + g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") + g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") + + # These are used by the extension module build + g['srcdir'] = ':' + global _config_vars + _config_vars = g + + +def _init_os2(): + """Initialize the module as appropriate for OS/2""" + g = {} + # set basic install directories + g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) + g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) + + # XXX hmmm.. a normal install puts include files here + g['INCLUDEPY'] = get_python_inc(plat_specific=0) + + g['SO'] = '.pyd' + g['EXE'] = ".exe" + + global _config_vars + _config_vars = g + + +def get_config_vars(*args): + """With no arguments, return a dictionary of all configuration + variables relevant for the current platform. Generally this includes + everything needed to build extensions and install both pure modules and + extensions. On Unix, this means every variable defined in Python's + installed Makefile; on Windows and Mac OS it's a much smaller set. + + With arguments, return a list of values that result from looking up + each argument in the configuration variable dictionary. + """ + global _config_vars + if _config_vars is None: + func = globals().get("_init_" + os.name) + if func: + func() + else: + _config_vars = {} + + # Normalized versions of prefix and exec_prefix are handy to have; + # in fact, these are the standard versions used most places in the + # Distutils. + _config_vars['prefix'] = PREFIX + _config_vars['exec_prefix'] = EXEC_PREFIX + + # Convert srcdir into an absolute path if it appears necessary. + # Normally it is relative to the build directory. However, during + # testing, for example, we might be running a non-installed python + # from a different directory. + if python_build and os.name == "posix": + base = os.path.dirname(os.path.abspath(sys.executable)) + if (not os.path.isabs(_config_vars['srcdir']) and + base != os.getcwd()): + # srcdir is relative and we are not in the same directory + # as the executable. Assume executable is in the build + # directory and make srcdir absolute. + srcdir = os.path.join(base, _config_vars['srcdir']) + _config_vars['srcdir'] = os.path.normpath(srcdir) + + if sys.platform == 'darwin': + kernel_version = os.uname()[2] # Kernel version (8.4.3) + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # On Mac OS X before 10.4, check if -arch and -isysroot + # are in CFLAGS or LDFLAGS and remove them if they are. + # This is needed when building extensions on a 10.3 system + # using a universal build of python. + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII) + flags = re.sub('-isysroot [^ \t]*', ' ', flags) + _config_vars[key] = flags + + else: + + # Allow the user to override the architecture flags using + # an environment variable. + # NOTE: This name was introduced by Apple in OSX 10.5 and + # is used by several scripting languages distributed with + # that OS release. + + if 'ARCHFLAGS' in os.environ: + arch = os.environ['ARCHFLAGS'] + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = flags + ' ' + arch + _config_vars[key] = flags + + if args: + vals = [] + for name in args: + vals.append(_config_vars.get(name)) + return vals + else: + return _config_vars + +def get_config_var(name): + """Return the value of a single variable using the dictionary + returned by 'get_config_vars()'. Equivalent to + get_config_vars().get(name) + """ + return get_config_vars().get(name) diff --git a/tests/support.py b/tests/support.py index 45c94411ee..e258d2e58d 100644 --- a/tests/support.py +++ b/tests/support.py @@ -3,19 +3,11 @@ import shutil import tempfile from copy import deepcopy -import warnings from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution -def capture_warnings(func): - def _capture_warnings(*args, **kw): - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - return func(*args, **kw) - return _capture_warnings - class LoggingSilencer(object): def setUp(self): @@ -63,8 +55,6 @@ def tearDown(self): super().tearDown() while self.tempdirs: d = self.tempdirs.pop() - if not os.path.exists(d): - continue shutil.rmtree(d, os.name in ('nt', 'cygwin')) def mkdtemp(self): diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 682f19a2b3..c6e08cbc2b 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -14,31 +14,16 @@ from distutils.tests import support from test.support import check_warnings -try: - import grp - import pwd - UID_GID_SUPPORT = True -except ImportError: - UID_GID_SUPPORT = False - try: import zipfile ZIP_SUPPORT = True except ImportError: ZIP_SUPPORT = find_executable('zip') -# some tests will fail if zlib is not available -try: - import zlib -except ImportError: - zlib = None - - class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - @unittest.skipUnless(zlib, "requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -49,7 +34,7 @@ def test_make_tarball(self): tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], - "source and target should be on same drive") + "Source and target should be on same drive") base_name = os.path.join(tmpdir2, 'archive') @@ -99,7 +84,6 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name - @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), 'Need the tar command to run') def test_tarfile_vs_tar(self): @@ -185,7 +169,6 @@ def test_compress_deprecated(self): self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) - @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar @@ -210,59 +193,6 @@ def test_make_archive(self): base_name = os.path.join(tmpdir, 'archive') self.assertRaises(ValueError, make_archive, base_name, 'xxx') - @unittest.skipUnless(zlib, "Requires zlib") - def test_make_archive_owner_group(self): - # testing make_archive with owner and group, with various combinations - # this works even if there's not gid/uid support - if UID_GID_SUPPORT: - group = grp.getgrgid(0)[0] - owner = pwd.getpwuid(0)[0] - else: - group = owner = 'root' - - base_dir, root_dir, base_name = self._create_files() - base_name = os.path.join(self.mkdtemp() , 'archive') - res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner, - group=group) - self.assertTrue(os.path.exists(res)) - - res = make_archive(base_name, 'zip', root_dir, base_dir) - self.assertTrue(os.path.exists(res)) - - res = make_archive(base_name, 'tar', root_dir, base_dir, - owner=owner, group=group) - self.assertTrue(os.path.exists(res)) - - res = make_archive(base_name, 'tar', root_dir, base_dir, - owner='kjhkjhkjg', group='oihohoh') - self.assertTrue(os.path.exists(res)) - - @unittest.skipUnless(zlib, "Requires zlib") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") - def test_tarfile_root_owner(self): - tmpdir, tmpdir2, base_name = self._create_files() - old_dir = os.getcwd() - os.chdir(tmpdir) - group = grp.getgrgid(0)[0] - owner = pwd.getpwuid(0)[0] - try: - archive_name = make_tarball(base_name, 'dist', compress=None, - owner=owner, group=group) - finally: - os.chdir(old_dir) - - # check if the compressed tarball was created - self.assertTrue(os.path.exists(archive_name)) - - # now checks the rights - archive = tarfile.open(archive_name) - try: - for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) - finally: - archive.close() - def test_make_archive_cwd(self): current_dir = os.getcwd() def _breaks(*args, **kw): diff --git a/tests/test_bdist.py b/tests/test_bdist.py index 29dcc7c8ba..f2849a9756 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -5,8 +5,6 @@ import tempfile import shutil -from test.support import run_unittest - from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support @@ -42,4 +40,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 746144bf5b..5e76809f23 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -4,15 +4,6 @@ import sys import os -# zlib is not used here, but if it's not available -# test_simple_built will fail -try: - import zlib -except ImportError: - zlib = None - -from test.support import run_unittest - from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -42,7 +33,6 @@ def tearDown(self): sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() - @unittest.skipUnless(zlib, "requires zlib") def test_simple_built(self): # let's create a simple package @@ -83,23 +73,8 @@ def test_simple_built(self): # now let's check what we have in the zip file # XXX to be done - def test_finalize_options(self): - pkg_dir, dist = self.create_dist() - os.chdir(pkg_dir) - cmd = bdist_dumb(dist) - self.assertEquals(cmd.bdist_dir, None) - cmd.finalize_options() - - # bdist_dir is initialized to bdist_base/dumb if not set - base = cmd.get_finalized_command('bdist').bdist_base - self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) - - # the format is set to a default value depending on the os.name - default = cmd.default_format[os.name] - self.assertEquals(cmd.format, default) - def test_suite(): return unittest.makeSuite(BuildDumbTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 1014e549af..2aa257f7e6 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -6,8 +6,6 @@ import tempfile import shutil -from test.support import run_unittest - from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support @@ -124,4 +122,4 @@ def test_suite(): return unittest.makeSuite(BuildRpmTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index ffe413536c..9b1ba6d107 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,8 +1,6 @@ """Tests for distutils.command.bdist_wininst.""" import unittest -from test.support import run_unittest - from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -29,4 +27,4 @@ def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 145eff5453..536cd67319 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -120,7 +120,8 @@ def test_run(self): # before we run the command, we want to make sure # all commands are present on the system # by creating a compiler and checking its executables - from distutils.ccompiler import new_compiler, customize_compiler + from distutils.ccompiler import new_compiler + from distutils.sysconfig import customize_compiler compiler = new_compiler() customize_compiler(compiler) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e41a824fde..b7cdc20aa4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -3,13 +3,10 @@ import tempfile import shutil from io import StringIO -import warnings -from test.support import check_warnings -from test.support import captured_stdout from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext -import sysconfig +from distutils import sysconfig from distutils.tests.support import TempdirManager from distutils.tests.support import LoggingSilencer from distutils.extension import Extension @@ -25,23 +22,19 @@ def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') - if srcdir is None: - return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') return os.path.join(srcdir, 'Modules', 'xxmodule.c') -_XX_MODULE_PATH = _get_source_filename() - -class BuildExtTestCase(TempdirManager, LoggingSilencer, unittest.TestCase): - +class BuildExtTestCase(TempdirManager, + LoggingSilencer, + unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - if os.path.exists(_XX_MODULE_PATH): - self.sys_path = sys.path[:] - sys.path.append(self.tmp_dir) - shutil.copy(_XX_MODULE_PATH, self.tmp_dir) + self.sys_path = sys.path, sys.path[:] + sys.path.append(self.tmp_dir) + shutil.copy(_get_source_filename(), self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -49,19 +42,6 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE - def tearDown(self): - # Get everything back to normal - if os.path.exists(_XX_MODULE_PATH): - support.unload('xx') - sys.path[:] = self.sys_path - # XXX on Windows the test leaves a directory - # with xx module in TEMP - shutil.rmtree(self.tmp_dir, os.name == 'nt' or - sys.platform == 'cygwin') - super(BuildExtTestCase, self).tearDown() - - @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), - 'xxmodule.c not found') def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -104,23 +84,35 @@ def test_build_ext(self): self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) + def tearDown(self): + # Get everything back to normal + support.unload('xx') + sys.path = self.sys_path[0] + sys.path[:] = self.sys_path[1] + if sys.version > "2.6": + import site + site.USER_BASE = self.old_user_base + from distutils.command import build_ext + build_ext.USER_BASE = self.old_user_base + super(BuildExtTestCase, self).tearDown() + def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) old = sys.platform sys.platform = 'sunos' # fooling finalize_options - from sysconfig import _CONFIG_VARS - old_var = _CONFIG_VARS.get('Py_ENABLE_SHARED') - _CONFIG_VARS['Py_ENABLE_SHARED'] = 1 + from distutils.sysconfig import _config_vars + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = 1 try: cmd.ensure_finalized() finally: sys.platform = old if old_var is None: - del _CONFIG_VARS['Py_ENABLE_SHARED'] + del _config_vars['Py_ENABLE_SHARED'] else: - _CONFIG_VARS['Py_ENABLE_SHARED'] = old_var + _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris self.assertTrue(len(cmd.library_dirs) > 0) @@ -182,10 +174,11 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.finalize_options() - py_include = sysconfig.get_path('include') + from distutils import sysconfig + py_include = sysconfig.get_python_inc() self.assertTrue(py_include in cmd.include_dirs) - plat_py_include = sysconfig.get_path('platinclude') + plat_py_include = sysconfig.get_python_inc(plat_specific=1) self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list @@ -336,6 +329,7 @@ def test_get_outputs(self): self.assertEquals(so_dir, other_tmp_dir) cmd.inplace = 0 + cmd.compiler = None cmd.run() so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) @@ -404,26 +398,6 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) - def test_compiler_deprecation_warning(self): - dist = Distribution() - cmd = build_ext(dist) - - class MyCompiler(object): - def do_something(self): - pass - - with check_warnings() as w: - warnings.simplefilter("always") - cmd.compiler = MyCompiler() - self.assertEquals(len(w.warnings), 1) - cmd.compile = 'unix' - self.assertEquals(len(w.warnings), 1) - cmd.compiler = MyCompiler() - cmd.compiler.do_something() - # two more warnings genereated by the get - # and the set - self.assertEquals(len(w.warnings), 3) - def test_suite(): src = _get_source_filename() if not os.path.exists(src): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 61e213a586..3e45f6e89e 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -16,7 +16,7 @@ class BuildPyTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def _setup_package_data(self): + def test_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") f.write("# Pretend this is a package.") @@ -52,18 +52,9 @@ def _setup_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - return files - - def test_package_data(self): - files = self._setup_package_data() self.assertTrue("__init__.py" in files) - self.assertTrue("README.txt" in files) - - @unittest.skipIf(sys.flags.optimize >= 2, - "pyc files are not written with -O2 and above") - def test_package_data_pyc(self): - files = self._setup_package_data() self.assertTrue("__init__.pyc" in files) + self.assertTrue("README.txt" in files) def test_empty_package_dir (self): # See SF 1668596/1720897. diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 72e8915c00..b1d2d079bd 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -5,7 +5,7 @@ from distutils.command.build_scripts import build_scripts from distutils.core import Distribution -import sysconfig +from distutils import sysconfig from distutils.tests import support @@ -91,12 +91,12 @@ def test_version_int(self): # --with-suffix=3`, python is compiled okay but the build scripts # failed when writing the name of the executable old = sysconfig.get_config_vars().get('VERSION') - sysconfig._CONFIG_VARS['VERSION'] = 4 + sysconfig._config_vars['VERSION'] = 4 try: cmd.run() finally: if old is not None: - sysconfig._CONFIG_VARS['VERSION'] = old + sysconfig._config_vars['VERSION'] = old built = os.listdir(target) for name in expected: diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py deleted file mode 100644 index 27b51a0645..0000000000 --- a/tests/test_ccompiler.py +++ /dev/null @@ -1,81 +0,0 @@ -"""Tests for distutils.ccompiler.""" -import os -import unittest -from test.support import captured_stdout - -from distutils.ccompiler import (gen_lib_options, CCompiler, - get_default_compiler, customize_compiler) -from distutils import debug -from distutils.tests import support - -class FakeCompiler(object): - def library_dir_option(self, dir): - return "-L" + dir - - def runtime_library_dir_option(self, dir): - return ["-cool", "-R" + dir] - - def find_library_file(self, dirs, lib, debug=0): - return 'found' - - def library_option(self, lib): - return "-l" + lib - -class CCompilerTestCase(support.EnvironGuard, unittest.TestCase): - - def test_gen_lib_options(self): - compiler = FakeCompiler() - libdirs = ['lib1', 'lib2'] - runlibdirs = ['runlib1'] - libs = [os.path.join('dir', 'name'), 'name2'] - - opts = gen_lib_options(compiler, libdirs, runlibdirs, libs) - wanted = ['-Llib1', '-Llib2', '-cool', '-Rrunlib1', 'found', - '-lname2'] - self.assertEquals(opts, wanted) - - def test_debug_print(self): - - class MyCCompiler(CCompiler): - executables = {} - - compiler = MyCCompiler() - with captured_stdout() as stdout: - compiler.debug_print('xxx') - stdout.seek(0) - self.assertEquals(stdout.read(), '') - - debug.DEBUG = True - try: - with captured_stdout() as stdout: - compiler.debug_print('xxx') - stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') - finally: - debug.DEBUG = False - - def test_customize_compiler(self): - - # not testing if default compiler is not unix - if get_default_compiler() != 'unix': - return - - os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' - - # make sure AR gets caught - class compiler: - compiler_type = 'unix' - - def set_executables(self, **kw): - self.exes = kw - - comp = compiler() - customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') - -def test_suite(): - return unittest.makeSuite(CCompilerTestCase) - -if __name__ == "__main__": - unittest.main(defaultTest="test_suite") diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 728652e2ca..55ae421d46 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,7 +1,7 @@ """Tests for distutils.cmd.""" import unittest import os -from test.support import captured_stdout, run_unittest +from test.support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution @@ -124,4 +124,4 @@ def test_suite(): return unittest.makeSuite(CommandTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 374f392d61..a57694d48e 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -2,21 +2,29 @@ import unittest import sys import os +from io import BytesIO import subprocess -import warnings -import sysconfig - -from test.support import check_warnings, run_unittest -from test.support import captured_stdout from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, - get_msvcr, RE_VERSION) -from distutils.util import get_compiler_versions + get_msvcr) from distutils.tests import support +class FakePopen(object): + test_class = None + + def __init__(self, cmd, shell, stdout): + self.cmd = cmd.split()[0] + exes = self.test_class._exes + if self.cmd in exes: + # issue #6438 in Python 3.x, Popen returns bytes + self.stdout = BytesIO(exes[self.cmd]) + else: + self.stdout = os.popen(cmd, 'r') + + class CygwinCCompilerTestCase(support.TempdirManager, unittest.TestCase): @@ -24,17 +32,32 @@ def setUp(self): super(CygwinCCompilerTestCase, self).setUp() self.version = sys.version self.python_h = os.path.join(self.mkdtemp(), 'python.h') + from distutils import sysconfig self.old_get_config_h_filename = sysconfig.get_config_h_filename sysconfig.get_config_h_filename = self._get_config_h_filename + self.old_find_executable = cygwinccompiler.find_executable + cygwinccompiler.find_executable = self._find_executable + self._exes = {} + self.old_popen = cygwinccompiler.Popen + FakePopen.test_class = self + cygwinccompiler.Popen = FakePopen def tearDown(self): sys.version = self.version + from distutils import sysconfig sysconfig.get_config_h_filename = self.old_get_config_h_filename + cygwinccompiler.find_executable = self.old_find_executable + cygwinccompiler.Popen = self.old_popen super(CygwinCCompilerTestCase, self).tearDown() def _get_config_h_filename(self): return self.python_h + def _find_executable(self, name): + if name in self._exes: + return name + return None + def test_check_config_h(self): # check_config_h looks for "GCC" in sys.version first @@ -58,6 +81,40 @@ def test_check_config_h(self): self.write_file(self.python_h, 'xxx __GNUC__ xxx') self.assertEquals(check_config_h()[0], CONFIG_H_OK) + def test_get_versions(self): + + # get_versions calls distutils.spawn.find_executable on + # 'gcc', 'ld' and 'dllwrap' + self.assertEquals(get_versions(), (None, None, None)) + + # Let's fake we have 'gcc' and it returns '3.4.5' + self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' + res = get_versions() + self.assertEquals(str(res[0]), '3.4.5') + + # and let's see what happens when the version + # doesn't match the regular expression + # (\d+\.\d+(\.\d+)*) + self._exes['gcc'] = b'very strange output' + res = get_versions() + self.assertEquals(res[0], None) + + # same thing for ld + self._exes['ld'] = b'GNU ld version 2.17.50 20060824' + res = get_versions() + self.assertEquals(str(res[1]), '2.17.50') + self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' + res = get_versions() + self.assertEquals(res[1], None) + + # and dllwrap + self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' + res = get_versions() + self.assertEquals(str(res[2]), '2.17.50') + self._exes['dllwrap'] = b'Cheese Wrap' + res = get_versions() + self.assertEquals(res[2], None) + def test_get_msvcr(self): # none @@ -90,23 +147,8 @@ def test_get_msvcr(self): '[MSC v.1999 32 bits (Intel)]') self.assertRaises(ValueError, get_msvcr) - - def test_get_version_deprecated(self): - with check_warnings() as w: - warnings.simplefilter("always") - # make sure get_compiler_versions and get_versions - # returns the same thing - self.assertEquals(get_compiler_versions(), get_versions()) - # make sure using get_version() generated a warning - self.assertEquals(len(w.warnings), 1) - # make sure any usage of RE_VERSION will also - # generate a warning, but till works - version = RE_VERSION.search('1.2').group(1) - self.assertEquals(version, '1.2') - self.assertEquals(len(w.warnings), 2) - def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) if __name__ == '__main__': - run_unittest(test_suite()) + test_support.run_unittest(test_suite()) diff --git a/tests/test_dist.py b/tests/test_dist.py index 4f51c16e51..3b7637f3af 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -7,9 +7,8 @@ import warnings import textwrap -from distutils.dist import Distribution, fix_help_options, DistributionMetadata +from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command -import distutils.dist from test.support import TESTFN, captured_stdout from distutils.tests import support @@ -38,8 +37,7 @@ def find_config_files(self): return self._config_files -class DistributionTestCase(support.TempdirManager, - support.LoggingSilencer, +class DistributionTestCase(support.LoggingSilencer, support.EnvironGuard, unittest.TestCase): @@ -60,27 +58,6 @@ def create_distribution(self, configfiles=()): d.parse_command_line() return d - def test_debug_mode(self): - with open(TESTFN, "w") as f: - f.write("[global]") - f.write("command_packages = foo.bar, splat") - - files = [TESTFN] - sys.argv.append("build") - - with captured_stdout() as stdout: - self.create_distribution(files) - stdout.seek(0) - self.assertEquals(stdout.read(), '') - distutils.dist.DEBUG = True - try: - with captured_stdout() as stdout: - self.create_distribution(files) - stdout.seek(0) - self.assertEquals(stdout.read(), '') - finally: - distutils.dist.DEBUG = False - def test_command_packages_unspecified(self): sys.argv.append("build") d = self.create_distribution() @@ -182,35 +159,6 @@ def test_announce(self): kwargs = {'level': 'ok2'} self.assertRaises(ValueError, dist.announce, args, kwargs) - def test_find_config_files_disable(self): - # Ticket #1180: Allow user to disable their home config file. - temp_home = self.mkdtemp() - if os.name == 'posix': - user_filename = os.path.join(temp_home, ".pydistutils.cfg") - else: - user_filename = os.path.join(temp_home, "pydistutils.cfg") - - with open(user_filename, 'w') as f: - f.write('[distutils]\n') - - def _expander(path): - return temp_home - - old_expander = os.path.expanduser - os.path.expanduser = _expander - try: - d = distutils.dist.Distribution() - all_files = d.find_config_files() - - d = distutils.dist.Distribution(attrs={'script_args': - ['--no-user-cfg']}) - files = d.find_config_files() - finally: - os.path.expanduser = old_expander - - # make sure --no-user-cfg disables the user cfg file - self.assertEquals(len(all_files)-1, len(files)) - class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): @@ -364,38 +312,11 @@ def test_long_description(self): "version": "1.0", "long_description": long_desc} - dist = distutils.dist.Distribution(attrs) + dist = Distribution(attrs) meta = self.format_metadata(dist) meta = meta.replace('\n' + 8 * ' ', '\n') self.assertTrue(long_desc in meta) - def test_read_metadata(self): - attrs = {"name": "package", - "version": "1.0", - "long_description": "desc", - "description": "xxx", - "download_url": "http://example.com", - "keywords": ['one', 'two'], - "requires": ['foo']} - - dist = Distribution(attrs) - metadata = dist.metadata - - # write it then reloads it - PKG_INFO = io.StringIO() - metadata.write_pkg_file(PKG_INFO) - PKG_INFO.seek(0) - metadata.read_pkg_file(PKG_INFO) - - self.assertEquals(metadata.name, "package") - self.assertEquals(metadata.version, "1.0") - self.assertEquals(metadata.description, "xxx") - self.assertEquals(metadata.download_url, 'http://example.com') - self.assertEquals(metadata.keywords, ['one', 'two']) - self.assertEquals(metadata.platforms, ['UNKNOWN']) - self.assertEquals(metadata.obsoletes, None) - self.assertEquals(metadata.requires, ['foo']) - def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) diff --git a/tests/test_emxccompiler.py b/tests/test_emxccompiler.py deleted file mode 100644 index 1360f8297a..0000000000 --- a/tests/test_emxccompiler.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Tests for distutils.emxccompiler.""" -import unittest -import sys -import os -import warnings - -from test.support import check_warnings, run_unittest -from test.support import captured_stdout - -from distutils.emxccompiler import get_versions -from distutils.util import get_compiler_versions -from distutils.tests import support - -class EmxCCompilerTestCase(support.TempdirManager, - unittest.TestCase): - - def test_get_version_deprecated(self): - with check_warnings() as w: - warnings.simplefilter("always") - # make sure get_compiler_versions and get_versions - # returns the same gcc - gcc, ld, dllwrap = get_compiler_versions() - emx_gcc, emx_ld = get_versions() - self.assertEquals(gcc, emx_gcc) - - # make sure using get_version() generated a warning - self.assertEquals(len(w.warnings), 1) - -def test_suite(): - return unittest.makeSuite(EmxCCompilerTestCase) - -if __name__ == '__main__': - run_unittest(test_suite()) diff --git a/tests/test_extension.py b/tests/test_extension.py index 857284dd55..1ee30585fa 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,16 +1,13 @@ """Tests for distutils.extension.""" -import os -import sys import unittest +import os import warnings from test.support import check_warnings from distutils.extension import read_setup_file, Extension -from distutils.tests.support import capture_warnings class ExtensionTestCase(unittest.TestCase): - @capture_warnings def test_read_setup_file(self): # trying to read a Setup file # (sample extracted from the PyGame project) @@ -33,22 +30,16 @@ def test_read_setup_file(self): self.assertEquals(names, wanted) - @unittest.skipIf(sys.flags.optimize >= 2, - "Assertions are omitted with -O2 and above") - def test_extension_init_assertions(self): - # The first argument, which is the name, must be a string. + def test_extension_init(self): + # the first argument, which is the name, must be a string self.assertRaises(AssertionError, Extension, 1, []) + ext = Extension('name', []) + self.assertEquals(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) - - def test_extension_init(self): - ext = Extension('name', []) - self.assertEquals(ext.name, 'name') - - ext = Extension('name', ['file1', 'file2']) self.assertEquals(ext.sources, ['file1', 'file2']) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 99b421f73f..fac4a5d1a9 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -3,7 +3,7 @@ import os import shutil -from distutils.file_util import move_file, write_file, copy_file +from distutils.file_util import move_file from distutils import log from distutils.tests import support @@ -55,21 +55,6 @@ def test_move_file_verbosity(self): wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEquals(self._logs, wanted) - def test_write_file(self): - lines = ['a', 'b', 'c'] - dir = self.mkdtemp() - foo = os.path.join(dir, 'foo') - write_file(foo, lines) - content = [line.strip() for line in open(foo).readlines()] - self.assertEquals(content, lines) - - def test_copy_file(self): - src_dir = self.mkdtemp() - foo = os.path.join(src_dir, 'foo') - write_file(foo, 'content') - dst_dir = self.mkdtemp() - copy_file(foo, dst_dir) - self.assertTrue(os.path.exists(os.path.join(dst_dir, 'foo'))) def test_suite(): return unittest.makeSuite(FileUtilTestCase) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index d98325ae54..331180d235 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,25 +1,10 @@ """Tests for distutils.filelist.""" -from os.path import join import unittest -from test.support import captured_stdout from distutils.filelist import glob_to_re, FileList +from test.support import captured_stdout from distutils import debug -MANIFEST_IN = """\ -include ok -include xo -exclude xo -include foo.tmp -global-include *.x -global-include *.txt -global-exclude *.tmp -recursive-include f *.oo -recursive-exclude global *.x -graft dir -prune dir3 -""" - class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): @@ -34,34 +19,6 @@ def test_glob_to_re(self): self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') - def test_process_template_line(self): - # testing all MANIFEST.in template patterns - file_list = FileList() - - # simulated file list - file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt', - join('global', 'one.txt'), - join('global', 'two.txt'), - join('global', 'files.x'), - join('global', 'here.tmp'), - join('f', 'o', 'f.oo'), - join('dir', 'graft-one'), - join('dir', 'dir2', 'graft2'), - join('dir3', 'ok'), - join('dir3', 'sub', 'ok.txt') - ] - - for line in MANIFEST_IN.split('\n'): - if line.strip() == '': - continue - file_list.process_template_line(line) - - wanted = ['ok', 'four.txt', join('global', 'one.txt'), - join('global', 'two.txt'), join('f', 'o', 'f.oo'), - join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')] - - self.assertEquals(file_list.files, wanted) - def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: diff --git a/tests/test_install.py b/tests/test_install.py index 59e90801f2..76fa02acda 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -5,14 +5,12 @@ import sys import unittest import site -import sysconfig -from sysconfig import (get_scheme_names, _CONFIG_VARS, _INSTALL_SCHEMES, - get_config_var, get_path) from test.support import captured_stdout from distutils.command.install import install from distutils.command import install as install_module +from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.errors import DistutilsOptionError @@ -38,23 +36,9 @@ def test_home_installation_scheme(self): build_lib=os.path.join(builddir, "lib"), ) - - - posix_prefix = _INSTALL_SCHEMES['posix_prefix'] - old_posix_prefix = posix_prefix['platinclude'] - posix_prefix['platinclude'] = \ - '{platbase}/include/python{py_version_short}' - - posix_home = _INSTALL_SCHEMES['posix_home'] - old_posix_home = posix_home['platinclude'] - posix_home['platinclude'] = '{base}/include/python' - try: - cmd = install(dist) - cmd.home = destination - cmd.ensure_finalized() - finally: - posix_home['platinclude'] = old_posix_home - posix_prefix['platinclude'] = old_posix_prefix + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() self.assertEqual(cmd.install_base, destination) self.assertEqual(cmd.install_platbase, destination) @@ -79,19 +63,18 @@ def test_user_site(self): return # preparing the environement for the test - self.old_user_base = get_config_var('userbase') - self.old_user_site = get_path('purelib', '%s_user' % os.name) + self.old_user_base = site.USER_BASE + self.old_user_site = site.USER_SITE self.tmpdir = self.mkdtemp() self.user_base = os.path.join(self.tmpdir, 'B') self.user_site = os.path.join(self.tmpdir, 'S') - _CONFIG_VARS['userbase'] = self.user_base - scheme = _INSTALL_SCHEMES['%s_user' % os.name] - scheme['purelib'] = self.user_site + site.USER_BASE = self.user_base + site.USER_SITE = self.user_site + install_module.USER_BASE = self.user_base + install_module.USER_SITE = self.user_site def _expanduser(path): - if path[0] == '~': - path = os.path.normpath(self.tmpdir) + path[1:] - return path + return self.tmpdir self.old_expand = os.path.expanduser os.path.expanduser = _expanduser @@ -99,17 +82,19 @@ def _expanduser(path): # this is the actual test self._test_user_site() finally: - _CONFIG_VARS['userbase'] = self.old_user_base - scheme['purelib'] = self.old_user_site + site.USER_BASE = self.old_user_base + site.USER_SITE = self.old_user_site + install_module.USER_BASE = self.old_user_base + install_module.USER_SITE = self.old_user_site os.path.expanduser = self.old_expand def _test_user_site(self): - schemes = get_scheme_names() - for key in ('nt_user', 'posix_user', 'os2_home'): - self.assertTrue(key in schemes) + for key in ('nt_user', 'unix_user', 'os2_home'): + self.assertTrue(key in INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) + # making sure the user option is there options = [name for name, short, lable in cmd.user_options] @@ -200,7 +185,7 @@ def test_record(self): with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) - def _test_debug_mode(self): + def test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) install_module.DEBUG = True diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 13d27abac0..99a6d90627 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -1,6 +1,6 @@ """Tests for distutils.command.install_data.""" -import os import sys +import os import unittest from distutils.command.install_lib import install_lib @@ -31,7 +31,9 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEquals(cmd.optimize, 2) - def _setup_byte_compile(self): + @unittest.skipUnless(not sys.dont_write_bytecode, + 'byte-compile not supported') + def test_byte_compile(self): pkg_dir, dist = self.create_dist() cmd = install_lib(dist) cmd.compile = cmd.optimize = 1 @@ -39,15 +41,8 @@ def _setup_byte_compile(self): f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - return pkg_dir - - @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not enabled') - def test_byte_compile(self): - pkg_dir = self._setup_byte_compile() - if sys.flags.optimize < 1: - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - else: - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) + self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) def test_get_outputs(self): pkg_dir, dist = self.create_dist() diff --git a/tests/test_register.py b/tests/test_register.py index acda1b1ac1..c03ad10147 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -202,10 +202,10 @@ def test_strict(self): self.assertRaises(DistutilsSetupError, cmd.run) # we don't test the reSt feature if docutils - # is not installed or we our on py3k + # is not installed try: import docutils - except Exception: + except ImportError: return # metadata are OK but long_description is broken diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 9a76eacb65..f95035dfb0 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -3,22 +3,6 @@ import unittest import shutil import zipfile -import tarfile - -# zlib is not used here, but if it's not available -# the tests that use zipfile may fail -try: - import zlib -except ImportError: - zlib = None - -try: - import grp - import pwd - UID_GID_SUPPORT = True -except ImportError: - UID_GID_SUPPORT = False - from os.path import join import sys import tempfile @@ -95,7 +79,6 @@ def _warn(*args): cmd.warn = _warn return dist, cmd - @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -137,7 +120,6 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEquals(len(content), 4) - @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): # check if tar and gzip are installed @@ -174,7 +156,6 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) - @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -236,7 +217,6 @@ def test_add_defaults(self): manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) - @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) @@ -296,57 +276,7 @@ def test_finalize_options(self): cmd.formats = 'supazipa' self.assertRaises(DistutilsOptionError, cmd.finalize_options) - @unittest.skipUnless(zlib, "requires zlib") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") - def test_make_distribution_owner_group(self): - - # check if tar and gzip are installed - if (find_executable('tar') is None or - find_executable('gzip') is None): - return - - # now building a sdist - dist, cmd = self.get_cmd() - - # creating a gztar and specifying the owner+group - cmd.formats = ['gztar'] - cmd.owner = pwd.getpwuid(0)[0] - cmd.group = grp.getgrgid(0)[0] - cmd.ensure_finalized() - cmd.run() - - # making sure we have the good rights - archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') - archive = tarfile.open(archive_name) - try: - for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) - finally: - archive.close() - - # building a sdist again - dist, cmd = self.get_cmd() - - # creating a gztar - cmd.formats = ['gztar'] - cmd.ensure_finalized() - cmd.run() - - # making sure we have the good rights - archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') - archive = tarfile.open(archive_name) - - # note that we are not testing the group ownership here - # because, depending on the platforms and the container - # rights (see #7408) - try: - for member in archive.getmembers(): - self.assertEquals(member.uid, os.getuid()) - finally: - archive.close() - @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 9496950f70..edc755ed15 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -2,9 +2,9 @@ import os import test import unittest -import shutil from distutils import sysconfig +from distutils.ccompiler import get_default_compiler from distutils.tests import support from test.support import TESTFN, run_unittest @@ -26,7 +26,10 @@ def cleanup_testfn(self): elif os.path.isdir(TESTFN): shutil.rmtree(TESTFN) - @support.capture_warnings + def test_get_config_h_filename(self): + config_h = sysconfig.get_config_h_filename() + self.assertTrue(os.path.isfile(config_h), config_h) + def test_get_python_lib(self): lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before @@ -34,11 +37,7 @@ def test_get_python_lib(self): # test for pythonxx.lib? self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) - _sysconfig = __import__('sysconfig') - res = sysconfig.get_python_lib(True, True) - self.assertEquals(_sysconfig.get_path('platstdlib'), res) - @support.capture_warnings def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() # This is not much of a test. We make sure Python.h exists @@ -48,7 +47,31 @@ def test_get_python_inc(self): python_h = os.path.join(inc_dir, "Python.h") self.assertTrue(os.path.isfile(python_h), python_h) - @support.capture_warnings + def test_get_config_vars(self): + cvars = sysconfig.get_config_vars() + self.assertTrue(isinstance(cvars, dict)) + self.assertTrue(cvars) + + def test_customize_compiler(self): + + # not testing if default compiler is not unix + if get_default_compiler() != 'unix': + return + + os.environ['AR'] = 'my_ar' + os.environ['ARFLAGS'] = '-arflags' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + sysconfig.customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + def test_parse_makefile_base(self): self.makefile = TESTFN fd = open(self.makefile, 'w') diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 6976dd55f8..3a41e6fcaa 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,8 +1,8 @@ """Tests for distutils.unixccompiler.""" import sys import unittest -import sysconfig +from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): @@ -114,14 +114,6 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-R/foo') - # AIX C/C++ linker - sys.platform = 'aix' - def gcv(v): - return 'xxx' - sysconfig.get_config_var = gcv - self.assertEqual(self.cc.rpath_foo(), '-blibpath:/foo') - - def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) diff --git a/tests/test_upload.py b/tests/test_upload.py index 979ab228dd..35e970051e 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -2,8 +2,8 @@ import sys import os import unittest +import http.client as httpclient -from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution @@ -38,37 +38,48 @@ [server1] username:me """ +class Response(object): + def __init__(self, status=200, reason='OK'): + self.status = status + self.reason = reason -class FakeOpen(object): +class FakeConnection(object): - def __init__(self, url): - self.url = url - if not isinstance(url, str): - self.req = url - else: - self.req = None - self.msg = 'OK' + def __init__(self): + self.requests = [] + self.headers = [] + self.body = '' - def getcode(self): - return 200 + def __call__(self, netloc): + return self + def connect(self): + pass + endheaders = connect + + def putrequest(self, method, url): + self.requests.append((method, url)) + + def putheader(self, name, value): + self.headers.append((name, value)) + + def send(self, body): + self.body = body + + def getresponse(self): + return Response() class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_open = upload_mod.urlopen - upload_mod.urlopen = self._urlopen - self.last_open = None + self.old_class = httpclient.HTTPConnection + self.conn = httpclient.HTTPConnection = FakeConnection() def tearDown(self): - upload_mod.urlopen = self.old_open + httpclient.HTTPConnection = self.old_class super(uploadTestCase, self).tearDown() - def _urlopen(self, url): - self.last_open = FakeOpen(url) - return self.last_open - def test_finalize_options(self): # new format @@ -113,15 +124,13 @@ def test_upload(self): cmd.run() # what did we send ? - headers = dict(self.last_open.req.headers) + headers = dict(self.conn.headers) self.assertEquals(headers['Content-length'], '2087') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) - self.assertEquals(self.last_open.req.get_method(), 'POST') - self.assertEquals(self.last_open.req.get_full_url(), - 'http://pypi.python.org/pypi') - self.assertTrue(b'xxx' in self.last_open.req.data) - auth = self.last_open.req.headers['Authorization'] - self.assertFalse('\n' in auth) + self.assertFalse('\n' in headers['Authorization']) + + self.assertEquals(self.conn.requests, [('POST', '/pypi')]) + self.assert_((b'xxx') in self.conn.body) def test_suite(): return unittest.makeSuite(uploadTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 896e1e07df..0c732f8244 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -3,33 +3,15 @@ import sys import unittest from copy import copy -from io import BytesIO -import subprocess -from sysconfig import get_config_vars, get_platform from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError -from distutils.util import (convert_path, change_root, +from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape, get_compiler_versions, - _find_exe_version, _MAC_OS_X_LD_VERSION, - byte_compile) -from distutils import util + rfc822_escape, byte_compile) +from distutils import util # used to patch _environ_checked +from distutils.sysconfig import get_config_vars +from distutils import sysconfig from distutils.tests import support -from distutils.version import LooseVersion - -class FakePopen(object): - test_class = None - def __init__(self, cmd, shell, stdout, stderr): - self.cmd = cmd.split()[0] - exes = self.test_class._exes - if self.cmd not in exes: - # we don't want to call the system, returning an empty - # output so it doesn't match - self.stdout = BytesIO() - self.stderr = BytesIO() - else: - self.stdout = BytesIO(exes[self.cmd]) - self.stderr = BytesIO() class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -43,7 +25,7 @@ def setUp(self): self.join = os.path.join self.isabs = os.path.isabs self.splitdrive = os.path.splitdrive - #self._config_vars = copy(sysconfig._config_vars) + self._config_vars = copy(sysconfig._config_vars) # patching os.uname if hasattr(os, 'uname'): @@ -52,17 +34,8 @@ def setUp(self): else: self.uname = None self._uname = None - os.uname = self._get_uname - # patching POpen - self.old_find_executable = util.find_executable - util.find_executable = self._find_executable - self._exes = {} - self.old_popen = subprocess.Popen - self.old_stdout = sys.stdout - self.old_stderr = sys.stderr - FakePopen.test_class = self - subprocess.Popen = FakePopen + os.uname = self._get_uname def tearDown(self): # getting back the environment @@ -77,11 +50,7 @@ def tearDown(self): os.uname = self.uname else: del os.uname - #sysconfig._config_vars = copy(self._config_vars) - util.find_executable = self.old_find_executable - subprocess.Popen = self.old_popen - sys.old_stdout = self.old_stdout - sys.old_stderr = self.old_stderr + sysconfig._config_vars = copy(self._config_vars) super(UtilTestCase, self).tearDown() def _set_uname(self, uname): @@ -91,11 +60,103 @@ def _get_uname(self): return self._uname def test_get_platform(self): - platform = util.get_platform() - self.assertEquals(platform, get_platform()) - util.set_platform('MyOwnPlatform') - self.assertEquals('MyOwnPlatform', util.get_platform()) - util.set_platform(platform) + + # windows XP, 32bits + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Intel)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win32') + + # windows XP, amd64 + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Amd64)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-amd64') + + # windows XP, itanium + os.name = 'nt' + sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' + '[MSC v.1310 32 bit (Itanium)]') + sys.platform = 'win32' + self.assertEquals(get_platform(), 'win-ia64') + + # macbook + os.name = 'posix' + sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' + '\n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]') + sys.platform = 'darwin' + self._set_uname(('Darwin', 'macziade', '8.11.1', + ('Darwin Kernel Version 8.11.1: ' + 'Wed Oct 10 18:23:28 PDT 2007; ' + 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + + get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' + '-fwrapv -O3 -Wall -Wstrict-prototypes') + + cursize = sys.maxsize + sys.maxsize = (2 ** 31)-1 + try: + self.assertEquals(get_platform(), 'macosx-10.3-i386') + finally: + sys.maxsize = cursize + + # macbook with fat binaries (fat, universal or fat64) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-universal') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + + self.assertEquals(get_platform(), 'macosx-10.4-fat64') + + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + + # linux debian sarge + os.name = 'posix' + sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' + '\n[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]') + sys.platform = 'linux2' + self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', + '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) + + self.assertEquals(get_platform(), 'linux-i686') + + # XXX more platforms to tests here def test_convert_path(self): # linux/mac @@ -199,70 +260,6 @@ def test_rfc822_escape(self): 'header%(8s)s') % {'8s': '\n'+8*' '} self.assertEquals(res, wanted) - def test_find_exe_version(self): - # the ld version scheme under MAC OS is: - # ^@(#)PROGRAM:ld PROJECT:ld64-VERSION - # - # where VERSION is a 2-digit number for major - # revisions. For instance under Leopard, it's - # currently 77 - # - # Dots are used when branching is done. - # - # The SnowLeopard ld64 is currently 95.2.12 - - for output, version in ((b'@(#)PROGRAM:ld PROJECT:ld64-77', '77'), - (b'@(#)PROGRAM:ld PROJECT:ld64-95.2.12', - '95.2.12')): - result = _MAC_OS_X_LD_VERSION.search(output) - self.assertEquals(result.group(1).decode(), version) - - def _find_executable(self, name): - if name in self._exes: - return name - return None - - def test_get_compiler_versions(self): - # get_versions calls distutils.spawn.find_executable on - # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_compiler_versions(), (None, None, None)) - - # Let's fake we have 'gcc' and it returns '3.4.5' - self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' - res = get_compiler_versions() - self.assertEquals(str(res[0]), '3.4.5') - - # and let's see what happens when the version - # doesn't match the regular expression - # (\d+\.\d+(\.\d+)*) - self._exes['gcc'] = b'very strange output' - res = get_compiler_versions() - self.assertEquals(res[0], None) - - # same thing for ld - if sys.platform != 'darwin': - self._exes['ld'] = b'GNU ld version 2.17.50 20060824' - res = get_compiler_versions() - self.assertEquals(str(res[1]), '2.17.50') - self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_compiler_versions() - self.assertEquals(res[1], None) - else: - self._exes['ld'] = b'GNU ld version 2.17.50 20060824' - res = get_compiler_versions() - self.assertEquals(res[1], None) - self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' - res = get_compiler_versions() - self.assertEquals(str(res[1]), '77') - - # and dllwrap - self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' - res = get_compiler_versions() - self.assertEquals(str(res[2]), '2.17.50') - self._exes['dllwrap'] = b'Cheese Wrap' - res = get_compiler_versions() - self.assertEquals(res[2], None) - def test_dont_write_bytecode(self): # makes sure byte_compile raise a DistutilsError # if sys.dont_write_bytecode is True diff --git a/text_file.py b/text_file.py index 53c8561a3e..97459fbf73 100644 --- a/text_file.py +++ b/text_file.py @@ -6,8 +6,8 @@ __revision__ = "$Id$" -import sys -import io +import sys, os, io + class TextFile: """Provides a file-like object that takes care of all the things you diff --git a/unixccompiler.py b/unixccompiler.py index 081790827d..bf73416154 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -17,6 +17,7 @@ import os, sys, re +from distutils import sysconfig from distutils.dep_util import newer from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options @@ -24,7 +25,6 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log - # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -74,7 +74,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if 'ARCHFLAGS' in os.environ and not stripArch: # User specified different -arch flags in the environ, - # see also the sysconfig + # see also distutils.sysconfig compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() if stripSysroot: @@ -281,9 +281,7 @@ def runtime_library_dir_option(self, dir): # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. - _sysconfig = __import__('sysconfig') - - compiler = os.path.basename(_sysconfig.get_config_var("CC")) + compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir @@ -293,24 +291,23 @@ def runtime_library_dir_option(self, dir): return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif self._is_gcc(compiler): - # gcc on non-GNU systems does not need -Wl, but can - # use it anyway. Since distutils has always passed in - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if _sysconfig.get_config_var("GNULD") == "yes": - # GNU ld needs an extra option to get a RUNPATH - # instead of just an RPATH. - return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir - elif sys.platform[:3] == "aix": - return "-blibpath:" + dir else: - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. - return "-R" + dir + if self._is_gcc(compiler): + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir + else: + return "-Wl,-R" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib @@ -324,8 +321,7 @@ def find_library_file(self, dirs, lib, debug=0): # On OSX users can specify an alternate SDK using # '-isysroot', calculate the SDK root if it is specified # (and use it further on) - _sysconfig = __import__('sysconfig') - cflags = _sysconfig.get_config_var('CFLAGS') + cflags = sysconfig.get_config_var('CFLAGS') m = re.search(r'-isysroot\s+(\S+)', cflags) if m is None: sysroot = '/' diff --git a/util.py b/util.py index c8bf0064cd..8175434586 100644 --- a/util.py +++ b/util.py @@ -7,40 +7,182 @@ __revision__ = "$Id$" import sys, os, string, re - from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer -from distutils.spawn import spawn, find_executable +from distutils.spawn import spawn from distutils import log -from distutils.version import LooseVersion from distutils.errors import DistutilsByteCompileError -_sysconfig = __import__('sysconfig') -_PLATFORM = None +def get_platform (): + """Return a string that identifies the current platform. This is used + mainly to distinguish platform-specific build directories and + platform-specific built distributions. Typically includes the OS name + and version and the architecture (as supplied by 'os.uname()'), + although the exact information included depends on the OS; eg. for IRIX + the architecture isn't particularly important (IRIX only runs on SGI + hardware), but for Linux the kernel version isn't particularly + important. + + Examples of returned values: + linux-i586 + linux-alpha (?) + solaris-2.6-sun4u + irix-5.3 + irix64-6.2 + + Windows will return one of: + win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) + win-ia64 (64bit Windows on Itanium) + win32 (all others - specifically, sys.platform is returned) + + For other non-POSIX platforms, currently just returns 'sys.platform'. + """ + if os.name == 'nt': + # sniff sys.version for architecture. + prefix = " bit (" + i = sys.version.find(prefix) + if i == -1: + return sys.platform + j = sys.version.find(")", i) + look = sys.version[i+len(prefix):j].lower() + if look == 'amd64': + return 'win-amd64' + if look == 'itanium': + return 'win-ia64' + return sys.platform + + if os.name != "posix" or not hasattr(os, 'uname'): + # XXX what about the architecture? NT is Intel or Alpha, + # Mac OS is M68k or PPC, etc. + return sys.platform + + # Try to distinguish various flavours of Unix + + (osname, host, release, version, machine) = os.uname() + + # Convert the OS name to lowercase, remove '/' characters + # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") + osname = osname.lower().replace('/', '') + machine = machine.replace(' ', '_') + machine = machine.replace('/', '-') + + if osname[:5] == "linux": + # At least on Linux/Intel, 'machine' is the processor -- + # i386, etc. + # XXX what about Alpha, SPARC, etc? + return "%s-%s" % (osname, machine) + elif osname[:5] == "sunos": + if release[0] >= "5": # SunOS 5 == Solaris 2 + osname = "solaris" + release = "%d.%s" % (int(release[0]) - 3, release[2:]) + # fall through to standard osname-release-machine representation + elif osname[:4] == "irix": # could be "irix64"! + return "%s-%s" % (osname, release) + elif osname[:3] == "aix": + return "%s-%s.%s" % (osname, version, release) + elif osname[:6] == "cygwin": + osname = "cygwin" + rel_re = re.compile (r'[\d.]+', re.ASCII) + m = rel_re.match(release) + if m: + release = m.group() + elif osname[:6] == "darwin": + # + # For our purposes, we'll assume that the system version from + # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set + # to. This makes the compatibility story a bit more sane because the + # machine is going to compile and link as if it were + # MACOSX_DEPLOYMENT_TARGET. + from distutils.sysconfig import get_config_vars + cfgvars = get_config_vars() + + macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') + if not macver: + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + + if 1: + # Always calculate the release of the running machine, + # needed to determine if we can build fat binaries or not. + + macrelease = macver + # Get the system version. Reading this plist is a documented + # way to get the system version (see the documentation for + # the Gestalt Manager) + try: + f = open('/System/Library/CoreServices/SystemVersion.plist') + except IOError: + # We're on a plain darwin box, fall back to the default + # behaviour. + pass + else: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + f.close() + if m is not None: + macrelease = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + + if not macver: + macver = macrelease + + if macver: + from distutils.sysconfig import get_config_vars + release = macver + osname = "macosx" + + if (macrelease + '.') >= '10.4.' and \ + '-arch' in get_config_vars().get('CFLAGS', '').strip(): + # The universal build will build fat binaries, but not on + # systems before 10.4 + # + # Try to detect 4-way universal builds, those have machine-type + # 'universal' instead of 'fat'. + + machine = 'fat' + cflags = get_config_vars().get('CFLAGS') + + archs = re.findall('-arch\s+(\S+)', cflags) + archs = tuple(sorted(set(archs))) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) -def get_platform(): - """Return a string that identifies the current platform. + elif machine == 'i386': + # On OSX the machine type returned by uname is always the + # 32-bit variant, even if the executable architecture is + # the 64-bit variant + if sys.maxsize >= 2**32: + machine = 'x86_64' - By default, will return the value returned by sysconfig.get_platform(), - but it can be changed by calling set_platform(). - """ - global _PLATFORM - if _PLATFORM is None: - _PLATFORM = _sysconfig.get_platform() - return _PLATFORM + elif machine in ('PowerPC', 'Power_Macintosh'): + # Pick a sane name for the PPC architecture. + machine = 'ppc' -def set_platform(identifier): - """Sets the platform string identifier returned by get_platform(). + # See 'i386' case + if sys.maxsize >= 2**32: + machine = 'ppc64' - Note that this change doesn't impact the value returned by - sysconfig.get_platform() and is local to Distutils - """ - global _PLATFORM - _PLATFORM = identifier + return "%s-%s-%s" % (osname, release, machine) + +# get_platform () -def convert_path(pathname): - """Return 'pathname' as a name that will work on the native filesystem. +def convert_path (pathname): + """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local @@ -64,12 +206,12 @@ def convert_path(pathname): return os.curdir return os.path.join(*paths) +# convert_path () -def change_root(new_root, pathname): - """Return 'pathname' with 'new_root' prepended. - If 'pathname' is relative, this is equivalent to - "os.path.join(new_root,pathname)". +def change_root (new_root, pathname): + """Return 'pathname' with 'new_root' prepended. If 'pathname' is + relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ @@ -91,16 +233,23 @@ def change_root(new_root, pathname): path = path[1:] return os.path.join(new_root, path) - else: - raise DistutilsPlatformError("nothing known about " - "platform '%s'" % os.name) + elif os.name == 'mac': + if not os.path.isabs(pathname): + return os.path.join(new_root, pathname) + else: + # Chop off volume name from start of path + elements = pathname.split(":", 1) + pathname = ":" + elements[1] + return os.path.join(new_root, pathname) -_environ_checked = 0 + else: + raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) -def check_environ(): - """Ensure that 'os.environ' has all the environment variables needed. - We guarantee that users can use in config files, command-line options, +_environ_checked = 0 +def check_environ (): + """Ensure that 'os.environ' has all the environment variables we + guarantee that users can use in config files, command-line options, etc. Currently this includes: HOME - user's home directory (Unix only) PLAT - description of the current platform, including hardware @@ -115,14 +264,14 @@ def check_environ(): os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] if 'PLAT' not in os.environ: - os.environ['PLAT'] = _sysconfig.get_platform() + os.environ['PLAT'] = get_platform() _environ_checked = 1 -def subst_vars(s, local_vars): - """Perform shell/Perl-style variable substitution on 'string'. - Every occurrence of '$' followed by a name is considered a variable, and +def subst_vars (s, local_vars): + """Perform shell/Perl-style variable substitution on 'string'. Every + occurrence of '$' followed by a name is considered a variable, and variable is substituted by the value found in the 'local_vars' dictionary, or in 'os.environ' if it's not in 'local_vars'. 'os.environ' is first checked/augmented to guarantee that it contains @@ -142,11 +291,12 @@ def _subst (match, local_vars=local_vars): except KeyError as var: raise ValueError("invalid variable '$%s'" % var) -def grok_environment_error(exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError. +# subst_vars () - This will generate an IOError or an OSError exception object. - Handles Python 1.5.1 and 1.5.2 styles, and + +def grok_environment_error (exc, prefix="error: "): + """Generate a useful error message from an EnvironmentError (IOError or + OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string @@ -165,20 +315,18 @@ def grok_environment_error(exc, prefix="error: "): return error + # Needed by 'split_quoted()' _wordchars_re = _squote_re = _dquote_re = None - def _init_regex(): global _wordchars_re, _squote_re, _dquote_re _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace) _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'") _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"') -def split_quoted(s): +def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and - backslashes. - - In short: words are delimited by spaces, as long as those + backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character @@ -186,6 +334,7 @@ def split_quoted(s): characters are stripped from any quoted string. Returns a list of words. """ + # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... @@ -233,12 +382,13 @@ def split_quoted(s): return words +# split_quoted () -def execute(func, args, msg=None, verbose=0, dry_run=0): - """Perform some action that affects the outside world. - eg. by writing to the filesystem). Such actions are special because - they are disabled by the 'dry_run' flag. This method takes care of all +def execute (func, args, msg=None, verbose=0, dry_run=0): + """Perform some action that affects the outside world (eg. by + writing to the filesystem). Such actions are special because they + are disabled by the 'dry_run' flag. This method takes care of all that bureaucracy for you; all you have to do is supply the function to call and an argument tuple for it (to embody the "external action" being performed), and an optional message to @@ -254,7 +404,7 @@ def execute(func, args, msg=None, verbose=0, dry_run=0): func(*args) -def strtobool(val): +def strtobool (val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values @@ -270,13 +420,15 @@ def strtobool(val): raise ValueError("invalid truth value %r" % (val,)) -def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, - verbose=1, dry_run=0, direct=None): +def byte_compile (py_files, + optimize=0, force=0, + prefix=None, base_dir=None, + verbose=1, dry_run=0, + direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. - - 'py_files' is a list of files to compile; any files that don't end in - ".py" are silently skipped. 'optimize' must be one of the following: + or .pyo files in the same directory. 'py_files' is a list of files + to compile; any files that don't end in ".py" are silently skipped. + 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") @@ -392,8 +544,8 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, dfile = file if prefix: if file[:len(prefix)] != prefix: - raise ValueError("invalid prefix: filename %r doesn't " - "start with %r" % (file, prefix)) + raise ValueError("invalid prefix: filename %r doesn't start with %r" + % (file, prefix)) dfile = dfile[len(prefix):] if base_dir: dfile = os.path.join(base_dir, dfile) @@ -408,8 +560,9 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, log.debug("skipping byte-compilation of %s to %s", file, cfile_base) +# byte_compile () -def rfc822_escape(header): +def rfc822_escape (header): """Return a version of the string escaped for inclusion in an RFC-822 header, by ensuring there are 8 spaces space after each newline. """ @@ -417,56 +570,6 @@ def rfc822_escape(header): sep = '\n' + 8 * ' ' return sep.join(lines) -_RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') -_MAC_OS_X_LD_VERSION = re.compile(b'^@\(#\)PROGRAM:ld PROJECT:ld64-((\d+)(\.\d+)*)') - -def _find_ld_version(): - """Finds the ld version. The version scheme differs under Mac OSX.""" - if sys.platform == 'darwin': - return _find_exe_version('ld -v', _MAC_OS_X_LD_VERSION) - else: - return _find_exe_version('ld -v') - -def _find_exe_version(cmd, pattern=_RE_VERSION): - """Find the version of an executable by running `cmd` in the shell. - - `pattern` is a compiled regular expression. If not provided, default - to _RE_VERSION. If the command is not found, or the output does not - match the mattern, returns None. - """ - from subprocess import Popen, PIPE - executable = cmd.split()[0] - if find_executable(executable) is None: - return None - pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) - try: - stdout, stderr = pipe.stdout.read(), pipe.stderr.read() - finally: - pipe.stdout.close() - pipe.stderr.close() - # some commands like ld under MacOS X, will give the - # output in the stderr, rather than stdout. - if stdout != b'': - out_string = stdout - else: - out_string = stderr - - result = pattern.search(out_string) - if result is None: - return None - return LooseVersion(result.group(1).decode()) - -def get_compiler_versions(): - """Returns a tuple providing the versions of gcc, ld and dllwrap - - For each command, if a command is not found, None is returned. - Otherwise a LooseVersion instance is returned. - """ - gcc = _find_exe_version('gcc -dumpversion') - ld = _find_ld_version() - dllwrap = _find_exe_version('dllwrap --version') - return gcc, ld, dllwrap - # 2to3 support def run_2to3(files, fixer_names=None, options=None, explicit=None): From 575e9faa64b8e84e15de1124de71c3471b966327 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Fri, 23 Jul 2010 09:43:17 +0000 Subject: [PATCH 3008/8469] Ensure that the Makefile variable expansion in distutils.sysconfig matches that in the toplevel sysconfig module. Without this patch universal builds on OSX are broken. Als add a test that checks that the two version of get_config_vars agree on important values. --- sysconfig.py | 23 +++++++++++++++++++++++ tests/test_sysconfig.py | 9 +++++++++ 2 files changed, 32 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 0fbd5412bc..48f3fe4d59 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -300,6 +300,12 @@ def parse_makefile(fn, g=None): else: done[n] = v + # Variables with a 'PY_' prefix in the makefile. These need to + # be made available without that prefix through sysconfig. + # Special care is needed to ensure that variable expansion works, even + # if the expansion uses the name without a prefix. + renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') + # do variable interpolation here while notdone: for name in list(notdone): @@ -316,6 +322,16 @@ def parse_makefile(fn, g=None): elif n in os.environ: # do it like make: fall back to environment item = os.environ[n] + + elif n in renamed_variables: + if name.startswith('PY_') and name[3:] in renamed_variables: + item = "" + + elif 'PY_' + n in notdone: + found = False + + else: + item = str(done['PY_' + n]) else: done[n] = item = "" if found: @@ -330,6 +346,13 @@ def parse_makefile(fn, g=None): else: done[name] = value del notdone[name] + + if name.startswith('PY_') \ + and name[3:] in renamed_variables: + + name = name[3:] + if name not in done: + done[name] = value else: # bogus variable reference; just drop it since we can't deal del notdone[name] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index edc755ed15..0167e0f1a3 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -93,6 +93,15 @@ def test_parse_makefile_literal_dollar(self): 'OTHER': 'foo'}) + def test_sysconfig_module(self): + import sysconfig as global_sysconfig + self.assertEquals(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) + self.assertEquals(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) + self.assertEquals(global_sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('LDSHARED')) + self.assertEquals(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) + + + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(SysconfigTestCase)) From fadd3a199f2c99ef0fb5d58e78016274cad6cc20 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Sat, 24 Jul 2010 12:55:44 +0100 Subject: [PATCH 3009/8469] Importing url2pathname from the correct place, so 2to3 can do it's job. --HG-- branch : distribute extra : rebase_source : 43178821d2b4776dbfdf5ad9493bca8dc401b048 --- setuptools/package_index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1d467f7861..1f9b6bd849 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,5 @@ """PyPI and direct package downloading""" -import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO +import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO import httplib from pkg_resources import * from distutils import log @@ -642,7 +642,7 @@ def _download_url(self, scheme, url, tmpdir): if scheme=='svn' or scheme.startswith('svn+'): return self._download_svn(url, filename) elif scheme=='file': - return urllib2.url2pathname(urlparse.urlparse(url)[2]) + return urllib.url2pathname(urlparse.urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) @@ -791,7 +791,7 @@ def fix_sf_url(url): def local_open(url): """Read a local path, with special support for directories""" scheme, server, path, param, query, frag = urlparse.urlparse(url) - filename = urllib2.url2pathname(path) + filename = urllib.url2pathname(path) if os.path.isfile(filename): return urllib2.urlopen(url) elif path.endswith('/') and os.path.isdir(filename): From 35b06106c2c50e0d0709f2e75be4bc8fe56aef34 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Sat, 24 Jul 2010 14:56:42 +0100 Subject: [PATCH 3010/8469] Only do the decoding if there is something to decode. --HG-- branch : distribute extra : rebase_source : 6510b361ce8885f536a3babfc66a7ebdfaa25b2d --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1f9b6bd849..4ff963030f 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -199,7 +199,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() - if sys.version_info >= (3,): + if sys.version_info >= (3,) and not isinstance(f, urllib2.HTTPError): charset = f.headers.get_param('charset') or 'latin-1' page = page.decode(charset, "ignore") f.close() From 022d6c31d81f8d4f42776503786dbfa486417322 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 31 Jul 2010 08:56:11 +0000 Subject: [PATCH 3011/8469] Bump versions and review NEWS file. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 18b02fc629..7b2227916a 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2a0" +__version__ = "3.2a1" #--end constants-- From b9efa362d457b32845e11e0e03f377472112c0f1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 31 Jul 2010 21:54:24 +0000 Subject: [PATCH 3012/8469] #8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3). --- command/sdist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index bb2106120a..f51d72fad7 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -240,8 +240,7 @@ def add_defaults(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) - if files: - self.filelist.extend(files) + self.filelist.extend(files) # build_py is used to get: # - python modules From dd1e83e827cd6658e31699039aae197149e4557e Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Sun, 1 Aug 2010 01:53:52 +0000 Subject: [PATCH 3013/8469] Merged revisions 75659 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk Only the try/except was backported; owner and group were added in 2.7, as was the test file. ........ r75659 | tarek.ziade | 2009-10-24 09:29:44 -0400 (Sat, 24 Oct 2009) | 1 line #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd ........ --- archive_util.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/archive_util.py b/archive_util.py index 264e66faf2..251c0df4e9 100644 --- a/archive_util.py +++ b/archive_util.py @@ -162,9 +162,12 @@ def make_archive (base_name, format, kwargs[arg] = val filename = apply(func, (base_name, base_dir), kwargs) - if root_dir is not None: - log.debug("changing back to '%s'", save_cwd) - os.chdir(save_cwd) + try: + filename = func(base_name, base_dir, **kwargs) + finally: + if root_dir is not None: + log.debug("changing back to '%s'", save_cwd) + os.chdir(save_cwd) return filename From f5fa4f4f916ef28498df9c9cb54fb3f563d824bd Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 1 Aug 2010 19:07:28 +0000 Subject: [PATCH 3014/8469] Merged revisions 83371,83390 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r83371 | georg.brandl | 2010-07-31 23:54:24 +0200 (Sa, 31 Jul 2010) | 1 line #8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3). ........ r83390 | georg.brandl | 2010-08-01 10:07:49 +0200 (So, 01 Aug 2010) | 1 line #8230: make Lib/test/sortperf.py run on Python 3. ........ --- command/sdist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index bb2106120a..f51d72fad7 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -240,8 +240,7 @@ def add_defaults(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) - if files: - self.filelist.extend(files) + self.filelist.extend(files) # build_py is used to get: # - python modules From 8e471803385c10cd1f4f98d669826eb388cc6476 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 2 Aug 2010 19:16:34 +0000 Subject: [PATCH 3015/8469] #7973: Fix distutils options spelling. --- command/bdist_msi.py | 2 +- command/bdist_wininst.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index c4be47b579..8a458d8536 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -148,7 +148,7 @@ def finalize_options(self): if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError( - "target version can only be %s, or the '--skip_build'" + "target version can only be %s, or the '--skip-build'" " option must be specified" % (short_version,)) else: self.versions = list(self.all_versions) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d6d01c630d..3aa1dac7f3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -89,7 +89,7 @@ def finalize_options(self): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError( - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,)) self.target_version = short_version From df831fea4bc33d771c8e6a1fb72533f71d7c2464 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 2 Aug 2010 20:26:41 +0000 Subject: [PATCH 3016/8469] Merged revisions 79558 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79558 | florent.xicluna | 2010-04-01 21:17:09 +0300 (Thu, 01 Apr 2010) | 2 lines #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote. ........ --- command/build_ext.py | 2 +- util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8248089fec..aeb6b744dc 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -676,7 +676,7 @@ def get_ext_filename(self, ext_name): # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext + return os.path.join(*ext_path) + '_d' + so_ext return os.path.join(*ext_path) + so_ext def get_export_symbols (self, ext): diff --git a/util.py b/util.py index c4a8711d08..90f68d8208 100644 --- a/util.py +++ b/util.py @@ -205,7 +205,7 @@ def convert_path (pathname): paths.remove('.') if not paths: return os.curdir - return apply(os.path.join, paths) + return os.path.join(*paths) # convert_path () From 5a5a41af466e35970c94b0ab039d62f68581de05 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Mon, 2 Aug 2010 21:35:06 +0000 Subject: [PATCH 3017/8469] Merged revisions 78757 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78757 | florent.xicluna | 2010-03-07 14:14:25 +0200 (Sun, 07 Mar 2010) | 2 lines Fix some py3k warnings in the standard library. ........ --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index 90f68d8208..e92bef1b5f 100644 --- a/util.py +++ b/util.py @@ -405,7 +405,7 @@ def execute (func, args, msg=None, verbose=0, dry_run=0): log.info(msg) if not dry_run: - apply(func, args) + func(*args) def strtobool (val): From 231e1cc9526df4a63a21c09b41015b05d98cd7f9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 2 Aug 2010 21:44:25 +0000 Subject: [PATCH 3018/8469] Merged revisions 83536,83546-83548,83550,83554-83555,83558,83563,83565,83571,83574-83575 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83536 | georg.brandl | 2010-08-02 19:49:25 +0200 (Mo, 02 Aug 2010) | 1 line #8578: mention danger of not incref'ing weak referenced object. ........ r83546 | georg.brandl | 2010-08-02 21:16:34 +0200 (Mo, 02 Aug 2010) | 1 line #7973: Fix distutils options spelling. ........ r83547 | georg.brandl | 2010-08-02 21:19:26 +0200 (Mo, 02 Aug 2010) | 1 line #7386: add example that shows that trailing path separators are stripped. ........ r83548 | georg.brandl | 2010-08-02 21:23:34 +0200 (Mo, 02 Aug 2010) | 1 line #8172: how does one use a property? ........ r83550 | georg.brandl | 2010-08-02 21:32:43 +0200 (Mo, 02 Aug 2010) | 1 line #9451: strengthen warning about __*__ special name usage. ........ r83554 | georg.brandl | 2010-08-02 21:43:05 +0200 (Mo, 02 Aug 2010) | 1 line #7280: note about nasmw.exe. ........ r83555 | georg.brandl | 2010-08-02 21:44:48 +0200 (Mo, 02 Aug 2010) | 1 line #8861: remove unused variable. ........ r83558 | georg.brandl | 2010-08-02 22:05:19 +0200 (Mo, 02 Aug 2010) | 1 line #8648: document UTF-7 codec functions. ........ r83563 | georg.brandl | 2010-08-02 22:21:21 +0200 (Mo, 02 Aug 2010) | 1 line #9037: add example how to raise custom exceptions from C code. ........ r83565 | georg.brandl | 2010-08-02 22:27:20 +0200 (Mo, 02 Aug 2010) | 1 line #9111: document that do_help() looks at docstrings. ........ r83571 | georg.brandl | 2010-08-02 22:44:34 +0200 (Mo, 02 Aug 2010) | 1 line Clarify that abs() is not a namespace. ........ r83574 | georg.brandl | 2010-08-02 22:47:56 +0200 (Mo, 02 Aug 2010) | 1 line #6867: epoll.register() returns None. ........ r83575 | georg.brandl | 2010-08-02 22:52:10 +0200 (Mo, 02 Aug 2010) | 1 line #9238: zipfile does handle archive comments. ........ --- command/bdist_msi.py | 2 +- command/bdist_wininst.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 72578498f7..ded837d752 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -148,7 +148,7 @@ def finalize_options (self): if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError, \ - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,) else: self.versions = list(self.all_versions) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 88c0532f81..a31a5f7bac 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -95,7 +95,7 @@ def finalize_options (self): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,) self.target_version = short_version From 59c26754fc99abfc3cf85a7b435eb0ec14333812 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 2 Aug 2010 21:45:43 +0000 Subject: [PATCH 3019/8469] Merged revisions 83593 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/release27-maint ................ r83593 | georg.brandl | 2010-08-02 23:44:25 +0200 (Mo, 02 Aug 2010) | 57 lines Merged revisions 83536,83546-83548,83550,83554-83555,83558,83563,83565,83571,83574-83575 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83536 | georg.brandl | 2010-08-02 19:49:25 +0200 (Mo, 02 Aug 2010) | 1 line #8578: mention danger of not incref'ing weak referenced object. ........ r83546 | georg.brandl | 2010-08-02 21:16:34 +0200 (Mo, 02 Aug 2010) | 1 line #7973: Fix distutils options spelling. ........ r83547 | georg.brandl | 2010-08-02 21:19:26 +0200 (Mo, 02 Aug 2010) | 1 line #7386: add example that shows that trailing path separators are stripped. ........ r83548 | georg.brandl | 2010-08-02 21:23:34 +0200 (Mo, 02 Aug 2010) | 1 line #8172: how does one use a property? ........ r83550 | georg.brandl | 2010-08-02 21:32:43 +0200 (Mo, 02 Aug 2010) | 1 line #9451: strengthen warning about __*__ special name usage. ........ r83554 | georg.brandl | 2010-08-02 21:43:05 +0200 (Mo, 02 Aug 2010) | 1 line #7280: note about nasmw.exe. ........ r83555 | georg.brandl | 2010-08-02 21:44:48 +0200 (Mo, 02 Aug 2010) | 1 line #8861: remove unused variable. ........ r83558 | georg.brandl | 2010-08-02 22:05:19 +0200 (Mo, 02 Aug 2010) | 1 line #8648: document UTF-7 codec functions. ........ r83563 | georg.brandl | 2010-08-02 22:21:21 +0200 (Mo, 02 Aug 2010) | 1 line #9037: add example how to raise custom exceptions from C code. ........ r83565 | georg.brandl | 2010-08-02 22:27:20 +0200 (Mo, 02 Aug 2010) | 1 line #9111: document that do_help() looks at docstrings. ........ r83571 | georg.brandl | 2010-08-02 22:44:34 +0200 (Mo, 02 Aug 2010) | 1 line Clarify that abs() is not a namespace. ........ r83574 | georg.brandl | 2010-08-02 22:47:56 +0200 (Mo, 02 Aug 2010) | 1 line #6867: epoll.register() returns None. ........ r83575 | georg.brandl | 2010-08-02 22:52:10 +0200 (Mo, 02 Aug 2010) | 1 line #9238: zipfile does handle archive comments. ........ ................ --- command/bdist_msi.py | 2 +- command/bdist_wininst.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index da0b30d864..42271c4df3 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -138,7 +138,7 @@ def finalize_options (self): if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError, \ - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,) else: self.target_version = short_version diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d153e2bc38..128e1992cb 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -93,7 +93,7 @@ def finalize_options (self): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,) self.target_version = short_version From 95fbccaf635ace75fe1838449f512c46dd5b2e49 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 3 Aug 2010 07:51:50 +0000 Subject: [PATCH 3020/8469] Merged revisions 79191 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79191 | florent.xicluna | 2010-03-21 13:50:17 +0200 (Sun, 21 Mar 2010) | 3 lines No more deprecation warnings for distutils.sysconfig, following r78666. But when the "dl" module is available, it gives a py3k deprecation warning. ........ --- archive_util.py | 2 +- command/build_py.py | 4 ++-- dir_util.py | 2 +- filelist.py | 2 +- tests/test_build_ext.py | 5 +++++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/archive_util.py b/archive_util.py index 251c0df4e9..782d4ef96c 100644 --- a/archive_util.py +++ b/archive_util.py @@ -160,7 +160,7 @@ def make_archive (base_name, format, func = format_info[0] for (arg,val) in format_info[1]: kwargs[arg] = val - filename = apply(func, (base_name, base_dir), kwargs) + filename = func(base_name, base_dir, **kwargs) try: filename = func(base_name, base_dir, **kwargs) diff --git a/command/build_py.py b/command/build_py.py index 708ef0f38f..9f8a759a74 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -157,7 +157,7 @@ def get_package_dir (self, package): if not self.package_dir: if path: - return apply(os.path.join, path) + return os.path.join(*path) else: return '' else: @@ -184,7 +184,7 @@ def get_package_dir (self, package): tail.insert(0, pdir) if tail: - return apply(os.path.join, tail) + return os.path.join(*tail) else: return '' diff --git a/dir_util.py b/dir_util.py index 77f253255f..92f49346f7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -204,7 +204,7 @@ def remove_tree (directory, verbose=0, dry_run=0): _build_cmdtuple(directory, cmdtuples) for cmd in cmdtuples: try: - apply(cmd[0], (cmd[1],)) + cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) if abspath in _path_created: diff --git a/filelist.py b/filelist.py index 88b33c7c94..4448d5c5a0 100644 --- a/filelist.py +++ b/filelist.py @@ -68,7 +68,7 @@ def sort (self): sortable_files.sort() self.files = [] for sort_tuple in sortable_files: - self.files.append(apply(os.path.join, sort_tuple)) + self.files.append(os.path.join(*sort_tuple)) # -- Other miscellaneous utility methods --------------------------- diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5ecfe15bff..1ed9d04b99 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -349,6 +349,11 @@ def test_build_ext_inplace(self): self.assertEquals(wanted, path) def test_setuptools_compat(self): + try: + # on some platforms, it loads the deprecated "dl" module + test_support.import_module('setuptools_build_ext', deprecated=True) + except test_support.TestSkipped: + return from setuptools_build_ext import build_ext as setuptools_build_ext from setuptools_extension import Extension From 60f0fc889114642ceeba5b3d812c705ea4b97de9 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Tue, 3 Aug 2010 21:18:06 +0000 Subject: [PATCH 3021/8469] - Issue #8447: Make distutils.sysconfig follow symlinks in the path to the interpreter executable. This fixes a failure of test_httpservers on OS X. --- sysconfig.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index bb53315bca..46d23ecc78 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -25,7 +25,7 @@ # Path to the base directory of the project. On Windows the binary may # live in project/PCBuild9. If we're dealing with an x64 Windows build, # it'll live in project/PCbuild/amd64. -project_base = os.path.dirname(os.path.abspath(sys.executable)) +project_base = os.path.dirname(os.path.realpath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) # PC/VS7.1 @@ -74,7 +74,7 @@ def get_python_inc(plat_specific=0, prefix=None): if os.name == "posix": if python_build: - buildir = os.path.dirname(sys.executable) + buildir = os.path.dirname(os.path.realpath(sys.executable)) if plat_specific: # python.h is located in the buildir inc_dir = buildir @@ -222,7 +222,8 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") + return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), + "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") @@ -459,7 +460,7 @@ def _init_nt(): g['SO'] = '.pyd' g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") - g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) + g['BINDIR'] = os.path.dirname(os.path.realpath(sys.executable)) global _config_vars _config_vars = g From 5673d48db60eb63f4da8a53f210656c22b95c7a4 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Tue, 3 Aug 2010 21:33:04 +0000 Subject: [PATCH 3022/8469] Issue #8447: Make distutils.sysconfig follow symlinks in the path to the interpreter executable. This fixes a failure of test_httpservers on OS X. --- sysconfig.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 0fbd5412bc..9842d26c47 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -25,7 +25,7 @@ # Path to the base directory of the project. On Windows the binary may # live in project/PCBuild9. If we're dealing with an x64 Windows build, # it'll live in project/PCbuild/amd64. -project_base = os.path.dirname(os.path.abspath(sys.executable)) +project_base = os.path.dirname(os.path.realpath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) # PC/VS7.1 @@ -77,7 +77,7 @@ def get_python_inc(plat_specific=0, prefix=None): # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) + base = os.path.dirname(os.path.realpath(sys.executable)) if plat_specific: return base else: @@ -223,7 +223,8 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") + return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), + "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") @@ -442,7 +443,7 @@ def _init_nt(): g['SO'] = '.pyd' g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") - g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) + g['BINDIR'] = os.path.dirname(os.path.realpath(sys.executable)) global _config_vars _config_vars = g From 499b7fdd90857e215a9abcc6a56971e04e1aa1a0 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 3 Aug 2010 22:39:42 +0000 Subject: [PATCH 3023/8469] Bumping to 2.6.6 rc 1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9e7ab903d2..a861b3fb02 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.5" +__version__ = "2.6.6rc1" #--end constants-- From a0e52b4f32d7383d92658e921017fe4b493af43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 14 Aug 2010 02:07:26 +0000 Subject: [PATCH 3024/8469] Revert regression from r81256 (with release manager approval, see #8688) --- command/sdist.py | 86 +++++++++++++++++++++++++++++++-------------- tests/test_sdist.py | 62 -------------------------------- 2 files changed, 59 insertions(+), 89 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 535b8d2aea..a366d1eaf6 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -57,8 +57,7 @@ class sdist (Command): "just regenerate the manifest and then stop " "(implies --force-manifest)"), ('force-manifest', 'f', - "forcibly regenerate the manifest and carry on as usual. " - "Deprecated: now the manifest is always regenerated."), + "forcibly regenerate the manifest and carry on as usual"), ('formats=', None, "formats for source distribution (comma-separated list)"), ('keep-temp', 'k', @@ -191,34 +190,67 @@ def get_file_list (self): distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all - depends on the user's options. + depends on the user's options and the state of the filesystem. """ - # new behavior: - # the file list is recalculated everytime because - # even if MANIFEST.in or setup.py are not changed - # the user might have added some files in the tree that - # need to be included. - # - # This makes --force the default and only behavior. - template_exists = os.path.isfile(self.template) - if not template_exists: - self.warn(("manifest template '%s' does not exist " + - "(using default file list)") % - self.template) - self.filelist.findall() - - if self.use_defaults: - self.add_defaults() + # If we have a manifest template, see if it's newer than the + # manifest; if so, we'll regenerate the manifest. + template_exists = os.path.isfile(self.template) if template_exists: - self.read_template() - - if self.prune: - self.prune_file_list() - - self.filelist.sort() - self.filelist.remove_duplicates() - self.write_manifest() + template_newer = dep_util.newer(self.template, self.manifest) + + # The contents of the manifest file almost certainly depend on the + # setup script as well as the manifest template -- so if the setup + # script is newer than the manifest, we'll regenerate the manifest + # from the template. (Well, not quite: if we already have a + # manifest, but there's no template -- which will happen if the + # developer elects to generate a manifest some other way -- then we + # can't regenerate the manifest, so we don't.) + self.debug_print("checking if %s newer than %s" % + (self.distribution.script_name, self.manifest)) + setup_newer = dep_util.newer(self.distribution.script_name, + self.manifest) + + # cases: + # 1) no manifest, template exists: generate manifest + # (covered by 2a: no manifest == template newer) + # 2) manifest & template exist: + # 2a) template or setup script newer than manifest: + # regenerate manifest + # 2b) manifest newer than both: + # do nothing (unless --force or --manifest-only) + # 3) manifest exists, no template: + # do nothing (unless --force or --manifest-only) + # 4) no manifest, no template: generate w/ warning ("defaults only") + + manifest_outofdate = (template_exists and + (template_newer or setup_newer)) + force_regen = self.force_manifest or self.manifest_only + manifest_exists = os.path.isfile(self.manifest) + neither_exists = (not template_exists and not manifest_exists) + + # Regenerate the manifest if necessary (or if explicitly told to) + if manifest_outofdate or neither_exists or force_regen: + if not template_exists: + self.warn(("manifest template '%s' does not exist " + + "(using default file list)") % + self.template) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + if template_exists: + self.read_template() + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() + + # Don't regenerate the manifest, just read it in. + else: + self.read_manifest() # get_file_list () diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 6b8784ac3d..e322c1385c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,7 +29,6 @@ def setUp(self): super(sdistTestCase, self).setUp() self.old_path = os.getcwd() self.temp_pkg = os.path.join(self.mkdtemp(), 'temppkg') - self.tmp_dir = self.mkdtemp() def tearDown(self): os.chdir(self.old_path) @@ -152,67 +151,6 @@ def test_make_distribution(self): self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) - def get_cmd(self, metadata=None): - """Returns a cmd""" - if metadata is None: - metadata = {'name': 'fake', 'version': '1.0', - 'url': 'xxx', 'author': 'xxx', - 'author_email': 'xxx'} - dist = Distribution(metadata) - dist.script_name = 'setup.py' - dist.packages = ['somecode'] - dist.include_package_data = True - cmd = sdist(dist) - cmd.dist_dir = 'dist' - def _warn(*args): - pass - cmd.warn = _warn - return dist, cmd - - def test_get_file_list(self): - # make sure MANIFEST is recalculated - dist, cmd = self.get_cmd() - - os.chdir(self.tmp_dir) - - # filling data_files by pointing files in package_data - os.mkdir(os.path.join(self.tmp_dir, 'somecode')) - self.write_file((self.tmp_dir, 'somecode', '__init__.py'), '#') - self.write_file((self.tmp_dir, 'somecode', 'one.py'), '#') - cmd.ensure_finalized() - cmd.run() - - f = open(cmd.manifest) - try: - manifest = [line.strip() for line in f.read().split('\n') - if line.strip() != ''] - finally: - f.close() - - self.assertEquals(len(manifest), 2) - - # adding a file - self.write_file((self.tmp_dir, 'somecode', 'two.py'), '#') - - # make sure build_py is reinitinialized, like a fresh run - build_py = dist.get_command_obj('build_py') - build_py.finalized = False - build_py.ensure_finalized() - - cmd.run() - - f = open(cmd.manifest) - try: - manifest2 = [line.strip() for line in f.read().split('\n') - if line.strip() != ''] - finally: - f.close() - - # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 3) - self.assert_('two.py' in manifest2[-1]) - - def test_suite(): return unittest.makeSuite(sdistTestCase) From aefeb97682f95d9ae4df1c41a5bd8f1fd047c016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 14 Aug 2010 02:30:34 +0000 Subject: [PATCH 3025/8469] Use a marker in generated MANIFEST files, don't touch files without it. Fixes #8688. --- command/sdist.py | 17 +++++++++++++++-- tests/test_sdist.py | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f51d72fad7..818a45260d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -335,8 +335,21 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - self.execute(file_util.write_file, - (self.manifest, self.filelist.files), + if os.path.isfile(self.manifest): + fp = open(self.manifest) + try: + first_line = fp.readline() + finally: + fp.close() + + if first_line != '# file GENERATED by distutils, do NOT edit\n': + log.info("not writing to manually maintained " + "manifest file '%s'" % self.manifest) + return + + content = self.filelist.files[:] + content.insert(0, '# file GENERATED by distutils, do NOT edit') + self.execute(file_util.write_file, (self.manifest, content), "writing manifest file '%s'" % self.manifest) def read_manifest(self): diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f95035dfb0..209aa59baf 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,6 +29,7 @@ """ MANIFEST = """\ +# file GENERATED by distutils, do NOT edit README inroot.txt setup.py @@ -294,7 +295,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 4) + self.assertEquals(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -314,9 +315,40 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 5) + self.assertEquals(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) + def test_manifest_marker(self): + # check that autogenerated MANIFESTs have a marker + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest[0], + '# file GENERATED by distutils, do NOT edit') + + def test_manual_manifest(self): + # check that a MANIFEST without a marker is left alone + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest, ['README.manual']) def test_suite(): return unittest.makeSuite(SDistTestCase) From 6d8137e922dd736506976931c7acec8953025d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 14 Aug 2010 02:36:26 +0000 Subject: [PATCH 3026/8469] Merged revisions 83993 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r83993 | eric.araujo | 2010-08-14 04:30:34 +0200 (sam., 14 août 2010) | 2 lines Use a marker in generated MANIFEST files, don't touch files without it. Fixes #8688. ........ --- command/sdist.py | 17 +++++++++++++++-- tests/test_sdist.py | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index f51d72fad7..818a45260d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -335,8 +335,21 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - self.execute(file_util.write_file, - (self.manifest, self.filelist.files), + if os.path.isfile(self.manifest): + fp = open(self.manifest) + try: + first_line = fp.readline() + finally: + fp.close() + + if first_line != '# file GENERATED by distutils, do NOT edit\n': + log.info("not writing to manually maintained " + "manifest file '%s'" % self.manifest) + return + + content = self.filelist.files[:] + content.insert(0, '# file GENERATED by distutils, do NOT edit') + self.execute(file_util.write_file, (self.manifest, content), "writing manifest file '%s'" % self.manifest) def read_manifest(self): diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f95035dfb0..209aa59baf 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,6 +29,7 @@ """ MANIFEST = """\ +# file GENERATED by distutils, do NOT edit README inroot.txt setup.py @@ -294,7 +295,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 4) + self.assertEquals(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -314,9 +315,40 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 5) + self.assertEquals(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) + def test_manifest_marker(self): + # check that autogenerated MANIFESTs have a marker + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest[0], + '# file GENERATED by distutils, do NOT edit') + + def test_manual_manifest(self): + # check that a MANIFEST without a marker is left alone + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest, ['README.manual']) def test_suite(): return unittest.makeSuite(SDistTestCase) From 517674a725c862dc2c5b0905b4f341d53e93f66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 14 Aug 2010 03:07:46 +0000 Subject: [PATCH 3027/8469] Merged revisions 83993 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r83993 | eric.araujo | 2010-08-14 04:30:34 +0200 (sam., 14 août 2010) | 2 lines Use a marker in generated MANIFEST files, don't touch files without it. Fixes #8688. ........ --- command/sdist.py | 17 +++++++++++++++-- tests/test_sdist.py | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 087ae9dcc6..f2d2f94beb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -349,8 +349,21 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - self.execute(file_util.write_file, - (self.manifest, self.filelist.files), + if os.path.isfile(self.manifest): + fp = open(self.manifest) + try: + first_line = fp.readline() + finally: + fp.close() + + if first_line != '# file GENERATED by distutils, do NOT edit\n': + log.info("not writing to manually maintained " + "manifest file '%s'" % self.manifest) + return + + content = self.filelist.files[:] + content.insert(0, '# file GENERATED by distutils, do NOT edit') + self.execute(file_util.write_file, (self.manifest, content), "writing manifest file '%s'" % self.manifest) def read_manifest(self): diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f83b9f29b6..87adb45894 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -45,6 +45,7 @@ """ MANIFEST = """\ +# file GENERATED by distutils, do NOT edit README inroot.txt setup.py @@ -364,7 +365,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 4) + self.assertEquals(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -384,9 +385,40 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 5) + self.assertEquals(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) + def test_manifest_marker(self): + # check that autogenerated MANIFESTs have a marker + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest[0], + '# file GENERATED by distutils, do NOT edit') + + def test_manual_manifest(self): + # check that a MANIFEST without a marker is left alone + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + cmd.run() + + f = open(cmd.manifest) + try: + manifest = [line.strip() for line in f.read().split('\n') + if line.strip() != ''] + finally: + f.close() + + self.assertEqual(manifest, ['README.manual']) def test_suite(): return unittest.makeSuite(SDistTestCase) From 55096b84cc9e0882c64d0772880b9d08f2f9e41e Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 16 Aug 2010 22:19:57 +0000 Subject: [PATCH 3028/8469] Bumping to 2.6.6rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a861b3fb02..c456c7487f 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.6rc1" +__version__ = "2.6.6rc2" #--end constants-- From e870a5993437de693e68c83e15ed02f3b7af1575 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 23 Aug 2010 23:37:56 +0000 Subject: [PATCH 3029/8469] 2.6.6 final. \o/ --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c456c7487f..90f96feae1 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.6rc2" +__version__ = "2.6.6" #--end constants-- From 36cae28e19a68627c873ff982d2a2dd3279cea9c Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Mon, 30 Aug 2010 14:05:50 +0000 Subject: [PATCH 3030/8469] remove pointless coding cookies --- command/bdist_msi.py | 1 - tests/test_dist.py | 1 - 2 files changed, 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 8a458d8536..b11957a7dc 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper diff --git a/tests/test_dist.py b/tests/test_dist.py index 3b7637f3af..007803e12d 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -1,4 +1,3 @@ -# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os import io From b202a1a25f6d7ab9707910d6e36df58e8f9a2508 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 3 Sep 2010 18:30:30 +0000 Subject: [PATCH 3031/8469] PEP 3149 is accepted. http://mail.python.org/pipermail/python-dev/2010-September/103408.html --- tests/test_build_ext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b7cdc20aa4..52479d7d37 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -323,8 +323,8 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assertTrue(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + so_ext = sysconfig.get_config_var('SO') + self.assertTrue(so_file.endswith(so_ext)) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, other_tmp_dir) @@ -333,8 +333,7 @@ def test_get_outputs(self): cmd.run() so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + self.assertTrue(so_file.endswith(so_ext)) so_dir = os.path.dirname(so_file) self.assertEquals(so_dir, cmd.build_lib) From a51303cf88483095772fd60fc7184fceafc9073c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 5 Sep 2010 08:30:40 +0000 Subject: [PATCH 3032/8469] Bump to 3.2a2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7b2227916a..92ed8f4db2 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2a1" +__version__ = "3.2a2" #--end constants-- From 0aeceb2acf76e1ecb122098bc9a797218568bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 22:11:52 +0000 Subject: [PATCH 3033/8469] Fix eon-old bug in build_clib options (#1718574) --- command/build_clib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 258d7c10be..428011a64d 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -32,9 +32,9 @@ class build_clib(Command): description = "build C/C++ libraries used by Python extensions" user_options = [ - ('build-clib', 'b', + ('build-clib=', 'b', "directory to build C/C++ libraries to"), - ('build-temp', 't', + ('build-temp=', 't', "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), From 53eb48ea76c6fe4f6ee380f926ecac6136d2eee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 22:17:04 +0000 Subject: [PATCH 3034/8469] Merged revisions 84608 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84608 | eric.araujo | 2010-09-08 00:11:52 +0200 (mer., 08 sept. 2010) | 2 lines Fix eon-old bug in build_clib options (#1718574) ........ --- command/build_clib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 258d7c10be..428011a64d 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -32,9 +32,9 @@ class build_clib(Command): description = "build C/C++ libraries used by Python extensions" user_options = [ - ('build-clib', 'b', + ('build-clib=', 'b', "directory to build C/C++ libraries to"), - ('build-temp', 't', + ('build-temp=', 't', "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), From 878ab41a641d75ce127fda7857f7b271bd19efac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 22:18:34 +0000 Subject: [PATCH 3035/8469] Merged revisions 84608 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84608 | eric.araujo | 2010-09-08 00:11:52 +0200 (mer., 08 sept. 2010) | 2 lines Fix eon-old bug in build_clib options (#1718574) ........ --- command/build_clib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/build_clib.py b/command/build_clib.py index 8d49de75e1..98a1726ffa 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -32,9 +32,9 @@ class build_clib(Command): description = "build C/C++ libraries used by Python extensions" user_options = [ - ('build-clib', 'b', + ('build-clib=', 'b', "directory to build C/C++ libraries to"), - ('build-temp', 't', + ('build-temp=', 't', "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), From fe763ddd66aa35cad53dd175d483ed37f26726d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 23:08:57 +0000 Subject: [PATCH 3036/8469] Fix incorrect use of Command.announce (#9199) --- command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index f602fbeb68..41df127799 100644 --- a/command/upload.py +++ b/command/upload.py @@ -194,4 +194,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - self.announce('-'*75, r.read(), '-'*75) + msg = ''.join('-' * 75, r.read(), '-' * 75) + self.announce(msg, log.INFO) From 77ea1a964b3e95dddca07562f1c724a9ef71cdf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 23:09:44 +0000 Subject: [PATCH 3037/8469] Merged revisions 84611 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84611 | eric.araujo | 2010-09-08 01:08:57 +0200 (mer., 08 sept. 2010) | 2 lines Fix incorrect use of Command.announce (#9199) ........ --- command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index f602fbeb68..41df127799 100644 --- a/command/upload.py +++ b/command/upload.py @@ -194,4 +194,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - self.announce('-'*75, r.read(), '-'*75) + msg = ''.join('-' * 75, r.read(), '-' * 75) + self.announce(msg, log.INFO) From 4123cdd0eebf95195be93eaa84c4b62d587a9028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 7 Sep 2010 23:12:59 +0000 Subject: [PATCH 3038/8469] Merged revisions 84611 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84611 | eric.araujo | 2010-09-08 01:08:57 +0200 (mer., 08 sept. 2010) | 2 lines Fix incorrect use of Command.announce (#9199) ........ --- command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 18a10a0b7f..4b3ed3f991 100644 --- a/command/upload.py +++ b/command/upload.py @@ -186,4 +186,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - self.announce('-'*75, result.read(), '-'*75) + msg = ''.join('-' * 75, r.read(), '-' * 75) + self.announce(msg, log.INFO) From 3136e10a506a31f07107f7d08c96074d2709626b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 8 Sep 2010 00:00:45 +0000 Subject: [PATCH 3039/8469] Follow-up to #9199: Fix str.join use, add newlines. Thanks to Konrad Delong for writing a test for upload_docs --show-response in distutils2, letting me catch my mistake. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 41df127799..99e03d747c 100644 --- a/command/upload.py +++ b/command/upload.py @@ -194,5 +194,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - msg = ''.join('-' * 75, r.read(), '-' * 75) + msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) self.announce(msg, log.INFO) From 7a18c28655272f4da8f115d20b5b5f975699bf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 8 Sep 2010 00:02:00 +0000 Subject: [PATCH 3040/8469] Merged revisions 84614 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84614 | eric.araujo | 2010-09-08 02:00:45 +0200 (mer., 08 sept. 2010) | 5 lines Follow-up to #9199: Fix str.join use, add newlines. Thanks to Konrad Delong for writing a test for upload_docs --show-response in distutils2, letting me catch my mistake. ........ --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 41df127799..99e03d747c 100644 --- a/command/upload.py +++ b/command/upload.py @@ -194,5 +194,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - msg = ''.join('-' * 75, r.read(), '-' * 75) + msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) self.announce(msg, log.INFO) From e0136d1da875b82d0cb33b89430ca52a4f5656fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 8 Sep 2010 00:02:29 +0000 Subject: [PATCH 3041/8469] Merged revisions 84614 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84614 | eric.araujo | 2010-09-08 02:00:45 +0200 (mer., 08 sept. 2010) | 5 lines Follow-up to #9199: Fix str.join use, add newlines. Thanks to Konrad Delong for writing a test for upload_docs --show-response in distutils2, letting me catch my mistake. ........ --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 4b3ed3f991..c3f19d207f 100644 --- a/command/upload.py +++ b/command/upload.py @@ -186,5 +186,5 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - msg = ''.join('-' * 75, r.read(), '-' * 75) + msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) self.announce(msg, log.INFO) From 2f09caa926e12dbc91a0652c0e3d8ab494046579 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 10 Sep 2010 19:44:44 +0000 Subject: [PATCH 3042/8469] =?UTF-8?q?Issue=20#941346:=20Improve=20the=20bu?= =?UTF-8?q?ild=20process=20under=20AIX=20and=20allow=20Python=20to=20be=20?= =?UTF-8?q?built=20as=20a=20shared=20library.=20=20Patch=20by=20S=C3=A9bas?= =?UTF-8?q?tien=20Sabl=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/build_ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index bd61bc56f3..4e664642b8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -748,6 +748,9 @@ def get_libraries(self, ext): elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries + elif sys.platform[:3] == 'aix': + # Don't use the default code below + return ext.libraries else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): From ba76a4b8033a52729a7ab55129b9113ccca9a2e4 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 10 Sep 2010 19:55:19 +0000 Subject: [PATCH 3043/8469] Merged revisions 84680 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r84680 | antoine.pitrou | 2010-09-10 21:44:44 +0200 (ven., 10 sept. 2010) | 4 lines Issue #941346: Improve the build process under AIX and allow Python to be built as a shared library. Patch by Sébastien Sablé. ........ --- command/build_ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index bd61bc56f3..4e664642b8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -748,6 +748,9 @@ def get_libraries(self, ext): elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries + elif sys.platform[:3] == 'aix': + # Don't use the default code below + return ext.libraries else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): From 8bede4b22db5241e8e141a6b4c2d718b02f4a57b Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 10 Sep 2010 20:03:17 +0000 Subject: [PATCH 3044/8469] Merged revisions 84680 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r84680 | antoine.pitrou | 2010-09-10 21:44:44 +0200 (ven., 10 sept. 2010) | 4 lines Issue #941346: Improve the build process under AIX and allow Python to be built as a shared library. Patch by Sébastien Sablé. ........ --- command/build_ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index aeb6b744dc..5b3be6fbd6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -753,7 +753,9 @@ def get_libraries (self, ext): elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries - + elif sys.platform[:3] == 'aix': + # Don't use the default code below + return ext.libraries else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): From 944d8d8d40616d46d4ebf34a58b2fd75bd317589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 11 Sep 2010 15:28:56 +0000 Subject: [PATCH 3045/8469] Fix typo in option name --- command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 818a45260d..1118060cbb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -73,7 +73,7 @@ def checking_metadata(self): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), - ('medata-check', None, + ('metadata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), ] From 5a1680dbd2d366418cd676f6b979a0589b645950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 11 Sep 2010 15:30:19 +0000 Subject: [PATCH 3046/8469] Merged revisions 84711 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84711 | eric.araujo | 2010-09-11 17:28:56 +0200 (sam., 11 sept. 2010) | 2 lines Fix typo in option name ........ --- command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 818a45260d..1118060cbb 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -73,7 +73,7 @@ def checking_metadata(self): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), - ('medata-check', None, + ('metadata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), ] From 095b65f89a72607c6ec21acfdc655633a9aecb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 11 Sep 2010 15:31:13 +0000 Subject: [PATCH 3047/8469] Merged revisions 84711 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84711 | eric.araujo | 2010-09-11 17:28:56 +0200 (sam., 11 sept. 2010) | 2 lines Fix typo in option name ........ --- command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index f2d2f94beb..0c3b0b55bf 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -73,7 +73,7 @@ def checking_metadata(self): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), - ('medata-check', None, + ('metadata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), ('owner=', 'u', From d4b44c7d2deb42b35cb3c54d8f367f16fa37e1ab Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 12 Sep 2010 22:55:40 +0000 Subject: [PATCH 3048/8469] Issue #9313: Skips test_remove_visual_c_ref on old MSVC. --- tests/test_msvc9compiler.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 8a908d9954..39e2c11cc2 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -109,6 +109,11 @@ def test_reg_class(self): self.assertTrue('Desktop' in keys) def test_remove_visual_c_ref(self): + from distutils.msvccompiler import get_build_version + if get_build_version() < 8.0: + # this test is only for MSVC8.0 or above + return + from distutils.msvc9compiler import MSVCCompiler tempdir = self.mkdtemp() manifest = os.path.join(tempdir, 'manifest') From 50e74d1aefc924a81eb8a4ce26c7376b4c41c055 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 05:36:21 +0000 Subject: [PATCH 3049/8469] Issue #9313: Use unittest.skipUnless to skip old MSVC. --- tests/test_msvc9compiler.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 39e2c11cc2..ec2b2e367a 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -60,7 +60,12 @@ """ +if sys.platform=="win32": + from distutils.msvccompiler import get_build_version + @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" + " MSVC8.0 or above") class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): @@ -68,10 +73,6 @@ def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None @@ -86,11 +87,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return - from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') @@ -109,11 +105,6 @@ def test_reg_class(self): self.assertTrue('Desktop' in keys) def test_remove_visual_c_ref(self): - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return - from distutils.msvc9compiler import MSVCCompiler tempdir = self.mkdtemp() manifest = os.path.join(tempdir, 'manifest') From 74e96af334b6541dc32dba42f6ba5c042111ddfd Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 05:48:30 +0000 Subject: [PATCH 3050/8469] Merged revisions 84753,84760 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84753 | hirokazu.yamamoto | 2010-09-13 07:55:40 +0900 | 1 line Issue #9313: Skips test_remove_visual_c_ref on old MSVC. ........ r84760 | hirokazu.yamamoto | 2010-09-13 14:36:21 +0900 | 1 line Issue #9313: Use unittest.skipUnless to skip old MSVC. ........ --- tests/test_msvc9compiler.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 8a908d9954..ec2b2e367a 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -60,7 +60,12 @@ """ +if sys.platform=="win32": + from distutils.msvccompiler import get_build_version + @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" + " MSVC8.0 or above") class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): @@ -68,10 +73,6 @@ def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None @@ -86,11 +87,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return - from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') From 9b43905136212f7c0463ec8e844c02c9830df14e Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 06:36:09 +0000 Subject: [PATCH 3051/8469] Merged revisions 84753,84760 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84753 | hirokazu.yamamoto | 2010-09-13 07:55:40 +0900 | 1 line Issue #9313: Skips test_remove_visual_c_ref on old MSVC. ........ r84760 | hirokazu.yamamoto | 2010-09-13 14:36:21 +0900 | 1 line Issue #9313: Use unittest.skipUnless to skip old MSVC. ........ --- tests/test_msvc9compiler.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 503a5a8056..cd162516cf 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -60,7 +60,12 @@ """ +if sys.platform=="win32": + from distutils.msvccompiler import get_build_version + @unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") +@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" + " MSVC8.0 or above") class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): @@ -68,10 +73,6 @@ def test_no_compiler(self): # makes sure query_vcvarsall throws # a DistutilsPlatformError if the compiler # is not found - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return from distutils.msvc9compiler import query_vcvarsall def _find_vcvarsall(version): return None @@ -86,11 +87,6 @@ def _find_vcvarsall(version): msvc9compiler.find_vcvarsall = old_find_vcvarsall def test_reg_class(self): - from distutils.msvccompiler import get_build_version - if get_build_version() < 8.0: - # this test is only for MSVC8.0 or above - return - from distutils.msvc9compiler import Reg self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') From c9bc9d98d8766b49eea3d8fbc084e9313094b94e Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 07:18:30 +0000 Subject: [PATCH 3052/8469] get_build_version() is needed even where sys.platform != "win32". Try to fix buildbot error in other way. --- tests/test_msvc9compiler.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index ec2b2e367a..f1da843fab 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -62,10 +62,14 @@ if sys.platform=="win32": from distutils.msvccompiler import get_build_version - -@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") -@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" - " MSVC8.0 or above") + if get_build_version()>=8.0: + SKIP_MESSAGE = None + else: + SKIP_MESSAGE = "These tests are only for MSVC8.0 or above" +else: + SKIP_MESSAGE = "These tests are only for win32" + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): From 93127be78a63414c9ca002640c693192224221aa Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 07:48:22 +0000 Subject: [PATCH 3053/8469] Merged revisions 84765 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84765 | hirokazu.yamamoto | 2010-09-13 16:18:30 +0900 | 2 lines get_build_version() is needed even where sys.platform != "win32". Try to fix buildbot error in other way. ........ --- tests/test_msvc9compiler.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index ec2b2e367a..f1da843fab 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -62,10 +62,14 @@ if sys.platform=="win32": from distutils.msvccompiler import get_build_version - -@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") -@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" - " MSVC8.0 or above") + if get_build_version()>=8.0: + SKIP_MESSAGE = None + else: + SKIP_MESSAGE = "These tests are only for MSVC8.0 or above" +else: + SKIP_MESSAGE = "These tests are only for win32" + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): From 3033d62a264a06b0d60459c769af0d5d2ffb4db9 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Mon, 13 Sep 2010 08:14:41 +0000 Subject: [PATCH 3054/8469] Merged revisions 84765 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84765 | hirokazu.yamamoto | 2010-09-13 16:18:30 +0900 | 2 lines get_build_version() is needed even where sys.platform != "win32". Try to fix buildbot error in other way. ........ --- tests/test_msvc9compiler.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index cd162516cf..c957954482 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -62,10 +62,14 @@ if sys.platform=="win32": from distutils.msvccompiler import get_build_version - -@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") -@unittest.skipUnless(get_build_version()>=8.0, "These tests are only for" - " MSVC8.0 or above") + if get_build_version()>=8.0: + SKIP_MESSAGE = None + else: + SKIP_MESSAGE = "These tests are only for MSVC8.0 or above" +else: + SKIP_MESSAGE = "These tests are only for win32" + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): From fdc07fb43978baae1dbe06a43707d5c81a14d1db Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Fri, 17 Sep 2010 16:35:37 +0000 Subject: [PATCH 3055/8469] Fix Issue2236: Distutils' mkpath implementation ignoring the "mode" parameter --- dir_util.py | 2 +- tests/test_dir_util.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 98e6252c6c..54376e5ca5 100644 --- a/dir_util.py +++ b/dir_util.py @@ -68,7 +68,7 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): if not dry_run: try: - os.mkdir(head) + os.mkdir(head, mode) created_dirs.append(head) except OSError as exc: raise DistutilsFileError( diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 0f694aa020..8986ca55d4 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -1,6 +1,7 @@ """Tests for distutils.dir_util.""" import unittest import os +import stat import shutil from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, @@ -48,6 +49,12 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + def test_mkpath_with_custom_mode(self): + mkpath(self.target, 0o700) + self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + mkpath(self.target2, 0o555) + self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) From 1fbe22435a7a8e26625d33b3f1c5531fd8eb0090 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Fri, 17 Sep 2010 16:40:01 +0000 Subject: [PATCH 3056/8469] Merged revisions 84861 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84861 | senthil.kumaran | 2010-09-17 22:05:37 +0530 (Fri, 17 Sep 2010) | 3 lines Fix Issue2236: Distutils' mkpath implementation ignoring the "mode" parameter ........ --- dir_util.py | 2 +- tests/test_dir_util.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 9b4d2adb5c..5a968063f7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -68,7 +68,7 @@ def mkpath(name, mode=0777, verbose=1, dry_run=0): if not dry_run: try: - os.mkdir(head) + os.mkdir(head, mode) created_dirs.append(head) except OSError, exc: raise DistutilsFileError, \ diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 0f694aa020..8986ca55d4 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -1,6 +1,7 @@ """Tests for distutils.dir_util.""" import unittest import os +import stat import shutil from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, @@ -48,6 +49,12 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + def test_mkpath_with_custom_mode(self): + mkpath(self.target, 0o700) + self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + mkpath(self.target2, 0o555) + self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) From 8ff8c31883ff47ba9489fa9e265dce2e3dfc2361 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Fri, 17 Sep 2010 16:42:05 +0000 Subject: [PATCH 3057/8469] Merged revisions 84861 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84861 | senthil.kumaran | 2010-09-17 22:05:37 +0530 (Fri, 17 Sep 2010) | 3 lines Fix Issue2236: Distutils' mkpath implementation ignoring the "mode" parameter ........ --- dir_util.py | 2 +- tests/test_dir_util.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 98e6252c6c..54376e5ca5 100644 --- a/dir_util.py +++ b/dir_util.py @@ -68,7 +68,7 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): if not dry_run: try: - os.mkdir(head) + os.mkdir(head, mode) created_dirs.append(head) except OSError as exc: raise DistutilsFileError( diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 0f694aa020..8986ca55d4 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -1,6 +1,7 @@ """Tests for distutils.dir_util.""" import unittest import os +import stat import shutil from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, @@ -48,6 +49,12 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + def test_mkpath_with_custom_mode(self): + mkpath(self.target, 0o700) + self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + mkpath(self.target2, 0o555) + self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) From e2489f924e1603823889e36f900b10e9211d903d Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sat, 18 Sep 2010 02:55:03 +0000 Subject: [PATCH 3058/8469] Skip the distutils mode test on Windows OS. --- tests/test_dir_util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 8986ca55d4..892a66d2ad 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,6 +3,7 @@ import os import stat import shutil +import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) @@ -49,6 +50,8 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + @unittest.skipIf(sys.platform.startswith('win'), + "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): mkpath(self.target, 0o700) self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) From 2e99ac7174e503aa7a717d339eff6bcbd620e7d2 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sat, 18 Sep 2010 02:57:28 +0000 Subject: [PATCH 3059/8469] Merged revisions 84871 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84871 | senthil.kumaran | 2010-09-18 08:25:03 +0530 (Sat, 18 Sep 2010) | 3 lines Skip the distutils mode test on Windows OS. ........ --- tests/test_dir_util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 8986ca55d4..892a66d2ad 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,6 +3,7 @@ import os import stat import shutil +import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) @@ -49,6 +50,8 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + @unittest.skipIf(sys.platform.startswith('win'), + "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): mkpath(self.target, 0o700) self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) From eb473877ee82b71b02cee7c530d5f279670f8a4d Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sat, 18 Sep 2010 02:58:49 +0000 Subject: [PATCH 3060/8469] Merged revisions 84871 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84871 | senthil.kumaran | 2010-09-18 08:25:03 +0530 (Sat, 18 Sep 2010) | 3 lines Skip the distutils mode test on Windows OS. ........ --- tests/test_dir_util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 8986ca55d4..892a66d2ad 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,6 +3,7 @@ import os import stat import shutil +import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) @@ -49,6 +50,8 @@ def test_mkpath_remove_tree_verbosity(self): wanted = ["removing '%s' (and everything under it)" % self.root_target] self.assertEquals(self._logs, wanted) + @unittest.skipIf(sys.platform.startswith('win'), + "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): mkpath(self.target, 0o700) self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) From ebefff189367909ff68453fd010eb61213827644 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 19 Sep 2010 03:09:54 +0000 Subject: [PATCH 3061/8469] Update the test_distutils mode test to test with umask value properly. --- tests/test_dir_util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 892a66d2ad..a1647fbcf5 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -53,10 +53,15 @@ def test_mkpath_remove_tree_verbosity(self): @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): + # Get and set the current umask value for testing mode bits. + umask = os.umask(0o002) + os.umask(umask) mkpath(self.target, 0o700) - self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + self.assertEqual( + stat.S_IMODE(os.stat(self.target).st_mode), 0o700 & ~umask) mkpath(self.target2, 0o555) - self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + self.assertEqual( + stat.S_IMODE(os.stat(self.target2).st_mode), 0o555 & ~umask) def test_create_tree_verbosity(self): From d8b66d133304a36d1597de05eeaac5dfb60a8712 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 19 Sep 2010 03:12:28 +0000 Subject: [PATCH 3062/8469] Merged revisions 84889 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84889 | senthil.kumaran | 2010-09-19 08:39:54 +0530 (Sun, 19 Sep 2010) | 3 lines Update the test_distutils mode test to test with umask value properly. ........ --- tests/test_dir_util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 892a66d2ad..a1647fbcf5 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -53,10 +53,15 @@ def test_mkpath_remove_tree_verbosity(self): @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): + # Get and set the current umask value for testing mode bits. + umask = os.umask(0o002) + os.umask(umask) mkpath(self.target, 0o700) - self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + self.assertEqual( + stat.S_IMODE(os.stat(self.target).st_mode), 0o700 & ~umask) mkpath(self.target2, 0o555) - self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + self.assertEqual( + stat.S_IMODE(os.stat(self.target2).st_mode), 0o555 & ~umask) def test_create_tree_verbosity(self): From b5a3263df80e4b7b52e97e0f9ac4d92993c7b5dc Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 19 Sep 2010 03:12:35 +0000 Subject: [PATCH 3063/8469] Merged revisions 84889 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84889 | senthil.kumaran | 2010-09-19 08:39:54 +0530 (Sun, 19 Sep 2010) | 3 lines Update the test_distutils mode test to test with umask value properly. ........ --- tests/test_dir_util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 892a66d2ad..a1647fbcf5 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -53,10 +53,15 @@ def test_mkpath_remove_tree_verbosity(self): @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): + # Get and set the current umask value for testing mode bits. + umask = os.umask(0o002) + os.umask(umask) mkpath(self.target, 0o700) - self.assertEqual(stat.S_IMODE(os.stat(self.target).st_mode), 0o700) + self.assertEqual( + stat.S_IMODE(os.stat(self.target).st_mode), 0o700 & ~umask) mkpath(self.target2, 0o555) - self.assertEqual(stat.S_IMODE(os.stat(self.target2).st_mode), 0o555) + self.assertEqual( + stat.S_IMODE(os.stat(self.target2).st_mode), 0o555 & ~umask) def test_create_tree_verbosity(self): From 70b1270636c9a42b0f1f4458d37bbbbabac4bb32 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 20 Sep 2010 10:13:13 +0000 Subject: [PATCH 3064/8469] logging: added hasHandlers() to LoggerAdapter. --- sysconfig.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 48f3fe4d59..3567db8349 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -56,6 +56,18 @@ def get_python_version(): """ return sys.version[:3] +def _get_build_dir(name, plat_specific): + # Assume the executable is in the build directory. The + # pyconfig.h file should be in the same directory. Since + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. + base = os.path.dirname(os.path.abspath(sys.executable)) + if plat_specific: + return base + else: + thedir = os.path.join(get_config_var('srcdir'), name) + return os.path.normpath(thedir) def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. @@ -72,17 +84,7 @@ def get_python_inc(plat_specific=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: - # Assume the executable is in the build directory. The - # pyconfig.h file should be in the same directory. Since - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) - if plat_specific: - return base - else: - incdir = os.path.join(get_config_var('srcdir'), 'Include') - return os.path.normpath(incdir) + return _get_build_dir('Include', plat_specific) return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") @@ -117,6 +119,8 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": + if python_build: + return _get_build_dir('Lib', plat_specific) libpython = os.path.join(prefix, "lib", "python" + get_python_version()) if standard_lib: From 8eb84ccb87fb80d1e95382003af64a8c7d2f83de Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 20 Sep 2010 10:29:54 +0000 Subject: [PATCH 3065/8469] Reverted changes which were inadvertently committed. --- sysconfig.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 3567db8349..48f3fe4d59 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -56,18 +56,6 @@ def get_python_version(): """ return sys.version[:3] -def _get_build_dir(name, plat_specific): - # Assume the executable is in the build directory. The - # pyconfig.h file should be in the same directory. Since - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) - if plat_specific: - return base - else: - thedir = os.path.join(get_config_var('srcdir'), name) - return os.path.normpath(thedir) def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. @@ -84,7 +72,17 @@ def get_python_inc(plat_specific=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: - return _get_build_dir('Include', plat_specific) + # Assume the executable is in the build directory. The + # pyconfig.h file should be in the same directory. Since + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. + base = os.path.dirname(os.path.abspath(sys.executable)) + if plat_specific: + return base + else: + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") @@ -119,8 +117,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": - if python_build: - return _get_build_dir('Lib', plat_specific) libpython = os.path.join(prefix, "lib", "python" + get_python_version()) if standard_lib: From a6f96e7709806a0211de70a0eb9089de77d000e2 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Tue, 21 Sep 2010 17:35:08 +0200 Subject: [PATCH 3066/8469] fixed typo - thanks to Ted Tibbets --HG-- branch : distribute extra : rebase_source : 87b145e4977333b08b77bdf857930f456c8b0e13 --- CHANGES.txt | 6 ++++++ setuptools/command/bdist_egg.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 342ad4bbcb..3d9f905cd3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.15 +------ + +* Fixed typo in bdist_egg + ------ 0.6.14 ------ diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 90e1f52568..3bb56fc35b 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -535,6 +535,6 @@ def visit(z, dirname, names): z.close() else: for dirname, dirs, files in os.walk(base_dir): - visit(None, dirname, file) + visit(None, dirname, files) return zip_filename # From f63c10f0b8f07a02e58c75b2da2454808529442c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 3 Oct 2010 14:18:09 +0000 Subject: [PATCH 3067/8469] Fixed #8980: distutils.command.check was failing w/ docutils installed --- command/check.py | 2 +- tests/test_register.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/command/check.py b/command/check.py index 12844cbf9f..2657c696e5 100644 --- a/command/check.py +++ b/command/check.py @@ -13,7 +13,7 @@ from docutils.parsers.rst import Parser from docutils import frontend from docutils import nodes - from StringIO import StringIO + from io import StringIO class SilentReporter(Reporter): diff --git a/tests/test_register.py b/tests/test_register.py index c03ad10147..7d0ac9ee3a 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -224,24 +224,24 @@ def test_strict(self): cmd = self._get_cmd(metadata) cmd.ensure_finalized() cmd.strict = 1 - inputs = RawInputs('1', 'tarek', 'y') - register_module.raw_input = inputs.__call__ + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ # let's run the command try: cmd.run() finally: - del register_module.raw_input + del register_module.input # strict is not by default cmd = self._get_cmd() cmd.ensure_finalized() - inputs = RawInputs('1', 'tarek', 'y') - register_module.raw_input = inputs.__call__ + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ # let's run the command try: cmd.run() finally: - del register_module.raw_input + del register_module.input def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated From 3e5aeeda898da45a6d8f3f83397193500495183c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 3 Oct 2010 14:30:11 +0000 Subject: [PATCH 3068/8469] Merged revisions 85197 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85197 | tarek.ziade | 2010-10-03 16:18:09 +0200 (Sun, 03 Oct 2010) | 1 line Fixed #8980: distutils.command.check was failing w/ docutils installed ........ --- command/check.py | 2 +- tests/test_register.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/command/check.py b/command/check.py index 12844cbf9f..2657c696e5 100644 --- a/command/check.py +++ b/command/check.py @@ -13,7 +13,7 @@ from docutils.parsers.rst import Parser from docutils import frontend from docutils import nodes - from StringIO import StringIO + from io import StringIO class SilentReporter(Reporter): diff --git a/tests/test_register.py b/tests/test_register.py index c03ad10147..7d0ac9ee3a 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -224,24 +224,24 @@ def test_strict(self): cmd = self._get_cmd(metadata) cmd.ensure_finalized() cmd.strict = 1 - inputs = RawInputs('1', 'tarek', 'y') - register_module.raw_input = inputs.__call__ + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ # let's run the command try: cmd.run() finally: - del register_module.raw_input + del register_module.input # strict is not by default cmd = self._get_cmd() cmd.ensure_finalized() - inputs = RawInputs('1', 'tarek', 'y') - register_module.raw_input = inputs.__call__ + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ # let's run the command try: cmd.run() finally: - del register_module.raw_input + del register_module.input def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated From aa258286d3d9a2651701148dca8781bd2a38adc1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 6 Oct 2010 08:26:09 +0000 Subject: [PATCH 3069/8469] Merged revisions 82805-82806,83523-83527,83536,83538,83542,83546-83548,83550-83555,83558,83560 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r82805 | georg.brandl | 2010-07-11 11:42:10 +0200 (So, 11 Jul 2010) | 1 line #7935: cross-reference to ast.literal_eval() from eval() docs. ........ r82806 | georg.brandl | 2010-07-11 12:22:44 +0200 (So, 11 Jul 2010) | 1 line #9223: link to Command class reference, and move Command interface docs nearer to class docs. ........ r83523 | georg.brandl | 2010-08-02 14:06:18 +0200 (Mo, 02 Aug 2010) | 1 line #9209 and #7781: fix two crashes in pstats interactive browser. ........ r83524 | georg.brandl | 2010-08-02 14:20:23 +0200 (Mo, 02 Aug 2010) | 1 line #9428: fix running scripts from profile/cProfile with their own name and the right namespace. Same fix as for trace.py in #1690103. ........ r83525 | georg.brandl | 2010-08-02 14:36:24 +0200 (Mo, 02 Aug 2010) | 1 line Get rid of spurious "threading" entries in trace output. ........ r83526 | georg.brandl | 2010-08-02 14:40:22 +0200 (Mo, 02 Aug 2010) | 1 line Fix softspace relic. ........ r83527 | georg.brandl | 2010-08-02 14:48:46 +0200 (Mo, 02 Aug 2010) | 1 line #3821: beginnings of a trace.py unittest. ........ r83536 | georg.brandl | 2010-08-02 19:49:25 +0200 (Mo, 02 Aug 2010) | 1 line #8578: mention danger of not incref'ing weak referenced object. ........ r83538 | georg.brandl | 2010-08-02 20:10:13 +0200 (Mo, 02 Aug 2010) | 1 line #6928: fix class docs w.r.t. new metaclasses. ........ r83542 | georg.brandl | 2010-08-02 20:56:54 +0200 (Mo, 02 Aug 2010) | 1 line Move test_SimpleHTTPServer into test_httpservers. ........ r83546 | georg.brandl | 2010-08-02 21:16:34 +0200 (Mo, 02 Aug 2010) | 1 line #7973: Fix distutils options spelling. ........ r83547 | georg.brandl | 2010-08-02 21:19:26 +0200 (Mo, 02 Aug 2010) | 1 line #7386: add example that shows that trailing path separators are stripped. ........ r83548 | georg.brandl | 2010-08-02 21:23:34 +0200 (Mo, 02 Aug 2010) | 1 line #8172: how does one use a property? ........ r83550 | georg.brandl | 2010-08-02 21:32:43 +0200 (Mo, 02 Aug 2010) | 1 line #9451: strengthen warning about __*__ special name usage. ........ r83551 | georg.brandl | 2010-08-02 21:35:06 +0200 (Mo, 02 Aug 2010) | 1 line Remove XXX comment that was displayed. ........ r83552 | georg.brandl | 2010-08-02 21:36:36 +0200 (Mo, 02 Aug 2010) | 1 line #9438: clarify that constant names also cannot be assigned as attributes. ........ r83553 | georg.brandl | 2010-08-02 21:39:17 +0200 (Mo, 02 Aug 2010) | 1 line Remove redundant information. ........ r83554 | georg.brandl | 2010-08-02 21:43:05 +0200 (Mo, 02 Aug 2010) | 1 line #7280: note about nasmw.exe. ........ r83555 | georg.brandl | 2010-08-02 21:44:48 +0200 (Mo, 02 Aug 2010) | 1 line #8861: remove unused variable. ........ r83558 | georg.brandl | 2010-08-02 22:05:19 +0200 (Mo, 02 Aug 2010) | 1 line #8648: document UTF-7 codec functions. ........ r83560 | georg.brandl | 2010-08-02 22:16:18 +0200 (Mo, 02 Aug 2010) | 1 line #9087: update json docstrings -- unicode and long do not exist anymore. ........ --- command/bdist_msi.py | 2 +- command/bdist_wininst.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index c4be47b579..8a458d8536 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -148,7 +148,7 @@ def finalize_options(self): if not self.skip_build and self.distribution.has_ext_modules()\ and self.target_version != short_version: raise DistutilsOptionError( - "target version can only be %s, or the '--skip_build'" + "target version can only be %s, or the '--skip-build'" " option must be specified" % (short_version,)) else: self.versions = list(self.all_versions) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d6d01c630d..3aa1dac7f3 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -89,7 +89,7 @@ def finalize_options(self): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError( - "target version can only be %s, or the '--skip_build'" \ + "target version can only be %s, or the '--skip-build'" \ " option must be specified" % (short_version,)) self.target_version = short_version From 107ea98e7050ff3c6ea4aaf1a3b7f73aef69bfbf Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 10 Oct 2010 09:37:12 +0000 Subject: [PATCH 3070/8469] Issue #9437: Fix building C extensions with non-default LDFLAGS. --- sysconfig.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 48f3fe4d59..8847e31743 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -359,6 +359,11 @@ def parse_makefile(fn, g=None): fp.close() + # strip spurious spaces + for k, v in done.items(): + if isinstance(v, str): + done[k] = v.strip() + # save the results in the global dictionary g.update(done) return g From 8a775b192d5d53db9bf259d3526348be1462df34 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 10 Oct 2010 09:40:34 +0000 Subject: [PATCH 3071/8469] Bump to 3.2a3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 92ed8f4db2..9df61ab029 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2a2" +__version__ = "3.2a3" #--end constants-- From 04895087400890db00af176be74899e4b51a5a84 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 10 Oct 2010 09:54:59 +0000 Subject: [PATCH 3072/8469] Merged revisions 85353 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85353 | antoine.pitrou | 2010-10-10 11:37:12 +0200 (dim., 10 oct. 2010) | 3 lines Issue #9437: Fix building C extensions with non-default LDFLAGS. ........ --- sysconfig.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 4d16b2674c..9888cd52cb 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -318,6 +318,11 @@ def parse_makefile(fn, g=None): fp.close() + # strip spurious spaces + for k, v in done.items(): + if isinstance(v, str): + done[k] = v.strip() + # save the results in the global dictionary g.update(done) return g From f88b5e54e08c0a816c2a0154254959a0056f2184 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 16 Oct 2010 01:04:07 +0000 Subject: [PATCH 3073/8469] First (uncontroversial) part of issue 9807. * Expose the build flags to Python as sys.abiflags * Shared library libpythonX.Y.so * python-config --abiflags * Make two distutils tests that failed with --enable-shared (even before this patch) succeed. * Fix a few small style issues. --- command/build_ext.py | 6 +++--- tests/test_build_ext.py | 26 +++++++++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4e664642b8..cc0d414cf9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -754,9 +754,9 @@ def get_libraries(self, ext): else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = 'python{}.{}{}'.format( + sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, + sys.abiflags) return ext.libraries + [pythonlib] else: return ext.libraries diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 52479d7d37..4351c0f8d5 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,17 +1,16 @@ import sys import os -import tempfile import shutil from io import StringIO -from distutils.core import Extension, Distribution +from distutils.core import Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests.support import TempdirManager from distutils.tests.support import LoggingSilencer from distutils.extension import Extension -from distutils.errors import (UnknownFileError, DistutilsSetupError, - CompileError) +from distutils.errors import ( + CompileError, DistutilsSetupError, UnknownFileError) import unittest from test import support @@ -42,6 +41,20 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE + def _fixup_command(self, cmd): + # When Python was build with --enable-shared, -L. is not good enough + # to find the libpython.so. This is because regrtest runs it + # under a tempdir, not in the top level where the .so lives. By the + # time we've gotten here, Python's already been chdir'd to the + # tempdir. + # + # To further add to the fun, we can't just add library_dirs to the + # Extension() instance because that doesn't get plumbed through to the + # final compiler command. + if not sys.platform.startswith('win'): + library_dir = sysconfig.get_config_var('srcdir') + cmd.library_dirs = [('.' if library_dir is None else library_dir)] + def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -49,6 +62,7 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) + self._fixup_command(cmd) if os.name == "nt": # On Windows, we must build a debug version iff running # a debug build of Python @@ -235,7 +249,8 @@ def test_check_extensions_list(self): cmd.finalize_options() #'extensions' option must be a list of Extension instances - self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, 'foo') + self.assertRaises(DistutilsSetupError, + cmd.check_extensions_list, 'foo') # each element of 'ext_modules' option must be an # Extension instance or 2-tuple @@ -302,6 +317,7 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) + self._fixup_command(cmd) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) From b6d0fe5087a6648ec9541670386eccf38d53018e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 21 Oct 2010 18:46:36 +0000 Subject: [PATCH 3074/8469] Backport fix for #10126 --- tests/test_build_ext.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b7cdc20aa4..04ebc5b1ef 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -42,6 +42,20 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE + def _fixup_command(self, cmd): + # When Python was build with --enable-shared, -L. is not good enough + # to find the libpython.so. This is because regrtest runs it + # under a tempdir, not in the top level where the .so lives. By the + # time we've gotten here, Python's already been chdir'd to the + # tempdir. + # + # To further add to the fun, we can't just add library_dirs to the + # Extension() instance because that doesn't get plumbed through to the + # final compiler command. + if not sys.platform.startswith('win'): + library_dir = sysconfig.get_config_var('srcdir') + cmd.library_dirs = [('.' if library_dir is None else library_dir)] + def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -49,6 +63,7 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) + self._fixup_command(cmd) if os.name == "nt": # On Windows, we must build a debug version iff running # a debug build of Python From d48f22926fe4e190cb1f490661eab6bf2cc61a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 21 Oct 2010 18:48:59 +0000 Subject: [PATCH 3075/8469] Backport fix for #10126 --- tests/test_build_ext.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index beb6d96c8b..154771f2c7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -49,6 +49,20 @@ def tearDown(self): sys.platform == 'cygwin') super(BuildExtTestCase, self).tearDown() + def _fixup_command(self, cmd): + # When Python was build with --enable-shared, -L. is not good enough + # to find the libpython.so. This is because regrtest runs it + # under a tempdir, not in the top level where the .so lives. By the + # time we've gotten here, Python's already been chdir'd to the + # tempdir. + # + # To further add to the fun, we can't just add library_dirs to the + # Extension() instance because that doesn't get plumbed through to the + # final compiler command. + if not sys.platform.startswith('win'): + library_dir = sysconfig.get_config_var('srcdir') + cmd.library_dirs = [('.' if library_dir is None else library_dir)] + @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), 'xxmodule.c not found') def test_build_ext(self): @@ -58,6 +72,7 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) + self._fixup_command(cmd) if os.name == "nt": # On Windows, we must build a debug version iff running # a debug build of Python From 7404daed7bf476fd57a47aac41c64ed48cc78d45 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 21 Oct 2010 22:13:29 +0000 Subject: [PATCH 3076/8469] Fix issue 10126 for Python 2.7 by using $RUNSHARED to find the directory to the shared library. test_distutils now passes when Python was built with --enable-shared. --- tests/test_build_ext.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 154771f2c7..e04593065d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -60,8 +60,12 @@ def _fixup_command(self, cmd): # Extension() instance because that doesn't get plumbed through to the # final compiler command. if not sys.platform.startswith('win'): - library_dir = sysconfig.get_config_var('srcdir') - cmd.library_dirs = [('.' if library_dir is None else library_dir)] + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), 'xxmodule.c not found') @@ -265,6 +269,7 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) + self._fixup_command(cmd) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) From 1415d2f24237092366c384aae24fbb6d17e67abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 21 Oct 2010 23:02:07 +0000 Subject: [PATCH 3077/8469] Apply fix from r85784 on py3k too. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes bug #10126 for Python 3.2 by using $RUNSHARED to find the directory to the shared library. test_distutils now passes when Python was built with --enable-shared (Barry didn’t have the error but I did). --- tests/test_build_ext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4351c0f8d5..6858e5a4b2 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -52,8 +52,12 @@ def _fixup_command(self, cmd): # Extension() instance because that doesn't get plumbed through to the # final compiler command. if not sys.platform.startswith('win'): - library_dir = sysconfig.get_config_var('srcdir') - cmd.library_dirs = [('.' if library_dir is None else library_dir)] + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) def test_build_ext(self): global ALREADY_TESTED From d8c874020da7deef2a07f22929ad75ce5cd74021 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 22 Oct 2010 15:31:44 +0000 Subject: [PATCH 3078/8469] Only hack cmd.library_dirs when running under Py_ENABLE_SHARED. Tested both with and without --enable-shared on Ubuntu 10.10. Hopefully this finally solves bug 10126. Will check 3.1 and py3k next. --- tests/test_build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e04593065d..d14c5f6b10 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -59,7 +59,8 @@ def _fixup_command(self, cmd): # To further add to the fun, we can't just add library_dirs to the # Extension() instance because that doesn't get plumbed through to the # final compiler command. - if not sys.platform.startswith('win'): + if (sysconfig.get_config_var('Py_ENABLE_SHARED') and + not sys.platform.startswith('win')): runshared = sysconfig.get_config_var('RUNSHARED') if runshared is None: cmd.library_dirs = ['.'] From d6acf0666e6011bcf96c64e07c5f95574c1e1fbd Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 22 Oct 2010 17:17:51 +0000 Subject: [PATCH 3079/8469] Only hack cmd.library_dirs when running under Py_ENABLE_SHARED. Tested both with and without --enable-shared on Ubuntu 10.10. Hopefully this finally solves bug 10126. Will check 3.1 next. --- tests/test_build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6858e5a4b2..18e0011743 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -51,7 +51,8 @@ def _fixup_command(self, cmd): # To further add to the fun, we can't just add library_dirs to the # Extension() instance because that doesn't get plumbed through to the # final compiler command. - if not sys.platform.startswith('win'): + if (sysconfig.get_config_var('Py_ENABLE_SHARED') and + not sys.platform.startswith('win')): runshared = sysconfig.get_config_var('RUNSHARED') if runshared is None: cmd.library_dirs = ['.'] From 1208ea17d6e97abffe76f3994d8575be5db3582f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 22 Oct 2010 18:34:13 +0000 Subject: [PATCH 3080/8469] Should fix remaining 3.1 buildbot failure --- tests/test_build_ext.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 04ebc5b1ef..226f7bb1fe 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -52,9 +52,14 @@ def _fixup_command(self, cmd): # To further add to the fun, we can't just add library_dirs to the # Extension() instance because that doesn't get plumbed through to the # final compiler command. - if not sys.platform.startswith('win'): - library_dir = sysconfig.get_config_var('srcdir') - cmd.library_dirs = [('.' if library_dir is None else library_dir)] + if (sysconfig.get_config_var('Py_ENABLE_SHARED') and + not sys.platform.startswith('win')): + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) def test_build_ext(self): global ALREADY_TESTED @@ -317,6 +322,7 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) + self._fixup_command(cmd) cmd.ensure_finalized() self.assertEquals(len(cmd.get_outputs()), 1) From c4405aad904aac1948e1798945118759ef677af6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 23 Oct 2010 17:02:31 +0000 Subject: [PATCH 3081/8469] Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source code directory name contains a non-ASCII character and the locale encoding is ASCII. --- sysconfig.py | 2 +- text_file.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 8847e31743..6b5daa5190 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -271,7 +271,7 @@ def parse_makefile(fn, g=None): used instead of a new dictionary. """ from distutils.text_file import TextFile - fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) + fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape") if g is None: g = {} diff --git a/text_file.py b/text_file.py index 97459fbf73..454725c626 100644 --- a/text_file.py +++ b/text_file.py @@ -58,6 +58,8 @@ class TextFile: collapse_join [default: false] strip leading whitespace from lines that are joined to their predecessor; only matters if (join_lines and not lstrip_ws) + errors [default: 'strict'] + error handler used to decode the file content Note that since 'rstrip_ws' can strip the trailing newline, the semantics of 'readline()' must differ from those of the builtin file @@ -72,6 +74,7 @@ class TextFile: 'rstrip_ws': 1, 'join_lines': 0, 'collapse_join': 0, + 'errors': 'strict', } def __init__(self, filename=None, file=None, **options): @@ -111,7 +114,7 @@ def open(self, filename): """Open a new file named 'filename'. This overrides both the 'filename' and 'file' arguments to the constructor.""" self.filename = filename - self.file = io.open(self.filename, 'r') + self.file = io.open(self.filename, 'r', errors=self.errors) self.current_line = 0 def close(self): From 91b89f544e774b04a09af9d1849334f4f7dc20b5 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 29 Oct 2010 22:36:08 +0000 Subject: [PATCH 3082/8469] Have distutils.sysconfig close a file to remove ResourceWarnings coming up during the build from setup.py. --- sysconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 6b5daa5190..8b55f217cd 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -413,7 +413,8 @@ def _init_posix(): # load the installed pyconfig.h: try: filename = get_config_h_filename() - parse_config_h(io.open(filename), g) + with open(filename) as file: + parse_config_h(file, g) except IOError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): From 3b9b511708f987254fdcfdc5fc0f020d7a0ab923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 5 Nov 2010 23:51:56 +0000 Subject: [PATCH 3083/8469] Always close files in distutils code and tests (#10252). --- ccompiler.py | 10 ++- command/bdist_wininst.py | 6 +- command/upload.py | 6 +- core.py | 6 +- cygwinccompiler.py | 5 +- dist.py | 8 +- emxccompiler.py | 12 ++- extension.py | 155 ++++++++++++++++++------------------ file_util.py | 8 +- tests/test_build_py.py | 12 ++- tests/test_build_scripts.py | 6 +- tests/test_config.py | 8 +- tests/test_core.py | 6 +- tests/test_dir_util.py | 6 +- tests/test_dist.py | 40 +++++----- tests/test_file_util.py | 6 +- tests/test_install.py | 5 +- tests/test_msvc9compiler.py | 14 ++-- tests/test_register.py | 8 +- tests/test_sdist.py | 8 +- tests/test_sysconfig.py | 16 ++-- tests/test_text_file.py | 52 ++++++++---- util.py | 16 ++-- 23 files changed, 253 insertions(+), 166 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 34c77a37a3..291c008f20 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -779,14 +779,16 @@ def has_function(self, funcname, includes=None, include_dirs=None, library_dirs = [] fd, fname = tempfile.mkstemp(".c", funcname, text=True) f = os.fdopen(fd, "w") - for incl in includes: - f.write("""#include "%s"\n""" % incl) - f.write("""\ + try: + for incl in includes: + f.write("""#include "%s"\n""" % incl) + f.write("""\ main (int argc, char **argv) { %s(); } """ % funcname) - f.close() + finally: + f.close() try: objects = self.compile([fname], include_dirs=include_dirs) except CompileError: diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3aa1dac7f3..b2e2fc6dc8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -340,4 +340,8 @@ def get_exe_bytes(self): sfix = '' filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) - return open(filename, "rb").read() + f = open(filename, "rb") + try: + return f.read() + finally: + f.close() diff --git a/command/upload.py b/command/upload.py index 99e03d747c..4926aa3e15 100644 --- a/command/upload.py +++ b/command/upload.py @@ -76,7 +76,11 @@ def upload_file(self, command, pyversion, filename): # Fill in the data - send all the meta-data in case we need to # register a new release - content = open(filename,'rb').read() + f = open(filename,'rb') + try: + content = f.read() + finally: + f.close() meta = self.distribution.metadata data = { # action diff --git a/core.py b/core.py index 6e4892039e..fd2a43d7d2 100644 --- a/core.py +++ b/core.py @@ -215,7 +215,11 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - exec(open(script_name).read(), g, l) + f = open(script_name) + try: + exec(f.read(), g, l) + finally: + f.close() finally: sys.argv = save_argv _setup_stop_after = None diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 8504371810..95fa3ed3c8 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -350,11 +350,14 @@ def check_config_h(): # let's see if __GNUC__ is mentioned in python.h fn = sysconfig.get_config_h_filename() try: - with open(fn) as config_h: + config_h = open(fn) + try: if "__GNUC__" in config_h.read(): return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn else: return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn + finally: + config_h.close() except IOError as exc: return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) diff --git a/dist.py b/dist.py index 1c1ea477db..01f1f1cfc0 100644 --- a/dist.py +++ b/dist.py @@ -1012,9 +1012,11 @@ def __init__ (self): def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ - pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - self.write_pkg_file(pkg_info) - pkg_info.close() + pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w') + try: + self.write_pkg_file(pkg_info) + finally: + pkg_info.close() def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. diff --git a/emxccompiler.py b/emxccompiler.py index 62a4c5b4e8..16dce53524 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -270,8 +270,10 @@ def check_config_h(): # It would probably better to read single lines to search. # But we do this only once, and it is fast enough f = open(fn) - s = f.read() - f.close() + try: + s = f.read() + finally: + f.close() except IOError as exc: # if we can't read this file, we cannot say it is wrong @@ -298,8 +300,10 @@ def get_versions(): gcc_exe = find_executable('gcc') if gcc_exe: out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() + try: + out_string = out.read() + finally: + out.close() result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) if result: gcc_version = StrictVersion(result.group(1)) diff --git a/extension.py b/extension.py index 5c07bdae82..2d1c36bd5c 100644 --- a/extension.py +++ b/extension.py @@ -149,84 +149,87 @@ def read_setup_file(filename): file = TextFile(filename, strip_comments=1, skip_blanks=1, join_lines=1, lstrip_ws=1, rstrip_ws=1) - extensions = [] - - while True: - line = file.readline() - if line is None: # eof - break - if _variable_rx.match(line): # VAR=VALUE, handled in first pass - continue - - if line[0] == line[-1] == "*": - file.warn("'%s' lines not handled yet" % line) - continue - - line = expand_makefile_vars(line, vars) - words = split_quoted(line) - - # NB. this parses a slightly different syntax than the old - # makesetup script: here, there must be exactly one extension per - # line, and it must be the first word of the line. I have no idea - # why the old syntax supported multiple extensions per line, as - # they all wind up being the same. - - module = words[0] - ext = Extension(module, []) - append_next_word = None - - for word in words[1:]: - if append_next_word is not None: - append_next_word.append(word) - append_next_word = None + try: + extensions = [] + + while True: + line = file.readline() + if line is None: # eof + break + if _variable_rx.match(line): # VAR=VALUE, handled in first pass continue - suffix = os.path.splitext(word)[1] - switch = word[0:2] ; value = word[2:] - - if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): - # hmm, should we do something about C vs. C++ sources? - # or leave it up to the CCompiler implementation to - # worry about? - ext.sources.append(word) - elif switch == "-I": - ext.include_dirs.append(value) - elif switch == "-D": - equals = value.find("=") - if equals == -1: # bare "-DFOO" -- no value - ext.define_macros.append((value, None)) - else: # "-DFOO=blah" - ext.define_macros.append((value[0:equals], - value[equals+2:])) - elif switch == "-U": - ext.undef_macros.append(value) - elif switch == "-C": # only here 'cause makesetup has it! - ext.extra_compile_args.append(word) - elif switch == "-l": - ext.libraries.append(value) - elif switch == "-L": - ext.library_dirs.append(value) - elif switch == "-R": - ext.runtime_library_dirs.append(value) - elif word == "-rpath": - append_next_word = ext.runtime_library_dirs - elif word == "-Xlinker": - append_next_word = ext.extra_link_args - elif word == "-Xcompiler": - append_next_word = ext.extra_compile_args - elif switch == "-u": - ext.extra_link_args.append(word) - if not value: + if line[0] == line[-1] == "*": + file.warn("'%s' lines not handled yet" % line) + continue + + line = expand_makefile_vars(line, vars) + words = split_quoted(line) + + # NB. this parses a slightly different syntax than the old + # makesetup script: here, there must be exactly one extension per + # line, and it must be the first word of the line. I have no idea + # why the old syntax supported multiple extensions per line, as + # they all wind up being the same. + + module = words[0] + ext = Extension(module, []) + append_next_word = None + + for word in words[1:]: + if append_next_word is not None: + append_next_word.append(word) + append_next_word = None + continue + + suffix = os.path.splitext(word)[1] + switch = word[0:2] ; value = word[2:] + + if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): + # hmm, should we do something about C vs. C++ sources? + # or leave it up to the CCompiler implementation to + # worry about? + ext.sources.append(word) + elif switch == "-I": + ext.include_dirs.append(value) + elif switch == "-D": + equals = value.find("=") + if equals == -1: # bare "-DFOO" -- no value + ext.define_macros.append((value, None)) + else: # "-DFOO=blah" + ext.define_macros.append((value[0:equals], + value[equals+2:])) + elif switch == "-U": + ext.undef_macros.append(value) + elif switch == "-C": # only here 'cause makesetup has it! + ext.extra_compile_args.append(word) + elif switch == "-l": + ext.libraries.append(value) + elif switch == "-L": + ext.library_dirs.append(value) + elif switch == "-R": + ext.runtime_library_dirs.append(value) + elif word == "-rpath": + append_next_word = ext.runtime_library_dirs + elif word == "-Xlinker": append_next_word = ext.extra_link_args - elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): - # NB. a really faithful emulation of makesetup would - # append a .o file to extra_objects only if it - # had a slash in it; otherwise, it would s/.o/.c/ - # and append it to sources. Hmmmm. - ext.extra_objects.append(word) - else: - file.warn("unrecognized argument '%s'" % word) - - extensions.append(ext) + elif word == "-Xcompiler": + append_next_word = ext.extra_compile_args + elif switch == "-u": + ext.extra_link_args.append(word) + if not value: + append_next_word = ext.extra_link_args + elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): + # NB. a really faithful emulation of makesetup would + # append a .o file to extra_objects only if it + # had a slash in it; otherwise, it would s/.o/.c/ + # and append it to sources. Hmmmm. + ext.extra_objects.append(word) + else: + file.warn("unrecognized argument '%s'" % word) + + extensions.append(ext) + finally: + file.close() return extensions diff --git a/file_util.py b/file_util.py index 65aa7e0fdd..c36e7128d0 100644 --- a/file_util.py +++ b/file_util.py @@ -234,6 +234,8 @@ def write_file (filename, contents): sequence of strings without line terminators) to it. """ f = open(filename, "w") - for line in contents: - f.write(line + "\n") - f.close() + try: + for line in contents: + f.write(line + "\n") + finally: + f.close() diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 3e45f6e89e..8a69aaa0d6 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -19,11 +19,15 @@ class BuildPyTestCase(support.TempdirManager, def test_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") - f.write("# Pretend this is a package.") - f.close() + try: + f.write("# Pretend this is a package.") + finally: + f.close() f = open(os.path.join(sources, "README.txt"), "w") - f.write("Info about this package") - f.close() + try: + f.write("Info about this package") + finally: + f.close() destination = self.mkdtemp() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b1d2d079bd..85b0400460 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -71,8 +71,10 @@ def write_sample_scripts(self, dir): def write_script(self, dir, name, text): f = open(os.path.join(dir, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() def test_version_int(self): source = self.mkdtemp() diff --git a/tests/test_config.py b/tests/test_config.py index 71c63678f8..6a45a328b6 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -105,8 +105,12 @@ def test_server_empty_registration(self): self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') self.assertTrue(os.path.exists(rc)) - content = open(rc).read() - self.assertEquals(content, WANTED) + f = open(rc) + try: + content = f.read() + self.assertEquals(content, WANTED) + finally: + f.close() def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index b478fa6291..e937b45a6b 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -52,7 +52,11 @@ def cleanup_testfn(self): shutil.rmtree(path) def write_setup(self, text, path=test.support.TESTFN): - open(path, "w").write(text) + f = open(path, "w") + try: + f.write(text) + finally: + f.close() return path def test_run_setup_provides_file(self): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index a1647fbcf5..aa9f9ebb9f 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -88,8 +88,10 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) a_file = os.path.join(self.target, 'ok.txt') f = open(a_file, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) diff --git a/tests/test_dist.py b/tests/test_dist.py index 007803e12d..ee8e8d4dae 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -79,29 +79,29 @@ def test_command_packages_cmdline(self): def test_command_packages_configfile(self): sys.argv.append("build") + self.addCleanup(os.unlink, TESTFN) f = open(TESTFN, "w") try: print("[global]", file=f) print("command_packages = foo.bar, splat", file=f) + finally: f.close() - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "foo.bar", "splat"]) - - # ensure command line overrides config: - sys.argv[1:] = ["--command-packages", "spork", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "spork"]) - - # Setting --command-packages to '' should cause the default to - # be used even if a config file specified something else: - sys.argv[1:] = ["--command-packages", "", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), ["distutils.command"]) - finally: - os.unlink(TESTFN) + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "foo.bar", "splat"]) + + # ensure command line overrides config: + sys.argv[1:] = ["--command-packages", "spork", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "spork"]) + + # Setting --command-packages to '' should cause the default to + # be used even if a config file specified something else: + sys.argv[1:] = ["--command-packages", "", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_empty_options(self): # an empty options dictionary should not stay in the @@ -260,8 +260,10 @@ def test_custom_pydistutils(self): temp_dir = self.mkdtemp() user_filename = os.path.join(temp_dir, user_filename) f = open(user_filename, 'w') - f.write('.') - f.close() + try: + f.write('.') + finally: + f.close() try: dist = Distribution() diff --git a/tests/test_file_util.py b/tests/test_file_util.py index fac4a5d1a9..74618b523a 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -31,8 +31,10 @@ def tearDown(self): def test_move_file_verbosity(self): f = open(self.source, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() move_file(self.source, self.target, verbose=0) wanted = [] diff --git a/tests/test_install.py b/tests/test_install.py index 76fa02acda..bc407cf9ab 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -182,8 +182,11 @@ def test_record(self): # let's check the RECORD file was created with one # line (the egg info file) - with open(cmd.record) as f: + f = open(cmd.record) + try: self.assertEquals(len(f.readlines()), 1) + finally: + f.close() def test_debug_mode(self): # this covers the code called when DEBUG is set diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index f1da843fab..40cb8be6d1 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -113,17 +113,21 @@ def test_remove_visual_c_ref(self): tempdir = self.mkdtemp() manifest = os.path.join(tempdir, 'manifest') f = open(manifest, 'w') - f.write(_MANIFEST) - f.close() + try: + f.write(_MANIFEST) + finally: + f.close() compiler = MSVCCompiler() compiler._remove_visual_c_ref(manifest) # see what we got f = open(manifest) - # removing trailing spaces - content = '\n'.join([line.rstrip() for line in f.readlines()]) - f.close() + try: + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + finally: + f.close() # makes sure the manifest was properly cleaned self.assertEquals(content, _CLEANED_MANIFEST) diff --git a/tests/test_register.py b/tests/test_register.py index 7d0ac9ee3a..3b80b6dc05 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -118,8 +118,12 @@ def test_create_pypirc(self): self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC - content = open(self.rc).read() - self.assertEquals(content, WANTED_PYPIRC) + f = open(self.rc) + try: + content = f.read() + self.assertEquals(content, WANTED_PYPIRC) + finally: + f.close() # now let's make sure the .pypirc file generated # really works : we shouldn't be asked anything diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 209aa59baf..ad527c7dd6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -215,8 +215,12 @@ def test_add_defaults(self): self.assertEquals(len(content), 11) # checking the MANIFEST - manifest = open(join(self.tmp_dir, 'MANIFEST')).read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + f = open(join(self.tmp_dir, 'MANIFEST')) + try: + manifest = f.read() + self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + finally: + f.close() def test_metadata_check_option(self): # testing the `medata-check` option diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 0167e0f1a3..215dc82df0 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -75,9 +75,11 @@ def set_executables(self, **kw): def test_parse_makefile_base(self): self.makefile = TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'}) @@ -85,9 +87,11 @@ def test_parse_makefile_base(self): def test_parse_makefile_literal_dollar(self): self.makefile = TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", 'OTHER': 'foo'}) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 00f083a130..3093097dba 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -58,28 +58,46 @@ def test_input(count, description, file, expected_result): finally: out_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (1, "no processing", in_file, result1) + in_file = TextFile(filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(1, "no processing", in_file, result1) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (2, "strip comments", in_file, result2) + in_file = TextFile(filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(2, "strip comments", in_file, result2) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input (3, "strip blanks", in_file, result3) + in_file = TextFile(filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(3, "strip blanks", in_file, result3) + finally: + in_file.close() - in_file = TextFile (filename) - test_input (4, "default processing", in_file, result4) + in_file = TextFile(filename) + try: + test_input(4, "default processing", in_file, result4) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input (5, "join lines without collapsing", in_file, result5) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + try: + test_input(5, "join lines without collapsing", in_file, result5) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input (6, "join lines with collapsing", in_file, result6) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + try: + test_input(6, "join lines with collapsing", in_file, result6) + finally: + in_file.close() def test_suite(): return unittest.makeSuite(TextFileTestCase) diff --git a/util.py b/util.py index 8175434586..3081245b62 100644 --- a/util.py +++ b/util.py @@ -115,13 +115,15 @@ def get_platform (): # behaviour. pass else: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - f.close() - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour + try: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + if m is not None: + macrelease = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + finally: + f.close() if not macver: macver = macrelease From 41c052c438ce9e6f236c7015a228c3b9b1cdda2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 5 Nov 2010 23:59:32 +0000 Subject: [PATCH 3084/8469] Of course, I forgot one file in r86223. --- tests/test_install_scripts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index b7eb625ac5..08360d297b 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -42,8 +42,10 @@ def test_installation(self): def write_script(name, text): expected.append(name) f = open(os.path.join(source, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() write_script("script1.py", ("#! /usr/bin/env python2.3\n" "# bogus script w/ Python sh-bang\n" From 522ffa25d2d5d28511e8e104ff7497a36705365e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 02:10:32 +0000 Subject: [PATCH 3085/8469] Also close file descriptors from os.popen and subprocess.Popen --- command/bdist_rpm.py | 36 ++++++++++++++++++++---------------- msvc9compiler.py | 10 ++++++---- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 452f9502ad..e2ae877d9a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -343,22 +343,26 @@ def run(self): src_rpm, non_src_rpm, spec_path) out = os.popen(q_cmd) - binary_rpms = [] - source_rpm = None - while True: - line = out.readline() - if not line: - break - l = line.strip().split() - assert(len(l) == 2) - binary_rpms.append(l[1]) - # The source rpm is named after the first entry in the spec file - if source_rpm is None: - source_rpm = l[0] - - status = out.close() - if status: - raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + try: + binary_rpms = [] + source_rpm = None + while True: + line = out.readline() + if not line: + break + l = line.strip().split() + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + + finally: + out.close() self.spawn(rpm_cmd) diff --git a/msvc9compiler.py b/msvc9compiler.py index 761b9ca236..6d7825df86 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -263,10 +263,12 @@ def query_vcvarsall(version, arch="x86"): popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - stdout, stderr = popen.communicate() - if popen.wait() != 0: - raise DistutilsPlatformError(stderr.decode("mbcs")) + try: + stdout, stderr = popen.communicate() + if popen.wait() != 0: + raise DistutilsPlatformError(stderr.decode("mbcs")) + finally: + popen.close() stdout = stdout.decode("mbcs") for line in stdout.split("\n"): From 74c3638728339edf3a8a99dbd61875e9ce624e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 02:44:43 +0000 Subject: [PATCH 3086/8469] Make sure each test can be run standalone (./python Lib/distutils/tests/x.py) --- tests/__init__.py | 5 +++-- tests/test_archive_util.py | 4 ++-- tests/test_bdist.py | 3 ++- tests/test_bdist_dumb.py | 3 ++- tests/test_bdist_msi.py | 2 +- tests/test_bdist_rpm.py | 3 ++- tests/test_bdist_wininst.py | 3 ++- tests/test_build.py | 3 ++- tests/test_build_clib.py | 4 +++- tests/test_build_ext.py | 1 + tests/test_build_py.py | 3 ++- tests/test_build_scripts.py | 3 ++- tests/test_check.py | 3 ++- tests/test_clean.py | 3 ++- tests/test_cmd.py | 6 +++--- tests/test_config.py | 3 ++- tests/test_config_cmd.py | 3 ++- tests/test_core.py | 4 ++-- tests/test_cygwinccompiler.py | 3 ++- tests/test_dep_util.py | 3 ++- tests/test_dir_util.py | 3 ++- tests/test_dist.py | 4 ++-- tests/test_extension.py | 4 ++-- tests/test_file_util.py | 3 ++- tests/test_filelist.py | 4 ++-- tests/test_install.py | 4 ++-- tests/test_install_data.py | 3 ++- tests/test_install_headers.py | 3 ++- tests/test_install_lib.py | 3 ++- tests/test_install_scripts.py | 3 ++- tests/test_log.py | 3 ++- tests/test_msvc9compiler.py | 3 ++- tests/test_register.py | 4 ++-- tests/test_sdist.py | 8 +++----- tests/test_spawn.py | 4 ++-- tests/test_text_file.py | 3 ++- tests/test_unixccompiler.py | 3 ++- tests/test_upload.py | 5 ++--- tests/test_util.py | 3 ++- tests/test_version.py | 3 ++- tests/test_versionpredicate.py | 4 ++++ 41 files changed, 86 insertions(+), 56 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 7bdb912463..1b939cbd5d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,9 +15,10 @@ import os import sys import unittest +from test.support import run_unittest -here = os.path.dirname(__file__) +here = os.path.dirname(__file__) or os.curdir def test_suite(): @@ -32,4 +33,4 @@ def test_suite(): if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index c6e08cbc2b..9e6264aa89 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -12,7 +12,7 @@ ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import check_warnings +from test.support import check_warnings, run_unittest try: import zipfile @@ -211,4 +211,4 @@ def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index f2849a9756..bf56e842b7 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -4,6 +4,7 @@ import os import tempfile import shutil +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist import bdist @@ -40,4 +41,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 5e76809f23..7d9d0aa834 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -3,6 +3,7 @@ import unittest import sys import os +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb @@ -77,4 +78,4 @@ def test_suite(): return unittest.makeSuite(BuildDumbTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 2b2d8542ee..9308c79d91 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -11,7 +11,7 @@ class BDistMSITestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def test_minial(self): + def test_minimal(self): # minimal test XXX need more tests from distutils.command.bdist_msi import bdist_msi pkg_pth, dist = self.create_dist() diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2aa257f7e6..804fb1355f 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -5,6 +5,7 @@ import os import tempfile import shutil +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm @@ -122,4 +123,4 @@ def test_suite(): return unittest.makeSuite(BuildRpmTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 9b1ba6d107..f9e8f89e21 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,5 +1,6 @@ """Tests for distutils.command.bdist_wininst.""" import unittest +from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -27,4 +28,4 @@ def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_build.py b/tests/test_build.py index 2418e1656d..9f0e0ad23c 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -2,6 +2,7 @@ import unittest import os import sys +from test.support import run_unittest from distutils.command.build import build from distutils.tests import support @@ -51,4 +52,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 536cd67319..e59b8f9a19 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -3,6 +3,8 @@ import os import sys +from test.support import run_unittest + from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support @@ -141,4 +143,4 @@ def test_suite(): return unittest.makeSuite(BuildCLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 18e0011743..46ac9aafc3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -14,6 +14,7 @@ import unittest from test import support +from test.support import run_unittest # http://bugs.python.org/issue4373 # Don't load the xx module more than once. diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 8a69aaa0d6..da3232cea8 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -10,6 +10,7 @@ from distutils.errors import DistutilsFileError from distutils.tests import support +from test.support import run_unittest class BuildPyTestCase(support.TempdirManager, @@ -114,4 +115,4 @@ def test_suite(): return unittest.makeSuite(BuildPyTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 85b0400460..e3326b8517 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -8,6 +8,7 @@ from distutils import sysconfig from distutils.tests import support +from test.support import run_unittest class BuildScriptsTestCase(support.TempdirManager, @@ -108,4 +109,4 @@ def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_check.py b/tests/test_check.py index 372bae367b..6ad2fe3920 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,5 +1,6 @@ """Tests for distutils.command.check.""" import unittest +from test.support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support @@ -95,4 +96,4 @@ def test_suite(): return unittest.makeSuite(CheckTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_clean.py b/tests/test_clean.py index dbc4ee2a18..649855f7ab 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -6,6 +6,7 @@ from distutils.command.clean import clean from distutils.tests import support +from test.support import run_unittest class cleanTestCase(support.TempdirManager, support.LoggingSilencer, @@ -47,4 +48,4 @@ def test_suite(): return unittest.makeSuite(cleanTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 55ae421d46..969f82ba0f 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,7 +1,7 @@ """Tests for distutils.cmd.""" import unittest import os -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.cmd import Command from distutils.dist import Distribution @@ -99,7 +99,7 @@ def test_ensure_filename(self): def test_ensure_dirname(self): cmd = self.cmd - cmd.option1 = os.path.dirname(__file__) + cmd.option1 = os.path.dirname(__file__) or os.curdir cmd.ensure_dirname('option1') cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') @@ -124,4 +124,4 @@ def test_suite(): return unittest.makeSuite(CommandTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_config.py b/tests/test_config.py index 6a45a328b6..05a35da903 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -10,6 +10,7 @@ from distutils.log import WARN from distutils.tests import support +from test.support import run_unittest PYPIRC = """\ [distutils] @@ -116,4 +117,4 @@ def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index ef2e7bc317..c224a5c36d 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,6 +2,7 @@ import unittest import os import sys +from test.support import run_unittest from distutils.command.config import dump_file, config from distutils.tests import support @@ -86,4 +87,4 @@ def test_suite(): return unittest.makeSuite(ConfigTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_core.py b/tests/test_core.py index e937b45a6b..47fae245e7 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,7 +6,7 @@ import shutil import sys import test.support -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest import unittest from distutils.tests import support @@ -105,4 +105,4 @@ def test_suite(): return unittest.makeSuite(CoreTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index a57694d48e..e57bab269a 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -4,6 +4,7 @@ import os from io import BytesIO import subprocess +from test.support import run_unittest from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, @@ -151,4 +152,4 @@ def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index d81d9143b4..390ed9b602 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -6,6 +6,7 @@ from distutils.dep_util import newer, newer_pairwise, newer_group from distutils.errors import DistutilsFileError from distutils.tests import support +from test.support import run_unittest class DepUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -77,4 +78,4 @@ def test_suite(): return unittest.makeSuite(DepUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index aa9f9ebb9f..7356c766e6 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -10,6 +10,7 @@ from distutils import log from distutils.tests import support +from test.support import run_unittest class DirUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -112,4 +113,4 @@ def test_suite(): return unittest.makeSuite(DirUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dist.py b/tests/test_dist.py index ee8e8d4dae..a8eb8b1d5a 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -9,7 +9,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command -from test.support import TESTFN, captured_stdout +from test.support import TESTFN, captured_stdout, run_unittest from distutils.tests import support @@ -325,4 +325,4 @@ def test_suite(): return suite if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_extension.py b/tests/test_extension.py index 1ee30585fa..c9c8965706 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -3,7 +3,7 @@ import os import warnings -from test.support import check_warnings +from test.support import check_warnings, run_unittest from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): @@ -66,4 +66,4 @@ def test_suite(): return unittest.makeSuite(ExtensionTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 74618b523a..be743f3436 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -6,6 +6,7 @@ from distutils.file_util import move_file from distutils import log from distutils.tests import support +from test.support import run_unittest class FileUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -62,4 +63,4 @@ def test_suite(): return unittest.makeSuite(FileUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 331180d235..6312a29485 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -2,7 +2,7 @@ import unittest from distutils.filelist import glob_to_re, FileList -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils import debug class FileListTestCase(unittest.TestCase): @@ -39,4 +39,4 @@ def test_suite(): return unittest.makeSuite(FileListTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install.py b/tests/test_install.py index bc407cf9ab..22e79b8909 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -6,7 +6,7 @@ import unittest import site -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.command.install import install from distutils.command import install as install_module @@ -203,4 +203,4 @@ def test_suite(): return unittest.makeSuite(InstallTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 377ae86e2f..6b3b4c82ce 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -6,6 +6,7 @@ from distutils.command.install_data import install_data from distutils.tests import support +from test.support import run_unittest class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, @@ -73,4 +74,4 @@ def test_suite(): return unittest.makeSuite(InstallDataTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 5b32b13ee4..dc74c58d6c 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -6,6 +6,7 @@ from distutils.command.install_headers import install_headers from distutils.tests import support +from test.support import run_unittest class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, @@ -37,4 +38,4 @@ def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 99a6d90627..790d4ce300 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -7,6 +7,7 @@ from distutils.extension import Extension from distutils.tests import support from distutils.errors import DistutilsOptionError +from test.support import run_unittest class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, @@ -98,4 +99,4 @@ def test_suite(): return unittest.makeSuite(InstallLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 08360d297b..8952e744e5 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -7,6 +7,7 @@ from distutils.core import Distribution from distutils.tests import support +from test.support import run_unittest class InstallScriptsTestCase(support.TempdirManager, @@ -78,4 +79,4 @@ def test_suite(): return unittest.makeSuite(InstallScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_log.py b/tests/test_log.py index d35de3456c..5f87076bd7 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -3,6 +3,7 @@ import sys import unittest from tempfile import NamedTemporaryFile +from test.support import run_unittest from distutils import log @@ -33,4 +34,4 @@ def test_suite(): return unittest.makeSuite(TestLog) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 40cb8be6d1..45bae77a6c 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -5,6 +5,7 @@ from distutils.errors import DistutilsPlatformError from distutils.tests import support +from test.support import run_unittest _MANIFEST = """\ @@ -137,4 +138,4 @@ def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_register.py b/tests/test_register.py index 3b80b6dc05..9336ac8604 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -6,7 +6,7 @@ import urllib import warnings -from test.support import check_warnings +from test.support import check_warnings, run_unittest from distutils.command import register as register_module from distutils.command.register import register @@ -259,4 +259,4 @@ def test_suite(): return unittest.makeSuite(RegisterTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index ad527c7dd6..73962d34f2 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -8,11 +8,9 @@ import tempfile import warnings -from test.support import check_warnings -from test.support import captured_stdout +from test.support import captured_stdout, check_warnings, run_unittest -from distutils.command.sdist import sdist -from distutils.command.sdist import show_formats +from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -358,4 +356,4 @@ def test_suite(): return unittest.makeSuite(SDistTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 950e5789b5..5b91aa5a11 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -2,7 +2,7 @@ import unittest import os import time -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.spawn import _nt_quote_args from distutils.spawn import spawn, find_executable @@ -55,4 +55,4 @@ def test_suite(): return unittest.makeSuite(SpawnTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 3093097dba..953cb8ea08 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -3,6 +3,7 @@ import unittest from distutils.text_file import TextFile from distutils.tests import support +from test.support import run_unittest TEST_DATA = """# test file @@ -103,4 +104,4 @@ def test_suite(): return unittest.makeSuite(TextFileTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 3a41e6fcaa..1bff38e9ee 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,6 +1,7 @@ """Tests for distutils.unixccompiler.""" import sys import unittest +from test.support import run_unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler @@ -118,4 +119,4 @@ def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_upload.py b/tests/test_upload.py index 35e970051e..4661ed3212 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,13 +1,12 @@ """Tests for distutils.command.upload.""" -import sys import os import unittest import http.client as httpclient +from test.support import run_unittest from distutils.command.upload import upload from distutils.core import Distribution -from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase PYPIRC_LONG_PASSWORD = """\ @@ -136,4 +135,4 @@ def test_suite(): return unittest.makeSuite(uploadTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_util.py b/tests/test_util.py index 0c732f8244..3b7159d72f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -3,6 +3,7 @@ import sys import unittest from copy import copy +from test.support import run_unittest from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, @@ -274,4 +275,4 @@ def test_suite(): return unittest.makeSuite(UtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_version.py b/tests/test_version.py index fa21433046..ff40f6b45c 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -2,6 +2,7 @@ import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion +from test.support import run_unittest class VersionTestCase(unittest.TestCase): @@ -67,4 +68,4 @@ def test_suite(): return unittest.makeSuite(VersionTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_versionpredicate.py b/tests/test_versionpredicate.py index 8a60dbe806..28ae09dc20 100644 --- a/tests/test_versionpredicate.py +++ b/tests/test_versionpredicate.py @@ -4,6 +4,10 @@ import distutils.versionpredicate import doctest +from test.support import run_unittest def test_suite(): return doctest.DocTestSuite(distutils.versionpredicate) + +if __name__ == '__main__': + run_unittest(test_suite()) From c705a947d03d1505af6e1aeed5db58860fd5b717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 02:58:56 +0000 Subject: [PATCH 3087/8469] Merged revisions 86223-86224,86226,86234 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines Always close files in distutils code and tests (#10252). ........ r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines Add missing entry for r86223. ........ r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines Of course, I forgot one file in r86223. ........ r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines Also close file descriptors from os.popen and subprocess.Popen ........ --- ccompiler.py | 10 ++- command/bdist_rpm.py | 36 ++++---- command/bdist_wininst.py | 6 +- command/upload.py | 6 +- core.py | 6 +- cygwinccompiler.py | 5 +- dist.py | 8 +- emxccompiler.py | 12 ++- extension.py | 155 +++++++++++++++++----------------- file_util.py | 8 +- msvc9compiler.py | 10 ++- tests/test_build_py.py | 12 ++- tests/test_build_scripts.py | 6 +- tests/test_config.py | 8 +- tests/test_core.py | 6 +- tests/test_dir_util.py | 6 +- tests/test_dist.py | 40 ++++----- tests/test_file_util.py | 6 +- tests/test_install.py | 5 +- tests/test_install_scripts.py | 6 +- tests/test_msvc9compiler.py | 14 +-- tests/test_register.py | 8 +- tests/test_sdist.py | 8 +- tests/test_sysconfig.py | 16 ++-- tests/test_text_file.py | 52 ++++++++---- util.py | 16 ++-- 26 files changed, 283 insertions(+), 188 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 34c77a37a3..291c008f20 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -779,14 +779,16 @@ def has_function(self, funcname, includes=None, include_dirs=None, library_dirs = [] fd, fname = tempfile.mkstemp(".c", funcname, text=True) f = os.fdopen(fd, "w") - for incl in includes: - f.write("""#include "%s"\n""" % incl) - f.write("""\ + try: + for incl in includes: + f.write("""#include "%s"\n""" % incl) + f.write("""\ main (int argc, char **argv) { %s(); } """ % funcname) - f.close() + finally: + f.close() try: objects = self.compile([fname], include_dirs=include_dirs) except CompileError: diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 452f9502ad..e2ae877d9a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -343,22 +343,26 @@ def run(self): src_rpm, non_src_rpm, spec_path) out = os.popen(q_cmd) - binary_rpms = [] - source_rpm = None - while True: - line = out.readline() - if not line: - break - l = line.strip().split() - assert(len(l) == 2) - binary_rpms.append(l[1]) - # The source rpm is named after the first entry in the spec file - if source_rpm is None: - source_rpm = l[0] - - status = out.close() - if status: - raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + try: + binary_rpms = [] + source_rpm = None + while True: + line = out.readline() + if not line: + break + l = line.strip().split() + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + + finally: + out.close() self.spawn(rpm_cmd) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3aa1dac7f3..b2e2fc6dc8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -340,4 +340,8 @@ def get_exe_bytes(self): sfix = '' filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) - return open(filename, "rb").read() + f = open(filename, "rb") + try: + return f.read() + finally: + f.close() diff --git a/command/upload.py b/command/upload.py index 99e03d747c..4926aa3e15 100644 --- a/command/upload.py +++ b/command/upload.py @@ -76,7 +76,11 @@ def upload_file(self, command, pyversion, filename): # Fill in the data - send all the meta-data in case we need to # register a new release - content = open(filename,'rb').read() + f = open(filename,'rb') + try: + content = f.read() + finally: + f.close() meta = self.distribution.metadata data = { # action diff --git a/core.py b/core.py index 6e4892039e..fd2a43d7d2 100644 --- a/core.py +++ b/core.py @@ -215,7 +215,11 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - exec(open(script_name).read(), g, l) + f = open(script_name) + try: + exec(f.read(), g, l) + finally: + f.close() finally: sys.argv = save_argv _setup_stop_after = None diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 8504371810..95fa3ed3c8 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -350,11 +350,14 @@ def check_config_h(): # let's see if __GNUC__ is mentioned in python.h fn = sysconfig.get_config_h_filename() try: - with open(fn) as config_h: + config_h = open(fn) + try: if "__GNUC__" in config_h.read(): return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn else: return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn + finally: + config_h.close() except IOError as exc: return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) diff --git a/dist.py b/dist.py index 1c1ea477db..01f1f1cfc0 100644 --- a/dist.py +++ b/dist.py @@ -1012,9 +1012,11 @@ def __init__ (self): def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ - pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - self.write_pkg_file(pkg_info) - pkg_info.close() + pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w') + try: + self.write_pkg_file(pkg_info) + finally: + pkg_info.close() def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. diff --git a/emxccompiler.py b/emxccompiler.py index 62a4c5b4e8..16dce53524 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -270,8 +270,10 @@ def check_config_h(): # It would probably better to read single lines to search. # But we do this only once, and it is fast enough f = open(fn) - s = f.read() - f.close() + try: + s = f.read() + finally: + f.close() except IOError as exc: # if we can't read this file, we cannot say it is wrong @@ -298,8 +300,10 @@ def get_versions(): gcc_exe = find_executable('gcc') if gcc_exe: out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() + try: + out_string = out.read() + finally: + out.close() result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) if result: gcc_version = StrictVersion(result.group(1)) diff --git a/extension.py b/extension.py index 5c07bdae82..2d1c36bd5c 100644 --- a/extension.py +++ b/extension.py @@ -149,84 +149,87 @@ def read_setup_file(filename): file = TextFile(filename, strip_comments=1, skip_blanks=1, join_lines=1, lstrip_ws=1, rstrip_ws=1) - extensions = [] - - while True: - line = file.readline() - if line is None: # eof - break - if _variable_rx.match(line): # VAR=VALUE, handled in first pass - continue - - if line[0] == line[-1] == "*": - file.warn("'%s' lines not handled yet" % line) - continue - - line = expand_makefile_vars(line, vars) - words = split_quoted(line) - - # NB. this parses a slightly different syntax than the old - # makesetup script: here, there must be exactly one extension per - # line, and it must be the first word of the line. I have no idea - # why the old syntax supported multiple extensions per line, as - # they all wind up being the same. - - module = words[0] - ext = Extension(module, []) - append_next_word = None - - for word in words[1:]: - if append_next_word is not None: - append_next_word.append(word) - append_next_word = None + try: + extensions = [] + + while True: + line = file.readline() + if line is None: # eof + break + if _variable_rx.match(line): # VAR=VALUE, handled in first pass continue - suffix = os.path.splitext(word)[1] - switch = word[0:2] ; value = word[2:] - - if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): - # hmm, should we do something about C vs. C++ sources? - # or leave it up to the CCompiler implementation to - # worry about? - ext.sources.append(word) - elif switch == "-I": - ext.include_dirs.append(value) - elif switch == "-D": - equals = value.find("=") - if equals == -1: # bare "-DFOO" -- no value - ext.define_macros.append((value, None)) - else: # "-DFOO=blah" - ext.define_macros.append((value[0:equals], - value[equals+2:])) - elif switch == "-U": - ext.undef_macros.append(value) - elif switch == "-C": # only here 'cause makesetup has it! - ext.extra_compile_args.append(word) - elif switch == "-l": - ext.libraries.append(value) - elif switch == "-L": - ext.library_dirs.append(value) - elif switch == "-R": - ext.runtime_library_dirs.append(value) - elif word == "-rpath": - append_next_word = ext.runtime_library_dirs - elif word == "-Xlinker": - append_next_word = ext.extra_link_args - elif word == "-Xcompiler": - append_next_word = ext.extra_compile_args - elif switch == "-u": - ext.extra_link_args.append(word) - if not value: + if line[0] == line[-1] == "*": + file.warn("'%s' lines not handled yet" % line) + continue + + line = expand_makefile_vars(line, vars) + words = split_quoted(line) + + # NB. this parses a slightly different syntax than the old + # makesetup script: here, there must be exactly one extension per + # line, and it must be the first word of the line. I have no idea + # why the old syntax supported multiple extensions per line, as + # they all wind up being the same. + + module = words[0] + ext = Extension(module, []) + append_next_word = None + + for word in words[1:]: + if append_next_word is not None: + append_next_word.append(word) + append_next_word = None + continue + + suffix = os.path.splitext(word)[1] + switch = word[0:2] ; value = word[2:] + + if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): + # hmm, should we do something about C vs. C++ sources? + # or leave it up to the CCompiler implementation to + # worry about? + ext.sources.append(word) + elif switch == "-I": + ext.include_dirs.append(value) + elif switch == "-D": + equals = value.find("=") + if equals == -1: # bare "-DFOO" -- no value + ext.define_macros.append((value, None)) + else: # "-DFOO=blah" + ext.define_macros.append((value[0:equals], + value[equals+2:])) + elif switch == "-U": + ext.undef_macros.append(value) + elif switch == "-C": # only here 'cause makesetup has it! + ext.extra_compile_args.append(word) + elif switch == "-l": + ext.libraries.append(value) + elif switch == "-L": + ext.library_dirs.append(value) + elif switch == "-R": + ext.runtime_library_dirs.append(value) + elif word == "-rpath": + append_next_word = ext.runtime_library_dirs + elif word == "-Xlinker": append_next_word = ext.extra_link_args - elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): - # NB. a really faithful emulation of makesetup would - # append a .o file to extra_objects only if it - # had a slash in it; otherwise, it would s/.o/.c/ - # and append it to sources. Hmmmm. - ext.extra_objects.append(word) - else: - file.warn("unrecognized argument '%s'" % word) - - extensions.append(ext) + elif word == "-Xcompiler": + append_next_word = ext.extra_compile_args + elif switch == "-u": + ext.extra_link_args.append(word) + if not value: + append_next_word = ext.extra_link_args + elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): + # NB. a really faithful emulation of makesetup would + # append a .o file to extra_objects only if it + # had a slash in it; otherwise, it would s/.o/.c/ + # and append it to sources. Hmmmm. + ext.extra_objects.append(word) + else: + file.warn("unrecognized argument '%s'" % word) + + extensions.append(ext) + finally: + file.close() return extensions diff --git a/file_util.py b/file_util.py index 65aa7e0fdd..c36e7128d0 100644 --- a/file_util.py +++ b/file_util.py @@ -234,6 +234,8 @@ def write_file (filename, contents): sequence of strings without line terminators) to it. """ f = open(filename, "w") - for line in contents: - f.write(line + "\n") - f.close() + try: + for line in contents: + f.write(line + "\n") + finally: + f.close() diff --git a/msvc9compiler.py b/msvc9compiler.py index 761b9ca236..6d7825df86 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -263,10 +263,12 @@ def query_vcvarsall(version, arch="x86"): popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - stdout, stderr = popen.communicate() - if popen.wait() != 0: - raise DistutilsPlatformError(stderr.decode("mbcs")) + try: + stdout, stderr = popen.communicate() + if popen.wait() != 0: + raise DistutilsPlatformError(stderr.decode("mbcs")) + finally: + popen.close() stdout = stdout.decode("mbcs") for line in stdout.split("\n"): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 3e45f6e89e..8a69aaa0d6 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -19,11 +19,15 @@ class BuildPyTestCase(support.TempdirManager, def test_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") - f.write("# Pretend this is a package.") - f.close() + try: + f.write("# Pretend this is a package.") + finally: + f.close() f = open(os.path.join(sources, "README.txt"), "w") - f.write("Info about this package") - f.close() + try: + f.write("Info about this package") + finally: + f.close() destination = self.mkdtemp() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index b1d2d079bd..85b0400460 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -71,8 +71,10 @@ def write_sample_scripts(self, dir): def write_script(self, dir, name, text): f = open(os.path.join(dir, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() def test_version_int(self): source = self.mkdtemp() diff --git a/tests/test_config.py b/tests/test_config.py index 71c63678f8..6a45a328b6 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -105,8 +105,12 @@ def test_server_empty_registration(self): self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') self.assertTrue(os.path.exists(rc)) - content = open(rc).read() - self.assertEquals(content, WANTED) + f = open(rc) + try: + content = f.read() + self.assertEquals(content, WANTED) + finally: + f.close() def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index b478fa6291..e937b45a6b 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -52,7 +52,11 @@ def cleanup_testfn(self): shutil.rmtree(path) def write_setup(self, text, path=test.support.TESTFN): - open(path, "w").write(text) + f = open(path, "w") + try: + f.write(text) + finally: + f.close() return path def test_run_setup_provides_file(self): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index a1647fbcf5..aa9f9ebb9f 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -88,8 +88,10 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) a_file = os.path.join(self.target, 'ok.txt') f = open(a_file, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) diff --git a/tests/test_dist.py b/tests/test_dist.py index 3b7637f3af..f9c5a4fd96 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -80,29 +80,29 @@ def test_command_packages_cmdline(self): def test_command_packages_configfile(self): sys.argv.append("build") + self.addCleanup(os.unlink, TESTFN) f = open(TESTFN, "w") try: print("[global]", file=f) print("command_packages = foo.bar, splat", file=f) + finally: f.close() - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "foo.bar", "splat"]) - - # ensure command line overrides config: - sys.argv[1:] = ["--command-packages", "spork", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "spork"]) - - # Setting --command-packages to '' should cause the default to - # be used even if a config file specified something else: - sys.argv[1:] = ["--command-packages", "", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), ["distutils.command"]) - finally: - os.unlink(TESTFN) + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "foo.bar", "splat"]) + + # ensure command line overrides config: + sys.argv[1:] = ["--command-packages", "spork", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "spork"]) + + # Setting --command-packages to '' should cause the default to + # be used even if a config file specified something else: + sys.argv[1:] = ["--command-packages", "", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_empty_options(self): # an empty options dictionary should not stay in the @@ -261,8 +261,10 @@ def test_custom_pydistutils(self): temp_dir = self.mkdtemp() user_filename = os.path.join(temp_dir, user_filename) f = open(user_filename, 'w') - f.write('.') - f.close() + try: + f.write('.') + finally: + f.close() try: dist = Distribution() diff --git a/tests/test_file_util.py b/tests/test_file_util.py index fac4a5d1a9..74618b523a 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -31,8 +31,10 @@ def tearDown(self): def test_move_file_verbosity(self): f = open(self.source, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() move_file(self.source, self.target, verbose=0) wanted = [] diff --git a/tests/test_install.py b/tests/test_install.py index 76fa02acda..bc407cf9ab 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -182,8 +182,11 @@ def test_record(self): # let's check the RECORD file was created with one # line (the egg info file) - with open(cmd.record) as f: + f = open(cmd.record) + try: self.assertEquals(len(f.readlines()), 1) + finally: + f.close() def test_debug_mode(self): # this covers the code called when DEBUG is set diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index b7eb625ac5..08360d297b 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -42,8 +42,10 @@ def test_installation(self): def write_script(name, text): expected.append(name) f = open(os.path.join(source, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() write_script("script1.py", ("#! /usr/bin/env python2.3\n" "# bogus script w/ Python sh-bang\n" diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index f1da843fab..40cb8be6d1 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -113,17 +113,21 @@ def test_remove_visual_c_ref(self): tempdir = self.mkdtemp() manifest = os.path.join(tempdir, 'manifest') f = open(manifest, 'w') - f.write(_MANIFEST) - f.close() + try: + f.write(_MANIFEST) + finally: + f.close() compiler = MSVCCompiler() compiler._remove_visual_c_ref(manifest) # see what we got f = open(manifest) - # removing trailing spaces - content = '\n'.join([line.rstrip() for line in f.readlines()]) - f.close() + try: + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + finally: + f.close() # makes sure the manifest was properly cleaned self.assertEquals(content, _CLEANED_MANIFEST) diff --git a/tests/test_register.py b/tests/test_register.py index 7d0ac9ee3a..3b80b6dc05 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -118,8 +118,12 @@ def test_create_pypirc(self): self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC - content = open(self.rc).read() - self.assertEquals(content, WANTED_PYPIRC) + f = open(self.rc) + try: + content = f.read() + self.assertEquals(content, WANTED_PYPIRC) + finally: + f.close() # now let's make sure the .pypirc file generated # really works : we shouldn't be asked anything diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 209aa59baf..ad527c7dd6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -215,8 +215,12 @@ def test_add_defaults(self): self.assertEquals(len(content), 11) # checking the MANIFEST - manifest = open(join(self.tmp_dir, 'MANIFEST')).read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + f = open(join(self.tmp_dir, 'MANIFEST')) + try: + manifest = f.read() + self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + finally: + f.close() def test_metadata_check_option(self): # testing the `medata-check` option diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index edc755ed15..78bce9461f 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -75,9 +75,11 @@ def set_executables(self, **kw): def test_parse_makefile_base(self): self.makefile = TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'}) @@ -85,9 +87,11 @@ def test_parse_makefile_base(self): def test_parse_makefile_literal_dollar(self): self.makefile = TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", 'OTHER': 'foo'}) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 00f083a130..3093097dba 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -58,28 +58,46 @@ def test_input(count, description, file, expected_result): finally: out_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (1, "no processing", in_file, result1) + in_file = TextFile(filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(1, "no processing", in_file, result1) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (2, "strip comments", in_file, result2) + in_file = TextFile(filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(2, "strip comments", in_file, result2) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input (3, "strip blanks", in_file, result3) + in_file = TextFile(filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(3, "strip blanks", in_file, result3) + finally: + in_file.close() - in_file = TextFile (filename) - test_input (4, "default processing", in_file, result4) + in_file = TextFile(filename) + try: + test_input(4, "default processing", in_file, result4) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input (5, "join lines without collapsing", in_file, result5) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + try: + test_input(5, "join lines without collapsing", in_file, result5) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input (6, "join lines with collapsing", in_file, result6) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + try: + test_input(6, "join lines with collapsing", in_file, result6) + finally: + in_file.close() def test_suite(): return unittest.makeSuite(TextFileTestCase) diff --git a/util.py b/util.py index 8175434586..3081245b62 100644 --- a/util.py +++ b/util.py @@ -115,13 +115,15 @@ def get_platform (): # behaviour. pass else: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - f.close() - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour + try: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + if m is not None: + macrelease = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + finally: + f.close() if not macver: macver = macrelease From a5d239446824885f4c30d1924d3368874c9319ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 04:06:18 +0000 Subject: [PATCH 3088/8469] Merged revisions 86223-86224,86226,86234 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines Always close files in distutils code and tests (#10252). ........ r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines Add missing entry for r86223. ........ r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines Of course, I forgot one file in r86223. ........ r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines Also close file descriptors from os.popen and subprocess.Popen ........ --- ccompiler.py | 10 ++- command/bdist_rpm.py | 36 ++++---- command/bdist_wininst.py | 6 +- command/upload.py | 6 +- core.py | 6 +- cygwinccompiler.py | 6 +- dist.py | 8 +- emxccompiler.py | 12 ++- extension.py | 165 ++++++++++++++++++---------------- file_util.py | 8 +- msvc9compiler.py | 10 ++- tests/test_build_py.py | 12 ++- tests/test_build_scripts.py | 6 +- tests/test_config.py | 8 +- tests/test_core.py | 6 +- tests/test_dir_util.py | 6 +- tests/test_dist.py | 40 +++++---- tests/test_file_util.py | 6 +- tests/test_install_scripts.py | 6 +- tests/test_msvc9compiler.py | 14 +-- tests/test_register.py | 8 +- tests/test_sdist.py | 8 +- tests/test_sysconfig.py | 16 ++-- tests/test_text_file.py | 52 +++++++---- util.py | 16 ++-- 25 files changed, 287 insertions(+), 190 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index a34177e71f..c2b1f6fbe9 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -794,14 +794,16 @@ def has_function(self, funcname, includes=None, include_dirs=None, library_dirs = [] fd, fname = tempfile.mkstemp(".c", funcname, text=True) f = os.fdopen(fd, "w") - for incl in includes: - f.write("""#include "%s"\n""" % incl) - f.write("""\ + try: + for incl in includes: + f.write("""#include "%s"\n""" % incl) + f.write("""\ main (int argc, char **argv) { %s(); } """ % funcname) - f.close() + finally: + f.close() try: objects = self.compile([fname], include_dirs=include_dirs) except CompileError: diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 6d9d47d2eb..0bba363557 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -355,22 +355,26 @@ def run (self): src_rpm, non_src_rpm, spec_path) out = os.popen(q_cmd) - binary_rpms = [] - source_rpm = None - while 1: - line = out.readline() - if not line: - break - l = string.split(string.strip(line)) - assert(len(l) == 2) - binary_rpms.append(l[1]) - # The source rpm is named after the first entry in the spec file - if source_rpm is None: - source_rpm = l[0] - - status = out.close() - if status: - raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + try: + binary_rpms = [] + source_rpm = None + while 1: + line = out.readline() + if not line: + break + l = string.split(string.strip(line)) + assert(len(l) == 2) + binary_rpms.append(l[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = l[0] + + status = out.close() + if status: + raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) + + finally: + out.close() self.spawn(rpm_cmd) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index a31a5f7bac..36d46bd627 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -356,5 +356,9 @@ def get_exe_bytes (self): sfix = '' filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) - return open(filename, "rb").read() + f = open(filename, "rb") + try: + return f.read() + finally: + f.close() # class bdist_wininst diff --git a/command/upload.py b/command/upload.py index c3f19d207f..980cf68d06 100644 --- a/command/upload.py +++ b/command/upload.py @@ -79,7 +79,11 @@ def upload_file(self, command, pyversion, filename): # Fill in the data - send all the meta-data in case we need to # register a new release - content = open(filename,'rb').read() + f = open(filename,'rb') + try: + content = f.read() + finally: + f.close() meta = self.distribution.metadata data = { # action diff --git a/core.py b/core.py index 99ccf44fad..b89557d767 100644 --- a/core.py +++ b/core.py @@ -216,7 +216,11 @@ def run_setup(script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - exec open(script_name, 'r').read() in g, l + f = open(script_name) + try: + exec f.read() in g, l + finally: + f.close() finally: sys.argv = save_argv _setup_stop_after = None diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 2dabc0f0fe..a1ee815c6c 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -382,8 +382,10 @@ def check_config_h(): # It would probably better to read single lines to search. # But we do this only once, and it is fast enough f = open(fn) - s = f.read() - f.close() + try: + s = f.read() + finally: + f.close() except IOError, exc: # if we can't read this file, we cannot say it is wrong diff --git a/dist.py b/dist.py index 5dbdaef19c..597909ea1a 100644 --- a/dist.py +++ b/dist.py @@ -1101,9 +1101,11 @@ def _read_list(name): def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ - pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w') - self.write_pkg_file(pkg_info) - pkg_info.close() + pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w') + try: + self.write_pkg_file(pkg_info) + finally: + pkg_info.close() def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. diff --git a/emxccompiler.py b/emxccompiler.py index f52e63232d..a0172058a3 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -272,8 +272,10 @@ def check_config_h(): # It would probably better to read single lines to search. # But we do this only once, and it is fast enough f = open(fn) - s = f.read() - f.close() + try: + s = f.read() + finally: + f.close() except IOError, exc: # if we can't read this file, we cannot say it is wrong @@ -300,8 +302,10 @@ def get_versions(): gcc_exe = find_executable('gcc') if gcc_exe: out = os.popen(gcc_exe + ' -dumpversion','r') - out_string = out.read() - out.close() + try: + out_string = out.read() + finally: + out.close() result = re.search('(\d+\.\d+\.\d+)',out_string) if result: gcc_version = StrictVersion(result.group(1)) diff --git a/extension.py b/extension.py index 440d128cdc..9a67ca8b3e 100644 --- a/extension.py +++ b/extension.py @@ -150,87 +150,96 @@ def read_setup_file (filename): file = TextFile(filename, strip_comments=1, skip_blanks=1, join_lines=1, lstrip_ws=1, rstrip_ws=1) - extensions = [] - - while 1: - line = file.readline() - if line is None: # eof - break - if _variable_rx.match(line): # VAR=VALUE, handled in first pass - continue - - if line[0] == line[-1] == "*": - file.warn("'%s' lines not handled yet" % line) - continue - - #print "original line: " + line - line = expand_makefile_vars(line, vars) - words = split_quoted(line) - #print "expanded line: " + line - - # NB. this parses a slightly different syntax than the old - # makesetup script: here, there must be exactly one extension per - # line, and it must be the first word of the line. I have no idea - # why the old syntax supported multiple extensions per line, as - # they all wind up being the same. - - module = words[0] - ext = Extension(module, []) - append_next_word = None - - for word in words[1:]: - if append_next_word is not None: - append_next_word.append(word) - append_next_word = None + try: + extensions = [] + + while 1: + line = file.readline() + if line is None: # eof + break + if _variable_rx.match(line): # VAR=VALUE, handled in first pass continue - suffix = os.path.splitext(word)[1] - switch = word[0:2] ; value = word[2:] - - if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): - # hmm, should we do something about C vs. C++ sources? - # or leave it up to the CCompiler implementation to - # worry about? - ext.sources.append(word) - elif switch == "-I": - ext.include_dirs.append(value) - elif switch == "-D": - equals = string.find(value, "=") - if equals == -1: # bare "-DFOO" -- no value - ext.define_macros.append((value, None)) - else: # "-DFOO=blah" - ext.define_macros.append((value[0:equals], - value[equals+2:])) - elif switch == "-U": - ext.undef_macros.append(value) - elif switch == "-C": # only here 'cause makesetup has it! - ext.extra_compile_args.append(word) - elif switch == "-l": - ext.libraries.append(value) - elif switch == "-L": - ext.library_dirs.append(value) - elif switch == "-R": - ext.runtime_library_dirs.append(value) - elif word == "-rpath": - append_next_word = ext.runtime_library_dirs - elif word == "-Xlinker": - append_next_word = ext.extra_link_args - elif word == "-Xcompiler": - append_next_word = ext.extra_compile_args - elif switch == "-u": - ext.extra_link_args.append(word) - if not value: + if line[0] == line[-1] == "*": + file.warn("'%s' lines not handled yet" % line) + continue + + #print "original line: " + line + line = expand_makefile_vars(line, vars) + words = split_quoted(line) + #print "expanded line: " + line + + # NB. this parses a slightly different syntax than the old + # makesetup script: here, there must be exactly one extension per + # line, and it must be the first word of the line. I have no idea + # why the old syntax supported multiple extensions per line, as + # they all wind up being the same. + + module = words[0] + ext = Extension(module, []) + append_next_word = None + + for word in words[1:]: + if append_next_word is not None: + append_next_word.append(word) + append_next_word = None + continue + + suffix = os.path.splitext(word)[1] + switch = word[0:2] ; value = word[2:] + + if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): + # hmm, should we do something about C vs. C++ sources? + # or leave it up to the CCompiler implementation to + # worry about? + ext.sources.append(word) + elif switch == "-I": + ext.include_dirs.append(value) + elif switch == "-D": + equals = string.find(value, "=") + if equals == -1: # bare "-DFOO" -- no value + ext.define_macros.append((value, None)) + else: # "-DFOO=blah" + ext.define_macros.append((value[0:equals], + value[equals+2:])) + elif switch == "-U": + ext.undef_macros.append(value) + elif switch == "-C": # only here 'cause makesetup has it! + ext.extra_compile_args.append(word) + elif switch == "-l": + ext.libraries.append(value) + elif switch == "-L": + ext.library_dirs.append(value) + elif switch == "-R": + ext.runtime_library_dirs.append(value) + elif word == "-rpath": + append_next_word = ext.runtime_library_dirs + elif word == "-Xlinker": append_next_word = ext.extra_link_args - elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): - # NB. a really faithful emulation of makesetup would - # append a .o file to extra_objects only if it - # had a slash in it; otherwise, it would s/.o/.c/ - # and append it to sources. Hmmmm. - ext.extra_objects.append(word) - else: - file.warn("unrecognized argument '%s'" % word) - - extensions.append(ext) + elif word == "-Xcompiler": + append_next_word = ext.extra_compile_args + elif switch == "-u": + ext.extra_link_args.append(word) + if not value: + append_next_word = ext.extra_link_args + elif word == "-Xcompiler": + append_next_word = ext.extra_compile_args + elif switch == "-u": + ext.extra_link_args.append(word) + if not value: + append_next_word = ext.extra_link_args + elif suffix in (".a", ".so", ".sl", ".o", ".dylib"): + # NB. a really faithful emulation of makesetup would + # append a .o file to extra_objects only if it + # had a slash in it; otherwise, it would s/.o/.c/ + # and append it to sources. Hmmmm. + ext.extra_objects.append(word) + else: + file.warn("unrecognized argument '%s'" % word) + + extensions.append(ext) + finally: + file.close() #print "module:", module #print "source files:", source_files diff --git a/file_util.py b/file_util.py index b3d9d54ec0..b9f0786133 100644 --- a/file_util.py +++ b/file_util.py @@ -224,6 +224,8 @@ def write_file (filename, contents): sequence of strings without line terminators) to it. """ f = open(filename, "w") - for line in contents: - f.write(line + "\n") - f.close() + try: + for line in contents: + f.write(line + "\n") + finally: + f.close() diff --git a/msvc9compiler.py b/msvc9compiler.py index d5d7f66528..55a4db1880 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -273,10 +273,12 @@ def query_vcvarsall(version, arch="x86"): popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - stdout, stderr = popen.communicate() - if popen.wait() != 0: - raise DistutilsPlatformError(stderr.decode("mbcs")) + try: + stdout, stderr = popen.communicate() + if popen.wait() != 0: + raise DistutilsPlatformError(stderr.decode("mbcs")) + finally: + popen.close() stdout = stdout.decode("mbcs") for line in stdout.split("\n"): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 3c8bc41bae..03517392fb 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -19,11 +19,15 @@ class BuildPyTestCase(support.TempdirManager, def _setup_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") - f.write("# Pretend this is a package.") - f.close() + try: + f.write("# Pretend this is a package.") + finally: + f.close() f = open(os.path.join(sources, "README.txt"), "w") - f.write("Info about this package") - f.close() + try: + f.write("Info about this package") + finally: + f.close() destination = self.mkdtemp() diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 72e8915c00..df89cdec25 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -71,8 +71,10 @@ def write_sample_scripts(self, dir): def write_script(self, dir, name, text): f = open(os.path.join(dir, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() def test_version_int(self): source = self.mkdtemp() diff --git a/tests/test_config.py b/tests/test_config.py index 0a1bb961ff..6c85efad24 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -108,8 +108,12 @@ def test_server_empty_registration(self): self.assertTrue(not os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') self.assertTrue(os.path.exists(rc)) - content = open(rc).read() - self.assertEquals(content, WANTED) + f = open(rc) + try: + content = f.read() + self.assertEquals(content, WANTED) + finally: + f.close() def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) diff --git a/tests/test_core.py b/tests/test_core.py index 48ec1b436e..63f6b31da6 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -52,7 +52,11 @@ def cleanup_testfn(self): shutil.rmtree(path) def write_setup(self, text, path=test.test_support.TESTFN): - open(path, "w").write(text) + f = open(path, "w") + try: + f.write(text) + finally: + f.close() return path def test_run_setup_provides_file(self): diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index a1647fbcf5..aa9f9ebb9f 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -88,8 +88,10 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) a_file = os.path.join(self.target, 'ok.txt') f = open(a_file, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) diff --git a/tests/test_dist.py b/tests/test_dist.py index 1eddf6d25c..d9b413f954 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -102,29 +102,29 @@ def test_command_packages_cmdline(self): def test_command_packages_configfile(self): sys.argv.append("build") + self.addCleanup(os.unlink, TESTFN) f = open(TESTFN, "w") try: print >>f, "[global]" print >>f, "command_packages = foo.bar, splat" + finally: f.close() - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "foo.bar", "splat"]) - - # ensure command line overrides config: - sys.argv[1:] = ["--command-packages", "spork", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), - ["distutils.command", "spork"]) - - # Setting --command-packages to '' should cause the default to - # be used even if a config file specified something else: - sys.argv[1:] = ["--command-packages", "", "build"] - d = self.create_distribution([TESTFN]) - self.assertEqual(d.get_command_packages(), ["distutils.command"]) - finally: - os.unlink(TESTFN) + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "foo.bar", "splat"]) + + # ensure command line overrides config: + sys.argv[1:] = ["--command-packages", "spork", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), + ["distutils.command", "spork"]) + + # Setting --command-packages to '' should cause the default to + # be used even if a config file specified something else: + sys.argv[1:] = ["--command-packages", "", "build"] + d = self.create_distribution([TESTFN]) + self.assertEqual(d.get_command_packages(), ["distutils.command"]) def test_write_pkg_file(self): # Check DistributionMetadata handling of Unicode fields @@ -341,8 +341,10 @@ def test_custom_pydistutils(self): temp_dir = self.mkdtemp() user_filename = os.path.join(temp_dir, user_filename) f = open(user_filename, 'w') - f.write('.') - f.close() + try: + f.write('.') + finally: + f.close() try: dist = Distribution() diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 99b421f73f..823f211089 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -31,8 +31,10 @@ def tearDown(self): def test_move_file_verbosity(self): f = open(self.source, 'w') - f.write('some content') - f.close() + try: + f.write('some content') + finally: + f.close() move_file(self.source, self.target, verbose=0) wanted = [] diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index b7eb625ac5..08360d297b 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -42,8 +42,10 @@ def test_installation(self): def write_script(name, text): expected.append(name) f = open(os.path.join(source, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() write_script("script1.py", ("#! /usr/bin/env python2.3\n" "# bogus script w/ Python sh-bang\n" diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index c957954482..567505ddf1 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -113,17 +113,21 @@ def test_remove_visual_c_ref(self): tempdir = self.mkdtemp() manifest = os.path.join(tempdir, 'manifest') f = open(manifest, 'w') - f.write(_MANIFEST) - f.close() + try: + f.write(_MANIFEST) + finally: + f.close() compiler = MSVCCompiler() compiler._remove_visual_c_ref(manifest) # see what we got f = open(manifest) - # removing trailing spaces - content = '\n'.join([line.rstrip() for line in f.readlines()]) - f.close() + try: + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + finally: + f.close() # makes sure the manifest was properly cleaned self.assertEquals(content, _CLEANED_MANIFEST) diff --git a/tests/test_register.py b/tests/test_register.py index 370d659893..6da479b139 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -119,8 +119,12 @@ def test_create_pypirc(self): self.assertTrue(os.path.exists(self.rc)) # with the content similar to WANTED_PYPIRC - content = open(self.rc).read() - self.assertEquals(content, WANTED_PYPIRC) + f = open(self.rc) + try: + content = f.read() + self.assertEquals(content, WANTED_PYPIRC) + finally: + f.close() # now let's make sure the .pypirc file generated # really works : we shouldn't be asked anything diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 87adb45894..7cebbf53ad 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -234,8 +234,12 @@ def test_add_defaults(self): self.assertEquals(len(content), 11) # checking the MANIFEST - manifest = open(join(self.tmp_dir, 'MANIFEST')).read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + f = open(join(self.tmp_dir, 'MANIFEST')) + try: + manifest = f.read() + self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + finally: + f.close() @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 3066486066..8449ddca78 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -50,9 +50,11 @@ def test_get_python_inc(self): def test_parse_makefile_base(self): self.makefile = test.test_support.TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'}) @@ -60,9 +62,11 @@ def test_parse_makefile_base(self): def test_parse_makefile_literal_dollar(self): self.makefile = test.test_support.TESTFN fd = open(self.makefile, 'w') - fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') - fd.write('VAR=$OTHER\nOTHER=foo') - fd.close() + try: + fd.write(r"CONFIG_ARGS= '--arg1=optarg1' 'ENV=\$$LIB'" '\n') + fd.write('VAR=$OTHER\nOTHER=foo') + finally: + fd.close() d = sysconfig.parse_makefile(self.makefile) self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", 'OTHER': 'foo'}) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 00f083a130..3093097dba 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -58,28 +58,46 @@ def test_input(count, description, file, expected_result): finally: out_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (1, "no processing", in_file, result1) + in_file = TextFile(filename, strip_comments=0, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(1, "no processing", in_file, result1) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=0, - lstrip_ws=0, rstrip_ws=0) - test_input (2, "strip comments", in_file, result2) + in_file = TextFile(filename, strip_comments=1, skip_blanks=0, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(2, "strip comments", in_file, result2) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=0, skip_blanks=1, - lstrip_ws=0, rstrip_ws=0) - test_input (3, "strip blanks", in_file, result3) + in_file = TextFile(filename, strip_comments=0, skip_blanks=1, + lstrip_ws=0, rstrip_ws=0) + try: + test_input(3, "strip blanks", in_file, result3) + finally: + in_file.close() - in_file = TextFile (filename) - test_input (4, "default processing", in_file, result4) + in_file = TextFile(filename) + try: + test_input(4, "default processing", in_file, result4) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1) - test_input (5, "join lines without collapsing", in_file, result5) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1) + try: + test_input(5, "join lines without collapsing", in_file, result5) + finally: + in_file.close() - in_file = TextFile (filename, strip_comments=1, skip_blanks=1, - join_lines=1, rstrip_ws=1, collapse_join=1) - test_input (6, "join lines with collapsing", in_file, result6) + in_file = TextFile(filename, strip_comments=1, skip_blanks=1, + join_lines=1, rstrip_ws=1, collapse_join=1) + try: + test_input(6, "join lines with collapsing", in_file, result6) + finally: + in_file.close() def test_suite(): return unittest.makeSuite(TextFileTestCase) diff --git a/util.py b/util.py index 4dcfeb5505..f06e4fdf88 100644 --- a/util.py +++ b/util.py @@ -116,13 +116,15 @@ def get_platform (): # behaviour. pass else: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - f.close() - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour + try: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + if m is not None: + macrelease = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + finally: + f.close() if not macver: macver = macrelease From 41f08f2173e692b35d9dc8d232eee3a44a6285d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 04:48:05 +0000 Subject: [PATCH 3089/8469] Prevent race condition with mkdir in distutils. Patch by Arfrever on #9281. --- dir_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dir_util.py b/dir_util.py index 54376e5ca5..c7c9fccfd7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -69,10 +69,11 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): if not dry_run: try: os.mkdir(head, mode) - created_dirs.append(head) except OSError as exc: - raise DistutilsFileError( - "could not create '%s': %s" % (head, exc.args[-1])) + if not (exc.errno == errno.EEXIST and os.path.isdir(head)): + raise DistutilsFileError( + "could not create '%s': %s" % (head, exc.args[-1])) + created_dirs.append(head) _path_created[abs_head] = 1 return created_dirs From d7f8760f536a13a32a3e93c28d527b9b48e0b849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 04:51:10 +0000 Subject: [PATCH 3090/8469] Merged revisions 86244 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86244 | eric.araujo | 2010-11-06 05:48:05 +0100 (sam., 06 nov. 2010) | 3 lines Prevent race condition with mkdir in distutils. Patch by Arfrever on #9281. ........ --- dir_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dir_util.py b/dir_util.py index 54376e5ca5..c7c9fccfd7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -69,10 +69,11 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0): if not dry_run: try: os.mkdir(head, mode) - created_dirs.append(head) except OSError as exc: - raise DistutilsFileError( - "could not create '%s': %s" % (head, exc.args[-1])) + if not (exc.errno == errno.EEXIST and os.path.isdir(head)): + raise DistutilsFileError( + "could not create '%s': %s" % (head, exc.args[-1])) + created_dirs.append(head) _path_created[abs_head] = 1 return created_dirs From 80531c1bf96caa7748c38597cb19161b804e8c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 04:53:42 +0000 Subject: [PATCH 3091/8469] Merged revisions 86244 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86244 | eric.araujo | 2010-11-06 05:48:05 +0100 (sam., 06 nov. 2010) | 3 lines Prevent race condition with mkdir in distutils. Patch by Arfrever on #9281. ........ --- dir_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dir_util.py b/dir_util.py index 5a968063f7..d6875936d6 100644 --- a/dir_util.py +++ b/dir_util.py @@ -69,10 +69,11 @@ def mkpath(name, mode=0777, verbose=1, dry_run=0): if not dry_run: try: os.mkdir(head, mode) - created_dirs.append(head) except OSError, exc: - raise DistutilsFileError, \ - "could not create '%s': %s" % (head, exc[-1]) + if not (exc.errno == errno.EEXIST and os.path.isdir(head)): + raise DistutilsFileError( + "could not create '%s': %s" % (head, exc.args[-1])) + created_dirs.append(head) _path_created[abs_head] = 1 return created_dirs From 228a5b4d720ae63f6f5a2b9acf535d9da00f934f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 06:00:54 +0000 Subject: [PATCH 3092/8469] Remove traces of Mac OS 9 support, again (#9508). This was done in r80805 (#7908) and erroneously brought back by the distutils revert. This commit removes more code than the original, which was uncomplete. There is no NEWS entry, like in r80805. --- command/install.py | 16 ---------------- file_util.py | 9 --------- sysconfig.py | 42 ------------------------------------------ util.py | 9 --------- 4 files changed, 76 deletions(-) diff --git a/command/install.py b/command/install.py index 2a905d92f8..58f6ec5b16 100644 --- a/command/install.py +++ b/command/install.py @@ -60,14 +60,6 @@ 'data' : '$base', }, 'nt': WINDOWS_SCHEME, - 'mac': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, - 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', @@ -95,14 +87,6 @@ 'data' : '$userbase', } - INSTALL_SCHEMES['mac_user'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/$py_version_short/include/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - INSTALL_SCHEMES['os2_home'] = { 'purelib': '$usersite', 'platlib': '$usersite', diff --git a/file_util.py b/file_util.py index c36e7128d0..e1eb932926 100644 --- a/file_util.py +++ b/file_util.py @@ -130,15 +130,6 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, if dry_run: return (dst, 1) - # On Mac OS, use the native file copy routine - if os.name == 'mac': - import macostools - try: - macostools.copy(src, dst, 0, preserve_times) - except os.error as exc: - raise DistutilsFileError( - "could not copy '%s' to '%s': %s" % (src, dst, exc.args[-1])) - # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': diff --git a/sysconfig.py b/sysconfig.py index 8b55f217cd..be91f92c36 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -86,11 +86,6 @@ def get_python_inc(plat_specific=0, prefix=None): return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") - elif os.name == "mac": - if plat_specific: - return os.path.join(prefix, "Mac", "Include") - else: - return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: @@ -131,17 +126,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return prefix else: return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "mac": - if plat_specific: - if standard_lib: - return os.path.join(prefix, "Lib", "lib-dynload") - else: - return os.path.join(prefix, "Lib", "site-packages") - else: - if standard_lib: - return os.path.join(prefix, "Lib") - else: - return os.path.join(prefix, "Lib", "site-packages") elif os.name == "os2": if standard_lib: return os.path.join(prefix, "Lib") @@ -477,32 +461,6 @@ def _init_nt(): _config_vars = g -def _init_mac(): - """Initialize the module as appropriate for Macintosh systems""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - import MacOS - if not hasattr(MacOS, 'runtimemodel'): - g['SO'] = '.ppc.slb' - else: - g['SO'] = '.%s.slb' % MacOS.runtimemodel - - # XXX are these used anywhere? - g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") - g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") - - # These are used by the extension module build - g['srcdir'] = ':' - global _config_vars - _config_vars = g - - def _init_os2(): """Initialize the module as appropriate for OS/2""" g = {} diff --git a/util.py b/util.py index 3081245b62..ce3cd6ca33 100644 --- a/util.py +++ b/util.py @@ -235,15 +235,6 @@ def change_root (new_root, pathname): path = path[1:] return os.path.join(new_root, path) - elif os.name == 'mac': - if not os.path.isabs(pathname): - return os.path.join(new_root, pathname) - else: - # Chop off volume name from start of path - elements = pathname.split(":", 1) - pathname = ":" + elements[1] - return os.path.join(new_root, pathname) - else: raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) From d722bd3324c1d22541a8e8f924fa490fd7c1046f Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 22 Nov 2010 18:12:18 +0100 Subject: [PATCH 3093/8469] We need to make sure that the result is always a str, even if the result is an error response. Otherwise you get an error when trying to pattern match in line 206. --HG-- branch : distribute extra : rebase_source : dc5fe8b1365544fc763414b67227cc78dc1f8524 --- setuptools/package_index.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4ff963030f..459cae2c0b 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -199,8 +199,12 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() - if sys.version_info >= (3,) and not isinstance(f, urllib2.HTTPError): - charset = f.headers.get_param('charset') or 'latin-1' + if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. + if isinstance(f, urllib2.HTTPError): + # Errors have no charset, assume latin1: + charset = 'latin-1' + else: + charset = f.headers.get_param('charset') or 'latin-1' page = page.decode(charset, "ignore") f.close() for match in HREF.finditer(page): From c337060368f6bce8442372bdc4049d31d279eba8 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 24 Nov 2010 11:40:25 +0100 Subject: [PATCH 3094/8469] Updated CHANGES.txt --HG-- branch : distribute extra : rebase_source : 146a6656573c5b7173e62f294ebc713cdc4a6f0b --- CHANGES.txt | 1 + distribute.egg-info/entry_points.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3d9f905cd3..fc843b6448 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ------ * Fixed typo in bdist_egg +* Several issues under Python 3 has been solved. ------ 0.6.14 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..e1f704d8cb 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 7473dcbb92dd3fdeadfd67c725f08729a32cd06f Mon Sep 17 00:00:00 2001 From: Robert Myers Date: Sat, 4 Dec 2010 14:47:25 -0600 Subject: [PATCH 3095/8469] Adding DATA/LIB/site-packages to the list of prefixes searched in an exe file during installation. --HG-- branch : distribute extra : rebase_source : f300b49beac88354af6238df4a83798721860716 --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 27fd00c7c0..61fbcf7f9d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1445,7 +1445,8 @@ def get_exe_prefixes(exe_filename): prefixes = [ ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), ('PLATLIB/', ''), - ('SCRIPTS/', 'EGG-INFO/scripts/') + ('SCRIPTS/', 'EGG-INFO/scripts/'), + ('DATA/LIB/site-packages', ''), ] z = zipfile.ZipFile(exe_filename) try: From ecf025e13c30a54f7e97a8f531114d64d150fb5f Mon Sep 17 00:00:00 2001 From: Robert Myers Date: Thu, 9 Dec 2010 22:45:11 -0600 Subject: [PATCH 3096/8469] Updated CHANGES.txt --HG-- branch : distribute extra : rebase_source : b6e9ebbe1127a40bfb3b14660d71c74b24d6a5ea --- CHANGES.txt | 1 + CONTRIBUTORS.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index fc843b6448..ee3dea6e89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Fixed typo in bdist_egg * Several issues under Python 3 has been solved. +* Issue 146: Fixed missing DLL files after easy_install of windows exe package. ------ 0.6.14 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f0ec2ba490..9ef062c773 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -14,6 +14,7 @@ Contributors * Noufal Ibrahim * Philip Jenvey * Reinout van Rees +* Robert Myers * Tarek Ziadé * Toshio Kuratomi From 71e69bc81462b72c45b2f86a689b9a680918cc0d Mon Sep 17 00:00:00 2001 From: Jonathan Ballet Date: Sat, 6 Nov 2010 15:01:33 +0100 Subject: [PATCH 3097/8469] Remove spurious message 'install_dir' Fixes #184 --HG-- branch : distribute extra : rebase_source : b4ecdac54934e36dfbb74949c87b4af1fc2b1b86 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 61fbcf7f9d..4ffef3def5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -377,7 +377,7 @@ def warn_deprecated_options(self): def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" - print 'install_dir', self.install_dir + instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir,'easy-install.pth') From f34397aa8e5ae017fcfabbbaad6fc41b53e41372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 14:16:30 +0000 Subject: [PATCH 3098/8469] Remove one trace of Mac OS 9 support (#7908 follow-up) This was overlooked in r80804. This change is not really a bug fix, but the release manager agreed to it. There is no NEWS entry, like in the original commit. --- sysconfig.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 9888cd52cb..33cc5a38a5 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -453,32 +453,6 @@ def _init_nt(): _config_vars = g -def _init_mac(): - """Initialize the module as appropriate for Macintosh systems""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - import MacOS - if not hasattr(MacOS, 'runtimemodel'): - g['SO'] = '.ppc.slb' - else: - g['SO'] = '.%s.slb' % MacOS.runtimemodel - - # XXX are these used anywhere? - g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") - g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") - - # These are used by the extension module build - g['srcdir'] = ':' - global _config_vars - _config_vars = g - - def _init_os2(): """Initialize the module as appropriate for OS/2""" g = {} From dd5fb967d4f2e247a7bc154a206a2218b613c4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 15:57:52 +0000 Subject: [PATCH 3099/8469] Correct the fix for #10252: Popen objects have no close method. --- cygwinccompiler.py | 4 +++- msvc9compiler.py | 31 +++++++++++++++++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 95fa3ed3c8..5676e91a79 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -377,7 +377,9 @@ def _find_exe_version(cmd): try: out_string = out.read() finally: - out.close() + out.stdin.close() + out.stdout.close() + out.stderr.close() result = RE_VERSION.search(out_string) if result is None: return None diff --git a/msvc9compiler.py b/msvc9compiler.py index 6d7825df86..488524db91 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -267,21 +267,24 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: raise DistutilsPlatformError(stderr.decode("mbcs")) + + stdout = stdout.decode("mbcs") + for line in stdout.split("\n"): + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=', 1) + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = removeDuplicates(value) + finally: - popen.close() - - stdout = stdout.decode("mbcs") - for line in stdout.split("\n"): - line = Reg.convert_mbcs(line) - if '=' not in line: - continue - line = line.strip() - key, value = line.split('=', 1) - key = key.lower() - if key in interesting: - if value.endswith(os.pathsep): - value = value[:-1] - result[key] = removeDuplicates(value) + popen.stdin.close() + popen.stdout.close() + popen.stderr.close() if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) From 9c49a045a524afebada7c86980e2598de93f8615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 6 Nov 2010 18:03:52 +0000 Subject: [PATCH 3100/8469] Fix #10252 again (hopefully definitely). Patch by Brian Curtin. --- cygwinccompiler.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 5676e91a79..95fa3ed3c8 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -377,9 +377,7 @@ def _find_exe_version(cmd): try: out_string = out.read() finally: - out.stdin.close() - out.stdout.close() - out.stderr.close() + out.close() result = RE_VERSION.search(out_string) if result is None: return None From 6f3d8cbb6fec170ba7c4e07c6c67d4a9bb57d625 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 9 Nov 2010 09:32:19 +0000 Subject: [PATCH 3101/8469] Issue #10359: Remove ";" after function definition, invalid in ISO C --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 46ac9aafc3..203cbc98fe 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -318,7 +318,7 @@ def test_compiler_option(self): def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') - self.write_file(c_file, 'void PyInit_foo(void) {};\n') + self.write_file(c_file, 'void PyInit_foo(void) {}\n') ext = Extension('foo', [c_file], optional=False) dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) From 436be32af39f9ac45717ae3c02a745252b0be238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Nov 2010 20:27:45 +0000 Subject: [PATCH 3102/8469] Merged revisions 86274,86276 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86274 | eric.araujo | 2010-11-06 16:57:52 +0100 (sam., 06 nov. 2010) | 2 lines Correct the fix for #10252: Popen objects have no close method. ........ r86276 | eric.araujo | 2010-11-06 19:03:52 +0100 (sam., 06 nov. 2010) | 2 lines Fix #10252 again (hopefully definitely). Patch by Brian Curtin. ........ --- msvc9compiler.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 6d7825df86..488524db91 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -267,21 +267,24 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: raise DistutilsPlatformError(stderr.decode("mbcs")) + + stdout = stdout.decode("mbcs") + for line in stdout.split("\n"): + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=', 1) + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = removeDuplicates(value) + finally: - popen.close() - - stdout = stdout.decode("mbcs") - for line in stdout.split("\n"): - line = Reg.convert_mbcs(line) - if '=' not in line: - continue - line = line.strip() - key, value = line.split('=', 1) - key = key.lower() - if key in interesting: - if value.endswith(os.pathsep): - value = value[:-1] - result[key] = removeDuplicates(value) + popen.stdin.close() + popen.stdout.close() + popen.stderr.close() if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) From 021d150839a1a8b960ae2eb7ee6136f6e081e875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Nov 2010 20:31:17 +0000 Subject: [PATCH 3103/8469] Merged revisions 86274,86276 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86274 | eric.araujo | 2010-11-06 16:57:52 +0100 (sam., 06 nov. 2010) | 2 lines Correct the fix for #10252: Popen objects have no close method. ........ r86276 | eric.araujo | 2010-11-06 19:03:52 +0100 (sam., 06 nov. 2010) | 2 lines Fix #10252 again (hopefully definitely). Patch by Brian Curtin. ........ --- msvc9compiler.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 55a4db1880..615d8b83a0 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -277,21 +277,24 @@ def query_vcvarsall(version, arch="x86"): stdout, stderr = popen.communicate() if popen.wait() != 0: raise DistutilsPlatformError(stderr.decode("mbcs")) + + stdout = stdout.decode("mbcs") + for line in stdout.split("\n"): + line = Reg.convert_mbcs(line) + if '=' not in line: + continue + line = line.strip() + key, value = line.split('=', 1) + key = key.lower() + if key in interesting: + if value.endswith(os.pathsep): + value = value[:-1] + result[key] = removeDuplicates(value) + finally: - popen.close() - - stdout = stdout.decode("mbcs") - for line in stdout.split("\n"): - line = Reg.convert_mbcs(line) - if '=' not in line: - continue - line = line.strip() - key, value = line.split('=', 1) - key = key.lower() - if key in interesting: - if value.endswith(os.pathsep): - value = value[:-1] - result[key] = removeDuplicates(value) + popen.stdin.close() + popen.stdout.close() + popen.stderr.close() if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) From 7c48608dcc43fbbded053bda97ba12fbb835003d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Nov 2010 22:25:23 +0000 Subject: [PATCH 3104/8469] And now for something completely different: Finish fixing #10252 again. --- msvc9compiler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 488524db91..e849e16d51 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -282,7 +282,6 @@ def query_vcvarsall(version, arch="x86"): result[key] = removeDuplicates(value) finally: - popen.stdin.close() popen.stdout.close() popen.stderr.close() From c393ee270dfd8a7b7f25324d7bf1a361b4850678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Nov 2010 22:26:37 +0000 Subject: [PATCH 3105/8469] Merged revisions 86438 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86438 | eric.araujo | 2010-11-12 23:25:23 +0100 (ven., 12 nov. 2010) | 2 lines And now for something completely different: Finish fixing #10252 again. ........ --- msvc9compiler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 488524db91..e849e16d51 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -282,7 +282,6 @@ def query_vcvarsall(version, arch="x86"): result[key] = removeDuplicates(value) finally: - popen.stdin.close() popen.stdout.close() popen.stderr.close() From ef556865368e00fb747ce7aae3d4f156688300c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Nov 2010 22:27:28 +0000 Subject: [PATCH 3106/8469] Merged revisions 86438 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86438 | eric.araujo | 2010-11-12 23:25:23 +0100 (ven., 12 nov. 2010) | 2 lines And now for something completely different: Finish fixing #10252 again. ........ --- msvc9compiler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 615d8b83a0..bf85ac75c7 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -292,7 +292,6 @@ def query_vcvarsall(version, arch="x86"): result[key] = removeDuplicates(value) finally: - popen.stdin.close() popen.stdout.close() popen.stderr.close() From bbcb611025969e9a4b8a987a7ce1528776740ae2 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 13 Nov 2010 06:39:58 +0000 Subject: [PATCH 3107/8469] Bump to 3.2a4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9df61ab029..bae33b5530 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2a3" +__version__ = "3.2a4" #--end constants-- From 65e43d3b792289e3c4025cf203f1f3f1a2949ca4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 13 Nov 2010 17:28:56 +0000 Subject: [PATCH 3108/8469] bump to 3.1.3rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6dca599fd6..9684a11c45 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.2" +__version__ = "3.1.3rc1" #--end constants-- From 0f51e1c350bb195a7add16991c466fe9d59b9ced Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 13 Nov 2010 17:33:04 +0000 Subject: [PATCH 3109/8469] 2.7.1rc1 bump --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2c69a1836a..f9f9792794 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.1a0" +__version__ = "2.7.1rc1" #--end constants-- From df79f96e47490dedbcb676f77c426fad14df1c6f Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 20 Nov 2010 19:04:17 +0000 Subject: [PATCH 3110/8469] #9424: Replace deprecated assert* methods in the Python test suite. --- tests/test_archive_util.py | 14 ++++---- tests/test_bdist.py | 4 +-- tests/test_bdist_dumb.py | 2 +- tests/test_build.py | 14 ++++---- tests/test_build_clib.py | 10 +++--- tests/test_build_ext.py | 48 +++++++++++++-------------- tests/test_check.py | 14 ++++---- tests/test_cmd.py | 10 +++--- tests/test_config.py | 6 ++-- tests/test_config_cmd.py | 12 +++---- tests/test_core.py | 4 +-- tests/test_cygwinccompiler.py | 32 +++++++++--------- tests/test_dep_util.py | 4 +-- tests/test_dir_util.py | 22 ++++++------- tests/test_dist.py | 20 +++++------ tests/test_extension.py | 16 ++++----- tests/test_file_util.py | 6 ++-- tests/test_filelist.py | 18 +++++----- tests/test_install.py | 20 +++++------ tests/test_install_data.py | 8 ++--- tests/test_install_headers.py | 4 +-- tests/test_install_lib.py | 8 ++--- tests/test_log.py | 4 +-- tests/test_msvc9compiler.py | 4 +-- tests/test_register.py | 14 ++++---- tests/test_sdist.py | 34 +++++++++---------- tests/test_spawn.py | 2 +- tests/test_sysconfig.py | 18 +++++----- tests/test_text_file.py | 2 +- tests/test_upload.py | 12 +++---- tests/test_util.py | 62 +++++++++++++++++------------------ tests/test_version.py | 20 +++++------ 32 files changed, 233 insertions(+), 235 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 9e6264aa89..aff426521d 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -113,7 +113,7 @@ def test_tarfile_vs_tar(self): self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs - self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) + self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -153,7 +153,7 @@ def test_compress_deprecated(self): os.chdir(old_dir) tarball = base_name + '.tar.Z' self.assertTrue(os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) # same test with dry_run os.remove(tarball) @@ -167,7 +167,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) self.assertTrue(not os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): @@ -184,9 +184,9 @@ def test_make_zipfile(self): tarball = base_name + '.zip' def test_check_archive_formats(self): - self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']), - 'xxx') - self.assertEquals(check_archive_formats(['gztar', 'zip']), None) + self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), + 'xxx') + self.assertEqual(check_archive_formats(['gztar', 'zip']), None) def test_make_archive(self): tmpdir = self.mkdtemp() @@ -203,7 +203,7 @@ def _breaks(*args, **kw): make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) except: pass - self.assertEquals(os.getcwd(), current_dir) + self.assertEqual(os.getcwd(), current_dir) finally: del ARCHIVE_FORMATS['xxx'] diff --git a/tests/test_bdist.py b/tests/test_bdist.py index bf56e842b7..94d40cc25b 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -24,7 +24,7 @@ def test_formats(self): cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() - self.assertEquals(cmd.formats, ['msi']) + self.assertEqual(cmd.formats, ['msi']) # what format bdist offers ? # XXX an explicit list in bdist is @@ -35,7 +35,7 @@ def test_formats(self): formats.sort() founded = list(cmd.format_command.keys()) founded.sort() - self.assertEquals(founded, formats) + self.assertEqual(founded, formats) def test_suite(): return unittest.makeSuite(BuildTestCase) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 7d9d0aa834..cc37fef8b0 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -69,7 +69,7 @@ def test_simple_built(self): base = base.replace(':', '-') wanted = ['%s.zip' % base] - self.assertEquals(dist_created, wanted) + self.assertEqual(dist_created, wanted) # now let's check what we have in the zip file # XXX to be done diff --git a/tests/test_build.py b/tests/test_build.py index 9f0e0ad23c..3391f36d4b 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -18,11 +18,11 @@ def test_finalize_options(self): cmd.finalize_options() # if not specified, plat_name gets the current platform - self.assertEquals(cmd.plat_name, get_platform()) + self.assertEqual(cmd.plat_name, get_platform()) # build_purelib is build + lib wanted = os.path.join(cmd.build_base, 'lib') - self.assertEquals(cmd.build_purelib, wanted) + self.assertEqual(cmd.build_purelib, wanted) # build_platlib is 'build/lib.platform-x.x[-pydebug]' # examples: @@ -32,21 +32,21 @@ def test_finalize_options(self): self.assertTrue(cmd.build_platlib.endswith('-pydebug')) plat_spec += '-pydebug' wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) - self.assertEquals(cmd.build_platlib, wanted) + self.assertEqual(cmd.build_platlib, wanted) # by default, build_lib = build_purelib - self.assertEquals(cmd.build_lib, cmd.build_purelib) + self.assertEqual(cmd.build_lib, cmd.build_purelib) # build_temp is build/temp. wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) - self.assertEquals(cmd.build_temp, wanted) + self.assertEqual(cmd.build_temp, wanted) # build_scripts is build/scripts-x.x wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) - self.assertEquals(cmd.build_scripts, wanted) + self.assertEqual(cmd.build_scripts, wanted) # executable is os.path.normpath(sys.executable) - self.assertEquals(cmd.executable, os.path.normpath(sys.executable)) + self.assertEqual(cmd.executable, os.path.normpath(sys.executable)) def test_suite(): return unittest.makeSuite(BuildTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index e59b8f9a19..69bd2bf624 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -57,14 +57,14 @@ def test_get_source_files(self): self.assertRaises(DistutilsSetupError, cmd.get_source_files) cmd.libraries = [('name', {'sources': ['a', 'b']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')}), ('name2', {'sources': ['c', 'd']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + self.assertEqual(cmd.get_source_files(), ['a', 'b', 'c', 'd']) def test_build_libraries(self): @@ -93,11 +93,11 @@ def test_finalize_options(self): cmd.include_dirs = 'one-dir' cmd.finalize_options() - self.assertEquals(cmd.include_dirs, ['one-dir']) + self.assertEqual(cmd.include_dirs, ['one-dir']) cmd.include_dirs = None cmd.finalize_options() - self.assertEquals(cmd.include_dirs, []) + self.assertEqual(cmd.include_dirs, []) cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 203cbc98fe..dcba75f703 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -96,11 +96,11 @@ def test_build_ext(self): for attr in ('error', 'foo', 'new', 'roj'): self.assertTrue(hasattr(xx, attr)) - self.assertEquals(xx.foo(2, 5), 7) - self.assertEquals(xx.foo(13,15), 28) - self.assertEquals(xx.new().demo(), None) + self.assertEqual(xx.foo(2, 5), 7) + self.assertEqual(xx.foo(13,15), 28) + self.assertEqual(xx.new().demo(), None) doc = 'This is a template module just for instruction.' - self.assertEquals(xx.__doc__, doc) + self.assertEqual(xx.__doc__, doc) self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) @@ -206,7 +206,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.libraries = 'my_lib' cmd.finalize_options() - self.assertEquals(cmd.libraries, ['my_lib']) + self.assertEqual(cmd.libraries, ['my_lib']) # make sure cmd.library_dirs is turned into a list # if it's a string @@ -220,7 +220,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.rpath = os.pathsep.join(['one', 'two']) cmd.finalize_options() - self.assertEquals(cmd.rpath, ['one', 'two']) + self.assertEqual(cmd.rpath, ['one', 'two']) # XXX more tests to perform for win32 @@ -229,25 +229,25 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.define = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + self.assertEqual(cmd.define, [('one', '1'), ('two', '1')]) # make sure undef is turned into a list of # strings if they are ','-separated strings cmd = build_ext(dist) cmd.undef = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.undef, ['one', 'two']) + self.assertEqual(cmd.undef, ['one', 'two']) # make sure swig_opts is turned into a list cmd = build_ext(dist) cmd.swig_opts = None cmd.finalize_options() - self.assertEquals(cmd.swig_opts, []) + self.assertEqual(cmd.swig_opts, []) cmd = build_ext(dist) cmd.swig_opts = '1 2' cmd.finalize_options() - self.assertEquals(cmd.swig_opts, ['1', '2']) + self.assertEqual(cmd.swig_opts, ['1', '2']) def test_check_extensions_list(self): dist = Distribution() @@ -284,7 +284,7 @@ def test_check_extensions_list(self): # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') - self.assertEquals(ext.libraries, 'foo') + self.assertEqual(ext.libraries, 'foo') self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple @@ -294,15 +294,15 @@ def test_check_extensions_list(self): exts[0][1]['macros'] = [('1', '2'), ('3',)] cmd.check_extensions_list(exts) - self.assertEquals(exts[0].undef_macros, ['3']) - self.assertEquals(exts[0].define_macros, [('1', '2')]) + self.assertEqual(exts[0].undef_macros, ['3']) + self.assertEqual(exts[0].define_macros, [('1', '2')]) def test_get_source_files(self): modules = [Extension('foo', ['xxx'], optional=False)] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() - self.assertEquals(cmd.get_source_files(), ['xxx']) + self.assertEqual(cmd.get_source_files(), ['xxx']) def test_compiler_option(self): # cmd.compiler is an option and @@ -313,7 +313,7 @@ def test_compiler_option(self): cmd.compiler = 'unix' cmd.ensure_finalized() cmd.run() - self.assertEquals(cmd.compiler, 'unix') + self.assertEqual(cmd.compiler, 'unix') def test_get_outputs(self): tmp_dir = self.mkdtemp() @@ -325,7 +325,7 @@ def test_get_outputs(self): cmd = build_ext(dist) self._fixup_command(cmd) cmd.ensure_finalized() - self.assertEquals(len(cmd.get_outputs()), 1) + self.assertEqual(len(cmd.get_outputs()), 1) if os.name == "nt": cmd.debug = sys.executable.endswith("_d.exe") @@ -348,7 +348,7 @@ def test_get_outputs(self): so_ext = sysconfig.get_config_var('SO') self.assertTrue(so_file.endswith(so_ext)) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, other_tmp_dir) + self.assertEqual(so_dir, other_tmp_dir) cmd.inplace = 0 cmd.compiler = None @@ -357,7 +357,7 @@ def test_get_outputs(self): self.assertTrue(os.path.exists(so_file)) self.assertTrue(so_file.endswith(so_ext)) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, cmd.build_lib) + self.assertEqual(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' build_py = cmd.get_finalized_command('build_py') @@ -365,7 +365,7 @@ def test_get_outputs(self): path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] - self.assertEquals(path, cmd.build_lib) + self.assertEqual(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -379,7 +379,7 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, 'bar') + self.assertEqual(lastdir, 'bar') def test_ext_fullpath(self): ext = sysconfig.get_config_vars()['SO'] @@ -395,14 +395,14 @@ def test_ext_fullpath(self): curdir = os.getcwd() wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap not inplace build_py = cmd.get_finalized_command('build_py') @@ -411,13 +411,13 @@ def test_ext_fullpath(self): path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) def test_suite(): src = _get_source_filename() diff --git a/tests/test_check.py b/tests/test_check.py index 6ad2fe3920..229ae25c6d 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -27,7 +27,7 @@ def test_check_metadata(self): # by default, check is checking the metadata # should have some warnings cmd = self._run() - self.assertEquals(cmd._warnings, 2) + self.assertEqual(cmd._warnings, 2) # now let's add the required fields # and run it again, to make sure we don't get @@ -36,7 +36,7 @@ def test_check_metadata(self): 'author_email': 'xxx', 'name': 'xxx', 'version': 'xxx'} cmd = self._run(metadata) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) # now with the strict mode, we should # get an error if there are missing metadata @@ -44,7 +44,7 @@ def test_check_metadata(self): # and of course, no error when all metadata are present cmd = self._run(metadata, strict=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_document(self): if not HAS_DOCUTILS: # won't test without docutils @@ -55,12 +55,12 @@ def test_check_document(self): # let's see if it detects broken rest broken_rest = 'title\n===\n\ntest' msgs = cmd._check_rst_data(broken_rest) - self.assertEquals(len(msgs), 1) + self.assertEqual(len(msgs), 1) # and non-broken rest rest = 'title\n=====\n\ntest' msgs = cmd._check_rst_data(rest) - self.assertEquals(len(msgs), 0) + self.assertEqual(len(msgs), 0) def test_check_restructuredtext(self): if not HAS_DOCUTILS: # won't test without docutils @@ -70,7 +70,7 @@ def test_check_restructuredtext(self): pkg_info, dist = self.create_dist(long_description=broken_rest) cmd = check(dist) cmd.check_restructuredtext() - self.assertEquals(cmd._warnings, 1) + self.assertEqual(cmd._warnings, 1) # let's see if we have an error with strict=1 metadata = {'url': 'xxx', 'author': 'xxx', @@ -83,7 +83,7 @@ def test_check_restructuredtext(self): # and non-broken rest metadata['long_description'] = 'title\n=====\n\ntest' cmd = self._run(metadata, strict=1, restructuredtext=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_all(self): diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 969f82ba0f..195045cc7b 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -44,7 +44,7 @@ def test_make_file(self): # making sure execute gets called properly def _execute(func, args, exec_msg, level): - self.assertEquals(exec_msg, 'generating out from in') + self.assertEqual(exec_msg, 'generating out from in') cmd.force = True cmd.execute = _execute cmd.make_file(infiles='in', outfile='out', func='func', args=()) @@ -63,7 +63,7 @@ def _announce(msg, level): wanted = ["command options for 'MyCmd':", ' option1 = 1', ' option2 = 1'] - self.assertEquals(msgs, wanted) + self.assertEqual(msgs, wanted) def test_ensure_string(self): cmd = self.cmd @@ -81,7 +81,7 @@ def test_ensure_string_list(self): cmd = self.cmd cmd.option1 = 'ok,dok' cmd.ensure_string_list('option1') - self.assertEquals(cmd.option1, ['ok', 'dok']) + self.assertEqual(cmd.option1, ['ok', 'dok']) cmd.option2 = ['xxx', 'www'] cmd.ensure_string_list('option2') @@ -109,14 +109,14 @@ def test_debug_print(self): with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_config.py b/tests/test_config.py index 05a35da903..525bee9416 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -89,7 +89,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server1'), ('username', 'me')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) # old format self.write_file(self.rc, PYPIRC_OLD) @@ -98,7 +98,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server-login'), ('username', 'tarek')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) def test_server_empty_registration(self): cmd = self._cmd(self.dist) @@ -109,7 +109,7 @@ def test_server_empty_registration(self): f = open(rc) try: content = f.read() - self.assertEquals(content, WANTED) + self.assertEqual(content, WANTED) finally: f.close() diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index c224a5c36d..4f7ebdd9fc 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -35,7 +35,7 @@ def test_dump_file(self): f.close() dump_file(this_file, 'I am the header') - self.assertEquals(len(self._logs), numlines+1) + self.assertEqual(len(self._logs), numlines+1) def test_search_cpp(self): if sys.platform == 'win32': @@ -45,10 +45,10 @@ def test_search_cpp(self): # simple pattern searches match = cmd.search_cpp(pattern='xxx', body='// xxx') - self.assertEquals(match, 0) + self.assertEqual(match, 0) match = cmd.search_cpp(pattern='_configtest', body='// xxx') - self.assertEquals(match, 1) + self.assertEqual(match, 1) def test_finalize_options(self): # finalize_options does a bit of transformation @@ -60,9 +60,9 @@ def test_finalize_options(self): cmd.library_dirs = 'three%sfour' % os.pathsep cmd.ensure_finalized() - self.assertEquals(cmd.include_dirs, ['one', 'two']) - self.assertEquals(cmd.libraries, ['one']) - self.assertEquals(cmd.library_dirs, ['three', 'four']) + self.assertEqual(cmd.include_dirs, ['one', 'two']) + self.assertEqual(cmd.libraries, ['one']) + self.assertEqual(cmd.library_dirs, ['three', 'four']) def test_clean(self): # _clean removes files diff --git a/tests/test_core.py b/tests/test_core.py index 47fae245e7..41321f7db4 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -89,7 +89,7 @@ def test_debug_mode(self): with captured_stdout() as stdout: distutils.core.setup(name='bar') stdout.seek(0) - self.assertEquals(stdout.read(), 'bar\n') + self.assertEqual(stdout.read(), 'bar\n') distutils.core.DEBUG = True try: @@ -99,7 +99,7 @@ def test_debug_mode(self): distutils.core.DEBUG = False stdout.seek(0) wanted = "options (after parsing config files):\n" - self.assertEquals(stdout.readlines()[0], wanted) + self.assertEqual(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index e57bab269a..856921679d 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -66,82 +66,82 @@ def test_check_config_h(self): sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' '4.0.1 (Apple Computer, Inc. build 5370)]') - self.assertEquals(check_config_h()[0], CONFIG_H_OK) + self.assertEqual(check_config_h()[0], CONFIG_H_OK) # then it tries to see if it can find "__GNUC__" in pyconfig.h sys.version = 'something without the *CC word' # if the file doesn't exist it returns CONFIG_H_UNCERTAIN - self.assertEquals(check_config_h()[0], CONFIG_H_UNCERTAIN) + self.assertEqual(check_config_h()[0], CONFIG_H_UNCERTAIN) # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK self.write_file(self.python_h, 'xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_NOTOK) + self.assertEqual(check_config_h()[0], CONFIG_H_NOTOK) # and CONFIG_H_OK if __GNUC__ is found self.write_file(self.python_h, 'xxx __GNUC__ xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_OK) + self.assertEqual(check_config_h()[0], CONFIG_H_OK) def test_get_versions(self): # get_versions calls distutils.spawn.find_executable on # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) + self.assertEqual(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') + self.assertEqual(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) self._exes['gcc'] = b'very strange output' res = get_versions() - self.assertEquals(res[0], None) + self.assertEqual(res[0], None) # same thing for ld self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') + self.assertEqual(str(res[1]), '2.17.50') self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() - self.assertEquals(res[1], None) + self.assertEqual(res[1], None) # and dllwrap self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') + self.assertEqual(str(res[2]), '2.17.50') self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() - self.assertEquals(res[2], None) + self.assertEqual(res[2], None) def test_get_msvcr(self): # none sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') - self.assertEquals(get_msvcr(), None) + self.assertEqual(get_msvcr(), None) # MSVC 7.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1300 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr70']) + self.assertEqual(get_msvcr(), ['msvcr70']) # MSVC 7.1 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1310 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr71']) + self.assertEqual(get_msvcr(), ['msvcr71']) # VS2005 / MSVC 8.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1400 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr80']) + self.assertEqual(get_msvcr(), ['msvcr80']) # VS2008 / MSVC 9.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1500 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr90']) + self.assertEqual(get_msvcr(), ['msvcr90']) # unknown sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index 390ed9b602..3e1c366892 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -43,8 +43,8 @@ def test_newer_pairwise(self): self.write_file(two) self.write_file(four) - self.assertEquals(newer_pairwise([one, two], [three, four]), - ([one],[three])) + self.assertEqual(newer_pairwise([one, two], [three, four]), + ([one],[three])) def test_newer_group(self): tmpdir = self.mkdtemp() diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 7356c766e6..ce74589dde 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -38,18 +38,18 @@ def test_mkpath_remove_tree_verbosity(self): mkpath(self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) mkpath(self.target, verbose=1) wanted = ['creating %s' % self.root_target, 'creating %s' % self.target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) self._logs = [] remove_tree(self.root_target, verbose=1) wanted = ["removing '%s' (and everything under it)" % self.root_target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") @@ -67,12 +67,12 @@ def test_mkpath_with_custom_mode(self): def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) wanted = ['creating %s' % self.root_target] create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) @@ -82,7 +82,7 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) copy_tree(self.target, self.target2, verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) @@ -96,18 +96,18 @@ def test_copy_tree_verbosity(self): wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) def test_ensure_relative(self): if os.sep == '/': - self.assertEquals(ensure_relative('/home/foo'), 'home/foo') - self.assertEquals(ensure_relative('some/path'), 'some/path') + self.assertEqual(ensure_relative('/home/foo'), 'home/foo') + self.assertEqual(ensure_relative('some/path'), 'some/path') else: # \\ - self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo') - self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') + self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') + self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') def test_suite(): return unittest.makeSuite(DirUtilTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index a8eb8b1d5a..a20d6c8ffc 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -124,7 +124,7 @@ def _warn(msg): finally: warnings.warn = old_warn - self.assertEquals(len(warns), 0) + self.assertEqual(len(warns), 0) def test_finalize_options(self): @@ -135,20 +135,20 @@ def test_finalize_options(self): dist.finalize_options() # finalize_option splits platforms and keywords - self.assertEquals(dist.metadata.platforms, ['one', 'two']) - self.assertEquals(dist.metadata.keywords, ['one', 'two']) + self.assertEqual(dist.metadata.platforms, ['one', 'two']) + self.assertEqual(dist.metadata.keywords, ['one', 'two']) def test_get_command_packages(self): dist = Distribution() - self.assertEquals(dist.command_packages, None) + self.assertEqual(dist.command_packages, None) cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command']) - self.assertEquals(dist.command_packages, - ['distutils.command']) + self.assertEqual(cmds, ['distutils.command']) + self.assertEqual(dist.command_packages, + ['distutils.command']) dist.command_packages = 'one,two' cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + self.assertEqual(cmds, ['distutils.command', 'one', 'two']) def test_announce(self): @@ -287,8 +287,8 @@ def test_custom_pydistutils(self): def test_fix_help_options(self): help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] fancy_options = fix_help_options(help_tuples) - self.assertEquals(fancy_options[0], ('a', 'b', 'c')) - self.assertEquals(fancy_options[1], (1, 2, 3)) + self.assertEqual(fancy_options[0], ('a', 'b', 'c')) + self.assertEqual(fancy_options[1], (1, 2, 3)) def test_show_help(self): # smoke test, just makes sure some help is displayed diff --git a/tests/test_extension.py b/tests/test_extension.py index c9c8965706..e35f2738b6 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -28,38 +28,38 @@ def test_read_setup_file(self): 'rect', 'rwobject', 'scrap', 'surface', 'surflock', 'time', 'transform'] - self.assertEquals(names, wanted) + self.assertEqual(names, wanted) def test_extension_init(self): # the first argument, which is the name, must be a string self.assertRaises(AssertionError, Extension, 1, []) ext = Extension('name', []) - self.assertEquals(ext.name, 'name') + self.assertEqual(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) ext = Extension('name', ['file1', 'file2']) - self.assertEquals(ext.sources, ['file1', 'file2']) + self.assertEqual(ext.sources, ['file1', 'file2']) # others arguments have defaults for attr in ('include_dirs', 'define_macros', 'undef_macros', 'library_dirs', 'libraries', 'runtime_library_dirs', 'extra_objects', 'extra_compile_args', 'extra_link_args', 'export_symbols', 'swig_opts', 'depends'): - self.assertEquals(getattr(ext, attr), []) + self.assertEqual(getattr(ext, attr), []) - self.assertEquals(ext.language, None) - self.assertEquals(ext.optional, None) + self.assertEqual(ext.language, None) + self.assertEqual(ext.optional, None) # if there are unknown keyword options, warn about them with check_warnings() as w: warnings.simplefilter('always') ext = Extension('name', ['file1', 'file2'], chic=True) - self.assertEquals(len(w.warnings), 1) - self.assertEquals(str(w.warnings[0].message), + self.assertEqual(len(w.warnings), 1) + self.assertEqual(str(w.warnings[0].message), "Unknown Extension options: 'chic'") def test_suite(): diff --git a/tests/test_file_util.py b/tests/test_file_util.py index be743f3436..3c3e3dcb3b 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -39,14 +39,14 @@ def test_move_file_verbosity(self): move_file(self.source, self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) move_file(self.source, self.target, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) @@ -56,7 +56,7 @@ def test_move_file_verbosity(self): os.mkdir(self.target_dir) move_file(self.source, self.target_dir, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target_dir)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) def test_suite(): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 6312a29485..c7e5201b17 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -9,29 +9,29 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_install.py b/tests/test_install.py index 22e79b8909..a76e3e7a3c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -123,23 +123,23 @@ def test_handle_extra_path(self): # two elements cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path', 'dirs']) - self.assertEquals(cmd.extra_dirs, 'dirs') - self.assertEquals(cmd.path_file, 'path') + self.assertEqual(cmd.extra_path, ['path', 'dirs']) + self.assertEqual(cmd.extra_dirs, 'dirs') + self.assertEqual(cmd.path_file, 'path') # one element cmd.extra_path = ['path'] cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path']) - self.assertEquals(cmd.extra_dirs, 'path') - self.assertEquals(cmd.path_file, 'path') + self.assertEqual(cmd.extra_path, ['path']) + self.assertEqual(cmd.extra_dirs, 'path') + self.assertEqual(cmd.path_file, 'path') # none dist.extra_path = cmd.extra_path = None cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, None) - self.assertEquals(cmd.extra_dirs, '') - self.assertEquals(cmd.path_file, None) + self.assertEqual(cmd.extra_path, None) + self.assertEqual(cmd.extra_dirs, '') + self.assertEqual(cmd.path_file, None) # three elements (no way !) cmd.extra_path = 'path,dirs,again' @@ -184,7 +184,7 @@ def test_record(self): # line (the egg info file) f = open(cmd.record) try: - self.assertEquals(len(f.readlines()), 1) + self.assertEqual(len(f.readlines()), 1) finally: f.close() diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 6b3b4c82ce..4d8c00acb9 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -28,14 +28,14 @@ def test_simple_run(self): self.write_file(two, 'xxx') cmd.data_files = [one, (inst2, [two])] - self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])]) + self.assertEqual(cmd.get_inputs(), [one, (inst2, [two])]) # let's run the command cmd.ensure_finalized() cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] @@ -48,7 +48,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] @@ -66,7 +66,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 4) + self.assertEqual(len(cmd.get_outputs()), 4) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index dc74c58d6c..d953157bb7 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -24,7 +24,7 @@ def test_simple_run(self): pkg_dir, dist = self.create_dist(headers=headers) cmd = install_headers(dist) - self.assertEquals(cmd.get_inputs(), headers) + self.assertEqual(cmd.get_inputs(), headers) # let's run the command cmd.install_dir = os.path.join(pkg_dir, 'inst') @@ -32,7 +32,7 @@ def test_simple_run(self): cmd.run() # let's check the results - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 790d4ce300..fddaabe111 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -19,8 +19,8 @@ def test_finalize_options(self): cmd = install_lib(dist) cmd.finalize_options() - self.assertEquals(cmd.compile, 1) - self.assertEquals(cmd.optimize, 0) + self.assertEqual(cmd.compile, 1) + self.assertEqual(cmd.optimize, 0) # optimize must be 0, 1, or 2 cmd.optimize = 'foo' @@ -30,7 +30,7 @@ def test_finalize_options(self): cmd.optimize = '2' cmd.finalize_options() - self.assertEquals(cmd.optimize, 2) + self.assertEqual(cmd.optimize, 2) @unittest.skipUnless(not sys.dont_write_bytecode, 'byte-compile not supported') @@ -77,7 +77,7 @@ def test_get_inputs(self): cmd.distribution.script_name = 'setup.py' # get_input should return 2 elements - self.assertEquals(len(cmd.get_inputs()), 2) + self.assertEqual(len(cmd.get_inputs()), 2) def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_log.py b/tests/test_log.py index 5f87076bd7..ce66ee51e7 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -23,9 +23,9 @@ def test_non_ascii(self): log.debug("debug:\xe9") log.fatal("fatal:\xe9") stdout.seek(0) - self.assertEquals(stdout.read().rstrip(), "debug:\\xe9") + self.assertEqual(stdout.read().rstrip(), "debug:\\xe9") stderr.seek(0) - self.assertEquals(stderr.read().rstrip(), "fatal:\\xe9") + self.assertEqual(stderr.read().rstrip(), "fatal:\\xe9") finally: sys.stdout = old_stdout sys.stderr = old_stderr diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 45bae77a6c..a0d62efcfd 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -104,7 +104,7 @@ def test_reg_class(self): import winreg HKCU = winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') - self.assertEquals(keys, None) + self.assertEqual(keys, None) keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) @@ -131,7 +131,7 @@ def test_remove_visual_c_ref(self): f.close() # makes sure the manifest was properly cleaned - self.assertEquals(content, _CLEANED_MANIFEST) + self.assertEqual(content, _CLEANED_MANIFEST) def test_suite(): diff --git a/tests/test_register.py b/tests/test_register.py index 9336ac8604..c712f56a78 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -121,7 +121,7 @@ def test_create_pypirc(self): f = open(self.rc) try: content = f.read() - self.assertEquals(content, WANTED_PYPIRC) + self.assertEqual(content, WANTED_PYPIRC) finally: f.close() @@ -141,8 +141,8 @@ def _no_way(prompt=''): req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) - self.assertEquals(req1['Content-length'], '1374') - self.assertEquals(req2['Content-length'], '1374') + self.assertEqual(req1['Content-length'], '1374') + self.assertEqual(req2['Content-length'], '1374') self.assertTrue((b'xxx') in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -155,7 +155,7 @@ def test_password_not_in_file(self): # dist.password should be set # therefore used afterwards by other commands - self.assertEquals(cmd.distribution.password, 'password') + self.assertEqual(cmd.distribution.password, 'password') def test_registering(self): # this test runs choice 2 @@ -172,7 +172,7 @@ def test_registering(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '608') + self.assertEqual(headers['Content-length'], '608') self.assertTrue((b'tarek') in req.data) def test_password_reset(self): @@ -190,7 +190,7 @@ def test_password_reset(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '290') + self.assertEqual(headers['Content-length'], '290') self.assertTrue((b'tarek') in req.data) def test_strict(self): @@ -253,7 +253,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_suite(): return unittest.makeSuite(RegisterTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 73962d34f2..655e50dcfc 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -108,7 +108,7 @@ def test_prune_file_list(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -117,7 +117,7 @@ def test_prune_file_list(self): zip_file.close() # making sure everything has been pruned correctly - self.assertEquals(len(content), 4) + self.assertEqual(len(content), 4) def test_make_distribution(self): @@ -138,8 +138,7 @@ def test_make_distribution(self): dist_folder = join(self.tmp_dir, 'dist') result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) os.remove(join(dist_folder, 'fake-1.0.tar')) os.remove(join(dist_folder, 'fake-1.0.tar.gz')) @@ -152,8 +151,7 @@ def test_make_distribution(self): result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz']) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) def test_add_defaults(self): @@ -201,7 +199,7 @@ def test_add_defaults(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -210,13 +208,13 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 11) + self.assertEqual(len(content), 11) # checking the MANIFEST f = open(join(self.tmp_dir, 'MANIFEST')) try: manifest = f.read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + self.assertEqual(manifest, MANIFEST % {'sep': os.sep}) finally: f.close() @@ -229,7 +227,7 @@ def test_metadata_check_option(self): cmd.ensure_finalized() cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 2) + self.assertEqual(len(warnings), 2) # trying with a complete set of metadata self.clear_logs() @@ -238,7 +236,7 @@ def test_metadata_check_option(self): cmd.metadata_check = 0 cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 0) + self.assertEqual(len(warnings), 0) def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated @@ -246,7 +244,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_show_formats(self): with captured_stdout() as stdout: @@ -256,7 +254,7 @@ def test_show_formats(self): num_formats = len(ARCHIVE_FORMATS.keys()) output = [line for line in stdout.getvalue().split('\n') if line.strip().startswith('--formats=')] - self.assertEquals(len(output), num_formats) + self.assertEqual(len(output), num_formats) def test_finalize_options(self): @@ -264,9 +262,9 @@ def test_finalize_options(self): cmd.finalize_options() # default options set by finalize - self.assertEquals(cmd.manifest, 'MANIFEST') - self.assertEquals(cmd.template, 'MANIFEST.in') - self.assertEquals(cmd.dist_dir, 'dist') + self.assertEqual(cmd.manifest, 'MANIFEST') + self.assertEqual(cmd.template, 'MANIFEST.in') + self.assertEqual(cmd.dist_dir, 'dist') # formats has to be a string splitable on (' ', ',') or # a stringlist @@ -297,7 +295,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 5) + self.assertEqual(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -317,7 +315,7 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 6) + self.assertEqual(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) def test_manifest_marker(self): diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 5b91aa5a11..6c7eb20c47 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -20,7 +20,7 @@ def test_nt_quote_args(self): (['nochange', 'nospace'], ['nochange', 'nospace'])): res = _nt_quote_args(args) - self.assertEquals(res, wanted) + self.assertEqual(res, wanted) @unittest.skipUnless(os.name in ('nt', 'posix'), diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 215dc82df0..336c6a5b95 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -70,7 +70,7 @@ def set_executables(self, **kw): comp = compiler() sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + self.assertEqual(comp.exes['archiver'], 'my_ar -arflags') def test_parse_makefile_base(self): self.makefile = TESTFN @@ -81,8 +81,8 @@ def test_parse_makefile_base(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", - 'OTHER': 'foo'}) + self.assertEqual(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", + 'OTHER': 'foo'}) def test_parse_makefile_literal_dollar(self): self.makefile = TESTFN @@ -93,16 +93,16 @@ def test_parse_makefile_literal_dollar(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", - 'OTHER': 'foo'}) + self.assertEqual(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) def test_sysconfig_module(self): import sysconfig as global_sysconfig - self.assertEquals(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) - self.assertEquals(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) - self.assertEquals(global_sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('LDSHARED')) - self.assertEquals(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) + self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) + self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) + self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('LDSHARED')) + self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 953cb8ea08..7e76240a9a 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -49,7 +49,7 @@ def test_class(self): def test_input(count, description, file, expected_result): result = file.readlines() - self.assertEquals(result, expected_result) + self.assertEqual(result, expected_result) tmpdir = self.mkdtemp() filename = os.path.join(tmpdir, "test.txt") diff --git a/tests/test_upload.py b/tests/test_upload.py index 4661ed3212..4c6464a32e 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -89,7 +89,7 @@ def test_finalize_options(self): for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi')): - self.assertEquals(getattr(cmd, attr), waited) + self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): # file with no password @@ -99,14 +99,14 @@ def test_saved_password(self): dist = Distribution() cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, None) + self.assertEqual(cmd.password, None) # make sure we get it as well, if another command # initialized it at the dist level dist.password = 'xxx' cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, 'xxx') + self.assertEqual(cmd.password, 'xxx') def test_upload(self): tmp = self.mkdtemp() @@ -124,12 +124,12 @@ def test_upload(self): # what did we send ? headers = dict(self.conn.headers) - self.assertEquals(headers['Content-length'], '2087') + self.assertEqual(headers['Content-length'], '2087') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertFalse('\n' in headers['Authorization']) - self.assertEquals(self.conn.requests, [('POST', '/pypi')]) - self.assert_((b'xxx') in self.conn.body) + self.assertEqual(self.conn.requests, [('POST', '/pypi')]) + self.assertTrue((b'xxx') in self.conn.body) def test_suite(): return unittest.makeSuite(uploadTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 3b7159d72f..8ff5ae2085 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -67,21 +67,21 @@ def test_get_platform(self): sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Intel)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win32') + self.assertEqual(get_platform(), 'win32') # windows XP, amd64 os.name = 'nt' sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Amd64)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-amd64') + self.assertEqual(get_platform(), 'win-amd64') # windows XP, itanium os.name = 'nt' sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Itanium)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-ia64') + self.assertEqual(get_platform(), 'win-ia64') # macbook os.name = 'posix' @@ -100,7 +100,7 @@ def test_get_platform(self): cursize = sys.maxsize sys.maxsize = (2 ** 31)-1 try: - self.assertEquals(get_platform(), 'macosx-10.3-i386') + self.assertEqual(get_platform(), 'macosx-10.3-i386') finally: sys.maxsize = cursize @@ -111,33 +111,33 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat') + self.assertEqual(get_platform(), 'macosx-10.4-fat') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-intel') + self.assertEqual(get_platform(), 'macosx-10.4-intel') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat3') + self.assertEqual(get_platform(), 'macosx-10.4-fat3') get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-universal') + self.assertEqual(get_platform(), 'macosx-10.4-universal') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat64') + self.assertEqual(get_platform(), 'macosx-10.4-fat64') for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' @@ -145,7 +145,7 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3'%(arch,)) - self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,)) # linux debian sarge os.name = 'posix' @@ -155,7 +155,7 @@ def test_get_platform(self): self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) - self.assertEquals(get_platform(), 'linux-i686') + self.assertEqual(get_platform(), 'linux-i686') # XXX more platforms to tests here @@ -166,8 +166,8 @@ def _join(path): return '/'.join(path) os.path.join = _join - self.assertEquals(convert_path('/home/to/my/stuff'), - '/home/to/my/stuff') + self.assertEqual(convert_path('/home/to/my/stuff'), + '/home/to/my/stuff') # win os.sep = '\\' @@ -178,10 +178,10 @@ def _join(*path): self.assertRaises(ValueError, convert_path, '/home/to/my/stuff') self.assertRaises(ValueError, convert_path, 'home/to/my/stuff/') - self.assertEquals(convert_path('home/to/my/stuff'), - 'home\\to\\my\\stuff') - self.assertEquals(convert_path('.'), - os.curdir) + self.assertEqual(convert_path('home/to/my/stuff'), + 'home\\to\\my\\stuff') + self.assertEqual(convert_path('.'), + os.curdir) def test_change_root(self): # linux/mac @@ -193,10 +193,10 @@ def _join(*path): return '/'.join(path) os.path.join = _join - self.assertEquals(change_root('/root', '/old/its/here'), - '/root/old/its/here') - self.assertEquals(change_root('/root', 'its/here'), - '/root/its/here') + self.assertEqual(change_root('/root', '/old/its/here'), + '/root/old/its/here') + self.assertEqual(change_root('/root', 'its/here'), + '/root/its/here') # windows os.name = 'nt' @@ -212,10 +212,10 @@ def _join(*path): return '\\'.join(path) os.path.join = _join - self.assertEquals(change_root('c:\\root', 'c:\\old\\its\\here'), - 'c:\\root\\old\\its\\here') - self.assertEquals(change_root('c:\\root', 'its\\here'), - 'c:\\root\\its\\here') + self.assertEqual(change_root('c:\\root', 'c:\\old\\its\\here'), + 'c:\\root\\old\\its\\here') + self.assertEqual(change_root('c:\\root', 'its\\here'), + 'c:\\root\\its\\here') # BugsBunny os (it's a great os) os.name = 'BugsBunny' @@ -233,16 +233,16 @@ def test_check_environ(self): if os.name == 'posix': # this test won't run on windows check_environ() import pwd - self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) + self.assertEqual(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(os.environ['PLAT'], get_platform()) - self.assertEquals(util._environ_checked, 1) + self.assertEqual(os.environ['PLAT'], get_platform()) + self.assertEqual(util._environ_checked, 1) def test_split_quoted(self): - self.assertEquals(split_quoted('""one"" "two" \'three\' \\four'), - ['one', 'two', 'three', 'four']) + self.assertEqual(split_quoted('""one"" "two" \'three\' \\four'), + ['one', 'two', 'three', 'four']) def test_strtobool(self): yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') @@ -259,7 +259,7 @@ def test_rfc822_escape(self): res = rfc822_escape(header) wanted = ('I am a%(8s)spoor%(8s)slonesome%(8s)s' 'header%(8s)s') % {'8s': '\n'+8*' '} - self.assertEquals(res, wanted) + self.assertEqual(res, wanted) def test_dont_write_bytecode(self): # makes sure byte_compile raise a DistutilsError diff --git a/tests/test_version.py b/tests/test_version.py index ff40f6b45c..15f14c7de3 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -8,12 +8,12 @@ class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') - self.assertEquals(version.version, (1, 2, 3)) - self.assertEquals(version.prerelease, ('a', 1)) - self.assertEquals(str(version), '1.2.3a1') + self.assertEqual(version.version, (1, 2, 3)) + self.assertEqual(version.prerelease, ('a', 1)) + self.assertEqual(str(version), '1.2.3a1') version = StrictVersion('1.2.0') - self.assertEquals(str(version), '1.2') + self.assertEqual(str(version), '1.2') def test_cmp_strict(self): versions = (('1.5.1', '1.5.2b2', -1), @@ -42,9 +42,9 @@ def test_cmp_strict(self): raise AssertionError(("cmp(%s, %s) " "shouldn't raise ValueError") % (v1, v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_cmp(self): @@ -60,9 +60,9 @@ def test_cmp(self): for v1, v2, wanted in versions: res = LooseVersion(v1)._cmp(LooseVersion(v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_suite(): return unittest.makeSuite(VersionTestCase) From 0ed78e843c5c79f31e9664a39820e21722b537d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Nov 2010 19:35:27 +0000 Subject: [PATCH 3111/8469] Fix two NameErrors in distutils (#10407) --- dir_util.py | 1 + tests/test_sysconfig.py | 1 + 2 files changed, 2 insertions(+) diff --git a/dir_util.py b/dir_util.py index c7c9fccfd7..5b005f0865 100644 --- a/dir_util.py +++ b/dir_util.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import os, sys +import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 336c6a5b95..fbe26bf65d 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,5 +1,6 @@ """Tests for distutils.sysconfig.""" import os +import shutil import test import unittest From 33f7d87cb4ff994bfed3923052bde36b9698a6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Nov 2010 19:45:32 +0000 Subject: [PATCH 3112/8469] Merged revisions 86601,86605 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86601 | eric.araujo | 2010-11-20 20:35:27 +0100 (sam., 20 nov. 2010) | 2 lines Fix two NameErrors in distutils (#10407) ........ r86605 | eric.araujo | 2010-11-20 20:37:28 +0100 (sam., 20 nov. 2010) | 2 lines Add entry for r86601 ........ --- dir_util.py | 1 + tests/test_sysconfig.py | 1 + 2 files changed, 2 insertions(+) diff --git a/dir_util.py b/dir_util.py index c7c9fccfd7..5b005f0865 100644 --- a/dir_util.py +++ b/dir_util.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import os, sys +import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 78bce9461f..309be7b8b1 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,5 +1,6 @@ """Tests for distutils.sysconfig.""" import os +import shutil import test import unittest From d9cf33af24cb0537a0dc26fb94e79959467483ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Nov 2010 20:02:41 +0000 Subject: [PATCH 3113/8469] Merged revisions 86601,86605 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k In 2.7, there was only one NameError. ........ r86601 | eric.araujo | 2010-11-20 20:35:27 +0100 (sam., 20 nov. 2010) | 2 lines Fix two NameErrors in distutils (#10407) ........ r86605 | eric.araujo | 2010-11-20 20:37:28 +0100 (sam., 20 nov. 2010) | 2 lines Add entry for r86601 ........ --- dir_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dir_util.py b/dir_util.py index d6875936d6..9c5cf337c6 100644 --- a/dir_util.py +++ b/dir_util.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" import os +import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log From dcc7727442e3d4796d7d2bb8db40c8e04f42703a Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sun, 21 Nov 2010 01:30:29 +0000 Subject: [PATCH 3114/8469] Merged revisions 86596 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........ --- tests/test_archive_util.py | 14 ++++---- tests/test_bdist.py | 4 +-- tests/test_bdist_dumb.py | 2 +- tests/test_build_clib.py | 10 +++--- tests/test_build_ext.py | 56 +++++++++++++++---------------- tests/test_check.py | 14 ++++---- tests/test_cmd.py | 10 +++--- tests/test_config.py | 6 ++-- tests/test_config_cmd.py | 12 +++---- tests/test_core.py | 4 +-- tests/test_cygwinccompiler.py | 32 +++++++++--------- tests/test_dir_util.py | 22 ++++++------- tests/test_dist.py | 20 +++++------ tests/test_extension.py | 16 ++++----- tests/test_file_util.py | 6 ++-- tests/test_filelist.py | 18 +++++----- tests/test_install.py | 20 +++++------ tests/test_install_data.py | 8 ++--- tests/test_install_headers.py | 4 +-- tests/test_install_lib.py | 8 ++--- tests/test_log.py | 4 +-- tests/test_msvc9compiler.py | 4 +-- tests/test_register.py | 14 ++++---- tests/test_sdist.py | 34 +++++++++---------- tests/test_spawn.py | 2 +- tests/test_sysconfig.py | 8 ++--- tests/test_text_file.py | 2 +- tests/test_upload.py | 12 +++---- tests/test_util.py | 62 +++++++++++++++++------------------ tests/test_version.py | 20 +++++------ 30 files changed, 223 insertions(+), 225 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index c6e08cbc2b..d77302d547 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -113,7 +113,7 @@ def test_tarfile_vs_tar(self): self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs - self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) + self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -153,7 +153,7 @@ def test_compress_deprecated(self): os.chdir(old_dir) tarball = base_name + '.tar.Z' self.assertTrue(os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) # same test with dry_run os.remove(tarball) @@ -167,7 +167,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) self.assertTrue(not os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): @@ -184,9 +184,9 @@ def test_make_zipfile(self): tarball = base_name + '.zip' def test_check_archive_formats(self): - self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']), - 'xxx') - self.assertEquals(check_archive_formats(['gztar', 'zip']), None) + self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), + 'xxx') + self.assertEqual(check_archive_formats(['gztar', 'zip']), None) def test_make_archive(self): tmpdir = self.mkdtemp() @@ -203,7 +203,7 @@ def _breaks(*args, **kw): make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) except: pass - self.assertEquals(os.getcwd(), current_dir) + self.assertEqual(os.getcwd(), current_dir) finally: del ARCHIVE_FORMATS['xxx'] diff --git a/tests/test_bdist.py b/tests/test_bdist.py index f2849a9756..715283cb97 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -23,7 +23,7 @@ def test_formats(self): cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() - self.assertEquals(cmd.formats, ['msi']) + self.assertEqual(cmd.formats, ['msi']) # what format bdist offers ? # XXX an explicit list in bdist is @@ -34,7 +34,7 @@ def test_formats(self): formats.sort() founded = list(cmd.format_command.keys()) founded.sort() - self.assertEquals(founded, formats) + self.assertEqual(founded, formats) def test_suite(): return unittest.makeSuite(BuildTestCase) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 5e76809f23..bf146eb573 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -68,7 +68,7 @@ def test_simple_built(self): base = base.replace(':', '-') wanted = ['%s.zip' % base] - self.assertEquals(dist_created, wanted) + self.assertEqual(dist_created, wanted) # now let's check what we have in the zip file # XXX to be done diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 536cd67319..d6d1a4d0c1 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -55,14 +55,14 @@ def test_get_source_files(self): self.assertRaises(DistutilsSetupError, cmd.get_source_files) cmd.libraries = [('name', {'sources': ['a', 'b']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')}), ('name2', {'sources': ['c', 'd']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + self.assertEqual(cmd.get_source_files(), ['a', 'b', 'c', 'd']) def test_build_libraries(self): @@ -91,11 +91,11 @@ def test_finalize_options(self): cmd.include_dirs = 'one-dir' cmd.finalize_options() - self.assertEquals(cmd.include_dirs, ['one-dir']) + self.assertEqual(cmd.include_dirs, ['one-dir']) cmd.include_dirs = None cmd.finalize_options() - self.assertEquals(cmd.include_dirs, []) + self.assertEqual(cmd.include_dirs, []) cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 226f7bb1fe..e8b15f156d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -96,11 +96,11 @@ def test_build_ext(self): for attr in ('error', 'foo', 'new', 'roj'): self.assertTrue(hasattr(xx, attr)) - self.assertEquals(xx.foo(2, 5), 7) - self.assertEquals(xx.foo(13,15), 28) - self.assertEquals(xx.new().demo(), None) + self.assertEqual(xx.foo(2, 5), 7) + self.assertEqual(xx.foo(13,15), 28) + self.assertEqual(xx.new().demo(), None) doc = 'This is a template module just for instruction.' - self.assertEquals(xx.__doc__, doc) + self.assertEqual(xx.__doc__, doc) self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) @@ -206,7 +206,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.libraries = 'my_lib' cmd.finalize_options() - self.assertEquals(cmd.libraries, ['my_lib']) + self.assertEqual(cmd.libraries, ['my_lib']) # make sure cmd.library_dirs is turned into a list # if it's a string @@ -220,7 +220,7 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.rpath = os.pathsep.join(['one', 'two']) cmd.finalize_options() - self.assertEquals(cmd.rpath, ['one', 'two']) + self.assertEqual(cmd.rpath, ['one', 'two']) # XXX more tests to perform for win32 @@ -229,25 +229,25 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.define = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + self.assertEqual(cmd.define, [('one', '1'), ('two', '1')]) # make sure undef is turned into a list of # strings if they are ','-separated strings cmd = build_ext(dist) cmd.undef = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.undef, ['one', 'two']) + self.assertEqual(cmd.undef, ['one', 'two']) # make sure swig_opts is turned into a list cmd = build_ext(dist) cmd.swig_opts = None cmd.finalize_options() - self.assertEquals(cmd.swig_opts, []) + self.assertEqual(cmd.swig_opts, []) cmd = build_ext(dist) cmd.swig_opts = '1 2' cmd.finalize_options() - self.assertEquals(cmd.swig_opts, ['1', '2']) + self.assertEqual(cmd.swig_opts, ['1', '2']) def test_check_extensions_list(self): dist = Distribution() @@ -283,7 +283,7 @@ def test_check_extensions_list(self): # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') - self.assertEquals(ext.libraries, 'foo') + self.assertEqual(ext.libraries, 'foo') self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple @@ -293,15 +293,15 @@ def test_check_extensions_list(self): exts[0][1]['macros'] = [('1', '2'), ('3',)] cmd.check_extensions_list(exts) - self.assertEquals(exts[0].undef_macros, ['3']) - self.assertEquals(exts[0].define_macros, [('1', '2')]) + self.assertEqual(exts[0].undef_macros, ['3']) + self.assertEqual(exts[0].define_macros, [('1', '2')]) def test_get_source_files(self): modules = [Extension('foo', ['xxx'], optional=False)] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() - self.assertEquals(cmd.get_source_files(), ['xxx']) + self.assertEqual(cmd.get_source_files(), ['xxx']) def test_compiler_option(self): # cmd.compiler is an option and @@ -312,7 +312,7 @@ def test_compiler_option(self): cmd.compiler = 'unix' cmd.ensure_finalized() cmd.run() - self.assertEquals(cmd.compiler, 'unix') + self.assertEqual(cmd.compiler, 'unix') def test_get_outputs(self): tmp_dir = self.mkdtemp() @@ -324,7 +324,7 @@ def test_get_outputs(self): cmd = build_ext(dist) self._fixup_command(cmd) cmd.ensure_finalized() - self.assertEquals(len(cmd.get_outputs()), 1) + self.assertEqual(len(cmd.get_outputs()), 1) if os.name == "nt": cmd.debug = sys.executable.endswith("_d.exe") @@ -344,20 +344,20 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assertTrue(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + self.assertEqual(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, other_tmp_dir) + self.assertEqual(so_dir, other_tmp_dir) cmd.inplace = 0 cmd.compiler = None cmd.run() so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + self.assertEqual(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, cmd.build_lib) + self.assertEqual(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' build_py = cmd.get_finalized_command('build_py') @@ -365,7 +365,7 @@ def test_get_outputs(self): path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] - self.assertEquals(path, cmd.build_lib) + self.assertEqual(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -379,7 +379,7 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, 'bar') + self.assertEqual(lastdir, 'bar') def test_ext_fullpath(self): ext = sysconfig.get_config_vars()['SO'] @@ -395,14 +395,14 @@ def test_ext_fullpath(self): curdir = os.getcwd() wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap not inplace build_py = cmd.get_finalized_command('build_py') @@ -411,13 +411,13 @@ def test_ext_fullpath(self): path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) def test_suite(): src = _get_source_filename() diff --git a/tests/test_check.py b/tests/test_check.py index 372bae367b..7c56c04339 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -26,7 +26,7 @@ def test_check_metadata(self): # by default, check is checking the metadata # should have some warnings cmd = self._run() - self.assertEquals(cmd._warnings, 2) + self.assertEqual(cmd._warnings, 2) # now let's add the required fields # and run it again, to make sure we don't get @@ -35,7 +35,7 @@ def test_check_metadata(self): 'author_email': 'xxx', 'name': 'xxx', 'version': 'xxx'} cmd = self._run(metadata) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) # now with the strict mode, we should # get an error if there are missing metadata @@ -43,7 +43,7 @@ def test_check_metadata(self): # and of course, no error when all metadata are present cmd = self._run(metadata, strict=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_document(self): if not HAS_DOCUTILS: # won't test without docutils @@ -54,12 +54,12 @@ def test_check_document(self): # let's see if it detects broken rest broken_rest = 'title\n===\n\ntest' msgs = cmd._check_rst_data(broken_rest) - self.assertEquals(len(msgs), 1) + self.assertEqual(len(msgs), 1) # and non-broken rest rest = 'title\n=====\n\ntest' msgs = cmd._check_rst_data(rest) - self.assertEquals(len(msgs), 0) + self.assertEqual(len(msgs), 0) def test_check_restructuredtext(self): if not HAS_DOCUTILS: # won't test without docutils @@ -69,7 +69,7 @@ def test_check_restructuredtext(self): pkg_info, dist = self.create_dist(long_description=broken_rest) cmd = check(dist) cmd.check_restructuredtext() - self.assertEquals(cmd._warnings, 1) + self.assertEqual(cmd._warnings, 1) # let's see if we have an error with strict=1 metadata = {'url': 'xxx', 'author': 'xxx', @@ -82,7 +82,7 @@ def test_check_restructuredtext(self): # and non-broken rest metadata['long_description'] = 'title\n=====\n\ntest' cmd = self._run(metadata, strict=1, restructuredtext=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_all(self): diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 55ae421d46..5821fcd286 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -44,7 +44,7 @@ def test_make_file(self): # making sure execute gets called properly def _execute(func, args, exec_msg, level): - self.assertEquals(exec_msg, 'generating out from in') + self.assertEqual(exec_msg, 'generating out from in') cmd.force = True cmd.execute = _execute cmd.make_file(infiles='in', outfile='out', func='func', args=()) @@ -63,7 +63,7 @@ def _announce(msg, level): wanted = ["command options for 'MyCmd':", ' option1 = 1', ' option2 = 1'] - self.assertEquals(msgs, wanted) + self.assertEqual(msgs, wanted) def test_ensure_string(self): cmd = self.cmd @@ -81,7 +81,7 @@ def test_ensure_string_list(self): cmd = self.cmd cmd.option1 = 'ok,dok' cmd.ensure_string_list('option1') - self.assertEquals(cmd.option1, ['ok', 'dok']) + self.assertEqual(cmd.option1, ['ok', 'dok']) cmd.option2 = ['xxx', 'www'] cmd.ensure_string_list('option2') @@ -109,14 +109,14 @@ def test_debug_print(self): with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_config.py b/tests/test_config.py index 6a45a328b6..2c075d7ee7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -88,7 +88,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server1'), ('username', 'me')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) # old format self.write_file(self.rc, PYPIRC_OLD) @@ -97,7 +97,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server-login'), ('username', 'tarek')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) def test_server_empty_registration(self): cmd = self._cmd(self.dist) @@ -108,7 +108,7 @@ def test_server_empty_registration(self): f = open(rc) try: content = f.read() - self.assertEquals(content, WANTED) + self.assertEqual(content, WANTED) finally: f.close() diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index ef2e7bc317..fcb798e73b 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -34,7 +34,7 @@ def test_dump_file(self): f.close() dump_file(this_file, 'I am the header') - self.assertEquals(len(self._logs), numlines+1) + self.assertEqual(len(self._logs), numlines+1) def test_search_cpp(self): if sys.platform == 'win32': @@ -44,10 +44,10 @@ def test_search_cpp(self): # simple pattern searches match = cmd.search_cpp(pattern='xxx', body='// xxx') - self.assertEquals(match, 0) + self.assertEqual(match, 0) match = cmd.search_cpp(pattern='_configtest', body='// xxx') - self.assertEquals(match, 1) + self.assertEqual(match, 1) def test_finalize_options(self): # finalize_options does a bit of transformation @@ -59,9 +59,9 @@ def test_finalize_options(self): cmd.library_dirs = 'three%sfour' % os.pathsep cmd.ensure_finalized() - self.assertEquals(cmd.include_dirs, ['one', 'two']) - self.assertEquals(cmd.libraries, ['one']) - self.assertEquals(cmd.library_dirs, ['three', 'four']) + self.assertEqual(cmd.include_dirs, ['one', 'two']) + self.assertEqual(cmd.libraries, ['one']) + self.assertEqual(cmd.library_dirs, ['three', 'four']) def test_clean(self): # _clean removes files diff --git a/tests/test_core.py b/tests/test_core.py index e937b45a6b..d781555da5 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -89,7 +89,7 @@ def test_debug_mode(self): with captured_stdout() as stdout: distutils.core.setup(name='bar') stdout.seek(0) - self.assertEquals(stdout.read(), 'bar\n') + self.assertEqual(stdout.read(), 'bar\n') distutils.core.DEBUG = True try: @@ -99,7 +99,7 @@ def test_debug_mode(self): distutils.core.DEBUG = False stdout.seek(0) wanted = "options (after parsing config files):\n" - self.assertEquals(stdout.readlines()[0], wanted) + self.assertEqual(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index a57694d48e..79377a7763 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -65,82 +65,82 @@ def test_check_config_h(self): sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' '4.0.1 (Apple Computer, Inc. build 5370)]') - self.assertEquals(check_config_h()[0], CONFIG_H_OK) + self.assertEqual(check_config_h()[0], CONFIG_H_OK) # then it tries to see if it can find "__GNUC__" in pyconfig.h sys.version = 'something without the *CC word' # if the file doesn't exist it returns CONFIG_H_UNCERTAIN - self.assertEquals(check_config_h()[0], CONFIG_H_UNCERTAIN) + self.assertEqual(check_config_h()[0], CONFIG_H_UNCERTAIN) # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK self.write_file(self.python_h, 'xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_NOTOK) + self.assertEqual(check_config_h()[0], CONFIG_H_NOTOK) # and CONFIG_H_OK if __GNUC__ is found self.write_file(self.python_h, 'xxx __GNUC__ xxx') - self.assertEquals(check_config_h()[0], CONFIG_H_OK) + self.assertEqual(check_config_h()[0], CONFIG_H_OK) def test_get_versions(self): # get_versions calls distutils.spawn.find_executable on # 'gcc', 'ld' and 'dllwrap' - self.assertEquals(get_versions(), (None, None, None)) + self.assertEqual(get_versions(), (None, None, None)) # Let's fake we have 'gcc' and it returns '3.4.5' self._exes['gcc'] = b'gcc (GCC) 3.4.5 (mingw special)\nFSF' res = get_versions() - self.assertEquals(str(res[0]), '3.4.5') + self.assertEqual(str(res[0]), '3.4.5') # and let's see what happens when the version # doesn't match the regular expression # (\d+\.\d+(\.\d+)*) self._exes['gcc'] = b'very strange output' res = get_versions() - self.assertEquals(res[0], None) + self.assertEqual(res[0], None) # same thing for ld self._exes['ld'] = b'GNU ld version 2.17.50 20060824' res = get_versions() - self.assertEquals(str(res[1]), '2.17.50') + self.assertEqual(str(res[1]), '2.17.50') self._exes['ld'] = b'@(#)PROGRAM:ld PROJECT:ld64-77' res = get_versions() - self.assertEquals(res[1], None) + self.assertEqual(res[1], None) # and dllwrap self._exes['dllwrap'] = b'GNU dllwrap 2.17.50 20060824\nFSF' res = get_versions() - self.assertEquals(str(res[2]), '2.17.50') + self.assertEqual(str(res[2]), '2.17.50') self._exes['dllwrap'] = b'Cheese Wrap' res = get_versions() - self.assertEquals(res[2], None) + self.assertEqual(res[2], None) def test_get_msvcr(self): # none sys.version = ('2.6.1 (r261:67515, Dec 6 2008, 16:42:21) ' '\n[GCC 4.0.1 (Apple Computer, Inc. build 5370)]') - self.assertEquals(get_msvcr(), None) + self.assertEqual(get_msvcr(), None) # MSVC 7.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1300 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr70']) + self.assertEqual(get_msvcr(), ['msvcr70']) # MSVC 7.1 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1310 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr71']) + self.assertEqual(get_msvcr(), ['msvcr71']) # VS2005 / MSVC 8.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1400 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr80']) + self.assertEqual(get_msvcr(), ['msvcr80']) # VS2008 / MSVC 9.0 sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1500 32 bits (Intel)]') - self.assertEquals(get_msvcr(), ['msvcr90']) + self.assertEqual(get_msvcr(), ['msvcr90']) # unknown sys.version = ('2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index aa9f9ebb9f..84a0ec6cfc 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -37,18 +37,18 @@ def test_mkpath_remove_tree_verbosity(self): mkpath(self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) mkpath(self.target, verbose=1) wanted = ['creating %s' % self.root_target, 'creating %s' % self.target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) self._logs = [] remove_tree(self.root_target, verbose=1) wanted = ["removing '%s' (and everything under it)" % self.root_target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") @@ -66,12 +66,12 @@ def test_mkpath_with_custom_mode(self): def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) wanted = ['creating %s' % self.root_target] create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) @@ -81,7 +81,7 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) copy_tree(self.target, self.target2, verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) @@ -95,18 +95,18 @@ def test_copy_tree_verbosity(self): wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) def test_ensure_relative(self): if os.sep == '/': - self.assertEquals(ensure_relative('/home/foo'), 'home/foo') - self.assertEquals(ensure_relative('some/path'), 'some/path') + self.assertEqual(ensure_relative('/home/foo'), 'home/foo') + self.assertEqual(ensure_relative('some/path'), 'some/path') else: # \\ - self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo') - self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') + self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') + self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') def test_suite(): return unittest.makeSuite(DirUtilTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index f9c5a4fd96..2c19d89266 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -125,7 +125,7 @@ def _warn(msg): finally: warnings.warn = old_warn - self.assertEquals(len(warns), 0) + self.assertEqual(len(warns), 0) def test_finalize_options(self): @@ -136,20 +136,20 @@ def test_finalize_options(self): dist.finalize_options() # finalize_option splits platforms and keywords - self.assertEquals(dist.metadata.platforms, ['one', 'two']) - self.assertEquals(dist.metadata.keywords, ['one', 'two']) + self.assertEqual(dist.metadata.platforms, ['one', 'two']) + self.assertEqual(dist.metadata.keywords, ['one', 'two']) def test_get_command_packages(self): dist = Distribution() - self.assertEquals(dist.command_packages, None) + self.assertEqual(dist.command_packages, None) cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command']) - self.assertEquals(dist.command_packages, - ['distutils.command']) + self.assertEqual(cmds, ['distutils.command']) + self.assertEqual(dist.command_packages, + ['distutils.command']) dist.command_packages = 'one,two' cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + self.assertEqual(cmds, ['distutils.command', 'one', 'two']) def test_announce(self): @@ -288,8 +288,8 @@ def test_custom_pydistutils(self): def test_fix_help_options(self): help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] fancy_options = fix_help_options(help_tuples) - self.assertEquals(fancy_options[0], ('a', 'b', 'c')) - self.assertEquals(fancy_options[1], (1, 2, 3)) + self.assertEqual(fancy_options[0], ('a', 'b', 'c')) + self.assertEqual(fancy_options[1], (1, 2, 3)) def test_show_help(self): # smoke test, just makes sure some help is displayed diff --git a/tests/test_extension.py b/tests/test_extension.py index 1ee30585fa..d9a47a89c8 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -28,38 +28,38 @@ def test_read_setup_file(self): 'rect', 'rwobject', 'scrap', 'surface', 'surflock', 'time', 'transform'] - self.assertEquals(names, wanted) + self.assertEqual(names, wanted) def test_extension_init(self): # the first argument, which is the name, must be a string self.assertRaises(AssertionError, Extension, 1, []) ext = Extension('name', []) - self.assertEquals(ext.name, 'name') + self.assertEqual(ext.name, 'name') # the second argument, which is the list of files, must # be a list of strings self.assertRaises(AssertionError, Extension, 'name', 'file') self.assertRaises(AssertionError, Extension, 'name', ['file', 1]) ext = Extension('name', ['file1', 'file2']) - self.assertEquals(ext.sources, ['file1', 'file2']) + self.assertEqual(ext.sources, ['file1', 'file2']) # others arguments have defaults for attr in ('include_dirs', 'define_macros', 'undef_macros', 'library_dirs', 'libraries', 'runtime_library_dirs', 'extra_objects', 'extra_compile_args', 'extra_link_args', 'export_symbols', 'swig_opts', 'depends'): - self.assertEquals(getattr(ext, attr), []) + self.assertEqual(getattr(ext, attr), []) - self.assertEquals(ext.language, None) - self.assertEquals(ext.optional, None) + self.assertEqual(ext.language, None) + self.assertEqual(ext.optional, None) # if there are unknown keyword options, warn about them with check_warnings() as w: warnings.simplefilter('always') ext = Extension('name', ['file1', 'file2'], chic=True) - self.assertEquals(len(w.warnings), 1) - self.assertEquals(str(w.warnings[0].message), + self.assertEqual(len(w.warnings), 1) + self.assertEqual(str(w.warnings[0].message), "Unknown Extension options: 'chic'") def test_suite(): diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 74618b523a..730ffde4ff 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -38,14 +38,14 @@ def test_move_file_verbosity(self): move_file(self.source, self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) move_file(self.source, self.target, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) @@ -55,7 +55,7 @@ def test_move_file_verbosity(self): os.mkdir(self.target_dir) move_file(self.source, self.target_dir, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target_dir)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) def test_suite(): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 331180d235..d2a2b449ee 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -9,29 +9,29 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_install.py b/tests/test_install.py index bc407cf9ab..f9c142e446 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -123,23 +123,23 @@ def test_handle_extra_path(self): # two elements cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path', 'dirs']) - self.assertEquals(cmd.extra_dirs, 'dirs') - self.assertEquals(cmd.path_file, 'path') + self.assertEqual(cmd.extra_path, ['path', 'dirs']) + self.assertEqual(cmd.extra_dirs, 'dirs') + self.assertEqual(cmd.path_file, 'path') # one element cmd.extra_path = ['path'] cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, ['path']) - self.assertEquals(cmd.extra_dirs, 'path') - self.assertEquals(cmd.path_file, 'path') + self.assertEqual(cmd.extra_path, ['path']) + self.assertEqual(cmd.extra_dirs, 'path') + self.assertEqual(cmd.path_file, 'path') # none dist.extra_path = cmd.extra_path = None cmd.handle_extra_path() - self.assertEquals(cmd.extra_path, None) - self.assertEquals(cmd.extra_dirs, '') - self.assertEquals(cmd.path_file, None) + self.assertEqual(cmd.extra_path, None) + self.assertEqual(cmd.extra_dirs, '') + self.assertEqual(cmd.path_file, None) # three elements (no way !) cmd.extra_path = 'path,dirs,again' @@ -184,7 +184,7 @@ def test_record(self): # line (the egg info file) f = open(cmd.record) try: - self.assertEquals(len(f.readlines()), 1) + self.assertEqual(len(f.readlines()), 1) finally: f.close() diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 377ae86e2f..86db4a12c5 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -27,14 +27,14 @@ def test_simple_run(self): self.write_file(two, 'xxx') cmd.data_files = [one, (inst2, [two])] - self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])]) + self.assertEqual(cmd.get_inputs(), [one, (inst2, [two])]) # let's run the command cmd.ensure_finalized() cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] @@ -47,7 +47,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] @@ -65,7 +65,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 4) + self.assertEqual(len(cmd.get_outputs()), 4) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 5b32b13ee4..aa8a4e6014 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -23,7 +23,7 @@ def test_simple_run(self): pkg_dir, dist = self.create_dist(headers=headers) cmd = install_headers(dist) - self.assertEquals(cmd.get_inputs(), headers) + self.assertEqual(cmd.get_inputs(), headers) # let's run the command cmd.install_dir = os.path.join(pkg_dir, 'inst') @@ -31,7 +31,7 @@ def test_simple_run(self): cmd.run() # let's check the results - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 99a6d90627..4636304692 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -18,8 +18,8 @@ def test_finalize_options(self): cmd = install_lib(dist) cmd.finalize_options() - self.assertEquals(cmd.compile, 1) - self.assertEquals(cmd.optimize, 0) + self.assertEqual(cmd.compile, 1) + self.assertEqual(cmd.optimize, 0) # optimize must be 0, 1, or 2 cmd.optimize = 'foo' @@ -29,7 +29,7 @@ def test_finalize_options(self): cmd.optimize = '2' cmd.finalize_options() - self.assertEquals(cmd.optimize, 2) + self.assertEqual(cmd.optimize, 2) @unittest.skipUnless(not sys.dont_write_bytecode, 'byte-compile not supported') @@ -76,7 +76,7 @@ def test_get_inputs(self): cmd.distribution.script_name = 'setup.py' # get_input should return 2 elements - self.assertEquals(len(cmd.get_inputs()), 2) + self.assertEqual(len(cmd.get_inputs()), 2) def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_log.py b/tests/test_log.py index d35de3456c..9d40dcd72c 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -22,9 +22,9 @@ def test_non_ascii(self): log.debug("debug:\xe9") log.fatal("fatal:\xe9") stdout.seek(0) - self.assertEquals(stdout.read().rstrip(), "debug:\\xe9") + self.assertEqual(stdout.read().rstrip(), "debug:\\xe9") stderr.seek(0) - self.assertEquals(stderr.read().rstrip(), "fatal:\\xe9") + self.assertEqual(stderr.read().rstrip(), "fatal:\\xe9") finally: sys.stdout = old_stdout sys.stderr = old_stderr diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 40cb8be6d1..570fda121e 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -103,7 +103,7 @@ def test_reg_class(self): import winreg HKCU = winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') - self.assertEquals(keys, None) + self.assertEqual(keys, None) keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) @@ -130,7 +130,7 @@ def test_remove_visual_c_ref(self): f.close() # makes sure the manifest was properly cleaned - self.assertEquals(content, _CLEANED_MANIFEST) + self.assertEqual(content, _CLEANED_MANIFEST) def test_suite(): diff --git a/tests/test_register.py b/tests/test_register.py index 3b80b6dc05..c98e28a1a4 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -121,7 +121,7 @@ def test_create_pypirc(self): f = open(self.rc) try: content = f.read() - self.assertEquals(content, WANTED_PYPIRC) + self.assertEqual(content, WANTED_PYPIRC) finally: f.close() @@ -141,8 +141,8 @@ def _no_way(prompt=''): req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) - self.assertEquals(req1['Content-length'], '1374') - self.assertEquals(req2['Content-length'], '1374') + self.assertEqual(req1['Content-length'], '1374') + self.assertEqual(req2['Content-length'], '1374') self.assertTrue((b'xxx') in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -155,7 +155,7 @@ def test_password_not_in_file(self): # dist.password should be set # therefore used afterwards by other commands - self.assertEquals(cmd.distribution.password, 'password') + self.assertEqual(cmd.distribution.password, 'password') def test_registering(self): # this test runs choice 2 @@ -172,7 +172,7 @@ def test_registering(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '608') + self.assertEqual(headers['Content-length'], '608') self.assertTrue((b'tarek') in req.data) def test_password_reset(self): @@ -190,7 +190,7 @@ def test_password_reset(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '290') + self.assertEqual(headers['Content-length'], '290') self.assertTrue((b'tarek') in req.data) def test_strict(self): @@ -253,7 +253,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_suite(): return unittest.makeSuite(RegisterTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index ad527c7dd6..d734ea0ac5 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -110,7 +110,7 @@ def test_prune_file_list(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -119,7 +119,7 @@ def test_prune_file_list(self): zip_file.close() # making sure everything has been pruned correctly - self.assertEquals(len(content), 4) + self.assertEqual(len(content), 4) def test_make_distribution(self): @@ -140,8 +140,7 @@ def test_make_distribution(self): dist_folder = join(self.tmp_dir, 'dist') result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) os.remove(join(dist_folder, 'fake-1.0.tar')) os.remove(join(dist_folder, 'fake-1.0.tar.gz')) @@ -154,8 +153,7 @@ def test_make_distribution(self): result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz']) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) def test_add_defaults(self): @@ -203,7 +201,7 @@ def test_add_defaults(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -212,13 +210,13 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 11) + self.assertEqual(len(content), 11) # checking the MANIFEST f = open(join(self.tmp_dir, 'MANIFEST')) try: manifest = f.read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + self.assertEqual(manifest, MANIFEST % {'sep': os.sep}) finally: f.close() @@ -231,7 +229,7 @@ def test_metadata_check_option(self): cmd.ensure_finalized() cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 2) + self.assertEqual(len(warnings), 2) # trying with a complete set of metadata self.clear_logs() @@ -240,7 +238,7 @@ def test_metadata_check_option(self): cmd.metadata_check = 0 cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 0) + self.assertEqual(len(warnings), 0) def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated @@ -248,7 +246,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_show_formats(self): with captured_stdout() as stdout: @@ -258,7 +256,7 @@ def test_show_formats(self): num_formats = len(ARCHIVE_FORMATS.keys()) output = [line for line in stdout.getvalue().split('\n') if line.strip().startswith('--formats=')] - self.assertEquals(len(output), num_formats) + self.assertEqual(len(output), num_formats) def test_finalize_options(self): @@ -266,9 +264,9 @@ def test_finalize_options(self): cmd.finalize_options() # default options set by finalize - self.assertEquals(cmd.manifest, 'MANIFEST') - self.assertEquals(cmd.template, 'MANIFEST.in') - self.assertEquals(cmd.dist_dir, 'dist') + self.assertEqual(cmd.manifest, 'MANIFEST') + self.assertEqual(cmd.template, 'MANIFEST.in') + self.assertEqual(cmd.dist_dir, 'dist') # formats has to be a string splitable on (' ', ',') or # a stringlist @@ -299,7 +297,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 5) + self.assertEqual(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -319,7 +317,7 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 6) + self.assertEqual(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) def test_manifest_marker(self): diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 950e5789b5..0616c9f2e3 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -20,7 +20,7 @@ def test_nt_quote_args(self): (['nochange', 'nospace'], ['nochange', 'nospace'])): res = _nt_quote_args(args) - self.assertEquals(res, wanted) + self.assertEqual(res, wanted) @unittest.skipUnless(os.name in ('nt', 'posix'), diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 309be7b8b1..41414bb52e 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -71,7 +71,7 @@ def set_executables(self, **kw): comp = compiler() sysconfig.customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + self.assertEqual(comp.exes['archiver'], 'my_ar -arflags') def test_parse_makefile_base(self): self.makefile = TESTFN @@ -82,7 +82,7 @@ def test_parse_makefile_base(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", + self.assertEqual(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'}) def test_parse_makefile_literal_dollar(self): @@ -94,8 +94,8 @@ def test_parse_makefile_literal_dollar(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", - 'OTHER': 'foo'}) + self.assertEqual(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) def test_suite(): diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 3093097dba..f1e32b6cc6 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -48,7 +48,7 @@ def test_class(self): def test_input(count, description, file, expected_result): result = file.readlines() - self.assertEquals(result, expected_result) + self.assertEqual(result, expected_result) tmpdir = self.mkdtemp() filename = os.path.join(tmpdir, "test.txt") diff --git a/tests/test_upload.py b/tests/test_upload.py index 35e970051e..8891820d67 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -90,7 +90,7 @@ def test_finalize_options(self): for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi')): - self.assertEquals(getattr(cmd, attr), waited) + self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): # file with no password @@ -100,14 +100,14 @@ def test_saved_password(self): dist = Distribution() cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, None) + self.assertEqual(cmd.password, None) # make sure we get it as well, if another command # initialized it at the dist level dist.password = 'xxx' cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, 'xxx') + self.assertEqual(cmd.password, 'xxx') def test_upload(self): tmp = self.mkdtemp() @@ -125,12 +125,12 @@ def test_upload(self): # what did we send ? headers = dict(self.conn.headers) - self.assertEquals(headers['Content-length'], '2087') + self.assertEqual(headers['Content-length'], '2087') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertFalse('\n' in headers['Authorization']) - self.assertEquals(self.conn.requests, [('POST', '/pypi')]) - self.assert_((b'xxx') in self.conn.body) + self.assertEqual(self.conn.requests, [('POST', '/pypi')]) + self.assertTrue((b'xxx') in self.conn.body) def test_suite(): return unittest.makeSuite(uploadTestCase) diff --git a/tests/test_util.py b/tests/test_util.py index 0c732f8244..f40caac838 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -66,21 +66,21 @@ def test_get_platform(self): sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Intel)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win32') + self.assertEqual(get_platform(), 'win32') # windows XP, amd64 os.name = 'nt' sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Amd64)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-amd64') + self.assertEqual(get_platform(), 'win-amd64') # windows XP, itanium os.name = 'nt' sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' '[MSC v.1310 32 bit (Itanium)]') sys.platform = 'win32' - self.assertEquals(get_platform(), 'win-ia64') + self.assertEqual(get_platform(), 'win-ia64') # macbook os.name = 'posix' @@ -99,7 +99,7 @@ def test_get_platform(self): cursize = sys.maxsize sys.maxsize = (2 ** 31)-1 try: - self.assertEquals(get_platform(), 'macosx-10.3-i386') + self.assertEqual(get_platform(), 'macosx-10.3-i386') finally: sys.maxsize = cursize @@ -110,33 +110,33 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat') + self.assertEqual(get_platform(), 'macosx-10.4-fat') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-intel') + self.assertEqual(get_platform(), 'macosx-10.4-intel') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat3') + self.assertEqual(get_platform(), 'macosx-10.4-fat3') get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-universal') + self.assertEqual(get_platform(), 'macosx-10.4-universal') get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') - self.assertEquals(get_platform(), 'macosx-10.4-fat64') + self.assertEqual(get_platform(), 'macosx-10.4-fat64') for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' @@ -144,7 +144,7 @@ def test_get_platform(self): '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3'%(arch,)) - self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,)) # linux debian sarge os.name = 'posix' @@ -154,7 +154,7 @@ def test_get_platform(self): self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7', '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686')) - self.assertEquals(get_platform(), 'linux-i686') + self.assertEqual(get_platform(), 'linux-i686') # XXX more platforms to tests here @@ -165,8 +165,8 @@ def _join(path): return '/'.join(path) os.path.join = _join - self.assertEquals(convert_path('/home/to/my/stuff'), - '/home/to/my/stuff') + self.assertEqual(convert_path('/home/to/my/stuff'), + '/home/to/my/stuff') # win os.sep = '\\' @@ -177,10 +177,10 @@ def _join(*path): self.assertRaises(ValueError, convert_path, '/home/to/my/stuff') self.assertRaises(ValueError, convert_path, 'home/to/my/stuff/') - self.assertEquals(convert_path('home/to/my/stuff'), - 'home\\to\\my\\stuff') - self.assertEquals(convert_path('.'), - os.curdir) + self.assertEqual(convert_path('home/to/my/stuff'), + 'home\\to\\my\\stuff') + self.assertEqual(convert_path('.'), + os.curdir) def test_change_root(self): # linux/mac @@ -192,10 +192,10 @@ def _join(*path): return '/'.join(path) os.path.join = _join - self.assertEquals(change_root('/root', '/old/its/here'), - '/root/old/its/here') - self.assertEquals(change_root('/root', 'its/here'), - '/root/its/here') + self.assertEqual(change_root('/root', '/old/its/here'), + '/root/old/its/here') + self.assertEqual(change_root('/root', 'its/here'), + '/root/its/here') # windows os.name = 'nt' @@ -211,10 +211,10 @@ def _join(*path): return '\\'.join(path) os.path.join = _join - self.assertEquals(change_root('c:\\root', 'c:\\old\\its\\here'), - 'c:\\root\\old\\its\\here') - self.assertEquals(change_root('c:\\root', 'its\\here'), - 'c:\\root\\its\\here') + self.assertEqual(change_root('c:\\root', 'c:\\old\\its\\here'), + 'c:\\root\\old\\its\\here') + self.assertEqual(change_root('c:\\root', 'its\\here'), + 'c:\\root\\its\\here') # BugsBunny os (it's a great os) os.name = 'BugsBunny' @@ -232,16 +232,16 @@ def test_check_environ(self): if os.name == 'posix': # this test won't run on windows check_environ() import pwd - self.assertEquals(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) + self.assertEqual(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) else: check_environ() - self.assertEquals(os.environ['PLAT'], get_platform()) - self.assertEquals(util._environ_checked, 1) + self.assertEqual(os.environ['PLAT'], get_platform()) + self.assertEqual(util._environ_checked, 1) def test_split_quoted(self): - self.assertEquals(split_quoted('""one"" "two" \'three\' \\four'), - ['one', 'two', 'three', 'four']) + self.assertEqual(split_quoted('""one"" "two" \'three\' \\four'), + ['one', 'two', 'three', 'four']) def test_strtobool(self): yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') @@ -258,7 +258,7 @@ def test_rfc822_escape(self): res = rfc822_escape(header) wanted = ('I am a%(8s)spoor%(8s)slonesome%(8s)s' 'header%(8s)s') % {'8s': '\n'+8*' '} - self.assertEquals(res, wanted) + self.assertEqual(res, wanted) def test_dont_write_bytecode(self): # makes sure byte_compile raise a DistutilsError diff --git a/tests/test_version.py b/tests/test_version.py index fa21433046..980f83f29a 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -7,12 +7,12 @@ class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') - self.assertEquals(version.version, (1, 2, 3)) - self.assertEquals(version.prerelease, ('a', 1)) - self.assertEquals(str(version), '1.2.3a1') + self.assertEqual(version.version, (1, 2, 3)) + self.assertEqual(version.prerelease, ('a', 1)) + self.assertEqual(str(version), '1.2.3a1') version = StrictVersion('1.2.0') - self.assertEquals(str(version), '1.2') + self.assertEqual(str(version), '1.2') def test_cmp_strict(self): versions = (('1.5.1', '1.5.2b2', -1), @@ -41,9 +41,9 @@ def test_cmp_strict(self): raise AssertionError(("cmp(%s, %s) " "shouldn't raise ValueError") % (v1, v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_cmp(self): @@ -59,9 +59,9 @@ def test_cmp(self): for v1, v2, wanted in versions: res = LooseVersion(v1)._cmp(LooseVersion(v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_suite(): return unittest.makeSuite(VersionTestCase) From d82693d941869773f3654c04da63d586c5ad1a2c Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sun, 21 Nov 2010 13:34:58 +0000 Subject: [PATCH 3115/8469] Merged revisions 86596 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........ --- tests/test_archive_util.py | 18 ++++---- tests/test_bdist.py | 4 +- tests/test_bdist_dumb.py | 8 ++-- tests/test_build.py | 14 +++--- tests/test_build_clib.py | 10 ++-- tests/test_build_ext.py | 86 +++++++++++++++++------------------ tests/test_ccompiler.py | 8 ++-- tests/test_check.py | 14 +++--- tests/test_cmd.py | 10 ++-- tests/test_config.py | 6 +-- tests/test_config_cmd.py | 12 ++--- tests/test_core.py | 4 +- tests/test_dep_util.py | 4 +- tests/test_dir_util.py | 22 ++++----- tests/test_dist.py | 42 ++++++++--------- tests/test_file_util.py | 8 ++-- tests/test_filelist.py | 20 ++++---- tests/test_install_data.py | 8 ++-- tests/test_install_headers.py | 4 +- tests/test_install_lib.py | 8 ++-- tests/test_msvc9compiler.py | 4 +- tests/test_register.py | 12 ++--- tests/test_sdist.py | 40 ++++++++-------- tests/test_spawn.py | 2 +- tests/test_sysconfig.py | 10 ++-- tests/test_text_file.py | 2 +- tests/test_upload.py | 14 +++--- tests/test_version.py | 20 ++++---- 28 files changed, 206 insertions(+), 208 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index a9b46d8e22..bab91577f2 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -129,7 +129,7 @@ def test_tarfile_vs_tar(self): self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs - self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2)) + self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2)) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -169,7 +169,7 @@ def test_compress_deprecated(self): os.chdir(old_dir) tarball = base_name + '.tar.Z' self.assertTrue(os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) # same test with dry_run os.remove(tarball) @@ -183,7 +183,7 @@ def test_compress_deprecated(self): finally: os.chdir(old_dir) self.assertTrue(not os.path.exists(tarball)) - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') @@ -201,9 +201,9 @@ def test_make_zipfile(self): tarball = base_name + '.zip' def test_check_archive_formats(self): - self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']), - 'xxx') - self.assertEquals(check_archive_formats(['gztar', 'zip']), None) + self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), + 'xxx') + self.assertEqual(check_archive_formats(['gztar', 'zip']), None) def test_make_archive(self): tmpdir = self.mkdtemp() @@ -258,8 +258,8 @@ def test_tarfile_root_owner(self): archive = tarfile.open(archive_name) try: for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) + self.assertEqual(member.uid, 0) + self.assertEqual(member.gid, 0) finally: archive.close() @@ -273,7 +273,7 @@ def _breaks(*args, **kw): make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) except: pass - self.assertEquals(os.getcwd(), current_dir) + self.assertEqual(os.getcwd(), current_dir) finally: del ARCHIVE_FORMATS['xxx'] diff --git a/tests/test_bdist.py b/tests/test_bdist.py index a37f4a9b09..fa7cd5adb5 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -25,7 +25,7 @@ def test_formats(self): cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() - self.assertEquals(cmd.formats, ['msi']) + self.assertEqual(cmd.formats, ['msi']) # what format bdist offers ? # XXX an explicit list in bdist is @@ -36,7 +36,7 @@ def test_formats(self): formats.sort() founded = cmd.format_command.keys() founded.sort() - self.assertEquals(founded, formats) + self.assertEqual(founded, formats) def test_suite(): return unittest.makeSuite(BuildTestCase) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index f2220f474d..5a22a10ec8 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -78,7 +78,7 @@ def test_simple_built(self): base = base.replace(':', '-') wanted = ['%s.zip' % base] - self.assertEquals(dist_created, wanted) + self.assertEqual(dist_created, wanted) # now let's check what we have in the zip file # XXX to be done @@ -87,16 +87,16 @@ def test_finalize_options(self): pkg_dir, dist = self.create_dist() os.chdir(pkg_dir) cmd = bdist_dumb(dist) - self.assertEquals(cmd.bdist_dir, None) + self.assertEqual(cmd.bdist_dir, None) cmd.finalize_options() # bdist_dir is initialized to bdist_base/dumb if not set base = cmd.get_finalized_command('bdist').bdist_base - self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb')) + self.assertEqual(cmd.bdist_dir, os.path.join(base, 'dumb')) # the format is set to a default value depending on the os.name default = cmd.default_format[os.name] - self.assertEquals(cmd.format, default) + self.assertEqual(cmd.format, default) def test_suite(): return unittest.makeSuite(BuildDumbTestCase) diff --git a/tests/test_build.py b/tests/test_build.py index 2418e1656d..3db570382e 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -17,11 +17,11 @@ def test_finalize_options(self): cmd.finalize_options() # if not specified, plat_name gets the current platform - self.assertEquals(cmd.plat_name, get_platform()) + self.assertEqual(cmd.plat_name, get_platform()) # build_purelib is build + lib wanted = os.path.join(cmd.build_base, 'lib') - self.assertEquals(cmd.build_purelib, wanted) + self.assertEqual(cmd.build_purelib, wanted) # build_platlib is 'build/lib.platform-x.x[-pydebug]' # examples: @@ -31,21 +31,21 @@ def test_finalize_options(self): self.assertTrue(cmd.build_platlib.endswith('-pydebug')) plat_spec += '-pydebug' wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) - self.assertEquals(cmd.build_platlib, wanted) + self.assertEqual(cmd.build_platlib, wanted) # by default, build_lib = build_purelib - self.assertEquals(cmd.build_lib, cmd.build_purelib) + self.assertEqual(cmd.build_lib, cmd.build_purelib) # build_temp is build/temp. wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) - self.assertEquals(cmd.build_temp, wanted) + self.assertEqual(cmd.build_temp, wanted) # build_scripts is build/scripts-x.x wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) - self.assertEquals(cmd.build_scripts, wanted) + self.assertEqual(cmd.build_scripts, wanted) # executable is os.path.normpath(sys.executable) - self.assertEquals(cmd.executable, os.path.normpath(sys.executable)) + self.assertEqual(cmd.executable, os.path.normpath(sys.executable)) def test_suite(): return unittest.makeSuite(BuildTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 145eff5453..d77912ae08 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -55,14 +55,14 @@ def test_get_source_files(self): self.assertRaises(DistutilsSetupError, cmd.get_source_files) cmd.libraries = [('name', {'sources': ['a', 'b']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')})] - self.assertEquals(cmd.get_source_files(), ['a', 'b']) + self.assertEqual(cmd.get_source_files(), ['a', 'b']) cmd.libraries = [('name', {'sources': ('a', 'b')}), ('name2', {'sources': ['c', 'd']})] - self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + self.assertEqual(cmd.get_source_files(), ['a', 'b', 'c', 'd']) def test_build_libraries(self): @@ -91,11 +91,11 @@ def test_finalize_options(self): cmd.include_dirs = 'one-dir' cmd.finalize_options() - self.assertEquals(cmd.include_dirs, ['one-dir']) + self.assertEqual(cmd.include_dirs, ['one-dir']) cmd.include_dirs = None cmd.finalize_options() - self.assertEquals(cmd.include_dirs, []) + self.assertEqual(cmd.include_dirs, []) cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d14c5f6b10..86568ebb7a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -103,15 +103,15 @@ def test_build_ext(self): import xx for attr in ('error', 'foo', 'new', 'roj'): - self.assert_(hasattr(xx, attr)) + self.assertTrue(hasattr(xx, attr)) - self.assertEquals(xx.foo(2, 5), 7) - self.assertEquals(xx.foo(13,15), 28) - self.assertEquals(xx.new().demo(), None) + self.assertEqual(xx.foo(2, 5), 7) + self.assertEqual(xx.foo(13,15), 28) + self.assertEqual(xx.new().demo(), None) doc = 'This is a template module just for instruction.' - self.assertEquals(xx.__doc__, doc) - self.assert_(isinstance(xx.Null(), xx.Null)) - self.assert_(isinstance(xx.Str(), xx.Str)) + self.assertEqual(xx.__doc__, doc) + self.assertTrue(isinstance(xx.Null(), xx.Null)) + self.assertTrue(isinstance(xx.Str(), xx.Str)) def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) @@ -132,7 +132,7 @@ def test_solaris_enable_shared(self): _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assert_(len(cmd.library_dirs) > 0) + self.assertTrue(len(cmd.library_dirs) > 0) def test_finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, @@ -144,31 +144,31 @@ def test_finalize_options(self): from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assert_(py_include in cmd.include_dirs) + self.assertTrue(py_include in cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assert_(plat_py_include in cmd.include_dirs) + self.assertTrue(plat_py_include in cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string cmd = build_ext(dist) cmd.libraries = 'my_lib' cmd.finalize_options() - self.assertEquals(cmd.libraries, ['my_lib']) + self.assertEqual(cmd.libraries, ['my_lib']) # make sure cmd.library_dirs is turned into a list # if it's a string cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir' cmd.finalize_options() - self.assert_('my_lib_dir' in cmd.library_dirs) + self.assertTrue('my_lib_dir' in cmd.library_dirs) # make sure rpath is turned into a list # if it's a list of os.pathsep's paths cmd = build_ext(dist) cmd.rpath = os.pathsep.join(['one', 'two']) cmd.finalize_options() - self.assertEquals(cmd.rpath, ['one', 'two']) + self.assertEqual(cmd.rpath, ['one', 'two']) # XXX more tests to perform for win32 @@ -177,25 +177,25 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.define = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.define, [('one', '1'), ('two', '1')]) + self.assertEqual(cmd.define, [('one', '1'), ('two', '1')]) # make sure undef is turned into a list of # strings if they are ','-separated strings cmd = build_ext(dist) cmd.undef = 'one,two' cmd.finalize_options() - self.assertEquals(cmd.undef, ['one', 'two']) + self.assertEqual(cmd.undef, ['one', 'two']) # make sure swig_opts is turned into a list cmd = build_ext(dist) cmd.swig_opts = None cmd.finalize_options() - self.assertEquals(cmd.swig_opts, []) + self.assertEqual(cmd.swig_opts, []) cmd = build_ext(dist) cmd.swig_opts = '1 2' cmd.finalize_options() - self.assertEquals(cmd.swig_opts, ['1', '2']) + self.assertEqual(cmd.swig_opts, ['1', '2']) def test_check_extensions_list(self): dist = Distribution() @@ -226,13 +226,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assert_(isinstance(ext, Extension)) + self.assertTrue(isinstance(ext, Extension)) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') - self.assertEquals(ext.libraries, 'foo') - self.assert_(not hasattr(ext, 'some')) + self.assertEqual(ext.libraries, 'foo') + self.assertTrue(not hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', @@ -241,15 +241,15 @@ def test_check_extensions_list(self): exts[0][1]['macros'] = [('1', '2'), ('3',)] cmd.check_extensions_list(exts) - self.assertEquals(exts[0].undef_macros, ['3']) - self.assertEquals(exts[0].define_macros, [('1', '2')]) + self.assertEqual(exts[0].undef_macros, ['3']) + self.assertEqual(exts[0].define_macros, [('1', '2')]) def test_get_source_files(self): modules = [Extension('foo', ['xxx'])] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.ensure_finalized() - self.assertEquals(cmd.get_source_files(), ['xxx']) + self.assertEqual(cmd.get_source_files(), ['xxx']) def test_compiler_option(self): # cmd.compiler is an option and @@ -260,7 +260,7 @@ def test_compiler_option(self): cmd.compiler = 'unix' cmd.ensure_finalized() cmd.run() - self.assertEquals(cmd.compiler, 'unix') + self.assertEqual(cmd.compiler, 'unix') def test_get_outputs(self): tmp_dir = self.mkdtemp() @@ -272,7 +272,7 @@ def test_get_outputs(self): cmd = build_ext(dist) self._fixup_command(cmd) cmd.ensure_finalized() - self.assertEquals(len(cmd.get_outputs()), 1) + self.assertEqual(len(cmd.get_outputs()), 1) if os.name == "nt": cmd.debug = sys.executable.endswith("_d.exe") @@ -291,20 +291,20 @@ def test_get_outputs(self): so_file = cmd.get_outputs()[0] finally: os.chdir(old_wd) - self.assert_(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + self.assertTrue(os.path.exists(so_file)) + self.assertEqual(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, other_tmp_dir) + self.assertEqual(so_dir, other_tmp_dir) cmd.compiler = None cmd.inplace = 0 cmd.run() so_file = cmd.get_outputs()[0] - self.assert_(os.path.exists(so_file)) - self.assertEquals(os.path.splitext(so_file)[-1], - sysconfig.get_config_var('SO')) + self.assertTrue(os.path.exists(so_file)) + self.assertEqual(os.path.splitext(so_file)[-1], + sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) - self.assertEquals(so_dir, cmd.build_lib) + self.assertEqual(so_dir, cmd.build_lib) # inplace = 0, cmd.package = 'bar' build_py = cmd.get_finalized_command('build_py') @@ -312,7 +312,7 @@ def test_get_outputs(self): path = cmd.get_ext_fullpath('foo') # checking that the last directory is the build_dir path = os.path.split(path)[0] - self.assertEquals(path, cmd.build_lib) + self.assertEqual(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -326,7 +326,7 @@ def test_get_outputs(self): # checking that the last directory is bar path = os.path.split(path)[0] lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, 'bar') + self.assertEqual(lastdir, 'bar') def test_ext_fullpath(self): ext = sysconfig.get_config_vars()['SO'] @@ -338,14 +338,14 @@ def test_ext_fullpath(self): curdir = os.getcwd() wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building lxml.etree not inplace cmd.inplace = 0 cmd.build_lib = os.path.join(curdir, 'tmpdir') wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap not inplace build_py = cmd.get_finalized_command('build_py') @@ -354,13 +354,13 @@ def test_ext_fullpath(self): path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) # building twisted.runner.portmap inplace cmd.inplace = 1 path = cmd.get_ext_fullpath('twisted.runner.portmap') wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) def test_build_ext_inplace(self): etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') @@ -375,7 +375,7 @@ def test_build_ext_inplace(self): ext = sysconfig.get_config_var("SO") wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) def test_setuptools_compat(self): import distutils.core, distutils.extension, distutils.command.build_ext @@ -400,7 +400,7 @@ def test_setuptools_compat(self): ext = sysconfig.get_config_var("SO") wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') - self.assertEquals(wanted, path) + self.assertEqual(wanted, path) finally: # restoring Distutils' Extension class otherwise its broken distutils.extension.Extension = saved_ext @@ -415,7 +415,7 @@ def test_build_ext_path_with_os_sep(self): ext_name = os.path.join('UpdateManager', 'fdsend') ext_path = cmd.get_ext_fullpath(ext_name) wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) - self.assertEquals(ext_path, wanted) + self.assertEqual(ext_path, wanted) def test_build_ext_path_cross_platform(self): if sys.platform != 'win32': @@ -428,7 +428,7 @@ def test_build_ext_path_cross_platform(self): ext_name = 'UpdateManager/fdsend' ext_path = cmd.get_ext_fullpath(ext_name) wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) - self.assertEquals(ext_path, wanted) + self.assertEqual(ext_path, wanted) def test_suite(): return unittest.makeSuite(BuildExtTestCase) diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index 317e77fded..e21873e821 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -32,7 +32,7 @@ def test_gen_lib_options(self): opts = gen_lib_options(compiler, libdirs, runlibdirs, libs) wanted = ['-Llib1', '-Llib2', '-cool', '-Rrunlib1', 'found', '-lname2'] - self.assertEquals(opts, wanted) + self.assertEqual(opts, wanted) def test_debug_print(self): @@ -43,14 +43,14 @@ class MyCCompiler(CCompiler): with captured_stdout() as stdout: compiler.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: compiler.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False @@ -72,7 +72,7 @@ def set_executables(self, **kw): comp = compiler() customize_compiler(comp) - self.assertEquals(comp.exes['archiver'], 'my_ar -arflags') + self.assertEqual(comp.exes['archiver'], 'my_ar -arflags') def test_suite(): return unittest.makeSuite(CCompilerTestCase) diff --git a/tests/test_check.py b/tests/test_check.py index 372bae367b..7c56c04339 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -26,7 +26,7 @@ def test_check_metadata(self): # by default, check is checking the metadata # should have some warnings cmd = self._run() - self.assertEquals(cmd._warnings, 2) + self.assertEqual(cmd._warnings, 2) # now let's add the required fields # and run it again, to make sure we don't get @@ -35,7 +35,7 @@ def test_check_metadata(self): 'author_email': 'xxx', 'name': 'xxx', 'version': 'xxx'} cmd = self._run(metadata) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) # now with the strict mode, we should # get an error if there are missing metadata @@ -43,7 +43,7 @@ def test_check_metadata(self): # and of course, no error when all metadata are present cmd = self._run(metadata, strict=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_document(self): if not HAS_DOCUTILS: # won't test without docutils @@ -54,12 +54,12 @@ def test_check_document(self): # let's see if it detects broken rest broken_rest = 'title\n===\n\ntest' msgs = cmd._check_rst_data(broken_rest) - self.assertEquals(len(msgs), 1) + self.assertEqual(len(msgs), 1) # and non-broken rest rest = 'title\n=====\n\ntest' msgs = cmd._check_rst_data(rest) - self.assertEquals(len(msgs), 0) + self.assertEqual(len(msgs), 0) def test_check_restructuredtext(self): if not HAS_DOCUTILS: # won't test without docutils @@ -69,7 +69,7 @@ def test_check_restructuredtext(self): pkg_info, dist = self.create_dist(long_description=broken_rest) cmd = check(dist) cmd.check_restructuredtext() - self.assertEquals(cmd._warnings, 1) + self.assertEqual(cmd._warnings, 1) # let's see if we have an error with strict=1 metadata = {'url': 'xxx', 'author': 'xxx', @@ -82,7 +82,7 @@ def test_check_restructuredtext(self): # and non-broken rest metadata['long_description'] = 'title\n=====\n\ntest' cmd = self._run(metadata, strict=1, restructuredtext=1) - self.assertEquals(cmd._warnings, 0) + self.assertEqual(cmd._warnings, 0) def test_check_all(self): diff --git a/tests/test_cmd.py b/tests/test_cmd.py index cfd6485113..97cdb8ad69 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -44,7 +44,7 @@ def test_make_file(self): # making sure execute gets called properly def _execute(func, args, exec_msg, level): - self.assertEquals(exec_msg, 'generating out from in') + self.assertEqual(exec_msg, 'generating out from in') cmd.force = True cmd.execute = _execute cmd.make_file(infiles='in', outfile='out', func='func', args=()) @@ -63,7 +63,7 @@ def _announce(msg, level): wanted = ["command options for 'MyCmd':", ' option1 = 1', ' option2 = 1'] - self.assertEquals(msgs, wanted) + self.assertEqual(msgs, wanted) def test_ensure_string(self): cmd = self.cmd @@ -81,7 +81,7 @@ def test_ensure_string_list(self): cmd = self.cmd cmd.option1 = 'ok,dok' cmd.ensure_string_list('option1') - self.assertEquals(cmd.option1, ['ok', 'dok']) + self.assertEqual(cmd.option1, ['ok', 'dok']) cmd.option2 = ['xxx', 'www'] cmd.ensure_string_list('option2') @@ -109,14 +109,14 @@ def test_debug_print(self): with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: cmd.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_config.py b/tests/test_config.py index 6c85efad24..8d71234d6e 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -90,7 +90,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server1'), ('username', 'me')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) # old format self.write_file(self.rc, PYPIRC_OLD) @@ -100,7 +100,7 @@ def test_server_registration(self): waited = [('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi'), ('server', 'server-login'), ('username', 'tarek')] - self.assertEquals(config, waited) + self.assertEqual(config, waited) def test_server_empty_registration(self): cmd = self._cmd(self.dist) @@ -111,7 +111,7 @@ def test_server_empty_registration(self): f = open(rc) try: content = f.read() - self.assertEquals(content, WANTED) + self.assertEqual(content, WANTED) finally: f.close() diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index ef2e7bc317..fcb798e73b 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -34,7 +34,7 @@ def test_dump_file(self): f.close() dump_file(this_file, 'I am the header') - self.assertEquals(len(self._logs), numlines+1) + self.assertEqual(len(self._logs), numlines+1) def test_search_cpp(self): if sys.platform == 'win32': @@ -44,10 +44,10 @@ def test_search_cpp(self): # simple pattern searches match = cmd.search_cpp(pattern='xxx', body='// xxx') - self.assertEquals(match, 0) + self.assertEqual(match, 0) match = cmd.search_cpp(pattern='_configtest', body='// xxx') - self.assertEquals(match, 1) + self.assertEqual(match, 1) def test_finalize_options(self): # finalize_options does a bit of transformation @@ -59,9 +59,9 @@ def test_finalize_options(self): cmd.library_dirs = 'three%sfour' % os.pathsep cmd.ensure_finalized() - self.assertEquals(cmd.include_dirs, ['one', 'two']) - self.assertEquals(cmd.libraries, ['one']) - self.assertEquals(cmd.library_dirs, ['three', 'four']) + self.assertEqual(cmd.include_dirs, ['one', 'two']) + self.assertEqual(cmd.libraries, ['one']) + self.assertEqual(cmd.library_dirs, ['three', 'four']) def test_clean(self): # _clean removes files diff --git a/tests/test_core.py b/tests/test_core.py index 63f6b31da6..74d1f3b269 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -89,7 +89,7 @@ def test_debug_mode(self): with captured_stdout() as stdout: distutils.core.setup(name='bar') stdout.seek(0) - self.assertEquals(stdout.read(), 'bar\n') + self.assertEqual(stdout.read(), 'bar\n') distutils.core.DEBUG = True try: @@ -99,7 +99,7 @@ def test_debug_mode(self): distutils.core.DEBUG = False stdout.seek(0) wanted = "options (after parsing config files):\n" - self.assertEquals(stdout.readlines()[0], wanted) + self.assertEqual(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index d81d9143b4..3550819681 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -42,8 +42,8 @@ def test_newer_pairwise(self): self.write_file(two) self.write_file(four) - self.assertEquals(newer_pairwise([one, two], [three, four]), - ([one],[three])) + self.assertEqual(newer_pairwise([one, two], [three, four]), + ([one],[three])) def test_newer_group(self): tmpdir = self.mkdtemp() diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index aa9f9ebb9f..84a0ec6cfc 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -37,18 +37,18 @@ def test_mkpath_remove_tree_verbosity(self): mkpath(self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) mkpath(self.target, verbose=1) wanted = ['creating %s' % self.root_target, 'creating %s' % self.target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) self._logs = [] remove_tree(self.root_target, verbose=1) wanted = ["removing '%s' (and everything under it)" % self.root_target] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) @unittest.skipIf(sys.platform.startswith('win'), "This test is only appropriate for POSIX-like systems.") @@ -66,12 +66,12 @@ def test_mkpath_with_custom_mode(self): def test_create_tree_verbosity(self): create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) wanted = ['creating %s' % self.root_target] create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) @@ -81,7 +81,7 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) copy_tree(self.target, self.target2, verbose=0) - self.assertEquals(self._logs, []) + self.assertEqual(self._logs, []) remove_tree(self.root_target, verbose=0) @@ -95,18 +95,18 @@ def test_copy_tree_verbosity(self): wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) def test_ensure_relative(self): if os.sep == '/': - self.assertEquals(ensure_relative('/home/foo'), 'home/foo') - self.assertEquals(ensure_relative('some/path'), 'some/path') + self.assertEqual(ensure_relative('/home/foo'), 'home/foo') + self.assertEqual(ensure_relative('some/path'), 'some/path') else: # \\ - self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo') - self.assertEquals(ensure_relative('home\\foo'), 'home\\foo') + self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') + self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') def test_suite(): return unittest.makeSuite(DirUtilTestCase) diff --git a/tests/test_dist.py b/tests/test_dist.py index d9b413f954..8ab7e9fc31 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -70,13 +70,13 @@ def test_debug_mode(self): with captured_stdout() as stdout: self.create_distribution(files) stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') distutils.dist.DEBUG = True try: with captured_stdout() as stdout: self.create_distribution(files) stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') finally: distutils.dist.DEBUG = False @@ -175,7 +175,7 @@ def _warn(msg): finally: warnings.warn = old_warn - self.assertEquals(len(warns), 0) + self.assertEqual(len(warns), 0) def test_finalize_options(self): @@ -186,20 +186,20 @@ def test_finalize_options(self): dist.finalize_options() # finalize_option splits platforms and keywords - self.assertEquals(dist.metadata.platforms, ['one', 'two']) - self.assertEquals(dist.metadata.keywords, ['one', 'two']) + self.assertEqual(dist.metadata.platforms, ['one', 'two']) + self.assertEqual(dist.metadata.keywords, ['one', 'two']) def test_get_command_packages(self): dist = Distribution() - self.assertEquals(dist.command_packages, None) + self.assertEqual(dist.command_packages, None) cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command']) - self.assertEquals(dist.command_packages, - ['distutils.command']) + self.assertEqual(cmds, ['distutils.command']) + self.assertEqual(dist.command_packages, + ['distutils.command']) dist.command_packages = 'one,two' cmds = dist.get_command_packages() - self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + self.assertEqual(cmds, ['distutils.command', 'one', 'two']) def test_announce(self): @@ -236,7 +236,7 @@ def _expander(path): os.path.expanduser = old_expander # make sure --no-user-cfg disables the user cfg file - self.assertEquals(len(all_files)-1, len(files)) + self.assertEqual(len(all_files)-1, len(files)) class MetadataTestCase(support.TempdirManager, support.EnvironGuard, @@ -368,8 +368,8 @@ def test_custom_pydistutils(self): def test_fix_help_options(self): help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] fancy_options = fix_help_options(help_tuples) - self.assertEquals(fancy_options[0], ('a', 'b', 'c')) - self.assertEquals(fancy_options[1], (1, 2, 3)) + self.assertEqual(fancy_options[0], ('a', 'b', 'c')) + self.assertEqual(fancy_options[1], (1, 2, 3)) def test_show_help(self): # smoke test, just makes sure some help is displayed @@ -417,14 +417,14 @@ def test_read_metadata(self): PKG_INFO.seek(0) metadata.read_pkg_file(PKG_INFO) - self.assertEquals(metadata.name, "package") - self.assertEquals(metadata.version, "1.0") - self.assertEquals(metadata.description, "xxx") - self.assertEquals(metadata.download_url, 'http://example.com') - self.assertEquals(metadata.keywords, ['one', 'two']) - self.assertEquals(metadata.platforms, ['UNKNOWN']) - self.assertEquals(metadata.obsoletes, None) - self.assertEquals(metadata.requires, ['foo']) + self.assertEqual(metadata.name, "package") + self.assertEqual(metadata.version, "1.0") + self.assertEqual(metadata.description, "xxx") + self.assertEqual(metadata.download_url, 'http://example.com') + self.assertEqual(metadata.keywords, ['one', 'two']) + self.assertEqual(metadata.platforms, ['UNKNOWN']) + self.assertEqual(metadata.obsoletes, None) + self.assertEqual(metadata.requires, ['foo']) def test_suite(): suite = unittest.TestSuite() diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 823f211089..dbc6283981 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -38,14 +38,14 @@ def test_move_file_verbosity(self): move_file(self.source, self.target, verbose=0) wanted = [] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) move_file(self.source, self.target, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) # back to original state move_file(self.target, self.source, verbose=0) @@ -55,7 +55,7 @@ def test_move_file_verbosity(self): os.mkdir(self.target_dir) move_file(self.source, self.target_dir, verbose=1) wanted = ['moving %s -> %s' % (self.source, self.target_dir)] - self.assertEquals(self._logs, wanted) + self.assertEqual(self._logs, wanted) def test_write_file(self): lines = ['a', 'b', 'c'] @@ -63,7 +63,7 @@ def test_write_file(self): foo = os.path.join(dir, 'foo') write_file(foo, lines) content = [line.strip() for line in open(foo).readlines()] - self.assertEquals(content, lines) + self.assertEqual(content, lines) def test_copy_file(self): src_dir = self.mkdtemp() diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 0cbb48bcc6..32c56c75bc 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -24,15 +24,15 @@ class FileListTestCase(unittest.TestCase): def test_glob_to_re(self): # simple cases - self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') - self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') - self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') + self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)') + self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)') # special cases - self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') - self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') - self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)') + self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)') + self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)') def test_process_template_line(self): # testing all MANIFEST.in template patterns @@ -60,21 +60,21 @@ def test_process_template_line(self): join('global', 'two.txt'), join('f', 'o', 'f.oo'), join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')] - self.assertEquals(file_list.files, wanted) + self.assertEqual(file_list.files, wanted) def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), '') + self.assertEqual(stdout.read(), '') debug.DEBUG = True try: with captured_stdout() as stdout: file_list.debug_print('xxx') stdout.seek(0) - self.assertEquals(stdout.read(), 'xxx\n') + self.assertEqual(stdout.read(), 'xxx\n') finally: debug.DEBUG = False diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 377ae86e2f..86db4a12c5 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -27,14 +27,14 @@ def test_simple_run(self): self.write_file(two, 'xxx') cmd.data_files = [one, (inst2, [two])] - self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])]) + self.assertEqual(cmd.get_inputs(), [one, (inst2, [two])]) # let's run the command cmd.ensure_finalized() cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) rtwo = os.path.split(two)[-1] self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) rone = os.path.split(one)[-1] @@ -47,7 +47,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) cmd.outfiles = [] @@ -65,7 +65,7 @@ def test_simple_run(self): cmd.run() # let's check the result - self.assertEquals(len(cmd.get_outputs()), 4) + self.assertEqual(len(cmd.get_outputs()), 4) self.assertTrue(os.path.exists(os.path.join(inst2, rtwo))) self.assertTrue(os.path.exists(os.path.join(inst, rone))) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index 5b32b13ee4..aa8a4e6014 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -23,7 +23,7 @@ def test_simple_run(self): pkg_dir, dist = self.create_dist(headers=headers) cmd = install_headers(dist) - self.assertEquals(cmd.get_inputs(), headers) + self.assertEqual(cmd.get_inputs(), headers) # let's run the command cmd.install_dir = os.path.join(pkg_dir, 'inst') @@ -31,7 +31,7 @@ def test_simple_run(self): cmd.run() # let's check the results - self.assertEquals(len(cmd.get_outputs()), 2) + self.assertEqual(len(cmd.get_outputs()), 2) def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 13d27abac0..754ea636a5 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -18,8 +18,8 @@ def test_finalize_options(self): cmd = install_lib(dist) cmd.finalize_options() - self.assertEquals(cmd.compile, 1) - self.assertEquals(cmd.optimize, 0) + self.assertEqual(cmd.compile, 1) + self.assertEqual(cmd.optimize, 0) # optimize must be 0, 1, or 2 cmd.optimize = 'foo' @@ -29,7 +29,7 @@ def test_finalize_options(self): cmd.optimize = '2' cmd.finalize_options() - self.assertEquals(cmd.optimize, 2) + self.assertEqual(cmd.optimize, 2) def _setup_byte_compile(self): pkg_dir, dist = self.create_dist() @@ -81,7 +81,7 @@ def test_get_inputs(self): cmd.distribution.script_name = 'setup.py' # get_input should return 2 elements - self.assertEquals(len(cmd.get_inputs()), 2) + self.assertEqual(len(cmd.get_inputs()), 2) def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 567505ddf1..b8e2209482 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -103,7 +103,7 @@ def test_reg_class(self): import _winreg HKCU = _winreg.HKEY_CURRENT_USER keys = Reg.read_keys(HKCU, 'xxxx') - self.assertEquals(keys, None) + self.assertEqual(keys, None) keys = Reg.read_keys(HKCU, r'Control Panel') self.assertTrue('Desktop' in keys) @@ -130,7 +130,7 @@ def test_remove_visual_c_ref(self): f.close() # makes sure the manifest was properly cleaned - self.assertEquals(content, _CLEANED_MANIFEST) + self.assertEqual(content, _CLEANED_MANIFEST) def test_suite(): diff --git a/tests/test_register.py b/tests/test_register.py index 6da479b139..915427b7d9 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -122,7 +122,7 @@ def test_create_pypirc(self): f = open(self.rc) try: content = f.read() - self.assertEquals(content, WANTED_PYPIRC) + self.assertEqual(content, WANTED_PYPIRC) finally: f.close() @@ -141,7 +141,7 @@ def _no_way(prompt=''): self.assertTrue(self.conn.reqs, 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) - self.assertEquals(req2['Content-length'], req1['Content-length']) + self.assertEqual(req2['Content-length'], req1['Content-length']) self.assertTrue('xxx' in self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -154,7 +154,7 @@ def test_password_not_in_file(self): # dist.password should be set # therefore used afterwards by other commands - self.assertEquals(cmd.distribution.password, 'password') + self.assertEqual(cmd.distribution.password, 'password') def test_registering(self): # this test runs choice 2 @@ -171,7 +171,7 @@ def test_registering(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '608') + self.assertEqual(headers['Content-length'], '608') self.assertTrue('tarek' in req.data) def test_password_reset(self): @@ -189,7 +189,7 @@ def test_password_reset(self): self.assertTrue(self.conn.reqs, 1) req = self.conn.reqs[0] headers = dict(req.headers) - self.assertEquals(headers['Content-length'], '290') + self.assertEqual(headers['Content-length'], '290') self.assertTrue('tarek' in req.data) def test_strict(self): @@ -252,7 +252,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_suite(): return unittest.makeSuite(RegisterTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 7cebbf53ad..b9d86bb02e 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -127,7 +127,7 @@ def test_prune_file_list(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -136,7 +136,7 @@ def test_prune_file_list(self): zip_file.close() # making sure everything has been pruned correctly - self.assertEquals(len(content), 4) + self.assertEqual(len(content), 4) @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): @@ -158,8 +158,7 @@ def test_make_distribution(self): dist_folder = join(self.tmp_dir, 'dist') result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz'] ) os.remove(join(dist_folder, 'fake-1.0.tar')) os.remove(join(dist_folder, 'fake-1.0.tar.gz')) @@ -172,8 +171,7 @@ def test_make_distribution(self): result = os.listdir(dist_folder) result.sort() - self.assertEquals(result, - ['fake-1.0.tar', 'fake-1.0.tar.gz']) + self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): @@ -222,7 +220,7 @@ def test_add_defaults(self): # now let's check what we have dist_folder = join(self.tmp_dir, 'dist') files = os.listdir(dist_folder) - self.assertEquals(files, ['fake-1.0.zip']) + self.assertEqual(files, ['fake-1.0.zip']) zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) try: @@ -231,13 +229,13 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 11) + self.assertEqual(len(content), 11) # checking the MANIFEST f = open(join(self.tmp_dir, 'MANIFEST')) try: manifest = f.read() - self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + self.assertEqual(manifest, MANIFEST % {'sep': os.sep}) finally: f.close() @@ -251,7 +249,7 @@ def test_metadata_check_option(self): cmd.ensure_finalized() cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 2) + self.assertEqual(len(warnings), 2) # trying with a complete set of metadata self.clear_logs() @@ -260,7 +258,7 @@ def test_metadata_check_option(self): cmd.metadata_check = 0 cmd.run() warnings = self.get_logs(WARN) - self.assertEquals(len(warnings), 0) + self.assertEqual(len(warnings), 0) def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated @@ -268,7 +266,7 @@ def test_check_metadata_deprecated(self): with check_warnings() as w: warnings.simplefilter("always") cmd.check_metadata() - self.assertEquals(len(w.warnings), 1) + self.assertEqual(len(w.warnings), 1) def test_show_formats(self): with captured_stdout() as stdout: @@ -278,7 +276,7 @@ def test_show_formats(self): num_formats = len(ARCHIVE_FORMATS.keys()) output = [line for line in stdout.getvalue().split('\n') if line.strip().startswith('--formats=')] - self.assertEquals(len(output), num_formats) + self.assertEqual(len(output), num_formats) def test_finalize_options(self): @@ -286,9 +284,9 @@ def test_finalize_options(self): cmd.finalize_options() # default options set by finalize - self.assertEquals(cmd.manifest, 'MANIFEST') - self.assertEquals(cmd.template, 'MANIFEST.in') - self.assertEquals(cmd.dist_dir, 'dist') + self.assertEqual(cmd.manifest, 'MANIFEST') + self.assertEqual(cmd.template, 'MANIFEST.in') + self.assertEqual(cmd.dist_dir, 'dist') # formats has to be a string splitable on (' ', ',') or # a stringlist @@ -325,8 +323,8 @@ def test_make_distribution_owner_group(self): archive = tarfile.open(archive_name) try: for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) + self.assertEqual(member.uid, 0) + self.assertEqual(member.gid, 0) finally: archive.close() @@ -347,7 +345,7 @@ def test_make_distribution_owner_group(self): # rights (see #7408) try: for member in archive.getmembers(): - self.assertEquals(member.uid, os.getuid()) + self.assertEqual(member.uid, os.getuid()) finally: archive.close() @@ -369,7 +367,7 @@ def test_get_file_list(self): finally: f.close() - self.assertEquals(len(manifest), 5) + self.assertEqual(len(manifest), 5) # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') @@ -389,7 +387,7 @@ def test_get_file_list(self): f.close() # do we have the new file in MANIFEST ? - self.assertEquals(len(manifest2), 6) + self.assertEqual(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) def test_manifest_marker(self): diff --git a/tests/test_spawn.py b/tests/test_spawn.py index b9fd610e2f..6caf039031 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -20,7 +20,7 @@ def test_nt_quote_args(self): (['nochange', 'nospace'], ['nochange', 'nospace'])): res = _nt_quote_args(args) - self.assertEquals(res, wanted) + self.assertEqual(res, wanted) @unittest.skipUnless(os.name in ('nt', 'posix'), diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 8449ddca78..49570c4ce5 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -36,7 +36,7 @@ def test_get_python_lib(self): sysconfig.get_python_lib(prefix=TESTFN)) _sysconfig = __import__('sysconfig') res = sysconfig.get_python_lib(True, True) - self.assertEquals(_sysconfig.get_path('platstdlib'), res) + self.assertEqual(_sysconfig.get_path('platstdlib'), res) def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() @@ -56,8 +56,8 @@ def test_parse_makefile_base(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", - 'OTHER': 'foo'}) + self.assertEqual(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", + 'OTHER': 'foo'}) def test_parse_makefile_literal_dollar(self): self.makefile = test.test_support.TESTFN @@ -68,8 +68,8 @@ def test_parse_makefile_literal_dollar(self): finally: fd.close() d = sysconfig.parse_makefile(self.makefile) - self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", - 'OTHER': 'foo'}) + self.assertEqual(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", + 'OTHER': 'foo'}) def test_suite(): diff --git a/tests/test_text_file.py b/tests/test_text_file.py index 3093097dba..f1e32b6cc6 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -48,7 +48,7 @@ def test_class(self): def test_input(count, description, file, expected_result): result = file.readlines() - self.assertEquals(result, expected_result) + self.assertEqual(result, expected_result) tmpdir = self.mkdtemp() filename = os.path.join(tmpdir, "test.txt") diff --git a/tests/test_upload.py b/tests/test_upload.py index 3ae89498a1..f45ee41e8c 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -80,7 +80,7 @@ def test_finalize_options(self): for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), ('repository', 'http://pypi.python.org/pypi')): - self.assertEquals(getattr(cmd, attr), waited) + self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): # file with no password @@ -90,14 +90,14 @@ def test_saved_password(self): dist = Distribution() cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, None) + self.assertEqual(cmd.password, None) # make sure we get it as well, if another command # initialized it at the dist level dist.password = 'xxx' cmd = upload(dist) cmd.finalize_options() - self.assertEquals(cmd.password, 'xxx') + self.assertEqual(cmd.password, 'xxx') def test_upload(self): tmp = self.mkdtemp() @@ -116,11 +116,11 @@ def test_upload(self): # what did we send ? self.assertIn('dédé', self.last_open.req.data) headers = dict(self.last_open.req.headers) - self.assertEquals(headers['Content-length'], '2085') + self.assertEqual(headers['Content-length'], '2085') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) - self.assertEquals(self.last_open.req.get_method(), 'POST') - self.assertEquals(self.last_open.req.get_full_url(), - 'http://pypi.python.org/pypi') + self.assertEqual(self.last_open.req.get_method(), 'POST') + self.assertEqual(self.last_open.req.get_full_url(), + 'http://pypi.python.org/pypi') self.assertTrue('xxx' in self.last_open.req.data) auth = self.last_open.req.headers['Authorization'] self.assertFalse('\n' in auth) diff --git a/tests/test_version.py b/tests/test_version.py index 747db94804..1d9fbc7985 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -7,12 +7,12 @@ class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') - self.assertEquals(version.version, (1, 2, 3)) - self.assertEquals(version.prerelease, ('a', 1)) - self.assertEquals(str(version), '1.2.3a1') + self.assertEqual(version.version, (1, 2, 3)) + self.assertEqual(version.prerelease, ('a', 1)) + self.assertEqual(str(version), '1.2.3a1') version = StrictVersion('1.2.0') - self.assertEquals(str(version), '1.2') + self.assertEqual(str(version), '1.2') def test_cmp_strict(self): versions = (('1.5.1', '1.5.2b2', -1), @@ -41,9 +41,9 @@ def test_cmp_strict(self): raise AssertionError(("cmp(%s, %s) " "shouldn't raise ValueError") % (v1, v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_cmp(self): @@ -59,9 +59,9 @@ def test_cmp(self): for v1, v2, wanted in versions: res = LooseVersion(v1).__cmp__(LooseVersion(v2)) - self.assertEquals(res, wanted, - 'cmp(%s, %s) should be %s, got %s' % - (v1, v2, wanted, res)) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) def test_suite(): return unittest.makeSuite(VersionTestCase) From bc76c36d325cd64296b2d7a7420479c87e51be22 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 24 Nov 2010 19:43:47 +0000 Subject: [PATCH 3116/8469] Final patch for issue 9807. --- command/install.py | 6 ++++-- sysconfig.py | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/command/install.py b/command/install.py index 58f6ec5b16..7f9d00f2dd 100644 --- a/command/install.py +++ b/command/install.py @@ -48,7 +48,7 @@ 'unix_prefix': { 'purelib': '$base/lib/python$py_version_short/site-packages', 'platlib': '$platbase/lib/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short/$dist_name', + 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, @@ -82,7 +82,8 @@ INSTALL_SCHEMES['unix_user'] = { 'purelib': '$usersite', 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', + 'headers': + '$userbase/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', } @@ -322,6 +323,7 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + 'abiflags': sys.abiflags, } if HAS_USER_SITE: diff --git a/sysconfig.py b/sysconfig.py index be91f92c36..897b7d63d6 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -11,7 +11,6 @@ __revision__ = "$Id$" -import io import os import re import sys @@ -49,6 +48,18 @@ def _python_build(): return False python_build = _python_build() +# Calculate the build qualifier flags if they are defined. Adding the flags +# to the include and lib directories only makes sense for an installation, not +# an in-source build. +build_flags = '' +try: + if not python_build: + build_flags = sys.abiflags +except AttributeError: + # It's not a configure-based build, so the sys module doesn't have + # this attribute, which is fine. + pass + def get_python_version(): """Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' @@ -83,7 +94,8 @@ def get_python_inc(plat_specific=0, prefix=None): else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) - return os.path.join(prefix, "include", "python" + get_python_version()) + python_dir = 'python' + get_python_version() + build_flags + return os.path.join(prefix, "include", python_dir) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "os2": @@ -209,7 +221,8 @@ def get_makefile_filename(): if python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - return os.path.join(lib_dir, "config", "Makefile") + config_file = 'config-{}{}'.format(get_python_version(), build_flags) + return os.path.join(lib_dir, config_file, 'Makefile') def parse_config_h(fp, g=None): From 47c1750f35348e99498ca6e8fcec38b67efe95d9 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 25 Nov 2010 03:46:44 +0000 Subject: [PATCH 3117/8469] sys.abiflags is not defined on all platforms. --- command/install.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 7f9d00f2dd..bdc3a09b22 100644 --- a/command/install.py +++ b/command/install.py @@ -313,6 +313,11 @@ def finalize_options(self): py_version = sys.version.split()[0] (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') + try: + abiflags = sys.abiflags + except AttributeError: + # sys.abiflags may not be defined on all platforms. + abiflags = '' self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), @@ -323,7 +328,7 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, - 'abiflags': sys.abiflags, + 'abiflags': abiflags, } if HAS_USER_SITE: From 22eaecf1e9401c320a4da6e387798e094de0679b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Nov 2010 14:40:29 +0000 Subject: [PATCH 3118/8469] 2.7.1 final version bump --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f9f9792794..a82d4cb589 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.1rc1" +__version__ = "2.7.1" #--end constants-- From 8e91a860e081fec22be2322c09613ebac1a1968c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 27 Nov 2010 14:46:13 +0000 Subject: [PATCH 3119/8469] 3.1.3 final version bump --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9684a11c45..6f55f016a2 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.3rc1" +__version__ = "3.1.3" #--end constants-- From a708da6b241d23acd2ae934de3a42d36a2bcaefb Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Fri, 3 Dec 2010 17:00:40 +0000 Subject: [PATCH 3120/8469] Fix for issue10367, courtesy of Daniel Tavares. --- command/upload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/upload.py b/command/upload.py index 980cf68d06..d0133353a6 100644 --- a/command/upload.py +++ b/command/upload.py @@ -176,6 +176,9 @@ def upload_file(self, command, pyversion, filename): result = urlopen(request) status = result.getcode() reason = result.msg + if self.show_response: + msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) + self.announce(msg, log.INFO) except socket.error, e: self.announce(str(e), log.ERROR) return @@ -189,6 +192,3 @@ def upload_file(self, command, pyversion, filename): else: self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) - if self.show_response: - msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) - self.announce(msg, log.INFO) From 13652894fa830ff6d9eff472a956034f09f0922e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 4 Dec 2010 19:09:24 +0000 Subject: [PATCH 3121/8469] Bump to 3.2b1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index bae33b5530..8b85f35f9d 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2a4" +__version__ = "3.2b1" #--end constants-- From 549a7e010309ec57035d877a7b2ca9da993d1772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 20:26:30 +0000 Subject: [PATCH 3122/8469] Fix wrong name in docstring and doc (#10693). Original patch by Eli Bendersky. --- archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_util.py b/archive_util.py index 16164c7f1f..6dd0445dbe 100644 --- a/archive_util.py +++ b/archive_util.py @@ -68,7 +68,7 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. - The output zip file will be named 'base_dir' + ".zip". Uses either the + The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip From ffc0137f6db0847ca5701ca4735511f3a816ef24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 20:30:51 +0000 Subject: [PATCH 3123/8469] Merged revisions 87277 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r87277 | eric.araujo | 2010-12-15 21:26:30 +0100 (mer., 15 déc. 2010) | 2 lines Fix wrong name in docstring and doc (#10693). Original patch by Eli Bendersky. ........ --- archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_util.py b/archive_util.py index 16164c7f1f..6dd0445dbe 100644 --- a/archive_util.py +++ b/archive_util.py @@ -68,7 +68,7 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. - The output zip file will be named 'base_dir' + ".zip". Uses either the + The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip From 2b3c0661ab064462c5b404b65befe70842f2ca88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 20:33:50 +0000 Subject: [PATCH 3124/8469] Merged revisions 87277 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r87277 | eric.araujo | 2010-12-15 21:26:30 +0100 (mer., 15 déc. 2010) | 2 lines Fix wrong name in docstring and doc (#10693). Original patch by Eli Benderski. ........ --- archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive_util.py b/archive_util.py index c741cc0174..834b722ed3 100644 --- a/archive_util.py +++ b/archive_util.py @@ -121,7 +121,7 @@ def _set_uid_gid(tarinfo): def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. - The output zip file will be named 'base_dir' + ".zip". Uses either the + The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip From 034ae816b59d337b63d8fc521bb786a4cefe7541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 21:07:22 +0000 Subject: [PATCH 3125/8469] Fix build_ext with VS 8.0. Patch by Hirokazu Yamamoto (#9558). --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index cc0d414cf9..fb31648951 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -214,7 +214,7 @@ def finalize_options(self): elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VS8.0', 'win32release')) + 'PC', 'VS8.0')) elif MSVC_VERSION == 7: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1')) From 2b9d979b2156e50f3649eb0e72c0dfb54d40abec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 21:12:12 +0000 Subject: [PATCH 3126/8469] Merged revisions 87280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r87280 | eric.araujo | 2010-12-15 22:07:22 +0100 (mer., 15 déc. 2010) | 2 lines Fix build_ext with VS 8.0. Patch by Hirokazu Yamamoto (#9558). ........ --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 4e664642b8..502b39a82f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -214,7 +214,7 @@ def finalize_options(self): elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VS8.0', 'win32release')) + 'PC', 'VS8.0')) elif MSVC_VERSION == 7: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1')) From 673ea4dd320b5e8abc19b0d6766f3c285e3c9eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Dec 2010 21:15:25 +0000 Subject: [PATCH 3127/8469] Merged revisions 87280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r87280 | eric.araujo | 2010-12-15 22:07:22 +0100 (mer., 15 déc. 2010) | 2 lines Fix build_ext with VS 8.0. Patch by Hirokazu Yamamoto (#9558). ........ --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 5b3be6fbd6..55a4288ac0 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -207,7 +207,7 @@ def finalize_options(self): elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VS8.0', 'win32release')) + 'PC', 'VS8.0')) elif MSVC_VERSION == 7: self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VS7.1')) From 6451e39efcacf15bdbe420fd9a21e46dac0a0b2e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 19 Dec 2010 10:30:28 +0000 Subject: [PATCH 3128/8469] Bump to 3.2b2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8b85f35f9d..1d752e5e03 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2b1" +__version__ = "3.2b2" #--end constants-- From c0b2f9e8190d95578e94c2a550144a91aa9c5e18 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 15 Jan 2011 17:08:53 +0000 Subject: [PATCH 3129/8469] Bump to 3.2rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 1d752e5e03..40ca9b2a3a 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2b2" +__version__ = "3.2rc1" #--end constants-- From 663bdd57f912467e076d8e7f0be95a4755c99e4f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 30 Jan 2011 14:03:33 +0000 Subject: [PATCH 3130/8469] Bump version. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 40ca9b2a3a..4bb5012318 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2rc1" +__version__ = "3.2rc2" #--end constants-- From 23a12ce1d87ed000f879d4a702e0f5c1b6ad8a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 2 Feb 2011 21:38:37 +0000 Subject: [PATCH 3131/8469] Merged revisions 86236,86240,86332,86340,87271,87273,87447 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The missing NEWS entries correspond to changes that were made before 3.1.3, but I think it’s not usual to edit entries of released versions, so I put them at the top. ........ r86236 | eric.araujo | 2010-11-06 03:44:43 +0100 (sam., 06 nov. 2010) | 2 lines Make sure each test can be run standalone (./python Lib/distutils/tests/x.py) ........ r86240 | eric.araujo | 2010-11-06 05:11:59 +0100 (sam., 06 nov. 2010) | 2 lines Prevent ResourceWarnings in test_gettext ........ r86332 | eric.araujo | 2010-11-08 19:15:17 +0100 (lun., 08 nov. 2010) | 4 lines Add missing NEWS entry for a fix committed by Senthil. All recent modifications to distutils should now be covered in NEWS. ........ r86340 | eric.araujo | 2010-11-08 22:48:23 +0100 (lun., 08 nov. 2010) | 2 lines This was actually fixed for the previous alpha. ........ r87271 | eric.araujo | 2010-12-15 20:09:58 +0100 (mer., 15 déc. 2010) | 2 lines Improve trace documentation (#9264). Patch by Eli Bendersky. ........ r87273 | eric.araujo | 2010-12-15 20:30:15 +0100 (mer., 15 déc. 2010) | 2 lines Use nested method directives, rewrap long lines, fix whitespace. ........ r87447 | eric.araujo | 2010-12-23 20:13:05 +0100 (jeu., 23 déc. 2010) | 2 lines Fix typo in superclass method name ........ --- tests/__init__.py | 5 +++-- tests/test_archive_util.py | 4 ++-- tests/test_bdist.py | 3 ++- tests/test_bdist_dumb.py | 3 ++- tests/test_bdist_rpm.py | 3 ++- tests/test_bdist_wininst.py | 3 ++- tests/test_build_clib.py | 4 +++- tests/test_build_ext.py | 1 + tests/test_build_py.py | 3 ++- tests/test_build_scripts.py | 3 ++- tests/test_check.py | 3 ++- tests/test_clean.py | 3 ++- tests/test_cmd.py | 6 +++--- tests/test_config.py | 3 ++- tests/test_config_cmd.py | 3 ++- tests/test_core.py | 4 ++-- tests/test_cygwinccompiler.py | 3 ++- tests/test_dir_util.py | 3 ++- tests/test_dist.py | 4 ++-- tests/test_extension.py | 4 ++-- tests/test_file_util.py | 3 ++- tests/test_filelist.py | 4 ++-- tests/test_install.py | 4 ++-- tests/test_install_data.py | 3 ++- tests/test_install_headers.py | 3 ++- tests/test_install_lib.py | 3 ++- tests/test_install_scripts.py | 3 ++- tests/test_log.py | 3 ++- tests/test_msvc9compiler.py | 3 ++- tests/test_register.py | 4 ++-- tests/test_sdist.py | 8 +++----- tests/test_spawn.py | 4 ++-- tests/test_text_file.py | 3 ++- tests/test_unixccompiler.py | 3 ++- tests/test_upload.py | 5 ++--- tests/test_util.py | 3 ++- tests/test_version.py | 3 ++- tests/test_versionpredicate.py | 4 ++++ 38 files changed, 81 insertions(+), 53 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 7bdb912463..1b939cbd5d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,9 +15,10 @@ import os import sys import unittest +from test.support import run_unittest -here = os.path.dirname(__file__) +here = os.path.dirname(__file__) or os.curdir def test_suite(): @@ -32,4 +33,4 @@ def test_suite(): if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index d77302d547..aff426521d 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -12,7 +12,7 @@ ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import check_warnings +from test.support import check_warnings, run_unittest try: import zipfile @@ -211,4 +211,4 @@ def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index 715283cb97..94d40cc25b 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -4,6 +4,7 @@ import os import tempfile import shutil +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist import bdist @@ -40,4 +41,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index bf146eb573..cc37fef8b0 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -3,6 +3,7 @@ import unittest import sys import os +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb @@ -77,4 +78,4 @@ def test_suite(): return unittest.makeSuite(BuildDumbTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 2aa257f7e6..804fb1355f 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -5,6 +5,7 @@ import os import tempfile import shutil +from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm @@ -122,4 +123,4 @@ def test_suite(): return unittest.makeSuite(BuildRpmTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 9b1ba6d107..f9e8f89e21 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,5 +1,6 @@ """Tests for distutils.command.bdist_wininst.""" import unittest +from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -27,4 +28,4 @@ def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index d6d1a4d0c1..69bd2bf624 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -3,6 +3,8 @@ import os import sys +from test.support import run_unittest + from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support @@ -141,4 +143,4 @@ def test_suite(): return unittest.makeSuite(BuildCLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e8b15f156d..11844d66d3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -15,6 +15,7 @@ import unittest from test import support +from test.support import run_unittest # http://bugs.python.org/issue4373 # Don't load the xx module more than once. diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 8a69aaa0d6..da3232cea8 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -10,6 +10,7 @@ from distutils.errors import DistutilsFileError from distutils.tests import support +from test.support import run_unittest class BuildPyTestCase(support.TempdirManager, @@ -114,4 +115,4 @@ def test_suite(): return unittest.makeSuite(BuildPyTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index 85b0400460..e3326b8517 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -8,6 +8,7 @@ from distutils import sysconfig from distutils.tests import support +from test.support import run_unittest class BuildScriptsTestCase(support.TempdirManager, @@ -108,4 +109,4 @@ def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_check.py b/tests/test_check.py index 7c56c04339..229ae25c6d 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,5 +1,6 @@ """Tests for distutils.command.check.""" import unittest +from test.support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support @@ -95,4 +96,4 @@ def test_suite(): return unittest.makeSuite(CheckTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_clean.py b/tests/test_clean.py index dbc4ee2a18..649855f7ab 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -6,6 +6,7 @@ from distutils.command.clean import clean from distutils.tests import support +from test.support import run_unittest class cleanTestCase(support.TempdirManager, support.LoggingSilencer, @@ -47,4 +48,4 @@ def test_suite(): return unittest.makeSuite(cleanTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 5821fcd286..195045cc7b 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,7 +1,7 @@ """Tests for distutils.cmd.""" import unittest import os -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.cmd import Command from distutils.dist import Distribution @@ -99,7 +99,7 @@ def test_ensure_filename(self): def test_ensure_dirname(self): cmd = self.cmd - cmd.option1 = os.path.dirname(__file__) + cmd.option1 = os.path.dirname(__file__) or os.curdir cmd.ensure_dirname('option1') cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') @@ -124,4 +124,4 @@ def test_suite(): return unittest.makeSuite(CommandTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_config.py b/tests/test_config.py index 2c075d7ee7..525bee9416 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -10,6 +10,7 @@ from distutils.log import WARN from distutils.tests import support +from test.support import run_unittest PYPIRC = """\ [distutils] @@ -116,4 +117,4 @@ def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index fcb798e73b..4f7ebdd9fc 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,6 +2,7 @@ import unittest import os import sys +from test.support import run_unittest from distutils.command.config import dump_file, config from distutils.tests import support @@ -86,4 +87,4 @@ def test_suite(): return unittest.makeSuite(ConfigTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_core.py b/tests/test_core.py index d781555da5..41321f7db4 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,7 +6,7 @@ import shutil import sys import test.support -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest import unittest from distutils.tests import support @@ -105,4 +105,4 @@ def test_suite(): return unittest.makeSuite(CoreTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 79377a7763..856921679d 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -4,6 +4,7 @@ import os from io import BytesIO import subprocess +from test.support import run_unittest from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, @@ -151,4 +152,4 @@ def test_suite(): return unittest.makeSuite(CygwinCCompilerTestCase) if __name__ == '__main__': - test_support.run_unittest(test_suite()) + run_unittest(test_suite()) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 84a0ec6cfc..ce74589dde 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -10,6 +10,7 @@ from distutils import log from distutils.tests import support +from test.support import run_unittest class DirUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -112,4 +113,4 @@ def test_suite(): return unittest.makeSuite(DirUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dist.py b/tests/test_dist.py index 2c19d89266..1624f00e53 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -10,7 +10,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command -from test.support import TESTFN, captured_stdout +from test.support import TESTFN, captured_stdout, run_unittest from distutils.tests import support @@ -326,4 +326,4 @@ def test_suite(): return suite if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_extension.py b/tests/test_extension.py index d9a47a89c8..e35f2738b6 100755 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -3,7 +3,7 @@ import os import warnings -from test.support import check_warnings +from test.support import check_warnings, run_unittest from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): @@ -66,4 +66,4 @@ def test_suite(): return unittest.makeSuite(ExtensionTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 730ffde4ff..3c3e3dcb3b 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -6,6 +6,7 @@ from distutils.file_util import move_file from distutils import log from distutils.tests import support +from test.support import run_unittest class FileUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -62,4 +63,4 @@ def test_suite(): return unittest.makeSuite(FileUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index d2a2b449ee..c7e5201b17 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -2,7 +2,7 @@ import unittest from distutils.filelist import glob_to_re, FileList -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils import debug class FileListTestCase(unittest.TestCase): @@ -39,4 +39,4 @@ def test_suite(): return unittest.makeSuite(FileListTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install.py b/tests/test_install.py index f9c142e446..a76e3e7a3c 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -6,7 +6,7 @@ import unittest import site -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.command.install import install from distutils.command import install as install_module @@ -203,4 +203,4 @@ def test_suite(): return unittest.makeSuite(InstallTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 86db4a12c5..4d8c00acb9 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -6,6 +6,7 @@ from distutils.command.install_data import install_data from distutils.tests import support +from test.support import run_unittest class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, @@ -73,4 +74,4 @@ def test_suite(): return unittest.makeSuite(InstallDataTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index aa8a4e6014..d953157bb7 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -6,6 +6,7 @@ from distutils.command.install_headers import install_headers from distutils.tests import support +from test.support import run_unittest class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, @@ -37,4 +38,4 @@ def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 4636304692..fddaabe111 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -7,6 +7,7 @@ from distutils.extension import Extension from distutils.tests import support from distutils.errors import DistutilsOptionError +from test.support import run_unittest class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, @@ -98,4 +99,4 @@ def test_suite(): return unittest.makeSuite(InstallLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 08360d297b..8952e744e5 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -7,6 +7,7 @@ from distutils.core import Distribution from distutils.tests import support +from test.support import run_unittest class InstallScriptsTestCase(support.TempdirManager, @@ -78,4 +79,4 @@ def test_suite(): return unittest.makeSuite(InstallScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_log.py b/tests/test_log.py index 9d40dcd72c..ce66ee51e7 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -3,6 +3,7 @@ import sys import unittest from tempfile import NamedTemporaryFile +from test.support import run_unittest from distutils import log @@ -33,4 +34,4 @@ def test_suite(): return unittest.makeSuite(TestLog) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 570fda121e..a0d62efcfd 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -5,6 +5,7 @@ from distutils.errors import DistutilsPlatformError from distutils.tests import support +from test.support import run_unittest _MANIFEST = """\ @@ -137,4 +138,4 @@ def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_register.py b/tests/test_register.py index c98e28a1a4..c712f56a78 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -6,7 +6,7 @@ import urllib import warnings -from test.support import check_warnings +from test.support import check_warnings, run_unittest from distutils.command import register as register_module from distutils.command.register import register @@ -259,4 +259,4 @@ def test_suite(): return unittest.makeSuite(RegisterTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index d734ea0ac5..655e50dcfc 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -8,11 +8,9 @@ import tempfile import warnings -from test.support import check_warnings -from test.support import captured_stdout +from test.support import captured_stdout, check_warnings, run_unittest -from distutils.command.sdist import sdist -from distutils.command.sdist import show_formats +from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -356,4 +354,4 @@ def test_suite(): return unittest.makeSuite(SDistTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 0616c9f2e3..6c7eb20c47 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -2,7 +2,7 @@ import unittest import os import time -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.spawn import _nt_quote_args from distutils.spawn import spawn, find_executable @@ -55,4 +55,4 @@ def test_suite(): return unittest.makeSuite(SpawnTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index f1e32b6cc6..7e76240a9a 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -3,6 +3,7 @@ import unittest from distutils.text_file import TextFile from distutils.tests import support +from test.support import run_unittest TEST_DATA = """# test file @@ -103,4 +104,4 @@ def test_suite(): return unittest.makeSuite(TextFileTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 3a41e6fcaa..1bff38e9ee 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,6 +1,7 @@ """Tests for distutils.unixccompiler.""" import sys import unittest +from test.support import run_unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler @@ -118,4 +119,4 @@ def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_upload.py b/tests/test_upload.py index 8891820d67..4c6464a32e 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,13 +1,12 @@ """Tests for distutils.command.upload.""" -import sys import os import unittest import http.client as httpclient +from test.support import run_unittest from distutils.command.upload import upload from distutils.core import Distribution -from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase PYPIRC_LONG_PASSWORD = """\ @@ -136,4 +135,4 @@ def test_suite(): return unittest.makeSuite(uploadTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_util.py b/tests/test_util.py index f40caac838..8ff5ae2085 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -3,6 +3,7 @@ import sys import unittest from copy import copy +from test.support import run_unittest from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, @@ -274,4 +275,4 @@ def test_suite(): return unittest.makeSuite(UtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_version.py b/tests/test_version.py index 980f83f29a..15f14c7de3 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -2,6 +2,7 @@ import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion +from test.support import run_unittest class VersionTestCase(unittest.TestCase): @@ -67,4 +68,4 @@ def test_suite(): return unittest.makeSuite(VersionTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_versionpredicate.py b/tests/test_versionpredicate.py index 8a60dbe806..28ae09dc20 100644 --- a/tests/test_versionpredicate.py +++ b/tests/test_versionpredicate.py @@ -4,6 +4,10 @@ import distutils.versionpredicate import doctest +from test.support import run_unittest def test_suite(): return doctest.DocTestSuite(distutils.versionpredicate) + +if __name__ == '__main__': + run_unittest(test_suite()) From b33ff8df881999f3d2ec8b99e15f5b66faca4837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 3 Feb 2011 00:12:18 +0000 Subject: [PATCH 3132/8469] Merged revisions 86236,86240,86332,86340,87271,87273,87447 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To comply with the 2.x doc style, the methods in trace.rst use brackets around optional arguments. The rest is a mostly straight merge, modulo support changed to test_support and use of the old super call style in test_tuple. ........ r86236 | eric.araujo | 2010-11-06 03:44:43 +0100 (sam., 06 nov. 2010) | 2 lines Make sure each test can be run standalone (./python Lib/distutils/tests/x.py) ........ r86240 | eric.araujo | 2010-11-06 05:11:59 +0100 (sam., 06 nov. 2010) | 2 lines Prevent ResourceWarnings in test_gettext ........ r86332 | eric.araujo | 2010-11-08 19:15:17 +0100 (lun., 08 nov. 2010) | 4 lines Add missing NEWS entry for a fix committed by Senthil. All recent modifications to distutils should now be covered in NEWS. ........ r86340 | eric.araujo | 2010-11-08 22:48:23 +0100 (lun., 08 nov. 2010) | 2 lines This was actually fixed for the previous alpha. ........ r87271 | eric.araujo | 2010-12-15 20:09:58 +0100 (mer., 15 déc. 2010) | 2 lines Improve trace documentation (#9264). Patch by Eli Bendersky. ........ r87273 | eric.araujo | 2010-12-15 20:30:15 +0100 (mer., 15 déc. 2010) | 2 lines Use nested method directives, rewrap long lines, fix whitespace. ........ r87447 | eric.araujo | 2010-12-23 20:13:05 +0100 (jeu., 23 déc. 2010) | 2 lines Fix typo in superclass method name ........ --- tests/__init__.py | 5 +++-- tests/test_archive_util.py | 4 ++-- tests/test_bdist_msi.py | 2 +- tests/test_build.py | 3 ++- tests/test_build_clib.py | 4 +++- tests/test_build_py.py | 3 ++- tests/test_build_scripts.py | 3 ++- tests/test_check.py | 3 ++- tests/test_clean.py | 3 ++- tests/test_cmd.py | 2 +- tests/test_config.py | 3 ++- tests/test_config_cmd.py | 3 ++- tests/test_core.py | 4 ++-- tests/test_dep_util.py | 3 ++- tests/test_dir_util.py | 3 ++- tests/test_dist.py | 4 ++-- tests/test_file_util.py | 3 ++- tests/test_filelist.py | 4 ++-- tests/test_install.py | 4 +++- tests/test_install_data.py | 3 ++- tests/test_install_headers.py | 3 ++- tests/test_install_lib.py | 3 ++- tests/test_install_scripts.py | 3 ++- tests/test_msvc9compiler.py | 3 ++- tests/test_register.py | 4 ++-- tests/test_sdist.py | 8 +++----- tests/test_spawn.py | 4 ++-- tests/test_text_file.py | 3 ++- tests/test_unixccompiler.py | 3 ++- tests/test_upload.py | 7 +++---- tests/test_util.py | 3 ++- tests/test_version.py | 3 ++- tests/test_versionpredicate.py | 4 ++++ 33 files changed, 71 insertions(+), 46 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 7bdb912463..697ff84045 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,9 +15,10 @@ import os import sys import unittest +from test.test_support import run_unittest -here = os.path.dirname(__file__) +here = os.path.dirname(__file__) or os.curdir def test_suite(): @@ -32,4 +33,4 @@ def test_suite(): if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index bab91577f2..1f7106f84f 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -12,7 +12,7 @@ ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.test_support import check_warnings +from test.test_support import check_warnings, run_unittest try: import grp @@ -281,4 +281,4 @@ def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 7554e9f170..1c897ab04d 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -11,7 +11,7 @@ class BDistMSITestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def test_minial(self): + def test_minimal(self): # minimal test XXX need more tests from distutils.command.bdist_msi import bdist_msi pkg_pth, dist = self.create_dist() diff --git a/tests/test_build.py b/tests/test_build.py index 3db570382e..eeb8d73e14 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -2,6 +2,7 @@ import unittest import os import sys +from test.test_support import run_unittest from distutils.command.build import build from distutils.tests import support @@ -51,4 +52,4 @@ def test_suite(): return unittest.makeSuite(BuildTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index d77912ae08..4f4e2bc7c6 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -3,6 +3,8 @@ import os import sys +from test.test_support import run_unittest + from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support @@ -140,4 +142,4 @@ def test_suite(): return unittest.makeSuite(BuildCLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 03517392fb..937fa0ce90 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -10,6 +10,7 @@ from distutils.errors import DistutilsFileError from distutils.tests import support +from test.test_support import run_unittest class BuildPyTestCase(support.TempdirManager, @@ -123,4 +124,4 @@ def test_suite(): return unittest.makeSuite(BuildPyTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index df89cdec25..4da93cc140 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -8,6 +8,7 @@ import sysconfig from distutils.tests import support +from test.test_support import run_unittest class BuildScriptsTestCase(support.TempdirManager, @@ -108,4 +109,4 @@ def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_check.py b/tests/test_check.py index 7c56c04339..4ea83dcb79 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,5 +1,6 @@ """Tests for distutils.command.check.""" import unittest +from test.test_support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support @@ -95,4 +96,4 @@ def test_suite(): return unittest.makeSuite(CheckTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_clean.py b/tests/test_clean.py index dbc4ee2a18..2d1610da7c 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -6,6 +6,7 @@ from distutils.command.clean import clean from distutils.tests import support +from test.test_support import run_unittest class cleanTestCase(support.TempdirManager, support.LoggingSilencer, @@ -47,4 +48,4 @@ def test_suite(): return unittest.makeSuite(cleanTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 97cdb8ad69..e074099609 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -99,7 +99,7 @@ def test_ensure_filename(self): def test_ensure_dirname(self): cmd = self.cmd - cmd.option1 = os.path.dirname(__file__) + cmd.option1 = os.path.dirname(__file__) or os.curdir cmd.ensure_dirname('option1') cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') diff --git a/tests/test_config.py b/tests/test_config.py index 8d71234d6e..cfd096ebc2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -11,6 +11,7 @@ from distutils.log import WARN from distutils.tests import support +from test.test_support import run_unittest PYPIRC = """\ [distutils] @@ -119,4 +120,4 @@ def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index fcb798e73b..a36a1d5b49 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,6 +2,7 @@ import unittest import os import sys +from test.test_support import run_unittest from distutils.command.config import dump_file, config from distutils.tests import support @@ -86,4 +87,4 @@ def test_suite(): return unittest.makeSuite(ConfigTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_core.py b/tests/test_core.py index 74d1f3b269..0d979bcde9 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6,7 +6,7 @@ import shutil import sys import test.test_support -from test.test_support import captured_stdout +from test.test_support import captured_stdout, run_unittest import unittest from distutils.tests import support @@ -105,4 +105,4 @@ def test_suite(): return unittest.makeSuite(CoreTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index 3550819681..751043432e 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -6,6 +6,7 @@ from distutils.dep_util import newer, newer_pairwise, newer_group from distutils.errors import DistutilsFileError from distutils.tests import support +from test.test_support import run_unittest class DepUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -77,4 +78,4 @@ def test_suite(): return unittest.makeSuite(DepUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 84a0ec6cfc..693f77cf64 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -10,6 +10,7 @@ from distutils import log from distutils.tests import support +from test.test_support import run_unittest class DirUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -112,4 +113,4 @@ def test_suite(): return unittest.makeSuite(DirUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_dist.py b/tests/test_dist.py index 8ab7e9fc31..ba60638179 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -11,7 +11,7 @@ from distutils.dist import Distribution, fix_help_options, DistributionMetadata from distutils.cmd import Command import distutils.dist -from test.test_support import TESTFN, captured_stdout +from test.test_support import TESTFN, captured_stdout, run_unittest from distutils.tests import support class test_dist(Command): @@ -433,4 +433,4 @@ def test_suite(): return suite if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index dbc6283981..7dbcf52c68 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -6,6 +6,7 @@ from distutils.file_util import move_file, write_file, copy_file from distutils import log from distutils.tests import support +from test.test_support import run_unittest class FileUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -77,4 +78,4 @@ def test_suite(): return unittest.makeSuite(FileUtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 32c56c75bc..be11ea5d13 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,7 +1,7 @@ """Tests for distutils.filelist.""" from os.path import join import unittest -from test.test_support import captured_stdout +from test.test_support import captured_stdout, run_unittest from distutils.filelist import glob_to_re, FileList from distutils import debug @@ -82,4 +82,4 @@ def test_suite(): return unittest.makeSuite(FileListTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install.py b/tests/test_install.py index c834b91b38..4f976f34e6 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -3,6 +3,8 @@ import os import unittest +from test.test_support import run_unittest + from distutils.command.install import install from distutils.core import Distribution @@ -52,4 +54,4 @@ def test_suite(): return unittest.makeSuite(InstallTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 86db4a12c5..477569444f 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -6,6 +6,7 @@ from distutils.command.install_data import install_data from distutils.tests import support +from test.test_support import run_unittest class InstallDataTestCase(support.TempdirManager, support.LoggingSilencer, @@ -73,4 +74,4 @@ def test_suite(): return unittest.makeSuite(InstallDataTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index aa8a4e6014..b37224b93d 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -6,6 +6,7 @@ from distutils.command.install_headers import install_headers from distutils.tests import support +from test.test_support import run_unittest class InstallHeadersTestCase(support.TempdirManager, support.LoggingSilencer, @@ -37,4 +38,4 @@ def test_suite(): return unittest.makeSuite(InstallHeadersTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 754ea636a5..4d863089c0 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -7,6 +7,7 @@ from distutils.extension import Extension from distutils.tests import support from distutils.errors import DistutilsOptionError +from test.test_support import run_unittest class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, @@ -103,4 +104,4 @@ def test_suite(): return unittest.makeSuite(InstallLibTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 08360d297b..46085458bf 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -7,6 +7,7 @@ from distutils.core import Distribution from distutils.tests import support +from test.test_support import run_unittest class InstallScriptsTestCase(support.TempdirManager, @@ -78,4 +79,4 @@ def test_suite(): return unittest.makeSuite(InstallScriptsTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index b8e2209482..e155dbfea3 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -5,6 +5,7 @@ from distutils.errors import DistutilsPlatformError from distutils.tests import support +from test.test_support import run_unittest _MANIFEST = """\ @@ -137,4 +138,4 @@ def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_register.py b/tests/test_register.py index 915427b7d9..dd60f8c804 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -7,7 +7,7 @@ import urllib2 import warnings -from test.test_support import check_warnings +from test.test_support import check_warnings, run_unittest from distutils.command import register as register_module from distutils.command.register import register @@ -258,4 +258,4 @@ def test_suite(): return unittest.makeSuite(RegisterTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index b9d86bb02e..ab8c3d917b 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -24,11 +24,9 @@ import tempfile import warnings -from test.test_support import check_warnings -from test.test_support import captured_stdout +from test.test_support import captured_stdout, check_warnings, run_unittest -from distutils.command.sdist import sdist -from distutils.command.sdist import show_formats +from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError, DistutilsOptionError @@ -426,4 +424,4 @@ def test_suite(): return unittest.makeSuite(SDistTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 6caf039031..defa54d87f 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -2,7 +2,7 @@ import unittest import os import time -from test.test_support import captured_stdout +from test.test_support import captured_stdout, run_unittest from distutils.spawn import _nt_quote_args from distutils.spawn import spawn, find_executable @@ -57,4 +57,4 @@ def test_suite(): return unittest.makeSuite(SpawnTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_text_file.py b/tests/test_text_file.py index f1e32b6cc6..ce19cd4dcd 100644 --- a/tests/test_text_file.py +++ b/tests/test_text_file.py @@ -3,6 +3,7 @@ import unittest from distutils.text_file import TextFile from distutils.tests import support +from test.test_support import run_unittest TEST_DATA = """# test file @@ -103,4 +104,4 @@ def test_suite(): return unittest.makeSuite(TextFileTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 3f233e2823..40c908a24d 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,6 +1,7 @@ """Tests for distutils.unixccompiler.""" import sys import unittest +from test.test_support import run_unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler @@ -126,4 +127,4 @@ def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_upload.py b/tests/test_upload.py index f45ee41e8c..99111999d8 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,14 +1,13 @@ -"""Tests for distutils.command.upload.""" # -*- encoding: utf8 -*- -import sys +"""Tests for distutils.command.upload.""" import os import unittest +from test.test_support import run_unittest from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution -from distutils.tests import support from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase PYPIRC_LONG_PASSWORD = """\ @@ -129,4 +128,4 @@ def test_suite(): return unittest.makeSuite(uploadTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_util.py b/tests/test_util.py index 981ad000da..67cd4cc7e6 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,6 +1,7 @@ """Tests for distutils.util.""" import sys import unittest +from test.test_support import run_unittest from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import byte_compile @@ -21,4 +22,4 @@ def test_suite(): return unittest.makeSuite(UtilTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_version.py b/tests/test_version.py index 1d9fbc7985..2189956429 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -2,6 +2,7 @@ import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion +from test.test_support import run_unittest class VersionTestCase(unittest.TestCase): @@ -67,4 +68,4 @@ def test_suite(): return unittest.makeSuite(VersionTestCase) if __name__ == "__main__": - unittest.main(defaultTest="test_suite") + run_unittest(test_suite()) diff --git a/tests/test_versionpredicate.py b/tests/test_versionpredicate.py index 8a60dbe806..1d6c8d5a98 100644 --- a/tests/test_versionpredicate.py +++ b/tests/test_versionpredicate.py @@ -4,6 +4,10 @@ import distutils.versionpredicate import doctest +from test.test_support import run_unittest def test_suite(): return doctest.DocTestSuite(distutils.versionpredicate) + +if __name__ == '__main__': + run_unittest(test_suite()) From d3d4f43f285902d969a2cfb2e8f4523c4937a299 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 13 Feb 2011 10:00:57 +0000 Subject: [PATCH 3133/8469] Bump for 3.2rc3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 4bb5012318..8a7e3ff92b 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2rc2" +__version__ = "3.2rc3" #--end constants-- From 41ef9736602618dc38120340185ef00b954058ca Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 20 Feb 2011 10:29:04 +0000 Subject: [PATCH 3134/8469] Version bump to 3.2 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8a7e3ff92b..49b6d517f6 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2rc3" +__version__ = "3.2" #--end constants-- From d6f2a6b6356b8963212a475e3488df3bb585fb80 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 20 Feb 2011 10:37:07 +0000 Subject: [PATCH 3135/8469] Bump trunk to 3.3 alpha 0. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 49b6d517f6..bd7d9dd634 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2" +__version__ = "3.3a0" #--end constants-- From e78f5a1f0ab26979bbd4167b7db86e8579ce3c1e Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 22 Feb 2011 12:05:49 -0800 Subject: [PATCH 3136/8469] Fix for easy_install running on python-3.2 --HG-- branch : distribute extra : rebase_source : caaf0829ce479d95efa48e5e422e699e0c4d8ff3 --- setuptools/command/easy_install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4ffef3def5..1a0ee561d7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -204,6 +204,12 @@ def finalize_options(self): 'exec_prefix': exec_prefix, } + try: + self.config_vars['abiflags'] = sys.abiflags + except AttributeError: + # Only python-3.2+ has sys.abiflags + self.config_vars['abiflags'] = '' + if HAS_USER_SITE: self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite From 6a40d111b0a9aeab8353793baaf6cfd4e61089f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Fri, 25 Feb 2011 15:42:01 +0000 Subject: [PATCH 3137/8469] Normalize the encoding names for Latin-1 and UTF-8 to 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303. --- command/bdist_wininst.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b2e2fc6dc8..b886055f27 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -263,11 +263,11 @@ def create_exe(self, arcname, fullname, bitmap=None): cfgdata = cfgdata + b"\0" if self.pre_install_script: # We need to normalize newlines, so we open in text mode and - # convert back to bytes. "latin1" simply avoids any possible + # convert back to bytes. "latin-1" simply avoids any possible # failures. with open(self.pre_install_script, "r", - encoding="latin1") as script: - script_data = script.read().encode("latin1") + encoding="latin-1") as script: + script_data = script.read().encode("latin-1") cfgdata = cfgdata + script_data + b"\n\0" else: # empty pre-install script From c8e04e093a418473f9fa49a2580e83c68fcf6c9b Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sat, 12 Mar 2011 06:49:03 -0800 Subject: [PATCH 3138/8469] Use different version of py3.2 fix from Vinay Sajip --HG-- branch : distribute extra : rebase_source : 9eea7c29a6f7e961ca6a39decdc2e52c828e8464 --- setuptools/command/easy_install.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 1a0ee561d7..203553414f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -202,14 +202,10 @@ def finalize_options(self): 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + # Only python 3.2+ has abiflags + 'abiflags': getattr(sys, 'abiflags', ''), } - try: - self.config_vars['abiflags'] = sys.abiflags - except AttributeError: - # Only python-3.2+ has sys.abiflags - self.config_vars['abiflags'] = '' - if HAS_USER_SITE: self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite From 3860cc209929f5e6ec927d71cc41420665311434 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 14 Mar 2011 20:03:36 -0400 Subject: [PATCH 3139/8469] Issue #3080: skip test_bdist_rpm if sys.executable is not encodable to UTF-8 --- tests/test_bdist_rpm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 804fb1355f..030933f17c 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -28,6 +28,11 @@ class BuildRpmTestCase(support.TempdirManager, unittest.TestCase): def setUp(self): + try: + sys.executable.encode("UTF-8") + except UnicodeEncodeError: + raise unittest.SkipTest("sys.executable is not encodable to UTF-8") + super(BuildRpmTestCase, self).setUp() self.old_location = os.getcwd() self.old_sys_argv = sys.argv, sys.argv[:] From 7b90f7fd67dc5e30fcd3984e3987846ae6ccd026 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2011 12:30:01 -0400 Subject: [PATCH 3140/8469] Added tag 0.6.15 for changeset 51a9d1a1f31a --HG-- branch : distribute extra : rebase_source : 7c3a9e67f9c30417b125cde2369890bdcd728516 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cefd3429e7..0f10f5f441 100644 --- a/.hgtags +++ b/.hgtags @@ -17,3 +17,4 @@ e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 48a97bc89e2f65fc9b78b358d7dc89ba9ec9524a 0.6.12 dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 2b9d9977ea75b8eb3766bab808ef31f192d2b1bc 0.6.14 +51a9d1a1f31a4be3107d06cf088aff8e182dc633 0.6.15 From 5ad4feb46a452280651cb7f6411bbaacb6b6466d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2011 12:32:24 -0400 Subject: [PATCH 3141/8469] Bumped version numbers to 0.6.16 Updated copyright to include 2010,2011. --HG-- branch : distribute extra : rebase_source : b8fc0374e3cdedf002f66c6b1b1fb5e0d378323d --- distribute_setup.py | 2 +- docs/conf.py | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index e8f0ed06b0..23eeb2864a 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.15" +DEFAULT_VERSION = "0.6.16" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 2bf4d37ee9..f3bd26daf0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,16 +41,16 @@ # General information about the project. project = u'Distribute' -copyright = u'2009, The fellowship of the packaging' +copyright = u'2009-2011, The fellowship of the packaging' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.6.15' +version = '0.6.16' # The full version, including alpha/beta/rc tags. -release = '0.6.15' +release = '0.6.16' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index a78588239b..05b666917a 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.15" +VERSION = "0.6.16" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 5bff24b86b4ad1400e9f063f3e371cac0fdd0e59 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 15 Mar 2011 21:02:59 +0100 Subject: [PATCH 3142/8469] On behalf of Tarek: Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is not installed. Instead, the zipfile.ZIP_STORED compression is used to create the ZipFile. Patch by Natalia B. Bidart. --- archive_util.py | 19 ++++++++++------- tests/test_archive_util.py | 42 ++++++++++++++++++++++++++++++++++---- tests/test_bdist_dumb.py | 8 ++++++++ tests/test_sdist.py | 15 +++++++++++++- 4 files changed, 72 insertions(+), 12 deletions(-) diff --git a/archive_util.py b/archive_util.py index 6dd0445dbe..c06eba351d 100644 --- a/archive_util.py +++ b/archive_util.py @@ -9,6 +9,12 @@ from warnings import warn import sys +try: + import zipfile +except ImportError: + zipfile = None + + from distutils.errors import DistutilsExecError from distutils.spawn import spawn from distutils.dir_util import mkpath @@ -74,11 +80,6 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): available, raises DistutilsExecError. Returns the name of the output zip file. """ - try: - import zipfile - except ImportError: - zipfile = None - zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), dry_run=dry_run) @@ -105,8 +106,12 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): zip_filename, base_dir) if not dry_run: - zip = zipfile.ZipFile(zip_filename, "w", - compression=zipfile.ZIP_DEFLATED) + try: + zip = zipfile.ZipFile(zip_filename, "w", + compression=zipfile.ZIP_DEFLATED) + except RuntimeError: + zip = zipfile.ZipFile(zip_filename, "w", + compression=zipfile.ZIP_STORED) for dirpath, dirnames, filenames in os.walk(base_dir): for name in filenames: diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index aff426521d..f969849590 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -7,12 +7,13 @@ from os.path import splitdrive import warnings +from distutils import archive_util from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile, make_archive, ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import check_warnings, run_unittest +from test.support import check_warnings, run_unittest, patch try: import zipfile @@ -20,10 +21,18 @@ except ImportError: ZIP_SUPPORT = find_executable('zip') +try: + import zlib + ZLIB_SUPPORT = True +except ImportError: + ZLIB_SUPPORT = False + + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -84,8 +93,9 @@ def _create_files(self): base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name - @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), - 'Need the tar command to run') + @unittest.skipUnless(find_executable('tar') and find_executable('gzip') + and ZLIB_SUPPORT, + 'Need the tar, gzip and zlib command to run') def test_tarfile_vs_tar(self): tmpdir, tmpdir2, base_name = self._create_files() old_dir = os.getcwd() @@ -169,7 +179,8 @@ def test_compress_deprecated(self): self.assertTrue(not os.path.exists(tarball)) self.assertEqual(len(w.warnings), 1) - @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') + @unittest.skipUnless(ZIP_SUPPORT and ZLIB_SUPPORT, + 'Need zip and zlib support to run') def test_make_zipfile(self): # creating something to tar tmpdir = self.mkdtemp() @@ -182,6 +193,29 @@ def test_make_zipfile(self): # check if the compressed tarball was created tarball = base_name + '.zip' + self.assertTrue(os.path.exists(tarball)) + + @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') + def test_make_zipfile_no_zlib(self): + patch(self, archive_util.zipfile, 'zlib', None) # force zlib ImportError + + called = [] + zipfile_class = zipfile.ZipFile + def fake_zipfile(*a, **kw): + if kw.get('compression', None) == zipfile.ZIP_STORED: + called.append((a, kw)) + return zipfile_class(*a, **kw) + + patch(self, archive_util.zipfile, 'ZipFile', fake_zipfile) + + # create something to tar and compress + tmpdir, tmpdir2, base_name = self._create_files() + make_zipfile(base_name, tmpdir) + + tarball = base_name + '.zip' + self.assertEqual(called, + [((tarball, "w"), {'compression': zipfile.ZIP_STORED})]) + self.assertTrue(os.path.exists(tarball)) def test_check_archive_formats(self): self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index cc37fef8b0..55ba58d14f 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -18,6 +18,13 @@ """ +try: + import zlib + ZLIB_SUPPORT = True +except ImportError: + ZLIB_SUPPORT = False + + class BuildDumbTestCase(support.TempdirManager, support.LoggingSilencer, support.EnvironGuard, @@ -34,6 +41,7 @@ def tearDown(self): sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_simple_built(self): # let's create a simple package diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 655e50dcfc..eaf39a45ba 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -40,6 +40,13 @@ somecode%(sep)sdoc.txt """ +try: + import zlib + ZLIB_SUPPORT = True +except ImportError: + ZLIB_SUPPORT = False + + class SDistTestCase(PyPIRCCommandTestCase): def setUp(self): @@ -78,6 +85,7 @@ def _warn(*args): cmd.warn = _warn return dist, cmd + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -119,6 +127,7 @@ def test_prune_file_list(self): # making sure everything has been pruned correctly self.assertEqual(len(content), 4) + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_make_distribution(self): # check if tar and gzip are installed @@ -153,6 +162,7 @@ def test_make_distribution(self): result.sort() self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -218,6 +228,7 @@ def test_add_defaults(self): finally: f.close() + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) @@ -277,7 +288,7 @@ def test_finalize_options(self): cmd.formats = 'supazipa' self.assertRaises(DistutilsOptionError, cmd.finalize_options) - + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_get_file_list(self): # make sure MANIFEST is recalculated dist, cmd = self.get_cmd() @@ -318,6 +329,7 @@ def test_get_file_list(self): self.assertEqual(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_manifest_marker(self): # check that autogenerated MANIFESTs have a marker dist, cmd = self.get_cmd() @@ -334,6 +346,7 @@ def test_manifest_marker(self): self.assertEqual(manifest[0], '# file GENERATED by distutils, do NOT edit') + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() From 877161a90666a528acaa1169d33db58abbf2c964 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 16 Mar 2011 11:05:33 +0200 Subject: [PATCH 3143/8469] #11565: Fix several typos. Patch by Piotr Kasprzyk. --- cmd.py | 2 +- cygwinccompiler.py | 2 +- tests/test_clean.py | 2 +- tests/test_install.py | 2 +- tests/test_sdist.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd.py b/cmd.py index ae4efc7efc..5b1d085c32 100644 --- a/cmd.py +++ b/cmd.py @@ -359,7 +359,7 @@ def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1, not self.force, dry_run=self.dry_run) def move_file (self, src, dst, level=1): - """Move a file respectin dry-run flag.""" + """Move a file respecting dry-run flag.""" return file_util.move_file(src, dst, dry_run=self.dry_run) def spawn(self, cmd, search_path=1, level=1): diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 95fa3ed3c8..536aa6b61b 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -155,7 +155,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): self.dll_libraries = get_msvcr() def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - """Compiles the source by spawing GCC and windres if needed.""" + """Compiles the source by spawning GCC and windres if needed.""" if ext == '.rc' or ext == '.res': # gcc needs '.res' and '.rc' compiled to object files !!! try: diff --git a/tests/test_clean.py b/tests/test_clean.py index 649855f7ab..eb8958bff5 100755 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -39,7 +39,7 @@ def test_simple_run(self): self.assertTrue(not os.path.exists(path), '%s was not removed' % path) - # let's run the command again (should spit warnings but suceed) + # let's run the command again (should spit warnings but succeed) cmd.all = 1 cmd.ensure_finalized() cmd.run() diff --git a/tests/test_install.py b/tests/test_install.py index a76e3e7a3c..ed69b0cbb0 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -62,7 +62,7 @@ def test_user_site(self): if sys.version < '2.6': return - # preparing the environement for the test + # preparing the environment for the test self.old_user_base = site.USER_BASE self.old_user_site = site.USER_SITE self.tmpdir = self.mkdtemp() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index eaf39a45ba..c7dd47fb5c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -311,7 +311,7 @@ def test_get_file_list(self): # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') - # make sure build_py is reinitinialized, like a fresh run + # make sure build_py is reinitialized, like a fresh run build_py = dist.get_command_obj('build_py') build_py.finalized = False build_py.ensure_finalized() From 14b28f28de2b0ac9e40d9838ea72df93fb661b51 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 16 Mar 2011 12:34:31 +0200 Subject: [PATCH 3144/8469] #11565: Fix several typos. Patch by Piotr Kasprzyk. --- cmd.py | 2 +- tests/test_clean.py | 2 +- tests/test_sdist.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd.py b/cmd.py index dc40c14d61..9ad5657e40 100644 --- a/cmd.py +++ b/cmd.py @@ -377,7 +377,7 @@ def copy_tree(self, infile, outfile, dry_run=self.dry_run) def move_file (self, src, dst, level=1): - """Move a file respectin dry-run flag.""" + """Move a file respecting dry-run flag.""" return file_util.move_file(src, dst, dry_run = self.dry_run) def spawn (self, cmd, search_path=1, level=1): diff --git a/tests/test_clean.py b/tests/test_clean.py index 2d1610da7c..7b988f7f32 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -39,7 +39,7 @@ def test_simple_run(self): self.assertTrue(not os.path.exists(path), '%s was not removed' % path) - # let's run the command again (should spit warnings but suceed) + # let's run the command again (should spit warnings but succeed) cmd.all = 1 cmd.ensure_finalized() cmd.run() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index ab8c3d917b..54a32b88f5 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -370,7 +370,7 @@ def test_get_file_list(self): # adding a file self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') - # make sure build_py is reinitinialized, like a fresh run + # make sure build_py is reinitialized, like a fresh run build_py = dist.get_command_obj('build_py') build_py.finalized = False build_py.ensure_finalized() From 6d6e6bcde6387eccbbd6ec9eadce75a25d0219a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Mar 2011 14:46:31 -0400 Subject: [PATCH 3145/8469] Now builds gztar for sdist, even on Windows --HG-- branch : distribute extra : rebase_source : b2bdd9e6dc69f742c5b203ee26fc5d9b7c7224b3 --- CHANGES.txt | 6 ++++++ distribute.egg-info/entry_points.txt | 2 +- setup.cfg | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ee3dea6e89..69f9b9c22b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.16 +------ + +* Builds sdist gztar even on Windows (avoiding Issue 193). + ------ 0.6.15 ------ diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index e1f704d8cb..9fd4175819 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setup.cfg b/setup.cfg index dc4cfd970e..d7dfbb772e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -13,4 +13,7 @@ build-dir = docs/build all_files = 1 [upload_docs] -upload-dir = docs/build/html \ No newline at end of file +upload-dir = docs/build/html + +[sdist] +formats=gztar From 5a4d274c93ab53f31f3926757cbe80a0dbdf0130 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Mar 2011 16:19:13 -0400 Subject: [PATCH 3146/8469] Fix for issue192 --HG-- branch : distribute extra : rebase_source : cbae39614a979ea69ced9a0541e71b0377c3a9d5 --- setuptools/command/bdist_egg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 3bb56fc35b..68ca15c799 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -332,7 +332,11 @@ def gen_header(self): def copy_metadata_to(self, target_dir): - prefix = os.path.join(self.egg_info,'') + "Copy metadata (egg info) to the target_dir" + # normalize the path (so that a forward-slash in egg_info will + # match using startswith below) + norm_egg_info = os.path.normpath(self.egg_info) + prefix = os.path.join(norm_egg_info,'') for path in self.ei_cmd.filelist.files: if path.startswith(prefix): target = os.path.join(target_dir, path[len(prefix):]) From 8bf1bc0e657b65bdc41575f9b6b0372f77f2d7b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Mar 2011 16:21:40 -0400 Subject: [PATCH 3147/8469] updated CHANGES --HG-- branch : distribute extra : rebase_source : efcd3ced19c5f87851089e8506a118dc6f2aa21a --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 69f9b9c22b..7e5f8cb785 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ CHANGES ------ * Builds sdist gztar even on Windows (avoiding Issue 193). +* Fix for Issue 192 - metadata omitted on Windows when package_dir + specified with forward-slash. ------ 0.6.15 From 0cb7fa265e11dcb58dcdf3a8be4497bf3beb01a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2011 10:34:57 -0400 Subject: [PATCH 3148/8469] Applying patch provided by Didrik Pinte on #195 for Cython build_ext support --HG-- branch : distribute extra : rebase_source : 69be8a07f86d1fbbdace2b7965a2c4a6cc5a14bf --- setuptools/extension.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index d186c7a2d3..df1ef02ae7 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -3,8 +3,16 @@ _Extension = _get_unpatched(_Extension) try: - from Pyrex.Distutils.build_ext import build_ext + # testing Cython first as it is supposed to replace pyrex + from Cython.Distutils.build_ext import build_ext except ImportError: + try: + from Pyrex.Distutils.build_ext import build_ext + except: + have_pyrex = False + else: + has_pyrex = True + have_pyrex = False else: have_pyrex = True From c60c5df22eab4e1bd4eead560e18184ebdcca108 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2011 10:44:42 -0400 Subject: [PATCH 3149/8469] Refactored Cython/Pyrex optional build support to unify logic --HG-- branch : distribute extra : rebase_source : c924cf1817736349e9a254098b6d99cd97a3d35f --- setuptools/extension.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index df1ef02ae7..980ee0a7b4 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -2,20 +2,16 @@ from setuptools.dist import _get_unpatched _Extension = _get_unpatched(_Extension) -try: - # testing Cython first as it is supposed to replace pyrex - from Cython.Distutils.build_ext import build_ext -except ImportError: - try: - from Pyrex.Distutils.build_ext import build_ext - except: - have_pyrex = False - else: - has_pyrex = True - - have_pyrex = False -else: - have_pyrex = True +# Prefer Cython to Pyrex +pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' +for pyrex_impl in pyrex_impls: + try: + # from (pyrex_impl) import build_ext + build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext + break + except: + pass +have_pyrex = 'build_ext' in globals() class Extension(_Extension): From 119e1f717238083a18d973f988114789c5b3e41b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2011 10:45:47 -0400 Subject: [PATCH 3150/8469] Updated changes.txt. Fixes #195. --HG-- branch : distribute extra : rebase_source : 3d0a67b5a6a9e265e56e68b598341e69fc1256b4 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7e5f8cb785..b1263eb84e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ CHANGES * Builds sdist gztar even on Windows (avoiding Issue 193). * Fix for Issue 192 - metadata omitted on Windows when package_dir specified with forward-slash. +* Issue 195: Cython build support. ------ 0.6.15 From 623c67f82759f75b20834aa82085593d553c6ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 14 Apr 2011 03:49:19 +0200 Subject: [PATCH 3151/8469] Fix improper tests in RegisterTestCase --- tests/test_register.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_register.py b/tests/test_register.py index c712f56a78..cb72a11538 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -137,7 +137,7 @@ def _no_way(prompt=''): # let's see what the server received : we should # have 2 similar requests - self.assertTrue(self.conn.reqs, 2) + self.assertEqual(len(self.conn.reqs), 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) @@ -169,7 +169,7 @@ def test_registering(self): del register_module.input # we should have send a request - self.assertTrue(self.conn.reqs, 1) + self.assertEqual(len(self.conn.reqs), 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '608') @@ -187,7 +187,7 @@ def test_password_reset(self): del register_module.input # we should have send a request - self.assertTrue(self.conn.reqs, 1) + self.assertEqual(len(self.conn.reqs), 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '290') From fb7e64a2c2d32923a81b4ea701e61d65e970bdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 14 Apr 2011 03:49:19 +0200 Subject: [PATCH 3152/8469] Fix improper tests in RegisterTestCase --- tests/test_register.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_register.py b/tests/test_register.py index dd60f8c804..bf63487035 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -138,7 +138,7 @@ def _no_way(prompt=''): # let's see what the server received : we should # have 2 similar requests - self.assertTrue(self.conn.reqs, 2) + self.assertEqual(len(self.conn.reqs), 2) req1 = dict(self.conn.reqs[0].headers) req2 = dict(self.conn.reqs[1].headers) self.assertEqual(req2['Content-length'], req1['Content-length']) @@ -168,7 +168,7 @@ def test_registering(self): del register_module.raw_input # we should have send a request - self.assertTrue(self.conn.reqs, 1) + self.assertEqual(len(self.conn.reqs), 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '608') @@ -186,7 +186,7 @@ def test_password_reset(self): del register_module.raw_input # we should have send a request - self.assertTrue(self.conn.reqs, 1) + self.assertEqual(len(self.conn.reqs), 1) req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '290') From 1509fe5874ad7155482d71b1b922bfdeb522ab58 Mon Sep 17 00:00:00 2001 From: agroszer Date: Fri, 15 Apr 2011 10:49:49 +0200 Subject: [PATCH 3153/8469] Fixing #200 --HG-- branch : distribute extra : rebase_source : 4446e76a0bcf2e968abce2020569aecbaab1df01 --- setuptools/command/easy_install.py | 3 ++- setuptools/package_index.py | 17 +++++++++++++---- setuptools/tests/test_packageindex.py | 9 +++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 203553414f..fb0f997994 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -15,6 +15,7 @@ from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from distutils import log, dir_util +from distutils.util import get_platform from distutils.util import convert_path, subst_vars from distutils.sysconfig import get_python_lib, get_config_vars from distutils.errors import DistutilsArgError, DistutilsOptionError, \ @@ -854,7 +855,7 @@ def install_exe(self, dist_filename, tmpdir): # Create a dummy distribution object until we build the real distro dist = Distribution(None, project_name=cfg.get('metadata','name'), - version=cfg.get('metadata','version'), platform="win32" + version=cfg.get('metadata','version'), platform=get_platform() ) # Convert the .exe to an unpacked egg diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 459cae2c0b..6d4047af61 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -31,16 +31,25 @@ def parse_bdist_wininst(name): """Return (base,pyversion) or (None,None) for possible .exe name""" lower = name.lower() - base, py_ver = None, None + base, py_ver, plat = None, None, None if lower.endswith('.exe'): if lower.endswith('.win32.exe'): base = name[:-10] + plat = 'win32' elif lower.startswith('.win32-py',-16): py_ver = name[-7:-4] base = name[:-16] + plat = 'win32' + elif lower.endswith('.win-amd64.exe'): + base = name[:-14] + plat = 'win-amd64' + elif lower.startswith('.win-amd64-py',-20): + py_ver = name[-7:-4] + base = name[:-20] + plat = 'win-amd64' + return base,py_ver,plat - return base,py_ver def egg_info_for_url(url): scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) @@ -69,10 +78,10 @@ def distros_for_location(location, basename, metadata=None): return [Distribution.from_location(location, basename, metadata)] if basename.endswith('.exe'): - win_base, py_ver = parse_bdist_wininst(basename) + win_base, py_ver, platform = parse_bdist_wininst(basename) if win_base is not None: return interpret_distro_name( - location, win_base, metadata, py_ver, BINARY_DIST, "win32" + location, win_base, metadata, py_ver, BINARY_DIST, platform ) # Try source distro extensions (.zip, .tgz, etc.) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 42cb8c1e5e..00d44ca689 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -108,5 +108,14 @@ def test_links_priority(self): # the link should be from the index self.assert_('correct_md5' in pi['foobar'][0].location) + def test_parse_bdist_wininst(self): + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win32-py2.4.exe'), ('reportlab-2.5', '2.4', 'win32')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win32.exe'), ('reportlab-2.5', None, 'win32')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win-amd64-py2.7.exe'), ('reportlab-2.5', '2.7', 'win-amd64')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64')) From f55d96faafe20a6b938a4706834abb69aa0b48c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 17 Apr 2011 14:27:07 +0200 Subject: [PATCH 3154/8469] Fix resource warning found manually --- command/sdist.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 1118060cbb..fdbebd7e0f 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -294,17 +294,20 @@ def read_template(self): join_lines=1, lstrip_ws=1, rstrip_ws=1, collapse_join=1) - while True: - line = template.readline() - if line is None: # end of file - break - - try: - self.filelist.process_template_line(line) - except DistutilsTemplateError as msg: - self.warn("%s, line %d: %s" % (template.filename, - template.current_line, - msg)) + try: + while True: + line = template.readline() + if line is None: # end of file + break + + try: + self.filelist.process_template_line(line) + except DistutilsTemplateError as msg: + self.warn("%s, line %d: %s" % (template.filename, + template.current_line, + msg)) + finally: + template.close() def prune_file_list(self): """Prune off branches that might slip into the file list as created From 85a903122782775c4e41b0f2ef1f262f71c1b439 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Apr 2011 09:26:11 -0400 Subject: [PATCH 3155/8469] Updated changelog to include fix for Issue 200 --HG-- branch : distribute extra : rebase_source : 0a839d22eb973622610fa3cb2fbfae638c1c89b7 --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b1263eb84e..8476903492 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,9 +7,10 @@ CHANGES ------ * Builds sdist gztar even on Windows (avoiding Issue 193). -* Fix for Issue 192 - metadata omitted on Windows when package_dir +* Issue 192: Fixed metadata omitted on Windows when package_dir specified with forward-slash. * Issue 195: Cython build support. +* Issue 200: Issues with recognizing 64-bit packages on Windows. ------ 0.6.15 From a14f22b9e70e85b20f6171b3e108464bf5359f55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Apr 2011 09:10:25 -0400 Subject: [PATCH 3156/8469] Added tag 0.6.16 for changeset 3f1ff138e947 --HG-- branch : distribute extra : rebase_source : aa7a4724efac75554f3a1790034ed55ec3a877d2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0f10f5f441..bf64adc605 100644 --- a/.hgtags +++ b/.hgtags @@ -18,3 +18,4 @@ e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 2b9d9977ea75b8eb3766bab808ef31f192d2b1bc 0.6.14 51a9d1a1f31a4be3107d06cf088aff8e182dc633 0.6.15 +3f1ff138e947bfc1c9bcfe0037030b7bfb4ab3a5 0.6.16 From dba705d9f2ffb25b4ecf293604b01dbcf88c6d7c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Apr 2011 09:14:15 -0400 Subject: [PATCH 3157/8469] Bumped working revisions to 0.6.17 --HG-- branch : distribute extra : rebase_source : 0d0c60865356a460ec83f3d4554cf9cd522ec8a1 --- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 23eeb2864a..9f441067b1 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.16" +DEFAULT_VERSION = "0.6.17" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index f3bd26daf0..e52891fe7a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.16' +version = '0.6.17' # The full version, including alpha/beta/rc tags. -release = '0.6.16' +release = '0.6.17' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 05b666917a..f2a3a6d9e8 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.16" +VERSION = "0.6.17" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From c9e28986af40be12d8e52c4e2b5445946cfeb640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 1 May 2011 02:05:58 +0200 Subject: [PATCH 3158/8469] Fix file handle leak --- command/sdist.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 0c3b0b55bf..cf8982bd9d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -306,17 +306,20 @@ def read_template(self): rstrip_ws=1, collapse_join=1) - while 1: - line = template.readline() - if line is None: # end of file - break - - try: - self.filelist.process_template_line(line) - except DistutilsTemplateError, msg: - self.warn("%s, line %d: %s" % (template.filename, - template.current_line, - msg)) + try: + while 1: + line = template.readline() + if line is None: # end of file + break + + try: + self.filelist.process_template_line(line) + except DistutilsTemplateError, msg: + self.warn("%s, line %d: %s" % (template.filename, + template.current_line, + msg)) + finally: + template.close() def prune_file_list(self): """Prune off branches that might slip into the file list as created From 540753de877e149efb1ff20e132031d004ab33de Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 8 May 2011 09:03:36 +0200 Subject: [PATCH 3159/8469] Bump to 3.2.1b1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 49b6d517f6..17c89ee82e 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2" +__version__ = "3.2.1b1" #--end constants-- From dcd99c95a5aef0137ccf177c6830de9d7c5d52ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 8 May 2011 16:27:13 +0200 Subject: [PATCH 3160/8469] Make test_distutils pass without zlib (fixes #9435) --- tests/test_sdist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 54a32b88f5..61f9c1f79b 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -388,6 +388,7 @@ def test_get_file_list(self): self.assertEqual(len(manifest2), 6) self.assertIn('doc2.txt', manifest2[-1]) + @unittest.skipUnless(zlib, "requires zlib") def test_manifest_marker(self): # check that autogenerated MANIFESTs have a marker dist, cmd = self.get_cmd() @@ -404,6 +405,7 @@ def test_manifest_marker(self): self.assertEqual(manifest[0], '# file GENERATED by distutils, do NOT edit') + @unittest.skipUnless(zlib, "requires zlib") def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() From 942c7a73182fd88a290e89dc3e06ac2871cfbced Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 11 May 2011 00:14:28 +0200 Subject: [PATCH 3161/8469] Close #10419, issue #6011: build_scripts command of distutils handles correctly non-ASCII path (path to the Python executable). Open and write the script in binary mode, but ensure that the shebang is decodable from UTF-8 and from the encoding of the script. --- command/build_scripts.py | 45 ++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 8b08bfeaf0..a43a7c306a 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -11,9 +11,10 @@ from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 from distutils import log +import tokenize # check if Python is called on the first line with this expression -first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') +first_line_re = re.compile(b'^#!.*python[0-9.]*([ \t].*)?$') class build_scripts(Command): @@ -74,12 +75,14 @@ def copy_scripts(self): # that way, we'll get accurate feedback if we can read the # script. try: - f = open(script, "r") + f = open(script, "rb") except IOError: if not self.dry_run: raise f = None else: + encoding, lines = tokenize.detect_encoding(f.readline) + f.seek(0) first_line = f.readline() if not first_line: self.warn("%s is an empty file (skipping)" % script) @@ -88,25 +91,45 @@ def copy_scripts(self): match = first_line_re.match(first_line) if match: adjust = True - post_interp = match.group(1) or '' + post_interp = match.group(1) or b'' if adjust: log.info("copying and adjusting %s -> %s", script, self.build_dir) updated_files.append(outfile) if not self.dry_run: - outf = open(outfile, "w") if not sysconfig.python_build: - outf.write("#!%s%s\n" % - (self.executable, - post_interp)) + executable = self.executable else: - outf.write("#!%s%s\n" % - (os.path.join( + executable = os.path.join( sysconfig.get_config_var("BINDIR"), "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))), - post_interp)) + sysconfig.get_config_var("EXE"))) + executable = os.fsencode(executable) + shebang = b"#!" + executable + post_interp + b"\n" + # Python parser starts to read a script using UTF-8 until + # it gets a #coding:xxx cookie. The shebang has to be the + # first line of a file, the #coding:xxx cookie cannot be + # written before. So the shebang has to be decodable from + # UTF-8. + try: + shebang.decode('utf-8') + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from utf-8".format(shebang)) + # If the script is encoded to a custom encoding (use a + # #coding:xxx cookie), the shebang has to be decodable from + # the script encoding too. + try: + shebang.decode(encoding) + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from the script encoding ({})" + .format(shebang, encoding)) + outf = open(outfile, "wb") + outf.write(shebang) outf.writelines(f.readlines()) outf.close() if f: From aadd806fbbb624e62206009ca056d30847176d9a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 11 May 2011 00:14:28 +0200 Subject: [PATCH 3162/8469] Close #10419, issue #6011: build_scripts command of distutils handles correctly non-ASCII path (path to the Python executable). Open and write the script in binary mode, but ensure that the shebang is decodable from UTF-8 and from the encoding of the script. --- command/build_scripts.py | 45 ++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 8b08bfeaf0..a43a7c306a 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -11,9 +11,10 @@ from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 from distutils import log +import tokenize # check if Python is called on the first line with this expression -first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') +first_line_re = re.compile(b'^#!.*python[0-9.]*([ \t].*)?$') class build_scripts(Command): @@ -74,12 +75,14 @@ def copy_scripts(self): # that way, we'll get accurate feedback if we can read the # script. try: - f = open(script, "r") + f = open(script, "rb") except IOError: if not self.dry_run: raise f = None else: + encoding, lines = tokenize.detect_encoding(f.readline) + f.seek(0) first_line = f.readline() if not first_line: self.warn("%s is an empty file (skipping)" % script) @@ -88,25 +91,45 @@ def copy_scripts(self): match = first_line_re.match(first_line) if match: adjust = True - post_interp = match.group(1) or '' + post_interp = match.group(1) or b'' if adjust: log.info("copying and adjusting %s -> %s", script, self.build_dir) updated_files.append(outfile) if not self.dry_run: - outf = open(outfile, "w") if not sysconfig.python_build: - outf.write("#!%s%s\n" % - (self.executable, - post_interp)) + executable = self.executable else: - outf.write("#!%s%s\n" % - (os.path.join( + executable = os.path.join( sysconfig.get_config_var("BINDIR"), "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))), - post_interp)) + sysconfig.get_config_var("EXE"))) + executable = os.fsencode(executable) + shebang = b"#!" + executable + post_interp + b"\n" + # Python parser starts to read a script using UTF-8 until + # it gets a #coding:xxx cookie. The shebang has to be the + # first line of a file, the #coding:xxx cookie cannot be + # written before. So the shebang has to be decodable from + # UTF-8. + try: + shebang.decode('utf-8') + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from utf-8".format(shebang)) + # If the script is encoded to a custom encoding (use a + # #coding:xxx cookie), the shebang has to be decodable from + # the script encoding too. + try: + shebang.decode(encoding) + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from the script encoding ({})" + .format(shebang, encoding)) + outf = open(outfile, "wb") + outf.write(shebang) outf.writelines(f.readlines()) outf.close() if f: From 8c2ad1791ef7504de9f6483af7617da21cc53daf Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 11 May 2011 00:57:29 +0200 Subject: [PATCH 3163/8469] Issue #10419: Fix build_scripts command of distutils to handle correctly non-ASCII scripts. Open and write the script in binary mode, but ensure that the shebang is decodable from UTF-8 and from the encoding of the script. --- command/build_scripts.py | 47 ++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 8b08bfeaf0..b3c767e319 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -11,9 +11,11 @@ from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 from distutils import log +import sys +import tokenize # check if Python is called on the first line with this expression -first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') +first_line_re = re.compile(b'^#!.*python[0-9.]*([ \t].*)?$') class build_scripts(Command): @@ -74,12 +76,14 @@ def copy_scripts(self): # that way, we'll get accurate feedback if we can read the # script. try: - f = open(script, "r") + f = open(script, "rb") except IOError: if not self.dry_run: raise f = None else: + encoding, lines = tokenize.detect_encoding(f.readline) + f.seek(0) first_line = f.readline() if not first_line: self.warn("%s is an empty file (skipping)" % script) @@ -88,25 +92,46 @@ def copy_scripts(self): match = first_line_re.match(first_line) if match: adjust = True - post_interp = match.group(1) or '' + post_interp = match.group(1) or b'' if adjust: log.info("copying and adjusting %s -> %s", script, self.build_dir) updated_files.append(outfile) if not self.dry_run: - outf = open(outfile, "w") if not sysconfig.python_build: - outf.write("#!%s%s\n" % - (self.executable, - post_interp)) + executable = self.executable else: - outf.write("#!%s%s\n" % - (os.path.join( + executable = os.path.join( sysconfig.get_config_var("BINDIR"), "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))), - post_interp)) + sysconfig.get_config_var("EXE"))) + executable = executable.encode(sys.getfilesystemencoding(), + 'surrogateescape') + shebang = b"#!" + executable + post_interp + b"\n" + # Python parser starts to read a script using UTF-8 until + # it gets a #coding:xxx cookie. The shebang has to be the + # first line of a file, the #coding:xxx cookie cannot be + # written before. So the shebang has to be decodable from + # UTF-8. + try: + shebang.decode('utf-8') + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from utf-8".format(shebang)) + # If the script is encoded to a custom encoding (use a + # #coding:xxx cookie), the shebang has to be decodable from + # the script encoding too. + try: + shebang.decode(encoding) + except UnicodeDecodeError: + raise ValueError( + "The shebang ({!r}) is not decodable " + "from the script encoding ({})" + .format(shebang, encoding)) + outf = open(outfile, "wb") + outf.write(shebang) outf.writelines(f.readlines()) outf.close() if f: From c2520e2d34b0139205471d0c6867393d15fb5d6a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 11 May 2011 19:06:35 +0200 Subject: [PATCH 3164/8469] Support Python >=3.1.4 and >=3.2.1. Type of distutils.command.build_scripts.first_line_re has been changed by the fix for http://bugs.python.org/issue10419. --HG-- branch : distribute extra : rebase_source : cd656cab87ff4f912ce5146b96e841b4eb17c49d --- CHANGES.txt | 6 ++++++ setuptools/command/easy_install.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8476903492..542424d18f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.17 +------ + +* Support Python >=3.1.4 and >=3.2.1. + ------ 0.6.16 ------ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fb0f997994..58e7ab3913 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1590,6 +1590,11 @@ def make_relative(self,path): def get_script_header(script_text, executable=sys_executable, wininst=False): """Create a #! line, getting options (if any) from script_text""" from distutils.command.build_scripts import first_line_re + + # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. + if not isinstance(first_line_re.pattern, str): + first_line_re = re.compile(first_line_re.pattern.decode()) + first = (script_text+'\n').splitlines()[0] match = first_line_re.match(first) options = '' From 563a44dea6e49eff7883c6c9c8b08a887e096738 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 15 May 2011 16:44:27 +0200 Subject: [PATCH 3165/8469] Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is set in shell. Without this patch python will fail to start properly when the environment variable MACOSX_DEPLOYMENT_TARGET is set on MacOSX and has a value that is not compatible with the value during Python's build. This is caused by code in sysconfig that was only meant to be used in disutils. --- sysconfig.py | 2 +- tests/test_build_ext.py | 56 ++++++++++++++++++++++++++++++++++++++++- util.py | 4 +-- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 33cc5a38a5..d206e0cdf9 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -389,7 +389,7 @@ def _init_posix(): cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': cur_target = cfg_target - os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = cfg_target elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 86568ebb7a..46dcb5ed5d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -3,12 +3,13 @@ import tempfile import shutil from StringIO import StringIO +import textwrap from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support -from distutils.errors import DistutilsSetupError +from distutils.errors import DistutilsSetupError, CompileError import unittest from test import test_support @@ -430,6 +431,59 @@ def test_build_ext_path_cross_platform(self): wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext) self.assertEqual(ext_path, wanted) + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target(self): + self._try_compile_deployment_target() + + orig_environ = os.environ + os.environ = orig_environ.copy() + self.addCleanup(setattr, os, 'environ', orig_environ) + + os.environ['MACOSX_DEPLOYMENT_TARGET']='10.1' + self._try_compile_deployment_target() + + + def _try_compile_deployment_target(self): + deptarget_c = os.path.join(self.tmp_dir, 'deptargetmodule.c') + + with open(deptarget_c, 'w') as fp: + fp.write(textwrap.dedent('''\ + #include + + int dummy; + + #if TARGET != MAC_OS_X_VERSION_MIN_REQUIRED + #error "Unexpected target" + #endif + + ''')) + + target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + target = tuple(map(int, target.split('.'))) + target = '%02d%01d0' % target + + deptarget_ext = Extension( + 'deptarget', + [deptarget_c], + extra_compile_args=['-DTARGET=%s'%(target,)], + ) + dist = Distribution({ + 'name': 'deptarget', + 'ext_modules': [deptarget_ext] + }) + dist.package_dir = self.tmp_dir + cmd = build_ext(dist) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + try: + old_stdout = sys.stdout + cmd.ensure_finalized() + cmd.run() + + except CompileError: + self.fail("Wrong deployment target during compilation") + def test_suite(): return unittest.makeSuite(BuildExtTestCase) diff --git a/util.py b/util.py index f06e4fdf88..6c49f0b1cb 100644 --- a/util.py +++ b/util.py @@ -97,9 +97,7 @@ def get_platform (): from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() - macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if 1: # Always calculate the release of the running machine, From bc38a51782ce2e7d290cc6afbb7a22a8fde5e109 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sun, 15 May 2011 16:46:11 +0200 Subject: [PATCH 3166/8469] Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is set in shell. Without this patch python will fail to start properly when the environment variable MACOSX_DEPLOYMENT_TARGET is set on MacOSX and has a value that is not compatible with the value during Python's build. This is caused by code in sysconfig that was only meant to be used in disutils. --- sysconfig.py | 2 +- tests/test_build_ext.py | 62 +++++++++++++++++++++++++++++++++++++++++ tests/test_util.py | 9 ++++-- util.py | 4 +-- 4 files changed, 71 insertions(+), 6 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 897b7d63d6..06bbc01cd6 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -428,7 +428,7 @@ def _init_posix(): cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': cur_target = cfg_target - os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = cfg_target elif [int(x) for x in cfg_target.split('.')] > [int(x) for x in cur_target.split('.')]: my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index dcba75f703..0aa99babee 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -2,6 +2,7 @@ import os import shutil from io import StringIO +import textwrap from distutils.core import Distribution from distutils.command.build_ext import build_ext @@ -419,6 +420,67 @@ def test_ext_fullpath(self): wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEqual(wanted, path) + + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target(self): + self._try_compile_deployment_target() + + orig_environ = os.environ + os.environ = orig_environ.copy() + self.addCleanup(setattr, os, 'environ', orig_environ) + + os.environ['MACOSX_DEPLOYMENT_TARGET']='10.1' + self._try_compile_deployment_target() + + + def _try_compile_deployment_target(self): + deptarget_c = os.path.join(self.tmp_dir, 'deptargetmodule.c') + + with open(deptarget_c, 'w') as fp: + fp.write(textwrap.dedent('''\ + #include + + int dummy; + + #if TARGET != MAC_OS_X_VERSION_MIN_REQUIRED + #error "Unexpected target" + #endif + + ''')) + + target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + target = tuple(map(int, target.split('.'))) + target = '%02d%01d0' % target + + deptarget_ext = Extension( + 'deptarget', + [deptarget_c], + extra_compile_args=['-DTARGET=%s'%(target,)], + ) + dist = Distribution({ + 'name': 'deptarget', + 'ext_modules': [deptarget_ext] + }) + dist.package_dir = self.tmp_dir + cmd = build_ext(dist) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + try: + old_stdout = sys.stdout + if not support.verbose: + # silence compiler output + sys.stdout = StringIO() + try: + cmd.ensure_finalized() + cmd.run() + finally: + sys.stdout = old_stdout + + except CompileError: + self.fail("Wrong deployment target during compilation") + + def test_suite(): src = _get_source_filename() if not os.path.exists(src): diff --git a/tests/test_util.py b/tests/test_util.py index 8ff5ae2085..1a06d4c4a1 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -92,7 +92,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' + get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' '-fwrapv -O3 -Wall -Wstrict-prototypes') @@ -105,7 +105,7 @@ def test_get_platform(self): sys.maxsize = cursize # macbook with fat binaries (fat, universal or fat64) - os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' + get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -113,6 +113,10 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-fat') + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.1' + self.assertEqual(get_platform(), 'macosx-10.4-fat') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -147,6 +151,7 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' diff --git a/util.py b/util.py index ce3cd6ca33..d6f89d65e5 100644 --- a/util.py +++ b/util.py @@ -96,9 +96,7 @@ def get_platform (): from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() - macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') - if not macver: - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if 1: # Always calculate the release of the running machine, From 47892871bc741f9c21e2cdec4384b5aec2f2bb1a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 15 May 2011 17:52:42 +0200 Subject: [PATCH 3167/8469] Bump to 3.2.1rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 17c89ee82e..70ab7dbf2b 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.1b1" +__version__ = "3.2.1rc1" #--end constants-- From f679304a95d0b377fd069c56fc975a82da9ee2ca Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 16 May 2011 14:22:31 +0200 Subject: [PATCH 3168/8469] Tolerate responses with multiple Content-Length headers - fixes #196 --HG-- branch : distribute extra : rebase_source : b0f0f73fd59017dd9a9bb6e58b2a1fd9e5773dd2 --- setuptools/package_index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 6d4047af61..0230497d4d 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -579,7 +579,9 @@ def _download_to(self, url, filename): bs = self.dl_blocksize size = -1 if "content-length" in headers: - size = int(headers["Content-Length"]) + # Some servers return multiple Content-Length headers :( + content_length = headers.getheaders("Content-Length")[0] + size = int(content_length) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: From 44c1998e667e3ccd2f793e29c6bac3806a08e1ee Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 16 May 2011 18:02:09 +0200 Subject: [PATCH 3169/8469] Fix a typo in documentation. --HG-- branch : distribute extra : rebase_source : 871f62d8e38382e2b75d26ce80085133bc0c1153 --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index da159bfe54..4105dc2e41 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2519,7 +2519,7 @@ a non-None value. Here's an example validation function:: Your function should accept three arguments: the ``Distribution`` object, the attribute name, and the attribute value. It should raise a -``DistutilsSetupError`` (from the ``distutils.error`` module) if the argument +``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument is invalid. Remember, your function will only be called with non-None values, and the default value of arguments defined this way is always None. So, your commands should always be prepared for the possibility that the attribute will From 606015e88f41070ffb182dfcc57926a858dd3358 Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Tue, 17 May 2011 08:12:10 +0200 Subject: [PATCH 3170/8469] Don't try to import the parent of a namespace package in declare_namespace -- fixes #204 --HG-- branch : distribute extra : rebase_source : 1644e937b2d0b2fae58e27740d0fddfe082586cd --- pkg_resources.py | 11 ++++++----- setuptools/tests/test_resources.py | 28 +++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 30dbc18812..5eb19df357 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1773,11 +1773,12 @@ def declare_namespace(packageName): if '.' in packageName: parent = '.'.join(packageName.split('.')[:-1]) declare_namespace(parent) - __import__(parent) - try: - path = sys.modules[parent].__path__ - except AttributeError: - raise TypeError("Not a package:", parent) + if parent not in _namespace_packages: + __import__(parent) + try: + path = sys.modules[parent].__path__ + except AttributeError: + raise TypeError("Not a package:", parent) # Track what packages are namespaces, so when new path items are added, # they can be updated diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 883cfad19f..e02bd8d544 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -3,7 +3,7 @@ # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh -import os, pkg_resources, sys, StringIO +import os, pkg_resources, sys, StringIO, tempfile, shutil try: frozenset except NameError: from sets import ImmutableSet as frozenset @@ -563,3 +563,29 @@ def test_get_script_header_jython_workaround(self): sys.platform = platform sys.stdout = stdout + + + +class NamespaceTests(TestCase): + + def setUp(self): + self._ns_pkgs = pkg_resources._namespace_packages.copy() + self._tmpdir = tempfile.mkdtemp(prefix="tests-distribute-") + sys.path.append(self._tmpdir) + + def tearDown(self): + shutil.rmtree(self._tmpdir) + pkg_resources._namespace_packages = self._ns_pkgs.copy() + sys.path.remove(self._tmpdir) + + def test_two_levels_deep(self): + os.makedirs(os.path.join(self._tmpdir, "pkg1", "pkg2")) + declare_namespace("pkg1") + self.assertTrue("pkg1" in pkg_resources._namespace_packages.keys()) + try: + declare_namespace("pkg1.pkg2") + except ImportError, e: + self.fail("Distribute tried to import the parent namespace package") + self.assertTrue("pkg1.pkg2" in pkg_resources._namespace_packages.keys()) + self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) + From 09653b8554161ad38cf06341a4893c610da44f5a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 May 2011 15:18:36 +0200 Subject: [PATCH 3171/8469] Issue #10419, issue #6011: port 6ad356525381 fix from distutils to packaging build_scripts command of packaging now handles correctly non-ASCII path (path to the Python executable). Open and write the script in binary mode, but ensure that the shebang is decodable from UTF-8 and from the encoding of the script. --- command/build_scripts.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index a43a7c306a..31be7930d7 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -128,10 +128,9 @@ def copy_scripts(self): "The shebang ({!r}) is not decodable " "from the script encoding ({})" .format(shebang, encoding)) - outf = open(outfile, "wb") - outf.write(shebang) - outf.writelines(f.readlines()) - outf.close() + with open(outfile, "wb") as outf: + outf.write(shebang) + outf.writelines(f.readlines()) if f: f.close() else: From d71f44e082fb25025dd678e6440aad3e623dcb2e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 19 May 2011 19:56:12 +0200 Subject: [PATCH 3172/8469] Issue #12120, Issue #12119: tests were missing a sys.dont_write_bytecode check --- tests/test_build_py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index da3232cea8..00a57cc922 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -58,7 +58,8 @@ def test_package_data(self): pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) self.assertTrue("__init__.py" in files) - self.assertTrue("__init__.pyc" in files) + if not sys.dont_write_bytecode: + self.assertTrue("__init__.pyc" in files) self.assertTrue("README.txt" in files) def test_empty_package_dir (self): From d76ad0a7d55448992833c36ecbc1899ae0e17683 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Fri, 20 May 2011 10:14:01 +0200 Subject: [PATCH 3173/8469] save the working set state --HG-- branch : distribute extra : rebase_source : 001d8f0f0c467b664751fffc42b1b1c344654e93 --- pkg_resources.py | 56 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5eb19df357..d704aad5f0 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -52,9 +52,41 @@ def _bypass_ensure_directory(name, mode=0777): mkdir(dirname, mode) +_state_vars = {} +def _declare_state(vartype, **kw): + g = globals() + for name, val in kw.iteritems(): + g[name] = val + _state_vars[name] = vartype + +def __getstate__(): + state = {} + g = globals() + for k, v in _state_vars.iteritems(): + state[k] = g['_sget_'+v](g[k]) + return state + +def __setstate__(state): + g = globals() + for k, v in state.iteritems(): + g['_sset_'+_state_vars[k]](k, g[k], v) + return state + +def _sget_dict(val): + return val.copy() + +def _sset_dict(key, ob, state): + ob.clear() + ob.update(state) + +def _sget_object(val): + return val.__getstate__() +def _sset_object(key, ob, state): + ob.__setstate__(state) +_sget_none = _sset_none = lambda *args: None @@ -672,12 +704,14 @@ def _added_new(self, dist): for callback in self.callbacks: callback(dist) + def __getstate__(self): + return (self.entries[:], self.entry_keys.copy(), self.by_key.copy(), + self.callbacks[:]) - - - - - + def __setstate__(self, (entries, keys, by_key, callbacks)): + self.entries = entries[:] + self.by_key = by_key.copy() + self.callbacks = callbacks[:] @@ -1638,7 +1672,7 @@ def get_importer(path_item): -_distribution_finders = {} +_declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items @@ -1720,8 +1754,9 @@ def find_on_path(importer, path_item, only=False): break register_finder(ImpWrapper,find_on_path) -_namespace_handlers = {} -_namespace_packages = {} +_declare_state('dict', _namespace_handlers={}) +_declare_state('dict', _namespace_packages={}) + def register_namespace_handler(importer_type, namespace_handler): """Register `namespace_handler` to declare namespace packages @@ -2651,7 +2686,7 @@ def _mkstemp(*args,**kw): os.open = old_open # and then put it back -# Set up global resource manager +# Set up global resource manager (deliberately not state-saved) _manager = ResourceManager() def _initialize(g): for name in dir(_manager): @@ -2660,7 +2695,8 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -working_set = WorkingSet() +_declare_state('object', working_set = WorkingSet()) + try: # Does the main program list any requirements? from __main__ import __requires__ From 38ac54038c96d339f55a66af6ad8da20320ff411 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Fri, 20 May 2011 16:08:26 -0400 Subject: [PATCH 3174/8469] Adds some missing bits to the sandbox fix--need to actually save/restore the pkg_resources state. --HG-- branch : distribute extra : rebase_source : 961ca56f30a6aabb5d24eff3cabb527d1be93ae4 --- pkg_resources.py | 1 + setuptools/sandbox.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index d704aad5f0..636d6ff997 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -710,6 +710,7 @@ def __getstate__(self): def __setstate__(self, (entries, keys, by_key, callbacks)): self.entries = entries[:] + self.entry_keys = keys.copy() self.by_key = by_key.copy() self.callbacks = callbacks[:] diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index a06d44837c..8e0c09b5ea 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,4 +1,4 @@ -import os, sys, __builtin__, tempfile, operator +import os, sys, __builtin__, tempfile, operator, pkg_resources _os = sys.modules[os.name] try: _file = file @@ -19,6 +19,7 @@ def run_setup(setup_script, args): if not os.path.isdir(temp_dir): os.makedirs(temp_dir) save_tmp = tempfile.tempdir save_modules = sys.modules.copy() + pr_state = pkg_resources.__getstate__() try: tempfile.tempdir = temp_dir os.chdir(setup_dir) @@ -36,6 +37,7 @@ def run_setup(setup_script, args): raise # Normal exit, just return finally: + pkg_resources.__setstate__(pr_state) sys.modules.update(save_modules) for key in list(sys.modules): if key not in save_modules: del sys.modules[key] From 2c6268e3d2cddb476763b780ffaaba62a154a38d Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sun, 22 May 2011 22:09:55 +0200 Subject: [PATCH 3175/8469] Issue 12132 - skip the test_buil_ext test if the xx module is not found --- tests/test_build_ext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 0aa99babee..a5b9700fe6 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -35,7 +35,9 @@ def setUp(self): self.tmp_dir = self.mkdtemp() self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) - shutil.copy(_get_source_filename(), self.tmp_dir) + filename = _get_source_filename() + if os.path.exists(filename): + shutil.copy(filename, self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -65,6 +67,8 @@ def _fixup_command(self, cmd): def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') + if not os.path.exists(xx_c): + return xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir From d47eed43b85912d5e9443b6cc5514913946075cd Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 22 May 2011 23:47:14 +0200 Subject: [PATCH 3176/8469] Support DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment variable to allow to disable installation of easy_install-${version} script. --HG-- branch : distribute extra : rebase_source : 9a278ec5528955480faee8f9192295b3b8e77b5b --- CHANGES.txt | 2 ++ setup.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 542424d18f..55662218b4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.17 ------ +* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment + variable to allow to disable installation of easy_install-${version} script. * Support Python >=3.1.4 and >=3.2.1. ------ diff --git a/setup.py b/setup.py index f2a3a6d9e8..21db64c314 100755 --- a/setup.py +++ b/setup.py @@ -45,6 +45,10 @@ scripts = [] +console_scripts = ["easy_install = setuptools.command.easy_install:main"] +if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: + console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) + # specific command that is used to generate windows .exe files class build_py(_build_py): def build_package_data(self): @@ -182,11 +186,7 @@ def _being_installed(): "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": [ - "easy_install = setuptools.command.easy_install:main", - "easy_install-%s = setuptools.command.easy_install:main" - % sys.version[:3] - ], + "console_scripts": console_scripts, "setuptools.file_finders": ["svn_cvs = setuptools.command.sdist:_default_revctrl"], From 6ad276bf9c860d9d62af0ec45c537cef03b3fc93 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Mon, 23 May 2011 10:52:19 -0400 Subject: [PATCH 3177/8469] setting to_scan to [] instead of None ensures (somewhat confusingly) that find_links are used, when available, to install each dist listed in setup_requires --HG-- branch : distribute extra : rebase_source : 4efd4ba05e527df60a33c55da30c19586a9cecdb --- setuptools/dist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index fd4ca66b93..0ad18122cf 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -266,6 +266,7 @@ def fetch_build_egg(self, req): """Fetch an egg needed for building""" try: cmd = self._egg_fetcher + cmd.package_index.to_scan = [] except AttributeError: from setuptools.command.easy_install import easy_install dist = self.__class__({'script_args':['easy_install']}) From d9b753aa56fa9bd0b9f6d9aa0d7ea32a5cdbc750 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 23 May 2011 15:22:56 -0400 Subject: [PATCH 3178/8469] Replay changeset 70238:03e488b5c009 from fubar branch. Original commit message: Reconcile with the 2.6svn branch. The 2.6.7 release will be made from Subversion, but there were differences, so this brings them in sync. These changes should *not* propagate to any newer versions. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 90f96feae1..6f4c021c62 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.6" +__version__ = "2.6.7rc1" #--end constants-- From 744a4d498494ca6760eae00670adf90c777e32e5 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 23 May 2011 15:26:11 -0400 Subject: [PATCH 3179/8469] Replay changeset 70248:c714e2f92f63 from fubar branch. Original commit message: Cross-port changes for 2.6.7rc2 from the Subversion branch. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6f4c021c62..b2a208201c 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.7rc1" +__version__ = "2.6.7rc2" #--end constants-- From 2c7c3ba77385bd56ed6f8f59abdeff78cca3fe8a Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Thu, 26 May 2011 10:01:41 +0200 Subject: [PATCH 3180/8469] make isntallation instructions from "Make the transition today" image copy&pastable --HG-- branch : distribute extra : rebase_source : 27fe3c391ba104b4a98c1836a92af608ef3cc0df --- docs/index.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/index.txt b/docs/index.txt index fa87ac36b1..5f3b945b20 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -28,3 +28,9 @@ Documentation content: .. image:: http://python-distribute.org/pip_distribute.png Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 + +Copy & paste:: + + curl -O http://python-distribute.org/distribute_setup.py + python distribute_setup.py + easy_install pip \ No newline at end of file From d715e5ae9aeabfec93c9f4478f9933f9b991b06a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 26 May 2011 12:12:42 +0200 Subject: [PATCH 3181/8469] skipping a tets if in virtualenv --HG-- branch : distribute extra : rebase_source : c0928a6dc8eaa695a8abedd25c9defb0561145a3 --- setuptools/tests/test_develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index a567dd5a74..5576d5e5f2 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -43,7 +43,7 @@ def tearDown(self): site.USER_SITE = self.old_site def test_develop(self): - if sys.version < "2.6": + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return dist = Distribution() dist.script_name = 'setup.py' From ce2661f4246098d8d1dbc3336b8cf0e58f514eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 28 May 2011 23:21:19 +0200 Subject: [PATCH 3182/8469] Fix test_distutils when sys.dont_write_bytecode is true (#9831). The tests now pass all combinations of -O/-OO and -B. See also #7071 and #6292 for previous variations on the same theme. --- tests/test_build_py.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 937fa0ce90..6c6ec208aa 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -17,7 +17,7 @@ class BuildPyTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def _setup_package_data(self): + def test_package_data(self): sources = self.mkdtemp() f = open(os.path.join(sources, "__init__.py"), "w") try: @@ -57,20 +57,15 @@ def _setup_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - return files - - def test_package_data(self): - files = self._setup_package_data() - self.assertTrue("__init__.py" in files) - self.assertTrue("README.txt" in files) - - @unittest.skipIf(sys.flags.optimize >= 2, - "pyc files are not written with -O2 and above") - def test_package_data_pyc(self): - files = self._setup_package_data() - self.assertTrue("__init__.pyc" in files) - - def test_empty_package_dir (self): + self.assertIn("__init__.py", files) + self.assertIn("README.txt", files) + # XXX even with -O, distutils writes pyc, not pyo; bug? + if sys.dont_write_bytecode: + self.assertNotIn("__init__.pyc", files) + else: + self.assertIn("__init__.pyc", files) + + def test_empty_package_dir(self): # See SF 1668596/1720897. cwd = os.getcwd() @@ -118,7 +113,7 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + self.assertIn('byte-compiling is disabled', self.logs[0][1]) def test_suite(): return unittest.makeSuite(BuildPyTestCase) From b62fd2a2e3fed4d2ad97131f67cbc77c19246431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 28 May 2011 23:32:50 +0200 Subject: [PATCH 3183/8469] Fix test_build_py when sys.dont_write_bytecode is true (#9831). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests now pass all combinations of -O/-OO and -B. See also #7071 and #6292 for previous variations on the same theme. test_versionpredicate needs a skip when sys.flags.optimize is true, but I don’t know how to make that work with a DocTestSuite. --- tests/test_build_py.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index da3232cea8..4e46339b43 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -57,11 +57,15 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) - self.assertTrue("__init__.py" in files) - self.assertTrue("__init__.pyc" in files) - self.assertTrue("README.txt" in files) - - def test_empty_package_dir (self): + self.assertIn("__init__.py", files) + self.assertIn("README.txt", files) + # XXX even with -O, distutils writes pyc, not pyo; bug? + if sys.dont_write_bytecode: + self.assertNotIn("__init__.pyc", files) + else: + self.assertIn("__init__.pyc", files) + + def test_empty_package_dir(self): # See SF 1668596/1720897. cwd = os.getcwd() @@ -109,7 +113,7 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + self.assertIn('byte-compiling is disabled', self.logs[0][1]) def test_suite(): return unittest.makeSuite(BuildPyTestCase) From b93d39b5f98d32aea6a9dc32ba80f2822018b953 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 29 May 2011 16:06:00 -0500 Subject: [PATCH 3184/8469] bump to 3.1.4rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6f55f016a2..5f8425fb1d 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.3" +__version__ = "3.1.4rc1" #--end constants-- From 8dff8ac3dff450113681b7510636be1c8e9d0270 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 29 May 2011 16:50:27 -0500 Subject: [PATCH 3185/8469] bump to 2.7.2rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a82d4cb589..e9fc2d6c45 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.1" +__version__ = "2.7.2rc1" #--end constants-- From d80cea8774172de2c584d27aab700a7dfe6ffdbd Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 17:55:38 +0200 Subject: [PATCH 3186/8469] Updated CHANGES.txt --HG-- branch : distribute extra : rebase_source : ad6afd0836e49aae866d90c1700afe13e1018c63 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 55662218b4..a403e39f7e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,11 @@ CHANGES * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment variable to allow to disable installation of easy_install-${version} script. * Support Python >=3.1.4 and >=3.2.1. +* Issue 204: Don't try to import the parent of a namespace package in + declare_namespace +* Issue 196: Tolerate responses with multiple Content-Length headers +* Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires + problems. ------ 0.6.16 From 9cb687060e6c5b0dac3c72b355e979fbdb9982ef Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 17:55:43 +0200 Subject: [PATCH 3187/8469] Added tag 0.6.17 for changeset 9c40f23d0bda --HG-- branch : distribute extra : rebase_source : aa3210e0b90b00f293137efd8b1a938cc0bf1935 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bf64adc605..2c81ae6b12 100644 --- a/.hgtags +++ b/.hgtags @@ -19,3 +19,4 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 2b9d9977ea75b8eb3766bab808ef31f192d2b1bc 0.6.14 51a9d1a1f31a4be3107d06cf088aff8e182dc633 0.6.15 3f1ff138e947bfc1c9bcfe0037030b7bfb4ab3a5 0.6.16 +9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 From 4a8759265e61381d3c7d6a9df186c0f445fa793e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 17:57:31 +0200 Subject: [PATCH 3188/8469] Added tag 0.6.17 for changeset 4bbc01e4709e --HG-- branch : distribute extra : rebase_source : 661dc79b27aeffa34c8350d219c71fc0f5a7ad98 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 2c81ae6b12..ca83854ead 100644 --- a/.hgtags +++ b/.hgtags @@ -20,3 +20,5 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 51a9d1a1f31a4be3107d06cf088aff8e182dc633 0.6.15 3f1ff138e947bfc1c9bcfe0037030b7bfb4ab3a5 0.6.16 9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 +9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 +4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 From 43c96023483bb0f15a764b96c5fb33146ec3ace2 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 17:57:54 +0200 Subject: [PATCH 3189/8469] update the version in missing place --HG-- branch : distribute extra : rebase_source : f42bd6c515d6085277c1d6a1052fa58b201e4f65 --- README.txt | 6 +++--- release.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 6daeab03c9..91a60321d7 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.15.tar.gz - $ tar -xzvf distribute-0.6.15.tar.gz - $ cd distribute-0.6.15 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.17.tar.gz + $ tar -xzvf distribute-0.6.17.tar.gz + $ cd distribute-0.6.17 $ python setup.py install --------------------------- diff --git a/release.sh b/release.sh index 0281e3528d..ee0d8589c1 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.15" +export VERSION="0.6.17" # tagging hg tag $VERSION From 91479552a228a08d9e44ba4e3b62c82926bade33 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 17:57:56 +0200 Subject: [PATCH 3190/8469] Added tag 0.6.17 for changeset 0502d5117d83 --HG-- branch : distribute extra : rebase_source : a99a5fea3008fbdb186bf99a1015a36b64dad26c --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index ca83854ead..7221b83f73 100644 --- a/.hgtags +++ b/.hgtags @@ -22,3 +22,5 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 +4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 +0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 From db34965623975ce24d9193dad5592924107f980d Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 18:00:44 +0200 Subject: [PATCH 3191/8469] starting 0.6.18 --HG-- branch : distribute extra : rebase_source : 5d775d7c1cae24d5a671bd92594981b2979d40e7 --- README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 2 +- release.sh | 2 +- setup.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 91a60321d7..2eefab4c40 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.17.tar.gz - $ tar -xzvf distribute-0.6.17.tar.gz - $ cd distribute-0.6.17 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.18.tar.gz + $ tar -xzvf distribute-0.6.18.tar.gz + $ cd distribute-0.6.18 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9fd4175819..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/release.sh b/release.sh index ee0d8589c1..c757143714 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.17" +export VERSION="0.6.18" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 21db64c314..92838b9ad3 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.17" +VERSION = "0.6.18" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 0343339ddae02847a24ef3726eaf1df6789aa4a8 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 30 May 2011 18:01:28 +0200 Subject: [PATCH 3192/8469] starting 0.6.18 --HG-- branch : distribute extra : rebase_source : ff71015f3fe27b69e34ec10d936ee605556c7e33 --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 9f441067b1..33dfd81d1b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.17" +DEFAULT_VERSION = "0.6.18" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" From c7470ef715ed90469e7ee8f215d5307834479d8c Mon Sep 17 00:00:00 2001 From: Aurelien Bompard Date: Wed, 1 Jun 2011 09:18:22 +0200 Subject: [PATCH 3193/8469] Update the child's __path__ in declare_namespace, even if the parent is already a namespace package -- fixes #204 --HG-- branch : distribute extra : rebase_source : 48e1ed2309ae053b8987a664231e72c35a0bbb40 --- pkg_resources.py | 8 +++---- setuptools/tests/test_resources.py | 37 ++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 636d6ff997..52d92669b3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1811,10 +1811,10 @@ def declare_namespace(packageName): declare_namespace(parent) if parent not in _namespace_packages: __import__(parent) - try: - path = sys.modules[parent].__path__ - except AttributeError: - raise TypeError("Not a package:", parent) + try: + path = sys.modules[parent].__path__ + except AttributeError: + raise TypeError("Not a package:", parent) # Track what packages are namespaces, so when new path items are added, # they can be updated diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index e02bd8d544..c10ca21083 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -571,21 +571,48 @@ class NamespaceTests(TestCase): def setUp(self): self._ns_pkgs = pkg_resources._namespace_packages.copy() self._tmpdir = tempfile.mkdtemp(prefix="tests-distribute-") - sys.path.append(self._tmpdir) + os.makedirs(os.path.join(self._tmpdir, "site-pkgs")) + self._prev_sys_path = sys.path[:] + sys.path.append(os.path.join(self._tmpdir, "site-pkgs")) def tearDown(self): shutil.rmtree(self._tmpdir) pkg_resources._namespace_packages = self._ns_pkgs.copy() - sys.path.remove(self._tmpdir) + sys.path = self._prev_sys_path[:] def test_two_levels_deep(self): - os.makedirs(os.path.join(self._tmpdir, "pkg1", "pkg2")) - declare_namespace("pkg1") + """ + Test nested namespace packages + Create namespace packages in the following tree : + site-packages-1/pkg1/pkg2 + site-packages-2/pkg1/pkg2 + Check both are in the _namespace_packages dict and that their __path__ + is correct + """ + sys.path.append(os.path.join(self._tmpdir, "site-pkgs2")) + os.makedirs(os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2")) + os.makedirs(os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2")) + ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" + for site in ["site-pkgs", "site-pkgs2"]: + pkg1_init = open(os.path.join(self._tmpdir, site, + "pkg1", "__init__.py"), "w") + pkg1_init.write(ns_str) + pkg1_init.close() + pkg2_init = open(os.path.join(self._tmpdir, site, + "pkg1", "pkg2", "__init__.py"), "w") + pkg2_init.write(ns_str) + pkg2_init.close() + import pkg1 self.assertTrue("pkg1" in pkg_resources._namespace_packages.keys()) try: - declare_namespace("pkg1.pkg2") + import pkg1.pkg2 except ImportError, e: self.fail("Distribute tried to import the parent namespace package") + # check the _namespace_packages dict self.assertTrue("pkg1.pkg2" in pkg_resources._namespace_packages.keys()) self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) + # check the __path__ attribute contains both paths + self.assertEqual(pkg1.pkg2.__path__, [ + os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"), + os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2") ]) From 5e8a4ecafec20d693b3a1ba72747c2e1765242a8 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 1 Jun 2011 12:19:31 +0200 Subject: [PATCH 3194/8469] added a changeset entry --HG-- branch : distribute extra : rebase_source : 134389daa797968df033c2e7bfebc54c1b8b8d2c --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a403e39f7e..3fa013a829 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.18 +------ + +* Issue 210: Fixed a regression introduced by Issue 204 fix. + ------ 0.6.17 ------ From f21d251e436fb99f1a1b935d42f7b21053b25682 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 1 Jun 2011 12:19:36 +0200 Subject: [PATCH 3195/8469] Added tag 0.6.18 for changeset 74108d7f0734 --HG-- branch : distribute extra : rebase_source : 850911b0915d3c9bd7d7c23373d7c7807e3971b4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7221b83f73..74203b79fc 100644 --- a/.hgtags +++ b/.hgtags @@ -24,3 +24,4 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 +74108d7f07343556a8db94e8122221a43243f586 0.6.18 From 8d8653a2fb38196fbf1d4dd2bc92ef0baad9c6f2 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Wed, 1 Jun 2011 12:24:32 +0200 Subject: [PATCH 3196/8469] starting 0.6.19 --HG-- branch : distribute extra : rebase_source : e4d2913a33c81962f624d9a9c0803e622e8bfd62 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3fa013a829..d085b75479 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.19 +------ + +* ADD STUFF HERE + ------ 0.6.18 ------ diff --git a/README.txt b/README.txt index 2eefab4c40..97e9660d5c 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.18.tar.gz - $ tar -xzvf distribute-0.6.18.tar.gz - $ cd distribute-0.6.18 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.19.tar.gz + $ tar -xzvf distribute-0.6.19.tar.gz + $ cd distribute-0.6.19 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 33dfd81d1b..bbb6f3c25e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.18" +DEFAULT_VERSION = "0.6.19" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/release.sh b/release.sh index c757143714..268f4ba738 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.18" +export VERSION="0.6.19" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 92838b9ad3..44f773af2d 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.18" +VERSION = "0.6.19" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From b672805ffe0c8ef4be0acc0ce05d5273f25d6533 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 2 Jun 2011 02:10:13 +0200 Subject: [PATCH 3197/8469] make sure we don't use getheaders(). get() works for all py versions - fixes #206 --HG-- branch : distribute extra : rebase_source : c9e414a0642dd5b2222dd3fc4aa1b11a442e48a1 --- CHANGES.txt | 3 ++- distribute.egg-info/entry_points.txt | 2 +- setuptools/package_index.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d085b75479..5f92af2d8c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ CHANGES 0.6.19 ------ -* ADD STUFF HERE +* Issue 206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' + ------ 0.6.18 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..9fd4175819 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0230497d4d..f064b110d5 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -580,7 +580,7 @@ def _download_to(self, url, filename): size = -1 if "content-length" in headers: # Some servers return multiple Content-Length headers :( - content_length = headers.getheaders("Content-Length")[0] + content_length = headers.get("Content-Length") size = int(content_length) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') From 9021d7ff16d8c567c44610c2302982809e9aa30e Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 2 Jun 2011 02:10:19 +0200 Subject: [PATCH 3198/8469] Added tag 0.6.19 for changeset 611910892a04 --HG-- branch : distribute extra : rebase_source : 91a0b03342dbd0eb6275bccc3d558979231036ae --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 74203b79fc..8d467fbc47 100644 --- a/.hgtags +++ b/.hgtags @@ -25,3 +25,4 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 74108d7f07343556a8db94e8122221a43243f586 0.6.18 +611910892a0421633d72677979f94a25ef590d54 0.6.19 From 323679aa633452abb46f1618c7bc8bfa3121ef2a Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 2 Jun 2011 02:10:28 +0200 Subject: [PATCH 3199/8469] bumped revision --HG-- branch : distribute extra : rebase_source : c409a9370e8edb15093c2fecdb9e59ce7fb74f54 --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9fd4175819..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From e46e9743081ec738c970931c8dbfa3de8a8ebff7 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 2 Jun 2011 02:12:54 +0200 Subject: [PATCH 3200/8469] starting 0.6.20 --HG-- branch : distribute extra : rebase_source : f5cf2fdcae5a8895f0218fddd57e0496d302d919 --- CHANGES.txt | 7 ++++++- README.txt | 6 +++--- distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5f92af2d8c..aa3eb476fe 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,13 +2,18 @@ CHANGES ======= +------ +0.6.20 +------ + +* ADD STUFF HERE + ------ 0.6.19 ------ * Issue 206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' - ------ 0.6.18 ------ diff --git a/README.txt b/README.txt index 97e9660d5c..f562d628bb 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.19.tar.gz - $ tar -xzvf distribute-0.6.19.tar.gz - $ cd distribute-0.6.19 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.20.tar.gz + $ tar -xzvf distribute-0.6.20.tar.gz + $ cd distribute-0.6.20 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index bbb6f3c25e..22c2d65f19 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.19" +DEFAULT_VERSION = "0.6.20" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/release.sh b/release.sh index 268f4ba738..7f791691cf 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.19" +export VERSION="0.6.20" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 44f773af2d..bfb6240646 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.19" +VERSION = "0.6.20" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 9b7671822624669b22aa7574daa190b990c6906a Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 3 Jun 2011 20:02:47 -0400 Subject: [PATCH 3201/8469] Replay svn r88850. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b2a208201c..beb65bb568 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.7rc2" +__version__ = "2.6.7" #--end constants-- From e3ba28ec2b8a5d8d5585de892f9e42f7021b436c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 4 Jun 2011 20:45:33 +0200 Subject: [PATCH 3202/8469] Remove unnecessary executable bit on one distutils file --- tests/Setup.sample | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/Setup.sample diff --git a/tests/Setup.sample b/tests/Setup.sample old mode 100755 new mode 100644 From 1151498802d17fe753a722f275bbf67485d2f637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 4 Jun 2011 20:47:26 +0200 Subject: [PATCH 3203/8469] Remove unneeded executable bit on two distutils files --- tests/Setup.sample | 0 tests/test_extension.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/Setup.sample mode change 100755 => 100644 tests/test_extension.py diff --git a/tests/Setup.sample b/tests/Setup.sample old mode 100755 new mode 100644 diff --git a/tests/test_extension.py b/tests/test_extension.py old mode 100755 new mode 100644 From 38896a09fc855ee5e5fbd5ad47e7d502546cf251 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jun 2011 18:27:42 -0400 Subject: [PATCH 3204/8469] Updated documentation to reflect implementation --HG-- branch : distribute extra : rebase_source : e261625bedbacd836d2b8343f1ff0ff604bb8cfb --- docs/python3.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/python3.txt b/docs/python3.txt index d5c3da67f0..82d8e4e243 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -81,8 +81,10 @@ Advanced features ================= If certain fixers are to be suppressed, this again can be overridden with the -list ``setuptools.commands.build_py.build_py.fixers``, which then contains the -list of all fixer class names. +list ``setuptools.command.build_py.build_py.fixer_names``, which at some +point contains the list of all fixer class names. For an example of how this +can be done, see the `jaraco.util `_ +project. If you don't want to run the 2to3 conversion on the doctests in Python files, you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. From e63f3e7d864b26529d6b197e053b4084be20decf Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 8 Jun 2011 15:47:30 +0200 Subject: [PATCH 3205/8469] Fix a typo in documentation (issue #213). --HG-- branch : distribute extra : rebase_source : 66aec4b4380512e96e64285421eae404013964e1 --- docs/python3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/python3.txt b/docs/python3.txt index 82d8e4e243..43845f609d 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -66,7 +66,7 @@ and no conversion will happen. In general, if code doesn't seem to be converted, deleting the build directory and trying again is a good saferguard against the build directory getting -"out of sync" with teh source directory. +"out of sync" with the source directory. Distributing Python 3 modules ============================= From e7cc03bf1da67e855bed7ac89acb895a51bfeb9a Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 11 Jun 2011 09:42:44 -0500 Subject: [PATCH 3206/8469] bump to 2.7.2 final --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e9fc2d6c45..a849f1a9cd 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.2rc1" +__version__ = "2.7.2" #--end constants-- From edb4ad2deb371136eba9ab0d9c27687c3aa5df23 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 11 Jun 2011 09:58:58 -0500 Subject: [PATCH 3207/8469] bump to 3.1.4 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 5f8425fb1d..a3e2993648 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.4rc1" +__version__ = "3.1.4" #--end constants-- From d6e07e40b2eb968c89070316983beed527c2b111 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 00:39:19 -0700 Subject: [PATCH 3208/8469] Issue #12141: Install a copy of template C module file so that test_build_ext of test_distutils is no longer silently skipped when run outside of a build directory. --- tests/test_build_ext.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 46dcb5ed5d..44fc980a30 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -19,6 +19,11 @@ ALREADY_TESTED = False def _get_source_filename(): + # use installed copy if available + tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') + if os.path.exists(tests_f): + return tests_f + # otherwise try using copy from build directory srcdir = sysconfig.get_config_var('srcdir') if srcdir is None: return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') From 32d401bb9f75df6acc4dd67a361d5b3de036f98a Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 00:42:50 -0700 Subject: [PATCH 3209/8469] Issue #12141: Install a copy of template C module file so that test_build_ext of test_distutils is no longer silently skipped when run outside of a build directory. --- tests/test_build_ext.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 0aa99babee..d924f585ba 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -22,6 +22,11 @@ ALREADY_TESTED = False def _get_source_filename(): + # use installed copy if available + tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') + if os.path.exists(tests_f): + return tests_f + # otherwise try using copy from build directory srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') @@ -35,7 +40,9 @@ def setUp(self): self.tmp_dir = self.mkdtemp() self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) - shutil.copy(_get_source_filename(), self.tmp_dir) + filename = _get_source_filename() + if os.path.exists(filename): + shutil.copy(filename, self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -65,6 +72,8 @@ def _fixup_command(self, cmd): def test_build_ext(self): global ALREADY_TESTED xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') + if not os.path.exists(xx_c): + return xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir From 303c2b4c7af695706369e68cd6b32606ab5401d6 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 19:39:10 -0700 Subject: [PATCH 3210/8469] Issue #9516: Correct and expand OS X deployment target tests in distutils test_build_ext. --- tests/test_build_ext.py | 49 ++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 44fc980a30..ced1329efd 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -9,7 +9,8 @@ from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support -from distutils.errors import DistutilsSetupError, CompileError +from distutils.errors import (DistutilsSetupError, CompileError, + DistutilsPlatformError) import unittest from test import test_support @@ -437,18 +438,43 @@ def test_build_ext_path_cross_platform(self): self.assertEqual(ext_path, wanted) @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') - def test_deployment_target(self): - self._try_compile_deployment_target() + def test_deployment_target_default(self): + # Issue 9516: Test that, in the absence of the environment variable, + # an extension module is compiled with the same deployment target as + # the interpreter. + self._try_compile_deployment_target('==', None) + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target_too_low(self): + # Issue 9516: Test that an extension module is not allowed to be + # compiled with a deployment target less than that of the interpreter. + self.assertRaises(DistutilsPlatformError, + self._try_compile_deployment_target, '>', '10.1') + + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target_higher_ok(self): + # Issue 9516: Test that an extension module can be compiled with a + # deployment target higher than that of the interpreter: the ext + # module may depend on some newer OS feature. + deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + if deptarget: + # increment the minor version number (i.e. 10.6 -> 10.7) + deptarget = [int(x) for x in deptarget.split('.')] + deptarget[-1] += 1 + deptarget = '.'.join(str(i) for i in deptarget) + self._try_compile_deployment_target('<', deptarget) + + def _try_compile_deployment_target(self, operator, target): orig_environ = os.environ os.environ = orig_environ.copy() self.addCleanup(setattr, os, 'environ', orig_environ) - os.environ['MACOSX_DEPLOYMENT_TARGET']='10.1' - self._try_compile_deployment_target() - + if target is None: + if os.environ.get('MACOSX_DEPLOYMENT_TARGET'): + del os.environ['MACOSX_DEPLOYMENT_TARGET'] + else: + os.environ['MACOSX_DEPLOYMENT_TARGET'] = target - def _try_compile_deployment_target(self): deptarget_c = os.path.join(self.tmp_dir, 'deptargetmodule.c') with open(deptarget_c, 'w') as fp: @@ -457,16 +483,17 @@ def _try_compile_deployment_target(self): int dummy; - #if TARGET != MAC_OS_X_VERSION_MIN_REQUIRED + #if TARGET %s MAC_OS_X_VERSION_MIN_REQUIRED + #else #error "Unexpected target" - #endif + #endif - ''')) + ''' % operator)) + # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') target = tuple(map(int, target.split('.'))) target = '%02d%01d0' % target - deptarget_ext = Extension( 'deptarget', [deptarget_c], From d671b9c866f6f54493dfa07e5004a92b104b205d Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 19:40:39 -0700 Subject: [PATCH 3211/8469] Issue #9516: Change distutils to no longer globally attempt to check and set the MACOSX_DEPLOYMENT_TARGET env variable for the interpreter process on OS X. This could cause failures in non-distutils subprocesses and was unreliable since tests or user programs could modify the interpreter environment after distutils set it. Instead, have distutils set the the deployment target only in the environment of each build subprocess. Continue to use the previous algorithm for deriving the deployment target value: if MACOSX_DEPLOYMENT_TARGET is not set in the interpreter's env: use the interpreter build configure MACOSX_DEPLOYMENT_TARGET elif the MACOSX_DEPLOYMENT_TARGET env value >= configure value: use the env MACOSX_DEPLOYMENT_TARGET else: # env value less than interpreter build configure value raise exception This allows building extensions that can only run on newer versions of the OS than the version python was built for, for example with a python built for 10.3 or later and an extension that needs to be built for 10.5. --- spawn.py | 28 +++++++++++++++++++++++++++- sysconfig.py | 15 --------------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/spawn.py b/spawn.py index 5c014c4be2..7306099f6b 100644 --- a/spawn.py +++ b/spawn.py @@ -96,17 +96,43 @@ def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsExecError, \ "command '%s' failed with exit status %d" % (cmd[0], rc) +if sys.platform == 'darwin': + from distutils import sysconfig + _cfg_target = None + _cfg_target_split = None def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv + exec_args = [cmd[0], cmd] + if sys.platform == 'darwin': + global _cfg_target, _cfg_target_split + if _cfg_target is None: + _cfg_target = sysconfig.get_config_var( + 'MACOSX_DEPLOYMENT_TARGET') or '' + if _cfg_target: + _cfg_target_split = [int(x) for x in _cfg_target.split('.')] + if _cfg_target: + # ensure that the deployment target of build process is not less + # than that used when the interpreter was built. This ensures + # extension modules are built with correct compatibility values + cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target) + if _cfg_target_split > [int(x) for x in cur_target.split('.')]: + my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: ' + 'now "%s" but "%s" during configure' + % (cur_target, _cfg_target)) + raise DistutilsPlatformError(my_msg) + env = dict(os.environ, + MACOSX_DEPLOYMENT_TARGET=cur_target) + exec_fn = search_path and os.execvpe or os.execve + exec_args.append(env) pid = os.fork() if pid == 0: # in the child try: - exec_fn(cmd[0], cmd) + exec_fn(*exec_args) except OSError, e: sys.stderr.write("unable to execute %s: %s\n" % (cmd[0], e.strerror)) diff --git a/sysconfig.py b/sysconfig.py index d206e0cdf9..0d6d4c4fea 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -380,21 +380,6 @@ def _init_posix(): raise DistutilsPlatformError(my_msg) - # On MacOSX we need to check the setting of the environment variable - # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so - # it needs to be compatible. - # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: - cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] - cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') - if cur_target == '': - cur_target = cfg_target - os.environ['MACOSX_DEPLOYMENT_TARGET'] = cfg_target - elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): - my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' - % (cur_target, cfg_target)) - raise DistutilsPlatformError(my_msg) - # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. From 140120ec23e70358cb6dfeadf92b9aada4af835b Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 19:43:15 -0700 Subject: [PATCH 3212/8469] Issue #9516: Correct and expand OS X deployment target tests in distutils test_build_ext. --- tests/test_build_ext.py | 47 ++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index d924f585ba..0ce7f0f81c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -11,7 +11,8 @@ from distutils.tests.support import LoggingSilencer from distutils.extension import Extension from distutils.errors import ( - CompileError, DistutilsSetupError, UnknownFileError) + CompileError, DistutilsPlatformError, DistutilsSetupError, + UnknownFileError) import unittest from test import support @@ -431,18 +432,43 @@ def test_ext_fullpath(self): @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') - def test_deployment_target(self): - self._try_compile_deployment_target() + def test_deployment_target_default(self): + # Issue 9516: Test that, in the absence of the environment variable, + # an extension module is compiled with the same deployment target as + # the interpreter. + self._try_compile_deployment_target('==', None) + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target_too_low(self): + # Issue 9516: Test that an extension module is not allowed to be + # compiled with a deployment target less than that of the interpreter. + self.assertRaises(DistutilsPlatformError, + self._try_compile_deployment_target, '>', '10.1') + + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX') + def test_deployment_target_higher_ok(self): + # Issue 9516: Test that an extension module can be compiled with a + # deployment target higher than that of the interpreter: the ext + # module may depend on some newer OS feature. + deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + if deptarget: + # increment the minor version number (i.e. 10.6 -> 10.7) + deptarget = [int(x) for x in deptarget.split('.')] + deptarget[-1] += 1 + deptarget = '.'.join(str(i) for i in deptarget) + self._try_compile_deployment_target('<', deptarget) + + def _try_compile_deployment_target(self, operator, target): orig_environ = os.environ os.environ = orig_environ.copy() self.addCleanup(setattr, os, 'environ', orig_environ) - os.environ['MACOSX_DEPLOYMENT_TARGET']='10.1' - self._try_compile_deployment_target() - + if target is None: + if os.environ.get('MACOSX_DEPLOYMENT_TARGET'): + del os.environ['MACOSX_DEPLOYMENT_TARGET'] + else: + os.environ['MACOSX_DEPLOYMENT_TARGET'] = target - def _try_compile_deployment_target(self): deptarget_c = os.path.join(self.tmp_dir, 'deptargetmodule.c') with open(deptarget_c, 'w') as fp: @@ -451,16 +477,17 @@ def _try_compile_deployment_target(self): int dummy; - #if TARGET != MAC_OS_X_VERSION_MIN_REQUIRED + #if TARGET %s MAC_OS_X_VERSION_MIN_REQUIRED + #else #error "Unexpected target" #endif - ''')) + ''' % operator)) + # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') target = tuple(map(int, target.split('.'))) target = '%02d%01d0' % target - deptarget_ext = Extension( 'deptarget', [deptarget_c], From 40bee45e0bd8a042c3a8f893328f6a6a52698fdf Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 Jun 2011 19:44:24 -0700 Subject: [PATCH 3213/8469] Issue #9516: Change distutils to no longer globally attempt to check and set the MACOSX_DEPLOYMENT_TARGET env variable for the interpreter process on OS X. This could cause failures in non-distutils subprocesses and was unreliable since tests or user programs could modify the interpreter environment after distutils set it. Instead, have distutils set the the deployment target only in the environment of each build subprocess. Continue to use the previous algorithm for deriving the deployment target value: if MACOSX_DEPLOYMENT_TARGET is not set in the interpreter's env: use the interpreter build configure MACOSX_DEPLOYMENT_TARGET elif the MACOSX_DEPLOYMENT_TARGET env value >= configure value: use the env MACOSX_DEPLOYMENT_TARGET else: # env value less than interpreter build configure value raise exception This allows building extensions that can only run on newer versions of the OS than the version python was built for, for example with a python built for 10.3 or later and an extension that needs to be built for 10.5. --- spawn.py | 29 ++++++++++++++++++++++++++++- sysconfig.py | 15 --------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/spawn.py b/spawn.py index 8c476dc23f..2b62c968a4 100644 --- a/spawn.py +++ b/spawn.py @@ -96,15 +96,42 @@ def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsExecError( "command '%s' failed with exit status %d" % (cmd[0], rc)) +if sys.platform == 'darwin': + from distutils import sysconfig + _cfg_target = None + _cfg_target_split = None + def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return exec_fn = search_path and os.execvp or os.execv + exec_args = [cmd[0], cmd] + if sys.platform == 'darwin': + global _cfg_target, _cfg_target_split + if _cfg_target is None: + _cfg_target = sysconfig.get_config_var( + 'MACOSX_DEPLOYMENT_TARGET') or '' + if _cfg_target: + _cfg_target_split = [int(x) for x in _cfg_target.split('.')] + if _cfg_target: + # ensure that the deployment target of build process is not less + # than that used when the interpreter was built. This ensures + # extension modules are built with correct compatibility values + cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target) + if _cfg_target_split > [int(x) for x in cur_target.split('.')]: + my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: ' + 'now "%s" but "%s" during configure' + % (cur_target, _cfg_target)) + raise DistutilsPlatformError(my_msg) + env = dict(os.environ, + MACOSX_DEPLOYMENT_TARGET=cur_target) + exec_fn = search_path and os.execvpe or os.execve + exec_args.append(env) pid = os.fork() if pid == 0: # in the child try: - exec_fn(cmd[0], cmd) + exec_fn(*exec_args) except OSError as e: sys.stderr.write("unable to execute %s: %s\n" % (cmd[0], e.strerror)) diff --git a/sysconfig.py b/sysconfig.py index 06bbc01cd6..9d7d1902aa 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -419,21 +419,6 @@ def _init_posix(): raise DistutilsPlatformError(my_msg) - # On MacOSX we need to check the setting of the environment variable - # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so - # it needs to be compatible. - # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: - cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] - cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') - if cur_target == '': - cur_target = cfg_target - os.environ['MACOSX_DEPLOYMENT_TARGET'] = cfg_target - elif [int(x) for x in cfg_target.split('.')] > [int(x) for x in cur_target.split('.')]: - my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' - % (cur_target, cfg_target)) - raise DistutilsPlatformError(my_msg) - # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. From bf799fa9dfd51f6ff2bda9e768f4f4333d351f76 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 30 Jun 2011 15:40:22 +0200 Subject: [PATCH 3214/8469] Issue #12451: distutils now opens the setup script in binary mode to read the encoding cookie, instead of opening it in UTF-8. --- core.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core.py b/core.py index fd2a43d7d2..c0a04de3af 100644 --- a/core.py +++ b/core.py @@ -8,7 +8,8 @@ __revision__ = "$Id$" -import sys, os +import os +import sys from distutils.debug import DEBUG from distutils.errors import * @@ -215,11 +216,8 @@ def run_setup (script_name, script_args=None, stop_after="run"): sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args - f = open(script_name) - try: + with open(script_name, 'rb') as f: exec(f.read(), g, l) - finally: - f.close() finally: sys.argv = save_argv _setup_stop_after = None From f2b3625193af66b537f99fc0c7843b4051f1bd1b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 30 Jun 2011 23:25:47 +0200 Subject: [PATCH 3215/8469] Issue #12451: Add support.create_empty_file() We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle). --- tests/test_build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 4e46339b43..c7c36f3cc7 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -10,7 +10,7 @@ from distutils.errors import DistutilsFileError from distutils.tests import support -from test.support import run_unittest +from test.support import run_unittest, create_empty_file class BuildPyTestCase(support.TempdirManager, @@ -71,11 +71,11 @@ def test_empty_package_dir(self): # create the distribution files. sources = self.mkdtemp() - open(os.path.join(sources, "__init__.py"), "w").close() + create_empty_file(os.path.join(sources, "__init__.py")) testdir = os.path.join(sources, "doc") os.mkdir(testdir) - open(os.path.join(testdir, "testfile"), "w").close() + create_empty_file(os.path.join(testdir, "testfile")) os.chdir(sources) old_stdout = sys.stdout From 4758a6576c8847d6848ebe98f99f6526673f35b8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 3 Jul 2011 09:41:27 +0200 Subject: [PATCH 3216/8469] Bump to 3.2.1rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 70ab7dbf2b..2602c5074b 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.1rc1" +__version__ = "3.2.1rc2" #--end constants-- From 7d80bbfb319d76b2306d4193fdb082acd919927d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 9 Jul 2011 08:56:21 +0200 Subject: [PATCH 3217/8469] Bump version to 3.2.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2602c5074b..a470ade93e 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.1rc2" +__version__ = "3.2.1" #--end constants-- From b4aecb449c912f0b405c687c763b9976c4cd884d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2011 17:51:23 -0400 Subject: [PATCH 3218/8469] Fix issue where easy_install fails on Python 3 on windows installer. Fixes #212 --HG-- branch : distribute extra : rebase_source : 1920a8d261fa7918d9d3813a104cf2ed11878c7c --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/easy_install.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..9fd4175819 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 58e7ab3913..c1bae1c0b1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1425,7 +1425,16 @@ def extract_wininst_cfg(dist_filename): f.seek(prepended-(12+cfglen)) cfg = ConfigParser.RawConfigParser({'version':'','target_version':''}) try: - cfg.readfp(StringIO.StringIO(f.read(cfglen).split(chr(0),1)[0])) + part = f.read(cfglen) + # part is in bytes, but we need to read up to the first null + # byte. + null_byte = bytes([0]) if sys.version_info >= (2,6) else chr(0) + config, = part.split(null_byte, 1) + # Now the config is in bytes, but on Python 3, it must be + # unicode for the RawConfigParser, so decode it. Is this the + # right encoding? + config = config.decode('ascii') + cfg.readfp(StringIO.StringIO(config)) except ConfigParser.Error: return None if not cfg.has_section('metadata') or not cfg.has_section('Setup'): From 4320a750da7c64db5dd3c18714655f5673198b33 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Thu, 28 Jul 2011 22:32:49 +0800 Subject: [PATCH 3219/8469] Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. --- __init__.py | 2 -- archive_util.py | 2 -- bcppcompiler.py | 2 -- ccompiler.py | 2 -- cmd.py | 2 -- command/__init__.py | 2 -- command/bdist.py | 2 -- command/bdist_dumb.py | 2 -- command/bdist_rpm.py | 2 -- command/bdist_wininst.py | 2 -- command/build.py | 2 -- command/build_clib.py | 2 -- command/build_ext.py | 2 -- command/build_py.py | 2 -- command/build_scripts.py | 2 -- command/check.py | 2 -- command/clean.py | 2 -- command/config.py | 2 -- command/install.py | 2 -- command/install_data.py | 2 -- command/install_headers.py | 2 -- command/install_lib.py | 2 -- command/install_scripts.py | 2 -- command/register.py | 2 -- command/sdist.py | 2 -- core.py | 2 -- cygwinccompiler.py | 2 -- debug.py | 2 -- dep_util.py | 2 -- dir_util.py | 2 -- dist.py | 2 -- emxccompiler.py | 2 -- errors.py | 2 -- extension.py | 2 -- fancy_getopt.py | 2 -- file_util.py | 2 -- filelist.py | 2 -- msvc9compiler.py | 2 -- msvccompiler.py | 2 -- spawn.py | 2 -- sysconfig.py | 2 -- tests/test_archive_util.py | 2 -- text_file.py | 2 -- unixccompiler.py | 2 -- util.py | 2 -- 45 files changed, 90 deletions(-) diff --git a/__init__.py b/__init__.py index a470ade93e..c06002eab3 100644 --- a/__init__.py +++ b/__init__.py @@ -8,8 +8,6 @@ setup (...) """ -__revision__ = "$Id$" - # Distutils version # # Updated automatically by the Python release process. diff --git a/archive_util.py b/archive_util.py index c06eba351d..fcda08e20a 100644 --- a/archive_util.py +++ b/archive_util.py @@ -3,8 +3,6 @@ Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" -__revision__ = "$Id$" - import os from warnings import warn import sys diff --git a/bcppcompiler.py b/bcppcompiler.py index c5e5cd2571..9f4c432d90 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -11,8 +11,6 @@ # someone should sit down and factor out the common code as # WindowsCCompiler! --GPW -__revision__ = "$Id$" - import os from distutils.errors import \ diff --git a/ccompiler.py b/ccompiler.py index 291c008f20..c795c958fe 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,8 +3,6 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -__revision__ = "$Id$" - import sys, os, re from distutils.errors import * from distutils.spawn import spawn diff --git a/cmd.py b/cmd.py index 5b1d085c32..3ea08101ac 100644 --- a/cmd.py +++ b/cmd.py @@ -4,8 +4,6 @@ in the distutils.command package. """ -__revision__ = "$Id$" - import sys, os, re from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util diff --git a/command/__init__.py b/command/__init__.py index c379edbed0..481eea9fd4 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -3,8 +3,6 @@ Package containing implementation of all the standard Distutils commands.""" -__revision__ = "$Id$" - __all__ = ['build', 'build_py', 'build_ext', diff --git a/command/bdist.py b/command/bdist.py index 1a360b59e3..c5188eb371 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist' command (create a built [binary] distribution).""" -__revision__ = "$Id$" - import os from distutils.core import Command from distutils.errors import * diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 2d39922672..170e889461 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -4,8 +4,6 @@ distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" -__revision__ = "$Id$" - import os from distutils.core import Command from distutils.util import get_platform diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index e2ae877d9a..678e118896 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -__revision__ = "$Id$" - import sys, os from distutils.core import Command from distutils.debug import DEBUG diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b2e2fc6dc8..b7916e31a1 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,8 +3,6 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -__revision__ = "$Id$" - import sys, os from distutils.core import Command from distutils.util import get_platform diff --git a/command/build.py b/command/build.py index 9c2667cfd2..cfc15cf0dd 100644 --- a/command/build.py +++ b/command/build.py @@ -2,8 +2,6 @@ Implements the Distutils 'build' command.""" -__revision__ = "$Id$" - import sys, os from distutils.core import Command from distutils.errors import DistutilsOptionError diff --git a/command/build_clib.py b/command/build_clib.py index 428011a64d..3e20ef23cd 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -4,8 +4,6 @@ that is included in the module distribution and needed by an extension module.""" -__revision__ = "$Id$" - # XXX this module has *lots* of code ripped-off quite transparently from # build_ext.py -- not surprisingly really, as the work required to build diff --git a/command/build_ext.py b/command/build_ext.py index fb31648951..8d843d689f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -4,8 +4,6 @@ modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" -__revision__ = "$Id$" - import sys, os, re from distutils.core import Command from distutils.errors import * diff --git a/command/build_py.py b/command/build_py.py index 26002e4b3f..3868c12f5b 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_py' command.""" -__revision__ = "$Id$" - import sys, os import sys from glob import glob diff --git a/command/build_scripts.py b/command/build_scripts.py index a43a7c306a..ec43477061 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -2,8 +2,6 @@ Implements the Distutils 'build_scripts' command.""" -__revision__ = "$Id$" - import os, re from stat import ST_MODE from distutils import sysconfig diff --git a/command/check.py b/command/check.py index 2657c696e5..b67c795308 100644 --- a/command/check.py +++ b/command/check.py @@ -2,8 +2,6 @@ Implements the Distutils 'check' command. """ -__revision__ = "$Id$" - from distutils.core import Command from distutils.errors import DistutilsSetupError diff --git a/command/clean.py b/command/clean.py index ae1d22c376..0cb2701662 100644 --- a/command/clean.py +++ b/command/clean.py @@ -4,8 +4,6 @@ # contributed by Bastian Kleineidam , added 2000-03-18 -__revision__ = "$Id$" - import os from distutils.core import Command from distutils.dir_util import remove_tree diff --git a/command/config.py b/command/config.py index ac80a54eb1..847e858160 100644 --- a/command/config.py +++ b/command/config.py @@ -9,8 +9,6 @@ this header file lives". """ -__revision__ = "$Id$" - import sys, os, re from distutils.core import Command diff --git a/command/install.py b/command/install.py index bdc3a09b22..0161898f49 100644 --- a/command/install.py +++ b/command/install.py @@ -2,8 +2,6 @@ Implements the Distutils 'install' command.""" -__revision__ = "$Id$" - import sys import os diff --git a/command/install_data.py b/command/install_data.py index ab40797b98..947cd76a99 100644 --- a/command/install_data.py +++ b/command/install_data.py @@ -5,8 +5,6 @@ # contributed by Bastian Kleineidam -__revision__ = "$Id$" - import os from distutils.core import Command from distutils.util import change_root, convert_path diff --git a/command/install_headers.py b/command/install_headers.py index 38125b5513..9bb0b18dc0 100644 --- a/command/install_headers.py +++ b/command/install_headers.py @@ -3,8 +3,6 @@ Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" -__revision__ = "$Id$" - from distutils.core import Command diff --git a/command/install_lib.py b/command/install_lib.py index 6022d30f27..3d01d07115 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -3,8 +3,6 @@ Implements the Distutils 'install_lib' command (install all Python modules).""" -__revision__ = "$Id$" - import os import sys diff --git a/command/install_scripts.py b/command/install_scripts.py index ea8d5aa654..31a1130ee5 100644 --- a/command/install_scripts.py +++ b/command/install_scripts.py @@ -5,8 +5,6 @@ # contributed by Bastian Kleineidam -__revision__ = "$Id$" - import os from distutils.core import Command from distutils import log diff --git a/command/register.py b/command/register.py index bdf5f8f09c..99545affa4 100644 --- a/command/register.py +++ b/command/register.py @@ -5,8 +5,6 @@ # created 2002/10/21, Richard Jones -__revision__ = "$Id$" - import os, string, getpass import io import urllib.parse, urllib.request diff --git a/command/sdist.py b/command/sdist.py index fdbebd7e0f..48cb26b6ae 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -2,8 +2,6 @@ Implements the Distutils 'sdist' command (create a source distribution).""" -__revision__ = "$Id$" - import os import string import sys diff --git a/core.py b/core.py index c0a04de3af..260332a2ac 100644 --- a/core.py +++ b/core.py @@ -6,8 +6,6 @@ really defined in distutils.dist and distutils.cmd. """ -__revision__ = "$Id$" - import os import sys diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 536aa6b61b..819e1a97be 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -45,8 +45,6 @@ # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -__revision__ = "$Id$" - import os import sys import copy diff --git a/debug.py b/debug.py index 2886744402..daf1660f0d 100644 --- a/debug.py +++ b/debug.py @@ -1,7 +1,5 @@ import os -__revision__ = "$Id$" - # If DISTUTILS_DEBUG is anything other than the empty string, we run in # debug mode. DEBUG = os.environ.get('DISTUTILS_DEBUG') diff --git a/dep_util.py b/dep_util.py index 07b3549c6f..d74f5e4e92 100644 --- a/dep_util.py +++ b/dep_util.py @@ -4,8 +4,6 @@ and groups of files; also, function based entirely on such timestamp dependency analysis.""" -__revision__ = "$Id$" - import os from distutils.errors import DistutilsFileError diff --git a/dir_util.py b/dir_util.py index 5b005f0865..30daf49a6e 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,8 +2,6 @@ Utility functions for manipulating directories and directory trees.""" -__revision__ = "$Id$" - import os, sys import errno from distutils.errors import DistutilsFileError, DistutilsInternalError diff --git a/dist.py b/dist.py index 01f1f1cfc0..02cd79ba2f 100644 --- a/dist.py +++ b/dist.py @@ -4,8 +4,6 @@ being built/installed/distributed. """ -__revision__ = "$Id$" - import sys, os, re try: diff --git a/emxccompiler.py b/emxccompiler.py index 16dce53524..3675f8df9c 100644 --- a/emxccompiler.py +++ b/emxccompiler.py @@ -19,8 +19,6 @@ # # * EMX gcc 2.81/EMX 0.9d fix03 -__revision__ = "$Id$" - import os,sys,copy from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler diff --git a/errors.py b/errors.py index acecacccb5..eb13c983e9 100644 --- a/errors.py +++ b/errors.py @@ -8,8 +8,6 @@ This module is safe to use in "from ... import *" mode; it only exports symbols whose names start with "Distutils" and end with "Error".""" -__revision__ = "$Id$" - class DistutilsError (Exception): """The root of all Distutils evil.""" pass diff --git a/extension.py b/extension.py index 2d1c36bd5c..a93655af2c 100644 --- a/extension.py +++ b/extension.py @@ -3,8 +3,6 @@ Provides the Extension class, used to describe C/C++ extension modules in setup scripts.""" -__revision__ = "$Id$" - import os import sys import warnings diff --git a/fancy_getopt.py b/fancy_getopt.py index 879d4d25bf..7d170dd277 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -8,8 +8,6 @@ * options set attributes of a passed-in object """ -__revision__ = "$Id$" - import sys, string, re import getopt from distutils.errors import * diff --git a/file_util.py b/file_util.py index e1eb932926..9bdd14e42e 100644 --- a/file_util.py +++ b/file_util.py @@ -3,8 +3,6 @@ Utility functions for operating on single files. """ -__revision__ = "$Id$" - import os from distutils.errors import DistutilsFileError from distutils import log diff --git a/filelist.py b/filelist.py index 06a8da9a07..a94b5c8e96 100644 --- a/filelist.py +++ b/filelist.py @@ -4,8 +4,6 @@ and building lists of files. """ -__revision__ = "$Id$" - import os, re import fnmatch from distutils.util import convert_path diff --git a/msvc9compiler.py b/msvc9compiler.py index e849e16d51..0cddb5c8e0 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -12,8 +12,6 @@ # finding DevStudio (through the registry) # ported to VS2005 and VS 2008 by Christian Heimes -__revision__ = "$Id$" - import os import subprocess import sys diff --git a/msvccompiler.py b/msvccompiler.py index 1cd0f91d5f..8116656961 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -8,8 +8,6 @@ # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) -__revision__ = "$Id$" - import sys, os from distutils.errors import \ DistutilsExecError, DistutilsPlatformError, \ diff --git a/spawn.py b/spawn.py index 2b62c968a4..f58c55f902 100644 --- a/spawn.py +++ b/spawn.py @@ -6,8 +6,6 @@ executable name. """ -__revision__ = "$Id$" - import sys import os diff --git a/sysconfig.py b/sysconfig.py index 9d7d1902aa..5ea724c096 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -9,8 +9,6 @@ Email: """ -__revision__ = "$Id$" - import os import re import sys diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index f969849590..8edfab49f8 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -1,6 +1,4 @@ """Tests for distutils.archive_util.""" -__revision__ = "$Id$" - import unittest import os import tarfile diff --git a/text_file.py b/text_file.py index 454725c626..40b8484a68 100644 --- a/text_file.py +++ b/text_file.py @@ -4,8 +4,6 @@ that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" -__revision__ = "$Id$" - import sys, os, io diff --git a/unixccompiler.py b/unixccompiler.py index bf73416154..c70a3cc555 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -13,8 +13,6 @@ * link shared library handled by 'cc -shared' """ -__revision__ = "$Id$" - import os, sys, re from distutils import sysconfig diff --git a/util.py b/util.py index d6f89d65e5..023ddffc82 100644 --- a/util.py +++ b/util.py @@ -4,8 +4,6 @@ one of the other *util.py modules. """ -__revision__ = "$Id$" - import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer From 69896eb64dc3f52097d8cb26a693b794dbf81504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 31 Jul 2011 02:04:00 +0200 Subject: [PATCH 3220/8469] Fix regression with distutils MANIFEST handing (#11104, #8688). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changed behavior of sdist in 2.7 broke packaging for projects that wanted to use a manually-maintained MANIFEST file (instead of having a MANIFEST.in template and letting distutils generate the MANIFEST). The fixes that were committed for #8688 (d29399100973 by Tarek and f7639dcdffc3 by me) did not fix all issues exposed in the bug report, and also added one problem: the MANIFEST file format gained comments, but the read_manifest method was not updated to handle (i.e. ignore) them. This changeset should fix everything; the tests have been expanded and I successfully tested with Mercurial, which suffered from this regression. I have grouped the versionchanged directives for these bugs in one place and added micro version numbers to help users know the quirks of the exact version they’re using. I also removed a stanza in the docs that was forgotten in Tarek’s first changeset. Initial report, thorough diagnosis and patch by John Dennis, further work on the patch by Stephen Thorne, and a few edits and additions by me. --- command/sdist.py | 48 +++++++++++++++++++++++++++------------------ tests/test_sdist.py | 43 +++++++++++++++++++++++++++++++--------- 2 files changed, 63 insertions(+), 28 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index cf8982bd9d..75950f3d18 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -182,14 +182,20 @@ def get_file_list(self): reading the manifest, or just using the default file set -- it all depends on the user's options. """ - # new behavior: + # new behavior when using a template: # the file list is recalculated everytime because # even if MANIFEST.in or setup.py are not changed # the user might have added some files in the tree that # need to be included. # - # This makes --force the default and only behavior. + # This makes --force the default and only behavior with templates. template_exists = os.path.isfile(self.template) + if not template_exists and self._manifest_is_not_generated(): + self.read_manifest() + self.filelist.sort() + self.filelist.remove_duplicates() + return + if not template_exists: self.warn(("manifest template '%s' does not exist " + "(using default file list)") % @@ -352,23 +358,28 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - if os.path.isfile(self.manifest): - fp = open(self.manifest) - try: - first_line = fp.readline() - finally: - fp.close() - - if first_line != '# file GENERATED by distutils, do NOT edit\n': - log.info("not writing to manually maintained " - "manifest file '%s'" % self.manifest) - return + if self._manifest_is_not_generated(): + log.info("not writing to manually maintained " + "manifest file '%s'" % self.manifest) + return content = self.filelist.files[:] content.insert(0, '# file GENERATED by distutils, do NOT edit') self.execute(file_util.write_file, (self.manifest, content), "writing manifest file '%s'" % self.manifest) + def _manifest_is_not_generated(self): + # check for special comment used in 2.7.1 and higher + if not os.path.isfile(self.manifest): + return False + + fp = open(self.manifest, 'rU') + try: + first_line = fp.readline() + finally: + fp.close() + return first_line != '# file GENERATED by distutils, do NOT edit\n' + def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source @@ -376,12 +387,11 @@ def read_manifest(self): """ log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest) - while 1: - line = manifest.readline() - if line == '': # end of file - break - if line[-1] == '\n': - line = line[0:-1] + for line in manifest: + # ignore comments and blank lines + line = line.strip() + if line.startswith('#') or not line: + continue self.filelist.append(line) manifest.close() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 61f9c1f79b..8da6fe4de8 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -1,9 +1,11 @@ """Tests for distutils.command.sdist.""" import os +import tarfile import unittest -import shutil +import warnings import zipfile -import tarfile +from os.path import join +from textwrap import dedent # zlib is not used here, but if it's not available # the tests that use zipfile may fail @@ -19,19 +21,13 @@ except ImportError: UID_GID_SUPPORT = False -from os.path import join -import sys -import tempfile -import warnings - from test.test_support import captured_stdout, check_warnings, run_unittest from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase -from distutils.errors import DistutilsExecError, DistutilsOptionError +from distutils.errors import DistutilsOptionError from distutils.spawn import find_executable -from distutils.tests import support from distutils.log import WARN from distutils.archive_util import ARCHIVE_FORMATS @@ -405,13 +401,33 @@ def test_manifest_marker(self): self.assertEqual(manifest[0], '# file GENERATED by distutils, do NOT edit') + @unittest.skipUnless(zlib, 'requires zlib') + def test_manifest_comments(self): + # make sure comments don't cause exceptions or wrong includes + contents = dedent("""\ + # bad.py + #bad.py + good.py + """) + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), contents) + self.write_file((self.tmp_dir, 'good.py'), '# pick me!') + self.write_file((self.tmp_dir, 'bad.py'), "# don't pick me!") + self.write_file((self.tmp_dir, '#bad.py'), "# don't pick me!") + cmd.run() + self.assertEqual(cmd.filelist.files, ['good.py']) + @unittest.skipUnless(zlib, "requires zlib") def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + self.write_file((self.tmp_dir, 'README.manual'), + 'This project maintains its MANIFEST file itself.') cmd.run() + self.assertEqual(cmd.filelist.files, ['README.manual']) f = open(cmd.manifest) try: @@ -422,6 +438,15 @@ def test_manual_manifest(self): self.assertEqual(manifest, ['README.manual']) + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + filenames = [tarinfo.name for tarinfo in archive] + finally: + archive.close() + self.assertEqual(sorted(filenames), ['fake-1.0', 'fake-1.0/PKG-INFO', + 'fake-1.0/README.manual']) + def test_suite(): return unittest.makeSuite(SDistTestCase) From 2659dbffbdccd9365d0e81be91a230884a7430f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 31 Jul 2011 04:06:12 +0200 Subject: [PATCH 3221/8469] Fix regression with distutils MANIFEST handing (#11104, #8688). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changed behavior of sdist in 3.1 broke packaging for projects that wanted to use a manually-maintained MANIFEST file (instead of having a MANIFEST.in template and letting distutils generate the MANIFEST). The fixes that were committed for #8688 (76643c286b9f by Tarek and d54da9248ed9 by me) did not fix all issues exposed in the bug report, and also added one problem: the MANIFEST file format gained comments, but the read_manifest method was not updated to handle (i.e. ignore) them. This changeset should fix everything; the tests have been expanded and I successfully tested the 2.7 version with Mercurial, which suffered from this regression. I have grouped the versionchanged directives for these bugs in one place and added micro version numbers to help users know the quirks of the exact version they’re using. Initial report, thorough diagnosis and patch by John Dennis, further work on the patch by Stephen Thorne, and a few edits and additions by me. --- command/sdist.py | 48 +++++++++++++++++++++++++++------------------ tests/test_sdist.py | 39 ++++++++++++++++++++++++++++++------ 2 files changed, 62 insertions(+), 25 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 48cb26b6ae..21ea61d96a 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -174,14 +174,20 @@ def get_file_list(self): reading the manifest, or just using the default file set -- it all depends on the user's options. """ - # new behavior: + # new behavior when using a template: # the file list is recalculated everytime because # even if MANIFEST.in or setup.py are not changed # the user might have added some files in the tree that # need to be included. # - # This makes --force the default and only behavior. + # This makes --force the default and only behavior with templates. template_exists = os.path.isfile(self.template) + if not template_exists and self._manifest_is_not_generated(): + self.read_manifest() + self.filelist.sort() + self.filelist.remove_duplicates() + return + if not template_exists: self.warn(("manifest template '%s' does not exist " + "(using default file list)") % @@ -336,23 +342,28 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - if os.path.isfile(self.manifest): - fp = open(self.manifest) - try: - first_line = fp.readline() - finally: - fp.close() - - if first_line != '# file GENERATED by distutils, do NOT edit\n': - log.info("not writing to manually maintained " - "manifest file '%s'" % self.manifest) - return + if self._manifest_is_not_generated(): + log.info("not writing to manually maintained " + "manifest file '%s'" % self.manifest) + return content = self.filelist.files[:] content.insert(0, '# file GENERATED by distutils, do NOT edit') self.execute(file_util.write_file, (self.manifest, content), "writing manifest file '%s'" % self.manifest) + def _manifest_is_not_generated(self): + # check for special comment used in 3.1.3 and higher + if not os.path.isfile(self.manifest): + return False + + fp = open(self.manifest) + try: + first_line = fp.readline() + finally: + fp.close() + return first_line != '# file GENERATED by distutils, do NOT edit\n' + def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source @@ -360,12 +371,11 @@ def read_manifest(self): """ log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest) - while True: - line = manifest.readline() - if line == '': # end of file - break - if line[-1] == '\n': - line = line[0:-1] + for line in manifest: + # ignore comments and blank lines + line = line.strip() + if line.startswith('#') or not line: + continue self.filelist.append(line) manifest.close() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index c7dd47fb5c..440af9886c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -1,21 +1,19 @@ """Tests for distutils.command.sdist.""" import os +import tarfile import unittest -import shutil +import warnings import zipfile from os.path import join -import sys -import tempfile -import warnings +from textwrap import dedent from test.support import captured_stdout, check_warnings, run_unittest from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase -from distutils.errors import DistutilsExecError, DistutilsOptionError +from distutils.errors import DistutilsOptionError from distutils.spawn import find_executable -from distutils.tests import support from distutils.log import WARN from distutils.archive_util import ARCHIVE_FORMATS @@ -346,13 +344,33 @@ def test_manifest_marker(self): self.assertEqual(manifest[0], '# file GENERATED by distutils, do NOT edit') + @unittest.skipUnless(ZLIB_SUPPORT, "Need zlib support to run") + def test_manifest_comments(self): + # make sure comments don't cause exceptions or wrong includes + contents = dedent("""\ + # bad.py + #bad.py + good.py + """) + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), contents) + self.write_file((self.tmp_dir, 'good.py'), '# pick me!') + self.write_file((self.tmp_dir, 'bad.py'), "# don't pick me!") + self.write_file((self.tmp_dir, '#bad.py'), "# don't pick me!") + cmd.run() + self.assertEqual(cmd.filelist.files, ['good.py']) + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + self.write_file((self.tmp_dir, 'README.manual'), + 'This project maintains its MANIFEST file itself.') cmd.run() + self.assertEqual(cmd.filelist.files, ['README.manual']) f = open(cmd.manifest) try: @@ -363,6 +381,15 @@ def test_manual_manifest(self): self.assertEqual(manifest, ['README.manual']) + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + filenames = [tarinfo.name for tarinfo in archive] + finally: + archive.close() + self.assertEqual(sorted(filenames), ['fake-1.0', 'fake-1.0/PKG-INFO', + 'fake-1.0/README.manual']) + def test_suite(): return unittest.makeSuite(SDistTestCase) From 9b09f6d159a7d5f4ffeaf9de4710ee869258fed7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2011 04:38:03 -0400 Subject: [PATCH 3222/8469] Corrected ValueError introduced in the last commit due to incorrect use of arg unpacking --HG-- branch : distribute extra : rebase_source : 0ebd905145e32bf072c00bc663dde8716ad4b88a --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/easy_install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9fd4175819..9dc5c2e138 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-3.2 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c1bae1c0b1..f44e8d4ae2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1429,7 +1429,7 @@ def extract_wininst_cfg(dist_filename): # part is in bytes, but we need to read up to the first null # byte. null_byte = bytes([0]) if sys.version_info >= (2,6) else chr(0) - config, = part.split(null_byte, 1) + config = part.split(null_byte, 1)[0] # Now the config is in bytes, but on Python 3, it must be # unicode for the RawConfigParser, so decode it. Is this the # right encoding? From 4a58c74f7e7e12cc7ee6e6832249c8b39dc58f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 2 Aug 2011 03:16:12 +0200 Subject: [PATCH 3223/8469] Fix incorrect mtime comparison in distutils (#11933). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a regression introduced in 9211a5d7d0b4, when uses of ST_MTIME constants were changed to uses of st_mtime attributes. As diagnosed in the bug report, this change is not merely stylistic: st_mtime is a float but ST_MTIME’s resolution is rounded to the seconds, so there was a mismatch between the values seen by file_util and dep_util which caused an sdist to be unnecessarily created a second time on an ext4 filesystem. This patch has been tested by John S. Gruber, who reported the bug. As this is a simple code revert, I think it’s okay to commit without a unit test. --- dep_util.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dep_util.py b/dep_util.py index 4e40df6899..2b759056ea 100644 --- a/dep_util.py +++ b/dep_util.py @@ -7,6 +7,7 @@ __revision__ = "$Id$" import os +from stat import ST_MTIME from distutils.errors import DistutilsFileError def newer(source, target): @@ -27,7 +28,7 @@ def newer(source, target): if not os.path.exists(target): return True - return os.stat(source).st_mtime > os.stat(target).st_mtime + return os.stat(source)[ST_MTIME] > os.stat(target)[ST_MTIME] def newer_pairwise(sources, targets): """Walk two filename lists in parallel, testing if each source is newer @@ -71,7 +72,7 @@ def newer_group(sources, target, missing='error'): # is more recent than 'target', then 'target' is out-of-date and # we can immediately return true. If we fall through to the end # of the loop, then 'target' is up-to-date and we return false. - target_mtime = os.stat(target).st_mtime + target_mtime = os.stat(target)[ST_MTIME] for source in sources: if not os.path.exists(source): @@ -82,7 +83,7 @@ def newer_group(sources, target, missing='error'): elif missing == 'newer': # missing source means target is return True # out-of-date - if os.stat(source).st_mtime > target_mtime: + if os.stat(source)[ST_MTIME] > target_mtime: return True return False From 477a6fa41f95c753e0c5d3cc4f6f872cdd96c3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 10 Aug 2011 02:46:33 +0200 Subject: [PATCH 3224/8469] Revert cosmetic change. A reminder: distutils only gets bug fixes. Cosmetic changes, especially in tests, are not worth the time spent, and can even make future merges of bugfixes a bit less easy. --- tests/test_build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index c7c36f3cc7..4e46339b43 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -10,7 +10,7 @@ from distutils.errors import DistutilsFileError from distutils.tests import support -from test.support import run_unittest, create_empty_file +from test.support import run_unittest class BuildPyTestCase(support.TempdirManager, @@ -71,11 +71,11 @@ def test_empty_package_dir(self): # create the distribution files. sources = self.mkdtemp() - create_empty_file(os.path.join(sources, "__init__.py")) + open(os.path.join(sources, "__init__.py"), "w").close() testdir = os.path.join(sources, "doc") os.mkdir(testdir) - create_empty_file(os.path.join(testdir, "testfile")) + open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) old_stdout = sys.stdout From 2af5d249da9647a383d27799c9bb9bf9802566c9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 13 Aug 2011 11:34:58 +0200 Subject: [PATCH 3225/8469] Bump version to 3.2.2rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c06002eab3..b31b2d203d 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.1" +__version__ = "3.2.2rc1" #--end constants-- From edaefa4982e0aac7b07048c4761446ed66fec524 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sun, 14 Aug 2011 19:18:17 -0400 Subject: [PATCH 3226/8469] Remove extraneous 2nd argument in call to open_url, apparently intended to issue a warning (looks like open_url takes an optional `warning` argument, but I couldn't get that to work either). Fixes #135. This fix is better than the status quo, but probably not as good as issuing a warning instead of failure. --HG-- branch : distribute extra : rebase_source : 39889bf4dd21abbd57207bfafe6f8bad68b1e46f --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f064b110d5..c9e3d63777 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -198,7 +198,7 @@ def process_url(self, url, retrieve=False): return self.info("Reading %s", url) - f = self.open_url(url, "Download error: %s -- Some packages may not be found!") + f = self.open_url(url) if f is None: return self.fetched_urls[url] = self.fetched_urls[f.url] = True From e6a12bbf1a51bb572145fd46715e2a20e54bfc52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 17 Aug 2011 03:44:27 -0400 Subject: [PATCH 3227/8469] Include url in warning when processing URL. Fixes #135. --HG-- branch : distribute extra : rebase_source : 1241e1cb548adad562fcf61ce33538712a64aaed --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f064b110d5..1dccabcb38 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -198,7 +198,7 @@ def process_url(self, url, retrieve=False): return self.info("Reading %s", url) - f = self.open_url(url, "Download error: %s -- Some packages may not be found!") + f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url) if f is None: return self.fetched_urls[url] = self.fetched_urls[f.url] = True From faba07dcbfdb0bec687496bd329985497f907fbb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 17 Aug 2011 20:49:41 +0200 Subject: [PATCH 3228/8469] Issue #12326: don't test the major version of sys.platform Use startswith, instead of ==, when testing sys.platform to support new platforms like Linux 3 or OpenBSD 5. --- tests/test_bdist_rpm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 030933f17c..9b0639a549 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -47,7 +47,7 @@ def test_quiet(self): # XXX I am unable yet to make this test work without # spurious sdtout/stderr output under Mac OS X - if sys.platform != 'linux2': + if not sys.platform.startswith('linux'): return # this test will run only if the rpm commands are found @@ -87,7 +87,7 @@ def test_no_optimize_flag(self): # XXX I am unable yet to make this test work without # spurious sdtout/stderr output under Mac OS X - if sys.platform != 'linux2': + if not sys.platform.startswith('linux'): return # http://bugs.python.org/issue1533164 From 7c3f41d0b318ce9ef1400563cc20308cc9de33ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Aug 2011 18:34:40 -0400 Subject: [PATCH 3229/8469] Added tag 0.6.20 for changeset a7cf5ae137f1 --HG-- branch : distribute extra : rebase_source : 321bdfe4b7b77edeab7de739e2c5481c94d22941 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8d467fbc47..0cec1be510 100644 --- a/.hgtags +++ b/.hgtags @@ -26,3 +26,4 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 74108d7f07343556a8db94e8122221a43243f586 0.6.18 611910892a0421633d72677979f94a25ef590d54 0.6.19 +a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 From 781b4157b9ea9e95c75187048d5f008432bff16e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Aug 2011 18:37:58 -0400 Subject: [PATCH 3230/8469] Bumped revision --HG-- branch : distribute extra : rebase_source : 6ebf94097c5975957a8596aaadc1b466cdcbf796 --- distribute.egg-info/entry_points.txt | 2 +- distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9dc5c2e138..9fd4175819 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.2 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 22c2d65f19..5a95c9275c 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.20" +DEFAULT_VERSION = "0.6.21" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/release.sh b/release.sh index 7f791691cf..667fd5fe44 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.20" +export VERSION="0.6.21" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index bfb6240646..2982fcf0a4 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.20" +VERSION = "0.6.21" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 5a82cc72c7252dcf4c6d64d93ce353f985090218 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Aug 2011 18:51:22 -0400 Subject: [PATCH 3231/8469] Updated changes (should have done this sooner). --HG-- branch : distribute extra : rebase_source : efb1d8a52b7c7faaea3bd9ca428a49c632813d73 --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index aa3eb476fe..616ba45891 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,9 @@ CHANGES 0.6.20 ------ -* ADD STUFF HERE +* Issue #135: Include url in warning when processing URLs in package_index. +* Issue #212: Fix issue where easy_instal fails on Python 3 on windows installer. +* Issue #213: Fix typo in documentation. ------ 0.6.19 From 827916050d68864c15cb91962908dd01f0fd25ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Aug 2011 18:52:06 -0400 Subject: [PATCH 3232/8469] Added tag 0.6.20 for changeset c4a375336d55 --HG-- branch : distribute extra : rebase_source : f7dd2894fdd0b6cd05991adf76129aa2270d5049 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 8d467fbc47..f740877164 100644 --- a/.hgtags +++ b/.hgtags @@ -26,3 +26,5 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 74108d7f07343556a8db94e8122221a43243f586 0.6.18 611910892a0421633d72677979f94a25ef590d54 0.6.19 +a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 +c4a375336d552129aef174486018ed09c212d684 0.6.20 From 415e9dbe45360be9a592d5916e87cb16b1b023a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Aug 2011 18:59:35 -0400 Subject: [PATCH 3233/8469] Bumped version in README and CHANGES --HG-- branch : distribute extra : rebase_source : ef7f9f76ee6efa1973b3aa0e8a3e2aa6b97ee5d0 --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 616ba45891..8a4bcebff5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.21 +------ + +* ADD STUFF HERE + ------ 0.6.20 ------ diff --git a/README.txt b/README.txt index f562d628bb..3ce7df6e11 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.20.tar.gz - $ tar -xzvf distribute-0.6.20.tar.gz - $ cd distribute-0.6.20 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz + $ tar -xzvf distribute-0.6.21.tar.gz + $ cd distribute-0.6.21 $ python setup.py install --------------------------- From d2d11c0f224789430dee34ca05de87d70982d6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 06:27:18 +0200 Subject: [PATCH 3234/8469] Refactor the copying of xxmodule.c in distutils tests (#12141). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I need to copy this file in another test too, so I moved the support code to distutils.tests.support and improved it: - don’t skip when run from the Lib/distutils/tests directory - use proper skip machinery instead of custom print/return/test suite fiddling. --- tests/support.py | 42 +++++++++++++++++++++++++++++++++++++++++ tests/test_build_ext.py | 28 ++++----------------------- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/tests/support.py b/tests/support.py index e258d2e58d..0e33827fe8 100644 --- a/tests/support.py +++ b/tests/support.py @@ -2,12 +2,15 @@ import os import shutil import tempfile +import unittest +import sysconfig from copy import deepcopy from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution + class LoggingSilencer(object): def setUp(self): @@ -41,6 +44,7 @@ def _format(msg, args): def clear_logs(self): self.logs = [] + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. @@ -97,6 +101,7 @@ def create_dist(self, pkg_name='foo', **kw): return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" @@ -107,6 +112,7 @@ def __init__(self, **kwargs): def ensure_finalized(self): pass + class EnvironGuard(object): def setUp(self): @@ -123,3 +129,39 @@ def tearDown(self): del os.environ[key] super(EnvironGuard, self).tearDown() + + +def copy_xxmodule_c(directory): + """Helper for tests that need the xxmodule.c source file. + + Example use: + + def test_compile(self): + copy_xxmodule_c(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir) + + If the source file can be found, it will be copied to *directory*. If not, + the test will be skipped. Errors during copy are not caught. + """ + filename = _get_xxmodule_path() + if filename is None: + raise unittest.SkipTest('cannot find xxmodule.c (test must run in ' + 'the python build dir)') + shutil.copy(filename, directory) + + +def _get_xxmodule_path(): + srcdir = sysconfig.get_config_var('srcdir') + candidates = [ + # use installed copy if available + os.path.join(os.path.dirname(__file__), 'xxmodule.c'), + # otherwise try using copy from build directory + os.path.join(srcdir, 'Modules', 'xxmodule.c'), + # srcdir mysteriously can be $srcdir/Lib/distutils/tests when + # this file is run from its parent directory, so walk up the + # tree to find the real srcdir + os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'), + ] + for path in candidates: + if os.path.exists(path): + return path diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 0ce7f0f81c..de53afb1c3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,14 +1,13 @@ import sys import os -import shutil from io import StringIO import textwrap from distutils.core import Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig -from distutils.tests.support import TempdirManager -from distutils.tests.support import LoggingSilencer +from distutils.tests.support import (TempdirManager, LoggingSilencer, + copy_xxmodule_c) from distutils.extension import Extension from distutils.errors import ( CompileError, DistutilsPlatformError, DistutilsSetupError, @@ -16,20 +15,11 @@ import unittest from test import support -from test.support import run_unittest # http://bugs.python.org/issue4373 # Don't load the xx module more than once. ALREADY_TESTED = False -def _get_source_filename(): - # use installed copy if available - tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') - if os.path.exists(tests_f): - return tests_f - # otherwise try using copy from build directory - srcdir = sysconfig.get_config_var('srcdir') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') class BuildExtTestCase(TempdirManager, LoggingSilencer, @@ -41,9 +31,6 @@ def setUp(self): self.tmp_dir = self.mkdtemp() self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) - filename = _get_source_filename() - if os.path.exists(filename): - shutil.copy(filename, self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -72,9 +59,8 @@ def _fixup_command(self, cmd): def test_build_ext(self): global ALREADY_TESTED + copy_xxmodule_c(self.tmp_dir) xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') - if not os.path.exists(xx_c): - return xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir @@ -518,13 +504,7 @@ def _try_compile_deployment_target(self, operator, target): def test_suite(): - src = _get_source_filename() - if not os.path.exists(src): - if support.verbose: - print('test_build_ext: Cannot find source code (test' - ' must run in python build dir)') - return unittest.TestSuite() - else: return unittest.makeSuite(BuildExtTestCase) + return unittest.makeSuite(BuildExtTestCase) if __name__ == '__main__': support.run_unittest(test_suite()) From 5deb9c1a36539871aeb5a1fab451942aa2cf5cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 06:27:18 +0200 Subject: [PATCH 3235/8469] Refactor the copying of xxmodule.c in distutils tests (#12141). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I need to copy this file in another test too, so I moved the support code to distutils.tests.support and improved it: - don’t skip when run from the Lib/distutils/tests directory - use proper skip machinery instead of custom print/return/test suite fiddling. --- tests/support.py | 42 +++++++++++++++++++++++++++++++++++++++++ tests/test_build_ext.py | 28 ++++----------------------- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/tests/support.py b/tests/support.py index e258d2e58d..0e33827fe8 100644 --- a/tests/support.py +++ b/tests/support.py @@ -2,12 +2,15 @@ import os import shutil import tempfile +import unittest +import sysconfig from copy import deepcopy from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution + class LoggingSilencer(object): def setUp(self): @@ -41,6 +44,7 @@ def _format(msg, args): def clear_logs(self): self.logs = [] + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. @@ -97,6 +101,7 @@ def create_dist(self, pkg_name='foo', **kw): return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" @@ -107,6 +112,7 @@ def __init__(self, **kwargs): def ensure_finalized(self): pass + class EnvironGuard(object): def setUp(self): @@ -123,3 +129,39 @@ def tearDown(self): del os.environ[key] super(EnvironGuard, self).tearDown() + + +def copy_xxmodule_c(directory): + """Helper for tests that need the xxmodule.c source file. + + Example use: + + def test_compile(self): + copy_xxmodule_c(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir) + + If the source file can be found, it will be copied to *directory*. If not, + the test will be skipped. Errors during copy are not caught. + """ + filename = _get_xxmodule_path() + if filename is None: + raise unittest.SkipTest('cannot find xxmodule.c (test must run in ' + 'the python build dir)') + shutil.copy(filename, directory) + + +def _get_xxmodule_path(): + srcdir = sysconfig.get_config_var('srcdir') + candidates = [ + # use installed copy if available + os.path.join(os.path.dirname(__file__), 'xxmodule.c'), + # otherwise try using copy from build directory + os.path.join(srcdir, 'Modules', 'xxmodule.c'), + # srcdir mysteriously can be $srcdir/Lib/distutils/tests when + # this file is run from its parent directory, so walk up the + # tree to find the real srcdir + os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'), + ] + for path in candidates: + if os.path.exists(path): + return path diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 0ce7f0f81c..de53afb1c3 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,14 +1,13 @@ import sys import os -import shutil from io import StringIO import textwrap from distutils.core import Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig -from distutils.tests.support import TempdirManager -from distutils.tests.support import LoggingSilencer +from distutils.tests.support import (TempdirManager, LoggingSilencer, + copy_xxmodule_c) from distutils.extension import Extension from distutils.errors import ( CompileError, DistutilsPlatformError, DistutilsSetupError, @@ -16,20 +15,11 @@ import unittest from test import support -from test.support import run_unittest # http://bugs.python.org/issue4373 # Don't load the xx module more than once. ALREADY_TESTED = False -def _get_source_filename(): - # use installed copy if available - tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') - if os.path.exists(tests_f): - return tests_f - # otherwise try using copy from build directory - srcdir = sysconfig.get_config_var('srcdir') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') class BuildExtTestCase(TempdirManager, LoggingSilencer, @@ -41,9 +31,6 @@ def setUp(self): self.tmp_dir = self.mkdtemp() self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) - filename = _get_source_filename() - if os.path.exists(filename): - shutil.copy(filename, self.tmp_dir) if sys.version > "2.6": import site self.old_user_base = site.USER_BASE @@ -72,9 +59,8 @@ def _fixup_command(self, cmd): def test_build_ext(self): global ALREADY_TESTED + copy_xxmodule_c(self.tmp_dir) xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') - if not os.path.exists(xx_c): - return xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir @@ -518,13 +504,7 @@ def _try_compile_deployment_target(self, operator, target): def test_suite(): - src = _get_source_filename() - if not os.path.exists(src): - if support.verbose: - print('test_build_ext: Cannot find source code (test' - ' must run in python build dir)') - return unittest.TestSuite() - else: return unittest.makeSuite(BuildExtTestCase) + return unittest.makeSuite(BuildExtTestCase) if __name__ == '__main__': support.run_unittest(test_suite()) From 1273191a70b9b8a174da03506f34fe9e3b53fc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 07:00:41 +0200 Subject: [PATCH 3236/8469] Rework test_record a bit to make the test more exact --- tests/test_install.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index ed69b0cbb0..3e47d819fe 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,7 +1,6 @@ """Tests for distutils.command.install.""" import os -import os.path import sys import unittest import site @@ -167,33 +166,36 @@ def test_finalize_options(self): self.assertRaises(DistutilsOptionError, cmd.finalize_options) def test_record(self): - install_dir = self.mkdtemp() - pkgdir, dist = self.create_dist() + project_dir, dist = self.create_dist(scripts=['hello']) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + self.write_file('hello', "print('o hai')") - dist = Distribution() cmd = install(dist) dist.command_obj['install'] = cmd cmd.root = install_dir - cmd.record = os.path.join(pkgdir, 'RECORD') + cmd.record = os.path.join(project_dir, 'RECORD') cmd.ensure_finalized() - cmd.run() - # let's check the RECORD file was created with one - # line (the egg info file) f = open(cmd.record) try: - self.assertEqual(len(f.readlines()), 1) + content = f.read() finally: f.close() + found = [os.path.basename(line) for line in content.splitlines()] + expected = ['hello', + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + def test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) install_module.DEBUG = True try: - with captured_stdout() as stdout: + with captured_stdout(): self.test_record() finally: install_module.DEBUG = False From 07f33c845c7823038bc7a8a3eee9a55caff2b80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 21 Aug 2011 17:02:07 +0200 Subject: [PATCH 3237/8469] Factor out the build_ext fixup for shared Python builds. I need this to fix the failing test_install. --- tests/support.py | 27 +++++++++++++++++++++++++++ tests/test_build_ext.py | 31 ++++++------------------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/tests/support.py b/tests/support.py index 0e33827fe8..562a65c861 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,5 +1,6 @@ """Support code for distutils test cases.""" import os +import sys import shutil import tempfile import unittest @@ -165,3 +166,29 @@ def _get_xxmodule_path(): for path in candidates: if os.path.exists(path): return path + + +def fixup_build_ext(cmd): + """Function needed to make build_ext tests pass on shared builds. + + When Python was build with --enable-shared, -L. is not good enough to find + the libpython.so. This is because regrtest runs it under a tempdir, + not in the top level where the .so lives. By the time we've gotten here, + Python's already been chdir'd to the tempdir. This function work arounds + that. Example use: + + cmd = build_ext(dist) + support.fixup_build_ext(cmd) + cmd.ensure_finalized() + """ + # To further add to the fun, we can't just add library_dirs to the + # Extension() instance because that doesn't get plumbed through to the + # final compiler command. + if (sysconfig.get_config_var('Py_ENABLE_SHARED') and + not sys.platform.startswith('win')): + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index de53afb1c3..8eb59b4d2e 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -7,7 +7,7 @@ from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests.support import (TempdirManager, LoggingSilencer, - copy_xxmodule_c) + copy_xxmodule_c, fixup_build_ext) from distutils.extension import Extension from distutils.errors import ( CompileError, DistutilsPlatformError, DistutilsSetupError, @@ -38,25 +38,6 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE - def _fixup_command(self, cmd): - # When Python was build with --enable-shared, -L. is not good enough - # to find the libpython.so. This is because regrtest runs it - # under a tempdir, not in the top level where the .so lives. By the - # time we've gotten here, Python's already been chdir'd to the - # tempdir. - # - # To further add to the fun, we can't just add library_dirs to the - # Extension() instance because that doesn't get plumbed through to the - # final compiler command. - if (sysconfig.get_config_var('Py_ENABLE_SHARED') and - not sys.platform.startswith('win')): - runshared = sysconfig.get_config_var('RUNSHARED') - if runshared is None: - cmd.library_dirs = ['.'] - else: - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) - def test_build_ext(self): global ALREADY_TESTED copy_xxmodule_c(self.tmp_dir) @@ -65,7 +46,7 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) - self._fixup_command(cmd) + fixup_build_ext(cmd) if os.name == "nt": # On Windows, we must build a debug version iff running # a debug build of Python @@ -162,9 +143,9 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set - self.assertTrue(lib in cmd.library_dirs) - self.assertTrue(lib in cmd.rpath) - self.assertTrue(incl in cmd.include_dirs) + self.assertIn(lib, cmd.library_dirs) + self.assertIn(lib, cmd.rpath) + self.assertIn(incl, cmd.include_dirs) def test_optional_extension(self): @@ -320,7 +301,7 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) - self._fixup_command(cmd) + fixup_build_ext(cmd) cmd.ensure_finalized() self.assertEqual(len(cmd.get_outputs()), 1) From b359d8104f3393cb1eeda51a76ffc85289b91b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 07:00:41 +0200 Subject: [PATCH 3238/8469] Rework test_record a bit to make the test more exact --- tests/test_install.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index ed69b0cbb0..3e47d819fe 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,7 +1,6 @@ """Tests for distutils.command.install.""" import os -import os.path import sys import unittest import site @@ -167,33 +166,36 @@ def test_finalize_options(self): self.assertRaises(DistutilsOptionError, cmd.finalize_options) def test_record(self): - install_dir = self.mkdtemp() - pkgdir, dist = self.create_dist() + project_dir, dist = self.create_dist(scripts=['hello']) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + self.write_file('hello', "print('o hai')") - dist = Distribution() cmd = install(dist) dist.command_obj['install'] = cmd cmd.root = install_dir - cmd.record = os.path.join(pkgdir, 'RECORD') + cmd.record = os.path.join(project_dir, 'RECORD') cmd.ensure_finalized() - cmd.run() - # let's check the RECORD file was created with one - # line (the egg info file) f = open(cmd.record) try: - self.assertEqual(len(f.readlines()), 1) + content = f.read() finally: f.close() + found = [os.path.basename(line) for line in content.splitlines()] + expected = ['hello', + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + def test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) install_module.DEBUG = True try: - with captured_stdout() as stdout: + with captured_stdout(): self.test_record() finally: install_module.DEBUG = False From 13d8a65041270b836929fe82d2c925b92bdfbb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 07:08:51 +0200 Subject: [PATCH 3239/8469] Add a test for extension modules in the distutils record file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I made a note a month ago that install --record wrote incorrect entries for extension modules (I think the problem was that the first character of the file was stripped), so I’m now adding a test to try to reproduce that in the current versions. --- tests/test_install.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/test_install.py b/tests/test_install.py index 3e47d819fe..2133fa7916 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -7,11 +7,14 @@ from test.support import captured_stdout, run_unittest +from distutils import sysconfig from distutils.command.install import install from distutils.command import install as install_module +from distutils.command.build_ext import build_ext from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.errors import DistutilsOptionError +from distutils.extension import Extension from distutils.tests import support @@ -190,6 +193,36 @@ def test_record(self): 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) + def test_record_extensions(self): + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist(ext_modules=[ + Extension('xx', ['xxmodule.c'])]) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + support.copy_xxmodule_c(project_dir) + + buildcmd = build_ext(dist) + buildcmd.ensure_finalized() + buildcmd.run() + + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'RECORD') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.record) + try: + content = f.read() + finally: + f.close() + + found = [os.path.basename(line) for line in content.splitlines()] + expected = ['xx%s' % sysconfig.get_config_var('SO'), + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + def test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) From d45ea9f230f69621dd6e9fbf8b8c8526a7e28ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 07:08:51 +0200 Subject: [PATCH 3240/8469] Add a test for extension modules in the distutils record file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I made a note a month ago that install --record wrote incorrect entries for extension modules (I think the problem was that the first character of the file was stripped), so I’m now adding a test to try to reproduce that in the current versions. --- tests/test_install.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/test_install.py b/tests/test_install.py index 3e47d819fe..2133fa7916 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -7,11 +7,14 @@ from test.support import captured_stdout, run_unittest +from distutils import sysconfig from distutils.command.install import install from distutils.command import install as install_module +from distutils.command.build_ext import build_ext from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution from distutils.errors import DistutilsOptionError +from distutils.extension import Extension from distutils.tests import support @@ -190,6 +193,36 @@ def test_record(self): 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) + def test_record_extensions(self): + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist(ext_modules=[ + Extension('xx', ['xxmodule.c'])]) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + support.copy_xxmodule_c(project_dir) + + buildcmd = build_ext(dist) + buildcmd.ensure_finalized() + buildcmd.run() + + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'RECORD') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.record) + try: + content = f.read() + finally: + f.close() + + found = [os.path.basename(line) for line in content.splitlines()] + expected = ['xx%s' % sysconfig.get_config_var('SO'), + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + def test_debug_mode(self): # this covers the code called when DEBUG is set old_logs_len = len(self.logs) From b4d117a031abecb380ffea57535241ca339d3622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 07:25:39 +0200 Subject: [PATCH 3241/8469] Dedent example in docstring --- tests/support.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/support.py b/tests/support.py index 0e33827fe8..81289db4a1 100644 --- a/tests/support.py +++ b/tests/support.py @@ -136,9 +136,9 @@ def copy_xxmodule_c(directory): Example use: - def test_compile(self): - copy_xxmodule_c(self.tmpdir) - self.assertIn('xxmodule.c', os.listdir(self.tmpdir) + def test_compile(self): + copy_xxmodule_c(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir) If the source file can be found, it will be copied to *directory*. If not, the test will be skipped. Errors during copy are not caught. From 2e6300e37739b614e8b4286a9c6f534305c1c005 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 20 Aug 2011 11:52:00 +0200 Subject: [PATCH 3242/8469] don't use ternary operator - fixes #225 --HG-- branch : distribute extra : rebase_source : ecff177a6be463bfc55c40deec0a3f1e2804e895 --- setuptools/command/easy_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f44e8d4ae2..263b429c3c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1428,7 +1428,10 @@ def extract_wininst_cfg(dist_filename): part = f.read(cfglen) # part is in bytes, but we need to read up to the first null # byte. - null_byte = bytes([0]) if sys.version_info >= (2,6) else chr(0) + if sys.version_info >= (2,6): + null_byte = bytes([0]) + else: + chr(0) config = part.split(null_byte, 1)[0] # Now the config is in bytes, but on Python 3, it must be # unicode for the RawConfigParser, so decode it. Is this the From 4edb9c187d266dab1673aaad56c93d1a0be323bc Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 20 Aug 2011 11:55:08 +0200 Subject: [PATCH 3243/8469] added a note change --HG-- branch : distribute extra : rebase_source : 5a1be47325345d91791d77860aeef30c527b70e6 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8a4bcebff5..9d2b4f5438 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.21 ------ -* ADD STUFF HERE +* Issue #225: FIxed a regression on py2.4 ------ 0.6.20 From aad36d610b0d3b9778e1fe53fd3a1aefe5da2e71 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 20 Aug 2011 11:56:41 +0200 Subject: [PATCH 3244/8469] Added tag 0.6.21 for changeset de44acab3cfc --HG-- branch : distribute extra : rebase_source : 63dcebb8a273de6b634466ef81dc7912223e34e4 --- .hgtags | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.hgtags b/.hgtags index 9db36cc31e..734cd0c073 100644 --- a/.hgtags +++ b/.hgtags @@ -27,4 +27,5 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 74108d7f07343556a8db94e8122221a43243f586 0.6.18 611910892a0421633d72677979f94a25ef590d54 0.6.19 a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 -c4a375336d552129aef174486018ed09c212d684 0.6.20 \ No newline at end of file +c4a375336d552129aef174486018ed09c212d684 0.6.20 +de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 From b11523cfc567b2be5d0a56b954541d747bced9fe Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 20 Aug 2011 12:02:34 +0200 Subject: [PATCH 3245/8469] starting 0.6.22 dev --HG-- branch : distribute extra : rebase_source : 14a38f62c8faf493b64102b7e21244048edea5be --- CHANGES.txt | 6 ++++++ README.txt | 6 +++--- distribute.egg-info/entry_points.txt | 2 +- distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9d2b4f5438..3f13a3f65c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.22 +------ + +* ADD STUFF HERE + ------ 0.6.21 ------ diff --git a/README.txt b/README.txt index 3ce7df6e11..8faa59b472 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz - $ tar -xzvf distribute-0.6.21.tar.gz - $ cd distribute-0.6.21 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.22.tar.gz + $ tar -xzvf distribute-0.6.22.tar.gz + $ cd distribute-0.6.22 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 9fd4175819..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/distribute_setup.py b/distribute_setup.py index 5a95c9275c..2ee0f1249f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.21" +DEFAULT_VERSION = "0.6.22" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/release.sh b/release.sh index 667fd5fe44..0da1886273 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.21" +export VERSION="0.6.22" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 2982fcf0a4..3e9754c789 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.21" +VERSION = "0.6.22" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 05564db286ce0b50ea5296adea3e462793dfcbe1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2011 07:51:48 -0600 Subject: [PATCH 3246/8469] Fix NameError on Python 2.4, 2.5; reference #225 --HG-- branch : distribute extra : rebase_source : b2c739a08485c49b0735f5f7544f354b46ad1d12 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 263b429c3c..853753c19b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1431,7 +1431,7 @@ def extract_wininst_cfg(dist_filename): if sys.version_info >= (2,6): null_byte = bytes([0]) else: - chr(0) + null_byte = chr(0) config = part.split(null_byte, 1)[0] # Now the config is in bytes, but on Python 3, it must be # unicode for the RawConfigParser, so decode it. Is this the From 0da4543c2641cb04affb1d9b9e1d15f6e4f3fbea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2011 07:58:51 -0600 Subject: [PATCH 3247/8469] Updated CHANGES regarding #225 --HG-- branch : distribute extra : rebase_source : 4a44e46730c28e420aeffb873ab061f6d9ef0599 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3f13a3f65c..fe529fb3a5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.22 ------ -* ADD STUFF HERE +* Issue #225: Fixed a NameError on Python 2.5, 2.4 ------ 0.6.21 From d6a76c9070699d8701c00123b24d204484df68e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 20 Aug 2011 19:52:07 +0200 Subject: [PATCH 3248/8469] Fix sdist test on Windows (#12678). Patch by Jeremy Kloth. --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 440af9886c..f34f786c92 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -365,6 +365,7 @@ def test_manifest_comments(self): def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() + cmd.formats = ['gztar'] cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') self.write_file((self.tmp_dir, 'README.manual'), From c0f9165822276f0cd6b74ea6d0296e494b3e5a3f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 21 Aug 2011 00:39:18 +0200 Subject: [PATCH 3249/8469] Issue #12326: refactor usage of sys.platform * Use str.startswith(tuple): I didn't know this Python feature, Python rocks! * Replace sometimes sys.platform.startswith('linux') with sys.platform == 'linux' * sys.platform doesn't contain the major version on Cygwin on Mac OS X (it's just 'cygwin' and 'darwin') --- command/build_ext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8d843d689f..8baf538f2a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -240,8 +240,7 @@ def finalize_options(self): # for extensions under Linux or Solaris with a shared Python library, # Python's library directory must be appended to library_dirs sysconfig.get_config_var('Py_ENABLE_SHARED') - if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') - or sys.platform.startswith('sunos')) + if (sys.platform.startswith(('linux', 'gnu', 'sunos')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions From e081dd68394c4fb8961c78fd2a4d8c71f69ac0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 21 Aug 2011 12:53:37 +0200 Subject: [PATCH 3250/8469] Add missing closing paren in docstring (thanks Ezio) --- tests/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/support.py b/tests/support.py index 81289db4a1..49277111bf 100644 --- a/tests/support.py +++ b/tests/support.py @@ -138,7 +138,7 @@ def copy_xxmodule_c(directory): def test_compile(self): copy_xxmodule_c(self.tmpdir) - self.assertIn('xxmodule.c', os.listdir(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir)) If the source file can be found, it will be copied to *directory*. If not, the test will be skipped. Errors during copy are not caught. From b96da7b0feee847c2a2b51678da402731378b097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 21 Aug 2011 17:02:07 +0200 Subject: [PATCH 3251/8469] Factor out the build_ext fixup for shared Python builds. I need this to fix the failing test_install. --- tests/support.py | 27 +++++++++++++++++++++++++++ tests/test_build_ext.py | 31 ++++++------------------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/tests/support.py b/tests/support.py index 49277111bf..ffef98bae4 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,5 +1,6 @@ """Support code for distutils test cases.""" import os +import sys import shutil import tempfile import unittest @@ -165,3 +166,29 @@ def _get_xxmodule_path(): for path in candidates: if os.path.exists(path): return path + + +def fixup_build_ext(cmd): + """Function needed to make build_ext tests pass on shared builds. + + When Python was build with --enable-shared, -L. is not good enough to find + the libpython.so. This is because regrtest runs it under a tempdir, + not in the top level where the .so lives. By the time we've gotten here, + Python's already been chdir'd to the tempdir. This function work arounds + that. Example use: + + cmd = build_ext(dist) + support.fixup_build_ext(cmd) + cmd.ensure_finalized() + """ + # To further add to the fun, we can't just add library_dirs to the + # Extension() instance because that doesn't get plumbed through to the + # final compiler command. + if (sysconfig.get_config_var('Py_ENABLE_SHARED') and + not sys.platform.startswith('win')): + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index de53afb1c3..8eb59b4d2e 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -7,7 +7,7 @@ from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests.support import (TempdirManager, LoggingSilencer, - copy_xxmodule_c) + copy_xxmodule_c, fixup_build_ext) from distutils.extension import Extension from distutils.errors import ( CompileError, DistutilsPlatformError, DistutilsSetupError, @@ -38,25 +38,6 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE - def _fixup_command(self, cmd): - # When Python was build with --enable-shared, -L. is not good enough - # to find the libpython.so. This is because regrtest runs it - # under a tempdir, not in the top level where the .so lives. By the - # time we've gotten here, Python's already been chdir'd to the - # tempdir. - # - # To further add to the fun, we can't just add library_dirs to the - # Extension() instance because that doesn't get plumbed through to the - # final compiler command. - if (sysconfig.get_config_var('Py_ENABLE_SHARED') and - not sys.platform.startswith('win')): - runshared = sysconfig.get_config_var('RUNSHARED') - if runshared is None: - cmd.library_dirs = ['.'] - else: - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) - def test_build_ext(self): global ALREADY_TESTED copy_xxmodule_c(self.tmp_dir) @@ -65,7 +46,7 @@ def test_build_ext(self): dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) - self._fixup_command(cmd) + fixup_build_ext(cmd) if os.name == "nt": # On Windows, we must build a debug version iff running # a debug build of Python @@ -162,9 +143,9 @@ def test_user_site(self): # see if include_dirs and library_dirs # were set - self.assertTrue(lib in cmd.library_dirs) - self.assertTrue(lib in cmd.rpath) - self.assertTrue(incl in cmd.include_dirs) + self.assertIn(lib, cmd.library_dirs) + self.assertIn(lib, cmd.rpath) + self.assertIn(incl, cmd.include_dirs) def test_optional_extension(self): @@ -320,7 +301,7 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) - self._fixup_command(cmd) + fixup_build_ext(cmd) cmd.ensure_finalized() self.assertEqual(len(cmd.get_outputs()), 1) From babd93f6a36c537938f716994004f31ea22e03e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 21 Aug 2011 17:03:19 +0200 Subject: [PATCH 3252/8469] Fix distutils test_install for shared CPython builds --- tests/test_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_install.py b/tests/test_install.py index 2133fa7916..e065aa3dcd 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -202,6 +202,7 @@ def test_record_extensions(self): support.copy_xxmodule_c(project_dir) buildcmd = build_ext(dist) + support.fixup_build_ext(buildcmd) buildcmd.ensure_finalized() buildcmd.run() From 9e1eee4615f9ef0410ef1502b111c74c7880e32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 21 Aug 2011 17:03:19 +0200 Subject: [PATCH 3253/8469] Fix distutils test_install for shared CPython builds --- tests/test_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_install.py b/tests/test_install.py index 2133fa7916..e065aa3dcd 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -202,6 +202,7 @@ def test_record_extensions(self): support.copy_xxmodule_c(project_dir) buildcmd = build_ext(dist) + support.fixup_build_ext(buildcmd) buildcmd.ensure_finalized() buildcmd.run() From 54bac89d98770275e3801f293c88251211354d8c Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Sun, 21 Aug 2011 22:35:41 +0200 Subject: [PATCH 3254/8469] Issue #12678: Fix distutils sdist test on Windows. Patch by Jeremy Kloth. --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 440af9886c..f34f786c92 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -365,6 +365,7 @@ def test_manifest_comments(self): def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() + cmd.formats = ['gztar'] cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') self.write_file((self.tmp_dir, 'README.manual'), From 6e23eb2a22ad885a41f58d035b7d11c3e3c0658a Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Sun, 21 Aug 2011 22:35:41 +0200 Subject: [PATCH 3255/8469] Issue #12678: Fix distutils sdist test on Windows. Patch by Jeremy Kloth. --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 440af9886c..f34f786c92 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -365,6 +365,7 @@ def test_manifest_comments(self): def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() + cmd.formats = ['gztar'] cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') self.write_file((self.tmp_dir, 'README.manual'), From 5b49959934750e3cfd186c85fe8f5a4bcffc253b Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Sun, 21 Aug 2011 22:40:04 +0200 Subject: [PATCH 3256/8469] Issue #12678: Fix distutils sdist test on Windows. Patch by Jeremy Kloth. --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 8da6fe4de8..42faa5d16b 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -351,6 +351,7 @@ def test_get_file_list(self): # filling data_files by pointing files in package_data dist.package_data = {'somecode': ['*.txt']} self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.formats = ['gztar'] cmd.ensure_finalized() cmd.run() From fa9b78e7d73bf1af3d6959caa43d19c7d6059240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 24 Aug 2011 01:29:10 +0200 Subject: [PATCH 3257/8469] Fix distutils tests on Windows (#12678). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - First, support.fixup_build_ext (already used to set proper library_dirs value under Unix shared builds) gains the ability to correctly set the debug attribute under Windows debug builds. - Second, the filename for the extension module gets a _d suffix under debug builds. - Third, the test code properly puts our customized build_ext object into an internal dictionary to make sure that the install command will later use our object instead of re-creating one. That’s the downside of using low-level APIs in our test code: we have to manually push knobs and turn handles that would otherwise be handled behind the scenes. Thanks to Nadeem for the testing. --- tests/support.py | 28 +++++++++++++++++----------- tests/test_build_ext.py | 7 ------- tests/test_install.py | 18 +++++++++++++----- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/tests/support.py b/tests/support.py index 562a65c861..7a76ca05a0 100644 --- a/tests/support.py +++ b/tests/support.py @@ -169,23 +169,29 @@ def _get_xxmodule_path(): def fixup_build_ext(cmd): - """Function needed to make build_ext tests pass on shared builds. + """Function needed to make build_ext tests pass. - When Python was build with --enable-shared, -L. is not good enough to find - the libpython.so. This is because regrtest runs it under a tempdir, - not in the top level where the .so lives. By the time we've gotten here, - Python's already been chdir'd to the tempdir. This function work arounds - that. Example use: + When Python was build with --enable-shared on Unix, -L. is not good + enough to find the libpython.so. This is because regrtest runs + it under a tempdir, not in the top level where the .so lives. By the + time we've gotten here, Python's already been chdir'd to the tempdir. + + When Python was built with in debug mode on Windows, build_ext commands + need their debug attribute set, and it is not done automatically for + some reason. + + This function handles both of these things. Example use: cmd = build_ext(dist) support.fixup_build_ext(cmd) cmd.ensure_finalized() """ - # To further add to the fun, we can't just add library_dirs to the - # Extension() instance because that doesn't get plumbed through to the - # final compiler command. - if (sysconfig.get_config_var('Py_ENABLE_SHARED') and - not sys.platform.startswith('win')): + if os.name == 'nt': + cmd.debug = sys.executable.endswith('_d.exe') + elif sysconfig.get_config_var('Py_ENABLE_SHARED'): + # To further add to the shared builds fun on Unix, we can't just add + # library_dirs to the Extension() instance because that doesn't get + # plumbed through to the final compiler command. runshared = sysconfig.get_config_var('RUNSHARED') if runshared is None: cmd.library_dirs = ['.'] diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 8eb59b4d2e..1827437628 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -47,10 +47,6 @@ def test_build_ext(self): dist.package_dir = self.tmp_dir cmd = build_ext(dist) fixup_build_ext(cmd) - if os.name == "nt": - # On Windows, we must build a debug version iff running - # a debug build of Python - cmd.debug = sys.executable.endswith("_d.exe") cmd.build_lib = self.tmp_dir cmd.build_temp = self.tmp_dir @@ -305,9 +301,6 @@ def test_get_outputs(self): cmd.ensure_finalized() self.assertEqual(len(cmd.get_outputs()), 1) - if os.name == "nt": - cmd.debug = sys.executable.endswith("_d.exe") - cmd.build_lib = os.path.join(self.tmp_dir, 'build') cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') diff --git a/tests/test_install.py b/tests/test_install.py index e065aa3dcd..5c105af95a 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -18,6 +18,14 @@ from distutils.tests import support + +def _make_ext_name(modname): + if os.name == 'nt': + if sys.executable.endswith('_d.exe'): + modname += '_d' + return modname + sysconfig.get_config_var('SO') + + class InstallTestCase(support.TempdirManager, support.EnvironGuard, support.LoggingSilencer, @@ -201,13 +209,13 @@ def test_record_extensions(self): os.chdir(project_dir) support.copy_xxmodule_c(project_dir) - buildcmd = build_ext(dist) - support.fixup_build_ext(buildcmd) - buildcmd.ensure_finalized() - buildcmd.run() + buildextcmd = build_ext(dist) + support.fixup_build_ext(buildextcmd) + buildextcmd.ensure_finalized() cmd = install(dist) dist.command_obj['install'] = cmd + dist.command_obj['build_ext'] = buildextcmd cmd.root = install_dir cmd.record = os.path.join(project_dir, 'RECORD') cmd.ensure_finalized() @@ -220,7 +228,7 @@ def test_record_extensions(self): f.close() found = [os.path.basename(line) for line in content.splitlines()] - expected = ['xx%s' % sysconfig.get_config_var('SO'), + expected = [_make_ext_name('xx'), 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) From c8bf9949a369a69aa561332b150f813539dbfd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 24 Aug 2011 01:29:10 +0200 Subject: [PATCH 3258/8469] Fix distutils tests on Windows (#12678). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - First, support.fixup_build_ext (already used to set proper library_dirs value under Unix shared builds) gains the ability to correctly set the debug attribute under Windows debug builds. - Second, the filename for the extension module gets a _d suffix under debug builds. - Third, the test code properly puts our customized build_ext object into an internal dictionary to make sure that the install command will later use our object instead of re-creating one. That’s the downside of using low-level APIs in our test code: we have to manually push knobs and turn handles that would otherwise be handled behind the scenes. Thanks to Nadeem for the testing. --- tests/support.py | 28 +++++++++++++++++----------- tests/test_build_ext.py | 7 ------- tests/test_install.py | 18 +++++++++++++----- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/tests/support.py b/tests/support.py index ffef98bae4..dc0e660e69 100644 --- a/tests/support.py +++ b/tests/support.py @@ -169,23 +169,29 @@ def _get_xxmodule_path(): def fixup_build_ext(cmd): - """Function needed to make build_ext tests pass on shared builds. + """Function needed to make build_ext tests pass. - When Python was build with --enable-shared, -L. is not good enough to find - the libpython.so. This is because regrtest runs it under a tempdir, - not in the top level where the .so lives. By the time we've gotten here, - Python's already been chdir'd to the tempdir. This function work arounds - that. Example use: + When Python was build with --enable-shared on Unix, -L. is not good + enough to find the libpython.so. This is because regrtest runs + it under a tempdir, not in the top level where the .so lives. By the + time we've gotten here, Python's already been chdir'd to the tempdir. + + When Python was built with in debug mode on Windows, build_ext commands + need their debug attribute set, and it is not done automatically for + some reason. + + This function handles both of these things. Example use: cmd = build_ext(dist) support.fixup_build_ext(cmd) cmd.ensure_finalized() """ - # To further add to the fun, we can't just add library_dirs to the - # Extension() instance because that doesn't get plumbed through to the - # final compiler command. - if (sysconfig.get_config_var('Py_ENABLE_SHARED') and - not sys.platform.startswith('win')): + if os.name == 'nt': + cmd.debug = sys.executable.endswith('_d.exe') + elif sysconfig.get_config_var('Py_ENABLE_SHARED'): + # To further add to the shared builds fun on Unix, we can't just add + # library_dirs to the Extension() instance because that doesn't get + # plumbed through to the final compiler command. runshared = sysconfig.get_config_var('RUNSHARED') if runshared is None: cmd.library_dirs = ['.'] diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 8eb59b4d2e..1827437628 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -47,10 +47,6 @@ def test_build_ext(self): dist.package_dir = self.tmp_dir cmd = build_ext(dist) fixup_build_ext(cmd) - if os.name == "nt": - # On Windows, we must build a debug version iff running - # a debug build of Python - cmd.debug = sys.executable.endswith("_d.exe") cmd.build_lib = self.tmp_dir cmd.build_temp = self.tmp_dir @@ -305,9 +301,6 @@ def test_get_outputs(self): cmd.ensure_finalized() self.assertEqual(len(cmd.get_outputs()), 1) - if os.name == "nt": - cmd.debug = sys.executable.endswith("_d.exe") - cmd.build_lib = os.path.join(self.tmp_dir, 'build') cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') diff --git a/tests/test_install.py b/tests/test_install.py index e065aa3dcd..5c105af95a 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -18,6 +18,14 @@ from distutils.tests import support + +def _make_ext_name(modname): + if os.name == 'nt': + if sys.executable.endswith('_d.exe'): + modname += '_d' + return modname + sysconfig.get_config_var('SO') + + class InstallTestCase(support.TempdirManager, support.EnvironGuard, support.LoggingSilencer, @@ -201,13 +209,13 @@ def test_record_extensions(self): os.chdir(project_dir) support.copy_xxmodule_c(project_dir) - buildcmd = build_ext(dist) - support.fixup_build_ext(buildcmd) - buildcmd.ensure_finalized() - buildcmd.run() + buildextcmd = build_ext(dist) + support.fixup_build_ext(buildextcmd) + buildextcmd.ensure_finalized() cmd = install(dist) dist.command_obj['install'] = cmd + dist.command_obj['build_ext'] = buildextcmd cmd.root = install_dir cmd.record = os.path.join(project_dir, 'RECORD') cmd.ensure_finalized() @@ -220,7 +228,7 @@ def test_record_extensions(self): f.close() found = [os.path.basename(line) for line in content.splitlines()] - expected = ['xx%s' % sysconfig.get_config_var('SO'), + expected = [_make_ext_name('xx'), 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) From aa066f5e3d725c0b3aff6f5c10488b054d4bc846 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 25 Aug 2011 18:32:02 +0200 Subject: [PATCH 3259/8469] Issue #12333: fix test_distutils failures under Solaris and derivatives --- tests/support.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/support.py b/tests/support.py index dc0e660e69..44fcd6b7d8 100644 --- a/tests/support.py +++ b/tests/support.py @@ -54,9 +54,13 @@ class TempdirManager(object): def setUp(self): super().setUp() + self.old_cwd = os.getcwd() self.tempdirs = [] def tearDown(self): + # Restore working dir, for Solaris and derivatives, where rmdir() + # on the current directory fails. + os.chdir(self.old_cwd) super().tearDown() while self.tempdirs: d = self.tempdirs.pop() From 6198e2b4d7424a977b9461df869598fb5404c3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 29 Aug 2011 21:48:39 +0200 Subject: [PATCH 3260/8469] Make bdist_* commands respect --skip-build passed to bdist (#10946) --- command/bdist_dumb.py | 5 +++-- command/bdist_msi.py | 6 ++++- command/bdist_wininst.py | 6 ++++- tests/test_bdist.py | 48 ++++++++++++++++++++++------------------ 4 files changed, 40 insertions(+), 25 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 170e889461..1ab09d1616 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -47,7 +47,7 @@ def initialize_options(self): self.format = None self.keep_temp = 0 self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.relative = 0 def finalize_options(self): @@ -65,7 +65,8 @@ def finalize_options(self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), - ('plat_name', 'plat_name')) + ('plat_name', 'plat_name'), + ('skip_build', 'skip_build')) def run(self): if not self.skip_build: diff --git a/command/bdist_msi.py b/command/bdist_msi.py index b11957a7dc..b3cfe9ceff 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -130,18 +130,22 @@ def initialize_options(self): self.no_target_optimize = 0 self.target_version = None self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.versions = None def finalize_options(self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') + short_version = get_python_version() if (not self.target_version) and self.distribution.has_ext_modules(): self.target_version = short_version + if self.target_version: self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b7916e31a1..e3ed3ad82c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -65,13 +65,15 @@ def initialize_options(self): self.dist_dir = None self.bitmap = None self.title = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.user_access_control = None def finalize_options(self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: if self.skip_build and self.plat_name: # If build is skipped and plat_name is overridden, bdist will @@ -81,8 +83,10 @@ def finalize_options(self): # next the command will be initialized using that name bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') + if not self.target_version: self.target_version = "" + if not self.skip_build and self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: diff --git a/tests/test_bdist.py b/tests/test_bdist.py index 94d40cc25b..503a6e857d 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -1,41 +1,47 @@ """Tests for distutils.command.bdist.""" -import unittest -import sys import os -import tempfile -import shutil +import unittest from test.support import run_unittest -from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support -from distutils.spawn import find_executable -from distutils import spawn -from distutils.errors import DistutilsExecError + class BuildTestCase(support.TempdirManager, unittest.TestCase): def test_formats(self): - # let's create a command and make sure - # we can fix the format - pkg_pth, dist = self.create_dist() + # we can set the format + dist = self.create_dist()[1] cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() self.assertEqual(cmd.formats, ['msi']) - # what format bdist offers ? - # XXX an explicit list in bdist is - # not the best way to bdist_* commands - # we should add a registry - formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar', - 'tar', 'wininst', 'msi'] - formats.sort() - founded = list(cmd.format_command.keys()) - founded.sort() - self.assertEqual(founded, formats) + # what formats does bdist offer? + formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar', + 'wininst', 'zip', 'ztar'] + found = sorted(cmd.format_command) + self.assertEqual(found, formats) + + def test_skip_build(self): + # bug #10946: bdist --skip-build should trickle down to subcommands + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.skip_build = 1 + cmd.ensure_finalized() + dist.command_obj['bdist'] = cmd + + names = ['bdist_dumb', 'bdist_wininst'] # bdist_rpm does not support --skip-build + if os.name == 'nt': + names.append('bdist_msi') + + for name in names: + subcmd = cmd.get_finalized_command(name) + self.assertTrue(subcmd.skip_build, + '%s should take --skip-build from bdist' % name) + def test_suite(): return unittest.makeSuite(BuildTestCase) From 48f414cea0e31da0a1267b9248ac38363d006fd4 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 3 Sep 2011 11:17:55 +0200 Subject: [PATCH 3261/8469] Bump to 3.2.2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b31b2d203d..9ec6165864 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.2rc1" +__version__ = "3.2.2" #--end constants-- From 3b9a1c74f1e174853a335c8662a3f6c7b81e4bd3 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 25 Aug 2011 18:32:02 +0200 Subject: [PATCH 3262/8469] Issue #12333: fix test_distutils failures under Solaris and derivatives --- tests/support.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/support.py b/tests/support.py index 7a76ca05a0..8452feb155 100644 --- a/tests/support.py +++ b/tests/support.py @@ -54,9 +54,13 @@ class TempdirManager(object): def setUp(self): super().setUp() + self.old_cwd = os.getcwd() self.tempdirs = [] def tearDown(self): + # Restore working dir, for Solaris and derivatives, where rmdir() + # on the current directory fails. + os.chdir(self.old_cwd) super().tearDown() while self.tempdirs: d = self.tempdirs.pop() From 55ab37cb7ef7e8527ba59c5e47a1bc99227df4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 00:03:22 +0200 Subject: [PATCH 3263/8469] Turn two ifs into one in the code I commited a few days ago --- tests/test_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index 5c105af95a..dfc46b197b 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -20,9 +20,8 @@ def _make_ext_name(modname): - if os.name == 'nt': - if sys.executable.endswith('_d.exe'): - modname += '_d' + if os.name == 'nt' and sys.executable.endswith('_d.exe'): + modname += '_d' return modname + sysconfig.get_config_var('SO') From e4a8ae8b1b59394478295eb916023e9dc4369026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 01:56:15 +0200 Subject: [PATCH 3264/8469] Refactor helpers for compiling the xx module in distutils tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I need to copy the xxmodule.c file in other tests, so I moved the support code to distutils.tests.support and improved it: - don’t skip when run from the Lib/distutils/tests directory - use proper skip machinery instead of custom print/return/test suite fiddling. I also took out the fixup_build_ext function, which is needed for tests to pass on Unix shared builds and Windows debug builds. Finally, I cleaned up a few things: - don’t remove directories in tearDown when the parent class’ tearDown has already registered the directories for removal - simplify restoration of sys.path - remove a few unused names found by pyflakes. --- tests/support.py | 76 +++++++++++++++++++++++++++++++++++++++++ tests/test_build_ext.py | 68 +++++------------------------------- 2 files changed, 85 insertions(+), 59 deletions(-) diff --git a/tests/support.py b/tests/support.py index 783318e8d3..788acdaa3e 100644 --- a/tests/support.py +++ b/tests/support.py @@ -1,7 +1,10 @@ """Support code for distutils test cases.""" import os +import sys import shutil import tempfile +import unittest +import sysconfig from copy import deepcopy import warnings @@ -9,6 +12,7 @@ from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution + def capture_warnings(func): def _capture_warnings(*args, **kw): with warnings.catch_warnings(): @@ -16,6 +20,7 @@ def _capture_warnings(*args, **kw): return func(*args, **kw) return _capture_warnings + class LoggingSilencer(object): def setUp(self): @@ -49,6 +54,7 @@ def _format(msg, args): def clear_logs(self): self.logs = [] + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. @@ -105,6 +111,7 @@ def create_dist(self, pkg_name='foo', **kw): return pkg_dir, dist + class DummyCommand: """Class to store options for retrieval via set_undefined_options().""" @@ -115,6 +122,7 @@ def __init__(self, **kwargs): def ensure_finalized(self): pass + class EnvironGuard(object): def setUp(self): @@ -131,3 +139,71 @@ def tearDown(self): del os.environ[key] super(EnvironGuard, self).tearDown() + + +def copy_xxmodule_c(directory): + """Helper for tests that need the xxmodule.c source file. + + Example use: + + def test_compile(self): + copy_xxmodule_c(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir)) + + If the source file can be found, it will be copied to *directory*. If not, + the test will be skipped. Errors during copy are not caught. + """ + filename = _get_xxmodule_path() + if filename is None: + raise unittest.SkipTest('cannot find xxmodule.c (test must run in ' + 'the python build dir)') + shutil.copy(filename, directory) + + +def _get_xxmodule_path(): + srcdir = sysconfig.get_config_var('srcdir') + candidates = [ + # use installed copy if available + os.path.join(os.path.dirname(__file__), 'xxmodule.c'), + # otherwise try using copy from build directory + os.path.join(srcdir, 'Modules', 'xxmodule.c'), + # srcdir mysteriously can be $srcdir/Lib/distutils/tests when + # this file is run from its parent directory, so walk up the + # tree to find the real srcdir + os.path.join(srcdir, '..', '..', '..', 'Modules', 'xxmodule.c'), + ] + for path in candidates: + if os.path.exists(path): + return path + + +def fixup_build_ext(cmd): + """Function needed to make build_ext tests pass. + + When Python was build with --enable-shared on Unix, -L. is not good + enough to find the libpython.so. This is because regrtest runs + it under a tempdir, not in the top level where the .so lives. By the + time we've gotten here, Python's already been chdir'd to the tempdir. + + When Python was built with in debug mode on Windows, build_ext commands + need their debug attribute set, and it is not done automatically for + some reason. + + This function handles both of these things. Example use: + + cmd = build_ext(dist) + support.fixup_build_ext(cmd) + cmd.ensure_finalized() + """ + if os.name == 'nt': + cmd.debug = sys.executable.endswith('_d.exe') + elif sysconfig.get_config_var('Py_ENABLE_SHARED'): + # To further add to the shared builds fun on Unix, we can't just add + # library_dirs to the Extension() instance because that doesn't get + # plumbed through to the final compiler command. + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index ced1329efd..30de0e2b7b 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,7 +1,5 @@ import sys import os -import tempfile -import shutil from StringIO import StringIO import textwrap @@ -19,76 +17,34 @@ # Don't load the xx module more than once. ALREADY_TESTED = False -def _get_source_filename(): - # use installed copy if available - tests_f = os.path.join(os.path.dirname(__file__), 'xxmodule.c') - if os.path.exists(tests_f): - return tests_f - # otherwise try using copy from build directory - srcdir = sysconfig.get_config_var('srcdir') - if srcdir is None: - return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') - return os.path.join(srcdir, 'Modules', 'xxmodule.c') - -_XX_MODULE_PATH = _get_source_filename() class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): def setUp(self): - # Create a simple test environment - # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") - if os.path.exists(_XX_MODULE_PATH): - self.sys_path = sys.path[:] - sys.path.append(self.tmp_dir) - shutil.copy(_XX_MODULE_PATH, self.tmp_dir) + self.tmp_dir = self.mkdtemp() + self.xx_created = False + sys.path.append(self.tmp_dir) + self.addCleanup(sys.path.remove, self.tmp_dir) def tearDown(self): - # Get everything back to normal - if os.path.exists(_XX_MODULE_PATH): + if self.xx_created: test_support.unload('xx') - sys.path[:] = self.sys_path # XXX on Windows the test leaves a directory # with xx module in TEMP - shutil.rmtree(self.tmp_dir, os.name == 'nt' or - sys.platform == 'cygwin') super(BuildExtTestCase, self).tearDown() - def _fixup_command(self, cmd): - # When Python was build with --enable-shared, -L. is not good enough - # to find the libpython.so. This is because regrtest runs it - # under a tempdir, not in the top level where the .so lives. By the - # time we've gotten here, Python's already been chdir'd to the - # tempdir. - # - # To further add to the fun, we can't just add library_dirs to the - # Extension() instance because that doesn't get plumbed through to the - # final compiler command. - if (sysconfig.get_config_var('Py_ENABLE_SHARED') and - not sys.platform.startswith('win')): - runshared = sysconfig.get_config_var('RUNSHARED') - if runshared is None: - cmd.library_dirs = ['.'] - else: - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) - - @unittest.skipIf(not os.path.exists(_XX_MODULE_PATH), - 'xxmodule.c not found') def test_build_ext(self): global ALREADY_TESTED + support.copy_xxmodule_c(self.tmp_dir) + self.xx_created = True xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') xx_ext = Extension('xx', [xx_c]) dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) dist.package_dir = self.tmp_dir cmd = build_ext(dist) - self._fixup_command(cmd) - if os.name == "nt": - # On Windows, we must build a debug version iff running - # a debug build of Python - cmd.debug = sys.executable.endswith("_d.exe") + support.fixup_build_ext(cmd) cmd.build_lib = self.tmp_dir cmd.build_temp = self.tmp_dir @@ -149,7 +105,6 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.finalize_options() - from distutils import sysconfig py_include = sysconfig.get_python_inc() self.assertTrue(py_include in cmd.include_dirs) @@ -277,13 +232,10 @@ def test_get_outputs(self): dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) cmd = build_ext(dist) - self._fixup_command(cmd) + support.fixup_build_ext(cmd) cmd.ensure_finalized() self.assertEqual(len(cmd.get_outputs()), 1) - if os.name == "nt": - cmd.debug = sys.executable.endswith("_d.exe") - cmd.build_lib = os.path.join(self.tmp_dir, 'build') cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') @@ -509,10 +461,8 @@ def _try_compile_deployment_target(self, operator, target): cmd.build_temp = self.tmp_dir try: - old_stdout = sys.stdout cmd.ensure_finalized() cmd.run() - except CompileError: self.fail("Wrong deployment target during compilation") From 997e4e8ba78bcff625c3b4b4ef9e244c2cc7cc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 02:00:14 +0200 Subject: [PATCH 3265/8469] Add tests for build_ext --user (backport from 3.2) --- tests/test_build_ext.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 30de0e2b7b..2fa63d300b 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -27,6 +27,12 @@ def setUp(self): self.xx_created = False sys.path.append(self.tmp_dir) self.addCleanup(sys.path.remove, self.tmp_dir) + if sys.version > "2.6": + import site + self.old_user_base = site.USER_BASE + site.USER_BASE = self.mkdtemp() + from distutils.command import build_ext + build_ext.USER_BASE = site.USER_BASE def tearDown(self): if self.xx_created: @@ -97,6 +103,36 @@ def test_solaris_enable_shared(self): # make sure we get some library dirs under solaris self.assertTrue(len(cmd.library_dirs) > 0) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + import site + dist = Distribution({'name': 'xx'}) + cmd = build_ext(dist) + + # making sure the user option is there + options = [name for name, short, label in + cmd.user_options] + self.assertIn('user', options) + + # setting a value + cmd.user = 1 + + # setting user based lib and include + lib = os.path.join(site.USER_BASE, 'lib') + incl = os.path.join(site.USER_BASE, 'include') + os.mkdir(lib) + os.mkdir(incl) + + cmd.ensure_finalized() + + # see if include_dirs and library_dirs were set + self.assertIn(lib, cmd.library_dirs) + self.assertIn(lib, cmd.rpath) + self.assertIn(incl, cmd.include_dirs) + def test_finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. From add9fe8cd89fd81c86867a7596b29d15d2a74294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 02:05:44 +0200 Subject: [PATCH 3266/8469] Try to fix test_distutils on Windows (#12678) --- tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 8da6fe4de8..4c80bc0bbe 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -422,6 +422,7 @@ def test_manifest_comments(self): def test_manual_manifest(self): # check that a MANIFEST without a marker is left alone dist, cmd = self.get_cmd() + cmd.formats = ['gztar'] cmd.ensure_finalized() self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') self.write_file((self.tmp_dir, 'README.manual'), From c166f6b99d408b46e92b3acaca0972085f658b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 02:06:27 +0200 Subject: [PATCH 3267/8469] Backport tests for the distutils install command --- tests/test_install.py | 195 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 193 insertions(+), 2 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index 4f976f34e6..ebfb04f446 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,17 +1,33 @@ """Tests for distutils.command.install.""" import os +import sys import unittest +import site -from test.test_support import run_unittest +from test.test_support import captured_stdout, run_unittest +from distutils import sysconfig from distutils.command.install import install +from distutils.command import install as install_module +from distutils.command.build_ext import build_ext +from distutils.command.install import INSTALL_SCHEMES from distutils.core import Distribution +from distutils.errors import DistutilsOptionError +from distutils.extension import Extension from distutils.tests import support -class InstallTestCase(support.TempdirManager, unittest.TestCase): +def _make_ext_name(modname): + if os.name == 'nt' and sys.executable.endswith('_d.exe'): + modname += '_d' + return modname + sysconfig.get_config_var('SO') + + +class InstallTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): def test_home_installation_scheme(self): # This ensure two things: @@ -49,6 +65,181 @@ def check_path(got, expected): check_path(cmd.install_scripts, os.path.join(destination, "bin")) check_path(cmd.install_data, destination) + def test_user_site(self): + # site.USER_SITE was introduced in 2.6 + if sys.version < '2.6': + return + + # preparing the environment for the test + self.old_user_base = site.USER_BASE + self.old_user_site = site.USER_SITE + self.tmpdir = self.mkdtemp() + self.user_base = os.path.join(self.tmpdir, 'B') + self.user_site = os.path.join(self.tmpdir, 'S') + site.USER_BASE = self.user_base + site.USER_SITE = self.user_site + install_module.USER_BASE = self.user_base + install_module.USER_SITE = self.user_site + + def _expanduser(path): + return self.tmpdir + self.old_expand = os.path.expanduser + os.path.expanduser = _expanduser + + try: + # this is the actual test + self._test_user_site() + finally: + site.USER_BASE = self.old_user_base + site.USER_SITE = self.old_user_site + install_module.USER_BASE = self.old_user_base + install_module.USER_SITE = self.old_user_site + os.path.expanduser = self.old_expand + + def _test_user_site(self): + for key in ('nt_user', 'unix_user', 'os2_home'): + self.assertTrue(key in INSTALL_SCHEMES) + + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # making sure the user option is there + options = [name for name, short, lable in + cmd.user_options] + self.assertTrue('user' in options) + + # setting a value + cmd.user = 1 + + # user base and site shouldn't be created yet + self.assertTrue(not os.path.exists(self.user_base)) + self.assertTrue(not os.path.exists(self.user_site)) + + # let's run finalize + cmd.ensure_finalized() + + # now they should + self.assertTrue(os.path.exists(self.user_base)) + self.assertTrue(os.path.exists(self.user_site)) + + self.assertTrue('userbase' in cmd.config_vars) + self.assertTrue('usersite' in cmd.config_vars) + + def test_handle_extra_path(self): + dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) + cmd = install(dist) + + # two elements + cmd.handle_extra_path() + self.assertEqual(cmd.extra_path, ['path', 'dirs']) + self.assertEqual(cmd.extra_dirs, 'dirs') + self.assertEqual(cmd.path_file, 'path') + + # one element + cmd.extra_path = ['path'] + cmd.handle_extra_path() + self.assertEqual(cmd.extra_path, ['path']) + self.assertEqual(cmd.extra_dirs, 'path') + self.assertEqual(cmd.path_file, 'path') + + # none + dist.extra_path = cmd.extra_path = None + cmd.handle_extra_path() + self.assertEqual(cmd.extra_path, None) + self.assertEqual(cmd.extra_dirs, '') + self.assertEqual(cmd.path_file, None) + + # three elements (no way !) + cmd.extra_path = 'path,dirs,again' + self.assertRaises(DistutilsOptionError, cmd.handle_extra_path) + + def test_finalize_options(self): + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # must supply either prefix/exec-prefix/home or + # install-base/install-platbase -- not both + cmd.prefix = 'prefix' + cmd.install_base = 'base' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # must supply either home or prefix/exec-prefix -- not both + cmd.install_base = None + cmd.home = 'home' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + # can't combine user with with prefix/exec_prefix/home or + # install_(plat)base + cmd.prefix = None + cmd.user = 'user' + self.assertRaises(DistutilsOptionError, cmd.finalize_options) + + def test_record(self): + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist(scripts=['hello']) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + self.write_file('hello', "print('o hai')") + + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'RECORD') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.record) + try: + content = f.read() + finally: + f.close() + + found = [os.path.basename(line) for line in content.splitlines()] + expected = ['hello', + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + + def test_record_extensions(self): + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist(ext_modules=[ + Extension('xx', ['xxmodule.c'])]) + self.addCleanup(os.chdir, os.getcwd()) + os.chdir(project_dir) + support.copy_xxmodule_c(project_dir) + + buildextcmd = build_ext(dist) + support.fixup_build_ext(buildextcmd) + buildextcmd.ensure_finalized() + + cmd = install(dist) + dist.command_obj['install'] = cmd + dist.command_obj['build_ext'] = buildextcmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'RECORD') + cmd.ensure_finalized() + cmd.run() + + f = open(cmd.record) + try: + content = f.read() + finally: + f.close() + + found = [os.path.basename(line) for line in content.splitlines()] + expected = [_make_ext_name('xx'), + 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] + self.assertEqual(found, expected) + + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout(): + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) def test_suite(): return unittest.makeSuite(InstallTestCase) From 20aa4645fe05e538fe7e1083bd87380b156d9fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 26 Aug 2011 16:35:19 +0200 Subject: [PATCH 3268/8469] Add FIXME note as a reminder --- tests/support.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/support.py b/tests/support.py index 788acdaa3e..648a8e4156 100644 --- a/tests/support.py +++ b/tests/support.py @@ -161,6 +161,8 @@ def test_compile(self): def _get_xxmodule_path(): + # FIXME when run from regrtest, srcdir seems to be '.', which does not help + # us find the xxmodule.c file srcdir = sysconfig.get_config_var('srcdir') candidates = [ # use installed copy if available From 8cd4035750552f84c14fd0d799aa848c643aae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 29 Aug 2011 21:48:39 +0200 Subject: [PATCH 3269/8469] Make bdist_* commands respect --skip-build passed to bdist (#10946) --- command/bdist_dumb.py | 5 +++-- command/bdist_msi.py | 6 ++++- command/bdist_wininst.py | 6 ++++- tests/test_bdist.py | 48 ++++++++++++++++++++++------------------ 4 files changed, 40 insertions(+), 25 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 170e889461..1ab09d1616 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -47,7 +47,7 @@ def initialize_options(self): self.format = None self.keep_temp = 0 self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.relative = 0 def finalize_options(self): @@ -65,7 +65,8 @@ def finalize_options(self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), - ('plat_name', 'plat_name')) + ('plat_name', 'plat_name'), + ('skip_build', 'skip_build')) def run(self): if not self.skip_build: diff --git a/command/bdist_msi.py b/command/bdist_msi.py index b11957a7dc..b3cfe9ceff 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -130,18 +130,22 @@ def initialize_options(self): self.no_target_optimize = 0 self.target_version = None self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.versions = None def finalize_options(self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') + short_version = get_python_version() if (not self.target_version) and self.distribution.has_ext_modules(): self.target_version = short_version + if self.target_version: self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b7916e31a1..e3ed3ad82c 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -65,13 +65,15 @@ def initialize_options(self): self.dist_dir = None self.bitmap = None self.title = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.user_access_control = None def finalize_options(self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: if self.skip_build and self.plat_name: # If build is skipped and plat_name is overridden, bdist will @@ -81,8 +83,10 @@ def finalize_options(self): # next the command will be initialized using that name bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') + if not self.target_version: self.target_version = "" + if not self.skip_build and self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: diff --git a/tests/test_bdist.py b/tests/test_bdist.py index 94d40cc25b..503a6e857d 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -1,41 +1,47 @@ """Tests for distutils.command.bdist.""" -import unittest -import sys import os -import tempfile -import shutil +import unittest from test.support import run_unittest -from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support -from distutils.spawn import find_executable -from distutils import spawn -from distutils.errors import DistutilsExecError + class BuildTestCase(support.TempdirManager, unittest.TestCase): def test_formats(self): - # let's create a command and make sure - # we can fix the format - pkg_pth, dist = self.create_dist() + # we can set the format + dist = self.create_dist()[1] cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() self.assertEqual(cmd.formats, ['msi']) - # what format bdist offers ? - # XXX an explicit list in bdist is - # not the best way to bdist_* commands - # we should add a registry - formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar', - 'tar', 'wininst', 'msi'] - formats.sort() - founded = list(cmd.format_command.keys()) - founded.sort() - self.assertEqual(founded, formats) + # what formats does bdist offer? + formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar', + 'wininst', 'zip', 'ztar'] + found = sorted(cmd.format_command) + self.assertEqual(found, formats) + + def test_skip_build(self): + # bug #10946: bdist --skip-build should trickle down to subcommands + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.skip_build = 1 + cmd.ensure_finalized() + dist.command_obj['bdist'] = cmd + + names = ['bdist_dumb', 'bdist_wininst'] # bdist_rpm does not support --skip-build + if os.name == 'nt': + names.append('bdist_msi') + + for name in names: + subcmd = cmd.get_finalized_command(name) + self.assertTrue(subcmd.skip_build, + '%s should take --skip-build from bdist' % name) + def test_suite(): return unittest.makeSuite(BuildTestCase) From 152743f52b84cd0b37f8f5ec8e10803181c41181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 30 Aug 2011 01:48:59 +0200 Subject: [PATCH 3270/8469] Make bdist_* commands respect --skip-build passed to bdist (#10946) --- command/bdist_dumb.py | 5 ++-- command/bdist_msi.py | 6 ++++- command/bdist_wininst.py | 6 ++++- tests/test_bdist.py | 49 +++++++++++++++++++++++----------------- 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 7c60d39be9..2f3c66829a 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -58,7 +58,7 @@ def initialize_options (self): self.format = None self.keep_temp = 0 self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.relative = 0 self.owner = None self.group = None @@ -78,7 +78,8 @@ def finalize_options(self): self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'), - ('plat_name', 'plat_name')) + ('plat_name', 'plat_name'), + ('skip_build', 'skip_build')) def run(self): if not self.skip_build: diff --git a/command/bdist_msi.py b/command/bdist_msi.py index ded837d752..703f873b16 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -131,18 +131,22 @@ def initialize_options (self): self.no_target_optimize = 0 self.target_version = None self.dist_dir = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.versions = None def finalize_options (self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'msi') + short_version = get_python_version() if (not self.target_version) and self.distribution.has_ext_modules(): self.target_version = short_version + if self.target_version: self.versions = [self.target_version] if not self.skip_build and self.distribution.has_ext_modules()\ diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 36d46bd627..aa9383af98 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -71,7 +71,7 @@ def initialize_options (self): self.dist_dir = None self.bitmap = None self.title = None - self.skip_build = 0 + self.skip_build = None self.install_script = None self.pre_install_script = None self.user_access_control = None @@ -80,6 +80,8 @@ def initialize_options (self): def finalize_options (self): + self.set_undefined_options('bdist', ('skip_build', 'skip_build')) + if self.bdist_dir is None: if self.skip_build and self.plat_name: # If build is skipped and plat_name is overridden, bdist will @@ -89,8 +91,10 @@ def finalize_options (self): # next the command will be initialized using that name bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') + if not self.target_version: self.target_version = "" + if not self.skip_build and self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: diff --git a/tests/test_bdist.py b/tests/test_bdist.py index fa7cd5adb5..121d0992db 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -1,42 +1,49 @@ """Tests for distutils.command.bdist.""" -import unittest -import sys import os -import tempfile -import shutil +import unittest from test.test_support import run_unittest -from distutils.core import Distribution from distutils.command.bdist import bdist from distutils.tests import support -from distutils.spawn import find_executable -from distutils import spawn -from distutils.errors import DistutilsExecError + class BuildTestCase(support.TempdirManager, unittest.TestCase): def test_formats(self): - # let's create a command and make sure - # we can fix the format - pkg_pth, dist = self.create_dist() + # we can set the format + dist = self.create_dist()[1] cmd = bdist(dist) cmd.formats = ['msi'] cmd.ensure_finalized() self.assertEqual(cmd.formats, ['msi']) - # what format bdist offers ? - # XXX an explicit list in bdist is - # not the best way to bdist_* commands - # we should add a registry - formats = ['rpm', 'zip', 'gztar', 'bztar', 'ztar', - 'tar', 'wininst', 'msi'] - formats.sort() - founded = cmd.format_command.keys() - founded.sort() - self.assertEqual(founded, formats) + # what formats does bdist offer? + formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar', + 'wininst', 'zip', 'ztar'] + found = sorted(cmd.format_command) + self.assertEqual(found, formats) + + def test_skip_build(self): + # bug #10946: bdist --skip-build should trickle down to subcommands + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.skip_build = 1 + cmd.ensure_finalized() + dist.command_obj['bdist'] = cmd + + names = ['bdist_dumb', 'bdist_wininst'] + # bdist_rpm does not support --skip-build + if os.name == 'nt': + names.append('bdist_msi') + + for name in names: + subcmd = cmd.get_finalized_command(name) + self.assertTrue(subcmd.skip_build, + '%s should take --skip-build from bdist' % name) + def test_suite(): return unittest.makeSuite(BuildTestCase) From b568b2ffb5d4e5c767452fce2353adec70d93a00 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Tue, 30 Aug 2011 12:34:37 -0400 Subject: [PATCH 3271/8469] First stab at a fix. The hack that allows it to work is that it allows the easy_install command to take a '-' argument which simply means 'don't run', so that arguments can be passed to the easy_install command from the comannd line without running it. --HG-- branch : distribute extra : rebase_source : 6eff3586cbcf36e846b3419218979d03079d1bcf --- setuptools/command/easy_install.py | 22 +++++++++++++++++++++- setuptools/dist.py | 3 ++- setuptools/package_index.py | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 853753c19b..3f1b42284d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -267,7 +267,8 @@ def finalize_options(self): ) else: self.all_site_dirs.append(normalize_path(d)) - if not self.editable: self.check_site_dir() + if not self.editable and self.args != ['-']: + self.check_site_dir() self.index_url = self.index_url or "http://pypi.python.org/simple" self.shadow_path = self.all_site_dirs[:] for path_item in self.install_dir, normalize_path(self.script_dir): @@ -338,6 +339,11 @@ def expand_dirs(self): 'install_scripts', 'install_data',]) def run(self): + if self.args == ['-']: + # A single dash as an argument means 'do nothing' and is just a way + # to pass arguments to the easy_install command without running it + return + if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: @@ -1079,6 +1085,20 @@ def build_and_install(self, setup_script, setup_base): ) try: args.append(dist_dir) + ei_opts = self.distribution.get_option_dict('easy_install').copy() + keep = ( + 'find_links', 'site_dirs', 'index_url', 'optimize', + 'site_dirs', 'allow_hosts' + ) + for key in ei_opts.keys(): + if key not in keep: + del ei_opts[key] + if ei_opts: + args.append('easy_install') + for key, val in ei_opts.iteritems(): + args.append('--%s=%s' % (key.replace('_', '-'), val[1])) + args.append('-') + self.run_setup(setup_script, setup_base, args) all_eggs = Environment([dist_dir]) eggs = [] diff --git a/setuptools/dist.py b/setuptools/dist.py index 0ad18122cf..204dcdfa6b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -269,8 +269,9 @@ def fetch_build_egg(self, req): cmd.package_index.to_scan = [] except AttributeError: from setuptools.command.easy_install import easy_install - dist = self.__class__({'script_args':['easy_install']}) + dist = self.__class__() dist.parse_config_files() + dist.parse_command_line() opts = dist.get_option_dict('easy_install') keep = ( 'find_links', 'site_dirs', 'index_url', 'optimize', diff --git a/setuptools/package_index.py b/setuptools/package_index.py index bb0ae12996..1dccabcb38 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -842,4 +842,4 @@ def local_open(url): -# this line is a kludge to keep the trailing blank lines for pje's editor \ No newline at end of file +# this line is a kludge to keep the trailing blank lines for pje's editor From 0d6b0fdd59f5fb29c06ed335fc7597951c5f277f Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Tue, 30 Aug 2011 13:03:25 -0400 Subject: [PATCH 3272/8469] Fix unintended addition of newline --HG-- branch : distribute extra : rebase_source : 9ba9d12380a73ae3a0908a0015b887dbe26bd7ae --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1dccabcb38..bb0ae12996 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -842,4 +842,4 @@ def local_open(url): -# this line is a kludge to keep the trailing blank lines for pje's editor +# this line is a kludge to keep the trailing blank lines for pje's editor \ No newline at end of file From 3c115835bc766964c0fb33fb0636538030c03135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 1 Sep 2011 23:37:56 +0200 Subject: [PATCH 3273/8469] Fix typo (was build) and remove redundancy in docstring --- tests/support.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/support.py b/tests/support.py index 44fcd6b7d8..d77bbee362 100644 --- a/tests/support.py +++ b/tests/support.py @@ -175,10 +175,9 @@ def _get_xxmodule_path(): def fixup_build_ext(cmd): """Function needed to make build_ext tests pass. - When Python was build with --enable-shared on Unix, -L. is not good - enough to find the libpython.so. This is because regrtest runs - it under a tempdir, not in the top level where the .so lives. By the - time we've gotten here, Python's already been chdir'd to the tempdir. + When Python was built with --enable-shared on Unix, -L. is not enough to + find libpython.so, because regrtest runs in a tempdir, not in the + source directory where the .so lives. When Python was built with in debug mode on Windows, build_ext commands need their debug attribute set, and it is not done automatically for From f2643f2baea9c954e666420396b85ee94658dc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 3 Sep 2011 00:28:43 +0200 Subject: [PATCH 3274/8469] Enable catching WARN-level logging messages in distutils' test_sdist --- tests/test_sdist.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f34f786c92..f9e28c8471 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -78,9 +78,6 @@ def get_cmd(self, metadata=None): dist.include_package_data = True cmd = sdist(dist) cmd.dist_dir = 'dist' - def _warn(*args): - pass - cmd.warn = _warn return dist, cmd @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') @@ -235,7 +232,8 @@ def test_metadata_check_option(self): # with the `check` subcommand cmd.ensure_finalized() cmd.run() - warnings = self.get_logs(WARN) + warnings = [msg for msg in self.get_logs(WARN) if + msg.startswith('warning: check:')] self.assertEqual(len(warnings), 2) # trying with a complete set of metadata @@ -244,7 +242,8 @@ def test_metadata_check_option(self): cmd.ensure_finalized() cmd.metadata_check = 0 cmd.run() - warnings = self.get_logs(WARN) + warnings = [msg for msg in self.get_logs(WARN) if + msg.startswith('warning: check:')] self.assertEqual(len(warnings), 0) def test_check_metadata_deprecated(self): From 2b01850d8817f36295cde7daf2ac670582514e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 3 Sep 2011 00:28:43 +0200 Subject: [PATCH 3275/8469] Enable catching WARN-level logging messages in distutils' test_sdist --- tests/test_sdist.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 2f09c9bea1..5134e6aba2 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -85,9 +85,6 @@ def get_cmd(self, metadata=None): dist.include_package_data = True cmd = sdist(dist) cmd.dist_dir = 'dist' - def _warn(*args): - pass - cmd.warn = _warn return dist, cmd @unittest.skipUnless(zlib, "requires zlib") @@ -242,7 +239,8 @@ def test_metadata_check_option(self): # with the `check` subcommand cmd.ensure_finalized() cmd.run() - warnings = self.get_logs(WARN) + warnings = [msg for msg in self.get_logs(WARN) if + msg.startswith('warning: check:')] self.assertEqual(len(warnings), 2) # trying with a complete set of metadata @@ -251,7 +249,8 @@ def test_metadata_check_option(self): cmd.ensure_finalized() cmd.metadata_check = 0 cmd.run() - warnings = self.get_logs(WARN) + warnings = [msg for msg in self.get_logs(WARN) if + msg.startswith('warning: check:')] self.assertEqual(len(warnings), 0) def test_check_metadata_deprecated(self): From e5113fc0545f3bb694c82341216ced067dac3dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 3 Sep 2011 00:42:04 +0200 Subject: [PATCH 3276/8469] Warn instead of crashing because of invalid path in MANIFEST.in (#8286). sdist used to crash with a full traceback dump instead of printing a nice warning with the faulty line number. --- command/sdist.py | 5 ++++- tests/test_sdist.py | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 21ea61d96a..a9429a4296 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -306,7 +306,10 @@ def read_template(self): try: self.filelist.process_template_line(line) - except DistutilsTemplateError as msg: + # the call above can raise a DistutilsTemplateError for + # malformed lines, or a ValueError from the lower-level + # convert_path function + except (DistutilsTemplateError, ValueError) as msg: self.warn("%s, line %d: %s" % (template.filename, template.current_line, msg)) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index f9e28c8471..529b4ef5c6 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -15,6 +15,7 @@ from distutils.errors import DistutilsOptionError from distutils.spawn import find_executable from distutils.log import WARN +from distutils.filelist import FileList from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ @@ -265,7 +266,6 @@ def test_show_formats(self): self.assertEqual(len(output), num_formats) def test_finalize_options(self): - dist, cmd = self.get_cmd() cmd.finalize_options() @@ -285,6 +285,32 @@ def test_finalize_options(self): cmd.formats = 'supazipa' self.assertRaises(DistutilsOptionError, cmd.finalize_options) + # the following tests make sure there is a nice error message instead + # of a traceback when parsing an invalid manifest template + + def _test_template(self, content): + dist, cmd = self.get_cmd() + os.chdir(self.tmp_dir) + self.write_file('MANIFEST.in', content) + cmd.ensure_finalized() + cmd.filelist = FileList() + cmd.read_template() + warnings = self.get_logs(WARN) + self.assertEqual(len(warnings), 1) + + def test_invalid_template_unknown_command(self): + self._test_template('taunt knights *') + + def test_invalid_template_wrong_arguments(self): + # this manifest command takes one argument + self._test_template('prune') + + @unittest.skipIf(os.name != 'nt', 'test relevant for Windows only') + def test_invalid_template_wrong_path(self): + # on Windows, trailing slashes are not allowed + # this used to crash instead of raising a warning: #8286 + self._test_template('include examples/') + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_get_file_list(self): # make sure MANIFEST is recalculated From e5ed1dfa7ad8b538fdb67ef59174ab17f0ee677d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 3 Sep 2011 00:47:07 +0200 Subject: [PATCH 3277/8469] Warn instead of crashing because of invalid path in MANIFEST.in (#8286). sdist used to crash with a full traceback dump instead of printing a nice warning with the faulty line number. --- command/sdist.py | 5 ++++- tests/test_sdist.py | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 75950f3d18..d30de10673 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -320,7 +320,10 @@ def read_template(self): try: self.filelist.process_template_line(line) - except DistutilsTemplateError, msg: + # the call above can raise a DistutilsTemplateError for + # malformed lines, or a ValueError from the lower-level + # convert_path function + except (DistutilsTemplateError, ValueError) as msg: self.warn("%s, line %d: %s" % (template.filename, template.current_line, msg)) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 5134e6aba2..33f6ee69a9 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -29,6 +29,7 @@ from distutils.errors import DistutilsOptionError from distutils.spawn import find_executable from distutils.log import WARN +from distutils.filelist import FileList from distutils.archive_util import ARCHIVE_FORMATS SETUP_PY = """ @@ -272,7 +273,6 @@ def test_show_formats(self): self.assertEqual(len(output), num_formats) def test_finalize_options(self): - dist, cmd = self.get_cmd() cmd.finalize_options() @@ -342,6 +342,32 @@ def test_make_distribution_owner_group(self): finally: archive.close() + # the following tests make sure there is a nice error message instead + # of a traceback when parsing an invalid manifest template + + def _test_template(self, content): + dist, cmd = self.get_cmd() + os.chdir(self.tmp_dir) + self.write_file('MANIFEST.in', content) + cmd.ensure_finalized() + cmd.filelist = FileList() + cmd.read_template() + warnings = self.get_logs(WARN) + self.assertEqual(len(warnings), 1) + + def test_invalid_template_unknown_command(self): + self._test_template('taunt knights *') + + def test_invalid_template_wrong_arguments(self): + # this manifest command takes one argument + self._test_template('prune') + + @unittest.skipIf(os.name != 'nt', 'test relevant for Windows only') + def test_invalid_template_wrong_path(self): + # on Windows, trailing slashes are not allowed + # this used to crash instead of raising a warning: #8286 + self._test_template('include examples/') + @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): # make sure MANIFEST is recalculated From e95a6f1db95dfd2ebb63de9af3211718bb47346a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 5 Sep 2011 23:44:56 +0200 Subject: [PATCH 3278/8469] Issue #9561: distutils now reads and writes egg-info files using UTF-8 instead of the locale encoding. --- command/install_egg_info.py | 5 ++--- dist.py | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/command/install_egg_info.py b/command/install_egg_info.py index c8880310df..c2a7d649c0 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -40,9 +40,8 @@ def run(self): "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: - f = open(target, 'w') - self.distribution.metadata.write_pkg_file(f) - f.close() + with open(target, 'w', encoding='UTF-8') as f: + self.distribution.metadata.write_pkg_file(f) def get_outputs(self): return self.outputs diff --git a/dist.py b/dist.py index 02cd79ba2f..8ca5b6f4f1 100644 --- a/dist.py +++ b/dist.py @@ -1010,11 +1010,9 @@ def __init__ (self): def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. """ - pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w') - try: + with open(os.path.join(base_dir, 'PKG-INFO'), 'w', + encoding='UTF-8') as pkg_info: self.write_pkg_file(pkg_info) - finally: - pkg_info.close() def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. From beedb510e63fa7cf09ef572c178a0e6a161335fa Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Fri, 9 Sep 2011 18:50:59 +0200 Subject: [PATCH 3279/8469] Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou --- tests/support.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/support.py b/tests/support.py index 648a8e4156..a2190c0214 100644 --- a/tests/support.py +++ b/tests/support.py @@ -63,9 +63,13 @@ class TempdirManager(object): def setUp(self): super(TempdirManager, self).setUp() + self.old_cwd = os.getcwd() self.tempdirs = [] def tearDown(self): + # Restore working dir, for Solaris and derivatives, where rmdir() + # on the current directory fails. + os.chdir(self.old_cwd) super(TempdirManager, self).tearDown() while self.tempdirs: d = self.tempdirs.pop() From 274ec9cd20e5bdf61fbb0b5c468b547607cf50f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 10 Sep 2011 01:34:44 +0200 Subject: [PATCH 3280/8469] Slight cleanup in distutils test_dist. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have tests to add in this file and it’s always nice to start from a clean base. --- tests/test_dist.py | 98 ++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index a20d6c8ffc..7050cbed26 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -74,7 +74,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assertTrue(isinstance(cmd, test_dist)) + self.assertIsInstance(cmd, test_dist) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -106,28 +106,23 @@ def test_command_packages_configfile(self): def test_empty_options(self): # an empty options dictionary should not stay in the # list of attributes - klass = Distribution # catching warnings warns = [] + def _warn(msg): warns.append(msg) - old_warn = warnings.warn + self.addCleanup(setattr, warnings, 'warn', warnings.warn) warnings.warn = _warn - try: - dist = klass(attrs={'author': 'xxx', - 'name': 'xxx', - 'version': 'xxx', - 'url': 'xxxx', - 'options': {}}) - finally: - warnings.warn = old_warn + dist = Distribution(attrs={'author': 'xxx', 'name': 'xxx', + 'version': 'xxx', 'url': 'xxxx', + 'options': {}}) self.assertEqual(len(warns), 0) + self.assertNotIn('options', dir(dist)) def test_finalize_options(self): - attrs = {'keywords': 'one,two', 'platforms': 'one,two'} @@ -150,7 +145,6 @@ def test_get_command_packages(self): cmds = dist.get_command_packages() self.assertEqual(cmds, ['distutils.command', 'one', 'two']) - def test_announce(self): # make sure the level is known dist = Distribution() @@ -158,6 +152,7 @@ def test_announce(self): kwargs = {'level': 'ok2'} self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): @@ -170,15 +165,20 @@ def tearDown(self): sys.argv[:] = self.argv[1] super(MetadataTestCase, self).tearDown() + def format_metadata(self, dist): + sio = io.StringIO() + dist.metadata.write_pkg_file(sio) + return sio.getvalue() + def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.0" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.0", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertNotIn("requires:", meta.lower()) + self.assertNotIn("obsoletes:", meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -190,9 +190,9 @@ def test_provides(self): self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("requires:", meta.lower()) + self.assertNotIn("obsoletes:", meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -210,11 +210,11 @@ def test_requires(self): self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("Requires: other" in meta) - self.assertTrue("Requires: another (==1.0)" in meta) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertIn("Requires: other", meta) + self.assertIn("Requires: another (==1.0)", meta) + self.assertNotIn("obsoletes:", meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -232,11 +232,11 @@ def test_obsoletes(self): self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("Obsoletes: other" in meta) - self.assertTrue("Obsoletes: another (<1.0)" in meta) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertNotIn("requires:", meta.lower()) + self.assertIn("Obsoletes: other", meta) + self.assertIn("Obsoletes: another (<1.0)", meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -244,10 +244,20 @@ def test_obsoletes_illegal(self): "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) - def format_metadata(self, dist): - sio = io.StringIO() - dist.metadata.write_pkg_file(sio) - return sio.getvalue() + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertIn(long_desc, meta) def test_custom_pydistutils(self): # fixes #2166 @@ -272,14 +282,14 @@ def test_custom_pydistutils(self): if sys.platform in ('linux', 'darwin'): os.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assertTrue(user_filename in files) + self.assertIn(user_filename, files) # win32-style if sys.platform == 'win32': # home drive should be found os.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assertTrue(user_filename in files, + self.assertIn(user_filename, files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -301,22 +311,8 @@ def test_show_help(self): output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assertTrue(len(output) > 0) - - def test_long_description(self): - long_desc = textwrap.dedent("""\ - example:: - We start here - and continue here - and end here.""") - attrs = {"name": "package", - "version": "1.0", - "long_description": long_desc} + self.assertTrue(output) - dist = Distribution(attrs) - meta = self.format_metadata(dist) - meta = meta.replace('\n' + 8 * ' ', '\n') - self.assertTrue(long_desc in meta) def test_suite(): suite = unittest.TestSuite() From 9da8782eff11b5aa19156596f5cfec1d776c776f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 10 Sep 2011 01:51:40 +0200 Subject: [PATCH 3281/8469] =?UTF-8?q?Fix=20determination=20of=20Metadata?= =?UTF-8?q?=20version=20(#8933).=20=20Patch=20by=20Filip=20Gruszczy=C5=84s?= =?UTF-8?q?ki.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist.py | 3 ++- tests/test_dist.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 8ca5b6f4f1..69825f206f 100644 --- a/dist.py +++ b/dist.py @@ -1018,7 +1018,8 @@ def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = '1.0' - if self.provides or self.requires or self.obsoletes: + if (self.provides or self.requires or self.obsoletes or + self.classifiers or self.download_url): version = '1.1' file.write('Metadata-Version: %s\n' % version) diff --git a/tests/test_dist.py b/tests/test_dist.py index 7050cbed26..8aaae88cae 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -244,6 +244,20 @@ def test_obsoletes_illegal(self): "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) + def test_classifier(self): + attrs = {'name': 'Boa', 'version': '3.0', + 'classifiers': ['Programming Language :: Python :: 3']} + dist = Distribution(attrs) + meta = self.format_metadata(dist) + self.assertIn('Metadata-Version: 1.1', meta) + + def test_download_url(self): + attrs = {'name': 'Boa', 'version': '3.0', + 'download_url': 'http://example.org/boa'} + dist = Distribution(attrs) + meta = self.format_metadata(dist) + self.assertIn('Metadata-Version: 1.1', meta) + def test_long_description(self): long_desc = textwrap.dedent("""\ example:: From 4af2ac319602a3e46acfb4c97cc34d374433dd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 10 Sep 2011 05:37:33 +0200 Subject: [PATCH 3282/8469] Slight cleanup in distutils test_dist. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have tests to add in this file and it’s always nice to start from a clean base. I’ve also changed a test that used to write an invalid config file ('[global]command_packages = etc.' on one line), but the test passes before and after this change, so either it magically works or the test is poorly written. Sigh. --- tests/test_dist.py | 103 +++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index ba60638179..ff9fa8fc58 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,12 +8,13 @@ import warnings import textwrap -from distutils.dist import Distribution, fix_help_options, DistributionMetadata +from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command import distutils.dist from test.test_support import TESTFN, captured_stdout, run_unittest from distutils.tests import support + class test_dist(Command): """Sample distutils extension command.""" @@ -61,7 +62,7 @@ def create_distribution(self, configfiles=()): def test_debug_mode(self): with open(TESTFN, "w") as f: - f.write("[global]") + f.write("[global]\n") f.write("command_packages = foo.bar, splat") files = [TESTFN] @@ -97,7 +98,7 @@ def test_command_packages_cmdline(self): self.assertEqual(d.get_command_packages(), ["distutils.command", "foo.bar", "distutils.tests"]) cmd = d.get_command_obj("test_dist") - self.assertTrue(isinstance(cmd, test_dist)) + self.assertIsInstance(cmd, test_dist) self.assertEqual(cmd.sample_option, "sometext") def test_command_packages_configfile(self): @@ -105,8 +106,8 @@ def test_command_packages_configfile(self): self.addCleanup(os.unlink, TESTFN) f = open(TESTFN, "w") try: - print >>f, "[global]" - print >>f, "command_packages = foo.bar, splat" + print >> f, "[global]" + print >> f, "command_packages = foo.bar, splat" finally: f.close() @@ -138,7 +139,6 @@ def test_write_pkg_file(self): 'description': u'Café torréfié', 'long_description': u'Héhéhé'}) - # let's make sure the file can be written # with Unicode fields. they are encoded with # PKG_INFO_ENCODING @@ -152,33 +152,28 @@ def test_write_pkg_file(self): 'long_description': 'Hehehe'}) my_file2 = os.path.join(tmp_dir, 'f2') - dist.metadata.write_pkg_file(open(my_file, 'w')) + dist.metadata.write_pkg_file(open(my_file2, 'w')) def test_empty_options(self): # an empty options dictionary should not stay in the # list of attributes - klass = Distribution # catching warnings warns = [] + def _warn(msg): warns.append(msg) - old_warn = warnings.warn + self.addCleanup(setattr, warnings, 'warn', warnings.warn) warnings.warn = _warn - try: - dist = klass(attrs={'author': 'xxx', - 'name': 'xxx', - 'version': 'xxx', - 'url': 'xxxx', - 'options': {}}) - finally: - warnings.warn = old_warn + dist = Distribution(attrs={'author': 'xxx', 'name': 'xxx', + 'version': 'xxx', 'url': 'xxxx', + 'options': {}}) self.assertEqual(len(warns), 0) + self.assertNotIn('options', dir(dist)) def test_finalize_options(self): - attrs = {'keywords': 'one,two', 'platforms': 'one,two'} @@ -201,7 +196,6 @@ def test_get_command_packages(self): cmds = dist.get_command_packages() self.assertEqual(cmds, ['distutils.command', 'one', 'two']) - def test_announce(self): # make sure the level is known dist = Distribution() @@ -251,15 +245,30 @@ def tearDown(self): sys.argv[:] = self.argv[1] super(MetadataTestCase, self).tearDown() + def test_long_description(self): + long_desc = textwrap.dedent("""\ + example:: + We start here + and continue here + and end here.""") + attrs = {"name": "package", + "version": "1.0", + "long_description": long_desc} + + dist = Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + self.assertIn(long_desc, meta) + def test_simple_metadata(self): attrs = {"name": "package", "version": "1.0"} dist = Distribution(attrs) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.0" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.0", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertNotIn("requires:", meta.lower()) + self.assertNotIn("obsoletes:", meta.lower()) def test_provides(self): attrs = {"name": "package", @@ -271,9 +280,9 @@ def test_provides(self): self.assertEqual(dist.get_provides(), ["package", "package.sub"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("requires:", meta.lower()) + self.assertNotIn("obsoletes:", meta.lower()) def test_provides_illegal(self): self.assertRaises(ValueError, Distribution, @@ -291,11 +300,11 @@ def test_requires(self): self.assertEqual(dist.get_requires(), ["other", "another (==1.0)"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("Requires: other" in meta) - self.assertTrue("Requires: another (==1.0)" in meta) - self.assertTrue("obsoletes:" not in meta.lower()) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertIn("Requires: other", meta) + self.assertIn("Requires: another (==1.0)", meta) + self.assertNotIn("obsoletes:", meta.lower()) def test_requires_illegal(self): self.assertRaises(ValueError, Distribution, @@ -313,11 +322,11 @@ def test_obsoletes(self): self.assertEqual(dist.get_obsoletes(), ["other", "another (<1.0)"]) meta = self.format_metadata(dist) - self.assertTrue("Metadata-Version: 1.1" in meta) - self.assertTrue("provides:" not in meta.lower()) - self.assertTrue("requires:" not in meta.lower()) - self.assertTrue("Obsoletes: other" in meta) - self.assertTrue("Obsoletes: another (<1.0)" in meta) + self.assertIn("Metadata-Version: 1.1", meta) + self.assertNotIn("provides:", meta.lower()) + self.assertNotIn("requires:", meta.lower()) + self.assertIn("Obsoletes: other", meta) + self.assertIn("Obsoletes: another (<1.0)", meta) def test_obsoletes_illegal(self): self.assertRaises(ValueError, Distribution, @@ -353,14 +362,14 @@ def test_custom_pydistutils(self): if sys.platform in ('linux', 'darwin'): os.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assertTrue(user_filename in files) + self.assertIn(user_filename, files) # win32-style if sys.platform == 'win32': # home drive should be found os.environ['HOME'] = temp_dir files = dist.find_config_files() - self.assertTrue(user_filename in files, + self.assertIn(user_filename, files, '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) @@ -382,22 +391,7 @@ def test_show_help(self): output = [line for line in s.getvalue().split('\n') if line.strip() != ''] - self.assertTrue(len(output) > 0) - - def test_long_description(self): - long_desc = textwrap.dedent("""\ - example:: - We start here - and continue here - and end here.""") - attrs = {"name": "package", - "version": "1.0", - "long_description": long_desc} - - dist = distutils.dist.Distribution(attrs) - meta = self.format_metadata(dist) - meta = meta.replace('\n' + 8 * ' ', '\n') - self.assertTrue(long_desc in meta) + self.assertTrue(output) def test_read_metadata(self): attrs = {"name": "package", @@ -426,6 +420,7 @@ def test_read_metadata(self): self.assertEqual(metadata.obsoletes, None) self.assertEqual(metadata.requires, ['foo']) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From d6c0aeb23999b2de522fcd76ad067de8acf34d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 10 Sep 2011 05:39:45 +0200 Subject: [PATCH 3283/8469] =?UTF-8?q?Fix=20determination=20of=20Metadata?= =?UTF-8?q?=20version=20(#8933).=20=20Patch=20by=20Filip=20Gruszczy=C5=84s?= =?UTF-8?q?ki.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist.py | 3 ++- tests/test_dist.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 597909ea1a..e025313dbd 100644 --- a/dist.py +++ b/dist.py @@ -1111,7 +1111,8 @@ def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = '1.0' - if self.provides or self.requires or self.obsoletes: + if (self.provides or self.requires or self.obsoletes or + self.classifiers or self.download_url): version = '1.1' self._write_field(file, 'Metadata-Version', version) diff --git a/tests/test_dist.py b/tests/test_dist.py index ff9fa8fc58..4b7bbeb33e 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -245,6 +245,20 @@ def tearDown(self): sys.argv[:] = self.argv[1] super(MetadataTestCase, self).tearDown() + def test_classifier(self): + attrs = {'name': 'Boa', 'version': '3.0', + 'classifiers': ['Programming Language :: Python :: 3']} + dist = Distribution(attrs) + meta = self.format_metadata(dist) + self.assertIn('Metadata-Version: 1.1', meta) + + def test_download_url(self): + attrs = {'name': 'Boa', 'version': '3.0', + 'download_url': 'http://example.org/boa'} + dist = Distribution(attrs) + meta = self.format_metadata(dist) + self.assertIn('Metadata-Version: 1.1', meta) + def test_long_description(self): long_desc = textwrap.dedent("""\ example:: From 4593c7e5cdc0e467a1c1957a0c864db804c4147a Mon Sep 17 00:00:00 2001 From: guyroz Date: Fri, 16 Sep 2011 23:10:06 +0300 Subject: [PATCH 3284/8469] Issue #237: fixing test on Python2.3 Added an _assertIn method (copied from a more recent version of unittest) and replaced the calls to assertTrue, which does not exist in Python 2.3 --HG-- branch : distribute extra : rebase_source : a8ba9e47fdcbc2dbee8e801b5d1d5d84c989266f --- setuptools/tests/test_resources.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index c10ca21083..227ecfdfba 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -8,6 +8,16 @@ except NameError: from sets import ImmutableSet as frozenset +def safe_repr(obj, short=False): + """ copied from Python2.7""" + try: + result = repr(obj) + except Exception: + result = object.__repr__(obj) + if not short or len(result) < _MAX_LENGTH: + return result + return result[:_MAX_LENGTH] + ' [truncated]...' + class Metadata(EmptyProvider): """Mock object to return metadata as if from an on-disk distribution""" @@ -580,6 +590,13 @@ def tearDown(self): pkg_resources._namespace_packages = self._ns_pkgs.copy() sys.path = self._prev_sys_path[:] + def _assertIn(self, member, container): + """ assertIn and assertTrue does not exist in Python2.3""" + if member not in container: + standardMsg = '%s not found in %s' % (safe_repr(member), + safe_repr(container)) + self.fail(self._formatMessage(msg, standardMsg)) + def test_two_levels_deep(self): """ Test nested namespace packages @@ -603,13 +620,13 @@ def test_two_levels_deep(self): pkg2_init.write(ns_str) pkg2_init.close() import pkg1 - self.assertTrue("pkg1" in pkg_resources._namespace_packages.keys()) + self._assertIn("pkg1", pkg_resources._namespace_packages.keys()) try: import pkg1.pkg2 except ImportError, e: self.fail("Distribute tried to import the parent namespace package") # check the _namespace_packages dict - self.assertTrue("pkg1.pkg2" in pkg_resources._namespace_packages.keys()) + self._assertIn("pkg1.pkg2", pkg_resources._namespace_packages.keys()) self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) # check the __path__ attribute contains both paths self.assertEqual(pkg1.pkg2.__path__, [ From c0032c0de589c7f8f633314cae891bbb2191dbce Mon Sep 17 00:00:00 2001 From: guyroz Date: Sat, 17 Sep 2011 16:20:05 +0300 Subject: [PATCH 3285/8469] Issue #208: fixing parse_version and post-release tags including tests --HG-- branch : distribute extra : rebase_source : f953ba35614c338161249d6d74c7cda08acdf32b --- pkg_resources.py | 4 +--- setuptools/tests/test_resources.py | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 52d92669b3..e8dae8a420 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1912,7 +1912,7 @@ def yield_lines(strs): def _parse_version_parts(s): for part in component_re.split(s): part = replace(part,part) - if not part or part=='.': + if part in ['', '.']: continue if part[:1] in '0123456789': yield part.zfill(8) # pad for numeric comparison @@ -1955,8 +1955,6 @@ def parse_version(s): parts = [] for part in _parse_version_parts(s.lower()): if part.startswith('*'): - if part<'*final': # remove '-' before a prerelease tag - while parts and parts[-1]=='*final-': parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1]=='00000000': parts.pop() diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 227ecfdfba..3e0309f19d 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -477,14 +477,13 @@ def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) self.assertEqual(p1,p2, (s1,s2,p1,p2)) - c('1.2-rc1', '1.2rc1') c('0.4', '0.4.0') c('0.4.0.0', '0.4.0') c('0.4.0-0', '0.4-0') c('0pl1', '0.0pl1') c('0pre1', '0.0c1') c('0.0.0preview1', '0c1') - c('0.0c1', '0-rc1') + c('0.0c1', '0rc1') c('1.2a1', '1.2.a.1'); c('1.2...a', '1.2a') def testVersionOrdering(self): @@ -493,11 +492,14 @@ def c(s1,s2): self.assert_(p1 Date: Sat, 17 Sep 2011 16:24:50 +0300 Subject: [PATCH 3286/8469] Issue #207: updated executables for 32bit and 64bit --HG-- branch : distribute extra : rebase_source : feb8ad4f829140739feeba915b835dbd26ab1b80 --- setuptools/cli-32.exe | Bin 0 -> 69632 bytes setuptools/cli-64.exe | Bin 0 -> 75264 bytes setuptools/cli.exe | Bin 7168 -> 69632 bytes setuptools/gui-32.exe | Bin 0 -> 65536 bytes setuptools/gui-64.exe | Bin 0 -> 75264 bytes setuptools/gui.exe | Bin 7168 -> 7168 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 setuptools/cli-32.exe create mode 100644 setuptools/cli-64.exe create mode 100644 setuptools/gui-32.exe create mode 100644 setuptools/gui-64.exe diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe new file mode 100644 index 0000000000000000000000000000000000000000..9b7717b78bbf71f105ccde26746a0f6e3a4d12db GIT binary patch literal 69632 zcmeFae|%KM)jxhWyGb@=lU*Qz009<=iUtu~qKQjzA=wa=z{bdiRT8iQu3Ks`+za?f zAn|5tZZ5adR$Kd2S}FKE__Td$Kb0T0f?0wI;4gkuM4>h+)rm_rlr&i&=6>I2?&b&D zKHum2*XN%vymIf%+%q$0&YW{*=FFMdvir9QW z;vOTMAP9*R#lQZy;4>M-LYi6d)N??}N16G1;6;hTw9A4pm52Vt!($SBK;{4KUt`zT z`lKCkpz^Q&O&3>g5b?3>2p)tNwUs(~$UmnbET3Mp;z9921Q6kEpN#k0_#5)igQ}(* zV8Y>Cd~l#*DzkG45P}{-Xr5lPa`kr~5`^dNln{p#@E-EdBM5VcMF0Qb|3wPuVvd#m z*q&rTkefX|wk-*P!?sYul9t8l1=VYnFW9tFQhO-lQzQZlLsh_z~f?4X7SN003w+j`!PPQg3Es2^@P?OM@RHA!h1y!+)zoksW382W= znlxE$Th>})5~?3K+TyPanGRaOZGQIeRy@(NEHzfi{2V?5kku`VwO{9my}Dk1!3KHQ zQ8!|a;CfvNH$n^g)jdz+)s$4J9(Wc3_3dctoLRR>mex7?(k4?wvvg4lH==kSUg$J> zK}YyBZ=KK2Zmr!#Uzsyw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XQa;W5J>3?~eq7=ohSiF!Y(C2FoQ)A%>zcgA*OhIy&^ z&*o3f?Wk3#CETL0L|CkrWtK8ag=LFntK~tcHkk-y4-rVb&K@@ z%-(I*?bce%-4QY4VkX8+iBZMqVvI4C7+XwL%+{C(V;;ra?T9hO#>Xy$`MBP_CN*%5KRGqAOUGtviQ;k#`i_w{N^2dL+(Usg}jShN?k%k_^S?L0$~ zVLj&b+lC{Cj|^WL;-fYK!-pE}(Vs^TH9u*&)0%CK1jc$I=9w5b`W^|^fG&qIS(T&O zraGefK~tjr1SRjU8>Q3e5_ILdUAlXtc1JZu^)*hw%9&(bWh^%iHO-HnX?B|pX!%zy zHI`x4BDV<`#3Cxx*~QxQwt2w~Vt)vFI!oi_MZ?NwUnc z*nuS%SQc59TCy!JOZinJcDLnO%O1;1mVK5t(5eS42Q5b}jh2&^)0Q(>Q_oohON*to zYg9|EGHbY1VU4gxT8CSe)^XN})+tt%)rQ`fWwl#VtqZJ+tV_}7Io5pZTB|)KHO4>7 bsj9#HerbVUTHu!!_@xDYX@UROTi|~I?X2KC literal 0 HcmV?d00001 diff --git a/setuptools/cli-64.exe b/setuptools/cli-64.exe new file mode 100644 index 0000000000000000000000000000000000000000..265585afc4042ce55c59d28ef1aab37f0a68ecdc GIT binary patch literal 75264 zcmeFad3;nw)<4{x?j}u==7yyufJg%kMxz*wOG1P8g^u2qj>Zuc6*U@V7)1xey?`T2 z;_W!;ls)pyI5RrqIE>EX=#1km536EAAPYMv8bl@T)i!DnO~QJA-&56{1k~q!e(&e~ z^UVkP)~)r_sZ*y;opY*g*)1z<4x7#9#DB}O+1B7me?js4KmT+fdC-`3gKYm9xP9yz zdu03AnR9=%z&F3@$3LvP^L}6Doeww!d%<4UA@P z^4)>>O)ss?4YX_V zhb*nKl|PtmvlVp}eIBXoZnlln;>r|^QO!;oK|yk;*@cQueNL1un=qh z*KCb#WheQ6p`7M8P|(%vn5|h&$&8{dDxq1M>l}Cw2fkSHDvAv0SLAkCL}T;(n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&BX17*Pf?Z3Y#vJ%_tXAA!#^)5TbeFWe(U=h%J{QQ3eaoo-T literal 0 HcmV?d00001 diff --git a/setuptools/gui-64.exe b/setuptools/gui-64.exe new file mode 100644 index 0000000000000000000000000000000000000000..3ab4378e1d401d198b92a33ce249d29bcdb26a63 GIT binary patch literal 75264 zcmeFadwf*Y)jvFwnIS`x;e^XT0FeO(MS~a}F9`!W2PS$(CK@YhRMcn`v0A0!9KgyY z@l0%n%~YP&wzjn`Rr`2ptF5)jMKK|eg!{!?fL8Fz9!4~XCgFO1-?jHl5>TJ_d4GSr zf4zLjoPG9n?X}lld+oK>-ly!=Wj2S+W^>}tvTU}Mc+$U+`2C-MIFkE~T;0$1THmds zR@$RmM@^q~{~X`!>WA;EzUxQ6s=FR~=waP=_r1Pq<00Su5Bb8^-QfGt!}r`f!Q;vC zr>lPPl7G}5x^dsG%-^P8Jh$r$@&3WCzvEdxEV3(!=O-83writ!UbE|fc+S{mis!Yv zKF9M1_gBrLI=&C$@=}}ap2wZGT?77ImdVp@8)M7O>T9#ThnNRt?3O}2^F=shrw4_z zY&IAD;9urxn~hXL8vY@rCQ~R~7O}FD%!Bf!V<>2I_P5){iBS5d(r$C-^p5zy47b~C z%Ot4ZS-}MT-uXIGPP~I30*Lya?gv8RpU-BioKStwUHV<1hw~7HI&J6UZx8-@{R@Fi zCdh2IPcB7*4>%c&r&D0AJ16orOqeY*iaw&Rwmc*c`&K?={r~^{e~AGtKEvfb66=;aC6RT;kzIs{f+?fdXwQGq-EUl`Qmt!0Q z9f3p9sxO;uqqRhZJ<8hatVQ=KBWtK1sD79Qz78njJGVt0|Qg=s+Roc+J{?*GTYC{ZwngN)#H5i+6k*Mpx!$MVq28{}XxftbNBu3hS*!iL5=5^t*Bb+nKd@el z$Nc3YX1B%~l@)z8b}Y70AGl1j8fuPSXgHfg){G_Y*hb?EEfMpFfQx8isXv677EOfx zAuTc8UxfZ>@vz^=uj>zvu)tqrQ|ev@4iF5@P-4#__&*iiE(;Gp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t_u*TpUH zEZZ&cQrle#6rFGhBk(7-TlBv>Y_~ws&lcPSioUai7byD2;xAD2cf~DGbYR6TQ1n|R hyuhWldnHixPQ_oK=wC{BfnW0!LAQVX{&!N~{{t5Eu08+& literal 0 HcmV?d00001 diff --git a/setuptools/gui.exe b/setuptools/gui.exe index 474838d5220133fc3bd4898bce43e12ffd0be09f..8906ff77a26d30d63766158b2cebe1284188e637 100644 GIT binary patch delta 374 zcmZp$Xt0>j!8mPVr#xfB#FhH2dD4sw%p32n=8Q}`?!w1WP0BN28w5+rB0mxVzl^3p)_j7A8N=<&n zEiL!&7f_73`7p~qpxYR%OF3#KyF+=pSvG;RJ)Eq}qaj$z2Gm>ww#y7;SMB5&9%)BM zplEOEm*}|o*u$ZnPlKD^h`eY8sXY9m4M>5#3v!2WX9&j!8m7Pr#$0=i7WM4KfPyQVA^Gx!A9%;s>lht`N1S{Eq%4$?tjju!kr$mHm4{z+0V$xXI2eJh>K5({QDNz3=wwlO5d*ZT d`G`n#>>&Y$2@^nW-n@s0gOPFf=A*pUd;o7^PZ9tC From 793092ce4a71e3c2ac8f5ea2bf30144f7104a4ad Mon Sep 17 00:00:00 2001 From: guyroz Date: Sat, 17 Sep 2011 16:25:22 +0300 Subject: [PATCH 3287/8469] Issue #207: passing ctrl-c events to python child process --HG-- branch : distribute extra : rebase_source : e8f22b9c0389b62edf48c5c540498f46fac206ea --- launcher.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 11 deletions(-) diff --git a/launcher.c b/launcher.c index 201219cc46..ea4c80b5c4 100755 --- a/launcher.c +++ b/launcher.c @@ -25,9 +25,12 @@ #include #include -#include +#include +#include +#include #include -#include "windows.h" + +int child_pid=0; int fail(char *format, char *data) { /* Print error message to stderr and return 2 */ @@ -35,10 +38,6 @@ int fail(char *format, char *data) { return 2; } - - - - char *quoted(char *data) { int i, ln = strlen(data), nb; @@ -90,7 +89,7 @@ char *loadable_exe(char *exename) { /* Return the absolute filename for spawnv */ result = calloc(MAX_PATH, sizeof(char)); strncpy(result, exename, MAX_PATH); - /*if (result) GetModuleFileName(hPython, result, MAX_PATH); + /*if (result) GetModuleFileNameA(hPython, result, MAX_PATH); FreeLibrary(hPython); */ return result; @@ -160,8 +159,82 @@ char **parse_argv(char *cmdline, int *argc) } while (1); } +void pass_control_to_child(DWORD control_type) { + /* + * distribute-issue207 + * passes the control event to child process (Python) + */ + if (!child_pid) { + return; + } + GenerateConsoleCtrlEvent(child_pid,0); +} + +BOOL control_handler(DWORD control_type) { + /* + * distribute-issue207 + * control event handler callback function + */ + switch (control_type) { + case CTRL_C_EVENT: + pass_control_to_child(0); + break; + } + return TRUE; +} + +int create_and_wait_for_subprocess(char* command) { + /* + * distribute-issue207 + * launches child process (Python) + */ + DWORD return_value = 0; + LPSTR commandline = command; + STARTUPINFOA s_info; + PROCESS_INFORMATION p_info; + ZeroMemory(&p_info, sizeof(p_info)); + ZeroMemory(&s_info, sizeof(s_info)); + s_info.cb = sizeof(STARTUPINFO); + // set-up control handler callback funciotn + SetConsoleCtrlHandler((PHANDLER_ROUTINE) control_handler, TRUE); + if (!CreateProcessA(NULL, commandline, NULL, NULL, TRUE, 0, NULL, NULL, &s_info, &p_info)) { + fprintf(stderr, "failed to create process.\n"); + return 0; + } + child_pid = p_info.dwProcessId; + // wait for Python to exit + WaitForSingleObject(p_info.hProcess, INFINITE); + if (!GetExitCodeProcess(p_info.hProcess, &return_value)) { + fprintf(stderr, "failed to get exit code from process.\n"); + return 0; + } + return return_value; +} +char* join_executable_and_args(char *executable, char **args, int argc) +{ + /* + * distribute-issue207 + * CreateProcess needs a long string of the executable and command-line arguments, + * so we need to convert it from the args that was built + */ + int len,counter; + char* cmdline; + + len=strlen(executable)+2; + for (counter=1; counterscript && *end != '.') *end-- = '\0'; @@ -236,12 +310,18 @@ int run(int argc, char **argv, int is_gui) { return fail("Could not exec %s", ptr); /* shouldn't get here! */ } - /* We *do* need to wait for a CLI to finish, so use spawn */ - return spawnv(P_WAIT, ptr, (const char * const *)(newargs)); + /* + * distribute-issue207: using CreateProcessA instead of spawnv + */ + cmdline = join_executable_and_args(ptr, newargs, parsedargc + argc); + return create_and_wait_for_subprocess(cmdline); } - int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpCmd, int nShow) { return run(__argc, __argv, GUI); } +int main(int argc, char** argv) { + return run(argc, argv, GUI); +} + From dff9e6b6bc0bd04180d00df52eb74340fa3df580 Mon Sep 17 00:00:00 2001 From: guyroz Date: Sat, 17 Sep 2011 16:27:04 +0300 Subject: [PATCH 3288/8469] Issue #238: using 65bit wrappers on Python64bit on windows --HG-- branch : distribute extra : rebase_source : c0f80f1633017229ec77f4cc1d7c56e86aba3a84 --- setuptools/command/easy_install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 853753c19b..4700fe0eaa 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -42,6 +42,10 @@ import site HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE +import struct +def is_64bit(): + return struct.calcsize("P") == 8 + def samefile(p1,p2): if hasattr(os.path,'samefile') and ( os.path.exists(p1) and os.path.exists(p2) @@ -1781,7 +1785,10 @@ def get_script_args(dist, executable=sys_executable, wininst=False): ext, launcher = '-script.py', 'cli.exe' old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - + if is_64bit(): + launcher = launcher.replace(".", "-64.") + else: + launcher = launcher.replace(".", "-32.") if os.path.exists(new_header[2:-1]) or sys.platform!='win32': hdr = new_header else: From 8b25dd9f9edc2f2506efb5a471f2facdf4082a31 Mon Sep 17 00:00:00 2001 From: guyroz Date: Mon, 19 Sep 2011 23:41:21 +0300 Subject: [PATCH 3289/8469] Fixing regression tests on Windows: #241, #240, #239 --HG-- branch : distribute extra : rebase_source : fb5248f9bd280ccc075c1e93dd74379bf06d10f7 --- distribute.egg-info/entry_points.txt | 122 +++++++++++++------------- setuptools/tests/test_easy_install.py | 21 +++-- 2 files changed, 76 insertions(+), 67 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..e99675cc9b 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 85616605c2..1ae0ba700c 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -67,7 +67,7 @@ def test_get_script_args(self): old_platform = sys.platform try: - name, script = get_script_args(dist).next() + name, script = get_script_args(dist).next()[0:2] finally: sys.platform = old_platform @@ -141,9 +141,13 @@ def test_add_from_cwd_site_sets_dirty(self): self.assert_(pth.dirty) def test_add_from_site_is_ignored(self): - pth = PthDistributions('does-not_exist', ['/test/location/does-not-have-to-exist']) + if os.name != 'nt': + location = '/test/location/does-not-have-to-exist' + else: + location = 'c:\\does_not_exist' + pth = PthDistributions('does-not_exist', [location, ]) self.assert_(not pth.dirty) - pth.add(PRDistribution('/test/location/does-not-have-to-exist')) + pth.add(PRDistribution(location)) self.assert_(not pth.dirty) @@ -221,7 +225,7 @@ def test_local_index(self): sys.path.append(target) old_ppath = os.environ.get('PYTHONPATH') - os.environ['PYTHONPATH'] = ':'.join(sys.path) + os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) try: dist = Distribution() dist.script_name = 'setup.py' @@ -234,8 +238,13 @@ def test_local_index(self): self.assertEquals(res.location, new_location) finally: sys.path.remove(target) - shutil.rmtree(new_location) - shutil.rmtree(target) + for basedir in [new_location, target, ]: + if not os.path.exists(basedir) or not os.path.isdir(basedir): + continue + try: + shutil.rmtree(basedir) + except: + pass if old_ppath is not None: os.environ['PYTHONPATH'] = old_ppath else: From 3b8de2876b38e5b2afc4210e6d37c5b90fecb8a4 Mon Sep 17 00:00:00 2001 From: guyroz Date: Tue, 20 Sep 2011 00:05:59 +0300 Subject: [PATCH 3290/8469] fixing regression -- generator syntax on python3 --HG-- branch : distribute extra : rebase_source : 3708d2ca5f9a8fc2398204dbcb3febb6d61e134b --- distribute.egg-info/entry_points.txt | 122 +++++++++++++------------- setuptools/tests/test_easy_install.py | 2 +- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index e99675cc9b..1c9f123d89 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1ae0ba700c..4150ad1061 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -67,7 +67,7 @@ def test_get_script_args(self): old_platform = sys.platform try: - name, script = get_script_args(dist).next()[0:2] + name, script = [i for i in get_script_args(dist).next()][0:2] finally: sys.platform = old_platform From 51e06f7936437e869dd4ad29f052435e3d814e61 Mon Sep 17 00:00:00 2001 From: guyroz Date: Tue, 20 Sep 2011 10:07:23 +0300 Subject: [PATCH 3291/8469] copying gui-32.exe to gui.exe --HG-- branch : distribute extra : rebase_source : 36d39326b09155e123f2ea69c8a2ab493e761126 --- setuptools/gui.exe | Bin 7168 -> 65536 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/setuptools/gui.exe b/setuptools/gui.exe index 8906ff77a26d30d63766158b2cebe1284188e637..3f64af7de42fd6597b4c6cf50896d32a98a7d6a2 100644 GIT binary patch literal 65536 zcmeFae|S{YwLg3&Gf7U!gfqYdf&>^KC>m6Bh$aq!!DK>If)gVXMhIXw5a1P*= zK=91ioNT7$wt8#7Ew^&fZ|!aSz4l%~>=jH1O~9Z0sER^utWx9l%)N5(?7p>{`Zel z_&j>*Z%0edXT3gczisjB)9#Kuu)(vw{-JNy-}`OPefK{2;6tkC8~1zawFf;9Jm@LE zv&Qr7ht}MGT~5xZf>hDpcxlDFEB|ogLxX>|Nw+;TQ^dUwHQ@b|A3XigbiA*BX5T|; z;{Ef7=8E@k9;y}ZJr7-l_gxR%7ojo+F%AYKX|c^NofvzjYA~%+vfHw4S(5Y$QkGb$ zk-AB&Aan{|4WZ-)0dBY53eI04X137Vn`KB}#KIO42M5`hWIly70BW z=tLZ-{8#_3Q}5rb;^U`B@gTgYt<y`Y?p5!VqzEFS?bGpo1Aim_`BBw% z7MOIn5FcEqn9A%P0feAml3FfL`Tt}8U!g!XD=&}}L0hxzj~&%6)+`Mb9;#(LQGTsG zY76qsqa;Z`EPGAwX`{Tr)hthdEK-CCQ>Nc@D_$QBpmH9NBBt_W+V*oYO#h=thm1$lVavX{iWIg`B^Yf;A~))Yt!=UuNk+83HD znr*Qb?TbXLzzL=eCUz9KAhy+sy9?ZRCCUrj!CL;K9BP}paZ7PQTse9)r$H>Stvap+V?Jg5d?_ZA`Vo^9nes$TZDoBY#hy)C&XtrLo-2`Rjhrb_cfjdJ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)!160wp z{(P&L4h(kbOu^rSmU~Bhni$B)wOX0}Y6K56CTgUCNTy4YMo#LJq`C2ZNDWESGI(M{ z(>nNuMNDhtHvLfQ0QgM@@(I-~AU{9_PuJ&i6IOA0LY3)1_xA)2hJh8Jk~0SzzI@FERcHJqj4 z?Hb;s;c^X^X}C(mTQuy^a7_XudB{H1635j4DjK(EW$X~0+~2luTm}jfKhnBAg3B`3 zm&WdxjmJ@fSM79FSxR=&o7aNZZlxqTw$=z-tH3SQR9WcPT@rxB9&&m`$x*Xj61+Pt z^Bh%G-UXIBw=S^woVx^f^}Ma~=d+xgd+-mx1&hvF;U14qkgD8wdxaWzWlrTcF7IEL zfJ;h7Jt^GC*hSFW$MAjw-Z1F!7~Y%UZCXD%Zfvg}{M~@30WE<20BSD)w*yWBP6OTt z3;^^S@Y^S|0Z##vtp)u9fJ1=40Nw)(05ajD1wifV z=+gvdudH$V1jcS+cG^UBjQx<=X&*8xvwH4`eICaSR~`ESv)i``Vy(mJa(K7- z*b2}dyWI`~Tc==@f|WH1N^sRVy>1s{>k@P|{m%&?d%Di-R Date: Tue, 20 Sep 2011 16:40:58 +0300 Subject: [PATCH 3292/8469] Issue #244 raises ValueError in upload and register commands if using a section without a repository value --HG-- branch : distribute extra : rebase_source : e57437a8ac03832ed8170c902996423a27235856 --- distribute.egg-info/entry_points.txt | 3 +- setuptools/command/__init__.py | 5 -- setuptools/command/register.py | 60 +++++++++++++++++++++ setuptools/command/upload.py | 78 +++++++++++++++++++++++++++- 4 files changed, 138 insertions(+), 8 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d89..3b205225af 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,6 +8,7 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs +upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install @@ -32,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.3 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 152406b332..a601e2d3d7 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -8,13 +8,8 @@ from setuptools.command import install_scripts import sys -if sys.version>='2.5': - # In Python 2.5 and above, distutils includes its own upload command - __all__.remove('upload') - from distutils.command.bdist import bdist - if 'egg' not in bdist.format_commands: bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") bdist.format_commands.append('egg') diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 3b2e085907..874401a5ca 100755 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -1,4 +1,6 @@ from distutils.command.register import register as _register +from ConfigParser import ConfigParser +import os class register(_register): __doc__ = _register.__doc__ @@ -6,5 +8,63 @@ class register(_register): def run(self): # Make sure that we are using valid current name/version info self.run_command('egg_info') + self._section_name = self.repository _register.run(self) + def _read_pypirc(self): + """Reads the .pypirc file.""" + rc = self._get_rc_file() + if os.path.exists(rc): + repository = self.repository + config = ConfigParser() + config.read(rc) + sections = config.sections() + if 'distutils' in sections: + # let's get the list of servers + index_servers = config.get('distutils', 'index-servers') + _servers = [server.strip() for server in + index_servers.split('\n') + if server.strip() != ''] + if _servers == []: + # nothing set, let's try to get the default pypi + if 'pypi' in sections: + _servers = ['pypi'] + else: + # the file is not properly defined, returning + # an empty dict + return {} + for server in _servers: + current = {'server': server} + current['username'] = config.get(server, 'username') + + # optional params + for key, default in (('repository', + None), + ('realm', self.DEFAULT_REALM), + ('password', None)): + if config.has_option(server, key): + current[key] = config.get(server, key) + else: + current[key] = default + if (current['server'] == repository or + current['repository'] == repository): + return current + elif 'server-login' in sections: + # old format + server = 'server-login' + if config.has_option(server, 'repository'): + repository = config.get(server, 'repository') + else: + repository = None + return {'username': config.get(server, 'username'), + 'password': config.get(server, 'password'), + 'repository': repository, + 'server': server, + 'realm': self.DEFAULT_REALM} + + return {} + + def _set_config(self): + _register._set_config(self) + if self.repository is None: + raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 1f49745e3e..042fcbb5ae 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -2,6 +2,7 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" + from distutils.errors import * from distutils.core import Command from distutils.spawn import spawn @@ -11,6 +12,7 @@ except ImportError: from md5 import md5 import os +import sys import socket import platform import ConfigParser @@ -19,7 +21,7 @@ import urlparse import cStringIO as StringIO -class upload(Command): +class _upload(Command): description = "upload binary package to PyPI" @@ -65,7 +67,7 @@ def finalize_options(self): if not self.password: self.password = config.get('server-login', 'password') if not self.repository: - self.repository = self.DEFAULT_REPOSITORY + raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) def run(self): if not self.distribution.dist_files: @@ -181,3 +183,75 @@ def upload_file(self, command, pyversion, filename): log.ERROR) if self.show_response: print '-'*75, r.read(), '-'*75 + +if sys.version >= "2.5": + from distutils.command.upload import upload as distutils_upload + class upload(distutils_upload): + + def run(self): + self._section_name = self.repository + distutils_upload.run(self) + + def _read_pypirc(self): + """Reads the .pypirc file.""" + self._section_name = self.repository + rc = self._get_rc_file() + if os.path.exists(rc): + repository = self.repository + config = ConfigParser.ConfigParser() + config.read(rc) + sections = config.sections() + if 'distutils' in sections: + # let's get the list of servers + index_servers = config.get('distutils', 'index-servers') + _servers = [server.strip() for server in + index_servers.split('\n') + if server.strip() != ''] + if _servers == []: + # nothing set, let's try to get the default pypi + if 'pypi' in sections: + _servers = ['pypi'] + else: + # the file is not properly defined, returning + # an empty dict + return {} + for server in _servers: + current = {'server': server} + current['username'] = config.get(server, 'username') + + # optional params + for key, default in (('repository', + None), + ('realm', self.DEFAULT_REALM), + ('password', None)): + if config.has_option(server, key): + current[key] = config.get(server, key) + else: + current[key] = default + if (current['server'] == repository or + current['repository'] == repository): + return current + elif 'server-login' in sections: + # old format + server = 'server-login' + if config.has_option(server, 'repository'): + repository = config.get(server, 'repository') + else: + repository = None + return {'username': config.get(server, 'username'), + 'password': config.get(server, 'password'), + 'repository': repository, + 'server': server, + 'realm': self.DEFAULT_REALM} + + return {} + + def finalize_options(self): + distutils_upload.finalize_options(self) + if not self.repository: + raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) + + +else: + upload = _upload + From 9806553a0ad3bb86da844606fbef832d5fccd106 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:28:31 +0300 Subject: [PATCH 3293/8469] Added tag 0.6.23 for changeset 1a1ab844f03e --HG-- branch : distribute extra : rebase_source : 1b1d9c1b07b730213328ea606e8bc78052cfd1a5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 734cd0c073..a63d11de3c 100644 --- a/.hgtags +++ b/.hgtags @@ -29,3 +29,4 @@ dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 c4a375336d552129aef174486018ed09c212d684 0.6.20 de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 +1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 From ea5a0098d408c1390a392d772b21b378a3880c22 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:28:31 +0300 Subject: [PATCH 3294/8469] bumped revision --HG-- branch : distribute extra : rebase_source : 830f7186c8f3c26e86eac1e4287f0545e23a2744 --- CHANGES.txt | 15 +++++++++++++++ distribute_setup.py | 2 +- release.sh | 2 +- setup.py | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fe529fb3a5..855447a786 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,21 @@ CHANGES ======= +------ +0.6.23 +------ + +* Issue #244: Fixed a test +* Issue #243: Fixed a test +* Issue #239: Fixed a test +* Issue #240: Fixed a test +* Issue #241: Fixed a test +* Issue #237: Fixed a test +* Issue #238: easy_install now uses 64bit executable wrappers on 64bit Python +* Issue #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation +* Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process +* Issue #227: easy_install now passe its arguments to setup.py bdist_egg + ------ 0.6.22 ------ diff --git a/distribute_setup.py b/distribute_setup.py index 2ee0f1249f..a16284497b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.22" +DEFAULT_VERSION = "0.6.23" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/release.sh b/release.sh index 0da1886273..cad44245a5 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.22" +export VERSION="0.6.23" # tagging hg tag $VERSION diff --git a/setup.py b/setup.py index 3e9754c789..216cdd2a7f 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.22" +VERSION = "0.6.23" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 1aa72667bc16834643bd9bc90fd226430b757d76 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:44:15 +0300 Subject: [PATCH 3295/8469] bumped revision --HG-- branch : distribute extra : rebase_source : 8fb241578720e046ebd938075664d0dc6bea0171 --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 3b205225af..1a12642720 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -33,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.3 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 829e6f0672d0b22fc93209599053e39691111520 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:45:50 +0300 Subject: [PATCH 3296/8469] bumped revision --HG-- branch : distribute extra : rebase_source : d66cd994b21e83e8419c4d94a0eb965f16d9ca83 --- README.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index 8faa59b472..887d811c6a 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.22.tar.gz - $ tar -xzvf distribute-0.6.22.tar.gz - $ cd distribute-0.6.22 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.23.tar.gz + $ tar -xzvf distribute-0.6.23.tar.gz + $ cd distribute-0.6.23 $ python setup.py install --------------------------- From ab76d9a3b0a38651bb07cb7aacba59ab7b9742fc Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:46:10 +0300 Subject: [PATCH 3297/8469] bumped revision --HG-- branch : distribute extra : rebase_source : e74b24ad1789428a550b7ef8593c1ffa04656087 --- distribute.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1a12642720..acbe228182 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -33,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl From 64cbfc7a171da28d6688356e27ae470b7ac41341 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:56:33 +0300 Subject: [PATCH 3298/8469] bumped revision --HG-- branch : distribute extra : rebase_source : 8ed8b565fc2a32f8da055ec9892a5a34daf6a24f --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e52891fe7a..601ac6ab68 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.17' +version = '0.6.23' # The full version, including alpha/beta/rc tags. -release = '0.6.17' +release = '0.6.23' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From b14d6f5de65d65d25af6a64741dad5160182ba48 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:57:34 +0300 Subject: [PATCH 3299/8469] Added tag 0.6.23 for changeset 9406c5dac842 --HG-- branch : distribute extra : rebase_source : 3e5a3d601c2c26d983e310ed298624ef241888dd --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index a63d11de3c..afbb60ffd3 100644 --- a/.hgtags +++ b/.hgtags @@ -30,3 +30,5 @@ a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 c4a375336d552129aef174486018ed09c212d684 0.6.20 de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 +1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 +9406c5dac8429216f1a264e6f692fdc534476acd 0.6.23 From ae7bd543495b7f0bb55ab674df1d01fdb47d1cc4 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 18:57:34 +0300 Subject: [PATCH 3300/8469] bumped revision --HG-- branch : distribute extra : rebase_source : ff16d114bfdaff7a969371dfb51f303298fec106 --- release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index cad44245a5..9c98f1d507 100755 --- a/release.sh +++ b/release.sh @@ -2,7 +2,7 @@ export VERSION="0.6.23" # tagging -hg tag $VERSION +hg tag $VERSION -f hg ci -m "bumped revision" # creating the releases @@ -11,6 +11,7 @@ rm -rf ./dist # now preparing the source release, pushing it and its doc python2.6 setup.py -q egg_info -RDb '' sdist register upload cd docs/ +make clean make html cd .. python2.6 setup.py upload_docs From d36c067b3247bf7dc3102051b088fe744ac74ae0 Mon Sep 17 00:00:00 2001 From: guyroz Date: Thu, 22 Sep 2011 20:50:45 +0300 Subject: [PATCH 3301/8469] Issue #246 --HG-- branch : distribute extra : rebase_source : e14172505ff8938f00f51de4f29a8fb2834ac933 --- setup.cfg | 2 +- setuptools/command/upload.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d7dfbb772e..0c5596134d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [egg_info] -tag_build = dev +tag_build = tag_svn_revision = 1 [aliases] diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 042fcbb5ae..1b70894395 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -228,8 +228,10 @@ def _read_pypirc(self): current[key] = config.get(server, key) else: current[key] = default + # Issue #246, handling url ambiguity if (current['server'] == repository or - current['repository'] == repository): + current['repository'] == repository or + (current['repository'] == "http://www.python.org/pypi" and repository == self.DEFAULT_REPOSITORY)): return current elif 'server-login' in sections: # old format From 694a9231f495a82cf62340f9b98eb4fd7272ecf3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 4 Oct 2011 11:01:49 -0400 Subject: [PATCH 3302/8469] Added options to exclude 2to3 fixers. Fixes #249 --HG-- branch : distribute extra : rebase_source : 2033bcdd4c2e78e0e03796f1f9cf6d6e9a59fc21 --- CHANGES.txt | 1 + docs/python3.txt | 33 +++++++++++++++------------------ setup.py | 3 ++- setuptools/command/build_py.py | 28 +++++++++++++++++++++------- 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 855447a786..6b981dd47d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,7 @@ CHANGES * Issue #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation * Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process * Issue #227: easy_install now passe its arguments to setup.py bdist_egg +* Issue #249: Added options to exclude 2to3 fixers ------ 0.6.22 diff --git a/docs/python3.txt b/docs/python3.txt index 43845f609d..2f6cde4ab3 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -26,18 +26,20 @@ directory, as opposed from the source directory as is normally done. Distribute will convert all Python files, and also all doctests in Python files. However, if you have doctests located in separate text files, these -will not automatically be converted. By adding them to the -``convert_2to3_doctests`` keyword parameter Distrubute will convert them as -well. +will not automatically be converted. By adding them to the +``convert_2to3_doctests`` keyword parameter Distrubute will convert them as +well. By default, the conversion uses all fixers in the ``lib2to3.fixers`` package. -To use additional fixes, the parameter ``use_2to3_fixers`` can be set -to a list of names of packages containing fixers. +To use additional fixers, the parameter ``use_2to3_fixers`` can be set +to a list of names of packages containing fixers. To exclude fixers, the +parameter ``use_2to3_exclude_fixers`` can be set to fixer names to be +skipped. A typical setup.py can look something like this:: from setuptools import setup - + setup( name='your.module', version = '1.0', @@ -49,7 +51,8 @@ A typical setup.py can look something like this:: test_suite = 'your.module.tests', use_2to3 = True, convert_2to3_doctests = ['src/your/module/README.txt'], - use_2to3_fixers = ['your.fixers'] + use_2to3_fixers = ['your.fixers'], + use_2to3_exclude_fixers = ['lib2to3.fixes.fix_import'], ) Differential conversion @@ -58,10 +61,10 @@ Differential conversion Note that a file will only be copied and converted during the build process if the source file has been changed. If you add a file to the doctests that should be converted, it will not be converted the next time you run -the tests, since it hasn't been modified. You need to remove it from the +the tests, since it hasn't been modified. You need to remove it from the build directory. Also if you run the build, install or test commands before adding the use_2to3 parameter, you will have to remove the build directory -before you run the test command, as the files otherwise will seem updated, +before you run the test command, as the files otherwise will seem updated, and no conversion will happen. In general, if code doesn't seem to be converted, deleting the build directory @@ -80,12 +83,6 @@ already converted code, and hence no 2to3 conversion is needed during install. Advanced features ================= -If certain fixers are to be suppressed, this again can be overridden with the -list ``setuptools.command.build_py.build_py.fixer_names``, which at some -point contains the list of all fixer class names. For an example of how this -can be done, see the `jaraco.util `_ -project. - If you don't want to run the 2to3 conversion on the doctests in Python files, you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. @@ -96,18 +93,18 @@ Setuptools do not know about the new keyword parameters to support Python 3. As a result it will warn about the unknown keyword parameters if you use setuptools instead of Distribute under Python 2. This is not an error, and install process will continue as normal, but if you want to get rid of that -error this is easy. Simply conditionally add the new parameters into an extra +error this is easy. Simply conditionally add the new parameters into an extra dict and pass that dict into setup():: from setuptools import setup import sys - + extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] extra['use_2to3_fixers'] = ['your.fixers'] - + setup( name='your.module', version = '1.0', diff --git a/setup.py b/setup.py index 216cdd2a7f..28efcf9756 100755 --- a/setup.py +++ b/setup.py @@ -172,7 +172,8 @@ def _being_installed(): "test_loader = setuptools.dist:check_importable", "use_2to3 = setuptools.dist:assert_bool", "convert_2to3_doctests = setuptools.dist:assert_string_list", - "use_2to3_fixers = setuptools.dist:assert_string_list", + "use_2to3_fixers = setuptools.dist:assert_string_list", + "use_2to3_exclude_fixers = setuptools.dist:assert_string_list", ], "egg_info.writers": [ diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index a01e28430a..d53960fe47 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -28,13 +28,8 @@ def run_2to3(self, files, doctests = False): if not files: return log.info("Fixing "+" ".join(files)) - if not self.fixer_names: - self.fixer_names = [] - for p in setuptools.lib2to3_fixer_packages: - self.fixer_names.extend(get_fixers_from_package(p)) - if self.distribution.use_2to3_fixers is not None: - for p in self.distribution.use_2to3_fixers: - self.fixer_names.extend(get_fixers_from_package(p)) + self.__build_fixer_names() + self.__exclude_fixers() if doctests: if setuptools.run_2to3_on_doctests: r = DistutilsRefactoringTool(self.fixer_names) @@ -42,6 +37,25 @@ def run_2to3(self, files, doctests = False): else: _Mixin2to3.run_2to3(self, files) + def __build_fixer_names(self): + if self.fixer_names: return + self.fixer_names = [] + for p in setuptools.lib2to3_fixer_packages: + self.fixer_names.extend(get_fixers_from_package(p)) + if self.distribution.use_2to3_fixers is not None: + for p in self.distribution.use_2to3_fixers: + self.fixer_names.extend(get_fixers_from_package(p)) + + def __exclude_fixers(self): + excluded_fixers = getattr(self, 'exclude_fixers', []) + if self.distribution.use_2to3_exclude_fixers is not None: + excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers) + for fixer_name in excluded_fixers: + if fixer_name not in self.fixer_names: + log.warn("Excluded fixer %s not found", fixer_name) + continue + self.fixer_names.remove(fixer_name) + except ImportError: class Mixin2to3: def run_2to3(self, files, doctests=True): From c2389b351fe071241bf68ec9d43a9fd384e84181 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 4 Oct 2011 11:28:31 -0400 Subject: [PATCH 3303/8469] Updated changelog to reflect change in proper revision --HG-- branch : distribute extra : rebase_source : cf900f1bec43dfd946065d1acc6ce88c726319a2 --- CHANGES.txt | 7 ++++++- distribute.egg-info/entry_points.txt | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6b981dd47d..a5b4f2bb0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.24 +------ + +* Issue #249: Added options to exclude 2to3 fixers + ------ 0.6.23 ------ @@ -16,7 +22,6 @@ CHANGES * Issue #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation * Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process * Issue #227: easy_install now passe its arguments to setup.py bdist_egg -* Issue #249: Added options to exclude 2to3 fixers ------ 0.6.22 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index acbe228182..4801e1f9fa 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -33,7 +33,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl @@ -42,6 +42,7 @@ svn_cvs = setuptools.command.sdist:_default_revctrl dependency_links = setuptools.dist:assert_string_list entry_points = setuptools.dist:check_entry_points extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list package_data = setuptools.dist:check_package_data install_requires = setuptools.dist:check_requirements use_2to3 = setuptools.dist:assert_bool From 837d8866a41ffe9d035b65361513ab06dc964a27 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Oct 2011 10:57:28 -0400 Subject: [PATCH 3304/8469] Updated CHANGES to reflect that 0.6.22 was never tagged/released. --HG-- branch : distribute extra : rebase_source : d29f1577e0e39e6d881b148a6f78cc848ddab07d --- CHANGES.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a5b4f2bb0b..85b1c269c2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,12 +21,7 @@ CHANGES * Issue #238: easy_install now uses 64bit executable wrappers on 64bit Python * Issue #208: Fixed parsed_versions, it now honors post-releases as noted in the documentation * Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process -* Issue #227: easy_install now passe its arguments to setup.py bdist_egg - ------- -0.6.22 ------- - +* Issue #227: easy_install now passes its arguments to setup.py bdist_egg * Issue #225: Fixed a NameError on Python 2.5, 2.4 ------ From 257f23372a797ede9e14ae3e62c8319896943857 Mon Sep 17 00:00:00 2001 From: "Guy Rozendorn (guyr@infinidat.com)" Date: Fri, 7 Oct 2011 18:55:31 +0200 Subject: [PATCH 3305/8469] Revert 8d1cb51a01b6 because of issue #250 --HG-- branch : distribute extra : rebase_source : 842a0d796e6e3cd5ecf312dd5c3ff2bb35d601a5 --- setup.cfg | 2 +- setuptools/command/upload.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0c5596134d..d7dfbb772e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [egg_info] -tag_build = +tag_build = dev tag_svn_revision = 1 [aliases] diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 1b70894395..f2e0b2e139 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -228,10 +228,7 @@ def _read_pypirc(self): current[key] = config.get(server, key) else: current[key] = default - # Issue #246, handling url ambiguity - if (current['server'] == repository or - current['repository'] == repository or - (current['repository'] == "http://www.python.org/pypi" and repository == self.DEFAULT_REPOSITORY)): + if (current['server'] == repository: return current elif 'server-login' in sections: # old format From d5df4531433b2031186ed2a8b335892b3600912b Mon Sep 17 00:00:00 2001 From: "Guy Rozendorn (guyr@infinidat.com)" Date: Fri, 7 Oct 2011 19:08:55 +0200 Subject: [PATCH 3306/8469] Reverting 1a1ab844f03e due to issue 250 --HG-- branch : distribute extra : rebase_source : 0dca5e604c96429f07c4d7786d3a0991c42c129d --- distribute.egg-info/entry_points.txt | 1 - setuptools/command/__init__.py | 4 ++ setuptools/command/register.py | 60 ---------------------- setuptools/command/upload.py | 76 +--------------------------- 4 files changed, 6 insertions(+), 135 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 4801e1f9fa..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -8,7 +8,6 @@ saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register upload_docs = setuptools.command.upload_docs:upload_docs -upload = setuptools.command.upload:upload install_egg_info = setuptools.command.install_egg_info:install_egg_info alias = setuptools.command.alias:alias easy_install = setuptools.command.easy_install:easy_install diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index a601e2d3d7..b063fa1925 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -8,6 +8,10 @@ from setuptools.command import install_scripts import sys +if sys.version>='2.5': + # In Python 2.5 and above, distutils includes its own upload command + __all__.remove('upload') + from distutils.command.bdist import bdist if 'egg' not in bdist.format_commands: diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 874401a5ca..3b2e085907 100755 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -1,6 +1,4 @@ from distutils.command.register import register as _register -from ConfigParser import ConfigParser -import os class register(_register): __doc__ = _register.__doc__ @@ -8,63 +6,5 @@ class register(_register): def run(self): # Make sure that we are using valid current name/version info self.run_command('egg_info') - self._section_name = self.repository _register.run(self) - def _read_pypirc(self): - """Reads the .pypirc file.""" - rc = self._get_rc_file() - if os.path.exists(rc): - repository = self.repository - config = ConfigParser() - config.read(rc) - sections = config.sections() - if 'distutils' in sections: - # let's get the list of servers - index_servers = config.get('distutils', 'index-servers') - _servers = [server.strip() for server in - index_servers.split('\n') - if server.strip() != ''] - if _servers == []: - # nothing set, let's try to get the default pypi - if 'pypi' in sections: - _servers = ['pypi'] - else: - # the file is not properly defined, returning - # an empty dict - return {} - for server in _servers: - current = {'server': server} - current['username'] = config.get(server, 'username') - - # optional params - for key, default in (('repository', - None), - ('realm', self.DEFAULT_REALM), - ('password', None)): - if config.has_option(server, key): - current[key] = config.get(server, key) - else: - current[key] = default - if (current['server'] == repository or - current['repository'] == repository): - return current - elif 'server-login' in sections: - # old format - server = 'server-login' - if config.has_option(server, 'repository'): - repository = config.get(server, 'repository') - else: - repository = None - return {'username': config.get(server, 'username'), - 'password': config.get(server, 'password'), - 'repository': repository, - 'server': server, - 'realm': self.DEFAULT_REALM} - - return {} - - def _set_config(self): - _register._set_config(self) - if self.repository is None: - raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index f2e0b2e139..4bd6021d91 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -2,7 +2,6 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" - from distutils.errors import * from distutils.core import Command from distutils.spawn import spawn @@ -12,7 +11,6 @@ except ImportError: from md5 import md5 import os -import sys import socket import platform import ConfigParser @@ -21,7 +19,7 @@ import urlparse import cStringIO as StringIO -class _upload(Command): +class upload(Command): description = "upload binary package to PyPI" @@ -67,7 +65,7 @@ def finalize_options(self): if not self.password: self.password = config.get('server-login', 'password') if not self.repository: - raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) + self.repository = self.DEFAULT_REPOSITORY def run(self): if not self.distribution.dist_files: @@ -184,73 +182,3 @@ def upload_file(self, command, pyversion, filename): if self.show_response: print '-'*75, r.read(), '-'*75 -if sys.version >= "2.5": - from distutils.command.upload import upload as distutils_upload - class upload(distutils_upload): - - def run(self): - self._section_name = self.repository - distutils_upload.run(self) - - def _read_pypirc(self): - """Reads the .pypirc file.""" - self._section_name = self.repository - rc = self._get_rc_file() - if os.path.exists(rc): - repository = self.repository - config = ConfigParser.ConfigParser() - config.read(rc) - sections = config.sections() - if 'distutils' in sections: - # let's get the list of servers - index_servers = config.get('distutils', 'index-servers') - _servers = [server.strip() for server in - index_servers.split('\n') - if server.strip() != ''] - if _servers == []: - # nothing set, let's try to get the default pypi - if 'pypi' in sections: - _servers = ['pypi'] - else: - # the file is not properly defined, returning - # an empty dict - return {} - for server in _servers: - current = {'server': server} - current['username'] = config.get(server, 'username') - - # optional params - for key, default in (('repository', - None), - ('realm', self.DEFAULT_REALM), - ('password', None)): - if config.has_option(server, key): - current[key] = config.get(server, key) - else: - current[key] = default - if (current['server'] == repository: - return current - elif 'server-login' in sections: - # old format - server = 'server-login' - if config.has_option(server, 'repository'): - repository = config.get(server, 'repository') - else: - repository = None - return {'username': config.get(server, 'username'), - 'password': config.get(server, 'password'), - 'repository': repository, - 'server': server, - 'realm': self.DEFAULT_REALM} - - return {} - - def finalize_options(self): - distutils_upload.finalize_options(self) - if not self.repository: - raise ValueError('%s is missing a repository value in .pypirc' % self._section_name) - - -else: - upload = _upload - From c29e03a0344d5914bc500782ffc243dee4e3aac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 7 Oct 2011 23:13:45 +0200 Subject: [PATCH 3307/8469] Make C code in one distutils test comply with ISO C (#10359). Patch by Hallvard B Furuseth. --- tests/test_config_cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 4f7ebdd9fc..e2e6e4ebaa 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -44,10 +44,10 @@ def test_search_cpp(self): cmd = config(dist) # simple pattern searches - match = cmd.search_cpp(pattern='xxx', body='// xxx') + match = cmd.search_cpp(pattern='xxx', body='/* xxx */') self.assertEqual(match, 0) - match = cmd.search_cpp(pattern='_configtest', body='// xxx') + match = cmd.search_cpp(pattern='_configtest', body='/* xxx */') self.assertEqual(match, 1) def test_finalize_options(self): From 37dc7d3a99a8690db8fe7db84f27a2a2a2fff76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Oct 2011 00:34:13 +0200 Subject: [PATCH 3308/8469] Fix distutils byte-compilation to comply with PEP 3147 (#11254). Patch by Jeff Ramnani. Tested with -B, -O and -OO. --- tests/test_build_py.py | 9 ++++++--- tests/test_install_lib.py | 11 +++++++---- util.py | 11 +++++++++-- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 4e46339b43..80316ad7d0 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -3,6 +3,7 @@ import os import sys import io +import imp import unittest from distutils.command.build_py import build_py @@ -57,13 +58,15 @@ def test_package_data(self): self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) + pycache_dir = os.path.join(pkgdest, "__pycache__") self.assertIn("__init__.py", files) self.assertIn("README.txt", files) - # XXX even with -O, distutils writes pyc, not pyo; bug? if sys.dont_write_bytecode: - self.assertNotIn("__init__.pyc", files) + self.assertFalse(os.path.exists(pycache_dir)) else: - self.assertIn("__init__.pyc", files) + # XXX even with -O, distutils writes pyc, not pyo; bug? + pyc_files = os.listdir(pycache_dir) + self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files) def test_empty_package_dir(self): # See SF 1668596/1720897. diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index fddaabe111..b42b03b2fa 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -1,6 +1,7 @@ """Tests for distutils.command.install_data.""" import sys import os +import imp import unittest from distutils.command.install_lib import install_lib @@ -32,18 +33,20 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEqual(cmd.optimize, 2) - @unittest.skipUnless(not sys.dont_write_bytecode, - 'byte-compile not supported') + @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') def test_byte_compile(self): pkg_dir, dist = self.create_dist() + os.chdir(pkg_dir) cmd = install_lib(dist) cmd.compile = cmd.optimize = 1 f = os.path.join(pkg_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc'))) - self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo'))) + pyc_file = imp.cache_from_source('foo.py') + pyo_file = imp.cache_from_source('foo.py', debug_override=False) + self.assertTrue(os.path.exists(pyc_file)) + self.assertTrue(os.path.exists(pyo_file)) def test_get_outputs(self): pkg_dir, dist = self.create_dist() diff --git a/util.py b/util.py index 023ddffc82..631f5dfb70 100644 --- a/util.py +++ b/util.py @@ -4,7 +4,11 @@ one of the other *util.py modules. """ -import sys, os, string, re +import os +import re +import imp +import sys +import string from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -529,7 +533,10 @@ def byte_compile (py_files, # Terminology from the py_compile module: # cfile - byte-compiled file # dfile - purported source filename (same as 'file' by default) - cfile = file + (__debug__ and "c" or "o") + if optimize >= 0: + cfile = imp.cache_from_source(file, debug_override=not optimize) + else: + cfile = imp.cache_from_source(file) dfile = file if prefix: if file[:len(prefix)] != prefix: From b51f2da1992ea985b9df544c8240936a89c162bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Oct 2011 01:56:52 +0200 Subject: [PATCH 3309/8469] Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 5ea724c096..ac06313b19 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -218,7 +218,7 @@ def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + lib_dir = get_python_lib(plat_specific=0, standard_lib=1) config_file = 'config-{}{}'.format(get_python_version(), build_flags) return os.path.join(lib_dir, config_file, 'Makefile') From d90cd637fcbde15bfe066c0758f4ce2f456e4e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Oct 2011 02:15:55 +0200 Subject: [PATCH 3310/8469] Make C code in one distutils test comply with ISO C (#10359). Patch by Hallvard B Furuseth. --- tests/test_config_cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index a36a1d5b49..2cf3886cb5 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -44,10 +44,10 @@ def test_search_cpp(self): cmd = config(dist) # simple pattern searches - match = cmd.search_cpp(pattern='xxx', body='// xxx') + match = cmd.search_cpp(pattern='xxx', body='/* xxx */') self.assertEqual(match, 0) - match = cmd.search_cpp(pattern='_configtest', body='// xxx') + match = cmd.search_cpp(pattern='_configtest', body='/* xxx */') self.assertEqual(match, 1) def test_finalize_options(self): From 8cc629dc1088bc2883ebad92b778c22c0134b6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Oct 2011 03:02:37 +0200 Subject: [PATCH 3311/8469] Fix docstring of distutils.util.byte_compile (followup for #11254) --- util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util.py b/util.py index 631f5dfb70..f42c6a18b9 100644 --- a/util.py +++ b/util.py @@ -419,9 +419,9 @@ def byte_compile (py_files, verbose=1, dry_run=0, direct=None): """Byte-compile a collection of Python source files to either .pyc - or .pyo files in the same directory. 'py_files' is a list of files - to compile; any files that don't end in ".py" are silently skipped. - 'optimize' must be one of the following: + or .pyo files in a __pycache__ subdirectory. 'py_files' is a list + of files to compile; any files that don't end in ".py" are silently + skipped. 'optimize' must be one of the following: 0 - don't optimize (generate .pyc) 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") From 7558986e63b1d4b62bacb37b89c13a7221ec43f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 9 Oct 2011 07:11:19 +0200 Subject: [PATCH 3312/8469] =?UTF-8?q?Fix=20distutils=E2=80=99=20check=20an?= =?UTF-8?q?d=20register=20Unicode=20handling=20(#13114).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check command was fixed by Kirill Kuzminykh. The register command was using StringIO.getvalue, which uses “''.join†and thus coerces to str using the default encoding (ASCII), so I changed the code to use one extra intermediary list and correctly encode to UTF-8. --- command/check.py | 3 +++ command/register.py | 28 ++++++++++++++++++---------- tests/test_check.py | 14 ++++++++++++-- tests/test_register.py | 20 +++++++++++++++++++- 4 files changed, 52 insertions(+), 13 deletions(-) diff --git a/command/check.py b/command/check.py index bc29baaba4..4b64e458bc 100644 --- a/command/check.py +++ b/command/check.py @@ -5,6 +5,7 @@ __revision__ = "$Id$" from distutils.core import Command +from distutils.dist import PKG_INFO_ENCODING from distutils.errors import DistutilsSetupError try: @@ -108,6 +109,8 @@ def check_metadata(self): def check_restructuredtext(self): """Checks if the long string fields are reST-compliant.""" data = self.distribution.get_long_description() + if not isinstance(data, unicode): + data = data.decode(PKG_INFO_ENCODING) for warning in self._check_rst_data(data): line = warning[-1].get('line') if line is None: diff --git a/command/register.py b/command/register.py index dc089902f1..edb42b955d 100644 --- a/command/register.py +++ b/command/register.py @@ -10,7 +10,6 @@ import urllib2 import getpass import urlparse -import StringIO from warnings import warn from distutils.core import PyPIRCCommand @@ -260,21 +259,30 @@ def post_to_server(self, data, auth=None): boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\n--' + boundary end_boundary = sep_boundary + '--' - body = StringIO.StringIO() + chunks = [] for key, value in data.items(): # handle multiple entries for the same name if type(value) not in (type([]), type( () )): value = [value] for value in value: - body.write(sep_boundary) - body.write('\nContent-Disposition: form-data; name="%s"'%key) - body.write("\n\n") - body.write(value) + chunks.append(sep_boundary) + chunks.append('\nContent-Disposition: form-data; name="%s"'%key) + chunks.append("\n\n") + chunks.append(value) if value and value[-1] == '\r': - body.write('\n') # write an extra newline (lurve Macs) - body.write(end_boundary) - body.write("\n") - body = body.getvalue() + chunks.append('\n') # write an extra newline (lurve Macs) + chunks.append(end_boundary) + chunks.append("\n") + + # chunks may be bytes (str) or unicode objects that we need to encode + body = [] + for chunk in chunks: + if isinstance(chunk, unicode): + body.append(chunk.encode('utf-8')) + else: + body.append(chunk) + + body = ''.join(body) # build the Request headers = { diff --git a/tests/test_check.py b/tests/test_check.py index 4ea83dcb79..f73342ade8 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,3 +1,4 @@ +# -*- encoding: utf8 -*- """Tests for distutils.command.check.""" import unittest from test.test_support import run_unittest @@ -46,6 +47,15 @@ def test_check_metadata(self): cmd = self._run(metadata, strict=1) self.assertEqual(cmd._warnings, 0) + # now a test with Unicode entries + metadata = {'url': u'xxx', 'author': u'\u00c9ric', + 'author_email': u'xxx', u'name': 'xxx', + 'version': u'xxx', + 'description': u'Something about esszet \u00df', + 'long_description': u'More things about esszet \u00df'} + cmd = self._run(metadata) + self.assertEqual(cmd._warnings, 0) + def test_check_document(self): if not HAS_DOCUTILS: # won't test without docutils return @@ -80,8 +90,8 @@ def test_check_restructuredtext(self): self.assertRaises(DistutilsSetupError, self._run, metadata, **{'strict': 1, 'restructuredtext': 1}) - # and non-broken rest - metadata['long_description'] = 'title\n=====\n\ntest' + # and non-broken rest, including a non-ASCII character to test #12114 + metadata['long_description'] = u'title\n=====\n\ntest \u00df' cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEqual(cmd._warnings, 0) diff --git a/tests/test_register.py b/tests/test_register.py index bf63487035..aa9bc43c5c 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -1,5 +1,5 @@ -"""Tests for distutils.command.register.""" # -*- encoding: utf8 -*- +"""Tests for distutils.command.register.""" import sys import os import unittest @@ -246,6 +246,24 @@ def test_strict(self): finally: del register_module.raw_input + # and finally a Unicode test (bug #12114) + metadata = {'url': u'xxx', 'author': u'\u00c9ric', + 'author_email': u'xxx', u'name': 'xxx', + 'version': u'xxx', + 'description': u'Something about esszet \u00df', + 'long_description': u'More things about esszet \u00df'} + + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + inputs = RawInputs('1', 'tarek', 'y') + register_module.raw_input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.raw_input + def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated cmd = self._get_cmd() From c43ef144109d289030fdc9851cbd89b6700dcb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 9 Oct 2011 07:25:33 +0200 Subject: [PATCH 3313/8469] =?UTF-8?q?Add=20tests=20for=20Unicode=20handlin?= =?UTF-8?q?g=20in=20distutils=E2=80=99=20check=20and=20register=20(#13114)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_check.py | 13 +++++++++++-- tests/test_register.py | 20 +++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/tests/test_check.py b/tests/test_check.py index 229ae25c6d..4de64734c4 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -46,6 +46,15 @@ def test_check_metadata(self): cmd = self._run(metadata, strict=1) self.assertEqual(cmd._warnings, 0) + # now a test with non-ASCII characters + metadata = {'url': 'xxx', 'author': '\u00c9ric', + 'author_email': 'xxx', 'name': 'xxx', + 'version': 'xxx', + 'description': 'Something about esszet \u00df', + 'long_description': 'More things about esszet \u00df'} + cmd = self._run(metadata) + self.assertEqual(cmd._warnings, 0) + def test_check_document(self): if not HAS_DOCUTILS: # won't test without docutils return @@ -80,8 +89,8 @@ def test_check_restructuredtext(self): self.assertRaises(DistutilsSetupError, self._run, metadata, **{'strict': 1, 'restructuredtext': 1}) - # and non-broken rest - metadata['long_description'] = 'title\n=====\n\ntest' + # and non-broken rest, including a non-ASCII character to test #12114 + metadata['long_description'] = 'title\n=====\n\ntest \u00df' cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEqual(cmd._warnings, 0) diff --git a/tests/test_register.py b/tests/test_register.py index cb72a11538..5863ae1422 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -214,7 +214,7 @@ def test_strict(self): # metadata are OK but long_description is broken metadata = {'url': 'xxx', 'author': 'xxx', - 'author_email': 'xxx', + 'author_email': 'éxéxé', 'name': 'xxx', 'version': 'xxx', 'long_description': 'title\n==\n\ntext'} @@ -247,6 +247,24 @@ def test_strict(self): finally: del register_module.input + # and finally a Unicode test (bug #12114) + metadata = {'url': 'xxx', 'author': '\u00c9ric', + 'author_email': 'xxx', 'name': 'xxx', + 'version': 'xxx', + 'description': 'Something about esszet \u00df', + 'long_description': 'More things about esszet \u00df'} + + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = 1 + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ + # let's run the command + try: + cmd.run() + finally: + del register_module.input + def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated cmd = self._get_cmd() From a5b80fee6d16abbaa5c94ae1a6ea967cdfb3e888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 11 Oct 2011 02:45:51 +0200 Subject: [PATCH 3314/8469] Increase test coverage for distutils.filelist (#11751). Patch by Justin Love. --- tests/test_filelist.py | 201 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 194 insertions(+), 7 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index c7e5201b17..f3304b2e33 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,11 +1,25 @@ """Tests for distutils.filelist.""" +import re import unittest +from distutils import debug +from distutils.log import WARN +from distutils.errors import DistutilsTemplateError +from distutils.filelist import glob_to_re, translate_pattern, FileList -from distutils.filelist import glob_to_re, FileList from test.support import captured_stdout, run_unittest -from distutils import debug +from distutils.tests import support + + +class FileListTestCase(support.LoggingSilencer, + unittest.TestCase): -class FileListTestCase(unittest.TestCase): + def assertNoWarnings(self): + self.assertEqual(self.get_logs(WARN), []) + self.clear_logs() + + def assertWarnings(self): + self.assertGreater(len(self.get_logs(WARN)), 0) + self.clear_logs() def test_glob_to_re(self): # simple cases @@ -23,18 +37,191 @@ def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: file_list.debug_print('xxx') - stdout.seek(0) - self.assertEqual(stdout.read(), '') + self.assertEqual(stdout.getvalue(), '') debug.DEBUG = True try: with captured_stdout() as stdout: file_list.debug_print('xxx') - stdout.seek(0) - self.assertEqual(stdout.read(), 'xxx\n') + self.assertEqual(stdout.getvalue(), 'xxx\n') finally: debug.DEBUG = False + def test_set_allfiles(self): + file_list = FileList() + files = ['a', 'b', 'c'] + file_list.set_allfiles(files) + self.assertEqual(file_list.allfiles, files) + + def test_remove_duplicates(self): + file_list = FileList() + file_list.files = ['a', 'b', 'a', 'g', 'c', 'g'] + # files must be sorted beforehand (sdist does it) + file_list.sort() + file_list.remove_duplicates() + self.assertEqual(file_list.files, ['a', 'b', 'c', 'g']) + + def test_translate_pattern(self): + # not regex + self.assertTrue(hasattr( + translate_pattern('a', anchor=True, is_regex=False), + 'search')) + + # is a regex + regex = re.compile('a') + self.assertEqual( + translate_pattern(regex, anchor=True, is_regex=True), + regex) + + # plain string flagged as regex + self.assertTrue(hasattr( + translate_pattern('a', anchor=True, is_regex=True), + 'search')) + + # glob support + self.assertTrue(translate_pattern( + '*.py', anchor=True, is_regex=False).search('filelist.py')) + + def test_exclude_pattern(self): + # return False if no match + file_list = FileList() + self.assertFalse(file_list.exclude_pattern('*.py')) + + # return True if files match + file_list = FileList() + file_list.files = ['a.py', 'b.py'] + self.assertTrue(file_list.exclude_pattern('*.py')) + + # test excludes + file_list = FileList() + file_list.files = ['a.py', 'a.txt'] + file_list.exclude_pattern('*.py') + self.assertEqual(file_list.files, ['a.txt']) + + def test_include_pattern(self): + # return False if no match + file_list = FileList() + file_list.set_allfiles([]) + self.assertFalse(file_list.include_pattern('*.py')) + + # return True if files match + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt']) + self.assertTrue(file_list.include_pattern('*.py')) + + # test * matches all files + file_list = FileList() + self.assertIsNone(file_list.allfiles) + file_list.set_allfiles(['a.py', 'b.txt']) + file_list.include_pattern('*') + self.assertEqual(file_list.allfiles, ['a.py', 'b.txt']) + + def test_process_template(self): + # invalid lines + file_list = FileList() + for action in ('include', 'exclude', 'global-include', + 'global-exclude', 'recursive-include', + 'recursive-exclude', 'graft', 'prune', 'blarg'): + self.assertRaises(DistutilsTemplateError, + file_list.process_template_line, action) + + # include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', 'd/c.py']) + + file_list.process_template_line('include *.py') + self.assertEqual(file_list.files, ['a.py']) + self.assertNoWarnings() + + file_list.process_template_line('include *.rb') + self.assertEqual(file_list.files, ['a.py']) + self.assertWarnings() + + # exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', 'd/c.py'] + + file_list.process_template_line('exclude *.py') + self.assertEqual(file_list.files, ['b.txt', 'd/c.py']) + self.assertNoWarnings() + + file_list.process_template_line('exclude *.rb') + self.assertEqual(file_list.files, ['b.txt', 'd/c.py']) + self.assertWarnings() + + # global-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', 'd/c.py']) + + file_list.process_template_line('global-include *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.py']) + self.assertNoWarnings() + + file_list.process_template_line('global-include *.rb') + self.assertEqual(file_list.files, ['a.py', 'd/c.py']) + self.assertWarnings() + + # global-exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', 'd/c.py'] + + file_list.process_template_line('global-exclude *.py') + self.assertEqual(file_list.files, ['b.txt']) + self.assertNoWarnings() + + file_list.process_template_line('global-exclude *.rb') + self.assertEqual(file_list.files, ['b.txt']) + self.assertWarnings() + + # recursive-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'd/b.py', 'd/c.txt', 'd/d/e.py']) + + file_list.process_template_line('recursive-include d *.py') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertNoWarnings() + + file_list.process_template_line('recursive-include e *.py') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertWarnings() + + # recursive-exclude + file_list = FileList() + file_list.files = ['a.py', 'd/b.py', 'd/c.txt', 'd/d/e.py'] + + file_list.process_template_line('recursive-exclude d *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.txt']) + self.assertNoWarnings() + + file_list.process_template_line('recursive-exclude e *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.txt']) + self.assertWarnings() + + # graft + file_list = FileList() + file_list.set_allfiles(['a.py', 'd/b.py', 'd/d/e.py', 'f/f.py']) + + file_list.process_template_line('graft d') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertNoWarnings() + + file_list.process_template_line('graft e') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertWarnings() + + # prune + file_list = FileList() + file_list.files = ['a.py', 'd/b.py', 'd/d/e.py', 'f/f.py'] + + file_list.process_template_line('prune d') + self.assertEqual(file_list.files, ['a.py', 'f/f.py']) + self.assertNoWarnings() + + file_list.process_template_line('prune e') + self.assertEqual(file_list.files, ['a.py', 'f/f.py']) + self.assertWarnings() + + def test_suite(): return unittest.makeSuite(FileListTestCase) From 67ee093341a7342fcbe29dd99800c373abd872a0 Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Tue, 11 Oct 2011 18:25:09 +0100 Subject: [PATCH 3315/8469] Add support for git URLs. --HG-- branch : distribute extra : rebase_source : f664e8cf2b7b6f78096cd00463f4e2009bdeb3ac --- setuptools/package_index.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d0896febc4..da586a2741 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -657,6 +657,8 @@ def _download_url(self, scheme, url, tmpdir): # if scheme=='svn' or scheme.startswith('svn+'): return self._download_svn(url, filename) + elif scheme=='git' or scheme.startswith('git+'): + return self._download_git(url, filename) elif scheme=='file': return urllib.url2pathname(urlparse.urlparse(url)[2]) else: @@ -697,6 +699,15 @@ def _download_svn(self, url, filename): os.system("svn checkout -q %s %s" % (url, filename)) return filename + def _download_git(self, url, filename): + if url.startswith('git+'): + url = url[4:] + url = url.split('#',1)[0] # remove any fragment for svn's sake + filename = filename.split('#',1)[0] # remove any fragment to get a decent name. + self.info("Doing git clone from %s to %s", url, filename) + os.system("git clone -q %s %s" % (url, filename)) + return filename + def debug(self, msg, *args): log.debug(msg, *args) From 930b2596aaa267e9ba28bb5a1066b20d9e0fcfeb Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Tue, 11 Oct 2011 20:08:25 +0100 Subject: [PATCH 3316/8469] Add support for Mercurial URLs. --HG-- branch : distribute extra : rebase_source : 7c33d5bea70d9300cff635646988b13c007e24c9 --- setuptools/package_index.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index da586a2741..cd89e9a6bc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -659,6 +659,8 @@ def _download_url(self, scheme, url, tmpdir): return self._download_svn(url, filename) elif scheme=='git' or scheme.startswith('git+'): return self._download_git(url, filename) + elif scheme.startswith('hg+'): + return self._download_hg(url, filename) elif scheme=='file': return urllib.url2pathname(urlparse.urlparse(url)[2]) else: @@ -708,6 +710,15 @@ def _download_git(self, url, filename): os.system("git clone -q %s %s" % (url, filename)) return filename + def _download_hg(self, url, filename): + if url.startswith('hg+'): + url = url[3:] + url = url.split('#',1)[0] # remove any fragment for svn's sake + filename = filename.split('#',1)[0] # remove any fragment to get a decent name. + self.info("Doing hg clone from %s to %s", url, filename) + os.system("hg clone --quiet %s %s" % (url, filename)) + return filename + def debug(self, msg, *args): log.debug(msg, *args) From 8372d395c718cf17a144eb6db314832eb86582e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 11:50:26 -0400 Subject: [PATCH 3317/8469] Bumped to 0.6.24 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 91a4d836ff8a34f433a37f838ec78408ace2aee7 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.sh | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 887d811c6a..5a3146b8a7 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.23.tar.gz - $ tar -xzvf distribute-0.6.23.tar.gz - $ cd distribute-0.6.23 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz + $ tar -xzvf distribute-0.6.24.tar.gz + $ cd distribute-0.6.24 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index a16284497b..b204902e31 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.23" +DEFAULT_VERSION = "0.6.24" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 601ac6ab68..65ee57be83 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.23' +version = '0.6.24' # The full version, including alpha/beta/rc tags. -release = '0.6.23' +release = '0.6.24' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.sh b/release.sh index 9c98f1d507..286ae59aeb 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.23" +export VERSION="0.6.24" # tagging hg tag $VERSION -f diff --git a/setup.py b/setup.py index 28efcf9756..c0ce54da16 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.23" +VERSION = "0.6.24" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 92a211d570706bb5ecebaeea04845ceec9c77ac3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:00:36 -0400 Subject: [PATCH 3318/8469] Adding release.py, an attempt to fully automate the release process in a platform-friendly way. If this works, it should replace release.sh. --HG-- branch : distribute extra : rebase_source : b4297ff244fc6e2fa68f5891a226cd7840166e22 --- release.py | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 release.py diff --git a/release.py b/release.py new file mode 100644 index 0000000000..958d937352 --- /dev/null +++ b/release.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python + +""" +Script to fully automate the release process. Requires Python 2.6+ +with sphinx installed and the 'hg' command on the path. +""" + +from __future__ import print_function + +import subprocess +import shutil +import os +import sys + +VERSION='0.6.24' + +def get_next_version(): + digits = map(int, VERSION.split('.')) + digits[-1] += 1 + return '.'.join(map(str, digits)) + +def bump_versions(): + files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', + 'release.sh', 'README.txt', 'distribute_setup.py') + list(map(bump_version, files_with_versions)) + +def bump_version(filename): + with open(filename, 'rb') as f: + lines = [line.replace(VERSION, get_next_version()) for line in f] + with open(filename, 'wb') as f: + f.writelines(lines) + +def do_release(): + res = raw_input('Have you read through the SCM changelog and ' + 'confirmed the changelog is current for releasing {VERSION}? ' + .format(**globals())) + if not res.lower.startswith('y'): + print("Please do that") + raise SystemExit(1) + + subprocess.check_call(['hg', 'tag', VERSION]) + + subprocess.check_call(['hg', 'update', VERSION]) + + build_docs() + shutil.rmtree('./dist') + subprocess.check_call([sys.executable, 'setup.py', + '-q', 'egg_info', '-RD', '-b', '""', 'sdist', 'register', + 'upload', 'upload_docs']) + upload_boostrap_script() + + # we just tagged the current version, bump for the next release. + bump_versions() + subprocess.check_call(['hg', 'ci', '-m', + 'Bumped to {VERSION} in preparation for next release.'.format(**globals())]) + + # push the changes + subprocess.check_call(['hg', 'push']) + +def build_docs(): + shutil.rmtree('docs/build') + subprocess.check_call([ + 'sphinx-build', + '-b', 'html', + 'build/html', + ], + cwd='docs') + +def upload_bootstrap_script(): + scp_command = 'pscp' if sys.platform.startswith('win') else 'scp' + try: + subprocess.check_call([scp_command, 'distribute_setup.py', + 'ziade.org:websites/python-distribute.org/']) + except: + print("Unable to upload bootstrap script. Ask Tarek to do it.") + +if __name__ == '__main__': + do_release() From 7b2e8854237e74d196cdb5b736838b8ac1c8ec68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 14 Oct 2011 18:15:31 +0200 Subject: [PATCH 3319/8469] Increase test coverage for distutils.filelist (#11751). Patch by Justin Love. --- tests/test_filelist.py | 207 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 197 insertions(+), 10 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index be11ea5d13..1e04077f82 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,10 +1,14 @@ """Tests for distutils.filelist.""" -from os.path import join +import re import unittest -from test.test_support import captured_stdout, run_unittest - -from distutils.filelist import glob_to_re, FileList +from os.path import join from distutils import debug +from distutils.log import WARN +from distutils.errors import DistutilsTemplateError +from distutils.filelist import glob_to_re, translate_pattern, FileList + +from test.test_support import captured_stdout, run_unittest +from distutils.tests import support MANIFEST_IN = """\ include ok @@ -20,7 +24,17 @@ prune dir3 """ -class FileListTestCase(unittest.TestCase): + +class FileListTestCase(support.LoggingSilencer, + unittest.TestCase): + + def assertNoWarnings(self): + self.assertEqual(self.get_logs(WARN), []) + self.clear_logs() + + def assertWarnings(self): + self.assertGreater(len(self.get_logs(WARN)), 0) + self.clear_logs() def test_glob_to_re(self): # simple cases @@ -48,7 +62,7 @@ def test_process_template_line(self): join('dir', 'graft-one'), join('dir', 'dir2', 'graft2'), join('dir3', 'ok'), - join('dir3', 'sub', 'ok.txt') + join('dir3', 'sub', 'ok.txt'), ] for line in MANIFEST_IN.split('\n'): @@ -66,18 +80,191 @@ def test_debug_print(self): file_list = FileList() with captured_stdout() as stdout: file_list.debug_print('xxx') - stdout.seek(0) - self.assertEqual(stdout.read(), '') + self.assertEqual(stdout.getvalue(), '') debug.DEBUG = True try: with captured_stdout() as stdout: file_list.debug_print('xxx') - stdout.seek(0) - self.assertEqual(stdout.read(), 'xxx\n') + self.assertEqual(stdout.getvalue(), 'xxx\n') finally: debug.DEBUG = False + def test_set_allfiles(self): + file_list = FileList() + files = ['a', 'b', 'c'] + file_list.set_allfiles(files) + self.assertEqual(file_list.allfiles, files) + + def test_remove_duplicates(self): + file_list = FileList() + file_list.files = ['a', 'b', 'a', 'g', 'c', 'g'] + # files must be sorted beforehand (sdist does it) + file_list.sort() + file_list.remove_duplicates() + self.assertEqual(file_list.files, ['a', 'b', 'c', 'g']) + + def test_translate_pattern(self): + # not regex + self.assertTrue(hasattr( + translate_pattern('a', anchor=True, is_regex=False), + 'search')) + + # is a regex + regex = re.compile('a') + self.assertEqual( + translate_pattern(regex, anchor=True, is_regex=True), + regex) + + # plain string flagged as regex + self.assertTrue(hasattr( + translate_pattern('a', anchor=True, is_regex=True), + 'search')) + + # glob support + self.assertTrue(translate_pattern( + '*.py', anchor=True, is_regex=False).search('filelist.py')) + + def test_exclude_pattern(self): + # return False if no match + file_list = FileList() + self.assertFalse(file_list.exclude_pattern('*.py')) + + # return True if files match + file_list = FileList() + file_list.files = ['a.py', 'b.py'] + self.assertTrue(file_list.exclude_pattern('*.py')) + + # test excludes + file_list = FileList() + file_list.files = ['a.py', 'a.txt'] + file_list.exclude_pattern('*.py') + self.assertEqual(file_list.files, ['a.txt']) + + def test_include_pattern(self): + # return False if no match + file_list = FileList() + file_list.set_allfiles([]) + self.assertFalse(file_list.include_pattern('*.py')) + + # return True if files match + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt']) + self.assertTrue(file_list.include_pattern('*.py')) + + # test * matches all files + file_list = FileList() + self.assertIsNone(file_list.allfiles) + file_list.set_allfiles(['a.py', 'b.txt']) + file_list.include_pattern('*') + self.assertEqual(file_list.allfiles, ['a.py', 'b.txt']) + + def test_process_template(self): + # invalid lines + file_list = FileList() + for action in ('include', 'exclude', 'global-include', + 'global-exclude', 'recursive-include', + 'recursive-exclude', 'graft', 'prune', 'blarg'): + self.assertRaises(DistutilsTemplateError, + file_list.process_template_line, action) + + # include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', 'd/c.py']) + + file_list.process_template_line('include *.py') + self.assertEqual(file_list.files, ['a.py']) + self.assertNoWarnings() + + file_list.process_template_line('include *.rb') + self.assertEqual(file_list.files, ['a.py']) + self.assertWarnings() + + # exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', 'd/c.py'] + + file_list.process_template_line('exclude *.py') + self.assertEqual(file_list.files, ['b.txt', 'd/c.py']) + self.assertNoWarnings() + + file_list.process_template_line('exclude *.rb') + self.assertEqual(file_list.files, ['b.txt', 'd/c.py']) + self.assertWarnings() + + # global-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', 'd/c.py']) + + file_list.process_template_line('global-include *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.py']) + self.assertNoWarnings() + + file_list.process_template_line('global-include *.rb') + self.assertEqual(file_list.files, ['a.py', 'd/c.py']) + self.assertWarnings() + + # global-exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', 'd/c.py'] + + file_list.process_template_line('global-exclude *.py') + self.assertEqual(file_list.files, ['b.txt']) + self.assertNoWarnings() + + file_list.process_template_line('global-exclude *.rb') + self.assertEqual(file_list.files, ['b.txt']) + self.assertWarnings() + + # recursive-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'd/b.py', 'd/c.txt', 'd/d/e.py']) + + file_list.process_template_line('recursive-include d *.py') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertNoWarnings() + + file_list.process_template_line('recursive-include e *.py') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertWarnings() + + # recursive-exclude + file_list = FileList() + file_list.files = ['a.py', 'd/b.py', 'd/c.txt', 'd/d/e.py'] + + file_list.process_template_line('recursive-exclude d *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.txt']) + self.assertNoWarnings() + + file_list.process_template_line('recursive-exclude e *.py') + self.assertEqual(file_list.files, ['a.py', 'd/c.txt']) + self.assertWarnings() + + # graft + file_list = FileList() + file_list.set_allfiles(['a.py', 'd/b.py', 'd/d/e.py', 'f/f.py']) + + file_list.process_template_line('graft d') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertNoWarnings() + + file_list.process_template_line('graft e') + self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) + self.assertWarnings() + + # prune + file_list = FileList() + file_list.files = ['a.py', 'd/b.py', 'd/d/e.py', 'f/f.py'] + + file_list.process_template_line('prune d') + self.assertEqual(file_list.files, ['a.py', 'f/f.py']) + self.assertNoWarnings() + + file_list.process_template_line('prune e') + self.assertEqual(file_list.files, ['a.py', 'f/f.py']) + self.assertWarnings() + + def test_suite(): return unittest.makeSuite(FileListTestCase) From 9af04bdc389e811e4d97187cf3be7a7f531b787b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:15:38 -0400 Subject: [PATCH 3320/8469] Fixed error in do_release --HG-- branch : distribute extra : rebase_source : cc27ca582dfcc618e6adebc60d32532aed09b07e --- release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index 958d937352..b353156ced 100644 --- a/release.py +++ b/release.py @@ -34,10 +34,10 @@ def do_release(): res = raw_input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) - if not res.lower.startswith('y'): + if not res.lower().startswith('y'): print("Please do that") raise SystemExit(1) - + subprocess.check_call(['hg', 'tag', VERSION]) subprocess.check_call(['hg', 'update', VERSION]) From 7a512c0681cbb92aa8ec9b31d86e25ef2e4e995b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:17:40 -0400 Subject: [PATCH 3321/8469] Fixed issue in rmtree calls --HG-- branch : distribute extra : rebase_source : 9ea9db9ab7c23c06e6fdf087f50938e995f0d187 --- release.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index b353156ced..a6044ecd9b 100644 --- a/release.py +++ b/release.py @@ -43,7 +43,8 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) build_docs() - shutil.rmtree('./dist') + if os.path.isdir('./dist'): + shutil.rmtree('./dist') subprocess.check_call([sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '""', 'sdist', 'register', 'upload', 'upload_docs']) @@ -58,7 +59,8 @@ def do_release(): subprocess.check_call(['hg', 'push']) def build_docs(): - shutil.rmtree('docs/build') + if os.path.isdir('docs/build'): + shutil.rmtree('docs/build') subprocess.check_call([ 'sphinx-build', '-b', 'html', From 400aece53173768934077f003a8c634ab4351974 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:20:12 -0400 Subject: [PATCH 3322/8469] Fixed sphinx-build to match makefile usage --HG-- branch : distribute extra : rebase_source : 049179f267bb721c43f0e9bdec1dbed1d13a73b1 --- release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.py b/release.py index a6044ecd9b..0dbca28ce4 100644 --- a/release.py +++ b/release.py @@ -64,6 +64,8 @@ def build_docs(): subprocess.check_call([ 'sphinx-build', '-b', 'html', + '-d', 'build/doctrees', + '.', 'build/html', ], cwd='docs') From 4ce3c9f3270aa9f431795933d4c756063eb7a8f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:20:23 -0400 Subject: [PATCH 3323/8469] Added tag 0.6.24 for changeset 7fd7b6e30a0e --HG-- branch : distribute extra : rebase_source : 86ef684970eafe416f49e042d5a7252d172ace29 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index afbb60ffd3..1c2c996504 100644 --- a/.hgtags +++ b/.hgtags @@ -32,3 +32,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 9406c5dac8429216f1a264e6f692fdc534476acd 0.6.23 +7fd7b6e30a0effa082baed1c4103a0efa56be98c 0.6.24 From 025351ce05277b00288db22e880f547d5825983f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:23:15 -0400 Subject: [PATCH 3324/8469] Fixed NameError --HG-- branch : distribute extra : rebase_source : c7e392b567048863b5bde5f5828f653ae4647281 --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 0dbca28ce4..13b3e33221 100644 --- a/release.py +++ b/release.py @@ -48,7 +48,7 @@ def do_release(): subprocess.check_call([sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '""', 'sdist', 'register', 'upload', 'upload_docs']) - upload_boostrap_script() + upload_bootstrap_script() # we just tagged the current version, bump for the next release. bump_versions() From a119995b29457b2e4dffddd798faa320c257f32b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:24:25 -0400 Subject: [PATCH 3325/8469] Bumped to 0.6.25 in preparation for next release. --HG-- branch : distribute extra : rebase_source : f6e1463807528017b439623835cdeaf07bc1369a --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- release.sh | 2 +- setup.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index 5a3146b8a7..2a12bd16da 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz - $ tar -xzvf distribute-0.6.24.tar.gz - $ cd distribute-0.6.24 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.25.tar.gz + $ tar -xzvf distribute-0.6.25.tar.gz + $ cd distribute-0.6.25 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index b204902e31..f0bfa25ac4 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.24" +DEFAULT_VERSION = "0.6.25" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 65ee57be83..e4bd76af8a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.24' +version = '0.6.25' # The full version, including alpha/beta/rc tags. -release = '0.6.24' +release = '0.6.25' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 13b3e33221..fc4831a294 100644 --- a/release.py +++ b/release.py @@ -12,7 +12,7 @@ import os import sys -VERSION='0.6.24' +VERSION='0.6.25' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/release.sh b/release.sh index 286ae59aeb..7831697427 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,5 @@ #!/bin/sh -export VERSION="0.6.24" +export VERSION="0.6.25" # tagging hg tag $VERSION -f diff --git a/setup.py b/setup.py index c0ce54da16..3500d3e23a 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.24" +VERSION = "0.6.25" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 6beba487c092be35525d63bbec3e3c45ae0bba04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2011 12:33:56 -0400 Subject: [PATCH 3326/8469] Updated bump message to use the bumped version, not the old version. --HG-- branch : distribute extra : rebase_source : 9baf8490fa439e610c2cdb2b3e5db28920bdea1c --- release.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index fc4831a294..466f5cdaef 100644 --- a/release.py +++ b/release.py @@ -19,6 +19,8 @@ def get_next_version(): digits[-1] += 1 return '.'.join(map(str, digits)) +NEXT_VERSION = get_next_version() + def bump_versions(): files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', 'release.sh', 'README.txt', 'distribute_setup.py') @@ -26,7 +28,7 @@ def bump_versions(): def bump_version(filename): with open(filename, 'rb') as f: - lines = [line.replace(VERSION, get_next_version()) for line in f] + lines = [line.replace(VERSION, NEXT_VERSION) for line in f] with open(filename, 'wb') as f: f.writelines(lines) @@ -53,7 +55,8 @@ def do_release(): # we just tagged the current version, bump for the next release. bump_versions() subprocess.check_call(['hg', 'ci', '-m', - 'Bumped to {VERSION} in preparation for next release.'.format(**globals())]) + 'Bumped to {NEXT_VERSION} in preparation for next ' + 'release.'.format(**globals())]) # push the changes subprocess.check_call(['hg', 'push']) From b2c661b2eb9d355255a447db715b05a742eba965 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Oct 2011 09:13:24 -0400 Subject: [PATCH 3327/8469] Fixed release script so it doesn't leave an empty tag and thus a dash at the end (it's powershell that needs the double-quotes inside single quotes) --HG-- branch : distribute extra : rebase_source : c7658c4f86de5055bdb3a20f5bc8b5a0dc3eb4de --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 0dbca28ce4..91ae6dfb80 100644 --- a/release.py +++ b/release.py @@ -46,7 +46,7 @@ def do_release(): if os.path.isdir('./dist'): shutil.rmtree('./dist') subprocess.check_call([sys.executable, 'setup.py', - '-q', 'egg_info', '-RD', '-b', '""', 'sdist', 'register', + '-q', 'egg_info', '-RD', '-b', '', 'sdist', 'register', 'upload', 'upload_docs']) upload_boostrap_script() From ed45aad402e3df6f660d88c19710e56951126286 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 17 Oct 2011 11:05:36 +1100 Subject: [PATCH 3328/8469] Issue #7833: Ext. modules built using distutils on Windows no longer get a manifest --- msvc9compiler.py | 77 +++++++++++++++++++++++++++---------- tests/test_msvc9compiler.py | 47 +++++++++++++++++++++- 2 files changed, 102 insertions(+), 22 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index bf85ac75c7..9838d64a0e 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -640,15 +640,7 @@ def link(self, self.library_filename(dll_name)) ld_args.append ('/IMPLIB:' + implib_file) - # Embedded manifests are recommended - see MSDN article titled - # "How to: Embed a Manifest Inside a C/C++ Application" - # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) - # Ask the linker to generate the manifest in the temp dir, so - # we can embed it later. - temp_manifest = os.path.join( - build_temp, - os.path.basename(output_filename) + ".manifest") - ld_args.append('/MANIFESTFILE:' + temp_manifest) + self.manifest_setup_ldargs(output_filename, build_temp, ld_args) if extra_preargs: ld_args[:0] = extra_preargs @@ -666,20 +658,54 @@ def link(self, # will still consider the DLL up-to-date, but it will not have a # manifest. Maybe we should link to a temp file? OTOH, that # implies a build environment error that shouldn't go undetected. - if target_desc == CCompiler.EXECUTABLE: - mfid = 1 - else: - mfid = 2 - self._remove_visual_c_ref(temp_manifest) - out_arg = '-outputresource:%s;%s' % (output_filename, mfid) - try: - self.spawn(['mt.exe', '-nologo', '-manifest', - temp_manifest, out_arg]) - except DistutilsExecError, msg: - raise LinkError(msg) + mfinfo = self.manifest_get_embed_info(target_desc, ld_args) + if mfinfo is not None: + mffilename, mfid = mfinfo + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) + try: + self.spawn(['mt.exe', '-nologo', '-manifest', + mffilename, out_arg]) + except DistutilsExecError, msg: + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) + def manifest_setup_ldargs(self, output_filename, build_temp, ld_args): + # If we need a manifest at all, an embedded manifest is recommended. + # See MSDN article titled + # "How to: Embed a Manifest Inside a C/C++ Application" + # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) + # Ask the linker to generate the manifest in the temp dir, so + # we can check it, and possibly embed it, later. + temp_manifest = os.path.join( + build_temp, + os.path.basename(output_filename) + ".manifest") + ld_args.append('/MANIFESTFILE:' + temp_manifest) + + def manifest_get_embed_info(self, target_desc, ld_args): + # If a manifest should be embedded, return a tuple of + # (manifest_filename, resource_id). Returns None if no manifest + # should be embedded. See http://bugs.python.org/issue7833 for why + # we want to avoid any manifest for extension modules if we can) + for arg in ld_args: + if arg.startswith("/MANIFESTFILE:"): + temp_manifest = arg.split(":", 1)[1] + break + else: + # no /MANIFESTFILE so nothing to do. + return None + if target_desc == CCompiler.EXECUTABLE: + # by default, executables always get the manifest with the + # CRT referenced. + mfid = 1 + else: + # Extension modules try and avoid any manifest if possible. + mfid = 2 + temp_manifest = self._remove_visual_c_ref(temp_manifest) + if temp_manifest is None: + return None + return temp_manifest, mfid + def _remove_visual_c_ref(self, manifest_file): try: # Remove references to the Visual C runtime, so they will @@ -688,6 +714,8 @@ def _remove_visual_c_ref(self, manifest_file): # runtimes are not in WinSxS folder, but in Python's own # folder), the runtimes do not need to be in every folder # with .pyd's. + # Returns either the filename of the modified manifest or + # None if no manifest should be embedded. manifest_f = open(manifest_file) try: manifest_buf = manifest_f.read() @@ -700,9 +728,18 @@ def _remove_visual_c_ref(self, manifest_file): manifest_buf = re.sub(pattern, "", manifest_buf) pattern = "\s*" manifest_buf = re.sub(pattern, "", manifest_buf) + # Now see if any other assemblies are referenced - if not, we + # don't want a manifest embedded. + pattern = re.compile( + r"""|)""", re.DOTALL) + if re.search(pattern, manifest_buf) is None: + return None + manifest_f = open(manifest_file, 'w') try: manifest_f.write(manifest_buf) + return manifest_file finally: manifest_f.close() except IOError: diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index e155dbfea3..73470729fd 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -7,7 +7,36 @@ from distutils.tests import support from test.test_support import run_unittest -_MANIFEST = """\ +# A manifest with the only assembly reference being the msvcrt assembly, so +# should have the assembly completely stripped. Note that although the +# assembly has a reference the assembly is removed - that is +# currently a "feature", not a bug :) +_MANIFEST_WITH_ONLY_MSVC_REFERENCE = """\ + + + + + + + + + + + + + + + + + +""" + +# A manifest with references to assemblies other than msvcrt. When processed, +# this assembly should be returned with just the msvcrt part removed. +_MANIFEST_WITH_MULTIPLE_REFERENCES = """\ @@ -115,7 +144,7 @@ def test_remove_visual_c_ref(self): manifest = os.path.join(tempdir, 'manifest') f = open(manifest, 'w') try: - f.write(_MANIFEST) + f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES) finally: f.close() @@ -133,6 +162,20 @@ def test_remove_visual_c_ref(self): # makes sure the manifest was properly cleaned self.assertEqual(content, _CLEANED_MANIFEST) + def test_remove_entire_manifest(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE) + finally: + f.close() + + compiler = MSVCCompiler() + got = compiler._remove_visual_c_ref(manifest) + self.assertIs(got, None) + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From 1f218d0f3f8aa86e62b9b8c39efdb077d66481d4 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 17 Oct 2011 11:05:57 +1100 Subject: [PATCH 3329/8469] Issue #7833: Ext. modules built using distutils on Windows no longer get a manifest --- msvc9compiler.py | 78 +++++++++++++++++++++++++++---------- tests/test_msvc9compiler.py | 47 +++++++++++++++++++++- 2 files changed, 102 insertions(+), 23 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 0cddb5c8e0..0807a36095 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -627,15 +627,7 @@ def link(self, self.library_filename(dll_name)) ld_args.append ('/IMPLIB:' + implib_file) - # Embedded manifests are recommended - see MSDN article titled - # "How to: Embed a Manifest Inside a C/C++ Application" - # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) - # Ask the linker to generate the manifest in the temp dir, so - # we can embed it later. - temp_manifest = os.path.join( - build_temp, - os.path.basename(output_filename) + ".manifest") - ld_args.append('/MANIFESTFILE:' + temp_manifest) + self.manifest_setup_ldargs(output_filename, build_temp, ld_args) if extra_preargs: ld_args[:0] = extra_preargs @@ -653,21 +645,54 @@ def link(self, # will still consider the DLL up-to-date, but it will not have a # manifest. Maybe we should link to a temp file? OTOH, that # implies a build environment error that shouldn't go undetected. - if target_desc == CCompiler.EXECUTABLE: - mfid = 1 - else: - mfid = 2 - # Remove references to the Visual C runtime - self._remove_visual_c_ref(temp_manifest) - out_arg = '-outputresource:%s;%s' % (output_filename, mfid) - try: - self.spawn(['mt.exe', '-nologo', '-manifest', - temp_manifest, out_arg]) - except DistutilsExecError as msg: - raise LinkError(msg) + mfinfo = self.manifest_get_embed_info(target_desc, ld_args) + if mfinfo is not None: + mffilename, mfid = mfinfo + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) + try: + self.spawn(['mt.exe', '-nologo', '-manifest', + mffilename, out_arg]) + except DistutilsExecError as msg: + raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) + def manifest_setup_ldargs(self, output_filename, build_temp, ld_args): + # If we need a manifest at all, an embedded manifest is recommended. + # See MSDN article titled + # "How to: Embed a Manifest Inside a C/C++ Application" + # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) + # Ask the linker to generate the manifest in the temp dir, so + # we can check it, and possibly embed it, later. + temp_manifest = os.path.join( + build_temp, + os.path.basename(output_filename) + ".manifest") + ld_args.append('/MANIFESTFILE:' + temp_manifest) + + def manifest_get_embed_info(self, target_desc, ld_args): + # If a manifest should be embedded, return a tuple of + # (manifest_filename, resource_id). Returns None if no manifest + # should be embedded. See http://bugs.python.org/issue7833 for why + # we want to avoid any manifest for extension modules if we can) + for arg in ld_args: + if arg.startswith("/MANIFESTFILE:"): + temp_manifest = arg.split(":", 1)[1] + break + else: + # no /MANIFESTFILE so nothing to do. + return None + if target_desc == CCompiler.EXECUTABLE: + # by default, executables always get the manifest with the + # CRT referenced. + mfid = 1 + else: + # Extension modules try and avoid any manifest if possible. + mfid = 2 + temp_manifest = self._remove_visual_c_ref(temp_manifest) + if temp_manifest is None: + return None + return temp_manifest, mfid + def _remove_visual_c_ref(self, manifest_file): try: # Remove references to the Visual C runtime, so they will @@ -676,6 +701,8 @@ def _remove_visual_c_ref(self, manifest_file): # runtimes are not in WinSxS folder, but in Python's own # folder), the runtimes do not need to be in every folder # with .pyd's. + # Returns either the filename of the modified manifest or + # None if no manifest should be embedded. manifest_f = open(manifest_file) try: manifest_buf = manifest_f.read() @@ -688,9 +715,18 @@ def _remove_visual_c_ref(self, manifest_file): manifest_buf = re.sub(pattern, "", manifest_buf) pattern = "\s*" manifest_buf = re.sub(pattern, "", manifest_buf) + # Now see if any other assemblies are referenced - if not, we + # don't want a manifest embedded. + pattern = re.compile( + r"""|)""", re.DOTALL) + if re.search(pattern, manifest_buf) is None: + return None + manifest_f = open(manifest_file, 'w') try: manifest_f.write(manifest_buf) + return manifest_file finally: manifest_f.close() except IOError: diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index a0d62efcfd..5fa1ca10d4 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -7,7 +7,36 @@ from distutils.tests import support from test.support import run_unittest -_MANIFEST = """\ +# A manifest with the only assembly reference being the msvcrt assembly, so +# should have the assembly completely stripped. Note that although the +# assembly has a reference the assembly is removed - that is +# currently a "feature", not a bug :) +_MANIFEST_WITH_ONLY_MSVC_REFERENCE = """\ + + + + + + + + + + + + + + + + + +""" + +# A manifest with references to assemblies other than msvcrt. When processed, +# this assembly should be returned with just the msvcrt part removed. +_MANIFEST_WITH_MULTIPLE_REFERENCES = """\ @@ -115,7 +144,7 @@ def test_remove_visual_c_ref(self): manifest = os.path.join(tempdir, 'manifest') f = open(manifest, 'w') try: - f.write(_MANIFEST) + f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES) finally: f.close() @@ -133,6 +162,20 @@ def test_remove_visual_c_ref(self): # makes sure the manifest was properly cleaned self.assertEqual(content, _CLEANED_MANIFEST) + def test_remove_entire_manifest(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE) + finally: + f.close() + + compiler = MSVCCompiler() + got = compiler._remove_visual_c_ref(manifest) + self.assertIs(got, None) + def test_suite(): return unittest.makeSuite(msvc9compilerTestCase) From a768a2ee006904565310189824cc120c62004568 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 17 Oct 2011 11:35:06 +1100 Subject: [PATCH 3330/8469] normalize whitespace in Lib/distutils/msvc9compiler.py --- msvc9compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 9838d64a0e..7ec9b92a5d 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -685,7 +685,7 @@ def manifest_setup_ldargs(self, output_filename, build_temp, ld_args): def manifest_get_embed_info(self, target_desc, ld_args): # If a manifest should be embedded, return a tuple of # (manifest_filename, resource_id). Returns None if no manifest - # should be embedded. See http://bugs.python.org/issue7833 for why + # should be embedded. See http://bugs.python.org/issue7833 for why # we want to avoid any manifest for extension modules if we can) for arg in ld_args: if arg.startswith("/MANIFESTFILE:"): @@ -728,7 +728,7 @@ def _remove_visual_c_ref(self, manifest_file): manifest_buf = re.sub(pattern, "", manifest_buf) pattern = "\s*" manifest_buf = re.sub(pattern, "", manifest_buf) - # Now see if any other assemblies are referenced - if not, we + # Now see if any other assemblies are referenced - if not, we # don't want a manifest embedded. pattern = re.compile( r""" Date: Mon, 17 Oct 2011 11:35:31 +1100 Subject: [PATCH 3331/8469] normalize whitespace in Lib/distutils/msvc9compiler.py --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 0807a36095..b3f6ce10a8 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -715,7 +715,7 @@ def _remove_visual_c_ref(self, manifest_file): manifest_buf = re.sub(pattern, "", manifest_buf) pattern = "\s*" manifest_buf = re.sub(pattern, "", manifest_buf) - # Now see if any other assemblies are referenced - if not, we + # Now see if any other assemblies are referenced - if not, we # don't want a manifest embedded. pattern = re.compile( r""" Date: Mon, 17 Oct 2011 09:29:46 -0400 Subject: [PATCH 3332/8469] Adding a prompt to remind that tests should pass before release. --HG-- branch : distribute extra : rebase_source : 3c51eb5782aa845d829066c84b8c5d94a5c272ca --- release.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release.py b/release.py index eab2dc8acd..385d400e0d 100644 --- a/release.py +++ b/release.py @@ -40,6 +40,12 @@ def do_release(): print("Please do that") raise SystemExit(1) + res = raw_input('Have you or has someone verified that the tests ' + 'pass on this revision? ') + if not res.lower().startswith('y'): + print("Please do that") + raise SystemExit(2) + subprocess.check_call(['hg', 'tag', VERSION]) subprocess.check_call(['hg', 'update', VERSION]) From 9c22ddc233928d4179c561c46d766bbfb9397b59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Oct 2011 09:30:55 -0400 Subject: [PATCH 3333/8469] Added note that we should also update the bitbucket milestones and versions as part of the release process --HG-- branch : distribute extra : rebase_source : ea82ad0c2bbd87a788b6b8cb9ef0f13da3eafa74 --- release.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.py b/release.py index 385d400e0d..3b9950b3e7 100644 --- a/release.py +++ b/release.py @@ -67,6 +67,8 @@ def do_release(): # push the changes subprocess.check_call(['hg', 'push']) + # TODO: update bitbucket milestones and versions + def build_docs(): if os.path.isdir('docs/build'): shutil.rmtree('docs/build') From f9b08d3f6741d8dba8448f275ee591c9de04a484 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Oct 2011 12:39:42 -0400 Subject: [PATCH 3334/8469] Use pypi user when uploading the bootstrap script --HG-- branch : distribute extra : rebase_source : 83fcc3c6d84e6c8ec4ee9c09a829c77961dd832d --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 3b9950b3e7..f3000e0bac 100644 --- a/release.py +++ b/release.py @@ -85,7 +85,7 @@ def upload_bootstrap_script(): scp_command = 'pscp' if sys.platform.startswith('win') else 'scp' try: subprocess.check_call([scp_command, 'distribute_setup.py', - 'ziade.org:websites/python-distribute.org/']) + 'pypi@ziade.org:python-distribute.org/']) except: print("Unable to upload bootstrap script. Ask Tarek to do it.") From bcfc28fc3fc10f99bfe31f883f0e2ff90ae5f461 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Oct 2011 14:14:50 -0400 Subject: [PATCH 3335/8469] Removing release.sh, replaced by release.py --HG-- branch : distribute extra : rebase_source : 8dd4dea1d410e6e60b2614008330530855a7afbb --- release.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 release.sh diff --git a/release.sh b/release.sh deleted file mode 100755 index 7831697427..0000000000 --- a/release.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -export VERSION="0.6.25" - -# tagging -hg tag $VERSION -f -hg ci -m "bumped revision" - -# creating the releases -rm -rf ./dist - -# now preparing the source release, pushing it and its doc -python2.6 setup.py -q egg_info -RDb '' sdist register upload -cd docs/ -make clean -make html -cd .. -python2.6 setup.py upload_docs - -# pushing the bootstrap script -scp distribute_setup.py ziade.org:websites/python-distribute.org/ - -# starting the new dev -hg push - From 427ee765c3c78e3aa63cd17881a4b70a009e8857 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Fri, 28 Oct 2011 14:45:05 +0200 Subject: [PATCH 3336/8469] Closes #13258: Use callable() built-in in the standard library. --- dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.py b/dist.py index 69825f206f..a702568278 100644 --- a/dist.py +++ b/dist.py @@ -537,7 +537,7 @@ def _parse_command_opts(self, parser, args): for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): help_option_found=1 - if hasattr(func, '__call__'): + if callable(func): func() else: raise DistutilsClassError( From 489ea5a90ec0c0b9b72626b3420aa97854df2e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 2 Nov 2011 18:05:41 +0100 Subject: [PATCH 3337/8469] Cleanups in distutils tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Actually check the contents of the file created by bdist_dumb. - Don’t use “RECORD†as filename for non-PEP 376 record file - Don’t start method name with “_testâ€, it smells like a disabled test method instead of an helper method - Fix some idioms (assertIn, addCleanup) --- tests/test_bdist_dumb.py | 23 +++++++++++++++++------ tests/test_install.py | 26 +++++++++++--------------- tests/test_sdist.py | 8 ++++---- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 55ba58d14f..1037d8216e 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -1,8 +1,10 @@ """Tests for distutils.command.bdist_dumb.""" -import unittest -import sys import os +import imp +import sys +import zipfile +import unittest from test.support import run_unittest from distutils.core import Distribution @@ -72,15 +74,24 @@ def test_simple_built(self): # see what we have dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - base = "%s.%s" % (dist.get_fullname(), cmd.plat_name) + base = "%s.%s.zip" % (dist.get_fullname(), cmd.plat_name) if os.name == 'os2': base = base.replace(':', '-') - wanted = ['%s.zip' % base] - self.assertEqual(dist_created, wanted) + self.assertEqual(dist_created, [base]) # now let's check what we have in the zip file - # XXX to be done + fp = zipfile.ZipFile(os.path.join('dist', base)) + try: + contents = fp.namelist() + finally: + fp.close() + + contents = sorted(os.path.basename(fn) for fn in contents) + wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], + 'foo.%s.pyc' % imp.get_tag(), + 'foo.py'] + self.assertEqual(contents, sorted(wanted)) def test_suite(): return unittest.makeSuite(BuildDumbTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index dfc46b197b..8a63af992f 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -87,19 +87,17 @@ def _expanduser(path): self.old_expand = os.path.expanduser os.path.expanduser = _expanduser - try: - # this is the actual test - self._test_user_site() - finally: + def cleanup(): site.USER_BASE = self.old_user_base site.USER_SITE = self.old_user_site install_module.USER_BASE = self.old_user_base install_module.USER_SITE = self.old_user_site os.path.expanduser = self.old_expand - def _test_user_site(self): + self.addCleanup(cleanup) + for key in ('nt_user', 'unix_user', 'os2_home'): - self.assertTrue(key in INSTALL_SCHEMES) + self.assertIn(key, INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -107,14 +105,14 @@ def _test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assertTrue('user' in options) + self.assertIn('user', options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assertTrue(not os.path.exists(self.user_base)) - self.assertTrue(not os.path.exists(self.user_site)) + self.assertFalse(os.path.exists(self.user_base)) + self.assertFalse(os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() @@ -123,8 +121,8 @@ def _test_user_site(self): self.assertTrue(os.path.exists(self.user_base)) self.assertTrue(os.path.exists(self.user_site)) - self.assertTrue('userbase' in cmd.config_vars) - self.assertTrue('usersite' in cmd.config_vars) + self.assertIn('userbase', cmd.config_vars) + self.assertIn('usersite', cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) @@ -178,14 +176,13 @@ def test_finalize_options(self): def test_record(self): install_dir = self.mkdtemp() project_dir, dist = self.create_dist(scripts=['hello']) - self.addCleanup(os.chdir, os.getcwd()) os.chdir(project_dir) self.write_file('hello', "print('o hai')") cmd = install(dist) dist.command_obj['install'] = cmd cmd.root = install_dir - cmd.record = os.path.join(project_dir, 'RECORD') + cmd.record = os.path.join(project_dir, 'filelist') cmd.ensure_finalized() cmd.run() @@ -204,7 +201,6 @@ def test_record_extensions(self): install_dir = self.mkdtemp() project_dir, dist = self.create_dist(ext_modules=[ Extension('xx', ['xxmodule.c'])]) - self.addCleanup(os.chdir, os.getcwd()) os.chdir(project_dir) support.copy_xxmodule_c(project_dir) @@ -216,7 +212,7 @@ def test_record_extensions(self): dist.command_obj['install'] = cmd dist.command_obj['build_ext'] = buildextcmd cmd.root = install_dir - cmd.record = os.path.join(project_dir, 'RECORD') + cmd.record = os.path.join(project_dir, 'filelist') cmd.ensure_finalized() cmd.run() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 529b4ef5c6..d0d16b2f55 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -288,7 +288,7 @@ def test_finalize_options(self): # the following tests make sure there is a nice error message instead # of a traceback when parsing an invalid manifest template - def _test_template(self, content): + def _check_template(self, content): dist, cmd = self.get_cmd() os.chdir(self.tmp_dir) self.write_file('MANIFEST.in', content) @@ -299,17 +299,17 @@ def _test_template(self, content): self.assertEqual(len(warnings), 1) def test_invalid_template_unknown_command(self): - self._test_template('taunt knights *') + self._check_template('taunt knights *') def test_invalid_template_wrong_arguments(self): # this manifest command takes one argument - self._test_template('prune') + self._check_template('prune') @unittest.skipIf(os.name != 'nt', 'test relevant for Windows only') def test_invalid_template_wrong_path(self): # on Windows, trailing slashes are not allowed # this used to crash instead of raising a warning: #8286 - self._test_template('include examples/') + self._check_template('include examples/') @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_get_file_list(self): From 4d25e1b74cf370c9013b6e016e0ac9da4d57f6bb Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 3 Nov 2011 02:45:46 +0100 Subject: [PATCH 3338/8469] Issue #13307: fix bdist_rpm test failures --- command/build_py.py | 6 +++--- command/install_lib.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 3868c12f5b..9e2473fbb6 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -3,7 +3,7 @@ Implements the Distutils 'build_py' command.""" import sys, os -import sys +import imp from glob import glob from distutils.core import Command @@ -311,9 +311,9 @@ def get_outputs(self, include_bytecode=1): outputs.append(filename) if include_bytecode: if self.compile: - outputs.append(filename + "c") + outputs.append(imp.cache_from_source(filename, True)) if self.optimize > 0: - outputs.append(filename + "o") + outputs.append(imp.cache_from_source(filename, False)) outputs += [ os.path.join(build_dir, filename) diff --git a/command/install_lib.py b/command/install_lib.py index 3d01d07115..8a6bc7dec4 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -4,6 +4,7 @@ (install all Python modules).""" import os +import imp import sys from distutils.core import Command @@ -164,9 +165,9 @@ def _bytecode_filenames(self, py_filenames): if ext != PYTHON_SOURCE_EXTENSION: continue if self.compile: - bytecode_files.append(py_file + "c") + bytecode_files.append(imp.cache_from_source(py_file, True)) if self.optimize > 0: - bytecode_files.append(py_file + "o") + bytecode_files.append(imp.cache_from_source(py_file, False)) return bytecode_files From 21fe162a546a17caa23b72d5ddb7f055cc9d5207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 3 Nov 2011 03:45:33 +0100 Subject: [PATCH 3339/8469] More fixes for PEP 3147 compliance in distutils (#11254) --- command/build_py.py | 9 +++-- command/install_lib.py | 7 ++-- tests/test_build_py.py | 72 +++++++++++++++++++++++++-------------- tests/test_install.py | 15 ++++---- tests/test_install_lib.py | 52 ++++++++++++++++------------ 5 files changed, 95 insertions(+), 60 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 3868c12f5b..1371b3d6ff 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -2,7 +2,8 @@ Implements the Distutils 'build_py' command.""" -import sys, os +import os +import imp import sys from glob import glob @@ -311,9 +312,11 @@ def get_outputs(self, include_bytecode=1): outputs.append(filename) if include_bytecode: if self.compile: - outputs.append(filename + "c") + outputs.append(imp.cache_from_source(filename, + debug_override=True)) if self.optimize > 0: - outputs.append(filename + "o") + outputs.append(imp.cache_from_source(filename, + debug_override=False)) outputs += [ os.path.join(build_dir, filename) diff --git a/command/install_lib.py b/command/install_lib.py index 3d01d07115..15c08f1249 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -4,6 +4,7 @@ (install all Python modules).""" import os +import imp import sys from distutils.core import Command @@ -164,9 +165,11 @@ def _bytecode_filenames(self, py_filenames): if ext != PYTHON_SOURCE_EXTENSION: continue if self.compile: - bytecode_files.append(py_file + "c") + bytecode_files.append(imp.cache_from_source( + py_file, debug_override=True)) if self.optimize > 0: - bytecode_files.append(py_file + "o") + bytecode_files.append(imp.cache_from_source( + py_file, debug_override=False)) return bytecode_files diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 80316ad7d0..e416edd4a1 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -2,7 +2,6 @@ import os import sys -import io import imp import unittest @@ -54,7 +53,6 @@ def test_package_data(self): # This makes sure the list of outputs includes byte-compiled # files for Python modules but not for package data files # (there shouldn't *be* byte-code files for those!). - # self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) @@ -64,15 +62,11 @@ def test_package_data(self): if sys.dont_write_bytecode: self.assertFalse(os.path.exists(pycache_dir)) else: - # XXX even with -O, distutils writes pyc, not pyo; bug? pyc_files = os.listdir(pycache_dir) self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files) def test_empty_package_dir(self): - # See SF 1668596/1720897. - cwd = os.getcwd() - - # create the distribution files. + # See bugs #1668596/#1720897 sources = self.mkdtemp() open(os.path.join(sources, "__init__.py"), "w").close() @@ -81,30 +75,55 @@ def test_empty_package_dir(self): open(os.path.join(testdir, "testfile"), "w").close() os.chdir(sources) - old_stdout = sys.stdout - sys.stdout = io.StringIO() + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() try: - dist = Distribution({"packages": ["pkg"], - "package_dir": {"pkg": ""}, - "package_data": {"pkg": ["doc/*"]}}) - # script_name need not exist, it just need to be initialized - dist.script_name = os.path.join(sources, "setup.py") - dist.script_args = ["build"] - dist.parse_command_line() - - try: - dist.run_commands() - except DistutilsFileError: - self.fail("failed package_data test when package_dir is ''") - finally: - # Restore state. - os.chdir(cwd) - sys.stdout = old_stdout + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + + @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') + def test_byte_compile(self): + project_dir, dist = self.create_dist(py_modules=['boiledeggs']) + os.chdir(project_dir) + self.write_file('boiledeggs.py', 'import antigravity') + cmd = build_py(dist) + cmd.compile = 1 + cmd.build_lib = 'here' + cmd.finalize_options() + cmd.run() + + found = os.listdir(cmd.build_lib) + self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) + found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) + self.assertEqual(found, ['boiledeggs.%s.pyc' % imp.get_tag()]) + + @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') + def test_byte_compile_optimized(self): + project_dir, dist = self.create_dist(py_modules=['boiledeggs']) + os.chdir(project_dir) + self.write_file('boiledeggs.py', 'import antigravity') + cmd = build_py(dist) + cmd.compile = 0 + cmd.optimize = 1 + cmd.build_lib = 'here' + cmd.finalize_options() + cmd.run() + + found = os.listdir(cmd.build_lib) + self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) + found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) + self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) def test_dont_write_bytecode(self): # makes sure byte_compile is not used - pkg_dir, dist = self.create_dist() + dist = self.create_dist()[1] cmd = build_py(dist) cmd.compile = 1 cmd.optimize = 1 @@ -118,6 +137,7 @@ def test_dont_write_bytecode(self): self.assertIn('byte-compiling is disabled', self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index 8a63af992f..cb2e1f2879 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,6 +1,7 @@ """Tests for distutils.command.install.""" import os +import imp import sys import unittest import site @@ -67,10 +68,7 @@ def check_path(got, expected): check_path(cmd.install_data, destination) def test_user_site(self): - # site.USER_SITE was introduced in 2.6 - if sys.version < '2.6': - return - + # test install with --user # preparing the environment for the test self.old_user_base = site.USER_BASE self.old_user_site = site.USER_SITE @@ -175,9 +173,11 @@ def test_finalize_options(self): def test_record(self): install_dir = self.mkdtemp() - project_dir, dist = self.create_dist(scripts=['hello']) + project_dir, dist = self.create_dist(py_modules=['hello'], + scripts=['sayhi']) os.chdir(project_dir) - self.write_file('hello', "print('o hai')") + self.write_file('hello.py', "def main(): print('o hai')") + self.write_file('sayhi', 'from hello import main; main()') cmd = install(dist) dist.command_obj['install'] = cmd @@ -193,7 +193,7 @@ def test_record(self): f.close() found = [os.path.basename(line) for line in content.splitlines()] - expected = ['hello', + expected = ['hello.py', 'hello.%s.pyc' % imp.get_tag(), 'sayhi', 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) @@ -238,6 +238,7 @@ def test_debug_mode(self): install_module.DEBUG = False self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index b42b03b2fa..2bd4dc6e96 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -10,13 +10,14 @@ from distutils.errors import DistutilsOptionError from test.support import run_unittest + class InstallLibTestCase(support.TempdirManager, support.LoggingSilencer, support.EnvironGuard, unittest.TestCase): def test_finalize_options(self): - pkg_dir, dist = self.create_dist() + dist = self.create_dist()[1] cmd = install_lib(dist) cmd.finalize_options() @@ -35,56 +36,62 @@ def test_finalize_options(self): @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') def test_byte_compile(self): - pkg_dir, dist = self.create_dist() - os.chdir(pkg_dir) + project_dir, dist = self.create_dist() + os.chdir(project_dir) cmd = install_lib(dist) cmd.compile = cmd.optimize = 1 - f = os.path.join(pkg_dir, 'foo.py') + f = os.path.join(project_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - pyc_file = imp.cache_from_source('foo.py') + pyc_file = imp.cache_from_source('foo.py', debug_override=True) pyo_file = imp.cache_from_source('foo.py', debug_override=False) self.assertTrue(os.path.exists(pyc_file)) self.assertTrue(os.path.exists(pyo_file)) def test_get_outputs(self): - pkg_dir, dist = self.create_dist() + project_dir, dist = self.create_dist() + os.chdir(project_dir) + os.mkdir('spam') cmd = install_lib(dist) # setting up a dist environment cmd.compile = cmd.optimize = 1 - cmd.install_dir = pkg_dir - f = os.path.join(pkg_dir, 'foo.py') - self.write_file(f, '# python file') - cmd.distribution.py_modules = [pkg_dir] + cmd.install_dir = self.mkdtemp() + f = os.path.join(project_dir, 'spam', '__init__.py') + self.write_file(f, '# python package') cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] - cmd.distribution.packages = [pkg_dir] + cmd.distribution.packages = ['spam'] cmd.distribution.script_name = 'setup.py' - # get_output should return 4 elements - self.assertTrue(len(cmd.get_outputs()) >= 2) + # get_outputs should return 4 elements: spam/__init__.py, .pyc and + # .pyo, foo.import-tag-abiflags.so / foo.pyd + outputs = cmd.get_outputs() + self.assertEqual(len(outputs), 4, outputs) def test_get_inputs(self): - pkg_dir, dist = self.create_dist() + project_dir, dist = self.create_dist() + os.chdir(project_dir) + os.mkdir('spam') cmd = install_lib(dist) # setting up a dist environment cmd.compile = cmd.optimize = 1 - cmd.install_dir = pkg_dir - f = os.path.join(pkg_dir, 'foo.py') - self.write_file(f, '# python file') - cmd.distribution.py_modules = [pkg_dir] + cmd.install_dir = self.mkdtemp() + f = os.path.join(project_dir, 'spam', '__init__.py') + self.write_file(f, '# python package') cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] - cmd.distribution.packages = [pkg_dir] + cmd.distribution.packages = ['spam'] cmd.distribution.script_name = 'setup.py' - # get_input should return 2 elements - self.assertEqual(len(cmd.get_inputs()), 2) + # get_inputs should return 2 elements: spam/__init__.py and + # foo.import-tag-abiflags.so / foo.pyd + inputs = cmd.get_inputs() + self.assertEqual(len(inputs), 2, inputs) def test_dont_write_bytecode(self): # makes sure byte_compile is not used - pkg_dir, dist = self.create_dist() + dist = self.create_dist()[1] cmd = install_lib(dist) cmd.compile = 1 cmd.optimize = 1 @@ -98,6 +105,7 @@ def test_dont_write_bytecode(self): self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(InstallLibTestCase) From 658d33c3b35e0cb0cdcb75c80026192adad14a4c Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 12 Nov 2011 01:20:45 +0100 Subject: [PATCH 3340/8469] Issue #13193: fix distutils.filelist.FileList under Windows --- filelist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filelist.py b/filelist.py index a94b5c8e96..87b2cc6bc4 100644 --- a/filelist.py +++ b/filelist.py @@ -313,7 +313,10 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): # ditch end of pattern character empty_pattern = glob_to_re('') prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] - pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) + # match both path separators, as in Postel's principle + sep_pat = "[" + re.escape(os.path.sep + os.path.altsep + if os.path.altsep else os.path.sep) + "]" + pattern_re = "^" + sep_pat.join([prefix_re, ".*" + pattern_re]) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re From 74d45d2ff91f898f30dcf8c4a47192ed8fc509c3 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 12 Nov 2011 01:33:59 +0100 Subject: [PATCH 3341/8469] Issue #13193: Fix distutils.filelist.FileList under Windows. The "recursive-include" directive now recognizes both legal path separators. --- filelist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filelist.py b/filelist.py index 4aac6d397a..ebd1411817 100644 --- a/filelist.py +++ b/filelist.py @@ -328,7 +328,10 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): # ditch end of pattern character empty_pattern = glob_to_re('') prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] - pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re) + # match both path separators, as in Postel's principle + sep_pat = "[" + re.escape(os.path.sep + os.path.altsep + if os.path.altsep else os.path.sep) + "]" + pattern_re = "^" + sep_pat.join([prefix_re, ".*" + pattern_re]) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re From b27cbb5efa3005728fe1c892a528a614e306bc5d Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 17 Nov 2011 11:07:08 -0800 Subject: [PATCH 3342/8469] workaround a cache issue refers #258 --HG-- branch : distribute extra : rebase_source : c8897b0541098e34f4347621f54ed79ef32be229 --- CHANGES.txt | 1 + pkg_resources.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 85b1c269c2..889dc34b1b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ------ * Issue #249: Added options to exclude 2to3 fixers +* Issue #258: Workaround a cache issue ------ 0.6.23 diff --git a/pkg_resources.py b/pkg_resources.py index e8dae8a420..4cc73bb853 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -508,6 +508,10 @@ def __iter__(self): """ seen = {} for item in self.entries: + if item not in self.entry_keys: + # workaround a cache issue + continue + for key in self.entry_keys[item]: if key not in seen: seen[key]=1 From 7ee58aa10f38d16c8e2525509b4cb24a11f8f6b3 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 17 Nov 2011 11:08:19 -0800 Subject: [PATCH 3343/8469] replaced the changelog where it belongs --HG-- branch : distribute extra : rebase_source : fe632afaf51fecd020b79c64f3fb9a5d391a6d5e --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 889dc34b1b..a44b048120 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,17 @@ CHANGES ======= +------ +0.6.25 +------ + +* Issue #258: Workaround a cache issue + ------ 0.6.24 ------ * Issue #249: Added options to exclude 2to3 fixers -* Issue #258: Workaround a cache issue ------ 0.6.23 From 70177237f6549f0647b490b2dc6a06ff14f0b321 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Nov 2011 09:55:28 -0500 Subject: [PATCH 3344/8469] distribute_setup.py now accepts the --user argument for installing to the user-local environment on Python 2.6 and later. Fixes #260. --HG-- branch : distribute extra : rebase_source : 7435c8b7f4d8eb6308cf7d5d9578f79c91f6b18b --- CHANGES.txt | 2 ++ distribute_setup.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a44b048120..b857227ddc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ CHANGES ------ * Issue #258: Workaround a cache issue +* Issue #260: distribute_setup.py now accepts the --user parameter for + Python 2.6 and later. ------ 0.6.24 diff --git a/distribute_setup.py b/distribute_setup.py index f0bfa25ac4..d2c2899afa 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -63,7 +63,7 @@ def quote(arg): """ % SETUPTOOLS_FAKED_VERSION -def _install(tarball): +def _install(tarball, install_args=()): # extracting the tarball tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) @@ -81,7 +81,7 @@ def _install(tarball): # installing log.warn('Installing Distribute') - if not _python_cmd('setup.py', 'install'): + if not _python_cmd('setup.py', 'install', *install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') finally: @@ -474,11 +474,20 @@ def sorter(dir1, dir2): else: self._dbg(1, "tarfile: %s" % e) +def _build_install_args(argv): + install_args = [] + user_install = '--user' in argv + if user_install and sys.version_info < (2,6): + log.warn("--user requires Python 2.6 or later") + raise SystemExit(1) + if user_install: + install_args.append('--user') + return install_args def main(argv, version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" tarball = download_setuptools() - _install(tarball) + _install(tarball, _build_install_args(argv)) if __name__ == '__main__': From bbe00513be4b20a82eb844dab52c15ca5e8e7113 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2011 12:55:33 -0500 Subject: [PATCH 3345/8469] Fix issue #262 - package_index.open_with_auth no longer throws LookupError on Python 3. --HG-- branch : distribute extra : rebase_source : ae4a0886ff89d3679f495f51171f94d3770e5d47 --- CHANGES.txt | 2 ++ setuptools/package_index.py | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index b857227ddc..a245b2a4a9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ CHANGES * Issue #258: Workaround a cache issue * Issue #260: distribute_setup.py now accepts the --user parameter for Python 2.6 and later. +* Issue #262: package_index.open_with_auth no longer throws LookupError + on Python 3. ------ 0.6.24 diff --git a/setuptools/package_index.py b/setuptools/package_index.py index bb0ae12996..d0896febc4 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO +import base64 import httplib from pkg_resources import * from distutils import log @@ -756,6 +757,22 @@ def _socket_timeout(*args, **kwargs): return _socket_timeout return _socket_timeout +def _encode_auth(auth): + """ + A function compatible with Python 2.3-3.3 that will encode + auth from a URL suitable for an HTTP header. + >>> _encode_auth('username%3Apassword') + u'dXNlcm5hbWU6cGFzc3dvcmQ=' + """ + auth_s = urllib2.unquote(auth) + # convert to bytes + auth_bytes = auth_s.encode() + # use the legacy interface for Python 2.3 support + encoded_bytes = base64.encodestring(auth_bytes) + # convert back to a string + encoded = encoded_bytes.decode() + # strip the trailing carriage return + return encoded.rstrip() def open_with_auth(url): """Open a urllib2 request, handling HTTP authentication""" @@ -768,7 +785,7 @@ def open_with_auth(url): auth = None if auth: - auth = "Basic " + urllib2.unquote(auth).encode('base64').strip() + auth = "Basic " + _encode_auth(auth) new_url = urlparse.urlunparse((scheme,host,path,params,query,frag)) request = urllib2.Request(new_url) request.add_header("Authorization", auth) From 9d5c2363ccbdd0c8909f47fcf61cef647f302450 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2011 17:11:03 -0500 Subject: [PATCH 3346/8469] Updated release script to make sure bump happens in the right place --HG-- branch : distribute extra : rebase_source : c43255ab2e3cba530aa8043fd3989aa8e21cd4a7 --- release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release.py b/release.py index f3000e0bac..2aab1344e9 100644 --- a/release.py +++ b/release.py @@ -58,6 +58,9 @@ def do_release(): 'upload', 'upload_docs']) upload_bootstrap_script() + # update to the tip for the next operation + subprocess.check_call(['hg', 'update']) + # we just tagged the current version, bump for the next release. bump_versions() subprocess.check_call(['hg', 'ci', '-m', From 490e58f300e1cbed87b5efa671c3502d79e0c6a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Dec 2011 10:15:15 -0500 Subject: [PATCH 3347/8469] Issue #11638: Adding test to ensure .tar.gz files can be generated by sdist command with unicode metadata, based on David Barnett's patch. Issue #11638: Added tests to capture failures in make_tarball with various unicode strings. Following fix for Issue #13639, these tests now pass. --- tests/test_archive_util.py | 31 +++++++++++++++++++++++++++++-- tests/test_sdist.py | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 1f7106f84f..2881148cc2 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Tests for distutils.archive_util.""" __revision__ = "$Id$" @@ -40,6 +41,9 @@ class ArchiveUtilTestCase(support.TempdirManager, @unittest.skipUnless(zlib, "requires zlib") def test_make_tarball(self): + self._make_tarball('archive') + + def _make_tarball(self, target_name): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') @@ -51,7 +55,7 @@ def test_make_tarball(self): unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], "source and target should be on same drive") - base_name = os.path.join(tmpdir2, 'archive') + base_name = os.path.join(tmpdir2, target_name) # working with relative paths to avoid tar warnings old_dir = os.getcwd() @@ -66,7 +70,7 @@ def test_make_tarball(self): self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one - base_name = os.path.join(tmpdir2, 'archive') + base_name = os.path.join(tmpdir2, target_name) old_dir = os.getcwd() os.chdir(tmpdir) try: @@ -277,6 +281,29 @@ def _breaks(*args, **kw): finally: del ARCHIVE_FORMATS['xxx'] + @unittest.skipUnless(zlib, "requires zlib") + def test_make_tarball_unicode(self): + """ + Mirror test_make_tarball, except filename is unicode. + """ + self._make_tarball(u'archive') + + @unittest.skipUnless(zlib, "requires zlib") + def test_make_tarball_unicode_latin1(self): + """ + Mirror test_make_tarball, except filename is unicode and contains + latin characters. + """ + self._make_tarball(u'Ã¥rchiv') # note this isn't a real word + + @unittest.skipUnless(zlib, "requires zlib") + def test_make_tarball_unicode_extended(self): + """ + Mirror test_make_tarball, except filename is unicode and contains + characters outside the latin charset. + """ + self._make_tarball(u'ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 33f6ee69a9..cb7beb7b2c 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -165,6 +165,28 @@ def test_make_distribution(self): result.sort() self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(zlib, "requires zlib") + def test_unicode_metadata_tgz(self): + """ + Unicode name or version should not break building to tar.gz format. + Reference issue #11638. + """ + + # create the sdist command with unicode parameters + dist, cmd = self.get_cmd({'name': u'fake', 'version': u'1.0'}) + + # create the sdist as gztar and run the command + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + # The command should have created the .tar.gz file + dist_folder = join(self.tmp_dir, 'dist') + result = os.listdir(dist_folder) + self.assertEqual(result, ['fake-1.0.tar.gz']) + + os.remove(join(dist_folder, 'fake-1.0.tar.gz')) + @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): From 57661611c196b2b76a8be5463ae11db361e22eb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Dec 2011 12:17:01 -0500 Subject: [PATCH 3348/8469] Ported some test cases from 2.7 for #11638 --- tests/test_archive_util.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 8edfab49f8..a6aeaf04a0 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Tests for distutils.archive_util.""" import unittest import os @@ -32,6 +33,24 @@ class ArchiveUtilTestCase(support.TempdirManager, @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_make_tarball(self): + self._make_tarball('archive') + + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + def test_make_tarball_latin1(self): + """ + Mirror test_make_tarball, except filename contains latin characters. + """ + self._make_tarball('Ã¥rchiv') # note this isn't a real word + + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + def test_make_tarball_extended(self): + """ + Mirror test_make_tarball, except filename contains extended + characters outside the latin charset. + """ + self._make_tarball('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive + + def _make_tarball(self, target_name): # creating something to tar tmpdir = self.mkdtemp() self.write_file([tmpdir, 'file1'], 'xxx') @@ -43,7 +62,7 @@ def test_make_tarball(self): unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], "Source and target should be on same drive") - base_name = os.path.join(tmpdir2, 'archive') + base_name = os.path.join(tmpdir2, target_name) # working with relative paths to avoid tar warnings old_dir = os.getcwd() @@ -58,7 +77,7 @@ def test_make_tarball(self): self.assertTrue(os.path.exists(tarball)) # trying an uncompressed one - base_name = os.path.join(tmpdir2, 'archive') + base_name = os.path.join(tmpdir2, target_name) old_dir = os.getcwd() os.chdir(tmpdir) try: From 812d67fafa516462fdac0294a56dcf0cd1631a59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2011 10:45:08 -0500 Subject: [PATCH 3349/8469] Limit test scope to those platforms that can save the target filenames. Reference #11638. --- tests/test_archive_util.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index a6aeaf04a0..1afdd46225 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -2,6 +2,7 @@ """Tests for distutils.archive_util.""" import unittest import os +import sys import tarfile from os.path import splitdrive import warnings @@ -26,6 +27,18 @@ except ImportError: ZLIB_SUPPORT = False +def can_fs_encode(filename): + """ + Return True if the filename can be saved in the file system. + """ + if os.path.supports_unicode_filenames: + return True + try: + filename.encode(sys.getfilesystemencoding()) + except UnicodeEncodeError: + return False + return True + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, @@ -36,6 +49,8 @@ def test_make_tarball(self): self._make_tarball('archive') @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + @unittest.skipUnless(can_fs_encode('Ã¥rchiv'), + 'File system cannot handle this filename') def test_make_tarball_latin1(self): """ Mirror test_make_tarball, except filename contains latin characters. @@ -43,6 +58,8 @@ def test_make_tarball_latin1(self): self._make_tarball('Ã¥rchiv') # note this isn't a real word @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + @unittest.skipUnless(can_fs_encode('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–'), + 'File system cannot handle this filename') def test_make_tarball_extended(self): """ Mirror test_make_tarball, except filename contains extended From 92f16a5603d9ba55dd73f8c1ad34efb276021dc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2011 11:42:22 -0500 Subject: [PATCH 3350/8469] Limit test scope to those platforms that can save the target filenames. Reference #11638. --- tests/test_archive_util.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 2881148cc2..f01cec3263 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -4,6 +4,7 @@ import unittest import os +import sys import tarfile from os.path import splitdrive import warnings @@ -34,6 +35,18 @@ except ImportError: zlib = None +def can_fs_encode(filename): + """ + Return True if the filename can be saved in the file system. + """ + if os.path.supports_unicode_filenames: + return True + try: + filename.encode(sys.getfilesystemencoding()) + except UnicodeEncodeError: + return False + return True + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, @@ -289,6 +302,8 @@ def test_make_tarball_unicode(self): self._make_tarball(u'archive') @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(can_fs_encode(u'Ã¥rchiv'), + 'File system cannot handle this filename') def test_make_tarball_unicode_latin1(self): """ Mirror test_make_tarball, except filename is unicode and contains @@ -297,6 +312,8 @@ def test_make_tarball_unicode_latin1(self): self._make_tarball(u'Ã¥rchiv') # note this isn't a real word @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(can_fs_encode(u'ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–'), + 'File system cannot handle this filename') def test_make_tarball_unicode_extended(self): """ Mirror test_make_tarball, except filename is unicode and contains From 44a9a9edfced040982904c9adbc37c811845c512 Mon Sep 17 00:00:00 2001 From: Marcus Smith Date: Sun, 8 Jan 2012 19:22:42 -0800 Subject: [PATCH 3351/8469] Update EasyInstall 'Custom Installation' documentation to be conscious of PEP-370 --HG-- branch : distribute extra : rebase_source : 2d83be766be1dbe335848c5ece56430c7cfa58d3 --- docs/easy_install.txt | 217 +++++++++--------------------------------- 1 file changed, 44 insertions(+), 173 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index ab008a1d90..cea4e122b5 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -940,194 +940,65 @@ Command-Line Options Custom Installation Locations ----------------------------- -EasyInstall manages what packages are active using Python ``.pth`` files, which -are normally only usable in Python's main ``site-packages`` directory. On some -platforms (such as Mac OS X), there are additional ``site-packages`` -directories that you can use besides the main one, but usually there is only -one directory on the system where you can install packages without extra steps. - -There are many reasons, however, why you might want to install packages -somewhere other than the ``site-packages`` directory. For example, you might -not have write access to that directory. You may be working with unstable -versions of packages that you don't want to install system-wide. And so on. - -The following sections describe various approaches to custom installation; feel -free to choose which one best suits your system and needs. - -`Administrator Installation`_ - This approach is for when you have write access to ``site-packages`` (or - another directory where ``.pth`` files are processed), but don't want to - install packages there. This can also be used by a system administrator - to enable each user having their own private directories that EasyInstall - will use to install packages. - -`Mac OS X "User" Installation`_ - This approach produces a result similar to an administrator installation - that gives each user their own private package directory, but on Mac OS X - the hard part has already been done for you. This is probably the best - approach for Mac OS X users. - -`Creating a "Virtual" Python`_ - This approach is for when you don't have "root" or access to write to the - ``site-packages`` directory, and would like to be able to set up one or - more "virtual python" executables for your projects. This approach - gives you the benefits of multiple Python installations, but without having - to actually install Python more than once and use up lots of disk space. - (Only the Python executable is copied; the libraries will be symlinked - from the systemwide Python.) - - If you don't already have any ``PYTHONPATH`` customization or - special distutils configuration, and you can't use either of the preceding - approaches, this is probably the best one for you. - -`"Traditional" PYTHONPATH-based Installation`_ - If you already have a custom ``PYTHONPATH``, and/or a custom distutils - configuration, and don't want to change any of your existing setup, you may - be interested in this approach. (If you're using a custom ``.pth`` file to - point to your custom installation location, however, you should use - `Administrator Installation`_ to enable ``.pth`` processing in the custom - location instead, as that is easier and more flexible than this approach.) - - -Administrator Installation -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you have root access to your machine, you can easily configure it to allow -each user to have their own directory where Python packages can be installed -and managed by EasyInstall. - -First, create an ``altinstall.pth`` file in Python's ``site-packages`` -directory, containing the following line (substituting the correct Python -version):: - - import os, site; site.addsitedir(os.path.expanduser('~/lib/python2.3')) +By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, +and manages them using a custom ``.pth`` file in that same directory. -This will automatically add each user's ``~/lib/python2.X`` directory to -``sys.path`` (if it exists), *and* it will process any ``.pth`` files in that -directory -- which is what makes it usable with EasyInstall. +Very often though, a user or developer wants ``easy_install`` to install and manage python packages +in an alternative location, usually for one of 3 reasons: -The next step is to create or modify ``distutils.cfg`` in the ``distutils`` -directory of your Python library. The correct directory will be something like -``/usr/lib/python2.X/distutils`` on most Posix systems and something like -``C:\\Python2X\Lib\distutils`` on Windows machines. Add the following lines -to the file, substituting the correct Python version if necessary: +1. They don't have access to write to the main Python site-packages directory. -.. code-block:: ini - - [install] - install_lib = ~/lib/python2.3 - - # This next line is optional but often quite useful; it directs EasyInstall - # and the distutils to install scripts in the user's "bin" directory. For - # Mac OS X framework Python builds, you should use /usr/local/bin instead, - # because neither ~/bin nor the default script installation location are on - # the system PATH. - # - install_scripts = ~/bin +2. They want a user-specific stash of packages, that is not visible to other users. -This will configure the distutils and EasyInstall to install packages to the -user's home directory by default. +3. They want to isolate a set of packages to a specific python application, usually to minimize + the possibility of version conflicts. -Of course, you aren't limited to using a ``~/lib/python2.X`` directory with -this approach. You can substitute a specific systemwide directory if you like. -You can also edit ``~/.pydistutils.cfg`` (or ``~/pydistutils.cfg`` on Windows) -instead of changing the master ``distutils.cfg`` file. The true keys of this -approach are simply that: +Historically, there have been many approaches to achieve custom installation. +The following section lists only the easiest and most relevant approaches [1]_. -1. any custom installation directory must be added to ``sys.path`` using a - ``site.addsitedir()`` call from a working ``.pth`` file or - ``sitecustomize.py``. +`Use the "--user" option`_ + +`Use the "--user" option and customize "PYTHONUSERBASE"`_ -2. The active distutils configuration file(s) or ``easy_install`` command line - should include the custom directory in the ``--site-dirs`` option, so that - EasyInstall knows that ``.pth`` files will work in that location. (This is - because Python does not keep track of what directories are or aren't enabled - for ``.pth`` processing, in any way that EasyInstall can find out.) - -As long as both of these things have been done, your custom installation -location is good to go. - - -Mac OS X "User" Installation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you are on a Mac OS X machine, you should just use the -``~/Library/Python/2.x/site-packages`` directory as your custom installation -location, because it is already configured to process ``.pth`` files, and -EasyInstall already knows this. - -Before installing EasyInstall/setuptools, just create a ``~/.pydistutils.cfg`` -file with the following contents (or add this to the existing contents): - -.. code-block:: ini +`Use "virtualenv"`_ - [install] - install_lib = ~/Library/Python/$py_version_short/site-packages - install_scripts = ~/bin +.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6. -This will tell the distutils and EasyInstall to always install packages in -your personal ``site-packages`` directory, and scripts to ``~/bin``. (Note: do -*not* replace ``$py_version_short`` with an actual Python version in the -configuration file! The distutils will substitute the correct value at -runtime, so that the above configuration file should work correctly no matter -what Python version you use, now or in the future.) +.. _PEP-370: http://www.python.org/dev/peps/pep-0370/ -Once you have done this, you can follow the normal `installation instructions`_ -and use ``easy_install`` without any other special options or steps. -(Note, however, that ``~/bin`` is not in the default ``PATH``, so you may have -to refer to scripts by their full location. You may want to modify your shell -startup script (likely ``.bashrc`` or ``.profile``) or your -``~/.MacOSX/environment.plist`` to include ``~/bin`` in your ``PATH``. - - -Creating a "Virtual" Python -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you are on a Linux, BSD, Cygwin, or other similar Unix-like operating -system, but don't have root access, you can create your own "virtual" -Python installation, which uses its own library directories and some symlinks -to the site-wide Python. - -Please refer to the `virtualenv`_ documentation for creating such an -environment. +Use the "--user" option +~~~~~~~~~~~~~~~~~~~~~~~~~~ +With Python 2.6 came the User scheme for installation, which means that all +python distributions support an alternative install location that is specific to a user [2]_ [3]_. +The Default location for each OS is explained in the python documentation +for the ``site.USER_BASE`` variable. This mode of installation can be turned on by +specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. +This approach serves the need to have a user-specific stash of packages. + +.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6. +.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. + +Use the "--user" option and customize "PYTHONUSERBASE" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment +variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific +application, simply set the OS environment of that application to a specific value of +``PYTHONUSERBASE``, that contains just those packages. + +Use "virtualenv" +~~~~~~~~~~~~~~~~ +"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby +creating an isolated location to intall packages. The evolution of "virtualenv" started before the existence +of the User installation scheme. "virtualenv" provides a version of ``easy_install`` that is +scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features +that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages. + +Please refer to the `virtualenv`_ documentation for more details. .. _virtualenv: http://pypi.python.org/pypi/virtualenv -"Traditional" ``PYTHONPATH``-based Installation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This installation method is not as robust or as flexible as `creating a -"virtual" python`_ installation, as it uses various tricks to fool Python into -processing ``.pth`` files where it normally wouldn't. We suggest you at least -consider using one of the other approaches, as they will generally result in -a cleaner, more usable Python configuration. However, if for some reason you -can't or won't use one of the other approaches, here's how to do it. - -Assuming that you want to install packages in a directory called ``~/py-lib``, -and scripts in ``~/bin``, here's what you need to do: - -First, edit ``~/.pydistutils.cfg`` to include these settings, if you don't -already have them: - -.. code-block:: ini - - [install] - install_lib = ~/py-lib - install_scripts = ~/bin - -Be sure to do this *before* you try to run the ``distribute_setup.py`` -installation script. Then, follow the standard `installation instructions`_, -but make sure that ``~/py-lib`` is listed in your ``PYTHONPATH`` environment -variable. - -Your library installation directory *must* be in listed in ``PYTHONPATH``, -not only when you install packages with EasyInstall, but also when you use -any packages that are installed using EasyInstall. You will probably want to -edit your ``~/.profile`` or other configuration file(s) to ensure that it is -set, if you haven't already got this set up on your machine. - Package Index "API" ------------------- From 28f1f51717d813a91f6f290cac073b67257e266d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Jan 2012 08:25:22 -0500 Subject: [PATCH 3352/8469] Removed broken reference to 'Administrator Installation'. --HG-- branch : distribute extra : rebase_source : a844b98f9f382efd746498fdf03e02b17f012e70 --- docs/easy_install.txt | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index cea4e122b5..9b4fcfbb6e 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -875,9 +875,6 @@ Command-Line Options judgment and force an installation directory to be treated as if it supported ``.pth`` files. - (If you want to *make* a non-``PYTHONPATH`` directory support ``.pth`` - files, please see the `Administrator Installation`_ section below.) - ``--no-deps, -N`` (New in 0.6a6) Don't install any dependencies. This is intended as a convenience for tools that wrap eggs in a platform-specific packaging system. (We don't @@ -940,25 +937,25 @@ Command-Line Options Custom Installation Locations ----------------------------- -By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, +By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, and manages them using a custom ``.pth`` file in that same directory. -Very often though, a user or developer wants ``easy_install`` to install and manage python packages +Very often though, a user or developer wants ``easy_install`` to install and manage python packages in an alternative location, usually for one of 3 reasons: 1. They don't have access to write to the main Python site-packages directory. 2. They want a user-specific stash of packages, that is not visible to other users. -3. They want to isolate a set of packages to a specific python application, usually to minimize - the possibility of version conflicts. +3. They want to isolate a set of packages to a specific python application, usually to minimize + the possibility of version conflicts. -Historically, there have been many approaches to achieve custom installation. -The following section lists only the easiest and most relevant approaches [1]_. +Historically, there have been many approaches to achieve custom installation. +The following section lists only the easiest and most relevant approaches [1]_. `Use the "--user" option`_ - -`Use the "--user" option and customize "PYTHONUSERBASE"`_ + +`Use the "--user" option and customize "PYTHONUSERBASE"`_ `Use "virtualenv"`_ @@ -968,22 +965,22 @@ The following section lists only the easiest and most relevant approaches [1]_. Use the "--user" option -~~~~~~~~~~~~~~~~~~~~~~~~~~ -With Python 2.6 came the User scheme for installation, which means that all +~~~~~~~~~~~~~~~~~~~~~~~ +With Python 2.6 came the User scheme for installation, which means that all python distributions support an alternative install location that is specific to a user [2]_ [3]_. -The Default location for each OS is explained in the python documentation +The Default location for each OS is explained in the python documentation for the ``site.USER_BASE`` variable. This mode of installation can be turned on by specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. This approach serves the need to have a user-specific stash of packages. .. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6. .. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. - + Use the "--user" option and customize "PYTHONUSERBASE" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific -application, simply set the OS environment of that application to a specific value of +application, simply set the OS environment of that application to a specific value of ``PYTHONUSERBASE``, that contains just those packages. Use "virtualenv" From a63bd68dca86bd47cd4424767b76e7cab6f9d136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 15 Jan 2012 02:48:55 +0100 Subject: [PATCH 3353/8469] Stop ignoring RPMs in distutils' upload command (#2945). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug reported by Hartmut Goebel and patch contributed by Carl Robben. Carl tested the fix and we have a buildbot with rpm installed, so I’m committing even though I could not run this test (but I do understand the changed code :) --- command/bdist_rpm.py | 12 ++++++++++++ tests/test_bdist_rpm.py | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 678e118896..357eaa575e 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -365,16 +365,28 @@ def run(self): self.spawn(rpm_cmd) if not self.dry_run: + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + if not self.binary_only: srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) assert(os.path.exists(srpm)) self.move_file(srpm, self.dist_dir) + filename = os.path.join(self.dist_dir, source_rpm) + self.distribution.dist_files.append( + ('bdist_rpm', pyversion, filename)) if not self.source_only: for rpm in binary_rpms: rpm = os.path.join(rpm_dir['RPMS'], rpm) if os.path.exists(rpm): self.move_file(rpm, self.dist_dir) + filename = os.path.join(self.dist_dir, + os.path.basename(rpm)) + self.distribution.dist_files.append( + ('bdist_rpm', pyversion, filename)) def _dist_path(self, path): return os.path.join(self.dist_dir, os.path.basename(path)) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 804fb1355f..ab7a1bf24e 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -78,6 +78,10 @@ def test_quiet(self): dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + # bug #2945: upload ignores bdist_rpm files + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files) + def test_no_optimize_flag(self): # XXX I am unable yet to make this test work without @@ -117,6 +121,11 @@ def test_no_optimize_flag(self): dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + + # bug #2945: upload ignores bdist_rpm files + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files) + os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): From 91c28e06be723398c598c6412136eeec653125be Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 18 Jan 2012 03:51:38 +0100 Subject: [PATCH 3354/8469] Closes #13803: Under Solaris, distutils doesn't include bitness in the directory name --- util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 6c49f0b1cb..2e4617ef27 100644 --- a/util.py +++ b/util.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re +import sys, os, string, re, platform from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -76,6 +76,7 @@ def get_platform (): if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) + machine += ".%s" % platform.architecture()[0] # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) From 379a0e19faa93540a244372b3332262916b0140a Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 18 Jan 2012 03:58:42 +0100 Subject: [PATCH 3355/8469] Closes #13803: Under Solaris, distutils doesn't include bitness in the directory name --- util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util.py b/util.py index f42c6a18b9..36c4a68494 100644 --- a/util.py +++ b/util.py @@ -9,6 +9,7 @@ import imp import sys import string +import platform from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -77,6 +78,7 @@ def get_platform (): if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) + machine += ".%s" % platform.architecture()[0] # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) From 411af75d7af96d11ff9a9fbed91298e58a2d7d07 Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 18 Jan 2012 04:25:28 +0100 Subject: [PATCH 3356/8469] Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name --- util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 2e4617ef27..0c24e8ca3e 100644 --- a/util.py +++ b/util.py @@ -6,7 +6,7 @@ __revision__ = "$Id$" -import sys, os, string, re, platform +import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -76,7 +76,11 @@ def get_platform (): if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) - machine += ".%s" % platform.architecture()[0] + # We can't use "platform.architecture()[0]" because a + # bootstrap problem. We use a dict to get an error + # if some suspicious happens. + bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} + machine += ".%s" % bitness[sys.maxint] # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) From 026f3483351ce08ffa47f9143aa17d7da02f10ec Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 18 Jan 2012 04:27:37 +0100 Subject: [PATCH 3357/8469] Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name --- util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 36c4a68494..416deec71d 100644 --- a/util.py +++ b/util.py @@ -9,7 +9,6 @@ import imp import sys import string -import platform from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -78,7 +77,11 @@ def get_platform (): if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) - machine += ".%s" % platform.architecture()[0] + # We can't use "platform.architecture()[0]" because a + # bootstrap problem. We use a dict to get an error + # if some suspicious happens. + bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} + machine += ".%s" % bitness[sys.maxint] # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) From 989fd55dddc6638eab5073ab0adcc9df0ceac154 Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 18 Jan 2012 05:04:49 +0100 Subject: [PATCH 3358/8469] And yet another emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index 416deec71d..bce840274d 100644 --- a/util.py +++ b/util.py @@ -81,7 +81,7 @@ def get_platform (): # bootstrap problem. We use a dict to get an error # if some suspicious happens. bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} - machine += ".%s" % bitness[sys.maxint] + machine += ".%s" % bitness[sys.maxsize] # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) From 5e53787185059a78874e2f730c431ec611b0b8e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Jan 2012 14:11:03 -0500 Subject: [PATCH 3359/8469] Remove grody hack for later versions of Python where it is no longer necessary. Fixes #269. --HG-- branch : distribute extra : rebase_source : c4f18c8760303a2228baf5b88ec1f59a865999a5 --- CHANGES.txt | 2 ++ setuptools/command/sdist.py | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a245b2a4a9..3c13ae209e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES Python 2.6 and later. * Issue #262: package_index.open_with_auth no longer throws LookupError on Python 3. +* Issue #269: AttributeError when an exception occurs reading Manifest.in + on late releases of Python. ------ 0.6.24 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 3442fe4be6..c49839cdee 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -199,15 +199,25 @@ def add_defaults(self): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) - def read_template(self): + def __read_template_hack(self): + # This grody hack closes the template file (MANIFEST.in) if an + # exception occurs during read_template. + # Doing so prevents an error when easy_install attempts to delete the + # file. try: _sdist.read_template(self) except: - # grody hack to close the template file (MANIFEST.in) - # this prevents easy_install's attempt at deleting the file from - # dying and thus masking the real error sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() raise + # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle + # has been fixed, so only override the method if we're using an earlier + # Python. + if ( + sys.version_info < (2,7,2) + or (3,0) <= sys.version_info < (3,1,4) + or (3,2) <= sys.version_info < (3,2,1) + ): + read_template = __read_template_hack def check_readme(self): alts = ("README", "README.txt") From d881174c2ecbc975f906758ae79f2fd4a491a779 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jan 2012 20:47:39 -0500 Subject: [PATCH 3360/8469] Updated DEVGUIDE to match current approach. --HG-- branch : distribute extra : rebase_source : 0c6caeacf90a13277dae24a2f39041fd5e44dc65 --- DEVGUIDE.txt | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index 54b7f71c4d..8dcabfd1d7 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -6,22 +6,16 @@ Distribute is using Mercurial. Grab the code at bitbucket:: - $ hg clone https://tarek@bitbucket.org/tarek/distribute distribute + $ hg clone https://bitbucket.org/tarek/distribute -If you want to work in the 0.6 branch, you have to switch to it:: +If you want to contribute changes, we recommend you fork the repository on +bitbucket, commit the changes to your repository, and then make a pull request +on bitbucket. If you make some changes, don't forget to: - $ hg update 0.6-maintenance - - $ hg branch - 0.6-maintenance - -If you make some changes, don't forget to: - -- backport it to the 0.7 branch - add a note in CHANGES.txt -And remember that 0.6 is only bug fixes, and the APIs should -be fully backward compatible with Setuptools. +And remember that 0.6 (the only development line) is only bug fixes, and the +APIs should be fully backward compatible with Setuptools. You can run the tests via:: From e8934cbb01ea226144ff9222ad666a26a715b1a2 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 3 Feb 2012 02:39:49 +0100 Subject: [PATCH 3361/8469] Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. --- tests/support.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/support.py b/tests/support.py index a2190c0214..4e6058d0ec 100644 --- a/tests/support.py +++ b/tests/support.py @@ -200,6 +200,9 @@ def fixup_build_ext(cmd): cmd = build_ext(dist) support.fixup_build_ext(cmd) cmd.ensure_finalized() + + Unlike most other Unix platforms, Mac OS X embeds absolute paths + to shared libraries into executables, so the fixup is not needed there. """ if os.name == 'nt': cmd.debug = sys.executable.endswith('_d.exe') @@ -211,5 +214,8 @@ def fixup_build_ext(cmd): if runshared is None: cmd.library_dirs = ['.'] else: - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) + if sys.platform == 'darwin': + cmd.library_dirs = [] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) From ef0dc103554be0c54d48e5bc028050423efb4594 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 3 Feb 2012 02:42:16 +0100 Subject: [PATCH 3362/8469] Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. --- tests/support.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/support.py b/tests/support.py index d77bbee362..84d9232328 100644 --- a/tests/support.py +++ b/tests/support.py @@ -188,6 +188,9 @@ def fixup_build_ext(cmd): cmd = build_ext(dist) support.fixup_build_ext(cmd) cmd.ensure_finalized() + + Unlike most other Unix platforms, Mac OS X embeds absolute paths + to shared libraries into executables, so the fixup is not needed there. """ if os.name == 'nt': cmd.debug = sys.executable.endswith('_d.exe') @@ -199,5 +202,8 @@ def fixup_build_ext(cmd): if runshared is None: cmd.library_dirs = ['.'] else: - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) + if sys.platform == 'darwin': + cmd.library_dirs = [] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) From d7907a5c969ad05970e458cc7b69b522dda46164 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Feb 2012 22:34:53 -0500 Subject: [PATCH 3363/8469] Fix #272 - TypeError when namespace_package is unicode --HG-- branch : distribute extra : rebase_source : 5bb6bc394dbe2834977b853af85241ae0a472de6 --- CHANGES.txt | 3 +++ setuptools/command/install_egg_info.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3c13ae209e..cf901dc07a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ CHANGES on Python 3. * Issue #269: AttributeError when an exception occurs reading Manifest.in on late releases of Python. +* Issue #272: Prevent TypeError when namespace package names are unicode + and single-install-externally-managed is used. Also fixes PIP issue + 449. ------ 0.6.24 diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index dd95552e0b..f44b34b555 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -89,6 +89,8 @@ def install_namespaces(self): if not self.dry_run: f = open(filename,'wt') for pkg in nsp: + # ensure pkg is not a unicode string under Python 2.7 + pkg = str(pkg) pth = tuple(pkg.split('.')) trailer = '\n' if '.' in pkg: From f4a592c1240bbc3f0b1d0d08e261874857954225 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 8 Feb 2012 13:33:09 -0500 Subject: [PATCH 3364/8469] Now load legacy scripts wrappers from templates in the package, which get converted to Python 3 syntax when built on Python 3. Fixes #273. --HG-- branch : distribute extra : rebase_source : 900842f8a9e70d347296f7b076c6113ead6f7318 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 36 ++++++++++++++++------------- setuptools/script template (dev).py | 6 +++++ setuptools/script template.py | 4 ++++ 4 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 setuptools/script template (dev).py create mode 100644 setuptools/script template.py diff --git a/CHANGES.txt b/CHANGES.txt index cf901dc07a..5ee08823cb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,7 @@ CHANGES * Issue #272: Prevent TypeError when namespace package names are unicode and single-install-externally-managed is used. Also fixes PIP issue 449. +* Issue #273: Legacy script launchers now install with Python2/3 support. ------ 0.6.24 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4700fe0eaa..a51d88f518 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -731,22 +731,26 @@ def install_script(self, dist, script_name, script_text, dev_path=None): spec = str(dist.as_requirement()) is_script = is_python_script(script_text, script_name) - if is_script and dev_path: - script_text = get_script_header(script_text) + ( - "# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r\n" - "__requires__ = %(spec)r\n" - "from pkg_resources import require; require(%(spec)r)\n" - "del require\n" - "__file__ = %(dev_path)r\n" - "execfile(__file__)\n" - ) % locals() - elif is_script: - script_text = get_script_header(script_text) + ( - "# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r\n" - "__requires__ = %(spec)r\n" - "import pkg_resources\n" - "pkg_resources.run_script(%(spec)r, %(script_name)r)\n" - ) % locals() + def get_template(filename): + """ + There are a couple of template scripts in the package. This + function loads one of them and prepares it for use. + + These templates use triple-quotes to escape variable + substitutions so the scripts get the 2to3 treatment when build + on Python 3. The templates cannot use triple-quotes naturally. + """ + raw_bytes = resource_string('setuptools', template_name) + template_str = raw_bytes.decode('utf-8') + clean_template = template_str.replace('"""', '') + return clean_template + + if is_script: + template_name = 'script template.py' + if dev_path: + template_name = template_name.replace('.py', ' (dev).py') + script_text = (get_script_header(script_text) + + get_template(template_name) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') def write_script(self, script_name, contents, mode="t", blockers=()): diff --git a/setuptools/script template (dev).py b/setuptools/script template (dev).py new file mode 100644 index 0000000000..6dd9dd4525 --- /dev/null +++ b/setuptools/script template (dev).py @@ -0,0 +1,6 @@ +# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r +__requires__ = """%(spec)r""" +from pkg_resources import require; require("""%(spec)r""") +del require +__file__ = """%(dev_path)r""" +execfile(__file__) diff --git a/setuptools/script template.py b/setuptools/script template.py new file mode 100644 index 0000000000..8dd5d51001 --- /dev/null +++ b/setuptools/script template.py @@ -0,0 +1,4 @@ +# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r +__requires__ = """%(spec)r""" +import pkg_resources +pkg_resources.run_script("""%(spec)r""", """%(script_name)r""") From 8108212a71996cd25d5cb5366148d9c9dace27b5 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 10 Feb 2012 12:59:06 +0100 Subject: [PATCH 3365/8469] Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building Distutils-based packages with C extension modules may fail because Apple has removed gcc-4.2, the version used to build python.org 64-bit/32-bit Pythons. If the user does not explicitly override the default C compiler by setting the CC environment variable, Distutils will now attempt to compile extension modules with clang if gcc-4.2 is required but not found. Also as a convenience, if the user does explicitly set CC, substitute its value as the default compiler in the Distutils LDSHARED configuration variable for OS X. (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u SDK, neither of which are available in Xcode 4. This change does not attempt to override settings to support their use with Xcode 4.) --- sysconfig.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 0d6d4c4fea..4f9041a794 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -141,6 +141,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) +_USE_CLANG = None def customize_compiler(compiler): """Do any platform-specific customization of a CCompiler instance. @@ -153,8 +154,38 @@ def customize_compiler(compiler): get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') + newcc = None if 'CC' in os.environ: - cc = os.environ['CC'] + newcc = os.environ['CC'] + elif sys.platform == 'darwin' and cc == 'gcc-4.2': + # Issue #13590: + # Since Apple removed gcc-4.2 in Xcode 4.2, we can no + # longer assume it is available for extension module builds. + # If Python was built with gcc-4.2, check first to see if + # it is available on this system; if not, try to use clang + # instead unless the caller explicitly set CC. + global _USE_CLANG + if _USE_CLANG is None: + from distutils import log + from subprocess import Popen, PIPE + p = Popen("! type gcc-4.2 && type clang && exit 2", + shell=True, stdout=PIPE, stderr=PIPE) + p.wait() + if p.returncode == 2: + _USE_CLANG = True + log.warn("gcc-4.2 not found, using clang instead") + else: + _USE_CLANG = False + if _USE_CLANG: + newcc = 'clang' + if newcc: + # On OS X, if CC is overridden, use that as the default + # command for LDSHARED as well + if (sys.platform == 'darwin' + and 'LDSHARED' not in os.environ + and ldshared.startswith(cc)): + ldshared = newcc + ldshared[len(cc):] + cc = newcc if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: From 008c905df03c73798516d88ffe6550261d4f9af3 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 10 Feb 2012 13:01:08 +0100 Subject: [PATCH 3366/8469] Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building Distutils-based packages with C extension modules may fail because Apple has removed gcc-4.2, the version used to build python.org 64-bit/32-bit Pythons. If the user does not explicitly override the default C compiler by setting the CC environment variable, Distutils will now attempt to compile extension modules with clang if gcc-4.2 is required but not found. Also as a convenience, if the user does explicitly set CC, substitute its value as the default compiler in the Distutils LDSHARED configuration variable for OS X. (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u SDK, neither of which are available in Xcode 4. This change does not attempt to override settings to support their use with Xcode 4.) --- sysconfig.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index ac06313b19..16902ca920 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,6 +146,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) +_USE_CLANG = None def customize_compiler(compiler): """Do any platform-specific customization of a CCompiler instance. @@ -158,8 +159,38 @@ def customize_compiler(compiler): get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') + newcc = None if 'CC' in os.environ: - cc = os.environ['CC'] + newcc = os.environ['CC'] + elif sys.platform == 'darwin' and cc == 'gcc-4.2': + # Issue #13590: + # Since Apple removed gcc-4.2 in Xcode 4.2, we can no + # longer assume it is available for extension module builds. + # If Python was built with gcc-4.2, check first to see if + # it is available on this system; if not, try to use clang + # instead unless the caller explicitly set CC. + global _USE_CLANG + if _USE_CLANG is None: + from distutils import log + from subprocess import Popen, PIPE + p = Popen("! type gcc-4.2 && type clang && exit 2", + shell=True, stdout=PIPE, stderr=PIPE) + p.wait() + if p.returncode == 2: + _USE_CLANG = True + log.warn("gcc-4.2 not found, using clang instead") + else: + _USE_CLANG = False + if _USE_CLANG: + newcc = 'clang' + if newcc: + # On OS X, if CC is overridden, use that as the default + # command for LDSHARED as well + if (sys.platform == 'darwin' + and 'LDSHARED' not in os.environ + and ldshared.startswith(cc)): + ldshared = newcc + ldshared[len(cc):] + cc = newcc if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: From e1f6c4c9deda898b03f389edcbbe0fd16e547724 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 11 Feb 2012 20:40:24 +0100 Subject: [PATCH 3367/8469] Issue #13994: Earler partial revert of Distutils enhancements in 2.7 has left two versions of customize_compiler, the original in distutils.sysconfig and another copy in distutils.ccompiler, with some parts of distutils calling one and others using the other. Complete the revert back to only having one in distutils.sysconfig as is the case in 3.x. --- ccompiler.py | 52 ---------------------------------------- command/build_clib.py | 2 +- command/config.py | 2 +- sysconfig.py | 14 ++++++++--- tests/test_build_clib.py | 3 ++- tests/test_ccompiler.py | 3 ++- 6 files changed, 17 insertions(+), 59 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index c2b1f6fbe9..7076b93394 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -18,58 +18,6 @@ from distutils.util import split_quoted, execute from distutils import log -_sysconfig = __import__('sysconfig') - -def customize_compiler(compiler): - """Do any platform-specific customization of a CCompiler instance. - - Mainly needed on Unix, so we can plug in the information that - varies across Unices and is stored in Python's Makefile. - """ - if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ - _sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR', - 'ARFLAGS') - - if 'CC' in os.environ: - cc = os.environ['CC'] - if 'CXX' in os.environ: - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: - archiver = ar + ' ' + os.environ['ARFLAGS'] - else: - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, - compiler_cxx=cxx, - linker_so=ldshared, - linker_exe=cc, - archiver=archiver) - - compiler.shared_lib_extension = so_ext - class CCompiler: """Abstract base class to define the interface that must be implemented by real compiler classes. Also has some utility methods used by diff --git a/command/build_clib.py b/command/build_clib.py index 98a1726ffa..205587e7fc 100644 --- a/command/build_clib.py +++ b/command/build_clib.py @@ -19,7 +19,7 @@ import os from distutils.core import Command from distutils.errors import DistutilsSetupError -from distutils.ccompiler import customize_compiler +from distutils.sysconfig import customize_compiler from distutils import log def show_compilers(): diff --git a/command/config.py b/command/config.py index da8da59538..b084913563 100644 --- a/command/config.py +++ b/command/config.py @@ -16,7 +16,7 @@ from distutils.core import Command from distutils.errors import DistutilsExecError -from distutils.ccompiler import customize_compiler +from distutils.sysconfig import customize_compiler from distutils import log LANG_EXT = {'c': '.c', 'c++': '.cxx'} diff --git a/sysconfig.py b/sysconfig.py index 4f9041a794..4b193b2703 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -150,9 +150,10 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO') + 'CCSHARED', 'LDSHARED', 'SO', 'AR', + 'ARFLAGS') newcc = None if 'CC' in os.environ: @@ -203,6 +204,12 @@ def customize_compiler(compiler): cpp = cpp + ' ' + os.environ['CPPFLAGS'] cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: + archiver = ar + ' ' + os.environ['ARFLAGS'] + else: + archiver = ar + ' ' + ar_flags cc_cmd = cc + ' ' + cflags compiler.set_executables( @@ -211,7 +218,8 @@ def customize_compiler(compiler): compiler_so=cc_cmd + ' ' + ccshared, compiler_cxx=cxx, linker_so=ldshared, - linker_exe=cc) + linker_exe=cc, + archiver=archiver) compiler.shared_lib_extension = so_ext diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 4f4e2bc7c6..bef1bd9953 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -122,7 +122,8 @@ def test_run(self): # before we run the command, we want to make sure # all commands are present on the system # by creating a compiler and checking its executables - from distutils.ccompiler import new_compiler, customize_compiler + from distutils.ccompiler import new_compiler + from distutils.sysconfig import customize_compiler compiler = new_compiler() customize_compiler(compiler) diff --git a/tests/test_ccompiler.py b/tests/test_ccompiler.py index e21873e821..45e477a429 100644 --- a/tests/test_ccompiler.py +++ b/tests/test_ccompiler.py @@ -4,7 +4,8 @@ from test.test_support import captured_stdout from distutils.ccompiler import (gen_lib_options, CCompiler, - get_default_compiler, customize_compiler) + get_default_compiler) +from distutils.sysconfig import customize_compiler from distutils import debug from distutils.tests import support From 2c62a97a9a02f45900b34cad9089a664f254ffd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 12 Feb 2012 04:41:36 +0100 Subject: [PATCH 3368/8469] Fix distutils.filelist.FileList under Windows (#13193). The code used to call os.path.join to build a regex but without escaping the backslash, which lead to test failures on Windows. Antoine Pitrou fixed it in 557a973709de by enhancing the code to accept both / and \, with proper escaping, but in my opinion this goes against the distutils feature freeze, hence this change. --- filelist.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/filelist.py b/filelist.py index ebd1411817..5540b39a38 100644 --- a/filelist.py +++ b/filelist.py @@ -328,10 +328,8 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): # ditch end of pattern character empty_pattern = glob_to_re('') prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] - # match both path separators, as in Postel's principle - sep_pat = "[" + re.escape(os.path.sep + os.path.altsep - if os.path.altsep else os.path.sep) + "]" - pattern_re = "^" + sep_pat.join([prefix_re, ".*" + pattern_re]) + # paths should always use / in manifest templates + pattern_re = "^%s/.*%s" % (prefix_re, pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re From 994f4c4872485a62b67461766025532e7144a82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 12 Feb 2012 04:52:21 +0100 Subject: [PATCH 3369/8469] Fix distutils.filelist.FileList under Windows (#13193). The code used to call os.path.join to build a regex but without escaping the backslash, which lead to test failures on Windows. Antoine Pitrou fixed it in 0a94e2f807c7 by enhancing the code to accept both / and \, with proper escaping, but in my opinion this goes against the distutils feature freeze, hence this change. --- filelist.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/filelist.py b/filelist.py index 87b2cc6bc4..91220321a4 100644 --- a/filelist.py +++ b/filelist.py @@ -313,10 +313,8 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): # ditch end of pattern character empty_pattern = glob_to_re('') prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)] - # match both path separators, as in Postel's principle - sep_pat = "[" + re.escape(os.path.sep + os.path.altsep - if os.path.altsep else os.path.sep) + "]" - pattern_re = "^" + sep_pat.join([prefix_re, ".*" + pattern_re]) + # paths should always use / in manifest templates + pattern_re = "^%s/.*%s" % (prefix_re, pattern_re) else: # no prefix -- respect anchor flag if anchor: pattern_re = "^" + pattern_re From 0dcd74259a364fdc273223482084e595460ed4a1 Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Mon, 13 Feb 2012 21:33:51 +0200 Subject: [PATCH 3370/8469] Issue #13193: Fix distutils.filelist tests to always use / as path separator. --- tests/test_filelist.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 1e04077f82..d86ea44491 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -1,7 +1,6 @@ """Tests for distutils.filelist.""" import re import unittest -from os.path import join from distutils import debug from distutils.log import WARN from distutils.errors import DistutilsTemplateError @@ -54,15 +53,15 @@ def test_process_template_line(self): # simulated file list file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt', - join('global', 'one.txt'), - join('global', 'two.txt'), - join('global', 'files.x'), - join('global', 'here.tmp'), - join('f', 'o', 'f.oo'), - join('dir', 'graft-one'), - join('dir', 'dir2', 'graft2'), - join('dir3', 'ok'), - join('dir3', 'sub', 'ok.txt'), + 'global/one.txt', + 'global/two.txt', + 'global/files.x', + 'global/here.tmp', + 'f/o/f.oo', + 'dir/graft-one', + 'dir/dir2/graft2', + 'dir3/ok', + 'dir3/sub/ok.txt', ] for line in MANIFEST_IN.split('\n'): @@ -70,9 +69,8 @@ def test_process_template_line(self): continue file_list.process_template_line(line) - wanted = ['ok', 'four.txt', join('global', 'one.txt'), - join('global', 'two.txt'), join('f', 'o', 'f.oo'), - join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')] + wanted = ['ok', 'four.txt', 'global/one.txt', 'global/two.txt', + 'f/o/f.oo', 'dir/graft-one', 'dir/dir2/graft2'] self.assertEqual(file_list.files, wanted) From f6cb3d29d919ff6b9313b8a3281c66cfb368c29b Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Mon, 13 Feb 2012 16:22:33 -0500 Subject: [PATCH 3371/8469] This allows the sdist command to ensure that any files listed in package_data are included in the dist, regardless of whether it's under version control, as is the case with distutil's sdist. Setting include_package_data=True disables this functionality. --HG-- branch : distribute extra : rebase_source : 2cae1675c638dc12fd556368074c6b5c691c6f58 --- setuptools/command/sdist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index c49839cdee..484f8276f7 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -186,6 +186,14 @@ def add_defaults(self): if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) + # This functionality is incompatible with include_package_data, and + # will in fact create an infinite recursion if include_package_data + # is True. Use of include_package_data will imply that + # distutils-style automatic handling of package_data is disabled + if not self.distribution.include_package_data: + for _, src_dir, _, filenames in build_py.data_files: + self.filelist.extend([os.path.join(src_dir, filename) + for filename in filenames]) if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') From d0303ebcf59e6498e2e42bd0edcd56b932441cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Feb 2012 16:28:20 +0100 Subject: [PATCH 3372/8469] Fix parsing of build_ext --libraries option (#1326113) --- command/build_ext.py | 3 +-- tests/test_build_ext.py | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 55a4288ac0..923197bac4 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -160,8 +160,7 @@ def finalize_options(self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if isinstance(self.libraries, str): - self.libraries = [self.libraries] + self.ensure_string_list('libraries') # Life is easier if we're not forever checking for None, so # simplify these options to empty lists if unset diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 2fa63d300b..198cce3257 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -150,21 +150,21 @@ def test_finalize_options(self): # make sure cmd.libraries is turned into a list # if it's a string cmd = build_ext(dist) - cmd.libraries = 'my_lib' + cmd.libraries = 'my_lib, other_lib lastlib' cmd.finalize_options() - self.assertEqual(cmd.libraries, ['my_lib']) + self.assertEqual(cmd.libraries, ['my_lib', 'other_lib', 'lastlib']) # make sure cmd.library_dirs is turned into a list # if it's a string cmd = build_ext(dist) - cmd.library_dirs = 'my_lib_dir' + cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep cmd.finalize_options() - self.assertTrue('my_lib_dir' in cmd.library_dirs) + self.assertEqual(cmd.library_dirs, ['my_lib_dir', 'other_lib_dir']) # make sure rpath is turned into a list - # if it's a list of os.pathsep's paths + # if it's a string cmd = build_ext(dist) - cmd.rpath = os.pathsep.join(['one', 'two']) + cmd.rpath = 'one%stwo' % os.pathsep cmd.finalize_options() self.assertEqual(cmd.rpath, ['one', 'two']) From 366ee8997644ce4f83c440bcd7e08ae00cf29ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Feb 2012 16:44:37 +0100 Subject: [PATCH 3373/8469] Fix parsing of build_ext --libraries option (#1326113) --- command/build_ext.py | 3 +-- tests/test_build_ext.py | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 8d843d689f..34b61bdb82 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -165,8 +165,7 @@ def finalize_options(self): if plat_py_include != py_include: self.include_dirs.append(plat_py_include) - if isinstance(self.libraries, str): - self.libraries = [self.libraries] + self.ensure_string_list('libraries') # Life is easier if we're not forever checking for None, so # simplify these options to empty lists if unset diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 1827437628..87cceee22d 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -178,21 +178,21 @@ def test_finalize_options(self): # make sure cmd.libraries is turned into a list # if it's a string cmd = build_ext(dist) - cmd.libraries = 'my_lib' + cmd.libraries = 'my_lib, other_lib lastlib' cmd.finalize_options() - self.assertEqual(cmd.libraries, ['my_lib']) + self.assertEqual(cmd.libraries, ['my_lib', 'other_lib', 'lastlib']) # make sure cmd.library_dirs is turned into a list # if it's a string cmd = build_ext(dist) - cmd.library_dirs = 'my_lib_dir' + cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep cmd.finalize_options() - self.assertTrue('my_lib_dir' in cmd.library_dirs) + self.assertEqual(cmd.library_dirs, ['my_lib_dir', 'other_lib_dir']) # make sure rpath is turned into a list - # if it's a list of os.pathsep's paths + # if it's a string cmd = build_ext(dist) - cmd.rpath = os.pathsep.join(['one', 'two']) + cmd.rpath = 'one%stwo' % os.pathsep cmd.finalize_options() self.assertEqual(cmd.rpath, ['one', 'two']) From 9793abc54257ffe60b3c46e2b4a1f4ee9ef5eb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Feb 2012 18:12:12 +0100 Subject: [PATCH 3374/8469] Fix test failure for shared builds caused by #1326113 fix --- tests/test_build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 87cceee22d..090eacfb2c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -187,7 +187,8 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep cmd.finalize_options() - self.assertEqual(cmd.library_dirs, ['my_lib_dir', 'other_lib_dir']) + self.assertIn('my_lib_dir', cmd.library_dirs) + self.assertIn('other_lib_dir', cmd.library_dirs) # make sure rpath is turned into a list # if it's a string From 7348d1f553ead879a48850adf8bd17772996ec7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 15 Feb 2012 18:13:45 +0100 Subject: [PATCH 3375/8469] Fix test failure for shared builds caused by #1326113 fix --- tests/test_build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 198cce3257..b71cc983be 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -159,7 +159,8 @@ def test_finalize_options(self): cmd = build_ext(dist) cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep cmd.finalize_options() - self.assertEqual(cmd.library_dirs, ['my_lib_dir', 'other_lib_dir']) + self.assertIn('my_lib_dir', cmd.library_dirs) + self.assertIn('other_lib_dir', cmd.library_dirs) # make sure rpath is turned into a list # if it's a string From 8b33fb69465d080b685d431e4ea0b8aeb17e84b5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 23 Feb 2012 10:45:48 -0500 Subject: [PATCH 3376/8469] version now 3.1.5rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a3e2993648..0e427624b8 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.4" +__version__ = "3.1.5rc1" #--end constants-- From eb324661c378f36df356215c350772111a978ef4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 23 Feb 2012 10:52:17 -0500 Subject: [PATCH 3377/8469] bump to 2.7.3rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a849f1a9cd..83126f679f 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.2" +__version__ = "2.7.3rc1" #--end constants-- From 2181299388e93cb98ddd887f4bf9fdd0c6caeeb5 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 23 Feb 2012 10:55:57 -0500 Subject: [PATCH 3378/8469] Bump to version 2.6.8rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index beb65bb568..279e17a9df 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.7" +__version__ = "2.6.8rc1" #--end constants-- From 500a248b355d0e418e8fc58f787ba47cab97c2eb Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 23 Feb 2012 21:14:12 +0100 Subject: [PATCH 3379/8469] Bump version to 3.2.3rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9ec6165864..369750551c 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.2" +__version__ = "3.2.3rc1" #--end constants-- From 9db46d430b09baf00228adeb5a4773a02508f7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 25 Feb 2012 16:13:53 +0100 Subject: [PATCH 3380/8469] Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884). These regex changes fix a number of issues for distutils on Windows: - #6884: impossible to include a file starting with 'build' - #9691 and #14004: sdist includes too many files - #13193: test_filelist failures This commit replaces the incorrect changes done in 557a973709de, c566a3447ba1 and 3925081a7ca0 to fix #13193; we were too eager to fix the test failures and I did not study the code enough before greenlighting patches. This time we have unit tests from the problems reported by users to be sure we have the right fix. Thanks to Nadeem Vawda for his help. --- filelist.py | 20 +++++--- tests/test_filelist.py | 113 ++++++++++++++++++++++++++--------------- tests/test_sdist.py | 14 +++-- 3 files changed, 95 insertions(+), 52 deletions(-) diff --git a/filelist.py b/filelist.py index 5540b39a38..2f1c457ea0 100644 --- a/filelist.py +++ b/filelist.py @@ -210,6 +210,7 @@ def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): Return 1 if files are found. """ + # XXX docstring lying about what the special chars are? files_found = 0 pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("include_pattern: applying regex r'%s'" % @@ -297,11 +298,14 @@ def glob_to_re(pattern): # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, # and by extension they shouldn't match such "special characters" under # any OS. So change all non-escaped dots in the RE to match any - # character except the special characters. - # XXX currently the "special characters" are just slash -- i.e. this is - # Unix-only. - pattern_re = re.sub(r'((? Date: Sat, 25 Feb 2012 16:13:53 +0100 Subject: [PATCH 3381/8469] Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884). These regex changes fix a number of issues for distutils on Windows: - #6884: impossible to include a file starting with 'build' - #9691 and #14004: sdist includes too many files - #13193: test_filelist failures This commit replaces the incorrect changes done in 557a973709de, c566a3447ba1 and 3925081a7ca0 to fix #13193; we were too eager to fix the test failures and I did not study the code enough before greenlighting patches. This time we have unit tests from the problems reported by users to be sure we have the right fix. Thanks to Nadeem Vawda for his help. --- filelist.py | 20 +++++--- tests/test_filelist.py | 113 ++++++++++++++++++++++++++--------------- tests/test_sdist.py | 14 +++-- 3 files changed, 95 insertions(+), 52 deletions(-) diff --git a/filelist.py b/filelist.py index 5540b39a38..2f1c457ea0 100644 --- a/filelist.py +++ b/filelist.py @@ -210,6 +210,7 @@ def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): Return 1 if files are found. """ + # XXX docstring lying about what the special chars are? files_found = 0 pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("include_pattern: applying regex r'%s'" % @@ -297,11 +298,14 @@ def glob_to_re(pattern): # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, # and by extension they shouldn't match such "special characters" under # any OS. So change all non-escaped dots in the RE to match any - # character except the special characters. - # XXX currently the "special characters" are just slash -- i.e. this is - # Unix-only. - pattern_re = re.sub(r'((? Date: Sat, 25 Feb 2012 16:28:05 +0100 Subject: [PATCH 3382/8469] Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884). These regex changes fix a number of issues for distutils on Windows: - #6884: impossible to include a file starting with 'build' - #9691 and #14004: sdist includes too many files - #13193: test_filelist failures This commit replaces the incorrect changes done in 0a94e2f807c7 and 90b30d62caf2 to fix #13193; we were too eager to fix the test failures and I did not study the code enough before greenlighting patches. This time we have unit tests from the problems reported by users to be sure we have the right fix. Thanks to Nadeem Vawda for his help. --- filelist.py | 22 ++++--- tests/test_filelist.py | 130 +++++++++++++++++++++++++++++++---------- tests/test_sdist.py | 27 +++++---- 3 files changed, 131 insertions(+), 48 deletions(-) diff --git a/filelist.py b/filelist.py index 91220321a4..db3f7a9680 100644 --- a/filelist.py +++ b/filelist.py @@ -201,6 +201,7 @@ def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0): Return True if files are found, False otherwise. """ + # XXX docstring lying about what the special chars are? files_found = False pattern_re = translate_pattern(pattern, anchor, prefix, is_regex) self.debug_print("include_pattern: applying regex r'%s'" % @@ -284,11 +285,14 @@ def glob_to_re(pattern): # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, # and by extension they shouldn't match such "special characters" under # any OS. So change all non-escaped dots in the RE to match any - # character except the special characters. - # XXX currently the "special characters" are just slash -- i.e. this is - # Unix-only. - pattern_re = re.sub(r'((? Date: Sun, 26 Feb 2012 01:16:47 +0100 Subject: [PATCH 3383/8469] Stop ignoring RPMs in distutils' upload command (#2945). Bug reported by Hartmut Goebel and patch contributed by Carl Robben. Untested backport of the fix committed and tested for 3.2. --- command/bdist_rpm.py | 12 ++++++++++++ tests/test_bdist_rpm.py | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 0bba363557..595824367e 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -379,16 +379,28 @@ def run (self): self.spawn(rpm_cmd) if not self.dry_run: + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + if not self.binary_only: srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) assert(os.path.exists(srpm)) self.move_file(srpm, self.dist_dir) + filename = os.path.join(self.dist_dir, source_rpm) + self.distribution.dist_files.append( + ('bdist_rpm', pyversion, filename)) if not self.source_only: for rpm in binary_rpms: rpm = os.path.join(rpm_dir['RPMS'], rpm) if os.path.exists(rpm): self.move_file(rpm, self.dist_dir) + filename = os.path.join(self.dist_dir, + os.path.basename(rpm)) + self.distribution.dist_files.append( + ('bdist_rpm', pyversion, filename)) # run() def _dist_path(self, path): diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 25a5763a72..37d89155c7 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -79,6 +79,10 @@ def test_quiet(self): dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + # bug #2945: upload ignores bdist_rpm files + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files) + def test_no_optimize_flag(self): # XXX I am unable yet to make this test work without @@ -118,6 +122,11 @@ def test_no_optimize_flag(self): dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + + # bug #2945: upload ignores bdist_rpm files + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) + self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files) + os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) def test_suite(): From 760bf348a4913dfe637a06c87ca3e32e7456ddb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 26 Feb 2012 01:53:53 +0100 Subject: [PATCH 3384/8469] Synchronize some distutils tests with 3.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Actually check the contents of the file created by bdist_dumb. - Don’t use “RECORD†as filename for non-PEP 376 record file - Don’t start method name with “_testâ€, it looks like a disabled test method instead of an helper method - Fix some idioms (assertIn, addCleanup) --- tests/test_bdist_dumb.py | 24 ++++++++++++++++-------- tests/test_install.py | 35 +++++++++++++++++------------------ tests/test_sdist.py | 10 +++++----- 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 5a22a10ec8..3378f49ea0 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -1,8 +1,10 @@ """Tests for distutils.command.bdist_dumb.""" -import unittest -import sys import os +import sys +import zipfile +import unittest +from test.test_support import run_unittest # zlib is not used here, but if it's not available # test_simple_built will fail @@ -11,8 +13,6 @@ except ImportError: zlib = None -from test.test_support import run_unittest - from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -73,15 +73,23 @@ def test_simple_built(self): # see what we have dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - base = "%s.%s" % (dist.get_fullname(), cmd.plat_name) + base = "%s.%s.zip" % (dist.get_fullname(), cmd.plat_name) if os.name == 'os2': base = base.replace(':', '-') - wanted = ['%s.zip' % base] - self.assertEqual(dist_created, wanted) + self.assertEqual(dist_created, [base]) # now let's check what we have in the zip file - # XXX to be done + fp = zipfile.ZipFile(os.path.join('dist', base)) + try: + contents = fp.namelist() + finally: + fp.close() + + contents = sorted(os.path.basename(fn) for fn in contents) + wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], + 'foo.py', 'foo.pyc'] + self.assertEqual(contents, sorted(wanted)) def test_finalize_options(self): pkg_dir, dist = self.create_dist() diff --git a/tests/test_install.py b/tests/test_install.py index ebfb04f446..f17baa1e50 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -86,19 +86,17 @@ def _expanduser(path): self.old_expand = os.path.expanduser os.path.expanduser = _expanduser - try: - # this is the actual test - self._test_user_site() - finally: + def cleanup(): site.USER_BASE = self.old_user_base site.USER_SITE = self.old_user_site install_module.USER_BASE = self.old_user_base install_module.USER_SITE = self.old_user_site os.path.expanduser = self.old_expand - def _test_user_site(self): + self.addCleanup(cleanup) + for key in ('nt_user', 'unix_user', 'os2_home'): - self.assertTrue(key in INSTALL_SCHEMES) + self.assertIn(key, INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) @@ -106,14 +104,14 @@ def _test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assertTrue('user' in options) + self.assertIn('user', options) # setting a value cmd.user = 1 # user base and site shouldn't be created yet - self.assertTrue(not os.path.exists(self.user_base)) - self.assertTrue(not os.path.exists(self.user_site)) + self.assertFalse(os.path.exists(self.user_base)) + self.assertFalse(os.path.exists(self.user_site)) # let's run finalize cmd.ensure_finalized() @@ -122,8 +120,8 @@ def _test_user_site(self): self.assertTrue(os.path.exists(self.user_base)) self.assertTrue(os.path.exists(self.user_site)) - self.assertTrue('userbase' in cmd.config_vars) - self.assertTrue('usersite' in cmd.config_vars) + self.assertIn('userbase', cmd.config_vars) + self.assertIn('usersite', cmd.config_vars) def test_handle_extra_path(self): dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) @@ -176,15 +174,16 @@ def test_finalize_options(self): def test_record(self): install_dir = self.mkdtemp() - project_dir, dist = self.create_dist(scripts=['hello']) - self.addCleanup(os.chdir, os.getcwd()) + project_dir, dist = self.create_dist(py_modules=['hello'], + scripts=['sayhi']) os.chdir(project_dir) - self.write_file('hello', "print('o hai')") + self.write_file('hello.py', "def main(): print 'o hai'") + self.write_file('sayhi', 'from hello import main; main()') cmd = install(dist) dist.command_obj['install'] = cmd cmd.root = install_dir - cmd.record = os.path.join(project_dir, 'RECORD') + cmd.record = os.path.join(project_dir, 'filelist') cmd.ensure_finalized() cmd.run() @@ -195,7 +194,7 @@ def test_record(self): f.close() found = [os.path.basename(line) for line in content.splitlines()] - expected = ['hello', + expected = ['hello.py', 'hello.pyc', 'sayhi', 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) @@ -203,7 +202,6 @@ def test_record_extensions(self): install_dir = self.mkdtemp() project_dir, dist = self.create_dist(ext_modules=[ Extension('xx', ['xxmodule.c'])]) - self.addCleanup(os.chdir, os.getcwd()) os.chdir(project_dir) support.copy_xxmodule_c(project_dir) @@ -215,7 +213,7 @@ def test_record_extensions(self): dist.command_obj['install'] = cmd dist.command_obj['build_ext'] = buildextcmd cmd.root = install_dir - cmd.record = os.path.join(project_dir, 'RECORD') + cmd.record = os.path.join(project_dir, 'filelist') cmd.ensure_finalized() cmd.run() @@ -241,6 +239,7 @@ def test_debug_mode(self): install_module.DEBUG = False self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 9e422fca17..3a89f73fa2 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -6,6 +6,7 @@ import zipfile from os.path import join from textwrap import dedent +from test.test_support import captured_stdout, check_warnings, run_unittest # zlib is not used here, but if it's not available # the tests that use zipfile may fail @@ -21,7 +22,6 @@ except ImportError: UID_GID_SUPPORT = False -from test.test_support import captured_stdout, check_warnings, run_unittest from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution @@ -375,7 +375,7 @@ def test_make_distribution_owner_group(self): # the following tests make sure there is a nice error message instead # of a traceback when parsing an invalid manifest template - def _test_template(self, content): + def _check_template(self, content): dist, cmd = self.get_cmd() os.chdir(self.tmp_dir) self.write_file('MANIFEST.in', content) @@ -386,17 +386,17 @@ def _test_template(self, content): self.assertEqual(len(warnings), 1) def test_invalid_template_unknown_command(self): - self._test_template('taunt knights *') + self._check_template('taunt knights *') def test_invalid_template_wrong_arguments(self): # this manifest command takes one argument - self._test_template('prune') + self._check_template('prune') @unittest.skipIf(os.name != 'nt', 'test relevant for Windows only') def test_invalid_template_wrong_path(self): # on Windows, trailing slashes are not allowed # this used to crash instead of raising a warning: #8286 - self._test_template('include examples/') + self._check_template('include examples/') @unittest.skipUnless(zlib, "requires zlib") def test_get_file_list(self): From 6e5272fa5cd907e730fabff4b6a7aaf4e6244167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 26 Feb 2012 02:14:33 +0100 Subject: [PATCH 3385/8469] Set archive format explicitly in one distutils test --- tests/test_sdist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index fd71dac8d6..1ba2a1a6a9 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -6,6 +6,7 @@ import zipfile from os.path import join from textwrap import dedent +from test.support import captured_stdout, check_warnings, run_unittest try: import zlib @@ -13,7 +14,6 @@ except ImportError: ZLIB_SUPPORT = False -from test.support import captured_stdout, check_warnings, run_unittest from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution @@ -326,6 +326,7 @@ def test_get_file_list(self): # filling data_files by pointing files in package_data dist.package_data = {'somecode': ['*.txt']} self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.formats = ['gztar'] cmd.ensure_finalized() cmd.run() From a38d0a2e44526c9a32aceca07fd7d09ac100a62f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 4 Mar 2012 16:23:53 +0100 Subject: [PATCH 3386/8469] Bump to 3.3.0a1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f883916f10..8b4261aa3c 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3a0" +__version__ = "3.3.0a1" #--end constants-- From 3cbf2176b6315a9307698ff77fb0bd8afc6aa46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 5 Mar 2012 16:09:29 +0100 Subject: [PATCH 3387/8469] =?UTF-8?q?Make=20distutils=E2=80=99=20upload=20?= =?UTF-8?q?command=20work=20with=20bdist=5Fmsi=20products=20(#13719).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Ralf Schmitt. --- command/bdist_msi.py | 2 +- tests/test_bdist_msi.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index b3cfe9ceff..fde0f63fea 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -260,7 +260,7 @@ def run(self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - tup = 'bdist_msi', self.target_version or 'any', fullname + tup = 'bdist_msi', self.target_version or 'any', installer_name self.distribution.dist_files.append(tup) if not self.keep_temp: diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 9308c79d91..9cbfb0c5c4 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,12 +1,11 @@ """Tests for distutils.command.bdist_msi.""" -import unittest import sys - +import unittest from test.support import run_unittest - from distutils.tests import support -@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") + +@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows') class BDistMSITestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -14,9 +13,18 @@ class BDistMSITestCase(support.TempdirManager, def test_minimal(self): # minimal test XXX need more tests from distutils.command.bdist_msi import bdist_msi - pkg_pth, dist = self.create_dist() + project_dir, dist = self.create_dist() cmd = bdist_msi(dist) cmd.ensure_finalized() + cmd.run() + + bdists = os.listdir(os.path.join(project_dir, 'dist')) + self.assertEqual(bdists, ['foo-0.1.msi']) + + # bug #13719: upload ignores bdist_msi files + self.assertEqual(dist.dist_files, + [('bdist_msi', 'any', 'dist/foo-0.1.msi')]) + def test_suite(): return unittest.makeSuite(BDistMSITestCase) From 02b07135e60f45c28414eec6cae34040d20c053c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 5 Mar 2012 16:47:33 +0100 Subject: [PATCH 3388/8469] =?UTF-8?q?Make=20distutils=E2=80=99=20upload=20?= =?UTF-8?q?command=20work=20with=20bdist=5Fmsi=20products=20(#13719).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Ralf Schmitt. --- command/bdist_msi.py | 2 +- tests/test_bdist_msi.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 703f873b16..09c6a89851 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -262,7 +262,7 @@ def run (self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - tup = 'bdist_msi', self.target_version or 'any', fullname + tup = 'bdist_msi', self.target_version or 'any', installer_name self.distribution.dist_files.append(tup) if not self.keep_temp: diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 1c897ab04d..f175ed442b 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,12 +1,11 @@ """Tests for distutils.command.bdist_msi.""" -import unittest import sys - +import unittest from test.test_support import run_unittest - from distutils.tests import support -@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32") + +@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows') class BDistMSITestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -14,9 +13,18 @@ class BDistMSITestCase(support.TempdirManager, def test_minimal(self): # minimal test XXX need more tests from distutils.command.bdist_msi import bdist_msi - pkg_pth, dist = self.create_dist() + project_dir, dist = self.create_dist() cmd = bdist_msi(dist) cmd.ensure_finalized() + cmd.run() + + bdists = os.listdir(os.path.join(project_dir, 'dist')) + self.assertEqual(bdists, ['foo-0.1.msi']) + + # bug #13719: upload ignores bdist_msi files + self.assertEqual(dist.dist_files, + [('bdist_msi', 'any', 'dist/foo-0.1.msi')]) + def test_suite(): return unittest.makeSuite(BDistMSITestCase) From e7f62f5444701fafb18b8135b7f1c4a10dd9626c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 5 Mar 2012 17:00:49 +0100 Subject: [PATCH 3389/8469] Fix NameError --- tests/test_bdist_msi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index f175ed442b..82a20cf1ff 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,4 +1,5 @@ """Tests for distutils.command.bdist_msi.""" +import os import sys import unittest from test.test_support import run_unittest From 2bddf6fa66bff4c9886995c43f138c5cf29004ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Mon, 5 Mar 2012 17:02:31 +0100 Subject: [PATCH 3390/8469] Fix NameError from #13719 fix --- tests/test_bdist_msi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 9cbfb0c5c4..e599461070 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,4 +1,5 @@ """Tests for distutils.command.bdist_msi.""" +import os import sys import unittest from test.support import run_unittest From a151dfbe766cda5b5d3aa1c1de39aff381788e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 7 Mar 2012 20:48:55 +0100 Subject: [PATCH 3391/8469] Backout buggy patch committed for #13719 --- command/bdist_msi.py | 2 +- tests/test_bdist_msi.py | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index fde0f63fea..b3cfe9ceff 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -260,7 +260,7 @@ def run(self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - tup = 'bdist_msi', self.target_version or 'any', installer_name + tup = 'bdist_msi', self.target_version or 'any', fullname self.distribution.dist_files.append(tup) if not self.keep_temp: diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index e599461070..15d8bdff2b 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,5 +1,4 @@ """Tests for distutils.command.bdist_msi.""" -import os import sys import unittest from test.support import run_unittest @@ -17,14 +16,6 @@ def test_minimal(self): project_dir, dist = self.create_dist() cmd = bdist_msi(dist) cmd.ensure_finalized() - cmd.run() - - bdists = os.listdir(os.path.join(project_dir, 'dist')) - self.assertEqual(bdists, ['foo-0.1.msi']) - - # bug #13719: upload ignores bdist_msi files - self.assertEqual(dist.dist_files, - [('bdist_msi', 'any', 'dist/foo-0.1.msi')]) def test_suite(): From e412535a28d474125d9ab9ce254485acd72916f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 7 Mar 2012 21:00:44 +0100 Subject: [PATCH 3392/8469] Backout buggy patch for #13719 --- command/bdist_msi.py | 2 +- tests/test_bdist_msi.py | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 09c6a89851..703f873b16 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -262,7 +262,7 @@ def run (self): self.db.Commit() if hasattr(self.distribution, 'dist_files'): - tup = 'bdist_msi', self.target_version or 'any', installer_name + tup = 'bdist_msi', self.target_version or 'any', fullname self.distribution.dist_files.append(tup) if not self.keep_temp: diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 82a20cf1ff..f98b7a2199 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,5 +1,4 @@ """Tests for distutils.command.bdist_msi.""" -import os import sys import unittest from test.test_support import run_unittest @@ -17,14 +16,6 @@ def test_minimal(self): project_dir, dist = self.create_dist() cmd = bdist_msi(dist) cmd.ensure_finalized() - cmd.run() - - bdists = os.listdir(os.path.join(project_dir, 'dist')) - self.assertEqual(bdists, ['foo-0.1.msi']) - - # bug #13719: upload ignores bdist_msi files - self.assertEqual(dist.dist_files, - [('bdist_msi', 'any', 'dist/foo-0.1.msi')]) def test_suite(): From 887e5bd499ca29f1ad721e593827ac18f4db3191 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Mar 2012 23:07:45 -0800 Subject: [PATCH 3393/8469] Added tag 0.6.25 for changeset 6124053afb5c --HG-- branch : distribute extra : rebase_source : 18fe3f9b4c6b2b55638fdc4d6ea64b48fd49a823 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1c2c996504..19680f4f2e 100644 --- a/.hgtags +++ b/.hgtags @@ -33,3 +33,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 9406c5dac8429216f1a264e6f692fdc534476acd 0.6.23 7fd7b6e30a0effa082baed1c4103a0efa56be98c 0.6.24 +6124053afb5c98f11e146ae62049b4c232d50dc5 0.6.25 From caa4c83e9f2ac9a69457cb1b69b4b09215ac0a09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Mar 2012 23:13:28 -0800 Subject: [PATCH 3394/8469] Fix release script to not include deleted files. --HG-- branch : distribute extra : rebase_source : 354e36575fde2a29d731ac8880f58a627f13d27b --- release.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/release.py b/release.py index 2aab1344e9..c16fd9d586 100644 --- a/release.py +++ b/release.py @@ -12,7 +12,7 @@ import os import sys -VERSION='0.6.25' +VERSION = '0.6.25' def get_next_version(): digits = map(int, VERSION.split('.')) @@ -21,9 +21,10 @@ def get_next_version(): NEXT_VERSION = get_next_version() +files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', + 'README.txt', 'distribute_setup.py') + def bump_versions(): - files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', - 'release.sh', 'README.txt', 'distribute_setup.py') list(map(bump_version, files_with_versions)) def bump_version(filename): @@ -33,6 +34,8 @@ def bump_version(filename): f.writelines(lines) def do_release(): + assert all(map(os.path.exists, files_with_versions)), ( + "Expected file(s) missing") res = raw_input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) From 7c0eeec316a6d593b7c868c96dfe1b96fb8775b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Mar 2012 23:15:44 -0800 Subject: [PATCH 3395/8469] Bumped to 0.6.26 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 3320fd7793afe7e4cc452ece99407e23c95b7a51 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 2a12bd16da..bc9b8454be 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.25.tar.gz - $ tar -xzvf distribute-0.6.25.tar.gz - $ cd distribute-0.6.25 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.26.tar.gz + $ tar -xzvf distribute-0.6.26.tar.gz + $ cd distribute-0.6.26 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index d2c2899afa..3bc42fa148 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.25" +DEFAULT_VERSION = "0.6.26" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index e4bd76af8a..80d8c0e150 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.25' +version = '0.6.26' # The full version, including alpha/beta/rc tags. -release = '0.6.25' +release = '0.6.26' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index c16fd9d586..c6ae00d54b 100644 --- a/release.py +++ b/release.py @@ -12,7 +12,7 @@ import os import sys -VERSION = '0.6.25' +VERSION = '0.6.26' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 3500d3e23a..f576b520c5 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.25" +VERSION = "0.6.26" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From ed9ebca5b0c012c6b44adad4efa475f1cccd460d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Mar 2012 19:03:23 -0800 Subject: [PATCH 3396/8469] Indent with spaces --HG-- branch : distribute extra : rebase_source : 799441b639f6f9c55fe25745e793ac29419f0293 --- setuptools/extension.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index 980ee0a7b4..b5a0702b39 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -5,12 +5,12 @@ # Prefer Cython to Pyrex pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' for pyrex_impl in pyrex_impls: - try: - # from (pyrex_impl) import build_ext - build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext - break - except: - pass + try: + # from (pyrex_impl) import build_ext + build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext + break + except: + pass have_pyrex = 'build_ext' in globals() @@ -18,7 +18,7 @@ class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" if not have_pyrex: - # convert .pyx extensions to .c + # convert .pyx extensions to .c def __init__(self,*args,**kw): _Extension.__init__(self,*args,**kw) sources = [] From 5e47a200c412793a2878e3df57f29e854e2e9356 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Mar 2012 19:21:15 -0800 Subject: [PATCH 3397/8469] Reorganized imports --HG-- branch : distribute extra : rebase_source : 3c54aa84f71220021b92f890359546b4ff41e5f6 --- setuptools/extension.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index b5a0702b39..e87494adf0 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -1,6 +1,10 @@ -from distutils.core import Extension as _Extension +import sys +import distutils.core +import distutils.extension + from setuptools.dist import _get_unpatched -_Extension = _get_unpatched(_Extension) + +_Extension = _get_unpatched(distutils.core.Extension) # Prefer Cython to Pyrex pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' @@ -19,12 +23,12 @@ class Extension(_Extension): if not have_pyrex: # convert .pyx extensions to .c - def __init__(self,*args,**kw): - _Extension.__init__(self,*args,**kw) + def __init__(self, *args, **kw): + _Extension.__init__(self, *args, **kw) sources = [] for s in self.sources: if s.endswith('.pyx'): - sources.append(s[:-3]+'c') + sources.append(s[:-3] + 'c') else: sources.append(s) self.sources = sources @@ -32,9 +36,7 @@ def __init__(self,*args,**kw): class Library(Extension): """Just like a regular Extension, but built as a library instead""" -import sys, distutils.core, distutils.extension distutils.core.Extension = Extension distutils.extension.Extension = Extension if 'distutils.command.build_ext' in sys.modules: sys.modules['distutils.command.build_ext'].Extension = Extension - From 9f5991b303d87d49479381b971652950f0cfdac1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Mar 2012 22:17:12 -0800 Subject: [PATCH 3398/8469] Refactored Extension class so that __init__ is always called, but patched behavior is still selected by has_pyrex. --HG-- branch : distribute extra : rebase_source : d5670bf4bc6606d828b4ec7be055e26a7d4a9730 --- setuptools/extension.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index e87494adf0..db56330551 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -21,17 +21,15 @@ class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" - if not have_pyrex: - # convert .pyx extensions to .c - def __init__(self, *args, **kw): - _Extension.__init__(self, *args, **kw) - sources = [] - for s in self.sources: - if s.endswith('.pyx'): - sources.append(s[:-3] + 'c') - else: - sources.append(s) - self.sources = sources + def __init__(self, *args, **kw): + _Extension.__init__(self, *args, **kw) + if not have_pyrex: + self._convert_pyx_sources_to_c() + + def _convert_pyx_sources_to_c(self): + "convert .pyx extensions to .c" + self.sources = [source[:-3] + 'c' for source in self.sources + if source.endswith('.pyx')] class Library(Extension): """Just like a regular Extension, but built as a library instead""" From 8633ffe737039044e955a6e5bd52ac08a0d83b37 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Mar 2012 22:31:45 -0800 Subject: [PATCH 3399/8469] Converted have_pyrex into a function --HG-- branch : distribute extra : rebase_source : b676ea404118a121400f2fd1b67095ab4521b7a0 --- setuptools/extension.py | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index db56330551..eb8b836cc3 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -6,16 +6,19 @@ _Extension = _get_unpatched(distutils.core.Extension) -# Prefer Cython to Pyrex -pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' -for pyrex_impl in pyrex_impls: - try: - # from (pyrex_impl) import build_ext - build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext - break - except: - pass -have_pyrex = 'build_ext' in globals() +def have_pyrex(): + """ + Return True if Cython or Pyrex can be imported. + """ + pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' + for pyrex_impl in pyrex_impls: + try: + # from (pyrex_impl) import build_ext + __import__(pyrex_impl, fromlist=['build_ext']).build_ext + return True + except Exception: + pass + return False class Extension(_Extension): @@ -23,13 +26,16 @@ class Extension(_Extension): def __init__(self, *args, **kw): _Extension.__init__(self, *args, **kw) - if not have_pyrex: + if not have_pyrex(): self._convert_pyx_sources_to_c() def _convert_pyx_sources_to_c(self): "convert .pyx extensions to .c" - self.sources = [source[:-3] + 'c' for source in self.sources - if source.endswith('.pyx')] + def pyx_to_c(source): + if source.endswith('.pyx'): + source = source[:-4] + '.c' + return source + self.sources = map(pyx_to_c, self.sources) class Library(Extension): """Just like a regular Extension, but built as a library instead""" From 52a047831e0c60eda6bafeed22ea1996f4d7f752 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 15 Mar 2012 12:25:54 -0500 Subject: [PATCH 3400/8469] bump to 2.7.3rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 83126f679f..a137950efb 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.3rc1" +__version__ = "2.7.3rc2" #--end constants-- From da495dc219c9185da495363c1bddabd93659b17f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 15 Mar 2012 13:57:27 -0500 Subject: [PATCH 3401/8469] bump to 3.1.5rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0e427624b8..6ab1662570 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.5rc1" +__version__ = "3.1.5rc2" #--end constants-- From 525cc3106994d2dd8e87f1eb28c2faadf0032b64 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 17 Mar 2012 18:19:15 -0400 Subject: [PATCH 3402/8469] Bump to 2.6.8rc2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 279e17a9df..141b377b94 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.8rc1" +__version__ = "2.6.8rc2" #--end constants-- From e29e39376dd2de7a9aa9ae03a6b92409489a5856 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 18 Mar 2012 07:34:49 +0100 Subject: [PATCH 3403/8469] Bump to 3.2.3rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 369750551c..d8d61c5432 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.3rc1" +__version__ = "3.2.3rc2" #--end constants-- From 39f910e2e4b68cf11ecd2cf12c697aacce451d3d Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 23 Mar 2012 13:50:04 -0400 Subject: [PATCH 3404/8469] Include symlinks when extracting source dist. Fixes #183. --HG-- branch : distribute extra : rebase_source : c0d44c559d3433e4e4ceddaff5467c2d82dd7688 --- setuptools/archive_util.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index ab786f3d01..5787753f2a 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -180,19 +180,22 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): try: tarobj.chown = lambda *args: None # don't do any chowning! for member in tarobj: - if member.isfile() or member.isdir(): - name = member.name - # don't extract absolute paths or ones with .. in them - if not name.startswith('/') and '..' not in name: - dst = os.path.join(extract_dir, *name.split('/')) - dst = progress_filter(name, dst) - if dst: - if dst.endswith(os.sep): - dst = dst[:-1] - try: - tarobj._extract_member(member,dst) # XXX Ugh - except tarfile.ExtractError: - pass # chown/chmod/mkfifo/mknode/makedev failed + name = member.name + # don't extract absolute paths or ones with .. in them + if not name.startswith('/') and '..' not in name: + prelim_dst = os.path.join(extract_dir, *name.split('/')) + final_dst = progress_filter(name, prelim_dst) + # If progress_filter returns None, then we do not extract + # this file + # TODO: Do we really need to limit to just these file types? + # tarobj.extract() will handle all files on all platforms, + # turning file types that aren't allowed on that platform into + # regular files. + if final_dst and (member.isfile() or member.isdir() or + member.islnk() or member.issym()): + tarobj.extract(member, extract_dir) + if final_dst != prelim_dst: + shutil.move(prelim_dst, final_dst) return True finally: tarobj.close() From df1e3725c0ef744f89e1769767e04b78ebc9a525 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 Mar 2012 13:55:31 -0400 Subject: [PATCH 3405/8469] Updated CHANGES.txt --HG-- branch : distribute extra : rebase_source : 2295366e701d262d83aacec7ff7af6d65fc0b09c --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5ee08823cb..3895b0a3f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.26 +------ + +* Issue #183: Symlinked files are now extracted from source distributions. + ------ 0.6.25 ------ From be66b979ea6371d92a555c5fea28faa3e2b719bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 29 Mar 2012 23:36:28 -0400 Subject: [PATCH 3406/8469] Another attempt at a fix that uses setopt instead of hacking easy_install --HG-- branch : distribute extra : rebase_source : 907488d2ba609dbca39cd14c021c5cfb4f353a38 --- setuptools/command/easy_install.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d200dac1b4..ef82808b62 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -271,8 +271,7 @@ def finalize_options(self): ) else: self.all_site_dirs.append(normalize_path(d)) - if not self.editable and self.args != ['-']: - self.check_site_dir() + if not self.editable: self.check_site_dir() self.index_url = self.index_url or "http://pypi.python.org/simple" self.shadow_path = self.all_site_dirs[:] for path_item in self.install_dir, normalize_path(self.script_dir): @@ -343,11 +342,6 @@ def expand_dirs(self): 'install_scripts', 'install_data',]) def run(self): - if self.args == ['-']: - # A single dash as an argument means 'do nothing' and is just a way - # to pass arguments to the easy_install command without running it - return - if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: @@ -1102,10 +1096,14 @@ def build_and_install(self, setup_script, setup_base): if key not in keep: del ei_opts[key] if ei_opts: - args.append('easy_install') for key, val in ei_opts.iteritems(): - args.append('--%s=%s' % (key.replace('_', '-'), val[1])) - args.append('-') + args.append('setopt') + args.append('--command') + args.append('easy_install') + args.append('--option') + args.append(key.replace('_', '-')) + args.append('--set-value') + args.append(val[1]) self.run_setup(setup_script, setup_base, args) all_eggs = Environment([dist_dir]) From 23622dbdb01a2427ba8c40ffb9820793a6d21817 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 29 Mar 2012 23:57:57 -0400 Subject: [PATCH 3407/8469] Put the setopt directives before bdist_egg --HG-- branch : distribute extra : rebase_source : 23f656d6eb2ade3aa51f285a8bc288eab432819a --- setuptools/command/easy_install.py | 34 ++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ef82808b62..4ff57648f7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1081,29 +1081,27 @@ def run_setup(self, setup_script, setup_base, args): raise DistutilsError("Setup script exited with %s" % (v.args[0],)) def build_and_install(self, setup_script, setup_base): - args = ['bdist_egg', '--dist-dir'] + args = [] + + # first pass along any install directives using setopt + ei_opts = self.distribution.get_option_dict('easy_install').copy() + install_directives = ( + 'find_links', 'site_dirs', 'index_url', 'optimize', + 'site_dirs', 'allow_hosts' + ) + for key, val in ei_opts.iteritems(): + if key not in install_directives: continue + args.extend(['setopt', '--command', 'easy_install', + '--option', key.replace('_', '-'), + '--set-value', val[1]]) + + args.extend(['bdist_egg', '--dist-dir']) + dist_dir = tempfile.mkdtemp( prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script) ) try: args.append(dist_dir) - ei_opts = self.distribution.get_option_dict('easy_install').copy() - keep = ( - 'find_links', 'site_dirs', 'index_url', 'optimize', - 'site_dirs', 'allow_hosts' - ) - for key in ei_opts.keys(): - if key not in keep: - del ei_opts[key] - if ei_opts: - for key, val in ei_opts.iteritems(): - args.append('setopt') - args.append('--command') - args.append('easy_install') - args.append('--option') - args.append(key.replace('_', '-')) - args.append('--set-value') - args.append(val[1]) self.run_setup(setup_script, setup_base, args) all_eggs = Environment([dist_dir]) From d388348dbca2972ed9cf6b2a9eff3b264f0e58b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 30 Mar 2012 09:08:23 -0400 Subject: [PATCH 3408/8469] Yet another approach - invoking setopt directly prior to invoking a new setup process. This approach works (compared to the previous setopt approach which did not). --HG-- branch : distribute extra : rebase_source : 4d28ae98e67d8bc1f2f98aee93d7a69000f10239 --- setuptools/command/easy_install.py | 42 +++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4ff57648f7..dfd9f7ff8f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -21,6 +21,7 @@ from distutils.errors import DistutilsArgError, DistutilsOptionError, \ DistutilsError, DistutilsPlatformError from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS +from setuptools.command import setopt from setuptools.archive_util import unpack_archive from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME @@ -1081,26 +1082,13 @@ def run_setup(self, setup_script, setup_base, args): raise DistutilsError("Setup script exited with %s" % (v.args[0],)) def build_and_install(self, setup_script, setup_base): - args = [] - - # first pass along any install directives using setopt - ei_opts = self.distribution.get_option_dict('easy_install').copy() - install_directives = ( - 'find_links', 'site_dirs', 'index_url', 'optimize', - 'site_dirs', 'allow_hosts' - ) - for key, val in ei_opts.iteritems(): - if key not in install_directives: continue - args.extend(['setopt', '--command', 'easy_install', - '--option', key.replace('_', '-'), - '--set-value', val[1]]) - - args.extend(['bdist_egg', '--dist-dir']) + args = ['bdist_egg', '--dist-dir'] dist_dir = tempfile.mkdtemp( prefix='egg-dist-tmp-', dir=os.path.dirname(setup_script) ) try: + self._set_fetcher_options(os.path.dirname(setup_script)) args.append(dist_dir) self.run_setup(setup_script, setup_base, args) @@ -1117,6 +1105,30 @@ def build_and_install(self, setup_script, setup_base): rmtree(dist_dir) log.set_verbosity(self.verbose) # restore our log verbosity + def _set_fetcher_options(self, base): + """ + When easy_install is about to run bdist_egg on a source dist, that + source dist might have 'setup_requires' directives, requiring + additional fetching. Ensure the fetcher options given to easy_install + are available to that command as well. + """ + # find the fetch options from easy_install and write them out + # to the setup.cfg file. + ei_opts = self.distribution.get_option_dict('easy_install').copy() + fetch_directives = ( + 'find_links', 'site_dirs', 'index_url', 'optimize', + 'site_dirs', 'allow_hosts', + ) + fetch_options = {} + for key, val in ei_opts.iteritems(): + if key not in fetch_directives: continue + fetch_options[key.replace('_', '-')] = val[1] + # create a settings dictionary suitable for `edit_config` + settings = dict(easy_install=fetch_options) + cfg_filename = os.path.join(base, 'setup.cfg') + setopt.edit_config(cfg_filename, settings) + + def update_pth(self,dist): if self.pth_file is None: return From c2ee921caa6757e4b8e34687cf758cf7859a0737 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 30 Mar 2012 09:10:44 -0400 Subject: [PATCH 3409/8469] Backout changes to dist.py from 488cc8a13f66 --HG-- branch : distribute extra : rebase_source : 2aeb4f273f05dd10b26a530c40dabfcb57861d37 --- setuptools/dist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 204dcdfa6b..0ad18122cf 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -269,9 +269,8 @@ def fetch_build_egg(self, req): cmd.package_index.to_scan = [] except AttributeError: from setuptools.command.easy_install import easy_install - dist = self.__class__() + dist = self.__class__({'script_args':['easy_install']}) dist.parse_config_files() - dist.parse_command_line() opts = dist.get_option_dict('easy_install') keep = ( 'find_links', 'site_dirs', 'index_url', 'optimize', From cf4a89429a762473c9ec2fdad424a0f11076a5b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 31 Mar 2012 18:28:34 -0400 Subject: [PATCH 3410/8469] Updated CHANGES.txt --HG-- branch : distribute extra : rebase_source : 3838ae33ab0e8c584e4e945f1b2a8167adc7c27d --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3895b0a3f1..5e91876039 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,9 @@ CHANGES ------ * Issue #183: Symlinked files are now extracted from source distributions. +* Issue #227: Easy_install fetch parameters are now passed during the + installation of a source distribution; now fulfillment of setup_requires + dependencies will honor the parameters passed to easy_install. ------ 0.6.25 From ca25aeb8ebcee9808e9f2ead00586a1907a21f1b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 1 Apr 2012 13:49:21 +0200 Subject: [PATCH 3411/8469] Bump to 3.3.0a2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8b4261aa3c..661a8b6df4 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0a1" +__version__ = "3.3.0a2" #--end constants-- From 6629eabfe6f39e92ec6396634432df7657bc8843 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 08:59:33 -0400 Subject: [PATCH 3412/8469] Slightly nicer generation of trove classifiers without having to resort to list comprehensions. --HG-- branch : distribute extra : rebase_source : 78c6124f2398d786c45ce14fe5de19aa0d09e005 --- setup.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index f576b520c5..d6c8ee0d34 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ """Distutils setup file, used to install or test 'setuptools'""" import sys import os +import textwrap src_root = None if sys.version_info >= (3,): @@ -197,23 +198,22 @@ def _being_installed(): }, - classifiers = [f.strip() for f in """ - 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 - Programming Language :: Python :: 3 - Topic :: Software Development :: Libraries :: Python Modules - Topic :: System :: Archiving :: Packaging - Topic :: System :: Systems Administration - Topic :: Utilities""".splitlines() if f.strip()], + classifiers = textwrap.dedent(""" + 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 + Programming Language :: Python :: 3 + Topic :: Software Development :: Libraries :: Python Modules + Topic :: System :: Archiving :: Packaging + Topic :: System :: Systems Administration + Topic :: Utilities + """).strip().splitlines(), scripts = scripts, ) if _being_installed(): from distribute_setup import _after_install _after_install(dist) - - From 5ac3e0119a483c7d9bb43148d2b6f16c546913ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 09:15:44 -0400 Subject: [PATCH 3413/8469] Reorganized imports --HG-- branch : distribute extra : rebase_source : b348504ee7341fc2928a786167f33baa136e2b93 --- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools/tests/__init__.py | 30 ++++--- 2 files changed, 78 insertions(+), 76 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..2965458969 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 9af44a88bb..fec3854d3d 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -1,19 +1,21 @@ """Tests for the 'setuptools' package""" -from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader -import distutils.core, distutils.cmd +import sys +import os +import doctest +import distutils.core +import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError -import setuptools, setuptools.dist -from setuptools import Feature from distutils.core import Extension -extract_constant, get_module_constant = None, None -from setuptools.depends import * -from distutils.version import StrictVersion, LooseVersion -from distutils.util import convert_path -import sys, os.path +from distutils.version import LooseVersion + +import unittest + +import setuptools.dist +from setuptools import Feature +from setuptools.depends import Require, find_module, get_module_constant, extract_constant def additional_tests(): - import doctest, unittest suite = unittest.TestSuite(( doctest.DocFileSuite( os.path.join('tests', 'api_tests.txt'), @@ -40,7 +42,7 @@ def makeSetup(**args): -class DependsTests(TestCase): +class DependsTests(unittest.TestCase): def testExtractConst(self): if not extract_constant: return # skip on non-bytecode platforms @@ -122,7 +124,7 @@ def testRequire(self): self.assert_(req.is_current(paths)) -class DistroTests(TestCase): +class DistroTests(unittest.TestCase): def setUp(self): self.e1 = Extension('bar.ext',['bar.c']) @@ -245,7 +247,7 @@ def testInvalidIncludeExclude(self): -class FeatureTests(TestCase): +class FeatureTests(unittest.TestCase): def setUp(self): self.req = Require('Distutils','1.0.3','distutils') @@ -327,7 +329,7 @@ def testFeatureWithInvalidRemove(self): SystemExit, makeSetup, features = {'x':Feature('x', remove='y')} ) -class TestCommandTests(TestCase): +class TestCommandTests(unittest.TestCase): def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') From 61942ccf83167298cbd933f1594d59a32f5cf349 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 09:25:00 -0400 Subject: [PATCH 3414/8469] Cleaned up excess whitespace --HG-- branch : distribute extra : rebase_source : 722c3a4c556ba4415c633e74e34fb45f76d8653d --- setuptools/tests/__init__.py | 37 +++--------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index fec3854d3d..7a3d6eb51c 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -40,15 +40,13 @@ def makeSetup(**args): distutils.core_setup_stop_after = None - - class DependsTests(unittest.TestCase): def testExtractConst(self): if not extract_constant: return # skip on non-bytecode platforms def f1(): - global x,y,z + global x, y, z x = "test" y = z @@ -64,11 +62,11 @@ def f1(): # recognized name, not assigned self.assertEqual(extract_constant(f1.func_code,'z', -1), None) - def testFindModule(self): self.assertRaises(ImportError, find_module, 'no-such.-thing') self.assertRaises(ImportError, find_module, 'setuptools.non-existent') - f,p,i = find_module('setuptools.tests'); f.close() + f,p,i = find_module('setuptools.tests') + f.close() def testModuleExtract(self): if not get_module_constant: return # skip on non-bytecode platforms @@ -137,11 +135,9 @@ def setUp(self): package_dir = {}, ) - def testDistroType(self): self.assert_(isinstance(self.dist,setuptools.dist.Distribution)) - def testExcludePackage(self): self.dist.exclude_package('a') self.assertEqual(self.dist.packages, ['b','c']) @@ -159,12 +155,6 @@ def testExcludePackage(self): # test removals from unspecified options makeSetup().exclude_package('x') - - - - - - def testIncludeExclude(self): # remove an extension self.dist.exclude(ext_modules=[self.e1]) @@ -203,9 +193,6 @@ def testContents(self): self.dist.exclude_package('c') self.assert_(not self.dist.has_contents_for('c')) - - - def testInvalidIncludeExclude(self): self.assertRaises(DistutilsSetupError, self.dist.include, nonexistent_option='x' @@ -234,19 +221,6 @@ def testInvalidIncludeExclude(self): ) - - - - - - - - - - - - - class FeatureTests(unittest.TestCase): def setUp(self): @@ -365,8 +339,3 @@ def testNoSuite(self): ts5 = makeSetup().get_command_obj('test') ts5.ensure_finalized() self.assertEqual(ts5.test_suite, None) - - - - - From 83a86217e2f1cf1259d4b1921b840a449f0dd32b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 09:26:13 -0400 Subject: [PATCH 3415/8469] Reorganized imports and cleaned up whitespace --HG-- branch : distribute extra : rebase_source : 288c7531df0ab929030445973ecf6386a3e437b1 --- setuptools/tests/test_easy_install.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4150ad1061..dce5501df5 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,9 +1,12 @@ """Easy install Tests """ import sys -import os, shutil, tempfile, unittest +import os +import shutil +import tempfile +import unittest import site -from StringIO import StringIO + from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -11,7 +14,8 @@ from pkg_resources import Distribution as PRDistribution try: - import multiprocessing + # import multiprocessing solely for the purpose of testing its existence + __import__('multiprocessing') import logging _LOG = logging.getLogger('test_easy_install') logging.basicConfig(level=logging.INFO, stream=sys.stderr) @@ -110,7 +114,7 @@ def test_no_find_links(self): # the project level dist = Distribution() cmd = easy_install(dist) - cmd.check_pth_processing = lambda : True + cmd.check_pth_processing = lambda: True cmd.no_find_links = True cmd.find_links = ['link1', 'link2'] cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') @@ -120,7 +124,7 @@ def test_no_find_links(self): # let's try without it (default behavior) cmd = easy_install(dist) - cmd.check_pth_processing = lambda : True + cmd.check_pth_processing = lambda: True cmd.find_links = ['link1', 'link2'] cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') cmd.args = ['ok'] @@ -173,7 +177,7 @@ def setUp(self): def tearDown(self): os.chdir(self.old_cwd) shutil.rmtree(self.dir) - if sys.version >= "2.6": + if sys.version >= "2.6": shutil.rmtree(site.USER_BASE) shutil.rmtree(site.USER_SITE) site.USER_BASE = self.old_base @@ -249,4 +253,3 @@ def test_local_index(self): os.environ['PYTHONPATH'] = old_ppath else: del os.environ['PYTHONPATH'] - From 1ed3a1602e14450433663f5923972a73686379fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 10:56:03 -0400 Subject: [PATCH 3416/8469] Cleaned up simulated index server, expanding documentation. --HG-- branch : distribute extra : rebase_source : b479cf805b766fa35c8e76c30c7725e93f56e6a2 --- setuptools/tests/server.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index f4aaaa1cfc..2dcbe5af6e 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -2,7 +2,7 @@ """ import urllib2 import sys -from threading import Thread +import threading from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler @@ -17,29 +17,36 @@ class IndexServer(HTTPServer): # The index files should be located in setuptools/tests/indexes s.stop() """ - def __init__(self): - HTTPServer.__init__(self, ('', 0), SimpleHTTPRequestHandler) + def __init__(self, server_address=('', 0), + RequestHandlerClass=SimpleHTTPRequestHandler, + bind_and_activate=True): + HTTPServer.__init__(self, server_address, RequestHandlerClass, + bind_and_activate) self._run = True def serve(self): - while True: + while self._run: self.handle_request() - if not self._run: break def start(self): - self.thread = Thread(target=self.serve) + self.thread = threading.Thread(target=self.serve) self.thread.start() def stop(self): - """self.shutdown is not supported on python < 2.6""" + "Stop the server" + + # self.shutdown is not supported on python < 2.6, so just + # set _run to false, and make a request, causing it to + # terminate. self._run = False + url = 'http://127.0.0.1:%(server_port)s/' % vars(self) try: - if sys.version > '2.6': - urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port, - None, 5) + if sys.version_info >= (2, 6): + urllib2.urlopen(url, timeout=5) else: - urllib2.urlopen('http://127.0.0.1:%s/' % self.server_port) + urllib2.urlopen(url) except urllib2.URLError: + # ignore any errors; all that's important is the request pass self.thread.join() From fdc210e463688befd23e1a0e3ad1a599a891019d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 11:26:34 -0400 Subject: [PATCH 3417/8469] Started work on a Mock server that doesn't require a file system to back it. --HG-- branch : distribute extra : rebase_source : feac8d802a8f574124fffab8c6c22d218b61987c --- setuptools/tests/server.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 2dcbe5af6e..870d3c8e6e 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -3,6 +3,7 @@ import urllib2 import sys import threading +import BaseHTTPServer from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler @@ -53,3 +54,19 @@ def stop(self): def base_url(self): port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port + +class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): + def do_GET(self): + requests = vars(self.server).setdefault('requests', []) + requests.append(self) + self.send_response(200, 'OK') + +class MockServer(HTTPServer): + """ + A simple HTTP Server that records the requests made to it. + """ + def __init__(self, server_address=('', 0), + RequestHandlerClass=RequestRecorder, + bind_and_activate=True): + HTTPServer.__init__(self, server_address, RequestHandlerClass, + bind_and_activate) From ea977c0c8db023626f40f9b7c159549846f14a47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Apr 2012 15:28:56 -0400 Subject: [PATCH 3418/8469] Add test to capture issue 227 --HG-- branch : distribute extra : rebase_source : 6a829eb08499c0b7a83dd653fb039b8695620fb0 --- setuptools/tests/server.py | 9 +++++ setuptools/tests/test_easy_install.py | 51 +++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 870d3c8e6e..e04dcca576 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -70,3 +70,12 @@ def __init__(self, server_address=('', 0), bind_and_activate=True): HTTPServer.__init__(self, server_address, RequestHandlerClass, bind_and_activate) + self.threads = [] + + def handle_request_in_thread(self): + self.threads.append(threading.Thread(target = self.handle_request)) + # todo: ensure that threads are closed. + + def url(self): + return 'http://localhost:%(server_port)s/' % vars(self) + url = property(url) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index dce5501df5..6dcb1cbdc8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -6,12 +6,14 @@ import tempfile import unittest import site +import contextlib from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution from pkg_resources import Distribution as PRDistribution +import setuptools.tests.server try: # import multiprocessing solely for the purpose of testing its existence @@ -253,3 +255,52 @@ def test_local_index(self): os.environ['PYTHONPATH'] = old_ppath else: del os.environ['PYTHONPATH'] + + +class TestSetupRequires(unittest.TestCase): + + def test_setup_requires_honors_fetch_params(self): + """ + When easy_install installs a source distribution which specifies + setup_requires, it should honor the fetch parameters (such as + allow-hosts, index-url, and find-links). + """ + # set up a server which will simulate an alternate package index. + p_index = setuptools.tests.server.MockServer() + p_index.handle_request_in_thread() + # create an sdist that has a build-time dependency. + dist_file = self.create_sdist() + with tempdir_context() as temp_install_dir: + with environment_context(PYTHONPATH=temp_install_dir): + ei_params = ['--index-url', p_index.url, + '--allow-hosts', 'localhost', + '--exclude-scripts', '--install-dir', temp_install_dir, + dist_file] + easy_install_pkg.main(ei_params) + self.assertTrue(os.listdir(temp_install_dir)) + self.assertEqual(len(p_index.requests), 1) + self.assertEqual(p_index.requests[0].path, 'x') + + def create_sdist(self): + # for now, just use a known dist + return ('http://pypi.python.org/packages/source/j/jaraco.util/' + 'jaraco.util-5.3.zip') + +@contextlib.contextmanager +def tempdir_context(): + temp_dir = tempfile.mkdtemp() + try: + yield temp_dir + finally: + shutil.rmtree(temp_dir) + +@contextlib.contextmanager +def environment_context(**updates): + old_env = os.environ.copy() + os.environ.update(updates) + try: + yield + finally: + for key in updates: + del os.environ[key] + os.environ.update(old_env) From 54af65c686e1b04ce8d83643ff3232c9043ad335 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 6 Apr 2012 13:17:25 -0400 Subject: [PATCH 3419/8469] bump to 3.1.5 final --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6ab1662570..d79bfa1315 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.1.5rc2" +__version__ = "3.1.5" #--end constants-- From b06c48c01625706c398e6ef6db343cbb192c184e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 11:24:05 -0400 Subject: [PATCH 3420/8469] Expanded TestSetupRequires so it actually stages the installation of an sdist with a setup_requires. --HG-- branch : distribute extra : rebase_source : 4266165d9e75e9e19551a3bf646820f309f631df --- setuptools/tests/test_easy_install.py | 95 +++++++++++++++++++++++---- 1 file changed, 81 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6dcb1cbdc8..aff2688a07 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -7,6 +7,7 @@ import unittest import site import contextlib +import textwrap from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions @@ -269,29 +270,95 @@ def test_setup_requires_honors_fetch_params(self): p_index = setuptools.tests.server.MockServer() p_index.handle_request_in_thread() # create an sdist that has a build-time dependency. - dist_file = self.create_sdist() - with tempdir_context() as temp_install_dir: - with environment_context(PYTHONPATH=temp_install_dir): - ei_params = ['--index-url', p_index.url, - '--allow-hosts', 'localhost', - '--exclude-scripts', '--install-dir', temp_install_dir, - dist_file] - easy_install_pkg.main(ei_params) - self.assertTrue(os.listdir(temp_install_dir)) + with TestSetupRequires.create_sdist() as dist_file: + with tempdir_context() as temp_install_dir: + with environment_context(PYTHONPATH=temp_install_dir): + ei_params = ['--index-url', p_index.url, + '--allow-hosts', 'localhost', + '--exclude-scripts', '--install-dir', temp_install_dir, + dist_file] + # attempt to install the dist. It will fail because + # our fake server can't actually supply the dependency + try: + easy_install_pkg.main(ei_params) + except Exception: + pass + #self.assertTrue(os.listdir(temp_install_dir)) self.assertEqual(len(p_index.requests), 1) self.assertEqual(p_index.requests[0].path, 'x') - def create_sdist(self): - # for now, just use a known dist - return ('http://pypi.python.org/packages/source/j/jaraco.util/' - 'jaraco.util-5.3.zip') + @staticmethod + @contextlib.contextmanager + def create_sdist(): + """ + Return an sdist generated by self.generate_dist() + + We don't generate it dynamically, because we don't want the test suite + to have to connect to the network for the setup_requires declaration + just to build the sdist. + """ + with tempdir_context() as d: + dist_path = os.path.join(d, 'distribute-test-fetcher-1.0.tar.gz') + with open(dist_path, 'wb') as dist: + dist.write(""" + H4sICLBagE8C/2Rpc3RcZGlzdHJpYnV0ZS10ZXN0LWZldGNoZXItMS4wLnRhcgDtmNtvmzAUh/Ns + Kf+DlZduUkmBYJAi5WHaXd2SqlG7h6pCNJwQa9xmm2j57+eQaqGpktKt0F3O9wI+XCJy/JmfCLlU + gt8UCgwFUhlzULMFCMPqmyedJ8LUeJ5XbjW723LfsjzHNBmzXV23HJuxDmWdFiikCgSlT/KQ1Yf7 + SwgP9H97zF8f82+P9SGKDJ7Os5Om+m/brutg///4/oeQQxpCOlv5MU+/yr76rvb8Na7rHui/te0/ + 0/PEdvWgQ03sf+OQDvI/81v+n52+Nz6O301qqHHI/4HFdvwfePp09L8FPoMKwkAFxiUIybN0SHXn + u2QcJDCkeyZHl9w9eVokSSBWQ3oxPh1Pvoy75EOWgJEHEVRqrwq1yMS9ggFJwONK+ROfQSqrV74B + ORM8V+Uv/qyexYGaZyKplFDndv2fTi7OX7+d7nnt1/ffdHb8dxgboP9tIEEVeT9fkdqLPXnMtCC/ + lCEfvkpluR/DEuKH5h7SoP81u/D4/M8cC/3H/I88q/81430tNWrn//L7HxswC/3H/I/5/zn932TD + 2Txq2H/r3vd/13QZ+t8GVzrM+eswd90lKoj8m4LHIR3RzUivDKAH5mYkl6kvYMnX6m+qqNy/73++ + avr9b3ne3fyv/Tdt9L8NeJJnQtGy1SrLYkm2u/1y9wWhmlQHglFvz2zpHZfnLDepYNTTk+e2VN5B + LxrfCi5A6kXj6mgRlTc/uj4mL3H5QBAEQRAEaZsfEynDsQAoAAA= + """.decode('base64')) + yield dist_path + + @classmethod + def generate_sdist(cls): + """ + generate the sdist suitable for create_sdist + """ + with tempdir_context(cd=os.chdir): + with open('setup.py', 'wb') as setup_script: + setup_script.write(textwrap.dedent(""" + import setuptools + setuptools.setup( + name="distribute-test-fetcher", + version="1.0", + setup_requires = ['hgtools'], + ) + """).lstrip()) + with argv_context(['setup.py', 'sdist', '-q', '--formats', 'gztar']): + setuptools.setup( + name="distribute-test-fetcher", + version = "1.0", + setup_requires = ['hgtools'], + ) + filename = 'distribute-test-fetcher-1.0.tar.gz' + dist = os.path.join('dist', filename) + assert os.path.isfile(dist) + with open(dist, 'rb') as dist_f: + print("=====================") + print(dist_f.read().encode('base64')) + +@contextlib.contextmanager +def argv_context(repl): + old_argv = sys.argv[:] + sys.argv[:] = repl + yield + sys.argv[:] = old_argv @contextlib.contextmanager -def tempdir_context(): +def tempdir_context(cd=lambda dir:None): temp_dir = tempfile.mkdtemp() + orig_dir = os.getcwd() try: + cd(temp_dir) yield temp_dir finally: + cd(orig_dir) shutil.rmtree(temp_dir) @contextlib.contextmanager From b73fcba7ff7721c1db0a057337863cdbab58ff81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 11:36:25 -0400 Subject: [PATCH 3421/8469] We expect easy_install to raise a SystemExit --HG-- branch : distribute extra : rebase_source : 74b6b4091c9719daab6f240f8c05b24183fc1b12 --- setuptools/tests/test_easy_install.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aff2688a07..e78b59aae0 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -277,12 +277,10 @@ def test_setup_requires_honors_fetch_params(self): '--allow-hosts', 'localhost', '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] - # attempt to install the dist. It will fail because + # attempt to install the dist. It should fail because # our fake server can't actually supply the dependency - try: - easy_install_pkg.main(ei_params) - except Exception: - pass + self.assertRaises(SystemExit, + easy_install_pkg.main, ei_params) #self.assertTrue(os.listdir(temp_install_dir)) self.assertEqual(len(p_index.requests), 1) self.assertEqual(p_index.requests[0].path, 'x') From 5112a1e998a49093f2531fa17fbbb21b6fcdb9d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 11:43:14 -0400 Subject: [PATCH 3422/8469] Create the sdist using tarfile and the code is much simpler --HG-- branch : distribute extra : rebase_source : f913f69988ddac8b6c27fb72d24728d18073fdb9 --- setuptools/tests/test_easy_install.py | 56 ++++----------------------- 1 file changed, 8 insertions(+), 48 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e78b59aae0..54e3cdf97f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -8,6 +8,7 @@ import site import contextlib import textwrap +import tarfile from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions @@ -289,64 +290,23 @@ def test_setup_requires_honors_fetch_params(self): @contextlib.contextmanager def create_sdist(): """ - Return an sdist generated by self.generate_dist() - - We don't generate it dynamically, because we don't want the test suite - to have to connect to the network for the setup_requires declaration - just to build the sdist. + Return an sdist with a setup_requires dependency (of something that + doesn't exist) """ with tempdir_context() as d: - dist_path = os.path.join(d, 'distribute-test-fetcher-1.0.tar.gz') - with open(dist_path, 'wb') as dist: - dist.write(""" - H4sICLBagE8C/2Rpc3RcZGlzdHJpYnV0ZS10ZXN0LWZldGNoZXItMS4wLnRhcgDtmNtvmzAUh/Ns - Kf+DlZduUkmBYJAi5WHaXd2SqlG7h6pCNJwQa9xmm2j57+eQaqGpktKt0F3O9wI+XCJy/JmfCLlU - gt8UCgwFUhlzULMFCMPqmyedJ8LUeJ5XbjW723LfsjzHNBmzXV23HJuxDmWdFiikCgSlT/KQ1Yf7 - SwgP9H97zF8f82+P9SGKDJ7Os5Om+m/brutg///4/oeQQxpCOlv5MU+/yr76rvb8Na7rHui/te0/ - 0/PEdvWgQ03sf+OQDvI/81v+n52+Nz6O301qqHHI/4HFdvwfePp09L8FPoMKwkAFxiUIybN0SHXn - u2QcJDCkeyZHl9w9eVokSSBWQ3oxPh1Pvoy75EOWgJEHEVRqrwq1yMS9ggFJwONK+ROfQSqrV74B - ORM8V+Uv/qyexYGaZyKplFDndv2fTi7OX7+d7nnt1/ffdHb8dxgboP9tIEEVeT9fkdqLPXnMtCC/ - lCEfvkpluR/DEuKH5h7SoP81u/D4/M8cC/3H/I88q/81430tNWrn//L7HxswC/3H/I/5/zn932TD - 2Txq2H/r3vd/13QZ+t8GVzrM+eswd90lKoj8m4LHIR3RzUivDKAH5mYkl6kvYMnX6m+qqNy/73++ - avr9b3ne3fyv/Tdt9L8NeJJnQtGy1SrLYkm2u/1y9wWhmlQHglFvz2zpHZfnLDepYNTTk+e2VN5B - LxrfCi5A6kXj6mgRlTc/uj4mL3H5QBAEQRAEaZsfEynDsQAoAAA= - """.decode('base64')) - yield dist_path - - @classmethod - def generate_sdist(cls): - """ - generate the sdist suitable for create_sdist - """ - with tempdir_context(cd=os.chdir): with open('setup.py', 'wb') as setup_script: setup_script.write(textwrap.dedent(""" import setuptools setuptools.setup( name="distribute-test-fetcher", version="1.0", - setup_requires = ['hgtools'], + setup_requires = ['does-not-exist'], ) """).lstrip()) - with argv_context(['setup.py', 'sdist', '-q', '--formats', 'gztar']): - setuptools.setup( - name="distribute-test-fetcher", - version = "1.0", - setup_requires = ['hgtools'], - ) - filename = 'distribute-test-fetcher-1.0.tar.gz' - dist = os.path.join('dist', filename) - assert os.path.isfile(dist) - with open(dist, 'rb') as dist_f: - print("=====================") - print(dist_f.read().encode('base64')) - -@contextlib.contextmanager -def argv_context(repl): - old_argv = sys.argv[:] - sys.argv[:] = repl - yield - sys.argv[:] = old_argv + dist_path = os.path.join(d, 'distribute-test-fetcher-1.0.tar.gz') + with tarfile.open(dist_path, 'w:gz') as dist: + dist.add('setup.py') + yield dist_path @contextlib.contextmanager def tempdir_context(cd=lambda dir:None): From dea4120fdc2cd90d9d68d3ffbc6e2118aadde125 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 12:16:56 -0400 Subject: [PATCH 3423/8469] Improved the MockServer so it now more effectively handles multiple requests (as any index server really must). Test now more accurately captures the working scenario. --HG-- branch : distribute extra : rebase_source : 8ee0afdd95219047e4700b85356792f6128b1fd8 --- setuptools/tests/server.py | 10 +++++----- setuptools/tests/test_easy_install.py | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index e04dcca576..8e06cc1d9f 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -61,7 +61,7 @@ def do_GET(self): requests.append(self) self.send_response(200, 'OK') -class MockServer(HTTPServer): +class MockServer(HTTPServer, threading.Thread): """ A simple HTTP Server that records the requests made to it. """ @@ -70,11 +70,11 @@ def __init__(self, server_address=('', 0), bind_and_activate=True): HTTPServer.__init__(self, server_address, RequestHandlerClass, bind_and_activate) - self.threads = [] + threading.Thread.__init__(self) + self.daemon = True - def handle_request_in_thread(self): - self.threads.append(threading.Thread(target = self.handle_request)) - # todo: ensure that threads are closed. + def run(self): + self.serve_forever() def url(self): return 'http://localhost:%(server_port)s/' % vars(self) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 54e3cdf97f..87d24bb76e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -9,6 +9,7 @@ import contextlib import textwrap import tarfile +import urlparse from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions @@ -269,13 +270,14 @@ def test_setup_requires_honors_fetch_params(self): """ # set up a server which will simulate an alternate package index. p_index = setuptools.tests.server.MockServer() - p_index.handle_request_in_thread() + p_index.start() + p_index_loc = urlparse.urlparse(p_index.url).netloc # create an sdist that has a build-time dependency. with TestSetupRequires.create_sdist() as dist_file: with tempdir_context() as temp_install_dir: with environment_context(PYTHONPATH=temp_install_dir): ei_params = ['--index-url', p_index.url, - '--allow-hosts', 'localhost', + '--allow-hosts', p_index_loc, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] # attempt to install the dist. It should fail because @@ -283,8 +285,8 @@ def test_setup_requires_honors_fetch_params(self): self.assertRaises(SystemExit, easy_install_pkg.main, ei_params) #self.assertTrue(os.listdir(temp_install_dir)) - self.assertEqual(len(p_index.requests), 1) - self.assertEqual(p_index.requests[0].path, 'x') + self.assertEqual(len(p_index.requests), 2) + self.assertEqual(p_index.requests[0].path, '/does-not-exist/') @staticmethod @contextlib.contextmanager From 1a9a961d96c1f9c11719356d6f375cdfc17e7e6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 12:40:19 -0400 Subject: [PATCH 3424/8469] Test now constructs the tarfile completely in memory (avoiding accidentally writing over our own setup.py) --HG-- branch : distribute extra : rebase_source : ad8ec142238405edeee6dce51c05d382e53d1299 --- setuptools/tests/test_easy_install.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 87d24bb76e..3f38d50f01 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -10,6 +10,7 @@ import textwrap import tarfile import urlparse +import StringIO from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions @@ -296,18 +297,19 @@ def create_sdist(): doesn't exist) """ with tempdir_context() as d: - with open('setup.py', 'wb') as setup_script: - setup_script.write(textwrap.dedent(""" - import setuptools - setuptools.setup( - name="distribute-test-fetcher", - version="1.0", - setup_requires = ['does-not-exist'], - ) - """).lstrip()) + setup_py = tarfile.TarInfo(name="setup.py") + setup_py_bytes = StringIO.StringIO(textwrap.dedent(""" + import setuptools + setuptools.setup( + name="distribute-test-fetcher", + version="1.0", + setup_requires = ['does-not-exist'], + ) + """).lstrip()) + setup_py.size = len(setup_py_bytes.buf) dist_path = os.path.join(d, 'distribute-test-fetcher-1.0.tar.gz') with tarfile.open(dist_path, 'w:gz') as dist: - dist.add('setup.py') + dist.addfile(setup_py, fileobj=setup_py_bytes) yield dist_path @contextlib.contextmanager From bf87c16fce3253d13370f9aa5a99473e646e439a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 13:26:44 -0400 Subject: [PATCH 3425/8469] Set the argv context so that easy_install.main invokes the command as if it had been run from the command-line --HG-- branch : distribute extra : rebase_source : 4916aebae87b1d83dc27b494715c89dce1ce1e12 --- setuptools/tests/test_easy_install.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3f38d50f01..bec03ab594 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -281,11 +281,11 @@ def test_setup_requires_honors_fetch_params(self): '--allow-hosts', p_index_loc, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] - # attempt to install the dist. It should fail because - # our fake server can't actually supply the dependency - self.assertRaises(SystemExit, - easy_install_pkg.main, ei_params) - #self.assertTrue(os.listdir(temp_install_dir)) + with argv_context(['easy_install']): + # attempt to install the dist. It should fail because + # it doesn't exist. + self.assertRaises(SystemExit, + easy_install_pkg.main, ei_params) self.assertEqual(len(p_index.requests), 2) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') @@ -333,3 +333,10 @@ def environment_context(**updates): for key in updates: del os.environ[key] os.environ.update(old_env) + +@contextlib.contextmanager +def argv_context(repl): + old_argv = sys.argv[:] + sys.argv[:] = repl + yield + sys.argv[:] = old_argv From ed8d0afca6d513359e16b9e9acf409dd430b50de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 13:43:29 -0400 Subject: [PATCH 3426/8469] Added another context to reset the _setup_stop_context --HG-- branch : distribute extra : rebase_source : b31f921755cea6d2559c9f24f42b737aa80198e7 --- setuptools/tests/test_easy_install.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index bec03ab594..c5fb4d9d6e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -11,6 +11,7 @@ import tarfile import urlparse import StringIO +import distutils.core from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions @@ -281,11 +282,12 @@ def test_setup_requires_honors_fetch_params(self): '--allow-hosts', p_index_loc, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] - with argv_context(['easy_install']): - # attempt to install the dist. It should fail because - # it doesn't exist. - self.assertRaises(SystemExit, - easy_install_pkg.main, ei_params) + with reset_setup_stop_context(): + with argv_context(['easy_install']): + # attempt to install the dist. It should fail because + # it doesn't exist. + self.assertRaises(SystemExit, + easy_install_pkg.main, ei_params) self.assertEqual(len(p_index.requests), 2) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') @@ -340,3 +342,16 @@ def argv_context(repl): sys.argv[:] = repl yield sys.argv[:] = old_argv + +@contextlib.contextmanager +def reset_setup_stop_context(): + """ + When the distribute tests are run using setup.py test, and then + one wants to invoke another setup() command (such as easy_install) + within those tests, it's necessary to reset the global variable + in distutils.core so that the setup() command will run naturally. + """ + setup_stop_after = distutils.core._setup_stop_after + distutils.core._setup_stop_after = None + yield + distutils.core._setup_stop_after = setup_stop_after From 2d43eef466ba091d132cd3da740770c686d19444 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 13:51:20 -0400 Subject: [PATCH 3427/8469] Make sure to un-monkey-patch the Distribution class when running test_no_setup_cfg. Otherwise, it breaks other tests (notably the new test_setup_requires_honors_fetch_params). --HG-- branch : distribute extra : rebase_source : f54d67ea495c18ff1dc74d12ff96797e64abe5e1 --- setuptools/tests/test_easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c5fb4d9d6e..d89c8ae34e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -103,7 +103,7 @@ def _parse_command_line(self): opts = self.command_options if 'easy_install' in opts: assert 'find_links' not in opts['easy_install'], msg - return self._old_parse_command_line + return self._old_parse_command_line() Distribution._old_parse_command_line = Distribution.parse_command_line Distribution.parse_command_line = _parse_command_line @@ -115,6 +115,7 @@ def _parse_command_line(self): finally: os.chdir(old_wd) shutil.rmtree(dir) + Distribution.parse_command_line = Distribution._old_parse_command_line def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at From 6f830000f642af576434c52c7d229584ee0fdbd1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 13:52:20 -0400 Subject: [PATCH 3428/8469] Add requests to the instance, so it's always available even if no requests were made. --HG-- branch : distribute extra : rebase_source : b4bf42ec3470eda7ccef8e05aaf1944b450cf5e9 --- setuptools/tests/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 8e06cc1d9f..8a149d36be 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -72,6 +72,7 @@ def __init__(self, server_address=('', 0), bind_and_activate) threading.Thread.__init__(self) self.daemon = True + self.requests = [] def run(self): self.serve_forever() From 4de50ce1877161a6a5ea332c40bcbfafa5dc2994 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Apr 2012 00:04:35 +0000 Subject: [PATCH 3429/8469] Converted new tests in test_easy_install to use call-back functions instead of with statements for Python2.4 compatibility. --HG-- branch : distribute extra : rebase_source : e7edcca83dc29038a6832501a0a8251f4f3856a6 --- setuptools/tests/test_easy_install.py | 83 +++++++++++++++++---------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index d89c8ae34e..5cf136df03 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -275,31 +275,43 @@ def test_setup_requires_honors_fetch_params(self): p_index = setuptools.tests.server.MockServer() p_index.start() p_index_loc = urlparse.urlparse(p_index.url).netloc - # create an sdist that has a build-time dependency. - with TestSetupRequires.create_sdist() as dist_file: - with tempdir_context() as temp_install_dir: - with environment_context(PYTHONPATH=temp_install_dir): + + # I realize this is all-but-impossible to read, because it was + # ported from some well-factored, safe code using 'with'. If you + # need to maintain this code, consider making the changes in + # the parent revision (of this comment) and then port the changes + # back for Python 2.4 (or deprecate Python 2.4). + + def install(dist_file): + def install_at(temp_install_dir): + def install_env(): ei_params = ['--index-url', p_index.url, '--allow-hosts', p_index_loc, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file] - with reset_setup_stop_context(): - with argv_context(['easy_install']): + def install_clean_reset(): + def install_clean_argv(): # attempt to install the dist. It should fail because # it doesn't exist. self.assertRaises(SystemExit, easy_install_pkg.main, ei_params) + argv_context(install_clean_argv, ['easy_install']) + reset_setup_stop_context(install_clean_reset) + environment_context(install_env, PYTHONPATH=temp_install_dir) + tempdir_context(install_at) + + # create an sdist that has a build-time dependency. + self.create_sdist(install) + self.assertEqual(len(p_index.requests), 2) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') - @staticmethod - @contextlib.contextmanager - def create_sdist(): + def create_sdist(self, installer): """ - Return an sdist with a setup_requires dependency (of something that - doesn't exist) + Create an sdist with a setup_requires dependency (of something that + doesn't exist) and invoke installer on it. """ - with tempdir_context() as d: + def build_sdist(dir): setup_py = tarfile.TarInfo(name="setup.py") setup_py_bytes = StringIO.StringIO(textwrap.dedent(""" import setuptools @@ -310,42 +322,53 @@ def create_sdist(): ) """).lstrip()) setup_py.size = len(setup_py_bytes.buf) - dist_path = os.path.join(d, 'distribute-test-fetcher-1.0.tar.gz') - with tarfile.open(dist_path, 'w:gz') as dist: + dist_path = os.path.join(dir, 'distribute-test-fetcher-1.0.tar.gz') + dist = tarfile.open(dist_path, 'w:gz') + try: dist.addfile(setup_py, fileobj=setup_py_bytes) - yield dist_path + finally: + dist.close() + installer(dist_path) + tempdir_context(build_sdist) -@contextlib.contextmanager -def tempdir_context(cd=lambda dir:None): +def tempdir_context(f, cd=lambda dir:None): + """ + Invoke f in the context + """ temp_dir = tempfile.mkdtemp() orig_dir = os.getcwd() try: cd(temp_dir) - yield temp_dir + f(temp_dir) finally: cd(orig_dir) shutil.rmtree(temp_dir) -@contextlib.contextmanager -def environment_context(**updates): +def environment_context(f, **updates): + """ + Invoke f in the context + """ old_env = os.environ.copy() os.environ.update(updates) try: - yield + f() finally: for key in updates: del os.environ[key] os.environ.update(old_env) -@contextlib.contextmanager -def argv_context(repl): +def argv_context(f, repl): + """ + Invoke f in the context + """ old_argv = sys.argv[:] sys.argv[:] = repl - yield - sys.argv[:] = old_argv + try: + f() + finally: + sys.argv[:] = old_argv -@contextlib.contextmanager -def reset_setup_stop_context(): +def reset_setup_stop_context(f): """ When the distribute tests are run using setup.py test, and then one wants to invoke another setup() command (such as easy_install) @@ -354,5 +377,7 @@ def reset_setup_stop_context(): """ setup_stop_after = distutils.core._setup_stop_after distutils.core._setup_stop_after = None - yield - distutils.core._setup_stop_after = setup_stop_after + try: + f() + finally: + distutils.core._setup_stop_after = setup_stop_after From ad62e5caa3126d490127e486c92850afe36382a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Apr 2012 00:11:57 +0000 Subject: [PATCH 3430/8469] Removed unused import --HG-- branch : distribute extra : rebase_source : 4bad5e1f1f1e377a8cb5ade411a8ad572f85abb6 --- setuptools/tests/test_easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 5cf136df03..9cf3441d55 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -6,7 +6,6 @@ import tempfile import unittest import site -import contextlib import textwrap import tarfile import urlparse From 94f0f93eb75b4ad956a1a1d602cfcc2405268b9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Apr 2012 00:22:47 +0000 Subject: [PATCH 3431/8469] Removed bind_and_activate parameters (not compatible with Python 2.4 --HG-- branch : distribute extra : rebase_source : bf2288bbb5fccc4aad0b8a09f5a444e0246c412e --- setuptools/tests/server.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 8a149d36be..6b9fe6ace9 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -19,10 +19,8 @@ class IndexServer(HTTPServer): s.stop() """ def __init__(self, server_address=('', 0), - RequestHandlerClass=SimpleHTTPRequestHandler, - bind_and_activate=True): - HTTPServer.__init__(self, server_address, RequestHandlerClass, - bind_and_activate) + RequestHandlerClass=SimpleHTTPRequestHandler): + HTTPServer.__init__(self, server_address, RequestHandlerClass) self._run = True def serve(self): @@ -66,10 +64,8 @@ class MockServer(HTTPServer, threading.Thread): A simple HTTP Server that records the requests made to it. """ def __init__(self, server_address=('', 0), - RequestHandlerClass=RequestRecorder, - bind_and_activate=True): - HTTPServer.__init__(self, server_address, RequestHandlerClass, - bind_and_activate) + RequestHandlerClass=RequestRecorder): + HTTPServer.__init__(self, server_address, RequestHandlerClass) threading.Thread.__init__(self) self.daemon = True self.requests = [] From 1b9b6071393b5b40921c0f6bbf95fcceed8029d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Apr 2012 00:29:34 +0000 Subject: [PATCH 3432/8469] Fixed two issues for Python 2.4 compatibility. Tests now run again on Python 2.4 --HG-- branch : distribute extra : rebase_source : c6dc5ce8070ec42190d4d8eb6af28523d447f962 --- setuptools/tests/server.py | 2 +- setuptools/tests/test_easy_install.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 6b9fe6ace9..7b5cacb934 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -67,7 +67,7 @@ def __init__(self, server_address=('', 0), RequestHandlerClass=RequestRecorder): HTTPServer.__init__(self, server_address, RequestHandlerClass) threading.Thread.__init__(self) - self.daemon = True + self.setDaemon(True) self.requests = [] def run(self): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 9cf3441d55..3f9b77242b 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -273,7 +273,8 @@ def test_setup_requires_honors_fetch_params(self): # set up a server which will simulate an alternate package index. p_index = setuptools.tests.server.MockServer() p_index.start() - p_index_loc = urlparse.urlparse(p_index.url).netloc + netloc = 1 + p_index_loc = urlparse.urlparse(p_index.url)[netloc] # I realize this is all-but-impossible to read, because it was # ported from some well-factored, safe code using 'with'. If you From 01fccfb21c330195ff03515446460fddf0d54e52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 22:23:33 -0400 Subject: [PATCH 3433/8469] Added tag 0.6.26 for changeset b69f072c0002 --HG-- branch : distribute extra : rebase_source : 854566f5be373b1e82cd296c77fc887b214ec48f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 19680f4f2e..dbe06104fb 100644 --- a/.hgtags +++ b/.hgtags @@ -34,3 +34,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 9406c5dac8429216f1a264e6f692fdc534476acd 0.6.23 7fd7b6e30a0effa082baed1c4103a0efa56be98c 0.6.24 6124053afb5c98f11e146ae62049b4c232d50dc5 0.6.25 +b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 From a17a1c96caac7e6d602a750281dae564c56568cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Apr 2012 22:24:01 -0400 Subject: [PATCH 3434/8469] Bumped to 0.6.27 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 0addbfe4e10e6ce8b94bf4b2916079bce91bca7f --- README.txt | 6 +- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- distribute_setup.py | 2 +- docs/conf.py | 4 +- release.py | 2 +- setup.py | 2 +- 6 files changed, 70 insertions(+), 70 deletions(-) diff --git a/README.txt b/README.txt index bc9b8454be..fadc7d7935 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.26.tar.gz - $ tar -xzvf distribute-0.6.26.tar.gz - $ cd distribute-0.6.26 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz + $ tar -xzvf distribute-0.6.27.tar.gz + $ cd distribute-0.6.27 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2965458969..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/distribute_setup.py b/distribute_setup.py index 3bc42fa148..ba46350d28 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.26" +DEFAULT_VERSION = "0.6.27" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 80d8c0e150..5312272f6b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.26' +version = '0.6.27' # The full version, including alpha/beta/rc tags. -release = '0.6.26' +release = '0.6.27' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index c6ae00d54b..f889af99f0 100644 --- a/release.py +++ b/release.py @@ -12,7 +12,7 @@ import os import sys -VERSION = '0.6.26' +VERSION = '0.6.27' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index d6c8ee0d34..7fac7f0143 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.26" +VERSION = "0.6.27" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From e296a811339390d932989b039ec40824a94c6024 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Apr 2012 17:11:09 -0400 Subject: [PATCH 3435/8469] Fixed one failing test per #277. --HG-- branch : distribute extra : rebase_source : cc573d913c6c034204bcb0d6ada6d978aeabc0cd --- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..2965458969 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + From abcb749df3c0d99caffa76a575f6e01b37002ea6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Apr 2012 17:34:20 -0400 Subject: [PATCH 3436/8469] Fix one failing test per #277 --HG-- branch : distribute extra : rebase_source : 74d2107a0e4f5ecda5030fa8610dfd38a2bd5740 --- distribute.egg-info/entry_points.txt | 124 +++++++++++++------------- setuptools/tests/test_easy_install.py | 2 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2965458969..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3f9b77242b..5577dd6a34 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -321,7 +321,7 @@ def build_sdist(dir): setup_requires = ['does-not-exist'], ) """).lstrip()) - setup_py.size = len(setup_py_bytes.buf) + setup_py.size = len(setup_py_bytes.getvalue()) dist_path = os.path.join(dir, 'distribute-test-fetcher-1.0.tar.gz') dist = tarfile.open(dist_path, 'w:gz') try: From d4855653e3edb3801094088e0c2b1514b02b6b86 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 9 Apr 2012 19:04:04 -0400 Subject: [PATCH 3437/8469] bump to 2.7.3 final --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a137950efb..036062cc33 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.3rc2" +__version__ = "2.7.3" #--end constants-- From c2f6398480d1b115bb8436ba7b5fba0e64de251a Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 10 Apr 2012 10:59:35 -0400 Subject: [PATCH 3438/8469] Bump to 2.6.8 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 141b377b94..e5008c9717 100644 --- a/__init__.py +++ b/__init__.py @@ -22,5 +22,5 @@ # #--start constants-- -__version__ = "2.6.8rc2" +__version__ = "2.6.8" #--end constants-- From ad8c62a6235689d9f30f55dbb3a7547ba9961d89 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 10 Apr 2012 19:28:09 +0200 Subject: [PATCH 3439/8469] Bump to 3.2.3 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index d8d61c5432..b52a9fe6c4 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.3rc2" +__version__ = "3.2.3" #--end constants-- From 6d3883d96d604548dc1f6e5229c24595773b0655 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Apr 2012 13:30:09 -0400 Subject: [PATCH 3440/8469] Fixed issue where some functions are excluded from the depends module on certain platforms. --HG-- branch : distribute extra : rebase_source : d689792420ad98950659e80782b4353da3560403 --- setuptools/tests/__init__.py | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index fec3854d3d..db563766a9 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -12,8 +12,9 @@ import unittest import setuptools.dist +import setuptools.depends as dep from setuptools import Feature -from setuptools.depends import Require, find_module, get_module_constant, extract_constant +from setuptools.depends import Require def additional_tests(): suite = unittest.TestSuite(( @@ -45,7 +46,9 @@ def makeSetup(**args): class DependsTests(unittest.TestCase): def testExtractConst(self): - if not extract_constant: return # skip on non-bytecode platforms + if not hasattr(dep, 'extract_constant'): + # skip on non-bytecode platforms + return def f1(): global x,y,z @@ -53,38 +56,43 @@ def f1(): y = z # unrecognized name - self.assertEqual(extract_constant(f1.func_code,'q', -1), None) + self.assertEqual(dep.extract_constant(f1.func_code,'q', -1), None) # constant assigned - self.assertEqual(extract_constant(f1.func_code,'x', -1), "test") + self.assertEqual(dep.extract_constant(f1.func_code,'x', -1), "test") # expression assigned - self.assertEqual(extract_constant(f1.func_code,'y', -1), -1) + self.assertEqual(dep.extract_constant(f1.func_code,'y', -1), -1) # recognized name, not assigned - self.assertEqual(extract_constant(f1.func_code,'z', -1), None) + self.assertEqual(dep.extract_constant(f1.func_code,'z', -1), None) def testFindModule(self): - self.assertRaises(ImportError, find_module, 'no-such.-thing') - self.assertRaises(ImportError, find_module, 'setuptools.non-existent') - f,p,i = find_module('setuptools.tests'); f.close() + self.assertRaises(ImportError, dep.find_module, 'no-such.-thing') + self.assertRaises(ImportError, dep.find_module, 'setuptools.non-existent') + f,p,i = dep.find_module('setuptools.tests'); f.close() def testModuleExtract(self): - if not get_module_constant: return # skip on non-bytecode platforms + if not hasattr(dep, 'get_module_constant'): + # skip on non-bytecode platforms + return + from email import __version__ self.assertEqual( - get_module_constant('email','__version__'), __version__ + dep.get_module_constant('email','__version__'), __version__ ) self.assertEqual( - get_module_constant('sys','version'), sys.version + dep.get_module_constant('sys','version'), sys.version ) self.assertEqual( - get_module_constant('setuptools.tests','__doc__'),__doc__ + dep.get_module_constant('setuptools.tests','__doc__'),__doc__ ) def testRequire(self): - if not extract_constant: return # skip on non-bytecode platforms + if not hasattr(dep, 'extract_constant'): + # skip on non-bytecode platformsh + return req = Require('Email','1.0.3','email') From 4c40b36f11a8b4a8025e5ab15d39403c6d4ca88a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Apr 2012 18:17:54 +0000 Subject: [PATCH 3441/8469] Fixed test failures in the doctests on Python 3. --HG-- branch : distribute extra : rebase_source : e3c57d5c2650be765d7e152e191f7c7a0e7c578d --- setuptools/tests/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index fec3854d3d..78ac920ffc 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -1,6 +1,7 @@ """Tests for the 'setuptools' package""" import sys import os +import unittest import doctest import distutils.core import distutils.cmd @@ -9,13 +10,12 @@ from distutils.core import Extension from distutils.version import LooseVersion -import unittest - import setuptools.dist from setuptools import Feature from setuptools.depends import Require, find_module, get_module_constant, extract_constant def additional_tests(): + import doctest, unittest suite = unittest.TestSuite(( doctest.DocFileSuite( os.path.join('tests', 'api_tests.txt'), From 856ff28c515c35ad35db6661d0b74579f59c3e4c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Apr 2012 18:31:52 +0000 Subject: [PATCH 3442/8469] Ensure that the setup.py is generated as bytes on Python 2 and 3 so that the tarfile module will accept it. --HG-- branch : distribute extra : rebase_source : 07afe24875bff3a4892319e02ae66be0d3725c8e --- setuptools/tests/test_easy_install.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 5577dd6a34..cf2f91d696 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -313,14 +313,19 @@ def create_sdist(self, installer): """ def build_sdist(dir): setup_py = tarfile.TarInfo(name="setup.py") - setup_py_bytes = StringIO.StringIO(textwrap.dedent(""" + try: + # Python 3 (StringIO gets converted to io module) + MemFile = StringIO.BytesIO + except AttributeError: + MemFile = StringIO.StringIO + setup_py_bytes = MemFile(textwrap.dedent(""" import setuptools setuptools.setup( name="distribute-test-fetcher", version="1.0", setup_requires = ['does-not-exist'], ) - """).lstrip()) + """).lstrip().encode('utf-8')) setup_py.size = len(setup_py_bytes.getvalue()) dist_path = os.path.join(dir, 'distribute-test-fetcher-1.0.tar.gz') dist = tarfile.open(dist_path, 'w:gz') From 347b49d545fbd9e8b2ef50f0778507fce84d2b19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Apr 2012 11:41:46 -0400 Subject: [PATCH 3443/8469] Skip test when MockServer can't detect the port to which it bound. --HG-- branch : distribute extra : rebase_source : c59caee49fcfb2e0d9b507fb1a01dfb2ddcdcdc8 --- setuptools/tests/test_easy_install.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index cf2f91d696..6fd45e8bed 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -275,6 +275,10 @@ def test_setup_requires_honors_fetch_params(self): p_index.start() netloc = 1 p_index_loc = urlparse.urlparse(p_index.url)[netloc] + if p_index_loc.endswith(':0'): + # Some platforms (Jython) don't find a port to which to bind, + # so skip this test for them. + return # I realize this is all-but-impossible to read, because it was # ported from some well-factored, safe code using 'with'. If you From 1e64c9a55bc6e7b4560966b95c831d6ee8276295 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Apr 2012 13:35:52 -0400 Subject: [PATCH 3444/8469] Split one test 'bad urls' into several different tests (for clarity). --HG-- branch : distribute extra : rebase_source : cdc7ce4fe999eb578df356ec6a2d44b65312d7d9 --- setuptools/tests/test_packageindex.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 00d44ca689..3a8808f7ae 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,15 +1,15 @@ """Package Index Tests """ -# More would be better! import sys -import os, shutil, tempfile, unittest, urllib2 +import unittest +import urllib2 import pkg_resources import setuptools.package_index from server import IndexServer class TestPackageIndex(unittest.TestCase): - def test_bad_urls(self): + def test_bad_url_bad_port(self): index = setuptools.package_index.PackageIndex() url = 'http://127.0.0.1:0/nonesuch/test_package_index' try: @@ -19,6 +19,7 @@ def test_bad_urls(self): else: self.assert_(isinstance(v,urllib2.HTTPError)) + def test_bad_url_typo(self): # issue 16 # easy_install inquant.contentmirror.plone breaks because of a typo # in its home URL @@ -34,6 +35,11 @@ def test_bad_urls(self): else: self.assert_(isinstance(v, urllib2.HTTPError)) + def test_bad_url_bad_status_line(self): + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) + def _urlopen(*args): import httplib raise httplib.BadStatusLine('line') @@ -51,6 +57,11 @@ def _urlopen(*args): finally: urllib2.urlopen = old_urlopen + def test_bad_url_double_scheme(self): + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) + # issue 20 url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' try: @@ -58,6 +69,10 @@ def _urlopen(*args): except Exception, v: self.assert_('nonnumeric port' in str(v)) + def test_bad_url_screwy_href(self): + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) # issue #160 if sys.version_info[0] == 2 and sys.version_info[1] == 7: @@ -67,7 +82,6 @@ def _urlopen(*args): 'http://www.famfamfam.com/">') index.process_index(url, page) - def test_url_ok(self): index = setuptools.package_index.PackageIndex( hosts=('www.example.com',) From 9f2aec42c42499d265215db77cc0e242711e034b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Apr 2012 13:36:30 -0400 Subject: [PATCH 3445/8469] Skip another test that fails on Jython due to port 0 binding behavior. --HG-- branch : distribute extra : rebase_source : 7cd547b51b3db433b6f3040f01b1533065af3d96 --- setuptools/tests/test_packageindex.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 3a8808f7ae..1319547ba6 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -104,6 +104,10 @@ def test_links_priority(self): is used -> Distribute should use the link from pypi, not the external one. """ + if sys.platform.startswith('java'): + # Skip this test on jython because binding to :0 fails + return + # start an index server server = IndexServer() server.start() From 0f29131df992aff401a8157931e419570826acaa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Apr 2012 13:41:52 -0400 Subject: [PATCH 3446/8469] Allow for three requests (fixes test on Python 3.3). --HG-- branch : distribute extra : rebase_source : 42f8c571b3296488b167aaa863bdbfa771f6a9d9 --- setuptools/tests/test_easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6fd45e8bed..7c807fc365 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -307,7 +307,9 @@ def install_clean_argv(): # create an sdist that has a build-time dependency. self.create_sdist(install) - self.assertEqual(len(p_index.requests), 2) + # there should have been two or three requests to the server + # (three happens on Python 3.3a) + self.assert_(2 <= len(p_index.requests) <= 3) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') def create_sdist(self, installer): From b35960c77a05217ed4db1e7e9ec86570f4e9b6dc Mon Sep 17 00:00:00 2001 From: iElectric Date: Mon, 16 Apr 2012 12:46:12 +0200 Subject: [PATCH 3447/8469] In the bootstrap script, don't attempt to write the setuptools egg info if write permission isn't available. Fixes #231. --HG-- branch : distribute extra : rebase_source : 2815a510842f63905a58f6e446b3889a81944299 --- CHANGES.txt | 6 ++++++ distribute_setup.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5e91876039..f6bece7454 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.27 +------ + +* Issue #231: Don't fiddle with system python when used with buildout (bootstrap.py) + ------ 0.6.26 ------ diff --git a/distribute_setup.py b/distribute_setup.py index ba46350d28..b8c4a11d65 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -306,6 +306,9 @@ def _create_fake_setuptools_pkg_info(placeholder): log.warn('%s already exists', pkg_info) return + if not os.access(pkg_info, os.W_OK): + log.warn("Don't have permissions to write %s, skipping", pkg_info) + log.warn('Creating %s', pkg_info) f = open(pkg_info, 'w') try: From 8b6d10f3443e8f9b8d662097d496392a4e7ed599 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Apr 2012 15:30:31 -0400 Subject: [PATCH 3448/8469] Fix typo in protocol_version. Thanks aclark! --HG-- branch : distribute extra : rebase_source : ab90cfb5cae3189b8d0c71c43992bc0273a7587a --- setuptools/command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 4bd6021d91..9f9366b5f1 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -92,7 +92,7 @@ def upload_file(self, command, pyversion, filename): comment = "built on %s" % platform.platform(terse=1) data = { ':action':'file_upload', - 'protcol_version':'1', + 'protocol_version':'1', 'name':self.distribution.get_name(), 'version':self.distribution.get_version(), 'content':(basename,content), From 76f2440a4dad4038f4d3aadcd64e33e9ef22ad6e Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Sun, 22 Apr 2012 21:41:29 -0400 Subject: [PATCH 3449/8469] README.rst is now a standard --HG-- branch : distribute extra : rebase_source : 261a30d0a7ec63b1ff4918d7906476a19945b288 --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index c49839cdee..1f88e93b9f 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -155,7 +155,7 @@ def run(self): dist_files.append(data) def add_defaults(self): - standards = [('README', 'README.txt'), + standards = [('README', 'README.rst', 'README.txt'), self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): From 28325c120466506f957074f06e28789aef990b7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Apr 2012 22:39:03 -0400 Subject: [PATCH 3450/8469] Updated README --HG-- branch : distribute extra : rebase_source : 4f75a63385ffd1c6e8b2fe60761a88b6d74cabc6 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5e91876039..35c3aa3b35 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.27 +------ + +* Distribute now recognizes README.rst as a standard, default readme file. + ------ 0.6.26 ------ From b6b2642ba9df7a37d18256e403214bf02b656936 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Apr 2012 07:10:41 -0400 Subject: [PATCH 3451/8469] Added support for automatic milestone addition in release script --HG-- branch : distribute extra : rebase_source : acf505d50f886449aefa428e2ecd4555497dbe9e --- release.py | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/release.py b/release.py index f889af99f0..4c9b960d2b 100644 --- a/release.py +++ b/release.py @@ -11,6 +11,14 @@ import shutil import os import sys +import urllib2 +import getpass +import collections + +try: + import keyring +except Exception: + pass VERSION = '0.6.27' @@ -24,6 +32,40 @@ def get_next_version(): files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', 'README.txt', 'distribute_setup.py') +def get_mercurial_creds(system='https://bitbucket.org', username=None): + """ + Return named tuple of username,password in much the same way that + Mercurial would (from the keyring). + """ + # todo: consider getting this from .hgrc + username = username or getpass.getuser() + keyring_username = '@@'.join((username, system)) + system = '@'.join((keyring_username, 'Mercurial')) + password = ( + keyring.get_password(system, keyring_username) + if 'keyring' in globals() + else None + ) + if not password: + password = getpass.getpass() + Credential = collections.namedtuple('Credential', 'username password') + return Credential(username, password) + +def add_milestone(version=NEXT_VERSION): + auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip() + headers = { + 'Authorization': auth, + } + base = 'https://api.bitbucket.org' + url = (base + '/1.0/repositories/' + '{repo}/issues/milestones'.format(repo = 'tarek/distribute')) + req = urllib2.Request(url = url, headers = headers, + data='name='+version) + try: + urllib2.urlopen(req) + except Exception as e: + print(e.fp.read()) + def bump_versions(): list(map(bump_version, files_with_versions)) @@ -73,7 +115,7 @@ def do_release(): # push the changes subprocess.check_call(['hg', 'push']) - # TODO: update bitbucket milestones and versions + add_milestone() def build_docs(): if os.path.isdir('docs/build'): From 912d0ff09025b61aec9937350e809ebeeaca61f8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 1 May 2012 09:35:18 +0200 Subject: [PATCH 3452/8469] Bump to 3.3.0a3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 661a8b6df4..d39d82eea1 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0a2" +__version__ = "3.3.0a3" #--end constants-- From eeb3f1916e5a11a35bd90351d5df6e199c5a383c Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 2 May 2012 16:03:44 +0200 Subject: [PATCH 3453/8469] Add support for CPython 3.3. --HG-- branch : distribute extra : rebase_source : b2b90c6df17a19e6e9b876f13a9c3239e41fa141 --- pkg_resources.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 4cc73bb853..e8a737766b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1325,6 +1325,14 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) +try: + # CPython >=3.3 + import _frozen_importlib +except ImportError: + pass +else: + register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider) + class EmptyProvider(NullProvider): """Provider that returns nothing for all requests""" @@ -1759,6 +1767,14 @@ def find_on_path(importer, path_item, only=False): break register_finder(ImpWrapper,find_on_path) +try: + # CPython >=3.3 + import _frozen_importlib +except ImportError: + pass +else: + register_finder(_frozen_importlib.FileFinder, find_on_path) + _declare_state('dict', _namespace_handlers={}) _declare_state('dict', _namespace_packages={}) From 021d9e02866e72c17cc39725d8138cb65a474c39 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 2 May 2012 18:03:54 +0200 Subject: [PATCH 3454/8469] Fix support for namespace packages with CPython 3.3. --HG-- branch : distribute extra : rebase_source : 3d6c103fefe30d3115dacca58c1a08fd26d0d8fa --- pkg_resources.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index e8a737766b..a61c0efe1c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1874,6 +1874,14 @@ def file_ns_handler(importer, path_item, packageName, module): register_namespace_handler(ImpWrapper,file_ns_handler) register_namespace_handler(zipimport.zipimporter,file_ns_handler) +try: + # CPython >=3.3 + import _frozen_importlib +except ImportError: + pass +else: + register_namespace_handler(_frozen_importlib.FileFinder, file_ns_handler) + def null_ns_handler(importer, path_item, packageName, module): return None From 5be712ee48b86f32284e72c3b862002fd3dedd85 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 3 May 2012 07:57:09 +0200 Subject: [PATCH 3455/8469] Update CHANGES.txt. --HG-- branch : distribute extra : rebase_source : 3f28bda28c732ba7e5865d1b77903da972533e56 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 35c3aa3b35..f5a729a208 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.27 ------ +* Support current snapshots of CPython 3.3. * Distribute now recognizes README.rst as a standard, default readme file. ------ From 8dde28ee529c74d578e8142dfbb0a537a8bf0414 Mon Sep 17 00:00:00 2001 From: Justin Azoff Date: Sat, 12 May 2012 19:01:44 -0400 Subject: [PATCH 3456/8469] When writing out scripts, respect the users umask --HG-- branch : distribute extra : rebase_source : d4fc14bcdcd3e1a45da8bdcdef490537863ece35 --- setuptools/command/easy_install.py | 10 ++++++++-- setuptools/command/install_scripts.py | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dfd9f7ff8f..49a2c41e42 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -10,7 +10,7 @@ __ http://packages.python.org/distribute/easy_install.html """ -import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup @@ -762,12 +762,13 @@ def write_script(self, script_name, contents, mode="t", blockers=()): target = os.path.join(self.script_dir, script_name) self.add_output(target) + mask = current_umask() if not self.dry_run: ensure_directory(target) f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target,0755) + chmod(target, 0777-mask) @@ -1870,6 +1871,11 @@ def onerror(*args): except os.error: onerror(os.rmdir, path, sys.exc_info()) +def current_umask(): + tmp = os.umask(022) + os.umask(tmp) + return tmp + def bootstrap(): # This function is called when setuptools*.egg is run using /bin/sh import setuptools; argv0 = os.path.dirname(setuptools.__path__[0]) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 6ce1b99319..8245603597 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,15 +39,16 @@ def run(self): def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" - from setuptools.command.easy_install import chmod + from setuptools.command.easy_install import chmod, current_umask log.info("Installing %s script to %s", script_name, self.install_dir) target = os.path.join(self.install_dir, script_name) self.outfiles.append(target) + mask = current_umask() if not self.dry_run: ensure_directory(target) f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target,0755) + chmod(target, 0777-mask) From 12525d2ac00aeffb77cc20ffbc37f58fd086330a Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Sun, 13 May 2012 11:19:23 -0500 Subject: [PATCH 3457/8469] Fix #13210. Port the Windows build from VS2008 to VS2010. --- command/build_ext.py | 2 +- command/wininst-10.0-amd64.exe | Bin 0 -> 222208 bytes command/wininst-10.0.exe | Bin 0 -> 190976 bytes 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 command/wininst-10.0-amd64.exe create mode 100644 command/wininst-10.0.exe diff --git a/command/build_ext.py b/command/build_ext.py index 59d0cd2df2..ac37c1320a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -197,7 +197,7 @@ def finalize_options(self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) - if MSVC_VERSION == 9: + if MSVC_VERSION >= 9: # Use the .lib files for the correct architecture if self.plat_name == 'win32': suffix = '' diff --git a/command/wininst-10.0-amd64.exe b/command/wininst-10.0-amd64.exe new file mode 100644 index 0000000000000000000000000000000000000000..6fa0dce16315854223a9fefc3ac9f3cf71730a6a GIT binary patch literal 222208 zcmeFadw5e-zWALs4GqwmqC~2q1gVM^wOSmD1&smAn`IHwx-pF zZIn6VT+W%BGrluk#!=6l87z#Kh9YgbUq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10.0.exe new file mode 100644 index 0000000000000000000000000000000000000000..afc3bc6c14847283f32f53327184c6c2806efe0a GIT binary patch literal 190976 zcmeFaeSB2awKqO*Nro^mgCr0kLX@Nh2W@mf6DHW4rdgaoXZPN%-mqT;31v&a30^%lpxNc?*|R zEAI`zI=_fyU*va03hezQ(;gMS&&SmdA z9=720ROHwf1I-`EH zK2xWgWYFmjtFg16$J>VgLc|eQD2!m5PLIIQTjv88!NeavYNX^Q21u}!fxQP`6sha( zH0ZWbpwOu69Z!L8{_DQppv(Q{Bo@1UuYsr<`U9QYK)|K`uI27t$02cF4uFU*sw*}A zu)jQ=ZsoOgtM26P)ahP)8VOYQ-{U=HBw`mBa;*xc%l9I^8|jzfec)?w?bp`T*WHCA zR#((nmxYg$UxRZY_W%CCF| zmaD5@_j4;MI@5JZ_U+fr*NJY6kW~2Zgme{3 z_EJQI+xcH+w16pXX>A1`x(9ZPb z9)8n`WsY`NO*IiE^jIqV0cma#fF1oWAY*$mZ{{;%ZZma9f3T5o@n*ljLg6jSYodDq z^jO0`r|9ewDk5p*Cn)U!Sco*#V3HcOcWh5vbc!5&!_OY3ZJ87 zyFj1RFhEg0UqH!Ti0@)Piywt>DZ+{6eudBShfID%EJg%4LGjWl4x0UGl&KNBfGJWd~I*7ojE0)aw3# zHM|8>hl(QZu8__r&kUj6-4@Z^CAqU)qWiGq&IuI-9|0oKeTslSarFDd>JuLMZyta) zu4nzV)pF?uGO!5vm{<=bL1EUUhNZ|tjiR5NT^;a9u8FvxFCa3RK zy+Pb{7GZ1nRp`K`n|!w#P1bM+!q$BiQ-tI7g6mC>Ey?NL>1QQ8uY$0GvJi^ta4=+@zy85H9#;q;dX2D1jv-|5@FSG z`BIof!R3>}Bp%j%u1wHNh(qbh7J?BD*oM*+23^da)=j6rQj~ZU53SO(x}@~Tx>P$! zWhQ$}`lNLnwc>gED{2!-N0+oNK_eaHlhUDR-0<1c(jnm;<7ZDvOlXW-^W=R&)4yDT%GA-Jc;XFwXyUunL?*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fy);#=)@HyuUyc($m^sw)QRSKkE0ymLno6k!87ly5sL=N9JdT{Uk~3$lK~H3QDH? z_CeXV)y9iL&*Ka^P#vb`ow+Mh)0O_*%+={*mGhIp#Hbv;V$TpA#%s98CMs8s%(^)T z@8e#+h(me7L8AVgd*s#Jz>Cj2PW~DW>&j`$U5@se@`1C0Q?fkNF5~cP#{AXt2Y|Z( z;0n)}JPYKGDdzpTiOSIQ?0fH)ujZVY%ieh&%Z_&hP`3$#EGFZgJWYs;ctA^U(5gi literal 0 HcmV?d00001 From f568de0c10f5d67ef9a91b8609997dbdf4ecce3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:03:48 -0400 Subject: [PATCH 3458/8469] Exclude 'encodings' modules when removing modules from sys.modules. Workaround for #285. (Fixes #285) --HG-- branch : distribute extra : rebase_source : 913eaebbb0971a044d6087dc4faa2fdb4220def2 --- CHANGES.txt | 2 ++ setuptools/sandbox.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f5a729a208..654aacf1f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Support current snapshots of CPython 3.3. * Distribute now recognizes README.rst as a standard, default readme file. +* Exclude 'encodings' modules when removing modules from sys.modules. + Workaround for #285. ------ 0.6.26 diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 8e0c09b5ea..ab2543d96f 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -39,8 +39,14 @@ def run_setup(setup_script, args): finally: pkg_resources.__setstate__(pr_state) sys.modules.update(save_modules) - for key in list(sys.modules): - if key not in save_modules: del sys.modules[key] + # remove any modules imported within the sandbox + del_modules = [ + mod_name for mod_name in sys.modules + if mod_name not in save_modules + # exclude any encodings modules. See #285 + and not mod_name.startswith('encodings.') + ] + map(sys.modules.__delitem__, del_modules) os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv From dea3863e862efe853b36d0f9a532f6a97893a0c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:07:20 -0400 Subject: [PATCH 3459/8469] Update release script to also update versions --HG-- branch : distribute extra : rebase_source : b4091cc3eaa617c2b54387a02294dc8e922255ec --- release.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/release.py b/release.py index 4c9b960d2b..05c072485d 100644 --- a/release.py +++ b/release.py @@ -51,20 +51,21 @@ def get_mercurial_creds(system='https://bitbucket.org', username=None): Credential = collections.namedtuple('Credential', 'username password') return Credential(username, password) -def add_milestone(version=NEXT_VERSION): +def add_milestone_and_version(version=NEXT_VERSION): auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip() headers = { 'Authorization': auth, } base = 'https://api.bitbucket.org' - url = (base + '/1.0/repositories/' - '{repo}/issues/milestones'.format(repo = 'tarek/distribute')) - req = urllib2.Request(url = url, headers = headers, - data='name='+version) - try: - urllib2.urlopen(req) - except Exception as e: - print(e.fp.read()) + for type in 'milestones', 'versions': + url = (base + '/1.0/repositories/{repo}/issues/{type}' + .format(repo = 'tarek/distribute', type=type)) + req = urllib2.Request(url = url, headers = headers, + data='name='+version) + try: + urllib2.urlopen(req) + except Exception as e: + print(e.fp.read()) def bump_versions(): list(map(bump_version, files_with_versions)) From 5132e62a273c53cf5b189e715a3f7d9aad993ea1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:08:24 -0400 Subject: [PATCH 3460/8469] Updated function referenc --HG-- branch : distribute extra : rebase_source : 75f094bf88afa66a81412e29dc9ed8bccec843ba --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 05c072485d..1eb468c1a5 100644 --- a/release.py +++ b/release.py @@ -116,7 +116,7 @@ def do_release(): # push the changes subprocess.check_call(['hg', 'push']) - add_milestone() + add_milestone_and_version() def build_docs(): if os.path.isdir('docs/build'): From adc4fbb184e9b410744cc1c91d4832b2235de2a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:43:21 -0400 Subject: [PATCH 3461/8469] Fixed failing test on Python 2.7.3 (and probably other recent patch releases) --HG-- branch : distribute extra : rebase_source : 02f36e126ad338fb224b0904cce9eca61269ea0a --- distribute.egg-info/entry_points.txt | 124 +++++++++++++------------- setuptools/tests/test_packageindex.py | 10 ++- 2 files changed, 70 insertions(+), 64 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..2965458969 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 3a8808f7ae..5e424dd659 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -4,6 +4,8 @@ import unittest import urllib2 import pkg_resources +import httplib +import distutils.errors import setuptools.package_index from server import IndexServer @@ -66,8 +68,12 @@ def test_bad_url_double_scheme(self): url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' try: index.open_url(url) - except Exception, v: - self.assert_('nonnumeric port' in str(v)) + except distutils.errors.DistutilsError, error: + # Python 2.7.3 + self.assert_('getaddrinfo failed' in str(error)) + except httplib.InvalidURL, error: + # Python 2.7.2 and earlier + self.assert_('nonnumeric port' in str(error)) def test_bad_url_screwy_href(self): index = setuptools.package_index.PackageIndex( From c12a58c82e556d8cba9b4a083d597f0669279185 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:45:54 -0400 Subject: [PATCH 3462/8469] Added tag 0.6.27 for changeset 469c3b948e41 --HG-- branch : distribute extra : rebase_source : 5c2f18fcc28a6d5d7b2d43185ed9832e9fc49f06 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dbe06104fb..93f0176332 100644 --- a/.hgtags +++ b/.hgtags @@ -35,3 +35,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 7fd7b6e30a0effa082baed1c4103a0efa56be98c 0.6.24 6124053afb5c98f11e146ae62049b4c232d50dc5 0.6.25 b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 +469c3b948e41ef28752b3cdf3c7fb9618355ebf5 0.6.27 From 7b49853cb59e15b9c7432584bc57f18b38845333 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 May 2012 15:46:40 -0400 Subject: [PATCH 3463/8469] Bumped to 0.6.28 in preparation for next release. --HG-- branch : distribute extra : rebase_source : eb9a0f08f4b371984517f556638682828e7048b1 --- README.txt | 6 +- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- distribute_setup.py | 2 +- docs/conf.py | 4 +- release.py | 2 +- setup.py | 2 +- 6 files changed, 70 insertions(+), 70 deletions(-) diff --git a/README.txt b/README.txt index fadc7d7935..5d025d6124 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz - $ tar -xzvf distribute-0.6.27.tar.gz - $ cd distribute-0.6.27 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz + $ tar -xzvf distribute-0.6.28.tar.gz + $ cd distribute-0.6.28 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2965458969..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/distribute_setup.py b/distribute_setup.py index b8c4a11d65..59426c1f3d 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.27" +DEFAULT_VERSION = "0.6.28" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 5312272f6b..e7011e26ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.27' +version = '0.6.28' # The full version, including alpha/beta/rc tags. -release = '0.6.27' +release = '0.6.28' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 1eb468c1a5..3ca2445c84 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.27' +VERSION = '0.6.28' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 7fac7f0143..c4351b1e74 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.27" +VERSION = "0.6.28" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 0863f8d2a11e722a31624503f028fca44eb19ee6 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sat, 26 May 2012 03:45:29 +0100 Subject: [PATCH 3464/8469] Implemented PEP 405 (Python virtual environments). --- sysconfig.py | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 16902ca920..977962f748 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -18,6 +18,8 @@ # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +BASE_PREFIX = os.path.normpath(sys.base_prefix) +BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) # Path to the base directory of the project. On Windows the binary may # live in project/PCBuild9. If we're dealing with an x64 Windows build, @@ -39,11 +41,18 @@ # different (hard-wired) directories. # Setup.local is available for Makefile builds including VPATH builds, # Setup.dist is available on Windows -def _python_build(): +def _is_python_source_dir(d): for fn in ("Setup.dist", "Setup.local"): - if os.path.isfile(os.path.join(project_base, "Modules", fn)): + if os.path.isfile(os.path.join(d, "Modules", fn)): return True return False +_sys_home = getattr(sys, '_home', None) +if _sys_home and os.name == 'nt' and _sys_home.lower().endswith('pcbuild'): + _sys_home = os.path.dirname(_sys_home) +def _python_build(): + if _sys_home: + return _is_python_source_dir(_sys_home) + return _is_python_source_dir(project_base) python_build = _python_build() # Calculate the build qualifier flags if they are defined. Adding the flags @@ -74,11 +83,11 @@ def get_python_inc(plat_specific=0, prefix=None): otherwise, this is the path to platform-specific header files (namely pyconfig.h). - If 'prefix' is supplied, use it instead of sys.prefix or - sys.exec_prefix -- i.e., ignore 'plat_specific'. + If 'prefix' is supplied, use it instead of sys.base_prefix or + sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX + prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os.name == "posix": if python_build: # Assume the executable is in the build directory. The @@ -86,11 +95,12 @@ def get_python_inc(plat_specific=0, prefix=None): # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. - base = os.path.dirname(os.path.abspath(sys.executable)) + base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: return base else: - incdir = os.path.join(get_config_var('srcdir'), 'Include') + incdir = os.path.join(_sys_home or get_config_var('srcdir'), + 'Include') return os.path.normpath(incdir) python_dir = 'python' + get_python_version() + build_flags return os.path.join(prefix, "include", python_dir) @@ -115,11 +125,14 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): containing standard Python library modules; otherwise, return the directory for site-specific modules. - If 'prefix' is supplied, use it instead of sys.prefix or - sys.exec_prefix -- i.e., ignore 'plat_specific'. + If 'prefix' is supplied, use it instead of sys.base_prefix or + sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: - prefix = plat_specific and EXEC_PREFIX or PREFIX + if standard_lib: + prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX + else: + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": libpython = os.path.join(prefix, @@ -232,9 +245,9 @@ def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: if os.name == "nt": - inc_dir = os.path.join(project_base, "PC") + inc_dir = os.path.join(_sys_home or project_base, "PC") else: - inc_dir = project_base + inc_dir = _sys_home or project_base else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': @@ -248,7 +261,8 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") + return os.path.join(_sys_home or os.path.dirname(sys.executable), + "Makefile") lib_dir = get_python_lib(plat_specific=0, standard_lib=1) config_file = 'config-{}{}'.format(get_python_version(), build_flags) return os.path.join(lib_dir, config_file, 'Makefile') From 0c18116bf577816e509ed9d150d36a5a9eab36f3 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sat, 26 May 2012 20:36:12 +0100 Subject: [PATCH 3465/8469] Addressed some buildbot errors and comments on the checkin by Antoine on python-dev. --- sysconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 977962f748..59315f7279 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -47,7 +47,8 @@ def _is_python_source_dir(d): return True return False _sys_home = getattr(sys, '_home', None) -if _sys_home and os.name == 'nt' and _sys_home.lower().endswith('pcbuild'): +if _sys_home and os.name == 'nt' and \ + _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')): _sys_home = os.path.dirname(_sys_home) def _python_build(): if _sys_home: From da98f1c9ec9114743a3cacfad74a5ec37ac2281e Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sun, 27 May 2012 17:30:09 +0100 Subject: [PATCH 3466/8469] Fixed _sys_home computation and added diagnostics for Windows buildbot failures. --- sysconfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 59315f7279..e86cb23236 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -50,6 +50,8 @@ def _is_python_source_dir(d): if _sys_home and os.name == 'nt' and \ _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')): _sys_home = os.path.dirname(_sys_home) + if _sys_home.endswith('pcbuild'): # must be amd64 + _sys_home = os.path.dirname(_sys_home) def _python_build(): if _sys_home: return _is_python_source_dir(_sys_home) From 54589c574b5f5acf9ed54dac1e1d0915cb5dc1f0 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Mon, 28 May 2012 22:34:46 +1000 Subject: [PATCH 3467/8469] Issue #14443: Tell rpmbuild to use the correct version of Python --- command/bdist_rpm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 357eaa575e..401bc41872 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -190,7 +190,7 @@ def finalize_options(self): if self.fix_python: self.python = sys.executable else: - self.python = "python" + self.python = "python3" elif self.fix_python: raise DistutilsOptionError( "--python and --fix-python are mutually exclusive options") @@ -320,6 +320,7 @@ def run(self): rpm_cmd.append('-bb') else: rpm_cmd.append('-ba') + rpm_cmd.extend(['--define', '__python %s' % self.python]) if self.rpm3_mode: rpm_cmd.extend(['--define', '_topdir %s' % os.path.abspath(self.rpm_base)]) From 844216fd4e4c528b8064a750ee0ab99f5e987894 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 30 May 2012 22:04:31 +0200 Subject: [PATCH 3468/8469] Bump version to 3.3.0a4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index d39d82eea1..0da0d849f1 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0a3" +__version__ = "3.3.0a4" #--end constants-- From 722052b5dff3066947f2051e4b0dd85166912f85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2012 14:37:45 -0400 Subject: [PATCH 3469/8469] Added improvements to release script to better support other projects (as this script has been copied to keyring). --HG-- branch : distribute extra : rebase_source : e8ffb18f4415c4146b78a9515fe7539e00445e34 --- release.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/release.py b/release.py index 3ca2445c84..487e6d584f 100644 --- a/release.py +++ b/release.py @@ -32,6 +32,16 @@ def get_next_version(): files_with_versions = ('docs/conf.py', 'setup.py', 'release.py', 'README.txt', 'distribute_setup.py') +def get_repo_name(): + """ + Get the repo name from the hgrc default path. + """ + default = subprocess.check_output('hg paths default').strip() + parts = default.split('/') + if parts[-1] == '': + parts.pop() + return '/'.join(parts[-2:]) + def get_mercurial_creds(system='https://bitbucket.org', username=None): """ Return named tuple of username,password in much the same way that @@ -59,12 +69,12 @@ def add_milestone_and_version(version=NEXT_VERSION): base = 'https://api.bitbucket.org' for type in 'milestones', 'versions': url = (base + '/1.0/repositories/{repo}/issues/{type}' - .format(repo = 'tarek/distribute', type=type)) + .format(repo = get_repo_name(), type=type)) req = urllib2.Request(url = url, headers = headers, data='name='+version) try: urllib2.urlopen(req) - except Exception as e: + except urllib2.HTTPError as e: print(e.fp.read()) def bump_versions(): @@ -96,12 +106,14 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) - build_docs() + has_docs = build_docs() if os.path.isdir('./dist'): shutil.rmtree('./dist') - subprocess.check_call([sys.executable, 'setup.py', - '-q', 'egg_info', '-RD', '-b', '', 'sdist', 'register', - 'upload', 'upload_docs']) + cmd = [sys.executable, 'setup.py', '-q', 'egg_info', '-RD', '-b', '', + 'sdist', 'register', 'upload'] + if has_docs: + cmd.append('upload_docs') + subprocess.check_call(cmd) upload_bootstrap_script() # update to the tip for the next operation @@ -119,6 +131,8 @@ def do_release(): add_milestone_and_version() def build_docs(): + if not os.path.isdir('docs'): + return if os.path.isdir('docs/build'): shutil.rmtree('docs/build') subprocess.check_call([ @@ -129,6 +143,7 @@ def build_docs(): 'build/html', ], cwd='docs') + return True def upload_bootstrap_script(): scp_command = 'pscp' if sys.platform.startswith('win') else 'scp' From d169177b19658f115db80d62c91593ca19bb5ee6 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Fri, 15 Jun 2012 10:12:17 +0200 Subject: [PATCH 3470/8469] pep8ify distribute_setup.py --HG-- branch : distribute extra : rebase_source : fdbb225bc46a65df53b248d75d62c3e3f744bdd7 --- distribute_setup.py | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 59426c1f3d..8f5b0637bf 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -144,7 +144,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, except ImportError: return _do_download(version, download_base, to_dir, download_delay) try: - pkg_resources.require("distribute>="+version) + pkg_resources.require("distribute>=" + version) return except pkg_resources.VersionConflict: e = sys.exc_info()[1] @@ -167,6 +167,7 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, if not no_fake: _create_fake_setuptools_pkg_info(to_dir) + def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): """Download distribute from a specified location and return its filename @@ -203,6 +204,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, dst.close() return os.path.realpath(saveto) + def _no_sandbox(function): def __no_sandbox(*args, **kw): try: @@ -227,6 +229,7 @@ def violation(*args): return __no_sandbox + def _patch_file(path, content): """Will backup the file then patch it""" existing_content = open(path).read() @@ -245,15 +248,18 @@ def _patch_file(path, content): _patch_file = _no_sandbox(_patch_file) + def _same_content(path, content): return open(path).read() == content + def _rename_path(path): new_name = path + '.OLD.%s' % time.time() log.warn('Renaming %s into %s', path, new_name) os.rename(path, new_name) return new_name + def _remove_flat_installation(placeholder): if not os.path.isdir(placeholder): log.warn('Unkown installation at %s', placeholder) @@ -289,11 +295,13 @@ def _remove_flat_installation(placeholder): _remove_flat_installation = _no_sandbox(_remove_flat_installation) + def _after_install(dist): log.warn('After install bootstrap.') placeholder = dist.get_command_obj('install').install_purelib _create_fake_setuptools_pkg_info(placeholder) + def _create_fake_setuptools_pkg_info(placeholder): if not placeholder or not os.path.exists(placeholder): log.warn('Could not find the install location') @@ -324,7 +332,10 @@ def _create_fake_setuptools_pkg_info(placeholder): finally: f.close() -_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info) +_create_fake_setuptools_pkg_info = _no_sandbox( + _create_fake_setuptools_pkg_info +) + def _patch_egg_dir(path): # let's check if it's already patched @@ -346,6 +357,7 @@ def _patch_egg_dir(path): _patch_egg_dir = _no_sandbox(_patch_egg_dir) + def _before_install(): log.warn('Before install bootstrap.') _fake_setuptools() @@ -354,7 +366,7 @@ def _before_install(): def _under_prefix(location): if 'install' not in sys.argv: return True - args = sys.argv[sys.argv.index('install')+1:] + args = sys.argv[sys.argv.index('install') + 1:] for index, arg in enumerate(args): for option in ('--root', '--prefix'): if arg.startswith('%s=' % option): @@ -362,7 +374,7 @@ def _under_prefix(location): return location.startswith(top_dir) elif arg == option: if len(args) > index: - top_dir = args[index+1] + top_dir = args[index + 1] return location.startswith(top_dir) if arg == '--user' and USER_SITE is not None: return location.startswith(USER_SITE) @@ -379,11 +391,14 @@ def _fake_setuptools(): return ws = pkg_resources.working_set try: - setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools', - replacement=False)) + setuptools_dist = ws.find( + pkg_resources.Requirement.parse('setuptools', replacement=False) + ) except TypeError: # old distribute API - setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools')) + setuptools_dist = ws.find( + pkg_resources.Requirement.parse('setuptools') + ) if setuptools_dist is None: log.warn('No setuptools distribution found') @@ -425,7 +440,8 @@ def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process # pip marker to avoid a relaunch bug - if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']: + _cmd = ['-c', 'install', '--single-version-externally-managed'] + if sys.argv[:3] == _cmd: sys.argv[0] = 'setup.py' args = [sys.executable] + sys.argv sys.exit(subprocess.call(args)) @@ -451,7 +467,7 @@ def _extractall(self, path=".", members=None): # Extract directories with a safe mode. directories.append(tarinfo) tarinfo = copy.copy(tarinfo) - tarinfo.mode = 448 # decimal for oct 0700 + tarinfo.mode = 448 # decimal for oct 0700 self.extract(tarinfo, path) # Reverse sort directories. @@ -477,16 +493,18 @@ def sorter(dir1, dir2): else: self._dbg(1, "tarfile: %s" % e) + def _build_install_args(argv): install_args = [] user_install = '--user' in argv - if user_install and sys.version_info < (2,6): + if user_install and sys.version_info < (2, 6): log.warn("--user requires Python 2.6 or later") raise SystemExit(1) if user_install: install_args.append('--user') return install_args + def main(argv, version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" tarball = download_setuptools() From ec81bfe54962ae4f902e8536b5841e11402a6505 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 22 Jun 2012 23:33:19 -0400 Subject: [PATCH 3471/8469] find .dist-info distributions as well --HG-- branch : distribute extra : rebase_source : 9ec6872c031166c66743ee87d7018161aa415fb1 --- pkg_resources.py | 61 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index a61c0efe1c..350a50ef22 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -15,6 +15,7 @@ import sys, os, zipimport, time, re, imp, types from urlparse import urlparse, urlunparse +from email.parser import Parser try: frozenset @@ -1746,7 +1747,7 @@ def find_on_path(importer, path_item, only=False): # scan for .egg and .egg-info in directory for entry in os.listdir(path_item): lower = entry.lower() - if lower.endswith('.egg-info'): + if lower.endswith('.egg-info') or lower.endswith('.dist-info'): fullpath = os.path.join(path_item, entry) if os.path.isdir(fullpath): # egg-info directory, allow getting metadata @@ -2119,6 +2120,8 @@ def _remove_md5_fragment(location): class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" + PKG_INFO = 'PKG-INFO' + def __init__(self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence = EGG_DIST @@ -2136,12 +2139,14 @@ def __init__(self, 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 (".egg",".egg-info"): + if ext.lower() in _distributionImpl: + # .dist-info gets much metadata differently match = EGG_NAME(basename) if match: project_name, version, py_version, platform = match.group( '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 @@ -2204,13 +2209,13 @@ def version(self): try: return self._version except AttributeError: - for line in self._get_metadata('PKG-INFO'): + 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: raise ValueError( - "Missing 'Version:' header and/or PKG-INFO file", self + "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self ) version = property(version) @@ -2441,6 +2446,54 @@ def extras(self): extras = property(extras) +class DistInfoDistribution(Distribution): + """Wrap an actual or potential sys.path entry w/metadata, .dist-info style""" + PKG_INFO = 'METADATA' + + @property + def _parsed_pkg_info(self): + """Parse and cache metadata""" + try: + return self._pkg_info + except AttributeError: + self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) + return self._pkg_info + + @property + def _dep_map(self): + try: + return self.__dep_map + except AttributeError: + dm = self.__dep_map = {None: []} + # Including condition expressions + # XXX parse condition expressions, extras + reqs = self._parsed_pkg_info.get_all('Requires-Dist') +# extras = self._parsed_pkg_info.get_all('Provides-Extra') or [] +# for extra,reqs in split_sections(self._get_metadata(name)): +# if extra: extra = safe_extra(extra) + dm.setdefault(None,[]).extend(parse_requirements(reqs)) + return dm + + def requires(self,extras=()): + """List of Requirements needed for this distro if `extras` are used""" + dm = self._dep_map + deps = [] + deps.extend(dm.get(None,())) + for ext in extras: + try: + deps.extend(dm[safe_extra(ext)]) + except KeyError: + raise UnknownExtra( + "%s has no such extra feature %r" % (self, ext) + ) + return deps + + +_distributionImpl = {'.egg': Distribution, + '.egg-info': Distribution, + '.dist-info': DistInfoDistribution } + + def issue_warning(*args,**kw): level = 1 g = globals() From e562c287d7ac8c6e0f1d3642db817f049a7a6dd6 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 23 Jun 2012 16:02:19 -0700 Subject: [PATCH 3472/8469] Issue #13590: Improve support for OS X Xcode 4: - Try to avoid building Python or extension modules with problematic llvm-gcc compiler. - Since Xcode 4 removes ppc support, extension module builds now check for ppc compiler support and automatically remove ppc and ppc64 archs when not available. - Since Xcode 4 no longer install SDKs in default locations, extension module builds now revert to using installed headers and libs if the SDK used to build the interpreter is not available. - Update ./configure to use better defaults for universal builds; in particular, --enable-universalsdk=yes uses the Xcode default SDK and --with-universal-archs now defaults to "intel" if ppc not available. --- sysconfig.py | 147 ++++++++++++++++++++++++++++++++++++----------- unixccompiler.py | 21 +++++-- 2 files changed, 131 insertions(+), 37 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index e86cb23236..dac3035f1b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -162,7 +162,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) -_USE_CLANG = None + def customize_compiler(compiler): """Do any platform-specific customization of a CCompiler instance. @@ -177,36 +177,7 @@ def customize_compiler(compiler): newcc = None if 'CC' in os.environ: - newcc = os.environ['CC'] - elif sys.platform == 'darwin' and cc == 'gcc-4.2': - # Issue #13590: - # Since Apple removed gcc-4.2 in Xcode 4.2, we can no - # longer assume it is available for extension module builds. - # If Python was built with gcc-4.2, check first to see if - # it is available on this system; if not, try to use clang - # instead unless the caller explicitly set CC. - global _USE_CLANG - if _USE_CLANG is None: - from distutils import log - from subprocess import Popen, PIPE - p = Popen("! type gcc-4.2 && type clang && exit 2", - shell=True, stdout=PIPE, stderr=PIPE) - p.wait() - if p.returncode == 2: - _USE_CLANG = True - log.warn("gcc-4.2 not found, using clang instead") - else: - _USE_CLANG = False - if _USE_CLANG: - newcc = 'clang' - if newcc: - # On OS X, if CC is overridden, use that as the default - # command for LDSHARED as well - if (sys.platform == 'darwin' - and 'LDSHARED' not in os.environ - and ldshared.startswith(cc)): - ldshared = newcc + ldshared[len(cc):] - cc = newcc + cc = os.environ['CC'] if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: @@ -522,6 +493,29 @@ def _init_os2(): _config_vars = g +def _read_output(commandstring): + """ + Returns os.popen(commandstring, "r").read(), but + without actually using os.popen because that + function is not usable during python bootstrap + """ + # NOTE: tempfile is also not useable during + # bootstrap + import contextlib + try: + import tempfile + fp = tempfile.NamedTemporaryFile() + except ImportError: + fp = open("/tmp/distutils.%s"%( + os.getpid(),), "w+b") + + with contextlib.closing(fp) as fp: + cmd = "%s >'%s'"%(commandstring, fp.name) + os.system(cmd) + data = fp.read() + + return data.decode('utf-8') + def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes @@ -561,9 +555,70 @@ def get_config_vars(*args): _config_vars['srcdir'] = os.path.normpath(srcdir) if sys.platform == 'darwin': + from distutils.spawn import find_executable + kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) + # Issue #13590: + # The OSX location for the compiler varies between OSX + # (or rather Xcode) releases. With older releases (up-to 10.5) + # the compiler is in /usr/bin, with newer releases the compiler + # can only be found inside Xcode.app if the "Command Line Tools" + # are not installed. + # + # Futhermore, the compiler that can be used varies between + # Xcode releases. Upto Xcode 4 it was possible to use 'gcc-4.2' + # as the compiler, after that 'clang' should be used because + # gcc-4.2 is either not present, or a copy of 'llvm-gcc' that + # miscompiles Python. + + # skip checks if the compiler was overriden with a CC env variable + if 'CC' not in os.environ: + cc = oldcc = _config_vars['CC'] + if not find_executable(cc): + # Compiler is not found on the shell search PATH. + # Now search for clang, first on PATH (if the Command LIne + # Tools have been installed in / or if the user has provided + # another location via CC). If not found, try using xcrun + # to find an uninstalled clang (within a selected Xcode). + + # NOTE: Cannot use subprocess here because of bootstrap + # issues when building Python itself (and os.popen is + # implemented on top of subprocess and is therefore not + # usable as well) + + data = (find_executable('clang') or + _read_output( + "/usr/bin/xcrun -find clang 2>/dev/null").strip()) + if not data: + raise DistutilsPlatformError( + "Cannot locate working compiler") + + _config_vars['CC'] = cc = data + _config_vars['CXX'] = cc + '++' + + elif os.path.basename(cc).startswith('gcc'): + # Compiler is GCC, check if it is LLVM-GCC + data = _read_output("'%s' --version 2>/dev/null" + % (cc.replace("'", "'\"'\"'"),)) + if 'llvm-gcc' in data: + # Found LLVM-GCC, fall back to clang + data = (find_executable('clang') or + _read_output( + "/usr/bin/xcrun -find clang 2>/dev/null").strip()) + if find_executable(data): + _config_vars['CC'] = cc = data + _config_vars['CXX'] = cc + '++' + + if (cc != oldcc + and 'LDSHARED' in _config_vars + and 'LDSHARED' not in os.environ): + # modify LDSHARED if we modified CC + ldshared = _config_vars['LDSHARED'] + if ldshared.startswith(oldcc): + _config_vars['LDSHARED'] = cc + ldshared[len(oldcc):] + if major_version < 8: # On Mac OS X before 10.4, check if -arch and -isysroot # are in CFLAGS or LDFLAGS and remove them if they are. @@ -579,19 +634,45 @@ def get_config_vars(*args): _config_vars[key] = flags else: + # Different Xcode releases support different sets for '-arch' + # flags. In particular, Xcode 4.x no longer supports the + # PPC architectures. + # + # This code automatically removes '-arch ppc' and '-arch ppc64' + # when these are not supported. That makes it possible to + # build extensions on OSX 10.7 and later with the prebuilt + # 32-bit installer on the python.org website. + flags = _config_vars['CFLAGS'] + if re.search('-arch\s+ppc', flags) is not None: + # NOTE: Cannot use subprocess here because of bootstrap + # issues when building Python itself + status = os.system("'%s' -arch ppc -x c /dev/null 2>/dev/null"%( + _config_vars['CC'].replace("'", "'\"'\"'"),)) + + if status != 0: + # Compiler doesn't support PPC, remove the related + # '-arch' flags. + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED', 'LDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-arch\s+ppc\w*\s', ' ', flags) + _config_vars[key] = flags + # Allow the user to override the architecture flags using # an environment variable. # NOTE: This name was introduced by Apple in OSX 10.5 and # is used by several scripting languages distributed with # that OS release. - if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] for key in ('LDFLAGS', 'BASECFLAGS', # a number of derived variables. These need to be # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED', 'LDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) diff --git a/unixccompiler.py b/unixccompiler.py index c70a3cc555..5d45faa741 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -83,9 +83,8 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass - # Check if the SDK that is used during compilation actually exists, - # the universal build requires the usage of a universal SDK and not all - # users have that installed by default. + # Check if the SDK that is used during compilation actually exists. + # If not, revert to using the installed headers and hope for the best. sysroot = None if '-isysroot' in cc_args: idx = cc_args.index('-isysroot') @@ -97,7 +96,21 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if sysroot and not os.path.isdir(sysroot): log.warn("Compiling with an SDK that doesn't seem to exist: %s", sysroot) - log.warn("Please check your Xcode installation") + log.warn("Attempting to compile without the SDK") + while True: + try: + index = cc_args.index('-isysroot') + # Strip this argument and the next one: + del cc_args[index:index+2] + except ValueError: + break + while True: + try: + index = compiler_so.index('-isysroot') + # Strip this argument and the next one: + del compiler_so[index:index+2] + except ValueError: + break return compiler_so From 4e6c91d7daf073463c531f79dbd4f4bf4b6898b7 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 25 Jun 2012 15:52:24 -0400 Subject: [PATCH 3473/8469] Issue #14443: ensure that brp-python-bytecompile is invoked with the correct python executable The __os_install_macro defines some post-processing activities during an rpm build; one of the scripts it calls is brp-python-bytecompile, which can take an argument: the python executable with which to byte-compile .py files in the package payload. In some older versions of rpm (e.g. in RHEL 6), this invocation doesn't pass in an argument, and brp-python-bytecompile defaults to using /usr/bin/python, which can lead to the .py files being byte-compiled for the wrong version of python. This has been fixed in later versions of rpm by passing in %{__python} as an argument to brp-python-bytecompile. Workaround this by detecting if __os_install_post has a 0-argument invocation of brp-python-bytecompile, and if so generating an equivalent macro that has the argument, and explicitly provide the new definition within the specfile. --- command/bdist_rpm.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 401bc41872..ac4621791d 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -import sys, os +import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform @@ -406,6 +406,21 @@ def _make_spec_file(self): 'Summary: ' + self.distribution.get_description(), ] + # Workaround for #14443 which affects some RPM based systems such as + # RHEL6 (and probably derivatives) + vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}') + # Generate a potential replacement value for __os_install_post (whilst + # normalizing the whitespace to simplify the test for whether the + # invocation of brp-python-bytecompile passes in __python): + vendor_hook = '\n'.join([' %s \\' % line.strip() + for line in vendor_hook.splitlines()]) + problem = "brp-python-bytecompile \\\n" + fixed = "brp-python-bytecompile %{__python} \\\n" + fixed_hook = vendor_hook.replace(problem, fixed) + if fixed_hook != vendor_hook: + spec_file.append('# Workaround for http://bugs.python.org/issue14443') + spec_file.append('%define __os_install_post ' + fixed_hook + '\n') + # put locale summaries into spec file # XXX not supported for now (hard to put a dictionary # in a config file -- arg!) From 998406eedde8ea6686e42f77eb0e7c82486c874f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 26 Jun 2012 09:43:40 +0200 Subject: [PATCH 3474/8469] Bump version to 3.3.0b1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0da0d849f1..7a7b8d6cb1 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0a4" +__version__ = "3.3.0b1" #--end constants-- From 2b4009c75e8ca5cb092424a21a53cbf2e231ea8d Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 26 Jun 2012 14:06:23 -0400 Subject: [PATCH 3475/8469] Issue #14443: ensure that brp-python-bytecompile is invoked with the correct python executable The __os_install_macro defines some post-processing activities during an rpm build; one of the scripts it calls is brp-python-bytecompile, which can take an argument: the python executable with which to byte-compile .py files in the package payload. In some older versions of rpm (e.g. in RHEL 6), this invocation doesn't pass in an argument, and brp-python-bytecompile defaults to using /usr/bin/python, which can lead to the .py files being byte-compiled for the wrong version of python. This has been fixed in later versions of rpm by passing in %{__python} as an argument to brp-python-bytecompile. Workaround this by detecting if __os_install_post has a 0-argument invocation of brp-python-bytecompile, and if so generating an equivalent macro that has the argument, and explicitly provide the new definition within the specfile. --- command/bdist_rpm.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 401bc41872..ac4621791d 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -3,7 +3,7 @@ Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" -import sys, os +import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform @@ -406,6 +406,21 @@ def _make_spec_file(self): 'Summary: ' + self.distribution.get_description(), ] + # Workaround for #14443 which affects some RPM based systems such as + # RHEL6 (and probably derivatives) + vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}') + # Generate a potential replacement value for __os_install_post (whilst + # normalizing the whitespace to simplify the test for whether the + # invocation of brp-python-bytecompile passes in __python): + vendor_hook = '\n'.join([' %s \\' % line.strip() + for line in vendor_hook.splitlines()]) + problem = "brp-python-bytecompile \\\n" + fixed = "brp-python-bytecompile %{__python} \\\n" + fixed_hook = vendor_hook.replace(problem, fixed) + if fixed_hook != vendor_hook: + spec_file.append('# Workaround for http://bugs.python.org/issue14443') + spec_file.append('%define __os_install_post ' + fixed_hook + '\n') + # put locale summaries into spec file # XXX not supported for now (hard to put a dictionary # in a config file -- arg!) From 311fb781f87f8885d9a94343b4b7e9731bc0c9e7 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 26 Jun 2012 15:15:27 -0700 Subject: [PATCH 3476/8469] Add tests and fix for marshal.load of pyc files on Python 3.3 Fixes https://bitbucket.org/tarek/distribute/issue/283/bdist_egg-issues-with-python-330ax --HG-- branch : distribute extra : rebase_source : ec6f2611d3f8a54b7e11cfadf9d03fdcdef39639 --- setuptools/command/bdist_egg.py | 6 +++++- tests/python3.3_bdist_egg_test/module.py | 0 tests/python3.3_bdist_egg_test/setup.py | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/python3.3_bdist_egg_test/module.py create mode 100644 tests/python3.3_bdist_egg_test/setup.py diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 68ca15c799..0ee9c55b86 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -426,7 +426,11 @@ def scan_module(egg_dir, base, name, stubs): pkg = base[len(egg_dir)+1:].replace(os.sep,'.') module = pkg+(pkg and '.' or '')+os.path.splitext(name)[0] f = open(filename,'rb'); f.read(8) # skip magic & date - code = marshal.load(f); f.close() + try: + code = marshal.load(f); f.close() + except ValueError: + f.seek(0); f.read(12) # skip magic & date & file size; file size added in Python 3.3 + code = marshal.load(f); f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: diff --git a/tests/python3.3_bdist_egg_test/module.py b/tests/python3.3_bdist_egg_test/module.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/python3.3_bdist_egg_test/setup.py b/tests/python3.3_bdist_egg_test/setup.py new file mode 100644 index 0000000000..04caea7434 --- /dev/null +++ b/tests/python3.3_bdist_egg_test/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +setup( + name='python3.3_bdist_egg_test', + version='0.0.0', + description='Test', + license='BSD', + py_modules=['module'], + author='Marc Abramowitz', + author_email='marc@marc-abramowitz.com', + url='https://bitbucket.org/msabramo/python3.3_bdist_egg_test', + # zip_safe=False, +) From 921b93fec344e0f75c80eff3cc8754215669f210 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 29 Jun 2012 01:05:26 +0200 Subject: [PATCH 3477/8469] Issue #10571: Fix the "--sign" option of distutils' upload command. Patch by Jakub Wilk. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 4926aa3e15..8b36851d25 100644 --- a/command/upload.py +++ b/command/upload.py @@ -125,7 +125,7 @@ def upload_file(self, command, pyversion, filename): if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", - open(filename+".asc").read()) + open(filename+".asc", "rb").read()) # set up the authentication user_pass = (self.username + ":" + self.password).encode('ascii') From ac2bc6ee75884f521d9097b83315adf413ff2a7c Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 29 Jun 2012 03:50:45 -0400 Subject: [PATCH 3478/8469] implement environment markers --HG-- branch : distribute extra : rebase_source : 16af7be95f787ab5de573388270b97cda6c9cea7 --- pkg_resources.py | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 350a50ef22..5e3967f393 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -15,7 +15,6 @@ import sys, os, zipimport, time, re, imp, types from urlparse import urlparse, urlunparse -from email.parser import Parser try: frozenset @@ -2456,6 +2455,7 @@ def _parsed_pkg_info(self): try: return self._pkg_info except AttributeError: + from email.parser import Parser self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) return self._pkg_info @@ -2464,15 +2464,41 @@ def _dep_map(self): try: return self.__dep_map except AttributeError: - dm = self.__dep_map = {None: []} - # Including condition expressions - # XXX parse condition expressions, extras - reqs = self._parsed_pkg_info.get_all('Requires-Dist') -# extras = self._parsed_pkg_info.get_all('Provides-Extra') or [] -# for extra,reqs in split_sections(self._get_metadata(name)): -# if extra: extra = safe_extra(extra) - dm.setdefault(None,[]).extend(parse_requirements(reqs)) - return dm + self.__dep_map = self._compute_dependencies() + return self.__dep_map + + def _compute_dependencies(self): + """Recompute this distribution's dependencies.""" + def dummy_marker(marker): + def marker_fn(environment=None, override=None): + return True + return marker_fn + try: + from wheel.markers import as_function + except ImportError: + as_function = dummy_marker + dm = self.__dep_map = {None: []} + + reqs = [] + # Including any condition expressions + for req in self._parsed_pkg_info.get_all('Requires-Dist'): + rs = req.split(';', 1) + [''] + parsed = parse_requirements(rs[0]).next() + parsed.marker_fn = as_function(rs[1].strip()) + reqs.append(parsed) + + def reqs_for_extra(extra): + for req in reqs: + if req.marker_fn(override={'extra':extra}): + yield req + + common = set(reqs_for_extra(None)) + dm[None].extend(common) + + for extra in self._parsed_pkg_info.get_all('Provides-Extra'): + dm[extra] = list(set(reqs_for_extra(extra)) - common) + + return dm def requires(self,extras=()): """List of Requirements needed for this distro if `extras` are used""" From 07f0901db42f1bc5d411868e92e7e77d27f90323 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 29 Jun 2012 04:11:44 -0400 Subject: [PATCH 3479/8469] use markerlib --HG-- branch : distribute extra : rebase_source : a684fafb1aeb44954bdb8604a77fcc8d1549648c --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5e3967f393..dea544907b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2474,7 +2474,7 @@ def marker_fn(environment=None, override=None): return True return marker_fn try: - from wheel.markers import as_function + from markerlib import as_function except ImportError: as_function = dummy_marker dm = self.__dep_map = {None: []} From d87cabbf4cf11c0049c95d3359fc249b002b542e Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 29 Jun 2012 19:48:39 -0400 Subject: [PATCH 3480/8469] add missing == to prefix-less Requires-Dist version specifiers --HG-- branch : distribute extra : rebase_source : 131e2f27792688da5dd1f8bf984939ab51403a64 --- pkg_resources.py | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index dea544907b..10c8aff5c8 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2466,12 +2466,36 @@ def _dep_map(self): except AttributeError: self.__dep_map = self._compute_dependencies() return self.__dep_map + + def _preparse_requirement(self, requires_dist): + """Return (dist, versions, marker). + Add == prefix to version specifiers as necessary. + """ + m = re.compile(r"^(?P.*?)\s*(\((?P.*?)\))?\s*(;\s*(?P.*))?$") + match = m.match(requires_dist) + if not match: + raise ValueError("Unexpected Requires-Dist: %s" % requires_dist) + dist = match.group('d') + if match.group('v'): + vers = match.group('v').split(',') + else: + vers = [] + mark = match.group('m') or '' + for i, v in enumerate(vers): + if not VERSION(v): + v = "==%s" % v + if not VERSION(v): + raise ValueError("Unexpected version: (%s)" % + match.group('v')) + vers[i] = v + return (dist, ', '.join(vers), mark) def _compute_dependencies(self): """Recompute this distribution's dependencies.""" def dummy_marker(marker): def marker_fn(environment=None, override=None): return True + marker_fn.__doc__ = marker return marker_fn try: from markerlib import as_function @@ -2481,10 +2505,10 @@ def marker_fn(environment=None, override=None): reqs = [] # Including any condition expressions - for req in self._parsed_pkg_info.get_all('Requires-Dist'): - rs = req.split(';', 1) + [''] - parsed = parse_requirements(rs[0]).next() - parsed.marker_fn = as_function(rs[1].strip()) + for req in self._parsed_pkg_info.get_all('Requires-Dist'): + dist, vers, mark = self._preparse_requirement(req) + parsed = parse_requirements("%s %s" % (dist, vers)).next() + parsed.marker_fn = as_function(mark) reqs.append(parsed) def reqs_for_extra(extra): @@ -2492,11 +2516,12 @@ def reqs_for_extra(extra): if req.marker_fn(override={'extra':extra}): yield req - common = set(reqs_for_extra(None)) + common = set(reqs_for_extra(None)) dm[None].extend(common) for extra in self._parsed_pkg_info.get_all('Provides-Extra'): - dm[extra] = list(set(reqs_for_extra(extra)) - common) + extra = safe_extra(extra.strip()) + dm[extra] = list(set(reqs_for_extra(extra)) - common) return dm From 9b885a3c4843c3985413181a6d18b18ce015cdce Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 30 Jun 2012 08:52:43 -0400 Subject: [PATCH 3481/8469] simplify Requires-Dist pre-parser --HG-- branch : distribute extra : rebase_source : 10900b24f80bc412881812fcea4e54e473a86068 --- pkg_resources.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 10c8aff5c8..20513dc708 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2448,6 +2448,7 @@ def extras(self): class DistInfoDistribution(Distribution): """Wrap an actual or potential sys.path entry w/metadata, .dist-info style""" PKG_INFO = 'METADATA' + EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])") @property def _parsed_pkg_info(self): @@ -2471,24 +2472,12 @@ def _preparse_requirement(self, requires_dist): """Return (dist, versions, marker). Add == prefix to version specifiers as necessary. """ - m = re.compile(r"^(?P.*?)\s*(\((?P.*?)\))?\s*(;\s*(?P.*))?$") - match = m.match(requires_dist) - if not match: - raise ValueError("Unexpected Requires-Dist: %s" % requires_dist) - dist = match.group('d') - if match.group('v'): - vers = match.group('v').split(',') - else: - vers = [] - mark = match.group('m') or '' - for i, v in enumerate(vers): - if not VERSION(v): - v = "==%s" % v - if not VERSION(v): - raise ValueError("Unexpected version: (%s)" % - match.group('v')) - vers[i] = v - return (dist, ', '.join(vers), mark) + parts = requires_dist.split(';', 1) + [''] + distvers = parts[0].strip() + mark = parts[1].strip() + distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers) + distvers = distvers.replace('(', '').replace(')', '') + return (distvers, mark) def _compute_dependencies(self): """Recompute this distribution's dependencies.""" @@ -2506,8 +2495,8 @@ def marker_fn(environment=None, override=None): reqs = [] # Including any condition expressions for req in self._parsed_pkg_info.get_all('Requires-Dist'): - dist, vers, mark = self._preparse_requirement(req) - parsed = parse_requirements("%s %s" % (dist, vers)).next() + distvers, mark = self._preparse_requirement(req) + parsed = parse_requirements(distvers).next() parsed.marker_fn = as_function(mark) reqs.append(parsed) From 7afb6a596a2d16b4d74b1b890eb9ca44d11197bd Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 30 Jun 2012 09:02:41 -0400 Subject: [PATCH 3482/8469] update docstring --HG-- branch : distribute extra : rebase_source : ee1bf5fd6c851fa3d9c87c1132f0864a811f09e5 --- pkg_resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 20513dc708..652079ecac 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2469,8 +2469,9 @@ def _dep_map(self): return self.__dep_map def _preparse_requirement(self, requires_dist): - """Return (dist, versions, marker). - Add == prefix to version specifiers as necessary. + """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz') + Split environment marker, add == prefix to version specifiers as + necessary, and remove parenthesis. """ parts = requires_dist.split(';', 1) + [''] distvers = parts[0].strip() From 0d5901c018dbccaa9bffc8902796b40a546f7f3d Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 30 Jun 2012 12:34:31 -0400 Subject: [PATCH 3483/8469] handle missing provides-extra or requires-dist --HG-- branch : distribute extra : rebase_source : 99392449586f9f299abfd1627ba60b9752caf26d --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 652079ecac..285aa1bbcb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2495,7 +2495,7 @@ def marker_fn(environment=None, override=None): reqs = [] # Including any condition expressions - for req in self._parsed_pkg_info.get_all('Requires-Dist'): + for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: distvers, mark = self._preparse_requirement(req) parsed = parse_requirements(distvers).next() parsed.marker_fn = as_function(mark) @@ -2509,7 +2509,7 @@ def reqs_for_extra(extra): common = set(reqs_for_extra(None)) dm[None].extend(common) - for extra in self._parsed_pkg_info.get_all('Provides-Extra'): + for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: extra = safe_extra(extra.strip()) dm[extra] = list(set(reqs_for_extra(extra)) - common) From f1f3ff37a4e88ffa90c3821bfc18db2009e1ed3b Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Sat, 30 Jun 2012 20:42:45 +0200 Subject: [PATCH 3484/8469] - Issue #14330: For cross builds, don't use host python, use host search paths for host compiler. --- util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util.py b/util.py index bce840274d..9833bf95c0 100644 --- a/util.py +++ b/util.py @@ -53,6 +53,10 @@ def get_platform (): return 'win-ia64' return sys.platform + # Set for cross builds explicitly + if "_PYTHON_HOST_PLATFORM" in os.environ: + return os.environ["_PYTHON_HOST_PLATFORM"] + if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. From 885b09228b2dc0062a31eede47183bd25983089b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 3 Jul 2012 01:12:42 -0400 Subject: [PATCH 3485/8469] Ignore .nfs* files in distutils (#7719). These files are created by some NFS clients a file is edited and removed concurrently (see added link in doc for more info). If such a file is removed between distutils calls listdir and copy, it will get confused. Other special files are ignored in sdist (namely VCS directories), but this has to be filtered out earlier. --- dir_util.py | 4 ++++ tests/test_dir_util.py | 18 ++++++++++++++++++ tests/test_sdist.py | 7 ++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dir_util.py b/dir_util.py index 9c5cf337c6..5026e24668 100644 --- a/dir_util.py +++ b/dir_util.py @@ -144,6 +144,10 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, src_name = os.path.join(src, n) dst_name = os.path.join(dst, n) + if n.startswith('.nfs'): + # skip NFS rename files + continue + if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) if verbose >= 1: diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 693f77cf64..d82d9133d0 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -101,6 +101,24 @@ def test_copy_tree_verbosity(self): remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) + def test_copy_tree_skips_nfs_temp_files(self): + mkpath(self.target, verbose=0) + + a_file = os.path.join(self.target, 'ok.txt') + nfs_file = os.path.join(self.target, '.nfs123abc') + for f in a_file, nfs_file: + fh = open(f, 'w') + try: + fh.write('some content') + finally: + fh.close() + + copy_tree(self.target, self.target2) + self.assertEqual(os.listdir(self.target2), ['ok.txt']) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + def test_ensure_relative(self): if os.sep == '/': self.assertEqual(ensure_relative('/home/foo'), 'home/foo') diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 3a89f73fa2..7e7d98d096 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -91,9 +91,8 @@ def get_cmd(self, metadata=None): @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): - # this test creates a package with some vcs dirs in it - # and launch sdist to make sure they get pruned - # on all systems + # this test creates a project with some VCS dirs and an NFS rename + # file, then launches sdist to check they get pruned on all systems # creating VCS directories with some files in them os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) @@ -107,6 +106,8 @@ def test_prune_file_list(self): self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '.nfs0001'), 'xxx') + # now building a sdist dist, cmd = self.get_cmd() From 3facc55019acde02d0454008292d6c81c9e1e8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Tue, 3 Jul 2012 01:23:46 -0400 Subject: [PATCH 3486/8469] Create ~/.pypirc securely (#13512). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was a window between the write and the chmod where the user’s password would be exposed, depending on default permissions. Philip Jenvey’s patch fixes it. --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index afa403f2da..9d8b30ea30 100644 --- a/config.py +++ b/config.py @@ -42,7 +42,7 @@ def _get_rc_file(self): def _store_pypirc(self, username, password): """Creates a default .pypirc file.""" rc = self._get_rc_file() - f = open(rc, 'w') + f = os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') try: f.write(DEFAULT_PYPIRC % (username, password)) finally: From a4f8d8fba9c3993b5afbd83cc4b02cded203918b Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 7 Jul 2012 18:10:02 +0200 Subject: [PATCH 3487/8469] Issue 294: Allow to run setup.py from another directory. --HG-- branch : distribute extra : rebase_source : 9219c67abb5791b37822fd67c224a537628c54b9 --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index c4351b1e74..4294f3f96c 100755 --- a/setup.py +++ b/setup.py @@ -4,6 +4,9 @@ import os import textwrap +# Allow to run setup.py from another directory. +os.chdir(os.path.dirname(os.path.abspath(__file__))) + src_root = None if sys.version_info >= (3,): tmp_src = os.path.join("build", "src") From 115c62e6a9a9167633eff93ef0f1a355505a0e5d Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sat, 7 Jul 2012 11:51:13 -0700 Subject: [PATCH 3488/8469] Add a test for Python 3.3 bdist_egg issue --HG-- branch : distribute extra : rebase_source : e83ee69c3b15e4a75780811a7bb3612b8f7f54d1 --- tests/test_python33_bdist_egg.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test_python33_bdist_egg.py diff --git a/tests/test_python33_bdist_egg.py b/tests/test_python33_bdist_egg.py new file mode 100644 index 0000000000..58d9979642 --- /dev/null +++ b/tests/test_python33_bdist_egg.py @@ -0,0 +1,25 @@ +import sys +import os +import tempfile +import unittest +import shutil +import copy + +CURDIR = os.path.abspath(os.path.dirname(__file__)) +TOPDIR = os.path.split(CURDIR)[0] +sys.path.insert(0, TOPDIR) + +from distribute_setup import (use_setuptools, _build_egg, _python_cmd, + _do_download, _install, DEFAULT_URL, + DEFAULT_VERSION) +import distribute_setup + +class TestPython33BdistEgg(unittest.TestCase): + + def test_build_egg(self): + os.chdir(os.path.join(CURDIR, 'python3.3_bdist_egg_test')) + _python_cmd("setup.py", "bdist_egg") + + +if __name__ == '__main__': + unittest.main() From bfd4bf6118d69a70926982c602d411dc6f9ab1d4 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sat, 7 Jul 2012 12:25:37 -0700 Subject: [PATCH 3489/8469] test_python33_bdist_egg.py: Check return value of bdist_egg command --HG-- branch : distribute extra : rebase_source : 1f6c2ebfe44bdb09ee48f49f2cea94edf933e540 --- tests/test_python33_bdist_egg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_python33_bdist_egg.py b/tests/test_python33_bdist_egg.py index 58d9979642..972d01e7b5 100644 --- a/tests/test_python33_bdist_egg.py +++ b/tests/test_python33_bdist_egg.py @@ -18,7 +18,7 @@ class TestPython33BdistEgg(unittest.TestCase): def test_build_egg(self): os.chdir(os.path.join(CURDIR, 'python3.3_bdist_egg_test')) - _python_cmd("setup.py", "bdist_egg") + self.assertTrue(_python_cmd("setup.py", "bdist_egg")) if __name__ == '__main__': From 0a5180da06efb1d3e854cbdfec458968790c3a5e Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sat, 7 Jul 2012 12:29:07 -0700 Subject: [PATCH 3490/8469] Remove unnecessary stuff from test_python33_bdist_egg.py --HG-- branch : distribute extra : rebase_source : 3a993d4c266798501557f338abc8c4cdc2db3c8c --- tests/test_python33_bdist_egg.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/test_python33_bdist_egg.py b/tests/test_python33_bdist_egg.py index 972d01e7b5..9f32470a32 100644 --- a/tests/test_python33_bdist_egg.py +++ b/tests/test_python33_bdist_egg.py @@ -1,18 +1,12 @@ import sys import os -import tempfile import unittest -import shutil -import copy CURDIR = os.path.abspath(os.path.dirname(__file__)) TOPDIR = os.path.split(CURDIR)[0] sys.path.insert(0, TOPDIR) -from distribute_setup import (use_setuptools, _build_egg, _python_cmd, - _do_download, _install, DEFAULT_URL, - DEFAULT_VERSION) -import distribute_setup +from distribute_setup import _python_cmd class TestPython33BdistEgg(unittest.TestCase): From b73bf20cea512d0d95a29db4fd9ed837130c54fc Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 7 Jul 2012 23:24:20 -0400 Subject: [PATCH 3491/8469] test .dist-info distributions --HG-- branch : distribute extra : rebase_source : ea6870d73aa69f2deacc50beb2e257d3c21073e4 --- pkg_resources.py | 16 +-------- setuptools/tests/test_dist_info.py | 55 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 setuptools/tests/test_dist_info.py diff --git a/pkg_resources.py b/pkg_resources.py index 285aa1bbcb..27b9f83451 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2514,21 +2514,7 @@ def reqs_for_extra(extra): dm[extra] = list(set(reqs_for_extra(extra)) - common) return dm - - def requires(self,extras=()): - """List of Requirements needed for this distro if `extras` are used""" - dm = self._dep_map - deps = [] - deps.extend(dm.get(None,())) - for ext in extras: - try: - deps.extend(dm[safe_extra(ext)]) - except KeyError: - raise UnknownExtra( - "%s has no such extra feature %r" % (self, ext) - ) - return deps - + _distributionImpl = {'.egg': Distribution, '.egg-info': Distribution, diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py new file mode 100644 index 0000000000..c40886d3a0 --- /dev/null +++ b/setuptools/tests/test_dist_info.py @@ -0,0 +1,55 @@ +"""Test .dist-info style distributions. +""" +import os, shutil, tempfile, unittest +import pkg_resources +from pkg_resources import Requirement + +class TestDistInfo(unittest.TestCase): + + def test_distinfo(self): + dists = {} + for d in pkg_resources.find_distributions(self.tmpdir): + dists[d.project_name] = d + + unversioned = dists['UnversionedDistribution'] + versioned = dists['VersionedDistribution'] + + assert versioned.version == '2.718' # from filename + assert unversioned.version == '0.3' # from METADATA + + requires = [Requirement.parse('splort==4'), + Requirement.parse('quux>=1.1')] + + for d in (unversioned, versioned): + self.assertEquals(d.requires(), requires[:1]) + self.assertEquals(d.requires(extras=('baz',)), requires) + self.assertEquals(d.extras, ['baz']) + + def setUp(self): + self.tmpdir = tempfile.mkdtemp() + versioned = os.path.join(self.tmpdir, + 'VersionedDistribution-2.718.dist-info') + os.mkdir(versioned) + open(os.path.join(versioned, 'METADATA'), 'w+').write( +"""Metadata-Version: 1.2 +Name: VersionedDistribution +Requires-Dist: splort (4) +Provides-Extra: baz +Requires-Dist: quux (>=1.1); extra == 'baz' +""") + + unversioned = os.path.join(self.tmpdir, + 'UnversionedDistribution.dist-info') + os.mkdir(unversioned) + open(os.path.join(unversioned, 'METADATA'), 'w+').write( +"""Metadata-Version: 1.2 +Name: UnversionedDistribution +Version: 0.3 +Requires-Dist: splort (==4) +Provides-Extra: baz +Requires-Dist: quux (>=1.1); extra == 'baz' +""") + + def tearDown(self): + shutil.rmtree(self.tmpdir) + From c62d8121c4660daa4fd6132643b8e98918faf58f Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 7 Jul 2012 23:34:12 -0400 Subject: [PATCH 3492/8469] improve .dist-info test --HG-- branch : distribute extra : rebase_source : 23b6b4023d413bf1b27b114687da8736a4b38d8b --- setuptools/tests/test_dist_info.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index c40886d3a0..119cc68bcd 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -3,6 +3,11 @@ import os, shutil, tempfile, unittest import pkg_resources from pkg_resources import Requirement +try: + import markerlib + has_markerlib = True +except: + has_markerlib = False class TestDistInfo(unittest.TestCase): @@ -11,19 +16,24 @@ def test_distinfo(self): for d in pkg_resources.find_distributions(self.tmpdir): dists[d.project_name] = d + assert len(dists) == 2, dists + unversioned = dists['UnversionedDistribution'] versioned = dists['VersionedDistribution'] assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - + + @unittest.skipIf(not has_markerlib, + "install markerlib to test conditional dependencies") + def test_conditional_dependencies(self): requires = [Requirement.parse('splort==4'), Requirement.parse('quux>=1.1')] - for d in (unversioned, versioned): + for d in pkg_resources.find_distributions(self.tmpdir): self.assertEquals(d.requires(), requires[:1]) self.assertEquals(d.requires(extras=('baz',)), requires) - self.assertEquals(d.extras, ['baz']) + self.assertEquals(d.extras, ['baz']) def setUp(self): self.tmpdir = tempfile.mkdtemp() From b44cc1ee01fc6742048240e9a2e19a16d3ce41aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 10 Jul 2012 07:07:06 +0200 Subject: [PATCH 3493/8469] Issue #15315: Support VS 2010 in distutils cygwincompiler. --- cygwinccompiler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 819e1a97be..0bdd539c37 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -78,6 +78,9 @@ def get_msvcr(): elif msc_ver == '1500': # VS2008 / MSVC 9.0 return ['msvcr90'] + elif msc_ver == '1600': + # VS2010 / MSVC 10.0 + return ['msvcr100'] else: raise ValueError("Unknown MS Compiler version %s " % msc_ver) From 12c0d7f3e916957294a095a8425554fe8413e42e Mon Sep 17 00:00:00 2001 From: Jim Fulton Date: Sat, 14 Jul 2012 14:25:06 -0400 Subject: [PATCH 3494/8469] Issue #283 bdist_egg issues with python 3.3.0aX --HG-- branch : distribute extra : rebase_source : 3173cb1ab5550635b8565767059701ab2649ac19 --- CHANGES.txt | 6 +++ setuptools/command/bdist_egg.py | 2 + setuptools/tests/test_bdist_egg.py | 69 ++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 setuptools/tests/test_bdist_egg.py diff --git a/CHANGES.txt b/CHANGES.txt index 2707f01cdc..a58c1ce16d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.28 +------ + +* Issue #283 bdist_egg issues with python 3.3.0aX + ------ 0.6.27 ------ diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 68ca15c799..a9d98d3b70 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -459,6 +459,8 @@ def iter_symbols(code): yield name def can_scan(): + if sys.version_info > (3, 3): + return False # Can't scan recent formats if not sys.platform.startswith('java') and sys.platform != 'cli': # CPython, PyPy, etc. return True diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py new file mode 100644 index 0000000000..7da122cc31 --- /dev/null +++ b/setuptools/tests/test_bdist_egg.py @@ -0,0 +1,69 @@ +"""develop tests +""" +import sys +import os, re, shutil, tempfile, unittest +import tempfile +import site +from StringIO import StringIO + +from distutils.errors import DistutilsError +from setuptools.command.bdist_egg import bdist_egg +from setuptools.command import easy_install as easy_install_pkg +from setuptools.dist import Distribution + +SETUP_PY = """\ +from setuptools import setup + +setup(name='foo', py_modules=['hi']) +""" + +class TestDevelopTest(unittest.TestCase): + + def setUp(self): + self.dir = tempfile.mkdtemp() + self.old_cwd = os.getcwd() + os.chdir(self.dir) + f = open('setup.py', 'w') + f.write(SETUP_PY) + f.close() + f = open('hi.py', 'w') + f.write('1\n') + f.close() + if sys.version >= "2.6": + self.old_base = site.USER_BASE + site.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = tempfile.mkdtemp() + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.dir) + if sys.version >= "2.6": + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site + + def test_bdist_egg(self): + dist = Distribution(dict( + script_name='setup.py', + script_args=['bdist_egg'], + name='foo', + py_modules=['hi'] + )) + os.makedirs(os.path.join('build', 'src')) + old_stdout = sys.stdout + sys.stdout = o = StringIO() + try: + dist.parse_command_line() + dist.run_commands() + finally: + sys.stdout = old_stdout + + # let's see if we got our egg link at the right place + [content] = os.listdir('dist') + self.assertTrue(re.match('foo-0.0.0-py[23].\d.egg$', content)) + +def test_suite(): + return unittest.makeSuite(TestDevelopTest) + From 14ab73a69d74f3ed8ba1dc8ce347271845899785 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sun, 15 Jul 2012 21:30:03 -0700 Subject: [PATCH 3495/8469] Issue #13590: Improve support for OS X Xcode 4: - fix test_distutils and test_sysconfig test failures by aligning sysconfig and distutils.sysconfig tailoring of configure variables (as in 2.7) --- sysconfig.py | 29 ++++++++++++++++++++++++++--- unixccompiler.py | 21 ++++----------------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index dac3035f1b..f6e5d99909 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -624,7 +624,7 @@ def get_config_vars(*args): # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): @@ -669,16 +669,39 @@ def get_config_vars(*args): # that OS release. if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', # a number of derived variables. These need to be # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED', 'LDSHARED'): + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = flags + ' ' + arch _config_vars[key] = flags + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: diff --git a/unixccompiler.py b/unixccompiler.py index 5d45faa741..c70a3cc555 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -83,8 +83,9 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass - # Check if the SDK that is used during compilation actually exists. - # If not, revert to using the installed headers and hope for the best. + # Check if the SDK that is used during compilation actually exists, + # the universal build requires the usage of a universal SDK and not all + # users have that installed by default. sysroot = None if '-isysroot' in cc_args: idx = cc_args.index('-isysroot') @@ -96,21 +97,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): if sysroot and not os.path.isdir(sysroot): log.warn("Compiling with an SDK that doesn't seem to exist: %s", sysroot) - log.warn("Attempting to compile without the SDK") - while True: - try: - index = cc_args.index('-isysroot') - # Strip this argument and the next one: - del cc_args[index:index+2] - except ValueError: - break - while True: - try: - index = compiler_so.index('-isysroot') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - break + log.warn("Please check your Xcode installation") return compiler_so From cef0183bed891da1a3ec6e17083d5325141923b7 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 16 Jul 2012 18:24:55 +0100 Subject: [PATCH 3496/8469] Closes #15366: Corrected computation of include location for source builds. Thanks to Richard Oudkerk for the bug report and patch. --- sysconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index f6e5d99909..409ef74ca1 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -101,10 +101,11 @@ def get_python_inc(plat_specific=0, prefix=None): base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: return base + if _sys_home: + incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR')) else: - incdir = os.path.join(_sys_home or get_config_var('srcdir'), - 'Include') - return os.path.normpath(incdir) + incdir = os.path.join(get_config_var('srcdir'), 'Include') + return os.path.normpath(incdir) python_dir = 'python' + get_python_version() + build_flags return os.path.join(prefix, "include", python_dir) elif os.name == "nt": From 7e4558cfe24f0fb019e741f5da76cfc6e7cdc40f Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 16 Jul 2012 18:30:03 +0100 Subject: [PATCH 3497/8469] Closes #15367: Corrected computation of include locations for source builds on Windows. Thanks to Richard Oudkerk for the bug report and patch. --- command/build_ext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index ac37c1320a..f16e2f17ef 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -8,6 +8,7 @@ from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version +from distutils.sysconfig import get_config_h_filename from distutils.dep_util import newer_group from distutils.extension import Extension from distutils.util import get_platform @@ -196,7 +197,10 @@ def finalize_options(self): # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree - self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) + self.include_dirs.append(os.path.dirname(get_config_h_filename())) + _sys_home = getattr(sys, '_home', None) + if _sys_home: + self.library_dirs.append(_sys_home) if MSVC_VERSION >= 9: # Use the .lib files for the correct architecture if self.plat_name == 'win32': From 1f77c7ddcadb51accf01d3db76f23ec158a44256 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 21 Jul 2012 05:36:30 -0700 Subject: [PATCH 3498/8469] Issue #15184: Ensure consistent results of OS X configuration tailoring for universal builds by factoring out common OS X-specific customizations from sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler into a new module _osx_support that can eventually also be used by packaging. --- sysconfig.py | 190 +++++---------------------------------------- tests/test_util.py | 9 +++ unixccompiler.py | 70 ++--------------- util.py | 92 +--------------------- 4 files changed, 39 insertions(+), 322 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 409ef74ca1..910e1047ab 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -172,6 +172,21 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": + if sys.platform == "darwin": + # Perform first-time customization of compiler-related + # config vars on OS X now that we know we need a compiler. + # This is primarily to support Pythons from binary + # installers. The kind and paths to build tools on + # the user system may vary significantly from the system + # that Python itself was built on. Also the user OS + # version and build tools may not support the same set + # of CPU architectures for universal builds. + global _config_vars + if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): + import _osx_support + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') @@ -494,35 +509,12 @@ def _init_os2(): _config_vars = g -def _read_output(commandstring): - """ - Returns os.popen(commandstring, "r").read(), but - without actually using os.popen because that - function is not usable during python bootstrap - """ - # NOTE: tempfile is also not useable during - # bootstrap - import contextlib - try: - import tempfile - fp = tempfile.NamedTemporaryFile() - except ImportError: - fp = open("/tmp/distutils.%s"%( - os.getpid(),), "w+b") - - with contextlib.closing(fp) as fp: - cmd = "%s >'%s'"%(commandstring, fp.name) - os.system(cmd) - data = fp.read() - - return data.decode('utf-8') - def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's - installed Makefile; on Windows and Mac OS it's a much smaller set. + installed Makefile; on Windows it's a much smaller set. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. @@ -555,153 +547,11 @@ def get_config_vars(*args): srcdir = os.path.join(base, _config_vars['srcdir']) _config_vars['srcdir'] = os.path.normpath(srcdir) + # OS X platforms require special customization to handle + # multi-architecture, multi-os-version installers if sys.platform == 'darwin': - from distutils.spawn import find_executable - - kernel_version = os.uname()[2] # Kernel version (8.4.3) - major_version = int(kernel_version.split('.')[0]) - - # Issue #13590: - # The OSX location for the compiler varies between OSX - # (or rather Xcode) releases. With older releases (up-to 10.5) - # the compiler is in /usr/bin, with newer releases the compiler - # can only be found inside Xcode.app if the "Command Line Tools" - # are not installed. - # - # Futhermore, the compiler that can be used varies between - # Xcode releases. Upto Xcode 4 it was possible to use 'gcc-4.2' - # as the compiler, after that 'clang' should be used because - # gcc-4.2 is either not present, or a copy of 'llvm-gcc' that - # miscompiles Python. - - # skip checks if the compiler was overriden with a CC env variable - if 'CC' not in os.environ: - cc = oldcc = _config_vars['CC'] - if not find_executable(cc): - # Compiler is not found on the shell search PATH. - # Now search for clang, first on PATH (if the Command LIne - # Tools have been installed in / or if the user has provided - # another location via CC). If not found, try using xcrun - # to find an uninstalled clang (within a selected Xcode). - - # NOTE: Cannot use subprocess here because of bootstrap - # issues when building Python itself (and os.popen is - # implemented on top of subprocess and is therefore not - # usable as well) - - data = (find_executable('clang') or - _read_output( - "/usr/bin/xcrun -find clang 2>/dev/null").strip()) - if not data: - raise DistutilsPlatformError( - "Cannot locate working compiler") - - _config_vars['CC'] = cc = data - _config_vars['CXX'] = cc + '++' - - elif os.path.basename(cc).startswith('gcc'): - # Compiler is GCC, check if it is LLVM-GCC - data = _read_output("'%s' --version 2>/dev/null" - % (cc.replace("'", "'\"'\"'"),)) - if 'llvm-gcc' in data: - # Found LLVM-GCC, fall back to clang - data = (find_executable('clang') or - _read_output( - "/usr/bin/xcrun -find clang 2>/dev/null").strip()) - if find_executable(data): - _config_vars['CC'] = cc = data - _config_vars['CXX'] = cc + '++' - - if (cc != oldcc - and 'LDSHARED' in _config_vars - and 'LDSHARED' not in os.environ): - # modify LDSHARED if we modified CC - ldshared = _config_vars['LDSHARED'] - if ldshared.startswith(oldcc): - _config_vars['LDSHARED'] = cc + ldshared[len(oldcc):] - - if major_version < 8: - # On Mac OS X before 10.4, check if -arch and -isysroot - # are in CFLAGS or LDFLAGS and remove them if they are. - # This is needed when building extensions on a 10.3 system - # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII) - flags = re.sub('-isysroot [^ \t]*', ' ', flags) - _config_vars[key] = flags - - else: - # Different Xcode releases support different sets for '-arch' - # flags. In particular, Xcode 4.x no longer supports the - # PPC architectures. - # - # This code automatically removes '-arch ppc' and '-arch ppc64' - # when these are not supported. That makes it possible to - # build extensions on OSX 10.7 and later with the prebuilt - # 32-bit installer on the python.org website. - flags = _config_vars['CFLAGS'] - if re.search('-arch\s+ppc', flags) is not None: - # NOTE: Cannot use subprocess here because of bootstrap - # issues when building Python itself - status = os.system("'%s' -arch ppc -x c /dev/null 2>/dev/null"%( - _config_vars['CC'].replace("'", "'\"'\"'"),)) - - if status != 0: - # Compiler doesn't support PPC, remove the related - # '-arch' flags. - for key in ('LDFLAGS', 'BASECFLAGS', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED', 'LDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+ppc\w*\s', ' ', flags) - _config_vars[key] = flags - - - # Allow the user to override the architecture flags using - # an environment variable. - # NOTE: This name was introduced by Apple in OSX 10.5 and - # is used by several scripting languages distributed with - # that OS release. - if 'ARCHFLAGS' in os.environ: - arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = flags + ' ' + arch - _config_vars[key] = flags - - # If we're on OSX 10.5 or later and the user tries to - # compiles an extension using an SDK that is not present - # on the current machine it is better to not use an SDK - # than to fail. - # - # The major usecase for this is users using a Python.org - # binary installer on OSX 10.6: that installer uses - # the 10.4u SDK, but that SDK is not installed by default - # when you install Xcode. - # - m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) - if m is not None: - sdk = m.group(1) - if not os.path.exists(sdk): - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) - _config_vars[key] = flags + import _osx_support + _osx_support.customize_config_vars(_config_vars) if args: vals = [] diff --git a/tests/test_util.py b/tests/test_util.py index 1a06d4c4a1..eac9b5141d 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -13,6 +13,7 @@ from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +import _osx_support class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -92,6 +93,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' @@ -105,6 +107,7 @@ def test_get_platform(self): sys.maxsize = cursize # macbook with fat binaries (fat, universal or fat64) + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' @@ -113,10 +116,12 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-fat') + _osx_support._remove_original_values(get_config_vars()) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.1' self.assertEqual(get_platform(), 'macosx-10.4-fat') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -124,18 +129,21 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-intel') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEqual(get_platform(), 'macosx-10.4-fat3') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEqual(get_platform(), 'macosx-10.4-universal') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -144,6 +152,7 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-fat64') for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' diff --git a/unixccompiler.py b/unixccompiler.py index c70a3cc555..094a2f0bd0 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -23,6 +23,9 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log +if sys.platform == 'darwin': + import _osx_support + # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -38,68 +41,6 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. -def _darwin_compiler_fixup(compiler_so, cc_args): - """ - This function will strip '-isysroot PATH' and '-arch ARCH' from the - compile flags if the user has specified one them in extra_compile_flags. - - This is needed because '-arch ARCH' adds another architecture to the - build, without a way to remove an architecture. Furthermore GCC will - barf if multiple '-isysroot' arguments are present. - """ - stripArch = stripSysroot = False - - compiler_so = list(compiler_so) - kernel_version = os.uname()[2] # 8.4.3 - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # OSX before 10.4.0, these don't support -arch and -isysroot at - # all. - stripArch = stripSysroot = True - else: - stripArch = '-arch' in cc_args - stripSysroot = '-isysroot' in cc_args - - if stripArch or 'ARCHFLAGS' in os.environ: - while True: - try: - index = compiler_so.index('-arch') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - break - - if 'ARCHFLAGS' in os.environ and not stripArch: - # User specified different -arch flags in the environ, - # see also distutils.sysconfig - compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() - - if stripSysroot: - try: - index = compiler_so.index('-isysroot') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - pass - - # Check if the SDK that is used during compilation actually exists, - # the universal build requires the usage of a universal SDK and not all - # users have that installed by default. - sysroot = None - if '-isysroot' in cc_args: - idx = cc_args.index('-isysroot') - sysroot = cc_args[idx+1] - elif '-isysroot' in compiler_so: - idx = compiler_so.index('-isysroot') - sysroot = compiler_so[idx+1] - - if sysroot and not os.path.isdir(sysroot): - log.warn("Compiling with an SDK that doesn't seem to exist: %s", - sysroot) - log.warn("Please check your Xcode installation") - - return compiler_so class UnixCCompiler(CCompiler): @@ -168,7 +109,8 @@ def preprocess(self, source, output_file=None, macros=None, def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so if sys.platform == 'darwin': - compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) try: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) @@ -247,7 +189,7 @@ def link(self, target_desc, objects, linker[i] = self.compiler_cxx[i] if sys.platform == 'darwin': - linker = _darwin_compiler_fixup(linker, ld_args) + linker = _osx_support.compiler_fixup(linker, ld_args) self.spawn(linker + ld_args) except DistutilsExecError as msg: diff --git a/util.py b/util.py index 9833bf95c0..67d8166349 100644 --- a/util.py +++ b/util.py @@ -98,94 +98,10 @@ def get_platform (): if m: release = m.group() elif osname[:6] == "darwin": - # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set - # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were - # MACOSX_DEPLOYMENT_TARGET. - from distutils.sysconfig import get_config_vars - cfgvars = get_config_vars() - - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - - if 1: - # Always calculate the release of the running machine, - # needed to determine if we can build fat binaries or not. - - macrelease = macver - # Get the system version. Reading this plist is a documented - # way to get the system version (see the documentation for - # the Gestalt Manager) - try: - f = open('/System/Library/CoreServices/SystemVersion.plist') - except IOError: - # We're on a plain darwin box, fall back to the default - # behaviour. - pass - else: - try: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour - finally: - f.close() - - if not macver: - macver = macrelease - - if macver: - from distutils.sysconfig import get_config_vars - release = macver - osname = "macosx" - - if (macrelease + '.') >= '10.4.' and \ - '-arch' in get_config_vars().get('CFLAGS', '').strip(): - # The universal build will build fat binaries, but not on - # systems before 10.4 - # - # Try to detect 4-way universal builds, those have machine-type - # 'universal' instead of 'fat'. - - machine = 'fat' - cflags = get_config_vars().get('CFLAGS') - - archs = re.findall('-arch\s+(\S+)', cflags) - archs = tuple(sorted(set(archs))) - - if len(archs) == 1: - machine = archs[0] - elif archs == ('i386', 'ppc'): - machine = 'fat' - elif archs == ('i386', 'x86_64'): - machine = 'intel' - elif archs == ('i386', 'ppc', 'x86_64'): - machine = 'fat3' - elif archs == ('ppc64', 'x86_64'): - machine = 'fat64' - elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): - machine = 'universal' - else: - raise ValueError( - "Don't know machine value for archs=%r"%(archs,)) - - elif machine == 'i386': - # On OSX the machine type returned by uname is always the - # 32-bit variant, even if the executable architecture is - # the 64-bit variant - if sys.maxsize >= 2**32: - machine = 'x86_64' - - elif machine in ('PowerPC', 'Power_Macintosh'): - # Pick a sane name for the PPC architecture. - machine = 'ppc' - - # See 'i386' case - if sys.maxsize >= 2**32: - machine = 'ppc64' + import _osx_support, distutils.sysconfig + osname, release, machine = _osx_support.get_platform_osx( + distutils.sysconfig.get_config_vars(), + osname, release, machine) return "%s-%s-%s" % (osname, release, machine) From 832ac33b66bfba9d2826a50a31d656bf813dcba4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 16:59:55 -0400 Subject: [PATCH 3499/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : d5bef70d399dc0a4723cb589a2f92628d9695b46 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2707f01cdc..bb8cb52d82 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.28 +------ + +* Issue 294: setup.py can now be invoked from any directory. + + ------ 0.6.27 ------ From cbb03edb6cf43016eed584f42506458893e4be05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 17:04:33 -0400 Subject: [PATCH 3500/8469] Reorganized imports --HG-- branch : distribute extra : rebase_source : 6836f95f7e0668d6bd3e34f915d16de21d4f3731 --- setuptools/command/easy_install.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 49a2c41e42..f226023604 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -10,7 +10,15 @@ __ http://packages.python.org/distribute/easy_install.html """ -import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys +import os +import zipimport +import shutil +import tempfile +import zipfile +import re +import stat +import random from glob import glob from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup From cfaa9e966754c4305d01ce53ed00c3a091a896bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 17:05:35 -0400 Subject: [PATCH 3501/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : 81739cfc4802c4611cf2cffaf02ad9cdbe2046bb --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bb8cb52d82..673d7aecd1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,7 @@ CHANGES ------ * Issue 294: setup.py can now be invoked from any directory. - +* Scripts are now installed honoring the umask. ------ 0.6.27 From 3a042756a6f849a81171204d1f922214fe8483f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 17:22:11 -0400 Subject: [PATCH 3502/8469] Updated changelog and contributors --HG-- branch : distribute extra : rebase_source : 478c91acb47b8ccb53d39877d5313b2f8803f815 --- CHANGES.txt | 1 + CONTRIBUTORS.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 673d7aecd1..7502ecac7f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Issue 294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. +* Added support for .dist-info directories. ------ 0.6.27 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 9ef062c773..2ec6b3e6df 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -7,8 +7,11 @@ Contributors * Arfrever Frehtes Taifersar Arahesis * Christophe Combelles * Daniel Stutzbach +* David Hoth * Hanno Schlichting * Jannis Leidel +* Jason R. Coombs +* Justin Azoff * Lennart Regebro * Martin von Löwis * Noufal Ibrahim From 834b8b7521dbbd2bd25e66e428ba56d2ec78ce83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 17:26:07 -0400 Subject: [PATCH 3503/8469] Updated contributors --HG-- branch : distribute extra : rebase_source : dc5556f7a904b267bff352c5d4d10a96c1cd9612 --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 2ec6b3e6df..65dd003997 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -11,6 +11,7 @@ Contributors * Hanno Schlichting * Jannis Leidel * Jason R. Coombs +* Jim Fulton * Justin Azoff * Lennart Regebro * Martin von Löwis From f8f7c6f7a315878e0c40baa64c5629f78a184a36 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Jul 2012 17:30:40 -0400 Subject: [PATCH 3504/8469] Updated changelog and contributors --HG-- branch : distribute extra : rebase_source : 41f0e72127b695aec4a0c74eb511dbf44841d0e5 --- CHANGES.txt | 3 ++- CONTRIBUTORS.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 149b1fed04..14f26d2676 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,8 @@ CHANGES * Issue 294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. * Added support for .dist-info directories. -* Issue #283 bdist_egg issues with python 3.3.0aX +* Issue #283 bdist_egg issues with python 3.3.0aX. +* Test and fix for marshal.load of .pyc files on Python 3.3. ------ 0.6.27 diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 65dd003997..d44bdbee29 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -14,6 +14,7 @@ Contributors * Jim Fulton * Justin Azoff * Lennart Regebro +* Marc Abramowitz * Martin von Löwis * Noufal Ibrahim * Philip Jenvey From a0418246ba7379453fadeb07a77c10770751f25e Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sun, 22 Jul 2012 02:56:36 -0700 Subject: [PATCH 3505/8469] Issue #15184: Some config variables in test_sysconfig_module may differ between sysconfig and distutils.sysconfig due to compiler customizations on OS X. For now, move those vars into a separate test and skip if the customization has taken place in distutils. The long-term solution is to eliminate having two sysconfig modules. --- tests/test_sysconfig.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index fbe26bf65d..545ef3b548 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -102,7 +102,27 @@ def test_sysconfig_module(self): import sysconfig as global_sysconfig self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) - self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('LDSHARED')) + + @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'),'compiler flags customized') + def test_sysconfig_compiler_vars(self): + # On OS X, binary installers support extension module building on + # various levels of the operating system with differing Xcode + # configurations. This requires customization of some of the + # compiler configuration directives to suit the environment on + # the installed machine. Some of these customizations may require + # running external programs and, so, are deferred until needed by + # the first extension module build. With Python 3.3, only + # the Distutils version of sysconfig is used for extension module + # builds, which happens earlier in the Distutils tests. This may + # cause the following tests to fail since no tests have caused + # the global version of sysconfig to call the customization yet. + # The solution for now is to simply skip this test in this case. + # The longer-term solution is to only have one version of sysconfig. + + import sysconfig as global_sysconfig + if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): + return + self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED')) self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) From e34bf059df2e3f4812cf404749a2a6ca5d11dbcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 10:05:50 -0400 Subject: [PATCH 3506/8469] Adding travis.yml --HG-- branch : distribute extra : rebase_source : 01170ff9a0cb5380ae6a80727b7dade0edbd2986 --- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- travis.yml | 7 ++ 2 files changed, 69 insertions(+), 62 deletions(-) create mode 100644 travis.yml diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..2965458969 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/travis.yml b/travis.yml new file mode 100644 index 0000000000..50f0e0b910 --- /dev/null +++ b/travis.yml @@ -0,0 +1,7 @@ +language: python +python: + - 2.6 + - 2.7 + - 3.2 +# command to run tests +script: python setup.py test From 0d946957cc6d96ae4bbbd4f960a2e661331d0554 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 10:14:56 -0400 Subject: [PATCH 3507/8469] Add the install section back (I suspect it may be required to indicate a Python project). --HG-- branch : distribute extra : rebase_source : 1741ce7955e97e5f4837bcf9d64df56ac4bb4e78 --- travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis.yml b/travis.yml index 50f0e0b910..605923d348 100644 --- a/travis.yml +++ b/travis.yml @@ -3,5 +3,7 @@ python: - 2.6 - 2.7 - 3.2 +# install +install: python --version # command to run tests script: python setup.py test From ca8ed621f70c8be3944f2dc554bf9b70196ccb39 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 10:17:55 -0400 Subject: [PATCH 3508/8469] Renamed travis.yml to correctly match the spec --HG-- branch : distribute extra : rebase_source : 4541bc1ab7af8fb6fbc54f68a0de8c473baa8a4d --- travis.yml => .travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename travis.yml => .travis.yml (100%) diff --git a/travis.yml b/.travis.yml similarity index 100% rename from travis.yml rename to .travis.yml From 08b3db92e72b9ab3d91c5cf604b4ef734d256da9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:06:00 -0400 Subject: [PATCH 3509/8469] Updated Trove classifiers to indicate supported Python versions --HG-- branch : distribute extra : rebase_source : 430e99bf42cb46f6ac996d26d5b2fd1f0000418e --- .travis.yml | 2 ++ setup.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 605923d348..6239f00980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: python python: + - 2.4 + - 2.5 - 2.6 - 2.7 - 3.2 diff --git a/setup.py b/setup.py index 4294f3f96c..db469b92a4 100755 --- a/setup.py +++ b/setup.py @@ -207,7 +207,10 @@ def _being_installed(): License :: OSI Approved :: Python Software Foundation License License :: OSI Approved :: Zope Public License Operating System :: OS Independent - Programming Language :: Python + Programming Language :: Python :: 2.4 + Programming Language :: Python :: 2.5 + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging From a84dcfa051d9fe02a5304a557b3527da21f45820 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:09:25 -0400 Subject: [PATCH 3510/8469] Added link to Travis-CI tests --HG-- branch : distribute extra : rebase_source : ab6f122c2b3a9533c9c2ee7f1ed845437acf75b7 --- release.py | 1 + 1 file changed, 1 insertion(+) diff --git a/release.py b/release.py index 487e6d584f..54a361752c 100644 --- a/release.py +++ b/release.py @@ -96,6 +96,7 @@ def do_release(): print("Please do that") raise SystemExit(1) + print("Travis-CI tests: http://travis-ci.org/#!/jaraco/distribute") res = raw_input('Have you or has someone verified that the tests ' 'pass on this revision? ') if not res.lower().startswith('y'): From 4af2d58dbfad9be4bd9df2612c8292bc29f8f4e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:12:19 -0400 Subject: [PATCH 3511/8469] Updated contributors with the correct name --HG-- branch : distribute extra : rebase_source : bf6243f89aad29eb1e52405175cff8f3412d6573 --- CONTRIBUTORS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d44bdbee29..852662391a 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -7,7 +7,7 @@ Contributors * Arfrever Frehtes Taifersar Arahesis * Christophe Combelles * Daniel Stutzbach -* David Hoth +* Daniel Holth * Hanno Schlichting * Jannis Leidel * Jason R. Coombs From 9d94aa8feb11530c01dbc9d594f4a5f5c20740ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:15:53 -0400 Subject: [PATCH 3512/8469] Updated imports, removed excess whitespace --HG-- branch : distribute extra : rebase_source : a2cc4dde8a9a5de8c92e277099610e507fce2973 --- setuptools/tests/test_dist_info.py | 31 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 119cc68bcd..fede54da91 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -1,6 +1,10 @@ """Test .dist-info style distributions. """ -import os, shutil, tempfile, unittest +import os +import shutil +import tempfile +import unittest + import pkg_resources from pkg_resources import Requirement try: @@ -15,29 +19,29 @@ def test_distinfo(self): dists = {} for d in pkg_resources.find_distributions(self.tmpdir): dists[d.project_name] = d - + assert len(dists) == 2, dists - + unversioned = dists['UnversionedDistribution'] versioned = dists['VersionedDistribution'] - - assert versioned.version == '2.718' # from filename + + assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - - @unittest.skipIf(not has_markerlib, - "install markerlib to test conditional dependencies") + + @unittest.skipIf(not has_markerlib, + "install markerlib to test conditional dependencies") def test_conditional_dependencies(self): - requires = [Requirement.parse('splort==4'), + requires = [Requirement.parse('splort==4'), Requirement.parse('quux>=1.1')] - + for d in pkg_resources.find_distributions(self.tmpdir): self.assertEquals(d.requires(), requires[:1]) self.assertEquals(d.requires(extras=('baz',)), requires) - self.assertEquals(d.extras, ['baz']) + self.assertEquals(d.extras, ['baz']) def setUp(self): self.tmpdir = tempfile.mkdtemp() - versioned = os.path.join(self.tmpdir, + versioned = os.path.join(self.tmpdir, 'VersionedDistribution-2.718.dist-info') os.mkdir(versioned) open(os.path.join(versioned, 'METADATA'), 'w+').write( @@ -48,7 +52,7 @@ def setUp(self): Requires-Dist: quux (>=1.1); extra == 'baz' """) - unversioned = os.path.join(self.tmpdir, + unversioned = os.path.join(self.tmpdir, 'UnversionedDistribution.dist-info') os.mkdir(unversioned) open(os.path.join(unversioned, 'METADATA'), 'w+').write( @@ -62,4 +66,3 @@ def setUp(self): def tearDown(self): shutil.rmtree(self.tmpdir) - From 4f7bf7c846ae9761bd10a44f60c656b9741d69be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:21:02 -0400 Subject: [PATCH 3513/8469] Use DALS to avoid breaking indentation in test setup. Removed flag indicating presence of module. --HG-- branch : distribute extra : rebase_source : 48d8347f667ec05c28505bc76880dcd64dc43204 --- setuptools/tests/test_dist_info.py | 48 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index fede54da91..318cd97336 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -4,14 +4,18 @@ import shutil import tempfile import unittest +import textwrap -import pkg_resources -from pkg_resources import Requirement try: import markerlib - has_markerlib = True except: - has_markerlib = False + pass + +import pkg_resources + +def DALS(s): + "dedent and left-strip" + return textwrap.dedent(s).lstrip() class TestDistInfo(unittest.TestCase): @@ -28,11 +32,11 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - @unittest.skipIf(not has_markerlib, + @unittest.skipIf('markerlib' not in globals(), "install markerlib to test conditional dependencies") def test_conditional_dependencies(self): - requires = [Requirement.parse('splort==4'), - Requirement.parse('quux>=1.1')] + requires = [pkg_resources.Requirement.parse('splort==4'), + pkg_resources.Requirement.parse('quux>=1.1')] for d in pkg_resources.find_distributions(self.tmpdir): self.assertEquals(d.requires(), requires[:1]) @@ -44,25 +48,25 @@ def setUp(self): versioned = os.path.join(self.tmpdir, 'VersionedDistribution-2.718.dist-info') os.mkdir(versioned) - open(os.path.join(versioned, 'METADATA'), 'w+').write( -"""Metadata-Version: 1.2 -Name: VersionedDistribution -Requires-Dist: splort (4) -Provides-Extra: baz -Requires-Dist: quux (>=1.1); extra == 'baz' -""") + open(os.path.join(versioned, 'METADATA'), 'w+').write(DALS( + """Metadata-Version: 1.2 + Name: VersionedDistribution + Requires-Dist: splort (4) + Provides-Extra: baz + Requires-Dist: quux (>=1.1); extra == 'baz' + """)) unversioned = os.path.join(self.tmpdir, 'UnversionedDistribution.dist-info') os.mkdir(unversioned) - open(os.path.join(unversioned, 'METADATA'), 'w+').write( -"""Metadata-Version: 1.2 -Name: UnversionedDistribution -Version: 0.3 -Requires-Dist: splort (==4) -Provides-Extra: baz -Requires-Dist: quux (>=1.1); extra == 'baz' -""") + open(os.path.join(unversioned, 'METADATA'), 'w+').write(DALS( + """Metadata-Version: 1.2 + Name: UnversionedDistribution + Version: 0.3 + Requires-Dist: splort (==4) + Provides-Extra: baz + Requires-Dist: quux (>=1.1); extra == 'baz' + """)) def tearDown(self): shutil.rmtree(self.tmpdir) From 2cbbedf7be98fd3f43ab8897f68e36c18e2bef9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:35:47 -0400 Subject: [PATCH 3514/8469] Added python 2.4-2.6 support for skipIf --HG-- branch : distribute extra : rebase_source : cac18ef7c3dbde38ceac3a0c71cfb3b5ffa56dd5 --- setuptools/tests/py26compat.py | 13 +++++++++++++ setuptools/tests/test_dist_info.py | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 setuptools/tests/py26compat.py diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py new file mode 100644 index 0000000000..ddf2ceb0b6 --- /dev/null +++ b/setuptools/tests/py26compat.py @@ -0,0 +1,13 @@ +import unittest + +try: + # provide skipIf for Python 2.4-2.6 + skipIf = unittest.skipIf +except AttributeError: + def skipIf(condition, reason): + def skipper(func): + def skip(*args, **kwargs): + return + if condition: + return skip + return func diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 318cd97336..cf8fb0f9ae 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -13,6 +13,8 @@ import pkg_resources +from setuptools.tests.py26compat import skipIf + def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() From b34497eb49a2d498295d6ad12a77c48e69529410 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:43:05 -0400 Subject: [PATCH 3515/8469] Travis doesn't support Python 2.4 (and never will). --HG-- branch : distribute extra : rebase_source : 8a5e9acf606b18a5b88f3df1a108f9990bc4b891 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6239f00980..719323f4d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 2.4 - 2.5 - 2.6 - 2.7 From 7bc21a080559758ed92d03c238d5b51bbf2c8835 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:44:27 -0400 Subject: [PATCH 3516/8469] Nothing during install --HG-- branch : distribute extra : rebase_source : 225691c27a718f11a94b31e8a661d56d3becc5b9 --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 719323f4d3..cbc671e744 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,5 @@ python: - 2.6 - 2.7 - 3.2 -# install -install: python --version # command to run tests script: python setup.py test From e10bb776722f4dd1d5bcda17adcc557ea0eb8b14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:45:53 -0400 Subject: [PATCH 3517/8469] Use compatible skipIf --HG-- branch : distribute extra : rebase_source : 4964057db0c3186c1c8b9e934cf23f1b4ddcb167 --- setuptools/tests/test_dist_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index cf8fb0f9ae..68ba9e2494 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -34,8 +34,8 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - @unittest.skipIf('markerlib' not in globals(), - "install markerlib to test conditional dependencies") + @skipIf('markerlib' not in globals(), + "install markerlib to test conditional dependencies") def test_conditional_dependencies(self): requires = [pkg_resources.Requirement.parse('splort==4'), pkg_resources.Requirement.parse('quux>=1.1')] From 22366805a3a7b6292774491db04792851a341b6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 15:51:14 -0400 Subject: [PATCH 3518/8469] Fix compatibility skipIf --HG-- branch : distribute extra : rebase_source : a70fd5755fad7a30c478c44e270c1dad13e66a47 --- setuptools/tests/py26compat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index ddf2ceb0b6..d4fb891af6 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -11,3 +11,4 @@ def skip(*args, **kwargs): if condition: return skip return func + return skipper From 0cb6b8bebf4f16d9187827d843f5cdd908067b09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:01:06 -0400 Subject: [PATCH 3519/8469] Expand error message to help detect why this test fails on travis --HG-- branch : distribute extra : rebase_source : 9182fc8c4544cde849fdac373b558f9078af1254 --- setuptools/tests/test_packageindex.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index f10b5ee80d..776382d022 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -70,10 +70,12 @@ def test_bad_url_double_scheme(self): index.open_url(url) except distutils.errors.DistutilsError, error: # Python 2.7.3 - self.assert_('getaddrinfo failed' in str(error)) + self.assertTrue('getaddrinfo failed' in str(error), "error was " + + str(error)) except httplib.InvalidURL, error: # Python 2.7.2 and earlier - self.assert_('nonnumeric port' in str(error)) + self.assertTrue('nonnumeric port' in str(error), "error was " + + str(error)) def test_bad_url_screwy_href(self): index = setuptools.package_index.PackageIndex( @@ -141,5 +143,3 @@ def test_parse_bdist_wininst(self): 'reportlab-2.5.win-amd64-py2.7.exe'), ('reportlab-2.5', '2.7', 'win-amd64')) self.assertEqual(setuptools.package_index.parse_bdist_wininst( 'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64')) - - From 6ee14089b193c7e179fc2a0472644f5684d8bef4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:26:37 -0400 Subject: [PATCH 3520/8469] Update this test again to ensure it's trapping the expected exception (DistutilsError) and ensuring that it captures the expected error messages. --HG-- branch : distribute extra : rebase_source : b66947d43758f4cbea407043dfbeffdf3aaf9b01 --- setuptools/tests/test_packageindex.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 5e424dd659..09e78bb303 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -60,6 +60,9 @@ def _urlopen(*args): urllib2.urlopen = old_urlopen def test_bad_url_double_scheme(self): + """ + A bad URL with a double scheme should raise a DistutilsError. + """ index = setuptools.package_index.PackageIndex( hosts=('www.example.com',) ) @@ -69,11 +72,9 @@ def test_bad_url_double_scheme(self): try: index.open_url(url) except distutils.errors.DistutilsError, error: - # Python 2.7.3 - self.assert_('getaddrinfo failed' in str(error)) - except httplib.InvalidURL, error: - # Python 2.7.2 and earlier - self.assert_('nonnumeric port' in str(error)) + msg = unicode(error) + assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg + raise RuntimeError("Did not raise") def test_bad_url_screwy_href(self): index = setuptools.package_index.PackageIndex( From 4b2a1a13fd5e01804b4fb281aea59407ccde43e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:34:19 -0400 Subject: [PATCH 3521/8469] Don't raise when exception is caught --HG-- branch : distribute extra : rebase_source : 9da60528c7ace0a59bf1d92c6e155bba2e11ef18 --- setuptools/tests/test_packageindex.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 107a57b693..1b4d2fdf59 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -74,6 +74,7 @@ def test_bad_url_double_scheme(self): except distutils.errors.DistutilsError, error: msg = unicode(error) assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg + return raise RuntimeError("Did not raise") def test_bad_url_screwy_href(self): From 80d5fa167350f89a7bb6dcdf1521c51e5466851c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:56:53 -0400 Subject: [PATCH 3522/8469] Check that Sphinx is installed before proceeding --HG-- branch : distribute extra : rebase_source : 369ae02ec1ac1825c2586d6f5efc59f37a58b3df --- release.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/release.py b/release.py index 54a361752c..9a1f0f3c8e 100644 --- a/release.py +++ b/release.py @@ -89,6 +89,9 @@ def bump_version(filename): def do_release(): assert all(map(os.path.exists, files_with_versions)), ( "Expected file(s) missing") + + assert has_sphinx(), "You must have Sphinx installed to release" + res = raw_input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) @@ -131,6 +134,15 @@ def do_release(): add_milestone_and_version() +def has_sphinx(): + try: + devnull = open(os.path.devnull, 'wb') + subprocess.Popen(['sphinx-build', '--version'], stdout=devnull, + stderr=subprocess.STDOUT).wait() + except Exception: + return False + return True + def build_docs(): if not os.path.isdir('docs'): return From 826d15b5981a50ce28f63b40020174f6d9ae823d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:57:53 -0400 Subject: [PATCH 3523/8469] Added tag 0.6.28 for changeset fc379e63586a --HG-- branch : distribute extra : rebase_source : 420bd55061dd7234c65482ca417995b5646e924a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 93f0176332..287e85d21e 100644 --- a/.hgtags +++ b/.hgtags @@ -36,3 +36,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 6124053afb5c98f11e146ae62049b4c232d50dc5 0.6.25 b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 469c3b948e41ef28752b3cdf3c7fb9618355ebf5 0.6.27 +fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 From be5acb407cfa5dd1ff37ac1ed68d96ba92302cc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jul 2012 16:58:22 -0400 Subject: [PATCH 3524/8469] Bumped to 0.6.29 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 44417a6112b166bdfa875da05254ba206ef34cab --- README.txt | 6 +- distribute.egg-info/entry_points.txt | 124 +++++++++++++-------------- distribute_setup.py | 2 +- docs/conf.py | 4 +- release.py | 2 +- setup.py | 2 +- 6 files changed, 70 insertions(+), 70 deletions(-) diff --git a/README.txt b/README.txt index 5d025d6124..679b255138 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz - $ tar -xzvf distribute-0.6.28.tar.gz - $ cd distribute-0.6.28 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.29.tar.gz + $ tar -xzvf distribute-0.6.29.tar.gz + $ cd distribute-0.6.29 $ python setup.py install --------------------------- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2965458969..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - -[egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/distribute_setup.py b/distribute_setup.py index 8f5b0637bf..dd24ec1e52 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -46,7 +46,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.28" +DEFAULT_VERSION = "0.6.29" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index e7011e26ba..7b82a884b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.28' +version = '0.6.29' # The full version, including alpha/beta/rc tags. -release = '0.6.28' +release = '0.6.29' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 9a1f0f3c8e..f4f88bac35 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.28' +VERSION = '0.6.29' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index db469b92a4..9df6bb495e 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.28" +VERSION = "0.6.29" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From c9884d20b6860356be4f167ece51b54bd7a3da61 Mon Sep 17 00:00:00 2001 From: iElectric Date: Wed, 15 Aug 2012 23:17:55 +0200 Subject: [PATCH 3525/8469] Fix #231, second try. --HG-- branch : distribute extra : rebase_source : 72d5afb5f7f7ce1b57adb0bbec68bec003c6e699 --- distribute_setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/distribute_setup.py b/distribute_setup.py index dd24ec1e52..f3199d125b 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -316,6 +316,7 @@ def _create_fake_setuptools_pkg_info(placeholder): if not os.access(pkg_info, os.W_OK): log.warn("Don't have permissions to write %s, skipping", pkg_info) + return log.warn('Creating %s', pkg_info) f = open(pkg_info, 'w') From a4b326909d1f64037412b5048d59199bc6b648e8 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 20 Aug 2012 19:28:30 +0200 Subject: [PATCH 3526/8469] I guess nobody uses test.sh anymore, since it's unmaintained. Updated anyway. --HG-- branch : distribute extra : rebase_source : d4105c985efec3f6d7e298615299c5cc9359cbc2 --- test.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test.sh b/test.sh index 883271a4de..8f5ec654fc 100644 --- a/test.sh +++ b/test.sh @@ -1,13 +1,4 @@ #!/bin/sh -echo -n "Running tests for Python 2.3..." -python2.3 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - echo -n "Running tests for Python 2.4..." python2.4 setup.py -q test > /dev/null 2> /dev/null if [ $? -ne 0 ];then @@ -45,3 +36,13 @@ else echo "Success" fi +rm -rf build +echo -n "Running tests for Python 3.2..." +python3.2 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + From ce53222d269dbf6bed8d97ed01437aba89faba53 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 20 Aug 2012 19:35:57 +0200 Subject: [PATCH 3527/8469] And Python 2.7, of course. --HG-- branch : distribute extra : rebase_source : 81e1d3c6e30c8096505bfdfd25bfe49b5dc37953 --- distribute.egg-info/entry_points.txt | 2 +- test.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..2c61c9c828 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-3.1 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/test.sh b/test.sh index 8f5ec654fc..d62248f2c4 100644 --- a/test.sh +++ b/test.sh @@ -26,6 +26,15 @@ else echo "Success" fi +echo -n "Running tests for Python 2.7..." +python2.7 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + rm -rf build echo -n "Running tests for Python 3.1..." python3.1 setup.py -q test > /dev/null 2> /dev/null From c8558d8d3b6c2cae273637ccec616489c2e7b439 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 21 Aug 2012 17:29:47 +0200 Subject: [PATCH 3528/8469] Add failing test for #301. --HG-- branch : distribute extra : rebase_source : 2972e762cdab88e90c1c8b9b9a336afc641e996f --- setuptools/command/test.py | 3 +- setuptools/tests/test_test.py | 112 ++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 setuptools/tests/test_test.py diff --git a/setuptools/command/test.py b/setuptools/command/test.py index b7aef9697a..59c10e84d3 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -141,9 +141,10 @@ def run_tests(self): import unittest loader_ep = EntryPoint.parse("x="+self.test_loader) loader_class = loader_ep.load(require=False) + cks = loader_class() unittest.main( None, None, [unittest.__file__]+self.test_args, - testLoader = loader_class() + testLoader = cks ) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py new file mode 100644 index 0000000000..7194399af4 --- /dev/null +++ b/setuptools/tests/test_test.py @@ -0,0 +1,112 @@ +"""develop tests +""" +import sys +import os, shutil, tempfile, unittest +import tempfile +import site +from StringIO import StringIO + +from distutils.errors import DistutilsError +from setuptools.command.test import test +from setuptools.command import easy_install as easy_install_pkg +from setuptools.dist import Distribution + +SETUP_PY = """\ +from setuptools import setup + +setup(name='foo') +""" + +NS_INIT = """try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) +""" +TEST_PY = """import unittest + +class TestTest(unittest.TestCase): + def test_test(self): + print "Foo" # Should fail under Python 3 unless 2to3 is used + +test_suite = unittest.makeSuite(TestTest) +""" + +class TestTestTest(unittest.TestCase): + + def setUp(self): + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + return + + # Directory structure + self.dir = tempfile.mkdtemp() + os.mkdir(os.path.join(self.dir, 'name')) + os.mkdir(os.path.join(self.dir, 'name', 'space')) + os.mkdir(os.path.join(self.dir, 'name', 'space', 'tests')) + # setup.py + setup = os.path.join(self.dir, 'setup.py') + f = open(setup, 'w') + f.write(SETUP_PY) + f.close() + self.old_cwd = os.getcwd() + # name/__init__.py + init = os.path.join(self.dir, 'name', '__init__.py') + f = open(init, 'w') + f.write(NS_INIT) + f.close() + # name/space/__init__.py + init = os.path.join(self.dir, 'name', 'space', '__init__.py') + f = open(init, 'w') + f.write('#empty\n') + f.close() + # name/space/tests/__init__.py + init = os.path.join(self.dir, 'name', 'space', 'tests', '__init__.py') + f = open(init, 'w') + f.write(TEST_PY) + f.close() + + os.chdir(self.dir) + self.old_base = site.USER_BASE + site.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = tempfile.mkdtemp() + + def tearDown(self): + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + return + + os.chdir(self.old_cwd) + shutil.rmtree(self.dir) + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site + + def test_test(self): + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + return + + dist = Distribution(dict( + script_name='setup.py', + script_args=['bdist_egg'], + name='foo', + py_modules=['name'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + )) + dist.script_name = 'setup.py' + cmd = test(dist) + cmd.user = 1 + cmd.ensure_finalized() + cmd.install_dir = site.USER_SITE + cmd.user = 1 + old_stdout = sys.stdout + sys.stdout = StringIO() + try: + cmd.run() + except SystemExit: # The test runner calls sys.exit, stop that making an error. + pass + finally: + sys.stdout = old_stdout + +test_suite = unittest.makeSuite(TestTestTest) From 78ac59d4ab00868456155cd3f83be15f78acccf3 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 21 Aug 2012 18:56:02 +0200 Subject: [PATCH 3529/8469] Once the test is correctly setup, the problem actually goes away. --HG-- branch : distribute extra : rebase_source : 8a1c310010599165aa973bb207b07616428df66b --- setuptools/tests/test_test.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 7194399af4..5000f234f6 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -14,10 +14,15 @@ SETUP_PY = """\ from setuptools import setup -setup(name='foo') +setup(name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', +) """ -NS_INIT = """try: +NS_INIT = """ +try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path @@ -87,12 +92,11 @@ def test_test(self): return dist = Distribution(dict( - script_name='setup.py', - script_args=['bdist_egg'], name='foo', - py_modules=['name'], + packages=['name', 'name.space', 'name.space.tests'], namespace_packages=['name'], test_suite='name.space.tests.test_suite', + use_2to3=True, )) dist.script_name = 'setup.py' cmd = test(dist) From 61f4c9c4cbf148253c9e06f3e05757e01affeb6e Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 21 Aug 2012 19:05:36 +0200 Subject: [PATCH 3530/8469] Added failing test for #299. --HG-- branch : distribute extra : rebase_source : 4a3ac76a6a49e06e1fecd1d6f4e08fa922f82f73 --- setuptools/tests/test_develop.py | 48 ++++++++++++++++++++++++-------- setuptools/tests/test_test.py | 2 -- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 5576d5e5f2..f345d8fc72 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -14,33 +14,51 @@ SETUP_PY = """\ from setuptools import setup -setup(name='foo') +setup(name='foo', + packages=['foo'], +) +""" + +INIT_PY = """print "foo" """ class TestDevelopTest(unittest.TestCase): def setUp(self): + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + return + + # Directory structure self.dir = tempfile.mkdtemp() + os.mkdir(os.path.join(self.dir, 'foo')) + # setup.py setup = os.path.join(self.dir, 'setup.py') f = open(setup, 'w') f.write(SETUP_PY) f.close() self.old_cwd = os.getcwd() + # foo/__init__.py + init = os.path.join(self.dir, 'foo', '__init__.py') + f = open(init, 'w') + f.write(INIT_PY) + f.close() + os.chdir(self.dir) - if sys.version >= "2.6": - self.old_base = site.USER_BASE - site.USER_BASE = tempfile.mkdtemp() - self.old_site = site.USER_SITE - site.USER_SITE = tempfile.mkdtemp() + self.old_base = site.USER_BASE + site.USER_BASE = tempfile.mkdtemp() + self.old_site = site.USER_SITE + site.USER_SITE = tempfile.mkdtemp() def tearDown(self): + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + return + os.chdir(self.old_cwd) shutil.rmtree(self.dir) - if sys.version >= "2.6": - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = self.old_base + site.USER_SITE = self.old_site def test_develop(self): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): @@ -64,6 +82,14 @@ def test_develop(self): content.sort() self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) + # Check that we are using the right code. + path = open(os.path.join(site.USER_SITE, 'UNKNOWN.egg-link'), 'rt').read().split()[0].strip() + init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip() + if sys.version < "3": + self.assertEquals(init, 'print "foo"') + else: + self.assertEquals(init, 'print("foo")') + def test_develop_with_setup_requires(self): wanted = ("Could not find suitable distribution for " diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 5000f234f6..87ccaf448e 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -112,5 +112,3 @@ def test_test(self): pass finally: sys.stdout = old_stdout - -test_suite = unittest.makeSuite(TestTestTest) From 42afe54cf9e15ef655e7ed5fef9483682fcd5af2 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 21 Aug 2012 20:52:16 +0200 Subject: [PATCH 3531/8469] Added fix for the develop command, #299. --HG-- branch : distribute extra : rebase_source : ef69472e5a9ce97d9102578898e81e516f06497a --- distribute.egg-info/entry_points.txt | 2 +- setuptools/command/develop.py | 34 ++++++++++++++++++++++++---- setuptools/tests/test_develop.py | 16 +++++++++---- setuptools/tests/test_test.py | 7 +++--- 4 files changed, 45 insertions(+), 14 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 2c61c9c828..663882d630 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 93b7773ccc..c8bef72ef7 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -84,11 +84,35 @@ def finalize_options(self): " installation directory", p, normalize_path(os.curdir)) def install_for_development(self): - # Ensure metadata is up-to-date - self.run_command('egg_info') - # Build extensions in-place - self.reinitialize_command('build_ext', inplace=1) - self.run_command('build_ext') + if getattr(self.distribution, 'use_2to3', False): + # If we run 2to3 we can not do this inplace: + + # Ensure metadata is up-to-date + self.reinitialize_command('build_py', inplace=0) + self.run_command('build_py') + bpy_cmd = self.get_finalized_command("build_py") + build_path = normalize_path(bpy_cmd.build_lib) + + # Build extensions + self.reinitialize_command('egg_info', egg_base=build_path) + self.run_command('egg_info') + + self.reinitialize_command('build_ext', inplace=0) + self.run_command('build_ext') + + # Fixup egg-link and easy-install.pth + ei_cmd = self.get_finalized_command("egg_info") + self.egg_path = build_path + self.dist.location = build_path + self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info) # XXX + else: + # Without 2to3 inplace works fine: + self.run_command('egg_info') + + # Build extensions in-place + self.reinitialize_command('build_ext', inplace=1) + self.run_command('build_ext') + self.install_site_py() # ensure that target dir is site-safe if setuptools.bootstrap_install_from: self.easy_install(setuptools.bootstrap_install_from) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index f345d8fc72..fcf33c585e 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -16,6 +16,7 @@ setup(name='foo', packages=['foo'], + use_2to3=True, ) """ @@ -63,7 +64,12 @@ def tearDown(self): def test_develop(self): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return - dist = Distribution() + dist = Distribution( + dict(name='foo', + packages=['foo'], + use_2to3=True, + version='0.0', + )) dist.script_name = 'setup.py' cmd = develop(dist) cmd.user = 1 @@ -71,7 +77,7 @@ def test_develop(self): cmd.install_dir = site.USER_SITE cmd.user = 1 old_stdout = sys.stdout - sys.stdout = StringIO() + #sys.stdout = StringIO() try: cmd.run() finally: @@ -80,17 +86,17 @@ def test_develop(self): # let's see if we got our egg link at the right place content = os.listdir(site.USER_SITE) content.sort() - self.assertEquals(content, ['UNKNOWN.egg-link', 'easy-install.pth']) + self.assertEquals(content, ['easy-install.pth', 'foo.egg-link']) # Check that we are using the right code. - path = open(os.path.join(site.USER_SITE, 'UNKNOWN.egg-link'), 'rt').read().split()[0].strip() + path = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt').read().split()[0].strip() init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip() if sys.version < "3": self.assertEquals(init, 'print "foo"') else: self.assertEquals(init, 'print("foo")') - def test_develop_with_setup_requires(self): + def notest_develop_with_setup_requires(self): wanted = ("Could not find suitable distribution for " "Requirement.parse('I-DONT-EXIST')") diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 87ccaf448e..04134ec5fc 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -107,8 +107,9 @@ def test_test(self): old_stdout = sys.stdout sys.stdout = StringIO() try: - cmd.run() - except SystemExit: # The test runner calls sys.exit, stop that making an error. - pass + try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements. + cmd.run() + except SystemExit: # The test runner calls sys.exit, stop that making an error. + pass finally: sys.stdout = old_stdout From 49b3d3139224fd5a6b89815af233b77244dc5bc8 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Tue, 21 Aug 2012 21:03:17 +0200 Subject: [PATCH 3532/8469] Documentation updates. --HG-- branch : distribute extra : rebase_source : ee1e27c3d9bb64e536b6f0c86d46d573db505b03 --- CHANGES.txt | 4 ++++ docs/setuptools.txt | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a08cba780c..8fc1c3ff8d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,10 @@ CHANGES ------ * Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3. +* Issue #299: The develop command didn't work on Python 3, when using 2to3, + as the egg link would go to the Python 2 source. Linking to the 2to3'd code + in build/lib makes it work, although you will have to rebuild the module + before testing it. ------ 0.6.28 diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 4105dc2e41..d04973e7fa 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1082,6 +1082,14 @@ update the ``easy-install.pth`` file to include your project's source code, thereby making it available on ``sys.path`` for all programs using that Python installation. +If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` +will not link directly to your source code when run under Python 3, since +that source code would be made for Python 2 and not work under Python 3. +Instead the ``setup.py develop`` will build Python 3 code under the ``build`` +directory, and link there. This means that after doing code changes you will +have to run ``setup.py build`` before these changes are picked up by your +Python 3 installation. + In addition, the ``develop`` command creates wrapper scripts in the target script directory that will run your in-development scripts after ensuring that all your ``install_requires`` packages are available on ``sys.path``. From 09e17ec652658269939b018ed50bdec2cc2c5bc1 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 10:45:10 +0200 Subject: [PATCH 3533/8469] Python 3.3b2's importlib doesn't like sys.paths that dissappear. By having a relative path in sys.path and then doinga chdir() that's exactly what happens. This bug will be fixed in the next 3.3 release, but there is no drawback to adding the path as an absolute path, so we do that to make the tests run under 3.3b2. --HG-- branch : distribute extra : rebase_source : 51c5ac7f8916ca85fb2633b8cdbd7aa2e759e67e --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9df6bb495e..9a0fffb41b 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ util.run_2to3(outfiles_2to3) # arrange setup to use the copy - sys.path.insert(0, tmp_src) + sys.path.insert(0, os.path.abspath(tmp_src)) src_root = tmp_src from distutils.util import convert_path From e19d57773e1abb8d8f3f46417b07c1617d2d91ea Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 10:48:44 +0200 Subject: [PATCH 3534/8469] The error message changed in Python 3.3. --HG-- branch : distribute extra : rebase_source : 107ac0ce6d98f4b17f31a6f4c006b1ae2e21381b --- setuptools/tests/test_packageindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 1b4d2fdf59..886befcb2b 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -73,7 +73,7 @@ def test_bad_url_double_scheme(self): index.open_url(url) except distutils.errors.DistutilsError, error: msg = unicode(error) - assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg + assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg or 'Name or service not known' in msg return raise RuntimeError("Did not raise") From 9dc9fea4a5661e119f30f4cdec3ef99e46b5f919 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 12:32:11 +0200 Subject: [PATCH 3535/8469] Issue #306: Even if 2to3 is used, we build in-place under Python 2. --HG-- branch : distribute extra : rebase_source : db4a1a3059533ad0c894f12c31e3fe1c238f4292 --- CHANGES.txt | 1 + setuptools/command/develop.py | 4 ++-- setuptools/command/test.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8fc1c3ff8d..c594a1031c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ CHANGES as the egg link would go to the Python 2 source. Linking to the 2to3'd code in build/lib makes it work, although you will have to rebuild the module before testing it. +* Issue #306: Even if 2to3 is used, we build in-place under Python 2. ------ 0.6.28 diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index c8bef72ef7..709e349c73 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -3,7 +3,7 @@ from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError -import os, setuptools, glob +import os, sys, setuptools, glob class develop(easy_install): """Set up package for development""" @@ -84,7 +84,7 @@ def finalize_options(self): " installation directory", p, normalize_path(os.curdir)) def install_for_development(self): - if getattr(self.distribution, 'use_2to3', False): + if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 59c10e84d3..e5cb9bb59c 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -81,7 +81,7 @@ def finalize_options(self): def with_project_on_sys_path(self, func): - if getattr(self.distribution, 'use_2to3', False): + if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date From 03ae7b2149f0eb85a27f893b98f6d35d535456ac Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 12:34:48 +0200 Subject: [PATCH 3536/8469] Tests run under Python 3.3 now. --HG-- branch : distribute extra : rebase_source : 93e360785483082ab272dbf693d3e6ac3772b6ab --- setup.py | 3 +++ test.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/setup.py b/setup.py index 9a0fffb41b..6e04bd2403 100755 --- a/setup.py +++ b/setup.py @@ -212,6 +212,9 @@ def _being_installed(): Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 + Programming Language :: Python :: 3.1 + Programming Language :: Python :: 3.2 + Programming Language :: Python :: 3.3 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration diff --git a/test.sh b/test.sh index d62248f2c4..ed6d4efcb4 100644 --- a/test.sh +++ b/test.sh @@ -55,3 +55,13 @@ else echo "Success" fi +rm -rf build +echo -n "Running tests for Python 3.3..." +python3.3 setup.py -q test > /dev/null 2> /dev/null +if [ $? -ne 0 ];then + echo "Failed" + exit $1 +else + echo "Success" +fi + From a3b6b2bba70b44b62865e6474e5a007400d62884 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 14:14:07 +0200 Subject: [PATCH 3537/8469] Issue #307: Prints the full path when .svn/entries is broken. --HG-- branch : distribute extra : rebase_source : 1836125ab8204364c8fb197d7c20c296a25f89c0 --- CHANGES.txt | 1 + setuptools/command/sdist.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c594a1031c..086ebdee55 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,7 @@ CHANGES in build/lib makes it work, although you will have to rebuild the module before testing it. * Issue #306: Even if 2to3 is used, we build in-place under Python 2. +* Issue #307: Prints the full path when .svn/entries is broken. ------ 0.6.28 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 1f88e93b9f..edb3b7f36c 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -97,7 +97,7 @@ def entries_finder(dirname, filename): for match in entries_pattern.finditer(data): yield joinpath(dirname,unescape(match.group(1))) else: - log.warn("unrecognized .svn/entries format in %s", dirname) + log.warn("unrecognized .svn/entries format in %s", os.path.abspath(dirname)) finders = [ From cafaa3bd07185df0c17a19edee8820494d34267c Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 14:25:48 +0200 Subject: [PATCH 3538/8469] Merged the two lists of acceptable names of README.txt --HG-- branch : distribute extra : rebase_source : 604b23f6559c4688d1b43bc102601e0a0ed914a9 --- setuptools/command/sdist.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index edb3b7f36c..16d3c37b01 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,6 +4,8 @@ import os, re, sys, pkg_resources from glob import glob +READMES = ('README', 'README.rst', 'README.txt') + entities = [ ("<","<"), (">", ">"), (""", '"'), ("'", "'"), ("&", "&") @@ -155,7 +157,7 @@ def run(self): dist_files.append(data) def add_defaults(self): - standards = [('README', 'README.rst', 'README.txt'), + standards = [READMES, self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): @@ -220,13 +222,12 @@ def __read_template_hack(self): read_template = __read_template_hack def check_readme(self): - alts = ("README", "README.txt") - for f in alts: + for f in READMES: if os.path.exists(f): return else: self.warn( - "standard file not found: should have one of " +', '.join(alts) + "standard file not found: should have one of " +', '.join(READMES) ) From ec0ed85656b96812402439fa23c877fd27b99de5 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 16:36:29 +0200 Subject: [PATCH 3539/8469] Issue #313: Support for sdist subcommands (Python 2.7) --HG-- branch : distribute extra : rebase_source : 5461cca20f4c91fec21b69128f76f6e6a0df205c --- CHANGES.txt | 1 + setuptools/command/sdist.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 086ebdee55..98e2246bd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,7 @@ CHANGES before testing it. * Issue #306: Even if 2to3 is used, we build in-place under Python 2. * Issue #307: Prints the full path when .svn/entries is broken. +* Issue #313: Support for sdist subcommands (Python 2.7) ------ 0.6.28 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 16d3c37b01..91c4fd1b6c 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -147,7 +147,17 @@ def run(self): self.filelist = ei_cmd.filelist self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt')) self.check_readme() - self.check_metadata() + + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + # Call check_metadata only if no 'check' command + # (distutils <= 2.6) + import distutils.command + if 'check' not in distutils.command.__all__: + self.check_metadata() + self.make_distribution() dist_files = getattr(self.distribution,'dist_files',[]) From e743dabde0d60aaeca5c9e4dc5c29ac3ac625646 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 16:41:06 +0200 Subject: [PATCH 3540/8469] Got rid of deprecated assert_ and assertEquals. --HG-- branch : distribute extra : rebase_source : 9d7032bac7db98e445ab6a46b2610c278c691c2d --- setuptools/tests/__init__.py | 64 +++++++++++++-------------- setuptools/tests/test_develop.py | 6 +-- setuptools/tests/test_dist_info.py | 6 +-- setuptools/tests/test_easy_install.py | 20 ++++----- setuptools/tests/test_packageindex.py | 18 ++++---- setuptools/tests/test_resources.py | 42 +++++++++--------- tests/test_distribute_setup.py | 6 +-- 7 files changed, 81 insertions(+), 81 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 54c9902e80..eec76efd40 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -102,21 +102,21 @@ def testRequire(self): from email import __version__ self.assertEqual(req.get_version(), __version__) - self.assert_(req.version_ok('1.0.9')) - self.assert_(not req.version_ok('0.9.1')) - self.assert_(not req.version_ok('unknown')) + self.assertTrue(req.version_ok('1.0.9')) + self.assertTrue(not req.version_ok('0.9.1')) + self.assertTrue(not req.version_ok('unknown')) - self.assert_(req.is_present()) - self.assert_(req.is_current()) + self.assertTrue(req.is_present()) + self.assertTrue(req.is_current()) req = Require('Email 3000','03000','email',format=LooseVersion) - self.assert_(req.is_present()) - self.assert_(not req.is_current()) - self.assert_(not req.version_ok('unknown')) + self.assertTrue(req.is_present()) + self.assertTrue(not req.is_current()) + self.assertTrue(not req.version_ok('unknown')) req = Require('Do-what-I-mean','1.0','d-w-i-m') - self.assert_(not req.is_present()) - self.assert_(not req.is_current()) + self.assertTrue(not req.is_present()) + self.assertTrue(not req.is_current()) req = Require('Tests', None, 'tests', homepage="http://example.com") self.assertEqual(req.format, None) @@ -126,8 +126,8 @@ def testRequire(self): self.assertEqual(req.homepage, 'http://example.com') paths = [os.path.dirname(p) for p in __path__] - self.assert_(req.is_present(paths)) - self.assert_(req.is_current(paths)) + self.assertTrue(req.is_present(paths)) + self.assertTrue(req.is_current(paths)) class DistroTests(unittest.TestCase): @@ -144,7 +144,7 @@ def setUp(self): ) def testDistroType(self): - self.assert_(isinstance(self.dist,setuptools.dist.Distribution)) + self.assertTrue(isinstance(self.dist,setuptools.dist.Distribution)) def testExcludePackage(self): self.dist.exclude_package('a') @@ -189,17 +189,17 @@ def testEmpty(self): dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) def testContents(self): - self.assert_(self.dist.has_contents_for('a')) + self.assertTrue(self.dist.has_contents_for('a')) self.dist.exclude_package('a') - self.assert_(not self.dist.has_contents_for('a')) + self.assertTrue(not self.dist.has_contents_for('a')) - self.assert_(self.dist.has_contents_for('b')) + self.assertTrue(self.dist.has_contents_for('b')) self.dist.exclude_package('b') - self.assert_(not self.dist.has_contents_for('b')) + self.assertTrue(not self.dist.has_contents_for('b')) - self.assert_(self.dist.has_contents_for('c')) + self.assertTrue(self.dist.has_contents_for('c')) self.dist.exclude_package('c') - self.assert_(not self.dist.has_contents_for('c')) + self.assertTrue(not self.dist.has_contents_for('c')) def testInvalidIncludeExclude(self): self.assertRaises(DistutilsSetupError, @@ -253,12 +253,12 @@ def setUp(self): ) def testDefaults(self): - self.assert_(not + self.assertTrue(not Feature( "test",standard=True,remove='x',available=False ).include_by_default() ) - self.assert_( + self.assertTrue( Feature("test",standard=True,remove='x').include_by_default() ) # Feature must have either kwargs, removes, or require_features @@ -272,33 +272,33 @@ def testAvailability(self): def testFeatureOptions(self): dist = self.dist - self.assert_( + self.assertTrue( ('with-dwim',None,'include DWIM') in dist.feature_options ) - self.assert_( + self.assertTrue( ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options ) - self.assert_( + self.assertTrue( ('with-bar',None,'include bar (default)') in dist.feature_options ) - self.assert_( + self.assertTrue( ('without-bar',None,'exclude bar') in dist.feature_options ) self.assertEqual(dist.feature_negopt['without-foo'],'with-foo') self.assertEqual(dist.feature_negopt['without-bar'],'with-bar') self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim') - self.assert_(not 'without-baz' in dist.feature_negopt) + self.assertTrue(not 'without-baz' in dist.feature_negopt) def testUseFeatures(self): dist = self.dist self.assertEqual(dist.with_foo,1) self.assertEqual(dist.with_bar,0) self.assertEqual(dist.with_baz,1) - self.assert_(not 'bar_et' in dist.py_modules) - self.assert_(not 'pkg.bar' in dist.packages) - self.assert_('pkg.baz' in dist.packages) - self.assert_('scripts/baz_it' in dist.scripts) - self.assert_(('libfoo','foo/foofoo.c') in dist.libraries) + self.assertTrue(not 'bar_et' in dist.py_modules) + self.assertTrue(not 'pkg.bar' in dist.packages) + self.assertTrue('pkg.baz' in dist.packages) + self.assertTrue('scripts/baz_it' in dist.scripts) + self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries) self.assertEqual(dist.ext_modules,[]) self.assertEqual(dist.require_features, [self.req]) @@ -315,7 +315,7 @@ class TestCommandTests(unittest.TestCase): def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') - self.assert_(isinstance(test_cmd, distutils.cmd.Command)) + self.assertTrue(isinstance(test_cmd, distutils.cmd.Command)) def testLongOptSuiteWNoDefault(self): ts1 = makeSetup(script_args=['test','--test-suite=foo.tests.suite']) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index fcf33c585e..3e071dade9 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -86,15 +86,15 @@ def test_develop(self): # let's see if we got our egg link at the right place content = os.listdir(site.USER_SITE) content.sort() - self.assertEquals(content, ['easy-install.pth', 'foo.egg-link']) + self.assertEqual(content, ['easy-install.pth', 'foo.egg-link']) # Check that we are using the right code. path = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt').read().split()[0].strip() init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip() if sys.version < "3": - self.assertEquals(init, 'print "foo"') + self.assertEqual(init, 'print "foo"') else: - self.assertEquals(init, 'print("foo")') + self.assertEqual(init, 'print("foo")') def notest_develop_with_setup_requires(self): diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 68ba9e2494..001c443361 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -41,9 +41,9 @@ def test_conditional_dependencies(self): pkg_resources.Requirement.parse('quux>=1.1')] for d in pkg_resources.find_distributions(self.tmpdir): - self.assertEquals(d.requires(), requires[:1]) - self.assertEquals(d.requires(extras=('baz',)), requires) - self.assertEquals(d.extras, ['baz']) + self.assertEqual(d.requires(), requires[:1]) + self.assertEqual(d.requires(extras=('baz',)), requires) + self.assertEqual(d.extras, ['baz']) def setUp(self): self.tmpdir = tempfile.mkdtemp() diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7c807fc365..ab02e3145f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -68,7 +68,7 @@ def test_install_site_py(self): try: cmd.install_site_py() sitepy = os.path.join(cmd.install_dir, 'site.py') - self.assert_(os.path.exists(sitepy)) + self.assertTrue(os.path.exists(sitepy)) finally: shutil.rmtree(cmd.install_dir) @@ -81,7 +81,7 @@ def test_get_script_args(self): finally: sys.platform = old_platform - self.assertEquals(script, WANTED) + self.assertEqual(script, WANTED) def test_no_setup_cfg(self): # makes sure easy_install as a command (main) @@ -127,7 +127,7 @@ def test_no_find_links(self): cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') cmd.args = ['ok'] cmd.ensure_finalized() - self.assertEquals(cmd.package_index.scanned_urls, {}) + self.assertEqual(cmd.package_index.scanned_urls, {}) # let's try without it (default behavior) cmd = easy_install(dist) @@ -138,7 +138,7 @@ def test_no_find_links(self): cmd.ensure_finalized() keys = cmd.package_index.scanned_urls.keys() keys.sort() - self.assertEquals(keys, ['link1', 'link2']) + self.assertEqual(keys, ['link1', 'link2']) class TestPTHFileWriter(unittest.TestCase): @@ -147,9 +147,9 @@ def test_add_from_cwd_site_sets_dirty(self): if a distribution is in site but also the cwd ''' pth = PthDistributions('does-not_exist', [os.getcwd()]) - self.assert_(not pth.dirty) + self.assertTrue(not pth.dirty) pth.add(PRDistribution(os.getcwd())) - self.assert_(pth.dirty) + self.assertTrue(pth.dirty) def test_add_from_site_is_ignored(self): if os.name != 'nt': @@ -157,9 +157,9 @@ def test_add_from_site_is_ignored(self): else: location = 'c:\\does_not_exist' pth = PthDistributions('does-not_exist', [location, ]) - self.assert_(not pth.dirty) + self.assertTrue(not pth.dirty) pth.add(PRDistribution(location)) - self.assert_(not pth.dirty) + self.assertTrue(not pth.dirty) class TestUserInstallTest(unittest.TestCase): @@ -246,7 +246,7 @@ def test_local_index(self): cmd.ensure_finalized() cmd.local_index.scan([new_location]) res = cmd.easy_install('foo') - self.assertEquals(res.location, new_location) + self.assertEqual(res.location, new_location) finally: sys.path.remove(target) for basedir in [new_location, target, ]: @@ -309,7 +309,7 @@ def install_clean_argv(): # there should have been two or three requests to the server # (three happens on Python 3.3a) - self.assert_(2 <= len(p_index.requests) <= 3) + self.assertTrue(2 <= len(p_index.requests) <= 3) self.assertEqual(p_index.requests[0].path, '/does-not-exist/') def create_sdist(self, installer): diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 886befcb2b..3e446b54d4 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -17,9 +17,9 @@ def test_bad_url_bad_port(self): try: v = index.open_url(url) except Exception, v: - self.assert_(url in str(v)) + self.assertTrue(url in str(v)) else: - self.assert_(isinstance(v,urllib2.HTTPError)) + self.assertTrue(isinstance(v,urllib2.HTTPError)) def test_bad_url_typo(self): # issue 16 @@ -33,9 +33,9 @@ def test_bad_url_typo(self): try: v = index.open_url(url) except Exception, v: - self.assert_(url in str(v)) + self.assertTrue(url in str(v)) else: - self.assert_(isinstance(v, urllib2.HTTPError)) + self.assertTrue(isinstance(v, urllib2.HTTPError)) def test_bad_url_bad_status_line(self): index = setuptools.package_index.PackageIndex( @@ -53,7 +53,7 @@ def _urlopen(*args): try: v = index.open_url(url) except Exception, v: - self.assert_('line' in str(v)) + self.assertTrue('line' in str(v)) else: raise AssertionError('Should have raise here!') finally: @@ -95,7 +95,7 @@ def test_url_ok(self): hosts=('www.example.com',) ) url = 'file:///tmp/test_package_index' - self.assert_(index.url_ok(url, True)) + self.assertTrue(index.url_ok(url, True)) def test_links_priority(self): """ @@ -128,11 +128,11 @@ def test_links_priority(self): server.stop() # the distribution has been found - self.assert_('foobar' in pi) + self.assertTrue('foobar' in pi) # we have only one link, because links are compared without md5 - self.assert_(len(pi['foobar'])==1) + self.assertTrue(len(pi['foobar'])==1) # the link should be from the index - self.assert_('correct_md5' in pi['foobar'][0].location) + self.assertTrue('correct_md5' in pi['foobar'][0].location) def test_parse_bdist_wininst(self): self.assertEqual(setuptools.package_index.parse_bdist_wininst( diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 3e0309f19d..d08fa32595 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -45,7 +45,7 @@ def testCollection(self): ad.add(Distribution.from_filename("FooPkg-1.2-py2.4.egg")) # Name is in there now - self.assert_(ad['FooPkg']) + self.assertTrue(ad['FooPkg']) # But only 1 package self.assertEqual(list(ad), ['foopkg']) @@ -228,7 +228,7 @@ def assertfields(self, ep): self.assertEqual(ep.module_name,"setuptools.tests.test_resources") self.assertEqual(ep.attrs, ("EntryPointTests",)) self.assertEqual(ep.extras, ("x",)) - self.assert_(ep.load() is EntryPointTests) + self.assertTrue(ep.load() is EntryPointTests) self.assertEqual( str(ep), "foo = setuptools.tests.test_resources:EntryPointTests [x]" @@ -328,20 +328,20 @@ def testBasicContains(self): foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") twist11 = Distribution.from_filename("Twisted-1.1.egg") twist12 = Distribution.from_filename("Twisted-1.2.egg") - self.assert_(parse_version('1.2') in r) - self.assert_(parse_version('1.1') not in r) - self.assert_('1.2' in r) - self.assert_('1.1' not in r) - self.assert_(foo_dist not in r) - self.assert_(twist11 not in r) - self.assert_(twist12 in r) + self.assertTrue(parse_version('1.2') in r) + self.assertTrue(parse_version('1.1') not in r) + self.assertTrue('1.2' in r) + self.assertTrue('1.1' not in r) + self.assertTrue(foo_dist not in r) + self.assertTrue(twist11 not in r) + self.assertTrue(twist12 in r) def testAdvancedContains(self): r, = parse_requirements("Foo>=1.2,<=1.3,==1.9,>2.0,!=2.5,<3.0,==4.5") for v in ('1.2','1.2.2','1.3','1.9','2.0.1','2.3','2.6','3.0c1','4.5'): - self.assert_(v in r, (v,r)) + self.assertTrue(v in r, (v,r)) for v in ('1.2c1','1.3.1','1.5','1.9.1','2.0','2.5','3.0','4.0'): - self.assert_(v not in r, (v,r)) + self.assertTrue(v not in r, (v,r)) def testOptionsAndHashing(self): @@ -363,14 +363,14 @@ def testVersionEquality(self): r2 = Requirement.parse("foo!=0.3a4") d = Distribution.from_filename - self.assert_(d("foo-0.3a4.egg") not in r1) - self.assert_(d("foo-0.3a1.egg") not in r1) - self.assert_(d("foo-0.3a4.egg") not in r2) + self.assertTrue(d("foo-0.3a4.egg") not in r1) + self.assertTrue(d("foo-0.3a1.egg") not in r1) + self.assertTrue(d("foo-0.3a4.egg") not in r2) - self.assert_(d("foo-0.3a2.egg") in r1) - self.assert_(d("foo-0.3a2.egg") in r2) - self.assert_(d("foo-0.3a3.egg") in r2) - self.assert_(d("foo-0.3a5.egg") in r2) + self.assertTrue(d("foo-0.3a2.egg") in r1) + self.assertTrue(d("foo-0.3a2.egg") in r2) + self.assertTrue(d("foo-0.3a3.egg") in r2) + self.assertTrue(d("foo-0.3a5.egg") in r2) def testDistributeSetuptoolsOverride(self): # Plain setuptools or distribute mean we return distribute. @@ -489,7 +489,7 @@ def c(s1,s2): def testVersionOrdering(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - self.assert_(p1 Date: Wed, 22 Aug 2012 16:48:48 +0200 Subject: [PATCH 3541/8469] Issue #314: test_local_index() would fail an OS X. --HG-- branch : distribute extra : rebase_source : 8d91abdbed53300e6ec80bd535e00bca17767206 --- CHANGES.txt | 1 + setuptools/tests/test_easy_install.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 98e2246bd4..9ae342e762 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ CHANGES * Issue #306: Even if 2to3 is used, we build in-place under Python 2. * Issue #307: Prints the full path when .svn/entries is broken. * Issue #313: Support for sdist subcommands (Python 2.7) +* Issue #314: test_local_index() would fail an OS X. ------ 0.6.28 diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ab02e3145f..13f668d021 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -246,7 +246,8 @@ def test_local_index(self): cmd.ensure_finalized() cmd.local_index.scan([new_location]) res = cmd.easy_install('foo') - self.assertEqual(res.location, new_location) + self.assertEqual(os.path.realpath(res.location), + os.path.realpath(new_location)) finally: sys.path.remove(target) for basedir in [new_location, target, ]: From ea687a55fe5d94167a1bf1ff4a75a0c14b5407cd Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 17:36:10 +0200 Subject: [PATCH 3542/8469] Issue 315: --HG-- branch : distribute extra : rebase_source : c7ad76794ac6db2a4bc1abc88e646ddcd14550db --- setuptools/tests/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 7b5cacb934..daccaba925 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -2,6 +2,7 @@ """ import urllib2 import sys +import time import threading import BaseHTTPServer from BaseHTTPServer import HTTPServer @@ -34,6 +35,9 @@ def start(self): def stop(self): "Stop the server" + # Let the server finish the last request adn wait for a new one. + time.sleep(0.1) + # self.shutdown is not supported on python < 2.6, so just # set _run to false, and make a request, causing it to # terminate. From 0d962727403be73b0b1eac234ed81b941dd7cae9 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Wed, 22 Aug 2012 18:01:49 +0200 Subject: [PATCH 3543/8469] Issue #310: Non-ascii characters in a namespace __init__.py causes errors. --HG-- branch : distribute extra : rebase_source : 668e1c79a2bcc314bcf1f7213b317766bb8511ab --- CHANGES.txt | 1 + setuptools/command/build_py.py | 4 ++-- setuptools/tests/test_test.py | 21 +++++++++++++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9ae342e762..3eea84eb78 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,7 @@ CHANGES * Issue #307: Prints the full path when .svn/entries is broken. * Issue #313: Support for sdist subcommands (Python 2.7) * Issue #314: test_local_index() would fail an OS X. +* Issue #310: Non-ascii characters in a namespace __init__.py causes errors. ------ 0.6.28 diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index d53960fe47..505dd4f30a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -215,8 +215,8 @@ def check_package(self, package, package_dir): else: return init_py - f = open(init_py,'rU') - if 'declare_namespace' not in f.read(): + f = open(init_py,'rbU') + if 'declare_namespace'.encode() not in f.read(): from distutils import log log.warn( "WARNING: %s is a namespace package, but its __init__.py does\n" diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 04134ec5fc..ddbebaa90a 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,3 +1,5 @@ +# -*- coding: UTF-8 -*- + """develop tests """ import sys @@ -21,13 +23,19 @@ ) """ -NS_INIT = """ +NS_INIT = """# -*- coding: Latin-1 -*- +# Söme Arbiträry Ünicode to test Issüé 310 try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) """ +# Make sure this is Latin-1 binary, before writing: +if sys.version_info < (3,): + NS_INIT = NS_INIT.decode('UTF-8') +NS_INIT = NS_INIT.encode('Latin-1') + TEST_PY = """import unittest class TestTest(unittest.TestCase): @@ -50,23 +58,23 @@ def setUp(self): os.mkdir(os.path.join(self.dir, 'name', 'space', 'tests')) # setup.py setup = os.path.join(self.dir, 'setup.py') - f = open(setup, 'w') + f = open(setup, 'wt') f.write(SETUP_PY) f.close() self.old_cwd = os.getcwd() # name/__init__.py init = os.path.join(self.dir, 'name', '__init__.py') - f = open(init, 'w') + f = open(init, 'wb') f.write(NS_INIT) f.close() # name/space/__init__.py init = os.path.join(self.dir, 'name', 'space', '__init__.py') - f = open(init, 'w') + f = open(init, 'wt') f.write('#empty\n') f.close() # name/space/tests/__init__.py init = os.path.join(self.dir, 'name', 'space', 'tests', '__init__.py') - f = open(init, 'w') + f = open(init, 'wt') f.write(TEST_PY) f.close() @@ -105,7 +113,7 @@ def test_test(self): cmd.install_dir = site.USER_SITE cmd.user = 1 old_stdout = sys.stdout - sys.stdout = StringIO() + #sys.stdout = StringIO() try: try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements. cmd.run() @@ -113,3 +121,4 @@ def test_test(self): pass finally: sys.stdout = old_stdout + \ No newline at end of file From f090838c3613065fd6505cd390511a96e08755c4 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 22 Aug 2012 19:32:00 +0200 Subject: [PATCH 3544/8469] Fix a typo in a comment. --HG-- branch : distribute extra : rebase_source : 779baf947b6989f1275d99cff2044adad3dd7997 --- setuptools/tests/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index daccaba925..b2ab7acc7c 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -35,7 +35,7 @@ def start(self): def stop(self): "Stop the server" - # Let the server finish the last request adn wait for a new one. + # Let the server finish the last request and wait for a new one. time.sleep(0.1) # self.shutdown is not supported on python < 2.6, so just From 0e095bea8335a02f3e9ca868a5f689b79fc1aca9 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 22 Aug 2012 19:42:22 +0200 Subject: [PATCH 3545/8469] Delete redundant tests. setuptools/tests/test_bdist_egg.py is testing the same functionality. --HG-- branch : distribute extra : rebase_source : d53119dd1c6074923e8f42216d1ab773f2bc2467 --- tests/python3.3_bdist_egg_test/module.py | 0 tests/python3.3_bdist_egg_test/setup.py | 13 ------------- tests/test_python33_bdist_egg.py | 19 ------------------- 3 files changed, 32 deletions(-) delete mode 100644 tests/python3.3_bdist_egg_test/module.py delete mode 100644 tests/python3.3_bdist_egg_test/setup.py delete mode 100644 tests/test_python33_bdist_egg.py diff --git a/tests/python3.3_bdist_egg_test/module.py b/tests/python3.3_bdist_egg_test/module.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/python3.3_bdist_egg_test/setup.py b/tests/python3.3_bdist_egg_test/setup.py deleted file mode 100644 index 04caea7434..0000000000 --- a/tests/python3.3_bdist_egg_test/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -from setuptools import setup - -setup( - name='python3.3_bdist_egg_test', - version='0.0.0', - description='Test', - license='BSD', - py_modules=['module'], - author='Marc Abramowitz', - author_email='marc@marc-abramowitz.com', - url='https://bitbucket.org/msabramo/python3.3_bdist_egg_test', - # zip_safe=False, -) diff --git a/tests/test_python33_bdist_egg.py b/tests/test_python33_bdist_egg.py deleted file mode 100644 index 9f32470a32..0000000000 --- a/tests/test_python33_bdist_egg.py +++ /dev/null @@ -1,19 +0,0 @@ -import sys -import os -import unittest - -CURDIR = os.path.abspath(os.path.dirname(__file__)) -TOPDIR = os.path.split(CURDIR)[0] -sys.path.insert(0, TOPDIR) - -from distribute_setup import _python_cmd - -class TestPython33BdistEgg(unittest.TestCase): - - def test_build_egg(self): - os.chdir(os.path.join(CURDIR, 'python3.3_bdist_egg_test')) - self.assertTrue(_python_cmd("setup.py", "bdist_egg")) - - -if __name__ == '__main__': - unittest.main() From f8d45b50bfcafabe759183e716059a2e2f702420 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Fri, 24 Aug 2012 15:33:56 +0200 Subject: [PATCH 3546/8469] Oups. --HG-- branch : distribute extra : rebase_source : 515bd00c3028ba0d58e57fd51d524a798b9b898d --- setuptools/tests/test_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index ddbebaa90a..ad7cbd0f96 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -113,7 +113,7 @@ def test_test(self): cmd.install_dir = site.USER_SITE cmd.user = 1 old_stdout = sys.stdout - #sys.stdout = StringIO() + sys.stdout = StringIO() try: try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements. cmd.run() From 977f4db35a9390a3e10cd184f69fb2d42886b639 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 23 Jul 2012 22:31:07 -0400 Subject: [PATCH 3547/8469] use frozenset; 'empty marker' heuristic --HG-- branch : distribute extra : rebase_source : ebe5e94ea2a4dbea2754bef5d056f65f85fe6423 --- pkg_resources.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 27b9f83451..ca0f21c4ee 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2484,7 +2484,8 @@ def _compute_dependencies(self): """Recompute this distribution's dependencies.""" def dummy_marker(marker): def marker_fn(environment=None, override=None): - return True + # 'empty markers are True' heuristic won't install extra deps. + return not marker.strip() marker_fn.__doc__ = marker return marker_fn try: @@ -2506,12 +2507,12 @@ def reqs_for_extra(extra): if req.marker_fn(override={'extra':extra}): yield req - common = set(reqs_for_extra(None)) + common = frozenset(reqs_for_extra(None)) dm[None].extend(common) for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: extra = safe_extra(extra.strip()) - dm[extra] = list(set(reqs_for_extra(extra)) - common) + dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm From 4084ebc22ff58d406b73fe25c069b5235f04c4d8 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 25 Jul 2012 05:11:56 +0200 Subject: [PATCH 3548/8469] Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3. Scanning of these files was fixed in commit 2479772eeea7. --HG-- branch : distribute extra : rebase_source : fcbb14f0e6efc2c42b691fa2a8920816903ede42 --- CHANGES.txt | 11 ++++++++--- setuptools/command/bdist_egg.py | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 14f26d2676..a08cba780c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,15 +2,20 @@ CHANGES ======= +------ +0.6.29 +------ + +* Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3. + ------ 0.6.28 ------ -* Issue 294: setup.py can now be invoked from any directory. +* Issue #294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. * Added support for .dist-info directories. -* Issue #283 bdist_egg issues with python 3.3.0aX. -* Test and fix for marshal.load of .pyc files on Python 3.3. +* Issue #283: Fix and disable scanning of *.pyc / *.pyo files on Python 3.3. ------ 0.6.27 diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index cf2d75e4c9..0ee9c55b86 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -463,8 +463,6 @@ def iter_symbols(code): yield name def can_scan(): - if sys.version_info > (3, 3): - return False # Can't scan recent formats if not sys.platform.startswith('java') and sys.platform != 'cli': # CPython, PyPy, etc. return True From 1f80bd3ac6984d9941f06f1290639fc9572d59ed Mon Sep 17 00:00:00 2001 From: Richard Oudkerk Date: Fri, 27 Jul 2012 12:06:55 +0100 Subject: [PATCH 3549/8469] Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path. --- sysconfig.py | 17 +++++++++++++++++ tests/test_sysconfig.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index 910e1047ab..317640ca89 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -533,6 +533,23 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + # Always convert srcdir to an absolute path + srcdir = _config_vars.get('srcdir', project_base) + if os.name == 'posix': + if python_build: + # If srcdir is a relative path (typically '.' or '..') + # then it should be interpreted relative to the directory + # containing Makefile. + base = os.path.dirname(get_makefile_filename()) + srcdir = os.path.join(base, srcdir) + else: + # srcdir is not meaningful since the installation is + # spread about the filesystem. We choose the + # directory containing the Makefile since we know it + # exists. + srcdir = os.path.dirname(get_makefile_filename()) + _config_vars['srcdir'] = os.path.abspath(os.path.normpath(srcdir)) + # Convert srcdir into an absolute path if it appears necessary. # Normally it is relative to the build directory. However, during # testing, for example, we might be running a non-installed python diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 545ef3b548..546bb721a4 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -53,6 +53,34 @@ def test_get_config_vars(self): self.assertTrue(isinstance(cvars, dict)) self.assertTrue(cvars) + def test_srcdir(self): + # See Issues #15322, #15364. + srcdir = sysconfig.get_config_var('srcdir') + + self.assertTrue(os.path.isabs(srcdir), srcdir) + self.assertTrue(os.path.isdir(srcdir), srcdir) + + if sysconfig.python_build: + # The python executable has not been installed so srcdir + # should be a full source checkout. + Python_h = os.path.join(srcdir, 'Include', 'Python.h') + self.assertTrue(os.path.exists(Python_h), Python_h) + self.assertTrue(sysconfig._is_python_source_dir(srcdir)) + elif os.name == 'posix': + self.assertEqual(sysconfig.get_makefile_filename(), srcdir) + + def test_srcdir_independent_of_cwd(self): + # srcdir should be independent of the current working directory + # See Issues #15322, #15364. + srcdir = sysconfig.get_config_var('srcdir') + cwd = os.getcwd() + try: + os.chdir('..') + srcdir2 = sysconfig.get_config_var('srcdir') + finally: + os.chdir(cwd) + self.assertEqual(srcdir, srcdir2) + def test_customize_compiler(self): # not testing if default compiler is not unix From cd406fc66618543efe51a4867f8b0ecfe90c9a3e Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 27 Jul 2012 23:37:04 -0700 Subject: [PATCH 3550/8469] Issue #15364: Fix test_srcdir for the installed case. --- tests/test_sysconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 546bb721a4..826ea4247d 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -67,7 +67,8 @@ def test_srcdir(self): self.assertTrue(os.path.exists(Python_h), Python_h) self.assertTrue(sysconfig._is_python_source_dir(srcdir)) elif os.name == 'posix': - self.assertEqual(sysconfig.get_makefile_filename(), srcdir) + self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()), + srcdir) def test_srcdir_independent_of_cwd(self): # srcdir should be independent of the current working directory From ad445467dd7ddd5e69165fa38b83d303c096f132 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Fri, 10 Aug 2012 12:49:20 +0100 Subject: [PATCH 3551/8469] Set permissions when extracting from zipfile. --HG-- branch : distribute extra : rebase_source : 68b7fd4d6cc28f77a7202c5e7f63121d721be624 --- setuptools/archive_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 5787753f2a..8ad147521b 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -158,6 +158,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): finally: f.close() del data + os.chmod(target, info.external_attr >> 16) finally: z.close() From 8a0aec34b9d22cd514bcc2404b3cab7242d90a79 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 11 Aug 2012 08:49:20 +0200 Subject: [PATCH 3552/8469] Bump to 3.3b2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7a7b8d6cb1..15042770d9 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0b1" +__version__ = "3.3.0b2" #--end constants-- From 1cfadca0b0482f1f0ab379c7427dff4b627cec32 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 25 Aug 2012 12:16:37 +0200 Subject: [PATCH 3553/8469] Bump to 3.3.0rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 15042770d9..8d73b51cbe 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0b2" +__version__ = "3.3.0rc1" #--end constants-- From 776fdebc918822b57286ac7a2107f8766f43ce56 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 25 Aug 2012 15:26:08 -0400 Subject: [PATCH 3554/8469] add markerlib as _markerlib --HG-- branch : distribute extra : rebase_source : b9d8fa81db6c6fc3d89db54a70778eb3e8396e17 --- _markerlib/__init__.py | 1 + _markerlib/_markers_ast.py | 132 +++++++++++++++++++++++++++++ _markerlib/markers.py | 110 ++++++++++++++++++++++++ _markerlib/test_markerlib.py | 90 ++++++++++++++++++++ pkg_resources.py | 4 +- setuptools/tests/test_dist_info.py | 12 +-- 6 files changed, 342 insertions(+), 7 deletions(-) create mode 100644 _markerlib/__init__.py create mode 100644 _markerlib/_markers_ast.py create mode 100644 _markerlib/markers.py create mode 100644 _markerlib/test_markerlib.py diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py new file mode 100644 index 0000000000..ef8c994c15 --- /dev/null +++ b/_markerlib/__init__.py @@ -0,0 +1 @@ +from _markerlib.markers import default_environment, compile, interpret, as_function diff --git a/_markerlib/_markers_ast.py b/_markerlib/_markers_ast.py new file mode 100644 index 0000000000..b7a5e0b9d8 --- /dev/null +++ b/_markerlib/_markers_ast.py @@ -0,0 +1,132 @@ +# -*- coding: utf-8 -*- +""" +Just enough of ast.py for markers.py +""" + +from _ast import AST, PyCF_ONLY_AST + +def parse(source, filename='', mode='exec'): + """ + Parse the source into an AST node. + Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). + """ + return compile(source, filename, mode, PyCF_ONLY_AST) + +def copy_location(new_node, old_node): + """ + Copy source location (`lineno` and `col_offset` attributes) from + *old_node* to *new_node* if possible, and return *new_node*. + """ + for attr in 'lineno', 'col_offset': + if attr in old_node._attributes and attr in new_node._attributes \ + and hasattr(old_node, attr): + setattr(new_node, attr, getattr(old_node, attr)) + return new_node + +def iter_fields(node): + """ + Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` + that is present on *node*. + """ + for field in node._fields: + try: + yield field, getattr(node, field) + except AttributeError: + pass + +class NodeVisitor(object): + """ + A node visitor base class that walks the abstract syntax tree and calls a + visitor function for every node found. This function may return a value + which is forwarded by the `visit` method. + + This class is meant to be subclassed, with the subclass adding visitor + methods. + + Per default the visitor functions for the nodes are ``'visit_'`` + + class name of the node. So a `TryFinally` node visit function would + be `visit_TryFinally`. This behavior can be changed by overriding + the `visit` method. If no visitor function exists for a node + (return value `None`) the `generic_visit` visitor is used instead. + + Don't use the `NodeVisitor` if you want to apply changes to nodes during + traversing. For this a special visitor exists (`NodeTransformer`) that + allows modifications. + """ + + def visit(self, node): + """Visit a node.""" + method = 'visit_' + node.__class__.__name__ + visitor = getattr(self, method, self.generic_visit) + return visitor(node) + +# def generic_visit(self, node): +# """Called if no explicit visitor function exists for a node.""" +# for field, value in iter_fields(node): +# if isinstance(value, list): +# for item in value: +# if isinstance(item, AST): +# self.visit(item) +# elif isinstance(value, AST): +# self.visit(value) + + +class NodeTransformer(NodeVisitor): + """ + A :class:`NodeVisitor` subclass that walks the abstract syntax tree and + allows modification of nodes. + + The `NodeTransformer` will walk the AST and use the return value of the + visitor methods to replace or remove the old node. If the return value of + the visitor method is ``None``, the node will be removed from its location, + otherwise it is replaced with the return value. The return value may be the + original node in which case no replacement takes place. + + Here is an example transformer that rewrites all occurrences of name lookups + (``foo``) to ``data['foo']``:: + + class RewriteName(NodeTransformer): + + def visit_Name(self, node): + return copy_location(Subscript( + value=Name(id='data', ctx=Load()), + slice=Index(value=Str(s=node.id)), + ctx=node.ctx + ), node) + + Keep in mind that if the node you're operating on has child nodes you must + either transform the child nodes yourself or call the :meth:`generic_visit` + method for the node first. + + For nodes that were part of a collection of statements (that applies to all + statement nodes), the visitor may also return a list of nodes rather than + just a single node. + + Usually you use the transformer like this:: + + node = YourTransformer().visit(node) + """ + + def generic_visit(self, node): + for field, old_value in iter_fields(node): + old_value = getattr(node, field, None) + if isinstance(old_value, list): + new_values = [] + for value in old_value: + if isinstance(value, AST): + value = self.visit(value) + if value is None: + continue + elif not isinstance(value, AST): + new_values.extend(value) + continue + new_values.append(value) + old_value[:] = new_values + elif isinstance(old_value, AST): + new_node = self.visit(old_value) + if new_node is None: + delattr(node, field) + else: + setattr(node, field, new_node) + return node + \ No newline at end of file diff --git a/_markerlib/markers.py b/_markerlib/markers.py new file mode 100644 index 0000000000..293adf7235 --- /dev/null +++ b/_markerlib/markers.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +"""Interpret PEP 345 environment markers. + +EXPR [in|==|!=|not in] EXPR [or|and] ... + +where EXPR belongs to any of those: + + python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) + python_full_version = sys.version.split()[0] + os.name = os.name + sys.platform = sys.platform + platform.version = platform.version() + platform.machine = platform.machine() + platform.python_implementation = platform.python_implementation() + a free string, like '2.4', or 'win32' +""" + +__all__ = ['default_environment', 'compile', 'interpret'] + +# Would import from ast but for Python 2.5 +from _ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop +try: + from ast import parse, copy_location, NodeTransformer +except ImportError: # pragma no coverage + from markerlib._markers_ast import parse, copy_location, NodeTransformer + +import os +import platform +import sys +import weakref + +_builtin_compile = compile + +from platform import python_implementation + +# restricted set of variables +_VARS = {'sys.platform': sys.platform, + 'python_version': '%s.%s' % sys.version_info[:2], + # FIXME parsing sys.platform is not reliable, but there is no other + # way to get e.g. 2.7.2+, and the PEP is defined with sys.version + 'python_full_version': sys.version.split(' ', 1)[0], + 'os.name': os.name, + 'platform.version': platform.version(), + 'platform.machine': platform.machine(), + 'platform.python_implementation': python_implementation(), + 'extra': None # wheel extension + } + +def default_environment(): + """Return copy of default PEP 385 globals dictionary.""" + return dict(_VARS) + +class ASTWhitelist(NodeTransformer): + def __init__(self, statement): + self.statement = statement # for error messages + + ALLOWED = (Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop) + + def visit(self, node): + """Ensure statement only contains allowed nodes.""" + if not isinstance(node, self.ALLOWED): + raise SyntaxError('Not allowed in environment markers.\n%s\n%s' % + (self.statement, + (' ' * node.col_offset) + '^')) + return NodeTransformer.visit(self, node) + + def visit_Attribute(self, node): + """Flatten one level of attribute access.""" + new_node = Name("%s.%s" % (node.value.id, node.attr), node.ctx) + return copy_location(new_node, node) + +def parse_marker(marker): + tree = parse(marker, mode='eval') + new_tree = ASTWhitelist(marker).generic_visit(tree) + return new_tree + +def compile_marker(parsed_marker): + return _builtin_compile(parsed_marker, '', 'eval', + dont_inherit=True) + +_cache = weakref.WeakValueDictionary() + +def compile(marker): + """Return compiled marker as a function accepting an environment dict.""" + try: + return _cache[marker] + except KeyError: + pass + if not marker.strip(): + def marker_fn(environment=None, override=None): + """""" + return True + else: + compiled_marker = compile_marker(parse_marker(marker)) + def marker_fn(environment=None, override=None): + """override updates environment""" + if override is None: + override = {} + if environment is None: + environment = default_environment() + environment.update(override) + return eval(compiled_marker, environment) + marker_fn.__doc__ = marker + _cache[marker] = marker_fn + return _cache[marker] + +as_function = compile # bw compat + +def interpret(marker, environment=None): + return compile(marker)(environment) diff --git a/_markerlib/test_markerlib.py b/_markerlib/test_markerlib.py new file mode 100644 index 0000000000..ff78d672cc --- /dev/null +++ b/_markerlib/test_markerlib.py @@ -0,0 +1,90 @@ +import os +import unittest +import pkg_resources +from setuptools.tests.py26compat import skipIf +from unittest import expectedFailure + +try: + import _ast +except ImportError: + pass + +class TestMarkerlib(unittest.TestCase): + + def test_markers(self): + from _markerlib import interpret, default_environment, compile + + os_name = os.name + + self.assert_(interpret("")) + + self.assert_(interpret("os.name != 'buuuu'")) + self.assert_(interpret("python_version > '1.0'")) + self.assert_(interpret("python_version < '5.0'")) + self.assert_(interpret("python_version <= '5.0'")) + self.assert_(interpret("python_version >= '1.0'")) + self.assert_(interpret("'%s' in os.name" % os_name)) + self.assert_(interpret("'buuuu' not in os.name")) + + self.assertFalse(interpret("os.name == 'buuuu'")) + self.assertFalse(interpret("python_version < '1.0'")) + self.assertFalse(interpret("python_version > '5.0'")) + self.assertFalse(interpret("python_version >= '5.0'")) + self.assertFalse(interpret("python_version <= '1.0'")) + self.assertFalse(interpret("'%s' not in os.name" % os_name)) + self.assertFalse(interpret("'buuuu' in os.name and python_version >= '5.0'")) + + environment = default_environment() + environment['extra'] = 'test' + self.assert_(interpret("extra == 'test'", environment)) + self.assertFalse(interpret("extra == 'doc'", environment)) + + @expectedFailure(NameError) + def raises_nameError(): + interpret("python.version == '42'") + + raises_nameError() + + @expectedFailure(SyntaxError) + def raises_syntaxError(): + interpret("(x for x in (4,))") + + raises_syntaxError() + + statement = "python_version == '5'" + self.assertEqual(compile(statement).__doc__, statement) + + @skipIf('_ast' not in globals(), + "ast not available (Python < 2.5?)") + def test_ast(self): + try: + import ast, nose + raise nose.SkipTest() + except ImportError: + pass + + # Nonsensical code coverage tests. + import _markerlib._markers_ast as _markers_ast + + class Node(_ast.AST): + _fields = ('bogus') + list(_markers_ast.iter_fields(Node())) + + class Node2(_ast.AST): + def __init__(self): + self._fields = ('bogus',) + self.bogus = [Node()] + + class NoneTransformer(_markers_ast.NodeTransformer): + def visit_Attribute(self, node): + return None + + def visit_Str(self, node): + return None + + def visit_Node(self, node): + return [] + + NoneTransformer().visit(_markers_ast.parse('a.b = "c"')) + NoneTransformer().visit(Node2()) + diff --git a/pkg_resources.py b/pkg_resources.py index ca0f21c4ee..63d1897798 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1746,7 +1746,7 @@ def find_on_path(importer, path_item, only=False): # scan for .egg and .egg-info in directory for entry in os.listdir(path_item): lower = entry.lower() - if lower.endswith('.egg-info') or lower.endswith('.dist-info'): + if lower.endswith(('.egg-info', '.dist-info')): fullpath = os.path.join(path_item, entry) if os.path.isdir(fullpath): # egg-info directory, allow getting metadata @@ -2489,7 +2489,7 @@ def marker_fn(environment=None, override=None): marker_fn.__doc__ = marker return marker_fn try: - from markerlib import as_function + from _markerlib import as_function except ImportError: as_function = dummy_marker dm = self.__dep_map = {None: []} diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 001c443361..70dce2d44e 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -7,7 +7,7 @@ import textwrap try: - import markerlib + import _markerlib except: pass @@ -34,8 +34,8 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - @skipIf('markerlib' not in globals(), - "install markerlib to test conditional dependencies") + @skipIf('_markerlib' not in globals(), + "_markerlib is used to test conditional dependencies (Python >= 2.5)") def test_conditional_dependencies(self): requires = [pkg_resources.Requirement.parse('splort==4'), pkg_resources.Requirement.parse('quux>=1.1')] @@ -51,7 +51,8 @@ def setUp(self): 'VersionedDistribution-2.718.dist-info') os.mkdir(versioned) open(os.path.join(versioned, 'METADATA'), 'w+').write(DALS( - """Metadata-Version: 1.2 + """ + Metadata-Version: 1.2 Name: VersionedDistribution Requires-Dist: splort (4) Provides-Extra: baz @@ -62,7 +63,8 @@ def setUp(self): 'UnversionedDistribution.dist-info') os.mkdir(unversioned) open(os.path.join(unversioned, 'METADATA'), 'w+').write(DALS( - """Metadata-Version: 1.2 + """ + Metadata-Version: 1.2 Name: UnversionedDistribution Version: 0.3 Requires-Dist: splort (==4) From 71d6c4c5a29e30a8dac82ad5a79356a5a849e783 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sat, 25 Aug 2012 15:31:37 -0400 Subject: [PATCH 3555/8469] move _markerlib test into setuptools/test --HG-- branch : distribute extra : rebase_source : b2d7118f3a3cdf931ba1e56090a35442bc70fd2a --- .../tests}/test_markerlib.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) rename {_markerlib => setuptools/tests}/test_markerlib.py (85%) diff --git a/_markerlib/test_markerlib.py b/setuptools/tests/test_markerlib.py similarity index 85% rename from _markerlib/test_markerlib.py rename to setuptools/tests/test_markerlib.py index ff78d672cc..4cce0430c0 100644 --- a/_markerlib/test_markerlib.py +++ b/setuptools/tests/test_markerlib.py @@ -1,8 +1,6 @@ import os import unittest -import pkg_resources from setuptools.tests.py26compat import skipIf -from unittest import expectedFailure try: import _ast @@ -11,6 +9,8 @@ class TestMarkerlib(unittest.TestCase): + @skipIf('_ast' not in globals(), + "ast not available (Python < 2.5?)") def test_markers(self): from _markerlib import interpret, default_environment, compile @@ -39,15 +39,23 @@ def test_markers(self): self.assert_(interpret("extra == 'test'", environment)) self.assertFalse(interpret("extra == 'doc'", environment)) - @expectedFailure(NameError) def raises_nameError(): - interpret("python.version == '42'") + try: + interpret("python.version == '42'") + except NameError: + pass + else: + raise Exception("Expected NameError") raises_nameError() - @expectedFailure(SyntaxError) def raises_syntaxError(): - interpret("(x for x in (4,))") + try: + interpret("(x for x in (4,))") + except SyntaxError: + pass + else: + raise Exception("Expected SyntaxError") raises_syntaxError() From 4095eb5d31995c4a80d0a9b5125d8cefbf1d8390 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Sun, 26 Aug 2012 16:46:21 -0400 Subject: [PATCH 3556/8469] Python < 2.5 doesn't support tuple arguments to .endswith() --HG-- branch : distribute extra : rebase_source : c22d5cf00d0f5f053104ff81e60be4701ca27ad8 --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 63d1897798..2d7f247ee9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1746,7 +1746,7 @@ def find_on_path(importer, path_item, only=False): # scan for .egg and .egg-info in directory for entry in os.listdir(path_item): lower = entry.lower() - if lower.endswith(('.egg-info', '.dist-info')): + if lower.endswith('.egg-info') or lower.endswith('.dist-info'): fullpath = os.path.join(path_item, entry) if os.path.isdir(fullpath): # egg-info directory, allow getting metadata From 9ebbe014df37c19976a5a9cb0ac2fa228a03144a Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 27 Aug 2012 18:54:29 -0400 Subject: [PATCH 3557/8469] impractical to support _markerlib on Python < 2.6 (no compile(ast)) --HG-- branch : distribute extra : rebase_source : c5019294d83fab26bc393fe72f086d0b13b1e337 --- _markerlib/__init__.py | 1 + _markerlib/_markers_ast.py | 132 ------------------------------------- _markerlib/markers.py | 12 +--- pkg_resources.py | 6 +- 4 files changed, 7 insertions(+), 144 deletions(-) delete mode 100644 _markerlib/_markers_ast.py diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py index ef8c994c15..a7b260375f 100644 --- a/_markerlib/__init__.py +++ b/_markerlib/__init__.py @@ -1 +1,2 @@ +"""Used by pkg_resources to interpret PEP 345 environment markers.""" from _markerlib.markers import default_environment, compile, interpret, as_function diff --git a/_markerlib/_markers_ast.py b/_markerlib/_markers_ast.py deleted file mode 100644 index b7a5e0b9d8..0000000000 --- a/_markerlib/_markers_ast.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Just enough of ast.py for markers.py -""" - -from _ast import AST, PyCF_ONLY_AST - -def parse(source, filename='', mode='exec'): - """ - Parse the source into an AST node. - Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). - """ - return compile(source, filename, mode, PyCF_ONLY_AST) - -def copy_location(new_node, old_node): - """ - Copy source location (`lineno` and `col_offset` attributes) from - *old_node* to *new_node* if possible, and return *new_node*. - """ - for attr in 'lineno', 'col_offset': - if attr in old_node._attributes and attr in new_node._attributes \ - and hasattr(old_node, attr): - setattr(new_node, attr, getattr(old_node, attr)) - return new_node - -def iter_fields(node): - """ - Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` - that is present on *node*. - """ - for field in node._fields: - try: - yield field, getattr(node, field) - except AttributeError: - pass - -class NodeVisitor(object): - """ - A node visitor base class that walks the abstract syntax tree and calls a - visitor function for every node found. This function may return a value - which is forwarded by the `visit` method. - - This class is meant to be subclassed, with the subclass adding visitor - methods. - - Per default the visitor functions for the nodes are ``'visit_'`` + - class name of the node. So a `TryFinally` node visit function would - be `visit_TryFinally`. This behavior can be changed by overriding - the `visit` method. If no visitor function exists for a node - (return value `None`) the `generic_visit` visitor is used instead. - - Don't use the `NodeVisitor` if you want to apply changes to nodes during - traversing. For this a special visitor exists (`NodeTransformer`) that - allows modifications. - """ - - def visit(self, node): - """Visit a node.""" - method = 'visit_' + node.__class__.__name__ - visitor = getattr(self, method, self.generic_visit) - return visitor(node) - -# def generic_visit(self, node): -# """Called if no explicit visitor function exists for a node.""" -# for field, value in iter_fields(node): -# if isinstance(value, list): -# for item in value: -# if isinstance(item, AST): -# self.visit(item) -# elif isinstance(value, AST): -# self.visit(value) - - -class NodeTransformer(NodeVisitor): - """ - A :class:`NodeVisitor` subclass that walks the abstract syntax tree and - allows modification of nodes. - - The `NodeTransformer` will walk the AST and use the return value of the - visitor methods to replace or remove the old node. If the return value of - the visitor method is ``None``, the node will be removed from its location, - otherwise it is replaced with the return value. The return value may be the - original node in which case no replacement takes place. - - Here is an example transformer that rewrites all occurrences of name lookups - (``foo``) to ``data['foo']``:: - - class RewriteName(NodeTransformer): - - def visit_Name(self, node): - return copy_location(Subscript( - value=Name(id='data', ctx=Load()), - slice=Index(value=Str(s=node.id)), - ctx=node.ctx - ), node) - - Keep in mind that if the node you're operating on has child nodes you must - either transform the child nodes yourself or call the :meth:`generic_visit` - method for the node first. - - For nodes that were part of a collection of statements (that applies to all - statement nodes), the visitor may also return a list of nodes rather than - just a single node. - - Usually you use the transformer like this:: - - node = YourTransformer().visit(node) - """ - - def generic_visit(self, node): - for field, old_value in iter_fields(node): - old_value = getattr(node, field, None) - if isinstance(old_value, list): - new_values = [] - for value in old_value: - if isinstance(value, AST): - value = self.visit(value) - if value is None: - continue - elif not isinstance(value, AST): - new_values.extend(value) - continue - new_values.append(value) - old_value[:] = new_values - elif isinstance(old_value, AST): - new_node = self.visit(old_value) - if new_node is None: - delattr(node, field) - else: - setattr(node, field, new_node) - return node - \ No newline at end of file diff --git a/_markerlib/markers.py b/_markerlib/markers.py index 293adf7235..54c2828a02 100644 --- a/_markerlib/markers.py +++ b/_markerlib/markers.py @@ -12,17 +12,13 @@ platform.version = platform.version() platform.machine = platform.machine() platform.python_implementation = platform.python_implementation() - a free string, like '2.4', or 'win32' + a free string, like '2.6', or 'win32' """ __all__ = ['default_environment', 'compile', 'interpret'] -# Would import from ast but for Python 2.5 -from _ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop -try: - from ast import parse, copy_location, NodeTransformer -except ImportError: # pragma no coverage - from markerlib._markers_ast import parse, copy_location, NodeTransformer +from ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop +from ast import parse, copy_location, NodeTransformer import os import platform @@ -104,7 +100,5 @@ def marker_fn(environment=None, override=None): _cache[marker] = marker_fn return _cache[marker] -as_function = compile # bw compat - def interpret(marker, environment=None): return compile(marker)(environment) diff --git a/pkg_resources.py b/pkg_resources.py index 2d7f247ee9..060db64463 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2489,9 +2489,9 @@ def marker_fn(environment=None, override=None): marker_fn.__doc__ = marker return marker_fn try: - from _markerlib import as_function + from _markerlib import compile as compile_marker except ImportError: - as_function = dummy_marker + compile_marker = dummy_marker dm = self.__dep_map = {None: []} reqs = [] @@ -2499,7 +2499,7 @@ def marker_fn(environment=None, override=None): for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: distvers, mark = self._preparse_requirement(req) parsed = parse_requirements(distvers).next() - parsed.marker_fn = as_function(mark) + parsed.marker_fn = compile_marker(mark) reqs.append(parsed) def reqs_for_extra(extra): From 165f95218ab30580eafba4e2571e03ed14ca482f Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 27 Aug 2012 19:11:13 -0400 Subject: [PATCH 3558/8469] move Python < 2.6 fallback into _markerlib --HG-- branch : distribute extra : rebase_source : 901265cef35594b3ab20ae4ba3b270a5da6f9ea7 --- _markerlib/__init__.py | 18 ++++++++++++++++-- pkg_resources.py | 11 +---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py index a7b260375f..d13e4d5a67 100644 --- a/_markerlib/__init__.py +++ b/_markerlib/__init__.py @@ -1,2 +1,16 @@ -"""Used by pkg_resources to interpret PEP 345 environment markers.""" -from _markerlib.markers import default_environment, compile, interpret, as_function +try: + import ast + from markerlib.markers import default_environment, compile, interpret +except ImportError: + if 'ast' in globals(): + raise + def default_environment(): + return {} + def compile(marker): + def marker_fn(environment=None, override=None): + # 'empty markers are True' heuristic won't install extra deps. + return not marker.strip() + marker_fn.__doc__ = marker + return marker_fn + def interpret(marker, environment=None, override=None): + return compile(marker)() diff --git a/pkg_resources.py b/pkg_resources.py index 060db64463..a5a10eb4b5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2482,16 +2482,7 @@ def _preparse_requirement(self, requires_dist): def _compute_dependencies(self): """Recompute this distribution's dependencies.""" - def dummy_marker(marker): - def marker_fn(environment=None, override=None): - # 'empty markers are True' heuristic won't install extra deps. - return not marker.strip() - marker_fn.__doc__ = marker - return marker_fn - try: - from _markerlib import compile as compile_marker - except ImportError: - compile_marker = dummy_marker + from _markerlib import compile as compile_marker dm = self.__dep_map = {None: []} reqs = [] From dbc8208b379835ee43224e83829b41790347e1e2 Mon Sep 17 00:00:00 2001 From: Pedro Romano Date: Thu, 30 Aug 2012 11:58:22 +0100 Subject: [PATCH 3559/8469] Use 'optparse' module to parse command line arguments. --HG-- branch : distribute extra : rebase_source : 09f901daf15d650d2b2c5f620ef3660d78e5e4b7 --- distribute_setup.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index f3199d125b..5b10f1efb2 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -19,6 +19,7 @@ import fnmatch import tempfile import tarfile +import optparse from distutils import log try: @@ -495,22 +496,27 @@ def sorter(dir1, dir2): self._dbg(1, "tarfile: %s" % e) -def _build_install_args(argv): +def _build_install_args(user_install): install_args = [] - user_install = '--user' in argv - if user_install and sys.version_info < (2, 6): - log.warn("--user requires Python 2.6 or later") - raise SystemExit(1) if user_install: - install_args.append('--user') + if sys.version_info < (2, 6): + log.warn("--user requires Python 2.6 or later") + raise SystemExit(1) + else: + install_args.append('--user') return install_args -def main(argv, version=DEFAULT_VERSION): +def main(version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" + parser = optparse.OptionParser() + parser.add_option( + '--user', dest='user_install', action='store_true', default=False, + help='install in user site package (requires Python 2.6 or later)') + options, args = parser.parse_args() tarball = download_setuptools() - _install(tarball, _build_install_args(argv)) + _install(tarball, _build_install_args(options.user_install)) if __name__ == '__main__': - main(sys.argv[1:]) + main() From 9c822a826b6d0ed1ecd746c6b3f8039054d2c84b Mon Sep 17 00:00:00 2001 From: Pedro Romano Date: Thu, 30 Aug 2012 12:18:15 +0100 Subject: [PATCH 3560/8469] New command line option to enable downloading the distribute package from an alternative location. --HG-- branch : distribute extra : rebase_source : 114d0bb6c9c065ae369b8d0e603eb6d1d3a0b6fc --- distribute_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 5b10f1efb2..eca355ce76 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -513,8 +513,12 @@ def main(version=DEFAULT_VERSION): parser.add_option( '--user', dest='user_install', action='store_true', default=False, help='install in user site package (requires Python 2.6 or later)') + parser.add_option( + '--download-base', dest='download_base', metavar="URL", + default=DEFAULT_URL, + help='alternative URL from where to download the distribute package') options, args = parser.parse_args() - tarball = download_setuptools() + tarball = download_setuptools(download_base=options.download_base) _install(tarball, _build_install_args(options.user_install)) From bf06ab669aacba63dfe4ee8adb5f50b72387c0bd Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Wed, 5 Sep 2012 19:01:58 -0400 Subject: [PATCH 3561/8469] adds a test for pr #4 --HG-- branch : distribute extra : rebase_source : 347b39fb279b7168490a2c62562b4223b6c419e2 --- setuptools/tests/test_sdist.py | 79 ++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 setuptools/tests/test_sdist.py diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py new file mode 100644 index 0000000000..8d9ed922a9 --- /dev/null +++ b/setuptools/tests/test_sdist.py @@ -0,0 +1,79 @@ +"""sdist tests""" + + +import os +import shutil +import sys +import tempfile +import unittest +from StringIO import StringIO + + +from setuptools.command.sdist import sdist +from setuptools.dist import Distribution + + +SETUP_ATTRS = { + 'name': 'sdist_test', + 'version': '0.0', + 'packages': ['sdist_test'], + 'package_data': {'sdist_test': ['*.txt']} +} + + +SETUP_PY = """\ +from setuptools import setup + +setup(**%r) +""" % SETUP_ATTRS + + +class TestSdistTest(unittest.TestCase): + def setUp(self): + self.temp_dir = tempfile.mkdtemp() + f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') + f.write(SETUP_PY) + f.close() + # Set up the rest of the test package + test_pkg = os.path.join(self.temp_dir, 'sdist_test') + os.mkdir(test_pkg) + # *.rst was not included in package_data, so c.rst should not be + # automatically added to the manifest when not under version control + for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: + # Just touch the files; their contents are irrelevant + open(os.path.join(test_pkg, fname), 'w').close() + + self.old_cwd = os.getcwd() + os.chdir(self.temp_dir) + + def tearDown(self): + os.chdir(self.old_cwd) + shutil.rmtree(self.temp_dir) + + def test_package_data_in_sdist(self): + """Regression test for pull request #4: ensures that files listed in + package_data are included in the manifest even if they're not added to + version control. + """ + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # squelch output + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO() + sys.stderr = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + + manifest = cmd.filelist.files + + self.assert_(os.path.join('sdist_test', 'a.txt') in manifest) + self.assert_(os.path.join('sdist_test', 'b.txt') in manifest) + self.assert_(os.path.join('sdist_test', 'c.rst') not in manifest) From 6eece1023d4a0d5e7229d33dc53600e8e31d7942 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Wed, 5 Sep 2012 19:12:10 -0400 Subject: [PATCH 3562/8469] Add a note about how this fix relates to include_package_data. Although still somewhat buried, this should clarify the issue raised in #218, and points out that include_package_data should really only be used if all the relevant files are in a supported version control system. --HG-- branch : distribute extra : rebase_source : e29284c59469ba9543b57afa64a0f52ee07eebf3 --- docs/setuptools.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 4105dc2e41..34169c7e42 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -756,17 +756,18 @@ e.g.:: include_package_data = True ) -This tells setuptools to install any data files it finds in your packages. The -data files must be under CVS or Subversion control, or else they must be +This tells setuptools to install any data files it finds in your packages. +The data files must be under CVS or Subversion control, or else they must be specified via the distutils' ``MANIFEST.in`` file. (They can also be tracked by another revision control system, using an appropriate plugin. See the section below on `Adding Support for Other Revision Control Systems`_ for information on how to write such plugins.) -If you want finer-grained control over what files are included (for example, if -you have documentation files in your package directories and want to exclude -them from installation), then you can also use the ``package_data`` keyword, -e.g.:: +If the data files are not under version control, or are not in a supported +version control system, or if you want finer-grained control over what files +are included (for example, if you have documentation files in your package +directories and want to exclude them from installation), then you can also use +the ``package_data`` keyword, e.g.:: from setuptools import setup, find_packages setup( @@ -822,7 +823,10 @@ converts slashes to appropriate platform-specific separators at build time. (Note: although the ``package_data`` argument was previously only available in ``setuptools``, it was also added to the Python ``distutils`` package as of Python 2.4; there is `some documentation for the feature`__ available on the -python.org website.) +python.org website. If using the setuptools-specific ``include_package_data`` +argument, files specified by ``package_data`` will *not* be automatically +added to the manifest unless they are tracked by a supported version control +system, or are listed in the MANIFEST.in file.) __ http://docs.python.org/dist/node11.html From 9fbb4e4ac9f4ba7c9e4de2168844bf3e6c64416e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Sep 2012 20:45:21 -0400 Subject: [PATCH 3563/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : 96d2de7069a6d567ad125e408df82241f515bd07 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3eea84eb78..82ae6e5802 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,9 @@ CHANGES * Issue #313: Support for sdist subcommands (Python 2.7) * Issue #314: test_local_index() would fail an OS X. * Issue #310: Non-ascii characters in a namespace __init__.py causes errors. +* Issue #218: Improved documentation on behavior of `package_data` and + `include_package_data`. Files indicated by `package_data` are now included + in the manifest. ------ 0.6.28 From 932ea7cc2b1ef4eba5d8c1ee46c64cce529e3207 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Sep 2012 21:10:29 -0400 Subject: [PATCH 3564/8469] Extract argument parsing as a separate function --HG-- branch : distribute extra : rebase_source : d2143d4dd1332558689b6b90770c013bce3a7e37 --- distribute_setup.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index eca355ce76..95ba23c52a 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -20,6 +20,7 @@ import tempfile import tarfile import optparse + from distutils import log try: @@ -496,19 +497,22 @@ def sorter(dir1, dir2): self._dbg(1, "tarfile: %s" % e) -def _build_install_args(user_install): +def _build_install_args(options): + """ + Build the arguments to 'python setup.py install' on the distribute package + """ install_args = [] - if user_install: + if options.user_install: if sys.version_info < (2, 6): log.warn("--user requires Python 2.6 or later") raise SystemExit(1) - else: - install_args.append('--user') + install_args.append('--user') return install_args - -def main(version=DEFAULT_VERSION): - """Install or upgrade setuptools and EasyInstall""" +def _parse_args(): + """ + Parse the command line for options + """ parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, @@ -518,9 +522,14 @@ def main(version=DEFAULT_VERSION): default=DEFAULT_URL, help='alternative URL from where to download the distribute package') options, args = parser.parse_args() - tarball = download_setuptools(download_base=options.download_base) - _install(tarball, _build_install_args(options.user_install)) + # positional arguments are ignored + return options +def main(version=DEFAULT_VERSION): + """Install or upgrade setuptools and EasyInstall""" + options = _parse_args() + tarball = download_setuptools(download_base=options.download_base) + _install(tarball, _build_install_args(options)) if __name__ == '__main__': main() From 06959116eed7effdbf3af575946f619cdb7fcd71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Sep 2012 21:11:19 -0400 Subject: [PATCH 3565/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : f92b138358cd2699cea63bf39a552e10bf62c02d --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 82ae6e5802..b59a0b0011 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,8 @@ CHANGES * Issue #218: Improved documentation on behavior of `package_data` and `include_package_data`. Files indicated by `package_data` are now included in the manifest. +* `distribute_setup.py` now allows a `--download-base` argument for retrieving + distribute from a specified location. ------ 0.6.28 From d847dbfeee2b2c85d7bc0a66813c33836a9850fa Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Thu, 6 Sep 2012 15:51:09 -0400 Subject: [PATCH 3566/8469] Adds a fix for issue #318, including a regression test. This also fixes another test that was passing trivially due to *bug* in yet another test, ugh --HG-- branch : distribute extra : rebase_source : 476550766b7b756dced040ad4356b7685d6f062a --- setuptools/dist.py | 3 +- setuptools/sandbox.py | 10 +-- setuptools/tests/__init__.py | 2 +- setuptools/tests/test_easy_install.py | 102 ++++++++++++++++++++------ 4 files changed, 88 insertions(+), 29 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 0ad18122cf..6607cf7bb4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -264,6 +264,7 @@ def finalize_options(self): def fetch_build_egg(self, req): """Fetch an egg needed for building""" + try: cmd = self._egg_fetcher cmd.package_index.to_scan = [] @@ -287,7 +288,7 @@ def fetch_build_egg(self, req): cmd = easy_install( dist, args=["x"], install_dir=os.curdir, exclude_scripts=True, always_copy=False, build_directory=None, editable=False, - upgrade=False, multi_version=True, no_report = True + upgrade=False, multi_version=True, no_report=True, user=False ) cmd.ensure_finalized() self._egg_fetcher = cmd diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index ab2543d96f..64f725e72d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -166,12 +166,12 @@ def _remap_pair(self,operation,src,dst,*args,**kw): _EXCEPTIONS = [] try: - from win32com.client.gencache import GetGeneratePath - _EXCEPTIONS.append(GetGeneratePath()) - del GetGeneratePath + from win32com.client.gencache import GetGeneratePath + _EXCEPTIONS.append(GetGeneratePath()) + del GetGeneratePath except ImportError: - # it appears pywin32 is not installed, so no need to exclude. - pass + # it appears pywin32 is not installed, so no need to exclude. + pass class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index eec76efd40..b6988a08d7 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -38,7 +38,7 @@ def makeSetup(**args): try: return setuptools.setup(**args) finally: - distutils.core_setup_stop_after = None + distutils.core._setup_stop_after = None class DependsTests(unittest.TestCase): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 13f668d021..ce8b611b47 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -12,6 +12,7 @@ import StringIO import distutils.core +from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import easy_install, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -110,7 +111,9 @@ def _parse_command_line(self): old_wd = os.getcwd() try: os.chdir(dir) - main([]) + reset_setup_stop_context( + lambda: self.assertRaises(SystemExit, main, []) + ) finally: os.chdir(old_wd) shutil.rmtree(dir) @@ -247,7 +250,7 @@ def test_local_index(self): cmd.local_index.scan([new_location]) res = cmd.easy_install('foo') self.assertEqual(os.path.realpath(res.location), - os.path.realpath(new_location)) + os.path.realpath(new_location)) finally: sys.path.remove(target) for basedir in [new_location, target, ]: @@ -262,6 +265,50 @@ def test_local_index(self): else: del os.environ['PYTHONPATH'] + def test_setup_requires(self): + """Regression test for issue #318 + + Ensures that a package with setup_requires can be installed when + distribute is installed in the user site-packages without causing a + SandboxViolation. + """ + + test_setup_attrs = { + 'name': 'test_pkg', 'version': '0.0', + 'setup_requires': ['foobar'], + 'dependency_links': [os.path.abspath(self.dir)] + } + + test_pkg = os.path.join(self.dir, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + + f = open(test_setup_py, 'w') + f.write(textwrap.dedent("""\ + import setuptools + setuptools.setup(**%r) + """ % test_setup_attrs)) + f.close() + + foobar_path = os.path.join(self.dir, 'foobar-0.1.tar.gz') + make_trivial_sdist( + foobar_path, + textwrap.dedent("""\ + import setuptools + setuptools.setup( + name='foobar', + version='0.1' + ) + """)) + + try: + reset_setup_stop_context( + lambda: run_setup(test_setup_py, ['install']) + ) + except SandboxViolation: + self.fail('Installation caused SandboxViolation') + class TestSetupRequires(unittest.TestCase): @@ -319,30 +366,41 @@ def create_sdist(self, installer): doesn't exist) and invoke installer on it. """ def build_sdist(dir): - setup_py = tarfile.TarInfo(name="setup.py") - try: - # Python 3 (StringIO gets converted to io module) - MemFile = StringIO.BytesIO - except AttributeError: - MemFile = StringIO.StringIO - setup_py_bytes = MemFile(textwrap.dedent(""" - import setuptools - setuptools.setup( - name="distribute-test-fetcher", - version="1.0", - setup_requires = ['does-not-exist'], - ) - """).lstrip().encode('utf-8')) - setup_py.size = len(setup_py_bytes.getvalue()) dist_path = os.path.join(dir, 'distribute-test-fetcher-1.0.tar.gz') - dist = tarfile.open(dist_path, 'w:gz') - try: - dist.addfile(setup_py, fileobj=setup_py_bytes) - finally: - dist.close() + make_trivial_sdist( + dist_path, + textwrap.dedent(""" + import setuptools + setuptools.setup( + name="distribute-test-fetcher", + version="1.0", + setup_requires = ['does-not-exist'], + ) + """).lstrip()) installer(dist_path) tempdir_context(build_sdist) + +def make_trivial_sdist(dist_path, setup_py): + """Create a simple sdist tarball at dist_path, containing just a + setup.py, the contents of which are provided by the setup_py string. + """ + + setup_py_file = tarfile.TarInfo(name='setup.py') + try: + # Python 3 (StringIO gets converted to io module) + MemFile = StringIO.BytesIO + except AttributeError: + MemFile = StringIO.StringIO + setup_py_bytes = MemFile(setup_py.encode('utf-8')) + setup_py_file.size = len(setup_py_bytes.getvalue()) + dist = tarfile.open(dist_path, 'w:gz') + try: + dist.addfile(setup_py_file, fileobj=setup_py_bytes) + finally: + dist.close() + + def tempdir_context(f, cd=lambda dir:None): """ Invoke f in the context From f0e94e21399229808cd34bea8cba5175f14ab07d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 9 Sep 2012 08:56:46 +0200 Subject: [PATCH 3567/8469] Bump to 3.3.0rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8d73b51cbe..f23d886420 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0rc1" +__version__ = "3.3.0rc2" #--end constants-- From 8866de1785cc6961d2111f1e0f55b781a7de660d Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Tue, 11 Sep 2012 08:00:12 -0400 Subject: [PATCH 3568/8469] Remove missing import (since b62968cd2666) --HG-- branch : distribute extra : rebase_source : d1190f895d794dfcb838f7eb40a60ab07b8b309e --- _markerlib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py index a7b260375f..9c37bb9aea 100644 --- a/_markerlib/__init__.py +++ b/_markerlib/__init__.py @@ -1,2 +1,2 @@ """Used by pkg_resources to interpret PEP 345 environment markers.""" -from _markerlib.markers import default_environment, compile, interpret, as_function +from _markerlib.markers import default_environment, compile, interpret From cada83b25777a9b089b85bc4417baa7016a9c652 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Tue, 11 Sep 2012 08:12:04 -0400 Subject: [PATCH 3569/8469] Make this test less chatty --HG-- branch : distribute extra : rebase_source : da18973713f46ff00931ea79f0fcd39a13fb8349 --- setuptools/tests/test_easy_install.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ce8b611b47..e49c6f49d8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -302,12 +302,19 @@ def test_setup_requires(self): ) """)) + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO.StringIO() + sys.stderr = StringIO.StringIO() try: reset_setup_stop_context( lambda: run_setup(test_setup_py, ['install']) ) except SandboxViolation: self.fail('Installation caused SandboxViolation') + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr class TestSetupRequires(unittest.TestCase): From dbbfab8fe8a8c146c2353f751d617c8761f6ddc4 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Tue, 11 Sep 2012 13:53:29 -0400 Subject: [PATCH 3570/8469] Fixes and adds a regression test for #323; required adding some new keyword arguments to existing pkg_resources methods. Also had to update how __path__ is handled for namespace packages to ensure that when a new egg distribution containing a namespace package is placed on sys.path, the entries in __path__ are in the same order they would have been in had that egg been on the path when pkg_resources was first imported --HG-- branch : distribute extra : rebase_source : 63a120c9397f6619d2768ec982e5c6b664c97e40 --- pkg_resources.py | 60 +++++++---- setuptools/dist.py | 5 +- setuptools/tests/test_easy_install.py | 142 +++++++++++++++++++------- 3 files changed, 148 insertions(+), 59 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 060db64463..7495f1b69e 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -517,7 +517,7 @@ def __iter__(self): seen[key]=1 yield self.by_key[key] - def add(self, dist, entry=None, insert=True): + def add(self, dist, entry=None, insert=True, replace=False): """Add `dist` to working set, associated with `entry` If `entry` is unspecified, it defaults to the ``.location`` of `dist`. @@ -525,8 +525,9 @@ def add(self, dist, entry=None, insert=True): set's ``.entries`` (if it wasn't already present). `dist` is only added to the working set if it's for a project that - doesn't already have a distribution in the set. If it's added, any - callbacks registered with the ``subscribe()`` method will be called. + doesn't already have a distribution in the set, unless `replace=True`. + If it's added, any callbacks registered with the ``subscribe()`` method + will be called. """ if insert: dist.insert_on(self.entries, entry) @@ -535,7 +536,7 @@ def add(self, dist, entry=None, insert=True): entry = dist.location keys = self.entry_keys.setdefault(entry,[]) keys2 = self.entry_keys.setdefault(dist.location,[]) - if dist.key in self.by_key: + if not replace and dist.key in self.by_key: return # ignore hidden distros self.by_key[dist.key] = dist @@ -545,7 +546,8 @@ def add(self, dist, entry=None, insert=True): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None, replacement=True): + def resolve(self, requirements, env=None, installer=None, + replacement=True, replace_conflicting=False): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -555,6 +557,12 @@ def resolve(self, requirements, env=None, installer=None, replacement=True): will be invoked with each requirement that cannot be met by an already-installed distribution; it should return a ``Distribution`` or ``None``. + + Unless `replace_conflicting=True`, raises a VersionConflict exception if + any requirements are found on the path that have the correct name but + the wrong version. Otherwise, if an `installer` is supplied it will be + invoked to obtain the correct version of the requirement and activate + it. """ requirements = list(requirements)[::-1] # set up the stack @@ -574,10 +582,18 @@ def resolve(self, requirements, env=None, installer=None, replacement=True): if dist is None: # Find the best distribution and add it to the map dist = self.by_key.get(req.key) - if dist is None: + if dist is None or (dist not in req and replace_conflicting): + ws = self if env is None: - env = Environment(self.entries) - dist = best[req.key] = env.best_match(req, self, installer) + if dist is None: + env = Environment(self.entries) + else: + # Use an empty environment and workingset to avoid + # any further conflicts with the conflicting + # distribution + env = Environment([]) + ws = WorkingSet([]) + dist = best[req.key] = env.best_match(req, ws, installer) if dist is None: #msg = ("The '%s' distribution was not found on this " # "system, and is required by this application.") @@ -1798,6 +1814,7 @@ def namespace_handler(importer,path_entry,moduleName,module): def _handle_ns(packageName, path_item): """Ensure that named package includes a subpath of path_item (if needed)""" + importer = get_importer(path_item) if importer is None: return None @@ -1807,14 +1824,19 @@ def _handle_ns(packageName, path_item): module = sys.modules.get(packageName) if module is None: module = sys.modules[packageName] = types.ModuleType(packageName) - module.__path__ = []; _set_parent_ns(packageName) + module.__path__ = [] + _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) handler = _find_adapter(_namespace_handlers, importer) - subpath = handler(importer,path_item,packageName,module) + subpath = handler(importer, path_item, packageName, module) if subpath is not None: - path = module.__path__; path.append(subpath) - loader.load_module(packageName); module.__path__ = path + path = module.__path__ + path.append(subpath) + loader.load_module(packageName) + for path_item in path: + if path_item not in module.__path__: + module.__path__.append(path_item) return subpath def declare_namespace(packageName): @@ -2120,7 +2142,7 @@ def _remove_md5_fragment(location): class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' - + def __init__(self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence = EGG_DIST @@ -2459,7 +2481,7 @@ def _parsed_pkg_info(self): from email.parser import Parser self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) return self._pkg_info - + @property def _dep_map(self): try: @@ -2470,7 +2492,7 @@ def _dep_map(self): def _preparse_requirement(self, requires_dist): """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz') - Split environment marker, add == prefix to version specifiers as + Split environment marker, add == prefix to version specifiers as necessary, and remove parenthesis. """ parts = requires_dist.split(';', 1) + [''] @@ -2479,7 +2501,7 @@ def _preparse_requirement(self, requires_dist): distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers) distvers = distvers.replace('(', '').replace(')', '') return (distvers, mark) - + def _compute_dependencies(self): """Recompute this distribution's dependencies.""" def dummy_marker(marker): @@ -2501,7 +2523,7 @@ def marker_fn(environment=None, override=None): parsed = parse_requirements(distvers).next() parsed.marker_fn = compile_marker(mark) reqs.append(parsed) - + def reqs_for_extra(extra): for req in reqs: if req.marker_fn(override={'extra':extra}): @@ -2509,13 +2531,13 @@ def reqs_for_extra(extra): common = frozenset(reqs_for_extra(None)) dm[None].extend(common) - + for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: extra = safe_extra(extra.strip()) dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm - + _distributionImpl = {'.egg': Distribution, '.egg-info': Distribution, diff --git a/setuptools/dist.py b/setuptools/dist.py index 6607cf7bb4..2061c0a2b2 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -242,9 +242,10 @@ def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" from pkg_resources import working_set, parse_requirements for dist in working_set.resolve( - parse_requirements(requires), installer=self.fetch_build_egg + parse_requirements(requires), installer=self.fetch_build_egg, + replace_conflicting=True ): - working_set.add(dist) + working_set.add(dist, replace=True) def finalize_options(self): _Distribution.finalize_options(self) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e49c6f49d8..1540bdc6ed 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -17,8 +17,10 @@ from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution +from pkg_resources import working_set, VersionConflict from pkg_resources import Distribution as PRDistribution import setuptools.tests.server +import pkg_resources try: # import multiprocessing solely for the purpose of testing its existence @@ -273,48 +275,16 @@ def test_setup_requires(self): SandboxViolation. """ - test_setup_attrs = { - 'name': 'test_pkg', 'version': '0.0', - 'setup_requires': ['foobar'], - 'dependency_links': [os.path.abspath(self.dir)] - } - - test_pkg = os.path.join(self.dir, 'test_pkg') + test_pkg = create_setup_requires_package(self.dir) test_setup_py = os.path.join(test_pkg, 'setup.py') - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') - os.mkdir(test_pkg) - f = open(test_setup_py, 'w') - f.write(textwrap.dedent("""\ - import setuptools - setuptools.setup(**%r) - """ % test_setup_attrs)) - f.close() - - foobar_path = os.path.join(self.dir, 'foobar-0.1.tar.gz') - make_trivial_sdist( - foobar_path, - textwrap.dedent("""\ - import setuptools - setuptools.setup( - name='foobar', - version='0.1' - ) - """)) - - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO.StringIO() - sys.stderr = StringIO.StringIO() try: - reset_setup_stop_context( - lambda: run_setup(test_setup_py, ['install']) - ) + quiet_context( + lambda: reset_setup_stop_context( + lambda: run_setup(test_setup_py, ['install']) + )) except SandboxViolation: self.fail('Installation caused SandboxViolation') - finally: - sys.stdout = old_stdout - sys.stderr = old_stderr class TestSetupRequires(unittest.TestCase): @@ -360,7 +330,7 @@ def install_clean_argv(): tempdir_context(install_at) # create an sdist that has a build-time dependency. - self.create_sdist(install) + quiet_context(lambda: self.create_sdist(install)) # there should have been two or three requests to the server # (three happens on Python 3.3a) @@ -387,6 +357,81 @@ def build_sdist(dir): installer(dist_path) tempdir_context(build_sdist) + def test_setup_requires_overrides_version_conflict(self): + """ + Regression test for issue #323. + + Ensures that a distribution's setup_requires requirements can still be + installed and used locally even if a conflicting version of that + requirement is already on the path. + """ + + pr_state = pkg_resources.__getstate__() + fake_dist = PRDistribution('does-not-matter', project_name='foobar', + version='0.0') + working_set.add(fake_dist) + + def setup_and_run(temp_dir): + test_pkg = create_setup_requires_package(temp_dir) + test_setup_py = os.path.join(test_pkg, 'setup.py') + try: + stdout, stderr = quiet_context( + lambda: reset_setup_stop_context( + # Don't even need to install the package, just running + # the setup.py at all is sufficient + lambda: run_setup(test_setup_py, ['--name']) + )) + except VersionConflict: + self.fail('Installing setup.py requirements caused ' + 'VersionConflict') + + lines = stdout.splitlines() + self.assertGreater(len(lines), 0) + self.assert_(lines[-1].strip(), 'test_pkg') + + try: + tempdir_context(setup_and_run) + finally: + pkg_resources.__setstate__(pr_state) + + +def create_setup_requires_package(path): + """Creates a source tree under path for a trivial test package that has a + single requirement in setup_requires--a tarball for that requirement is + also created and added to the dependency_links argument. + """ + + test_setup_attrs = { + 'name': 'test_pkg', 'version': '0.0', + 'setup_requires': ['foobar==0.1'], + 'dependency_links': [os.path.abspath(path)] + } + + test_pkg = os.path.join(path, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + + f = open(test_setup_py, 'w') + f.write(textwrap.dedent("""\ + import setuptools + setuptools.setup(**%r) + """ % test_setup_attrs)) + f.close() + + foobar_path = os.path.join(path, 'foobar-0.1.tar.gz') + make_trivial_sdist( + foobar_path, + textwrap.dedent("""\ + import setuptools + setuptools.setup( + name='foobar', + version='0.1' + ) + """)) + + return test_pkg + def make_trivial_sdist(dist_path, setup_py): """Create a simple sdist tarball at dist_path, containing just a @@ -421,6 +466,7 @@ def tempdir_context(f, cd=lambda dir:None): cd(orig_dir) shutil.rmtree(temp_dir) + def environment_context(f, **updates): """ Invoke f in the context @@ -434,6 +480,7 @@ def environment_context(f, **updates): del os.environ[key] os.environ.update(old_env) + def argv_context(f, repl): """ Invoke f in the context @@ -445,6 +492,7 @@ def argv_context(f, repl): finally: sys.argv[:] = old_argv + def reset_setup_stop_context(f): """ When the distribute tests are run using setup.py test, and then @@ -458,3 +506,21 @@ def reset_setup_stop_context(f): f() finally: distutils.core._setup_stop_after = setup_stop_after + + +def quiet_context(f): + """ + Redirect stdout/stderr to StringIO objects to prevent console output from + distutils commands. + """ + + old_stdout = sys.stdout + old_stderr = sys.stderr + new_stdout = sys.stdout = StringIO.StringIO() + new_stderr = sys.stderr = StringIO.StringIO() + try: + f() + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + return new_stdout.getvalue(), new_stderr.getvalue() From 85097e081f3d987c7acf6ab51e29a307f4f8f167 Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Thu, 13 Sep 2012 00:19:08 +0100 Subject: [PATCH 3571/8469] Make revision specifiable. --HG-- branch : distribute extra : rebase_source : 059208b9bdcd9a0cf2c2f654f25b638a65f2d9d1 --- setuptools/package_index.py | 49 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cd89e9a6bc..e085732d49 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -701,22 +701,53 @@ def _download_svn(self, url, filename): os.system("svn checkout -q %s %s" % (url, filename)) return filename + def _vcs_split_rev_from_url(self, url, pop_prefix=False): + scheme, netloc, path, query, frag = urlparse.urlsplit(url) + + scheme = scheme.split('+', 1)[-1] + + # Some fragment identification fails + path = path.split('#',1)[0] + + rev = None + if '@' in path: + path, rev = path.rsplit('@', 1) + + # Also, discard fragment + url = urlparse.urlunsplit((scheme, netloc, path, query, '')) + + return url, rev + def _download_git(self, url, filename): - if url.startswith('git+'): - url = url[4:] - url = url.split('#',1)[0] # remove any fragment for svn's sake - filename = filename.split('#',1)[0] # remove any fragment to get a decent name. + filename = filename.split('#',1)[0] + url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) + self.info("Doing git clone from %s to %s", url, filename) - os.system("git clone -q %s %s" % (url, filename)) + os.system("git clone --quiet %s %s" % (url, filename)) + + if rev is not None: + self.info("Checking out %s", rev) + os.system("(cd %s && git checkout --quiet %s)" % ( + filename, + rev, + )) + return filename def _download_hg(self, url, filename): - if url.startswith('hg+'): - url = url[3:] - url = url.split('#',1)[0] # remove any fragment for svn's sake - filename = filename.split('#',1)[0] # remove any fragment to get a decent name. + filename = filename.split('#',1)[0] + url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) + self.info("Doing hg clone from %s to %s", url, filename) os.system("hg clone --quiet %s %s" % (url, filename)) + + if rev is not None: + self.info("Updating to %s", rev) + os.system("(cd %s && hg up -C -r %s >&-)" % ( + filename, + rev, + )) + return filename def debug(self, msg, *args): From fa1318a4b29050341b5397685bc26ecf6ed57d52 Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Thu, 13 Sep 2012 00:20:05 +0100 Subject: [PATCH 3572/8469] Add docs for using VCS repos as dependency_links. --HG-- branch : distribute extra : rebase_source : 5795a4e630010c2380cb777c94f9bbc73fafd401 --- docs/setuptools.txt | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 31eedcb160..e0557984c8 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -616,14 +616,20 @@ Dependencies that aren't in PyPI If your project depends on packages that aren't registered in PyPI, you may still be able to depend on them, as long as they are available for download -as an egg, in the standard distutils ``sdist`` format, or as a single ``.py`` -file. You just need to add some URLs to the ``dependency_links`` argument to +as: + +- an egg, in the standard distutils ``sdist`` format, +- a single ``.py`` file, or +- a VCS repository (Subversion, Mercurial, or Git). + +You just need to add some URLs to the ``dependency_links`` argument to ``setup()``. The URLs must be either: -1. direct download URLs, or -2. the URLs of web pages that contain direct download links +1. direct download URLs, +2. the URLs of web pages that contain direct download links, or +3. the repository's URL In general, it's better to link to web pages, because it is usually less complex to update a web page than to release a new version of your project. @@ -637,6 +643,27 @@ by replacing them with underscores.) EasyInstall will recognize this suffix and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file as an egg. +In the case of a VCS checkout, you should also append ``#egg=project-version`` +in order to identify for what package that checkout should be used. You can +append ``@REV`` to the URL's path (before the fragment) to specify a revision. +Additionally, you can also force the VCS being used by prepending the URL with +a certain prefix. Currently available are: + +- ``svn+URL`` for Subversion, +- ``git+URL`` for Git, and +- ``hg+URL`` for Mercurial + +A more complete example would be: + + ``vcs+proto://host/path@revision#egg=project-version`` + +Be careful with the version. It should match the one inside the project files. +If you want do disregard the version, you have to omit it both in the +``requires`` and in the URL's fragment. + +This will do a checkout (or a clone, in Git and Mercurial parlance) to a +temporary folder and run ``setup.py bdist_egg``. + The ``dependency_links`` option takes the form of a list of URL strings. For example, the below will cause EasyInstall to search the specified page for eggs or source distributions, if the package's dependencies aren't already From 25d00ab637a11693f0a82548904058095f0a64cb Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 17 Sep 2012 08:40:37 -0400 Subject: [PATCH 3573/8469] skip markerlib tests on Python < 2.6 (no ast compilation) --HG-- branch : distribute extra : rebase_source : 2044b531becb5ca6882bfb3b59ab53aac2c8ae2e --- setuptools/tests/test_dist_info.py | 6 ++--- setuptools/tests/test_markerlib.py | 40 +++--------------------------- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 70dce2d44e..623ccc471a 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -7,7 +7,7 @@ import textwrap try: - import _markerlib + import ast except: pass @@ -34,8 +34,8 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - @skipIf('_markerlib' not in globals(), - "_markerlib is used to test conditional dependencies (Python >= 2.5)") + @skipIf('ast' not in globals(), + "ast is used to test conditional dependencies (Python >= 2.6)") def test_conditional_dependencies(self): requires = [pkg_resources.Requirement.parse('splort==4'), pkg_resources.Requirement.parse('quux>=1.1')] diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py index 4cce0430c0..7ff2f5841c 100644 --- a/setuptools/tests/test_markerlib.py +++ b/setuptools/tests/test_markerlib.py @@ -3,14 +3,14 @@ from setuptools.tests.py26compat import skipIf try: - import _ast + import ast except ImportError: pass class TestMarkerlib(unittest.TestCase): - @skipIf('_ast' not in globals(), - "ast not available (Python < 2.5?)") + @skipIf('ast' not in globals(), + "ast not available (Python < 2.6?)") def test_markers(self): from _markerlib import interpret, default_environment, compile @@ -62,37 +62,3 @@ def raises_syntaxError(): statement = "python_version == '5'" self.assertEqual(compile(statement).__doc__, statement) - @skipIf('_ast' not in globals(), - "ast not available (Python < 2.5?)") - def test_ast(self): - try: - import ast, nose - raise nose.SkipTest() - except ImportError: - pass - - # Nonsensical code coverage tests. - import _markerlib._markers_ast as _markers_ast - - class Node(_ast.AST): - _fields = ('bogus') - list(_markers_ast.iter_fields(Node())) - - class Node2(_ast.AST): - def __init__(self): - self._fields = ('bogus',) - self.bogus = [Node()] - - class NoneTransformer(_markers_ast.NodeTransformer): - def visit_Attribute(self, node): - return None - - def visit_Str(self, node): - return None - - def visit_Node(self, node): - return [] - - NoneTransformer().visit(_markers_ast.parse('a.b = "c"')) - NoneTransformer().visit(Node2()) - From fb321a77f92988e24bac25f3493397c82146db6a Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Mon, 17 Sep 2012 08:43:15 -0400 Subject: [PATCH 3574/8469] markerlib -> _markerlib --HG-- branch : distribute extra : rebase_source : d44490f6b809c93eb9b20409862ea28a3f039aae --- _markerlib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py index d13e4d5a67..e2b237b1f6 100644 --- a/_markerlib/__init__.py +++ b/_markerlib/__init__.py @@ -1,6 +1,6 @@ try: import ast - from markerlib.markers import default_environment, compile, interpret + from _markerlib.markers import default_environment, compile, interpret except ImportError: if 'ast' in globals(): raise From ffefa25af237361253ed505a9045ae8b9642ae02 Mon Sep 17 00:00:00 2001 From: Lennart Regebro Date: Mon, 17 Sep 2012 15:48:03 +0200 Subject: [PATCH 3575/8469] Fixed so _markerlib is included in Python 3 as well. I don't like the package pollution, but we can maybe fix that later. --HG-- branch : distribute extra : rebase_source : 5b3de3075ffea309979c51df9d6a6a6fb1188050 --- MANIFEST.in | 1 + distribute.egg-info/entry_points.txt | 92 ++++++++++++++-------------- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 461cfd4f13..9837747a22 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ recursive-include setuptools *.py *.txt *.exe recursive-include tests *.py *.c *.pyx *.txt recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html +recursive-include _markerlib *.py include *.py include *.txt include MANIFEST.in diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 663882d630..667a6d7ada 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -develop = setuptools.command.develop:develop -setopt = setuptools.command.setopt:setopt -build_py = setuptools.command.build_py:build_py -saveopts = setuptools.command.saveopts:saveopts -egg_info = setuptools.command.egg_info:egg_info -register = setuptools.command.register:register -upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -install_scripts = setuptools.command.install_scripts:install_scripts -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install = setuptools.command.install:install -test = setuptools.command.test:test -install_lib = setuptools.command.install_lib:install_lib -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist - [egg_info.writers] +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 dependency_links.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements PKG-INFO = setuptools.command.egg_info:write_pkg_info -eager_resources.txt = setuptools.command.egg_info:overwrite_arg top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points +include_package_data = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +use_2to3_fixers = setuptools.dist:assert_string_list +install_requires = setuptools.dist:check_requirements extras_require = setuptools.dist:check_extras +eager_resources = setuptools.dist:assert_string_list use_2to3_exclude_fixers = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data +entry_points = setuptools.dist:check_entry_points namespace_packages = setuptools.dist:check_nsp -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable +use_2to3 = setuptools.dist:assert_bool +tests_require = setuptools.dist:check_requirements packages = setuptools.dist:check_packages +test_suite = setuptools.dist:check_test_suite convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list +package_data = setuptools.dist:check_package_data -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[distutils.commands] +upload_docs = setuptools.command.upload_docs:upload_docs +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +saveopts = setuptools.command.saveopts:saveopts +install_lib = setuptools.command.install_lib:install_lib +register = setuptools.command.register:register +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +build_py = setuptools.command.build_py:build_py +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_ext = setuptools.command.build_ext:build_ext +test = setuptools.command.test:test +egg_info = setuptools.command.egg_info:egg_info +setopt = setuptools.command.setopt:setopt +install = setuptools.command.install:install +install_scripts = setuptools.command.install_scripts:install_scripts +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +sdist = setuptools.command.sdist:sdist + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl From 6cfedcaaf8d8e65a0686b2d856d2eb95fd6c85bf Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Wed, 19 Sep 2012 11:17:36 +0100 Subject: [PATCH 3576/8469] Guard the chmod in case external_attr is 0. --HG-- branch : distribute extra : rebase_source : 79d8c285c70c3cf44273439c5178cfa54b0c3b21 --- setuptools/archive_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 8ad147521b..e22b25c00d 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -158,7 +158,9 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): finally: f.close() del data - os.chmod(target, info.external_attr >> 16) + unix_attributes = info.external_attr >> 16 + if unix_attributes: + os.chmod(target, unix_attributes) finally: z.close() From db43cb973d253a6e01945b61c92f6161921d7ce2 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 23 Sep 2012 17:15:21 +0200 Subject: [PATCH 3577/8469] Bump to 3.3.0rc3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f23d886420..b755eaaf2c 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0rc2" +__version__ = "3.3.0rc3" #--end constants-- From a5609a81b25425fdff1ac8aab120d8d6a4313f8b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 29 Sep 2012 09:04:54 +0200 Subject: [PATCH 3578/8469] Bump version to 3.3.0 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b755eaaf2c..345ac4f8dd 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0rc3" +__version__ = "3.3.0" #--end constants-- From ff6785063112982ccd38892d21859b8a8a45318a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 29 Sep 2012 09:34:13 +0200 Subject: [PATCH 3579/8469] Bump version to 3.4.0 alpha 0. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 345ac4f8dd..70a72b0967 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0" +__version__ = "3.4.0a0" #--end constants-- From 7efb0c1885fecfcc7dfdd2955bdeaab5b6549b48 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 13:02:10 +0200 Subject: [PATCH 3580/8469] Avoid import loop in Python 3.3. Fixes #304. --HG-- branch : distribute extra : rebase_source : 8ce699d489f708a68338b2417771854174a734e8 --- distribute.egg-info/entry_points.txt | 86 ++++++++++++++-------------- site.py | 3 +- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 667a6d7ada..6e3ac87bcd 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -1,61 +1,61 @@ +[distutils.commands] +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +setopt = setuptools.command.setopt:setopt +egg_info = setuptools.command.egg_info:egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +register = setuptools.command.register:register +build_py = setuptools.command.build_py:build_py +sdist = setuptools.command.sdist:sdist +upload_docs = setuptools.command.upload_docs:upload_docs +rotate = setuptools.command.rotate:rotate +alias = setuptools.command.alias:alias +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_lib = setuptools.command.install_lib:install_lib +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +develop = setuptools.command.develop:develop +build_ext = setuptools.command.build_ext:build_ext +easy_install = setuptools.command.easy_install:easy_install +test = setuptools.command.test:test +saveopts = setuptools.command.saveopts:saveopts + +[console_scripts] +easy_install-3.3 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + [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 -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info top_level.txt = setuptools.command.egg_info:write_toplevel_names requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - [distutils.setup_keywords] -include_package_data = setuptools.dist:assert_bool -test_loader = setuptools.dist:check_importable -use_2to3_fixers = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -extras_require = setuptools.dist:check_extras -eager_resources = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data +zip_safe = setuptools.dist:assert_bool +include_package_data = setuptools.dist:assert_bool entry_points = setuptools.dist:check_entry_points -namespace_packages = setuptools.dist:check_nsp -use_2to3 = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data tests_require = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list packages = setuptools.dist:check_packages +dependency_links = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +use_2to3_fixers = setuptools.dist:assert_string_list +test_loader = setuptools.dist:check_importable +eager_resources = setuptools.dist:assert_string_list test_suite = setuptools.dist:check_test_suite +install_requires = setuptools.dist:check_requirements convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -package_data = setuptools.dist:check_package_data -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[distutils.commands] -upload_docs = setuptools.command.upload_docs:upload_docs -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -saveopts = setuptools.command.saveopts:saveopts -install_lib = setuptools.command.install_lib:install_lib -register = setuptools.command.register:register -develop = setuptools.command.develop:develop -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_py = setuptools.command.build_py:build_py -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_ext = setuptools.command.build_ext:build_ext -test = setuptools.command.test:test -egg_info = setuptools.command.egg_info:egg_info -setopt = setuptools.command.setopt:setopt -install = setuptools.command.install:install -install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -sdist = setuptools.command.sdist:sdist +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/site.py b/site.py index 80e084b257..a7166f1407 100755 --- a/site.py +++ b/site.py @@ -1,5 +1,5 @@ def __boot(): - import sys, imp, os, os.path + import sys, os, os.path PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] @@ -23,6 +23,7 @@ def __boot(): break else: try: + import imp # Avoid import loop in Python >= 3.3 stream, path, descr = imp.find_module('site',[item]) except ImportError: continue From 71ae17459b9f3c64833e0c197b130e8dcbe1f45b Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 13:06:14 +0200 Subject: [PATCH 3581/8469] Remove egg-info from repo. --HG-- branch : distribute extra : rebase_source : 89a58a7b518862cdbf37a30a4b512853730251cc --- distribute.egg-info/entry_points.txt | 62 ---------------------------- 1 file changed, 62 deletions(-) delete mode 100644 distribute.egg-info/entry_points.txt diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt deleted file mode 100644 index 6e3ac87bcd..0000000000 --- a/distribute.egg-info/entry_points.txt +++ /dev/null @@ -1,62 +0,0 @@ -[distutils.commands] -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -setopt = setuptools.command.setopt:setopt -egg_info = setuptools.command.egg_info:egg_info -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -register = setuptools.command.register:register -build_py = setuptools.command.build_py:build_py -sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs -rotate = setuptools.command.rotate:rotate -alias = setuptools.command.alias:alias -install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_lib = setuptools.command.install_lib:install_lib -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -develop = setuptools.command.develop:develop -build_ext = setuptools.command.build_ext:build_ext -easy_install = setuptools.command.easy_install:easy_install -test = setuptools.command.test:test -saveopts = setuptools.command.saveopts:saveopts - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[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 -entry_points.txt = setuptools.command.egg_info:write_entries -top_level.txt = setuptools.command.egg_info:write_toplevel_names -requires.txt = setuptools.command.egg_info:write_requirements -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg - -[distutils.setup_keywords] -exclude_package_data = setuptools.dist:check_package_data -zip_safe = setuptools.dist:assert_bool -include_package_data = setuptools.dist:assert_bool -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -dependency_links = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -use_2to3_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -eager_resources = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -install_requires = setuptools.dist:check_requirements -convert_2to3_doctests = setuptools.dist:assert_string_list - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - From 077a69aef0973333cafe4c7548dceb5418d1c36f Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 13:29:03 +0200 Subject: [PATCH 3582/8469] Purge modules under test from sys.modules prior to running tests. Fixes #301. --HG-- branch : distribute extra : rebase_source : 87561670c15ec8315f47157cdc0c06328ce8c20f --- setuptools/command/test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e5cb9bb59c..a02ac14240 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -2,6 +2,7 @@ from distutils.errors import DistutilsOptionError import sys from pkg_resources import * +from pkg_resources import _namespace_packages from unittest import TestLoader, main class ScanningLoader(TestLoader): @@ -139,6 +140,22 @@ def run(self): def run_tests(self): import unittest + + # Purge modules under test from sys.modules. The test loader will + # re-import them from the build location. Required when 2to3 is used + # with namespace packages. + if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): + module = self.test_args[-1].split('.')[0] + if module in _namespace_packages: + del_modules = [] + if module in sys.modules: + del_modules.append(module) + module += '.' + for name in sys.modules: + if name.startswith(module): + del_modules.append(name) + map(sys.modules.__delitem__, del_modules) + loader_ep = EntryPoint.parse("x="+self.test_loader) loader_class = loader_ep.load(require=False) cks = loader_class() From 6851d4e38e1e4e5a2bbbf2556523fd19675cdbf7 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 19:48:19 +0200 Subject: [PATCH 3583/8469] Make sure the manifest never contains decomposed UTF-8. --HG-- branch : distribute extra : rebase_source : 0e0fb3beac56f66f12670ec69ebfd3996d12d912 --- setuptools/command/egg_info.py | 14 +++++++++++++ setuptools/tests/test_sdist.py | 37 +++++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 46cdf4e097..e932d46a4d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -287,6 +287,19 @@ def append(self, item): +def compose(path): + # Apple's HFS Plus returns decomposed UTF-8. Since just about + # everyone else chokes on it, we must make sure to return fully + # composed UTF-8 only. + if sys.getfilesystemencoding().lower() == 'utf-8': + from unicodedata import normalize + if sys.version_info >= (3,): + path = normalize('NFC', path) + else: + path = normalize('NFC', path.decode('utf-8')).encode('utf-8') + return path + + class manifest_maker(sdist): template = "MANIFEST.in" @@ -311,6 +324,7 @@ def run(self): self.prune_file_list() self.filelist.sort() self.filelist.remove_duplicates() + self.filelist.files = [compose(path) for path in self.filelist.files] self.write_manifest() def write_manifest (self): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 8d9ed922a9..3412354548 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """sdist tests""" @@ -74,6 +75,36 @@ def test_package_data_in_sdist(self): manifest = cmd.filelist.files - self.assert_(os.path.join('sdist_test', 'a.txt') in manifest) - self.assert_(os.path.join('sdist_test', 'b.txt') in manifest) - self.assert_(os.path.join('sdist_test', 'c.rst') not in manifest) + self.assertTrue(os.path.join('sdist_test', 'a.txt') in manifest) + self.assertTrue(os.path.join('sdist_test', 'b.txt') in manifest) + self.assertTrue(os.path.join('sdist_test', 'c.rst') not in manifest) + + def test_filelist_is_fully_composed(self): + # Test for #303. Requires HFS Plus to fail. + + # Add file with non-ASCII filename + filename = os.path.join('sdist_test', 'smörbröd.py') + open(filename, 'w').close() + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # squelch output + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO() + sys.stderr = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + + self.assertTrue(filename in cmd.filelist.files) + + +def test_suite(): + return unittest.defaultTestLoader.loadTestsFromName(__name__) + From d76ec4bfdf2fe9a2bced5ca2a3610831020453c6 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 19:52:32 +0200 Subject: [PATCH 3584/8469] Read and write manifest in UTF-8 under Python 3. Fixes #303. --HG-- branch : distribute extra : rebase_source : 609c654effd2711aa803f6a0e84013294026608f --- setuptools/command/sdist.py | 27 +++++++++++++++ setuptools/tests/test_sdist.py | 60 ++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a176f635a1..d5259c2bde 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -262,7 +262,34 @@ def make_release_tree(self, base_dir, files): self.get_finalized_command('egg_info').save_version_info(dest) + def _manifest_is_not_generated(self): + # check for special comment used in 2.7.1 and higher + if not os.path.isfile(self.manifest): + return False + fp = open(self.manifest, 'rbU') + try: + first_line = fp.readline() + finally: + fp.close() + return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode() + + def read_manifest(self): + """Read the manifest file (named by 'self.manifest') and use it to + fill in 'self.filelist', the list of files to include in the source + distribution. + """ + log.info("reading manifest file '%s'", self.manifest) + manifest = open(self.manifest, 'rbU') + for line in manifest: + if sys.version_info >= (3,): + line = line.decode('UTF-8') + # ignore comments and blank lines + line = line.strip() + if line.startswith('#') or not line: + continue + self.filelist.append(line) + manifest.close() diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 3412354548..7e2f0a498b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -104,6 +104,66 @@ def test_filelist_is_fully_composed(self): self.assertTrue(filename in cmd.filelist.files) + def test_manifest_is_written_in_utf8(self): + # Test for #303. + + # Add file with non-ASCII filename + filename = os.path.join('sdist_test', 'smörbröd.py') + open(filename, 'w').close() + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # squelch output + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO() + sys.stderr = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + + manifest = open(os.path.join('sdist_test.egg-info', 'SOURCES.txt'), 'rbU') + contents = manifest.read() + manifest.close() + self.assertTrue(len(contents)) + + # This must not fail: + contents.decode('UTF-8') + + def test_manifest_is_read_in_utf8(self): + # Test for #303. + + # Add file with non-ASCII filename + filename = os.path.join('sdist_test', 'smörbröd.py') + open(filename, 'w').close() + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # squelch output + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO() + sys.stderr = StringIO() + try: + cmd.run() + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + + cmd.filelist.files = [] + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + cmd.read_manifest() + + self.assertTrue(filename in cmd.filelist.files) + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 11270be66d228aacca12a211e3fdcb38988fb193 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 20:32:46 +0200 Subject: [PATCH 3585/8469] Print metadata in UTF-8 independent of platform. Fixes #311. --HG-- branch : distribute extra : rebase_source : 4ff0df4ad7d9ea8cee6342f9c642e4fe634b7f18 --- setuptools/dist.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 6607cf7bb4..afac180ebb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -640,6 +640,38 @@ def iter_distribution_names(self): name = name[:-6] yield name + + def handle_display_options(self, option_order): + """If there were any non-global "display-only" options + (--help-commands or the metadata display options) on the command + line, display the requested info and return true; else return + false. + """ + import sys + + if sys.version_info < (3,) or self.help_commands: + return _Distribution.handle_display_options(self, option_order) + + # Stdout may be StringIO (e.g. in tests) + import io + if not isinstance(sys.stdout, io.TextIOWrapper): + return _Distribution.handle_display_options(self, option_order) + + # Print metadata in UTF-8 no matter the platform + encoding = sys.stdout.encoding + errors = sys.stdout.errors + newline = sys.platform != 'win32' and '\n' or None + line_buffering = sys.stdout.line_buffering + + sys.stdout = io.TextIOWrapper( + sys.stdout.detach(), 'utf-8', errors, newline, line_buffering) + try: + return _Distribution.handle_display_options(self, option_order) + finally: + sys.stdout = io.TextIOWrapper( + sys.stdout.detach(), encoding, errors, newline, line_buffering) + + # Install it throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: module.Distribution = Distribution From 645b5b084aa46696b490344a038875f105793308 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 20:37:54 +0200 Subject: [PATCH 3586/8469] Remove a missing fixer warning which showed during normal operations. Fixes #305. --HG-- branch : distribute extra : rebase_source : 3e5912a80758abf1e198d400c29ab03112eb68d6 --- setuptools/command/build_py.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 505dd4f30a..8751acd493 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -51,10 +51,8 @@ def __exclude_fixers(self): if self.distribution.use_2to3_exclude_fixers is not None: excluded_fixers.extend(self.distribution.use_2to3_exclude_fixers) for fixer_name in excluded_fixers: - if fixer_name not in self.fixer_names: - log.warn("Excluded fixer %s not found", fixer_name) - continue - self.fixer_names.remove(fixer_name) + if fixer_name in self.fixer_names: + self.fixer_names.remove(fixer_name) except ImportError: class Mixin2to3: From 9eca33ff8e3664ac2f2127aadeb358d213745123 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 20:55:39 +0200 Subject: [PATCH 3587/8469] os.access() cannot test for "createable" Fixes #320. --HG-- branch : distribute extra : rebase_source : d572b2701ceac9c8a46083cc6658c6eeed86d497 --- distribute_setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index 95ba23c52a..e367fdd16d 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -316,12 +316,12 @@ def _create_fake_setuptools_pkg_info(placeholder): log.warn('%s already exists', pkg_info) return - if not os.access(pkg_info, os.W_OK): + log.warn('Creating %s', pkg_info) + try: + f = open(pkg_info, 'w') + except EnvironmentError: log.warn("Don't have permissions to write %s, skipping", pkg_info) return - - log.warn('Creating %s', pkg_info) - f = open(pkg_info, 'w') try: f.write(SETUPTOOLS_PKG_INFO) finally: From 9553dd9910df577351ea04bb1613767096beeca0 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 20:58:18 +0200 Subject: [PATCH 3588/8469] marshall.load() does not necessarily raise ValueError. Fixes #283. --HG-- branch : distribute extra : rebase_source : 203cee618118fb65bf109d2db0275aa90aa5a12d --- setuptools/command/bdist_egg.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 0ee9c55b86..17fae984a7 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -425,12 +425,12 @@ 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] - f = open(filename,'rb'); f.read(8) # skip magic & date - try: - code = marshal.load(f); f.close() - except ValueError: - f.seek(0); f.read(12) # skip magic & date & file size; file size added in Python 3.3 - code = marshal.load(f); f.close() + if sys.version_info < (3, 3): + skip = 8 # skip magic & date + else: + skip = 12 # skip magic & date & file size + f = open(filename,'rb'); f.read(skip) + code = marshal.load(f); f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: From 907d9f46c3e0ef8dbc55528da9efe5087c182c9f Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 21:06:52 +0200 Subject: [PATCH 3589/8469] Fix duplicate application of version tags in 'egg_info' command. Fixes #299. --HG-- branch : distribute extra : rebase_source : 9f6fb87944bc3b9828b04bf8ac5ba7b3a40bfc95 --- setuptools/command/egg_info.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e932d46a4d..2dc5918738 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -162,7 +162,12 @@ def delete_file(self, filename): os.unlink(filename) def tagged_version(self): - return safe_version(self.distribution.get_version() + self.vtags) + 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) From 7a54a88a7727399ea369010a78637ce6db9bf725 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 21:42:31 +0200 Subject: [PATCH 3590/8469] Add my name to contributors list. --HG-- branch : distribute extra : rebase_source : d65f390123cbc59ac453e31b1d3d38c1fce6f105 --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 852662391a..0335b224b8 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -20,6 +20,7 @@ Contributors * Philip Jenvey * Reinout van Rees * Robert Myers +* Stefan H. Holek * Tarek Ziadé * Toshio Kuratomi From 0d407a3924d53323f81935124117c62d116b2068 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 8 Oct 2012 22:21:32 +0200 Subject: [PATCH 3591/8469] Fix a few messages in distribute_setup.py. --HG-- branch : distribute extra : rebase_source : ce0d4548e026262b6e4cf55c46dc5f209dbadd44 --- distribute_setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index e367fdd16d..a52d5c16a5 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -257,7 +257,7 @@ def _same_content(path, content): def _rename_path(path): new_name = path + '.OLD.%s' % time.time() - log.warn('Renaming %s into %s', path, new_name) + log.warn('Renaming %s to %s', path, new_name) os.rename(path, new_name) return new_name @@ -275,7 +275,7 @@ def _remove_flat_installation(placeholder): log.warn('Could not locate setuptools*.egg-info') return - log.warn('Removing elements out of the way...') + log.warn('Moving elements out of the way...') pkg_info = os.path.join(placeholder, file) if os.path.isdir(pkg_info): patched = _patch_egg_dir(pkg_info) @@ -435,7 +435,7 @@ def _fake_setuptools(): res = _patch_egg_dir(setuptools_location) if not res: return - log.warn('Patched done.') + log.warn('Patching complete.') _relaunch() From 95907bcc8ddc3f87e46fdc6b9518d3c2f2a015ed Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 9 Oct 2012 18:38:21 +0200 Subject: [PATCH 3592/8469] Fix cause of test failure on Mac OS X. Refs #20. --HG-- branch : distribute extra : rebase_source : 92ba8151d6dfa3755b31139a9b5ada570183731d --- setuptools/package_index.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d0896febc4..ffbffa9960 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -779,6 +779,12 @@ def open_with_auth(url): scheme, netloc, path, params, query, frag = urlparse.urlparse(url) + # Double scheme does not raise on Mac OS X as revealed by a + # failing test. We would expect "nonnumeric port". Refs #20. + if sys.platform == 'darwin': + if netloc.endswith(':'): + raise httplib.InvalidURL("nonnumeric port: ''") + if scheme in ('http', 'https'): auth, host = urllib2.splituser(netloc) else: @@ -859,4 +865,4 @@ def local_open(url): -# this line is a kludge to keep the trailing blank lines for pje's editor \ No newline at end of file +# this line is a kludge to keep the trailing blank lines for pje's editor From db678072da41b75408680dab3e23c1b76573bf1d Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 9 Oct 2012 22:57:20 +0200 Subject: [PATCH 3593/8469] Update CHANGES. --HG-- branch : distribute extra : rebase_source : a97e83b5ec8e426bfd567cec9fbe1e2b39b0935a --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b59a0b0011..e2b7874bc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,12 @@ CHANGES 0.6.29 ------ +* Issue #320: Fix check for "createable" in distribute_setup.py. +* Issue #305: Remove a warning that was triggered during normal operations. +* Issue #311: Print metadata in UTF-8 independent of platform. +* Issue #303: Read manifest file with UTF-8 encoding under Python 3. +* Issue #301: Allow to run tests of namespace packages when using 2to3. +* Issue #304: Prevent import loop in site.py under Python 3.3. * Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3. * Issue #299: The develop command didn't work on Python 3, when using 2to3, as the egg link would go to the Python 2 source. Linking to the 2to3'd code From 495e4bf6c1029b10cab8fa83ce28caf7011d0955 Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Thu, 11 Oct 2012 01:20:12 +0200 Subject: [PATCH 3594/8469] Closes #16135: Removal of OS/2 support (distutils) --- ccompiler.py | 5 +- command/bdist.py | 3 +- command/bdist_dumb.py | 8 +- command/build_ext.py | 26 +--- command/install.py | 15 -- emxccompiler.py | 315 --------------------------------------- spawn.py | 24 +-- sysconfig.py | 24 --- tests/test_bdist_dumb.py | 2 - tests/test_install.py | 2 +- tests/test_util.py | 2 +- util.py | 6 - 12 files changed, 7 insertions(+), 425 deletions(-) delete mode 100644 emxccompiler.py diff --git a/ccompiler.py b/ccompiler.py index c795c958fe..911e84dd3b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -351,7 +351,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, return macros, objects, extra, pp_opts, build def _get_cc_args(self, pp_opts, debug, before): - # works for unixccompiler, emxccompiler, cygwinccompiler + # works for unixccompiler, cygwinccompiler cc_args = pp_opts + ['-c'] if debug: cc_args[:0] = ['-g'] @@ -926,7 +926,6 @@ def mkpath (self, name, mode=0o777): # on a cygwin built python we can use gcc like an ordinary UNIXish # compiler ('cygwin.*', 'unix'), - ('os2emx', 'emx'), # OS name mappings ('posix', 'unix'), @@ -968,8 +967,6 @@ def get_default_compiler(osname=None, platform=None): "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), - 'emx': ('emxccompiler', 'EMXCCompiler', - "EMX port of GNU C Compiler for OS/2"), } def show_compilers(): diff --git a/command/bdist.py b/command/bdist.py index c5188eb371..38b169afd1 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -52,8 +52,7 @@ class bdist(Command): # This won't do in reality: will need to distinguish RPM-ish Linux, # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. default_format = {'posix': 'gztar', - 'nt': 'zip', - 'os2': 'zip'} + 'nt': 'zip'} # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 1ab09d1616..eefdfea5ad 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -38,8 +38,7 @@ class bdist_dumb(Command): boolean_options = ['keep-temp', 'skip-build', 'relative'] default_format = { 'posix': 'gztar', - 'nt': 'zip', - 'os2': 'zip' } + 'nt': 'zip' } def initialize_options(self): self.bdist_dir = None @@ -85,11 +84,6 @@ def run(self): archive_basename = "%s.%s" % (self.distribution.get_fullname(), self.plat_name) - # OS/2 objects to any ":" characters in a filename (such as when - # a timestamp is used in a version) so change them to hyphens. - if os.name == "os2": - archive_basename = archive_basename.replace(":", "-") - pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) if not self.relative: archive_root = self.bdist_dir diff --git a/command/build_ext.py b/command/build_ext.py index f16e2f17ef..6b6a04e8bf 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -223,11 +223,6 @@ def finalize_options(self): self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6')) - # OS/2 (EMX) doesn't support Debug vs Release builds, but has the - # import libraries in its "Config" subdirectory - if os.name == 'os2': - self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config')) - # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': @@ -613,9 +608,6 @@ def find_swig(self): return fn else: return "swig.exe" - elif os.name == "os2": - # assume swig available in the PATH. - return "swig.exe" else: raise DistutilsPlatformError( "I don't know how to find (much less run) SWIG " @@ -666,9 +658,6 @@ def get_ext_filename(self, ext_name): """ from distutils.sysconfig import get_config_var ext_path = ext_name.split('.') - # OS/2 has an 8 character module (extension) limit :-( - if os.name == "os2": - ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows so_ext = get_config_var('SO') if os.name == 'nt' and self.debug: @@ -689,7 +678,7 @@ def get_export_symbols(self, ext): def get_libraries(self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; - on Windows and OS/2, we add the Python library (eg. python20.dll). + on Windows, we add the Python library (eg. python20.dll). """ # The python library is always needed on Windows. For MSVC, this # is redundant, since the library is mentioned in a pragma in @@ -709,19 +698,6 @@ def get_libraries(self, ext): return ext.libraries + [pythonlib] else: return ext.libraries - elif sys.platform == "os2emx": - # EMX/GCC requires the python library explicitly, and I - # believe VACPP does as well (though not confirmed) - AIM Apr01 - template = "python%d%d" - # debug versions of the main DLL aren't supported, at least - # not at this time - AIM Apr01 - #if self.debug: - # template = template + '_d' - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - # don't extend ext.libraries, it may be shared with other - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib] elif sys.platform[:6] == "cygwin": template = "python%d.%d" pythonlib = (template % diff --git a/command/install.py b/command/install.py index 0161898f49..04326a1731 100644 --- a/command/install.py +++ b/command/install.py @@ -58,13 +58,6 @@ 'data' : '$base', }, 'nt': WINDOWS_SCHEME, - 'os2': { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - }, } # user site schemes @@ -86,14 +79,6 @@ 'data' : '$userbase', } - INSTALL_SCHEMES['os2_home'] = { - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': '$userbase/include/python$py_version_short/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } - # The keys to an installation scheme; if any new types of files are to be # installed, be sure to add an entry to every installation scheme above, # and to SCHEME_KEYS here. diff --git a/emxccompiler.py b/emxccompiler.py deleted file mode 100644 index 3675f8df9c..0000000000 --- a/emxccompiler.py +++ /dev/null @@ -1,315 +0,0 @@ -"""distutils.emxccompiler - -Provides the EMXCCompiler class, a subclass of UnixCCompiler that -handles the EMX port of the GNU C compiler to OS/2. -""" - -# issues: -# -# * OS/2 insists that DLLs can have names no longer than 8 characters -# We put export_symbols in a def-file, as though the DLL can have -# an arbitrary length name, but truncate the output filename. -# -# * only use OMF objects and use LINK386 as the linker (-Zomf) -# -# * always build for multithreading (-Zmt) as the accompanying OS/2 port -# of Python is only distributed with threads enabled. -# -# tested configurations: -# -# * EMX gcc 2.81/EMX 0.9d fix03 - -import os,sys,copy -from distutils.ccompiler import gen_preprocess_options, gen_lib_options -from distutils.unixccompiler import UnixCCompiler -from distutils.file_util import write_file -from distutils.errors import DistutilsExecError, CompileError, UnknownFileError -from distutils import log - -class EMXCCompiler (UnixCCompiler): - - compiler_type = 'emx' - obj_extension = ".obj" - static_lib_extension = ".lib" - shared_lib_extension = ".dll" - static_lib_format = "%s%s" - shared_lib_format = "%s%s" - res_extension = ".res" # compiled resource file - exe_extension = ".exe" - - def __init__ (self, - verbose=0, - dry_run=0, - force=0): - - UnixCCompiler.__init__ (self, verbose, dry_run, force) - - (status, details) = check_config_h() - self.debug_print("Python's GCC status: %s (details: %s)" % - (status, details)) - if status is not CONFIG_H_OK: - self.warn( - "Python's pyconfig.h doesn't seem to support your compiler. " + - ("Reason: %s." % details) + - "Compiling may fail because of undefined preprocessor macros.") - - (self.gcc_version, self.ld_version) = \ - get_versions() - self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" % - (self.gcc_version, - self.ld_version) ) - - # Hard-code GCC because that's what this is all about. - # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - linker_exe='gcc -Zomf -Zmt -Zcrtdll', - linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') - - # want the gcc library statically linked (so that we don't have - # to distribute a version dependent on the compiler we have) - self.dll_libraries=["gcc"] - - # __init__ () - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - if ext == '.rc': - # gcc requires '.rc' compiled to binary ('.res') files !!! - try: - self.spawn(["rc", "-r", src]) - except DistutilsExecError as msg: - raise CompileError(msg) - else: # for other files use the C-compiler - try: - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + - extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - - def link (self, - target_desc, - objects, - output_filename, - output_dir=None, - libraries=None, - library_dirs=None, - runtime_library_dirs=None, - export_symbols=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - build_temp=None, - target_lang=None): - - # use separate copies, so we can modify the lists - extra_preargs = copy.copy(extra_preargs or []) - libraries = copy.copy(libraries or []) - objects = copy.copy(objects or []) - - # Additional libraries - libraries.extend(self.dll_libraries) - - # handle export symbols by creating a def-file - # with executables this only works with gcc/ld as linker - if ((export_symbols is not None) and - (target_desc != self.EXECUTABLE)): - # (The linker doesn't do anything if output is up-to-date. - # So it would probably better to check if we really need this, - # but for this we had to insert some unchanged parts of - # UnixCCompiler, and this is not what we want.) - - # we want to put some files in the same directory as the - # object files are, build_temp doesn't help much - # where are the object files - temp_dir = os.path.dirname(objects[0]) - # name of dll to give the helper files the same base name - (dll_name, dll_extension) = os.path.splitext( - os.path.basename(output_filename)) - - # generate the filenames for these files - def_file = os.path.join(temp_dir, dll_name + ".def") - - # Generate .def file - contents = [ - "LIBRARY %s INITINSTANCE TERMINSTANCE" % \ - os.path.splitext(os.path.basename(output_filename))[0], - "DATA MULTIPLE NONSHARED", - "EXPORTS"] - for sym in export_symbols: - contents.append(' "%s"' % sym) - self.execute(write_file, (def_file, contents), - "writing %s" % def_file) - - # next add options for def-file and to creating import libraries - # for gcc/ld the def-file is specified as any other object files - objects.append(def_file) - - #end: if ((export_symbols is not None) and - # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): - - # who wants symbols and a many times larger output file - # should explicitly switch the debug mode on - # otherwise we let dllwrap/ld strip the output file - # (On my machine: 10KB < stripped_file < ??100KB - # unstripped_file = stripped_file + XXX KB - # ( XXX=254 for a typical python extension)) - if not debug: - extra_preargs.append("-s") - - UnixCCompiler.link(self, - target_desc, - objects, - output_filename, - output_dir, - libraries, - library_dirs, - runtime_library_dirs, - None, # export_symbols, we do this in our def-file - debug, - extra_preargs, - extra_postargs, - build_temp, - target_lang) - - # link () - - # -- Miscellaneous methods ----------------------------------------- - - # override the object_filenames method from CCompiler to - # support rc and res-files - def object_filenames (self, - source_filenames, - strip_dir=0, - output_dir=''): - if output_dir is None: output_dir = '' - obj_names = [] - for src_name in source_filenames: - # use normcase to make sure '.rc' is really '.rc' and not '.RC' - (base, ext) = os.path.splitext (os.path.normcase(src_name)) - if ext not in (self.src_extensions + ['.rc']): - raise UnknownFileError("unknown file type '%s' (from '%s')" % \ - (ext, src_name)) - if strip_dir: - base = os.path.basename (base) - if ext == '.rc': - # these need to be compiled to object files - obj_names.append (os.path.join (output_dir, - base + self.res_extension)) - else: - obj_names.append (os.path.join (output_dir, - base + self.obj_extension)) - return obj_names - - # object_filenames () - - # override the find_library_file method from UnixCCompiler - # to deal with file naming/searching differences - def find_library_file(self, dirs, lib, debug=0): - shortlib = '%s.lib' % lib - longlib = 'lib%s.lib' % lib # this form very rare - - # get EMX's default library directory search path - try: - emx_dirs = os.environ['LIBRARY_PATH'].split(';') - except KeyError: - emx_dirs = [] - - for dir in dirs + emx_dirs: - shortlibp = os.path.join(dir, shortlib) - longlibp = os.path.join(dir, longlib) - if os.path.exists(shortlibp): - return shortlibp - elif os.path.exists(longlibp): - return longlibp - - # Oops, didn't find it in *any* of 'dirs' - return None - -# class EMXCCompiler - - -# Because these compilers aren't configured in Python's pyconfig.h file by -# default, we should at least warn the user if he is using a unmodified -# version. - -CONFIG_H_OK = "ok" -CONFIG_H_NOTOK = "not ok" -CONFIG_H_UNCERTAIN = "uncertain" - -def check_config_h(): - - """Check if the current Python installation (specifically, pyconfig.h) - appears amenable to building extensions with GCC. Returns a tuple - (status, details), where 'status' is one of the following constants: - CONFIG_H_OK - all is well, go ahead and compile - CONFIG_H_NOTOK - doesn't look good - CONFIG_H_UNCERTAIN - not sure -- unable to read pyconfig.h - 'details' is a human-readable string explaining the situation. - - Note there are two ways to conclude "OK": either 'sys.version' contains - the string "GCC" (implying that this Python was built with GCC), or the - installed "pyconfig.h" contains the string "__GNUC__". - """ - - # XXX since this function also checks sys.version, it's not strictly a - # "pyconfig.h" check -- should probably be renamed... - - from distutils import sysconfig - # if sys.version contains GCC then python was compiled with - # GCC, and the pyconfig.h file should be OK - if sys.version.find("GCC") >= 0: - return (CONFIG_H_OK, "sys.version mentions 'GCC'") - - fn = sysconfig.get_config_h_filename() - try: - # It would probably better to read single lines to search. - # But we do this only once, and it is fast enough - f = open(fn) - try: - s = f.read() - finally: - f.close() - - except IOError as exc: - # if we can't read this file, we cannot say it is wrong - # the compiler will complain later about this file as missing - return (CONFIG_H_UNCERTAIN, - "couldn't read '%s': %s" % (fn, exc.strerror)) - - else: - # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar - if s.find("__GNUC__") >= 0: - return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn) - else: - return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn) - - -def get_versions(): - """ Try to find out the versions of gcc and ld. - If not possible it returns None for it. - """ - from distutils.version import StrictVersion - from distutils.spawn import find_executable - import re - - gcc_exe = find_executable('gcc') - if gcc_exe: - out = os.popen(gcc_exe + ' -dumpversion','r') - try: - out_string = out.read() - finally: - out.close() - result = re.search('(\d+\.\d+\.\d+)', out_string, re.ASCII) - if result: - gcc_version = StrictVersion(result.group(1)) - else: - gcc_version = None - else: - gcc_version = None - # EMX ld has no way of reporting version number, and we use GCC - # anyway - so we can link OMF DLLs - ld_version = None - return (gcc_version, ld_version) diff --git a/spawn.py b/spawn.py index f58c55f902..b1c5a442a5 100644 --- a/spawn.py +++ b/spawn.py @@ -32,8 +32,6 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): _spawn_posix(cmd, search_path, dry_run=dry_run) elif os.name == 'nt': _spawn_nt(cmd, search_path, dry_run=dry_run) - elif os.name == 'os2': - _spawn_os2(cmd, search_path, dry_run=dry_run) else: raise DistutilsPlatformError( "don't know how to spawn programs on platform '%s'" % os.name) @@ -74,26 +72,6 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsExecError( "command '%s' failed with exit status %d" % (cmd[0], rc)) -def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): - executable = cmd[0] - if search_path: - # either we find one or it stays the same - executable = find_executable(executable) or executable - log.info(' '.join([executable] + cmd[1:])) - if not dry_run: - # spawnv for OS/2 EMX requires a full path to the .exe - try: - rc = os.spawnv(os.P_WAIT, executable, cmd) - except OSError as exc: - # this seems to happen when the command isn't found - raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc.args[-1])) - if rc != 0: - # and this reflects the command running but failing - log.debug("command '%s' failed with exit status %d" % (cmd[0], rc)) - raise DistutilsExecError( - "command '%s' failed with exit status %d" % (cmd[0], rc)) - if sys.platform == 'darwin': from distutils import sysconfig _cfg_target = None @@ -180,7 +158,7 @@ def find_executable(executable, path=None): paths = path.split(os.pathsep) base, ext = os.path.splitext(executable) - if (sys.platform == 'win32' or os.name == 'os2') and (ext != '.exe'): + if (sys.platform == 'win32') and (ext != '.exe'): executable = executable + '.exe' if not os.path.isfile(executable): diff --git a/sysconfig.py b/sysconfig.py index 317640ca89..3b6549fccc 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -110,8 +110,6 @@ def get_python_inc(plat_specific=0, prefix=None): return os.path.join(prefix, "include", python_dir) elif os.name == "nt": return os.path.join(prefix, "include") - elif os.name == "os2": - return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " @@ -153,11 +151,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): return prefix else: return os.path.join(prefix, "Lib", "site-packages") - elif os.name == "os2": - if standard_lib: - return os.path.join(prefix, "Lib") - else: - return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( "I don't know where Python installs its library " @@ -492,23 +485,6 @@ def _init_nt(): _config_vars = g -def _init_os2(): - """Initialize the module as appropriate for OS/2""" - g = {} - # set basic install directories - g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) - g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) - - # XXX hmmm.. a normal install puts include files here - g['INCLUDEPY'] = get_python_inc(plat_specific=0) - - g['SO'] = '.pyd' - g['EXE'] = ".exe" - - global _config_vars - _config_vars = g - - def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 1037d8216e..761051c155 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -75,8 +75,6 @@ def test_simple_built(self): # see what we have dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) base = "%s.%s.zip" % (dist.get_fullname(), cmd.plat_name) - if os.name == 'os2': - base = base.replace(':', '-') self.assertEqual(dist_created, [base]) diff --git a/tests/test_install.py b/tests/test_install.py index cb2e1f2879..47d630ccc5 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -94,7 +94,7 @@ def cleanup(): self.addCleanup(cleanup) - for key in ('nt_user', 'unix_user', 'os2_home'): + for key in ('nt_user', 'unix_user'): self.assertIn(key, INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) diff --git a/tests/test_util.py b/tests/test_util.py index eac9b5141d..b73cfe9424 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -236,7 +236,7 @@ def _join(*path): self.assertRaises(DistutilsPlatformError, change_root, 'c:\\root', 'its\\here') - # XXX platforms to be covered: os2, mac + # XXX platforms to be covered: mac def test_check_environ(self): util._environ_checked = 0 diff --git a/util.py b/util.py index 67d8166349..ba09ac450a 100644 --- a/util.py +++ b/util.py @@ -154,12 +154,6 @@ def change_root (new_root, pathname): path = path[1:] return os.path.join(new_root, path) - elif os.name == 'os2': - (drive, path) = os.path.splitdrive(pathname) - if path[0] == os.sep: - path = path[1:] - return os.path.join(new_root, path) - else: raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) From 13d0d367f40c0f7cf943cbbe959166fa5aee844c Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 14 Oct 2012 23:28:28 +0200 Subject: [PATCH 3595/8469] Make sure distribute_setup.py signals errors in its exit status. --HG-- branch : distribute extra : rebase_source : f35cb75558f090197e25083994d0bbbbaf2285d6 --- distribute_setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index a52d5c16a5..04c9864baa 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -86,6 +86,8 @@ def _install(tarball, install_args=()): if not _python_cmd('setup.py', 'install', *install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') + # exitcode will be 2 + return 2 finally: os.chdir(old_wd) @@ -529,7 +531,7 @@ def main(version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" options = _parse_args() tarball = download_setuptools(download_base=options.download_base) - _install(tarball, _build_install_args(options)) + return _install(tarball, _build_install_args(options)) if __name__ == '__main__': - main() + sys.exit(main()) From 21ead63de1689b99007d0ab9b41a19b09543e7b3 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 15 Oct 2012 14:48:49 +0200 Subject: [PATCH 3596/8469] Revert 86d7748 drive-by commit because of unclear BBB consequences. --HG-- branch : distribute extra : rebase_source : 2fb9a6ec09184e238551be4d0ea908e719badd27 --- setuptools/command/egg_info.py | 14 ------------- setuptools/tests/test_sdist.py | 38 +++++++++++----------------------- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 2dc5918738..e1a8c9ad04 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -292,19 +292,6 @@ def append(self, item): -def compose(path): - # Apple's HFS Plus returns decomposed UTF-8. Since just about - # everyone else chokes on it, we must make sure to return fully - # composed UTF-8 only. - if sys.getfilesystemencoding().lower() == 'utf-8': - from unicodedata import normalize - if sys.version_info >= (3,): - path = normalize('NFC', path) - else: - path = normalize('NFC', path.decode('utf-8')).encode('utf-8') - return path - - class manifest_maker(sdist): template = "MANIFEST.in" @@ -329,7 +316,6 @@ def run(self): self.prune_file_list() self.filelist.sort() self.filelist.remove_duplicates() - self.filelist.files = [compose(path) for path in self.filelist.files] self.write_manifest() def write_manifest (self): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 7e2f0a498b..4478d43870 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -29,6 +29,17 @@ """ % SETUP_ATTRS +def compose(path): + # HFS Plus returns decomposed UTF-8 + if sys.platform == 'darwin': + from unicodedata import normalize + if sys.version_info >= (3,): + path = normalize('NFC', path) + else: + path = normalize('NFC', path.decode('utf-8')).encode('utf-8') + return path + + class TestSdistTest(unittest.TestCase): def setUp(self): self.temp_dir = tempfile.mkdtemp() @@ -79,31 +90,6 @@ def test_package_data_in_sdist(self): self.assertTrue(os.path.join('sdist_test', 'b.txt') in manifest) self.assertTrue(os.path.join('sdist_test', 'c.rst') not in manifest) - def test_filelist_is_fully_composed(self): - # Test for #303. Requires HFS Plus to fail. - - # Add file with non-ASCII filename - filename = os.path.join('sdist_test', 'smörbröd.py') - open(filename, 'w').close() - - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # squelch output - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO() - sys.stderr = StringIO() - try: - cmd.run() - finally: - sys.stdout = old_stdout - sys.stderr = old_stderr - - self.assertTrue(filename in cmd.filelist.files) - def test_manifest_is_written_in_utf8(self): # Test for #303. @@ -162,7 +148,7 @@ def test_manifest_is_read_in_utf8(self): cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') cmd.read_manifest() - self.assertTrue(filename in cmd.filelist.files) + self.assertTrue(filename in [compose(x) for x in cmd.filelist.files]) def test_suite(): From 422682d8c44fb310e3431d56b2ee0a991ced72db Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 16 Oct 2012 13:08:55 +0200 Subject: [PATCH 3597/8469] Don't re-use FileList global name in egg_info.py. --HG-- branch : distribute extra : rebase_source : ac180d4a23ab4fc03c243aa92dd8e6bc42bdabeb --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e1a8c9ad04..e1aaa491b4 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -9,7 +9,7 @@ from distutils import log from setuptools.command.sdist import sdist from distutils.util import convert_path -from distutils.filelist import FileList +from distutils.filelist import FileList as _FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename from sdist import walk_revctrl @@ -274,7 +274,7 @@ def check_broken_egg_info(self): self.broken_egg_info = self.egg_info self.egg_info = bei # make it work for now -class FileList(FileList): +class FileList(_FileList): """File list that accepts only existing, platform-independent paths""" def append(self, item): From b68c62e1cd28a9bedf6c6b8f65c5428361e644a9 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 16 Oct 2012 17:12:58 +0200 Subject: [PATCH 3598/8469] Fix Python 2.4 incompatibility in test_easy_install.py. --HG-- branch : distribute extra : rebase_source : ba9360ee8ff6c69f2ef589ef7c920fc0c8219b61 --- setuptools/tests/test_easy_install.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e49c6f49d8..64cf1ca453 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -307,11 +307,12 @@ def test_setup_requires(self): sys.stdout = StringIO.StringIO() sys.stderr = StringIO.StringIO() try: - reset_setup_stop_context( - lambda: run_setup(test_setup_py, ['install']) - ) - except SandboxViolation: - self.fail('Installation caused SandboxViolation') + try: + reset_setup_stop_context( + lambda: run_setup(test_setup_py, ['install']) + ) + except SandboxViolation: + self.fail('Installation caused SandboxViolation') finally: sys.stdout = old_stdout sys.stderr = old_stderr From 9d66fb61d9579516c5333d51eb85dc3495e6032f Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Wed, 17 Oct 2012 10:54:39 +0200 Subject: [PATCH 3599/8469] Use surrogateescape error handler when reading and writing the manifest. Refs #303. --HG-- branch : distribute extra : rebase_source : f0231cf87e2478f988f798dfe579f28e7561aeff --- setuptools/command/egg_info.py | 2 +- setuptools/command/sdist.py | 2 +- setuptools/tests/test_sdist.py | 256 +++++++++++++++++++++++++++------ 3 files changed, 214 insertions(+), 46 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e1aaa491b4..9955c8ef39 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -360,7 +360,7 @@ def write_file (filename, contents): """ contents = "\n".join(contents) if sys.version_info >= (3,): - contents = contents.encode("utf-8") + contents = contents.encode("utf-8", "surrogateescape") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index d5259c2bde..42558143b4 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -283,7 +283,7 @@ def read_manifest(self): manifest = open(self.manifest, 'rbU') for line in manifest: if sys.version_info >= (3,): - line = line.decode('UTF-8') + line = line.decode('UTF-8', 'surrogateescape') # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 4478d43870..65b83b6e10 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -7,10 +7,13 @@ import sys import tempfile import unittest +import urllib +import unicodedata from StringIO import StringIO from setuptools.command.sdist import sdist +from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -29,18 +32,58 @@ """ % SETUP_ATTRS -def compose(path): - # HFS Plus returns decomposed UTF-8 - if sys.platform == 'darwin': - from unicodedata import normalize +if sys.version_info >= (3,): + LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1') +else: + LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' + + +# Cannot use context manager because of Python 2.4 +def quiet(): + global old_stdout, old_stderr + old_stdout, old_stderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = StringIO(), StringIO() + +def unquiet(): + sys.stdout, sys.stderr = old_stdout, old_stderr + + +# Fake byte literals to shut up Python <= 2.5 +def b(s, encoding='utf-8'): + if sys.version_info >= (3,): + return s.encode(encoding) + return s + + +# HFS Plus returns decomposed UTF-8 +def decompose(path): + if isinstance(path, unicode): + return unicodedata.normalize('NFD', path) + try: + path = path.decode('utf-8') + path = unicodedata.normalize('NFD', path) + path = path.encode('utf-8') + except UnicodeError: + pass # Not UTF-8 + return path + + +# HFS Plus quotes unknown bytes like so: %F6 +def hfs_quote(path): + if isinstance(path, unicode): + raise TypeError('bytes are required') + try: + u = path.decode('utf-8') + except UnicodeDecodeError: + path = urllib.quote(path) # Not UTF-8 + else: if sys.version_info >= (3,): - path = normalize('NFC', path) - else: - path = normalize('NFC', path.decode('utf-8')).encode('utf-8') + path = u return path class TestSdistTest(unittest.TestCase): + def setUp(self): self.temp_dir = tempfile.mkdtemp() f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') @@ -74,81 +117,206 @@ def test_package_data_in_sdist(self): cmd.ensure_finalized() # squelch output - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO() - sys.stderr = StringIO() + quiet() try: cmd.run() finally: - sys.stdout = old_stdout - sys.stderr = old_stderr + unquiet() manifest = cmd.filelist.files - self.assertTrue(os.path.join('sdist_test', 'a.txt') in manifest) self.assertTrue(os.path.join('sdist_test', 'b.txt') in manifest) self.assertTrue(os.path.join('sdist_test', 'c.rst') not in manifest) - def test_manifest_is_written_in_utf8(self): + def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') - # Add file with non-ASCII filename + # UTF-8 filename filename = os.path.join('sdist_test', 'smörbröd.py') - open(filename, 'w').close() + # Add UTF-8 filename and write manifest + quiet() + try: + mm.run() + mm.filelist.files.append(filename) + mm.write_manifest() + finally: + unquiet() + + manifest = open(mm.manifest, 'rbU') + contents = manifest.read() + manifest.close() + + # The manifest should be UTF-8 encoded + try: + u = contents.decode('UTF-8') + except UnicodeDecodeError, e: + self.fail(e) + + # The manifest should contain the UTF-8 filename + if sys.version_info >= (3,): + self.assertTrue(filename in u) + else: + self.assertTrue(filename in contents) + + def test_manifest_is_written_with_surrogateescape_error_handler(self): + # Test for #303. dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') - # squelch output - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO() - sys.stderr = StringIO() + # Latin-1 filename + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + + # Add filename with surrogates and write manifest + quiet() try: - cmd.run() + mm.run() + if sys.version_info >= (3,): + u = filename.decode('utf-8', 'surrogateescape') + mm.filelist.files.append(u) + else: + mm.filelist.files.append(filename) + mm.write_manifest() finally: - sys.stdout = old_stdout - sys.stderr = old_stderr + unquiet() - manifest = open(os.path.join('sdist_test.egg-info', 'SOURCES.txt'), 'rbU') + manifest = open(mm.manifest, 'rbU') contents = manifest.read() manifest.close() - self.assertTrue(len(contents)) - # This must not fail: - contents.decode('UTF-8') + # The manifest should contain the Latin-1 filename + self.assertTrue(filename in contents) - def test_manifest_is_read_in_utf8(self): + def test_manifest_is_read_with_utf8_encoding(self): # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() - # Add file with non-ASCII filename + # UTF-8 filename filename = os.path.join('sdist_test', 'smörbröd.py') open(filename, 'w').close() + quiet() + try: + cmd.run() + finally: + unquiet() + + # The filelist should contain the UTF-8 filename + if sys.platform == 'darwin': + filename = decompose(filename) + self.assertTrue(filename in cmd.filelist.files) + + def test_manifest_is_read_with_surrogateescape_error_handler(self): + # Test for #303. + + # This is hard to test on HFS Plus because it quotes unknown + # bytes (see previous test). Furthermore, egg_info.FileList + # only appends filenames that os.path.exist. + + # We therefore write the manifest file by hand and check whether + # read_manifest produces a UnicodeDecodeError. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + + quiet() + try: + cmd.run() + # Add Latin-1 filename to manifest + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + manifest = open(cmd.manifest, 'ab') + manifest.write(filename+b('\n')) + manifest.close() + # Re-read manifest + try: + cmd.read_manifest() + except UnicodeDecodeError, e: + self.fail(e) + finally: + unquiet() + + def test_sdist_with_utf8_encoded_filename(self): + # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # UTF-8 filename + filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + open(filename, 'w').close() + + quiet() + try: + cmd.run() + finally: + unquiet() + + # The filelist should contain the UTF-8 filename + # (in one representation or other) + if sys.version_info >= (3,): + filename = filename.decode(sys.getfilesystemencoding(), 'surrogateescape') + if sys.platform == 'darwin': + filename = decompose(filename) + self.assertTrue(filename in cmd.filelist.files) + + def test_sdist_with_latin1_encoded_filename(self): + # Test for #303. dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' cmd = sdist(dist) cmd.ensure_finalized() - # squelch output - old_stdout = sys.stdout - old_stderr = sys.stderr - sys.stdout = StringIO() - sys.stderr = StringIO() + # Latin-1 filename + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + open(filename, 'w').close() + + quiet() try: cmd.run() finally: - sys.stdout = old_stdout - sys.stderr = old_stderr + unquiet() + + # The filelist should contain the Latin-1 filename + # (in one representation or other) + if sys.platform == 'darwin': + filename = hfs_quote(filename) + elif sys.version_info >= (3,): + filename = filename.decode(sys.getfilesystemencoding(), 'surrogateescape') + self.assertTrue(filename in cmd.filelist.files) + + def test_decompose(self): + self.assertNotEqual('smörbröd.py', decompose('smörbröd.py')) - cmd.filelist.files = [] - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - cmd.read_manifest() + if sys.version_info >= (3,): + self.assertEqual(len('smörbröd.py'), 11) + self.assertEqual(len(decompose('smörbröd.py')), 13) + else: + self.assertEqual(len('smörbröd.py'), 13) + self.assertEqual(len(decompose('smörbröd.py')), 15) + + def test_hfs_quote(self): + self.assertEqual(hfs_quote(LATIN1_FILENAME), 'sm%F6rbr%F6d.py') - self.assertTrue(filename in [compose(x) for x in cmd.filelist.files]) + # Bytes are required + if sys.version_info >= (3,): + self.assertRaises(TypeError, hfs_quote, 'smörbröd.py') + else: + self.assertRaises(TypeError, hfs_quote, 'smörbröd.py'.decode('utf-8')) def test_suite(): From 25e819620334f3126cf5ba3809ab1338f648fa88 Mon Sep 17 00:00:00 2001 From: Lee Trout Date: Thu, 18 Oct 2012 13:17:44 -0400 Subject: [PATCH 3600/8469] Fix command order for pip 1.2 per https://bitbucket.org/tarek/distribute/issue/327 --HG-- branch : distribute extra : rebase_source : 89c65271f70999d45aa6136be5f037d62370b8a2 --- distribute_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index a52d5c16a5..1922dd7da4 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -444,7 +444,8 @@ def _relaunch(): # we have to relaunch the process # pip marker to avoid a relaunch bug _cmd = ['-c', 'install', '--single-version-externally-managed'] - if sys.argv[:3] == _cmd: + _cmd2 = ['-c', 'install', '--record'] + if sys.argv[:3] == _cmd1 or sys.argv[:3] == _cmd2: sys.argv[0] = 'setup.py' args = [sys.executable] + sys.argv sys.exit(subprocess.call(args)) From 197c1c33644d1bae8e58f0fbdbd33b387d8ec0bb Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 19 Oct 2012 04:15:20 +0200 Subject: [PATCH 3601/8469] Miscellaneous updates to the upload_docs command. a) upload_docs now runs build_sphinx to generate documentation. b) The temporary ZIP file is properly disposed of. c) Auth credentials now work under Python 3. Fixes #326. hg record cannot split hunks, thus the large commit. --HG-- branch : distribute extra : rebase_source : 76d81880a2aaeb5b94a1d2388cb838068e4f64e3 --- setuptools/command/upload_docs.py | 128 +++++++++++++++++------------- 1 file changed, 74 insertions(+), 54 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 213f7b588e..c43b0f421e 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -9,10 +9,13 @@ import socket import zipfile import httplib -import base64 import urlparse import tempfile import sys +import shutil + +from base64 import standard_b64encode +from pkg_resources import iter_entry_points from distutils import log from distutils.errors import DistutilsOptionError @@ -22,20 +25,18 @@ except ImportError: from setuptools.command.upload import upload -_IS_PYTHON3 = sys.version > '3' +if sys.version_info >= (3,): + errors = 'surrogateescape' +else: + errors = 'strict' -try: - bytes -except NameError: - bytes = str -def b(str_or_bytes): - """Return bytes by either encoding the argument as ASCII or simply return - the argument as-is.""" - if not isinstance(str_or_bytes, bytes): - return str_or_bytes.encode('ascii') - else: - return str_or_bytes +# This is not just a replacement for byte literals +# but works as a general purpose encoder +def b(s, encoding='utf-8'): + if isinstance(s, unicode): + return s.encode(encoding, errors) + return s class upload_docs(upload): @@ -51,40 +52,62 @@ class upload_docs(upload): ] boolean_options = upload.boolean_options + def has_sphinx(self): + if self.upload_dir is None: + for ep in iter_entry_points('distutils.commands', 'build_sphinx'): + return True + + sub_commands = [('build_sphinx', has_sphinx)] + def initialize_options(self): upload.initialize_options(self) self.upload_dir = None + self.target_dir = None def finalize_options(self): upload.finalize_options(self) if self.upload_dir is None: - build = self.get_finalized_command('build') - self.upload_dir = os.path.join(build.build_base, 'docs') - self.mkpath(self.upload_dir) - self.ensure_dirname('upload_dir') - self.announce('Using upload directory %s' % self.upload_dir) + if self.has_sphinx(): + build_sphinx = self.get_finalized_command('build_sphinx') + self.target_dir = build_sphinx.builder_target_dir + else: + build = self.get_finalized_command('build') + self.target_dir = os.path.join(build.build_base, 'docs') + else: + self.ensure_dirname('upload_dir') + self.target_dir = self.upload_dir + self.announce('Using upload directory %s' % self.target_dir) - def create_zipfile(self): - name = self.distribution.metadata.get_name() - tmp_dir = tempfile.mkdtemp() - tmp_file = os.path.join(tmp_dir, "%s.zip" % name) - zip_file = zipfile.ZipFile(tmp_file, "w") - for root, dirs, files in os.walk(self.upload_dir): - if root == self.upload_dir and not files: - raise DistutilsOptionError( - "no files found in upload directory '%s'" - % self.upload_dir) - for name in files: - full = os.path.join(root, name) - relative = root[len(self.upload_dir):].lstrip(os.path.sep) - dest = os.path.join(relative, name) - zip_file.write(full, dest) - zip_file.close() - return tmp_file + def create_zipfile(self, filename): + zip_file = zipfile.ZipFile(filename, "w") + try: + self.mkpath(self.target_dir) # just in case + for root, dirs, files in os.walk(self.target_dir): + if root == self.target_dir and not files: + raise DistutilsOptionError( + "no files found in upload directory '%s'" + % self.target_dir) + for name in files: + full = os.path.join(root, name) + relative = root[len(self.target_dir):].lstrip(os.path.sep) + dest = os.path.join(relative, name) + zip_file.write(full, dest) + finally: + zip_file.close() def run(self): - zip_file = self.create_zipfile() - self.upload_file(zip_file) + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + tmp_dir = tempfile.mkdtemp() + name = self.distribution.metadata.get_name() + zip_file = os.path.join(tmp_dir, "%s.zip" % name) + try: + self.create_zipfile(zip_file) + self.upload_file(zip_file) + finally: + shutil.rmtree(tmp_dir) def upload_file(self, filename): content = open(filename, 'rb').read() @@ -95,36 +118,33 @@ def upload_file(self, filename): 'content': (os.path.basename(filename), content), } # set up the authentication - credentials = self.username + ':' + self.password - if _IS_PYTHON3: # base64 only works with bytes in Python 3. - encoded_creds = base64.encodebytes(credentials.encode('utf8')) - auth = bytes("Basic ") - else: - encoded_creds = base64.encodestring(credentials) - auth = "Basic " - auth += encoded_creds.strip() + credentials = b(self.username + ':' + self.password) + credentials = standard_b64encode(credentials) + if sys.version_info >= (3,): + credentials = credentials.decode('ascii') + auth = "Basic " + credentials # Build up the MIME payload for the POST data - boundary = b('--------------GHSKFJDLGDS7543FJKLFHRE75642756743254') - sep_boundary = b('\n--') + boundary + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = b('\n--') + b(boundary) end_boundary = sep_boundary + b('--') body = [] - for key, values in data.items(): + for key, values in data.iteritems(): + title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if type(values) != type([]): values = [values] for value in values: if type(value) is tuple: - fn = b(';filename="%s"' % value[0]) + title += '; filename="%s"' % value[0] value = value[1] else: - fn = b("") + value = b(value) body.append(sep_boundary) - body.append(b('\nContent-Disposition: form-data; name="%s"'%key)) - body.append(fn) + body.append(b(title)) body.append(b("\n\n")) - body.append(b(value)) - if value and value[-1] == b('\r'): + body.append(value) + if value and value[-1:] == b('\r'): body.append(b('\n')) # write an extra newline (lurve Macs) body.append(end_boundary) body.append(b("\n")) From 0a1a4cdedb6bfd3e1fc2121275dd765c597e33ed Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 19 Oct 2012 04:15:58 +0200 Subject: [PATCH 3602/8469] Update CHANGES and docs. --HG-- branch : distribute extra : rebase_source : e24a57706eebda4c1f989467a0a3bc951f550dd4 --- CHANGES.txt | 3 +++ docs/setuptools.txt | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index e2b7874bc8..3d90f53440 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ CHANGES 0.6.29 ------ +* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` + to produce uploadable documentation. +* Issue #326: `upload_docs` provided mangled auth credentials under Python 3. * Issue #320: Fix check for "createable" in distribute_setup.py. * Issue #305: Remove a warning that was triggered during normal operations. * Issue #311: Print metadata in UTF-8 independent of platform. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 31eedcb160..81c3aae31e 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2423,7 +2423,12 @@ command:: python setup.py upload_docs --upload-dir=docs/build/html -As with any other ``setuptools`` based command, you can define useful +If no ``--upload-dir`` is given, ``upload_docs`` will attempt to run the +``build_sphinx`` command to generate uploadable documentation. +For the command to become available, `Sphinx `_ +must be installed in the same environment as distribute. + +As with other ``setuptools``-based commands, you can define useful defaults in the ``setup.cfg`` of your Python project, e.g.: .. code-block:: ini From 47598ca259c8870efa3061144493758c187deb3d Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 19 Oct 2012 11:35:52 +0200 Subject: [PATCH 3603/8469] Fix a test broken by 984cedb. --HG-- branch : distribute extra : rebase_source : f9fe65a5b00a1a64f812aa99716cc913a4b39188 --- setuptools/tests/test_upload_docs.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 8b2dc89220..fddb755d9c 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -54,12 +54,17 @@ def test_create_zipfile(self): cmd = upload_docs(dist) cmd.upload_dir = self.upload_dir - zip_file = cmd.create_zipfile() + cmd.target_dir = self.upload_dir + tmp_dir = tempfile.mkdtemp() + tmp_file = os.path.join(tmp_dir, 'foo.zip') + try: + zip_file = cmd.create_zipfile(tmp_file) - assert zipfile.is_zipfile(zip_file) + assert zipfile.is_zipfile(tmp_file) - zip_f = zipfile.ZipFile(zip_file) # woh... - - assert zip_f.namelist() == ['index.html'] + zip_file = zipfile.ZipFile(tmp_file) # woh... + assert zip_file.namelist() == ['index.html'] + finally: + shutil.rmtree(tmp_dir) From 6f9ff72c3264915ce11003cc736c53185957b784 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 19 Oct 2012 11:44:58 +0200 Subject: [PATCH 3604/8469] Update CHANGES. --HG-- branch : distribute extra : rebase_source : 9ecd22bbaa1c768c410ecb40d7f51f8872998736 --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3d90f53440..594100a45f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.29 ------ +* Issue #327: Merged pull request #24 to fix a dependency problem with pip. +* Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301. * If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` to produce uploadable documentation. * Issue #326: `upload_docs` provided mangled auth credentials under Python 3. From c586b38480483bcfa87761e859d69a732f170374 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Oct 2012 09:31:34 -0400 Subject: [PATCH 3605/8469] Updated CHANGES and CONTRIBUTORS --HG-- branch : distribute extra : rebase_source : 55195db48ea2d88ecabe2307732bfc58db12b9e0 --- CHANGES.txt | 1 + CONTRIBUTORS.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 594100a45f..342add9327 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.29 ------ +* Pull Request #14: Honor file permissions in zip files. * Issue #327: Merged pull request #24 to fix a dependency problem with pip. * Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301. * If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 0335b224b8..e180edac4b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -12,6 +12,7 @@ Contributors * Jannis Leidel * Jason R. Coombs * Jim Fulton +* Jonathan Lange * Justin Azoff * Lennart Regebro * Marc Abramowitz From 152931a9f0fc509eab7d3c10934f6d3137651104 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Oct 2012 03:38:07 -0400 Subject: [PATCH 3606/8469] Fix failing test case on Windows (can't rmtree if a file is open in that tree) --HG-- branch : distribute extra : rebase_source : 99e78b88c18007b410c0be28237db8341413e334 --- setuptools/tests/test_upload_docs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index fddb755d9c..769f16cc5a 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -65,6 +65,8 @@ def test_create_zipfile(self): zip_file = zipfile.ZipFile(tmp_file) # woh... assert zip_file.namelist() == ['index.html'] + + zip_file.close() finally: shutil.rmtree(tmp_dir) From 44db905fd2d3c3a8cd7218a1c45cf54d353ed9ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Oct 2012 03:49:51 -0400 Subject: [PATCH 3607/8469] Fix two failing tests on Windows (paths separated by backslash didn't match manifest paths separated by slash). --HG-- branch : distribute extra : rebase_source : f8cd5491fcfe18f687a67423bb8ccc43d3d76672 --- setuptools/tests/test_sdist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 65b83b6e10..347e00859c 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,6 +9,7 @@ import unittest import urllib import unicodedata +import posixpath from StringIO import StringIO @@ -137,7 +138,7 @@ def test_manifest_is_written_with_utf8_encoding(self): os.mkdir('sdist_test.egg-info') # UTF-8 filename - filename = os.path.join('sdist_test', 'smörbröd.py') + filename = posixpath.join('sdist_test', 'smörbröd.py') # Add UTF-8 filename and write manifest quiet() @@ -173,7 +174,7 @@ def test_manifest_is_written_with_surrogateescape_error_handler(self): os.mkdir('sdist_test.egg-info') # Latin-1 filename - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + filename = posixpath.join(b('sdist_test'), LATIN1_FILENAME) # Add filename with surrogates and write manifest quiet() From 724ffeddce8c6f302b84b2112bfc76971c7da4f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Oct 2012 04:01:09 -0400 Subject: [PATCH 3608/8469] Added tag 0.6.29 for changeset 4f82563d0f5d --HG-- branch : distribute extra : rebase_source : 1abfe95cb04e389c1bd353687ab12b471805a8fb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 287e85d21e..619f5b5f63 100644 --- a/.hgtags +++ b/.hgtags @@ -37,3 +37,4 @@ de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 469c3b948e41ef28752b3cdf3c7fb9618355ebf5 0.6.27 fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 +4f82563d0f5d1af1fb215c0ac87f38b16bb5c42d 0.6.29 From ae5c5639d3704b1c4caece39839b6135fe8381b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Oct 2012 04:01:36 -0400 Subject: [PATCH 3609/8469] Bumped to 0.6.30 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 2181b40073d9790f489b692900f53c5efb3c34cd --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 679b255138..4152d37b67 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.29.tar.gz - $ tar -xzvf distribute-0.6.29.tar.gz - $ cd distribute-0.6.29 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.30.tar.gz + $ tar -xzvf distribute-0.6.30.tar.gz + $ cd distribute-0.6.30 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 23d2a7d5f5..482f2f20f3 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -48,7 +48,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.29" +DEFAULT_VERSION = "0.6.30" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 7b82a884b2..e6cfdca094 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.29' +version = '0.6.30' # The full version, including alpha/beta/rc tags. -release = '0.6.29' +release = '0.6.30' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index f4f88bac35..dd12057f0c 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.29' +VERSION = '0.6.30' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 6e04bd2403..f3f731d1b1 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.29" +VERSION = "0.6.30" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 458736bf77ebf11bc05d0eca91ad21f01543fab3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Oct 2012 04:21:33 -0400 Subject: [PATCH 3610/8469] Fix RST rendering issues in CHANGES.txt --HG-- branch : distribute extra : rebase_source : d8cdde27fcf533474d99aa1d4acfa0b181e8ab71 --- CHANGES.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 342add9327..8b6666e051 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,7 +18,7 @@ CHANGES * Issue #303: Read manifest file with UTF-8 encoding under Python 3. * Issue #301: Allow to run tests of namespace packages when using 2to3. * Issue #304: Prevent import loop in site.py under Python 3.3. -* Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3. +* Issue #283: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3. * Issue #299: The develop command didn't work on Python 3, when using 2to3, as the egg link would go to the Python 2 source. Linking to the 2to3'd code in build/lib makes it work, although you will have to rebuild the module @@ -41,7 +41,8 @@ CHANGES * Issue #294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. * Added support for .dist-info directories. -* Issue #283: Fix and disable scanning of *.pyc / *.pyo files on Python 3.3. +* Issue #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on + Python 3.3. ------ 0.6.27 From 8e41afb1088ada9acb96ae295b0559a5353fdeba Mon Sep 17 00:00:00 2001 From: Roy Hyunjin Han Date: Sun, 21 Oct 2012 05:34:36 -0400 Subject: [PATCH 3611/8469] Fixed bug by renaming _cmd to _cmd1 --HG-- branch : distribute extra : rebase_source : edc82698ce88ae89fc840ea0b47f9398b80550fa --- distribute_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribute_setup.py b/distribute_setup.py index 482f2f20f3..d24e2360d7 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -445,7 +445,7 @@ def _relaunch(): log.warn('Relaunching...') # we have to relaunch the process # pip marker to avoid a relaunch bug - _cmd = ['-c', 'install', '--single-version-externally-managed'] + _cmd1 = ['-c', 'install', '--single-version-externally-managed'] _cmd2 = ['-c', 'install', '--record'] if sys.argv[:3] == _cmd1 or sys.argv[:3] == _cmd2: sys.argv[0] = 'setup.py' From 18b97c5ff39229106f1561aaa2b59586d174a305 Mon Sep 17 00:00:00 2001 From: g2p Date: Mon, 22 Oct 2012 05:44:04 -0400 Subject: [PATCH 3612/8469] Clean up temporary directory in distribute_setup.py. Fixes #328. --HG-- branch : distribute extra : rebase_source : 430cf77fcf14e26cafbf4ba6abc680efa1fb3570 --- distribute_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribute_setup.py b/distribute_setup.py index d24e2360d7..cebd80b190 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -14,6 +14,7 @@ This file can also be run as a script to install or upgrade setuptools. """ import os +import shutil import sys import time import fnmatch @@ -90,6 +91,7 @@ def _install(tarball, install_args=()): return 2 finally: os.chdir(old_wd) + shutil.rmtree(tmpdir) def _build_egg(egg, tarball, to_dir): @@ -114,6 +116,7 @@ def _build_egg(egg, tarball, to_dir): finally: os.chdir(old_wd) + shutil.rmtree(tmpdir) # returning the result log.warn(egg) if not os.path.exists(egg): From b9d292c329653468b734fac0b83e764f4f06c052 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Oct 2012 06:01:29 -0400 Subject: [PATCH 3613/8469] Update changelog --HG-- branch : distribute extra : rebase_source : 90ca6c6b88b0d42dc1d9831aea44ae03082f1ce8 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8b6666e051..1ba872ff35 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.30 +------ + +* Issue #328: Clean up temporary directories in distribute_setup.py. +* Fix fatal bug in distribute_setup.py. + ------ 0.6.29 ------ From aa5ab9e447106af6b82a12e640b7fc226f9fcfc1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Oct 2012 06:02:18 -0400 Subject: [PATCH 3614/8469] Added tag 0.6.30 for changeset 7464fc916fa4 --HG-- branch : distribute extra : rebase_source : bfebceee0edda506992741c0be1e8802d87fd64f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 619f5b5f63..903deb3eb3 100644 --- a/.hgtags +++ b/.hgtags @@ -38,3 +38,4 @@ b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 469c3b948e41ef28752b3cdf3c7fb9618355ebf5 0.6.27 fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 4f82563d0f5d1af1fb215c0ac87f38b16bb5c42d 0.6.29 +7464fc916fa4d8308e34e45a1198512fe04c97b4 0.6.30 From 69fa64f972dc95b9e9bb583229e20bb117fb7102 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Oct 2012 06:03:05 -0400 Subject: [PATCH 3615/8469] Bumped to 0.6.31 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 74ac06a235b4d51a69d5be1c494bf922c8093072 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 4152d37b67..7b5ae24a36 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.30.tar.gz - $ tar -xzvf distribute-0.6.30.tar.gz - $ cd distribute-0.6.30 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.31.tar.gz + $ tar -xzvf distribute-0.6.31.tar.gz + $ cd distribute-0.6.31 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index cebd80b190..f3e85a1ed5 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.30" +DEFAULT_VERSION = "0.6.31" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index e6cfdca094..08fa643df9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.30' +version = '0.6.31' # The full version, including alpha/beta/rc tags. -release = '0.6.30' +release = '0.6.31' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index dd12057f0c..18299a4fcb 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.30' +VERSION = '0.6.31' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index f3f731d1b1..09a5c4fcc6 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.30" +VERSION = "0.6.31" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From e89509b4a75dd077a7c87da186aac829c6ba4f99 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 22 Oct 2012 20:32:42 +0300 Subject: [PATCH 3616/8469] Automatically link issues in CHANGES.txt uploaded to PyPI --HG-- branch : distribute extra : rebase_source : c5311107dd7fa43d90d6588d898bb40900d348e8 --- setup.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 09a5c4fcc6..13c9be7c3a 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import sys import os import textwrap +import re # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -130,6 +131,22 @@ def _being_installed(): from distribute_setup import _before_install _before_install() +# return contents of reStructureText file with linked issue references +def _linkified(rstfile): + bitroot = 'http://bitbucket.org/tarek/distribute' + revision = re.compile(r'\b(issue\s*#?\d+)\b', re.M | re.I) + + rstext = open(rstfile).read() + + anchors = revision.findall(rstext) # ['Issue #43', ...] + anchors = sorted(set(anchors)) + rstext = revision.sub(r'`\1`_', rstext) + rstext += "\n" + for x in anchors: + issue = re.findall(r'\d+', x)[0] + rstext += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) + rstext += "\n" + return rstext dist = setup( name="distribute", @@ -139,7 +156,7 @@ def _being_installed(): author="The fellowship of the packaging", author_email="distutils-sig@python.org", license="PSF or ZPL", - long_description = open('README.txt').read() + open('CHANGES.txt').read(), + long_description = open('README.txt').read() + _linkified('CHANGES.txt'), keywords = "CPAN PyPI distutils eggs package management", url = "http://packages.python.org/distribute", test_suite = 'setuptools.tests', From 89efff76bc23c4859bfc21e6d4522cf5396a12b3 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Mon, 22 Oct 2012 20:52:43 +0300 Subject: [PATCH 3617/8469] CHANGES.txt: remove issue URLs - these are inserted by autolinker --HG-- branch : distribute extra : rebase_source : 264ba8bd377f0580b34ee1febf3b796e18c5431e --- CHANGES.txt | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1ba872ff35..12b4907a04 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -306,11 +306,10 @@ CHANGES ----- * Added the generation of `distribute_setup_3k.py` during the release. - This close http://bitbucket.org/tarek/distribute/issue/52. + This closes issue #52. * Added an upload_docs command to easily upload project documentation to - PyPI's http://packages.python.org. - This close http://bitbucket.org/tarek/distribute/issue/56. + PyPI's http://packages.python.org. This close issue #56. * Fixed a bootstrap bug on the use_setuptools() API. @@ -339,7 +338,7 @@ setuptools This closes http://bugs.python.org/setuptools/issue39. * Added option to run 2to3 automatically when installing on Python 3. - This closes http://bitbucket.org/tarek/distribute/issue/31. + This closes issue #31. * Fixed invalid usage of requirement.parse, that broke develop -d. This closes http://bugs.python.org/setuptools/issue44. @@ -353,11 +352,9 @@ setuptools bootstrapping ============= -* Fixed bootstrap not working on Windows. - This closes http://bitbucket.org/tarek/distribute/issue/49. +* Fixed bootstrap not working on Windows. This closes issue #49. -* Fixed 2.6 dependencies. - This closes http://bitbucket.org/tarek/distribute/issue/50. +* Fixed 2.6 dependencies. This closes issue #50. * Make sure setuptools is patched when running through easy_install This closes http://bugs.python.org/setuptools/issue40. @@ -370,16 +367,14 @@ setuptools ========== * package_index.urlopen now catches BadStatusLine and malformed url errors. - This closes http://bitbucket.org/tarek/distribute/issue/16 and - http://bitbucket.org/tarek/distribute/issue/18. + This closes issue #16 and issue #18. * zip_ok is now False by default. This closes http://bugs.python.org/setuptools/issue33. * Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20. -* Fixed invalid bootstraping with easy_install installation - http://bitbucket.org/tarek/distribute/issue/40. +* Fixed invalid bootstraping with easy_install installation (issue #40). Thanks to Florian Schulze for the help. * Removed buildout/bootstrap.py. A new repository will create a specific @@ -391,7 +386,7 @@ bootstrapping * The boostrap process leave setuptools alone if detected in the system and --root or --prefix is provided, but is not in the same location. - This closes http://bitbucket.org/tarek/distribute/issue/10. + This closes issue #10. --- 0.6 @@ -401,45 +396,38 @@ setuptools ========== * Packages required at build time where not fully present at install time. - This closes http://bitbucket.org/tarek/distribute/issue/12. + This closes issue #12. -* Protected against failures in tarfile extraction. This closes - http://bitbucket.org/tarek/distribute/issue/10. +* Protected against failures in tarfile extraction. This closes issue #10. -* Made Jython api_tests.txt doctest compatible. This closes - http://bitbucket.org/tarek/distribute/issue/7. +* Made Jython api_tests.txt doctest compatible. This closes issue #7. * sandbox.py replaced builtin type file with builtin function open. This - closes http://bitbucket.org/tarek/distribute/issue/6. + closes issue #6. -* Immediately close all file handles. This closes - http://bitbucket.org/tarek/distribute/issue/3. +* Immediately close all file handles. This closes issue #3. -* Added compatibility with Subversion 1.6. This references - http://bitbucket.org/tarek/distribute/issue/1. +* Added compatibility with Subversion 1.6. This references issue #1. pkg_resources ============= * Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API - instead. Based on a patch from ronaldoussoren. This closes - http://bitbucket.org/tarek/distribute/issue/5. + instead. Based on a patch from ronaldoussoren. This closes issue #5. * Fixed a SandboxViolation for mkdir that could occur in certain cases. - This closes http://bitbucket.org/tarek/distribute/issue/13. + This closes issue #13. * Allow to find_on_path on systems with tight permissions to fail gracefully. - This closes http://bitbucket.org/tarek/distribute/issue/9. + This closes issue #9. * Corrected inconsistency between documentation and code of add_entry. - This closes http://bitbucket.org/tarek/distribute/issue/8. + This closes issue #8. -* Immediately close all file handles. This closes - http://bitbucket.org/tarek/distribute/issue/3. +* Immediately close all file handles. This closes issue #3. easy_install ============ -* Immediately close all file handles. This closes - http://bitbucket.org/tarek/distribute/issue/3. +* Immediately close all file handles. This closes issue #3. From 285e4e10ef6678f0b5bdb61ff5c183dd6360a4af Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 23 Oct 2012 20:26:14 +0100 Subject: [PATCH 3618/8469] Issue #16116: Now uses corrected include and library paths when building C extensions in a venv. --- command/build_ext.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index f16e2f17ef..b1d951e6f8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -160,6 +160,11 @@ def finalize_options(self): if isinstance(self.include_dirs, str): self.include_dirs = self.include_dirs.split(os.pathsep) + # If in a virtualenv, add its include directory + # Issue 16116 + if sys.exec_prefix != sys.base_exec_prefix: + self.include_dirs.append(os.path.join(sys.exec_prefix, 'include')) + # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. self.include_dirs.append(py_include) @@ -190,6 +195,8 @@ def finalize_options(self): # must be the *native* platform. But we don't really support # cross-compiling via a binary install anyway, so we let it go. self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) + if sys.base_exec_prefix != sys.prefix: # Issue 16116 + self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs')) if self.debug: self.build_temp = os.path.join(self.build_temp, "Debug") else: From a3966d17f6f7f0769b83d5ef56fc8f97f6a4b415 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 24 Oct 2012 03:19:23 +0200 Subject: [PATCH 3619/8469] Issue #329: Properly close files created by tests for compatibility with Jython. --HG-- branch : distribute extra : rebase_source : 09c503106ef73b7694e13443ae899666652922a4 --- CHANGES.txt | 6 ++++++ setuptools/tests/test_dist_info.py | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 12b4907a04..9513ed4595 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.31 +------ + +* Issue #329: Properly close files created by tests for compatibility with Jython. + ------ 0.6.30 ------ diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 623ccc471a..fcb78c36d9 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -50,7 +50,8 @@ def setUp(self): versioned = os.path.join(self.tmpdir, 'VersionedDistribution-2.718.dist-info') os.mkdir(versioned) - open(os.path.join(versioned, 'METADATA'), 'w+').write(DALS( + metadata_file = open(os.path.join(versioned, 'METADATA'), 'w+') + metadata_file.write(DALS( """ Metadata-Version: 1.2 Name: VersionedDistribution @@ -58,11 +59,13 @@ def setUp(self): Provides-Extra: baz Requires-Dist: quux (>=1.1); extra == 'baz' """)) + metadata_file.close() unversioned = os.path.join(self.tmpdir, 'UnversionedDistribution.dist-info') os.mkdir(unversioned) - open(os.path.join(unversioned, 'METADATA'), 'w+').write(DALS( + metadata_file = open(os.path.join(unversioned, 'METADATA'), 'w+') + metadata_file.write(DALS( """ Metadata-Version: 1.2 Name: UnversionedDistribution @@ -71,6 +74,7 @@ def setUp(self): Provides-Extra: baz Requires-Dist: quux (>=1.1); extra == 'baz' """)) + metadata_file.close() def tearDown(self): shutil.rmtree(self.tmpdir) From 3b26424a5a614cbed17f17591f91ec453be9d038 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Thu, 25 Oct 2012 23:45:25 +0200 Subject: [PATCH 3620/8469] When writing the manifest under Python 3, skip filenames that cannot be encoded to UTF-8. --HG-- branch : distribute extra : rebase_source : f1b439267fce37754aac49af15a9e26346950a26 --- setuptools/command/egg_info.py | 14 +++++++++++++- setuptools/command/sdist.py | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9955c8ef39..6e3d67af27 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -323,6 +323,18 @@ def write_manifest (self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ + # The manifest must be UTF-8 encodable. See #303. + if sys.version_info >= (3,): + files = [] + for file in self.filelist.files: + try: + file.encode("utf-8") + except UnicodeEncodeError: + log.warn("'%s' not UTF-8 encodable -- skipping" % file) + else: + files.append(file) + self.filelist.files = files + files = self.filelist.files if os.sep!='/': files = [f.replace(os.sep,'/') for f in files] @@ -360,7 +372,7 @@ def write_file (filename, contents): """ contents = "\n".join(contents) if sys.version_info >= (3,): - contents = contents.encode("utf-8", "surrogateescape") + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 42558143b4..d5259c2bde 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -283,7 +283,7 @@ def read_manifest(self): manifest = open(self.manifest, 'rbU') for line in manifest: if sys.version_info >= (3,): - line = line.decode('UTF-8', 'surrogateescape') + line = line.decode('UTF-8') # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: From 383ad7a4f7a1832cf74c250cdae5b63fa4ad61bb Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Thu, 25 Oct 2012 23:45:35 +0200 Subject: [PATCH 3621/8469] Update tests. --HG-- branch : distribute extra : rebase_source : 831e694725e5db1bc360298fbc4b7b58db836bdd --- setuptools/tests/test_sdist.py | 220 ++++++++++++++++++--------------- 1 file changed, 121 insertions(+), 99 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 347e00859c..a3fde02601 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,6 @@ import unittest import urllib import unicodedata -import posixpath from StringIO import StringIO @@ -49,14 +48,22 @@ def unquiet(): sys.stdout, sys.stderr = old_stdout, old_stderr -# Fake byte literals to shut up Python <= 2.5 +# Fake byte literals for Python <= 2.5 def b(s, encoding='utf-8'): if sys.version_info >= (3,): return s.encode(encoding) return s -# HFS Plus returns decomposed UTF-8 +# Convert to POSIX path +def posix(path): + if sys.version_info >= (3,) and not isinstance(path, str): + return path.replace(os.sep.encode('ascii'), b('/')) + else: + return path.replace(os.sep, '/') + + +# HFS Plus uses decomposed UTF-8 def decompose(path): if isinstance(path, unicode): return unicodedata.normalize('NFD', path) @@ -69,20 +76,6 @@ def decompose(path): return path -# HFS Plus quotes unknown bytes like so: %F6 -def hfs_quote(path): - if isinstance(path, unicode): - raise TypeError('bytes are required') - try: - u = path.decode('utf-8') - except UnicodeDecodeError: - path = urllib.quote(path) # Not UTF-8 - else: - if sys.version_info >= (3,): - path = u - return path - - class TestSdistTest(unittest.TestCase): def setUp(self): @@ -138,7 +131,7 @@ def test_manifest_is_written_with_utf8_encoding(self): os.mkdir('sdist_test.egg-info') # UTF-8 filename - filename = posixpath.join('sdist_test', 'smörbröd.py') + filename = os.path.join('sdist_test', 'smörbröd.py') # Add UTF-8 filename and write manifest quiet() @@ -155,46 +148,94 @@ def test_manifest_is_written_with_utf8_encoding(self): # The manifest should be UTF-8 encoded try: - u = contents.decode('UTF-8') + u_contents = contents.decode('UTF-8') except UnicodeDecodeError, e: self.fail(e) # The manifest should contain the UTF-8 filename if sys.version_info >= (3,): - self.assertTrue(filename in u) + self.assertTrue(posix(filename) in u_contents) else: - self.assertTrue(filename in contents) + self.assertTrue(posix(filename) in contents) - def test_manifest_is_written_with_surrogateescape_error_handler(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') + # Python 3 only + if sys.version_info >= (3,): - # Latin-1 filename - filename = posixpath.join(b('sdist_test'), LATIN1_FILENAME) + def test_write_manifest_allows_utf8_filenames(self): + # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') - # Add filename with surrogates and write manifest - quiet() - try: - mm.run() - if sys.version_info >= (3,): - u = filename.decode('utf-8', 'surrogateescape') - mm.filelist.files.append(u) - else: - mm.filelist.files.append(filename) - mm.write_manifest() - finally: - unquiet() + # UTF-8 filename + filename = os.path.join(b('sdist_test'), b('smörbröd.py')) - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() + # Add filename and write manifest + quiet() + try: + mm.run() + u_filename = filename.decode('utf-8') + mm.filelist.files.append(u_filename) + # Re-write manifest + mm.write_manifest() + finally: + unquiet() + + manifest = open(mm.manifest, 'rbU') + contents = manifest.read() + manifest.close() + + # The manifest should be UTF-8 encoded + try: + contents.decode('UTF-8') + except UnicodeDecodeError, e: + self.fail(e) + + # The manifest should contain the UTF-8 filename + self.assertTrue(posix(filename) in contents) + + # The filelist should have been updated as well + self.assertTrue(u_filename in mm.filelist.files) - # The manifest should contain the Latin-1 filename - self.assertTrue(filename in contents) + def test_write_manifest_skips_non_utf8_filenames(self): + # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') + + # Latin-1 filename + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + + # Add filename with surrogates and write manifest + quiet() + try: + mm.run() + u_filename = filename.decode('utf-8', 'surrogateescape') + mm.filelist.files.append(u_filename) + # Re-write manifest + mm.write_manifest() + finally: + unquiet() + + manifest = open(mm.manifest, 'rbU') + contents = manifest.read() + manifest.close() + + # The manifest should be UTF-8 encoded + try: + contents.decode('UTF-8') + except UnicodeDecodeError, e: + self.fail(e) + + # The Latin-1 filename should have been skipped + self.assertFalse(posix(filename) in contents) + + # The filelist should have been updated as well + self.assertFalse(u_filename in mm.filelist.files) def test_manifest_is_read_with_utf8_encoding(self): # Test for #303. @@ -218,37 +259,37 @@ def test_manifest_is_read_with_utf8_encoding(self): filename = decompose(filename) self.assertTrue(filename in cmd.filelist.files) - def test_manifest_is_read_with_surrogateescape_error_handler(self): - # Test for #303. + # Python 3 only + if sys.version_info >= (3,): - # This is hard to test on HFS Plus because it quotes unknown - # bytes (see previous test). Furthermore, egg_info.FileList - # only appends filenames that os.path.exist. + def test_read_manifest_rejects_surrogates(self): + # Test for #303. - # We therefore write the manifest file by hand and check whether - # read_manifest produces a UnicodeDecodeError. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() + # This is hard to test on HFS Plus because it quotes unknown + # bytes (see previous test). Furthermore, egg_info.FileList + # only appends filenames that os.path.exist. - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + # We therefore write the manifest file by hand and check whether + # read_manifest produces a UnicodeDecodeError. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() - quiet() - try: - cmd.run() - # Add Latin-1 filename to manifest - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - manifest = open(cmd.manifest, 'ab') - manifest.write(filename+b('\n')) - manifest.close() - # Re-read manifest + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + + quiet() try: - cmd.read_manifest() - except UnicodeDecodeError, e: - self.fail(e) - finally: - unquiet() + cmd.run() + # Add Latin-1 filename to manifest + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + manifest = open(cmd.manifest, 'ab') + manifest.write(filename+b('\n')) + manifest.close() + finally: + unquiet() + + self.assertRaises(UnicodeDecodeError, cmd.read_manifest) def test_sdist_with_utf8_encoded_filename(self): # Test for #303. @@ -268,9 +309,8 @@ def test_sdist_with_utf8_encoded_filename(self): unquiet() # The filelist should contain the UTF-8 filename - # (in one representation or other) if sys.version_info >= (3,): - filename = filename.decode(sys.getfilesystemencoding(), 'surrogateescape') + filename = filename.decode('utf-8') if sys.platform == 'darwin': filename = decompose(filename) self.assertTrue(filename in cmd.filelist.files) @@ -292,32 +332,14 @@ def test_sdist_with_latin1_encoded_filename(self): finally: unquiet() - # The filelist should contain the Latin-1 filename - # (in one representation or other) - if sys.platform == 'darwin': - filename = hfs_quote(filename) - elif sys.version_info >= (3,): - filename = filename.decode(sys.getfilesystemencoding(), 'surrogateescape') - self.assertTrue(filename in cmd.filelist.files) - - def test_decompose(self): - self.assertNotEqual('smörbröd.py', decompose('smörbröd.py')) - - if sys.version_info >= (3,): - self.assertEqual(len('smörbröd.py'), 11) - self.assertEqual(len(decompose('smörbröd.py')), 13) - else: - self.assertEqual(len('smörbröd.py'), 13) - self.assertEqual(len(decompose('smörbröd.py')), 15) - - def test_hfs_quote(self): - self.assertEqual(hfs_quote(LATIN1_FILENAME), 'sm%F6rbr%F6d.py') - - # Bytes are required + # The Latin-1 filename should have been skipped if sys.version_info >= (3,): - self.assertRaises(TypeError, hfs_quote, 'smörbröd.py') + filename = filename.decode('latin-1') + self.assertFalse(filename in cmd.filelist.files) else: - self.assertRaises(TypeError, hfs_quote, 'smörbröd.py'.decode('utf-8')) + # No conversion takes place under Python 2 and the + # filename is included. We shall keep it that way for BBB. + self.assertTrue(filename in cmd.filelist.files) def test_suite(): From 22882958087e20839daf0139a94f8411d17d6a2c Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 26 Oct 2012 02:10:14 +0200 Subject: [PATCH 3622/8469] Make sdist tests pass on Windows. --HG-- branch : distribute extra : rebase_source : 9fb51372737224be8d5c50265b04a36f19543572 --- setuptools/tests/test_sdist.py | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index a3fde02601..378015a86a 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -308,12 +308,19 @@ def test_sdist_with_utf8_encoded_filename(self): finally: unquiet() - # The filelist should contain the UTF-8 filename - if sys.version_info >= (3,): - filename = filename.decode('utf-8') if sys.platform == 'darwin': filename = decompose(filename) - self.assertTrue(filename in cmd.filelist.files) + + if sys.version_info >= (3,): + if sys.platform == 'win32': + # Python 3 mangles the UTF-8 filename + filename = filename.decode('cp1252') + self.assertTrue(filename in cmd.filelist.files) + else: + filename = filename.decode('utf-8') + self.assertTrue(filename in cmd.filelist.files) + else: + self.assertTrue(filename in cmd.filelist.files) def test_sdist_with_latin1_encoded_filename(self): # Test for #303. @@ -332,13 +339,17 @@ def test_sdist_with_latin1_encoded_filename(self): finally: unquiet() - # The Latin-1 filename should have been skipped if sys.version_info >= (3,): filename = filename.decode('latin-1') - self.assertFalse(filename in cmd.filelist.files) + if sys.platform == 'win32': + # Latin-1 is similar to Windows-1252 + self.assertTrue(filename in cmd.filelist.files) + else: + # The Latin-1 filename should have been skipped + self.assertFalse(filename in cmd.filelist.files) else: - # No conversion takes place under Python 2 and the - # filename is included. We shall keep it that way for BBB. + # No conversion takes place under Python 2 and the file + # is included. We shall keep it that way for BBB. self.assertTrue(filename in cmd.filelist.files) From f8481f4b522f0fbeafbb36a20dd105497f2623ac Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 26 Oct 2012 02:10:48 +0200 Subject: [PATCH 3623/8469] This one also failed on Windows. --HG-- branch : distribute extra : rebase_source : c26a4318302d55dfdd67d379525e84172b440b82 --- setuptools/package_index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 7a954e2137..0ee21e3b7b 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -834,9 +834,8 @@ def open_with_auth(url): # Double scheme does not raise on Mac OS X as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. - if sys.platform == 'darwin': - if netloc.endswith(':'): - raise httplib.InvalidURL("nonnumeric port: ''") + if netloc.endswith(':'): + raise httplib.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): auth, host = urllib2.splituser(netloc) From e485c19015d4fced68b25c09ca66a1743d3ab27c Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 26 Oct 2012 12:46:41 +0200 Subject: [PATCH 3624/8469] Keep 'surrogateescape' when reading the manifest, to avoid breaking on bad input. --HG-- branch : distribute extra : rebase_source : 6f894cd508e73fae0ad02860654df5181055ba4d --- setuptools/command/sdist.py | 3 ++- setuptools/tests/test_sdist.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index d5259c2bde..79eed214e6 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -283,7 +283,8 @@ def read_manifest(self): manifest = open(self.manifest, 'rbU') for line in manifest: if sys.version_info >= (3,): - line = line.decode('UTF-8') + # Don't break if surrogates have crept into the manifest + line = line.decode('UTF-8', 'surrogateescape') # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 378015a86a..04b3db661e 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -262,7 +262,7 @@ def test_manifest_is_read_with_utf8_encoding(self): # Python 3 only if sys.version_info >= (3,): - def test_read_manifest_rejects_surrogates(self): + def test_manifest_is_read_with_surrogateescape_error_handler(self): # Test for #303. # This is hard to test on HFS Plus because it quotes unknown @@ -286,11 +286,14 @@ def test_read_manifest_rejects_surrogates(self): manifest = open(cmd.manifest, 'ab') manifest.write(filename+b('\n')) manifest.close() + # Re-read manifest + try: + cmd.read_manifest() + except UnicodeDecodeError, e: + self.fail(e) finally: unquiet() - self.assertRaises(UnicodeDecodeError, cmd.read_manifest) - def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From f266bc3745169122fcfcacb781e7e3c70fc58bfb Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Thu, 1 Nov 2012 11:47:24 +0100 Subject: [PATCH 3625/8469] Skip undecodable filenames in read_manifest as well. --HG-- branch : distribute extra : rebase_source : 2dda494b1a4758e84dde81cc61170acd0e55d2f2 --- setuptools/command/sdist.py | 7 +++++-- setuptools/tests/test_sdist.py | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 79eed214e6..7a6d2b7d7c 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -283,8 +283,11 @@ def read_manifest(self): manifest = open(self.manifest, 'rbU') for line in manifest: if sys.version_info >= (3,): - # Don't break if surrogates have crept into the manifest - line = line.decode('UTF-8', 'surrogateescape') + try: + line = line.decode('UTF-8') + except UnicodeDecodeError: + log.warn("%r not UTF-8 decodable -- skipping" % line) + continue # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 04b3db661e..a596f4bdb9 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -262,7 +262,7 @@ def test_manifest_is_read_with_utf8_encoding(self): # Python 3 only if sys.version_info >= (3,): - def test_manifest_is_read_with_surrogateescape_error_handler(self): + def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. # This is hard to test on HFS Plus because it quotes unknown @@ -277,6 +277,7 @@ def test_manifest_is_read_with_surrogateescape_error_handler(self): cmd.ensure_finalized() filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + u_filename = filename.decode('latin-1') quiet() try: @@ -284,7 +285,7 @@ def test_manifest_is_read_with_surrogateescape_error_handler(self): # Add Latin-1 filename to manifest cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') - manifest.write(filename+b('\n')) + manifest.write(b('\n')+filename) manifest.close() # Re-read manifest try: @@ -294,6 +295,9 @@ def test_manifest_is_read_with_surrogateescape_error_handler(self): finally: unquiet() + # The Latin-1 filename should have been skipped + self.assertFalse(u_filename in cmd.filelist.files) + def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From 83b2066aa4a6e221dfd383e72c7a243850849c9d Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 2 Nov 2012 18:48:30 +0100 Subject: [PATCH 3626/8469] Work around Jython bugs #1980 and #1981. --HG-- branch : distribute extra : rebase_source : 3cc01234cdeeff2ed979316bb06319adab296dd6 --- CHANGES.txt | 1 + _markerlib/markers.py | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9513ed4595..18e685a9c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ------ * Issue #329: Properly close files created by tests for compatibility with Jython. +* Work around Jython bugs #1980 and #1981. ------ 0.6.30 diff --git a/_markerlib/markers.py b/_markerlib/markers.py index 54c2828a02..23091e6418 100644 --- a/_markerlib/markers.py +++ b/_markerlib/markers.py @@ -17,9 +17,7 @@ __all__ = ['default_environment', 'compile', 'interpret'] -from ast import Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop -from ast import parse, copy_location, NodeTransformer - +import ast import os import platform import sys @@ -46,27 +44,31 @@ def default_environment(): """Return copy of default PEP 385 globals dictionary.""" return dict(_VARS) -class ASTWhitelist(NodeTransformer): +class ASTWhitelist(ast.NodeTransformer): def __init__(self, statement): self.statement = statement # for error messages - - ALLOWED = (Compare, BoolOp, Attribute, Name, Load, Str, cmpop, boolop) - + + ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str) + # Bool operations + ALLOWED += (ast.And, ast.Or) + # Comparison operations + ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn) + def visit(self, node): """Ensure statement only contains allowed nodes.""" if not isinstance(node, self.ALLOWED): raise SyntaxError('Not allowed in environment markers.\n%s\n%s' % - (self.statement, + (self.statement, (' ' * node.col_offset) + '^')) - return NodeTransformer.visit(self, node) - + return ast.NodeTransformer.visit(self, node) + def visit_Attribute(self, node): """Flatten one level of attribute access.""" - new_node = Name("%s.%s" % (node.value.id, node.attr), node.ctx) - return copy_location(new_node, node) + new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx) + return ast.copy_location(new_node, node) def parse_marker(marker): - tree = parse(marker, mode='eval') + tree = ast.parse(marker, mode='eval') new_tree = ASTWhitelist(marker).generic_visit(tree) return new_tree From 945189affe2ec3d2e25a9255a73bf05b828ab7c3 Mon Sep 17 00:00:00 2001 From: "stefan@epy" Date: Mon, 5 Nov 2012 00:20:39 +0100 Subject: [PATCH 3627/8469] Rewrite tests for read_manifest. --HG-- branch : distribute extra : rebase_source : 8e52687fae6a06e1421c51ddec62870ef7499676 --- setuptools/tests/test_sdist.py | 58 ++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index a596f4bdb9..9d2c382fd7 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -57,7 +57,7 @@ def b(s, encoding='utf-8'): # Convert to POSIX path def posix(path): - if sys.version_info >= (3,) and not isinstance(path, str): + if sys.version_info >= (3,) and not isinstance(path, unicode): return path.replace(os.sep.encode('ascii'), b('/')) else: return path.replace(os.sep, '/') @@ -244,19 +244,35 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd = sdist(dist) cmd.ensure_finalized() - # UTF-8 filename - filename = os.path.join('sdist_test', 'smörbröd.py') + # Create manifest + quiet() + try: + cmd.run() + finally: + unquiet() + + # Add UTF-8 filename to manifest + filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + manifest = open(cmd.manifest, 'ab') + manifest.write(b('\n')+filename) + manifest.close() + + # The file must exist to be included in the filelist open(filename, 'w').close() + # Re-read manifest quiet() try: - cmd.run() + cmd.read_manifest() finally: unquiet() # The filelist should contain the UTF-8 filename if sys.platform == 'darwin': filename = decompose(filename) + if sys.version_info >= (3,): + filename = filename.decode('utf-8') self.assertTrue(filename in cmd.filelist.files) # Python 3 only @@ -264,30 +280,31 @@ def test_manifest_is_read_with_utf8_encoding(self): def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. - - # This is hard to test on HFS Plus because it quotes unknown - # bytes (see previous test). Furthermore, egg_info.FileList - # only appends filenames that os.path.exist. - - # We therefore write the manifest file by hand and check whether - # read_manifest produces a UnicodeDecodeError. dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' cmd = sdist(dist) cmd.ensure_finalized() + # Create manifest + quiet() + try: + cmd.run() + finally: + unquiet() + + # Add Latin-1 filename to manifest filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) - u_filename = filename.decode('latin-1') + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + manifest = open(cmd.manifest, 'ab') + manifest.write(b('\n')+filename) + manifest.close() + # The file must exist to be included in the filelist + open(filename, 'w').close() + + # Re-read manifest quiet() try: - cmd.run() - # Add Latin-1 filename to manifest - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n')+filename) - manifest.close() - # Re-read manifest try: cmd.read_manifest() except UnicodeDecodeError, e: @@ -296,7 +313,8 @@ def test_read_manifest_skips_non_utf8_filenames(self): unquiet() # The Latin-1 filename should have been skipped - self.assertFalse(u_filename in cmd.filelist.files) + filename = filename.decode('latin-1') + self.assertFalse(filename in cmd.filelist.files) def test_sdist_with_utf8_encoded_filename(self): # Test for #303. From 739d56cdb4f18829de123379488a78cf52e0a6d1 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 5 Nov 2012 00:26:25 +0100 Subject: [PATCH 3628/8469] No longer decompose filename for comparison. --HG-- branch : distribute extra : rebase_source : 02265fdf50dbe58c41b98e575f1d0d71c95e4bcf --- setuptools/tests/test_sdist.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 9d2c382fd7..cb601d8cea 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -269,8 +269,6 @@ def test_manifest_is_read_with_utf8_encoding(self): unquiet() # The filelist should contain the UTF-8 filename - if sys.platform == 'darwin': - filename = decompose(filename) if sys.version_info >= (3,): filename = filename.decode('utf-8') self.assertTrue(filename in cmd.filelist.files) From 19a723890b724f92b8c42b162cea2a4052a746f2 Mon Sep 17 00:00:00 2001 From: "stefan@epy" Date: Mon, 5 Nov 2012 01:35:25 +0100 Subject: [PATCH 3629/8469] Warn if filenames cannot be added to the filelist. --HG-- branch : distribute extra : rebase_source : 9fdc3c28b097e191db384cd81319c7a4edccf52b --- setuptools/command/egg_info.py | 10 ++++++++-- setuptools/tests/test_sdist.py | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6e3d67af27..cf6ef63c74 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,8 +281,14 @@ def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) - if os.path.exists(path): - self.files.append(path) + try: + if os.path.exists(path): + self.files.append(path) + else: + log.warn("%r not found -- skipping", path) + except UnicodeEncodeError: + log.warn("%r not %s encodable -- skipping", path, + sys.getfilesystemencoding()) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index cb601d8cea..a9d5d6e56c 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -262,6 +262,7 @@ def test_manifest_is_read_with_utf8_encoding(self): open(filename, 'w').close() # Re-read manifest + cmd.filelist.files = [] quiet() try: cmd.read_manifest() @@ -301,6 +302,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): open(filename, 'w').close() # Re-read manifest + cmd.filelist.files = [] quiet() try: try: From 397eda9b80e96fbd1a9fa494e34b6bfda963cdc1 Mon Sep 17 00:00:00 2001 From: "stefan@epy" Date: Mon, 5 Nov 2012 02:21:15 +0100 Subject: [PATCH 3630/8469] Python 3.0 has no surrogateescape. --HG-- branch : distribute extra : rebase_source : 83635f70b89fafb65f630947430b5c315cd9c80a --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index c43b0f421e..e21a88ce52 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -25,7 +25,7 @@ except ImportError: from setuptools.command.upload import upload -if sys.version_info >= (3,): +if sys.version_info >= (3, 1): errors = 'surrogateescape' else: errors = 'strict' From 924d4355aeacd172c32ce6a894f3c141bc363991 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 5 Nov 2012 11:44:41 +0100 Subject: [PATCH 3631/8469] Don't warn about a missing MANIFEST.in. --HG-- branch : distribute extra : rebase_source : 219c8a4e10da4a319a736c728d162528220d36e1 --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index cf6ef63c74..098dfe840d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -284,7 +284,7 @@ def append(self, item): try: if os.path.exists(path): self.files.append(path) - else: + elif path != manifest_maker.template: log.warn("%r not found -- skipping", path) except UnicodeEncodeError: log.warn("%r not %s encodable -- skipping", path, From 224634293910ce0cb4a6dd7865d4bc0ba70f5807 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 00:44:23 +0100 Subject: [PATCH 3632/8469] Encodability is irrelevant in FileList.append(). --HG-- branch : distribute extra : rebase_source : 9a89af6da8e816d0c978ee367699aca32611f3d2 --- setuptools/command/egg_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 098dfe840d..3de3441cf6 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -287,8 +287,7 @@ def append(self, item): elif path != manifest_maker.template: log.warn("%r not found -- skipping", path) except UnicodeEncodeError: - log.warn("%r not %s encodable -- skipping", path, - sys.getfilesystemencoding()) + self.files.append(path) From e69eb1098a650ba05b6ef998d8a118cbc10365a7 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 02:05:17 +0100 Subject: [PATCH 3633/8469] Never skip because of encoding in append. --HG-- branch : distribute extra : rebase_source : 89414e7f828ed2ca2b7118dfd5e17c72ccc44f5b --- setuptools/command/egg_info.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 098dfe840d..ad02cec868 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,14 +281,15 @@ def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) + # Filter unused template files all of which have ASCII names try: + if sys.version_info >= (3,): + path.encode('ascii') + except UnicodeEncodeError: + self.files.append(path) + else: if os.path.exists(path): self.files.append(path) - elif path != manifest_maker.template: - log.warn("%r not found -- skipping", path) - except UnicodeEncodeError: - log.warn("%r not %s encodable -- skipping", path, - sys.getfilesystemencoding()) From 057a7d98522cfb5fbee1c183b9922c919fb782b9 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 14:18:53 +0100 Subject: [PATCH 3634/8469] Revert yesterday's misguided attempt at being smart. --HG-- branch : distribute extra : rebase_source : 224fb95e8c8ad385a35187c49a102259e03e89a6 --- setuptools/command/egg_info.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index ad02cec868..098dfe840d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,15 +281,14 @@ def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) - # Filter unused template files all of which have ASCII names try: - if sys.version_info >= (3,): - path.encode('ascii') - except UnicodeEncodeError: - self.files.append(path) - else: if os.path.exists(path): self.files.append(path) + elif path != manifest_maker.template: + log.warn("%r not found -- skipping", path) + except UnicodeEncodeError: + log.warn("%r not %s encodable -- skipping", path, + sys.getfilesystemencoding()) From 98c3a5e71e558a80dafce9b5bb7baf8da9da7ec6 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 14:47:30 +0100 Subject: [PATCH 3635/8469] Log file not found message at debug level. --HG-- branch : distribute extra : rebase_source : 2c3afe957adc1b3c83f1dfba3d30adf7b0d7b3f3 --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 098dfe840d..8b29e672cf 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -285,7 +285,7 @@ def append(self, item): if os.path.exists(path): self.files.append(path) elif path != manifest_maker.template: - log.warn("%r not found -- skipping", path) + log.debug("%r not found -- skipping", path) except UnicodeEncodeError: log.warn("%r not %s encodable -- skipping", path, sys.getfilesystemencoding()) From b7c5bd34a32f20e54100fd88ede20c136571b1cf Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 17:22:59 +0100 Subject: [PATCH 3636/8469] Windows can store UTF-8 bytes as is. --HG-- branch : distribute extra : rebase_source : 99e089901a7dac003a53d53e85b0c08480c86e27 --- setuptools/command/egg_info.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8b29e672cf..9695627b99 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,15 +281,19 @@ def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) - try: + if sys.version_info >= (3,): + try: + if os.path.exists(path): + self.files.append(path) + elif sys.platform == 'win32': + if os.path.exists(path.encode('utf-8')): + self.files.append(path) + except UnicodeEncodeError: + log.warn("%r not %s encodable -- skipping", path, + sys.getfilesystemencoding()) + else: if os.path.exists(path): self.files.append(path) - elif path != manifest_maker.template: - log.debug("%r not found -- skipping", path) - except UnicodeEncodeError: - log.warn("%r not %s encodable -- skipping", path, - sys.getfilesystemencoding()) - From 91379d9c17d2ac432f64e1952e2b3d47c83eedcc Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 18:45:20 +0100 Subject: [PATCH 3637/8469] Add comments. --HG-- branch : distribute extra : rebase_source : 2d4ac9964b247122715c8296158c97d1f11adf89 --- setuptools/command/egg_info.py | 1 + setuptools/command/sdist.py | 1 + 2 files changed, 2 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9695627b99..d37ba90002 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -286,6 +286,7 @@ def append(self, item): if os.path.exists(path): self.files.append(path) elif sys.platform == 'win32': + # NTFS can store UTF-8 filenames as is if os.path.exists(path.encode('utf-8')): self.files.append(path) except UnicodeEncodeError: diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 7a6d2b7d7c..2fa3771aa6 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -282,6 +282,7 @@ def read_manifest(self): log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest, 'rbU') for line in manifest: + # The manifest must contain UTF-8. See #303. if sys.version_info >= (3,): try: line = line.decode('UTF-8') From be8173d7f6e5e971c5f028d5049d932cf5043efb Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Sat, 10 Nov 2012 22:14:57 +0100 Subject: [PATCH 3638/8469] Accept UTF-8 filenames into the filelist even if LANG=C. --HG-- branch : distribute extra : rebase_source : 499443a97846396e5790d80af32050f57f4aa43d --- setuptools/command/egg_info.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index d37ba90002..085a499bc2 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,17 +281,18 @@ def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) + if sys.version_info >= (3,): try: - if os.path.exists(path): + if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) - elif sys.platform == 'win32': - # NTFS can store UTF-8 filenames as is - if os.path.exists(path.encode('utf-8')): - self.files.append(path) except UnicodeEncodeError: - log.warn("%r not %s encodable -- skipping", path, - sys.getfilesystemencoding()) + # Support UTF-8 filenames even if LANG=C + if os.path.exists(path.encode('utf-8')): + self.files.append(path) + else: + log.warn("%r not %s encodable -- skipping", path, + sys.getfilesystemencoding()) else: if os.path.exists(path): self.files.append(path) From 89e72217be0c95226fa6db0062f3a58298f3e7c2 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 12 Nov 2012 13:54:37 +0100 Subject: [PATCH 3639/8469] Can't use 'surrogateescape' in upload_docs either. --HG-- branch : distribute extra : rebase_source : 6e262cc5a15434bda3543868b29ea9d69c51e238 --- setuptools/command/upload_docs.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index e21a88ce52..41d7f05591 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -18,6 +18,7 @@ from pkg_resources import iter_entry_points from distutils import log +from distutils.errors import DistutilsError from distutils.errors import DistutilsOptionError try: @@ -25,17 +26,12 @@ except ImportError: from setuptools.command.upload import upload -if sys.version_info >= (3, 1): - errors = 'surrogateescape' -else: - errors = 'strict' - # This is not just a replacement for byte literals # but works as a general purpose encoder def b(s, encoding='utf-8'): if isinstance(s, unicode): - return s.encode(encoding, errors) + return s.encode(encoding) return s From e0742352f7db736eb8fcb40a1b11f49f09b9ba10 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 12 Nov 2012 13:56:00 +0100 Subject: [PATCH 3640/8469] Rid unused import. --HG-- branch : distribute extra : rebase_source : 5d7f72cc77b6143cc4f36cb111a39c8af62f5b1e --- setuptools/command/upload_docs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 41d7f05591..98fb723337 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -18,7 +18,6 @@ from pkg_resources import iter_entry_points from distutils import log -from distutils.errors import DistutilsError from distutils.errors import DistutilsOptionError try: From cdb51001a8302e2948a42c68654550be1e2f941d Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Mon, 12 Nov 2012 22:56:15 +0100 Subject: [PATCH 3641/8469] No need for repr as path is always str. --HG-- branch : distribute extra : rebase_source : 6784f7ac37d43a341bb8b2466fbf68a082af2bee --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 085a499bc2..6145d6ea06 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -291,7 +291,7 @@ def append(self, item): if os.path.exists(path.encode('utf-8')): self.files.append(path) else: - log.warn("%r not %s encodable -- skipping", path, + log.warn("'%s' not %s encodable -- skipping", path, sys.getfilesystemencoding()) else: if os.path.exists(path): From 12599860ec654a39179704ce02323718c987114c Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 13 Nov 2012 14:01:29 +0100 Subject: [PATCH 3642/8469] Don't claim support for LANG=C. --HG-- branch : distribute extra : rebase_source : a366e936bfbce0c92831114e92a9d2c015841b5d --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6145d6ea06..0c2ea0cca3 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -287,7 +287,7 @@ def append(self, item): if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) except UnicodeEncodeError: - # Support UTF-8 filenames even if LANG=C + # Accept UTF-8 filenames even if LANG=C if os.path.exists(path.encode('utf-8')): self.files.append(path) else: From b42f4d2e305834e4b92fabbbc56e82d6757aa984 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 13 Nov 2012 14:01:41 +0100 Subject: [PATCH 3643/8469] Update CHANGES. --HG-- branch : distribute extra : rebase_source : 3fcde455c3af15df4f9696c827e60857de2b4747 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 18e685a9c9..af1d2efc03 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 0.6.31 ------ +* Issue #303: Make sure the manifest only ever contains UTF-8 in Python 3. * Issue #329: Properly close files created by tests for compatibility with Jython. * Work around Jython bugs #1980 and #1981. From 36d2b289f92919582dff786969b41d7c6a6dd92f Mon Sep 17 00:00:00 2001 From: Pete Hollobon Date: Thu, 22 Nov 2012 08:41:56 +0000 Subject: [PATCH 3644/8469] Decode contents of pth file within self-extracting exe on Python 3+ --HG-- branch : distribute extra : rebase_source : 3b29e7832874265eddf3a29b4a64e588c17d20e3 --- setuptools/command/easy_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f226023604..337532bcd9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1522,7 +1522,10 @@ def get_exe_prefixes(exe_filename): if name.endswith('-nspkg.pth'): continue if parts[0].upper() in ('PURELIB','PLATLIB'): - for pth in yield_lines(z.read(name)): + contents = z.read(name) + if sys.version_info >= (3,): + contents = contents.decode() + for pth in yield_lines(contents): pth = pth.strip().replace('\\','/') if not pth.startswith('import'): prefixes.append((('%s/%s/' % (parts[0],pth)), '')) From 7fbee015f7d31185ccfc890c59dbfab1c699db82 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 23 Nov 2012 22:38:55 +0100 Subject: [PATCH 3645/8469] Don't wrap sys.stdout if it's in the correct encoding already. --HG-- branch : distribute extra : rebase_source : 314a8be1a2e63ceaf501ecb047a29f62302be0a0 --- setuptools/dist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index afac180ebb..3e9e025496 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -657,6 +657,9 @@ def handle_display_options(self, option_order): if not isinstance(sys.stdout, io.TextIOWrapper): return _Distribution.handle_display_options(self, option_order) + if sys.stdout.encoding.lower() in ('utf-8', 'utf8'): + return _Distribution.handle_display_options(self, option_order) + # Print metadata in UTF-8 no matter the platform encoding = sys.stdout.encoding errors = sys.stdout.errors From 76ea724d5b44140b7c7908a1ca89a273fe65e294 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 10:15:12 -0500 Subject: [PATCH 3646/8469] reindent --HG-- branch : distribute extra : rebase_source : b5323771ca355fb01a7fda42e10b661935421201 --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index af1d2efc03..c8e56c06ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,8 @@ CHANGES ------ * Issue #303: Make sure the manifest only ever contains UTF-8 in Python 3. -* Issue #329: Properly close files created by tests for compatibility with Jython. +* Issue #329: Properly close files created by tests for compatibility with + Jython. * Work around Jython bugs #1980 and #1981. ------ From 9d1e4a7a1f340147dca2f215dc33485c31f1834e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 10:23:09 -0500 Subject: [PATCH 3647/8469] Added comment and updated CHANGES --HG-- branch : distribute extra : rebase_source : 4c828b71eced1215219f5b16d881fa1f35972744 --- CHANGES.txt | 7 +++++++ setuptools/dist.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c8e56c06ef..1912edefc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,13 @@ CHANGES * Issue #329: Properly close files created by tests for compatibility with Jython. * Work around Jython bugs #1980 and #1981. +* Issue #334: Provide workaround for packages that reference `sys.__stdout__` + such as numpy does. This change should address + `virtualenv #359 `_ as long + as the system encoding is UTF-8 or the IO encoding is specified in the + environment, i.e.:: + + PYTHONIOENCODING=utf8 pip install numpy ------ 0.6.30 diff --git a/setuptools/dist.py b/setuptools/dist.py index 3e9e025496..998a4dbe8b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -657,6 +657,8 @@ def handle_display_options(self, option_order): if not isinstance(sys.stdout, io.TextIOWrapper): return _Distribution.handle_display_options(self, option_order) + # Don't wrap stdout if utf-8 is already the encoding. Provides + # workaround for #334. if sys.stdout.encoding.lower() in ('utf-8', 'utf8'): return _Distribution.handle_display_options(self, option_order) From e0ea74d385bd5f2fcbf5030a67a1f51c65b564df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 10:23:23 -0500 Subject: [PATCH 3648/8469] Add hyperlinks to Jython bugs --HG-- branch : distribute extra : rebase_source : b3cfcd0da54b33c0571a678a1ea20b730e138f99 --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1912edefc9..2bb23165bb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,8 @@ CHANGES * Issue #303: Make sure the manifest only ever contains UTF-8 in Python 3. * Issue #329: Properly close files created by tests for compatibility with Jython. -* Work around Jython bugs #1980 and #1981. +* Work around Jython bugs `#1980 `_ and + `#1981 `_ as long From 88abd2e3da9e9eb5bf631f04c29cb2d7066ff5ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 11:09:53 -0500 Subject: [PATCH 3649/8469] Update changelog and contributors --HG-- branch : distribute extra : rebase_source : 25d26d635ed69fd41e0872048c6c804c26b40ecc --- CHANGES.txt | 2 ++ CONTRIBUTORS.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2bb23165bb..43211cb643 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,8 @@ CHANGES PYTHONIOENCODING=utf8 pip install numpy +* Fix for encoding issue when installing from Windows executable on Python 3. + ------ 0.6.30 ------ diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index e180edac4b..22c90aba19 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -18,6 +18,7 @@ Contributors * Marc Abramowitz * Martin von Löwis * Noufal Ibrahim +* Pete Hollobon * Philip Jenvey * Reinout van Rees * Robert Myers From 61568ea992268605a85d39edde0c179fe3850e9e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 11:10:14 -0500 Subject: [PATCH 3650/8469] Fix bug in hyperlink --HG-- branch : distribute extra : rebase_source : 4fff5c12aae70ab34ec71834b238ffbcc7bfd530 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 43211cb643..2b376104b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,7 +10,7 @@ CHANGES * Issue #329: Properly close files created by tests for compatibility with Jython. * Work around Jython bugs `#1980 `_ and - `#1981 `_. * Issue #334: Provide workaround for packages that reference `sys.__stdout__` such as numpy does. This change should address `virtualenv #359 `_ as long From 7f175a0bfb78659680159c194480866078ac271f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 22:56:03 -0500 Subject: [PATCH 3651/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : 9fa0ef551c34deba0f744ef279ecf9fe4ef7c13d --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2b376104b3..29843abbcd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,13 @@ CHANGES PYTHONIOENCODING=utf8 pip install numpy * Fix for encoding issue when installing from Windows executable on Python 3. +* Issue #323: Allow `setup_requires` requirements to supercede installed + requirements. Added some new keyword arguments to existing pkg_resources + methods. Also had to updated how __path__ is handled for namespace packages + to ensure that when a new egg distribution containing a namespace package is + placed on sys.path, the entries in __path__ are found in the same order they + would have been in had that egg been on the path when pkg_resources was + first imported. ------ 0.6.30 From bb564ea0637851a516dad029c8ccf6d30c451728 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 23:02:31 -0500 Subject: [PATCH 3652/8469] Added tag 0.6.31 for changeset 17bc972d67ed --HG-- branch : distribute extra : rebase_source : 79d77654d3f4d512fecfa26b512616af6c69631f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 903deb3eb3..4a15ad9a42 100644 --- a/.hgtags +++ b/.hgtags @@ -39,3 +39,4 @@ b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 4f82563d0f5d1af1fb215c0ac87f38b16bb5c42d 0.6.29 7464fc916fa4d8308e34e45a1198512fe04c97b4 0.6.30 +17bc972d67edd96c7748061910172e1200a73efe 0.6.31 From 40102f07a08808c2c356891608fd201ee02e618b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Nov 2012 23:04:02 -0500 Subject: [PATCH 3653/8469] Bumped to 0.6.32 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 107cb8e68f5d9d947096d0733e841ba568df0be2 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 7b5ae24a36..f27d2b95b9 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.31.tar.gz - $ tar -xzvf distribute-0.6.31.tar.gz - $ cd distribute-0.6.31 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz + $ tar -xzvf distribute-0.6.32.tar.gz + $ cd distribute-0.6.32 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index f3e85a1ed5..f8869e4444 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.31" +DEFAULT_VERSION = "0.6.32" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 08fa643df9..c1417e771f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.31' +version = '0.6.32' # The full version, including alpha/beta/rc tags. -release = '0.6.31' +release = '0.6.32' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 18299a4fcb..177c11b457 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.31' +VERSION = '0.6.32' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 13c9be7c3a..dc3b08a3ee 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.31" +VERSION = "0.6.32" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From cbcd321ebc204d04a4460ecc3accfb245b9ffacd Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 26 Nov 2012 03:59:17 +0100 Subject: [PATCH 3654/8469] Do not use assertGreater(), which was introduced in Python 2.7 and 3.1. --HG-- branch : distribute extra : rebase_source : b0d3166887c9a287fd885e19f804e9d254b8dbc8 --- CHANGES.txt | 6 ++++++ setuptools/tests/test_easy_install.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 29843abbcd..5e024d133c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.32 +------ + +* Fix test suite with Python 2.6. + ------ 0.6.31 ------ diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1540bdc6ed..7ed0cd37a2 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -386,7 +386,7 @@ def setup_and_run(temp_dir): 'VersionConflict') lines = stdout.splitlines() - self.assertGreater(len(lines), 0) + self.assertTrue(len(lines) > 0) self.assert_(lines[-1].strip(), 'test_pkg') try: From f31fb0ff20c63dd9bb82f91af45c12e97428e38c Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 26 Nov 2012 07:27:32 +0100 Subject: [PATCH 3655/8469] Fix some DeprecationWarnings and ResourceWarnings. --HG-- branch : distribute extra : rebase_source : 1293f856181d35c735670b021e8745208103f640 --- CHANGES.txt | 1 + setup.py | 32 ++++++++++++++++++--------- setuptools/tests/test_easy_install.py | 4 ++-- setuptools/tests/test_markerlib.py | 18 +++++++-------- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5e024d133c..3b5ba3d993 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ------ * Fix test suite with Python 2.6. +* Fix some DeprecationWarnings and ResourceWarnings. ------ 0.6.31 diff --git a/setup.py b/setup.py index dc3b08a3ee..3b47c5ade0 100755 --- a/setup.py +++ b/setup.py @@ -15,8 +15,10 @@ from distutils import dir_util, file_util, util, log log.set_verbosity(1) fl = FileList() - for line in open("MANIFEST.in"): + manifest_file = open("MANIFEST.in") + for line in manifest_file: fl.process_template_line(line) + manifest_file.close() dir_util.create_tree(tmp_src, fl.files) outfiles_2to3 = [] dist_script = os.path.join("build", "src", "distribute_setup.py") @@ -39,7 +41,9 @@ d = {} init_path = convert_path('setuptools/command/__init__.py') -exec(open(init_path).read(), d) +init_file = open(init_path) +exec(init_file.read(), d) +init_file.close() SETUP_COMMANDS = d['__all__'] VERSION = "0.6.32" @@ -132,21 +136,27 @@ def _being_installed(): _before_install() # return contents of reStructureText file with linked issue references -def _linkified(rstfile): +def _linkified(rst_path): bitroot = 'http://bitbucket.org/tarek/distribute' revision = re.compile(r'\b(issue\s*#?\d+)\b', re.M | re.I) - rstext = open(rstfile).read() + rst_file = open(rst_path) + rst_content = rst_file.read() + rst_file.close() - anchors = revision.findall(rstext) # ['Issue #43', ...] + anchors = revision.findall(rst_content) # ['Issue #43', ...] anchors = sorted(set(anchors)) - rstext = revision.sub(r'`\1`_', rstext) - rstext += "\n" + rst_content = revision.sub(r'`\1`_', rst_content) + rst_content += "\n" for x in anchors: issue = re.findall(r'\d+', x)[0] - rstext += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) - rstext += "\n" - return rstext + rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) + rst_content += "\n" + return rst_content + +readme_file = open('README.txt') +long_description = readme_file.read() + _linkified('CHANGES.txt') +readme_file.close() dist = setup( name="distribute", @@ -156,7 +166,7 @@ def _linkified(rstfile): author="The fellowship of the packaging", author_email="distutils-sig@python.org", license="PSF or ZPL", - long_description = open('README.txt').read() + _linkified('CHANGES.txt'), + long_description = long_description, keywords = "CPAN PyPI distutils eggs package management", url = "http://packages.python.org/distribute", test_suite = 'setuptools.tests', diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7ed0cd37a2..2f295b5c44 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -236,7 +236,7 @@ def test_local_index(self): f = open(egg_file, 'w') try: f.write('Name: foo\n') - except: + finally: f.close() sys.path.append(target) @@ -387,7 +387,7 @@ def setup_and_run(temp_dir): lines = stdout.splitlines() self.assertTrue(len(lines) > 0) - self.assert_(lines[-1].strip(), 'test_pkg') + self.assertTrue(lines[-1].strip(), 'test_pkg') try: tempdir_context(setup_and_run) diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py index 7ff2f5841c..aa461846b6 100644 --- a/setuptools/tests/test_markerlib.py +++ b/setuptools/tests/test_markerlib.py @@ -16,15 +16,15 @@ def test_markers(self): os_name = os.name - self.assert_(interpret("")) + self.assertTrue(interpret("")) - self.assert_(interpret("os.name != 'buuuu'")) - self.assert_(interpret("python_version > '1.0'")) - self.assert_(interpret("python_version < '5.0'")) - self.assert_(interpret("python_version <= '5.0'")) - self.assert_(interpret("python_version >= '1.0'")) - self.assert_(interpret("'%s' in os.name" % os_name)) - self.assert_(interpret("'buuuu' not in os.name")) + self.assertTrue(interpret("os.name != 'buuuu'")) + self.assertTrue(interpret("python_version > '1.0'")) + self.assertTrue(interpret("python_version < '5.0'")) + self.assertTrue(interpret("python_version <= '5.0'")) + self.assertTrue(interpret("python_version >= '1.0'")) + self.assertTrue(interpret("'%s' in os.name" % os_name)) + self.assertTrue(interpret("'buuuu' not in os.name")) self.assertFalse(interpret("os.name == 'buuuu'")) self.assertFalse(interpret("python_version < '1.0'")) @@ -36,7 +36,7 @@ def test_markers(self): environment = default_environment() environment['extra'] = 'test' - self.assert_(interpret("extra == 'test'", environment)) + self.assertTrue(interpret("extra == 'test'", environment)) self.assertFalse(interpret("extra == 'doc'", environment)) def raises_nameError(): From ceb03af882740ae02ef4be004a30b45c7b25b9ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Nov 2012 09:20:11 -0500 Subject: [PATCH 3656/8469] Backed out changeset: 98a9f9dcce0e; Fixes #335. --HG-- branch : distribute extra : rebase_source : 3f4ff1c880688e6dd72d2fa8fab3c07e7f486a7e --- pkg_resources.py | 60 ++++------- setuptools/dist.py | 5 +- setuptools/tests/test_easy_install.py | 142 +++++++------------------- 3 files changed, 59 insertions(+), 148 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index a39a32dc1d..a5a10eb4b5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -517,7 +517,7 @@ def __iter__(self): seen[key]=1 yield self.by_key[key] - def add(self, dist, entry=None, insert=True, replace=False): + def add(self, dist, entry=None, insert=True): """Add `dist` to working set, associated with `entry` If `entry` is unspecified, it defaults to the ``.location`` of `dist`. @@ -525,9 +525,8 @@ def add(self, dist, entry=None, insert=True, replace=False): set's ``.entries`` (if it wasn't already present). `dist` is only added to the working set if it's for a project that - doesn't already have a distribution in the set, unless `replace=True`. - If it's added, any callbacks registered with the ``subscribe()`` method - will be called. + doesn't already have a distribution in the set. If it's added, any + callbacks registered with the ``subscribe()`` method will be called. """ if insert: dist.insert_on(self.entries, entry) @@ -536,7 +535,7 @@ def add(self, dist, entry=None, insert=True, replace=False): entry = dist.location keys = self.entry_keys.setdefault(entry,[]) keys2 = self.entry_keys.setdefault(dist.location,[]) - if not replace and dist.key in self.by_key: + if dist.key in self.by_key: return # ignore hidden distros self.by_key[dist.key] = dist @@ -546,8 +545,7 @@ def add(self, dist, entry=None, insert=True, replace=False): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None, - replacement=True, replace_conflicting=False): + def resolve(self, requirements, env=None, installer=None, replacement=True): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -557,12 +555,6 @@ def resolve(self, requirements, env=None, installer=None, will be invoked with each requirement that cannot be met by an already-installed distribution; it should return a ``Distribution`` or ``None``. - - Unless `replace_conflicting=True`, raises a VersionConflict exception if - any requirements are found on the path that have the correct name but - the wrong version. Otherwise, if an `installer` is supplied it will be - invoked to obtain the correct version of the requirement and activate - it. """ requirements = list(requirements)[::-1] # set up the stack @@ -582,18 +574,10 @@ def resolve(self, requirements, env=None, installer=None, if dist is None: # Find the best distribution and add it to the map dist = self.by_key.get(req.key) - if dist is None or (dist not in req and replace_conflicting): - ws = self + if dist is None: if env is None: - if dist is None: - env = Environment(self.entries) - else: - # Use an empty environment and workingset to avoid - # any further conflicts with the conflicting - # distribution - env = Environment([]) - ws = WorkingSet([]) - dist = best[req.key] = env.best_match(req, ws, installer) + env = Environment(self.entries) + dist = best[req.key] = env.best_match(req, self, installer) if dist is None: #msg = ("The '%s' distribution was not found on this " # "system, and is required by this application.") @@ -1814,7 +1798,6 @@ def namespace_handler(importer,path_entry,moduleName,module): def _handle_ns(packageName, path_item): """Ensure that named package includes a subpath of path_item (if needed)""" - importer = get_importer(path_item) if importer is None: return None @@ -1824,19 +1807,14 @@ def _handle_ns(packageName, path_item): module = sys.modules.get(packageName) if module is None: module = sys.modules[packageName] = types.ModuleType(packageName) - module.__path__ = [] - _set_parent_ns(packageName) + module.__path__ = []; _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) handler = _find_adapter(_namespace_handlers, importer) - subpath = handler(importer, path_item, packageName, module) + subpath = handler(importer,path_item,packageName,module) if subpath is not None: - path = module.__path__ - path.append(subpath) - loader.load_module(packageName) - for path_item in path: - if path_item not in module.__path__: - module.__path__.append(path_item) + path = module.__path__; path.append(subpath) + loader.load_module(packageName); module.__path__ = path return subpath def declare_namespace(packageName): @@ -2142,7 +2120,7 @@ def _remove_md5_fragment(location): class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' - + def __init__(self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence = EGG_DIST @@ -2481,7 +2459,7 @@ def _parsed_pkg_info(self): from email.parser import Parser self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) return self._pkg_info - + @property def _dep_map(self): try: @@ -2492,7 +2470,7 @@ def _dep_map(self): def _preparse_requirement(self, requires_dist): """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz') - Split environment marker, add == prefix to version specifiers as + Split environment marker, add == prefix to version specifiers as necessary, and remove parenthesis. """ parts = requires_dist.split(';', 1) + [''] @@ -2501,7 +2479,7 @@ def _preparse_requirement(self, requires_dist): distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers) distvers = distvers.replace('(', '').replace(')', '') return (distvers, mark) - + def _compute_dependencies(self): """Recompute this distribution's dependencies.""" from _markerlib import compile as compile_marker @@ -2514,7 +2492,7 @@ def _compute_dependencies(self): parsed = parse_requirements(distvers).next() parsed.marker_fn = compile_marker(mark) reqs.append(parsed) - + def reqs_for_extra(extra): for req in reqs: if req.marker_fn(override={'extra':extra}): @@ -2522,13 +2500,13 @@ def reqs_for_extra(extra): common = frozenset(reqs_for_extra(None)) dm[None].extend(common) - + for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: extra = safe_extra(extra.strip()) dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm - + _distributionImpl = {'.egg': Distribution, '.egg-info': Distribution, diff --git a/setuptools/dist.py b/setuptools/dist.py index 6236d5beed..998a4dbe8b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -242,10 +242,9 @@ def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" from pkg_resources import working_set, parse_requirements for dist in working_set.resolve( - parse_requirements(requires), installer=self.fetch_build_egg, - replace_conflicting=True + parse_requirements(requires), installer=self.fetch_build_egg ): - working_set.add(dist, replace=True) + working_set.add(dist) def finalize_options(self): _Distribution.finalize_options(self) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2f295b5c44..b1799a5a2f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -17,10 +17,8 @@ from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution -from pkg_resources import working_set, VersionConflict from pkg_resources import Distribution as PRDistribution import setuptools.tests.server -import pkg_resources try: # import multiprocessing solely for the purpose of testing its existence @@ -275,16 +273,48 @@ def test_setup_requires(self): SandboxViolation. """ - test_pkg = create_setup_requires_package(self.dir) + test_setup_attrs = { + 'name': 'test_pkg', 'version': '0.0', + 'setup_requires': ['foobar'], + 'dependency_links': [os.path.abspath(self.dir)] + } + + test_pkg = os.path.join(self.dir, 'test_pkg') test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + f = open(test_setup_py, 'w') + f.write(textwrap.dedent("""\ + import setuptools + setuptools.setup(**%r) + """ % test_setup_attrs)) + f.close() + + foobar_path = os.path.join(self.dir, 'foobar-0.1.tar.gz') + make_trivial_sdist( + foobar_path, + textwrap.dedent("""\ + import setuptools + setuptools.setup( + name='foobar', + version='0.1' + ) + """)) + + old_stdout = sys.stdout + old_stderr = sys.stderr + sys.stdout = StringIO.StringIO() + sys.stderr = StringIO.StringIO() try: - quiet_context( - lambda: reset_setup_stop_context( - lambda: run_setup(test_setup_py, ['install']) - )) + reset_setup_stop_context( + lambda: run_setup(test_setup_py, ['install']) + ) except SandboxViolation: self.fail('Installation caused SandboxViolation') + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr class TestSetupRequires(unittest.TestCase): @@ -330,7 +360,7 @@ def install_clean_argv(): tempdir_context(install_at) # create an sdist that has a build-time dependency. - quiet_context(lambda: self.create_sdist(install)) + self.create_sdist(install) # there should have been two or three requests to the server # (three happens on Python 3.3a) @@ -357,81 +387,6 @@ def build_sdist(dir): installer(dist_path) tempdir_context(build_sdist) - def test_setup_requires_overrides_version_conflict(self): - """ - Regression test for issue #323. - - Ensures that a distribution's setup_requires requirements can still be - installed and used locally even if a conflicting version of that - requirement is already on the path. - """ - - pr_state = pkg_resources.__getstate__() - fake_dist = PRDistribution('does-not-matter', project_name='foobar', - version='0.0') - working_set.add(fake_dist) - - def setup_and_run(temp_dir): - test_pkg = create_setup_requires_package(temp_dir) - test_setup_py = os.path.join(test_pkg, 'setup.py') - try: - stdout, stderr = quiet_context( - lambda: reset_setup_stop_context( - # Don't even need to install the package, just running - # the setup.py at all is sufficient - lambda: run_setup(test_setup_py, ['--name']) - )) - except VersionConflict: - self.fail('Installing setup.py requirements caused ' - 'VersionConflict') - - lines = stdout.splitlines() - self.assertTrue(len(lines) > 0) - self.assertTrue(lines[-1].strip(), 'test_pkg') - - try: - tempdir_context(setup_and_run) - finally: - pkg_resources.__setstate__(pr_state) - - -def create_setup_requires_package(path): - """Creates a source tree under path for a trivial test package that has a - single requirement in setup_requires--a tarball for that requirement is - also created and added to the dependency_links argument. - """ - - test_setup_attrs = { - 'name': 'test_pkg', 'version': '0.0', - 'setup_requires': ['foobar==0.1'], - 'dependency_links': [os.path.abspath(path)] - } - - test_pkg = os.path.join(path, 'test_pkg') - test_setup_py = os.path.join(test_pkg, 'setup.py') - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') - os.mkdir(test_pkg) - - f = open(test_setup_py, 'w') - f.write(textwrap.dedent("""\ - import setuptools - setuptools.setup(**%r) - """ % test_setup_attrs)) - f.close() - - foobar_path = os.path.join(path, 'foobar-0.1.tar.gz') - make_trivial_sdist( - foobar_path, - textwrap.dedent("""\ - import setuptools - setuptools.setup( - name='foobar', - version='0.1' - ) - """)) - - return test_pkg - def make_trivial_sdist(dist_path, setup_py): """Create a simple sdist tarball at dist_path, containing just a @@ -466,7 +421,6 @@ def tempdir_context(f, cd=lambda dir:None): cd(orig_dir) shutil.rmtree(temp_dir) - def environment_context(f, **updates): """ Invoke f in the context @@ -480,7 +434,6 @@ def environment_context(f, **updates): del os.environ[key] os.environ.update(old_env) - def argv_context(f, repl): """ Invoke f in the context @@ -492,7 +445,6 @@ def argv_context(f, repl): finally: sys.argv[:] = old_argv - def reset_setup_stop_context(f): """ When the distribute tests are run using setup.py test, and then @@ -506,21 +458,3 @@ def reset_setup_stop_context(f): f() finally: distutils.core._setup_stop_after = setup_stop_after - - -def quiet_context(f): - """ - Redirect stdout/stderr to StringIO objects to prevent console output from - distutils commands. - """ - - old_stdout = sys.stdout - old_stderr = sys.stderr - new_stdout = sys.stdout = StringIO.StringIO() - new_stderr = sys.stderr = StringIO.StringIO() - try: - f() - finally: - sys.stdout = old_stdout - sys.stderr = old_stderr - return new_stdout.getvalue(), new_stderr.getvalue() From 6dcbe27f5413720102fe57bff8ed9db8406a9282 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Nov 2012 09:12:36 -0500 Subject: [PATCH 3657/8469] Updated changelog --HG-- branch : distribute extra : rebase_source : 622abb171373b4432b02044cad40145e6dcee53c --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3b5ba3d993..db7609afbc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Fix test suite with Python 2.6. * Fix some DeprecationWarnings and ResourceWarnings. +* Issue #335: Backed out `setup_requires` superceding installed requirements + until regression can be addressed. ------ 0.6.31 From 49c2791a723073e0f00189892516ef90f9ce8935 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Nov 2012 12:18:13 -0500 Subject: [PATCH 3658/8469] Added tag 0.6.32 for changeset b1a7f86b315a --HG-- branch : distribute extra : rebase_source : ff44566346d016ad48040c3f6382c80805b70678 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4a15ad9a42..0e4cfac3b1 100644 --- a/.hgtags +++ b/.hgtags @@ -40,3 +40,4 @@ fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 4f82563d0f5d1af1fb215c0ac87f38b16bb5c42d 0.6.29 7464fc916fa4d8308e34e45a1198512fe04c97b4 0.6.30 17bc972d67edd96c7748061910172e1200a73efe 0.6.31 +b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 From 1c2dff7451101c9cfb37e4ae16eb23ef17332f5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Nov 2012 12:18:36 -0500 Subject: [PATCH 3659/8469] Bumped to 0.6.33 in preparation for next release. --HG-- branch : distribute extra : rebase_source : cbb90a165b1e410ac7998fe5a57f0c84e9c024d3 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index f27d2b95b9..a364a06231 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz - $ tar -xzvf distribute-0.6.32.tar.gz - $ cd distribute-0.6.32 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.33.tar.gz + $ tar -xzvf distribute-0.6.33.tar.gz + $ cd distribute-0.6.33 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index f8869e4444..f7954e84a9 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.32" +DEFAULT_VERSION = "0.6.33" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index c1417e771f..af26376e25 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.32' +version = '0.6.33' # The full version, including alpha/beta/rc tags. -release = '0.6.32' +release = '0.6.33' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 177c11b457..666e35064c 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.32' +VERSION = '0.6.33' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 3b47c5ade0..4f7af02595 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.32" +VERSION = "0.6.33" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 3b6b1d147dae6ba825d0597d88abfda4cc3d295a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 26 Nov 2012 22:24:45 +0100 Subject: [PATCH 3660/8469] Fix 2 errors with Jython 2.5. (Now there remain 1 failure and 2 errors with Jython 2.5 and 1 failure and 5 errors with Jython 2.7.) --HG-- branch : distribute extra : rebase_source : c245820df5090ac5d005ebb7d6c4419145afce53 --- CHANGES.txt | 6 ++++++ _markerlib/markers.py | 11 ++++++++++- setuptools/sandbox.py | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index db7609afbc..4a79949731 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.33 +------ + +* Fix 2 errors with Jython 2.5. + ------ 0.6.32 ------ diff --git a/_markerlib/markers.py b/_markerlib/markers.py index 23091e6418..c93d7f3b67 100644 --- a/_markerlib/markers.py +++ b/_markerlib/markers.py @@ -25,7 +25,16 @@ _builtin_compile = compile -from platform import python_implementation +try: + from platform import python_implementation +except ImportError: + if os.name == "java": + # Jython 2.5 has ast module, but not platform.python_implementation() function. + def python_implementation(): + return "Jython" + else: + raise + # restricted set of variables _VARS = {'sys.platform': sys.platform, diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 64f725e72d..1583b81f26 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,5 +1,8 @@ import os, sys, __builtin__, tempfile, operator, pkg_resources -_os = sys.modules[os.name] +if os.name == "java": + import org.python.modules.posix.PosixModule as _os +else: + _os = sys.modules[os.name] try: _file = file except NameError: From 753f783100cf598316e9030dcf59b24772819504 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 27 Nov 2012 00:40:15 +0100 Subject: [PATCH 3661/8469] Fix 1 failure with Jython 2.5 and 2.7. (Now there remain 0 failures and 2 errors with Jython 2.5 and 0 failures and 5 errors with Jython 2.7.) --HG-- branch : distribute extra : rebase_source : 319071404608c4f34616df74bfeaa28d590edd0c --- CHANGES.txt | 1 + setuptools/tests/test_easy_install.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4a79949731..2e51b44cff 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ------ * Fix 2 errors with Jython 2.5. +* Fix 1 failure with Jython 2.5 and 2.7. ------ 0.6.32 diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b1799a5a2f..582219cef9 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,7 +13,7 @@ import distutils.core from setuptools.sandbox import run_setup, SandboxViolation -from setuptools.command.easy_install import easy_install, get_script_args, main +from setuptools.command.easy_install import easy_install, fix_jython_executable, get_script_args, main from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -51,7 +51,7 @@ def as_requirement(self): sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) -""" % sys.executable +""" % fix_jython_executable(sys.executable, "") SETUP_PY = """\ from setuptools import setup From 11491404365ba925bb36935a9f7a14c1afe003cc Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 27 Nov 2012 00:44:17 +0100 Subject: [PATCH 3662/8469] Disable workaround for Jython scripts on Linux systems. --HG-- branch : distribute extra : rebase_source : 289980b084c335029d93732feb8e02da94472795 --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 5 +++++ setuptools/tests/test_resources.py | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2e51b44cff..d5a1792a83 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Fix 2 errors with Jython 2.5. * Fix 1 failure with Jython 2.5 and 2.7. +* Disable workaround for Jython scripts on Linux systems. ------ 0.6.32 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 337532bcd9..cb9111731a 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1788,6 +1788,11 @@ def chmod(path, mode): def fix_jython_executable(executable, options): if sys.platform.startswith('java') and is_sh(executable): + # Workaround for Jython is not needed on Linux systems. + import java + if java.lang.System.getProperty("os.name") == "Linux": + return executable + # Workaround Jython's sys.executable being a .sh (an invalid # shebang line interpreter) if options: diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index d08fa32595..0bc1a0953d 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -561,6 +561,15 @@ def test_get_script_header_jython_workaround(self): if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE") in (None, "C", "POSIX")): return + + class java: + class lang: + class System: + @staticmethod + def getProperty(property): + return "" + sys.modules["java"] = java + platform = sys.platform sys.platform = 'java1.5.0_13' stdout = sys.stdout @@ -584,6 +593,7 @@ def test_get_script_header_jython_workaround(self): '#!%s -x\n' % self.non_ascii_exe) self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue()) finally: + del sys.modules["java"] sys.platform = platform sys.stdout = stdout From 6cc077d10b69b24307198f494675f7ab9418f180 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Nov 2012 02:24:30 -0500 Subject: [PATCH 3663/8469] Don't suppress SystemExit when running tests; Fixes #336 --HG-- branch : distribute extra : rebase_source : f337a5cfc45c1303ef389334a58d1d8c65b95d93 --- setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 4f7af02595..d2c1ba2c96 100755 --- a/setup.py +++ b/setup.py @@ -85,10 +85,8 @@ def run(self): entry_points = os.path.join('distribute.egg-info', 'entry_points.txt') if not os.path.exists(entry_points): - try: - _test.run(self) - finally: - return + _test.run(self) + return # even though _test.run will raise SystemExit f = open(entry_points) From 993d79149275b17b639aebd6d3ca2eb960ec6876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 14:21:51 -0500 Subject: [PATCH 3664/8469] Ignore .nfs* files in distutils (#7719). These files are created by some NFS clients a file is edited and removed concurrently (see added link in doc for more info). If such a file is removed between distutils calls listdir and copy, it will get confused. Other special files are ignored in sdist (namely VCS directories), but this has to be filtered out earlier. --- dir_util.py | 4 ++++ tests/test_dir_util.py | 21 ++++++++++++++++----- tests/test_sdist.py | 7 ++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dir_util.py b/dir_util.py index 30daf49a6e..2826ff805d 100644 --- a/dir_util.py +++ b/dir_util.py @@ -141,6 +141,10 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, src_name = os.path.join(src, n) dst_name = os.path.join(dst, n) + if n.startswith('.nfs'): + # skip NFS rename files + continue + if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) if verbose >= 1: diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index ce74589dde..1589f1297d 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -76,7 +76,6 @@ def test_create_tree_verbosity(self): remove_tree(self.root_target, verbose=0) - def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) @@ -88,11 +87,8 @@ def test_copy_tree_verbosity(self): mkpath(self.target, verbose=0) a_file = os.path.join(self.target, 'ok.txt') - f = open(a_file, 'w') - try: + with open(a_file, 'w') as f: f.write('some content') - finally: - f.close() wanted = ['copying %s -> %s' % (a_file, self.target2)] copy_tree(self.target, self.target2, verbose=1) @@ -101,6 +97,21 @@ def test_copy_tree_verbosity(self): remove_tree(self.root_target, verbose=0) remove_tree(self.target2, verbose=0) + def test_copy_tree_skips_nfs_temp_files(self): + mkpath(self.target, verbose=0) + + a_file = os.path.join(self.target, 'ok.txt') + nfs_file = os.path.join(self.target, '.nfs123abc') + for f in a_file, nfs_file: + with open(f, 'w') as fh: + fh.write('some content') + + copy_tree(self.target, self.target2) + self.assertEqual(os.listdir(self.target2), ['ok.txt']) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + def test_ensure_relative(self): if os.sep == '/': self.assertEqual(ensure_relative('/home/foo'), 'home/foo') diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 1ba2a1a6a9..e6359d6a8a 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -83,9 +83,8 @@ def get_cmd(self, metadata=None): @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') def test_prune_file_list(self): - # this test creates a package with some vcs dirs in it - # and launch sdist to make sure they get pruned - # on all systems + # this test creates a project with some VCS dirs and an NFS rename + # file, then launches sdist to check they get pruned on all systems # creating VCS directories with some files in them os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) @@ -99,6 +98,8 @@ def test_prune_file_list(self): self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') + self.write_file((self.tmp_dir, 'somecode', '.nfs0001'), 'xxx') + # now building a sdist dist, cmd = self.get_cmd() From 6b0394e36c24c3fa6b341b2ce607de2981043ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 14:41:39 -0500 Subject: [PATCH 3665/8469] Remove code unneeded after f833e7ec4de1 --- config.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config.py b/config.py index 9d8b30ea30..1d327143be 100644 --- a/config.py +++ b/config.py @@ -47,11 +47,6 @@ def _store_pypirc(self, username, password): f.write(DEFAULT_PYPIRC % (username, password)) finally: f.close() - try: - os.chmod(rc, 0600) - except OSError: - # should do something better here - pass def _read_pypirc(self): """Reads the .pypirc file.""" From 0bca979e33bd4dca758288e68912c9a763004a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 14:51:47 -0500 Subject: [PATCH 3666/8469] Create ~/.pypirc securely (#13512). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was a window between the write and the chmod where the user’s password would be exposed, depending on default permissions. Philip Jenvey’s patch fixes it. --- config.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/config.py b/config.py index 5b625f3f7d..1fd53346e9 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,6 @@ that uses .pypirc in the distutils.command package. """ import os -import sys from configparser import ConfigParser from distutils.cmd import Command @@ -43,16 +42,8 @@ def _get_rc_file(self): def _store_pypirc(self, username, password): """Creates a default .pypirc file.""" rc = self._get_rc_file() - f = open(rc, 'w') - try: + with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as f: f.write(DEFAULT_PYPIRC % (username, password)) - finally: - f.close() - try: - os.chmod(rc, 0o600) - except OSError: - # should do something better here - pass def _read_pypirc(self): """Reads the .pypirc file.""" From 40e66e5eb34a9d2dc8c4fe212f99fabdd48bca7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 22:26:57 -0500 Subject: [PATCH 3667/8469] Fix setup.py register failure with invalid rst in description (#13614). Original patch by Julien Courteau and Pierre Paul Lefebvre. --- command/check.py | 3 +++ tests/test_register.py | 25 +++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/command/check.py b/command/check.py index 4b64e458bc..152bf0de98 100644 --- a/command/check.py +++ b/command/check.py @@ -26,6 +26,9 @@ def __init__(self, source, report_level, halt_level, stream=None, def system_message(self, level, message, *children, **kwargs): self.messages.append((level, message, children, kwargs)) + return nodes.system_message(message, level=level, + type=self.levels[level], + *children, **kwargs) HAS_DOCUTILS = True except ImportError: diff --git a/tests/test_register.py b/tests/test_register.py index aa9bc43c5c..9a0ff34c45 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -1,6 +1,5 @@ # -*- encoding: utf8 -*- """Tests for distutils.command.register.""" -import sys import os import unittest import getpass @@ -11,11 +10,14 @@ from distutils.command import register as register_module from distutils.command.register import register -from distutils.core import Distribution from distutils.errors import DistutilsSetupError -from distutils.tests import support -from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +from distutils.tests.test_config import PyPIRCCommandTestCase + +try: + import docutils +except ImportError: + docutils = None PYPIRC_NOPASSWORD = """\ [distutils] @@ -264,6 +266,21 @@ def test_strict(self): finally: del register_module.raw_input + @unittest.skipUnless(docutils is not None, 'needs docutils') + def test_register_invalid_long_description(self): + description = ':funkie:`str`' # mimic Sphinx-specific markup + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': description} + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = True + inputs = RawInputs('2', 'tarek', 'tarek@ziade.org') + register_module.raw_input = inputs + self.addCleanup(delattr, register_module, 'raw_input') + self.assertRaises(DistutilsSetupError, cmd.run) + def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated cmd = self._get_cmd() From 47a3e44bf7c675ae1c222d594d557450f1f25b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 22:30:47 -0500 Subject: [PATCH 3668/8469] Use proper skip instead of reporting success in one distutils test --- tests/test_register.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/test_register.py b/tests/test_register.py index 9a0ff34c45..4f34b18bd8 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -194,6 +194,7 @@ def test_password_reset(self): self.assertEqual(headers['Content-length'], '290') self.assertTrue('tarek' in req.data) + @unittest.skipUnless(docutils is not None, 'needs docutils') def test_strict(self): # testing the script option # when on, the register command stops if @@ -206,13 +207,6 @@ def test_strict(self): cmd.strict = 1 self.assertRaises(DistutilsSetupError, cmd.run) - # we don't test the reSt feature if docutils - # is not installed - try: - import docutils - except ImportError: - return - # metadata are OK but long_description is broken metadata = {'url': 'xxx', 'author': 'xxx', 'author_email': u'éxéxé', From 1bf87508cedffb239eb377928351b7d130a59e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 22:41:11 -0500 Subject: [PATCH 3669/8469] Fix setup.py register failure with invalid rst in description (#13614). Original patch by Julien Courteau and Pierre Paul Lefebvre. --- command/check.py | 3 +++ tests/test_register.py | 34 +++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/command/check.py b/command/check.py index b67c795308..22b9349dd6 100644 --- a/command/check.py +++ b/command/check.py @@ -23,6 +23,9 @@ def __init__(self, source, report_level, halt_level, stream=None, def system_message(self, level, message, *children, **kwargs): self.messages.append((level, message, children, kwargs)) + return nodes.system_message(message, level=level, + type=self.levels[level], + *children, **kwargs) HAS_DOCUTILS = True except Exception: diff --git a/tests/test_register.py b/tests/test_register.py index 5863ae1422..a86b8606e4 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -1,5 +1,4 @@ """Tests for distutils.command.register.""" -import sys import os import unittest import getpass @@ -10,11 +9,14 @@ from distutils.command import register as register_module from distutils.command.register import register -from distutils.core import Distribution from distutils.errors import DistutilsSetupError -from distutils.tests import support -from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +from distutils.tests.test_config import PyPIRCCommandTestCase + +try: + import docutils +except ImportError: + docutils = None PYPIRC_NOPASSWORD = """\ [distutils] @@ -193,6 +195,7 @@ def test_password_reset(self): self.assertEqual(headers['Content-length'], '290') self.assertTrue((b'tarek') in req.data) + @unittest.skipUnless(docutils is not None, 'needs docutils') def test_strict(self): # testing the script option # when on, the register command stops if @@ -205,13 +208,6 @@ def test_strict(self): cmd.strict = 1 self.assertRaises(DistutilsSetupError, cmd.run) - # we don't test the reSt feature if docutils - # is not installed - try: - import docutils - except ImportError: - return - # metadata are OK but long_description is broken metadata = {'url': 'xxx', 'author': 'xxx', 'author_email': 'éxéxé', @@ -265,6 +261,22 @@ def test_strict(self): finally: del register_module.input + @unittest.skipUnless(docutils is not None, 'needs docutils') + def test_register_invalid_long_description(self): + description = ':funkie:`str`' # mimic Sphinx-specific markup + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': description} + cmd = self._get_cmd(metadata) + cmd.ensure_finalized() + cmd.strict = True + inputs = Inputs('2', 'tarek', 'tarek@ziade.org') + register_module.input = inputs + self.addCleanup(delattr, register_module, 'input') + + self.assertRaises(DistutilsSetupError, cmd.run) + def test_check_metadata_deprecated(self): # makes sure make_metadata is deprecated cmd = self._get_cmd() From 20e832ab13ec7544d5fb014b25cb733e515119c7 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 17 Dec 2012 13:03:16 +0100 Subject: [PATCH 3670/8469] Minimize impact of namespace package support for CPython 3.3. This solves a regression with an admittedly obscure use case involving Mercurial's demandimport implementation, but it also seems like neater code. --HG-- branch : distribute extra : rebase_source : 10fb05d0391607140ced288a2c134f4463eddf5a --- pkg_resources.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index a5a10eb4b5..cf0ef7b439 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1325,12 +1325,8 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) -try: - # CPython >=3.3 +if sys.version_info[:2] >= 3.3: import _frozen_importlib -except ImportError: - pass -else: register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider) From 4607463e4a161e557f411b85eb193024b60c45ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Dec 2012 15:13:17 -0500 Subject: [PATCH 3671/8469] Resave with excess whitespace removed --HG-- branch : distribute extra : rebase_source : 5ed95bbd6e5742422dba402aa88707287be44d2e --- pkg_resources.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index cf0ef7b439..8f88db4df5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2116,7 +2116,7 @@ def _remove_md5_fragment(location): class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' - + def __init__(self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence = EGG_DIST @@ -2455,7 +2455,7 @@ def _parsed_pkg_info(self): from email.parser import Parser self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) return self._pkg_info - + @property def _dep_map(self): try: @@ -2466,7 +2466,7 @@ def _dep_map(self): def _preparse_requirement(self, requires_dist): """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz') - Split environment marker, add == prefix to version specifiers as + Split environment marker, add == prefix to version specifiers as necessary, and remove parenthesis. """ parts = requires_dist.split(';', 1) + [''] @@ -2475,7 +2475,7 @@ def _preparse_requirement(self, requires_dist): distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers) distvers = distvers.replace('(', '').replace(')', '') return (distvers, mark) - + def _compute_dependencies(self): """Recompute this distribution's dependencies.""" from _markerlib import compile as compile_marker @@ -2488,7 +2488,7 @@ def _compute_dependencies(self): parsed = parse_requirements(distvers).next() parsed.marker_fn = compile_marker(mark) reqs.append(parsed) - + def reqs_for_extra(extra): for req in reqs: if req.marker_fn(override={'extra':extra}): @@ -2496,13 +2496,13 @@ def reqs_for_extra(extra): common = frozenset(reqs_for_extra(None)) dm[None].extend(common) - + for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: extra = safe_extra(extra.strip()) dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm - + _distributionImpl = {'.egg': Distribution, '.egg-info': Distribution, From 5854afbb1e30152e38dca1d9c70c1c4cb990e87d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Dec 2012 15:14:50 -0500 Subject: [PATCH 3672/8469] Fix issue with version detection --HG-- branch : distribute extra : rebase_source : 7e9dfc000ca44eaed1054d72144408530ec49741 --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 8f88db4df5..5397808694 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1325,7 +1325,7 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) -if sys.version_info[:2] >= 3.3: +if sys.version_info[:2] >= (3,3): import _frozen_importlib register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider) From cd1e33d5567d9f892f8145beb4b39eeeafa760b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Dec 2012 15:15:53 -0500 Subject: [PATCH 3673/8469] Update changelog and add comment to registering of SourceFileLoader --HG-- branch : distribute extra : rebase_source : 2701f50b3375f9c2f2378ff22f274aade0b03107 --- CHANGES.txt | 3 +++ pkg_resources.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d5a1792a83..6f6d9a8dc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ CHANGES * Fix 2 errors with Jython 2.5. * Fix 1 failure with Jython 2.5 and 2.7. * Disable workaround for Jython scripts on Linux systems. +* Fix issue in pkg_resources where try/except around a platform-dependent + import would trigger hook load failures on Mercurial. See pull request 32 + for details. ------ 0.6.32 diff --git a/pkg_resources.py b/pkg_resources.py index 5397808694..717c1e6a1c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1325,6 +1325,9 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) +# Python 3.3 also supplies the SourceFileLoader. +# Don't be tempted to do a try/except block here - it will break Mercurial +# hooks due to the demandimport functionality. if sys.version_info[:2] >= (3,3): import _frozen_importlib register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider) From 73e70541ad60633c5b373eeafab1cfba6e81606c Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 18 Dec 2012 04:09:33 +0100 Subject: [PATCH 3674/8469] Clean handling of _frozen_importlib / importlib._bootstrap. --HG-- branch : distribute extra : rebase_source : 52fd775f637dfa40c401ef590708ffeaf47fd3a9 --- pkg_resources.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 717c1e6a1c..85e008a2bd 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -33,6 +33,12 @@ from os import open as os_open from os.path import isdir, split +# Avoid try/except due to potential problems with delayed import mechanisms. +if sys.version_info >= (3, 3) and sys.implementation.name == "cpython": + import importlib._bootstrap as importlib_bootstrap +else: + importlib_bootstrap = None + # This marker is used to simplify the process that checks is the # setuptools package was installed by the Setuptools project # or by the Distribute project, in case Setuptools creates @@ -1325,12 +1331,8 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) -# Python 3.3 also supplies the SourceFileLoader. -# Don't be tempted to do a try/except block here - it will break Mercurial -# hooks due to the demandimport functionality. -if sys.version_info[:2] >= (3,3): - import _frozen_importlib - register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider) +if importlib_bootstrap is not None: + register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) class EmptyProvider(NullProvider): @@ -1766,13 +1768,8 @@ def find_on_path(importer, path_item, only=False): break register_finder(ImpWrapper,find_on_path) -try: - # CPython >=3.3 - import _frozen_importlib -except ImportError: - pass -else: - register_finder(_frozen_importlib.FileFinder, find_on_path) +if importlib_bootstrap is not None: + register_finder(importlib_bootstrap.FileFinder, find_on_path) _declare_state('dict', _namespace_handlers={}) _declare_state('dict', _namespace_packages={}) @@ -1873,13 +1870,8 @@ def file_ns_handler(importer, path_item, packageName, module): register_namespace_handler(ImpWrapper,file_ns_handler) register_namespace_handler(zipimport.zipimporter,file_ns_handler) -try: - # CPython >=3.3 - import _frozen_importlib -except ImportError: - pass -else: - register_namespace_handler(_frozen_importlib.FileFinder, file_ns_handler) +if importlib_bootstrap is not None: + register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler) def null_ns_handler(importer, path_item, packageName, module): From c24868ba84f1b66d88d6b1f5a3f9190bcd2ca5c5 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 18 Dec 2012 21:14:22 +0200 Subject: [PATCH 3675/8469] Issue #16714: use 'raise' exceptions, don't 'throw'. Patch by Serhiy Storchaka. --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 5fa1ca10d4..301d43d20c 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -104,7 +104,7 @@ class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall From 75cf27d5a437064a0bfcf9f7e8ab7bc501260b61 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 18 Dec 2012 21:27:37 +0200 Subject: [PATCH 3676/8469] Issue #16714: use 'raise' exceptions, don't 'throw'. Patch by Serhiy Storchaka. --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 73470729fd..2d94a1117e 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -104,7 +104,7 @@ class msvc9compilerTestCase(support.TempdirManager, unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall From ca8d16926ecb9629ca53aa93327c0bdd2a144f5c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 18 Dec 2012 22:02:39 +0200 Subject: [PATCH 3677/8469] Issue #16706: get rid of os.error --- core.py | 2 +- dir_util.py | 2 +- file_util.py | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core.py b/core.py index 260332a2ac..a43d72588b 100644 --- a/core.py +++ b/core.py @@ -148,7 +148,7 @@ class found in 'cmdclass' is used in place of the default, which is dist.run_commands() except KeyboardInterrupt: raise SystemExit("interrupted") - except (IOError, os.error) as exc: + except (IOError, OSError) as exc: error = grok_environment_error(exc) if DEBUG: diff --git a/dir_util.py b/dir_util.py index 2826ff805d..7d1c78ab29 100644 --- a/dir_util.py +++ b/dir_util.py @@ -124,7 +124,7 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, "cannot copy tree '%s': not a directory" % src) try: names = os.listdir(src) - except os.error as e: + except OSError as e: (errno, errstr) = e if dry_run: names = [] diff --git a/file_util.py b/file_util.py index 9bdd14e42e..f6ed290f13 100644 --- a/file_util.py +++ b/file_util.py @@ -27,26 +27,26 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): try: try: fsrc = open(src, 'rb') - except os.error as e: + except OSError as e: raise DistutilsFileError("could not open '%s': %s" % (src, e.strerror)) if os.path.exists(dst): try: os.unlink(dst) - except os.error as e: + except OSError as e: raise DistutilsFileError( "could not delete '%s': %s" % (dst, e.strerror)) try: fdst = open(dst, 'wb') - except os.error as e: + except OSError as e: raise DistutilsFileError( "could not create '%s': %s" % (dst, e.strerror)) while True: try: buf = fsrc.read(buffer_size) - except os.error as e: + except OSError as e: raise DistutilsFileError( "could not read from '%s': %s" % (src, e.strerror)) @@ -55,7 +55,7 @@ def _copy_file_contents(src, dst, buffer_size=16*1024): try: fdst.write(buf) - except os.error as e: + except OSError as e: raise DistutilsFileError( "could not write to '%s': %s" % (dst, e.strerror)) finally: @@ -193,7 +193,7 @@ def move_file (src, dst, copy_it = False try: os.rename(src, dst) - except os.error as e: + except OSError as e: (num, msg) = e if num == errno.EXDEV: copy_it = True @@ -205,11 +205,11 @@ def move_file (src, dst, copy_file(src, dst, verbose=verbose) try: os.unlink(src) - except os.error as e: + except OSError as e: (num, msg) = e try: os.unlink(dst) - except os.error: + except OSError: pass raise DistutilsFileError( "couldn't move '%s' to '%s' by copy/delete: " From 437e5b731feb5f5b0e7205ff94d15c07c32e83a4 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 18 Dec 2012 23:10:48 +0200 Subject: [PATCH 3678/8469] Issue #16717: get rid of socket.error, replace with OSError --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 8b36851d25..88990b2c6b 100644 --- a/command/upload.py +++ b/command/upload.py @@ -186,7 +186,7 @@ def upload_file(self, command, pyversion, filename): http.putheader('Authorization', auth) http.endheaders() http.send(body) - except socket.error as e: + except OSError as e: self.announce(str(e), log.ERROR) return From 8b21b15c3cebd6cf09d1ceb8abf91f0ebbafa499 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 25 Dec 2012 16:47:37 +0200 Subject: [PATCH 3679/8469] Replace IOError with OSError (#16715) --- command/build_scripts.py | 2 +- core.py | 2 +- cygwinccompiler.py | 2 +- dir_util.py | 2 +- errors.py | 4 ++-- msvc9compiler.py | 2 +- sysconfig.py | 4 ++-- util.py | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/command/build_scripts.py b/command/build_scripts.py index 4b5b22ec20..90a8380a04 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -74,7 +74,7 @@ def copy_scripts(self): # script. try: f = open(script, "rb") - except IOError: + except OSError: if not self.dry_run: raise f = None diff --git a/core.py b/core.py index a43d72588b..91e5132934 100644 --- a/core.py +++ b/core.py @@ -148,7 +148,7 @@ class found in 'cmdclass' is used in place of the default, which is dist.run_commands() except KeyboardInterrupt: raise SystemExit("interrupted") - except (IOError, OSError) as exc: + except OSError as exc: error = grok_environment_error(exc) if DEBUG: diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 0bdd539c37..0c23ab1b7f 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -359,7 +359,7 @@ def check_config_h(): return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn finally: config_h.close() - except IOError as exc: + except OSError as exc: return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) diff --git a/dir_util.py b/dir_util.py index 7d1c78ab29..2b35aa318e 100644 --- a/dir_util.py +++ b/dir_util.py @@ -198,7 +198,7 @@ def remove_tree(directory, verbose=1, dry_run=0): abspath = os.path.abspath(cmd[1]) if abspath in _path_created: del _path_created[abspath] - except (IOError, OSError) as exc: + except OSError as exc: log.warn(grok_environment_error( exc, "error removing %s: " % directory)) diff --git a/errors.py b/errors.py index eb13c983e9..8b93059e19 100644 --- a/errors.py +++ b/errors.py @@ -35,8 +35,8 @@ class DistutilsArgError (DistutilsError): class DistutilsFileError (DistutilsError): """Any problems in the filesystem: expected file not found, etc. - Typically this is for problems that we detect before IOError or - OSError could be raised.""" + Typically this is for problems that we detect before OSError + could be raised.""" pass class DistutilsOptionError (DistutilsError): diff --git a/msvc9compiler.py b/msvc9compiler.py index b3f6ce10a8..9688f20019 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -729,7 +729,7 @@ def _remove_visual_c_ref(self, manifest_file): return manifest_file finally: manifest_f.close() - except IOError: + except OSError: pass # -- Miscellaneous methods ----------------------------------------- diff --git a/sysconfig.py b/sysconfig.py index 3b6549fccc..91ed1a498c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -426,7 +426,7 @@ def _init_posix(): try: filename = get_makefile_filename() parse_makefile(filename, g) - except IOError as msg: + except OSError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror @@ -438,7 +438,7 @@ def _init_posix(): filename = get_config_h_filename() with open(filename) as file: parse_config_h(file, g) - except IOError as msg: + except OSError as msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror diff --git a/util.py b/util.py index ba09ac450a..a2f9544519 100644 --- a/util.py +++ b/util.py @@ -207,8 +207,8 @@ def _subst (match, local_vars=local_vars): def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and + """Generate a useful error message from an OSError + exception object. Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string From 5f6ebc0579291a7dd316e2a64466e688ef7bdb69 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 29 Dec 2012 05:27:56 +0100 Subject: [PATCH 3680/8469] Issue #341: Fix a ResourceWarning. --HG-- branch : distribute extra : rebase_source : 63fc40de80b49769d8463e04c1590ea4b1e751fc --- CHANGES.txt | 1 + pkg_resources.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6f6d9a8dc9..c1c648dfac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,7 @@ CHANGES * Fix issue in pkg_resources where try/except around a platform-dependent import would trigger hook load failures on Mercurial. See pull request 32 for details. +* Issue #341: Fix a ResourceWarning. ------ 0.6.32 diff --git a/pkg_resources.py b/pkg_resources.py index 85e008a2bd..939a7c64aa 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1761,11 +1761,13 @@ def find_on_path(importer, path_item, only=False): for dist in find_distributions(os.path.join(path_item, entry)): yield dist elif not only and lower.endswith('.egg-link'): - for line in open(os.path.join(path_item, entry)): + entry_file = open(os.path.join(path_item, entry)) + for line in entry_file: if not line.strip(): continue for item in find_distributions(os.path.join(path_item,line.rstrip())): yield item break + entry_file.close() register_finder(ImpWrapper,find_on_path) if importlib_bootstrap is not None: From 721559fe76a1cda3de639ee2aaa446595169d26b Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 29 Dec 2012 06:23:09 +0100 Subject: [PATCH 3681/8469] Fix some ResourceWarnings. --HG-- branch : distribute extra : rebase_source : 31ac3f0135d8cfe0fabc274f1649d1c99eba2868 --- distribute_setup.py | 9 ++++++-- setuptools/command/develop.py | 4 +++- setuptools/command/easy_install.py | 2 +- setuptools/command/upload.py | 5 +++-- setuptools/command/upload_docs.py | 4 +++- setuptools/tests/doctest.py | 8 +++++-- setuptools/tests/test_develop.py | 8 +++++-- setuptools/tests/win_script_wrapper.txt | 28 ++++++++++++++++++------- 8 files changed, 50 insertions(+), 18 deletions(-) diff --git a/distribute_setup.py b/distribute_setup.py index f7954e84a9..23503c640e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -239,7 +239,9 @@ def violation(*args): def _patch_file(path, content): """Will backup the file then patch it""" - existing_content = open(path).read() + f = open(path) + existing_content = f.read() + f.close() if existing_content == content: # already patched log.warn('Already patched.') @@ -257,7 +259,10 @@ def _patch_file(path, content): def _same_content(path, content): - return open(path).read() == content + f = open(path) + existing_content = f.read() + f.close() + return existing_content == content def _rename_path(path): diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 709e349c73..1d500040d0 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -132,7 +132,9 @@ def install_for_development(self): def uninstall_link(self): if os.path.exists(self.egg_link): log.info("Removing %s (link to %s)", self.egg_link, self.egg_base) - contents = [line.rstrip() for line in open(self.egg_link)] + egg_link_file = open(self.egg_link) + contents = [line.rstrip() for line in egg_link_file] + egg_link_file.close() if contents not in ([self.egg_path], [self.egg_path, self.setup_path]): log.warn("Link points to %s: uninstall aborted", contents) return diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cb9111731a..0d72f75843 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -491,7 +491,7 @@ def check_pth_processing(self): self.cant_write_to_target() else: try: - f.write("import os;open(%r,'w').write('OK')\n" % (ok_file,)) + f.write("import os; f = open(%r, 'w'); f.write('OK'); f.close()\n" % (ok_file,)) f.close(); f=None executable = sys.executable if os.name=='nt': diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 9f9366b5f1..21b9615c42 100755 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -109,8 +109,9 @@ def upload_file(self, command, pyversion, filename): data['comment'] = comment if self.sign: - data['gpg_signature'] = (os.path.basename(filename) + ".asc", - open(filename+".asc").read()) + asc_file = open(filename + ".asc") + data['gpg_signature'] = (os.path.basename(filename) + ".asc", asc_file.read()) + asc_file.close() # set up the authentication auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip() diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 98fb723337..1d5a744512 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -105,7 +105,9 @@ def run(self): shutil.rmtree(tmp_dir) def upload_file(self, filename): - content = open(filename, 'rb').read() + f = open(filename, 'rb') + content = f.read() + f.close() meta = self.distribution.metadata data = { ':action': 'doc_upload', diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index be399a9d22..cc1e06c398 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -1968,7 +1968,9 @@ class doctest.Tester, then merges the results into (or creates) runner = DocTestRunner(verbose=verbose, optionflags=optionflags) # Read the file, convert it to a test, and run it. - s = open(filename).read() + f = open(filename) + s = f.read() + f.close() test = parser.get_doctest(s, globs, name, filename, 0) runner.run(test) @@ -2353,7 +2355,9 @@ def DocFileTest(path, module_relative=True, package=None, # Find the file and read it. name = os.path.basename(path) - doc = open(path).read() + f = open(path) + doc = f.read() + f.close() # Convert it to a test, and wrap it in a DocFileCase. test = parser.get_doctest(doc, globs, name, path, 0) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 3e071dade9..315058c575 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -89,8 +89,12 @@ def test_develop(self): self.assertEqual(content, ['easy-install.pth', 'foo.egg-link']) # Check that we are using the right code. - path = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt').read().split()[0].strip() - init = open(os.path.join(path, 'foo', '__init__.py'), 'rt').read().strip() + egg_link_file = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt') + path = egg_link_file.read().split()[0].strip() + egg_link_file.close() + init_file = open(os.path.join(path, 'foo', '__init__.py'), 'rt') + init = init_file.read().strip() + init_file.close() if sys.version < "3": self.assertEqual(init, 'print "foo"') else: diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 2e1bff7434..9f7c81d6b7 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -16,7 +16,8 @@ Let's create a simple script, foo-script.py: >>> import os, sys, tempfile >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( + >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') + >>> f.write( ... """#!%(python_exe)s ... import sys ... input = repr(sys.stdin.read()) @@ -26,6 +27,7 @@ Let's create a simple script, foo-script.py: ... if __debug__: ... print 'non-optimized' ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + >>> f.close() Note that the script starts with a Unix-style '#!' line saying which Python executable to run. The wrapper will use this to find the @@ -34,9 +36,11 @@ correct Python executable. We'll also copy cli.exe to the sample-directory with the name foo.exe: >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'foo.exe'), 'wb').write( + >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb') + >>> f.write( ... pkg_resources.resource_string('setuptools', 'cli.exe') ... ) + >>> f.close() When the copy of cli.exe, foo.exe in this example, runs, it examines the path name it was run with and computes a Python script path name @@ -77,7 +81,8 @@ to start the interactive interpreter. You can combine multiple options as usual. For example, to run in optimized mode and enter the interpreter after running the script, you could use -Oi: - >>> open(os.path.join(sample_directory, 'foo-script.py'), 'w').write( + >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') + >>> f.write( ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) @@ -88,6 +93,7 @@ enter the interpreter after running the script, you could use -Oi: ... print 'non-optimized' ... sys.ps1 = '---' ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + >>> f.close() >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) >>> input.close() @@ -105,18 +111,24 @@ Now let's test the GUI version with the simple scipt, bar-script.py: >>> import os, sys, tempfile >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() - >>> open(os.path.join(sample_directory, 'bar-script.pyw'), 'w').write( + >>> f = open(os.path.join(sample_directory, 'bar-script.pyw'), 'w') + >>> f.write( ... """#!%(python_exe)s ... import sys - ... open(sys.argv[1], 'wb').write(repr(sys.argv[2])) + ... f = open(sys.argv[1], 'wb') + ... f.write(repr(sys.argv[2])) + ... f.close() ... """ % dict(python_exe=nt_quote_arg(sys.executable))) + >>> f.close() We'll also copy gui.exe to the sample-directory with the name bar.exe: >>> import pkg_resources - >>> open(os.path.join(sample_directory, 'bar.exe'), 'wb').write( + >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb') + >>> f.write( ... pkg_resources.resource_string('setuptools', 'gui.exe') ... ) + >>> f.close() Finally, we'll run the script and check the result: @@ -126,8 +138,10 @@ Finally, we'll run the script and check the result: >>> input.close() >>> print output.read() - >>> print open(os.path.join(sample_directory, 'test_output.txt'), 'rb').read() + >>> f = open(os.path.join(sample_directory, 'test_output.txt'), 'rb') + >>> print f.read() 'Test Argument' + >>> f.close() We're done with the sample_directory: From d73c8722858cc7aaca77a22d0e84795bc6262420 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Sat, 29 Dec 2012 12:54:21 -0500 Subject: [PATCH 3682/8469] Harden fix for issue #341 against exceptins. --HG-- branch : distribute extra : rebase_source : 5cb7f22523a741e678b03a699f0ef09f09ed8070 --- pkg_resources.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 939a7c64aa..cb8d3dcf36 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1762,12 +1762,14 @@ def find_on_path(importer, path_item, only=False): yield dist elif not only and lower.endswith('.egg-link'): entry_file = open(os.path.join(path_item, entry)) - for line in entry_file: - if not line.strip(): continue - for item in find_distributions(os.path.join(path_item,line.rstrip())): - yield item - break - entry_file.close() + try: + for line in entry_file: + if not line.strip(): continue + for item in find_distributions(os.path.join(path_item,line.rstrip())): + yield item + break + finally: + entry_file.close() register_finder(ImpWrapper,find_on_path) if importlib_bootstrap is not None: From 2910bb06b9521aaf552f2550d462ed14e3f58ec2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2012 16:31:16 -0500 Subject: [PATCH 3683/8469] Update changelog --HG-- branch : distribute extra : rebase_source : 44b7e6234f791c1a1182f202bc429d40922074ee --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index d5a1792a83..7c605c7ee4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ CHANGES * Fix 2 errors with Jython 2.5. * Fix 1 failure with Jython 2.5 and 2.7. * Disable workaround for Jython scripts on Linux systems. +* Issue #336: `setup.py` no longer masks failure exit code when tests fail. ------ 0.6.32 From 76db48d2fc73a6b4ba6af346c893e77e1183338e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2012 17:09:50 -0500 Subject: [PATCH 3684/8469] Added tag 0.6.33 for changeset 6acac3919ae9 --HG-- branch : distribute extra : rebase_source : 3628e4db31b5aaac331e357428e9d9b30ae30e86 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0e4cfac3b1..32fb831c52 100644 --- a/.hgtags +++ b/.hgtags @@ -41,3 +41,4 @@ fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 7464fc916fa4d8308e34e45a1198512fe04c97b4 0.6.30 17bc972d67edd96c7748061910172e1200a73efe 0.6.31 b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 +6acac3919ae9a7dba2cbecbe3d4b31ece25d5f09 0.6.33 From 2a3d28cf5fed225bfe2c3f95dfbf61c2d23fd6c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2012 17:10:54 -0500 Subject: [PATCH 3685/8469] Bumped to 0.6.34 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 4455898775fbb40a5a331909c61d45622a9ea97a --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index a364a06231..0603ba47e6 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.33.tar.gz - $ tar -xzvf distribute-0.6.33.tar.gz - $ cd distribute-0.6.33 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz + $ tar -xzvf distribute-0.6.34.tar.gz + $ cd distribute-0.6.34 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 23503c640e..a1cc2a1a9f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.33" +DEFAULT_VERSION = "0.6.34" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index af26376e25..15226651f2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.33' +version = '0.6.34' # The full version, including alpha/beta/rc tags. -release = '0.6.33' +release = '0.6.34' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 666e35064c..d3746054bb 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.33' +VERSION = '0.6.34' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index d2c1ba2c96..a1e9ca91a7 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.33" +VERSION = "0.6.34" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 2f8c8bd5de518bd1b42cb99f1a6644543520154b Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Sun, 30 Dec 2012 23:45:44 -0500 Subject: [PATCH 3686/8469] Close issue #341: 0.6.33 fails to build under python 2.4 --HG-- branch : distribute extra : rebase_source : 065aad71143a72cb6abd3064e0e947fc4568422f --- CHANGES.txt | 6 ++++++ pkg_resources.py | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ebc2bdcc55..1b24810806 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +---------- +Unreleased +---------- + ++ Issue #341: 0.6.33 fails to build under python 2.4 + ------ 0.6.33 ------ diff --git a/pkg_resources.py b/pkg_resources.py index cb8d3dcf36..49aab6757f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1763,13 +1763,14 @@ def find_on_path(importer, path_item, only=False): elif not only and lower.endswith('.egg-link'): entry_file = open(os.path.join(path_item, entry)) try: - for line in entry_file: - if not line.strip(): continue - for item in find_distributions(os.path.join(path_item,line.rstrip())): - yield item - break + entry_lines = entry_file.readlines() finally: entry_file.close() + for line in entry_lines: + if not line.strip(): continue + for item in find_distributions(os.path.join(path_item,line.rstrip())): + yield item + break register_finder(ImpWrapper,find_on_path) if importlib_bootstrap is not None: From 3c251bf338c72f65c83a3b51ea709c738c460722 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Dec 2012 10:26:46 -0500 Subject: [PATCH 3687/8469] Added tag 0.6.34 for changeset 23c310bf4ae8 --HG-- branch : distribute extra : rebase_source : 6ba1380f0a2496882d7eb15ab82e7660b755398b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 32fb831c52..9bd19948ca 100644 --- a/.hgtags +++ b/.hgtags @@ -42,3 +42,4 @@ fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 17bc972d67edd96c7748061910172e1200a73efe 0.6.31 b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 6acac3919ae9a7dba2cbecbe3d4b31ece25d5f09 0.6.33 +23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 From 9e26a920ffd60595ed80f1c4e6f4bdd49507c0f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Dec 2012 10:27:51 -0500 Subject: [PATCH 3688/8469] Bumped to 0.6.35 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 77f34fdeebd01224a2d399855f0674108133b3e6 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 0603ba47e6..ea13a9bc43 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz - $ tar -xzvf distribute-0.6.34.tar.gz - $ cd distribute-0.6.34 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz + $ tar -xzvf distribute-0.6.35.tar.gz + $ cd distribute-0.6.35 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index a1cc2a1a9f..a447f7ec8f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.34" +DEFAULT_VERSION = "0.6.35" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 15226651f2..98380ba9d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.34' +version = '0.6.35' # The full version, including alpha/beta/rc tags. -release = '0.6.34' +release = '0.6.35' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index d3746054bb..983703047f 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.34' +VERSION = '0.6.35' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index a1e9ca91a7..81de4e3d67 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.34" +VERSION = "0.6.35" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 22869cb64b8779feca1a0dfe3d03d4bcce7af992 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 1 Jan 2013 11:04:25 +0100 Subject: [PATCH 3689/8469] Fix CHANGES.txt. --HG-- branch : distribute extra : rebase_source : f3de640431934e28140f322bab420a3f51361440 --- CHANGES.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1b24810806..623bc4b79f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,11 +2,15 @@ CHANGES ======= ----------- -Unreleased ----------- +------ +0.6.35 +------ + +------ +0.6.34 +------ -+ Issue #341: 0.6.33 fails to build under python 2.4 +* Issue #341: 0.6.33 fails to build under Python 2.4. ------ 0.6.33 From 5f738c54a3de45e1f44321eb8e27cfe10ce97e90 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 1 Jan 2013 11:05:11 +0100 Subject: [PATCH 3690/8469] Fix parsing of CHANGES.txt. --HG-- branch : distribute extra : rebase_source : f9b735b0478ac8a6aaf371882dd5a5032bef751e --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 81de4e3d67..cecb9e9fda 100755 --- a/setup.py +++ b/setup.py @@ -136,7 +136,7 @@ def _being_installed(): # return contents of reStructureText file with linked issue references def _linkified(rst_path): bitroot = 'http://bitbucket.org/tarek/distribute' - revision = re.compile(r'\b(issue\s*#?\d+)\b', re.M | re.I) + revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) rst_file = open(rst_path) rst_content = rst_file.read() From 2e7e993256b1f737cd3ddec9a1cfc205455b2be2 Mon Sep 17 00:00:00 2001 From: "doko@python.org" Date: Fri, 25 Jan 2013 14:33:33 +0100 Subject: [PATCH 3691/8469] - Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds; use _PYTHON_PROJECT_BASE in distutils/sysconfig.py. --- sysconfig.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 317640ca89..d125e0b44a 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -24,7 +24,11 @@ # Path to the base directory of the project. On Windows the binary may # live in project/PCBuild9. If we're dealing with an x64 Windows build, # it'll live in project/PCbuild/amd64. -project_base = os.path.dirname(os.path.abspath(sys.executable)) +# set for cross builds +if "_PYTHON_PROJECT_BASE" in os.environ: + project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) +else: + project_base = os.path.dirname(os.path.abspath(sys.executable)) if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) # PC/VS7.1 @@ -98,7 +102,7 @@ def get_python_inc(plat_specific=0, prefix=None): # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. - base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) + base = _sys_home or project_base if plat_specific: return base if _sys_home: @@ -251,8 +255,7 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return os.path.join(_sys_home or os.path.dirname(sys.executable), - "Makefile") + return os.path.join(_sys_home or project_base, "Makefile") lib_dir = get_python_lib(plat_specific=0, standard_lib=1) config_file = 'config-{}{}'.format(get_python_version(), build_flags) return os.path.join(lib_dir, config_file, 'Makefile') @@ -555,7 +558,7 @@ def get_config_vars(*args): # testing, for example, we might be running a non-installed python # from a different directory. if python_build and os.name == "posix": - base = os.path.dirname(os.path.abspath(sys.executable)) + base = project_base if (not os.path.isabs(_config_vars['srcdir']) and base != os.getcwd()): # srcdir is relative and we are not in the same directory From 0ad57ca49e9ca519a62ae5da00d2217ba91f464e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 27 Jan 2013 19:45:49 +0200 Subject: [PATCH 3692/8469] - Issue #17041: Fix testing when Python is configured with the --without-doc-strings option. --- tests/test_build_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index b71cc983be..f6a503b538 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -77,8 +77,9 @@ def test_build_ext(self): self.assertEqual(xx.foo(2, 5), 7) self.assertEqual(xx.foo(13,15), 28) self.assertEqual(xx.new().demo(), None) - doc = 'This is a template module just for instruction.' - self.assertEqual(xx.__doc__, doc) + if test_support.HAVE_DOCSTRINGS: + doc = 'This is a template module just for instruction.' + self.assertEqual(xx.__doc__, doc) self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) From 28dd71b74f49f8abf4f65fb05bb29fbc00f4e574 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 27 Jan 2013 19:47:45 +0200 Subject: [PATCH 3693/8469] Issue #17041: Fix testing when Python is configured with the --without-doc-strings. --- tests/test_build_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 090eacfb2c..065a6a21c9 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -73,8 +73,9 @@ def test_build_ext(self): self.assertEqual(xx.foo(2, 5), 7) self.assertEqual(xx.foo(13,15), 28) self.assertEqual(xx.new().demo(), None) - doc = 'This is a template module just for instruction.' - self.assertEqual(xx.__doc__, doc) + if support.HAVE_DOCSTRINGS: + doc = 'This is a template module just for instruction.' + self.assertEqual(xx.__doc__, doc) self.assertTrue(isinstance(xx.Null(), xx.Null)) self.assertTrue(isinstance(xx.Str(), xx.Str)) From 30f6c6e37e64b06ccca07acb169bf517687ba2ec Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Thu, 31 Jan 2013 01:24:55 -0800 Subject: [PATCH 3694/8469] Issue #13590: OS X Xcode 4 - improve support for universal extension modules In particular, fix extension module build failures when trying to use 32-bit-only installer Pythons on systems with Xcode 4 (currently OS X 10.8, 10.7, and optionally 10.6). * Backport 3.3.0 fixes to 2.7 branch (for release in 2.7.4) * Since Xcode 4 removes ppc support, extension module builds now check for ppc compiler support and by default remove ppc and ppc64 archs when they are not available. * Extension module builds now revert to using system installed headers and libs (/usr and /System/Library) if the SDK used to build the interpreter is not installed or has moved. * Try to avoid building extension modules with deprecated and problematic Apple llvm-gcc compiler. If original compiler is not available, use clang instead by default. --- sysconfig.py | 111 ++++++++-------------------------------- tests/test_sysconfig.py | 29 +++++++++++ unixccompiler.py | 70 +++---------------------- util.py | 92 ++------------------------------- 4 files changed, 60 insertions(+), 242 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 4b193b2703..daa4dc77ca 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -141,7 +141,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) -_USE_CLANG = None + def customize_compiler(compiler): """Do any platform-specific customization of a CCompiler instance. @@ -150,6 +150,21 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": + if sys.platform == "darwin": + # Perform first-time customization of compiler-related + # config vars on OS X now that we know we need a compiler. + # This is primarily to support Pythons from binary + # installers. The kind and paths to build tools on + # the user system may vary significantly from the system + # that Python itself was built on. Also the user OS + # version and build tools may not support the same set + # of CPU architectures for universal builds. + global _config_vars + if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): + import _osx_support + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', @@ -157,36 +172,7 @@ def customize_compiler(compiler): newcc = None if 'CC' in os.environ: - newcc = os.environ['CC'] - elif sys.platform == 'darwin' and cc == 'gcc-4.2': - # Issue #13590: - # Since Apple removed gcc-4.2 in Xcode 4.2, we can no - # longer assume it is available for extension module builds. - # If Python was built with gcc-4.2, check first to see if - # it is available on this system; if not, try to use clang - # instead unless the caller explicitly set CC. - global _USE_CLANG - if _USE_CLANG is None: - from distutils import log - from subprocess import Popen, PIPE - p = Popen("! type gcc-4.2 && type clang && exit 2", - shell=True, stdout=PIPE, stderr=PIPE) - p.wait() - if p.returncode == 2: - _USE_CLANG = True - log.warn("gcc-4.2 not found, using clang instead") - else: - _USE_CLANG = False - if _USE_CLANG: - newcc = 'clang' - if newcc: - # On OS X, if CC is overridden, use that as the default - # command for LDSHARED as well - if (sys.platform == 'darwin' - and 'LDSHARED' not in os.environ - and ldshared.startswith(cc)): - ldshared = newcc + ldshared[len(cc):] - cc = newcc + cc = os.environ['CC'] if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: @@ -518,66 +504,11 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + # OS X platforms require special customization to handle + # multi-architecture, multi-os-version installers if sys.platform == 'darwin': - kernel_version = os.uname()[2] # Kernel version (8.4.3) - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # On Mac OS X before 10.4, check if -arch and -isysroot - # are in CFLAGS or LDFLAGS and remove them if they are. - # This is needed when building extensions on a 10.3 system - # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = re.sub('-isysroot [^ \t]*', ' ', flags) - _config_vars[key] = flags - - else: - - # Allow the user to override the architecture flags using - # an environment variable. - # NOTE: This name was introduced by Apple in OSX 10.5 and - # is used by several scripting languages distributed with - # that OS release. - - if 'ARCHFLAGS' in os.environ: - arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = flags + ' ' + arch - _config_vars[key] = flags - - # If we're on OSX 10.5 or later and the user tries to - # compiles an extension using an SDK that is not present - # on the current machine it is better to not use an SDK - # than to fail. - # - # The major usecase for this is users using a Python.org - # binary installer on OSX 10.6: that installer uses - # the 10.4u SDK, but that SDK is not installed by default - # when you install Xcode. - # - m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) - if m is not None: - sdk = m.group(1) - if not os.path.exists(sdk): - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) - _config_vars[key] = flags + import _osx_support + _osx_support.customize_config_vars(_config_vars) if args: vals = [] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 49570c4ce5..c064d2b0f7 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -72,6 +72,35 @@ def test_parse_makefile_literal_dollar(self): 'OTHER': 'foo'}) + def test_sysconfig_module(self): + import sysconfig as global_sysconfig + self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) + self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) + + @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'),'compiler flags customized') + def test_sysconfig_compiler_vars(self): + # On OS X, binary installers support extension module building on + # various levels of the operating system with differing Xcode + # configurations. This requires customization of some of the + # compiler configuration directives to suit the environment on + # the installed machine. Some of these customizations may require + # running external programs and, so, are deferred until needed by + # the first extension module build. With Python 3.3, only + # the Distutils version of sysconfig is used for extension module + # builds, which happens earlier in the Distutils tests. This may + # cause the following tests to fail since no tests have caused + # the global version of sysconfig to call the customization yet. + # The solution for now is to simply skip this test in this case. + # The longer-term solution is to only have one version of sysconfig. + + import sysconfig as global_sysconfig + if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): + return + self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED')) + self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) + + + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(SysconfigTestCase)) diff --git a/unixccompiler.py b/unixccompiler.py index c49ac9ba91..2aa1cb1d27 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -26,6 +26,9 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log +if sys.platform == 'darwin': + import _osx_support + # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -41,68 +44,6 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. -def _darwin_compiler_fixup(compiler_so, cc_args): - """ - This function will strip '-isysroot PATH' and '-arch ARCH' from the - compile flags if the user has specified one them in extra_compile_flags. - - This is needed because '-arch ARCH' adds another architecture to the - build, without a way to remove an architecture. Furthermore GCC will - barf if multiple '-isysroot' arguments are present. - """ - stripArch = stripSysroot = 0 - - compiler_so = list(compiler_so) - kernel_version = os.uname()[2] # 8.4.3 - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # OSX before 10.4.0, these don't support -arch and -isysroot at - # all. - stripArch = stripSysroot = True - else: - stripArch = '-arch' in cc_args - stripSysroot = '-isysroot' in cc_args - - if stripArch or 'ARCHFLAGS' in os.environ: - while 1: - try: - index = compiler_so.index('-arch') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - break - - if 'ARCHFLAGS' in os.environ and not stripArch: - # User specified different -arch flags in the environ, - # see also distutils.sysconfig - compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() - - if stripSysroot: - try: - index = compiler_so.index('-isysroot') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - pass - - # Check if the SDK that is used during compilation actually exists, - # the universal build requires the usage of a universal SDK and not all - # users have that installed by default. - sysroot = None - if '-isysroot' in cc_args: - idx = cc_args.index('-isysroot') - sysroot = cc_args[idx+1] - elif '-isysroot' in compiler_so: - idx = compiler_so.index('-isysroot') - sysroot = compiler_so[idx+1] - - if sysroot and not os.path.isdir(sysroot): - log.warn("Compiling with an SDK that doesn't seem to exist: %s", - sysroot) - log.warn("Please check your Xcode installation") - - return compiler_so class UnixCCompiler(CCompiler): @@ -172,7 +113,8 @@ def preprocess(self, source, def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so if sys.platform == 'darwin': - compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) try: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) @@ -251,7 +193,7 @@ def link(self, target_desc, objects, linker[i] = self.compiler_cxx[i] if sys.platform == 'darwin': - linker = _darwin_compiler_fixup(linker, ld_args) + linker = _osx_support.compiler_fixup(linker, ld_args) self.spawn(linker + ld_args) except DistutilsExecError, msg: diff --git a/util.py b/util.py index 0c24e8ca3e..5279411294 100644 --- a/util.py +++ b/util.py @@ -93,94 +93,10 @@ def get_platform (): if m: release = m.group() elif osname[:6] == "darwin": - # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set - # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were - # MACOSX_DEPLOYMENT_TARGET. - from distutils.sysconfig import get_config_vars - cfgvars = get_config_vars() - - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - - if 1: - # Always calculate the release of the running machine, - # needed to determine if we can build fat binaries or not. - - macrelease = macver - # Get the system version. Reading this plist is a documented - # way to get the system version (see the documentation for - # the Gestalt Manager) - try: - f = open('/System/Library/CoreServices/SystemVersion.plist') - except IOError: - # We're on a plain darwin box, fall back to the default - # behaviour. - pass - else: - try: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour - finally: - f.close() - - if not macver: - macver = macrelease - - if macver: - from distutils.sysconfig import get_config_vars - release = macver - osname = "macosx" - - if (macrelease + '.') >= '10.4.' and \ - '-arch' in get_config_vars().get('CFLAGS', '').strip(): - # The universal build will build fat binaries, but not on - # systems before 10.4 - # - # Try to detect 4-way universal builds, those have machine-type - # 'universal' instead of 'fat'. - - machine = 'fat' - cflags = get_config_vars().get('CFLAGS') - - archs = re.findall('-arch\s+(\S+)', cflags) - archs = tuple(sorted(set(archs))) - - if len(archs) == 1: - machine = archs[0] - elif archs == ('i386', 'ppc'): - machine = 'fat' - elif archs == ('i386', 'x86_64'): - machine = 'intel' - elif archs == ('i386', 'ppc', 'x86_64'): - machine = 'fat3' - elif archs == ('ppc64', 'x86_64'): - machine = 'fat64' - elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): - machine = 'universal' - else: - raise ValueError( - "Don't know machine value for archs=%r"%(archs,)) - - elif machine == 'i386': - # On OSX the machine type returned by uname is always the - # 32-bit variant, even if the executable architecture is - # the 64-bit variant - if sys.maxint >= 2**32: - machine = 'x86_64' - - elif machine in ('PowerPC', 'Power_Macintosh'): - # Pick a sane name for the PPC architecture. - machine = 'ppc' - - # See 'i386' case - if sys.maxint >= 2**32: - machine = 'ppc64' + import _osx_support, distutils.sysconfig + osname, release, machine = _osx_support.get_platform_osx( + distutils.sysconfig.get_config_vars(), + osname, release, machine) return "%s-%s-%s" % (osname, release, machine) From 2374a4ccde18f6e6f3f20a7279dc0b1a7a2cf89d Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Thu, 31 Jan 2013 01:28:23 -0800 Subject: [PATCH 3695/8469] Issue #13590: OS X Xcode 4 - improve support for universal extension modules In particular, fix extension module build failures when trying to use 32-bit-only installer Pythons on systems with Xcode 4 (currently OS X 10.8, 10.7, and optionally 10.6). * Backport 3.3.0 fixes to 3.2 branch (for release in 3.2.4) * Since Xcode 4 removes ppc support, extension module builds now check for ppc compiler support and by default remove ppc and ppc64 archs when they are not available. * Extension module builds now revert to using system installed headers and libs (/usr and /System/Library) if the SDK used to build the interpreter is not installed or has moved. * Try to avoid building extension modules with deprecated and problematic Apple llvm-gcc compiler. If original compiler is not available, use clang instead by default. --- sysconfig.py | 88 ++++++++++----------------------------- tests/test_sysconfig.py | 22 +++++++++- tests/test_util.py | 9 ++++ unixccompiler.py | 70 +++---------------------------- util.py | 92 ++--------------------------------------- 5 files changed, 61 insertions(+), 220 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 16902ca920..b6007a904f 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,7 +146,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): "I don't know where Python installs its library " "on platform '%s'" % os.name) -_USE_CLANG = None + def customize_compiler(compiler): """Do any platform-specific customization of a CCompiler instance. @@ -155,42 +155,28 @@ def customize_compiler(compiler): varies across Unices and is stored in Python's Makefile. """ if compiler.compiler_type == "unix": + if sys.platform == "darwin": + # Perform first-time customization of compiler-related + # config vars on OS X now that we know we need a compiler. + # This is primarily to support Pythons from binary + # installers. The kind and paths to build tools on + # the user system may vary significantly from the system + # that Python itself was built on. Also the user OS + # version and build tools may not support the same set + # of CPU architectures for universal builds. + global _config_vars + if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): + import _osx_support + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') newcc = None if 'CC' in os.environ: - newcc = os.environ['CC'] - elif sys.platform == 'darwin' and cc == 'gcc-4.2': - # Issue #13590: - # Since Apple removed gcc-4.2 in Xcode 4.2, we can no - # longer assume it is available for extension module builds. - # If Python was built with gcc-4.2, check first to see if - # it is available on this system; if not, try to use clang - # instead unless the caller explicitly set CC. - global _USE_CLANG - if _USE_CLANG is None: - from distutils import log - from subprocess import Popen, PIPE - p = Popen("! type gcc-4.2 && type clang && exit 2", - shell=True, stdout=PIPE, stderr=PIPE) - p.wait() - if p.returncode == 2: - _USE_CLANG = True - log.warn("gcc-4.2 not found, using clang instead") - else: - _USE_CLANG = False - if _USE_CLANG: - newcc = 'clang' - if newcc: - # On OS X, if CC is overridden, use that as the default - # command for LDSHARED as well - if (sys.platform == 'darwin' - and 'LDSHARED' not in os.environ - and ldshared.startswith(cc)): - ldshared = newcc + ldshared[len(cc):] - cc = newcc + cc = os.environ['CC'] if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: @@ -543,43 +529,11 @@ def get_config_vars(*args): srcdir = os.path.join(base, _config_vars['srcdir']) _config_vars['srcdir'] = os.path.normpath(srcdir) + # OS X platforms require special customization to handle + # multi-architecture, multi-os-version installers if sys.platform == 'darwin': - kernel_version = os.uname()[2] # Kernel version (8.4.3) - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # On Mac OS X before 10.4, check if -arch and -isysroot - # are in CFLAGS or LDFLAGS and remove them if they are. - # This is needed when building extensions on a 10.3 system - # using a universal build of python. - for key in ('LDFLAGS', 'BASECFLAGS', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII) - flags = re.sub('-isysroot [^ \t]*', ' ', flags) - _config_vars[key] = flags - - else: - - # Allow the user to override the architecture flags using - # an environment variable. - # NOTE: This name was introduced by Apple in OSX 10.5 and - # is used by several scripting languages distributed with - # that OS release. - - if 'ARCHFLAGS' in os.environ: - arch = os.environ['ARCHFLAGS'] - for key in ('LDFLAGS', 'BASECFLAGS', - # a number of derived variables. These need to be - # patched up as well. - 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): - - flags = _config_vars[key] - flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = flags + ' ' + arch - _config_vars[key] = flags + import _osx_support + _osx_support.customize_config_vars(_config_vars) if args: vals = [] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index fbe26bf65d..545ef3b548 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -102,7 +102,27 @@ def test_sysconfig_module(self): import sysconfig as global_sysconfig self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) - self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),sysconfig.get_config_var('LDSHARED')) + + @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'),'compiler flags customized') + def test_sysconfig_compiler_vars(self): + # On OS X, binary installers support extension module building on + # various levels of the operating system with differing Xcode + # configurations. This requires customization of some of the + # compiler configuration directives to suit the environment on + # the installed machine. Some of these customizations may require + # running external programs and, so, are deferred until needed by + # the first extension module build. With Python 3.3, only + # the Distutils version of sysconfig is used for extension module + # builds, which happens earlier in the Distutils tests. This may + # cause the following tests to fail since no tests have caused + # the global version of sysconfig to call the customization yet. + # The solution for now is to simply skip this test in this case. + # The longer-term solution is to only have one version of sysconfig. + + import sysconfig as global_sysconfig + if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): + return + self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED')) self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) diff --git a/tests/test_util.py b/tests/test_util.py index 1a06d4c4a1..eac9b5141d 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -13,6 +13,7 @@ from distutils.sysconfig import get_config_vars from distutils import sysconfig from distutils.tests import support +import _osx_support class UtilTestCase(support.EnvironGuard, unittest.TestCase): @@ -92,6 +93,7 @@ def test_get_platform(self): ('Darwin Kernel Version 8.11.1: ' 'Wed Oct 10 18:23:28 PDT 2007; ' 'root:xnu-792.25.20~1/RELEASE_I386'), 'i386')) + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.3' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' @@ -105,6 +107,7 @@ def test_get_platform(self): sys.maxsize = cursize # macbook with fat binaries (fat, universal or fat64) + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.4' get_config_vars()['CFLAGS'] = ('-arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' @@ -113,10 +116,12 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-fat') + _osx_support._remove_original_values(get_config_vars()) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.1' self.assertEqual(get_platform(), 'macosx-10.4-fat') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -124,18 +129,21 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-intel') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEqual(get_platform(), 'macosx-10.4-fat3') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEqual(get_platform(), 'macosx-10.4-universal') + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' @@ -144,6 +152,7 @@ def test_get_platform(self): self.assertEqual(get_platform(), 'macosx-10.4-fat64') for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + _osx_support._remove_original_values(get_config_vars()) get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' diff --git a/unixccompiler.py b/unixccompiler.py index c70a3cc555..094a2f0bd0 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -23,6 +23,9 @@ DistutilsExecError, CompileError, LibError, LinkError from distutils import log +if sys.platform == 'darwin': + import _osx_support + # XXX Things not currently handled: # * optimization/debug/warning flags; we just use whatever's in Python's # Makefile and live with it. Is this adequate? If not, we might @@ -38,68 +41,6 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. -def _darwin_compiler_fixup(compiler_so, cc_args): - """ - This function will strip '-isysroot PATH' and '-arch ARCH' from the - compile flags if the user has specified one them in extra_compile_flags. - - This is needed because '-arch ARCH' adds another architecture to the - build, without a way to remove an architecture. Furthermore GCC will - barf if multiple '-isysroot' arguments are present. - """ - stripArch = stripSysroot = False - - compiler_so = list(compiler_so) - kernel_version = os.uname()[2] # 8.4.3 - major_version = int(kernel_version.split('.')[0]) - - if major_version < 8: - # OSX before 10.4.0, these don't support -arch and -isysroot at - # all. - stripArch = stripSysroot = True - else: - stripArch = '-arch' in cc_args - stripSysroot = '-isysroot' in cc_args - - if stripArch or 'ARCHFLAGS' in os.environ: - while True: - try: - index = compiler_so.index('-arch') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - break - - if 'ARCHFLAGS' in os.environ and not stripArch: - # User specified different -arch flags in the environ, - # see also distutils.sysconfig - compiler_so = compiler_so + os.environ['ARCHFLAGS'].split() - - if stripSysroot: - try: - index = compiler_so.index('-isysroot') - # Strip this argument and the next one: - del compiler_so[index:index+2] - except ValueError: - pass - - # Check if the SDK that is used during compilation actually exists, - # the universal build requires the usage of a universal SDK and not all - # users have that installed by default. - sysroot = None - if '-isysroot' in cc_args: - idx = cc_args.index('-isysroot') - sysroot = cc_args[idx+1] - elif '-isysroot' in compiler_so: - idx = compiler_so.index('-isysroot') - sysroot = compiler_so[idx+1] - - if sysroot and not os.path.isdir(sysroot): - log.warn("Compiling with an SDK that doesn't seem to exist: %s", - sysroot) - log.warn("Please check your Xcode installation") - - return compiler_so class UnixCCompiler(CCompiler): @@ -168,7 +109,8 @@ def preprocess(self, source, output_file=None, macros=None, def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so if sys.platform == 'darwin': - compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) try: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) @@ -247,7 +189,7 @@ def link(self, target_desc, objects, linker[i] = self.compiler_cxx[i] if sys.platform == 'darwin': - linker = _darwin_compiler_fixup(linker, ld_args) + linker = _osx_support.compiler_fixup(linker, ld_args) self.spawn(linker + ld_args) except DistutilsExecError as msg: diff --git a/util.py b/util.py index bce840274d..52280db0b2 100644 --- a/util.py +++ b/util.py @@ -94,94 +94,10 @@ def get_platform (): if m: release = m.group() elif osname[:6] == "darwin": - # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set - # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were - # MACOSX_DEPLOYMENT_TARGET. - from distutils.sysconfig import get_config_vars - cfgvars = get_config_vars() - - macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') - - if 1: - # Always calculate the release of the running machine, - # needed to determine if we can build fat binaries or not. - - macrelease = macver - # Get the system version. Reading this plist is a documented - # way to get the system version (see the documentation for - # the Gestalt Manager) - try: - f = open('/System/Library/CoreServices/SystemVersion.plist') - except IOError: - # We're on a plain darwin box, fall back to the default - # behaviour. - pass - else: - try: - m = re.search( - r'ProductUserVisibleVersion\s*' + - r'(.*?)', f.read()) - if m is not None: - macrelease = '.'.join(m.group(1).split('.')[:2]) - # else: fall back to the default behaviour - finally: - f.close() - - if not macver: - macver = macrelease - - if macver: - from distutils.sysconfig import get_config_vars - release = macver - osname = "macosx" - - if (macrelease + '.') >= '10.4.' and \ - '-arch' in get_config_vars().get('CFLAGS', '').strip(): - # The universal build will build fat binaries, but not on - # systems before 10.4 - # - # Try to detect 4-way universal builds, those have machine-type - # 'universal' instead of 'fat'. - - machine = 'fat' - cflags = get_config_vars().get('CFLAGS') - - archs = re.findall('-arch\s+(\S+)', cflags) - archs = tuple(sorted(set(archs))) - - if len(archs) == 1: - machine = archs[0] - elif archs == ('i386', 'ppc'): - machine = 'fat' - elif archs == ('i386', 'x86_64'): - machine = 'intel' - elif archs == ('i386', 'ppc', 'x86_64'): - machine = 'fat3' - elif archs == ('ppc64', 'x86_64'): - machine = 'fat64' - elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): - machine = 'universal' - else: - raise ValueError( - "Don't know machine value for archs=%r"%(archs,)) - - elif machine == 'i386': - # On OSX the machine type returned by uname is always the - # 32-bit variant, even if the executable architecture is - # the 64-bit variant - if sys.maxsize >= 2**32: - machine = 'x86_64' - - elif machine in ('PowerPC', 'Power_Macintosh'): - # Pick a sane name for the PPC architecture. - machine = 'ppc' - - # See 'i386' case - if sys.maxsize >= 2**32: - machine = 'ppc64' + import _osx_support, distutils.sysconfig + osname, release, machine = _osx_support.get_platform_osx( + distutils.sysconfig.get_config_vars(), + osname, release, machine) return "%s-%s-%s" % (osname, release, machine) From 9c2f75cbc7aeb61b3a2aad135472c72cfbc1dd44 Mon Sep 17 00:00:00 2001 From: "doko@python.org" Date: Thu, 31 Jan 2013 23:52:03 +0100 Subject: [PATCH 3696/8469] - Issue #17086: Backport the patches from the 3.3 branch to cross-build the package. --- sysconfig.py | 7 ++++++- util.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index daa4dc77ca..250ef38bed 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -37,6 +37,11 @@ project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, os.path.pardir)) +# set for cross builds +if "_PYTHON_PROJECT_BASE" in os.environ: + # this is the build directory, at least for posix + project_base = os.path.normpath(os.environ["_PYTHON_PROJECT_BASE"]) + # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. @@ -230,7 +235,7 @@ def get_config_h_filename(): def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") + return os.path.join(project_base, "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") diff --git a/util.py b/util.py index 5279411294..ea6ed8a9ac 100644 --- a/util.py +++ b/util.py @@ -51,6 +51,10 @@ def get_platform (): return 'win-ia64' return sys.platform + # Set for cross builds explicitly + if "_PYTHON_HOST_PLATFORM" in os.environ: + return os.environ["_PYTHON_HOST_PLATFORM"] + if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. From 4627dd0881a1ab9bafe97aff94867456135d057a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 3 Feb 2013 11:41:19 -0500 Subject: [PATCH 3697/8469] Add alias to restore 2.7.2 compatibility for setup scripts (#13994). The customize_compiler function moved many times during the 2.7 series; in 2.7.3, setup scripts importing this function from ccompiler were broken. This commit restores compatibility without reintroducing the issue that #13994 originally fixed (duplication of the function). A unit test makes little sense here, as distutils tests never do imports in functions, and the fix is very simple. --- ccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccompiler.py b/ccompiler.py index 7076b93394..4907a0aa5a 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -17,6 +17,8 @@ from distutils.dep_util import newer_group from distutils.util import split_quoted, execute from distutils import log +# following import is for backward compatibility +from distutils.sysconfig import customize_compiler class CCompiler: """Abstract base class to define the interface that must be implemented From b5cd47fbd96ae900dd835b68484084ab1219f260 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Feb 2013 02:13:45 -0500 Subject: [PATCH 3698/8469] Backed out changeset: d0a8d1a83053 In the discussion in #278, it became clear that the deviance in behavior from setuptools is problemmatic. For compatibility, defer to the setuptools version scheme as specifically intended. --HG-- branch : distribute extra : rebase_source : 1d5cc8c216f974b247e2dc84d8d40c868d6d3639 --- pkg_resources.py | 4 +++- setuptools/tests/test_resources.py | 20 +++----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 49aab6757f..69601480d3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1936,7 +1936,7 @@ def yield_lines(strs): def _parse_version_parts(s): for part in component_re.split(s): part = replace(part,part) - if part in ['', '.']: + if not part or part=='.': continue if part[:1] in '0123456789': yield part.zfill(8) # pad for numeric comparison @@ -1979,6 +1979,8 @@ def parse_version(s): parts = [] for part in _parse_version_parts(s.lower()): if part.startswith('*'): + if part<'*final': # remove '-' before a prerelease tag + while parts and parts[-1]=='*final-': parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1]=='00000000': parts.pop() diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 0bc1a0953d..292b78d1ab 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -477,13 +477,14 @@ def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) self.assertEqual(p1,p2, (s1,s2,p1,p2)) + c('1.2-rc1', '1.2rc1') c('0.4', '0.4.0') c('0.4.0.0', '0.4.0') c('0.4.0-0', '0.4-0') c('0pl1', '0.0pl1') c('0pre1', '0.0c1') c('0.0.0preview1', '0c1') - c('0.0c1', '0rc1') + c('0.0c1', '0-rc1') c('1.2a1', '1.2.a.1'); c('1.2...a', '1.2a') def testVersionOrdering(self): @@ -492,14 +493,11 @@ def c(s1,s2): self.assertTrue(p1 Date: Sat, 16 Feb 2013 02:47:06 -0500 Subject: [PATCH 3699/8469] Updated docs to match originally-intended behavior and the behavior of setuptools 0.6. This fixes #278. --HG-- branch : distribute extra : rebase_source : 2b4f2ca890d32a2d1a3179bb1805b6a1f1e9be77 --- CHANGES.txt | 7 +++++++ docs/setuptools.txt | 18 ++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 623bc4b79f..cae946e0dc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,13 @@ CHANGES 0.6.35 ------ +Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in +how it parses version numbers. + +* Issue #278: Restored compatibility with distribute 0.6.22 and setuptools + 0.6. Updated the documentation to match more closely with the version + parsing as intended in setuptools 0.6. + ------ 0.6.34 ------ diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 31ecc931f2..fe8bb3f615 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -187,10 +187,11 @@ than ``2.4.1`` (which has a higher release number). A pre-release tag is a series of letters that are alphabetically before "final". Some examples of prerelease tags would include ``alpha``, ``beta``, -``a``, ``c``, ``dev``, and so on. You do not have to place a dot before -the prerelease tag if it's immediately after a number, but it's okay to do -so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` both represent release -candidate 1 of version ``2.4``, and are treated as identical by setuptools. +``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash +before the prerelease tag if it's immediately after a number, but it's okay to +do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all +represent release candidate 1 of version ``2.4``, and are treated as identical +by setuptools. In addition, there are three special prerelease tags that are treated as if they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version @@ -216,13 +217,6 @@ a post-release tag, so this version is *newer* than ``0.6a9.dev``. For the most part, setuptools' interpretation of version numbers is intuitive, but here are a few tips that will keep you out of trouble in the corner cases: -* Don't use ``-`` or any other character than ``.`` as a separator, unless you - really want a post-release. Remember that ``2.1-rc2`` means you've - *already* released ``2.1``, whereas ``2.1rc2`` and ``2.1.c2`` are candidates - you're putting out *before* ``2.1``. If you accidentally distribute copies - of a post-release that you meant to be a pre-release, the only safe fix is to - bump your main release number (e.g. to ``2.1.1``) and re-release the project. - * Don't stick adjoining pre-release tags together without a dot or number between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in @@ -239,7 +233,7 @@ but here are a few tips that will keep you out of trouble in the corner cases: >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev') True >>> parse_version('2.1-rc2') < parse_version('2.1') - False + True >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9') True From f2b43352cc25c12115ed5bf4db86a6f88fc81a9f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Feb 2013 03:11:43 -0500 Subject: [PATCH 3700/8469] Added tag 0.6.35 for changeset 2abe1117543b --HG-- branch : distribute extra : rebase_source : 1e3462505836a61244ec301a635305b88a56c35c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9bd19948ca..5f3ee48dc5 100644 --- a/.hgtags +++ b/.hgtags @@ -43,3 +43,4 @@ fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 6acac3919ae9a7dba2cbecbe3d4b31ece25d5f09 0.6.33 23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 +2abe1117543be0edbafb10c7c159d1bcb1cb1b87 0.6.35 From 1e7b49282e6f36d5d624bdf50f1ea9a34f52cfee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Feb 2013 03:12:35 -0500 Subject: [PATCH 3701/8469] Bumped to 0.6.36 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 82ea3f25bc7836db7398b0e602ef34baa1f2c34e --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index ea13a9bc43..a827f4a627 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz - $ tar -xzvf distribute-0.6.35.tar.gz - $ cd distribute-0.6.35 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.36.tar.gz + $ tar -xzvf distribute-0.6.36.tar.gz + $ cd distribute-0.6.36 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index a447f7ec8f..f630bca4f9 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.35" +DEFAULT_VERSION = "0.6.36" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 98380ba9d6..586e3fe6ad 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.35' +version = '0.6.36' # The full version, including alpha/beta/rc tags. -release = '0.6.35' +release = '0.6.36' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 983703047f..46720a8e1f 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.35' +VERSION = '0.6.36' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index cecb9e9fda..607954d03a 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.35" +VERSION = "0.6.36" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 7e2bae18571ec5b6e7df9cade381da605ebbac55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Feb 2013 03:23:23 -0500 Subject: [PATCH 3702/8469] Update release script to use keyring more properly (rather than bundling an artifact of the backend I was using). --HG-- branch : distribute extra : rebase_source : 188dcdb7f0873f1b382e8bde65377c5f43266f9f --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index 46720a8e1f..199ad65a51 100644 --- a/release.py +++ b/release.py @@ -50,7 +50,7 @@ def get_mercurial_creds(system='https://bitbucket.org', username=None): # todo: consider getting this from .hgrc username = username or getpass.getuser() keyring_username = '@@'.join((username, system)) - system = '@'.join((keyring_username, 'Mercurial')) + system = 'Mercurial' password = ( keyring.get_password(system, keyring_username) if 'keyring' in globals() From 86a22eb827e436ff4648552d4b6922c2c08b573a Mon Sep 17 00:00:00 2001 From: rlacko Date: Tue, 19 Feb 2013 09:16:13 +0100 Subject: [PATCH 3703/8469] Fix for PermissionError when installing on Python 3.3: __pycache__ dir inside distutils scripts metadata directory --HG-- branch : distribute extra : rebase_source : e6761715dec0e43a90b54c26f25fa68d97c97938 --- CHANGES.txt | 7 +++++++ setuptools/command/easy_install.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cae946e0dc..479850a738 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------------ +Next version +------------ + +- Fix for distutils scripts installation on Python 3, related to + ``__pycache__`` directories. + ------ 0.6.35 ------ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0d72f75843..ba98fa13fd 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -522,6 +522,9 @@ def install_egg_scripts(self, dist): """Write all the scripts for `dist`, unless scripts are excluded""" if not self.exclude_scripts and dist.metadata_isdir('scripts'): for script_name in dist.metadata_listdir('scripts'): + if dist.metadata_isdir('scripts/' + script_name): + # Probably Python 3 __pycache__ directory. + continue self.install_script( dist, script_name, dist.get_metadata('scripts/'+script_name) From 9ec4ed534ba8d93a5de4a97267807819fbdf1104 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 11 Mar 2013 17:56:17 -0400 Subject: [PATCH 3704/8469] Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett. --- command/install.py | 4 ++-- tests/test_install.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install.py b/command/install.py index f1f3bd5c6f..b9f1c6c566 100644 --- a/command/install.py +++ b/command/install.py @@ -265,8 +265,8 @@ def finalize_options (self): if self.user and (self.prefix or self.exec_prefix or self.home or self.install_base or self.install_platbase): - raise DistutilsOptionError("can't combine user with with prefix/" - "exec_prefix/home or install_(plat)base") + raise DistutilsOptionError("can't combine user with prefix, " + "exec_prefix/home, or install_(plat)base") # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name != "posix": diff --git a/tests/test_install.py b/tests/test_install.py index f17baa1e50..2996161797 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -166,7 +166,7 @@ def test_finalize_options(self): cmd.home = 'home' self.assertRaises(DistutilsOptionError, cmd.finalize_options) - # can't combine user with with prefix/exec_prefix/home or + # can't combine user with prefix/exec_prefix/home or # install_(plat)base cmd.prefix = None cmd.user = 'user' From 6b2cfd3d4e003b9a39b2b3a89a150bce9ecdc250 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 11 Mar 2013 17:57:08 -0400 Subject: [PATCH 3705/8469] Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett. --- command/install.py | 4 ++-- tests/test_install.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install.py b/command/install.py index 0161898f49..9b1c36af82 100644 --- a/command/install.py +++ b/command/install.py @@ -278,8 +278,8 @@ def finalize_options(self): if self.user and (self.prefix or self.exec_prefix or self.home or self.install_base or self.install_platbase): - raise DistutilsOptionError("can't combine user with with prefix/" - "exec_prefix/home or install_(plat)base") + raise DistutilsOptionError("can't combine user with prefix, " + "exec_prefix/home, or install_(plat)base") # Next, stuff that's wrong (or dubious) only on certain platforms. if os.name != "posix": diff --git a/tests/test_install.py b/tests/test_install.py index cb2e1f2879..1bd31e2469 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -165,7 +165,7 @@ def test_finalize_options(self): cmd.home = 'home' self.assertRaises(DistutilsOptionError, cmd.finalize_options) - # can't combine user with with prefix/exec_prefix/home or + # can't combine user with prefix/exec_prefix/home or # install_(plat)base cmd.prefix = None cmd.user = 'user' From 5bbae64025d2dd4378bc28a08f311a61c6478565 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 16 Mar 2013 19:48:51 +0200 Subject: [PATCH 3706/8469] #11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters. --- tests/test_bdist_dumb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 1037d8216e..0ad32d421e 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -88,9 +88,9 @@ def test_simple_built(self): fp.close() contents = sorted(os.path.basename(fn) for fn in contents) - wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], - 'foo.%s.pyc' % imp.get_tag(), - 'foo.py'] + wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] + if not sys.dont_write_bytecode: + wanted.append('foo.%s.pyc' % imp.get_tag()) self.assertEqual(contents, sorted(wanted)) def test_suite(): From a72d9ae0b5ea2ad5fd4aed4b3745776bede75c7b Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 16 Mar 2013 20:04:44 +0200 Subject: [PATCH 3707/8469] #11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters. --- tests/test_bdist_dumb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 3378f49ea0..5db3a850f8 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -87,8 +87,9 @@ def test_simple_built(self): fp.close() contents = sorted(os.path.basename(fn) for fn in contents) - wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], - 'foo.py', 'foo.pyc'] + wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] + if not sys.dont_write_bytecode: + wanted.append('foo.pyc') self.assertEqual(contents, sorted(wanted)) def test_finalize_options(self): From 0c09bf1bc035dfbc0caf1339c05a04cca238fcd6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 18 Mar 2013 15:20:56 -0700 Subject: [PATCH 3708/8469] use the HTTPS for pypi upload --- config.py | 11 ++++++++++- tests/test_config.py | 4 ++-- tests/test_upload.py | 8 ++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/config.py b/config.py index 1fd53346e9..7439a83a4f 100644 --- a/config.py +++ b/config.py @@ -21,7 +21,7 @@ class PyPIRCCommand(Command): """Base command that knows how to handle the .pypirc file """ - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' DEFAULT_REALM = 'pypi' repository = None realm = None @@ -83,6 +83,15 @@ def _read_pypirc(self): current[key] = config.get(server, key) else: current[key] = default + + # work around people having "repository" for the "pypi" + # section of their config set to the HTTP (rather than + # HTTPS) URL + if (server == 'pypi' and + repository in (self.DEFAULT_REPOSITORY, 'pypi')): + current['repository'] = self.DEFAULT_REPOSITORY + return current + if (current['server'] == repository or current['repository'] == repository): return current diff --git a/tests/test_config.py b/tests/test_config.py index 525bee9416..12593610aa 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -87,7 +87,7 @@ def test_server_registration(self): config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi'), + ('repository', 'https://pypi.python.org/pypi'), ('server', 'server1'), ('username', 'me')] self.assertEqual(config, waited) @@ -96,7 +96,7 @@ def test_server_registration(self): config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi'), + ('repository', 'https://pypi.python.org/pypi'), ('server', 'server-login'), ('username', 'tarek')] self.assertEqual(config, waited) diff --git a/tests/test_upload.py b/tests/test_upload.py index 4c6464a32e..d2696866fe 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -72,11 +72,11 @@ class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httpclient.HTTPConnection - self.conn = httpclient.HTTPConnection = FakeConnection() + self.old_class = httpclient.HTTPSConnection + self.conn = httpclient.HTTPSConnection = FakeConnection() def tearDown(self): - httpclient.HTTPConnection = self.old_class + httpclient.HTTPSConnection = self.old_class super(uploadTestCase, self).tearDown() def test_finalize_options(self): @@ -88,7 +88,7 @@ def test_finalize_options(self): cmd.finalize_options() for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi')): + ('repository', 'https://pypi.python.org/pypi')): self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): From 156e81825b9ee6d636f84ffdddd25e952347678b Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Thu, 21 Mar 2013 13:21:49 -0700 Subject: [PATCH 3709/8469] - Issue #16754: Fix the incorrect shared library extension on linux. Introduce two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4. --- command/build_ext.py | 6 +++--- sysconfig.py | 8 +++++--- tests/test_build_ext.py | 8 ++++---- tests/test_install.py | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 34b61bdb82..64f634caed 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -667,10 +667,10 @@ def get_ext_filename(self, ext_name): if os.name == "os2": ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8] # extensions in debug_mode are named 'module_d.pyd' under windows - so_ext = get_config_var('SO') + ext_suffix = get_config_var('EXT_SUFFIX') if os.name == 'nt' and self.debug: - return os.path.join(*ext_path) + '_d' + so_ext - return os.path.join(*ext_path) + so_ext + return os.path.join(*ext_path) + '_d' + ext_suffix + return os.path.join(*ext_path) + ext_suffix def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to diff --git a/sysconfig.py b/sysconfig.py index b6007a904f..dec37f8be1 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -170,9 +170,9 @@ def customize_compiler(compiler): _osx_support.customize_compiler(_config_vars) _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ + (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS') + 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') newcc = None if 'CC' in os.environ: @@ -211,7 +211,7 @@ def customize_compiler(compiler): linker_exe=cc, archiver=archiver) - compiler.shared_lib_extension = so_ext + compiler.shared_lib_extension = shlib_suffix def get_config_h_filename(): @@ -466,6 +466,7 @@ def _init_nt(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' + g['EXT_SUFFIX'] = '.pyd' g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) @@ -485,6 +486,7 @@ def _init_os2(): g['INCLUDEPY'] = get_python_inc(plat_specific=0) g['SO'] = '.pyd' + g['EXT_SUFFIX'] = '.pyd' g['EXE'] = ".exe" global _config_vars diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 065a6a21c9..44a9852f4c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -318,8 +318,8 @@ def test_get_outputs(self): finally: os.chdir(old_wd) self.assertTrue(os.path.exists(so_file)) - so_ext = sysconfig.get_config_var('SO') - self.assertTrue(so_file.endswith(so_ext)) + ext_suffix = sysconfig.get_config_var('EXT_SUFFIX') + self.assertTrue(so_file.endswith(ext_suffix)) so_dir = os.path.dirname(so_file) self.assertEqual(so_dir, other_tmp_dir) @@ -328,7 +328,7 @@ def test_get_outputs(self): cmd.run() so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) - self.assertTrue(so_file.endswith(so_ext)) + self.assertTrue(so_file.endswith(ext_suffix)) so_dir = os.path.dirname(so_file) self.assertEqual(so_dir, cmd.build_lib) @@ -355,7 +355,7 @@ def test_get_outputs(self): self.assertEqual(lastdir, 'bar') def test_ext_fullpath(self): - ext = sysconfig.get_config_vars()['SO'] + ext = sysconfig.get_config_var('EXT_SUFFIX') # building lxml.etree inplace #etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') #etree_ext = Extension('lxml.etree', [etree_c]) diff --git a/tests/test_install.py b/tests/test_install.py index 1bd31e2469..b1901273e9 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -23,7 +23,7 @@ def _make_ext_name(modname): if os.name == 'nt' and sys.executable.endswith('_d.exe'): modname += '_d' - return modname + sysconfig.get_config_var('SO') + return modname + sysconfig.get_config_var('EXT_SUFFIX') class InstallTestCase(support.TempdirManager, From 98057644b0bde93fc52346011633276b87ccb3a4 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Thu, 21 Mar 2013 15:02:16 -0700 Subject: [PATCH 3710/8469] - Issue #13150: sysconfig no longer parses the Makefile and config.h files when imported, instead doing it at build time. This makes importing sysconfig faster and reduces Python startup time by 20%. --- sysconfig.py | 63 ++++------------------------------------------------ 1 file changed, 4 insertions(+), 59 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 250ef38bed..0c726d92ff 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -387,66 +387,11 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" - g = {} - # load the installed Makefile: - try: - filename = get_makefile_filename() - parse_makefile(filename, g) - except IOError, msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # load the installed pyconfig.h: - try: - filename = get_config_h_filename() - parse_config_h(file(filename), g) - except IOError, msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # On AIX, there are wrong paths to the linker scripts in the Makefile - # -- these paths are relative to the Python source, but when installed - # the scripts are in another directory. - if python_build: - g['LDSHARED'] = g['BLDSHARED'] - - elif get_python_version() < '2.1': - # The following two branches are for 1.5.2 compatibility. - if sys.platform == 'aix4': # what about AIX 3.x ? - # Linker script is in the config directory, not in Modules as the - # Makefile says. - python_lib = get_python_lib(standard_lib=1) - ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') - python_exp = os.path.join(python_lib, 'config', 'python.exp') - - g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - - elif sys.platform == 'beos': - # Linker script is in the config directory. In the Makefile it is - # relative to the srcdir, which after installation no longer makes - # sense. - python_lib = get_python_lib(standard_lib=1) - linkerscript_path = string.split(g['LDSHARED'])[0] - linkerscript_name = os.path.basename(linkerscript_path) - linkerscript = os.path.join(python_lib, 'config', - linkerscript_name) - - # XXX this isn't the right place to do this: adding the Python - # library to the link, if needed, should be in the "build_ext" - # command. (It's also needed for non-MS compilers on Windows, and - # it's taken care of for them by the 'build_ext.get_libraries()' - # method.) - g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % - (linkerscript, PREFIX, get_python_version())) - + # _sysconfigdata is generated at build time, see the sysconfig module + from _sysconfigdata import build_time_vars global _config_vars - _config_vars = g + _config_vars = {} + _config_vars.update(build_time_vars) def _init_nt(): From c02b720fc0e7ec3db46e6fcb61b680be7c18fbff Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 22 Mar 2013 09:37:13 -0500 Subject: [PATCH 3711/8469] backout 66e30c4870bb for breaking OSX (#13150) --- sysconfig.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 0c726d92ff..250ef38bed 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -387,11 +387,66 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" - # _sysconfigdata is generated at build time, see the sysconfig module - from _sysconfigdata import build_time_vars + g = {} + # load the installed Makefile: + try: + filename = get_makefile_filename() + parse_makefile(filename, g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # load the installed pyconfig.h: + try: + filename = get_config_h_filename() + parse_config_h(file(filename), g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + + # On AIX, there are wrong paths to the linker scripts in the Makefile + # -- these paths are relative to the Python source, but when installed + # the scripts are in another directory. + if python_build: + g['LDSHARED'] = g['BLDSHARED'] + + elif get_python_version() < '2.1': + # The following two branches are for 1.5.2 compatibility. + if sys.platform == 'aix4': # what about AIX 3.x ? + # Linker script is in the config directory, not in Modules as the + # Makefile says. + python_lib = get_python_lib(standard_lib=1) + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') + python_exp = os.path.join(python_lib, 'config', 'python.exp') + + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) + + elif sys.platform == 'beos': + # Linker script is in the config directory. In the Makefile it is + # relative to the srcdir, which after installation no longer makes + # sense. + python_lib = get_python_lib(standard_lib=1) + linkerscript_path = string.split(g['LDSHARED'])[0] + linkerscript_name = os.path.basename(linkerscript_path) + linkerscript = os.path.join(python_lib, 'config', + linkerscript_name) + + # XXX this isn't the right place to do this: adding the Python + # library to the link, if needed, should be in the "build_ext" + # command. (It's also needed for non-MS compilers on Windows, and + # it's taken care of for them by the 'build_ext.get_libraries()' + # method.) + g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % + (linkerscript, PREFIX, get_python_version())) + global _config_vars - _config_vars = {} - _config_vars.update(build_time_vars) + _config_vars = g def _init_nt(): From 449644ec384bd9ec0e8066bf54a22d19f162977f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 23 Mar 2013 16:02:08 +0100 Subject: [PATCH 3712/8469] Bump to 3.2.4rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b52a9fe6c4..834d89671b 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.3" +__version__ = "3.2.4rc1" #--end constants-- From b262efd97d7ac908bbefc87ad8e5eee19ea8f47a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 23 Mar 2013 16:05:12 +0100 Subject: [PATCH 3713/8469] Bump to 3.3.1rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 345ac4f8dd..c30da0bb41 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.0" +__version__ = "3.3.1rc1" #--end constants-- From 447a41bf99cf4b4dd10f41fc91a1ef7d1a94552c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 23 Mar 2013 10:17:29 -0500 Subject: [PATCH 3714/8469] version to 2.7.4rc1 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 036062cc33..15b511bee5 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "2.7.3" +__version__ = "2.7.4rc1" #--end constants-- From 463e07e68ee64bb15aea8516239908e3f6d4f40f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2013 17:10:55 -0400 Subject: [PATCH 3715/8469] Update release notes and comment to provide a bit more detail about the issue and to be more consistent with the solution. --HG-- branch : distribute extra : rebase_source : c813a29e831f266d427d4a4bce3da97f475a8eee --- CHANGES.txt | 14 +++++++++----- setuptools/command/easy_install.py | 5 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 479850a738..16461a21aa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,16 @@ CHANGES ======= ------------- -Next version ------------- +------ +0.6.36 +------ -- Fix for distutils scripts installation on Python 3, related to - ``__pycache__`` directories. +* Pull Request #35: In `Buildout issue 64 + `_, it was reported that + under Python 3, installation of distutils scripts could attempt to copy + the ``__pycache__`` directory as a file, causing an error, apparently only + under Windows. Easy_install now skips all directories when processing + metadata scripts. ------ 0.6.35 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ba98fa13fd..98af262097 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -523,8 +523,9 @@ def install_egg_scripts(self, dist): if not self.exclude_scripts and dist.metadata_isdir('scripts'): for script_name in dist.metadata_listdir('scripts'): if dist.metadata_isdir('scripts/' + script_name): - # Probably Python 3 __pycache__ directory. - continue + # The "script" is a directory, likely a Python 3 + # __pycache__ directory, so skip it. + continue self.install_script( dist, script_name, dist.get_metadata('scripts/'+script_name) From c7c39afa08b282a3a4c886e73dfe983475ee3598 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2013 17:14:21 -0400 Subject: [PATCH 3716/8469] Added tag 0.6.36 for changeset c813a29e831f --HG-- branch : distribute extra : rebase_source : a9dbc2819651b77ad8184101004a793f37be0f1b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5f3ee48dc5..3fda0d951b 100644 --- a/.hgtags +++ b/.hgtags @@ -44,3 +44,4 @@ b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 6acac3919ae9a7dba2cbecbe3d4b31ece25d5f09 0.6.33 23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 2abe1117543be0edbafb10c7c159d1bcb1cb1b87 0.6.35 +c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 From db6d5f7ac474fa0605213514e793f98a0157a2ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2013 17:14:51 -0400 Subject: [PATCH 3717/8469] Bumped to 0.6.37 in preparation for next release. --HG-- branch : distribute extra : rebase_source : a59fcbbf5ca73fb41958d42d33d3de299ad9ae7c --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index a827f4a627..10a0ca92d8 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.36.tar.gz - $ tar -xzvf distribute-0.6.36.tar.gz - $ cd distribute-0.6.36 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.37.tar.gz + $ tar -xzvf distribute-0.6.37.tar.gz + $ cd distribute-0.6.37 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index f630bca4f9..7488237edd 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.36" +DEFAULT_VERSION = "0.6.37" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 586e3fe6ad..0a943a16ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.36' +version = '0.6.37' # The full version, including alpha/beta/rc tags. -release = '0.6.36' +release = '0.6.37' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 199ad65a51..22ddfba8a6 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.36' +VERSION = '0.6.37' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 607954d03a..a3a658f8b0 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.36" +VERSION = "0.6.37" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 51ce4bbdaea029fbf434a0df91c7e0c0e46eab1b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 6 Apr 2013 09:36:20 +0200 Subject: [PATCH 3718/8469] Bump to 3.2.4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 834d89671b..b8f1c164c0 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.4rc1" +__version__ = "3.2.4" #--end constants-- From d6653309f0330f1e4e239e58226640a70a5c2f5a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 6 Apr 2013 09:40:02 +0200 Subject: [PATCH 3719/8469] Bump to 3.3.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c30da0bb41..f8af1b336e 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.1rc1" +__version__ = "3.3.1" #--end constants-- From 036968d741e319006ddfcbeb48d5a22f5da574dc Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 19 Apr 2013 04:23:09 +0300 Subject: [PATCH 3720/8469] Fix uploadTestCase to work even when HTTPSConnection is not available. --- tests/test_upload.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_upload.py b/tests/test_upload.py index d2696866fe..4a71ca4a8d 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -72,13 +72,13 @@ class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httpclient.HTTPSConnection + if hasattr(httpclient, 'HTTPSConnection'): + self.addCleanup(setattr, httpclient, 'HTTPSConnection', + httpclient.HTTPSConnection) + else: + self.addCleanup(delattr, httpclient, 'HTTPSConnection') self.conn = httpclient.HTTPSConnection = FakeConnection() - def tearDown(self): - httpclient.HTTPSConnection = self.old_class - super(uploadTestCase, self).tearDown() - def test_finalize_options(self): # new format From aa5a03972360fdd48530183a60171ecbf477d1e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:05:52 -0400 Subject: [PATCH 3721/8469] Include a launcher manifest for console scripts to prevent undesirable UAC elevation for scripts detected as installers (such as easy_install). Fixes #143. --HG-- branch : distribute extra : rebase_source : be6f65eea9c10ce78b6698d8c220b6e5de577292 --- CHANGES.txt | 10 ++++++++++ setuptools/command/easy_install.py | 13 +++++++++++++ setuptools/command/launcher manifest.xml | 15 +++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 setuptools/command/launcher manifest.xml diff --git a/CHANGES.txt b/CHANGES.txt index 16461a21aa..69d370cbc4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +------ +0.6.37 +------ + +* Issue #143: Launcher scripts, including easy_install itself, are now + accompanied by a manifest on 32-bit Windows environments to avoid the + Installer Detection Technology and thus undesirable UAC elevation described + in `this Microsoft article + `_. + ------ 0.6.36 ------ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 98af262097..7281d92d46 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -20,6 +20,7 @@ import stat import random from glob import glob +import pkg_resources from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from distutils import log, dir_util @@ -1851,11 +1852,23 @@ def get_script_args(dist, executable=sys_executable, wininst=False): name+'.exe', resource_string('setuptools', launcher), 'b' # write in binary mode ) + if not is_64bit(): + # install a manifest for the launcher to prevent Windows + # from detecting it as an installer (which it will for + # launchers like easy_install.exe). Consider only + # adding a manifest for launchers detected as installers. + # See Distribute #143 for details. + m_name = name + '.exe.manifest' + yield (m_name, load_launcher_manifest(name), 't') else: # On other platforms, we assume the right thing to do is to # just write the stub with no extension. yield (name, header+script_text) +def load_launcher_manifest(name): + manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') + return manifest % vars() + def rmtree(path, ignore_errors=False, onerror=auto_chmod): """Recursively delete a directory tree. diff --git a/setuptools/command/launcher manifest.xml b/setuptools/command/launcher manifest.xml new file mode 100644 index 0000000000..844d2264cd --- /dev/null +++ b/setuptools/command/launcher manifest.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + From 58cde2532559799557fd776b29a0322d9bc44501 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:08:56 -0400 Subject: [PATCH 3722/8469] Added tag 0.6.37 for changeset be6f65eea9c1 --HG-- branch : distribute extra : rebase_source : d3b1d90f953d90ad1e03bf5173c3b6198daa9907 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3fda0d951b..d84d27cf05 100644 --- a/.hgtags +++ b/.hgtags @@ -45,3 +45,4 @@ b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 2abe1117543be0edbafb10c7c159d1bcb1cb1b87 0.6.35 c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 +be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 From a34e56cef2e2cb2aea3d4ff5b532949d426e3b97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:10:00 -0400 Subject: [PATCH 3723/8469] Bumped to 0.6.38 in preparation for next release. --HG-- branch : distribute extra : rebase_source : cf2ffa52b8e0cf1403b4e8ca23921a4cda51ba5b --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 10a0ca92d8..aa07f447a3 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.37.tar.gz - $ tar -xzvf distribute-0.6.37.tar.gz - $ cd distribute-0.6.37 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.38.tar.gz + $ tar -xzvf distribute-0.6.38.tar.gz + $ cd distribute-0.6.38 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 7488237edd..b2e045ad59 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.37" +DEFAULT_VERSION = "0.6.38" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 0a943a16ba..b5dc23bddd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.37' +version = '0.6.38' # The full version, including alpha/beta/rc tags. -release = '0.6.37' +release = '0.6.38' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 22ddfba8a6..b1cd904c73 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.37' +VERSION = '0.6.38' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index a3a658f8b0..4ee8a08f8f 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.37" +VERSION = "0.6.38" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From d020c5a8efa0b5d903b00844d02c1460b51ff9ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:14:01 -0400 Subject: [PATCH 3724/8469] Add *.xml to MANIFEST.in --HG-- branch : distribute extra : rebase_source : 2b26ec8909bff210f47c5f8fc620bc505e1610b5 --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 9837747a22..68337800cc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -recursive-include setuptools *.py *.txt *.exe +recursive-include setuptools *.py *.txt *.exe *.xml recursive-include tests *.py *.c *.pyx *.txt recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html From c9307877a0b6acad4a574fd4d78150a0705956c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 May 2013 22:14:12 -0400 Subject: [PATCH 3725/8469] Added tag 0.6.37 for changeset 2b26ec8909bf --HG-- branch : distribute extra : rebase_source : f31307d41fedbbabdd3be5b5a6621a8af54ebf46 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 3fda0d951b..dc3daea6ce 100644 --- a/.hgtags +++ b/.hgtags @@ -45,3 +45,5 @@ b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 2abe1117543be0edbafb10c7c159d1bcb1cb1b87 0.6.35 c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 +be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 +2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 From ce9cbd6577c6ab67d70ea292468fae7f4d3add26 Mon Sep 17 00:00:00 2001 From: "guy@guyr-air.infinidat.com" Date: Sun, 5 May 2013 11:16:24 +0300 Subject: [PATCH 3726/8469] Issue #371: instructing setup.py to install the xml files in setuptools.command --HG-- branch : distribute extra : rebase_source : 3d0a26ca9a25c2e7467c6ffb515d0cb92f2f8173 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4ee8a08f8f..83612ebc88 100755 --- a/setup.py +++ b/setup.py @@ -170,7 +170,7 @@ def _linkified(rst_path): test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), - package_data = {'setuptools':['*.exe']}, + package_data = {'setuptools':['*.exe'], 'setuptools.command':['*.xml']}, py_modules = ['pkg_resources', 'easy_install', 'site'], From d7dec0f7e8cdc12ffc7c8ad42f8b0d4216d8864d Mon Sep 17 00:00:00 2001 From: "wyj1046@gmail.com" Date: Sun, 5 May 2013 17:07:31 +0800 Subject: [PATCH 3727/8469] decode manifest bytes(utf-8) to string first if py version is 3 --HG-- branch : distribute extra : rebase_source : 1038acda4912af8ac637d0e149630a95f3536dec --- setuptools/command/easy_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7281d92d46..dc851d1e6d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1867,7 +1867,10 @@ def get_script_args(dist, executable=sys_executable, wininst=False): def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') - return manifest % vars() + if sys.version_info[0] < 3: + return manifest % vars() + else: + return manifest.decode('utf-8') % vars() def rmtree(path, ignore_errors=False, onerror=auto_chmod): """Recursively delete a directory tree. From d607a20ed15715909bf4788e5374a9cbdf092285 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 08:45:08 -0400 Subject: [PATCH 3728/8469] Update release notes --HG-- branch : distribute extra : rebase_source : f0d502a83f6c83ba38ad21c15a849c2daf389ec7 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 69d370cbc4..6e2b3b286b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.38 +------ + +* Issue #371: The launcher manifest file is now installed properly. + ------ 0.6.37 ------ From 06fcc7c974de667fa43abe247c4d6fa94e3c1936 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 08:45:17 -0400 Subject: [PATCH 3729/8469] Added tag 0.6.38 for changeset f0d502a83f6c --HG-- branch : distribute extra : rebase_source : 7e648708c7e4e87917fcace787085f2fa9de7fa1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dc3daea6ce..e01ab6986e 100644 --- a/.hgtags +++ b/.hgtags @@ -47,3 +47,4 @@ b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 +f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 From 878a81c62061ab506ed1874d541cbeb714fe06fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 08:45:43 -0400 Subject: [PATCH 3730/8469] Bumped to 0.6.39 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 3e627b0d100b8ae32e8dc995f2da0003bbd9c605 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index aa07f447a3..c2bfc20f64 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.38.tar.gz - $ tar -xzvf distribute-0.6.38.tar.gz - $ cd distribute-0.6.38 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.39.tar.gz + $ tar -xzvf distribute-0.6.39.tar.gz + $ cd distribute-0.6.39 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index b2e045ad59..f9dc2d7425 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.38" +DEFAULT_VERSION = "0.6.39" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index b5dc23bddd..fc60a00841 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.38' +version = '0.6.39' # The full version, including alpha/beta/rc tags. -release = '0.6.38' +release = '0.6.39' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index b1cd904c73..13df4d69a8 100644 --- a/release.py +++ b/release.py @@ -20,7 +20,7 @@ except Exception: pass -VERSION = '0.6.38' +VERSION = '0.6.39' def get_next_version(): digits = map(int, VERSION.split('.')) diff --git a/setup.py b/setup.py index 83612ebc88..4f56fe15fe 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.38" +VERSION = "0.6.39" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From a0f5752e58db3a0eaaa68b22f0b1f878e824a117 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 09:08:11 -0400 Subject: [PATCH 3731/8469] Extract another function for constructing linkified changes --HG-- branch : distribute extra : rebase_source : e764f523fff11bf7caa7e5183c7300afeee75dab --- setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 4f56fe15fe..bc8137c841 100755 --- a/setup.py +++ b/setup.py @@ -133,15 +133,18 @@ def _being_installed(): from distribute_setup import _before_install _before_install() -# return contents of reStructureText file with linked issue references def _linkified(rst_path): - bitroot = 'http://bitbucket.org/tarek/distribute' - revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) - + "return contents of reStructureText file with linked issue references" rst_file = open(rst_path) rst_content = rst_file.read() rst_file.close() + return _linkified_text(rst_content) + +def _linkified_text(rst_content): + bitroot = 'http://bitbucket.org/tarek/distribute' + revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) + anchors = revision.findall(rst_content) # ['Issue #43', ...] anchors = sorted(set(anchors)) rst_content = revision.sub(r'`\1`_', rst_content) From b78ecd63d5c206a5cd0b065656a4493ffe496fe5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 09:36:55 -0400 Subject: [PATCH 3732/8469] Fix linkification of CHANGES.txt (broken due to buildout issue reference) --HG-- branch : distribute extra : rebase_source : a331dda293481f2cf121956070f94bfe6c9e0a0c --- setup.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index bc8137c841..1db770e9fe 100755 --- a/setup.py +++ b/setup.py @@ -142,12 +142,24 @@ def _linkified(rst_path): return _linkified_text(rst_content) def _linkified_text(rst_content): - bitroot = 'http://bitbucket.org/tarek/distribute' - revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) + # first identify any existing HREFs so they're not changed + HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) + + # split on the HREF pattern, returning the parts to be linkified + plain_text_parts = HREF_pattern.split(rst_content) + anchors = [] + linkified_parts = [_linkified_part(part, anchors) + for part in plain_text_parts] + pairs = itertools.izip_longest( + linkified_parts, + HREF_pattern.findall(rst_content), + fillvalue='', + ) + rst_content = ''.join(flatten(pairs)) + + anchors = sorted(anchors) - anchors = revision.findall(rst_content) # ['Issue #43', ...] - anchors = sorted(set(anchors)) - rst_content = revision.sub(r'`\1`_', rst_content) + bitroot = 'http://bitbucket.org/tarek/distribute' rst_content += "\n" for x in anchors: issue = re.findall(r'\d+', x)[0] @@ -155,6 +167,21 @@ def _linkified_text(rst_content): rst_content += "\n" return rst_content +import itertools +def flatten(listOfLists): + "Flatten one level of nesting" + return itertools.chain.from_iterable(listOfLists) + + +def _linkified_part(text, anchors): + """ + Linkify a part and collect any anchors generated + """ + revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) + + anchors.extend(revision.findall(text)) # ['Issue #43', ...] + return revision.sub(r'`\1`_', text) + readme_file = open('README.txt') long_description = readme_file.read() + _linkified('CHANGES.txt') readme_file.close() From 92952a515bca3813de6d5e27638a8e7fcd0117a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 09:50:36 -0400 Subject: [PATCH 3733/8469] Moved link generation routine from setup.py to release.py. The new routine requires Python 2.6 for izip_longest and chain.from_iterable, so it's not suitable for setup.py. Also, there's no reason that every installer needs to compute the links - they can be resolved in advance during the release process. --HG-- branch : distribute extra : rebase_source : 9f4af99f70fdfa00290be2261a921af9a76ba597 --- .hgignore | 1 + release.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 53 +++---------------------------------------------- 3 files changed, 62 insertions(+), 50 deletions(-) diff --git a/.hgignore b/.hgignore index 21ec620a54..4e5d0bcfca 100644 --- a/.hgignore +++ b/.hgignore @@ -11,3 +11,4 @@ bin include \.Python *.swp +CHANGES (links).txt diff --git a/release.py b/release.py index 13df4d69a8..aeb989d52b 100644 --- a/release.py +++ b/release.py @@ -14,6 +14,8 @@ import urllib2 import getpass import collections +import itertools +import re try: import keyring @@ -110,6 +112,8 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) + linkify('CHANGES.txt', 'CHANGES (links).txt') + has_docs = build_docs() if os.path.isdir('./dist'): shutil.rmtree('./dist') @@ -166,5 +170,59 @@ def upload_bootstrap_script(): except: print("Unable to upload bootstrap script. Ask Tarek to do it.") +def linkify(source, dest): + with open(source) as source: + out = _linkified_text(source.read()) + with open(dest, 'w') as dest: + dest.write(out) + +def _linkified(rst_path): + "return contents of reStructureText file with linked issue references" + rst_file = open(rst_path) + rst_content = rst_file.read() + rst_file.close() + + return _linkified_text(rst_content) + +def _linkified_text(rst_content): + # first identify any existing HREFs so they're not changed + HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) + + # split on the HREF pattern, returning the parts to be linkified + plain_text_parts = HREF_pattern.split(rst_content) + anchors = [] + linkified_parts = [_linkified_part(part, anchors) + for part in plain_text_parts] + pairs = itertools.izip_longest( + linkified_parts, + HREF_pattern.findall(rst_content), + fillvalue='', + ) + rst_content = ''.join(flatten(pairs)) + + anchors = sorted(anchors) + + bitroot = 'http://bitbucket.org/tarek/distribute' + rst_content += "\n" + for x in anchors: + issue = re.findall(r'\d+', x)[0] + rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) + rst_content += "\n" + return rst_content + +def flatten(listOfLists): + "Flatten one level of nesting" + return itertools.chain.from_iterable(listOfLists) + + +def _linkified_part(text, anchors): + """ + Linkify a part and collect any anchors generated + """ + revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) + + anchors.extend(revision.findall(text)) # ['Issue #43', ...] + return revision.sub(r'`\1`_', text) + if __name__ == '__main__': do_release() diff --git a/setup.py b/setup.py index 1db770e9fe..e79fb65918 100755 --- a/setup.py +++ b/setup.py @@ -133,58 +133,11 @@ def _being_installed(): from distribute_setup import _before_install _before_install() -def _linkified(rst_path): - "return contents of reStructureText file with linked issue references" - rst_file = open(rst_path) - rst_content = rst_file.read() - rst_file.close() - - return _linkified_text(rst_content) - -def _linkified_text(rst_content): - # first identify any existing HREFs so they're not changed - HREF_pattern = re.compile('`.*?`_', re.MULTILINE | re.DOTALL) - - # split on the HREF pattern, returning the parts to be linkified - plain_text_parts = HREF_pattern.split(rst_content) - anchors = [] - linkified_parts = [_linkified_part(part, anchors) - for part in plain_text_parts] - pairs = itertools.izip_longest( - linkified_parts, - HREF_pattern.findall(rst_content), - fillvalue='', - ) - rst_content = ''.join(flatten(pairs)) - - anchors = sorted(anchors) - - bitroot = 'http://bitbucket.org/tarek/distribute' - rst_content += "\n" - for x in anchors: - issue = re.findall(r'\d+', x)[0] - rst_content += '.. _`%s`: %s/issue/%s\n' % (x, bitroot, issue) - rst_content += "\n" - return rst_content - -import itertools -def flatten(listOfLists): - "Flatten one level of nesting" - return itertools.chain.from_iterable(listOfLists) - - -def _linkified_part(text, anchors): - """ - Linkify a part and collect any anchors generated - """ - revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I) - - anchors.extend(revision.findall(text)) # ['Issue #43', ...] - return revision.sub(r'`\1`_', text) - readme_file = open('README.txt') -long_description = readme_file.read() + _linkified('CHANGES.txt') +changes_file = open('CHANGES (links).txt') +long_description = readme_file.read() + changes_file.read() readme_file.close() +changes_file.close() dist = setup( name="distribute", From a938092e7b189337cdd25c101c2e8fc984433eff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 May 2013 19:59:39 -0400 Subject: [PATCH 3734/8469] Allow the setup script to run even if the linked changelog hasn't been generated --HG-- branch : distribute extra : rebase_source : e94ca350b1a601b75ff6ae786dcdabbe517877c3 --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e79fb65918..eeec315368 100755 --- a/setup.py +++ b/setup.py @@ -134,7 +134,12 @@ def _being_installed(): _before_install() readme_file = open('README.txt') -changes_file = open('CHANGES (links).txt') +# the release script adds hyperlinks to issues +if os.path.exists('CHANGES (links).txt'): + changes_file = open('CHANGES (links).txt') +else: + # but if the release script has not run, fall back to the source file + changes_file = open('CHANGES.txt') long_description = readme_file.read() + changes_file.read() readme_file.close() changes_file.close() From 065e8eb834d65b4e0572611c16f7f2950db4512b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 10:59:30 +0100 Subject: [PATCH 3735/8469] Verified that not isinstance(IOError(), os.error), so there's no value in this statement being in the try block. --HG-- branch : distribute extra : rebase_source : 79dc86f2251503336feaa3d3f99c744d0ea45887 --- pkg_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 69601480d3..9d406e3833 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1409,10 +1409,10 @@ def _extract_resource(self, manager, zip_path): ) timestamp = time.mktime(date_time) + if not WRITE_SUPPORT: + raise IOError('"os.rename" and "os.unlink" are not supported ' + 'on this platform') try: - if not WRITE_SUPPORT: - raise IOError('"os.rename" and "os.unlink" are not supported ' - 'on this platform') real_path = manager.get_cache_path( self.egg_name, self._parts(zip_path) From 9027ce5419a346e068927df72dbfcd650cdee33f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 12:43:23 +0100 Subject: [PATCH 3736/8469] Extract static method for calculating size and timestamp on a zip resource --HG-- branch : distribute extra : rebase_source : 3acd099bb90d9abf4d3b265946e0c59b8edcae6e --- pkg_resources.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9d406e3833..579e3b46f9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1392,6 +1392,16 @@ def get_resource_filename(self, manager, resource_name): self._extract_resource(manager, self._eager_to_zip(name)) return self._extract_resource(manager, zip_path) + @staticmethod + def _get_date_and_size(zip_stat): + t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] + date_time = ( + (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd + (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. + ) + timestamp = time.mktime(date_time) + return timestamp, size + def _extract_resource(self, manager, zip_path): if zip_path in self._index(): @@ -1401,13 +1411,7 @@ def _extract_resource(self, manager, zip_path): ) return os.path.dirname(last) # return the extracted directory name - zip_stat = self.zipinfo[zip_path] - t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] - date_time = ( - (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd - (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. - ) - timestamp = time.mktime(date_time) + timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) if not WRITE_SUPPORT: raise IOError('"os.rename" and "os.unlink" are not supported ' From 7adfcead12a21b2ed6b13f5a75477914b524cb12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 12:54:26 +0100 Subject: [PATCH 3737/8469] Extract method to determine if a temporary file is current. --HG-- branch : distribute extra : rebase_source : ec2c1860f0ce9abbc3ea999aa54304ea9cc6ecd7 --- pkg_resources.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 579e3b46f9..b59f170387 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1422,11 +1422,8 @@ def _extract_resource(self, manager, zip_path): self.egg_name, self._parts(zip_path) ) - if os.path.isfile(real_path): - stat = os.stat(real_path) - if stat.st_size==size and stat.st_mtime==timestamp: - # size and stamp match, don't bother extracting - return real_path + if self.is_current(real_path, zip_path): + return real_path outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path)) os.write(outf, self.loader.get_data(zip_path)) @@ -1439,11 +1436,9 @@ def _extract_resource(self, manager, zip_path): except os.error: if os.path.isfile(real_path): - stat = os.stat(real_path) - - if stat.st_size==size and stat.st_mtime==timestamp: - # size and stamp match, somebody did it just ahead of - # us, so we're done + if self._is_current(real_path, zip_path): + # the file became current since it was checked above, + # so proceed. return real_path elif os.name=='nt': # Windows, del old file and retry unlink(real_path) @@ -1456,6 +1451,16 @@ def _extract_resource(self, manager, zip_path): return real_path + def _is_current(self, file_path, zip_path): + """ + Return True if the file_path is current for this zip_path + """ + timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) + if not os.path.isfile(file_path): + return False + stat = os.stat(file_path) + return stat.st_size==size and stat.st_mtime==timestamp + def _get_eager_resources(self): if self.eagers is None: eagers = [] From f0a3905357e596c9a2a85358fda0f41384ff3d39 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 13:05:32 +0100 Subject: [PATCH 3738/8469] Fix for yet unpublished issue to ensure that get_resource_filename always re-extracts the content of a temporary filename if it does not match that of the source content. --HG-- branch : distribute extra : rebase_source : 5605ee258010cde1237db058b770c62264c215e2 --- CHANGES.txt | 7 +++++++ pkg_resources.py | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6e2b3b286b..5d4c13bcc2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,13 @@ CHANGES ======= ------ +0.6.39 +------ + +* Issue ####: Resources extracted from a zip egg to the file system now also + check the contents of the file against the zip contents during each + invocation of get_resource_filename. + 0.6.38 ------ diff --git a/pkg_resources.py b/pkg_resources.py index b59f170387..2ec645d3a3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1459,7 +1459,14 @@ def _is_current(self, file_path, zip_path): if not os.path.isfile(file_path): return False stat = os.stat(file_path) - return stat.st_size==size and stat.st_mtime==timestamp + if stat.st_size!=size or stat.st_mtime!=timestamp: + return False + # check that the contents match + zip_contents = self.loader.get_data(zip_path) + f = open(file_path, 'rb') + file_contents = f.read() + f.close() + return zip_contents == file_contents def _get_eager_resources(self): if self.eagers is None: From a5f153fd048ccd978ab90f54f940f46d77852f51 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 12 May 2013 12:28:20 +0200 Subject: [PATCH 3739/8469] Bump to version 3.2.5. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b8f1c164c0..f9016d6d17 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.2.4" +__version__ = "3.2.5" #--end constants-- From 590f1383d4eb948cafba8ff7bd63acad94531d19 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 12 May 2013 12:36:07 +0200 Subject: [PATCH 3740/8469] Closes issue #17732: ignore install-directory specific options in distutils.cfg when a venv is active. --- dist.py | 14 +++++++++- tests/test_dist.py | 64 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/dist.py b/dist.py index a702568278..f7fac08918 100644 --- a/dist.py +++ b/dist.py @@ -343,6 +343,18 @@ def find_config_files(self): def parse_config_files(self, filenames=None): from configparser import ConfigParser + # Ignore install directory options if we have a venv + if sys.prefix != sys.base_prefix: + ignore_options = [ + 'install-base', 'install-platbase', 'install-lib', + 'install-platlib', 'install-purelib', 'install-headers', + 'install-scripts', 'install-data', 'prefix', 'exec-prefix', + 'home', 'user', 'root'] + else: + ignore_options = [] + + ignore_options = frozenset(ignore_options) + if filenames is None: filenames = self.find_config_files() @@ -359,7 +371,7 @@ def parse_config_files(self, filenames=None): opt_dict = self.get_option_dict(section) for opt in options: - if opt != '__name__': + if opt != '__name__' and opt not in ignore_options: val = parser.get(section,opt) opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) diff --git a/tests/test_dist.py b/tests/test_dist.py index 8aaae88cae..66c20e27e2 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -6,6 +6,8 @@ import warnings import textwrap +from unittest import mock + from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command @@ -18,7 +20,7 @@ class test_dist(Command): user_options = [ ("sample-option=", "S", "help text"), - ] + ] def initialize_options(self): self.sample_option = None @@ -77,6 +79,64 @@ def test_command_packages_cmdline(self): self.assertIsInstance(cmd, test_dist) self.assertEqual(cmd.sample_option, "sometext") + def test_venv_install_options(self): + sys.argv.append("install") + self.addCleanup(os.unlink, TESTFN) + + fakepath = '/somedir' + + with open(TESTFN, "w") as f: + print(("[install]\n" + "install-base = {0}\n" + "install-platbase = {0}\n" + "install-lib = {0}\n" + "install-platlib = {0}\n" + "install-purelib = {0}\n" + "install-headers = {0}\n" + "install-scripts = {0}\n" + "install-data = {0}\n" + "prefix = {0}\n" + "exec-prefix = {0}\n" + "home = {0}\n" + "user = {0}\n" + "root = {0}").format(fakepath), file=f) + + # Base case: Not in a Virtual Environment + with mock.patch.multiple(sys, prefix='/a', base_prefix='/a') as values: + d = self.create_distribution([TESTFN]) + + option_tuple = (TESTFN, fakepath) + + result_dict = { + 'install_base': option_tuple, + 'install_platbase': option_tuple, + 'install_lib': option_tuple, + 'install_platlib': option_tuple, + 'install_purelib': option_tuple, + 'install_headers': option_tuple, + 'install_scripts': option_tuple, + 'install_data': option_tuple, + 'prefix': option_tuple, + 'exec_prefix': option_tuple, + 'home': option_tuple, + 'user': option_tuple, + 'root': option_tuple, + } + + self.assertEqual( + sorted(d.command_options.get('install').keys()), + sorted(result_dict.keys())) + + for (key, value) in d.command_options.get('install').items(): + self.assertEqual(value, result_dict[key]) + + # Test case: In a Virtual Environment + with mock.patch.multiple(sys, prefix='/a', base_prefix='/b') as values: + d = self.create_distribution([TESTFN]) + + for key in result_dict.keys(): + self.assertNotIn(key, d.command_options.get('install', {})) + def test_command_packages_configfile(self): sys.argv.append("build") self.addCleanup(os.unlink, TESTFN) @@ -304,7 +364,7 @@ def test_custom_pydistutils(self): os.environ['HOME'] = temp_dir files = dist.find_config_files() self.assertIn(user_filename, files, - '%r not found in %r' % (user_filename, files)) + '%r not found in %r' % (user_filename, files)) finally: os.remove(user_filename) From 7c5ce9920a18c33d93d4f8c7091db6b197dcbbe2 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 12 May 2013 12:51:38 +0200 Subject: [PATCH 3741/8469] bump to 3.3.2 --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f8af1b336e..83d7cb7f4c 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.1" +__version__ = "3.3.2" #--end constants-- From b9661afd506c7c5f43d01c092ce313f33e730892 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 13:34:15 -0400 Subject: [PATCH 3742/8469] Fix AttributeError on underscore-prefixed method name. --HG-- branch : distribute extra : rebase_source : 8ceb2c2f067a60225bb83817a8584d93f489a3d0 --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2ec645d3a3..f8de449e87 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1422,7 +1422,7 @@ def _extract_resource(self, manager, zip_path): self.egg_name, self._parts(zip_path) ) - if self.is_current(real_path, zip_path): + if self._is_current(real_path, zip_path): return real_path outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path)) From e73268755f8d4889f5491907a9b366f8c2b0770d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 13:46:50 -0400 Subject: [PATCH 3743/8469] Adding test that captures the new requirement. --HG-- branch : distribute extra : rebase_source : fcf8db4d0becf51a1e192ec438c13f81d391e342 --- tests/test_pkg_resources.py | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 tests/test_pkg_resources.py diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py new file mode 100644 index 0000000000..7009b4abc0 --- /dev/null +++ b/tests/test_pkg_resources.py @@ -0,0 +1,61 @@ +import sys +import tempfile +import os +import zipfile + +import pkg_resources + +class EggRemover(unicode): + def __call__(self): + if self in sys.path: + sys.path.remove(self) + if os.path.exists(self): + os.remove(self) + +class TestZipProvider(object): + finalizers = [] + + @classmethod + def setup_class(cls): + "create a zip egg and add it to sys.path" + egg = tempfile.NamedTemporaryFile(suffix='.egg', delete=False) + zip_egg = zipfile.ZipFile(egg, 'w') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'mod.py' + zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_egg.writestr(zip_info, 'x = 3\n') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'data.dat' + zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_egg.writestr(zip_info, 'hello, world!') + zip_egg.close() + egg.close() + + sys.path.append(egg.name) + cls.finalizers.append(EggRemover(egg.name)) + + @classmethod + def teardown_class(cls): + for finalizer in cls.finalizers: + finalizer() + + def test_resource_filename_rewrites_on_change(self): + """ + If a previous call to get_resource_filename has saved the file, but + the file has been subsequently mutated with different file of the + same size and modification time, it should not be overwritten on a + subsequent call to get_resource_filename. + """ + import mod + manager = pkg_resources.ResourceManager() + zp = pkg_resources.ZipProvider(mod) + filename = zp.get_resource_filename(manager, 'data.dat') + assert os.stat(filename).st_mtime == 1368379500 + f = open(filename, 'wb') + f.write('hello, world?') + f.close() + os.utime(filename, (1368379500, 1368379500)) + filename = zp.get_resource_filename(manager, 'data.dat') + f = open(filename) + assert f.read() == 'hello, world!' + manager.cleanup_resources() From f3dce599fca8023d441decd8c60896c44151b803 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 May 2013 13:52:43 -0400 Subject: [PATCH 3744/8469] Update CHANGELOG to reflect relevant issue. --HG-- branch : distribute extra : rebase_source : 785fddb50677fe7779949089e3b090891c3c5bd1 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5d4c13bcc2..377dc8a501 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ CHANGES 0.6.39 ------ -* Issue ####: Resources extracted from a zip egg to the file system now also +* Issue #375: Resources extracted from a zip egg to the file system now also check the contents of the file against the zip contents during each invocation of get_resource_filename. From b1bf410e4e9a180ba5b24efcaee6d5f021e4ee5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 15:44:04 -0400 Subject: [PATCH 3745/8469] Update changelog --HG-- branch : distribute --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index dadd0c7777..eb3e56e1b7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ CHANGES ------ * External links finder no longer yields duplicate links. +* Issue #337: Moved site.py to setuptools/site-patch.py (graft of very old + patch from setuptools trunk which inspired PR #31). ------ 0.6.41 From 62e96b0e72c19c087c9de388d6c8897710a3e080 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 15:53:45 -0400 Subject: [PATCH 3746/8469] Added tag 0.6.42 for changeset f30167716b65 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 78cdfc1411..a17ee8b8a2 100644 --- a/.hgtags +++ b/.hgtags @@ -51,3 +51,4 @@ f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 +f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 From 3116049570db091f6824a36e93925be75e9a7ab5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 16:04:19 -0400 Subject: [PATCH 3747/8469] Bumped to 0.6.43 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 9ab453564e..2792ed9c11 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.42.tar.gz - $ tar -xzvf distribute-0.6.42.tar.gz - $ cd distribute-0.6.42 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.43.tar.gz + $ tar -xzvf distribute-0.6.43.tar.gz + $ cd distribute-0.6.43 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 53345bbd80..cb93356056 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.42" +DEFAULT_VERSION = "0.6.43" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index bd9028b685..e4e982b052 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.42' +version = '0.6.43' # The full version, including alpha/beta/rc tags. -release = '0.6.42' +release = '0.6.43' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index b657d990eb..168b7512a0 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.42' +VERSION = '0.6.43' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index a9b7bb0f8f..3ed5b1fb68 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.42" +VERSION = "0.6.43" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 5f422f5a0c8377a03d1c19c419f61b057a51f783 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 18:17:10 -0400 Subject: [PATCH 3748/8469] Update code repository link. --HG-- branch : distribute --- README.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 2792ed9c11..f5cbf69066 100755 --- a/README.txt +++ b/README.txt @@ -224,5 +224,4 @@ Feedback and getting involved - Mailing list: http://mail.python.org/mailman/listinfo/distutils-sig - Issue tracker: http://bitbucket.org/tarek/distribute/issues/ -- Code Repository: http://bitbucket.org/tarek/distribute - +- Code Repository: http://bitbucket.org/pypa/setuptools?at=distribute From 33c71453d52f1b35ecab54f281de8d7db13fd4ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 18:21:06 -0400 Subject: [PATCH 3749/8469] Update About the fork --HG-- branch : distribute --- README.txt | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/README.txt b/README.txt index f5cbf69066..cdfa9e09bb 100755 --- a/README.txt +++ b/README.txt @@ -11,35 +11,14 @@ Disclaimers About the fork ============== -`Distribute` is a fork of the `Setuptools` project. +`Distribute` is a now deprecated fork of the `Setuptools` project. -Distribute is intended to replace Setuptools as the standard method -for working with Python module distributions. +Distribute was intended to replace Setuptools as the standard method +for working with Python module distributions. The code has since been merged +back into the parent project as is being maintained by the community at large. -The fork has two goals: - -- Providing a backward compatible version to replace Setuptools - and make all distributions that depend on Setuptools work as - before, but with less bugs and behaviorial issues. - - This work is done in the 0.6.x series. - - Starting with version 0.6.2, Distribute supports Python 3. - Installing and using distribute for Python 3 code works exactly - the same as for Python 2 code, but Distribute also helps you to support - Python 2 and Python 3 from the same source code by letting you run 2to3 - on the code as a part of the build process, by setting the keyword parameter - ``use_2to3`` to True. See http://packages.python.org/distribute for more - information. - -- Refactoring the code, and releasing it in several distributions. - This work is being done in the 0.7.x series but not yet released. - -The roadmap is still evolving, and the page that is up-to-date is -located at : `http://packages.python.org/distribute/roadmap`. - -If you install `Distribute` and want to switch back for any reason to -`Setuptools`, get to the `Uninstallation instructions`_ section. +`Distribute` is now being maintained as a branch in the `Setuptools +repository `_. More documentation ================== From 2b48816298bc0ad2632a393560176ed151149aa5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 20:37:47 -0400 Subject: [PATCH 3750/8469] Restore Python 2.4 compatible syntax --HG-- branch : distribute --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0a3f9e05dc..b0388628cd 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -12,7 +12,7 @@ from md5 import md5 from fnmatch import translate -from .py24compat import wraps +from setuptools.py24compat import wraps EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$') HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I) From 85086e979f56c92ca096642b899c9df38ac133d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 20:38:46 -0400 Subject: [PATCH 3751/8469] Update changelog --HG-- branch : distribute --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index eb3e56e1b7..7d22ae1b73 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.43 +------ + +* Issue #378: Restore support for Python 2.4 Syntax (regression in 0.6.42). + ------ 0.6.42 ------ From e1febd2666c8bb27d03f9fce8624e2132a09e764 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 20:43:21 -0400 Subject: [PATCH 3752/8469] Added tag 0.6.43 for changeset 35086ee28673 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a17ee8b8a2..1090fe2c56 100644 --- a/.hgtags +++ b/.hgtags @@ -52,3 +52,4 @@ d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 +35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 From c12b3db412210faa982134dce22b5e6ddad31bba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 20:43:50 -0400 Subject: [PATCH 3753/8469] Bumped to 0.6.44 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index cdfa9e09bb..95eeb1c201 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.43.tar.gz - $ tar -xzvf distribute-0.6.43.tar.gz - $ cd distribute-0.6.43 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.44.tar.gz + $ tar -xzvf distribute-0.6.44.tar.gz + $ cd distribute-0.6.44 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index cb93356056..a2a066642e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.43" +DEFAULT_VERSION = "0.6.44" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index e4e982b052..02d1170769 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.43' +version = '0.6.44' # The full version, including alpha/beta/rc tags. -release = '0.6.43' +release = '0.6.44' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 168b7512a0..533c922eee 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.43' +VERSION = '0.6.44' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 3ed5b1fb68..69d814b79e 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.43" +VERSION = "0.6.44" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From bf1ea34fb467367688fa6ec5d77e98282020d82d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 11:16:50 -0400 Subject: [PATCH 3754/8469] Allow setuptools 0.7 to satisfy use_setuptools. --HG-- branch : distribute --- CHANGES.txt | 7 +++++++ distribute_setup.py | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7d22ae1b73..e18a534b41 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.44 +------ + +* ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to + satisfy use_setuptools. + ------ 0.6.43 ------ diff --git a/distribute_setup.py b/distribute_setup.py index a2a066642e..411c9c8c4f 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -144,6 +144,15 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: try: import pkg_resources + + # Setuptools 0.7b and later is a suitable (and preferable) + # substitute for any Distribute version. + try: + pkg_resources.require("setuptools>=0.7b") + return + except pkg_resources.DistributionNotFound: + pass + if not hasattr(pkg_resources, '_distribute'): if not no_fake: _fake_setuptools() From 8bf427c077bb87c02766129743a09cb333f0c8d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 11:19:36 -0400 Subject: [PATCH 3755/8469] Added tag 0.6.44 for changeset 73aa98aee6bb --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1090fe2c56..07e34faeb9 100644 --- a/.hgtags +++ b/.hgtags @@ -53,3 +53,4 @@ d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 +73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 From 4edd0409cb3a47e3ad8bd681cddfe9957d1e7da9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 11:20:05 -0400 Subject: [PATCH 3756/8469] Bumped to 0.6.45 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 95eeb1c201..d659d8949d 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.44.tar.gz - $ tar -xzvf distribute-0.6.44.tar.gz - $ cd distribute-0.6.44 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.45.tar.gz + $ tar -xzvf distribute-0.6.45.tar.gz + $ cd distribute-0.6.45 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 411c9c8c4f..a9c00982da 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.44" +DEFAULT_VERSION = "0.6.45" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 02d1170769..ff934d405c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.44' +version = '0.6.45' # The full version, including alpha/beta/rc tags. -release = '0.6.44' +release = '0.6.45' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 533c922eee..5b691c4cb1 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.44' +VERSION = '0.6.45' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 69d814b79e..c0136dd752 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.44" +VERSION = "0.6.45" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From b39c770280a208f82159352d2bdf086775b46d92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 28 May 2013 11:21:05 -0400 Subject: [PATCH 3757/8469] Run tests on 3.3 as well --HG-- branch : distribute --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cbc671e744..83efa5a439 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,6 @@ python: - 2.6 - 2.7 - 3.2 + - 3.3 # command to run tests script: python setup.py test From 8e4909b4686ce72b8cc7798927fd75b83f5bcbff Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 28 May 2013 16:35:30 -0700 Subject: [PATCH 3758/8469] Issue #18080: When building a C extension module on OS X, if the compiler is overriden with the CC environment variable, use the new compiler as the default for linking if LDSHARED is not also overriden. This restores Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0. --- sysconfig.py | 10 ++++++++-- tests/test_unixccompiler.py | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index b73503d296..b9479889f4 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -195,9 +195,15 @@ def customize_compiler(compiler): get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') - newcc = None if 'CC' in os.environ: - cc = os.environ['CC'] + newcc = os.environ['CC'] + if (sys.platform == 'darwin' + and 'LDSHARED' not in os.environ + and ldshared.startswith(cc)): + # On OS X, if CC is overridden, use that as the default + # command for LDSHARED as well + ldshared = newcc + ldshared[len(cc):] + cc = newcc if 'CXX' in os.environ: cxx = os.environ['CXX'] if 'LDSHARED' in os.environ: diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 1bff38e9ee..a5a63fdde3 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,7 +1,8 @@ """Tests for distutils.unixccompiler.""" +import os import sys import unittest -from test.support import run_unittest +from test.support import EnvironmentVarGuard, run_unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler @@ -94,7 +95,6 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo') - # non-GCC GNULD sys.platform = 'bar' def gcv(v): @@ -115,6 +115,38 @@ def gcv(v): sysconfig.get_config_var = gcv self.assertEqual(self.cc.rpath_foo(), '-R/foo') + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS X') + def test_osx_cc_overrides_ldshared(self): + # Issue #18080: + # ensure that setting CC env variable also changes default linker + def gcv(v): + if v == 'LDSHARED': + return 'gcc-4.2 -bundle -undefined dynamic_lookup ' + return 'gcc-4.2' + sysconfig.get_config_var = gcv + with EnvironmentVarGuard() as env: + env['CC'] = 'my_cc' + del env['LDSHARED'] + sysconfig.customize_compiler(self.cc) + self.assertEqual(self.cc.linker_so[0], 'my_cc') + + @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS X') + def test_osx_explict_ldshared(self): + # Issue #18080: + # ensure that setting CC env variable does not change + # explicit LDSHARED setting for linker + def gcv(v): + if v == 'LDSHARED': + return 'gcc-4.2 -bundle -undefined dynamic_lookup ' + return 'gcc-4.2' + sysconfig.get_config_var = gcv + with EnvironmentVarGuard() as env: + env['CC'] = 'my_cc' + env['LDSHARED'] = 'my_ld -bundle -dynamic' + sysconfig.customize_compiler(self.cc) + self.assertEqual(self.cc.linker_so[0], 'my_ld') + + def test_suite(): return unittest.makeSuite(UnixCCompilerTestCase) From 09b0b938b617e6b4f26a2cd1bf6c9e62ebbc6b57 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 May 2013 07:35:38 -0400 Subject: [PATCH 3759/8469] Catch VersionConflict in distribute_setup when checking for setuptools 0.7 (to allow upgrade from setuptools to distribute). Fixes #379 --HG-- branch : distribute --- CHANGES.txt | 7 +++++++ distribute_setup.py | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index e18a534b41..ac7f59d1a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.45 +------ + +* Issue #379: ``distribute_setup.py`` now traps VersionConflict as well, + restoring ability to upgrade from an older setuptools version. + ------ 0.6.44 ------ diff --git a/distribute_setup.py b/distribute_setup.py index a9c00982da..c67b752471 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -150,7 +150,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, try: pkg_resources.require("setuptools>=0.7b") return - except pkg_resources.DistributionNotFound: + except (pkg_resources.DistributionNotFound, + pkg_resources.VersionConflict): pass if not hasattr(pkg_resources, '_distribute'): From 75e163b3bfbef013cbb132727c43df738d028ffe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 May 2013 07:36:35 -0400 Subject: [PATCH 3760/8469] Added tag 0.6.45 for changeset ddca71ae5ceb --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 07e34faeb9..c4b0214539 100644 --- a/.hgtags +++ b/.hgtags @@ -54,3 +54,4 @@ ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 +ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 From 641eac6550896506fa939205f249bcfb8f057d57 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 May 2013 07:37:04 -0400 Subject: [PATCH 3761/8469] Bumped to 0.6.46 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index d659d8949d..dd763a5714 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.45.tar.gz - $ tar -xzvf distribute-0.6.45.tar.gz - $ cd distribute-0.6.45 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.46.tar.gz + $ tar -xzvf distribute-0.6.46.tar.gz + $ cd distribute-0.6.46 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index c67b752471..f7f465a8bf 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.45" +DEFAULT_VERSION = "0.6.46" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index ff934d405c..ba020915ca 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.45' +version = '0.6.46' # The full version, including alpha/beta/rc tags. -release = '0.6.45' +release = '0.6.46' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 5b691c4cb1..9e8764664f 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.45' +VERSION = '0.6.46' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index c0136dd752..bb21d8153f 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.45" +VERSION = "0.6.46" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From e2bc5bcf0766570d98e23ccbfaf77589491cc198 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 13 Jun 2013 20:57:26 -0400 Subject: [PATCH 3762/8469] Issue #18200: Update the stdlib (except tests) to use ModuleNotFoundError. --- archive_util.py | 2 +- ccompiler.py | 7 +++---- dist.py | 9 ++++----- msvccompiler.py | 4 ++-- util.py | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/archive_util.py b/archive_util.py index fcda08e20a..ba74045dc0 100644 --- a/archive_util.py +++ b/archive_util.py @@ -9,7 +9,7 @@ try: import zipfile -except ImportError: +except ModuleNotFoundError: zipfile = None diff --git a/ccompiler.py b/ccompiler.py index 911e84dd3b..bc183fc5d1 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,7 +3,7 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -import sys, os, re +import importlib, sys, os, re from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file @@ -1013,10 +1013,9 @@ def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0): try: module_name = "distutils." + module_name - __import__ (module_name) - module = sys.modules[module_name] + module = importlib.import_module(module_name) klass = vars(module)[class_name] - except ImportError: + except ModuleNotFoundError: raise DistutilsModuleError( "can't compile C/C++ code: unable to load module '%s'" % \ module_name) diff --git a/dist.py b/dist.py index f7fac08918..11f6ff8fbc 100644 --- a/dist.py +++ b/dist.py @@ -4,11 +4,11 @@ being built/installed/distributed. """ -import sys, os, re +import importlib, sys, os, re try: import warnings -except ImportError: +except ModuleNotFoundError: warnings = None from distutils.errors import * @@ -788,9 +788,8 @@ def get_command_class(self, command): klass_name = command try: - __import__ (module_name) - module = sys.modules[module_name] - except ImportError: + module = importlib.import_module(module_name) + except ModuleNotFoundError: continue try: diff --git a/msvccompiler.py b/msvccompiler.py index 8116656961..9a94b41ad6 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -28,7 +28,7 @@ RegEnumValue = winreg.EnumValue RegError = winreg.error -except ImportError: +except ModuleNotFoundError: try: import win32api import win32con @@ -39,7 +39,7 @@ RegEnumKey = win32api.RegEnumKey RegEnumValue = win32api.RegEnumValue RegError = win32api.error - except ImportError: + except ModuleNotFoundError: log.info("Warning: Can't read registry to find the " "necessary compiler setting\n" "Make sure that Python modules winreg, " diff --git a/util.py b/util.py index a2f9544519..e241f59b94 100644 --- a/util.py +++ b/util.py @@ -388,7 +388,7 @@ def byte_compile (py_files, try: from tempfile import mkstemp (script_fd, script_name) = mkstemp(".py") - except ImportError: + except ModuleNotFoundError: from tempfile import mktemp (script_fd, script_name) = None, mktemp(".py") log.info("writing byte-compilation script '%s'", script_name) From dc3634843234941af85a87b89458982f131e56a2 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 15 Jun 2013 12:59:53 -0400 Subject: [PATCH 3763/8469] Issue #17177: Stop using imp in distutils --- command/build_py.py | 10 +++++----- command/install_lib.py | 6 +++--- tests/test_bdist_dumb.py | 3 +-- tests/test_build_py.py | 10 ++++++---- tests/test_install.py | 4 ++-- tests/test_install_lib.py | 8 +++++--- util.py | 7 ++++--- 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 1371b3d6ff..677723f0b1 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -3,7 +3,7 @@ Implements the Distutils 'build_py' command.""" import os -import imp +import importlib.util import sys from glob import glob @@ -312,11 +312,11 @@ def get_outputs(self, include_bytecode=1): outputs.append(filename) if include_bytecode: if self.compile: - outputs.append(imp.cache_from_source(filename, - debug_override=True)) + outputs.append(importlib.util.cache_from_source( + filename, debug_override=True)) if self.optimize > 0: - outputs.append(imp.cache_from_source(filename, - debug_override=False)) + outputs.append(importlib.util.cache_from_source( + filename, debug_override=False)) outputs += [ os.path.join(build_dir, filename) diff --git a/command/install_lib.py b/command/install_lib.py index 15c08f1249..215813ba97 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -4,7 +4,7 @@ (install all Python modules).""" import os -import imp +import importlib.util import sys from distutils.core import Command @@ -165,10 +165,10 @@ def _bytecode_filenames(self, py_filenames): if ext != PYTHON_SOURCE_EXTENSION: continue if self.compile: - bytecode_files.append(imp.cache_from_source( + bytecode_files.append(importlib.util.cache_from_source( py_file, debug_override=True)) if self.optimize > 0: - bytecode_files.append(imp.cache_from_source( + bytecode_files.append(importlib.util.cache_from_source( py_file, debug_override=False)) return bytecode_files diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index 73061668ae..c8ccdc2383 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -1,7 +1,6 @@ """Tests for distutils.command.bdist_dumb.""" import os -import imp import sys import zipfile import unittest @@ -88,7 +87,7 @@ def test_simple_built(self): contents = sorted(os.path.basename(fn) for fn in contents) wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] if not sys.dont_write_bytecode: - wanted.append('foo.%s.pyc' % imp.get_tag()) + wanted.append('foo.%s.pyc' % sys.implementation.cache_tag) self.assertEqual(contents, sorted(wanted)) def test_suite(): diff --git a/tests/test_build_py.py b/tests/test_build_py.py index e416edd4a1..1b410c397d 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -2,7 +2,6 @@ import os import sys -import imp import unittest from distutils.command.build_py import build_py @@ -63,7 +62,8 @@ def test_package_data(self): self.assertFalse(os.path.exists(pycache_dir)) else: pyc_files = os.listdir(pycache_dir) - self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files) + self.assertIn("__init__.%s.pyc" % sys.implementation.cache_tag, + pyc_files) def test_empty_package_dir(self): # See bugs #1668596/#1720897 @@ -102,7 +102,8 @@ def test_byte_compile(self): found = os.listdir(cmd.build_lib) self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) - self.assertEqual(found, ['boiledeggs.%s.pyc' % imp.get_tag()]) + self.assertEqual(found, + ['boiledeggs.%s.pyc' % sys.implementation.cache_tag]) @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') def test_byte_compile_optimized(self): @@ -119,7 +120,8 @@ def test_byte_compile_optimized(self): found = os.listdir(cmd.build_lib) self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) - self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) + self.assertEqual(sorted(found), + ['boiledeggs.%s.pyo' % sys.implementation.cache_tag]) def test_dont_write_bytecode(self): # makes sure byte_compile is not used diff --git a/tests/test_install.py b/tests/test_install.py index e9b2642732..42bd269bf4 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,7 +1,6 @@ """Tests for distutils.command.install.""" import os -import imp import sys import unittest import site @@ -193,7 +192,8 @@ def test_record(self): f.close() found = [os.path.basename(line) for line in content.splitlines()] - expected = ['hello.py', 'hello.%s.pyc' % imp.get_tag(), 'sayhi', + expected = ['hello.py', 'hello.%s.pyc' % sys.implementation.cache_tag, + 'sayhi', 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 2bd4dc6e96..dbb3e9a67e 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -1,7 +1,7 @@ """Tests for distutils.command.install_data.""" import sys import os -import imp +import importlib.util import unittest from distutils.command.install_lib import install_lib @@ -44,8 +44,10 @@ def test_byte_compile(self): f = os.path.join(project_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - pyc_file = imp.cache_from_source('foo.py', debug_override=True) - pyo_file = imp.cache_from_source('foo.py', debug_override=False) + pyc_file = importlib.util.cache_from_source('foo.py', + debug_override=True) + pyo_file = importlib.util.cache_from_source('foo.py', + debug_override=False) self.assertTrue(os.path.exists(pyc_file)) self.assertTrue(os.path.exists(pyo_file)) diff --git a/util.py b/util.py index e241f59b94..257de68e18 100644 --- a/util.py +++ b/util.py @@ -6,7 +6,7 @@ import os import re -import imp +import importlib.util import sys import string from distutils.errors import DistutilsPlatformError @@ -453,9 +453,10 @@ def byte_compile (py_files, # cfile - byte-compiled file # dfile - purported source filename (same as 'file' by default) if optimize >= 0: - cfile = imp.cache_from_source(file, debug_override=not optimize) + cfile = importlib.util.cache_from_source( + file, debug_override=not optimize) else: - cfile = imp.cache_from_source(file) + cfile = importlib.util.cache_from_source(file) dfile = file if prefix: if file[:len(prefix)] != prefix: From be8320718ce02583374df5312502490f0bd7e8a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Jun 2013 23:11:41 -0400 Subject: [PATCH 3764/8469] Issue a UserWarning when the egg cache directory is likely to be vulnerable to security issues per #375. --HG-- branch : distribute --- pkg_resources.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index f8de449e87..50e4ce9b99 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -14,6 +14,8 @@ """ import sys, os, zipimport, time, re, imp, types +import warnings +import stat from urlparse import urlparse, urlunparse try: @@ -987,6 +989,7 @@ def get_cache_path(self, archive_name, names=()): extract, as it tracks the generated names for possible cleanup later. """ extract_path = self.extraction_path or get_default_cache() + self._warn_unsafe_extraction(extract_path) target_path = os.path.join(extract_path, archive_name+'-tmp', *names) try: _bypass_ensure_directory(target_path) @@ -996,6 +999,28 @@ def get_cache_path(self, archive_name, names=()): self.cached_files[target_path] = 1 return target_path + @staticmethod + def warn_unsafe_extraction_path(path): + """ + If the default extraction path is overridden and set to an insecure + location, such as /tmp, it opens up an opportunity for an attacker to + replace an extracted file with an unauthorized payload. Warn the user + if a known insecure location is used. + + See Distribute #375 for more details. + """ + if os.name == 'nt' and not path.startswith(os.environ['windir']): + # On Windows, permissions are generally restrictive by default + # and temp directories are not writable by other users, so + # bypass the warning. + return + mode = os.stat(path).st_mode + if mode & stat.S_IWOTH: + msg = ("%s is writable by others and vulnerable to attack when " + "used with get_resource_filename. Consider a more secure " + "location (set with .set_extraction_path or the " + "PYTHON_EGG_CACHE environment variable)." % path) + warnings.warn(msg, UserWarning) From 7e8c32eeda9db5eab02e30ee4528c8c8674e57c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Jun 2013 05:18:05 -0400 Subject: [PATCH 3765/8469] Also protect against group-writable files --HG-- branch : distribute --- pkg_resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 50e4ce9b99..69e53ebd0c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1015,8 +1015,9 @@ def warn_unsafe_extraction_path(path): # bypass the warning. return mode = os.stat(path).st_mode - if mode & stat.S_IWOTH: - msg = ("%s is writable by others and vulnerable to attack when " + if mode & stat.S_IWOTH or mode & stat.S_IWGRP: + msg = ("%s is writable by group/others and vulnerable to attack " + "when " "used with get_resource_filename. Consider a more secure " "location (set with .set_extraction_path or the " "PYTHON_EGG_CACHE environment variable)." % path) From 1ba56e8ddabe69b7837307f260a6b5e2f1c0b7c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:06:53 -0400 Subject: [PATCH 3766/8469] Update changelog --HG-- branch : distribute --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 377dc8a501..42a5c3afd3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +------ +0.6.46 +------ + +* Issue #375: Issue a warning if the PYTHON_EGG_CACHE or otherwise + customized egg cache location specifies a directory that's group- or + world-writable. + ------ 0.6.39 ------ From fc98145ffdb334dc7a8fe9f48fd2b5bf450114ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:26:25 -0400 Subject: [PATCH 3767/8469] Added tag 0.6.46 for changeset b57e5ba93476 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c4b0214539..43fe0a663a 100644 --- a/.hgtags +++ b/.hgtags @@ -55,3 +55,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 +b57e5ba934767dd498669b17551678081b3047b5 0.6.46 From 1ce8f258058dd17fe833968a90e75da6935109a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Jun 2013 10:27:08 -0400 Subject: [PATCH 3768/8469] Bumped to 0.6.47 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index dd763a5714..d40b77d589 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.46.tar.gz - $ tar -xzvf distribute-0.6.46.tar.gz - $ cd distribute-0.6.46 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.47.tar.gz + $ tar -xzvf distribute-0.6.47.tar.gz + $ cd distribute-0.6.47 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index f7f465a8bf..d23f0ebeb3 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.46" +DEFAULT_VERSION = "0.6.47" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index ba020915ca..e6abf19b27 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.46' +version = '0.6.47' # The full version, including alpha/beta/rc tags. -release = '0.6.46' +release = '0.6.47' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 9e8764664f..7d92e8d2d1 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.46' +VERSION = '0.6.47' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index bb21d8153f..60c33e9e7c 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.46" +VERSION = "0.6.47" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From a6f5642c86af003b1dce6299c2d9a941b2bd63f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:23:00 -0400 Subject: [PATCH 3769/8469] Correct AttributeError --HG-- branch : distribute --- CHANGES.txt | 7 +++++++ pkg_resources.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 42a5c3afd3..de4fa77c23 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.47 +------ + +* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in + 0.6.46. + ------ 0.6.46 ------ diff --git a/pkg_resources.py b/pkg_resources.py index 69e53ebd0c..844c145dc6 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -989,7 +989,7 @@ def get_cache_path(self, archive_name, names=()): extract, as it tracks the generated names for possible cleanup later. """ extract_path = self.extraction_path or get_default_cache() - self._warn_unsafe_extraction(extract_path) + self._warn_unsafe_extraction_path(extract_path) target_path = os.path.join(extract_path, archive_name+'-tmp', *names) try: _bypass_ensure_directory(target_path) From 57d70005210c8575ccc4fc844fa9e6e3510b020c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:27:08 -0400 Subject: [PATCH 3770/8469] Added tag 0.6.47 for changeset ee2c96701702 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 43fe0a663a..54dd2171ee 100644 --- a/.hgtags +++ b/.hgtags @@ -56,3 +56,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 +ee2c967017024197b38e39ced852808265387a4b 0.6.47 From a388b6922478b5d5048d1f7f1685da2ca16050c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 08:27:52 -0400 Subject: [PATCH 3771/8469] Bumped to 0.6.48 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index d40b77d589..e24506bb1e 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.47.tar.gz - $ tar -xzvf distribute-0.6.47.tar.gz - $ cd distribute-0.6.47 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.48.tar.gz + $ tar -xzvf distribute-0.6.48.tar.gz + $ cd distribute-0.6.48 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index d23f0ebeb3..112f9202b7 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.47" +DEFAULT_VERSION = "0.6.48" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index e6abf19b27..9c9a05f283 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.47' +version = '0.6.48' # The full version, including alpha/beta/rc tags. -release = '0.6.47' +release = '0.6.48' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 7d92e8d2d1..c258441179 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.47' +VERSION = '0.6.48' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 60c33e9e7c..929c73b90d 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.47" +VERSION = "0.6.48" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 96af0a8db149cc8c45c24c1a9066a71ab1935248 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:39:05 -0400 Subject: [PATCH 3772/8469] Correct AttributeError again (this time verified) --HG-- branch : distribute --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 844c145dc6..e0e0c1a361 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1000,7 +1000,7 @@ def get_cache_path(self, archive_name, names=()): return target_path @staticmethod - def warn_unsafe_extraction_path(path): + def _warn_unsafe_extraction_path(path): """ If the default extraction path is overridden and set to an insecure location, such as /tmp, it opens up an opportunity for an attacker to From e338182730c76368a994e90357f19dac809bbe00 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:41:42 -0400 Subject: [PATCH 3773/8469] Update changelog --HG-- branch : distribute --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3baf6e7a82..3efef119a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.48 +------ + +* Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in + 0.6.46 (redo). + ------ 0.6.47 ------ From 3bcd16d6a3f783e53fd8b083c5f9c655a08439fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:42:29 -0400 Subject: [PATCH 3774/8469] Added tag 0.6.48 for changeset cae9127e0534 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 54dd2171ee..c52e79dfed 100644 --- a/.hgtags +++ b/.hgtags @@ -57,3 +57,4 @@ f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 ee2c967017024197b38e39ced852808265387a4b 0.6.47 +cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 From 132ef1524599896fd97bc1477d86a339bcf51415 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Jul 2013 11:42:56 -0400 Subject: [PATCH 3775/8469] Bumped to 0.6.49 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index e24506bb1e..47b4241202 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.48.tar.gz - $ tar -xzvf distribute-0.6.48.tar.gz - $ cd distribute-0.6.48 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz + $ tar -xzvf distribute-0.6.49.tar.gz + $ cd distribute-0.6.49 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 112f9202b7..3553b2135e 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.48" +DEFAULT_VERSION = "0.6.49" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 9c9a05f283..4146dcaa59 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.48' +version = '0.6.49' # The full version, including alpha/beta/rc tags. -release = '0.6.48' +release = '0.6.49' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index c258441179..59ac9122e8 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.48' +VERSION = '0.6.49' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 929c73b90d..99291e883b 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.48" +VERSION = "0.6.49" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 32a9bf9e2e195447cb3d995e9d8778e8a8d5573e Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 4 Jul 2013 17:43:24 -0400 Subject: [PATCH 3776/8469] Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) --- archive_util.py | 2 +- ccompiler.py | 7 ++++--- dist.py | 9 +++++---- msvccompiler.py | 4 ++-- util.py | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/archive_util.py b/archive_util.py index ba74045dc0..fcda08e20a 100644 --- a/archive_util.py +++ b/archive_util.py @@ -9,7 +9,7 @@ try: import zipfile -except ModuleNotFoundError: +except ImportError: zipfile = None diff --git a/ccompiler.py b/ccompiler.py index bc183fc5d1..911e84dd3b 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -3,7 +3,7 @@ Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" -import importlib, sys, os, re +import sys, os, re from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file @@ -1013,9 +1013,10 @@ def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0): try: module_name = "distutils." + module_name - module = importlib.import_module(module_name) + __import__ (module_name) + module = sys.modules[module_name] klass = vars(module)[class_name] - except ModuleNotFoundError: + except ImportError: raise DistutilsModuleError( "can't compile C/C++ code: unable to load module '%s'" % \ module_name) diff --git a/dist.py b/dist.py index 11f6ff8fbc..f7fac08918 100644 --- a/dist.py +++ b/dist.py @@ -4,11 +4,11 @@ being built/installed/distributed. """ -import importlib, sys, os, re +import sys, os, re try: import warnings -except ModuleNotFoundError: +except ImportError: warnings = None from distutils.errors import * @@ -788,8 +788,9 @@ def get_command_class(self, command): klass_name = command try: - module = importlib.import_module(module_name) - except ModuleNotFoundError: + __import__ (module_name) + module = sys.modules[module_name] + except ImportError: continue try: diff --git a/msvccompiler.py b/msvccompiler.py index 9a94b41ad6..8116656961 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -28,7 +28,7 @@ RegEnumValue = winreg.EnumValue RegError = winreg.error -except ModuleNotFoundError: +except ImportError: try: import win32api import win32con @@ -39,7 +39,7 @@ RegEnumKey = win32api.RegEnumKey RegEnumValue = win32api.RegEnumValue RegError = win32api.error - except ModuleNotFoundError: + except ImportError: log.info("Warning: Can't read registry to find the " "necessary compiler setting\n" "Make sure that Python modules winreg, " diff --git a/util.py b/util.py index 257de68e18..efb3834cf5 100644 --- a/util.py +++ b/util.py @@ -388,7 +388,7 @@ def byte_compile (py_files, try: from tempfile import mkstemp (script_fd, script_name) = mkstemp(".py") - except ModuleNotFoundError: + except ImportError: from tempfile import mktemp (script_fd, script_name) = None, mktemp(".py") log.info("writing byte-compilation script '%s'", script_name) From 9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 21:09:03 -0400 Subject: [PATCH 3777/8469] Move warning check in `get_cache_path` to follow directory creation. Fixes #375. --HG-- branch : distribute --- CHANGES.txt | 8 ++++++++ pkg_resources.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index de4fa77c23..c22effd580 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +------ +next.. +------ + +* Move warning check in ``get_cache_path`` to follow the directory creation + to avoid errors when the cache path does not yet exist. Fixes the error + reported in #375. + ------ 0.6.47 ------ diff --git a/pkg_resources.py b/pkg_resources.py index e0e0c1a361..025a116247 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -989,13 +989,14 @@ def get_cache_path(self, archive_name, names=()): extract, as it tracks the generated names for possible cleanup later. """ extract_path = self.extraction_path or get_default_cache() - self._warn_unsafe_extraction_path(extract_path) target_path = os.path.join(extract_path, archive_name+'-tmp', *names) try: _bypass_ensure_directory(target_path) except: self.extraction_error() + self._warn_unsafe_extraction_path(extract_path) + self.cached_files[target_path] = 1 return target_path From c84f0b5a6ab113824d02c07849b2304b69fc0d5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 21:59:19 -0400 Subject: [PATCH 3778/8469] Added tag 0.6.49 for changeset f657df1f1ed4 --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c52e79dfed..c42cee41a9 100644 --- a/.hgtags +++ b/.hgtags @@ -58,3 +58,4 @@ ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 b57e5ba934767dd498669b17551678081b3047b5 0.6.46 ee2c967017024197b38e39ced852808265387a4b 0.6.47 cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 +f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 From d19a508528b019abbd41e88fa823677ae2f60560 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 22:00:07 -0400 Subject: [PATCH 3779/8469] Bumped to 0.6.50 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 47b4241202..0816138958 100755 --- a/README.txt +++ b/README.txt @@ -78,9 +78,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz - $ tar -xzvf distribute-0.6.49.tar.gz - $ cd distribute-0.6.49 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.50.tar.gz + $ tar -xzvf distribute-0.6.50.tar.gz + $ cd distribute-0.6.50 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 3553b2135e..647c2f8050 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.49" +DEFAULT_VERSION = "0.6.50" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index 4146dcaa59..4132312267 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.49' +version = '0.6.50' # The full version, including alpha/beta/rc tags. -release = '0.6.49' +release = '0.6.50' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 59ac9122e8..e40d5c40dd 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.49' +VERSION = '0.6.50' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 99291e883b..4541f83c68 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.49" +VERSION = "0.6.50" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From 814117ef8e4aa624fc497ce1c47040f68d07daba Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 3 Aug 2013 12:58:12 -0700 Subject: [PATCH 3780/8469] Bumped version to 3.4.0a1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 70a72b0967..f4076d7484 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0a0" +__version__ = "3.4.0a1" #--end constants-- From 82af3811567b3e375d91163f5a0a706b2ecdc9c3 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 17 Aug 2013 16:11:40 +0300 Subject: [PATCH 3781/8469] =?UTF-8?q?#18741:=20fix=20more=20typos.=20=20Pa?= =?UTF-8?q?tch=20by=20F=C3=A9vry=20Thibault.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/install.py | 2 +- command/sdist.py | 2 +- tests/test_build_clib.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/install.py b/command/install.py index 9b1c36af82..3c675d1182 100644 --- a/command/install.py +++ b/command/install.py @@ -545,7 +545,7 @@ def handle_extra_path(self): self.extra_dirs = extra_dirs def change_roots(self, *names): - """Change the install direcories pointed by name using root.""" + """Change the install directories pointed by name using root.""" for name in names: attr = "install_" + name setattr(self, attr, change_root(self.root, getattr(self, attr))) diff --git a/command/sdist.py b/command/sdist.py index a9429a4296..116f67ef9b 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -175,7 +175,7 @@ def get_file_list(self): depends on the user's options. """ # new behavior when using a template: - # the file list is recalculated everytime because + # the file list is recalculated every time because # even if MANIFEST.in or setup.py are not changed # the user might have added some files in the tree that # need to be included. diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 69bd2bf624..ee1c04162b 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -77,7 +77,7 @@ def compile(*args, **kw): cmd.compiler = FakeCompiler() - # build_libraries is also doing a bit of typoe checking + # build_libraries is also doing a bit of typo checking lib = [('name', {'sources': 'notvalid'})] self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib) From 76f628ffc58098870233d90e64cd26d2e135adcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 25 Aug 2013 13:09:07 -0400 Subject: [PATCH 3782/8469] Updated distribute documentation home page to indicate the deprecation and provide links to the newer hotness. Fixes Distribute #384. --HG-- branch : distribute --- docs/index.txt | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 5f3b945b20..f3aa78d107 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,16 +1,13 @@ Welcome to Distribute's documentation! ====================================== -`Distribute` is a fork of the `Setuptools` project. +`Distribute` is a deprecated fork of the `Setuptools` project. -Distribute is intended to replace Setuptools as the standard method for -working with Python module distributions. - -For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple: - -- Distribute is a drop-in replacement for Setuptools -- The code is actively maintained, and has over 10 commiters -- Distribute offers Python 3 support ! +Since the Setuptools 0.7 release, Setuptools and Distribute have merged +and Distribute is no longer being maintained. This documentation is kept here +for posterity, but all ongoing effort should reference the +`Setuptools project `_ and the +`Setuptools documentation `_. Documentation content: @@ -23,14 +20,3 @@ Documentation content: setuptools easy_install pkg_resources - - -.. image:: http://python-distribute.org/pip_distribute.png - -Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 - -Copy & paste:: - - curl -O http://python-distribute.org/distribute_setup.py - python distribute_setup.py - easy_install pip \ No newline at end of file From 6200cf0997fe3b832b4fda03a4a1cc0d6347c151 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 7 Sep 2013 23:42:07 +1200 Subject: [PATCH 3783/8469] Version number bump for Python 3.4.0a2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f4076d7484..3afd84fefb 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0a1" +__version__ = "3.4.0a2" #--end constants-- From d30e05735221377ec2823a2b2942375194753d35 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 28 Sep 2013 23:51:00 +0100 Subject: [PATCH 3784/8469] Version bump to 3.4.0a3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 3afd84fefb..cc18893517 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0a2" +__version__ = "3.4.0a3" #--end constants-- From 6e02dbc3db2e648c23ecbbafc81dff296e8cd262 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 29 Sep 2013 01:48:40 +0200 Subject: [PATCH 3785/8469] Issue #4366: Fix building extensions on all platforms when --enable-shared is used. --- command/build_ext.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 1ad0d5ff58..bc6a23f1b6 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -247,11 +247,10 @@ def finalize_options(self): # building python standard extensions self.library_dirs.append('.') - # for extensions under Linux or Solaris with a shared Python library, + # For building extensions with a shared Python library, # Python's library directory must be appended to library_dirs - sysconfig.get_config_var('Py_ENABLE_SHARED') - if (sys.platform.startswith(('linux', 'gnu', 'sunos')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): + # See Issues: #1600860, #4366 + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) From f67dd5be98be8295fb480eb9180b730f53b3e95d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 29 Sep 2013 11:13:27 -0400 Subject: [PATCH 3786/8469] condense two tests with the same name (closes #19114) --- tests/test_cmd.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 195045cc7b..cf5197c30f 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -34,6 +34,18 @@ def test_ensure_string_list(self): self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, 'not_string_list2') + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + self.assertEqual(cmd.option1, ['ok', 'dok']) + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, + 'option3') + + def test_make_file(self): cmd = self.cmd @@ -77,19 +89,6 @@ def test_ensure_string(self): cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') - def test_ensure_string_list(self): - cmd = self.cmd - cmd.option1 = 'ok,dok' - cmd.ensure_string_list('option1') - self.assertEqual(cmd.option1, ['ok', 'dok']) - - cmd.option2 = ['xxx', 'www'] - cmd.ensure_string_list('option2') - - cmd.option3 = ['ok', 2] - self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, - 'option3') - def test_ensure_filename(self): cmd = self.cmd cmd.option1 = __file__ From 5cc44b40db683dc8402c77d5c7c13e726a4f7dec Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 30 Sep 2013 22:28:10 +0200 Subject: [PATCH 3787/8469] Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except when necessary. Patch by Oscar Benjamin. --- cygwinccompiler.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 0bdd539c37..e0074a18f3 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -48,7 +48,7 @@ import os import sys import copy -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, check_output import re from distutils.ccompiler import gen_preprocess_options, gen_lib_options @@ -294,13 +294,18 @@ def __init__(self, verbose=0, dry_run=0, force=0): else: entry_point = '' - self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -mdll -O -Wall', - compiler_cxx='g++ -mno-cygwin -O -Wall', - linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin %s %s' - % (self.linker_dll, shared_option, - entry_point)) + if self.gcc_version < '4' or is_cygwingcc(): + no_cygwin = ' -mno-cygwin' + else: + no_cygwin = '' + + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, + shared_option, entry_point)) # Maybe we should also append -mthreads, but then the finished # dlls need another dll (mingwm10.dll see Mingw32 docs) # (-mthreads: Support thread-safe exception handling on `Mingw32') @@ -393,3 +398,8 @@ def get_versions(): """ commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version'] return tuple([_find_exe_version(cmd) for cmd in commands]) + +def is_cygwingcc(): + '''Try to determine if the gcc that would be used is from cygwin.''' + out_string = check_output(['gcc', '-dumpmachine']) + return out_string.strip().endswith(b'cygwin') From 1c073f36e3b5850a448d65d90c383a92ddce83ff Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 20 Oct 2013 02:01:29 -0700 Subject: [PATCH 3788/8469] Version bump for 3.4.0a4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index cc18893517..355542edd0 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0a3" +__version__ = "3.4.0a4" #--end constants-- From 6302a7c47d5c17bd2b2b51e4e604e2c3dc9378c9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 27 Oct 2013 09:22:59 +0100 Subject: [PATCH 3789/8469] Bump to 3.3.3rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 83d7cb7f4c..812d8f35dc 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.2" +__version__ = "3.3.3rc1" #--end constants-- From faefc5ec4eaf3fd5f73dd20e43be883326cdb4cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Oct 2013 22:26:46 -0400 Subject: [PATCH 3790/8469] Distribute maintenance discontinued --HG-- branch : distribute extra : close : 1 From bdb93d0d82c82df219172499741eb33e22da359e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 11:29:33 -0400 Subject: [PATCH 3791/8469] Issue #19286: Adding test demonstrating the failure when a directory is found in the package_data globs. --- tests/test_build_py.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index e416edd4a1..2ce9d4492d 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -121,6 +121,37 @@ def test_byte_compile_optimized(self): found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) + def test_dir_in_package_data(self): + """ + A directory in package_data should not be added to the filelist. + """ + # See bug 19286 + sources = self.mkdtemp() + pkg_dir = os.path.join(sources, "pkg") + + os.mkdir(pkg_dir) + open(os.path.join(pkg_dir, "__init__.py"), "w").close() + + docdir = os.path.join(pkg_dir, "doc") + os.mkdir(docdir) + open(os.path.join(docdir, "testfile"), "w").close() + + # create the directory that could be incorrectly detected as a file + os.mkdir(os.path.join(docdir, 'otherdir')) + + os.chdir(sources) + dist = Distribution({"packages": ["pkg"], + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data when data dir includes a dir") + def test_dont_write_bytecode(self): # makes sure byte_compile is not used dist = self.create_dist()[1] From 35249e2c9b4afa5baf6699573c3900e442f0910f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Nov 2013 11:07:35 -0400 Subject: [PATCH 3792/8469] Issue #19286: [distutils] Only match files in build_py.find_data_files. --- command/build_py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_py.py b/command/build_py.py index 1371b3d6ff..d48eb69900 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -127,7 +127,8 @@ def find_data_files(self, package, src_dir): # Each pattern has to be converted to a platform-specific path filelist = glob(os.path.join(src_dir, convert_path(pattern))) # Files that match more than one pattern are only added once - files.extend([fn for fn in filelist if fn not in files]) + files.extend([fn for fn in filelist if fn not in files + and os.path.isfile(fn)]) return files def build_package_data(self): From 1849010928400b19f07d68f68404665c50142463 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 12:36:17 -0500 Subject: [PATCH 3793/8469] Re-opening old wounds (branches) to further deprecate Distribute and remove docs. --HG-- branch : distribute --- docs/Makefile | 75 - docs/easy_install.txt | 1597 -------------------- docs/index.txt | 16 +- docs/pkg_resources.txt | 1955 ------------------------ docs/python3.txt | 121 -- docs/roadmap.txt | 86 -- docs/setuptools.txt | 3230 ---------------------------------------- docs/using.txt | 21 - 8 files changed, 2 insertions(+), 7099 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/easy_install.txt delete mode 100644 docs/pkg_resources.txt delete mode 100644 docs/python3.txt delete mode 100644 docs/roadmap.txt delete mode 100644 docs/setuptools.txt delete mode 100644 docs/using.txt diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 30bf10a930..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html web pickle htmlhelp latex changes linkcheck - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview over all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - -clean: - -rm -rf build/* - -html: - mkdir -p build/html build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html - @echo - @echo "Build finished. The HTML pages are in build/html." - -pickle: - mkdir -p build/pickle build/doctrees - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -web: pickle - -json: - mkdir -p build/json build/doctrees - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - mkdir -p build/htmlhelp build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in build/htmlhelp." - -latex: - mkdir -p build/latex build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex - @echo - @echo "Build finished; the LaTeX files are in build/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p build/changes build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes - @echo - @echo "The overview file is in build/changes." - -linkcheck: - mkdir -p build/linkcheck build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in build/linkcheck/output.txt." diff --git a/docs/easy_install.txt b/docs/easy_install.txt deleted file mode 100644 index 9b4fcfbb6e..0000000000 --- a/docs/easy_install.txt +++ /dev/null @@ -1,1597 +0,0 @@ -============ -Easy Install -============ - -Easy Install is a python module (``easy_install``) bundled with ``setuptools`` -that lets you automatically download, build, install, and manage Python -packages. - -Please share your experiences with us! If you encounter difficulty installing -a package, please contact us via the `distutils mailing list -`_. (Note: please DO NOT send -private email directly to the author of setuptools; it will be discarded. The -mailing list is a searchable archive of previously-asked and answered -questions; you should begin your research there before reporting something as a -bug -- and then do so via list discussion first.) - -(Also, if you'd like to learn about how you can use ``setuptools`` to make your -own packages work better with EasyInstall, or provide EasyInstall-like features -without requiring your users to use EasyInstall directly, you'll probably want -to check out the full `setuptools`_ documentation as well.) - -.. contents:: **Table of Contents** - - -Using "Easy Install" -==================== - - -.. _installation instructions: - -Installing "Easy Install" -------------------------- - -Please see the `setuptools PyPI page `_ -for download links and basic installation instructions for each of the -supported platforms. - -You will need at least Python 2.3.5, or if you are on a 64-bit platform, Python -2.4. An ``easy_install`` script will be installed in the normal location for -Python scripts on your platform. - -Note that the instructions on the setuptools PyPI page assume that you are -are installling to Python's primary ``site-packages`` directory. If this is -not the case, you should consult the section below on `Custom Installation -Locations`_ before installing. (And, on Windows, you should not use the -``.exe`` installer when installing to an alternate location.) - -Note that ``easy_install`` normally works by downloading files from the -internet. If you are behind an NTLM-based firewall that prevents Python -programs from accessing the net directly, you may wish to first install and use -the `APS proxy server `_, which lets you get past such -firewalls in the same way that your web browser(s) do. - -(Alternately, if you do not wish easy_install to actually download anything, you -can restrict it from doing so with the ``--allow-hosts`` option; see the -sections on `restricting downloads with --allow-hosts`_ and `command-line -options`_ for more details.) - - -Troubleshooting -~~~~~~~~~~~~~~~ - -If EasyInstall/setuptools appears to install correctly, and you can run the -``easy_install`` command but it fails with an ``ImportError``, the most likely -cause is that you installed to a location other than ``site-packages``, -without taking any of the steps described in the `Custom Installation -Locations`_ section below. Please see that section and follow the steps to -make sure that your custom location will work correctly. Then re-install. - -Similarly, if you can run ``easy_install``, and it appears to be installing -packages, but then you can't import them, the most likely issue is that you -installed EasyInstall correctly but are using it to install packages to a -non-standard location that hasn't been properly prepared. Again, see the -section on `Custom Installation Locations`_ for more details. - - -Windows Notes -~~~~~~~~~~~~~ - -On Windows, an ``easy_install.exe`` launcher will also be installed, so that -you can just type ``easy_install`` as long as it's on your ``PATH``. If typing -``easy_install`` at the command prompt doesn't work, check to make sure your -``PATH`` includes the appropriate ``C:\\Python2X\\Scripts`` directory. On -most current versions of Windows, you can change the ``PATH`` by right-clicking -"My Computer", choosing "Properties" and selecting the "Advanced" tab, then -clicking the "Environment Variables" button. ``PATH`` will be in the "System -Variables" section, and you will need to exit and restart your command shell -(command.com, cmd.exe, bash, or other) for the change to take effect. Be sure -to add a ``;`` after the last item on ``PATH`` before adding the scripts -directory to it. - -Note that instead of changing your ``PATH`` to include the Python scripts -directory, you can also retarget the installation location for scripts so they -go on a directory that's already on the ``PATH``. For more information see the -sections below on `Command-Line Options`_ and `Configuration Files`_. You -can pass command line options (such as ``--script-dir``) to -``distribute_setup.py`` to control where ``easy_install.exe`` will be installed. - - - -Downloading and Installing a Package ------------------------------------- - -For basic use of ``easy_install``, you need only supply the filename or URL of -a source distribution or .egg file (`Python Egg`__). - -__ http://peak.telecommunity.com/DevCenter/PythonEggs - -**Example 1**. Install a package by name, searching PyPI for the latest -version, and automatically downloading, building, and installing it:: - - easy_install SQLObject - -**Example 2**. Install or upgrade a package by name and version by finding -links on a given "download page":: - - easy_install -f http://pythonpaste.org/package_index.html SQLObject - -**Example 3**. Download a source distribution from a specified URL, -automatically building and installing it:: - - easy_install http://example.com/path/to/MyPackage-1.2.3.tgz - -**Example 4**. Install an already-downloaded .egg file:: - - easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg - -**Example 5**. Upgrade an already-installed package to the latest version -listed on PyPI:: - - easy_install --upgrade PyProtocols - -**Example 6**. Install a source distribution that's already downloaded and -extracted in the current directory (New in 0.5a9):: - - easy_install . - -**Example 7**. (New in 0.6a1) Find a source distribution or Subversion -checkout URL for a package, and extract it or check it out to -``~/projects/sqlobject`` (the name will always be in all-lowercase), where it -can be examined or edited. (The package will not be installed, but it can -easily be installed with ``easy_install ~/projects/sqlobject``. See `Editing -and Viewing Source Packages`_ below for more info.):: - - easy_install --editable --build-directory ~/projects SQLObject - -**Example 7**. (New in 0.6.11) Install a distribution within your home dir:: - - easy_install --user SQLAlchemy - -Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils`` -"distribution" names), and package+version specifiers. In each case, it will -attempt to locate the latest available version that meets your criteria. - -When downloading or processing downloaded files, Easy Install recognizes -distutils source distribution files with extensions of .tgz, .tar, .tar.gz, -.tar.bz2, or .zip. And of course it handles already-built .egg -distributions as well as ``.win32.exe`` installers built using distutils. - -By default, packages are installed to the running Python installation's -``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir`` -option to specify an alternative directory, or specify an alternate location -using distutils configuration files. (See `Configuration Files`_, below.) - -By default, any scripts included with the package are installed to the running -Python installation's standard script installation location. However, if you -specify an installation directory via the command line or a config file, then -the default directory for installing scripts will be the same as the package -installation directory, to ensure that the script will have access to the -installed package. You can override this using the ``-s`` or ``--script-dir`` -option. - -Installed packages are added to an ``easy-install.pth`` file in the install -directory, so that Python will always use the most-recently-installed version -of the package. If you would like to be able to select which version to use at -runtime, you should use the ``-m`` or ``--multi-version`` option. - - -Upgrading a Package -------------------- - -You don't need to do anything special to upgrade a package: just install the -new version, either by requesting a specific version, e.g.:: - - easy_install "SomePackage==2.0" - -a version greater than the one you have now:: - - easy_install "SomePackage>2.0" - -using the upgrade flag, to find the latest available version on PyPI:: - - easy_install --upgrade SomePackage - -or by using a download page, direct download URL, or package filename:: - - easy_install -f http://example.com/downloads ExamplePackage - - easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg - - easy_install my_downloads/ExamplePackage-2.0.tgz - -If you're using ``-m`` or ``--multi-version`` , using the ``require()`` -function at runtime automatically selects the newest installed version of a -package that meets your version criteria. So, installing a newer version is -the only step needed to upgrade such packages. - -If you're installing to a directory on PYTHONPATH, or a configured "site" -directory (and not using ``-m``), installing a package automatically replaces -any previous version in the ``easy-install.pth`` file, so that Python will -import the most-recently installed version by default. So, again, installing -the newer version is the only upgrade step needed. - -If you haven't suppressed script installation (using ``--exclude-scripts`` or -``-x``), then the upgraded version's scripts will be installed, and they will -be automatically patched to ``require()`` the corresponding version of the -package, so that you can use them even if they are installed in multi-version -mode. - -``easy_install`` never actually deletes packages (unless you're installing a -package with the same name and version number as an existing package), so if -you want to get rid of older versions of a package, please see `Uninstalling -Packages`_, below. - - -Changing the Active Version ---------------------------- - -If you've upgraded a package, but need to revert to a previously-installed -version, you can do so like this:: - - easy_install PackageName==1.2.3 - -Where ``1.2.3`` is replaced by the exact version number you wish to switch to. -If a package matching the requested name and version is not already installed -in a directory on ``sys.path``, it will be located via PyPI and installed. - -If you'd like to switch to the latest installed version of ``PackageName``, you -can do so like this:: - - easy_install PackageName - -This will activate the latest installed version. (Note: if you have set any -``find_links`` via distutils configuration files, those download pages will be -checked for the latest available version of the package, and it will be -downloaded and installed if it is newer than your current version.) - -Note that changing the active version of a package will install the newly -active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is -specified. - - -Uninstalling Packages ---------------------- - -If you have replaced a package with another version, then you can just delete -the package(s) you don't need by deleting the PackageName-versioninfo.egg file -or directory (found in the installation directory). - -If you want to delete the currently installed version of a package (or all -versions of a package), you should first run:: - - easy_install -m PackageName - -This will ensure that Python doesn't continue to search for a package you're -planning to remove. After you've done this, you can safely delete the .egg -files or directories, along with any scripts you wish to remove. - - -Managing Scripts ----------------- - -Whenever you install, upgrade, or change versions of a package, EasyInstall -automatically installs the scripts for the selected package version, unless -you tell it not to with ``-x`` or ``--exclude-scripts``. If any scripts in -the script directory have the same name, they are overwritten. - -Thus, you do not normally need to manually delete scripts for older versions of -a package, unless the newer version of the package does not include a script -of the same name. However, if you are completely uninstalling a package, you -may wish to manually delete its scripts. - -EasyInstall's default behavior means that you can normally only run scripts -from one version of a package at a time. If you want to keep multiple versions -of a script available, however, you can simply use the ``--multi-version`` or -``-m`` option, and rename the scripts that EasyInstall creates. This works -because EasyInstall installs scripts as short code stubs that ``require()`` the -matching version of the package the script came from, so renaming the script -has no effect on what it executes. - -For example, suppose you want to use two versions of the ``rst2html`` tool -provided by the `docutils `_ package. You might -first install one version:: - - easy_install -m docutils==0.3.9 - -then rename the ``rst2html.py`` to ``r2h_039``, and install another version:: - - easy_install -m docutils==0.3.10 - -This will create another ``rst2html.py`` script, this one using docutils -version 0.3.10 instead of 0.3.9. You now have two scripts, each using a -different version of the package. (Notice that we used ``-m`` for both -installations, so that Python won't lock us out of using anything but the most -recently-installed version of the package.) - - - -Tips & Techniques ------------------ - - -Multiple Python Versions -~~~~~~~~~~~~~~~~~~~~~~~~ - -As of version 0.6a11, EasyInstall installs itself under two names: -``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version -used to install it. Thus, if you install EasyInstall for both Python 2.3 and -2.4, you can use the ``easy_install-2.3`` or ``easy_install-2.4`` scripts to -install packages for Python 2.3 or 2.4, respectively. - -Also, if you're working with Python version 2.4 or higher, you can run Python -with ``-m easy_install`` to run that particular Python version's -``easy_install`` command. - - -Restricting Downloads with ``--allow-hosts`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can use the ``--allow-hosts`` (``-H``) option to restrict what domains -EasyInstall will look for links and downloads on. ``--allow-hosts=None`` -prevents downloading altogether. You can also use wildcards, for example -to restrict downloading to hosts in your own intranet. See the section below -on `Command-Line Options`_ for more details on the ``--allow-hosts`` option. - -By default, there are no host restrictions in effect, but you can change this -default by editing the appropriate `configuration files`_ and adding: - -.. code-block:: ini - - [easy_install] - allow_hosts = *.myintranet.example.com,*.python.org - -The above example would then allow downloads only from hosts in the -``python.org`` and ``myintranet.example.com`` domains, unless overridden on the -command line. - - -Installing on Un-networked Machines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Just copy the eggs or source packages you need to a directory on the target -machine, then use the ``-f`` or ``--find-links`` option to specify that -directory's location. For example:: - - easy_install -H None -f somedir SomePackage - -will attempt to install SomePackage using only eggs and source packages found -in ``somedir`` and disallowing all remote access. You should of course make -sure you have all of SomePackage's dependencies available in somedir. - -If you have another machine of the same operating system and library versions -(or if the packages aren't platform-specific), you can create the directory of -eggs using a command like this:: - - easy_install -zmaxd somedir SomePackage - -This will tell EasyInstall to put zipped eggs or source packages for -SomePackage and all its dependencies into ``somedir``, without creating any -scripts or .pth files. You can then copy the contents of ``somedir`` to the -target machine. (``-z`` means zipped eggs, ``-m`` means multi-version, which -prevents .pth files from being used, ``-a`` means to copy all the eggs needed, -even if they're installed elsewhere on the machine, and ``-d`` indicates the -directory to place the eggs in.) - -You can also build the eggs from local development packages that were installed -with the ``setup.py develop`` command, by including the ``-l`` option, e.g.:: - - easy_install -zmaxld somedir SomePackage - -This will use locally-available source distributions to build the eggs. - - -Packaging Others' Projects As Eggs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Need to distribute a package that isn't published in egg form? You can use -EasyInstall to build eggs for a project. You'll want to use the ``--zip-ok``, -``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and -``-N``, respectively). Use ``-d`` or ``--install-dir`` to specify the location -where you'd like the eggs placed. By placing them in a directory that is -published to the web, you can then make the eggs available for download, either -in an intranet or to the internet at large. - -If someone distributes a package in the form of a single ``.py`` file, you can -wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL. -So, something like this:: - - easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo - -will install the package as an egg, and this:: - - easy_install -zmaxd. \ - -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo - -will create a ``.egg`` file in the current directory. - - -Creating your own Package Index -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In addition to local directories and the Python Package Index, EasyInstall can -find download links on most any web page whose URL is given to the ``-f`` -(``--find-links``) option. In the simplest case, you can simply have a web -page with links to eggs or Python source packages, even an automatically -generated directory listing (such as the Apache web server provides). - -If you are setting up an intranet site for package downloads, you may want to -configure the target machines to use your download site by default, adding -something like this to their `configuration files`_: - -.. code-block:: ini - - [easy_install] - find_links = http://mypackages.example.com/somedir/ - http://turbogears.org/download/ - http://peak.telecommunity.com/dist/ - -As you can see, you can list multiple URLs separated by whitespace, continuing -on multiple lines if necessary (as long as the subsequent lines are indented. - -If you are more ambitious, you can also create an entirely custom package index -or PyPI mirror. See the ``--index-url`` option under `Command-Line Options`_, -below, and also the section on `Package Index "API"`_. - - -Password-Protected Sites ------------------------- - -If a site you want to download from is password-protected using HTTP "Basic" -authentication, you can specify your credentials in the URL, like so:: - - http://some_userid:some_password@some.example.com/some_path/ - -You can do this with both index page URLs and direct download URLs. As long -as any HTML pages read by easy_install use *relative* links to point to the -downloads, the same user ID and password will be used to do the downloading. - - -Controlling Build Options -~~~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall respects standard distutils `Configuration Files`_, so you can use -them to configure build options for packages that it installs from source. For -example, if you are on Windows using the MinGW compiler, you can configure the -default compiler by putting something like this: - -.. code-block:: ini - - [build] - compiler = mingw32 - -into the appropriate distutils configuration file. In fact, since this is just -normal distutils configuration, it will affect any builds using that config -file, not just ones done by EasyInstall. For example, if you add those lines -to ``distutils.cfg`` in the ``distutils`` package directory, it will be the -default compiler for *all* packages you build. See `Configuration Files`_ -below for a list of the standard configuration file locations, and links to -more documentation on using distutils configuration files. - - -Editing and Viewing Source Packages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Sometimes a package's source distribution contains additional documentation, -examples, configuration files, etc., that are not part of its actual code. If -you want to be able to examine these files, you can use the ``--editable`` -option to EasyInstall, and EasyInstall will look for a source distribution -or Subversion URL for the package, then download and extract it or check it out -as a subdirectory of the ``--build-directory`` you specify. If you then wish -to install the package after editing or configuring it, you can do so by -rerunning EasyInstall with that directory as the target. - -Note that using ``--editable`` stops EasyInstall from actually building or -installing the package; it just finds, obtains, and possibly unpacks it for -you. This allows you to make changes to the package if necessary, and to -either install it in development mode using ``setup.py develop`` (if the -package uses setuptools, that is), or by running ``easy_install projectdir`` -(where ``projectdir`` is the subdirectory EasyInstall created for the -downloaded package. - -In order to use ``--editable`` (``-e`` for short), you *must* also supply a -``--build-directory`` (``-b`` for short). The project will be placed in a -subdirectory of the build directory. The subdirectory will have the same -name as the project itself, but in all-lowercase. If a file or directory of -that name already exists, EasyInstall will print an error message and exit. - -Also, when using ``--editable``, you cannot use URLs or filenames as arguments. -You *must* specify project names (and optional version requirements) so that -EasyInstall knows what directory name(s) to create. If you need to force -EasyInstall to use a particular URL or filename, you should specify it as a -``--find-links`` item (``-f`` for short), and then also specify -the project name, e.g.:: - - easy_install -eb ~/projects \ - -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \ - ctypes==0.9.6 - - -Dealing with Installation Conflicts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that -people using older versions of EasyInstall can consult it. As of version -0.6a11, installation conflicts are handled automatically without deleting the -old or system-installed packages, and without ignoring the issue. Instead, -eggs are automatically shifted to the front of ``sys.path`` using special -code added to the ``easy-install.pth`` file. So, if you are using version -0.6a11 or better of setuptools, you do not need to worry about conflicts, -and the following issues do not apply to you.) - -EasyInstall installs distributions in a "managed" way, such that each -distribution can be independently activated or deactivated on ``sys.path``. -However, packages that were not installed by EasyInstall are "unmanaged", -in that they usually live all in one directory and cannot be independently -activated or deactivated. - -As a result, if you are using EasyInstall to upgrade an existing package, or -to install a package with the same name as an existing package, EasyInstall -will warn you of the conflict. (This is an improvement over ``setup.py -install``, becuase the ``distutils`` just install new packages on top of old -ones, possibly combining two unrelated packages or leaving behind modules that -have been deleted in the newer version of the package.) - -By default, EasyInstall will stop the installation if it detects a conflict -between an existing, "unmanaged" package, and a module or package in any of -the distributions you're installing. It will display a list of all of the -existing files and directories that would need to be deleted for the new -package to be able to function correctly. You can then either delete these -conflicting files and directories yourself and re-run EasyInstall, or you can -just use the ``--delete-conflicting`` or ``--ignore-conflicts-at-my-risk`` -options, as described under `Command-Line Options`_, below. - -Of course, once you've replaced all of your existing "unmanaged" packages with -versions managed by EasyInstall, you won't have any more conflicts to worry -about! - - -Compressed Installation -~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall tries to install packages in zipped form, if it can. Zipping -packages can improve Python's overall import performance if you're not using -the ``--multi-version`` option, because Python processes zipfile entries on -``sys.path`` much faster than it does directories. - -As of version 0.5a9, EasyInstall analyzes packages to determine whether they -can be safely installed as a zipfile, and then acts on its analysis. (Previous -versions would not install a package as a zipfile unless you used the -``--zip-ok`` option.) - -The current analysis approach is fairly conservative; it currenly looks for: - - * Any use of the ``__file__`` or ``__path__`` variables (which should be - replaced with ``pkg_resources`` API calls) - - * Possible use of ``inspect`` functions that expect to manipulate source files - (e.g. ``inspect.getsource()``) - - * Top-level modules that might be scripts used with ``python -m`` (Python 2.4) - -If any of the above are found in the package being installed, EasyInstall will -assume that the package cannot be safely run from a zipfile, and unzip it to -a directory instead. You can override this analysis with the ``-zip-ok`` flag, -which will tell EasyInstall to install the package as a zipfile anyway. Or, -you can use the ``--always-unzip`` flag, in which case EasyInstall will always -unzip, even if its analysis says the package is safe to run as a zipfile. - -Normally, however, it is simplest to let EasyInstall handle the determination -of whether to zip or unzip, and only specify overrides when needed to work -around a problem. If you find you need to override EasyInstall's guesses, you -may want to contact the package author and the EasyInstall maintainers, so that -they can make appropriate changes in future versions. - -(Note: If a package uses ``setuptools`` in its setup script, the package author -has the option to declare the package safe or unsafe for zipped usage via the -``zip_safe`` argument to ``setup()``. If the package author makes such a -declaration, EasyInstall believes the package's author and does not perform its -own analysis. However, your command-line option, if any, will still override -the package author's choice.) - - -Reference Manual -================ - -Configuration Files -------------------- - -(New in 0.4a2) - -You may specify default options for EasyInstall using the standard -distutils configuration files, under the command heading ``easy_install``. -EasyInstall will look first for a ``setup.cfg`` file in the current directory, -then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes -and Windows, respectively), and finally a ``distutils.cfg`` file in the -``distutils`` package directory. Here's a simple example: - -.. code-block:: ini - - [easy_install] - - # set the default location to install packages - install_dir = /home/me/lib/python - - # Notice that indentation can be used to continue an option - # value; this is especially useful for the "--find-links" - # option, which tells easy_install to use download links on - # these pages before consulting PyPI: - # - find_links = http://sqlobject.org/ - http://peak.telecommunity.com/dist/ - -In addition to accepting configuration for its own options under -``[easy_install]``, EasyInstall also respects defaults specified for other -distutils commands. For example, if you don't set an ``install_dir`` for -``[easy_install]``, but *have* set an ``install_lib`` for the ``[install]`` -command, this will become EasyInstall's default installation directory. Thus, -if you are already using distutils configuration files to set default install -locations, build options, etc., EasyInstall will respect your existing settings -until and unless you override them explicitly in an ``[easy_install]`` section. - -For more information, see also the current Python documentation on the `use and -location of distutils configuration files `_. - -Notice that ``easy_install`` will use the ``setup.cfg`` from the current -working directory only if it was triggered from ``setup.py`` through the -``install_requires`` option. The standalone command will not use that file. - -Command-Line Options --------------------- - -``--zip-ok, -z`` - Install all packages as zip files, even if they are marked as unsafe for - running as a zipfile. This can be useful when EasyInstall's analysis - of a non-setuptools package is too conservative, but keep in mind that - the package may not work correctly. (Changed in 0.5a9; previously this - option was required in order for zipped installation to happen at all.) - -``--always-unzip, -Z`` - Don't install any packages as zip files, even if the packages are marked - as safe for running as a zipfile. This can be useful if a package does - something unsafe, but not in a way that EasyInstall can easily detect. - EasyInstall's default analysis is currently very conservative, however, so - you should only use this option if you've had problems with a particular - package, and *after* reporting the problem to the package's maintainer and - to the EasyInstall maintainers. - - (Note: the ``-z/-Z`` options only affect the installation of newly-built - or downloaded packages that are not already installed in the target - directory; if you want to convert an existing installed version from - zipped to unzipped or vice versa, you'll need to delete the existing - version first, and re-run EasyInstall.) - -``--multi-version, -m`` - "Multi-version" mode. Specifying this option prevents ``easy_install`` from - adding an ``easy-install.pth`` entry for the package being installed, and - if an entry for any version the package already exists, it will be removed - upon successful installation. In multi-version mode, no specific version of - the package is available for importing, unless you use - ``pkg_resources.require()`` to put it on ``sys.path``. This can be as - simple as:: - - from pkg_resources import require - require("SomePackage", "OtherPackage", "MyPackage") - - which will put the latest installed version of the specified packages on - ``sys.path`` for you. (For more advanced uses, like selecting specific - versions and enabling optional dependencies, see the ``pkg_resources`` API - doc.) - - Changed in 0.6a10: this option is no longer silently enabled when - installing to a non-PYTHONPATH, non-"site" directory. You must always - explicitly use this option if you want it to be active. - -``--upgrade, -U`` (New in 0.5a4) - By default, EasyInstall only searches online if a project/version - requirement can't be met by distributions already installed - on sys.path or the installation directory. However, if you supply the - ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package - index and ``--find-links`` URLs before selecting a version to install. In - this way, you can force EasyInstall to use the latest available version of - any package it installs (subject to any version requirements that might - exclude such later versions). - -``--install-dir=DIR, -d DIR`` - Set the installation directory. It is up to you to ensure that this - directory is on ``sys.path`` at runtime, and to use - ``pkg_resources.require()`` to enable the installed package(s) that you - need. - - (New in 0.4a2) If this option is not directly specified on the command line - or in a distutils configuration file, the distutils default installation - location is used. Normally, this would be the ``site-packages`` directory, - but if you are using distutils configuration files, setting things like - ``prefix`` or ``install_lib``, then those settings are taken into - account when computing the default installation directory, as is the - ``--prefix`` option. - -``--script-dir=DIR, -s DIR`` - Set the script installation directory. If you don't supply this option - (via the command line or a configuration file), but you *have* supplied - an ``--install-dir`` (via command line or config file), then this option - defaults to the same directory, so that the scripts will be able to find - their associated package installation. Otherwise, this setting defaults - to the location where the distutils would normally install scripts, taking - any distutils configuration file settings into account. - -``--exclude-scripts, -x`` - Don't install scripts. This is useful if you need to install multiple - versions of a package, but do not want to reset the version that will be - run by scripts that are already installed. - -``--user`` (New in 0.6.11) - Use the the user-site-packages as specified in :pep:`370` - instead of the global site-packages. - -``--always-copy, -a`` (New in 0.5a4) - Copy all needed distributions to the installation directory, even if they - are already present in a directory on sys.path. In older versions of - EasyInstall, this was the default behavior, but now you must explicitly - request it. By default, EasyInstall will no longer copy such distributions - from other sys.path directories to the installation directory, unless you - explicitly gave the distribution's filename on the command line. - - Note that as of 0.6a10, using this option excludes "system" and - "development" eggs from consideration because they can't be reliably - copied. This may cause EasyInstall to choose an older version of a package - than what you expected, or it may cause downloading and installation of a - fresh copy of something that's already installed. You will see warning - messages for any eggs that EasyInstall skips, before it falls back to an - older version or attempts to download a fresh copy. - -``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES`` - Scan the specified "download pages" or directories for direct links to eggs - or other distributions. Any existing file or directory names or direct - download URLs are immediately added to EasyInstall's search cache, and any - indirect URLs (ones that don't point to eggs or other recognized archive - formats) are added to a list of additional places to search for download - links. As soon as EasyInstall has to go online to find a package (either - because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was - used), the specified URLs will be downloaded and scanned for additional - direct links. - - Eggs and archives found by way of ``--find-links`` are only downloaded if - they are needed to meet a requirement specified on the command line; links - to unneeded packages are ignored. - - If all requested packages can be found using links on the specified - download pages, the Python Package Index will not be consulted unless you - also specified the ``--upgrade`` or ``-U`` option. - - (Note: if you want to refer to a local HTML file containing links, you must - use a ``file:`` URL, as filenames that do not refer to a directory, egg, or - archive are ignored.) - - You may specify multiple URLs or file/directory names with this option, - separated by whitespace. Note that on the command line, you will probably - have to surround the URL list with quotes, so that it is recognized as a - single option value. You can also specify URLs in a configuration file; - see `Configuration Files`_, above. - - Changed in 0.6a10: previously all URLs and directories passed to this - option were scanned as early as possible, but from 0.6a10 on, only - directories and direct archive links are scanned immediately; URLs are not - retrieved unless a package search was already going to go online due to a - package not being available locally, or due to the use of the ``--update`` - or ``-U`` option. - -``--no-find-links`` Blocks the addition of any link. (New in Distribute 0.6.11) - This is useful if you want to avoid adding links defined in a project - easy_install is installing (wether it's a requested project or a - dependency.). When used, ``--find-links`` is ignored. - -``--delete-conflicting, -D`` (Removed in 0.6a11) - (As of 0.6a11, this option is no longer necessary; please do not use it!) - - If you are replacing a package that was previously installed *without* - using EasyInstall, the old version may end up on ``sys.path`` before the - version being installed with EasyInstall. EasyInstall will normally abort - the installation of a package if it detects such a conflict, and ask you to - manually remove the conflicting files or directories. If you specify this - option, however, EasyInstall will attempt to delete the files or - directories itself, and then proceed with the installation. - -``--ignore-conflicts-at-my-risk`` (Removed in 0.6a11) - (As of 0.6a11, this option is no longer necessary; please do not use it!) - - Ignore conflicting packages and proceed with installation anyway, even - though it means the package probably won't work properly. If the - conflicting package is in a directory you can't write to, this may be your - only option, but you will need to take more invasive measures to get the - installed package to work, like manually adding it to ``PYTHONPATH`` or to - ``sys.path`` at runtime. - -``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) - Specifies the base URL of the Python Package Index. The default is - http://pypi.python.org/simple if not specified. When a package is requested - that is not locally available or linked from a ``--find-links`` download - page, the package index will be searched for download pages for the needed - package, and those download pages will be searched for links to download - an egg or source distribution. - -``--editable, -e`` (New in 0.6a1) - Only find and download source distributions for the specified projects, - unpacking them to subdirectories of the specified ``--build-directory``. - EasyInstall will not actually build or install the requested projects or - their dependencies; it will just find and extract them for you. See - `Editing and Viewing Source Packages`_ above for more details. - -``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1) - Set the directory used to build source packages. If a package is built - from a source distribution or checkout, it will be extracted to a - subdirectory of the specified directory. The subdirectory will have the - same name as the extracted distribution's project, but in all-lowercase. - If a file or directory of that name already exists in the given directory, - a warning will be printed to the console, and the build will take place in - a temporary directory instead. - - This option is most useful in combination with the ``--editable`` option, - which forces EasyInstall to *only* find and extract (but not build and - install) source distributions. See `Editing and Viewing Source Packages`_, - above, for more information. - -``--verbose, -v, --quiet, -q`` (New in 0.4a4) - Control the level of detail of EasyInstall's progress messages. The - default detail level is "info", which prints information only about - relatively time-consuming operations like running a setup script, unpacking - an archive, or retrieving a URL. Using ``-q`` or ``--quiet`` drops the - detail level to "warn", which will only display installation reports, - warnings, and errors. Using ``-v`` or ``--verbose`` increases the detail - level to include individual file-level operations, link analysis messages, - and distutils messages from any setup scripts that get run. If you include - the ``-v`` option more than once, the second and subsequent uses are passed - down to any setup scripts, increasing the verbosity of their reporting as - well. - -``--dry-run, -n`` (New in 0.4a4) - Don't actually install the package or scripts. This option is passed down - to any setup scripts run, so packages should not actually build either. - This does *not* skip downloading, nor does it skip extracting source - distributions to a temporary/build directory. - -``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4) - If you are installing from a source distribution, and are *not* using the - ``--zip-ok`` option, this option controls the optimization level for - compiling installed ``.py`` files to ``.pyo`` files. It does not affect - the compilation of modules contained in ``.egg`` files, only those in - ``.egg`` directories. The optimization level can be set to 0, 1, or 2; - the default is 0 (unless it's set under ``install`` or ``install_lib`` in - one of your distutils configuration files). - -``--record=FILENAME`` (New in 0.5a4) - Write a record of all installed files to FILENAME. This is basically the - same as the same option for the standard distutils "install" command, and - is included for compatibility with tools that expect to pass this option - to "setup.py install". - -``--site-dirs=DIRLIST, -S DIRLIST`` (New in 0.6a1) - Specify one or more custom "site" directories (separated by commas). - "Site" directories are directories where ``.pth`` files are processed, such - as the main Python ``site-packages`` directory. As of 0.6a10, EasyInstall - automatically detects whether a given directory processes ``.pth`` files - (or can be made to do so), so you should not normally need to use this - option. It is is now only necessary if you want to override EasyInstall's - judgment and force an installation directory to be treated as if it - supported ``.pth`` files. - -``--no-deps, -N`` (New in 0.6a6) - Don't install any dependencies. This is intended as a convenience for - tools that wrap eggs in a platform-specific packaging system. (We don't - recommend that you use it for anything else.) - -``--allow-hosts=PATTERNS, -H PATTERNS`` (New in 0.6a6) - Restrict downloading and spidering to hosts matching the specified glob - patterns. E.g. ``-H *.python.org`` restricts web access so that only - packages listed and downloadable from machines in the ``python.org`` - domain. The glob patterns must match the *entire* user/host/port section of - the target URL(s). For example, ``*.python.org`` will NOT accept a URL - like ``http://python.org/foo`` or ``http://www.python.org:8080/``. - Multiple patterns can be specified by separting them with commas. The - default pattern is ``*``, which matches anything. - - In general, this option is mainly useful for blocking EasyInstall's web - access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet - or other trusted site. EasyInstall will do the best it can to satisfy - dependencies given your host restrictions, but of course can fail if it - can't find suitable packages. EasyInstall displays all blocked URLs, so - that you can adjust your ``--allow-hosts`` setting if it is more strict - than you intended. Some sites may wish to define a restrictive default - setting for this option in their `configuration files`_, and then manually - override the setting on the command line as needed. - -``--prefix=DIR`` (New in 0.6a10) - Use the specified directory as a base for computing the default - installation and script directories. On Windows, the resulting default - directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``, - while on other platforms the defaults will be - ``prefix/lib/python2.X/site-packages`` (with the appropriate version - substituted) for libraries and ``prefix/bin`` for scripts. - - Note that the ``--prefix`` option only sets the *default* installation and - script directories, and does not override the ones set on the command line - or in a configuration file. - -``--local-snapshots-ok, -l`` (New in 0.6c6) - Normally, EasyInstall prefers to only install *released* versions of - projects, not in-development ones, because such projects may not - have a currently-valid version number. So, it usually only installs them - when their ``setup.py`` directory is explicitly passed on the command line. - - However, if this option is used, then any in-development projects that were - installed using the ``setup.py develop`` command, will be used to build - eggs, effectively upgrading the "in-development" project to a snapshot - release. Normally, this option is used only in conjunction with the - ``--always-copy`` option to create a distributable snapshot of every egg - needed to run an application. - - Note that if you use this option, you must make sure that there is a valid - version number (such as an SVN revision number tag) for any in-development - projects that may be used, as otherwise EasyInstall may not be able to tell - what version of the project is "newer" when future installations or - upgrades are attempted. - - -.. _non-root installation: - -Custom Installation Locations ------------------------------ - -By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, -and manages them using a custom ``.pth`` file in that same directory. - -Very often though, a user or developer wants ``easy_install`` to install and manage python packages -in an alternative location, usually for one of 3 reasons: - -1. They don't have access to write to the main Python site-packages directory. - -2. They want a user-specific stash of packages, that is not visible to other users. - -3. They want to isolate a set of packages to a specific python application, usually to minimize - the possibility of version conflicts. - -Historically, there have been many approaches to achieve custom installation. -The following section lists only the easiest and most relevant approaches [1]_. - -`Use the "--user" option`_ - -`Use the "--user" option and customize "PYTHONUSERBASE"`_ - -`Use "virtualenv"`_ - -.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6. - -.. _PEP-370: http://www.python.org/dev/peps/pep-0370/ - - -Use the "--user" option -~~~~~~~~~~~~~~~~~~~~~~~ -With Python 2.6 came the User scheme for installation, which means that all -python distributions support an alternative install location that is specific to a user [2]_ [3]_. -The Default location for each OS is explained in the python documentation -for the ``site.USER_BASE`` variable. This mode of installation can be turned on by -specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. -This approach serves the need to have a user-specific stash of packages. - -.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6. -.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. - -Use the "--user" option and customize "PYTHONUSERBASE" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment -variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific -application, simply set the OS environment of that application to a specific value of -``PYTHONUSERBASE``, that contains just those packages. - -Use "virtualenv" -~~~~~~~~~~~~~~~~ -"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby -creating an isolated location to intall packages. The evolution of "virtualenv" started before the existence -of the User installation scheme. "virtualenv" provides a version of ``easy_install`` that is -scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features -that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages. - -Please refer to the `virtualenv`_ documentation for more details. - -.. _virtualenv: http://pypi.python.org/pypi/virtualenv - - - -Package Index "API" -------------------- - -Custom package indexes (and PyPI) must follow the following rules for -EasyInstall to be able to look up and download packages: - -1. Except where stated otherwise, "pages" are HTML or XHTML, and "links" - refer to ``href`` attributes. - -2. Individual project version pages' URLs must be of the form - ``base/projectname/version``, where ``base`` is the package index's base URL. - -3. Omitting the ``/version`` part of a project page's URL (but keeping the - trailing ``/``) should result in a page that is either: - - a) The single active version of that project, as though the version had been - explicitly included, OR - - b) A page with links to all of the active version pages for that project. - -4. Individual project version pages should contain direct links to downloadable - distributions where possible. It is explicitly permitted for a project's - "long_description" to include URLs, and these should be formatted as HTML - links by the package index, as EasyInstall does no special processing to - identify what parts of a page are index-specific and which are part of the - project's supplied description. - -5. Where available, MD5 information should be added to download URLs by - appending a fragment identifier of the form ``#md5=...``, where ``...`` is - the 32-character hex MD5 digest. EasyInstall will verify that the - downloaded file's MD5 digest matches the given value. - -6. Individual project version pages should identify any "homepage" or - "download" URLs using ``rel="homepage"`` and ``rel="download"`` attributes - on the HTML elements linking to those URLs. Use of these attributes will - cause EasyInstall to always follow the provided links, unless it can be - determined by inspection that they are downloadable distributions. If the - links are not to downloadable distributions, they are retrieved, and if they - are HTML, they are scanned for download links. They are *not* scanned for - additional "homepage" or "download" links, as these are only processed for - pages that are part of a package index site. - -7. The root URL of the index, if retrieved with a trailing ``/``, must result - in a page containing links to *all* projects' active version pages. - - (Note: This requirement is a workaround for the absence of case-insensitive - ``safe_name()`` matching of project names in URL paths. If project names are - matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar - mechanism), then it is not necessary to include this all-packages listing - page.) - -8. If a package index is accessed via a ``file://`` URL, then EasyInstall will - automatically use ``index.html`` files, if present, when trying to read a - directory with a trailing ``/`` on the URL. - - -Backward Compatibility -~~~~~~~~~~~~~~~~~~~~~~ - -Package indexes that wish to support setuptools versions prior to 0.6b4 should -also follow these rules: - -* Homepage and download links must be preceded with ``"Home Page"`` or - ``"Download URL"``, in addition to (or instead of) the ``rel=""`` - attributes on the actual links. These marker strings do not need to be - visible, or uncommented, however! For example, the following is a valid - homepage link that will work with any version of setuptools:: - -

  • - Home Page: - - http://sqlobject.org -
  • - - Even though the marker string is in an HTML comment, older versions of - EasyInstall will still "see" it and know that the link that follows is the - project's home page URL. - -* The pages described by paragraph 3(b) of the preceding section *must* - contain the string ``"Index of Packages"`` somewhere in their text. - This can be inside of an HTML comment, if desired, and it can be anywhere - in the page. (Note: this string MUST NOT appear on normal project pages, as - described in paragraphs 2 and 3(a)!) - -In addition, for compatibility with PyPI versions that do not use ``#md5=`` -fragment IDs, EasyInstall uses the following regular expression to match PyPI's -displayed MD5 info (broken onto two lines for readability):: - - ([^<]+)\n\s+\(md5\) - -History -======= - -0.6c9 - * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting - is flattened out in the resulting egg. (There was a case-sensitivity - problem that affected some distributions, notably ``pywin32``.) - - * Prevent ``--help-commands`` and other junk from showing under Python 2.5 - when running ``easy_install --help``. - - * Fixed GUI scripts sometimes not executing on Windows - - * Fixed not picking up dependency links from recursive dependencies. - - * Only make ``.py``, ``.dll`` and ``.so`` files executable when unpacking eggs - - * Changes for Jython compatibility - - * Improved error message when a requirement is also a directory name, but the - specified directory is not a source package. - - * Fixed ``--allow-hosts`` option blocking ``file:`` URLs - - * Fixed HTTP SVN detection failing when the page title included a project - name (e.g. on SourceForge-hosted SVN) - - * Fix Jython script installation to handle ``#!`` lines better when - ``sys.executable`` is a script. - - * Removed use of deprecated ``md5`` module if ``hashlib`` is available - - * Keep site directories (e.g. ``site-packages``) from being included in - ``.pth`` files. - -0.6c7 - * ``ftp:`` download URLs now work correctly. - - * The default ``--index-url`` is now ``http://pypi.python.org/simple``, to use - the Python Package Index's new simpler (and faster!) REST API. - -0.6c6 - * EasyInstall no longer aborts the installation process if a URL it wants to - retrieve can't be downloaded, unless the URL is an actual package download. - Instead, it issues a warning and tries to keep going. - - * Fixed distutils-style scripts originally built on Windows having their line - endings doubled when installed on any platform. - - * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects - installed using ``setup.py develop``. - - * Fixed not HTML-decoding URLs scraped from web pages - -0.6c5 - * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg - is installed unzipped. - -0.6c4 - * Added support for HTTP "Basic" authentication using ``http://user:pass@host`` - URLs. If a password-protected page contains links to the same host (and - protocol), those links will inherit the credentials used to access the - original page. - - * Removed all special support for Sourceforge mirrors, as Sourceforge's - mirror system now works well for non-browser downloads. - - * Fixed not recognizing ``win32.exe`` installers that included a custom - bitmap. - - * Fixed not allowing ``os.open()`` of paths outside the sandbox, even if they - are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as - is done by ``os.urandom()`` on some platforms). - - * Fixed a problem with ``.pth`` testing on Windows when ``sys.executable`` - has a space in it (e.g., the user installed Python to a ``Program Files`` - directory). - -0.6c3 - * You can once again use "python -m easy_install" with Python 2.4 and above. - - * Python 2.5 compatibility fixes added. - -0.6c2 - * Windows script wrappers now support quoted arguments and arguments - containing spaces. (Patch contributed by Jim Fulton.) - - * The ``ez_setup.py`` script now actually works when you put a setuptools - ``.egg`` alongside it for bootstrapping an offline machine. - - * A writable installation directory on ``sys.path`` is no longer required to - download and extract a source distribution using ``--editable``. - - * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable`` - contains non-ASCII characters, to prevent deprecation warnings about an - unspecified encoding when the script is run. - -0.6c1 - * EasyInstall now includes setuptools version information in the - ``User-Agent`` string sent to websites it visits. - -0.6b4 - * Fix creating Python wrappers for non-Python scripts - - * Fix ``ftp://`` directory listing URLs from causing a crash when used in the - "Home page" or "Download URL" slots on PyPI. - - * Fix ``sys.path_importer_cache`` not being updated when an existing zipfile - or directory is deleted/overwritten. - - * Fix not recognizing HTML 404 pages from package indexes. - - * Allow ``file://`` URLs to be used as a package index. URLs that refer to - directories will use an internally-generated directory listing if there is - no ``index.html`` file in the directory. - - * Allow external links in a package index to be specified using - ``rel="homepage"`` or ``rel="download"``, without needing the old - PyPI-specific visible markup. - - * Suppressed warning message about possibly-misspelled project name, if an egg - or link for that project name has already been seen. - -0.6b3 - * Fix local ``--find-links`` eggs not being copied except with - ``--always-copy``. - - * Fix sometimes not detecting local packages installed outside of "site" - directories. - - * Fix mysterious errors during initial ``setuptools`` install, caused by - ``ez_setup`` trying to run ``easy_install`` twice, due to a code fallthru - after deleting the egg from which it's running. - -0.6b2 - * Don't install or update a ``site.py`` patch when installing to a - ``PYTHONPATH`` directory with ``--multi-version``, unless an - ``easy-install.pth`` file is already in use there. - - * Construct ``.pth`` file paths in such a way that installing an egg whose - name begins with ``import`` doesn't cause a syntax error. - - * Fixed a bogus warning message that wasn't updated since the 0.5 versions. - -0.6b1 - * Better ambiguity management: accept ``#egg`` name/version even if processing - what appears to be a correctly-named distutils file, and ignore ``.egg`` - files with no ``-``, since valid Python ``.egg`` files always have a version - number (but Scheme eggs often don't). - - * Support ``file://`` links to directories in ``--find-links``, so that - easy_install can build packages from local source checkouts. - - * Added automatic retry for Sourceforge mirrors. The new download process is - to first just try dl.sourceforge.net, then randomly select mirror IPs and - remove ones that fail, until something works. The removed IPs stay removed - for the remainder of the run. - - * Ignore bdist_dumb distributions when looking at download URLs. - -0.6a11 - * Process ``dependency_links.txt`` if found in a distribution, by adding the - URLs to the list for scanning. - - * Use relative paths in ``.pth`` files when eggs are being installed to the - same directory as the ``.pth`` file. This maximizes portability of the - target directory when building applications that contain eggs. - - * Added ``easy_install-N.N`` script(s) for convenience when using multiple - Python versions. - - * Added automatic handling of installation conflicts. Eggs are now shifted to - the front of sys.path, in an order consistent with where they came from, - making EasyInstall seamlessly co-operate with system package managers. - - The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options - are now no longer necessary, and will generate warnings at the end of a - run if you use them. - - * Don't recursively traverse subdirectories given to ``--find-links``. - -0.6a10 - * Added exhaustive testing of the install directory, including a spawn test - for ``.pth`` file support, and directory writability/existence checks. This - should virtually eliminate the need to set or configure ``--site-dirs``. - - * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of - RTFM-ing. :) - - * Enhanced ``PYTHONPATH`` support so that you don't have to put any eggs on it - manually to make it work. ``--multi-version`` is no longer a silent - default; you must explicitly use it if installing to a non-PYTHONPATH, - non-"site" directory. - - * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``, - ``--install-dir``, and ``--script-dir`` options, whether on the command line - or in configuration files. - - * Improved SourceForge mirror processing to work faster and be less affected - by transient HTML changes made by SourceForge. - - * PyPI searches now use the exact spelling of requirements specified on the - command line or in a project's ``install_requires``. Previously, a - normalized form of the name was used, which could lead to unnecessary - full-index searches when a project's name had an underscore (``_``) in it. - - * EasyInstall can now download bare ``.py`` files and wrap them in an egg, - as long as you include an ``#egg=name-version`` suffix on the URL, or if - the ``.py`` file is listed as the "Download URL" on the project's PyPI page. - This allows third parties to "package" trivial Python modules just by - linking to them (e.g. from within their own PyPI page or download links - page). - - * The ``--always-copy`` option now skips "system" and "development" eggs since - they can't be reliably copied. Note that this may cause EasyInstall to - choose an older version of a package than what you expected, or it may cause - downloading and installation of a fresh version of what's already installed. - - * The ``--find-links`` option previously scanned all supplied URLs and - directories as early as possible, but now only directories and direct - archive links are scanned immediately. URLs are not retrieved unless a - package search was already going to go online due to a package not being - available locally, or due to the use of the ``--update`` or ``-U`` option. - - * Fixed the annoying ``--help-commands`` wart. - -0.6a9 - * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside - "baskets") when they weren't explicitly listed in the ``.pth`` file. - - * If more than one URL appears to describe the exact same distribution, prefer - the shortest one. This helps to avoid "table of contents" CGI URLs like the - ones on effbot.org. - - * Quote arguments to python.exe (including python's path) to avoid problems - when Python (or a script) is installed in a directory whose name contains - spaces on Windows. - - * Support full roundtrip translation of eggs to and from ``bdist_wininst`` - format. Running ``bdist_wininst`` on a setuptools-based package wraps the - egg in an .exe that will safely install it as an egg (i.e., with metadata - and entry-point wrapper scripts), and ``easy_install`` can turn the .exe - back into an ``.egg`` file or directory and install it as such. - -0.6a8 - * Update for changed SourceForge mirror format - - * Fixed not installing dependencies for some packages fetched via Subversion - - * Fixed dependency installation with ``--always-copy`` not using the same - dependency resolution procedure as other operations. - - * Fixed not fully removing temporary directories on Windows, if a Subversion - checkout left read-only files behind - - * Fixed some problems building extensions when Pyrex was installed, especially - with Python 2.4 and/or packages using SWIG. - -0.6a7 - * Fixed not being able to install Windows script wrappers using Python 2.3 - -0.6a6 - * Added support for "traditional" PYTHONPATH-based non-root installation, and - also the convenient ``virtual-python.py`` script, based on a contribution - by Ian Bicking. The setuptools egg now contains a hacked ``site`` module - that makes the PYTHONPATH-based approach work with .pth files, so that you - can get the full EasyInstall feature set on such installations. - - * Added ``--no-deps`` and ``--allow-hosts`` options. - - * Improved Windows ``.exe`` script wrappers so that the script can have the - same name as a module without confusing Python. - - * Changed dependency processing so that it's breadth-first, allowing a - depender's preferences to override those of a dependee, to prevent conflicts - when a lower version is acceptable to the dependee, but not the depender. - Also, ensure that currently installed/selected packages aren't given - precedence over ones desired by a package being installed, which could - cause conflict errors. - -0.6a3 - * Improved error message when trying to use old ways of running - ``easy_install``. Removed the ability to run via ``python -m`` or by - running ``easy_install.py``; ``easy_install`` is the command to run on all - supported platforms. - - * Improved wrapper script generation and runtime initialization so that a - VersionConflict doesn't occur if you later install a competing version of a - needed package as the default version of that package. - - * Fixed a problem parsing version numbers in ``#egg=`` links. - -0.6a2 - * EasyInstall can now install "console_scripts" defined by packages that use - ``setuptools`` and define appropriate entry points. On Windows, console - scripts get an ``.exe`` wrapper so you can just type their name. On other - platforms, the scripts are installed without a file extension. - - * Using ``python -m easy_install`` or running ``easy_install.py`` is now - DEPRECATED, since an ``easy_install`` wrapper is now available on all - platforms. - -0.6a1 - * EasyInstall now does MD5 validation of downloads from PyPI, or from any link - that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest. - - * EasyInstall now handles symlinks in target directories by removing the link, - rather than attempting to overwrite the link's destination. This makes it - easier to set up an alternate Python "home" directory (as described above in - the `Non-Root Installation`_ section). - - * Added support for handling MacOS platform information in ``.egg`` filenames, - based on a contribution by Kevin Dangoor. You may wish to delete and - reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", - because the format for this platform information has changed so that minor - OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a - previous OS version to become obsolete. - - * easy_install's dependency processing algorithms have changed. When using - ``--always-copy``, it now ensures that dependencies are copied too. When - not using ``--always-copy``, it tries to use a single resolution loop, - rather than recursing. - - * Fixed installing extra ``.pyc`` or ``.pyo`` files for scripts with ``.py`` - extensions. - - * Added ``--site-dirs`` option to allow adding custom "site" directories. - Made ``easy-install.pth`` work in platform-specific alternate site - directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). - - * If you manually delete the current version of a package, the next run of - EasyInstall against the target directory will now remove the stray entry - from the ``easy-install.pth`` file. - - * EasyInstall now recognizes URLs with a ``#egg=project_name`` fragment ID - as pointing to the named project's source checkout. Such URLs have a lower - match precedence than any other kind of distribution, so they'll only be - used if they have a higher version number than any other available - distribution, or if you use the ``--editable`` option. The ``#egg`` - fragment can contain a version if it's formatted as ``#egg=proj-ver``, - where ``proj`` is the project name, and ``ver`` is the version number. You - *must* use the format for these values that the ``bdist_egg`` command uses; - i.e., all non-alphanumeric runs must be condensed to single underscore - characters. - - * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_ - above for more info. Also, slightly changed the behavior of the - ``--build-directory`` option. - - * Fixed the setup script sandbox facility not recognizing certain paths as - valid on case-insensitive platforms. - -0.5a12 - * Fix ``python -m easy_install`` not working due to setuptools being installed - as a zipfile. Update safety scanner to check for modules that might be used - as ``python -m`` scripts. - - * Misc. fixes for win32.exe support, including changes to support Python 2.4's - changed ``bdist_wininst`` format. - -0.5a10 - * Put the ``easy_install`` module back in as a module, as it's needed for - ``python -m`` to run it! - - * Allow ``--find-links/-f`` to accept local directories or filenames as well - as URLs. - -0.5a9 - * EasyInstall now automatically detects when an "unmanaged" package or - module is going to be on ``sys.path`` ahead of a package you're installing, - thereby preventing the newer version from being imported. By default, it - will abort installation to alert you of the problem, but there are also - new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``) - available to change the default behavior. (Note: this new feature doesn't - take effect for egg files that were built with older ``setuptools`` - versions, because they lack the new metadata file required to implement it.) - - * The ``easy_install`` distutils command now uses ``DistutilsError`` as its - base error type for errors that should just issue a message to stderr and - exit the program without a traceback. - - * EasyInstall can now be given a path to a directory containing a setup - script, and it will attempt to build and install the package there. - - * EasyInstall now performs a safety analysis on module contents to determine - whether a package is likely to run in zipped form, and displays - information about what modules may be doing introspection that would break - when running as a zipfile. - - * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that - would ordinarily be considered safe to unzip, and changed the meaning of - ``--zip-ok/-z`` to "always leave everything zipped". - -0.5a8 - * There is now a separate documentation page for `setuptools`_; revision - history that's not specific to EasyInstall has been moved to that page. - - .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools - -0.5a5 - * Made ``easy_install`` a standard ``setuptools`` command, moving it from - the ``easy_install`` module to ``setuptools.command.easy_install``. Note - that if you were importing or extending it, you must now change your imports - accordingly. ``easy_install.py`` is still installed as a script, but not as - a module. - -0.5a4 - * Added ``--always-copy/-a`` option to always copy needed packages to the - installation directory, even if they're already present elsewhere on - sys.path. (In previous versions, this was the default behavior, but now - you must request it.) - - * Added ``--upgrade/-U`` option to force checking PyPI for latest available - version(s) of all packages requested by name and version, even if a matching - version is available locally. - - * Added automatic installation of dependencies declared by a distribution - being installed. These dependencies must be listed in the distribution's - ``EGG-INFO`` directory, so the distribution has to have declared its - dependencies by using setuptools. If a package has requirements it didn't - declare, you'll still have to deal with them yourself. (E.g., by asking - EasyInstall to find and install them.) - - * Added the ``--record`` option to ``easy_install`` for the benefit of tools - that run ``setup.py install --record=filename`` on behalf of another - packaging system.) - -0.5a3 - * Fixed not setting script permissions to allow execution. - - * Improved sandboxing so that setup scripts that want a temporary directory - (e.g. pychecker) can still run in the sandbox. - -0.5a2 - * Fix stupid stupid refactoring-at-the-last-minute typos. :( - -0.5a1 - * Added support for converting ``.win32.exe`` installers to eggs on the fly. - EasyInstall will now recognize such files by name and install them. - - * Fixed a problem with picking the "best" version to install (versions were - being sorted as strings, rather than as parsed values) - -0.4a4 - * Added support for the distutils "verbose/quiet" and "dry-run" options, as - well as the "optimize" flag. - - * Support downloading packages that were uploaded to PyPI (by scanning all - links on package pages, not just the homepage/download links). - -0.4a3 - * Add progress messages to the search/download process so that you can tell - what URLs it's reading to find download links. (Hopefully, this will help - people report out-of-date and broken links to package authors, and to tell - when they've asked for a package that doesn't exist.) - -0.4a2 - * Added support for installing scripts - - * Added support for setting options via distutils configuration files, and - using distutils' default options as a basis for EasyInstall's defaults. - - * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the - script installation directory option. - - * Use ``urllib2`` instead of ``urllib``, to allow use of ``https:`` URLs if - Python includes SSL support. - -0.4a1 - * Added ``--scan-url`` and ``--index-url`` options, to scan download pages - and search PyPI for needed packages. - -0.3a4 - * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single - URL installs, to avoid running the wrong setup.py. - -0.3a3 - * Added ``--build-directory=DIR/-b DIR`` option. - - * Added "installation report" that explains how to use 'require()' when doing - a multiversion install or alternate installation directory. - - * Added SourceForge mirror auto-select (Contributed by Ian Bicking) - - * Added "sandboxing" that stops a setup script from running if it attempts to - write to the filesystem outside of the build area - - * Added more workarounds for packages with quirky ``install_data`` hacks - -0.3a2 - * Added subversion download support for ``svn:`` and ``svn+`` URLs, as well as - automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking) - - * Misc. bug fixes - -0.3a1 - * Initial release. - - -Future Plans -============ - -* Additional utilities to list/remove/verify packages -* Signature checking? SSL? Ability to suppress PyPI search? -* Display byte progress meter when downloading distributions and long pages? -* Redirect stdout/stderr to log during run_setup? - diff --git a/docs/index.txt b/docs/index.txt index f3aa78d107..e075e433fe 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -4,19 +4,7 @@ Welcome to Distribute's documentation! `Distribute` is a deprecated fork of the `Setuptools` project. Since the Setuptools 0.7 release, Setuptools and Distribute have merged -and Distribute is no longer being maintained. This documentation is kept here -for posterity, but all ongoing effort should reference the +and Distribute is no longer being maintained. All ongoing effort should +reference the `Setuptools project `_ and the `Setuptools documentation `_. - -Documentation content: - -.. toctree:: - :maxdepth: 2 - - roadmap - python3 - using - setuptools - easy_install - pkg_resources diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt deleted file mode 100644 index 480f9547ce..0000000000 --- a/docs/pkg_resources.txt +++ /dev/null @@ -1,1955 +0,0 @@ -============================================================= -Package Discovery and Resource Access using ``pkg_resources`` -============================================================= - -The ``pkg_resources`` module distributed with ``setuptools`` provides an API -for Python libraries to access their resource files, and for extensible -applications and frameworks to automatically discover plugins. It also -provides runtime support for using C extensions that are inside zipfile-format -eggs, support for merging packages that have separately-distributed modules or -subpackages, and APIs for managing Python's current "working set" of active -packages. - - -.. contents:: **Table of Contents** - - --------- -Overview --------- - -Eggs are a distribution format for Python modules, similar in concept to Java's -"jars" or Ruby's "gems". They differ from previous Python distribution formats -in that they are importable (i.e. they can be added to ``sys.path``), and they -are *discoverable*, meaning that they carry metadata that unambiguously -identifies their contents and dependencies, and thus can be *automatically* -found and added to ``sys.path`` in response to simple requests of the form, -"get me everything I need to use docutils' PDF support". - -The ``pkg_resources`` module provides runtime facilities for finding, -introspecting, activating and using eggs and other "pluggable" distribution -formats. Because these are new concepts in Python (and not that well- -established in other languages either), it helps to have a few special terms -for talking about eggs and how they can be used: - -project - A library, framework, script, plugin, application, or collection of data - or other resources, or some combination thereof. Projects are assumed to - have "relatively unique" names, e.g. names registered with PyPI. - -release - A snapshot of a project at a particular point in time, denoted by a version - identifier. - -distribution - A file or files that represent a particular release. - -importable distribution - A file or directory that, if placed on ``sys.path``, allows Python to - import any modules contained within it. - -pluggable distribution - An importable distribution whose filename unambiguously identifies its - release (i.e. project and version), and whose contents unamabiguously - specify what releases of other projects will satisfy its runtime - requirements. - -extra - An "extra" is an optional feature of a release, that may impose additional - runtime requirements. For example, if docutils PDF support required a - PDF support library to be present, docutils could define its PDF support as - an "extra", and list what other project releases need to be available in - order to provide it. - -environment - A collection of distributions potentially available for importing, but not - necessarily active. More than one distribution (i.e. release version) for - a given project may be present in an environment. - -working set - A collection of distributions actually available for importing, as on - ``sys.path``. At most one distribution (release version) of a given - project may be present in a working set, as otherwise there would be - ambiguity as to what to import. - -eggs - Eggs are pluggable distributions in one of the three formats currently - supported by ``pkg_resources``. There are built eggs, development eggs, - and egg links. Built eggs are directories or zipfiles whose name ends - with ``.egg`` and follows the egg naming conventions, and contain an - ``EGG-INFO`` subdirectory (zipped or otherwise). Development eggs are - normal directories of Python code with one or more ``ProjectName.egg-info`` - subdirectories. And egg links are ``*.egg-link`` files that contain the - name of a built or development egg, to support symbolic linking on - platforms that do not have native symbolic links. - -(For more information about these terms and concepts, see also this -`architectural overview`_ of ``pkg_resources`` and Python Eggs in general.) - -.. _architectural overview: http://mail.python.org/pipermail/distutils-sig/2005-June/004652.html - - -.. ----------------- -.. Developer's Guide -.. ----------------- - -.. This section isn't written yet. Currently planned topics include - Accessing Resources - Finding and Activating Package Distributions - get_provider() - require() - WorkingSet - iter_distributions - Running Scripts - Configuration - Namespace Packages - Extensible Applications and Frameworks - Locating entry points - Activation listeners - Metadata access - Extended Discovery and Installation - Supporting Custom PEP 302 Implementations -.. For now, please check out the extensive `API Reference`_ below. - - -------------- -API Reference -------------- - -Namespace Package Support -========================= - -A namespace package is a package that only contains other packages and modules, -with no direct contents of its own. Such packages can be split across -multiple, separately-packaged distributions. Normally, you do not need to use -the namespace package APIs directly; instead you should supply the -``namespace_packages`` argument to ``setup()`` in your project's ``setup.py``. -See the `setuptools documentation on namespace packages`_ for more information. - -However, if for some reason you need to manipulate namespace packages or -directly alter ``sys.path`` at runtime, you may find these APIs useful: - -``declare_namespace(name)`` - Declare that the dotted package name `name` is a "namespace package" whose - contained packages and modules may be spread across multiple distributions. - The named package's ``__path__`` will be extended to include the - corresponding package in all distributions on ``sys.path`` that contain a - package of that name. (More precisely, if an importer's - ``find_module(name)`` returns a loader, then it will also be searched for - the package's contents.) Whenever a Distribution's ``activate()`` method - is invoked, it checks for the presence of namespace packages and updates - their ``__path__`` contents accordingly. - -Applications that manipulate namespace packages or directly alter ``sys.path`` -at runtime may also need to use this API function: - -``fixup_namespace_packages(path_item)`` - Declare that `path_item` is a newly added item on ``sys.path`` that may - need to be used to update existing namespace packages. Ordinarily, this is - called for you when an egg is automatically added to ``sys.path``, but if - your application modifies ``sys.path`` to include locations that may - contain portions of a namespace package, you will need to call this - function to ensure they are added to the existing namespace packages. - -Although by default ``pkg_resources`` only supports namespace packages for -filesystem and zip importers, you can extend its support to other "importers" -compatible with PEP 302 using the ``register_namespace_handler()`` function. -See the section below on `Supporting Custom Importers`_ for details. - -.. _setuptools documentation on namespace packages: http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages - - -``WorkingSet`` Objects -====================== - -The ``WorkingSet`` class provides access to a collection of "active" -distributions. In general, there is only one meaningful ``WorkingSet`` -instance: the one that represents the distributions that are currently active -on ``sys.path``. This global instance is available under the name -``working_set`` in the ``pkg_resources`` module. However, specialized -tools may wish to manipulate working sets that don't correspond to -``sys.path``, and therefore may wish to create other ``WorkingSet`` instances. - -It's important to note that the global ``working_set`` object is initialized -from ``sys.path`` when ``pkg_resources`` is first imported, but is only updated -if you do all future ``sys.path`` manipulation via ``pkg_resources`` APIs. If -you manually modify ``sys.path``, you must invoke the appropriate methods on -the ``working_set`` instance to keep it in sync. Unfortunately, Python does -not provide any way to detect arbitrary changes to a list object like -``sys.path``, so ``pkg_resources`` cannot automatically update the -``working_set`` based on changes to ``sys.path``. - -``WorkingSet(entries=None)`` - Create a ``WorkingSet`` from an iterable of path entries. If `entries` - is not supplied, it defaults to the value of ``sys.path`` at the time - the constructor is called. - - Note that you will not normally construct ``WorkingSet`` instances - yourself, but instead you will implicitly or explicitly use the global - ``working_set`` instance. For the most part, the ``pkg_resources`` API - is designed so that the ``working_set`` is used by default, such that you - don't have to explicitly refer to it most of the time. - - -Basic ``WorkingSet`` Methods ----------------------------- - -The following methods of ``WorkingSet`` objects are also available as module- -level functions in ``pkg_resources`` that apply to the default ``working_set`` -instance. Thus, you can use e.g. ``pkg_resources.require()`` as an -abbreviation for ``pkg_resources.working_set.require()``: - - -``require(*requirements)`` - Ensure that distributions matching `requirements` are activated - - `requirements` must be a string or a (possibly-nested) sequence - thereof, specifying the distributions and versions required. The - return value is a sequence of the distributions that needed to be - activated to fulfill the requirements; all relevant distributions are - included, even if they were already activated in this working set. - - For the syntax of requirement specifiers, see the section below on - `Requirements Parsing`_. - - In general, it should not be necessary for you to call this method - directly. It's intended more for use in quick-and-dirty scripting and - interactive interpreter hacking than for production use. If you're creating - an actual library or application, it's strongly recommended that you create - a "setup.py" script using ``setuptools``, and declare all your requirements - there. That way, tools like EasyInstall can automatically detect what - requirements your package has, and deal with them accordingly. - - Note that calling ``require('SomePackage')`` will not install - ``SomePackage`` if it isn't already present. If you need to do this, you - should use the ``resolve()`` method instead, which allows you to pass an - ``installer`` callback that will be invoked when a needed distribution - can't be found on the local machine. You can then have this callback - display a dialog, automatically download the needed distribution, or - whatever else is appropriate for your application. See the documentation - below on the ``resolve()`` method for more information, and also on the - ``obtain()`` method of ``Environment`` objects. - -``run_script(requires, script_name)`` - Locate distribution specified by `requires` and run its `script_name` - script. `requires` must be a string containing a requirement specifier. - (See `Requirements Parsing`_ below for the syntax.) - - The script, if found, will be executed in *the caller's globals*. That's - because this method is intended to be called from wrapper scripts that - act as a proxy for the "real" scripts in a distribution. A wrapper script - usually doesn't need to do anything but invoke this function with the - correct arguments. - - If you need more control over the script execution environment, you - probably want to use the ``run_script()`` method of a ``Distribution`` - object's `Metadata API`_ instead. - -``iter_entry_points(group, name=None)`` - Yield entry point objects from `group` matching `name` - - If `name` is None, yields all entry points in `group` from all - distributions in the working set, otherwise only ones matching both - `group` and `name` are yielded. Entry points are yielded from the active - distributions in the order that the distributions appear in the working - set. (For the global ``working_set``, this should be the same as the order - that they are listed in ``sys.path``.) Note that within the entry points - advertised by an individual distribution, there is no particular ordering. - - Please see the section below on `Entry Points`_ for more information. - - -``WorkingSet`` Methods and Attributes -------------------------------------- - -These methods are used to query or manipulate the contents of a specific -working set, so they must be explicitly invoked on a particular ``WorkingSet`` -instance: - -``add_entry(entry)`` - Add a path item to the ``entries``, finding any distributions on it. You - should use this when you add additional items to ``sys.path`` and you want - the global ``working_set`` to reflect the change. This method is also - called by the ``WorkingSet()`` constructor during initialization. - - This method uses ``find_distributions(entry,True)`` to find distributions - corresponding to the path entry, and then ``add()`` them. `entry` is - always appended to the ``entries`` attribute, even if it is already - present, however. (This is because ``sys.path`` can contain the same value - more than once, and the ``entries`` attribute should be able to reflect - this.) - -``__contains__(dist)`` - True if `dist` is active in this ``WorkingSet``. Note that only one - distribution for a given project can be active in a given ``WorkingSet``. - -``__iter__()`` - Yield distributions for non-duplicate projects in the working set. - The yield order is the order in which the items' path entries were - added to the working set. - -``find(req)`` - Find a distribution matching `req` (a ``Requirement`` instance). - If there is an active distribution for the requested project, this - returns it, as long as it meets the version requirement specified by - `req`. But, if there is an active distribution for the project and it - does *not* meet the `req` requirement, ``VersionConflict`` is raised. - If there is no active distribution for the requested project, ``None`` - is returned. - -``resolve(requirements, env=None, installer=None)`` - List all distributions needed to (recursively) meet `requirements` - - `requirements` must be a sequence of ``Requirement`` objects. `env`, - if supplied, should be an ``Environment`` instance. If - not supplied, an ``Environment`` is created from the working set's - ``entries``. `installer`, if supplied, will be invoked with each - requirement that cannot be met by an already-installed distribution; it - should return a ``Distribution`` or ``None``. (See the ``obtain()`` method - of `Environment Objects`_, below, for more information on the `installer` - argument.) - -``add(dist, entry=None)`` - Add `dist` to working set, associated with `entry` - - If `entry` is unspecified, it defaults to ``dist.location``. On exit from - this routine, `entry` is added to the end of the working set's ``.entries`` - (if it wasn't already present). - - `dist` is only added to the working set if it's for a project that - doesn't already have a distribution active in the set. If it's - successfully added, any callbacks registered with the ``subscribe()`` - method will be called. (See `Receiving Change Notifications`_, below.) - - Note: ``add()`` is automatically called for you by the ``require()`` - method, so you don't normally need to use this method directly. - -``entries`` - This attribute represents a "shadow" ``sys.path``, primarily useful for - debugging. If you are experiencing import problems, you should check - the global ``working_set`` object's ``entries`` against ``sys.path``, to - ensure that they match. If they do not, then some part of your program - is manipulating ``sys.path`` without updating the ``working_set`` - accordingly. IMPORTANT NOTE: do not directly manipulate this attribute! - Setting it equal to ``sys.path`` will not fix your problem, any more than - putting black tape over an "engine warning" light will fix your car! If - this attribute is out of sync with ``sys.path``, it's merely an *indicator* - of the problem, not the cause of it. - - -Receiving Change Notifications ------------------------------- - -Extensible applications and frameworks may need to receive notification when -a new distribution (such as a plug-in component) has been added to a working -set. This is what the ``subscribe()`` method and ``add_activation_listener()`` -function are for. - -``subscribe(callback)`` - Invoke ``callback(distribution)`` once for each active distribution that is - in the set now, or gets added later. Because the callback is invoked for - already-active distributions, you do not need to loop over the working set - yourself to deal with the existing items; just register the callback and - be prepared for the fact that it will be called immediately by this method. - - Note that callbacks *must not* allow exceptions to propagate, or they will - interfere with the operation of other callbacks and possibly result in an - inconsistent working set state. Callbacks should use a try/except block - to ignore, log, or otherwise process any errors, especially since the code - that caused the callback to be invoked is unlikely to be able to handle - the errors any better than the callback itself. - -``pkg_resources.add_activation_listener()`` is an alternate spelling of -``pkg_resources.working_set.subscribe()``. - - -Locating Plugins ----------------- - -Extensible applications will sometimes have a "plugin directory" or a set of -plugin directories, from which they want to load entry points or other -metadata. The ``find_plugins()`` method allows you to do this, by scanning an -environment for the newest version of each project that can be safely loaded -without conflicts or missing requirements. - -``find_plugins(plugin_env, full_env=None, fallback=True)`` - Scan `plugin_env` and identify which distributions could be added to this - working set without version conflicts or missing requirements. - - Example usage:: - - distributions, errors = working_set.find_plugins( - Environment(plugin_dirlist) - ) - map(working_set.add, distributions) # add plugins+libs to sys.path - print "Couldn't load", errors # display errors - - The `plugin_env` should be an ``Environment`` instance that contains only - distributions that are in the project's "plugin directory" or directories. - The `full_env`, if supplied, should be an ``Environment`` instance that - contains all currently-available distributions. - - If `full_env` is not supplied, one is created automatically from the - ``WorkingSet`` this method is called on, which will typically mean that - every directory on ``sys.path`` will be scanned for distributions. - - This method returns a 2-tuple: (`distributions`, `error_info`), where - `distributions` is a list of the distributions found in `plugin_env` that - were loadable, along with any other distributions that are needed to resolve - their dependencies. `error_info` is a dictionary mapping unloadable plugin - distributions to an exception instance describing the error that occurred. - Usually this will be a ``DistributionNotFound`` or ``VersionConflict`` - instance. - - Most applications will use this method mainly on the master ``working_set`` - instance in ``pkg_resources``, and then immediately add the returned - distributions to the working set so that they are available on sys.path. - This will make it possible to find any entry points, and allow any other - metadata tracking and hooks to be activated. - - The resolution algorithm used by ``find_plugins()`` is as follows. First, - the project names of the distributions present in `plugin_env` are sorted. - Then, each project's eggs are tried in descending version order (i.e., - newest version first). - - An attempt is made to resolve each egg's dependencies. If the attempt is - successful, the egg and its dependencies are added to the output list and to - a temporary copy of the working set. The resolution process continues with - the next project name, and no older eggs for that project are tried. - - If the resolution attempt fails, however, the error is added to the error - dictionary. If the `fallback` flag is true, the next older version of the - plugin is tried, until a working version is found. If false, the resolution - process continues with the next plugin project name. - - Some applications may have stricter fallback requirements than others. For - example, an application that has a database schema or persistent objects - may not be able to safely downgrade a version of a package. Others may want - to ensure that a new plugin configuration is either 100% good or else - revert to a known-good configuration. (That is, they may wish to revert to - a known configuration if the `error_info` return value is non-empty.) - - Note that this algorithm gives precedence to satisfying the dependencies of - alphabetically prior project names in case of version conflicts. If two - projects named "AaronsPlugin" and "ZekesPlugin" both need different versions - of "TomsLibrary", then "AaronsPlugin" will win and "ZekesPlugin" will be - disabled due to version conflict. - - -``Environment`` Objects -======================= - -An "environment" is a collection of ``Distribution`` objects, usually ones -that are present and potentially importable on the current platform. -``Environment`` objects are used by ``pkg_resources`` to index available -distributions during dependency resolution. - -``Environment(search_path=None, platform=get_supported_platform(), python=PY_MAJOR)`` - Create an environment snapshot by scanning `search_path` for distributions - compatible with `platform` and `python`. `search_path` should be a - sequence of strings such as might be used on ``sys.path``. If a - `search_path` isn't supplied, ``sys.path`` is used. - - `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. ``'2.4'``); - it defaults to the currently-running version. - - You may explicitly set `platform` (and/or `python`) to ``None`` if you - wish to include *all* distributions, not just those compatible with the - running platform or Python version. - - Note that `search_path` is scanned immediately for distributions, and the - resulting ``Environment`` is a snapshot of the found distributions. It - is not automatically updated if the system's state changes due to e.g. - installation or removal of distributions. - -``__getitem__(project_name)`` - Returns a list of distributions for the given project name, ordered - from newest to oldest version. (And highest to lowest format precedence - for distributions that contain the same version of the project.) If there - are no distributions for the project, returns an empty list. - -``__iter__()`` - Yield the unique project names of the distributions in this environment. - The yielded names are always in lower case. - -``add(dist)`` - Add `dist` to the environment if it matches the platform and python version - specified at creation time, and only if the distribution hasn't already - been added. (i.e., adding the same distribution more than once is a no-op.) - -``remove(dist)`` - Remove `dist` from the environment. - -``can_add(dist)`` - Is distribution `dist` acceptable for this environment? If it's not - compatible with the ``platform`` and ``python`` version values specified - when the environment was created, a false value is returned. - -``__add__(dist_or_env)`` (``+`` operator) - Add a distribution or environment to an ``Environment`` instance, returning - a *new* environment object that contains all the distributions previously - contained by both. The new environment will have a ``platform`` and - ``python`` of ``None``, meaning that it will not reject any distributions - from being added to it; it will simply accept whatever is added. If you - want the added items to be filtered for platform and Python version, or - you want to add them to the *same* environment instance, you should use - in-place addition (``+=``) instead. - -``__iadd__(dist_or_env)`` (``+=`` operator) - Add a distribution or environment to an ``Environment`` instance - *in-place*, updating the existing instance and returning it. The - ``platform`` and ``python`` filter attributes take effect, so distributions - in the source that do not have a suitable platform string or Python version - are silently ignored. - -``best_match(req, working_set, installer=None)`` - Find distribution best matching `req` and usable on `working_set` - - This calls the ``find(req)`` method of the `working_set` to see if a - suitable distribution is already active. (This may raise - ``VersionConflict`` if an unsuitable version of the project is already - active in the specified `working_set`.) If a suitable distribution isn't - active, this method returns the newest distribution in the environment - that meets the ``Requirement`` in `req`. If no suitable distribution is - found, and `installer` is supplied, then the result of calling - the environment's ``obtain(req, installer)`` method will be returned. - -``obtain(requirement, installer=None)`` - Obtain a distro that matches requirement (e.g. via download). In the - base ``Environment`` class, this routine just returns - ``installer(requirement)``, unless `installer` is None, in which case - None is returned instead. This method is a hook that allows subclasses - to attempt other ways of obtaining a distribution before falling back - to the `installer` argument. - -``scan(search_path=None)`` - Scan `search_path` for distributions usable on `platform` - - Any distributions found are added to the environment. `search_path` should - be a sequence of strings such as might be used on ``sys.path``. If not - supplied, ``sys.path`` is used. Only distributions conforming to - the platform/python version defined at initialization are added. This - method is a shortcut for using the ``find_distributions()`` function to - find the distributions from each item in `search_path`, and then calling - ``add()`` to add each one to the environment. - - -``Requirement`` Objects -======================= - -``Requirement`` objects express what versions of a project are suitable for -some purpose. These objects (or their string form) are used by various -``pkg_resources`` APIs in order to find distributions that a script or -distribution needs. - - -Requirements Parsing --------------------- - -``parse_requirements(s)`` - Yield ``Requirement`` objects for a string or iterable of lines. Each - requirement must start on a new line. See below for syntax. - -``Requirement.parse(s)`` - Create a ``Requirement`` object from a string or iterable of lines. A - ``ValueError`` is raised if the string or lines do not contain a valid - requirement specifier, or if they contain more than one specifier. (To - parse multiple specifiers from a string or iterable of strings, use - ``parse_requirements()`` instead.) - - The syntax of a requirement specifier can be defined in EBNF as follows:: - - requirement ::= project_name versionspec? extras? - versionspec ::= comparison version (',' comparison version)* - comparison ::= '<' | '<=' | '!=' | '==' | '>=' | '>' - extras ::= '[' extralist? ']' - extralist ::= identifier (',' identifier)* - project_name ::= identifier - identifier ::= [-A-Za-z0-9_]+ - version ::= [-A-Za-z0-9_.]+ - - Tokens can be separated by whitespace, and a requirement can be continued - over multiple lines using a backslash (``\\``). Line-end comments (using - ``#``) are also allowed. - - Some examples of valid requirement specifiers:: - - FooProject >= 1.2 - Fizzy [foo, bar] - PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1 - SomethingWhoseVersionIDontCareAbout - - The project name is the only required portion of a requirement string, and - if it's the only thing supplied, the requirement will accept any version - of that project. - - The "extras" in a requirement are used to request optional features of a - project, that may require additional project distributions in order to - function. For example, if the hypothetical "Report-O-Rama" project offered - optional PDF support, it might require an additional library in order to - provide that support. Thus, a project needing Report-O-Rama's PDF features - could use a requirement of ``Report-O-Rama[PDF]`` to request installation - or activation of both Report-O-Rama and any libraries it needs in order to - provide PDF support. For example, you could use:: - - easy_install.py Report-O-Rama[PDF] - - To install the necessary packages using the EasyInstall program, or call - ``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary - distributions to sys.path at runtime. - - -``Requirement`` Methods and Attributes --------------------------------------- - -``__contains__(dist_or_version)`` - Return true if `dist_or_version` fits the criteria for this requirement. - If `dist_or_version` is a ``Distribution`` object, its project name must - match the requirement's project name, and its version must meet the - requirement's version criteria. If `dist_or_version` is a string, it is - parsed using the ``parse_version()`` utility function. Otherwise, it is - assumed to be an already-parsed version. - - The ``Requirement`` object's version specifiers (``.specs``) are internally - sorted into ascending version order, and used to establish what ranges of - versions are acceptable. Adjacent redundant conditions are effectively - consolidated (e.g. ``">1, >2"`` produces the same results as ``">1"``, and - ``"<2,<3"`` produces the same results as``"<3"``). ``"!="`` versions are - excised from the ranges they fall within. The version being tested for - acceptability is then checked for membership in the resulting ranges. - (Note that providing conflicting conditions for the same version (e.g. - ``"<2,>=2"`` or ``"==2,!=2"``) is meaningless and may therefore produce - bizarre results when compared with actual version number(s).) - -``__eq__(other_requirement)`` - A requirement compares equal to another requirement if they have - case-insensitively equal project names, version specifiers, and "extras". - (The order that extras and version specifiers are in is also ignored.) - Equal requirements also have equal hashes, so that requirements can be - used in sets or as dictionary keys. - -``__str__()`` - The string form of a ``Requirement`` is a string that, if passed to - ``Requirement.parse()``, would return an equal ``Requirement`` object. - -``project_name`` - The name of the required project - -``key`` - An all-lowercase version of the ``project_name``, useful for comparison - or indexing. - -``extras`` - A tuple of names of "extras" that this requirement calls for. (These will - be all-lowercase and normalized using the ``safe_extra()`` parsing utility - function, so they may not exactly equal the extras the requirement was - created with.) - -``specs`` - A list of ``(op,version)`` tuples, sorted in ascending parsed-version - order. The `op` in each tuple is a comparison operator, represented as - a string. The `version` is the (unparsed) version number. The relative - order of tuples containing the same version numbers is undefined, since - having more than one operator for a given version is either redundant or - self-contradictory. - - -Entry Points -============ - -Entry points are a simple way for distributions to "advertise" Python objects -(such as functions or classes) for use by other distributions. Extensible -applications and frameworks can search for entry points with a particular name -or group, either from a specific distribution or from all active distributions -on sys.path, and then inspect or load the advertised objects at will. - -Entry points belong to "groups" which are named with a dotted name similar to -a Python package or module name. For example, the ``setuptools`` package uses -an entry point named ``distutils.commands`` in order to find commands defined -by distutils extensions. ``setuptools`` treats the names of entry points -defined in that group as the acceptable commands for a setup script. - -In a similar way, other packages can define their own entry point groups, -either using dynamic names within the group (like ``distutils.commands``), or -possibly using predefined names within the group. For example, a blogging -framework that offers various pre- or post-publishing hooks might define an -entry point group and look for entry points named "pre_process" and -"post_process" within that group. - -To advertise an entry point, a project needs to use ``setuptools`` and provide -an ``entry_points`` argument to ``setup()`` in its setup script, so that the -entry points will be included in the distribution's metadata. For more -details, see the ``setuptools`` documentation. (XXX link here to setuptools) - -Each project distribution can advertise at most one entry point of a given -name within the same entry point group. For example, a distutils extension -could advertise two different ``distutils.commands`` entry points, as long as -they had different names. However, there is nothing that prevents *different* -projects from advertising entry points of the same name in the same group. In -some cases, this is a desirable thing, since the application or framework that -uses the entry points may be calling them as hooks, or in some other way -combining them. It is up to the application or framework to decide what to do -if multiple distributions advertise an entry point; some possibilities include -using both entry points, displaying an error message, using the first one found -in sys.path order, etc. - - -Convenience API ---------------- - -In the following functions, the `dist` argument can be a ``Distribution`` -instance, a ``Requirement`` instance, or a string specifying a requirement -(i.e. project name, version, etc.). If the argument is a string or -``Requirement``, the specified distribution is located (and added to sys.path -if not already present). An error will be raised if a matching distribution is -not available. - -The `group` argument should be a string containing a dotted identifier, -identifying an entry point group. If you are defining an entry point group, -you should include some portion of your package's name in the group name so as -to avoid collision with other packages' entry point groups. - -``load_entry_point(dist, group, name)`` - Load the named entry point from the specified distribution, or raise - ``ImportError``. - -``get_entry_info(dist, group, name)`` - Return an ``EntryPoint`` object for the given `group` and `name` from - the specified distribution. Returns ``None`` if the distribution has not - advertised a matching entry point. - -``get_entry_map(dist, group=None)`` - Return the distribution's entry point map for `group`, or the full entry - map for the distribution. This function always returns a dictionary, - even if the distribution advertises no entry points. If `group` is given, - the dictionary maps entry point names to the corresponding ``EntryPoint`` - object. If `group` is None, the dictionary maps group names to - dictionaries that then map entry point names to the corresponding - ``EntryPoint`` instance in that group. - -``iter_entry_points(group, name=None)`` - Yield entry point objects from `group` matching `name`. - - If `name` is None, yields all entry points in `group` from all - distributions in the working set on sys.path, otherwise only ones matching - both `group` and `name` are yielded. Entry points are yielded from - the active distributions in the order that the distributions appear on - sys.path. (Within entry points for a particular distribution, however, - there is no particular ordering.) - - (This API is actually a method of the global ``working_set`` object; see - the section above on `Basic WorkingSet Methods`_ for more information.) - - -Creating and Parsing --------------------- - -``EntryPoint(name, module_name, attrs=(), extras=(), dist=None)`` - Create an ``EntryPoint`` instance. `name` is the entry point name. The - `module_name` is the (dotted) name of the module containing the advertised - object. `attrs` is an optional tuple of names to look up from the - module to obtain the advertised object. For example, an `attrs` of - ``("foo","bar")`` and a `module_name` of ``"baz"`` would mean that the - advertised object could be obtained by the following code:: - - import baz - advertised_object = baz.foo.bar - - The `extras` are an optional tuple of "extra feature" names that the - distribution needs in order to provide this entry point. When the - entry point is loaded, these extra features are looked up in the `dist` - argument to find out what other distributions may need to be activated - on sys.path; see the ``load()`` method for more details. The `extras` - argument is only meaningful if `dist` is specified. `dist` must be - a ``Distribution`` instance. - -``EntryPoint.parse(src, dist=None)`` (classmethod) - Parse a single entry point from string `src` - - Entry point syntax follows the form:: - - name = some.module:some.attr [extra1,extra2] - - The entry name and module name are required, but the ``:attrs`` and - ``[extras]`` parts are optional, as is the whitespace shown between - some of the items. The `dist` argument is passed through to the - ``EntryPoint()`` constructor, along with the other values parsed from - `src`. - -``EntryPoint.parse_group(group, lines, dist=None)`` (classmethod) - Parse `lines` (a string or sequence of lines) to create a dictionary - mapping entry point names to ``EntryPoint`` objects. ``ValueError`` is - raised if entry point names are duplicated, if `group` is not a valid - entry point group name, or if there are any syntax errors. (Note: the - `group` parameter is used only for validation and to create more - informative error messages.) If `dist` is provided, it will be used to - set the ``dist`` attribute of the created ``EntryPoint`` objects. - -``EntryPoint.parse_map(data, dist=None)`` (classmethod) - Parse `data` into a dictionary mapping group names to dictionaries mapping - entry point names to ``EntryPoint`` objects. If `data` is a dictionary, - then the keys are used as group names and the values are passed to - ``parse_group()`` as the `lines` argument. If `data` is a string or - sequence of lines, it is first split into .ini-style sections (using - the ``split_sections()`` utility function) and the section names are used - as group names. In either case, the `dist` argument is passed through to - ``parse_group()`` so that the entry points will be linked to the specified - distribution. - - -``EntryPoint`` Objects ----------------------- - -For simple introspection, ``EntryPoint`` objects have attributes that -correspond exactly to the constructor argument names: ``name``, -``module_name``, ``attrs``, ``extras``, and ``dist`` are all available. In -addition, the following methods are provided: - -``load(require=True, env=None, installer=None)`` - Load the entry point, returning the advertised Python object, or raise - ``ImportError`` if it cannot be obtained. If `require` is a true value, - then ``require(env, installer)`` is called before attempting the import. - -``require(env=None, installer=None)`` - Ensure that any "extras" needed by the entry point are available on - sys.path. ``UnknownExtra`` is raised if the ``EntryPoint`` has ``extras``, - but no ``dist``, or if the named extras are not defined by the - distribution. If `env` is supplied, it must be an ``Environment``, and it - will be used to search for needed distributions if they are not already - present on sys.path. If `installer` is supplied, it must be a callable - taking a ``Requirement`` instance and returning a matching importable - ``Distribution`` instance or None. - -``__str__()`` - The string form of an ``EntryPoint`` is a string that could be passed to - ``EntryPoint.parse()`` to produce an equivalent ``EntryPoint``. - - -``Distribution`` Objects -======================== - -``Distribution`` objects represent collections of Python code that may or may -not be importable, and may or may not have metadata and resources associated -with them. Their metadata may include information such as what other projects -the distribution depends on, what entry points the distribution advertises, and -so on. - - -Getting or Creating Distributions ---------------------------------- - -Most commonly, you'll obtain ``Distribution`` objects from a ``WorkingSet`` or -an ``Environment``. (See the sections above on `WorkingSet Objects`_ and -`Environment Objects`_, which are containers for active distributions and -available distributions, respectively.) You can also obtain ``Distribution`` -objects from one of these high-level APIs: - -``find_distributions(path_item, only=False)`` - Yield distributions accessible via `path_item`. If `only` is true, yield - only distributions whose ``location`` is equal to `path_item`. In other - words, if `only` is true, this yields any distributions that would be - importable if `path_item` were on ``sys.path``. If `only` is false, this - also yields distributions that are "in" or "under" `path_item`, but would - not be importable unless their locations were also added to ``sys.path``. - -``get_distribution(dist_spec)`` - Return a ``Distribution`` object for a given ``Requirement`` or string. - If `dist_spec` is already a ``Distribution`` instance, it is returned. - If it is a ``Requirement`` object or a string that can be parsed into one, - it is used to locate and activate a matching distribution, which is then - returned. - -However, if you're creating specialized tools for working with distributions, -or creating a new distribution format, you may also need to create -``Distribution`` objects directly, using one of the three constructors below. - -These constructors all take an optional `metadata` argument, which is used to -access any resources or metadata associated with the distribution. `metadata` -must be an object that implements the ``IResourceProvider`` interface, or None. -If it is None, an ``EmptyProvider`` is used instead. ``Distribution`` objects -implement both the `IResourceProvider`_ and `IMetadataProvider Methods`_ by -delegating them to the `metadata` object. - -``Distribution.from_location(location, basename, metadata=None, **kw)`` (classmethod) - Create a distribution for `location`, which must be a string such as a - URL, filename, or other string that might be used on ``sys.path``. - `basename` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``. - If `basename` ends with ``.egg``, then the project's name, version, python - version and platform are extracted from the filename and used to set those - properties of the created distribution. Any additional keyword arguments - are forwarded to the ``Distribution()`` constructor. - -``Distribution.from_filename(filename, metadata=None**kw)`` (classmethod) - Create a distribution by parsing a local filename. This is a shorter way - of saying ``Distribution.from_location(normalize_path(filename), - os.path.basename(filename), metadata)``. In other words, it creates a - distribution whose location is the normalize form of the filename, parsing - name and version information from the base portion of the filename. Any - additional keyword arguments are forwarded to the ``Distribution()`` - constructor. - -``Distribution(location,metadata,project_name,version,py_version,platform,precedence)`` - Create a distribution by setting its properties. All arguments are - optional and default to None, except for `py_version` (which defaults to - the current Python version) and `precedence` (which defaults to - ``EGG_DIST``; for more details see ``precedence`` under `Distribution - Attributes`_ below). Note that it's usually easier to use the - ``from_filename()`` or ``from_location()`` constructors than to specify - all these arguments individually. - - -``Distribution`` Attributes ---------------------------- - -location - A string indicating the distribution's location. For an importable - distribution, this is the string that would be added to ``sys.path`` to - make it actively importable. For non-importable distributions, this is - simply a filename, URL, or other way of locating the distribution. - -project_name - A string, naming the project that this distribution is for. Project names - are defined by a project's setup script, and they are used to identify - projects on PyPI. When a ``Distribution`` is constructed, the - `project_name` argument is passed through the ``safe_name()`` utility - function to filter out any unacceptable characters. - -key - ``dist.key`` is short for ``dist.project_name.lower()``. It's used for - case-insensitive comparison and indexing of distributions by project name. - -extras - A list of strings, giving the names of extra features defined by the - project's dependency list (the ``extras_require`` argument specified in - the project's setup script). - -version - A string denoting what release of the project this distribution contains. - When a ``Distribution`` is constructed, the `version` argument is passed - through the ``safe_version()`` utility function to filter out any - unacceptable characters. If no `version` is specified at construction - time, then attempting to access this attribute later will cause the - ``Distribution`` to try to discover its version by reading its ``PKG-INFO`` - metadata file. If ``PKG-INFO`` is unavailable or can't be parsed, - ``ValueError`` is raised. - -parsed_version - The ``parsed_version`` is a tuple representing a "parsed" form of the - distribution's ``version``. ``dist.parsed_version`` is a shortcut for - calling ``parse_version(dist.version)``. It is used to compare or sort - distributions by version. (See the `Parsing Utilities`_ section below for - more information on the ``parse_version()`` function.) Note that accessing - ``parsed_version`` may result in a ``ValueError`` if the ``Distribution`` - was constructed without a `version` and without `metadata` capable of - supplying the missing version info. - -py_version - The major/minor Python version the distribution supports, as a string. - For example, "2.3" or "2.4". The default is the current version of Python. - -platform - A string representing the platform the distribution is intended for, or - ``None`` if the distribution is "pure Python" and therefore cross-platform. - See `Platform Utilities`_ below for more information on platform strings. - -precedence - A distribution's ``precedence`` is used to determine the relative order of - two distributions that have the same ``project_name`` and - ``parsed_version``. The default precedence is ``pkg_resources.EGG_DIST``, - which is the highest (i.e. most preferred) precedence. The full list - of predefined precedences, from most preferred to least preferred, is: - ``EGG_DIST``, ``BINARY_DIST``, ``SOURCE_DIST``, ``CHECKOUT_DIST``, and - ``DEVELOP_DIST``. Normally, precedences other than ``EGG_DIST`` are used - only by the ``setuptools.package_index`` module, when sorting distributions - found in a package index to determine their suitability for installation. - "System" and "Development" eggs (i.e., ones that use the ``.egg-info`` - format), however, are automatically given a precedence of ``DEVELOP_DIST``. - - - -``Distribution`` Methods ------------------------- - -``activate(path=None)`` - Ensure distribution is importable on `path`. If `path` is None, - ``sys.path`` is used instead. This ensures that the distribution's - ``location`` is in the `path` list, and it also performs any necessary - namespace package fixups or declarations. (That is, if the distribution - contains namespace packages, this method ensures that they are declared, - and that the distribution's contents for those namespace packages are - merged with the contents provided by any other active distributions. See - the section above on `Namespace Package Support`_ for more information.) - - ``pkg_resources`` adds a notification callback to the global ``working_set`` - that ensures this method is called whenever a distribution is added to it. - Therefore, you should not normally need to explicitly call this method. - (Note that this means that namespace packages on ``sys.path`` are always - imported as soon as ``pkg_resources`` is, which is another reason why - namespace packages should not contain any code or import statements.) - -``as_requirement()`` - Return a ``Requirement`` instance that matches this distribution's project - name and version. - -``requires(extras=())`` - List the ``Requirement`` objects that specify this distribution's - dependencies. If `extras` is specified, it should be a sequence of names - of "extras" defined by the distribution, and the list returned will then - include any dependencies needed to support the named "extras". - -``clone(**kw)`` - Create a copy of the distribution. Any supplied keyword arguments override - the corresponding argument to the ``Distribution()`` constructor, allowing - you to change some of the copied distribution's attributes. - -``egg_name()`` - Return what this distribution's standard filename should be, not including - the ".egg" extension. For example, a distribution for project "Foo" - version 1.2 that runs on Python 2.3 for Windows would have an ``egg_name()`` - of ``Foo-1.2-py2.3-win32``. Any dashes in the name or version are - converted to underscores. (``Distribution.from_location()`` will convert - them back when parsing a ".egg" file name.) - -``__cmp__(other)``, ``__hash__()`` - Distribution objects are hashed and compared on the basis of their parsed - version and precedence, followed by their key (lowercase project name), - location, Python version, and platform. - -The following methods are used to access ``EntryPoint`` objects advertised -by the distribution. See the section above on `Entry Points`_ for more -detailed information about these operations: - -``get_entry_info(group, name)`` - Return the ``EntryPoint`` object for `group` and `name`, or None if no - such point is advertised by this distribution. - -``get_entry_map(group=None)`` - Return the entry point map for `group`. If `group` is None, return - a dictionary mapping group names to entry point maps for all groups. - (An entry point map is a dictionary of entry point names to ``EntryPoint`` - objects.) - -``load_entry_point(group, name)`` - Short for ``get_entry_info(group, name).load()``. Returns the object - advertised by the named entry point, or raises ``ImportError`` if - the entry point isn't advertised by this distribution, or there is some - other import problem. - -In addition to the above methods, ``Distribution`` objects also implement all -of the `IResourceProvider`_ and `IMetadataProvider Methods`_ (which are -documented in later sections): - -* ``has_metadata(name)`` -* ``metadata_isdir(name)`` -* ``metadata_listdir(name)`` -* ``get_metadata(name)`` -* ``get_metadata_lines(name)`` -* ``run_script(script_name, namespace)`` -* ``get_resource_filename(manager, resource_name)`` -* ``get_resource_stream(manager, resource_name)`` -* ``get_resource_string(manager, resource_name)`` -* ``has_resource(resource_name)`` -* ``resource_isdir(resource_name)`` -* ``resource_listdir(resource_name)`` - -If the distribution was created with a `metadata` argument, these resource and -metadata access methods are all delegated to that `metadata` provider. -Otherwise, they are delegated to an ``EmptyProvider``, so that the distribution -will appear to have no resources or metadata. This delegation approach is used -so that supporting custom importers or new distribution formats can be done -simply by creating an appropriate `IResourceProvider`_ implementation; see the -section below on `Supporting Custom Importers`_ for more details. - - -``ResourceManager`` API -======================= - -The ``ResourceManager`` class provides uniform access to package resources, -whether those resources exist as files and directories or are compressed in -an archive of some kind. - -Normally, you do not need to create or explicitly manage ``ResourceManager`` -instances, as the ``pkg_resources`` module creates a global instance for you, -and makes most of its methods available as top-level names in the -``pkg_resources`` module namespace. So, for example, this code actually -calls the ``resource_string()`` method of the global ``ResourceManager``:: - - import pkg_resources - my_data = pkg_resources.resource_string(__name__, "foo.dat") - -Thus, you can use the APIs below without needing an explicit -``ResourceManager`` instance; just import and use them as needed. - - -Basic Resource Access ---------------------- - -In the following methods, the `package_or_requirement` argument may be either -a Python package/module name (e.g. ``foo.bar``) or a ``Requirement`` instance. -If it is a package or module name, the named module or package must be -importable (i.e., be in a distribution or directory on ``sys.path``), and the -`resource_name` argument is interpreted relative to the named package. (Note -that if a module name is used, then the resource name is relative to the -package immediately containing the named module. Also, you should not use use -a namespace package name, because a namespace package can be spread across -multiple distributions, and is therefore ambiguous as to which distribution -should be searched for the resource.) - -If it is a ``Requirement``, then the requirement is automatically resolved -(searching the current ``Environment`` if necessary) and a matching -distribution is added to the ``WorkingSet`` and ``sys.path`` if one was not -already present. (Unless the ``Requirement`` can't be satisfied, in which -case an exception is raised.) The `resource_name` argument is then interpreted -relative to the root of the identified distribution; i.e. its first path -segment will be treated as a peer of the top-level modules or packages in the -distribution. - -Note that resource names must be ``/``-separated paths and cannot be absolute -(i.e. no leading ``/``) or contain relative names like ``".."``. Do *not* use -``os.path`` routines to manipulate resource paths, as they are *not* filesystem -paths. - -``resource_exists(package_or_requirement, resource_name)`` - Does the named resource exist? Return ``True`` or ``False`` accordingly. - -``resource_stream(package_or_requirement, resource_name)`` - Return a readable file-like object for the specified resource; it may be - an actual file, a ``StringIO``, or some similar object. The stream is - in "binary mode", in the sense that whatever bytes are in the resource - will be read as-is. - -``resource_string(package_or_requirement, resource_name)`` - Return the specified resource as a string. The resource is read in - binary fashion, such that the returned string contains exactly the bytes - that are stored in the resource. - -``resource_isdir(package_or_requirement, resource_name)`` - Is the named resource a directory? Return ``True`` or ``False`` - accordingly. - -``resource_listdir(package_or_requirement, resource_name)`` - List the contents of the named resource directory, just like ``os.listdir`` - except that it works even if the resource is in a zipfile. - -Note that only ``resource_exists()`` and ``resource_isdir()`` are insensitive -as to the resource type. You cannot use ``resource_listdir()`` on a file -resource, and you can't use ``resource_string()`` or ``resource_stream()`` on -directory resources. Using an inappropriate method for the resource type may -result in an exception or undefined behavior, depending on the platform and -distribution format involved. - - -Resource Extraction -------------------- - -``resource_filename(package_or_requirement, resource_name)`` - Sometimes, it is not sufficient to access a resource in string or stream - form, and a true filesystem filename is needed. In such cases, you can - use this method (or module-level function) to obtain a filename for a - resource. If the resource is in an archive distribution (such as a zipped - egg), it will be extracted to a cache directory, and the filename within - the cache will be returned. If the named resource is a directory, then - all resources within that directory (including subdirectories) are also - extracted. If the named resource is a C extension or "eager resource" - (see the ``setuptools`` documentation for details), then all C extensions - and eager resources are extracted at the same time. - - Archived resources are extracted to a cache location that can be managed by - the following two methods: - -``set_extraction_path(path)`` - Set the base path where resources will be extracted to, if needed. - - If you do not call this routine before any extractions take place, the - path defaults to the return value of ``get_default_cache()``. (Which is - based on the ``PYTHON_EGG_CACHE`` environment variable, with various - platform-specific fallbacks. See that routine's documentation for more - details.) - - Resources are extracted to subdirectories of this path based upon - information given by the resource provider. You may set this to a - temporary directory, but then you must call ``cleanup_resources()`` to - delete the extracted files when done. There is no guarantee that - ``cleanup_resources()`` will be able to remove all extracted files. (On - Windows, for example, you can't unlink .pyd or .dll files that are still - in use.) - - Note that you may not change the extraction path for a given resource - manager once resources have been extracted, unless you first call - ``cleanup_resources()``. - -``cleanup_resources(force=False)`` - Delete all extracted resource files and directories, returning a list - of the file and directory names that could not be successfully removed. - This function does not have any concurrency protection, so it should - generally only be called when the extraction path is a temporary - directory exclusive to a single process. This method is not - automatically called; you must call it explicitly or register it as an - ``atexit`` function if you wish to ensure cleanup of a temporary - directory used for extractions. - - -"Provider" Interface --------------------- - -If you are implementing an ``IResourceProvider`` and/or ``IMetadataProvider`` -for a new distribution archive format, you may need to use the following -``IResourceManager`` methods to co-ordinate extraction of resources to the -filesystem. If you're not implementing an archive format, however, you have -no need to use these methods. Unlike the other methods listed above, they are -*not* available as top-level functions tied to the global ``ResourceManager``; -you must therefore have an explicit ``ResourceManager`` instance to use them. - -``get_cache_path(archive_name, names=())`` - Return absolute location in cache for `archive_name` and `names` - - The parent directory of the resulting path will be created if it does - not already exist. `archive_name` should be the base filename of the - enclosing egg (which may not be the name of the enclosing zipfile!), - including its ".egg" extension. `names`, if provided, should be a - sequence of path name parts "under" the egg's extraction location. - - This method should only be called by resource providers that need to - obtain an extraction location, and only for names they intend to - extract, as it tracks the generated names for possible cleanup later. - -``extraction_error()`` - Raise an ``ExtractionError`` describing the active exception as interfering - with the extraction process. You should call this if you encounter any - OS errors extracting the file to the cache path; it will format the - operating system exception for you, and add other information to the - ``ExtractionError`` instance that may be needed by programs that want to - wrap or handle extraction errors themselves. - -``postprocess(tempname, filename)`` - Perform any platform-specific postprocessing of `tempname`. - Resource providers should call this method ONLY after successfully - extracting a compressed resource. They must NOT call it on resources - that are already in the filesystem. - - `tempname` is the current (temporary) name of the file, and `filename` - is the name it will be renamed to by the caller after this routine - returns. - - -Metadata API -============ - -The metadata API is used to access metadata resources bundled in a pluggable -distribution. Metadata resources are virtual files or directories containing -information about the distribution, such as might be used by an extensible -application or framework to connect "plugins". Like other kinds of resources, -metadata resource names are ``/``-separated and should not contain ``..`` or -begin with a ``/``. You should not use ``os.path`` routines to manipulate -resource paths. - -The metadata API is provided by objects implementing the ``IMetadataProvider`` -or ``IResourceProvider`` interfaces. ``Distribution`` objects implement this -interface, as do objects returned by the ``get_provider()`` function: - -``get_provider(package_or_requirement)`` - If a package name is supplied, return an ``IResourceProvider`` for the - package. If a ``Requirement`` is supplied, resolve it by returning a - ``Distribution`` from the current working set (searching the current - ``Environment`` if necessary and adding the newly found ``Distribution`` - to the working set). If the named package can't be imported, or the - ``Requirement`` can't be satisfied, an exception is raised. - - NOTE: if you use a package name rather than a ``Requirement``, the object - you get back may not be a pluggable distribution, depending on the method - by which the package was installed. In particular, "development" packages - and "single-version externally-managed" packages do not have any way to - map from a package name to the corresponding project's metadata. Do not - write code that passes a package name to ``get_provider()`` and then tries - to retrieve project metadata from the returned object. It may appear to - work when the named package is in an ``.egg`` file or directory, but - it will fail in other installation scenarios. If you want project - metadata, you need to ask for a *project*, not a package. - - -``IMetadataProvider`` Methods ------------------------------ - -The methods provided by objects (such as ``Distribution`` instances) that -implement the ``IMetadataProvider`` or ``IResourceProvider`` interfaces are: - -``has_metadata(name)`` - Does the named metadata resource exist? - -``metadata_isdir(name)`` - Is the named metadata resource a directory? - -``metadata_listdir(name)`` - List of metadata names in the directory (like ``os.listdir()``) - -``get_metadata(name)`` - Return the named metadata resource as a string. The data is read in binary - mode; i.e., the exact bytes of the resource file are returned. - -``get_metadata_lines(name)`` - Yield named metadata resource as list of non-blank non-comment lines. This - is short for calling ``yield_lines(provider.get_metadata(name))``. See the - section on `yield_lines()`_ below for more information on the syntax it - recognizes. - -``run_script(script_name, namespace)`` - Execute the named script in the supplied namespace dictionary. Raises - ``ResolutionError`` if there is no script by that name in the ``scripts`` - metadata directory. `namespace` should be a Python dictionary, usually - a module dictionary if the script is being run as a module. - - -Exceptions -========== - -``pkg_resources`` provides a simple exception hierarchy for problems that may -occur when processing requests to locate and activate packages:: - - ResolutionError - DistributionNotFound - VersionConflict - UnknownExtra - - ExtractionError - -``ResolutionError`` - This class is used as a base class for the other three exceptions, so that - you can catch all of them with a single "except" clause. It is also raised - directly for miscellaneous requirement-resolution problems like trying to - run a script that doesn't exist in the distribution it was requested from. - -``DistributionNotFound`` - A distribution needed to fulfill a requirement could not be found. - -``VersionConflict`` - The requested version of a project conflicts with an already-activated - version of the same project. - -``UnknownExtra`` - One of the "extras" requested was not recognized by the distribution it - was requested from. - -``ExtractionError`` - A problem occurred extracting a resource to the Python Egg cache. The - following attributes are available on instances of this exception: - - manager - The resource manager that raised this exception - - cache_path - The base directory for resource extraction - - original_error - The exception instance that caused extraction to fail - - -Supporting Custom Importers -=========================== - -By default, ``pkg_resources`` supports normal filesystem imports, and -``zipimport`` importers. If you wish to use the ``pkg_resources`` features -with other (PEP 302-compatible) importers or module loaders, you may need to -register various handlers and support functions using these APIs: - -``register_finder(importer_type, distribution_finder)`` - Register `distribution_finder` to find distributions in ``sys.path`` items. - `importer_type` is the type or class of a PEP 302 "Importer" (``sys.path`` - item handler), and `distribution_finder` is a callable that, when passed a - path item, the importer instance, and an `only` flag, yields - ``Distribution`` instances found under that path item. (The `only` flag, - if true, means the finder should yield only ``Distribution`` objects whose - ``location`` is equal to the path item provided.) - - See the source of the ``pkg_resources.find_on_path`` function for an - example finder function. - -``register_loader_type(loader_type, provider_factory)`` - Register `provider_factory` to make ``IResourceProvider`` objects for - `loader_type`. `loader_type` is the type or class of a PEP 302 - ``module.__loader__``, and `provider_factory` is a function that, when - passed a module object, returns an `IResourceProvider`_ for that module, - allowing it to be used with the `ResourceManager API`_. - -``register_namespace_handler(importer_type, namespace_handler)`` - Register `namespace_handler` to declare namespace packages for the given - `importer_type`. `importer_type` is the type or class of a PEP 302 - "importer" (sys.path item handler), and `namespace_handler` is a callable - with a signature like this:: - - def namespace_handler(importer, path_entry, moduleName, module): - # return a path_entry to use for child packages - - Namespace handlers are only called if the relevant importer object has - already agreed that it can handle the relevant path item. The handler - should only return a subpath if the module ``__path__`` does not already - contain an equivalent subpath. Otherwise, it should return None. - - For an example namespace handler, see the source of the - ``pkg_resources.file_ns_handler`` function, which is used for both zipfile - importing and regular importing. - - -IResourceProvider ------------------ - -``IResourceProvider`` is an abstract class that documents what methods are -required of objects returned by a `provider_factory` registered with -``register_loader_type()``. ``IResourceProvider`` is a subclass of -``IMetadataProvider``, so objects that implement this interface must also -implement all of the `IMetadataProvider Methods`_ as well as the methods -shown here. The `manager` argument to the methods below must be an object -that supports the full `ResourceManager API`_ documented above. - -``get_resource_filename(manager, resource_name)`` - Return a true filesystem path for `resource_name`, co-ordinating the - extraction with `manager`, if the resource must be unpacked to the - filesystem. - -``get_resource_stream(manager, resource_name)`` - Return a readable file-like object for `resource_name`. - -``get_resource_string(manager, resource_name)`` - Return a string containing the contents of `resource_name`. - -``has_resource(resource_name)`` - Does the package contain the named resource? - -``resource_isdir(resource_name)`` - Is the named resource a directory? Return a false value if the resource - does not exist or is not a directory. - -``resource_listdir(resource_name)`` - Return a list of the contents of the resource directory, ala - ``os.listdir()``. Requesting the contents of a non-existent directory may - raise an exception. - -Note, by the way, that your provider classes need not (and should not) subclass -``IResourceProvider`` or ``IMetadataProvider``! These classes exist solely -for documentation purposes and do not provide any useful implementation code. -You may instead wish to subclass one of the `built-in resource providers`_. - - -Built-in Resource Providers ---------------------------- - -``pkg_resources`` includes several provider classes that are automatically used -where appropriate. Their inheritance tree looks like this:: - - NullProvider - EggProvider - DefaultProvider - PathMetadata - ZipProvider - EggMetadata - EmptyProvider - FileMetadata - - -``NullProvider`` - This provider class is just an abstract base that provides for common - provider behaviors (such as running scripts), given a definition for just - a few abstract methods. - -``EggProvider`` - This provider class adds in some egg-specific features that are common - to zipped and unzipped eggs. - -``DefaultProvider`` - This provider class is used for unpacked eggs and "plain old Python" - filesystem modules. - -``ZipProvider`` - This provider class is used for all zipped modules, whether they are eggs - or not. - -``EmptyProvider`` - This provider class always returns answers consistent with a provider that - has no metadata or resources. ``Distribution`` objects created without - a ``metadata`` argument use an instance of this provider class instead. - Since all ``EmptyProvider`` instances are equivalent, there is no need - to have more than one instance. ``pkg_resources`` therefore creates a - global instance of this class under the name ``empty_provider``, and you - may use it if you have need of an ``EmptyProvider`` instance. - -``PathMetadata(path, egg_info)`` - Create an ``IResourceProvider`` for a filesystem-based distribution, where - `path` is the filesystem location of the importable modules, and `egg_info` - is the filesystem location of the distribution's metadata directory. - `egg_info` should usually be the ``EGG-INFO`` subdirectory of `path` for an - "unpacked egg", and a ``ProjectName.egg-info`` subdirectory of `path` for - a "development egg". However, other uses are possible for custom purposes. - -``EggMetadata(zipimporter)`` - Create an ``IResourceProvider`` for a zipfile-based distribution. The - `zipimporter` should be a ``zipimport.zipimporter`` instance, and may - represent a "basket" (a zipfile containing multiple ".egg" subdirectories) - a specific egg *within* a basket, or a zipfile egg (where the zipfile - itself is a ".egg"). It can also be a combination, such as a zipfile egg - that also contains other eggs. - -``FileMetadata(path_to_pkg_info)`` - Create an ``IResourceProvider`` that provides exactly one metadata - resource: ``PKG-INFO``. The supplied path should be a distutils PKG-INFO - file. This is basically the same as an ``EmptyProvider``, except that - requests for ``PKG-INFO`` will be answered using the contents of the - designated file. (This provider is used to wrap ``.egg-info`` files - installed by vendor-supplied system packages.) - - -Utility Functions -================= - -In addition to its high-level APIs, ``pkg_resources`` also includes several -generally-useful utility routines. These routines are used to implement the -high-level APIs, but can also be quite useful by themselves. - - -Parsing Utilities ------------------ - -``parse_version(version)`` - Parse a project's version string, returning a value that can be used to - compare versions by chronological order. Semantically, the format is a - rough cross between distutils' ``StrictVersion`` and ``LooseVersion`` - classes; if you give it versions that would work with ``StrictVersion``, - then they will compare the same way. Otherwise, comparisons are more like - a "smarter" form of ``LooseVersion``. It is *possible* to create - pathological version coding schemes that will fool this parser, but they - should be very rare in practice. - - The returned value will be a tuple of strings. Numeric portions of the - version are padded to 8 digits so they will compare numerically, but - without relying on how numbers compare relative to strings. Dots are - dropped, but dashes are retained. Trailing zeros between alpha segments - or dashes are suppressed, so that e.g. "2.4.0" is considered the same as - "2.4". Alphanumeric parts are lower-cased. - - The algorithm assumes that strings like "-" and any alpha string that - alphabetically follows "final" represents a "patch level". So, "2.4-1" - is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is - considered newer than "2.4-1", which in turn is newer than "2.4". - - Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that - come before "final" alphabetically) are assumed to be pre-release versions, - so that the version "2.4" is considered newer than "2.4a1". Any "-" - characters preceding a pre-release indicator are removed. (In versions of - setuptools prior to 0.6a9, "-" characters were not removed, leading to the - unintuitive result that "0.2-rc1" was considered a newer version than - "0.2".) - - Finally, to handle miscellaneous cases, the strings "pre", "preview", and - "rc" are treated as if they were "c", i.e. as though they were release - candidates, and therefore are not as new as a version string that does not - contain them. And the string "dev" is treated as if it were an "@" sign; - that is, a version coming before even "a" or "alpha". - -.. _yield_lines(): - -``yield_lines(strs)`` - Yield non-empty/non-comment lines from a string/unicode or a possibly- - nested sequence thereof. If `strs` is an instance of ``basestring``, it - is split into lines, and each non-blank, non-comment line is yielded after - stripping leading and trailing whitespace. (Lines whose first non-blank - character is ``#`` are considered comment lines.) - - If `strs` is not an instance of ``basestring``, it is iterated over, and - each item is passed recursively to ``yield_lines()``, so that an arbitarily - nested sequence of strings, or sequences of sequences of strings can be - flattened out to the lines contained therein. So for example, passing - a file object or a list of strings to ``yield_lines`` will both work. - (Note that between each string in a sequence of strings there is assumed to - be an implicit line break, so lines cannot bridge two strings in a - sequence.) - - This routine is used extensively by ``pkg_resources`` to parse metadata - and file formats of various kinds, and most other ``pkg_resources`` - parsing functions that yield multiple values will use it to break up their - input. However, this routine is idempotent, so calling ``yield_lines()`` - on the output of another call to ``yield_lines()`` is completely harmless. - -``split_sections(strs)`` - Split a string (or possibly-nested iterable thereof), yielding ``(section, - content)`` pairs found using an ``.ini``-like syntax. Each ``section`` is - a whitespace-stripped version of the section name ("``[section]``") - and each ``content`` is a list of stripped lines excluding blank lines and - comment-only lines. If there are any non-blank, non-comment lines before - the first section header, they're yielded in a first ``section`` of - ``None``. - - This routine uses ``yield_lines()`` as its front end, so you can pass in - anything that ``yield_lines()`` accepts, such as an open text file, string, - or sequence of strings. ``ValueError`` is raised if a malformed section - header is found (i.e. a line starting with ``[`` but not ending with - ``]``). - - Note that this simplistic parser assumes that any line whose first nonblank - character is ``[`` is a section heading, so it can't support .ini format - variations that allow ``[`` as the first nonblank character on other lines. - -``safe_name(name)`` - Return a "safe" form of a project's name, suitable for use in a - ``Requirement`` string, as a distribution name, or a PyPI project name. - All non-alphanumeric runs are condensed to single "-" characters, such that - a name like "The $$$ Tree" becomes "The-Tree". Note that if you are - generating a filename from this value you should combine it with a call to - ``to_filename()`` so all dashes ("-") are replaced by underscores ("_"). - See ``to_filename()``. - -``safe_version(version)`` - Similar to ``safe_name()`` except that spaces in the input become dots, and - dots are allowed to exist in the output. As with ``safe_name()``, if you - are generating a filename from this you should replace any "-" characters - in the output with underscores. - -``safe_extra(extra)`` - Return a "safe" form of an extra's name, suitable for use in a requirement - string or a setup script's ``extras_require`` keyword. This routine is - similar to ``safe_name()`` except that non-alphanumeric runs are replaced - by a single underbar (``_``), and the result is lowercased. - -``to_filename(name_or_version)`` - Escape a name or version string so it can be used in a dash-separated - filename (or ``#egg=name-version`` tag) without ambiguity. You - should only pass in values that were returned by ``safe_name()`` or - ``safe_version()``. - - -Platform Utilities ------------------- - -``get_build_platform()`` - Return this platform's identifier string. For Windows, the return value - is ``"win32"``, and for Mac OS X it is a string of the form - ``"macosx-10.4-ppc"``. All other platforms return the same uname-based - string that the ``distutils.util.get_platform()`` function returns. - This string is the minimum platform version required by distributions built - on the local machine. (Backward compatibility note: setuptools versions - prior to 0.6b1 called this function ``get_platform()``, and the function is - still available under that name for backward compatibility reasons.) - -``get_supported_platform()`` (New in 0.6b1) - This is the similar to ``get_build_platform()``, but is the maximum - platform version that the local machine supports. You will usually want - to use this value as the ``provided`` argument to the - ``compatible_platforms()`` function. - -``compatible_platforms(provided, required)`` - Return true if a distribution built on the `provided` platform may be used - on the `required` platform. If either platform value is ``None``, it is - considered a wildcard, and the platforms are therefore compatible. - Likewise, if the platform strings are equal, they're also considered - compatible, and ``True`` is returned. Currently, the only non-equal - platform strings that are considered compatible are Mac OS X platform - strings with the same hardware type (e.g. ``ppc``) and major version - (e.g. ``10``) with the `provided` platform's minor version being less than - or equal to the `required` platform's minor version. - -``get_default_cache()`` - Determine the default cache location for extracting resources from zipped - eggs. This routine returns the ``PYTHON_EGG_CACHE`` environment variable, - if set. Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of - the user's "Application Data" directory. On all other systems, it returns - ``os.path.expanduser("~/.python-eggs")`` if ``PYTHON_EGG_CACHE`` is not - set. - - -PEP 302 Utilities ------------------ - -``get_importer(path_item)`` - Retrieve a PEP 302 "importer" for the given path item (which need not - actually be on ``sys.path``). This routine simulates the PEP 302 protocol - for obtaining an "importer" object. It first checks for an importer for - the path item in ``sys.path_importer_cache``, and if not found it calls - each of the ``sys.path_hooks`` and caches the result if a good importer is - found. If no importer is found, this routine returns an ``ImpWrapper`` - instance that wraps the builtin import machinery as a PEP 302-compliant - "importer" object. This ``ImpWrapper`` is *not* cached; instead a new - instance is returned each time. - - (Note: When run under Python 2.5, this function is simply an alias for - ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper`` - instances, it may return ``pkgutil.ImpImporter`` instances.) - - -File/Path Utilities -------------------- - -``ensure_directory(path)`` - Ensure that the parent directory (``os.path.dirname``) of `path` actually - exists, using ``os.makedirs()`` if necessary. - -``normalize_path(path)`` - Return a "normalized" version of `path`, such that two paths represent - the same filesystem location if they have equal ``normalized_path()`` - values. Specifically, this is a shortcut for calling ``os.path.realpath`` - and ``os.path.normcase`` on `path`. Unfortunately, on certain platforms - (notably Cygwin and Mac OS X) the ``normcase`` function does not accurately - reflect the platform's case-sensitivity, so there is always the possibility - of two apparently-different paths being equal on such platforms. - -History -------- - -0.6c9 - * Fix ``resource_listdir('')`` always returning an empty list for zipped eggs. - -0.6c7 - * Fix package precedence problem where single-version eggs installed in - ``site-packages`` would take precedence over ``.egg`` files (or directories) - installed in ``site-packages``. - -0.6c6 - * Fix extracted C extensions not having executable permissions under Cygwin. - - * Allow ``.egg-link`` files to contain relative paths. - - * Fix cache dir defaults on Windows when multiple environment vars are needed - to construct a path. - -0.6c4 - * Fix "dev" versions being considered newer than release candidates. - -0.6c3 - * Python 2.5 compatibility fixes. - -0.6c2 - * Fix a problem with eggs specified directly on ``PYTHONPATH`` on - case-insensitive filesystems possibly not showing up in the default - working set, due to differing normalizations of ``sys.path`` entries. - -0.6b3 - * Fixed a duplicate path insertion problem on case-insensitive filesystems. - -0.6b1 - * Split ``get_platform()`` into ``get_supported_platform()`` and - ``get_build_platform()`` to work around a Mac versioning problem that caused - the behavior of ``compatible_platforms()`` to be platform specific. - - * Fix entry point parsing when a standalone module name has whitespace - between it and the extras. - -0.6a11 - * Added ``ExtractionError`` and ``ResourceManager.extraction_error()`` so that - cache permission problems get a more user-friendly explanation of the - problem, and so that programs can catch and handle extraction errors if they - need to. - -0.6a10 - * Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()`` - method to ``WorkingSet``, and the ``__add__()`` and ``__iadd__()`` methods - to ``Environment``. - - * ``safe_name()`` now allows dots in project names. - - * There is a new ``to_filename()`` function that escapes project names and - versions for safe use in constructing egg filenames from a Distribution - object's metadata. - - * Added ``Distribution.clone()`` method, and keyword argument support to other - ``Distribution`` constructors. - - * Added the ``DEVELOP_DIST`` precedence, and automatically assign it to - eggs using ``.egg-info`` format. - -0.6a9 - * Don't raise an error when an invalid (unfinished) distribution is found - unless absolutely necessary. Warn about skipping invalid/unfinished eggs - when building an Environment. - - * Added support for ``.egg-info`` files or directories with version/platform - information embedded in the filename, so that system packagers have the - option of including ``PKG-INFO`` files to indicate the presence of a - system-installed egg, without needing to use ``.egg`` directories, zipfiles, - or ``.pth`` manipulation. - - * Changed ``parse_version()`` to remove dashes before pre-release tags, so - that ``0.2-rc1`` is considered an *older* version than ``0.2``, and is equal - to ``0.2rc1``. The idea that a dash *always* meant a post-release version - was highly non-intuitive to setuptools users and Python developers, who - seem to want to use ``-rc`` version numbers a lot. - -0.6a8 - * Fixed a problem with ``WorkingSet.resolve()`` that prevented version - conflicts from being detected at runtime. - - * Improved runtime conflict warning message to identify a line in the user's - program, rather than flagging the ``warn()`` call in ``pkg_resources``. - - * Avoid giving runtime conflict warnings for namespace packages, even if they - were declared by a different package than the one currently being activated. - - * Fix path insertion algorithm for case-insensitive filesystems. - - * Fixed a problem with nested namespace packages (e.g. ``peak.util``) not - being set as an attribute of their parent package. - -0.6a6 - * Activated distributions are now inserted in ``sys.path`` (and the working - set) just before the directory that contains them, instead of at the end. - This allows e.g. eggs in ``site-packages`` to override unmanaged modules in - the same location, and allows eggs found earlier on ``sys.path`` to override - ones found later. - - * When a distribution is activated, it now checks whether any contained - non-namespace modules have already been imported and issues a warning if - a conflicting module has already been imported. - - * Changed dependency processing so that it's breadth-first, allowing a - depender's preferences to override those of a dependee, to prevent conflicts - when a lower version is acceptable to the dependee, but not the depender. - - * Fixed a problem extracting zipped files on Windows, when the egg in question - has had changed contents but still has the same version number. - -0.6a4 - * Fix a bug in ``WorkingSet.resolve()`` that was introduced in 0.6a3. - -0.6a3 - * Added ``safe_extra()`` parsing utility routine, and use it for Requirement, - EntryPoint, and Distribution objects' extras handling. - -0.6a1 - * Enhanced performance of ``require()`` and related operations when all - requirements are already in the working set, and enhanced performance of - directory scanning for distributions. - - * Fixed some problems using ``pkg_resources`` w/PEP 302 loaders other than - ``zipimport``, and the previously-broken "eager resource" support. - - * Fixed ``pkg_resources.resource_exists()`` not working correctly, along with - some other resource API bugs. - - * Many API changes and enhancements: - - * Added ``EntryPoint``, ``get_entry_map``, ``load_entry_point``, and - ``get_entry_info`` APIs for dynamic plugin discovery. - - * ``list_resources`` is now ``resource_listdir`` (and it actually works) - - * Resource API functions like ``resource_string()`` that accepted a package - name and resource name, will now also accept a ``Requirement`` object in - place of the package name (to allow access to non-package data files in - an egg). - - * ``get_provider()`` will now accept a ``Requirement`` instance or a module - name. If it is given a ``Requirement``, it will return a corresponding - ``Distribution`` (by calling ``require()`` if a suitable distribution - isn't already in the working set), rather than returning a metadata and - resource provider for a specific module. (The difference is in how - resource paths are interpreted; supplying a module name means resources - path will be module-relative, rather than relative to the distribution's - root.) - - * ``Distribution`` objects now implement the ``IResourceProvider`` and - ``IMetadataProvider`` interfaces, so you don't need to reference the (no - longer available) ``metadata`` attribute to get at these interfaces. - - * ``Distribution`` and ``Requirement`` both have a ``project_name`` - attribute for the project name they refer to. (Previously these were - ``name`` and ``distname`` attributes.) - - * The ``path`` attribute of ``Distribution`` objects is now ``location``, - because it isn't necessarily a filesystem path (and hasn't been for some - time now). The ``location`` of ``Distribution`` objects in the filesystem - should always be normalized using ``pkg_resources.normalize_path()``; all - of the setuptools and EasyInstall code that generates distributions from - the filesystem (including ``Distribution.from_filename()``) ensure this - invariant, but if you use a more generic API like ``Distribution()`` or - ``Distribution.from_location()`` you should take care that you don't - create a distribution with an un-normalized filesystem path. - - * ``Distribution`` objects now have an ``as_requirement()`` method that - returns a ``Requirement`` for the distribution's project name and version. - - * Distribution objects no longer have an ``installed_on()`` method, and the - ``install_on()`` method is now ``activate()`` (but may go away altogether - soon). The ``depends()`` method has also been renamed to ``requires()``, - and ``InvalidOption`` is now ``UnknownExtra``. - - * ``find_distributions()`` now takes an additional argument called ``only``, - that tells it to only yield distributions whose location is the passed-in - path. (It defaults to False, so that the default behavior is unchanged.) - - * ``AvailableDistributions`` is now called ``Environment``, and the - ``get()``, ``__len__()``, and ``__contains__()`` methods were removed, - because they weren't particularly useful. ``__getitem__()`` no longer - raises ``KeyError``; it just returns an empty list if there are no - distributions for the named project. - - * The ``resolve()`` method of ``Environment`` is now a method of - ``WorkingSet`` instead, and the ``best_match()`` method now uses a working - set instead of a path list as its second argument. - - * There is a new ``pkg_resources.add_activation_listener()`` API that lets - you register a callback for notifications about distributions added to - ``sys.path`` (including the distributions already on it). This is - basically a hook for extensible applications and frameworks to be able to - search for plugin metadata in distributions added at runtime. - -0.5a13 - * Fixed a bug in resource extraction from nested packages in a zipped egg. - -0.5a12 - * Updated extraction/cache mechanism for zipped resources to avoid inter- - process and inter-thread races during extraction. The default cache - location can now be set via the ``PYTHON_EGGS_CACHE`` environment variable, - and the default Windows cache is now a ``Python-Eggs`` subdirectory of the - current user's "Application Data" directory, if the ``PYTHON_EGGS_CACHE`` - variable isn't set. - -0.5a10 - * Fix a problem with ``pkg_resources`` being confused by non-existent eggs on - ``sys.path`` (e.g. if a user deletes an egg without removing it from the - ``easy-install.pth`` file). - - * Fix a problem with "basket" support in ``pkg_resources``, where egg-finding - never actually went inside ``.egg`` files. - - * Made ``pkg_resources`` import the module you request resources from, if it's - not already imported. - -0.5a4 - * ``pkg_resources.AvailableDistributions.resolve()`` and related methods now - accept an ``installer`` argument: a callable taking one argument, a - ``Requirement`` instance. The callable must return a ``Distribution`` - object, or ``None`` if no distribution is found. This feature is used by - EasyInstall to resolve dependencies by recursively invoking itself. - -0.4a4 - * Fix problems with ``resource_listdir()``, ``resource_isdir()`` and resource - directory extraction for zipped eggs. - -0.4a3 - * Fixed scripts not being able to see a ``__file__`` variable in ``__main__`` - - * Fixed a problem with ``resource_isdir()`` implementation that was introduced - in 0.4a2. - -0.4a1 - * Fixed a bug in requirements processing for exact versions (i.e. ``==`` and - ``!=``) when only one condition was included. - - * Added ``safe_name()`` and ``safe_version()`` APIs to clean up handling of - arbitrary distribution names and versions found on PyPI. - -0.3a4 - * ``pkg_resources`` now supports resource directories, not just the resources - in them. In particular, there are ``resource_listdir()`` and - ``resource_isdir()`` APIs. - - * ``pkg_resources`` now supports "egg baskets" -- .egg zipfiles which contain - multiple distributions in subdirectories whose names end with ``.egg``. - Having such a "basket" in a directory on ``sys.path`` is equivalent to - having the individual eggs in that directory, but the contained eggs can - be individually added (or not) to ``sys.path``. Currently, however, there - is no automated way to create baskets. - - * Namespace package manipulation is now protected by the Python import lock. - -0.3a1 - * Initial release. - diff --git a/docs/python3.txt b/docs/python3.txt deleted file mode 100644 index 2f6cde4ab3..0000000000 --- a/docs/python3.txt +++ /dev/null @@ -1,121 +0,0 @@ -===================================================== -Supporting both Python 2 and Python 3 with Distribute -===================================================== - -Starting with version 0.6.2, Distribute supports Python 3. Installing and -using distribute for Python 3 code works exactly the same as for Python 2 -code, but Distribute also helps you to support Python 2 and Python 3 from -the same source code by letting you run 2to3 on the code as a part of the -build process, by setting the keyword parameter ``use_2to3`` to True. - - -Distribute as help during porting -================================= - -Distribute can make the porting process much easier by automatically running -2to3 as a part of the test running. To do this you need to configure the -setup.py so that you can run the unit tests with ``python setup.py test``. - -See :ref:`test` for more information on this. - -Once you have the tests running under Python 2, you can add the use_2to3 -keyword parameters to setup(), and start running the tests under Python 3. -The test command will now first run the build command during which the code -will be converted with 2to3, and the tests will then be run from the build -directory, as opposed from the source directory as is normally done. - -Distribute will convert all Python files, and also all doctests in Python -files. However, if you have doctests located in separate text files, these -will not automatically be converted. By adding them to the -``convert_2to3_doctests`` keyword parameter Distrubute will convert them as -well. - -By default, the conversion uses all fixers in the ``lib2to3.fixers`` package. -To use additional fixers, the parameter ``use_2to3_fixers`` can be set -to a list of names of packages containing fixers. To exclude fixers, the -parameter ``use_2to3_exclude_fixers`` can be set to fixer names to be -skipped. - -A typical setup.py can look something like this:: - - from setuptools import setup - - setup( - name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - use_2to3 = True, - convert_2to3_doctests = ['src/your/module/README.txt'], - use_2to3_fixers = ['your.fixers'], - use_2to3_exclude_fixers = ['lib2to3.fixes.fix_import'], - ) - -Differential conversion ------------------------ - -Note that a file will only be copied and converted during the build process -if the source file has been changed. If you add a file to the doctests -that should be converted, it will not be converted the next time you run -the tests, since it hasn't been modified. You need to remove it from the -build directory. Also if you run the build, install or test commands before -adding the use_2to3 parameter, you will have to remove the build directory -before you run the test command, as the files otherwise will seem updated, -and no conversion will happen. - -In general, if code doesn't seem to be converted, deleting the build directory -and trying again is a good saferguard against the build directory getting -"out of sync" with the source directory. - -Distributing Python 3 modules -============================= - -You can distribute your modules with Python 3 support in different ways. A -normal source distribution will work, but can be slow in installing, as the -2to3 process will be run during the install. But you can also distribute -the module in binary format, such as a binary egg. That egg will contain the -already converted code, and hence no 2to3 conversion is needed during install. - -Advanced features -================= - -If you don't want to run the 2to3 conversion on the doctests in Python files, -you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. - -Note on compatibility with setuptools -===================================== - -Setuptools do not know about the new keyword parameters to support Python 3. -As a result it will warn about the unknown keyword parameters if you use -setuptools instead of Distribute under Python 2. This is not an error, and -install process will continue as normal, but if you want to get rid of that -error this is easy. Simply conditionally add the new parameters into an extra -dict and pass that dict into setup():: - - from setuptools import setup - import sys - - extra = {} - if sys.version_info >= (3,): - extra['use_2to3'] = True - extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] - extra['use_2to3_fixers'] = ['your.fixers'] - - setup( - name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - **extra - ) - -This way the parameters will only be used under Python 3, where you have to -use Distribute. diff --git a/docs/roadmap.txt b/docs/roadmap.txt deleted file mode 100644 index ea5070eaaf..0000000000 --- a/docs/roadmap.txt +++ /dev/null @@ -1,86 +0,0 @@ -======= -Roadmap -======= - -Distribute has two branches: - -- 0.6.x : provides a Setuptools-0.6cX compatible version -- 0.7.x : will provide a refactoring - -0.6.x -===== - -Not "much" is going to happen here, we want this branch to be helpful -to the community *today* by addressing the 40-or-so bugs -that were found in Setuptools and never fixed. This is eventually -happen soon because its development is -fast : there are up to 5 commiters that are working on it very often -(and the number grows weekly.) - -The biggest issue with this branch is that it is providing the same -packages and modules setuptools does, and this -requires some bootstrapping work where we make sure once Distribute is -installed, all Distribution that requires Setuptools -will continue to work. This is done by faking the metadata of -Setuptools 0.6c9. That's the only way we found to do this. - -There's one major thing though: thanks to the work of Lennart, Alex, -Martin, this branch supports Python 3, -which is great to have to speed up Py3 adoption. - -The goal of the 0.6.x is to remove as much bugs as we can, and try if -possible to remove the patches done -on Distutils. We will support 0.6.x maintenance for years and we will -promote its usage everywhere instead of -Setuptools. - -Some new commands are added there, when they are helpful and don't -interact with the rest. I am thinking -about "upload_docs" that let you upload documentation to PyPI. The -goal is to move it to Distutils -at some point, if the documentation feature of PyPI stays and starts to be used. - -0.7.x -===== - -We've started to refactor Distribute with this roadmap in mind (and -no, as someone said, it's not vaporware, -we've done a lot already) - -- 0.7.x can be installed and used with 0.6.x - -- easy_install is going to be deprecated ! use Pip ! - -- the version system will be deprecated, in favor of the one in Distutils - -- no more Distutils monkey-patch that happens once you use the code - (things like 'from distutils import cmd; cmd.Command = CustomCommand') - -- no more custom site.py (that is: if something misses in Python's - site.py we'll add it there instead of patching it) - -- no more namespaced packages system, if PEP 382 (namespaces package - support) makes it to 2.7 - -- The code is splitted in many packages and might be distributed under - several distributions. - - - distribute.resources: that's the old pkg_resources, but - reorganized in clean, pep-8 modules. This package will - only contain the query APIs and will focus on being PEP 376 - compatible. We will promote its usage and see if Pip wants - to use it as a basis. - It will probably shrink a lot though, once the stdlib provides PEP 376 support. - - - distribute.entrypoints: that's the old pkg_resources entry points - system, but on its own. it uses distribute.resources - - - distribute.index: that's package_index and a few other things. - everything required to interact with PyPI. We will promote - its usage and see if Pip wants to use it as a basis. - - - distribute.core (might be renamed to main): that's everything - else, and uses the other packages. - -Goal: A first release before (or when) Python 2.7 / 3.2 is out. - diff --git a/docs/setuptools.txt b/docs/setuptools.txt deleted file mode 100644 index fe8bb3f615..0000000000 --- a/docs/setuptools.txt +++ /dev/null @@ -1,3230 +0,0 @@ -================================================== -Building and Distributing Packages with Distribute -================================================== - -``Distribute`` is a collection of enhancements to the Python ``distutils`` -(for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum -of Python 2.4) that allow you to more easily build and distribute Python -packages, especially ones that have dependencies on other packages. - -Packages built and distributed using ``setuptools`` look to the user like -ordinary Python packages based on the ``distutils``. Your users don't need to -install or even know about setuptools in order to use them, and you don't -have to include the entire setuptools package in your distributions. By -including just a single `bootstrap module`_ (an 8K .py file), your package will -automatically download and install ``setuptools`` if the user is building your -package from source and doesn't have a suitable version already installed. - -.. _bootstrap module: http://nightly.ziade.org/distribute_setup.py - -Feature Highlights: - -* Automatically find/download/install/upgrade dependencies at build time using - the `EasyInstall tool `_, - which supports downloading via HTTP, FTP, Subversion, and SourceForge, and - automatically scans web pages linked from PyPI to find download links. (It's - the closest thing to CPAN currently available for Python.) - -* Create `Python Eggs `_ - - a single-file importable distribution format - -* Include data files inside your package directories, where your code can - actually use them. (Python 2.4 distutils also supports this feature, but - setuptools provides the feature for Python 2.3 packages also, and supports - accessing data files in zipped packages too.) - -* Automatically include all packages in your source tree, without listing them - individually in setup.py - -* Automatically include all relevant files in your source distributions, - without needing to create a ``MANIFEST.in`` file, and without having to force - regeneration of the ``MANIFEST`` file when your source tree changes. - -* Automatically generate wrapper scripts or Windows (console and GUI) .exe - files for any number of "main" functions in your project. (Note: this is not - a py2exe replacement; the .exe files rely on the local Python installation.) - -* Transparent Pyrex support, so that your setup.py can list ``.pyx`` files and - still work even when the end-user doesn't have Pyrex installed (as long as - you include the Pyrex-generated C in your source distribution) - -* Command aliases - create project-specific, per-user, or site-wide shortcut - names for commonly used commands and options - -* PyPI upload support - upload your source distributions and eggs to PyPI - -* Deploy your project in "development mode", such that it's available on - ``sys.path``, yet can still be edited directly from its source checkout. - -* Easily extend the distutils with new commands or ``setup()`` arguments, and - distribute/reuse your extensions for multiple projects, without copying code. - -* Create extensible applications and frameworks that automatically discover - extensions, using simple "entry points" declared in a project's setup script. - -In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `Python SVN sandbox`_, and in-development versions of the -`0.6 branch`_ are available as well. - -.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - -.. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev - -.. contents:: **Table of Contents** - -.. _distribute_setup.py: `bootstrap module`_ - - ------------------ -Developer's Guide ------------------ - - -Installing ``setuptools`` -========================= - -Please follow the `EasyInstall Installation Instructions`_ to install the -current stable version of setuptools. In particular, be sure to read the -section on `Custom Installation Locations`_ if you are installing anywhere -other than Python's ``site-packages`` directory. - -.. _EasyInstall Installation Instructions: http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions - -.. _Custom Installation Locations: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations - -If you want the current in-development version of setuptools, you should first -install a stable version, and then run:: - - distribute_setup.py setuptools==dev - -This will download and install the latest development (i.e. unstable) version -of setuptools from the Python Subversion sandbox. - - -Basic Use -========= - -For basic use of setuptools, just import things from setuptools instead of -the distutils. Here's a minimal setup script using setuptools:: - - from setuptools import setup, find_packages - setup( - name = "HelloWorld", - version = "0.1", - packages = find_packages(), - ) - -As you can see, it doesn't take much to use setuptools in a project. -Just by doing the above, this project will be able to produce eggs, upload to -PyPI, and automatically include all packages in the directory where the -setup.py lives. See the `Command Reference`_ section below to see what -commands you can give to this setup script. - -Of course, before you release your project to PyPI, you'll want to add a bit -more information to your setup script to help people find or learn about your -project. And maybe your project will have grown by then to include a few -dependencies, and perhaps some data files and scripts:: - - from setuptools import setup, find_packages - setup( - name = "HelloWorld", - version = "0.1", - packages = find_packages(), - scripts = ['say_hello.py'], - - # Project uses reStructuredText, so ensure that the docutils get - # installed or upgraded on the target machine - install_requires = ['docutils>=0.3'], - - package_data = { - # If any package contains *.txt or *.rst files, include them: - '': ['*.txt', '*.rst'], - # And include any *.msg files found in the 'hello' package, too: - 'hello': ['*.msg'], - }, - - # metadata for upload to PyPI - author = "Me", - author_email = "me@example.com", - description = "This is an Example Package", - license = "PSF", - keywords = "hello world example examples", - url = "http://example.com/HelloWorld/", # project home page, if any - - # could also include long_description, download_url, classifiers, etc. - ) - -In the sections that follow, we'll explain what most of these ``setup()`` -arguments do (except for the metadata ones), and the various ways you might use -them in your own project(s). - - -Specifying Your Project's Version ---------------------------------- - -Setuptools can work well with most versioning schemes; there are, however, a -few special things to watch out for, in order to ensure that setuptools and -EasyInstall can always tell what version of your package is newer than another -version. Knowing these things will also help you correctly specify what -versions of other projects your project depends on. - -A version consists of an alternating series of release numbers and pre-release -or post-release tags. A release number is a series of digits punctuated by -dots, such as ``2.4`` or ``0.5``. Each series of digits is treated -numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the -same release number, denoting the first subrelease of release 2. But ``2.10`` -is the *tenth* subrelease of release 2, and so is a different and newer release -from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also -ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. - -Following a release number, you can have either a pre-release or post-release -tag. Pre-release tags make a version be considered *older* than the version -they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, -which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make -a version be considered *newer* than the version they are appended to. So, -revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* -than ``2.4.1`` (which has a higher release number). - -A pre-release tag is a series of letters that are alphabetically before -"final". Some examples of prerelease tags would include ``alpha``, ``beta``, -``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash -before the prerelease tag if it's immediately after a number, but it's okay to -do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all -represent release candidate 1 of version ``2.4``, and are treated as identical -by setuptools. - -In addition, there are three special prerelease tags that are treated as if -they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version -``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as -``2.4c1``, and are treated as identical by setuptools. - -A post-release tag is either a series of letters that are alphabetically -greater than or equal to "final", or a dash (``-``). Post-release tags are -generally used to separate patch numbers, port numbers, build numbers, revision -numbers, or date stamps from the release number. For example, the version -``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of -version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped -post-release. - -Notice that after each pre or post-release tag, you are free to place another -release number, followed again by more pre- or post-release tags. For example, -``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- -development version of the ninth alpha of release 0.6. Notice that ``dev`` is -a pre-release tag, so this version is a *lower* version number than ``0.6a9``, -which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is -a post-release tag, so this version is *newer* than ``0.6a9.dev``. - -For the most part, setuptools' interpretation of version numbers is intuitive, -but here are a few tips that will keep you out of trouble in the corner cases: - -* Don't stick adjoining pre-release tags together without a dot or number - between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, - *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in - ``1.9a.dev``, or separate the prerelease tags with a number, as in - ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are - identical versions from setuptools' point of view, so you can use whatever - scheme you prefer. - -* If you want to be certain that your chosen numbering scheme works the way - you think it will, you can use the ``pkg_resources.parse_version()`` function - to compare different version numbers:: - - >>> from pkg_resources import parse_version - >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev') - True - >>> parse_version('2.1-rc2') < parse_version('2.1') - True - >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9') - True - -Once you've decided on a version numbering scheme for your project, you can -have setuptools automatically tag your in-development releases with various -pre- or post-release tags. See the following sections for more details: - -* `Tagging and "Daily Build" or "Snapshot" Releases`_ -* `Managing "Continuous Releases" Using Subversion`_ -* The `egg_info`_ command - - -New and Changed ``setup()`` Keywords -==================================== - -The following keyword arguments to ``setup()`` are added or changed by -``setuptools``. All of them are optional; you do not have to supply them -unless you need the associated ``setuptools`` feature. - -``include_package_data`` - If set to ``True``, this tells ``setuptools`` to automatically include any - data files it finds inside your package directories, that are either under - CVS or Subversion control, or which are specified by your ``MANIFEST.in`` - file. For more information, see the section below on `Including Data - Files`_. - -``exclude_package_data`` - A dictionary mapping package names to lists of glob patterns that should - be *excluded* from your package directories. You can use this to trim back - any excess files included by ``include_package_data``. For a complete - description and examples, see the section below on `Including Data Files`_. - -``package_data`` - A dictionary mapping package names to lists of glob patterns. For a - complete description and examples, see the section below on `Including - Data Files`_. You do not need to use this option if you are using - ``include_package_data``, unless you need to add e.g. files that are - generated by your setup script and build process. (And are therefore not - in source control or are files that you don't want to include in your - source distribution.) - -``zip_safe`` - A boolean (True or False) flag specifying whether the project can be - safely installed and run from a zip file. If this argument is not - supplied, the ``bdist_egg`` command will have to analyze all of your - project's contents for possible problems each time it buids an egg. - -``install_requires`` - A string or list of strings specifying what other distributions need to - be installed when this one is. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``entry_points`` - A dictionary mapping entry point group names to strings or lists of strings - defining the entry points. Entry points are used to support dynamic - discovery of services or plugins provided by a project. See `Dynamic - Discovery of Services and Plugins`_ for details and examples of the format - of this argument. In addition, this keyword is used to support `Automatic - Script Creation`_. - -``extras_require`` - A dictionary mapping names of "extras" (optional features of your project) - to strings or lists of strings specifying what other distributions must be - installed to support those features. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``setup_requires`` - A string or list of strings specifying what other distributions need to - be present in order for the *setup script* to run. ``setuptools`` will - attempt to obtain these (even going so far as to download them using - ``EasyInstall``) before processing the rest of the setup script or commands. - This argument is needed if you are using distutils extensions as part of - your build process; for example, extensions that process setup() arguments - and turn them into EGG-INFO metadata files. - - (Note: projects listed in ``setup_requires`` will NOT be automatically - installed on the system where the setup script is being run. They are - simply downloaded to the setup directory if they're not locally available - already. If you want them to be installed, as well as being available - when the setup script is run, you should add them to ``install_requires`` - **and** ``setup_requires``.) - -``dependency_links`` - A list of strings naming URLs to be searched when satisfying dependencies. - These links will be used if needed to install packages specified by - ``setup_requires`` or ``tests_require``. They will also be written into - the egg's metadata for use by tools like EasyInstall to use when installing - an ``.egg`` file. - -``namespace_packages`` - A list of strings naming the project's "namespace packages". A namespace - package is a package that may be split across multiple project - distributions. For example, Zope 3's ``zope`` package is a namespace - package, because subpackages like ``zope.interface`` and ``zope.publisher`` - may be distributed separately. The egg runtime system can automatically - merge such subpackages into a single parent package at runtime, as long - as you declare them in each project that contains any subpackages of the - namespace package, and as long as the namespace package's ``__init__.py`` - does not contain any code other than a namespace declaration. See the - section below on `Namespace Packages`_ for more information. - -``test_suite`` - A string naming a ``unittest.TestCase`` subclass (or a package or module - containing one or more of them, or a method of such a subclass), or naming - a function that can be called with no arguments and returns a - ``unittest.TestSuite``. If the named suite is a module, and the module - has an ``additional_tests()`` function, it is called and the results are - added to the tests to be run. If the named suite is a package, any - submodules and subpackages are recursively added to the overall test suite. - - Specifying this argument enables use of the `test`_ command to run the - specified test suite, e.g. via ``setup.py test``. See the section on the - `test`_ command below for more details. - -``tests_require`` - If your project's tests need one or more additional packages besides those - needed to install it, you can use this option to specify them. It should - be a string or list of strings specifying what other distributions need to - be present for the package's tests to run. When you run the ``test`` - command, ``setuptools`` will attempt to obtain these (even going - so far as to download them using ``EasyInstall``). Note that these - required projects will *not* be installed on the system where the tests - are run, but only downloaded to the project's setup directory if they're - not already installed locally. - -.. _test_loader: - -``test_loader`` - If you would like to use a different way of finding tests to run than what - setuptools normally uses, you can specify a module name and class name in - this argument. The named class must be instantiable with no arguments, and - its instances must support the ``loadTestsFromNames()`` method as defined - in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will - pass only one test "name" in the `names` argument: the value supplied for - the ``test_suite`` argument. The loader you specify may interpret this - string in any way it likes, as there are no restrictions on what may be - contained in a ``test_suite`` string. - - The module name and class name must be separated by a ``:``. The default - value of this argument is ``"setuptools.command.test:ScanningLoader"``. If - you want to use the default ``unittest`` behavior, you can specify - ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This - will prevent automatic scanning of submodules and subpackages. - - The module and class you specify here may be contained in another package, - as long as you use the ``tests_require`` option to ensure that the package - containing the loader class is available when the ``test`` command is run. - -``eager_resources`` - A list of strings naming resources that should be extracted together, if - any of them is needed, or if any C extensions included in the project are - imported. This argument is only useful if the project will be installed as - a zipfile, and there is a need to have all of the listed resources be - extracted to the filesystem *as a unit*. Resources listed here - should be '/'-separated paths, relative to the source root, so to list a - resource ``foo.png`` in package ``bar.baz``, you would include the string - ``bar/baz/foo.png`` in this argument. - - If you only need to obtain resources one at a time, or you don't have any C - extensions that access other files in the project (such as data files or - shared libraries), you probably do NOT need this argument and shouldn't - mess with it. For more details on how this argument works, see the section - below on `Automatic Resource Extraction`_. - -``use_2to3`` - Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. See :doc:`python3` for more details. - -``convert_2to3_doctests`` - List of doctest source files that need to be converted with 2to3. - See :doc:`python3` for more details. - -``use_2to3_fixers`` - A list of modules to search for additional fixers to be used during - the 2to3 conversion. See :doc:`python3` for more details. - - -Using ``find_packages()`` -------------------------- - -For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the -package list updated. That's what ``setuptools.find_packages()`` is for. - -``find_packages()`` takes a source directory, and a list of package names or -patterns to exclude. If omitted, the source directory defaults to the same -directory as the setup script. Some projects use a ``src`` or ``lib`` -directory as the root of their source tree, and those projects would of course -use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir = {'':'src'}`` in their -``setup()`` arguments, but that's just a normal distutils thing.) - -Anyway, ``find_packages()`` walks the target directory, and finds Python -packages by looking for ``__init__.py`` files. It then filters the list of -packages using the exclusion patterns. - -Exclusion patterns are package names, optionally including wildcards. For -example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose -last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", -"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, -but it still won't exclude a top-level ``tests`` package or the children -thereof. In fact, if you really want no ``tests`` packages at all, you'll need -something like this:: - - find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) - -in order to cover all the bases. Really, the exclusion patterns are intended -to cover simpler use cases than this, like excluding a single, specified -package and its subpackages. - -Regardless of the target directory or exclusions, the ``find_packages()`` -function returns a list of package names suitable for use as the ``packages`` -argument to ``setup()``, and so is usually the easiest way to set that -argument in your setup script. Especially since it frees you from having to -remember to modify your setup script whenever your project grows additional -top-level packages or subpackages. - - -Automatic Script Creation -========================= - -Packaging and installing scripts can be a bit awkward with the distutils. For -one thing, there's no easy way to have a script's filename match local -conventions on both Windows and POSIX platforms. For another, you often have -to create a separate file just for the "main" script, when your actual "main" -is a function in a module somewhere. And even in Python 2.4, using the ``-m`` -option only works for actual ``.py`` files that aren't installed in a package. - -``setuptools`` fixes all of these problems by automatically generating scripts -for you with the correct extension, and on Windows it will even create an -``.exe`` file so that users don't have to change their ``PATHEXT`` settings. -The way to use this feature is to define "entry points" in your setup script -that indicate what function the generated script should import and run. For -example, to create two console scripts called ``foo`` and ``bar``, and a GUI -script called ``baz``, you might do something like this:: - - setup( - # other arguments here... - entry_points = { - 'console_scripts': [ - 'foo = my_package.some_module:main_func', - 'bar = other_module:some_func', - ], - 'gui_scripts': [ - 'baz = my_package_gui.start_func', - ] - } - ) - -When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or by using EasyInstall), a set of ``foo``, -``bar``, and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. The functions you specify are called -with no arguments, and their return value is passed to ``sys.exit()``, so you -can return an errorlevel or message to print to stderr. - -On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are -created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The -``.exe`` wrappers find and execute the right version of Python to run the -``.py`` or ``.pyw`` file. - -You may define as many "console script" and "gui script" entry points as you -like, and each one can optionally specify "extras" that it depends on, that -will be added to ``sys.path`` when the script is run. For more information on -"extras", see the section below on `Declaring Extras`_. For more information -on "entry points" in general, see the section below on `Dynamic Discovery of -Services and Plugins`_. - - -"Eggsecutable" Scripts ----------------------- - -Occasionally, there are situations where it's desirable to make an ``.egg`` -file directly executable. You can do this by including an entry point such -as the following:: - - setup( - # other arguments here... - entry_points = { - 'setuptools.installation': [ - 'eggsecutable = my_package.some_module:main_func', - ] - } - ) - -Any eggs built from the above setup script will include a short excecutable -prelude that imports and calls ``main_func()`` from ``my_package.some_module``. -The prelude can be run on Unix-like platforms (including Mac and Linux) by -invoking the egg with ``/bin/sh``, or by enabling execute permissions on the -``.egg`` file. For the executable prelude to run, the appropriate version of -Python must be available via the ``PATH`` environment variable, under its -"long" name. That is, if the egg is built for Python 2.3, there must be a -``python2.3`` executable present in a directory on ``PATH``. - -This feature is primarily intended to support distribute_setup the installation of -setuptools itself on non-Windows platforms, but may also be useful for other -projects as well. - -IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or -invoked via symlinks. They *must* be invoked using their original filename, in -order to ensure that, once running, ``pkg_resources`` will know what project -and version is in use. The header script will check this and exit with an -error if the ``.egg`` file has been renamed or is invoked via a symlink that -changes its base name. - - -Declaring Dependencies -====================== - -``setuptools`` supports automatically installing dependencies when a package is -installed, and including information about dependencies in Python Eggs (so that -package management tools like EasyInstall can use the information). - -``setuptools`` and ``pkg_resources`` use a common syntax for specifying a -project's required dependencies. This syntax consists of a project's PyPI -name, optionally followed by a comma-separated list of "extras" in square -brackets, optionally followed by a comma-separated list of version -specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, -``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be -separated by whitespace, but any whitespace or nonstandard characters within a -project name or version identifier must be replaced with ``-``. - -Version specifiers for a given project are internally sorted into ascending -version order, and used to establish what ranges of versions are acceptable. -Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes -``">1"``, and ``"<2,<3"`` becomes ``"<3"``). ``"!="`` versions are excised from -the ranges they fall within. A project's version is then checked for -membership in the resulting ranges. (Note that providing conflicting conditions -for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may -therefore produce bizarre results.) - -Here are some example requirement specifiers:: - - docutils >= 0.3 - - # comment lines and \ continuations are allowed in requirement strings - BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ - ==1.6, ==1.7 # and so are line-end comments - - PEAK[FastCGI, reST]>=0.5a4 - - setuptools==0.5a7 - -The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers. If you include more than one -requirement in a string, each requirement must begin on a new line. - -This has three effects: - -1. When your project is installed, either by using EasyInstall, ``setup.py - install``, or ``setup.py develop``, all of the dependencies not already - installed will be located (via PyPI), downloaded, built (if necessary), - and installed. - -2. Any scripts in your project will be installed with wrappers that verify - the availability of the specified dependencies at runtime, and ensure that - the correct versions are added to ``sys.path`` (e.g. if multiple versions - have been installed). - -3. Python Egg distributions will include a metadata file listing the - dependencies. - -Note, by the way, that if you declare your dependencies in ``setup.py``, you do -*not* need to use the ``require()`` function in your scripts or modules, as -long as you either install the project or use ``setup.py develop`` to do -development work on it. (See `"Development Mode"`_ below for more details on -using ``setup.py develop``.) - - -Dependencies that aren't in PyPI --------------------------------- - -If your project depends on packages that aren't registered in PyPI, you may -still be able to depend on them, as long as they are available for download -as: - -- an egg, in the standard distutils ``sdist`` format, -- a single ``.py`` file, or -- a VCS repository (Subversion, Mercurial, or Git). - -You just need to add some URLs to the ``dependency_links`` argument to -``setup()``. - -The URLs must be either: - -1. direct download URLs, -2. the URLs of web pages that contain direct download links, or -3. the repository's URL - -In general, it's better to link to web pages, because it is usually less -complex to update a web page than to release a new version of your project. -You can also use a SourceForge ``showfiles.php`` link in the case where a -package you depend on is distributed via SourceForge. - -If you depend on a package that's distributed as a single ``.py`` file, you -must include an ``"#egg=project-version"`` suffix to the URL, to give a project -name and version number. (Be sure to escape any dashes in the name or version -by replacing them with underscores.) EasyInstall will recognize this suffix -and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file -as an egg. - -In the case of a VCS checkout, you should also append ``#egg=project-version`` -in order to identify for what package that checkout should be used. You can -append ``@REV`` to the URL's path (before the fragment) to specify a revision. -Additionally, you can also force the VCS being used by prepending the URL with -a certain prefix. Currently available are: - -- ``svn+URL`` for Subversion, -- ``git+URL`` for Git, and -- ``hg+URL`` for Mercurial - -A more complete example would be: - - ``vcs+proto://host/path@revision#egg=project-version`` - -Be careful with the version. It should match the one inside the project files. -If you want do disregard the version, you have to omit it both in the -``requires`` and in the URL's fragment. - -This will do a checkout (or a clone, in Git and Mercurial parlance) to a -temporary folder and run ``setup.py bdist_egg``. - -The ``dependency_links`` option takes the form of a list of URL strings. For -example, the below will cause EasyInstall to search the specified page for -eggs or source distributions, if the package's dependencies aren't already -installed:: - - setup( - ... - dependency_links = [ - "http://peak.telecommunity.com/snapshots/" - ], - ) - - -.. _Declaring Extras: - - -Declaring "Extras" (optional features with their own dependencies) ------------------------------------------------------------------- - -Sometimes a project has "recommended" dependencies, that are not required for -all uses of the project. For example, a project might offer optional PDF -output if ReportLab is installed, and reStructuredText support if docutils is -installed. These optional features are called "extras", and setuptools allows -you to define their requirements as well. In this way, other projects that -require these optional features can force the additional requirements to be -installed, by naming the desired extras in their ``install_requires``. - -For example, let's say that Project A offers optional PDF and reST support:: - - setup( - name="Project-A", - ... - extras_require = { - 'PDF': ["ReportLab>=1.2", "RXP"], - 'reST': ["docutils>=0.3"], - } - ) - -As you can see, the ``extras_require`` argument takes a dictionary mapping -names of "extra" features, to strings or lists of strings describing those -features' requirements. These requirements will *not* be automatically -installed unless another package depends on them (directly or indirectly) by -including the desired "extras" in square brackets after the associated project -name. (Or if the extras were listed in a requirement spec on the EasyInstall -command line.) - -Extras can be used by a project's `entry points`_ to specify dynamic -dependencies. For example, if Project A includes a "rst2pdf" script, it might -declare it like this, so that the "PDF" requirements are only resolved if the -"rst2pdf" script is run:: - - setup( - name="Project-A", - ... - entry_points = { - 'console_scripts': - ['rst2pdf = project_a.tools.pdfgen [PDF]'], - ['rst2html = project_a.tools.htmlgen'], - # more script entry points ... - } - ) - -Projects can also use another project's extras when specifying dependencies. -For example, if project B needs "project A" with PDF support installed, it -might declare the dependency like this:: - - setup( - name="Project-B", - install_requires = ["Project-A[PDF]"], - ... - ) - -This will cause ReportLab to be installed along with project A, if project B is -installed -- even if project A was already installed. In this way, a project -can encapsulate groups of optional "downstream dependencies" under a feature -name, so that packages that depend on it don't have to know what the downstream -dependencies are. If a later version of Project A builds in PDF support and -no longer needs ReportLab, or if it ends up needing other dependencies besides -ReportLab in order to provide PDF support, Project B's setup information does -not need to change, but the right packages will still be installed if needed. - -Note, by the way, that if a project ends up not needing any other packages to -support a feature, it should keep an empty requirements list for that feature -in its ``extras_require`` argument, so that packages depending on that feature -don't break (due to an invalid feature name). For example, if Project A above -builds in PDF support and no longer needs ReportLab, it could change its -setup to this:: - - setup( - name="Project-A", - ... - extras_require = { - 'PDF': [], - 'reST': ["docutils>=0.3"], - } - ) - -so that Package B doesn't have to remove the ``[PDF]`` from its requirement -specifier. - - -Including Data Files -==================== - -The distutils have traditionally allowed installation of "data files", which -are placed in a platform-specific location. However, the most common use case -for data files distributed with a package is for use *by* the package, usually -by including the data files in the package directory. - -Setuptools offers three ways to specify data files to be included in your -packages. First, you can simply use the ``include_package_data`` keyword, -e.g.:: - - from setuptools import setup, find_packages - setup( - ... - include_package_data = True - ) - -This tells setuptools to install any data files it finds in your packages. -The data files must be under CVS or Subversion control, or else they must be -specified via the distutils' ``MANIFEST.in`` file. (They can also be tracked -by another revision control system, using an appropriate plugin. See the -section below on `Adding Support for Other Revision Control Systems`_ for -information on how to write such plugins.) - -If the data files are not under version control, or are not in a supported -version control system, or if you want finer-grained control over what files -are included (for example, if you have documentation files in your package -directories and want to exclude them from installation), then you can also use -the ``package_data`` keyword, e.g.:: - - from setuptools import setup, find_packages - setup( - ... - package_data = { - # If any package contains *.txt or *.rst files, include them: - '': ['*.txt', '*.rst'], - # And include any *.msg files found in the 'hello' package, too: - 'hello': ['*.msg'], - } - ) - -The ``package_data`` argument is a dictionary that maps from package names to -lists of glob patterns. The globs may include subdirectory names, if the data -files are contained in a subdirectory of the package. For example, if the -package tree looks like this:: - - setup.py - src/ - mypkg/ - __init__.py - mypkg.txt - data/ - somefile.dat - otherdata.dat - -The setuptools setup file might look like this:: - - from setuptools import setup, find_packages - setup( - ... - packages = find_packages('src'), # include all packages under src - package_dir = {'':'src'}, # tell distutils packages are under src - - package_data = { - # If any package contains *.txt files, include them: - '': ['*.txt'], - # And include any *.dat files found in the 'data' subdirectory - # of the 'mypkg' package, also: - 'mypkg': ['data/*.dat'], - } - ) - -Notice that if you list patterns in ``package_data`` under the empty string, -these patterns are used to find files in every package, even ones that also -have their own patterns listed. Thus, in the above example, the ``mypkg.txt`` -file gets included even though it's not listed in the patterns for ``mypkg``. - -Also notice that if you use paths, you *must* use a forward slash (``/``) as -the path separator, even if you are on Windows. Setuptools automatically -converts slashes to appropriate platform-specific separators at build time. - -(Note: although the ``package_data`` argument was previously only available in -``setuptools``, it was also added to the Python ``distutils`` package as of -Python 2.4; there is `some documentation for the feature`__ available on the -python.org website. If using the setuptools-specific ``include_package_data`` -argument, files specified by ``package_data`` will *not* be automatically -added to the manifest unless they are tracked by a supported version control -system, or are listed in the MANIFEST.in file.) - -__ http://docs.python.org/dist/node11.html - -Sometimes, the ``include_package_data`` or ``package_data`` options alone -aren't sufficient to precisely define what files you want included. For -example, you may want to include package README files in your revision control -system and source distributions, but exclude them from being installed. So, -setuptools offers an ``exclude_package_data`` option as well, that allows you -to do things like this:: - - from setuptools import setup, find_packages - setup( - ... - packages = find_packages('src'), # include all packages under src - package_dir = {'':'src'}, # tell distutils packages are under src - - include_package_data = True, # include everything in source control - - # ...but exclude README.txt from all packages - exclude_package_data = { '': ['README.txt'] }, - ) - -The ``exclude_package_data`` option is a dictionary mapping package names to -lists of wildcard patterns, just like the ``package_data`` option. And, just -as with that option, a key of ``''`` will apply the given pattern(s) to all -packages. However, any files that match these patterns will be *excluded* -from installation, even if they were listed in ``package_data`` or were -included as a result of using ``include_package_data``. - -In summary, the three options allow you to: - -``include_package_data`` - Accept all data files and directories matched by ``MANIFEST.in`` or found - in source control. - -``package_data`` - Specify additional patterns to match files and directories that may or may - not be matched by ``MANIFEST.in`` or found in source control. - -``exclude_package_data`` - Specify patterns for data files and directories that should *not* be - included when a package is installed, even if they would otherwise have - been included due to the use of the preceding options. - -NOTE: Due to the way the distutils build process works, a data file that you -include in your project and then stop including may be "orphaned" in your -project's build directories, requiring you to run ``setup.py clean --all`` to -fully remove them. This may also be important for your users and contributors -if they track intermediate revisions of your project using Subversion; be sure -to let them know when you make changes that remove files from inclusion so they -can run ``setup.py clean --all``. - - -Accessing Data Files at Runtime -------------------------------- - -Typically, existing programs manipulate a package's ``__file__`` attribute in -order to find the location of data files. However, this manipulation isn't -compatible with PEP 302-based import hooks, including importing from zip files -and Python Eggs. It is strongly recommended that, if you are using data files, -you should use the `Resource Management API`_ of ``pkg_resources`` to access -them. The ``pkg_resources`` module is distributed as part of setuptools, so if -you're using setuptools to distribute your package, there is no reason not to -use its resource management API. See also `Accessing Package Resources`_ for -a quick example of converting code that uses ``__file__`` to use -``pkg_resources`` instead. - -.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PythonEggs#resource-management -.. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources - - -Non-Package Data Files ----------------------- - -The ``distutils`` normally install general "data files" to a platform-specific -location (e.g. ``/usr/share``). This feature intended to be used for things -like documentation, example configuration files, and the like. ``setuptools`` -does not install these data files in a separate location, however. They are -bundled inside the egg file or directory, alongside the Python modules and -packages. The data files can also be accessed using the `Resource Management -API`_, by specifying a ``Requirement`` instead of a package name:: - - from pkg_resources import Requirement, resource_filename - filename = resource_filename(Requirement.parse("MyProject"),"sample.conf") - -The above code will obtain the filename of the "sample.conf" file in the data -root of the "MyProject" distribution. - -Note, by the way, that this encapsulation of data files means that you can't -actually install data files to some arbitrary location on a user's machine; -this is a feature, not a bug. You can always include a script in your -distribution that extracts and copies your the documentation or data files to -a user-specified location, at their discretion. If you put related data files -in a single directory, you can use ``resource_filename()`` with the directory -name to get a filesystem directory that then can be copied with the ``shutil`` -module. (Even if your package is installed as a zipfile, calling -``resource_filename()`` on a directory will return an actual filesystem -directory, whose contents will be that entire subtree of your distribution.) - -(Of course, if you're writing a new package, you can just as easily place your -data files or directories inside one of your packages, rather than using the -distutils' approach. However, if you're updating an existing application, it -may be simpler not to change the way it currently specifies these data files.) - - -Automatic Resource Extraction ------------------------------ - -If you are using tools that expect your resources to be "real" files, or your -project includes non-extension native libraries or other files that your C -extensions expect to be able to access, you may need to list those files in -the ``eager_resources`` argument to ``setup()``, so that the files will be -extracted together, whenever a C extension in the project is imported. - -This is especially important if your project includes shared libraries *other* -than distutils-built C extensions, and those shared libraries use file -extensions other than ``.dll``, ``.so``, or ``.dylib``, which are the -extensions that setuptools 0.6a8 and higher automatically detects as shared -libraries and adds to the ``native_libs.txt`` file for you. Any shared -libraries whose names do not end with one of those extensions should be listed -as ``eager_resources``, because they need to be present in the filesystem when -he C extensions that link to them are used. - -The ``pkg_resources`` runtime for compressed packages will automatically -extract *all* C extensions and ``eager_resources`` at the same time, whenever -*any* C extension or eager resource is requested via the ``resource_filename()`` -API. (C extensions are imported using ``resource_filename()`` internally.) -This ensures that C extensions will see all of the "real" files that they -expect to see. - -Note also that you can list directory resource names in ``eager_resources`` as -well, in which case the directory's contents (including subdirectories) will be -extracted whenever any C extension or eager resource is requested. - -Please note that if you're not sure whether you need to use this argument, you -don't! It's really intended to support projects with lots of non-Python -dependencies and as a last resort for crufty projects that can't otherwise -handle being compressed. If your package is pure Python, Python plus data -files, or Python plus C, you really don't need this. You've got to be using -either C or an external program that needs "real" files in your project before -there's any possibility of ``eager_resources`` being relevant to your project. - - -Extensible Applications and Frameworks -====================================== - - -.. _Entry Points: - -Dynamic Discovery of Services and Plugins ------------------------------------------ - -``setuptools`` supports creating libraries that "plug in" to extensible -applications and frameworks, by letting you register "entry points" in your -project that can be imported by the application or framework. - -For example, suppose that a blogging tool wants to support plugins -that provide translation for various file types to the blog's output format. -The framework might define an "entry point group" called ``blogtool.parsers``, -and then allow plugins to register entry points for the file extensions they -support. - -This would allow people to create distributions that contain one or more -parsers for different file types, and then the blogging tool would be able to -find the parsers at runtime by looking up an entry point for the file -extension (or mime type, or however it wants to). - -Note that if the blogging tool includes parsers for certain file formats, it -can register these as entry points in its own setup script, which means it -doesn't have to special-case its built-in formats. They can just be treated -the same as any other plugin's entry points would be. - -If you're creating a project that plugs in to an existing application or -framework, you'll need to know what entry points or entry point groups are -defined by that application or framework. Then, you can register entry points -in your setup script. Here are a few examples of ways you might register an -``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, -for our hypothetical blogging tool:: - - setup( - # ... - entry_points = {'blogtool.parsers': '.rst = some_module:SomeClass'} - ) - - setup( - # ... - entry_points = {'blogtool.parsers': ['.rst = some_module:a_func']} - ) - - setup( - # ... - entry_points = """ - [blogtool.parsers] - .rst = some.nested.module:SomeClass.some_classmethod [reST] - """, - extras_require = dict(reST = "Docutils>=0.3.5") - ) - -The ``entry_points`` argument to ``setup()`` accepts either a string with -``.ini``-style sections, or a dictionary mapping entry point group names to -either strings or lists of strings containing entry point specifiers. An -entry point specifier consists of a name and value, separated by an ``=`` -sign. The value consists of a dotted module name, optionally followed by a -``:`` and a dotted identifier naming an object within the module. It can -also include a bracketed list of "extras" that are required for the entry -point to be used. When the invoking application or framework requests loading -of an entry point, any requirements implied by the associated extras will be -passed to ``pkg_resources.require()``, so that an appropriate error message -can be displayed if the needed package(s) are missing. (Of course, the -invoking app or framework can ignore such errors if it wants to make an entry -point optional if a requirement isn't installed.) - - -Defining Additional Metadata ----------------------------- - -Some extensible applications and frameworks may need to define their own kinds -of metadata to include in eggs, which they can then access using the -``pkg_resources`` metadata APIs. Ordinarily, this is done by having plugin -developers include additional files in their ``ProjectName.egg-info`` -directory. However, since it can be tedious to create such files by hand, you -may want to create a distutils extension that will create the necessary files -from arguments to ``setup()``, in much the same way that ``setuptools`` does -for many of the ``setup()`` arguments it adds. See the section below on -`Creating distutils Extensions`_ for more details, especially the subsection on -`Adding new EGG-INFO Files`_. - - -"Development Mode" -================== - -Under normal circumstances, the ``distutils`` assume that you are going to -build a distribution of your project, not use it in its "raw" or "unbuilt" -form. If you were to use the ``distutils`` that way, you would have to rebuild -and reinstall your project every time you made a change to it during -development. - -Another problem that sometimes comes up with the ``distutils`` is that you may -need to do development on two related projects at the same time. You may need -to put both projects' packages in the same directory to run them, but need to -keep them separate for revision control purposes. How can you do this? - -Setuptools allows you to deploy your projects for use in a common directory or -staging area, but without copying any files. Thus, you can edit each project's -code in its checkout directory, and only need to run build commands when you -change a project's C extensions or similarly compiled files. You can even -deploy a project into another project's checkout directory, if that's your -preferred way of working (as opposed to using a common independent staging area -or the site-packages directory). - -To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install`` or the EasyInstall tool, except that it doesn't actually -install anything. Instead, it creates a special ``.egg-link`` file in the -deployment directory, that links to your project's source code. And, if your -deployment directory is Python's ``site-packages`` directory, it will also -update the ``easy-install.pth`` file to include your project's source code, -thereby making it available on ``sys.path`` for all programs using that Python -installation. - -If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` -will not link directly to your source code when run under Python 3, since -that source code would be made for Python 2 and not work under Python 3. -Instead the ``setup.py develop`` will build Python 3 code under the ``build`` -directory, and link there. This means that after doing code changes you will -have to run ``setup.py build`` before these changes are picked up by your -Python 3 installation. - -In addition, the ``develop`` command creates wrapper scripts in the target -script directory that will run your in-development scripts after ensuring that -all your ``install_requires`` packages are available on ``sys.path``. - -You can deploy the same project to multiple staging areas, e.g. if you have -multiple projects on the same machine that are sharing the same project you're -doing development work. - -When you're done with a given development task, you can remove the project -source from a staging area using ``setup.py develop --uninstall``, specifying -the desired staging area if it's not the default. - -There are several options to control the precise behavior of the ``develop`` -command; see the section on the `develop`_ command below for more details. - -Note that you can also apply setuptools commands to non-setuptools projects, -using commands like this:: - - python -c "import setuptools; execfile('setup.py')" develop - -That is, you can simply list the normal setup commands and options following -the quoted part. - - -Distributing a ``setuptools``-based project -=========================================== - -Using ``setuptools``... Without bundling it! ---------------------------------------------- - -Your users might not have ``setuptools`` installed on their machines, or even -if they do, it might not be the right version. Fixing this is easy; just -download `distribute_setup.py`_, and put it in the same directory as your ``setup.py`` -script. (Be sure to add it to your revision control system, too.) Then add -these two lines to the very top of your setup script, before the script imports -anything from setuptools: - -.. code-block:: python - - import distribute_setup - distribute_setup.use_setuptools() - -That's it. The ``distribute_setup`` module will automatically download a matching -version of ``setuptools`` from PyPI, if it isn't present on the target system. -Whenever you install an updated version of setuptools, you should also update -your projects' ``distribute_setup.py`` files, so that a matching version gets installed -on the target machine(s). - -By the way, setuptools supports the new PyPI "upload" command, so you can use -``setup.py sdist upload`` or ``setup.py bdist_egg upload`` to upload your -source or egg distributions respectively. Your project's current version must -be registered with PyPI first, of course; you can use ``setup.py register`` to -do that. Or you can do it all in one step, e.g. ``setup.py register sdist -bdist_egg upload`` will register the package, build source and egg -distributions, and then upload them both to PyPI, where they'll be easily -found by other projects that depend on them. - -(By the way, if you need to distribute a specific version of ``setuptools``, -you can specify the exact version and base download URL as parameters to the -``use_setuptools()`` function. See the function's docstring for details.) - - -What Your Users Should Know ---------------------------- - -In general, a setuptools-based project looks just like any distutils-based -project -- as long as your users have an internet connection and are installing -to ``site-packages``, that is. But for some users, these conditions don't -apply, and they may become frustrated if this is their first encounter with -a setuptools-based project. To keep these users happy, you should review the -following topics in your project's installation instructions, if they are -relevant to your project and your target audience isn't already familiar with -setuptools and ``easy_install``. - -Network Access - If your project is using ``distribute_setup``, you should inform users of the - need to either have network access, or to preinstall the correct version of - setuptools using the `EasyInstall installation instructions`_. Those - instructions also have tips for dealing with firewalls as well as how to - manually download and install setuptools. - -Custom Installation Locations - You should inform your users that if they are installing your project to - somewhere other than the main ``site-packages`` directory, they should - first install setuptools using the instructions for `Custom Installation - Locations`_, before installing your project. - -Your Project's Dependencies - If your project depends on other projects that may need to be downloaded - from PyPI or elsewhere, you should list them in your installation - instructions, or tell users how to find out what they are. While most - users will not need this information, any users who don't have unrestricted - internet access may have to find, download, and install the other projects - manually. (Note, however, that they must still install those projects - using ``easy_install``, or your project will not know they are installed, - and your setup script will try to download them again.) - - If you want to be especially friendly to users with limited network access, - you may wish to build eggs for your project and its dependencies, making - them all available for download from your site, or at least create a page - with links to all of the needed eggs. In this way, users with limited - network access can manually download all the eggs to a single directory, - then use the ``-f`` option of ``easy_install`` to specify the directory - to find eggs in. Users who have full network access can just use ``-f`` - with the URL of your download page, and ``easy_install`` will find all the - needed eggs using your links directly. This is also useful when your - target audience isn't able to compile packages (e.g. most Windows users) - and your package or some of its dependencies include C code. - -Subversion or CVS Users and Co-Developers - Users and co-developers who are tracking your in-development code using - CVS, Subversion, or some other revision control system should probably read - this manual's sections regarding such development. Alternately, you may - wish to create a quick-reference guide containing the tips from this manual - that apply to your particular situation. For example, if you recommend - that people use ``setup.py develop`` when tracking your in-development - code, you should let them know that this needs to be run after every update - or commit. - - Similarly, if you remove modules or data files from your project, you - should remind them to run ``setup.py clean --all`` and delete any obsolete - ``.pyc`` or ``.pyo``. (This tip applies to the distutils in general, not - just setuptools, but not everybody knows about them; be kind to your users - by spelling out your project's best practices rather than leaving them - guessing.) - -Creating System Packages - Some users want to manage all Python packages using a single package - manager, and sometimes that package manager isn't ``easy_install``! - Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and - ``bdist_dumb`` formats for system packaging. If a user has a locally- - installed "bdist" packaging tool that internally uses the distutils - ``install`` command, it should be able to work with ``setuptools``. Some - examples of "bdist" formats that this should work with include the - ``bdist_nsi`` and ``bdist_msi`` formats for Windows. - - However, packaging tools that build binary distributions by running - ``setup.py install`` on the command line or as a subprocess will require - modification to work with setuptools. They should use the - ``--single-version-externally-managed`` option to the ``install`` command, - combined with the standard ``--root`` or ``--record`` options. - See the `install command`_ documentation below for more details. The - ``bdist_deb`` command is an example of a command that currently requires - this kind of patching to work with setuptools. - - If you or your users have a problem building a usable system package for - your project, please report the problem via the mailing list so that - either the "bdist" tool in question or setuptools can be modified to - resolve the issue. - - - -Managing Multiple Projects --------------------------- - -If you're managing several projects that need to use ``distribute_setup``, and you -are using Subversion as your revision control system, you can use the -"svn:externals" property to share a single copy of ``distribute_setup`` between -projects, so that it will always be up-to-date whenever you check out or update -an individual project, without having to manually update each project to use -a new version. - -However, because Subversion only supports using directories as externals, you -have to turn ``distribute_setup.py`` into ``distribute_setup/__init__.py`` in order -to do this, then create "externals" definitions that map the ``distribute_setup`` -directory into each project. Also, if any of your projects use -``find_packages()`` on their setup directory, you will need to exclude the -resulting ``distribute_setup`` package, to keep it from being included in your -distributions, e.g.:: - - setup( - ... - packages = find_packages(exclude=['distribute_setup']), - ) - -Of course, the ``distribute_setup`` package will still be included in your -packages' source distributions, as it needs to be. - -For your convenience, you may use the following external definition, which will -track the latest version of setuptools:: - - ez_setup svn://svn.eby-sarna.com/svnroot/ez_setup - -You can set this by executing this command in your project directory:: - - svn propedit svn:externals . - -And then adding the line shown above to the file that comes up for editing. - - -Setting the ``zip_safe`` flag ------------------------------ - -For maximum performance, Python packages are best installed as zip files. -Not all packages, however, are capable of running in compressed form, because -they may expect to be able to access either source code or data files as -normal operating system files. So, ``setuptools`` can install your project -as a zipfile or a directory, and its default choice is determined by the -project's ``zip_safe`` flag. - -You can pass a True or False value for the ``zip_safe`` argument to the -``setup()`` function, or you can omit it. If you omit it, the ``bdist_egg`` -command will analyze your project's contents to see if it can detect any -conditions that would prevent it from working in a zipfile. It will output -notices to the console about any such conditions that it finds. - -Currently, this analysis is extremely conservative: it will consider the -project unsafe if it contains any C extensions or datafiles whatsoever. This -does *not* mean that the project can't or won't work as a zipfile! It just -means that the ``bdist_egg`` authors aren't yet comfortable asserting that -the project *will* work. If the project contains no C or data files, and does -no ``__file__`` or ``__path__`` introspection or source code manipulation, then -there is an extremely solid chance the project will work when installed as a -zipfile. (And if the project uses ``pkg_resources`` for all its data file -access, then C extensions and other data files shouldn't be a problem at all. -See the `Accessing Data Files at Runtime`_ section above for more information.) - -However, if ``bdist_egg`` can't be *sure* that your package will work, but -you've checked over all the warnings it issued, and you are either satisfied it -*will* work (or if you want to try it for yourself), then you should set -``zip_safe`` to ``True`` in your ``setup()`` call. If it turns out that it -doesn't work, you can always change it to ``False``, which will force -``setuptools`` to install your project as a directory rather than as a zipfile. - -Of course, the end-user can still override either decision, if they are using -EasyInstall to install your package. And, if you want to override for testing -purposes, you can just run ``setup.py easy_install --zip-ok .`` or ``setup.py -easy_install --always-unzip .`` in your project directory. to install the -package as a zipfile or directory, respectively. - -In the future, as we gain more experience with different packages and become -more satisfied with the robustness of the ``pkg_resources`` runtime, the -"zip safety" analysis may become less conservative. However, we strongly -recommend that you determine for yourself whether your project functions -correctly when installed as a zipfile, correct any problems if you can, and -then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` -flag, so that it will not be necessary for ``bdist_egg`` or ``EasyInstall`` to -try to guess whether your project can work as a zipfile. - - -Namespace Packages ------------------- - -Sometimes, a large package is more useful if distributed as a collection of -smaller eggs. However, Python does not normally allow the contents of a -package to be retrieved from more than one location. "Namespace packages" -are a solution for this problem. When you declare a package to be a namespace -package, it means that the package has no meaningful contents in its -``__init__.py``, and that it is merely a container for modules and subpackages. - -The ``pkg_resources`` runtime will then automatically ensure that the contents -of namespace packages that are spread over multiple eggs or directories are -combined into a single "virtual" package. - -The ``namespace_packages`` argument to ``setup()`` lets you declare your -project's namespace packages, so that they will be included in your project's -metadata. The argument should list the namespace packages that the egg -participates in. For example, the ZopeInterface project might do this:: - - setup( - # ... - namespace_packages = ['zope'] - ) - -because it contains a ``zope.interface`` package that lives in the ``zope`` -namespace package. Similarly, a project for a standalone ``zope.publisher`` -would also declare the ``zope`` namespace package. When these projects are -installed and used, Python will see them both as part of a "virtual" ``zope`` -package, even though they will be installed in different locations. - -Namespace packages don't have to be top-level packages. For example, Zope 3's -``zope.app`` package is a namespace package, and in the future PEAK's -``peak.util`` package will be too. - -Note, by the way, that your project's source tree must include the namespace -packages' ``__init__.py`` files (and the ``__init__.py`` of any parent -packages), in a normal Python package layout. These ``__init__.py`` files -*must* contain the line:: - - __import__('pkg_resources').declare_namespace(__name__) - -This code ensures that the namespace package machinery is operating and that -the current package is registered as a namespace package. - -You must NOT include any other code and data in a namespace package's -``__init__.py``. Even though it may appear to work during development, or when -projects are installed as ``.egg`` files, it will not work when the projects -are installed using "system" packaging tools -- in such cases the -``__init__.py`` files will not be installed, let alone executed. - -You must include the ``declare_namespace()`` line in the ``__init__.py`` of -*every* project that has contents for the namespace package in question, in -order to ensure that the namespace will be declared regardless of which -project's copy of ``__init__.py`` is loaded first. If the first loaded -``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded!) - - -TRANSITIONAL NOTE -~~~~~~~~~~~~~~~~~ - -Setuptools 0.6a automatically calls ``declare_namespace()`` for you at runtime, -but the 0.7a versions will *not*. This is because the automatic declaration -feature has some negative side effects, such as needing to import all namespace -packages during the initialization of the ``pkg_resources`` runtime, and also -the need for ``pkg_resources`` to be explicitly imported before any namespace -packages work at all. Beginning with the 0.7a releases, you'll be responsible -for including your own declaration lines, and the automatic declaration feature -will be dropped to get rid of the negative side effects. - -During the remainder of the 0.6 development cycle, therefore, setuptools will -warn you about missing ``declare_namespace()`` calls in your ``__init__.py`` -files, and you should correct these as soon as possible before setuptools 0.7a1 -is released. Namespace packages without declaration lines will not work -correctly once a user has upgraded to setuptools 0.7a1, so it's important that -you make this change now in order to avoid having your code break in the field. -Our apologies for the inconvenience, and thank you for your patience. - - - -Tagging and "Daily Build" or "Snapshot" Releases ------------------------------------------------- - -When a set of related projects are under development, it may be important to -track finer-grained version increments than you would normally use for e.g. -"stable" releases. While stable releases might be measured in dotted numbers -with alpha/beta/etc. status codes, development versions of a project often -need to be tracked by revision or build number or even build date. This is -especially true when projects in development need to refer to one another, and -therefore may literally need an up-to-the-minute version of something! - -To support these scenarios, ``setuptools`` allows you to "tag" your source and -egg distributions by adding one or more of the following to the project's -"official" version identifier: - -* A manually-specified pre-release tag, such as "build" or "dev", or a - manually-specified post-release tag, such as a build or revision number - (``--tag-build=STRING, -bSTRING``) - -* A "last-modified revision number" string generated automatically from - Subversion's metadata (assuming your project is being built from a Subversion - "working copy") (``--tag-svn-revision, -r``) - -* An 8-character representation of the build date (``--tag-date, -d``), as - a postrelease tag - -You can add these tags by adding ``egg_info`` and the desired options to -the command line ahead of the ``sdist`` or ``bdist`` commands that you want -to generate a daily build or snapshot for. See the section below on the -`egg_info`_ command for more details. - -(Also, before you release your project, be sure to see the section above on -`Specifying Your Project's Version`_ for more information about how pre- and -post-release tags affect how setuptools and EasyInstall interpret version -numbers. This is important in order to make sure that dependency processing -tools will know which versions of your project are newer than others.) - -Finally, if you are creating builds frequently, and either building them in a -downloadable location or are copying them to a distribution server, you should -probably also check out the `rotate`_ command, which lets you automatically -delete all but the N most-recently-modified distributions matching a glob -pattern. So, you can use a command line like:: - - setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 - -to build an egg whose version info includes 'DEV-rNNNN' (where NNNN is the -most recent Subversion revision that affected the source tree), and then -delete any egg files from the distribution directory except for the three -that were built most recently. - -If you have to manage automated builds for multiple packages, each with -different tagging and rotation policies, you may also want to check out the -`alias`_ command, which would let each package define an alias like ``daily`` -that would perform the necessary tag, build, and rotate commands. Then, a -simpler script or cron job could just run ``setup.py daily`` in each project -directory. (And, you could also define sitewide or per-user default versions -of the ``daily`` alias, so that projects that didn't define their own would -use the appropriate defaults.) - - -Generating Source Distributions -------------------------------- - -``setuptools`` enhances the distutils' default algorithm for source file -selection, so that all files managed by CVS or Subversion in your project tree -are included in any source distribution you build. This is a big improvement -over having to manually write a ``MANIFEST.in`` file and try to keep it in -sync with your project. So, if you are using CVS or Subversion, and your -source distributions only need to include files that you're tracking in -revision control, don't create a a ``MANIFEST.in`` file for your project. -(And, if you already have one, you might consider deleting it the next time -you would otherwise have to change it.) - -(NOTE: other revision control systems besides CVS and Subversion can be -supported using plugins; see the section below on `Adding Support for Other -Revision Control Systems`_ for information on how to write such plugins.) - -If you need to include automatically generated files, or files that are kept in -an unsupported revision control system, you'll need to create a ``MANIFEST.in`` -file to specify any files that the default file location algorithm doesn't -catch. See the distutils documentation for more information on the format of -the ``MANIFEST.in`` file. - -But, be sure to ignore any part of the distutils documentation that deals with -``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you -from these issues and doesn't work the same way in any case. Unlike the -distutils, setuptools regenerates the source distribution manifest file -every time you build a source distribution, and it builds it inside the -project's ``.egg-info`` directory, out of the way of your main project -directory. You therefore need not worry about whether it is up-to-date or not. - -Indeed, because setuptools' approach to determining the contents of a source -distribution is so much simpler, its ``sdist`` command omits nearly all of -the options that the distutils' more complex ``sdist`` process requires. For -all practical purposes, you'll probably use only the ``--formats`` option, if -you use any option at all. - -(By the way, if you're using some other revision control system, you might -consider creating and publishing a `revision control plugin for setuptools`_.) - - -.. _revision control plugin for setuptools: `Adding Support for Other Revision Control Systems`_ - - -Making your package available for EasyInstall ---------------------------------------------- - -If you use the ``register`` command (``setup.py register``) to register your -package with PyPI, that's most of the battle right there. (See the -`docs for the register command`_ for more details.) - -.. _docs for the register command: http://docs.python.org/dist/package-index.html - -If you also use the `upload`_ command to upload actual distributions of your -package, that's even better, because EasyInstall will be able to find and -download them directly from your project's PyPI page. - -However, there may be reasons why you don't want to upload distributions to -PyPI, and just want your existing distributions (or perhaps a Subversion -checkout) to be used instead. - -So here's what you need to do before running the ``register`` command. There -are three ``setup()`` arguments that affect EasyInstall: - -``url`` and ``download_url`` - These become links on your project's PyPI page. EasyInstall will examine - them to see if they link to a package ("primary links"), or whether they are - HTML pages. If they're HTML pages, EasyInstall scans all HREF's on the - page for primary links - -``long_description`` - EasyInstall will check any URLs contained in this argument to see if they - are primary links. - -A URL is considered a "primary link" if it is a link to a .tar.gz, .tgz, .zip, -.egg, .egg.zip, .tar.bz2, or .exe file, or if it has an ``#egg=project`` or -``#egg=project-version`` fragment identifier attached to it. EasyInstall -attempts to determine a project name and optional version number from the text -of a primary link *without* downloading it. When it has found all the primary -links, EasyInstall will select the best match based on requested version, -platform compatibility, and other criteria. - -So, if your ``url`` or ``download_url`` point either directly to a downloadable -source distribution, or to HTML page(s) that have direct links to such, then -EasyInstall will be able to locate downloads automatically. If you want to -make Subversion checkouts available, then you should create links with either -``#egg=project`` or ``#egg=project-version`` added to the URL. You should -replace ``project`` and ``version`` with the values they would have in an egg -filename. (Be sure to actually generate an egg and then use the initial part -of the filename, rather than trying to guess what the escaped form of the -project name and version number will be.) - -Note that Subversion checkout links are of lower precedence than other kinds -of distributions, so EasyInstall will not select a Subversion checkout for -downloading unless it has a version included in the ``#egg=`` suffix, and -it's a higher version than EasyInstall has seen in any other links for your -project. - -As a result, it's a common practice to use mark checkout URLs with a version of -"dev" (i.e., ``#egg=projectname-dev``), so that users can do something like -this:: - - easy_install --editable projectname==dev - -in order to check out the in-development version of ``projectname``. - - -Managing "Continuous Releases" Using Subversion ------------------------------------------------ - -If you expect your users to track in-development versions of your project via -Subversion, there are a few additional steps you should take to ensure that -things work smoothly with EasyInstall. First, you should add the following -to your project's ``setup.cfg`` file: - -.. code-block:: ini - - [egg_info] - tag_build = .dev - tag_svn_revision = 1 - -This will tell ``setuptools`` to generate package version numbers like -``1.0a1.dev-r1263``, which will be considered to be an *older* release than -``1.0a1``. Thus, when you actually release ``1.0a1``, the entire egg -infrastructure (including ``setuptools``, ``pkg_resources`` and EasyInstall) -will know that ``1.0a1`` supersedes any interim snapshots from Subversion, and -handle upgrades accordingly. - -(Note: the project version number you specify in ``setup.py`` should always be -the *next* version of your software, not the last released version. -Alternately, you can leave out the ``tag_build=.dev``, and always use the -*last* release as a version number, so that your post-1.0 builds are labelled -``1.0-r1263``, indicating a post-1.0 patchlevel. Most projects so far, -however, seem to prefer to think of their project as being a future version -still under development, rather than a past version being patched. It is of -course possible for a single project to have both situations, using -post-release numbering on release branches, and pre-release numbering on the -trunk. But you don't have to make things this complex if you don't want to.) - -Commonly, projects releasing code from Subversion will include a PyPI link to -their checkout URL (as described in the previous section) with an -``#egg=projectname-dev`` suffix. This allows users to request EasyInstall -to download ``projectname==dev`` in order to get the latest in-development -code. Note that if your project depends on such in-progress code, you may wish -to specify your ``install_requires`` (or other requirements) to include -``==dev``, e.g.: - -.. code-block:: python - - install_requires = ["OtherProject>=0.2a1.dev-r143,==dev"] - -The above example says, "I really want at least this particular development -revision number, but feel free to follow and use an ``#egg=OtherProject-dev`` -link if you find one". This avoids the need to have actual source or binary -distribution snapshots of in-development code available, just to be able to -depend on the latest and greatest a project has to offer. - -A final note for Subversion development: if you are using SVN revision tags -as described in this section, it's a good idea to run ``setup.py develop`` -after each Subversion checkin or update, because your project's version number -will be changing, and your script wrappers need to be updated accordingly. - -Also, if the project's requirements have changed, the ``develop`` command will -take care of fetching the updated dependencies, building changed extensions, -etc. Be sure to also remind any of your users who check out your project -from Subversion that they need to run ``setup.py develop`` after every update -in order to keep their checkout completely in sync. - - -Making "Official" (Non-Snapshot) Releases -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you make an official release, creating source or binary distributions, -you will need to override the tag settings from ``setup.cfg``, so that you -don't end up registering versions like ``foobar-0.7a1.dev-r34832``. This is -easy to do if you are developing on the trunk and using tags or branches for -your releases - just make the change to ``setup.cfg`` after branching or -tagging the release, so the trunk will still produce development snapshots. - -Alternately, if you are not branching for releases, you can override the -default version options on the command line, using something like:: - - python setup.py egg_info -RDb "" sdist bdist_egg register upload - -The first part of this command (``egg_info -RDb ""``) will override the -configured tag information, before creating source and binary eggs, registering -the project with PyPI, and uploading the files. Thus, these commands will use -the plain version from your ``setup.py``, without adding the Subversion -revision number or build designation string. - -Of course, if you will be doing this a lot, you may wish to create a personal -alias for this operation, e.g.:: - - python setup.py alias -u release egg_info -RDb "" - -You can then use it like this:: - - python setup.py release sdist bdist_egg register upload - -Or of course you can create more elaborate aliases that do all of the above. -See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. - - - -Distributing Extensions compiled with Pyrex -------------------------------------------- - -``setuptools`` includes transparent support for building Pyrex extensions, as -long as you define your extensions using ``setuptools.Extension``, *not* -``distutils.Extension``. You must also not import anything from Pyrex in -your setup script. - -If you follow these rules, you can safely list ``.pyx`` files as the source -of your ``Extension`` objects in the setup script. ``setuptools`` will detect -at build time whether Pyrex is installed or not. If it is, then ``setuptools`` -will use it. If not, then ``setuptools`` will silently change the -``Extension`` objects to refer to the ``.c`` counterparts of the ``.pyx`` -files, so that the normal distutils C compilation process will occur. - -Of course, for this to work, your source distributions must include the C -code generated by Pyrex, as well as your original ``.pyx`` files. This means -that you will probably want to include current ``.c`` files in your revision -control system, rebuilding them whenever you check changes in for the ``.pyx`` -source files. This will ensure that people tracking your project in CVS or -Subversion will be able to build it even if they don't have Pyrex installed, -and that your source releases will be similarly usable with or without Pyrex. - - ------------------ -Command Reference ------------------ - -.. _alias: - -``alias`` - Define shortcuts for commonly used commands -======================================================= - -Sometimes, you need to use the same commands over and over, but you can't -necessarily set them as defaults. For example, if you produce both development -snapshot releases and "stable" releases of a project, you may want to put -the distributions in different places, or use different ``egg_info`` tagging -options, etc. In these cases, it doesn't make sense to set the options in -a distutils configuration file, because the values of the options changed based -on what you're trying to do. - -Setuptools therefore allows you to define "aliases" - shortcut names for -an arbitrary string of commands and options, using ``setup.py alias aliasname -expansion``, where aliasname is the name of the new alias, and the remainder of -the command line supplies its expansion. For example, this command defines -a sitewide alias called "daily", that sets various ``egg_info`` tagging -options:: - - setup.py alias --global-config daily egg_info --tag-svn-revision \ - --tag-build=development - -Once the alias is defined, it can then be used with other setup commands, -e.g.:: - - setup.py daily bdist_egg # generate a daily-build .egg file - setup.py daily sdist # generate a daily-build source distro - setup.py daily sdist bdist_egg # generate both - -The above commands are interpreted as if the word ``daily`` were replaced with -``egg_info --tag-svn-revision --tag-build=development``. - -Note that setuptools will expand each alias *at most once* in a given command -line. This serves two purposes. First, if you accidentally create an alias -loop, it will have no effect; you'll instead get an error message about an -unknown command. Second, it allows you to define an alias for a command, that -uses that command. For example, this (project-local) alias:: - - setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg - -redefines the ``bdist_egg`` command so that it always runs the ``rotate`` -command afterwards to delete all but the newest egg file. It doesn't loop -indefinitely on ``bdist_egg`` because the alias is only expanded once when -used. - -You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.:: - - setup.py alias --global-config --remove daily - -would delete the "daily" alias we defined above. - -Aliases can be defined on a project-specific, per-user, or sitewide basis. The -default is to define or remove a project-specific alias, but you can use any of -the `configuration file options`_ (listed under the `saveopts`_ command, below) -to determine which distutils configuration file an aliases will be added to -(or removed from). - -Note that if you omit the "expansion" argument to the ``alias`` command, -you'll get output showing that alias' current definition (and what -configuration file it's defined in). If you omit the alias name as well, -you'll get a listing of all current aliases along with their configuration -file locations. - - -``bdist_egg`` - Create a Python Egg for the project -=================================================== - -This command generates a Python Egg (``.egg`` file) for the project. Python -Eggs are the preferred binary distribution format for EasyInstall, because they -are cross-platform (for "pure" packages), directly importable, and contain -project metadata including scripts and information about the project's -dependencies. They can be simply downloaded and added to ``sys.path`` -directly, or they can be placed in a directory on ``sys.path`` and then -automatically discovered by the egg runtime system. - -This command runs the `egg_info`_ command (if it hasn't already run) to update -the project's metadata (``.egg-info``) directory. If you have added any extra -metadata files to the ``.egg-info`` directory, those files will be included in -the new egg file's metadata directory, for use by the egg runtime system or by -any applications or frameworks that use that metadata. - -You won't usually need to specify any special options for this command; just -use ``bdist_egg`` and you're done. But there are a few options that may -be occasionally useful: - -``--dist-dir=DIR, -d DIR`` - Set the directory where the ``.egg`` file will be placed. If you don't - supply this, then the ``--dist-dir`` setting of the ``bdist`` command - will be used, which is usually a directory named ``dist`` in the project - directory. - -``--plat-name=PLATFORM, -p PLATFORM`` - Set the platform name string that will be embedded in the egg's filename - (assuming the egg contains C extensions). This can be used to override - the distutils default platform name with something more meaningful. Keep - in mind, however, that the egg runtime system expects to see eggs with - distutils platform names, so it may ignore or reject eggs with non-standard - platform names. Similarly, the EasyInstall program may ignore them when - searching web pages for download links. However, if you are - cross-compiling or doing some other unusual things, you might find a use - for this option. - -``--exclude-source-files`` - Don't include any modules' ``.py`` files in the egg, just compiled Python, - C, and data files. (Note that this doesn't affect any ``.py`` files in the - EGG-INFO directory or its subdirectories, since for example there may be - scripts with a ``.py`` extension which must still be retained.) We don't - recommend that you use this option except for packages that are being - bundled for proprietary end-user applications, or for "embedded" scenarios - where space is at an absolute premium. On the other hand, if your package - is going to be installed and used in compressed form, you might as well - exclude the source because Python's ``traceback`` module doesn't currently - understand how to display zipped source code anyway, or how to deal with - files that are in a different place from where their code was compiled. - -There are also some options you will probably never need, but which are there -because they were copied from similar ``bdist`` commands used as an example for -creating this one. They may be useful for testing and debugging, however, -which is why we kept them: - -``--keep-temp, -k`` - Keep the contents of the ``--bdist-dir`` tree around after creating the - ``.egg`` file. - -``--bdist-dir=DIR, -b DIR`` - Set the temporary directory for creating the distribution. The entire - contents of this directory are zipped to create the ``.egg`` file, after - running various installation commands to copy the package's modules, data, - and extensions here. - -``--skip-build`` - Skip doing any "build" commands; just go straight to the - install-and-compress phases. - - -.. _develop: - -``develop`` - Deploy the project source in "Development Mode" -============================================================= - -This command allows you to deploy your project's source for use in one or more -"staging areas" where it will be available for importing. This deployment is -done in such a way that changes to the project source are immediately available -in the staging area(s), without needing to run a build or install step after -each change. - -The ``develop`` command works by creating an ``.egg-link`` file (named for the -project) in the given staging area. If the staging area is Python's -``site-packages`` directory, it also updates an ``easy-install.pth`` file so -that the project is on ``sys.path`` by default for all programs run using that -Python installation. - -The ``develop`` command also installs wrapper scripts in the staging area (or -a separate directory, as specified) that will ensure the project's dependencies -are available on ``sys.path`` before running the project's source scripts. -And, it ensures that any missing project dependencies are available in the -staging area, by downloading and installing them if necessary. - -Last, but not least, the ``develop`` command invokes the ``build_ext -i`` -command to ensure any C extensions in the project have been built and are -up-to-date, and the ``egg_info`` command to ensure the project's metadata is -updated (so that the runtime and wrappers know what the project's dependencies -are). If you make any changes to the project's setup script or C extensions, -you should rerun the ``develop`` command against all relevant staging areas to -keep the project's scripts, metadata and extensions up-to-date. Most other -kinds of changes to your project should not require any build operations or -rerunning ``develop``, but keep in mind that even minor changes to the setup -script (e.g. changing an entry point definition) require you to re-run the -``develop`` or ``test`` commands to keep the distribution updated. - -Here are some of the options that the ``develop`` command accepts. Note that -they affect the project's dependencies as well as the project itself, so if you -have dependencies that need to be installed and you use ``--exclude-scripts`` -(for example), the dependencies' scripts will not be installed either! For -this reason, you may want to use EasyInstall to install the project's -dependencies before using the ``develop`` command, if you need finer control -over the installation options for dependencies. - -``--uninstall, -u`` - Un-deploy the current project. You may use the ``--install-dir`` or ``-d`` - option to designate the staging area. The created ``.egg-link`` file will - be removed, if present and it is still pointing to the project directory. - The project directory will be removed from ``easy-install.pth`` if the - staging area is Python's ``site-packages`` directory. - - Note that this option currently does *not* uninstall script wrappers! You - must uninstall them yourself, or overwrite them by using EasyInstall to - activate a different version of the package. You can also avoid installing - script wrappers in the first place, if you use the ``--exclude-scripts`` - (aka ``-x``) option when you run ``develop`` to deploy the project. - -``--multi-version, -m`` - "Multi-version" mode. Specifying this option prevents ``develop`` from - adding an ``easy-install.pth`` entry for the project(s) being deployed, and - if an entry for any version of a project already exists, the entry will be - removed upon successful deployment. In multi-version mode, no specific - version of the package is available for importing, unless you use - ``pkg_resources.require()`` to put it on ``sys.path``, or you are running - a wrapper script generated by ``setuptools`` or EasyInstall. (In which - case the wrapper script calls ``require()`` for you.) - - Note that if you install to a directory other than ``site-packages``, - this option is automatically in effect, because ``.pth`` files can only be - used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use - the ``--install-dir`` or ``-d`` option (or they are set via configuration - file(s)) your project and its dependencies will be deployed in multi- - version mode. - -``--install-dir=DIR, -d DIR`` - Set the installation directory (staging area). If this option is not - directly specified on the command line or in a distutils configuration - file, the distutils default installation location is used. Normally, this - will be the ``site-packages`` directory, but if you are using distutils - configuration files, setting things like ``prefix`` or ``install_lib``, - then those settings are taken into account when computing the default - staging area. - -``--script-dir=DIR, -s DIR`` - Set the script installation directory. If you don't supply this option - (via the command line or a configuration file), but you *have* supplied - an ``--install-dir`` (via command line or config file), then this option - defaults to the same directory, so that the scripts will be able to find - their associated package installation. Otherwise, this setting defaults - to the location where the distutils would normally install scripts, taking - any distutils configuration file settings into account. - -``--exclude-scripts, -x`` - Don't deploy script wrappers. This is useful if you don't want to disturb - existing versions of the scripts in the staging area. - -``--always-copy, -a`` - Copy all needed distributions to the staging area, even if they - are already present in another directory on ``sys.path``. By default, if - a requirement can be met using a distribution that is already available in - a directory on ``sys.path``, it will not be copied to the staging area. - -``--egg-path=DIR`` - Force the generated ``.egg-link`` file to use a specified relative path - to the source directory. This can be useful in circumstances where your - installation directory is being shared by code running under multiple - platforms (e.g. Mac and Windows) which have different absolute locations - for the code under development, but the same *relative* locations with - respect to the installation directory. If you use this option when - installing, you must supply the same relative path when uninstalling. - -In addition to the above options, the ``develop`` command also accepts all of -the same options accepted by ``easy_install``. If you've configured any -``easy_install`` settings in your ``setup.cfg`` (or other distutils config -files), the ``develop`` command will use them as defaults, unless you override -them in a ``[develop]`` section or on the command line. - - -``easy_install`` - Find and install packages -============================================ - -This command runs the `EasyInstall tool -`_ for you. It is exactly -equivalent to running the ``easy_install`` command. All command line arguments -following this command are consumed and not processed further by the distutils, -so this must be the last command listed on the command line. Please see -the EasyInstall documentation for the options reference and usage examples. -Normally, there is no reason to use this command via the command line, as you -can just use ``easy_install`` directly. It's only listed here so that you know -it's a distutils command, which means that you can: - -* create command aliases that use it, -* create distutils extensions that invoke it as a subcommand, and -* configure options for it in your ``setup.cfg`` or other distutils config - files. - - -.. _egg_info: - -``egg_info`` - Create egg metadata and set build tags -===================================================== - -This command performs two operations: it updates a project's ``.egg-info`` -metadata directory (used by the ``bdist_egg``, ``develop``, and ``test`` -commands), and it allows you to temporarily change a project's version string, -to support "daily builds" or "snapshot" releases. It is run automatically by -the ``sdist``, ``bdist_egg``, ``develop``, ``register``, and ``test`` commands -in order to update the project's metadata, but you can also specify it -explicitly in order to temporarily change the project's version string while -executing other commands. (It also generates the``.egg-info/SOURCES.txt`` -manifest file, which is used when you are building source distributions.) - -In addition to writing the core egg metadata defined by ``setuptools`` and -required by ``pkg_resources``, this command can be extended to write other -metadata files as well, by defining entry points in the ``egg_info.writers`` -group. See the section on `Adding new EGG-INFO Files`_ below for more details. -Note that using additional metadata writers may require you to include a -``setup_requires`` argument to ``setup()`` in order to ensure that the desired -writers are available on ``sys.path``. - - -Release Tagging Options ------------------------ - -The following options can be used to modify the project's version string for -all remaining commands on the setup command line. The options are processed -in the order shown, so if you use more than one, the requested tags will be -added in the following order: - -``--tag-build=NAME, -b NAME`` - Append NAME to the project's version string. Due to the way setuptools - processes "pre-release" version suffixes beginning with the letters "a" - through "e" (like "alpha", "beta", and "candidate"), you will usually want - to use a tag like ".build" or ".dev", as this will cause the version number - to be considered *lower* than the project's default version. (If you - want to make the version number *higher* than the default version, you can - always leave off --tag-build and then use one or both of the following - options.) - - If you have a default build tag set in your ``setup.cfg``, you can suppress - it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument - to the ``egg_info`` command. - -``--tag-svn-revision, -r`` - If the current directory is a Subversion checkout (i.e. has a ``.svn`` - subdirectory, this appends a string of the form "-rNNNN" to the project's - version string, where NNNN is the revision number of the most recent - modification to the current directory, as obtained from the ``svn info`` - command. - - If the current directory is not a Subversion checkout, the command will - look for a ``PKG-INFO`` file instead, and try to find the revision number - from that, by looking for a "-rNNNN" string at the end of the version - number. (This is so that building a package from a source distribution of - a Subversion snapshot will produce a binary with the correct version - number.) - - If there is no ``PKG-INFO`` file, or the version number contained therein - does not end with ``-r`` and a number, then ``-r0`` is used. - -``--no-svn-revision, -R`` - Don't include the Subversion revision in the version number. This option - is included so you can override a default setting put in ``setup.cfg``. - -``--tag-date, -d`` - Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the - project's version number. - -``--no-date, -D`` - Don't include a date stamp in the version number. This option is included - so you can override a default setting in ``setup.cfg``. - - -(Note: Because these options modify the version number used for source and -binary distributions of your project, you should first make sure that you know -how the resulting version numbers will be interpreted by automated tools -like EasyInstall. See the section above on `Specifying Your Project's -Version`_ for an explanation of pre- and post-release tags, as well as tips on -how to choose and verify a versioning scheme for your your project.) - -For advanced uses, there is one other option that can be set, to change the -location of the project's ``.egg-info`` directory. Commands that need to find -the project's source directory or metadata should get it from this setting: - - -Other ``egg_info`` Options --------------------------- - -``--egg-base=SOURCEDIR, -e SOURCEDIR`` - Specify the directory that should contain the .egg-info directory. This - should normally be the root of your project's source tree (which is not - necessarily the same as your project directory; some projects use a ``src`` - or ``lib`` subdirectory as the source root). You should not normally need - to specify this directory, as it is normally determined from the - ``package_dir`` argument to the ``setup()`` function, if any. If there is - no ``package_dir`` set, this option defaults to the current directory. - - -``egg_info`` Examples ---------------------- - -Creating a dated "nightly build" snapshot egg:: - - python setup.py egg_info --tag-date --tag-build=DEV bdist_egg - -Creating and uploading a release with no version tags, even if some default -tags are specified in ``setup.cfg``:: - - python setup.py egg_info -RDb "" sdist bdist_egg register upload - -(Notice that ``egg_info`` must always appear on the command line *before* any -commands that you want the version changes to apply to.) - - -.. _install command: - -``install`` - Run ``easy_install`` or old-style installation -============================================================ - -The setuptools ``install`` command is basically a shortcut to run the -``easy_install`` command on the current project. However, for convenience -in creating "system packages" of setuptools-based projects, you can also -use this option: - -``--single-version-externally-managed`` - This boolean option tells the ``install`` command to perform an "old style" - installation, with the addition of an ``.egg-info`` directory so that the - installed project will still have its metadata available and operate - normally. If you use this option, you *must* also specify the ``--root`` - or ``--record`` options (or both), because otherwise you will have no way - to identify and remove the installed files. - -This option is automatically in effect when ``install`` is invoked by another -distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm`` -will create system packages of eggs. It is also automatically in effect if -you specify the ``--root`` option. - - -``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages`` -============================================================================== - -Setuptools runs this command as part of ``install`` operations that use the -``--single-version-externally-managed`` options. You should not invoke it -directly; it is documented here for completeness and so that distutils -extensions such as system package builders can make use of it. This command -has only one option: - -``--install-dir=DIR, -d DIR`` - The parent directory where the ``.egg-info`` directory will be placed. - Defaults to the same as the ``--install-dir`` option specified for the - ``install_lib`` command, which is usually the system ``site-packages`` - directory. - -This command assumes that the ``egg_info`` command has been given valid options -via the command line or ``setup.cfg``, as it will invoke the ``egg_info`` -command and use its options to locate the project's source ``.egg-info`` -directory. - - -.. _rotate: - -``rotate`` - Delete outdated distribution files -=============================================== - -As you develop new versions of your project, your distribution (``dist``) -directory will gradually fill up with older source and/or binary distribution -files. The ``rotate`` command lets you automatically clean these up, keeping -only the N most-recently modified files matching a given pattern. - -``--match=PATTERNLIST, -m PATTERNLIST`` - Comma-separated list of glob patterns to match. This option is *required*. - The project name and ``-*`` is prepended to the supplied patterns, in order - to match only distributions belonging to the current project (in case you - have a shared distribution directory for multiple projects). Typically, - you will use a glob pattern like ``.zip`` or ``.egg`` to match files of - the specified type. Note that each supplied pattern is treated as a - distinct group of files for purposes of selecting files to delete. - -``--keep=COUNT, -k COUNT`` - Number of matching distributions to keep. For each group of files - identified by a pattern specified with the ``--match`` option, delete all - but the COUNT most-recently-modified files in that group. This option is - *required*. - -``--dist-dir=DIR, -d DIR`` - Directory where the distributions are. This defaults to the value of the - ``bdist`` command's ``--dist-dir`` option, which will usually be the - project's ``dist`` subdirectory. - -**Example 1**: Delete all .tar.gz files from the distribution directory, except -for the 3 most recently modified ones:: - - setup.py rotate --match=.tar.gz --keep=3 - -**Example 2**: Delete all Python 2.3 or Python 2.4 eggs from the distribution -directory, except the most recently modified one for each Python version:: - - setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1 - - -.. _saveopts: - -``saveopts`` - Save used options to a configuration file -======================================================== - -Finding and editing ``distutils`` configuration files can be a pain, especially -since you also have to translate the configuration options from command-line -form to the proper configuration file format. You can avoid these hassles by -using the ``saveopts`` command. Just add it to the command line to save the -options you used. For example, this command builds the project using -the ``mingw32`` C compiler, then saves the --compiler setting as the default -for future builds (even those run implicitly by the ``install`` command):: - - setup.py build --compiler=mingw32 saveopts - -The ``saveopts`` command saves all options for every commmand specified on the -command line to the project's local ``setup.cfg`` file, unless you use one of -the `configuration file options`_ to change where the options are saved. For -example, this command does the same as above, but saves the compiler setting -to the site-wide (global) distutils configuration:: - - setup.py build --compiler=mingw32 saveopts -g - -Note that it doesn't matter where you place the ``saveopts`` command on the -command line; it will still save all the options specified for all commands. -For example, this is another valid way to spell the last example:: - - setup.py saveopts -g build --compiler=mingw32 - -Note, however, that all of the commands specified are always run, regardless of -where ``saveopts`` is placed on the command line. - - -Configuration File Options --------------------------- - -Normally, settings such as options and aliases are saved to the project's -local ``setup.cfg`` file. But you can override this and save them to the -global or per-user configuration files, or to a manually-specified filename. - -``--global-config, -g`` - Save settings to the global ``distutils.cfg`` file inside the ``distutils`` - package directory. You must have write access to that directory to use - this option. You also can't combine this option with ``-u`` or ``-f``. - -``--user-config, -u`` - Save settings to the current user's ``~/.pydistutils.cfg`` (POSIX) or - ``$HOME/pydistutils.cfg`` (Windows) file. You can't combine this option - with ``-g`` or ``-f``. - -``--filename=FILENAME, -f FILENAME`` - Save settings to the specified configuration file to use. You can't - combine this option with ``-g`` or ``-u``. Note that if you specify a - non-standard filename, the ``distutils`` and ``setuptools`` will not - use the file's contents. This option is mainly included for use in - testing. - -These options are used by other ``setuptools`` commands that modify -configuration files, such as the `alias`_ and `setopt`_ commands. - - -.. _setopt: - -``setopt`` - Set a distutils or setuptools option in a config file -================================================================== - -This command is mainly for use by scripts, but it can also be used as a quick -and dirty way to change a distutils configuration option without having to -remember what file the options are in and then open an editor. - -**Example 1**. Set the default C compiler to ``mingw32`` (using long option -names):: - - setup.py setopt --command=build --option=compiler --set-value=mingw32 - -**Example 2**. Remove any setting for the distutils default package -installation directory (short option names):: - - setup.py setopt -c install -o install_lib -r - - -Options for the ``setopt`` command: - -``--command=COMMAND, -c COMMAND`` - Command to set the option for. This option is required. - -``--option=OPTION, -o OPTION`` - The name of the option to set. This option is required. - -``--set-value=VALUE, -s VALUE`` - The value to set the option to. Not needed if ``-r`` or ``--remove`` is - set. - -``--remove, -r`` - Remove (unset) the option, instead of setting it. - -In addition to the above options, you may use any of the `configuration file -options`_ (listed under the `saveopts`_ command, above) to determine which -distutils configuration file the option will be added to (or removed from). - - -.. _test: - -``test`` - Build package and run a unittest suite -================================================= - -When doing test-driven development, or running automated builds that need -testing before they are deployed for downloading or use, it's often useful -to be able to run a project's unit tests without actually deploying the project -anywhere, even using the ``develop`` command. The ``test`` command runs a -project's unit tests without actually deploying it, by temporarily putting the -project's source on ``sys.path``, after first running ``build_ext -i`` and -``egg_info`` to ensure that any C extensions and project metadata are -up-to-date. - -To use this command, your project's tests must be wrapped in a ``unittest`` -test suite by either a function, a ``TestCase`` class or method, or a module -or package containing ``TestCase`` classes. If the named suite is a module, -and the module has an ``additional_tests()`` function, it is called and the -result (which must be a ``unittest.TestSuite``) is added to the tests to be -run. If the named suite is a package, any submodules and subpackages are -recursively added to the overall test suite. (Note: if your project specifies -a ``test_loader``, the rules for processing the chosen ``test_suite`` may -differ; see the `test_loader`_ documentation for more details.) - -Note that many test systems including ``doctest`` support wrapping their -non-``unittest`` tests in ``TestSuite`` objects. So, if you are using a test -package that does not support this, we suggest you encourage its developers to -implement test suite support, as this is a convenient and standard way to -aggregate a collection of tests to be run under a common test harness. - -By default, tests will be run in the "verbose" mode of the ``unittest`` -package's text test runner, but you can get the "quiet" mode (just dots) if -you supply the ``-q`` or ``--quiet`` option, either as a global option to -the setup script (e.g. ``setup.py -q test``) or as an option for the ``test`` -command itself (e.g. ``setup.py test -q``). There is one other option -available: - -``--test-suite=NAME, -s NAME`` - Specify the test suite (or module, class, or method) to be run - (e.g. ``some_module.test_suite``). The default for this option can be - set by giving a ``test_suite`` argument to the ``setup()`` function, e.g.:: - - setup( - # ... - test_suite = "my_package.tests.test_all" - ) - - If you did not set a ``test_suite`` in your ``setup()`` call, and do not - provide a ``--test-suite`` option, an error will occur. - - -.. _upload: - -``upload`` - Upload source and/or egg distributions to PyPI -=========================================================== - -PyPI now supports uploading project files for redistribution; uploaded files -are easily found by EasyInstall, even if you don't have download links on your -project's home page. - -Although Python 2.5 will support uploading all types of distributions to PyPI, -setuptools only supports source distributions and eggs. (This is partly -because PyPI's upload support is currently broken for various other file -types.) To upload files, you must include the ``upload`` command *after* the -``sdist`` or ``bdist_egg`` commands on the setup command line. For example:: - - setup.py bdist_egg upload # create an egg and upload it - setup.py sdist upload # create a source distro and upload it - setup.py sdist bdist_egg upload # create and upload both - -Note that to upload files for a project, the corresponding version must already -be registered with PyPI, using the distutils ``register`` command. It's -usually a good idea to include the ``register`` command at the start of the -command line, so that any registration problems can be found and fixed before -building and uploading the distributions, e.g.:: - - setup.py register sdist bdist_egg upload - -This will update PyPI's listing for your project's current version. - -Note, by the way, that the metadata in your ``setup()`` call determines what -will be listed in PyPI for your package. Try to fill out as much of it as -possible, as it will save you a lot of trouble manually adding and updating -your PyPI listings. Just put it in ``setup.py`` and use the ``register`` -comamnd to keep PyPI up to date. - -The ``upload`` command has a few options worth noting: - -``--sign, -s`` - Sign each uploaded file using GPG (GNU Privacy Guard). The ``gpg`` program - must be available for execution on the system ``PATH``. - -``--identity=NAME, -i NAME`` - Specify the identity or key name for GPG to use when signing. The value of - this option will be passed through the ``--local-user`` option of the - ``gpg`` program. - -``--show-response`` - Display the full response text from server; this is useful for debugging - PyPI problems. - -``--repository=URL, -r URL`` - The URL of the repository to upload to. Defaults to - http://pypi.python.org/pypi (i.e., the main PyPI installation). - -.. _upload_docs: - -``upload_docs`` - Upload package documentation to PyPI -====================================================== - -PyPI now supports uploading project documentation to the dedicated URL -http://packages.python.org//. - -The ``upload_docs`` command will create the necessary zip file out of a -documentation directory and will post to the repository. - -Note that to upload the documentation of a project, the corresponding version -must already be registered with PyPI, using the distutils ``register`` -command -- just like the ``upload`` command. - -Assuming there is an ``Example`` project with documentation in the -subdirectory ``docs``, e.g.:: - - Example/ - |-- example.py - |-- setup.cfg - |-- setup.py - |-- docs - | |-- build - | | `-- html - | | | |-- index.html - | | | `-- tips_tricks.html - | |-- conf.py - | |-- index.txt - | `-- tips_tricks.txt - -You can simply pass the documentation directory path to the ``upload_docs`` -command:: - - python setup.py upload_docs --upload-dir=docs/build/html - -If no ``--upload-dir`` is given, ``upload_docs`` will attempt to run the -``build_sphinx`` command to generate uploadable documentation. -For the command to become available, `Sphinx `_ -must be installed in the same environment as distribute. - -As with other ``setuptools``-based commands, you can define useful -defaults in the ``setup.cfg`` of your Python project, e.g.: - -.. code-block:: ini - - [upload_docs] - upload-dir = docs/build/html - -The ``upload_docs`` command has the following options: - -``--upload-dir`` - The directory to be uploaded to the repository. - -``--show-response`` - Display the full response text from server; this is useful for debugging - PyPI problems. - -``--repository=URL, -r URL`` - The URL of the repository to upload to. Defaults to - http://pypi.python.org/pypi (i.e., the main PyPI installation). - - --------------------------------- -Extending and Reusing Distribute --------------------------------- - -Creating ``distutils`` Extensions -================================= - -It can be hard to add new commands or setup arguments to the distutils. But -the ``setuptools`` package makes it a bit easier, by allowing you to distribute -a distutils extension as a separate project, and then have projects that need -the extension just refer to it in their ``setup_requires`` argument. - -With ``setuptools``, your distutils extension projects can hook in new -commands and ``setup()`` arguments just by defining "entry points". These -are mappings from command or argument names to a specification of where to -import a handler from. (See the section on `Dynamic Discovery of Services and -Plugins`_ above for some more background on entry points.) - - -Adding Commands ---------------- - -You can add new ``setup`` commands by defining entry points in the -``distutils.commands`` group. For example, if you wanted to add a ``foo`` -command, you might add something like this to your distutils extension -project's setup script:: - - setup( - # ... - entry_points = { - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - }, - ) - -(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is -a ``setuptools.Command`` subclass.) - -Once a project containing such entry points has been activated on ``sys.path``, -(e.g. by running "install" or "develop" with a site-packages installation -directory) the command(s) will be available to any ``setuptools``-based setup -scripts. It is not necessary to use the ``--command-packages`` option or -to monkeypatch the ``distutils.command`` package to install your commands; -``setuptools`` automatically adds a wrapper to the distutils to search for -entry points in the active distributions on ``sys.path``. In fact, this is -how setuptools' own commands are installed: the setuptools project's setup -script defines entry points for them! - - -Adding ``setup()`` Arguments ----------------------------- - -Sometimes, your commands may need additional arguments to the ``setup()`` -call. You can enable this by defining entry points in the -``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` -argument called ``bar_baz``, you might add something like this to your -distutils extension project's setup script:: - - setup( - # ... - entry_points = { - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - "distutils.setup_keywords": [ - "bar_baz = mypackage.some_module:validate_bar_baz", - ], - }, - ) - -The idea here is that the entry point defines a function that will be called -to validate the ``setup()`` argument, if it's supplied. The ``Distribution`` -object will have the initial value of the attribute set to ``None``, and the -validation function will only be called if the ``setup()`` call sets it to -a non-None value. Here's an example validation function:: - - def assert_bool(dist, attr, value): - """Verify that value is True, False, 0, or 1""" - if bool(value) != value: - raise DistutilsSetupError( - "%r must be a boolean value (got %r)" % (attr,value) - ) - -Your function should accept three arguments: the ``Distribution`` object, -the attribute name, and the attribute value. It should raise a -``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument -is invalid. Remember, your function will only be called with non-None values, -and the default value of arguments defined this way is always None. So, your -commands should always be prepared for the possibility that the attribute will -be ``None`` when they access it later. - -If more than one active distribution defines an entry point for the same -``setup()`` argument, *all* of them will be called. This allows multiple -distutils extensions to define a common argument, as long as they agree on -what values of that argument are valid. - -Also note that as with commands, it is not necessary to subclass or monkeypatch -the distutils ``Distribution`` class in order to add your arguments; it is -sufficient to define the entry points in your extension, as long as any setup -script using your extension lists your project in its ``setup_requires`` -argument. - - -Adding new EGG-INFO Files -------------------------- - -Some extensible applications or frameworks may want to allow third parties to -develop plugins with application or framework-specific metadata included in -the plugins' EGG-INFO directory, for easy access via the ``pkg_resources`` -metadata API. The easiest way to allow this is to create a distutils extension -to be used from the plugin projects' setup scripts (via ``setup_requires``) -that defines a new setup keyword, and then uses that data to write an EGG-INFO -file when the ``egg_info`` command is run. - -The ``egg_info`` command looks for extension points in an ``egg_info.writers`` -group, and calls them to write the files. Here's a simple example of a -distutils extension defining a setup argument ``foo_bar``, which is a list of -lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any -project that uses the argument:: - - setup( - # ... - entry_points = { - "distutils.setup_keywords": [ - "foo_bar = setuptools.dist:assert_string_list", - ], - "egg_info.writers": [ - "foo_bar.txt = setuptools.command.egg_info:write_arg", - ], - }, - ) - -This simple example makes use of two utility functions defined by setuptools -for its own use: a routine to validate that a setup keyword is a sequence of -strings, and another one that looks up a setup argument and writes it to -a file. Here's what the writer utility looks like:: - - def write_arg(cmd, basename, filename): - argname = os.path.splitext(basename)[0] - value = getattr(cmd.distribution, argname, None) - if value is not None: - value = '\n'.join(value)+'\n' - cmd.write_or_delete_file(argname, filename, value) - -As you can see, ``egg_info.writers`` entry points must be a function taking -three arguments: a ``egg_info`` command instance, the basename of the file to -write (e.g. ``foo_bar.txt``), and the actual full filename that should be -written to. - -In general, writer functions should honor the command object's ``dry_run`` -setting when writing files, and use the ``distutils.log`` object to do any -console output. The easiest way to conform to this requirement is to use -the ``cmd`` object's ``write_file()``, ``delete_file()``, and -``write_or_delete_file()`` methods exclusively for your file operations. See -those methods' docstrings for more details. - - -Adding Support for Other Revision Control Systems -------------------------------------------------- - -If you would like to create a plugin for ``setuptools`` to find files in other -source control systems besides CVS and Subversion, you can do so by adding an -entry point to the ``setuptools.file_finders`` group. The entry point should -be a function accepting a single directory name, and should yield -all the filenames within that directory (and any subdirectories thereof) that -are under revision control. - -For example, if you were going to create a plugin for a revision control system -called "foobar", you would write a function something like this: - -.. code-block:: python - - def find_files_for_foobar(dirname): - # loop to yield paths that start with `dirname` - -And you would register it in a setup script using something like this:: - - entry_points = { - "setuptools.file_finders": [ - "foobar = my_foobar_module:find_files_for_foobar" - ] - } - -Then, anyone who wants to use your plugin can simply install it, and their -local setuptools installation will be able to find the necessary files. - -It is not necessary to distribute source control plugins with projects that -simply use the other source control system, or to specify the plugins in -``setup_requires``. When you create a source distribution with the ``sdist`` -command, setuptools automatically records what files were found in the -``SOURCES.txt`` file. That way, recipients of source distributions don't need -to have revision control at all. However, if someone is working on a package -by checking out with that system, they will need the same plugin(s) that the -original author is using. - -A few important points for writing revision control file finders: - -* Your finder function MUST return relative paths, created by appending to the - passed-in directory name. Absolute paths are NOT allowed, nor are relative - paths that reference a parent directory of the passed-in directory. - -* Your finder function MUST accept an empty string as the directory name, - meaning the current directory. You MUST NOT convert this to a dot; just - yield relative paths. So, yielding a subdirectory named ``some/dir`` under - the current directory should NOT be rendered as ``./some/dir`` or - ``/somewhere/some/dir``, but *always* as simply ``some/dir`` - -* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully - with the absence of needed programs (i.e., ones belonging to the revision - control system itself. It *may*, however, use ``distutils.log.warn()`` to - inform the user of the missing program(s). - - -Subclassing ``Command`` ------------------------ - -Sorry, this section isn't written yet, and neither is a lot of what's below -this point, except for the change log. You might want to `subscribe to changes -in this page `_ to see when new documentation is -added or updated. - -XXX - - -Reusing ``setuptools`` Code -=========================== - -``distribute_setup`` --------------------- - -XXX - - -``setuptools.archive_util`` ---------------------------- - -XXX - - -``setuptools.sandbox`` ----------------------- - -XXX - - -``setuptools.package_index`` ----------------------------- - -XXX - -History -======= - -0.6c9 - * Fixed a missing files problem when using Windows source distributions on - non-Windows platforms, due to distutils not handling manifest file line - endings correctly. - - * Updated Pyrex support to work with Pyrex 0.9.6 and higher. - - * Minor changes for Jython compatibility, including skipping tests that can't - work on Jython. - - * Fixed not installing eggs in ``install_requires`` if they were also used for - ``setup_requires`` or ``tests_require``. - - * Fixed not fetching eggs in ``install_requires`` when running tests. - - * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools - installations when called from a standalone ``setup.py``. - - * Added a warning if a namespace package is declared, but its parent package - is not also declared as a namespace. - - * Support Subversion 1.5 - - * Removed use of deprecated ``md5`` module if ``hashlib`` is available - - * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice - - * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's - ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``. - - * Ensure that _full_name is set on all shared libs before extensions are - checked for shared lib usage. (Fixes a bug in the experimental shared - library build support.) - - * Fix to allow unpacked eggs containing native libraries to fail more - gracefully under Google App Engine (with an ``ImportError`` loading the - C-based module, instead of getting a ``NameError``). - -0.6c7 - * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and - ``egg_info`` command failing on new, uncommitted SVN directories. - - * Fix import problems with nested namespace packages installed via - ``--root`` or ``--single-version-externally-managed``, due to the - parent package not having the child package as an attribute. - -0.6c6 - * Added ``--egg-path`` option to ``develop`` command, allowing you to force - ``.egg-link`` files to use relative paths (allowing them to be shared across - platforms on a networked drive). - - * Fix not building binary RPMs correctly. - - * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with - bash-compatible shells. - - * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there - was whitespace inside a quoted argument or at the end of the ``#!`` line - (a regression introduced in 0.6c4). - - * Fix ``test`` command possibly failing if an older version of the project - being tested was installed on ``sys.path`` ahead of the test source - directory. - - * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in - their names as packages. - -0.6c5 - * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg`` - packages under Python versions less than 2.5. - - * Fix uploaded ``bdist_wininst`` packages being described as suitable for - "any" version by Python 2.5, even if a ``--target-version`` was specified. - -0.6c4 - * Overhauled Windows script wrapping to support ``bdist_wininst`` better. - Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or - ``#!pythonw.exe`` as the executable name (even when built on non-Windows - platforms!), and the wrappers will look for the executable in the script's - parent directory (which should find the right version of Python). - - * Fix ``upload`` command not uploading files built by ``bdist_rpm`` or - ``bdist_wininst`` under Python 2.3 and 2.4. - - * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is - prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish - platforms. (This is mainly so that setuptools itself can have a single-file - installer on Unix, without doing multiple downloads, dealing with firewalls, - etc.) - - * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files - - * Use cross-platform relative paths in ``easy-install.pth`` when doing - ``develop`` and the source directory is a subdirectory of the installation - target directory. - - * Fix a problem installing eggs with a system packaging tool if the project - contained an implicit namespace package; for example if the ``setup()`` - listed a namespace package ``foo.bar`` without explicitly listing ``foo`` - as a namespace package. - -0.6c3 - * Fixed breakages caused by Subversion 1.4's new "working copy" format - -0.6c2 - * The ``ez_setup`` module displays the conflicting version of setuptools (and - its installation location) when a script requests a version that's not - available. - - * Running ``setup.py develop`` on a setuptools-using project will now install - setuptools if needed, instead of only downloading the egg. - -0.6c1 - * Fixed ``AttributeError`` when trying to download a ``setup_requires`` - dependency when a distribution lacks a ``dependency_links`` setting. - - * Made ``zip-safe`` and ``not-zip-safe`` flag files contain a single byte, so - as to play better with packaging tools that complain about zero-length - files. - - * Made ``setup.py develop`` respect the ``--no-deps`` option, which it - previously was ignoring. - - * Support ``extra_path`` option to ``setup()`` when ``install`` is run in - backward-compatibility mode. - - * Source distributions now always include a ``setup.cfg`` file that explicitly - sets ``egg_info`` options such that they produce an identical version number - to the source distribution's version number. (Previously, the default - version number could be different due to the use of ``--tag-date``, or if - the version was overridden on the command line that built the source - distribution.) - -0.6b4 - * Fix ``register`` not obeying name/version set by ``egg_info`` command, if - ``egg_info`` wasn't explicitly run first on the same command line. - - * Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info`` - command, to allow suppressing tags configured in ``setup.cfg``. - - * Fixed redundant warnings about missing ``README`` file(s); it should now - appear only if you are actually a source distribution. - -0.6b3 - * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``. - - * Allow ``.py`` files found by the ``include_package_data`` option to be - automatically included. Remove duplicate data file matches if both - ``include_package_data`` and ``package_data`` are used to refer to the same - files. - -0.6b1 - * Strip ``module`` from the end of compiled extension modules when computing - the name of a ``.py`` loader/wrapper. (Python's import machinery ignores - this suffix when searching for an extension module.) - -0.6a11 - * Added ``test_loader`` keyword to support custom test loaders - - * Added ``setuptools.file_finders`` entry point group to allow implementing - revision control plugins. - - * Added ``--identity`` option to ``upload`` command. - - * Added ``dependency_links`` to allow specifying URLs for ``--find-links``. - - * Enhanced test loader to scan packages as well as modules, and call - ``additional_tests()`` if present to get non-unittest tests. - - * Support namespace packages in conjunction with system packagers, by omitting - the installation of any ``__init__.py`` files for namespace packages, and - adding a special ``.pth`` file to create a working package in - ``sys.modules``. - - * Made ``--single-version-externally-managed`` automatic when ``--root`` is - used, so that most system packagers won't require special support for - setuptools. - - * Fixed ``setup_requires``, ``tests_require``, etc. not using ``setup.cfg`` or - other configuration files for their option defaults when installing, and - also made the install use ``--multi-version`` mode so that the project - directory doesn't need to support .pth files. - - * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading - it. Previously, the file could be left open and the actual error would be - masked by problems trying to remove the open file on Windows systems. - -0.6a10 - * Fixed the ``develop`` command ignoring ``--find-links``. - -0.6a9 - * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to - create source distributions. ``MANIFEST.in`` is still read and processed, - as are the standard defaults and pruning. But the manifest is built inside - the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt - every time the ``egg_info`` command is run. - - * Added the ``include_package_data`` keyword to ``setup()``, allowing you to - automatically include any package data listed in revision control or - ``MANIFEST.in`` - - * Added the ``exclude_package_data`` keyword to ``setup()``, allowing you to - trim back files included via the ``package_data`` and - ``include_package_data`` options. - - * Fixed ``--tag-svn-revision`` not working when run from a source - distribution. - - * Added warning for namespace packages with missing ``declare_namespace()`` - - * Added ``tests_require`` keyword to ``setup()``, so that e.g. packages - requiring ``nose`` to run unit tests can make this dependency optional - unless the ``test`` command is run. - - * Made all commands that use ``easy_install`` respect its configuration - options, as this was causing some problems with ``setup.py install``. - - * Added an ``unpack_directory()`` driver to ``setuptools.archive_util``, so - that you can process a directory tree through a processing filter as if it - were a zipfile or tarfile. - - * Added an internal ``install_egg_info`` command to use as part of old-style - ``install`` operations, that installs an ``.egg-info`` directory with the - package. - - * Added a ``--single-version-externally-managed`` option to the ``install`` - command so that you can more easily wrap a "flat" egg in a system package. - - * Enhanced ``bdist_rpm`` so that it installs single-version eggs that - don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, - since all RPMs are now built in a more backwards-compatible format. - - * Support full roundtrip translation of eggs to and from ``bdist_wininst`` - format. Running ``bdist_wininst`` on a setuptools-based package wraps the - egg in an .exe that will safely install it as an egg (i.e., with metadata - and entry-point wrapper scripts), and ``easy_install`` can turn the .exe - back into an ``.egg`` file or directory and install it as such. - - -0.6a8 - * Fixed some problems building extensions when Pyrex was installed, especially - with Python 2.4 and/or packages using SWIG. - - * Made ``develop`` command accept all the same options as ``easy_install``, - and use the ``easy_install`` command's configuration settings as defaults. - - * Made ``egg_info --tag-svn-revision`` fall back to extracting the revision - number from ``PKG-INFO`` in case it is being run on a source distribution of - a snapshot taken from a Subversion-based project. - - * Automatically detect ``.dll``, ``.so`` and ``.dylib`` files that are being - installed as data, adding them to ``native_libs.txt`` automatically. - - * Fixed some problems with fresh checkouts of projects that don't include - ``.egg-info/PKG-INFO`` under revision control and put the project's source - code directly in the project directory. If such a package had any - requirements that get processed before the ``egg_info`` command can be run, - the setup scripts would fail with a "Missing 'Version:' header and/or - PKG-INFO file" error, because the egg runtime interpreted the unbuilt - metadata in a directory on ``sys.path`` (i.e. the current directory) as - being a corrupted egg. Setuptools now monkeypatches the distribution - metadata cache to pretend that the egg has valid version information, until - it has a chance to make it actually be so (via the ``egg_info`` command). - -0.6a5 - * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. - -0.6a3 - * Added ``gui_scripts`` entry point group to allow installing GUI scripts - on Windows and other platforms. (The special handling is only for Windows; - other platforms are treated the same as for ``console_scripts``.) - -0.6a2 - * Added ``console_scripts`` entry point group to allow installing scripts - without the need to create separate script files. On Windows, console - scripts get an ``.exe`` wrapper so you can just type their name. On other - platforms, the scripts are written without a file extension. - -0.6a1 - * Added support for building "old-style" RPMs that don't install an egg for - the target package, using a ``--no-egg`` option. - - * The ``build_ext`` command now works better when using the ``--inplace`` - option and multiple Python versions. It now makes sure that all extensions - match the current Python version, even if newer copies were built for a - different Python version. - - * The ``upload`` command no longer attaches an extra ``.zip`` when uploading - eggs, as PyPI now supports egg uploads without trickery. - - * The ``ez_setup`` script/module now displays a warning before downloading - the setuptools egg, and attempts to check the downloaded egg against an - internal MD5 checksum table. - - * Fixed the ``--tag-svn-revision`` option of ``egg_info`` not finding the - latest revision number; it was using the revision number of the directory - containing ``setup.py``, not the highest revision number in the project. - - * Added ``eager_resources`` setup argument - - * The ``sdist`` command now recognizes Subversion "deleted file" entries and - does not include them in source distributions. - - * ``setuptools`` now embeds itself more thoroughly into the distutils, so that - other distutils extensions (e.g. py2exe, py2app) will subclass setuptools' - versions of things, rather than the native distutils ones. - - * Added ``entry_points`` and ``setup_requires`` arguments to ``setup()``; - ``setup_requires`` allows you to automatically find and download packages - that are needed in order to *build* your project (as opposed to running it). - - * ``setuptools`` now finds its commands, ``setup()`` argument validators, and - metadata writers using entry points, so that they can be extended by - third-party packages. See `Creating distutils Extensions`_ above for more - details. - - * The vestigial ``depends`` command has been removed. It was never finished - or documented, and never would have worked without EasyInstall - which it - pre-dated and was never compatible with. - -0.5a12 - * The zip-safety scanner now checks for modules that might be used with - ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't - handle ``-m`` on zipped modules. - -0.5a11 - * Fix breakage of the "develop" command that was caused by the addition of - ``--always-unzip`` to the ``easy_install`` command. - -0.5a9 - * Include ``svn:externals`` directories in source distributions as well as - normal subversion-controlled files and directories. - - * Added ``exclude=patternlist`` option to ``setuptools.find_packages()`` - - * Changed --tag-svn-revision to include an "r" in front of the revision number - for better readability. - - * Added ability to build eggs without including source files (except for any - scripts, of course), using the ``--exclude-source-files`` option to - ``bdist_egg``. - - * ``setup.py install`` now automatically detects when an "unmanaged" package - or module is going to be on ``sys.path`` ahead of a package being installed, - thereby preventing the newer version from being imported. If this occurs, - a warning message is output to ``sys.stderr``, but installation proceeds - anyway. The warning message informs the user what files or directories - need deleting, and advises them they can also use EasyInstall (with the - ``--delete-conflicting`` option) to do it automatically. - - * The ``egg_info`` command now adds a ``top_level.txt`` file to the metadata - directory that lists all top-level modules and packages in the distribution. - This is used by the ``easy_install`` command to find possibly-conflicting - "unmanaged" packages when installing the distribution. - - * Added ``zip_safe`` and ``namespace_packages`` arguments to ``setup()``. - Added package analysis to determine zip-safety if the ``zip_safe`` flag - is not given, and advise the author regarding what code might need changing. - - * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``. - -0.5a8 - * The "egg_info" command now always sets the distribution metadata to "safe" - forms of the distribution name and version, so that distribution files will - be generated with parseable names (i.e., ones that don't include '-' in the - name or version). Also, this means that if you use the various ``--tag`` - options of "egg_info", any distributions generated will use the tags in the - version, not just egg distributions. - - * Added support for defining command aliases in distutils configuration files, - under the "[aliases]" section. To prevent recursion and to allow aliases to - call the command of the same name, a given alias can be expanded only once - per command-line invocation. You can define new aliases with the "alias" - command, either for the local, global, or per-user configuration. - - * Added "rotate" command to delete old distribution files, given a set of - patterns to match and the number of files to keep. (Keeps the most - recently-modified distribution files matching each pattern.) - - * Added "saveopts" command that saves all command-line options for the current - invocation to the local, global, or per-user configuration file. Useful for - setting defaults without having to hand-edit a configuration file. - - * Added a "setopt" command that sets a single option in a specified distutils - configuration file. - -0.5a7 - * Added "upload" support for egg and source distributions, including a bug - fix for "upload" and a temporary workaround for lack of .egg support in - PyPI. - -0.5a6 - * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it - will include all files under revision control (CVS or Subversion) in the - current directory, and it will regenerate the list every time you create a - source distribution, not just when you tell it to. This should make the - default "do what you mean" more often than the distutils' default behavior - did, while still retaining the old behavior in the presence of MANIFEST.in. - - * Fixed the "develop" command always updating .pth files, even if you - specified ``-n`` or ``--dry-run``. - - * Slightly changed the format of the generated version when you use - ``--tag-build`` on the "egg_info" command, so that you can make tagged - revisions compare *lower* than the version specified in setup.py (e.g. by - using ``--tag-build=dev``). - -0.5a5 - * Added ``develop`` command to ``setuptools``-based packages. This command - installs an ``.egg-link`` pointing to the package's source directory, and - script wrappers that ``execfile()`` the source versions of the package's - scripts. This lets you put your development checkout(s) on sys.path without - having to actually install them. (To uninstall the link, use - use ``setup.py develop --uninstall``.) - - * Added ``egg_info`` command to ``setuptools``-based packages. This command - just creates or updates the "projectname.egg-info" directory, without - building an egg. (It's used by the ``bdist_egg``, ``test``, and ``develop`` - commands.) - - * Enhanced the ``test`` command so that it doesn't install the package, but - instead builds any C extensions in-place, updates the ``.egg-info`` - metadata, adds the source directory to ``sys.path``, and runs the tests - directly on the source. This avoids an "unmanaged" installation of the - package to ``site-packages`` or elsewhere. - - * Made ``easy_install`` a standard ``setuptools`` command, moving it from - the ``easy_install`` module to ``setuptools.command.easy_install``. Note - that if you were importing or extending it, you must now change your imports - accordingly. ``easy_install.py`` is still installed as a script, but not as - a module. - -0.5a4 - * Setup scripts using setuptools can now list their dependencies directly in - the setup.py file, without having to manually create a ``depends.txt`` file. - The ``install_requires`` and ``extras_require`` arguments to ``setup()`` - are used to create a dependencies file automatically. If you are manually - creating ``depends.txt`` right now, please switch to using these setup - arguments as soon as practical, because ``depends.txt`` support will be - removed in the 0.6 release cycle. For documentation on the new arguments, - see the ``setuptools.dist.Distribution`` class. - - * Setup scripts using setuptools now always install using ``easy_install`` - internally, for ease of uninstallation and upgrading. - -0.5a1 - * Added support for "self-installation" bootstrapping. Packages can now - include ``ez_setup.py`` in their source distribution, and add the following - to their ``setup.py``, in order to automatically bootstrap installation of - setuptools as part of their setup process:: - - from ez_setup import use_setuptools - use_setuptools() - - from setuptools import setup - # etc... - -0.4a2 - * Added ``ez_setup.py`` installer/bootstrap script to make initial setuptools - installation easier, and to allow distributions using setuptools to avoid - having to include setuptools in their source distribution. - - * All downloads are now managed by the ``PackageIndex`` class (which is now - subclassable and replaceable), so that embedders can more easily override - download logic, give download progress reports, etc. The class has also - been moved to the new ``setuptools.package_index`` module. - - * The ``Installer`` class no longer handles downloading, manages a temporary - directory, or tracks the ``zip_ok`` option. Downloading is now handled - by ``PackageIndex``, and ``Installer`` has become an ``easy_install`` - command class based on ``setuptools.Command``. - - * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup - script in a directory sandbox, and a new ``setuptools.archive_util`` module - with an ``unpack_archive()`` API. These were split out of EasyInstall to - allow reuse by other tools and applications. - - * ``setuptools.Command`` now supports reinitializing commands using keyword - arguments to set/reset options. Also, ``Command`` subclasses can now set - their ``command_consumes_arguments`` attribute to ``True`` in order to - receive an ``args`` option containing the rest of the command line. - -0.3a2 - * Added new options to ``bdist_egg`` to allow tagging the egg's version number - with a subversion revision number, the current date, or an explicit tag - value. Run ``setup.py bdist_egg --help`` to get more information. - - * Misc. bug fixes - -0.3a1 - * Initial release. - -Mailing List and Bug Tracker -============================ - -Please use the `distutils-sig mailing list`_ for questions and discussion about -setuptools, and the `setuptools bug tracker`_ ONLY for issues you have -confirmed via the list are actual bugs, and which you have reduced to a minimal -set of steps to reproduce. - -.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ -.. _setuptools bug tracker: http://bugs.python.org/setuptools/ - diff --git a/docs/using.txt b/docs/using.txt deleted file mode 100644 index 192f1dc234..0000000000 --- a/docs/using.txt +++ /dev/null @@ -1,21 +0,0 @@ -================================ -Using Distribute in your project -================================ - -To use Distribute in your project, the recommended way is to ship -`distribute_setup.py` alongside your `setup.py` script and call -it at the very begining of `setup.py` like this:: - - from distribute_setup import use_setuptools - use_setuptools() - -Another way is to add ``Distribute`` in the ``install_requires`` option:: - - from setuptools import setup - - setup(... - install_requires=['distribute'] - ) - - -XXX to be finished From f6e12f545d8b358ef90f5e2d69cb0e77d549dad2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Nov 2013 12:38:20 -0500 Subject: [PATCH 3794/8469] Closing distribute branch again. --HG-- branch : distribute extra : close : 1 From 60e84ced7d203fd12f5784889aeb80343d33b9b6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 4 Nov 2013 07:43:32 +0100 Subject: [PATCH 3795/8469] Backout d80207d15294. --- tests/test_build_py.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 2ce9d4492d..e416edd4a1 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -121,37 +121,6 @@ def test_byte_compile_optimized(self): found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) - def test_dir_in_package_data(self): - """ - A directory in package_data should not be added to the filelist. - """ - # See bug 19286 - sources = self.mkdtemp() - pkg_dir = os.path.join(sources, "pkg") - - os.mkdir(pkg_dir) - open(os.path.join(pkg_dir, "__init__.py"), "w").close() - - docdir = os.path.join(pkg_dir, "doc") - os.mkdir(docdir) - open(os.path.join(docdir, "testfile"), "w").close() - - # create the directory that could be incorrectly detected as a file - os.mkdir(os.path.join(docdir, 'otherdir')) - - os.chdir(sources) - dist = Distribution({"packages": ["pkg"], - "package_data": {"pkg": ["doc/*"]}}) - # script_name need not exist, it just need to be initialized - dist.script_name = os.path.join(sources, "setup.py") - dist.script_args = ["build"] - dist.parse_command_line() - - try: - dist.run_commands() - except DistutilsFileError: - self.fail("failed package_data when data dir includes a dir") - def test_dont_write_bytecode(self): # makes sure byte_compile is not used dist = self.create_dist()[1] From abe7d6ae5236f5d11f76e9f3b8c4665dda6a29f1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 4 Nov 2013 07:43:41 +0100 Subject: [PATCH 3796/8469] Backout 265d369ad3b9. --- command/build_py.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index d48eb69900..1371b3d6ff 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -127,8 +127,7 @@ def find_data_files(self, package, src_dir): # Each pattern has to be converted to a platform-specific path filelist = glob(os.path.join(src_dir, convert_path(pattern))) # Files that match more than one pattern are only added once - files.extend([fn for fn in filelist if fn not in files - and os.path.isfile(fn)]) + files.extend([fn for fn in filelist if fn not in files]) return files def build_package_data(self): From b5e1e144277c1b90052d1e29451877e599b00fbd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Nov 2013 20:28:18 -0500 Subject: [PATCH 3797/8469] Fix failing test incorrectly merged in b1244046f37a --- tests/test_upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_upload.py b/tests/test_upload.py index c640b2ac6d..7d704cf166 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -117,7 +117,7 @@ def test_upload(self): self.assert_(headers['Content-type'].startswith('multipart/form-data')) self.assertEquals(self.last_open.req.get_method(), 'POST') self.assertEquals(self.last_open.req.get_full_url(), - 'http://pypi.python.org/pypi') + 'https://pypi.python.org/pypi') self.assert_(b'xxx' in self.last_open.req.data) def test_suite(): From 5f1980bbc9dc1da41e154a2ed0bf988d91c4c7d6 Mon Sep 17 00:00:00 2001 From: Andrew Kuchling Date: Fri, 15 Nov 2013 13:01:52 -0500 Subject: [PATCH 3798/8469] Issue #19544 and Issue #6516: Restore support for --user and --group parameters to sdist command as found in Python 2.7 and originally slated for Python 3.2 but accidentally rolled back as part of the distutils2 rollback. Closes Issue #6516. --- archive_util.py | 71 +++++++++++++++++++++++++++++++++++--- cmd.py | 6 ++-- command/bdist.py | 13 +++++++ command/bdist_dumb.py | 11 +++++- command/sdist.py | 9 ++++- tests/test_archive_util.py | 61 +++++++++++++++++++++++++++++++- tests/test_sdist.py | 53 ++++++++++++++++++++++++++++ 7 files changed, 214 insertions(+), 10 deletions(-) diff --git a/archive_util.py b/archive_util.py index fcda08e20a..306ef6a838 100644 --- a/archive_util.py +++ b/archive_util.py @@ -18,15 +18,55 @@ from distutils.dir_util import mkpath from distutils import log -def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): +try: + from pwd import getpwnam +except AttributeError: + getpwnam = None + +try: + from grp import getgrnam +except AttributeError: + getgrnam = None + +def _get_gid(name): + """Returns a gid, given a group name.""" + if getgrnam is None or name is None: + return None + try: + result = getgrnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def _get_uid(name): + """Returns an uid, given a user name.""" + if getpwnam is None or name is None: + return None + try: + result = getpwnam(name) + except KeyError: + result = None + if result is not None: + return result[2] + return None + +def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, + owner=None, group=None): """Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", "bzip2", or None. - Both "tar" and the compression utility named by 'compress' must be on - the default program search path, so this is probably Unix-specific. + (compress will be deprecated in Python 3.2) + + 'owner' and 'group' can be used to define an owner and a group for the + archive that is being built. If not provided, the current owner and group + will be used. + The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). + Returns the output filename. """ tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} @@ -48,10 +88,23 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0): import tarfile # late import so Python build itself doesn't break log.info('Creating tar archive') + + uid = _get_uid(owner) + gid = _get_gid(group) + + def _set_uid_gid(tarinfo): + if gid is not None: + tarinfo.gid = gid + tarinfo.gname = group + if uid is not None: + tarinfo.uid = uid + tarinfo.uname = owner + return tarinfo + if not dry_run: tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) try: - tar.add(base_dir) + tar.add(base_dir, filter=_set_uid_gid) finally: tar.close() @@ -140,7 +193,7 @@ def check_archive_formats(formats): return None def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, - dry_run=0): + dry_run=0, owner=None, group=None): """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific @@ -153,6 +206,9 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. + + 'owner' and 'group' are used when creating a tar archive. By default, + uses the current owner and group. """ save_cwd = os.getcwd() if root_dir is not None: @@ -174,6 +230,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, func = format_info[0] for arg, val in format_info[1]: kwargs[arg] = val + + if format != 'zip': + kwargs['owner'] = owner + kwargs['group'] = group + try: filename = func(base_name, base_dir, **kwargs) finally: diff --git a/cmd.py b/cmd.py index 3ea08101ac..c89d5efc45 100644 --- a/cmd.py +++ b/cmd.py @@ -365,9 +365,11 @@ def spawn(self, cmd, search_path=1, level=1): from distutils.spawn import spawn spawn(cmd, search_path, dry_run=self.dry_run) - def make_archive(self, base_name, format, root_dir=None, base_dir=None): + def make_archive(self, base_name, format, root_dir=None, base_dir=None, + owner=None, group=None): return archive_util.make_archive(base_name, format, root_dir, base_dir, - dry_run=self.dry_run) + dry_run=self.dry_run, + owner=owner, group=group) def make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): diff --git a/command/bdist.py b/command/bdist.py index 38b169afd1..6814a1c382 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -37,6 +37,12 @@ class bdist(Command): "[default: dist]"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['skip-build'] @@ -77,6 +83,8 @@ def initialize_options(self): self.formats = None self.dist_dir = None self.skip_build = 0 + self.group = None + self.owner = None def finalize_options(self): # have to finalize 'plat_name' before 'bdist_base' @@ -122,6 +130,11 @@ def run(self): if cmd_name not in self.no_format_option: sub_cmd.format = self.formats[i] + # passing the owner and group names for tar archiving + if cmd_name == 'bdist_dumb': + sub_cmd.owner = self.owner + sub_cmd.group = self.group + # If we're going to need to run this command again, tell it to # keep its temporary files around so subsequent runs go faster. if cmd_name in commands[i+1:]: diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index eefdfea5ad..4405d12c05 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -33,6 +33,12 @@ class bdist_dumb(Command): ('relative', None, "build the archive using relative paths" "(default: false)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), ] boolean_options = ['keep-temp', 'skip-build', 'relative'] @@ -48,6 +54,8 @@ def initialize_options(self): self.dist_dir = None self.skip_build = None self.relative = 0 + self.owner = None + self.group = None def finalize_options(self): if self.bdist_dir is None: @@ -101,7 +109,8 @@ def run(self): # Make the archive filename = self.make_archive(pseudoinstall_root, - self.format, root_dir=archive_root) + self.format, root_dir=archive_root, + owner=self.owner, group=self.group) if self.distribution.has_ext_modules(): pyversion = get_python_version() else: diff --git a/command/sdist.py b/command/sdist.py index 116f67ef9b..7ea3d5fa27 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -74,6 +74,10 @@ def checking_metadata(self): ('metadata-check', None, "Ensure that all required elements of meta-data " "are supplied. Warn if any missing. [default]"), + ('owner=', 'u', + "Owner name used when creating a tar file [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file [default: current group]"), ] boolean_options = ['use-defaults', 'prune', @@ -113,6 +117,8 @@ def initialize_options(self): self.archive_files = None self.metadata_check = 1 + self.owner = None + self.group = None def finalize_options(self): if self.manifest is None: @@ -444,7 +450,8 @@ def make_distribution(self): self.formats.append(self.formats.pop(self.formats.index('tar'))) for fmt in self.formats: - file = self.make_archive(base_name, fmt, base_dir=base_dir) + file = self.make_archive(base_name, fmt, base_dir=base_dir, + owner=self.owner, group=self.group) archive_files.append(file) self.distribution.dist_files.append(('sdist', '', file)) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 1afdd46225..581c0cc841 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -15,6 +15,13 @@ from distutils.tests import support from test.support import check_warnings, run_unittest, patch +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False + try: import zipfile ZIP_SUPPORT = True @@ -77,7 +84,7 @@ def _make_tarball(self, target_name): tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], - "Source and target should be on same drive") + "source and target should be on same drive") base_name = os.path.join(tmpdir2, target_name) @@ -275,6 +282,58 @@ def _breaks(*args, **kw): finally: del ARCHIVE_FORMATS['xxx'] + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support + if UID_GID_SUPPORT: + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + else: + group = owner = 'root' + + base_dir, root_dir, base_name = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner, + group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'zip', root_dir, base_dir) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner=owner, group=group) + self.assertTrue(os.path.exists(res)) + + res = make_archive(base_name, 'tar', root_dir, base_dir, + owner='kjhkjhkjg', group='oihohoh') + self.assertTrue(os.path.exists(res)) + + @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() + os.chdir(tmpdir) + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + try: + archive_name = make_tarball(base_name, 'dist', compress=None, + owner=owner, group=group) + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + self.assertTrue(os.path.exists(archive_name)) + + # now checks the rights + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + def test_suite(): return unittest.makeSuite(ArchiveUtilTestCase) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index e6359d6a8a..6170a48fea 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -14,6 +14,12 @@ except ImportError: ZLIB_SUPPORT = False +try: + import grp + import pwd + UID_GID_SUPPORT = True +except ImportError: + UID_GID_SUPPORT = False from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution @@ -425,6 +431,53 @@ def test_manual_manifest(self): self.assertEqual(sorted(filenames), ['fake-1.0', 'fake-1.0/PKG-INFO', 'fake-1.0/README.manual']) + @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_make_distribution_owner_group(self): + + # check if tar and gzip are installed + if (find_executable('tar') is None or + find_executable('gzip') is None): + return + + # now building a sdist + dist, cmd = self.get_cmd() + + # creating a gztar and specifying the owner+group + cmd.formats = ['gztar'] + cmd.owner = pwd.getpwuid(0)[0] + cmd.group = grp.getgrgid(0)[0] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, 0) + self.assertEquals(member.gid, 0) + finally: + archive.close() + + # building a sdist again + dist, cmd = self.get_cmd() + + # creating a gztar + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + self.assertEquals(member.uid, os.getuid()) + self.assertEquals(member.gid, os.getgid()) + finally: + archive.close() + def test_suite(): return unittest.makeSuite(SDistTestCase) From 53ae4bd7bad05c5717d8b713e57d41e90d47057c Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 15 Nov 2013 23:08:21 +0100 Subject: [PATCH 3799/8469] Issue #19544 and Issue #6516: quick workaround for failing builds --- archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive_util.py b/archive_util.py index 306ef6a838..82046a8ad7 100644 --- a/archive_util.py +++ b/archive_util.py @@ -20,12 +20,12 @@ try: from pwd import getpwnam -except AttributeError: +except (ImportError, AttributeError): getpwnam = None try: from grp import getgrnam -except AttributeError: +except (ImportError, AttributeError): getgrnam = None def _get_gid(name): From 7c572215c02f83b007a506953969b34d2bb9dd9a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Nov 2013 23:13:17 +0100 Subject: [PATCH 3800/8469] Issue #19544, #6516: no need to catch AttributeError on import pwd/grp --- archive_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive_util.py b/archive_util.py index 82046a8ad7..4470bb0222 100644 --- a/archive_util.py +++ b/archive_util.py @@ -20,12 +20,12 @@ try: from pwd import getpwnam -except (ImportError, AttributeError): +except ImportError: getpwnam = None try: from grp import getgrnam -except (ImportError, AttributeError): +except ImportError: getgrnam = None def _get_gid(name): From 11857584767cb29d5a3761c9a4ed00793f576164 Mon Sep 17 00:00:00 2001 From: Andrew Kuchling Date: Sun, 10 Nov 2013 18:11:00 -0500 Subject: [PATCH 3801/8469] Issue #19544 and Issue #1180: Restore global option to ignore ~/.pydistutils.cfg in Distutils, accidentally removed in backout of distutils2 changes. --- core.py | 5 +++-- dist.py | 35 ++++++++++++++++++++++++++++++----- tests/test_dist.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/core.py b/core.py index 91e5132934..c811d5bd9c 100644 --- a/core.py +++ b/core.py @@ -128,8 +128,9 @@ class found in 'cmdclass' is used in place of the default, which is if _setup_stop_after == "config": return dist - # Parse the command line; any command-line errors are the end user's - # fault, so turn them into SystemExit to suppress tracebacks. + # Parse the command line and override config files; any + # command-line errors are the end user's fault, so turn them into + # SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() except DistutilsArgError as msg: diff --git a/dist.py b/dist.py index 11a210279e..7eb04bc3f5 100644 --- a/dist.py +++ b/dist.py @@ -52,7 +52,9 @@ class Distribution: ('quiet', 'q', "run quietly (turns verbosity off)"), ('dry-run', 'n', "don't actually do anything"), ('help', 'h', "show detailed help message"), - ] + ('no-user-cfg', None, + 'ignore pydistutils.cfg in your home directory'), + ] # 'common_usage' is a short (2-3 line) string describing the common # usage of the setup script. @@ -259,6 +261,22 @@ def __init__ (self, attrs=None): else: sys.stderr.write(msg + "\n") + # no-user-cfg is handled before other command line args + # because other args override the config files, and this + # one is needed before we can load the config files. + # If attrs['script_args'] wasn't passed, assume false. + # + # This also make sure we just look at the global options + self.want_user_cfg = True + + if self.script_args is not None: + for arg in self.script_args: + if not arg.startswith('-'): + break + if arg == '--no-user-cfg': + self.want_user_cfg = False + break + self.finalize_options() def get_option_dict(self, command): @@ -310,7 +328,10 @@ def find_config_files(self): Distutils installation directory (ie. where the top-level Distutils __inst__.py file lives), a file in the user's home directory named .pydistutils.cfg on Unix and pydistutils.cfg - on Windows/Mac, and setup.cfg in the current directory. + on Windows/Mac; and setup.cfg in the current directory. + + The file in the user's home directory can be disabled with the + --no-user-cfg option. """ files = [] check_environ() @@ -330,15 +351,19 @@ def find_config_files(self): user_filename = "pydistutils.cfg" # And look for the user config file - user_file = os.path.join(os.path.expanduser('~'), user_filename) - if os.path.isfile(user_file): - files.append(user_file) + if self.want_user_cfg: + user_file = os.path.join(os.path.expanduser('~'), user_filename) + if os.path.isfile(user_file): + files.append(user_file) # All platforms support local setup.cfg local_file = "setup.cfg" if os.path.isfile(local_file): files.append(local_file) + if DEBUG: + self.announce("using config files: %s" % ', '.join(files)) + return files def parse_config_files(self, filenames=None): diff --git a/tests/test_dist.py b/tests/test_dist.py index 9a8ca19902..102c553db9 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -39,6 +39,7 @@ def find_config_files(self): class DistributionTestCase(support.LoggingSilencer, + support.TempdirManager, support.EnvironGuard, unittest.TestCase): @@ -213,6 +214,34 @@ def test_announce(self): self.assertRaises(ValueError, dist.announce, args, kwargs) + def test_find_config_files_disable(self): + # Ticket #1180: Allow user to disable their home config file. + temp_home = self.mkdtemp() + if os.name == 'posix': + user_filename = os.path.join(temp_home, ".pydistutils.cfg") + else: + user_filename = os.path.join(temp_home, "pydistutils.cfg") + + with open(user_filename, 'w') as f: + f.write('[distutils]\n') + + def _expander(path): + return temp_home + + old_expander = os.path.expanduser + os.path.expanduser = _expander + try: + d = Distribution() + all_files = d.find_config_files() + + d = Distribution(attrs={'script_args': ['--no-user-cfg']}) + files = d.find_config_files() + finally: + os.path.expanduser = old_expander + + # make sure --no-user-cfg disables the user cfg file + self.assertEquals(len(all_files)-1, len(files)) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): From 5edd62fecb7444f731574a38a7108e002893dac7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Nov 2013 18:15:03 -0500 Subject: [PATCH 3802/8469] Issue 19544 and Issue #7457: Restore the read_pkg_file method to distutils.dist.DistributionMetadata accidentally removed in the undo of distutils2. --- dist.py | 90 +++++++++++++++++++++++++++++++++++++--------- tests/test_dist.py | 29 ++++++++++++++- 2 files changed, 101 insertions(+), 18 deletions(-) diff --git a/dist.py b/dist.py index f7fac08918..11a210279e 100644 --- a/dist.py +++ b/dist.py @@ -5,6 +5,7 @@ """ import sys, os, re +from email import message_from_file try: import warnings @@ -999,25 +1000,80 @@ class DistributionMetadata: "provides", "requires", "obsoletes", ) - def __init__ (self): - self.name = None - self.version = None - self.author = None - self.author_email = None + def __init__(self, path=None): + if path is not None: + self.read_pkg_file(open(path)) + else: + self.name = None + self.version = None + self.author = None + self.author_email = None + self.maintainer = None + self.maintainer_email = None + self.url = None + self.license = None + self.description = None + self.long_description = None + self.keywords = None + self.platforms = None + self.classifiers = None + self.download_url = None + # PEP 314 + self.provides = None + self.requires = None + self.obsoletes = None + + def read_pkg_file(self, file): + """Reads the metadata values from a file object.""" + msg = message_from_file(file) + + def _read_field(name): + value = msg[name] + if value == 'UNKNOWN': + return None + return value + + def _read_list(name): + values = msg.get_all(name, None) + if values == []: + return None + return values + + metadata_version = msg['metadata-version'] + self.name = _read_field('name') + self.version = _read_field('version') + self.description = _read_field('summary') + # we are filling author only. + self.author = _read_field('author') self.maintainer = None + self.author_email = _read_field('author-email') self.maintainer_email = None - self.url = None - self.license = None - self.description = None - self.long_description = None - self.keywords = None - self.platforms = None - self.classifiers = None - self.download_url = None - # PEP 314 - self.provides = None - self.requires = None - self.obsoletes = None + self.url = _read_field('home-page') + self.license = _read_field('license') + + if 'download-url' in msg: + self.download_url = _read_field('download-url') + else: + self.download_url = None + + self.long_description = _read_field('description') + self.description = _read_field('summary') + + if 'keywords' in msg: + self.keywords = _read_field('keywords').split(',') + + self.platforms = _read_list('platform') + self.classifiers = _read_list('classifier') + + # PEP 314 - these fields only exist in 1.1 + if metadata_version == '1.1': + self.requires = _read_list('requires') + self.provides = _read_list('provides') + self.obsoletes = _read_list('obsoletes') + else: + self.requires = None + self.provides = None + self.obsoletes = None def write_pkg_info(self, base_dir): """Write the PKG-INFO file into the release tree. diff --git a/tests/test_dist.py b/tests/test_dist.py index 66c20e27e2..9a8ca19902 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,7 +8,7 @@ from unittest import mock -from distutils.dist import Distribution, fix_help_options +from distutils.dist import Distribution, fix_help_options, DistributionMetadata from distutils.cmd import Command from test.support import TESTFN, captured_stdout, run_unittest @@ -388,6 +388,33 @@ def test_show_help(self): self.assertTrue(output) + def test_read_metadata(self): + attrs = {"name": "package", + "version": "1.0", + "long_description": "desc", + "description": "xxx", + "download_url": "http://example.com", + "keywords": ['one', 'two'], + "requires": ['foo']} + + dist = Distribution(attrs) + metadata = dist.metadata + + # write it then reloads it + PKG_INFO = io.StringIO() + metadata.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) + metadata.read_pkg_file(PKG_INFO) + + self.assertEquals(metadata.name, "package") + self.assertEquals(metadata.version, "1.0") + self.assertEquals(metadata.description, "xxx") + self.assertEquals(metadata.download_url, 'http://example.com') + self.assertEquals(metadata.keywords, ['one', 'two']) + self.assertEquals(metadata.platforms, ['UNKNOWN']) + self.assertEquals(metadata.obsoletes, None) + self.assertEquals(metadata.requires, ['foo']) + def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DistributionTestCase)) From 66f3b499473504c130a52d222b827a4413127f12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Nov 2013 18:50:10 -0500 Subject: [PATCH 3803/8469] Issue #19544 and Issue #6286: Restore use of urllib over http allowing use of http_proxy for Distutils upload command, a feature accidentally lost in the rollback of distutils2. --- command/upload.py | 60 ++++++++++++++++++++--------------------- tests/test_upload.py | 63 ++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 68 deletions(-) diff --git a/command/upload.py b/command/upload.py index 8b36851d25..d2bc82cea3 100644 --- a/command/upload.py +++ b/command/upload.py @@ -10,10 +10,9 @@ import os, io import socket import platform -import configparser -import http.client as httpclient from base64 import standard_b64encode -import urllib.parse +from urllib.request import urlopen, Request, HTTPError +from urllib.parse import urlparse # this keeps compatibility for 2.3 and 2.4 if sys.version < "2.5": @@ -66,6 +65,15 @@ def run(self): self.upload_file(command, pyversion, filename) def upload_file(self, command, pyversion, filename): + # Makes sure the repository URL is compliant + schema, netloc, url, params, query, fragments = \ + urlparse(self.repository) + if params or query or fragments: + raise AssertionError("Incompatible url %s" % self.repository) + + if schema not in ('http', 'https'): + raise AssertionError("unsupported schema " + schema) + # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] @@ -162,41 +170,31 @@ def upload_file(self, command, pyversion, filename): self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) # build the Request - # We can't use urllib since we need to send the Basic - # auth right with the first request - # TODO(jhylton): Can we fix urllib? - schema, netloc, url, params, query, fragments = \ - urllib.parse.urlparse(self.repository) - assert not params and not query and not fragments - if schema == 'http': - http = httpclient.HTTPConnection(netloc) - elif schema == 'https': - http = httpclient.HTTPSConnection(netloc) - else: - raise AssertionError("unsupported schema "+schema) - - data = '' - loglevel = log.INFO + headers = {'Content-type': + 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth} + + request = Request(self.repository, data=body, + headers=headers) + # send the data try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', - 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) + result = urlopen(request) + status = result.getcode() + reason = result.msg except socket.error as e: self.announce(str(e), log.ERROR) return + except HTTPError as e: + status = e.code + reason = e.msg - r = http.getresponse() - if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), + if status == 200: + self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), + self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) + msg = '\n'.join(('-' * 75, result.read(), '-' * 75)) self.announce(msg, log.INFO) diff --git a/tests/test_upload.py b/tests/test_upload.py index 4c6464a32e..a474596e33 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,9 +1,9 @@ """Tests for distutils.command.upload.""" import os import unittest -import http.client as httpclient from test.support import run_unittest +from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution @@ -37,48 +37,37 @@ [server1] username:me """ -class Response(object): - def __init__(self, status=200, reason='OK'): - self.status = status - self.reason = reason -class FakeConnection(object): +class FakeOpen(object): - def __init__(self): - self.requests = [] - self.headers = [] - self.body = '' + def __init__(self, url): + self.url = url + if not isinstance(url, str): + self.req = url + else: + self.req = None + self.msg = 'OK' - def __call__(self, netloc): - return self + def getcode(self): + return 200 - def connect(self): - pass - endheaders = connect - - def putrequest(self, method, url): - self.requests.append((method, url)) - - def putheader(self, name, value): - self.headers.append((name, value)) - - def send(self, body): - self.body = body - - def getresponse(self): - return Response() class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httpclient.HTTPConnection - self.conn = httpclient.HTTPConnection = FakeConnection() + self.old_open = upload_mod.urlopen + upload_mod.urlopen = self._urlopen + self.last_open = None def tearDown(self): - httpclient.HTTPConnection = self.old_class + upload_mod.urlopen = self.old_open super(uploadTestCase, self).tearDown() + def _urlopen(self, url): + self.last_open = FakeOpen(url) + return self.last_open + def test_finalize_options(self): # new format @@ -122,14 +111,14 @@ def test_upload(self): cmd.ensure_finalized() cmd.run() - # what did we send ? - headers = dict(self.conn.headers) + # what did we send ? + headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') - self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) - self.assertFalse('\n' in headers['Authorization']) - - self.assertEqual(self.conn.requests, [('POST', '/pypi')]) - self.assertTrue((b'xxx') in self.conn.body) + self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertEquals(self.last_open.req.get_method(), 'POST') + self.assertEquals(self.last_open.req.get_full_url(), + 'http://pypi.python.org/pypi') + self.assert_(b'xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) From 341dbe79bfe1e225ff5a05731eb56e69ac989bce Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 11 Nov 2013 06:13:54 +0100 Subject: [PATCH 3804/8469] Bump to 3.3.3rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 812d8f35dc..0650dd277a 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.3rc1" +__version__ = "3.3.3rc2" #--end constants-- From 303e2b0c71421dc5a0fa03019354124305579fbd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Nov 2013 19:24:07 -0500 Subject: [PATCH 3805/8469] Issue #7408: Forward port limited test from Python 2.7, fixing failing buildbot tests on BSD-based platforms. --- tests/test_sdist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 6170a48fea..280b9bca90 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -471,10 +471,13 @@ def test_make_distribution_owner_group(self): # making sure we have the good rights archive_name = join(self.tmp_dir, 'dist', 'fake-1.0.tar.gz') archive = tarfile.open(archive_name) + + # note that we are not testing the group ownership here + # because, depending on the platforms and the container + # rights (see #7408) try: for member in archive.getmembers(): self.assertEquals(member.uid, os.getuid()) - self.assertEquals(member.gid, os.getgid()) finally: archive.close() From ccce5b21bbd52d95a00704f48f6cf3923cad9776 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Nov 2013 19:35:05 -0500 Subject: [PATCH 3806/8469] Use preferred assertEqual form. Correct indentation. --- tests/test_sdist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 280b9bca90..164586b784 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -437,7 +437,7 @@ def test_make_distribution_owner_group(self): # check if tar and gzip are installed if (find_executable('tar') is None or - find_executable('gzip') is None): + find_executable('gzip') is None): return # now building a sdist @@ -455,8 +455,8 @@ def test_make_distribution_owner_group(self): archive = tarfile.open(archive_name) try: for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) + self.assertEqual(member.uid, 0) + self.assertEqual(member.gid, 0) finally: archive.close() @@ -477,7 +477,7 @@ def test_make_distribution_owner_group(self): # rights (see #7408) try: for member in archive.getmembers(): - self.assertEquals(member.uid, os.getuid()) + self.assertEqual(member.uid, os.getuid()) finally: archive.close() From 59262e8d7386c303a4f651ade1b5105d2b3e0c3c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Nov 2013 19:38:51 -0500 Subject: [PATCH 3807/8469] Use preferred assertEqual --- tests/test_dist.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 102c553db9..b7fd3fbf90 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -240,7 +240,7 @@ def _expander(path): os.path.expanduser = old_expander # make sure --no-user-cfg disables the user cfg file - self.assertEquals(len(all_files)-1, len(files)) + self.assertEqual(len(all_files)-1, len(files)) class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): @@ -435,14 +435,14 @@ def test_read_metadata(self): PKG_INFO.seek(0) metadata.read_pkg_file(PKG_INFO) - self.assertEquals(metadata.name, "package") - self.assertEquals(metadata.version, "1.0") - self.assertEquals(metadata.description, "xxx") - self.assertEquals(metadata.download_url, 'http://example.com') - self.assertEquals(metadata.keywords, ['one', 'two']) - self.assertEquals(metadata.platforms, ['UNKNOWN']) - self.assertEquals(metadata.obsoletes, None) - self.assertEquals(metadata.requires, ['foo']) + self.assertEqual(metadata.name, "package") + self.assertEqual(metadata.version, "1.0") + self.assertEqual(metadata.description, "xxx") + self.assertEqual(metadata.download_url, 'http://example.com') + self.assertEqual(metadata.keywords, ['one', 'two']) + self.assertEqual(metadata.platforms, ['UNKNOWN']) + self.assertEqual(metadata.obsoletes, None) + self.assertEqual(metadata.requires, ['foo']) def test_suite(): suite = unittest.TestSuite() From 5960d28f32e53337043371f95c7f349e34024f40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Nov 2013 19:41:57 -0500 Subject: [PATCH 3808/8469] Update more usage of assertEqual --- tests/test_archive_util.py | 4 ++-- tests/test_upload.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 581c0cc841..caa0db20b7 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -329,8 +329,8 @@ def test_tarfile_root_owner(self): archive = tarfile.open(archive_name) try: for member in archive.getmembers(): - self.assertEquals(member.uid, 0) - self.assertEquals(member.gid, 0) + self.assertEqual(member.uid, 0) + self.assertEqual(member.gid, 0) finally: archive.close() diff --git a/tests/test_upload.py b/tests/test_upload.py index 7d704cf166..9a2265eeb8 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -115,9 +115,9 @@ def test_upload(self): headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') self.assert_(headers['Content-type'].startswith('multipart/form-data')) - self.assertEquals(self.last_open.req.get_method(), 'POST') - self.assertEquals(self.last_open.req.get_full_url(), - 'https://pypi.python.org/pypi') + self.assertEqual(self.last_open.req.get_method(), 'POST') + expected_url = 'https://pypi.python.org/pypi' + self.assertEqual(self.last_open.req.get_full_url(), expected_url) self.assert_(b'xxx' in self.last_open.req.data) def test_suite(): From f169cafe969605899f196b8dfb86b0385e0da5ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2013 10:35:46 -0500 Subject: [PATCH 3809/8469] Issue #19586: Update remaining deprecated assertions to their preferred usage. --- tests/test_upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_upload.py b/tests/test_upload.py index 9a2265eeb8..8e8ff720ae 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -114,11 +114,11 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') expected_url = 'https://pypi.python.org/pypi' self.assertEqual(self.last_open.req.get_full_url(), expected_url) - self.assert_(b'xxx' in self.last_open.req.data) + self.assertTrue(b'xxx' in self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) From ad0f0c5c29e6c8af182a9e72d995d91911cc8349 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2013 10:47:17 -0500 Subject: [PATCH 3810/8469] Correct long line --- tests/test_upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_upload.py b/tests/test_upload.py index 8e8ff720ae..1fcba889b2 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -114,7 +114,8 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') - self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) + content_type = headers['Content-type'] + self.assertTrue(content_type.startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') expected_url = 'https://pypi.python.org/pypi' self.assertEqual(self.last_open.req.get_full_url(), expected_url) From c0d4c5676e3118c7189a97a555bfb70447276f29 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 17 Nov 2013 00:17:46 +0200 Subject: [PATCH 3811/8469] Issue #19600: Use specific asserts in distutils tests. --- tests/test_archive_util.py | 2 +- tests/test_bdist_rpm.py | 4 ++-- tests/test_bdist_wininst.py | 2 +- tests/test_build_clib.py | 2 +- tests/test_build_ext.py | 16 ++++++++-------- tests/test_build_scripts.py | 8 ++++---- tests/test_clean.py | 2 +- tests/test_config.py | 2 +- tests/test_config_cmd.py | 2 +- tests/test_install.py | 2 +- tests/test_install_lib.py | 2 +- tests/test_install_scripts.py | 10 +++++----- tests/test_msvc9compiler.py | 6 +++--- tests/test_register.py | 8 ++++---- tests/test_sysconfig.py | 2 +- tests/test_util.py | 2 +- 16 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 1afdd46225..d3fb24ad56 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -210,7 +210,7 @@ def test_compress_deprecated(self): dry_run=True) finally: os.chdir(old_dir) - self.assertTrue(not os.path.exists(tarball)) + self.assertFalse(os.path.exists(tarball)) self.assertEqual(len(w.warnings), 1) @unittest.skipUnless(ZIP_SUPPORT and ZLIB_SUPPORT, diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index b090b79e0c..aa1445d10a 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -81,7 +81,7 @@ def test_quiet(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + self.assertIn('foo-0.1-1.noarch.rpm', dist_created) # bug #2945: upload ignores bdist_rpm files self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) @@ -125,7 +125,7 @@ def test_no_optimize_flag(self): cmd.run() dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) - self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created) + self.assertIn('foo-0.1-1.noarch.rpm', dist_created) # bug #2945: upload ignores bdist_rpm files self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index f9e8f89e21..5d17ab19a9 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -22,7 +22,7 @@ def test_get_exe_bytes(self): # and make sure it finds it and returns its content # no matter what platform we have exe_file = cmd.get_exe_bytes() - self.assertTrue(len(exe_file) > 10) + self.assertGreater(len(exe_file), 10) def test_suite(): return unittest.makeSuite(BuildWinInstTestCase) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index ee1c04162b..c2b981f20e 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -137,7 +137,7 @@ def test_run(self): cmd.run() # let's check the result - self.assertTrue('libfoo.a' in os.listdir(build_temp)) + self.assertIn('libfoo.a', os.listdir(build_temp)) def test_suite(): return unittest.makeSuite(BuildCLibTestCase) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 44a9852f4c..3cfaa2c692 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -76,8 +76,8 @@ def test_build_ext(self): if support.HAVE_DOCSTRINGS: doc = 'This is a template module just for instruction.' self.assertEqual(xx.__doc__, doc) - self.assertTrue(isinstance(xx.Null(), xx.Null)) - self.assertTrue(isinstance(xx.Str(), xx.Str)) + self.assertIsInstance(xx.Null(), xx.Null) + self.assertIsInstance(xx.Str(), xx.Str) def tearDown(self): # Get everything back to normal @@ -110,7 +110,7 @@ def test_solaris_enable_shared(self): _config_vars['Py_ENABLE_SHARED'] = old_var # make sure we get some library dirs under solaris - self.assertTrue(len(cmd.library_dirs) > 0) + self.assertGreater(len(cmd.library_dirs), 0) def test_user_site(self): # site.USER_SITE was introduced in 2.6 @@ -124,7 +124,7 @@ def test_user_site(self): # making sure the user option is there options = [name for name, short, lable in cmd.user_options] - self.assertTrue('user' in options) + self.assertIn('user', options) # setting a value cmd.user = 1 @@ -171,10 +171,10 @@ def test_finalize_options(self): from distutils import sysconfig py_include = sysconfig.get_python_inc() - self.assertTrue(py_include in cmd.include_dirs) + self.assertIn(py_include, cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assertTrue(plat_py_include in cmd.include_dirs) + self.assertIn(plat_py_include, cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string @@ -255,13 +255,13 @@ def test_check_extensions_list(self): 'some': 'bar'})] cmd.check_extensions_list(exts) ext = exts[0] - self.assertTrue(isinstance(ext, Extension)) + self.assertIsInstance(ext, Extension) # check_extensions_list adds in ext the values passed # when they are in ('include_dirs', 'library_dirs', 'libraries' # 'extra_objects', 'extra_compile_args', 'extra_link_args') self.assertEqual(ext.libraries, 'foo') - self.assertTrue(not hasattr(ext, 'some')) + self.assertFalse(hasattr(ext, 'some')) # 'macros' element of build info dict must be 1- or 2-tuple exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', diff --git a/tests/test_build_scripts.py b/tests/test_build_scripts.py index e3326b8517..954fc76398 100644 --- a/tests/test_build_scripts.py +++ b/tests/test_build_scripts.py @@ -17,8 +17,8 @@ class BuildScriptsTestCase(support.TempdirManager, def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) - self.assertTrue(not cmd.force) - self.assertTrue(cmd.build_dir is None) + self.assertFalse(cmd.force) + self.assertIsNone(cmd.build_dir) cmd.finalize_options() @@ -38,7 +38,7 @@ def test_build(self): built = os.listdir(target) for name in expected: - self.assertTrue(name in built) + self.assertIn(name, built) def get_build_scripts_cmd(self, target, scripts): import sys @@ -103,7 +103,7 @@ def test_version_int(self): built = os.listdir(target) for name in expected: - self.assertTrue(name in built) + self.assertIn(name, built) def test_suite(): return unittest.makeSuite(BuildScriptsTestCase) diff --git a/tests/test_clean.py b/tests/test_clean.py index eb8958bff5..b64f300a04 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -36,7 +36,7 @@ def test_simple_run(self): # make sure the files where removed for name, path in dirs: - self.assertTrue(not os.path.exists(path), + self.assertFalse(os.path.exists(path), '%s was not removed' % path) # let's run the command again (should spit warnings but succeed) diff --git a/tests/test_config.py b/tests/test_config.py index 525bee9416..0e8d65e271 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -103,7 +103,7 @@ def test_server_registration(self): def test_server_empty_registration(self): cmd = self._cmd(self.dist) rc = cmd._get_rc_file() - self.assertTrue(not os.path.exists(rc)) + self.assertFalse(os.path.exists(rc)) cmd._store_pypirc('tarek', 'xxx') self.assertTrue(os.path.exists(rc)) f = open(rc) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index e2e6e4ebaa..79894c78d3 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -81,7 +81,7 @@ def test_clean(self): cmd._clean(f1, f2) for f in (f1, f2): - self.assertTrue(not os.path.exists(f)) + self.assertFalse(os.path.exists(f)) def test_suite(): return unittest.makeSuite(ConfigTestCase) diff --git a/tests/test_install.py b/tests/test_install.py index b1901273e9..ede88e5d90 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -236,7 +236,7 @@ def test_debug_mode(self): self.test_record() finally: install_module.DEBUG = False - self.assertTrue(len(self.logs) > old_logs_len) + self.assertGreater(len(self.logs), old_logs_len) def test_suite(): diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 2bd4dc6e96..d0dfca00d7 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -103,7 +103,7 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + self.assertIn('byte-compiling is disabled', self.logs[0][1]) def test_suite(): diff --git a/tests/test_install_scripts.py b/tests/test_install_scripts.py index 8952e744e5..1f7b1038cb 100644 --- a/tests/test_install_scripts.py +++ b/tests/test_install_scripts.py @@ -24,10 +24,10 @@ def test_default_settings(self): skip_build=1, ) cmd = install_scripts(dist) - self.assertTrue(not cmd.force) - self.assertTrue(not cmd.skip_build) - self.assertTrue(cmd.build_dir is None) - self.assertTrue(cmd.install_dir is None) + self.assertFalse(cmd.force) + self.assertFalse(cmd.skip_build) + self.assertIsNone(cmd.build_dir) + self.assertIsNone(cmd.install_dir) cmd.finalize_options() @@ -72,7 +72,7 @@ def write_script(name, text): installed = os.listdir(target) for name in expected: - self.assertTrue(name in installed) + self.assertIn(name, installed) def test_suite(): diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 301d43d20c..5e18c61360 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -128,7 +128,7 @@ def test_reg_class(self): # windows registeries versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') - self.assertTrue(v in ('0', '1', '2')) + self.assertIn(v, ('0', '1', '2')) import winreg HKCU = winreg.HKEY_CURRENT_USER @@ -136,7 +136,7 @@ def test_reg_class(self): self.assertEqual(keys, None) keys = Reg.read_keys(HKCU, r'Control Panel') - self.assertTrue('Desktop' in keys) + self.assertIn('Desktop', keys) def test_remove_visual_c_ref(self): from distutils.msvc9compiler import MSVCCompiler @@ -174,7 +174,7 @@ def test_remove_entire_manifest(self): compiler = MSVCCompiler() got = compiler._remove_visual_c_ref(manifest) - self.assertIs(got, None) + self.assertIsNone(got) def test_suite(): diff --git a/tests/test_register.py b/tests/test_register.py index a86b8606e4..f4efa13d78 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -98,7 +98,7 @@ def test_create_pypirc(self): cmd = self._get_cmd() # we shouldn't have a .pypirc file yet - self.assertTrue(not os.path.exists(self.rc)) + self.assertFalse(os.path.exists(self.rc)) # patching input and getpass.getpass # so register gets happy @@ -145,7 +145,7 @@ def _no_way(prompt=''): self.assertEqual(req1['Content-length'], '1374') self.assertEqual(req2['Content-length'], '1374') - self.assertTrue((b'xxx') in self.conn.reqs[1].data) + self.assertIn(b'xxx', self.conn.reqs[1].data) def test_password_not_in_file(self): @@ -175,7 +175,7 @@ def test_registering(self): req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '608') - self.assertTrue((b'tarek') in req.data) + self.assertIn(b'tarek', req.data) def test_password_reset(self): # this test runs choice 3 @@ -193,7 +193,7 @@ def test_password_reset(self): req = self.conn.reqs[0] headers = dict(req.headers) self.assertEqual(headers['Content-length'], '290') - self.assertTrue((b'tarek') in req.data) + self.assertIn(b'tarek', req.data) @unittest.skipUnless(docutils is not None, 'needs docutils') def test_strict(self): diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 826ea4247d..07812d80fc 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -50,7 +50,7 @@ def test_get_python_inc(self): def test_get_config_vars(self): cvars = sysconfig.get_config_vars() - self.assertTrue(isinstance(cvars, dict)) + self.assertIsInstance(cvars, dict) self.assertTrue(cvars) def test_srcdir(self): diff --git a/tests/test_util.py b/tests/test_util.py index eac9b5141d..00219cfdba 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -266,7 +266,7 @@ def test_strtobool(self): self.assertTrue(strtobool(y)) for n in no: - self.assertTrue(not strtobool(n)) + self.assertFalse(strtobool(n)) def test_rfc822_escape(self): header = 'I am a\npoor\nlonesome\nheader\n' From ab27da2853e1eb770873803bd6a8008e612ac796 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 17 Nov 2013 07:58:22 +0100 Subject: [PATCH 3812/8469] Bump to 3.3.3 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0650dd277a..6747ab8677 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.3rc2" +__version__ = "3.3.3" #--end constants-- From b1290f15cc21206e9b16c91fa45cf4451137f732 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 22 Nov 2013 15:31:35 -0500 Subject: [PATCH 3813/8469] Issue 19555 for distutils, plus a little clean up (pyflakes, line lengths). --- sysconfig.py | 8 ++++++++ tests/test_sysconfig.py | 45 ++++++++++++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d9c9d65818..392d63d1d9 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -518,6 +518,11 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + # For backward compatibility, see issue19555 + SO = _config_vars.get('EXT_SUFFIX') + if SO is not None: + _config_vars['SO'] = SO + # Always convert srcdir to an absolute path srcdir = _config_vars.get('srcdir', project_base) if os.name == 'posix': @@ -568,4 +573,7 @@ def get_config_var(name): returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) """ + if name == 'SO': + import warnings + warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) return get_config_vars().get(name) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 07812d80fc..e14646edf7 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,7 +1,6 @@ """Tests for distutils.sysconfig.""" import os import shutil -import test import unittest from distutils import sysconfig @@ -9,8 +8,7 @@ from distutils.tests import support from test.support import TESTFN, run_unittest -class SysconfigTestCase(support.EnvironGuard, - unittest.TestCase): +class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): super(SysconfigTestCase, self).setUp() self.makefile = None @@ -32,7 +30,6 @@ def test_get_config_h_filename(self): self.assertTrue(os.path.isfile(config_h), config_h) def test_get_python_lib(self): - lib_dir = sysconfig.get_python_lib() # XXX doesn't work on Linux when Python was never installed before #self.assertTrue(os.path.isdir(lib_dir), lib_dir) # test for pythonxx.lib? @@ -67,8 +64,9 @@ def test_srcdir(self): self.assertTrue(os.path.exists(Python_h), Python_h) self.assertTrue(sysconfig._is_python_source_dir(srcdir)) elif os.name == 'posix': - self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()), - srcdir) + self.assertEqual( + os.path.dirname(sysconfig.get_makefile_filename()), + srcdir) def test_srcdir_independent_of_cwd(self): # srcdir should be independent of the current working directory @@ -129,10 +127,13 @@ def test_parse_makefile_literal_dollar(self): def test_sysconfig_module(self): import sysconfig as global_sysconfig - self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) - self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS')) + self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), + sysconfig.get_config_var('CFLAGS')) + self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), + sysconfig.get_config_var('LDFLAGS')) - @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'),'compiler flags customized') + @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'), + 'compiler flags customized') def test_sysconfig_compiler_vars(self): # On OS X, binary installers support extension module building on # various levels of the operating system with differing Xcode @@ -151,9 +152,29 @@ def test_sysconfig_compiler_vars(self): import sysconfig as global_sysconfig if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): return - self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED')) - self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) - + self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), + sysconfig.get_config_var('LDSHARED')) + self.assertEqual(global_sysconfig.get_config_var('CC'), + sysconfig.get_config_var('CC')) + + @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, + 'EXT_SUFFIX required for this test') + def test_SO_deprecation(self): + self.assertWarns(DeprecationWarning, + sysconfig.get_config_var, 'SO') + + @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, + 'EXT_SUFFIX required for this test') + def test_SO_value(self): + self.assertEqual(sysconfig.get_config_var('SO'), + sysconfig.get_config_var('EXT_SUFFIX')) + + @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, + 'EXT_SUFFIX required for this test') + def test_SO_in_vars(self): + vars = sysconfig.get_config_vars() + self.assertIsNotNone(vars['SO']) + self.assertEqual(vars['SO'], vars['EXT_SUFFIX']) def test_suite(): From 58403d4abc8fdef0ff3b0fc9bb14c203cfd17349 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 24 Nov 2013 06:59:35 -0800 Subject: [PATCH 3814/8469] Bump version number to 3.4.0b1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 355542edd0..38a50869ea 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0a4" +__version__ = "3.4.0b1" #--end constants-- From 4f57b30b05e31f7a12d2411a99d0faeb6e669196 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 26 Nov 2013 17:08:24 +0200 Subject: [PATCH 3815/8469] Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests. Change stacklevel in warnings.warn() for 'SO' key to 2. --- sysconfig.py | 2 +- tests/test_sysconfig.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 392d63d1d9..75537db8d0 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -575,5 +575,5 @@ def get_config_var(name): """ if name == 'SO': import warnings - warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) + warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning, 2) return get_config_vars().get(name) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index e14646edf7..b5fdc98dc9 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -6,7 +6,7 @@ from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support -from test.support import TESTFN, run_unittest +from test.support import TESTFN, run_unittest, check_warnings class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): @@ -166,8 +166,9 @@ def test_SO_deprecation(self): @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, 'EXT_SUFFIX required for this test') def test_SO_value(self): - self.assertEqual(sysconfig.get_config_var('SO'), - sysconfig.get_config_var('EXT_SUFFIX')) + with check_warnings(('', DeprecationWarning)): + self.assertEqual(sysconfig.get_config_var('SO'), + sysconfig.get_config_var('EXT_SUFFIX')) @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, 'EXT_SUFFIX required for this test') From aad9a7feb8d3ce64a6ea07e76044777303d62be3 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Tue, 3 Dec 2013 13:55:20 +0100 Subject: [PATCH 3816/8469] Issue #9709: Stop adding PyInit_" + module_name' to export_symbols. This is already done by PyMODINIT_FUNC. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 80689b6357..9be592370a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -538,7 +538,7 @@ def build_extension(self, ext): library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, extra_postargs=extra_args, - export_symbols=self.get_export_symbols(ext), + export_symbols=ext.export_symbols, debug=self.debug, build_temp=self.build_temp, target_lang=language) From 89924f9e965ce58b5ceab3545989e6d827931d2f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 18 Dec 2013 16:41:01 +0200 Subject: [PATCH 3817/8469] Issue #19492: Silently skipped distutils tests now reported as skipped. --- tests/test_bdist_rpm.py | 40 ++++++++++++++++--------------------- tests/test_build_clib.py | 7 ++----- tests/test_build_ext.py | 8 ++------ tests/test_check.py | 6 ++---- tests/test_config_cmd.py | 3 +-- tests/test_sdist.py | 10 ++++------ tests/test_sysconfig.py | 9 +++------ tests/test_unixccompiler.py | 6 +----- 8 files changed, 32 insertions(+), 57 deletions(-) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index aa1445d10a..bcbb5633e8 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -43,18 +43,15 @@ def tearDown(self): sys.argv[:] = self.old_sys_argv[1] super(BuildRpmTestCase, self).tearDown() + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + @unittest.skipUnless(sys.platform.startswith('linux'), + 'spurious sdtout/stderr output under Mac OS X') + @unittest.skipIf(find_executable('rpm') is None, + 'the rpm command is not found') + @unittest.skipIf(find_executable('rpmbuild') is None, + 'the rpmbuild command is not found') def test_quiet(self): - - # XXX I am unable yet to make this test work without - # spurious sdtout/stderr output under Mac OS X - if not sys.platform.startswith('linux'): - return - - # this test will run only if the rpm commands are found - if (find_executable('rpm') is None or - find_executable('rpmbuild') is None): - return - # let's create a package tmp_dir = self.mkdtemp() pkg_dir = os.path.join(tmp_dir, 'foo') @@ -87,19 +84,16 @@ def test_quiet(self): self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files) self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files) + # XXX I am unable yet to make this test work without + # spurious sdtout/stderr output under Mac OS X + @unittest.skipUnless(sys.platform.startswith('linux'), + 'spurious sdtout/stderr output under Mac OS X') + # http://bugs.python.org/issue1533164 + @unittest.skipIf(find_executable('rpm') is None, + 'the rpm command is not found') + @unittest.skipIf(find_executable('rpmbuild') is None, + 'the rpmbuild command is not found') def test_no_optimize_flag(self): - - # XXX I am unable yet to make this test work without - # spurious sdtout/stderr output under Mac OS X - if not sys.platform.startswith('linux'): - return - - # http://bugs.python.org/issue1533164 - # this test will run only if the rpm command is found - if (find_executable('rpm') is None or - find_executable('rpmbuild') is None): - return - # let's create a package that brakes bdist_rpm tmp_dir = self.mkdtemp() pkg_dir = os.path.join(tmp_dir, 'foo') diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index c2b981f20e..acc99e78c1 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -102,11 +102,8 @@ def test_finalize_options(self): cmd.distribution.libraries = 'WONTWORK' self.assertRaises(DistutilsSetupError, cmd.finalize_options) + @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_run(self): - # can't test on windows - if sys.platform == 'win32': - return - pkg_dir, dist = self.create_dist() cmd = build_clib(dist) @@ -131,7 +128,7 @@ def test_run(self): if ccmd is None: continue if find_executable(ccmd[0]) is None: - return # can't test + self.skipTest('The %r command is not found' % ccmd[0]) # this should work cmd.run() diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 3cfaa2c692..9853abd4c5 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -61,9 +61,9 @@ def test_build_ext(self): sys.stdout = old_stdout if ALREADY_TESTED: - return + self.skipTest('Already tested in %s' % ALREADY_TESTED) else: - ALREADY_TESTED = True + ALREADY_TESTED = type(self).__name__ import xx @@ -113,10 +113,6 @@ def test_solaris_enable_shared(self): self.assertGreater(len(cmd.library_dirs), 0) def test_user_site(self): - # site.USER_SITE was introduced in 2.6 - if sys.version < '2.6': - return - import site dist = Distribution({'name': 'xx'}) cmd = build_ext(dist) diff --git a/tests/test_check.py b/tests/test_check.py index 4de64734c4..601b68686b 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -55,9 +55,8 @@ def test_check_metadata(self): cmd = self._run(metadata) self.assertEqual(cmd._warnings, 0) + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") def test_check_document(self): - if not HAS_DOCUTILS: # won't test without docutils - return pkg_info, dist = self.create_dist() cmd = check(dist) @@ -71,9 +70,8 @@ def test_check_document(self): msgs = cmd._check_rst_data(rest) self.assertEqual(len(msgs), 0) + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") def test_check_restructuredtext(self): - if not HAS_DOCUTILS: # won't test without docutils - return # let's see if it detects broken rest in long_description broken_rest = 'title\n===\n\ntest' pkg_info, dist = self.create_dist(long_description=broken_rest) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 79894c78d3..0c8dbd8269 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -37,9 +37,8 @@ def test_dump_file(self): dump_file(this_file, 'I am the header') self.assertEqual(len(self._logs), numlines+1) + @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_search_cpp(self): - if sys.platform == 'win32': - return pkg_dir, dist = self.create_dist() cmd = config(dist) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index e6359d6a8a..c952406131 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -125,13 +125,11 @@ def test_prune_file_list(self): self.assertEqual(len(content), 4) @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + @unittest.skipIf(find_executable('tar') is None, + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") def test_make_distribution(self): - - # check if tar and gzip are installed - if (find_executable('tar') is None or - find_executable('gzip') is None): - return - # now building a sdist dist, cmd = self.get_cmd() diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 07812d80fc..a1cb47d87c 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -82,12 +82,9 @@ def test_srcdir_independent_of_cwd(self): os.chdir(cwd) self.assertEqual(srcdir, srcdir2) + @unittest.skipUnless(get_default_compiler() == 'unix', + 'not testing if default compiler is not unix') def test_customize_compiler(self): - - # not testing if default compiler is not unix - if get_default_compiler() != 'unix': - return - os.environ['AR'] = 'my_ar' os.environ['ARFLAGS'] = '-arflags' @@ -150,7 +147,7 @@ def test_sysconfig_compiler_vars(self): import sysconfig as global_sysconfig if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): - return + self.skipTest('compiler flags customized') self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED')) self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC')) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index a5a63fdde3..3d14e12aa9 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -21,12 +21,8 @@ def tearDown(self): sys.platform = self._backup_platform sysconfig.get_config_var = self._backup_get_config_var + @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_runtime_libdir_option(self): - - # not tested under windows - if sys.platform == 'win32': - return - # Issue#5900 # # Ensure RUNPATH is added to extension modules with RPATH if From 3beec05fa08399627b01eedec1555c8c697f4fdf Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 21 Dec 2013 22:19:46 +0100 Subject: [PATCH 3818/8469] Fix DeprecationWarnings in test suite --- tests/test_dist.py | 16 ++++++++-------- tests/test_upload.py | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/test_dist.py b/tests/test_dist.py index 9a8ca19902..61ac57d230 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -406,14 +406,14 @@ def test_read_metadata(self): PKG_INFO.seek(0) metadata.read_pkg_file(PKG_INFO) - self.assertEquals(metadata.name, "package") - self.assertEquals(metadata.version, "1.0") - self.assertEquals(metadata.description, "xxx") - self.assertEquals(metadata.download_url, 'http://example.com') - self.assertEquals(metadata.keywords, ['one', 'two']) - self.assertEquals(metadata.platforms, ['UNKNOWN']) - self.assertEquals(metadata.obsoletes, None) - self.assertEquals(metadata.requires, ['foo']) + self.assertEqual(metadata.name, "package") + self.assertEqual(metadata.version, "1.0") + self.assertEqual(metadata.description, "xxx") + self.assertEqual(metadata.download_url, 'http://example.com') + self.assertEqual(metadata.keywords, ['one', 'two']) + self.assertEqual(metadata.platforms, ['UNKNOWN']) + self.assertEqual(metadata.obsoletes, None) + self.assertEqual(metadata.requires, ['foo']) def test_suite(): suite = unittest.TestSuite() diff --git a/tests/test_upload.py b/tests/test_upload.py index a474596e33..df35b429d2 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -114,11 +114,11 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') - self.assert_(headers['Content-type'].startswith('multipart/form-data')) - self.assertEquals(self.last_open.req.get_method(), 'POST') - self.assertEquals(self.last_open.req.get_full_url(), - 'http://pypi.python.org/pypi') - self.assert_(b'xxx' in self.last_open.req.data) + self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) + self.assertEqual(self.last_open.req.get_method(), 'POST') + self.assertEqual(self.last_open.req.get_full_url(), + 'http://pypi.python.org/pypi') + self.assertIn(b'xxx', self.last_open.req.data) def test_suite(): return unittest.makeSuite(uploadTestCase) From c2c0846c8840e37fe93fc8bed174801e6799db7e Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 21 Dec 2013 22:57:56 +0100 Subject: [PATCH 3819/8469] Issue #20045: Fix "setup.py register --list-classifiers". --- command/register.py | 5 ++++- tests/support.py | 7 ++++--- tests/test_register.py | 19 +++++++++++++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/command/register.py b/command/register.py index 99545affa4..9b39ed36aa 100644 --- a/command/register.py +++ b/command/register.py @@ -5,6 +5,7 @@ # created 2002/10/21, Richard Jones +import cgi import os, string, getpass import io import urllib.parse, urllib.request @@ -87,7 +88,9 @@ def classifiers(self): ''' url = self.repository+'?:action=list_classifiers' response = urllib.request.urlopen(url) - log.info(response.read()) + content_type = response.getheader('content-type', 'text/plain') + encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii') + log.info(response.read().decode(encoding)) def verify_metadata(self): ''' Send the metadata to the package index server to be checked. diff --git a/tests/support.py b/tests/support.py index 84d9232328..71ad4f42b2 100644 --- a/tests/support.py +++ b/tests/support.py @@ -32,14 +32,15 @@ def tearDown(self): def _log(self, level, msg, args): if level not in (DEBUG, INFO, WARN, ERROR, FATAL): raise ValueError('%s wrong log level' % str(level)) + if not isinstance(msg, str): + raise TypeError("msg should be str, not '%.200s'" + % (type(msg).__name__)) self.logs.append((level, msg, args)) def get_logs(self, *levels): def _format(msg, args): - if len(args) == 0: - return msg return msg % args - return [_format(msg, args) for level, msg, args + return [msg % args for level, msg, args in self.logs if level in levels] def clear_logs(self): diff --git a/tests/test_register.py b/tests/test_register.py index f4efa13d78..8bcc85851a 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -10,6 +10,7 @@ from distutils.command import register as register_module from distutils.command.register import register from distutils.errors import DistutilsSetupError +from distutils.log import INFO from distutils.tests.test_config import PyPIRCCommandTestCase @@ -58,12 +59,18 @@ def __init__(self): def __call__(self, *args): return self - def open(self, req): + def open(self, req, data=None, timeout=None): self.reqs.append(req) return self def read(self): - return 'xxx' + return b'xxx' + + def getheader(self, name, default=None): + return { + 'content-type': 'text/plain; charset=utf-8', + }.get(name.lower(), default) + class RegisterTestCase(PyPIRCCommandTestCase): @@ -285,6 +292,14 @@ def test_check_metadata_deprecated(self): cmd.check_metadata() self.assertEqual(len(w.warnings), 1) + def test_list_classifiers(self): + cmd = self._get_cmd() + cmd.list_classifiers = 1 + cmd.run() + results = self.get_logs(INFO) + self.assertEqual(results, ['running check', 'xxx']) + + def test_suite(): return unittest.makeSuite(RegisterTestCase) From 17a7b8192a8fcba2649854c844ae22fa0f512085 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 22 Dec 2013 00:44:01 +0100 Subject: [PATCH 3820/8469] Fix urllib.request.build_opener mocking in test_distutils (should fix some random buildbot failures) --- tests/test_register.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_register.py b/tests/test_register.py index 8bcc85851a..6180133994 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -81,11 +81,13 @@ def setUp(self): def _getpass(prompt): return 'password' getpass.getpass = _getpass + urllib.request._opener = None self.old_opener = urllib.request.build_opener self.conn = urllib.request.build_opener = FakeOpener() def tearDown(self): getpass.getpass = self._old_getpass + urllib.request._opener = None urllib.request.build_opener = self.old_opener super(RegisterTestCase, self).tearDown() From 9f4a8134cd20941bd90e6419948c7bdc83475ad0 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 22 Dec 2013 01:35:53 +0100 Subject: [PATCH 3821/8469] Issue #12226: HTTPS is now used by default when connecting to PyPI. --- config.py | 2 +- tests/test_config.py | 4 ++-- tests/test_upload.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config.py b/config.py index 1fd53346e9..a97635f2c0 100644 --- a/config.py +++ b/config.py @@ -21,7 +21,7 @@ class PyPIRCCommand(Command): """Base command that knows how to handle the .pypirc file """ - DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi' + DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' DEFAULT_REALM = 'pypi' repository = None realm = None diff --git a/tests/test_config.py b/tests/test_config.py index 525bee9416..12593610aa 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -87,7 +87,7 @@ def test_server_registration(self): config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi'), + ('repository', 'https://pypi.python.org/pypi'), ('server', 'server1'), ('username', 'me')] self.assertEqual(config, waited) @@ -96,7 +96,7 @@ def test_server_registration(self): config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi'), + ('repository', 'https://pypi.python.org/pypi'), ('server', 'server-login'), ('username', 'tarek')] self.assertEqual(config, waited) diff --git a/tests/test_upload.py b/tests/test_upload.py index 4c6464a32e..d2696866fe 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -72,11 +72,11 @@ class uploadTestCase(PyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() - self.old_class = httpclient.HTTPConnection - self.conn = httpclient.HTTPConnection = FakeConnection() + self.old_class = httpclient.HTTPSConnection + self.conn = httpclient.HTTPSConnection = FakeConnection() def tearDown(self): - httpclient.HTTPConnection = self.old_class + httpclient.HTTPSConnection = self.old_class super(uploadTestCase, self).tearDown() def test_finalize_options(self): @@ -88,7 +88,7 @@ def test_finalize_options(self): cmd.finalize_options() for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), - ('repository', 'http://pypi.python.org/pypi')): + ('repository', 'https://pypi.python.org/pypi')): self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): From a9d129418d7569a12e225e130711524a89868eca Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 22 Dec 2013 18:13:51 +0100 Subject: [PATCH 3822/8469] Fix TypeError on "setup.py upload --show-response". --- command/register.py | 5 +---- command/upload.py | 3 ++- config.py | 7 +++++++ tests/test_upload.py | 17 ++++++++++++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/command/register.py b/command/register.py index 9b39ed36aa..55656c2353 100644 --- a/command/register.py +++ b/command/register.py @@ -5,7 +5,6 @@ # created 2002/10/21, Richard Jones -import cgi import os, string, getpass import io import urllib.parse, urllib.request @@ -88,9 +87,7 @@ def classifiers(self): ''' url = self.repository+'?:action=list_classifiers' response = urllib.request.urlopen(url) - content_type = response.getheader('content-type', 'text/plain') - encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii') - log.info(response.read().decode(encoding)) + log.info(self._read_pypi_response(response)) def verify_metadata(self): ''' Send the metadata to the package index server to be checked. diff --git a/command/upload.py b/command/upload.py index d2bc82cea3..e30c189791 100644 --- a/command/upload.py +++ b/command/upload.py @@ -196,5 +196,6 @@ def upload_file(self, command, pyversion, filename): self.announce('Upload failed (%s): %s' % (status, reason), log.ERROR) if self.show_response: - msg = '\n'.join(('-' * 75, result.read(), '-' * 75)) + text = self._read_pypi_response(result) + msg = '\n'.join(('-' * 75, text, '-' * 75)) self.announce(msg, log.INFO) diff --git a/config.py b/config.py index a97635f2c0..7e10fff9d9 100644 --- a/config.py +++ b/config.py @@ -3,6 +3,7 @@ Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ +import cgi import os from configparser import ConfigParser @@ -101,6 +102,12 @@ def _read_pypirc(self): return {} + def _read_pypi_response(self, response): + """Read and decode a PyPI HTTP response.""" + content_type = response.getheader('content-type', 'text/plain') + encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii') + return response.read().decode(encoding) + def initialize_options(self): """Initialize options.""" self.repository = None diff --git a/tests/test_upload.py b/tests/test_upload.py index fbf80e3804..8532369aa5 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -6,6 +6,7 @@ from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution +from distutils.log import INFO from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase @@ -48,6 +49,14 @@ def __init__(self, url): self.req = None self.msg = 'OK' + def getheader(self, name, default=None): + return { + 'content-type': 'text/plain; charset=utf-8', + }.get(name.lower(), default) + + def read(self): + return b'xyzzy' + def getcode(self): return 200 @@ -108,10 +117,11 @@ def test_upload(self): # lets run it pkg_dir, dist = self.create_dist(dist_files=dist_files) cmd = upload(dist) + cmd.show_response = 1 cmd.ensure_finalized() cmd.run() - # what did we send ? + # what did we send ? headers = dict(self.last_open.req.headers) self.assertEqual(headers['Content-length'], '2087') self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) @@ -120,6 +130,11 @@ def test_upload(self): 'https://pypi.python.org/pypi') self.assertIn(b'xxx', self.last_open.req.data) + # The PyPI response body was echoed + results = self.get_logs(INFO) + self.assertIn('xyzzy\n', results[-1]) + + def test_suite(): return unittest.makeSuite(uploadTestCase) From 8ee4e0365d4d31b4d0b42511567fa2c2657dcdcb Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 22 Dec 2013 19:37:17 +0100 Subject: [PATCH 3823/8469] Fix bootstrap issue by importing the cgi module lazily --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 7e10fff9d9..106e146598 100644 --- a/config.py +++ b/config.py @@ -3,7 +3,6 @@ Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ -import cgi import os from configparser import ConfigParser @@ -104,6 +103,7 @@ def _read_pypirc(self): def _read_pypi_response(self, response): """Read and decode a PyPI HTTP response.""" + import cgi content_type = response.getheader('content-type', 'text/plain') encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii') return response.read().decode(encoding) From 889b0255164812a81f21cec8fae9c4cd6929b532 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Mon, 30 Dec 2013 14:39:46 -0600 Subject: [PATCH 3824/8469] Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound) --- tests/test_archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 6b42c5a213..2d72af4aa6 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -308,7 +308,7 @@ def test_make_archive_owner_group(self): owner='kjhkjhkjg', group='oihohoh') self.assertTrue(os.path.exists(res)) - @unittest.skipUnless(zlib, "Requires zlib") + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") def test_tarfile_root_owner(self): tmpdir, tmpdir2, base_name = self._create_files() From 8fd408904c0379e17ba17f8ee313627645562dfe Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Mon, 30 Dec 2013 15:09:20 -0600 Subject: [PATCH 3825/8469] Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound) --- tests/test_sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 49e267e20a..5a04e0ddd0 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -429,7 +429,7 @@ def test_manual_manifest(self): self.assertEqual(sorted(filenames), ['fake-1.0', 'fake-1.0/PKG-INFO', 'fake-1.0/README.manual']) - @unittest.skipUnless(zlib, "requires zlib") + @unittest.skipUnless(ZLIB_SUPPORT, "requires zlib") @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") @unittest.skipIf(find_executable('tar') is None, "The tar command is not found") From e6808a7ee674d31e2f10310237cee1dc7d1ce6ca Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 5 Jan 2014 04:40:25 -0800 Subject: [PATCH 3826/8469] Bump version number for 3.4.0b2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 38a50869ea..725a33d6dc 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0b1" +__version__ = "3.4.0b2" #--end constants-- From 7f50db7ceebeb2134f9000f8228588c7c18e59a6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 25 Jan 2014 09:19:50 +0100 Subject: [PATCH 3827/8469] Bump to 3.3.4rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6747ab8677..8a637d1bd9 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.3" +__version__ = "3.3.4rc1" #--end constants-- From 4a1da2e04a6c5ca6e81bf48c37daef69c38cdb23 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 26 Jan 2014 00:48:23 -0800 Subject: [PATCH 3828/8469] Version bump for 3.4.0b3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 725a33d6dc..bf9badd5f5 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0b2" +__version__ = "3.4.0b3" #--end constants-- From 51bb181329a0d4167451376ad8168a1af005ba70 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Tue, 28 Jan 2014 15:04:40 +0100 Subject: [PATCH 3829/8469] Issue #9709: Revert 97fb852c5c26. Many extensions are not using PyMODINIT_FUNC. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 9be592370a..80689b6357 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -538,7 +538,7 @@ def build_extension(self, ext): library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, extra_postargs=extra_args, - export_symbols=ext.export_symbols, + export_symbols=self.get_export_symbols(ext), debug=self.debug, build_temp=self.build_temp, target_lang=language) From 4988103fdd5b6a0c02e3df2a282bea48a7a34a7f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 6 Feb 2014 22:49:45 +0200 Subject: [PATCH 3830/8469] Issue #20363. Fixed BytesWarning triggerred by test suite. Patch by Berker Peksag. --- command/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/register.py b/command/register.py index 55656c2353..b49f86fe58 100644 --- a/command/register.py +++ b/command/register.py @@ -300,5 +300,5 @@ def post_to_server(self, data, auth=None): result = 200, 'OK' if self.show_response: dashes = '-' * 75 - self.announce('%s%s%s' % (dashes, data, dashes)) + self.announce('%s%r%s' % (dashes, data, dashes)) return result From f5efce06e4cf3367c6f316bb78847c43eb4e2054 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 9 Feb 2014 08:43:05 +0100 Subject: [PATCH 3831/8469] Bump to 3.3.4 final --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8a637d1bd9..de5560b4f6 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.4rc1" +__version__ = "3.3.4" #--end constants-- From c256b0353847fe4c0235bfd4604660193f5b8a9e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 15:37:32 -0500 Subject: [PATCH 3832/8469] Bumped to 3.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3e5907dcf9..3764723de3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "2.3" +DEFAULT_VERSION = "3.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 93bbb90e96..f7d2e86941 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '2.3' +__version__ = '3.0' From 875393f610a867ae7258d673c1cf5638e253eff4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 15:51:20 -0500 Subject: [PATCH 3833/8469] Declare support for Python 3.4 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index dc4391c27a..5d19cd9659 100755 --- a/setup.py +++ b/setup.py @@ -181,6 +181,7 @@ def run(self): Programming Language :: Python :: 3.1 Programming Language :: Python :: 3.2 Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From 4c7aaccacb0a756f45862826025bfdd579195d1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 16:09:01 -0500 Subject: [PATCH 3834/8469] Use zip files rather than tar files for source distributions of setuptools itself. Fixes #7 for users of Python 2.7.4 and later. --- CHANGES.txt | 4 ++++ ez_setup.py | 34 ++++++++++++++++------------------ setup.cfg | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8200b99a95..3fcff3a9bd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,10 @@ CHANGES handled properly at runtime. In 2.x it was possible to get away without including the declaration, but only at the cost of forcing namespace packages to be imported early, which 3.0 no longer does. +* Issue #7: Setuptools itself is now distributed as a zipfile instead of a + tarball. This approach avoids the potential security vulnerabilities + presented by use of tar files. It also leverages the security features added + to ZipFile.extract in Python 2.7.4. --- 2.3 diff --git a/ez_setup.py b/ez_setup.py index 3764723de3..548abe719f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -17,7 +17,7 @@ import shutil import sys import tempfile -import tarfile +import zipfile import optparse import subprocess import platform @@ -40,16 +40,15 @@ def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 -def _install(tarball, install_args=()): - # extracting the tarball +def _install(archive_filename, install_args=()): + # extracting the archive tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) - tar = tarfile.open(tarball) - tar.extractall() - tar.close() + with zipfile.ZipFile(archive_filename) as archive: + archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) @@ -68,16 +67,15 @@ def _install(tarball, install_args=()): shutil.rmtree(tmpdir) -def _build_egg(egg, tarball, to_dir): - # extracting the tarball +def _build_egg(egg, archive_filename, to_dir): + # extracting the archive tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) - tar = tarfile.open(tarball) - tar.extractall() - tar.close() + with zipfile.ZipFile(archive_filename) as archive: + archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) @@ -101,9 +99,9 @@ def _do_download(version, download_base, to_dir, download_delay): egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): - tarball = download_setuptools(version, download_base, + archive = download_setuptools(version, download_base, to_dir, download_delay) - _build_egg(egg, tarball, to_dir) + _build_egg(egg, archive, to_dir) sys.path.insert(0, egg) # Remove previously-imported pkg_resources if present (see @@ -276,9 +274,9 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) - tgz_name = "setuptools-%s.tar.gz" % version - url = download_base + tgz_name - saveto = os.path.join(to_dir, tgz_name) + zip_name = "setuptools-%s.zip" % version + url = download_base + zip_name + saveto = os.path.join(to_dir, zip_name) if not os.path.exists(saveto): # Avoid repeated downloads log.warn("Downloading %s", url) downloader = downloader_factory() @@ -315,9 +313,9 @@ def _parse_args(): def main(version=DEFAULT_VERSION): """Install or upgrade setuptools and EasyInstall""" options = _parse_args() - tarball = download_setuptools(download_base=options.download_base, + archive = download_setuptools(download_base=options.download_base, downloader_factory=options.downloader_factory) - return _install(tarball, _build_install_args(options)) + return _install(archive, _build_install_args(options)) if __name__ == '__main__': sys.exit(main()) diff --git a/setup.cfg b/setup.cfg index 0a0079e055..a78a8033c3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ all_files = 1 upload-dir = docs/build/html [sdist] -formats=gztar +formats=zip [wheel] universal=1 From 0ccb40aaa4e49ca6b656fbba9996c78de1856b56 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 16:13:53 -0500 Subject: [PATCH 3835/8469] Extract 'archive_context' from _install and _build_egg --- ez_setup.py | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 548abe719f..e4a357eb35 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -22,6 +22,7 @@ import subprocess import platform import textwrap +import contextlib from distutils import log @@ -40,21 +41,9 @@ def _python_cmd(*args): args = (sys.executable,) + args return subprocess.call(args) == 0 -def _install(archive_filename, install_args=()): - # extracting the archive - tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s', tmpdir) - old_wd = os.getcwd() - try: - os.chdir(tmpdir) - with zipfile.ZipFile(archive_filename) as archive: - archive.extractall() - - # going in the directory - subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) - os.chdir(subdir) - log.warn('Now working in %s', subdir) +def _install(archive_filename, install_args=()): + with archive_context(archive_filename): # installing log.warn('Installing Setuptools') if not _python_cmd('setup.py', 'install', *install_args): @@ -62,37 +51,39 @@ def _install(archive_filename, install_args=()): log.warn('See the error message above.') # exitcode will be 2 return 2 - finally: - os.chdir(old_wd) - shutil.rmtree(tmpdir) def _build_egg(egg, archive_filename, to_dir): + with archive_context(archive_filename): + # building an egg + log.warn('Building a Setuptools egg in %s', to_dir) + _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) + # returning the result + log.warn(egg) + if not os.path.exists(egg): + raise IOError('Could not build the egg.') + + +@contextlib.contextmanager +def archive_context(filename): # extracting the archive tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) - with zipfile.ZipFile(archive_filename) as archive: + with zipfile.ZipFile(filename) as archive: archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) log.warn('Now working in %s', subdir) - - # building an egg - log.warn('Building a Setuptools egg in %s', to_dir) - _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) + yield finally: os.chdir(old_wd) shutil.rmtree(tmpdir) - # returning the result - log.warn(egg) - if not os.path.exists(egg): - raise IOError('Could not build the egg.') def _do_download(version, download_base, to_dir, download_delay): From 972daaf261612e7d6cfd7e23082e275aba69f5f3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 17:03:59 -0500 Subject: [PATCH 3836/8469] Updated installation instructions, expanding on new techniques available to Windows 8 users and clarifying which technique Mac OS X users should use. Fixes #59. --- README.txt | 62 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/README.txt b/README.txt index 6079c2e555..2e5ca8fde0 100755 --- a/README.txt +++ b/README.txt @@ -9,38 +9,56 @@ Installing and Using Setuptools Installation Instructions ------------------------- -Upgrading from Distribute -========================= +The recommended way to bootstrap setuptools on any system is to download +`ez_setup.py`_ and run it using the target Python environment. Different +operating systems have different recommended techniques to accomplish this +basic routine, so here are some examples to get you started. -Currently, Distribute disallows installing Setuptools 0.7+ over Distribute. -You must first uninstall any active version of Distribute first (see -`Uninstalling`_). +.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py + +Windows 8 (Powershell) +====================== + +For best results, uninstall previous versions FIRST (see `Uninstalling`_). -Upgrading from Setuptools 0.6 -============================= +Using Windows 8 or later, it's possible to install with one simple Powershell +command. Start up Powershell and paste this command:: -Upgrading from prior versions of Setuptools is supported. Initial reports -good success in this regard. + > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python - -Windows -======= +You must start the Powershell with Administrative privileges or you may choose +to install a user-local installation:: + + > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python - --user + +If you have Python 3.3 or later, you can use the ``py`` command to install to +different Python versions. For example, to install to Python 3.3 if you have +Python 2.7 installed:: + + > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | py -3 - The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg file and install it for you. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py - -For best results, uninstall previous versions FIRST (see `Uninstalling`_). - Once installation is complete, you will find an ``easy_install`` program in your Python ``Scripts`` subdirectory. For simple invocation and best results, add this directory to your ``PATH`` environment variable, if it is not already -present. +present. If you did a user-local install, the ``Scripts`` subdirectory is +``$env:APPDATA\Python\Scripts``. + +Windows 7 (or graphical install) +================================ -Unix-based Systems including Mac OS X -===================================== +For Windows 7 and earlier, download `ez_setup.py`_ using your favorite web +browser or other technique and "run" that file. + + +Unix (wget) +=========== + +Most Linux distributions come with wget. Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: @@ -55,9 +73,13 @@ install to the system Python:: Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py - > python ez_setup.py --user + > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python - --user + +Unix including Mac OS X (curl) +============================== +If your system has curl installed, follow the ``wget`` instructions but +replace ``wget`` with ``curl`` and ``-O`` with ``-o``. Python 2.4 and Python 2.5 support ================================= From 65b76ae3e3aa1171de28d6af7be95b594d046f96 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 17:05:31 -0500 Subject: [PATCH 3837/8469] Updated docs to declare Python requirement prior to installation instructions. --- README.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index 2e5ca8fde0..4871735df0 100755 --- a/README.txt +++ b/README.txt @@ -14,6 +14,10 @@ The recommended way to bootstrap setuptools on any system is to download operating systems have different recommended techniques to accomplish this basic routine, so here are some examples to get you started. +Setuptools requires Python 2.6 or later. To install setuptools +on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x +`_. + .. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py Windows 8 (Powershell) @@ -81,13 +85,6 @@ Unix including Mac OS X (curl) If your system has curl installed, follow the ``wget`` instructions but replace ``wget`` with ``curl`` and ``-O`` with ``-o``. -Python 2.4 and Python 2.5 support -================================= - -Setuptools 2.0 and later requires Python 2.6 or later. To install setuptools -on Python 2.4 or Python 2.5, use the bootstrap script for Setuptools 1.x: -https://bitbucket.org/pypa/setuptools/raw/bootstrap-py24/ez_setup.py. - Advanced Installation ===================== From fbf26248da1664d103df596bcbf11acfd638516f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 17:17:32 -0500 Subject: [PATCH 3838/8469] Removed Features functionality. Fixes #65. --- CHANGES.txt | 1 + setuptools/__init__.py | 4 +- setuptools/dist.py | 259 +---------------------------------- setuptools/tests/__init__.py | 83 ----------- 4 files changed, 6 insertions(+), 341 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3fcff3a9bd..0beaded091 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,7 @@ CHANGES tarball. This approach avoids the potential security vulnerabilities presented by use of tar files. It also leverages the security features added to ZipFile.extract in Python 2.7.4. +* Issue #65: Removed deprecated Features functionality. --- 2.3 diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fc9b7b936c..fb2fffc02b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -9,11 +9,11 @@ import setuptools.version from setuptools.extension import Extension -from setuptools.dist import Distribution, Feature, _get_unpatched +from setuptools.dist import Distribution, _get_unpatched from setuptools.depends import Require __all__ = [ - 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', + 'setup', 'Distribution', 'Command', 'Extension', 'Require', 'find_packages' ] diff --git a/setuptools/dist.py b/setuptools/dist.py index 0801ae74ff..dcb9ba4ee0 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -3,15 +3,12 @@ import re import os import sys -import warnings import distutils.log import distutils.core import distutils.cmd from distutils.core import Distribution as _Distribution -from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, - DistutilsSetupError) +from distutils.errors import DistutilsSetupError -from setuptools.depends import Require from setuptools.compat import numeric_types, basestring import pkg_resources @@ -137,7 +134,7 @@ def check_packages(dist, attr, value): class Distribution(_Distribution): - """Distribution with support for features, tests, and package data + """Distribution with support for tests and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': @@ -164,21 +161,6 @@ class Distribution(_Distribution): EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. - 'features' **deprecated** -- a dictionary mapping option names to - 'setuptools.Feature' - objects. Features are a portion of the distribution that can be - included or excluded based on user options, inter-feature dependencies, - and availability on the current system. Excluded features are omitted - from all setup commands, including source and binary distributions, so - you can create multiple distributions from the same source tree. - Feature names should be valid Python identifiers, except that they may - contain the '-' (minus) sign. Features can be included or excluded - via the command line options '--with-X' and '--without-X', where 'X' is - the name of the feature. Whether a feature is included by default, and - whether you are allowed to control this from the command line, is - determined by the Feature object. See the 'Feature' class for more - information. - 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as @@ -200,8 +182,7 @@ class Distribution(_Distribution): for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from - the distribution. They are used by the feature subsystem to configure the - distribution for the included and excluded features. + the distribution. """ _patched_dist = None @@ -223,11 +204,6 @@ def __init__(self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} - _attrs_dict = attrs or {} - if 'features' in _attrs_dict or 'require_features' in _attrs_dict: - Feature.warn_deprecated() - self.require_features = [] - self.features = {} self.dist_files = [] self.src_root = attrs and attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) @@ -245,17 +221,6 @@ def __init__(self, attrs=None): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) - def parse_command_line(self): - """Process features after parsing command line options""" - result = _Distribution.parse_command_line(self) - if self.features: - self._finalize_features() - return result - - def _feature_attrname(self,name): - """Convert feature name to corresponding option attribute name""" - return 'with_'+name.replace('-','_') - def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" from pkg_resources import working_set, parse_requirements @@ -267,8 +232,6 @@ def fetch_build_eggs(self, requires): def finalize_options(self): _Distribution.finalize_options(self) - if self.features: - self._set_global_opts_from_features() for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): value = getattr(self,ep.name,None) @@ -313,47 +276,6 @@ def fetch_build_egg(self, req): self._egg_fetcher = cmd return cmd.easy_install(req) - def _set_global_opts_from_features(self): - """Add --with-X/--without-X options based on optional features""" - - go = [] - no = self.negative_opt.copy() - - for name,feature in self.features.items(): - self._set_feature(name,None) - feature.validate(self) - - if feature.optional: - descr = feature.description - incdef = ' (default)' - excdef='' - if not feature.include_by_default(): - excdef, incdef = incdef, excdef - - go.append(('with-'+name, None, 'include '+descr+incdef)) - go.append(('without-'+name, None, 'exclude '+descr+excdef)) - no['without-'+name] = 'with-'+name - - self.global_options = self.feature_options = go + self.global_options - self.negative_opt = self.feature_negopt = no - - def _finalize_features(self): - """Add/remove features and resolve dependencies between them""" - - # First, flag all the enabled items (and thus their dependencies) - for name,feature in self.features.items(): - enabled = self.feature_is_included(name) - if enabled or (enabled is None and feature.include_by_default()): - feature.include_in(self) - self._set_feature(name,1) - - # Then disable the rest, so that off-by-default features don't - # get flagged as errors when they're required by an enabled feature - for name,feature in self.features.items(): - if not self.feature_is_included(name): - feature.exclude_from(self) - self._set_feature(name,0) - def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: @@ -373,25 +295,6 @@ def print_commands(self): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) - def _set_feature(self,name,status): - """Set feature's inclusion status""" - setattr(self,self._feature_attrname(name),status) - - def feature_is_included(self,name): - """Return 1 if feature is included, 0 if excluded, 'None' if unknown""" - return getattr(self,self._feature_attrname(name)) - - def include_feature(self,name): - """Request inclusion of feature named 'name'""" - - if self.feature_is_included(name)==0: - descr = self.features[name].description - raise DistutilsOptionError( - descr + " is required, but was excluded or is not available" - ) - self.features[name].include_in(self) - self._set_feature(name,1) - def include(self,**attrs): """Add items to distribution that are named in keyword arguments @@ -639,159 +542,3 @@ def handle_display_options(self, option_order): # Install it throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: module.Distribution = Distribution - - -class Feature: - """ - **deprecated** -- The `Feature` facility was never completely implemented - or supported, `has reported issues - `_ and will be removed in - a future version. - - A subset of the distribution that can be excluded if unneeded/wanted - - Features are created using these keyword arguments: - - 'description' -- a short, human readable description of the feature, to - be used in error messages, and option help messages. - - 'standard' -- if true, the feature is included by default if it is - available on the current system. Otherwise, the feature is only - included if requested via a command line '--with-X' option, or if - another included feature requires it. The default setting is 'False'. - - 'available' -- if true, the feature is available for installation on the - current system. The default setting is 'True'. - - 'optional' -- if true, the feature's inclusion can be controlled from the - command line, using the '--with-X' or '--without-X' options. If - false, the feature's inclusion status is determined automatically, - based on 'availabile', 'standard', and whether any other feature - requires it. The default setting is 'True'. - - 'require_features' -- a string or sequence of strings naming features - that should also be included if this feature is included. Defaults to - empty list. May also contain 'Require' objects that should be - added/removed from the distribution. - - 'remove' -- a string or list of strings naming packages to be removed - from the distribution if this feature is *not* included. If the - feature *is* included, this argument is ignored. This argument exists - to support removing features that "crosscut" a distribution, such as - defining a 'tests' feature that removes all the 'tests' subpackages - provided by other features. The default for this argument is an empty - list. (Note: the named package(s) or modules must exist in the base - distribution when the 'setup()' function is initially called.) - - other keywords -- any other keyword arguments are saved, and passed to - the distribution's 'include()' and 'exclude()' methods when the - feature is included or excluded, respectively. So, for example, you - could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be - added or removed from the distribution as appropriate. - - A feature must include at least one 'requires', 'remove', or other - keyword argument. Otherwise, it can't affect the distribution in any way. - Note also that you can subclass 'Feature' to create your own specialized - feature types that modify the distribution in other ways when included or - excluded. See the docstrings for the various methods here for more detail. - Aside from the methods, the only feature attributes that distributions look - at are 'description' and 'optional'. - """ - - @staticmethod - def warn_deprecated(): - warnings.warn( - "Features are deprecated and will be removed in a future " - "version. See http://bitbucket.org/pypa/setuptools/65.", - DeprecationWarning, - stacklevel=3, - ) - - def __init__(self, description, standard=False, available=True, - optional=True, require_features=(), remove=(), **extras): - self.warn_deprecated() - - self.description = description - self.standard = standard - self.available = available - self.optional = optional - if isinstance(require_features,(str,Require)): - require_features = require_features, - - self.require_features = [ - r for r in require_features if isinstance(r,str) - ] - er = [r for r in require_features if not isinstance(r,str)] - if er: extras['require_features'] = er - - if isinstance(remove,str): - remove = remove, - self.remove = remove - self.extras = extras - - if not remove and not require_features and not extras: - raise DistutilsSetupError( - "Feature %s: must define 'require_features', 'remove', or at least one" - " of 'packages', 'py_modules', etc." - ) - - def include_by_default(self): - """Should this feature be included by default?""" - return self.available and self.standard - - def include_in(self,dist): - - """Ensure feature and its requirements are included in distribution - - You may override this in a subclass to perform additional operations on - the distribution. Note that this method may be called more than once - per feature, and so should be idempotent. - - """ - - if not self.available: - raise DistutilsPlatformError( - self.description+" is required," - "but is not available on this platform" - ) - - dist.include(**self.extras) - - for f in self.require_features: - dist.include_feature(f) - - def exclude_from(self,dist): - - """Ensure feature is excluded from distribution - - You may override this in a subclass to perform additional operations on - the distribution. This method will be called at most once per - feature, and only after all included features have been asked to - include themselves. - """ - - dist.exclude(**self.extras) - - if self.remove: - for item in self.remove: - dist.exclude_package(item) - - def validate(self,dist): - - """Verify that feature makes sense in context of distribution - - This method is called by the distribution just before it parses its - command line. It checks to ensure that the 'remove' attribute, if any, - contains only valid package/module names that are present in the base - distribution when 'setup()' is called. You may override it in a - subclass to perform any other required validation of the feature - against a target distribution. - """ - - for item in self.remove: - if not dist.has_contents_for(item): - raise DistutilsSetupError( - "%s wants to be able to remove %s, but the distribution" - " doesn't contain any packages or modules under %s" - % (self.description, item, item) - ) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index b5328ce67a..3749fd99f9 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -231,89 +231,6 @@ def testInvalidIncludeExclude(self): self.dist.exclude, package_dir=['q'] ) - -class FeatureTests(unittest.TestCase): - - def setUp(self): - self.req = Require('Distutils','1.0.3','distutils') - self.dist = makeSetup( - features={ - 'foo': Feature("foo",standard=True,require_features=['baz',self.req]), - 'bar': Feature("bar", standard=True, packages=['pkg.bar'], - py_modules=['bar_et'], remove=['bar.ext'], - ), - 'baz': Feature( - "baz", optional=False, packages=['pkg.baz'], - scripts = ['scripts/baz_it'], - libraries=[('libfoo','foo/foofoo.c')] - ), - 'dwim': Feature("DWIM", available=False, remove='bazish'), - }, - script_args=['--without-bar', 'install'], - packages = ['pkg.bar', 'pkg.foo'], - py_modules = ['bar_et', 'bazish'], - ext_modules = [Extension('bar.ext',['bar.c'])] - ) - - def testDefaults(self): - self.assertTrue(not - Feature( - "test",standard=True,remove='x',available=False - ).include_by_default() - ) - self.assertTrue( - Feature("test",standard=True,remove='x').include_by_default() - ) - # Feature must have either kwargs, removes, or require_features - self.assertRaises(DistutilsSetupError, Feature, "test") - - def testAvailability(self): - self.assertRaises( - DistutilsPlatformError, - self.dist.features['dwim'].include_in, self.dist - ) - - def testFeatureOptions(self): - dist = self.dist - self.assertTrue( - ('with-dwim',None,'include DWIM') in dist.feature_options - ) - self.assertTrue( - ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options - ) - self.assertTrue( - ('with-bar',None,'include bar (default)') in dist.feature_options - ) - self.assertTrue( - ('without-bar',None,'exclude bar') in dist.feature_options - ) - self.assertEqual(dist.feature_negopt['without-foo'],'with-foo') - self.assertEqual(dist.feature_negopt['without-bar'],'with-bar') - self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim') - self.assertTrue(not 'without-baz' in dist.feature_negopt) - - def testUseFeatures(self): - dist = self.dist - self.assertEqual(dist.with_foo,1) - self.assertEqual(dist.with_bar,0) - self.assertEqual(dist.with_baz,1) - self.assertTrue(not 'bar_et' in dist.py_modules) - self.assertTrue(not 'pkg.bar' in dist.packages) - self.assertTrue('pkg.baz' in dist.packages) - self.assertTrue('scripts/baz_it' in dist.scripts) - self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries) - self.assertEqual(dist.ext_modules,[]) - self.assertEqual(dist.require_features, [self.req]) - - # If we ask for bar, it should fail because we explicitly disabled - # it on the command line - self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar') - - def testFeatureWithInvalidRemove(self): - self.assertRaises( - SystemExit, makeSetup, features = {'x':Feature('x', remove='y')} - ) - class TestCommandTests(unittest.TestCase): def testTestIsCommand(self): From 871d5104c7b998a3fe4e52f8ea53ebec409a7052 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:18:56 -0500 Subject: [PATCH 3839/8469] Remove import (missed in parent commit). --- setuptools/tests/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 3749fd99f9..a8eb711040 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -14,7 +14,6 @@ from setuptools.compat import func_code import setuptools.dist import setuptools.depends as dep -from setuptools import Feature from setuptools.depends import Require def additional_tests(): From 4dcbe9cd38e5143431541c66d5dba418b665bb5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:32:28 -0500 Subject: [PATCH 3840/8469] Remove unused import and excess whitespace. --- setuptools/command/test.py | 40 +------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index db2fc7b140..e936418d0f 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -3,7 +3,7 @@ import sys from pkg_resources import * from pkg_resources import _namespace_packages -from unittest import TestLoader, main +from unittest import TestLoader class ScanningLoader(TestLoader): @@ -57,7 +57,6 @@ def initialize_options(self): self.test_module = None self.test_loader = None - def finalize_options(self): if self.test_suite is None: @@ -79,8 +78,6 @@ def finalize_options(self): if self.test_loader is None: self.test_loader = "setuptools.command.test:ScanningLoader" - - def with_project_on_sys_path(self, func): if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: @@ -122,7 +119,6 @@ def with_project_on_sys_path(self, func): sys.modules.update(old_modules) working_set.__init__() - def run(self): if self.distribution.install_requires: self.distribution.fetch_build_eggs(self.distribution.install_requires) @@ -137,7 +133,6 @@ def run(self): self.announce('running "unittest %s"' % cmd) self.with_project_on_sys_path(self.run_tests) - def run_tests(self): import unittest @@ -163,36 +158,3 @@ def run_tests(self): None, None, [unittest.__file__]+self.test_args, testLoader = cks ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From c20ed4dffd0779fc12c9b2fbc6433621424dbfcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:37:09 -0500 Subject: [PATCH 3841/8469] Remove import * --- setuptools/command/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e936418d0f..a9a0d1d735 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,8 +1,9 @@ from setuptools import Command from distutils.errors import DistutilsOptionError import sys -from pkg_resources import * -from pkg_resources import _namespace_packages +from pkg_resources import (resource_listdir, resource_exists, + normalize_path, working_set, _namespace_packages, add_activation_listener, + require, EntryPoint) from unittest import TestLoader class ScanningLoader(TestLoader): From a31410a54b0e756c3ee27f2bcfe2dd6301968c77 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:41:55 -0500 Subject: [PATCH 3842/8469] Remove excess whitespace and unused imports. --- setuptools/command/alias.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 52384e1a28..465d6ae46b 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,7 +1,3 @@ -import distutils, os -from setuptools import Command -from distutils.util import convert_path -from distutils import log from distutils.errors import * from setuptools.command.setopt import edit_config, option_base, config_file @@ -11,17 +7,17 @@ def shquote(arg): if c in arg: return repr(arg) if arg.split() != [arg]: return repr(arg) - return arg + return arg class alias(option_base): """Define a shortcut that invokes one or more commands""" - + description = "define a shortcut to invoke one or more commands" command_consumes_arguments = True user_options = [ - ('remove', 'r', 'remove (unset) the alias'), + ('remove', 'r', 'remove (unset) the alias'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] @@ -77,6 +73,3 @@ def format_alias(name, aliases): else: source = '--filename=%r' % source return source+name+' '+command - - - From 0eacd77e0ebd6a0a4e0672fbd1c77663f3507966 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:42:42 -0500 Subject: [PATCH 3843/8469] Remove import * --- setuptools/command/alias.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 465d6ae46b..05c0766bd4 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,4 +1,5 @@ -from distutils.errors import * +from distutils.errors import DistutilsOptionError + from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): From c5cbf5fd6a47e022c5ff66545c417b43dfa9a060 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:48:55 -0500 Subject: [PATCH 3844/8469] Normalize indentation and remove unused imports --- setuptools/command/build_ext.py | 75 +++++++++++++++------------------ 1 file changed, 33 insertions(+), 42 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 50a039ce50..513f9b9674 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -5,7 +5,8 @@ except ImportError: _build_ext = _du_build_ext -import os, sys +import os +import sys from distutils.file_util import copy_file from setuptools.extension import Library from distutils.ccompiler import new_compiler @@ -41,10 +42,6 @@ def if_dl(s): return '' - - - - class build_ext(_build_ext): def run(self): """Build extensions in build directory, then copy if --inplace""" @@ -75,7 +72,6 @@ def copy_extensions_to_source(self): if ext._needs_stub: self.write_stub(package_dir or os.curdir, ext, True) - if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'): # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 def swig_sources(self, sources, *otherargs): @@ -84,8 +80,6 @@ def swig_sources(self, sources, *otherargs): # Then do any actual SWIG stuff on the remainder return _du_build_ext.swig_sources(self, sources, *otherargs) - - def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) if fullname in self.ext_map: @@ -109,7 +103,7 @@ def finalize_options(self): self.extensions = self.extensions or [] self.check_extensions_list(self.extensions) self.shlibs = [ext for ext in self.extensions - if isinstance(ext,Library)] + if isinstance(ext, Library)] if self.shlibs: self.setup_shlib_compiler() for ext in self.extensions: @@ -171,8 +165,6 @@ def setup_shlib_compiler(self): # hack so distutils' build_extension() builds a library instead compiler.link_shared_object = link_shared_object.__get__(compiler) - - def get_export_symbols(self, ext): if isinstance(ext,Library): return ext.export_symbols @@ -221,27 +213,29 @@ def write_stub(self, output_dir, ext, compile=False): raise DistutilsError(stub_file+" already exists! Please delete.") if not self.dry_run: f = open(stub_file,'w') - f.write('\n'.join([ - "def __bootstrap__():", - " global __bootstrap__, __file__, __loader__", - " import sys, os, pkg_resources, imp"+if_dl(", dl"), - " __file__ = pkg_resources.resource_filename(__name__,%r)" - % os.path.basename(ext._file_name), - " del __bootstrap__", - " if '__loader__' in globals():", - " del __loader__", - if_dl(" old_flags = sys.getdlopenflags()"), - " old_dir = os.getcwd()", - " try:", - " os.chdir(os.path.dirname(__file__))", - if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), - " imp.load_dynamic(__name__,__file__)", - " finally:", - if_dl(" sys.setdlopenflags(old_flags)"), - " os.chdir(old_dir)", - "__bootstrap__()", - "" # terminal \n - ])) + f.write( + '\n'.join([ + "def __bootstrap__():", + " global __bootstrap__, __file__, __loader__", + " import sys, os, pkg_resources, imp"+if_dl(", dl"), + " __file__ = pkg_resources.resource_filename(__name__,%r)" + % os.path.basename(ext._file_name), + " del __bootstrap__", + " if '__loader__' in globals():", + " del __loader__", + if_dl(" old_flags = sys.getdlopenflags()"), + " old_dir = os.getcwd()", + " try:", + " os.chdir(os.path.dirname(__file__))", + if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), + " imp.load_dynamic(__name__,__file__)", + " finally:", + if_dl(" sys.setdlopenflags(old_flags)"), + " os.chdir(old_dir)", + "__bootstrap__()", + "" # terminal \n + ]) + ) f.close() if compile: from distutils.util import byte_compile @@ -259,10 +253,10 @@ def write_stub(self, output_dir, ext, compile=False): # Build shared libraries # def link_shared_object(self, objects, output_libname, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None - ): self.link( + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): + self.link( self.SHARED_LIBRARY, objects, output_libname, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, @@ -273,10 +267,9 @@ def link_shared_object(self, objects, output_libname, output_dir=None, libtype = 'static' def link_shared_object(self, objects, output_libname, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None - ): + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, + extra_postargs=None, build_temp=None, target_lang=None): # XXX we need to either disallow these attrs on Library instances, # or warn/abort here if set, or something... #libraries=None, library_dirs=None, runtime_library_dirs=None, @@ -294,5 +287,3 @@ def link_shared_object(self, objects, output_libname, output_dir=None, self.create_static_lib( objects, basename, output_dir, debug, target_lang ) - - From 74c3cea6941fa3789d6ae3873ce260fd4a7dc029 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:50:16 -0500 Subject: [PATCH 3845/8469] Remove import * --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 513f9b9674..e08131d777 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -20,7 +20,7 @@ del get_config_var from distutils.sysconfig import _config_vars as _CONFIG_VARS from distutils import log -from distutils.errors import * +from distutils.errors import DistutilsError have_rtld = False use_stubs = False From 2394cfef645c1d22de240c0c8b1a9eb918a1f6ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:51:37 -0500 Subject: [PATCH 3846/8469] Reorganize imports and remove excess whitespace --- setuptools/command/rotate.py | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index b10acfb41f..c556aa17c0 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -1,9 +1,9 @@ -import distutils, os +import os from setuptools import Command from setuptools.compat import basestring from distutils.util import convert_path from distutils import log -from distutils.errors import * +from distutils.errors import DistutilsOptionError class rotate(Command): """Delete older distributions""" @@ -29,7 +29,7 @@ def finalize_options(self): "(e.g. '.zip' or '.egg')" ) if self.keep is None: - raise DistutilsOptionError("Must specify number of files to keep") + raise DistutilsOptionError("Must specify number of files to keep") try: self.keep = int(self.keep) except ValueError: @@ -56,28 +56,3 @@ def run(self): log.info("Deleting %s", f) if not self.dry_run: os.unlink(f) - - - - - - - - - - - - - - - - - - - - - - - - - From 8c7d2e1f80901375a50a99d1903386c29a423f26 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Feb 2014 18:54:45 -0500 Subject: [PATCH 3847/8469] Normalize whitespace and imports --- setuptools/command/setopt.py | 51 +++++++++++------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index aa468c88fe..575653c8c7 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -1,8 +1,9 @@ -import distutils, os +import os +import distutils from setuptools import Command from distutils.util import convert_path from distutils import log -from distutils.errors import * +from distutils.errors import DistutilsOptionError __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] @@ -25,20 +26,6 @@ def config_file(kind="local"): "config_file() type must be 'local', 'global', or 'user'", kind ) - - - - - - - - - - - - - - def edit_config(filename, settings, dry_run=False): """Edit a configuration file to include `settings` @@ -61,13 +48,14 @@ def edit_config(filename, settings, dry_run=False): opts.add_section(section) for option,value in options.items(): if value is None: - log.debug("Deleting %s.%s from %s", + log.debug( + "Deleting %s.%s from %s", section, option, filename ) opts.remove_option(section,option) if not opts.options(section): log.info("Deleting empty [%s] section from %s", - section, filename) + section, filename) opts.remove_section(section) else: log.debug( @@ -78,27 +66,28 @@ def edit_config(filename, settings, dry_run=False): log.info("Writing %s", filename) if not dry_run: - f = open(filename,'w'); opts.write(f); f.close() + with open(filename, 'w') as f: + opts.write(f) class option_base(Command): """Abstract base class for commands that mess with config files""" - + user_options = [ ('global-config', 'g', - "save options to the site-wide distutils.cfg file"), + "save options to the site-wide distutils.cfg file"), ('user-config', 'u', - "save options to the current user's pydistutils.cfg file"), + "save options to the current user's pydistutils.cfg file"), ('filename=', 'f', - "configuration file to use (default=setup.cfg)"), + "configuration file to use (default=setup.cfg)"), ] boolean_options = [ 'global-config', 'user-config', - ] + ] def initialize_options(self): self.global_config = None - self.user_config = None + self.user_config = None self.filename = None def finalize_options(self): @@ -116,9 +105,7 @@ def finalize_options(self): "Must specify only one configuration file option", filenames ) - self.filename, = filenames - - + self.filename, = filenames class setopt(option_base): @@ -130,7 +117,7 @@ class setopt(option_base): ('command=', 'c', 'command to set an option for'), ('option=', 'o', 'option to set'), ('set-value=', 's', 'value of the option'), - ('remove', 'r', 'remove (unset) the value'), + ('remove', 'r', 'remove (unset) the value'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] @@ -156,9 +143,3 @@ def run(self): }, self.dry_run ) - - - - - - From 154e4ab5dff1cc780dcfa04140506bc574e22179 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Mon, 10 Feb 2014 14:45:05 -0800 Subject: [PATCH 3848/8469] Python 3.4.0rc1: Version bump. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index bf9badd5f5..4c716e2075 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0b3" +__version__ = "3.4.0rc1" #--end constants-- From 191f5a01dc9bdace571fa8474f4bd50743b65994 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 11 Feb 2014 16:17:54 +0100 Subject: [PATCH 3849/8469] Issue #7: Generate both tar archive and zip archive. --- CHANGES.txt | 8 ++++---- setup.cfg | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0beaded091..602d826933 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,10 +14,10 @@ CHANGES handled properly at runtime. In 2.x it was possible to get away without including the declaration, but only at the cost of forcing namespace packages to be imported early, which 3.0 no longer does. -* Issue #7: Setuptools itself is now distributed as a zipfile instead of a - tarball. This approach avoids the potential security vulnerabilities - presented by use of tar files. It also leverages the security features added - to ZipFile.extract in Python 2.7.4. +* Issue #7: Setuptools itself is now distributed as a zip archive in addition to + tar archive. ez_setup.py now uses zip archive. This approach avoids the potential + security vulnerabilities presented by use of tar archives in ez_setup.py. + It also leverages the security features added to ZipFile.extract in Python 2.7.4. * Issue #65: Removed deprecated Features functionality. --- diff --git a/setup.cfg b/setup.cfg index a78a8033c3..35d93b51b2 100755 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ all_files = 1 upload-dir = docs/build/html [sdist] -formats=zip +formats = gztar zip [wheel] universal=1 From 4104aa38286858dd73eca1da6da25f2c8a170f1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Feb 2014 10:43:21 -0500 Subject: [PATCH 3850/8469] Delint site-patch --- setuptools/site-patch.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index a7166f1407..c2168019ad 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -1,5 +1,6 @@ def __boot(): - import sys, os, os.path + import sys + import os PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] @@ -49,13 +50,13 @@ def __boot(): addsitedir(item) sys.__egginsert += oldpos # restore effective old position - - d,nd = makepath(stdpath[0]) + + d, nd = makepath(stdpath[0]) insert_at = None new_path = [] for item in sys.path: - p,np = makepath(item) + p, np = makepath(item) if np==nd and insert_at is None: # We've hit the first 'system' path entry, so added entries go here @@ -67,17 +68,9 @@ def __boot(): # new path after the insert point, back-insert it new_path.insert(insert_at, item) insert_at += 1 - + sys.path[:] = new_path -if __name__=='site': +if __name__=='site': __boot() del __boot - - - - - - - - From 911fe5e498a58f1a05b2a7b3a34dfcaa7b9dd89d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Feb 2014 22:33:15 -0500 Subject: [PATCH 3851/8469] Backed out changeset 28901bac2f2e See #148 --HG-- branch : setuptools extra : amend_source : 73cc453f11a0b77f930138eee03b1fc8e69399af --- setuptools/command/bdist_egg.py | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index eb92bd2483..0a9d9a0ccb 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -26,8 +26,8 @@ def write_stub(resource, pyfile): ])) f.close() -# stub __init__.py for packages distributed without one -NS_PKG_STUB = '__import__("pkg_resources").declare_namespace(__name__)' + + @@ -186,7 +186,7 @@ def run(self): write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) ext_outputs[p] = ext_name.replace(os.sep,'/') - to_compile.extend(self.make_init_files()) + if to_compile: cmd.byte_compile(to_compile) @@ -260,30 +260,30 @@ def zip_safe(self): log.warn("zip_safe flag not set; analyzing archive contents...") return analyze_egg(self.bdist_dir, self.stubs) - def make_init_files(self): - """Create missing package __init__ files""" - init_files = [] - for base,dirs,files in walk_egg(self.bdist_dir): - if base==self.bdist_dir: - # don't put an __init__ in the root - continue - for name in files: - if name.endswith('.py'): - if '__init__.py' not in files: - pkg = base[len(self.bdist_dir)+1:].replace(os.sep,'.') - if self.distribution.has_contents_for(pkg): - log.warn("Creating missing __init__.py for %s",pkg) - filename = os.path.join(base,'__init__.py') - if not self.dry_run: - f = open(filename,'w'); f.write(NS_PKG_STUB) - f.close() - init_files.append(filename) - break - else: - # not a package, don't traverse to subdirectories - dirs[:] = [] - - return init_files + + + + + + + + + + + + + + + + + + + + + + + + def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" From c6deb3393c545c20ce22c094975766e286a831d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Feb 2014 22:59:05 -0500 Subject: [PATCH 3852/8469] Added tag 3.0b1 for changeset faba785e9b9e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e3af502655..ac04062818 100644 --- a/.hgtags +++ b/.hgtags @@ -118,3 +118,4 @@ b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 ab1c2a26e06f2a2006e8e867e4d41ccf1d6cf9b2 2.2b1 caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 39f7ef5ef22183f3eba9e05a46068e1d9fd877b0 2.2 +faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 From d2d40d0c30f6b5178851e79a0bca116492b63898 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Feb 2014 16:56:08 -0500 Subject: [PATCH 3853/8469] 2.3 was never released. --- CHANGES.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 52058d22a8..1df52ba4e2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,6 @@ CHANGES security vulnerabilities presented by use of tar archives in ez_setup.py. It also leverages the security features added to ZipFile.extract in Python 2.7.4. * Issue #65: Removed deprecated Features functionality. - ---- -2.3 ---- - * Pull Request #28: Remove backport of ``_bytecode_filenames`` which is available in Python 2.6 and later, but also has better compatibility with Python 3 environments. From 0daefd2b07a5435b0795f3dd0c3d102352611343 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 15 Feb 2014 14:56:16 -0600 Subject: [PATCH 3854/8469] Fixed Issue #125: setuptools leaves a ~/.subversion dir laying around after it completes This is the best that can probably be done. Temporary directories are used for get the svn binary version and to get the initial directory info (for determining if one is, in fact, in a svn working directory) ALSO: The check for SVN was not right. Decided on files to only check for .svn/entries because missing properties just leaves out the external refs. And then incorporated a test on the code to make sure that svn info completed. Test passed on CPytonh 2.x and 2.3 on windows, travis-ci, and travis-ci/mac. Note: There seems to be an issue with pypy and a test. --- setuptools/svn_utils.py | 54 +++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index a9bdc5c334..e1d336e26b 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -4,6 +4,8 @@ from distutils import log import xml.dom.pulldom import shlex +import shutil +import tempfile import locale import codecs import unicodedata @@ -27,6 +29,25 @@ # http://stackoverflow.com/questions/5658622/ # python-subprocess-popen-environment-path +class TempDir(object): + """" + Very simple temporary directory context manager. + Will try to delete afterward, but will also ignore OS and similar + errors on deletion. + """ + def __init__(self): + self.path = None + + def __enter__(self): + self.path = tempfile.mkdtemp() + return self + + def __exit__(self, exctype, excvalue, exctrace): + try: + shutil.rmtree(self.path, True) + except OSError: #removal errors are not the only possible + pass + self.path = None def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0): #regarding the shell argument, see: http://bugs.python.org/issue8557 @@ -231,7 +252,16 @@ class SvnInfo(object): @staticmethod def get_svn_version(): - code, data = _run_command(['svn', '--version', '--quiet']) + # Temp config directory should be enough to check for repository + # This is needed because .svn always creates .subversion and + # some operating systems do not handle dot directory correctly. + # Real queries in real svn repos with be concerned with it creation + with TempDir() as tempdir: + code, data = _run_command(['svn', + '--config-dir', tempdir.path, + '--version', + '--quiet']) + if code == 0 and data: return data.strip() else: @@ -247,13 +277,22 @@ def get_svn_version(): @classmethod def load(cls, dirname=''): normdir = os.path.normpath(dirname) - code, data = _run_command(['svn', 'info', normdir]) + + # Temp config directory should be enough to check for repository + # This is needed because .svn always creates .subversion and + # some operating systems do not handle dot directory correctly. + # Real queries in real svn repos with be concerned with it creation + with TempDir() as tempdir: + code, data = _run_command(['svn', + '--config-dir', tempdir.path, + 'info', normdir]) + # Must check for some contents, as some use empty directories - # in testcases + # in testcases, however only enteries is needed also the info + # command above MUST have worked svn_dir = os.path.join(normdir, '.svn') - has_svn = (os.path.isfile(os.path.join(svn_dir, 'entries')) or - os.path.isfile(os.path.join(svn_dir, 'dir-props')) or - os.path.isfile(os.path.join(svn_dir, 'dir-prop-base'))) + is_svn_wd = (not code or + os.path.isfile(os.path.join(svn_dir, 'entries'))) svn_version = tuple(cls.get_svn_version().split('.')) @@ -262,7 +301,8 @@ def load(cls, dirname=''): except ValueError: base_svn_version = tuple() - if not has_svn: + if not is_svn_wd: + #return an instance of this NO-OP class return SvnInfo(dirname) if code or not base_svn_version or base_svn_version < (1, 3): From 962664bbb8564ccd3cff8072f20d56a9bdcf3043 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 15 Feb 2014 22:35:49 +0100 Subject: [PATCH 3855/8469] Use tempfile.TemporaryDirectory() with Python >=3.2. --- setuptools/py31compat.py | 26 ++++++++++++++++++++++++++ setuptools/svn_utils.py | 30 +++++------------------------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index dbb324b0e3..e6b2910a5b 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -9,3 +9,29 @@ def get_path(name): if name not in ('platlib', 'purelib'): raise ValueError("Name must be purelib or platlib") return get_python_lib(name=='platlib') + +try: + # Python >=3.2 + from tempfile import TemporaryDirectory +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. + """ + def __init__(self): + self.name = None # Handle mkdtemp raising an exception + self.name = tempfile.mkdtemp() + + def __enter__(self): + return self.name + + def __exit__(self, exctype, excvalue, exctrace): + try: + shutil.rmtree(self.name, True) + except OSError: #removal errors are not the only possible + pass + self.name = None diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index e1d336e26b..d62fecd02a 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -5,12 +5,12 @@ import xml.dom.pulldom import shlex import shutil -import tempfile import locale import codecs import unicodedata import warnings from setuptools.compat import unicode +from setuptools.py31compat import TemporaryDirectory from xml.sax.saxutils import unescape try: @@ -29,26 +29,6 @@ # http://stackoverflow.com/questions/5658622/ # python-subprocess-popen-environment-path -class TempDir(object): - """" - Very simple temporary directory context manager. - Will try to delete afterward, but will also ignore OS and similar - errors on deletion. - """ - def __init__(self): - self.path = None - - def __enter__(self): - self.path = tempfile.mkdtemp() - return self - - def __exit__(self, exctype, excvalue, exctrace): - try: - shutil.rmtree(self.path, True) - except OSError: #removal errors are not the only possible - pass - self.path = None - def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0): #regarding the shell argument, see: http://bugs.python.org/issue8557 try: @@ -256,9 +236,9 @@ def get_svn_version(): # This is needed because .svn always creates .subversion and # some operating systems do not handle dot directory correctly. # Real queries in real svn repos with be concerned with it creation - with TempDir() as tempdir: + with TemporaryDirectory() as tempdir: code, data = _run_command(['svn', - '--config-dir', tempdir.path, + '--config-dir', tempdir, '--version', '--quiet']) @@ -282,9 +262,9 @@ def load(cls, dirname=''): # This is needed because .svn always creates .subversion and # some operating systems do not handle dot directory correctly. # Real queries in real svn repos with be concerned with it creation - with TempDir() as tempdir: + with TemporaryDirectory() as tempdir: code, data = _run_command(['svn', - '--config-dir', tempdir.path, + '--config-dir', tempdir, 'info', normdir]) # Must check for some contents, as some use empty directories From 657501ddc8410495c9f44b7280f4a7abf3241753 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 15 Feb 2014 22:54:03 +0100 Subject: [PATCH 3856/8469] Clean some imports. --- setuptools/command/install_egg_info.py | 2 +- setuptools/svn_utils.py | 1 - setuptools/tests/test_bdist_egg.py | 7 +++++-- setuptools/tests/test_build_ext.py | 3 +-- setuptools/tests/test_develop.py | 6 ++++-- setuptools/tests/test_test.py | 6 ++++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index f44b34b555..73b5ef7375 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,7 +1,7 @@ from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util -import os, shutil, pkg_resources +import os, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index d62fecd02a..8fc552fa73 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -4,7 +4,6 @@ from distutils import log import xml.dom.pulldom import shlex -import shutil import locale import codecs import unicodedata diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 1a12218645..cf4bcd1179 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -1,9 +1,12 @@ """develop tests """ +import os +import re +import shutil +import site import sys -import os, re, shutil, tempfile, unittest import tempfile -import site +import unittest from distutils.errors import DistutilsError from setuptools.compat import StringIO diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index a520ced9d6..a92e53ae26 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,6 +1,6 @@ """build_ext tests """ -import os, shutil, tempfile, unittest +import unittest from distutils.command.build_ext import build_ext as distutils_build_ext from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution @@ -17,4 +17,3 @@ def test_get_ext_filename(self): res = cmd.get_ext_filename('foo') wanted = distutils_build_ext.get_ext_filename(cmd, 'foo') assert res == wanted - diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 7b90161a8a..18f35c0f45 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -1,9 +1,11 @@ """develop tests """ +import os +import shutil +import site import sys -import os, shutil, tempfile, unittest import tempfile -import site +import unittest from distutils.errors import DistutilsError from setuptools.command.develop import develop diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 7a06a40329..f85123b05e 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -2,10 +2,12 @@ """develop tests """ +import os +import shutil +import site import sys -import os, shutil, tempfile, unittest import tempfile -import site +import unittest from distutils.errors import DistutilsError from setuptools.compat import StringIO From acad569cbe8ef47a3e891bff32e31c760bfdf200 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Feb 2014 09:25:05 -0500 Subject: [PATCH 3857/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1df52ba4e2..8fb29c4e11 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 3.0 --- +* Issue #125: Prevent Subversion support from creating a ~/.subversion + directory just for checking the presence of a Subversion repository. * Issue #12: Namespace packages are now imported lazily. That is, the mere declaration of a namespace package in an egg on ``sys.path`` no longer causes it to be imported when ``pkg_resources`` is imported. Note that this From 7b7c594c8ce8b6a3e44e4a387dbc5da5a3d9094e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 15:21:12 -0500 Subject: [PATCH 3858/8469] Delint bdist_wininst --- setuptools/command/bdist_wininst.py | 38 ++++------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index e8521f834c..b5be1f348b 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,12 +1,12 @@ +import os from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst -import os, sys class bdist_wininst(_bdist_wininst): _good_upload = _bad_upload = None def create_exe(self, arcname, fullname, bitmap=None): _bdist_wininst.create_exe(self, arcname, fullname, bitmap) - installer_name = self.get_installer_filename(fullname) + installer_name = self.get_installer_filename(fullname) if self.target_version: pyversion = self.target_version # fix 2.5+ bdist_wininst ignoring --target-version spec @@ -14,7 +14,7 @@ def create_exe(self, arcname, fullname, bitmap=None): else: pyversion = 'any' self._good_upload = ('bdist_wininst', pyversion, installer_name) - + def _fix_upload_names(self): good, bad = self._good_upload, self._bad_upload dist_files = getattr(self.distribution, 'dist_files', []) @@ -23,7 +23,7 @@ def _fix_upload_names(self): if good not in dist_files: dist_files.append(good) - def reinitialize_command (self, command, reinit_subcommands=0): + def reinitialize_command(self, command, reinit_subcommands=0): cmd = self.distribution.reinitialize_command( command, reinit_subcommands) if command in ('install', 'install_lib'): @@ -38,7 +38,6 @@ def run(self): finally: self._is_running = False - if not hasattr(_bdist_wininst, 'get_installer_filename'): def get_installer_filename(self, fullname): # Factored out to allow overriding in subclasses @@ -47,36 +46,9 @@ def get_installer_filename(self, fullname): # it's better to include this in the name installer_name = os.path.join(self.dist_dir, "%s.win32-py%s.exe" % - (fullname, self.target_version)) + (fullname, self.target_version)) else: installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) return installer_name # get_installer_filename() - - - - - - - - - - - - - - - - - - - - - - - - - - - From 22d6ecdd7229d471c27374523f21d2d37173db7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 15:26:11 -0500 Subject: [PATCH 3859/8469] Remove get_installer_filename (copied from some version of Python now required to be supplied). --- setuptools/command/bdist_wininst.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index b5be1f348b..b0eb4eaaf9 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -37,18 +37,3 @@ def run(self): self._fix_upload_names() finally: self._is_running = False - - if not hasattr(_bdist_wininst, 'get_installer_filename'): - def get_installer_filename(self, fullname): - # Factored out to allow overriding in subclasses - if self.target_version: - # if we create an installer for a specific python version, - # it's better to include this in the name - installer_name = os.path.join(self.dist_dir, - "%s.win32-py%s.exe" % - (fullname, self.target_version)) - else: - installer_name = os.path.join(self.dist_dir, - "%s.win32.exe" % fullname) - return installer_name - # get_installer_filename() From 7747b612e8aa87883e7d495473f4f7df6d3b720d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 15:26:32 -0500 Subject: [PATCH 3860/8469] Remove unused import --- setuptools/command/bdist_wininst.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index b0eb4eaaf9..f6f06c4ef2 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,4 +1,3 @@ -import os from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst class bdist_wininst(_bdist_wininst): From 5ae17b58d4823cb5e74ec1b7802c0debbc119dc9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 15:55:45 -0500 Subject: [PATCH 3861/8469] Remove patching of upload_names (dist_files) - Python 2.6 already does the right thing. --- setuptools/command/bdist_wininst.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index f6f06c4ef2..5effab2786 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,27 +1,6 @@ from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst class bdist_wininst(_bdist_wininst): - _good_upload = _bad_upload = None - - def create_exe(self, arcname, fullname, bitmap=None): - _bdist_wininst.create_exe(self, arcname, fullname, bitmap) - installer_name = self.get_installer_filename(fullname) - if self.target_version: - pyversion = self.target_version - # fix 2.5+ bdist_wininst ignoring --target-version spec - self._bad_upload = ('bdist_wininst', 'any', installer_name) - else: - pyversion = 'any' - self._good_upload = ('bdist_wininst', pyversion, installer_name) - - def _fix_upload_names(self): - good, bad = self._good_upload, self._bad_upload - dist_files = getattr(self.distribution, 'dist_files', []) - if bad in dist_files: - dist_files.remove(bad) - if good not in dist_files: - dist_files.append(good) - def reinitialize_command(self, command, reinit_subcommands=0): cmd = self.distribution.reinitialize_command( command, reinit_subcommands) @@ -33,6 +12,5 @@ def run(self): self._is_running = True try: _bdist_wininst.run(self) - self._fix_upload_names() finally: self._is_running = False From 404b7af74fb65299aa9c14e0e40541e3a4a68285 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 19:32:11 -0500 Subject: [PATCH 3862/8469] Update workaround to reference filed ticket. --- setuptools/command/bdist_wininst.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 5effab2786..d4d195a086 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,10 +2,14 @@ class bdist_wininst(_bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): + """ + Supplement reinitialize_command to work around + http://bugs.python.org/issue20819 + """ cmd = self.distribution.reinitialize_command( command, reinit_subcommands) if command in ('install', 'install_lib'): - cmd.install_lib = None # work around distutils bug + cmd.install_lib = None return cmd def run(self): From 3ca95bfdfe8b4e68338f43de462e6b57e3fdf1a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Mar 2014 19:45:51 -0500 Subject: [PATCH 3863/8469] Remove excess whitespace --- setuptools/command/install_scripts.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 105dabca6a..1c6cc51d50 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -51,4 +51,3 @@ def write_script(self, script_name, contents, mode="t", *ignored): f.write(contents) f.close() chmod(target, 0x1FF-mask) # 0777 - From a0c7e67a26b11e3458424112bc78be90d52b2fc5 Mon Sep 17 00:00:00 2001 From: lsinger Date: Sat, 1 Mar 2014 18:02:23 -0800 Subject: [PATCH 3864/8469] Map .pyx sources to .c or .cpp depending on language --- setuptools/extension.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index d7892d3d9f..b72f6e2ac8 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -27,7 +27,18 @@ class Extension(_Extension): def __init__(self, *args, **kw): _Extension.__init__(self, *args, **kw) if not have_pyrex(): - self._convert_pyx_sources_to_c() + if self.language.lower() == 'c++': + self._convert_pyx_sources_to_cpp() + else: + self._convert_pyx_sources_to_c() + + def _convert_pyx_sources_to_cpp(self): + "convert .pyx extensions to .cpp" + def pyx_to_c(source): + if source.endswith('.pyx'): + source = source[:-4] + '.cpp' + return source + self.sources = list(map(pyx_to_c, self.sources)) def _convert_pyx_sources_to_c(self): "convert .pyx extensions to .c" From 11f4bbc2d46628ff5b3890b037928fec93802f3c Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 4 Mar 2014 14:28:47 +0100 Subject: [PATCH 3865/8469] Issue #156: Fix spelling of __PYVENV_LAUNCHER__ variable. --- CHANGES.txt | 1 + setuptools/command/easy_install.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8fb29c4e11..572280b73c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,7 @@ CHANGES * Pull Request #28: Remove backport of ``_bytecode_filenames`` which is available in Python 2.6 and later, but also has better compatibility with Python 3 environments. +* Issue #156: Fix spelling of __PYVENV_LAUNCHER__ variable. --- 2.2 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8e39ee8024..4f497c3bed 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -53,7 +53,7 @@ VersionConflict, DEVELOP_DIST, ) -sys_executable = os.environ.get('__VENV_LAUNCHER__', +sys_executable = os.environ.get('__PYVENV_LAUNCHER__', os.path.normpath(sys.executable)) __all__ = [ From d404db9c746c793109a43f286570faacf6d9d55c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 05:28:59 -0500 Subject: [PATCH 3866/8469] Added tag 3.0 for changeset 8e8c50925f18 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ac04062818..f2d9e2936d 100644 --- a/.hgtags +++ b/.hgtags @@ -119,3 +119,4 @@ ab1c2a26e06f2a2006e8e867e4d41ccf1d6cf9b2 2.2b1 caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 39f7ef5ef22183f3eba9e05a46068e1d9fd877b0 2.2 faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 +8e8c50925f18eafb7e66fe020aa91a85b9a4b122 3.0 From 6d3b451a1084419d7cbfa09cfc59452bb5f983bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 05:29:28 -0500 Subject: [PATCH 3867/8469] Bumped to 3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e4a357eb35..324c0774d5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.0" +DEFAULT_VERSION = "3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 5e417433f7..78e8c09240 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[egg_info.writers] -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -PKG-INFO = setuptools.command.egg_info:write_pkg_info -requires.txt = setuptools.command.egg_info:write_requirements -entry_points.txt = setuptools.command.egg_info:write_entries -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg +[distutils.setup_keywords] +eager_resources = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +extras_require = setuptools.dist:check_extras +zip_safe = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +test_loader = setuptools.dist:check_importable +include_package_data = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +entry_points = setuptools.dist:check_entry_points +package_data = setuptools.dist:check_package_data +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list [distutils.commands] -install = setuptools.command.install:install develop = setuptools.command.develop:develop -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -build_ext = setuptools.command.build_ext:build_ext -install_scripts = setuptools.command.install_scripts:install_scripts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +bdist_egg = setuptools.command.bdist_egg:bdist_egg +register = setuptools.command.register:register +build_py = setuptools.command.build_py:build_py rotate = setuptools.command.rotate:rotate -saveopts = setuptools.command.saveopts:saveopts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg -easy_install = setuptools.command.easy_install:easy_install -install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_ext = setuptools.command.build_ext:build_ext +install = setuptools.command.install:install install_lib = setuptools.command.install_lib:install_lib -egg_info = setuptools.command.egg_info:egg_info -sdist = setuptools.command.sdist:sdist -build_py = setuptools.command.build_py:build_py -upload_docs = setuptools.command.upload_docs:upload_docs -register = setuptools.command.register:register -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install_egg_info = setuptools.command.install_egg_info:install_egg_info test = setuptools.command.test:test +upload_docs = setuptools.command.upload_docs:upload_docs +sdist = setuptools.command.sdist:sdist +egg_info = setuptools.command.egg_info:egg_info +easy_install = setuptools.command.easy_install:easy_install +saveopts = setuptools.command.saveopts:saveopts setopt = setuptools.command.setopt:setopt +install_scripts = setuptools.command.install_scripts:install_scripts -[distutils.setup_keywords] -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool -use_2to3 = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -eager_resources = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -extras_require = setuptools.dist:check_extras -convert_2to3_doctests = setuptools.dist:assert_string_list -install_requires = setuptools.dist:check_requirements -tests_require = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -include_package_data = setuptools.dist:assert_bool -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -exclude_package_data = setuptools.dist:check_package_data - -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[egg_info.writers] +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info +depends.txt = setuptools.command.egg_info:warn_depends_obsolete [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + [console_scripts] easy_install = setuptools.command.easy_install:main easy_install-3.4 = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 4fd464d812..9a6bf43731 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] -certifi==0.0.8 \ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index f7d2e86941..27d4bb6661 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.0' +__version__ = '3.1' From 23fbe1420ca21a13d4324d87debb07a8e72a8625 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 05:36:37 -0500 Subject: [PATCH 3868/8469] Update documentation to reflect that ez_setup.py moves. Fixes #155. --- README.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.txt b/README.txt index 4871735df0..c0ba1cb96d 100755 --- a/README.txt +++ b/README.txt @@ -18,6 +18,9 @@ Setuptools requires Python 2.6 or later. To install setuptools on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x `_. +The link provided to ez_setup.py is a bookmark to bootstrap script for the +latest known stable release. + .. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py Windows 8 (Powershell) From 0a7c27a2c4366fdfe4b1ba0b40e3b3761bdc0791 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 05:40:03 -0500 Subject: [PATCH 3869/8469] Add an actual curl example (for easier copy/paste). --- README.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index c0ba1cb96d..a6f6acba2f 100755 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ Installation Instructions The recommended way to bootstrap setuptools on any system is to download `ez_setup.py`_ and run it using the target Python environment. Different operating systems have different recommended techniques to accomplish this -basic routine, so here are some examples to get you started. +basic routine, so below are some examples to get you started. Setuptools requires Python 2.6 or later. To install setuptools on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x @@ -77,8 +77,7 @@ install to the system Python:: > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python -Alternatively, on Python 2.6 and later, Setuptools may be installed to a -user-local path:: +Alternatively, Setuptools may be installed to a user-local path:: > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python - --user @@ -86,7 +85,9 @@ Unix including Mac OS X (curl) ============================== If your system has curl installed, follow the ``wget`` instructions but -replace ``wget`` with ``curl`` and ``-O`` with ``-o``. +replace ``wget`` with ``curl`` and ``-O`` with ``-o``. For example:: + + > curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -o - | python Advanced Installation From 2610eb2913cccd2e7264f47a79bdbf772611764a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 05:49:43 -0500 Subject: [PATCH 3870/8469] Removing the contributors file. While the project is immensely grateful for each and every contribution, a flat file of contributors is an extra burden for maintenance and has the potential to leave some contributors unacknowledged. Given the detailed use of the source code tools and references to the issue tracking systems, the actual contributions of each and every contributor, large or small, are transparently described. Thanks go out to all. --- CONTRIBUTORS.txt | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 CONTRIBUTORS.txt diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt deleted file mode 100644 index dd0b8c7f11..0000000000 --- a/CONTRIBUTORS.txt +++ /dev/null @@ -1,36 +0,0 @@ -============ -Contributors -============ - -* Alex Grönholm -* Alice Bevan-McGregor -* Arfrever Frehtes Taifersar Arahesis -* Christophe Combelles -* Daniel Stutzbach -* Daniel Holth -* Dirley Rodrigues -* Donald Stufft -* Grigory Petrov -* Hanno Schlichting -* Jannis Leidel -* Jason R. Coombs -* Jim Fulton -* Jonathan Lange -* Justin Azoff -* Lennart Regebro -* Marc Abramowitz -* Martin von Löwis -* Noufal Ibrahim -* Pedro Algarvio -* Pete Hollobon -* Phillip J. Eby -* Philip Jenvey -* Philip Thiem -* Reinout van Rees -* Robert Myers -* Stefan H. Holek -* Tarek Ziadé -* Toshio Kuratomi - -If you think you name is missing, please add it (alpha order by first name) - From 468929dc9320a78926dd1cacd8353bdfe8fdedd1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 06:24:27 -0500 Subject: [PATCH 3871/8469] Restore support for Python 2.6 in bootstrap script. Fixes #157. --- CHANGES.txt | 7 +++++++ ez_setup.py | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 572280b73c..2974a3b06f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +3.0.1 +----- + +* Issue #157: Restore support for Python 2.6 in bootstrap script where + ``zipfile.ZipFile`` does not yet have support for context managers. + --- 3.0 --- diff --git a/ez_setup.py b/ez_setup.py index 324c0774d5..dbe2a2e3e1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -64,6 +64,19 @@ def _build_egg(egg, archive_filename, to_dir): raise IOError('Could not build the egg.') +def get_zip_class(): + """ + Supplement ZipFile class to support context manager for Python 2.6 + """ + class ContextualZipFile(zipfile.ZipFile): + def __enter__(self): + return self + def __exit__(self, type, value, traceback): + self.close + return zipfile.Zipfile if hasattr(zipfile.ZipFile, '__exit__') else \ + ContextualZipFile + + @contextlib.contextmanager def archive_context(filename): # extracting the archive @@ -72,7 +85,7 @@ def archive_context(filename): old_wd = os.getcwd() try: os.chdir(tmpdir) - with zipfile.ZipFile(filename) as archive: + with get_zip_class()(filename) as archive: archive.extractall() # going in the directory From eb2cbf86238b219b07a76f8f3c786e31df3a8327 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 06:24:45 -0500 Subject: [PATCH 3872/8469] Bumped to 3.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index dbe2a2e3e1..6ed0ef803a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.1" +DEFAULT_VERSION = "3.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 27d4bb6661..b7a5531438 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.1' +__version__ = '3.0.1' From 83ef1504f4118c48af65b078f1a5968c4a173827 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 06:24:47 -0500 Subject: [PATCH 3873/8469] Added tag 3.0.1 for changeset cd9e857476ac --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f2d9e2936d..80103fc68e 100644 --- a/.hgtags +++ b/.hgtags @@ -120,3 +120,4 @@ caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 39f7ef5ef22183f3eba9e05a46068e1d9fd877b0 2.2 faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 8e8c50925f18eafb7e66fe020aa91a85b9a4b122 3.0 +cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 From 8005b272a99f4b5d992cefc332512898b3f9fa89 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 06:25:13 -0500 Subject: [PATCH 3874/8469] Bumped to 3.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 84 ++++++++++++++-------------- setuptools/version.py | 2 +- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6ed0ef803a..09821c3cc6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.0.1" +DEFAULT_VERSION = "3.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 78e8c09240..0ad659229e 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,54 +1,34 @@ -[distutils.setup_keywords] -eager_resources = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -extras_require = setuptools.dist:check_extras -zip_safe = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -test_loader = setuptools.dist:check_importable -include_package_data = setuptools.dist:assert_bool -test_suite = setuptools.dist:check_test_suite -entry_points = setuptools.dist:check_entry_points -package_data = setuptools.dist:check_package_data -packages = setuptools.dist:check_packages -convert_2to3_doctests = setuptools.dist:assert_string_list -namespace_packages = setuptools.dist:check_nsp -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list +[egg_info.writers] +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete [distutils.commands] -develop = setuptools.command.develop:develop bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -bdist_egg = setuptools.command.bdist_egg:bdist_egg +test = setuptools.command.test:test +sdist = setuptools.command.sdist:sdist +easy_install = setuptools.command.easy_install:easy_install +egg_info = setuptools.command.egg_info:egg_info +setopt = setuptools.command.setopt:setopt +install_egg_info = setuptools.command.install_egg_info:install_egg_info register = setuptools.command.register:register -build_py = setuptools.command.build_py:build_py +bdist_egg = setuptools.command.bdist_egg:bdist_egg +develop = setuptools.command.develop:develop +install_scripts = setuptools.command.install_scripts:install_scripts +build_ext = setuptools.command.build_ext:build_ext rotate = setuptools.command.rotate:rotate -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst alias = setuptools.command.alias:alias -build_ext = setuptools.command.build_ext:build_ext +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +build_py = setuptools.command.build_py:build_py install = setuptools.command.install:install +saveopts = setuptools.command.saveopts:saveopts install_lib = setuptools.command.install_lib:install_lib -install_egg_info = setuptools.command.install_egg_info:install_egg_info -test = setuptools.command.test:test upload_docs = setuptools.command.upload_docs:upload_docs -sdist = setuptools.command.sdist:sdist -egg_info = setuptools.command.egg_info:egg_info -easy_install = setuptools.command.easy_install:easy_install -saveopts = setuptools.command.saveopts:saveopts -setopt = setuptools.command.setopt:setopt -install_scripts = setuptools.command.install_scripts:install_scripts - -[egg_info.writers] -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -requires.txt = setuptools.command.egg_info:write_requirements -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl @@ -60,3 +40,23 @@ eggsecutable = setuptools.command.easy_install:bootstrap easy_install = setuptools.command.easy_install:main easy_install-3.4 = setuptools.command.easy_install:main +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data +test_suite = setuptools.dist:check_test_suite +exclude_package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +test_loader = setuptools.dist:check_importable +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list + diff --git a/setuptools/version.py b/setuptools/version.py index b7a5531438..da4039bce3 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.0.1' +__version__ = '3.0.2' From a0999be8ebc5d05763c3ea96ecfa9b8055e264f3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 09:30:02 -0500 Subject: [PATCH 3875/8469] Correct typo in previous bugfix --- CHANGES.txt | 6 ++++++ ez_setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2974a3b06f..6bf73335d0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +3.0.2 +----- + +* Correct typo in previous bugfix. + ----- 3.0.1 ----- diff --git a/ez_setup.py b/ez_setup.py index 09821c3cc6..e5adaca6c6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -73,7 +73,7 @@ def __enter__(self): return self def __exit__(self, type, value, traceback): self.close - return zipfile.Zipfile if hasattr(zipfile.ZipFile, '__exit__') else \ + return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \ ContextualZipFile From 78f26911a6c396355641eb359beb877479e24153 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 09:30:12 -0500 Subject: [PATCH 3876/8469] Added tag 3.0.2 for changeset bad1f30ee0df --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 80103fc68e..bbe48b933e 100644 --- a/.hgtags +++ b/.hgtags @@ -121,3 +121,4 @@ caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 8e8c50925f18eafb7e66fe020aa91a85b9a4b122 3.0 cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 +bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 From b57bf23d249df282af0ae499bb99bcdc2bebcc1c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 09:30:39 -0500 Subject: [PATCH 3877/8469] Bumped to 3.0.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 92 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e5adaca6c6..68ca77ace6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.0.2" +DEFAULT_VERSION = "3.0.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 0ad659229e..d5bc899083 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ [egg_info.writers] -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +PKG-INFO = setuptools.command.egg_info:write_pkg_info depends.txt = setuptools.command.egg_info:warn_depends_obsolete +requires.txt = setuptools.command.egg_info:write_requirements +entry_points.txt = setuptools.command.egg_info:write_entries +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg + +[distutils.setup_keywords] +namespace_packages = setuptools.dist:check_nsp +use_2to3 = setuptools.dist:assert_bool +test_suite = setuptools.dist:check_test_suite +convert_2to3_doctests = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +test_loader = setuptools.dist:check_importable +tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +install_requires = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +use_2to3_fixers = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +extras_require = setuptools.dist:check_extras + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.commands] -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm test = setuptools.command.test:test -sdist = setuptools.command.sdist:sdist -easy_install = setuptools.command.easy_install:easy_install -egg_info = setuptools.command.egg_info:egg_info -setopt = setuptools.command.setopt:setopt -install_egg_info = setuptools.command.install_egg_info:install_egg_info -register = setuptools.command.register:register -bdist_egg = setuptools.command.bdist_egg:bdist_egg develop = setuptools.command.develop:develop -install_scripts = setuptools.command.install_scripts:install_scripts build_ext = setuptools.command.build_ext:build_ext rotate = setuptools.command.rotate:rotate -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -build_py = setuptools.command.build_py:build_py +easy_install = setuptools.command.easy_install:easy_install install = setuptools.command.install:install -saveopts = setuptools.command.saveopts:saveopts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm install_lib = setuptools.command.install_lib:install_lib upload_docs = setuptools.command.upload_docs:upload_docs - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +install_egg_info = setuptools.command.install_egg_info:install_egg_info +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +bdist_egg = setuptools.command.bdist_egg:bdist_egg +register = setuptools.command.register:register +egg_info = setuptools.command.egg_info:egg_info +setopt = setuptools.command.setopt:setopt +install_scripts = setuptools.command.install_scripts:install_scripts +build_py = setuptools.command.build_py:build_py [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main - -[distutils.setup_keywords] -dependency_links = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -use_2to3 = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -package_data = setuptools.dist:check_package_data -test_suite = setuptools.dist:check_test_suite -exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -test_loader = setuptools.dist:check_importable -entry_points = setuptools.dist:check_entry_points -extras_require = setuptools.dist:check_extras -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -use_2to3_fixers = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list - diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 9a6bf43731..4fd464d812 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==0.0.8 - [ssl:sys_platform=='win32'] -wincertstore==0.1 \ No newline at end of file +wincertstore==0.1 + +[certs] +certifi==0.0.8 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index da4039bce3..d2983471fb 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.0.2' +__version__ = '3.0.3' From 418afc938ef45cbedb7cbf37f11133725c43f6c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 09:50:34 -0500 Subject: [PATCH 3878/8469] Try invoking ez_setup.py to ensure it works at a basic level --HG-- extra : amend_source : 7cb5d6115f9933afd90e5d96a53af9c3ada79b80 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e13a5d4fde..2afa21a7af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,6 @@ python: - 3.3 - pypy # command to run tests -script: python setup.py test +script: + - python setup.py test + - python ez_setup.py --user From 4a641d6b17ca46fd04d3d5f75c80809bf32ad75d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 09:54:32 -0500 Subject: [PATCH 3879/8469] The DEFAULT_VERSION won't be present. Try an earlier vesion. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2afa21a7af..819885a628 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ python: # command to run tests script: - python setup.py test - - python ez_setup.py --user + - python -c "import ez_setup; ez_setup.main('3.0.2')" --user From 65f1b9b492d38e014be35489ffda591ce40552db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 10:29:44 -0500 Subject: [PATCH 3880/8469] Allow version to be passed to ez_setup.py. The parameter to main wasn't being used, so removed it. --HG-- extra : amend_source : 2a653d81b4afea7d91c9e58a537317dd24673ee0 --- ez_setup.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 68ca77ace6..97d60e768e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -310,15 +310,22 @@ def _parse_args(): const=lambda: download_file_insecure, default=get_best_downloader, help='Use internal, non-validating downloader' ) + parser.add_option( + '--version', help="Specify which version to download", + default=DEFAULT_VERSION, + ) options, args = parser.parse_args() # positional arguments are ignored return options -def main(version=DEFAULT_VERSION): +def main(): """Install or upgrade setuptools and EasyInstall""" options = _parse_args() - archive = download_setuptools(download_base=options.download_base, - downloader_factory=options.downloader_factory) + archive = download_setuptools( + version=options.version, + download_base=options.download_base, + downloader_factory=options.downloader_factory, + ) return _install(archive, _build_install_args(options)) if __name__ == '__main__': From d263e40875b2d7bea9659df905dc3bb94a42a30e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 10:30:36 -0500 Subject: [PATCH 3881/8469] Exercise ez_setup.py now using the new version command line parameter. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 819885a628..90b715d86f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ python: # command to run tests script: - python setup.py test - - python -c "import ez_setup; ez_setup.main('3.0.2')" --user + - python ez_setup.py --version 3.0.2 --user From 3e99a57dcc3f2f0d9cc3f7f40077039bfd7a45a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Mar 2014 10:46:12 -0500 Subject: [PATCH 3882/8469] Forget --user --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 90b715d86f..bf0aeba634 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ python: # command to run tests script: - python setup.py test - - python ez_setup.py --version 3.0.2 --user + - python ez_setup.py --version 3.0.2 From e4460fad043f4fa0edc7b7e1eef0b209f4588fe5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Mar 2014 08:24:33 -0500 Subject: [PATCH 3883/8469] Backout b17e9a0ea116 and 50725de303ef, restoring Feature model. Fixes #161 and re-opens #65. --HG-- extra : amend_source : f14bc0bf6c9f04e16d30ce0abf7bcb944f41ebea --- setuptools/__init__.py | 4 +- setuptools/dist.py | 259 ++++++++++++++++++++++++++++++++++- setuptools/tests/__init__.py | 84 ++++++++++++ 3 files changed, 342 insertions(+), 5 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fb2fffc02b..fc9b7b936c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -9,11 +9,11 @@ import setuptools.version from setuptools.extension import Extension -from setuptools.dist import Distribution, _get_unpatched +from setuptools.dist import Distribution, Feature, _get_unpatched from setuptools.depends import Require __all__ = [ - 'setup', 'Distribution', 'Command', 'Extension', 'Require', + 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' ] diff --git a/setuptools/dist.py b/setuptools/dist.py index dcb9ba4ee0..0801ae74ff 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -3,12 +3,15 @@ import re import os import sys +import warnings import distutils.log import distutils.core import distutils.cmd from distutils.core import Distribution as _Distribution -from distutils.errors import DistutilsSetupError +from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, + DistutilsSetupError) +from setuptools.depends import Require from setuptools.compat import numeric_types, basestring import pkg_resources @@ -134,7 +137,7 @@ def check_packages(dist, attr, value): class Distribution(_Distribution): - """Distribution with support for tests and package data + """Distribution with support for features, tests, and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': @@ -161,6 +164,21 @@ class Distribution(_Distribution): EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. + 'features' **deprecated** -- a dictionary mapping option names to + 'setuptools.Feature' + objects. Features are a portion of the distribution that can be + included or excluded based on user options, inter-feature dependencies, + and availability on the current system. Excluded features are omitted + from all setup commands, including source and binary distributions, so + you can create multiple distributions from the same source tree. + Feature names should be valid Python identifiers, except that they may + contain the '-' (minus) sign. Features can be included or excluded + via the command line options '--with-X' and '--without-X', where 'X' is + the name of the feature. Whether a feature is included by default, and + whether you are allowed to control this from the command line, is + determined by the Feature object. See the 'Feature' class for more + information. + 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as @@ -182,7 +200,8 @@ class Distribution(_Distribution): for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from - the distribution. + the distribution. They are used by the feature subsystem to configure the + distribution for the included and excluded features. """ _patched_dist = None @@ -204,6 +223,11 @@ def __init__(self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} + _attrs_dict = attrs or {} + if 'features' in _attrs_dict or 'require_features' in _attrs_dict: + Feature.warn_deprecated() + self.require_features = [] + self.features = {} self.dist_files = [] self.src_root = attrs and attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) @@ -221,6 +245,17 @@ def __init__(self, attrs=None): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) + def parse_command_line(self): + """Process features after parsing command line options""" + result = _Distribution.parse_command_line(self) + if self.features: + self._finalize_features() + return result + + def _feature_attrname(self,name): + """Convert feature name to corresponding option attribute name""" + return 'with_'+name.replace('-','_') + def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" from pkg_resources import working_set, parse_requirements @@ -232,6 +267,8 @@ def fetch_build_eggs(self, requires): def finalize_options(self): _Distribution.finalize_options(self) + if self.features: + self._set_global_opts_from_features() for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): value = getattr(self,ep.name,None) @@ -276,6 +313,47 @@ def fetch_build_egg(self, req): self._egg_fetcher = cmd return cmd.easy_install(req) + def _set_global_opts_from_features(self): + """Add --with-X/--without-X options based on optional features""" + + go = [] + no = self.negative_opt.copy() + + for name,feature in self.features.items(): + self._set_feature(name,None) + feature.validate(self) + + if feature.optional: + descr = feature.description + incdef = ' (default)' + excdef='' + if not feature.include_by_default(): + excdef, incdef = incdef, excdef + + go.append(('with-'+name, None, 'include '+descr+incdef)) + go.append(('without-'+name, None, 'exclude '+descr+excdef)) + no['without-'+name] = 'with-'+name + + self.global_options = self.feature_options = go + self.global_options + self.negative_opt = self.feature_negopt = no + + def _finalize_features(self): + """Add/remove features and resolve dependencies between them""" + + # First, flag all the enabled items (and thus their dependencies) + for name,feature in self.features.items(): + enabled = self.feature_is_included(name) + if enabled or (enabled is None and feature.include_by_default()): + feature.include_in(self) + self._set_feature(name,1) + + # Then disable the rest, so that off-by-default features don't + # get flagged as errors when they're required by an enabled feature + for name,feature in self.features.items(): + if not self.feature_is_included(name): + feature.exclude_from(self) + self._set_feature(name,0) + def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: @@ -295,6 +373,25 @@ def print_commands(self): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) + def _set_feature(self,name,status): + """Set feature's inclusion status""" + setattr(self,self._feature_attrname(name),status) + + def feature_is_included(self,name): + """Return 1 if feature is included, 0 if excluded, 'None' if unknown""" + return getattr(self,self._feature_attrname(name)) + + def include_feature(self,name): + """Request inclusion of feature named 'name'""" + + if self.feature_is_included(name)==0: + descr = self.features[name].description + raise DistutilsOptionError( + descr + " is required, but was excluded or is not available" + ) + self.features[name].include_in(self) + self._set_feature(name,1) + def include(self,**attrs): """Add items to distribution that are named in keyword arguments @@ -542,3 +639,159 @@ def handle_display_options(self, option_order): # Install it throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: module.Distribution = Distribution + + +class Feature: + """ + **deprecated** -- The `Feature` facility was never completely implemented + or supported, `has reported issues + `_ and will be removed in + a future version. + + A subset of the distribution that can be excluded if unneeded/wanted + + Features are created using these keyword arguments: + + 'description' -- a short, human readable description of the feature, to + be used in error messages, and option help messages. + + 'standard' -- if true, the feature is included by default if it is + available on the current system. Otherwise, the feature is only + included if requested via a command line '--with-X' option, or if + another included feature requires it. The default setting is 'False'. + + 'available' -- if true, the feature is available for installation on the + current system. The default setting is 'True'. + + 'optional' -- if true, the feature's inclusion can be controlled from the + command line, using the '--with-X' or '--without-X' options. If + false, the feature's inclusion status is determined automatically, + based on 'availabile', 'standard', and whether any other feature + requires it. The default setting is 'True'. + + 'require_features' -- a string or sequence of strings naming features + that should also be included if this feature is included. Defaults to + empty list. May also contain 'Require' objects that should be + added/removed from the distribution. + + 'remove' -- a string or list of strings naming packages to be removed + from the distribution if this feature is *not* included. If the + feature *is* included, this argument is ignored. This argument exists + to support removing features that "crosscut" a distribution, such as + defining a 'tests' feature that removes all the 'tests' subpackages + provided by other features. The default for this argument is an empty + list. (Note: the named package(s) or modules must exist in the base + distribution when the 'setup()' function is initially called.) + + other keywords -- any other keyword arguments are saved, and passed to + the distribution's 'include()' and 'exclude()' methods when the + feature is included or excluded, respectively. So, for example, you + could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be + added or removed from the distribution as appropriate. + + A feature must include at least one 'requires', 'remove', or other + keyword argument. Otherwise, it can't affect the distribution in any way. + Note also that you can subclass 'Feature' to create your own specialized + feature types that modify the distribution in other ways when included or + excluded. See the docstrings for the various methods here for more detail. + Aside from the methods, the only feature attributes that distributions look + at are 'description' and 'optional'. + """ + + @staticmethod + def warn_deprecated(): + warnings.warn( + "Features are deprecated and will be removed in a future " + "version. See http://bitbucket.org/pypa/setuptools/65.", + DeprecationWarning, + stacklevel=3, + ) + + def __init__(self, description, standard=False, available=True, + optional=True, require_features=(), remove=(), **extras): + self.warn_deprecated() + + self.description = description + self.standard = standard + self.available = available + self.optional = optional + if isinstance(require_features,(str,Require)): + require_features = require_features, + + self.require_features = [ + r for r in require_features if isinstance(r,str) + ] + er = [r for r in require_features if not isinstance(r,str)] + if er: extras['require_features'] = er + + if isinstance(remove,str): + remove = remove, + self.remove = remove + self.extras = extras + + if not remove and not require_features and not extras: + raise DistutilsSetupError( + "Feature %s: must define 'require_features', 'remove', or at least one" + " of 'packages', 'py_modules', etc." + ) + + def include_by_default(self): + """Should this feature be included by default?""" + return self.available and self.standard + + def include_in(self,dist): + + """Ensure feature and its requirements are included in distribution + + You may override this in a subclass to perform additional operations on + the distribution. Note that this method may be called more than once + per feature, and so should be idempotent. + + """ + + if not self.available: + raise DistutilsPlatformError( + self.description+" is required," + "but is not available on this platform" + ) + + dist.include(**self.extras) + + for f in self.require_features: + dist.include_feature(f) + + def exclude_from(self,dist): + + """Ensure feature is excluded from distribution + + You may override this in a subclass to perform additional operations on + the distribution. This method will be called at most once per + feature, and only after all included features have been asked to + include themselves. + """ + + dist.exclude(**self.extras) + + if self.remove: + for item in self.remove: + dist.exclude_package(item) + + def validate(self,dist): + + """Verify that feature makes sense in context of distribution + + This method is called by the distribution just before it parses its + command line. It checks to ensure that the 'remove' attribute, if any, + contains only valid package/module names that are present in the base + distribution when 'setup()' is called. You may override it in a + subclass to perform any other required validation of the feature + against a target distribution. + """ + + for item in self.remove: + if not dist.has_contents_for(item): + raise DistutilsSetupError( + "%s wants to be able to remove %s, but the distribution" + " doesn't contain any packages or modules under %s" + % (self.description, item, item) + ) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index a8eb711040..b5328ce67a 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -14,6 +14,7 @@ from setuptools.compat import func_code import setuptools.dist import setuptools.depends as dep +from setuptools import Feature from setuptools.depends import Require def additional_tests(): @@ -230,6 +231,89 @@ def testInvalidIncludeExclude(self): self.dist.exclude, package_dir=['q'] ) + +class FeatureTests(unittest.TestCase): + + def setUp(self): + self.req = Require('Distutils','1.0.3','distutils') + self.dist = makeSetup( + features={ + 'foo': Feature("foo",standard=True,require_features=['baz',self.req]), + 'bar': Feature("bar", standard=True, packages=['pkg.bar'], + py_modules=['bar_et'], remove=['bar.ext'], + ), + 'baz': Feature( + "baz", optional=False, packages=['pkg.baz'], + scripts = ['scripts/baz_it'], + libraries=[('libfoo','foo/foofoo.c')] + ), + 'dwim': Feature("DWIM", available=False, remove='bazish'), + }, + script_args=['--without-bar', 'install'], + packages = ['pkg.bar', 'pkg.foo'], + py_modules = ['bar_et', 'bazish'], + ext_modules = [Extension('bar.ext',['bar.c'])] + ) + + def testDefaults(self): + self.assertTrue(not + Feature( + "test",standard=True,remove='x',available=False + ).include_by_default() + ) + self.assertTrue( + Feature("test",standard=True,remove='x').include_by_default() + ) + # Feature must have either kwargs, removes, or require_features + self.assertRaises(DistutilsSetupError, Feature, "test") + + def testAvailability(self): + self.assertRaises( + DistutilsPlatformError, + self.dist.features['dwim'].include_in, self.dist + ) + + def testFeatureOptions(self): + dist = self.dist + self.assertTrue( + ('with-dwim',None,'include DWIM') in dist.feature_options + ) + self.assertTrue( + ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options + ) + self.assertTrue( + ('with-bar',None,'include bar (default)') in dist.feature_options + ) + self.assertTrue( + ('without-bar',None,'exclude bar') in dist.feature_options + ) + self.assertEqual(dist.feature_negopt['without-foo'],'with-foo') + self.assertEqual(dist.feature_negopt['without-bar'],'with-bar') + self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim') + self.assertTrue(not 'without-baz' in dist.feature_negopt) + + def testUseFeatures(self): + dist = self.dist + self.assertEqual(dist.with_foo,1) + self.assertEqual(dist.with_bar,0) + self.assertEqual(dist.with_baz,1) + self.assertTrue(not 'bar_et' in dist.py_modules) + self.assertTrue(not 'pkg.bar' in dist.packages) + self.assertTrue('pkg.baz' in dist.packages) + self.assertTrue('scripts/baz_it' in dist.scripts) + self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries) + self.assertEqual(dist.ext_modules,[]) + self.assertEqual(dist.require_features, [self.req]) + + # If we ask for bar, it should fail because we explicitly disabled + # it on the command line + self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar') + + def testFeatureWithInvalidRemove(self): + self.assertRaises( + SystemExit, makeSetup, features = {'x':Feature('x', remove='y')} + ) + class TestCommandTests(unittest.TestCase): def testTestIsCommand(self): From 487a7dab9a16614dcdb80f557cb27eb234e17052 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Mar 2014 08:29:36 -0500 Subject: [PATCH 3884/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6bf73335d0..68a369969c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +3.1 +--- + +* Issue #161: Restore Features functionality to allow backward compatibility + (for Features) until the uses of that functionality is sufficiently removed. + ----- 3.0.2 ----- From de6b16d5e0eb055dfbb55df4d90cf7f3eab80390 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Mar 2014 08:35:29 -0500 Subject: [PATCH 3885/8469] Bumped to 3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 97d60e768e..1f668e5bb6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.0.3" +DEFAULT_VERSION = "3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index d2983471fb..27d4bb6661 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.0.3' +__version__ = '3.1' From 5baf7744df8c0d06562938f409a9ad95e6d77cab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Mar 2014 08:35:37 -0500 Subject: [PATCH 3886/8469] Added tag 3.1 for changeset 47224d55ddc6 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bbe48b933e..b9e6efddcd 100644 --- a/.hgtags +++ b/.hgtags @@ -122,3 +122,4 @@ faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 8e8c50925f18eafb7e66fe020aa91a85b9a4b122 3.0 cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 +47224d55ddc6bb08c1d17a219f124d0d9c524491 3.1 From 7a47250f321d165b6765d5590c4869d200960edd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Mar 2014 08:36:15 -0500 Subject: [PATCH 3887/8469] Bumped to 3.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 72 ++++++++++++++-------------- setuptools/version.py | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1f668e5bb6..f7eb67f22b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.1" +DEFAULT_VERSION = "3.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index d5bc899083..c876c7794f 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names PKG-INFO = setuptools.command.egg_info:write_pkg_info +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names depends.txt = setuptools.command.egg_info:warn_depends_obsolete requires.txt = setuptools.command.egg_info:write_requirements +dependency_links.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 +eager_resources.txt = setuptools.command.egg_info:overwrite_arg + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [distutils.setup_keywords] -namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data use_2to3 = setuptools.dist:assert_bool +eager_resources = setuptools.dist:assert_string_list +use_2to3_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points test_suite = setuptools.dist:check_test_suite -convert_2to3_doctests = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -zip_safe = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages test_loader = setuptools.dist:check_importable +zip_safe = setuptools.dist:assert_bool +convert_2to3_doctests = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -install_requires = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data use_2to3_exclude_fixers = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -use_2to3_fixers = setuptools.dist:assert_string_list -eager_resources = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool extras_require = setuptools.dist:check_extras - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +namespace_packages = setuptools.dist:check_nsp [distutils.commands] -test = setuptools.command.test:test -develop = setuptools.command.develop:develop -build_ext = setuptools.command.build_ext:build_ext -rotate = setuptools.command.rotate:rotate +bdist_egg = setuptools.command.bdist_egg:bdist_egg easy_install = setuptools.command.easy_install:easy_install -install = setuptools.command.install:install -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -install_lib = setuptools.command.install_lib:install_lib upload_docs = setuptools.command.upload_docs:upload_docs -install_egg_info = setuptools.command.install_egg_info:install_egg_info -saveopts = setuptools.command.saveopts:saveopts -sdist = setuptools.command.sdist:sdist -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg register = setuptools.command.register:register +install_lib = setuptools.command.install_lib:install_lib +test = setuptools.command.test:test +build_py = setuptools.command.build_py:build_py +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +sdist = setuptools.command.sdist:sdist +develop = setuptools.command.develop:develop +build_ext = setuptools.command.build_ext:build_ext egg_info = setuptools.command.egg_info:egg_info -setopt = setuptools.command.setopt:setopt +rotate = setuptools.command.rotate:rotate install_scripts = setuptools.command.install_scripts:install_scripts -build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt +saveopts = setuptools.command.saveopts:saveopts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +install = setuptools.command.install:install [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main + diff --git a/setuptools/version.py b/setuptools/version.py index 27d4bb6661..d7e6e824bc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.1' +__version__ = '3.2' From 261a4ed096f5be63d138eadc31361038b0b515fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Mar 2014 08:19:09 -0400 Subject: [PATCH 3888/8469] Use a single method to handle both languages. --- CHANGES.txt | 6 ++++++ setuptools/extension.py | 34 +++++++++++++++------------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 68a369969c..ca1bd00cf1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +--- +3.2 +--- + +* Pull Request #39: Add support for C++ targets from Cython ``.pyx`` files. + --- 3.1 --- diff --git a/setuptools/extension.py b/setuptools/extension.py index b72f6e2ac8..06ec1cec51 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -26,27 +26,23 @@ class Extension(_Extension): def __init__(self, *args, **kw): _Extension.__init__(self, *args, **kw) - if not have_pyrex(): - if self.language.lower() == 'c++': - self._convert_pyx_sources_to_cpp() - else: - self._convert_pyx_sources_to_c() - - def _convert_pyx_sources_to_cpp(self): - "convert .pyx extensions to .cpp" - def pyx_to_c(source): + self._convert_pyx_sources_to_lang() + + def _convert_pyx_sources_to_lang(self): + """ + Replace sources with .pyx extensions to sources with the target + language extension. This mechanism allows language authors to supply + pre-converted sources but to prefer the .pyx sources. + """ + if have_pyrex(): + # the build has Cython, so allow it to compile the .pyx files + return + def pyx_to_target(source): + target_ext = '.cpp' if self.language.lower() == 'c++' else '.c' if source.endswith('.pyx'): - source = source[:-4] + '.cpp' + source = source[:-4] + target_ext return source - self.sources = list(map(pyx_to_c, self.sources)) - - def _convert_pyx_sources_to_c(self): - "convert .pyx extensions to .c" - def pyx_to_c(source): - if source.endswith('.pyx'): - source = source[:-4] + '.c' - return source - self.sources = list(map(pyx_to_c, self.sources)) + self.sources = list(map(pyx_to_target, self.sources)) class Library(Extension): """Just like a regular Extension, but built as a library instead""" From c8da4c3399dd564c24a42171e7043d43e0b01659 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Mar 2014 08:22:09 -0400 Subject: [PATCH 3889/8469] self.language could be None (and is None by default) --- setuptools/extension.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index 06ec1cec51..d8516092e6 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -38,7 +38,8 @@ def _convert_pyx_sources_to_lang(self): # the build has Cython, so allow it to compile the .pyx files return def pyx_to_target(source): - target_ext = '.cpp' if self.language.lower() == 'c++' else '.c' + lang = self.language or '' + target_ext = '.cpp' if lang.lower() == 'c++' else '.c' if source.endswith('.pyx'): source = source[:-4] + target_ext return source From 8dfa58696aff81a6fa7ab2d10d859610711fdb49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Mar 2014 08:26:10 -0400 Subject: [PATCH 3890/8469] Use functools.partial and re.sub to construct the substitution function. --- setuptools/extension.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index d8516092e6..ab5908dabb 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -1,4 +1,6 @@ import sys +import re +import functools import distutils.core import distutils.extension @@ -37,13 +39,10 @@ def _convert_pyx_sources_to_lang(self): if have_pyrex(): # the build has Cython, so allow it to compile the .pyx files return - def pyx_to_target(source): - lang = self.language or '' - target_ext = '.cpp' if lang.lower() == 'c++' else '.c' - if source.endswith('.pyx'): - source = source[:-4] + target_ext - return source - self.sources = list(map(pyx_to_target, self.sources)) + lang = self.language or '' + target_ext = '.cpp' if lang.lower() == 'c++' else '.c' + sub = functools.partial(re.sub, '.pyx$', target_ext) + self.sources = list(map(sub, self.sources)) class Library(Extension): """Just like a regular Extension, but built as a library instead""" From f7d2631f4d00b8dfe3bd949691025bc957c0ee97 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 11 Mar 2014 02:51:16 +0100 Subject: [PATCH 3891/8469] Issue #162: Update dependency on certifi to 1.0.1. --- CHANGES.txt | 1 + setup.py | 4 ++-- setuptools.egg-info/dependency_links.txt | 2 +- setuptools.egg-info/requires.txt | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ca1bd00cf1..8cf7184635 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES --- * Pull Request #39: Add support for C++ targets from Cython ``.pyx`` files. +* Issue #162: Update dependency on certifi to 1.0.1. --- 3.1 diff --git a/setup.py b/setup.py index 5d19cd9659..8023c4693d 100755 --- a/setup.py +++ b/setup.py @@ -189,10 +189,10 @@ def run(self): """).strip().splitlines(), extras_require = { "ssl:sys_platform=='win32'": "wincertstore==0.1", - "certs": "certifi==0.0.8", + "certs": "certifi==1.0.1", }, dependency_links = [ - 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec', + 'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', ], scripts = [], diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index b1c9a2c9c6..0936bf3512 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,2 +1,2 @@ -https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec +https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790 https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 4fd464d812..24df854413 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -4,4 +4,4 @@ wincertstore==0.1 [certs] -certifi==0.0.8 \ No newline at end of file +certifi==1.0.1 From 4ca7386a58ba92c5c89d0872933384f7d1fea115 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Mar 2014 22:48:41 -0400 Subject: [PATCH 3892/8469] Reindent and remove excess whitespace --- setuptools/command/install_lib.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index c508cd3317..63dc11fe38 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -14,10 +14,9 @@ def run(self): def get_exclusions(self): exclude = {} nsp = self.distribution.namespace_packages - - if (nsp and self.get_finalized_command('install') - .single_version_externally_managed - ): + svem = (nsp and self.get_finalized_command('install') + .single_version_externally_managed) + if svem: for pkg in nsp: parts = pkg.split('.') while parts: @@ -62,9 +61,3 @@ def get_outputs(self): if exclude: return [f for f in outputs if f not in exclude] return outputs - - - - - - From e72e8676e8b9eec8e39c14258c145b8e2e120769 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Mar 2014 23:11:19 -0400 Subject: [PATCH 3893/8469] Remove special handling of 'no_compile' option with comment about making DISTUTILS_DEBUG work right. While testing on Python 2.6 and later, I was unable to evoke any abberant or distinct behavior by removing the value (with DISTUTILS_DEBUG enabled and using variations of --compile and --no-compile). Therefore, I believe that whatever was the motivation for adding the attribute (in 2c91c12dc9b1), its purpose has passed. --- setuptools/command/install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 459cd3cd59..784e8efd6c 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -25,7 +25,6 @@ def initialize_options(self): _install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None - self.no_compile = None # make DISTUTILS_DEBUG work right! def finalize_options(self): _install.finalize_options(self) From d85061213f0f899826feefd4c45e7222989883b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Mar 2014 21:26:03 -0400 Subject: [PATCH 3894/8469] Python 2.6 or later is required --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8023c4693d..e7065c2beb 100755 --- a/setup.py +++ b/setup.py @@ -121,7 +121,7 @@ def run(self): py_modules = ['pkg_resources', 'easy_install'], - zip_safe = (sys.version>="2.5"), # <2.5 needs unzipped for -m to work + zip_safe = True, cmdclass = {'test': test}, entry_points = { From d896eb9ee9ea29817ef0084996e6e52d547938b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Mar 2014 21:29:55 -0400 Subject: [PATCH 3895/8469] Bump wincertstore to 0.2. Fixes #164. --- CHANGES.txt | 1 + setup.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8cf7184635..f5b220d949 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Pull Request #39: Add support for C++ targets from Cython ``.pyx`` files. * Issue #162: Update dependency on certifi to 1.0.1. +* Issue #164: Update dependency on wincertstore to 0.2. --- 3.1 diff --git a/setup.py b/setup.py index e7065c2beb..3d5307d533 100755 --- a/setup.py +++ b/setup.py @@ -188,12 +188,12 @@ def run(self): Topic :: Utilities """).strip().splitlines(), extras_require = { - "ssl:sys_platform=='win32'": "wincertstore==0.1", + "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==1.0.1", }, dependency_links = [ 'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790', - 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c', + 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ], scripts = [], # tests_require = "setuptools[ssl]", From a85e52f43285ba8eac8ea57c1996a33e6ea23fa4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Mar 2014 23:11:43 -0400 Subject: [PATCH 3896/8469] Fix failing test on Windows --- setuptools/tests/test_easy_install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index d2cc7a0fe6..70e2ad993f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -208,8 +208,9 @@ def test_local_index(self): cmd.ensure_finalized() cmd.local_index.scan([new_location]) res = cmd.easy_install('foo') - self.assertEqual(os.path.realpath(res.location), - os.path.realpath(new_location)) + actual = os.path.normcase(os.path.realpath(res.location)) + expected = os.path.normcase(os.path.realpath(new_location)) + self.assertEqual(actual, expected) finally: sys.path.remove(target) for basedir in [new_location, target, ]: From b0737549cba2029ce058d7353ec2f9afb264322e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Mar 2014 23:15:27 -0400 Subject: [PATCH 3897/8469] Added tag 3.2 for changeset 07c459bea1c5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b9e6efddcd..d9f35d0ad3 100644 --- a/.hgtags +++ b/.hgtags @@ -123,3 +123,4 @@ faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 47224d55ddc6bb08c1d17a219f124d0d9c524491 3.1 +07c459bea1c58ff52e0576fc29c1865d18a83b09 3.2 From 9fb3ebb7470702513ba603e8011219f44b35537b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Mar 2014 23:15:55 -0400 Subject: [PATCH 3898/8469] Bumped to 3.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/dependency_links.txt | 2 +- setuptools.egg-info/entry_points.txt | 90 ++++++++++++------------ setuptools.egg-info/requires.txt | 6 +- setuptools/version.py | 2 +- 5 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f7eb67f22b..6a6adf7c7e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.2" +DEFAULT_VERSION = "3.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt index 0936bf3512..b454c16810 100644 --- a/setuptools.egg-info/dependency_links.txt +++ b/setuptools.egg-info/dependency_links.txt @@ -1,2 +1,2 @@ https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790 -https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c +https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2 diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index c876c7794f..3eba6cc3eb 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,61 +1,61 @@ -[egg_info.writers] -PKG-INFO = setuptools.command.egg_info:write_pkg_info -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -requires.txt = setuptools.command.egg_info:write_requirements -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -package_data = setuptools.dist:check_package_data -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -entry_points = setuptools.dist:check_entry_points -test_suite = setuptools.dist:check_test_suite -exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -test_loader = setuptools.dist:check_importable -zip_safe = setuptools.dist:assert_bool -convert_2to3_doctests = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -namespace_packages = setuptools.dist:check_nsp - [distutils.commands] -bdist_egg = setuptools.command.bdist_egg:bdist_egg -easy_install = setuptools.command.easy_install:easy_install -upload_docs = setuptools.command.upload_docs:upload_docs alias = setuptools.command.alias:alias -register = setuptools.command.register:register -install_lib = setuptools.command.install_lib:install_lib -test = setuptools.command.test:test -build_py = setuptools.command.build_py:build_py install_egg_info = setuptools.command.install_egg_info:install_egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -sdist = setuptools.command.sdist:sdist -develop = setuptools.command.develop:develop -build_ext = setuptools.command.build_ext:build_ext +upload_docs = setuptools.command.upload_docs:upload_docs +build_py = setuptools.command.build_py:build_py +test = setuptools.command.test:test +register = setuptools.command.register:register egg_info = setuptools.command.egg_info:egg_info +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst rotate = setuptools.command.rotate:rotate +sdist = setuptools.command.sdist:sdist install_scripts = setuptools.command.install_scripts:install_scripts -setopt = setuptools.command.setopt:setopt +build_ext = setuptools.command.build_ext:build_ext saveopts = setuptools.command.saveopts:saveopts +bdist_egg = setuptools.command.bdist_egg:bdist_egg bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +develop = setuptools.command.develop:develop +easy_install = setuptools.command.easy_install:easy_install +setopt = setuptools.command.setopt:setopt +install_lib = setuptools.command.install_lib:install_lib install = setuptools.command.install:install +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap +[distutils.setup_keywords] +exclude_package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +test_suite = setuptools.dist:check_test_suite +zip_safe = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +use_2to3 = setuptools.dist:assert_bool +dependency_links = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +namespace_packages = setuptools.dist:check_nsp +test_loader = setuptools.dist:check_importable +entry_points = setuptools.dist:check_entry_points +package_data = setuptools.dist:check_package_data + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +PKG-INFO = setuptools.command.egg_info:write_pkg_info + [console_scripts] easy_install = setuptools.command.easy_install:main easy_install-3.4 = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 24df854413..a49a923ef5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.1 - [certs] certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index d7e6e824bc..83935d5d3b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.2' +__version__ = '3.3' From f2bb3b0ab09da5fc1c186765052aea8fd87a9b2b Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3899/8469] Add unit tests for find_packages --HG-- extra : rebase_source : 75f5ce4d2fb9d0ccd7168739c23d9ea1eeeb9112 --- setuptools/tests/test_find_packages.py | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 setuptools/tests/test_find_packages.py diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py new file mode 100644 index 0000000000..f66ea3333c --- /dev/null +++ b/setuptools/tests/test_find_packages.py @@ -0,0 +1,72 @@ +"""Tests for setuptools.find_packages().""" +import os +import shutil +import tempfile +import unittest + +from setuptools import find_packages + + +class TestFindPackages(unittest.TestCase): + + def setUp(self): + self.dist_dir = tempfile.mkdtemp() + self._make_pkg_structure() + + def tearDown(self): + shutil.rmtree(self.dist_dir) + + def _make_pkg_structure(self): + """Make basic package structure. + + dist/ + docs/ + conf.py + pkg/ + __pycache__/ + nspkg/ + mod.py + subpkg/ + assets/ + asset + __init__.py + setup.py + + """ + self.docs_dir = self._mkdir('docs', self.dist_dir) + self._touch('conf.py', self.docs_dir) + self.pkg_dir = self._mkdir('pkg', self.dist_dir) + self._mkdir('__pycache__', self.pkg_dir) + self.ns_pkg_dir = self._mkdir('nspkg', self.pkg_dir) + self._touch('mod.py', self.ns_pkg_dir) + self.sub_pkg_dir = self._mkdir('subpkg', self.pkg_dir) + self.asset_dir = self._mkdir('assets', self.sub_pkg_dir) + self._touch('asset', self.asset_dir) + self._touch('__init__.py', self.sub_pkg_dir) + self._touch('setup.py', self.dist_dir) + + def _mkdir(self, path, parent_dir=None): + if parent_dir: + path = os.path.join(parent_dir, path) + os.mkdir(path) + return path + + def _touch(self, path, dir_=None): + if dir_: + path = os.path.join(dir_, path) + fp = open(path, 'w') + fp.close() + return path + + def test_regular_package(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages(self.dist_dir) + self.assertEqual(packages, ['pkg', 'pkg.subpkg']) + + def test_dir_with_dot_is_skipped(self): + shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) + data_dir = self._mkdir('some.data', self.pkg_dir) + self._touch('__init__.py', data_dir) + self._touch('file.dat', data_dir) + packages = find_packages(self.dist_dir) + self.assertNotIn('pkg.some.data', packages) From c6669ca42c3e2afeb24660af404f72c606174353 Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3900/8469] Setup find_packages excludes early for clarity. --HG-- extra : rebase_source : 7c05859ef526ed8a2d9af738e54dc9dca510245e --- setuptools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fc9b7b936c..d12886581b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -38,6 +38,7 @@ def find_packages(where='.', exclude=()): """ out = [] stack=[(convert_path(where), '')] + exclude = list(exclude) + ['ez_setup'] while stack: where,prefix = stack.pop(0) for name in os.listdir(where): @@ -50,7 +51,7 @@ def find_packages(where='.', exclude=()): if looks_like_package: out.append(prefix+name) stack.append((fn, prefix+name+'.')) - for pat in list(exclude)+['ez_setup']: + for pat in exclude: from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] return out From 406b907f1b790dc9aa9afbf9de1a4d07c7e21802 Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3901/8469] Exclude __pycache__ in find_packages. --HG-- extra : rebase_source : fecc027e4355f36d779967683a213fb2d867d21a --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index d12886581b..ff24c178a9 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -38,7 +38,7 @@ def find_packages(where='.', exclude=()): """ out = [] stack=[(convert_path(where), '')] - exclude = list(exclude) + ['ez_setup'] + exclude = list(exclude) + ['ez_setup', '*__pycache__'] while stack: where,prefix = stack.pop(0) for name in os.listdir(where): From 193b2ee5695838d25f99ddc3dbf22deeb97eafe0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 03:49:02 -0400 Subject: [PATCH 3902/8469] Move import to top --HG-- extra : rebase_source : 3b48a37ada247203bfebf87cdbb473b72e6e208b --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index ff24c178a9..c5b00ba5b9 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -6,6 +6,7 @@ import distutils.filelist from distutils.core import Command as _Command from distutils.util import convert_path +from fnmatch import fnmatchcase import setuptools.version from setuptools.extension import Extension @@ -52,7 +53,6 @@ def find_packages(where='.', exclude=()): out.append(prefix+name) stack.append((fn, prefix+name+'.')) for pat in exclude: - from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] return out From cc20858d5ead318ae7e8ddcdaf61c610fa1e0578 Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3903/8469] Add include parameter to find_packages. --HG-- extra : rebase_source : 1fec39a038ac2c460e62ef2ee2eee5a0b66a676d --- CHANGES.txt | 6 ++++++ setuptools/__init__.py | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f5b220d949..960e5d9b70 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +--- +3.3 +--- + +* Add ``include`` parameter to ``setuptools.find_packages()``. + --- 3.2 --- diff --git a/setuptools/__init__.py b/setuptools/__init__.py index c5b00ba5b9..a96e4c9db6 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -28,7 +28,7 @@ # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] -def find_packages(where='.', exclude=()): +def find_packages(where='.', exclude=(), include=()): """Return a list all Python packages found within directory 'where' 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it @@ -36,9 +36,18 @@ def find_packages(where='.', exclude=()): sequence of package names to exclude; '*' can be used as a wildcard in the names, such that 'foo.*' will exclude all subpackages of 'foo' (but not 'foo' itself). + + 'include' is a sequence of package names to include. If it's specified, + only the named packages will be included. If it's not specified, all found + packages will be included. 'include' can contain shell style wildcard + patterns just like 'exclude'. + + The list of included packages is built up first and then any explicitly + excluded packages are removed from it. """ out = [] stack=[(convert_path(where), '')] + include = list(include) exclude = list(exclude) + ['ez_setup', '*__pycache__'] while stack: where,prefix = stack.pop(0) @@ -50,8 +59,11 @@ def find_packages(where='.', exclude=()): and os.path.isfile(os.path.join(fn, '__init__.py')) ) if looks_like_package: - out.append(prefix+name) - stack.append((fn, prefix+name+'.')) + pkg_name = prefix + name + if (not include or + any(fnmatchcase(pkg_name, pat) for pat in include)): + out.append(pkg_name) + stack.append((fn, pkg_name + '.')) for pat in exclude: out = [item for item in out if not fnmatchcase(item,pat)] return out From db165ca67c638fdcae9b3a85154b2b4b23e3f5db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 04:00:06 -0400 Subject: [PATCH 3904/8469] Add test for find_packages(include=) --HG-- extra : rebase_source : bee4238f4cd00fa8bd3104017f4caf234dcf0729 --- setuptools/tests/test_find_packages.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index f66ea3333c..1edbfab325 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -63,6 +63,16 @@ def test_regular_package(self): packages = find_packages(self.dist_dir) self.assertEqual(packages, ['pkg', 'pkg.subpkg']) + def test_include_excludes_other(self): + """ + If include is specified, other packages should be excluded. + """ + self._touch('__init__.py', self.pkg_dir) + alt_dir = self._mkdir('other_pkg', self.dist_dir) + self._touch('__init__.py', alt_dir) + packages = find_packages(self.dist_dir, include=['other_pkg']) + self.assertEqual(packages, ['other_pkg']) + def test_dir_with_dot_is_skipped(self): shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) data_dir = self._mkdir('some.data', self.pkg_dir) From 3e6b92ec702c3139802b60df651fa14360e382b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 04:12:13 -0400 Subject: [PATCH 3905/8469] Update test for Python 2.6 compatibility --- setuptools/tests/test_find_packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 1edbfab325..c50309d269 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -79,4 +79,4 @@ def test_dir_with_dot_is_skipped(self): self._touch('__init__.py', data_dir) self._touch('file.dat', data_dir) packages = find_packages(self.dist_dir) - self.assertNotIn('pkg.some.data', packages) + self.assertTrue('pkg.some.data' not in packages) From eff1456d59d8abf700de991bfd5a36cdfc35df5c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 04:24:32 -0400 Subject: [PATCH 3906/8469] Update documentation to reflect new include parameter. --- docs/setuptools.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d277dcb5d3..6d21fef1c3 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -416,19 +416,22 @@ the ``packages`` argument of ``setup()``. However, for very large projects (Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the package list updated. That's what ``setuptools.find_packages()`` is for. -``find_packages()`` takes a source directory, and a list of package names or -patterns to exclude. If omitted, the source directory defaults to the same +``find_packages()`` takes a source directory and two lists of package name +patterns to exclude and include. If omitted, the source directory defaults to +the same directory as the setup script. Some projects use a ``src`` or ``lib`` directory as the root of their source tree, and those projects would of course use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And such projects also need something like ``package_dir = {'':'src'}`` in their ``setup()`` arguments, but that's just a normal distutils thing.) -Anyway, ``find_packages()`` walks the target directory, and finds Python +Anyway, ``find_packages()`` walks the target directory, filtering by inclusion +patterns, and finds Python packages by looking for ``__init__.py`` files. It then filters the list of packages using the exclusion patterns. -Exclusion patterns are package names, optionally including wildcards. For +Inclusion and exclusion patterns are package names, optionally including +wildcards. For example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", "*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, @@ -442,7 +445,7 @@ in order to cover all the bases. Really, the exclusion patterns are intended to cover simpler use cases than this, like excluding a single, specified package and its subpackages. -Regardless of the target directory or exclusions, the ``find_packages()`` +Regardless of the parameters, the ``find_packages()`` function returns a list of package names suitable for use as the ``packages`` argument to ``setup()``, and so is usually the easiest way to set that argument in your setup script. Especially since it frees you from having to From f23f741c4a0d866f8a38e641065ced7feb106de2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:04:34 -0400 Subject: [PATCH 3907/8469] Added tag 3.3 for changeset b306e681a945 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d9f35d0ad3..b5abdc07d7 100644 --- a/.hgtags +++ b/.hgtags @@ -124,3 +124,4 @@ cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 47224d55ddc6bb08c1d17a219f124d0d9c524491 3.1 07c459bea1c58ff52e0576fc29c1865d18a83b09 3.2 +b306e681a945406833fb297ae10241e2241fc22b 3.3 From c74177b8d8c565650abec45d2f90550be0c2702f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:05:02 -0400 Subject: [PATCH 3908/8469] Bumped to 3.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 82 ++++++++++++++-------------- setuptools.egg-info/requires.txt | 8 +-- setuptools/version.py | 2 +- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6a6adf7c7e..9811d7d8ab 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.3" +DEFAULT_VERSION = "3.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 3eba6cc3eb..0253d11a07 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,60 +1,60 @@ -[distutils.commands] -alias = setuptools.command.alias:alias -install_egg_info = setuptools.command.install_egg_info:install_egg_info -upload_docs = setuptools.command.upload_docs:upload_docs -build_py = setuptools.command.build_py:build_py -test = setuptools.command.test:test -register = setuptools.command.register:register -egg_info = setuptools.command.egg_info:egg_info -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -rotate = setuptools.command.rotate:rotate -sdist = setuptools.command.sdist:sdist -install_scripts = setuptools.command.install_scripts:install_scripts -build_ext = setuptools.command.build_ext:build_ext -saveopts = setuptools.command.saveopts:saveopts -bdist_egg = setuptools.command.bdist_egg:bdist_egg -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -develop = setuptools.command.develop:develop -easy_install = setuptools.command.easy_install:easy_install -setopt = setuptools.command.setopt:setopt -install_lib = setuptools.command.install_lib:install_lib -install = setuptools.command.install:install - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - [setuptools.installation] eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -exclude_package_data = setuptools.dist:check_package_data -install_requires = setuptools.dist:check_requirements +packages = setuptools.dist:check_packages +entry_points = setuptools.dist:check_entry_points test_suite = setuptools.dist:check_test_suite -zip_safe = setuptools.dist:assert_bool +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +convert_2to3_doctests = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras +install_requires = setuptools.dist:check_requirements use_2to3_fixers = setuptools.dist:assert_string_list -include_package_data = setuptools.dist:assert_bool +zip_safe = setuptools.dist:assert_bool +namespace_packages = setuptools.dist:check_nsp +test_loader = setuptools.dist:check_importable use_2to3 = setuptools.dist:assert_bool -dependency_links = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list eager_resources = setuptools.dist:assert_string_list -use_2to3_exclude_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements -packages = setuptools.dist:check_packages -namespace_packages = setuptools.dist:check_nsp -test_loader = setuptools.dist:check_importable -entry_points = setuptools.dist:check_entry_points package_data = setuptools.dist:check_package_data +use_2to3_exclude_fixers = setuptools.dist:assert_string_list + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.commands] +setopt = setuptools.command.setopt:setopt +easy_install = setuptools.command.easy_install:easy_install +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +register = setuptools.command.register:register +test = setuptools.command.test:test +install_scripts = setuptools.command.install_scripts:install_scripts +install = setuptools.command.install:install +alias = setuptools.command.alias:alias +bdist_egg = setuptools.command.bdist_egg:bdist_egg +build_py = setuptools.command.build_py:build_py +install_lib = setuptools.command.install_lib:install_lib +rotate = setuptools.command.rotate:rotate +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +egg_info = setuptools.command.egg_info:egg_info +develop = setuptools.command.develop:develop +install_egg_info = setuptools.command.install_egg_info:install_egg_info +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist +saveopts = setuptools.command.saveopts:saveopts +upload_docs = setuptools.command.upload_docs:upload_docs [egg_info.writers] -dependency_links.txt = setuptools.command.egg_info:overwrite_arg namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -entry_points.txt = setuptools.command.egg_info:write_entries -requires.txt = setuptools.command.egg_info:write_requirements eager_resources.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete +entry_points.txt = setuptools.command.egg_info:write_entries PKG-INFO = setuptools.command.egg_info:write_pkg_info +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +requires.txt = setuptools.command.egg_info:write_requirements [console_scripts] easy_install = setuptools.command.easy_install:main diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index a49a923ef5..e5db30adfb 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==1.0.1 - [ssl:sys_platform=='win32'] -wincertstore==0.2 \ No newline at end of file +wincertstore==0.2 + +[certs] +certifi==1.0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index 83935d5d3b..36f7773514 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.3' +__version__ = '3.4' From 80fc5b6d418b2df0243989b1b8c999f795f3f55e Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3909/8469] Add support for PEP 420 namespace packages to find_packages() On Python 3.3+, `find_packages()` now considers any subdirectory of the start directory that's not a regular package (i.e., that doesn't have an `__init__.py`) to be a namespace package. The other way this supports PEP 420 is by making sure `__pycache__` directories are never added to the list of packages. Fixes issue #97 --- CHANGES.txt | 9 ++ setuptools.egg-info/entry_points.txt | 124 ++++++++++++------------- setuptools.egg-info/requires.txt | 8 +- setuptools/__init__.py | 5 +- setuptools/tests/test_find_packages.py | 38 ++++++++ 5 files changed, 117 insertions(+), 67 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 960e5d9b70..7a9ed44695 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +--- +4.0 +--- + +* Issue #97: ``find_packages()`` now supports PEP 420 namespace packages. It + does so by considering all subdirectories of the start directory that + aren't regular packages to be PEP 420 namespace packages (on Python 3.3+ + only). + --- 3.3 --- diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 0253d11a07..560a70417f 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[distutils.setup_keywords] -packages = setuptools.dist:check_packages -entry_points = setuptools.dist:check_entry_points -test_suite = setuptools.dist:check_test_suite -include_package_data = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -convert_2to3_doctests = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool -namespace_packages = setuptools.dist:check_nsp -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.commands] -setopt = setuptools.command.setopt:setopt -easy_install = setuptools.command.easy_install:easy_install -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -register = setuptools.command.register:register -test = setuptools.command.test:test -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_py = setuptools.command.build_py:build_py -install_lib = setuptools.command.install_lib:install_lib -rotate = setuptools.command.rotate:rotate -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -egg_info = setuptools.command.egg_info:egg_info -develop = setuptools.command.develop:develop -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist -saveopts = setuptools.command.saveopts:saveopts -upload_docs = setuptools.command.upload_docs:upload_docs - -[egg_info.writers] -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -requires.txt = setuptools.command.egg_info:write_requirements - -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main - +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + +[egg_info.writers] +entry_points.txt = setuptools.command.egg_info:write_entries +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[console_scripts] +easy_install-3.4 = setuptools.command.easy_install:main +easy_install = setuptools.command.easy_install:main + +[distutils.setup_keywords] +use_2to3_fixers = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +packages = setuptools.dist:check_packages +use_2to3_exclude_fixers = setuptools.dist:assert_string_list +convert_2to3_doctests = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +entry_points = setuptools.dist:check_entry_points +test_loader = setuptools.dist:check_importable +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool +extras_require = setuptools.dist:check_extras +eager_resources = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +package_data = setuptools.dist:check_package_data +test_suite = setuptools.dist:check_test_suite +include_package_data = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements + +[distutils.commands] +upload_docs = setuptools.command.upload_docs:upload_docs +egg_info = setuptools.command.egg_info:egg_info +install_scripts = setuptools.command.install_scripts:install_scripts +saveopts = setuptools.command.saveopts:saveopts +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +install = setuptools.command.install:install +bdist_egg = setuptools.command.bdist_egg:bdist_egg +test = setuptools.command.test:test +install_egg_info = setuptools.command.install_egg_info:install_egg_info +install_lib = setuptools.command.install_lib:install_lib +sdist = setuptools.command.sdist:sdist +register = setuptools.command.register:register +develop = setuptools.command.develop:develop +build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt +build_ext = setuptools.command.build_ext:build_ext +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst + diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e5db30adfb..a49a923ef5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.2 - [certs] -certifi==1.0.1 \ No newline at end of file +certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a96e4c9db6..86afab63f4 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -56,7 +56,10 @@ def find_packages(where='.', exclude=(), include=()): looks_like_package = ( '.' not in name and os.path.isdir(fn) - and os.path.isfile(os.path.join(fn, '__init__.py')) + and ( + os.path.isfile(os.path.join(fn, '__init__.py')) + or sys.version_info[:2] >= (3, 3) # PEP 420 + ) ) if looks_like_package: pkg_name = prefix + name diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index c50309d269..abb0dd6162 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -1,12 +1,16 @@ """Tests for setuptools.find_packages().""" import os import shutil +import sys import tempfile import unittest from setuptools import find_packages +PEP420 = sys.version_info[:2] >= (3, 3) + + class TestFindPackages(unittest.TestCase): def setUp(self): @@ -58,6 +62,7 @@ def _touch(self, path, dir_=None): fp.close() return path + @unittest.skipIf(PEP420, 'Not a PEP 420 env') def test_regular_package(self): self._touch('__init__.py', self.pkg_dir) packages = find_packages(self.dist_dir) @@ -80,3 +85,36 @@ def test_dir_with_dot_is_skipped(self): self._touch('file.dat', data_dir) packages = find_packages(self.dist_dir) self.assertTrue('pkg.some.data' not in packages) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package(self): + packages = find_packages( + self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_includes(self): + packages = find_packages( + self.dist_dir, exclude=['pkg.subpkg.assets']) + self.assertEqual(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_includes_or_excludes(self): + packages = find_packages(self.dist_dir) + expected = [ + 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] + self.assertEqual(packages, expected) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_regular_package_with_nested_pep420_ns_packages(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages( + self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_non_package_dirs(self): + shutil.rmtree(self.docs_dir) + shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) + packages = find_packages(self.dist_dir) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) From f0e9aa7a337530e07b94c503e4258b6daf422e06 Mon Sep 17 00:00:00 2001 From: Wyatt Lee Baldwin Date: Wed, 12 Feb 2014 00:52:26 -0800 Subject: [PATCH 3910/8469] Add support for PEP 420 namespace packages to find_packages() On Python 3.3+, `find_packages()` now considers any subdirectory of the start directory that's not a regular package (i.e., that doesn't have an `__init__.py`) to be a namespace package. Because this will often include non-package directories, a new `include` argument has been added to `find_packages()`. `include` can make it easier to narrow which directories are considered packages instead of having to specify numerous excludes. In particular, it's an easy way to keep top-level, non-source directories from being considered packages. The other way this supports PEP 420 is by making sure `__pycache__` directories are never added to the list of packages. Refs issue #97 --- CHANGES.txt | 5 ++ setuptools/__init__.py | 29 +++++-- setuptools/tests/test_find_packages.py | 110 +++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 6 deletions(-) create mode 100644 setuptools/tests/test_find_packages.py diff --git a/CHANGES.txt b/CHANGES.txt index 52058d22a8..9ec8c09275 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,11 @@ CHANGES security vulnerabilities presented by use of tar archives in ez_setup.py. It also leverages the security features added to ZipFile.extract in Python 2.7.4. * Issue #65: Removed deprecated Features functionality. +* Issue #97: ``find_packages()`` now supports PEP 420 namespace packages. It + does so by considering all subdirectories of the start directory that + aren't regular packages to be PEP 420 namespace packages (on Python 3.3+ + only). Also, a list of packages to include can be now be specified; this + provides an easy way to narrow the list of candidate directories. --- 2.3 diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fb2fffc02b..6d7b4f38fd 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -27,7 +27,7 @@ # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] -def find_packages(where='.', exclude=()): +def find_packages(where='.', exclude=(), include=()): """Return a list all Python packages found within directory 'where' 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it @@ -35,7 +35,19 @@ def find_packages(where='.', exclude=()): sequence of package names to exclude; '*' can be used as a wildcard in the names, such that 'foo.*' will exclude all subpackages of 'foo' (but not 'foo' itself). + + 'include' is a sequence of package names to include. If it's specified, + only the named packages will be included. If it's not specified, all found + packages will be included. 'include' can contain shell style wildcard + patterns just like 'exclude'. + + The list of included packages is built up first and then any explicitly + excluded packages are removed from it. + """ + from fnmatch import fnmatchcase + include = list(include) + exclude = list(exclude) + ['ez_setup', '*__pycache__'] out = [] stack=[(convert_path(where), '')] while stack: @@ -45,13 +57,18 @@ def find_packages(where='.', exclude=()): looks_like_package = ( '.' not in name and os.path.isdir(fn) - and os.path.isfile(os.path.join(fn, '__init__.py')) + and ( + os.path.isfile(os.path.join(fn, '__init__.py')) + or sys.version_info[:2] >= (3, 3) # PEP 420 + ) ) if looks_like_package: - out.append(prefix+name) - stack.append((fn, prefix+name+'.')) - for pat in list(exclude)+['ez_setup']: - from fnmatch import fnmatchcase + pkg_name = prefix + name + if (not include or + any(fnmatchcase(pkg_name, pat) for pat in include)): + out.append(pkg_name) + stack.append((fn, pkg_name + '.')) + for pat in exclude: out = [item for item in out if not fnmatchcase(item,pat)] return out diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py new file mode 100644 index 0000000000..017cccfc87 --- /dev/null +++ b/setuptools/tests/test_find_packages.py @@ -0,0 +1,110 @@ +"""Tests for setuptools.find_packages().""" +import os +import shutil +import sys +import tempfile +import unittest + +from setuptools import find_packages + + +PEP420 = sys.version_info[:2] >= (3, 3) + + +class TestFindPackages(unittest.TestCase): + + def setUp(self): + self.dist_dir = tempfile.mkdtemp() + self._make_pkg_structure() + + def tearDown(self): + shutil.rmtree(self.dist_dir) + + def _make_pkg_structure(self): + """Make basic package structure. + + dist/ + docs/ + conf.py + pkg/ + __pycache__/ + nspkg/ + mod.py + subpkg/ + assets/ + asset + __init__.py + setup.py + + """ + self.docs_dir = self._mkdir('docs', self.dist_dir) + self._touch('conf.py', self.docs_dir) + self.pkg_dir = self._mkdir('pkg', self.dist_dir) + self._mkdir('__pycache__', self.pkg_dir) + self.ns_pkg_dir = self._mkdir('nspkg', self.pkg_dir) + self._touch('mod.py', self.ns_pkg_dir) + self.sub_pkg_dir = self._mkdir('subpkg', self.pkg_dir) + self.asset_dir = self._mkdir('assets', self.sub_pkg_dir) + self._touch('asset', self.asset_dir) + self._touch('__init__.py', self.sub_pkg_dir) + self._touch('setup.py', self.dist_dir) + + def _mkdir(self, path, parent_dir=None): + if parent_dir: + path = os.path.join(parent_dir, path) + os.mkdir(path) + return path + + def _touch(self, path, dir_=None): + if dir_: + path = os.path.join(dir_, path) + fp = open(path, 'w') + fp.close() + return path + + @unittest.skipIf(PEP420, 'Not a PEP 420 env') + def test_regular_package(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages(self.dist_dir) + self.assertEqual(packages, ['pkg', 'pkg.subpkg']) + + def test_dir_with_dot_is_skipped(self): + shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) + data_dir = self._mkdir('some.data', self.pkg_dir) + self._touch('__init__.py', data_dir) + self._touch('file.dat', data_dir) + packages = find_packages(self.dist_dir) + self.assertNotIn('pkg.some.data', packages) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package(self): + packages = find_packages( + self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_includes(self): + packages = find_packages( + self.dist_dir, exclude=['pkg.subpkg.assets']) + self.assertEqual(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_includes_or_excludes(self): + packages = find_packages(self.dist_dir) + expected = [ + 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] + self.assertEqual(packages, expected) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_regular_package_with_nested_pep420_ns_packages(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages( + self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + @unittest.skipIf(not PEP420, 'PEP 420 only') + def test_pep420_ns_package_no_non_package_dirs(self): + shutil.rmtree(self.docs_dir) + shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) + packages = find_packages(self.dist_dir) + self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) From ff69c43e5d22036c7f433331e26808fd53f2bf4d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 23 Feb 2014 08:30:06 +0100 Subject: [PATCH 3911/8469] Bump to 3.3.5rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index de5560b4f6..b79071a691 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.4" +__version__ = "3.3.5rc1" #--end constants-- From 63aab90f407ec2c12fc1bfcfaa50b0714687275c Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 23 Feb 2014 02:18:24 -0600 Subject: [PATCH 3912/8469] Version bump for Python 3.4.0rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 4c716e2075..c03185bd80 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0rc1" +__version__ = "3.4.0rc2" #--end constants-- From 27d5cd873de20e7ff51d7b13e515b73000e8f727 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 2 Mar 2014 09:19:03 +0100 Subject: [PATCH 3913/8469] Bump to 3.3.5rc2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b79071a691..7d40ab4748 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.5rc1" +__version__ = "3.3.5rc2" #--end constants-- From 9c925df0618a7ae0eccfea65da04faab89b32fc7 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 9 Mar 2014 09:37:14 +0100 Subject: [PATCH 3914/8469] Bump to 3.3.5 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 7d40ab4748..2e8719f8b7 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.3.5rc2" +__version__ = "3.3.5" #--end constants-- From 971530e1532467ef3f1d412019cfc68cf5e041d9 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 9 Mar 2014 04:13:05 -0700 Subject: [PATCH 3915/8469] Version bump for 3.4.0rc3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index c03185bd80..954b50dbac 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0rc2" +__version__ = "3.4.0rc3" #--end constants-- From 7da8f82720d47877cea2324b54952ff2b19ff6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Wed, 12 Mar 2014 03:34:02 -0400 Subject: [PATCH 3916/8469] =?UTF-8?q?Avoid=20=E2=80=9Cerror:=20None?= =?UTF-8?q?=E2=80=9D=20messages=20from=20distutils=20(#4931).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to Amaury Forgeot d’Arc and Philip J. Eby. --- core.py | 7 ++----- dir_util.py | 6 ++---- tests/test_util.py | 10 +++++++++- util.py | 23 ++++------------------- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/core.py b/core.py index 260332a2ac..25d91baa0f 100644 --- a/core.py +++ b/core.py @@ -11,7 +11,6 @@ from distutils.debug import DEBUG from distutils.errors import * -from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution @@ -149,13 +148,11 @@ class found in 'cmdclass' is used in place of the default, which is except KeyboardInterrupt: raise SystemExit("interrupted") except (IOError, os.error) as exc: - error = grok_environment_error(exc) - if DEBUG: - sys.stderr.write(error + "\n") + sys.stderr.write("error: %s\n" % (exc,)) raise else: - raise SystemExit(error) + raise SystemExit("error: %s" % (exc,)) except (DistutilsError, CCompilerError) as msg: diff --git a/dir_util.py b/dir_util.py index 2826ff805d..6a72bdd4cd 100644 --- a/dir_util.py +++ b/dir_util.py @@ -2,7 +2,7 @@ Utility functions for manipulating directories and directory trees.""" -import os, sys +import os import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log @@ -182,7 +182,6 @@ def remove_tree(directory, verbose=1, dry_run=0): Any errors are ignored (apart from being reported to stdout if 'verbose' is true). """ - from distutils.util import grok_environment_error global _path_created if verbose >= 1: @@ -199,8 +198,7 @@ def remove_tree(directory, verbose=1, dry_run=0): if abspath in _path_created: del _path_created[abspath] except (IOError, OSError) as exc: - log.warn(grok_environment_error( - exc, "error removing %s: " % directory)) + log.warn("error removing %s: %s", directory, exc) def ensure_relative(path): """Take the full path 'path', and make it a relative path. diff --git a/tests/test_util.py b/tests/test_util.py index 00219cfdba..a1abf8f029 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -8,7 +8,8 @@ from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, check_environ, split_quoted, strtobool, - rfc822_escape, byte_compile) + rfc822_escape, byte_compile, + grok_environment_error) from distutils import util # used to patch _environ_checked from distutils.sysconfig import get_config_vars from distutils import sysconfig @@ -285,6 +286,13 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode + def test_grok_environment_error(self): + # test obsolete function to ensure backward compat (#4931) + exc = IOError("Unable to find batch file") + msg = grok_environment_error(exc) + self.assertEqual(msg, "error: Unable to find batch file") + + def test_suite(): return unittest.makeSuite(UtilTestCase) diff --git a/util.py b/util.py index 67d8166349..b558957814 100644 --- a/util.py +++ b/util.py @@ -213,25 +213,10 @@ def _subst (match, local_vars=local_vars): def grok_environment_error (exc, prefix="error: "): - """Generate a useful error message from an EnvironmentError (IOError or - OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and - does what it can to deal with exception objects that don't have a - filename (which happens when the error is due to a two-file operation, - such as 'rename()' or 'link()'. Returns the error message as a string - prefixed with 'prefix'. - """ - # check for Python 1.5.2-style {IO,OS}Error exception objects - if hasattr(exc, 'filename') and hasattr(exc, 'strerror'): - if exc.filename: - error = prefix + "%s: %s" % (exc.filename, exc.strerror) - else: - # two-argument functions in posix module don't - # include the filename in the exception object! - error = prefix + "%s" % exc.strerror - else: - error = prefix + str(exc.args[-1]) - - return error + # Function kept for backward compatibility. + # Used to try clever things with EnvironmentErrors, + # but nowadays str(exception) produces good messages. + return prefix + str(exc) # Needed by 'split_quoted()' From fd9aa7570cbc4241b6d2b3cd177930bab0f018f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 13 Mar 2014 04:55:35 -0400 Subject: [PATCH 3917/8469] Make distutils error messages more helpful (#11599). When running external programs such as a C compiler and getting an error code, distutils only prints the program name. With this change, one can get the full command line by setting the DISTUTILS_DEBUG environment variable. This should have no compatibility issues, unless there are tools that depend on the exact format of distutils debug messages. --- spawn.py | 63 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/spawn.py b/spawn.py index f58c55f902..f66ff93dfb 100644 --- a/spawn.py +++ b/spawn.py @@ -10,6 +10,7 @@ import os from distutils.errors import DistutilsPlatformError, DistutilsExecError +from distutils.debug import DEBUG from distutils import log def spawn(cmd, search_path=1, verbose=0, dry_run=0): @@ -28,6 +29,9 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): Raise DistutilsExecError if running the program fails in any way; just return on success. """ + # cmd is documented as a list, but just in case some code passes a tuple + # in, protect our %-formatting code against horrible death + cmd = list(cmd) if os.name == 'posix': _spawn_posix(cmd, search_path, dry_run=dry_run) elif os.name == 'nt': @@ -67,12 +71,16 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): rc = os.spawnv(os.P_WAIT, executable, cmd) except OSError as exc: # this seems to happen when the command isn't found + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc.args[-1])) + "command %r failed: %s" % (cmd, exc.args[-1])) if rc != 0: # and this reflects the command running but failing + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' failed with exit status %d" % (cmd[0], rc)) + "command %r failed with exit status %d" % (cmd, rc)) def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): executable = cmd[0] @@ -86,13 +94,17 @@ def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0): rc = os.spawnv(os.P_WAIT, executable, cmd) except OSError as exc: # this seems to happen when the command isn't found + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc.args[-1])) + "command %r failed: %s" % (cmd, exc.args[-1])) if rc != 0: # and this reflects the command running but failing - log.debug("command '%s' failed with exit status %d" % (cmd[0], rc)) + if not DEBUG: + cmd = executable + log.debug("command %r failed with exit status %d" % (cmd, rc)) raise DistutilsExecError( - "command '%s' failed with exit status %d" % (cmd[0], rc)) + "command %r failed with exit status %d" % (cmd, rc)) if sys.platform == 'darwin': from distutils import sysconfig @@ -103,8 +115,9 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return + executable = cmd[0] exec_fn = search_path and os.execvp or os.execv - exec_args = [cmd[0], cmd] + env = None if sys.platform == 'darwin': global _cfg_target, _cfg_target_split if _cfg_target is None: @@ -125,17 +138,23 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): env = dict(os.environ, MACOSX_DEPLOYMENT_TARGET=cur_target) exec_fn = search_path and os.execvpe or os.execve - exec_args.append(env) pid = os.fork() if pid == 0: # in the child try: - exec_fn(*exec_args) + if env is None: + exec_fn(executable, cmd) + else: + exec_fn(executable, cmd, env) except OSError as e: - sys.stderr.write("unable to execute %s: %s\n" - % (cmd[0], e.strerror)) + if not DEBUG: + cmd = executable + sys.stderr.write("unable to execute %r: %s\n" + % (cmd, e.strerror)) os._exit(1) - sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0]) + if not DEBUG: + cmd = executable + sys.stderr.write("unable to execute %r for unknown reasons" % cmd) os._exit(1) else: # in the parent # Loop until the child either exits or is terminated by a signal @@ -147,26 +166,34 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): import errno if exc.errno == errno.EINTR: continue + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' failed: %s" % (cmd[0], exc.args[-1])) + "command %r failed: %s" % (cmd, exc.args[-1])) if os.WIFSIGNALED(status): + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' terminated by signal %d" - % (cmd[0], os.WTERMSIG(status))) + "command %r terminated by signal %d" + % (cmd, os.WTERMSIG(status))) elif os.WIFEXITED(status): exit_status = os.WEXITSTATUS(status) if exit_status == 0: return # hey, it succeeded! else: + if not DEBUG: + cmd = executable raise DistutilsExecError( - "command '%s' failed with exit status %d" - % (cmd[0], exit_status)) + "command %r failed with exit status %d" + % (cmd, exit_status)) elif os.WIFSTOPPED(status): continue else: + if not DEBUG: + cmd = executable raise DistutilsExecError( - "unknown error executing '%s': termination status %d" - % (cmd[0], status)) + "unknown error executing %r: termination status %d" + % (cmd, status)) def find_executable(executable, path=None): """Tries to find 'executable' in the directories listed in 'path'. From 8028742c28561801bde9e5a0ffdd287fc11fb5ff Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 15 Mar 2014 22:34:24 -0700 Subject: [PATCH 3918/8469] Release bump for 3.4.0 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 954b50dbac..04804c1f42 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0rc3" +__version__ = "3.4.0" #--end constants-- From ddce1ca3b19ac6fa504a996ca6d652681503381a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:30:18 -0400 Subject: [PATCH 3919/8469] Bumped to 4.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9811d7d8ab..0b59831276 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4" +DEFAULT_VERSION = "4.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 36f7773514..a93f051817 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4' +__version__ = '4.0' From cdbcb2b5ea59a09ab16a3f024c27f4ce6553ddff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:33:24 -0400 Subject: [PATCH 3920/8469] Use py26compat for skipIf --- setuptools/tests/test_find_packages.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index abb0dd6162..bc7d03bfad 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -6,6 +6,7 @@ import unittest from setuptools import find_packages +from setuptools.tests.py26compat import skipIf PEP420 = sys.version_info[:2] >= (3, 3) @@ -62,7 +63,7 @@ def _touch(self, path, dir_=None): fp.close() return path - @unittest.skipIf(PEP420, 'Not a PEP 420 env') + @skipIf(PEP420, 'Not a PEP 420 env') def test_regular_package(self): self._touch('__init__.py', self.pkg_dir) packages = find_packages(self.dist_dir) @@ -86,33 +87,33 @@ def test_dir_with_dot_is_skipped(self): packages = find_packages(self.dist_dir) self.assertTrue('pkg.some.data' not in packages) - @unittest.skipIf(not PEP420, 'PEP 420 only') + @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package(self): packages = find_packages( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @unittest.skipIf(not PEP420, 'PEP 420 only') + @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes(self): packages = find_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) self.assertEqual(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) - @unittest.skipIf(not PEP420, 'PEP 420 only') + @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes_or_excludes(self): packages = find_packages(self.dist_dir) expected = [ 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self.assertEqual(packages, expected) - @unittest.skipIf(not PEP420, 'PEP 420 only') + @skipIf(not PEP420, 'PEP 420 only') def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) packages = find_packages( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @unittest.skipIf(not PEP420, 'PEP 420 only') + @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) From 8880e2c2872e381b94adcd63e5bed7f69241d6e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:39:05 -0400 Subject: [PATCH 3921/8469] Update documentation to reflect PEP420 support --- docs/setuptools.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 6d21fef1c3..68467dc187 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -426,9 +426,9 @@ such projects also need something like ``package_dir = {'':'src'}`` in their ``setup()`` arguments, but that's just a normal distutils thing.) Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python -packages by looking for ``__init__.py`` files. It then filters the list of -packages using the exclusion patterns. +patterns, and finds Python packages (any directory). On Python 3.2 and +earlier, packages are only recognized if they include an ``__init__.py`` file. +Finally, exclusion patterns are applied to remove matching packages. Inclusion and exclusion patterns are package names, optionally including wildcards. For From 069dc42ee0cae4988e45ed4ced47f22ce7344029 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 05:42:34 -0400 Subject: [PATCH 3922/8469] Check packages without deference to order --- setuptools/tests/test_find_packages.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index bc7d03bfad..3e2619fc41 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -87,35 +87,38 @@ def test_dir_with_dot_is_skipped(self): packages = find_packages(self.dist_dir) self.assertTrue('pkg.some.data' not in packages) + def _assert_packages(self, actual, expected): + self.assertEqual(set(actual), set(expected)) + @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package(self): packages = find_packages( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) - self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes(self): packages = find_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) - self.assertEqual(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes_or_excludes(self): packages = find_packages(self.dist_dir) expected = [ 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] - self.assertEqual(packages, expected) + self._assert_packages(packages, expected) @skipIf(not PEP420, 'PEP 420 only') def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) packages = find_packages( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) - self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) packages = find_packages(self.dist_dir) - self.assertEqual(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) From 3940c139f3082bef33c52cec4a8a0f6484bef202 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:05:16 -0400 Subject: [PATCH 3923/8469] Update setuptools setup.py to work with setuptools 4.0 --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3d5307d533..13736be53a 100755 --- a/setup.py +++ b/setup.py @@ -116,7 +116,10 @@ def run(self): url = "https://pypi.python.org/pypi/setuptools", test_suite = 'setuptools.tests', src_root = src_root, - packages = setuptools.find_packages(), + packages = setuptools.find_packages( + include=['setuptools*', '_markerlib'], + exclude=['setuptools.tests*.*'], + ), package_data = package_data, py_modules = ['pkg_resources', 'easy_install'], From 6ef85d9d2d900707b3dcbfe56f4d671add72e91d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:17:18 -0400 Subject: [PATCH 3924/8469] Added tag 4.0b1 for changeset 78c8cfbe3e10 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b5abdc07d7..e90fb5dc6e 100644 --- a/.hgtags +++ b/.hgtags @@ -125,3 +125,4 @@ bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 47224d55ddc6bb08c1d17a219f124d0d9c524491 3.1 07c459bea1c58ff52e0576fc29c1865d18a83b09 3.2 b306e681a945406833fb297ae10241e2241fc22b 3.3 +78c8cfbe3e1017d1653c48f7306b2c4b4911bf1a 4.0b1 From 97724357315e4ec8068cc2c80a450cd19766f875 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:23:24 -0400 Subject: [PATCH 3925/8469] Sort entry points when writing so they render consistently --- setuptools.egg-info/entry_points.txt | 124 +++++++++++++-------------- setuptools/command/egg_info.py | 4 +- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 560a70417f..41a596108f 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -requires.txt = setuptools.command.egg_info:write_requirements -PKG-INFO = setuptools.command.egg_info:write_pkg_info - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[console_scripts] -easy_install-3.4 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - -[distutils.setup_keywords] -use_2to3_fixers = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data -entry_points = setuptools.dist:check_entry_points -test_loader = setuptools.dist:check_importable -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool -extras_require = setuptools.dist:check_extras -eager_resources = setuptools.dist:assert_string_list -tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -test_suite = setuptools.dist:check_test_suite -include_package_data = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements - -[distutils.commands] -upload_docs = setuptools.command.upload_docs:upload_docs -egg_info = setuptools.command.egg_info:egg_info -install_scripts = setuptools.command.install_scripts:install_scripts -saveopts = setuptools.command.saveopts:saveopts -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -install = setuptools.command.install:install -bdist_egg = setuptools.command.bdist_egg:bdist_egg -test = setuptools.command.test:test -install_egg_info = setuptools.command.install_egg_info:install_egg_info -install_lib = setuptools.command.install_lib:install_lib -sdist = setuptools.command.sdist:sdist -register = setuptools.command.register:register -develop = setuptools.command.develop:develop -build_py = setuptools.command.build_py:build_py -setopt = setuptools.command.setopt:setopt -build_ext = setuptools.command.build_ext:build_ext -alias = setuptools.command.alias:alias -easy_install = setuptools.command.easy_install:easy_install -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst - +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.4 = 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 +test_loader = 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.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5953aad4f6..4f5c969483 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -369,10 +369,10 @@ def write_entries(cmd, basename, filename): data = ep elif ep is not None: data = [] - for section, contents in ep.items(): + for section, contents in sorted(ep.items()): if not isinstance(contents,basestring): contents = EntryPoint.parse_group(section, contents) - contents = '\n'.join(map(str,contents.values())) + contents = '\n'.join(sorted(map(str,contents.values()))) data.append('[%s]\n%s\n\n' % (section,contents)) data = ''.join(data) From d68b390410c2f3ee0d3e47c95fe556cd29cb3c78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:26:47 -0400 Subject: [PATCH 3926/8469] Use binary mode to save/restore entry_points - no need to mutate newlines --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 13736be53a..19a1dfb7b2 100755 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ def run(self): return # even though _test.run will raise SystemExit # save the content - with open(entry_points) as f: + with open(entry_points, 'rb') as f: ep_content = f.read() # run the test @@ -78,7 +78,7 @@ def run(self): _test.run(self) finally: # restore the file - with open(entry_points, 'w') as f: + with open(entry_points, 'wb') as f: f.write(ep_content) From 70bbc5c7a66df8a8cfb3c0fa4e90644da530a78b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Mar 2014 06:31:10 -0400 Subject: [PATCH 3927/8469] Use a context manager instead of calling _test.run in multiple places. Alleviates need to warn about Exceptions --- setup.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 19a1dfb7b2..6bcea9514c 100755 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import os import sys import textwrap +import contextlib # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -63,19 +64,24 @@ def build_package_data(self): class test(_test): """Specific test class to avoid rewriting the entry_points.txt""" def run(self): + with self._save_entry_points(): + _test.run(self) + + @contextlib.contextmanager + def _save_entry_points(self): entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt') if not os.path.exists(entry_points): - _test.run(self) - return # even though _test.run will raise SystemExit + yield + return # save the content with open(entry_points, 'rb') as f: ep_content = f.read() - # run the test + # run the tests try: - _test.run(self) + yield finally: # restore the file with open(entry_points, 'wb') as f: From 25d93525889d4bc3e8e4dc39091482ada4fbd84b Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 16 Mar 2014 23:05:59 -0700 Subject: [PATCH 3928/8469] Version bump to 3.5, step 2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 4c716e2075..328bea6ffe 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0rc1" +__version__ = "3.5.0a0" #--end constants-- From c9494d73ee409d6b8f69fed82b26f5c71681bdaf Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 17 Mar 2014 11:29:02 +0000 Subject: [PATCH 3929/8469] Fix buids -> builds --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 68467dc187..eee48f965b 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -276,7 +276,7 @@ unless you need the associated ``setuptools`` feature. A boolean (True or False) flag specifying whether the project can be safely installed and run from a zip file. If this argument is not supplied, the ``bdist_egg`` command will have to analyze all of your - project's contents for possible problems each time it buids an egg. + project's contents for possible problems each time it builds an egg. ``install_requires`` A string or list of strings specifying what other distributions need to From a42e746af0306d9d6d10f7dfc46b95394f7829a7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 20 Mar 2014 08:50:33 +0100 Subject: [PATCH 3930/8469] Issue #20978: Remove last part of OS/2 support in distutils --- spawn.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/spawn.py b/spawn.py index d9cf950a9b..22e87e8fdb 100644 --- a/spawn.py +++ b/spawn.py @@ -36,8 +36,6 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): _spawn_posix(cmd, search_path, dry_run=dry_run) elif os.name == 'nt': _spawn_nt(cmd, search_path, dry_run=dry_run) - elif os.name == 'os2': - _spawn_os2(cmd, search_path, dry_run=dry_run) else: raise DistutilsPlatformError( "don't know how to spawn programs on platform '%s'" % os.name) From 2b13fb2cdaf1bec24a36d874878505ba53272ff3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Mar 2014 22:41:09 -0400 Subject: [PATCH 3931/8469] Use a default that communicates the purpose and also degenerates nicely. --- setuptools/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 86afab63f4..8f0887c695 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -28,7 +28,7 @@ # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] -def find_packages(where='.', exclude=(), include=()): +def find_packages(where='.', exclude=(), include=('*',)): """Return a list all Python packages found within directory 'where' 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it @@ -63,8 +63,7 @@ def find_packages(where='.', exclude=(), include=()): ) if looks_like_package: pkg_name = prefix + name - if (not include or - any(fnmatchcase(pkg_name, pat) for pat in include)): + if any(fnmatchcase(pkg_name, pat) for pat in include): out.append(pkg_name) stack.append((fn, pkg_name + '.')) for pat in exclude: From 8a4809f7c232a18d3192798c2e583726304efd4b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Mar 2014 22:46:59 -0400 Subject: [PATCH 3932/8469] Perform the inclusion filter after traversal for congruency with exclude --- setuptools/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8f0887c695..9d06d627f2 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -63,9 +63,10 @@ def find_packages(where='.', exclude=(), include=('*',)): ) if looks_like_package: pkg_name = prefix + name - if any(fnmatchcase(pkg_name, pat) for pat in include): - out.append(pkg_name) - stack.append((fn, pkg_name + '.')) + out.append(pkg_name) + stack.append((fn, pkg_name + '.')) + for pat in include: + out = [item for item in out if fnmatchcase(item,pat)] for pat in exclude: out = [item for item in out if not fnmatchcase(item,pat)] return out From 4545777795b8cd7abecc5ff59dcbacd957237f84 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Mar 2014 23:05:57 -0400 Subject: [PATCH 3933/8469] Extract out filtering by filename --- setuptools/__init__.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9d06d627f2..a4c462222c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -12,6 +12,7 @@ from setuptools.extension import Extension from setuptools.dist import Distribution, Feature, _get_unpatched from setuptools.depends import Require +from setuptools.compat import filterfalse __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', @@ -47,8 +48,6 @@ def find_packages(where='.', exclude=(), include=('*',)): """ out = [] stack=[(convert_path(where), '')] - include = list(include) - exclude = list(exclude) + ['ez_setup', '*__pycache__'] while stack: where,prefix = stack.pop(0) for name in os.listdir(where): @@ -65,11 +64,18 @@ def find_packages(where='.', exclude=(), include=('*',)): pkg_name = prefix + name out.append(pkg_name) stack.append((fn, pkg_name + '.')) - for pat in include: - out = [item for item in out if fnmatchcase(item,pat)] - for pat in exclude: - out = [item for item in out if not fnmatchcase(item,pat)] - return out + includes = _build_filter(*include) + excludes = _build_filter('ez_setup', '*__pycache__', *exclude) + out = filter(includes, out) + out = filterfalse(excludes, out) + return list(out) + +def _build_filter(*patterns): + """ + Given a list of patterns, return a callable that will be true only if + the input matches one of the patterns. + """ + return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) setup = distutils.core.setup From 17c19bd6ef3c63e112f82f3e81c1d863fd5074e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:05:56 -0400 Subject: [PATCH 3934/8469] Extracted directory detection and presence of '.' in name. --- setuptools/__init__.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a4c462222c..2e9c14f407 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -50,15 +50,13 @@ def find_packages(where='.', exclude=(), include=('*',)): stack=[(convert_path(where), '')] while stack: where,prefix = stack.pop(0) - for name in os.listdir(where): + dirs = _dirs(where) + suitable = filterfalse(lambda n: '.' in n, dirs) + for name in suitable: fn = os.path.join(where,name) looks_like_package = ( - '.' not in name - and os.path.isdir(fn) - and ( - os.path.isfile(os.path.join(fn, '__init__.py')) - or sys.version_info[:2] >= (3, 3) # PEP 420 - ) + os.path.isfile(os.path.join(fn, '__init__.py')) + or sys.version_info[:2] >= (3, 3) # PEP 420 ) if looks_like_package: pkg_name = prefix + name @@ -70,6 +68,16 @@ def find_packages(where='.', exclude=(), include=('*',)): out = filterfalse(excludes, out) return list(out) +def _dirs(target): + """ + Return all directories in target + """ + return ( + fn + for fn in os.listdir(target) + if os.path.isdir(os.path.join(target, fn)) + ) + def _build_filter(*patterns): """ Given a list of patterns, return a callable that will be true only if From 8679c5facc30a558613c137c5ec3305d320134b6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:10:14 -0400 Subject: [PATCH 3935/8469] Extract path assembly --- setuptools/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2e9c14f407..f12c8dd6e3 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -52,16 +52,17 @@ def find_packages(where='.', exclude=(), include=('*',)): where,prefix = stack.pop(0) dirs = _dirs(where) suitable = filterfalse(lambda n: '.' in n, dirs) - for name in suitable: - fn = os.path.join(where,name) + paths = (os.path.join(where, name) for name in suitable) + for path in paths: + name = os.path.basename(path) looks_like_package = ( - os.path.isfile(os.path.join(fn, '__init__.py')) + os.path.isfile(os.path.join(path, '__init__.py')) or sys.version_info[:2] >= (3, 3) # PEP 420 ) if looks_like_package: pkg_name = prefix + name out.append(pkg_name) - stack.append((fn, pkg_name + '.')) + stack.append((path, pkg_name + '.')) includes = _build_filter(*include) excludes = _build_filter('ez_setup', '*__pycache__', *exclude) out = filter(includes, out) From 50f98edc5d47d11a93a9e28fe2fd5577ca36320b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:12:33 -0400 Subject: [PATCH 3936/8469] Extract _looks_like_package --- setuptools/__init__.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index f12c8dd6e3..33b0581560 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -53,22 +53,24 @@ def find_packages(where='.', exclude=(), include=('*',)): dirs = _dirs(where) suitable = filterfalse(lambda n: '.' in n, dirs) paths = (os.path.join(where, name) for name in suitable) - for path in paths: + packages = filter(_looks_like_package, paths) + for path in packages: name = os.path.basename(path) - looks_like_package = ( - os.path.isfile(os.path.join(path, '__init__.py')) - or sys.version_info[:2] >= (3, 3) # PEP 420 - ) - if looks_like_package: - pkg_name = prefix + name - out.append(pkg_name) - stack.append((path, pkg_name + '.')) + pkg_name = prefix + name + out.append(pkg_name) + stack.append((path, pkg_name + '.')) includes = _build_filter(*include) excludes = _build_filter('ez_setup', '*__pycache__', *exclude) out = filter(includes, out) out = filterfalse(excludes, out) return list(out) +def _looks_like_package(path): + return ( + os.path.isfile(os.path.join(path, '__init__.py')) + or sys.version_info[:2] >= (3, 3) # PEP 420 + ) + def _dirs(target): """ Return all directories in target From 53ee4c9c87337d60d66ecca05450f4936c7c7465 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:16:27 -0400 Subject: [PATCH 3937/8469] Extract _find_packages_iter --- setuptools/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 33b0581560..dbe4368c58 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -46,8 +46,16 @@ def find_packages(where='.', exclude=(), include=('*',)): The list of included packages is built up first and then any explicitly excluded packages are removed from it. """ + out = _find_packages_iter(convert_path(where)) + includes = _build_filter(*include) + excludes = _build_filter('ez_setup', '*__pycache__', *exclude) + out = filter(includes, out) + out = filterfalse(excludes, out) + return list(out) + +def _find_packages_iter(where): out = [] - stack=[(convert_path(where), '')] + stack=[(where, '')] while stack: where,prefix = stack.pop(0) dirs = _dirs(where) @@ -59,11 +67,7 @@ def find_packages(where='.', exclude=(), include=('*',)): pkg_name = prefix + name out.append(pkg_name) stack.append((path, pkg_name + '.')) - includes = _build_filter(*include) - excludes = _build_filter('ez_setup', '*__pycache__', *exclude) - out = filter(includes, out) - out = filterfalse(excludes, out) - return list(out) + return out def _looks_like_package(path): return ( From 77b7c39d468a1065cb3cf10386ea4ddd185114b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:52:51 -0400 Subject: [PATCH 3938/8469] Extracted _all_dirs and rewrote _find_packages_iter as a proper iterator. --- setuptools/__init__.py | 43 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index dbe4368c58..05a14329fd 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -53,21 +53,24 @@ def find_packages(where='.', exclude=(), include=('*',)): out = filterfalse(excludes, out) return list(out) -def _find_packages_iter(where): - out = [] - stack=[(where, '')] - while stack: - where,prefix = stack.pop(0) - dirs = _dirs(where) - suitable = filterfalse(lambda n: '.' in n, dirs) - paths = (os.path.join(where, name) for name in suitable) - packages = filter(_looks_like_package, paths) - for path in packages: - name = os.path.basename(path) - pkg_name = prefix + name - out.append(pkg_name) - stack.append((path, pkg_name + '.')) - return out +def _all_dirs(base_path): + """ + Return all dirs in base_path, relative to base_path + """ + for root, dirs, files in os.walk(base_path): + for dir in dirs: + yield os.path.relpath(os.path.join(root, dir), base_path) + +def _find_packages_iter(base_path): + dirs = _all_dirs(base_path) + suitable = filterfalse(lambda n: '.' in n, dirs) + packages = ( + path + for path in suitable + if _looks_like_package(os.path.join(base_path, path)) + ) + for pkg_path in packages: + yield pkg_path.replace(os.path.sep, '.') def _looks_like_package(path): return ( @@ -75,16 +78,6 @@ def _looks_like_package(path): or sys.version_info[:2] >= (3, 3) # PEP 420 ) -def _dirs(target): - """ - Return all directories in target - """ - return ( - fn - for fn in os.listdir(target) - if os.path.isdir(os.path.join(target, fn)) - ) - def _build_filter(*patterns): """ Given a list of patterns, return a callable that will be true only if From d39698082f57b330546e208ac8799be75007de67 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 09:53:39 -0400 Subject: [PATCH 3939/8469] Pulled find_package functionality into a PackageFinder class --- setuptools/__init__.py | 119 ++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 05a14329fd..9ec39b790f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -29,61 +29,70 @@ # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] -def find_packages(where='.', exclude=(), include=('*',)): - """Return a list all Python packages found within directory 'where' - - 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it - will be converted to the appropriate local path syntax. 'exclude' is a - sequence of package names to exclude; '*' can be used as a wildcard in the - names, such that 'foo.*' will exclude all subpackages of 'foo' (but not - 'foo' itself). - - 'include' is a sequence of package names to include. If it's specified, - only the named packages will be included. If it's not specified, all found - packages will be included. 'include' can contain shell style wildcard - patterns just like 'exclude'. - - The list of included packages is built up first and then any explicitly - excluded packages are removed from it. - """ - out = _find_packages_iter(convert_path(where)) - includes = _build_filter(*include) - excludes = _build_filter('ez_setup', '*__pycache__', *exclude) - out = filter(includes, out) - out = filterfalse(excludes, out) - return list(out) - -def _all_dirs(base_path): - """ - Return all dirs in base_path, relative to base_path - """ - for root, dirs, files in os.walk(base_path): - for dir in dirs: - yield os.path.relpath(os.path.join(root, dir), base_path) - -def _find_packages_iter(base_path): - dirs = _all_dirs(base_path) - suitable = filterfalse(lambda n: '.' in n, dirs) - packages = ( - path - for path in suitable - if _looks_like_package(os.path.join(base_path, path)) - ) - for pkg_path in packages: - yield pkg_path.replace(os.path.sep, '.') - -def _looks_like_package(path): - return ( - os.path.isfile(os.path.join(path, '__init__.py')) - or sys.version_info[:2] >= (3, 3) # PEP 420 - ) - -def _build_filter(*patterns): - """ - Given a list of patterns, return a callable that will be true only if - the input matches one of the patterns. - """ - return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) + +class PackageFinder(object): + @classmethod + def find(cls, where='.', exclude=(), include=('*',)): + """Return a list all Python packages found within directory 'where' + + 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it + will be converted to the appropriate local path syntax. 'exclude' is a + sequence of package names to exclude; '*' can be used as a wildcard in the + names, such that 'foo.*' will exclude all subpackages of 'foo' (but not + 'foo' itself). + + 'include' is a sequence of package names to include. If it's specified, + only the named packages will be included. If it's not specified, all found + packages will be included. 'include' can contain shell style wildcard + patterns just like 'exclude'. + + The list of included packages is built up first and then any explicitly + excluded packages are removed from it. + """ + out = cls._find_packages_iter(convert_path(where)) + includes = cls._build_filter(*include) + excludes = cls._build_filter('ez_setup', '*__pycache__', *exclude) + out = filter(includes, out) + out = filterfalse(excludes, out) + return list(out) + + @staticmethod + def _all_dirs(base_path): + """ + Return all dirs in base_path, relative to base_path + """ + for root, dirs, files in os.walk(base_path): + for dir in dirs: + yield os.path.relpath(os.path.join(root, dir), base_path) + + @classmethod + def _find_packages_iter(cls, base_path): + dirs = cls._all_dirs(base_path) + suitable = filterfalse(lambda n: '.' in n, dirs) + packages = ( + path + for path in suitable + if cls._looks_like_package(os.path.join(base_path, path)) + ) + for pkg_path in packages: + yield pkg_path.replace(os.path.sep, '.') + + @staticmethod + def _looks_like_package(path): + return ( + os.path.isfile(os.path.join(path, '__init__.py')) + or sys.version_info[:2] >= (3, 3) # PEP 420 + ) + + @staticmethod + def _build_filter(*patterns): + """ + Given a list of patterns, return a callable that will be true only if + the input matches one of the patterns. + """ + return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) + +find_packages = PackageFinder.find setup = distutils.core.setup From 0b99bde8ba1e3727e43ba98fb07b6ca6713a0fde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 10:01:01 -0400 Subject: [PATCH 3940/8469] Created PEP420PackageFinder, whose .find method can be used to find any suitable directory. --- setuptools/__init__.py | 10 ++++++---- setuptools/tests/test_find_packages.py | 23 +++++++---------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9ec39b790f..27bd74ff59 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -79,10 +79,7 @@ def _find_packages_iter(cls, base_path): @staticmethod def _looks_like_package(path): - return ( - os.path.isfile(os.path.join(path, '__init__.py')) - or sys.version_info[:2] >= (3, 3) # PEP 420 - ) + return os.path.isfile(os.path.join(path, '__init__.py')) @staticmethod def _build_filter(*patterns): @@ -92,6 +89,11 @@ def _build_filter(*patterns): """ return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) +class PEP420PackageFinder(PackageFinder): + @staticmethod + def _looks_like_package(path): + return True + find_packages = PackageFinder.find setup = distutils.core.setup diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 3e2619fc41..b382c104dd 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -1,16 +1,13 @@ """Tests for setuptools.find_packages().""" import os import shutil -import sys import tempfile import unittest +import setuptools from setuptools import find_packages -from setuptools.tests.py26compat import skipIf - - -PEP420 = sys.version_info[:2] >= (3, 3) +find_420_packages = setuptools.PEP420PackageFinder.find class TestFindPackages(unittest.TestCase): @@ -63,7 +60,6 @@ def _touch(self, path, dir_=None): fp.close() return path - @skipIf(PEP420, 'Not a PEP 420 env') def test_regular_package(self): self._touch('__init__.py', self.pkg_dir) packages = find_packages(self.dist_dir) @@ -90,35 +86,30 @@ def test_dir_with_dot_is_skipped(self): def _assert_packages(self, actual, expected): self.assertEqual(set(actual), set(expected)) - @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package(self): - packages = find_packages( + packages = find_420_packages( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes(self): - packages = find_packages( + packages = find_420_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) - @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_includes_or_excludes(self): - packages = find_packages(self.dist_dir) + packages = find_420_packages(self.dist_dir) expected = [ 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self._assert_packages(packages, expected) - @skipIf(not PEP420, 'PEP 420 only') def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) - packages = find_packages( + packages = find_420_packages( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @skipIf(not PEP420, 'PEP 420 only') def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) - packages = find_packages(self.dist_dir) + packages = find_420_packages(self.dist_dir) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) From 2c0a61206618c83fb683a8b478b62eff88d9b33a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 10:02:04 -0400 Subject: [PATCH 3941/8469] Reindent docstring --- setuptools/__init__.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 27bd74ff59..ab1541d792 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -35,19 +35,19 @@ class PackageFinder(object): def find(cls, where='.', exclude=(), include=('*',)): """Return a list all Python packages found within directory 'where' - 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it - will be converted to the appropriate local path syntax. 'exclude' is a - sequence of package names to exclude; '*' can be used as a wildcard in the - names, such that 'foo.*' will exclude all subpackages of 'foo' (but not - 'foo' itself). - - 'include' is a sequence of package names to include. If it's specified, - only the named packages will be included. If it's not specified, all found - packages will be included. 'include' can contain shell style wildcard - patterns just like 'exclude'. - - The list of included packages is built up first and then any explicitly - excluded packages are removed from it. + 'where' should be supplied as a "cross-platform" (i.e. URL-style) + path; it will be converted to the appropriate local path syntax. + 'exclude' is a sequence of package names to exclude; '*' can be used + as a wildcard in the names, such that 'foo.*' will exclude all + subpackages of 'foo' (but not 'foo' itself). + + 'include' is a sequence of package names to include. If it's + specified, only the named packages will be included. If it's not + specified, all found packages will be included. 'include' can contain + shell style wildcard patterns just like 'exclude'. + + The list of included packages is built up first and then any + explicitly excluded packages are removed from it. """ out = cls._find_packages_iter(convert_path(where)) includes = cls._build_filter(*include) From fa9eb7791874200e83d52830ea7b124fc889a156 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 10:04:58 -0400 Subject: [PATCH 3942/8469] Update changelog --- CHANGES.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7a9ed44695..aeba99ec00 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,13 +3,12 @@ CHANGES ======= --- -4.0 +3.4 --- -* Issue #97: ``find_packages()`` now supports PEP 420 namespace packages. It - does so by considering all subdirectories of the start directory that - aren't regular packages to be PEP 420 namespace packages (on Python 3.3+ - only). +* Issue #97: Added experimental support for PEP 420 namespace package + discovery via the ``PEP420PackageFinder.find`` method. This new method will + discover packages for directories lacking an __init__.py module. --- 3.3 From 8609e20047c05bdee087fe251335e9822fca2718 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 10:05:16 -0400 Subject: [PATCH 3943/8469] Bumped to 3.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0b59831276..9811d7d8ab 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "4.0" +DEFAULT_VERSION = "3.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index a93f051817..36f7773514 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '4.0' +__version__ = '3.4' From 5143389a680ebc281e34f0aa9c52ced3c79824c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 10:07:02 -0400 Subject: [PATCH 3944/8469] Backed out changeset: 78c8cfbe3e10 --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 6bcea9514c..046104c48a 100755 --- a/setup.py +++ b/setup.py @@ -122,10 +122,7 @@ def _save_entry_points(self): url = "https://pypi.python.org/pypi/setuptools", test_suite = 'setuptools.tests', src_root = src_root, - packages = setuptools.find_packages( - include=['setuptools*', '_markerlib'], - exclude=['setuptools.tests*.*'], - ), + packages = setuptools.find_packages(), package_data = package_data, py_modules = ['pkg_resources', 'easy_install'], From d7cb8f24e3ba0a39adf1a94d29caf9d26184840b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 22 Mar 2014 17:39:42 -0400 Subject: [PATCH 3945/8469] Add test for exclude --- setuptools/tests/test_find_packages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index b382c104dd..d8b6f47a5d 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -65,6 +65,11 @@ def test_regular_package(self): packages = find_packages(self.dist_dir) self.assertEqual(packages, ['pkg', 'pkg.subpkg']) + def test_exclude(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages(self.dist_dir, exclude=('pkg.*',)) + assert packages == ['pkg'] + def test_include_excludes_other(self): """ If include is specified, other packages should be excluded. From b3bf461294d6730617a04e2e6191c14e6a66d79e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 11:24:40 -0400 Subject: [PATCH 3946/8469] Move the transform operation into the generator expression. --- setuptools/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index ab1541d792..6f58896206 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -69,13 +69,11 @@ def _all_dirs(base_path): def _find_packages_iter(cls, base_path): dirs = cls._all_dirs(base_path) suitable = filterfalse(lambda n: '.' in n, dirs) - packages = ( - path + return ( + path.replace(os.path.sep, '.') for path in suitable if cls._looks_like_package(os.path.join(base_path, path)) ) - for pkg_path in packages: - yield pkg_path.replace(os.path.sep, '.') @staticmethod def _looks_like_package(path): From c2b328e8ce968066fd113fd10941b46947f9655a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 12:02:28 -0400 Subject: [PATCH 3947/8469] Remove 'Distribute' artifact. Fixes #171 --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index eee48f965b..734408ece7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2435,7 +2435,7 @@ The ``upload_docs`` command has the following options: -------------------------------- -Extending and Reusing Distribute +Extending and Reusing Setuptools -------------------------------- Creating ``distutils`` Extensions From c8507a0553425210a7729a30b85e40870848648b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 12:31:03 -0400 Subject: [PATCH 3948/8469] Don't trap KeyboardInterrupt (or other non-Exceptions) when testing download method. Fixes #172. --- ez_setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9811d7d8ab..775c3fb4da 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -181,7 +181,7 @@ def has_powershell(): try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() @@ -199,7 +199,7 @@ def has_curl(): try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() @@ -217,7 +217,7 @@ def has_wget(): try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() From 8d070ba63c77512f7a8f807a52a36f5004dfb570 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 18:24:55 -0400 Subject: [PATCH 3949/8469] Enable commented code (requiring ssl extra for tests). --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 046104c48a..71301632f6 100755 --- a/setup.py +++ b/setup.py @@ -202,7 +202,9 @@ def _save_entry_points(self): 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ], scripts = [], - # tests_require = "setuptools[ssl]", + tests_require = [ + 'setuptools[ssl]', + ], ) if __name__ == '__main__': From 1cd424b6952d4495ead86c27abcf6d1f0cd3631f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 18:30:05 -0400 Subject: [PATCH 3950/8469] Add support for running tests via pytest-runner. --HG-- extra : amend_source : d60530fbb3e3cc3455abae8e5100f85f697f3dac --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 71301632f6..9e2e80e364 100755 --- a/setup.py +++ b/setup.py @@ -109,6 +109,8 @@ def _save_entry_points(self): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) +pytest_runner = ['pytest-runner'] if 'ptr' in sys.argv else [] + setup_params = dict( name="setuptools", version=main_ns['__version__'], @@ -204,7 +206,10 @@ def _save_entry_points(self): scripts = [], tests_require = [ 'setuptools[ssl]', + 'pytest', ], + setup_requires = [ + ] + pytest_runner, ) if __name__ == '__main__': From e7515f5680840bb1f8303b781942a1b2ec14ed79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 18:31:26 -0400 Subject: [PATCH 3951/8469] Use pytest for running tests in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bf0aeba634..f6d5d04b4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,5 @@ python: - pypy # command to run tests script: - - python setup.py test + - python setup.py ptr - python ez_setup.py --version 3.0.2 From 54f9f754be22953ca91714f15d5b2eea29a4036c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 18:43:13 -0400 Subject: [PATCH 3952/8469] Bypass the 'manual test' when running with pytest --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 35d93b51b2..1089e3534e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -19,3 +19,6 @@ formats = gztar zip [wheel] universal=1 + +[pytest] +addopts=--ignore tests/manual_test.py From d83a2165548afbeaafc6b9d39a1dd1f6800290bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 18:46:40 -0400 Subject: [PATCH 3953/8469] Bypass shlib_test when running tests under pytest --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1089e3534e..eb63264c18 100755 --- a/setup.cfg +++ b/setup.cfg @@ -21,4 +21,4 @@ formats = gztar zip universal=1 [pytest] -addopts=--ignore tests/manual_test.py +addopts=--ignore tests/manual_test.py --ignore tests/shlib_test From 6d4a70d613d5d03723ad55d2835f9d650b420356 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 19:08:46 -0400 Subject: [PATCH 3954/8469] Fix build of setuptools on Windows (do not create empty tag) --- tests/test_ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 26881f52c1..1825fb3403 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -23,7 +23,7 @@ def setUp(self): self.cwd = os.getcwd() self.tmpdir = tempfile.mkdtemp() os.chdir(TOPDIR) - _python_cmd("setup.py", "-q", "egg_info", "-RDb", "''", "sdist", + _python_cmd("setup.py", "-q", "egg_info", "-RDb", "", "sdist", "--dist-dir", "%s" % self.tmpdir) tarball = os.listdir(self.tmpdir)[0] self.tarball = os.path.join(self.tmpdir, tarball) From bfe8fb26996ca3d06c0c87176ff46a60834fb593 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 19:26:16 -0400 Subject: [PATCH 3955/8469] Force sdist zip format (preferred for _build_egg) --HG-- extra : amend_source : eb261716fc15148a101c059fb03c0f51b683c673 --- tests/test_ez_setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 1825fb3403..7a6baf0ca7 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -24,9 +24,9 @@ def setUp(self): self.tmpdir = tempfile.mkdtemp() os.chdir(TOPDIR) _python_cmd("setup.py", "-q", "egg_info", "-RDb", "", "sdist", - "--dist-dir", "%s" % self.tmpdir) - tarball = os.listdir(self.tmpdir)[0] - self.tarball = os.path.join(self.tmpdir, tarball) + "--formats", "zip", "--dist-dir", self.tmpdir) + zipball = os.listdir(self.tmpdir)[0] + self.zipball = os.path.join(self.tmpdir, zipball) from setuptools.compat import urllib2 urllib2.urlopen = self.urlopen @@ -37,7 +37,7 @@ def tearDown(self): def test_build_egg(self): # making it an egg - egg = _build_egg('Egg to be built', self.tarball, self.tmpdir) + egg = _build_egg('Egg to be built', self.zipball, self.tmpdir) # now trying to import it sys.path[0] = egg @@ -54,7 +54,7 @@ def test_install(self): def _faked(*args): return True ez_setup.python_cmd = _faked - _install(self.tarball) + _install(self.zipball) def test_use_setuptools(self): self.assertEqual(use_setuptools(), None) From 71a75cab2ea0fff6e4b199267e4d6db0d653acad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 20:06:22 -0400 Subject: [PATCH 3956/8469] Remove test_build_egg. The test doesn't work and it's difficult to test _build_egg given the current interface. --- tests/test_ez_setup.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 7a6baf0ca7..3e895dd4e5 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -35,15 +35,6 @@ def tearDown(self): os.chdir(self.cwd) sys.path = copy.copy(self.old_sys_path) - def test_build_egg(self): - # making it an egg - egg = _build_egg('Egg to be built', self.zipball, self.tmpdir) - - # now trying to import it - sys.path[0] = egg - import setuptools - self.assertTrue(setuptools.__file__.startswith(egg)) - def test_do_download(self): tmpdir = tempfile.mkdtemp() _do_download(DEFAULT_VERSION, DEFAULT_URL, tmpdir, 1) From 8173752ef1a4dc9e3b6039638821dbe71f216642 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Mar 2014 20:16:21 -0400 Subject: [PATCH 3957/8469] Remove test_do_download, which also no longer works due to complexities around secure downloaders. --- tests/test_ez_setup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 3e895dd4e5..5e7ffa62f2 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -9,8 +9,7 @@ TOPDIR = os.path.split(CURDIR)[0] sys.path.insert(0, TOPDIR) -from ez_setup import (use_setuptools, _build_egg, _python_cmd, _do_download, - _install, DEFAULT_URL, DEFAULT_VERSION) +from ez_setup import (use_setuptools, _python_cmd, _install) import ez_setup class TestSetup(unittest.TestCase): @@ -35,12 +34,6 @@ def tearDown(self): os.chdir(self.cwd) sys.path = copy.copy(self.old_sys_path) - def test_do_download(self): - tmpdir = tempfile.mkdtemp() - _do_download(DEFAULT_VERSION, DEFAULT_URL, tmpdir, 1) - import setuptools - self.assertTrue(setuptools.bootstrap_install_from.startswith(tmpdir)) - def test_install(self): def _faked(*args): return True From 342c210603c74e4de0fc56d210c962ef9acc2cca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 10:54:21 +0000 Subject: [PATCH 3958/8469] Update test_install to actually patch the hidden _python_cmd. --- tests/test_ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index 5e7ffa62f2..e62833064d 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -37,7 +37,7 @@ def tearDown(self): def test_install(self): def _faked(*args): return True - ez_setup.python_cmd = _faked + ez_setup._python_cmd = _faked _install(self.zipball) def test_use_setuptools(self): From 3be0c6c18a61f35ae5804464cc0da867fd0065f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 10:58:09 +0000 Subject: [PATCH 3959/8469] Remove test for use_setuptools, as it fails when running under pytest because the installed version of setuptools is already present. --- tests/test_ez_setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py index e62833064d..89629a8d2e 100644 --- a/tests/test_ez_setup.py +++ b/tests/test_ez_setup.py @@ -9,7 +9,7 @@ TOPDIR = os.path.split(CURDIR)[0] sys.path.insert(0, TOPDIR) -from ez_setup import (use_setuptools, _python_cmd, _install) +from ez_setup import _python_cmd, _install import ez_setup class TestSetup(unittest.TestCase): @@ -40,8 +40,5 @@ def _faked(*args): ez_setup._python_cmd = _faked _install(self.zipball) - def test_use_setuptools(self): - self.assertEqual(use_setuptools(), None) - if __name__ == '__main__': unittest.main() From 4ad02f9f8bb2a805d474fd6068def77f05d8b72d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 10:59:57 +0000 Subject: [PATCH 3960/8469] Just remove test_ez_setup, as the last remaining test, test_install, only barely touches the functionality as the actually installation command is mocked. The test run in the travis config is much more comprehensive. --- tests/test_ez_setup.py | 44 ------------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 tests/test_ez_setup.py diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py deleted file mode 100644 index 89629a8d2e..0000000000 --- a/tests/test_ez_setup.py +++ /dev/null @@ -1,44 +0,0 @@ -import sys -import os -import tempfile -import unittest -import shutil -import copy - -CURDIR = os.path.abspath(os.path.dirname(__file__)) -TOPDIR = os.path.split(CURDIR)[0] -sys.path.insert(0, TOPDIR) - -from ez_setup import _python_cmd, _install -import ez_setup - -class TestSetup(unittest.TestCase): - - def urlopen(self, url): - return open(self.tarball, 'rb') - - def setUp(self): - self.old_sys_path = copy.copy(sys.path) - self.cwd = os.getcwd() - self.tmpdir = tempfile.mkdtemp() - os.chdir(TOPDIR) - _python_cmd("setup.py", "-q", "egg_info", "-RDb", "", "sdist", - "--formats", "zip", "--dist-dir", self.tmpdir) - zipball = os.listdir(self.tmpdir)[0] - self.zipball = os.path.join(self.tmpdir, zipball) - from setuptools.compat import urllib2 - urllib2.urlopen = self.urlopen - - def tearDown(self): - shutil.rmtree(self.tmpdir) - os.chdir(self.cwd) - sys.path = copy.copy(self.old_sys_path) - - def test_install(self): - def _faked(*args): - return True - ez_setup._python_cmd = _faked - _install(self.zipball) - -if __name__ == '__main__': - unittest.main() From abb8efdc4aeaa0d31c82ecf9f96d115b34e70b4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 11:35:01 +0000 Subject: [PATCH 3961/8469] Update test to use local timestamps, so the tests pass in any timezone. --- tests/test_pkg_resources.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index dfa27120e8..8ce7725578 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -2,6 +2,7 @@ import tempfile import os import zipfile +import datetime import pkg_resources @@ -17,9 +18,25 @@ def __call__(self): if os.path.exists(self): os.remove(self) +ZERO = datetime.timedelta(0) +class UTC(datetime.tzinfo): + """UTC""" + + def utcoffset(self, dt): + return ZERO + + def tzname(self, dt): + return "UTC" + + def dst(self, dt): + return ZERO + class TestZipProvider(object): finalizers = [] + ref_time = datetime.datetime(2013, 5, 12, 13, 25, 0) + "A reference time for a file modification" + @classmethod def setup_class(cls): "create a zip egg and add it to sys.path" @@ -27,11 +44,11 @@ def setup_class(cls): zip_egg = zipfile.ZipFile(egg, 'w') zip_info = zipfile.ZipInfo() zip_info.filename = 'mod.py' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_info.date_time = cls.ref_time.timetuple() zip_egg.writestr(zip_info, 'x = 3\n') zip_info = zipfile.ZipInfo() zip_info.filename = 'data.dat' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_info.date_time = cls.ref_time.timetuple() zip_egg.writestr(zip_info, 'hello, world!') zip_egg.close() egg.close() @@ -55,11 +72,13 @@ def test_resource_filename_rewrites_on_change(self): manager = pkg_resources.ResourceManager() zp = pkg_resources.ZipProvider(mod) filename = zp.get_resource_filename(manager, 'data.dat') - assert os.stat(filename).st_mtime == 1368379500 + actual = datetime.datetime.fromtimestamp(os.stat(filename).st_mtime) + assert actual == self.ref_time f = open(filename, 'w') f.write('hello, world?') f.close() - os.utime(filename, (1368379500, 1368379500)) + ts = self.ref_time.timestamp() + os.utime(filename, (ts, ts)) filename = zp.get_resource_filename(manager, 'data.dat') f = open(filename) assert f.read() == 'hello, world!' From 8f5e0004edcd54aafe7f6fc30527f20aa8e05838 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 11:48:15 +0000 Subject: [PATCH 3962/8469] Use mktime for Python 3.2 compatibility --- tests/test_pkg_resources.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 8ce7725578..ed41409617 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -3,6 +3,7 @@ import os import zipfile import datetime +import time import pkg_resources @@ -11,6 +12,16 @@ except NameError: unicode = str +def timestamp(dt): + """ + Return a timestamp for a local, naive datetime instance. + """ + try: + return dt.timestamp() + except AttributeError: + # Python 3.2 and earlier + return time.mktime(dt.timetuple()) + class EggRemover(unicode): def __call__(self): if self in sys.path: @@ -77,7 +88,7 @@ def test_resource_filename_rewrites_on_change(self): f = open(filename, 'w') f.write('hello, world?') f.close() - ts = self.ref_time.timestamp() + ts = timestamp(self.ref_time) os.utime(filename, (ts, ts)) filename = zp.get_resource_filename(manager, 'data.dat') f = open(filename) From 0873d4713fb81f1402c481ac6c7745fbc586c9a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Mar 2014 11:52:06 +0000 Subject: [PATCH 3963/8469] Remove unused UTC implementation --- tests/test_pkg_resources.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index ed41409617..11edfe851a 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -29,19 +29,6 @@ def __call__(self): if os.path.exists(self): os.remove(self) -ZERO = datetime.timedelta(0) -class UTC(datetime.tzinfo): - """UTC""" - - def utcoffset(self, dt): - return ZERO - - def tzname(self, dt): - return "UTC" - - def dst(self, dt): - return ZERO - class TestZipProvider(object): finalizers = [] From 8b714dc7a9b2b74c67cd36d29e70d46fcc7f0773 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Mar 2014 22:12:23 +0000 Subject: [PATCH 3964/8469] Apply patch based on patch in 2008 by Klaus Zimmerman. Fixes #176. --- CHANGES.txt | 2 ++ setup.py | 1 + setuptools/command/test.py | 10 ++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index aeba99ec00..650b6de8dd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ CHANGES * Issue #97: Added experimental support for PEP 420 namespace package discovery via the ``PEP420PackageFinder.find`` method. This new method will discover packages for directories lacking an __init__.py module. +* Issue #176: Add parameter to the test command to support a custom test + runner: --test-runner or -r. --- 3.3 diff --git a/setup.py b/setup.py index 9e2e80e364..f76d371a73 100755 --- a/setup.py +++ b/setup.py @@ -152,6 +152,7 @@ def _save_entry_points(self): "packages = setuptools.dist:check_packages", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", + "test_runner = setuptools.dist:check_importable", "use_2to3 = setuptools.dist:assert_bool", "convert_2to3_doctests = setuptools.dist:assert_string_list", "use_2to3_fixers = setuptools.dist:assert_string_list", diff --git a/setuptools/command/test.py b/setuptools/command/test.py index a9a0d1d735..2418833296 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -51,12 +51,14 @@ class test(Command): ('test-module=','m', "Run 'test_suite' in specified module"), ('test-suite=','s', "Test suite to run (e.g. 'some_module.test_suite')"), + ('test-runner=', 'r', "Test runner to use"), ] def initialize_options(self): self.test_suite = None self.test_module = None self.test_loader = None + self.test_runner = None def finalize_options(self): @@ -78,6 +80,8 @@ def finalize_options(self): self.test_loader = getattr(self.distribution,'test_loader',None) if self.test_loader is None: self.test_loader = "setuptools.command.test:ScanningLoader" + if self.test_runner is None: + self.test_runner = getattr(self.distribution, 'test_runner', None) def with_project_on_sys_path(self, func): if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): @@ -154,8 +158,10 @@ def run_tests(self): loader_ep = EntryPoint.parse("x="+self.test_loader) loader_class = loader_ep.load(require=False) - cks = loader_class() + runner_ep = EntryPoint.parse("x=" + self.test_runner) + runner_class = runner_ep.load(require=False) unittest.main( None, None, [unittest.__file__]+self.test_args, - testLoader = cks + testLoader=loader_class(), + testRunner=runner_class(), ) From 768568cd1bf28ed6c474a19423286211eb0eb502 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Mar 2014 22:13:08 +0000 Subject: [PATCH 3965/8469] Re-ran egg_info --- setuptools.egg-info/entry_points.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 41a596108f..de842da822 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -37,6 +37,7 @@ namespace_packages = setuptools.dist:check_nsp package_data = setuptools.dist:check_package_data packages = setuptools.dist:check_packages 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 From 1ed2b9fd0f11fb50bedbf6d700ba6f6ab763550e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Mar 2014 22:14:12 +0000 Subject: [PATCH 3966/8469] Removed notice about PEP 420 package finder. Discussion in the ticket (Ref #97) indicates that the implementation is currently inadequate. --- CHANGES.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 650b6de8dd..9be3987b07 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,9 +6,6 @@ CHANGES 3.4 --- -* Issue #97: Added experimental support for PEP 420 namespace package - discovery via the ``PEP420PackageFinder.find`` method. This new method will - discover packages for directories lacking an __init__.py module. * Issue #176: Add parameter to the test command to support a custom test runner: --test-runner or -r. From 0407725e4bd3b01f41017b48aac1d57e3c6c3cf6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 11:40:03 +0100 Subject: [PATCH 3967/8469] Remove excess whitespace; Normalize imports. --HG-- extra : amend_source : 62f689b409b4645eda5f81b2604c50a84713ee52 --- setuptools/command/bdist_rpm.py | 37 +++------------------------------ 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 8c48da3559..380fd19667 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -3,8 +3,9 @@ # them, another kludge to allow you to build old-style non-egg RPMs, and # finally, a kludge to track .rpm files for uploading when run on Python <2.5. +import sys +import os from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm -import sys, os class bdist_rpm(_bdist_rpm): @@ -27,25 +28,13 @@ def run(self): self.run_command('egg_info') # ensure distro name is up-to-date _bdist_rpm.run(self) - - - - - - - - - - - - def _make_spec_file(self): version = self.distribution.get_version() rpmversion = version.replace('-','_') spec = _bdist_rpm._make_spec_file(self) line23 = '%define version '+version line24 = '%define version '+rpmversion - spec = [ + spec = [ line.replace( "Source0: %{name}-%{version}.tar", "Source0: %{name}-%{unmangled_version}.tar" @@ -60,23 +49,3 @@ def _make_spec_file(self): ] spec.insert(spec.index(line24)+1, "%define unmangled_version "+version) return spec - - - - - - - - - - - - - - - - - - - - From 49298396c6067617cc6ba08e0c88921c604c28b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 11:43:40 +0100 Subject: [PATCH 3968/8469] Remove legacy compatibility in bdist_rpm --HG-- extra : amend_source : 829ebde0696d12adfb54aca74ea6b1b510177ff4 --- setuptools/command/bdist_rpm.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 380fd19667..d71420d5fb 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -1,10 +1,7 @@ # This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter -# them, another kludge to allow you to build old-style non-egg RPMs, and -# finally, a kludge to track .rpm files for uploading when run on Python <2.5. +# them, another kludge to allow you to build old-style non-egg RPMs. -import sys -import os from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): @@ -13,17 +10,6 @@ def initialize_options(self): _bdist_rpm.initialize_options(self) self.no_egg = None - if sys.version<"2.5": - # Track for uploading any .rpm file(s) moved to self.dist_dir - def move_file(self, src, dst, level=1): - _bdist_rpm.move_file(self, src, dst, level) - if dst==self.dist_dir and src.endswith('.rpm'): - getattr(self.distribution,'dist_files',[]).append( - ('bdist_rpm', - src.endswith('.src.rpm') and 'any' or sys.version[:3], - os.path.join(dst, os.path.basename(src))) - ) - def run(self): self.run_command('egg_info') # ensure distro name is up-to-date _bdist_rpm.run(self) From ab81837b707280b960ca02675a85da7918d17fec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 11:54:24 +0100 Subject: [PATCH 3969/8469] Adjust to match modern style conventions. --- setuptools/command/bdist_rpm.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index d71420d5fb..194fa266ee 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -11,15 +11,17 @@ def initialize_options(self): self.no_egg = None def run(self): - self.run_command('egg_info') # ensure distro name is up-to-date + # ensure distro name is up-to-date + self.run_command('egg_info') + _bdist_rpm.run(self) def _make_spec_file(self): version = self.distribution.get_version() rpmversion = version.replace('-','_') spec = _bdist_rpm._make_spec_file(self) - line23 = '%define version '+version - line24 = '%define version '+rpmversion + line23 = '%define version ' + version + line24 = '%define version ' + rpmversion spec = [ line.replace( "Source0: %{name}-%{version}.tar", @@ -30,8 +32,10 @@ def _make_spec_file(self): ).replace( "%setup", "%setup -n %{name}-%{unmangled_version}" - ).replace(line23,line24) + ).replace(line23, line24) for line in spec ] - spec.insert(spec.index(line24)+1, "%define unmangled_version "+version) + insert_loc = spec.index(line24) + 1 + unmangled_version = "%define unmangled_version " + version + spec.insert(insert_loc, unmangled_version) return spec From ee51f57c4616357bb032e61a726a34cda0e71a66 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:12:01 +0100 Subject: [PATCH 3970/8469] The no_egg option is no longer present. --- setuptools/command/bdist_rpm.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 194fa266ee..a22584013f 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -6,10 +6,6 @@ class bdist_rpm(_bdist_rpm): - def initialize_options(self): - _bdist_rpm.initialize_options(self) - self.no_egg = None - def run(self): # ensure distro name is up-to-date self.run_command('egg_info') From 58eb4b2b034d90f45b3daa12900f24a390bb4782 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:16:15 +0100 Subject: [PATCH 3971/8469] Replace outdated deprecating comments with a proper doc string. --- setuptools/command/bdist_rpm.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index a22584013f..c13732fad9 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -1,10 +1,15 @@ -# This is just a kludge so that bdist_rpm doesn't guess wrong about the -# distribution name and version, if the egg_info command is going to alter -# them, another kludge to allow you to build old-style non-egg RPMs. - from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): + """ + Override the default bdist_rpm behavior to do the following: + + 1. Run egg_info to ensure the name and version are properly calculated. + 2. Always run 'install' using --single-version-externally-managed to + disable eggs in RPM distributions. + 3. Replace dash with underscore in the version numbers for better RPM + compatibility. + """ def run(self): # ensure distro name is up-to-date From 0b80f934c1e2effcc2484ae644613ad9beedf02f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:41:43 +0100 Subject: [PATCH 3972/8469] Extract a method to capture the intention of caller detection. --- setuptools/command/install.py | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 784e8efd6c..c3f1ff92c9 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -52,19 +52,8 @@ def run(self): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - # Attempt to detect whether we were called from setup() or by another - # command. If we were called by setup(), our caller will be the - # 'run_command' method in 'distutils.dist', and *its* caller will be - # the 'run_commands' method. If we were called any other way, our - # immediate caller *might* be 'run_command', but it won't have been - # called by 'run_commands'. This is slightly kludgy, but seems to - # work. - # - caller = sys._getframe(2) - caller_module = caller.f_globals.get('__name__','') - caller_name = caller.f_code.co_name - - if caller_module != 'distutils.dist' or caller_name!='run_commands': + called_from_setup = self._called_from_setup(sys._getframe(2)) + if not called_from_setup: # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* # commands. @@ -72,6 +61,25 @@ def run(self): else: self.do_egg_install() + @staticmethod + def _called_from_setup(run_parent_parent): + """ + Attempt to detect whether we were called from setup() or by another + command. If we were called by setup(), our caller will be the + 'run_command' method in 'distutils.dist', and *its* caller will be + the 'run_commands' method. If we were called any other way, our + immediate caller *might* be 'run_command', but it won't have been + called by 'run_commands'. This is slightly kludgy, but seems to + work. + """ + caller = run_parent_parent + caller_module = caller.f_globals.get('__name__','') + caller_name = caller.f_code.co_name + return ( + caller_module == 'distutils.dist' + and caller_name == 'run_commands' + ) + def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') From 215a0cddf02d70e9b92b27b5b7997314b6527426 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 12:59:37 +0100 Subject: [PATCH 3973/8469] Use inspect module instead of _getframe --- setuptools/command/install.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index c3f1ff92c9..1d7810b814 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,5 +1,5 @@ import setuptools -import sys +import inspect import glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -52,7 +52,7 @@ def run(self): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - called_from_setup = self._called_from_setup(sys._getframe(2)) + called_from_setup = self._called_from_setup(inspect.currentframe()) if not called_from_setup: # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* @@ -62,7 +62,7 @@ def run(self): self.do_egg_install() @staticmethod - def _called_from_setup(run_parent_parent): + def _called_from_setup(run_frame): """ Attempt to detect whether we were called from setup() or by another command. If we were called by setup(), our caller will be the @@ -72,12 +72,13 @@ def _called_from_setup(run_parent_parent): called by 'run_commands'. This is slightly kludgy, but seems to work. """ - caller = run_parent_parent - caller_module = caller.f_globals.get('__name__','') - caller_name = caller.f_code.co_name + res = inspect.getouterframes(run_frame)[2] + caller, = res[:1] + info = inspect.getframeinfo(caller) + caller_module = caller.f_globals.get('__name__', '') return ( caller_module == 'distutils.dist' - and caller_name == 'run_commands' + and info.function == 'run_commands' ) def do_egg_install(self): From be01e5c951fb85be934cf66a4d7878faebbb6cda Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:02:50 +0100 Subject: [PATCH 3974/8469] Update docstring --- setuptools/command/install.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1d7810b814..3e6ba427ac 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -64,13 +64,12 @@ def run(self): @staticmethod def _called_from_setup(run_frame): """ - Attempt to detect whether we were called from setup() or by another - command. If we were called by setup(), our caller will be the + Attempt to detect whether run() was called from setup() or by another + command. If called by setup(), the parent caller will be the 'run_command' method in 'distutils.dist', and *its* caller will be - the 'run_commands' method. If we were called any other way, our + the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been - called by 'run_commands'. This is slightly kludgy, but seems to - work. + called by 'run_commands'. Return True in that case or False otherwise. """ res = inspect.getouterframes(run_frame)[2] caller, = res[:1] From 421bad961106fd8353980708487b4fdfff802731 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:04:17 +0100 Subject: [PATCH 3975/8469] Simplify comment not to repeat the obvious implication of the 'if' test. --HG-- extra : amend_source : c92063405d99e7fdb7fe0a6312fa8438c3727c2f --- setuptools/command/install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 3e6ba427ac..05a25c260d 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -54,9 +54,7 @@ def run(self): called_from_setup = self._called_from_setup(inspect.currentframe()) if not called_from_setup: - # We weren't called from the command line or setup(), so we - # should run in backward-compatibility mode to support bdist_* - # commands. + # Run in backward-compatibility mode to support bdist_* commands. _install.run(self) else: self.do_egg_install() From 359dcd429be8857202ebcfa5b85686b032414759 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:04:49 +0100 Subject: [PATCH 3976/8469] variable name is superfluous now --- setuptools/command/install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 05a25c260d..f52423f43c 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -52,8 +52,7 @@ def run(self): if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - called_from_setup = self._called_from_setup(inspect.currentframe()) - if not called_from_setup: + if not self._called_from_setup(inspect.currentframe()): # Run in backward-compatibility mode to support bdist_* commands. _install.run(self) else: From 292f0a6f46fd43144ccbe43512bc3eb4ff01dd9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:28:18 +0100 Subject: [PATCH 3977/8469] Allow install to proceed with an egg install on IronPython and any other environment that has no stack support. Fixes #177. --- CHANGES.txt | 4 ++++ setuptools/command/install.py | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9be3987b07..f7340776fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,10 @@ CHANGES * Issue #176: Add parameter to the test command to support a custom test runner: --test-runner or -r. +* Issue #177: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. --- 3.3 diff --git a/setuptools/command/install.py b/setuptools/command/install.py index f52423f43c..1681617f76 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,6 +1,8 @@ import setuptools import inspect import glob +import warnings +import platform from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -66,8 +68,16 @@ def _called_from_setup(run_frame): 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been - called by 'run_commands'. Return True in that case or False otherwise. + called by 'run_commands'. Return True in that case or if a call stack + is unavailable. Return False otherwise. """ + if run_frame is None: + msg = "Call stack not available. bdist_* commands may fail." + warnings.warn(msg) + if platform.python_implementation() == 'IronPython': + msg = "For best results, pass -X:Frames to enable call stack." + warnings.warn(msg) + return True res = inspect.getouterframes(run_frame)[2] caller, = res[:1] info = inspect.getframeinfo(caller) From c2972a931934f8bb764fdb60df82d760ed3a1199 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:46:24 +0100 Subject: [PATCH 3978/8469] Added tag 3.4 for changeset 5cb90066d987 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e90fb5dc6e..f4d37f9846 100644 --- a/.hgtags +++ b/.hgtags @@ -126,3 +126,4 @@ bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 07c459bea1c58ff52e0576fc29c1865d18a83b09 3.2 b306e681a945406833fb297ae10241e2241fc22b 3.3 78c8cfbe3e1017d1653c48f7306b2c4b4911bf1a 4.0b1 +5cb90066d98700e6d37a01d95c4a2090e730ae02 3.4 From 90f4ab45dbf6f5f91fae080078d5790fe547b57d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:47:10 +0100 Subject: [PATCH 3979/8469] Bumped to 3.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 775c3fb4da..c9b588bfa7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4" +DEFAULT_VERSION = "3.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 36f7773514..b48a18ad41 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4' +__version__ = '3.5' From 4d159b9c8e84676146e41b144271818492f2a6fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:54:26 +0100 Subject: [PATCH 3980/8469] Update bdist_egg for style --- setuptools/command/bdist_egg.py | 133 ++++++++------------------------ 1 file changed, 34 insertions(+), 99 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 8f4d44c328..383eb5f84a 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -3,7 +3,9 @@ Build .egg distributions""" # This module should be kept compatible with Python 2.3 -import sys, os, marshal +import sys +import os +import marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: @@ -33,22 +35,21 @@ def strip_module(filename): def write_stub(resource, pyfile): f = open(pyfile,'w') - f.write('\n'.join([ - "def __bootstrap__():", - " global __bootstrap__, __loader__, __file__", - " import sys, pkg_resources, imp", - " __file__ = pkg_resources.resource_filename(__name__,%r)" - % resource, - " __loader__ = None; del __bootstrap__, __loader__", - " imp.load_dynamic(__name__,__file__)", - "__bootstrap__()", - "" # terminal \n - ])) + f.write( + '\n'.join([ + "def __bootstrap__():", + " global __bootstrap__, __loader__, __file__", + " import sys, pkg_resources, imp", + " __file__ = pkg_resources.resource_filename(__name__,%r)" + % resource, + " __loader__ = None; del __bootstrap__, __loader__", + " imp.load_dynamic(__name__,__file__)", + "__bootstrap__()", + "" # terminal \n + ])) f.close() - - class bdist_egg(Command): description = "create an \"egg\" distribution" @@ -56,41 +57,24 @@ class bdist_egg(Command): user_options = [ ('bdist-dir=', 'b', "temporary directory for creating the distribution"), - ('plat-name=', 'p', - "platform name to embed in generated filenames " - "(default: %s)" % get_build_platform()), + ('plat-name=', 'p', "platform name to embed in generated filenames " + "(default: %s)" % get_build_platform()), ('exclude-source-files', None, - "remove all .py files from the generated egg"), + "remove all .py files from the generated egg"), ('keep-temp', 'k', - "keep the pseudo-installation tree around after " + - "creating the distribution archive"), + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), ('dist-dir=', 'd', - "directory to put final built distributions in"), + "directory to put final built distributions in"), ('skip-build', None, - "skip rebuilding everything (for testing/debugging)"), + "skip rebuilding everything (for testing/debugging)"), ] boolean_options = [ 'keep-temp', 'skip-build', 'exclude-source-files' ] - - - - - - - - - - - - - - - - - def initialize_options (self): + def initialize_options(self): self.bdist_dir = None self.plat_name = None self.keep_temp = 0 @@ -99,7 +83,6 @@ def initialize_options (self): self.egg_output = None self.exclude_source_files = None - def finalize_options(self): ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") self.egg_info = ei_cmd.egg_info @@ -124,13 +107,6 @@ def finalize_options(self): self.egg_output = os.path.join(self.dist_dir, basename+'.egg') - - - - - - - def do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir @@ -156,11 +132,9 @@ def do_install_data(self): finally: self.distribution.data_files = old - def get_outputs(self): return [self.egg_output] - def call_command(self,cmdname,**kw): """Invoke reinitialized command `cmdname` with keyword args""" for dirname in INSTALL_DIRECTORY_ATTRS: @@ -171,7 +145,6 @@ def call_command(self,cmdname,**kw): self.run_command(cmdname) return cmd - def run(self): # Generate metadata first self.run_command("egg_info") @@ -179,7 +152,8 @@ def run(self): # pull their data path from the install_lib command. log.info("installing library code to %s" % self.bdist_dir) instcmd = self.get_finalized_command('install') - old_root = instcmd.root; instcmd.root = None + old_root = instcmd.root + instcmd.root = None if self.distribution.has_c_libraries() and not self.skip_build: self.run_command('build_clib') cmd = self.call_command('install_lib', warn_dir=0) @@ -242,7 +216,7 @@ def run(self): # Make the archive make_zipfile(self.egg_output, archive_root, verbose=self.verbose, - dry_run=self.dry_run, mode=self.gen_header()) + dry_run=self.dry_run, mode=self.gen_header()) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) @@ -250,9 +224,6 @@ def run(self): getattr(self.distribution,'dist_files',[]).append( ('bdist_egg',get_python_version(),self.egg_output)) - - - def zap_pyfiles(self): log.info("Removing .py files from temporary directory") for base,dirs,files in walk_egg(self.bdist_dir): @@ -269,8 +240,6 @@ def zip_safe(self): log.warn("zip_safe flag not set; analyzing archive contents...") return analyze_egg(self.bdist_dir, self.stubs) - - def gen_header(self): epm = EntryPoint.parse_map(self.distribution.entry_points or '') ep = epm.get('setuptools.installation',{}).get('eggsecutable') @@ -311,7 +280,6 @@ def gen_header(self): f.close() return 'a' - def copy_metadata_to(self, target_dir): "Copy metadata (egg info) to the target_dir" # normalize the path (so that a forward-slash in egg_info will @@ -355,8 +323,6 @@ def get_ext_outputs(self): NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split()) - - def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) @@ -391,7 +357,9 @@ def write_safety_flag(egg_dir, safe): if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: - f=open(fn,'wt'); f.write('\n'); f.close() + f = open(fn,'wt') + f.write('\n') + f.close() safety_flags = { True: 'zip-safe', @@ -410,8 +378,10 @@ def scan_module(egg_dir, base, name, stubs): skip = 8 # skip magic & date else: skip = 12 # skip magic & date & file size - f = open(filename,'rb'); f.read(skip) - code = marshal.load(f); f.close() + f = open(filename,'rb') + f.read(skip) + code = marshal.load(f) + f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: @@ -451,39 +421,6 @@ def can_scan(): log.warn("Please ask the author to include a 'zip_safe'" " setting (either True or False) in the package's setup.py") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Attribute names of options for commands that might need to be convinced to # install to the egg build directory @@ -492,8 +429,7 @@ def can_scan(): ] def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, - mode='w' -): + mode='w'): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed @@ -526,4 +462,3 @@ def visit(z, dirname, names): for dirname, dirs, files in os.walk(base_dir): visit(None, dirname, files) return zip_filename -# From c410f8d4eaaba5575453fbee26948419bbc2a247 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:58:43 +0100 Subject: [PATCH 3981/8469] Create stub template from a multiline string. --- setuptools/command/bdist_egg.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 383eb5f84a..0d1cc65e2e 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -6,6 +6,7 @@ import sys import os import marshal +import textwrap from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: @@ -34,19 +35,17 @@ def strip_module(filename): return filename def write_stub(resource, pyfile): + _stub_template = textwrap.dedent(""" + def __bootstrap__(): + global __bootstrap__, __loader__, __file__ + import sys, pkg_resources, imp + __file__ = pkg_resources.resource_filename(__name__, %r) + __loader__ = None; del __bootstrap__, __loader__ + imp.load_dynamic(__name__,__file__) + __bootstrap__() + """).lstrip() f = open(pyfile,'w') - f.write( - '\n'.join([ - "def __bootstrap__():", - " global __bootstrap__, __loader__, __file__", - " import sys, pkg_resources, imp", - " __file__ = pkg_resources.resource_filename(__name__,%r)" - % resource, - " __loader__ = None; del __bootstrap__, __loader__", - " imp.load_dynamic(__name__,__file__)", - "__bootstrap__()", - "" # terminal \n - ])) + f.write(_stub_template % resource) f.close() From 86cd51682907df59a05918584bb85663862adeac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 13:59:13 +0100 Subject: [PATCH 3982/8469] Use file context for write_stub --- setuptools/command/bdist_egg.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 0d1cc65e2e..c19a0ba7ea 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -44,9 +44,8 @@ def __bootstrap__(): imp.load_dynamic(__name__,__file__) __bootstrap__() """).lstrip() - f = open(pyfile,'w') - f.write(_stub_template % resource) - f.close() + with open(pyfile, 'w') as f: + f.write(_stub_template % resource) class bdist_egg(Command): From 588f3c4adf63bbd49f40ae3329da36a007f3091b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 17:02:52 +0100 Subject: [PATCH 3983/8469] Reformat to add the conventional whitespace and shorter lines. --- setuptools/command/test.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 2418833296..c46efc0f0d 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -16,26 +16,24 @@ def loadTestsFromModule(self, module): the return value to the tests. """ tests = [] - if module.__name__!='setuptools.tests.doctest': # ugh - tests.append(TestLoader.loadTestsFromModule(self,module)) + if module.__name__ != 'setuptools.tests.doctest': # ugh + tests.append(TestLoader.loadTestsFromModule(self, module)) if hasattr(module, "additional_tests"): tests.append(module.additional_tests()) if hasattr(module, '__path__'): for file in resource_listdir(module.__name__, ''): - if file.endswith('.py') and file!='__init__.py': - submodule = module.__name__+'.'+file[:-3] + if file.endswith('.py') and file != '__init__.py': + submodule = module.__name__ + '.' + file[:-3] else: - if resource_exists( - module.__name__, file+'/__init__.py' - ): + if resource_exists(module.__name__, file + '/__init__.py'): submodule = module.__name__+'.'+file else: continue tests.append(self.loadTestsFromName(submodule)) - if len(tests)!=1: + if len(tests) != 1: return self.suiteClass(tests) else: return tests[0] # don't create a nested suite for only one return @@ -66,7 +64,7 @@ def finalize_options(self): if self.test_module is None: self.test_suite = self.distribution.test_suite else: - self.test_suite = self.test_module+".test_suite" + self.test_suite = self.test_module + ".test_suite" elif self.test_module: raise DistutilsOptionError( "You may specify a module or a suite, but not both" @@ -77,14 +75,18 @@ def finalize_options(self): if self.verbose: self.test_args.insert(0,'--verbose') if self.test_loader is None: - self.test_loader = getattr(self.distribution,'test_loader',None) + self.test_loader = getattr(self.distribution, 'test_loader', None) if self.test_loader is None: self.test_loader = "setuptools.command.test:ScanningLoader" if self.test_runner is None: self.test_runner = getattr(self.distribution, 'test_runner', None) def with_project_on_sys_path(self, func): - if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): + with_2to3 = ( + sys.version_info >= (3,) + and getattr(self.distribution, 'use_2to3', False) + ) + if with_2to3: # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date From 9cd58f5b62a43b50bbf01a41a9f6ad18002bcdd1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 17:13:37 +0100 Subject: [PATCH 3984/8469] Also run tests under unittest for now. Ref #181. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f6d5d04b4c..0b5672cb8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,6 @@ python: - pypy # command to run tests script: + - python setup.py test - python setup.py ptr - python ez_setup.py --version 3.0.2 From 628b5278a174d94907a25d065403feed1d2cd1d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 17:20:36 +0100 Subject: [PATCH 3985/8469] Extract the resolution of loader/runner classes. Allows None value to pass-through to unittest.main. Fixes #180. --- CHANGES.txt | 6 ++++++ setuptools/command/test.py | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f7340776fd..fbfb4885ab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +3.4.1 +----- + +* Issue #180: Fix regression in test command not caught by py.test-run tests. + --- 3.4 --- diff --git a/setuptools/command/test.py b/setuptools/command/test.py index c46efc0f0d..e377a78144 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -158,12 +158,19 @@ def run_tests(self): del_modules.append(name) list(map(sys.modules.__delitem__, del_modules)) - loader_ep = EntryPoint.parse("x="+self.test_loader) - loader_class = loader_ep.load(require=False) - runner_ep = EntryPoint.parse("x=" + self.test_runner) - runner_class = runner_ep.load(require=False) unittest.main( None, None, [unittest.__file__]+self.test_args, - testLoader=loader_class(), - testRunner=runner_class(), + testLoader=self._resolve_as_ep(self.test_loader), + testRunner=self._resolve_as_ep(self.test_runner), ) + + @staticmethod + def _resolve_as_ep(val): + """ + Load the indicated attribute value, called, as a as if it were + specified as an entry point. + """ + if val is None: + return + parsed = EntryPoint.parse("x=" + val) + return parsed.load(require=False)() From b2c25b76747deecc9d7b8fea04f7c2de2787aa14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 18:26:28 +0100 Subject: [PATCH 3986/8469] Skip this test because it now fails under Python 3.3 and earlier apparently due to a bug in the inspect module. Since the test passes under Python 3.4 and later, that should still serve as a suitable regression test. --- setuptools/tests/test_easy_install.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 70e2ad993f..53114efd81 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -23,6 +23,7 @@ from pkg_resources import Distribution as PRDistribution import setuptools.tests.server import pkg_resources +from .py26compat import skipIf class FakeDist(object): def get_entry_map(self, group): @@ -225,6 +226,9 @@ def test_local_index(self): else: del os.environ['PYTHONPATH'] + @skipIf(sys.version_info < (3, 4), + "Test fails on Python 3.3 and earlier due to bug in inspect but only " + "when run under setup.py test") def test_setup_requires(self): """Regression test for Distribute issue #318 From 10fdeafd2e235e02269552e9f67fe41e4ac1ed2c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 18:35:58 +0100 Subject: [PATCH 3987/8469] Bumped to 3.4.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c9b588bfa7..f5fa741b84 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.5" +DEFAULT_VERSION = "3.4.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index b48a18ad41..da4564dd63 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.5' +__version__ = '3.4.1' From 248a2a7f1496558ef5826edf04bf0605f72c60c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 18:36:00 +0100 Subject: [PATCH 3988/8469] Added tag 3.4.1 for changeset e39de2d3eb77 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f4d37f9846..5dcf93968c 100644 --- a/.hgtags +++ b/.hgtags @@ -127,3 +127,4 @@ bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 b306e681a945406833fb297ae10241e2241fc22b 3.3 78c8cfbe3e1017d1653c48f7306b2c4b4911bf1a 4.0b1 5cb90066d98700e6d37a01d95c4a2090e730ae02 3.4 +e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 From d5f19d2efb05693cf0934e8fc32f6c2b71ee6e38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Mar 2014 18:36:44 +0100 Subject: [PATCH 3989/8469] Bumped to 3.4.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/version.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f5fa741b84..1429de915b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4.1" +DEFAULT_VERSION = "3.4.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index a49a923ef5..e5db30adfb 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==1.0.1 - [ssl:sys_platform=='win32'] -wincertstore==0.2 \ No newline at end of file +wincertstore==0.2 + +[certs] +certifi==1.0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index da4564dd63..daee014fe1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4.1' +__version__ = '3.4.2' From 8b74269476d72e2e05a6f7ff35d693b816e9457c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Apr 2014 18:33:37 -0400 Subject: [PATCH 3990/8469] Wrap unittest.main in a compatibility wrapper for Python 3.1 compatibility. Fixes #183 --- CHANGES.txt | 6 ++++++ setuptools/command/test.py | 11 +++++++---- setuptools/py31compat.py | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fbfb4885ab..5980f7af3d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +3.4.2 +----- + +* Issue #183: Fix additional regression in test command on Python 3.1. + ----- 3.4.1 ----- diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e377a78144..7422b71907 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,10 +1,15 @@ +import unittest +from unittest import TestLoader + from setuptools import Command from distutils.errors import DistutilsOptionError import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint) -from unittest import TestLoader + +from setuptools.py31compat import unittest_main + class ScanningLoader(TestLoader): @@ -141,8 +146,6 @@ def run(self): self.with_project_on_sys_path(self.run_tests) def run_tests(self): - import unittest - # Purge modules under test from sys.modules. The test loader will # re-import them from the build location. Required when 2to3 is used # with namespace packages. @@ -158,7 +161,7 @@ def run_tests(self): del_modules.append(name) list(map(sys.modules.__delitem__, del_modules)) - unittest.main( + unittest_main( None, None, [unittest.__file__]+self.test_args, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index e6b2910a5b..6e76558293 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -1,3 +1,6 @@ +import sys +import unittest + __all__ = ['get_config_vars', 'get_path'] try: @@ -35,3 +38,15 @@ def __exit__(self, exctype, excvalue, exctrace): except OSError: #removal errors are not the only possible pass self.name = None + + +unittest_main = unittest.main + +_PY31 = (3, 1) <= sys.version_info[:2] < (3, 2) +if _PY31: + # on Python 3.1, translate testRunner==None to defaultTestLoader + # for compatibility with Python 2.6, 2.7, and 3.2+ + def unittest_main(*args, **kwargs): + if 'testRunner' in kwargs and kwargs['testRunner'] is None: + kwargs['testRunner'] = unittest.defaultTestLoader + return unittest.main(*args, **kwargs) From a9986a9acf2e081fbc753492991a91b388b28d13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Apr 2014 18:35:57 -0400 Subject: [PATCH 3991/8469] Added tag 3.4.2 for changeset 369f6f90f696 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5dcf93968c..c5cfe1f600 100644 --- a/.hgtags +++ b/.hgtags @@ -128,3 +128,4 @@ b306e681a945406833fb297ae10241e2241fc22b 3.3 78c8cfbe3e1017d1653c48f7306b2c4b4911bf1a 4.0b1 5cb90066d98700e6d37a01d95c4a2090e730ae02 3.4 e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 +369f6f90f69683702cc0b72827ccf949977808b0 3.4.2 From 6801265563d5dd46359989c22355a61357ea5db1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Apr 2014 18:36:29 -0400 Subject: [PATCH 3992/8469] Bumped to 3.4.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1429de915b..d3014523b6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4.2" +DEFAULT_VERSION = "3.4.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index daee014fe1..c2d1211f14 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4.2' +__version__ = '3.4.3' From 9937d7d8f536c32c2f38e3dc665f19e70ad0a537 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 7 Apr 2014 13:58:29 +0200 Subject: [PATCH 3993/8469] Issue #183: Really fix test command with Python 3.1. --- CHANGES.txt | 6 ++++++ setuptools/py31compat.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5980f7af3d..512127b3d3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +3.4.3 +----- + +* Issue #183: Really fix test command with Python 3.1. + ----- 3.4.2 ----- diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 6e76558293..c487ac0439 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -44,9 +44,9 @@ def __exit__(self, exctype, excvalue, exctrace): _PY31 = (3, 1) <= sys.version_info[:2] < (3, 2) if _PY31: - # on Python 3.1, translate testRunner==None to defaultTestLoader + # on Python 3.1, translate testRunner==None to TextTestRunner # for compatibility with Python 2.6, 2.7, and 3.2+ def unittest_main(*args, **kwargs): if 'testRunner' in kwargs and kwargs['testRunner'] is None: - kwargs['testRunner'] = unittest.defaultTestLoader + kwargs['testRunner'] = unittest.TextTestRunner return unittest.main(*args, **kwargs) From 4e2ee153c1656abd97ef54df117c3acc3be67db1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Apr 2014 14:53:44 -0400 Subject: [PATCH 3994/8469] Added tag 3.4.3 for changeset 06a56e063c32 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c5cfe1f600..6c789a0edf 100644 --- a/.hgtags +++ b/.hgtags @@ -129,3 +129,4 @@ b306e681a945406833fb297ae10241e2241fc22b 3.3 5cb90066d98700e6d37a01d95c4a2090e730ae02 3.4 e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 369f6f90f69683702cc0b72827ccf949977808b0 3.4.2 +06a56e063c327b0606f9e9690764279d424646b2 3.4.3 From 951352507c88bc2430bf21d00adf16b1e55de105 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Apr 2014 14:54:35 -0400 Subject: [PATCH 3995/8469] Bumped to 3.4.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d3014523b6..1b8fd95975 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4.3" +DEFAULT_VERSION = "3.4.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index c2d1211f14..6f9c25387a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4.3' +__version__ = '3.4.4' From b118b5f25040715111699eff1345d1eb08457270 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Apr 2014 19:20:31 -0400 Subject: [PATCH 3996/8469] Add test capturing overmatching in new find_packages. Ref #184. --- setuptools/tests/test_find_packages.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index d8b6f47a5d..47ea9e053b 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -88,6 +88,17 @@ def test_dir_with_dot_is_skipped(self): packages = find_packages(self.dist_dir) self.assertTrue('pkg.some.data' not in packages) + def test_dir_with_packages_in_subdir_is_excluded(self): + """ + Ensure that a package in a non-package such as build/pkg/__init__.py + is excluded. + """ + build_dir = self._mkdir('build', self.dist_dir) + build_pkg_dir = self._mkdir('pkg', build_dir) + self._touch('__init__.py', build_pkg_dir) + packages = find_packages(self.dist_dir) + self.assertTrue('build.pkg' not in packages) + def _assert_packages(self, actual, expected): self.assertEqual(set(actual), set(expected)) From c87de03d89ca07416bb2e2c252c7721313e5d9ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Apr 2014 00:45:04 -0400 Subject: [PATCH 3997/8469] Exclude children of excluded parents when doing package discovery. Fixes #184. --- CHANGES.txt | 7 +++++++ setuptools/__init__.py | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 512127b3d3..1c54ea5ee7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +3.4.4 +----- + +* Issue #184: Correct failure where find_package over-matched packages + when directory traversal isn't short-circuited. + ----- 3.4.3 ----- diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 6f58896206..8d46b6dde1 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -50,12 +50,29 @@ def find(cls, where='.', exclude=(), include=('*',)): explicitly excluded packages are removed from it. """ out = cls._find_packages_iter(convert_path(where)) + out = cls.require_parents(out) includes = cls._build_filter(*include) excludes = cls._build_filter('ez_setup', '*__pycache__', *exclude) out = filter(includes, out) out = filterfalse(excludes, out) return list(out) + @staticmethod + def require_parents(packages): + """ + Exclude any apparent package that apparently doesn't include its + parent. + + For example, exclude 'foo.bar' if 'foo' is not present. + """ + found = [] + for pkg in packages: + base, sep, child = pkg.rpartition('.') + if base and base not in found: + continue + found.append(pkg) + yield pkg + @staticmethod def _all_dirs(base_path): """ From b1989ddb47fbcd9e79b984e123d8d3a0b82cb20a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Apr 2014 00:50:38 -0400 Subject: [PATCH 3998/8469] Added tag 3.4.4 for changeset 0917d575d260 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6c789a0edf..0f189371c4 100644 --- a/.hgtags +++ b/.hgtags @@ -130,3 +130,4 @@ b306e681a945406833fb297ae10241e2241fc22b 3.3 e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 369f6f90f69683702cc0b72827ccf949977808b0 3.4.2 06a56e063c327b0606f9e9690764279d424646b2 3.4.3 +0917d575d26091a184796624743825914994bf95 3.4.4 From 6c6fcae287fa60c959b0e63f60b0d12318e0f9f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Apr 2014 00:51:14 -0400 Subject: [PATCH 3999/8469] Bumped to 3.4.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1b8fd95975..b9fd08f09a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4.4" +DEFAULT_VERSION = "3.4.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 6f9c25387a..c56dd17d2a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4.4' +__version__ = '3.4.5' From cb2fa7e5dd86949a06dcdb3babdecc778985fd02 Mon Sep 17 00:00:00 2001 From: "yyfeng88625@gmail.com" Date: Fri, 21 Mar 2014 13:43:54 +0800 Subject: [PATCH 4000/8469] Python2.x needs encode as well. --HG-- extra : source : ab82442e2205a4ab1016711e482388590688fa15 --- setuptools/command/egg_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4f5c969483..30873e19cb 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -304,8 +304,7 @@ def write_file(filename, contents): sequence of strings without line terminators) to it. """ contents = "\n".join(contents) - if sys.version_info >= (3,): - contents = contents.encode("utf-8") + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() From 84b76498861b75f70242a11c1751a382532e5b81 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 27 Mar 2014 14:14:16 +0100 Subject: [PATCH 4001/8469] Minor cosmetic enhancement to provide a more readable repr()esentation of Extension instances: - + --- extension.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extension.py b/extension.py index a93655af2c..cc04a18a3a 100644 --- a/extension.py +++ b/extension.py @@ -131,6 +131,14 @@ def __init__(self, name, sources, msg = "Unknown Extension options: %s" % options warnings.warn(msg) + def __repr__(self): + return '<%s.%s(%r) at %#x>' % ( + self.__class__.__module__, + self.__class__.__name__, + self.name, + id(self)) + + def read_setup_file(filename): """Reads a Setup file and returns Extension instances.""" from distutils.sysconfig import (parse_makefile, expand_makefile_vars, From 57e567ec43dfa2c103ee1f99bca8628da091c9db Mon Sep 17 00:00:00 2001 From: Martin Froehlich Date: Sun, 13 Apr 2014 19:46:54 +0000 Subject: [PATCH 4002/8469] Fix typo in formats.txt --HG-- extra : source : 32166eed1174dc565d903c81b9d99c292357aecc --- docs/formats.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formats.txt b/docs/formats.txt index ef28353e6a..36954bef75 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -397,7 +397,7 @@ and how it works, as well as the `Zip File Issues`_ section below. These are zero-length files, and either one or the other should exist. If ``zip-safe`` exists, it means that the project will work properly -when installedas an ``.egg`` zipfile, and conversely the existence of +when installed as an ``.egg`` zipfile, and conversely the existence of ``not-zip-safe`` means the project should not be installed as an ``.egg`` file. The ``zip_safe`` option to setuptools' ``setup()`` determines which file will be written. If the option isn't provided, From 896fd3d8c7eec74766560559f095fe92e49ecfba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 15 Apr 2014 17:31:55 +0200 Subject: [PATCH 4003/8469] quick-fix #168: avoid using stale cached zipped egg dist info in easy_install When installing a zipped egg, into a Python environment with a same named zipped egg already installed, the installation can fail with a zipimport.ZipImportError complaining about a 'bad local header' encountered in the new zip archive. This can occur if setuptools loads the original egg for some reason and the two zip archives have different content. Then if Python attempts to read a file from the new archive, it will expect it in a location pointed to by the original archive's directory. This will report an error if zipimport does not encounter the expected local file start header in the given location. The mismatch between the two archives can be reproduced by installing the same setuptools version (prior to this commit and after commit f40b810acc5f6494735c912a625d647dc2a3c582 that first introduced the requires.txt metadata information file into the setuptools project) twice from its sources - which can randomly fail due to the scenario described above. That will package the zipped egg archive twice, with each of the archives containing slightly different Python modules. In case this causes any of the compressed modules to have different size (easy_install.pyc is often the culprit here), then attempting to read any later file in the zip archive will fail (requires.txt package metadata file is often the culprit here). A similar scenario can be reproduced more consistently by manually modifying the setuptools easy_install.py source file before building the new egg, e.g. by adding some additional empty lines to its start. The underlying reason for this problem is setuptools using zipimporter instances with cached zip archive content directory information from the older zip archive, even after the old archive has been replaced. This patch cleans up only one such old zipimporter instance - one referenced via easy_install command's local_index attribute. That is the one that has been causing all the currently reported/reproduced installation failures. A clean solution needs to make certain there are no more zipimporter instances with stale archive content directory caches left behind after replacing a zipped egg archive with another. There are currently at least the following known potential sources for such stale zipimporter instances (all holding references to Distribution instances that can then hold a reference to a zipimporter related to their zipped egg archive): easy_install command attributes: local_index (Environment with a list of Distributions) package_index (PackageIndex with a list of Distributions) pth_file (PthDistributions with a list of Distributions) global pkg_resources.working_set object (holds a list of Distributions) imported module's __loader__ attribute (zipimporter instance) zipimport._zip_directory_cache sys.path_importer_cache Further debugging & development note: A complete list of all the currently active stale zipimporter instances can be read using CPython's gc module and its object reference introspection functionality (gc.get_objects() & gc.get_referrers()) from inside the uncache_zipdir() method in the setuptools easy_install.py module. That is the method called just after the old arhive has been replaced by the new one and all the stale zipimporter instances were supposed to have been released. --HG-- extra : rebase_source : 041d2819881b8f7e5c4da333a387fc86d4f7b791 --- setuptools/command/easy_install.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index de139f2f13..10176874ef 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -646,6 +646,15 @@ def select_scheme(self, name): def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) + # First remove the dist from self.local_index, to avoid problems using + # old cached data in case its underlying file has been replaced. + # + # This is a quick-fix for a zipimporter caching issue in case the dist + # has been implemented as and already loaded from a zip file that got + # replaced later on. For more detailed information see setuptools issue + # #168 at 'http://bitbucket.org/pypa/setuptools/issue/168'. + if dist in self.local_index[dist.key]: + self.local_index.remove(dist) self.local_index.add(dist) self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist From bdab866e5efd23d156b4f598f79baa2208f16157 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Apr 2014 13:54:53 -0400 Subject: [PATCH 4004/8469] Extract first_line_re function to encapsulate compatibility mechanism --- setuptools/command/easy_install.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4f497c3bed..d947e548c1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1526,16 +1526,21 @@ def make_relative(self,path): else: return path -def get_script_header(script_text, executable=sys_executable, wininst=False): - """Create a #! line, getting options (if any) from script_text""" + +def _first_line_re(): from distutils.command.build_scripts import first_line_re # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. if not isinstance(first_line_re.pattern, str): - first_line_re = re.compile(first_line_re.pattern.decode()) + return re.compile(first_line_re.pattern.decode()) + + return first_line_re + +def get_script_header(script_text, executable=sys_executable, wininst=False): + """Create a #! line, getting options (if any) from script_text""" first = (script_text+'\n').splitlines()[0] - match = first_line_re.match(first) + match = _first_line_re().match(first) options = '' if match: options = match.group(1) or '' From 48864fad436fcb2ca9f4832fbdabbb66d12b7610 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Apr 2014 13:55:23 -0400 Subject: [PATCH 4005/8469] Move import to the top --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d947e548c1..5206698f50 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -28,6 +28,8 @@ import struct from glob import glob from distutils import log, dir_util +from distutils.command.build_scripts import first_line_re + import pkg_resources from setuptools import Command, _dont_write_bytecode @@ -1528,8 +1530,6 @@ def make_relative(self,path): def _first_line_re(): - from distutils.command.build_scripts import first_line_re - # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. if not isinstance(first_line_re.pattern, str): return re.compile(first_line_re.pattern.decode()) From 0f0c892487277e25ce79a39477b193822f1edf79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Apr 2014 14:11:09 -0400 Subject: [PATCH 4006/8469] Re-arrange _first_line_re to put core functionality at the top level --- setuptools/command/easy_install.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5206698f50..de139f2f13 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1530,11 +1530,15 @@ def make_relative(self,path): def _first_line_re(): - # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. - if not isinstance(first_line_re.pattern, str): - return re.compile(first_line_re.pattern.decode()) + """ + Return a regular expression based on first_line_re suitable for matching + strings. + """ + if isinstance(first_line_re.pattern, str): + return first_line_re - return first_line_re + # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. + return re.compile(first_line_re.pattern.decode()) def get_script_header(script_text, executable=sys_executable, wininst=False): From cf1cb5ba177568bfe699d9e0b2d67a78a9800101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 15 Apr 2014 22:47:14 +0200 Subject: [PATCH 4007/8469] pkg_resources.Environment.__getitem__() code cleanup Better commented the code, especially the result caching & lazy distribution list sorting strategies implemented there. Added several TODO comments indicating things to look into there in the future. General code cleanup: - stopped reusing the project_name variable for different purposes - added an assertion to detect corrupt distribution list caches --HG-- extra : source : 86ef8f59ef4e1fc253c155b9ca0856497455372d --- pkg_resources.py | 64 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2d656f1a2b..0d8987c8f6 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -811,30 +811,70 @@ def scan(self, search_path=None): for dist in find_distributions(item): self.add(dist) - def __getitem__(self,project_name): + def __getitem__(self, project_name): """Return a newest-to-oldest list of distributions for `project_name` + + Uses case-insensitive `project_name` comparison, assuming all the + project's distributions use their project's name converted to all + lowercase as their key. + """ + # Result caching here serves two purposes: + # 1. Speed up the project_name --> distribution list lookup. + # 2. 'First access' flag indicating the distribution list requires + # sorting before it can be returned to the user. + #TODO: This caching smells like premature optimization. It could be + # that the distribution list lookup speed is not really affected by + # this, in which case the whole cache could be removed and replaced + # with a single 'dist_list_sorted' flag. This seems strongly indicated + # by the fact that this function does not really cache the distribution + # list under the given project name but only under its canonical + # distribution key variant. That means that repeated access using a non + # canonical project name does not get any speedup at all. try: return self._cache[project_name] except KeyError: - project_name = project_name.lower() - if project_name not in self._distmap: - return [] + pass - if project_name not in self._cache: - dists = self._cache[project_name] = self._distmap[project_name] + # We expect all distribution keys to contain lower-case characters + # only. + #TODO: See if this expectation can be implemented better, e.g. by using + # some sort of a name --> key conversion function on the Distribution + # class or something similar. + #TODO: This requires all classes derived from Distribution to use + # lower-case only keys even if they do not calculate them from the + # project's name. It might be better to make this function simpler by + # passing it the the exact distribution key as a parameter and have the + # caller convert a `project_name` to its corresponding distribution key + # as needed. + distribution_key = project_name.lower() + try: + dists = self._distmap[distribution_key] + except KeyError: + return [] + + # Sort the project's distribution list lazily on first access. + if distribution_key not in self._cache: + self._cache[distribution_key] = dists _sort_dists(dists) - return self._cache[project_name] + return dists - def add(self,dist): - """Add `dist` if we ``can_add()`` it and it isn't already added""" + def add(self, dist): + """Add `dist` if we ``can_add()`` it and it has not already been added + """ if self.can_add(dist) and dist.has_version(): - dists = self._distmap.setdefault(dist.key,[]) + dists = self._distmap.setdefault(dist.key, []) if dist not in dists: dists.append(dist) - if dist.key in self._cache: - _sort_dists(self._cache[dist.key]) + cached_dists = self._cache.get(dist.key) + if cached_dists: + # The distribution list has been cached on first access, + # therefore we know it has already been sorted lazily and + # we are expected to keep it in sorted order. + _sort_dists(dists) + assert cached_dists is dists, \ + "Distribution list cache corrupt." def best_match(self, req, working_set, installer=None): """Find distribution best matching `req` and usable on `working_set` From cb4b1a9e751b10d63d91197934d1d8f8fff44be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 15 Apr 2014 23:27:23 +0200 Subject: [PATCH 4008/8469] clean up easy_install.uncache_zipdir() code & comments --HG-- extra : rebase_source : 79778a670897cb92c17307f2535fcac6447e16b4 --- setuptools/command/easy_install.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 10176874ef..8c28159070 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1583,18 +1583,30 @@ def auto_chmod(func, arg, exc): reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg)))) def uncache_zipdir(path): - """Ensure that the importer caches dont have stale info for `path`""" - from zipimport import _zip_directory_cache as zdc - _uncache(path, zdc) + """ + Remove any globally cached zip file related data for `path` + + Stale zipimport.zipimporter objects need to be removed when a zip file is + replaced as they contain cached zip file directory information. If they are + asked to get data from their zip file, they will use that cached + information to calculate the data location in the zip file. This calculated + location may be incorrect for the replaced zip file, which may in turn + cause the read operation to either fail or return incorrect data. + + Note we have no way to clear any local caches from here. That is left up to + whomever is in charge of maintaining that cache. + + """ + _uncache(path, zipimport._zip_directory_cache) _uncache(path, sys.path_importer_cache) def _uncache(path, cache): if path in cache: del cache[path] else: - path = normalize_path(path) + normalized_path = normalize_path(path) for p in cache: - if normalize_path(p)==path: + if normalize_path(p) == normalized_path: del cache[p] return From 92cbda9859d98267e36c836ca954ca884df9b07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 15 Apr 2014 23:35:44 +0200 Subject: [PATCH 4009/8469] make easy_install.uncache_zipdir() remove more stale zipimporter instances Since paths are case-insensitive on Windows, zipped egg modules may be loaded using different but equivalent paths. Importing each such different path causes a new zipimporter to be instantiated. Removing cached zipimporter instances must then not forget about removing those created for differently spelled paths to the same replaced egg. Other missed zipimporter instances are those used to access zipped eggs stored inside zipped eggs. When clearing zipimporter instances got a given path, we need to clear all the instances related to any of its subpaths as well. --HG-- extra : rebase_source : 86aeadd1e639fbc83d27a0c551fdc2b8a68a6f85 --- setuptools/command/easy_install.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8c28159070..d4bb2b90d7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1597,18 +1597,20 @@ def uncache_zipdir(path): whomever is in charge of maintaining that cache. """ - _uncache(path, zipimport._zip_directory_cache) - _uncache(path, sys.path_importer_cache) - -def _uncache(path, cache): - if path in cache: - del cache[path] - else: - normalized_path = normalize_path(path) - for p in cache: - if normalize_path(p) == normalized_path: - del cache[p] - return + normalized_path = normalize_path(path) + _uncache(normalized_path, zipimport._zip_directory_cache) + _uncache(normalized_path, sys.path_importer_cache) + +def _uncache(normalized_path, cache): + to_remove = [] + prefix_len = len(normalized_path) + for p in cache: + np = normalize_path(p) + if (np.startswith(normalized_path) and + np[prefix_len:prefix_len + 1] in (os.sep, '')): + to_remove.append(p) + for p in to_remove: + del cache[p] def is_python(text, filename=''): "Is this string a valid Python script?" From b84464da6025f83488ad9f085692bc32c868fca7 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 16 Apr 2014 15:26:18 -0500 Subject: [PATCH 4010/8469] caching the zip manifests Fixes #154 --HG-- extra : rebase_source : 0f32792e01b6a1b746a1e07ffa4d7a85eeda1595 --- pkg_resources.py | 71 ++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5734989dd6..fd1663c234 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1530,33 +1530,48 @@ def __init__(self): empty_provider = EmptyProvider() -def build_zipmanifest(path): - """ - This builds a similar dictionary to the zipimport directory - caches. However instead of tuples, ZipInfo objects are stored. - - The translation of the tuple is as follows: - * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep - on pypy it is the same (one reason why distribute did work - in some cases on pypy and win32). - * [1] - zipinfo.compress_type - * [2] - zipinfo.compress_size - * [3] - zipinfo.file_size - * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 - len(ascii encoding of filename) otherwise - * [5] - (zipinfo.date_time[0] - 1980) << 9 | - zipinfo.date_time[1] << 5 | zipinfo.date_time[2] - * [6] - (zipinfo.date_time[3] - 1980) << 11 | - zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) - * [7] - zipinfo.CRC - """ - zipinfo = dict() - with ContextualZipFile(path) as zfile: - for zitem in zfile.namelist(): - zpath = zitem.replace('/', os.sep) - zipinfo[zpath] = zfile.getinfo(zitem) - assert zipinfo[zpath] is not None - return zipinfo +class ZipManifests(object): + + def __init__(self): + self.known = dict() + + def __call__(self, path): + path = os.path.normpath(path) + stat = os.stat(path) + + if path not in self.known or self.known[path][0] != stat.st_mtime: + self.known[path] = (stat.st_mtime, self.build_manifest(path)) + + return self.known[path][1] + + def build_manifest(self, path): + """ + This builds a similar dictionary to the zipimport directory + caches. However instead of tuples, ZipInfo objects are stored. + + The translation of the tuple is as follows: + * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep + on pypy it is the same (one reason why distribute did work + in some cases on pypy and win32). + * [1] - zipinfo.compress_type + * [2] - zipinfo.compress_size + * [3] - zipinfo.file_size + * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 + len(ascii encoding of filename) otherwise + * [5] - (zipinfo.date_time[0] - 1980) << 9 | + zipinfo.date_time[1] << 5 | zipinfo.date_time[2] + * [6] - (zipinfo.date_time[3] - 1980) << 11 | + zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) + * [7] - zipinfo.CRC + """ + zipinfo = dict() + with ContextualZipFile(path) as zfile: + for zitem in zfile.namelist(): + zpath = zitem.replace('/', os.sep) + zipinfo[zpath] = zfile.getinfo(zitem) + assert zipinfo[zpath] is not None + return zipinfo +build_zipmanifest = ZipManifests() class ContextualZipFile(zipfile.ZipFile): @@ -1586,7 +1601,6 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self, module) - self.zipinfo = build_zipmanifest(self.loader.archive) self.zip_pre = self.loader.archive+os.sep def _zipinfo_name(self, fspath): @@ -1802,7 +1816,6 @@ class EggMetadata(ZipProvider): def __init__(self, importer): """Create a metadata provider from a zipimporter""" - self.zipinfo = build_zipmanifest(importer.archive) self.zip_pre = importer.archive+os.sep self.loader = importer if importer.prefix: From 1fe3013bb336d8e76a6e1a816550197157207963 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 31 May 2014 09:14:37 -0500 Subject: [PATCH 4011/8469] Development Heads. --HG-- branch : develop From 5208cd6fc27e0459e251a967f432c77556d2bf40 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 16 Apr 2014 18:26:58 -0500 Subject: [PATCH 4012/8469] Applied Patch from cazabon to handle svn tag revisions --HG-- branch : develop extra : rebase_source : 571dac8142fc43b54bcd0302598766b0bb9e13ff --- setuptools/command/egg_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9019524db3..6bb2ead9af 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -168,9 +168,10 @@ def tags(self): version = '' if self.tag_build: version+=self.tag_build - if self.tag_svn_revision and ( - os.path.exists('.svn') or os.path.exists('PKG-INFO') - ): version += '-r%s' % self.get_svn_revision() + 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 if self.tag_date: import time version += time.strftime("-%Y%m%d") From 17cf6313ef57d7b4316f827a9b7855eedbccb105 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 16 Apr 2014 19:06:47 -0500 Subject: [PATCH 4013/8469] Fixes Issue #185: Svn not working on new style svn metadata. --HG-- branch : develop extra : rebase_source : 07c28db844959df06d385e21bc62c8d05c729dba --- CHANGES.txt | 7 +++++++ setuptools.egg-info/entry_points.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3df689332a..5a2b17ae53 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,6 +40,13 @@ CHANGES * Issue #192: Preferred bootstrap location is now https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). +----- +3.4.5 +----- + +* Issue #185: Applied patch and added regression tests for making + svn tagging work on the new style SVN metadata. + ----- 3.4.4 ----- diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index de842da822..c345395da2 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias From c147c6789efe24bf54e20d5644aa338bd532adb7 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 23 Apr 2014 18:29:43 -0500 Subject: [PATCH 4014/8469] Add Regression Tests for svn tagging. --HG-- branch : develop extra : rebase_source : a05d5f844416113562066786c697170ed85c48fd --- setuptools/tests/test_egg_info.py | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 278543662f..4c41a2ccd9 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -138,6 +138,43 @@ def test_sources(self): return data + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") + def test_svn_tags(self): + code, data = environment.run_setup_py(["egg_info", + "--tag-svn-revision"], + pypath=self.old_cwd, + data_stream=1) + if code: + raise AssertionError(data) + + pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO') + infile = open(pkginfo, 'r') + try: + read_contents = infile.readlines() + finally: + infile.close() + del infile + + self.assertIn("Version: 0.1.1-r1\n", read_contents) + + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") + def test_no_tags(self): + code, data = environment.run_setup_py(["egg_info"], + pypath=self.old_cwd, + data_stream=1) + if code: + raise AssertionError(data) + + pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO') + infile = open(pkginfo, 'r') + try: + read_contents = infile.readlines() + finally: + infile.close() + del infile + + self.assertIn("Version: 0.1.1\n", read_contents) + class TestSvnDummyLegacy(environment.ZippedEnvironment): From d118aae6b768cfdf387aca862e150e7736c7cd71 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 23 Apr 2014 21:54:27 -0500 Subject: [PATCH 4015/8469] Prune paths file list starting with (RCS|CVS|.svn) as well as path with such sub directories. --HG-- branch : develop extra : rebase_source : 2b3326fe668e880b351b0d5f388472239d915d58 --- CHANGES.txt | 2 ++ setuptools/command/egg_info.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5a2b17ae53..73569cc91a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -46,6 +46,8 @@ CHANGES * Issue #185: Applied patch and added regression tests for making svn tagging work on the new style SVN metadata. +* Prune revision control directories (e.g .svn) from base path + as well as subfolders. ----- 3.4.4 diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6bb2ead9af..be326ac265 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -316,7 +316,8 @@ def prune_file_list(self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) sep = re.escape(os.sep) - self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1) + self.filelist.exclude_pattern(r'(^|'+sep+r')(RCS|CVS|\.svn)'+sep, + is_regex=1) def write_file(filename, contents): From 573c2c86d4d4f506a87a1fc16060f32c1386ad38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Apr 2014 17:38:29 -0400 Subject: [PATCH 4016/8469] Correct indentation and clarify meaning by using namespacing --HG-- extra : amend_source : 20ab7547c8478eb084767fe701e627bdd462ba16 --- setuptools/command/bdist_rpm.py | 8 ++++---- setuptools/command/bdist_wininst.py | 6 +++--- setuptools/command/build_py.py | 20 ++++++++++---------- setuptools/command/install.py | 20 ++++++++++---------- setuptools/command/install_lib.py | 8 ++++---- setuptools/command/install_scripts.py | 9 ++++----- setuptools/command/register.py | 9 ++++----- setuptools/command/sdist.py | 8 ++++---- 8 files changed, 43 insertions(+), 45 deletions(-) diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index c13732fad9..9938682499 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -1,6 +1,6 @@ -from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm +import distutils.command.bdist_rpm as orig -class bdist_rpm(_bdist_rpm): +class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: @@ -15,12 +15,12 @@ def run(self): # ensure distro name is up-to-date self.run_command('egg_info') - _bdist_rpm.run(self) + orig.bdist_rpm.run(self) def _make_spec_file(self): version = self.distribution.get_version() rpmversion = version.replace('-','_') - spec = _bdist_rpm._make_spec_file(self) + spec = orig.bdist_rpm._make_spec_file(self) line23 = '%define version ' + version line24 = '%define version ' + rpmversion spec = [ diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index d4d195a086..f9d8d4f076 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,6 +1,6 @@ -from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst +import distutils.command.bdist_wininst as orig -class bdist_wininst(_bdist_wininst): +class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around @@ -15,6 +15,6 @@ def reinitialize_command(self, command, reinit_subcommands=0): def run(self): self._is_running = True try: - _bdist_wininst.run(self) + orig.bdist_wininst.run(self) finally: self._is_running = False diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 1efabc02b7..53bfb7df23 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -2,7 +2,7 @@ import sys import fnmatch import textwrap -from distutils.command.build_py import build_py as _build_py +import distutils.command.build_py as orig from distutils.util import convert_path from glob import glob @@ -13,7 +13,7 @@ class Mixin2to3: def run_2to3(self, files, doctests=True): "do nothing" -class build_py(_build_py, Mixin2to3): +class build_py(orig.build_py, Mixin2to3): """Enhanced 'build_py' command that includes data files with packages The data files are specified via a 'package_data' argument to 'setup()'. @@ -23,7 +23,7 @@ class build_py(_build_py, Mixin2to3): 'py_modules' and 'packages' in the same setup operation. """ def finalize_options(self): - _build_py.finalize_options(self) + orig.build_py.finalize_options(self) self.package_data = self.distribution.package_data self.exclude_package_data = self.distribution.exclude_package_data or {} if 'data_files' in self.__dict__: del self.__dict__['data_files'] @@ -48,16 +48,16 @@ def run(self): # Only compile actual .py files, using our base class' idea of what our # output files are. - self.byte_compile(_build_py.get_outputs(self, include_bytecode=0)) + self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=0)) def __getattr__(self, attr): if attr=='data_files': # lazily compute data files self.data_files = files = self._get_data_files() return files - return _build_py.__getattr__(self,attr) + return orig.build_py.__getattr__(self,attr) def build_module(self, module, module_file, package): - outfile, copied = _build_py.build_module(self, module, module_file, package) + outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: self.__updated_files.append(outfile) return outfile, copied @@ -140,7 +140,7 @@ def get_outputs(self, include_bytecode=1): needed for the 'install_lib' command to do its job properly, and to generate a correct installation manifest.) """ - return _build_py.get_outputs(self, include_bytecode) + [ + return orig.build_py.get_outputs(self, include_bytecode) + [ os.path.join(build_dir, filename) for package, src_dir, build_dir,filenames in self.data_files for filename in filenames @@ -153,7 +153,7 @@ def check_package(self, package, package_dir): except KeyError: pass - init_py = _build_py.check_package(self, package, package_dir) + init_py = orig.build_py.check_package(self, package, package_dir) self.packages_checked[package] = init_py if not init_py or not self.distribution.namespace_packages: @@ -179,10 +179,10 @@ def check_package(self, package, package_dir): def initialize_options(self): self.packages_checked={} - _build_py.initialize_options(self) + orig.build_py.initialize_options(self) def get_package_dir(self, package): - res = _build_py.get_package_dir(self, package) + res = orig.build_py.get_package_dir(self, package) if self.distribution.src_root is not None: return os.path.join(self.distribution.src_root, res) return res diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1681617f76..3425dbf713 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -3,18 +3,18 @@ import glob import warnings import platform -from distutils.command.install import install as _install +import distutils.command.install as orig from distutils.errors import DistutilsArgError -class install(_install): +class install(orig.install): """Use easy_install to install the package, w/dependencies""" - user_options = _install.user_options + [ + user_options = orig.install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), ('single-version-externally-managed', None, "used by system package builders to create 'flat' eggs"), ] - boolean_options = _install.boolean_options + [ + boolean_options = orig.install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', ] new_commands = [ @@ -24,12 +24,12 @@ class install(_install): _nc = dict(new_commands) def initialize_options(self): - _install.initialize_options(self) + orig.install.initialize_options(self) self.old_and_unmanageable = None self.single_version_externally_managed = None def finalize_options(self): - _install.finalize_options(self) + orig.install.finalize_options(self) if self.root: self.single_version_externally_managed = True elif self.single_version_externally_managed: @@ -42,7 +42,7 @@ def finalize_options(self): def handle_extra_path(self): if self.root or self.single_version_externally_managed: # explicit backward-compatibility mode, allow extra_path to work - return _install.handle_extra_path(self) + return orig.install.handle_extra_path(self) # Ignore extra_path when installing an egg (or being run by another # command without --root or --single-version-externally-managed @@ -52,11 +52,11 @@ def handle_extra_path(self): def run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: - return _install.run(self) + return orig.install.run(self) if not self._called_from_setup(inspect.currentframe()): # Run in backward-compatibility mode to support bdist_* commands. - _install.run(self) + orig.install.run(self) else: self.do_egg_install() @@ -113,5 +113,5 @@ def do_egg_install(self): # XXX Python 3.1 doesn't see _nc if this is inside the class install.sub_commands = [ - cmd for cmd in _install.sub_commands if cmd[0] not in install._nc + cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc ] + install.new_commands diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 63dc11fe38..747fbabbae 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,7 +1,7 @@ -from distutils.command.install_lib import install_lib as _install_lib +import distutils.command.install_lib as orig import os -class install_lib(_install_lib): +class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" def run(self): @@ -34,7 +34,7 @@ def copy_tree( exclude = self.get_exclusions() if not exclude: - return _install_lib.copy_tree(self, infile, outfile) + return orig.install_lib.copy_tree(self, infile, outfile) # Exclude namespace package __init__.py* files from the output @@ -56,7 +56,7 @@ def pf(src, dst): return outfiles def get_outputs(self): - outputs = _install_lib.get_outputs(self) + outputs = orig.install_lib.get_outputs(self) exclude = self.get_exclusions() if exclude: return [f for f in outputs if f not in exclude] diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 1c6cc51d50..c19536bfdc 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,14 +1,13 @@ -from distutils.command.install_scripts import install_scripts \ - as _install_scripts +import distutils.command.install_scripts as orig from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log -class install_scripts(_install_scripts): +class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def initialize_options(self): - _install_scripts.initialize_options(self) + orig.install_scripts.initialize_options(self) self.no_ep = False def run(self): @@ -17,7 +16,7 @@ def run(self): self.run_command("egg_info") if self.distribution.scripts: - _install_scripts.run(self) # run first to set up self.outfiles + orig.install_scripts.run(self) # run first to set up self.outfiles else: self.outfiles = [] if self.no_ep: diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 3b2e085907..6694d1c0a7 100755 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -1,10 +1,9 @@ -from distutils.command.register import register as _register +import distutils.command.register as orig -class register(_register): - __doc__ = _register.__doc__ +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') - _register.run(self) - + orig.register.run(self) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 76e1c5f18b..948d27fafb 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,7 +4,7 @@ from glob import glob import pkg_resources -from distutils.command.sdist import sdist as _sdist +import distutils.command.sdist as orig from distutils.util import convert_path from distutils import log from setuptools import svn_utils @@ -72,7 +72,7 @@ def _default_revctrl(dirname=''): ] -class sdist(_sdist): +class sdist(orig.sdist): """Smart sdist that finds anything supported by revision control""" user_options = [ @@ -119,7 +119,7 @@ def __read_template_hack(self): # Doing so prevents an error when easy_install attempts to delete the # file. try: - _sdist.read_template(self) + orig.sdist.read_template(self) except: sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() raise @@ -197,7 +197,7 @@ def check_readme(self): ) def make_release_tree(self, base_dir, files): - _sdist.make_release_tree(self, base_dir, files) + orig.sdist.make_release_tree(self, base_dir, files) # Save any egg_info command line options used to create this sdist dest = os.path.join(base_dir, 'setup.cfg') From 9551d30ebf4e6c735504c59673a90ea837e05345 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 May 2014 18:34:53 -0400 Subject: [PATCH 4017/8469] Updated references to bootstrap module to use new bootstrap.pypa.io locations. Fixes #192. --- README.txt | 16 ++++++++-------- docs/setuptools.txt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index a6f6acba2f..ad6386e5b9 100755 --- a/README.txt +++ b/README.txt @@ -21,7 +21,7 @@ on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x The link provided to ez_setup.py is a bookmark to bootstrap script for the latest known stable release. -.. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py +.. _ez_setup.py: https://bootstrap.pypa.io/ez_setup.py Windows 8 (Powershell) ====================== @@ -31,18 +31,18 @@ For best results, uninstall previous versions FIRST (see `Uninstalling`_). Using Windows 8 or later, it's possible to install with one simple Powershell command. Start up Powershell and paste this command:: - > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python - + > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - You must start the Powershell with Administrative privileges or you may choose to install a user-local installation:: - > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | python - --user + > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - --user If you have Python 3.3 or later, you can use the ``py`` command to install to different Python versions. For example, to install to Python 3.3 if you have Python 2.7 installed:: - > (Invoke-WebRequest https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py).Content | py -3 - + > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | py -3 - The recommended way to install setuptools on Windows is to download `ez_setup.py`_ and run it. The script will download the appropriate .egg @@ -70,16 +70,16 @@ Most Linux distributions come with wget. Download `ez_setup.py`_ and run it using the target Python version. The script will download the appropriate version and install it for you:: - > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python + > wget https://bootstrap.pypa.io/ez_setup.py -O - | python Note that you will may need to invoke the command with superuser privileges to install to the system Python:: - > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python + > wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python Alternatively, Setuptools may be installed to a user-local path:: - > wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python - --user + > wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user Unix including Mac OS X (curl) ============================== @@ -87,7 +87,7 @@ Unix including Mac OS X (curl) If your system has curl installed, follow the ``wget`` instructions but replace ``wget`` with ``curl`` and ``-O`` with ``-o``. For example:: - > curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -o - | python + > curl https://bootstrap.pypa.io/ez_setup.py -o - | python Advanced Installation diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 734408ece7..a793af53e5 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -15,7 +15,7 @@ including just a single `bootstrap module`_ (a 12K .py file), your package will automatically download and install ``setuptools`` if the user is building your package from source and doesn't have a suitable version already installed. -.. _bootstrap module: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py +.. _bootstrap module: https://bootstrap.pypa.io/ez_setup.py Feature Highlights: From 36addf1ea62cde1ab5884f91e18ac4d1954529cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 11:46:21 -0400 Subject: [PATCH 4018/8469] Monkey-patch the write_pkg_info method on Python 3.1 DistributionMetadata. Fixes #197 --- CHANGES.txt | 7 +++++++ setuptools/dist.py | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1c54ea5ee7..cf8b0898bd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +3.5 +--- + +* Issue #197: On Python 3.1, PKG-INFO is now saved in a UTF-8 encoding instead + of ``sys.getpreferredencoding`` to match the behavior on Python 2.6-3.4. + ----- 3.4.4 ----- diff --git a/setuptools/dist.py b/setuptools/dist.py index 0801ae74ff..59a892362c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -7,6 +7,7 @@ import distutils.log import distutils.core import distutils.cmd +import distutils.dist from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) @@ -31,6 +32,26 @@ def _get_unpatched(cls): _Distribution = _get_unpatched(_Distribution) +def _patch_distribution_metadata_write_pkg_info(): + """ + Workaround issue #197 - Python 3.1 uses an environment-local encoding to + save the pkg_info. Monkey-patch its write_pkg_info method to correct + this undesirable behavior. + """ + if sys.version_info[:2] != (3,1): + return + + # 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) + + distutils.dist.DistributionMetadata.write_pkg_info = write_pkg_info +_patch_distribution_metadata_write_pkg_info() + sequence = tuple, list def check_importable(dist, attr, value): From 0515f30739d1dce3bc10921db403f336358ef447 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 12:58:13 -0400 Subject: [PATCH 4019/8469] Backed out changeset: b0a2fcc5275a Ref #193 --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 30873e19cb..4f5c969483 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -304,7 +304,8 @@ def write_file(filename, contents): sequence of strings without line terminators) to it. """ contents = "\n".join(contents) - contents = contents.encode("utf-8") + if sys.version_info >= (3,): + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() From 118e245064fe77ea85ae936223edf09ff1448314 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:14:22 -0400 Subject: [PATCH 4020/8469] Add test capturing failure when find_packages no longer follows symlinks. Ref #195 --HG-- extra : amend_source : 4efa6b87d3acaefebdfcc953e78a452ffc1f160d --- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/tests/test_find_packages.py | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e5db30adfb..a49a923ef5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.2 - [certs] -certifi==1.0.1 \ No newline at end of file +certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 47ea9e053b..92f7aff7ca 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -1,14 +1,24 @@ """Tests for setuptools.find_packages().""" import os +import sys import shutil import tempfile import unittest +import platform import setuptools from setuptools import find_packages +from setuptools.tests.py26compat import skipIf find_420_packages = setuptools.PEP420PackageFinder.find +def has_symlink(): + bad_symlink = ( + # Windows symlink directory detection is broken on Python 3.2 + platform.system() == 'Windows' and sys.version_info[:2] == (3,2) + ) + return hasattr(os, 'symlink') and not bad_symlink + class TestFindPackages(unittest.TestCase): def setUp(self): @@ -99,6 +109,21 @@ def test_dir_with_packages_in_subdir_is_excluded(self): packages = find_packages(self.dist_dir) self.assertTrue('build.pkg' not in packages) + @skipIf(not has_symlink(), 'Symlink support required') + def test_symlinked_packages_are_included(self): + """ + A symbolically-linked directory should be treated like any other + directory when matched as a package. + + Create a link from lpkg -> pkg. + """ + self._touch('__init__.py', self.pkg_dir) + linked_pkg = os.path.join(self.dist_dir, 'lpkg') + os.symlink('pkg', linked_pkg) + assert os.path.isdir(linked_pkg) + packages = find_packages(self.dist_dir) + self.assertTrue('lpkg' in packages) + def _assert_packages(self, actual, expected): self.assertEqual(set(actual), set(expected)) From 439f6f846869c8266954adfedad232933caaa813 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:26:05 -0400 Subject: [PATCH 4021/8469] Restore traversal of symbolic links in find_packages. Fixes #195. --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8d46b6dde1..d99ab2a6b4 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -78,7 +78,7 @@ def _all_dirs(base_path): """ Return all dirs in base_path, relative to base_path """ - for root, dirs, files in os.walk(base_path): + for root, dirs, files in os.walk(base_path, followlinks=True): for dir in dirs: yield os.path.relpath(os.path.join(root, dir), base_path) From a7997c7d799a439d597c2781444d7706e4671517 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:28:21 -0400 Subject: [PATCH 4022/8469] Update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cf8b0898bd..0f531db93a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,8 +6,12 @@ CHANGES 3.5 --- +* Issue #195: Follow symbolic links in find_packages (restoring behavior + broken in 3.4). * Issue #197: On Python 3.1, PKG-INFO is now saved in a UTF-8 encoding instead of ``sys.getpreferredencoding`` to match the behavior on Python 2.6-3.4. +* Issue #192: Preferred bootstrap location is now + https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). ----- 3.4.4 From 18a5dbb7ef3ef1c7739bb5d9e27f5752ed49bf5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:29:49 -0400 Subject: [PATCH 4023/8469] Bumped to 3.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b9fd08f09a..c9b588bfa7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.4.5" +DEFAULT_VERSION = "3.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index c56dd17d2a..b48a18ad41 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.4.5' +__version__ = '3.5' From ea3bb0f33c6e86f41faf2ea32c1e02dd17ffa99d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:29:53 -0400 Subject: [PATCH 4024/8469] Added tag 3.5 for changeset 98f29d521c3a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0f189371c4..f6d203994f 100644 --- a/.hgtags +++ b/.hgtags @@ -131,3 +131,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 369f6f90f69683702cc0b72827ccf949977808b0 3.4.2 06a56e063c327b0606f9e9690764279d424646b2 3.4.3 0917d575d26091a184796624743825914994bf95 3.4.4 +98f29d521c3a57bae0090d2bc5597d93db95b108 3.5 From a781730b09a385da8c6f4102ec0acdc3ff8184a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 13:30:25 -0400 Subject: [PATCH 4025/8469] Bumped to 3.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/version.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c9b588bfa7..e5e6e56fee 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.5" +DEFAULT_VERSION = "3.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index a49a923ef5..e5db30adfb 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==1.0.1 - [ssl:sys_platform=='win32'] -wincertstore==0.2 \ No newline at end of file +wincertstore==0.2 + +[certs] +certifi==1.0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index b48a18ad41..f1d9320859 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.5' +__version__ = '3.6' From 1ced5f833688b3dd3116d9aacafdfb504ccfa950 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:07:53 -0400 Subject: [PATCH 4026/8469] Give comma-separated values a little room to breathe (use common style convention). --- pkg_resources.py | 230 +++++++++++++++++++++++------------------------ 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2d656f1a2b..af11f58302 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -219,7 +219,7 @@ def register_loader_type(loader_type, provider_factory): def get_provider(moduleOrReq): """Return an IResourceProvider for the named module or requirement""" - if isinstance(moduleOrReq,Requirement): + if isinstance(moduleOrReq, Requirement): return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] try: module = sys.modules[moduleOrReq] @@ -247,7 +247,7 @@ def _macosx_vers(_cache=[]): return _cache[0] def _macosx_arch(machine): - return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine,machine) + return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine, machine) def get_build_platform(): """Return this platform's string for platform-specific distributions @@ -279,7 +279,7 @@ def get_build_platform(): get_platform = get_build_platform # XXX backward compat -def compatible_platforms(provided,required): +def compatible_platforms(provided, required): """Can code for the `provided` platform run on the `required` platform? Returns true if either platform is ``None``, or the platforms are equal. @@ -340,9 +340,9 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist,basestring): dist = Requirement.parse(dist) - if isinstance(dist,Requirement): dist = get_provider(dist) - if not isinstance(dist,Distribution): + if isinstance(dist, basestring): dist = Requirement.parse(dist) + if isinstance(dist, Requirement): dist = get_provider(dist) + if not isinstance(dist, Distribution): raise TypeError("Expected string, Requirement, or Distribution", dist) return dist @@ -484,7 +484,7 @@ def add_entry(self, entry): for dist in find_distributions(entry, True): self.add(dist, entry, False) - def __contains__(self,dist): + def __contains__(self, dist): """True if `dist` is the active distribution for its project""" return self.by_key.get(dist.key) == dist @@ -500,7 +500,7 @@ def find(self, req): """ dist = self.by_key.get(req.key) if dist is not None and dist not in req: - raise VersionConflict(dist,req) # XXX add more info + raise VersionConflict(dist, req) # XXX add more info else: return dist @@ -629,7 +629,7 @@ def resolve(self, requirements, env=None, installer=None, to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency - raise VersionConflict(dist,req) # XXX put more info here + raise VersionConflict(dist, req) # XXX put more info here requirements.extend(dist.requires(req.extras)[::-1]) processed[req] = True @@ -790,7 +790,7 @@ def can_add(self, dist): """ return (self.python is None or dist.py_version is None or dist.py_version==self.python) \ - and compatible_platforms(dist.platform,self.platform) + and compatible_platforms(dist.platform, self.platform) def remove(self, dist): """Remove `dist` from the environment""" @@ -811,7 +811,7 @@ def scan(self, search_path=None): for dist in find_distributions(item): self.add(dist) - def __getitem__(self,project_name): + def __getitem__(self, project_name): """Return a newest-to-oldest list of distributions for `project_name` """ try: @@ -827,7 +827,7 @@ def __getitem__(self,project_name): return self._cache[project_name] - def add(self,dist): + def add(self, dist): """Add `dist` if we ``can_add()`` it and it isn't already added""" if self.can_add(dist) and dist.has_version(): dists = self._distmap.setdefault(dist.key,[]) @@ -876,9 +876,9 @@ def __iter__(self): def __iadd__(self, other): """In-place addition of a distribution or environment""" - if isinstance(other,Distribution): + if isinstance(other, Distribution): self.add(other) - elif isinstance(other,Environment): + elif isinstance(other, Environment): for project in other: for dist in other[project]: self.add(dist) @@ -1123,7 +1123,7 @@ def get_default_cache(): break else: if subdir: - dirname = os.path.join(dirname,subdir) + dirname = os.path.join(dirname, subdir) return os.path.join(dirname, 'Python-Eggs') else: raise RuntimeError( @@ -1207,12 +1207,12 @@ def normalize_exception(exc): @classmethod def and_test(cls, nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1, len(nodelist),2)]) @classmethod def test(cls, nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1,len(nodelist),2)]) + return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1, len(nodelist),2)]) @classmethod def atom(cls, nodelist): @@ -1352,43 +1352,43 @@ def has_resource(self, resource_name): return self._has(self._fn(self.module_path, resource_name)) def has_metadata(self, name): - return self.egg_info and self._has(self._fn(self.egg_info,name)) + return self.egg_info and self._has(self._fn(self.egg_info, name)) if sys.version_info <= (3,): def get_metadata(self, name): if not self.egg_info: return "" - return self._get(self._fn(self.egg_info,name)) + return self._get(self._fn(self.egg_info, name)) else: def get_metadata(self, name): if not self.egg_info: return "" - return self._get(self._fn(self.egg_info,name)).decode("utf-8") + return self._get(self._fn(self.egg_info, name)).decode("utf-8") def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) - def resource_isdir(self,resource_name): + def resource_isdir(self, resource_name): return self._isdir(self._fn(self.module_path, resource_name)) - def metadata_isdir(self,name): - return self.egg_info and self._isdir(self._fn(self.egg_info,name)) + def metadata_isdir(self, name): + return self.egg_info and self._isdir(self._fn(self.egg_info, name)) - def resource_listdir(self,resource_name): - return self._listdir(self._fn(self.module_path,resource_name)) + def resource_listdir(self, resource_name): + return self._listdir(self._fn(self.module_path, resource_name)) - def metadata_listdir(self,name): + def metadata_listdir(self, name): if self.egg_info: - return self._listdir(self._fn(self.egg_info,name)) + return self._listdir(self._fn(self.egg_info, name)) return [] - def run_script(self,script_name,namespace): + def run_script(self, script_name, namespace): script = 'scripts/'+script_name if not self.has_metadata(script): raise ResolutionError("No script named %r" % script_name) - script_text = self.get_metadata(script).replace('\r\n','\n') - script_text = script_text.replace('\r','\n') - script_filename = self._fn(self.egg_info,script) + script_text = self.get_metadata(script).replace('\r\n', '\n') + script_text = script_text.replace('\r', '\n') + script_filename = self._fn(self.egg_info, script) namespace['__file__'] = script_filename if os.path.exists(script_filename): execfile(script_filename, namespace, namespace) @@ -1397,7 +1397,7 @@ def run_script(self,script_name,namespace): cache[script_filename] = ( len(script_text), 0, script_text.split('\n'), script_filename ) - script_code = compile(script_text,script_filename,'exec') + script_code = compile(script_text, script_filename,'exec') exec(script_code, namespace, namespace) def _has(self, path): @@ -1433,8 +1433,8 @@ def _get(self, path): class EggProvider(NullProvider): """Provider based on a virtual filesystem""" - def __init__(self,module): - NullProvider.__init__(self,module) + def __init__(self, module): + NullProvider.__init__(self, module) self._setup_prefix() def _setup_prefix(self): @@ -1457,10 +1457,10 @@ class DefaultProvider(EggProvider): def _has(self, path): return os.path.exists(path) - def _isdir(self,path): + def _isdir(self, path): return os.path.isdir(path) - def _listdir(self,path): + def _listdir(self, path): return os.listdir(path) def get_resource_stream(self, manager, resource_name): @@ -1482,9 +1482,9 @@ def _get(self, path): class EmptyProvider(NullProvider): """Provider that returns nothing for all requests""" - _isdir = _has = lambda self,path: False - _get = lambda self,path: '' - _listdir = lambda self,path: [] + _isdir = _has = lambda self, path: False + _get = lambda self, path: '' + _listdir = lambda self, path: [] module_path = None def __init__(self): @@ -1532,7 +1532,7 @@ class ZipProvider(EggProvider): eagers = None def __init__(self, module): - EggProvider.__init__(self,module) + EggProvider.__init__(self, module) self.zipinfo = build_zipmanifest(self.loader.archive) self.zip_pre = self.loader.archive+os.sep @@ -1542,16 +1542,16 @@ def _zipinfo_name(self, fspath): if fspath.startswith(self.zip_pre): return fspath[len(self.zip_pre):] raise AssertionError( - "%s is not a subpath of %s" % (fspath,self.zip_pre) + "%s is not a subpath of %s" % (fspath, self.zip_pre) ) - def _parts(self,zip_path): + def _parts(self, zip_path): # Convert a zipfile subpath into an egg-relative path part list fspath = self.zip_pre+zip_path # pseudo-fs path if fspath.startswith(self.egg_root+os.sep): return fspath[len(self.egg_root)+1:].split(os.sep) raise AssertionError( - "%s is not a subpath of %s" % (fspath,self.egg_root) + "%s is not a subpath of %s" % (fspath, self.egg_root) ) def get_resource_filename(self, manager, resource_name): @@ -1601,7 +1601,7 @@ def _extract_resource(self, manager, zip_path): outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path)) os.write(outf, self.loader.get_data(zip_path)) os.close(outf) - utime(tmpnam, (timestamp,timestamp)) + utime(tmpnam, (timestamp, timestamp)) manager.postprocess(tmpnam, real_path) try: @@ -1671,17 +1671,17 @@ def _has(self, fspath): zip_path = self._zipinfo_name(fspath) return zip_path in self.zipinfo or zip_path in self._index() - def _isdir(self,fspath): + def _isdir(self, fspath): return self._zipinfo_name(fspath) in self._index() - def _listdir(self,fspath): + def _listdir(self, fspath): return list(self._index().get(self._zipinfo_name(fspath), ())) - def _eager_to_zip(self,resource_name): - return self._zipinfo_name(self._fn(self.egg_root,resource_name)) + def _eager_to_zip(self, resource_name): + return self._zipinfo_name(self._fn(self.egg_root, resource_name)) - def _resource_to_zip(self,resource_name): - return self._zipinfo_name(self._fn(self.module_path,resource_name)) + def _resource_to_zip(self, resource_name): + return self._zipinfo_name(self._fn(self.module_path, resource_name)) register_loader_type(zipimport.zipimporter, ZipProvider) @@ -1698,13 +1698,13 @@ class FileMetadata(EmptyProvider): the provided location. """ - def __init__(self,path): + def __init__(self, path): self.path = path - def has_metadata(self,name): + def has_metadata(self, name): return name=='PKG-INFO' - def get_metadata(self,name): + def get_metadata(self, name): if name=='PKG-INFO': f = open(self.path,'rU') metadata = f.read() @@ -1712,7 +1712,7 @@ def get_metadata(self,name): return metadata raise KeyError("No metadata except PKG-INFO is available") - def get_metadata_lines(self,name): + def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) @@ -1727,7 +1727,7 @@ class PathMetadata(DefaultProvider): base_dir = os.path.dirname(egg_info) metadata = PathMetadata(base_dir, egg_info) dist_name = os.path.splitext(os.path.basename(egg_info))[0] - dist = Distribution(basedir,project_name=dist_name,metadata=metadata) + dist = Distribution(basedir, project_name=dist_name, metadata=metadata) # Unpacked egg directories: @@ -1797,7 +1797,7 @@ def find_eggs_in_zip(importer, path_item, only=False): def find_nothing(importer, path_item, only=False): return () -register_finder(object,find_nothing) +register_finder(object, find_nothing) def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" @@ -1823,7 +1823,7 @@ def find_on_path(importer, path_item, only=False): else: metadata = FileMetadata(fullpath) yield Distribution.from_location( - path_item,entry,metadata,precedence=DEVELOP_DIST + path_item, entry, metadata, precedence=DEVELOP_DIST ) elif not only and lower.endswith('.egg'): for dist in find_distributions(os.path.join(path_item, entry)): @@ -1836,10 +1836,10 @@ def find_on_path(importer, path_item, only=False): entry_file.close() for line in entry_lines: if not line.strip(): continue - for item in find_distributions(os.path.join(path_item,line.rstrip())): + for item in find_distributions(os.path.join(path_item, line.rstrip())): yield item break -register_finder(pkgutil.ImpImporter,find_on_path) +register_finder(pkgutil.ImpImporter, find_on_path) if importlib_bootstrap is not None: register_finder(importlib_bootstrap.FileFinder, find_on_path) @@ -1854,7 +1854,7 @@ def register_namespace_handler(importer_type, namespace_handler): `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item handler), and `namespace_handler` is a callable like this:: - def namespace_handler(importer,path_entry,moduleName,module): + def namespace_handler(importer, path_entry, moduleName, module): # return a path_entry to use for child packages Namespace handlers are only called if the importer object has already @@ -1930,7 +1930,7 @@ def fixup_namespace_packages(path_item, parent=None): try: for package in _namespace_packages.get(parent,()): subpath = _handle_ns(package, path_item) - if subpath: fixup_namespace_packages(subpath,package) + if subpath: fixup_namespace_packages(subpath, package) finally: imp.release_lock() @@ -1946,8 +1946,8 @@ def file_ns_handler(importer, path_item, packageName, module): # Only return the path if it's not already there return subpath -register_namespace_handler(pkgutil.ImpImporter,file_ns_handler) -register_namespace_handler(zipimport.zipimporter,file_ns_handler) +register_namespace_handler(pkgutil.ImpImporter, file_ns_handler) +register_namespace_handler(zipimport.zipimporter, file_ns_handler) if importlib_bootstrap is not None: register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler) @@ -1956,14 +1956,14 @@ def file_ns_handler(importer, path_item, packageName, module): def null_ns_handler(importer, path_item, packageName, module): return None -register_namespace_handler(object,null_ns_handler) +register_namespace_handler(object, null_ns_handler) def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" return os.path.normcase(os.path.realpath(filename)) -def _normalize_cached(filename,_cache={}): +def _normalize_cached(filename, _cache={}): try: return _cache[filename] except KeyError: @@ -1980,7 +1980,7 @@ def _set_parent_ns(packageName): def yield_lines(strs): """Yield non-empty/non-comment lines of a ``basestring`` or sequence""" - if isinstance(strs,basestring): + if isinstance(strs, basestring): for s in strs.splitlines(): s = s.strip() if s and not s.startswith('#'): # skip blank lines/comments @@ -2009,7 +2009,7 @@ def yield_lines(strs): def _parse_version_parts(s): for part in component_re.split(s): - part = replace(part,part) + part = replace(part, part) if not part or part=='.': continue if part[:1] in '0123456789': @@ -2085,19 +2085,19 @@ def __repr__(self): def load(self, require=True, env=None, installer=None): if require: self.require(env, installer) - entry = __import__(self.module_name, globals(),globals(), ['__name__']) + entry = __import__(self.module_name, globals(), globals(), ['__name__']) for attr in self.attrs: try: - entry = getattr(entry,attr) + entry = getattr(entry, attr) except AttributeError: - raise ImportError("%r has no %r attribute" % (entry,attr)) + raise ImportError("%r has no %r attribute" % (entry, attr)) return entry def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) list(map(working_set.add, - working_set.resolve(self.dist.requires(self.extras),env,installer))) + working_set.resolve(self.dist.requires(self.extras), env, installer))) @classmethod def parse(cls, src, dist=None): @@ -2105,21 +2105,21 @@ def parse(cls, src, dist=None): Entry point syntax follows the form:: - name = some.module:some.attr [extra1,extra2] + name = some.module:some.attr [extra1, extra2] The entry name and module name are required, but the ``:attrs`` and ``[extras]`` parts are optional """ try: attrs = extras = () - name,value = src.split('=',1) + name, value = src.split('=',1) if '[' in value: - value,extras = value.split('[',1) + value, extras = value.split('[',1) req = Requirement.parse("x["+extras) if req.specs: raise ValueError extras = req.extras if ':' in value: - value,attrs = value.split(':',1) + value, attrs = value.split(':',1) if not MODULE(attrs.rstrip()): raise ValueError attrs = attrs.rstrip().split('.') @@ -2147,7 +2147,7 @@ def parse_group(cls, group, lines, dist=None): @classmethod def parse_map(cls, data, dist=None): """Parse a map of entry point groups""" - if isinstance(data,dict): + if isinstance(data, dict): data = data.items() else: data = split_sections(data) @@ -2190,7 +2190,7 @@ def __init__(self, location=None, metadata=None, project_name=None, 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: @@ -2274,7 +2274,7 @@ def _dep_map(self): except AttributeError: dm = self.__dep_map = {None: []} for name in 'requires.txt', 'depends.txt': - for extra,reqs in split_sections(self._get_metadata(name)): + for extra, reqs in split_sections(self._get_metadata(name)): if extra: if ':' in extra: extra, marker = extra.split(':',1) @@ -2286,7 +2286,7 @@ def _dep_map(self): dm.setdefault(extra,[]).extend(parse_requirements(reqs)) return dm - def requires(self,extras=()): + def requires(self, extras=()): """List of Requirements needed for this distro if `extras` are used""" dm = self._dep_map deps = [] @@ -2300,12 +2300,12 @@ def requires(self,extras=()): ) return deps - def _get_metadata(self,name): + def _get_metadata(self, name): if self.has_metadata(name): for line in self.get_metadata_lines(name): yield line - def activate(self,path=None): + def activate(self, path=None): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: path = sys.path self.insert_on(path) @@ -2328,7 +2328,7 @@ def egg_name(self): def __repr__(self): if self.location: - return "%s (%s)" % (self,self.location) + return "%s (%s)" % (self, self.location) else: return str(self) @@ -2336,16 +2336,16 @@ def __str__(self): try: version = getattr(self,'version',None) except ValueError: version = None version = version or "[unknown version]" - return "%s %s" % (self.project_name,version) + return "%s %s" % (self.project_name, version) - def __getattr__(self,attr): + def __getattr__(self, attr): """Delegate all unrecognized public attributes to .metadata provider""" if attr.startswith('_'): raise AttributeError(attr) return getattr(self._provider, attr) @classmethod - def from_filename(cls,filename,metadata=None, **kw): + def from_filename(cls, filename, metadata=None, **kw): return cls.from_location( _normalize_cached(filename), os.path.basename(filename), metadata, **kw @@ -2357,9 +2357,9 @@ def as_requirement(self): def load_entry_point(self, group, name): """Return the `name` entry point of `group` or raise ImportError""" - ep = self.get_entry_info(group,name) + ep = self.get_entry_info(group, name) if ep is None: - raise ImportError("Entry point %r not found" % ((group,name),)) + raise ImportError("Entry point %r not found" % ((group, name),)) return ep.load() def get_entry_map(self, group=None): @@ -2452,7 +2452,7 @@ def clone(self,**kw): 'project_name', 'version', 'py_version', 'platform', 'location', 'precedence' ): - kw.setdefault(attr, getattr(self,attr,None)) + kw.setdefault(attr, getattr(self, attr, None)) kw.setdefault('metadata', self._provider) return self.__class__(**kw) @@ -2554,12 +2554,12 @@ def parse_requirements(strs): # create a steppable iterator, so we can handle \-continuations lines = iter(yield_lines(strs)) - def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): + def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): items = [] - while not TERMINATOR(line,p): - if CONTINUE(line,p): + while not TERMINATOR(line, p): + if CONTINUE(line, p): try: line = next(lines) p = 0 @@ -2568,22 +2568,22 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): "\\ must not appear on the last nonblank line" ) - match = ITEM(line,p) + match = ITEM(line, p) if not match: raise ValueError("Expected "+item_name+" in",line,"at",line[p:]) items.append(match.group(*groups)) p = match.end() - match = COMMA(line,p) + match = COMMA(line, p) if match: p = match.end() # skip the comma - elif not TERMINATOR(line,p): + elif not TERMINATOR(line, p): raise ValueError( "Expected ',' or end-of-list in",line,"at",line[p:] ) - match = TERMINATOR(line,p) + match = TERMINATOR(line, p) if match: p = match.end() # skip the terminator, if any return line, p, items @@ -2595,22 +2595,22 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): p = match.end() extras = [] - match = OBRACKET(line,p) + match = OBRACKET(line, p) if match: p = match.end() line, p, extras = scan_list( DISTRO, CBRACKET, line, p, (1,), "'extra' name" ) - line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec") - specs = [(op,safe_version(val)) for op,val in specs] + line, p, specs = scan_list(VERSION, LINE_END, line, p, (1, 2),"version spec") + specs = [(op, safe_version(val)) for op, val in specs] yield Requirement(project_name, specs, extras) def _sort_dists(dists): - tmp = [(dist.hashcmp,dist) for dist in dists] + tmp = [(dist.hashcmp, dist) for dist in dists] tmp.sort() - dists[::-1] = [d for hc,d in tmp] + dists[::-1] = [d for hc, d in tmp] class Requirement: @@ -2618,12 +2618,12 @@ def __init__(self, project_name, specs, extras): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" self.unsafe_name, project_name = project_name, safe_name(project_name) self.project_name, self.key = project_name, project_name.lower() - index = [(parse_version(v),state_machine[op],op,v) for op,v in specs] + index = [(parse_version(v), state_machine[op], op, v) for op, v in specs] index.sort() - self.specs = [(op,ver) for parsed,trans,op,ver in index] - self.index, self.extras = index, tuple(map(safe_extra,extras)) + self.specs = [(op, ver) for parsed, trans, op, ver in index] + self.index, self.extras = index, tuple(map(safe_extra, extras)) self.hashCmp = ( - self.key, tuple([(op,parsed) for parsed,trans,op,ver in index]), + self.key, tuple([(op, parsed) for parsed, trans, op, ver in index]), frozenset(self.extras) ) self.__hash = hash(self.hashCmp) @@ -2634,19 +2634,19 @@ def __str__(self): if extras: extras = '[%s]' % extras return '%s%s%s' % (self.project_name, extras, specs) - def __eq__(self,other): - return isinstance(other,Requirement) and self.hashCmp==other.hashCmp + def __eq__(self, other): + return isinstance(other, Requirement) and self.hashCmp==other.hashCmp - def __contains__(self,item): - if isinstance(item,Distribution): + def __contains__(self, item): + if isinstance(item, Distribution): if item.key != self.key: return False if self.index: item = item.parsed_version # only get if we need it - elif isinstance(item,basestring): + elif isinstance(item, basestring): item = parse_version(item) last = None compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1 - for parsed,trans,op,ver in self.index: - action = trans[compare(item,parsed)] # Indexing: 0, 1, -1 + for parsed, trans, op, ver in self.index: + action = trans[compare(item, parsed)] # Indexing: 0, 1, -1 if action=='F': return False elif action=='T': @@ -2684,8 +2684,8 @@ def parse(s): def _get_mro(cls): """Get an mro for a type or classic class""" - if not isinstance(cls,type): - class cls(cls,object): pass + if not isinstance(cls, type): + class cls(cls, object): pass return cls.__mro__[1:] return cls.__mro__ @@ -2703,7 +2703,7 @@ def ensure_directory(path): os.makedirs(dirname) def split_sections(s): - """Split a string or iterable thereof into (section,content) pairs + """Split a string or iterable thereof into (section, content) pairs Each ``section`` is a stripped version of the section header ("[section]") and each ``content`` is a list of stripped lines excluding blank lines and @@ -2759,4 +2759,4 @@ def _initialize(g): # calling ``require()``) will get activated as well. add_activation_listener(lambda dist: dist.activate()) working_set.entries=[] -list(map(working_set.add_entry,sys.path)) # match order +list(map(working_set.add_entry, sys.path)) # match order From a2bc4f69c7f6c2cec29123669ca6ae517277b67a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:31:35 -0400 Subject: [PATCH 4027/8469] Restore install._install with a comment to capture its requirement on earlier NumPy versions. Fixes #199. --HG-- extra : amend_source : a76d060c98e0048506e5aadddd675151db9d273c --- CHANGES.txt | 7 +++++++ setuptools/command/install.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 0f531db93a..a1d251943d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +3.5.1 +----- + +* Issue #199: Restored ``install._install`` for compatibility with earlier + NumPy versions. + --- 3.5 --- diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 3425dbf713..1f489734d4 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -6,6 +6,10 @@ import distutils.command.install as orig from distutils.errors import DistutilsArgError +# Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for +# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +_install = orig.install + class install(orig.install): """Use easy_install to install the package, w/dependencies""" From 99c16a3378bf712964afb594c14e6a7c40eb8325 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:43:06 -0400 Subject: [PATCH 4028/8469] Bumped to 3.5.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e5e6e56fee..23ea9a2b7e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.6" +DEFAULT_VERSION = "3.5.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index f1d9320859..bf5afe7f3f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.6' +__version__ = '3.5.1' From d61742cc32cb053b2b5befc8cec200fa9a079b38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:43:08 -0400 Subject: [PATCH 4029/8469] Added tag 3.5.1 for changeset 254d8c625f46 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f6d203994f..0120d6b398 100644 --- a/.hgtags +++ b/.hgtags @@ -132,3 +132,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 06a56e063c327b0606f9e9690764279d424646b2 3.4.3 0917d575d26091a184796624743825914994bf95 3.4.4 98f29d521c3a57bae0090d2bc5597d93db95b108 3.5 +254d8c625f4620993ce2d2b21212ba01cf307fe6 3.5.1 From 09719162082439735da57a160fc9ea7fbe0f6935 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 09:43:37 -0400 Subject: [PATCH 4030/8469] Bumped to 3.5.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/version.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 23ea9a2b7e..6c58f105aa 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.5.1" +DEFAULT_VERSION = "3.5.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e5db30adfb..a49a923ef5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.2 - [certs] -certifi==1.0.1 \ No newline at end of file +certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index bf5afe7f3f..0bc4055f60 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.5.1' +__version__ = '3.5.2' From 3d8a7a975f07b8497b2b8a8e4af98fe8aadfb053 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 May 2014 10:03:14 -0400 Subject: [PATCH 4031/8469] Sort _distmap entries on insert. Obviates need for a cache. --- pkg_resources.py | 52 +++--------------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 0d8987c8f6..39805ad670 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -29,6 +29,7 @@ import symbol import operator import platform +import bisect from pkgutil import get_importer try: @@ -776,7 +777,6 @@ def __init__(self, search_path=None, platform=get_supported_platform(), python=P running platform or Python version. """ self._distmap = {} - self._cache = {} self.platform = platform self.python = python self.scan(search_path) @@ -819,46 +819,8 @@ def __getitem__(self, project_name): lowercase as their key. """ - # Result caching here serves two purposes: - # 1. Speed up the project_name --> distribution list lookup. - # 2. 'First access' flag indicating the distribution list requires - # sorting before it can be returned to the user. - #TODO: This caching smells like premature optimization. It could be - # that the distribution list lookup speed is not really affected by - # this, in which case the whole cache could be removed and replaced - # with a single 'dist_list_sorted' flag. This seems strongly indicated - # by the fact that this function does not really cache the distribution - # list under the given project name but only under its canonical - # distribution key variant. That means that repeated access using a non - # canonical project name does not get any speedup at all. - try: - return self._cache[project_name] - except KeyError: - pass - - # We expect all distribution keys to contain lower-case characters - # only. - #TODO: See if this expectation can be implemented better, e.g. by using - # some sort of a name --> key conversion function on the Distribution - # class or something similar. - #TODO: This requires all classes derived from Distribution to use - # lower-case only keys even if they do not calculate them from the - # project's name. It might be better to make this function simpler by - # passing it the the exact distribution key as a parameter and have the - # caller convert a `project_name` to its corresponding distribution key - # as needed. distribution_key = project_name.lower() - try: - dists = self._distmap[distribution_key] - except KeyError: - return [] - - # Sort the project's distribution list lazily on first access. - if distribution_key not in self._cache: - self._cache[distribution_key] = dists - _sort_dists(dists) - - return dists + return self._distmap.get(distribution_key, []) def add(self, dist): """Add `dist` if we ``can_add()`` it and it has not already been added @@ -866,15 +828,7 @@ def add(self, dist): if self.can_add(dist) and dist.has_version(): dists = self._distmap.setdefault(dist.key, []) if dist not in dists: - dists.append(dist) - cached_dists = self._cache.get(dist.key) - if cached_dists: - # The distribution list has been cached on first access, - # therefore we know it has already been sorted lazily and - # we are expected to keep it in sorted order. - _sort_dists(dists) - assert cached_dists is dists, \ - "Distribution list cache corrupt." + bisect.insort(dists, dist) def best_match(self, req, working_set, installer=None): """Find distribution best matching `req` and usable on `working_set` From 0852c4534733db6427dc7f4d6b20798c8e3695e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 02:46:19 -0400 Subject: [PATCH 4032/8469] Correct sort order by using list.sort with support for 'key' and 'reverse'. This method is less efficient, but allows the tests to pass. --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 39805ad670..d9cff7c871 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -29,7 +29,6 @@ import symbol import operator import platform -import bisect from pkgutil import get_importer try: @@ -828,7 +827,8 @@ def add(self, dist): if self.can_add(dist) and dist.has_version(): dists = self._distmap.setdefault(dist.key, []) if dist not in dists: - bisect.insort(dists, dist) + dists.append(dist) + dists.sort(key=operator.attrgetter('hashcmp'), reverse=True) def best_match(self, req, working_set, installer=None): """Find distribution best matching `req` and usable on `working_set` From c35659d044bb7cdb8f0a5d14cf0947ae0f722fe1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 02:46:50 -0400 Subject: [PATCH 4033/8469] Remove _sort_dists (unused) --- pkg_resources.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index d9cff7c871..cc01075401 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2601,12 +2601,6 @@ def scan_list(ITEM,TERMINATOR,line,p,groups,item_name): yield Requirement(project_name, specs, extras) -def _sort_dists(dists): - tmp = [(dist.hashcmp,dist) for dist in dists] - tmp.sort() - dists[::-1] = [d for hc,d in tmp] - - class Requirement: def __init__(self, project_name, specs, extras): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" From 5a07c8be339c93f1d1d2733498bc1133fb1123db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 02:57:43 -0400 Subject: [PATCH 4034/8469] Rewrite hashcmp using modern syntax --- pkg_resources.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 54285ca8a4..dc673e640f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2200,16 +2200,17 @@ def from_location(cls, location, basename, metadata=None,**kw): py_version=py_version, platform=platform, **kw ) - hashcmp = property( - lambda self: ( - getattr(self,'parsed_version',()), + @property + def hashcmp(self): + return ( + getattr(self, 'parsed_version', ()), self.precedence, self.key, _remove_md5_fragment(self.location), self.py_version, - self.platform + self.platform, ) - ) + def __hash__(self): return hash(self.hashcmp) def __lt__(self, other): return self.hashcmp < other.hashcmp From 4aca4845a3e536d0138eaebfe8b7b7b3817ca233 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:00:54 -0400 Subject: [PATCH 4035/8469] Reformat for consistency --- pkg_resources.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index dc673e640f..8788eca1db 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2211,20 +2211,27 @@ def hashcmp(self): self.platform, ) - def __hash__(self): return hash(self.hashcmp) + def __hash__(self): + return hash(self.hashcmp) + def __lt__(self, other): return self.hashcmp < other.hashcmp + def __le__(self, other): return self.hashcmp <= other.hashcmp + def __gt__(self, other): return self.hashcmp > other.hashcmp + def __ge__(self, other): return self.hashcmp >= other.hashcmp + def __eq__(self, other): if not isinstance(other, self.__class__): # It's not a Distribution, so they are not equal return False return self.hashcmp == other.hashcmp + def __ne__(self, other): return not self == other From 322db6ab6e096653842edb0980e582805b70e8c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:12:33 -0400 Subject: [PATCH 4036/8469] Reindent long line --- pkg_resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 8788eca1db..df9bac5735 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -758,7 +758,8 @@ def __setstate__(self, e_k_b_c): class Environment(object): """Searchable snapshot of distributions on a search path""" - def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR): + def __init__(self, search_path=None, platform=get_supported_platform(), + python=PY_MAJOR): """Snapshot distributions available on a search path Any distributions found on `search_path` are added to the environment. From e7818e76dab11e1ae0cda7cc6f29b163b6a240c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:13:04 -0400 Subject: [PATCH 4037/8469] Use simpler syntax to get the same info --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index df9bac5735..105c039351 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1164,8 +1164,8 @@ class MarkerEvaluation(object): values = { 'os_name': lambda: os.name, 'sys_platform': lambda: sys.platform, - 'python_full_version': lambda: sys.version.split()[0], - 'python_version': lambda:'%s.%s' % (sys.version_info[0], sys.version_info[1]), + 'python_full_version': platform.python_version, + 'python_version': lambda: platform.python_version()[:3], 'platform_version': platform.version, 'platform_machine': platform.machine, 'python_implementation': platform.python_implementation, From 5896c4ef68be93c1a9990b72d22b5a7b2d882f1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:20:42 -0400 Subject: [PATCH 4038/8469] Reindent long lines in marker impl --- pkg_resources.py | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 105c039351..29fc395966 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1186,9 +1186,11 @@ def is_invalid_marker(cls, text): @staticmethod def normalize_exception(exc): """ - Given a SyntaxError from a marker evaluation, normalize the error message: + Given a SyntaxError from a marker evaluation, normalize the error + message: - Remove indications of filename and line number. - - Replace platform-specific error messages with standard error messages. + - Replace platform-specific error messages with standard error + messages. """ subs = { 'unexpected EOF while parsing': 'invalid syntax', @@ -1202,12 +1204,20 @@ def normalize_exception(exc): @classmethod def and_test(cls, nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.and_, [cls.interpret(nodelist[i]) for i in range(1, len(nodelist),2)]) + items = [ + cls.interpret(nodelist[i]) + for i in range(1, len(nodelist), 2) + ] + return functools.reduce(operator.and_, items) @classmethod def test(cls, nodelist): # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - return functools.reduce(operator.or_, [cls.interpret(nodelist[i]) for i in range(1, len(nodelist),2)]) + items = [ + cls.interpret(nodelist[i]) + for i in range(1, len(nodelist), 2) + ] + return functools.reduce(operator.or_, items) @classmethod def atom(cls, nodelist): @@ -1216,12 +1226,14 @@ def atom(cls, nodelist): if nodelist[2][0] == token.RPAR: raise SyntaxError("Empty parentheses") return cls.interpret(nodelist[2]) - raise SyntaxError("Language feature not supported in environment markers") + msg = "Language feature not supported in environment markers" + raise SyntaxError(msg) @classmethod def comparison(cls, nodelist): - if len(nodelist)>4: - raise SyntaxError("Chained comparison not allowed in environment markers") + if len(nodelist) > 4: + msg = "Chained comparison not allowed in environment markers" + raise SyntaxError(msg) comp = nodelist[2][1] cop = comp[1] if comp[0] == token.NAME: @@ -1233,7 +1245,8 @@ def comparison(cls, nodelist): try: cop = cls.get_op(cop) except KeyError: - raise SyntaxError(repr(cop)+" operator not allowed in environment markers") + msg = repr(cop) + " operator not allowed in environment markers" + raise SyntaxError(msg) return cop(cls.evaluate(nodelist[1]), cls.evaluate(nodelist[3])) @classmethod @@ -1259,7 +1272,8 @@ def evaluate_marker(cls, text, extra=None): Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. - This implementation uses the 'parser' module, which is not implemented on + This implementation uses the 'parser' module, which is not implemented + on Jython and has been superseded by the 'ast' module in Python 2.6 and later. """ @@ -1313,12 +1327,21 @@ def evaluate(cls, nodelist): return op() if kind==token.STRING: s = nodelist[1] - if s[:1] not in "'\"" or s.startswith('"""') or s.startswith("'''") \ - or '\\' in s: + if not cls._safe_string(s): raise SyntaxError( "Only plain strings allowed in environment markers") return s[1:-1] - raise SyntaxError("Language feature not supported in environment markers") + msg = "Language feature not supported in environment markers" + raise SyntaxError(msg) + + @staticmethod + def _safe_string(cand): + return ( + cand[:1] in "'\"" and + not cand.startswith('"""') and + not cand.startswith("'''") and + '\\' not in cand + ) invalid_marker = MarkerEvaluation.is_invalid_marker evaluate_marker = MarkerEvaluation.evaluate_marker From a75766f574957e58e732901426b9aa60f2b9ac61 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:32:07 -0400 Subject: [PATCH 4039/8469] Reindent more long lines. Other minor syntax modernization. --- pkg_resources.py | 60 +++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 29fc395966..8aa3d339ee 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1844,7 +1844,8 @@ def find_on_path(importer, path_item, only=False): path_item, entry, metadata, precedence=DEVELOP_DIST ) elif not only and lower.endswith('.egg'): - for dist in find_distributions(os.path.join(path_item, entry)): + dists = find_distributions(os.path.join(path_item, entry)) + for dist in dists: yield dist elif not only and lower.endswith('.egg-link'): entry_file = open(os.path.join(path_item, entry)) @@ -1853,8 +1854,11 @@ def find_on_path(importer, path_item, only=False): finally: entry_file.close() for line in entry_lines: - if not line.strip(): continue - for item in find_distributions(os.path.join(path_item, line.rstrip())): + if not line.strip(): + continue + path = os.path.join(path_item, line.rstrip()) + dists = find_distributions(path) + for item in dists: yield item break register_finder(pkgutil.ImpImporter, find_on_path) @@ -2103,7 +2107,8 @@ def __repr__(self): def load(self, require=True, env=None, installer=None): if require: self.require(env, installer) - entry = __import__(self.module_name, globals(), globals(), ['__name__']) + entry = __import__(self.module_name, globals(), globals(), + ['__name__']) for attr in self.attrs: try: entry = getattr(entry, attr) @@ -2114,8 +2119,9 @@ def load(self, require=True, env=None, installer=None): def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) - list(map(working_set.add, - working_set.resolve(self.dist.requires(self.extras), env, installer))) + reqs = self.dist.requires(self.extras) + items = working_set.resolve(reqs, env, installer) + list(map(working_set.add, items)) @classmethod def parse(cls, src, dist=None): @@ -2289,9 +2295,8 @@ def version(self): self._version = safe_version(line.split(':',1)[1].strip()) return self._version else: - raise ValueError( - "Missing 'Version:' header and/or %s file" % self.PKG_INFO, self - ) + tmpl = "Missing 'Version:' header and/or %s file" + raise ValueError(tmpl % self.PKG_INFO, self) @property def _dep_map(self): @@ -2499,7 +2504,8 @@ def _parsed_pkg_info(self): return self._pkg_info except AttributeError: from email.parser import Parser - self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) + metadata = self.get_metadata(self.PKG_INFO) + self._pkg_info = Parser().parsestr(metadata) return self._pkg_info @property @@ -2596,18 +2602,19 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): match = ITEM(line, p) if not match: - raise ValueError("Expected "+item_name+" in",line,"at",line[p:]) + msg = "Expected " + item_name + " in" + raise ValueError(msg, line, "at", line[p:]) items.append(match.group(*groups)) p = match.end() match = COMMA(line, p) if match: - p = match.end() # skip the comma + # skip the comma + p = match.end() elif not TERMINATOR(line, p): - raise ValueError( - "Expected ',' or end-of-list in",line,"at",line[p:] - ) + msg = "Expected ',' or end-of-list in" + raise ValueError(msg, line, "at", line[p:]) match = TERMINATOR(line, p) if match: p = match.end() # skip the terminator, if any @@ -2628,7 +2635,8 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): DISTRO, CBRACKET, line, p, (1,), "'extra' name" ) - line, p, specs = scan_list(VERSION, LINE_END, line, p, (1, 2),"version spec") + line, p, specs = scan_list(VERSION, LINE_END, line, p, (1, 2), + "version spec") specs = [(op, safe_version(val)) for op, val in specs] yield Requirement(project_name, specs, extras) @@ -2638,13 +2646,20 @@ def __init__(self, project_name, specs, extras): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" self.unsafe_name, project_name = project_name, safe_name(project_name) self.project_name, self.key = project_name, project_name.lower() - index = [(parse_version(v), state_machine[op], op, v) for op, v in specs] + index = [ + (parse_version(v), state_machine[op], op, v) + for op, v in specs + ] index.sort() self.specs = [(op, ver) for parsed, trans, op, ver in index] self.index, self.extras = index, tuple(map(safe_extra, extras)) self.hashCmp = ( - self.key, tuple([(op, parsed) for parsed, trans, op, ver in index]), - frozenset(self.extras) + self.key, + tuple([ + (op, parsed) + for parsed, trans, op, ver in index + ]), + frozenset(self.extras), ) self.__hash = hash(self.hashCmp) @@ -2659,8 +2674,11 @@ def __eq__(self, other): def __contains__(self, item): if isinstance(item, Distribution): - if item.key != self.key: return False - if self.index: item = item.parsed_version # only get if we need it + if item.key != self.key: + return False + # only get if we need it + if self.index: + item = item.parsed_version elif isinstance(item, basestring): item = parse_version(item) last = None From 951477214f1321a199bf69f9edaea05dec9345d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:32:48 -0400 Subject: [PATCH 4040/8469] Remove unnecessary list comprehension --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 8aa3d339ee..b4e38ddbf3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2655,10 +2655,10 @@ def __init__(self, project_name, specs, extras): self.index, self.extras = index, tuple(map(safe_extra, extras)) self.hashCmp = ( self.key, - tuple([ + tuple( (op, parsed) for parsed, trans, op, ver in index - ]), + ), frozenset(self.extras), ) self.__hash = hash(self.hashCmp) From a92a8c9aaf22e3bcb705924e92962523ccb6cd5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:34:01 -0400 Subject: [PATCH 4041/8469] Now this syntax fits nicely on one line --- pkg_resources.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index b4e38ddbf3..972a442595 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2655,10 +2655,7 @@ def __init__(self, project_name, specs, extras): self.index, self.extras = index, tuple(map(safe_extra, extras)) self.hashCmp = ( self.key, - tuple( - (op, parsed) - for parsed, trans, op, ver in index - ), + tuple((op, parsed) for parsed, trans, op, ver in index), frozenset(self.extras), ) self.__hash = hash(self.hashCmp) From 7932954f60b7667c54b7bb9463a510bfd01f5aa0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:36:41 -0400 Subject: [PATCH 4042/8469] Fix spacing in __all__ --- pkg_resources.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 972a442595..6a53eb5223 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -147,7 +147,8 @@ def get_supported_platform(): __all__ = [ # Basic resource access and distribution/entry point discovery 'require', 'run_script', 'get_provider', 'get_distribution', - 'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points', + 'load_entry_point', 'get_entry_map', 'get_entry_info', + 'iter_entry_points', 'resource_string', 'resource_stream', 'resource_filename', 'resource_listdir', 'resource_exists', 'resource_isdir', @@ -161,8 +162,8 @@ def get_supported_platform(): 'Distribution', 'Requirement', 'EntryPoint', # Exceptions - 'ResolutionError','VersionConflict','DistributionNotFound','UnknownExtra', - 'ExtractionError', + 'ResolutionError', 'VersionConflict', 'DistributionNotFound', + 'UnknownExtra', 'ExtractionError', # Parsing functions and string utilities 'parse_requirements', 'parse_version', 'safe_name', 'safe_version', From 574ed793b454314593a5edc64ebf112d3b159d2f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:47:17 -0400 Subject: [PATCH 4043/8469] Avoid trailing comments --- pkg_resources.py | 139 +++++++++++++++++++++++++++++++---------------- 1 file changed, 92 insertions(+), 47 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 6a53eb5223..09a5f2ed54 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -141,7 +141,8 @@ def get_supported_platform(): try: plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3)) except ValueError: - pass # not Mac OS X + # not Mac OS X + pass return plat __all__ = [ @@ -248,7 +249,7 @@ def _macosx_vers(_cache=[]): return _cache[0] def _macosx_arch(machine): - return {'PowerPC':'ppc', 'Power_Macintosh':'ppc'}.get(machine, machine) + return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine) def get_build_platform(): """Return this platform's string for platform-specific distributions @@ -277,7 +278,8 @@ def get_build_platform(): macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") -get_platform = get_build_platform # XXX backward compat +# XXX backward compat +get_platform = get_build_platform def compatible_platforms(provided, required): @@ -288,7 +290,8 @@ def compatible_platforms(provided, required): XXX Needs compatibility checks for Linux and other unixy OSes. """ if provided is None or required is None or provided==required: - return True # easy case + # easy case + return True # Mac OS X special cases reqMac = macosVersionString.match(required) @@ -337,7 +340,8 @@ def run_script(dist_spec, script_name): ns['__name__'] = name require(dist_spec)[0].run_script(script_name, ns) -run_main = run_script # backward compatibility +# backward compatibility +run_main = run_script def get_distribution(dist): """Return a current distribution object for a Requirement or string""" @@ -501,7 +505,8 @@ def find(self, req): """ dist = self.by_key.get(req.key) if dist is not None and dist not in req: - raise VersionConflict(dist, req) # XXX add more info + # XXX add more info + raise VersionConflict(dist, req) else: return dist @@ -565,7 +570,8 @@ def add(self, dist, entry=None, insert=True, replace=False): keys = self.entry_keys.setdefault(entry,[]) keys2 = self.entry_keys.setdefault(dist.location,[]) if not replace and dist.key in self.by_key: - return # ignore hidden distros + # ignore hidden distros + return self.by_key[dist.key] = dist if dist.key not in keys: @@ -593,13 +599,17 @@ def resolve(self, requirements, env=None, installer=None, it. """ - requirements = list(requirements)[::-1] # set up the stack - processed = {} # set of processed requirements - best = {} # key -> dist + # set up the stack + requirements = list(requirements)[::-1] + # set of processed requirements + processed = {} + # key -> dist + best = {} to_activate = [] while requirements: - req = requirements.pop(0) # process dependencies breadth-first + # process dependencies breadth-first + req = requirements.pop(0) if req in processed: # Ignore cyclic or redundant dependencies continue @@ -634,7 +644,8 @@ def resolve(self, requirements, env=None, installer=None, requirements.extend(dist.requires(req.extras)[::-1]) processed[req] = True - return to_activate # return list of distros to activate + # return list of distros to activate + return to_activate def find_plugins(self, plugin_env, full_env=None, installer=None, fallback=True): @@ -671,7 +682,8 @@ def find_plugins(self, plugin_env, full_env=None, installer=None, """ plugin_projects = list(plugin_env) - plugin_projects.sort() # scan project names in alphabetic order + # scan project names in alphabetic order + plugin_projects.sort() error_info = {} distributions = {} @@ -683,7 +695,8 @@ def find_plugins(self, plugin_env, full_env=None, installer=None, env = full_env + plugin_env shadow_set = self.__class__([]) - list(map(shadow_set.add, self)) # put all our entries in shadow_set + # put all our entries in shadow_set + list(map(shadow_set.add, self)) for project_name in plugin_projects: @@ -696,11 +709,14 @@ def find_plugins(self, plugin_env, full_env=None, installer=None, except ResolutionError: v = sys.exc_info()[1] - error_info[dist] = v # save error info + # save error info + error_info[dist] = v if fallback: - continue # try the next older version of project + # try the next older version of project + continue else: - break # give up on this project, keep going + # give up on this project, keep going + break else: list(map(shadow_set.add, resolvees)) @@ -851,7 +867,8 @@ def best_match(self, req, working_set, installer=None): for dist in self[req.key]: if dist in req: return dist - return self.obtain(req, installer) # try and download/install + # try to download/install + return self.obtain(req, installer) def obtain(self, requirement, installer=None): """Obtain a distribution matching `requirement` (e.g. via download) @@ -890,7 +907,8 @@ def __add__(self, other): return new -AvailableDistributions = Environment # XXX backward compatibility +# XXX backward compatibility +AvailableDistributions = Environment class ExtractionError(RuntimeError): @@ -1100,14 +1118,17 @@ def get_default_cache(): if os.name!='nt': return os.path.expanduser('~/.python-eggs') - app_data = 'Application Data' # XXX this may be locale-specific! + # XXX this may be locale-specific! + app_data = 'Application Data' app_homes = [ - (('APPDATA',), None), # best option, should be locale-safe + # best option, should be locale-safe + (('APPDATA',), None), (('USERPROFILE',), app_data), (('HOMEDRIVE','HOMEPATH'), app_data), (('HOMEPATH',), app_data), (('HOME',), None), - (('WINDIR',), app_data), # 95/98/ME + # 95/98/ME + (('WINDIR',), app_data), ] for keys, subdir in app_homes: @@ -1589,8 +1610,9 @@ def get_resource_filename(self, manager, resource_name): @staticmethod def _get_date_and_size(zip_stat): size = zip_stat.file_size - date_time = zip_stat.date_time + (0, 0, -1) # ymdhms+wday, yday, dst - #1980 offset already done + # ymdhms+wday, yday, dst + date_time = zip_stat.date_time + (0, 0, -1) + # 1980 offset already done timestamp = time.mktime(date_time) return timestamp, size @@ -1601,7 +1623,8 @@ def _extract_resource(self, manager, zip_path): last = self._extract_resource( manager, os.path.join(zip_path, name) ) - return os.path.dirname(last) # return the extracted directory name + # return the extracted directory name + return os.path.dirname(last) timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) @@ -1632,14 +1655,16 @@ def _extract_resource(self, manager, zip_path): # the file became current since it was checked above, # so proceed. return real_path - elif os.name=='nt': # Windows, del old file and retry + # Windows, del old file and retry + elif os.name=='nt': unlink(real_path) rename(tmpnam, real_path) return real_path raise except os.error: - manager.extraction_error() # report a user-friendly error + # report a user-friendly error + manager.extraction_error() return real_path @@ -1805,7 +1830,8 @@ def find_eggs_in_zip(importer, path_item, only=False): if metadata.has_metadata('PKG-INFO'): yield Distribution.from_filename(path_item, metadata=metadata) if only: - return # don't yield nested distros + # don't yield nested distros + return for subitem in metadata.resource_listdir('/'): if subitem.endswith('.egg'): subpath = os.path.join(path_item, subitem) @@ -2006,18 +2032,24 @@ def yield_lines(strs): if isinstance(strs, basestring): for s in strs.splitlines(): s = s.strip() - if s and not s.startswith('#'): # skip blank lines/comments + # skip blank lines/comments + if s and not s.startswith('#'): yield s else: for ss in strs: for s in yield_lines(ss): yield s -LINE_END = re.compile(r"\s*(#.*)?$").match # whitespace and comment -CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match # line continuation -DISTRO = re.compile(r"\s*((\w|[-.])+)").match # Distribution or extra -VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match # ver. info -COMMA = re.compile(r"\s*,").match # comma between items +# whitespace and comment +LINE_END = re.compile(r"\s*(#.*)?$").match +# line continuation +CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match +# Distribution or extra +DISTRO = re.compile(r"\s*((\w|[-.])+)").match +# ver. info +VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match +# comma between items +COMMA = re.compile(r"\s*,").match OBRACKET = re.compile(r"\s*\[").match CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match @@ -2036,11 +2068,13 @@ def _parse_version_parts(s): if not part or part=='.': continue if part[:1] in '0123456789': - yield part.zfill(8) # pad for numeric comparison + # pad for numeric comparison + yield part.zfill(8) else: yield '*'+part - yield '*final' # ensure that alpha/beta/candidate are before final + # ensure that alpha/beta/candidate are before final + yield '*final' def parse_version(s): """Convert a version string to a chronologically-sortable key @@ -2076,7 +2110,8 @@ def parse_version(s): parts = [] for part in _parse_version_parts(s.lower()): if part.startswith('*'): - if part<'*final': # remove '-' before a prerelease tag + # remove '-' before a prerelease tag + if part<'*final': while parts and parts[-1]=='*final-': parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1]=='00000000': @@ -2311,7 +2346,8 @@ def _dep_map(self): if ':' in extra: extra, marker = extra.split(':',1) if invalid_marker(marker): - reqs=[] # XXX warn + # XXX warn + reqs=[] elif not evaluate_marker(marker): reqs=[] extra = safe_extra(extra) or None @@ -2445,13 +2481,15 @@ def insert_on(self, path, loc = None): break else: del npath[np], path[np] - p = np # ha! + # ha! + p = np return def check_version_conflict(self): if self.key=='setuptools': - return # ignore the inevitable setuptools self-conflicts :( + # ignore the inevitable setuptools self-conflicts :( + return nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt')) loc = normalize_path(self.location) @@ -2680,17 +2718,21 @@ def __contains__(self, item): elif isinstance(item, basestring): item = parse_version(item) last = None - compare = lambda a, b: (a > b) - (a < b) # -1, 0, 1 + # -1, 0, 1 + compare = lambda a, b: (a > b) - (a < b) for parsed, trans, op, ver in self.index: - action = trans[compare(item, parsed)] # Indexing: 0, 1, -1 + # Indexing: 0, 1, -1 + action = trans[compare(item, parsed)] if action=='F': return False elif action=='T': return True elif action=='+': last = True - elif action=='-' or last is None: last = False - if last is None: last = True # no rules encountered + elif action=='-' or last is None: + last = False + # no rules encountered + if last is None: last = True return last def __hash__(self): @@ -2767,10 +2809,12 @@ def _mkstemp(*args,**kw): from tempfile import mkstemp old_open = os.open try: - os.open = os_open # temporarily bypass sandboxing + # temporarily bypass sandboxing + os.open = os_open return mkstemp(*args,**kw) finally: - os.open = old_open # and then put it back + # and then put it back + os.open = old_open # Set up global resource manager (deliberately not state-saved) @@ -2789,7 +2833,8 @@ def _initialize(g): iter_entry_points = working_set.iter_entry_points add_activation_listener = working_set.subscribe run_script = working_set.run_script -run_main = run_script # backward compatibility +# backward compatibility +run_main = run_script # Activate all distributions already on sys.path, and ensure that # all distributions added to the working set in the future (e.g. by # calling ``require()``) will get activated as well. From 3fdbb8f7fa5c84dca9a7ff309d71ae3aeff60009 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 03:50:59 -0400 Subject: [PATCH 4044/8469] Use modern syntax for octal values --- pkg_resources.py | 4 ++-- setuptools/command/easy_install.py | 10 +++++----- setuptools/command/install_scripts.py | 2 +- setuptools/sandbox.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 09a5f2ed54..372480ea51 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -77,7 +77,7 @@ def execfile(fn, globs=None, locs=None): except ImportError: pass -def _bypass_ensure_directory(name, mode=0x1FF): # 0777 +def _bypass_ensure_directory(name, mode=0o777): # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') @@ -1061,7 +1061,7 @@ def postprocess(self, tempname, filename): if os.name == 'posix': # Make the resource executable - mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777 + mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777 os.chmod(tempname, mode) def set_extraction_path(self, path): diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index de139f2f13..00cd300ab3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -770,7 +770,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0x1FF-mask) # 0777 + chmod(target, 0o777-mask) def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them @@ -1110,7 +1110,7 @@ def pf(src, dst): self.byte_compile(to_compile) if not self.dry_run: for f in to_chmod: - mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED # 0555, 07755 + mode = ((os.stat(f)[stat.ST_MODE]) | 0o555) & 0o7755 chmod(f, mode) def byte_compile(self, to_compile): @@ -1206,8 +1206,8 @@ def create_home_path(self): home = convert_path(os.path.expanduser("~")) for name, path in iteritems(self.config_vars): if path.startswith(home) and not os.path.isdir(path): - self.debug_print("os.makedirs('%s', 0700)" % path) - os.makedirs(path, 0x1C0) # 0700 + self.debug_print("os.makedirs('%s', 0o700)" % path) + os.makedirs(path, 0o700) INSTALL_SCHEMES = dict( posix = dict( @@ -1873,7 +1873,7 @@ def onerror(*args): onerror(os.rmdir, path, sys.exc_info()) def current_umask(): - tmp = os.umask(0x12) # 022 + tmp = os.umask(0o022) os.umask(tmp) return tmp diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index c19536bfdc..ac373193f3 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -49,4 +49,4 @@ def write_script(self, script_name, contents, mode="t", *ignored): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0x1FF-mask) # 0777 + chmod(target, 0o777-mask) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 042c595897..dc6e54bf24 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -268,7 +268,7 @@ def _remap_pair(self, operation, src, dst, *args, **kw): self._violation(operation, src, dst, *args, **kw) return (src,dst) - def open(self, file, flags, mode=0x1FF, *args, **kw): # 0777 + def open(self, file, flags, mode=0o777, *args, **kw): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode, *args, **kw) From 6fb34525a9935ee687e8b89d340da126d9aa9cb5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 14:55:50 -0400 Subject: [PATCH 4045/8469] Add Python 3.4 as a testable version. Bump version pulled in bootstrap test. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0b5672cb8e..022824f99b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,10 @@ python: - 2.7 - 3.2 - 3.3 + - 3.4 - pypy # command to run tests script: - python setup.py test - python setup.py ptr - - python ez_setup.py --version 3.0.2 + - python ez_setup.py --version 3.5.1 From ad7c41a6e717a7d91a8dc08a2530e1187139b799 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 May 2014 16:23:25 -0400 Subject: [PATCH 4046/8469] Just suppress the spurious IndexError when it happens. Rely on the environments where the behavior doesn't fail until the upstream issue can be resolved. Fixes #201. --- setuptools/tests/test_easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 53114efd81..31802aa288 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -226,9 +226,6 @@ def test_local_index(self): else: del os.environ['PYTHONPATH'] - @skipIf(sys.version_info < (3, 4), - "Test fails on Python 3.3 and earlier due to bug in inspect but only " - "when run under setup.py test") def test_setup_requires(self): """Regression test for Distribute issue #318 @@ -246,6 +243,10 @@ def test_setup_requires(self): run_setup(test_setup_py, ['install']) except SandboxViolation: self.fail('Installation caused SandboxViolation') + except IndexError: + # Test fails in some cases due to bugs in Python + # See https://bitbucket.org/pypa/setuptools/issue/201 + pass class TestSetupRequires(unittest.TestCase): From 2edec4688999a14f63cb842aa5df491464626b20 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 11:51:45 -0400 Subject: [PATCH 4047/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1c54ea5ee7..cb970e8791 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +3.5.2 +----- + +* Issue #168: More robust handling of replaced zip files and stale caches. + Fixes ZipImportError complaining about a 'bad local header'. + ----- 3.4.4 ----- From 89be7c26630e3df52699f10dc2d3c312625a938a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:07:43 -0400 Subject: [PATCH 4048/8469] Added tag 3.5.2 for changeset 572201d08ead --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0120d6b398..1339fff2e1 100644 --- a/.hgtags +++ b/.hgtags @@ -133,3 +133,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 0917d575d26091a184796624743825914994bf95 3.4.4 98f29d521c3a57bae0090d2bc5597d93db95b108 3.5 254d8c625f4620993ce2d2b21212ba01cf307fe6 3.5.1 +572201d08eadc59210f6f0f28f9dc79f906672d3 3.5.2 From 2ad829949a55ebb390c5c94a5672f10f693e7eaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:08:13 -0400 Subject: [PATCH 4049/8469] Bumped to 3.5.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6c58f105aa..56ba9ae3ad 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.5.2" +DEFAULT_VERSION = "3.5.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 0bc4055f60..455727c57d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.5.2' +__version__ = '3.5.3' From 5b8bc6f83e6c31c2b8737a41578c42771f05f47c Mon Sep 17 00:00:00 2001 From: Arkadiy Shapkin Date: Thu, 24 Apr 2014 08:38:40 +0000 Subject: [PATCH 4050/8469] Downloading throw proxy fixed http://stackoverflow.com/a/18790045/61505 --HG-- extra : rebase_source : b4dced905dbe7206c15ae35ccdae9c400637efa2 --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 56ba9ae3ad..7ec1680ae9 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -169,7 +169,7 @@ def download_file_powershell(url, target): cmd = [ 'powershell', '-Command', - "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), + "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), ] _clean_check(cmd, target) From 21e9c58b9a33b7a1a2b304fe82445052c94eb20d Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 24 Apr 2014 08:07:17 -0500 Subject: [PATCH 4051/8469] ensure write_manifest passes contents to write_file as unicode strings. --HG-- extra : rebase_source : 719fb2eb2c3599c57d7a11f5fc55cf9a88d74df7 --- setuptools/command/egg_info.py | 43 +++++++++++++++++++++++----------- setuptools/tests/test_sdist.py | 9 +++---- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 30873e19cb..df4edff76f 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -10,7 +10,7 @@ import distutils.errors from distutils import log from setuptools.command.sdist import sdist -from setuptools.compat import basestring +from setuptools.compat import basestring, unicode from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList @@ -256,22 +256,37 @@ def write_manifest(self): by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. """ - # The manifest must be UTF-8 encodable. See #303. - if sys.version_info >= (3,): - files = [] - for file in self.filelist.files: + + #if files are byte codes they should be filesystem encoded + fs_enc = sys.getfilesystemencoding() + files = [] + contents = [] + for file in self.filelist.files: + #In order to ensure the encode behaves, must explicitly + #decode non-unicode strings, yet retain original for + #filelist cleanup + if not isinstance(file, unicode): try: - file.encode("utf-8") - except UnicodeEncodeError: - log.warn("'%s' not UTF-8 encodable -- skipping" % file) - else: - files.append(file) - self.filelist.files = files + u_file = file.decode(fs_enc) + except UnicodeDecodeError: + log.warn("'%s' in unexpected encoding -- skipping" % file) + continue + else: + u_file = file + + # The manifest must be UTF-8 encodable. See #303. + try: + u_file.encode("utf-8") + except UnicodeEncodeError: + log.warn("'%s' not UTF-8 encodable -- skipping" % file) + else: + files.append(file) # possibily byte encoded + contents.append(u_file) # unicode only + self.filelist.files = files - files = self.filelist.files if os.sep!='/': - files = [f.replace(os.sep,'/') for f in files] - self.execute(write_file, (self.manifest, files), + contents = [f.replace(os.sep,'/') for f in contents] + self.execute(write_file, (self.manifest, contents), "writing manifest file '%s'" % self.manifest) def warn(self, msg): # suppress missing-file warnings from sdist diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 71d10757bc..09a58621d1 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -156,10 +156,11 @@ def test_manifest_is_written_with_utf8_encoding(self): self.fail(e) # The manifest should contain the UTF-8 filename - if sys.version_info >= (3,): - self.assertTrue(posix(filename) in u_contents) - else: - self.assertTrue(posix(filename) in contents) + if sys.version_info < (3,): + fs_enc = sys.getfilesystemencoding() + filename = filename.decode(fs_enc) + + self.assertTrue(posix(filename) in u_contents) # Python 3 only if sys.version_info >= (3,): From ab771bb9808eed095eb5dcf52d3262335abd39af Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 24 Apr 2014 22:05:00 -0500 Subject: [PATCH 4052/8469] ignore .git* files --- .hgignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.hgignore b/.hgignore index 13367726df..6eb702bc7d 100644 --- a/.hgignore +++ b/.hgignore @@ -13,5 +13,4 @@ include \.Python *.swp CHANGES (links).txt -.git2 -.gitignore +.git* From b9a53c47f66dbc41e3e9ba8bd29932d1ca6a589f Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Thu, 24 Apr 2014 23:06:09 -0500 Subject: [PATCH 4053/8469] test_sdist: change the latin1 test to match the behavior of write_manifest --- setuptools/tests/test_sdist.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 09a58621d1..31768e21de 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -397,9 +397,20 @@ def test_sdist_with_latin1_encoded_filename(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) else: - # No conversion takes place under Python 2 and the file - # is included. We shall keep it that way for BBB. - self.assertTrue(filename in cmd.filelist.files) + # Under Python 2 there seems to be no decoding of the + # filelist. However, due to decode and encoding of the + # file name to utf-8 + try: + #This seems a bit iffy, but not really what else + #since cmd.filelist.files is not encoded, but + #want to write out the manifest as UTF-8/ + + #This is how one expected the filename to be decoded + fs_enc = sys.getfilesystemencoding() + filename.decode(fs_enc) + self.assertTrue(filename in cmd.filelist.files) + except UnicodeDecodeError: + self.assertFalse(filename in cmd.filelist.files) class TestDummyOutput(environment.ZippedEnvironment): From 7192c0fb9e77a8ffa8f54b956cb6775ecb3b1795 Mon Sep 17 00:00:00 2001 From: philip_thiem Date: Fri, 25 Apr 2014 04:53:11 +0000 Subject: [PATCH 4054/8469] Improved comment in the latin1 sdist test. --- setuptools/tests/test_sdist.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 31768e21de..5d8340b03c 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -397,15 +397,12 @@ def test_sdist_with_latin1_encoded_filename(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) else: - # Under Python 2 there seems to be no decoding of the + # Under Python 2 there seems to be no decoded string in the # filelist. However, due to decode and encoding of the - # file name to utf-8 + # file name to get utf-8 Manifest the latin1 maybe excluded try: - #This seems a bit iffy, but not really what else - #since cmd.filelist.files is not encoded, but - #want to write out the manifest as UTF-8/ - - #This is how one expected the filename to be decoded + # fs_enc should match how one is expect the decoding to + # be proformed for the manifest output. fs_enc = sys.getfilesystemencoding() filename.decode(fs_enc) self.assertTrue(filename in cmd.filelist.files) From 1152b05d319cd460945037cdf09529f754c1b4db Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 4 May 2014 05:06:24 -0700 Subject: [PATCH 4055/8469] Version bump for 3.4.1rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 04804c1f42..b00024940e 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.0" +__version__ = "3.4.1rc1" #--end constants-- From 19565334cb36e694328566d3f5011a5b57d6bee3 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Wed, 7 May 2014 04:44:42 +0200 Subject: [PATCH 4056/8469] - Issue #17752: Fix distutils tests when run from the installed location. --- tests/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/support.py b/tests/support.py index 71ad4f42b2..7385c6bbf6 100644 --- a/tests/support.py +++ b/tests/support.py @@ -207,4 +207,4 @@ def fixup_build_ext(cmd): cmd.library_dirs = [] else: name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) + cmd.library_dirs = [d for d in value.split(os.pathsep) if d] From ddf2ea79184c3b3e10f33bbab12ac995395d15fb Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Wed, 7 May 2014 12:57:44 +0200 Subject: [PATCH 4057/8469] - Issue #17752: Fix distutils tests when run from the installed location. --- tests/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/support.py b/tests/support.py index 71ad4f42b2..7385c6bbf6 100644 --- a/tests/support.py +++ b/tests/support.py @@ -207,4 +207,4 @@ def fixup_build_ext(cmd): cmd.library_dirs = [] else: name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) + cmd.library_dirs = [d for d in value.split(os.pathsep) if d] From e1f6290df0a0bd0ed58c9dd3a695ef41b17310f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:15:13 -0400 Subject: [PATCH 4058/8469] Extract powershell command to correct long line --HG-- extra : amend_source : 1a6e3e5d0f62c1ce54c0d42ce806bd13541642ca --- ez_setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 7ec1680ae9..003e0619d0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -166,10 +166,16 @@ def download_file_powershell(url, target): trust). Raise an exception if the command cannot complete. """ target = os.path.abspath(target) + ps_cmd = ( + "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " + "[System.Net.CredentialCache]::DefaultCredentials; " + "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" + % vars() + ) cmd = [ 'powershell', '-Command', - "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), + ps_cmd, ] _clean_check(cmd, target) From f4feb24a9824b6f85a0125096c4f7de9baf48c90 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:21:53 -0400 Subject: [PATCH 4059/8469] Update changelog. Fixes #203. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 65577273fc..2f4705d7d1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +3.6 +--- + +* Issue #203: Honor proxy settings for Powershell downloader in the bootstrap + routine. + ----- 3.5.2 ----- From 46d0e959989b92971f7d0999222b8aa476786b65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:22:50 -0400 Subject: [PATCH 4060/8469] Bumped to 3.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 003e0619d0..bd7d262d77 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.5.3" +DEFAULT_VERSION = "3.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 455727c57d..f1d9320859 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.5.3' +__version__ = '3.6' From d5c8e8b6a5f3b0599668eb5696450bbe57080ef9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:22:52 -0400 Subject: [PATCH 4061/8469] Added tag 3.6 for changeset e94e768594a1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1339fff2e1..100e552c46 100644 --- a/.hgtags +++ b/.hgtags @@ -134,3 +134,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 98f29d521c3a57bae0090d2bc5597d93db95b108 3.5 254d8c625f4620993ce2d2b21212ba01cf307fe6 3.5.1 572201d08eadc59210f6f0f28f9dc79f906672d3 3.5.2 +e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 From b317181b174346e958bfd0999ccbbd803962bbe4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 May 2014 12:23:18 -0400 Subject: [PATCH 4062/8469] Bumped to 3.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/version.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bd7d262d77..732fffc935 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.6" +DEFAULT_VERSION = "3.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index a49a923ef5..e5db30adfb 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[certs] -certifi==1.0.1 - [ssl:sys_platform=='win32'] -wincertstore==0.2 \ No newline at end of file +wincertstore==0.2 + +[certs] +certifi==1.0.1 \ No newline at end of file diff --git a/setuptools/version.py b/setuptools/version.py index f1d9320859..94bcfb0106 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.6' +__version__ = '3.7' From 378b4011f66d9fdac94eaaf7b9d61c70f0a2fbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Thu, 8 May 2014 21:21:59 +0200 Subject: [PATCH 4063/8469] fix issue202 - update existing zipimporters when replacing a zipped egg When replacing a zipped egg distribution with a different zipped egg, we make all existing zipimport.zipimporter loaders valid again instead of having to go hunting them down one by one. This is done by updating their shared zip directory information cache - zipimport._zip_directory_cache. Related to the following project issues: #169 - http://bitbucket.org/pypa/setuptools/issue/168 #202 - http://bitbucket.org/pypa/setuptools/issue/202 --HG-- extra : source : b60beb7792252a39f61d7fc0f58aa04c03ddaba2 --- setuptools/command/easy_install.py | 139 ++++++++++++++++++++++------- 1 file changed, 109 insertions(+), 30 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ad7f472512..0b282d47b3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -840,23 +840,30 @@ def install_egg(self, egg_path, tmpdir): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): self.execute(os.unlink,(destination,),"Removing "+destination) - uncache_zipdir(destination) - if os.path.isdir(egg_path): - if egg_path.startswith(tmpdir): - f,m = shutil.move, "Moving" + try: + new_dist_is_zipped = False + if os.path.isdir(egg_path): + if egg_path.startswith(tmpdir): + f,m = shutil.move, "Moving" + else: + f,m = shutil.copytree, "Copying" + elif self.should_unzip(dist): + self.mkpath(destination) + f,m = self.unpack_and_compile, "Extracting" else: - f,m = shutil.copytree, "Copying" - elif self.should_unzip(dist): - self.mkpath(destination) - f,m = self.unpack_and_compile, "Extracting" - elif egg_path.startswith(tmpdir): - f,m = shutil.move, "Moving" - else: - f,m = shutil.copy2, "Copying" - - self.execute(f, (egg_path, destination), - (m+" %s to %s") % - (os.path.basename(egg_path),os.path.dirname(destination))) + new_dist_is_zipped = True + if egg_path.startswith(tmpdir): + f,m = shutil.move, "Moving" + else: + f,m = shutil.copy2, "Copying" + self.execute(f, (egg_path, destination), + (m+" %s to %s") % + (os.path.basename(egg_path),os.path.dirname(destination))) + update_dist_caches(destination, + fix_zipimporter_caches=new_dist_is_zipped) + except: + update_dist_caches(destination, fix_zipimporter_caches=False) + raise self.add_output(destination) return self.egg_distribution(destination) @@ -1582,24 +1589,74 @@ def auto_chmod(func, arg, exc): et, ev, _ = sys.exc_info() reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg)))) -def uncache_zipdir(path): +def update_dist_caches(dist_path, fix_zipimporter_caches): """ - Remove any globally cached zip file related data for `path` - - Stale zipimport.zipimporter objects need to be removed when a zip file is - replaced as they contain cached zip file directory information. If they are - asked to get data from their zip file, they will use that cached - information to calculate the data location in the zip file. This calculated - location may be incorrect for the replaced zip file, which may in turn - cause the read operation to either fail or return incorrect data. - - Note we have no way to clear any local caches from here. That is left up to - whomever is in charge of maintaining that cache. + Fix any globally cached `dist_path` related data + + `dist_path` should be a path of a newly installed egg distribution (zipped + or unzipped). + + sys.path_importer_cache contains finder objects that have been cached when + importing data from the original distribution. Any such finders need to be + cleared since the replacement distribution might be packaged differently, + e.g. a zipped egg distribution might get replaced with an unzipped egg + folder or vice versa. Having the old finders cached may then cause Python + to attempt loading modules from the replacement distribution using an + incorrect loader. + + zipimport.zipimporter objects are Python loaders charged with importing + data packaged inside zip archives. If stale loaders referencing the + original distribution, are left behind, they can fail to load modules from + the replacement distribution. E.g. if an old zipimport.zipimporter instance + is used to load data from a new zipped egg archive, it may cause the + operation to attempt to locate the requested data in the wrong location - + one indicated by the original distribution's zip archive directory + information. Such an operation may then fail outright, e.g. report having + read a 'bad local file header', or even worse, it may fail silently & + return invalid data. + + If asked, we can fix all existing zipimport.zipimporter instances instead + of having to track them down and remove them one by one, by updating their + shared cached zip archive directory information. This, of course, assumes + that the replacement distribution is packaged as a zipped egg. + + If not asked to fix existing zipimport.zipimporter instances, we do our + best to clear any remaining zipimport.zipimporter related cached data that + might somehow later get used when attempting to load data from the new + distribution and thus cause such load operations to fail. Note that when + tracking down such remaining stale data, we can not catch every possible + usage from here, and we clear only those that we know of and have found to + cause problems if left alive. Any remaining caches should be updated by + whomever is in charge of maintaining them, i.e. they should be ready to + handle us replacing their zip archives with new distributions at runtime. """ - normalized_path = normalize_path(path) - _uncache(normalized_path, zipimport._zip_directory_cache) + normalized_path = normalize_path(dist_path) _uncache(normalized_path, sys.path_importer_cache) + if fix_zipimporter_caches: + _replace_zip_directory_cache_data(normalized_path) + else: + # Clear the relevant zipimport._zip_directory_cache data. This will not + # remove related zipimport.zipimporter instances but should at least + # not leave the old zip archive directory data behind to be reused by + # some newly created zipimport.zipimporter loaders. Not strictly + # necessary, but left in because this cache clearing was done before + # we started replacing the zipimport._zip_directory_cache if possible, + # and there are no relevent unit tests that we can depend on to tell us + # if this is really needed. + _uncache(normalized_path, zipimport._zip_directory_cache) + # N.B. Other known sources of stale zipimport.zipimporter instances + # that we do not clear here, but might if ever given a reason to do so. + # * Global setuptools pkg_resources.working_set (a.k.a. 'master working + # set') may contain distributions which may in turn contain their + # zipimport.zipimporter loaders. + # * Several zipimport.zipimporter loaders held by local variables + # further up the function call stack when running the setuptools + # installation. + # * Already loaded modules may have their __loader__ attribute set to + # the exact loader instance used when importing them. Python 3.4 docs + # state that this information is intended mostly for introspection + # and so is not expected to cause us problems. def _uncache(normalized_path, cache): to_remove = [] @@ -1612,6 +1669,28 @@ def _uncache(normalized_path, cache): for p in to_remove: del cache[p] +def _replace_zip_directory_cache_data(normalized_path): + cache = zipimport._zip_directory_cache + to_update = [] + prefix_len = len(normalized_path) + for p in cache: + np = normalize_path(p) + if (np.startswith(normalized_path) and + np[prefix_len:prefix_len + 1] in (os.sep, '')): + to_update.append(p) + # N.B. In theory, we could load the zip directory information just once for + # all updated path spellings, and then copy it locally and update its + # contained path strings to contain the correct spelling, but that seems + # like a way too invasive move (this cache structure is not officially + # documented anywhere and could in theory change with new Python releases) + # for no significant benefit. + for p in to_update: + old_entry = cache.pop(p) + zipimport.zipimporter(p) + old_entry.clear() + old_entry.update(cache[p]) + cache[p] = old_entry + def is_python(text, filename=''): "Is this string a valid Python script?" try: From a82811aa0b9d0d74b546439ff740ce63403f1b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Thu, 8 May 2014 21:24:35 +0200 Subject: [PATCH 4064/8469] remove quick-fix comment for the solution to issue #169. Although the original problematic use case when we are replacing a zipped egg distribution with another zipped egg distribution is now cleanly handled by fixing all existing zipimport.zipimporter loaders, this fix is still valid for cases when replacing a distribution with a non-zipped egg folder. --HG-- extra : source : efd6a8b82bafdbcfad1971b7e0f470e19191be1a --- setuptools/command/easy_install.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0b282d47b3..0bce4ab957 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -646,13 +646,6 @@ def select_scheme(self, name): def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) - # First remove the dist from self.local_index, to avoid problems using - # old cached data in case its underlying file has been replaced. - # - # This is a quick-fix for a zipimporter caching issue in case the dist - # has been implemented as and already loaded from a zip file that got - # replaced later on. For more detailed information see setuptools issue - # #168 at 'http://bitbucket.org/pypa/setuptools/issue/168'. if dist in self.local_index[dist.key]: self.local_index.remove(dist) self.local_index.add(dist) From 8cbbd8e2876d95e3f338a5342e2f11c42e780768 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 May 2014 13:20:28 -0400 Subject: [PATCH 4065/8469] Clean up style in distutils upload command --- command/upload.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/command/upload.py b/command/upload.py index d6762e46fd..4882db428f 100644 --- a/command/upload.py +++ b/command/upload.py @@ -1,18 +1,21 @@ -"""distutils.command.upload +""" +distutils.command.upload -Implements the Distutils 'upload' subcommand (upload package to PyPI).""" +Implements the Distutils 'upload' subcommand (upload package to a package +index). +""" -from distutils.errors import * -from distutils.core import PyPIRCCommand -from distutils.spawn import spawn -from distutils import log import sys -import os, io -import socket +import os +import io import platform from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError from urllib.parse import urlparse +from distutils.errors import * +from distutils.core import PyPIRCCommand +from distutils.spawn import spawn +from distutils import log # this keeps compatibility for 2.3 and 2.4 if sys.version < "2.5": @@ -106,7 +109,7 @@ def upload_file(self, command, pyversion, filename): 'md5_digest': md5(content).hexdigest(), # additional meta-data - 'metadata_version' : '1.0', + 'metadata_version': '1.0', 'summary': meta.get_description(), 'home_page': meta.get_url(), 'author': meta.get_contact(), @@ -167,13 +170,15 @@ def upload_file(self, command, pyversion, filename): body.write(b"\n") body = body.getvalue() - self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) + msg = "Submitting %s to %s" % (filename, self.repository) + self.announce(msg, log.INFO) # build the Request - headers = {'Content-type': - 'multipart/form-data; boundary=%s' % boundary, - 'Content-length': str(len(body)), - 'Authorization': auth} + headers = { + 'Content-type': 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth, + } request = Request(self.repository, data=body, headers=headers) From 0983f9dd893c03aabbaa826bf9c644a88b67a5b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 May 2014 13:21:02 -0400 Subject: [PATCH 4066/8469] Replace import * with explicit import --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 4882db428f..7824466605 100644 --- a/command/upload.py +++ b/command/upload.py @@ -12,7 +12,7 @@ from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError from urllib.parse import urlparse -from distutils.errors import * +from distutils.errors import DistutilsOptionError from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log From 5eb3849be5200231ac49e5b2c6b58ae63f1ed023 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 May 2014 13:22:43 -0400 Subject: [PATCH 4067/8469] Drop support for Python 2.4 in upload command. --- command/upload.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/command/upload.py b/command/upload.py index 7824466605..75498b14d5 100644 --- a/command/upload.py +++ b/command/upload.py @@ -5,10 +5,10 @@ index). """ -import sys import os import io import platform +import hashlib from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError from urllib.parse import urlparse @@ -17,12 +17,6 @@ from distutils.spawn import spawn from distutils import log -# this keeps compatibility for 2.3 and 2.4 -if sys.version < "2.5": - from md5 import md5 -else: - from hashlib import md5 - class upload(PyPIRCCommand): description = "upload binary package to PyPI" @@ -106,7 +100,7 @@ def upload_file(self, command, pyversion, filename): 'content': (os.path.basename(filename),content), 'filetype': command, 'pyversion': pyversion, - 'md5_digest': md5(content).hexdigest(), + 'md5_digest': hashlib.md5(content).hexdigest(), # additional meta-data 'metadata_version': '1.0', From 41140cfe90c79dcb3ac74486c192e435c0bd1c09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 May 2014 13:24:18 -0400 Subject: [PATCH 4068/8469] Replace overly-aggressive comparison for type equality with an isinstance check. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 75498b14d5..c279b591c4 100644 --- a/command/upload.py +++ b/command/upload.py @@ -146,7 +146,7 @@ def upload_file(self, command, pyversion, filename): for key, value in data.items(): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name - if type(value) != type([]): + if not isinstance(value, list): value = [value] for value in value: if type(value) is tuple: From b160cdaa13bd69e006afee3763d05cf4d1fc6441 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 May 2014 13:24:58 -0400 Subject: [PATCH 4069/8469] Reindent long line --- command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index c279b591c4..b906435203 100644 --- a/command/upload.py +++ b/command/upload.py @@ -57,7 +57,8 @@ def finalize_options(self): def run(self): if not self.distribution.dist_files: - raise DistutilsOptionError("No dist file created in earlier command") + msg = "No dist file created in earlier command" + raise DistutilsOptionError(msg) for command, pyversion, filename in self.distribution.dist_files: self.upload_file(command, pyversion, filename) From 846b29f32fb8bbeda4d4a06a4da35bebc3f41cbb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:00:56 +0100 Subject: [PATCH 4070/8469] Bumped to 3.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1f2468f927..a78067fe54 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.7" +DEFAULT_VERSION = "3.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 94bcfb0106..b413618966 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.7' +__version__ = '3.8' From 40232ffa1983be8149a68cb969f28b92200204b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Mon, 12 May 2014 18:57:50 +0200 Subject: [PATCH 4071/8469] generalize fix for issue #197 from 1cd816bb7c933eecd9d8464e054b21c7d5daf2df Now the same fix gets applied for Python versions [3.0 - 3.2.2> instead of just 3.1. The underlying distutils issue affected all those vesions and has been fixed in the Python 3.2.2 release. --HG-- extra : rebase_source : fe4dc458edbf83e13b275e02fb90939d9061e206 --- setuptools/dist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index b8bd7490fb..69e0409930 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -34,11 +34,11 @@ def _get_unpatched(cls): def _patch_distribution_metadata_write_pkg_info(): """ - Workaround issue #197 - Python 3.1 uses an environment-local encoding to - save the pkg_info. Monkey-patch its write_pkg_info method to correct - this undesirable behavior. + Workaround issue #197 - Python [3.0 - 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. """ - if sys.version_info[:2] != (3,1): + if not ((3,) <= sys.version_info[:3] < (3, 2, 2)): return # from Python 3.4 From 337ce0deb26c4fa72b083001428f0ba1d456c0a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 21:35:24 -0400 Subject: [PATCH 4072/8469] Backed out changeset: 1ceaffff2d9b (restoring b0a2fcc5275a). Ref #193 --HG-- extra : rebase_source : 5ca0514bbe3ec025094ea8f39921722d0ab3dd05 --- setuptools/command/egg_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 2097f2a91c..3a26f20162 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -303,8 +303,7 @@ def write_file(filename, contents): sequence of strings without line terminators) to it. """ contents = "\n".join(contents) - if sys.version_info >= (3,): - contents = contents.encode("utf-8") + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() From 16cffb5544e37d9f30ce0b5f485fefb991633d1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:26:19 -0400 Subject: [PATCH 4073/8469] Clean up docstring --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4f5c969483..c9d4d82e82 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -252,8 +252,8 @@ def run(self): self.write_manifest() def write_manifest(self): - """Write the file list in 'self.filelist' (presumably as filled in - by 'add_defaults()' and 'read_template()') to the manifest file + """ + Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. """ # The manifest must be UTF-8 encodable. See #303. From c442269b78d994fb061afddc7a1314d96f91d487 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:33:46 -0400 Subject: [PATCH 4074/8469] This code path doesn't make sense. If the UnicodeEncodeError occurred above, it will occur here too. --- setuptools/command/egg_info.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index c9d4d82e82..ed8e458a37 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -214,10 +214,6 @@ def append(self, item): if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) except UnicodeEncodeError: - # Accept UTF-8 filenames even if LANG=C - if os.path.exists(path.encode('utf-8')): - self.files.append(path) - else: log.warn("'%s' not %s encodable -- skipping", path, sys.getfilesystemencoding()) else: From 83658a39f37a2ece19b1f7409edc11a1bdd9cce3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:34:00 -0400 Subject: [PATCH 4075/8469] Reindent --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index ed8e458a37..f6347af9a1 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -214,8 +214,8 @@ def append(self, item): if os.path.exists(path) or os.path.exists(path.encode('utf-8')): self.files.append(path) except UnicodeEncodeError: - log.warn("'%s' not %s encodable -- skipping", path, - sys.getfilesystemencoding()) + log.warn("'%s' not %s encodable -- skipping", path, + sys.getfilesystemencoding()) else: if os.path.exists(path): self.files.append(path) From 836f7004959909767640822caee8ad3af26a938d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:39:17 -0400 Subject: [PATCH 4076/8469] Extend docstring for test_write_manifest_skips_non_utf8_filenames --- setuptools/tests/test_sdist.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 71d10757bc..10042a44b2 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -204,7 +204,12 @@ def test_write_manifest_allows_utf8_filenames(self): self.assertTrue(u_filename in mm.filelist.files) def test_write_manifest_skips_non_utf8_filenames(self): - # Test for #303. + """ + Files that cannot be encoded to UTF-8 (specifically, those that + weren't originally successfully decoded and have surrogate + escapes) should be omitted from the manifest. + See https://bitbucket.org/tarek/distribute/issue/303 for history. + """ dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' mm = manifest_maker(dist) From 2c63bb2e7c3dd6e27836630cec051e9d10891723 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:40:37 -0400 Subject: [PATCH 4077/8469] Test should use the same high-level interface for appending filenames as the object itself will use when building the filelist. Ideally, FileList wouldn't expose this attribute at all. --- setuptools/tests/test_sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 10042a44b2..ec940d00a2 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -224,7 +224,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): try: mm.run() u_filename = filename.decode('utf-8', 'surrogateescape') - mm.filelist.files.append(u_filename) + mm.filelist.append(u_filename) # Re-write manifest mm.write_manifest() finally: From c8c9b75cbb82654b463d3175430900f58ba951ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 May 2014 23:43:19 -0400 Subject: [PATCH 4078/8469] FileList.append already excludes files that are not UTF-8 encodable, so rely on it when building the manifest. Ref #193 --- setuptools/command/egg_info.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index f6347af9a1..0175bbaae7 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -252,21 +252,8 @@ def write_manifest(self): Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. """ - # The manifest must be UTF-8 encodable. See #303. - if sys.version_info >= (3,): - files = [] - for file in self.filelist.files: - try: - file.encode("utf-8") - except UnicodeEncodeError: - log.warn("'%s' not UTF-8 encodable -- skipping" % file) - else: - files.append(file) - self.filelist.files = files - - files = self.filelist.files if os.sep!='/': - files = [f.replace(os.sep,'/') for f in files] + files = [f.replace(os.sep,'/') for f in self.filelist.files] self.execute(write_file, (self.manifest, files), "writing manifest file '%s'" % self.manifest) From 4ba4909fe29c82db4a5db4bab2c0de2e6e0b1d10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:14:24 -0400 Subject: [PATCH 4079/8469] Fix failure on non-Windows systems --- setuptools/command/egg_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 0175bbaae7..ad3f4c1719 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -252,8 +252,7 @@ def write_manifest(self): Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. """ - if os.sep!='/': - files = [f.replace(os.sep,'/') for f in self.filelist.files] + files = [f.replace(os.sep, '/') for f in self.filelist.files] self.execute(write_file, (self.manifest, files), "writing manifest file '%s'" % self.manifest) From 592c525ea6ae94f6d5434e25f6db1bb8f8ff73c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:15:06 -0400 Subject: [PATCH 4080/8469] Reindent --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index ad3f4c1719..00a50d0b9d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -253,8 +253,8 @@ def write_manifest(self): named by 'self.manifest'. """ files = [f.replace(os.sep, '/') for f in self.filelist.files] - self.execute(write_file, (self.manifest, files), - "writing manifest file '%s'" % self.manifest) + msg = "writing manifest file '%s'" % self.manifest + self.execute(write_file, (self.manifest, files), msg) def warn(self, msg): # suppress missing-file warnings from sdist if not msg.startswith("standard file not found:"): From fb2038bb99b46b8ec92ad046b79d21c182e718a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:28:45 -0400 Subject: [PATCH 4081/8469] Extract _safe_path --- setuptools/command/egg_info.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 00a50d0b9d..88027dd09d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -209,17 +209,20 @@ def append(self, item): item = item[:-1] path = convert_path(item) + if self._safe_path(path): + self.files.append(path) + + def _safe_path(self, path): if sys.version_info >= (3,): try: if os.path.exists(path) or os.path.exists(path.encode('utf-8')): - self.files.append(path) + return True except UnicodeEncodeError: log.warn("'%s' not %s encodable -- skipping", path, sys.getfilesystemencoding()) else: if os.path.exists(path): - self.files.append(path) - + return True class manifest_maker(sdist): From a35ca3bb2f7e025270a7b305c133b57f917e0ef2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:29:36 -0400 Subject: [PATCH 4082/8469] Use compat for Python 3 detection --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 88027dd09d..50c2096a2a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -10,7 +10,7 @@ import distutils.errors from distutils import log from setuptools.command.sdist import sdist -from setuptools.compat import basestring +from setuptools.compat import basestring, PY3 from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList @@ -213,7 +213,7 @@ def append(self, item): self.files.append(path) def _safe_path(self, path): - if sys.version_info >= (3,): + if PY3: try: if os.path.exists(path) or os.path.exists(path.encode('utf-8')): return True From 9d5d875b2ba0414eeef36aa135621cb214abe463 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:33:29 -0400 Subject: [PATCH 4083/8469] Move Python 3 code to the body of the function --- setuptools/command/egg_info.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 50c2096a2a..bb832ea602 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -213,16 +213,15 @@ def append(self, item): self.files.append(path) def _safe_path(self, path): - if PY3: - try: - if os.path.exists(path) or os.path.exists(path.encode('utf-8')): - return True - except UnicodeEncodeError: - log.warn("'%s' not %s encodable -- skipping", path, - sys.getfilesystemencoding()) - else: - if os.path.exists(path): + if not PY3: + return os.path.exists(path) + + try: + if os.path.exists(path) or os.path.exists(path.encode('utf-8')): return True + except UnicodeEncodeError: + log.warn("'%s' not %s encodable -- skipping", path, + sys.getfilesystemencoding()) class manifest_maker(sdist): From afa18c94fe1ae79db2542af2cc056e31998400d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 00:35:56 -0400 Subject: [PATCH 4084/8469] Also override extend to check paths for safety. --- setuptools/command/egg_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index bb832ea602..a2f4d4445b 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -212,6 +212,9 @@ def append(self, item): if self._safe_path(path): self.files.append(path) + def extend(self, paths): + self.files.extend(filter(self._safe_path, paths)) + def _safe_path(self, path): if not PY3: return os.path.exists(path) From 98252c9624c564444307544bf77c7aa3828aa024 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 May 2014 09:05:37 -0400 Subject: [PATCH 4085/8469] Add a _repair method to repair the FileList after unsafe entries have been added. --- setuptools/command/egg_info.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a2f4d4445b..2097f2a91c 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -215,6 +215,16 @@ def append(self, item): def extend(self, paths): self.files.extend(filter(self._safe_path, paths)) + def _repair(self): + """ + Replace self.files with only safe paths + + Because some owners of FileList manipulate the underlying + ``files`` attribute directly, this method must be called to + repair those paths. + """ + self.files = list(filter(self._safe_path, self.files)) + def _safe_path(self, path): if not PY3: return os.path.exists(path) @@ -257,6 +267,8 @@ def write_manifest(self): Write the file list in 'self.filelist' to the manifest file named by 'self.manifest'. """ + self.filelist._repair() + files = [f.replace(os.sep, '/') for f in self.filelist.files] msg = "writing manifest file '%s'" % self.manifest self.execute(write_file, (self.manifest, files), msg) From 3f4f5b3b4432203163258083f9e29b75d2aaedc4 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 02:30:28 -0500 Subject: [PATCH 4086/8469] Merge in test changes from previous try --HG-- extra : rebase_source : 0dba3308549833dc7fc5b242e8ae3a4ec9f3c119 --- setuptools/tests/test_sdist.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index ec940d00a2..ada861897d 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -156,10 +156,11 @@ def test_manifest_is_written_with_utf8_encoding(self): self.fail(e) # The manifest should contain the UTF-8 filename - if sys.version_info >= (3,): - self.assertTrue(posix(filename) in u_contents) - else: - self.assertTrue(posix(filename) in contents) + if sys.version_info < (3,): + fs_enc = sys.getfilesystemencoding() + filename = filename.decode(fs_enc) + + self.assertTrue(posix(filename) in u_contents) # Python 3 only if sys.version_info >= (3,): @@ -401,10 +402,17 @@ def test_sdist_with_latin1_encoded_filename(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) else: - # No conversion takes place under Python 2 and the file - # is included. We shall keep it that way for BBB. - self.assertTrue(filename in cmd.filelist.files) - + # Under Python 2 there seems to be no decoded string in the + # filelist. However, due to decode and encoding of the + # file name to get utf-8 Manifest the latin1 maybe excluded + try: + # fs_enc should match how one is expect the decoding to + # be proformed for the manifest output. + fs_enc = sys.getfilesystemencoding() + filename.decode(fs_enc) + self.assertTrue(filename in cmd.filelist.files) + except UnicodeDecodeError: + self.assertFalse(filename in cmd.filelist.files) class TestDummyOutput(environment.ZippedEnvironment): From 60a42fcd2ae461bac7bbe93af92a9d7e0d13b746 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 02:40:07 -0500 Subject: [PATCH 4087/8469] with_statements and output utf-8 output *Since py2.5 has been dropped, we can use future imports to make use of with statements. *End goal was to always decode to utf-8 in write_file on 307 --HG-- extra : rebase_source : 502ea7128f4e3b843b16c6d64d6d0b2ac56ce87d --- setuptools/command/egg_info.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 2097f2a91c..1eca04ad7e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -1,6 +1,7 @@ """setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" +from __future__ import with_statement import os import re @@ -10,7 +11,7 @@ import distutils.errors from distutils import log from setuptools.command.sdist import sdist -from setuptools.compat import basestring, PY3 +from setuptools.compat import basestring, PY3, unicode from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList @@ -303,11 +304,13 @@ def write_file(filename, contents): sequence of strings without line terminators) to it. """ contents = "\n".join(contents) - if sys.version_info >= (3,): - contents = contents.encode("utf-8") - f = open(filename, "wb") # always write POSIX-style manifest - f.write(contents) - f.close() + + #assuming the contents has been vetted for utf-8 encoding + contents = contents.encode("utf-8") + + with open(filename, "wb") as f: # always write POSIX-style manifest + f.write(contents) + def write_pkg_info(cmd, basename, filename): log.info("writing %s", filename) From 1718b94353733bb79043a7c6d80efeba8bd0c8d1 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 04:14:19 -0500 Subject: [PATCH 4088/8469] Starting a unicode_utils module. --HG-- extra : source : 2e47fa11a272ed61f7c1bbf88aae27e81040fe93 --- setuptools/unicode_utils.py | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 setuptools/unicode_utils.py diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py new file mode 100644 index 0000000000..d2de941a69 --- /dev/null +++ b/setuptools/unicode_utils.py @@ -0,0 +1,41 @@ +import unicodedata +import sys +from setuptools.compat import unicode as decoded_string + + +# HFS Plus uses decomposed UTF-8 +def decompose(path): + if isinstance(path, decoded_string): + return unicodedata.normalize('NFD', path) + try: + path = path.decode('utf-8') + path = unicodedata.normalize('NFD', path) + path = path.encode('utf-8') + except UnicodeError: + pass # Not UTF-8 + return path + + +def filesys_decode(path): + """ + Ensure that the given path is decoded, + NONE when no expected encoding works + """ + + fs_enc = sys.getfilesystemencoding() + if isinstance(path, decoded_string): + return path + + for enc in (fs_enc, "utf-8"): + try: + return path.decode(enc) + except UnicodeDecodeError: + continue + + +def try_encode(string, enc): + "turn unicode encoding into a functional routine" + try: + return string.encode(enc) + except UnicodeEncodeError: + return None From cade48d7d2751fe69d81957963f0a12d1606c9f6 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 04:15:55 -0500 Subject: [PATCH 4089/8469] In corporate the old unicode with the spirit of what the FileList updating. --HG-- extra : source : 199c917b8a0be209144878872269c3bd08936d6a --- setuptools/command/egg_info.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1eca04ad7e..33fe147e9f 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -18,6 +18,7 @@ from pkg_resources import (parse_requirements, safe_name, parse_version, safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) from setuptools.command.sdist import walk_revctrl +import setuptools.unicode_utils as unicode_utils class egg_info(Command): @@ -227,15 +228,28 @@ def _repair(self): self.files = list(filter(self._safe_path, self.files)) def _safe_path(self, path): - if not PY3: - return os.path.exists(path) + enc_warn = "'%s' not %s encodable -- skipping" + + #To avoid accidental trans-codings errors, first to unicode + u_path = unicode_utils.filesys_decode(path) + if u_path is None: + log.warn("'%s' in unexpected encoding -- skipping" % path) + return False + + #Must ensure utf-8 encodability + utf8_path = unicode_utils.try_encode(u_path, "utf-8") + if utf8_path is None: + log.warn(enc_warn, path, 'utf-8') + return False try: - if os.path.exists(path) or os.path.exists(path.encode('utf-8')): + #accept is either way checks out + if os.path.exists(u_path) or os.path.exists(utf8_path): return True + #this will catch any encode errors decoding u_path except UnicodeEncodeError: - log.warn("'%s' not %s encodable -- skipping", path, - sys.getfilesystemencoding()) + log.warn(enc_warn, path, sys.getfilesystemencoding()) + class manifest_maker(sdist): @@ -263,6 +277,10 @@ def run(self): self.filelist.remove_duplicates() self.write_manifest() + def _manifest_normalize(self, path): + path = unicode_utils.filesys_decode(path) + return path.replace(os.sep, '/') + def write_manifest(self): """ Write the file list in 'self.filelist' to the manifest file @@ -270,7 +288,8 @@ def write_manifest(self): """ self.filelist._repair() - files = [f.replace(os.sep, '/') for f in self.filelist.files] + #Now _repairs should encodability, but not unicode + files = [self._manifest_normalize(f) for f in self.filelist.files] msg = "writing manifest file '%s'" % self.manifest self.execute(write_file, (self.manifest, files), msg) From 3d6068d5f67f044b2e37711b6275d58915e41895 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:09:26 -0400 Subject: [PATCH 4090/8469] with_statement is available naturally in Python 2.6 --- setuptools.egg-info/requires.txt | 8 ++++---- setuptools/command/egg_info.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index e5db30adfb..a49a923ef5 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.2 - [certs] -certifi==1.0.1 \ No newline at end of file +certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 33fe147e9f..22501c442b 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -1,7 +1,6 @@ """setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" -from __future__ import with_statement import os import re @@ -238,7 +237,7 @@ def _safe_path(self, path): #Must ensure utf-8 encodability utf8_path = unicode_utils.try_encode(u_path, "utf-8") - if utf8_path is None: + if utf8_path is None: log.warn(enc_warn, path, 'utf-8') return False @@ -326,7 +325,7 @@ def write_file(filename, contents): #assuming the contents has been vetted for utf-8 encoding contents = contents.encode("utf-8") - + with open(filename, "wb") as f: # always write POSIX-style manifest f.write(contents) From 86ecb2c3ff6b8df273e153bc06d320472ce262c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:13:19 -0400 Subject: [PATCH 4091/8469] Compute PY3 directly and switch on that for clarity. --- setuptools/compat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 7b824ba2ff..ec77127d93 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -1,9 +1,9 @@ import sys import itertools -if sys.version_info[0] < 3: - PY3 = False +PY3 = sys.version_info >= (3,) +if not PY3: basestring = basestring import __builtin__ as builtins import ConfigParser @@ -34,9 +34,8 @@ exec("""def reraise(tp, value, tb=None): raise tp, value, tb""") -else: - PY3 = True +if PY3: basestring = str import builtins import configparser as ConfigParser From 3c85da71f22c43041e7475b01b4683f22fc3a618 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:14:46 -0400 Subject: [PATCH 4092/8469] Add a PY2 also. --- setuptools/compat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index ec77127d93..7397d7fa17 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -2,8 +2,9 @@ import itertools PY3 = sys.version_info >= (3,) +PY2 = not PY3 -if not PY3: +if PY2: basestring = basestring import __builtin__ as builtins import ConfigParser From 8567ca65adbf927a0af5c9b7314688dfbc46ab66 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:25:31 -0400 Subject: [PATCH 4093/8469] Use PY3 and PY2 throughout --- setuptools/command/develop.py | 8 +++++--- setuptools/command/easy_install.py | 10 +++++----- setuptools/command/egg_info.py | 2 +- setuptools/command/sdist.py | 3 ++- setuptools/command/test.py | 9 ++++----- setuptools/dist.py | 4 ++-- setuptools/svn_utils.py | 18 +++++++++--------- setuptools/tests/test_resources.py | 5 ++--- setuptools/tests/test_sdist.py | 24 ++++++++++++------------ setuptools/tests/test_test.py | 4 ++-- 10 files changed, 44 insertions(+), 43 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 1d500040d0..129184cad0 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,6 +5,8 @@ from distutils.errors import DistutilsError, DistutilsOptionError import os, sys, setuptools, glob +from setuptools.compat import PY3 + class develop(easy_install): """Set up package for development""" @@ -84,7 +86,7 @@ def finalize_options(self): " installation directory", p, normalize_path(os.curdir)) def install_for_development(self): - if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): + if PY3 and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date @@ -99,7 +101,7 @@ def install_for_development(self): self.reinitialize_command('build_ext', inplace=0) self.run_command('build_ext') - + # Fixup egg-link and easy-install.pth ei_cmd = self.get_finalized_command("egg_info") self.egg_path = build_path @@ -112,7 +114,7 @@ def install_for_development(self): # Build extensions in-place self.reinitialize_command('build_ext', inplace=1) self.run_command('build_ext') - + self.install_site_py() # ensure that target dir is site-safe if setuptools.bootstrap_install_from: self.easy_install(setuptools.bootstrap_install_from) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a5f324e3dd..ad7f472512 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -47,7 +47,7 @@ from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info from setuptools.compat import (iteritems, maxsize, basestring, unicode, - reraise) + reraise, PY2, PY3) from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, get_distribution, find_distributions, Environment, Requirement, @@ -75,7 +75,7 @@ def samefile(p1, p2): norm_p2 = os.path.normpath(os.path.normcase(p2)) return norm_p1 == norm_p2 -if sys.version_info <= (3,): +if PY2: def _to_ascii(s): return s def isascii(s): @@ -1187,7 +1187,7 @@ def install_site_py(self): f = open(sitepy,'rb') current = f.read() # we want str, not bytes - if sys.version_info >= (3,): + if PY3: current = current.decode() f.close() @@ -1409,7 +1409,7 @@ def get_exe_prefixes(exe_filename): continue if parts[0].upper() in ('PURELIB','PLATLIB'): contents = z.read(name) - if sys.version_info >= (3,): + if PY3: contents = contents.decode() for pth in yield_lines(contents): pth = pth.strip().replace('\\','/') @@ -1855,7 +1855,7 @@ def get_win_launcher(type): def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') - if sys.version_info[0] < 3: + if PY2: return manifest % vars() else: return manifest.decode('utf-8') % vars() diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 22501c442b..646f94607a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -128,7 +128,7 @@ def write_file(self, what, filename, data): to the file. """ log.info("writing %s to %s", what, filename) - if sys.version_info >= (3,): + if PY3: data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 948d27fafb..f9a5b7b919 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -8,6 +8,7 @@ from distutils.util import convert_path from distutils import log from setuptools import svn_utils +from setuptools.compat import PY3 READMES = ('README', 'README.rst', 'README.txt') @@ -230,7 +231,7 @@ def read_manifest(self): manifest = open(self.manifest, 'rbU') for line in manifest: # The manifest must contain UTF-8. See #303. - if sys.version_info >= (3,): + if PY3: try: line = line.decode('UTF-8') except UnicodeDecodeError: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 7422b71907..3c3581a9a7 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -8,6 +8,7 @@ normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint) +from setuptools.compat import PY3 from setuptools.py31compat import unittest_main @@ -87,10 +88,8 @@ def finalize_options(self): self.test_runner = getattr(self.distribution, 'test_runner', None) def with_project_on_sys_path(self, func): - with_2to3 = ( - sys.version_info >= (3,) - and getattr(self.distribution, 'use_2to3', False) - ) + with_2to3 = PY3 and getattr(self.distribution, 'use_2to3', False) + if with_2to3: # If we run 2to3 we can not do this inplace: @@ -149,7 +148,7 @@ def run_tests(self): # Purge modules under test from sys.modules. The test loader will # re-import them from the build location. Required when 2to3 is used # with namespace packages. - if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): + if PY3 and getattr(self.distribution, 'use_2to3', False): module = self.test_args[-1].split('.')[0] if module in _namespace_packages: del_modules = [] diff --git a/setuptools/dist.py b/setuptools/dist.py index 59a892362c..b8bd7490fb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -13,7 +13,7 @@ DistutilsSetupError) from setuptools.depends import Require -from setuptools.compat import numeric_types, basestring +from setuptools.compat import numeric_types, basestring, PY2 import pkg_resources def _get_unpatched(cls): @@ -629,7 +629,7 @@ def handle_display_options(self, option_order): """ import sys - if sys.version_info < (3,) or self.help_commands: + if PY2 or self.help_commands: return _Distribution.handle_display_options(self, option_order) # Stdout may be StringIO (e.g. in tests) diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 8fc552fa73..2dcfd89913 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -8,7 +8,7 @@ import codecs import unicodedata import warnings -from setuptools.compat import unicode +from setuptools.compat import unicode, PY2 from setuptools.py31compat import TemporaryDirectory from xml.sax.saxutils import unescape @@ -60,7 +60,7 @@ def _get_target_property(target): def _get_xml_data(decoded_str): - if sys.version_info < (3, 0): + if PY2: #old versions want an encoded string data = decoded_str.encode('utf-8') else: @@ -180,12 +180,12 @@ def parse_external_prop(lines): if not line: continue - if sys.version_info < (3, 0): + if PY2: #shlex handles NULLs just fine and shlex in 2.7 tries to encode #as ascii automatiically line = line.encode('utf-8') line = shlex.split(line) - if sys.version_info < (3, 0): + if PY2: line = [x.decode('utf-8') for x in line] #EXT_FOLDERNAME is either the first or last depending on where @@ -232,13 +232,13 @@ class SvnInfo(object): @staticmethod def get_svn_version(): # Temp config directory should be enough to check for repository - # This is needed because .svn always creates .subversion and + # This is needed because .svn always creates .subversion and # some operating systems do not handle dot directory correctly. # Real queries in real svn repos with be concerned with it creation with TemporaryDirectory() as tempdir: - code, data = _run_command(['svn', + code, data = _run_command(['svn', '--config-dir', tempdir, - '--version', + '--version', '--quiet']) if code == 0 and data: @@ -258,11 +258,11 @@ def load(cls, dirname=''): normdir = os.path.normpath(dirname) # Temp config directory should be enough to check for repository - # This is needed because .svn always creates .subversion and + # This is needed because .svn always creates .subversion and # some operating systems do not handle dot directory correctly. # Real queries in real svn repos with be concerned with it creation with TemporaryDirectory() as tempdir: - code, data = _run_command(['svn', + code, data = _run_command(['svn', '--config-dir', tempdir, 'info', normdir]) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index c9fcf76c9b..443905cc24 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -15,7 +15,7 @@ from setuptools.command.easy_install import (get_script_header, is_sh, nt_quote_arg) -from setuptools.compat import StringIO, iteritems +from setuptools.compat import StringIO, iteritems, PY3 try: frozenset @@ -522,8 +522,7 @@ def test_get_script_header(self): def test_get_script_header_jython_workaround(self): # This test doesn't work with Python 3 in some locales - if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE") - in (None, "C", "POSIX")): + if PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): return class java: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index ada861897d..231b40d07c 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -12,7 +12,7 @@ from setuptools.tests import environment, test_svn from setuptools.tests.py26compat import skipIf -from setuptools.compat import StringIO, unicode +from setuptools.compat import StringIO, unicode, PY3, PY2 from setuptools.tests.py26compat import skipIf from setuptools.command.sdist import sdist, walk_revctrl from setuptools.command.egg_info import manifest_maker @@ -34,7 +34,7 @@ """ % SETUP_ATTRS -if sys.version_info >= (3,): +if PY3: LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1') else: LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' @@ -52,14 +52,14 @@ def unquiet(): # Fake byte literals for Python <= 2.5 def b(s, encoding='utf-8'): - if sys.version_info >= (3,): + if PY3: return s.encode(encoding) return s # Convert to POSIX path def posix(path): - if sys.version_info >= (3,) and not isinstance(path, str): + if PY3 and not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b('/')) else: return path.replace(os.sep, '/') @@ -156,14 +156,14 @@ def test_manifest_is_written_with_utf8_encoding(self): self.fail(e) # The manifest should contain the UTF-8 filename - if sys.version_info < (3,): + if PY2: fs_enc = sys.getfilesystemencoding() filename = filename.decode(fs_enc) self.assertTrue(posix(filename) in u_contents) # Python 3 only - if sys.version_info >= (3,): + if PY3: def test_write_manifest_allows_utf8_filenames(self): # Test for #303. @@ -281,12 +281,12 @@ def test_manifest_is_read_with_utf8_encoding(self): unquiet() # The filelist should contain the UTF-8 filename - if sys.version_info >= (3,): + if PY3: filename = filename.decode('utf-8') self.assertTrue(filename in cmd.filelist.files) # Python 3 only - if sys.version_info >= (3,): + if PY3: def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. @@ -328,7 +328,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) - @skipIf(sys.version_info >= (3,) and locale.getpreferredencoding() != 'UTF-8', + @skipIf(PY3 and locale.getpreferredencoding() != 'UTF-8', 'Unittest fails if locale is not utf-8 but the manifests is recorded correctly') def test_sdist_with_utf8_encoded_filename(self): # Test for #303. @@ -350,7 +350,7 @@ def test_sdist_with_utf8_encoded_filename(self): if sys.platform == 'darwin': filename = decompose(filename) - if sys.version_info >= (3,): + if PY3: fs_enc = sys.getfilesystemencoding() if sys.platform == 'win32': @@ -385,7 +385,7 @@ def test_sdist_with_latin1_encoded_filename(self): finally: unquiet() - if sys.version_info >= (3,): + if PY3: #not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': # Latin-1 is similar to Windows-1252 however @@ -408,7 +408,7 @@ def test_sdist_with_latin1_encoded_filename(self): try: # fs_enc should match how one is expect the decoding to # be proformed for the manifest output. - fs_enc = sys.getfilesystemencoding() + fs_enc = sys.getfilesystemencoding() filename.decode(fs_enc) self.assertTrue(filename in cmd.filelist.files) except UnicodeDecodeError: diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index f85123b05e..df92085e5d 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -10,7 +10,7 @@ import unittest from distutils.errors import DistutilsError -from setuptools.compat import StringIO +from setuptools.compat import StringIO, PY2 from setuptools.command.test import test from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -34,7 +34,7 @@ __path__ = extend_path(__path__, __name__) """ # Make sure this is Latin-1 binary, before writing: -if sys.version_info < (3,): +if PY2: NS_INIT = NS_INIT.decode('UTF-8') NS_INIT = NS_INIT.encode('Latin-1') From cac29acff1a8b95f3d11f8bca8015d5e7c67036a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:38:16 -0400 Subject: [PATCH 4094/8469] Convert quiet to a context manager, so its comment is no longer complaining and to simplify the code. --- setuptools/tests/test_sdist.py | 61 +++++++++------------------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 231b40d07c..93b8c2977e 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,6 +9,7 @@ import unittest import unicodedata import re +import contextlib from setuptools.tests import environment, test_svn from setuptools.tests.py26compat import skipIf @@ -41,13 +42,14 @@ # Cannot use context manager because of Python 2.4 +@contextlib.contextmanager def quiet(): - global old_stdout, old_stderr old_stdout, old_stderr = sys.stdout, sys.stderr sys.stdout, sys.stderr = StringIO(), StringIO() - -def unquiet(): - sys.stdout, sys.stderr = old_stdout, old_stderr + try: + yield + finally: + sys.stdout, sys.stderr = old_stdout, old_stderr # Fake byte literals for Python <= 2.5 @@ -112,12 +114,8 @@ def test_package_data_in_sdist(self): cmd = sdist(dist) cmd.ensure_finalized() - # squelch output - quiet() - try: + with quiet(): cmd.run() - finally: - unquiet() manifest = cmd.filelist.files self.assertTrue(os.path.join('sdist_test', 'a.txt') in manifest) @@ -136,13 +134,10 @@ def test_manifest_is_written_with_utf8_encoding(self): filename = os.path.join('sdist_test', 'smörbröd.py') # Add UTF-8 filename and write manifest - quiet() - try: + with quiet(): mm.run() mm.filelist.files.append(filename) mm.write_manifest() - finally: - unquiet() manifest = open(mm.manifest, 'rbU') contents = manifest.read() @@ -177,15 +172,12 @@ def test_write_manifest_allows_utf8_filenames(self): filename = os.path.join(b('sdist_test'), b('smörbröd.py')) # Add filename and write manifest - quiet() - try: + with quiet(): mm.run() u_filename = filename.decode('utf-8') mm.filelist.files.append(u_filename) # Re-write manifest mm.write_manifest() - finally: - unquiet() manifest = open(mm.manifest, 'rbU') contents = manifest.read() @@ -221,15 +213,12 @@ def test_write_manifest_skips_non_utf8_filenames(self): filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) # Add filename with surrogates and write manifest - quiet() - try: + with quiet(): mm.run() u_filename = filename.decode('utf-8', 'surrogateescape') mm.filelist.append(u_filename) # Re-write manifest mm.write_manifest() - finally: - unquiet() manifest = open(mm.manifest, 'rbU') contents = manifest.read() @@ -256,11 +245,8 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.ensure_finalized() # Create manifest - quiet() - try: + with quiet(): cmd.run() - finally: - unquiet() # Add UTF-8 filename to manifest filename = os.path.join(b('sdist_test'), b('smörbröd.py')) @@ -274,11 +260,8 @@ def test_manifest_is_read_with_utf8_encoding(self): # Re-read manifest cmd.filelist.files = [] - quiet() - try: + with quiet(): cmd.read_manifest() - finally: - unquiet() # The filelist should contain the UTF-8 filename if PY3: @@ -296,11 +279,8 @@ def test_read_manifest_skips_non_utf8_filenames(self): cmd.ensure_finalized() # Create manifest - quiet() - try: + with quiet(): cmd.run() - finally: - unquiet() # Add Latin-1 filename to manifest filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) @@ -314,15 +294,12 @@ def test_read_manifest_skips_non_utf8_filenames(self): # Re-read manifest cmd.filelist.files = [] - quiet() - try: + with quiet(): try: cmd.read_manifest() except UnicodeDecodeError: e = sys.exc_info()[1] self.fail(e) - finally: - unquiet() # The Latin-1 filename should have been skipped filename = filename.decode('latin-1') @@ -341,11 +318,8 @@ def test_sdist_with_utf8_encoded_filename(self): filename = os.path.join(b('sdist_test'), b('smörbröd.py')) open(filename, 'w').close() - quiet() - try: + with quiet(): cmd.run() - finally: - unquiet() if sys.platform == 'darwin': filename = decompose(filename) @@ -379,11 +353,8 @@ def test_sdist_with_latin1_encoded_filename(self): open(filename, 'w').close() self.assertTrue(os.path.isfile(filename)) - quiet() - try: + with quiet(): cmd.run() - finally: - unquiet() if PY3: #not all windows systems have a default FS encoding of cp1252 From c5d760b060efa63e8de92bc5d1b1e56700ff16e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 12:38:54 -0400 Subject: [PATCH 4095/8469] Remove unused import --- setuptools/tests/test_sdist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 93b8c2977e..d2188035a7 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -14,7 +14,6 @@ from setuptools.tests.py26compat import skipIf from setuptools.compat import StringIO, unicode, PY3, PY2 -from setuptools.tests.py26compat import skipIf from setuptools.command.sdist import sdist, walk_revctrl from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution From 999a55b7526f857af17d3c85579c7d9380c5baa8 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 11:15:44 -0500 Subject: [PATCH 4096/8469] est_manifest_is_written_with_utf8_encoding should use the filelist's append, NOT filelist.files.append --HG-- extra : rebase_source : cdf0df0a11b96a60c29c10483579e6e043a7fcd1 --- setuptools/tests/test_sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index d2188035a7..9d2cc54f95 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -135,7 +135,7 @@ def test_manifest_is_written_with_utf8_encoding(self): # Add UTF-8 filename and write manifest with quiet(): mm.run() - mm.filelist.files.append(filename) + mm.filelist.append(filename) mm.write_manifest() manifest = open(mm.manifest, 'rbU') From 3e5d3adf96b78fa10f1d1172b4dff32e4366a0ee Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 11:40:08 -0500 Subject: [PATCH 4097/8469] Must create files for tests, else they are remoed from manifests --HG-- extra : rebase_source : c22b55cde69bbf7fc6a075bcd8797017797c6225 --- setuptools/tests/test_sdist.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 9d2cc54f95..97ac51565e 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -75,7 +75,7 @@ def decompose(path): path = unicodedata.normalize('NFD', path) path = path.encode('utf-8') except UnicodeError: - pass # Not UTF-8 + pass # Not UTF-8 return path @@ -132,6 +132,9 @@ def test_manifest_is_written_with_utf8_encoding(self): # UTF-8 filename filename = os.path.join('sdist_test', 'smörbröd.py') + # Must create the file or it will get stripped. + open(filename, 'w').close() + # Add UTF-8 filename and write manifest with quiet(): mm.run() @@ -251,7 +254,7 @@ def test_manifest_is_read_with_utf8_encoding(self): filename = os.path.join(b('sdist_test'), b('smörbröd.py')) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n')+filename) + manifest.write(b('\n') + filename) manifest.close() # The file must exist to be included in the filelist @@ -285,7 +288,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n')+filename) + manifest.write(b('\n') + filename) manifest.close() # The file must exist to be included in the filelist @@ -356,7 +359,7 @@ def test_sdist_with_latin1_encoded_filename(self): cmd.run() if PY3: - #not all windows systems have a default FS encoding of cp1252 + # not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': # Latin-1 is similar to Windows-1252 however # on mbcs filesys it is not in latin-1 encoding @@ -467,7 +470,7 @@ def setUp(self): elif self.base_version < (1, 3): raise ValueError('Insufficient SVN Version %s' % version) elif self.base_version >= (1, 9): - #trying the latest version + # trying the latest version self.base_version = (1, 8) self.dataname = "svn%i%i_example" % self.base_version @@ -484,7 +487,7 @@ def test_walksvn(self): folder2 = 'third_party2' folder3 = 'third_party3' - #TODO is this right + # TODO is this right expected = set([ os.path.join('a file'), os.path.join(folder2, 'Changes.txt'), From ab8f277a286587dbfeee2e1e21a57f4744aaddd6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 13:16:58 -0400 Subject: [PATCH 4098/8469] Must create files for tests, else they are remoed from manifests --- setuptools/tests/test_sdist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 97ac51565e..f4a492daf4 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -173,6 +173,9 @@ def test_write_manifest_allows_utf8_filenames(self): # UTF-8 filename filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + #Must touch the file or risk removal + open(filename, "w").close() + # Add filename and write manifest with quiet(): mm.run() From f84506654ff8199b07bb4eab8b210de25eb546f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 13:23:20 -0400 Subject: [PATCH 4099/8469] Add whitespace for readability. --- setuptools/tests/test_sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f4a492daf4..5b3862e998 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -173,7 +173,7 @@ def test_write_manifest_allows_utf8_filenames(self): # UTF-8 filename filename = os.path.join(b('sdist_test'), b('smörbröd.py')) - #Must touch the file or risk removal + # Must touch the file or risk removal open(filename, "w").close() # Add filename and write manifest From e96e4f96a6697678e85e8b8b5d261a477586c4e6 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 15:44:25 -0500 Subject: [PATCH 4100/8469] Must add zipinfo as a property --HG-- extra : rebase_source : 2ae5fa38bd5c9d37b44a010879f2b3a4867c0ee4 --- pkg_resources.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index fd1663c234..1df322b6ff 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1621,6 +1621,10 @@ def _parts(self, zip_path): "%s is not a subpath of %s" % (fspath, self.egg_root) ) + @property + def zipinfo(self): + return build_zipmanifest(self.loader.archive) # memoized + def get_resource_filename(self, manager, resource_name): if not self.egg_name: raise NotImplementedError( From c1d08d7441c9fc059241232eb7323d2a90d12b6e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 16:12:20 -0500 Subject: [PATCH 4101/8469] PY26 doesn't have assertIn --HG-- branch : develop extra : rebase_source : a891af85b68115431db3fe42acf5a102e02aa8b9 --- setuptools/tests/test_egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4c41a2ccd9..7531e37c1f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -155,7 +155,7 @@ def test_svn_tags(self): infile.close() del infile - self.assertIn("Version: 0.1.1-r1\n", read_contents) + self.assertTrue("Version: 0.1.1-r1\n" in read_contents) @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_no_tags(self): @@ -173,7 +173,7 @@ def test_no_tags(self): infile.close() del infile - self.assertIn("Version: 0.1.1\n", read_contents) + self.assertTrue("Version: 0.1.1\n" in read_contents) class TestSvnDummyLegacy(environment.ZippedEnvironment): From 60beb22b4ca7e7d4f549c7137c7a20a633d72916 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 18:58:29 -0400 Subject: [PATCH 4102/8469] Extract variable --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 646f94607a..169fcd3e1c 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -358,7 +358,8 @@ def warn_depends_obsolete(cmd, basename, filename): def write_requirements(cmd, basename, filename): dist = cmd.distribution data = ['\n'.join(yield_lines(dist.install_requires or ()))] - for extra,reqs in (dist.extras_require or {}).items(): + extras_require = dist.extras_require or {} + for extra,reqs in extras_require.items(): data.append('\n\n[%s]\n%s' % (extra, '\n'.join(yield_lines(reqs)))) cmd.write_or_delete_file("requirements", filename, ''.join(data)) From 380e609d0d788edbdc5808f6d58c6c730a78cb3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 19:02:55 -0400 Subject: [PATCH 4103/8469] Write requirements in a deterministic order. --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 169fcd3e1c..38a01fbf6e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -359,7 +359,8 @@ def write_requirements(cmd, basename, filename): dist = cmd.distribution data = ['\n'.join(yield_lines(dist.install_requires or ()))] extras_require = dist.extras_require or {} - for extra,reqs in extras_require.items(): + for extra in sorted(extras_require): + reqs = extras_require[extra] data.append('\n\n[%s]\n%s' % (extra, '\n'.join(yield_lines(reqs)))) cmd.write_or_delete_file("requirements", filename, ''.join(data)) From faae7b49cab317203b07d4a418ee7b68c7afb48e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 19:14:29 -0400 Subject: [PATCH 4104/8469] Use StringIO to write out requirements. Use more common convention of adding newline to each line of the file, not just intervening lines. --- setuptools/command/egg_info.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 38a01fbf6e..470ba4662c 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -5,6 +5,7 @@ import os import re import sys +import io from setuptools import Command import distutils.errors @@ -355,14 +356,21 @@ def warn_depends_obsolete(cmd, basename, filename): ) +def _write_requirements(stream, reqs): + lines = yield_lines(reqs or ()) + append_cr = lambda line: line + '\n' + lines = map(append_cr, lines) + stream.writelines(lines) + def write_requirements(cmd, basename, filename): dist = cmd.distribution - data = ['\n'.join(yield_lines(dist.install_requires or ()))] + data = io.StringIO() + _write_requirements(data, dist.install_requires) extras_require = dist.extras_require or {} for extra in sorted(extras_require): - reqs = extras_require[extra] - data.append('\n\n[%s]\n%s' % (extra, '\n'.join(yield_lines(reqs)))) - cmd.write_or_delete_file("requirements", filename, ''.join(data)) + data.write('\n[{extra}]\n'.format(**vars())) + _write_requirements(data, extras_require[extra]) + cmd.write_or_delete_file("requirements", filename, data.getvalue()) def write_toplevel_names(cmd, basename, filename): pkgs = dict.fromkeys( From aa8f6bed2212ae82ededad4b2985cec25f8c1db9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 19:14:54 -0400 Subject: [PATCH 4105/8469] Update requires.txt to match new, predictable order. --- setuptools.egg-info/requires.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index a49a923ef5..4fa66c7141 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,7 +1,6 @@ - [certs] certifi==1.0.1 [ssl:sys_platform=='win32'] -wincertstore==0.2 \ No newline at end of file +wincertstore==0.2 From 95ca77339cdcd24fc1193b701c979e5f6fa72335 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 19:26:30 -0400 Subject: [PATCH 4106/8469] Restore Python 2 compatibility. --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 470ba4662c..9019524db3 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -364,7 +364,7 @@ def _write_requirements(stream, reqs): def write_requirements(cmd, basename, filename): dist = cmd.distribution - data = io.StringIO() + data = io.StringIO() if PY3 else io.BytesIO() _write_requirements(data, dist.install_requires) extras_require = dist.extras_require or {} for extra in sorted(extras_require): From 02abac6610d70781ee9be1a1f10377b7b04bfd0a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 20:02:30 -0400 Subject: [PATCH 4107/8469] Use context managers to reliably close files --- ez_setup.py | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 732fffc935..a05069b22a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -183,14 +183,11 @@ def has_powershell(): if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] - devnull = open(os.path.devnull, 'wb') - try: + with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False - finally: - devnull.close() return True download_file_powershell.viable = has_powershell @@ -201,14 +198,11 @@ def download_file_curl(url, target): def has_curl(): cmd = ['curl', '--version'] - devnull = open(os.path.devnull, 'wb') - try: + with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False - finally: - devnull.close() return True download_file_curl.viable = has_curl @@ -219,14 +213,11 @@ def download_file_wget(url, target): def has_wget(): cmd = ['wget', '--version'] - devnull = open(os.path.devnull, 'wb') - try: + with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False - finally: - devnull.close() return True download_file_wget.viable = has_wget @@ -240,19 +231,16 @@ def download_file_insecure(url, target): from urllib.request import urlopen except ImportError: from urllib2 import urlopen - src = dst = None + src = urlopen(url) try: - src = urlopen(url) - # Read/write all in one block, so we don't create a corrupt file - # if the download is interrupted. + # Read all the data in one block. data = src.read() - dst = open(target, "wb") - dst.write(data) finally: - if src: - src.close() - if dst: - dst.close() + src.close() + + # Write all the data in one block to avoid creating a partial file. + with open(target, "wb") as dst: + dst.write(data) download_file_insecure.viable = lambda: True From aae75a3d3f81aaa8a6bfadb5885b936ec2db59da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 20:04:40 -0400 Subject: [PATCH 4108/8469] Move import to the top --- ez_setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a05069b22a..4c78d85288 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -26,6 +26,11 @@ from distutils import log +try: + from urllib.request import urlopen +except ImportError: + from urllib2 import urlopen + try: from site import USER_SITE except ImportError: @@ -227,10 +232,6 @@ def download_file_insecure(url, target): Use Python to download the file, even though it cannot authenticate the connection. """ - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen src = urlopen(url) try: # Read all the data in one block. From 469c889e37ef184a78fb7b58505858e5ceea0f37 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 20:14:20 -0400 Subject: [PATCH 4109/8469] Use iterables for getting best downloader --- ez_setup.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4c78d85288..2c433d61a5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -246,16 +246,14 @@ def download_file_insecure(url, target): download_file_insecure.viable = lambda: True def get_best_downloader(): - downloaders = [ + downloaders = ( download_file_powershell, download_file_curl, download_file_wget, download_file_insecure, - ] - - for dl in downloaders: - if dl.viable(): - return dl + ) + viable_downloaders = (dl for dl in downloaders if dl.viable()) + return next(viable_downloaders, None) def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader): From 365ca3bd6b4353a8caec406bc2aaec73650ec554 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 20:22:41 -0400 Subject: [PATCH 4110/8469] Actually call close on exit --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 2c433d61a5..a6c3ef4856 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -77,7 +77,7 @@ class ContextualZipFile(zipfile.ZipFile): def __enter__(self): return self def __exit__(self, type, value, traceback): - self.close + self.close() return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \ ContextualZipFile From 20ee765db785160ee8cb3ec682a155062c024543 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 20:24:17 -0400 Subject: [PATCH 4111/8469] Refactor test --- ez_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a6c3ef4856..8d2199d531 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -78,8 +78,8 @@ def __enter__(self): return self def __exit__(self, type, value, traceback): self.close() - return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \ - ContextualZipFile + zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') + return zipfile.ZipFile if zf_has_exit else ContextualZipFile @contextlib.contextmanager From f78c3beaa55d4026b92703b18d9b54b7e4985e3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 21:36:14 -0400 Subject: [PATCH 4112/8469] Use context manager --- pkg_resources.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 372480ea51..63a31fb8fd 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1507,11 +1507,8 @@ def get_resource_stream(self, manager, resource_name): return open(self._fn(self.module_path, resource_name), 'rb') def _get(self, path): - stream = open(path, 'rb') - try: + with open(path, 'rb') as stream: return stream.read() - finally: - stream.close() register_loader_type(type(None), DefaultProvider) From c671c5da8e8b85ecdbb372074fd5531f385113d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 21:56:27 -0400 Subject: [PATCH 4113/8469] Replace get_zip_class with a specialized constructor. --- ez_setup.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 8d2199d531..53350e45a8 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -69,17 +69,25 @@ def _build_egg(egg, archive_filename, to_dir): raise IOError('Could not build the egg.') -def get_zip_class(): +class ContextualZipFile(zipfile.ZipFile): """ Supplement ZipFile class to support context manager for Python 2.6 """ - class ContextualZipFile(zipfile.ZipFile): - def __enter__(self): - return self - def __exit__(self, type, value, traceback): - self.close() - zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') - return zipfile.ZipFile if zf_has_exit else ContextualZipFile + + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + self.close() + + @classmethod + def compat(cls, *args, **kwargs): + """ + Construct a ZipFile or ContextualZipFile as appropriate + """ + zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') + class_ = zipfile.ZipFile if zf_has_exit else cls + return class_(*args, **kwargs) @contextlib.contextmanager @@ -90,7 +98,7 @@ def archive_context(filename): old_wd = os.getcwd() try: os.chdir(tmpdir) - with get_zip_class()(filename) as archive: + with ContextualZipFile.compat(filename) as archive: archive.extractall() # going in the directory From ec81e4dca2f1735bb1ac787b464a9d0f915dd7b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 22:04:35 -0400 Subject: [PATCH 4114/8469] Use ContextualZipFile for context manager support --- pkg_resources.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 63a31fb8fd..ba03f62804 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1551,18 +1551,35 @@ def build_zipmanifest(path): * [7] - zipinfo.CRC """ zipinfo = dict() - zfile = zipfile.ZipFile(path) - #Got ZipFile has not __exit__ on python 3.1 - try: + with ContextualZipFile.compat(path) as zfile: for zitem in zfile.namelist(): zpath = zitem.replace('/', os.sep) zipinfo[zpath] = zfile.getinfo(zitem) assert zipinfo[zpath] is not None - finally: - zfile.close() return zipinfo +class ContextualZipFile(zipfile.ZipFile): + """ + Supplement ZipFile class to support context manager for Python 2.6 + """ + + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + self.close() + + @classmethod + def compat(cls, *args, **kwargs): + """ + Construct a ZipFile or ContextualZipFile as appropriate + """ + zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') + class_ = zipfile.ZipFile if zf_has_exit else cls + return class_(*args, **kwargs) + + class ZipProvider(EggProvider): """Resource support for zips and eggs""" From 24d18354d9a2646d5192f959434c1044f7e7fbd4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 22:19:13 -0400 Subject: [PATCH 4115/8469] Use context managers in pkg_resources --- pkg_resources.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index ba03f62804..4c28d72ceb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1694,9 +1694,8 @@ def _is_current(self, file_path, zip_path): return False # check that the contents match zip_contents = self.loader.get_data(zip_path) - f = open(file_path, 'rb') - file_contents = f.read() - f.close() + with open(file_path, 'rb') as f: + file_contents = f.read() return zip_contents == file_contents def _get_eager_resources(self): @@ -1764,9 +1763,8 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': - f = open(self.path,'rU') - metadata = f.read() - f.close() + with open(self.path,'rU') as f: + metadata = f.read() return metadata raise KeyError("No metadata except PKG-INFO is available") @@ -1889,11 +1887,8 @@ def find_on_path(importer, path_item, only=False): for dist in dists: yield dist elif not only and lower.endswith('.egg-link'): - entry_file = open(os.path.join(path_item, entry)) - try: + with open(os.path.join(path_item, entry)) as entry_file: entry_lines = entry_file.readlines() - finally: - entry_file.close() for line in entry_lines: if not line.strip(): continue From f49559970b7e551f045b59c9530733b1bd1ed0e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 22:50:41 -0400 Subject: [PATCH 4116/8469] Update ContextualZipFile to use a single constructor --- ez_setup.py | 11 +++++------ pkg_resources.py | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 53350e45a8..df3848a3a1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -80,14 +80,13 @@ def __enter__(self): def __exit__(self, type, value, traceback): self.close() - @classmethod - def compat(cls, *args, **kwargs): + def __new__(cls, *args, **kwargs): """ Construct a ZipFile or ContextualZipFile as appropriate """ - zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') - class_ = zipfile.ZipFile if zf_has_exit else cls - return class_(*args, **kwargs) + if hasattr(zipfile.ZipFile, '__exit__'): + return zipfile.ZipFile(*args, **kwargs) + return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) @contextlib.contextmanager @@ -98,7 +97,7 @@ def archive_context(filename): old_wd = os.getcwd() try: os.chdir(tmpdir) - with ContextualZipFile.compat(filename) as archive: + with ContextualZipFile(filename) as archive: archive.extractall() # going in the directory diff --git a/pkg_resources.py b/pkg_resources.py index 4c28d72ceb..1f8c3183eb 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1551,7 +1551,7 @@ def build_zipmanifest(path): * [7] - zipinfo.CRC """ zipinfo = dict() - with ContextualZipFile.compat(path) as zfile: + with ContextualZipFile(path) as zfile: for zitem in zfile.namelist(): zpath = zitem.replace('/', os.sep) zipinfo[zpath] = zfile.getinfo(zitem) @@ -1570,14 +1570,13 @@ def __enter__(self): def __exit__(self, type, value, traceback): self.close() - @classmethod - def compat(cls, *args, **kwargs): + def __new__(cls, *args, **kwargs): """ Construct a ZipFile or ContextualZipFile as appropriate """ - zf_has_exit = hasattr(zipfile.ZipFile, '__exit__') - class_ = zipfile.ZipFile if zf_has_exit else cls - return class_(*args, **kwargs) + if hasattr(zipfile.ZipFile, '__exit__'): + return zipfile.ZipFile(*args, **kwargs) + return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) class ZipProvider(EggProvider): From 14f168f249c86085dbf9f67fdc8d6a5b801946a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 22:58:50 -0400 Subject: [PATCH 4117/8469] Clean up whitespace --- setuptools/archive_util.py | 54 +++++--------------------------------- 1 file changed, 7 insertions(+), 47 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 1109f34677..a5be2f981e 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -6,7 +6,11 @@ "UnrecognizedFormat", "extraction_drivers", "unpack_directory", ] -import zipfile, tarfile, os, shutil, posixpath +import zipfile +import tarfile +import os +import shutil +import posixpath from pkg_resources import ensure_directory from distutils.errors import DistutilsError @@ -14,34 +18,12 @@ class UnrecognizedFormat(DistutilsError): """Couldn't recognize the archive type""" def default_filter(src,dst): - """The default progress/filter callback; returns True for all files""" + """The default progress/filter callback; returns True for all files""" return dst - - - - - - - - - - - - - - - - - - - - - def unpack_archive(filename, extract_dir, progress_filter=default_filter, - drivers=None -): + drivers=None): """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat`` `progress_filter` is a function taking two arguments: a source path @@ -75,11 +57,6 @@ def unpack_archive(filename, extract_dir, progress_filter=default_filter, ) - - - - - def unpack_directory(filename, extract_dir, progress_filter=default_filter): """"Unpack" a directory, using the same interface as for archives @@ -94,7 +71,6 @@ def unpack_directory(filename, extract_dir, progress_filter=default_filter): for d in dirs: paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d) for f in files: - name = src+f target = os.path.join(dst,f) target = progress_filter(src+f, target) if not target: @@ -105,22 +81,6 @@ def unpack_directory(filename, extract_dir, progress_filter=default_filter): shutil.copystat(f, target) - - - - - - - - - - - - - - - - def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): """Unpack zip `filename` to `extract_dir` From 0f7f8d71dc1c8eda869c423a324064d4bc419879 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:09:56 -0400 Subject: [PATCH 4118/8469] Use ContextualZipFile and contextlib.closing for archiveutil --- setuptools/archive_util.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index a5be2f981e..67a67e2362 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -11,7 +11,8 @@ import os import shutil import posixpath -from pkg_resources import ensure_directory +import contextlib +from pkg_resources import ensure_directory, ContextualZipFile from distutils.errors import DistutilsError class UnrecognizedFormat(DistutilsError): @@ -92,8 +93,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): if not zipfile.is_zipfile(filename): raise UnrecognizedFormat("%s is not a zip file" % (filename,)) - z = zipfile.ZipFile(filename) - try: + with ContextualZipFile(filename) as z: for info in z.infolist(): name = info.filename @@ -121,8 +121,6 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): unix_attributes = info.external_attr >> 16 if unix_attributes: os.chmod(target, unix_attributes) - finally: - z.close() def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): @@ -138,7 +136,7 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) ) - try: + with contextlib.closing(tarobj): tarobj.chown = lambda *args: None # don't do any chowning! for member in tarobj: name = member.name @@ -164,7 +162,5 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): except tarfile.ExtractError: pass # chown/chmod/mkfifo/mknode/makedev failed return True - finally: - tarobj.close() extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile From 7c471a14c008d879b0877c15f0fd2079f580a1e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:21:19 -0400 Subject: [PATCH 4119/8469] Use context manager for brevity --- setuptools/compat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 7397d7fa17..09e5af5cc6 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -70,11 +70,8 @@ def execfile(fn, globs=None, locs=None): globs = globals() if locs is None: locs = globs - f = open(fn, 'rb') - try: + with open(fn, 'rb') as f: source = f.read() - finally: - f.close() exec(compile(source, fn, 'exec'), globs, locs) def reraise(tp, value, tb=None): From e6e3b8dfd12cb96b3abc7b34bda56c6431956719 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:33:56 -0400 Subject: [PATCH 4120/8469] Modernize syntax --HG-- extra : amend_source : eeaee0372ea8d1d39475a722234c03f6a0247722 --- setuptools/depends.py | 75 +++++++++---------------------------------- 1 file changed, 16 insertions(+), 59 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index 8b9d1217b1..f6628799fa 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,7 +1,8 @@ -from __future__ import generators -import sys, imp, marshal +import sys +import imp +import marshal from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN -from distutils.version import StrictVersion, LooseVersion +from distutils.version import StrictVersion __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' @@ -10,9 +11,8 @@ class Require: """A prerequisite to building or installing a distribution""" - def __init__(self,name,requested_version,module,homepage='', - attribute=None,format=None - ): + def __init__(self, name, requested_version, module, homepage='', + attribute=None, format=None): if format is None and requested_version is not None: format = StrictVersion @@ -25,20 +25,17 @@ def __init__(self,name,requested_version,module,homepage='', self.__dict__.update(locals()) del self.self - def full_name(self): """Return full package/distribution name, w/version""" if self.requested_version is not None: return '%s-%s' % (self.name,self.requested_version) return self.name - - def version_ok(self,version): + def version_ok(self, version): """Is 'version' sufficiently up-to-date?""" return self.attribute is None or self.format is None or \ str(version) != "unknown" and version >= self.requested_version - def get_version(self, paths=None, default="unknown"): """Get version number of installed module, 'None', or 'default' @@ -59,20 +56,18 @@ def get_version(self, paths=None, default="unknown"): except ImportError: return None - v = get_module_constant(self.module,self.attribute,default,paths) + v = get_module_constant(self.module, self.attribute, default, paths) if v is not None and v is not default and self.format is not None: return self.format(v) return v - - def is_present(self,paths=None): + def is_present(self, paths=None): """Return true if dependency is present on 'paths'""" return self.get_version(paths) is not None - - def is_current(self,paths=None): + def is_current(self, paths=None): """Return true if dependency is present and up-to-date on 'paths'""" version = self.get_version(paths) if version is None: @@ -113,14 +108,6 @@ def _iter_code(code): yield op,arg - - - - - - - - def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" @@ -140,28 +127,6 @@ def find_module(module, paths=None): return info - - - - - - - - - - - - - - - - - - - - - - def get_module_constant(module, symbol, default=-1, paths=None): """Find 'module' by searching 'paths', and extract 'symbol' @@ -171,7 +136,7 @@ def get_module_constant(module, symbol, default=-1, paths=None): constant. Otherwise, return 'default'.""" try: - f, path, (suffix,mode,kind) = find_module(module,paths) + f, path, (suffix, mode, kind) = find_module(module, paths) except ImportError: # Module doesn't exist return None @@ -187,23 +152,17 @@ def get_module_constant(module, symbol, default=-1, paths=None): else: # Not something we can parse; we'll have to import it. :( if module not in sys.modules: - imp.load_module(module,f,path,(suffix,mode,kind)) - return getattr(sys.modules[module],symbol,None) + imp.load_module(module, f, path, (suffix, mode, kind)) + return getattr(sys.modules[module], symbol, None) finally: if f: f.close() - return extract_constant(code,symbol,default) - - - - + return extract_constant(code, symbol, default) - - -def extract_constant(code,symbol,default=-1): +def extract_constant(code, symbol, default=-1): """Extract the constant value of 'symbol' from 'code' If the name 'symbol' is bound to a constant value by the Python code @@ -236,11 +195,9 @@ def extract_constant(code,symbol,default=-1): return const else: const = default - + if sys.platform.startswith('java') or sys.platform == 'cli': # XXX it'd be better to test assertions about bytecode instead... del extract_constant, get_module_constant __all__.remove('extract_constant') __all__.remove('get_module_constant') - - From ac86a30d6f4bc4ed403ea668d4a904d8ae933850 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:37:43 -0400 Subject: [PATCH 4121/8469] Fix NameError (is this code ever used?). --HG-- extra : amend_source : 4361459883522692c4d70715135439819d981d7a --- setuptools/depends.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index f6628799fa..49fb8b374b 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -3,6 +3,7 @@ import marshal from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion +from setuptools import compat __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' @@ -98,7 +99,7 @@ def _iter_code(code): ptr += 3 if op==EXTENDED_ARG: - extended_arg = arg * long_type(65536) + extended_arg = arg * compat.long_type(65536) continue else: From 032cd636116a821d20a590d87afa99626de9bff6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:42:35 -0400 Subject: [PATCH 4122/8469] Patch globals in a function. This technique bypasses the linter warnings about the names not being present, and allows for better documentation. --- setuptools/depends.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index 49fb8b374b..e87ef3f39c 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -197,8 +197,19 @@ def extract_constant(code, symbol, default=-1): else: const = default -if sys.platform.startswith('java') or sys.platform == 'cli': - # XXX it'd be better to test assertions about bytecode instead... - del extract_constant, get_module_constant - __all__.remove('extract_constant') - __all__.remove('get_module_constant') + +def _update_globals(): + """ + Patch the globals to remove the objects not available on some platforms. + + XXX it'd be better to test assertions about bytecode instead. + """ + + if not sys.platform.startswith('java') and sys.platform != 'cli': + return + incompatible = 'extract_constant', 'get_module_constant' + for name in incompatible: + del globals()[name] + __all__.remove(name) + +_update_globals() From f9f94d714cf97df731a49b614b35d146536449f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 May 2014 23:47:08 -0400 Subject: [PATCH 4123/8469] Use context manager --HG-- extra : amend_source : 5e98bee2918d9eeb073c8c896a849c5f68da6634 --- setuptools/package_index.py | 47 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 167c34e5b4..58572ce663 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -632,16 +632,15 @@ def gen_setup(self, filename, fragment, tmpdir): shutil.copy2(filename, dst) filename=dst - file = open(os.path.join(tmpdir, 'setup.py'), 'w') - file.write( - "from setuptools import setup\n" - "setup(name=%r, version=%r, py_modules=[%r])\n" - % ( - dists[0].project_name, dists[0].version, - os.path.splitext(basename)[0] + with open(os.path.join(tmpdir, 'setup.py'), 'w') as file: + file.write( + "from setuptools import setup\n" + "setup(name=%r, version=%r, py_modules=[%r])\n" + % ( + dists[0].project_name, dists[0].version, + os.path.splitext(basename)[0] + ) ) - ) - file.close() return filename elif match: @@ -660,7 +659,7 @@ def gen_setup(self, filename, fragment, tmpdir): def _download_to(self, url, filename): self.info("Downloading %s", url) # Download the file - fp, tfp, info = None, None, None + fp, info = None, None try: checker = HashChecker.from_url(url) fp = self.open_url(strip_fragment(url)) @@ -677,21 +676,20 @@ def _download_to(self, url, filename): sizes = get_all_headers(headers, 'Content-Length') size = max(map(int, sizes)) self.reporthook(url, filename, blocknum, bs, size) - tfp = open(filename,'wb') - while True: - block = fp.read(bs) - if block: - checker.feed(block) - tfp.write(block) - blocknum += 1 - self.reporthook(url, filename, blocknum, bs, size) - else: - break - self.check_hash(checker, filename, tfp) + with open(filename,'wb') as tfp: + while True: + block = fp.read(bs) + if block: + checker.feed(block) + tfp.write(block) + blocknum += 1 + self.reporthook(url, filename, blocknum, bs, size) + else: + break + self.check_hash(checker, filename, tfp) return headers finally: if fp: fp.close() - if tfp: tfp.close() def reporthook(self, url, filename, blocknum, blksize, size): pass # no-op @@ -1040,9 +1038,8 @@ def local_open(url): files = [] for f in os.listdir(filename): if f=='index.html': - fp = open(os.path.join(filename,f),'r') - body = fp.read() - fp.close() + with open(os.path.join(filename,f),'r') as fp: + body = fp.read() break elif os.path.isdir(os.path.join(filename,f)): f+='/' From 37ceab37dd39345a8dab9c88082bd1a644ad7311 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 17 May 2014 21:46:35 -0700 Subject: [PATCH 4124/8469] Version bump for 3.4.1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b00024940e..9463a35c79 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.1rc1" +__version__ = "3.4.1" #--end constants-- From 771e560098734056abe2d2aefc7365d16534546f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 May 2014 21:34:16 -0400 Subject: [PATCH 4125/8469] Include the build launcher script in setuptools sdist. This helps address the requirement that all sources be included. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 76822cbda2..2c587d40f9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,3 +8,4 @@ include *.py include *.txt include MANIFEST.in include launcher.c +include msvc-build-launcher.cmd From 467ea50e19e47b0c46a842da0f7faf2bd8e8d714 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 23 May 2014 08:12:13 -0400 Subject: [PATCH 4126/8469] Normalize whitespace --- setup.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index f76d371a73..caad649602 100755 --- a/setup.py +++ b/setup.py @@ -119,20 +119,20 @@ def _save_entry_points(self): author="Python Packaging Authority", author_email="distutils-sig@python.org", license="PSF or ZPL", - long_description = long_description, - keywords = "CPAN PyPI distutils eggs package management", - url = "https://pypi.python.org/pypi/setuptools", - test_suite = 'setuptools.tests', - src_root = src_root, - packages = setuptools.find_packages(), - package_data = package_data, + long_description=long_description, + keywords="CPAN PyPI distutils eggs package management", + url="https://pypi.python.org/pypi/setuptools", + test_suite='setuptools.tests', + src_root=src_root, + packages=setuptools.find_packages(), + package_data=package_data, - py_modules = ['pkg_resources', 'easy_install'], + py_modules=['pkg_resources', 'easy_install'], - zip_safe = True, + zip_safe=True, - cmdclass = {'test': test}, - entry_points = { + cmdclass={'test': test}, + entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() for cmd in SETUP_COMMANDS @@ -178,7 +178,7 @@ def _save_entry_points(self): }, - classifiers = textwrap.dedent(""" + classifiers=textwrap.dedent(""" Development Status :: 5 - Production/Stable Intended Audience :: Developers License :: OSI Approved :: Python Software Foundation License @@ -196,20 +196,20 @@ def _save_entry_points(self): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), - extras_require = { + extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==1.0.1", }, - dependency_links = [ + dependency_links=[ 'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ], - scripts = [], - tests_require = [ + scripts=[], + tests_require=[ 'setuptools[ssl]', 'pytest', ], - setup_requires = [ + setup_requires=[ ] + pytest_runner, ) From d1034e6d0b8dfe3ed6e96bf29e3cd352d0a4ebd2 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 25 May 2014 13:17:44 +0000 Subject: [PATCH 4127/8469] Change the project URL to BitBucket rather than PyPI Currently, the project metadata on PyPI doesn't provide an easy way to navigate to the BitBucket repo. This change replaces the current self-link back to PyPI with the appropriate link to BitBucket. --HG-- branch : ncoghlan/setuppy-edited-online-with-bitbucket-1401023748153 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index caad649602..6b263702f3 100755 --- a/setup.py +++ b/setup.py @@ -121,7 +121,7 @@ def _save_entry_points(self): license="PSF or ZPL", long_description=long_description, keywords="CPAN PyPI distutils eggs package management", - url="https://pypi.python.org/pypi/setuptools", + url="https://bitbucket.org/pypa/setuptools", test_suite='setuptools.tests', src_root=src_root, packages=setuptools.find_packages(), From 55e8aecffc532c7f048ca2379a65fd325a062a92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 May 2014 03:11:37 +0200 Subject: [PATCH 4128/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2f4705d7d1..3df689332a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +--- +3.7 +--- + +* Issue #193: Improved handling of Unicode filenames when building manifests. + --- 3.6 --- From 72192792996ccfa39c12d0d7a6594e3531e47568 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 May 2014 03:12:04 +0200 Subject: [PATCH 4129/8469] Added tag 3.7b1 for changeset 292dfca15d33 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 100e552c46..81217163cf 100644 --- a/.hgtags +++ b/.hgtags @@ -135,3 +135,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 254d8c625f4620993ce2d2b21212ba01cf307fe6 3.5.1 572201d08eadc59210f6f0f28f9dc79f906672d3 3.5.2 e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 +292dfca15d33e72a862d044183a6ad7c06862a19 3.7b1 From e234ee81285a535ab525f9210bf714adfb769806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 28 May 2014 05:53:14 +0200 Subject: [PATCH 4130/8469] simplify ContextualZipFile implementation and avoid DeprecationWarnings ContextualZipFile tried to be smart and have its __new__ method return zipfile.ZipFile instances on Python versions supporting the zipfile.ZipFile context manager interface (i.e. only on Python [2.7, 3.0> & 3.2+) while on others it would return an actual ContextualZipFile instance. The new implementation seems much simpler and avoids a DeprecationWarning on Python [3.0, 3.2>. There zipFile.ZipFile's __new__ method implementation is actually inherited from object, and calling object.__new__ with extra parameters has been deprecated since Python 2.6 (it has even been converted to an error since Python 3.3). Notes on why there were no related problems in other Python versions: * Python versions prior to 2.5 were not affected because they did not yet deprecate passing extra parameters to object.__new__. * Python version 2.6 was not affected because there zipfile.ZipFile was implemented as an old-style class and therefore did not get its __new__ method called in the first place. * Python [2.7, 3.0> & 3.2+ - explained above. --HG-- extra : source : 9388cc525f1919672fb916b0e62f80ca581072b7 --- ez_setup.py | 23 ++++++++++------------- pkg_resources.py | 23 ++++++++++------------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index df3848a3a1..810c552b99 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -71,22 +71,19 @@ def _build_egg(egg, archive_filename, to_dir): class ContextualZipFile(zipfile.ZipFile): """ - Supplement ZipFile class to support context manager for Python 2.6 - """ + Supplement ZipFile context manager class supporting all Python versions. + + ZipFile supports a context manager interface only in versions [2.7, 3.0> & + 3.2+. - def __enter__(self): - return self + """ - def __exit__(self, type, value, traceback): - self.close() + if not hasattr(zipfile.ZipFile, '__exit__'): + def __enter__(self): + return self - def __new__(cls, *args, **kwargs): - """ - Construct a ZipFile or ContextualZipFile as appropriate - """ - if hasattr(zipfile.ZipFile, '__exit__'): - return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) + def __exit__(self, type, value, traceback): + self.close() @contextlib.contextmanager diff --git a/pkg_resources.py b/pkg_resources.py index 1f8c3183eb..a9c737c4c9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1561,22 +1561,19 @@ def build_zipmanifest(path): class ContextualZipFile(zipfile.ZipFile): """ - Supplement ZipFile class to support context manager for Python 2.6 - """ + Supplement ZipFile context manager class supporting all Python versions. - def __enter__(self): - return self + ZipFile supports a context manager interface only in versions [2.7, 3.0> & + 3.2+. + + """ - def __exit__(self, type, value, traceback): - self.close() + if not hasattr(zipfile.ZipFile, '__exit__'): + def __enter__(self): + return self - def __new__(cls, *args, **kwargs): - """ - Construct a ZipFile or ContextualZipFile as appropriate - """ - if hasattr(zipfile.ZipFile, '__exit__'): - return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) + def __exit__(self, type, value, traceback): + self.close() class ZipProvider(EggProvider): From eba9c893a275bc07e8f7e32f46bee0e2e2af7ff3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 May 2014 07:24:50 +0200 Subject: [PATCH 4131/8469] Suppress arguments to __new__. ZipFile doesn't want them, and object deprecates them. --HG-- extra : amend_source : e41a2567b4174ef2eff09f3aa3f2a7faf214e054 --- ez_setup.py | 2 +- pkg_resources.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index df3848a3a1..1f2468f927 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -86,7 +86,7 @@ def __new__(cls, *args, **kwargs): """ if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) + return super(ContextualZipFile, cls).__new__(cls) @contextlib.contextmanager diff --git a/pkg_resources.py b/pkg_resources.py index 1f8c3183eb..5734989dd6 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1576,7 +1576,7 @@ def __new__(cls, *args, **kwargs): """ if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs) + return super(ContextualZipFile, cls).__new__(cls) class ZipProvider(EggProvider): From 0b70ebffe2c8cacc4c229c21286e74d0d2ebbd65 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 31 May 2014 09:42:49 -0500 Subject: [PATCH 4132/8469] Moved the additions to the change file up, after rebasing. --HG-- branch : develop --- CHANGES.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 73569cc91a..ebc133732b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +----- +3.7.? +----- + +* Issue #185: Make svn tagging work on the new style SVN metadata. + Thanks cazabon! +* Prune revision control directories (e.g .svn) from base path + as well as sub-directories. + --- 3.7 --- @@ -40,15 +49,6 @@ CHANGES * Issue #192: Preferred bootstrap location is now https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). ------ -3.4.5 ------ - -* Issue #185: Applied patch and added regression tests for making - svn tagging work on the new style SVN metadata. -* Prune revision control directories (e.g .svn) from base path - as well as subfolders. - ----- 3.4.4 ----- From 4b47114ca44543adea38110dfabf85c629ec1324 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 31 May 2014 09:48:00 -0500 Subject: [PATCH 4133/8469] Summarize zip_manifest cache changes. --HG-- extra : rebase_source : b4dc90d0244a83083a299600eccce50446ad5846 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8ca55c2ff2..41a8efee48 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +3.9 +--- + +* Issue #154: Cache the reading of the zip file index for cases where the + same zip-file is used for multiple packages (like PEX). + --------------- 3.7.1 and 3.8.1 --------------- From fb44c46001e32f50747eb6135c9fa911e4aac388 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:00:19 +0100 Subject: [PATCH 4134/8469] Added tag 3.7 for changeset 49bd27eebf21 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 81217163cf..c58b00ec30 100644 --- a/.hgtags +++ b/.hgtags @@ -136,3 +136,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 572201d08eadc59210f6f0f28f9dc79f906672d3 3.5.2 e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 292dfca15d33e72a862d044183a6ad7c06862a19 3.7b1 +49bd27eebf212c067392796bb2d0fa6d8e583586 3.7 From 11b6828342b5f34bc593d49b0b13dc23a2eb7a2d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:14:20 +0100 Subject: [PATCH 4135/8469] Use a variable for less busy syntax --- setuptools/dist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 69e0409930..7713bf022d 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -34,11 +34,12 @@ def _get_unpatched(cls): def _patch_distribution_metadata_write_pkg_info(): """ - Workaround issue #197 - Python [3.0 - 3.2.2> uses an environment-local + 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. """ - if not ((3,) <= sys.version_info[:3] < (3, 2, 2)): + environment_local = (3,) <= sys.version_info[:3] < (3, 2, 2) + if not environment_local: return # from Python 3.4 From e565f7fafb1a14bda1125cb13342376c56caaef1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:16:20 +0100 Subject: [PATCH 4136/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3df689332a..4d8aba184e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +3.8 +--- + +* Extend Issue #197 workaround to include all Python 3 versions prior to + 3.2.2. + --- 3.7 --- From 2b41f1de480508dfdc1b9181516cd480277fc1a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:17:06 +0100 Subject: [PATCH 4137/8469] Added tag 3.8 for changeset 2fa97c06cc01 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c58b00ec30..e0b397c441 100644 --- a/.hgtags +++ b/.hgtags @@ -137,3 +137,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 292dfca15d33e72a862d044183a6ad7c06862a19 3.7b1 49bd27eebf212c067392796bb2d0fa6d8e583586 3.7 +2fa97c06cc013a9c82f4c1219711e72238d5b6e6 3.8 From 60da44f7292fbf85cb54285fefda25dfdae88a43 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:17:38 +0100 Subject: [PATCH 4138/8469] Bumped to 3.9 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a78067fe54..f191b954dc 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.8" +DEFAULT_VERSION = "3.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index b413618966..4d51b9ce86 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.8' +__version__ = '3.9' From 109d034dcda2d3578a34811faddabbf90b54f1de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:34:26 +0100 Subject: [PATCH 4139/8469] Remove excess whitespace --HG-- extra : rebase_source : db1f9496cdda75a9467fcfb867b82108773b0443 --- tests/api_tests.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/api_tests.txt b/tests/api_tests.txt index d34f231410..65dba76d0a 100644 --- a/tests/api_tests.txt +++ b/tests/api_tests.txt @@ -418,7 +418,3 @@ Environment Markers >>> em("'yx' in 'x'") False - - - - From 0d688c047fa27b52bc71fb1dc24b30ef8814e1cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jun 2014 21:41:21 +0100 Subject: [PATCH 4140/8469] Perform actual symlink detection; alternate approach to answer Pull Request #53. --HG-- extra : rebase_source : a70141cd6472cd8e4024be4037bfd89e4adcb396 --- setuptools/tests/test_find_packages.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 92f7aff7ca..fe390728c9 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -12,12 +12,26 @@ find_420_packages = setuptools.PEP420PackageFinder.find +# modeled after CPython's test.support.can_symlink +def can_symlink(): + TESTFN = tempfile.mktemp() + symlink_path = TESTFN + "can_symlink" + try: + os.symlink(TESTFN, symlink_path) + can = True + except (OSError, NotImplementedError, AttributeError): + can = False + else: + os.remove(symlink_path) + globals().update(can_symlink=lambda: can) + return can + def has_symlink(): bad_symlink = ( # Windows symlink directory detection is broken on Python 3.2 platform.system() == 'Windows' and sys.version_info[:2] == (3,2) ) - return hasattr(os, 'symlink') and not bad_symlink + return can_symlink() and not bad_symlink class TestFindPackages(unittest.TestCase): From cfd9d789d301f3c1d74afe5a63e6c872ecefede0 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 14 Jun 2014 18:19:04 -0700 Subject: [PATCH 4141/8469] Include the script template files - fixes #220 The rename of the script template files to be .tmpl put them into the realm of package data, rather than python files that would be bundled automatically. Include them specifically in package data so that they'll actually be installed. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6b263702f3..719a1937e1 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,8 @@ def _save_entry_points(self): with changes_file: long_description = readme_file.read() + '\n' + changes_file.read() -package_data = {'setuptools': ['site-patch.py']} +package_data = { + 'setuptools': ['script (dev).tmpl', 'script.tmpl', 'site-patch.py']} force_windows_specific_files = ( os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0") From 47ebcbfebd8e999bc93a6f9797f29a0a70cf17a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:05:28 -0400 Subject: [PATCH 4142/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6186edc9c9..a12b038705 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +5.0.2 +----- + +* Issue #220: Restored script templates. + ----- 5.0.1 ----- From 13c3b04b8899244701fd5b3146a4775df446365d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:05:46 -0400 Subject: [PATCH 4143/8469] Added tag 5.0.2 for changeset 95996b713722 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 09c0876e4b..836fc08a32 100644 --- a/.hgtags +++ b/.hgtags @@ -142,3 +142,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 40744de29b848f0e88139ba91d645c08a56855e9 3.8.1 84d936fd18a93d16c46e68ee2e39f5733f3cd863 5.0 871bd7b4326f48860ebe0baccdaea8fe4f8f8583 5.0.1 +95996b713722376679c3168b15ab12ea8360dd5f 5.0.2 From dc212fd1e1636fbc3bca6d9a1c7cf65ff7d311d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:06:14 -0400 Subject: [PATCH 4144/8469] Bumped to 5.0.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e045f7608c..107ed6906e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.0.2" +DEFAULT_VERSION = "5.0.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 6a92b24477..f30cd813e2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.0.2' +__version__ = '5.0.3' From 912afb62d648e9c872fddc9392b73006e8335d9a Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Mon, 2 Jun 2014 22:23:58 +1000 Subject: [PATCH 4145/8469] Move tests.sh to a tox config --HG-- extra : source : 0d6a065483104cc9781a3ff72c168f059ec11036 --- test.sh | 67 --------------------------------------------------------- tox.ini | 5 +++++ 2 files changed, 5 insertions(+), 67 deletions(-) delete mode 100644 test.sh create mode 100644 tox.ini diff --git a/test.sh b/test.sh deleted file mode 100644 index ed6d4efcb4..0000000000 --- a/test.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -echo -n "Running tests for Python 2.4..." -python2.4 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -echo -n "Running tests for Python 2.5..." -python2.5 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -echo -n "Running tests for Python 2.6..." -python2.6 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -echo -n "Running tests for Python 2.7..." -python2.7 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -rm -rf build -echo -n "Running tests for Python 3.1..." -python3.1 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -rm -rf build -echo -n "Running tests for Python 3.2..." -python3.2 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - -rm -rf build -echo -n "Running tests for Python 3.3..." -python3.3 setup.py -q test > /dev/null 2> /dev/null -if [ $? -ne 0 ];then - echo "Failed" - exit $1 -else - echo "Success" -fi - diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..06421a7344 --- /dev/null +++ b/tox.ini @@ -0,0 +1,5 @@ +[tox] +envlist = py26,py27,py31,py32,py33,py34 +[testenv] +deps=pytest +commands=py.test From 18c255d1e1a83d45a055cfcc0fa3140c775afc0d Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Mon, 2 Jun 2014 22:26:36 +1000 Subject: [PATCH 4146/8469] Use compat's StringIO. Should fix bitbucket #213 https://bitbucket.org/pypa/setuptools/issue/213/regression-setuptools-37-installation --HG-- extra : source : 182f68beacf5e436609fb7d1064a18279cbbd24a --- setuptools/command/egg_info.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9019524db3..04ed635762 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -5,13 +5,12 @@ import os import re import sys -import io from setuptools import Command import distutils.errors from distutils import log from setuptools.command.sdist import sdist -from setuptools.compat import basestring, PY3, unicode +from setuptools.compat import basestring, PY3, StringIO from setuptools import svn_utils from distutils.util import convert_path from distutils.filelist import FileList as _FileList @@ -364,7 +363,7 @@ def _write_requirements(stream, reqs): def write_requirements(cmd, basename, filename): dist = cmd.distribution - data = io.StringIO() if PY3 else io.BytesIO() + data = StringIO() _write_requirements(data, dist.install_requires) extras_require = dist.extras_require or {} for extra in sorted(extras_require): From 087c203263f18b80f1fdc218561d1f065bf309d3 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Mon, 2 Jun 2014 22:34:22 +1000 Subject: [PATCH 4147/8469] Ignore the tox folder --HG-- extra : source : f78ffe97964c6becbf42e946bf6504e8dc09f13b --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index 6eb702bc7d..e2398d342b 100644 --- a/.hgignore +++ b/.hgignore @@ -3,6 +3,7 @@ syntax: glob *~ *.swp .coverage +.tox distribute.egg-info setuptools.egg-info build From 781879a354c5973ba127d87a0e5bdd0c4a10f1a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jun 2014 13:59:37 +0100 Subject: [PATCH 4148/8469] Bumped to 3.7.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1f2468f927..3012fd591b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.7" +DEFAULT_VERSION = "3.7.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 94bcfb0106..380cd80aed 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.7' +__version__ = '3.7.1' From 23601696a493eda013072d76a727454a46b9510a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jun 2014 14:00:45 +0100 Subject: [PATCH 4149/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3df689332a..eb609eb6be 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +3.7.1 +----- + +* Issue #213: Use legacy StringIO behavior for compatibility under pbr. + --- 3.7 --- From 0aea654b193043aef3f73490ac5ca7a38338e743 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jun 2014 14:01:27 +0100 Subject: [PATCH 4150/8469] Added tag 3.7.1 for changeset 9b422fc0b8b9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c58b00ec30..6b6d132661 100644 --- a/.hgtags +++ b/.hgtags @@ -137,3 +137,4 @@ e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 292dfca15d33e72a862d044183a6ad7c06862a19 3.7b1 49bd27eebf212c067392796bb2d0fa6d8e583586 3.7 +9b422fc0b8b97cdb62f02d754283f747adef7f83 3.7.1 From 78ea429dac53a07cde782e04ea2dc2581ae5b74a Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 2 Jun 2014 06:32:59 -0700 Subject: [PATCH 4151/8469] Have git ignore files created by tests When the tests are run, some packages are installed or created in the current directory. They should never be checked in, so add them to .gitignore. Change-Id: Ic7790ec85c9e2f0fc4bd06b492f75ea6c17ecda4 --HG-- extra : rebase_source : 7ad1502fd5d09d38f521a391e22af46cfce6ea4f --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..6167a533f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.tox +py-*.egg +pytest-*.egg From 6f98e16c52f7467d920bea4af3cbd262c6c5f5dc Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 2 Jun 2014 07:34:26 -0700 Subject: [PATCH 4152/8469] Add integration tests. Set up integration tests that install packages to temporary directories. Change-Id: Iec90838fec961228fca24c0decc088de55303350 --HG-- extra : rebase_source : f5219f8411db4b79694a74659e22b0c0b1c771ab --- setuptools/tests/test_integration.py | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 setuptools/tests/test_integration.py diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py new file mode 100644 index 0000000000..fdb8831eaa --- /dev/null +++ b/setuptools/tests/test_integration.py @@ -0,0 +1,87 @@ +"""Run some integration tests. + +Try to install a few packages. +""" + +import glob +import os +import shutil +import site +import sys +import tempfile +import unittest + +import pytest + +from setuptools.command.easy_install import easy_install +from setuptools.command import easy_install as easy_install_pkg +from setuptools.dist import Distribution + + +@pytest.fixture +def install_context(request): + """Fixture to set up temporary installation directory. + """ + # Save old values so we can restore them. + new_cwd = tempfile.mkdtemp() + old_cwd = os.getcwd() + old_enable_site = site.ENABLE_USER_SITE + old_file = easy_install_pkg.__file__ + old_base = site.USER_BASE + old_site = site.USER_SITE + old_ppath = os.environ.get('PYTHONPATH') + + def fin(): + os.chdir(old_cwd) + shutil.rmtree(new_cwd) + shutil.rmtree(site.USER_BASE) + shutil.rmtree(site.USER_SITE) + site.USER_BASE = old_base + site.USER_SITE = old_site + site.ENABLE_USER_SITE = old_enable_site + easy_install_pkg.__file__ = old_file + os.environ['PYTHONPATH'] = old_ppath or '' + request.addfinalizer(fin) + + # Change the environment and site settings to control where the + # files are installed and ensure we do not overwrite anything. + site.USER_BASE = tempfile.mkdtemp() + site.USER_SITE = tempfile.mkdtemp() + easy_install_pkg.__file__ = site.USER_SITE + os.chdir(new_cwd) + install_dir = tempfile.mkdtemp() + sys.path.append(install_dir) + os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) + + # Set up the command for performing the installation. + values = {} + dist = Distribution() + cmd = easy_install(dist) + cmd.install_dir = install_dir + return cmd + + +def _install_one(requirement, cmd, pkgname, modulename): + cmd.args = [requirement] + cmd.ensure_finalized() + cmd.run() + target = cmd.install_dir + dest_path = glob.glob(os.path.join(target, pkgname + '*.egg')) + assert dest_path + assert os.path.exists(os.path.join(dest_path[0], pkgname, modulename)) + +def test_stevedore(install_context): + _install_one('stevedore', install_context, + 'stevedore', 'extension.py') + +# def test_virtualenvwrapper(install_context): +# _install_one('virtualenvwrapper', install_context, +# 'virtualenvwrapper', 'hook_loader.py') + +# def test_pbr(install_context): +# _install_one('pbr', install_context, +# 'pbr', 'core.py') + +# def test_python_novaclient(install_context): +# _install_one('python-novaclient', install_context, +# 'novaclient', 'base.py') From 6168f740b5306903d601d97e30adc28ab64bb612 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 2 Jun 2014 07:44:54 -0700 Subject: [PATCH 4153/8469] update .gitignore from .hgignore Change-Id: I6789ef2eda75748597c9ae76f2a5389140a9daab --HG-- extra : rebase_source : 48bd79fb7ee229a89a3796df14aadbcca8ace016 --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index 6167a533f4..7b00d3c861 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,18 @@ +*.pyc +*~ +*.swp +.coverage .tox +distribute.egg-info +setuptools.egg-info +build +dist +lib +bin +include +\.Python +*.swp +CHANGES (links).txt +.git* py-*.egg pytest-*.egg From 2bd140300eb0aa63b78a930463ca4c81fa2546bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Mon, 2 Jun 2014 16:48:14 +0200 Subject: [PATCH 4154/8469] fix clearing zipimport._zip_directory_cache on pypy pypy uses a custom zipimport._zip_directory_cache implementation class that does not support the complete dict interface, e.g. it does not support the dict.pop() method. For more detailed information see the following links: https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 --HG-- extra : rebase_source : 95cff7946455f0a4422d97eecab11164a9ddef10 --- setuptools/command/easy_install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0bce4ab957..81158c43c5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1678,7 +1678,14 @@ def _replace_zip_directory_cache_data(normalized_path): # documented anywhere and could in theory change with new Python releases) # for no significant benefit. for p in to_update: - old_entry = cache.pop(p) + # N.B. pypy uses a custom zipimport._zip_directory_cache implementation + # class that does not support the complete dict interface, e.g. it does + # not support the dict.pop() method. For more detailed information see + # the following links: + # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 + # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 + old_entry = cache[p] + del cache[p] zipimport.zipimporter(p) old_entry.clear() old_entry.update(cache[p]) From be98378594c42de60ff36e2681ebcecd8dafcd4f Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 2 Jun 2014 08:20:27 -0700 Subject: [PATCH 4155/8469] Activate more of the integration tests. Change-Id: Ic3cc25a02de71b94a08f0bf64e8d8b01b572a23b --HG-- extra : rebase_source : a49971d71570380f1ef51a88897d72328de337ed --- setuptools/tests/test_integration.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index fdb8831eaa..372535ecad 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -74,14 +74,14 @@ def test_stevedore(install_context): _install_one('stevedore', install_context, 'stevedore', 'extension.py') -# def test_virtualenvwrapper(install_context): -# _install_one('virtualenvwrapper', install_context, -# 'virtualenvwrapper', 'hook_loader.py') +def test_virtualenvwrapper(install_context): + _install_one('virtualenvwrapper', install_context, + 'virtualenvwrapper', 'hook_loader.py') -# def test_pbr(install_context): -# _install_one('pbr', install_context, -# 'pbr', 'core.py') +def test_pbr(install_context): + _install_one('pbr', install_context, + 'pbr', 'core.py') -# def test_python_novaclient(install_context): -# _install_one('python-novaclient', install_context, -# 'novaclient', 'base.py') +def test_python_novaclient(install_context): + _install_one('python-novaclient', install_context, + 'novaclient', 'base.py') From 1f7d40e5e48a6f97fe851db93b5e48d8881e713f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 4 Jun 2014 07:57:40 +0200 Subject: [PATCH 4156/8469] update zipimporter cache clearing related code comments --HG-- extra : rebase_source : c8c77d96880275e34c1580991c2d70486b6d0e00 --- setuptools/command/easy_install.py | 56 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 81158c43c5..39911f17ad 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1608,22 +1608,39 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): read a 'bad local file header', or even worse, it may fail silently & return invalid data. + zipimport._zip_directory_cache contains cached zip archive directory + information for all existing zipimport.zipimporter instances and all such + instances connected to the same archive share the same cached directory + information. + If asked, we can fix all existing zipimport.zipimporter instances instead of having to track them down and remove them one by one, by updating their shared cached zip archive directory information. This, of course, assumes that the replacement distribution is packaged as a zipped egg. - If not asked to fix existing zipimport.zipimporter instances, we do our - best to clear any remaining zipimport.zipimporter related cached data that - might somehow later get used when attempting to load data from the new + If not asked to fix existing zipimport.zipimporter instances, we still do + our best to clear any remaining zipimport.zipimporter related cached data + that might somehow later get used when attempting to load data from the new distribution and thus cause such load operations to fail. Note that when - tracking down such remaining stale data, we can not catch every possible + tracking down such remaining stale data, we can not catch every conceivable usage from here, and we clear only those that we know of and have found to cause problems if left alive. Any remaining caches should be updated by whomever is in charge of maintaining them, i.e. they should be ready to handle us replacing their zip archives with new distributions at runtime. """ + # There are several other known sources of stale zipimport.zipimporter + # instances that we do not clear here, but might if ever given a reason to + # do so: + # * Global setuptools pkg_resources.working_set (a.k.a. 'master working + # set') may contain distributions which may in turn contain their + # zipimport.zipimporter loaders. + # * Several zipimport.zipimporter loaders held by local variables further + # up the function call stack when running the setuptools installation. + # * Already loaded modules may have their __loader__ attribute set to the + # exact loader instance used when importing them. Python 3.4 docs state + # that this information is intended mostly for introspection and so is + # not expected to cause us problems. normalized_path = normalize_path(dist_path) _uncache(normalized_path, sys.path_importer_cache) if fix_zipimporter_caches: @@ -1632,24 +1649,13 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): # Clear the relevant zipimport._zip_directory_cache data. This will not # remove related zipimport.zipimporter instances but should at least # not leave the old zip archive directory data behind to be reused by - # some newly created zipimport.zipimporter loaders. Not strictly - # necessary, but left in because this cache clearing was done before - # we started replacing the zipimport._zip_directory_cache if possible, - # and there are no relevent unit tests that we can depend on to tell us - # if this is really needed. + # some newly created zipimport.zipimporter loaders. This whole stale + # data removal step does not seem strictly necessary, but has been left + # in because it was done before we started replacing the zip archive + # directory information cache content if possible, and there are no + # relevant unit tests that we can depend on to tell us if this is + # really needed. _uncache(normalized_path, zipimport._zip_directory_cache) - # N.B. Other known sources of stale zipimport.zipimporter instances - # that we do not clear here, but might if ever given a reason to do so. - # * Global setuptools pkg_resources.working_set (a.k.a. 'master working - # set') may contain distributions which may in turn contain their - # zipimport.zipimporter loaders. - # * Several zipimport.zipimporter loaders held by local variables - # further up the function call stack when running the setuptools - # installation. - # * Already loaded modules may have their __loader__ attribute set to - # the exact loader instance used when importing them. Python 3.4 docs - # state that this information is intended mostly for introspection - # and so is not expected to cause us problems. def _uncache(normalized_path, cache): to_remove = [] @@ -1678,10 +1684,10 @@ def _replace_zip_directory_cache_data(normalized_path): # documented anywhere and could in theory change with new Python releases) # for no significant benefit. for p in to_update: - # N.B. pypy uses a custom zipimport._zip_directory_cache implementation - # class that does not support the complete dict interface, e.g. it does - # not support the dict.pop() method. For more detailed information see - # the following links: + # N.B. pypy's custom zipimport._zip_directory_cache implementation does + # not support the complete dict interface, e.g. it does not support the + # dict.pop() method. For more detailed information see the following + # links: # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 old_entry = cache[p] From bbdcce69110d8783f21c121bc97fc902809aedf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 4 Jun 2014 08:03:41 +0200 Subject: [PATCH 4157/8469] extract duplicate code Extracted code for collecting a list of zipimporter cache entries related to a given path into _collect_zipimporter_cache_entries(). --HG-- extra : rebase_source : 54ab881d794f95467e811511433a2cd31595339e --- setuptools/command/easy_install.py | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 39911f17ad..3f60fae58d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1657,33 +1657,38 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): # really needed. _uncache(normalized_path, zipimport._zip_directory_cache) -def _uncache(normalized_path, cache): - to_remove = [] +def _collect_zipimporter_cache_entries(normalized_path, cache): + """ + Return zipimporter cache entry keys related to a given normalized path. + + Alternative path spellings (e.g. those using different character case or + those using alternative path separators) related to the same path are + included. Any sub-path entries are included as well, i.e. those + corresponding to zip archives embedded in other zip archives. + + """ + result = [] prefix_len = len(normalized_path) for p in cache: np = normalize_path(p) if (np.startswith(normalized_path) and np[prefix_len:prefix_len + 1] in (os.sep, '')): - to_remove.append(p) - for p in to_remove: + result.append(p) + return result + +def _uncache(normalized_path, cache): + for p in _collect_zipimporter_cache_entries(normalized_path, cache): del cache[p] def _replace_zip_directory_cache_data(normalized_path): - cache = zipimport._zip_directory_cache - to_update = [] - prefix_len = len(normalized_path) - for p in cache: - np = normalize_path(p) - if (np.startswith(normalized_path) and - np[prefix_len:prefix_len + 1] in (os.sep, '')): - to_update.append(p) # N.B. In theory, we could load the zip directory information just once for # all updated path spellings, and then copy it locally and update its # contained path strings to contain the correct spelling, but that seems # like a way too invasive move (this cache structure is not officially # documented anywhere and could in theory change with new Python releases) # for no significant benefit. - for p in to_update: + cache = zipimport._zip_directory_cache + for p in _collect_zipimporter_cache_entries(normalized_path, cache): # N.B. pypy's custom zipimport._zip_directory_cache implementation does # not support the complete dict interface, e.g. it does not support the # dict.pop() method. For more detailed information see the following From 9101bdd5f3d0e9c45f8300045a2dc18ebbde3bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 4 Jun 2014 08:21:39 +0200 Subject: [PATCH 4158/8469] extract function for updating zipimporter cache data _update_zipimporter_cache() extracted from _uncache() & _replace_zip_directory_cache_data(). Code cleanup done in preparation for adding a bit more detailed cache item clearing logic, so that would not require adding a separate function with yet more code duplication. --HG-- extra : rebase_source : e2e956e042c7cbfabe2c31ecc58a4f76c91f40aa --- setuptools/command/easy_install.py | 49 +++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3f60fae58d..0695ed8f88 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1676,18 +1676,21 @@ def _collect_zipimporter_cache_entries(normalized_path, cache): result.append(p) return result -def _uncache(normalized_path, cache): - for p in _collect_zipimporter_cache_entries(normalized_path, cache): - del cache[p] +def _update_zipimporter_cache(normalized_path, cache, updater=None): + """ + Update zipimporter cache data for a given normalized path. -def _replace_zip_directory_cache_data(normalized_path): - # N.B. In theory, we could load the zip directory information just once for - # all updated path spellings, and then copy it locally and update its - # contained path strings to contain the correct spelling, but that seems - # like a way too invasive move (this cache structure is not officially - # documented anywhere and could in theory change with new Python releases) - # for no significant benefit. - cache = zipimport._zip_directory_cache + Any sub-path entries are processed as well, i.e. those corresponding to zip + archives embedded in other zip archives. + + Given updater is a callable taking a cache entry key and the original entry + (after already removing the entry from the cache), and expected to update + the entry and possibly return a new one to be inserted in its place. + Returning None indicates that the entry should not be replaced with a new + one. If no updater is given, the cache entries are simply removed without + any additional processing, the same as if the updater simply returned None. + + """ for p in _collect_zipimporter_cache_entries(normalized_path, cache): # N.B. pypy's custom zipimport._zip_directory_cache implementation does # not support the complete dict interface, e.g. it does not support the @@ -1697,10 +1700,28 @@ def _replace_zip_directory_cache_data(normalized_path): # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 old_entry = cache[p] del cache[p] - zipimport.zipimporter(p) + new_entry = updater and updater(p, old_entry) + if new_entry is not None: + cache[p] = new_entry + +def _uncache(normalized_path, cache): + _update_zipimporter_cache(normalized_path, cache) + +def _replace_zip_directory_cache_data(normalized_path): + def replace_cached_zip_archive_directory_data(path, old_entry): + # N.B. In theory, we could load the zip directory information just once + # for all updated path spellings, and then copy it locally and update + # its contained path strings to contain the correct spelling, but that + # seems like a way too invasive move (this cache structure is not + # officially documented anywhere and could in theory change with new + # Python releases) for no significant benefit. old_entry.clear() - old_entry.update(cache[p]) - cache[p] = old_entry + zipimport.zipimporter(path) + old_entry.update(zipimport._zip_directory_cache[path]) + return old_entry + _update_zipimporter_cache(normalized_path, + zipimport._zip_directory_cache, + updater=replace_cached_zip_archive_directory_data) def is_python(text, filename=''): "Is this string a valid Python script?" From 3e6ecb094f15ac981c69950d6d1599ec2e4fc250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Wed, 4 Jun 2014 11:32:02 +0200 Subject: [PATCH 4159/8469] clear cached zip archive directory data when removing it from cache This is an extra safety measure to avoid someone holding a reference to this cached data and using its content even after we know that the underlying zip archive has been removed and possibly even replaced. Change suggested by PJ Eby (pje on BitBucket) in a setuptools pull request #51 comment: https://bitbucket.org/pypa/setuptools/pull-request/51/diff#comment-2018183 --HG-- extra : rebase_source : 6de2309bc7446647749cfe78ab00e0230a07f92f --- setuptools/command/easy_install.py | 32 ++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0695ed8f88..12299f4f3b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1646,16 +1646,21 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): if fix_zipimporter_caches: _replace_zip_directory_cache_data(normalized_path) else: - # Clear the relevant zipimport._zip_directory_cache data. This will not - # remove related zipimport.zipimporter instances but should at least - # not leave the old zip archive directory data behind to be reused by - # some newly created zipimport.zipimporter loaders. This whole stale - # data removal step does not seem strictly necessary, but has been left - # in because it was done before we started replacing the zip archive - # directory information cache content if possible, and there are no - # relevant unit tests that we can depend on to tell us if this is - # really needed. - _uncache(normalized_path, zipimport._zip_directory_cache) + # Here, even though we do not want to fix existing and now stale + # zipimporter cache information, we still want to remove it. Related to + # Python's zip archive directory information cache, we clear each of + # its stale entries in two phases: + # 1. Clear the entry so attempting to access zip archive information + # via any existing stale zipimport.zipimporter instances fails. + # 2. Remove the entry from the cache so any newly constructed + # zipimport.zipimporter instances do not end up using old stale + # zip archive directory information. + # This whole stale data removal step does not seem strictly necessary, + # but has been left in because it was done before we started replacing + # the zip archive directory information cache content if possible, and + # there are no relevant unit tests that we can depend on to tell us if + # this is really needed. + _remove_and_clear_zip_directory_cache_data(normalized_path) def _collect_zipimporter_cache_entries(normalized_path, cache): """ @@ -1723,6 +1728,13 @@ def replace_cached_zip_archive_directory_data(path, old_entry): zipimport._zip_directory_cache, updater=replace_cached_zip_archive_directory_data) +def _remove_and_clear_zip_directory_cache_data(normalized_path): + def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): + old_entry.clear() + _update_zipimporter_cache(normalized_path, + zipimport._zip_directory_cache, + updater=clear_and_remove_cached_zip_archive_directory_data) + def is_python(text, filename=''): "Is this string a valid Python script?" try: From 8adde1b89adf54a06a9ed5f46917fe83f0de676d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 09:03:43 -0400 Subject: [PATCH 4160/8469] Bumped to 3.8.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f191b954dc..66be176e36 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.9" +DEFAULT_VERSION = "3.8.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 4d51b9ce86..64e0fe00ba 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.9' +__version__ = '3.8.1' From 17e27eec34d541525b7d6b83dd43797b8edc5ab9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 09:03:44 -0400 Subject: [PATCH 4161/8469] Added tag 3.8.1 for changeset 40744de29b84 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7afaf6e814..acb4161d77 100644 --- a/.hgtags +++ b/.hgtags @@ -139,3 +139,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 49bd27eebf212c067392796bb2d0fa6d8e583586 3.7 2fa97c06cc013a9c82f4c1219711e72238d5b6e6 3.8 9b422fc0b8b97cdb62f02d754283f747adef7f83 3.7.1 +40744de29b848f0e88139ba91d645c08a56855e9 3.8.1 From c7366f281eb21ccd7697d4bdcb9b616a65f837ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 09:04:18 -0400 Subject: [PATCH 4162/8469] Bumped to 3.8.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 66be176e36..a10d971218 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.8.1" +DEFAULT_VERSION = "3.8.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 64e0fe00ba..5b2ac99513 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.8.1' +__version__ = '3.8.2' From 888950096b1d4f6263a726b6cc1bef7a26bb67ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 10:31:21 -0400 Subject: [PATCH 4163/8469] Reorganize imports --- setuptools/command/develop.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 129184cad0..195ec41235 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -1,10 +1,12 @@ -from setuptools.command.easy_install import easy_install -from distutils.util import convert_path, subst_vars -from pkg_resources import Distribution, PathMetadata, normalize_path +import os +import glob +from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError -import os, sys, setuptools, glob +import setuptools +from pkg_resources import Distribution, PathMetadata, normalize_path +from setuptools.command.easy_install import easy_install from setuptools.compat import PY3 class develop(easy_install): @@ -166,4 +168,3 @@ def install_egg_scripts(self, dist): script_text = f.read() f.close() self.install_script(dist, script_name, script_text, script_path) - From c0c0a82890bf8d06510f563aa3d01a69491ff86e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 10:34:44 -0400 Subject: [PATCH 4164/8469] Normalize whitespace --- setuptools/command/develop.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 195ec41235..74d129490e 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -38,20 +38,14 @@ def initialize_options(self): self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir - - def finalize_options(self): ei = self.get_finalized_command("egg_info") if ei.broken_egg_info: - raise DistutilsError( - "Please rename %r to %r before using 'develop'" - % (ei.egg_info, ei.broken_egg_info) - ) + template = "Please rename %r to %r before using 'develop'" + args = ei.egg_info, ei.broken_egg_info + raise DistutilsError(template % args) self.args = [ei.egg_name] - - - easy_install.finalize_options(self) self.expand_basedirs() self.expand_dirs() @@ -64,11 +58,12 @@ def finalize_options(self): self.egg_path = os.path.abspath(ei.egg_base) target = normalize_path(self.egg_base) - if normalize_path(os.path.join(self.install_dir, self.egg_path)) != target: + egg_path = normalize_path(os.path.join(self.install_dir, self.egg_path)) + if egg_path != target: raise DistutilsOptionError( "--egg-path must be a relative path from the install" " directory to "+target - ) + ) # Make a distribution for the package's source self.dist = Distribution( @@ -82,7 +77,7 @@ def finalize_options(self): p = '../' * (p.count('/')+1) self.setup_path = p p = normalize_path(os.path.join(self.install_dir, self.egg_path, p)) - if p != normalize_path(os.curdir): + if p != normalize_path(os.curdir): raise DistutilsOptionError( "Can't get a consistent path to setup script from" " installation directory", p, normalize_path(os.curdir)) @@ -132,7 +127,6 @@ def install_for_development(self): # and handling requirements self.process_distribution(None, self.dist, not self.no_deps) - def uninstall_link(self): if os.path.exists(self.egg_link): log.info("Removing %s (link to %s)", self.egg_link, self.egg_base) From 32beecb7ba01a9dad01068622cb365431f3a756a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 10:42:47 -0400 Subject: [PATCH 4165/8469] Now that 2to3 is no longer run on the codebase, it's safe for the templates to be syntactically incorrect (prior to substitution). --- setuptools/command/easy_install.py | 8 +------- setuptools/script template (dev).py | 6 +++--- setuptools/script template.py | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ad7f472512..19ed12590c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -743,15 +743,9 @@ def get_template(filename): """ There are a couple of template scripts in the package. This function loads one of them and prepares it for use. - - These templates use triple-quotes to escape variable - substitutions so the scripts get the 2to3 treatment when build - on Python 3. The templates cannot use triple-quotes naturally. """ raw_bytes = resource_string('setuptools', template_name) - template_str = raw_bytes.decode('utf-8') - clean_template = template_str.replace('"""', '') - return clean_template + return raw_bytes.decode('utf-8') if is_script: # See https://bitbucket.org/pypa/setuptools/issue/134 for info diff --git a/setuptools/script template (dev).py b/setuptools/script template (dev).py index b3fe209ecb..c476673f94 100644 --- a/setuptools/script template (dev).py +++ b/setuptools/script template (dev).py @@ -1,10 +1,10 @@ # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r -__requires__ = """%(spec)r""" +__requires__ = %(spec)r import sys from pkg_resources import require -require("""%(spec)r""") +require(%(spec)r) del require -__file__ = """%(dev_path)r""" +__file__ = %(dev_path)r if sys.version_info < (3, 0): execfile(__file__) else: diff --git a/setuptools/script template.py b/setuptools/script template.py index 8dd5d51001..4504e26453 100644 --- a/setuptools/script template.py +++ b/setuptools/script template.py @@ -1,4 +1,4 @@ # EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r -__requires__ = """%(spec)r""" +__requires__ = %(spec)r import pkg_resources -pkg_resources.run_script("""%(spec)r""", """%(script_name)r""") +pkg_resources.run_script(%(spec)r, %(script_name)r) From 5c08ba7d5c14f27fa44b6b8278a8f3cbbbbc8614 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 11:01:06 -0400 Subject: [PATCH 4166/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b020e5331f..8ca55c2ff2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ CHANGES --------------- * Issue #213: Use legacy StringIO behavior for compatibility under pbr. +* Issue #218: Setuptools 3.8.1 superseded 4.0.1, and 4.x was removed + from the available versions to install. --- 3.8 From 39029c39265fa41750d39ec181200cd7379638d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 11:25:18 -0400 Subject: [PATCH 4167/8469] Remove excess whitespace --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 1df322b6ff..796fd9c3f5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1548,7 +1548,7 @@ def build_manifest(self, path): """ This builds a similar dictionary to the zipimport directory caches. However instead of tuples, ZipInfo objects are stored. - + The translation of the tuple is as follows: * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep on pypy it is the same (one reason why distribute did work From fd0d9ace552a4fce85abcc622bdec9dc27f8c57d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 11:32:18 -0400 Subject: [PATCH 4168/8469] Subclass dict rather that wrap and proxy. --- pkg_resources.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 796fd9c3f5..323b28c8e8 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1530,19 +1530,16 @@ def __init__(self): empty_provider = EmptyProvider() -class ZipManifests(object): - - def __init__(self): - self.known = dict() +class ZipManifests(dict): def __call__(self, path): path = os.path.normpath(path) stat = os.stat(path) - if path not in self.known or self.known[path][0] != stat.st_mtime: - self.known[path] = (stat.st_mtime, self.build_manifest(path)) + if path not in self or self[path][0] != stat.st_mtime: + self[path] = (stat.st_mtime, self.build_manifest(path)) - return self.known[path][1] + return self[path][1] def build_manifest(self, path): """ From 9348f13b70fee8de254c8898d2a7840c4286eac1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 11:53:14 -0400 Subject: [PATCH 4169/8469] Expose a method describing what it does, and alias that to 'call'. --- pkg_resources.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 323b28c8e8..42153d36e2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1531,8 +1531,14 @@ def __init__(self): class ZipManifests(dict): + """ + Memoized zipfile manifests. + """ - def __call__(self, path): + def load(self, path): + """ + Load a manifest at path or return a suitable manifest already loaded. + """ path = os.path.normpath(path) stat = os.stat(path) @@ -1540,6 +1546,7 @@ def __call__(self, path): self[path] = (stat.st_mtime, self.build_manifest(path)) return self[path][1] + __call__ = load def build_manifest(self, path): """ From dfcbd73ce9160ae691910e088ae9013b22a4a78e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:01:31 -0400 Subject: [PATCH 4170/8469] Implement 'build_manifest' as a classmethod. Rename to 'build' because Manifests is already in the classname. --- pkg_resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 42153d36e2..d12e93539f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1543,12 +1543,13 @@ def load(self, path): stat = os.stat(path) if path not in self or self[path][0] != stat.st_mtime: - self[path] = (stat.st_mtime, self.build_manifest(path)) + self[path] = (stat.st_mtime, self.build(path)) return self[path][1] __call__ = load - def build_manifest(self, path): + @classmethod + def build(cls, path): """ This builds a similar dictionary to the zipimport directory caches. However instead of tuples, ZipInfo objects are stored. From 434df30acd39f412816773aca4a1d19e78a631be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:07:27 -0400 Subject: [PATCH 4171/8469] Rewrite construct/append loop with simple iterator. --- pkg_resources.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index d12e93539f..ca29ed66f2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1569,13 +1569,15 @@ def build(cls, path): zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) * [7] - zipinfo.CRC """ - zipinfo = dict() with ContextualZipFile(path) as zfile: - for zitem in zfile.namelist(): - zpath = zitem.replace('/', os.sep) - zipinfo[zpath] = zfile.getinfo(zitem) - assert zipinfo[zpath] is not None - return zipinfo + items = ( + ( + name.replace('/', os.sep), + zfile.getinfo(name), + ) + for name in zfile.namelist() + ) + return dict(items) build_zipmanifest = ZipManifests() From ca53b24b61d36165b173b590a1da8ac3bec963f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:09:10 -0400 Subject: [PATCH 4172/8469] Use direct voice --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index ca29ed66f2..e4ba9abfef 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1551,8 +1551,8 @@ def load(self, path): @classmethod def build(cls, path): """ - This builds a similar dictionary to the zipimport directory - caches. However instead of tuples, ZipInfo objects are stored. + Build a dictionary similar to the zipimport directory + caches, except instead of tuples, store ZipInfo objects. The translation of the tuple is as follows: * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep From 2e35b91ed2d5b6dc5be9d92e485a9915da4b83f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:11:45 -0400 Subject: [PATCH 4173/8469] Remove documentation which seems irrelevant to this method. --- pkg_resources.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index e4ba9abfef..d124cb9acf 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1554,20 +1554,8 @@ def build(cls, path): Build a dictionary similar to the zipimport directory caches, except instead of tuples, store ZipInfo objects. - The translation of the tuple is as follows: - * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep - on pypy it is the same (one reason why distribute did work - in some cases on pypy and win32). - * [1] - zipinfo.compress_type - * [2] - zipinfo.compress_size - * [3] - zipinfo.file_size - * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 - len(ascii encoding of filename) otherwise - * [5] - (zipinfo.date_time[0] - 1980) << 9 | - zipinfo.date_time[1] << 5 | zipinfo.date_time[2] - * [6] - (zipinfo.date_time[3] - 1980) << 11 | - zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) - * [7] - zipinfo.CRC + Use a platform-specific path separator (os.sep) for the path keys + for compatibility with pypy on Windows. """ with ContextualZipFile(path) as zfile: items = ( From 8b16c25b199767f86350fff7dfff877fd38ed48c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:14:13 -0400 Subject: [PATCH 4174/8469] Use a more appropriate name and invoke .load directly. --- pkg_resources.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index d124cb9acf..e88f0d8baa 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1546,7 +1546,6 @@ def load(self, path): self[path] = (stat.st_mtime, self.build(path)) return self[path][1] - __call__ = load @classmethod def build(cls, path): @@ -1566,7 +1565,7 @@ def build(cls, path): for name in zfile.namelist() ) return dict(items) -build_zipmanifest = ZipManifests() +zip_manifests = ZipManifests() class ContextualZipFile(zipfile.ZipFile): @@ -1618,7 +1617,7 @@ def _parts(self, zip_path): @property def zipinfo(self): - return build_zipmanifest(self.loader.archive) # memoized + return zip_manifests.load(self.loader.archive) def get_resource_filename(self, manager, resource_name): if not self.egg_name: From 7b7c55a2353dc5af925174e585bfa3d2200343f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:22:53 -0400 Subject: [PATCH 4175/8469] Stat is never reused --- pkg_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index e88f0d8baa..1100978a43 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1540,10 +1540,10 @@ def load(self, path): Load a manifest at path or return a suitable manifest already loaded. """ path = os.path.normpath(path) - stat = os.stat(path) + mtime = os.stat(path).st_mtime - if path not in self or self[path][0] != stat.st_mtime: - self[path] = (stat.st_mtime, self.build(path)) + if path not in self or self[path][0] != mtime: + self[path] = (mtime, self.build(path)) return self[path][1] From 2c729473ff7838c9206b792b50bdea123fef2e4c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:27:18 -0400 Subject: [PATCH 4176/8469] Use a namedtuple to avoid numeric indexes --- pkg_resources.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 1100978a43..2151082bdf 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -29,6 +29,7 @@ import symbol import operator import platform +import collections from pkgutil import get_importer try: @@ -1534,6 +1535,7 @@ class ZipManifests(dict): """ Memoized zipfile manifests. """ + manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime') def load(self, path): """ @@ -1542,10 +1544,11 @@ def load(self, path): path = os.path.normpath(path) mtime = os.stat(path).st_mtime - if path not in self or self[path][0] != mtime: - self[path] = (mtime, self.build(path)) + if path not in self or self[path].mtime != mtime: + manifest = self.build(path) + self[path] = self.manifest_mod(manifest, mtime) - return self[path][1] + return self[path].manifest @classmethod def build(cls, path): From 80661eaf5a8e016db73bfd8b1ecc3384aa666fcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:54:47 -0400 Subject: [PATCH 4177/8469] Update changelog --- CHANGES.txt | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8ca55c2ff2..94689f0a50 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,14 +2,27 @@ CHANGES ======= ---------------- -3.7.1 and 3.8.1 ---------------- +--- +5.0 +--- + +* Issue #218: Re-release of 3.8.1 to signal that it supersedes 4.x. + +------------------------- +3.7.1 and 3.8.1 and 4.0.1 +------------------------- * Issue #213: Use legacy StringIO behavior for compatibility under pbr. * Issue #218: Setuptools 3.8.1 superseded 4.0.1, and 4.x was removed from the available versions to install. +--- +4.0 +--- + +* Issue #210: ``setup.py develop`` now copies scripts in binary mode rather + than text mode, matching the behavior of the ``install`` command. + --- 3.8 --- From c5bfbfcffea2168b8a4c05806fb1b9184eaf4206 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:55:13 -0400 Subject: [PATCH 4178/8469] Bumped to 5.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a10d971218..9072a09c1c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.8.2" +DEFAULT_VERSION = "5.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 5b2ac99513..647ffb047b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '3.8.2' +__version__ = '5.0' From 8f8ecd70680ce981c5ebc4f0dbcb404fddc60cba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:55:15 -0400 Subject: [PATCH 4179/8469] Added tag 5.0 for changeset 84d936fd18a9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index acb4161d77..f71fbe327a 100644 --- a/.hgtags +++ b/.hgtags @@ -140,3 +140,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 2fa97c06cc013a9c82f4c1219711e72238d5b6e6 3.8 9b422fc0b8b97cdb62f02d754283f747adef7f83 3.7.1 40744de29b848f0e88139ba91d645c08a56855e9 3.8.1 +84d936fd18a93d16c46e68ee2e39f5733f3cd863 5.0 From 35d3732c71a391367bb2f77d3cec1b254daa2287 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 12:55:44 -0400 Subject: [PATCH 4180/8469] Bumped to 5.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9072a09c1c..10d299bfe5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.0" +DEFAULT_VERSION = "5.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 647ffb047b..59ff8876c1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.0' +__version__ = '5.1' From 6401988885a42d3f4c612c20973948b7b4cab7a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 14:41:05 -0400 Subject: [PATCH 4181/8469] Rename script template to use .tmpl extensions. --HG-- rename : setuptools/script template (dev).py => setuptools/script (dev).tmpl rename : setuptools/script template.py => setuptools/script.tmpl --- CHANGES.txt | 7 +++++++ setuptools/command/easy_install.py | 4 ++-- setuptools/{script template (dev).py => script (dev).tmpl} | 0 setuptools/{script template.py => script.tmpl} | 0 4 files changed, 9 insertions(+), 2 deletions(-) rename setuptools/{script template (dev).py => script (dev).tmpl} (100%) rename setuptools/{script template.py => script.tmpl} (100%) diff --git a/CHANGES.txt b/CHANGES.txt index 94689f0a50..6186edc9c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +5.0.1 +----- + +* Renamed script templates to end with .tmpl now that they no longer need + to be processed by 2to3. Fixes spurious syntax errors during build/install. + --- 5.0 --- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 19ed12590c..cc5ddbd600 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -750,9 +750,9 @@ def get_template(filename): if is_script: # See https://bitbucket.org/pypa/setuptools/issue/134 for info # on script file naming and downstream issues with SVR4 - template_name = 'script template.py' + template_name = 'script.tmpl' if dev_path: - template_name = template_name.replace('.py', ' (dev).py') + template_name = template_name.replace('.tmpl', ' (dev).tmpl') script_text = (get_script_header(script_text) + get_template(template_name) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') diff --git a/setuptools/script template (dev).py b/setuptools/script (dev).tmpl similarity index 100% rename from setuptools/script template (dev).py rename to setuptools/script (dev).tmpl diff --git a/setuptools/script template.py b/setuptools/script.tmpl similarity index 100% rename from setuptools/script template.py rename to setuptools/script.tmpl From b0766e6833f77f2d01cf00f9ebd52edbfe6fbd9c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 16:13:46 -0400 Subject: [PATCH 4182/8469] Bumped to 5.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 10d299bfe5..414ee8b843 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.1" +DEFAULT_VERSION = "5.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 59ff8876c1..3d96b2761b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.1' +__version__ = '5.0.1' From ec99bec719f468dfd08ee7938f3664bf111c7da4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 16:13:47 -0400 Subject: [PATCH 4183/8469] Added tag 5.0.1 for changeset 871bd7b4326f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f71fbe327a..09c0876e4b 100644 --- a/.hgtags +++ b/.hgtags @@ -141,3 +141,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 9b422fc0b8b97cdb62f02d754283f747adef7f83 3.7.1 40744de29b848f0e88139ba91d645c08a56855e9 3.8.1 84d936fd18a93d16c46e68ee2e39f5733f3cd863 5.0 +871bd7b4326f48860ebe0baccdaea8fe4f8f8583 5.0.1 From 1f83ddb9a7817c02cf93caceeb8b0e3d9dbebeaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Jun 2014 16:14:15 -0400 Subject: [PATCH 4184/8469] Bumped to 5.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 414ee8b843..e045f7608c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.0.1" +DEFAULT_VERSION = "5.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 3d96b2761b..6a92b24477 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.0.1' +__version__ = '5.0.2' From 80fe9c804ef7f69283cdd6e68e3b2f2da4e6f549 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:14:12 -0400 Subject: [PATCH 4185/8469] Extract embedded function as protected staticmethod. --HG-- extra : rebase_source : 04b4807ccc7bf95d87797716f5d3488d420fa692 --- setuptools/command/easy_install.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index cc5ddbd600..32852e07fd 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -739,14 +739,6 @@ def install_script(self, dist, script_name, script_text, dev_path=None): spec = str(dist.as_requirement()) is_script = is_python_script(script_text, script_name) - def get_template(filename): - """ - There are a couple of template scripts in the package. This - function loads one of them and prepares it for use. - """ - raw_bytes = resource_string('setuptools', template_name) - return raw_bytes.decode('utf-8') - if is_script: # See https://bitbucket.org/pypa/setuptools/issue/134 for info # on script file naming and downstream issues with SVR4 @@ -754,9 +746,18 @@ def get_template(filename): if dev_path: template_name = template_name.replace('.tmpl', ' (dev).tmpl') script_text = (get_script_header(script_text) + - get_template(template_name) % locals()) + self._load_template(template_name) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') + @staticmethod + def _load_template(name): + """ + There are a couple of template scripts in the package. This + function loads one of them and prepares it for use. + """ + raw_bytes = resource_string('setuptools', name) + return raw_bytes.decode('utf-8') + def write_script(self, script_name, contents, mode="t", blockers=()): """Write an executable file to the scripts directory""" self.delete_blockers( # clean up old .py/.pyw w/o a script From 99475b7b9ca2650e265fb1d889710865f1fa35f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:31:33 -0400 Subject: [PATCH 4186/8469] Moved filename resolution into _load_template --HG-- extra : rebase_source : beb6c57dfd500432304518b9d313d1a98e2614b9 --- setuptools/command/easy_install.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 32852e07fd..a8ee6063b0 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -740,21 +740,22 @@ def install_script(self, dist, script_name, script_text, dev_path=None): is_script = is_python_script(script_text, script_name) if is_script: - # See https://bitbucket.org/pypa/setuptools/issue/134 for info - # on script file naming and downstream issues with SVR4 - template_name = 'script.tmpl' - if dev_path: - template_name = template_name.replace('.tmpl', ' (dev).tmpl') script_text = (get_script_header(script_text) + - self._load_template(template_name) % locals()) + self._load_template(dev_path) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') @staticmethod - def _load_template(name): + def _load_template(dev_path): """ There are a couple of template scripts in the package. This function loads one of them and prepares it for use. """ + # See https://bitbucket.org/pypa/setuptools/issue/134 for info + # on script file naming and downstream issues with SVR4 + name = 'script.tmpl' + if dev_path: + name = name.replace('.tmpl', ' (dev).tmpl') + raw_bytes = resource_string('setuptools', name) return raw_bytes.decode('utf-8') From 7f5307b04dfcd19cc3d894a921bfa85160369d6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:46:38 -0400 Subject: [PATCH 4187/8469] Remove unused variable and import --- setuptools/tests/test_integration.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 372535ecad..0565e92602 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -9,7 +9,6 @@ import site import sys import tempfile -import unittest import pytest @@ -54,7 +53,6 @@ def fin(): os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) # Set up the command for performing the installation. - values = {} dist = Distribution() cmd = easy_install(dist) cmd.install_dir = install_dir From def90a0a72012590fccd9a8bc0e247242f09b795 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 08:47:16 -0400 Subject: [PATCH 4188/8469] Mark failing tests as xfail --- setuptools/tests/test_integration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 0565e92602..3938ccc503 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -72,14 +72,17 @@ def test_stevedore(install_context): _install_one('stevedore', install_context, 'stevedore', 'extension.py') +@pytest.mark.xfail def test_virtualenvwrapper(install_context): _install_one('virtualenvwrapper', install_context, 'virtualenvwrapper', 'hook_loader.py') +@pytest.mark.xfail def test_pbr(install_context): _install_one('pbr', install_context, 'pbr', 'core.py') +@pytest.mark.xfail def test_python_novaclient(install_context): _install_one('python-novaclient', install_context, 'novaclient', 'base.py') From 7fecd7a9665f9710c609b6f8fd8227e126d99ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Sun, 15 Jun 2014 16:30:27 +0200 Subject: [PATCH 4189/8469] remove instead of fix stale zipimport._zip_directory_cache data on PyPy PyPy's zipimport._zip_directory_cache implementation does not support direct item assignment, thus breaking our attempts at silently updating the cached zip archive directory information behind the scene. As a workaround, when using PyPy, we fall back to simply clearing the stale cached information. --HG-- extra : amend_source : 991e30244754d8fac042da56ac4cf0ad1a0f50d5 --- setuptools/command/easy_install.py | 67 +++++++++++++++++++----------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 12299f4f3b..65e3dc8c56 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1613,10 +1613,11 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): instances connected to the same archive share the same cached directory information. - If asked, we can fix all existing zipimport.zipimporter instances instead - of having to track them down and remove them one by one, by updating their - shared cached zip archive directory information. This, of course, assumes - that the replacement distribution is packaged as a zipped egg. + If asked, and the underlying Python implementation allows it, we can fix + all existing zipimport.zipimporter instances instead of having to track + them down and remove them one by one, by updating their shared cached zip + archive directory information. This, of course, assumes that the + replacement distribution is packaged as a zipped egg. If not asked to fix existing zipimport.zipimporter instances, we still do our best to clear any remaining zipimport.zipimporter related cached data @@ -1698,11 +1699,14 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): """ for p in _collect_zipimporter_cache_entries(normalized_path, cache): # N.B. pypy's custom zipimport._zip_directory_cache implementation does - # not support the complete dict interface, e.g. it does not support the - # dict.pop() method. For more detailed information see the following - # links: - # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 - # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 + # not support the complete dict interface: + # * Does not support item assignment, thus not allowing this function + # to be used only for removing existing cache entries. + # * Does not support the dict.pop() method, forcing us to use the + # get/del patterns instead. For more detailed information see the + # following links: + # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 + # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 old_entry = cache[p] del cache[p] new_entry = updater and updater(p, old_entry) @@ -1712,22 +1716,6 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): def _uncache(normalized_path, cache): _update_zipimporter_cache(normalized_path, cache) -def _replace_zip_directory_cache_data(normalized_path): - def replace_cached_zip_archive_directory_data(path, old_entry): - # N.B. In theory, we could load the zip directory information just once - # for all updated path spellings, and then copy it locally and update - # its contained path strings to contain the correct spelling, but that - # seems like a way too invasive move (this cache structure is not - # officially documented anywhere and could in theory change with new - # Python releases) for no significant benefit. - old_entry.clear() - zipimport.zipimporter(path) - old_entry.update(zipimport._zip_directory_cache[path]) - return old_entry - _update_zipimporter_cache(normalized_path, - zipimport._zip_directory_cache, - updater=replace_cached_zip_archive_directory_data) - def _remove_and_clear_zip_directory_cache_data(normalized_path): def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): old_entry.clear() @@ -1735,6 +1723,35 @@ def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): zipimport._zip_directory_cache, updater=clear_and_remove_cached_zip_archive_directory_data) +# PyPy Python implementation does not allow directly writing to the +# zipimport._zip_directory_cache and so prevents us from attempting to correct +# its content. The best we can do there is clear the problematic cache content +# and have PyPy repopulate it as needed. The downside is that if there are any +# stale zipimport.zipimporter instances laying around, attempting to use them +# will fail due to not having its zip archive directory information available +# instead of being automatically corrected to use the new correct zip archive +# directory information. +if '__pypy__' in sys.builtin_module_names: + _replace_zip_directory_cache_data = \ + _remove_and_clear_zip_directory_cache_data +else: + def _replace_zip_directory_cache_data(normalized_path): + def replace_cached_zip_archive_directory_data(path, old_entry): + # N.B. In theory, we could load the zip directory information just + # once for all updated path spellings, and then copy it locally and + # update its contained path strings to contain the correct + # spelling, but that seems like a way too invasive move (this cache + # structure is not officially documented anywhere and could in + # theory change with new Python releases) for no significant + # benefit. + old_entry.clear() + zipimport.zipimporter(path) + old_entry.update(zipimport._zip_directory_cache[path]) + return old_entry + _update_zipimporter_cache(normalized_path, + zipimport._zip_directory_cache, + updater=replace_cached_zip_archive_directory_data) + def is_python(text, filename=''): "Is this string a valid Python script?" try: From ca7d4bdf5a89e04565923c387cc28c15ddc37e5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:36:15 -0400 Subject: [PATCH 4190/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a12b038705..5ebe6f1c90 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +--- +5.1 +--- + +* Issue #202: Implemented more robust cache invalidation for the ZipImporter, + building on the work in Issue #168. Special thanks to Jurko Gospodnetić and + PJE. + ----- 5.0.2 ----- From 184e94ebbb8324496fdfd3510aa5767028586736 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:40:55 -0400 Subject: [PATCH 4191/8469] Use io.open for changes file as well to support UTF-8 encoding. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 719a1937e1..54a86e8bbc 100755 --- a/setup.py +++ b/setup.py @@ -92,10 +92,10 @@ def _save_entry_points(self): # the release script adds hyperlinks to issues if os.path.exists('CHANGES (links).txt'): - changes_file = open('CHANGES (links).txt') + changes_file = io.open('CHANGES (links).txt', encoding='utf-8') else: # but if the release script has not run, fall back to the source file - changes_file = open('CHANGES.txt') + changes_file = io.open('CHANGES.txt', encoding='utf-8') with readme_file: with changes_file: long_description = readme_file.read() + '\n' + changes_file.read() From 8ddfbc2a194b35a39427e18381b0f63d4323e9a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:43:43 -0400 Subject: [PATCH 4192/8469] Use iterables to determine the best filename to use for changes. --- setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 54a86e8bbc..1c2e0234e2 100755 --- a/setup.py +++ b/setup.py @@ -90,12 +90,12 @@ def _save_entry_points(self): readme_file = io.open('README.txt', encoding='utf-8') -# the release script adds hyperlinks to issues -if os.path.exists('CHANGES (links).txt'): - changes_file = io.open('CHANGES (links).txt', encoding='utf-8') -else: - # but if the release script has not run, fall back to the source file - changes_file = io.open('CHANGES.txt', encoding='utf-8') +# The release script adds hyperlinks to issues, +# but if the release script has not run, fall back to the source file +changes_names = 'CHANGES (links).txt', 'CHANGES.txt' +changes_fn = next(filter(os.path.exists, changes_names)) +changes_file = io.open(changes_fn, encoding='utf-8') + with readme_file: with changes_file: long_description = readme_file.read() + '\n' + changes_file.read() From 35e1b62fafef75e9ea9ff12b3953b61a8d197a87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:46:08 -0400 Subject: [PATCH 4193/8469] necessary to explicitly invoke 'iter' in Python 2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1c2e0234e2..f7be05670c 100755 --- a/setup.py +++ b/setup.py @@ -93,7 +93,7 @@ def _save_entry_points(self): # The release script adds hyperlinks to issues, # but if the release script has not run, fall back to the source file changes_names = 'CHANGES (links).txt', 'CHANGES.txt' -changes_fn = next(filter(os.path.exists, changes_names)) +changes_fn = next(iter(filter(os.path.exists, changes_names))) changes_file = io.open(changes_fn, encoding='utf-8') with readme_file: From 18723dfe43aa77d40e75ed3f5dada23d48e78678 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:48:07 -0400 Subject: [PATCH 4194/8469] Bumped to 5.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 107ed6906e..10d299bfe5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.0.3" +DEFAULT_VERSION = "5.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index f30cd813e2..59ff8876c1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.0.3' +__version__ = '5.1' From 0faca62f03cb259d1ccbbed2c4df76a7bfc3ae97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:48:09 -0400 Subject: [PATCH 4195/8469] Added tag 5.1 for changeset 3a948b6d01e3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 836fc08a32..e5a7d6b505 100644 --- a/.hgtags +++ b/.hgtags @@ -143,3 +143,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 84d936fd18a93d16c46e68ee2e39f5733f3cd863 5.0 871bd7b4326f48860ebe0baccdaea8fe4f8f8583 5.0.1 95996b713722376679c3168b15ab12ea8360dd5f 5.0.2 +3a948b6d01e3449b478fcdc532c44eb3cea5ee10 5.1 From f29e0692c4e4cbfccda2cc2df48a14e09f54a2ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jun 2014 12:48:34 -0400 Subject: [PATCH 4196/8469] Bumped to 5.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 10d299bfe5..0206019984 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.1" +DEFAULT_VERSION = "5.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 59ff8876c1..f01f2739ab 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.1' +__version__ = '5.2' From 68dd639c91b8ff263f53bd303a766f30399820d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jun 2014 07:56:55 -0400 Subject: [PATCH 4197/8469] Bypass dist/build/egg dirs when running tests --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index eb63264c18..7f5fc79681 100755 --- a/setup.cfg +++ b/setup.cfg @@ -22,3 +22,4 @@ universal=1 [pytest] addopts=--ignore tests/manual_test.py --ignore tests/shlib_test +norecursedirs=dist build *.egg From 9e7522ee611796e568aa58dc0bc878ac8a1c471c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jun 2014 08:12:08 -0400 Subject: [PATCH 4198/8469] Started work on a developer guide. --- docs/developer-guide.txt | 41 ++++++++++++++++++++++++++++++++++++++++ docs/development.txt | 1 + 2 files changed, 42 insertions(+) create mode 100644 docs/developer-guide.txt diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt new file mode 100644 index 0000000000..fbee5e672f --- /dev/null +++ b/docs/developer-guide.txt @@ -0,0 +1,41 @@ +================================ +Developer's Guide for Setuptools +================================ + +If you want to know more about contributing on Setuptools, this is the place. + + +.. contents:: **Table of Contents** + + +---------------------- +Repository and Tracker +---------------------- + +... + +.. git mirror + +----------------- +Authoring Tickets +----------------- + +... + +------------------------ +Submitting Pull Requests +------------------------ + +Use Mercurial bookmarks or Git branches. Use incremental commits. Minimize +stylistic changes. + +------------------- +Semantic Versioning +------------------- + +Setuptools follows ``semver`` with some exceptions: + +- Uses two-segment version when three segment version ends in zero +- Omits 'v' prefix for tags. + +.. explain value of reflecting meaning in versions. diff --git a/docs/development.txt b/docs/development.txt index ba927c7360..e35ba39b69 100644 --- a/docs/development.txt +++ b/docs/development.txt @@ -30,6 +30,7 @@ setuptools changes. You have been warned. .. toctree:: :maxdepth: 1 + .. developer-guide formats releases From 96efb0e69b7caf488f73b1713b35fd442332ef00 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Jun 2014 11:02:35 -0400 Subject: [PATCH 4199/8469] Remove superfluous import --- setuptools/dist.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 7713bf022d..4fcae97801 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -280,12 +280,11 @@ def _feature_attrname(self,name): def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" - from pkg_resources import working_set, parse_requirements - for dist in working_set.resolve( - parse_requirements(requires), installer=self.fetch_build_egg, + for dist in pkg_resources.working_set.resolve( + pkg_resources.parse_requirements(requires), installer=self.fetch_build_egg, replace_conflicting=True ): - working_set.add(dist, replace=True) + pkg_resources.working_set.add(dist, replace=True) def finalize_options(self): _Distribution.finalize_options(self) From 25a0f6733a92425e55830f8169a38fc9b0d3350e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Jun 2014 11:03:30 -0400 Subject: [PATCH 4200/8469] Extract variable for clarity. --- setuptools/dist.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 4fcae97801..8de95a387f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -280,10 +280,12 @@ def _feature_attrname(self,name): def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" - for dist in pkg_resources.working_set.resolve( - pkg_resources.parse_requirements(requires), installer=self.fetch_build_egg, - replace_conflicting=True - ): + resolved_dists = pkg_resources.working_set.resolve( + pkg_resources.parse_requirements(requires), + installer=self.fetch_build_egg, + replace_conflicting=True, + ) + for dist in resolved_dists: pkg_resources.working_set.add(dist, replace=True) def finalize_options(self): From d9fd333e6548f9f39f5ee80bd59b258d4f1ca194 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Tue, 3 Jun 2014 13:28:24 +1000 Subject: [PATCH 4201/8469] Cleanup ignore files --- .gitignore | 26 ++++++++++++-------------- .hgignore | 21 ++++++++++----------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 7b00d3c861..05c0808d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,16 @@ -*.pyc -*~ -*.swp -.coverage -.tox -distribute.egg-info -setuptools.egg-info +# syntax: glob +bin build dist -lib -bin include -\.Python -*.swp +lib +distribute.egg-info +setuptools.egg-info +.coverage +.tox CHANGES (links).txt -.git* -py-*.egg -pytest-*.egg +*.egg +*.py[cod] +*.swp +*~ +.hg* diff --git a/.hgignore b/.hgignore index e2398d342b..d70c9a7c48 100644 --- a/.hgignore +++ b/.hgignore @@ -1,17 +1,16 @@ syntax: glob -*.pyc -*~ -*.swp -.coverage -.tox -distribute.egg-info -setuptools.egg-info +bin build dist -lib -bin include -\.Python -*.swp +lib +distribute.egg-info +setuptools.egg-info +.coverage +.tox CHANGES (links).txt +*.egg +*.py[cod] +*.swp +*~ .git* From 9179bdd01411484226a3a18ef57187dcf9022535 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Tue, 3 Jun 2014 14:06:53 +1000 Subject: [PATCH 4202/8469] Cleanup fixture using tmp and monkeypatch --- setuptools/tests/test_integration.py | 48 ++++++++++++---------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 3938ccc503..7144aa6c9a 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -5,10 +5,7 @@ import glob import os -import shutil -import site import sys -import tempfile import pytest @@ -18,44 +15,35 @@ @pytest.fixture -def install_context(request): +def install_context(request, tmpdir, monkeypatch): """Fixture to set up temporary installation directory. """ # Save old values so we can restore them. - new_cwd = tempfile.mkdtemp() - old_cwd = os.getcwd() - old_enable_site = site.ENABLE_USER_SITE - old_file = easy_install_pkg.__file__ - old_base = site.USER_BASE - old_site = site.USER_SITE - old_ppath = os.environ.get('PYTHONPATH') + new_cwd = tmpdir.mkdir('cwd') + user_base = tmpdir.mkdir('user_base') + user_site = tmpdir.mkdir('user_site') + install_dir = tmpdir.mkdir('install_dir') def fin(): - os.chdir(old_cwd) - shutil.rmtree(new_cwd) - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = old_base - site.USER_SITE = old_site - site.ENABLE_USER_SITE = old_enable_site - easy_install_pkg.__file__ = old_file - os.environ['PYTHONPATH'] = old_ppath or '' + new_cwd.remove() + user_base.remove() + user_site.remove() + install_dir.remove() request.addfinalizer(fin) # Change the environment and site settings to control where the # files are installed and ensure we do not overwrite anything. - site.USER_BASE = tempfile.mkdtemp() - site.USER_SITE = tempfile.mkdtemp() - easy_install_pkg.__file__ = site.USER_SITE - os.chdir(new_cwd) - install_dir = tempfile.mkdtemp() - sys.path.append(install_dir) - os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) + monkeypatch.chdir(new_cwd) + monkeypatch.setattr(easy_install_pkg, '__file__', user_site.strpath) + monkeypatch.setattr('site.USER_BASE', user_base.strpath) + monkeypatch.setattr('site.USER_SITE', user_site.strpath) + monkeypatch.setattr('sys.path', sys.path + [install_dir.strpath]) + monkeypatch.setenv('PYTHONPATH', os.path.pathsep.join(sys.path)) # Set up the command for performing the installation. dist = Distribution() cmd = easy_install(dist) - cmd.install_dir = install_dir + cmd.install_dir = install_dir.strpath return cmd @@ -68,20 +56,24 @@ def _install_one(requirement, cmd, pkgname, modulename): assert dest_path assert os.path.exists(os.path.join(dest_path[0], pkgname, modulename)) + def test_stevedore(install_context): _install_one('stevedore', install_context, 'stevedore', 'extension.py') + @pytest.mark.xfail def test_virtualenvwrapper(install_context): _install_one('virtualenvwrapper', install_context, 'virtualenvwrapper', 'hook_loader.py') + @pytest.mark.xfail def test_pbr(install_context): _install_one('pbr', install_context, 'pbr', 'core.py') + @pytest.mark.xfail def test_python_novaclient(install_context): _install_one('python-novaclient', install_context, From 8e3f9d3253d1d0fb820dad4249d5110d017595c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Wed, 18 Jun 2014 20:31:05 +0300 Subject: [PATCH 4203/8469] Fixed PEP 8 compliancy of the setuptools.command package --- setuptools/command/__init__.py | 5 +- setuptools/command/alias.py | 14 +- setuptools/command/bdist_egg.py | 157 ++++--- setuptools/command/bdist_rpm.py | 3 +- setuptools/command/bdist_wininst.py | 1 + setuptools/command/build_ext.py | 122 +++--- setuptools/command/build_py.py | 65 +-- setuptools/command/develop.py | 37 +- setuptools/command/easy_install.py | 529 +++++++++++++---------- setuptools/command/egg_info.py | 100 +++-- setuptools/command/install.py | 18 +- setuptools/command/install_egg_info.py | 70 ++- setuptools/command/install_lib.py | 12 +- setuptools/command/install_scripts.py | 13 +- setuptools/command/launcher manifest.xml | 18 +- setuptools/command/register.py | 1 + setuptools/command/rotate.py | 23 +- setuptools/command/saveopts.py | 14 +- setuptools/command/sdist.py | 39 +- setuptools/command/setopt.py | 45 +- setuptools/command/test.py | 32 +- setuptools/command/upload_docs.py | 18 +- 22 files changed, 734 insertions(+), 602 deletions(-) diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 29c9d75ad1..f6dbc39c40 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -5,10 +5,11 @@ 'register', 'bdist_wininst', 'upload_docs', ] -from setuptools.command import install_scripts +from distutils.command.bdist import bdist import sys -from distutils.command.bdist import bdist +from setuptools.command import install_scripts + if 'egg' not in bdist.format_commands: bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 05c0766bd4..452a9244ea 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -2,10 +2,12 @@ from setuptools.command.setopt import edit_config, option_base, config_file + def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": - if c in arg: return repr(arg) + if c in arg: + return repr(arg) if arg.split() != [arg]: return repr(arg) return arg @@ -18,7 +20,7 @@ class alias(option_base): command_consumes_arguments = True user_options = [ - ('remove', 'r', 'remove (unset) the alias'), + ('remove', 'r', 'remove (unset) the alias'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] @@ -46,7 +48,7 @@ def run(self): print("setup.py alias", format_alias(alias, aliases)) return - elif len(self.args)==1: + elif len(self.args) == 1: alias, = self.args if self.remove: command = None @@ -58,9 +60,9 @@ def run(self): return else: alias = self.args[0] - command = ' '.join(map(shquote,self.args[1:])) + command = ' '.join(map(shquote, self.args[1:])) - edit_config(self.filename, {'aliases': {alias:command}}, self.dry_run) + edit_config(self.filename, {'aliases': {alias: command}}, self.dry_run) def format_alias(name, aliases): @@ -73,4 +75,4 @@ def format_alias(name, aliases): source = '' else: source = '--filename=%r' % source - return source+name+' '+command + return source + name + ' ' + command diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index c19a0ba7ea..831d6042aa 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -3,29 +3,33 @@ Build .egg distributions""" # This module should be kept compatible with Python 2.3 +from distutils.errors import DistutilsSetupError +from distutils.dir_util import remove_tree, mkpath +from distutils import log +from types import CodeType import sys import os import marshal import textwrap + +from pkg_resources import get_build_platform, Distribution, ensure_directory +from pkg_resources import EntryPoint +from setuptools.compat import basestring, next +from setuptools.extension import Library from setuptools import Command -from distutils.dir_util import remove_tree, mkpath + try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version + def _get_purelib(): return get_path("purelib") except ImportError: from distutils.sysconfig import get_python_lib, get_python_version + def _get_purelib(): return get_python_lib(False) -from distutils import log -from distutils.errors import DistutilsSetupError -from pkg_resources import get_build_platform, Distribution, ensure_directory -from pkg_resources import EntryPoint -from types import CodeType -from setuptools.compat import basestring, next -from setuptools.extension import Library def strip_module(filename): if '.' in filename: @@ -34,6 +38,7 @@ def strip_module(filename): filename = filename[:-6] return filename + def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): @@ -49,23 +54,22 @@ def __bootstrap__(): class bdist_egg(Command): - description = "create an \"egg\" distribution" user_options = [ ('bdist-dir=', 'b', - "temporary directory for creating the distribution"), + "temporary directory for creating the distribution"), ('plat-name=', 'p', "platform name to embed in generated filenames " - "(default: %s)" % get_build_platform()), + "(default: %s)" % get_build_platform()), ('exclude-source-files', None, - "remove all .py files from the generated egg"), + "remove all .py files from the generated egg"), ('keep-temp', 'k', - "keep the pseudo-installation tree around after " + - "creating the distribution archive"), + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), ('dist-dir=', 'd', - "directory to put final built distributions in"), + "directory to put final built distributions in"), ('skip-build', None, - "skip rebuilding everything (for testing/debugging)"), + "skip rebuilding everything (for testing/debugging)"), ] boolean_options = [ @@ -92,7 +96,7 @@ def finalize_options(self): if self.plat_name is None: self.plat_name = get_build_platform() - self.set_undefined_options('bdist',('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) if self.egg_output is None: @@ -103,25 +107,25 @@ def finalize_options(self): self.distribution.has_ext_modules() and self.plat_name ).egg_name() - self.egg_output = os.path.join(self.dist_dir, basename+'.egg') + self.egg_output = os.path.join(self.dist_dir, basename + '.egg') def do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir site_packages = os.path.normcase(os.path.realpath(_get_purelib())) - old, self.distribution.data_files = self.distribution.data_files,[] + old, self.distribution.data_files = self.distribution.data_files, [] for item in old: - if isinstance(item,tuple) and len(item)==2: + if isinstance(item, tuple) and len(item) == 2: if os.path.isabs(item[0]): realpath = os.path.realpath(item[0]) normalized = os.path.normcase(realpath) - if normalized==site_packages or normalized.startswith( - site_packages+os.sep + if normalized == site_packages or normalized.startswith( + site_packages + os.sep ): - item = realpath[len(site_packages)+1:], item[1] - # XXX else: raise ??? + item = realpath[len(site_packages) + 1:], item[1] + # XXX else: raise ??? self.distribution.data_files.append(item) try: @@ -133,11 +137,11 @@ def do_install_data(self): def get_outputs(self): return [self.egg_output] - def call_command(self,cmdname,**kw): + def call_command(self, cmdname, **kw): """Invoke reinitialized command `cmdname` with keyword args""" for dirname in INSTALL_DIRECTORY_ATTRS: - kw.setdefault(dirname,self.bdist_dir) - kw.setdefault('skip_build',self.skip_build) + kw.setdefault(dirname, self.bdist_dir) + kw.setdefault('skip_build', self.skip_build) kw.setdefault('dry_run', self.dry_run) cmd = self.reinitialize_command(cmdname, **kw) self.run_command(cmdname) @@ -160,15 +164,16 @@ def run(self): all_outputs, ext_outputs = self.get_ext_outputs() self.stubs = [] to_compile = [] - for (p,ext_name) in enumerate(ext_outputs): - filename,ext = os.path.splitext(ext_name) - pyfile = os.path.join(self.bdist_dir, strip_module(filename)+'.py') + for (p, ext_name) in enumerate(ext_outputs): + filename, ext = os.path.splitext(ext_name) + pyfile = os.path.join(self.bdist_dir, strip_module(filename) + + '.py') self.stubs.append(pyfile) log.info("creating stub loader for %s" % ext_name) if not self.dry_run: write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) - ext_outputs[p] = ext_name.replace(os.sep,'/') + ext_outputs[p] = ext_name.replace(os.sep, '/') if to_compile: cmd.byte_compile(to_compile) @@ -177,12 +182,13 @@ def run(self): # Make the EGG-INFO directory archive_root = self.bdist_dir - egg_info = os.path.join(archive_root,'EGG-INFO') + egg_info = os.path.join(archive_root, 'EGG-INFO') self.mkpath(egg_info) if self.distribution.scripts: script_dir = os.path.join(egg_info, 'scripts') log.info("installing scripts to %s" % script_dir) - self.call_command('install_scripts',install_dir=script_dir,no_ep=1) + self.call_command('install_scripts', install_dir=script_dir, + no_ep=1) self.copy_metadata_to(egg_info) native_libs = os.path.join(egg_info, "native_libs.txt") @@ -200,10 +206,10 @@ def run(self): os.unlink(native_libs) write_safety_flag( - os.path.join(archive_root,'EGG-INFO'), self.zip_safe() + os.path.join(archive_root, 'EGG-INFO'), self.zip_safe() ) - if os.path.exists(os.path.join(self.egg_info,'depends.txt')): + if os.path.exists(os.path.join(self.egg_info, 'depends.txt')): log.warn( "WARNING: 'depends.txt' will not be used by setuptools 0.6!\n" "Use the install_requires/extras_require setup() args instead." @@ -214,25 +220,25 @@ def run(self): # Make the archive make_zipfile(self.egg_output, archive_root, verbose=self.verbose, - dry_run=self.dry_run, mode=self.gen_header()) + dry_run=self.dry_run, mode=self.gen_header()) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) # Add to 'Distribution.dist_files' so that the "upload" command works - getattr(self.distribution,'dist_files',[]).append( - ('bdist_egg',get_python_version(),self.egg_output)) + getattr(self.distribution, 'dist_files', []).append( + ('bdist_egg', get_python_version(), self.egg_output)) def zap_pyfiles(self): log.info("Removing .py files from temporary directory") - for base,dirs,files in walk_egg(self.bdist_dir): + for base, dirs, files in walk_egg(self.bdist_dir): for name in files: if name.endswith('.py'): - path = os.path.join(base,name) + path = os.path.join(base, name) log.debug("Deleting %s", path) os.unlink(path) def zip_safe(self): - safe = getattr(self.distribution,'zip_safe',None) + safe = getattr(self.distribution, 'zip_safe', None) if safe is not None: return safe log.warn("zip_safe flag not set; analyzing archive contents...") @@ -240,7 +246,7 @@ def zip_safe(self): def gen_header(self): epm = EntryPoint.parse_map(self.distribution.entry_points or '') - ep = epm.get('setuptools.installation',{}).get('eggsecutable') + ep = epm.get('setuptools.installation', {}).get('eggsecutable') if ep is None: return 'w' # not an eggsecutable, do it the usual way. @@ -268,7 +274,6 @@ def gen_header(self): ' echo Please rename it back to %(basename)s and try again.\n' ' exec false\n' 'fi\n' - ) % locals() if not self.dry_run: @@ -283,7 +288,7 @@ def copy_metadata_to(self, target_dir): # normalize the path (so that a forward-slash in egg_info will # match using startswith below) norm_egg_info = os.path.normpath(self.egg_info) - prefix = os.path.join(norm_egg_info,'') + prefix = os.path.join(norm_egg_info, '') for path in self.ei_cmd.filelist.files: if path.startswith(prefix): target = os.path.join(target_dir, path[len(prefix):]) @@ -296,23 +301,24 @@ def get_ext_outputs(self): all_outputs = [] ext_outputs = [] - paths = {self.bdist_dir:''} + paths = {self.bdist_dir: ''} for base, dirs, files in os.walk(self.bdist_dir): for filename in files: if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS: - all_outputs.append(paths[base]+filename) + all_outputs.append(paths[base] + filename) for filename in dirs: - paths[os.path.join(base,filename)] = paths[base]+filename+'/' + paths[os.path.join(base, filename)] = (paths[base] + + filename + '/') if self.distribution.has_ext_modules(): build_cmd = self.get_finalized_command('build_ext') for ext in build_cmd.extensions: - if isinstance(ext,Library): + if isinstance(ext, Library): continue fullname = build_cmd.get_ext_fullname(ext.name) filename = build_cmd.get_ext_filename(fullname) if not os.path.basename(filename).startswith('dl-'): - if os.path.exists(os.path.join(self.bdist_dir,filename)): + if os.path.exists(os.path.join(self.bdist_dir, filename)): ext_outputs.append(filename) return all_outputs, ext_outputs @@ -324,19 +330,21 @@ def get_ext_outputs(self): def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) - base,dirs,files = next(walker) + base, dirs, files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') - yield base,dirs,files + yield base, dirs, files for bdf in walker: yield bdf + def analyze_egg(egg_dir, stubs): # check for existing flag in EGG-INFO - for flag,fn in safety_flags.items(): - if os.path.exists(os.path.join(egg_dir,'EGG-INFO',fn)): + for flag, fn in safety_flags.items(): + if os.path.exists(os.path.join(egg_dir, 'EGG-INFO', fn)): return flag - if not can_scan(): return False + if not can_scan(): + return False safe = True for base, dirs, files in walk_egg(egg_dir): for name in files: @@ -347,36 +355,39 @@ def analyze_egg(egg_dir, stubs): safe = scan_module(egg_dir, base, name, stubs) and safe return safe + def write_safety_flag(egg_dir, safe): # Write or remove zip safety flag file(s) - for flag,fn in safety_flags.items(): + for flag, fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): if safe is None or bool(safe) != flag: os.unlink(fn) - elif safe is not None and bool(safe)==flag: - f = open(fn,'wt') + elif safe is not None and bool(safe) == flag: + f = open(fn, 'wt') f.write('\n') f.close() + safety_flags = { True: 'zip-safe', False: 'not-zip-safe', } + def scan_module(egg_dir, base, name, stubs): """Check whether module possibly uses unsafe-for-zipfile stuff""" - filename = os.path.join(base,name) + filename = os.path.join(base, name) if filename[:-1] in stubs: - return True # Extension module - pkg = base[len(egg_dir)+1:].replace(os.sep,'.') - module = pkg+(pkg and '.' or '')+os.path.splitext(name)[0] + 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): - skip = 8 # skip magic & date + skip = 8 # skip magic & date else: skip = 12 # skip magic & date & file size - f = open(filename,'rb') + f = open(filename, 'rb') f.read(skip) code = marshal.load(f) f.close() @@ -396,21 +407,24 @@ def scan_module(egg_dir, base, name, stubs): log.warn("%s: module MAY be using inspect.%s", module, bad) safe = False if '__name__' in symbols and '__main__' in symbols and '.' not in module: - if sys.version[:3]=="2.4": # -m works w/zipfiles in 2.5 + if sys.version[:3] == "2.4": # -m works w/zipfiles in 2.5 log.warn("%s: top-level module may be 'python -m' script", module) safe = False return safe + def iter_symbols(code): """Yield names and strings used by `code` and its nested code objects""" - for name in code.co_names: yield name + for name in code.co_names: + yield name for const in code.co_consts: - if isinstance(const,basestring): + if isinstance(const, basestring): yield const - elif isinstance(const,CodeType): + elif isinstance(const, CodeType): for name in iter_symbols(const): yield name + def can_scan(): if not sys.platform.startswith('java') and sys.platform != 'cli': # CPython, PyPy, etc. @@ -426,8 +440,9 @@ def can_scan(): 'install_lib', 'install_dir', 'install_data', 'install_base' ] + def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, - mode='w'): + mode='w'): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed @@ -435,6 +450,7 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, raises DistutilsExecError. Returns the name of the output zip file. """ import zipfile + mkpath(os.path.dirname(zip_filename), dry_run=dry_run) log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) @@ -442,13 +458,14 @@ def visit(z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): - p = path[len(base_dir)+1:] + p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) log.debug("adding '%s'" % p) if compress is None: - compress = (sys.version>="2.4") # avoid 2.3 zipimport bug when 64 bits + # avoid 2.3 zipimport bug when 64 bits + compress = (sys.version >= "2.4") compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)] if not dry_run: diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 9938682499..70730927ec 100755 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -1,5 +1,6 @@ import distutils.command.bdist_rpm as orig + class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: @@ -19,7 +20,7 @@ def run(self): def _make_spec_file(self): version = self.distribution.get_version() - rpmversion = version.replace('-','_') + rpmversion = version.replace('-', '_') spec = orig.bdist_rpm._make_spec_file(self) line23 = '%define version ' + version line24 = '%define version ' + rpmversion diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index f9d8d4f076..073de97b46 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,5 +1,6 @@ import distutils.command.bdist_wininst as orig + class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): """ diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index e08131d777..53bf9cd3ed 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,26 +1,29 @@ from distutils.command.build_ext import build_ext as _du_build_ext +from distutils.file_util import copy_file +from distutils.ccompiler import new_compiler +from distutils.sysconfig import customize_compiler +from distutils.errors import DistutilsError +from distutils import log +import os +import sys + +from setuptools.extension import Library + try: # Attempt to use Pyrex for building extensions, if available from Pyrex.Distutils.build_ext import build_ext as _build_ext except ImportError: _build_ext = _du_build_ext -import os -import sys -from distutils.file_util import copy_file -from setuptools.extension import Library -from distutils.ccompiler import new_compiler -from distutils.sysconfig import customize_compiler try: # Python 2.7 or >=3.2 from sysconfig import _CONFIG_VARS except ImportError: from distutils.sysconfig import get_config_var + get_config_var("LDSHARED") # make sure _config_vars is initialized del get_config_var from distutils.sysconfig import _config_vars as _CONFIG_VARS -from distutils import log -from distutils.errors import DistutilsError have_rtld = False use_stubs = False @@ -31,11 +34,13 @@ elif os.name != 'nt': try: from dl import RTLD_NOW + have_rtld = True use_stubs = True except ImportError: pass + def if_dl(s): if have_rtld: return s @@ -59,8 +64,9 @@ def copy_extensions_to_source(self): modpath = fullname.split('.') package = '.'.join(modpath[:-1]) package_dir = build_py.get_package_dir(package) - dest_filename = os.path.join(package_dir,os.path.basename(filename)) - src_filename = os.path.join(self.build_lib,filename) + dest_filename = os.path.join(package_dir, + os.path.basename(filename)) + src_filename = os.path.join(self.build_lib, filename) # Always copy, even if source is older than destination, to ensure # that the right extensions for the current Python/platform are @@ -72,7 +78,8 @@ def copy_extensions_to_source(self): if ext._needs_stub: self.write_stub(package_dir or os.curdir, ext, True) - if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'): + if _build_ext is not _du_build_ext and not hasattr(_build_ext, + 'pyrex_sources'): # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 def swig_sources(self, sources, *otherargs): # first do any Pyrex processing @@ -81,15 +88,15 @@ def swig_sources(self, sources, *otherargs): return _du_build_ext.swig_sources(self, sources, *otherargs) def get_ext_filename(self, fullname): - filename = _build_ext.get_ext_filename(self,fullname) + filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if isinstance(ext,Library): + if isinstance(ext, Library): fn, ext = os.path.splitext(filename) - return self.shlib_compiler.library_filename(fn,libtype) + return self.shlib_compiler.library_filename(fn, libtype) elif use_stubs and ext._links_to_dynamic: - d,fn = os.path.split(filename) - return os.path.join(d,'dl-'+fn) + d, fn = os.path.split(filename) + return os.path.join(d, 'dl-' + fn) return filename def initialize_options(self): @@ -103,7 +110,7 @@ def finalize_options(self): self.extensions = self.extensions or [] self.check_extensions_list(self.extensions) self.shlibs = [ext for ext in self.extensions - if isinstance(ext, Library)] + if isinstance(ext, Library)] if self.shlibs: self.setup_shlib_compiler() for ext in self.extensions: @@ -118,9 +125,10 @@ def finalize_options(self): ltd = ext._links_to_dynamic = \ self.shlibs and self.links_to_dynamic(ext) or False - ext._needs_stub = ltd and use_stubs and not isinstance(ext,Library) + ext._needs_stub = ltd and use_stubs and not isinstance(ext, + Library) filename = ext._file_name = self.get_ext_filename(fullname) - libdir = os.path.dirname(os.path.join(self.build_lib,filename)) + libdir = os.path.dirname(os.path.join(self.build_lib, filename)) if ltd and libdir not in ext.library_dirs: ext.library_dirs.append(libdir) if ltd and use_stubs and os.curdir not in ext.runtime_library_dirs: @@ -134,7 +142,8 @@ def setup_shlib_compiler(self): tmp = _CONFIG_VARS.copy() try: # XXX Help! I don't have any idea whether these are right... - _CONFIG_VARS['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" + _CONFIG_VARS['LDSHARED'] = ( + "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup") _CONFIG_VARS['CCSHARED'] = " -dynamiclib" _CONFIG_VARS['SO'] = ".dylib" customize_compiler(compiler) @@ -148,7 +157,7 @@ def setup_shlib_compiler(self): compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name,value) in self.define: + for (name, value) in self.define: compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -166,16 +175,16 @@ def setup_shlib_compiler(self): compiler.link_shared_object = link_shared_object.__get__(compiler) def get_export_symbols(self, ext): - if isinstance(ext,Library): + if isinstance(ext, Library): return ext.export_symbols - return _build_ext.get_export_symbols(self,ext) + return _build_ext.get_export_symbols(self, ext) def build_extension(self, ext): _compiler = self.compiler try: - if isinstance(ext,Library): + if isinstance(ext, Library): self.compiler = self.shlib_compiler - _build_ext.build_extension(self,ext) + _build_ext.build_extension(self, ext) if ext._needs_stub: self.write_stub( self.get_finalized_command('build_py').build_lib, ext @@ -189,9 +198,10 @@ def links_to_dynamic(self, ext): # XXX as dynamic, and not just using a locally-found version or a # XXX static-compiled version libnames = dict.fromkeys([lib._full_name for lib in self.shlibs]) - pkg = '.'.join(ext._full_name.split('.')[:-1]+['']) + pkg = '.'.join(ext._full_name.split('.')[:-1] + ['']) for libname in ext.libraries: - if pkg+libname in libnames: return True + if pkg + libname in libnames: + return True return False def get_outputs(self): @@ -200,26 +210,29 @@ def get_outputs(self): for ext in self.extensions: if ext._needs_stub: base = os.path.join(self.build_lib, *ext._full_name.split('.')) - outputs.append(base+'.py') - outputs.append(base+'.pyc') + outputs.append(base + '.py') + outputs.append(base + '.pyc') if optimize: - outputs.append(base+'.pyo') + outputs.append(base + '.pyo') return outputs def write_stub(self, output_dir, ext, compile=False): - log.info("writing stub loader for %s to %s",ext._full_name, output_dir) - stub_file = os.path.join(output_dir, *ext._full_name.split('.'))+'.py' + log.info("writing stub loader for %s to %s", ext._full_name, + output_dir) + stub_file = (os.path.join(output_dir, *ext._full_name.split('.')) + + '.py') if compile and os.path.exists(stub_file): - raise DistutilsError(stub_file+" already exists! Please delete.") + raise DistutilsError(stub_file + " already exists! Please delete.") if not self.dry_run: - f = open(stub_file,'w') + f = open(stub_file, 'w') f.write( '\n'.join([ "def __bootstrap__():", " global __bootstrap__, __file__, __loader__", - " import sys, os, pkg_resources, imp"+if_dl(", dl"), - " __file__ = pkg_resources.resource_filename(__name__,%r)" - % os.path.basename(ext._file_name), + " import sys, os, pkg_resources, imp" + if_dl(", dl"), + " __file__ = pkg_resources.resource_filename" + "(__name__,%r)" + % os.path.basename(ext._file_name), " del __bootstrap__", " if '__loader__' in globals():", " del __loader__", @@ -233,12 +246,13 @@ def write_stub(self, output_dir, ext, compile=False): if_dl(" sys.setdlopenflags(old_flags)"), " os.chdir(old_dir)", "__bootstrap__()", - "" # terminal \n + "" # terminal \n ]) ) f.close() if compile: from distutils.util import byte_compile + byte_compile([stub_file], optimize=0, force=True, dry_run=self.dry_run) optimize = self.get_finalized_command('install_lib').optimize @@ -249,13 +263,14 @@ def write_stub(self, output_dir, ext, compile=False): os.unlink(stub_file) -if use_stubs or os.name=='nt': +if use_stubs or os.name == 'nt': # Build shared libraries # - def link_shared_object(self, objects, output_libname, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None): + def link_shared_object( + self, objects, output_libname, output_dir=None, libraries=None, + library_dirs=None, runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, + target_lang=None): self.link( self.SHARED_LIBRARY, objects, output_libname, output_dir, libraries, library_dirs, runtime_library_dirs, @@ -266,18 +281,19 @@ def link_shared_object(self, objects, output_libname, output_dir=None, # Build static libraries everywhere else libtype = 'static' - def link_shared_object(self, objects, output_libname, output_dir=None, - libraries=None, library_dirs=None, runtime_library_dirs=None, - export_symbols=None, debug=0, extra_preargs=None, - extra_postargs=None, build_temp=None, target_lang=None): + def link_shared_object( + self, objects, output_libname, output_dir=None, libraries=None, + library_dirs=None, runtime_library_dirs=None, export_symbols=None, + debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, + target_lang=None): # XXX we need to either disallow these attrs on Library instances, - # or warn/abort here if set, or something... - #libraries=None, library_dirs=None, runtime_library_dirs=None, - #export_symbols=None, extra_preargs=None, extra_postargs=None, - #build_temp=None + # or warn/abort here if set, or something... + # libraries=None, library_dirs=None, runtime_library_dirs=None, + # export_symbols=None, extra_preargs=None, extra_postargs=None, + # build_temp=None - assert output_dir is None # distutils build_ext doesn't pass this - output_dir,filename = os.path.split(output_libname) + assert output_dir is None # distutils build_ext doesn't pass this + output_dir, filename = os.path.split(output_libname) basename, ext = os.path.splitext(filename) if self.library_filename("x").startswith('lib'): # strip 'lib' prefix; this is kludgy if some platform uses diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 53bfb7df23..98080694ad 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -1,10 +1,10 @@ +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 distutils.command.build_py as orig -from distutils.util import convert_path -from glob import glob try: from setuptools.lib2to3_ex import Mixin2to3 @@ -13,6 +13,7 @@ class Mixin2to3: def run_2to3(self, files, doctests=True): "do nothing" + class build_py(orig.build_py, Mixin2to3): """Enhanced 'build_py' command that includes data files with packages @@ -22,11 +23,14 @@ class build_py(orig.build_py, Mixin2to3): Also, this version of the 'build_py' command allows you to specify both 'py_modules' and 'packages' in the same setup operation. """ + def finalize_options(self): orig.build_py.finalize_options(self) self.package_data = self.distribution.package_data - self.exclude_package_data = self.distribution.exclude_package_data or {} - if 'data_files' in self.__dict__: del self.__dict__['data_files'] + self.exclude_package_data = (self.distribution.exclude_package_data or + {}) + if 'data_files' in self.__dict__: + del self.__dict__['data_files'] self.__updated_files = [] self.__doctests_2to3 = [] @@ -51,13 +55,14 @@ def run(self): self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=0)) def __getattr__(self, attr): - if attr=='data_files': # lazily compute data files + if attr == 'data_files': # lazily compute data files self.data_files = files = self._get_data_files() return files - return orig.build_py.__getattr__(self,attr) + return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): - outfile, copied = orig.build_py.build_module(self, module, module_file, package) + outfile, copied = orig.build_py.build_module(self, module, module_file, + package) if copied: self.__updated_files.append(outfile) return outfile, copied @@ -74,12 +79,12 @@ def _get_data_files(self): build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = len(src_dir) + 1 # Strip directory from globbed filenames filenames = [ file[plen:] for file in self.find_data_files(package, src_dir) - ] + ] data.append((package, src_dir, build_dir, filenames)) return data @@ -102,7 +107,8 @@ def build_package_data(self): srcfile = os.path.join(src_dir, filename) outf, copied = self.copy_file(srcfile, target) srcfile = os.path.abspath(srcfile) - if copied and srcfile in self.distribution.convert_2to3_doctests: + if (copied and + srcfile in self.distribution.convert_2to3_doctests): self.__doctests_2to3.append(outf) def analyze_manifest(self): @@ -117,21 +123,22 @@ def analyze_manifest(self): self.run_command('egg_info') ei_cmd = self.get_finalized_command('egg_info') for path in ei_cmd.filelist.files: - d,f = os.path.split(assert_relative(path)) + d, f = os.path.split(assert_relative(path)) prev = None oldf = f - while d and d!=prev and d not in src_dirs: + while d and d != prev and d not in src_dirs: prev = d d, df = os.path.split(d) f = os.path.join(df, f) if d in src_dirs: - if path.endswith('.py') and f==oldf: - continue # it's a module, not data - mf.setdefault(src_dirs[d],[]).append(path) + if path.endswith('.py') and f == oldf: + continue # it's a module, not data + mf.setdefault(src_dirs[d], []).append(path) - def get_data_files(self): pass # kludge 2.4 for lazy computation + def get_data_files(self): + pass # kludge 2.4 for lazy computation - if sys.version<"2.4": # Python 2.4 already has this code + if sys.version < "2.4": # Python 2.4 already has this code def get_outputs(self, include_bytecode=1): """Return complete list of files copied to the build directory @@ -142,9 +149,9 @@ def get_outputs(self, include_bytecode=1): """ return orig.build_py.get_outputs(self, include_bytecode) + [ os.path.join(build_dir, filename) - for package, src_dir, build_dir,filenames in self.data_files + for package, src_dir, build_dir, filenames in self.data_files for filename in filenames - ] + ] def check_package(self, package, package_dir): """Check namespace packages' __init__ for declare_namespace""" @@ -160,25 +167,26 @@ def check_package(self, package, package_dir): return init_py for pkg in self.distribution.namespace_packages: - if pkg==package or pkg.startswith(package+'.'): + if pkg == package or pkg.startswith(package + '.'): break else: return init_py - f = open(init_py,'rbU') + f = open(init_py, 'rbU') if 'declare_namespace'.encode() not in f.read(): from distutils.errors import DistutilsError + raise 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,) + "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): - self.packages_checked={} + self.packages_checked = {} orig.build_py.initialize_options(self) def get_package_dir(self, package): @@ -202,7 +210,7 @@ def exclude_data_files(self, package, src_dir, files): seen = {} return [ f for f in files if f not in bad - and f not in seen and seen.setdefault(f,1) # ditch dupes + and f not in seen and seen.setdefault(f, 1) # ditch dupes ] @@ -210,6 +218,7 @@ def assert_relative(path): if not os.path.isabs(path): return path from distutils.errors import DistutilsSetupError + msg = textwrap.dedent(""" Error: setup script specifies an absolute path: diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 74d129490e..368b64fed7 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -1,13 +1,14 @@ -import os -import glob from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError +import os +import glob -import setuptools from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install from setuptools.compat import PY3 +import setuptools + class develop(easy_install): """Set up package for development""" @@ -36,7 +37,7 @@ def initialize_options(self): self.egg_path = None easy_install.initialize_options(self) self.setup_path = None - self.always_copy_from = '.' # always copy eggs installed in curdir + self.always_copy_from = '.' # always copy eggs installed in curdir def finalize_options(self): ei = self.get_finalized_command("egg_info") @@ -52,29 +53,31 @@ def finalize_options(self): # 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') + self.egg_link = os.path.join(self.install_dir, ei.egg_name + + '.egg-link') self.egg_base = ei.egg_base if self.egg_path is None: self.egg_path = os.path.abspath(ei.egg_base) target = normalize_path(self.egg_base) - egg_path = normalize_path(os.path.join(self.install_dir, self.egg_path)) + egg_path = normalize_path(os.path.join(self.install_dir, + self.egg_path)) if egg_path != target: raise DistutilsOptionError( "--egg-path must be a relative path from the install" - " directory to "+target + " directory to " + target ) # Make a distribution for the package's source self.dist = Distribution( target, PathMetadata(target, os.path.abspath(ei.egg_info)), - project_name = ei.egg_name + project_name=ei.egg_name ) - p = self.egg_base.replace(os.sep,'/') - if p!= os.curdir: - p = '../' * (p.count('/')+1) + p = self.egg_base.replace(os.sep, '/') + if p != os.curdir: + p = '../' * (p.count('/') + 1) self.setup_path = p p = normalize_path(os.path.join(self.install_dir, self.egg_path, p)) if p != normalize_path(os.curdir): @@ -103,7 +106,8 @@ def install_for_development(self): ei_cmd = self.get_finalized_command("egg_info") self.egg_path = build_path self.dist.location = build_path - self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info) # XXX + # XXX + self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info) else: # Without 2to3 inplace works fine: self.run_command('egg_info') @@ -120,7 +124,7 @@ def install_for_development(self): # 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 = open(self.egg_link, "w") f.write(self.egg_path + "\n" + self.setup_path) f.close() # postprocess the installed distro, fixing up .pth, installing scripts, @@ -133,7 +137,8 @@ def uninstall_link(self): egg_link_file = open(self.egg_link) contents = [line.rstrip() for line in egg_link_file] egg_link_file.close() - if contents not in ([self.egg_path], [self.egg_path, self.setup_path]): + if contents not in ([self.egg_path], + [self.egg_path, self.setup_path]): log.warn("Link points to %s: uninstall aborted", contents) return if not self.dry_run: @@ -147,7 +152,7 @@ def uninstall_link(self): def install_egg_scripts(self, dist): if dist is not self.dist: # Installing a dependency, so fall back to normal behavior - return easy_install.install_egg_scripts(self,dist) + return easy_install.install_egg_scripts(self, dist) # create wrapper scripts in the script dir, pointing to dist.scripts @@ -158,7 +163,7 @@ def install_egg_scripts(self, dist): 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') + f = open(script_path, 'rU') script_text = f.read() f.close() self.install_script(dist, script_name, script_text, script_path) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2f476fed3f..6854827222 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -12,6 +12,14 @@ """ +from glob import glob +from distutils.util import get_platform +from distutils.util import convert_path, subst_vars +from distutils.errors import DistutilsArgError, DistutilsOptionError, \ + DistutilsError, DistutilsPlatformError +from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS +from distutils import log, dir_util +from distutils.command.build_scripts import first_line_re import sys import os import zipimport @@ -26,21 +34,10 @@ import warnings import site import struct -from glob import glob -from distutils import log, dir_util -from distutils.command.build_scripts import first_line_re - -import pkg_resources from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from setuptools.py31compat import get_path, get_config_vars - -from distutils.util import get_platform -from distutils.util import convert_path, subst_vars -from distutils.errors import DistutilsArgError, DistutilsOptionError, \ - DistutilsError, DistutilsPlatformError -from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS from setuptools.command import setopt from setuptools.archive_util import unpack_archive from setuptools.package_index import PackageIndex @@ -54,18 +51,22 @@ Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, VersionConflict, DEVELOP_DIST, ) +import pkg_resources + sys_executable = os.environ.get('__PYVENV_LAUNCHER__', - os.path.normpath(sys.executable)) + os.path.normpath(sys.executable)) __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', 'main', 'get_exe_prefixes', ] + def is_64bit(): return struct.calcsize("P") == 8 + def samefile(p1, p2): both_exist = os.path.exists(p1) and os.path.exists(p2) use_samefile = hasattr(os.path, 'samefile') and both_exist @@ -75,9 +76,11 @@ def samefile(p1, p2): norm_p2 = os.path.normpath(os.path.normcase(p2)) return norm_p1 == norm_p2 + if PY2: def _to_ascii(s): return s + def isascii(s): try: unicode(s, 'ascii') @@ -87,6 +90,7 @@ def isascii(s): else: def _to_ascii(s): return s.encode('ascii') + def isascii(s): try: s.encode('ascii') @@ -94,6 +98,7 @@ def isascii(s): except UnicodeError: return False + class easy_install(Command): """Manage a download/build/install process""" description = "Find/get/install Python packages" @@ -111,22 +116,22 @@ class easy_install(Command): ("index-url=", "i", "base URL of Python Package Index"), ("find-links=", "f", "additional URL(s) to search for packages"), ("build-directory=", "b", - "download/extract/build in DIR; keep the results"), + "download/extract/build in DIR; keep the results"), ('optimize=', 'O', - "also compile with optimization: -O1 for \"python -O\", " - "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('record=', None, - "filename in which to record list of installed files"), + "filename in which to record list of installed files"), ('always-unzip', 'Z', "don't install as a zipfile, no matter what"), - ('site-dirs=','S',"list of directories where .pth files work"), + ('site-dirs=', 'S', "list of directories where .pth files work"), ('editable', 'e', "Install specified packages in editable form"), ('no-deps', 'N', "don't install dependencies"), ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), ('local-snapshots-ok', 'l', - "allow building eggs from local checkouts"), + "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), ('no-find-links', None, - "Don't load find-links defined in packages being installed") + "Don't load find-links defined in packages being installed") ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', @@ -160,10 +165,10 @@ def initialize_options(self): self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None self.version = None - self.install_purelib = None # for pure module distributions - self.install_platlib = None # non-pure (dists w/ extensions) - self.install_headers = None # for C/C++ headers - self.install_lib = None # set to either purelib or platlib + self.install_purelib = None # for pure module distributions + self.install_platlib = None # non-pure (dists w/ extensions) + self.install_headers = None # for C/C++ headers + self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None self.install_base = None @@ -198,7 +203,8 @@ def delete_blockers(self, blockers): if os.path.exists(filename) or os.path.islink(filename): log.info("Deleting %s", filename) if not self.dry_run: - if os.path.isdir(filename) and not os.path.islink(filename): + if (os.path.isdir(filename) and + not os.path.islink(filename)): rmtree(filename) else: os.unlink(filename) @@ -231,7 +237,7 @@ def finalize_options(self): self.config_vars['usersite'] = self.install_usersite # fix the install_dir if "--user" was used - #XXX: duplicate of the code in the setup command + # XXX: duplicate of the code in the setup command if self.user and site.ENABLE_USER_SITE: self.create_home_path() if self.install_userbase is None: @@ -246,7 +252,8 @@ def finalize_options(self): self.expand_basedirs() self.expand_dirs() - self._expand('install_dir','script_dir','build_directory','site_dirs') + self._expand('install_dir', 'script_dir', 'build_directory', + 'site_dirs') # If a non-default installation directory was specified, default the # script directory to match it. if self.script_dir is None: @@ -258,12 +265,12 @@ def finalize_options(self): # Let install_dir get set by install_lib command, which in turn # gets its info from the install command, and takes into account # --prefix and --home and all that other crud. - self.set_undefined_options('install_lib', - ('install_dir','install_dir') + self.set_undefined_options( + 'install_lib', ('install_dir', 'install_dir') ) # Likewise, set default script_dir from 'install_scripts.install_dir' - self.set_undefined_options('install_scripts', - ('install_dir', 'script_dir') + self.set_undefined_options( + 'install_scripts', ('install_dir', 'script_dir') ) if self.user and self.install_purelib: @@ -277,18 +284,20 @@ def finalize_options(self): self.all_site_dirs = get_site_dirs() if self.site_dirs is not None: site_dirs = [ - os.path.expanduser(s.strip()) for s in self.site_dirs.split(',') + os.path.expanduser(s.strip()) for s in + self.site_dirs.split(',') ] for d in site_dirs: if not os.path.isdir(d): log.warn("%s (in --site-dirs) does not exist", d) elif normalize_path(d) not in normpath: raise DistutilsOptionError( - d+" (in --site-dirs) is not on sys.path" + d + " (in --site-dirs) is not on sys.path" ) else: self.all_site_dirs.append(normalize_path(d)) - if not self.editable: self.check_site_dir() + if not self.editable: + self.check_site_dir() self.index_url = self.index_url or "https://pypi.python.org/simple" self.shadow_path = self.all_site_dirs[:] for path_item in self.install_dir, normalize_path(self.script_dir): @@ -301,9 +310,9 @@ def finalize_options(self): hosts = ['*'] if self.package_index is None: self.package_index = self.create_index( - self.index_url, search_path = self.shadow_path, hosts=hosts, + self.index_url, search_path=self.shadow_path, hosts=hosts, ) - self.local_index = Environment(self.shadow_path+sys.path) + self.local_index = Environment(self.shadow_path + sys.path) if self.find_links is not None: if isinstance(self.find_links, basestring): @@ -311,14 +320,15 @@ def finalize_options(self): else: self.find_links = [] if self.local_snapshots_ok: - self.package_index.scan_egg_links(self.shadow_path+sys.path) + self.package_index.scan_egg_links(self.shadow_path + sys.path) if not self.no_find_links: self.package_index.add_find_links(self.find_links) - self.set_undefined_options('install_lib', ('optimize','optimize')) - if not isinstance(self.optimize,int): + self.set_undefined_options('install_lib', ('optimize', 'optimize')) + if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - if not (0 <= self.optimize <= 2): raise ValueError + if not (0 <= self.optimize <= 2): + raise ValueError except ValueError: raise DistutilsOptionError("--optimize must be 0, 1, or 2") @@ -350,7 +360,7 @@ def expand_dirs(self): """Calls `os.path.expanduser` on install dirs.""" self._expand_attrs(['install_purelib', 'install_platlib', 'install_lib', 'install_headers', - 'install_scripts', 'install_data',]) + 'install_scripts', 'install_data', ]) def run(self): if self.verbose != self.distribution.verbose: @@ -360,11 +370,12 @@ def run(self): self.easy_install(spec, not self.no_deps) if self.record: outputs = self.outputs - if self.root: # strip any package prefix + if self.root: # strip any package prefix root_len = len(self.root) for counter in range(len(outputs)): outputs[counter] = outputs[counter][root_len:] from distutils import file_util + self.execute( file_util.write_file, (self.record, outputs), "writing list of installed files to '%s'" % @@ -392,7 +403,7 @@ def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" instdir = normalize_path(self.install_dir) - pth_file = os.path.join(instdir,'easy-install.pth') + pth_file = os.path.join(instdir, 'easy-install.pth') # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs @@ -402,13 +413,14 @@ def check_site_dir(self): is_site_dir = self.check_pth_processing() else: # make sure we can write to target dir - testfile = self.pseudo_tempname()+'.write-test' + testfile = self.pseudo_tempname() + '.write-test' test_exists = os.path.exists(testfile) try: - if test_exists: os.unlink(testfile) - open(testfile,'w').close() + if test_exists: + os.unlink(testfile) + open(testfile, 'w').close() os.unlink(testfile) - except (OSError,IOError): + except (OSError, IOError): self.cant_write_to_target() if not is_site_dir and not self.multi_version: @@ -421,13 +433,13 @@ def check_site_dir(self): else: self.pth_file = None - PYTHONPATH = os.environ.get('PYTHONPATH','').split(os.pathsep) + PYTHONPATH = os.environ.get('PYTHONPATH', '').split(os.pathsep) if instdir not in map(normalize_path, [_f for _f in PYTHONPATH if _f]): # only PYTHONPATH dirs need a site.py, so pretend it's there self.sitepy_installed = True elif self.multi_version and not os.path.exists(pth_file): - self.sitepy_installed = True # don't need site.py in this case - self.pth_file = None # and don't create a .pth file + self.sitepy_installed = True # don't need site.py in this case + self.pth_file = None # and don't create a .pth file self.install_dir = instdir def cant_write_to_target(self): @@ -473,32 +485,36 @@ def check_pth_processing(self): """Empirically verify whether .pth files are supported in inst. dir""" instdir = self.install_dir log.info("Checking .pth file support in %s", instdir) - pth_file = self.pseudo_tempname()+".pth" - ok_file = pth_file+'.ok' + pth_file = self.pseudo_tempname() + ".pth" + ok_file = pth_file + '.ok' ok_exists = os.path.exists(ok_file) try: - if ok_exists: os.unlink(ok_file) + if ok_exists: + os.unlink(ok_file) dirname = os.path.dirname(ok_file) if not os.path.exists(dirname): os.makedirs(dirname) - f = open(pth_file,'w') - except (OSError,IOError): + f = open(pth_file, 'w') + except (OSError, IOError): self.cant_write_to_target() else: try: - f.write("import os; f = open(%r, 'w'); f.write('OK'); f.close()\n" % (ok_file,)) + f.write("import os; f = open(%r, 'w'); f.write('OK'); " + "f.close()\n" % (ok_file,)) f.close() - f=None + f = None executable = sys.executable - if os.name=='nt': - dirname,basename = os.path.split(executable) - alt = os.path.join(dirname,'pythonw.exe') - if basename.lower()=='python.exe' and os.path.exists(alt): + if os.name == 'nt': + dirname, basename = os.path.split(executable) + alt = os.path.join(dirname, 'pythonw.exe') + if (basename.lower() == 'python.exe' and + os.path.exists(alt)): # use pythonw.exe to avoid opening a console window executable = alt from distutils.spawn import spawn - spawn([executable,'-E','-c','pass'],0) + + spawn([executable, '-E', '-c', 'pass'], 0) if os.path.exists(ok_file): log.info( @@ -527,7 +543,7 @@ def install_egg_scripts(self, dist): continue self.install_script( dist, script_name, - dist.get_metadata('scripts/'+script_name) + dist.get_metadata('scripts/' + script_name) ) self.install_wrapper_scripts(dist) @@ -535,7 +551,7 @@ def add_output(self, path): if os.path.isdir(path): for base, dirs, files in os.walk(path): for filename in files: - self.outputs.append(os.path.join(base,filename)) + self.outputs.append(os.path.join(base, filename)) else: self.outputs.append(path) @@ -547,7 +563,7 @@ def not_editable(self, spec): % (spec,) ) - def check_editable(self,spec): + def check_editable(self, spec): if not self.editable: return @@ -560,15 +576,17 @@ def check_editable(self,spec): def easy_install(self, spec, deps=False): tmpdir = tempfile.mkdtemp(prefix="easy_install-") download = None - if not self.editable: self.install_site_py() + if not self.editable: + self.install_site_py() try: - if not isinstance(spec,Requirement): + if not isinstance(spec, Requirement): if URL_SCHEME(spec): # It's a url, download it to tmpdir and process self.not_editable(spec) download = self.package_index.download(spec, tmpdir) - return self.install_item(None, download, tmpdir, deps, True) + return self.install_item(None, download, tmpdir, deps, + True) elif os.path.exists(spec): # Existing file or directory, just process it directly @@ -579,15 +597,15 @@ def easy_install(self, spec, deps=False): self.check_editable(spec) dist = self.package_index.fetch_distribution( - spec, tmpdir, self.upgrade, self.editable, not self.always_copy, - self.local_index + spec, tmpdir, self.upgrade, self.editable, + not self.always_copy, self.local_index ) if dist is None: msg = "Could not find suitable distribution for %r" % spec if self.always_copy: - msg+=" (--always-copy skips system and development eggs)" + msg += " (--always-copy skips system and development eggs)" raise DistutilsError(msg) - elif dist.precedence==DEVELOP_DIST: + elif dist.precedence == DEVELOP_DIST: # .egg-info dists don't need installing, just process deps self.process_distribution(spec, dist, deps, "Using") return dist @@ -614,10 +632,10 @@ def install_item(self, spec, download, tmpdir, deps, install_needed=False): # at this point, we know it's a local .egg, we just don't know if # it's already installed. for dist in self.local_index[spec.project_name]: - if dist.location==download: + if dist.location == download: break else: - install_needed = True # it's not in the local index + install_needed = True # it's not in the local index log.info("Processing %s", os.path.basename(download)) @@ -704,17 +722,18 @@ def should_unzip(self, dist): def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) if os.path.exists(dst): - msg = "%r already exists in %s; build directory %s will not be kept" + msg = ("%r already exists in %s; build directory %s will not be " + "kept") log.warn(msg, spec.key, self.build_directory, setup_base) return setup_base if os.path.isdir(dist_filename): setup_base = dist_filename else: - if os.path.dirname(dist_filename)==setup_base: - os.unlink(dist_filename) # get it out of the tmp dir + if os.path.dirname(dist_filename) == setup_base: + os.unlink(dist_filename) # get it out of the tmp dir contents = os.listdir(setup_base) - if len(contents)==1: - dist_filename = os.path.join(setup_base,contents[0]) + if len(contents) == 1: + dist_filename = os.path.join(setup_base, contents[0]) if os.path.isdir(dist_filename): # if the only thing there is a directory, move it instead setup_base = dist_filename @@ -734,7 +753,7 @@ def install_script(self, dist, script_name, script_text, dev_path=None): if is_script: script_text = (get_script_header(script_text) + - self._load_template(dev_path) % locals()) + self._load_template(dev_path) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') @staticmethod @@ -744,7 +763,7 @@ def _load_template(dev_path): function loads one of them and prepares it for use. """ # See https://bitbucket.org/pypa/setuptools/issue/134 for info - # on script file naming and downstream issues with SVR4 + # on script file naming and downstream issues with SVR4 name = 'script.tmpl' if dev_path: name = name.replace('.tmpl', ' (dev).tmpl') @@ -754,8 +773,9 @@ def _load_template(dev_path): def write_script(self, script_name, contents, mode="t", blockers=()): """Write an executable file to the scripts directory""" - self.delete_blockers( # clean up old .py/.pyw w/o a script - [os.path.join(self.script_dir,x) for x in blockers]) + self.delete_blockers( # clean up old .py/.pyw w/o a script + [os.path.join(self.script_dir, x) for x in blockers] + ) log.info("Installing %s script to %s", script_name, self.script_dir) target = os.path.join(self.script_dir, script_name) self.add_output(target) @@ -765,10 +785,10 @@ def write_script(self, script_name, contents, mode="t", blockers=()): ensure_directory(target) if os.path.exists(target): os.unlink(target) - f = open(target,"w"+mode) + f = open(target, "w" + mode) f.write(contents) f.close() - chmod(target, 0o777-mask) + chmod(target, 0o777 - mask) def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them @@ -784,7 +804,7 @@ def install_eggs(self, spec, dist_filename, tmpdir): elif os.path.isdir(dist_filename): setup_base = os.path.abspath(dist_filename) - if (setup_base.startswith(tmpdir) # something we downloaded + if (setup_base.startswith(tmpdir) # something we downloaded and self.build_directory and spec is not None): setup_base = self.maybe_move(spec, dist_filename, setup_base) @@ -795,11 +815,13 @@ def install_eggs(self, spec, dist_filename, tmpdir): setups = glob(os.path.join(setup_base, '*', 'setup.py')) if not setups: raise DistutilsError( - "Couldn't find a setup script in %s" % os.path.abspath(dist_filename) + "Couldn't find a setup script in %s" % + os.path.abspath(dist_filename) ) - if len(setups)>1: + if len(setups) > 1: raise DistutilsError( - "Multiple setup scripts in %s" % os.path.abspath(dist_filename) + "Multiple setup scripts in %s" % + os.path.abspath(dist_filename) ) setup_script = setups[0] @@ -812,13 +834,15 @@ def install_eggs(self, spec, dist_filename, tmpdir): def egg_distribution(self, egg_path): if os.path.isdir(egg_path): - metadata = PathMetadata(egg_path,os.path.join(egg_path,'EGG-INFO')) + metadata = PathMetadata(egg_path, os.path.join(egg_path, + 'EGG-INFO')) else: metadata = EggMetadata(zipimport.zipimporter(egg_path)) - return Distribution.from_filename(egg_path,metadata=metadata) + return Distribution.from_filename(egg_path, metadata=metadata) def install_egg(self, egg_path, tmpdir): - destination = os.path.join(self.install_dir,os.path.basename(egg_path)) + destination = os.path.join(self.install_dir, + os.path.basename(egg_path)) destination = os.path.abspath(destination) if not self.dry_run: ensure_directory(destination) @@ -828,28 +852,30 @@ def install_egg(self, egg_path, tmpdir): if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): - self.execute(os.unlink,(destination,),"Removing "+destination) + self.execute(os.unlink, (destination,), "Removing " + + destination) try: new_dist_is_zipped = False if os.path.isdir(egg_path): if egg_path.startswith(tmpdir): - f,m = shutil.move, "Moving" + f, m = shutil.move, "Moving" else: - f,m = shutil.copytree, "Copying" + f, m = shutil.copytree, "Copying" elif self.should_unzip(dist): self.mkpath(destination) - f,m = self.unpack_and_compile, "Extracting" + f, m = self.unpack_and_compile, "Extracting" else: new_dist_is_zipped = True if egg_path.startswith(tmpdir): - f,m = shutil.move, "Moving" + f, m = shutil.move, "Moving" else: - f,m = shutil.copy2, "Copying" + f, m = shutil.copy2, "Copying" self.execute(f, (egg_path, destination), - (m+" %s to %s") % - (os.path.basename(egg_path),os.path.dirname(destination))) + (m + " %s to %s") % + (os.path.basename(egg_path), + os.path.dirname(destination))) update_dist_caches(destination, - fix_zipimporter_caches=new_dist_is_zipped) + fix_zipimporter_caches=new_dist_is_zipped) except: update_dist_caches(destination, fix_zipimporter_caches=False) raise @@ -867,30 +893,32 @@ def install_exe(self, dist_filename, tmpdir): # Create a dummy distribution object until we build the real distro dist = Distribution( None, - project_name=cfg.get('metadata','name'), - version=cfg.get('metadata','version'), platform=get_platform(), + project_name=cfg.get('metadata', 'name'), + version=cfg.get('metadata', 'version'), platform=get_platform(), ) # Convert the .exe to an unpacked egg - egg_path = dist.location = os.path.join(tmpdir, dist.egg_name()+'.egg') + egg_path = dist.location = os.path.join(tmpdir, dist.egg_name() + + '.egg') egg_tmp = egg_path + '.tmp' _egg_info = os.path.join(egg_tmp, 'EGG-INFO') pkg_inf = os.path.join(_egg_info, 'PKG-INFO') - ensure_directory(pkg_inf) # make sure EGG-INFO dir exists - dist._provider = PathMetadata(egg_tmp, _egg_info) # XXX + ensure_directory(pkg_inf) # make sure EGG-INFO dir exists + dist._provider = PathMetadata(egg_tmp, _egg_info) # XXX self.exe_to_egg(dist_filename, egg_tmp) # Write EGG-INFO/PKG-INFO if not os.path.exists(pkg_inf): - f = open(pkg_inf,'w') + f = open(pkg_inf, 'w') f.write('Metadata-Version: 1.0\n') - for k,v in cfg.items('metadata'): + for k, v in cfg.items('metadata'): if k != 'target_version': - f.write('%s: %s\n' % (k.replace('_','-').title(), v)) + f.write('%s: %s\n' % (k.replace('_', '-').title(), v)) f.close() - script_dir = os.path.join(_egg_info,'scripts') - self.delete_blockers( # delete entry-point scripts to avoid duping - [os.path.join(script_dir,args[0]) for args in get_script_args(dist)] + script_dir = os.path.join(_egg_info, 'scripts') + self.delete_blockers( # delete entry-point scripts to avoid duping + [os.path.join(script_dir, args[0]) for args in + get_script_args(dist)] ) # Build .egg file from tmpdir bdist_egg.make_zipfile( @@ -906,11 +934,12 @@ def exe_to_egg(self, dist_filename, egg_tmp): to_compile = [] native_libs = [] top_level = {} - def process(src,dst): + + def process(src, dst): s = src.lower() - for old,new in prefixes: + for old, new in prefixes: if s.startswith(old): - src = new+src[len(old):] + src = new + src[len(old):] parts = src.split('/') dst = os.path.join(egg_tmp, *parts) dl = dst.lower() @@ -918,35 +947,37 @@ def process(src,dst): parts[-1] = bdist_egg.strip_module(parts[-1]) top_level[os.path.splitext(parts[0])[0]] = 1 native_libs.append(src) - elif dl.endswith('.py') and old!='SCRIPTS/': + elif dl.endswith('.py') and old != 'SCRIPTS/': top_level[os.path.splitext(parts[0])[0]] = 1 to_compile.append(dst) return dst if not src.endswith('.pth'): log.warn("WARNING: can't process %s", src) return None + # extract, tracking .pyd/.dll->native_libs and .py -> to_compile unpack_archive(dist_filename, egg_tmp, process) stubs = [] for res in native_libs: - if res.lower().endswith('.pyd'): # create stubs for .pyd's + if res.lower().endswith('.pyd'): # create stubs for .pyd's parts = res.split('/') resource = parts[-1] - parts[-1] = bdist_egg.strip_module(parts[-1])+'.py' + parts[-1] = bdist_egg.strip_module(parts[-1]) + '.py' pyfile = os.path.join(egg_tmp, *parts) to_compile.append(pyfile) stubs.append(pyfile) bdist_egg.write_stub(resource, pyfile) - self.byte_compile(to_compile) # compile .py's - bdist_egg.write_safety_flag(os.path.join(egg_tmp,'EGG-INFO'), + self.byte_compile(to_compile) # compile .py's + bdist_egg.write_safety_flag( + os.path.join(egg_tmp, 'EGG-INFO'), bdist_egg.analyze_egg(egg_tmp, stubs)) # write zip-safety flag - for name in 'top_level','native_libs': + for name in 'top_level', 'native_libs': if locals()[name]: - txt = os.path.join(egg_tmp, 'EGG-INFO', name+'.txt') + txt = os.path.join(egg_tmp, 'EGG-INFO', name + '.txt') if not os.path.exists(txt): - f = open(txt,'w') - f.write('\n'.join(locals()[name])+'\n') + f = open(txt, 'w') + f.write('\n'.join(locals()[name]) + '\n') f.close() def installation_report(self, req, dist, what="Installed"): @@ -964,7 +995,7 @@ def installation_report(self, req, dist, what="Installed"): pkg_resources.require("%(name)s==%(version)s") # this exact version pkg_resources.require("%(name)s>=%(version)s") # this version or higher """ - if self.install_dir not in map(normalize_path,sys.path): + if self.install_dir not in map(normalize_path, sys.path): msg += """ Note also that the installation directory must be on sys.path at runtime for @@ -974,7 +1005,7 @@ def installation_report(self, req, dist, what="Installed"): eggloc = dist.location name = dist.project_name version = dist.version - extras = '' # TODO: self.report_extras(req, dist) + extras = '' # TODO: self.report_extras(req, dist) return msg % locals() def report_editable(self, spec, setup_script): @@ -995,15 +1026,15 @@ def run_setup(self, setup_script, setup_base, args): sys.modules.setdefault('distutils.command.egg_info', egg_info) args = list(args) - if self.verbose>2: + if self.verbose > 2: v = 'v' * (self.verbose - 1) - args.insert(0,'-'+v) - elif self.verbose<2: - args.insert(0,'-q') + args.insert(0, '-' + v) + elif self.verbose < 2: + args.insert(0, '-q') if self.dry_run: - args.insert(0,'-n') + args.insert(0, '-n') log.info( - "Running %s %s", setup_script[len(setup_base)+1:], ' '.join(args) + "Running %s %s", setup_script[len(setup_base) + 1:], ' '.join(args) ) try: run_setup(setup_script, args) @@ -1029,11 +1060,11 @@ def build_and_install(self, setup_script, setup_base): eggs.append(self.install_egg(dist.location, setup_base)) if not eggs and not self.dry_run: log.warn("No eggs found in %s (setup script problem?)", - dist_dir) + dist_dir) return eggs finally: rmtree(dist_dir) - log.set_verbosity(self.verbose) # restore our log verbosity + log.set_verbosity(self.verbose) # restore our log verbosity def _set_fetcher_options(self, base): """ @@ -1043,7 +1074,7 @@ def _set_fetcher_options(self, base): are available to that command as well. """ # find the fetch options from easy_install and write them out - # to the setup.cfg file. + # to the setup.cfg file. ei_opts = self.distribution.get_option_dict('easy_install').copy() fetch_directives = ( 'find_links', 'site_dirs', 'index_url', 'optimize', @@ -1051,7 +1082,8 @@ def _set_fetcher_options(self, base): ) fetch_options = {} for key, val in ei_opts.items(): - if key not in fetch_directives: continue + if key not in fetch_directives: + continue fetch_options[key.replace('_', '-')] = val[1] # create a settings dictionary suitable for `edit_config` settings = dict(easy_install=fetch_options) @@ -1062,7 +1094,7 @@ def update_pth(self, dist): if self.pth_file is None: return - for d in self.pth_file[dist.key]: # drop old entries + for d in self.pth_file[dist.key]: # drop old entries if self.multi_version or d.location != dist.location: log.info("Removing %s from easy-install.pth file", d) self.pth_file.remove(d) @@ -1077,7 +1109,7 @@ def update_pth(self, dist): ) else: log.info("Adding %s to easy-install.pth file", dist) - self.pth_file.add(dist) # add new entry + self.pth_file.add(dist) # add new entry if dist.location not in self.shadow_path: self.shadow_path.append(dist.location) @@ -1085,19 +1117,20 @@ def update_pth(self, dist): self.pth_file.save() - if dist.key=='setuptools': + if dist.key == 'setuptools': # Ensure that setuptools itself never becomes unavailable! # XXX should this check for latest version? - filename = os.path.join(self.install_dir,'setuptools.pth') - if os.path.islink(filename): os.unlink(filename) + filename = os.path.join(self.install_dir, 'setuptools.pth') + if os.path.islink(filename): + os.unlink(filename) f = open(filename, 'wt') - f.write(self.pth_file.make_relative(dist.location)+'\n') + f.write(self.pth_file.make_relative(dist.location) + '\n') f.close() def unpack_progress(self, src, dst): # Progress filter for unpacking log.debug("Unpacking %s to %s", src, dst) - return dst # only unpack-and-compile skips files for dry run + return dst # only unpack-and-compile skips files for dry run def unpack_and_compile(self, egg_path, destination): to_compile = [] @@ -1108,7 +1141,7 @@ def pf(src, dst): to_compile.append(dst) elif dst.endswith('.dll') or dst.endswith('.so'): to_chmod.append(dst) - self.unpack_progress(src,dst) + self.unpack_progress(src, dst) return not self.dry_run and dst or None unpack_archive(egg_path, destination, pf) @@ -1124,6 +1157,7 @@ def byte_compile(self, to_compile): return from distutils.util import byte_compile + try: # try to make the byte compile messages quieter log.set_verbosity(self.verbose - 1) @@ -1135,7 +1169,7 @@ def byte_compile(self, to_compile): dry_run=self.dry_run ) finally: - log.set_verbosity(self.verbose) # restore original verbosity + log.set_verbosity(self.verbose) # restore original verbosity def no_default_version_msg(self): template = """bad install directory or PYTHONPATH @@ -1166,7 +1200,7 @@ def no_default_version_msg(self): https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" - return template % (self.install_dir, os.environ.get('PYTHONPATH','')) + return template % (self.install_dir, os.environ.get('PYTHONPATH', '')) def install_site_py(self): """Make sure there's a site.py in the target dir, if needed""" @@ -1180,7 +1214,7 @@ def install_site_py(self): if os.path.exists(sitepy): log.debug("Checking existing site.py in %s", self.install_dir) - f = open(sitepy,'rb') + f = open(sitepy, 'rb') current = f.read() # we want str, not bytes if PY3: @@ -1197,7 +1231,7 @@ def install_site_py(self): log.info("Creating %s", sitepy) if not self.dry_run: ensure_directory(sitepy) - f = open(sitepy,'wb') + f = open(sitepy, 'wb') f.write(source) f.close() self.byte_compile([sitepy]) @@ -1215,15 +1249,15 @@ def create_home_path(self): os.makedirs(path, 0o700) INSTALL_SCHEMES = dict( - posix = dict( - install_dir = '$base/lib/python$py_version_short/site-packages', - script_dir = '$base/bin', + posix=dict( + install_dir='$base/lib/python$py_version_short/site-packages', + script_dir='$base/bin', ), ) DEFAULT_SCHEME = dict( - install_dir = '$base/Lib/site-packages', - script_dir = '$base/Scripts', + install_dir='$base/Lib/site-packages', + script_dir='$base/Scripts', ) def _expand(self, *attrs): @@ -1233,12 +1267,13 @@ def _expand(self, *attrs): # Set default install_dir/scripts from --prefix config_vars = config_vars.copy() config_vars['base'] = self.prefix - scheme = self.INSTALL_SCHEMES.get(os.name,self.DEFAULT_SCHEME) - for attr,val in scheme.items(): - if getattr(self,attr,None) is None: - setattr(self,attr,val) + scheme = self.INSTALL_SCHEMES.get(os.name, self.DEFAULT_SCHEME) + for attr, val in scheme.items(): + if getattr(self, attr, None) is None: + setattr(self, attr, val) from distutils.util import subst_vars + for attr in attrs: val = getattr(self, attr) if val is not None: @@ -1247,6 +1282,7 @@ def _expand(self, *attrs): val = os.path.expanduser(val) setattr(self, attr, val) + def get_site_dirs(): # return a list of 'site' dirs sitedirs = [_f for _f in os.environ.get('PYTHONPATH', @@ -1260,10 +1296,10 @@ def get_site_dirs(): sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) elif os.sep == '/': sitedirs.extend([os.path.join(prefix, - "lib", - "python" + sys.version[:3], - "site-packages"), - os.path.join(prefix, "lib", "site-python")]) + "lib", + "python" + sys.version[:3], + "site-packages"), + os.path.join(prefix, "lib", "site-python")]) else: sitedirs.extend( [prefix, os.path.join(prefix, "lib", "site-packages")] @@ -1283,7 +1319,8 @@ def get_site_dirs(): 'site-packages')) lib_paths = get_path('purelib'), get_path('platlib') for site_lib in lib_paths: - if site_lib not in sitedirs: sitedirs.append(site_lib) + if site_lib not in sitedirs: + sitedirs.append(site_lib) if site.ENABLE_USER_SITE: sitedirs.append(site.USER_SITE) @@ -1314,12 +1351,12 @@ def expand_paths(inputs): if not name.endswith('.pth'): # We only care about the .pth files continue - if name in ('easy-install.pth','setuptools.pth'): + if name in ('easy-install.pth', 'setuptools.pth'): # Ignore .pth files that we control continue # Read the .pth file - f = open(os.path.join(dirname,name)) + f = open(os.path.join(dirname, name)) lines = list(yield_lines(f)) f.close() @@ -1339,7 +1376,7 @@ def extract_wininst_cfg(dist_filename): Returns a ConfigParser.RawConfigParser, or None """ - f = open(dist_filename,'rb') + f = open(dist_filename, 'rb') try: endrec = zipfile._EndRecData(f) if endrec is None: @@ -1348,21 +1385,23 @@ def extract_wininst_cfg(dist_filename): prepended = (endrec[9] - endrec[5]) - endrec[6] if prepended < 12: # no wininst data here return None - f.seek(prepended-12) + f.seek(prepended - 12) from setuptools.compat import StringIO, ConfigParser import struct - tag, cfglen, bmlen = struct.unpack("= (2,6): + # byte. + if sys.version_info >= (2, 6): null_byte = bytes([0]) else: null_byte = chr(0) @@ -1395,25 +1434,25 @@ def get_exe_prefixes(exe_filename): for info in z.infolist(): name = info.filename parts = name.split('/') - if len(parts)==3 and parts[2]=='PKG-INFO': + if len(parts) == 3 and parts[2] == 'PKG-INFO': if parts[1].endswith('.egg-info'): - prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/')) + prefixes.insert(0, ('/'.join(parts[:2]), 'EGG-INFO/')) break if len(parts) != 2 or not name.endswith('.pth'): continue if name.endswith('-nspkg.pth'): continue - if parts[0].upper() in ('PURELIB','PLATLIB'): + if parts[0].upper() in ('PURELIB', 'PLATLIB'): contents = z.read(name) if PY3: contents = contents.decode() for pth in yield_lines(contents): - pth = pth.strip().replace('\\','/') + pth = pth.strip().replace('\\', '/') if not pth.startswith('import'): - prefixes.append((('%s/%s/' % (parts[0],pth)), '')) + prefixes.append((('%s/%s/' % (parts[0], pth)), '')) finally: z.close() - prefixes = [(x.lower(),y) for x, y in prefixes] + prefixes = [(x.lower(), y) for x, y in prefixes] prefixes.sort() prefixes.reverse() return prefixes @@ -1427,6 +1466,7 @@ def parse_requirement_arg(spec): "Not a URL, existing file, or requirement spec: %r" % (spec,) ) + class PthDistributions(Environment): """A .pth file with Distribution paths in it""" @@ -1446,7 +1486,7 @@ def _load(self): saw_import = False seen = dict.fromkeys(self.sitedirs) if os.path.isfile(self.filename): - f = open(self.filename,'rt') + f = open(self.filename, 'rt') for line in f: if line.startswith('import'): saw_import = True @@ -1458,17 +1498,17 @@ def _load(self): # skip non-existent paths, in case somebody deleted a package # manually, and duplicate paths as well path = self.paths[-1] = normalize_path( - os.path.join(self.basedir,path) + os.path.join(self.basedir, path) ) if not os.path.exists(path) or path in seen: - self.paths.pop() # skip it - self.dirty = True # we cleaned up, so we're dirty now :) + self.paths.pop() # skip it + self.dirty = True # we cleaned up, so we're dirty now :) continue seen[path] = 1 f.close() if self.paths and not saw_import: - self.dirty = True # ensure anything we touch has import wrappers + self.dirty = True # ensure anything we touch has import wrappers while self.paths and not self.paths[-1].strip(): self.paths.pop() @@ -1477,7 +1517,7 @@ def save(self): if not self.dirty: return - data = '\n'.join(map(self.make_relative,self.paths)) + data = '\n'.join(map(self.make_relative, self.paths)) if data: log.debug("Saving %s", self.filename) data = ( @@ -1491,7 +1531,7 @@ def save(self): if os.path.islink(self.filename): os.unlink(self.filename) - f = open(self.filename,'wt') + f = open(self.filename, 'wt') f.write(data) f.close() @@ -1504,9 +1544,9 @@ def save(self): def add(self, dist): """Add `dist` to the distribution map""" if (dist.location not in self.paths and ( - dist.location not in self.sitedirs or - dist.location == os.getcwd() # account for '.' being in PYTHONPATH - )): + dist.location not in self.sitedirs or + dist.location == os.getcwd() # account for '.' being in PYTHONPATH + )): self.paths.append(dist.location) self.dirty = True Environment.add(self, dist) @@ -1518,13 +1558,13 @@ def remove(self, dist): self.dirty = True Environment.remove(self, dist) - def make_relative(self,path): + def make_relative(self, path): npath, last = os.path.split(normalize_path(path)) baselen = len(self.basedir) parts = [last] - sep = os.altsep=='/' and '/' or os.sep - while len(npath)>=baselen: - if npath==self.basedir: + sep = os.altsep == '/' and '/' or os.sep + while len(npath) >= baselen: + if npath == self.basedir: parts.append(os.curdir) parts.reverse() return sep.join(parts) @@ -1548,12 +1588,13 @@ def _first_line_re(): def get_script_header(script_text, executable=sys_executable, wininst=False): """Create a #! line, getting options (if any) from script_text""" - first = (script_text+'\n').splitlines()[0] + first = (script_text + '\n').splitlines()[0] match = _first_line_re().match(first) options = '' if match: options = match.group(1) or '' - if options: options = ' '+options + if options: + options = ' ' + options if wininst: executable = "python.exe" else: @@ -1563,20 +1604,22 @@ def get_script_header(script_text, executable=sys_executable, wininst=False): # Non-ascii path to sys.executable, use -x to prevent warnings if options: if options.strip().startswith('-'): - options = ' -x'+options.strip()[1:] - # else: punt, we can't do it, let the warning happen anyway + options = ' -x' + options.strip()[1:] + # else: punt, we can't do it, let the warning happen anyway else: options = ' -x' executable = fix_jython_executable(executable, options) hdr = "#!%(executable)s%(options)s\n" % locals() return hdr + def auto_chmod(func, arg, exc): - if func is os.remove and os.name=='nt': + if func is os.remove and os.name == 'nt': chmod(arg, stat.S_IWRITE) return func(arg) et, ev, _ = sys.exc_info() - reraise(et, (ev[0], ev[1] + (" %s %s" % (func,arg)))) + reraise(et, (ev[0], ev[1] + (" %s %s" % (func, arg)))) + def update_dist_caches(dist_path, fix_zipimporter_caches): """ @@ -1630,7 +1673,7 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): # instances that we do not clear here, but might if ever given a reason to # do so: # * Global setuptools pkg_resources.working_set (a.k.a. 'master working - # set') may contain distributions which may in turn contain their + # set') may contain distributions which may in turn contain their # zipimport.zipimporter loaders. # * Several zipimport.zipimporter loaders held by local variables further # up the function call stack when running the setuptools installation. @@ -1659,6 +1702,7 @@ def update_dist_caches(dist_path, fix_zipimporter_caches): # this is really needed. _remove_and_clear_zip_directory_cache_data(normalized_path) + def _collect_zipimporter_cache_entries(normalized_path, cache): """ Return zipimporter cache entry keys related to a given normalized path. @@ -1678,6 +1722,7 @@ def _collect_zipimporter_cache_entries(normalized_path, cache): result.append(p) return result + def _update_zipimporter_cache(normalized_path, cache, updater=None): """ Update zipimporter cache data for a given normalized path. @@ -1696,7 +1741,7 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): for p in _collect_zipimporter_cache_entries(normalized_path, cache): # N.B. pypy's custom zipimport._zip_directory_cache implementation does # not support the complete dict interface: - # * Does not support item assignment, thus not allowing this function + # * Does not support item assignment, thus not allowing this function # to be used only for removing existing cache entries. # * Does not support the dict.pop() method, forcing us to use the # get/del patterns instead. For more detailed information see the @@ -1709,14 +1754,17 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): if new_entry is not None: cache[p] = new_entry + def _uncache(normalized_path, cache): _update_zipimporter_cache(normalized_path, cache) + def _remove_and_clear_zip_directory_cache_data(normalized_path): def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): old_entry.clear() - _update_zipimporter_cache(normalized_path, - zipimport._zip_directory_cache, + + _update_zipimporter_cache( + normalized_path, zipimport._zip_directory_cache, updater=clear_and_remove_cached_zip_archive_directory_data) # PyPy Python implementation does not allow directly writing to the @@ -1728,7 +1776,7 @@ def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): # instead of being automatically corrected to use the new correct zip archive # directory information. if '__pypy__' in sys.builtin_module_names: - _replace_zip_directory_cache_data = \ + _replace_zip_directory_cache_data = \ _remove_and_clear_zip_directory_cache_data else: def _replace_zip_directory_cache_data(normalized_path): @@ -1744,10 +1792,12 @@ def replace_cached_zip_archive_directory_data(path, old_entry): zipimport.zipimporter(path) old_entry.update(zipimport._zip_directory_cache[path]) return old_entry - _update_zipimporter_cache(normalized_path, - zipimport._zip_directory_cache, + + _update_zipimporter_cache( + normalized_path, zipimport._zip_directory_cache, updater=replace_cached_zip_archive_directory_data) + def is_python(text, filename=''): "Is this string a valid Python script?" try: @@ -1757,15 +1807,18 @@ def is_python(text, filename=''): else: return True + def is_sh(executable): """Determine if the specified executable is a .sh (contains a #! line)""" try: fp = open(executable) magic = fp.read(2) fp.close() - except (OSError,IOError): return executable + except (OSError, IOError): + return executable return magic == '#!' + def nt_quote_arg(arg): """Quote a command line argument according to Windows parsing rules""" @@ -1782,7 +1835,7 @@ def nt_quote_arg(arg): nb += 1 elif c == '"': # double preceding backslashes, then add a \" - result.append('\\' * (nb*2) + '\\"') + result.append('\\' * (nb * 2) + '\\"') nb = 0 else: if nb: @@ -1794,29 +1847,33 @@ def nt_quote_arg(arg): result.append('\\' * nb) if needquote: - result.append('\\' * nb) # double the trailing backslashes + result.append('\\' * nb) # double the trailing backslashes result.append('"') return ''.join(result) + def is_python_script(script_text, filename): """Is this text, as a whole, a Python script? (as opposed to shell/bat/etc. """ if filename.endswith('.py') or filename.endswith('.pyw'): - return True # extension says it's Python + return True # extension says it's Python if is_python(script_text, filename): - return True # it's syntactically valid Python + return True # it's syntactically valid Python if script_text.startswith('#!'): # It begins with a '#!' line, so check if 'python' is in it somewhere return 'python' in script_text.splitlines()[0].lower() - return False # Not any Python I can recognize + return False # Not any Python I can recognize + try: from os import chmod as _chmod except ImportError: # Jython compatibility - def _chmod(*args): pass + def _chmod(*args): + pass + def chmod(path, mode): log.debug("changing mode of %s to %o", path, mode) @@ -1826,10 +1883,12 @@ def chmod(path, mode): e = sys.exc_info()[1] log.debug("chmod failed: %s", e) + def fix_jython_executable(executable, options): if sys.platform.startswith('java') and is_sh(executable): # Workaround for Jython is not needed on Linux systems. import java + if java.lang.System.getProperty("os.name") == "Linux": return executable @@ -1878,19 +1937,19 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): for name, ep in dist.get_entry_map(group).items(): script_text = gen_class.template % locals() for res in gen_class._get_script_args(type_, name, header, - script_text): + script_text): yield res @classmethod def get_writer(cls, force_windows): - if force_windows or sys.platform=='win32': + if force_windows or sys.platform == 'win32': return WindowsScriptWriter.get_writer() return cls @classmethod def _get_script_args(cls, type_, name, header, script_text): # Simply write the stub with no extension. - yield (name, header+script_text) + yield (name, header + script_text) class WindowsScriptWriter(ScriptWriter): @@ -1913,12 +1972,12 @@ def _get_script_args(cls, type_, name, header, script_text): ext = dict(console='.pya', gui='.pyw')[type_] if ext not in os.environ['PATHEXT'].lower().split(';'): warnings.warn("%s not listed in PATHEXT; scripts will not be " - "recognized as executables." % ext, UserWarning) + "recognized as executables." % ext, UserWarning) old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) - blockers = [name+x for x in old] - yield name+ext, header+script_text, 't', blockers + blockers = [name + x for x in old] + yield name + ext, header + script_text, 't', blockers @staticmethod def _adjust_header(type_, orig_header): @@ -1945,33 +2004,35 @@ def _get_script_args(cls, type_, name, header, script_text): """ For Windows, add a .py extension and an .exe launcher """ - if type_=='gui': + if type_ == 'gui': launcher_type = 'gui' ext = '-script.pyw' old = ['.pyw'] else: launcher_type = 'cli' ext = '-script.py' - old = ['.py','.pyc','.pyo'] + old = ['.py', '.pyc', '.pyo'] hdr = cls._adjust_header(type_, header) - blockers = [name+x for x in old] - yield (name+ext, hdr+script_text, 't', blockers) + blockers = [name + x for x in old] + yield (name + ext, hdr + script_text, 't', blockers) yield ( - name+'.exe', get_win_launcher(launcher_type), - 'b' # write in binary mode + name + '.exe', get_win_launcher(launcher_type), + 'b' # write in binary mode ) if not is_64bit(): # install a manifest for the launcher to prevent Windows - # from detecting it as an installer (which it will for + # from detecting it as an installer (which it will for # launchers like easy_install.exe). Consider only # adding a manifest for launchers detected as installers. # See Distribute #143 for details. m_name = name + '.exe.manifest' yield (m_name, load_launcher_manifest(name), 't') + # for backward-compatibility get_script_args = ScriptWriter.get_script_args + def get_win_launcher(type): """ Load the Windows launcher (executable) suitable for launching a script. @@ -1981,7 +2042,7 @@ def get_win_launcher(type): Returns the executable as a byte string. """ launcher_fn = '%s.exe' % type - if platform.machine().lower()=='arm': + if platform.machine().lower() == 'arm': launcher_fn = launcher_fn.replace(".", "-arm.") if is_64bit(): launcher_fn = launcher_fn.replace(".", "-64.") @@ -1989,6 +2050,7 @@ def get_win_launcher(type): launcher_fn = launcher_fn.replace(".", "-32.") return resource_string('setuptools', launcher_fn) + def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') if PY2: @@ -1996,6 +2058,7 @@ def load_launcher_manifest(name): else: return manifest.decode('utf-8') % vars() + def rmtree(path, ignore_errors=False, onerror=auto_chmod): """Recursively delete a directory tree. @@ -2031,19 +2094,23 @@ def onerror(*args): except os.error: onerror(os.rmdir, path, sys.exc_info()) + def current_umask(): tmp = os.umask(0o022) os.umask(tmp) return tmp + def bootstrap(): # This function is called when setuptools*.egg is run using /bin/sh import setuptools + argv0 = os.path.dirname(setuptools.__path__[0]) sys.argv[0] = argv0 sys.argv.append(argv0) main() + def main(argv=None, **kw): from setuptools import setup from setuptools.dist import Distribution @@ -2070,16 +2137,16 @@ def with_ei_usage(f): class DistributionWithoutHelpCommands(Distribution): common_usage = "" - def _show_help(self,*args,**kw): - with_ei_usage(lambda: Distribution._show_help(self,*args,**kw)) + def _show_help(self, *args, **kw): + with_ei_usage(lambda: Distribution._show_help(self, *args, **kw)) if argv is None: argv = sys.argv[1:] - with_ei_usage(lambda: - setup( - script_args = ['-q','easy_install', '-v']+argv, - script_name = sys.argv[0] or 'easy_install', + with_ei_usage( + lambda: setup( + script_args=['-q', 'easy_install', '-v'] + argv, + script_name=sys.argv[0] or 'easy_install', distclass=DistributionWithoutHelpCommands, **kw ) ) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 04ed635762..981c7ab76d 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -2,21 +2,22 @@ Create a distribution's .egg-info directory and contents""" +from distutils.filelist import FileList as _FileList +from distutils.util import convert_path +from distutils import log +import distutils.errors import os import re import sys from setuptools import Command -import distutils.errors -from distutils import log from setuptools.command.sdist import sdist from setuptools.compat import basestring, PY3, StringIO from setuptools import svn_utils -from distutils.util import convert_path -from distutils.filelist import FileList as _FileList -from pkg_resources import (parse_requirements, safe_name, parse_version, - safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) from setuptools.command.sdist import walk_revctrl +from pkg_resources import ( + parse_requirements, safe_name, parse_version, + safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) import setuptools.unicode_utils as unicode_utils @@ -27,11 +28,11 @@ class egg_info(Command): ('egg-base=', 'e', "directory containing .egg-info directories" " (default: top of the source tree)"), ('tag-svn-revision', 'r', - "Add subversion revision ID to version number"), + "Add subversion revision ID to version number"), ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"), ('tag-build=', 'b', "Specify explicit tag to add to version number"), ('no-svn-revision', 'R', - "Don't add subversion revision ID [default]"), + "Don't add subversion revision ID [default]"), ('no-date', 'D', "Don't include date stamp [default]"), ] @@ -52,6 +53,7 @@ def initialize_options(self): def save_version_info(self, filename): from setuptools.command.setopt import edit_config + values = dict( egg_info=dict( tag_svn_revision=0, @@ -68,23 +70,25 @@ def finalize_options(self): try: list( - parse_requirements('%s==%s' % (self.egg_name,self.egg_version)) + parse_requirements('%s==%s' % (self.egg_name, + self.egg_version)) ) except ValueError: raise distutils.errors.DistutilsOptionError( "Invalid distribution name or version syntax: %s-%s" % - (self.egg_name,self.egg_version) + (self.egg_name, self.egg_version) ) if self.egg_base is None: dirs = self.distribution.package_dir - self.egg_base = (dirs or {}).get('',os.curdir) + self.egg_base = (dirs or {}).get('', os.curdir) self.ensure_dirname('egg_base') - self.egg_info = to_filename(self.egg_name)+'.egg-info' + self.egg_info = to_filename(self.egg_name) + '.egg-info' if self.egg_base != os.curdir: self.egg_info = os.path.join(self.egg_base, self.egg_info) - if '-' in self.egg_name: self.check_broken_egg_info() + if '-' in self.egg_name: + self.check_broken_egg_info() # Set package version for the benefit of dumber commands # (e.g. sdist, bdist_wininst, etc.) @@ -96,7 +100,7 @@ def finalize_options(self): # to the version info # pd = self.distribution._patched_dist - if pd is not None and pd.key==self.egg_name.lower(): + if pd is not None and pd.key == self.egg_name.lower(): pd._version = self.egg_version pd._parsed_version = parse_version(self.egg_version) self.distribution._patched_dist = None @@ -154,7 +158,7 @@ def run(self): installer = self.distribution.fetch_build_egg for ep in iter_entry_points('egg_info.writers'): writer = ep.load(installer=installer) - writer(self, ep.name, os.path.join(self.egg_info,ep.name)) + writer(self, ep.name, os.path.join(self.egg_info, ep.name)) # Get rid of native_libs.txt if it was put there by older bdist_egg nl = os.path.join(self.egg_info, "native_libs.txt") @@ -166,12 +170,14 @@ def run(self): def tags(self): version = '' if self.tag_build: - version+=self.tag_build + version += self.tag_build if self.tag_svn_revision and ( os.path.exists('.svn') or os.path.exists('PKG-INFO') - ): version += '-r%s' % self.get_svn_revision() + ): + version += '-r%s' % self.get_svn_revision() if self.tag_date: import time + version += time.strftime("-%Y%m%d") return version @@ -181,32 +187,33 @@ def get_svn_revision(): def find_sources(self): """Generate SOURCES.txt manifest file""" - manifest_filename = os.path.join(self.egg_info,"SOURCES.txt") + manifest_filename = os.path.join(self.egg_info, "SOURCES.txt") mm = manifest_maker(self.distribution) mm.manifest = manifest_filename mm.run() self.filelist = mm.filelist def check_broken_egg_info(self): - bei = self.egg_name+'.egg-info' + bei = self.egg_name + '.egg-info' if self.egg_base != os.curdir: bei = os.path.join(self.egg_base, bei) if os.path.exists(bei): log.warn( - "-"*78+'\n' + "-" * 78 + '\n' "Note: Your current .egg-info directory has a '-' in its name;" '\nthis will not work correctly with "setup.py develop".\n\n' - 'Please rename %s to %s to correct this problem.\n'+'-'*78, + 'Please rename %s to %s to correct this problem.\n' + '-' * 78, bei, self.egg_info ) self.broken_egg_info = self.egg_info - self.egg_info = bei # make it work for now + self.egg_info = bei # make it work for now + class FileList(_FileList): """File list that accepts only existing, platform-independent paths""" def append(self, item): - if item.endswith('\r'): # Fix older sdists built on Windows + if item.endswith('\r'): # Fix older sdists built on Windows item = item[:-1] path = convert_path(item) @@ -229,29 +236,28 @@ def _repair(self): def _safe_path(self, path): enc_warn = "'%s' not %s encodable -- skipping" - #To avoid accidental trans-codings errors, first to unicode + # To avoid accidental trans-codings errors, first to unicode u_path = unicode_utils.filesys_decode(path) if u_path is None: log.warn("'%s' in unexpected encoding -- skipping" % path) return False - #Must ensure utf-8 encodability + # Must ensure utf-8 encodability utf8_path = unicode_utils.try_encode(u_path, "utf-8") if utf8_path is None: log.warn(enc_warn, path, 'utf-8') return False try: - #accept is either way checks out + # accept is either way checks out if os.path.exists(u_path) or os.path.exists(utf8_path): return True - #this will catch any encode errors decoding u_path + # this will catch any encode errors decoding u_path except UnicodeEncodeError: log.warn(enc_warn, path, sys.getfilesystemencoding()) class manifest_maker(sdist): - template = "MANIFEST.in" def initialize_options(self): @@ -266,7 +272,7 @@ def finalize_options(self): def run(self): self.filelist = FileList() if not os.path.exists(self.manifest): - self.write_manifest() # it must exist so it'll get in the list + self.write_manifest() # it must exist so it'll get in the list self.filelist.findall() self.add_defaults() if os.path.exists(self.template): @@ -287,12 +293,12 @@ def write_manifest(self): """ self.filelist._repair() - #Now _repairs should encodability, but not unicode + # Now _repairs should encodability, but not unicode files = [self._manifest_normalize(f) for f in self.filelist.files] msg = "writing manifest file '%s'" % self.manifest self.execute(write_file, (self.manifest, files), msg) - def warn(self, msg): # suppress missing-file warnings from sdist + def warn(self, msg): # suppress missing-file warnings from sdist if not msg.startswith("standard file not found:"): sdist.warn(self, msg) @@ -314,7 +320,8 @@ def prune_file_list(self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) sep = re.escape(os.sep) - self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1) + self.filelist.exclude_pattern(sep + r'(RCS|CVS|\.svn)' + sep, + is_regex=1) def write_file(filename, contents): @@ -323,10 +330,10 @@ def write_file(filename, contents): """ contents = "\n".join(contents) - #assuming the contents has been vetted for utf-8 encoding + # assuming the contents has been vetted for utf-8 encoding contents = contents.encode("utf-8") - with open(filename, "wb") as f: # always write POSIX-style manifest + with open(filename, "wb") as f: # always write POSIX-style manifest f.write(contents) @@ -343,10 +350,12 @@ def write_pkg_info(cmd, basename, filename): finally: metadata.name, metadata.version = oldname, oldver - safe = getattr(cmd.distribution,'zip_safe',None) + safe = getattr(cmd.distribution, 'zip_safe', None) from setuptools.command import bdist_egg + bdist_egg.write_safety_flag(cmd.egg_info, safe) + def warn_depends_obsolete(cmd, basename, filename): if os.path.exists(filename): log.warn( @@ -361,6 +370,7 @@ def _write_requirements(stream, reqs): lines = map(append_cr, lines) stream.writelines(lines) + def write_requirements(cmd, basename, filename): dist = cmd.distribution data = StringIO() @@ -371,48 +381,52 @@ def write_requirements(cmd, basename, filename): _write_requirements(data, extras_require[extra]) cmd.write_or_delete_file("requirements", filename, data.getvalue()) + def write_toplevel_names(cmd, basename, filename): pkgs = dict.fromkeys( [ - k.split('.',1)[0] + k.split('.', 1)[0] for k in cmd.distribution.iter_distribution_names() ] ) - cmd.write_file("top-level names", filename, '\n'.join(pkgs)+'\n') + cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n') def overwrite_arg(cmd, basename, filename): write_arg(cmd, basename, filename, True) + def write_arg(cmd, basename, filename, force=False): argname = os.path.splitext(basename)[0] value = getattr(cmd.distribution, argname, None) if value is not None: - value = '\n'.join(value)+'\n' + value = '\n'.join(value) + '\n' cmd.write_or_delete_file(argname, filename, value, force) + def write_entries(cmd, basename, filename): ep = cmd.distribution.entry_points - if isinstance(ep,basestring) or ep is None: + if isinstance(ep, basestring) or ep is None: data = ep elif ep is not None: data = [] for section, contents in sorted(ep.items()): - if not isinstance(contents,basestring): + if not isinstance(contents, basestring): contents = EntryPoint.parse_group(section, contents) - contents = '\n'.join(sorted(map(str,contents.values()))) - data.append('[%s]\n%s\n\n' % (section,contents)) + contents = '\n'.join(sorted(map(str, contents.values()))) + data.append('[%s]\n%s\n\n' % (section, contents)) data = ''.join(data) cmd.write_or_delete_file('entry points', filename, data, True) + 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 # if os.path.exists('PKG-INFO'): - f = open('PKG-INFO','rU') + f = open('PKG-INFO', 'rU') for line in f: match = re.match(r"Version:.*-r(\d+)\s*$", line) if match: diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 1f489734d4..d2bca2ec59 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,22 +1,24 @@ -import setuptools +from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig -from distutils.errors import DistutilsArgError + +import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for -# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +# now. See https://bitbucket.org/pypa/setuptools/issue/199/ _install = orig.install + class install(orig.install): """Use easy_install to install the package, w/dependencies""" user_options = orig.install.user_options + [ ('old-and-unmanageable', None, "Try not to use this!"), ('single-version-externally-managed', None, - "used by system package builders to create 'flat' eggs"), + "used by system package builders to create 'flat' eggs"), ] boolean_options = orig.install.boolean_options + [ 'old-and-unmanageable', 'single-version-externally-managed', @@ -115,7 +117,9 @@ def do_egg_install(self): cmd.run() setuptools.bootstrap_install_from = None + # XXX Python 3.1 doesn't see _nc if this is inside the class -install.sub_commands = [ - cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc - ] + install.new_commands +install.sub_commands = ( + [cmd for cmd in orig.install.sub_commands if cmd[0] not in install._nc] + + install.new_commands +) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 73b5ef7375..a71268abef 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,7 +1,10 @@ +from distutils import log, dir_util +import os + from setuptools import Command from setuptools.archive_util import unpack_archive -from distutils import log, dir_util -import os, pkg_resources +import pkg_resources + class install_egg_info(Command): """Install an .egg-info directory for the package""" @@ -16,11 +19,12 @@ def initialize_options(self): self.install_dir = None def finalize_options(self): - self.set_undefined_options('install_lib',('install_dir','install_dir')) + self.set_undefined_options('install_lib', + ('install_dir', 'install_dir')) ei_cmd = self.get_finalized_command("egg_info") basename = pkg_resources.Distribution( None, None, ei_cmd.egg_name, ei_cmd.egg_version - ).egg_name()+'.egg-info' + ).egg_name() + '.egg-info' self.source = ei_cmd.egg_info self.target = os.path.join(self.install_dir, basename) self.outputs = [self.target] @@ -31,11 +35,11 @@ def run(self): if os.path.isdir(self.target) and not os.path.islink(self.target): dir_util.remove_tree(self.target, dry_run=self.dry_run) elif os.path.exists(self.target): - self.execute(os.unlink,(self.target,),"Removing "+self.target) + self.execute(os.unlink, (self.target,), "Removing " + self.target) if not self.dry_run: pkg_resources.ensure_directory(self.target) - self.execute(self.copytree, (), - "Copying %s to %s" % (self.source, self.target) + self.execute( + self.copytree, (), "Copying %s to %s" % (self.source, self.target) ) self.install_namespaces() @@ -44,50 +48,29 @@ def get_outputs(self): def copytree(self): # Copy the .egg-info tree to site-packages - def skimmer(src,dst): + def skimmer(src, dst): # filter out source-control directories; note that 'src' is always # a '/'-separated path, regardless of platform. 'dst' is a # platform-specific path. - for skip in '.svn/','CVS/': - if src.startswith(skip) or '/'+skip in src: + for skip in '.svn/', 'CVS/': + if src.startswith(skip) or '/' + skip in src: return None self.outputs.append(dst) log.debug("Copying %s to %s", src, dst) return dst - unpack_archive(self.source, self.target, skimmer) - - - - - - - - - - - - - - - - - - - - - - - + unpack_archive(self.source, self.target, skimmer) def install_namespaces(self): nsp = self._get_all_ns_packages() - if not nsp: return - filename,ext = os.path.splitext(self.target) - filename += '-nspkg.pth'; self.outputs.append(filename) - log.info("Installing %s",filename) + if not nsp: + return + filename, ext = os.path.splitext(self.target) + filename += '-nspkg.pth' + self.outputs.append(filename) + log.info("Installing %s", filename) if not self.dry_run: - f = open(filename,'wt') + f = open(filename, 'wt') for pkg in nsp: # ensure pkg is not a unicode string under Python 2.7 pkg = str(pkg) @@ -101,10 +84,11 @@ def install_namespaces(self): f.write( "import sys,types,os; " "p = os.path.join(sys._getframe(1).f_locals['sitedir'], " - "*%(pth)r); " + "*%(pth)r); " "ie = os.path.exists(os.path.join(p,'__init__.py')); " "m = not ie and " - "sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); " + "sys.modules.setdefault(%(pkg)r,types.ModuleType" + "(%(pkg)r)); " "mp = (m or []) and m.__dict__.setdefault('__path__',[]); " "(p not in mp) and mp.append(p)%(trailer)s" % locals() @@ -118,8 +102,6 @@ def _get_all_ns_packages(self): while pkg: nsp['.'.join(pkg)] = 1 pkg.pop() - nsp=list(nsp) + nsp = list(nsp) nsp.sort() # set up shorter names first return nsp - - diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 747fbabbae..d7e117f08b 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,6 +1,7 @@ import distutils.command.install_lib as orig import os + class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" @@ -15,20 +16,20 @@ def get_exclusions(self): exclude = {} nsp = self.distribution.namespace_packages svem = (nsp and self.get_finalized_command('install') - .single_version_externally_managed) + .single_version_externally_managed) if svem: for pkg in nsp: parts = pkg.split('.') while parts: pkgdir = os.path.join(self.install_dir, *parts) for f in '__init__.py', '__init__.pyc', '__init__.pyo': - exclude[os.path.join(pkgdir,f)] = 1 + exclude[os.path.join(pkgdir, f)] = 1 parts.pop() return exclude def copy_tree( - self, infile, outfile, - preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1 + self, infile, outfile, + preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1 ): assert preserve_mode and preserve_times and not preserve_symlinks exclude = self.get_exclusions() @@ -45,7 +46,8 @@ def copy_tree( def pf(src, dst): if dst in exclude: - log.warn("Skipping installation of %s (namespace package)",dst) + log.warn("Skipping installation of %s (namespace package)", + dst) return False log.info("copying %s -> %s", src, os.path.dirname(dst)) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index ac373193f3..eb79fa3c73 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,7 +1,9 @@ +from distutils import log import distutils.command.install_scripts as orig -from pkg_resources import Distribution, PathMetadata, ensure_directory import os -from distutils import log + +from pkg_resources import Distribution, PathMetadata, ensure_directory + class install_scripts(orig.install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" @@ -29,7 +31,7 @@ def run(self): ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') - executable = getattr(bs_cmd,'executable',sys_executable) + executable = getattr(bs_cmd, 'executable', sys_executable) is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) @@ -39,6 +41,7 @@ def run(self): def write_script(self, script_name, contents, mode="t", *ignored): """Write an executable file to the scripts directory""" from setuptools.command.easy_install import chmod, current_umask + log.info("Installing %s script to %s", script_name, self.install_dir) target = os.path.join(self.install_dir, script_name) self.outfiles.append(target) @@ -46,7 +49,7 @@ def write_script(self, script_name, contents, mode="t", *ignored): mask = current_umask() if not self.dry_run: ensure_directory(target) - f = open(target,"w"+mode) + f = open(target, "w" + mode) f.write(contents) f.close() - chmod(target, 0o777-mask) + chmod(target, 0o777 - mask) diff --git a/setuptools/command/launcher manifest.xml b/setuptools/command/launcher manifest.xml index 844d2264cd..5972a96d8d 100644 --- a/setuptools/command/launcher manifest.xml +++ b/setuptools/command/launcher manifest.xml @@ -1,15 +1,15 @@ - + - - - - - + + + + + diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 6694d1c0a7..8d6336a14d 100755 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -1,5 +1,6 @@ import distutils.command.register as orig + class register(orig.register): __doc__ = orig.register.__doc__ diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index c556aa17c0..1b073620ea 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -1,18 +1,20 @@ -import os -from setuptools import Command -from setuptools.compat import basestring from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError +import os + +from setuptools import Command +from setuptools.compat import basestring + class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N newest files" user_options = [ - ('match=', 'm', "patterns to match (required)"), + ('match=', 'm', "patterns to match (required)"), ('dist-dir=', 'd', "directory where the distributions are"), - ('keep=', 'k', "number of matching distributions to keep"), + ('keep=', 'k', "number of matching distributions to keep"), ] boolean_options = [] @@ -38,21 +40,22 @@ def finalize_options(self): self.match = [ convert_path(p.strip()) for p in self.match.split(',') ] - self.set_undefined_options('bdist',('dist_dir', 'dist_dir')) + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) def run(self): self.run_command("egg_info") from glob import glob + for pattern in self.match: - pattern = self.distribution.get_name()+'*'+pattern - files = glob(os.path.join(self.dist_dir,pattern)) - files = [(os.path.getmtime(f),f) for f in files] + pattern = self.distribution.get_name() + '*' + pattern + files = glob(os.path.join(self.dist_dir, pattern)) + files = [(os.path.getmtime(f), f) for f in files] files.sort() files.reverse() log.info("%d file(s) matching %s", len(files), pattern) files = files[self.keep:] - for (t,f) in files: + for (t, f) in files: log.info("Deleting %s", f) if not self.dry_run: os.unlink(f) diff --git a/setuptools/command/saveopts.py b/setuptools/command/saveopts.py index 7209be4cd9..611cec5528 100755 --- a/setuptools/command/saveopts.py +++ b/setuptools/command/saveopts.py @@ -1,7 +1,6 @@ -import distutils, os -from setuptools import Command from setuptools.command.setopt import edit_config, option_base + class saveopts(option_base): """Save command-line options to a file""" @@ -13,12 +12,11 @@ def run(self): for cmd in dist.command_options: - if cmd=='saveopts': - continue # don't save our own options! + if cmd == 'saveopts': + continue # don't save our own options! - for opt,(src,val) in dist.get_option_dict(cmd).items(): - if src=="command line": - settings.setdefault(cmd,{})[opt] = val + for opt, (src, val) in dist.get_option_dict(cmd).items(): + if src == "command line": + settings.setdefault(cmd, {})[opt] = val edit_config(self.filename, settings, self.dry_run) - diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index f9a5b7b919..2aa1ee20fd 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,14 +1,14 @@ +from glob import glob +from distutils.util import convert_path +from distutils import log +import distutils.command.sdist as orig import os import re import sys -from glob import glob -import pkg_resources -import distutils.command.sdist as orig -from distutils.util import convert_path -from distutils import log from setuptools import svn_utils from setuptools.compat import PY3 +import pkg_resources READMES = ('README', 'README.rst', 'README.txt') @@ -20,7 +20,7 @@ def walk_revctrl(dirname=''): yield item -#TODO will need test case +# TODO will need test case class re_finder(object): """ Finder that locates files based on entries in a file matched by a @@ -33,7 +33,7 @@ def __init__(self, path, pattern, postproc=lambda x: x): self.entries_path = convert_path(path) def _finder(self, dirname, filename): - f = open(filename,'rU') + f = open(filename, 'rU') try: data = f.read() finally: @@ -51,12 +51,13 @@ def find(self, dirname=''): if not os.path.isfile(path): # entries file doesn't exist return - for path in self._finder(dirname,path): + for path in self._finder(dirname, path): if os.path.isfile(path): yield path elif os.path.isdir(path): for item in self.find(path): yield item + __call__ = find @@ -85,7 +86,7 @@ class sdist(orig.sdist): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), - ] + ] negative_opt = {} @@ -93,7 +94,7 @@ def run(self): self.run_command('egg_info') ei_cmd = self.get_finalized_command('egg_info') self.filelist = ei_cmd.filelist - self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt')) + self.filelist.append(os.path.join(ei_cmd.egg_info, 'SOURCES.txt')) self.check_readme() # Run sub commands @@ -103,12 +104,13 @@ def run(self): # Call check_metadata only if no 'check' command # (distutils <= 2.6) import distutils.command + if 'check' not in distutils.command.__all__: self.check_metadata() self.make_distribution() - dist_files = getattr(self.distribution,'dist_files',[]) + dist_files = getattr(self.distribution, 'dist_files', []) for file in self.archive_files: data = ('sdist', '', file) if data not in dist_files: @@ -124,13 +126,14 @@ def __read_template_hack(self): except: sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() raise + # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle # has been fixed, so only override the method if we're using an earlier # Python. has_leaky_handle = ( - sys.version_info < (2,7,2) - or (3,0) <= sys.version_info < (3,1,4) - or (3,2) <= sys.version_info < (3,2,1) + sys.version_info < (2, 7, 2) + or (3, 0) <= sys.version_info < (3, 1, 4) + or (3, 2) <= sys.version_info < (3, 2, 1) ) if has_leaky_handle: read_template = __read_template_hack @@ -194,7 +197,8 @@ def check_readme(self): return else: self.warn( - "standard file not found: should have one of " +', '.join(READMES) + "standard file not found: should have one of " + + ', '.join(READMES) ) def make_release_tree(self, base_dir, files): @@ -202,7 +206,7 @@ def make_release_tree(self, base_dir, files): # Save any egg_info command line options used to create this sdist dest = os.path.join(base_dir, 'setup.cfg') - if hasattr(os,'link') and os.path.exists(dest): + if hasattr(os, 'link') and os.path.exists(dest): # unlink and re-copy, since it might be hard-linked, and # we don't want to change the source version os.unlink(dest) @@ -220,7 +224,8 @@ def _manifest_is_not_generated(self): first_line = fp.readline() finally: fp.close() - return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode() + return (first_line != + '# file GENERATED by distutils, do NOT edit\n'.encode()) def read_manifest(self): """Read the manifest file (named by 'self.manifest') and use it to diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 575653c8c7..a04d6032ad 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -1,9 +1,11 @@ -import os -import distutils -from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError +import distutils +import os + +from setuptools import Command + __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] @@ -13,19 +15,20 @@ def config_file(kind="local"): `kind` must be one of "local", "global", or "user" """ - if kind=='local': + if kind == 'local': return 'setup.cfg' - if kind=='global': + if kind == 'global': return os.path.join( - os.path.dirname(distutils.__file__),'distutils.cfg' + os.path.dirname(distutils.__file__), 'distutils.cfg' ) - if kind=='user': - dot = os.name=='posix' and '.' or '' + if kind == 'user': + dot = os.name == 'posix' and '.' or '' return os.path.expanduser(convert_path("~/%spydistutils.cfg" % dot)) raise ValueError( "config_file() type must be 'local', 'global', or 'user'", kind ) + def edit_config(filename, settings, dry_run=False): """Edit a configuration file to include `settings` @@ -35,6 +38,7 @@ def edit_config(filename, settings, dry_run=False): A setting of ``None`` means to delete that setting. """ from setuptools.compat import ConfigParser + log.debug("Reading configuration from %s", filename) opts = ConfigParser.RawConfigParser() opts.read([filename]) @@ -46,39 +50,40 @@ def edit_config(filename, settings, dry_run=False): if not opts.has_section(section): log.debug("Adding new section [%s] to %s", section, filename) opts.add_section(section) - for option,value in options.items(): + for option, value in options.items(): if value is None: log.debug( "Deleting %s.%s from %s", section, option, filename ) - opts.remove_option(section,option) + opts.remove_option(section, option) if not opts.options(section): log.info("Deleting empty [%s] section from %s", - section, filename) + section, filename) opts.remove_section(section) else: log.debug( "Setting %s.%s to %r in %s", section, option, value, filename ) - opts.set(section,option,value) + opts.set(section, option, value) log.info("Writing %s", filename) if not dry_run: with open(filename, 'w') as f: opts.write(f) + class option_base(Command): """Abstract base class for commands that mess with config files""" user_options = [ ('global-config', 'g', - "save options to the site-wide distutils.cfg file"), + "save options to the site-wide distutils.cfg file"), ('user-config', 'u', - "save options to the current user's pydistutils.cfg file"), + "save options to the current user's pydistutils.cfg file"), ('filename=', 'f', - "configuration file to use (default=setup.cfg)"), + "configuration file to use (default=setup.cfg)"), ] boolean_options = [ @@ -100,7 +105,7 @@ def finalize_options(self): filenames.append(self.filename) if not filenames: filenames.append(config_file('local')) - if len(filenames)>1: + if len(filenames) > 1: raise DistutilsOptionError( "Must specify only one configuration file option", filenames @@ -115,9 +120,9 @@ class setopt(option_base): user_options = [ ('command=', 'c', 'command to set an option for'), - ('option=', 'o', 'option to set'), - ('set-value=', 's', 'value of the option'), - ('remove', 'r', 'remove (unset) the value'), + ('option=', 'o', 'option to set'), + ('set-value=', 's', 'value of the option'), + ('remove', 'r', 'remove (unset) the value'), ] + option_base.user_options boolean_options = option_base.boolean_options + ['remove'] @@ -139,7 +144,7 @@ def finalize_options(self): def run(self): edit_config( self.filename, { - self.command: {self.option.replace('-','_'):self.set_value} + self.command: {self.option.replace('-', '_'): self.set_value} }, self.dry_run ) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 3c3581a9a7..18e90ffc0d 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,19 +1,17 @@ -import unittest -from unittest import TestLoader - -from setuptools import Command from distutils.errors import DistutilsOptionError +from unittest import TestLoader +import unittest import sys -from pkg_resources import (resource_listdir, resource_exists, - normalize_path, working_set, _namespace_packages, add_activation_listener, - require, EntryPoint) +from pkg_resources import (resource_listdir, resource_exists, normalize_path, + working_set, _namespace_packages, + add_activation_listener, require, EntryPoint) +from setuptools import Command from setuptools.compat import PY3 from setuptools.py31compat import unittest_main class ScanningLoader(TestLoader): - def loadTestsFromModule(self, module): """Return a suite of all tests cases contained in the given module @@ -34,7 +32,7 @@ def loadTestsFromModule(self, module): submodule = module.__name__ + '.' + file[:-3] else: if resource_exists(module.__name__, file + '/__init__.py'): - submodule = module.__name__+'.'+file + submodule = module.__name__ + '.' + file else: continue tests.append(self.loadTestsFromName(submodule)) @@ -42,19 +40,18 @@ def loadTestsFromModule(self, module): if len(tests) != 1: return self.suiteClass(tests) else: - return tests[0] # don't create a nested suite for only one return + return tests[0] # don't create a nested suite for only one return class test(Command): - """Command to run unit tests after in-place build""" description = "run unit tests after in-place build" user_options = [ - ('test-module=','m', "Run 'test_suite' in specified module"), - ('test-suite=','s', - "Test suite to run (e.g. 'some_module.test_suite')"), + ('test-module=', 'm', "Run 'test_suite' in specified module"), + ('test-suite=', 's', + "Test suite to run (e.g. 'some_module.test_suite')"), ('test-runner=', 'r', "Test runner to use"), ] @@ -79,7 +76,7 @@ def finalize_options(self): self.test_args = [self.test_suite] if self.verbose: - self.test_args.insert(0,'--verbose') + self.test_args.insert(0, '--verbose') if self.test_loader is None: self.test_loader = getattr(self.distribution, 'test_loader', None) if self.test_loader is None: @@ -132,7 +129,8 @@ def with_project_on_sys_path(self, func): def run(self): if self.distribution.install_requires: - self.distribution.fetch_build_eggs(self.distribution.install_requires) + self.distribution.fetch_build_eggs( + self.distribution.install_requires) if self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) @@ -161,7 +159,7 @@ def run_tests(self): list(map(sys.modules.__delitem__, del_modules)) unittest_main( - None, None, [unittest.__file__]+self.test_args, + None, None, [unittest.__file__] + self.test_args, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), ) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index cad7a52d1b..cd6c300c9f 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -5,6 +5,10 @@ PyPI's pythonhosted.org). """ +from base64 import standard_b64encode +from distutils import log +from distutils.errors import DistutilsOptionError +from distutils.command.upload import upload import os import socket import zipfile @@ -12,14 +16,9 @@ import sys import shutil -from base64 import standard_b64encode +from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 from pkg_resources import iter_entry_points -from distutils import log -from distutils.errors import DistutilsOptionError -from distutils.command.upload import upload - -from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 errors = 'surrogateescape' if PY3 else 'strict' @@ -33,7 +32,6 @@ def b(s, encoding='utf-8'): class upload_docs(upload): - description = 'Upload documentation to PyPI' user_options = [ @@ -42,7 +40,7 @@ class upload_docs(upload): ('show-response', None, 'display full response text from server'), ('upload-dir=', None, 'directory to upload'), - ] + ] boolean_options = upload.boolean_options def has_sphinx(self): @@ -159,7 +157,7 @@ def upload_file(self, filename): elif schema == 'https': conn = httplib.HTTPSConnection(netloc) else: - raise AssertionError("unsupported schema "+schema) + raise AssertionError("unsupported schema " + schema) data = '' try: @@ -190,4 +188,4 @@ def upload_file(self, filename): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print('-'*75, r.read(), '-'*75) + print('-' * 75, r.read(), '-' * 75) From d47b6a2fadf767fe5caa430dd660f1f774affe4f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 18 Jun 2014 23:07:46 -0400 Subject: [PATCH 4204/8469] Issue #21722: The distutils "upload" command now exits with a non-zero return code when uploading fails. Patch by Martin Dengler. --- command/upload.py | 15 ++++++++------- tests/test_upload.py | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/command/upload.py b/command/upload.py index d6762e46fd..180be7c750 100644 --- a/command/upload.py +++ b/command/upload.py @@ -2,10 +2,6 @@ Implements the Distutils 'upload' subcommand (upload package to PyPI).""" -from distutils.errors import * -from distutils.core import PyPIRCCommand -from distutils.spawn import spawn -from distutils import log import sys import os, io import socket @@ -13,6 +9,10 @@ from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError from urllib.parse import urlparse +from distutils.errors import DistutilsError, DistutilsOptionError +from distutils.core import PyPIRCCommand +from distutils.spawn import spawn +from distutils import log # this keeps compatibility for 2.3 and 2.4 if sys.version < "2.5": @@ -184,7 +184,7 @@ def upload_file(self, command, pyversion, filename): reason = result.msg except OSError as e: self.announce(str(e), log.ERROR) - return + raise except HTTPError as e: status = e.code reason = e.msg @@ -193,8 +193,9 @@ def upload_file(self, command, pyversion, filename): self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: - self.announce('Upload failed (%s): %s' % (status, reason), - log.ERROR) + msg = 'Upload failed (%s): %s' % (status, reason) + self.announce(msg, log.ERROR) + raise DistutilsError(msg) if self.show_response: text = self._read_pypi_response(result) msg = '\n'.join(('-' * 75, text, '-' * 75)) diff --git a/tests/test_upload.py b/tests/test_upload.py index f53eb266ed..0380f97944 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -6,6 +6,7 @@ from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution +from distutils.errors import DistutilsError from distutils.log import INFO from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase @@ -41,13 +42,14 @@ class FakeOpen(object): - def __init__(self, url): + def __init__(self, url, msg=None, code=None): self.url = url if not isinstance(url, str): self.req = url else: self.req = None - self.msg = 'OK' + self.msg = msg or 'OK' + self.code = code or 200 def getheader(self, name, default=None): return { @@ -58,7 +60,7 @@ def read(self): return b'xyzzy' def getcode(self): - return 200 + return self.code class uploadTestCase(PyPIRCCommandTestCase): @@ -68,13 +70,15 @@ def setUp(self): self.old_open = upload_mod.urlopen upload_mod.urlopen = self._urlopen self.last_open = None + self.next_msg = None + self.next_code = None def tearDown(self): upload_mod.urlopen = self.old_open super(uploadTestCase, self).tearDown() def _urlopen(self, url): - self.last_open = FakeOpen(url) + self.last_open = FakeOpen(url, msg=self.next_msg, code=self.next_code) return self.last_open def test_finalize_options(self): @@ -135,6 +139,10 @@ def test_upload(self): results = self.get_logs(INFO) self.assertIn('xyzzy\n', results[-1]) + def test_upload_fails(self): + self.next_msg = "Not Found" + self.next_code = 404 + self.assertRaises(DistutilsError, self.test_upload) def test_suite(): return unittest.makeSuite(uploadTestCase) From 92683cba709e8ee497e2b8f4413d44ddcee5cc2f Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Sun, 22 Jun 2014 21:48:22 +1000 Subject: [PATCH 4205/8469] Fix pep8 issues for install_egg_info --- setuptools/command/install_egg_info.py | 65 +++++++++----------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 73b5ef7375..411fce6bd4 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,7 +1,10 @@ +import os + +import pkg_resources from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util -import os, pkg_resources + class install_egg_info(Command): """Install an .egg-info directory for the package""" @@ -16,7 +19,8 @@ def initialize_options(self): self.install_dir = None def finalize_options(self): - self.set_undefined_options('install_lib',('install_dir','install_dir')) + self.set_undefined_options('install_lib', + ('install_dir', 'install_dir')) ei_cmd = self.get_finalized_command("egg_info") basename = pkg_resources.Distribution( None, None, ei_cmd.egg_name, ei_cmd.egg_version @@ -27,14 +31,14 @@ def finalize_options(self): def run(self): self.run_command('egg_info') - target = self.target if os.path.isdir(self.target) and not os.path.islink(self.target): dir_util.remove_tree(self.target, dry_run=self.dry_run) elif os.path.exists(self.target): - self.execute(os.unlink,(self.target,),"Removing "+self.target) + self.execute(os.unlink, (self.target, ), "Removing " + self.target) if not self.dry_run: pkg_resources.ensure_directory(self.target) - self.execute(self.copytree, (), + self.execute( + self.copytree, (), "Copying %s to %s" % (self.source, self.target) ) self.install_namespaces() @@ -44,50 +48,28 @@ def get_outputs(self): def copytree(self): # Copy the .egg-info tree to site-packages - def skimmer(src,dst): + def skimmer(src, dst): # filter out source-control directories; note that 'src' is always # a '/'-separated path, regardless of platform. 'dst' is a # platform-specific path. - for skip in '.svn/','CVS/': - if src.startswith(skip) or '/'+skip in src: + for skip in '.svn/', 'CVS/': + if src.startswith(skip) or '/' + skip in src: return None self.outputs.append(dst) log.debug("Copying %s to %s", src, dst) return dst unpack_archive(self.source, self.target, skimmer) - - - - - - - - - - - - - - - - - - - - - - - - def install_namespaces(self): nsp = self._get_all_ns_packages() - if not nsp: return - filename,ext = os.path.splitext(self.target) - filename += '-nspkg.pth'; self.outputs.append(filename) - log.info("Installing %s",filename) + if not nsp: + return + filename, ext = os.path.splitext(self.target) + filename += '-nspkg.pth' + self.outputs.append(filename) + log.info("Installing %s", filename) if not self.dry_run: - f = open(filename,'wt') + f = open(filename, 'wt') for pkg in nsp: # ensure pkg is not a unicode string under Python 2.7 pkg = str(pkg) @@ -101,10 +83,11 @@ def install_namespaces(self): f.write( "import sys,types,os; " "p = os.path.join(sys._getframe(1).f_locals['sitedir'], " - "*%(pth)r); " + "*%(pth)r); " "ie = os.path.exists(os.path.join(p,'__init__.py')); " "m = not ie and " - "sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); " + "sys.modules.setdefault(%(pkg)r, " + "types.ModuleType(%(pkg)r)); " "mp = (m or []) and m.__dict__.setdefault('__path__',[]); " "(p not in mp) and mp.append(p)%(trailer)s" % locals() @@ -118,8 +101,6 @@ def _get_all_ns_packages(self): while pkg: nsp['.'.join(pkg)] = 1 pkg.pop() - nsp=list(nsp) + nsp = list(nsp) nsp.sort() # set up shorter names first return nsp - - From 9ec3bbc7bcef27123270535c1a3ab7cc9adda95d Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Sun, 22 Jun 2014 22:01:17 +1000 Subject: [PATCH 4206/8469] Clean up _get_all_ns_packages --- setuptools/command/install_egg_info.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 411fce6bd4..578aa3d423 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -95,12 +95,11 @@ def install_namespaces(self): f.close() def _get_all_ns_packages(self): - nsp = {} + """Return sorted list of all package namespaces""" + nsp = set() for pkg in self.distribution.namespace_packages or []: pkg = pkg.split('.') while pkg: - nsp['.'.join(pkg)] = 1 + nsp.add('.'.join(pkg)) pkg.pop() - nsp = list(nsp) - nsp.sort() # set up shorter names first - return nsp + return sorted(nsp) From ceb5894c2b5212b1bad48416c6ff2ca7315019b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:26:48 -0400 Subject: [PATCH 4207/8469] Move devguide notes to documentation. --- DEVGUIDE.txt | 23 +---------------------- docs/developer-guide.txt | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt index f96d811556..066a3a6bfb 100644 --- a/DEVGUIDE.txt +++ b/DEVGUIDE.txt @@ -1,22 +1 @@ -============================ -Quick notes for contributors -============================ - -Setuptools is developed using the DVCS Mercurial. - -Grab the code at bitbucket:: - - $ hg clone https://bitbucket.org/pypa/setuptools - -If you want to contribute changes, we recommend you fork the repository on -bitbucket, commit the changes to your repository, and then make a pull request -on bitbucket. If you make some changes, don't forget to: - -- add a note in CHANGES.txt - -Please commit bug-fixes against the current maintenance branch and new -features to the default branch. - -You can run the tests via:: - - $ python setup.py test +The canonical development guide can be found in docs/developer-guide.txt. diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index fbee5e672f..4577da5863 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -12,7 +12,24 @@ If you want to know more about contributing on Setuptools, this is the place. Repository and Tracker ---------------------- -... +Setuptools is developed using the DVCS Mercurial. + +Grab the code at bitbucket:: + + $ hg clone https://bitbucket.org/pypa/setuptools + +If you want to contribute changes, we recommend you fork the repository on +bitbucket, commit the changes to your repository, and then make a pull request +on bitbucket. If you make some changes, don't forget to: + +- add a note in CHANGES.txt + +Please commit bug-fixes against the current maintenance branch and new +features to the default branch. + +You can run the tests via:: + + $ python setup.py test .. git mirror From 04dc170c8bd8791b4bc3e83fb0f223ca19264f54 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:27:02 -0400 Subject: [PATCH 4208/8469] Expand on stylistic changes --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 4577da5863..805a61f3f6 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -44,7 +44,7 @@ Submitting Pull Requests ------------------------ Use Mercurial bookmarks or Git branches. Use incremental commits. Minimize -stylistic changes. +stylistic changes or at least submit them as separate commits. ------------------- Semantic Versioning From f2d7c5373d575a958c8651e6b228d75ba8f4344f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:30:53 -0400 Subject: [PATCH 4209/8469] Added Recommended Reading --- docs/developer-guide.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 805a61f3f6..c2770e3fc9 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -8,6 +8,17 @@ If you want to know more about contributing on Setuptools, this is the place. .. contents:: **Table of Contents** +------------------- +Recommended Reading +------------------- + +Please read `How to write the perfect pull request +`_ +for some tips on contributing to open source projects. Although the article +is not authoritative, it was authored by the maintainer of Setuptools, so +reflects his opinions and will improve the likelihood of acceptance and +quality of contribution. + ---------------------- Repository and Tracker ---------------------- From 7f997bf31de1ae8d2afaae2048593d55c6765449 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:44:14 -0400 Subject: [PATCH 4210/8469] Expanded on Project Management --- docs/developer-guide.txt | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index c2770e3fc9..af64c153a6 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -19,19 +19,34 @@ is not authoritative, it was authored by the maintainer of Setuptools, so reflects his opinions and will improve the likelihood of acceptance and quality of contribution. ----------------------- -Repository and Tracker ----------------------- +------------------ +Project Management +------------------ -Setuptools is developed using the DVCS Mercurial. +Setuptools is maintained primarily in Bitbucket at `this home +`_. Setuptools is maintained under the +Python Packaging Authority (PyPA) with several core contributors. All bugs +for Setuptools are filed and the canonical source is maintained in Bitbucket. -Grab the code at bitbucket:: +User support and discussions are done through the issue tracker (for specific) +issues, through the distutils-sig mailing list, or on IRC (Freenode) at +#pypa. + +Discussions about development happen on the pypa-dev mailing list or on IRC +(Freenode) at #pypa-dev. + + +----------- +Source Code +----------- + +Grab the code at Bitbucket:: $ hg clone https://bitbucket.org/pypa/setuptools If you want to contribute changes, we recommend you fork the repository on -bitbucket, commit the changes to your repository, and then make a pull request -on bitbucket. If you make some changes, don't forget to: +Bitbucket, commit the changes to your repository, and then make a pull request +on Bitbucket. If you make some changes, don't forget to: - add a note in CHANGES.txt From 0b43972c3854cc62442d6b95e82dd01f8b9417a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:48:02 -0400 Subject: [PATCH 4211/8469] Added note about Github mirror --- docs/developer-guide.txt | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index af64c153a6..5839aca168 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -50,28 +50,35 @@ on Bitbucket. If you make some changes, don't forget to: - add a note in CHANGES.txt -Please commit bug-fixes against the current maintenance branch and new -features to the default branch. +Please commit all changes in the 'default' branch against the latest available +commit or for bug-fixes, against an earlier commit or release in which the +bug occurred. + +If you find yourself working on more than one issue at a time, Setuptools +generally prefers Git-style branches, so use Mercurial bookmarks or Git +branches or multiple forks to maintain separate efforts. + +Setuptools also maintains an unofficial `Git mirror in Github +`_. Contributors are welcome to submit +pull requests here, but because they are not integrated with the Bitbucket +Issue tracker, linking pull requests to tickets is more difficult. The +Continuous Integration tests that validate every release are run from this +mirror. + +------- +Testing +------- You can run the tests via:: $ python setup.py test -.. git mirror - ----------------- Authoring Tickets ----------------- ... ------------------------- -Submitting Pull Requests ------------------------- - -Use Mercurial bookmarks or Git branches. Use incremental commits. Minimize -stylistic changes or at least submit them as separate commits. - ------------------- Semantic Versioning ------------------- From 26afd74cb35062a9f692bb06cb23ad485f085a1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:51:11 -0400 Subject: [PATCH 4212/8469] Updated recommeded testing procedure. --- docs/developer-guide.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 5839aca168..c6f78d9ab4 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -69,9 +69,14 @@ mirror. Testing ------- -You can run the tests via:: +The primary tests are run using py.test. To run the tests:: - $ python setup.py test + $ python setup.py ptr + +Or install py.test into your environment and run ``py.test``. + +Under continuous integration, additional tests may be run. See the +``.travis.yml`` file for full details on the tests run under Travis-CI. ----------------- Authoring Tickets From 34808da486958a27dbfa2761a466938d0142ba66 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:57:43 -0400 Subject: [PATCH 4213/8469] Expanded on authoring tickets. --- docs/developer-guide.txt | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index c6f78d9ab4..651e6be808 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -35,6 +35,27 @@ issues, through the distutils-sig mailing list, or on IRC (Freenode) at Discussions about development happen on the pypa-dev mailing list or on IRC (Freenode) at #pypa-dev. +----------------- +Authoring Tickets +----------------- + +Before authoring any source code, it's often prudent to file a ticket +describing the motivation behind making changes. First search to see if a +ticket already exists for your issue. If not, create one. Try to think from +the perspective of the reader. Explain what behavior you expected, what you +got instead, and what factors might have contributed to the unexpected +behavior. In Bitbucket, surround a block of code or traceback with the triple +backtick "```" so that it is formatted nicely. + +Filing a ticket provides a forum for justification, discussion, and +clarification. The ticket provides a record of the purpose for the change and +any hard decisions that were made. It provides a single place for others to +reference when trying to understand why the software operates the way it does +or why certain changes were made. + +Setuptools makes extensive use of hyperlinks to tickets in the changelog so +that system integrators and other users can get a quick summary, but then +jump to the in-depth discussion about any subject referenced. ----------- Source Code @@ -78,12 +99,6 @@ Or install py.test into your environment and run ``py.test``. Under continuous integration, additional tests may be run. See the ``.travis.yml`` file for full details on the tests run under Travis-CI. ------------------ -Authoring Tickets ------------------ - -... - ------------------- Semantic Versioning ------------------- From 0689e065e08d705488dad3d89c1afb0d8273a8ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:58:18 -0400 Subject: [PATCH 4214/8469] Expose developer guide in the documentation. --- docs/development.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development.txt b/docs/development.txt index e35ba39b69..6fe30f6eb1 100644 --- a/docs/development.txt +++ b/docs/development.txt @@ -30,7 +30,7 @@ setuptools changes. You have been warned. .. toctree:: :maxdepth: 1 - .. developer-guide + developer-guide formats releases From 9fe312e0d9825869e5eee2262e9f31588ded7711 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 08:59:47 -0400 Subject: [PATCH 4215/8469] Update changelog to reflect incidental change in 5.0. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5ebe6f1c90..381d1dcd0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,8 @@ CHANGES --- * Issue #218: Re-release of 3.8.1 to signal that it supersedes 4.x. +* Incidentally, script templates were updated not to include the triple-quote + escaping. ------------------------- 3.7.1 and 3.8.1 and 4.0.1 From f3608428df8308afb55a382ddd0b678e6afa6026 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 09:03:15 -0400 Subject: [PATCH 4216/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 381d1dcd0b..9344ccbbff 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +--- +5.2 +--- + +* Added a `Developer Guide + `_ to the official + documentation. + --- 5.1 --- From e7a30ebf78b0d9aaea9cfeadd36df2ba9774c25c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 09:25:16 -0400 Subject: [PATCH 4217/8469] Remove trailing newline --- setuptools/command/install_egg_info.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 183d8188d4..06be25f3b1 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -103,4 +103,3 @@ def _get_all_ns_packages(self): nsp.add('.'.join(pkg)) pkg.pop() return sorted(nsp) - From ab7d8ee3234b039d9dd3d6c896932b6985380327 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 09:37:30 -0400 Subject: [PATCH 4218/8469] Extract the lines of the namespace package pth file template for readability. --- setuptools/command/install_egg_info.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 06be25f3b1..3a8d5ec0f1 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -60,6 +60,16 @@ def skimmer(src, dst): unpack_archive(self.source, self.target, skimmer) + _nspkg_tmpl = [ + "import sys, types, os", + "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", + "ie = os.path.exists(os.path.join(p,'__init__.py'))", + "m = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "mp = (m or []) and m.__dict__.setdefault('__path__',[])", + "(p not in mp) and mp.append(p)%(trailer)s", + ] + "lines for the namespace installer" + def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: @@ -80,18 +90,8 @@ def install_namespaces(self): "; m and setattr(sys.modules[%r], %r, m)\n" % ('.'.join(pth[:-1]), pth[-1]) ) - f.write( - "import sys,types,os; " - "p = os.path.join(sys._getframe(1).f_locals['sitedir'], " - "*%(pth)r); " - "ie = os.path.exists(os.path.join(p,'__init__.py')); " - "m = not ie and " - "sys.modules.setdefault(%(pkg)r, " - "types.ModuleType(%(pkg)r)); " - "mp = (m or []) and m.__dict__.setdefault('__path__',[]); " - "(p not in mp) and mp.append(p)%(trailer)s" - % locals() - ) + dat = ';'.join(self._nspkg_tmpl) % locals() + f.write(dat) f.close() def _get_all_ns_packages(self): From 17d0ff6e1f9d2efb134cac3fc734c0cf5fa55f68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:09:44 -0400 Subject: [PATCH 4219/8469] Extract the additional trailing lines when a parent package is indicated. --- setuptools/command/install_egg_info.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 3a8d5ec0f1..67ba745363 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -60,16 +60,21 @@ def skimmer(src, dst): unpack_archive(self.source, self.target, skimmer) - _nspkg_tmpl = [ + _nspkg_tmpl = ( "import sys, types, os", "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", "m = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", - "(p not in mp) and mp.append(p)%(trailer)s", - ] + "(p not in mp) and mp.append(p)", + ) "lines for the namespace installer" + _nspkg_tmpl_multi = ( + 'm and setattr(sys.modules[%(parent)r], %(child)r, m)', + ) + "additional line(s) when a parent package is indicated" + def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: @@ -84,13 +89,11 @@ def install_namespaces(self): # ensure pkg is not a unicode string under Python 2.7 pkg = str(pkg) pth = tuple(pkg.split('.')) - trailer = '\n' - if '.' in pkg: - trailer = ( - "; m and setattr(sys.modules[%r], %r, m)\n" - % ('.'.join(pth[:-1]), pth[-1]) - ) - dat = ';'.join(self._nspkg_tmpl) % locals() + tmpl_lines = self._nspkg_tmpl + parent, sep, child = pkg.rpartition('.') + if parent: + tmpl_lines += self._nspkg_tmpl_multi + dat = ';'.join(tmpl_lines) % locals() + '\n' f.write(dat) f.close() From 24978070e68c58dfd787b93d6f1e0a35f6871c52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:10:54 -0400 Subject: [PATCH 4220/8469] Use short-circuit for less nesting --- setuptools/command/install_egg_info.py | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 67ba745363..6aba68bed7 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -83,19 +83,21 @@ def install_namespaces(self): filename += '-nspkg.pth' self.outputs.append(filename) log.info("Installing %s", filename) - if not self.dry_run: - f = open(filename, 'wt') - for pkg in nsp: - # ensure pkg is not a unicode string under Python 2.7 - pkg = str(pkg) - pth = tuple(pkg.split('.')) - tmpl_lines = self._nspkg_tmpl - parent, sep, child = pkg.rpartition('.') - if parent: - tmpl_lines += self._nspkg_tmpl_multi - dat = ';'.join(tmpl_lines) % locals() + '\n' - f.write(dat) - f.close() + if self.dry_run: + return + + f = open(filename, 'wt') + for pkg in nsp: + # ensure pkg is not a unicode string under Python 2.7 + pkg = str(pkg) + pth = tuple(pkg.split('.')) + tmpl_lines = self._nspkg_tmpl + parent, sep, child = pkg.rpartition('.') + if parent: + tmpl_lines += self._nspkg_tmpl_multi + dat = ';'.join(tmpl_lines) % locals() + '\n' + f.write(dat) + f.close() def _get_all_ns_packages(self): """Return sorted list of all package namespaces""" From 9f48d842e5c7c916f472420c7bc9f62b333a40ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:13:38 -0400 Subject: [PATCH 4221/8469] Use context manager for opening and closing the file --- setuptools/command/install_egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 6aba68bed7..87cfc4907c 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -86,7 +86,6 @@ def install_namespaces(self): if self.dry_run: return - f = open(filename, 'wt') for pkg in nsp: # ensure pkg is not a unicode string under Python 2.7 pkg = str(pkg) @@ -96,8 +95,9 @@ def install_namespaces(self): if parent: tmpl_lines += self._nspkg_tmpl_multi dat = ';'.join(tmpl_lines) % locals() + '\n' + + with open(filename, 'wt') as f: f.write(dat) - f.close() def _get_all_ns_packages(self): """Return sorted list of all package namespaces""" From 63b852dff23dc86e983fceddde1463724a9d8a07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:15:21 -0400 Subject: [PATCH 4222/8469] Reindent long line --- setuptools/command/install_egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 87cfc4907c..67e183e184 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -64,7 +64,8 @@ def skimmer(src, dst): "import sys, types, os", "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", - "m = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "m = not ie and " + "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", ) From d8192350d95f3daf8831b58c80ded4d0d3393d7c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:26:00 -0400 Subject: [PATCH 4223/8469] Extract method for generating lines for a pkg in nsp. Fixes issue in 67bdf3a726962 where only the last dat would be written. --- setuptools/command/install_egg_info.py | 49 ++++++++++++++------------ 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 67e183e184..35a00e54ed 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -60,6 +60,22 @@ def skimmer(src, dst): unpack_archive(self.source, self.target, skimmer) + def install_namespaces(self): + nsp = self._get_all_ns_packages() + if not nsp: + return + filename, ext = os.path.splitext(self.target) + filename += '-nspkg.pth' + self.outputs.append(filename) + log.info("Installing %s", filename) + if self.dry_run: + return + + lines = map(self._gen_nspkg_line, nsp) + + with open(filename, 'wt') as f: + list(map(f.write, lines)) + _nspkg_tmpl = ( "import sys, types, os", "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", @@ -76,29 +92,16 @@ def skimmer(src, dst): ) "additional line(s) when a parent package is indicated" - def install_namespaces(self): - nsp = self._get_all_ns_packages() - if not nsp: - return - filename, ext = os.path.splitext(self.target) - filename += '-nspkg.pth' - self.outputs.append(filename) - log.info("Installing %s", filename) - if self.dry_run: - return - - for pkg in nsp: - # ensure pkg is not a unicode string under Python 2.7 - pkg = str(pkg) - pth = tuple(pkg.split('.')) - tmpl_lines = self._nspkg_tmpl - parent, sep, child = pkg.rpartition('.') - if parent: - tmpl_lines += self._nspkg_tmpl_multi - dat = ';'.join(tmpl_lines) % locals() + '\n' - - with open(filename, 'wt') as f: - f.write(dat) + @classmethod + def _gen_nspkg_line(cls, pkg): + # ensure pkg is not a unicode string under Python 2.7 + pkg = str(pkg) + pth = tuple(pkg.split('.')) + tmpl_lines = cls._nspkg_tmpl + parent, sep, child = pkg.rpartition('.') + if parent: + tmpl_lines += cls._nspkg_tmpl_multi + return ';'.join(tmpl_lines) % locals() + '\n' def _get_all_ns_packages(self): """Return sorted list of all package namespaces""" From 96631f20ae4d9db6f077bf16d5d58db5239fa69d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:30:41 -0400 Subject: [PATCH 4224/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9344ccbbff..27c425a9bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ CHANGES * Added a `Developer Guide `_ to the official documentation. +* Some code refactoring and cleanup was done with no intended behavioral + changes. --- 5.1 From c3f158dcc26b86008c7427674aec5ed100540280 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:34:27 -0400 Subject: [PATCH 4225/8469] Prefer the writelines method. --- setuptools/command/install_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 35a00e54ed..3e41389839 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -74,7 +74,7 @@ def install_namespaces(self): lines = map(self._gen_nspkg_line, nsp) with open(filename, 'wt') as f: - list(map(f.write, lines)) + f.writelines(lines) _nspkg_tmpl = ( "import sys, types, os", From 9d45f02e92ea875a88a964a629c0274d597f8d46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:37:24 -0400 Subject: [PATCH 4226/8469] Always generate the lines, even in dry run. --HG-- extra : amend_source : fa41c3fb787b667f703f67a52aed7a2958e615b4 --- CHANGES.txt | 2 ++ setuptools/command/install_egg_info.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 27c425a9bf..829a37056c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES documentation. * Some code refactoring and cleanup was done with no intended behavioral changes. +* During install_egg_info, the generated lines for namespace package .pth + files are now processed even during a dry run. --- 5.1 diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 3e41389839..fd0f118b33 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -68,11 +68,13 @@ def install_namespaces(self): filename += '-nspkg.pth' self.outputs.append(filename) log.info("Installing %s", filename) + lines = map(self._gen_nspkg_line, nsp) + if self.dry_run: + # always generate the lines, even in dry run + list(lines) return - lines = map(self._gen_nspkg_line, nsp) - with open(filename, 'wt') as f: f.writelines(lines) From 01021fd5c712db072961c7a0e5b1d86c74a91da2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:51:40 -0400 Subject: [PATCH 4227/8469] Mention Ivoz as release manager --- docs/releases.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/releases.txt b/docs/releases.txt index 5d1419be7c..387a4af8e8 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -15,4 +15,7 @@ project and administrative access to the BitBucket project. Release Managers ---------------- -Currently, the project has one release manager, Jason R. Coombs. +Jason R. Coombs is the primary release manager. Additionally, the following +people have access to create releases: + +- Matthew Iversen (Ivoz) From 0c75cf4a2e2a5796fc5a62a5263ed9ca44683545 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Jun 2014 10:52:51 -0400 Subject: [PATCH 4228/8469] Write the actual command. --HG-- extra : amend_source : a25cd725094883d738e9c37cd71e3ac3a946d9fe --- docs/releases.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/releases.txt b/docs/releases.txt index 387a4af8e8..41a814bc96 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -12,6 +12,11 @@ the release process. A Setuptools release manager must have maintainer access on PyPI to the project and administrative access to the BitBucket project. +To make a release, run the following from a Mercurial checkout at the +revision slated for release:: + + python -m jaraco.packaging.release + Release Managers ---------------- From 3b41be38bd2f498556615e8c20e8b0b485a44817 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jun 2014 14:42:27 -0400 Subject: [PATCH 4229/8469] Added tag 5.2 for changeset f493e6c4ffd8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e5a7d6b505..33e3b6364f 100644 --- a/.hgtags +++ b/.hgtags @@ -144,3 +144,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 871bd7b4326f48860ebe0baccdaea8fe4f8f8583 5.0.1 95996b713722376679c3168b15ab12ea8360dd5f 5.0.2 3a948b6d01e3449b478fcdc532c44eb3cea5ee10 5.1 +f493e6c4ffd88951871110858c141385305e0077 5.2 From ea05dfd88bf0c0d778cba2cd43dc4f8becbb310b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jun 2014 14:42:58 -0400 Subject: [PATCH 4230/8469] Bumped to 5.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0206019984..2dc324f3d6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.2" +DEFAULT_VERSION = "5.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index f01f2739ab..adcb4271b4 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.2' +__version__ = '5.3' From fbf309d3e3b529f6ff0d57ecbb22514755b1154d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jun 2014 17:00:01 -0400 Subject: [PATCH 4231/8469] Remove unused imports, unused variables, and excess whitespace --- setuptools/tests/test_develop.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 18f35c0f45..66d182eb46 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -9,8 +9,6 @@ from distutils.errors import DistutilsError from setuptools.command.develop import develop -from setuptools.command import easy_install as easy_install_pkg -from setuptools.compat import StringIO from setuptools.dist import Distribution SETUP_PY = """\ @@ -114,11 +112,11 @@ def notest_develop_with_setup_requires(self): os.chdir(self.dir) try: try: - dist = Distribution({'setup_requires': ['I_DONT_EXIST']}) + Distribution({'setup_requires': ['I_DONT_EXIST']}) except DistutilsError: e = sys.exc_info()[1] error = str(e) - if error == wanted: + if error == wanted: pass finally: os.chdir(old_dir) From 5d58d955b5f5dcafe6ec624b82b327ce1fe9bbfd Mon Sep 17 00:00:00 2001 From: david Date: Wed, 25 Jun 2014 10:47:59 -0400 Subject: [PATCH 4232/8469] fix failing integration (test_stevedore) test on windows because of an unreleased handle on the current directory --- setuptools/tests/test_integration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 7144aa6c9a..8d6c1e55db 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -25,6 +25,9 @@ def install_context(request, tmpdir, monkeypatch): install_dir = tmpdir.mkdir('install_dir') def fin(): + # undo the monkeypatch, particularly needed under + # windows because of kept handle on cwd + monkeypatch.undo() new_cwd.remove() user_base.remove() user_site.remove() From a8edd4b874fd83cf8d53b0c410c97477a3816c38 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Wed, 25 Jun 2014 13:36:14 -0700 Subject: [PATCH 4233/8469] Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite. --- tests/test_build_ext.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 9853abd4c5..e9958667a4 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -444,8 +444,16 @@ def _try_compile_deployment_target(self, operator, target): # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - target = tuple(map(int, target.split('.'))) - target = '%02d%01d0' % target + target = tuple(map(int, target.split('.')[0:2])) + # format the target value as defined in the Apple + # Availability Macros. We can't use the macro names since + # at least one value we test with will not exist yet. + if target[1] < 10: + # for 10.1 through 10.9.x -> "10n0" + target = '%02d%01d0' % target + else: + # for 10.10 and beyond -> "10nn00" + target = '%02d%02d00' % target deptarget_ext = Extension( 'deptarget', [deptarget_c], From acc44268e90aa32306dd747dc1304c15589c7a24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jun 2014 21:42:11 -0400 Subject: [PATCH 4234/8469] Added tag 5.3 for changeset 1f9505cfd752 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 33e3b6364f..bc743fd472 100644 --- a/.hgtags +++ b/.hgtags @@ -145,3 +145,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 95996b713722376679c3168b15ab12ea8360dd5f 5.0.2 3a948b6d01e3449b478fcdc532c44eb3cea5ee10 5.1 f493e6c4ffd88951871110858c141385305e0077 5.2 +1f9505cfd7524ce0c83ab31d139f47b39c56ccbe 5.3 From 4acb16a206bb4467663a2e0dcd024cbdc6a5c649 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jun 2014 21:42:40 -0400 Subject: [PATCH 4235/8469] Bumped to 5.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2dc324f3d6..42785c3169 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.3" +DEFAULT_VERSION = "5.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index adcb4271b4..e67e0a2f78 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.3' +__version__ = '5.4' From e221bdf38ccf35d0d2b1148b4072108fcd47ec0a Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sun, 29 Jun 2014 14:58:41 +0200 Subject: [PATCH 4236/8469] Fix typos --- setuptools/tests/win_script_wrapper.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 731243dd36..b3a52e0abd 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -3,7 +3,7 @@ Python Script Wrapper for Windows setuptools includes wrappers for Python scripts that allows them to be executed like regular windows programs. There are 2 wrappers, once -for command-line programs, cli.exe, and one for graphica programs, +for command-line programs, cli.exe, and one for graphical programs, gui.exe. These programs are almost identical, function pretty much the same way, and are generated from the same source file. The wrapper programs are used by copying them to the directory containing @@ -44,7 +44,7 @@ We'll also copy cli.exe to the sample-directory with the name foo.exe: When the copy of cli.exe, foo.exe in this example, runs, it examines the path name it was run with and computes a Python script path name -by removing the '.exe' suffic and adding the '-script.py' suffix. (For +by removing the '.exe' suffix and adding the '-script.py' suffix. (For GUI programs, the suffix '-script-pyw' is added.) This is why we named out script the way we did. Now we can run out script by running the wrapper: @@ -68,8 +68,8 @@ This example was a little pathological in that it exercised windows - Double quotes in strings need to be escaped by preceding them with back slashes. -- One or more backslashes preceding double quotes quotes need to be - escaped by preceding each of them them with back slashes. +- One or more backslashes preceding double quotes need to be escaped + by preceding each of them with back slashes. Specifying Python Command-line Options From 721f392408ac0de7dd8e77afe8ed6c1f020b6416 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sun, 29 Jun 2014 15:23:29 +0200 Subject: [PATCH 4237/8469] Fixed capitalization of "Bitbucket" Bitbucket is normally spelled with exactly one capital "b". --- docs/merge-faq.txt | 2 +- docs/releases.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt index 520130985e..ea45f30cfa 100644 --- a/docs/merge-faq.txt +++ b/docs/merge-faq.txt @@ -58,7 +58,7 @@ Who is invited to contribute? Who is excluded? While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. -We have lots of ideas for how we'd like to improve the codebase, release process, everything. Like distribute, the post-merge setuptools will have its source hosted on bitbucket. (So if you're currently a distribute contributor, about the only thing that's going to change is the URL of the repository you follow.) Also like distribute, it'll support Python 3, and hopefully we'll soon merge Vinay Sajip's patches to make it run on Python 3 without needing 2to3 to be run on the code first. +We have lots of ideas for how we'd like to improve the codebase, release process, everything. Like distribute, the post-merge setuptools will have its source hosted on Bitbucket. (So if you're currently a distribute contributor, about the only thing that's going to change is the URL of the repository you follow.) Also like distribute, it'll support Python 3, and hopefully we'll soon merge Vinay Sajip's patches to make it run on Python 3 without needing 2to3 to be run on the code first. While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. diff --git a/docs/releases.txt b/docs/releases.txt index 41a814bc96..66c0896f2d 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -10,7 +10,7 @@ module. The script does some checks (some interactive) and fully automates the release process. A Setuptools release manager must have maintainer access on PyPI to the -project and administrative access to the BitBucket project. +project and administrative access to the Bitbucket project. To make a release, run the following from a Mercurial checkout at the revision slated for release:: From d1e6671ef6f2cc89df210122a4e5e67fa6e2c321 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sun, 29 Jun 2014 15:24:33 +0200 Subject: [PATCH 4238/8469] Spell check documentation --- docs/easy_install.txt | 8 ++++---- docs/formats.txt | 4 ++-- docs/pkg_resources.txt | 6 +++--- docs/python3.txt | 2 +- docs/setuptools.txt | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 6739ba16ad..8dd176fdfb 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -39,7 +39,7 @@ You will need at least Python 2.6. An ``easy_install`` script will be installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are -are installling to Python's primary ``site-packages`` directory. If this is +are installing to Python's primary ``site-packages`` directory. If this is not the case, you should consult the section below on `Custom Installation Locations`_ before installing. (And, on Windows, you should not use the ``.exe`` installer when installing to an alternate location.) @@ -915,7 +915,7 @@ Command-Line Options domain. The glob patterns must match the *entire* user/host/port section of the target URL(s). For example, ``*.python.org`` will NOT accept a URL like ``http://python.org/foo`` or ``http://www.python.org:8080/``. - Multiple patterns can be specified by separting them with commas. The + Multiple patterns can be specified by separating them with commas. The default pattern is ``*``, which matches anything. In general, this option is mainly useful for blocking EasyInstall's web @@ -1014,7 +1014,7 @@ application, simply set the OS environment of that application to a specific val Use "virtualenv" ~~~~~~~~~~~~~~~~ "virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby -creating an isolated location to intall packages. The evolution of "virtualenv" started before the existence +creating an isolated location to install packages. The evolution of "virtualenv" started before the existence of the User installation scheme. "virtualenv" provides a version of ``easy_install`` that is scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages. @@ -1171,7 +1171,7 @@ History * Fixed not HTML-decoding URLs scraped from web pages 0.6c5 - * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg + * Fixed ``.dll`` files on Cygwin not having executable permissions when an egg is installed unzipped. 0.6c4 diff --git a/docs/formats.txt b/docs/formats.txt index 36954bef75..5c461ecb61 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -349,7 +349,7 @@ of the project's "traditional" scripts (i.e., those specified using the ``scripts`` keyword to ``setup()``). This is so that they can be reconstituted when an ``.egg`` file is installed. -The scripts are placed here using the disutils' standard +The scripts are placed here using the distutils' standard ``install_scripts`` command, so any ``#!`` lines reflect the Python installation where the egg was built. But instead of copying the scripts to the local script installation directory, EasyInstall writes @@ -595,7 +595,7 @@ order to one another that is defined by their ``PYTHONPATH`` and The net result of these changes is that ``sys.path`` order will be as follows at runtime: -1. The ``sys.argv[0]`` directory, or an emtpy string if no script +1. The ``sys.argv[0]`` directory, or an empty string if no script is being executed. 2. All eggs installed by EasyInstall in any ``.pth`` file in each diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 18b68db731..f4a768e41d 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -62,7 +62,7 @@ importable distribution pluggable distribution An importable distribution whose filename unambiguously identifies its - release (i.e. project and version), and whose contents unamabiguously + release (i.e. project and version), and whose contents unambiguously specify what releases of other projects will satisfy its runtime requirements. @@ -1434,7 +1434,7 @@ shown here. The `manager` argument to the methods below must be an object that supports the full `ResourceManager API`_ documented above. ``get_resource_filename(manager, resource_name)`` - Return a true filesystem path for `resource_name`, co-ordinating the + Return a true filesystem path for `resource_name`, coordinating the extraction with `manager`, if the resource must be unpacked to the filesystem. @@ -1586,7 +1586,7 @@ Parsing Utilities character is ``#`` are considered comment lines.) If `strs` is not an instance of ``basestring``, it is iterated over, and - each item is passed recursively to ``yield_lines()``, so that an arbitarily + each item is passed recursively to ``yield_lines()``, so that an arbitrarily nested sequence of strings, or sequences of sequences of strings can be flattened out to the lines contained therein. So for example, passing a file object or a list of strings to ``yield_lines`` will both work. diff --git a/docs/python3.txt b/docs/python3.txt index 1e019951c4..df173000f2 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -69,7 +69,7 @@ before you run the test command, as the files otherwise will seem updated, and no conversion will happen. In general, if code doesn't seem to be converted, deleting the build directory -and trying again is a good saferguard against the build directory getting +and trying again is a good safeguard against the build directory getting "out of sync" with the source directory. Distributing Python 3 modules diff --git a/docs/setuptools.txt b/docs/setuptools.txt index a793af53e5..86e23ff944 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -520,7 +520,7 @@ as the following:: } ) -Any eggs built from the above setup script will include a short excecutable +Any eggs built from the above setup script will include a short executable prelude that imports and calls ``main_func()`` from ``my_package.some_module``. The prelude can be run on Unix-like platforms (including Mac and Linux) by invoking the egg with ``/bin/sh``, or by enabling execute permissions on the @@ -2180,7 +2180,7 @@ for future builds (even those run implicitly by the ``install`` command):: setup.py build --compiler=mingw32 saveopts -The ``saveopts`` command saves all options for every commmand specified on the +The ``saveopts`` command saves all options for every command specified on the command line to the project's local ``setup.cfg`` file, unless you use one of the `configuration file options`_ to change where the options are saved. For example, this command does the same as above, but saves the compiler setting @@ -2350,7 +2350,7 @@ Note, by the way, that the metadata in your ``setup()`` call determines what will be listed in PyPI for your package. Try to fill out as much of it as possible, as it will save you a lot of trouble manually adding and updating your PyPI listings. Just put it in ``setup.py`` and use the ``register`` -comamnd to keep PyPI up to date. +command to keep PyPI up to date. The ``upload`` command has a few options worth noting: From 04ee0d93a95c9b5f8c856856040d477647d1244d Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 30 Jun 2014 13:30:09 +0200 Subject: [PATCH 4239/8469] Use __import__() to avoid leaking imported names to the executed script. --- setuptools/script (dev).tmpl | 7 ++----- setuptools/script.tmpl | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/setuptools/script (dev).tmpl b/setuptools/script (dev).tmpl index c476673f94..6b1bef5bb7 100644 --- a/setuptools/script (dev).tmpl +++ b/setuptools/script (dev).tmpl @@ -1,11 +1,8 @@ # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r __requires__ = %(spec)r -import sys -from pkg_resources import require -require(%(spec)r) -del require +__import__('pkg_resources').require(%(spec)r) __file__ = %(dev_path)r -if sys.version_info < (3, 0): +if __import__('sys').version_info < (3, 0): execfile(__file__) else: exec(compile(open(__file__).read(), __file__, 'exec')) diff --git a/setuptools/script.tmpl b/setuptools/script.tmpl index 4504e26453..ff5efbcab3 100644 --- a/setuptools/script.tmpl +++ b/setuptools/script.tmpl @@ -1,4 +1,3 @@ # EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r __requires__ = %(spec)r -import pkg_resources -pkg_resources.run_script(%(spec)r, %(script_name)r) +__import__('pkg_resources').run_script(%(spec)r, %(script_name)r) From d559b45bb0f9e3472ac62574c858f4ab29707a8e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jul 2014 08:04:52 -0400 Subject: [PATCH 4240/8469] Resave with excess whitespace removed --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a1818edcb3..72493d0b97 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -320,7 +320,7 @@ def prune_file_list(self): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) sep = re.escape(os.sep) - self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, + self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, is_regex=1) From e64901cd8e4b49102390886ee264889a226c1945 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jul 2014 08:36:19 -0400 Subject: [PATCH 4241/8469] Normalize style per PEP-8 --- dist.py | 69 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/dist.py b/dist.py index 7eb04bc3f5..ffb33ff645 100644 --- a/dist.py +++ b/dist.py @@ -4,7 +4,9 @@ being built/installed/distributed. """ -import sys, os, re +import sys +import os +import re from email import message_from_file try: @@ -22,7 +24,7 @@ # the same as a Python NAME -- I don't allow leading underscores. The fact # that they're very similar is no coincidence; the default naming scheme is # to look for a Python module named after the command. -command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$') +command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$') class Distribution: @@ -39,7 +41,6 @@ class Distribution: See the code for 'setup()', in core.py, for details. """ - # 'global_options' describes the command-line options that may be # supplied to the setup script prior to any actual commands. # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of @@ -48,12 +49,13 @@ class Distribution: # don't want to pollute the commands with too many options that they # have minimal control over. # The fourth entry for verbose means that it can be repeated. - global_options = [('verbose', 'v', "run verbosely (default)", 1), - ('quiet', 'q', "run quietly (turns verbosity off)"), - ('dry-run', 'n', "don't actually do anything"), - ('help', 'h', "show detailed help message"), - ('no-user-cfg', None, - 'ignore pydistutils.cfg in your home directory'), + global_options = [ + ('verbose', 'v', "run verbosely (default)", 1), + ('quiet', 'q', "run quietly (turns verbosity off)"), + ('dry-run', 'n', "don't actually do anything"), + ('help', 'h', "show detailed help message"), + ('no-user-cfg', None, + 'ignore pydistutils.cfg in your home directory'), ] # 'common_usage' is a short (2-3 line) string describing the common @@ -115,10 +117,9 @@ class Distribution: # negative options are options that exclude other options negative_opt = {'quiet': 'verbose'} - # -- Creation/initialization methods ------------------------------- - def __init__ (self, attrs=None): + def __init__(self, attrs=None): """Construct a new Distribution instance: initialize all the attributes of a Distribution, and then use 'attrs' (a dictionary mapping attribute names to values) to assign some of those @@ -532,15 +533,15 @@ def _parse_command_opts(self, parser, args): # to be sure that the basic "command" interface is implemented. if not issubclass(cmd_class, Command): raise DistutilsClassError( - "command class %s must subclass Command" % cmd_class) + "command class %s must subclass Command" % cmd_class) # Also make sure that the command object provides a list of its # known options. if not (hasattr(cmd_class, 'user_options') and isinstance(cmd_class.user_options, list)): - raise DistutilsClassError(("command class %s must provide " + - "'user_options' attribute (a list of tuples)") % \ - cmd_class) + msg = ("command class %s must provide " + "'user_options' attribute (a list of tuples)") + raise DistutilsClassError(msg % cmd_class) # If the command class has a list of negative alias options, # merge it in with the global negative aliases. @@ -552,12 +553,11 @@ def _parse_command_opts(self, parser, args): # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and - isinstance(cmd_class.help_options, list)): + isinstance(cmd_class.help_options, list)): help_options = fix_help_options(cmd_class.help_options) else: help_options = [] - # All commands support the global options too, just by adding # in 'global_options'. parser.set_option_table(self.global_options + @@ -570,7 +570,7 @@ def _parse_command_opts(self, parser, args): return if (hasattr(cmd_class, 'help_options') and - isinstance(cmd_class.help_options, list)): + isinstance(cmd_class.help_options, list)): help_option_found=0 for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): @@ -647,7 +647,7 @@ def _show_help(self, parser, global_options=1, display_options=1, else: klass = self.get_command_class(command) if (hasattr(klass, 'help_options') and - isinstance(klass.help_options, list)): + isinstance(klass.help_options, list)): parser.set_option_table(klass.user_options + fix_help_options(klass.help_options)) else: @@ -814,7 +814,7 @@ def get_command_class(self, command): klass_name = command try: - __import__ (module_name) + __import__(module_name) module = sys.modules[module_name] except ImportError: continue @@ -823,8 +823,8 @@ def get_command_class(self, command): klass = getattr(module, klass_name) except AttributeError: raise DistutilsModuleError( - "invalid command '%s' (no class '%s' in module '%s')" - % (command, klass_name, module_name)) + "invalid command '%s' (no class '%s' in module '%s')" + % (command, klass_name, module_name)) self.cmdclass[command] = klass return klass @@ -840,7 +840,7 @@ def get_command_obj(self, command, create=1): cmd_obj = self.command_obj.get(command) if not cmd_obj and create: if DEBUG: - self.announce("Distribution.get_command_obj(): " \ + self.announce("Distribution.get_command_obj(): " "creating '%s' command object" % command) klass = self.get_command_class(command) @@ -897,8 +897,8 @@ def _set_command_options(self, command_obj, option_dict=None): setattr(command_obj, option, value) else: raise DistutilsOptionError( - "error in %s: command '%s' has no such option '%s'" - % (source, command_name, option)) + "error in %s: command '%s' has no such option '%s'" + % (source, command_name, option)) except ValueError as msg: raise DistutilsOptionError(msg) @@ -974,7 +974,6 @@ def run_command(self, command): cmd_obj.run() self.have_run[command] = 1 - # -- Distribution query methods ------------------------------------ def has_pure_modules(self): @@ -1112,17 +1111,17 @@ def write_pkg_file(self, file): """ version = '1.0' if (self.provides or self.requires or self.obsoletes or - self.classifiers or self.download_url): + self.classifiers or self.download_url): version = '1.1' file.write('Metadata-Version: %s\n' % version) - file.write('Name: %s\n' % self.get_name() ) - file.write('Version: %s\n' % self.get_version() ) - file.write('Summary: %s\n' % self.get_description() ) - file.write('Home-page: %s\n' % self.get_url() ) - file.write('Author: %s\n' % self.get_contact() ) - file.write('Author-email: %s\n' % self.get_contact_email() ) - file.write('License: %s\n' % self.get_license() ) + file.write('Name: %s\n' % self.get_name()) + file.write('Version: %s\n' % self.get_version()) + file.write('Summary: %s\n' % self.get_description()) + file.write('Home-page: %s\n' % self.get_url()) + file.write('Author: %s\n' % self.get_contact()) + file.write('Author-email: %s\n' % self.get_contact_email()) + file.write('License: %s\n' % self.get_license()) if self.download_url: file.write('Download-URL: %s\n' % self.download_url) @@ -1131,7 +1130,7 @@ def write_pkg_file(self, file): keywords = ','.join(self.get_keywords()) if keywords: - file.write('Keywords: %s\n' % keywords ) + file.write('Keywords: %s\n' % keywords) self._write_list(file, 'Platform', self.get_platforms()) self._write_list(file, 'Classifier', self.get_classifiers()) From bf0cecd76dd0501cbb98c77583c11a622dcfe73f Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 3 Jul 2014 17:03:39 +0300 Subject: [PATCH 4242/8469] ssl_support: Adjust to tunneling changes in Python 2.7.7 and 3.4.1. The fix for https://bugs.python.org/issue7776 changed httplib.HTTPConnection's handling of tunneling: `host' now points to the proxy host, so we have to adjust the code to perform the certificate validation on `_tunnel_host' instead when it is available. --- setuptools/ssl_support.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 7b5f429f8f..cc7db067e9 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -178,12 +178,19 @@ def connect(self): if hasattr(self, '_tunnel') and getattr(self, '_tunnel_host', None): self.sock = sock self._tunnel() + # http://bugs.python.org/issue7776: Python>=3.4.1 and >=2.7.7 + # change self.host to mean the proxy server host when tunneling is + # being used. Adapt, since we are interested in the destination + # host for the match_hostname() comparison. + actual_host = self._tunnel_host + else: + actual_host = self.host self.sock = ssl.wrap_socket( sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle ) try: - match_hostname(self.sock.getpeercert(), self.host) + match_hostname(self.sock.getpeercert(), actual_host) except CertificateError: self.sock.shutdown(socket.SHUT_RDWR) self.sock.close() From 8ef8b53e1dc4563c63ddd2ae009bea42fe97f522 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 11:24:39 -0400 Subject: [PATCH 4243/8469] Create zip_manifests as a class attribute rather than a global --HG-- extra : amend_source : 7754d23956c4157235dca41e90f05c29691078ee --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 2151082bdf..b2631be7d3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1568,7 +1568,6 @@ def build(cls, path): for name in zfile.namelist() ) return dict(items) -zip_manifests = ZipManifests() class ContextualZipFile(zipfile.ZipFile): @@ -1595,6 +1594,7 @@ class ZipProvider(EggProvider): """Resource support for zips and eggs""" eagers = None + _zip_manifests = ZipManifests() def __init__(self, module): EggProvider.__init__(self, module) @@ -1620,7 +1620,7 @@ def _parts(self, zip_path): @property def zipinfo(self): - return zip_manifests.load(self.loader.archive) + return self._zip_manifests.load(self.loader.archive) def get_resource_filename(self, manager, resource_name): if not self.egg_name: From e66c4d9c3aefaf98a7d8d9b19ce5948fe7840c49 Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Sat, 5 Jul 2014 17:43:39 +0200 Subject: [PATCH 4244/8469] Fix exclude list on python 3.2+ imp.get_tag() is only available on 3.2+. Since 2 Date: Sat, 5 Jul 2014 11:57:04 -0400 Subject: [PATCH 4245/8469] Split MemoizedZipManifests from ZipManifests. Ref #154. --- pkg_resources.py | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index b2631be7d3..f4c7f5e9d9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1533,22 +1533,8 @@ def __init__(self): class ZipManifests(dict): """ - Memoized zipfile manifests. + zip manifest builder """ - manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime') - - def load(self, path): - """ - Load a manifest at path or return a suitable manifest already loaded. - """ - path = os.path.normpath(path) - mtime = os.stat(path).st_mtime - - if path not in self or self[path].mtime != mtime: - manifest = self.build(path) - self[path] = self.manifest_mod(manifest, mtime) - - return self[path].manifest @classmethod def build(cls, path): @@ -1569,6 +1555,28 @@ def build(cls, path): ) return dict(items) + load = build + + +class MemoizedZipManifests(ZipManifests): + """ + Memoized zipfile manifests. + """ + manifest_mod = collections.namedtuple('manifest_mod', 'manifest mtime') + + def load(self, path): + """ + Load a manifest at path or return a suitable manifest already loaded. + """ + path = os.path.normpath(path) + mtime = os.stat(path).st_mtime + + if path not in self or self[path].mtime != mtime: + manifest = self.build(path) + self[path] = self.manifest_mod(manifest, mtime) + + return self[path].manifest + class ContextualZipFile(zipfile.ZipFile): """ From bd7e1edff511c8410acfb640d005502d66910b41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:02:01 -0400 Subject: [PATCH 4246/8469] Make memoized zip manifests opt-in using the PKG_RESOURCES_CACHE_ZIP_MANIFESTS environment variable. Ref #154. --- CHANGES.txt | 8 ++++++-- pkg_resources.py | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 003e2d5d7c..ef456a7e10 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,8 +6,12 @@ CHANGES 5.4 --- -* Issue #154: Cache the reading of the zip file index for cases where the - same zip-file is used for multiple packages (like PEX). +* Issue #154: ``pkg_resources`` will now cache the zip manifests rather than + re-processing the same file from disk multiple times, but only if the + environment variable ``PKG_RESOURCES_CACHE_ZIP_MANIFESTS`` is set. Clients + that package many modules in the same zip file will see some improvement + in startup time by enabling this feature. This feature is not enabled by + default because it causes a substantial increase in memory usage. --- 5.3 diff --git a/pkg_resources.py b/pkg_resources.py index f4c7f5e9d9..3782384a8d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1602,7 +1602,11 @@ class ZipProvider(EggProvider): """Resource support for zips and eggs""" eagers = None - _zip_manifests = ZipManifests() + _zip_manifests = ( + MemoizedZipManifests() + if os.environ.get('PKG_RESOURCES_CACHE_ZIP_MANIFESTS') else + ZipManifests() + ) def __init__(self, module): EggProvider.__init__(self, module) From 879119ec99fdadf958f25e4b17755ebe2d3f8907 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:14:25 -0400 Subject: [PATCH 4247/8469] Use Python 3 syntax in 'script (dev).tmpl', as Python 2.6+ supports this syntax --- setuptools/script (dev).tmpl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/script (dev).tmpl b/setuptools/script (dev).tmpl index 6b1bef5bb7..d58b1bb5bf 100644 --- a/setuptools/script (dev).tmpl +++ b/setuptools/script (dev).tmpl @@ -2,7 +2,4 @@ __requires__ = %(spec)r __import__('pkg_resources').require(%(spec)r) __file__ = %(dev_path)r -if __import__('sys').version_info < (3, 0): - execfile(__file__) -else: - exec(compile(open(__file__).read(), __file__, 'exec')) +exec(compile(open(__file__).read(), __file__, 'exec')) From 773ebd845131ac32914e05cc33c0e78bfbc87ce3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:17:16 -0400 Subject: [PATCH 4248/8469] Added tag 5.4 for changeset baae103e80c3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bc743fd472..9204dc6ad1 100644 --- a/.hgtags +++ b/.hgtags @@ -146,3 +146,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 3a948b6d01e3449b478fcdc532c44eb3cea5ee10 5.1 f493e6c4ffd88951871110858c141385305e0077 5.2 1f9505cfd7524ce0c83ab31d139f47b39c56ccbe 5.3 +baae103e80c307008b156e426a07eb9f486eb4f0 5.4 From 088a7a48bbf7a871dba5cea0b863242bc86d3889 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:17:45 -0400 Subject: [PATCH 4249/8469] Bumped to 5.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 42785c3169..b017944deb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.4" +DEFAULT_VERSION = "5.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index e67e0a2f78..773d9307b1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.4' +__version__ = '5.5' From 243d54273d0308693f0181443fbc95197ffd4019 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:35:54 -0400 Subject: [PATCH 4250/8469] Move imports into header --HG-- extra : amend_source : 371b48777dba5d8a4d62b5899944471752f830bd extra : histedit_source : 0739a1da7f11a5f6e348a34b203a9328d0bc0f22 --- pkg_resources.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 3782384a8d..470143ddad 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -30,6 +30,9 @@ import operator import platform import collections +import plistlib +import email.parser +import tempfile from pkgutil import get_importer try: @@ -234,11 +237,9 @@ def get_provider(moduleOrReq): def _macosx_vers(_cache=[]): if not _cache: - import platform version = platform.mac_ver()[0] # fallback for MacPorts if version == '': - import plistlib plist = '/System/Library/CoreServices/SystemVersion.plist' if os.path.exists(plist): if hasattr(plistlib, 'readPlist'): @@ -2576,9 +2577,8 @@ def _parsed_pkg_info(self): try: return self._pkg_info except AttributeError: - from email.parser import Parser metadata = self.get_metadata(self.PKG_INFO) - self._pkg_info = Parser().parsestr(metadata) + self._pkg_info = email.parser.Parser().parsestr(metadata) return self._pkg_info @property @@ -2646,8 +2646,7 @@ def issue_warning(*args,**kw): level += 1 except ValueError: pass - from warnings import warn - warn(stacklevel = level+1, *args, **kw) + warnings.warn(stacklevel = level+1, *args, **kw) def parse_requirements(strs): @@ -2840,12 +2839,11 @@ def split_sections(s): yield section, content def _mkstemp(*args,**kw): - from tempfile import mkstemp old_open = os.open try: # temporarily bypass sandboxing os.open = os_open - return mkstemp(*args,**kw) + return tempfile.mkstemp(*args,**kw) finally: # and then put it back os.open = old_open From 843ffb56d0c9ec652ee9a2a180a6742caf8f68fb Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Sat, 5 Jul 2014 18:41:12 +0200 Subject: [PATCH 4251/8469] Commit the fix we did when testing python3 I shall `hg status` before submitting PRs. I shall `hg status` before submitting PRs. I shall `hg status` before submitting PRs. --- setuptools/command/install_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index cf5375f683..7692e0f328 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -18,7 +18,7 @@ def get_exclusions(self): .single_version_externally_managed) exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo'] if hasattr(imp, 'get_tag') : - exclude_names.extend( + exclude_names.extend(( os.path.join( '__pycache__', '__init__.' + imp.get_tag() + '.pyc' @@ -27,7 +27,7 @@ def get_exclusions(self): '__pycache__', '__init__.' + imp.get_tag() + '.pyo' ), - ) + )) if svem: for pkg in nsp: parts = pkg.split('.') From 3c936c87351d12ed57a09cf42454aadae155cb46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:42:24 -0400 Subject: [PATCH 4252/8469] Remove commented code --HG-- extra : histedit_source : 7600ecd3914abc4767d4296f62b038a6397df673 --- pkg_resources.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 470143ddad..b544fed441 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -311,11 +311,6 @@ def compatible_platforms(provided, required): macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2)) if dversion == 7 and macosversion >= "10.3" or \ dversion == 8 and macosversion >= "10.4": - - #import warnings - #warnings.warn("Mac eggs should be rebuilt to " - # "use the macosx designation instead of darwin.", - # category=DeprecationWarning) return True return False # egg isn't macosx or legacy darwin From 3d4e1f728c1976caa56a463888a4fdbcee498e0b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 12:45:31 -0400 Subject: [PATCH 4253/8469] Avoid trailing comments in pkg_resources. --HG-- extra : histedit_source : fba32276bb6acd7b5e44ff596407d10c94c618a9 --- pkg_resources.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index b544fed441..21e4157138 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -312,7 +312,8 @@ def compatible_platforms(provided, required): if dversion == 7 and macosversion >= "10.3" or \ dversion == 8 and macosversion >= "10.4": return True - return False # egg isn't macosx or legacy darwin + # egg isn't macosx or legacy darwin + return False # are they the same major version and machine type? if provMac.group(1) != reqMac.group(1) or \ @@ -637,7 +638,8 @@ def resolve(self, requirements, env=None, installer=None, to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency - raise VersionConflict(dist, req) # XXX put more info here + # XXX put more info here + raise VersionConflict(dist, req) requirements.extend(dist.requires(req.extras)[::-1]) processed[req] = True @@ -653,8 +655,10 @@ def find_plugins(self, plugin_env, full_env=None, installer=None, distributions, errors = working_set.find_plugins( Environment(plugin_dirlist) ) - map(working_set.add, distributions) # add plugins+libs to sys.path - print 'Could not load', errors # display errors + # add plugins+libs to sys.path + map(working_set.add, distributions) + # display errors + print('Could not load', errors) The `plugin_env` should be an ``Environment`` instance that contains only distributions that are in the project's "plugin directory" or @@ -1618,8 +1622,9 @@ def _zipinfo_name(self, fspath): ) def _parts(self, zip_path): - # Convert a zipfile subpath into an egg-relative path part list - fspath = self.zip_pre+zip_path # pseudo-fs path + # Convert a zipfile subpath into an egg-relative path part list. + # pseudo-fs path + fspath = self.zip_pre+zip_path if fspath.startswith(self.egg_root+os.sep): return fspath[len(self.egg_root)+1:].split(os.sep) raise AssertionError( @@ -2684,7 +2689,8 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): raise ValueError(msg, line, "at", line[p:]) match = TERMINATOR(line, p) - if match: p = match.end() # skip the terminator, if any + # skip the terminator, if any + if match: p = match.end() return line, p, items for line in lines: @@ -2867,4 +2873,5 @@ def _initialize(g): # calling ``require()``) will get activated as well. add_activation_listener(lambda dist: dist.activate()) working_set.entries=[] -list(map(working_set.add_entry, sys.path)) # match order +# match order +list(map(working_set.add_entry, sys.path)) From b8865685d6cad94c1e5a049ff2f63ae1bbfc1cf2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 13:01:13 -0400 Subject: [PATCH 4254/8469] Normalize whitespace per more modern style conventions. --- pkg_resources.py | 96 +++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 21e4157138..11debf6543 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -343,8 +343,10 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist, basestring): dist = Requirement.parse(dist) - if isinstance(dist, Requirement): dist = get_provider(dist) + if isinstance(dist, basestring): + dist = Requirement.parse(dist) + if isinstance(dist, Requirement): + dist = get_provider(dist) if not isinstance(dist, Distribution): raise TypeError("Expected string, Requirement, or Distribution", dist) return dist @@ -886,7 +888,8 @@ def obtain(self, requirement, installer=None): def __iter__(self): """Yield the unique project names of the available distributions""" for key in self._distmap.keys(): - if self[key]: yield key + if self[key]: + yield key def __iadd__(self, other): """In-place addition of a distribution or environment""" @@ -2014,7 +2017,8 @@ def fixup_namespace_packages(path_item, parent=None): try: for package in _namespace_packages.get(parent,()): subpath = _handle_ns(package, path_item) - if subpath: fixup_namespace_packages(subpath, package) + if subpath: + fixup_namespace_packages(subpath, package) finally: imp.release_lock() @@ -2146,13 +2150,16 @@ def parse_version(s): for part in _parse_version_parts(s.lower()): if part.startswith('*'): # remove '-' before a prerelease tag - if part<'*final': - while parts and parts[-1]=='*final-': parts.pop() + if part < '*final': + while parts and parts[-1] == '*final-': + parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1]=='00000000': parts.pop() parts.append(part) return tuple(parts) + + class EntryPoint(object): """Object representing an advertised importable object""" @@ -2177,7 +2184,8 @@ def __repr__(self): return "EntryPoint.parse(%r)" % str(self) def load(self, require=True, env=None, installer=None): - if require: self.require(env, installer) + if require: + self.require(env, installer) entry = __import__(self.module_name, globals(), globals(), ['__name__']) for attr in self.attrs: @@ -2207,22 +2215,21 @@ def parse(cls, src, dist=None): """ try: attrs = extras = () - name, value = src.split('=',1) + name, value = src.split('=', 1) if '[' in value: - value, extras = value.split('[',1) - req = Requirement.parse("x["+extras) - if req.specs: raise ValueError + value, extras = value.split('[', 1) + req = Requirement.parse("x[" + extras) + if req.specs: + raise ValueError extras = req.extras if ':' in value: - value, attrs = value.split(':',1) + value, attrs = value.split(':', 1) if not MODULE(attrs.rstrip()): raise ValueError attrs = attrs.rstrip().split('.') except ValueError: - raise ValueError( - "EntryPoint must be in 'name=module:attrs [extras]' format", - src - ) + msg = "EntryPoint must be in 'name=module:attrs [extras]' format" + raise ValueError(msg, src) else: return cls(name.strip(), value.strip(), attrs, extras, dist) @@ -2379,7 +2386,7 @@ def _dep_map(self): for extra, reqs in split_sections(self._get_metadata(name)): if extra: if ':' in extra: - extra, marker = extra.split(':',1) + extra, marker = extra.split(':', 1) if invalid_marker(marker): # XXX warn reqs=[] @@ -2393,7 +2400,7 @@ def requires(self, extras=()): """List of Requirements needed for this distro if `extras` are used""" dm = self._dep_map deps = [] - deps.extend(dm.get(None,())) + deps.extend(dm.get(None, ())) for ext in extras: try: deps.extend(dm[safe_extra(ext)]) @@ -2410,7 +2417,8 @@ def _get_metadata(self, name): def activate(self, path=None): """Ensure distribution is importable on `path` (default=sys.path)""" - if path is None: path = sys.path + if path is None: + path = sys.path self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) @@ -2426,7 +2434,7 @@ def egg_name(self): ) if self.platform: - filename += '-'+self.platform + filename += '-' + self.platform return filename def __repr__(self): @@ -2436,8 +2444,10 @@ def __repr__(self): return str(self) def __str__(self): - try: version = getattr(self,'version',None) - except ValueError: version = None + try: + version = getattr(self, 'version', None) + except ValueError: + version = None version = version or "[unknown version]" return "%s %s" % (self.project_name, version) @@ -2493,9 +2503,9 @@ def insert_on(self, path, loc = None): npath= [(p and _normalize_cached(p) or p) for p in path] for p, item in enumerate(npath): - if item==nloc: + if item == nloc: break - elif item==bdir and self.precedence==EGG_DIST: + elif item == bdir and self.precedence == EGG_DIST: # if it's an .egg, give it precedence over its directory if path is sys.path: self.check_version_conflict() @@ -2509,7 +2519,7 @@ def insert_on(self, path, loc = None): return # p is the spot where we found or inserted loc; now remove duplicates - while 1: + while True: try: np = npath.index(nloc, p+1) except ValueError: @@ -2522,7 +2532,7 @@ def insert_on(self, path, loc = None): return def check_version_conflict(self): - if self.key=='setuptools': + if self.key == 'setuptools': # ignore the inevitable setuptools self-conflicts :( return @@ -2547,16 +2557,14 @@ def has_version(self): try: self.version except ValueError: - issue_warning("Unbuilt egg for "+repr(self)) + issue_warning("Unbuilt egg for " + repr(self)) return False return True def clone(self,**kw): """Copy this distribution, substituting in any changed keyword args""" - for attr in ( - 'project_name', 'version', 'py_version', 'platform', 'location', - 'precedence' - ): + names = 'project_name version py_version platform location precedence' + for attr in names.split(): kw.setdefault(attr, getattr(self, attr, None)) kw.setdefault('metadata', self._provider) return self.__class__(**kw) @@ -2646,7 +2654,7 @@ def issue_warning(*args,**kw): level += 1 except ValueError: pass - warnings.warn(stacklevel = level+1, *args, **kw) + warnings.warn(stacklevel=level + 1, *args, **kw) def parse_requirements(strs): @@ -2690,7 +2698,8 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): match = TERMINATOR(line, p) # skip the terminator, if any - if match: p = match.end() + if match: + p = match.end() return line, p, items for line in lines: @@ -2736,11 +2745,15 @@ def __init__(self, project_name, specs, extras): def __str__(self): specs = ','.join([''.join(s) for s in self.specs]) extras = ','.join(self.extras) - if extras: extras = '[%s]' % extras + if extras: + extras = '[%s]' % extras return '%s%s%s' % (self.project_name, extras, specs) def __eq__(self, other): - return isinstance(other, Requirement) and self.hashCmp==other.hashCmp + return ( + isinstance(other, Requirement) and + self.hashCmp == other.hashCmp + ) def __contains__(self, item): if isinstance(item, Distribution): @@ -2757,16 +2770,17 @@ def __contains__(self, item): for parsed, trans, op, ver in self.index: # Indexing: 0, 1, -1 action = trans[compare(item, parsed)] - if action=='F': + if action == 'F': return False - elif action=='T': + elif action == 'T': return True - elif action=='+': + elif action == '+': last = True - elif action=='-' or last is None: + elif action == '-' or last is None: last = False # no rules encountered - if last is None: last = True + if last is None: + last = True return last def __hash__(self): @@ -2778,7 +2792,7 @@ def __repr__(self): return "Requirement.parse(%r)" % str(self) def parse(s): reqs = list(parse_requirements(s)) if reqs: - if len(reqs)==1: + if len(reqs) == 1: return reqs[0] raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) From 7e2477857dd3fee16ef47c2e89d1998f13514701 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 13:20:47 -0400 Subject: [PATCH 4255/8469] Add six 1.7.3 for bootstrapping purposes. Ref #229 --HG-- branch : feature/issue-229 extra : source : 7e8095f69ea350cd04fabdbeca5c9733a57ec8ff --- six.py | 747 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 747 insertions(+) create mode 100644 six.py diff --git a/six.py b/six.py new file mode 100644 index 0000000000..f8f7d402ff --- /dev/null +++ b/six.py @@ -0,0 +1,747 @@ +"""Utilities for writing code that runs on Python 2 and 3""" + +# Copyright (c) 2010-2014 Benjamin Peterson +# +# 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. + +import functools +import operator +import sys +import types + +__author__ = "Benjamin Peterson " +__version__ = "1.7.3" + + +# Useful for very coarse version differentiation. +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 + +if PY3: + string_types = str, + integer_types = int, + class_types = type, + text_type = str + binary_type = bytes + + MAXSIZE = sys.maxsize +else: + string_types = basestring, + integer_types = (int, long) + class_types = (type, types.ClassType) + text_type = unicode + binary_type = str + + if sys.platform.startswith("java"): + # Jython always uses 32 bits. + MAXSIZE = int((1 << 31) - 1) + else: + # It's possible to have sizeof(long) != sizeof(Py_ssize_t). + class X(object): + def __len__(self): + return 1 << 31 + try: + len(X()) + except OverflowError: + # 32-bit + MAXSIZE = int((1 << 31) - 1) + else: + # 64-bit + MAXSIZE = int((1 << 63) - 1) + del X + + +def _add_doc(func, doc): + """Add documentation to a function.""" + func.__doc__ = doc + + +def _import_module(name): + """Import module, returning the module after the last dot.""" + __import__(name) + return sys.modules[name] + + +class _LazyDescr(object): + + def __init__(self, name): + self.name = name + + def __get__(self, obj, tp): + result = self._resolve() + setattr(obj, self.name, result) # Invokes __set__. + # This is a bit ugly, but it avoids running this again. + delattr(obj.__class__, self.name) + return result + + +class MovedModule(_LazyDescr): + + def __init__(self, name, old, new=None): + super(MovedModule, self).__init__(name) + if PY3: + if new is None: + new = name + self.mod = new + else: + self.mod = old + + def _resolve(self): + return _import_module(self.mod) + + def __getattr__(self, attr): + _module = self._resolve() + value = getattr(_module, attr) + setattr(self, attr, value) + return value + + +class _LazyModule(types.ModuleType): + + def __init__(self, name): + super(_LazyModule, self).__init__(name) + self.__doc__ = self.__class__.__doc__ + + def __dir__(self): + attrs = ["__doc__", "__name__"] + attrs += [attr.name for attr in self._moved_attributes] + return attrs + + # Subclasses should override this + _moved_attributes = [] + + +class MovedAttribute(_LazyDescr): + + def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): + super(MovedAttribute, self).__init__(name) + if PY3: + if new_mod is None: + new_mod = name + self.mod = new_mod + if new_attr is None: + if old_attr is None: + new_attr = name + else: + new_attr = old_attr + self.attr = new_attr + else: + self.mod = old_mod + if old_attr is None: + old_attr = name + self.attr = old_attr + + def _resolve(self): + module = _import_module(self.mod) + return getattr(module, self.attr) + + +class _SixMetaPathImporter(object): + """ + A meta path importer to import six.moves and its submodules. + + This class implements a PEP302 finder and loader. It should be compatible + with Python 2.5 and all existing versions of Python3 + """ + def __init__(self, six_module_name): + self.name = six_module_name + self.known_modules = {} + + def _add_module(self, mod, *fullnames): + for fullname in fullnames: + self.known_modules[self.name + "." + fullname] = mod + + def _get_module(self, fullname): + return self.known_modules[self.name + "." + fullname] + + def find_module(self, fullname, path=None): + if fullname in self.known_modules: + return self + return None + + def __get_module(self, fullname): + try: + return self.known_modules[fullname] + except KeyError: + raise ImportError("This loader does not know module " + fullname) + + def load_module(self, fullname): + try: + # in case of a reload + return sys.modules[fullname] + except KeyError: + pass + mod = self.__get_module(fullname) + if isinstance(mod, MovedModule): + mod = mod._resolve() + else: + mod.__loader__ = self + sys.modules[fullname] = mod + return mod + + def is_package(self, fullname): + """ + Return true, if the named module is a package. + + We need this method to get correct spec objects with + Python 3.4 (see PEP451) + """ + return hasattr(self.__get_module(fullname), "__path__") + + def get_code(self, fullname): + """Return None + + Required, if is_package is implemented""" + self.__get_module(fullname) # eventually raises ImportError + return None + get_source = get_code # same as get_code + +_importer = _SixMetaPathImporter(__name__) + + +class _MovedItems(_LazyModule): + """Lazy loading of moved objects""" + __path__ = [] # mark as package + + +_moved_attributes = [ + MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), + MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), + MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), + MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), + MovedAttribute("map", "itertools", "builtins", "imap", "map"), + MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("reload_module", "__builtin__", "imp", "reload"), + MovedAttribute("reduce", "__builtin__", "functools"), + MovedAttribute("StringIO", "StringIO", "io"), + MovedAttribute("UserDict", "UserDict", "collections"), + MovedAttribute("UserList", "UserList", "collections"), + MovedAttribute("UserString", "UserString", "collections"), + MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), + MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), + + MovedModule("builtins", "__builtin__"), + MovedModule("configparser", "ConfigParser"), + MovedModule("copyreg", "copy_reg"), + MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), + MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), + MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), + MovedModule("http_cookies", "Cookie", "http.cookies"), + MovedModule("html_entities", "htmlentitydefs", "html.entities"), + MovedModule("html_parser", "HTMLParser", "html.parser"), + MovedModule("http_client", "httplib", "http.client"), + MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), + MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), + MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), + MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), + MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), + MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), + MovedModule("cPickle", "cPickle", "pickle"), + MovedModule("queue", "Queue"), + MovedModule("reprlib", "repr"), + MovedModule("socketserver", "SocketServer"), + MovedModule("_thread", "thread", "_thread"), + MovedModule("tkinter", "Tkinter"), + MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), + MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), + MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), + MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), + MovedModule("tkinter_tix", "Tix", "tkinter.tix"), + MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), + MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), + MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), + MovedModule("tkinter_colorchooser", "tkColorChooser", + "tkinter.colorchooser"), + MovedModule("tkinter_commondialog", "tkCommonDialog", + "tkinter.commondialog"), + MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), + MovedModule("tkinter_font", "tkFont", "tkinter.font"), + MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), + MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", + "tkinter.simpledialog"), + MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), + MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), + MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), + MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), + MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), + MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), + MovedModule("winreg", "_winreg"), +] +for attr in _moved_attributes: + setattr(_MovedItems, attr.name, attr) + if isinstance(attr, MovedModule): + _importer._add_module(attr, "moves." + attr.name) +del attr + +_MovedItems._moved_attributes = _moved_attributes + +moves = _MovedItems(__name__ + ".moves") +_importer._add_module(moves, "moves") + + +class Module_six_moves_urllib_parse(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_parse""" + + +_urllib_parse_moved_attributes = [ + MovedAttribute("ParseResult", "urlparse", "urllib.parse"), + MovedAttribute("SplitResult", "urlparse", "urllib.parse"), + MovedAttribute("parse_qs", "urlparse", "urllib.parse"), + MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), + MovedAttribute("urldefrag", "urlparse", "urllib.parse"), + MovedAttribute("urljoin", "urlparse", "urllib.parse"), + MovedAttribute("urlparse", "urlparse", "urllib.parse"), + MovedAttribute("urlsplit", "urlparse", "urllib.parse"), + MovedAttribute("urlunparse", "urlparse", "urllib.parse"), + MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), + MovedAttribute("quote", "urllib", "urllib.parse"), + MovedAttribute("quote_plus", "urllib", "urllib.parse"), + MovedAttribute("unquote", "urllib", "urllib.parse"), + MovedAttribute("unquote_plus", "urllib", "urllib.parse"), + MovedAttribute("urlencode", "urllib", "urllib.parse"), + MovedAttribute("splitquery", "urllib", "urllib.parse"), +] +for attr in _urllib_parse_moved_attributes: + setattr(Module_six_moves_urllib_parse, attr.name, attr) +del attr + +Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes + +_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), + "moves.urllib_parse", "moves.urllib.parse") + + +class Module_six_moves_urllib_error(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_error""" + + +_urllib_error_moved_attributes = [ + MovedAttribute("URLError", "urllib2", "urllib.error"), + MovedAttribute("HTTPError", "urllib2", "urllib.error"), + MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), +] +for attr in _urllib_error_moved_attributes: + setattr(Module_six_moves_urllib_error, attr.name, attr) +del attr + +Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes + +_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), + "moves.urllib_error", "moves.urllib.error") + + +class Module_six_moves_urllib_request(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_request""" + + +_urllib_request_moved_attributes = [ + MovedAttribute("urlopen", "urllib2", "urllib.request"), + MovedAttribute("install_opener", "urllib2", "urllib.request"), + MovedAttribute("build_opener", "urllib2", "urllib.request"), + MovedAttribute("pathname2url", "urllib", "urllib.request"), + MovedAttribute("url2pathname", "urllib", "urllib.request"), + MovedAttribute("getproxies", "urllib", "urllib.request"), + MovedAttribute("Request", "urllib2", "urllib.request"), + MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), + MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), + MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), + MovedAttribute("BaseHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), + MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), + MovedAttribute("FileHandler", "urllib2", "urllib.request"), + MovedAttribute("FTPHandler", "urllib2", "urllib.request"), + MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), + MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), + MovedAttribute("urlretrieve", "urllib", "urllib.request"), + MovedAttribute("urlcleanup", "urllib", "urllib.request"), + MovedAttribute("URLopener", "urllib", "urllib.request"), + MovedAttribute("FancyURLopener", "urllib", "urllib.request"), + MovedAttribute("proxy_bypass", "urllib", "urllib.request"), +] +for attr in _urllib_request_moved_attributes: + setattr(Module_six_moves_urllib_request, attr.name, attr) +del attr + +Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes + +_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), + "moves.urllib_request", "moves.urllib.request") + + +class Module_six_moves_urllib_response(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_response""" + + +_urllib_response_moved_attributes = [ + MovedAttribute("addbase", "urllib", "urllib.response"), + MovedAttribute("addclosehook", "urllib", "urllib.response"), + MovedAttribute("addinfo", "urllib", "urllib.response"), + MovedAttribute("addinfourl", "urllib", "urllib.response"), +] +for attr in _urllib_response_moved_attributes: + setattr(Module_six_moves_urllib_response, attr.name, attr) +del attr + +Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes + +_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), + "moves.urllib_response", "moves.urllib.response") + + +class Module_six_moves_urllib_robotparser(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_robotparser""" + + +_urllib_robotparser_moved_attributes = [ + MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), +] +for attr in _urllib_robotparser_moved_attributes: + setattr(Module_six_moves_urllib_robotparser, attr.name, attr) +del attr + +Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes + +_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), + "moves.urllib_robotparser", "moves.urllib.robotparser") + + +class Module_six_moves_urllib(types.ModuleType): + """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" + __path__ = [] # mark as package + parse = _importer._get_module("moves.urllib_parse") + error = _importer._get_module("moves.urllib_error") + request = _importer._get_module("moves.urllib_request") + response = _importer._get_module("moves.urllib_response") + robotparser = _importer._get_module("moves.urllib_robotparser") + + def __dir__(self): + return ['parse', 'error', 'request', 'response', 'robotparser'] + +_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), + "moves.urllib") + + +def add_move(move): + """Add an item to six.moves.""" + setattr(_MovedItems, move.name, move) + + +def remove_move(name): + """Remove item from six.moves.""" + try: + delattr(_MovedItems, name) + except AttributeError: + try: + del moves.__dict__[name] + except KeyError: + raise AttributeError("no such move, %r" % (name,)) + + +if PY3: + _meth_func = "__func__" + _meth_self = "__self__" + + _func_closure = "__closure__" + _func_code = "__code__" + _func_defaults = "__defaults__" + _func_globals = "__globals__" +else: + _meth_func = "im_func" + _meth_self = "im_self" + + _func_closure = "func_closure" + _func_code = "func_code" + _func_defaults = "func_defaults" + _func_globals = "func_globals" + + +try: + advance_iterator = next +except NameError: + def advance_iterator(it): + return it.next() +next = advance_iterator + + +try: + callable = callable +except NameError: + def callable(obj): + return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) + + +if PY3: + def get_unbound_function(unbound): + return unbound + + create_bound_method = types.MethodType + + Iterator = object +else: + def get_unbound_function(unbound): + return unbound.im_func + + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + + class Iterator(object): + + def next(self): + return type(self).__next__(self) + + callable = callable +_add_doc(get_unbound_function, + """Get the function out of a possibly unbound function""") + + +get_method_function = operator.attrgetter(_meth_func) +get_method_self = operator.attrgetter(_meth_self) +get_function_closure = operator.attrgetter(_func_closure) +get_function_code = operator.attrgetter(_func_code) +get_function_defaults = operator.attrgetter(_func_defaults) +get_function_globals = operator.attrgetter(_func_globals) + + +if PY3: + def iterkeys(d, **kw): + return iter(d.keys(**kw)) + + def itervalues(d, **kw): + return iter(d.values(**kw)) + + def iteritems(d, **kw): + return iter(d.items(**kw)) + + def iterlists(d, **kw): + return iter(d.lists(**kw)) +else: + def iterkeys(d, **kw): + return iter(d.iterkeys(**kw)) + + def itervalues(d, **kw): + return iter(d.itervalues(**kw)) + + def iteritems(d, **kw): + return iter(d.iteritems(**kw)) + + def iterlists(d, **kw): + return iter(d.iterlists(**kw)) + +_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") +_add_doc(itervalues, "Return an iterator over the values of a dictionary.") +_add_doc(iteritems, + "Return an iterator over the (key, value) pairs of a dictionary.") +_add_doc(iterlists, + "Return an iterator over the (key, [values]) pairs of a dictionary.") + + +if PY3: + def b(s): + return s.encode("latin-1") + def u(s): + return s + unichr = chr + if sys.version_info[1] <= 1: + def int2byte(i): + return bytes((i,)) + else: + # This is about 2x faster than the implementation above on 3.2+ + int2byte = operator.methodcaller("to_bytes", 1, "big") + byte2int = operator.itemgetter(0) + indexbytes = operator.getitem + iterbytes = iter + import io + StringIO = io.StringIO + BytesIO = io.BytesIO +else: + def b(s): + return s + # Workaround for standalone backslash + def u(s): + return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") + unichr = unichr + int2byte = chr + def byte2int(bs): + return ord(bs[0]) + def indexbytes(buf, i): + return ord(buf[i]) + def iterbytes(buf): + return (ord(byte) for byte in buf) + import StringIO + StringIO = BytesIO = StringIO.StringIO +_add_doc(b, """Byte literal""") +_add_doc(u, """Text literal""") + + +if PY3: + exec_ = getattr(moves.builtins, "exec") + + + def reraise(tp, value, tb=None): + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + +else: + def exec_(_code_, _globs_=None, _locs_=None): + """Execute code in a namespace.""" + if _globs_ is None: + frame = sys._getframe(1) + _globs_ = frame.f_globals + if _locs_ is None: + _locs_ = frame.f_locals + del frame + elif _locs_ is None: + _locs_ = _globs_ + exec("""exec _code_ in _globs_, _locs_""") + + + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb +""") + + +print_ = getattr(moves.builtins, "print", None) +if print_ is None: + def print_(*args, **kwargs): + """The new-style print function for Python 2.4 and 2.5.""" + fp = kwargs.pop("file", sys.stdout) + if fp is None: + return + def write(data): + if not isinstance(data, basestring): + data = str(data) + # If the file has an encoding, encode unicode with it. + if (isinstance(fp, file) and + isinstance(data, unicode) and + fp.encoding is not None): + errors = getattr(fp, "errors", None) + if errors is None: + errors = "strict" + data = data.encode(fp.encoding, errors) + fp.write(data) + want_unicode = False + sep = kwargs.pop("sep", None) + if sep is not None: + if isinstance(sep, unicode): + want_unicode = True + elif not isinstance(sep, str): + raise TypeError("sep must be None or a string") + end = kwargs.pop("end", None) + if end is not None: + if isinstance(end, unicode): + want_unicode = True + elif not isinstance(end, str): + raise TypeError("end must be None or a string") + if kwargs: + raise TypeError("invalid keyword arguments to print()") + if not want_unicode: + for arg in args: + if isinstance(arg, unicode): + want_unicode = True + break + if want_unicode: + newline = unicode("\n") + space = unicode(" ") + else: + newline = "\n" + space = " " + if sep is None: + sep = space + if end is None: + end = newline + for i, arg in enumerate(args): + if i: + write(sep) + write(arg) + write(end) + +_add_doc(reraise, """Reraise an exception.""") + +if sys.version_info[0:2] < (3, 4): + def wraps(wrapped): + def wrapper(f): + f = functools.wraps(wrapped)(f) + f.__wrapped__ = wrapped + return f + return wrapper +else: + wraps = functools.wraps + +def with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) + + +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper + +# Complete the moves implementation. +# This code is at the end of this module to speed up module loading. +# Turn this module into a package. +__path__ = [] # required for PEP 302 and PEP 451 +__package__ = __name__ # see PEP 366 @ReservedAssignment +if globals().get("__spec__") is not None: + __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable +# Remove other six meta path importers, since they cause problems. This can +# happen if six is removed from sys.modules and then reloaded. (Setuptools does +# this for some reason.) +if sys.meta_path: + for i, importer in enumerate(sys.meta_path): + # Here's some real nastiness: Another "instance" of the six module might + # be floating around. Therefore, we can't use isinstance() to check for + # the six meta path importer, since the other six instance will have + # inserted an importer with different class. + if (type(importer).__name__ == "_SixMetaPathImporter" and + importer.name == __name__): + del sys.meta_path[i] + break + del i, importer +# Finally, add the importer to the meta path import hook. +sys.meta_path.append(_importer) From 5b865b1b6e23379d23aa80e74adb38db8b14b6ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 13:21:54 -0400 Subject: [PATCH 4256/8469] Add dependency on six --HG-- branch : feature/issue-229 extra : source : dc7d411977b4b040ba82be2f5881a5723c0637d5 --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index f7be05670c..cf401d456c 100755 --- a/setup.py +++ b/setup.py @@ -197,6 +197,9 @@ def _save_entry_points(self): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), + install_requires=[ + 'six>=1.5', + ], extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==1.0.1", From f3829d8bd0cd852be133f8822aa4493a7a12fd51 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 13:34:34 -0400 Subject: [PATCH 4257/8469] Use numbers.Number to detect numeric type --- setuptools/compat.py | 2 -- setuptools/dist.py | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 09e5af5cc6..507f8e6c04 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -23,7 +23,6 @@ long_type = long maxsize = sys.maxint next = lambda o: o.next() - numeric_types = (int, long, float) unichr = unichr unicode = unicode bytes = str @@ -52,7 +51,6 @@ long_type = int maxsize = sys.maxsize next = next - numeric_types = (int, float) unichr = chr unicode = str bytes = bytes diff --git a/setuptools/dist.py b/setuptools/dist.py index 8de95a387f..dac4dfa8f8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -4,6 +4,7 @@ import os import sys import warnings +import numbers import distutils.log import distutils.core import distutils.cmd @@ -13,7 +14,7 @@ DistutilsSetupError) from setuptools.depends import Require -from setuptools.compat import numeric_types, basestring, PY2 +from setuptools.compat import basestring, PY2 import pkg_resources def _get_unpatched(cls): @@ -263,7 +264,7 @@ def __init__(self, attrs=None): if not hasattr(self,ep.name): setattr(self,ep.name,None) _Distribution.__init__(self,attrs) - if isinstance(self.metadata.version, numeric_types): + if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) From c4ecbd1e58a3384a5ab730450fa5487e48b68721 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 14:42:49 -0400 Subject: [PATCH 4258/8469] Since Python 3 will always need the _execfile functionality (to fulfill the test in test_sandbox), this functionality should become part of the core implementation. --- setuptools/compat.py | 10 ---------- setuptools/sandbox.py | 23 ++++++++++++++++------- setuptools/tests/doctest.py | 8 +++++--- setuptools/tests/test_sandbox.py | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 507f8e6c04..45c2f24c95 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -10,7 +10,6 @@ import ConfigParser from StringIO import StringIO BytesIO = StringIO - execfile = execfile func_code = lambda o: o.func_code func_globals = lambda o: o.func_globals im_func = lambda o: o.im_func @@ -63,15 +62,6 @@ ) filterfalse = itertools.filterfalse - def execfile(fn, globs=None, locs=None): - if globs is None: - globs = globals() - if locs is None: - locs = globs - with open(fn, 'rb') as f: - source = f.read() - exec(compile(source, fn, 'exec'), globs, locs) - def reraise(tp, value, tb=None): if value.__traceback__ is not tb: raise value.with_traceback(tb) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index dc6e54bf24..7985e9eef6 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -20,12 +20,23 @@ from distutils.errors import DistutilsError from pkg_resources import working_set -from setuptools.compat import builtins, execfile +from setuptools.compat import builtins __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] +def _execfile(filename, globals, locals=None): + """ + Python 3 implementation of execfile. + """ + with open(filename, 'rb') as stream: + script = stream.read() + if locals is None: + locals = globals + code = compile(script, filename, 'exec') + exec(code, globals, locals) + def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" old_dir = os.getcwd() @@ -46,12 +57,10 @@ def run_setup(setup_script, args): # reset to include setup dir, w/clean callback list working_set.__init__() working_set.callbacks.append(lambda dist:dist.activate()) - DirectorySandbox(setup_dir).run( - lambda: execfile( - "setup.py", - {'__file__':setup_script, '__name__':'__main__'} - ) - ) + def runner(): + ns = dict(__file__=setup_script, __name__='__main__') + _execfile(setup_script, ns) + DirectorySandbox(setup_dir).run(runner) except SystemExit: v = sys.exc_info()[1] if v.args and v.args[0]: diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index 47293c3c9c..75a1ff546e 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -109,7 +109,8 @@ def _test(): import sys, traceback, inspect, linecache, os, re, types import unittest, difflib, pdb, tempfile import warnings -from setuptools.compat import StringIO, execfile, func_code, im_func +from setuptools.compat import StringIO, func_code, im_func +from setuptools import sandbox # Don't whine about the deprecated is_private function in this # module's tests. @@ -2554,14 +2555,15 @@ def debug_script(src, pm=False, globs=None): if pm: try: - execfile(srcfilename, globs, globs) + sandbox._execfile(srcfilename, globs) except: print(sys.exc_info()[1]) pdb.post_mortem(sys.exc_info()[2]) else: # Note that %r is vital here. '%s' instead can, e.g., cause # backslashes to get treated as metacharacters on Windows. - pdb.run("execfile(%r)" % srcfilename, globs, globs) + cmd = "sandbox._execfile(%r, globals())" % srcfilename + pdb.run(cmd, globs, globs) finally: os.remove(srcfilename) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 3dad137683..06b3d4340f 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -72,7 +72,7 @@ def test_setup_py_with_BOM(self): target = pkg_resources.resource_filename(__name__, 'script-with-bom.py') namespace = types.ModuleType('namespace') - setuptools.sandbox.execfile(target, vars(namespace)) + setuptools.sandbox._execfile(target, vars(namespace)) assert namespace.result == 'passed' if __name__ == '__main__': From 508f0f5134f3f5e87f53b7773086c8ecb30c527e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 15:00:26 -0400 Subject: [PATCH 4259/8469] next compatibility is no longer required --- setuptools/command/bdist_egg.py | 2 +- setuptools/compat.py | 2 -- setuptools/tests/test_easy_install.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 831d6042aa..34fdeec21f 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -14,7 +14,7 @@ from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint -from setuptools.compat import basestring, next +from setuptools.compat import basestring from setuptools.extension import Library from setuptools import Command diff --git a/setuptools/compat.py b/setuptools/compat.py index 45c2f24c95..73e6e4aa7e 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -21,7 +21,6 @@ iteritems = lambda o: o.iteritems() long_type = long maxsize = sys.maxint - next = lambda o: o.next() unichr = unichr unicode = unicode bytes = str @@ -49,7 +48,6 @@ iteritems = lambda o: o.items() long_type = int maxsize = sys.maxsize - next = next unichr = chr unicode = str bytes = bytes diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 31802aa288..a44309530f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -12,7 +12,7 @@ import logging import distutils.core -from setuptools.compat import StringIO, BytesIO, next, urlparse +from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import ( easy_install, fix_jython_executable, get_script_args, nt_quote_arg) From b49435397a5094f94678adf3549cc8941aa469b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 15:06:51 -0400 Subject: [PATCH 4260/8469] Use six for Python 2 compatibility --HG-- branch : feature/issue-229 extra : source : 7b1997ececc5772798ce33a0f8e77387cb55a977 --- setuptools/__init__.py | 3 +- setuptools/command/bdist_egg.py | 5 +- setuptools/command/develop.py | 5 +- setuptools/command/easy_install.py | 34 ++++----- setuptools/command/egg_info.py | 11 +-- setuptools/command/rotate.py | 5 +- setuptools/command/sdist.py | 5 +- setuptools/command/setopt.py | 6 +- setuptools/command/test.py | 7 +- setuptools/command/upload_docs.py | 18 +++-- setuptools/depends.py | 6 +- setuptools/dist.py | 7 +- setuptools/package_index.py | 101 ++++++++++++++------------ setuptools/py26compat.py | 5 +- setuptools/sandbox.py | 4 +- setuptools/ssl_support.py | 21 ++---- setuptools/svn_utils.py | 17 ++--- setuptools/tests/__init__.py | 6 +- setuptools/tests/server.py | 25 ++++--- setuptools/tests/test_bdist_egg.py | 6 +- setuptools/tests/test_easy_install.py | 18 ++--- setuptools/tests/test_packageindex.py | 17 +++-- setuptools/tests/test_resources.py | 11 +-- setuptools/tests/test_sdist.py | 29 ++++---- setuptools/tests/test_svn.py | 13 ++-- setuptools/tests/test_test.py | 9 ++- setuptools/unicode_utils.py | 6 +- tests/manual_test.py | 5 +- 28 files changed, 212 insertions(+), 193 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index d99ab2a6b4..68bea4f64f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,11 +8,12 @@ from distutils.util import convert_path from fnmatch import fnmatchcase +from six.moves import filterfalse + import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribution, Feature, _get_unpatched from setuptools.depends import Require -from setuptools.compat import filterfalse __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 34fdeec21f..3d241b9919 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -12,9 +12,10 @@ import marshal import textwrap +import six + from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint -from setuptools.compat import basestring from setuptools.extension import Library from setuptools import Command @@ -418,7 +419,7 @@ def iter_symbols(code): for name in code.co_names: yield name for const in code.co_consts: - if isinstance(const, basestring): + if isinstance(const, six.string_types): yield const elif isinstance(const, CodeType): for name in iter_symbols(const): diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 368b64fed7..9f0b6f474b 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -4,9 +4,10 @@ import os import glob +import six + from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install -from setuptools.compat import PY3 import setuptools @@ -86,7 +87,7 @@ def finalize_options(self): " installation directory", p, normalize_path(os.curdir)) def install_for_development(self): - if PY3 and getattr(self.distribution, 'use_2to3', False): + if six.PY3 and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6854827222..3be6fd9aac 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -35,6 +35,9 @@ import site import struct +import six +from six.moves import configparser + from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from setuptools.py31compat import get_path, get_config_vars @@ -43,8 +46,6 @@ from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info -from setuptools.compat import (iteritems, maxsize, basestring, unicode, - reraise, PY2, PY3) from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, get_distribution, find_distributions, Environment, Requirement, @@ -77,13 +78,13 @@ def samefile(p1, p2): return norm_p1 == norm_p2 -if PY2: +if six.PY2: def _to_ascii(s): return s def isascii(s): try: - unicode(s, 'ascii') + six.text_type(s, 'ascii') return True except UnicodeError: return False @@ -315,7 +316,7 @@ def finalize_options(self): self.local_index = Environment(self.shadow_path + sys.path) if self.find_links is not None: - if isinstance(self.find_links, basestring): + if isinstance(self.find_links, six.string_types): self.find_links = self.find_links.split() else: self.find_links = [] @@ -393,7 +394,7 @@ def pseudo_tempname(self): try: pid = os.getpid() except: - pid = random.randint(0, maxsize) + pid = random.randint(0, sys.maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) def warn_deprecated_options(self): @@ -1217,7 +1218,7 @@ def install_site_py(self): f = open(sitepy, 'rb') current = f.read() # we want str, not bytes - if PY3: + if six.PY3: current = current.decode() f.close() @@ -1243,7 +1244,7 @@ def create_home_path(self): if not self.user: return home = convert_path(os.path.expanduser("~")) - for name, path in iteritems(self.config_vars): + for name, path in six.iteritems(self.config_vars): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0o700)" % path) os.makedirs(path, 0o700) @@ -1374,7 +1375,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: @@ -1387,15 +1388,12 @@ def extract_wininst_cfg(dist_filename): return None f.seek(prepended - 12) - from setuptools.compat import StringIO, ConfigParser - import struct - tag, cfglen, bmlen = struct.unpack("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - yield urljoin(url, htmldecode(match.group(1))) + yield urllib.parse.urljoin(url, htmldecode(match.group(1))) user_agent = "Python-urllib/%s setuptools/%s" % ( sys.version[:3], require('setuptools')[0].version @@ -240,7 +243,7 @@ def __init__(self, hash_name, expected): @classmethod def from_url(cls, url): "Construct a (possibly null) ContentChecker from a URL" - fragment = urlparse(url)[-1] + fragment = urllib.parse.urlparse(url)[-1] if not fragment: return ContentChecker() match = cls.pattern.search(fragment) @@ -275,7 +278,7 @@ def __init__( self.to_scan = [] if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()): self.opener = ssl_support.opener_for(ca_bundle) - else: self.opener = urllib2.urlopen + else: self.opener = urllib.request.urlopen def process_url(self, url, retrieve=False): """Evaluate a URL as a possible download, and maybe retrieve it""" @@ -312,7 +315,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. - if isinstance(f, HTTPError): + if isinstance(f, urllib.request.HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' else: @@ -320,7 +323,7 @@ def process_url(self, url, retrieve=False): page = page.decode(charset, "ignore") f.close() for match in HREF.finditer(page): - link = urljoin(base, htmldecode(match.group(1))) + link = urllib.parse.urljoin(base, htmldecode(match.group(1))) self.process_url(link) if url.startswith(self.index_url) and getattr(f,'code',None)!=404: page = self.process_index(url, page) @@ -343,7 +346,7 @@ def process_filename(self, fn, nested=False): def url_ok(self, url, fatal=False): s = URL_SCHEME(url) - if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]): + if (s and s.group(1).lower()=='file') or self.allows(urllib.parse.urlparse(url)[1]): return True msg = ("\nNote: Bypassing %s (disallowed host; see " "http://bit.ly/1dg9ijs for details).\n") @@ -374,7 +377,7 @@ def scan(link): # Process a URL to see if it's for a package page if link.startswith(self.index_url): parts = list(map( - unquote, link[len(self.index_url):].split('/') + urllib.parse.unquote, link[len(self.index_url):].split('/') )) if len(parts)==2 and '#' not in parts[1]: # it's a package page, sanitize and index it @@ -387,7 +390,7 @@ def scan(link): # process an index page into the package-page index for match in HREF.finditer(page): try: - scan(urljoin(url, htmldecode(match.group(1)))) + scan(urllib.parse.urljoin(url, htmldecode(match.group(1)))) except ValueError: pass @@ -663,7 +666,7 @@ def _download_to(self, url, filename): try: checker = HashChecker.from_url(url) fp = self.open_url(strip_fragment(url)) - if isinstance(fp, HTTPError): + if isinstance(fp, urllib.request.HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) ) @@ -699,24 +702,24 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url, self.opener) - except (ValueError, httplib.InvalidURL): + except (ValueError, http_client.InvalidURL): v = sys.exc_info()[1] msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) else: raise DistutilsError('%s %s' % (url, msg)) - except urllib2.HTTPError: + except urllib.request.HTTPError: v = sys.exc_info()[1] return v - except urllib2.URLError: + except urllib.request.URLError: v = sys.exc_info()[1] if warning: self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) - except httplib.BadStatusLine: + except http_client.BadStatusLine: v = sys.exc_info()[1] if warning: self.warn(warning, v.line) @@ -726,7 +729,7 @@ def open_url(self, url, warning=None): 'down, %s' % (url, v.line) ) - except httplib.HTTPException: + except http_client.HTTPException: v = sys.exc_info()[1] if warning: self.warn(warning, v) @@ -758,7 +761,7 @@ def _download_url(self, scheme, url, tmpdir): elif scheme.startswith('hg+'): return self._download_hg(url, filename) elif scheme=='file': - return url2pathname(urlparse(url)[2]) + return urllib.request.url2pathname(urllib.parse.urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) @@ -792,7 +795,7 @@ def _download_svn(self, url, filename): url = url.split('#',1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: - scheme, netloc, path, p, q, f = urlparse(url) + scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/',1) auth, host = splituser(netloc) @@ -803,14 +806,15 @@ def _download_svn(self, url, filename): else: creds = " --username="+auth netloc = host - url = urlunparse((scheme, netloc, url, p, q, f)) + parts = scheme, netloc, url, p, q, f + url = urllib.parse.urlunparse(parts) self.info("Doing subversion checkout from %s to %s", url, filename) os.system("svn checkout%s -q %s %s" % (creds, url, filename)) return filename @staticmethod def _vcs_split_rev_from_url(url, pop_prefix=False): - scheme, netloc, path, query, frag = urlsplit(url) + scheme, netloc, path, query, frag = urllib.parse.urlsplit(url) scheme = scheme.split('+', 1)[-1] @@ -822,7 +826,7 @@ def _vcs_split_rev_from_url(url, pop_prefix=False): path, rev = path.rsplit('@', 1) # Also, discard fragment - url = urlunsplit((scheme, netloc, path, query, '')) + url = urllib.parse.urlunsplit((scheme, netloc, path, query, '')) return url, rev @@ -874,7 +878,7 @@ def warn(self, msg, *args): def uchr(c): if not isinstance(c, int): return c - if c>255: return unichr(c) + if c>255: return six.unichr(c) return chr(c) def decode_entity(match): @@ -884,7 +888,7 @@ def decode_entity(match): elif what.startswith('#'): what = int(what[1:]) else: - what = name2codepoint.get(what, match.group(0)) + what = six.moves.html_entities.name2codepoint.get(what, match.group(0)) return uchr(what) def htmldecode(text): @@ -915,7 +919,7 @@ def _encode_auth(auth): >>> chr(10) in str(_encode_auth(long_auth)) False """ - auth_s = unquote(auth) + auth_s = urllib.parse.unquote(auth) # convert to bytes auth_bytes = auth_s.encode() # use the legacy interface for Python 2.3 support @@ -940,14 +944,14 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPIConfig(ConfigParser.ConfigParser): +class PyPIConfig(six.moves.configparser.ConfigParser): def __init__(self): """ Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - ConfigParser.ConfigParser.__init__(self, defaults) + six.moves.configparser.ConfigParser.__init__(self, defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): @@ -979,15 +983,15 @@ def find_credential(self, url): return cred -def open_with_auth(url, opener=urllib2.urlopen): +def open_with_auth(url, opener=urllib.request.urlopen): """Open a urllib2 request, handling HTTP authentication""" - scheme, netloc, path, params, query, frag = urlparse(url) + scheme, netloc, path, params, query, frag = urllib.parse.urlparse(url) # Double scheme does not raise on Mac OS X as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. if netloc.endswith(':'): - raise httplib.InvalidURL("nonnumeric port: ''") + raise http_client.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): auth, host = splituser(netloc) @@ -1003,11 +1007,12 @@ def open_with_auth(url, opener=urllib2.urlopen): if auth: auth = "Basic " + _encode_auth(auth) - new_url = urlunparse((scheme,host,path,params,query,frag)) - request = urllib2.Request(new_url) + parts = scheme, host, path, params, query, frag + new_url = urllib.parse.urlunparse(parts) + request = urllib.request.Request(new_url) request.add_header("Authorization", auth) else: - request = urllib2.Request(url) + request = urllib.request.Request(url) request.add_header('User-Agent', user_agent) fp = opener(request) @@ -1015,9 +1020,10 @@ def open_with_auth(url, opener=urllib2.urlopen): if auth: # Put authentication info back into request URL if same host, # so that links found on the page will work - s2, h2, path2, param2, query2, frag2 = urlparse(fp.url) + s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url) if s2==scheme and h2==host: - fp.url = urlunparse((s2,netloc,path2,param2,query2,frag2)) + parts = s2, netloc, path2, param2, query2, frag2 + fp.url = urllib.parse.urlunparse(parts) return fp @@ -1030,10 +1036,10 @@ def fix_sf_url(url): def local_open(url): """Read a local path, with special support for directories""" - scheme, server, path, param, query, frag = urlparse(url) - filename = url2pathname(path) + scheme, server, path, param, query, frag = urllib.parse.urlparse(url) + filename = urllib.request.url2pathname(path) if os.path.isfile(filename): - return urllib2.urlopen(url) + return urllib.request.urlopen(url) elif path.endswith('/') and os.path.isdir(filename): files = [] for f in os.listdir(filename): @@ -1052,4 +1058,5 @@ def local_open(url): status, message, body = 404, "Path not found", "Not found" headers = {'content-type': 'text/html'} - return HTTPError(url, status, message, headers, StringIO(body)) + body_stream = six.StringIO(body) + return urllib.error.HTTPError(url, status, message, headers, body_stream) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 738b0cc40b..e52bd85b36 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -4,7 +4,10 @@ import sys -from setuptools.compat import splittag +try: + from urllib.parse import splittag +except ImportError: + from urllib import splittag def strip_fragment(url): """ diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 7985e9eef6..185f257309 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -6,6 +6,8 @@ import itertools import re +from six.moves import builtins + import pkg_resources if os.name == "java": @@ -20,8 +22,6 @@ from distutils.errors import DistutilsError from pkg_resources import working_set -from setuptools.compat import builtins - __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 7b5f429f8f..b574f4b98f 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,9 +3,10 @@ import atexit import re +from six.moves import urllib, http_client + import pkg_resources from pkg_resources import ResolutionError, ExtractionError -from setuptools.compat import urllib2 try: import ssl @@ -27,17 +28,11 @@ """.strip().split() -HTTPSHandler = HTTPSConnection = object - -for what, where in ( - ('HTTPSHandler', ['urllib2','urllib.request']), - ('HTTPSConnection', ['httplib', 'http.client']), -): - for module in where: - try: - exec("from %s import %s" % (module, what)) - except ImportError: - pass +try: + HTTPSHandler = urllib.request.HTTPSHandler + HTTPSConnection = http_client.HTTPSConnection +except AttributeError: + HTTPSHandler = HTTPSConnection = object is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection) @@ -191,7 +186,7 @@ def connect(self): def opener_for(ca_bundle=None): """Get a urlopen() replacement that uses ca_bundle for verification""" - return urllib2.build_opener( + return urllib.request.build_opener( VerifyingHTTPSHandler(ca_bundle or find_ca_bundle()) ).open diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 2dcfd89913..65e4b81537 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -8,14 +8,11 @@ import codecs import unicodedata import warnings -from setuptools.compat import unicode, PY2 from setuptools.py31compat import TemporaryDirectory from xml.sax.saxutils import unescape -try: - import urlparse -except ImportError: - import urllib.parse as urlparse +import six +from six.moves import urllib from subprocess import Popen as _Popen, PIPE as _PIPE @@ -60,7 +57,7 @@ def _get_target_property(target): def _get_xml_data(decoded_str): - if PY2: + if six.PY2: #old versions want an encoded string data = decoded_str.encode('utf-8') else: @@ -118,7 +115,7 @@ def decode_as_string(text, encoding=None): if encoding is None: encoding = _console_encoding - if not isinstance(text, unicode): + if not isinstance(text, six.text_type): text = text.decode(encoding) text = unicodedata.normalize('NFC', text) @@ -180,17 +177,17 @@ def parse_external_prop(lines): if not line: continue - if PY2: + if six.PY2: #shlex handles NULLs just fine and shlex in 2.7 tries to encode #as ascii automatiically line = line.encode('utf-8') line = shlex.split(line) - if PY2: + if six.PY2: line = [x.decode('utf-8') for x in line] #EXT_FOLDERNAME is either the first or last depending on where #the URL falls - if urlparse.urlsplit(line[-1])[0]: + if urllib.parse.urlsplit(line[-1])[0]: external = line[0] else: external = line[-1] diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index d6a4542eca..823cf93739 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -9,9 +9,9 @@ from distutils.errors import DistutilsSetupError from distutils.core import Extension from distutils.version import LooseVersion -from setuptools.compat import func_code -from setuptools.compat import func_code +import six + import setuptools.dist import setuptools.depends as dep from setuptools import Feature @@ -54,7 +54,7 @@ def f1(): x = "test" y = z - fc = func_code(f1) + fc = six.get_function_code(f1) # unrecognized name self.assertEqual(dep.extract_constant(fc,'q', -1), None) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index ae2381e355..099e8b19be 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -3,11 +3,10 @@ import sys import time import threading -from setuptools.compat import BaseHTTPRequestHandler -from setuptools.compat import (urllib2, URLError, HTTPServer, - SimpleHTTPRequestHandler) -class IndexServer(HTTPServer): +from six.moves import BaseHTTPServer, SimpleHTTPServer, urllib + +class IndexServer(BaseHTTPServer.HTTPServer): """Basic single-threaded http server simulating a package index You can use this server in unittest like this:: @@ -19,8 +18,9 @@ class IndexServer(HTTPServer): s.stop() """ def __init__(self, server_address=('', 0), - RequestHandlerClass=SimpleHTTPRequestHandler): - HTTPServer.__init__(self, server_address, RequestHandlerClass) + RequestHandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler): + BaseHTTPServer.HTTPServer.__init__(self, server_address, + RequestHandlerClass) self._run = True def serve(self): @@ -44,10 +44,10 @@ def stop(self): url = 'http://127.0.0.1:%(server_port)s/' % vars(self) try: if sys.version_info >= (2, 6): - urllib2.urlopen(url, timeout=5) + urllib.request.urlopen(url, timeout=5) else: - urllib2.urlopen(url) - except URLError: + urllib.request.urlopen(url) + except urllib.error.URLError: # ignore any errors; all that's important is the request pass self.thread.join() @@ -57,19 +57,20 @@ def base_url(self): port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port -class RequestRecorder(BaseHTTPRequestHandler): +class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) self.send_response(200, 'OK') -class MockServer(HTTPServer, threading.Thread): +class MockServer(BaseHTTPServer.HTTPServer, threading.Thread): """ A simple HTTP Server that records the requests made to it. """ def __init__(self, server_address=('', 0), RequestHandlerClass=RequestRecorder): - HTTPServer.__init__(self, server_address, RequestHandlerClass) + BaseHTTPServer.HTTPServer.__init__(self, server_address, + RequestHandlerClass) threading.Thread.__init__(self) self.setDaemon(True) self.requests = [] diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index cf4bcd1179..937e0ed074 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -8,8 +8,9 @@ import tempfile import unittest +import six + from distutils.errors import DistutilsError -from setuptools.compat import StringIO from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -56,7 +57,7 @@ def test_bdist_egg(self): )) os.makedirs(os.path.join('build', 'src')) old_stdout = sys.stdout - sys.stdout = o = StringIO() + sys.stdout = o = six.StringIO() try: dist.parse_command_line() dist.run_commands() @@ -69,4 +70,3 @@ def test_bdist_egg(self): def test_suite(): return unittest.makeSuite(TestDevelopTest) - diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a44309530f..8dfe234e8a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -11,8 +11,11 @@ import tarfile import logging import distutils.core +import io + +import six +from six.moves import urllib -from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import ( easy_install, fix_jython_executable, get_script_args, nt_quote_arg) @@ -261,7 +264,7 @@ def test_setup_requires_honors_fetch_params(self): p_index = setuptools.tests.server.MockServer() p_index.start() netloc = 1 - p_index_loc = urlparse(p_index.url)[netloc] + p_index_loc = urllib.parse.urlparse(p_index.url)[netloc] if p_index_loc.endswith(':0'): # Some platforms (Jython) don't find a port to which to bind, # so skip this test for them. @@ -385,12 +388,7 @@ def make_trivial_sdist(dist_path, setup_py): """ setup_py_file = tarfile.TarInfo(name='setup.py') - try: - # Python 3 (StringIO gets converted to io module) - MemFile = BytesIO - except AttributeError: - MemFile = StringIO - setup_py_bytes = MemFile(setup_py.encode('utf-8')) + setup_py_bytes = io.BytesIO(setup_py.encode('utf-8')) setup_py_file.size = len(setup_py_bytes.getvalue()) dist = tarfile.open(dist_path, 'w:gz') try: @@ -451,8 +449,8 @@ def quiet_context(): old_stdout = sys.stdout old_stderr = sys.stderr - new_stdout = sys.stdout = StringIO() - new_stderr = sys.stderr = StringIO() + new_stdout = sys.stdout = six.StringIO() + new_stderr = sys.stderr = six.StringIO() try: yield new_stdout, new_stderr finally: diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 664566a36c..40ae0af3d1 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -3,9 +3,12 @@ import sys import os import unittest -import pkg_resources -from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url import distutils.errors + +import six +from six.moves import urllib, http_client + +import pkg_resources import setuptools.package_index from setuptools.tests.server import IndexServer @@ -20,7 +23,7 @@ def test_bad_url_bad_port(self): v = sys.exc_info()[1] self.assertTrue(url in str(v)) else: - self.assertTrue(isinstance(v, HTTPError)) + self.assertTrue(isinstance(v, urllib.error.HTTPError)) def test_bad_url_typo(self): # issue 16 @@ -37,7 +40,7 @@ def test_bad_url_typo(self): v = sys.exc_info()[1] self.assertTrue(url in str(v)) else: - self.assertTrue(isinstance(v, HTTPError)) + self.assertTrue(isinstance(v, urllib.error.HTTPError)) def test_bad_url_bad_status_line(self): index = setuptools.package_index.PackageIndex( @@ -45,7 +48,7 @@ def test_bad_url_bad_status_line(self): ) def _urlopen(*args): - raise httplib.BadStatusLine('line') + raise http_client.BadStatusLine('line') index.opener = _urlopen url = 'http://example.com' @@ -71,7 +74,7 @@ def test_bad_url_double_scheme(self): index.open_url(url) except distutils.errors.DistutilsError: error = sys.exc_info()[1] - msg = unicode(error) + msg = six.text_type(error) assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg or 'Name or service not known' in msg return raise RuntimeError("Did not raise") @@ -160,7 +163,7 @@ def test_local_index(self): f.write('
    content
    ') f.close() try: - url = 'file:' + pathname2url(os.getcwd()) + '/' + url = 'file:' + urllib.request.pathname2url(os.getcwd()) + '/' res = setuptools.package_index.local_open(url) finally: os.remove('index.html') diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 443905cc24..2db87efaa0 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -15,7 +15,8 @@ from setuptools.command.easy_install import (get_script_header, is_sh, nt_quote_arg) -from setuptools.compat import StringIO, iteritems, PY3 + +import six try: frozenset @@ -270,7 +271,7 @@ def testRejects(self): def checkSubMap(self, m): self.assertEqual(len(m), len(self.submap_expect)) - for key, ep in iteritems(self.submap_expect): + for key, ep in six.iteritems(self.submap_expect): self.assertEqual(repr(m.get(key)), repr(ep)) submap_expect = dict( @@ -522,7 +523,7 @@ def test_get_script_header(self): def test_get_script_header_jython_workaround(self): # This test doesn't work with Python 3 in some locales - if PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): + if six.PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): return class java: @@ -545,12 +546,12 @@ def getProperty(property): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = sys.stderr = StringIO() + sys.stdout = sys.stderr = six.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = sys.stderr = StringIO() + sys.stdout = sys.stderr = six.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 5b3862e998..c78e5b0f68 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -10,10 +10,11 @@ import unicodedata import re import contextlib + +import six + from setuptools.tests import environment, test_svn from setuptools.tests.py26compat import skipIf - -from setuptools.compat import StringIO, unicode, PY3, PY2 from setuptools.command.sdist import sdist, walk_revctrl from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -34,7 +35,7 @@ """ % SETUP_ATTRS -if PY3: +if six.PY3: LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1') else: LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' @@ -44,7 +45,7 @@ @contextlib.contextmanager def quiet(): old_stdout, old_stderr = sys.stdout, sys.stderr - sys.stdout, sys.stderr = StringIO(), StringIO() + sys.stdout, sys.stderr = six.StringIO(), six.StringIO() try: yield finally: @@ -53,14 +54,14 @@ def quiet(): # Fake byte literals for Python <= 2.5 def b(s, encoding='utf-8'): - if PY3: + if six.PY3: return s.encode(encoding) return s # Convert to POSIX path def posix(path): - if PY3 and not isinstance(path, str): + if six.PY3 and not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b('/')) else: return path.replace(os.sep, '/') @@ -68,7 +69,7 @@ def posix(path): # HFS Plus uses decomposed UTF-8 def decompose(path): - if isinstance(path, unicode): + if isinstance(path, six.text_type): return unicodedata.normalize('NFD', path) try: path = path.decode('utf-8') @@ -153,14 +154,14 @@ def test_manifest_is_written_with_utf8_encoding(self): self.fail(e) # The manifest should contain the UTF-8 filename - if PY2: + if six.PY2: fs_enc = sys.getfilesystemencoding() filename = filename.decode(fs_enc) self.assertTrue(posix(filename) in u_contents) # Python 3 only - if PY3: + if six.PY3: def test_write_manifest_allows_utf8_filenames(self): # Test for #303. @@ -269,12 +270,12 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.read_manifest() # The filelist should contain the UTF-8 filename - if PY3: + if six.PY3: filename = filename.decode('utf-8') self.assertTrue(filename in cmd.filelist.files) # Python 3 only - if PY3: + if six.PY3: def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. @@ -310,7 +311,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) - @skipIf(PY3 and locale.getpreferredencoding() != 'UTF-8', + @skipIf(six.PY3 and locale.getpreferredencoding() != 'UTF-8', 'Unittest fails if locale is not utf-8 but the manifests is recorded correctly') def test_sdist_with_utf8_encoded_filename(self): # Test for #303. @@ -329,7 +330,7 @@ def test_sdist_with_utf8_encoded_filename(self): if sys.platform == 'darwin': filename = decompose(filename) - if PY3: + if six.PY3: fs_enc = sys.getfilesystemencoding() if sys.platform == 'win32': @@ -361,7 +362,7 @@ def test_sdist_with_latin1_encoded_filename(self): with quiet(): cmd.run() - if PY3: + if six.PY3: # not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': # Latin-1 is similar to Windows-1252 however diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index 3340036210..0e6c3e9520 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -6,9 +6,10 @@ import subprocess import sys import unittest -from setuptools.tests import environment -from setuptools.compat import unicode, unichr +import six + +from setuptools.tests import environment from setuptools import svn_utils from setuptools.tests.py26compat import skipIf @@ -119,13 +120,13 @@ def parse_tester(self, svn_name, ext_spaces): os.sep.join((example_base, folder3)), # folder is third_party大介 os.sep.join((example_base, - unicode('third_party') + - unichr(0x5927) + unichr(0x4ecb))), + six.text_type('third_party') + + six.unichr(0x5927) + six.unichr(0x4ecb))), os.sep.join((example_base, 'folder', folder2)), os.sep.join((example_base, 'folder', folder3)), os.sep.join((example_base, 'folder', - unicode('third_party') + - unichr(0x5927) + unichr(0x4ecb))), + six.text_type('third_party') + + six.unichr(0x5927) + six.unichr(0x4ecb))), ]) expected = set(os.path.normpath(x) for x in expected) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index df92085e5d..67df14e58e 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -8,9 +8,10 @@ import sys import tempfile import unittest - from distutils.errors import DistutilsError -from setuptools.compat import StringIO, PY2 + +import six + from setuptools.command.test import test from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -34,7 +35,7 @@ __path__ = extend_path(__path__, __name__) """ # Make sure this is Latin-1 binary, before writing: -if PY2: +if six.PY2: NS_INIT = NS_INIT.decode('UTF-8') NS_INIT = NS_INIT.encode('Latin-1') @@ -115,7 +116,7 @@ def test_test(self): cmd.install_dir = site.USER_SITE cmd.user = 1 old_stdout = sys.stdout - sys.stdout = StringIO() + sys.stdout = six.StringIO() try: try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements. cmd.run() diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index d2de941a69..f028589efb 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,11 +1,11 @@ import unicodedata import sys -from setuptools.compat import unicode as decoded_string +import six # HFS Plus uses decomposed UTF-8 def decompose(path): - if isinstance(path, decoded_string): + if isinstance(path, six.text_type): return unicodedata.normalize('NFD', path) try: path = path.decode('utf-8') @@ -23,7 +23,7 @@ def filesys_decode(path): """ fs_enc = sys.getfilesystemencoding() - if isinstance(path, decoded_string): + if isinstance(path, six.text_type): return path for enc in (fs_enc, "utf-8"): diff --git a/tests/manual_test.py b/tests/manual_test.py index e6489b1ced..af4ec09bea 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -7,7 +7,8 @@ import subprocess from distutils.command.install import INSTALL_SCHEMES from string import Template -from setuptools.compat import urlopen + +from six.moves import urllib def _system_call(*args): assert subprocess.call(args) == 0 @@ -76,7 +77,7 @@ def test_full(): f.write(SIMPLE_BUILDOUT) with open('bootstrap.py', 'w') as f: - f.write(urlopen(BOOTSTRAP).read()) + f.write(urllib.request.urlopen(BOOTSTRAP).read()) _system_call('bin/python', 'bootstrap.py') _system_call('bin/buildout', '-q') From 26d4bb13598407c64ab1a77a33716411c5fbad3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 20:31:39 -0400 Subject: [PATCH 4261/8469] Remove doctests module. It is now part of Python. --- setuptools/command/test.py | 3 +- setuptools/tests/__init__.py | 3 +- setuptools/tests/doctest.py | 2685 ---------------------------------- 3 files changed, 2 insertions(+), 2689 deletions(-) delete mode 100644 setuptools/tests/doctest.py diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 18e90ffc0d..1038da71af 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -20,8 +20,7 @@ def loadTestsFromModule(self, module): the return value to the tests. """ tests = [] - if module.__name__ != 'setuptools.tests.doctest': # ugh - tests.append(TestLoader.loadTestsFromModule(self, module)) + tests.append(TestLoader.loadTestsFromModule(self, module)) if hasattr(module, "additional_tests"): tests.append(module.additional_tests()) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index b5328ce67a..d6a4542eca 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -2,7 +2,7 @@ import sys import os import unittest -from setuptools.tests import doctest +import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError @@ -18,7 +18,6 @@ from setuptools.depends import Require def additional_tests(): - import doctest, unittest suite = unittest.TestSuite(( doctest.DocFileSuite( os.path.join('tests', 'api_tests.txt'), diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py deleted file mode 100644 index 75a1ff546e..0000000000 --- a/setuptools/tests/doctest.py +++ /dev/null @@ -1,2685 +0,0 @@ -# Module doctest. -# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). -# Major enhancements and refactoring by: -# Jim Fulton -# Edward Loper - -# Provided as-is; use at your own risk; no warranty; no promises; enjoy! - -try: - basestring -except NameError: - basestring = str - -try: - enumerate -except NameError: - def enumerate(seq): - return zip(range(len(seq)),seq) - -r"""Module doctest -- a framework for running examples in docstrings. - -In simplest use, end each module M to be tested with: - -def _test(): - import doctest - doctest.testmod() - -if __name__ == "__main__": - _test() - -Then running the module as a script will cause the examples in the -docstrings to get executed and verified: - -python M.py - -This won't display anything unless an example fails, in which case the -failing example(s) and the cause(s) of the failure(s) are printed to stdout -(why not stderr? because stderr is a lame hack <0.2 wink>), and the final -line of output is "Test failed.". - -Run it with the -v switch instead: - -python M.py -v - -and a detailed report of all examples tried is printed to stdout, along -with assorted summaries at the end. - -You can force verbose mode by passing "verbose=True" to testmod, or prohibit -it by passing "verbose=False". In either of those cases, sys.argv is not -examined by testmod. - -There are a variety of other ways to run doctests, including integration -with the unittest framework, and support for running non-Python text -files containing doctests. There are also many ways to override parts -of doctest's default behaviors. See the Library Reference Manual for -details. -""" - -__docformat__ = 'reStructuredText en' - -__all__ = [ - # 0, Option Flags - 'register_optionflag', - 'DONT_ACCEPT_TRUE_FOR_1', - 'DONT_ACCEPT_BLANKLINE', - 'NORMALIZE_WHITESPACE', - 'ELLIPSIS', - 'IGNORE_EXCEPTION_DETAIL', - 'COMPARISON_FLAGS', - 'REPORT_UDIFF', - 'REPORT_CDIFF', - 'REPORT_NDIFF', - 'REPORT_ONLY_FIRST_FAILURE', - 'REPORTING_FLAGS', - # 1. Utility Functions - 'is_private', - # 2. Example & DocTest - 'Example', - 'DocTest', - # 3. Doctest Parser - 'DocTestParser', - # 4. Doctest Finder - 'DocTestFinder', - # 5. Doctest Runner - 'DocTestRunner', - 'OutputChecker', - 'DocTestFailure', - 'UnexpectedException', - 'DebugRunner', - # 6. Test Functions - 'testmod', - 'testfile', - 'run_docstring_examples', - # 7. Tester - 'Tester', - # 8. Unittest Support - 'DocTestSuite', - 'DocFileSuite', - 'set_unittest_reportflags', - # 9. Debugging Support - 'script_from_examples', - 'testsource', - 'debug_src', - 'debug', -] - -import __future__ - -import sys, traceback, inspect, linecache, os, re, types -import unittest, difflib, pdb, tempfile -import warnings -from setuptools.compat import StringIO, func_code, im_func -from setuptools import sandbox - -# Don't whine about the deprecated is_private function in this -# module's tests. -warnings.filterwarnings("ignore", "is_private", DeprecationWarning, - __name__, 0) - -# There are 4 basic classes: -# - Example: a pair, plus an intra-docstring line number. -# - DocTest: a collection of examples, parsed from a docstring, plus -# info about where the docstring came from (name, filename, lineno). -# - DocTestFinder: extracts DocTests from a given object's docstring and -# its contained objects' docstrings. -# - DocTestRunner: runs DocTest cases, and accumulates statistics. -# -# So the basic picture is: -# -# list of: -# +------+ +---------+ +-------+ -# |object| --DocTestFinder-> | DocTest | --DocTestRunner-> |results| -# +------+ +---------+ +-------+ -# | Example | -# | ... | -# | Example | -# +---------+ - -# Option constants. - -OPTIONFLAGS_BY_NAME = {} -def register_optionflag(name): - flag = 1 << len(OPTIONFLAGS_BY_NAME) - OPTIONFLAGS_BY_NAME[name] = flag - return flag - -DONT_ACCEPT_TRUE_FOR_1 = register_optionflag('DONT_ACCEPT_TRUE_FOR_1') -DONT_ACCEPT_BLANKLINE = register_optionflag('DONT_ACCEPT_BLANKLINE') -NORMALIZE_WHITESPACE = register_optionflag('NORMALIZE_WHITESPACE') -ELLIPSIS = register_optionflag('ELLIPSIS') -IGNORE_EXCEPTION_DETAIL = register_optionflag('IGNORE_EXCEPTION_DETAIL') - -COMPARISON_FLAGS = (DONT_ACCEPT_TRUE_FOR_1 | - DONT_ACCEPT_BLANKLINE | - NORMALIZE_WHITESPACE | - ELLIPSIS | - IGNORE_EXCEPTION_DETAIL) - -REPORT_UDIFF = register_optionflag('REPORT_UDIFF') -REPORT_CDIFF = register_optionflag('REPORT_CDIFF') -REPORT_NDIFF = register_optionflag('REPORT_NDIFF') -REPORT_ONLY_FIRST_FAILURE = register_optionflag('REPORT_ONLY_FIRST_FAILURE') - -REPORTING_FLAGS = (REPORT_UDIFF | - REPORT_CDIFF | - REPORT_NDIFF | - REPORT_ONLY_FIRST_FAILURE) - -# Special string markers for use in `want` strings: -BLANKLINE_MARKER = '' -ELLIPSIS_MARKER = '...' - -###################################################################### -## Table of Contents -###################################################################### -# 1. Utility Functions -# 2. Example & DocTest -- store test cases -# 3. DocTest Parser -- extracts examples from strings -# 4. DocTest Finder -- extracts test cases from objects -# 5. DocTest Runner -- runs test cases -# 6. Test Functions -- convenient wrappers for testing -# 7. Tester Class -- for backwards compatibility -# 8. Unittest Support -# 9. Debugging Support -# 10. Example Usage - -###################################################################### -## 1. Utility Functions -###################################################################### - -def is_private(prefix, base): - """prefix, base -> true iff name prefix + "." + base is "private". - - Prefix may be an empty string, and base does not contain a period. - Prefix is ignored (although functions you write conforming to this - protocol may make use of it). - Return true iff base begins with an (at least one) underscore, but - does not both begin and end with (at least) two underscores. - - >>> is_private("a.b", "my_func") - False - >>> is_private("____", "_my_func") - True - >>> is_private("someclass", "__init__") - False - >>> is_private("sometypo", "__init_") - True - >>> is_private("x.y.z", "_") - True - >>> is_private("_x.y.z", "__") - False - >>> is_private("", "") # senseless but consistent - False - """ - warnings.warn("is_private is deprecated; it wasn't useful; " - "examine DocTestFinder.find() lists instead", - DeprecationWarning, stacklevel=2) - return base[:1] == "_" and not base[:2] == "__" == base[-2:] - -def _extract_future_flags(globs): - """ - Return the compiler-flags associated with the future features that - have been imported into the given namespace (globs). - """ - flags = 0 - for fname in __future__.all_feature_names: - feature = globs.get(fname, None) - if feature is getattr(__future__, fname): - flags |= feature.compiler_flag - return flags - -def _normalize_module(module, depth=2): - """ - Return the module specified by `module`. In particular: - - If `module` is a module, then return module. - - If `module` is a string, then import and return the - module with that name. - - If `module` is None, then return the calling module. - The calling module is assumed to be the module of - the stack frame at the given depth in the call stack. - """ - if inspect.ismodule(module): - return module - elif isinstance(module, basestring): - return __import__(module, globals(), locals(), ["*"]) - elif module is None: - return sys.modules[sys._getframe(depth).f_globals['__name__']] - else: - raise TypeError("Expected a module, string, or None") - -def _indent(s, indent=4): - """ - Add the given number of space characters to the beginning every - non-blank line in `s`, and return the result. - """ - # This regexp matches the start of non-blank lines: - return re.sub('(?m)^(?!$)', indent*' ', s) - -def _exception_traceback(exc_info): - """ - Return a string containing a traceback message for the given - exc_info tuple (as returned by sys.exc_info()). - """ - # Get a traceback message. - excout = StringIO() - exc_type, exc_val, exc_tb = exc_info - traceback.print_exception(exc_type, exc_val, exc_tb, file=excout) - return excout.getvalue() - -# Override some StringIO methods. -class _SpoofOut(StringIO): - def getvalue(self): - result = StringIO.getvalue(self) - # If anything at all was written, make sure there's a trailing - # newline. There's no way for the expected output to indicate - # that a trailing newline is missing. - if result and not result.endswith("\n"): - result += "\n" - # Prevent softspace from screwing up the next test case, in - # case they used print with a trailing comma in an example. - if hasattr(self, "softspace"): - del self.softspace - return result - - def truncate(self, size=None): - StringIO.truncate(self, size) - if hasattr(self, "softspace"): - del self.softspace - -# Worst-case linear-time ellipsis matching. -def _ellipsis_match(want, got): - """ - Essentially the only subtle case: - >>> _ellipsis_match('aa...aa', 'aaa') - False - """ - if want.find(ELLIPSIS_MARKER)==-1: - return want == got - - # Find "the real" strings. - ws = want.split(ELLIPSIS_MARKER) - assert len(ws) >= 2 - - # Deal with exact matches possibly needed at one or both ends. - startpos, endpos = 0, len(got) - w = ws[0] - if w: # starts with exact match - if got.startswith(w): - startpos = len(w) - del ws[0] - else: - return False - w = ws[-1] - if w: # ends with exact match - if got.endswith(w): - endpos -= len(w) - del ws[-1] - else: - return False - - if startpos > endpos: - # Exact end matches required more characters than we have, as in - # _ellipsis_match('aa...aa', 'aaa') - return False - - # For the rest, we only need to find the leftmost non-overlapping - # match for each piece. If there's no overall match that way alone, - # there's no overall match period. - for w in ws: - # w may be '' at times, if there are consecutive ellipses, or - # due to an ellipsis at the start or end of `want`. That's OK. - # Search for an empty string succeeds, and doesn't change startpos. - startpos = got.find(w, startpos, endpos) - if startpos < 0: - return False - startpos += len(w) - - return True - -def _comment_line(line): - "Return a commented form of the given line" - line = line.rstrip() - if line: - return '# '+line - else: - return '#' - -class _OutputRedirectingPdb(pdb.Pdb): - """ - A specialized version of the python debugger that redirects stdout - to a given stream when interacting with the user. Stdout is *not* - redirected when traced code is executed. - """ - def __init__(self, out): - self.__out = out - pdb.Pdb.__init__(self) - - def trace_dispatch(self, *args): - # Redirect stdout to the given stream. - save_stdout = sys.stdout - sys.stdout = self.__out - # Call Pdb's trace dispatch method. - try: - return pdb.Pdb.trace_dispatch(self, *args) - finally: - sys.stdout = save_stdout - -# [XX] Normalize with respect to os.path.pardir? -def _module_relative_path(module, path): - if not inspect.ismodule(module): - raise TypeError('Expected a module: %r' % module) - if path.startswith('/'): - raise ValueError('Module-relative files may not have absolute paths') - - # Find the base directory for the path. - if hasattr(module, '__file__'): - # A normal module/package - basedir = os.path.split(module.__file__)[0] - elif module.__name__ == '__main__': - # An interactive session. - if len(sys.argv)>0 and sys.argv[0] != '': - basedir = os.path.split(sys.argv[0])[0] - else: - basedir = os.curdir - else: - # A module w/o __file__ (this includes builtins) - raise ValueError("Can't resolve paths relative to the module " + - module + " (it has no __file__)") - - # Combine the base directory and the path. - return os.path.join(basedir, *(path.split('/'))) - -###################################################################### -## 2. Example & DocTest -###################################################################### -## - An "example" is a pair, where "source" is a -## fragment of source code, and "want" is the expected output for -## "source." The Example class also includes information about -## where the example was extracted from. -## -## - A "doctest" is a collection of examples, typically extracted from -## a string (such as an object's docstring). The DocTest class also -## includes information about where the string was extracted from. - -class Example: - """ - A single doctest example, consisting of source code and expected - output. `Example` defines the following attributes: - - - source: A single Python statement, always ending with a newline. - The constructor adds a newline if needed. - - - want: The expected output from running the source code (either - from stdout, or a traceback in case of exception). `want` ends - with a newline unless it's empty, in which case it's an empty - string. The constructor adds a newline if needed. - - - exc_msg: The exception message generated by the example, if - the example is expected to generate an exception; or `None` if - it is not expected to generate an exception. This exception - message is compared against the return value of - `traceback.format_exception_only()`. `exc_msg` ends with a - newline unless it's `None`. The constructor adds a newline - if needed. - - - lineno: The line number within the DocTest string containing - this Example where the Example begins. This line number is - zero-based, with respect to the beginning of the DocTest. - - - indent: The example's indentation in the DocTest string. - I.e., the number of space characters that preceed the - example's first prompt. - - - options: A dictionary mapping from option flags to True or - False, which is used to override default options for this - example. Any option flags not contained in this dictionary - are left at their default value (as specified by the - DocTestRunner's optionflags). By default, no options are set. - """ - def __init__(self, source, want, exc_msg=None, lineno=0, indent=0, - options=None): - # Normalize inputs. - if not source.endswith('\n'): - source += '\n' - if want and not want.endswith('\n'): - want += '\n' - if exc_msg is not None and not exc_msg.endswith('\n'): - exc_msg += '\n' - # Store properties. - self.source = source - self.want = want - self.lineno = lineno - self.indent = indent - if options is None: options = {} - self.options = options - self.exc_msg = exc_msg - -class DocTest: - """ - A collection of doctest examples that should be run in a single - namespace. Each `DocTest` defines the following attributes: - - - examples: the list of examples. - - - globs: The namespace (aka globals) that the examples should - be run in. - - - name: A name identifying the DocTest (typically, the name of - the object whose docstring this DocTest was extracted from). - - - filename: The name of the file that this DocTest was extracted - from, or `None` if the filename is unknown. - - - lineno: The line number within filename where this DocTest - begins, or `None` if the line number is unavailable. This - line number is zero-based, with respect to the beginning of - the file. - - - docstring: The string that the examples were extracted from, - or `None` if the string is unavailable. - """ - def __init__(self, examples, globs, name, filename, lineno, docstring): - """ - Create a new DocTest containing the given examples. The - DocTest's globals are initialized with a copy of `globs`. - """ - assert not isinstance(examples, basestring), \ - "DocTest no longer accepts str; use DocTestParser instead" - self.examples = examples - self.docstring = docstring - self.globs = globs.copy() - self.name = name - self.filename = filename - self.lineno = lineno - - def __repr__(self): - if len(self.examples) == 0: - examples = 'no examples' - elif len(self.examples) == 1: - examples = '1 example' - else: - examples = '%d examples' % len(self.examples) - return ('' % - (self.name, self.filename, self.lineno, examples)) - - - # This lets us sort tests by name: - def __cmp__(self, other): - if not isinstance(other, DocTest): - return -1 - return cmp((self.name, self.filename, self.lineno, id(self)), - (other.name, other.filename, other.lineno, id(other))) - -###################################################################### -## 3. DocTestParser -###################################################################### - -class DocTestParser: - """ - A class used to parse strings containing doctest examples. - """ - # This regular expression is used to find doctest examples in a - # string. It defines three groups: `source` is the source code - # (including leading indentation and prompts); `indent` is the - # indentation of the first (PS1) line of the source code; and - # `want` is the expected output (including leading indentation). - _EXAMPLE_RE = re.compile(r''' - # Source consists of a PS1 line followed by zero or more PS2 lines. - (?P - (?:^(?P [ ]*) >>> .*) # PS1 line - (?:\n [ ]* \.\.\. .*)*) # PS2 lines - \n? - # Want consists of any non-blank lines that do not start with PS1. - (?P (?:(?![ ]*$) # Not a blank line - (?![ ]*>>>) # Not a line starting with PS1 - .*$\n? # But any other line - )*) - ''', re.MULTILINE | re.VERBOSE) - - # A regular expression for handling `want` strings that contain - # expected exceptions. It divides `want` into three pieces: - # - the traceback header line (`hdr`) - # - the traceback stack (`stack`) - # - the exception message (`msg`), as generated by - # traceback.format_exception_only() - # `msg` may have multiple lines. We assume/require that the - # exception message is the first non-indented line starting with a word - # character following the traceback header line. - _EXCEPTION_RE = re.compile(r""" - # Grab the traceback header. Different versions of Python have - # said different things on the first traceback line. - ^(?P Traceback\ \( - (?: most\ recent\ call\ last - | innermost\ last - ) \) : - ) - \s* $ # toss trailing whitespace on the header. - (?P .*?) # don't blink: absorb stuff until... - ^ (?P \w+ .*) # a line *starts* with alphanum. - """, re.VERBOSE | re.MULTILINE | re.DOTALL) - - # A callable returning a true value iff its argument is a blank line - # or contains a single comment. - _IS_BLANK_OR_COMMENT = re.compile(r'^[ ]*(#.*)?$').match - - def parse(self, string, name=''): - """ - Divide the given string into examples and intervening text, - and return them as a list of alternating Examples and strings. - Line numbers for the Examples are 0-based. The optional - argument `name` is a name identifying this string, and is only - used for error messages. - """ - string = string.expandtabs() - # If all lines begin with the same indentation, then strip it. - min_indent = self._min_indent(string) - if min_indent > 0: - string = '\n'.join([l[min_indent:] for l in string.split('\n')]) - - output = [] - charno, lineno = 0, 0 - # Find all doctest examples in the string: - for m in self._EXAMPLE_RE.finditer(string): - # Add the pre-example text to `output`. - output.append(string[charno:m.start()]) - # Update lineno (lines before this example) - lineno += string.count('\n', charno, m.start()) - # Extract info from the regexp match. - (source, options, want, exc_msg) = \ - self._parse_example(m, name, lineno) - # Create an Example, and add it to the list. - if not self._IS_BLANK_OR_COMMENT(source): - output.append( Example(source, want, exc_msg, - lineno=lineno, - indent=min_indent+len(m.group('indent')), - options=options) ) - # Update lineno (lines inside this example) - lineno += string.count('\n', m.start(), m.end()) - # Update charno. - charno = m.end() - # Add any remaining post-example text to `output`. - output.append(string[charno:]) - return output - - def get_doctest(self, string, globs, name, filename, lineno): - """ - Extract all doctest examples from the given string, and - collect them into a `DocTest` object. - - `globs`, `name`, `filename`, and `lineno` are attributes for - the new `DocTest` object. See the documentation for `DocTest` - for more information. - """ - return DocTest(self.get_examples(string, name), globs, - name, filename, lineno, string) - - def get_examples(self, string, name=''): - """ - Extract all doctest examples from the given string, and return - them as a list of `Example` objects. Line numbers are - 0-based, because it's most common in doctests that nothing - interesting appears on the same line as opening triple-quote, - and so the first interesting line is called \"line 1\" then. - - The optional argument `name` is a name identifying this - string, and is only used for error messages. - """ - return [x for x in self.parse(string, name) - if isinstance(x, Example)] - - def _parse_example(self, m, name, lineno): - """ - Given a regular expression match from `_EXAMPLE_RE` (`m`), - return a pair `(source, want)`, where `source` is the matched - example's source code (with prompts and indentation stripped); - and `want` is the example's expected output (with indentation - stripped). - - `name` is the string's name, and `lineno` is the line number - where the example starts; both are used for error messages. - """ - # Get the example's indentation level. - indent = len(m.group('indent')) - - # Divide source into lines; check that they're properly - # indented; and then strip their indentation & prompts. - source_lines = m.group('source').split('\n') - self._check_prompt_blank(source_lines, indent, name, lineno) - self._check_prefix(source_lines[1:], ' '*indent + '.', name, lineno) - source = '\n'.join([sl[indent+4:] for sl in source_lines]) - - # Divide want into lines; check that it's properly indented; and - # then strip the indentation. Spaces before the last newline should - # be preserved, so plain rstrip() isn't good enough. - want = m.group('want') - want_lines = want.split('\n') - if len(want_lines) > 1 and re.match(r' *$', want_lines[-1]): - del want_lines[-1] # forget final newline & spaces after it - self._check_prefix(want_lines, ' '*indent, name, - lineno + len(source_lines)) - want = '\n'.join([wl[indent:] for wl in want_lines]) - - # If `want` contains a traceback message, then extract it. - m = self._EXCEPTION_RE.match(want) - if m: - exc_msg = m.group('msg') - else: - exc_msg = None - - # Extract options from the source. - options = self._find_options(source, name, lineno) - - return source, options, want, exc_msg - - # This regular expression looks for option directives in the - # source code of an example. Option directives are comments - # starting with "doctest:". Warning: this may give false - # positives for string-literals that contain the string - # "#doctest:". Eliminating these false positives would require - # actually parsing the string; but we limit them by ignoring any - # line containing "#doctest:" that is *followed* by a quote mark. - _OPTION_DIRECTIVE_RE = re.compile(r'#\s*doctest:\s*([^\n\'"]*)$', - re.MULTILINE) - - def _find_options(self, source, name, lineno): - """ - Return a dictionary containing option overrides extracted from - option directives in the given source string. - - `name` is the string's name, and `lineno` is the line number - where the example starts; both are used for error messages. - """ - options = {} - # (note: with the current regexp, this will match at most once:) - for m in self._OPTION_DIRECTIVE_RE.finditer(source): - option_strings = m.group(1).replace(',', ' ').split() - for option in option_strings: - if (option[0] not in '+-' or - option[1:] not in OPTIONFLAGS_BY_NAME): - raise ValueError('line %r of the doctest for %s ' - 'has an invalid option: %r' % - (lineno+1, name, option)) - flag = OPTIONFLAGS_BY_NAME[option[1:]] - options[flag] = (option[0] == '+') - if options and self._IS_BLANK_OR_COMMENT(source): - raise ValueError('line %r of the doctest for %s has an option ' - 'directive on a line with no example: %r' % - (lineno, name, source)) - return options - - # This regular expression finds the indentation of every non-blank - # line in a string. - _INDENT_RE = re.compile('^([ ]*)(?=\S)', re.MULTILINE) - - def _min_indent(self, s): - "Return the minimum indentation of any non-blank line in `s`" - indents = [len(indent) for indent in self._INDENT_RE.findall(s)] - if len(indents) > 0: - return min(indents) - else: - return 0 - - def _check_prompt_blank(self, lines, indent, name, lineno): - """ - Given the lines of a source string (including prompts and - leading indentation), check to make sure that every prompt is - followed by a space character. If any line is not followed by - a space character, then raise ValueError. - """ - for i, line in enumerate(lines): - if len(line) >= indent+4 and line[indent+3] != ' ': - raise ValueError('line %r of the docstring for %s ' - 'lacks blank after %s: %r' % - (lineno+i+1, name, - line[indent:indent+3], line)) - - def _check_prefix(self, lines, prefix, name, lineno): - """ - Check that every line in the given list starts with the given - prefix; if any line does not, then raise a ValueError. - """ - for i, line in enumerate(lines): - if line and not line.startswith(prefix): - raise ValueError('line %r of the docstring for %s has ' - 'inconsistent leading whitespace: %r' % - (lineno+i+1, name, line)) - - -###################################################################### -## 4. DocTest Finder -###################################################################### - -class DocTestFinder: - """ - A class used to extract the DocTests that are relevant to a given - object, from its docstring and the docstrings of its contained - objects. Doctests can currently be extracted from the following - object types: modules, functions, classes, methods, staticmethods, - classmethods, and properties. - """ - - def __init__(self, verbose=False, parser=DocTestParser(), - recurse=True, _namefilter=None, exclude_empty=True): - """ - Create a new doctest finder. - - The optional argument `parser` specifies a class or - function that should be used to create new DocTest objects (or - objects that implement the same interface as DocTest). The - signature for this factory function should match the signature - of the DocTest constructor. - - If the optional argument `recurse` is false, then `find` will - only examine the given object, and not any contained objects. - - If the optional argument `exclude_empty` is false, then `find` - will include tests for objects with empty docstrings. - """ - self._parser = parser - self._verbose = verbose - self._recurse = recurse - self._exclude_empty = exclude_empty - # _namefilter is undocumented, and exists only for temporary backward- - # compatibility support of testmod's deprecated isprivate mess. - self._namefilter = _namefilter - - def find(self, obj, name=None, module=None, globs=None, - extraglobs=None): - """ - Return a list of the DocTests that are defined by the given - object's docstring, or by any of its contained objects' - docstrings. - - The optional parameter `module` is the module that contains - the given object. If the module is not specified or is None, then - the test finder will attempt to automatically determine the - correct module. The object's module is used: - - - As a default namespace, if `globs` is not specified. - - To prevent the DocTestFinder from extracting DocTests - from objects that are imported from other modules. - - To find the name of the file containing the object. - - To help find the line number of the object within its - file. - - Contained objects whose module does not match `module` are ignored. - - If `module` is False, no attempt to find the module will be made. - This is obscure, of use mostly in tests: if `module` is False, or - is None but cannot be found automatically, then all objects are - considered to belong to the (non-existent) module, so all contained - objects will (recursively) be searched for doctests. - - The globals for each DocTest is formed by combining `globs` - and `extraglobs` (bindings in `extraglobs` override bindings - in `globs`). A new copy of the globals dictionary is created - for each DocTest. If `globs` is not specified, then it - defaults to the module's `__dict__`, if specified, or {} - otherwise. If `extraglobs` is not specified, then it defaults - to {}. - - """ - # If name was not specified, then extract it from the object. - if name is None: - name = getattr(obj, '__name__', None) - if name is None: - raise ValueError("DocTestFinder.find: name must be given " - "when obj.__name__ doesn't exist: %r" % - (type(obj),)) - - # Find the module that contains the given object (if obj is - # a module, then module=obj.). Note: this may fail, in which - # case module will be None. - if module is False: - module = None - elif module is None: - module = inspect.getmodule(obj) - - # Read the module's source code. This is used by - # DocTestFinder._find_lineno to find the line number for a - # given object's docstring. - try: - file = inspect.getsourcefile(obj) or inspect.getfile(obj) - source_lines = linecache.getlines(file) - if not source_lines: - source_lines = None - except TypeError: - source_lines = None - - # Initialize globals, and merge in extraglobs. - if globs is None: - if module is None: - globs = {} - else: - globs = module.__dict__.copy() - else: - globs = globs.copy() - if extraglobs is not None: - globs.update(extraglobs) - - # Recursively expore `obj`, extracting DocTests. - tests = [] - self._find(tests, obj, name, module, source_lines, globs, {}) - return tests - - def _filter(self, obj, prefix, base): - """ - Return true if the given object should not be examined. - """ - return (self._namefilter is not None and - self._namefilter(prefix, base)) - - def _from_module(self, module, object): - """ - Return true if the given object is defined in the given - module. - """ - if module is None: - return True - elif inspect.isfunction(object): - return module.__dict__ is func_globals(object) - elif inspect.isclass(object): - return module.__name__ == object.__module__ - elif inspect.getmodule(object) is not None: - return module is inspect.getmodule(object) - elif hasattr(object, '__module__'): - return module.__name__ == object.__module__ - elif isinstance(object, property): - return True # [XX] no way not be sure. - else: - raise ValueError("object must be a class or function") - - def _find(self, tests, obj, name, module, source_lines, globs, seen): - """ - Find tests for the given object and any contained objects, and - add them to `tests`. - """ - if self._verbose: - print('Finding tests in %s' % name) - - # If we've already processed this object, then ignore it. - if id(obj) in seen: - return - seen[id(obj)] = 1 - - # Find a test for this object, and add it to the list of tests. - test = self._get_test(obj, name, module, globs, source_lines) - if test is not None: - tests.append(test) - - # Look for tests in a module's contained objects. - if inspect.ismodule(obj) and self._recurse: - for valname, val in obj.__dict__.items(): - # Check if this contained object should be ignored. - if self._filter(val, name, valname): - continue - valname = '%s.%s' % (name, valname) - # Recurse to functions & classes. - if ((inspect.isfunction(val) or inspect.isclass(val)) and - self._from_module(module, val)): - self._find(tests, val, valname, module, source_lines, - globs, seen) - - # Look for tests in a module's __test__ dictionary. - if inspect.ismodule(obj) and self._recurse: - for valname, val in getattr(obj, '__test__', {}).items(): - if not isinstance(valname, basestring): - raise ValueError("DocTestFinder.find: __test__ keys " - "must be strings: %r" % - (type(valname),)) - if not (inspect.isfunction(val) or inspect.isclass(val) or - inspect.ismethod(val) or inspect.ismodule(val) or - isinstance(val, basestring)): - raise ValueError("DocTestFinder.find: __test__ values " - "must be strings, functions, methods, " - "classes, or modules: %r" % - (type(val),)) - valname = '%s.__test__.%s' % (name, valname) - self._find(tests, val, valname, module, source_lines, - globs, seen) - - # Look for tests in a class's contained objects. - if inspect.isclass(obj) and self._recurse: - for valname, val in obj.__dict__.items(): - # Check if this contained object should be ignored. - if self._filter(val, name, valname): - continue - # Special handling for staticmethod/classmethod. - if isinstance(val, staticmethod): - val = getattr(obj, valname) - if isinstance(val, classmethod): - val = im_func(getattr(obj, valname)) - - # Recurse to methods, properties, and nested classes. - if ((inspect.isfunction(val) or inspect.isclass(val) or - isinstance(val, property)) and - self._from_module(module, val)): - valname = '%s.%s' % (name, valname) - self._find(tests, val, valname, module, source_lines, - globs, seen) - - def _get_test(self, obj, name, module, globs, source_lines): - """ - Return a DocTest for the given object, if it defines a docstring; - otherwise, return None. - """ - # Extract the object's docstring. If it doesn't have one, - # then return None (no test for this object). - if isinstance(obj, basestring): - docstring = obj - else: - try: - if obj.__doc__ is None: - docstring = '' - else: - docstring = obj.__doc__ - if not isinstance(docstring, basestring): - docstring = str(docstring) - except (TypeError, AttributeError): - docstring = '' - - # Find the docstring's location in the file. - lineno = self._find_lineno(obj, source_lines) - - # Don't bother if the docstring is empty. - if self._exclude_empty and not docstring: - return None - - # Return a DocTest for this object. - if module is None: - filename = None - else: - filename = getattr(module, '__file__', module.__name__) - if filename[-4:] in (".pyc", ".pyo"): - filename = filename[:-1] - return self._parser.get_doctest(docstring, globs, name, - filename, lineno) - - def _find_lineno(self, obj, source_lines): - """ - Return a line number of the given object's docstring. Note: - this method assumes that the object has a docstring. - """ - lineno = None - - # Find the line number for modules. - if inspect.ismodule(obj): - lineno = 0 - - # Find the line number for classes. - # Note: this could be fooled if a class is defined multiple - # times in a single file. - if inspect.isclass(obj): - if source_lines is None: - return None - pat = re.compile(r'^\s*class\s*%s\b' % - getattr(obj, '__name__', '-')) - for i, line in enumerate(source_lines): - if pat.match(line): - lineno = i - break - - # Find the line number for functions & methods. - if inspect.ismethod(obj): obj = im_func(obj) - if inspect.isfunction(obj): obj = func_code(obj) - if inspect.istraceback(obj): obj = obj.tb_frame - if inspect.isframe(obj): obj = obj.f_code - if inspect.iscode(obj): - lineno = getattr(obj, 'co_firstlineno', None)-1 - - # Find the line number where the docstring starts. Assume - # that it's the first line that begins with a quote mark. - # Note: this could be fooled by a multiline function - # signature, where a continuation line begins with a quote - # mark. - if lineno is not None: - if source_lines is None: - return lineno+1 - pat = re.compile('(^|.*:)\s*\w*("|\')') - for lineno in range(lineno, len(source_lines)): - if pat.match(source_lines[lineno]): - return lineno - - # We couldn't find the line number. - return None - -###################################################################### -## 5. DocTest Runner -###################################################################### - -class DocTestRunner: - """ - A class used to run DocTest test cases, and accumulate statistics. - The `run` method is used to process a single DocTest case. It - returns a tuple `(f, t)`, where `t` is the number of test cases - tried, and `f` is the number of test cases that failed. - - >>> tests = DocTestFinder().find(_TestClass) - >>> runner = DocTestRunner(verbose=False) - >>> for test in tests: - ... print runner.run(test) - (0, 2) - (0, 1) - (0, 2) - (0, 2) - - The `summarize` method prints a summary of all the test cases that - have been run by the runner, and returns an aggregated `(f, t)` - tuple: - - >>> runner.summarize(verbose=1) - 4 items passed all tests: - 2 tests in _TestClass - 2 tests in _TestClass.__init__ - 2 tests in _TestClass.get - 1 tests in _TestClass.square - 7 tests in 4 items. - 7 passed and 0 failed. - Test passed. - (0, 7) - - The aggregated number of tried examples and failed examples is - also available via the `tries` and `failures` attributes: - - >>> runner.tries - 7 - >>> runner.failures - 0 - - The comparison between expected outputs and actual outputs is done - by an `OutputChecker`. This comparison may be customized with a - number of option flags; see the documentation for `testmod` for - more information. If the option flags are insufficient, then the - comparison may also be customized by passing a subclass of - `OutputChecker` to the constructor. - - The test runner's display output can be controlled in two ways. - First, an output function (`out) can be passed to - `TestRunner.run`; this function will be called with strings that - should be displayed. It defaults to `sys.stdout.write`. If - capturing the output is not sufficient, then the display output - can be also customized by subclassing DocTestRunner, and - overriding the methods `report_start`, `report_success`, - `report_unexpected_exception`, and `report_failure`. - """ - # This divider string is used to separate failure messages, and to - # separate sections of the summary. - DIVIDER = "*" * 70 - - def __init__(self, checker=None, verbose=None, optionflags=0): - """ - Create a new test runner. - - Optional keyword arg `checker` is the `OutputChecker` that - should be used to compare the expected outputs and actual - outputs of doctest examples. - - Optional keyword arg 'verbose' prints lots of stuff if true, - only failures if false; by default, it's true iff '-v' is in - sys.argv. - - Optional argument `optionflags` can be used to control how the - test runner compares expected output to actual output, and how - it displays failures. See the documentation for `testmod` for - more information. - """ - self._checker = checker or OutputChecker() - if verbose is None: - verbose = '-v' in sys.argv - self._verbose = verbose - self.optionflags = optionflags - self.original_optionflags = optionflags - - # Keep track of the examples we've run. - self.tries = 0 - self.failures = 0 - self._name2ft = {} - - # Create a fake output target for capturing doctest output. - self._fakeout = _SpoofOut() - - #///////////////////////////////////////////////////////////////// - # Reporting methods - #///////////////////////////////////////////////////////////////// - - def report_start(self, out, test, example): - """ - Report that the test runner is about to process the given - example. (Only displays a message if verbose=True) - """ - if self._verbose: - if example.want: - out('Trying:\n' + _indent(example.source) + - 'Expecting:\n' + _indent(example.want)) - else: - out('Trying:\n' + _indent(example.source) + - 'Expecting nothing\n') - - def report_success(self, out, test, example, got): - """ - Report that the given example ran successfully. (Only - displays a message if verbose=True) - """ - if self._verbose: - out("ok\n") - - def report_failure(self, out, test, example, got): - """ - Report that the given example failed. - """ - out(self._failure_header(test, example) + - self._checker.output_difference(example, got, self.optionflags)) - - def report_unexpected_exception(self, out, test, example, exc_info): - """ - Report that the given example raised an unexpected exception. - """ - out(self._failure_header(test, example) + - 'Exception raised:\n' + _indent(_exception_traceback(exc_info))) - - def _failure_header(self, test, example): - out = [self.DIVIDER] - if test.filename: - if test.lineno is not None and example.lineno is not None: - lineno = test.lineno + example.lineno + 1 - else: - lineno = '?' - out.append('File "%s", line %s, in %s' % - (test.filename, lineno, test.name)) - else: - out.append('Line %s, in %s' % (example.lineno+1, test.name)) - out.append('Failed example:') - source = example.source - out.append(_indent(source)) - return '\n'.join(out) - - #///////////////////////////////////////////////////////////////// - # DocTest Running - #///////////////////////////////////////////////////////////////// - - def __run(self, test, compileflags, out): - """ - Run the examples in `test`. Write the outcome of each example - with one of the `DocTestRunner.report_*` methods, using the - writer function `out`. `compileflags` is the set of compiler - flags that should be used to execute examples. Return a tuple - `(f, t)`, where `t` is the number of examples tried, and `f` - is the number of examples that failed. The examples are run - in the namespace `test.globs`. - """ - # Keep track of the number of failures and tries. - failures = tries = 0 - - # Save the option flags (since option directives can be used - # to modify them). - original_optionflags = self.optionflags - - SUCCESS, FAILURE, BOOM = range(3) # `outcome` state - - check = self._checker.check_output - - # Process each example. - for examplenum, example in enumerate(test.examples): - - # If REPORT_ONLY_FIRST_FAILURE is set, then supress - # reporting after the first failure. - quiet = (self.optionflags & REPORT_ONLY_FIRST_FAILURE and - failures > 0) - - # Merge in the example's options. - self.optionflags = original_optionflags - if example.options: - for (optionflag, val) in example.options.items(): - if val: - self.optionflags |= optionflag - else: - self.optionflags &= ~optionflag - - # Record that we started this example. - tries += 1 - if not quiet: - self.report_start(out, test, example) - - # Use a special filename for compile(), so we can retrieve - # the source code during interactive debugging (see - # __patched_linecache_getlines). - filename = '' % (test.name, examplenum) - - # Run the example in the given context (globs), and record - # any exception that gets raised. (But don't intercept - # keyboard interrupts.) - try: - # Don't blink! This is where the user's code gets run. - exec(compile(example.source, filename, "single", - compileflags, 1), test.globs) - self.debugger.set_continue() # ==== Example Finished ==== - exception = None - except KeyboardInterrupt: - raise - except: - exception = sys.exc_info() - self.debugger.set_continue() # ==== Example Finished ==== - - got = self._fakeout.getvalue() # the actual output - self._fakeout.truncate(0) - outcome = FAILURE # guilty until proved innocent or insane - - # If the example executed without raising any exceptions, - # verify its output. - if exception is None: - if check(example.want, got, self.optionflags): - outcome = SUCCESS - - # The example raised an exception: check if it was expected. - else: - exc_info = sys.exc_info() - exc_msg = traceback.format_exception_only(*exc_info[:2])[-1] - if not quiet: - got += _exception_traceback(exc_info) - - # If `example.exc_msg` is None, then we weren't expecting - # an exception. - if example.exc_msg is None: - outcome = BOOM - - # We expected an exception: see whether it matches. - elif check(example.exc_msg, exc_msg, self.optionflags): - outcome = SUCCESS - - # Another chance if they didn't care about the detail. - elif self.optionflags & IGNORE_EXCEPTION_DETAIL: - m1 = re.match(r'[^:]*:', example.exc_msg) - m2 = re.match(r'[^:]*:', exc_msg) - if m1 and m2 and check(m1.group(0), m2.group(0), - self.optionflags): - outcome = SUCCESS - - # Report the outcome. - if outcome is SUCCESS: - if not quiet: - self.report_success(out, test, example, got) - elif outcome is FAILURE: - if not quiet: - self.report_failure(out, test, example, got) - failures += 1 - elif outcome is BOOM: - if not quiet: - self.report_unexpected_exception(out, test, example, - exc_info) - failures += 1 - else: - assert False, ("unknown outcome", outcome) - - # Restore the option flags (in case they were modified) - self.optionflags = original_optionflags - - # Record and return the number of failures and tries. - self.__record_outcome(test, failures, tries) - return failures, tries - - def __record_outcome(self, test, f, t): - """ - Record the fact that the given DocTest (`test`) generated `f` - failures out of `t` tried examples. - """ - f2, t2 = self._name2ft.get(test.name, (0,0)) - self._name2ft[test.name] = (f+f2, t+t2) - self.failures += f - self.tries += t - - __LINECACHE_FILENAME_RE = re.compile(r'[\w\.]+)' - r'\[(?P\d+)\]>$') - def __patched_linecache_getlines(self, filename, module_globals=None): - m = self.__LINECACHE_FILENAME_RE.match(filename) - if m and m.group('name') == self.test.name: - example = self.test.examples[int(m.group('examplenum'))] - return example.source.splitlines(True) - elif func_code(self.save_linecache_getlines).co_argcount > 1: - return self.save_linecache_getlines(filename, module_globals) - else: - return self.save_linecache_getlines(filename) - - def run(self, test, compileflags=None, out=None, clear_globs=True): - """ - Run the examples in `test`, and display the results using the - writer function `out`. - - The examples are run in the namespace `test.globs`. If - `clear_globs` is true (the default), then this namespace will - be cleared after the test runs, to help with garbage - collection. If you would like to examine the namespace after - the test completes, then use `clear_globs=False`. - - `compileflags` gives the set of flags that should be used by - the Python compiler when running the examples. If not - specified, then it will default to the set of future-import - flags that apply to `globs`. - - The output of each example is checked using - `DocTestRunner.check_output`, and the results are formatted by - the `DocTestRunner.report_*` methods. - """ - self.test = test - - if compileflags is None: - compileflags = _extract_future_flags(test.globs) - - save_stdout = sys.stdout - if out is None: - out = save_stdout.write - sys.stdout = self._fakeout - - # Patch pdb.set_trace to restore sys.stdout during interactive - # debugging (so it's not still redirected to self._fakeout). - # Note that the interactive output will go to *our* - # save_stdout, even if that's not the real sys.stdout; this - # allows us to write test cases for the set_trace behavior. - save_set_trace = pdb.set_trace - self.debugger = _OutputRedirectingPdb(save_stdout) - self.debugger.reset() - pdb.set_trace = self.debugger.set_trace - - # Patch linecache.getlines, so we can see the example's source - # when we're inside the debugger. - self.save_linecache_getlines = linecache.getlines - linecache.getlines = self.__patched_linecache_getlines - - try: - return self.__run(test, compileflags, out) - finally: - sys.stdout = save_stdout - pdb.set_trace = save_set_trace - linecache.getlines = self.save_linecache_getlines - if clear_globs: - test.globs.clear() - - #///////////////////////////////////////////////////////////////// - # Summarization - #///////////////////////////////////////////////////////////////// - def summarize(self, verbose=None): - """ - Print a summary of all the test cases that have been run by - this DocTestRunner, and return a tuple `(f, t)`, where `f` is - the total number of failed examples, and `t` is the total - number of tried examples. - - The optional `verbose` argument controls how detailed the - summary is. If the verbosity is not specified, then the - DocTestRunner's verbosity is used. - """ - if verbose is None: - verbose = self._verbose - notests = [] - passed = [] - failed = [] - totalt = totalf = 0 - for x in self._name2ft.items(): - name, (f, t) = x - assert f <= t - totalt += t - totalf += f - if t == 0: - notests.append(name) - elif f == 0: - passed.append( (name, t) ) - else: - failed.append(x) - if verbose: - if notests: - print(len(notests), "items had no tests:") - notests.sort() - for thing in notests: - print(" ", thing) - if passed: - print(len(passed), "items passed all tests:") - passed.sort() - for thing, count in passed: - print(" %3d tests in %s" % (count, thing)) - if failed: - print(self.DIVIDER) - print(len(failed), "items had failures:") - failed.sort() - for thing, (f, t) in failed: - print(" %3d of %3d in %s" % (f, t, thing)) - if verbose: - print(totalt, "tests in", len(self._name2ft), "items.") - print(totalt - totalf, "passed and", totalf, "failed.") - if totalf: - print("***Test Failed***", totalf, "failures.") - elif verbose: - print("Test passed.") - return totalf, totalt - - #///////////////////////////////////////////////////////////////// - # Backward compatibility cruft to maintain doctest.master. - #///////////////////////////////////////////////////////////////// - def merge(self, other): - d = self._name2ft - for name, (f, t) in other._name2ft.items(): - if name in d: - print("*** DocTestRunner.merge: '" + name + "' in both" \ - " testers; summing outcomes.") - f2, t2 = d[name] - f = f + f2 - t = t + t2 - d[name] = f, t - -class OutputChecker: - """ - A class used to check the whether the actual output from a doctest - example matches the expected output. `OutputChecker` defines two - methods: `check_output`, which compares a given pair of outputs, - and returns true if they match; and `output_difference`, which - returns a string describing the differences between two outputs. - """ - def check_output(self, want, got, optionflags): - """ - Return True iff the actual output from an example (`got`) - matches the expected output (`want`). These strings are - always considered to match if they are identical; but - depending on what option flags the test runner is using, - several non-exact match types are also possible. See the - documentation for `TestRunner` for more information about - option flags. - """ - # Handle the common case first, for efficiency: - # if they're string-identical, always return true. - if got == want: - return True - - # The values True and False replaced 1 and 0 as the return - # value for boolean comparisons in Python 2.3. - if not (optionflags & DONT_ACCEPT_TRUE_FOR_1): - if (got,want) == ("True\n", "1\n"): - return True - if (got,want) == ("False\n", "0\n"): - return True - - # can be used as a special sequence to signify a - # blank line, unless the DONT_ACCEPT_BLANKLINE flag is used. - if not (optionflags & DONT_ACCEPT_BLANKLINE): - # Replace in want with a blank line. - want = re.sub('(?m)^%s\s*?$' % re.escape(BLANKLINE_MARKER), - '', want) - # If a line in got contains only spaces, then remove the - # spaces. - got = re.sub('(?m)^\s*?$', '', got) - if got == want: - return True - - # This flag causes doctest to ignore any differences in the - # contents of whitespace strings. Note that this can be used - # in conjunction with the ELLIPSIS flag. - if optionflags & NORMALIZE_WHITESPACE: - got = ' '.join(got.split()) - want = ' '.join(want.split()) - if got == want: - return True - - # The ELLIPSIS flag says to let the sequence "..." in `want` - # match any substring in `got`. - if optionflags & ELLIPSIS: - if _ellipsis_match(want, got): - return True - - # We didn't find any match; return false. - return False - - # Should we do a fancy diff? - def _do_a_fancy_diff(self, want, got, optionflags): - # Not unless they asked for a fancy diff. - if not optionflags & (REPORT_UDIFF | - REPORT_CDIFF | - REPORT_NDIFF): - return False - - # If expected output uses ellipsis, a meaningful fancy diff is - # too hard ... or maybe not. In two real-life failures Tim saw, - # a diff was a major help anyway, so this is commented out. - # [todo] _ellipsis_match() knows which pieces do and don't match, - # and could be the basis for a kick-ass diff in this case. - ##if optionflags & ELLIPSIS and ELLIPSIS_MARKER in want: - ## return False - - # ndiff does intraline difference marking, so can be useful even - # for 1-line differences. - if optionflags & REPORT_NDIFF: - return True - - # The other diff types need at least a few lines to be helpful. - return want.count('\n') > 2 and got.count('\n') > 2 - - def output_difference(self, example, got, optionflags): - """ - Return a string describing the differences between the - expected output for a given example (`example`) and the actual - output (`got`). `optionflags` is the set of option flags used - to compare `want` and `got`. - """ - want = example.want - # If s are being used, then replace blank lines - # with in the actual output string. - if not (optionflags & DONT_ACCEPT_BLANKLINE): - got = re.sub('(?m)^[ ]*(?=\n)', BLANKLINE_MARKER, got) - - # Check if we should use diff. - if self._do_a_fancy_diff(want, got, optionflags): - # Split want & got into lines. - want_lines = want.splitlines(True) # True == keep line ends - got_lines = got.splitlines(True) - # Use difflib to find their differences. - if optionflags & REPORT_UDIFF: - diff = difflib.unified_diff(want_lines, got_lines, n=2) - diff = list(diff)[2:] # strip the diff header - kind = 'unified diff with -expected +actual' - elif optionflags & REPORT_CDIFF: - diff = difflib.context_diff(want_lines, got_lines, n=2) - diff = list(diff)[2:] # strip the diff header - kind = 'context diff with expected followed by actual' - elif optionflags & REPORT_NDIFF: - engine = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK) - diff = list(engine.compare(want_lines, got_lines)) - kind = 'ndiff with -expected +actual' - else: - assert 0, 'Bad diff option' - # Remove trailing whitespace on diff output. - diff = [line.rstrip() + '\n' for line in diff] - return 'Differences (%s):\n' % kind + _indent(''.join(diff)) - - # If we're not using diff, then simply list the expected - # output followed by the actual output. - if want and got: - return 'Expected:\n%sGot:\n%s' % (_indent(want), _indent(got)) - elif want: - return 'Expected:\n%sGot nothing\n' % _indent(want) - elif got: - return 'Expected nothing\nGot:\n%s' % _indent(got) - else: - return 'Expected nothing\nGot nothing\n' - -class DocTestFailure(Exception): - """A DocTest example has failed in debugging mode. - - The exception instance has variables: - - - test: the DocTest object being run - - - excample: the Example object that failed - - - got: the actual output - """ - def __init__(self, test, example, got): - self.test = test - self.example = example - self.got = got - - def __str__(self): - return str(self.test) - -class UnexpectedException(Exception): - """A DocTest example has encountered an unexpected exception - - The exception instance has variables: - - - test: the DocTest object being run - - - excample: the Example object that failed - - - exc_info: the exception info - """ - def __init__(self, test, example, exc_info): - self.test = test - self.example = example - self.exc_info = exc_info - - def __str__(self): - return str(self.test) - -class DebugRunner(DocTestRunner): - r"""Run doc tests but raise an exception as soon as there is a failure. - - If an unexpected exception occurs, an UnexpectedException is raised. - It contains the test, the example, and the original exception: - - >>> runner = DebugRunner(verbose=False) - >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', - ... {}, 'foo', 'foo.py', 0) - >>> try: - ... runner.run(test) - ... except UnexpectedException, failure: - ... pass - - >>> failure.test is test - True - - >>> failure.example.want - '42\n' - - >>> exc_info = failure.exc_info - >>> raise exc_info[0], exc_info[1], exc_info[2] - Traceback (most recent call last): - ... - KeyError - - We wrap the original exception to give the calling application - access to the test and example information. - - If the output doesn't match, then a DocTestFailure is raised: - - >>> test = DocTestParser().get_doctest(''' - ... >>> x = 1 - ... >>> x - ... 2 - ... ''', {}, 'foo', 'foo.py', 0) - - >>> try: - ... runner.run(test) - ... except DocTestFailure, failure: - ... pass - - DocTestFailure objects provide access to the test: - - >>> failure.test is test - True - - As well as to the example: - - >>> failure.example.want - '2\n' - - and the actual output: - - >>> failure.got - '1\n' - - If a failure or error occurs, the globals are left intact: - - >>> del test.globs['__builtins__'] - >>> test.globs - {'x': 1} - - >>> test = DocTestParser().get_doctest(''' - ... >>> x = 2 - ... >>> raise KeyError - ... ''', {}, 'foo', 'foo.py', 0) - - >>> runner.run(test) - Traceback (most recent call last): - ... - UnexpectedException: - - >>> del test.globs['__builtins__'] - >>> test.globs - {'x': 2} - - But the globals are cleared if there is no error: - - >>> test = DocTestParser().get_doctest(''' - ... >>> x = 2 - ... ''', {}, 'foo', 'foo.py', 0) - - >>> runner.run(test) - (0, 1) - - >>> test.globs - {} - - """ - - def run(self, test, compileflags=None, out=None, clear_globs=True): - r = DocTestRunner.run(self, test, compileflags, out, False) - if clear_globs: - test.globs.clear() - return r - - def report_unexpected_exception(self, out, test, example, exc_info): - raise UnexpectedException(test, example, exc_info) - - def report_failure(self, out, test, example, got): - raise DocTestFailure(test, example, got) - -###################################################################### -## 6. Test Functions -###################################################################### -# These should be backwards compatible. - -# For backward compatibility, a global instance of a DocTestRunner -# class, updated by testmod. -master = None - -def testmod(m=None, name=None, globs=None, verbose=None, isprivate=None, - report=True, optionflags=0, extraglobs=None, - raise_on_error=False, exclude_empty=False): - """m=None, name=None, globs=None, verbose=None, isprivate=None, - report=True, optionflags=0, extraglobs=None, raise_on_error=False, - exclude_empty=False - - Test examples in docstrings in functions and classes reachable - from module m (or the current module if m is not supplied), starting - with m.__doc__. Unless isprivate is specified, private names - are not skipped. - - Also test examples reachable from dict m.__test__ if it exists and is - not None. m.__test__ maps names to functions, classes and strings; - function and class docstrings are tested even if the name is private; - strings are tested directly, as if they were docstrings. - - Return (#failures, #tests). - - See doctest.__doc__ for an overview. - - Optional keyword arg "name" gives the name of the module; by default - use m.__name__. - - Optional keyword arg "globs" gives a dict to be used as the globals - when executing examples; by default, use m.__dict__. A copy of this - dict is actually used for each docstring, so that each docstring's - examples start with a clean slate. - - Optional keyword arg "extraglobs" gives a dictionary that should be - merged into the globals that are used to execute examples. By - default, no extra globals are used. This is new in 2.4. - - Optional keyword arg "verbose" prints lots of stuff if true, prints - only failures if false; by default, it's true iff "-v" is in sys.argv. - - Optional keyword arg "report" prints a summary at the end when true, - else prints nothing at the end. In verbose mode, the summary is - detailed, else very brief (in fact, empty if all tests passed). - - Optional keyword arg "optionflags" or's together module constants, - and defaults to 0. This is new in 2.3. Possible values (see the - docs for details): - - DONT_ACCEPT_TRUE_FOR_1 - DONT_ACCEPT_BLANKLINE - NORMALIZE_WHITESPACE - ELLIPSIS - IGNORE_EXCEPTION_DETAIL - REPORT_UDIFF - REPORT_CDIFF - REPORT_NDIFF - REPORT_ONLY_FIRST_FAILURE - - Optional keyword arg "raise_on_error" raises an exception on the - first unexpected exception or failure. This allows failures to be - post-mortem debugged. - - Deprecated in Python 2.4: - Optional keyword arg "isprivate" specifies a function used to - determine whether a name is private. The default function is - treat all functions as public. Optionally, "isprivate" can be - set to doctest.is_private to skip over functions marked as private - using the underscore naming convention; see its docs for details. - - Advanced tomfoolery: testmod runs methods of a local instance of - class doctest.Tester, then merges the results into (or creates) - global Tester instance doctest.master. Methods of doctest.master - can be called directly too, if you want to do something unusual. - Passing report=0 to testmod is especially useful then, to delay - displaying a summary. Invoke doctest.master.summarize(verbose) - when you're done fiddling. - """ - global master - - if isprivate is not None: - warnings.warn("the isprivate argument is deprecated; " - "examine DocTestFinder.find() lists instead", - DeprecationWarning) - - # If no module was given, then use __main__. - if m is None: - # DWA - m will still be None if this wasn't invoked from the command - # line, in which case the following TypeError is about as good an error - # as we should expect - m = sys.modules.get('__main__') - - # Check that we were actually given a module. - if not inspect.ismodule(m): - raise TypeError("testmod: module required; %r" % (m,)) - - # If no name was given, then use the module's name. - if name is None: - name = m.__name__ - - # Find, parse, and run all tests in the given module. - finder = DocTestFinder(_namefilter=isprivate, exclude_empty=exclude_empty) - - if raise_on_error: - runner = DebugRunner(verbose=verbose, optionflags=optionflags) - else: - runner = DocTestRunner(verbose=verbose, optionflags=optionflags) - - for test in finder.find(m, name, globs=globs, extraglobs=extraglobs): - runner.run(test) - - if report: - runner.summarize() - - if master is None: - master = runner - else: - master.merge(runner) - - return runner.failures, runner.tries - -def testfile(filename, module_relative=True, name=None, package=None, - globs=None, verbose=None, report=True, optionflags=0, - extraglobs=None, raise_on_error=False, parser=DocTestParser()): - """ - Test examples in the given file. Return (#failures, #tests). - - Optional keyword arg "module_relative" specifies how filenames - should be interpreted: - - - If "module_relative" is True (the default), then "filename" - specifies a module-relative path. By default, this path is - relative to the calling module's directory; but if the - "package" argument is specified, then it is relative to that - package. To ensure os-independence, "filename" should use - "/" characters to separate path segments, and should not - be an absolute path (i.e., it may not begin with "/"). - - - If "module_relative" is False, then "filename" specifies an - os-specific path. The path may be absolute or relative (to - the current working directory). - - Optional keyword arg "name" gives the name of the test; by default - use the file's basename. - - Optional keyword argument "package" is a Python package or the - name of a Python package whose directory should be used as the - base directory for a module relative filename. If no package is - specified, then the calling module's directory is used as the base - directory for module relative filenames. It is an error to - specify "package" if "module_relative" is False. - - Optional keyword arg "globs" gives a dict to be used as the globals - when executing examples; by default, use {}. A copy of this dict - is actually used for each docstring, so that each docstring's - examples start with a clean slate. - - Optional keyword arg "extraglobs" gives a dictionary that should be - merged into the globals that are used to execute examples. By - default, no extra globals are used. - - Optional keyword arg "verbose" prints lots of stuff if true, prints - only failures if false; by default, it's true iff "-v" is in sys.argv. - - Optional keyword arg "report" prints a summary at the end when true, - else prints nothing at the end. In verbose mode, the summary is - detailed, else very brief (in fact, empty if all tests passed). - - Optional keyword arg "optionflags" or's together module constants, - and defaults to 0. Possible values (see the docs for details): - - DONT_ACCEPT_TRUE_FOR_1 - DONT_ACCEPT_BLANKLINE - NORMALIZE_WHITESPACE - ELLIPSIS - IGNORE_EXCEPTION_DETAIL - REPORT_UDIFF - REPORT_CDIFF - REPORT_NDIFF - REPORT_ONLY_FIRST_FAILURE - - Optional keyword arg "raise_on_error" raises an exception on the - first unexpected exception or failure. This allows failures to be - post-mortem debugged. - - Optional keyword arg "parser" specifies a DocTestParser (or - subclass) that should be used to extract tests from the files. - - Advanced tomfoolery: testmod runs methods of a local instance of - class doctest.Tester, then merges the results into (or creates) - global Tester instance doctest.master. Methods of doctest.master - can be called directly too, if you want to do something unusual. - Passing report=0 to testmod is especially useful then, to delay - displaying a summary. Invoke doctest.master.summarize(verbose) - when you're done fiddling. - """ - global master - - if package and not module_relative: - raise ValueError("Package may only be specified for module-" - "relative paths.") - - # Relativize the path - if module_relative: - package = _normalize_module(package) - filename = _module_relative_path(package, filename) - - # If no name was given, then use the file's name. - if name is None: - name = os.path.basename(filename) - - # Assemble the globals. - if globs is None: - globs = {} - else: - globs = globs.copy() - if extraglobs is not None: - globs.update(extraglobs) - - if raise_on_error: - runner = DebugRunner(verbose=verbose, optionflags=optionflags) - else: - runner = DocTestRunner(verbose=verbose, optionflags=optionflags) - - # Read the file, convert it to a test, and run it. - f = open(filename) - s = f.read() - f.close() - test = parser.get_doctest(s, globs, name, filename, 0) - runner.run(test) - - if report: - runner.summarize() - - if master is None: - master = runner - else: - master.merge(runner) - - return runner.failures, runner.tries - -def run_docstring_examples(f, globs, verbose=False, name="NoName", - compileflags=None, optionflags=0): - """ - Test examples in the given object's docstring (`f`), using `globs` - as globals. Optional argument `name` is used in failure messages. - If the optional argument `verbose` is true, then generate output - even if there are no failures. - - `compileflags` gives the set of flags that should be used by the - Python compiler when running the examples. If not specified, then - it will default to the set of future-import flags that apply to - `globs`. - - Optional keyword arg `optionflags` specifies options for the - testing and output. See the documentation for `testmod` for more - information. - """ - # Find, parse, and run all tests in the given module. - finder = DocTestFinder(verbose=verbose, recurse=False) - runner = DocTestRunner(verbose=verbose, optionflags=optionflags) - for test in finder.find(f, name, globs=globs): - runner.run(test, compileflags=compileflags) - -###################################################################### -## 7. Tester -###################################################################### -# This is provided only for backwards compatibility. It's not -# actually used in any way. - -class Tester: - def __init__(self, mod=None, globs=None, verbose=None, - isprivate=None, optionflags=0): - - warnings.warn("class Tester is deprecated; " - "use class doctest.DocTestRunner instead", - DeprecationWarning, stacklevel=2) - if mod is None and globs is None: - raise TypeError("Tester.__init__: must specify mod or globs") - if mod is not None and not inspect.ismodule(mod): - raise TypeError("Tester.__init__: mod must be a module; %r" % - (mod,)) - if globs is None: - globs = mod.__dict__ - self.globs = globs - - self.verbose = verbose - self.isprivate = isprivate - self.optionflags = optionflags - self.testfinder = DocTestFinder(_namefilter=isprivate) - self.testrunner = DocTestRunner(verbose=verbose, - optionflags=optionflags) - - def runstring(self, s, name): - test = DocTestParser().get_doctest(s, self.globs, name, None, None) - if self.verbose: - print("Running string", name) - (f,t) = self.testrunner.run(test) - if self.verbose: - print(f, "of", t, "examples failed in string", name) - return (f,t) - - def rundoc(self, object, name=None, module=None): - f = t = 0 - tests = self.testfinder.find(object, name, module=module, - globs=self.globs) - for test in tests: - (f2, t2) = self.testrunner.run(test) - (f,t) = (f+f2, t+t2) - return (f,t) - - def rundict(self, d, name, module=None): - import types - m = types.ModuleType(name) - m.__dict__.update(d) - if module is None: - module = False - return self.rundoc(m, name, module) - - def run__test__(self, d, name): - import types - m = types.ModuleType(name) - m.__test__ = d - return self.rundoc(m, name) - - def summarize(self, verbose=None): - return self.testrunner.summarize(verbose) - - def merge(self, other): - self.testrunner.merge(other.testrunner) - -###################################################################### -## 8. Unittest Support -###################################################################### - -_unittest_reportflags = 0 - -def set_unittest_reportflags(flags): - """Sets the unittest option flags. - - The old flag is returned so that a runner could restore the old - value if it wished to: - - >>> old = _unittest_reportflags - >>> set_unittest_reportflags(REPORT_NDIFF | - ... REPORT_ONLY_FIRST_FAILURE) == old - True - - >>> import doctest - >>> doctest._unittest_reportflags == (REPORT_NDIFF | - ... REPORT_ONLY_FIRST_FAILURE) - True - - Only reporting flags can be set: - - >>> set_unittest_reportflags(ELLIPSIS) - Traceback (most recent call last): - ... - ValueError: ('Only reporting flags allowed', 8) - - >>> set_unittest_reportflags(old) == (REPORT_NDIFF | - ... REPORT_ONLY_FIRST_FAILURE) - True - """ - global _unittest_reportflags - - if (flags & REPORTING_FLAGS) != flags: - raise ValueError("Only reporting flags allowed", flags) - old = _unittest_reportflags - _unittest_reportflags = flags - return old - - -class DocTestCase(unittest.TestCase): - - def __init__(self, test, optionflags=0, setUp=None, tearDown=None, - checker=None): - - unittest.TestCase.__init__(self) - self._dt_optionflags = optionflags - self._dt_checker = checker - self._dt_test = test - self._dt_setUp = setUp - self._dt_tearDown = tearDown - - def setUp(self): - test = self._dt_test - - if self._dt_setUp is not None: - self._dt_setUp(test) - - def tearDown(self): - test = self._dt_test - - if self._dt_tearDown is not None: - self._dt_tearDown(test) - - test.globs.clear() - - def runTest(self): - test = self._dt_test - old = sys.stdout - new = StringIO() - optionflags = self._dt_optionflags - - if not (optionflags & REPORTING_FLAGS): - # The option flags don't include any reporting flags, - # so add the default reporting flags - optionflags |= _unittest_reportflags - - runner = DocTestRunner(optionflags=optionflags, - checker=self._dt_checker, verbose=False) - - try: - runner.DIVIDER = "-"*70 - failures, tries = runner.run( - test, out=new.write, clear_globs=False) - finally: - sys.stdout = old - - if failures: - raise self.failureException(self.format_failure(new.getvalue())) - - def format_failure(self, err): - test = self._dt_test - if test.lineno is None: - lineno = 'unknown line number' - else: - lineno = '%s' % test.lineno - lname = '.'.join(test.name.split('.')[-1:]) - return ('Failed doctest test for %s\n' - ' File "%s", line %s, in %s\n\n%s' - % (test.name, test.filename, lineno, lname, err) - ) - - def debug(self): - r"""Run the test case without results and without catching exceptions - - The unit test framework includes a debug method on test cases - and test suites to support post-mortem debugging. The test code - is run in such a way that errors are not caught. This way a - caller can catch the errors and initiate post-mortem debugging. - - The DocTestCase provides a debug method that raises - UnexpectedException errors if there is an unexepcted - exception: - - >>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', - ... {}, 'foo', 'foo.py', 0) - >>> case = DocTestCase(test) - >>> try: - ... case.debug() - ... except UnexpectedException, failure: - ... pass - - The UnexpectedException contains the test, the example, and - the original exception: - - >>> failure.test is test - True - - >>> failure.example.want - '42\n' - - >>> exc_info = failure.exc_info - >>> raise exc_info[0], exc_info[1], exc_info[2] - Traceback (most recent call last): - ... - KeyError - - If the output doesn't match, then a DocTestFailure is raised: - - >>> test = DocTestParser().get_doctest(''' - ... >>> x = 1 - ... >>> x - ... 2 - ... ''', {}, 'foo', 'foo.py', 0) - >>> case = DocTestCase(test) - - >>> try: - ... case.debug() - ... except DocTestFailure, failure: - ... pass - - DocTestFailure objects provide access to the test: - - >>> failure.test is test - True - - As well as to the example: - - >>> failure.example.want - '2\n' - - and the actual output: - - >>> failure.got - '1\n' - - """ - - self.setUp() - runner = DebugRunner(optionflags=self._dt_optionflags, - checker=self._dt_checker, verbose=False) - runner.run(self._dt_test) - self.tearDown() - - def id(self): - return self._dt_test.name - - def __repr__(self): - name = self._dt_test.name.split('.') - return "%s (%s)" % (name[-1], '.'.join(name[:-1])) - - __str__ = __repr__ - - def shortDescription(self): - return "Doctest: " + self._dt_test.name - -def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, - **options): - """ - Convert doctest tests for a module to a unittest test suite. - - This converts each documentation string in a module that - contains doctest tests to a unittest test case. If any of the - tests in a doc string fail, then the test case fails. An exception - is raised showing the name of the file containing the test and a - (sometimes approximate) line number. - - The `module` argument provides the module to be tested. The argument - can be either a module or a module name. - - If no argument is given, the calling module is used. - - A number of options may be provided as keyword arguments: - - setUp - A set-up function. This is called before running the - tests in each file. The setUp function will be passed a DocTest - object. The setUp function can access the test globals as the - globs attribute of the test passed. - - tearDown - A tear-down function. This is called after running the - tests in each file. The tearDown function will be passed a DocTest - object. The tearDown function can access the test globals as the - globs attribute of the test passed. - - globs - A dictionary containing initial global variables for the tests. - - optionflags - A set of doctest option flags expressed as an integer. - """ - - if test_finder is None: - test_finder = DocTestFinder() - - module = _normalize_module(module) - tests = test_finder.find(module, globs=globs, extraglobs=extraglobs) - if globs is None: - globs = module.__dict__ - if not tests: - # Why do we want to do this? Because it reveals a bug that might - # otherwise be hidden. - raise ValueError(module, "has no tests") - - tests.sort() - suite = unittest.TestSuite() - for test in tests: - if len(test.examples) == 0: - continue - if not test.filename: - filename = module.__file__ - if filename[-4:] in (".pyc", ".pyo"): - filename = filename[:-1] - test.filename = filename - suite.addTest(DocTestCase(test, **options)) - - return suite - -class DocFileCase(DocTestCase): - - def id(self): - return '_'.join(self._dt_test.name.split('.')) - - def __repr__(self): - return self._dt_test.filename - __str__ = __repr__ - - def format_failure(self, err): - return ('Failed doctest test for %s\n File "%s", line 0\n\n%s' - % (self._dt_test.name, self._dt_test.filename, err) - ) - -def DocFileTest(path, module_relative=True, package=None, - globs=None, parser=DocTestParser(), **options): - if globs is None: - globs = {} - - if package and not module_relative: - raise ValueError("Package may only be specified for module-" - "relative paths.") - - # Relativize the path. - if module_relative: - package = _normalize_module(package) - path = _module_relative_path(package, path) - - # Find the file and read it. - name = os.path.basename(path) - f = open(path) - doc = f.read() - f.close() - - # Convert it to a test, and wrap it in a DocFileCase. - test = parser.get_doctest(doc, globs, name, path, 0) - return DocFileCase(test, **options) - -def DocFileSuite(*paths, **kw): - """A unittest suite for one or more doctest files. - - The path to each doctest file is given as a string; the - interpretation of that string depends on the keyword argument - "module_relative". - - A number of options may be provided as keyword arguments: - - module_relative - If "module_relative" is True, then the given file paths are - interpreted as os-independent module-relative paths. By - default, these paths are relative to the calling module's - directory; but if the "package" argument is specified, then - they are relative to that package. To ensure os-independence, - "filename" should use "/" characters to separate path - segments, and may not be an absolute path (i.e., it may not - begin with "/"). - - If "module_relative" is False, then the given file paths are - interpreted as os-specific paths. These paths may be absolute - or relative (to the current working directory). - - package - A Python package or the name of a Python package whose directory - should be used as the base directory for module relative paths. - If "package" is not specified, then the calling module's - directory is used as the base directory for module relative - filenames. It is an error to specify "package" if - "module_relative" is False. - - setUp - A set-up function. This is called before running the - tests in each file. The setUp function will be passed a DocTest - object. The setUp function can access the test globals as the - globs attribute of the test passed. - - tearDown - A tear-down function. This is called after running the - tests in each file. The tearDown function will be passed a DocTest - object. The tearDown function can access the test globals as the - globs attribute of the test passed. - - globs - A dictionary containing initial global variables for the tests. - - optionflags - A set of doctest option flags expressed as an integer. - - parser - A DocTestParser (or subclass) that should be used to extract - tests from the files. - """ - suite = unittest.TestSuite() - - # We do this here so that _normalize_module is called at the right - # level. If it were called in DocFileTest, then this function - # would be the caller and we might guess the package incorrectly. - if kw.get('module_relative', True): - kw['package'] = _normalize_module(kw.get('package')) - - for path in paths: - suite.addTest(DocFileTest(path, **kw)) - - return suite - -###################################################################### -## 9. Debugging Support -###################################################################### - -def script_from_examples(s): - r"""Extract script from text with examples. - - Converts text with examples to a Python script. Example input is - converted to regular code. Example output and all other words - are converted to comments: - - >>> text = ''' - ... Here are examples of simple math. - ... - ... Python has super accurate integer addition - ... - ... >>> 2 + 2 - ... 5 - ... - ... And very friendly error messages: - ... - ... >>> 1/0 - ... To Infinity - ... And - ... Beyond - ... - ... You can use logic if you want: - ... - ... >>> if 0: - ... ... blah - ... ... blah - ... ... - ... - ... Ho hum - ... ''' - - >>> print script_from_examples(text) - # Here are examples of simple math. - # - # Python has super accurate integer addition - # - 2 + 2 - # Expected: - ## 5 - # - # And very friendly error messages: - # - 1/0 - # Expected: - ## To Infinity - ## And - ## Beyond - # - # You can use logic if you want: - # - if 0: - blah - blah - # - # Ho hum - """ - output = [] - for piece in DocTestParser().parse(s): - if isinstance(piece, Example): - # Add the example's source code (strip trailing NL) - output.append(piece.source[:-1]) - # Add the expected output: - want = piece.want - if want: - output.append('# Expected:') - output += ['## '+l for l in want.split('\n')[:-1]] - else: - # Add non-example text. - output += [_comment_line(l) - for l in piece.split('\n')[:-1]] - - # Trim junk on both ends. - while output and output[-1] == '#': - output.pop() - while output and output[0] == '#': - output.pop(0) - # Combine the output, and return it. - return '\n'.join(output) - -def testsource(module, name): - """Extract the test sources from a doctest docstring as a script. - - Provide the module (or dotted name of the module) containing the - test to be debugged and the name (within the module) of the object - with the doc string with tests to be debugged. - """ - module = _normalize_module(module) - tests = DocTestFinder().find(module) - test = [t for t in tests if t.name == name] - if not test: - raise ValueError(name, "not found in tests") - test = test[0] - testsrc = script_from_examples(test.docstring) - return testsrc - -def debug_src(src, pm=False, globs=None): - """Debug a single doctest docstring, in argument `src`'""" - testsrc = script_from_examples(src) - debug_script(testsrc, pm, globs) - -def debug_script(src, pm=False, globs=None): - "Debug a test script. `src` is the script, as a string." - import pdb - - # Note that tempfile.NameTemporaryFile() cannot be used. As the - # docs say, a file so created cannot be opened by name a second time - # on modern Windows boxes, and execfile() needs to open it. - srcfilename = tempfile.mktemp(".py", "doctestdebug") - f = open(srcfilename, 'w') - f.write(src) - f.close() - - try: - if globs: - globs = globs.copy() - else: - globs = {} - - if pm: - try: - sandbox._execfile(srcfilename, globs) - except: - print(sys.exc_info()[1]) - pdb.post_mortem(sys.exc_info()[2]) - else: - # Note that %r is vital here. '%s' instead can, e.g., cause - # backslashes to get treated as metacharacters on Windows. - cmd = "sandbox._execfile(%r, globals())" % srcfilename - pdb.run(cmd, globs, globs) - - finally: - os.remove(srcfilename) - -def debug(module, name, pm=False): - """Debug a single doctest docstring. - - Provide the module (or dotted name of the module) containing the - test to be debugged and the name (within the module) of the object - with the docstring with tests to be debugged. - """ - module = _normalize_module(module) - testsrc = testsource(module, name) - debug_script(testsrc, pm, module.__dict__) - -###################################################################### -## 10. Example Usage -###################################################################### -class _TestClass: - """ - A pointless class, for sanity-checking of docstring testing. - - Methods: - square() - get() - - >>> _TestClass(13).get() + _TestClass(-12).get() - 1 - >>> hex(_TestClass(13).square().get()) - '0xa9' - """ - - def __init__(self, val): - """val -> _TestClass object with associated value val. - - >>> t = _TestClass(123) - >>> print t.get() - 123 - """ - - self.val = val - - def square(self): - """square() -> square TestClass's associated value - - >>> _TestClass(13).square().get() - 169 - """ - - self.val = self.val ** 2 - return self - - def get(self): - """get() -> return TestClass's associated value. - - >>> x = _TestClass(-42) - >>> print x.get() - -42 - """ - - return self.val - -__test__ = {"_TestClass": _TestClass, - "string": r""" - Example of a string object, searched as-is. - >>> x = 1; y = 2 - >>> x + y, x * y - (3, 2) - """, - - "bool-int equivalence": r""" - In 2.2, boolean expressions displayed - 0 or 1. By default, we still accept - them. This can be disabled by passing - DONT_ACCEPT_TRUE_FOR_1 to the new - optionflags argument. - >>> 4 == 4 - 1 - >>> 4 == 4 - True - >>> 4 > 4 - 0 - >>> 4 > 4 - False - """, - - "blank lines": r""" - Blank lines can be marked with : - >>> print 'foo\n\nbar\n' - foo - - bar - - """, - - "ellipsis": r""" - If the ellipsis flag is used, then '...' can be used to - elide substrings in the desired output: - >>> print range(1000) #doctest: +ELLIPSIS - [0, 1, 2, ..., 999] - """, - - "whitespace normalization": r""" - If the whitespace normalization flag is used, then - differences in whitespace are ignored. - >>> print range(30) #doctest: +NORMALIZE_WHITESPACE - [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29] - """, - } - -def _test(): - r = unittest.TextTestRunner() - r.run(DocTestSuite()) - -if __name__ == "__main__": - _test() - From 453afbe0de8c620fd487185aea74139aa6881a7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 20:58:13 -0400 Subject: [PATCH 4262/8469] Regenerate egg_info --HG-- branch : feature/issue-229 extra : rebase_source : 0a5b822d4e140229760b7f1b4e7ef29b45e6fb2f --- setuptools.egg-info/requires.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index 4fa66c7141..8ed3058afe 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,3 +1,4 @@ +six>=1.5 [certs] certifi==1.0.1 From 73938137bcf0c82fda4f5f3533a162abe693e331 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 20:59:44 -0400 Subject: [PATCH 4263/8469] Remove compat module --HG-- branch : feature/issue-229 extra : rebase_source : 3b189d29653b1e8026f92d0c5e43c6e0bfd3bfcd --- setuptools/compat.py | 66 -------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 setuptools/compat.py diff --git a/setuptools/compat.py b/setuptools/compat.py deleted file mode 100644 index 73e6e4aa7e..0000000000 --- a/setuptools/compat.py +++ /dev/null @@ -1,66 +0,0 @@ -import sys -import itertools - -PY3 = sys.version_info >= (3,) -PY2 = not PY3 - -if PY2: - basestring = basestring - import __builtin__ as builtins - import ConfigParser - from StringIO import StringIO - BytesIO = StringIO - func_code = lambda o: o.func_code - func_globals = lambda o: o.func_globals - im_func = lambda o: o.im_func - from htmlentitydefs import name2codepoint - import httplib - from BaseHTTPServer import HTTPServer - from SimpleHTTPServer import SimpleHTTPRequestHandler - from BaseHTTPServer import BaseHTTPRequestHandler - iteritems = lambda o: o.iteritems() - long_type = long - maxsize = sys.maxint - unichr = unichr - unicode = unicode - bytes = str - from urllib import url2pathname, splittag, pathname2url - import urllib2 - from urllib2 import urlopen, HTTPError, URLError, unquote, splituser - from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit - filterfalse = itertools.ifilterfalse - - exec("""def reraise(tp, value, tb=None): - raise tp, value, tb""") - -if PY3: - basestring = str - import builtins - import configparser as ConfigParser - from io import StringIO, BytesIO - func_code = lambda o: o.__code__ - func_globals = lambda o: o.__globals__ - im_func = lambda o: o.__func__ - from html.entities import name2codepoint - import http.client as httplib - from http.server import HTTPServer, SimpleHTTPRequestHandler - from http.server import BaseHTTPRequestHandler - iteritems = lambda o: o.items() - long_type = int - maxsize = sys.maxsize - unichr = chr - unicode = str - bytes = bytes - from urllib.error import HTTPError, URLError - import urllib.request as urllib2 - from urllib.request import urlopen, url2pathname, pathname2url - from urllib.parse import ( - urlparse, urlunparse, unquote, splituser, urljoin, urlsplit, - urlunsplit, splittag, - ) - filterfalse = itertools.filterfalse - - def reraise(tp, value, tb=None): - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value From d60e79a3daab4489a502842b49528c93ba5b1257 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 21:09:12 -0400 Subject: [PATCH 4264/8469] Try adding six as an egg for full compatibility with install_requires --HG-- branch : feature/issue-229 extra : rebase_source : fb6ea5263750ad039250628e97d2f1cf6968fed3 --- setup.py | 2 + six-1.7.3.egg | Bin 0 -> 8240 bytes six.py | 747 -------------------------------------------------- 3 files changed, 2 insertions(+), 747 deletions(-) create mode 100644 six-1.7.3.egg delete mode 100644 six.py diff --git a/setup.py b/setup.py index cf401d456c..b2f3ab3792 100755 --- a/setup.py +++ b/setup.py @@ -6,6 +6,8 @@ import textwrap import contextlib +sys.path.append('six-1.7.3.egg') + # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) diff --git a/six-1.7.3.egg b/six-1.7.3.egg new file mode 100644 index 0000000000000000000000000000000000000000..fe3e82c69bba092242593de34724c5eea6644b06 GIT binary patch literal 8240 zcmZvC1yCH@*7e{63_*i?(BK63!F6yC?(Po3-Q7Zv;1Jw(a1HJf+!7!#IDzozey{%b z?z{E6YFAfv^;%u~oV`|e)oK+51VlUl000E&+8#)b#mz=i69WJlRsaC~3~f7C)5ujn+YU^s$jU(IuJ-?pgz_|yx@$i1EeMN(5mb4yhs+UN&d{k~f_ z0MOhs>bB71;zG|&>sJhz0j`@r@0{i-L32UqEm63)Nl>>YbHh`&jGB!!T3s3)()u3` z9U(?ClkxtZ8$a*-y0uSfzS*Z5x65ZAV64pMwmN+XdihqLDD*gQfD$yM{wa#@dpG>C z-KS~0O`i$k+{s@NT&* zNeCbPttffqI= z(D!)b2Q(fek`0RGLKQ0JM5JV!^xv1@jqDRp37`~+mH_ZmencfiaTPTGv4V+zpF6+J zvnm7{v>kl{L{B&3y+zXU6%uDAoCxgq2a;3Ui6K};NxyfNRau!vM#_DwidyZXGxP&y z4Zm-bOpEP4fjW^0c3=3BzoAf%jE(O?IE<-=LM;k)iN50scxUZ#bSYd$HD;5zi^rGY zzy01mhEYq&^dN#N*Nv9{n0Ws*Lpq%jlNw1FxRK3&9{;fZk#d7QXkE&dbI%l*nHu}u`(wXUdQ-A)(LZfoC zy{!VM}c$(_o(#z z7)H#&{PlPE$mkHHk4)4ES(#>XDB*^mNC17Xv#)&gV~~;0ZUvs9qpk(S8|OD6+*3m3 z*83$cq-X}%p^$c)kH-xwhe{`&15&j|e2&O1S$wa4K_9ud20nbMsx;!+A3WvL{q03D zb6!ZMp|soG{4ybeT#NjE6Rl@d+%*c&fF$LC+m{WGl54;W^(pKqDqZXTv6UDE&u(cK z18$1y?Rgj$@i&&4@!$C74|-$74)EDBy9oV8sVBh2DJh>ywTQA!lPNStQou~oh4tRh zFuvC!V4Om|GDD->kzCTTVX^tjA!cqMB6c=2ckCtpb*9~&Dq`RjIVO_RzU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xKmg0?h}$)} z;>55Q2JYodu`y$3{U<^R8s_i9>y^1GzYuUE=Q!y4@T3dG)v?F7WU)(LHJK$!Z@0Pl z8Tw!1)asqf2an95Po~wb?5s|1-ABA2UaQs@ppnSZ5#Q^KW4T-^Em+S~+`{j^mtr{| z`}zvvIyH^jw)p9rrEc{|BlC-(#o;c^Tuy!w89|5R>*!loZ@p(7;U~S4v1Kiv+E!v8 zr0TpcdEW&pb|BdT7ihsx4nHr}7hjOy=OZ&?6q>{jP;2N#X!<+qPJcPm9VwgIbHvV! z{ECC$tq2@BbXg~zEaOP5UR4v~@l+5Tn&&Bst=@lPJKufUnpLqM7P{p^rQb!h5eoC@9y+Z zihp|3e<(WtPVxVp>Ywm`&cJ`*DSzzs-_87OBL2zn&*lFQgD&~s82)QBR1}c@+Oa?X R0U!e+|5$nIpF077{|78O^Y{P& literal 0 HcmV?d00001 diff --git a/six.py b/six.py deleted file mode 100644 index f8f7d402ff..0000000000 --- a/six.py +++ /dev/null @@ -1,747 +0,0 @@ -"""Utilities for writing code that runs on Python 2 and 3""" - -# Copyright (c) 2010-2014 Benjamin Peterson -# -# 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. - -import functools -import operator -import sys -import types - -__author__ = "Benjamin Peterson " -__version__ = "1.7.3" - - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 - -if PY3: - string_types = str, - integer_types = int, - class_types = type, - text_type = str - binary_type = bytes - - MAXSIZE = sys.maxsize -else: - string_types = basestring, - integer_types = (int, long) - class_types = (type, types.ClassType) - text_type = unicode - binary_type = str - - if sys.platform.startswith("java"): - # Jython always uses 32 bits. - MAXSIZE = int((1 << 31) - 1) - else: - # It's possible to have sizeof(long) != sizeof(Py_ssize_t). - class X(object): - def __len__(self): - return 1 << 31 - try: - len(X()) - except OverflowError: - # 32-bit - MAXSIZE = int((1 << 31) - 1) - else: - # 64-bit - MAXSIZE = int((1 << 63) - 1) - del X - - -def _add_doc(func, doc): - """Add documentation to a function.""" - func.__doc__ = doc - - -def _import_module(name): - """Import module, returning the module after the last dot.""" - __import__(name) - return sys.modules[name] - - -class _LazyDescr(object): - - def __init__(self, name): - self.name = name - - def __get__(self, obj, tp): - result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. - # This is a bit ugly, but it avoids running this again. - delattr(obj.__class__, self.name) - return result - - -class MovedModule(_LazyDescr): - - def __init__(self, name, old, new=None): - super(MovedModule, self).__init__(name) - if PY3: - if new is None: - new = name - self.mod = new - else: - self.mod = old - - def _resolve(self): - return _import_module(self.mod) - - def __getattr__(self, attr): - _module = self._resolve() - value = getattr(_module, attr) - setattr(self, attr, value) - return value - - -class _LazyModule(types.ModuleType): - - def __init__(self, name): - super(_LazyModule, self).__init__(name) - self.__doc__ = self.__class__.__doc__ - - def __dir__(self): - attrs = ["__doc__", "__name__"] - attrs += [attr.name for attr in self._moved_attributes] - return attrs - - # Subclasses should override this - _moved_attributes = [] - - -class MovedAttribute(_LazyDescr): - - def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): - super(MovedAttribute, self).__init__(name) - if PY3: - if new_mod is None: - new_mod = name - self.mod = new_mod - if new_attr is None: - if old_attr is None: - new_attr = name - else: - new_attr = old_attr - self.attr = new_attr - else: - self.mod = old_mod - if old_attr is None: - old_attr = name - self.attr = old_attr - - def _resolve(self): - module = _import_module(self.mod) - return getattr(module, self.attr) - - -class _SixMetaPathImporter(object): - """ - A meta path importer to import six.moves and its submodules. - - This class implements a PEP302 finder and loader. It should be compatible - with Python 2.5 and all existing versions of Python3 - """ - def __init__(self, six_module_name): - self.name = six_module_name - self.known_modules = {} - - def _add_module(self, mod, *fullnames): - for fullname in fullnames: - self.known_modules[self.name + "." + fullname] = mod - - def _get_module(self, fullname): - return self.known_modules[self.name + "." + fullname] - - def find_module(self, fullname, path=None): - if fullname in self.known_modules: - return self - return None - - def __get_module(self, fullname): - try: - return self.known_modules[fullname] - except KeyError: - raise ImportError("This loader does not know module " + fullname) - - def load_module(self, fullname): - try: - # in case of a reload - return sys.modules[fullname] - except KeyError: - pass - mod = self.__get_module(fullname) - if isinstance(mod, MovedModule): - mod = mod._resolve() - else: - mod.__loader__ = self - sys.modules[fullname] = mod - return mod - - def is_package(self, fullname): - """ - Return true, if the named module is a package. - - We need this method to get correct spec objects with - Python 3.4 (see PEP451) - """ - return hasattr(self.__get_module(fullname), "__path__") - - def get_code(self, fullname): - """Return None - - Required, if is_package is implemented""" - self.__get_module(fullname) # eventually raises ImportError - return None - get_source = get_code # same as get_code - -_importer = _SixMetaPathImporter(__name__) - - -class _MovedItems(_LazyModule): - """Lazy loading of moved objects""" - __path__ = [] # mark as package - - -_moved_attributes = [ - MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), - MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), - MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), - MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), - MovedAttribute("map", "itertools", "builtins", "imap", "map"), - MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "imp", "reload"), - MovedAttribute("reduce", "__builtin__", "functools"), - MovedAttribute("StringIO", "StringIO", "io"), - MovedAttribute("UserDict", "UserDict", "collections"), - MovedAttribute("UserList", "UserList", "collections"), - MovedAttribute("UserString", "UserString", "collections"), - MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), - MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), - MovedModule("html_parser", "HTMLParser", "html.parser"), - MovedModule("http_client", "httplib", "http.client"), - MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), - MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), - MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), - MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), - MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), - MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), - MovedModule("cPickle", "cPickle", "pickle"), - MovedModule("queue", "Queue"), - MovedModule("reprlib", "repr"), - MovedModule("socketserver", "SocketServer"), - MovedModule("_thread", "thread", "_thread"), - MovedModule("tkinter", "Tkinter"), - MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), - MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), - MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), - MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), - MovedModule("tkinter_tix", "Tix", "tkinter.tix"), - MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), - MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), - MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), - MovedModule("tkinter_colorchooser", "tkColorChooser", - "tkinter.colorchooser"), - MovedModule("tkinter_commondialog", "tkCommonDialog", - "tkinter.commondialog"), - MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), - MovedModule("tkinter_font", "tkFont", "tkinter.font"), - MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), - MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", - "tkinter.simpledialog"), - MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), - MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), - MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), - MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), - MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), - MovedModule("winreg", "_winreg"), -] -for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) - if isinstance(attr, MovedModule): - _importer._add_module(attr, "moves." + attr.name) -del attr - -_MovedItems._moved_attributes = _moved_attributes - -moves = _MovedItems(__name__ + ".moves") -_importer._add_module(moves, "moves") - - -class Module_six_moves_urllib_parse(_LazyModule): - """Lazy loading of moved objects in six.moves.urllib_parse""" - - -_urllib_parse_moved_attributes = [ - MovedAttribute("ParseResult", "urlparse", "urllib.parse"), - MovedAttribute("SplitResult", "urlparse", "urllib.parse"), - MovedAttribute("parse_qs", "urlparse", "urllib.parse"), - MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), - MovedAttribute("urldefrag", "urlparse", "urllib.parse"), - MovedAttribute("urljoin", "urlparse", "urllib.parse"), - MovedAttribute("urlparse", "urlparse", "urllib.parse"), - MovedAttribute("urlsplit", "urlparse", "urllib.parse"), - MovedAttribute("urlunparse", "urlparse", "urllib.parse"), - MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), - MovedAttribute("quote", "urllib", "urllib.parse"), - MovedAttribute("quote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote", "urllib", "urllib.parse"), - MovedAttribute("unquote_plus", "urllib", "urllib.parse"), - MovedAttribute("urlencode", "urllib", "urllib.parse"), - MovedAttribute("splitquery", "urllib", "urllib.parse"), -] -for attr in _urllib_parse_moved_attributes: - setattr(Module_six_moves_urllib_parse, attr.name, attr) -del attr - -Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes - -_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), - "moves.urllib_parse", "moves.urllib.parse") - - -class Module_six_moves_urllib_error(_LazyModule): - """Lazy loading of moved objects in six.moves.urllib_error""" - - -_urllib_error_moved_attributes = [ - MovedAttribute("URLError", "urllib2", "urllib.error"), - MovedAttribute("HTTPError", "urllib2", "urllib.error"), - MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), -] -for attr in _urllib_error_moved_attributes: - setattr(Module_six_moves_urllib_error, attr.name, attr) -del attr - -Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes - -_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), - "moves.urllib_error", "moves.urllib.error") - - -class Module_six_moves_urllib_request(_LazyModule): - """Lazy loading of moved objects in six.moves.urllib_request""" - - -_urllib_request_moved_attributes = [ - MovedAttribute("urlopen", "urllib2", "urllib.request"), - MovedAttribute("install_opener", "urllib2", "urllib.request"), - MovedAttribute("build_opener", "urllib2", "urllib.request"), - MovedAttribute("pathname2url", "urllib", "urllib.request"), - MovedAttribute("url2pathname", "urllib", "urllib.request"), - MovedAttribute("getproxies", "urllib", "urllib.request"), - MovedAttribute("Request", "urllib2", "urllib.request"), - MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), - MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), - MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), - MovedAttribute("BaseHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), - MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), - MovedAttribute("FileHandler", "urllib2", "urllib.request"), - MovedAttribute("FTPHandler", "urllib2", "urllib.request"), - MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), - MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), - MovedAttribute("urlretrieve", "urllib", "urllib.request"), - MovedAttribute("urlcleanup", "urllib", "urllib.request"), - MovedAttribute("URLopener", "urllib", "urllib.request"), - MovedAttribute("FancyURLopener", "urllib", "urllib.request"), - MovedAttribute("proxy_bypass", "urllib", "urllib.request"), -] -for attr in _urllib_request_moved_attributes: - setattr(Module_six_moves_urllib_request, attr.name, attr) -del attr - -Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes - -_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), - "moves.urllib_request", "moves.urllib.request") - - -class Module_six_moves_urllib_response(_LazyModule): - """Lazy loading of moved objects in six.moves.urllib_response""" - - -_urllib_response_moved_attributes = [ - MovedAttribute("addbase", "urllib", "urllib.response"), - MovedAttribute("addclosehook", "urllib", "urllib.response"), - MovedAttribute("addinfo", "urllib", "urllib.response"), - MovedAttribute("addinfourl", "urllib", "urllib.response"), -] -for attr in _urllib_response_moved_attributes: - setattr(Module_six_moves_urllib_response, attr.name, attr) -del attr - -Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes - -_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), - "moves.urllib_response", "moves.urllib.response") - - -class Module_six_moves_urllib_robotparser(_LazyModule): - """Lazy loading of moved objects in six.moves.urllib_robotparser""" - - -_urllib_robotparser_moved_attributes = [ - MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), -] -for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -del attr - -Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes - -_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), - "moves.urllib_robotparser", "moves.urllib.robotparser") - - -class Module_six_moves_urllib(types.ModuleType): - """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" - __path__ = [] # mark as package - parse = _importer._get_module("moves.urllib_parse") - error = _importer._get_module("moves.urllib_error") - request = _importer._get_module("moves.urllib_request") - response = _importer._get_module("moves.urllib_response") - robotparser = _importer._get_module("moves.urllib_robotparser") - - def __dir__(self): - return ['parse', 'error', 'request', 'response', 'robotparser'] - -_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), - "moves.urllib") - - -def add_move(move): - """Add an item to six.moves.""" - setattr(_MovedItems, move.name, move) - - -def remove_move(name): - """Remove item from six.moves.""" - try: - delattr(_MovedItems, name) - except AttributeError: - try: - del moves.__dict__[name] - except KeyError: - raise AttributeError("no such move, %r" % (name,)) - - -if PY3: - _meth_func = "__func__" - _meth_self = "__self__" - - _func_closure = "__closure__" - _func_code = "__code__" - _func_defaults = "__defaults__" - _func_globals = "__globals__" -else: - _meth_func = "im_func" - _meth_self = "im_self" - - _func_closure = "func_closure" - _func_code = "func_code" - _func_defaults = "func_defaults" - _func_globals = "func_globals" - - -try: - advance_iterator = next -except NameError: - def advance_iterator(it): - return it.next() -next = advance_iterator - - -try: - callable = callable -except NameError: - def callable(obj): - return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) - - -if PY3: - def get_unbound_function(unbound): - return unbound - - create_bound_method = types.MethodType - - Iterator = object -else: - def get_unbound_function(unbound): - return unbound.im_func - - def create_bound_method(func, obj): - return types.MethodType(func, obj, obj.__class__) - - class Iterator(object): - - def next(self): - return type(self).__next__(self) - - callable = callable -_add_doc(get_unbound_function, - """Get the function out of a possibly unbound function""") - - -get_method_function = operator.attrgetter(_meth_func) -get_method_self = operator.attrgetter(_meth_self) -get_function_closure = operator.attrgetter(_func_closure) -get_function_code = operator.attrgetter(_func_code) -get_function_defaults = operator.attrgetter(_func_defaults) -get_function_globals = operator.attrgetter(_func_globals) - - -if PY3: - def iterkeys(d, **kw): - return iter(d.keys(**kw)) - - def itervalues(d, **kw): - return iter(d.values(**kw)) - - def iteritems(d, **kw): - return iter(d.items(**kw)) - - def iterlists(d, **kw): - return iter(d.lists(**kw)) -else: - def iterkeys(d, **kw): - return iter(d.iterkeys(**kw)) - - def itervalues(d, **kw): - return iter(d.itervalues(**kw)) - - def iteritems(d, **kw): - return iter(d.iteritems(**kw)) - - def iterlists(d, **kw): - return iter(d.iterlists(**kw)) - -_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") -_add_doc(itervalues, "Return an iterator over the values of a dictionary.") -_add_doc(iteritems, - "Return an iterator over the (key, value) pairs of a dictionary.") -_add_doc(iterlists, - "Return an iterator over the (key, [values]) pairs of a dictionary.") - - -if PY3: - def b(s): - return s.encode("latin-1") - def u(s): - return s - unichr = chr - if sys.version_info[1] <= 1: - def int2byte(i): - return bytes((i,)) - else: - # This is about 2x faster than the implementation above on 3.2+ - int2byte = operator.methodcaller("to_bytes", 1, "big") - byte2int = operator.itemgetter(0) - indexbytes = operator.getitem - iterbytes = iter - import io - StringIO = io.StringIO - BytesIO = io.BytesIO -else: - def b(s): - return s - # Workaround for standalone backslash - def u(s): - return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") - unichr = unichr - int2byte = chr - def byte2int(bs): - return ord(bs[0]) - def indexbytes(buf, i): - return ord(buf[i]) - def iterbytes(buf): - return (ord(byte) for byte in buf) - import StringIO - StringIO = BytesIO = StringIO.StringIO -_add_doc(b, """Byte literal""") -_add_doc(u, """Text literal""") - - -if PY3: - exec_ = getattr(moves.builtins, "exec") - - - def reraise(tp, value, tb=None): - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - -else: - def exec_(_code_, _globs_=None, _locs_=None): - """Execute code in a namespace.""" - if _globs_ is None: - frame = sys._getframe(1) - _globs_ = frame.f_globals - if _locs_ is None: - _locs_ = frame.f_locals - del frame - elif _locs_ is None: - _locs_ = _globs_ - exec("""exec _code_ in _globs_, _locs_""") - - - exec_("""def reraise(tp, value, tb=None): - raise tp, value, tb -""") - - -print_ = getattr(moves.builtins, "print", None) -if print_ is None: - def print_(*args, **kwargs): - """The new-style print function for Python 2.4 and 2.5.""" - fp = kwargs.pop("file", sys.stdout) - if fp is None: - return - def write(data): - if not isinstance(data, basestring): - data = str(data) - # If the file has an encoding, encode unicode with it. - if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): - errors = getattr(fp, "errors", None) - if errors is None: - errors = "strict" - data = data.encode(fp.encoding, errors) - fp.write(data) - want_unicode = False - sep = kwargs.pop("sep", None) - if sep is not None: - if isinstance(sep, unicode): - want_unicode = True - elif not isinstance(sep, str): - raise TypeError("sep must be None or a string") - end = kwargs.pop("end", None) - if end is not None: - if isinstance(end, unicode): - want_unicode = True - elif not isinstance(end, str): - raise TypeError("end must be None or a string") - if kwargs: - raise TypeError("invalid keyword arguments to print()") - if not want_unicode: - for arg in args: - if isinstance(arg, unicode): - want_unicode = True - break - if want_unicode: - newline = unicode("\n") - space = unicode(" ") - else: - newline = "\n" - space = " " - if sep is None: - sep = space - if end is None: - end = newline - for i, arg in enumerate(args): - if i: - write(sep) - write(arg) - write(end) - -_add_doc(reraise, """Reraise an exception.""") - -if sys.version_info[0:2] < (3, 4): - def wraps(wrapped): - def wrapper(f): - f = functools.wraps(wrapped)(f) - f.__wrapped__ = wrapped - return f - return wrapper -else: - wraps = functools.wraps - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(meta): - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - -# Complete the moves implementation. -# This code is at the end of this module to speed up module loading. -# Turn this module into a package. -__path__ = [] # required for PEP 302 and PEP 451 -__package__ = __name__ # see PEP 366 @ReservedAssignment -if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable -# Remove other six meta path importers, since they cause problems. This can -# happen if six is removed from sys.modules and then reloaded. (Setuptools does -# this for some reason.) -if sys.meta_path: - for i, importer in enumerate(sys.meta_path): - # Here's some real nastiness: Another "instance" of the six module might - # be floating around. Therefore, we can't use isinstance() to check for - # the six meta path importer, since the other six instance will have - # inserted an importer with different class. - if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): - del sys.meta_path[i] - break - del i, importer -# Finally, add the importer to the meta path import hook. -sys.meta_path.append(_importer) From 96aed21b42121acde68dd6b3732c3fbae0903569 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Jul 2014 21:17:52 -0400 Subject: [PATCH 4265/8469] Correct incorrect module for urllib.errors --HG-- branch : feature/issue-229 extra : rebase_source : 93a1adbc64455d9cf7c3c8cceb7bbd283c06ac5b --- setuptools/package_index.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9c8992189c..a14c8ac6de 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -315,7 +315,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. - if isinstance(f, urllib.request.HTTPError): + if isinstance(f, urllib.error.HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' else: @@ -666,7 +666,7 @@ def _download_to(self, url, filename): try: checker = HashChecker.from_url(url) fp = self.open_url(strip_fragment(url)) - if isinstance(fp, urllib.request.HTTPError): + if isinstance(fp, urllib.error.HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code,fp.msg) ) @@ -709,10 +709,10 @@ def open_url(self, url, warning=None): self.warn(warning, msg) else: raise DistutilsError('%s %s' % (url, msg)) - except urllib.request.HTTPError: + except urllib.error.HTTPError: v = sys.exc_info()[1] return v - except urllib.request.URLError: + except urllib.error.URLError: v = sys.exc_info()[1] if warning: self.warn(warning, v.reason) From 0d6a21f045a6137d6ed96d89d966bceacd8a2531 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Jul 2014 14:00:46 -0400 Subject: [PATCH 4266/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ef456a7e10..107aa093e1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +5.4.1 +----- + +* Python #7776: (ssl_support) Correct usage of host for validation when + tunneling for HTTPS. + --- 5.4 --- From 793bdfffdf388ae3203d4703b4feac3f1f4ccd96 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Jul 2014 14:04:10 -0400 Subject: [PATCH 4267/8469] Bumped to 5.4.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b017944deb..f9be4327e5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.5" +DEFAULT_VERSION = "5.4.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 773d9307b1..2ac7a45eb7 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.5' +__version__ = '5.4.1' From 230e26cdb047dfb01ae66a41b076ea494c4ab2eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Jul 2014 14:04:12 -0400 Subject: [PATCH 4268/8469] Added tag 5.4.1 for changeset ba3b08c7bffd --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9204dc6ad1..79de7ea963 100644 --- a/.hgtags +++ b/.hgtags @@ -147,3 +147,4 @@ e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 f493e6c4ffd88951871110858c141385305e0077 5.2 1f9505cfd7524ce0c83ab31d139f47b39c56ccbe 5.3 baae103e80c307008b156e426a07eb9f486eb4f0 5.4 +ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 From f420ad2c7d1c0cb232c9713c02fc0f5c798fc682 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Jul 2014 14:04:46 -0400 Subject: [PATCH 4269/8469] Bumped to 5.4.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f9be4327e5..b2435fed37 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.4.1" +DEFAULT_VERSION = "5.4.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 2ac7a45eb7..16cc138239 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.4.1' +__version__ = '5.4.2' From 9c8e39e04f9391ecc42bce0000f6fba119dae6eb Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sun, 6 Jul 2014 16:14:33 -0700 Subject: [PATCH 4270/8469] Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler due to possible uninitialized _config_vars. Original patch by Alex Gaynor. --- sysconfig.py | 3 ++- tests/test_sysconfig.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 75537db8d0..5b94fa2378 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -179,7 +179,8 @@ def customize_compiler(compiler): # version and build tools may not support the same set # of CPU architectures for universal builds. global _config_vars - if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): + # Use get_config_var() to ensure _config_vars is initialized. + if not get_config_var('CUSTOMIZED_OSX_COMPILER'): import _osx_support _osx_support.customize_compiler(_config_vars) _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 95fa9dc111..fc4d1de185 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,6 +1,9 @@ """Tests for distutils.sysconfig.""" import os import shutil +import subprocess +import sys +import textwrap import unittest from distutils import sysconfig @@ -174,6 +177,25 @@ def test_SO_in_vars(self): self.assertIsNotNone(vars['SO']) self.assertEqual(vars['SO'], vars['EXT_SUFFIX']) + def test_customize_compiler_before_get_config_vars(self): + # Issue #21923: test that a Distribution compiler + # instance can be called without an explicit call to + # get_config_vars(). + with open(TESTFN, 'w') as f: + f.writelines(textwrap.dedent('''\ + from distutils.core import Distribution + config = Distribution().get_command_obj('config') + # try_compile may pass or it may fail if no compiler + # is found but it should not raise an exception. + rc = config.try_compile('int x;') + ''')) + p = subprocess.Popen([str(sys.executable), TESTFN], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + universal_newlines=True) + outs, errs = p.communicate() + self.assertEqual(0, p.returncode, "Subprocess failed: " + outs) + def test_suite(): suite = unittest.TestSuite() From 4cd8b93b95ccac00f3926ffbcead754331853c6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Jul 2014 08:58:33 -0400 Subject: [PATCH 4271/8469] Use simple asserts. pytest handles this nicely. Removes broken _assertIn. --- setuptools/tests/test_resources.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 443905cc24..279fd1396a 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -575,13 +575,6 @@ def tearDown(self): pkg_resources._namespace_packages = self._ns_pkgs.copy() sys.path = self._prev_sys_path[:] - def _assertIn(self, member, container): - """ assertIn and assertTrue does not exist in Python2.3""" - if member not in container: - standardMsg = '%s not found in %s' % (safe_repr(member), - safe_repr(container)) - self.fail(self._formatMessage(msg, standardMsg)) - def test_two_levels_deep(self): """ Test nested namespace packages @@ -605,13 +598,13 @@ def test_two_levels_deep(self): pkg2_init.write(ns_str) pkg2_init.close() import pkg1 - self._assertIn("pkg1", pkg_resources._namespace_packages.keys()) + assert "pkg1" in pkg_resources._namespace_packages try: import pkg1.pkg2 except ImportError: self.fail("Setuptools tried to import the parent namespace package") # check the _namespace_packages dict - self._assertIn("pkg1.pkg2", pkg_resources._namespace_packages.keys()) + assert "pkg1.pkg2" in pkg_resources._namespace_packages self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) # check the __path__ attribute contains both paths self.assertEqual(pkg1.pkg2.__path__, [ From 7003458aa6b13578f8862dca6041ec5c55c21027 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Jul 2014 09:00:52 -0400 Subject: [PATCH 4272/8469] More simple asserts --- setuptools/tests/test_resources.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 279fd1396a..1f3b747de0 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -605,8 +605,10 @@ def test_two_levels_deep(self): self.fail("Setuptools tried to import the parent namespace package") # check the _namespace_packages dict assert "pkg1.pkg2" in pkg_resources._namespace_packages - self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) + assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"] # check the __path__ attribute contains both paths - self.assertEqual(pkg1.pkg2.__path__, [ + expected = [ os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"), - os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2")]) + os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2"), + ] + assert pkg1.pkg2.__path__ == expected From a9283f60f7136c12b8ab555bffdeda63e4d4fea5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Jul 2014 09:05:37 -0400 Subject: [PATCH 4273/8469] Bump version pulled for testing ez_setup.py --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 022824f99b..44488787ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ python: script: - python setup.py test - python setup.py ptr - - python ez_setup.py --version 3.5.1 + - python ez_setup.py --version 5.4.1 From 1237522b992f84cf674833f0745b144874db817c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Jul 2014 09:12:38 -0400 Subject: [PATCH 4274/8469] Disable test_two_levels_deep when /tmp is a symlink. The results it is returning are suitable (shouldn't cause errors in runtime). Users are invited to trace the problem and find a solution. Fixes #231. --- setuptools/tests/test_resources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 1f3b747de0..759bbcd5de 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -16,6 +16,7 @@ from setuptools.command.easy_install import (get_script_header, is_sh, nt_quote_arg) from setuptools.compat import StringIO, iteritems, PY3 +from .py26compat import skipIf try: frozenset @@ -575,6 +576,8 @@ def tearDown(self): pkg_resources._namespace_packages = self._ns_pkgs.copy() sys.path = self._prev_sys_path[:] + msg = "Test fails when /tmp is a symlink. See #231" + @skipIf(os.path.islink(tempfile.gettempdir()), msg) def test_two_levels_deep(self): """ Test nested namespace packages From c6fbf0c0ab840ad86687323c7532ff5b7de6c6bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Jul 2014 09:14:36 -0400 Subject: [PATCH 4275/8469] frozenset is available in Python 2.6 --- setuptools/tests/test_resources.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 759bbcd5de..3baa3ab104 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -18,11 +18,6 @@ from setuptools.compat import StringIO, iteritems, PY3 from .py26compat import skipIf -try: - frozenset -except NameError: - from sets import ImmutableSet as frozenset - def safe_repr(obj, short=False): """ copied from Python2.7""" try: From 5ef6395c634d60e1e7aff46970590b615fc2b754 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 22 Jul 2014 15:00:37 +0300 Subject: [PATCH 4276/8469] Issue #22032: __qualname__ instead of __name__ is now always used to format fully qualified class names of Python implemented classes. --- extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.py b/extension.py index cc04a18a3a..7efbb74f89 100644 --- a/extension.py +++ b/extension.py @@ -134,7 +134,7 @@ def __init__(self, name, sources, def __repr__(self): return '<%s.%s(%r) at %#x>' % ( self.__class__.__module__, - self.__class__.__name__, + self.__class__.__qualname__, self.name, id(self)) From b73d7fa62dae090d486c54c8cc434e955a06ffb6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:19:40 -0400 Subject: [PATCH 4277/8469] Remove unused variable --HG-- extra : rebase_source : c4b515b677e318ffdcd78b2d90ab772e7d1f94e3 --- setuptools/tests/test_sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 06b3d4340f..0e04ad1c34 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -19,7 +19,7 @@ def has_win32com(): if not sys.platform.startswith('win32'): return False try: - mod = __import__('win32com') + __import__('win32com') except ImportError: return False return True From ca46f074d12651e32250737c7f380b343b0882ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:20:32 -0400 Subject: [PATCH 4278/8469] Python 2.3 no longer supported --HG-- extra : rebase_source : debc6141ad369eafeb78b808a15d8558ff3fb83b --- setuptools/tests/test_sandbox.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 0e04ad1c34..0f2e693d98 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -33,8 +33,6 @@ def tearDown(self): shutil.rmtree(self.dir) def test_devnull(self): - if sys.version < '2.4': - return sandbox = DirectorySandbox(self.dir) sandbox.run(self._file_writer(os.devnull)) From 33f496c61e086bd1ac701e44bc17315c0442010c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:29:11 -0400 Subject: [PATCH 4279/8469] Add test capturing failure on Python 2.6. Ref #236 --HG-- extra : rebase_source : 99a2b1e437691f9e1a9982357bc70d91fce91953 --- setuptools.egg-info/entry_points.txt | 2 +- setuptools/tests/test_sandbox.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index de842da822..25a8e1c303 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 0f2e693d98..6a890ebc97 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -73,5 +73,11 @@ def test_setup_py_with_BOM(self): setuptools.sandbox._execfile(target, vars(namespace)) assert namespace.result == 'passed' + def test_setup_py_with_CRLF(self): + setup_py = os.path.join(self.dir, 'setup.py') + with open(setup_py, 'wb') as stream: + stream.write(b'"degenerate script"\r\n') + setuptools.sandbox._execfile(setup_py, globals()) + if __name__ == '__main__': unittest.main() From 249e5853496ec108dc78e58c003bf46315b50ffc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:31:47 -0400 Subject: [PATCH 4280/8469] Extract variable --- setuptools/sandbox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 7985e9eef6..a0d3dc6139 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -30,7 +30,8 @@ def _execfile(filename, globals, locals=None): """ Python 3 implementation of execfile. """ - with open(filename, 'rb') as stream: + mode = 'rb' + with open(filename, mode) as stream: script = stream.read() if locals is None: locals = globals From 59e3528c710363e167e0860aab4fd1a611cc058b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:36:08 -0400 Subject: [PATCH 4281/8469] Correct execfile implementation for Python 2.6. Fixes #236. --- CHANGES.txt | 6 ++++++ setuptools.egg-info/entry_points.txt | 2 +- setuptools/sandbox.py | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 107aa093e1..bb5dc66f79 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +5.4.2 +----- + +* Issue #236: Corrected regression in execfile implementation for Python 2.6. + ----- 5.4.1 ----- diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 25a8e1c303..de842da822 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index a0d3dc6139..e79a13a8a1 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -31,6 +31,10 @@ def _execfile(filename, globals, locals=None): Python 3 implementation of execfile. """ mode = 'rb' + # Python 2.6 compile requires LF for newlines, so use deprecated + # Universal newlines support. + if sys.version_info < (2, 7): + mode += 'U' with open(filename, mode) as stream: script = stream.read() if locals is None: From 8b1cd5ffa7cff7de258e11199fa2ae69ac951c4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:01:36 -0400 Subject: [PATCH 4282/8469] Downgrade pytest to get tests to pass. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 44488787ea..dc7ed0802e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ python: - pypy # command to run tests script: + # work around https://bitbucket.org/hpk42/pytest/issue/555 + - sudo easy_install 'pytest<2.6' - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From 28ad58b6655b09b9b3e602b2c97eceeb98a7cf9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:05:07 -0400 Subject: [PATCH 4283/8469] Use 'python -m' to install to active Python version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc7ed0802e..957064dcfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ python: # command to run tests script: # work around https://bitbucket.org/hpk42/pytest/issue/555 - - sudo easy_install 'pytest<2.6' + - sudo python -m easy_install 'pytest<2.6' - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From 5eac25d201c836281793688282d7659670856d11 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:15:35 -0400 Subject: [PATCH 4284/8469] Try running not in the context of the project under test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 957064dcfb..23a1986a46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ python: # command to run tests script: # work around https://bitbucket.org/hpk42/pytest/issue/555 - - sudo python -m easy_install 'pytest<2.6' + - pushd /tmp; sudo python -m easy_install 'pytest<2.6'; popd - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From ba9c41335311efe36ac38a061bdceef7633968d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:21:17 -0400 Subject: [PATCH 4285/8469] Omit sudo. Hope pytest is in the virtualenv --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23a1986a46..3077778afd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ python: # command to run tests script: # work around https://bitbucket.org/hpk42/pytest/issue/555 - - pushd /tmp; sudo python -m easy_install 'pytest<2.6'; popd + - pushd /tmp; python -m easy_install 'pytest<2.6'; popd - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From 1d84ad8fa7e6be6c27d57c3459a5153d55dca4f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:24:02 -0400 Subject: [PATCH 4286/8469] Added tag 5.4.2 for changeset 7adcf1397f6e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 79de7ea963..6b7d38a8cc 100644 --- a/.hgtags +++ b/.hgtags @@ -148,3 +148,4 @@ f493e6c4ffd88951871110858c141385305e0077 5.2 1f9505cfd7524ce0c83ab31d139f47b39c56ccbe 5.3 baae103e80c307008b156e426a07eb9f486eb4f0 5.4 ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 +7adcf1397f6eccb9e73eda294343de2943f7c8fb 5.4.2 From 0341e4d0b24162ec6a4280c99bafdf8b7bcab324 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 16:24:36 -0400 Subject: [PATCH 4287/8469] Bumped to 5.4.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b2435fed37..791973ec83 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.4.2" +DEFAULT_VERSION = "5.4.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 16cc138239..0e0a34f944 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.4.2' +__version__ = '5.4.3' From 9ce32d32b0b4d62ba844884b436d5a57e5b921cb Mon Sep 17 00:00:00 2001 From: ericholscher Date: Sat, 2 Aug 2014 08:07:57 -0700 Subject: [PATCH 4288/8469] Fix docs to work --- docs/conf.py | 4 ++++ setuptools.egg-info/entry_points.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 9929aaf692..4ab9f41c01 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,9 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +import sys, os + +sys.path.append(os.path.abspath('..')) import setup as setup_script @@ -195,3 +198,4 @@ # If false, no module index is generated. #latex_use_modindex = True + diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index de842da822..528f38e789 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias From 22a27948727dea8a36c9ab663b78c6b24547c0f5 Mon Sep 17 00:00:00 2001 From: ericholscher Date: Sat, 2 Aug 2014 15:35:20 +0000 Subject: [PATCH 4289/8469] entry_points.txt edited online with Bitbucket --- setuptools.egg-info/entry_points.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index 528f38e789..de842da822 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.7 = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias From 702a87a0a2ab03c376fea01903075c8fed45a8fb Mon Sep 17 00:00:00 2001 From: ericholscher Date: Sat, 2 Aug 2014 15:35:33 +0000 Subject: [PATCH 4290/8469] conf.py edited online with Bitbucket --- docs/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4ab9f41c01..faf3a91508 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -198,4 +198,3 @@ # If false, no module index is generated. #latex_use_modindex = True - From 1194bad8b3d424469364ef497c3202dfb4ebcf62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Aug 2014 10:41:58 -0400 Subject: [PATCH 4291/8469] Correct syntax in gui_scripts. Fixes #238. --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 86e23ff944..c3844cf212 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -479,7 +479,7 @@ script called ``baz``, you might do something like this:: 'bar = other_module:some_func', ], 'gui_scripts': [ - 'baz = my_package_gui.start_func', + 'baz = my_package_gui:start_func', ] } ) From 0ce646ec0138c76d9cf7a1a25103a865a54f18fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Aug 2014 08:03:49 -0400 Subject: [PATCH 4292/8469] Testing fix for pytest-555 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3077778afd..18334df498 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ python: - pypy # command to run tests script: - # work around https://bitbucket.org/hpk42/pytest/issue/555 - - pushd /tmp; python -m easy_install 'pytest<2.6'; popd + # testing fix for https://bitbucket.org/hpk42/pytest/issue/555 + - pip install --pre -i https://devpi.net/hpk/dev/ pytest - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From f18617330c7c34684c7cd8e7d2fbb9873e12e874 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Aug 2014 08:13:15 -0400 Subject: [PATCH 4293/8469] Indicate upgrade to test pytest-555 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 18334df498..bc387f46cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ python: # command to run tests script: # testing fix for https://bitbucket.org/hpk42/pytest/issue/555 - - pip install --pre -i https://devpi.net/hpk/dev/ pytest + - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From ac14ffe92376c54bb2d5a443e5177d85faeda75d Mon Sep 17 00:00:00 2001 From: Benedikt Morbach Date: Thu, 7 Aug 2014 17:57:00 +0200 Subject: [PATCH 4294/8469] make order of lines in top_level.txt deterministic like it was done for requirements and entry_points --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 72493d0b97..1ef723da69 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -389,7 +389,7 @@ def write_toplevel_names(cmd, basename, filename): for k in cmd.distribution.iter_distribution_names() ] ) - cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n') + cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs) + '\n') def overwrite_arg(cmd, basename, filename): From 50cd15aef3a657ee9cf86326e18e3bc2919b4cf6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 14:06:15 -0400 Subject: [PATCH 4295/8469] Include setup_requires directive in Distribution attributes and metadata. Fixes #239. --- CHANGES.txt | 8 ++++++++ setup.py | 1 + setuptools/dist.py | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bb5dc66f79..71165b1903 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +--- +5.5 +--- + +* Issue #239: Setuptools now includes the setup_requires directive on + Distribution objects and validates the syntax just like install_requires + and tests_require directives. + ----- 5.4.2 ----- diff --git a/setup.py b/setup.py index f7be05670c..52d16ff3bb 100755 --- a/setup.py +++ b/setup.py @@ -144,6 +144,7 @@ def _save_entry_points(self): "extras_require = setuptools.dist:check_extras", "install_requires = setuptools.dist:check_requirements", "tests_require = setuptools.dist:check_requirements", + "setup_reqires = setuptools.dist:check_requirements", "entry_points = setuptools.dist:check_entry_points", "test_suite = setuptools.dist:check_test_suite", "zip_safe = setuptools.dist:assert_bool", diff --git a/setuptools/dist.py b/setuptools/dist.py index dac4dfa8f8..8b36f67c1d 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -259,7 +259,7 @@ def __init__(self, attrs=None): self.dependency_links = attrs.pop('dependency_links', []) assert_string_list(self,'dependency_links',self.dependency_links) if attrs and 'setup_requires' in attrs: - self.fetch_build_eggs(attrs.pop('setup_requires')) + 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) From 1531c8041c6b3f4e077d6edeb8305db2aacdbfb7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 14:45:59 -0400 Subject: [PATCH 4296/8469] Correct documentation --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 791973ec83..96ec11d5c1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -268,7 +268,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, Download setuptools from a specified location and return its filename `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end + as an sdist for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. From 28097c4d3dad73f7813a5e271ab3ad9dc6302b99 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 14:49:28 -0400 Subject: [PATCH 4297/8469] Bumped to 5.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 96ec11d5c1..3f98bd07b9 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.4.3" +DEFAULT_VERSION = "5.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 0e0a34f944..773d9307b1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.4.3' +__version__ = '5.5' From 19a627c768b7c0a155beea2fce0bb0f4c98c3959 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 14:49:30 -0400 Subject: [PATCH 4298/8469] Added tag 5.5 for changeset 68910a89f97a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6b7d38a8cc..74f7f16d65 100644 --- a/.hgtags +++ b/.hgtags @@ -149,3 +149,4 @@ f493e6c4ffd88951871110858c141385305e0077 5.2 baae103e80c307008b156e426a07eb9f486eb4f0 5.4 ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 7adcf1397f6eccb9e73eda294343de2943f7c8fb 5.4.2 +68910a89f97a508a64f9f235dc64ad43d4477ea0 5.5 From f4ff967301bdd5f33631d2650baad9776baa4c10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 14:50:14 -0400 Subject: [PATCH 4299/8469] Bumped to 5.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 1 + setuptools/version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3f98bd07b9..4b9eee61b7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.5" +DEFAULT_VERSION = "5.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index de842da822..df4ac2aefb 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -36,6 +36,7 @@ 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_reqires = setuptools.dist:check_requirements test_loader = setuptools.dist:check_importable test_runner = setuptools.dist:check_importable test_suite = setuptools.dist:check_test_suite diff --git a/setuptools/version.py b/setuptools/version.py index 773d9307b1..49e04a6265 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.5' +__version__ = '5.6' From b95f4114a81284d6c286eadd799032277c38f6f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 19:50:55 -0400 Subject: [PATCH 4300/8469] Fix typo; ref #239. --- CHANGES.txt | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 71165b1903..54284c886b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +5.5.1 +----- + +* Issue #239: Fix typo in 5.5 such that fix did not take. + --- 5.5 --- diff --git a/setup.py b/setup.py index 52d16ff3bb..bac4e29dbf 100755 --- a/setup.py +++ b/setup.py @@ -144,7 +144,7 @@ def _save_entry_points(self): "extras_require = setuptools.dist:check_extras", "install_requires = setuptools.dist:check_requirements", "tests_require = setuptools.dist:check_requirements", - "setup_reqires = setuptools.dist:check_requirements", + "setup_requires = setuptools.dist:check_requirements", "entry_points = setuptools.dist:check_entry_points", "test_suite = setuptools.dist:check_test_suite", "zip_safe = setuptools.dist:assert_bool", From 26cc02d02a295ff30c6a0f0b661bfc6f2fd2246b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 19:55:29 -0400 Subject: [PATCH 4301/8469] Bumped to 5.5.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4b9eee61b7..6de57c0404 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.6" +DEFAULT_VERSION = "5.5.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 49e04a6265..45e4cae417 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.6' +__version__ = '5.5.1' From 09987b9fd84bf2cda4fea81bd4a8d500cb553281 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 19:55:32 -0400 Subject: [PATCH 4302/8469] Added tag 5.5.1 for changeset 949a66af4f03 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 74f7f16d65..6fb941db3d 100644 --- a/.hgtags +++ b/.hgtags @@ -150,3 +150,4 @@ baae103e80c307008b156e426a07eb9f486eb4f0 5.4 ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 7adcf1397f6eccb9e73eda294343de2943f7c8fb 5.4.2 68910a89f97a508a64f9f235dc64ad43d4477ea0 5.5 +949a66af4f03521e1404deda940aa951418a13d2 5.5.1 From 064554652d35bfd14eb4787a808d4d27d4f643a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Aug 2014 19:56:16 -0400 Subject: [PATCH 4303/8469] Bumped to 5.5.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools.egg-info/entry_points.txt | 2 +- setuptools/version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6de57c0404..cf3621cac6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.5.1" +DEFAULT_VERSION = "5.5.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index df4ac2aefb..72a5ffe0b5 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -36,7 +36,7 @@ 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_reqires = setuptools.dist:check_requirements +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 diff --git a/setuptools/version.py b/setuptools/version.py index 45e4cae417..e441e91582 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.5.1' +__version__ = '5.5.2' From dd832d63bdc2c18a5456f41a1d099e59becd0bcb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Aug 2014 12:52:47 -0400 Subject: [PATCH 4304/8469] Use absolute_import in svn_utils. Fixes #242. --- CHANGES.txt | 7 +++++++ setuptools/svn_utils.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 54284c886b..3674383ccf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +--- +5.6 +--- + +* Issue #242: Use absolute imports in svn_utils to avoid issues if the + installing package adds an xml module to the path. + ----- 5.5.1 ----- diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 2dcfd89913..dadb682a59 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import os import re import sys From 0a9f4f05fd110d6676de8cd58506499a1ac00aad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Aug 2014 12:57:25 -0400 Subject: [PATCH 4305/8469] Bumped to 5.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index cf3621cac6..4b9eee61b7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.5.2" +DEFAULT_VERSION = "5.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index e441e91582..49e04a6265 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.5.2' +__version__ = '5.6' From 912029443187711fcf3c0b7bf841dba4a6cb8d74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Aug 2014 12:57:27 -0400 Subject: [PATCH 4306/8469] Added tag 5.6 for changeset a1fc0220bfa3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6fb941db3d..93337a77b4 100644 --- a/.hgtags +++ b/.hgtags @@ -151,3 +151,4 @@ ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 7adcf1397f6eccb9e73eda294343de2943f7c8fb 5.4.2 68910a89f97a508a64f9f235dc64ad43d4477ea0 5.5 949a66af4f03521e1404deda940aa951418a13d2 5.5.1 +a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6 From 06c0f3f41296ab29b626b3c7970f7bfa9e159439 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Aug 2014 12:58:05 -0400 Subject: [PATCH 4307/8469] Bumped to 5.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4b9eee61b7..a34fa806d6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.6" +DEFAULT_VERSION = "5.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 49e04a6265..8666d542a9 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.6' +__version__ = '5.7' From 5cbc6c70851acaa617a581c977aa0a55e2391ef7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Aug 2014 09:50:33 -0400 Subject: [PATCH 4308/8469] Use MemoizedZipManifests for all operations. Fixes #240. --- CHANGES.txt | 11 +++++++++++ pkg_resources.py | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3674383ccf..83b05bbe55 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,17 @@ CHANGES ======= +--- +5.7 +--- + +* Issue #240: Based on real-world performance measures against 5.4, zip + manifests are now cached in all circumstances. The + ``PKG_RESOURCES_CACHE_ZIP_MANIFESTS`` environment variable is no longer + relevant. The observed "memory increase" referenced in the 5.4 release + notes and detailed in Issue #154 was likely not an increase over the status + quo, but rather only an increase over not storing the zip info at all. + --- 5.6 --- diff --git a/pkg_resources.py b/pkg_resources.py index 11debf6543..ee2c553ba1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1605,11 +1605,7 @@ class ZipProvider(EggProvider): """Resource support for zips and eggs""" eagers = None - _zip_manifests = ( - MemoizedZipManifests() - if os.environ.get('PKG_RESOURCES_CACHE_ZIP_MANIFESTS') else - ZipManifests() - ) + _zip_manifests = MemoizedZipManifests() def __init__(self, module): EggProvider.__init__(self, module) From 75f8f35ca991efcfdfcd4800e8e2f8241b9b1162 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Aug 2014 09:54:35 -0400 Subject: [PATCH 4309/8469] Added tag 5.7 for changeset 37ed55fd310d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 93337a77b4..1f1cac00e3 100644 --- a/.hgtags +++ b/.hgtags @@ -152,3 +152,4 @@ ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 68910a89f97a508a64f9f235dc64ad43d4477ea0 5.5 949a66af4f03521e1404deda940aa951418a13d2 5.5.1 a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6 +37ed55fd310d0cd32009dc5676121e86b404a23d 5.7 From 6c42630380e93d2945620bae9a351a506bf42b19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Aug 2014 09:55:11 -0400 Subject: [PATCH 4310/8469] Bumped to 5.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a34fa806d6..74c8224a3d 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.7" +DEFAULT_VERSION = "5.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 8666d542a9..868f2d33f3 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.7' +__version__ = '5.8' From 9fe6b474304a5a679b00d6218f9d9471a2c8a2fd Mon Sep 17 00:00:00 2001 From: ericholscher Date: Sat, 16 Aug 2014 15:52:49 +0000 Subject: [PATCH 4311/8469] Add comment to explain code. --- docs/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index faf3a91508..203dc93d34 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,9 +12,10 @@ # autogenerated file. # # All configuration values have a default; values that are commented out -# serve to show the default. -import sys, os +# serve to show the default +# Allow Sphinx to find the setup command that is imported below. +import sys, os sys.path.append(os.path.abspath('..')) import setup as setup_script From 5804094016f1b5188c14d1c69fdae7c55f1f242d Mon Sep 17 00:00:00 2001 From: ericholscher Date: Sun, 17 Aug 2014 05:52:57 +0000 Subject: [PATCH 4312/8469] Update conf.py to place it below original docstring. --- docs/conf.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 203dc93d34..8be5c3dd99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,17 +14,16 @@ # All configuration values have a default; values that are commented out # serve to show the default -# Allow Sphinx to find the setup command that is imported below. +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. + +# Allow Sphinx to find the setup command that is imported below, as referenced above. import sys, os sys.path.append(os.path.abspath('..')) import setup as setup_script -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.append(os.path.abspath('.')) - # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions From 3100d99a48f564f3d0673ce3f972a823fa514158 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 17 Aug 2014 23:00:42 -0500 Subject: [PATCH 4313/8469] remove 2.2 and 2.6 compat code (closes #22200) Patch from Thomas Kluyver. --- command/install.py | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/command/install.py b/command/install.py index 456511cdfb..d768dc5463 100644 --- a/command/install.py +++ b/command/install.py @@ -15,32 +15,17 @@ from distutils.util import get_platform from distutils.errors import DistutilsOptionError -# this keeps compatibility from 2.3 to 2.5 -if sys.version < "2.6": - USER_BASE = None - USER_SITE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True - -if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', - 'platlib': '$base', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } -else: - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } +from site import USER_BASE +from site import USER_SITE +HAS_USER_SITE = True + +WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', + 'headers': '$base/Include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', +} INSTALL_SCHEMES = { 'unix_prefix': { From 7702536f882a3e03cea35bb3066069793351f1ce Mon Sep 17 00:00:00 2001 From: Hugues Lerebours Date: Mon, 18 Aug 2014 14:11:34 +0200 Subject: [PATCH 4314/8469] [Fix/Typo] Fix missing parenthesis in egg_info.py Syntax error introduced in be37eff86c761a399c1ec98b0e5eeed9a90c9cd7 --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1ef723da69..06764a17c5 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -389,7 +389,7 @@ def write_toplevel_names(cmd, basename, filename): for k in cmd.distribution.iter_distribution_names() ] ) - cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs) + '\n') + cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n') def overwrite_arg(cmd, basename, filename): From 0ea11fb8f355f41f4290dd2ffd638a8b3c21baea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Aug 2014 09:24:33 -0400 Subject: [PATCH 4315/8469] Updated documentation to reflect support for PowerShell 3 on earlier versions of Windows. Fixes #247. --- README.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index ad6386e5b9..9a142bf778 100755 --- a/README.txt +++ b/README.txt @@ -23,13 +23,14 @@ latest known stable release. .. _ez_setup.py: https://bootstrap.pypa.io/ez_setup.py -Windows 8 (Powershell) -====================== +Windows (Powershell 3 or later) +=============================== For best results, uninstall previous versions FIRST (see `Uninstalling`_). -Using Windows 8 or later, it's possible to install with one simple Powershell -command. Start up Powershell and paste this command:: +Using Windows 8 (which includes PowerShell 3) or earlier versions of Windows +with PowerShell 3 installed, it's possible to install with one simple +Powershell command. Start up Powershell and paste this command:: > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - @@ -45,8 +46,8 @@ Python 2.7 installed:: > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | py -3 - The recommended way to install setuptools on Windows is to download -`ez_setup.py`_ and run it. The script will download the appropriate .egg -file and install it for you. +`ez_setup.py`_ and run it. The script will download the appropriate +distribution file and install it for you. Once installation is complete, you will find an ``easy_install`` program in your Python ``Scripts`` subdirectory. For simple invocation and best results, @@ -55,11 +56,12 @@ present. If you did a user-local install, the ``Scripts`` subdirectory is ``$env:APPDATA\Python\Scripts``. -Windows 7 (or graphical install) -================================ +Windows (simplified) +==================== -For Windows 7 and earlier, download `ez_setup.py`_ using your favorite web -browser or other technique and "run" that file. +For Windows without PowerShell 3 or for installation without a command-line, +download `ez_setup.py`_ using your preferred web browser or other technique +and "run" that file. Unix (wget) From f8844d7508fd6fe81b161b14320b2dcd8ec88315 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Aug 2014 09:48:06 -0400 Subject: [PATCH 4316/8469] Backed out changeset: be37eff86c76 Syntax was invalid. --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1ef723da69..72493d0b97 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -389,7 +389,7 @@ def write_toplevel_names(cmd, basename, filename): for k in cmd.distribution.iter_distribution_names() ] ) - cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs) + '\n') + cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n') def overwrite_arg(cmd, basename, filename): From 5725c38fc0280287b770ed7869c3c5258441f4fd Mon Sep 17 00:00:00 2001 From: Benedikt Morbach Date: Thu, 7 Aug 2014 17:57:00 +0200 Subject: [PATCH 4317/8469] make order of lines in top_level.txt deterministic without this, every build produces a different result, as the lines are ordered randomly. This makes builds reproducible. If you build a package two times, you get the same result, as you would expect. Basically the same thing was already done for requirements and entry_points.txt It is useful e.g. if you want to rebuild a package that you downloaded, to ensure that no-one tampered with it, or even if you just want to examine the differences between two builds/versions of one package. --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 72493d0b97..06764a17c5 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -389,7 +389,7 @@ def write_toplevel_names(cmd, basename, filename): for k in cmd.distribution.iter_distribution_names() ] ) - cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n') + cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n') def overwrite_arg(cmd, basename, filename): From 63ddca7cd1011b8d4b1348315c02fe9fd6a404e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 09:54:15 -0400 Subject: [PATCH 4318/8469] Normalize syntax --- setuptools/command/install_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 7692e0f328..c0c271a4ed 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -17,7 +17,7 @@ def get_exclusions(self): svem = (nsp and self.get_finalized_command('install') .single_version_externally_managed) exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo'] - if hasattr(imp, 'get_tag') : + if hasattr(imp, 'get_tag'): exclude_names.extend(( os.path.join( '__pycache__', @@ -33,7 +33,7 @@ def get_exclusions(self): parts = pkg.split('.') while parts: pkgdir = os.path.join(self.install_dir, *parts) - for f in exclude_names : + for f in exclude_names: exclude[os.path.join(pkgdir, f)] = 1 parts.pop() return exclude From a7dbe706890eab7ba330c51ea59349c28080dfde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:02:01 -0400 Subject: [PATCH 4319/8469] Extract method for generating exclude names --- setuptools/command/install_lib.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index c0c271a4ed..259f0899a8 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -16,6 +16,22 @@ def get_exclusions(self): nsp = self.distribution.namespace_packages svem = (nsp and self.get_finalized_command('install') .single_version_externally_managed) + if svem: + for pkg in nsp: + parts = pkg.split('.') + while parts: + pkgdir = os.path.join(self.install_dir, *parts) + for f in self._gen_exclude_names(): + exclude[os.path.join(pkgdir, f)] = 1 + parts.pop() + return exclude + + @staticmethod + def _gen_exclude_names(): + """ + Generate the list of file paths to be excluded for namespace + packages (bytecode cache files). + """ exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo'] if hasattr(imp, 'get_tag'): exclude_names.extend(( @@ -28,15 +44,7 @@ def get_exclusions(self): '__init__.' + imp.get_tag() + '.pyo' ), )) - if svem: - for pkg in nsp: - parts = pkg.split('.') - while parts: - pkgdir = os.path.join(self.install_dir, *parts) - for f in exclude_names: - exclude[os.path.join(pkgdir, f)] = 1 - parts.pop() - return exclude + return exclude_names def copy_tree( self, infile, outfile, From 4e5bbb8e5175b35f8cbaace630bd0dd3091d6946 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:05:18 -0400 Subject: [PATCH 4320/8469] Generate the filenames more directly. --- setuptools/command/install_lib.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 259f0899a8..3f39d9450c 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -29,22 +29,18 @@ def get_exclusions(self): @staticmethod def _gen_exclude_names(): """ - Generate the list of file paths to be excluded for namespace - packages (bytecode cache files). + Generate file paths to be excluded for namespace packages (bytecode + cache files). """ - exclude_names = ['__init__.py', '__init__.pyc', '__init__.pyo'] - if hasattr(imp, 'get_tag'): - exclude_names.extend(( - os.path.join( - '__pycache__', - '__init__.' + imp.get_tag() + '.pyc' - ), - os.path.join( - '__pycache__', - '__init__.' + imp.get_tag() + '.pyo' - ), - )) - return exclude_names + yield '__init__.py' + yield '__init__.pyc' + yield '__init__.pyo' + + if not hasattr(imp, 'get_tag'): + return + + yield os.path.join('__pycache__', '__init__.' + imp.get_tag() + '.pyc') + yield os.path.join('__pycache__', '__init__.' + imp.get_tag() + '.pyo') def copy_tree( self, infile, outfile, From f6f409ac7dc06be2524211a717182cd96b21e13f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:06:35 -0400 Subject: [PATCH 4321/8469] Extract calculation of base path --- setuptools/command/install_lib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 3f39d9450c..d1c91b7bed 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -39,8 +39,9 @@ def _gen_exclude_names(): if not hasattr(imp, 'get_tag'): return - yield os.path.join('__pycache__', '__init__.' + imp.get_tag() + '.pyc') - yield os.path.join('__pycache__', '__init__.' + imp.get_tag() + '.pyo') + base = os.path.join('__pycache__', '__init__.' + imp.get_tag()) + yield base + '.pyc' + yield base + '.pyo' def copy_tree( self, infile, outfile, From 23f5f548a9dfffe5c04f40eee461d2270ecf5f53 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:07:07 -0400 Subject: [PATCH 4322/8469] Add comment --- setuptools/command/install_lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index d1c91b7bed..a1cbd2aada 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -32,7 +32,9 @@ def _gen_exclude_names(): Generate file paths to be excluded for namespace packages (bytecode cache files). """ + # always exclude the package module itself yield '__init__.py' + yield '__init__.pyc' yield '__init__.pyo' From 03fe70a1793ea5dae7685323f1146eb12c2a0e0e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:08:48 -0400 Subject: [PATCH 4323/8469] Construct exclusions as a set --- setuptools/command/install_lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index a1cbd2aada..f4b295cc3e 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -12,7 +12,7 @@ def run(self): self.byte_compile(outfiles) def get_exclusions(self): - exclude = {} + exclude = set() nsp = self.distribution.namespace_packages svem = (nsp and self.get_finalized_command('install') .single_version_externally_managed) @@ -22,9 +22,9 @@ def get_exclusions(self): while parts: pkgdir = os.path.join(self.install_dir, *parts) for f in self._gen_exclude_names(): - exclude[os.path.join(pkgdir, f)] = 1 + exclude.add(os.path.join(pkgdir, f)) parts.pop() - return exclude + return dict.fromkeys(exclude, 1) @staticmethod def _gen_exclude_names(): From e8914480487426305fece22422fdb725f88add7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:19:36 -0400 Subject: [PATCH 4324/8469] Add docstring for get_exclusions. Just return the set as it is a sized container. --- setuptools/command/install_lib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index f4b295cc3e..91d2b25d10 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -12,6 +12,10 @@ def run(self): self.byte_compile(outfiles) def get_exclusions(self): + """ + Return a collections.Sized collections.Container of paths to be + excluded for single_version_externally_managed installations. + """ exclude = set() nsp = self.distribution.namespace_packages svem = (nsp and self.get_finalized_command('install') @@ -24,7 +28,7 @@ def get_exclusions(self): for f in self._gen_exclude_names(): exclude.add(os.path.join(pkgdir, f)) parts.pop() - return dict.fromkeys(exclude, 1) + return exclude @staticmethod def _gen_exclude_names(): From bd62121950280590c9388db065df389cf2d8280d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:29:38 -0400 Subject: [PATCH 4325/8469] Extract method for calculating namespace packages for single_version_externally_managed --- setuptools/command/install_lib.py | 34 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 91d2b25d10..bf587a041a 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -17,19 +17,31 @@ def get_exclusions(self): excluded for single_version_externally_managed installations. """ exclude = set() - nsp = self.distribution.namespace_packages - svem = (nsp and self.get_finalized_command('install') - .single_version_externally_managed) - if svem: - for pkg in nsp: - parts = pkg.split('.') - while parts: - pkgdir = os.path.join(self.install_dir, *parts) - for f in self._gen_exclude_names(): - exclude.add(os.path.join(pkgdir, f)) - parts.pop() + for pkg in self._get_SVEM_NSPs(): + parts = pkg.split('.') + while parts: + pkgdir = os.path.join(self.install_dir, *parts) + for f in self._gen_exclude_names(): + exclude.add(os.path.join(pkgdir, f)) + parts.pop() return exclude + def _get_SVEM_NSPs(self): + """ + Get namespace packages (list) but only for + single_version_externally_managed installations and empty otherwise. + """ + # TODO: is it necessary to short-circuit here? i.e. what's the cost + # if get_finalized_command is called even when namespace_packages is + # False? + if not self.distribution.namespace_packages: + return [] + + install_cmd = self.get_finalized_command('install') + svem = install_cmd.single_version_externally_managed + + return self.distribution.namespace_packages if svem else [] + @staticmethod def _gen_exclude_names(): """ From 82c2101634a423ae9ccf003612b89fbd230f8303 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:39:53 -0400 Subject: [PATCH 4326/8469] Extract method for computing parent packages of a package --- setuptools/command/install_lib.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index bf587a041a..88b3597219 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -17,15 +17,24 @@ def get_exclusions(self): excluded for single_version_externally_managed installations. """ exclude = set() - for pkg in self._get_SVEM_NSPs(): - parts = pkg.split('.') - while parts: + for ns_pkg in self._get_SVEM_NSPs(): + for pkg in self._all_packages(ns_pkg): + parts = pkg.split('.') pkgdir = os.path.join(self.install_dir, *parts) for f in self._gen_exclude_names(): exclude.add(os.path.join(pkgdir, f)) - parts.pop() return exclude + @staticmethod + def _all_packages(pkg_name): + """ + >>> list(install_lib._all_packages('foo.bar.baz')) + ['foo.bar.baz', 'foo.bar', 'foo'] + """ + while pkg_name: + yield pkg_name + pkg_name, sep, child = pkg_name.partition('.') + def _get_SVEM_NSPs(self): """ Get namespace packages (list) but only for From 10e504abc7f0a0c45157bf4d6cbbd63dea6a67dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:41:49 -0400 Subject: [PATCH 4327/8469] Extract path calculation for paths --- setuptools/command/install_lib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 88b3597219..92490b6e0d 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -17,12 +17,11 @@ def get_exclusions(self): excluded for single_version_externally_managed installations. """ exclude = set() + pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.')) for ns_pkg in self._get_SVEM_NSPs(): for pkg in self._all_packages(ns_pkg): - parts = pkg.split('.') - pkgdir = os.path.join(self.install_dir, *parts) for f in self._gen_exclude_names(): - exclude.add(os.path.join(pkgdir, f)) + exclude.add(os.path.join(pkg_path(pkg), f)) return exclude @staticmethod From b43f75980dd674153cafec047709092438d54b5c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:43:35 -0400 Subject: [PATCH 4328/8469] Rewrite package traversal as a generator expression --- setuptools/command/install_lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 92490b6e0d..7f157a0f96 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -18,8 +18,12 @@ def get_exclusions(self): """ exclude = set() pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.')) - for ns_pkg in self._get_SVEM_NSPs(): - for pkg in self._all_packages(ns_pkg): + all_packages = ( + pkg + for ns_pkg in self._get_SVEM_NSPs() + for pkg in self._all_packages(ns_pkg) + ) + for pkg in all_packages: for f in self._gen_exclude_names(): exclude.add(os.path.join(pkg_path(pkg), f)) return exclude From c6340e42c8a06a35048659d7178efb329cda3249 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:43:43 -0400 Subject: [PATCH 4329/8469] Reindent --- setuptools/command/install_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 7f157a0f96..371a9e721c 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -24,8 +24,8 @@ def get_exclusions(self): for pkg in self._all_packages(ns_pkg) ) for pkg in all_packages: - for f in self._gen_exclude_names(): - exclude.add(os.path.join(pkg_path(pkg), f)) + for f in self._gen_exclude_names(): + exclude.add(os.path.join(pkg_path(pkg), f)) return exclude @staticmethod From b908527864443899b89cf568ac9397aef7ad16c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:46:14 -0400 Subject: [PATCH 4330/8469] Use itertools.product for a cross-product of two iterables --- setuptools/command/install_lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 371a9e721c..c2730568e6 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,5 +1,6 @@ import distutils.command.install_lib as orig import os, imp +from itertools import product class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" @@ -23,9 +24,8 @@ def get_exclusions(self): for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) - for pkg in all_packages: - for f in self._gen_exclude_names(): - exclude.add(os.path.join(pkg_path(pkg), f)) + for pkg, f in product(all_packages, self._gen_exclude_names()): + exclude.add(os.path.join(pkg_path(pkg), f)) return exclude @staticmethod From 38b6f23637bcf8db5b9237393399041fbe36c65f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:46:37 -0400 Subject: [PATCH 4331/8469] Reorganize imports --- setuptools/command/install_lib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index c2730568e6..cc531c0154 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,6 +1,7 @@ -import distutils.command.install_lib as orig -import os, imp +import os +import imp from itertools import product +import distutils.command.install_lib as orig class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" From b925f19a4ef1b214650b770c74a083fc4f982758 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:52:20 -0400 Subject: [PATCH 4332/8469] Incorporate the exclusion path in the _exclude function. --- setuptools/command/install_lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index cc531c0154..f36d86515e 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -19,14 +19,18 @@ def get_exclusions(self): excluded for single_version_externally_managed installations. """ exclude = set() - pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.')) + + def _exclude(pkg, exclusion_path): + parts = pkg.split('.') + [exclusion_path] + return os.path.join(self.install_dir, *parts) + all_packages = ( pkg for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) for pkg, f in product(all_packages, self._gen_exclude_names()): - exclude.add(os.path.join(pkg_path(pkg), f)) + exclude.add(_exclude(pkg, f)) return exclude @staticmethod From 86f35df37c309d2192a95259e77c6b4ba7f73876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:56:24 -0400 Subject: [PATCH 4333/8469] Return the exclusions directly --- setuptools/command/install_lib.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index f36d86515e..dcd85decc4 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,6 +1,6 @@ import os import imp -from itertools import product +from itertools import product, starmap import distutils.command.install_lib as orig class install_lib(orig.install_lib): @@ -18,9 +18,11 @@ def get_exclusions(self): Return a collections.Sized collections.Container of paths to be excluded for single_version_externally_managed installations. """ - exclude = set() - def _exclude(pkg, exclusion_path): + """ + Given a package name and exclusion path within that package, + compute the full exclusion path. + """ parts = pkg.split('.') + [exclusion_path] return os.path.join(self.install_dir, *parts) @@ -29,9 +31,9 @@ def _exclude(pkg, exclusion_path): for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) - for pkg, f in product(all_packages, self._gen_exclude_names()): - exclude.add(_exclude(pkg, f)) - return exclude + + excl_specs = product(all_packages, self._gen_exclude_names()) + return set(starmap(_exclude, excl_specs)) @staticmethod def _all_packages(pkg_name): From e301ab4639508fd7d9d4a3beb51974d211d1c109 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:59:09 -0400 Subject: [PATCH 4334/8469] Move inline function into an instance method and rename for clarity. --- setuptools/command/install_lib.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index dcd85decc4..3cd16a8f00 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -18,22 +18,22 @@ def get_exclusions(self): Return a collections.Sized collections.Container of paths to be excluded for single_version_externally_managed installations. """ - def _exclude(pkg, exclusion_path): - """ - Given a package name and exclusion path within that package, - compute the full exclusion path. - """ - parts = pkg.split('.') + [exclusion_path] - return os.path.join(self.install_dir, *parts) - all_packages = ( pkg for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) - excl_specs = product(all_packages, self._gen_exclude_names()) - return set(starmap(_exclude, excl_specs)) + excl_specs = product(all_packages, self._gen_exclusion_paths()) + return set(starmap(self._exclude_pkg_path, excl_specs)) + + def _exclude_pkg_path(self, pkg, exclusion_path): + """ + Given a package name and exclusion path within that package, + compute the full exclusion path. + """ + parts = pkg.split('.') + [exclusion_path] + return os.path.join(self.install_dir, *parts) @staticmethod def _all_packages(pkg_name): @@ -62,7 +62,7 @@ def _get_SVEM_NSPs(self): return self.distribution.namespace_packages if svem else [] @staticmethod - def _gen_exclude_names(): + def _gen_exclusion_paths(): """ Generate file paths to be excluded for namespace packages (bytecode cache files). From 13250db6b6ac59befa6e855f67958457f3dcf8c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 11:09:32 -0400 Subject: [PATCH 4335/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a6e27372d6..4fae469b9a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,8 @@ CHANGES Any users producing distributions with filenames that match those above case-insensitively, but not case-sensitively, should rename those files in their repository for better portability. +* Pull Request #72: When using ``single_version_externally_managed``, the + exclusion list now includes Python 3.2 ``__pycache__`` entries. --- 5.8 From 74a125575d6983979b244c07c36473b4bc79ac38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 11:12:15 -0400 Subject: [PATCH 4336/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4fae469b9a..4b20333d19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,6 +25,8 @@ CHANGES their repository for better portability. * Pull Request #72: When using ``single_version_externally_managed``, the exclusion list now includes Python 3.2 ``__pycache__`` entries. +* Pull Request #76 and Pull Request #78: lines in top_level.txt are now + ordered deterministically. --- 5.8 From b54668a95934f1f63647e219cbbcbeab4a524ac3 Mon Sep 17 00:00:00 2001 From: Jesse Weinstein Date: Thu, 28 Aug 2014 20:55:27 +0000 Subject: [PATCH 4337/8469] Fix issue #118: Prevent the egg-info directory from being redundantly included in the list of modified files. --HG-- extra : rebase_source : 8bad8bf37ef1fdc59b4c1ba21fcff43d25f9b2be --- setuptools/command/install_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index fd0f118b33..992709f19a 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -27,7 +27,7 @@ def finalize_options(self): ).egg_name() + '.egg-info' self.source = ei_cmd.egg_info self.target = os.path.join(self.install_dir, basename) - self.outputs = [self.target] + self.outputs = [] def run(self): self.run_command('egg_info') From 83b03cdd69f31da4b693db56f0ee8631e6ecff88 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 29 Aug 2014 07:07:35 +0300 Subject: [PATCH 4338/8469] Issue #22182: Use e.args to unpack exceptions correctly in distutils.file_util.move_file. Patch by Claudiu Popa. --- file_util.py | 4 ++-- tests/test_file_util.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/file_util.py b/file_util.py index f6ed290f13..7b14efbc07 100644 --- a/file_util.py +++ b/file_util.py @@ -194,7 +194,7 @@ def move_file (src, dst, try: os.rename(src, dst) except OSError as e: - (num, msg) = e + (num, msg) = e.args if num == errno.EXDEV: copy_it = True else: @@ -206,7 +206,7 @@ def move_file (src, dst, try: os.unlink(src) except OSError as e: - (num, msg) = e + (num, msg) = e.args try: os.unlink(dst) except OSError: diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 3c3e3dcb3b..270f81ebb6 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -2,10 +2,13 @@ import unittest import os import shutil +import errno +from unittest.mock import patch from distutils.file_util import move_file from distutils import log from distutils.tests import support +from distutils.errors import DistutilsFileError from test.support import run_unittest class FileUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -58,6 +61,23 @@ def test_move_file_verbosity(self): wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEqual(self._logs, wanted) + @patch('os.rename', side_effect=OSError('wrong', 1)) + def test_move_file_exception_unpacking_rename(self, _): + # see issue 22182 + with self.assertRaises(DistutilsFileError): + with open(self.source, 'w') as fobj: + fobj.write('spam eggs') + move_file(self.source, self.target, verbose=0) + + @patch('os.rename', side_effect=OSError(errno.EXDEV, 'wrong')) + @patch('os.unlink', side_effect=OSError('wrong', 1)) + def test_move_file_exception_unpacking_unlink(self, rename, unlink): + # see issue 22182 + with self.assertRaises(DistutilsFileError): + with open(self.source, 'w') as fobj: + fobj.write('spam eggs') + move_file(self.source, self.target, verbose=0) + def test_suite(): return unittest.makeSuite(FileUtilTestCase) From c1f5d6da2805e44809fec3e76b8a3bb9f45956f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 13:43:02 -0400 Subject: [PATCH 4339/8469] Remove unused import --- tests/test_dir_util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 1589f1297d..7e84721f80 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -2,7 +2,6 @@ import unittest import os import stat -import shutil import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, From c73fc06c76dd902e3d913711852fd060fd3278b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 15:00:47 -0400 Subject: [PATCH 4340/8469] Correct indent --- tests/test_dir_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 7e84721f80..6181ec6ef1 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -51,7 +51,7 @@ def test_mkpath_remove_tree_verbosity(self): self.assertEqual(self._logs, wanted) @unittest.skipIf(sys.platform.startswith('win'), - "This test is only appropriate for POSIX-like systems.") + "This test is only appropriate for POSIX-like systems.") def test_mkpath_with_custom_mode(self): # Get and set the current umask value for testing mode bits. umask = os.umask(0o002) From cc179ffe784d64d8ad67f77d8ee74610ae4f7faa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 15:02:42 -0400 Subject: [PATCH 4341/8469] #22315: Add test to capture the failure. --- tests/test_dir_util.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 6181ec6ef1..eb83497fc6 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,7 +3,9 @@ import os import stat import sys +import contextlib +from distutils import dir_util, errors from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) @@ -11,6 +13,20 @@ from distutils.tests import support from test.support import run_unittest + +@contextlib.context_manager +def patch_obj(obj, attr, replacement): + """ + A poor man's mock.patch.object + """ + orig = getattr(obj, attr) + try: + setattr(obj, attr, replacement) + yield + finally: + setattr(obj, attr, orig) + + class DirUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): @@ -119,6 +135,19 @@ def test_ensure_relative(self): self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') + def test_copy_tree_exception_in_listdir(self): + """ + An exception in listdir should raise a DistutilsFileError + """ + def new_listdir(path): + raise OSError() + # simulate a transient network error or other failure invoking listdir + with patch_obj(os, 'listdir', new_listdir): + args = 'src', None + exc = errors.DistutilsFileError + self.assertRaises(exc, dir_util.copy_tree, *args) + + def test_suite(): return unittest.makeSuite(DirUtilTestCase) From d45818441e0698244819349b0bee441c9d9328de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 17:31:32 -0400 Subject: [PATCH 4342/8469] #22315: Use technique outlined in test_file_util --- tests/test_dir_util.py | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index eb83497fc6..c9f789c895 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -3,7 +3,7 @@ import os import stat import sys -import contextlib +from unittest.mock import patch from distutils import dir_util, errors from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, @@ -14,19 +14,6 @@ from test.support import run_unittest -@contextlib.context_manager -def patch_obj(obj, attr, replacement): - """ - A poor man's mock.patch.object - """ - orig = getattr(obj, attr) - try: - setattr(obj, attr, replacement) - yield - finally: - setattr(obj, attr, orig) - - class DirUtilTestCase(support.TempdirManager, unittest.TestCase): def _log(self, msg, *args): @@ -135,17 +122,13 @@ def test_ensure_relative(self): self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') - def test_copy_tree_exception_in_listdir(self): + @patch('os.listdir', side_effect=OSError()) + def test_copy_tree_exception_in_listdir(self, listdir): """ An exception in listdir should raise a DistutilsFileError """ - def new_listdir(path): - raise OSError() - # simulate a transient network error or other failure invoking listdir - with patch_obj(os, 'listdir', new_listdir): - args = 'src', None - exc = errors.DistutilsFileError - self.assertRaises(exc, dir_util.copy_tree, *args) + with self.assertRaises(errors.DistutilsFileError): + dir_util.copy_tree('src', None) def test_suite(): From 3896d0af83329e4c5e4d63bf76535a9de51c0772 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 17:37:35 -0400 Subject: [PATCH 4343/8469] #22315: Provide an actual directory during test invocation. --- tests/test_dir_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index c9f789c895..51e754a07e 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -128,7 +128,7 @@ def test_copy_tree_exception_in_listdir(self, listdir): An exception in listdir should raise a DistutilsFileError """ with self.assertRaises(errors.DistutilsFileError): - dir_util.copy_tree('src', None) + dir_util.copy_tree(self.target, None) def test_suite(): From 58b1aba47823b942ab22d5c260d96707fe15c6dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 17:51:22 -0400 Subject: [PATCH 4344/8469] #22315: Use an existent directory for 'src' to trigger appropriate behavior. --- tests/test_dir_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index 51e754a07e..d2696b822c 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -128,7 +128,8 @@ def test_copy_tree_exception_in_listdir(self, listdir): An exception in listdir should raise a DistutilsFileError """ with self.assertRaises(errors.DistutilsFileError): - dir_util.copy_tree(self.target, None) + src = self.tempdirs[-1] + dir_util.copy_tree(src, None) def test_suite(): From 01dbd70d47c352d868dce71898197ebe4c04f277 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Aug 2014 17:42:20 -0400 Subject: [PATCH 4345/8469] #22315: Use advertised API for OSError --- dir_util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dir_util.py b/dir_util.py index 9879b0dc07..0924c9b0f7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -125,12 +125,11 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, try: names = os.listdir(src) except OSError as e: - (errno, errstr) = e if dry_run: names = [] else: raise DistutilsFileError( - "error listing files in '%s': %s" % (src, errstr)) + "error listing files in '%s': %s" % (src, e.strerror)) if not dry_run: mkpath(dst, verbose=verbose) From 15ea2f254869b3304ba5e840708654fb0a937edb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 6 Sep 2014 17:24:12 -0400 Subject: [PATCH 4346/8469] remove various dead version checks (closes #22349) Patch from Thomas Kluyver. --- command/build_ext.py | 17 ++++------------- sysconfig.py | 24 +++--------------------- tests/test_build_ext.py | 20 +++++++++----------- 3 files changed, 16 insertions(+), 45 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 80689b6357..3ab2d04bf9 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -14,13 +14,7 @@ from distutils.util import get_platform from distutils import log -# this keeps compatibility from 2.3 to 2.5 -if sys.version < "2.6": - USER_BASE = None - HAS_USER_SITE = False -else: - from site import USER_BASE - HAS_USER_SITE = True +from site import USER_BASE if os.name == 'nt': from distutils.msvccompiler import get_build_version @@ -97,14 +91,11 @@ class build_ext(Command): "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), + ('user', None, + "add user include, library and rpath") ] - boolean_options = ['inplace', 'debug', 'force', 'swig-cpp'] - - if HAS_USER_SITE: - user_options.append(('user', None, - "add user include, library and rpath")) - boolean_options.append('user') + boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] help_options = [ ('help-compiler', None, diff --git a/sysconfig.py b/sysconfig.py index 5b94fa2378..a1452fe167 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -151,10 +151,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if standard_lib: return os.path.join(prefix, "Lib") else: - if get_python_version() < "2.2": - return prefix - else: - return os.path.join(prefix, "Lib", "site-packages") + return os.path.join(prefix, "Lib", "site-packages") else: raise DistutilsPlatformError( "I don't know where Python installs its library " @@ -244,12 +241,8 @@ def get_config_h_filename(): inc_dir = _sys_home or project_base else: inc_dir = get_python_inc(plat_specific=1) - if get_python_version() < '2.2': - config_h = 'config.h' - else: - # The name of the config.h file changed in 2.2 - config_h = 'pyconfig.h' - return os.path.join(inc_dir, config_h) + + return os.path.join(inc_dir, 'pyconfig.h') def get_makefile_filename(): @@ -461,17 +454,6 @@ def _init_posix(): if python_build: g['LDSHARED'] = g['BLDSHARED'] - elif get_python_version() < '2.1': - # The following two branches are for 1.5.2 compatibility. - if sys.platform == 'aix4': # what about AIX 3.x ? - # Linker script is in the config directory, not in Modules as the - # Makefile says. - python_lib = get_python_lib(standard_lib=1) - ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') - python_exp = os.path.join(python_lib, 'config', 'python.exp') - - g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) - global _config_vars _config_vars = g diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index e9958667a4..b9f407f401 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -31,12 +31,11 @@ def setUp(self): self.tmp_dir = self.mkdtemp() self.sys_path = sys.path, sys.path[:] sys.path.append(self.tmp_dir) - if sys.version > "2.6": - import site - self.old_user_base = site.USER_BASE - site.USER_BASE = self.mkdtemp() - from distutils.command import build_ext - build_ext.USER_BASE = site.USER_BASE + import site + self.old_user_base = site.USER_BASE + site.USER_BASE = self.mkdtemp() + from distutils.command import build_ext + build_ext.USER_BASE = site.USER_BASE def test_build_ext(self): global ALREADY_TESTED @@ -84,11 +83,10 @@ def tearDown(self): support.unload('xx') sys.path = self.sys_path[0] sys.path[:] = self.sys_path[1] - if sys.version > "2.6": - import site - site.USER_BASE = self.old_user_base - from distutils.command import build_ext - build_ext.USER_BASE = self.old_user_base + import site + site.USER_BASE = self.old_user_base + from distutils.command import build_ext + build_ext.USER_BASE = self.old_user_base super(BuildExtTestCase, self).tearDown() def test_solaris_enable_shared(self): From 199a482b6127e3e896809cbb82486ef167985da0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 9 Sep 2014 09:38:58 -0400 Subject: [PATCH 4347/8469] Move sister functions into proximity --- pkg_resources.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index ee2c553ba1..23ac1a36e5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -81,15 +81,6 @@ def execfile(fn, globs=None, locs=None): except ImportError: pass -def _bypass_ensure_directory(name, mode=0o777): - # Sandbox-bypassing version of ensure_directory() - if not WRITE_SUPPORT: - raise IOError('"os.mkdir" not supported on this platform.') - dirname, filename = split(name) - if dirname and filename and not isdir(dirname): - _bypass_ensure_directory(dirname) - mkdir(dirname, mode) - _state_vars = {} @@ -2824,6 +2815,17 @@ def ensure_directory(path): if not os.path.isdir(dirname): os.makedirs(dirname) + +def _bypass_ensure_directory(name, mode=0o777): + """Sandbox-bypassing version of ensure_directory()""" + if not WRITE_SUPPORT: + raise IOError('"os.mkdir" not supported on this platform.') + dirname, filename = split(name) + if dirname and filename and not isdir(dirname): + _bypass_ensure_directory(dirname) + mkdir(dirname, mode) + + def split_sections(s): """Split a string or iterable thereof into (section, content) pairs From c689acd8690d72a8d59085abbac98a41896f43c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 9 Sep 2014 09:39:47 -0400 Subject: [PATCH 4348/8469] Rename argument for consistency --HG-- extra : amend_source : 006c17fc01743ef7f646bf54a166cbaeae92ab75 --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 23ac1a36e5..0898391951 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2816,11 +2816,11 @@ def ensure_directory(path): os.makedirs(dirname) -def _bypass_ensure_directory(name, mode=0o777): +def _bypass_ensure_directory(path, mode=0o777): """Sandbox-bypassing version of ensure_directory()""" if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') - dirname, filename = split(name) + dirname, filename = split(path) if dirname and filename and not isdir(dirname): _bypass_ensure_directory(dirname) mkdir(dirname, mode) From da99f1334e36171fdd2c4bbb7dee4845c6ad7dc5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:13:18 -0400 Subject: [PATCH 4349/8469] Add indicators for PY2 vs. PY3 --HG-- extra : rebase_source : 549637a713aba52da4c87f1a84436832eba82f1e --- pkg_resources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 0898391951..9992b17d37 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -35,6 +35,9 @@ import tempfile from pkgutil import get_importer +PY3 = sys.version_info > (3,) +PY2 = not PY3 + try: from urlparse import urlparse, urlunparse except ImportError: From 26e4f9534a35fc13ec2c5e111e639d4af03e5644 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:16:33 -0400 Subject: [PATCH 4350/8469] Remove conditional import for frozenset (available in Python 2.6+) --- pkg_resources.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 9992b17d37..a056668872 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -43,10 +43,6 @@ except ImportError: from urllib.parse import urlparse, urlunparse -try: - frozenset -except NameError: - from sets import ImmutableSet as frozenset try: basestring next = lambda o: o.next() From 8f56e928f03f69a5e787f830c04714467307601e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:21:24 -0400 Subject: [PATCH 4351/8469] Use PY3/PY2 indicators to reliably select behavior. Fixes #237 --HG-- extra : amend_source : 33f3d298acd39933ccf60810902feb2a5d51c793 --- CHANGES.txt | 8 ++++++++ pkg_resources.py | 17 +++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 83b05bbe55..185052fb12 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +--- +5.8 +--- + +* Issue #237: ``pkg_resources`` now uses explicit detection of Python 2 vs. + Python 3, supporting environments where builtins have been patched to make + Python 3 look more like Python 2. + --- 5.7 --- diff --git a/pkg_resources.py b/pkg_resources.py index a056668872..5dcfd66ede 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -38,16 +38,13 @@ PY3 = sys.version_info > (3,) PY2 = not PY3 -try: - from urlparse import urlparse, urlunparse -except ImportError: +if PY3: from urllib.parse import urlparse, urlunparse -try: - basestring - next = lambda o: o.next() - from cStringIO import StringIO as BytesIO -except NameError: +if PY2: + from urlparse import urlparse, urlunparse + +if PY3: basestring = str from io import BytesIO def execfile(fn, globs=None, locs=None): @@ -57,6 +54,10 @@ def execfile(fn, globs=None, locs=None): locs = globs exec(compile(open(fn).read(), fn, 'exec'), globs, locs) +if PY2: + next = lambda o: o.next() + from cStringIO import StringIO as BytesIO + # capture these to bypass sandboxing from os import utime try: From a2201d3d5a74ea034caf2f6eeeb877708e9017bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:25:45 -0400 Subject: [PATCH 4352/8469] next function and io module are available on Python 2.6 --- pkg_resources.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5dcfd66ede..d8c73320d3 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -16,6 +16,7 @@ import sys import os +import io import time import re import imp @@ -46,7 +47,6 @@ if PY3: basestring = str - from io import BytesIO def execfile(fn, globs=None, locs=None): if globs is None: globs = globals() @@ -54,10 +54,6 @@ def execfile(fn, globs=None, locs=None): locs = globs exec(compile(open(fn).read(), fn, 'exec'), globs, locs) -if PY2: - next = lambda o: o.next() - from cStringIO import StringIO as BytesIO - # capture these to bypass sandboxing from os import utime try: @@ -1378,7 +1374,7 @@ def get_resource_filename(self, manager, resource_name): return self._fn(self.module_path, resource_name) def get_resource_stream(self, manager, resource_name): - return BytesIO(self.get_resource_string(manager, resource_name)) + return io.BytesIO(self.get_resource_string(manager, resource_name)) def get_resource_string(self, manager, resource_name): return self._get(self._fn(self.module_path, resource_name)) From 5d3002955232bb6a2b83faee486cd362dbbf8fa3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:31:09 -0400 Subject: [PATCH 4353/8469] Use the term 'string_types', following the pattern in six --HG-- extra : amend_source : 3a4aeb2627549c3dfec15067579eccc8e1314de2 --- pkg_resources.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index d8c73320d3..825b30042d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -46,13 +46,15 @@ from urlparse import urlparse, urlunparse if PY3: - basestring = str + string_types = str, def execfile(fn, globs=None, locs=None): if globs is None: globs = globals() if locs is None: locs = globs exec(compile(open(fn).read(), fn, 'exec'), globs, locs) +else: + string_types = str, eval('unicode') # capture these to bypass sandboxing from os import utime @@ -330,7 +332,7 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist, basestring): + if isinstance(dist, string_types): dist = Requirement.parse(dist) if isinstance(dist, Requirement): dist = get_provider(dist) @@ -2050,8 +2052,8 @@ def _set_parent_ns(packageName): def yield_lines(strs): - """Yield non-empty/non-comment lines of a ``basestring`` or sequence""" - if isinstance(strs, basestring): + """Yield non-empty/non-comment lines of a string or sequence""" + if isinstance(strs, string_types): for s in strs.splitlines(): s = s.strip() # skip blank lines/comments @@ -2643,8 +2645,7 @@ def issue_warning(*args,**kw): def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` - `strs` must be an instance of ``basestring``, or a (possibly-nested) - iterable thereof. + `strs` must be a string, or a (possibly-nested) iterable thereof. """ # create a steppable iterator, so we can handle \-continuations lines = iter(yield_lines(strs)) @@ -2745,7 +2746,7 @@ def __contains__(self, item): # only get if we need it if self.index: item = item.parsed_version - elif isinstance(item, basestring): + elif isinstance(item, string_types): item = parse_version(item) last = None # -1, 0, 1 From d1bcc3545099d652f07fc13e1cfb449d0ed87d58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:34:23 -0400 Subject: [PATCH 4354/8469] Remove execfile compatibility - unnecessary on Python 2.6+ --HG-- extra : amend_source : 8a0dcd07e62a327647c834a44fe73b8ebc7b53b9 --- pkg_resources.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 825b30042d..517298c90d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -47,12 +47,6 @@ if PY3: string_types = str, - def execfile(fn, globs=None, locs=None): - if globs is None: - globs = globals() - if locs is None: - locs = globs - exec(compile(open(fn).read(), fn, 'exec'), globs, locs) else: string_types = str, eval('unicode') @@ -1424,7 +1418,9 @@ def run_script(self, script_name, namespace): script_filename = self._fn(self.egg_info, script) namespace['__file__'] = script_filename if os.path.exists(script_filename): - execfile(script_filename, namespace, namespace) + source = open(script_filename).read() + code = compile(source, script_filename, 'exec') + exec(code, namespace, namespace) else: from linecache import cache cache[script_filename] = ( From ea26aa25a738d9c805fd5b44b053138f0e560c20 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:39:44 -0400 Subject: [PATCH 4355/8469] Added tag 5.8 for changeset 67550a8ed9f4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1f1cac00e3..1753222139 100644 --- a/.hgtags +++ b/.hgtags @@ -153,3 +153,4 @@ ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 949a66af4f03521e1404deda940aa951418a13d2 5.5.1 a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6 37ed55fd310d0cd32009dc5676121e86b404a23d 5.7 +67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8 From 394ea0c104e7da5cf583680b418c3e5e4b9858d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 18 Sep 2014 07:40:48 -0400 Subject: [PATCH 4356/8469] Bumped to 5.9 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 74c8224a3d..0fd1c8725e 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "5.8" +DEFAULT_VERSION = "5.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 868f2d33f3..7244139e8f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '5.8' +__version__ = '5.9' From aa5115c381d6b79e8db3a860bf71bf403c6fdb99 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 20 Sep 2014 11:53:12 -0400 Subject: [PATCH 4357/8469] use patch context manager instead of decorator because the decorator 'leaks' metadata onto the function --- tests/test_dir_util.py | 6 +++--- tests/test_file_util.py | 15 +++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/test_dir_util.py b/tests/test_dir_util.py index d2696b822c..d436cf8319 100644 --- a/tests/test_dir_util.py +++ b/tests/test_dir_util.py @@ -122,12 +122,12 @@ def test_ensure_relative(self): self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') - @patch('os.listdir', side_effect=OSError()) - def test_copy_tree_exception_in_listdir(self, listdir): + def test_copy_tree_exception_in_listdir(self): """ An exception in listdir should raise a DistutilsFileError """ - with self.assertRaises(errors.DistutilsFileError): + with patch("os.listdir", side_effect=OSError()), \ + self.assertRaises(errors.DistutilsFileError): src = self.tempdirs[-1] dir_util.copy_tree(src, None) diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 270f81ebb6..d3db5cef0e 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -61,24 +61,23 @@ def test_move_file_verbosity(self): wanted = ['moving %s -> %s' % (self.source, self.target_dir)] self.assertEqual(self._logs, wanted) - @patch('os.rename', side_effect=OSError('wrong', 1)) - def test_move_file_exception_unpacking_rename(self, _): + def test_move_file_exception_unpacking_rename(self): # see issue 22182 - with self.assertRaises(DistutilsFileError): + with patch("os.rename", side_effect=OSError("wrong", 1)), \ + self.assertRaises(DistutilsFileError): with open(self.source, 'w') as fobj: fobj.write('spam eggs') move_file(self.source, self.target, verbose=0) - @patch('os.rename', side_effect=OSError(errno.EXDEV, 'wrong')) - @patch('os.unlink', side_effect=OSError('wrong', 1)) - def test_move_file_exception_unpacking_unlink(self, rename, unlink): + def test_move_file_exception_unpacking_unlink(self): # see issue 22182 - with self.assertRaises(DistutilsFileError): + with patch("os.rename", side_effect=OSError(errno.EXDEV, "wrong")), \ + patch("os.unlink", side_effect=OSError("wrong", 1)), \ + self.assertRaises(DistutilsFileError): with open(self.source, 'w') as fobj: fobj.write('spam eggs') move_file(self.source, self.target, verbose=0) - def test_suite(): return unittest.makeSuite(FileUtilTestCase) From 4e5c7d0657a9719d2fa961c852daf0926de91ae3 Mon Sep 17 00:00:00 2001 From: Randy Syring Date: Sat, 20 Sep 2014 16:29:41 -0400 Subject: [PATCH 4358/8469] sdist command: fix case insensitivity when adding some files to filelist This should fix the problem in Bitbucket issue #100. It gives the same behavior for inclusion of default files (README*, etc.) on Windows as Linux. BACKWARDS INCOMPATABILITY: This may result in a backwards incompatible change for users on a case insensitive file system. If they were relying on some files getting included in their distribution due to setuptools defaults, and their files do not have the same case as the files being looked for in setuptools, those files will no longer be included in the package. For example, if a package had a file: readme.rst Previous to this commit, that file would have been included in the distribution as: README.rst But it will now no longer be included at all. To get the file included in the package, it can be added to the package's MANIFEST.in file: include readme.rst Files affected by this change will have a case variant of the files or patterns listed below: README README.txt README.rst setup.py (or whatever your setuptools script is named) setup.cfg test/test*.py --- setuptools/command/sdist.py | 11 +++++++---- setuptools/tests/test_sdist.py | 28 ++++++++++++++++++++++++++++ setuptools/utils.py | 11 +++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 setuptools/utils.py diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2aa1ee20fd..dc8d677395 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -8,6 +8,8 @@ from setuptools import svn_utils from setuptools.compat import PY3 +from setuptools.utils import cs_path_exists + import pkg_resources READMES = ('README', 'README.rst', 'README.txt') @@ -146,7 +148,7 @@ def add_defaults(self): alts = fn got_it = 0 for fn in alts: - if os.path.exists(fn): + if cs_path_exists(fn): got_it = 1 self.filelist.append(fn) break @@ -155,16 +157,17 @@ def add_defaults(self): self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if os.path.exists(fn): + if cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = list(filter(os.path.isfile, glob(pattern))) + files = list(filter(cs_path_exists, glob(pattern))) if files: - self.filelist.extend(files) + actual_fnames = map(os.path.normcase, files) + self.filelist.extend(actual_fnames) # getting python files if self.distribution.has_pure_modules(): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 5b3862e998..5f8a190f46 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -86,6 +86,7 @@ def setUp(self): f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') f.write(SETUP_PY) f.close() + # Set up the rest of the test package test_pkg = os.path.join(self.temp_dir, 'sdist_test') os.mkdir(test_pkg) @@ -121,6 +122,33 @@ def test_package_data_in_sdist(self): self.assertTrue(os.path.join('sdist_test', 'b.txt') in manifest) self.assertTrue(os.path.join('sdist_test', 'c.rst') not in manifest) + + def test_defaults_case_sensitivity(self): + """ + Make sure default files (README.*, etc.) are added in a case-sensitive + way to avoid problems with packages built on Windows. + """ + + open(os.path.join(self.temp_dir, 'readme.rst'), 'w').close() + open(os.path.join(self.temp_dir, 'SETUP.cfg'), 'w').close() + + dist = Distribution(SETUP_ATTRS) + # the extension deliberately capitalized for this test + # to make sure the actual filename (not capitalized) gets added + # to the manifest + dist.script_name = 'setup.PY' + cmd = sdist(dist) + cmd.ensure_finalized() + + with quiet(): + cmd.run() + + # lowercase all names so we can test in a case-insensitive way to make sure the files are not included + manifest = map(lambda x: x.lower(), cmd.filelist.files) + self.assertFalse('readme.rst' in manifest, manifest) + self.assertFalse('setup.py' in manifest, manifest) + self.assertFalse('setup.cfg' in manifest, manifest) + def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. dist = Distribution(SETUP_ATTRS) diff --git a/setuptools/utils.py b/setuptools/utils.py new file mode 100644 index 0000000000..91e4b87f65 --- /dev/null +++ b/setuptools/utils.py @@ -0,0 +1,11 @@ +import os +import os.path + + +def cs_path_exists(fspath): + if not os.path.exists(fspath): + return False + # make absolute so we always have a directory + abspath = os.path.abspath(fspath) + directory, filename = os.path.split(abspath) + return filename in os.listdir(directory) \ No newline at end of file From 1c05e6a7b7f2a54a55285857d498409df3dc9383 Mon Sep 17 00:00:00 2001 From: Randy Syring Date: Sat, 20 Sep 2014 16:37:25 -0400 Subject: [PATCH 4359/8469] remove unneeded code from last commit --- setuptools/command/sdist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index dc8d677395..a77c39f298 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -166,8 +166,7 @@ def add_defaults(self): for pattern in optional: files = list(filter(cs_path_exists, glob(pattern))) if files: - actual_fnames = map(os.path.normcase, files) - self.filelist.extend(actual_fnames) + self.filelist.extend(files) # getting python files if self.distribution.has_pure_modules(): From 17fc42a928be89366e183179353ae2a69ce48d93 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 21 Sep 2014 00:09:56 +0100 Subject: [PATCH 4360/8469] Bump version number for 3.4.2rc1 release. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 9463a35c79..750a5033ac 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.1" +__version__ = "3.4.2rc1" #--end constants-- From d42aea783a347d431eaf293250bab60c05b4c779 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Sep 2014 00:22:22 -0400 Subject: [PATCH 4361/8469] Update changelog --- CHANGES.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 185052fb12..a6e27372d6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,28 @@ CHANGES ======= +--- +6.0 +--- + +* Issue #100: When building a distribution, Setuptools will no longer match + default files using platform-dependent case sensitivity, but rather will + only match the files if their case matches exactly. As a result, on Windows + and other case-insensitive file systems, files with names such as + 'readme.txt' or 'README.TXT' will be omitted from the distribution and a + warning will be issued indicating that 'README.txt' was not found. Other + filenames affected are: + + - README.rst + - README + - setup.cfg + - setup.py (or the script name) + - test/test*.py + + Any users producing distributions with filenames that match those above + case-insensitively, but not case-sensitively, should rename those files in + their repository for better portability. + --- 5.8 --- From b0f93f3bdd1d67cce1dd03d4a6ecea8256fa4e55 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 25 Sep 2014 08:46:53 -0700 Subject: [PATCH 4362/8469] Adds monkeypatching for msvc9compiler.find_vcvarsall() to look for a standalone compiler installation and improves the error message for missing VC installation. --- setuptools/extension.py | 54 ++++++++++ setuptools/tests/test_msvc9compiler.py | 135 +++++++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 setuptools/tests/test_msvc9compiler.py diff --git a/setuptools/extension.py b/setuptools/extension.py index ab5908dabb..41a817b79a 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -2,12 +2,66 @@ import re import functools import distutils.core +import distutils.errors import distutils.extension +import distutils.msvc9compiler from setuptools.dist import _get_unpatched _Extension = _get_unpatched(distutils.core.Extension) +def _patch_msvc9compiler_find_vcvarsall(): + """ + Looks for the standalone VC for Python before falling back on + distutils's original approach. + """ + VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' + find_vcvarsall = distutils.msvc9compiler.find_vcvarsall + query_vcvarsall = distutils.msvc9compiler.query_vcvarsall + if find_vcvarsall and find_vcvarsall.__module__.startswith('setuptools.'): + # Already patched + return + + def _find_vcvarsall(version): + Reg = distutils.msvc9compiler.Reg + try: + # Per-user installs register the compiler path here + productdir = Reg.get_value(VC_BASE % ('', version), "installdir") + except KeyError: + try: + # All-user installs on a 64-bit system register here + productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir") + except KeyError: + productdir = None + + if productdir: + import os + vcvarsall = os.path.join(productdir, "vcvarsall.bat") + if os.path.isfile(vcvarsall): + return vcvarsall + + return find_vcvarsall(version) + + def _query_vcvarsall(version, *args, **kwargs): + try: + return query_vcvarsall(version, *args, **kwargs) + except distutils.errors.DistutilsPlatformError: + exc = sys.exc_info()[1] + if exc and "vcvarsall.bat" in exc.args[0]: + message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0]) + if int(version) == 9: + # This redirection link is maintained by Microsoft. + # Contact vspython@microsoft.com if it needs updating. + raise distutils.errors.DistutilsPlatformError( + message + ' Get it from http://aka.ms/vcpython27' + ) + raise distutils.errors.DistutilsPlatformError(message) + raise + + distutils.msvc9compiler.find_vcvarsall = _find_vcvarsall + distutils.msvc9compiler.query_vcvarsall = _query_vcvarsall +_patch_msvc9compiler_find_vcvarsall() + def have_pyrex(): """ Return True if Cython or Pyrex can be imported. diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py new file mode 100644 index 0000000000..272e99e8e9 --- /dev/null +++ b/setuptools/tests/test_msvc9compiler.py @@ -0,0 +1,135 @@ +"""msvc9compiler monkey patch test + +This test ensures that importing setuptools is sufficient to replace +the standard find_vcvarsall function with our patched version that +finds the Visual C++ for Python package. +""" + +import os +import shutil +import sys +import tempfile +import unittest + +try: + from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE +except ImportError: + from _winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE + +import distutils.msvc9compiler +from distutils.errors import DistutilsPlatformError + +# importing only setuptools should apply the patch +import setuptools + +class MockReg: + """Mock for distutils.msvc9compiler.Reg. We patch it + with an instance of this class that mocks out the + functions that access the registry. + """ + + def __init__(self, hkey_local_machine={}, hkey_current_user={}): + self.hklm = hkey_local_machine + self.hkcu = hkey_current_user + + def __enter__(self): + self.original_read_keys = distutils.msvc9compiler.Reg.read_keys + self.original_read_values = distutils.msvc9compiler.Reg.read_values + + hives = { + HKEY_CURRENT_USER: self.hkcu, + HKEY_LOCAL_MACHINE: self.hklm, + } + + def read_keys(cls, base, key): + """Return list of registry keys.""" + hive = hives.get(base, {}) + return [k.rpartition('\\')[2] + for k in hive if k.startswith(key.lower())] + + def read_values(cls, base, key): + """Return dict of registry keys and values.""" + hive = hives.get(base, {}) + return dict((k.rpartition('\\')[2], hive[k]) + for k in hive if k.startswith(key.lower())) + + distutils.msvc9compiler.Reg.read_keys = classmethod(read_keys) + distutils.msvc9compiler.Reg.read_values = classmethod(read_values) + + return self + + def __exit__(self, exc_type, exc_value, exc_tb): + distutils.msvc9compiler.Reg.read_keys = self.original_read_keys + distutils.msvc9compiler.Reg.read_values = self.original_read_values + +class TestMSVC9Compiler(unittest.TestCase): + + def test_find_vcvarsall_patch(self): + self.assertEqual( + "setuptools.extension", + distutils.msvc9compiler.find_vcvarsall.__module__, + "find_vcvarsall was not patched" + ) + + find_vcvarsall = distutils.msvc9compiler.find_vcvarsall + query_vcvarsall = distutils.msvc9compiler.query_vcvarsall + + # No registry entries or environment variable means we should + # not find anything + old_value = os.environ.pop("VS90COMNTOOLS", None) + try: + with MockReg(): + self.assertIsNone(find_vcvarsall(9.0)) + + try: + query_vcvarsall(9.0) + self.fail('Expected DistutilsPlatformError from query_vcvarsall()') + except DistutilsPlatformError: + exc_message = str(sys.exc_info()[1]) + self.assertIn('aka.ms/vcpython27', exc_message) + finally: + if old_value: + os.environ["VS90COMNTOOLS"] = old_value + + key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' + key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' + + # Make two mock files so we can tell whether HCKU entries are + # preferred to HKLM entries. + mock_installdir_1 = tempfile.mkdtemp() + mock_vcvarsall_bat_1 = os.path.join(mock_installdir_1, 'vcvarsall.bat') + open(mock_vcvarsall_bat_1, 'w').close() + mock_installdir_2 = tempfile.mkdtemp() + mock_vcvarsall_bat_2 = os.path.join(mock_installdir_2, 'vcvarsall.bat') + open(mock_vcvarsall_bat_2, 'w').close() + try: + # Ensure we get the current user's setting first + with MockReg( + hkey_current_user={ key_32: mock_installdir_1 }, + hkey_local_machine={ + key_32: mock_installdir_2, + key_64: mock_installdir_2, + } + ): + self.assertEqual(mock_vcvarsall_bat_1, find_vcvarsall(9.0)) + + # Ensure we get the local machine value if it's there + with MockReg(hkey_local_machine={ key_32: mock_installdir_2 }): + self.assertEqual(mock_vcvarsall_bat_2, find_vcvarsall(9.0)) + + # Ensure we prefer the 64-bit local machine key + # (*not* the Wow6432Node key) + with MockReg( + hkey_local_machine={ + # This *should* only exist on 32-bit machines + key_32: mock_installdir_1, + # This *should* only exist on 64-bit machines + key_64: mock_installdir_2, + } + ): + self.assertEqual(mock_vcvarsall_bat_1, find_vcvarsall(9.0)) + finally: + shutil.rmtree(mock_installdir_1) + shutil.rmtree(mock_installdir_2) + + \ No newline at end of file From 84c9006110e53c84296a05741edb7b9edd305f12 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Thu, 4 Sep 2014 20:27:48 -0400 Subject: [PATCH 4363/8469] Add a vendored copy of packaging --- Makefile | 7 + setuptools/_vendor/packaging/__about__.py | 31 + setuptools/_vendor/packaging/__init__.py | 24 + setuptools/_vendor/packaging/_compat.py | 27 + setuptools/_vendor/packaging/_structures.py | 78 ++ setuptools/_vendor/packaging/version.py | 786 ++++++++++++++++++++ setuptools/_vendor/vendored.txt | 1 + 7 files changed, 954 insertions(+) create mode 100644 Makefile create mode 100644 setuptools/_vendor/packaging/__about__.py create mode 100644 setuptools/_vendor/packaging/__init__.py create mode 100644 setuptools/_vendor/packaging/_compat.py create mode 100644 setuptools/_vendor/packaging/_structures.py create mode 100644 setuptools/_vendor/packaging/version.py create mode 100644 setuptools/_vendor/vendored.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..ab60b882c3 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +empty: + exit 1 + +update-vendored: + rm -rf setuptools/_vendor/packaging + pip install -r setuptools/_vendor/vendored.txt -t setuptools/_vendor/ + rm -rf setuptools/_vendor/*.{egg,dist}-info diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py new file mode 100644 index 0000000000..b64681e4e7 --- /dev/null +++ b/setuptools/_vendor/packaging/__about__.py @@ -0,0 +1,31 @@ +# Copyright 2014 Donald Stufft +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] + +__title__ = "packaging" +__summary__ = "Core utilities for Python packages" +__uri__ = "https://github.com/pypa/packaging" + +__version__ = "14.2" + +__author__ = "Donald Stufft" +__email__ = "donald@stufft.io" + +__license__ = "Apache License, Version 2.0" +__copyright__ = "Copyright 2014 %s" % __author__ diff --git a/setuptools/_vendor/packaging/__init__.py b/setuptools/_vendor/packaging/__init__.py new file mode 100644 index 0000000000..c39a8eab8e --- /dev/null +++ b/setuptools/_vendor/packaging/__init__.py @@ -0,0 +1,24 @@ +# Copyright 2014 Donald Stufft +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function + +from .__about__ import ( + __author__, __copyright__, __email__, __license__, __summary__, __title__, + __uri__, __version__ +) + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] diff --git a/setuptools/_vendor/packaging/_compat.py b/setuptools/_vendor/packaging/_compat.py new file mode 100644 index 0000000000..f2ff383499 --- /dev/null +++ b/setuptools/_vendor/packaging/_compat.py @@ -0,0 +1,27 @@ +# Copyright 2014 Donald Stufft +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function + +import sys + + +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 + +# flake8: noqa + +if PY3: + string_types = str, +else: + string_types = basestring, diff --git a/setuptools/_vendor/packaging/_structures.py b/setuptools/_vendor/packaging/_structures.py new file mode 100644 index 0000000000..0ae9bb52a2 --- /dev/null +++ b/setuptools/_vendor/packaging/_structures.py @@ -0,0 +1,78 @@ +# Copyright 2014 Donald Stufft +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function + + +class Infinity(object): + + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + +Infinity = Infinity() + + +class NegativeInfinity(object): + + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + +NegativeInfinity = NegativeInfinity() diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py new file mode 100644 index 0000000000..0affe899f4 --- /dev/null +++ b/setuptools/_vendor/packaging/version.py @@ -0,0 +1,786 @@ +# Copyright 2014 Donald Stufft +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function + +import collections +import itertools +import re + +from ._compat import string_types +from ._structures import Infinity + + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "Specifier", + "InvalidSpecifier", +] + + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +def parse(version): + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion(object): + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return "".format(repr(str(self))) + + @property + def public(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + +_legacy_version_component_re = re.compile( + r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, +) + +_legacy_version_replacement_map = { + "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", +} + + +def _parse_version_parts(s): + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version): + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # it's adoption of the packaging library. + parts = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + parts = tuple(parts) + + return epoch, parts + + +class Version(_BaseVersion): + + _regex = re.compile( + r""" + ^ + \s* + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                              # pre-release
    +                [-_\.]?
    +                (?P(a|b|c|rc|alpha|beta|pre|preview))
    +                [-_\.]?
    +                (?P[0-9]+)?
    +            )?
    +            (?P                                         # post release
    +                (?:-(?P[0-9]+))
    +                |
    +                (?:
    +                    [-_\.]?
    +                    (?Ppost|rev|r)
    +                    [-_\.]?
    +                    (?P[0-9]+)?
    +                )
    +            )?
    +            (?P                                          # dev release
    +                [-_\.]?
    +                (?Pdev)
    +                [-_\.]?
    +                (?P[0-9]+)?
    +            )?
    +        )
    +        (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    +        \s*
    +        $
    +        """,
    +        re.VERBOSE | re.IGNORECASE,
    +    )
    +
    +    def __init__(self, version):
    +        # Validate the version and parse it into pieces
    +        match = self._regex.search(version)
    +        if not match:
    +            raise InvalidVersion("Invalid version: '{0}'".format(version))
    +
    +        # Store the parsed out pieces of the version
    +        self._version = _Version(
    +            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
    +            release=tuple(int(i) for i in match.group("release").split(".")),
    +            pre=_parse_letter_version(
    +                match.group("pre_l"),
    +                match.group("pre_n"),
    +            ),
    +            post=_parse_letter_version(
    +                match.group("post_l"),
    +                match.group("post_n1") or match.group("post_n2"),
    +            ),
    +            dev=_parse_letter_version(
    +                match.group("dev_l"),
    +                match.group("dev_n"),
    +            ),
    +            local=_parse_local_version(match.group("local")),
    +        )
    +
    +        # Generate a key which will be used for sorting
    +        self._key = _cmpkey(
    +            self._version.epoch,
    +            self._version.release,
    +            self._version.pre,
    +            self._version.post,
    +            self._version.dev,
    +            self._version.local,
    +        )
    +
    +    def __repr__(self):
    +        return "".format(repr(str(self)))
    +
    +    def __str__(self):
    +        parts = []
    +
    +        # Epoch
    +        if self._version.epoch != 0:
    +            parts.append("{0}!".format(self._version.epoch))
    +
    +        # Release segment
    +        parts.append(".".join(str(x) for x in self._version.release))
    +
    +        # Pre-release
    +        if self._version.pre is not None:
    +            parts.append("".join(str(x) for x in self._version.pre))
    +
    +        # Post-release
    +        if self._version.post is not None:
    +            parts.append(".post{0}".format(self._version.post[1]))
    +
    +        # Development release
    +        if self._version.dev is not None:
    +            parts.append(".dev{0}".format(self._version.dev[1]))
    +
    +        # Local version segment
    +        if self._version.local is not None:
    +            parts.append(
    +                "+{0}".format(".".join(str(x) for x in self._version.local))
    +            )
    +
    +        return "".join(parts)
    +
    +    @property
    +    def public(self):
    +        return str(self).split("+", 1)[0]
    +
    +    @property
    +    def local(self):
    +        version_string = str(self)
    +        if "+" in version_string:
    +            return version_string.split("+", 1)[1]
    +
    +    @property
    +    def is_prerelease(self):
    +        return bool(self._version.dev or self._version.pre)
    +
    +
    +def _parse_letter_version(letter, number):
    +    if letter:
    +        # We consider there to be an implicit 0 in a pre-release if there is
    +        # not a numeral associated with it.
    +        if number is None:
    +            number = 0
    +
    +        # We normalize any letters to their lower case form
    +        letter = letter.lower()
    +
    +        # We consider some words to be alternate spellings of other words and
    +        # in those cases we want to normalize the spellings to our preferred
    +        # spelling.
    +        if letter == "alpha":
    +            letter = "a"
    +        elif letter == "beta":
    +            letter = "b"
    +        elif letter in ["rc", "pre", "preview"]:
    +            letter = "c"
    +
    +        return letter, int(number)
    +    if not letter and number:
    +        # We assume if we are given a number, but we are not given a letter
    +        # then this is using the implicit post release syntax (e.g. 1.0-1)
    +        letter = "post"
    +
    +        return letter, int(number)
    +
    +
    +_local_version_seperators = re.compile(r"[\._-]")
    +
    +
    +def _parse_local_version(local):
    +    """
    +    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    +    """
    +    if local is not None:
    +        return tuple(
    +            part.lower() if not part.isdigit() else int(part)
    +            for part in _local_version_seperators.split(local)
    +        )
    +
    +
    +def _cmpkey(epoch, release, pre, post, dev, local):
    +    # When we compare a release version, we want to compare it with all of the
    +    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    +    # leading zeros until we come to something non zero, then take the rest
    +    # re-reverse it back into the correct order and make it a tuple and use
    +    # that for our sorting key.
    +    release = tuple(
    +        reversed(list(
    +            itertools.dropwhile(
    +                lambda x: x == 0,
    +                reversed(release),
    +            )
    +        ))
    +    )
    +
    +    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    +    # We'll do this by abusing the pre segment, but we _only_ want to do this
    +    # if there is not a pre or a post segment. If we have one of those then
    +    # the normal sorting rules will handle this case correctly.
    +    if pre is None and post is None and dev is not None:
    +        pre = -Infinity
    +    # Versions without a pre-release (except as noted above) should sort after
    +    # those with one.
    +    elif pre is None:
    +        pre = Infinity
    +
    +    # Versions without a post segment should sort before those with one.
    +    if post is None:
    +        post = -Infinity
    +
    +    # Versions without a development segment should sort after those with one.
    +    if dev is None:
    +        dev = Infinity
    +
    +    if local is None:
    +        # Versions without a local segment should sort before those with one.
    +        local = -Infinity
    +    else:
    +        # Versions with a local segment need that segment parsed to implement
    +        # the sorting rules in PEP440.
    +        # - Alpha numeric segments sort before numeric segments
    +        # - Alpha numeric segments sort lexicographically
    +        # - Numeric segments sort numerically
    +        # - Shorter versions sort before longer versions when the prefixes
    +        #   match exactly
    +        local = tuple(
    +            (i, "") if isinstance(i, int) else (-Infinity, i)
    +            for i in local
    +        )
    +
    +    return epoch, release, pre, post, dev, local
    +
    +
    +class InvalidSpecifier(ValueError):
    +    """
    +    An invalid specifier was found, users should refer to PEP 440.
    +    """
    +
    +
    +class Specifier(object):
    +
    +    _regex = re.compile(
    +        r"""
    +        ^
    +        \s*
    +        (?P(~=|==|!=|<=|>=|<|>|===))
    +        (?P
    +            (?:
    +                # The identity operators allow for an escape hatch that will
    +                # do an exact string match of the version you wish to install.
    +                # This will not be parsed by PEP 440 and we cannot determine
    +                # any semantic meaning from it. This operator is discouraged
    +                # but included entirely as an escape hatch.
    +                (?<====)  # Only match for the identity operator
    +                \s*
    +                [^\s]*    # We just match everything, except for whitespace
    +                          # since we are only testing for strict identity.
    +            )
    +            |
    +            (?:
    +                # The (non)equality operators allow for wild card and local
    +                # versions to be specified so we have to define these two
    +                # operators separately to enable that.
    +                (?<===|!=)            # Only match for equals and not equals
    +
    +                \s*
    +                v?
    +                (?:[0-9]+!)?          # epoch
    +                [0-9]+(?:\.[0-9]+)*   # release
    +                (?:                   # pre release
    +                    [-_\.]?
    +                    (a|b|c|rc|alpha|beta|pre|preview)
    +                    [-_\.]?
    +                    [0-9]*
    +                )?
    +                (?:                   # post release
    +                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    +                )?
    +
    +                # You cannot use a wild card and a dev or local version
    +                # together so group them with a | and make them optional.
    +                (?:
    +                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
    +                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
    +                    |
    +                    \.\*  # Wild card syntax of .*
    +                )?
    +            )
    +            |
    +            (?:
    +                # The compatible operator requires at least two digits in the
    +                # release segment.
    +                (?<=~=)               # Only match for the compatible operator
    +
    +                \s*
    +                v?
    +                (?:[0-9]+!)?          # epoch
    +                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
    +                (?:                   # pre release
    +                    [-_\.]?
    +                    (a|b|c|rc|alpha|beta|pre|preview)
    +                    [-_\.]?
    +                    [0-9]*
    +                )?
    +                (?:                                   # post release
    +                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    +                )?
    +                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
    +            )
    +            |
    +            (?:
    +                # All other operators only allow a sub set of what the
    +                # (non)equality operators do. Specifically they do not allow
    +                # local versions to be specified nor do they allow the prefix
    +                # matching wild cards.
    +                (?=": "greater_than_equal",
    +        "<": "less_than",
    +        ">": "greater_than",
    +        "===": "arbitrary",
    +    }
    +
    +    def __init__(self, specs="", prereleases=None):
    +        # Split on comma to get each individual specification
    +        _specs = set()
    +        for spec in (s for s in specs.split(",") if s):
    +            match = self._regex.search(spec)
    +            if not match:
    +                raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
    +
    +            _specs.add(
    +                (
    +                    match.group("operator").strip(),
    +                    match.group("version").strip(),
    +                )
    +            )
    +
    +        # Set a frozen set for our specifications
    +        self._specs = frozenset(_specs)
    +
    +        # Store whether or not this Specifier should accept prereleases
    +        self._prereleases = prereleases
    +
    +    def __repr__(self):
    +        return "".format(repr(str(self)))
    +
    +    def __str__(self):
    +        return ",".join(["".join(s) for s in sorted(self._specs)])
    +
    +    def __hash__(self):
    +        return hash(self._specs)
    +
    +    def __and__(self, other):
    +        if isinstance(other, string_types):
    +            other = Specifier(other)
    +        elif not isinstance(other, Specifier):
    +            return NotImplemented
    +
    +        return self.__class__(",".join([str(self), str(other)]))
    +
    +    def __eq__(self, other):
    +        if isinstance(other, string_types):
    +            other = Specifier(other)
    +        elif not isinstance(other, Specifier):
    +            return NotImplemented
    +
    +        return self._specs == other._specs
    +
    +    def __ne__(self, other):
    +        if isinstance(other, string_types):
    +            other = Specifier(other)
    +        elif not isinstance(other, Specifier):
    +            return NotImplemented
    +
    +        return self._specs != other._specs
    +
    +    def _get_operator(self, op):
    +        return getattr(self, "_compare_{0}".format(self._operators[op]))
    +
    +    def _compare_compatible(self, prospective, spec):
    +        # Compatible releases have an equivalent combination of >= and ==. That
    +        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
    +        # implement this in terms of the other specifiers instead of
    +        # implementing it ourselves. The only thing we need to do is construct
    +        # the other specifiers.
    +
    +        # We want everything but the last item in the version, but we want to
    +        # ignore post and dev releases and we want to treat the pre-release as
    +        # it's own separate segment.
    +        prefix = ".".join(
    +            list(
    +                itertools.takewhile(
    +                    lambda x: (not x.startswith("post")
    +                               and not x.startswith("dev")),
    +                    _version_split(spec),
    +                )
    +            )[:-1]
    +        )
    +
    +        # Add the prefix notation to the end of our string
    +        prefix += ".*"
    +
    +        return (self._get_operator(">=")(prospective, spec)
    +                and self._get_operator("==")(prospective, prefix))
    +
    +    def _compare_equal(self, prospective, spec):
    +        # We need special logic to handle prefix matching
    +        if spec.endswith(".*"):
    +            # Split the spec out by dots, and pretend that there is an implicit
    +            # dot in between a release segment and a pre-release segment.
    +            spec = _version_split(spec[:-2])  # Remove the trailing .*
    +
    +            # Split the prospective version out by dots, and pretend that there
    +            # is an implicit dot in between a release segment and a pre-release
    +            # segment.
    +            prospective = _version_split(str(prospective))
    +
    +            # Shorten the prospective version to be the same length as the spec
    +            # so that we can determine if the specifier is a prefix of the
    +            # prospective version or not.
    +            prospective = prospective[:len(spec)]
    +
    +            # Pad out our two sides with zeros so that they both equal the same
    +            # length.
    +            spec, prospective = _pad_version(spec, prospective)
    +        else:
    +            # Convert our spec string into a Version
    +            spec = Version(spec)
    +
    +            # If the specifier does not have a local segment, then we want to
    +            # act as if the prospective version also does not have a local
    +            # segment.
    +            if not spec.local:
    +                prospective = Version(prospective.public)
    +
    +        return prospective == spec
    +
    +    def _compare_not_equal(self, prospective, spec):
    +        return not self._compare_equal(prospective, spec)
    +
    +    def _compare_less_than_equal(self, prospective, spec):
    +        return prospective <= Version(spec)
    +
    +    def _compare_greater_than_equal(self, prospective, spec):
    +        return prospective >= Version(spec)
    +
    +    def _compare_less_than(self, prospective, spec):
    +        # Less than are defined as exclusive operators, this implies that
    +        # pre-releases do not match for the same series as the spec. This is
    +        # implemented by making V imply !=V.*.
    +        return (prospective > Version(spec)
    +                and self._get_operator("!=")(prospective, spec + ".*"))
    +
    +    def _compare_arbitrary(self, prospective, spec):
    +        return str(prospective).lower() == str(spec).lower()
    +
    +    @property
    +    def prereleases(self):
    +        # If there is an explicit prereleases set for this, then we'll just
    +        # blindly use that.
    +        if self._prereleases is not None:
    +            return self._prereleases
    +
    +        # Look at all of our specifiers and determine if they are inclusive
    +        # operators, and if they are if they are including an explicit
    +        # prerelease.
    +        for spec, version in self._specs:
    +            if spec in ["==", ">=", "<=", "~="]:
    +                # The == specifier can include a trailing .*, if it does we
    +                # want to remove before parsing.
    +                if spec == "==" and version.endswith(".*"):
    +                    version = version[:-2]
    +
    +                # Parse the version, and if it is a pre-release than this
    +                # specifier allows pre-releases.
    +                if parse(version).is_prerelease:
    +                    return True
    +
    +        return False
    +
    +    @prereleases.setter
    +    def prereleases(self, value):
    +        self._prereleases = value
    +
    +    def contains(self, item, prereleases=None):
    +        # Determine if prereleases are to be allowed or not.
    +        if prereleases is None:
    +            prereleases = self.prereleases
    +
    +        # Normalize item to a Version or LegacyVersion, this allows us to have
    +        # a shortcut for ``"2.0" in Specifier(">=2")
    +        if isinstance(item, (Version, LegacyVersion)):
    +            version_item = item
    +        else:
    +            try:
    +                version_item = Version(item)
    +            except ValueError:
    +                version_item = LegacyVersion(item)
    +
    +        # Determine if we should be supporting prereleases in this specifier
    +        # or not, if we do not support prereleases than we can short circuit
    +        # logic if this version is a prereleases.
    +        if version_item.is_prerelease and not prereleases:
    +            return False
    +
    +        # Detect if we have any specifiers, if we do not then anything matches
    +        # and we can short circuit all this logic.
    +        if not self._specs:
    +            return True
    +
    +        # If we're operating on a LegacyVersion, then we can only support
    +        # arbitrary comparison so do a quick check to see if the spec contains
    +        # any non arbitrary specifiers
    +        if isinstance(version_item, LegacyVersion):
    +            if any(op != "===" for op, _ in self._specs):
    +                return False
    +
    +        # Ensure that the passed in version matches all of our version
    +        # specifiers
    +        return all(
    +            self._get_operator(op)(
    +                version_item if op != "===" else item,
    +                spec,
    +            )
    +            for op, spec, in self._specs
    +        )
    +
    +    def filter(self, iterable, prereleases=None):
    +        iterable = list(iterable)
    +        yielded = False
    +        found_prereleases = []
    +
    +        kw = {"prereleases": prereleases if prereleases is not None else True}
    +
    +        # Attempt to iterate over all the values in the iterable and if any of
    +        # them match, yield them.
    +        for version in iterable:
    +            if not isinstance(version, (Version, LegacyVersion)):
    +                parsed_version = parse(version)
    +            else:
    +                parsed_version = version
    +
    +            if self.contains(parsed_version, **kw):
    +                # If our version is a prerelease, and we were not set to allow
    +                # prereleases, then we'll store it for later incase nothing
    +                # else matches this specifier.
    +                if (parsed_version.is_prerelease
    +                        and not (prereleases or self.prereleases)):
    +                    found_prereleases.append(version)
    +                # Either this is not a prerelease, or we should have been
    +                # accepting prereleases from the begining.
    +                else:
    +                    yielded = True
    +                    yield version
    +
    +        # Now that we've iterated over everything, determine if we've yielded
    +        # any values, and if we have not and we have any prereleases stored up
    +        # then we will go ahead and yield the prereleases.
    +        if not yielded and found_prereleases:
    +            for version in found_prereleases:
    +                yield version
    +
    +
    +_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")
    +
    +
    +def _version_split(version):
    +    result = []
    +    for item in version.split("."):
    +        match = _prefix_regex.search(item)
    +        if match:
    +            result.extend(match.groups())
    +        else:
    +            result.append(item)
    +    return result
    +
    +
    +def _pad_version(left, right):
    +    left_split, right_split = [], []
    +
    +    # Get the release segment of our versions
    +    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    +    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))
    +
    +    # Get the rest of our versions
    +    left_split.append(left[len(left_split):])
    +    right_split.append(left[len(right_split):])
    +
    +    # Insert our padding
    +    left_split.insert(
    +        1,
    +        ["0"] * max(0, len(right_split[0]) - len(left_split[0])),
    +    )
    +    right_split.insert(
    +        1,
    +        ["0"] * max(0, len(left_split[0]) - len(right_split[0])),
    +    )
    +
    +    return (
    +        list(itertools.chain(*left_split)),
    +        list(itertools.chain(*right_split)),
    +    )
    diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt
    new file mode 100644
    index 0000000000..df383d8bd3
    --- /dev/null
    +++ b/setuptools/_vendor/vendored.txt
    @@ -0,0 +1 @@
    +packaging==14.2
    
    From 9382fa0c05e533400613e1c7c0a777cabb463390 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Thu, 4 Sep 2014 21:04:06 -0400
    Subject: [PATCH 4364/8469] Implement PEP 440 by using the packaging library
    
    ---
     CHANGES.txt                        |   4 +-
     docs/pkg_resources.txt             |  66 +++---------
     pkg_resources.py                   | 161 ++++++++---------------------
     setuptools/_vendor/__init__.py     |   0
     setuptools/command/egg_info.py     |   8 +-
     setuptools/dist.py                 |  21 ++++
     setuptools/tests/test_egg_info.py  |   6 +-
     setuptools/tests/test_resources.py |  34 +++---
     8 files changed, 105 insertions(+), 195 deletions(-)
     create mode 100644 setuptools/_vendor/__init__.py
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index a6e27372d6..e458d76c33 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,7 +2,6 @@
     CHANGES
     =======
     
    ----
     6.0
     ---
     
    @@ -24,6 +23,9 @@ CHANGES
       case-insensitively, but not case-sensitively, should rename those files in
       their repository for better portability.
     
    +* Implement PEP 440 within pkg_resources and setuptools. This will cause some
    +  versions to no longer be installable without using the ``===`` escape hatch.
    +
     ---
     5.8
     ---
    diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt
    index f4a768e41d..6c6405a82e 100644
    --- a/docs/pkg_resources.txt
    +++ b/docs/pkg_resources.txt
    @@ -594,7 +594,7 @@ Requirements Parsing
     
             requirement  ::= project_name versionspec? extras?
             versionspec  ::= comparison version (',' comparison version)*
    -        comparison   ::= '<' | '<=' | '!=' | '==' | '>=' | '>'
    +        comparison   ::= '<' | '<=' | '!=' | '==' | '>=' | '>' | '~=' | '==='
             extras       ::= '[' extralist? ']'
             extralist    ::= identifier (',' identifier)*
             project_name ::= identifier
    @@ -646,13 +646,10 @@ Requirements Parsing
         The ``Requirement`` object's version specifiers (``.specs``) are internally
         sorted into ascending version order, and used to establish what ranges of
         versions are acceptable.  Adjacent redundant conditions are effectively
    -    consolidated (e.g. ``">1, >2"`` produces the same results as ``">1"``, and
    -    ``"<2,<3"`` produces the same results as``"<3"``). ``"!="`` versions are
    +    consolidated (e.g. ``">1, >2"`` produces the same results as ``">2"``, and
    +    ``"<2,<3"`` produces the same results as``"<2"``). ``"!="`` versions are
         excised from the ranges they fall within.  The version being tested for
         acceptability is then checked for membership in the resulting ranges.
    -    (Note that providing conflicting conditions for the same version (e.g.
    -    ``"<2,>=2"`` or ``"==2,!=2"``) is meaningless and may therefore produce
    -    bizarre results when compared with actual version number(s).)
     
     ``__eq__(other_requirement)``
         A requirement compares equal to another requirement if they have
    @@ -681,10 +678,7 @@ Requirements Parsing
     ``specs``
         A list of ``(op,version)`` tuples, sorted in ascending parsed-version
         order.  The `op` in each tuple is a comparison operator, represented as
    -    a string.  The `version` is the (unparsed) version number.  The relative
    -    order of tuples containing the same version numbers is undefined, since
    -    having more than one operator for a given version is either redundant or
    -    self-contradictory.
    +    a string.  The `version` is the (unparsed) version number.
     
     
     Entry Points
    @@ -967,7 +961,7 @@ version
         ``ValueError`` is raised.
     
     parsed_version
    -    The ``parsed_version`` is a tuple representing a "parsed" form of the
    +    The ``parsed_version`` is an object representing a "parsed" form of the
         distribution's ``version``.  ``dist.parsed_version`` is a shortcut for
         calling ``parse_version(dist.version)``.  It is used to compare or sort
         distributions by version.  (See the `Parsing Utilities`_ section below for
    @@ -1541,40 +1535,12 @@ Parsing Utilities
     -----------------
     
     ``parse_version(version)``
    -    Parse a project's version string, returning a value that can be used to
    -    compare versions by chronological order.  Semantically, the format is a
    -    rough cross between distutils' ``StrictVersion`` and ``LooseVersion``
    -    classes; if you give it versions that would work with ``StrictVersion``,
    -    then they will compare the same way.  Otherwise, comparisons are more like
    -    a "smarter" form of ``LooseVersion``.  It is *possible* to create
    -    pathological version coding schemes that will fool this parser, but they
    -    should be very rare in practice.
    -
    -    The returned value will be a tuple of strings.  Numeric portions of the
    -    version are padded to 8 digits so they will compare numerically, but
    -    without relying on how numbers compare relative to strings.  Dots are
    -    dropped, but dashes are retained.  Trailing zeros between alpha segments
    -    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    -    "2.4". Alphanumeric parts are lower-cased.
    -
    -    The algorithm assumes that strings like "-" and any alpha string that
    -    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    -    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    -    considered newer than "2.4-1", which in turn is newer than "2.4".
    -
    -    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    -    come before "final" alphabetically) are assumed to be pre-release versions,
    -    so that the version "2.4" is considered newer than "2.4a1".  Any "-"
    -    characters preceding a pre-release indicator are removed.  (In versions of
    -    setuptools prior to 0.6a9, "-" characters were not removed, leading to the
    -    unintuitive result that "0.2-rc1" was considered a newer version than
    -    "0.2".)
    -
    -    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    -    "rc" are treated as if they were "c", i.e. as though they were release
    -    candidates, and therefore are not as new as a version string that does not
    -    contain them.  And the string "dev" is treated as if it were an "@" sign;
    -    that is, a version coming before even "a" or "alpha".
    +    Parsed a project's version string as defined by PEP 440. The returned
    +    value will be an object that represents the version. These objects may
    +    be compared to each other and sorted. The sorting algorithm is as defined
    +    by PEP 440 with the addition that any version which is not a valid PEP 440
    +    version will be considered less than any valid PEP 440 version and the
    +    invalid versions will continue sorting using the original algorithm.
     
     .. _yield_lines():
     
    @@ -1629,10 +1595,12 @@ Parsing Utilities
         See ``to_filename()``.
     
     ``safe_version(version)``
    -    Similar to ``safe_name()`` except that spaces in the input become dots, and
    -    dots are allowed to exist in the output.  As with ``safe_name()``, if you
    -    are generating a filename from this you should replace any "-" characters
    -    in the output with underscores.
    +    This will return the normalized form of any PEP 440 version, if the version
    +    string is not PEP 440 compatible than it is similar to ``safe_name()``
    +    except that spaces in the input become dots, and dots are allowed to exist
    +    in the output.  As with ``safe_name()``, if you are generating a filename
    +    from this you should replace any "-" characters in the output with
    +    underscores.
     
     ``safe_extra(extra)``
         Return a "safe" form of an extra's name, suitable for use in a requirement
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 517298c90d..b59ec52364 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -73,6 +73,14 @@
     except ImportError:
         pass
     
    +# Import packaging.version.parse as parse_version for a compat shim with the
    +# old parse_version that used to be defined in this file.
    +from setuptools._vendor.packaging.version import parse as parse_version
    +
    +from setuptools._vendor.packaging.version import (
    +    Version, InvalidVersion, Specifier,
    +)
    +
     
     _state_vars = {}
     
    @@ -1143,13 +1151,14 @@ def safe_name(name):
     
     
     def safe_version(version):
    -    """Convert an arbitrary string to a standard version string
    -
    -    Spaces become dots, and all other non-alphanumeric characters become
    -    dashes, with runs of multiple dashes condensed to a single dash.
         """
    -    version = version.replace(' ','.')
    -    return re.sub('[^A-Za-z0-9.]+', '-', version)
    +    Convert an arbitrary string to a standard version string
    +    """
    +    try:
    +        return str(Version(version))  # this will normalize the version
    +    except InvalidVersion:
    +        version = version.replace(' ','.')
    +        return re.sub('[^A-Za-z0-9.]+', '-', version)
     
     
     def safe_extra(extra):
    @@ -2067,7 +2076,7 @@ def yield_lines(strs):
     # Distribution or extra
     DISTRO = re.compile(r"\s*((\w|[-.])+)").match
     # ver. info
    -VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)").match
    +VERSION = re.compile(r"\s*(<=?|>=?|===?|!=|~=)\s*((\w|[-.*_!+])+)").match
     # comma between items
     COMMA = re.compile(r"\s*,").match
     OBRACKET = re.compile(r"\s*\[").match
    @@ -2079,67 +2088,6 @@ def yield_lines(strs):
         re.VERBOSE | re.IGNORECASE
     ).match
     
    -component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
    -replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get
    -
    -def _parse_version_parts(s):
    -    for part in component_re.split(s):
    -        part = replace(part, part)
    -        if not part or part=='.':
    -            continue
    -        if part[:1] in '0123456789':
    -            # pad for numeric comparison
    -            yield part.zfill(8)
    -        else:
    -            yield '*'+part
    -
    -    # ensure that alpha/beta/candidate are before final
    -    yield '*final'
    -
    -def parse_version(s):
    -    """Convert a version string to a chronologically-sortable key
    -
    -    This is a rough cross between distutils' StrictVersion and LooseVersion;
    -    if you give it versions that would work with StrictVersion, then it behaves
    -    the same; otherwise it acts like a slightly-smarter LooseVersion. It is
    -    *possible* to create pathological version coding schemes that will fool
    -    this parser, but they should be very rare in practice.
    -
    -    The returned value will be a tuple of strings.  Numeric portions of the
    -    version are padded to 8 digits so they will compare numerically, but
    -    without relying on how numbers compare relative to strings.  Dots are
    -    dropped, but dashes are retained.  Trailing zeros between alpha segments
    -    or dashes are suppressed, so that e.g. "2.4.0" is considered the same as
    -    "2.4". Alphanumeric parts are lower-cased.
    -
    -    The algorithm assumes that strings like "-" and any alpha string that
    -    alphabetically follows "final"  represents a "patch level".  So, "2.4-1"
    -    is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is
    -    considered newer than "2.4-1", which in turn is newer than "2.4".
    -
    -    Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that
    -    come before "final" alphabetically) are assumed to be pre-release versions,
    -    so that the version "2.4" is considered newer than "2.4a1".
    -
    -    Finally, to handle miscellaneous cases, the strings "pre", "preview", and
    -    "rc" are treated as if they were "c", i.e. as though they were release
    -    candidates, and therefore are not as new as a version string that does not
    -    contain them, and "dev" is replaced with an '@' so that it sorts lower than
    -    than any other pre-release tag.
    -    """
    -    parts = []
    -    for part in _parse_version_parts(s.lower()):
    -        if part.startswith('*'):
    -            # remove '-' before a prerelease tag
    -            if part < '*final':
    -                while parts and parts[-1] == '*final-':
    -                    parts.pop()
    -            # remove trailing zeros from each series of numeric parts
    -            while parts and parts[-1]=='00000000':
    -                parts.pop()
    -        parts.append(part)
    -    return tuple(parts)
    -
     
     class EntryPoint(object):
         """Object representing an advertised importable object"""
    @@ -2292,7 +2240,7 @@ def from_location(cls, location, basename, metadata=None,**kw):
         @property
         def hashcmp(self):
             return (
    -            getattr(self, 'parsed_version', ()),
    +            self.parsed_version,
                 self.precedence,
                 self.key,
                 _remove_md5_fragment(self.location),
    @@ -2338,11 +2286,10 @@ def key(self):
     
         @property
         def parsed_version(self):
    -        try:
    -            return self._parsed_version
    -        except AttributeError:
    -            self._parsed_version = pv = parse_version(self.version)
    -            return pv
    +        if not hasattr(self, "_parsed_version"):
    +            self._parsed_version = parse_version(self.version)
    +
    +        return self._parsed_version
     
         @property
         def version(self):
    @@ -2447,7 +2394,12 @@ def from_filename(cls, filename, metadata=None, **kw):
     
         def as_requirement(self):
             """Return a ``Requirement`` that matches this distribution exactly"""
    -        return Requirement.parse('%s==%s' % (self.project_name, self.version))
    +        if isinstance(self.parsed_version, Version):
    +            spec = "%s==%s" % (self.project_name, self.parsed_version)
    +        else:
    +            spec = "%s===%s" % (self.project_name, self.parsed_version)
    +
    +        return Requirement.parse(spec)
     
         def load_entry_point(self, group, name):
             """Return the `name` entry point of `group` or raise ImportError"""
    @@ -2699,7 +2651,7 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name):
     
             line, p, specs = scan_list(VERSION, LINE_END, line, p, (1, 2),
                 "version spec")
    -        specs = [(op, safe_version(val)) for op, val in specs]
    +        specs = [(op, val) for op, val in specs]
             yield Requirement(project_name, specs, extras)
     
     
    @@ -2708,26 +2660,23 @@ def __init__(self, project_name, specs, extras):
             """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
             self.unsafe_name, project_name = project_name, safe_name(project_name)
             self.project_name, self.key = project_name, project_name.lower()
    -        index = [
    -            (parse_version(v), state_machine[op], op, v)
    -            for op, v in specs
    -        ]
    -        index.sort()
    -        self.specs = [(op, ver) for parsed, trans, op, ver in index]
    -        self.index, self.extras = index, tuple(map(safe_extra, extras))
    +        self.specifier = Specifier(
    +            ",".join(["".join([x, y]) for x, y in specs])
    +        )
    +        self.specs = specs
    +        self.extras = tuple(map(safe_extra, extras))
             self.hashCmp = (
                 self.key,
    -            tuple((op, parsed) for parsed, trans, op, ver in index),
    +            self.specifier,
                 frozenset(self.extras),
             )
             self.__hash = hash(self.hashCmp)
     
         def __str__(self):
    -        specs = ','.join([''.join(s) for s in self.specs])
             extras = ','.join(self.extras)
             if extras:
                 extras = '[%s]' % extras
    -        return '%s%s%s' % (self.project_name, extras, specs)
    +        return '%s%s%s' % (self.project_name, extras, self.specifier)
     
         def __eq__(self, other):
             return (
    @@ -2739,29 +2688,13 @@ def __contains__(self, item):
             if isinstance(item, Distribution):
                 if item.key != self.key:
                     return False
    -            # only get if we need it
    -            if self.index:
    -                item = item.parsed_version
    -        elif isinstance(item, string_types):
    -            item = parse_version(item)
    -        last = None
    -        # -1, 0, 1
    -        compare = lambda a, b: (a > b) - (a < b)
    -        for parsed, trans, op, ver in self.index:
    -            # Indexing: 0, 1, -1
    -            action = trans[compare(item, parsed)]
    -            if action == 'F':
    -                return False
    -            elif action == 'T':
    -                return True
    -            elif action == '+':
    -                last = True
    -            elif action == '-' or last is None:
    -                last = False
    -        # no rules encountered
    -        if last is None:
    -            last = True
    -        return last
    +
    +            item = item.version
    +
    +        # Allow prereleases always in order to match the previous behavior of
    +        # this method. In the future this should be smarter and follow PEP 440
    +        # more accurately.
    +        return self.specifier.contains(item, prereleases=True)
     
         def __hash__(self):
             return self.__hash
    @@ -2777,16 +2710,6 @@ def parse(s):
                 raise ValueError("Expected only one requirement", s)
             raise ValueError("No requirements found", s)
     
    -state_machine = {
    -    #       =><
    -    '<': '--T',
    -    '<=': 'T-T',
    -    '>': 'F+F',
    -    '>=': 'T+F',
    -    '==': 'T..',
    -    '!=': 'F++',
    -}
    -
     
     def _get_mro(cls):
         """Get an mro for a type or classic class"""
    diff --git a/setuptools/_vendor/__init__.py b/setuptools/_vendor/__init__.py
    new file mode 100644
    index 0000000000..e69de29bb2
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index 72493d0b97..cb67255bca 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -15,6 +15,7 @@
     from setuptools.compat import basestring, PY3, StringIO
     from setuptools import svn_utils
     from setuptools.command.sdist import walk_revctrl
    +from setuptools._vendor.packaging.version import Version
     from pkg_resources import (
         parse_requirements, safe_name, parse_version,
         safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
    @@ -68,9 +69,14 @@ def finalize_options(self):
             self.vtags = self.tags()
             self.egg_version = self.tagged_version()
     
    +        parsed_version = parse_version(self.egg_version)
    +
             try:
    +            spec = (
    +                "%s==%s" if isinstance(parsed_version, Version) else "%s===%s"
    +            )
                 list(
    -                parse_requirements('%s==%s' % (self.egg_name,
    +                parse_requirements(spec % (self.egg_name,
                                                    self.egg_version))
                 )
             except ValueError:
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 8b36f67c1d..ae4ff554c8 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -15,6 +15,7 @@
     
     from setuptools.depends import Require
     from setuptools.compat import basestring, PY2
    +from setuptools._vendor.packaging.version import Version, InvalidVersion
     import pkg_resources
     
     def _get_unpatched(cls):
    @@ -268,6 +269,26 @@ def __init__(self, attrs=None):
                 # Some people apparently take "version number" too literally :)
                 self.metadata.version = str(self.metadata.version)
     
    +        if self.metadata.version is not None:
    +            try:
    +                normalized_version = str(Version(self.metadata.version))
    +                if self.metadata.version != normalized_version:
    +                    warnings.warn(
    +                        "The version specified requires normalization, "
    +                        "consider using '%s' instead of '%s'." % (
    +                            normalized_version,
    +                            self.metadata.version,
    +                        )
    +                    )
    +                    self.metadata.version = normalized_version
    +            except (InvalidVersion, TypeError):
    +                warnings.warn(
    +                    "The version specified (%r) is an invalid version, this "
    +                    "may not work as expected with newer versions of "
    +                    "setuptools, pip, and PyPI. Please see PEP 440 for more "
    +                    "details." % self.metadata.version
    +                )
    +
         def parse_command_line(self):
             """Process features after parsing command line options"""
             result = _Distribution.parse_command_line(self)
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 7531e37c1f..4c4f9456d7 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -34,7 +34,7 @@ def _write_entries(self, entries):
             entries_f = open(fn, 'wb')
             entries_f.write(entries)
             entries_f.close()
    -   
    +
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_version_10_format(self):
             """
    @@ -140,7 +140,7 @@ def test_sources(self):
     
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_svn_tags(self):
    -        code, data = environment.run_setup_py(["egg_info", 
    +        code, data = environment.run_setup_py(["egg_info",
                                                    "--tag-svn-revision"],
                                                   pypath=self.old_cwd,
                                                   data_stream=1)
    @@ -155,7 +155,7 @@ def test_svn_tags(self):
                 infile.close()
                 del infile
     
    -        self.assertTrue("Version: 0.1.1-r1\n" in read_contents)
    +        self.assertTrue("Version: 0.1.1.post1\n" in read_contents)
     
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_no_tags(self):
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index 3baa3ab104..9051b4140e 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -16,6 +16,7 @@
     from setuptools.command.easy_install import (get_script_header, is_sh,
         nt_quote_arg)
     from setuptools.compat import StringIO, iteritems, PY3
    +from setuptools._vendor.packaging.version import Specifier
     from .py26compat import skipIf
     
     def safe_repr(obj, short=False):
    @@ -103,7 +104,7 @@ def testCollection(self):
         def checkFooPkg(self,d):
             self.assertEqual(d.project_name, "FooPkg")
             self.assertEqual(d.key, "foopkg")
    -        self.assertEqual(d.version, "1.3-1")
    +        self.assertEqual(d.version, "1.3.post1")
             self.assertEqual(d.py_version, "2.4")
             self.assertEqual(d.platform, "win32")
             self.assertEqual(d.parsed_version, parse_version("1.3-1"))
    @@ -120,9 +121,9 @@ def testDistroBasics(self):
             self.assertEqual(d.platform, None)
     
         def testDistroParse(self):
    -        d = dist_from_fn("FooPkg-1.3_1-py2.4-win32.egg")
    +        d = dist_from_fn("FooPkg-1.3.post1-py2.4-win32.egg")
             self.checkFooPkg(d)
    -        d = dist_from_fn("FooPkg-1.3_1-py2.4-win32.egg-info")
    +        d = dist_from_fn("FooPkg-1.3.post1-py2.4-win32.egg-info")
             self.checkFooPkg(d)
     
         def testDistroMetadata(self):
    @@ -330,24 +331,15 @@ def testBasicContains(self):
             self.assertTrue(twist11 not in r)
             self.assertTrue(twist12 in r)
     
    -    def testAdvancedContains(self):
    -        r, = parse_requirements("Foo>=1.2,<=1.3,==1.9,>2.0,!=2.5,<3.0,==4.5")
    -        for v in ('1.2','1.2.2','1.3','1.9','2.0.1','2.3','2.6','3.0c1','4.5'):
    -            self.assertTrue(v in r, (v,r))
    -        for v in ('1.2c1','1.3.1','1.5','1.9.1','2.0','2.5','3.0','4.0'):
    -            self.assertTrue(v not in r, (v,r))
    -
         def testOptionsAndHashing(self):
             r1 = Requirement.parse("Twisted[foo,bar]>=1.2")
             r2 = Requirement.parse("Twisted[bar,FOO]>=1.2")
    -        r3 = Requirement.parse("Twisted[BAR,FOO]>=1.2.0")
             self.assertEqual(r1,r2)
    -        self.assertEqual(r1,r3)
             self.assertEqual(r1.extras, ("foo","bar"))
             self.assertEqual(r2.extras, ("bar","foo"))  # extras are normalized
             self.assertEqual(hash(r1), hash(r2))
             self.assertEqual(
    -            hash(r1), hash(("twisted", ((">=",parse_version("1.2")),),
    +            hash(r1), hash(("twisted", Specifier(">=1.2"),
                                 frozenset(["foo","bar"])))
             )
     
    @@ -420,7 +412,7 @@ def testSafeName(self):
             self.assertNotEqual(safe_name("peak.web"), "peak-web")
     
         def testSafeVersion(self):
    -        self.assertEqual(safe_version("1.2-1"), "1.2-1")
    +        self.assertEqual(safe_version("1.2-1"), "1.2.post1")
             self.assertEqual(safe_version("1.2 alpha"),  "1.2.alpha")
             self.assertEqual(safe_version("2.3.4 20050521"), "2.3.4.20050521")
             self.assertEqual(safe_version("Money$$$Maker"), "Money-Maker")
    @@ -454,12 +446,12 @@ def c(s1,s2):
             c('0.4', '0.4.0')
             c('0.4.0.0', '0.4.0')
             c('0.4.0-0', '0.4-0')
    -        c('0pl1', '0.0pl1')
    +        c('0post1', '0.0post1')
             c('0pre1', '0.0c1')
             c('0.0.0preview1', '0c1')
             c('0.0c1', '0-rc1')
             c('1.2a1', '1.2.a.1')
    -        c('1.2...a', '1.2a')
    +        c('1.2.a', '1.2a')
     
         def testVersionOrdering(self):
             def c(s1,s2):
    @@ -472,16 +464,14 @@ def c(s1,s2):
             c('2.3a1', '2.3')
             c('2.1-1', '2.1-2')
             c('2.1-1', '2.1.1')
    -        c('2.1', '2.1pl4')
    +        c('2.1', '2.1post4')
             c('2.1a0-20040501', '2.1')
             c('1.1', '02.1')
    -        c('A56','B27')
    -        c('3.2', '3.2.pl0')
    -        c('3.2-1', '3.2pl1')
    -        c('3.2pl1', '3.2pl1-1')
    +        c('3.2', '3.2.post0')
    +        c('3.2post1', '3.2post2')
             c('0.4', '4.0')
             c('0.0.4', '0.4.0')
    -        c('0pl1', '0.4pl1')
    +        c('0post1', '0.4post1')
             c('2.1.0-rc1','2.1.0')
             c('2.1dev','2.1a0')
     
    
    From ec9cf181ba29c444f8fdf4cdd109f30185d69b51 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 11:24:40 -0400
    Subject: [PATCH 4365/8469] Update changelog
    
    ---
     CHANGES.txt | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 4b20333d19..3a0e6936e6 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -27,6 +27,8 @@ CHANGES
       exclusion list now includes Python 3.2 ``__pycache__`` entries.
     * Pull Request #76 and Pull Request #78: lines in top_level.txt are now
       ordered deterministically.
    +* Issue #118: The egg-info directory is now no longer included in the list
    +  of outputs.
     
     ---
     5.8
    
    From 442e0b23457b68a188cc75e4c885a244251c4a9c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 11:29:50 -0400
    Subject: [PATCH 4366/8469] Update changelog
    
    ---
     CHANGES.txt | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 3a0e6936e6..ab58bb1448 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -29,6 +29,9 @@ CHANGES
       ordered deterministically.
     * Issue #118: The egg-info directory is now no longer included in the list
       of outputs.
    +* Pull Request #83: Setuptools now patches distutils msvc9compiler to
    +  recognize the specially-packaged compiler package for easy extension module
    +  support on Python 2.6, 2.7, and 3.2.
     
     ---
     5.8
    
    From 0e2681c1782320311e8cf144d4df923cfafc48c4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 11:30:01 -0400
    Subject: [PATCH 4367/8469] Resave with excess whitespace removed
    
    ---
     setuptools/extension.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/extension.py b/setuptools/extension.py
    index 41a817b79a..c695976ab1 100644
    --- a/setuptools/extension.py
    +++ b/setuptools/extension.py
    @@ -21,7 +21,7 @@ def _patch_msvc9compiler_find_vcvarsall():
         if find_vcvarsall and find_vcvarsall.__module__.startswith('setuptools.'):
             # Already patched
             return
    -    
    +
         def _find_vcvarsall(version):
             Reg = distutils.msvc9compiler.Reg
             try:
    @@ -33,15 +33,15 @@ def _find_vcvarsall(version):
                     productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir")
                 except KeyError:
                     productdir = None
    -        
    +
             if productdir:
                 import os
                 vcvarsall = os.path.join(productdir, "vcvarsall.bat")
                 if os.path.isfile(vcvarsall):
                     return vcvarsall
    -        
    +
             return find_vcvarsall(version)
    -    
    +
         def _query_vcvarsall(version, *args, **kwargs):
             try:
                 return query_vcvarsall(version, *args, **kwargs)
    
    From fb6baa09e5089c3984ee38da5f96b857c7e90c8f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 15:17:55 -0400
    Subject: [PATCH 4368/8469] Move monkey patch to a separate module
    
    ---
     setuptools/extension.py     | 56 ++-----------------------------------
     setuptools/msvc9_support.py | 55 ++++++++++++++++++++++++++++++++++++
     2 files changed, 58 insertions(+), 53 deletions(-)
     create mode 100644 setuptools/msvc9_support.py
    
    diff --git a/setuptools/extension.py b/setuptools/extension.py
    index c695976ab1..8178ed33d7 100644
    --- a/setuptools/extension.py
    +++ b/setuptools/extension.py
    @@ -4,63 +4,13 @@
     import distutils.core
     import distutils.errors
     import distutils.extension
    -import distutils.msvc9compiler
     
    -from setuptools.dist import _get_unpatched
    +from .dist import _get_unpatched
    +from . import msvc9_support
     
     _Extension = _get_unpatched(distutils.core.Extension)
     
    -def _patch_msvc9compiler_find_vcvarsall():
    -    """
    -    Looks for the standalone VC for Python before falling back on
    -    distutils's original approach.
    -    """
    -    VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f'
    -    find_vcvarsall = distutils.msvc9compiler.find_vcvarsall
    -    query_vcvarsall = distutils.msvc9compiler.query_vcvarsall
    -    if find_vcvarsall and find_vcvarsall.__module__.startswith('setuptools.'):
    -        # Already patched
    -        return
    -
    -    def _find_vcvarsall(version):
    -        Reg = distutils.msvc9compiler.Reg
    -        try:
    -            # Per-user installs register the compiler path here
    -            productdir = Reg.get_value(VC_BASE % ('', version), "installdir")
    -        except KeyError:
    -            try:
    -                # All-user installs on a 64-bit system register here
    -                productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir")
    -            except KeyError:
    -                productdir = None
    -
    -        if productdir:
    -            import os
    -            vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    -            if os.path.isfile(vcvarsall):
    -                return vcvarsall
    -
    -        return find_vcvarsall(version)
    -
    -    def _query_vcvarsall(version, *args, **kwargs):
    -        try:
    -            return query_vcvarsall(version, *args, **kwargs)
    -        except distutils.errors.DistutilsPlatformError:
    -            exc = sys.exc_info()[1]
    -            if exc and "vcvarsall.bat" in exc.args[0]:
    -                message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0])
    -                if int(version) == 9:
    -                    # This redirection link is maintained by Microsoft.
    -                    # Contact vspython@microsoft.com if it needs updating.
    -                    raise distutils.errors.DistutilsPlatformError(
    -                        message + ' Get it from http://aka.ms/vcpython27'
    -                    )
    -                raise distutils.errors.DistutilsPlatformError(message)
    -            raise
    -
    -    distutils.msvc9compiler.find_vcvarsall = _find_vcvarsall
    -    distutils.msvc9compiler.query_vcvarsall = _query_vcvarsall
    -_patch_msvc9compiler_find_vcvarsall()
    +msvc9_support.patch_for_specialized_compiler()
     
     def have_pyrex():
         """
    diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py
    new file mode 100644
    index 0000000000..fba2a71a09
    --- /dev/null
    +++ b/setuptools/msvc9_support.py
    @@ -0,0 +1,55 @@
    +import sys
    +
    +import distutils.msvc9compiler
    +
    +def patch_for_specialized_compiler():
    +    """
    +    Patch functions in distutils.msvc9compiler to use the standalone compiler
    +    build for Python (Windows only). Fall back to original behavior when the
    +    standalone compiler is not available.
    +    """
    +    VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f'
    +    find_vcvarsall = distutils.msvc9compiler.find_vcvarsall
    +    query_vcvarsall = distutils.msvc9compiler.query_vcvarsall
    +    if find_vcvarsall and find_vcvarsall.__module__.startswith('setuptools.'):
    +        # Already patched
    +        return
    +
    +    def _find_vcvarsall(version):
    +        Reg = distutils.msvc9compiler.Reg
    +        try:
    +            # Per-user installs register the compiler path here
    +            productdir = Reg.get_value(VC_BASE % ('', version), "installdir")
    +        except KeyError:
    +            try:
    +                # All-user installs on a 64-bit system register here
    +                productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir")
    +            except KeyError:
    +                productdir = None
    +
    +        if productdir:
    +            import os
    +            vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    +            if os.path.isfile(vcvarsall):
    +                return vcvarsall
    +
    +        return find_vcvarsall(version)
    +
    +    def _query_vcvarsall(version, *args, **kwargs):
    +        try:
    +            return query_vcvarsall(version, *args, **kwargs)
    +        except distutils.errors.DistutilsPlatformError:
    +            exc = sys.exc_info()[1]
    +            if exc and "vcvarsall.bat" in exc.args[0]:
    +                message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0])
    +                if int(version) == 9:
    +                    # This redirection link is maintained by Microsoft.
    +                    # Contact vspython@microsoft.com if it needs updating.
    +                    raise distutils.errors.DistutilsPlatformError(
    +                        message + ' Get it from http://aka.ms/vcpython27'
    +                    )
    +                raise distutils.errors.DistutilsPlatformError(message)
    +            raise
    +
    +    distutils.msvc9compiler.find_vcvarsall = _find_vcvarsall
    +    distutils.msvc9compiler.query_vcvarsall = _query_vcvarsall
    
    From c735886bf4433d26f8c0679b722e46393a1dd92a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 15:21:56 -0400
    Subject: [PATCH 4369/8469] Protect against import errors.
    
    ---
     setuptools/msvc9_support.py | 8 ++++++--
     1 file changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py
    index fba2a71a09..f2e5cffc35 100644
    --- a/setuptools/msvc9_support.py
    +++ b/setuptools/msvc9_support.py
    @@ -1,13 +1,17 @@
     import sys
     
    -import distutils.msvc9compiler
    -
     def patch_for_specialized_compiler():
         """
         Patch functions in distutils.msvc9compiler to use the standalone compiler
         build for Python (Windows only). Fall back to original behavior when the
         standalone compiler is not available.
         """
    +    try:
    +        distutils = __import__('distutils.msvc9compiler')
    +    except ImportError:
    +        # The module isn't available to be patched
    +        return
    +
         VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f'
         find_vcvarsall = distutils.msvc9compiler.find_vcvarsall
         query_vcvarsall = distutils.msvc9compiler.query_vcvarsall
    
    From 15f29791a68addcb4e6166cd43f67c1f656f82d3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 17:08:20 -0400
    Subject: [PATCH 4370/8469] Extract patched functions as top-level functions
    
    ---
     setuptools/msvc9_support.py | 78 +++++++++++++++++++------------------
     1 file changed, 41 insertions(+), 37 deletions(-)
    
    diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py
    index f2e5cffc35..61ca85796e 100644
    --- a/setuptools/msvc9_support.py
    +++ b/setuptools/msvc9_support.py
    @@ -1,59 +1,63 @@
     import sys
     
    +distutils = None
    +unpatched = dict()
    +
     def patch_for_specialized_compiler():
         """
         Patch functions in distutils.msvc9compiler to use the standalone compiler
         build for Python (Windows only). Fall back to original behavior when the
         standalone compiler is not available.
         """
    +    global distutils
         try:
             distutils = __import__('distutils.msvc9compiler')
         except ImportError:
             # The module isn't available to be patched
             return
     
    -    VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f'
    -    find_vcvarsall = distutils.msvc9compiler.find_vcvarsall
    -    query_vcvarsall = distutils.msvc9compiler.query_vcvarsall
    -    if find_vcvarsall and find_vcvarsall.__module__.startswith('setuptools.'):
    +    if unpatched:
             # Already patched
             return
     
    -    def _find_vcvarsall(version):
    -        Reg = distutils.msvc9compiler.Reg
    +    unpatched.update(vars(distutils.msvc9compiler))
    +
    +    distutils.msvc9compiler.find_vcvarsall = find_vcvarsall
    +    distutils.msvc9compiler.query_vcvarsall = query_vcvarsall
    +
    +def find_vcvarsall(version):
    +    Reg = distutils.msvc9compiler.Reg
    +    VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f'
    +    try:
    +        # Per-user installs register the compiler path here
    +        productdir = Reg.get_value(VC_BASE % ('', version), "installdir")
    +    except KeyError:
             try:
    -            # Per-user installs register the compiler path here
    -            productdir = Reg.get_value(VC_BASE % ('', version), "installdir")
    +            # All-user installs on a 64-bit system register here
    +            productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir")
             except KeyError:
    -            try:
    -                # All-user installs on a 64-bit system register here
    -                productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir")
    -            except KeyError:
    -                productdir = None
    +            productdir = None
     
    -        if productdir:
    -            import os
    -            vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    -            if os.path.isfile(vcvarsall):
    -                return vcvarsall
    +    if productdir:
    +        import os
    +        vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    +        if os.path.isfile(vcvarsall):
    +            return vcvarsall
     
    -        return find_vcvarsall(version)
    +    return unpatched['find_vcvarsall'](version)
     
    -    def _query_vcvarsall(version, *args, **kwargs):
    -        try:
    -            return query_vcvarsall(version, *args, **kwargs)
    -        except distutils.errors.DistutilsPlatformError:
    -            exc = sys.exc_info()[1]
    -            if exc and "vcvarsall.bat" in exc.args[0]:
    -                message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0])
    -                if int(version) == 9:
    -                    # This redirection link is maintained by Microsoft.
    -                    # Contact vspython@microsoft.com if it needs updating.
    -                    raise distutils.errors.DistutilsPlatformError(
    -                        message + ' Get it from http://aka.ms/vcpython27'
    -                    )
    -                raise distutils.errors.DistutilsPlatformError(message)
    -            raise
    -
    -    distutils.msvc9compiler.find_vcvarsall = _find_vcvarsall
    -    distutils.msvc9compiler.query_vcvarsall = _query_vcvarsall
    +def query_vcvarsall(version, *args, **kwargs):
    +    try:
    +        return unpatched['query_vcvarsall'](version, *args, **kwargs)
    +    except distutils.errors.DistutilsPlatformError:
    +        exc = sys.exc_info()[1]
    +        if exc and "vcvarsall.bat" in exc.args[0]:
    +            message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0])
    +            if int(version) == 9:
    +                # This redirection link is maintained by Microsoft.
    +                # Contact vspython@microsoft.com if it needs updating.
    +                raise distutils.errors.DistutilsPlatformError(
    +                    message + ' Get it from http://aka.ms/vcpython27'
    +                )
    +            raise distutils.errors.DistutilsPlatformError(message)
    +        raise
    
    From 84376ed5bb61c4a8a25048c83ad8d9fa60618db5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 17:09:44 -0400
    Subject: [PATCH 4371/8469] Create global import more traditionally. Now the
     patched functions are available directly as well.
    
    ---
     setuptools/msvc9_support.py | 11 ++++++-----
     1 file changed, 6 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py
    index 61ca85796e..d0be70e2a9 100644
    --- a/setuptools/msvc9_support.py
    +++ b/setuptools/msvc9_support.py
    @@ -1,6 +1,10 @@
     import sys
     
    -distutils = None
    +try:
    +    import distutils.msvc9compiler
    +except ImportError:
    +    pass
    +
     unpatched = dict()
     
     def patch_for_specialized_compiler():
    @@ -9,10 +13,7 @@ def patch_for_specialized_compiler():
         build for Python (Windows only). Fall back to original behavior when the
         standalone compiler is not available.
         """
    -    global distutils
    -    try:
    -        distutils = __import__('distutils.msvc9compiler')
    -    except ImportError:
    +    if 'distutils' not in globals():
             # The module isn't available to be patched
             return
     
    
    From 933a2d7cf491ccade77d1382ecba1eae7a510874 Mon Sep 17 00:00:00 2001
    From: Antoine Pitrou 
    Date: Fri, 26 Sep 2014 23:31:59 +0200
    Subject: [PATCH 4372/8469] Issue #5309: distutils' build and build_ext
     commands now accept a ``-j`` option to enable parallel building of extension
     modules.
    
    ---
     command/build.py        |  9 +++++++
     command/build_ext.py    | 57 ++++++++++++++++++++++++++++++++++++-----
     tests/test_build_ext.py | 56 +++++++++++++++++++++++++---------------
     3 files changed, 94 insertions(+), 28 deletions(-)
    
    diff --git a/command/build.py b/command/build.py
    index cfc15cf0dd..337dd0bfc1 100644
    --- a/command/build.py
    +++ b/command/build.py
    @@ -36,6 +36,8 @@ class build(Command):
              "(default: %s)" % get_platform()),
             ('compiler=', 'c',
              "specify the compiler type"),
    +        ('parallel=', 'j',
    +         "number of parallel build jobs"),
             ('debug', 'g',
              "compile extensions and libraries with debugging information"),
             ('force', 'f',
    @@ -65,6 +67,7 @@ def initialize_options(self):
             self.debug = None
             self.force = 0
             self.executable = None
    +        self.parallel = None
     
         def finalize_options(self):
             if self.plat_name is None:
    @@ -116,6 +119,12 @@ def finalize_options(self):
             if self.executable is None:
                 self.executable = os.path.normpath(sys.executable)
     
    +        if isinstance(self.parallel, str):
    +            try:
    +                self.parallel = int(self.parallel)
    +            except ValueError:
    +                raise DistutilsOptionError("parallel should be an integer")
    +
         def run(self):
             # Run all relevant sub-commands.  This will be some subset of:
             #  - build_py      - pure Python modules
    diff --git a/command/build_ext.py b/command/build_ext.py
    index 3ab2d04bf9..08449e1a51 100644
    --- a/command/build_ext.py
    +++ b/command/build_ext.py
    @@ -4,7 +4,10 @@
     modules (currently limited to C extensions, should accommodate C++
     extensions ASAP)."""
     
    -import sys, os, re
    +import contextlib
    +import os
    +import re
    +import sys
     from distutils.core import Command
     from distutils.errors import *
     from distutils.sysconfig import customize_compiler, get_python_version
    @@ -85,6 +88,8 @@ class build_ext(Command):
              "forcibly build everything (ignore file timestamps)"),
             ('compiler=', 'c',
              "specify the compiler type"),
    +        ('parallel=', 'j',
    +         "number of parallel build jobs"),
             ('swig-cpp', None,
              "make SWIG create C++ files (default is C)"),
             ('swig-opts=', None,
    @@ -124,6 +129,7 @@ def initialize_options(self):
             self.swig_cpp = None
             self.swig_opts = None
             self.user = None
    +        self.parallel = None
     
         def finalize_options(self):
             from distutils import sysconfig
    @@ -134,6 +140,7 @@ def finalize_options(self):
                                        ('compiler', 'compiler'),
                                        ('debug', 'debug'),
                                        ('force', 'force'),
    +                                   ('parallel', 'parallel'),
                                        ('plat_name', 'plat_name'),
                                        )
     
    @@ -274,6 +281,12 @@ def finalize_options(self):
                     self.library_dirs.append(user_lib)
                     self.rpath.append(user_lib)
     
    +        if isinstance(self.parallel, str):
    +            try:
    +                self.parallel = int(self.parallel)
    +            except ValueError:
    +                raise DistutilsOptionError("parallel should be an integer")
    +
         def run(self):
             from distutils.ccompiler import new_compiler
     
    @@ -442,15 +455,45 @@ def get_outputs(self):
         def build_extensions(self):
             # First, sanity-check the 'extensions' list
             self.check_extensions_list(self.extensions)
    +        if self.parallel:
    +            self._build_extensions_parallel()
    +        else:
    +            self._build_extensions_serial()
    +
    +    def _build_extensions_parallel(self):
    +        workers = self.parallel
    +        if self.parallel is True:
    +            workers = os.cpu_count()  # may return None
    +        try:
    +            from concurrent.futures import ThreadPoolExecutor
    +        except ImportError:
    +            workers = None
    +
    +        if workers is None:
    +            self._build_extensions_serial()
    +            return
     
    +        with ThreadPoolExecutor(max_workers=workers) as executor:
    +            futures = [executor.submit(self.build_extension, ext)
    +                       for ext in self.extensions]
    +            for ext, fut in zip(self.extensions, futures):
    +                with self._filter_build_errors(ext):
    +                    fut.result()
    +
    +    def _build_extensions_serial(self):
             for ext in self.extensions:
    -            try:
    +            with self._filter_build_errors(ext):
                     self.build_extension(ext)
    -            except (CCompilerError, DistutilsError, CompileError) as e:
    -                if not ext.optional:
    -                    raise
    -                self.warn('building extension "%s" failed: %s' %
    -                          (ext.name, e))
    +
    +    @contextlib.contextmanager
    +    def _filter_build_errors(self, ext):
    +        try:
    +            yield
    +        except (CCompilerError, DistutilsError, CompileError) as e:
    +            if not ext.optional:
    +                raise
    +            self.warn('building extension "%s" failed: %s' %
    +                      (ext.name, e))
     
         def build_extension(self, ext):
             sources = ext.sources
    diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py
    index b9f407f401..366ffbec9f 100644
    --- a/tests/test_build_ext.py
    +++ b/tests/test_build_ext.py
    @@ -37,6 +37,9 @@ def setUp(self):
             from distutils.command import build_ext
             build_ext.USER_BASE = site.USER_BASE
     
    +    def build_ext(self, *args, **kwargs):
    +        return build_ext(*args, **kwargs)
    +
         def test_build_ext(self):
             global ALREADY_TESTED
             copy_xxmodule_c(self.tmp_dir)
    @@ -44,7 +47,7 @@ def test_build_ext(self):
             xx_ext = Extension('xx', [xx_c])
             dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
             dist.package_dir = self.tmp_dir
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             fixup_build_ext(cmd)
             cmd.build_lib = self.tmp_dir
             cmd.build_temp = self.tmp_dir
    @@ -91,7 +94,7 @@ def tearDown(self):
     
         def test_solaris_enable_shared(self):
             dist = Distribution({'name': 'xx'})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             old = sys.platform
     
             sys.platform = 'sunos' # fooling finalize_options
    @@ -113,7 +116,7 @@ def test_solaris_enable_shared(self):
         def test_user_site(self):
             import site
             dist = Distribution({'name': 'xx'})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
     
             # making sure the user option is there
             options = [name for name, short, lable in
    @@ -144,14 +147,14 @@ def test_optional_extension(self):
             # with the optional argument.
             modules = [Extension('foo', ['xxx'], optional=False)]
             dist = Distribution({'name': 'xx', 'ext_modules': modules})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.ensure_finalized()
             self.assertRaises((UnknownFileError, CompileError),
                               cmd.run)  # should raise an error
     
             modules = [Extension('foo', ['xxx'], optional=True)]
             dist = Distribution({'name': 'xx', 'ext_modules': modules})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.ensure_finalized()
             cmd.run()  # should pass
     
    @@ -160,7 +163,7 @@ def test_finalize_options(self):
             # etc.) are in the include search path.
             modules = [Extension('foo', ['xxx'], optional=False)]
             dist = Distribution({'name': 'xx', 'ext_modules': modules})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.finalize_options()
     
             from distutils import sysconfig
    @@ -172,14 +175,14 @@ def test_finalize_options(self):
     
             # make sure cmd.libraries is turned into a list
             # if it's a string
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.libraries = 'my_lib, other_lib lastlib'
             cmd.finalize_options()
             self.assertEqual(cmd.libraries, ['my_lib', 'other_lib', 'lastlib'])
     
             # make sure cmd.library_dirs is turned into a list
             # if it's a string
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep
             cmd.finalize_options()
             self.assertIn('my_lib_dir', cmd.library_dirs)
    @@ -187,7 +190,7 @@ def test_finalize_options(self):
     
             # make sure rpath is turned into a list
             # if it's a string
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.rpath = 'one%stwo' % os.pathsep
             cmd.finalize_options()
             self.assertEqual(cmd.rpath, ['one', 'two'])
    @@ -196,32 +199,32 @@ def test_finalize_options(self):
     
             # make sure define is turned into 2-tuples
             # strings if they are ','-separated strings
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.define = 'one,two'
             cmd.finalize_options()
             self.assertEqual(cmd.define, [('one', '1'), ('two', '1')])
     
             # make sure undef is turned into a list of
             # strings if they are ','-separated strings
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.undef = 'one,two'
             cmd.finalize_options()
             self.assertEqual(cmd.undef, ['one', 'two'])
     
             # make sure swig_opts is turned into a list
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.swig_opts = None
             cmd.finalize_options()
             self.assertEqual(cmd.swig_opts, [])
     
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.swig_opts = '1 2'
             cmd.finalize_options()
             self.assertEqual(cmd.swig_opts, ['1', '2'])
     
         def test_check_extensions_list(self):
             dist = Distribution()
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.finalize_options()
     
             #'extensions' option must be a list of Extension instances
    @@ -270,7 +273,7 @@ def test_check_extensions_list(self):
         def test_get_source_files(self):
             modules = [Extension('foo', ['xxx'], optional=False)]
             dist = Distribution({'name': 'xx', 'ext_modules': modules})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.ensure_finalized()
             self.assertEqual(cmd.get_source_files(), ['xxx'])
     
    @@ -279,7 +282,7 @@ def test_compiler_option(self):
             # should not be overriden by a compiler instance
             # when the command is run
             dist = Distribution()
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.compiler = 'unix'
             cmd.ensure_finalized()
             cmd.run()
    @@ -292,7 +295,7 @@ def test_get_outputs(self):
             ext = Extension('foo', [c_file], optional=False)
             dist = Distribution({'name': 'xx',
                                  'ext_modules': [ext]})
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             fixup_build_ext(cmd)
             cmd.ensure_finalized()
             self.assertEqual(len(cmd.get_outputs()), 1)
    @@ -355,7 +358,7 @@ def test_ext_fullpath(self):
             #etree_ext = Extension('lxml.etree', [etree_c])
             #dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]})
             dist = Distribution()
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.inplace = 1
             cmd.distribution.package_dir = {'': 'src'}
             cmd.distribution.packages = ['lxml', 'lxml.html']
    @@ -462,7 +465,7 @@ def _try_compile_deployment_target(self, operator, target):
                 'ext_modules': [deptarget_ext]
             })
             dist.package_dir = self.tmp_dir
    -        cmd = build_ext(dist)
    +        cmd = self.build_ext(dist)
             cmd.build_lib = self.tmp_dir
             cmd.build_temp = self.tmp_dir
     
    @@ -481,8 +484,19 @@ def _try_compile_deployment_target(self, operator, target):
                 self.fail("Wrong deployment target during compilation")
     
     
    +class ParallelBuildExtTestCase(BuildExtTestCase):
    +
    +    def build_ext(self, *args, **kwargs):
    +        build_ext = super().build_ext(*args, **kwargs)
    +        build_ext.parallel = True
    +        return build_ext
    +
    +
     def test_suite():
    -    return unittest.makeSuite(BuildExtTestCase)
    +    suite = unittest.TestSuite()
    +    suite.addTest(unittest.makeSuite(BuildExtTestCase))
    +    suite.addTest(unittest.makeSuite(ParallelBuildExtTestCase))
    +    return suite
     
     if __name__ == '__main__':
    -    support.run_unittest(test_suite())
    +    support.run_unittest(__name__)
    
    From 2d58fe235143f63f56e1207ab51e8ea6df1bb04d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 18:14:44 -0400
    Subject: [PATCH 4373/8469] Remove excess whitespace
    
    --HG--
    extra : amend_source : b8e14d29b2a36b84e30e22cf231d0b1730eeb7f4
    ---
     setuptools/tests/test_msvc9compiler.py | 26 ++++++++++++--------------
     1 file changed, 12 insertions(+), 14 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 272e99e8e9..33dca836bd 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -27,20 +27,20 @@ class MockReg:
         with an instance of this class that mocks out the
         functions that access the registry.
         """
    -    
    +
         def __init__(self, hkey_local_machine={}, hkey_current_user={}):
             self.hklm = hkey_local_machine
             self.hkcu = hkey_current_user
    -    
    +
         def __enter__(self):
             self.original_read_keys = distutils.msvc9compiler.Reg.read_keys
             self.original_read_values = distutils.msvc9compiler.Reg.read_values
    -        
    +
             hives = {
                 HKEY_CURRENT_USER: self.hkcu,
                 HKEY_LOCAL_MACHINE: self.hklm,
             }
    -        
    +
             def read_keys(cls, base, key):
                 """Return list of registry keys."""
                 hive = hives.get(base, {})
    @@ -52,12 +52,12 @@ def read_values(cls, base, key):
                 hive = hives.get(base, {})
                 return dict((k.rpartition('\\')[2], hive[k])
                             for k in hive if k.startswith(key.lower()))
    -        
    +
             distutils.msvc9compiler.Reg.read_keys = classmethod(read_keys)
             distutils.msvc9compiler.Reg.read_values = classmethod(read_values)
    -        
    +
             return self
    -    
    +
         def __exit__(self, exc_type, exc_value, exc_tb):
             distutils.msvc9compiler.Reg.read_keys = self.original_read_keys
             distutils.msvc9compiler.Reg.read_values = self.original_read_values
    @@ -80,7 +80,7 @@ def test_find_vcvarsall_patch(self):
             try:
                 with MockReg():
                     self.assertIsNone(find_vcvarsall(9.0))
    -                
    +
                     try:
                         query_vcvarsall(9.0)
                         self.fail('Expected DistutilsPlatformError from query_vcvarsall()')
    @@ -90,10 +90,10 @@ def test_find_vcvarsall_patch(self):
             finally:
                 if old_value:
                     os.environ["VS90COMNTOOLS"] = old_value
    -        
    +
             key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir'
             key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir'
    -        
    +
             # Make two mock files so we can tell whether HCKU entries are
             # preferred to HKLM entries.
             mock_installdir_1 = tempfile.mkdtemp()
    @@ -105,7 +105,7 @@ def test_find_vcvarsall_patch(self):
             try:
                 # Ensure we get the current user's setting first
                 with MockReg(
    -                hkey_current_user={ key_32: mock_installdir_1 },
    +                hkey_current_user={key_32: mock_installdir_1},
                     hkey_local_machine={
                         key_32: mock_installdir_2,
                         key_64: mock_installdir_2,
    @@ -114,7 +114,7 @@ def test_find_vcvarsall_patch(self):
                     self.assertEqual(mock_vcvarsall_bat_1, find_vcvarsall(9.0))
     
                 # Ensure we get the local machine value if it's there
    -            with MockReg(hkey_local_machine={ key_32: mock_installdir_2 }):
    +            with MockReg(hkey_local_machine={key_32: mock_installdir_2}):
                     self.assertEqual(mock_vcvarsall_bat_2, find_vcvarsall(9.0))
     
                 # Ensure we prefer the 64-bit local machine key
    @@ -131,5 +131,3 @@ def test_find_vcvarsall_patch(self):
             finally:
                 shutil.rmtree(mock_installdir_1)
                 shutil.rmtree(mock_installdir_2)
    -
    -    
    \ No newline at end of file
    
    From d195bc900beccb22c8de243416c40564ea28402f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 18:25:32 -0400
    Subject: [PATCH 4374/8469] Remove unused import
    
    ---
     setuptools/tests/test_msvc9compiler.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 33dca836bd..3a2ef9706d 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -20,7 +20,7 @@
     from distutils.errors import DistutilsPlatformError
     
     # importing only setuptools should apply the patch
    -import setuptools
    +__import__('setuptools')
     
     class MockReg:
         """Mock for distutils.msvc9compiler.Reg. We patch it
    
    From e87ba1aa48bb891bb29704d321754623956fef44 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 18:30:14 -0400
    Subject: [PATCH 4375/8469] Move stable import into stdlib imports section
    
    ---
     setuptools/tests/test_msvc9compiler.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 3a2ef9706d..74b5220b0b 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -10,6 +10,7 @@
     import sys
     import tempfile
     import unittest
    +import distutils.errors
     
     try:
         from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
    @@ -17,7 +18,6 @@
         from _winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
     
     import distutils.msvc9compiler
    -from distutils.errors import DistutilsPlatformError
     
     # importing only setuptools should apply the patch
     __import__('setuptools')
    @@ -84,7 +84,7 @@ def test_find_vcvarsall_patch(self):
                     try:
                         query_vcvarsall(9.0)
                         self.fail('Expected DistutilsPlatformError from query_vcvarsall()')
    -                except DistutilsPlatformError:
    +                except distutils.errors.DistutilsPlatformError:
                         exc_message = str(sys.exc_info()[1])
                     self.assertIn('aka.ms/vcpython27', exc_message)
             finally:
    
    From 57ff99e246a2fdb3d59e7aa977fe3b1e00924c99 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 18:38:39 -0400
    Subject: [PATCH 4376/8469] Grab winreg module from distutils.msvc9compiler
    
    ---
     setuptools/tests/test_msvc9compiler.py | 12 +++++-------
     1 file changed, 5 insertions(+), 7 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 74b5220b0b..8f71c3d597 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -12,11 +12,6 @@
     import unittest
     import distutils.errors
     
    -try:
    -    from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
    -except ImportError:
    -    from _winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
    -
     import distutils.msvc9compiler
     
     # importing only setuptools should apply the patch
    @@ -36,9 +31,12 @@ def __enter__(self):
             self.original_read_keys = distutils.msvc9compiler.Reg.read_keys
             self.original_read_values = distutils.msvc9compiler.Reg.read_values
     
    +        _winreg = getattr(distutils.msvc9compiler, '_winreg', None)
    +        winreg = getattr(distutils.msvc9compiler, 'winreg', _winreg)
    +
             hives = {
    -            HKEY_CURRENT_USER: self.hkcu,
    -            HKEY_LOCAL_MACHINE: self.hklm,
    +            winreg.HKEY_CURRENT_USER: self.hkcu,
    +            winreg.HKEY_LOCAL_MACHINE: self.hklm,
             }
     
             def read_keys(cls, base, key):
    
    From dfa59bff40dce47c485cdba1f28d1a8908e7e2be Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 18:47:55 -0400
    Subject: [PATCH 4377/8469] Skip tests if msvc9compiler isn't available.
    
    ---
     setuptools/tests/test_msvc9compiler.py | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 8f71c3d597..99afb10e78 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -12,8 +12,6 @@
     import unittest
     import distutils.errors
     
    -import distutils.msvc9compiler
    -
     # importing only setuptools should apply the patch
     __import__('setuptools')
     
    @@ -63,6 +61,10 @@ def __exit__(self, exc_type, exc_value, exc_tb):
     class TestMSVC9Compiler(unittest.TestCase):
     
         def test_find_vcvarsall_patch(self):
    +        if not hasattr(distutils, 'msvc9compiler'):
    +            # skip
    +            return
    +
             self.assertEqual(
                 "setuptools.extension",
                 distutils.msvc9compiler.find_vcvarsall.__module__,
    
    From 552e44fdce5a897f8e41efe07cf480759a59bb94 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:05:16 -0400
    Subject: [PATCH 4378/8469] Extracting environment patcher
    
    ---
     setuptools/tests/test_msvc9compiler.py | 26 +++++++++++++++++++++-----
     1 file changed, 21 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 99afb10e78..80aac2f6f6 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -11,6 +11,7 @@
     import tempfile
     import unittest
     import distutils.errors
    +import contextlib
     
     # importing only setuptools should apply the patch
     __import__('setuptools')
    @@ -58,6 +59,25 @@ def __exit__(self, exc_type, exc_value, exc_tb):
             distutils.msvc9compiler.Reg.read_keys = self.original_read_keys
             distutils.msvc9compiler.Reg.read_values = self.original_read_values
     
    +@contextlib.contextmanager
    +def patch_env(**replacements):
    +    saved = dict(
    +        (key, os.environ['key'])
    +        for key in replacements
    +        if key in os.environ
    +    )
    +    os.environ.update(replacements)
    +
    +    # remove values that are null
    +    null_keys = (key for (key, value) in replacements if value is None)
    +    list(map(os.environ.pop, (null_keys)))
    +
    +    yield
    +
    +    for key in replacements:
    +        os.environ.pop(key, None)
    +    os.environ.update(saved)
    +
     class TestMSVC9Compiler(unittest.TestCase):
     
         def test_find_vcvarsall_patch(self):
    @@ -76,8 +96,7 @@ def test_find_vcvarsall_patch(self):
     
             # No registry entries or environment variable means we should
             # not find anything
    -        old_value = os.environ.pop("VS90COMNTOOLS", None)
    -        try:
    +        with patch_env(VS90COMNTOOLS=None):
                 with MockReg():
                     self.assertIsNone(find_vcvarsall(9.0))
     
    @@ -87,9 +106,6 @@ def test_find_vcvarsall_patch(self):
                     except distutils.errors.DistutilsPlatformError:
                         exc_message = str(sys.exc_info()[1])
                     self.assertIn('aka.ms/vcpython27', exc_message)
    -        finally:
    -            if old_value:
    -                os.environ["VS90COMNTOOLS"] = old_value
     
             key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir'
             key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir'
    
    From d501896d27cf94f62b80fe266d9369e681a32de6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:09:41 -0400
    Subject: [PATCH 4379/8469] Correct test assertion
    
    ---
     setuptools/tests/test_msvc9compiler.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 80aac2f6f6..02ced8cf03 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -86,7 +86,7 @@ def test_find_vcvarsall_patch(self):
                 return
     
             self.assertEqual(
    -            "setuptools.extension",
    +            "setuptools.msvc9_support",
                 distutils.msvc9compiler.find_vcvarsall.__module__,
                 "find_vcvarsall was not patched"
             )
    
    From 475e7c869bb60dba329a9642ff13bd10d1cbdced Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:11:04 -0400
    Subject: [PATCH 4380/8469] Meant 'items'
    
    ---
     setuptools/tests/test_msvc9compiler.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 02ced8cf03..1c557d391d 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -69,7 +69,7 @@ def patch_env(**replacements):
         os.environ.update(replacements)
     
         # remove values that are null
    -    null_keys = (key for (key, value) in replacements if value is None)
    +    null_keys = (key for (key, value) in replacements.items() if value is None)
         list(map(os.environ.pop, (null_keys)))
     
         yield
    
    From 813855aa5c9cb09c1e0faffcb80bfa2cb0cb2852 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:18:50 -0400
    Subject: [PATCH 4381/8469] Avoid passing None values to os.environ.
    
    ---
     setuptools/tests/test_msvc9compiler.py | 11 +++++++----
     1 file changed, 7 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 1c557d391d..b2769759ac 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -66,13 +66,16 @@ def patch_env(**replacements):
             for key in replacements
             if key in os.environ
         )
    -    os.environ.update(replacements)
     
         # remove values that are null
    -    null_keys = (key for (key, value) in replacements.items() if value is None)
    -    list(map(os.environ.pop, (null_keys)))
    +    remove = (key for (key, value) in replacements.items() if value is None)
    +    for key in list(remove):
    +        os.environ.pop(key, None)
    +        replacements.pop(key)
    +
    +    os.environ.update(replacements)
     
    -    yield
    +    yield saved
     
         for key in replacements:
             os.environ.pop(key, None)
    
    From 8759ca96ec6c6c318d65e0c93ca8b3c93f45e7f9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:20:32 -0400
    Subject: [PATCH 4382/8469] Add docstring
    
    ---
     setuptools/tests/test_msvc9compiler.py | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index b2769759ac..ac5e391475 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -61,6 +61,10 @@ def __exit__(self, exc_type, exc_value, exc_tb):
     
     @contextlib.contextmanager
     def patch_env(**replacements):
    +    """
    +    In a context, patch the environment with replacements. Pass None values
    +    to clear the values.
    +    """
         saved = dict(
             (key, os.environ['key'])
             for key in replacements
    
    From 46a65a1a635cf3986c853907d1a16c5173cc125d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Sep 2014 19:21:21 -0400
    Subject: [PATCH 4383/8469] Always restore os.environ even if an exception
     occurs.
    
    ---
     setuptools/tests/test_msvc9compiler.py | 11 ++++++-----
     1 file changed, 6 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index ac5e391475..970f76793d 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -79,11 +79,12 @@ def patch_env(**replacements):
     
         os.environ.update(replacements)
     
    -    yield saved
    -
    -    for key in replacements:
    -        os.environ.pop(key, None)
    -    os.environ.update(saved)
    +    try:
    +        yield saved
    +    finally:
    +        for key in replacements:
    +            os.environ.pop(key, None)
    +        os.environ.update(saved)
     
     class TestMSVC9Compiler(unittest.TestCase):
     
    
    From b67548a1ed3c0f606846303041e46bca76b635b6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 02:08:19 -0400
    Subject: [PATCH 4384/8469] Update changelog to reference documented issue.
     Fixes #258.
    
    ---
     CHANGES.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index ab58bb1448..59e63aadc4 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -29,7 +29,7 @@ CHANGES
       ordered deterministically.
     * Issue #118: The egg-info directory is now no longer included in the list
       of outputs.
    -* Pull Request #83: Setuptools now patches distutils msvc9compiler to
    +* Issue #258: Setuptools now patches distutils msvc9compiler to
       recognize the specially-packaged compiler package for easy extension module
       support on Python 2.6, 2.7, and 3.2.
     
    
    From 39f98548e30b5e333276994fcaea4e529be4e40c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 02:12:43 -0400
    Subject: [PATCH 4385/8469] Bumped to 6.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 0fd1c8725e..f4a1aaecf0 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "5.9"
    +DEFAULT_VERSION = "6.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 7244139e8f..5fa6331d5e 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '5.9'
    +__version__ = '6.0'
    
    From 7caf6b91f8602fac8addbdcf5cb023b49d01e1f2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 02:12:46 -0400
    Subject: [PATCH 4386/8469] Added tag 6.0 for changeset 755cbfd3743f
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 1753222139..dadf223839 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -154,3 +154,4 @@ ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1
     a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     37ed55fd310d0cd32009dc5676121e86b404a23d 5.7
     67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8
    +755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0
    
    From bb37802dc9f5bcaff5418438a88877b521208932 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 02:13:23 -0400
    Subject: [PATCH 4387/8469] Bumped to 6.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index f4a1aaecf0..a693849f93 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.0"
    +DEFAULT_VERSION = "6.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 5fa6331d5e..2d3f6733a8 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.0'
    +__version__ = '6.1'
    
    From 89bde0f0a7af8936e38dbedbd82e2af14f3efc39 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:29:26 -0400
    Subject: [PATCH 4388/8469] Add doctesting of modules. Ref #259.
    
    ---
     .travis.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index bc387f46cb..b434a79369 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -11,5 +11,5 @@ script:
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    - - python setup.py ptr
    + - python setup.py ptr --addopts='--doctest-modules'
      - python ez_setup.py --version 5.4.1
    
    From 5802fd80e413b63af8be9198f14da1ade47d409c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:29:53 -0400
    Subject: [PATCH 4389/8469] Use rpartition here, essential to the algorithm.
     Fixes #259.
    
    --HG--
    extra : amend_source : d7b3c001b4db616a67793dcc57d5c13e3828ad3a
    ---
     setuptools/command/install_lib.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py
    index 3cd16a8f00..9b7722276b 100644
    --- a/setuptools/command/install_lib.py
    +++ b/setuptools/command/install_lib.py
    @@ -43,7 +43,7 @@ def _all_packages(pkg_name):
             """
             while pkg_name:
                 yield pkg_name
    -            pkg_name, sep, child = pkg_name.partition('.')
    +            pkg_name, sep, child = pkg_name.rpartition('.')
     
         def _get_SVEM_NSPs(self):
             """
    
    From 84a4f9e884d4d173c7b1dbf076dcfb1b0232b261 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:40:32 -0400
    Subject: [PATCH 4390/8469] Update changelog
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 59e63aadc4..419c3c2b6f 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +-----
    +6.0.1
    +-----
    +
    +* Issue #259: Fixed regression with namespace package handling on ``single
    +  version, externally managed`` installs.
    +
     ---
     6.0
     ---
    
    From 977e98de5785333c945cd61e4e5878d4484fc4c9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:40:48 -0400
    Subject: [PATCH 4391/8469] Bumped to 6.0.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index a693849f93..e8157e494a 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.1"
    +DEFAULT_VERSION = "6.0.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 2d3f6733a8..c4b0ef895d 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.1'
    +__version__ = '6.0.1'
    
    From 3fb5d0ea96856387fc36603bc3a4d5b5fee2597c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:40:51 -0400
    Subject: [PATCH 4392/8469] Added tag 6.0.1 for changeset bc6655b4acf2
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index dadf223839..ff59322b8b 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -155,3 +155,4 @@ a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     37ed55fd310d0cd32009dc5676121e86b404a23d 5.7
     67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8
     755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0
    +bc6655b4acf205dd9f25c702955645656077398a 6.0.1
    
    From b08527744e3f6cec0412a5de5cae9837e403061a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 09:41:26 -0400
    Subject: [PATCH 4393/8469] Bumped to 6.0.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index e8157e494a..c5d85d37e6 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.0.1"
    +DEFAULT_VERSION = "6.0.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index c4b0ef895d..c974945db9 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.0.1'
    +__version__ = '6.0.2'
    
    From 60b97b0ca2335907fea90a904fcabedc44a47886 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 11:21:57 -0400
    Subject: [PATCH 4394/8469] Try ignoring release.py
    
    ---
     .travis.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index b434a79369..b2ebcf1ede 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -11,5 +11,5 @@ script:
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    - - python setup.py ptr --addopts='--doctest-modules'
    + - python setup.py ptr --addopts='--doctest-modules --ignore release.py'
      - python ez_setup.py --version 5.4.1
    
    From a40ae765974198e88337627123d97f9fc45a2e4b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 11:26:29 -0400
    Subject: [PATCH 4395/8469] Also ignore lib2to3_ex.py
    
    ---
     .travis.yml | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index b2ebcf1ede..b969053840 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -11,5 +11,6 @@ script:
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    - - python setup.py ptr --addopts='--doctest-modules --ignore release.py'
    + - python setup.py ptr --addopts='--doctest-modules --ignore release.py
    + --ignore setuptools/lib2to3_ex.py'
      - python ez_setup.py --version 5.4.1
    
    From 2b5d7f1333ff860bc9210ab3ad9ab2791db12bc2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 14:56:52 -0400
    Subject: [PATCH 4396/8469] Move doctest directive and ignores to setup.cfg
    
    ---
     .travis.yml | 3 +--
     setup.cfg   | 2 +-
     2 files changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index b969053840..bc387f46cb 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -11,6 +11,5 @@ script:
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    - - python setup.py ptr --addopts='--doctest-modules --ignore release.py
    - --ignore setuptools/lib2to3_ex.py'
    + - python setup.py ptr
      - python ez_setup.py --version 5.4.1
    diff --git a/setup.cfg b/setup.cfg
    index 7f5fc79681..74a172a47a 100755
    --- a/setup.cfg
    +++ b/setup.cfg
    @@ -21,5 +21,5 @@ formats = gztar zip
     universal=1
     
     [pytest]
    -addopts=--ignore tests/manual_test.py --ignore tests/shlib_test
    +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test
     norecursedirs=dist build *.egg
    
    From 13823cb975590687902edd3c4c073b2c1671cebc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 15:54:14 -0400
    Subject: [PATCH 4397/8469] Update changelog with references to changes.
    
    ---
     CHANGES.txt | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 3cba63539a..19d8095f9b 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -6,8 +6,14 @@ CHANGES
     7.0
     ---
     
    -* Implement PEP 440 within pkg_resources and setuptools. This will cause some
    -  versions to no longer be installable without using the ``===`` escape hatch.
    +* Implement `PEP 440 `_ within
    +  pkg_resources and setuptools. This change
    +  deprecates some version numbers such that they will no longer be installable
    +  without using the ``===`` escape hatch. See `the changes to test_resources
    +  `_
    +  for specific examples of version numbers and specifiers that are no longer
    +  supported. Setuptools now "vendors" the `packaging
    +  `_ library.
     
     -----
     6.0.1
    
    From 6f6ee4f28ec5ceb95594264746da3676947aaa08 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:05:06 -0400
    Subject: [PATCH 4398/8469] Avoid trailing comments
    
    ---
     pkg_resources.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index b59ec52364..f2e8b850af 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -1155,7 +1155,8 @@ def safe_version(version):
         Convert an arbitrary string to a standard version string
         """
         try:
    -        return str(Version(version))  # this will normalize the version
    +        # normalize the version
    +        return str(Version(version))
         except InvalidVersion:
             version = version.replace(' ','.')
             return re.sub('[^A-Za-z0-9.]+', '-', version)
    
    From a9541756f6a12c91704feffec4ddfee859f12c30 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:10:17 -0400
    Subject: [PATCH 4399/8469] Fix indent
    
    ---
     setuptools/command/egg_info.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index 9ba719fe71..de43bf0cde 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -76,8 +76,7 @@ def finalize_options(self):
                     "%s==%s" if isinstance(parsed_version, Version) else "%s===%s"
                 )
                 list(
    -                parse_requirements(spec % (self.egg_name,
    -                                               self.egg_version))
    +                parse_requirements(spec % (self.egg_name, self.egg_version))
                 )
             except ValueError:
                 raise distutils.errors.DistutilsOptionError(
    
    From 7d9c21a893431798ba77edd62b5490ff4ce47ecf Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:13:48 -0400
    Subject: [PATCH 4400/8469] Prefer packaging library if available.
    
    ---
     pkg_resources.py                   | 24 ++++++++++++++----------
     setup.py                           |  3 +++
     setuptools/command/egg_info.py     | 11 +++++++++--
     setuptools/dist.py                 | 14 +++++++++++---
     setuptools/tests/test_resources.py | 10 ++++++++--
     5 files changed, 45 insertions(+), 17 deletions(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index f2e8b850af..6f21b0bfbc 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -14,6 +14,8 @@
     method.
     """
     
    +from __future__ import absolute_import
    +
     import sys
     import os
     import io
    @@ -73,13 +75,15 @@
     except ImportError:
         pass
     
    -# Import packaging.version.parse as parse_version for a compat shim with the
    -# old parse_version that used to be defined in this file.
    -from setuptools._vendor.packaging.version import parse as parse_version
    +try:
    +    import packaging.version
    +except ImportError:
    +    # fallback to vendored version
    +    import setuptools._vendor.packaging.version
    +    packaging = setuptools._vendor.packaging
     
    -from setuptools._vendor.packaging.version import (
    -    Version, InvalidVersion, Specifier,
    -)
    +# For compatibility, expose packaging.version.parse as parse_version
    +parse_version = packaging.version.parse
     
     
     _state_vars = {}
    @@ -1156,8 +1160,8 @@ def safe_version(version):
         """
         try:
             # normalize the version
    -        return str(Version(version))
    -    except InvalidVersion:
    +        return str(packaging.version.Version(version))
    +    except packaging.version.InvalidVersion:
             version = version.replace(' ','.')
             return re.sub('[^A-Za-z0-9.]+', '-', version)
     
    @@ -2395,7 +2399,7 @@ def from_filename(cls, filename, metadata=None, **kw):
     
         def as_requirement(self):
             """Return a ``Requirement`` that matches this distribution exactly"""
    -        if isinstance(self.parsed_version, Version):
    +        if isinstance(self.parsed_version, packaging.version.Version):
                 spec = "%s==%s" % (self.project_name, self.parsed_version)
             else:
                 spec = "%s===%s" % (self.project_name, self.parsed_version)
    @@ -2661,7 +2665,7 @@ def __init__(self, project_name, specs, extras):
             """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
             self.unsafe_name, project_name = project_name, safe_name(project_name)
             self.project_name, self.key = project_name, project_name.lower()
    -        self.specifier = Specifier(
    +        self.specifier = packaging.version.Specifier(
                 ",".join(["".join([x, y]) for x, y in specs])
             )
             self.specs = specs
    diff --git a/setup.py b/setup.py
    index bac4e29dbf..cc0e468402 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -198,6 +198,9 @@ def _save_entry_points(self):
             Topic :: System :: Systems Administration
             Topic :: Utilities
             """).strip().splitlines(),
    +    install_requires=[
    +        "packaging>=14.2,<15.0.dev0",
    +    ],
         extras_require={
             "ssl:sys_platform=='win32'": "wincertstore==0.2",
             "certs": "certifi==1.0.1",
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index de43bf0cde..43df87dcb5 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -10,12 +10,18 @@
     import re
     import sys
     
    +try:
    +    import packaging.version
    +except ImportError:
    +    # fallback to vendored version
    +    import setuptools._vendor.packaging.version
    +    packaging = setuptools._vendor.packaging
    +
     from setuptools import Command
     from setuptools.command.sdist import sdist
     from setuptools.compat import basestring, PY3, StringIO
     from setuptools import svn_utils
     from setuptools.command.sdist import walk_revctrl
    -from setuptools._vendor.packaging.version import Version
     from pkg_resources import (
         parse_requirements, safe_name, parse_version,
         safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
    @@ -72,8 +78,9 @@ def finalize_options(self):
             parsed_version = parse_version(self.egg_version)
     
             try:
    +            is_version = isinstance(parsed_version, packaging.version.Version)
                 spec = (
    -                "%s==%s" if isinstance(parsed_version, Version) else "%s===%s"
    +                "%s==%s" if is_version else "%s===%s"
                 )
                 list(
                     parse_requirements(spec % (self.egg_name, self.egg_version))
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index ae4ff554c8..a3a37ee498 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -13,11 +13,18 @@
     from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
         DistutilsSetupError)
     
    +try:
    +    import packaging.version
    +except ImportError:
    +    # fallback to vendored version
    +    import setuptools._vendor.packaging.version
    +    packaging = setuptools._vendor.packaging
    +
     from setuptools.depends import Require
     from setuptools.compat import basestring, PY2
    -from setuptools._vendor.packaging.version import Version, InvalidVersion
     import pkg_resources
     
    +
     def _get_unpatched(cls):
         """Protect against re-patching the distutils if reloaded
     
    @@ -271,7 +278,8 @@ def __init__(self, attrs=None):
     
             if self.metadata.version is not None:
                 try:
    -                normalized_version = str(Version(self.metadata.version))
    +                ver = packaging.version.Version(self.metadata.version)
    +                normalized_version = str(ver)
                     if self.metadata.version != normalized_version:
                         warnings.warn(
                             "The version specified requires normalization, "
    @@ -281,7 +289,7 @@ def __init__(self, attrs=None):
                             )
                         )
                         self.metadata.version = normalized_version
    -            except (InvalidVersion, TypeError):
    +            except (packaging.version.InvalidVersion, TypeError):
                     warnings.warn(
                         "The version specified (%r) is an invalid version, this "
                         "may not work as expected with newer versions of "
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index 9051b4140e..8336a85d3a 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -8,6 +8,13 @@
     import shutil
     from unittest import TestCase
     
    +try:
    +    import packaging.version
    +except ImportError:
    +    # fallback to vendored version
    +    import setuptools._vendor.packaging.version
    +    packaging = setuptools._vendor.packaging
    +
     import pkg_resources
     from pkg_resources import (parse_requirements, VersionConflict, parse_version,
         Distribution, EntryPoint, Requirement, safe_version, safe_name,
    @@ -16,7 +23,6 @@
     from setuptools.command.easy_install import (get_script_header, is_sh,
         nt_quote_arg)
     from setuptools.compat import StringIO, iteritems, PY3
    -from setuptools._vendor.packaging.version import Specifier
     from .py26compat import skipIf
     
     def safe_repr(obj, short=False):
    @@ -339,7 +345,7 @@ def testOptionsAndHashing(self):
             self.assertEqual(r2.extras, ("bar","foo"))  # extras are normalized
             self.assertEqual(hash(r1), hash(r2))
             self.assertEqual(
    -            hash(r1), hash(("twisted", Specifier(">=1.2"),
    +            hash(r1), hash(("twisted", packaging.version.Specifier(">=1.2"),
                                 frozenset(["foo","bar"])))
             )
     
    
    From c2e9f2ad32978620037bfbcc792e94e8e32f8097 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:16:22 -0400
    Subject: [PATCH 4401/8469] Update requirements
    
    ---
     setuptools.egg-info/requires.txt | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt
    index 4fa66c7141..f3f4471e81 100644
    --- a/setuptools.egg-info/requires.txt
    +++ b/setuptools.egg-info/requires.txt
    @@ -1,3 +1,4 @@
    +packaging>=14.2,<15.0.dev0
     
     [certs]
     certifi==1.0.1
    
    From aa87355981a6475855116f1b663ba654e332b5a7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:24:55 -0400
    Subject: [PATCH 4402/8469] Bump to 7.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index c5d85d37e6..a523401e97 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.0.2"
    +DEFAULT_VERSION = "7.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index c974945db9..29524eba32 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.0.2'
    +__version__ = '7.0'
    
    From 5e62aa3b59398252faef0d638a0f087d6c682800 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Sep 2014 16:25:13 -0400
    Subject: [PATCH 4403/8469] Added tag 7.0b1 for changeset 8b8a52665803
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index ff59322b8b..d3538875ed 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -156,3 +156,4 @@ a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8
     755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0
     bc6655b4acf205dd9f25c702955645656077398a 6.0.1
    +8b8a52665803abf0bc2d2e892fc59ce5416f4bf7 7.0b1
    
    From 04d00c2dbfc4a8facae5d91617f3a30de5474312 Mon Sep 17 00:00:00 2001
    From: R David Murray 
    Date: Sat, 27 Sep 2014 16:56:15 -0400
    Subject: [PATCH 4404/8469] #10510: make distuitls upload/register use HTML
     standards compliant CRLF.
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    Patch by Ian Cordasco, approved by Éric Araujo.
    ---
     command/upload.py    | 10 +++++-----
     tests/test_upload.py |  2 +-
     2 files changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/command/upload.py b/command/upload.py
    index 180be7c750..9b15b67bae 100644
    --- a/command/upload.py
    +++ b/command/upload.py
    @@ -143,11 +143,11 @@ def upload_file(self, command, pyversion, filename):
     
             # Build up the MIME payload for the POST data
             boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
    -        sep_boundary = b'\n--' + boundary.encode('ascii')
    -        end_boundary = sep_boundary + b'--'
    +        sep_boundary = b'\r\n--' + boundary.encode('ascii')
    +        end_boundary = sep_boundary + b'--\r\n'
             body = io.BytesIO()
             for key, value in data.items():
    -            title = '\nContent-Disposition: form-data; name="%s"' % key
    +            title = '\r\nContent-Disposition: form-data; name="%s"' % key
                 # handle multiple entries for the same name
                 if type(value) != type([]):
                     value = [value]
    @@ -159,12 +159,12 @@ def upload_file(self, command, pyversion, filename):
                         value = str(value).encode('utf-8')
                     body.write(sep_boundary)
                     body.write(title.encode('utf-8'))
    -                body.write(b"\n\n")
    +                body.write(b"\r\n\r\n")
                     body.write(value)
                     if value and value[-1:] == b'\r':
                         body.write(b'\n')  # write an extra newline (lurve Macs)
             body.write(end_boundary)
    -        body.write(b"\n")
    +        body.write(b"\r\n")
             body = body.getvalue()
     
             self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
    diff --git a/tests/test_upload.py b/tests/test_upload.py
    index 0380f97944..24015416eb 100644
    --- a/tests/test_upload.py
    +++ b/tests/test_upload.py
    @@ -127,7 +127,7 @@ def test_upload(self):
     
             # what did we send ?
             headers = dict(self.last_open.req.headers)
    -        self.assertEqual(headers['Content-length'], '2087')
    +        self.assertEqual(headers['Content-length'], '2163')
             content_type = headers['Content-type']
             self.assertTrue(content_type.startswith('multipart/form-data'))
             self.assertEqual(self.last_open.req.get_method(), 'POST')
    
    From 731789f97ab96b9d91f5485c801078c1a9e66972 Mon Sep 17 00:00:00 2001
    From: R David Murray 
    Date: Sun, 28 Sep 2014 11:01:11 -0400
    Subject: [PATCH 4405/8469] #10510: Fix bug in forward port of 2.7 distutils
     patch.
    
    Pointed out by Arfrever.
    ---
     command/upload.py    | 1 -
     tests/test_upload.py | 2 +-
     2 files changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/command/upload.py b/command/upload.py
    index 9b15b67bae..1a96e2221e 100644
    --- a/command/upload.py
    +++ b/command/upload.py
    @@ -164,7 +164,6 @@ def upload_file(self, command, pyversion, filename):
                     if value and value[-1:] == b'\r':
                         body.write(b'\n')  # write an extra newline (lurve Macs)
             body.write(end_boundary)
    -        body.write(b"\r\n")
             body = body.getvalue()
     
             self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
    diff --git a/tests/test_upload.py b/tests/test_upload.py
    index 24015416eb..dccaf77e3e 100644
    --- a/tests/test_upload.py
    +++ b/tests/test_upload.py
    @@ -127,7 +127,7 @@ def test_upload(self):
     
             # what did we send ?
             headers = dict(self.last_open.req.headers)
    -        self.assertEqual(headers['Content-length'], '2163')
    +        self.assertEqual(headers['Content-length'], '2161')
             content_type = headers['Content-type']
             self.assertTrue(content_type.startswith('multipart/form-data'))
             self.assertEqual(self.last_open.req.get_method(), 'POST')
    
    From 946652ee4def4236696a00d8873186bb07f15c71 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 08:38:08 -0400
    Subject: [PATCH 4406/8469] Backout 5692cd26a08e; Ref #262.
    
    ---
     setuptools/command/install_egg_info.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py
    index 992709f19a..fd0f118b33 100755
    --- a/setuptools/command/install_egg_info.py
    +++ b/setuptools/command/install_egg_info.py
    @@ -27,7 +27,7 @@ def finalize_options(self):
             ).egg_name() + '.egg-info'
             self.source = ei_cmd.egg_info
             self.target = os.path.join(self.install_dir, basename)
    -        self.outputs = []
    +        self.outputs = [self.target]
     
         def run(self):
             self.run_command('egg_info')
    
    From 2024eed40b8168372becc15e5c9c6f6125327af6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 08:38:24 -0400
    Subject: [PATCH 4407/8469] Added tag 6.0.2b1 for changeset 1ae2a75724bb
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index ff59322b8b..a2912f64cf 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -156,3 +156,4 @@ a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8
     755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0
     bc6655b4acf205dd9f25c702955645656077398a 6.0.1
    +1ae2a75724bbba56373784f185a7f235ed0f24a4 6.0.2b1
    
    From 9e7f35fec4178dea678693cb768b6076d45e7ddd Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 11:40:57 -0400
    Subject: [PATCH 4408/8469] Update changelog. Fixes #262. Re-opens #118.
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 419c3c2b6f..0f5e56f43e 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +-----
    +6.0.2
    +-----
    +
    +* Issue #262: Fixed regression in pip install due to egg-info directories
    +  being omitted. Re-opens Issue #118.
    +
     -----
     6.0.1
     -----
    
    From 061820ccf195d6913a7ac3d1e44a9d5e9a475e66 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 11:42:59 -0400
    Subject: [PATCH 4409/8469] Added tag 6.0.2 for changeset 01271e84e512
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index a2912f64cf..31fcc88244 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -157,3 +157,4 @@ a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0
     bc6655b4acf205dd9f25c702955645656077398a 6.0.1
     1ae2a75724bbba56373784f185a7f235ed0f24a4 6.0.2b1
    +01271e84e5125fcc4f0f368a6e21116a5722953c 6.0.2
    
    From 76b04a129ddf1bd141388533483b88dde6ba5605 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 11:43:50 -0400
    Subject: [PATCH 4410/8469] Bumped to 6.0.3 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index c5d85d37e6..c9bb039303 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.0.2"
    +DEFAULT_VERSION = "6.0.3"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index c974945db9..79b8fa5df2 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.0.2'
    +__version__ = '6.0.3'
    
    From c5fa038292a9c7d6fe529c4d8001cec0d3bac9cf Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 21:29:03 -0400
    Subject: [PATCH 4411/8469] Try adding six to PYTHONPATH
    
    --HG--
    branch : feature/issue-229
    ---
     .travis.yml | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.travis.yml b/.travis.yml
    index bc387f46cb..f3dba4f82a 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -8,6 +8,7 @@ python:
       - pypy
     # command to run tests
     script:
    + - export PYTHONPATH=`pwd`/six-*.egg
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    
    From e733ab4cbceab02aa2d746ba0e2867a9fe32432f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 21:40:38 -0400
    Subject: [PATCH 4412/8469] Trim excess whitespace
    
    ---
     setuptools/tests/test_egg_info.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 7531e37c1f..e803a41e88 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -34,7 +34,7 @@ def _write_entries(self, entries):
             entries_f = open(fn, 'wb')
             entries_f.write(entries)
             entries_f.close()
    -   
    +
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_version_10_format(self):
             """
    @@ -140,7 +140,7 @@ def test_sources(self):
     
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_svn_tags(self):
    -        code, data = environment.run_setup_py(["egg_info", 
    +        code, data = environment.run_setup_py(["egg_info",
                                                    "--tag-svn-revision"],
                                                   pypath=self.old_cwd,
                                                   data_stream=1)
    
    From f4d7965c75a6452d405c0911102318f236a2afcc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 21:56:12 -0400
    Subject: [PATCH 4413/8469] Remove Python 2.5 compatibility methods for
     zipfiles
    
    ---
     setuptools/tests/environment.py | 53 +--------------------------------
     1 file changed, 1 insertion(+), 52 deletions(-)
    
    diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
    index 476d280ae2..bbc7fd3537 100644
    --- a/setuptools/tests/environment.py
    +++ b/setuptools/tests/environment.py
    @@ -10,57 +10,6 @@
     from subprocess import Popen as _Popen, PIPE as _PIPE
     
     
    -def _extract(self, member, path=None, pwd=None):
    -    """for zipfile py2.5 borrowed from cpython"""
    -    if not isinstance(member, zipfile.ZipInfo):
    -        member = self.getinfo(member)
    -
    -    if path is None:
    -        path = os.getcwd()
    -
    -    return _extract_member(self, member, path, pwd)
    -
    -
    -def _extract_from_zip(self, name, dest_path):
    -    dest_file = open(dest_path, 'wb')
    -    try:
    -        dest_file.write(self.read(name))
    -    finally:
    -        dest_file.close()
    -
    -
    -def _extract_member(self, member, targetpath, pwd):
    -    """for zipfile py2.5 borrowed from cpython"""
    -    # build the destination pathname, replacing
    -    # forward slashes to platform specific separators.
    -    # Strip trailing path separator, unless it represents the root.
    -    if (targetpath[-1:] in (os.path.sep, os.path.altsep)
    -            and len(os.path.splitdrive(targetpath)[1]) > 1):
    -        targetpath = targetpath[:-1]
    -
    -    # don't include leading "/" from file name if present
    -    if member.filename[0] == '/':
    -        targetpath = os.path.join(targetpath, member.filename[1:])
    -    else:
    -        targetpath = os.path.join(targetpath, member.filename)
    -
    -    targetpath = os.path.normpath(targetpath)
    -
    -    # Create all upper directories if necessary.
    -    upperdirs = os.path.dirname(targetpath)
    -    if upperdirs and not os.path.exists(upperdirs):
    -        os.makedirs(upperdirs)
    -
    -    if member.filename[-1] == '/':
    -        if not os.path.isdir(targetpath):
    -            os.mkdir(targetpath)
    -        return targetpath
    -
    -    _extract_from_zip(self, member.filename, targetpath)
    -
    -    return targetpath
    -
    -
     def _remove_dir(target):
     
         #on windows this seems to a problem
    @@ -92,7 +41,7 @@ def setUp(self):
             try:
                 zip_file = zipfile.ZipFile(self.datafile)
                 for files in zip_file.namelist():
    -                _extract(zip_file, files, self.temp_dir)
    +                zip_file.extract(files, self.temp_dir)
             finally:
                 if zip_file:
                     zip_file.close()
    
    From 2ec13d5d118c249bfdb8b40a56c03c59e5c2e94d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 22:05:36 -0400
    Subject: [PATCH 4414/8469] Correct typo
    
    ---
     setuptools/tests/environment.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
    index bbc7fd3537..fa26a9ecea 100644
    --- a/setuptools/tests/environment.py
    +++ b/setuptools/tests/environment.py
    @@ -107,7 +107,7 @@ def run_setup_py(cmd, pypath=None, path=None,
     
         #decode the console string if needed
         if hasattr(data,  "decode"):
    -        data = data.decode()  # should use the preffered encoding
    +        data = data.decode()  # should use the preferred encoding
             data = unicodedata.normalize('NFC', data)
     
         #communciate calls wait()
    
    From 1166cd39f2be99bd0aeace80642a80ccde244989 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 22:14:39 -0400
    Subject: [PATCH 4415/8469] Extract variable to be in proximity of its comment
    
    ---
     setuptools/tests/environment.py | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
    index fa26a9ecea..5fdbd96933 100644
    --- a/setuptools/tests/environment.py
    +++ b/setuptools/tests/environment.py
    @@ -96,10 +96,12 @@ def run_setup_py(cmd, pypath=None, path=None,
     
         cmd = [sys.executable, "setup.py"] + list(cmd)
     
    -    #regarding the shell argument, see: http://bugs.python.org/issue8557
    +    # http://bugs.python.org/issue8557
    +    shell = sys.platform == 'win32'
    +
         try:
             proc = _Popen(cmd, stdout=_PIPE, stderr=_PIPE,
    -                      shell=(sys.platform == 'win32'), env=env)
    +                      shell=shell, env=env)
     
             data = proc.communicate()[data_stream]
         except OSError:
    
    From 5e50991f8c53920f87fefa88ff9016b893829a7d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Sep 2014 22:15:49 -0400
    Subject: [PATCH 4416/8469] Reindent clause. Prefer leading comment to inline.
    
    ---
     setuptools/tests/environment.py | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
    index 5fdbd96933..c8d0e66921 100644
    --- a/setuptools/tests/environment.py
    +++ b/setuptools/tests/environment.py
    @@ -100,8 +100,9 @@ def run_setup_py(cmd, pypath=None, path=None,
         shell = sys.platform == 'win32'
     
         try:
    -        proc = _Popen(cmd, stdout=_PIPE, stderr=_PIPE,
    -                      shell=shell, env=env)
    +        proc = _Popen(
    +            cmd, stdout=_PIPE, stderr=_PIPE, shell=shell, env=env,
    +        )
     
             data = proc.communicate()[data_stream]
         except OSError:
    @@ -109,7 +110,8 @@ def run_setup_py(cmd, pypath=None, path=None,
     
         #decode the console string if needed
         if hasattr(data,  "decode"):
    -        data = data.decode()  # should use the preferred encoding
    +        # use the default encoding
    +        data = data.decode()
             data = unicodedata.normalize('NFC', data)
     
         #communciate calls wait()
    
    From 59423d00f1ab2ba30212906ea691db28297cc47f Mon Sep 17 00:00:00 2001
    From: Antoine Pitrou 
    Date: Tue, 30 Sep 2014 14:58:22 +0200
    Subject: [PATCH 4417/8469] Remove pointless "vile hack" that can cause the
     build step to fail when some extension modules can't be imported.
    
    See issue #5309 for the build failures, issue #458343 for the original motivation.
    ---
     command/build_ext.py | 11 ++---------
     1 file changed, 2 insertions(+), 9 deletions(-)
    
    diff --git a/command/build_ext.py b/command/build_ext.py
    index 08449e1a51..2ffab18162 100644
    --- a/command/build_ext.py
    +++ b/command/build_ext.py
    @@ -545,15 +545,8 @@ def build_extension(self, ext):
                                              extra_postargs=extra_args,
                                              depends=ext.depends)
     
    -        # XXX -- this is a Vile HACK!
    -        #
    -        # The setup.py script for Python on Unix needs to be able to
    -        # get this list so it can perform all the clean up needed to
    -        # avoid keeping object files around when cleaning out a failed
    -        # build of an extension module.  Since Distutils does not
    -        # track dependencies, we have to get rid of intermediates to
    -        # ensure all the intermediates will be properly re-built.
    -        #
    +        # XXX outdated variable, kept here in case third-part code
    +        # needs it.
             self._built_objects = objects[:]
     
             # Now link the object files together into a "shared object" --
    
    From 198a91ac760d28bc16e919fd5068f6e607d56d12 Mon Sep 17 00:00:00 2001
    From: R David Murray 
    Date: Tue, 30 Sep 2014 20:53:21 -0400
    Subject: [PATCH 4418/8469] #22512: move distutils rpm test's .rpmdb to testing
     tmpdir.
    
    Patch by Francis MB.
    ---
     tests/test_bdist_rpm.py | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py
    index bcbb5633e8..25c14abd32 100644
    --- a/tests/test_bdist_rpm.py
    +++ b/tests/test_bdist_rpm.py
    @@ -24,6 +24,7 @@
     """
     
     class BuildRpmTestCase(support.TempdirManager,
    +                       support.EnvironGuard,
                            support.LoggingSilencer,
                            unittest.TestCase):
     
    @@ -54,6 +55,7 @@ def tearDown(self):
         def test_quiet(self):
             # let's create a package
             tmp_dir = self.mkdtemp()
    +        os.environ['HOME'] = tmp_dir   # to confine dir '.rpmdb' creation
             pkg_dir = os.path.join(tmp_dir, 'foo')
             os.mkdir(pkg_dir)
             self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
    @@ -96,6 +98,7 @@ def test_quiet(self):
         def test_no_optimize_flag(self):
             # let's create a package that brakes bdist_rpm
             tmp_dir = self.mkdtemp()
    +        os.environ['HOME'] = tmp_dir   # to confine dir '.rpmdb' creation
             pkg_dir = os.path.join(tmp_dir, 'foo')
             os.mkdir(pkg_dir)
             self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
    
    From 59b6796e92361bd1cc79deae7aba71ec12e32554 Mon Sep 17 00:00:00 2001
    From: "doko@ubuntu.com" 
    Date: Thu, 2 Oct 2014 02:10:47 +0200
    Subject: [PATCH 4419/8469] - Issue #17219: Add library build dir for Python
     extension cross-builds.
    
    ---
     command/build_ext.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/command/build_ext.py b/command/build_ext.py
    index 3ab2d04bf9..acbe648036 100644
    --- a/command/build_ext.py
    +++ b/command/build_ext.py
    @@ -237,7 +237,7 @@ def finalize_options(self):
             # Python's library directory must be appended to library_dirs
             # See Issues: #1600860, #4366
             if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
    -            if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
    +            if not sysconfig.python_build:
                     # building third party extensions
                     self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
                 else:
    
    From 0d41723615b404279c772ce9535705f4f4e830cb Mon Sep 17 00:00:00 2001
    From: Georg Brandl 
    Date: Sat, 4 Oct 2014 14:15:42 +0200
    Subject: [PATCH 4420/8469] Bump to 3.2.6rc1
    
    ---
     __init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/__init__.py b/__init__.py
    index f9016d6d17..382e4b1c9d 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -13,5 +13,5 @@
     # Updated automatically by the Python release process.
     #
     #--start constants--
    -__version__ = "3.2.5"
    +__version__ = "3.2.6rc1"
     #--end constants--
    
    From 3859f945627998b2c426bf0e26bc86d54fc94731 Mon Sep 17 00:00:00 2001
    From: Georg Brandl 
    Date: Sat, 4 Oct 2014 14:22:11 +0200
    Subject: [PATCH 4421/8469] Bump to 3.3.6rc1
    
    ---
     __init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/__init__.py b/__init__.py
    index 2e8719f8b7..c58e98db56 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -13,5 +13,5 @@
     # Updated automatically by the Python release process.
     #
     #--start constants--
    -__version__ = "3.3.5"
    +__version__ = "3.3.6rc1"
     #--end constants--
    
    From 1fc386404ed75da5f5be0cd0ca0adeff8ff6dd72 Mon Sep 17 00:00:00 2001
    From: Larry Hastings 
    Date: Sun, 5 Oct 2014 19:05:50 -0700
    Subject: [PATCH 4422/8469] Release bump for 3.4.2 final.
    
    ---
     __init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/__init__.py b/__init__.py
    index 750a5033ac..dfe62ffa4a 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -13,5 +13,5 @@
     # Updated automatically by the Python release process.
     #
     #--start constants--
    -__version__ = "3.4.2rc1"
    +__version__ = "3.4.2"
     #--end constants--
    
    From 42328153d2e438b94544568b9373e674cf4ac3b8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 9 Oct 2014 14:12:31 -0400
    Subject: [PATCH 4423/8469] Remove broken link. Content that was at
     telecommunity.com was not generated from the source, so can't be maintained
     with setuptools any longer. Fixes #167.
    
    ---
     README.txt | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/README.txt b/README.txt
    index 9a142bf778..6920b90ccc 100755
    --- a/README.txt
    +++ b/README.txt
    @@ -153,7 +153,6 @@ learning about Setuptools, Python Eggs, and EasyInstall:
     * `The EasyInstall user's guide and reference manual`_
     * `The setuptools Developer's Guide`_
     * `The pkg_resources API reference`_
    -* `Package Compatibility Notes`_ (user-maintained)
     * `The Internal Structure of Python Eggs`_
     
     Questions, comments, and bug reports should be directed to the `distutils-sig
    @@ -164,7 +163,6 @@ them there, so this reference list can be updated.  If you have working,
     the `setuptools bug tracker`_.
     
     .. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues
    -.. _Package Compatibility Notes: https://pythonhosted.org/setuptools/PackageNotes
     .. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html
     .. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html
     .. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html
    
    From 35f70a6a7962643f32b87a6d9a125292060a60b1 Mon Sep 17 00:00:00 2001
    From: Marc Abramowitz 
    Date: Fri, 10 Oct 2014 11:48:58 -0700
    Subject: [PATCH 4424/8469] Make VersionConflict report who is requiring
     package
    
    fixes issue 268
    
    --HG--
    branch : BB-268_make_VersionConflict_report_who_required_package_3
    ---
     pkg_resources.py | 12 ++++++++++--
     1 file changed, 10 insertions(+), 2 deletions(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 517298c90d..1ca8dd8efe 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -589,6 +589,9 @@ def resolve(self, requirements, env=None, installer=None,
             # key -> dist
             best = {}
             to_activate = []
    +        # key with req -> set of things that required it
    +        # useful for reporting info about conflicts
    +        required_by = collections.defaultdict(set)
     
             while requirements:
                 # process dependencies breadth-first
    @@ -624,8 +627,13 @@ def resolve(self, requirements, env=None, installer=None,
                 if dist not in req:
                     # Oops, the "best" so far conflicts with a dependency
                     # XXX put more info here
    -                raise VersionConflict(dist, req)
    -            requirements.extend(dist.requires(req.extras)[::-1])
    +                raise VersionConflict(
    +                    "%s is installed but %s is required by %s"
    +                    % (dist, req, list(required_by.get(req))))
    +            new_requirements = dist.requires(req.extras)[::-1]
    +            requirements.extend(new_requirements)
    +            for new_requirement in new_requirements:
    +                required_by[new_requirement].add(req.project_name)
                 processed[req] = True
     
             # return list of distros to activate
    
    From f1b4ec01e0c2797580320a4b1fc04c0002e736b1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 12:32:26 -0400
    Subject: [PATCH 4425/8469] Update style in example for PEP-8 as suggested in
     PR #86.
    
    ---
     docs/setuptools.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/docs/setuptools.txt b/docs/setuptools.txt
    index c3844cf212..a34ec30444 100644
    --- a/docs/setuptools.txt
    +++ b/docs/setuptools.txt
    @@ -473,7 +473,7 @@ script called ``baz``, you might do something like this::
     
         setup(
             # other arguments here...
    -        entry_points = {
    +        entry_points={
                 'console_scripts': [
                     'foo = my_package.some_module:main_func',
                     'bar = other_module:some_func',
    
    From 06ce668daf98eabfe821b8c7a910d067a2290b56 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 12:53:39 -0400
    Subject: [PATCH 4426/8469] Update changelog
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 0f5e56f43e..d7e3369d56 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +---
    +6.1
    +---
    +
    +* Issue #268: When resolving package versions, a VersionConflict now reports
    +  which package previously required the conflicting version.
    +
     -----
     6.0.2
     -----
    
    From 9e8c932911dfa605f48428af7f3c23282012ab6c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 12:55:09 -0400
    Subject: [PATCH 4427/8469] Remove TODO comment, now done
    
    ---
     pkg_resources.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 1ca8dd8efe..35e2ed2450 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -626,7 +626,6 @@ def resolve(self, requirements, env=None, installer=None,
                     to_activate.append(dist)
                 if dist not in req:
                     # Oops, the "best" so far conflicts with a dependency
    -                # XXX put more info here
                     raise VersionConflict(
                         "%s is installed but %s is required by %s"
                         % (dist, req, list(required_by.get(req))))
    
    From e83d7d416f8706e262235b594384c70bf854eced Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 13:01:01 -0400
    Subject: [PATCH 4428/8469] Extract variables
    
    ---
     pkg_resources.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 35e2ed2450..ac72d71fdd 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -626,9 +626,9 @@ def resolve(self, requirements, env=None, installer=None,
                     to_activate.append(dist)
                 if dist not in req:
                     # Oops, the "best" so far conflicts with a dependency
    -                raise VersionConflict(
    -                    "%s is installed but %s is required by %s"
    -                    % (dist, req, list(required_by.get(req))))
    +                tmpl = "%s is installed but %s is required by %s"
    +                args = dist, req, list(required_by.get(req))
    +                raise VersionConflict(tmpl % args)
                 new_requirements = dist.requires(req.extras)[::-1]
                 requirements.extend(new_requirements)
                 for new_requirement in new_requirements:
    
    From 0f27d17414b5a523614f16e6129ce426df3c3e66 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 13:06:54 -0400
    Subject: [PATCH 4429/8469] Update comment
    
    ---
     pkg_resources.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index ac72d71fdd..a5b0222393 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -589,8 +589,9 @@ def resolve(self, requirements, env=None, installer=None,
             # key -> dist
             best = {}
             to_activate = []
    -        # key with req -> set of things that required it
    -        # useful for reporting info about conflicts
    +
    +        # Mapping of requirement to set of distributions that required it;
    +        # useful for reporting info about conflicts.
             required_by = collections.defaultdict(set)
     
             while requirements:
    
    From f110f30df540d21c4fe7870460c07d70c6c8cd0b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 13:20:12 -0400
    Subject: [PATCH 4430/8469] Add a couple of comments to help me understand.
    
    ---
     pkg_resources.py | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index a5b0222393..de50c4b013 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -630,10 +630,15 @@ def resolve(self, requirements, env=None, installer=None,
                     tmpl = "%s is installed but %s is required by %s"
                     args = dist, req, list(required_by.get(req))
                     raise VersionConflict(tmpl % args)
    +
    +            # push the new requirements onto the stack
                 new_requirements = dist.requires(req.extras)[::-1]
                 requirements.extend(new_requirements)
    +
    +            # Register the new requirements needed by req
                 for new_requirement in new_requirements:
                     required_by[new_requirement].add(req.project_name)
    +
                 processed[req] = True
     
             # return list of distros to activate
    
    From c4bc8b21d203668645ab551318aef5859e3acb9e Mon Sep 17 00:00:00 2001
    From: Marc Abramowitz 
    Date: Sat, 11 Oct 2014 15:42:24 -0700
    Subject: [PATCH 4431/8469] Fix VersionConflict test failure
    
    Fixes `TypeError: 'NoneType' object is not iterable` error at pkg_resources.py:632
    
    Fixes issue #270
    
    --HG--
    branch : BB-270_fix_VersionConflict_test_failure_2
    ---
     pkg_resources.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index de50c4b013..511068a632 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -628,7 +628,7 @@ def resolve(self, requirements, env=None, installer=None,
                 if dist not in req:
                     # Oops, the "best" so far conflicts with a dependency
                     tmpl = "%s is installed but %s is required by %s"
    -                args = dist, req, list(required_by.get(req))
    +                args = dist, req, list(required_by.get(req, []))
                     raise VersionConflict(tmpl % args)
     
                 # push the new requirements onto the stack
    
    From 95fcadd6d2fe0b48c9477f27f6b0071d6db18577 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 25 Oct 2014 18:41:58 -0400
    Subject: [PATCH 4432/8469] Removing stored egg-info
    
    ---
     setuptools.egg-info/dependency_links.txt |  2 -
     setuptools.egg-info/entry_points.txt     | 64 ------------------------
     setuptools.egg-info/requires.txt         |  6 ---
     3 files changed, 72 deletions(-)
     delete mode 100644 setuptools.egg-info/dependency_links.txt
     delete mode 100644 setuptools.egg-info/entry_points.txt
     delete mode 100644 setuptools.egg-info/requires.txt
    
    diff --git a/setuptools.egg-info/dependency_links.txt b/setuptools.egg-info/dependency_links.txt
    deleted file mode 100644
    index b454c16810..0000000000
    --- a/setuptools.egg-info/dependency_links.txt
    +++ /dev/null
    @@ -1,2 +0,0 @@
    -https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790
    -https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2
    diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt
    deleted file mode 100644
    index 72a5ffe0b5..0000000000
    --- a/setuptools.egg-info/entry_points.txt
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -[console_scripts]
    -easy_install = setuptools.command.easy_install:main
    -easy_install-3.4 = 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.file_finders]
    -svn_cvs = setuptools.command.sdist:_default_revctrl
    -
    -[setuptools.installation]
    -eggsecutable = setuptools.command.easy_install:bootstrap
    -
    diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt
    deleted file mode 100644
    index 4fa66c7141..0000000000
    --- a/setuptools.egg-info/requires.txt
    +++ /dev/null
    @@ -1,6 +0,0 @@
    -
    -[certs]
    -certifi==1.0.1
    -
    -[ssl:sys_platform=='win32']
    -wincertstore==0.2
    
    From 2c923b60ebb68e23de2f6ba64a3ca226204b116c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 25 Oct 2014 19:31:28 -0400
    Subject: [PATCH 4433/8469] Adding 'bootstrap.py' for bootstrapping a
     development environment when setuptools metadata isn't already present. Fixes
     #278.
    
    ---
     bootstrap.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
     1 file changed, 51 insertions(+)
     create mode 100644 bootstrap.py
    
    diff --git a/bootstrap.py b/bootstrap.py
    new file mode 100644
    index 0000000000..cbc1ca9d68
    --- /dev/null
    +++ b/bootstrap.py
    @@ -0,0 +1,51 @@
    +"""
    +If setuptools is not already installed in the environment, it's not possible
    +to invoke setuptools' own commands. This routine will bootstrap this local
    +environment by creating a minimal egg-info directory and then invoking the
    +egg-info command to flesh out the egg-info directory.
    +"""
    +
    +import os
    +import sys
    +import textwrap
    +import subprocess
    +
    +
    +minimal_egg_info = textwrap.dedent("""
    +    [distutils.commands]
    +    egg_info = setuptools.command.egg_info:egg_info
    +
    +    [distutils.setup_keywords]
    +    include_package_data = setuptools.dist:assert_bool
    +    install_requires = setuptools.dist:check_requirements
    +    extras_require = setuptools.dist:check_extras
    +    entry_points = setuptools.dist:check_entry_points
    +
    +    [egg_info.writers]
    +    dependency_links.txt = setuptools.command.egg_info:overwrite_arg
    +    entry_points.txt = setuptools.command.egg_info:write_entries
    +    requires.txt = setuptools.command.egg_info:write_requirements
    +    """)
    +
    +def ensure_egg_info():
    +    if not os.path.exists('setuptools.egg-info'):
    +        build_egg_info()
    +
    +
    +def build_egg_info():
    +    """
    +    Build a minimal egg-info, enough to invoke egg_info
    +    """
    +
    +    os.mkdir('setuptools.egg-info')
    +    with open('setuptools.egg-info/entry_points.txt', 'w') as ep:
    +        ep.write(minimal_egg_info)
    +
    +
    +def run_egg_info():
    +    subprocess.check_call([sys.executable, 'setup.py', 'egg_info'])
    +
    +
    +if __name__ == '__main__':
    +    ensure_egg_info()
    +    run_egg_info()
    
    From a23c2686487b050cf1edfd3532012a886ab0044c Mon Sep 17 00:00:00 2001
    From: Marc Abramowitz 
    Date: Sat, 11 Oct 2014 15:58:45 -0700
    Subject: [PATCH 4434/8469] tox.ini: Add {posargs} to py.test invocation
    
    This allows you to specify args on the tox command line that get passed through
    to py.test -- e.g.:
    
    tox -e py27 -- -k testResolve --tb=short setuptools/tests
    ---
     tox.ini | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tox.ini b/tox.ini
    index 06421a7344..1ac4620277 100644
    --- a/tox.ini
    +++ b/tox.ini
    @@ -2,4 +2,4 @@
     envlist = py26,py27,py31,py32,py33,py34
     [testenv]
     deps=pytest
    -commands=py.test
    +commands=py.test {posargs}
    
    From e3e55681150f7bd389d8c3e8ce99d18e743cdb2b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 19:34:27 -0400
    Subject: [PATCH 4435/8469] Closing (merged)
    
    --HG--
    branch : BB-270_fix_VersionConflict_test_failure_2
    
    From 7b8309661487c881eaeed7148481d9f0ff21d368 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 19:36:49 -0400
    Subject: [PATCH 4436/8469] Bumped to 6.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index c9bb039303..a693849f93 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.0.3"
    +DEFAULT_VERSION = "6.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 79b8fa5df2..2d3f6733a8 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.0.3'
    +__version__ = '6.1'
    
    From 69ec1988c6f6cce6659c81717cefb21431df0be6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 19:36:52 -0400
    Subject: [PATCH 4437/8469] Added tag 6.1 for changeset 7ea80190d494
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 31fcc88244..edac74a339 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -158,3 +158,4 @@ a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6
     bc6655b4acf205dd9f25c702955645656077398a 6.0.1
     1ae2a75724bbba56373784f185a7f235ed0f24a4 6.0.2b1
     01271e84e5125fcc4f0f368a6e21116a5722953c 6.0.2
    +7ea80190d494a766c6356fce85c844703964b6cc 6.1
    
    From 6281ff54a4276feae16ce808e9afd29c2691096a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 11 Oct 2014 19:37:38 -0400
    Subject: [PATCH 4438/8469] Bumped to 6.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index a693849f93..dd20e984da 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.1"
    +DEFAULT_VERSION = "6.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 2d3f6733a8..a00d9422ef 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.1'
    +__version__ = '6.2'
    
    From 49b4b07a6a16dff95918ab15344d3c8976cdafb2 Mon Sep 17 00:00:00 2001
    From: Georg Brandl 
    Date: Sun, 12 Oct 2014 08:50:38 +0200
    Subject: [PATCH 4439/8469] Bump to 3.2.6
    
    ---
     __init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/__init__.py b/__init__.py
    index 382e4b1c9d..6eb79cb639 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -13,5 +13,5 @@
     # Updated automatically by the Python release process.
     #
     #--start constants--
    -__version__ = "3.2.6rc1"
    +__version__ = "3.2.6"
     #--end constants--
    
    From 49dde81581fd34569b50071587daa71eaf9e4546 Mon Sep 17 00:00:00 2001
    From: Georg Brandl 
    Date: Sun, 12 Oct 2014 09:03:40 +0200
    Subject: [PATCH 4440/8469] Bump to 3.3.6
    
    ---
     __init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/__init__.py b/__init__.py
    index c58e98db56..057e90b86c 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -13,5 +13,5 @@
     # Updated automatically by the Python release process.
     #
     #--start constants--
    -__version__ = "3.3.6rc1"
    +__version__ = "3.3.6"
     #--end constants--
    
    From c64524729fbd21cf5ad430acad82bf399b6f723d Mon Sep 17 00:00:00 2001
    From: Marc Abramowitz 
    Date: Mon, 13 Oct 2014 10:37:00 -0700
    Subject: [PATCH 4441/8469] Cache eggs required for building in .eggs dir
    
    This makes it so that these eggs don't prevent `install_requires` from
    installing these packages.
    
    Fixes ticket #80; workaround for ticket #209
    
    --HG--
    branch : put_setup_requires_egg_in_cache_dir_4
    ---
     CHANGES.txt         | 12 ++++++++++++
     setuptools/dist.py  | 21 +++++++++++++++++++--
     setuptools/win32.py | 19 +++++++++++++++++++
     3 files changed, 50 insertions(+), 2 deletions(-)
     create mode 100644 setuptools/win32.py
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index d7e3369d56..b1b7f2e8cf 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,18 @@
     CHANGES
     =======
     
    +----------
    +Unreleased
    +----------
    +
    +* Issue #80, #209: Eggs that are downloaded for ``setup_requires``,
    +  ``test_requires``, etc. are now placed in a ``.eggs`` directory instead of
    +  the package root directory. This is a better place for them as it doesn't
    +  cause later phases of setuptools to think that the package is already
    +  installed and then not install the package permanently in the environment
    +  (See #209).
    +
    +
     ---
     6.1
     ---
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 8b36f67c1d..2d9da8c402 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -14,7 +14,8 @@
         DistutilsSetupError)
     
     from setuptools.depends import Require
    -from setuptools.compat import basestring, PY2
    +from setuptools.compat import basestring, PY2, unicode
    +from setuptools import win32
     import pkg_resources
     
     def _get_unpatched(cls):
    @@ -305,6 +306,21 @@ def finalize_options(self):
             else:
                 self.convert_2to3_doctests = []
     
    +    def get_egg_cache_dir(self):
    +        egg_cache_dir = os.path.join(os.curdir, '.eggs')
    +        if not os.path.exists(egg_cache_dir):
    +            os.mkdir(egg_cache_dir)
    +            win32.hide_file(unicode(egg_cache_dir))
    +            readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
    +            with open(readme_txt_filename, 'w') as f:
    +                f.write('This directory contains eggs that were downloaded '
    +                        'by setuptools to build, test, and run plug-ins.\n\n')
    +                f.write('This directory caches those eggs to prevent '
    +                        'repeated downloads.\n\n')
    +                f.write('However, it is safe to delete this directory.\n\n')
    +
    +        return egg_cache_dir
    +
         def fetch_build_egg(self, req):
             """Fetch an egg needed for building"""
     
    @@ -328,8 +344,9 @@ def fetch_build_egg(self, req):
                     if 'find_links' in opts:
                         links = opts['find_links'][1].split() + links
                     opts['find_links'] = ('setup', links)
    +            install_dir = self.get_egg_cache_dir()
                 cmd = easy_install(
    -                dist, args=["x"], install_dir=os.curdir, exclude_scripts=True,
    +                dist, args=["x"], install_dir=install_dir, exclude_scripts=True,
                     always_copy=False, build_directory=None, editable=False,
                     upgrade=False, multi_version=True, no_report=True, user=False
                 )
    diff --git a/setuptools/win32.py b/setuptools/win32.py
    new file mode 100644
    index 0000000000..fd373009aa
    --- /dev/null
    +++ b/setuptools/win32.py
    @@ -0,0 +1,19 @@
    +# From http://stackoverflow.com/questions/19622133/python-set-hide-attribute-on-folders-in-windows-os
    +
    +import ctypes
    +
    +
    +def hide_file(path):
    +    """Sets the hidden attribute on a file or directory
    +
    +    `path` must be unicode; be careful that you escape backslashes or use raw
    +    string literals - e.g.: `u'G:\\Dir\\folder1'` or `ur'G:\Dir\folder1'`.
    +    """
    +
    +    SetFileAttributesW = ctypes.windll.kernel32.SetFileAttributesW
    +
    +    FILE_ATTRIBUTE_HIDDEN = 0x02
    +
    +    ret = SetFileAttributesW(path, FILE_ATTRIBUTE_HIDDEN)
    +    if not ret:
    +        raise ctypes.WinError()
    
    From 0c1303c12ba7e94eb0f6a7d961828d0ff08ff93a Mon Sep 17 00:00:00 2001
    From: "\"W. Trevor King\"" 
    Date: Thu, 16 Oct 2014 17:31:16 -0700
    Subject: [PATCH 4442/8469] tests.egg_info: Test absolute egg-base install Make
     sure this copies the appropriate metadata into EGG-INFO.  This test currently
     fails, but the next commit fixes setuptools so it will pass.
    
    ---
     setuptools/tests/test_egg_info.py | 58 +++++++++++++++++++++++++++++++
     1 file changed, 58 insertions(+)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 4c4f9456d7..9f81356044 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -1,8 +1,10 @@
     
    +import distutils.core
     import os
     import sys
     import tempfile
     import shutil
    +import stat
     import unittest
     
     import pkg_resources
    @@ -35,6 +37,20 @@ def _write_entries(self, entries):
             entries_f.write(entries)
             entries_f.close()
     
    +    def _create_project(self):
    +        with open('setup.py', 'w') as f:
    +            f.write('from setuptools import setup\n')
    +            f.write('\n')
    +            f.write('setup(\n')
    +            f.write("    name='foo',\n")
    +            f.write("    py_modules=['hello'],\n")
    +            f.write("    entry_points={'console_scripts': ['hi = hello.run']},\n")
    +            f.write('    zip_safe=False,\n')
    +            f.write('    )\n')
    +        with open('hello.py', 'w') as f:
    +            f.write('def run():\n')
    +            f.write("    print('hello')\n")
    +
         @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
         def test_version_10_format(self):
             """
    @@ -81,6 +97,48 @@ def test_version_10_format_legacy_parser(self):
     
             self.assertEqual(rev, '89000')
     
    +    def test_egg_base_installed_egg_info(self):
    +        self._create_project()
    +        temp_dir = tempfile.mkdtemp(prefix='setuptools-test.')
    +        os.chmod(temp_dir, stat.S_IRWXU)
    +        try:
    +            paths = {}
    +            for dirname in ['home', 'lib', 'scripts', 'data', 'egg-base']:
    +                paths[dirname] = os.path.join(temp_dir, dirname)
    +                os.mkdir(paths[dirname])
    +            config = os.path.join(paths['home'], '.pydistutils.cfg')
    +            with open(config, 'w') as f:
    +                f.write('[egg_info]\n')
    +                f.write('egg-base = %s\n' % paths['egg-base'])
    +            environ = os.environ.copy()
    +            environ['HOME'] = paths['home']
    +            code, data = environment.run_setup_py(
    +                cmd=[
    +                    'install', '--home', paths['home'],
    +                    '--install-lib', paths['lib'],
    +                    '--install-scripts', paths['scripts'],
    +                    '--install-data', paths['data']],
    +                pypath=':'.join([paths['lib'], self.old_cwd]),
    +                data_stream=1,
    +                env=environ)
    +            if code:
    +                raise AssertionError(data)
    +            egg_info = None
    +            for dirpath, dirnames, filenames in os.walk(paths['lib']):
    +                if os.path.basename(dirpath) == 'EGG-INFO':
    +                    egg_info = sorted(filenames)
    +            self.assertEqual(
    +                egg_info,
    +                ['PKG-INFO',
    +                 'SOURCES.txt',
    +                 'dependency_links.txt',
    +                 'entry_points.txt',
    +                 'not-zip-safe',
    +                 'top_level.txt'])
    +        finally:
    +            shutil.rmtree(temp_dir)
    +
    +
     DUMMY_SOURCE_TXT = """CHANGES.txt
     CONTRIBUTORS.txt
     HISTORY.txt
    
    From 76906b7a50726de89307d55690338d0f40a5aadb Mon Sep 17 00:00:00 2001
    From: "\"W. Trevor King\"" 
    Date: Thu, 16 Oct 2014 17:31:16 -0700
    Subject: [PATCH 4443/8469] egg_info: Search egg-base for files to add to the
     manifest Before this commit, this:
    
      $ mkdir -p /tmp/xyz/{home,lib,scripts,data,egg}
      $ cat >/tmp/xyz/home/.pydistutils.cfg < [egg_info]
      > egg-base = /tmp/xyz/egg
      > EOF
      $ export PYTHONPATH=/tmp/xyz/lib
      $ export HOME=/tmp/xyz/home
      $ setup.py install --home=/tmp/xyz/home --install-lib=/tmp/xyz/lib \
      >   --install-scripts=/tmp/xyz/scripts --install-data=/tmp/xyz/data
    
    drops a lot of metadata, installing only SOURCES.txt and zip-safe
    under EGG-INFO.  The problem is that the metadata files are written to
    egg-base, but egg-base is not searched when creating the manifest
    because it's outside of the current directory.  Work around this by
    explicitly searching egg-base with distutils.filelist.findall (which
    is really the version monkeypatched in by setuptools/__init__.py).
    
    Since findall records relative paths, prefix the returned paths with
    egg-base, so the include_pattern looking for the absolute
    ei_cmd.egg_info will match them.
    ---
     setuptools/command/egg_info.py | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index 43df87dcb5..2318e54d0d 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -6,6 +6,7 @@
     from distutils.util import convert_path
     from distutils import log
     import distutils.errors
    +import distutils.filelist
     import os
     import re
     import sys
    @@ -324,6 +325,10 @@ def add_defaults(self):
             elif os.path.exists(self.manifest):
                 self.read_manifest()
             ei_cmd = self.get_finalized_command('egg_info')
    +        if ei_cmd.egg_base != os.curdir:
    +            self.filelist.allfiles.extend([
    +                os.path.join(ei_cmd.egg_base, path)
    +                for path in distutils.filelist.findall(ei_cmd.egg_base)])
             self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)
     
         def prune_file_list(self):
    
    From 03048c86ba6f955179cb4dcab5dd2db024609f19 Mon Sep 17 00:00:00 2001
    From: "W. Trevor King" 
    Date: Thu, 16 Oct 2014 21:49:22 -0700
    Subject: [PATCH 4444/8469] egg_info: Split manifest_maker._add_egg_info into
     its own method
    
    On Sat, Oct 11, 2014 at 04:23:37PM -0000, Jason R. Coombs wrote [1]:
    > I suggest implementing the functionality as a separate method with a
    > docstring explaining the purpose.
    
    so that's what we have here. The docstring is adapted from the
    cbd4f603 (egg_info: Search egg-base for files to add to the manifest,
    2014-10-16) commit message.
    
    It's a lot of docs for a single command (although there is a newsted
    list comprehension), so I'm fine if you drop this commit before
    merging. The motivation behind the lines would still be available in
    the version control history:
    
      $ hg blame -c setuptools/command/egg_info.py | grep -A1 ei_cmd.egg_base
      cbd4f6038604: if ei_cmd.egg_base != os.curdir:
      cbd4f6038604: self.filelist.allfiles.extend([
      cbd4f6038604: os.path.join(ei_cmd.egg_base, path)
      cbd4f6038604: for path in distutils.filelist.findall(ei_cmd.egg_base)])
      80108b046cb6: self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)
      $ hg log -vr cbd4f6038604
      changeset: 3163:cbd4f6038604
      ...
      description:
      egg_info: Search egg-base for files to add to the manifest
      Before this commit, this:
    
        $ mkdir -p /tmp/xyz/{home,lib,scripts,data,egg}
        $ cat >/tmp/xyz/home/.pydistutils.cfg <
    Date: Sun, 19 Oct 2014 12:52:08 +0100
    Subject: [PATCH 4445/8469] The name win32 is a misnomer. Use 'windows_support'
     instead.
    
    ---
     setuptools/dist.py                          | 4 ++--
     setuptools/{win32.py => windows_support.py} | 0
     2 files changed, 2 insertions(+), 2 deletions(-)
     rename setuptools/{win32.py => windows_support.py} (100%)
    
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 2d9da8c402..4f3022324d 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -15,7 +15,7 @@
     
     from setuptools.depends import Require
     from setuptools.compat import basestring, PY2, unicode
    -from setuptools import win32
    +from setuptools import windows_support
     import pkg_resources
     
     def _get_unpatched(cls):
    @@ -310,7 +310,7 @@ def get_egg_cache_dir(self):
             egg_cache_dir = os.path.join(os.curdir, '.eggs')
             if not os.path.exists(egg_cache_dir):
                 os.mkdir(egg_cache_dir)
    -            win32.hide_file(unicode(egg_cache_dir))
    +            windows_support.hide_file(unicode(egg_cache_dir))
                 readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
                 with open(readme_txt_filename, 'w') as f:
                     f.write('This directory contains eggs that were downloaded '
    diff --git a/setuptools/win32.py b/setuptools/windows_support.py
    similarity index 100%
    rename from setuptools/win32.py
    rename to setuptools/windows_support.py
    
    From 3d532f52850f0c860f0031519a25231797320976 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 12:55:43 +0100
    Subject: [PATCH 4446/8469] Update docstring to be imperative and incorporate
     comment. Omit lessons about string literals.
    
    ---
     setuptools/windows_support.py | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py
    index fd373009aa..8da7124391 100644
    --- a/setuptools/windows_support.py
    +++ b/setuptools/windows_support.py
    @@ -1,13 +1,13 @@
    -# From http://stackoverflow.com/questions/19622133/python-set-hide-attribute-on-folders-in-windows-os
    -
     import ctypes
     
     
     def hide_file(path):
    -    """Sets the hidden attribute on a file or directory
    +    """
    +    Set the hidden attribute on a file or directory.
    +
    +    From http://stackoverflow.com/questions/19622133/
     
    -    `path` must be unicode; be careful that you escape backslashes or use raw
    -    string literals - e.g.: `u'G:\\Dir\\folder1'` or `ur'G:\Dir\folder1'`.
    +    `path` must be text.
         """
     
         SetFileAttributesW = ctypes.windll.kernel32.SetFileAttributesW
    
    From ae6eb3131a935824d1aca43c6ac5ac6bb4907078 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:02:37 +0100
    Subject: [PATCH 4447/8469] Declare argtypes and restype on SetFileAttributesW
     so that it will cast Python 2 bytestrings to Unicode automatically.
    
    ---
     setuptools/dist.py            | 4 ++--
     setuptools/windows_support.py | 9 +++++----
     2 files changed, 7 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 4f3022324d..6b9d350ec4 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -14,7 +14,7 @@
         DistutilsSetupError)
     
     from setuptools.depends import Require
    -from setuptools.compat import basestring, PY2, unicode
    +from setuptools.compat import basestring, PY2
     from setuptools import windows_support
     import pkg_resources
     
    @@ -310,7 +310,7 @@ def get_egg_cache_dir(self):
             egg_cache_dir = os.path.join(os.curdir, '.eggs')
             if not os.path.exists(egg_cache_dir):
                 os.mkdir(egg_cache_dir)
    -            windows_support.hide_file(unicode(egg_cache_dir))
    +            windows_support.hide_file(egg_cache_dir)
                 readme_txt_filename = os.path.join(egg_cache_dir, 'README.txt')
                 with open(readme_txt_filename, 'w') as f:
                     f.write('This directory contains eggs that were downloaded '
    diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py
    index 8da7124391..df35a5f4f7 100644
    --- a/setuptools/windows_support.py
    +++ b/setuptools/windows_support.py
    @@ -1,4 +1,4 @@
    -import ctypes
    +import ctypes.wintypes
     
     
     def hide_file(path):
    @@ -9,11 +9,12 @@ def hide_file(path):
     
         `path` must be text.
         """
    -
    -    SetFileAttributesW = ctypes.windll.kernel32.SetFileAttributesW
    +    SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
    +    SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
    +    SetFileAttributes.restype = ctypes.wintypes.BOOL
     
         FILE_ATTRIBUTE_HIDDEN = 0x02
     
    -    ret = SetFileAttributesW(path, FILE_ATTRIBUTE_HIDDEN)
    +    ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN)
         if not ret:
             raise ctypes.WinError()
    
    From 81b4d929152eb7119f89a06294e2b656d36c3484 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:07:48 +0100
    Subject: [PATCH 4448/8469] Decorate hide_file to only run on Windows.
    
    ---
     setuptools/windows_support.py | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py
    index df35a5f4f7..8e67e41a8e 100644
    --- a/setuptools/windows_support.py
    +++ b/setuptools/windows_support.py
    @@ -1,6 +1,14 @@
    +import platform
     import ctypes.wintypes
     
     
    +def windows_only(func):
    +    if platform.system() != 'Windows':
    +        return lambda *args, **kwargs: None
    +    return func
    +
    +
    +@windows_only
     def hide_file(path):
         """
         Set the hidden attribute on a file or directory.
    
    From 1fab75aaec4ada030ca2777e26edbf5eb76d9802 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:14:06 +0100
    Subject: [PATCH 4449/8469] Defer importing of wintypes because it doesn't
     import nicely. See Python issue 16396.
    
    ---
     setuptools/windows_support.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py
    index 8e67e41a8e..cb977cff95 100644
    --- a/setuptools/windows_support.py
    +++ b/setuptools/windows_support.py
    @@ -1,5 +1,5 @@
     import platform
    -import ctypes.wintypes
    +import ctypes
     
     
     def windows_only(func):
    @@ -17,6 +17,7 @@ def hide_file(path):
     
         `path` must be text.
         """
    +    __import__('ctypes.wintypes')
         SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
         SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
         SetFileAttributes.restype = ctypes.wintypes.BOOL
    
    From 68522a3e6f7bea404dab4e30bc43f2901a16760e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:32:59 +0100
    Subject: [PATCH 4450/8469] Update changelog for more detail about the impact
     and possible user actions necessary.
    
    ---
     CHANGES.txt | 23 ++++++++++++++---------
     1 file changed, 14 insertions(+), 9 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index b1b7f2e8cf..49529a04c0 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,17 +2,22 @@
     CHANGES
     =======
     
    -----------
    -Unreleased
    -----------
    +---
    +7.0
    +---
     
    -* Issue #80, #209: Eggs that are downloaded for ``setup_requires``,
    -  ``test_requires``, etc. are now placed in a ``.eggs`` directory instead of
    -  the package root directory. This is a better place for them as it doesn't
    -  cause later phases of setuptools to think that the package is already
    -  installed and then not install the package permanently in the environment
    -  (See #209).
    +* Issue #80, Issue #209: Eggs that are downloaded for ``setup_requires``,
    +  ``test_requires``, etc. are now placed in a ``./.eggs`` directory instead of
    +  directly in the current directory. This choice of location means the files
    +  can be readily managed (removed, ignored). Additionally,
    +  later phases or invocations of setuptools will not detect the package as
    +  already installed and ignore it for permanent install (See #209).
     
    +  This change is indicated as backward-incompatible as installations that
    +  depend on the installation in the current directory will need to account for
    +  the new location. Systems that ignore ``*.egg`` will probably need to be
    +  adapted to ignore ``.eggs``. The files will need to be manually moved or
    +  will be retrieved again. Most use cases will require no attention.
     
     ---
     6.1
    
    From dd32e04bc63ac7bd9f70b9684b76bdb283b6111d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:34:11 +0100
    Subject: [PATCH 4451/8469] Bumped to 7.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index dd20e984da..a523401e97 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "6.2"
    +DEFAULT_VERSION = "7.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index a00d9422ef..29524eba32 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '6.2'
    +__version__ = '7.0'
    
    From 6732c94e80d371cf69031d9c49637bf9b311f4da Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:34:15 +0100
    Subject: [PATCH 4452/8469] Added tag 7.0 for changeset df26609c2f61
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index edac74a339..7e995132ed 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -159,3 +159,4 @@ bc6655b4acf205dd9f25c702955645656077398a 6.0.1
     1ae2a75724bbba56373784f185a7f235ed0f24a4 6.0.2b1
     01271e84e5125fcc4f0f368a6e21116a5722953c 6.0.2
     7ea80190d494a766c6356fce85c844703964b6cc 6.1
    +df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0
    
    From 8772accf84d424f6cc848567fde0747716448030 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 19 Oct 2014 13:35:22 +0100
    Subject: [PATCH 4453/8469] Bumped to 7.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index a523401e97..8664761308 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "7.0"
    +DEFAULT_VERSION = "7.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 29524eba32..0ab618ea56 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '7.0'
    +__version__ = '7.1'
    
    From 693d7bfd19d7be7427637bf784829134eeeb9efa Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 23 Oct 2014 11:20:44 -0400
    Subject: [PATCH 4454/8469] Correct typo
    
    ---
     setuptools/svn_utils.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py
    index dadb682a59..6502fc98ea 100644
    --- a/setuptools/svn_utils.py
    +++ b/setuptools/svn_utils.py
    @@ -302,7 +302,7 @@ def __init__(self, path=''):
             self._externals = None
     
         def get_revision(self):
    -        'Retrieve the directory revision informatino using svnversion'
    +        'Retrieve the directory revision information using svnversion'
             code, data = _run_command(['svnversion', '-c', self.path])
             if code:
                 log.warn("svnversion failed")
    
    From 606b8fb55059ad29d1d31709686f43f17e03642c Mon Sep 17 00:00:00 2001
    From: Victor Lin 
    Date: Thu, 23 Oct 2014 15:06:51 -0700
    Subject: [PATCH 4455/8469] Fix #277, data files in symbol link directory are
     not included issue
    
    --HG--
    branch : bugfix-277
    ---
     setuptools/__init__.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/__init__.py b/setuptools/__init__.py
    index d99ab2a6b4..6c51072dc3 100644
    --- a/setuptools/__init__.py
    +++ b/setuptools/__init__.py
    @@ -139,7 +139,7 @@ def findall(dir = os.curdir):
         (relative to 'dir').
         """
         all_files = []
    -    for base, dirs, files in os.walk(dir):
    +    for base, dirs, files in os.walk(dir, followlinks=True):
             if base==os.curdir or base.startswith(os.curdir+os.sep):
                 base = base[2:]
             if base:
    
    From ea346ec92092e3bd8d8c07f0522de5e9d1081f00 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 25 Oct 2014 20:13:53 -0400
    Subject: [PATCH 4456/8469] Remove Python 2.5 compatibility for
     sys.dont_write_bytecode
    
    ---
     setuptools/__init__.py             | 4 ----
     setuptools/command/easy_install.py | 4 ++--
     2 files changed, 2 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/__init__.py b/setuptools/__init__.py
    index 6c51072dc3..ca025c305d 100644
    --- a/setuptools/__init__.py
    +++ b/setuptools/__init__.py
    @@ -148,7 +148,3 @@ def findall(dir = os.curdir):
         return all_files
     
     distutils.filelist.findall = findall    # fix findall bug in distutils.
    -
    -# sys.dont_write_bytecode was introduced in Python 2.6.
    -_dont_write_bytecode = getattr(sys, 'dont_write_bytecode',
    -    bool(os.environ.get("PYTHONDONTWRITEBYTECODE")))
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index 6854827222..2e00b99630 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -35,7 +35,7 @@
     import site
     import struct
     
    -from setuptools import Command, _dont_write_bytecode
    +from setuptools import Command
     from setuptools.sandbox import run_setup
     from setuptools.py31compat import get_path, get_config_vars
     from setuptools.command import setopt
    @@ -1152,7 +1152,7 @@ def pf(src, dst):
                     chmod(f, mode)
     
         def byte_compile(self, to_compile):
    -        if _dont_write_bytecode:
    +        if sys.dont_write_bytecode:
                 self.warn('byte-compiling is disabled, skipping.')
                 return
     
    
    From f57e5a637c6d07f6aad463b3caa0cf047ba7bf50 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 25 Oct 2014 20:15:43 -0400
    Subject: [PATCH 4457/8469] Build the egg_info before running tests
    
    ---
     .travis.yml | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.travis.yml b/.travis.yml
    index bc387f46cb..8122d8bbe1 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -8,6 +8,7 @@ python:
       - pypy
     # command to run tests
     script:
    + - python setup.py egg_info
      # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
      - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
    
    From 2c33dad04fd11ebd7fc8e15d0017ff2dc617e6a3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 25 Oct 2014 20:18:01 -0400
    Subject: [PATCH 4458/8469] Remove workaround for pytest issue
    
    ---
     .travis.yml | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index 8122d8bbe1..22541671ea 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -9,8 +9,6 @@ python:
     # command to run tests
     script:
      - python setup.py egg_info
    - # testing fix for https://bitbucket.org/hpk42/pytest/issue/555
    - - pip install --pre -i https://devpi.net/hpk/dev/ --upgrade pytest
      - python setup.py test
      - python setup.py ptr
      - python ez_setup.py --version 5.4.1
    
    From 909f8ed55e9b027b28fe9de50682d4a21d99743d Mon Sep 17 00:00:00 2001
    From: Antoine Pitrou 
    Date: Thu, 30 Oct 2014 19:37:07 +0100
    Subject: [PATCH 4459/8469] Issue #8876: distutils now falls back to copying
     files when hard linking doesn't work.
    
    This allows use with special filesystems such as VirtualBox shared folders.
    ---
     file_util.py            | 34 +++++++++++++++++++++-------------
     tests/test_file_util.py | 32 +++++++++++++++++++++++++++++++-
     2 files changed, 52 insertions(+), 14 deletions(-)
    
    diff --git a/file_util.py b/file_util.py
    index 7b14efbc07..b3fee35a6c 100644
    --- a/file_util.py
    +++ b/file_util.py
    @@ -80,7 +80,8 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0,
         (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
         None (the default), files are copied.  Don't set 'link' on systems that
         don't support it: 'copy_file()' doesn't check if hard or symbolic
    -    linking is available.
    +    linking is available. If hardlink fails, falls back to
    +    _copy_file_contents().
     
         Under Mac OS, uses the native file copy function in macostools; on
         other systems, uses '_copy_file_contents()' to copy file contents.
    @@ -132,24 +133,31 @@ def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0,
         # (Unix only, of course, but that's the caller's responsibility)
         elif link == 'hard':
             if not (os.path.exists(dst) and os.path.samefile(src, dst)):
    -            os.link(src, dst)
    +            try:
    +                os.link(src, dst)
    +                return (dst, 1)
    +            except OSError:
    +                # If hard linking fails, fall back on copying file
    +                # (some special filesystems don't support hard linking
    +                #  even under Unix, see issue #8876).
    +                pass
         elif link == 'sym':
             if not (os.path.exists(dst) and os.path.samefile(src, dst)):
                 os.symlink(src, dst)
    +            return (dst, 1)
     
         # Otherwise (non-Mac, not linking), copy the file contents and
         # (optionally) copy the times and mode.
    -    else:
    -        _copy_file_contents(src, dst)
    -        if preserve_mode or preserve_times:
    -            st = os.stat(src)
    -
    -            # According to David Ascher , utime() should be done
    -            # before chmod() (at least under NT).
    -            if preserve_times:
    -                os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
    -            if preserve_mode:
    -                os.chmod(dst, S_IMODE(st[ST_MODE]))
    +    _copy_file_contents(src, dst)
    +    if preserve_mode or preserve_times:
    +        st = os.stat(src)
    +
    +        # According to David Ascher , utime() should be done
    +        # before chmod() (at least under NT).
    +        if preserve_times:
    +            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
    +        if preserve_mode:
    +            os.chmod(dst, S_IMODE(st[ST_MODE]))
     
         return (dst, 1)
     
    diff --git a/tests/test_file_util.py b/tests/test_file_util.py
    index d3db5cef0e..a6d04f065d 100644
    --- a/tests/test_file_util.py
    +++ b/tests/test_file_util.py
    @@ -5,7 +5,7 @@
     import errno
     from unittest.mock import patch
     
    -from distutils.file_util import move_file
    +from distutils.file_util import move_file, copy_file
     from distutils import log
     from distutils.tests import support
     from distutils.errors import DistutilsFileError
    @@ -78,6 +78,36 @@ def test_move_file_exception_unpacking_unlink(self):
                     fobj.write('spam eggs')
                 move_file(self.source, self.target, verbose=0)
     
    +    def test_copy_file_hard_link(self):
    +        with open(self.source, 'w') as f:
    +            f.write('some content')
    +        st = os.stat(self.source)
    +        copy_file(self.source, self.target, link='hard')
    +        st2 = os.stat(self.source)
    +        st3 = os.stat(self.target)
    +        self.assertTrue(os.path.samestat(st, st2), (st, st2))
    +        self.assertTrue(os.path.samestat(st2, st3), (st2, st3))
    +        with open(self.source, 'r') as f:
    +            self.assertEqual(f.read(), 'some content')
    +
    +    def test_copy_file_hard_link_failure(self):
    +        # If hard linking fails, copy_file() falls back on copying file
    +        # (some special filesystems don't support hard linking even under
    +        #  Unix, see issue #8876).
    +        with open(self.source, 'w') as f:
    +            f.write('some content')
    +        st = os.stat(self.source)
    +        with patch("os.link", side_effect=OSError(0, "linking unsupported")):
    +            copy_file(self.source, self.target, link='hard')
    +        st2 = os.stat(self.source)
    +        st3 = os.stat(self.target)
    +        self.assertTrue(os.path.samestat(st, st2), (st, st2))
    +        self.assertFalse(os.path.samestat(st2, st3), (st2, st3))
    +        for fn in (self.source, self.target):
    +            with open(fn, 'r') as f:
    +                self.assertEqual(f.read(), 'some content')
    +
    +
     def test_suite():
         return unittest.makeSuite(FileUtilTestCase)
     
    
    From b4a0c62c24f332dc0b7849f8e4b6675552d1203c Mon Sep 17 00:00:00 2001
    From: Richard Ipsum 
    Date: Mon, 3 Nov 2014 14:06:44 +0000
    Subject: [PATCH 4460/8469] Make egg_info command write out setup requirements
    
    This commit makes the egg_info command write out setup requirements as well
    as install requirements, setup requirements are written to a
    setup_requires.txt file.
    
    The commit adds a new function write_setup_requirements which uses the
    existing _write_requirements function to write setup requirements out to a file
    and adds a new entry point to the egg_info.writers group.
    ---
     setup.py                       | 1 +
     setuptools/command/egg_info.py | 6 ++++++
     2 files changed, 7 insertions(+)
    
    diff --git a/setup.py b/setup.py
    index bac4e29dbf..ca312c0143 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -163,6 +163,7 @@ def _save_entry_points(self):
             "egg_info.writers": [
                 "PKG-INFO = setuptools.command.egg_info:write_pkg_info",
                 "requires.txt = setuptools.command.egg_info:write_requirements",
    +            "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements",
                 "entry_points.txt = setuptools.command.egg_info:write_entries",
                 "eager_resources.txt = setuptools.command.egg_info:overwrite_arg",
                 "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg",
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index 06764a17c5..78d8698185 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -382,6 +382,12 @@ def write_requirements(cmd, basename, filename):
         cmd.write_or_delete_file("requirements", filename, data.getvalue())
     
     
    +def write_setup_requirements(cmd, basename, filename):
    +    data = StringIO()
    +    _write_requirements(data, cmd.distribution.setup_requires)
    +    cmd.write_or_delete_file("setup-requirements", filename, data.getvalue())
    +
    +
     def write_toplevel_names(cmd, basename, filename):
         pkgs = dict.fromkeys(
             [
    
    From 5f5ad73d306818b6dd4ac94dc67f5abb60534037 Mon Sep 17 00:00:00 2001
    From: Konstantin Tretyakov 
    Date: Thu, 13 Nov 2014 17:11:31 +0200
    Subject: [PATCH 4461/8469] Mention in the README about possible problems with
     older wget versions refusing certificates.
    
    ---
     README.txt | 12 ++++++++++++
     1 file changed, 12 insertions(+)
    
    diff --git a/README.txt b/README.txt
    index 6920b90ccc..c6973298ec 100755
    --- a/README.txt
    +++ b/README.txt
    @@ -83,6 +83,18 @@ Alternatively, Setuptools may be installed to a user-local path::
     
         > wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user
     
    +Note that on some older systems (noted on Debian 6 and CentOS 5 installations), 
    +`wget` may refuse to download `ez_setup.py`, complaining that the certificate common name `*.c.ssl.fastly.net` 
    +does not match the host name `bootstrap.pypa.io`. In addition, the `ez_setup.py` script may then encounter similar problems using
    +`wget` internally to download `setuptools-x.y.zip`, complaining that the certificate common name of `www.python.org` does not match the 
    +host name `pypi.python.org`. Those are known issues, related to a bug in the older versions of `wget` 
    +(see `Issue 59 `_). If you happen to encounter them, 
    +install Setuptools as follows::
    +
    +    > wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
    +    > python ez_setup.py --insecure
    +
    +
     Unix including Mac OS X (curl)
     ==============================
     
    
    From 7c5d53881122046a97420ba085d865f59458ddde Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 16 Nov 2014 10:30:23 -0500
    Subject: [PATCH 4462/8469] Trying a new technique. In this approach,
     setuptools is aware of its dependencies and when imported makes sure the
     vendored versions are present on sys.path.
    
    --HG--
    branch : feature/issue-229
    ---
     .travis.yml                                   |   1 -
     setup.py                                      |   2 --
     setuptools/__init__.py                        |   2 ++
     .../_vendor/six-1.7.3.egg                     | Bin
     setuptools/bootstrap.py                       |  27 ++++++++++++++++++
     5 files changed, 29 insertions(+), 3 deletions(-)
     rename six-1.7.3.egg => setuptools/_vendor/six-1.7.3.egg (100%)
     create mode 100644 setuptools/bootstrap.py
    
    diff --git a/.travis.yml b/.travis.yml
    index 15268ccc33..22541671ea 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -8,7 +8,6 @@ python:
       - pypy
     # command to run tests
     script:
    - - export PYTHONPATH=`pwd`/six-*.egg
      - python setup.py egg_info
      - python setup.py test
      - python setup.py ptr
    diff --git a/setup.py b/setup.py
    index ee2848f7f1..8a9a15584e 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -6,8 +6,6 @@
     import textwrap
     import contextlib
     
    -sys.path.append('six-1.7.3.egg')
    -
     # Allow to run setup.py from another directory.
     os.chdir(os.path.dirname(os.path.abspath(__file__)))
     
    diff --git a/setuptools/__init__.py b/setuptools/__init__.py
    index 920dad3861..c885555dbf 100644
    --- a/setuptools/__init__.py
    +++ b/setuptools/__init__.py
    @@ -1,5 +1,7 @@
     """Extensions to the 'distutils' for large or complex distributions"""
     
    +__import__('setuptools.bootstrap').bootstrap.ensure_deps()
    +
     import os
     import sys
     import distutils.core
    diff --git a/six-1.7.3.egg b/setuptools/_vendor/six-1.7.3.egg
    similarity index 100%
    rename from six-1.7.3.egg
    rename to setuptools/_vendor/six-1.7.3.egg
    diff --git a/setuptools/bootstrap.py b/setuptools/bootstrap.py
    new file mode 100644
    index 0000000000..0cd95778ef
    --- /dev/null
    +++ b/setuptools/bootstrap.py
    @@ -0,0 +1,27 @@
    +"""
    +When setuptools is installed in a clean environment, it doesn't have its
    +dependencies, so it can't run to install its dependencies. This module
    +checks those dependencies and if one or more are missing, it uses vendored
    +versions.
    +"""
    +
    +import os
    +import sys
    +import glob
    +
    +def ensure_deps():
    +	"""
    +	Detect if dependencies are installed and if not, use vendored versions.
    +	"""
    +	try:
    +		__import__('six')
    +	except ImportError:
    +		use_vendor_deps()
    +
    +def use_vendor_deps():
    +	"""
    +	Use vendored versions
    +	"""
    +	here = os.path.dirname(__file__)
    +	eggs = glob.glob(here + '/_vendor/*.egg')
    +	sys.path.extend(eggs)
    
    From 866ff739f6e64aaaefcf7816263410527c9f55f7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 16 Nov 2014 10:33:45 -0500
    Subject: [PATCH 4463/8469] Include the _vendor directory in the sdist
    
    --HG--
    branch : feature/issue-229
    ---
     MANIFEST.in | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/MANIFEST.in b/MANIFEST.in
    index 2c587d40f9..dc6a1c8801 100644
    --- a/MANIFEST.in
    +++ b/MANIFEST.in
    @@ -4,6 +4,7 @@ recursive-include setuptools/tests *.html entries*
     recursive-include setuptools/tests/svn_data *.zip
     recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
     recursive-include _markerlib *.py
    +recursive-include setuptools/_vendor *
     include *.py
     include *.txt
     include MANIFEST.in
    
    From 1714060fb8083ad4f7a440b049d1b8c71dc003be Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 16 Nov 2014 10:41:21 -0500
    Subject: [PATCH 4464/8469] Add link to project home page. Fixes #224.
    
    ---
     docs/using.txt | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/docs/using.txt b/docs/using.txt
    index e44847d642..bd80893da2 100644
    --- a/docs/using.txt
    +++ b/docs/using.txt
    @@ -8,3 +8,6 @@ it at the very beginning of `setup.py` like this::
     
         from ez_setup import use_setuptools
         use_setuptools()
    +
    +More info on `ez_setup.py` can be found at `the project home page
    +`_.
    
    From 41f634812f1ee6b734e7d5fb25486b66ab351d0a Mon Sep 17 00:00:00 2001
    From: matej 
    Date: Tue, 18 Nov 2014 14:38:56 +0100
    Subject: [PATCH 4465/8469] Different treatment of --user option to
     easy_install (refs #285)
    
    ---
     setuptools/command/easy_install.py | 9 +++------
     1 file changed, 3 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index 2e00b99630..d0bae2b2c8 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -148,12 +148,9 @@ class easy_install(Command):
         create_index = PackageIndex
     
         def initialize_options(self):
    -        if site.ENABLE_USER_SITE:
    -            whereami = os.path.abspath(__file__)
    -            self.user = whereami.startswith(site.USER_SITE)
    -        else:
    -            self.user = 0
    -
    +        # the --user option seemst to be an opt-in one,
    +        # so the default should be False.
    +        self.user = 0
             self.zip_ok = self.local_snapshots_ok = None
             self.install_dir = self.script_dir = self.exclude_scripts = None
             self.index_url = None
    
    From 4b8fbbf7f064f170b0e0040f44bb528147ddedc9 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 19 Nov 2014 13:14:19 -0500
    Subject: [PATCH 4466/8469] Upgrade packaging to 14.3
    
    ---
     pkg_resources.py                           |   4 +-
     setuptools/_vendor/packaging/__about__.py  |   2 +-
     setuptools/_vendor/packaging/_compat.py    |  13 +
     setuptools/_vendor/packaging/specifiers.py | 732 +++++++++++++++++++++
     setuptools/_vendor/packaging/version.py    | 412 +-----------
     setuptools/_vendor/vendored.txt            |   2 +-
     6 files changed, 751 insertions(+), 414 deletions(-)
     create mode 100644 setuptools/_vendor/packaging/specifiers.py
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index daf7732c36..422b31b547 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -77,9 +77,11 @@
     
     try:
         import packaging.version
    +    import packaging.specifiers
     except ImportError:
         # fallback to vendored version
         import setuptools._vendor.packaging.version
    +    import setuptools._vendor.packaging.specifiers
         packaging = setuptools._vendor.packaging
     
     # For compatibility, expose packaging.version.parse as parse_version
    @@ -2678,7 +2680,7 @@ def __init__(self, project_name, specs, extras):
             """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
             self.unsafe_name, project_name = project_name, safe_name(project_name)
             self.project_name, self.key = project_name, project_name.lower()
    -        self.specifier = packaging.version.Specifier(
    +        self.specifier = packaging.specifiers.SpecifierSet(
                 ",".join(["".join([x, y]) for x, y in specs])
             )
             self.specs = specs
    diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py
    index b64681e4e7..481589e76a 100644
    --- a/setuptools/_vendor/packaging/__about__.py
    +++ b/setuptools/_vendor/packaging/__about__.py
    @@ -22,7 +22,7 @@
     __summary__ = "Core utilities for Python packages"
     __uri__ = "https://github.com/pypa/packaging"
     
    -__version__ = "14.2"
    +__version__ = "14.3"
     
     __author__ = "Donald Stufft"
     __email__ = "donald@stufft.io"
    diff --git a/setuptools/_vendor/packaging/_compat.py b/setuptools/_vendor/packaging/_compat.py
    index f2ff383499..5c396ceac6 100644
    --- a/setuptools/_vendor/packaging/_compat.py
    +++ b/setuptools/_vendor/packaging/_compat.py
    @@ -25,3 +25,16 @@
         string_types = str,
     else:
         string_types = basestring,
    +
    +
    +def with_metaclass(meta, *bases):
    +    """
    +    Create a base class with a metaclass.
    +    """
    +    # This requires a bit of explanation: the basic idea is to make a dummy
    +    # metaclass for one level of class instantiation that replaces itself with
    +    # the actual metaclass.
    +    class metaclass(meta):
    +        def __new__(cls, name, this_bases, d):
    +            return meta(name, bases, d)
    +    return type.__new__(metaclass, 'temporary_class', (), {})
    diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py
    new file mode 100644
    index 0000000000..bea4a39820
    --- /dev/null
    +++ b/setuptools/_vendor/packaging/specifiers.py
    @@ -0,0 +1,732 @@
    +# Copyright 2014 Donald Stufft
    +#
    +# Licensed under the Apache License, Version 2.0 (the "License");
    +# you may not use this file except in compliance with the License.
    +# You may obtain a copy of the License at
    +#
    +# http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +from __future__ import absolute_import, division, print_function
    +
    +import abc
    +import functools
    +import itertools
    +import re
    +
    +from ._compat import string_types, with_metaclass
    +from .version import Version, LegacyVersion, parse
    +
    +
    +class InvalidSpecifier(ValueError):
    +    """
    +    An invalid specifier was found, users should refer to PEP 440.
    +    """
    +
    +
    +class BaseSpecifier(with_metaclass(abc.ABCMeta, object)):
    +
    +    @abc.abstractmethod
    +    def __str__(self):
    +        """
    +        Returns the str representation of this Specifier like object. This
    +        should be representative of the Specifier itself.
    +        """
    +
    +    @abc.abstractmethod
    +    def __hash__(self):
    +        """
    +        Returns a hash value for this Specifier like object.
    +        """
    +
    +    @abc.abstractmethod
    +    def __eq__(self, other):
    +        """
    +        Returns a boolean representing whether or not the two Specifier like
    +        objects are equal.
    +        """
    +
    +    @abc.abstractmethod
    +    def __ne__(self, other):
    +        """
    +        Returns a boolean representing whether or not the two Specifier like
    +        objects are not equal.
    +        """
    +
    +    @abc.abstractproperty
    +    def prereleases(self):
    +        """
    +        Returns whether or not pre-releases as a whole are allowed by this
    +        specifier.
    +        """
    +
    +    @prereleases.setter
    +    def prereleases(self, value):
    +        """
    +        Sets whether or not pre-releases as a whole are allowed by this
    +        specifier.
    +        """
    +
    +    @abc.abstractmethod
    +    def contains(self, item, prereleases=None):
    +        """
    +        Determines if the given item is contained within this specifier.
    +        """
    +
    +    @abc.abstractmethod
    +    def filter(self, iterable, prereleases=None):
    +        """
    +        Takes an iterable of items and filters them so that only items which
    +        are contained within this specifier are allowed in it.
    +        """
    +
    +
    +class _IndividualSpecifier(BaseSpecifier):
    +
    +    _operators = {}
    +
    +    def __init__(self, spec="", prereleases=None):
    +        match = self._regex.search(spec)
    +        if not match:
    +            raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
    +
    +        self._spec = (
    +            match.group("operator").strip(),
    +            match.group("version").strip(),
    +        )
    +
    +        # Store whether or not this Specifier should accept prereleases
    +        self._prereleases = prereleases
    +
    +    def __repr__(self):
    +        pre = (
    +            ", prereleases={0!r}".format(self.prereleases)
    +            if self._prereleases is not None
    +            else ""
    +        )
    +
    +        return "<{0}({1!r}{2})>".format(
    +            self.__class__.__name__,
    +            str(self),
    +            pre,
    +        )
    +
    +    def __str__(self):
    +        return "{0}{1}".format(*self._spec)
    +
    +    def __hash__(self):
    +        return hash(self._spec)
    +
    +    def __eq__(self, other):
    +        if isinstance(other, string_types):
    +            try:
    +                other = self.__class__(other)
    +            except InvalidSpecifier:
    +                return NotImplemented
    +        elif not isinstance(other, self.__class__):
    +            return NotImplemented
    +
    +        return self._spec == other._spec
    +
    +    def __ne__(self, other):
    +        if isinstance(other, string_types):
    +            try:
    +                other = self.__class__(other)
    +            except InvalidSpecifier:
    +                return NotImplemented
    +        elif not isinstance(other, self.__class__):
    +            return NotImplemented
    +
    +        return self._spec != other._spec
    +
    +    def _get_operator(self, op):
    +        return getattr(self, "_compare_{0}".format(self._operators[op]))
    +
    +    def _coerce_version(self, version):
    +        if not isinstance(version, (LegacyVersion, Version)):
    +            version = parse(version)
    +        return version
    +
    +    @property
    +    def prereleases(self):
    +        return self._prereleases
    +
    +    @prereleases.setter
    +    def prereleases(self, value):
    +        self._prereleases = value
    +
    +    def contains(self, item, prereleases=None):
    +        # Determine if prereleases are to be allowed or not.
    +        if prereleases is None:
    +            prereleases = self.prereleases
    +
    +        # Normalize item to a Version or LegacyVersion, this allows us to have
    +        # a shortcut for ``"2.0" in Specifier(">=2")
    +        item = self._coerce_version(item)
    +
    +        # Determine if we should be supporting prereleases in this specifier
    +        # or not, if we do not support prereleases than we can short circuit
    +        # logic if this version is a prereleases.
    +        if item.is_prerelease and not prereleases:
    +            return False
    +
    +        # Actually do the comparison to determine if this item is contained
    +        # within this Specifier or not.
    +        return self._get_operator(self._spec[0])(item, self._spec[1])
    +
    +    def filter(self, iterable, prereleases=None):
    +        yielded = False
    +        found_prereleases = []
    +
    +        kw = {"prereleases": prereleases if prereleases is not None else True}
    +
    +        # Attempt to iterate over all the values in the iterable and if any of
    +        # them match, yield them.
    +        for version in iterable:
    +            parsed_version = self._coerce_version(version)
    +
    +            if self.contains(parsed_version, **kw):
    +                # If our version is a prerelease, and we were not set to allow
    +                # prereleases, then we'll store it for later incase nothing
    +                # else matches this specifier.
    +                if (parsed_version.is_prerelease
    +                        and not (prereleases or self.prereleases)):
    +                    found_prereleases.append(version)
    +                # Either this is not a prerelease, or we should have been
    +                # accepting prereleases from the begining.
    +                else:
    +                    yielded = True
    +                    yield version
    +
    +        # Now that we've iterated over everything, determine if we've yielded
    +        # any values, and if we have not and we have any prereleases stored up
    +        # then we will go ahead and yield the prereleases.
    +        if not yielded and found_prereleases:
    +            for version in found_prereleases:
    +                yield version
    +
    +
    +class LegacySpecifier(_IndividualSpecifier):
    +
    +    _regex = re.compile(
    +        r"""
    +        ^
    +        \s*
    +        (?P(==|!=|<=|>=|<|>))
    +        \s*
    +        (?P
    +            [^\s]* # We just match everything, except for whitespace since this
    +                   # is a "legacy" specifier and the version string can be just
    +                   # about anything.
    +        )
    +        \s*
    +        $
    +        """,
    +        re.VERBOSE | re.IGNORECASE,
    +    )
    +
    +    _operators = {
    +        "==": "equal",
    +        "!=": "not_equal",
    +        "<=": "less_than_equal",
    +        ">=": "greater_than_equal",
    +        "<": "less_than",
    +        ">": "greater_than",
    +    }
    +
    +    def _coerce_version(self, version):
    +        if not isinstance(version, LegacyVersion):
    +            version = LegacyVersion(str(version))
    +        return version
    +
    +    def _compare_equal(self, prospective, spec):
    +        return prospective == self._coerce_version(spec)
    +
    +    def _compare_not_equal(self, prospective, spec):
    +        return prospective != self._coerce_version(spec)
    +
    +    def _compare_less_than_equal(self, prospective, spec):
    +        return prospective <= self._coerce_version(spec)
    +
    +    def _compare_greater_than_equal(self, prospective, spec):
    +        return prospective >= self._coerce_version(spec)
    +
    +    def _compare_less_than(self, prospective, spec):
    +        return prospective < self._coerce_version(spec)
    +
    +    def _compare_greater_than(self, prospective, spec):
    +        return prospective > self._coerce_version(spec)
    +
    +
    +def _require_version_compare(fn):
    +    @functools.wraps(fn)
    +    def wrapped(self, prospective, spec):
    +        if not isinstance(prospective, Version):
    +            return False
    +        return fn(self, prospective, spec)
    +    return wrapped
    +
    +
    +class Specifier(_IndividualSpecifier):
    +
    +    _regex = re.compile(
    +        r"""
    +        ^
    +        \s*
    +        (?P(~=|==|!=|<=|>=|<|>|===))
    +        (?P
    +            (?:
    +                # The identity operators allow for an escape hatch that will
    +                # do an exact string match of the version you wish to install.
    +                # This will not be parsed by PEP 440 and we cannot determine
    +                # any semantic meaning from it. This operator is discouraged
    +                # but included entirely as an escape hatch.
    +                (?<====)  # Only match for the identity operator
    +                \s*
    +                [^\s]*    # We just match everything, except for whitespace
    +                          # since we are only testing for strict identity.
    +            )
    +            |
    +            (?:
    +                # The (non)equality operators allow for wild card and local
    +                # versions to be specified so we have to define these two
    +                # operators separately to enable that.
    +                (?<===|!=)            # Only match for equals and not equals
    +
    +                \s*
    +                v?
    +                (?:[0-9]+!)?          # epoch
    +                [0-9]+(?:\.[0-9]+)*   # release
    +                (?:                   # pre release
    +                    [-_\.]?
    +                    (a|b|c|rc|alpha|beta|pre|preview)
    +                    [-_\.]?
    +                    [0-9]*
    +                )?
    +                (?:                   # post release
    +                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    +                )?
    +
    +                # You cannot use a wild card and a dev or local version
    +                # together so group them with a | and make them optional.
    +                (?:
    +                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
    +                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
    +                    |
    +                    \.\*  # Wild card syntax of .*
    +                )?
    +            )
    +            |
    +            (?:
    +                # The compatible operator requires at least two digits in the
    +                # release segment.
    +                (?<=~=)               # Only match for the compatible operator
    +
    +                \s*
    +                v?
    +                (?:[0-9]+!)?          # epoch
    +                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
    +                (?:                   # pre release
    +                    [-_\.]?
    +                    (a|b|c|rc|alpha|beta|pre|preview)
    +                    [-_\.]?
    +                    [0-9]*
    +                )?
    +                (?:                                   # post release
    +                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    +                )?
    +                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
    +            )
    +            |
    +            (?:
    +                # All other operators only allow a sub set of what the
    +                # (non)equality operators do. Specifically they do not allow
    +                # local versions to be specified nor do they allow the prefix
    +                # matching wild cards.
    +                (?=": "greater_than_equal",
    +        "<": "less_than",
    +        ">": "greater_than",
    +        "===": "arbitrary",
    +    }
    +
    +    @_require_version_compare
    +    def _compare_compatible(self, prospective, spec):
    +        # Compatible releases have an equivalent combination of >= and ==. That
    +        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
    +        # implement this in terms of the other specifiers instead of
    +        # implementing it ourselves. The only thing we need to do is construct
    +        # the other specifiers.
    +
    +        # We want everything but the last item in the version, but we want to
    +        # ignore post and dev releases and we want to treat the pre-release as
    +        # it's own separate segment.
    +        prefix = ".".join(
    +            list(
    +                itertools.takewhile(
    +                    lambda x: (not x.startswith("post")
    +                               and not x.startswith("dev")),
    +                    _version_split(spec),
    +                )
    +            )[:-1]
    +        )
    +
    +        # Add the prefix notation to the end of our string
    +        prefix += ".*"
    +
    +        return (self._get_operator(">=")(prospective, spec)
    +                and self._get_operator("==")(prospective, prefix))
    +
    +    @_require_version_compare
    +    def _compare_equal(self, prospective, spec):
    +        # We need special logic to handle prefix matching
    +        if spec.endswith(".*"):
    +            # Split the spec out by dots, and pretend that there is an implicit
    +            # dot in between a release segment and a pre-release segment.
    +            spec = _version_split(spec[:-2])  # Remove the trailing .*
    +
    +            # Split the prospective version out by dots, and pretend that there
    +            # is an implicit dot in between a release segment and a pre-release
    +            # segment.
    +            prospective = _version_split(str(prospective))
    +
    +            # Shorten the prospective version to be the same length as the spec
    +            # so that we can determine if the specifier is a prefix of the
    +            # prospective version or not.
    +            prospective = prospective[:len(spec)]
    +
    +            # Pad out our two sides with zeros so that they both equal the same
    +            # length.
    +            spec, prospective = _pad_version(spec, prospective)
    +        else:
    +            # Convert our spec string into a Version
    +            spec = Version(spec)
    +
    +            # If the specifier does not have a local segment, then we want to
    +            # act as if the prospective version also does not have a local
    +            # segment.
    +            if not spec.local:
    +                prospective = Version(prospective.public)
    +
    +        return prospective == spec
    +
    +    @_require_version_compare
    +    def _compare_not_equal(self, prospective, spec):
    +        return not self._compare_equal(prospective, spec)
    +
    +    @_require_version_compare
    +    def _compare_less_than_equal(self, prospective, spec):
    +        return prospective <= Version(spec)
    +
    +    @_require_version_compare
    +    def _compare_greater_than_equal(self, prospective, spec):
    +        return prospective >= Version(spec)
    +
    +    @_require_version_compare
    +    def _compare_less_than(self, prospective, spec):
    +        # Less than are defined as exclusive operators, this implies that
    +        # pre-releases do not match for the same series as the spec. This is
    +        # implemented by making V imply !=V.*.
    +        return (prospective > Version(spec)
    +                and self._get_operator("!=")(prospective, spec + ".*"))
    +
    +    def _compare_arbitrary(self, prospective, spec):
    +        return str(prospective).lower() == str(spec).lower()
    +
    +    @property
    +    def prereleases(self):
    +        # If there is an explicit prereleases set for this, then we'll just
    +        # blindly use that.
    +        if self._prereleases is not None:
    +            return self._prereleases
    +
    +        # Look at all of our specifiers and determine if they are inclusive
    +        # operators, and if they are if they are including an explicit
    +        # prerelease.
    +        operator, version = self._spec
    +        if operator in ["==", ">=", "<=", "~="]:
    +            # The == specifier can include a trailing .*, if it does we
    +            # want to remove before parsing.
    +            if operator == "==" and version.endswith(".*"):
    +                version = version[:-2]
    +
    +            # Parse the version, and if it is a pre-release than this
    +            # specifier allows pre-releases.
    +            if parse(version).is_prerelease:
    +                return True
    +
    +        return False
    +
    +    @prereleases.setter
    +    def prereleases(self, value):
    +        self._prereleases = value
    +
    +
    +_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")
    +
    +
    +def _version_split(version):
    +    result = []
    +    for item in version.split("."):
    +        match = _prefix_regex.search(item)
    +        if match:
    +            result.extend(match.groups())
    +        else:
    +            result.append(item)
    +    return result
    +
    +
    +def _pad_version(left, right):
    +    left_split, right_split = [], []
    +
    +    # Get the release segment of our versions
    +    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    +    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))
    +
    +    # Get the rest of our versions
    +    left_split.append(left[len(left_split):])
    +    right_split.append(left[len(right_split):])
    +
    +    # Insert our padding
    +    left_split.insert(
    +        1,
    +        ["0"] * max(0, len(right_split[0]) - len(left_split[0])),
    +    )
    +    right_split.insert(
    +        1,
    +        ["0"] * max(0, len(left_split[0]) - len(right_split[0])),
    +    )
    +
    +    return (
    +        list(itertools.chain(*left_split)),
    +        list(itertools.chain(*right_split)),
    +    )
    +
    +
    +class SpecifierSet(BaseSpecifier):
    +
    +    def __init__(self, specifiers="", prereleases=None):
    +        # Split on , to break each indidivual specifier into it's own item, and
    +        # strip each item to remove leading/trailing whitespace.
    +        specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
    +
    +        # Parsed each individual specifier, attempting first to make it a
    +        # Specifier and falling back to a LegacySpecifier.
    +        parsed = set()
    +        for specifier in specifiers:
    +            try:
    +                parsed.add(Specifier(specifier))
    +            except InvalidSpecifier:
    +                parsed.add(LegacySpecifier(specifier))
    +
    +        # Turn our parsed specifiers into a frozen set and save them for later.
    +        self._specs = frozenset(parsed)
    +
    +        # Store our prereleases value so we can use it later to determine if
    +        # we accept prereleases or not.
    +        self._prereleases = prereleases
    +
    +    def __repr__(self):
    +        pre = (
    +            ", prereleases={0!r}".format(self.prereleases)
    +            if self._prereleases is not None
    +            else ""
    +        )
    +
    +        return "".format(str(self), pre)
    +
    +    def __str__(self):
    +        return ",".join(sorted(str(s) for s in self._specs))
    +
    +    def __hash__(self):
    +        return hash(self._specs)
    +
    +    def __and__(self, other):
    +        if isinstance(other, string_types):
    +            other = SpecifierSet(other)
    +        elif not isinstance(other, SpecifierSet):
    +            return NotImplemented
    +
    +        specifier = SpecifierSet()
    +        specifier._specs = frozenset(self._specs | other._specs)
    +
    +        if self._prereleases is None and other._prereleases is not None:
    +            specifier._prereleases = other._prereleases
    +        elif self._prereleases is not None and other._prereleases is None:
    +            specifier._prereleases = self._prereleases
    +        elif self._prereleases == other._prereleases:
    +            specifier._prereleases = self._prereleases
    +        else:
    +            raise ValueError(
    +                "Cannot combine SpecifierSets with True and False prerelease "
    +                "overrides."
    +            )
    +
    +        return specifier
    +
    +    def __eq__(self, other):
    +        if isinstance(other, string_types):
    +            other = SpecifierSet(other)
    +        elif isinstance(other, _IndividualSpecifier):
    +            other = SpecifierSet(str(other))
    +        elif not isinstance(other, SpecifierSet):
    +            return NotImplemented
    +
    +        return self._specs == other._specs
    +
    +    def __ne__(self, other):
    +        if isinstance(other, string_types):
    +            other = SpecifierSet(other)
    +        elif isinstance(other, _IndividualSpecifier):
    +            other = SpecifierSet(str(other))
    +        elif not isinstance(other, SpecifierSet):
    +            return NotImplemented
    +
    +        return self._specs != other._specs
    +
    +    @property
    +    def prereleases(self):
    +        # If we have been given an explicit prerelease modifier, then we'll
    +        # pass that through here.
    +        if self._prereleases is not None:
    +            return self._prereleases
    +
    +        # Otherwise we'll see if any of the given specifiers accept
    +        # prereleases, if any of them do we'll return True, otherwise False.
    +        # Note: The use of any() here means that an empty set of specifiers
    +        #       will always return False, this is an explicit design decision.
    +        return any(s.prereleases for s in self._specs)
    +
    +    @prereleases.setter
    +    def prereleases(self, value):
    +        self._prereleases = value
    +
    +    def contains(self, item, prereleases=None):
    +        # Ensure that our item is a Version or LegacyVersion instance.
    +        if not isinstance(item, (LegacyVersion, Version)):
    +            item = parse(item)
    +
    +        # We can determine if we're going to allow pre-releases by looking to
    +        # see if any of the underlying items supports them. If none of them do
    +        # and this item is a pre-release then we do not allow it and we can
    +        # short circuit that here.
    +        # Note: This means that 1.0.dev1 would not be contained in something
    +        #       like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
    +        if (not (self.prereleases or prereleases)) and item.is_prerelease:
    +            return False
    +
    +        # Determine if we're forcing a prerelease or not, we bypass
    +        # self.prereleases here and use self._prereleases because we want to
    +        # only take into consideration actual *forced* values. The underlying
    +        # specifiers will handle the other logic.
    +        # The logic here is: If prereleases is anything but None, we'll just
    +        #                    go aheand and continue to use that. However if
    +        #                    prereleases is None, then we'll use whatever the
    +        #                    value of self._prereleases is as long as it is not
    +        #                    None itself.
    +        if prereleases is None and self._prereleases is not None:
    +            prereleases = self._prereleases
    +
    +        # We simply dispatch to the underlying specs here to make sure that the
    +        # given version is contained within all of them.
    +        # Note: This use of all() here means that an empty set of specifiers
    +        #       will always return True, this is an explicit design decision.
    +        return all(
    +            s.contains(item, prereleases=prereleases)
    +            for s in self._specs
    +        )
    +
    +    def filter(self, iterable, prereleases=None):
    +        # Determine if we're forcing a prerelease or not, we bypass
    +        # self.prereleases here and use self._prereleases because we want to
    +        # only take into consideration actual *forced* values. The underlying
    +        # specifiers will handle the other logic.
    +        # The logic here is: If prereleases is anything but None, we'll just
    +        #                    go aheand and continue to use that. However if
    +        #                    prereleases is None, then we'll use whatever the
    +        #                    value of self._prereleases is as long as it is not
    +        #                    None itself.
    +        if prereleases is None and self._prereleases is not None:
    +            prereleases = self._prereleases
    +
    +        # If we have any specifiers, then we want to wrap our iterable in the
    +        # filter method for each one, this will act as a logical AND amongst
    +        # each specifier.
    +        if self._specs:
    +            for spec in self._specs:
    +                iterable = spec.filter(iterable, prereleases=prereleases)
    +            return iterable
    +        # If we do not have any specifiers, then we need to have a rough filter
    +        # which will filter out any pre-releases, unless there are no final
    +        # releases, and which will filter out LegacyVersion in general.
    +        else:
    +            filtered = []
    +            found_prereleases = []
    +
    +            for item in iterable:
    +                # Ensure that we some kind of Version class for this item.
    +                if not isinstance(item, (LegacyVersion, Version)):
    +                    parsed_version = parse(item)
    +                else:
    +                    parsed_version = item
    +
    +                # Filter out any item which is parsed as a LegacyVersion
    +                if isinstance(parsed_version, LegacyVersion):
    +                    continue
    +
    +                # Store any item which is a pre-release for later unless we've
    +                # already found a final version or we are accepting prereleases
    +                if parsed_version.is_prerelease and not prereleases:
    +                    if not filtered:
    +                        found_prereleases.append(item)
    +                else:
    +                    filtered.append(item)
    +
    +            # If we've found no items except for pre-releases, then we'll go
    +            # ahead and use the pre-releases
    +            if not filtered and found_prereleases and prereleases is None:
    +                return found_prereleases
    +
    +            return filtered
    diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py
    index 0affe899f4..e76e960724 100644
    --- a/setuptools/_vendor/packaging/version.py
    +++ b/setuptools/_vendor/packaging/version.py
    @@ -17,13 +17,11 @@
     import itertools
     import re
     
    -from ._compat import string_types
     from ._structures import Infinity
     
     
     __all__ = [
    -    "parse", "Version", "LegacyVersion", "InvalidVersion", "Specifier",
    -    "InvalidSpecifier",
    +    "parse", "Version", "LegacyVersion", "InvalidVersion",
     ]
     
     
    @@ -376,411 +374,3 @@ def _cmpkey(epoch, release, pre, post, dev, local):
             )
     
         return epoch, release, pre, post, dev, local
    -
    -
    -class InvalidSpecifier(ValueError):
    -    """
    -    An invalid specifier was found, users should refer to PEP 440.
    -    """
    -
    -
    -class Specifier(object):
    -
    -    _regex = re.compile(
    -        r"""
    -        ^
    -        \s*
    -        (?P(~=|==|!=|<=|>=|<|>|===))
    -        (?P
    -            (?:
    -                # The identity operators allow for an escape hatch that will
    -                # do an exact string match of the version you wish to install.
    -                # This will not be parsed by PEP 440 and we cannot determine
    -                # any semantic meaning from it. This operator is discouraged
    -                # but included entirely as an escape hatch.
    -                (?<====)  # Only match for the identity operator
    -                \s*
    -                [^\s]*    # We just match everything, except for whitespace
    -                          # since we are only testing for strict identity.
    -            )
    -            |
    -            (?:
    -                # The (non)equality operators allow for wild card and local
    -                # versions to be specified so we have to define these two
    -                # operators separately to enable that.
    -                (?<===|!=)            # Only match for equals and not equals
    -
    -                \s*
    -                v?
    -                (?:[0-9]+!)?          # epoch
    -                [0-9]+(?:\.[0-9]+)*   # release
    -                (?:                   # pre release
    -                    [-_\.]?
    -                    (a|b|c|rc|alpha|beta|pre|preview)
    -                    [-_\.]?
    -                    [0-9]*
    -                )?
    -                (?:                   # post release
    -                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    -                )?
    -
    -                # You cannot use a wild card and a dev or local version
    -                # together so group them with a | and make them optional.
    -                (?:
    -                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
    -                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
    -                    |
    -                    \.\*  # Wild card syntax of .*
    -                )?
    -            )
    -            |
    -            (?:
    -                # The compatible operator requires at least two digits in the
    -                # release segment.
    -                (?<=~=)               # Only match for the compatible operator
    -
    -                \s*
    -                v?
    -                (?:[0-9]+!)?          # epoch
    -                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
    -                (?:                   # pre release
    -                    [-_\.]?
    -                    (a|b|c|rc|alpha|beta|pre|preview)
    -                    [-_\.]?
    -                    [0-9]*
    -                )?
    -                (?:                                   # post release
    -                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
    -                )?
    -                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
    -            )
    -            |
    -            (?:
    -                # All other operators only allow a sub set of what the
    -                # (non)equality operators do. Specifically they do not allow
    -                # local versions to be specified nor do they allow the prefix
    -                # matching wild cards.
    -                (?=": "greater_than_equal",
    -        "<": "less_than",
    -        ">": "greater_than",
    -        "===": "arbitrary",
    -    }
    -
    -    def __init__(self, specs="", prereleases=None):
    -        # Split on comma to get each individual specification
    -        _specs = set()
    -        for spec in (s for s in specs.split(",") if s):
    -            match = self._regex.search(spec)
    -            if not match:
    -                raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
    -
    -            _specs.add(
    -                (
    -                    match.group("operator").strip(),
    -                    match.group("version").strip(),
    -                )
    -            )
    -
    -        # Set a frozen set for our specifications
    -        self._specs = frozenset(_specs)
    -
    -        # Store whether or not this Specifier should accept prereleases
    -        self._prereleases = prereleases
    -
    -    def __repr__(self):
    -        return "".format(repr(str(self)))
    -
    -    def __str__(self):
    -        return ",".join(["".join(s) for s in sorted(self._specs)])
    -
    -    def __hash__(self):
    -        return hash(self._specs)
    -
    -    def __and__(self, other):
    -        if isinstance(other, string_types):
    -            other = Specifier(other)
    -        elif not isinstance(other, Specifier):
    -            return NotImplemented
    -
    -        return self.__class__(",".join([str(self), str(other)]))
    -
    -    def __eq__(self, other):
    -        if isinstance(other, string_types):
    -            other = Specifier(other)
    -        elif not isinstance(other, Specifier):
    -            return NotImplemented
    -
    -        return self._specs == other._specs
    -
    -    def __ne__(self, other):
    -        if isinstance(other, string_types):
    -            other = Specifier(other)
    -        elif not isinstance(other, Specifier):
    -            return NotImplemented
    -
    -        return self._specs != other._specs
    -
    -    def _get_operator(self, op):
    -        return getattr(self, "_compare_{0}".format(self._operators[op]))
    -
    -    def _compare_compatible(self, prospective, spec):
    -        # Compatible releases have an equivalent combination of >= and ==. That
    -        # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
    -        # implement this in terms of the other specifiers instead of
    -        # implementing it ourselves. The only thing we need to do is construct
    -        # the other specifiers.
    -
    -        # We want everything but the last item in the version, but we want to
    -        # ignore post and dev releases and we want to treat the pre-release as
    -        # it's own separate segment.
    -        prefix = ".".join(
    -            list(
    -                itertools.takewhile(
    -                    lambda x: (not x.startswith("post")
    -                               and not x.startswith("dev")),
    -                    _version_split(spec),
    -                )
    -            )[:-1]
    -        )
    -
    -        # Add the prefix notation to the end of our string
    -        prefix += ".*"
    -
    -        return (self._get_operator(">=")(prospective, spec)
    -                and self._get_operator("==")(prospective, prefix))
    -
    -    def _compare_equal(self, prospective, spec):
    -        # We need special logic to handle prefix matching
    -        if spec.endswith(".*"):
    -            # Split the spec out by dots, and pretend that there is an implicit
    -            # dot in between a release segment and a pre-release segment.
    -            spec = _version_split(spec[:-2])  # Remove the trailing .*
    -
    -            # Split the prospective version out by dots, and pretend that there
    -            # is an implicit dot in between a release segment and a pre-release
    -            # segment.
    -            prospective = _version_split(str(prospective))
    -
    -            # Shorten the prospective version to be the same length as the spec
    -            # so that we can determine if the specifier is a prefix of the
    -            # prospective version or not.
    -            prospective = prospective[:len(spec)]
    -
    -            # Pad out our two sides with zeros so that they both equal the same
    -            # length.
    -            spec, prospective = _pad_version(spec, prospective)
    -        else:
    -            # Convert our spec string into a Version
    -            spec = Version(spec)
    -
    -            # If the specifier does not have a local segment, then we want to
    -            # act as if the prospective version also does not have a local
    -            # segment.
    -            if not spec.local:
    -                prospective = Version(prospective.public)
    -
    -        return prospective == spec
    -
    -    def _compare_not_equal(self, prospective, spec):
    -        return not self._compare_equal(prospective, spec)
    -
    -    def _compare_less_than_equal(self, prospective, spec):
    -        return prospective <= Version(spec)
    -
    -    def _compare_greater_than_equal(self, prospective, spec):
    -        return prospective >= Version(spec)
    -
    -    def _compare_less_than(self, prospective, spec):
    -        # Less than are defined as exclusive operators, this implies that
    -        # pre-releases do not match for the same series as the spec. This is
    -        # implemented by making V imply !=V.*.
    -        return (prospective > Version(spec)
    -                and self._get_operator("!=")(prospective, spec + ".*"))
    -
    -    def _compare_arbitrary(self, prospective, spec):
    -        return str(prospective).lower() == str(spec).lower()
    -
    -    @property
    -    def prereleases(self):
    -        # If there is an explicit prereleases set for this, then we'll just
    -        # blindly use that.
    -        if self._prereleases is not None:
    -            return self._prereleases
    -
    -        # Look at all of our specifiers and determine if they are inclusive
    -        # operators, and if they are if they are including an explicit
    -        # prerelease.
    -        for spec, version in self._specs:
    -            if spec in ["==", ">=", "<=", "~="]:
    -                # The == specifier can include a trailing .*, if it does we
    -                # want to remove before parsing.
    -                if spec == "==" and version.endswith(".*"):
    -                    version = version[:-2]
    -
    -                # Parse the version, and if it is a pre-release than this
    -                # specifier allows pre-releases.
    -                if parse(version).is_prerelease:
    -                    return True
    -
    -        return False
    -
    -    @prereleases.setter
    -    def prereleases(self, value):
    -        self._prereleases = value
    -
    -    def contains(self, item, prereleases=None):
    -        # Determine if prereleases are to be allowed or not.
    -        if prereleases is None:
    -            prereleases = self.prereleases
    -
    -        # Normalize item to a Version or LegacyVersion, this allows us to have
    -        # a shortcut for ``"2.0" in Specifier(">=2")
    -        if isinstance(item, (Version, LegacyVersion)):
    -            version_item = item
    -        else:
    -            try:
    -                version_item = Version(item)
    -            except ValueError:
    -                version_item = LegacyVersion(item)
    -
    -        # Determine if we should be supporting prereleases in this specifier
    -        # or not, if we do not support prereleases than we can short circuit
    -        # logic if this version is a prereleases.
    -        if version_item.is_prerelease and not prereleases:
    -            return False
    -
    -        # Detect if we have any specifiers, if we do not then anything matches
    -        # and we can short circuit all this logic.
    -        if not self._specs:
    -            return True
    -
    -        # If we're operating on a LegacyVersion, then we can only support
    -        # arbitrary comparison so do a quick check to see if the spec contains
    -        # any non arbitrary specifiers
    -        if isinstance(version_item, LegacyVersion):
    -            if any(op != "===" for op, _ in self._specs):
    -                return False
    -
    -        # Ensure that the passed in version matches all of our version
    -        # specifiers
    -        return all(
    -            self._get_operator(op)(
    -                version_item if op != "===" else item,
    -                spec,
    -            )
    -            for op, spec, in self._specs
    -        )
    -
    -    def filter(self, iterable, prereleases=None):
    -        iterable = list(iterable)
    -        yielded = False
    -        found_prereleases = []
    -
    -        kw = {"prereleases": prereleases if prereleases is not None else True}
    -
    -        # Attempt to iterate over all the values in the iterable and if any of
    -        # them match, yield them.
    -        for version in iterable:
    -            if not isinstance(version, (Version, LegacyVersion)):
    -                parsed_version = parse(version)
    -            else:
    -                parsed_version = version
    -
    -            if self.contains(parsed_version, **kw):
    -                # If our version is a prerelease, and we were not set to allow
    -                # prereleases, then we'll store it for later incase nothing
    -                # else matches this specifier.
    -                if (parsed_version.is_prerelease
    -                        and not (prereleases or self.prereleases)):
    -                    found_prereleases.append(version)
    -                # Either this is not a prerelease, or we should have been
    -                # accepting prereleases from the begining.
    -                else:
    -                    yielded = True
    -                    yield version
    -
    -        # Now that we've iterated over everything, determine if we've yielded
    -        # any values, and if we have not and we have any prereleases stored up
    -        # then we will go ahead and yield the prereleases.
    -        if not yielded and found_prereleases:
    -            for version in found_prereleases:
    -                yield version
    -
    -
    -_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")
    -
    -
    -def _version_split(version):
    -    result = []
    -    for item in version.split("."):
    -        match = _prefix_regex.search(item)
    -        if match:
    -            result.extend(match.groups())
    -        else:
    -            result.append(item)
    -    return result
    -
    -
    -def _pad_version(left, right):
    -    left_split, right_split = [], []
    -
    -    # Get the release segment of our versions
    -    left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
    -    right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))
    -
    -    # Get the rest of our versions
    -    left_split.append(left[len(left_split):])
    -    right_split.append(left[len(right_split):])
    -
    -    # Insert our padding
    -    left_split.insert(
    -        1,
    -        ["0"] * max(0, len(right_split[0]) - len(left_split[0])),
    -    )
    -    right_split.insert(
    -        1,
    -        ["0"] * max(0, len(left_split[0]) - len(right_split[0])),
    -    )
    -
    -    return (
    -        list(itertools.chain(*left_split)),
    -        list(itertools.chain(*right_split)),
    -    )
    diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt
    index df383d8bd3..b86bba005c 100644
    --- a/setuptools/_vendor/vendored.txt
    +++ b/setuptools/_vendor/vendored.txt
    @@ -1 +1 @@
    -packaging==14.2
    +packaging==14.3
    
    From a15a276e1a7425ae884352958f87c9e506d2a1c8 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 19 Nov 2014 13:15:01 -0500
    Subject: [PATCH 4467/8469] Remove packaging from setup.py
    
    ---
     setup.py | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/setup.py b/setup.py
    index cc0e468402..bac4e29dbf 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -198,9 +198,6 @@ def _save_entry_points(self):
             Topic :: System :: Systems Administration
             Topic :: Utilities
             """).strip().splitlines(),
    -    install_requires=[
    -        "packaging>=14.2,<15.0.dev0",
    -    ],
         extras_require={
             "ssl:sys_platform=='win32'": "wincertstore==0.2",
             "certs": "certifi==1.0.1",
    
    From 4ae526d52609fe2a7515d87e4c0d047a826411a7 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 19 Nov 2014 13:38:16 -0500
    Subject: [PATCH 4468/8469] Always use the vendored copy of packaging
    
    ---
     pkg_resources.py                   | 11 +++--------
     setuptools/tests/test_resources.py |  9 +++------
     2 files changed, 6 insertions(+), 14 deletions(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 422b31b547..a3eef28f88 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -75,14 +75,9 @@
     except ImportError:
         pass
     
    -try:
    -    import packaging.version
    -    import packaging.specifiers
    -except ImportError:
    -    # fallback to vendored version
    -    import setuptools._vendor.packaging.version
    -    import setuptools._vendor.packaging.specifiers
    -    packaging = setuptools._vendor.packaging
    +import setuptools._vendor.packaging.version
    +import setuptools._vendor.packaging.specifiers
    +packaging = setuptools._vendor.packaging
     
     # For compatibility, expose packaging.version.parse as parse_version
     parse_version = packaging.version.parse
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index 8336a85d3a..a8520e12ad 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -8,12 +8,9 @@
     import shutil
     from unittest import TestCase
     
    -try:
    -    import packaging.version
    -except ImportError:
    -    # fallback to vendored version
    -    import setuptools._vendor.packaging.version
    -    packaging = setuptools._vendor.packaging
    +import setuptools._vendor.packaging.version
    +import setuptools._vendor.packaging.specifiers
    +packaging = setuptools._vendor.packaging
     
     import pkg_resources
     from pkg_resources import (parse_requirements, VersionConflict, parse_version,
    
    From 6f74eb003ba0df2049a92c60e2ebd6eaa4aba030 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 19 Nov 2014 13:38:32 -0500
    Subject: [PATCH 4469/8469] Fix the use of pacakging.version.Specifier
    
    ---
     setuptools/tests/test_resources.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index a8520e12ad..356e1ed4e6 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -342,7 +342,7 @@ def testOptionsAndHashing(self):
             self.assertEqual(r2.extras, ("bar","foo"))  # extras are normalized
             self.assertEqual(hash(r1), hash(r2))
             self.assertEqual(
    -            hash(r1), hash(("twisted", packaging.version.Specifier(">=1.2"),
    +            hash(r1), hash(("twisted", packaging.specifiers.SpecifierSet(">=1.2"),
                                 frozenset(["foo","bar"])))
             )
     
    
    From 5fa2a4519fc0521ee15b0ce0cad136afe304eb37 Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 19 Nov 2014 21:40:21 -0500
    Subject: [PATCH 4470/8469] fix left over merge indicator
    
    ---
     CHANGES.txt | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index f4d8019a1e..cc2423b69d 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -45,7 +45,6 @@ CHANGES
     
     * Issue #262: Fixed regression in pip install due to egg-info directories
       being omitted. Re-opens Issue #118.
    ->>>>>>> master
     
     -----
     6.0.1
    
    From b880aac986be9e5c76411953dcaf56c443f5d584 Mon Sep 17 00:00:00 2001
    From: Steve Dower 
    Date: Sat, 22 Nov 2014 12:54:57 -0800
    Subject: [PATCH 4471/8469] Issue #22919: Windows build updated to support VC
     14.0 (Visual Studio 2015), which will be used for the official 3.5 release.
    
    ---
     command/build_ext.py           |   2 +-
     command/wininst-14.0-amd64.exe | Bin 0 -> 84480 bytes
     command/wininst-14.0.exe       | Bin 0 -> 75264 bytes
     msvc9compiler.py               |   3 +++
     msvccompiler.py                |   3 +++
     sysconfig.py                   |  27 +++++++++------------------
     6 files changed, 16 insertions(+), 19 deletions(-)
     create mode 100644 command/wininst-14.0-amd64.exe
     create mode 100644 command/wininst-14.0.exe
    
    diff --git a/command/build_ext.py b/command/build_ext.py
    index 54ce13454f..605efbd68f 100644
    --- a/command/build_ext.py
    +++ b/command/build_ext.py
    @@ -209,7 +209,7 @@ def finalize_options(self):
                 if MSVC_VERSION >= 9:
                     # Use the .lib files for the correct architecture
                     if self.plat_name == 'win32':
    -                    suffix = ''
    +                    suffix = 'win32'
                     else:
                         # win-amd64 or win-ia64
                         suffix = self.plat_name[4:]
    diff --git a/command/wininst-14.0-amd64.exe b/command/wininst-14.0-amd64.exe
    new file mode 100644
    index 0000000000000000000000000000000000000000..9affe13039517798970f5e3a8d9f4d1d13e79464
    GIT binary patch
    literal 84480
    zcmeFadw5jUx%fYm$&d&MI|!puP)CV1I$omD8VuCgFk^OPBC&{|qDB$KiWXr8P*D>n
    zL5A&APmeunODo!**4DOOP75Jc%_K;|RW4pYYz^4fJq#+KhntuE{k&_>B;cj(dCvLg
    z_dLHmPxfAWt#`faUGI9=yWaJ#%hX-{u*>6ex$^n9ZI`Q+xBLaw^PfE2F4w@5+6KD*
    zaMZe!Tiua$CtorBmf8N9v%Y`xtQ&6gPr2dt+rJ<6-#FDjD|Wm8mfQWIapV2BegCGZ
    zXBQXuFUz8S$QpXpnnbLB?!V~W=zw*6PdNRB{%d&`y*qQj3iZBYKuW#m4Cv;4%$yhd
    zuTt;-?7v#QU+yn(YZB4^4ZJ`2%RK`+)q9aj|KKlk2MFAEZ<#V(%F5NOKJ0Scw4k4B
    zDVHgm
    zmskf$?j>;97zw%-pW}9leAw-pbTko-ZrAx2
    z=UlF*569D+-~`T&PMsGec;Mf72tiW!Y&{66KflY>aQ3X5ZiwFCa-AXR;B-C0zwqX;
    zzaZjswgcue&LE*a%ab#BANCh?x!TX3=>V!aQdh;$v%dltJbTvcSyRZXcmi)+L-;uV
    z>)@u&_&$KbBNx1)5nL|gD{!MF`TzfeH7%>6gBQ7*+oQ!J&xv_fx+fd)lsoo8=i0Sv
    zjl|@#LL)Jwti(t}%StC2@m>B}^MGN#ZJ2wEmQ7mok6>YAwM%P$kU-mH9)`Kb_I3S2
    z0$Yrh_UIhLT)z_4;=AVOE|+P=57@DDDm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^=F-fx%=FCdnK_wxnJD%@$N#_x
    F{6EauG?M@T
    
    literal 0
    HcmV?d00001
    
    diff --git a/command/wininst-14.0.exe b/command/wininst-14.0.exe
    new file mode 100644
    index 0000000000000000000000000000000000000000..3ce71b9f1b49afc4e6eb8a60ef551e7ced3e04b6
    GIT binary patch
    literal 75264
    zcmeFae_WJR`Zszs2>{(Y+jtsn?GI7JbJIy~vm!u|ij(+I-QQM-o<+XlUR
    zeVt~?yVuWfJiI7zVfkYZl|S%E;)4%7`sib>#9z!yEO$Se`0%5N6Q>m>KJwVyd1HqR
    ziAoApeR%KsHMM6B2YOw8?UBY+c#mB^DB#62zxH6`@A#@Zec{=1AZcJh!mM#+CeeD^K6T4mDD~=?_2XptgE3vsndUiY8p>`t?&YdgI!J
    zFwJ1iP(fIZm?ky$$dh;);a1bTMGc1uLIl0yulFfbf+$2x{DldYDxQ(bQDOeI!j8B
    zGPk%fLQvw){l+3l)*i82ao_9|ij}xFM0kAe;hxhjL$SlwU=f_*%5iajbTG2msZoxX
    zlrU@0W}`d7u@kT>ajlg9v}?!}c^e~UiH#cfQ}>&Fvn^%pAEgA9*kNS;LOXNE7qhR;
    z2b@Bd$LFX-C5DN9n^SNK4upNhlC@ij>qf1tRs2RVc!+zIxHE_lyS46kR-|V~?D7aj
    zQ9M3o?JjX|Ywto9vD@YvWK-b@-sZVzsQv)4#m+G0B=GgQZZrFAyftT-&8D_Apc(fl
    zDzSx1I2^#a{r9|ZBo%Id4q;FX_-pCiYwfft?pVcbRN{I77QNeSg-V=EFjhnh?m>8I
    z!Ar0VjVkVFn^Q;WClFQ0(W69G+U+^*jz-1l#g3(DGk6nn+icD-WbM2%tF@bV$weab
    zYPCyFqDw&Cvitj}J6^2N>kIA0>kgTop*hwJd{@AxZx{;W`6^)Kfu{pL7a3fGyZofwmG8#pjUs1bw>y2LEOykDwLvf!ki?
    z{YILRlwNhGZL%f|wWYWZSKV!!tkt<24R7C@DEh`q6O&@u#H2(mo(RVq-p;;G+XO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2db8)9u$C)m_rv)cvOWT_@w@TzRa+ zbGT*PVeSNXo%>85q0iQ@(4W`)@NM~Uz7OAz|AHUOuj6;{`}m_+bFcC@d0)flhK2^# zU@^2bL>bZy*@i)ek%o!p<7N-6iT;)b77OIx$r5eJgY3s!zOt;fY_S}$oUuHxJhkAY z87BO8gdc4xFpU_NF~JMtAnhDxD6^RPf!WCHgKS;d3amfN!T*l1r`RH_jqb{_N^1yRa2E3((Qm%GgXzR8m`)kRr8qYyy}%| zkh-$IwqB#(!0+dCG3FxUQd3n}Q>J+Y!m3Db{9g!?J4!$GT=h83ajcvcZ9`7Ob>bFs zceo4uSYt!eIP*R8AbJ~vWyo~ znek()GYX~-?5qjH;Lk2N#>iNiVD%==PR$w36-`r)=fXG}m&B!US=<0FpBu@I=caPA zxdq%}?t5+(w}IQn?cok_$GFqnMeZthi@VSL&b<)U;!pHmSdXjgYv~*4o9Weh9;aZNX#GU}bp2fTZz0aIYxJA+JM{bXhxI4)XR&r;QwjY; z{ZsfeUdG|e@)dbMz6M{1Zv^kw@PM5qx*PH=n?#@EQCXev@DuhjB(e#}~mm z?(=`}uXvfk)8K9JH`FyWGpG!DoR`}fdKyv%OWADLY1nT#0{=f}C^FnM+&BDTcx8|o z8NW5IFs{c6vDbLmc+z;@c-45v_}KW` zNK77BDR@(;sh=qqXM~sjnwFK8{WwQIqWa0F@BiVtmWhCe zf607XWIR7SVGBi1wshU}u)tX}(e{BsdtF>smXrr~0wa>5? zm(kVKS#_OtHeD{RlqTus=)Tjf(5=&L!5R1fJoJ?Aysk)h177-A_e}Rj=OTD&Wv(ix z!1~;TQ*s<<##K~n*i08L3M=*hE4!JZU7aD+`ouRbi?WRk{iV3Yic)@;5#K??1|%#?|Q!=05WjD}ftZ y7FSD^Sp{2%Wmq+9WrNu;HiGTV#= 13: + # v13 was skipped and should be v14 + majorVersion += 1 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: diff --git a/msvccompiler.py b/msvccompiler.py index 8116656961..1048cd4159 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -157,6 +157,9 @@ def get_build_version(): i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) majorVersion = int(s[:-2]) - 6 + if majorVersion >= 13: + # v13 was skipped and should be v14 + majorVersion += 1 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: diff --git a/sysconfig.py b/sysconfig.py index a1452fe167..573724ddd7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -9,6 +9,7 @@ Email: """ +import _imp import os import re import sys @@ -22,23 +23,15 @@ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) # Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild9. If we're dealing with an x64 Windows build, -# it'll live in project/PCbuild/amd64. +# live in project/PCBuild/win32 or project/PCBuild/amd64. # set for cross builds if "_PYTHON_PROJECT_BASE" in os.environ: project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) else: project_base = os.path.dirname(os.path.abspath(sys.executable)) -if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) -# PC/VS7.1 -if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) -# PC/AMD64 -if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir, - os.path.pardir)) +if (os.name == 'nt' and + project_base.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): + project_base = os.path.dirname(os.path.dirname(project_base)) # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use @@ -51,11 +44,9 @@ def _is_python_source_dir(d): return True return False _sys_home = getattr(sys, '_home', None) -if _sys_home and os.name == 'nt' and \ - _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')): - _sys_home = os.path.dirname(_sys_home) - if _sys_home.endswith('pcbuild'): # must be amd64 - _sys_home = os.path.dirname(_sys_home) +if (_sys_home and os.name == 'nt' and + _sys_home.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): + _sys_home = os.path.dirname(os.path.dirname(_sys_home)) def _python_build(): if _sys_home: return _is_python_source_dir(_sys_home) @@ -468,7 +459,7 @@ def _init_nt(): # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] = get_python_inc(plat_specific=0) - g['EXT_SUFFIX'] = '.pyd' + g['EXT_SUFFIX'] = _imp.extension_suffixes()[0] g['EXE'] = ".exe" g['VERSION'] = get_python_version().replace(".", "") g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable)) From 818529ec6c3123df45102ec70861d11d1f12ab1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 25 Nov 2014 20:00:10 -0500 Subject: [PATCH 4472/8469] Now that pytest is invoked via setup.py, it should no longer be necessary to continue to support running tests via setup.py test. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22541671ea..7d26aeaec8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,5 @@ python: # command to run tests script: - python setup.py egg_info - - python setup.py test - python setup.py ptr - python ez_setup.py --version 5.4.1 From 3bc1dafb0e22f3c694c63cc1159648cee720e638 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 25 Nov 2014 20:00:55 -0500 Subject: [PATCH 4473/8469] Test bootstrap against 7.0 release. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7d26aeaec8..0b685c1ab5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ python: script: - python setup.py egg_info - python setup.py ptr - - python ez_setup.py --version 5.4.1 + - python ez_setup.py --version 7.0 From 2439ceb80430a4201efac7370c90474e429ab41b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Dec 2014 13:20:22 -0500 Subject: [PATCH 4474/8469] Added tag 8.0b1 for changeset 850a5c155c48 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7e995132ed..5d8d2873d7 100644 --- a/.hgtags +++ b/.hgtags @@ -160,3 +160,4 @@ bc6655b4acf205dd9f25c702955645656077398a 6.0.1 01271e84e5125fcc4f0f368a6e21116a5722953c 6.0.2 7ea80190d494a766c6356fce85c844703964b6cc 6.1 df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 +850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 From a9fc84b43cfb38b7b3f5f009462e9d85bd74f5e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 10:46:32 -0500 Subject: [PATCH 4475/8469] Added tag 8.0 for changeset 7ea0e7498e4d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5d8d2873d7..8247a4dc8c 100644 --- a/.hgtags +++ b/.hgtags @@ -161,3 +161,4 @@ bc6655b4acf205dd9f25c702955645656077398a 6.0.1 7ea80190d494a766c6356fce85c844703964b6cc 6.1 df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 +7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 From b3203c3fd58476f0bead1436bf83ef05d3288d26 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 10:47:06 -0500 Subject: [PATCH 4476/8469] Bumped to 8.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f6361e8eab..59cfada276 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.0" +DEFAULT_VERSION = "8.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 4ca9d5df21..ab31fdd340 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.0' +__version__ = '8.1' From 9538ade5e17240ee19377d3f0d7567a31275ac38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 14:56:11 -0500 Subject: [PATCH 4477/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cc2423b69d..0d2988a681 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +--- +8.1 +--- + +* Pull Request #85: Search egg-base when adding egg-info to manifest. + --- 8.0 --- From 9a010cff9c654b4224721111eed0a27bb5ce726a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 14:59:23 -0500 Subject: [PATCH 4478/8469] Edit docstring for imperative form --- setuptools/command/egg_info.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 302d687483..cbc30ff819 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -330,12 +330,13 @@ def add_defaults(self): self.filelist.include_pattern("*", prefix=ei_cmd.egg_info) def _add_egg_info(self, cmd): - """Add paths for egg-info files for an external egg-base. + """ + Add paths for egg-info files for an external egg-base. - The egg-info files are written to egg-base. If egg-base is - outside the current working directory, we need a separate step - (this method) to search the egg-base directory when creating - the manifest. We use distutils.filelist.findall (which is + The egg-info files are written to egg-base. If egg-base is + outside the current working directory, this method + searchs the egg-base directory for files to include + in the manifest. Uses distutils.filelist.findall (which is really the version monkeypatched in by setuptools/__init__.py) to perform the search. From 3ad4ef1f994dcacc32b1a5f77d4c119ec0ce75af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 15:00:07 -0500 Subject: [PATCH 4479/8469] Remove superfluous list construction. --- setuptools/command/egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index cbc30ff819..e7e4cd7e6a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -345,9 +345,9 @@ def _add_egg_info(self, cmd): (which is looking for the absolute cmd.egg_info) will match them. """ - self.filelist.allfiles.extend([ + self.filelist.allfiles.extend( os.path.join(cmd.egg_base, path) - for path in distutils.filelist.findall(cmd.egg_base)]) + for path in distutils.filelist.findall(cmd.egg_base)) def prune_file_list(self): build = self.get_finalized_command('build') From fec71bcbc8b0aa6bde0b0d054587bcd9c08019e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 15:03:48 -0500 Subject: [PATCH 4480/8469] Extract variables to capture substeps. --- setuptools/command/egg_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e7e4cd7e6a..782b2777e7 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -345,9 +345,9 @@ def _add_egg_info(self, cmd): (which is looking for the absolute cmd.egg_info) will match them. """ - self.filelist.allfiles.extend( - os.path.join(cmd.egg_base, path) - for path in distutils.filelist.findall(cmd.egg_base)) + discovered = distutils.filelist.findall(cmd.egg_base) + resolved = (os.path.join(cmd.egg_base, path) for path in discovered) + self.filelist.allfiles.extend(resolved) def prune_file_list(self): build = self.get_finalized_command('build') From e0bd38e357b89880dde1340a4089aacc1af4a89b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 15:07:15 -0500 Subject: [PATCH 4481/8469] Move invocation bypass into function itself, pertinent to the docstring. --- setuptools/command/egg_info.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 782b2777e7..e132412707 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -325,8 +325,7 @@ def add_defaults(self): elif os.path.exists(self.manifest): self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') - if ei_cmd.egg_base != os.curdir: - self._add_egg_info(cmd=ei_cmd) + self._add_egg_info(cmd=ei_cmd) self.filelist.include_pattern("*", prefix=ei_cmd.egg_info) def _add_egg_info(self, cmd): @@ -345,6 +344,10 @@ def _add_egg_info(self, cmd): (which is looking for the absolute cmd.egg_info) will match them. """ + if cmd.egg_base == os.curdir: + # egg-info files were already added by something else + return + discovered = distutils.filelist.findall(cmd.egg_base) resolved = (os.path.join(cmd.egg_base, path) for path in discovered) self.filelist.allfiles.extend(resolved) From 1b5e1d478005b8d9d2838252e73f4c1f1e8b34da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 15:46:58 -0500 Subject: [PATCH 4482/8469] Use os.pathsep. Fixes failure on Windows --- setuptools/tests/test_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 9f81356044..e80684205f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -118,7 +118,7 @@ def test_egg_base_installed_egg_info(self): '--install-lib', paths['lib'], '--install-scripts', paths['scripts'], '--install-data', paths['data']], - pypath=':'.join([paths['lib'], self.old_cwd]), + pypath=os.pathsep.join([paths['lib'], self.old_cwd]), data_stream=1, env=environ) if code: From 523518180c127b6944528c18beb4f4e1edf77acd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 15:49:53 -0500 Subject: [PATCH 4483/8469] Added tag 8.1b1 for changeset 1af3a5f24f7d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8247a4dc8c..38df5a1d59 100644 --- a/.hgtags +++ b/.hgtags @@ -162,3 +162,4 @@ bc6655b4acf205dd9f25c702955645656077398a 6.0.1 df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 +1af3a5f24f7dd4e51d117f701918052b7de65c99 8.1b1 From 3c81a300356155761880d81a8445bd39581d6c85 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 13 Dec 2014 15:52:17 -0500 Subject: [PATCH 4484/8469] Add a warning when version is parsed as legacy --- pkg_resources.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 4c7924b7ba..5af4c86945 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2413,6 +2413,17 @@ def key(self): def parsed_version(self): if not hasattr(self, "_parsed_version"): self._parsed_version = parse_version(self.version) + if isinstance( + self._parsed_version, packaging.version.LegacyVersion): + warnings.warn( + "'%s (%s)' is being parsed as a legacy, non PEP 440, " + "version. You may find odd behavior and sort order. In " + "particular it will be sorted as less than 0.0. It is " + "recommend to migrate to PEP 440 compatible versions." % ( + self.project_name, self.version, + ), + RuntimeWarning, + ) return self._parsed_version From 68bcfecf36ca0af76b76d15abfffa6403b2d6f54 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 13 Dec 2014 15:52:17 -0500 Subject: [PATCH 4485/8469] Add a warning when version is parsed as legacy --- pkg_resources.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index a3eef28f88..8fec29e17d 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2303,6 +2303,17 @@ def key(self): def parsed_version(self): if not hasattr(self, "_parsed_version"): self._parsed_version = parse_version(self.version) + if isinstance( + self._parsed_version, packaging.version.LegacyVersion): + warnings.warn( + "'%s (%s)' is being parsed as a legacy, non PEP 440, " + "version. You may find odd behavior and sort order. In " + "particular it will be sorted as less than 0.0. It is " + "recommend to migrate to PEP 440 compatible versions." % ( + self.project_name, self.version, + ), + RuntimeWarning, + ) return self._parsed_version From 18fc31b1516b4493ff1925497d4a6b8bd0110809 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 13 Dec 2014 18:36:50 -0500 Subject: [PATCH 4486/8469] Restore iterating over Version objects for compat with buildout --- pkg_resources.py | 71 +++++++++++++++++++++++++++++- setuptools/tests/test_resources.py | 19 ++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index a3eef28f88..e1109608b1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -79,8 +79,75 @@ import setuptools._vendor.packaging.specifiers packaging = setuptools._vendor.packaging -# For compatibility, expose packaging.version.parse as parse_version -parse_version = packaging.version.parse + +class _SetuptoolsVersionMixin(object): + def __iter__(self): + component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) + replace = { + 'pre': 'c', + 'preview': 'c', + '-': 'final-', + 'rc': 'c', + 'dev': '@', + }.get + + def _parse_version_parts(s): + for part in component_re.split(s): + part = replace(part, part) + if not part or part == '.': + continue + if part[:1] in '0123456789': + # pad for numeric comparison + yield part.zfill(8) + else: + yield '*'+part + + # ensure that alpha/beta/candidate are before final + yield '*final' + + def old_parse_version(s): + parts = [] + for part in _parse_version_parts(s.lower()): + if part.startswith('*'): + # remove '-' before a prerelease tag + if part < '*final': + while parts and parts[-1] == '*final-': + parts.pop() + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == '00000000': + parts.pop() + parts.append(part) + return tuple(parts) + + # Warn for use of this function + warnings.warn( + "You have iterated over the result of " + "pkg_resources.parse_version. This is a legacy behavior which is " + "inconsistent with the new version class introduced in setuptools " + "8.0. That class should be used directly instead of attempting to " + "iterate over the result.", + RuntimeWarning, + stacklevel=1, + ) + + for part in old_parse_version(str(self)): + yield part + + +class SetuptoolsVersion(_SetuptoolsVersionMixin, packaging.version.Version): + pass + + +class SetuptoolsLegacyVersion(_SetuptoolsVersionMixin, + packaging.version.LegacyVersion): + pass + + +def parse_version(v): + try: + return SetuptoolsVersion(v) + except packaging.version.InvalidVersion: + return SetuptoolsLegacyVersion(v) _state_vars = {} diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 356e1ed4e6..23872e5d25 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -488,6 +488,25 @@ def c(s1,s2): for v2 in torture[p+1:]: c(v2,v1) + def testVersionBuildout(self): + """ + Buildout has a function in it's bootstrap.py that inspected the return + value of parse_version. The new parse_version returns a Version class + which needs to support this behavior, at least for now. + """ + def buildout(parsed_version): + _final_parts = '*final-', '*final' + + def _final_version(parsed_version): + for part in parsed_version: + if (part[:1] == '*') and (part not in _final_parts): + return False + return True + return _final_version(parsed_version) + + self.assertTrue(buildout(parse_version("1.0"))) + self.assertFalse(buildout(parse_version("1.0a1"))) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From 7f4df756b83a337ffad17bfd51fe11e583c9e4e0 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 13 Dec 2014 18:36:50 -0500 Subject: [PATCH 4487/8469] Restore iterating over Version objects for compat with buildout --- pkg_resources.py | 71 +++++++++++++++++++++++++++++- setuptools/tests/test_resources.py | 19 ++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index a3eef28f88..e1109608b1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -79,8 +79,75 @@ import setuptools._vendor.packaging.specifiers packaging = setuptools._vendor.packaging -# For compatibility, expose packaging.version.parse as parse_version -parse_version = packaging.version.parse + +class _SetuptoolsVersionMixin(object): + def __iter__(self): + component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) + replace = { + 'pre': 'c', + 'preview': 'c', + '-': 'final-', + 'rc': 'c', + 'dev': '@', + }.get + + def _parse_version_parts(s): + for part in component_re.split(s): + part = replace(part, part) + if not part or part == '.': + continue + if part[:1] in '0123456789': + # pad for numeric comparison + yield part.zfill(8) + else: + yield '*'+part + + # ensure that alpha/beta/candidate are before final + yield '*final' + + def old_parse_version(s): + parts = [] + for part in _parse_version_parts(s.lower()): + if part.startswith('*'): + # remove '-' before a prerelease tag + if part < '*final': + while parts and parts[-1] == '*final-': + parts.pop() + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == '00000000': + parts.pop() + parts.append(part) + return tuple(parts) + + # Warn for use of this function + warnings.warn( + "You have iterated over the result of " + "pkg_resources.parse_version. This is a legacy behavior which is " + "inconsistent with the new version class introduced in setuptools " + "8.0. That class should be used directly instead of attempting to " + "iterate over the result.", + RuntimeWarning, + stacklevel=1, + ) + + for part in old_parse_version(str(self)): + yield part + + +class SetuptoolsVersion(_SetuptoolsVersionMixin, packaging.version.Version): + pass + + +class SetuptoolsLegacyVersion(_SetuptoolsVersionMixin, + packaging.version.LegacyVersion): + pass + + +def parse_version(v): + try: + return SetuptoolsVersion(v) + except packaging.version.InvalidVersion: + return SetuptoolsLegacyVersion(v) _state_vars = {} diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 356e1ed4e6..23872e5d25 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -488,6 +488,25 @@ def c(s1,s2): for v2 in torture[p+1:]: c(v2,v1) + def testVersionBuildout(self): + """ + Buildout has a function in it's bootstrap.py that inspected the return + value of parse_version. The new parse_version returns a Version class + which needs to support this behavior, at least for now. + """ + def buildout(parsed_version): + _final_parts = '*final-', '*final' + + def _final_version(parsed_version): + for part in parsed_version: + if (part[:1] == '*') and (part not in _final_parts): + return False + return True + return _final_version(parsed_version) + + self.assertTrue(buildout(parse_version("1.0"))) + self.assertFalse(buildout(parse_version("1.0a1"))) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From ce949ff5b789e35f7c1c4aa10c53ae9b5b7c4348 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 21:39:53 -0500 Subject: [PATCH 4488/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cc2423b69d..331cfd3f89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +8.0.1 +----- + +* Issue #296: Restore support for iteration over parse_version result, but + deprecated that usage with a warning. Fixes failure with buildout. + --- 8.0 --- From a2340678d25e143758e12e7d92d9a77cc8daa103 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 21:42:10 -0500 Subject: [PATCH 4489/8469] Bumped to 8.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 59cfada276..b152ac77a1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.1" +DEFAULT_VERSION = "8.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index ab31fdd340..49920925be 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.1' +__version__ = '8.0.1' From 0437c549fae2aec3ed4689525e56e81e1b15089f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 21:42:11 -0500 Subject: [PATCH 4490/8469] Added tag 8.0.1 for changeset d62bf4e407b3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8247a4dc8c..c1de9dafdb 100644 --- a/.hgtags +++ b/.hgtags @@ -162,3 +162,4 @@ bc6655b4acf205dd9f25c702955645656077398a 6.0.1 df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 +d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1 From 5bf45c863a9b88a2c62fdaaeb75538c426ab5d41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Dec 2014 21:42:38 -0500 Subject: [PATCH 4491/8469] Bumped to 8.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b152ac77a1..17f64cc6a5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.0.1" +DEFAULT_VERSION = "8.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 49920925be..94d3757bb1 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.0.1' +__version__ = '8.0.2' From 6f58c6800fcbaedd883cb56cb8197bf723f9e7ab Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sun, 14 Dec 2014 13:22:29 -0500 Subject: [PATCH 4492/8469] Add more compatability shims to SetuptoolsVersion * Enables indexing the SetuptoolsVersion objects, triggering the legacy behavior warning. * Enables comparing the SetuptoolsVersion object to a tuple, again triggering the legacy behavior warning. --- pkg_resources.py | 40 ++++++++++++++++++++++++++++++ setuptools/tests/test_resources.py | 21 ++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index e1109608b1..5df5a3e66c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -81,6 +81,46 @@ class _SetuptoolsVersionMixin(object): + + def __lt__(self, other): + if isinstance(other, tuple): + return tuple(self) < other + else: + return super(_SetuptoolsVersionMixin, self).__lt__(other) + + def __le__(self, other): + if isinstance(other, tuple): + return tuple(self) <= other + else: + return super(_SetuptoolsVersionMixin, self).__le__(other) + + def __eq__(self, other): + if isinstance(other, tuple): + return tuple(self) == other + else: + return super(_SetuptoolsVersionMixin, self).__eq__(other) + + def __ge__(self, other): + if isinstance(other, tuple): + return tuple(self) >= other + else: + return super(_SetuptoolsVersionMixin, self).__ge__(other) + + def __gt__(self, other): + if isinstance(other, tuple): + return tuple(self) > other + else: + return super(_SetuptoolsVersionMixin, self).__gt__(other) + + def __ne__(self, other): + if isinstance(other, tuple): + return tuple(self) != other + else: + return super(_SetuptoolsVersionMixin, self).__ne__(other) + + def __getitem__(self, key): + return tuple(self)[key] + def __iter__(self): component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) replace = { diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 23872e5d25..13f80aa4cb 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -507,6 +507,27 @@ def _final_version(parsed_version): self.assertTrue(buildout(parse_version("1.0"))) self.assertFalse(buildout(parse_version("1.0a1"))) + def testVersionIndexable(self): + """ + Some projects were doing things like parse_version("v")[0], so we'll + support indexing the same as we support iterating. + """ + self.assertEqual(parse_version("1.0")[0], "00000001") + + def testVersionTupleSort(self): + """ + Some projects expected to be able to sort tuples against the return + value of parse_version. So again we'll add a warning enabled shim to + make this possible. + """ + self.assertTrue(parse_version("1.0") < tuple(parse_version("2.0"))) + self.assertTrue(parse_version("1.0") <= tuple(parse_version("2.0"))) + self.assertTrue(parse_version("1.0") == tuple(parse_version("1.0"))) + self.assertTrue(parse_version("3.0") > tuple(parse_version("2.0"))) + self.assertTrue(parse_version("3.0") >= tuple(parse_version("2.0"))) + self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) + self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From e27bb7d12b73046f4805025fd2a53fc6bb3b1dfa Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sun, 14 Dec 2014 13:22:29 -0500 Subject: [PATCH 4493/8469] Add more compatability shims to SetuptoolsVersion * Enables indexing the SetuptoolsVersion objects, triggering the legacy behavior warning. * Enables comparing the SetuptoolsVersion object to a tuple, again triggering the legacy behavior warning. --- pkg_resources.py | 40 ++++++++++++++++++++++++++++++ setuptools/tests/test_resources.py | 21 ++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index e1109608b1..5df5a3e66c 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -81,6 +81,46 @@ class _SetuptoolsVersionMixin(object): + + def __lt__(self, other): + if isinstance(other, tuple): + return tuple(self) < other + else: + return super(_SetuptoolsVersionMixin, self).__lt__(other) + + def __le__(self, other): + if isinstance(other, tuple): + return tuple(self) <= other + else: + return super(_SetuptoolsVersionMixin, self).__le__(other) + + def __eq__(self, other): + if isinstance(other, tuple): + return tuple(self) == other + else: + return super(_SetuptoolsVersionMixin, self).__eq__(other) + + def __ge__(self, other): + if isinstance(other, tuple): + return tuple(self) >= other + else: + return super(_SetuptoolsVersionMixin, self).__ge__(other) + + def __gt__(self, other): + if isinstance(other, tuple): + return tuple(self) > other + else: + return super(_SetuptoolsVersionMixin, self).__gt__(other) + + def __ne__(self, other): + if isinstance(other, tuple): + return tuple(self) != other + else: + return super(_SetuptoolsVersionMixin, self).__ne__(other) + + def __getitem__(self, key): + return tuple(self)[key] + def __iter__(self): component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) replace = { diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 23872e5d25..13f80aa4cb 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -507,6 +507,27 @@ def _final_version(parsed_version): self.assertTrue(buildout(parse_version("1.0"))) self.assertFalse(buildout(parse_version("1.0a1"))) + def testVersionIndexable(self): + """ + Some projects were doing things like parse_version("v")[0], so we'll + support indexing the same as we support iterating. + """ + self.assertEqual(parse_version("1.0")[0], "00000001") + + def testVersionTupleSort(self): + """ + Some projects expected to be able to sort tuples against the return + value of parse_version. So again we'll add a warning enabled shim to + make this possible. + """ + self.assertTrue(parse_version("1.0") < tuple(parse_version("2.0"))) + self.assertTrue(parse_version("1.0") <= tuple(parse_version("2.0"))) + self.assertTrue(parse_version("1.0") == tuple(parse_version("1.0"))) + self.assertTrue(parse_version("3.0") > tuple(parse_version("2.0"))) + self.assertTrue(parse_version("3.0") >= tuple(parse_version("2.0"))) + self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) + self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From 0f8f0542eb843e0d84ab551bf2e92fd3cdd6b727 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 14 Dec 2014 17:30:06 -0500 Subject: [PATCH 4494/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 331cfd3f89..9d5955f77e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +8.0.2 +----- + +* Issue #296: Restored support for ``__getitem__`` and sort operations on + parse_version result. + ----- 8.0.1 ----- From 998168496d8f1c42760ef94d5ae6d3aa6953a4d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 14 Dec 2014 17:30:51 -0500 Subject: [PATCH 4495/8469] Added tag 8.0.2 for changeset 1c03d512e39d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c1de9dafdb..17297f5475 100644 --- a/.hgtags +++ b/.hgtags @@ -163,3 +163,4 @@ df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1 +1c03d512e39d5cfd711ae3ed7e316769f427e43b 8.0.2 From 4caa4af6ae275db9a499c27b66cc636cb9c596a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 14 Dec 2014 17:31:19 -0500 Subject: [PATCH 4496/8469] Bumped to 8.0.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 17f64cc6a5..70a9a7eeff 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.0.2" +DEFAULT_VERSION = "8.0.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 94d3757bb1..854fb2e89b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.0.2' +__version__ = '8.0.3' From c0d31b5915055be20b8593170cddb85770b9ccc9 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 15 Dec 2014 07:41:02 -0500 Subject: [PATCH 4497/8469] Define a __hash__ on the packaging.version.Version subclasses In Python 3.x a subclass will not inherent the __hash__ method from the parent classes if the subclass defines a __eq__ method. This means that without defining our own __hash__ the SetuptoolsVersion classes are unhashable. --- pkg_resources.py | 3 +++ setuptools/tests/test_resources.py | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 5df5a3e66c..4c7924b7ba 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -82,6 +82,9 @@ class _SetuptoolsVersionMixin(object): + def __hash__(self): + return super(_SetuptoolsVersionMixin, self).__hash__() + def __lt__(self, other): if isinstance(other, tuple): return tuple(self) < other diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 13f80aa4cb..1902fb2ce4 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -528,6 +528,16 @@ def testVersionTupleSort(self): self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + def testVersionHashable(self): + """ + Ensure that our versions stay hashable even though we've subclassed + them and added some shim code to them. + """ + self.assertEqual( + hash(parse_version("1.0")), + hash(parse_version("1.0")), + ) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From 7a991fd283fdf53f7320852e5c9878db6cb84349 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 15 Dec 2014 07:41:02 -0500 Subject: [PATCH 4498/8469] Define a __hash__ on the packaging.version.Version subclasses In Python 3.x a subclass will not inherent the __hash__ method from the parent classes if the subclass defines a __eq__ method. This means that without defining our own __hash__ the SetuptoolsVersion classes are unhashable. --- pkg_resources.py | 3 +++ setuptools/tests/test_resources.py | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/pkg_resources.py b/pkg_resources.py index 5df5a3e66c..4c7924b7ba 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -82,6 +82,9 @@ class _SetuptoolsVersionMixin(object): + def __hash__(self): + return super(_SetuptoolsVersionMixin, self).__hash__() + def __lt__(self, other): if isinstance(other, tuple): return tuple(self) < other diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 13f80aa4cb..1902fb2ce4 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -528,6 +528,16 @@ def testVersionTupleSort(self): self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + def testVersionHashable(self): + """ + Ensure that our versions stay hashable even though we've subclassed + them and added some shim code to them. + """ + self.assertEqual( + hash(parse_version("1.0")), + hash(parse_version("1.0")), + ) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' From 23b3e1f57c5fab2b8aee73169ddfe19a6fc46a94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 13:27:25 -0500 Subject: [PATCH 4499/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9d5955f77e..866535db67 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +----- +8.0.3 +----- + +* Issue #296: Restored support for ``__hash__`` on parse_version results. + ----- 8.0.2 ----- From 088ab27715af882ba6cbebfcd688955fe3d19f9c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 13:31:49 -0500 Subject: [PATCH 4500/8469] Added tag 8.0.3 for changeset 6c3467488123 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 17297f5475..5e57ab7fe9 100644 --- a/.hgtags +++ b/.hgtags @@ -164,3 +164,4 @@ df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1 1c03d512e39d5cfd711ae3ed7e316769f427e43b 8.0.2 +6c3467488123ce70b1dd009145a02f51fb78cdcc 8.0.3 From ee2cd1464e2073ba37be8e3003536f2602d51b13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 13:32:18 -0500 Subject: [PATCH 4501/8469] Bumped to 8.0.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 70a9a7eeff..15ceb5a5cc 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.0.3" +DEFAULT_VERSION = "8.0.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 854fb2e89b..09f50c23ba 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.0.3' +__version__ = '8.0.4' From ffffc9f34b0cf5a6c67f4e10a65e034c3bf5d468 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 15 Dec 2014 15:33:01 -0500 Subject: [PATCH 4502/8469] Upgrade packaging to 14.4 This fixes an error where there is a different result for if 2.0.5 is contained within >2.0dev and >2.0.dev even though normalization rules should have made them equal. --- setuptools/_vendor/packaging/__about__.py | 2 +- setuptools/_vendor/packaging/specifiers.py | 10 ++++++---- setuptools/_vendor/vendored.txt | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py index 481589e76a..d3e3dacf03 100644 --- a/setuptools/_vendor/packaging/__about__.py +++ b/setuptools/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "14.3" +__version__ = "14.4" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py index bea4a39820..8022578621 100644 --- a/setuptools/_vendor/packaging/specifiers.py +++ b/setuptools/_vendor/packaging/specifiers.py @@ -461,16 +461,18 @@ def _compare_less_than(self, prospective, spec): # Less than are defined as exclusive operators, this implies that # pre-releases do not match for the same series as the spec. This is # implemented by making V imply !=V.*. - return (prospective > Version(spec) - and self._get_operator("!=")(prospective, spec + ".*")) + spec = Version(spec) + return (prospective > spec + and self._get_operator("!=")(prospective, str(spec) + ".*")) def _compare_arbitrary(self, prospective, spec): return str(prospective).lower() == str(spec).lower() diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index b86bba005c..576aa8db0e 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1 +1 @@ -packaging==14.3 +packaging==14.4 From f8b6c86a3121b2c2b68b2edc97b545d4567601d6 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 15 Dec 2014 15:33:01 -0500 Subject: [PATCH 4503/8469] Upgrade packaging to 14.4 This fixes an error where there is a different result for if 2.0.5 is contained within >2.0dev and >2.0.dev even though normalization rules should have made them equal. --- setuptools/_vendor/packaging/__about__.py | 2 +- setuptools/_vendor/packaging/specifiers.py | 10 ++++++---- setuptools/_vendor/vendored.txt | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py index 481589e76a..d3e3dacf03 100644 --- a/setuptools/_vendor/packaging/__about__.py +++ b/setuptools/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "14.3" +__version__ = "14.4" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py index bea4a39820..8022578621 100644 --- a/setuptools/_vendor/packaging/specifiers.py +++ b/setuptools/_vendor/packaging/specifiers.py @@ -461,16 +461,18 @@ def _compare_less_than(self, prospective, spec): # Less than are defined as exclusive operators, this implies that # pre-releases do not match for the same series as the spec. This is # implemented by making V imply !=V.*. - return (prospective > Version(spec) - and self._get_operator("!=")(prospective, spec + ".*")) + spec = Version(spec) + return (prospective > spec + and self._get_operator("!=")(prospective, str(spec) + ".*")) def _compare_arbitrary(self, prospective, spec): return str(prospective).lower() == str(spec).lower() diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index b86bba005c..576aa8db0e 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1 +1 @@ -packaging==14.3 +packaging==14.4 From 8ec591737ea9997dd0adecd52958bdf601c6aa0f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 15:42:57 -0500 Subject: [PATCH 4504/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 866535db67..ab8b703d0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +----- +8.0.4 +----- + +* Upgrade ``packaging`` to 14.4, fixing an error where there is a + different result for if 2.0.5 is contained within >2.0dev and >2.0.dev even + though normalization rules should have made them equal. +* Issue #296: Add warning when a version is parsed as legacy. This warning will + make it easier for developers to recognize deprecated version numbers. + ----- 8.0.3 ----- From d83eb30a8237d635a819c98f061407a609eab8a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 15:43:26 -0500 Subject: [PATCH 4505/8469] Added tag 8.0.4 for changeset 2c467afffe9f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5e57ab7fe9..fe834e483c 100644 --- a/.hgtags +++ b/.hgtags @@ -165,3 +165,4 @@ df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1 1c03d512e39d5cfd711ae3ed7e316769f427e43b 8.0.2 6c3467488123ce70b1dd009145a02f51fb78cdcc 8.0.3 +2c467afffe9fe1e14618b576fac6b4f7c412a61e 8.0.4 From 4b4d420dac162a07f0ae57d88d563e4e41b290ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 15:43:52 -0500 Subject: [PATCH 4506/8469] Bumped to 8.0.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 15ceb5a5cc..6c77135b17 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "8.0.4" +DEFAULT_VERSION = "8.0.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 09f50c23ba..d9d3601000 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '8.0.4' +__version__ = '8.0.5' From 4bf1bfade0e23f74667989932f3c80c1252a64ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Dec 2014 15:49:29 -0500 Subject: [PATCH 4507/8469] Correct syntax error in docs. --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 651e6be808..558d6ee76c 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -45,7 +45,7 @@ ticket already exists for your issue. If not, create one. Try to think from the perspective of the reader. Explain what behavior you expected, what you got instead, and what factors might have contributed to the unexpected behavior. In Bitbucket, surround a block of code or traceback with the triple -backtick "```" so that it is formatted nicely. +backtick "\`\`\`" so that it is formatted nicely. Filing a ticket provides a forum for justification, discussion, and clarification. The ticket provides a record of the purpose for the change and From e25c444f65824e882fbb6493578ee1db836721bd Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 15 Dec 2014 15:03:44 -0800 Subject: [PATCH 4508/8469] Removes bdist_wininst dependency on MFC. --- command/wininst-14.0-amd64.exe | Bin 84480 -> 84480 bytes command/wininst-14.0.exe | Bin 75264 -> 75264 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-14.0-amd64.exe b/command/wininst-14.0-amd64.exe index 9affe13039517798970f5e3a8d9f4d1d13e79464..43b85b6d4f2dd93f4b77c4b904276293ff667054 100644 GIT binary patch delta 111 zcmZpe!rCx}bpr<@^QQFv&D@Nfv*m$|5C$M%0^%?rKB3OYaDtZ+B*XwxWIShPpQf E0SG@DrT_o{ diff --git a/command/wininst-14.0.exe b/command/wininst-14.0.exe index 3ce71b9f1b49afc4e6eb8a60ef551e7ced3e04b6..764524d746b35fe28228e41e8b75a6ed665d9228 100644 GIT binary patch delta 159 zcmZoT!_shuWdjEz^YXO*&D@MH8|8tF5C$M%0^$H5-onJlu;mj-gn Date: Mon, 15 Dec 2014 20:45:23 -0800 Subject: [PATCH 4509/8469] Fixes distutils adding/expecting too many _d suffixes. --- command/build_ext.py | 3 --- tests/test_install.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 605efbd68f..c5a3ce1915 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -691,10 +691,7 @@ def get_ext_filename(self, ext_name): """ from distutils.sysconfig import get_config_var ext_path = ext_name.split('.') - # extensions in debug_mode are named 'module_d.pyd' under windows ext_suffix = get_config_var('EXT_SUFFIX') - if os.name == 'nt' and self.debug: - return os.path.join(*ext_path) + '_d' + ext_suffix return os.path.join(*ext_path) + ext_suffix def get_export_symbols(self, ext): diff --git a/tests/test_install.py b/tests/test_install.py index 18e1e57505..9313330e2b 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -20,8 +20,6 @@ def _make_ext_name(modname): - if os.name == 'nt' and sys.executable.endswith('_d.exe'): - modname += '_d' return modname + sysconfig.get_config_var('EXT_SUFFIX') From 6d98caab2c4103cba53e6c601fc127990298ab56 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 17 Dec 2014 20:49:13 -0500 Subject: [PATCH 4510/8469] Don't warn on empty non PEP 440 versions Empty versions which are not PEP 440 are more likely to be the fault of setuptools internals rather than anything a user has done so these warnings are needless spam in that situation. --- pkg_resources.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 5af4c86945..f3ac6c5072 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2415,15 +2415,23 @@ def parsed_version(self): self._parsed_version = parse_version(self.version) if isinstance( self._parsed_version, packaging.version.LegacyVersion): - warnings.warn( - "'%s (%s)' is being parsed as a legacy, non PEP 440, " - "version. You may find odd behavior and sort order. In " - "particular it will be sorted as less than 0.0. It is " - "recommend to migrate to PEP 440 compatible versions." % ( - self.project_name, self.version, - ), - RuntimeWarning, - ) + # While an empty version is techincally a legacy version and + # is not a valid PEP 440 version, it's also unlikely to + # actually come from someone and instead it is more likely that + # it comes from setuptools attempting to parse a filename and + # including it in the list. So for that we'll gate this warning + # on if the version is anything at all or not. + if self.version: + warnings.warn( + "'%s (%s)' is being parsed as a legacy, non PEP 440, " + "version. You may find odd behavior and sort order. " + "In particular it will be sorted as less than 0.0. It " + "is recommend to migrate to PEP 440 compatible " + "versions." % ( + self.project_name, self.version, + ), + RuntimeWarning, + ) return self._parsed_version From ae712b5b623c9541f09816d8926f474d503fec2d Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 17 Dec 2014 21:37:45 -0500 Subject: [PATCH 4511/8469] Upgrade packaging to 14.5 * Normalizes release candidates to 1.0rc1 instead of 1.0c1 --- setuptools/_vendor/packaging/__about__.py | 2 +- setuptools/_vendor/packaging/version.py | 74 +++++++++++------------ setuptools/_vendor/vendored.txt | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py index d3e3dacf03..d3e50f1e17 100644 --- a/setuptools/_vendor/packaging/__about__.py +++ b/setuptools/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "14.4" +__version__ = "14.5" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py index e76e960724..8d779a48d7 100644 --- a/setuptools/_vendor/packaging/version.py +++ b/setuptools/_vendor/packaging/version.py @@ -21,7 +21,7 @@ __all__ = [ - "parse", "Version", "LegacyVersion", "InvalidVersion", + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" ] @@ -156,44 +156,44 @@ def _legacy_cmpkey(version): return epoch, parts +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                              # pre-release
    +            [-_\.]?
    +            (?P(a|b|c|rc|alpha|beta|pre|preview))
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +        (?P                                         # post release
    +            (?:-(?P[0-9]+))
    +            |
    +            (?:
    +                [-_\.]?
    +                (?Ppost|rev|r)
    +                [-_\.]?
    +                (?P[0-9]+)?
    +            )
    +        )?
    +        (?P                                          # dev release
    +            [-_\.]?
    +            (?Pdev)
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +    )
    +    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    +"""
    +
     
     class Version(_BaseVersion):
     
         _regex = re.compile(
    -        r"""
    -        ^
    -        \s*
    -        v?
    -        (?:
    -            (?:(?P[0-9]+)!)?                           # epoch
    -            (?P[0-9]+(?:\.[0-9]+)*)                  # release segment
    -            (?P
                                              # pre-release
    -                [-_\.]?
    -                (?P(a|b|c|rc|alpha|beta|pre|preview))
    -                [-_\.]?
    -                (?P[0-9]+)?
    -            )?
    -            (?P                                         # post release
    -                (?:-(?P[0-9]+))
    -                |
    -                (?:
    -                    [-_\.]?
    -                    (?Ppost|rev|r)
    -                    [-_\.]?
    -                    (?P[0-9]+)?
    -                )
    -            )?
    -            (?P                                          # dev release
    -                [-_\.]?
    -                (?Pdev)
    -                [-_\.]?
    -                (?P[0-9]+)?
    -            )?
    -        )
    -        (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    -        \s*
    -        $
    -        """,
    +        r"^\s*" + VERSION_PATTERN + r"\s*$",
             re.VERBOSE | re.IGNORECASE,
         )
     
    @@ -297,8 +297,8 @@ def _parse_letter_version(letter, number):
                 letter = "a"
             elif letter == "beta":
                 letter = "b"
    -        elif letter in ["rc", "pre", "preview"]:
    -            letter = "c"
    +        elif letter in ["c", "pre", "preview"]:
    +            letter = "rc"
     
             return letter, int(number)
         if not letter and number:
    diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt
    index 576aa8db0e..723e026b61 100644
    --- a/setuptools/_vendor/vendored.txt
    +++ b/setuptools/_vendor/vendored.txt
    @@ -1 +1 @@
    -packaging==14.4
    +packaging==14.5
    
    From 20eb01f0cac85e0f6a280a8127a872572a53ec9b Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Wed, 17 Dec 2014 20:52:37 -0500
    Subject: [PATCH 4512/8469] Add a PEP440Warning to make it easier to silence
     these warnings
    
    ---
     pkg_resources.py | 12 +++++++++++-
     1 file changed, 11 insertions(+), 1 deletion(-)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index f3ac6c5072..87fd278209 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -80,6 +80,13 @@
     packaging = setuptools._vendor.packaging
     
     
    +class PEP440Warning(RuntimeWarning):
    +    """
    +    Used when there is an issue with a version or specifier not complying with
    +    PEP 440.
    +    """
    +
    +
     class _SetuptoolsVersionMixin(object):
     
         def __hash__(self):
    @@ -272,6 +279,9 @@ def get_supported_platform():
         'ResolutionError', 'VersionConflict', 'DistributionNotFound',
         'UnknownExtra', 'ExtractionError',
     
    +    # Warnings
    +    'PEP440Warning',
    +
         # Parsing functions and string utilities
         'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
         'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
    @@ -2430,7 +2440,7 @@ def parsed_version(self):
                             "versions." % (
                                 self.project_name, self.version,
                             ),
    -                        RuntimeWarning,
    +                        PEP440Warning,
                         )
     
             return self._parsed_version
    
    From 4b6dba7625e98aa92cf2d1491379f82d51b46756 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 08:37:56 -0500
    Subject: [PATCH 4513/8469] Update changelog
    
    ---
     CHANGES.txt | 10 ++++++++++
     1 file changed, 10 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index ab8b703d0b..9b27f3eae1 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,16 @@
     CHANGES
     =======
     
    +---
    +8.1
    +---
    +
    +* Upgrade ``packaging`` to 14.5, giving preference to "rc" as designator for
    +  release candidates over "c".
    +* PEP-440 warnings are now raised as their own class,
    +  ``pkg_resources.PEP440Warning``, instead of RuntimeWarning.
    +* Disabled warnings on empty versions.
    +
     -----
     8.0.4
     -----
    
    From 9b3f3650b5619c89ded823dc84edb0cbad713bc6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 08:39:00 -0500
    Subject: [PATCH 4514/8469] Bumped to 8.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 6c77135b17..59cfada276 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.0.5"
    +DEFAULT_VERSION = "8.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index d9d3601000..ab31fdd340 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.0.5'
    +__version__ = '8.1'
    
    From 9069f7532d3d732ae5b4b5614ba524a20b075fa2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 08:39:30 -0500
    Subject: [PATCH 4515/8469] Added tag 8.1 for changeset 3f87370b6863
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index fe834e483c..4ef0cc3d79 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -166,3 +166,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     1c03d512e39d5cfd711ae3ed7e316769f427e43b 8.0.2
     6c3467488123ce70b1dd009145a02f51fb78cdcc 8.0.3
     2c467afffe9fe1e14618b576fac6b4f7c412a61e 8.0.4
    +3f87370b6863e5a4e831b394ef1a58e0e97a4336 8.1
    
    From 123ac3c8a389d3b9168abbb901c6507282b27dc2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 08:40:04 -0500
    Subject: [PATCH 4516/8469] Bumped to 8.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 59cfada276..969a073a77 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.1"
    +DEFAULT_VERSION = "8.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index ab31fdd340..ad8076bac1 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.1'
    +__version__ = '8.2'
    
    From db8bc5a383ea9913c0f297aff53b0f90cc98ced1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 09:07:20 -0500
    Subject: [PATCH 4517/8469] Added tag 8.2 for changeset 995f6d965131
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index c0ace198cd..8cb9c94004 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -168,3 +168,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     6c3467488123ce70b1dd009145a02f51fb78cdcc 8.0.3
     2c467afffe9fe1e14618b576fac6b4f7c412a61e 8.0.4
     3f87370b6863e5a4e831b394ef1a58e0e97a4336 8.1
    +995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2
    
    From 57e7ab8ebab9981efed9936ca11c939e34d52eec Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 09:07:53 -0500
    Subject: [PATCH 4518/8469] Bumped to 8.3 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 969a073a77..e22ab67449 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.2"
    +DEFAULT_VERSION = "8.3"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index ad8076bac1..de8c596a80 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.2'
    +__version__ = '8.3'
    
    From 5df137548ceab35e51a53f12664df130bc8f2a5f Mon Sep 17 00:00:00 2001
    From: Donald Stufft 
    Date: Thu, 18 Dec 2014 12:29:36 -0500
    Subject: [PATCH 4519/8469] Silence PEP440Warning by default unless invoking
     easy_install
    
    ---
     pkg_resources.py                   | 7 +++++++
     setuptools/command/easy_install.py | 5 +++++
     2 files changed, 12 insertions(+)
    
    diff --git a/pkg_resources.py b/pkg_resources.py
    index 87fd278209..3a8edca527 100644
    --- a/pkg_resources.py
    +++ b/pkg_resources.py
    @@ -2932,6 +2932,13 @@ def _mkstemp(*args,**kw):
             os.open = old_open
     
     
    +# Silence the PEP440Warning by default, so that end users don't get hit by it
    +# randomly just because they use pkg_resources. We want to append the rule
    +# because we want earlier uses of filterwarnings to take precedence over this
    +# one.
    +warnings.filterwarnings("ignore", category=PEP440Warning, append=True)
    +
    +
     # Set up global resource manager (deliberately not state-saved)
     _manager = ResourceManager()
     def _initialize(g):
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index 2e00b99630..a71a7f363a 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -54,9 +54,14 @@
     import pkg_resources
     
     
    +# Turn on PEP440Warnings
    +warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
    +
    +
     sys_executable = os.environ.get('__PYVENV_LAUNCHER__',
                                     os.path.normpath(sys.executable))
     
    +
     __all__ = [
         'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
         'main', 'get_exe_prefixes',
    
    From ca30fc307416f7a73e927ca709e8426792bdc71c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 20:38:46 -0500
    Subject: [PATCH 4520/8469] Update changelog; fixes #306.
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 3621ed77bb..9d9b4d5237 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +-----
    +8.2.1
    +-----
    +
    +* Issue #306: Suppress warnings about Version format except in select scenarios
    +  (such as installation).
    +
     ---
     8.2
     ---
    
    From ebb23247208e56ba422e7b80b4da813a8809ba02 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 20:53:46 -0500
    Subject: [PATCH 4521/8469] Bumped to 8.2.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index e22ab67449..a3e13059e1 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.3"
    +DEFAULT_VERSION = "8.2.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index de8c596a80..7b2b8ec7c5 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.3'
    +__version__ = '8.2.1'
    
    From d223ac7b55810245029f1af9cc06b1af0c6c7c51 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 20:53:48 -0500
    Subject: [PATCH 4522/8469] Added tag 8.2.1 for changeset efbe39dae0ab
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 8cb9c94004..e3f5e6a8a2 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -169,3 +169,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     2c467afffe9fe1e14618b576fac6b4f7c412a61e 8.0.4
     3f87370b6863e5a4e831b394ef1a58e0e97a4336 8.1
     995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2
    +efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
    
    From 42ef8cbbb3e08a89e3513bfa16b61541df1d11fa Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 18 Dec 2014 20:54:27 -0500
    Subject: [PATCH 4523/8469] Bumped to 8.2.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index a3e13059e1..65337f67a0 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.2.1"
    +DEFAULT_VERSION = "8.2.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 7b2b8ec7c5..5adfd0a393 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.2.1'
    +__version__ = '8.2.2'
    
    From 8bedbb5ee574b2f005dd5f066638cb79dc90f0eb Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 09:27:21 -0500
    Subject: [PATCH 4524/8469] Use hasattr per recommendation in docs for dl.
    
    ---
     setuptools/command/build_ext.py | 6 ++----
     1 file changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 53bf9cd3ed..684200ad0d 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -33,10 +33,8 @@
         use_stubs = True
     elif os.name != 'nt':
         try:
    -        from dl import RTLD_NOW
    -
    -        have_rtld = True
    -        use_stubs = True
    +        import dl
    +        use_stubs = have_rtld = hasattr(dl, 'RTLD_NOW')
         except ImportError:
             pass
     
    
    From 3b434b5bd5a1e5e04461302850d0e2248cc828b1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 09:59:01 -0500
    Subject: [PATCH 4525/8469] Define if_dl using simple lambda.
    
    ---
     setuptools/command/build_ext.py | 5 +----
     1 file changed, 1 insertion(+), 4 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 684200ad0d..b30e6192e8 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -39,10 +39,7 @@
             pass
     
     
    -def if_dl(s):
    -    if have_rtld:
    -        return s
    -    return ''
    +if_dl = lambda s: s if have_rtld else ''
     
     
     class build_ext(_build_ext):
    
    From 956dce0ba58ab95298b872155543259467054557 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:01:15 -0500
    Subject: [PATCH 4526/8469] Extract variables for clarity and simpler
     indentation.
    
    ---
     setuptools/command/build_ext.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index b30e6192e8..be5e974cad 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -118,10 +118,10 @@ def finalize_options(self):
                 # XXX what to do with conflicts?
                 self.ext_map[fullname.split('.')[-1]] = ext
     
    -            ltd = ext._links_to_dynamic = \
    -                self.shlibs and self.links_to_dynamic(ext) or False
    -            ext._needs_stub = ltd and use_stubs and not isinstance(ext,
    -                                                                   Library)
    +            ltd = self.shlibs and self.links_to_dynamic(ext) or False
    +            ns = ltd and use_stubs and not isinstance(ext, Library)
    +            ext._links_to_dynamic = ltd
    +            ext._needs_stub = ns
                 filename = ext._file_name = self.get_ext_filename(fullname)
                 libdir = os.path.dirname(os.path.join(self.build_lib, filename))
                 if ltd and libdir not in ext.library_dirs:
    
    From 8f8ff1d8c42f1aeb371134abd9a96e3f876e09be Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:02:30 -0500
    Subject: [PATCH 4527/8469] Extract variable for simplicity of indentation.
    
    ---
     setuptools/command/build_ext.py | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index be5e974cad..b6eb89eb34 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -181,9 +181,8 @@ def build_extension(self, ext):
                     self.compiler = self.shlib_compiler
                 _build_ext.build_extension(self, ext)
                 if ext._needs_stub:
    -                self.write_stub(
    -                    self.get_finalized_command('build_py').build_lib, ext
    -                )
    +                cmd = self.get_finalized_command('build_py').build_lib
    +                self.write_stub(cmd, ext)
             finally:
                 self.compiler = _compiler
     
    
    From d9de5582d21b62794bbdb39c0da11d711889c442 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:04:35 -0500
    Subject: [PATCH 4528/8469] Rewrite short-circuit for/if/else loop as any on
     generator expression.
    
    ---
     setuptools/command/build_ext.py | 5 +----
     1 file changed, 1 insertion(+), 4 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index b6eb89eb34..dae9c81e36 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -193,10 +193,7 @@ def links_to_dynamic(self, ext):
             # XXX static-compiled version
             libnames = dict.fromkeys([lib._full_name for lib in self.shlibs])
             pkg = '.'.join(ext._full_name.split('.')[:-1] + [''])
    -        for libname in ext.libraries:
    -            if pkg + libname in libnames:
    -                return True
    -        return False
    +        return any(pkg + libname in libnames for libname in ext.libraries)
     
         def get_outputs(self):
             outputs = _build_ext.get_outputs(self)
    
    From 7fe63f7e3e848af843baa909930c1a61dcc2fbdd Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:06:35 -0500
    Subject: [PATCH 4529/8469] Extract filtering of extensions that need stubs.
    
    ---
     setuptools/command/build_ext.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index dae9c81e36..5327a03021 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -198,8 +198,8 @@ def links_to_dynamic(self, ext):
         def get_outputs(self):
             outputs = _build_ext.get_outputs(self)
             optimize = self.get_finalized_command('build_py').optimize
    -        for ext in self.extensions:
    -            if ext._needs_stub:
    +        ns_ext = (ext for ext in self.extensions if ext._needs_stub)
    +        for ext in ns_ext:
                     base = os.path.join(self.build_lib, *ext._full_name.split('.'))
                     outputs.append(base + '.py')
                     outputs.append(base + '.pyc')
    
    From 0b538cb95cbaf496897fcffb3c67a217d56f2511 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:06:44 -0500
    Subject: [PATCH 4530/8469] Reindent
    
    ---
     setuptools/command/build_ext.py | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 5327a03021..414ad1664a 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -200,11 +200,11 @@ def get_outputs(self):
             optimize = self.get_finalized_command('build_py').optimize
             ns_ext = (ext for ext in self.extensions if ext._needs_stub)
             for ext in ns_ext:
    -                base = os.path.join(self.build_lib, *ext._full_name.split('.'))
    -                outputs.append(base + '.py')
    -                outputs.append(base + '.pyc')
    -                if optimize:
    -                    outputs.append(base + '.pyo')
    +            base = os.path.join(self.build_lib, *ext._full_name.split('.'))
    +            outputs.append(base + '.py')
    +            outputs.append(base + '.pyc')
    +            if optimize:
    +                outputs.append(base + '.pyo')
             return outputs
     
         def write_stub(self, output_dir, ext, compile=False):
    
    From 2050af11f662a28f9c2c834552c195d90a5ac73e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:11:47 -0500
    Subject: [PATCH 4531/8469] Rewrite function to use extend and a generator
     expression.
    
    ---
     setuptools/command/build_ext.py | 9 ++++-----
     1 file changed, 4 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 414ad1664a..b5c2738cb3 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -197,14 +197,13 @@ def links_to_dynamic(self, ext):
     
         def get_outputs(self):
             outputs = _build_ext.get_outputs(self)
    -        optimize = self.get_finalized_command('build_py').optimize
    +        fn_exts = ['.py', '.pyc']
    +        if self.get_finalized_command('build_py').optimize:
    +            fn_exts.append('.pyo')
             ns_ext = (ext for ext in self.extensions if ext._needs_stub)
             for ext in ns_ext:
                 base = os.path.join(self.build_lib, *ext._full_name.split('.'))
    -            outputs.append(base + '.py')
    -            outputs.append(base + '.pyc')
    -            if optimize:
    -                outputs.append(base + '.pyo')
    +            outputs.extend(base + fnext for fnext in fn_exts)
             return outputs
     
         def write_stub(self, output_dir, ext, compile=False):
    
    From b19c06058c720418db8a4496410cb82cc3526d54 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:16:45 -0500
    Subject: [PATCH 4532/8469] Extract method for clarity.
    
    ---
     setuptools/command/build_ext.py | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index b5c2738cb3..c85351b4a8 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -196,7 +196,10 @@ def links_to_dynamic(self, ext):
             return any(pkg + libname in libnames for libname in ext.libraries)
     
         def get_outputs(self):
    -        outputs = _build_ext.get_outputs(self)
    +        return _build_ext.get_outputs(self) + self.__get_stubs_outputs()
    +
    +    def __get_stubs_outputs(self):
    +        outputs = []
             fn_exts = ['.py', '.pyc']
             if self.get_finalized_command('build_py').optimize:
                 fn_exts.append('.pyo')
    
    From 2b880cc89d0ce6845c4bdd072ac518a7ed9baa08 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:20:49 -0500
    Subject: [PATCH 4533/8469] Use itertools.product to pair each base with each
     extension.
    
    ---
     setuptools/command/build_ext.py | 12 +++++++-----
     1 file changed, 7 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index c85351b4a8..2651beae59 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -6,6 +6,7 @@
     from distutils import log
     import os
     import sys
    +import itertools
     
     from setuptools.extension import Library
     
    @@ -199,15 +200,16 @@ def get_outputs(self):
             return _build_ext.get_outputs(self) + self.__get_stubs_outputs()
     
         def __get_stubs_outputs(self):
    -        outputs = []
             fn_exts = ['.py', '.pyc']
             if self.get_finalized_command('build_py').optimize:
                 fn_exts.append('.pyo')
             ns_ext = (ext for ext in self.extensions if ext._needs_stub)
    -        for ext in ns_ext:
    -            base = os.path.join(self.build_lib, *ext._full_name.split('.'))
    -            outputs.extend(base + fnext for fnext in fn_exts)
    -        return outputs
    +        ns_ext_bases = (
    +            os.path.join(self.build_lib, *ext._full_name.split('.'))
    +            for ext in ns_ext
    +        )
    +        pairs = itertools.product(ns_ext_bases, fn_exts)
    +        return (base + fnext for base, fnext in pairs)
     
         def write_stub(self, output_dir, ext, compile=False):
             log.info("writing stub loader for %s to %s", ext._full_name,
    
    From 3ade3c11402c161a623e54502472fdd6cc7bd0dc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:21:19 -0500
    Subject: [PATCH 4534/8469] Collapse two generator expressions.
    
    ---
     setuptools/command/build_ext.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 2651beae59..7815522371 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -203,10 +203,10 @@ def __get_stubs_outputs(self):
             fn_exts = ['.py', '.pyc']
             if self.get_finalized_command('build_py').optimize:
                 fn_exts.append('.pyo')
    -        ns_ext = (ext for ext in self.extensions if ext._needs_stub)
             ns_ext_bases = (
                 os.path.join(self.build_lib, *ext._full_name.split('.'))
    -            for ext in ns_ext
    +            for ext in self.extensions
    +            if ext._needs_stub
             )
             pairs = itertools.product(ns_ext_bases, fn_exts)
             return (base + fnext for base, fnext in pairs)
    
    From df765dcb6204366f4662004217997af35590fb9b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:24:46 -0500
    Subject: [PATCH 4535/8469] Extract logic for getting the extensions for
     outputs.
    
    ---
     setuptools/command/build_ext.py | 11 +++++++----
     1 file changed, 7 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 7815522371..2df3bc708b 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -200,17 +200,20 @@ def get_outputs(self):
             return _build_ext.get_outputs(self) + self.__get_stubs_outputs()
     
         def __get_stubs_outputs(self):
    -        fn_exts = ['.py', '.pyc']
    -        if self.get_finalized_command('build_py').optimize:
    -            fn_exts.append('.pyo')
             ns_ext_bases = (
                 os.path.join(self.build_lib, *ext._full_name.split('.'))
                 for ext in self.extensions
                 if ext._needs_stub
             )
    -        pairs = itertools.product(ns_ext_bases, fn_exts)
    +        pairs = itertools.product(ns_ext_bases, self.__get_output_extensions())
             return (base + fnext for base, fnext in pairs)
     
    +    def __get_output_extensions(self):
    +        yield '.py'
    +        yield '.pyc'
    +        if self.get_finalized_command('build_py').optimize:
    +            yield '.pyo'
    +
         def write_stub(self, output_dir, ext, compile=False):
             log.info("writing stub loader for %s to %s", ext._full_name,
                      output_dir)
    
    From 82390398562436f2928083066d8b1d2e786643fc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:28:35 -0500
    Subject: [PATCH 4536/8469] Add comments for clarity.
    
    ---
     setuptools/command/build_ext.py | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index 2df3bc708b..f0913115bb 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -200,11 +200,13 @@ def get_outputs(self):
             return _build_ext.get_outputs(self) + self.__get_stubs_outputs()
     
         def __get_stubs_outputs(self):
    +        # assemble the base name for each extension that needs a stub
             ns_ext_bases = (
                 os.path.join(self.build_lib, *ext._full_name.split('.'))
                 for ext in self.extensions
                 if ext._needs_stub
             )
    +        # pair each base with the extension
             pairs = itertools.product(ns_ext_bases, self.__get_output_extensions())
             return (base + fnext for base, fnext in pairs)
     
    
    From 7bcbb5cbc893e97109c15cba3ea561aa0d462148 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 23 Dec 2014 10:29:02 -0500
    Subject: [PATCH 4537/8469] Force list type for easy concatenation.
    
    ---
     setuptools/command/build_ext.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
    index f0913115bb..e4b2c593f3 100644
    --- a/setuptools/command/build_ext.py
    +++ b/setuptools/command/build_ext.py
    @@ -208,7 +208,7 @@ def __get_stubs_outputs(self):
             )
             # pair each base with the extension
             pairs = itertools.product(ns_ext_bases, self.__get_output_extensions())
    -        return (base + fnext for base, fnext in pairs)
    +        return list(base + fnext for base, fnext in pairs)
     
         def __get_output_extensions(self):
             yield '.py'
    
    From 9b13614de9c0728a3951f3be2e98b5d09e4314f2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 16:45:17 -0500
    Subject: [PATCH 4538/8469] Add test making explicit the expectation that
     pkg_resources shouldn't import setuptools (or be dependent on it in any way).
     Ref #311.
    
    ---
     tests/test_pkg_resources.py | 20 ++++++++++++++++++++
     1 file changed, 20 insertions(+)
    
    diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py
    index 11edfe851a..564d7cec4f 100644
    --- a/tests/test_pkg_resources.py
    +++ b/tests/test_pkg_resources.py
    @@ -4,6 +4,7 @@
     import zipfile
     import datetime
     import time
    +import subprocess
     
     import pkg_resources
     
    @@ -89,3 +90,22 @@ def test_get_cache_path(self):
             type_ = str(type(path))
             message = "Unexpected type from get_cache_path: " + type_
             assert isinstance(path, (unicode, str)), message
    +
    +
    +class TestIndependence:
    +    """
    +    Tests to ensure that pkg_resources runs independently from setuptools.
    +    """
    +    def test_setuptools_not_imported(self):
    +        """
    +        In a separate Python environment, import pkg_resources and assert
    +        that action doesn't cause setuptools to be imported.
    +        """
    +        lines = (
    +            'import pkg_resources',
    +            'import sys',
    +            'assert "setuptools" not in sys.modules, '
    +                '"setuptools was imported"',
    +        )
    +        cmd = [sys.executable, '-c', '; '.join(lines)]
    +        subprocess.check_call(cmd)
    
    From 79a0c55d8c09d3fdd68157faa8658ecd85aa5d45 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 16:51:28 -0500
    Subject: [PATCH 4539/8469] Moved pkg_resources into its own package.
    
    ---
     MANIFEST.in                                   | 1 +
     pkg_resources.py => pkg_resources/__init__.py | 0
     setup.py                                      | 2 +-
     3 files changed, 2 insertions(+), 1 deletion(-)
     rename pkg_resources.py => pkg_resources/__init__.py (100%)
    
    diff --git a/MANIFEST.in b/MANIFEST.in
    index 2c587d40f9..8916394a17 100644
    --- a/MANIFEST.in
    +++ b/MANIFEST.in
    @@ -4,6 +4,7 @@ recursive-include setuptools/tests *.html entries*
     recursive-include setuptools/tests/svn_data *.zip
     recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
     recursive-include _markerlib *.py
    +recursive-include pkg_resources *.py
     include *.py
     include *.txt
     include MANIFEST.in
    diff --git a/pkg_resources.py b/pkg_resources/__init__.py
    similarity index 100%
    rename from pkg_resources.py
    rename to pkg_resources/__init__.py
    diff --git a/setup.py b/setup.py
    index bac4e29dbf..ff519e3e44 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -128,7 +128,7 @@ def _save_entry_points(self):
         packages=setuptools.find_packages(),
         package_data=package_data,
     
    -    py_modules=['pkg_resources', 'easy_install'],
    +    py_modules=['easy_install'],
     
         zip_safe=True,
     
    
    From 9063c163e105545bacb67865f5d35056eb342a49 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:02:04 -0500
    Subject: [PATCH 4540/8469] Move vendored packaging module into
     pkg_resources._vendor, restoring independence of pkg_resources from
     setuptools. Fixes #311.
    
    ---
     pkg_resources/__init__.py                                   | 6 +++---
     {setuptools => pkg_resources}/_vendor/__init__.py           | 0
     .../_vendor/packaging/__about__.py                          | 0
     {setuptools => pkg_resources}/_vendor/packaging/__init__.py | 0
     {setuptools => pkg_resources}/_vendor/packaging/_compat.py  | 0
     .../_vendor/packaging/_structures.py                        | 0
     .../_vendor/packaging/specifiers.py                         | 0
     {setuptools => pkg_resources}/_vendor/packaging/version.py  | 0
     {setuptools => pkg_resources}/_vendor/vendored.txt          | 0
     setuptools/command/egg_info.py                              | 4 ++--
     setuptools/dist.py                                          | 4 ++--
     setuptools/tests/test_resources.py                          | 6 +++---
     12 files changed, 10 insertions(+), 10 deletions(-)
     rename {setuptools => pkg_resources}/_vendor/__init__.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/__about__.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/__init__.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/_compat.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/_structures.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/specifiers.py (100%)
     rename {setuptools => pkg_resources}/_vendor/packaging/version.py (100%)
     rename {setuptools => pkg_resources}/_vendor/vendored.txt (100%)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 3a8edca527..699ac114a3 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -75,9 +75,9 @@
     except ImportError:
         pass
     
    -import setuptools._vendor.packaging.version
    -import setuptools._vendor.packaging.specifiers
    -packaging = setuptools._vendor.packaging
    +import pkg_resources._vendor.packaging.version
    +import pkg_resources._vendor.packaging.specifiers
    +packaging = pkg_resources._vendor.packaging
     
     
     class PEP440Warning(RuntimeWarning):
    diff --git a/setuptools/_vendor/__init__.py b/pkg_resources/_vendor/__init__.py
    similarity index 100%
    rename from setuptools/_vendor/__init__.py
    rename to pkg_resources/_vendor/__init__.py
    diff --git a/setuptools/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/__about__.py
    rename to pkg_resources/_vendor/packaging/__about__.py
    diff --git a/setuptools/_vendor/packaging/__init__.py b/pkg_resources/_vendor/packaging/__init__.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/__init__.py
    rename to pkg_resources/_vendor/packaging/__init__.py
    diff --git a/setuptools/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/_compat.py
    rename to pkg_resources/_vendor/packaging/_compat.py
    diff --git a/setuptools/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/_structures.py
    rename to pkg_resources/_vendor/packaging/_structures.py
    diff --git a/setuptools/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/specifiers.py
    rename to pkg_resources/_vendor/packaging/specifiers.py
    diff --git a/setuptools/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py
    similarity index 100%
    rename from setuptools/_vendor/packaging/version.py
    rename to pkg_resources/_vendor/packaging/version.py
    diff --git a/setuptools/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt
    similarity index 100%
    rename from setuptools/_vendor/vendored.txt
    rename to pkg_resources/_vendor/vendored.txt
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index e132412707..dfbab0e9aa 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -15,8 +15,8 @@
         import packaging.version
     except ImportError:
         # fallback to vendored version
    -    import setuptools._vendor.packaging.version
    -    packaging = setuptools._vendor.packaging
    +    import pkg_resources._vendor.packaging.version
    +    packaging = pkg_resources._vendor.packaging
     
     from setuptools import Command
     from setuptools.command.sdist import sdist
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index e44796fd95..2daa283509 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -17,8 +17,8 @@
         import packaging.version
     except ImportError:
         # fallback to vendored version
    -    import setuptools._vendor.packaging.version
    -    packaging = setuptools._vendor.packaging
    +    import pkg_resources._vendor.packaging.version
    +    packaging = pkg_resources._vendor.packaging
     
     from setuptools.depends import Require
     from setuptools.compat import basestring, PY2
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index 1902fb2ce4..7cf2385b14 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -8,9 +8,9 @@
     import shutil
     from unittest import TestCase
     
    -import setuptools._vendor.packaging.version
    -import setuptools._vendor.packaging.specifiers
    -packaging = setuptools._vendor.packaging
    +import pkg_resources._vendor.packaging.version
    +import pkg_resources._vendor.packaging.specifiers
    +packaging = pkg_resources._vendor.packaging
     
     import pkg_resources
     from pkg_resources import (parse_requirements, VersionConflict, parse_version,
    
    From 170657b68f4b92e7e1bf82f5e19a831f5744af67 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:11:49 -0500
    Subject: [PATCH 4541/8469] Setuptools now uses the 'packaging' package from
     pkg_resources, unifying the behavior around resolution of that package.
    
    ---
     pkg_resources/__init__.py          | 11 ++++++++---
     setuptools/command/egg_info.py     |  8 +-------
     setuptools/dist.py                 |  9 ++-------
     setuptools/tests/test_resources.py |  6 ++----
     4 files changed, 13 insertions(+), 21 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 699ac114a3..a055cf1a32 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -75,9 +75,14 @@
     except ImportError:
         pass
     
    -import pkg_resources._vendor.packaging.version
    -import pkg_resources._vendor.packaging.specifiers
    -packaging = pkg_resources._vendor.packaging
    +try:
    +    import packaging.version
    +    import packaging.specifiers
    +except ImportError:
    +    # fallback to vendored version
    +    import pkg_resources._vendor.packaging.version
    +    import pkg_resources._vendor.packaging.specifiers
    +    packaging = pkg_resources._vendor.packaging
     
     
     class PEP440Warning(RuntimeWarning):
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index dfbab0e9aa..88ab0b8292 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -11,13 +11,6 @@
     import re
     import sys
     
    -try:
    -    import packaging.version
    -except ImportError:
    -    # fallback to vendored version
    -    import pkg_resources._vendor.packaging.version
    -    packaging = pkg_resources._vendor.packaging
    -
     from setuptools import Command
     from setuptools.command.sdist import sdist
     from setuptools.compat import basestring, PY3, StringIO
    @@ -28,6 +21,7 @@
         safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
     import setuptools.unicode_utils as unicode_utils
     
    +from pkg_resources import packaging
     
     class egg_info(Command):
         description = "create a distribution's .egg-info directory"
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 2daa283509..7a94d4b38e 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -13,18 +13,13 @@
     from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
         DistutilsSetupError)
     
    -try:
    -    import packaging.version
    -except ImportError:
    -    # fallback to vendored version
    -    import pkg_resources._vendor.packaging.version
    -    packaging = pkg_resources._vendor.packaging
    -
     from setuptools.depends import Require
     from setuptools.compat import basestring, PY2
     from setuptools import windows_support
     import pkg_resources
     
    +packaging = pkg_resources.packaging
    +
     
     def _get_unpatched(cls):
         """Protect against re-patching the distutils if reloaded
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index 7cf2385b14..f9f2e459ef 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -8,15 +8,13 @@
     import shutil
     from unittest import TestCase
     
    -import pkg_resources._vendor.packaging.version
    -import pkg_resources._vendor.packaging.specifiers
    -packaging = pkg_resources._vendor.packaging
    -
     import pkg_resources
     from pkg_resources import (parse_requirements, VersionConflict, parse_version,
         Distribution, EntryPoint, Requirement, safe_version, safe_name,
         WorkingSet)
     
    +packaging = pkg_resources.packaging
    +
     from setuptools.command.easy_install import (get_script_header, is_sh,
         nt_quote_arg)
     from setuptools.compat import StringIO, iteritems, PY3
    
    From 9b28468a92d73f2a76b2cfdaa4444f65acf49f1e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:22:58 -0500
    Subject: [PATCH 4542/8469] Update changelog
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 9d9b4d5237..be20e66839 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +---
    +8.3
    +---
    +
    +* Issue #311: Decoupled pkg_resources from setuptools once again.
    +  ``pkg_resources`` is now a package instead of a module.
    +
     -----
     8.2.1
     -----
    
    From b22fd831fd0bf735beb1ea97f630d8fb1c4c5158 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:23:39 -0500
    Subject: [PATCH 4543/8469] Bumped to 8.3 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 65337f67a0..e22ab67449 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.2.2"
    +DEFAULT_VERSION = "8.3"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 5adfd0a393..de8c596a80 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.2.2'
    +__version__ = '8.3'
    
    From ab26e104c7a120e4d99142d39acfcf3e12c012b2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:23:41 -0500
    Subject: [PATCH 4544/8469] Added tag 8.3 for changeset cd14b2a72e51
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index e3f5e6a8a2..4dccce7edd 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -170,3 +170,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     3f87370b6863e5a4e831b394ef1a58e0e97a4336 8.1
     995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2
     efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
    +cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
    
    From 21f753919f89bd6c7f3333a6b15f0d5515ecde64 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 17:24:44 -0500
    Subject: [PATCH 4545/8469] Bumped to 8.4 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index e22ab67449..513449f919 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.3"
    +DEFAULT_VERSION = "8.4"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index de8c596a80..60a9e0b2a7 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.3'
    +__version__ = '8.4'
    
    From a7e5648bda737683c4ad220e61c44c1d17b73d87 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 24 Dec 2014 18:25:45 -0500
    Subject: [PATCH 4546/8469] Removed svn support from setuptools. Ref #313.
    
    ---
     setup.py                          |   3 -
     setuptools/command/egg_info.py    |   8 +-
     setuptools/command/sdist.py       |  57 ---
     setuptools/svn_utils.py           | 585 ------------------------------
     setuptools/tests/environment.py   |  58 ---
     setuptools/tests/test_egg_info.py | 191 +---------
     setuptools/tests/test_sdist.py    | 134 +------
     setuptools/tests/test_svn.py      | 245 -------------
     8 files changed, 9 insertions(+), 1272 deletions(-)
     delete mode 100644 setuptools/svn_utils.py
     delete mode 100644 setuptools/tests/test_svn.py
    
    diff --git a/setup.py b/setup.py
    index ff519e3e44..ca0b6c4b53 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -172,9 +172,6 @@ def _save_entry_points(self):
             ],
             "console_scripts": console_scripts,
     
    -        "setuptools.file_finders":
    -            ["svn_cvs = setuptools.command.sdist:_default_revctrl"],
    -
             "setuptools.installation":
                 ['eggsecutable = setuptools.command.easy_install:bootstrap'],
         },
    diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
    index 88ab0b8292..526e0a8f08 100755
    --- a/setuptools/command/egg_info.py
    +++ b/setuptools/command/egg_info.py
    @@ -11,10 +11,14 @@
     import re
     import sys
     
    +try:
    +    from setuptools_svn import svn_utils
    +except ImportError:
    +    pass
    +
     from setuptools import Command
     from setuptools.command.sdist import sdist
     from setuptools.compat import basestring, PY3, StringIO
    -from setuptools import svn_utils
     from setuptools.command.sdist import walk_revctrl
     from pkg_resources import (
         parse_requirements, safe_name, parse_version,
    @@ -190,6 +194,8 @@ def tags(self):
     
         @staticmethod
         def get_svn_revision():
    +        if 'svn_utils' not in globals():
    +            return "0"
             return str(svn_utils.SvnInfo.load(os.curdir).get_revision())
     
         def find_sources(self):
    diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
    index a77c39f298..371bf547ae 100755
    --- a/setuptools/command/sdist.py
    +++ b/setuptools/command/sdist.py
    @@ -1,12 +1,9 @@
     from glob import glob
    -from distutils.util import convert_path
     from distutils import log
     import distutils.command.sdist as orig
     import os
    -import re
     import sys
     
    -from setuptools import svn_utils
     from setuptools.compat import PY3
     from setuptools.utils import cs_path_exists
     
    @@ -22,60 +19,6 @@ def walk_revctrl(dirname=''):
                 yield item
     
     
    -# TODO will need test case
    -class re_finder(object):
    -    """
    -    Finder that locates files based on entries in a file matched by a
    -    regular expression.
    -    """
    -
    -    def __init__(self, path, pattern, postproc=lambda x: x):
    -        self.pattern = pattern
    -        self.postproc = postproc
    -        self.entries_path = convert_path(path)
    -
    -    def _finder(self, dirname, filename):
    -        f = open(filename, 'rU')
    -        try:
    -            data = f.read()
    -        finally:
    -            f.close()
    -        for match in self.pattern.finditer(data):
    -            path = match.group(1)
    -            # postproc was formerly used when the svn finder
    -            # was an re_finder for calling unescape
    -            path = self.postproc(path)
    -            yield svn_utils.joinpath(dirname, path)
    -
    -    def find(self, dirname=''):
    -        path = svn_utils.joinpath(dirname, self.entries_path)
    -
    -        if not os.path.isfile(path):
    -            # entries file doesn't exist
    -            return
    -        for path in self._finder(dirname, path):
    -            if os.path.isfile(path):
    -                yield path
    -            elif os.path.isdir(path):
    -                for item in self.find(path):
    -                    yield item
    -
    -    __call__ = find
    -
    -
    -def _default_revctrl(dirname=''):
    -    'Primary svn_cvs entry point'
    -    for finder in finders:
    -        for item in finder(dirname):
    -            yield item
    -
    -
    -finders = [
    -    re_finder('CVS/Entries', re.compile(r"^\w?/([^/]+)/", re.M)),
    -    svn_utils.svn_finder,
    -]
    -
    -
     class sdist(orig.sdist):
         """Smart sdist that finds anything supported by revision control"""
     
    diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py
    deleted file mode 100644
    index 6502fc98ea..0000000000
    --- a/setuptools/svn_utils.py
    +++ /dev/null
    @@ -1,585 +0,0 @@
    -from __future__ import absolute_import
    -
    -import os
    -import re
    -import sys
    -from distutils import log
    -import xml.dom.pulldom
    -import shlex
    -import locale
    -import codecs
    -import unicodedata
    -import warnings
    -from setuptools.compat import unicode, PY2
    -from setuptools.py31compat import TemporaryDirectory
    -from xml.sax.saxutils import unescape
    -
    -try:
    -    import urlparse
    -except ImportError:
    -    import urllib.parse as urlparse
    -
    -from subprocess import Popen as _Popen, PIPE as _PIPE
    -
    -#NOTE: Use of the command line options require SVN 1.3 or newer (December 2005)
    -#      and SVN 1.3 hasn't been supported by the developers since mid 2008.
    -
    -#subprocess is called several times with shell=(sys.platform=='win32')
    -#see the follow for more information:
    -#       http://bugs.python.org/issue8557
    -#       http://stackoverflow.com/questions/5658622/
    -#              python-subprocess-popen-environment-path
    -
    -def _run_command(args, stdout=_PIPE, stderr=_PIPE, encoding=None, stream=0):
    -    #regarding the shell argument, see: http://bugs.python.org/issue8557
    -    try:
    -        proc = _Popen(args, stdout=stdout, stderr=stderr,
    -                      shell=(sys.platform == 'win32'))
    -
    -        data = proc.communicate()[stream]
    -    except OSError:
    -        return 1, ''
    -
    -    #doubled checked and
    -    data = decode_as_string(data, encoding)
    -
    -    #communciate calls wait()
    -    return proc.returncode, data
    -
    -
    -def _get_entry_schedule(entry):
    -    schedule = entry.getElementsByTagName('schedule')[0]
    -    return "".join([t.nodeValue
    -                    for t in schedule.childNodes
    -                    if t.nodeType == t.TEXT_NODE])
    -
    -
    -def _get_target_property(target):
    -    property_text = target.getElementsByTagName('property')[0]
    -    return "".join([t.nodeValue
    -                    for t in property_text.childNodes
    -                    if t.nodeType == t.TEXT_NODE])
    -
    -
    -def _get_xml_data(decoded_str):
    -    if PY2:
    -        #old versions want an encoded string
    -        data = decoded_str.encode('utf-8')
    -    else:
    -        data = decoded_str
    -    return data
    -
    -
    -def joinpath(prefix, *suffix):
    -    if not prefix or prefix == '.':
    -        return os.path.join(*suffix)
    -    return os.path.join(prefix, *suffix)
    -
    -def determine_console_encoding():
    -    try:
    -        #try for the preferred encoding
    -        encoding = locale.getpreferredencoding()
    -
    -        #see if the locale.getdefaultlocale returns null
    -        #some versions of python\platforms return US-ASCII
    -        #when it cannot determine an encoding
    -        if not encoding or encoding == "US-ASCII":
    -            encoding = locale.getdefaultlocale()[1]
    -
    -        if encoding:
    -            codecs.lookup(encoding)  # make sure a lookup error is not made
    -
    -    except (locale.Error, LookupError):
    -        encoding = None
    -
    -    is_osx = sys.platform == "darwin"
    -    if not encoding:
    -        return ["US-ASCII", "utf-8"][is_osx]
    -    elif encoding.startswith("mac-") and is_osx:
    -        #certain versions of python would return mac-roman as default
    -        #OSX as a left over of earlier mac versions.
    -        return "utf-8"
    -    else:
    -        return encoding
    -
    -_console_encoding = determine_console_encoding()
    -
    -def decode_as_string(text, encoding=None):
    -    """
    -    Decode the console or file output explicitly using getpreferredencoding.
    -    The text paraemeter should be a encoded string, if not no decode occurs
    -    If no encoding is given, getpreferredencoding is used.  If encoding is
    -    specified, that is used instead.  This would be needed for SVN --xml
    -    output.  Unicode is explicitly put in composed NFC form.
    -
    -    --xml should be UTF-8 (SVN Issue 2938) the discussion on the Subversion
    -    DEV List from 2007 seems to indicate the same.
    -    """
    -    #text should be a byte string
    -
    -    if encoding is None:
    -        encoding = _console_encoding
    -
    -    if not isinstance(text, unicode):
    -        text = text.decode(encoding)
    -
    -    text = unicodedata.normalize('NFC', text)
    -
    -    return text
    -
    -
    -def parse_dir_entries(decoded_str):
    -    '''Parse the entries from a recursive info xml'''
    -    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    -    entries = list()
    -
    -    for event, node in doc:
    -        if event == 'START_ELEMENT' and node.nodeName == 'entry':
    -            doc.expandNode(node)
    -            if not _get_entry_schedule(node).startswith('delete'):
    -                entries.append((node.getAttribute('path'),
    -                                node.getAttribute('kind')))
    -
    -    return entries[1:]  # do not want the root directory
    -
    -
    -def parse_externals_xml(decoded_str, prefix=''):
    -    '''Parse a propget svn:externals xml'''
    -    prefix = os.path.normpath(prefix)
    -    prefix = os.path.normcase(prefix)
    -
    -    doc = xml.dom.pulldom.parseString(_get_xml_data(decoded_str))
    -    externals = list()
    -
    -    for event, node in doc:
    -        if event == 'START_ELEMENT' and node.nodeName == 'target':
    -            doc.expandNode(node)
    -            path = os.path.normpath(node.getAttribute('path'))
    -
    -            if os.path.normcase(path).startswith(prefix):
    -                path = path[len(prefix)+1:]
    -
    -            data = _get_target_property(node)
    -            #data should be decoded already
    -            for external in parse_external_prop(data):
    -                externals.append(joinpath(path, external))
    -
    -    return externals  # do not want the root directory
    -
    -
    -def parse_external_prop(lines):
    -    """
    -    Parse the value of a retrieved svn:externals entry.
    -
    -    possible token setups (with quotng and backscaping in laters versions)
    -        URL[@#] EXT_FOLDERNAME
    -        [-r#] URL EXT_FOLDERNAME
    -        EXT_FOLDERNAME [-r#] URL
    -    """
    -    externals = []
    -    for line in lines.splitlines():
    -        line = line.lstrip()  # there might be a "\ "
    -        if not line:
    -            continue
    -
    -        if PY2:
    -            #shlex handles NULLs just fine and shlex in 2.7 tries to encode
    -            #as ascii automatiically
    -            line = line.encode('utf-8')
    -        line = shlex.split(line)
    -        if PY2:
    -            line = [x.decode('utf-8') for x in line]
    -
    -        #EXT_FOLDERNAME is either the first or last depending on where
    -        #the URL falls
    -        if urlparse.urlsplit(line[-1])[0]:
    -            external = line[0]
    -        else:
    -            external = line[-1]
    -
    -        external = decode_as_string(external, encoding="utf-8")
    -        externals.append(os.path.normpath(external))
    -
    -    return externals
    -
    -
    -def parse_prop_file(filename, key):
    -    found = False
    -    f = open(filename, 'rt')
    -    data = ''
    -    try:
    -        for line in iter(f.readline, ''):    # can't use direct iter!
    -            parts = line.split()
    -            if len(parts) == 2:
    -                kind, length = parts
    -                data = f.read(int(length))
    -                if kind == 'K' and data == key:
    -                    found = True
    -                elif kind == 'V' and found:
    -                    break
    -    finally:
    -        f.close()
    -
    -    return data
    -
    -
    -class SvnInfo(object):
    -    '''
    -    Generic svn_info object.  No has little knowledge of how to extract
    -    information.  Use cls.load to instatiate according svn version.
    -
    -    Paths are not filesystem encoded.
    -    '''
    -
    -    @staticmethod
    -    def get_svn_version():
    -        # Temp config directory should be enough to check for repository
    -        # This is needed because .svn always creates .subversion and
    -        # some operating systems do not handle dot directory correctly.
    -        # Real queries in real svn repos with be concerned with it creation
    -        with TemporaryDirectory() as tempdir:
    -            code, data = _run_command(['svn',
    -                                       '--config-dir', tempdir,
    -                                       '--version',
    -                                       '--quiet'])
    -
    -        if code == 0 and data:
    -            return data.strip()
    -        else:
    -            return ''
    -
    -    #svnversion return values (previous implementations return max revision)
    -    #   4123:4168     mixed revision working copy
    -    #   4168M         modified working copy
    -    #   4123S         switched working copy
    -    #   4123:4168MS   mixed revision, modified, switched working copy
    -    revision_re = re.compile(r'(?:([\-0-9]+):)?(\d+)([a-z]*)\s*$', re.I)
    -
    -    @classmethod
    -    def load(cls, dirname=''):
    -        normdir = os.path.normpath(dirname)
    -
    -        # Temp config directory should be enough to check for repository
    -        # This is needed because .svn always creates .subversion and
    -        # some operating systems do not handle dot directory correctly.
    -        # Real queries in real svn repos with be concerned with it creation
    -        with TemporaryDirectory() as tempdir:
    -            code, data = _run_command(['svn',
    -                                       '--config-dir', tempdir,
    -                                       'info', normdir])
    -
    -        # Must check for some contents, as some use empty directories
    -        # in testcases, however only enteries is needed also the info
    -        # command above MUST have worked
    -        svn_dir = os.path.join(normdir, '.svn')
    -        is_svn_wd = (not code or
    -                     os.path.isfile(os.path.join(svn_dir, 'entries')))
    -
    -        svn_version = tuple(cls.get_svn_version().split('.'))
    -
    -        try:
    -            base_svn_version = tuple(int(x) for x in svn_version[:2])
    -        except ValueError:
    -            base_svn_version = tuple()
    -
    -        if not is_svn_wd:
    -            #return an instance of this NO-OP class
    -            return SvnInfo(dirname)
    -
    -        if code or not base_svn_version or base_svn_version < (1, 3):
    -            warnings.warn(("No SVN 1.3+ command found: falling back "
    -                           "on pre 1.7 .svn parsing"), DeprecationWarning)
    -            return SvnFileInfo(dirname)
    -
    -        if base_svn_version < (1, 5):
    -            return Svn13Info(dirname)
    -
    -        return Svn15Info(dirname)
    -
    -    def __init__(self, path=''):
    -        self.path = path
    -        self._entries = None
    -        self._externals = None
    -
    -    def get_revision(self):
    -        'Retrieve the directory revision information using svnversion'
    -        code, data = _run_command(['svnversion', '-c', self.path])
    -        if code:
    -            log.warn("svnversion failed")
    -            return 0
    -
    -        parsed = self.revision_re.match(data)
    -        if parsed:
    -            return int(parsed.group(2))
    -        else:
    -            return 0
    -
    -    @property
    -    def entries(self):
    -        if self._entries is None:
    -            self._entries = self.get_entries()
    -        return self._entries
    -
    -    @property
    -    def externals(self):
    -        if self._externals is None:
    -            self._externals = self.get_externals()
    -        return self._externals
    -
    -    def iter_externals(self):
    -        '''
    -        Iterate over the svn:external references in the repository path.
    -        '''
    -        for item in self.externals:
    -            yield item
    -
    -    def iter_files(self):
    -        '''
    -        Iterate over the non-deleted file entries in the repository path
    -        '''
    -        for item, kind in self.entries:
    -            if kind.lower() == 'file':
    -                yield item
    -
    -    def iter_dirs(self, include_root=True):
    -        '''
    -        Iterate over the non-deleted file entries in the repository path
    -        '''
    -        if include_root:
    -            yield self.path
    -        for item, kind in self.entries:
    -            if kind.lower() == 'dir':
    -                yield item
    -
    -    def get_entries(self):
    -        return []
    -
    -    def get_externals(self):
    -        return []
    -
    -
    -class Svn13Info(SvnInfo):
    -    def get_entries(self):
    -        code, data = _run_command(['svn', 'info', '-R', '--xml', self.path],
    -                                  encoding="utf-8")
    -
    -        if code:
    -            log.debug("svn info failed")
    -            return []
    -
    -        return parse_dir_entries(data)
    -
    -    def get_externals(self):
    -        #Previous to 1.5 --xml was not supported for svn propget and the -R
    -        #output format breaks the shlex compatible semantics.
    -        cmd = ['svn', 'propget', 'svn:externals']
    -        result = []
    -        for folder in self.iter_dirs():
    -            code, lines = _run_command(cmd + [folder], encoding="utf-8")
    -            if code != 0:
    -                log.warn("svn propget failed")
    -                return []
    -            #lines should a str
    -            for external in parse_external_prop(lines):
    -                if folder:
    -                    external = os.path.join(folder, external)
    -                result.append(os.path.normpath(external))
    -
    -        return result
    -
    -
    -class Svn15Info(Svn13Info):
    -    def get_externals(self):
    -        cmd = ['svn', 'propget', 'svn:externals', self.path, '-R', '--xml']
    -        code, lines = _run_command(cmd, encoding="utf-8")
    -        if code:
    -            log.debug("svn propget failed")
    -            return []
    -        return parse_externals_xml(lines, prefix=os.path.abspath(self.path))
    -
    -
    -class SvnFileInfo(SvnInfo):
    -
    -    def __init__(self, path=''):
    -        super(SvnFileInfo, self).__init__(path)
    -        self._directories = None
    -        self._revision = None
    -
    -    def _walk_svn(self, base):
    -        entry_file = joinpath(base, '.svn', 'entries')
    -        if os.path.isfile(entry_file):
    -            entries = SVNEntriesFile.load(base)
    -            yield (base, False, entries.parse_revision())
    -            for path in entries.get_undeleted_records():
    -                path = decode_as_string(path)
    -                path = joinpath(base, path)
    -                if os.path.isfile(path):
    -                    yield (path, True, None)
    -                elif os.path.isdir(path):
    -                    for item in self._walk_svn(path):
    -                        yield item
    -
    -    def _build_entries(self):
    -        entries = list()
    -
    -        rev = 0
    -        for path, isfile, dir_rev in self._walk_svn(self.path):
    -            if isfile:
    -                entries.append((path, 'file'))
    -            else:
    -                entries.append((path, 'dir'))
    -                rev = max(rev, dir_rev)
    -
    -        self._entries = entries
    -        self._revision = rev
    -
    -    def get_entries(self):
    -        if self._entries is None:
    -            self._build_entries()
    -        return self._entries
    -
    -    def get_revision(self):
    -        if self._revision is None:
    -            self._build_entries()
    -        return self._revision
    -
    -    def get_externals(self):
    -        prop_files = [['.svn', 'dir-prop-base'],
    -                      ['.svn', 'dir-props']]
    -        externals = []
    -
    -        for dirname in self.iter_dirs():
    -            prop_file = None
    -            for rel_parts in prop_files:
    -                filename = joinpath(dirname, *rel_parts)
    -                if os.path.isfile(filename):
    -                    prop_file = filename
    -
    -            if prop_file is not None:
    -                ext_prop = parse_prop_file(prop_file, 'svn:externals')
    -                #ext_prop should be utf-8 coming from svn:externals
    -                ext_prop = decode_as_string(ext_prop, encoding="utf-8")
    -                externals.extend(parse_external_prop(ext_prop))
    -
    -        return externals
    -
    -
    -def svn_finder(dirname=''):
    -    #combined externals due to common interface
    -    #combined externals and entries due to lack of dir_props in 1.7
    -    info = SvnInfo.load(dirname)
    -    for path in info.iter_files():
    -        yield path
    -
    -    for path in info.iter_externals():
    -        sub_info = SvnInfo.load(path)
    -        for sub_path in sub_info.iter_files():
    -            yield sub_path
    -
    -
    -class SVNEntriesFile(object):
    -    def __init__(self, data):
    -        self.data = data
    -
    -    @classmethod
    -    def load(class_, base):
    -        filename = os.path.join(base, '.svn', 'entries')
    -        f = open(filename)
    -        try:
    -            result = SVNEntriesFile.read(f)
    -        finally:
    -            f.close()
    -        return result
    -
    -    @classmethod
    -    def read(class_, fileobj):
    -        data = fileobj.read()
    -        is_xml = data.startswith(' revision_line_number
    -                and section[revision_line_number])
    -        ]
    -        return rev_numbers
    -
    -    def get_undeleted_records(self):
    -        undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete')
    -        result = [
    -            section[0]
    -            for section in self.get_sections()
    -            if undeleted(section)
    -        ]
    -        return result
    -
    -
    -class SVNEntriesFileXML(SVNEntriesFile):
    -    def is_valid(self):
    -        return True
    -
    -    def get_url(self):
    -        "Get repository URL"
    -        urlre = re.compile('url="([^"]+)"')
    -        return urlre.search(self.data).group(1)
    -
    -    def parse_revision_numbers(self):
    -        revre = re.compile(r'committed-rev="(\d+)"')
    -        return [
    -            int(m.group(1))
    -            for m in revre.finditer(self.data)
    -        ]
    -
    -    def get_undeleted_records(self):
    -        entries_pattern = \
    -            re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I)
    -        results = [
    -            unescape(match.group(1))
    -            for match in entries_pattern.finditer(self.data)
    -        ]
    -        return results
    -
    -
    -if __name__ == '__main__':
    -    for name in svn_finder(sys.argv[1]):
    -        print(name)
    diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py
    index c8d0e66921..a23c0504e7 100644
    --- a/setuptools/tests/environment.py
    +++ b/setuptools/tests/environment.py
    @@ -1,68 +1,10 @@
     import os
    -import zipfile
     import sys
    -import tempfile
    -import unittest
    -import shutil
    -import stat
     import unicodedata
     
     from subprocess import Popen as _Popen, PIPE as _PIPE
     
     
    -def _remove_dir(target):
    -
    -    #on windows this seems to a problem
    -    for dir_path, dirs, files in os.walk(target):
    -        os.chmod(dir_path, stat.S_IWRITE)
    -        for filename in files:
    -            os.chmod(os.path.join(dir_path, filename), stat.S_IWRITE)
    -    shutil.rmtree(target)
    -
    -
    -class ZippedEnvironment(unittest.TestCase):
    -
    -    datafile = None
    -    dataname = None
    -    old_cwd = None
    -
    -    def setUp(self):
    -        if self.datafile is None or self.dataname is None:
    -            return
    -
    -        if not os.path.isfile(self.datafile):
    -            self.old_cwd = None
    -            return
    -
    -        self.old_cwd = os.getcwd()
    -
    -        self.temp_dir = tempfile.mkdtemp()
    -        zip_file, source, target = [None, None, None]
    -        try:
    -            zip_file = zipfile.ZipFile(self.datafile)
    -            for files in zip_file.namelist():
    -                zip_file.extract(files, self.temp_dir)
    -        finally:
    -            if zip_file:
    -                zip_file.close()
    -            del zip_file
    -
    -        os.chdir(os.path.join(self.temp_dir, self.dataname))
    -
    -    def tearDown(self):
    -        #Assume setUp was never completed
    -        if self.dataname is None or self.datafile is None:
    -            return
    -
    -        try:
    -            if self.old_cwd:
    -                os.chdir(self.old_cwd)
    -                _remove_dir(self.temp_dir)
    -        except OSError:
    -            #sigh?
    -            pass
    -
    -
     def _which_dirs(cmd):
         result = set()
         for path in os.environ.get('PATH', '').split(os.pathsep):
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index e80684205f..6b4d917f5a 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -1,28 +1,16 @@
    -
    -import distutils.core
     import os
    -import sys
     import tempfile
     import shutil
     import stat
     import unittest
     
    -import pkg_resources
    -import warnings
    -from setuptools.command import egg_info
    -from setuptools import svn_utils
    -from setuptools.tests import environment, test_svn
    -from setuptools.tests.py26compat import skipIf
    -
    -ENTRIES_V10 = pkg_resources.resource_string(__name__, 'entries-v10')
    -"An entries file generated with svn 1.6.17 against the legacy Setuptools repo"
    +from . import environment
     
     
     class TestEggInfo(unittest.TestCase):
     
         def setUp(self):
             self.test_dir = tempfile.mkdtemp()
    -        os.mkdir(os.path.join(self.test_dir, '.svn'))
     
             self.old_cwd = os.getcwd()
             os.chdir(self.test_dir)
    @@ -31,12 +19,6 @@ def tearDown(self):
             os.chdir(self.old_cwd)
             shutil.rmtree(self.test_dir)
     
    -    def _write_entries(self, entries):
    -        fn = os.path.join(self.test_dir, '.svn', 'entries')
    -        entries_f = open(fn, 'wb')
    -        entries_f.write(entries)
    -        entries_f.close()
    -
         def _create_project(self):
             with open('setup.py', 'w') as f:
                 f.write('from setuptools import setup\n')
    @@ -51,52 +33,6 @@ def _create_project(self):
                 f.write('def run():\n')
                 f.write("    print('hello')\n")
     
    -    @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
    -    def test_version_10_format(self):
    -        """
    -        """
    -        #keeping this set for 1.6 is a good check on the get_svn_revision
    -        #to ensure I return using svnversion what would had been returned
    -        version_str = svn_utils.SvnInfo.get_svn_version()
    -        version = [int(x) for x in version_str.split('.')[:2]]
    -        if version != [1, 6]:
    -            if hasattr(self, 'skipTest'):
    -                self.skipTest('')
    -            else:
    -                sys.stderr.write('\n   Skipping due to SVN Version\n')
    -                return
    -
    -        self._write_entries(ENTRIES_V10)
    -        rev = egg_info.egg_info.get_svn_revision()
    -        self.assertEqual(rev, '89000')
    -
    -    def test_version_10_format_legacy_parser(self):
    -        """
    -        """
    -        path_variable = None
    -        for env in os.environ:
    -            if env.lower() == 'path':
    -                path_variable = env
    -
    -        if path_variable:
    -            old_path = os.environ[path_variable]
    -            os.environ[path_variable] = ''
    -        #catch_warnings not available until py26
    -        warning_filters = warnings.filters
    -        warnings.filters = warning_filters[:]
    -        try:
    -            warnings.simplefilter("ignore", DeprecationWarning)
    -            self._write_entries(ENTRIES_V10)
    -            rev = egg_info.egg_info.get_svn_revision()
    -        finally:
    -            #restore the warning filters
    -            warnings.filters = warning_filters
    -            #restore the os path
    -            if path_variable:
    -                os.environ[path_variable] = old_path
    -
    -        self.assertEqual(rev, '89000')
    -
         def test_egg_base_installed_egg_info(self):
             self._create_project()
             temp_dir = tempfile.mkdtemp(prefix='setuptools-test.')
    @@ -139,130 +75,5 @@ def test_egg_base_installed_egg_info(self):
                 shutil.rmtree(temp_dir)
     
     
    -DUMMY_SOURCE_TXT = """CHANGES.txt
    -CONTRIBUTORS.txt
    -HISTORY.txt
    -LICENSE
    -MANIFEST.in
    -README.txt
    -setup.py
    -dummy/__init__.py
    -dummy/test.txt
    -dummy.egg-info/PKG-INFO
    -dummy.egg-info/SOURCES.txt
    -dummy.egg-info/dependency_links.txt
    -dummy.egg-info/top_level.txt"""
    -
    -
    -class TestSvnDummy(environment.ZippedEnvironment):
    -
    -    def setUp(self):
    -        version = svn_utils.SvnInfo.get_svn_version()
    -        if not version:  # None or Empty
    -            return None
    -
    -        self.base_version = tuple([int(x) for x in version.split('.')][:2])
    -
    -        if not self.base_version:
    -            raise ValueError('No SVN tools installed')
    -        elif self.base_version < (1, 3):
    -            raise ValueError('Insufficient SVN Version %s' % version)
    -        elif self.base_version >= (1, 9):
    -            #trying the latest version
    -            self.base_version = (1, 8)
    -
    -        self.dataname = "dummy%i%i" % self.base_version
    -        self.datafile = os.path.join('setuptools', 'tests',
    -                                     'svn_data', self.dataname + ".zip")
    -        super(TestSvnDummy, self).setUp()
    -
    -    @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
    -    def test_sources(self):
    -        code, data = environment.run_setup_py(["sdist"],
    -                                              pypath=self.old_cwd,
    -                                              data_stream=1)
    -        if code:
    -            raise AssertionError(data)
    -
    -        sources = os.path.join('dummy.egg-info', 'SOURCES.txt')
    -        infile = open(sources, 'r')
    -        try:
    -            read_contents = infile.read()
    -        finally:
    -            infile.close()
    -            del infile
    -
    -        self.assertEqual(DUMMY_SOURCE_TXT, read_contents)
    -
    -        return data
    -
    -    @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
    -    def test_svn_tags(self):
    -        code, data = environment.run_setup_py(["egg_info",
    -                                               "--tag-svn-revision"],
    -                                              pypath=self.old_cwd,
    -                                              data_stream=1)
    -        if code:
    -            raise AssertionError(data)
    -
    -        pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO')
    -        infile = open(pkginfo, 'r')
    -        try:
    -            read_contents = infile.readlines()
    -        finally:
    -            infile.close()
    -            del infile
    -
    -        self.assertTrue("Version: 0.1.1.post1\n" in read_contents)
    -
    -    @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
    -    def test_no_tags(self):
    -        code, data = environment.run_setup_py(["egg_info"],
    -                                              pypath=self.old_cwd,
    -                                              data_stream=1)
    -        if code:
    -            raise AssertionError(data)
    -
    -        pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO')
    -        infile = open(pkginfo, 'r')
    -        try:
    -            read_contents = infile.readlines()
    -        finally:
    -            infile.close()
    -            del infile
    -
    -        self.assertTrue("Version: 0.1.1\n" in read_contents)
    -
    -
    -class TestSvnDummyLegacy(environment.ZippedEnvironment):
    -
    -    def setUp(self):
    -        self.base_version = (1, 6)
    -        self.dataname = "dummy%i%i" % self.base_version
    -        self.datafile = os.path.join('setuptools', 'tests',
    -                                     'svn_data', self.dataname + ".zip")
    -        super(TestSvnDummyLegacy, self).setUp()
    -
    -    def test_sources(self):
    -        code, data = environment.run_setup_py(["sdist"],
    -                                              pypath=self.old_cwd,
    -                                              path="",
    -                                              data_stream=1)
    -        if code:
    -            raise AssertionError(data)
    -
    -        sources = os.path.join('dummy.egg-info', 'SOURCES.txt')
    -        infile = open(sources, 'r')
    -        try:
    -            read_contents = infile.read()
    -        finally:
    -            infile.close()
    -            del infile
    -
    -        self.assertEqual(DUMMY_SOURCE_TXT, read_contents)
    -
    -        return data
    -
    -
     def test_suite():
         return unittest.defaultTestLoader.loadTestsFromName(__name__)
    diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py
    index 5f8a190f46..bece76d263 100644
    --- a/setuptools/tests/test_sdist.py
    +++ b/setuptools/tests/test_sdist.py
    @@ -8,16 +8,13 @@
     import tempfile
     import unittest
     import unicodedata
    -import re
     import contextlib
    -from setuptools.tests import environment, test_svn
     from setuptools.tests.py26compat import skipIf
     
     from setuptools.compat import StringIO, unicode, PY3, PY2
    -from setuptools.command.sdist import sdist, walk_revctrl
    +from setuptools.command.sdist import sdist
     from setuptools.command.egg_info import manifest_maker
     from setuptools.dist import Distribution
    -from setuptools import svn_utils
     
     SETUP_ATTRS = {
         'name': 'sdist_test',
    @@ -418,135 +415,6 @@ def test_sdist_with_latin1_encoded_filename(self):
                 except UnicodeDecodeError:
                     self.assertFalse(filename in cmd.filelist.files)
     
    -class TestDummyOutput(environment.ZippedEnvironment):
    -
    -    def setUp(self):
    -        self.datafile = os.path.join('setuptools', 'tests',
    -                                     'svn_data', "dummy.zip")
    -        self.dataname = "dummy"
    -        super(TestDummyOutput, self).setUp()
    -
    -    def _run(self):
    -        code, data = environment.run_setup_py(["sdist"],
    -                                              pypath=self.old_cwd,
    -                                              data_stream=0)
    -        if code:
    -            info = "DIR: " + os.path.abspath('.')
    -            info += "\n  SDIST RETURNED: %i\n\n" % code
    -            info += data
    -            raise AssertionError(info)
    -
    -        datalines = data.splitlines()
    -
    -        possible = (
    -            "running sdist",
    -            "running egg_info",
    -            "creating dummy\.egg-info",
    -            "writing dummy\.egg-info",
    -            "writing top-level names to dummy\.egg-info",
    -            "writing dependency_links to dummy\.egg-info",
    -            "writing manifest file 'dummy\.egg-info",
    -            "reading manifest file 'dummy\.egg-info",
    -            "reading manifest template 'MANIFEST\.in'",
    -            "writing manifest file 'dummy\.egg-info",
    -            "creating dummy-0.1.1",
    -            "making hard links in dummy-0\.1\.1",
    -            "copying files to dummy-0\.1\.1",
    -            "copying \S+ -> dummy-0\.1\.1",
    -            "copying dummy",
    -            "copying dummy\.egg-info",
    -            "hard linking \S+ -> dummy-0\.1\.1",
    -            "hard linking dummy",
    -            "hard linking dummy\.egg-info",
    -            "Writing dummy-0\.1\.1",
    -            "creating dist",
    -            "creating 'dist",
    -            "Creating tar archive",
    -            "running check",
    -            "adding 'dummy-0\.1\.1",
    -            "tar .+ dist/dummy-0\.1\.1\.tar dummy-0\.1\.1",
    -            "gzip .+ dist/dummy-0\.1\.1\.tar",
    -            "removing 'dummy-0\.1\.1' \\(and everything under it\\)",
    -        )
    -
    -        print("    DIR: " + os.path.abspath('.'))
    -        for line in datalines:
    -            found = False
    -            for pattern in possible:
    -                if re.match(pattern, line):
    -                    print("   READ: " + line)
    -                    found = True
    -                    break
    -            if not found:
    -                raise AssertionError("Unexpexected: %s\n-in-\n%s"
    -                                     % (line, data))
    -
    -        return data
    -
    -    def test_sources(self):
    -        self._run()
    -
    -
    -class TestSvn(environment.ZippedEnvironment):
    -
    -    def setUp(self):
    -        version = svn_utils.SvnInfo.get_svn_version()
    -        if not version:  # None or Empty
    -            return
    -
    -        self.base_version = tuple([int(x) for x in version.split('.')][:2])
    -
    -        if not self.base_version:
    -            raise ValueError('No SVN tools installed')
    -        elif self.base_version < (1, 3):
    -            raise ValueError('Insufficient SVN Version %s' % version)
    -        elif self.base_version >= (1, 9):
    -            # trying the latest version
    -            self.base_version = (1, 8)
    -
    -        self.dataname = "svn%i%i_example" % self.base_version
    -        self.datafile = os.path.join('setuptools', 'tests',
    -                                     'svn_data', self.dataname + ".zip")
    -        super(TestSvn, self).setUp()
    -
    -    @skipIf(not test_svn._svn_check, "No SVN to text, in the first place")
    -    def test_walksvn(self):
    -        if self.base_version >= (1, 6):
    -            folder2 = 'third party2'
    -            folder3 = 'third party3'
    -        else:
    -            folder2 = 'third_party2'
    -            folder3 = 'third_party3'
    -
    -        # TODO is this right
    -        expected = set([
    -            os.path.join('a file'),
    -            os.path.join(folder2, 'Changes.txt'),
    -            os.path.join(folder2, 'MD5SUMS'),
    -            os.path.join(folder2, 'README.txt'),
    -            os.path.join(folder3, 'Changes.txt'),
    -            os.path.join(folder3, 'MD5SUMS'),
    -            os.path.join(folder3, 'README.txt'),
    -            os.path.join(folder3, 'TODO.txt'),
    -            os.path.join(folder3, 'fin'),
    -            os.path.join('third_party', 'README.txt'),
    -            os.path.join('folder', folder2, 'Changes.txt'),
    -            os.path.join('folder', folder2, 'MD5SUMS'),
    -            os.path.join('folder', folder2, 'WatashiNiYomimasu.txt'),
    -            os.path.join('folder', folder3, 'Changes.txt'),
    -            os.path.join('folder', folder3, 'fin'),
    -            os.path.join('folder', folder3, 'MD5SUMS'),
    -            os.path.join('folder', folder3, 'oops'),
    -            os.path.join('folder', folder3, 'WatashiNiYomimasu.txt'),
    -            os.path.join('folder', folder3, 'ZuMachen.txt'),
    -            os.path.join('folder', 'third_party', 'WatashiNiYomimasu.txt'),
    -            os.path.join('folder', 'lalala.txt'),
    -            os.path.join('folder', 'quest.txt'),
    -            # The example will have a deleted file
    -            #  (or should) but shouldn't return it
    -        ])
    -        self.assertEqual(set(x for x in walk_revctrl()), expected)
    -
     
     def test_suite():
         return unittest.defaultTestLoader.loadTestsFromName(__name__)
    diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py
    deleted file mode 100644
    index 3340036210..0000000000
    --- a/setuptools/tests/test_svn.py
    +++ /dev/null
    @@ -1,245 +0,0 @@
    -# -*- coding: utf-8 -*-
    -"""svn tests"""
    -
    -import io
    -import os
    -import subprocess
    -import sys
    -import unittest
    -from setuptools.tests import environment
    -from setuptools.compat import unicode, unichr
    -
    -from setuptools import svn_utils
    -from setuptools.tests.py26compat import skipIf
    -
    -
    -def _do_svn_check():
    -    try:
    -        subprocess.check_call(["svn", "--version"],
    -                              shell=(sys.platform == 'win32'))
    -        return True
    -    except (OSError, subprocess.CalledProcessError):
    -        return False
    -_svn_check = _do_svn_check()
    -
    -
    -class TestSvnVersion(unittest.TestCase):
    -
    -    def test_no_svn_found(self):
    -        path_variable = None
    -        for env in os.environ:
    -            if env.lower() == 'path':
    -                path_variable = env
    -
    -        if path_variable is None:
    -            try:
    -                self.skipTest('Cannot figure out how to modify path')
    -            except AttributeError:  # PY26 doesn't have this
    -                return
    -
    -        old_path = os.environ[path_variable]
    -        os.environ[path_variable] = ''
    -        try:
    -            version = svn_utils.SvnInfo.get_svn_version()
    -            self.assertEqual(version, '')
    -        finally:
    -            os.environ[path_variable] = old_path
    -
    -    @skipIf(not _svn_check, "No SVN to text, in the first place")
    -    def test_svn_should_exist(self):
    -        version = svn_utils.SvnInfo.get_svn_version()
    -        self.assertNotEqual(version, '')
    -
    -def _read_utf8_file(path):
    -    fileobj = None
    -    try:
    -        fileobj = io.open(path, 'r', encoding='utf-8')
    -        data = fileobj.read()
    -        return data
    -    finally:
    -        if fileobj:
    -            fileobj.close()
    -
    -
    -class ParserInfoXML(unittest.TestCase):
    -
    -    def parse_tester(self, svn_name, ext_spaces):
    -        path = os.path.join('setuptools', 'tests',
    -                            'svn_data', svn_name + '_info.xml')
    -        #Remember these are pre-generated to test XML parsing
    -        #  so these paths might not valid on your system
    -        example_base = "%s_example" % svn_name
    -
    -        data = _read_utf8_file(path)
    -
    -        expected = set([
    -            ("\\".join((example_base, 'a file')), 'file'),
    -            ("\\".join((example_base, 'folder')), 'dir'),
    -            ("\\".join((example_base, 'folder', 'lalala.txt')), 'file'),
    -            ("\\".join((example_base, 'folder', 'quest.txt')), 'file'),
    -            ])
    -        self.assertEqual(set(x for x in svn_utils.parse_dir_entries(data)),
    -                         expected)
    -
    -    def test_svn13(self):
    -        self.parse_tester('svn13', False)
    -
    -    def test_svn14(self):
    -        self.parse_tester('svn14', False)
    -
    -    def test_svn15(self):
    -        self.parse_tester('svn15', False)
    -
    -    def test_svn16(self):
    -        self.parse_tester('svn16', True)
    -
    -    def test_svn17(self):
    -        self.parse_tester('svn17', True)
    -
    -    def test_svn18(self):
    -        self.parse_tester('svn18', True)
    -
    -class ParserExternalXML(unittest.TestCase):
    -
    -    def parse_tester(self, svn_name, ext_spaces):
    -        path = os.path.join('setuptools', 'tests',
    -                            'svn_data', svn_name + '_ext_list.xml')
    -        example_base = svn_name + '_example'
    -        data = _read_utf8_file(path)
    -
    -        if ext_spaces:
    -            folder2 = 'third party2'
    -            folder3 = 'third party3'
    -        else:
    -            folder2 = 'third_party2'
    -            folder3 = 'third_party3'
    -
    -        expected = set([
    -            os.sep.join((example_base, folder2)),
    -            os.sep.join((example_base, folder3)),
    -            # folder is third_party大介
    -            os.sep.join((example_base,
    -                       unicode('third_party') +
    -                       unichr(0x5927) + unichr(0x4ecb))),
    -            os.sep.join((example_base, 'folder', folder2)),
    -            os.sep.join((example_base, 'folder', folder3)),
    -            os.sep.join((example_base, 'folder',
    -                       unicode('third_party') +
    -                       unichr(0x5927) + unichr(0x4ecb))),
    -            ])
    -
    -        expected = set(os.path.normpath(x) for x in expected)
    -        dir_base = os.sep.join(('C:', 'development', 'svn_example'))
    -        self.assertEqual(set(x for x
    -            in svn_utils.parse_externals_xml(data, dir_base)), expected)
    -
    -    def test_svn15(self):
    -        self.parse_tester('svn15', False)
    -
    -    def test_svn16(self):
    -        self.parse_tester('svn16', True)
    -
    -    def test_svn17(self):
    -        self.parse_tester('svn17', True)
    -
    -    def test_svn18(self):
    -        self.parse_tester('svn18', True)
    -
    -
    -class ParseExternal(unittest.TestCase):
    -
    -    def parse_tester(self, svn_name, ext_spaces):
    -        path = os.path.join('setuptools', 'tests',
    -                            'svn_data', svn_name + '_ext_list.txt')
    -        data = _read_utf8_file(path)
    -
    -        if ext_spaces:
    -            expected = set(['third party2', 'third party3',
    -                            'third party3b', 'third_party'])
    -        else:
    -            expected = set(['third_party2', 'third_party3', 'third_party'])
    -
    -        self.assertEqual(set(x for x in svn_utils.parse_external_prop(data)),
    -                         expected)
    -
    -    def test_svn13(self):
    -        self.parse_tester('svn13', False)
    -
    -    def test_svn14(self):
    -        self.parse_tester('svn14', False)
    -
    -    def test_svn15(self):
    -        self.parse_tester('svn15', False)
    -
    -    def test_svn16(self):
    -        self.parse_tester('svn16', True)
    -
    -    def test_svn17(self):
    -        self.parse_tester('svn17', True)
    -
    -    def test_svn18(self):
    -        self.parse_tester('svn18', True)
    -
    -
    -class TestSvn(environment.ZippedEnvironment):
    -
    -    def setUp(self):
    -        version = svn_utils.SvnInfo.get_svn_version()
    -        if not version:  # empty or null
    -            self.dataname = None
    -            self.datafile = None
    -            return
    -
    -        self.base_version = tuple([int(x) for x in version.split('.')[:2]])
    -
    -        if self.base_version < (1,3):
    -            raise ValueError('Insufficient SVN Version %s' % version)
    -        elif self.base_version >= (1,9):
    -            #trying the latest version
    -            self.base_version = (1,8)
    -
    -        self.dataname = "svn%i%i_example" % self.base_version
    -        self.datafile = os.path.join('setuptools', 'tests',
    -                                     'svn_data', self.dataname + ".zip")
    -        super(TestSvn, self).setUp()
    -
    -    @skipIf(not _svn_check, "No SVN to text, in the first place")
    -    def test_revision(self):
    -        rev = svn_utils.SvnInfo.load('.').get_revision()
    -        self.assertEqual(rev, 6)
    -
    -    @skipIf(not _svn_check, "No SVN to text, in the first place")
    -    def test_entries(self):
    -        expected = set([
    -            (os.path.join('a file'), 'file'),
    -            (os.path.join('folder'), 'dir'),
    -            (os.path.join('folder', 'lalala.txt'), 'file'),
    -            (os.path.join('folder', 'quest.txt'), 'file'),
    -            #The example will have a deleted file (or should)
    -            #but shouldn't return it
    -            ])
    -        info = svn_utils.SvnInfo.load('.')
    -        self.assertEqual(set(x for x in info.entries), expected)
    -
    -    @skipIf(not _svn_check, "No SVN to text, in the first place")
    -    def test_externals(self):
    -        if self.base_version >= (1,6):
    -            folder2 = 'third party2'
    -            folder3 = 'third party3'
    -        else:
    -            folder2 = 'third_party2'
    -            folder3 = 'third_party3'
    -
    -        expected = set([
    -            os.path.join(folder2),
    -            os.path.join(folder3),
    -            os.path.join('third_party'),
    -            os.path.join('folder', folder2),
    -            os.path.join('folder', folder3),
    -            os.path.join('folder', 'third_party'),
    -            ])
    -        info = svn_utils.SvnInfo.load('.')
    -        self.assertEqual(set([x for x in info.externals]), expected)
    -
    -def test_suite():
    -    return unittest.defaultTestLoader.loadTestsFromName(__name__)
    
    From 34d86a4756527e546e6dfa3312548072109eb60d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 09:37:54 -0500
    Subject: [PATCH 4547/8469] Update changelog
    
    ---
     CHANGES.txt | 8 ++++++++
     1 file changed, 8 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index be20e66839..c0ed23a2e2 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,14 @@
     CHANGES
     =======
     
    +---
    +9.0
    +---
    +
    +* Issue #313: Removed built-in support for subversion. Projects wishing to
    +  retain support for subversion will need to use a third party library. The
    +  extant implementation is being ported to setuptools_svn, to be announced.
    +
     ---
     8.3
     ---
    
    From 022f37cb1b0cb2e15dc59a723731f5e7f65ea6ce Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 09:50:31 -0500
    Subject: [PATCH 4548/8469] Move api_tests to pkg_resources package. Fixes
     #312.
    
    ---
     {tests => pkg_resources}/api_tests.txt | 0
     setuptools/tests/__init__.py           | 2 +-
     2 files changed, 1 insertion(+), 1 deletion(-)
     rename {tests => pkg_resources}/api_tests.txt (100%)
    
    diff --git a/tests/api_tests.txt b/pkg_resources/api_tests.txt
    similarity index 100%
    rename from tests/api_tests.txt
    rename to pkg_resources/api_tests.txt
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index d6a4542eca..48b29c4ced 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -20,7 +20,7 @@
     def additional_tests():
         suite = unittest.TestSuite((
             doctest.DocFileSuite(
    -            os.path.join('tests', 'api_tests.txt'),
    +            'api_tests.txt',
                 optionflags=doctest.ELLIPSIS, package='pkg_resources',
                 ),
             ))
    
    From 1d9a53fdf0f2815403bd27cde016ec388d0522f6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 10:19:31 -0500
    Subject: [PATCH 4549/8469] Update API docs to reflect relocation of
     pkg_resources from module to package.
    
    ---
     pkg_resources/api_tests.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt
    index 65dba76d0a..50e04b8737 100644
    --- a/pkg_resources/api_tests.txt
    +++ b/pkg_resources/api_tests.txt
    @@ -171,7 +171,7 @@ You can append a path entry to a working set using ``add_entry()``::
         ['http://example.com/something']
         >>> ws.add_entry(pkg_resources.__file__)
         >>> ws.entries
    -    ['http://example.com/something', '...pkg_resources.py...']
    +    ['http://example.com/something', '...pkg_resources...']
     
     Multiple additions result in multiple entries, even if the entry is already in
     the working set (because ``sys.path`` can contain the same entry more than
    
    From bcb22ab7ceda678893d8b1b6f1cce52cada7aad2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 10:27:47 -0500
    Subject: [PATCH 4550/8469] Include api_tests.txt in pytest invocation. Ref
     #312. Ref #311.
    
    ---
     setup.cfg | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setup.cfg b/setup.cfg
    index 74a172a47a..24dd949d17 100755
    --- a/setup.cfg
    +++ b/setup.cfg
    @@ -21,5 +21,5 @@ formats = gztar zip
     universal=1
     
     [pytest]
    -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test
    +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=tests/api_tests.txt
     norecursedirs=dist build *.egg
    
    From ca7a37ea113e71e32e32e9f0ed02371c7cf17da5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 10:45:27 -0500
    Subject: [PATCH 4551/8469] Run bootstrap in order to purge the file finder
     from the egg_info (until travis is using Setuptoools 9.0).
    
    ---
     .travis.yml | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/.travis.yml b/.travis.yml
    index 0b685c1ab5..5f644e00a3 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -8,6 +8,9 @@ python:
       - pypy
     # command to run tests
     script:
    + # invoke bootstrap and override egg_info based on setup.py in checkout
    + - python bootstrap.py
      - python setup.py egg_info
    +
      - python setup.py ptr
      - python ez_setup.py --version 7.0
    
    From 9dfcbd945d5d93f75a62228deabdf6c7eff02213 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 12:35:38 -0500
    Subject: [PATCH 4552/8469] Removing test data
    
    ---
     setuptools/tests/entries-v10                 | 615 -------------------
     setuptools/tests/svn_data/dummy.zip          | Bin 1771 -> 0 bytes
     setuptools/tests/svn_data/dummy13.zip        | Bin 9243 -> 0 bytes
     setuptools/tests/svn_data/dummy14.zip        | Bin 7496 -> 0 bytes
     setuptools/tests/svn_data/dummy15.zip        | Bin 7506 -> 0 bytes
     setuptools/tests/svn_data/dummy16.zip        | Bin 7155 -> 0 bytes
     setuptools/tests/svn_data/dummy17.zip        | Bin 7512 -> 0 bytes
     setuptools/tests/svn_data/dummy18.zip        | Bin 7639 -> 0 bytes
     setuptools/tests/svn_data/svn13_example.zip  | Bin 48818 -> 0 bytes
     setuptools/tests/svn_data/svn13_ext_list.txt |   3 -
     setuptools/tests/svn_data/svn13_ext_list.xml |   0
     setuptools/tests/svn_data/svn13_info.xml     | 121 ----
     setuptools/tests/svn_data/svn14_example.zip  | Bin 31077 -> 0 bytes
     setuptools/tests/svn_data/svn14_ext_list.txt |   4 -
     setuptools/tests/svn_data/svn14_ext_list.xml |   0
     setuptools/tests/svn_data/svn14_info.xml     | 119 ----
     setuptools/tests/svn_data/svn15_example.zip  | Bin 31143 -> 0 bytes
     setuptools/tests/svn_data/svn15_ext_list.txt |   4 -
     setuptools/tests/svn_data/svn15_ext_list.xml |  19 -
     setuptools/tests/svn_data/svn15_info.xml     | 125 ----
     setuptools/tests/svn_data/svn16_example.zip  | Bin 29418 -> 0 bytes
     setuptools/tests/svn_data/svn16_ext_list.txt |   4 -
     setuptools/tests/svn_data/svn16_ext_list.xml |  19 -
     setuptools/tests/svn_data/svn16_info.xml     | 125 ----
     setuptools/tests/svn_data/svn17_example.zip  | Bin 46954 -> 0 bytes
     setuptools/tests/svn_data/svn17_ext_list.txt |   4 -
     setuptools/tests/svn_data/svn17_ext_list.xml |  19 -
     setuptools/tests/svn_data/svn17_info.xml     | 130 ----
     setuptools/tests/svn_data/svn18_example.zip  | Bin 47477 -> 0 bytes
     setuptools/tests/svn_data/svn18_ext_list.txt |   4 -
     setuptools/tests/svn_data/svn18_ext_list.xml |  19 -
     setuptools/tests/svn_data/svn18_info.xml     | 136 ----
     32 files changed, 1470 deletions(-)
     delete mode 100644 setuptools/tests/entries-v10
     delete mode 100644 setuptools/tests/svn_data/dummy.zip
     delete mode 100644 setuptools/tests/svn_data/dummy13.zip
     delete mode 100644 setuptools/tests/svn_data/dummy14.zip
     delete mode 100644 setuptools/tests/svn_data/dummy15.zip
     delete mode 100644 setuptools/tests/svn_data/dummy16.zip
     delete mode 100644 setuptools/tests/svn_data/dummy17.zip
     delete mode 100644 setuptools/tests/svn_data/dummy18.zip
     delete mode 100644 setuptools/tests/svn_data/svn13_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn13_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn13_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn13_info.xml
     delete mode 100644 setuptools/tests/svn_data/svn14_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn14_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn14_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn14_info.xml
     delete mode 100644 setuptools/tests/svn_data/svn15_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn15_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn15_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn15_info.xml
     delete mode 100644 setuptools/tests/svn_data/svn16_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn16_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn16_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn16_info.xml
     delete mode 100644 setuptools/tests/svn_data/svn17_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn17_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn17_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn17_info.xml
     delete mode 100644 setuptools/tests/svn_data/svn18_example.zip
     delete mode 100644 setuptools/tests/svn_data/svn18_ext_list.txt
     delete mode 100644 setuptools/tests/svn_data/svn18_ext_list.xml
     delete mode 100644 setuptools/tests/svn_data/svn18_info.xml
    
    diff --git a/setuptools/tests/entries-v10 b/setuptools/tests/entries-v10
    deleted file mode 100644
    index 4446c50137..0000000000
    --- a/setuptools/tests/entries-v10
    +++ /dev/null
    @@ -1,615 +0,0 @@
    -10
    -
    -dir
    -89001
    -http://svn.python.org/projects/sandbox/branches/setuptools-0.6
    -http://svn.python.org/projects
    -
    -
    -
    -2013-06-03T17:26:03.052972Z
    -89000
    -phillip.eby
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -6015fed2-1504-0410-9fe1-9d1591cc4771
    -
    -api_tests.txt
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.948712Z
    -dec366372ca14fbeaeb26f492bcf5725
    -2013-05-15T22:04:59.389374Z
    -88997
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -12312
    -
    -setuptools.egg-info
    -dir
    -
    -README.txt
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.948712Z
    -26f0dd5d095522ba3ad999b6b6777b92
    -2011-05-31T20:10:56.416725Z
    -88846
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -7615
    -
    -easy_install.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.948712Z
    -97b52fe7253bf4683f9f626f015eb72e
    -2006-09-20T20:48:18.716070Z
    -51935
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -126
    -
    -setuptools
    -dir
    -
    -launcher.c
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.924700Z
    -e5a8e77de9022688b80f77fc6d742fee
    -2009-10-19T21:03:29.785400Z
    -75544
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -7476
    -
    -ez_setup.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.924700Z
    -17e8ec5e08faccfcb08b5f8d5167ca14
    -2011-01-20T18:50:00.815420Z
    -88124
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -8350
    -
    -version
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.924700Z
    -e456da09e0c9e224a56302f8316b6dbf
    -2007-01-09T19:21:05.921317Z
    -53317
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -1143
    -
    -setup.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.924700Z
    -d4e5b3c16bd61bfef6c0bb9377a3a3ea
    -2013-05-15T22:04:59.389374Z
    -88997
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -5228
    -
    -release.sh
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.932704Z
    -b1fd4054a1c107ff0f27baacd97be94c
    -2009-10-28T17:12:45.227140Z
    -75925
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -1044
    -
    -pkg_resources.txt
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.928702Z
    -f497e7c92a4de207cbd9ab1943f93388
    -2009-10-12T20:00:02.336146Z
    -75385
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -94518
    -
    -site.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.932704Z
    -ebaac6fb6525f77ca950d22e6f8315df
    -2006-03-11T00:39:09.666740Z
    -42965
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -2362
    -
    -version.dat
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.932704Z
    -8e14ecea32b9874cd7d29277494554c0
    -2009-10-28T17:12:45.227140Z
    -75925
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -80
    -
    -virtual-python.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.932704Z
    -aa857add3b5563238f0a904187f5ded9
    -2005-10-17T02:26:39.000000Z
    -41262
    -pje
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -3898
    -
    -setup.cfg
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.932704Z
    -eda883e744fce83f8107ad8dc8303536
    -2006-09-21T22:26:48.050256Z
    -51965
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -296
    -
    -setuptools.txt
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.940708Z
    -11926256f06046b196eaf814772504e7
    -2013-05-15T22:04:59.389374Z
    -88997
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -149832
    -
    -pkg_resources.py
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.940708Z
    -b63a30f5f0f0225a788c2c0e3430b3cf
    -2013-05-15T22:04:59.389374Z
    -88997
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -90397
    -
    -tests
    -dir
    -
    -wikiup.cfg
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.944710Z
    -34ad845a5e0a0b46458557fa910bf429
    -2008-08-21T17:23:50.797633Z
    -65935
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -136
    -
    -EasyInstall.txt
    -file
    -
    -
    -
    -
    -2013-06-19T13:20:47.944710Z
    -e97387c517f70fc18a377e42d19d64d4
    -2013-05-15T22:04:59.389374Z
    -88997
    -phillip.eby
    -has-props
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -82495
    -
    diff --git a/setuptools/tests/svn_data/dummy.zip b/setuptools/tests/svn_data/dummy.zip
    deleted file mode 100644
    index 1347be53eb29eb8e4b9e0afe82372630708b3092..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 1771
    zcmWIWW@Zs#00GOn>CRvVlwbqWDW$o&mHGidHC$j(rCF$I1mS9&JskbqU4!*XDoSuG
    z7egrb_X`Q~bP5ge4}$A~I3pU(89Z=3gd79X4^aalOHzwV@ViGGO-FouW?p7Ve7s&k
    zC2mh3{OsWw40L}aemi*KcKCQYyZQyYf=mWEm4o3rFf^mW7Tt>n@;ZSSVY08IpQoE^
    zaEM-JUTn`^t_B4O*Ybnq8GNr~fBp1WC~~DOtynb>;$3WF*}
    z-2N1RJ3PqM(Z$yl)tizaw{P54;Q~|z!hCSm#i=Ew1;7wYE6UGR0CP(6^K*(7GII;^
    zi%K9Oyj)-jjl9I%R9kg$bgAnol%*CGXXfYGsvGDT>KUqQ@^S@uGcwsT;7Xq=Ks!MI
    z^=|W;%?Rag`si=vDv*QxV*Fq|yZ0iVJgU*%Xm72P~7|^ML@04;YwW
    zfrKa`kZpkF4VcL=8rcTSf&|$UdT<+H#R{_dRdK(JKzR>lE{qQFW(Cz=4BS9y&ceVj
    J4`>Pl0|35xlF|SG
    
    diff --git a/setuptools/tests/svn_data/dummy13.zip b/setuptools/tests/svn_data/dummy13.zip
    deleted file mode 100644
    index 47764342d7c76f44ef5f210abc609f4c6a268574..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 9243
    zcmc&)2~-qE8Xgo8xe-K=AcG=0gO9u5D3pP{w(+BTN{?R}nu%b)=wm~as{W66*S1wcC{XAN^&C~W|r^dFl
    zb6K`ob&ULTS=QRBeX;AEu5CN@!`CeW>&>Gz&sKzWH%Cq#e)L4u2tcx}0Z!CW}z9-{9hKh2}
    z2hF~P1~;Xnk~7cbu3LM_{Cr7>OO3bd2NL_z#IqH*niALiSoF=SF-uj)7P|&k)t;+(
    zk`*waO!G@zb&{sqf6S`CZ*LJ*b#}g}o%@%V($y*}zl6gLTfJ9rxn@f`W~ZsgnZW1~2;LZSIl0Q5
    zF>}*YGAyLYMJyb!NTpj~OrunKh)dEbg9@k*E3jiF!C{dSvARGVw8qO~g{PHa_Y}>U
    z`jfvtUK{qn-2O<&vz^EKHgtZpa@<*4pKn*LiaMR|yzXGQ+*guVy*#GcRDK|9TPDVI$FG-_Bv(SKl4@U8mMKP)~
    zlc{Ic;ktq_YCZV4^XpN`)F0=Fa~A5fWaKKdh4gpTN@bQxD9_GO=Bl;dF*l)q;I2r^
    zmIaCEFcXay=E-tZa-||j>OQcvI~GC*W@kc`
    zB5x6)*+l8Fz*f=3ustG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z7{xw|qUSFt@w6hRPJ0~}0MeiO6$qRp$im%wB<>T3g$@a%Q4oftJ%8Z(V>hZ>!NdsV
    zi?Zo7BYaoL2@<&rOptPxeozk>i3;aOC?Oc`F7nLfq$2^`wUrx$dzw7>B9G=oO2kP!
    zO)}pf!C3;#c`ZC}?3uFNI+-qWP>zqBN#B#y@R<@N5WpHi#UzXb?f%gIV^5YO9e9su
    z3Fvntluq4+ya+-enH!3`;K5BIr9L>s48U#ShhvsJ5(3^MD6Y3Y_=a8PhCP>L)#em*U3_CECTDsi$UJU%F
    zZ^Fl3GH{w8{m@dI6{N(@siX^-%`?o5+vCJY0DTN4)7RYP(nZG=1nok8pm&!i%xJ37
    z56R3GGHBtwzTjmte9RB`zXUM1Q=J)3^``!sfTPBN*M(d?9C9Kh&XMdF%n?Y*4afxs
    zLxhxgdXT-`PRCA2h0J~y7|ch!>cE)+c33F&;h=g7aBi}2u)O=dP^hT`C>!ecJaEIX
    zQymuwoPD6w$H$W4w=fLk_35qm03htRUNyq509bs40br*z9OQEO5+fIC{(*1Mpw!1=
    zAcKVg^)3{;io4&york)i#4*_K9C0FE7zR9b;VcT1yS%|X3N=G1oz{;!bO;2V)W5lu
    L$99AFwu1ix{F!sx
    
    diff --git a/setuptools/tests/svn_data/dummy14.zip b/setuptools/tests/svn_data/dummy14.zip
    deleted file mode 100644
    index 02ed8cf08457e9183d39aadddf6688be2f728a52..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 7496
    zcmc&(4Nz276y6mvTtN{HP*OofNVa7$)WjI&XAwhw?R0u;*
    z)UqtGA2AhwDnr9e$r?m0NyR8DEzK~e)X34^ean6Kyu0^3n9-Tu%zAim@A>XI=Q}@l
    zjf=AD+E;;|v9He!<9}%X$AOb`78;F<0|NcygjE&PDkrc?V_uXcEOk(nb4zzW`eS{P
    zQlaSEmHW_3^;wo2gWg!JEr
    zZx)zW#td^<akHTL0yRyn9o3
    zu8285D>w7><(y5GZlT-NC-a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/dummy15.zip b/setuptools/tests/svn_data/dummy15.zip
    deleted file mode 100644
    index ed8daeeba491cf3e4807d75c208392d4baf68fdd..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 7506
    zcmcgx2~bpZ7~ka*RzX%A6_HwyWARu(3@Dxebis%$FaY3{%~jLEUUp#7Wqo}WcyQ9)Ki||DV4d{Xn)jQ@-g$M)osttY^g-j
    zhZ*;X~tHgKC#4m;Csfv|63=
    z^n&-V^F!q8p1k4G
    zzPIXMidPLSJ`iG5HKu8fO+BJHT^E#?f1=Dd?AGDZ43D_MQP;n2iSBs1OF2HLYMLr~
    z%c-{Vg6gk+ZEJ3`2F9sh4$lkUH^=AGdnv>AFL*b3VR_*VYy09@{pvol0heS=X62@|
    zReEc^v!ooQ#dA3lom%#qWRT#GKIAhYm+xp~*1QGD=2*jaXRT
    z&L4egmLgMO(a<+$nsxTDOC&Ut0}f&`0|t~Qq9_(!sfD1}tf83()2b1sxcJ!AiQ06P
    zrPPAbj+I2*LJNuz5i}_^V@ksKsTq@|bXA&&TJZ_#jG$>lC_ZECufV;ib9
    zTLoslw)T83bNYb!ifEG(o0>2|o1UT48|{L!D|gA}EBa|m_LLNOwfjGM82?r8<4f|)
    z-hq3Ew_o4BC*adDHRe&pC#Pqo#BR!%F{EL)dV+_n;E~6ZZw7k$jmuje6R|Py%$#`0+j7m11+KPz!_etb*f3BlSaSCGc}@rNYt%RVK{P
    z57-q)RTF7Dv#5sP1-Mw}1JBX(2&!az7Dd?3V5^A{!9U-wXM`SOCR2Y0;VeVvY}&Uh
    z)@wn8xAuWg&%a&g>%&gpAF%bT_xiZsGZW(`);0FkB~;#+yX9%snvQ%)&6;uJZaSaZ
    zym`PmW#tEM6*GRg77-JYSXZ#B!|E2*OPlSUR{Lu0_lc)=hUpeY9eAjWY_6WWG&;1s
    zBW!l=XE&15V-|N9R~)<&Sb5I%gkpBBVcy-dJ9JqqUw=IKexGZmjYXl=14jne+^A_)
    zU!1l!uulGA>+yS8ht!XQ9>*>TGao8>vipz^@jdb)?DxL>hB|hA+Wr3gjC|=xvkG87
    zD)mTSVFi!*2gXGQZ)41>_Qum7A+K>Mgmsu#b>5rd5Nr3B_?b
    z0qwy60UbKanv6x;5=XNOd9n*#K?Iq2fTSDU8~QjXjy*5TztnGVcXC=$uv1QG@*1bCI7eKNISL{P@YUfVyrLH9}Gcn@I0P+FJ{T6S
    zh(SdkgpNMAj${%AdzMQ2Np3ff+A;9#F)60X3WEimCnpifbbt4hV9Cf2AwV+QwxRgq
    zig$VkG2$?F6wh}@!QxT+r_tg&rvgM-<=cZr!SwyxF6`N6gwW~@QT~z=_pnCTS~3LD
    z{8`R=hNjR{F4WZQYxfk2fe*9t;~20Yqlt(h^y5Ix<%8hwf>=0B
    zp*=Jhx7{`ffjxgG@ky%Aq`h_N7zNYy
    zRvSjJvmH}0kbd?!A&?9RLbbWBBk`}pUUnpubQJ)}wva>lrq{DBplt+Gt|d14^manr
    zg|?F&4)Rg;aMBv@CYWL{l4*Q5R@khr@`LbfDi<@lvD1*IFf{1?z`Zm=td?#h{@@1V
    zxUYl+=d!+|DKU!?MC~j7oY;6Uub=V00-*To^~l~CEF4Y6;Cwl78euqY#nKS?458?$
    z&b6$ZABw+b@ivJm7mj~}QQ0j+OT><6!QpF}XlKVA9aESyw7HQSd?ydyKoWDo6^~a1
    zJilow=5cN_P7_dp8ZmTTaDC0+Py+0>qK2|W80f_%E;pO@i9>Remo7(q7IP)nLJ5;{
    zJY|XAGLneGE{YQuQ?65O2}}>2K6a-n7^jYPfW#RKasJEPAuRymm>qCHWSZV+>4Ti*kG?0u4C`Fz}uW5$5DP8isZnEE&_uNv_QBMgPs9lsGYO
    K_(%6Zr+)#7&13)o
    
    diff --git a/setuptools/tests/svn_data/dummy16.zip b/setuptools/tests/svn_data/dummy16.zip
    deleted file mode 100644
    index b6e98d6c40a392cfd9c3f5413f5b91193f5d8a32..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    Hc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pEAz^k}OFuMdV9i*L
    WiS0;tM09KKMfIcee=n_vqW%G27!pVT
    
    diff --git a/setuptools/tests/svn_data/dummy17.zip b/setuptools/tests/svn_data/dummy17.zip
    deleted file mode 100644
    index d96e15133499e6e6606d2c5893cd230e9a5508bb..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 7512
    zcmcgw2{@Gf*B<-6r7RIjh3sQ2gUB+nlbr}-M%l)g8C!^wT?nNt5mDAiA(gdcsmPio
    zl|8bhBx3$E(>oeU*Zcjy@A@9sIP>s3=RWuOEzfywV?7GW-2nWhpK)4)@a3Ohv^Wd%
    z_VDnRmX|c%9Cc~iC?=9o5@;U;VJJNz1Osm9z>Gm31?~?2!NU*(5{AMN7?cYfEe)i{
    z$N#ev`*tU1Pn3rv<{zJ*nQzaDW4jL$<$}hzAmD%D!M&po7_{j|3&2C!SY!{|PH+V&DS0_Z7zifq=m>R$Il<)}Wu-w*Km{2mDFsJ)DR~&a7~)VzG~6!s
    z34MqF7sR*T_YCv&zSZyAH+Of3JEK_-G=QdO%j@^2D5aypK7A*x4AkzJ*@``=J*q`V
    ze`b|#qezg6=a_SX%%L+%&o!O32FQ{^F3TuZb)Cx7Ef8y+=lSL*b(U=BS=^bulOxHD
    z64;kj`)T4><3BsI$GJH<%EG`haA_C}CM_iem63Ilat6U=CcN|XNs`x6miTpubnC4++dC}U`H7^Tox_|1wo}?GC)~bs59IdEGs7^
    ztpJvCbcQKN$xDGZDegQ2Y&gU%n*-y4+_vt5T`$
    zi!UIxkwGM^Q#Lob8bifoyth)P3rXAA^oU2BUE8E}AGl0|39LJUV4%HO8Uk1hf4blA
    zSjba$frJoFN|uEt@%@y$ltWk}XUHxluxd*=DV1e}8f1lqz36+x*ZyM(D>Dk-;Kq*T
    zNyLa0yclo0l6?oYr={nStj{fxX|C3f+HF%~^EzKwC487E
    zaRMSZ1A2wc(Js4R>x-4~#=#r(^7R@&hPt)2XdZYeCKQIWd2ccLy3K-0VsA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LeHXeV0IdEEX$T)=+-xEFXm
    
    diff --git a/setuptools/tests/svn_data/dummy18.zip b/setuptools/tests/svn_data/dummy18.zip
    deleted file mode 100644
    index a72678384d629814afd32ae1afd2eb72631ac9b3..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 7639
    zcmcgx2{@E(+a|J=CA-MJM2s2xB-!`1NZB)HY#Amq*6d{og`^>CQIblOC6tgP`<5j;
    zDKdFgBxJrB-qDjc9q<4B|M5SL$2H4+U*~mR_jWz!m>E(~vXT)mlS~)QjTe9aqaj$h
    z4-y#wQIa;>Y8AV!6+NI82<_{+(Ufk(1tX#9;78*=3c@?$O@tvi+-QpM#CW?Q&=46q
    zqW|A_V%grw*~=U0i21wEX5`yrV&C2eZZu>>C~M1`BMyY-
    z7YVn)pSnTiV9rhmB`{b~!4WP8hd4UI9N|s~MMrsvoRf@_tP@ztQ4y>NCniG*=7>hv
    z#XqGBmyM9lIo?Fd1QC7rNxlzkmXOKKOEJ^loMYsKJgS(Qi=efW6g9FKT9>ty6J2?VI
    zbc20yrN0(|HSyk=J)xVEqdXici-5r4a0nO-la+S@JIf(t6_w!faxfVfl#mZ7*ck%e
    zV(;wjh2%#gFg_@ZmzM{c-wlcK^2Tg_LQl8x#X(O;Btk`OV-|@?^7|sZ(QaOzDq>&|
    z1OyQir{9=Jzn>I4Q-p7)NMN>g?M#u-4elrlb(BRQ8uD3)oGUn~g{hUB>7|zbhV^WKg
    z_nboX9`UNTxXN2sD_M)_J<9dd<>>v&7RtgE#F4K{CLU(=-w2nR5f#716X8uusd1#1
    zf>}f3$U;~mQ-qkmnqFAN3#r;Y6HJYJj-Y6Smm7Uy%G7xs-iT+S3;ye&mqTC5;(72D
    zao85;=DUgFtS6^Rz?XdmqSQI)c4>UjSkAg^G#5P&YF42bCI712F~Rx$#YeJemQamP
    zruC|m^9$w6+-tknFU-IyJ8Bqn51549%~l_%zG?4pIP3i9q^VMG^(yQ%2Q04Xl{M!E~m<+r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V8Umu<`xwLUK^hiaC4v4#x3zcO6^hJW
    zBq7BF*HBz`BMCK4PxP93D1?RU0;pGk-4%ceF>+T~mY^l}7XuCBiL*snba*DCZ<6vU
    z0_vYu#7SY?;H41=52z3&bi$NS(^HWCIe$S0H3um;xP}T~KWc=YK%2u`F(=RnC^T?7
    zl0s-jPFT}Rp%S=T1E6<6<>?`&l}8#HL0fr_;+w=pGU&A%LtBtC9<=yx={w{Upw-~(zF0*y<)Q5ZD8?*Vw+
    z_qZj;-y(Y{44$hu1hSHpFXrHxDYV+H2Pw2V7ch{Lq*7p5+tG-F&x<7#@MK
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -normal
    -2013-07-13T15:33:23.187500Z
    -
    -
    -ptt
    -2013-07-13T15:33:28.359375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main/a%20file
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -normal
    -2013-07-13T15:33:21.109375Z
    -a6166e5e98a5a503089cde9bc8031293
    -
    -
    -ptt
    -2013-07-13T15:33:21.312500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main/to_delete
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -delete
    -2013-07-13T15:33:28.140625Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:33:28.359375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main/folder
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -normal
    -2013-07-13T15:33:26.187500Z
    -
    -
    -ptt
    -2013-07-13T15:33:26.312500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -normal
    -2013-07-13T15:33:20.109375Z
    -795240c6a830c14f83961e57e07dad12
    -
    -
    -ptt
    -2013-07-13T15:33:20.312500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn13/main/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn13/main
    -d2996769-47b0-9946-b618-da1aa3eceda3
    -
    -
    -normal
    -2013-07-13T15:33:19.375000Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:33:19.609375Z
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn14_example.zip b/setuptools/tests/svn_data/svn14_example.zip
    deleted file mode 100644
    index 57093c0b7cc51ace56f71c7eadb4c450c6814493..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 31077
    zcmdsfd0b8T|Nl+2NQ)&)qN_qmi15>dxM
    z{}(Rwm%2Z6fQ(Cs>R}%oHZ>$NCL+vwh{Au{lJ#$`z@_pFG(;X?@ZnC2+#4qqQ%Mb5skiX)C*nJ_)10l
    zK9l#(d{q=Eag}Jd9-Y?sNz47)lTyqUXTJ%OW+iS)J6B@+@6Fi7`pNU`TpquUzjfEp
    zd8FP-Y3s;CBOkt5zU|uJj^i>nMw`EhPL_(GZ5p&6j*C{@(NqzMR2qpy2HdKKMM+~N
    zVR38yjzpE%G`l-*hFfy~=5Gr-@A)#fTNMoLI0kqi7YC+7d*I2(a=%PDx0qf{$hXpw4}42S(*9Rb&H}0
    zm-W`^Cspk;EqQ)x`j!QYB3gCYJJ#K}AS*#J$@kjVb(YWD$IXgb26?9C
    zzCF|4e^OA!qch|DG@o7@To`+CyvdGxA)^mjuJl@c;K`-n_qH9c6rXJEd(HTc-dgXB
    zO>Xy0#l6G3neGVl{r2ZOk>uRc8(&^(f2JMS6u3$x>H}hJ;F)~@_)bK9+JO(ANOW>c
    zjE;>Ak@ji|JuedVCN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&z*Zr3nm7R*8#sVuGsNRvZ3@1(bzfG1nlz^iPFJ;HwK7A)2QDs7yUm=
    CQJJFv
    
    diff --git a/setuptools/tests/svn_data/svn14_ext_list.txt b/setuptools/tests/svn_data/svn14_ext_list.txt
    deleted file mode 100644
    index 800a09659d..0000000000
    --- a/setuptools/tests/svn_data/svn14_ext_list.txt
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -third_party3 file:///C:/development/svn_example/repos/svn13/extra1
    -third_party2 -r3 file:///C:/development/svn_example/repos/svn13/extra1
    -third_party -r1 file:///C:/development/svn_example/repos/svn13/extra1
    -
    diff --git a/setuptools/tests/svn_data/svn14_ext_list.xml b/setuptools/tests/svn_data/svn14_ext_list.xml
    deleted file mode 100644
    index e69de29bb2..0000000000
    diff --git a/setuptools/tests/svn_data/svn14_info.xml b/setuptools/tests/svn_data/svn14_info.xml
    deleted file mode 100644
    index a896a77f74..0000000000
    --- a/setuptools/tests/svn_data/svn14_info.xml
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -normal
    -
    -
    -ptt
    -2013-07-13T15:34:14.406250Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main/a%20file
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -normal
    -2013-07-13T15:34:08.109375Z
    -a6166e5e98a5a503089cde9bc8031293
    -
    -
    -ptt
    -2013-07-13T15:34:08.390625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main/to_delete
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -delete
    -2013-07-13T15:34:14.125000Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:34:14.406250Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main/folder
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -normal
    -
    -
    -ptt
    -2013-07-13T15:34:12.390625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -normal
    -2013-07-13T15:34:07.109375Z
    -795240c6a830c14f83961e57e07dad12
    -
    -
    -ptt
    -2013-07-13T15:34:07.390625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn14/main/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn14/main
    -c75942e5-8b7a-354d-b1cf-73dee23fa94f
    -
    -
    -normal
    -2013-07-13T15:34:06.250000Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:34:06.531250Z
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn15_example.zip b/setuptools/tests/svn_data/svn15_example.zip
    deleted file mode 100644
    index 52a1d45bb7516bdf8acf951c5e6ccaa39c5de500..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 31143
    zcmds9d0b6f`#(rjO6HQQBhsij5fv#{g9@2aNJ1Lb$t*J=WJoXfQWi*IJW5U!JTgNfs(?g@Sr
    ze7Csx*tl-vLKDI_U$xa-WTU(IVUph(Ez2W=HY^U*+LJam!lFTjX}(_9zST98v-iDR
    z_17$0@UI803`17j^gBDh
    zapQnHm|)pIbYm*@yF7o|7sU^@}K@kURp>Te>t0Pq3yUV-{wlit?i3T)_Oi4nf$X$
    z+^eOlQf(~rQ+srY(hob(P3zO|4wWsk)6yea`$w1Z**t!nv?q<-)*-ky=Oc3$vNHhznsl3I(D&gdC}t`x9={}(;S%a
    zy>C+R+J2gICjOchxFddc~IqprcLt;W=}Hat+>eRkis
    zW4}CzQhTP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x~v9c*TcV0Buj=BZj~k3$e5qWTqH=doE9AVid)N3-RGdXCVNPALJX(Gx>3;
    zM>TMMdPH_+GZ5Lt9plI2XyRxrcuwnxGY#3qCED@Y7Ew!mOp7y0XE~#Yfw>>@!$Jzd
    zK_QFMBeE~MnM1G0GmAl<_B^_>pM$`yQ}Av8-W?!7SuaO^g#q5nEl>`~(aJ$wIQnI^
    z!R`Q2!r-kOaw=2GHaaL(l-
    -
    -
    -third_party3 file:///C:/development/svn_example/repos/svn15/extra2
    --r3 file:///C:/development/svn_example/repos/svn15/extra2 third_party2
    -file:///C:/development/svn_example/repos/svn15/extra2@r1 third_party大介
    -
    -
    -
    -third_party3 file:///C:/development/svn_example/repos/svn15/extra1
    --r3 file:///C:/development/svn_example/repos/svn15/extra1 third_party2
    -file:///C:/development/svn_example/repos/svn15/extra1@r1 third_party大介
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn15_info.xml b/setuptools/tests/svn_data/svn15_info.xml
    deleted file mode 100644
    index 0b3550afb8..0000000000
    --- a/setuptools/tests/svn_data/svn15_info.xml
    +++ /dev/null
    @@ -1,125 +0,0 @@
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:34:49.562500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main/a%20file
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -normal
    -infinity
    -2013-07-13T15:34:43.109375Z
    -a6166e5e98a5a503089cde9bc8031293
    -
    -
    -ptt
    -2013-07-13T15:34:43.484375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main/to_delete
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -delete
    -infinity
    -2013-07-13T15:34:49.125000Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:34:49.562500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main/folder
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:34:47.515625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -normal
    -infinity
    -2013-07-13T15:34:42.109375Z
    -795240c6a830c14f83961e57e07dad12
    -
    -
    -ptt
    -2013-07-13T15:34:42.484375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn15/main/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn15/main
    -4eab6983-54fe-384b-a282-9306f52d948f
    -
    -
    -normal
    -infinity
    -2013-07-13T15:34:41.375000Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:34:41.734375Z
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn16_example.zip b/setuptools/tests/svn_data/svn16_example.zip
    deleted file mode 100644
    index e886b2afde2150efda58d1f7f999e43846ac721f..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 29418
    zcmdsAd0b8D|G!x(p^}i2ZrLidXDOmo6k%*plGLTEy>6Q*gsjO{ld)yVz7%80k~KRi
    zN({1O$zUvFtKoOfxjpwh&vVW__uQI4=KH(zx;`CW=XrnD_vdq#r|-z2jhpBS$d7o;
    z8yD(_x<51t850+7-OFE;5D*p_DzY3Y_usZ={96m+RM`pYf?#6tf?I1%5{ZBKp7;vc
    zPY4o6_l%5=i0nBfAV#$Q`f-hORxRc~_8VcG-!4bbA;J96dJRLzHgkgMOrnmlih3;L+q#mvM_q=1X*l3ESaq0Ix
    zLD925xtK={xqmj^$3A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L4qUVP&KmQ0(>C3ijaQXK;ouy
    zBGnKjh0`22_xnOOPu6oHnjUqQ7C-0fXXl~qn{5dxm
    zqmLIj=23kdWDpZk+Q-qY!7!b6Hs$bY-P0SEK0di(9|a5)DA1hEFcqf_v}{kCDF$Yz
    z3}7TK>GWmBlr9^RveeD_VWV_`C^kD)pnZI`QrHl4ur@2*
    zsJTe0gJZm$31`bb^qfv!QK}NZ*HHoCD4k@CA|%|cW5o#zD1<*K`*TWquLs%fcrl`9K5!1torIT1kNlCBr#^hW0{32kb_3mT_hO4!otZc|eoUaTtUAwHE7-)e@E=SNsO#0v6R-ymN_b%Zg
    z26+Y~oA>d2Ltl7`;|KchUO-`%`f**$Ft`ieN#zDM0+$RJe_QC
    dxbfTq$0LU}RV9`bq!9nLbs`?x6Ke|u{|AJ}{!0J=
    
    diff --git a/setuptools/tests/svn_data/svn16_ext_list.txt b/setuptools/tests/svn_data/svn16_ext_list.txt
    deleted file mode 100644
    index 3ca54893cf..0000000000
    --- a/setuptools/tests/svn_data/svn16_ext_list.txt
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -"third party3" file:///C:/development/svn_example/repos/svn16/extra1 
    -'third party3b' file:///C:/development/svn_example/repos/svn16/extra1 
    --r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2
    -file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party
    diff --git a/setuptools/tests/svn_data/svn16_ext_list.xml b/setuptools/tests/svn_data/svn16_ext_list.xml
    deleted file mode 100644
    index 8ddaed0a19..0000000000
    --- a/setuptools/tests/svn_data/svn16_ext_list.xml
    +++ /dev/null
    @@ -1,19 +0,0 @@
    -
    -
    -
    -"third party3" file:///C:/development/svn_example/repos/svn16/extra2 
    --r3 file:///C:/development/svn_example/repos/svn16/extra2 third\ party2
    -file:///C:/development/svn_example/repos/svn16/extra2@r1 third_party大介
    -
    -
    -
    -"third party3" file:///C:/development/svn_example/repos/svn16/extra1 
    --r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2
    -file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn16_info.xml b/setuptools/tests/svn_data/svn16_info.xml
    deleted file mode 100644
    index 745469c958..0000000000
    --- a/setuptools/tests/svn_data/svn16_info.xml
    +++ /dev/null
    @@ -1,125 +0,0 @@
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:17.390625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main/a%20file
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -normal
    -infinity
    -2013-07-13T15:35:14.578125Z
    -a6166e5e98a5a503089cde9bc8031293
    -
    -
    -ptt
    -2013-07-13T15:35:14.906250Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main/to_delete
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -delete
    -infinity
    -2013-07-13T15:35:17.046875Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:35:17.390625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main/folder
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:16.406250Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -normal
    -infinity
    -2013-07-13T15:35:14.078125Z
    -795240c6a830c14f83961e57e07dad12
    -
    -
    -ptt
    -2013-07-13T15:35:14.421875Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn16/main/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn16/main
    -bd8d2cfc-1a74-de45-b166-262010c17c0a
    -
    -
    -normal
    -infinity
    -2013-07-13T15:35:12.171875Z
    -d41d8cd98f00b204e9800998ecf8427e
    -
    -
    -ptt
    -2013-07-13T15:35:13.906250Z
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn17_example.zip b/setuptools/tests/svn_data/svn17_example.zip
    deleted file mode 100644
    index ba0e8823fe5849788881274d87ba878a6e52d43c..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 46954
    zcmd?R1ymf_*7uDB2_D>n6M{=)jRtoK8Z)aw23eRfx!I{R09m$DrEJzSW(mxJ1l==V3j{D*P3&)J5Z
    z=Q-Hb(Av%l%&PnkKa2B+&$2*GzZ;-@m$QM2&uuA8!$beN+lc?%0BqxEZw_`~=Rmpp
    zu0J;=`g2ngTYGCm$6qY}Hli0ljEMBlE$!^h9URSVemlM&Ey@3hB`4rFW4$wO{vs@i
    z4mG;ll>fOgCxC~S%g~6^h@F?6+lUir!okS_1hVn+0yuyiyzBswF{cS9FE{8es?0`)
    z4qz&4TYE5tiIWW#1^V|`{rQOhncqgBAN+3L*nETu_4jW3XMRJCjX=C?U?W2yn8%Qv
    z4a8>1#lvpM$<4zH;^JU40s*;s0VV(=LlDQWeoNb0xlu^j8=71FXPz4y{@^*(;lIEB
    zndeYrV?zMY5C8^qfuZp>VlxJCaB&%#fK7m0+-&T;KsG}YV_r5MHsIeq|HlVE0rY!+
    zf1-Rp_#Lh7zPot$%OHP0yJVHF(kSjut7sS)!ap~10kIex?dW+}F{u&?*O)#ZpVLu`
    zP@kliASmI#(vPZ~d%;|n|5<&Hs~J$z>D=Ia_C;UZjMW$G_UKv+E5x5d|Na4Hh-;X5
    zv@6Y*5M)ZS2mTHwCTmrg&Lz_&YtzoFX?vb){Cj6E1xJNLy-p#_8pU#=>FBWhS&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
    -"third party3" file:///C:/development/svn_example/repos/svn16/extra1 
    --r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2
    -file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介
    -
    -
    -
    -"third party3" file:///C:/development/svn_example/repos/svn17/extra2 
    --r3 file:///C:/development/svn_example/repos/svn17/extra2 third\ party2
    -file:///C:/development/svn_example/repos/svn17/extra2@r1 third_party大介
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn17_info.xml b/setuptools/tests/svn_data/svn17_info.xml
    deleted file mode 100644
    index 6cffeffd2e..0000000000
    --- a/setuptools/tests/svn_data/svn17_info.xml
    +++ /dev/null
    @@ -1,130 +0,0 @@
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:36.171875Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main/folder
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:34.859375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -normal
    -infinity
    -2013-07-13T15:35:32.812500Z
    -bc80eba9e7a10c0a571a4678c520bc9683f3bac2
    -
    -
    -ptt
    -2013-07-13T15:35:33.109375Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -normal
    -infinity
    -2013-07-13T15:35:32.343750Z
    -da39a3ee5e6b4b0d3255bfef95601890afd80709
    -
    -
    -ptt
    -2013-07-13T15:35:32.687500Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main/a%20file
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -normal
    -infinity
    -2013-07-13T15:35:33.187500Z
    -43785ab4b1816b49f242990883292813cd4f486c
    -
    -
    -ptt
    -2013-07-13T15:35:33.515625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn17/main/to_delete
    -
    -file:///C:/development/svn_example/repos/svn17/main
    -5ba45434-5197-164e-afab-81923f4744f5
    -
    -
    -C:/development/svn_example/svn17_example
    -delete
    -infinity
    -da39a3ee5e6b4b0d3255bfef95601890afd80709
    -
    -
    -ptt
    -2013-07-13T15:35:36.171875Z
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn18_example.zip b/setuptools/tests/svn_data/svn18_example.zip
    deleted file mode 100644
    index 4362f8e9ea7416ab16ac73f9e49aae8374ccce06..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 47477
    zcmd?R1#nzRvbHToiXT2uRWIehA<#jdAHJ%GqCcMe@(U68*V)yMgDTgUA-$u+PY^)p{MrNjFJRF?NEZjWIhGr(*%v{VozefJ|&j0pz-3kl%
    zzW+E-esq2pTZbPZK3^G_AEWD&%=Dz)^RS8m0m1%rBR6A46Qe_2O$$B=?5uwBG#ieR
    znH7%d`4aP-9hH3SMF6|CZzKSAC<#-DLWZM>uXe<WcGF6|2u#~jZb-#@a?}RB2)X1@{Vj&{6BeW{AXs2s`
    z7#_x`qN2}88p`tCzF6-N&CJppG(G33U>5T7B%vA}9@!j5U7+rM?=kiflZvh;PML;w
    zAd(}m0rhLdIXp>R8;yc#gFgc9#&@pU?JBClt>W2iYO6wN<^CPTZwz7NIr(N-BbZA4
    z84PCdx9{gXQ1>Sny`Nx2cV%VJ&l{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-TGgxyk=Yg
    
    diff --git a/setuptools/tests/svn_data/svn18_ext_list.txt b/setuptools/tests/svn_data/svn18_ext_list.txt
    deleted file mode 100644
    index c90a5f1137..0000000000
    --- a/setuptools/tests/svn_data/svn18_ext_list.txt
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -"third party3" file:///C:/development/svn_example/repos/svn18/extra1 
    -'third party3b' file:///C:/development/svn_example/repos/svn18/extra1 
    --r3 file:///C:/development/svn_example/repos/svn18/extra1 third\ party2
    -file:///C:/development/svn_example/repos/svn18/extra1@r1 third_party
    diff --git a/setuptools/tests/svn_data/svn18_ext_list.xml b/setuptools/tests/svn_data/svn18_ext_list.xml
    deleted file mode 100644
    index 9b5e9e96fa..0000000000
    --- a/setuptools/tests/svn_data/svn18_ext_list.xml
    +++ /dev/null
    @@ -1,19 +0,0 @@
    -
    -
    -
    -"third party3" file:///C:/development/svn_example/repos/svn16/extra1 
    --r3 file:///C:/development/svn_example/repos/svn16/extra1 third\ party2
    -file:///C:/development/svn_example/repos/svn16/extra1@r1 third_party大介
    -
    -
    -
    -"third party3" file:///C:/development/svn_example/repos/svn18/extra2 
    --r3 file:///C:/development/svn_example/repos/svn18/extra2 third\ party2
    -file:///C:/development/svn_example/repos/svn18/extra2@r1 third_party大介
    -
    -
    -
    diff --git a/setuptools/tests/svn_data/svn18_info.xml b/setuptools/tests/svn_data/svn18_info.xml
    deleted file mode 100644
    index 7ca55995d0..0000000000
    --- a/setuptools/tests/svn_data/svn18_info.xml
    +++ /dev/null
    @@ -1,136 +0,0 @@
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -^/
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:57.796875Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main/a%20file
    -^/a%20file
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -normal
    -infinity
    -2013-07-13T15:35:54.906250Z
    -43785ab4b1816b49f242990883292813cd4f486c
    -
    -
    -ptt
    -2013-07-13T15:35:55.265625Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main/to_delete
    -^/to_delete
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -delete
    -infinity
    -da39a3ee5e6b4b0d3255bfef95601890afd80709
    -
    -
    -ptt
    -2013-07-13T15:35:57.796875Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main/folder
    -^/folder
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -normal
    -infinity
    -
    -
    -ptt
    -2013-07-13T15:35:56.750000Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main/folder/quest.txt
    -^/folder/quest.txt
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -normal
    -infinity
    -2013-07-13T15:35:54.484375Z
    -bc80eba9e7a10c0a571a4678c520bc9683f3bac2
    -
    -
    -ptt
    -2013-07-13T15:35:54.843750Z
    -
    -
    -
    -file:///C:/development/svn_example/repos/svn18/main/folder/lalala.txt
    -^/folder/lalala.txt
    -
    -file:///C:/development/svn_example/repos/svn18/main
    -3c5e3929-c92b-7045-9ba9-5e65d3dd1ee9
    -
    -
    -C:/development/svn_example/svn18_example
    -normal
    -infinity
    -2013-07-13T15:35:54.015625Z
    -da39a3ee5e6b4b0d3255bfef95601890afd80709
    -
    -
    -ptt
    -2013-07-13T15:35:54.375000Z
    -
    -
    -
    
    From 7648e18df3bb35335f455d6026252393a3e84a2d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 12:53:06 -0500
    Subject: [PATCH 4553/8469] Update documentation on release frequency.
    
    ---
     docs/releases.txt | 19 +++++++++++++++++++
     1 file changed, 19 insertions(+)
    
    diff --git a/docs/releases.txt b/docs/releases.txt
    index 66c0896f2d..4c8d6b8d6e 100644
    --- a/docs/releases.txt
    +++ b/docs/releases.txt
    @@ -17,6 +17,25 @@ revision slated for release::
     
         python -m jaraco.packaging.release
     
    +Release Frequency
    +-----------------
    +
    +Some have asked why Setuptools is released so frequently. Because Setuptools
    +uses a mechanical release process, it's very easy to make releases whenever the
    +code is stable (tests are passing). As a result, the philosophy is to release
    +early and often.
    +
    +While some find the frequent releases somewhat surprising, they only empower
    +the user. Although releases are made frequently, users can choose the frequency
    +at which they use those releases. If instead Setuptools contributions were only
    +released in batches, the user would be constrained to only use Setuptools when
    +those official releases were made. With frequent releases, the user can govern
    +exactly how often he wishes to update.
    +
    +Frequent releases also then obviate the need for dev or beta releases in most
    +cases. Because releases are made early and often, bugs are discovered and
    +corrected quickly, in many cases before other users have yet to encounter them.
    +
     Release Managers
     ----------------
     
    
    From 886e99ae6c47087b29bc28e81cbd1d3dfec84b4f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 19:02:33 -0500
    Subject: [PATCH 4554/8469] Updated changelog to reference setuptools_svn as
     published.
    
    ---
     CHANGES.txt | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index c0ed23a2e2..3f5c442f5e 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -8,7 +8,8 @@ CHANGES
     
     * Issue #313: Removed built-in support for subversion. Projects wishing to
       retain support for subversion will need to use a third party library. The
    -  extant implementation is being ported to setuptools_svn, to be announced.
    +  extant implementation is being ported to `setuptools_svn
    +  `_.
     
     ---
     8.3
    
    From 4d121763d63948f4735249e7240b454a57b01159 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 23:45:53 -0500
    Subject: [PATCH 4555/8469] Bumped to 9.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 513449f919..257ccd91c2 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.4"
    +DEFAULT_VERSION = "9.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 60a9e0b2a7..ecdc7c9268 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.4'
    +__version__ = '9.0'
    
    From 83f91c6774f526d4561b4e9fc22b7d00076217a7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 25 Dec 2014 23:47:50 -0500
    Subject: [PATCH 4556/8469] Added tag 9.0b1 for changeset 0eee586a153f
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 4dccce7edd..188b83cb35 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -171,3 +171,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2
     efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
     cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
    +0eee586a153f068142c1a0df4bc2635ed2c1a1cc 9.0b1
    
    From 6be9025c1da807ba629440e344816155c24fa3f7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Dec 2014 13:22:57 -0500
    Subject: [PATCH 4557/8469] Update docs to reflect new behavior.
    
    ---
     docs/setuptools.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/docs/setuptools.txt b/docs/setuptools.txt
    index a34ec30444..89c08e23f8 100644
    --- a/docs/setuptools.txt
    +++ b/docs/setuptools.txt
    @@ -308,7 +308,7 @@ unless you need the associated ``setuptools`` feature.
     
         (Note: projects listed in ``setup_requires`` will NOT be automatically
         installed on the system where the setup script is being run.  They are
    -    simply downloaded to the setup directory if they're not locally available
    +    simply downloaded to the ./.eggs directory if they're not locally available
         already.  If you want them to be installed, as well as being available
         when the setup script is run, you should add them to ``install_requires``
         **and** ``setup_requires``.)
    
    From c966002df7e3f142a9f47ed9695e1098f7f6b80a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Dec 2014 13:33:29 -0500
    Subject: [PATCH 4558/8469] Update changelog
    
    ---
     CHANGES.txt | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index be20e66839..004a16407b 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,12 @@
     CHANGES
     =======
     
    +---
    +8.4
    +---
    +
    +* Pull Request #106: Now write ``setup_requires`` metadata.
    +
     ---
     8.3
     ---
    
    From 054a612792b4d66edb3112f5561c09d363a5f64b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Dec 2014 13:37:19 -0500
    Subject: [PATCH 4559/8469] Update documentation to reflect new function.
    
    ---
     docs/formats.txt | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/docs/formats.txt b/docs/formats.txt
    index 5c461ecb61..9e6fe72787 100644
    --- a/docs/formats.txt
    +++ b/docs/formats.txt
    @@ -286,6 +286,12 @@ that can be used to obtain ``Requirement`` objects describing the
     project's core and optional dependencies.
     
     
    +``setup_requires.txt``
    +----------------------
    +
    +Much like ``requires.txt`` except represents the requirements
    +specified by the ``setup_requires`` parameter to the Distribution.
    +
     
     ``dependency_links.txt``
     ------------------------
    
    From b0d85d1b085ca398ea95ba0ea1e071dbce70c9a4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Dec 2014 13:42:57 -0500
    Subject: [PATCH 4560/8469] Added tag 8.4 for changeset 921e60a0f906
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 4dccce7edd..5604e4f90b 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -171,3 +171,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2
     efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
     cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
    +921e60a0f9067311571fde9ccf2f35223159d9f6 8.4
    
    From ec90f46ff647d73f0769d1d25259b21ae15c95b7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 26 Dec 2014 13:44:04 -0500
    Subject: [PATCH 4561/8469] Bumped to 8.5 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 513449f919..1abb780dbc 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.4"
    +DEFAULT_VERSION = "8.5"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 60a9e0b2a7..dc4e8c6a7e 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.4'
    +__version__ = '8.5'
    
    From 8aa6480a1242aaa658d4bd521ff04efd1663a459 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sat, 27 Dec 2014 11:07:39 -0500
    Subject: [PATCH 4562/8469] Extract sandboxing context as a series of
     encapsulated contexts.
    
    ---
     setuptools/sandbox.py | 113 ++++++++++++++++++++++++++++++++----------
     1 file changed, 87 insertions(+), 26 deletions(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index e79a13a8a1..131b704855 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -5,6 +5,7 @@
     import functools
     import itertools
     import re
    +import contextlib
     
     import pkg_resources
     
    @@ -42,20 +43,95 @@ def _execfile(filename, globals, locals=None):
         code = compile(script, filename, 'exec')
         exec(code, globals, locals)
     
    +
    +@contextlib.contextmanager
    +def save_argv():
    +    saved = sys.argv[:]
    +    try:
    +        yield saved
    +    finally:
    +        sys.argv[:] = saved
    +
    +
    +@contextlib.contextmanager
    +def save_path():
    +    saved = sys.path[:]
    +    try:
    +        yield saved
    +    finally:
    +        sys.path[:] = saved
    +
    +
    +@contextlib.contextmanager
    +def override_temp(replacement):
    +    """
    +    Monkey-patch tempfile.tempdir with replacement, ensuring it exists
    +    """
    +    if not os.path.isdir(replacement):
    +        os.makedirs(replacement)
    +
    +    saved = tempfile.tempdir
    +
    +    tempfile.tempdir = replacement
    +
    +    try:
    +        yield
    +    finally:
    +        tempfile.tempdir = saved
    +
    +
    +@contextlib.contextmanager
    +def pushd(target):
    +    saved = os.getcwd()
    +    os.chdir(target)
    +    try:
    +        yield saved
    +    finally:
    +        os.chdir(saved)
    +
    +
    +@contextlib.contextmanager
    +def save_modules():
    +    saved = sys.modules.copy()
    +    try:
    +        yield saved
    +    finally:
    +        sys.modules.update(saved)
    +        # remove any modules imported since
    +        del_modules = [
    +            mod_name for mod_name in sys.modules
    +            if mod_name not in saved
    +            # exclude any encodings modules. See #285
    +            and not mod_name.startswith('encodings.')
    +        ]
    +        list(map(sys.modules.__delitem__, del_modules))
    +
    +
    +@contextlib.contextmanager
    +def save_pkg_resources_state():
    +    saved = pkg_resources.__getstate__()
    +    try:
    +        yield saved
    +    finally:
    +        pkg_resources.__setstate__(saved)
    +
    +
    +@contextlib.contextmanager
    +def setup_context(setup_dir):
    +    temp_dir = os.path.join(setup_dir, 'temp')
    +    with save_pkg_resources_state():
    +        with save_modules():
    +            with save_path():
    +                with save_argv():
    +                    with override_temp(temp_dir):
    +                        with pushd(setup_dir):
    +                            yield
    +
    +
     def run_setup(setup_script, args):
         """Run a distutils setup script, sandboxed in its directory"""
    -    old_dir = os.getcwd()
    -    save_argv = sys.argv[:]
    -    save_path = sys.path[:]
         setup_dir = os.path.abspath(os.path.dirname(setup_script))
    -    temp_dir = os.path.join(setup_dir,'temp')
    -    if not os.path.isdir(temp_dir): os.makedirs(temp_dir)
    -    save_tmp = tempfile.tempdir
    -    save_modules = sys.modules.copy()
    -    pr_state = pkg_resources.__getstate__()
    -    try:
    -        tempfile.tempdir = temp_dir
    -        os.chdir(setup_dir)
    +    with setup_context(setup_dir):
             try:
                 sys.argv[:] = [setup_script]+list(args)
                 sys.path.insert(0, setup_dir)
    @@ -71,21 +147,6 @@ def runner():
                 if v.args and v.args[0]:
                     raise
                 # Normal exit, just return
    -    finally:
    -        pkg_resources.__setstate__(pr_state)
    -        sys.modules.update(save_modules)
    -        # remove any modules imported within the sandbox
    -        del_modules = [
    -            mod_name for mod_name in sys.modules
    -            if mod_name not in save_modules
    -            # exclude any encodings modules. See #285
    -            and not mod_name.startswith('encodings.')
    -        ]
    -        list(map(sys.modules.__delitem__, del_modules))
    -        os.chdir(old_dir)
    -        sys.path[:] = save_path
    -        sys.argv[:] = save_argv
    -        tempfile.tempdir = save_tmp
     
     
     class AbstractSandbox:
    
    From 345daf03e205e6d363ee638b9d0e49b03fb27230 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 14:59:38 -0500
    Subject: [PATCH 4563/8469] Update docs about bootstrap script.
    
    ---
     docs/releases.txt | 18 ++++++++++++++++++
     1 file changed, 18 insertions(+)
    
    diff --git a/docs/releases.txt b/docs/releases.txt
    index 4c8d6b8d6e..a9742c2076 100644
    --- a/docs/releases.txt
    +++ b/docs/releases.txt
    @@ -17,6 +17,24 @@ revision slated for release::
     
         python -m jaraco.packaging.release
     
    +Bootstrap Bookmark
    +------------------
    +
    +Setuptools has a bootstrap script (ez_setup.py) which is hosted in the
    +repository and must be updated with each release (to bump the default version).
    +The "published" version of the script is the one indicated by the ``bootstrap``
    +bookmark (Mercurial) or branch (Git).
    +
    +Therefore, the latest bootstrap script can be retrieved by checking out the
    +repository at that bookmark. It's also possible to get the bootstrap script for
    +any particular release by grabbing the script from that tagged release.
    +
    +The officially-published location of the bootstrap script is hosted on Python
    +infrastructure (#python-infra on freenode) at https://bootstrap.pypa.io and
    +is updated every fifteen minutes from the bootstrap script. Sometimes,
    +especially when the bootstrap script is rolled back, this
    +process doesn't work as expected and requires manual intervention.
    +
     Release Frequency
     -----------------
     
    
    From 9c24e096d0a4b1a50148e2373a3fc18fa41eb69d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 15:05:21 -0500
    Subject: [PATCH 4564/8469] Remove setup_requirements writer from metadata.
     Fixes #314.
    
    ---
     setup.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setup.py b/setup.py
    index 56a071def7..ff519e3e44 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -163,7 +163,6 @@ def _save_entry_points(self):
             "egg_info.writers": [
                 "PKG-INFO = setuptools.command.egg_info:write_pkg_info",
                 "requires.txt = setuptools.command.egg_info:write_requirements",
    -            "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements",
                 "entry_points.txt = setuptools.command.egg_info:write_entries",
                 "eager_resources.txt = setuptools.command.egg_info:overwrite_arg",
                 "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg",
    
    From beef07b0dd8d538b638d8f604efd83aee14097e3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 15:12:52 -0500
    Subject: [PATCH 4565/8469] Update changelog
    
    ---
     CHANGES.txt | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 004a16407b..463f45b837 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +---
    +9.0
    +---
    +
    +* Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue
    +  where Setuptools was unable to upgrade over earlier versions.
    +
     ---
     8.4
     ---
    
    From 824cfa0bc32d500da6fd045147f752e8bf02f7b3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 15:39:46 -0500
    Subject: [PATCH 4566/8469] Remove setuptools modules from sys.modules before
     invoking setup script. Fixes #315.
    
    ---
     setuptools/sandbox.py | 27 +++++++++++++++++++++++++++
     1 file changed, 27 insertions(+)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index 131b704855..e958f91233 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -121,6 +121,7 @@ def setup_context(setup_dir):
         temp_dir = os.path.join(setup_dir, 'temp')
         with save_pkg_resources_state():
             with save_modules():
    +            hide_setuptools()
                 with save_path():
                     with save_argv():
                         with override_temp(temp_dir):
    @@ -128,6 +129,32 @@ def setup_context(setup_dir):
                                 yield
     
     
    +def _is_setuptools_module(mod_name):
    +    """
    +    >>> is_setuptools_module('setuptools')
    +    True
    +    >>> is_setuptools_module('pkg_resources')
    +    True
    +    >>> is_setuptools_module('setuptools_plugin')
    +    False
    +    >>> is_setuptools_module('setuptools.__init__')
    +    True
    +    """
    +    pattern = re.compile('(setuptools|pkg_resources)(\.|$)')
    +    return bool(pattern.match(mod_name))
    +
    +
    +def hide_setuptools():
    +    """
    +    Remove references to setuptools' modules from sys.modules to allow the
    +    invocation to import the most appropriate setuptools. This technique is
    +    necessary to avoid issues such as #315 where setuptools upgrading itself
    +    would fail to find a function declared in the metadata.
    +    """
    +    modules = list(filter(_is_setuptools_module, sys.modules))
    +    list(map(sys.modules.__delitem__, modules))
    +
    +
     def run_setup(setup_script, args):
         """Run a distutils setup script, sandboxed in its directory"""
         setup_dir = os.path.abspath(os.path.dirname(setup_script))
    
    From eb2fdc6f488d1a1d4b0cf02e9a8cf03ab33f9d23 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 15:42:40 -0500
    Subject: [PATCH 4567/8469] Extract function for _clear_modules, encapsulating
     the need for the module names to be greedily evaluated before removing them.
    
    ---
     setuptools/sandbox.py | 15 ++++++++++-----
     1 file changed, 10 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index e958f91233..f4f9dfec99 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -98,13 +98,18 @@ def save_modules():
         finally:
             sys.modules.update(saved)
             # remove any modules imported since
    -        del_modules = [
    +        del_modules = (
                 mod_name for mod_name in sys.modules
                 if mod_name not in saved
                 # exclude any encodings modules. See #285
                 and not mod_name.startswith('encodings.')
    -        ]
    -        list(map(sys.modules.__delitem__, del_modules))
    +        )
    +        _clear_modules(del_modules)
    +
    +
    +def _clear_modules(module_names):
    +    for mod_name in list(module_names):
    +        del sys.modules[mod_name]
     
     
     @contextlib.contextmanager
    @@ -151,8 +156,8 @@ def hide_setuptools():
         necessary to avoid issues such as #315 where setuptools upgrading itself
         would fail to find a function declared in the metadata.
         """
    -    modules = list(filter(_is_setuptools_module, sys.modules))
    -    list(map(sys.modules.__delitem__, modules))
    +    modules = filter(_is_setuptools_module, sys.modules)
    +    _clear_modules(modules)
     
     
     def run_setup(setup_script, args):
    
    From af34e901c35e5e453465c0c232eaa04d019a9852 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 15:49:10 -0500
    Subject: [PATCH 4568/8469] Update changelog
    
    ---
     CHANGES.txt | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 463f45b837..d0b7e9b06e 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -8,6 +8,10 @@ CHANGES
     
     * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue
       where Setuptools was unable to upgrade over earlier versions.
    +* Issue #315: Updated setuptools to hide its own loaded modules during
    +  installation of another package. This change will enable setuptools to
    +  upgrade (or downgrade) itself even when its own metadata and implementation
    +  change.
     
     ---
     8.4
    
    From 15d7d87013e9c95f1e343ab7fee3d7f2bbd1d607 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 16:01:33 -0500
    Subject: [PATCH 4569/8469] Include distutils in modules hidden
    
    ---
     setuptools/sandbox.py | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index f4f9dfec99..2216e9a6dc 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -144,8 +144,10 @@ def _is_setuptools_module(mod_name):
         False
         >>> is_setuptools_module('setuptools.__init__')
         True
    +    >>> is_setuptools_module('distutils')
    +    True
         """
    -    pattern = re.compile('(setuptools|pkg_resources)(\.|$)')
    +    pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)')
         return bool(pattern.match(mod_name))
     
     
    
    From b239a5f2ec3ef076bfe825db1a694f02351b281f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 16:01:43 -0500
    Subject: [PATCH 4570/8469] Correct docstring
    
    ---
     setuptools/sandbox.py | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index 2216e9a6dc..63760df4bf 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -136,15 +136,15 @@ def setup_context(setup_dir):
     
     def _is_setuptools_module(mod_name):
         """
    -    >>> is_setuptools_module('setuptools')
    +    >>> _is_setuptools_module('setuptools')
         True
    -    >>> is_setuptools_module('pkg_resources')
    +    >>> _is_setuptools_module('pkg_resources')
         True
    -    >>> is_setuptools_module('setuptools_plugin')
    +    >>> _is_setuptools_module('setuptools_plugin')
         False
    -    >>> is_setuptools_module('setuptools.__init__')
    +    >>> _is_setuptools_module('setuptools.__init__')
         True
    -    >>> is_setuptools_module('distutils')
    +    >>> _is_setuptools_module('distutils')
         True
         """
         pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)')
    
    From ee14a898847efe9d53f7dc57b872805753463eb5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 16:02:14 -0500
    Subject: [PATCH 4571/8469] Rename function to match intention.
    
    ---
     setuptools/sandbox.py | 14 +++++++-------
     1 file changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index 63760df4bf..f1b60cc091 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -134,17 +134,17 @@ def setup_context(setup_dir):
                                 yield
     
     
    -def _is_setuptools_module(mod_name):
    +def _needs_hiding(mod_name):
         """
    -    >>> _is_setuptools_module('setuptools')
    +    >>> _needs_hiding('setuptools')
         True
    -    >>> _is_setuptools_module('pkg_resources')
    +    >>> _needs_hiding('pkg_resources')
         True
    -    >>> _is_setuptools_module('setuptools_plugin')
    +    >>> _needs_hiding('setuptools_plugin')
         False
    -    >>> _is_setuptools_module('setuptools.__init__')
    +    >>> _needs_hiding('setuptools.__init__')
         True
    -    >>> _is_setuptools_module('distutils')
    +    >>> _needs_hiding('distutils')
         True
         """
         pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)')
    @@ -158,7 +158,7 @@ def hide_setuptools():
         necessary to avoid issues such as #315 where setuptools upgrading itself
         would fail to find a function declared in the metadata.
         """
    -    modules = filter(_is_setuptools_module, sys.modules)
    +    modules = filter(_needs_hiding, sys.modules)
         _clear_modules(modules)
     
     
    
    From 22715bcc472ac5b41cfcd94fa7ca26a5cef01eb9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 20:54:46 -0500
    Subject: [PATCH 4572/8469] Disable purging of distutils/setuptools during
     sandbox operations. Ref #315.
    
    ---
     CHANGES.txt           | 4 ----
     setuptools/sandbox.py | 4 +++-
     2 files changed, 3 insertions(+), 5 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index d0b7e9b06e..463f45b837 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -8,10 +8,6 @@ CHANGES
     
     * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue
       where Setuptools was unable to upgrade over earlier versions.
    -* Issue #315: Updated setuptools to hide its own loaded modules during
    -  installation of another package. This change will enable setuptools to
    -  upgrade (or downgrade) itself even when its own metadata and implementation
    -  change.
     
     ---
     8.4
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index f1b60cc091..e3c18e39d2 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -126,7 +126,9 @@ def setup_context(setup_dir):
         temp_dir = os.path.join(setup_dir, 'temp')
         with save_pkg_resources_state():
             with save_modules():
    -            hide_setuptools()
    +            # Disabled per
    +            # https://bitbucket.org/pypa/setuptools/issue/315/setuptools-should-always-use-its-own#comment-14512075
    +            # hide_setuptools()
                 with save_path():
                     with save_argv():
                         with override_temp(temp_dir):
    
    From d01f1071facee9aecbf8e4c298b0ada9e2a86ff3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 20:57:13 -0500
    Subject: [PATCH 4573/8469] Bumped to 9.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 1abb780dbc..257ccd91c2 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "8.5"
    +DEFAULT_VERSION = "9.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index dc4e8c6a7e..ecdc7c9268 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '8.5'
    +__version__ = '9.0'
    
    From b3f62d9d1962f3a40f0f29dee24e43985a160372 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 20:57:34 -0500
    Subject: [PATCH 4574/8469] Added tag 9.0 for changeset 0d7b9b63d06a
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 5604e4f90b..9f1a082e11 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -172,3 +172,4 @@ d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1
     efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
     cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
     921e60a0f9067311571fde9ccf2f35223159d9f6 8.4
    +0d7b9b63d06ab7f68bc8edd56cb2034e6395d7fc 9.0
    
    From eba2f2e7cd3b4f6c83e20eb796dd4605135f25fb Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Sun, 28 Dec 2014 20:58:04 -0500
    Subject: [PATCH 4575/8469] Bumped to 9.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 257ccd91c2..45432ab0a3 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.0"
    +DEFAULT_VERSION = "9.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index ecdc7c9268..0c9cd65dbb 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.0'
    +__version__ = '9.1'
    
    From ce9d08f79a1e00070ffae5e9923495a63abee0ab Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 09:45:28 -0500
    Subject: [PATCH 4576/8469] Include api_tests.txt in the sdist. Fixes #312.
    
    ---
     CHANGES.txt | 6 ++++++
     MANIFEST.in | 2 +-
     2 files changed, 7 insertions(+), 1 deletion(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 463f45b837..39fbee7cfd 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,12 @@
     CHANGES
     =======
     
    +-----
    +9.0.1
    +-----
    +
    +* Issue #312: Restored presence of pkg_resources API tests (doctest) to sdist.
    +
     ---
     9.0
     ---
    diff --git a/MANIFEST.in b/MANIFEST.in
    index 8916394a17..f6caf61a99 100644
    --- a/MANIFEST.in
    +++ b/MANIFEST.in
    @@ -4,7 +4,7 @@ recursive-include setuptools/tests *.html entries*
     recursive-include setuptools/tests/svn_data *.zip
     recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
     recursive-include _markerlib *.py
    -recursive-include pkg_resources *.py
    +recursive-include pkg_resources *.py *.txt
     include *.py
     include *.txt
     include MANIFEST.in
    
    From fedce94aa39dc453dbab5b644e9d7a1904e1e838 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 09:47:38 -0500
    Subject: [PATCH 4577/8469] Bumped to 9.0.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 45432ab0a3..44c6551a7b 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.1"
    +DEFAULT_VERSION = "9.0.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 0c9cd65dbb..c81459c6c2 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.1'
    +__version__ = '9.0.1'
    
    From 6ffe59f9d87f66c53c33e96d7206e91eebe3356f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 09:47:39 -0500
    Subject: [PATCH 4578/8469] Added tag 9.0.1 for changeset fa069bf2411a
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 9f1a082e11..88e40e3504 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -173,3 +173,4 @@ efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1
     cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
     921e60a0f9067311571fde9ccf2f35223159d9f6 8.4
     0d7b9b63d06ab7f68bc8edd56cb2034e6395d7fc 9.0
    +fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1
    
    From 2f970dc0ee4d4cef77d12901108944ae157391a4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 09:48:10 -0500
    Subject: [PATCH 4579/8469] Bumped to 9.0.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 44c6551a7b..85697d3e6c 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.0.1"
    +DEFAULT_VERSION = "9.0.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index c81459c6c2..51b5923d85 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.0.1'
    +__version__ = '9.0.2'
    
    From 03a6fe16d7de9ff44ca38f2c5beb807e4733e5a0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:13:14 -0500
    Subject: [PATCH 4580/8469] Prefer vendored packaging.
    
    ---
     CHANGES.txt               | 7 +++++++
     pkg_resources/__init__.py | 9 +++++----
     2 files changed, 12 insertions(+), 4 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 39fbee7cfd..73ddaff754 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,13 @@
     CHANGES
     =======
     
    +---
    +9.1
    +---
    +
    +* Prefer vendored packaging library `as recommended
    +  `_.
    +
     -----
     9.0.1
     -----
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index a055cf1a32..0664f66600 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -76,13 +76,14 @@
         pass
     
     try:
    -    import packaging.version
    -    import packaging.specifiers
    -except ImportError:
    -    # fallback to vendored version
         import pkg_resources._vendor.packaging.version
         import pkg_resources._vendor.packaging.specifiers
         packaging = pkg_resources._vendor.packaging
    +except ImportError:
    +    # fallback to naturally-installed version; allows system packagers to
    +    #  omit vendored packages.
    +    import packaging.version
    +    import packaging.specifiers
     
     
     class PEP440Warning(RuntimeWarning):
    
    From a87a4245eca468d09b69ca078f7105c38e03405b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:15:00 -0500
    Subject: [PATCH 4581/8469] Bumped to 9.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 85697d3e6c..45432ab0a3 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.0.2"
    +DEFAULT_VERSION = "9.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 51b5923d85..0c9cd65dbb 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.0.2'
    +__version__ = '9.1'
    
    From 4e4b8729bc355ce4cb09c75934cdb2824b882646 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:15:01 -0500
    Subject: [PATCH 4582/8469] Added tag 9.1 for changeset 3ed27d68d3f4
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 88e40e3504..5dd0807d1f 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -174,3 +174,4 @@ cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
     921e60a0f9067311571fde9ccf2f35223159d9f6 8.4
     0d7b9b63d06ab7f68bc8edd56cb2034e6395d7fc 9.0
     fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1
    +3ed27d68d3f41bb5daa2afecfa9180d5958fe9d3 9.1
    
    From cd8a46e3c9f604bc2bd1ba769854cfa73f905d28 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:15:31 -0500
    Subject: [PATCH 4583/8469] Bumped to 9.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 45432ab0a3..0feb10558e 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.1"
    +DEFAULT_VERSION = "9.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 0c9cd65dbb..465f8ef87c 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.1'
    +__version__ = '9.2'
    
    From 01ca6210955b4a0fcb1e887d7b156c923e5d3eff Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:17:00 -0500
    Subject: [PATCH 4584/8469] Remove unused import
    
    ---
     setuptools/tests/test_easy_install.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index a44309530f..3659d53f9f 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -23,7 +23,6 @@
     from pkg_resources import Distribution as PRDistribution
     import setuptools.tests.server
     import pkg_resources
    -from .py26compat import skipIf
     
     class FakeDist(object):
         def get_entry_map(self, group):
    
    From 02b5adcc7ff26f6eaf024ec46f22b0c26c8f9c0b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 13:37:08 -0500
    Subject: [PATCH 4585/8469] Remove duplicate import
    
    ---
     setuptools/tests/__init__.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index 48b29c4ced..e5d6545ad0 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -11,7 +11,6 @@
     from distutils.version import LooseVersion
     from setuptools.compat import func_code
     
    -from setuptools.compat import func_code
     import setuptools.dist
     import setuptools.depends as dep
     from setuptools import Feature
    
    From 42d0bc2269e6a1ddfb056e70b95712ad31401c89 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 14:06:05 -0500
    Subject: [PATCH 4586/8469] Rename variable for clarity.
    
    ---
     setuptools/tests/test_easy_install.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 3659d53f9f..6358c93457 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -435,10 +435,10 @@ def reset_setup_stop_context():
         within those tests, it's necessary to reset the global variable
         in distutils.core so that the setup() command will run naturally.
         """
    -    setup_stop_after = distutils.core._setup_stop_after
    +    saved = distutils.core._setup_stop_after
         distutils.core._setup_stop_after = None
         yield
    -    distutils.core._setup_stop_after = setup_stop_after
    +    distutils.core._setup_stop_after = saved
     
     
     @contextlib.contextmanager
    
    From 4a7ea62f3efc4297bcc8c2a8094fa687474fb5f1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 14:06:26 -0500
    Subject: [PATCH 4587/8469] Reindent using textwrap
    
    ---
     setuptools/command/easy_install.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index a71a7f363a..d368e1a386 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -2121,10 +2121,10 @@ def main(argv=None, **kw):
         from setuptools.dist import Distribution
         import distutils.core
     
    -    USAGE = """\
    -usage: %(script)s [options] requirement_or_url ...
    -   or: %(script)s --help
    -"""
    +    USAGE = textwrap.dedent("""
    +        usage: %(script)s [options] requirement_or_url ...
    +           or: %(script)s --help
    +        """).lstrip()
     
         def gen_usage(script_name):
             return USAGE % dict(
    
    From 8826a85c8c2dd4b3b5080de725486b0b30e79e4f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 14:29:09 -0500
    Subject: [PATCH 4588/8469] Extract _patch_usage and re-implement as a context
     manager.
    
    ---
     setuptools/command/easy_install.py | 50 ++++++++++++++++--------------
     1 file changed, 27 insertions(+), 23 deletions(-)
    
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index d368e1a386..125ceba2fa 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -34,6 +34,7 @@
     import warnings
     import site
     import struct
    +import contextlib
     
     from setuptools import Command
     from setuptools.sandbox import run_setup
    @@ -2119,39 +2120,42 @@ def bootstrap():
     def main(argv=None, **kw):
         from setuptools import setup
         from setuptools.dist import Distribution
    -    import distutils.core
    -
    -    USAGE = textwrap.dedent("""
    -        usage: %(script)s [options] requirement_or_url ...
    -           or: %(script)s --help
    -        """).lstrip()
    -
    -    def gen_usage(script_name):
    -        return USAGE % dict(
    -            script=os.path.basename(script_name),
    -        )
    -
    -    def with_ei_usage(f):
    -        old_gen_usage = distutils.core.gen_usage
    -        try:
    -            distutils.core.gen_usage = gen_usage
    -            return f()
    -        finally:
    -            distutils.core.gen_usage = old_gen_usage
     
         class DistributionWithoutHelpCommands(Distribution):
             common_usage = ""
     
             def _show_help(self, *args, **kw):
    -            with_ei_usage(lambda: Distribution._show_help(self, *args, **kw))
    +            with _patch_usage():
    +                Distribution._show_help(self, *args, **kw)
     
         if argv is None:
             argv = sys.argv[1:]
     
    -    with_ei_usage(
    -        lambda: setup(
    +    with _patch_usage():
    +        setup(
                 script_args=['-q', 'easy_install', '-v'] + argv,
                 script_name=sys.argv[0] or 'easy_install',
                 distclass=DistributionWithoutHelpCommands, **kw
             )
    -    )
    +
    +
    +@contextlib.contextmanager
    +def _patch_usage():
    +    import distutils.core
    +    USAGE = textwrap.dedent("""
    +        usage: %(script)s [options] requirement_or_url ...
    +           or: %(script)s --help
    +        """).lstrip()
    +
    +    def gen_usage(script_name):
    +        return USAGE % dict(
    +            script=os.path.basename(script_name),
    +        )
    +
    +    saved = distutils.core.gen_usage
    +    distutils.core.gen_usage = gen_usage
    +    try:
    +        yield
    +    finally:
    +        distutils.core.gen_usage = saved
    +
    
    From 195076859f1716ec22ea08dc1b29de47fca7af0c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 14:39:00 -0500
    Subject: [PATCH 4589/8469] Remove unused import
    
    ---
     setuptools/__init__.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/__init__.py b/setuptools/__init__.py
    index ca025c305d..8188f12528 100644
    --- a/setuptools/__init__.py
    +++ b/setuptools/__init__.py
    @@ -1,7 +1,6 @@
     """Extensions to the 'distutils' for large or complex distributions"""
     
     import os
    -import sys
     import distutils.core
     import distutils.filelist
     from distutils.core import Command as _Command
    
    From 80561b7f0bb7cf8488e342ee853ac9aff107b021 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 14:49:47 -0500
    Subject: [PATCH 4590/8469] Use pytest to capture exception
    
    ---
     setuptools/tests/test_easy_install.py | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 6358c93457..530f89f34e 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -12,6 +12,8 @@
     import logging
     import distutils.core
     
    +import pytest
    +
     from setuptools.compat import StringIO, BytesIO, urlparse
     from setuptools.sandbox import run_setup, SandboxViolation
     from setuptools.command.easy_install import (
    @@ -278,8 +280,8 @@ def test_setup_requires_honors_fetch_params(self):
                                 with argv_context(['easy_install']):
                                     # attempt to install the dist. It should fail because
                                     #  it doesn't exist.
    -                                self.assertRaises(SystemExit,
    -                                    easy_install_pkg.main, ei_params)
    +                                with pytest.raises(SystemExit):
    +                                    easy_install_pkg.main(ei_params)
             # there should have been two or three requests to the server
             #  (three happens on Python 3.3a)
             self.assertTrue(2 <= len(p_index.requests) <= 3)
    
    From 1e6095429693886831747050b38bad979eaaf966 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 22:17:26 -0500
    Subject: [PATCH 4591/8469] Backed out changeset: 40cc1fbecb1c Restores purging
     of distutils/setuptools during sandbox operations. Ref #315.
    
    ---
     CHANGES.txt           | 4 ++++
     setuptools/sandbox.py | 4 +---
     2 files changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 73ddaff754..bc257058bd 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -21,6 +21,10 @@ CHANGES
     
     * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue
       where Setuptools was unable to upgrade over earlier versions.
    +* Issue #315: Updated setuptools to hide its own loaded modules during
    +  installation of another package. This change will enable setuptools to
    +  upgrade (or downgrade) itself even when its own metadata and implementation
    +  change.
     
     ---
     8.4
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index e3c18e39d2..f1b60cc091 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -126,9 +126,7 @@ def setup_context(setup_dir):
         temp_dir = os.path.join(setup_dir, 'temp')
         with save_pkg_resources_state():
             with save_modules():
    -            # Disabled per
    -            # https://bitbucket.org/pypa/setuptools/issue/315/setuptools-should-always-use-its-own#comment-14512075
    -            # hide_setuptools()
    +            hide_setuptools()
                 with save_path():
                     with save_argv():
                         with override_temp(temp_dir):
    
    From 5e3a3a9b69eaca2924d2e1ffdcb1ef076ce2c4ee Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 22:18:02 -0500
    Subject: [PATCH 4592/8469] Move changelog entry
    
    ---
     CHANGES.txt | 13 +++++++++----
     1 file changed, 9 insertions(+), 4 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index bc257058bd..acde954e42 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,15 @@
     CHANGES
     =======
     
    +---
    +future
    +---
    +
    +* Issue #315: Updated setuptools to hide its own loaded modules during
    +  installation of another package. This change will enable setuptools to
    +  upgrade (or downgrade) itself even when its own metadata and implementation
    +  change.
    +
     ---
     9.1
     ---
    @@ -21,10 +30,6 @@ CHANGES
     
     * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue
       where Setuptools was unable to upgrade over earlier versions.
    -* Issue #315: Updated setuptools to hide its own loaded modules during
    -  installation of another package. This change will enable setuptools to
    -  upgrade (or downgrade) itself even when its own metadata and implementation
    -  change.
     
     ---
     8.4
    
    From 12169497ccb2303474016e01933f52d7e4eab93a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 22:48:19 -0500
    Subject: [PATCH 4593/8469] Catch, save, and restore any exceptions across the
     save_modules context. This corrects the latter of the two test failures. Ref
     #315.
    
    ---
     setuptools/sandbox.py | 43 ++++++++++++++++++++++++++++++++-----------
     1 file changed, 32 insertions(+), 11 deletions(-)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index f1b60cc091..c6840ce4a8 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -6,6 +6,7 @@
     import itertools
     import re
     import contextlib
    +import pickle
     
     import pkg_resources
     
    @@ -21,6 +22,7 @@
     from distutils.errors import DistutilsError
     from pkg_resources import working_set
     
    +from setuptools import compat
     from setuptools.compat import builtins
     
     __all__ = [
    @@ -92,19 +94,38 @@ def pushd(target):
     
     @contextlib.contextmanager
     def save_modules():
    +    """
    +    Context in which imported modules are saved.
    +
    +    Translates exceptions internal to the context into the equivalent exception
    +    outside the context.
    +    """
         saved = sys.modules.copy()
         try:
    -        yield saved
    -    finally:
    -        sys.modules.update(saved)
    -        # remove any modules imported since
    -        del_modules = (
    -            mod_name for mod_name in sys.modules
    -            if mod_name not in saved
    -            # exclude any encodings modules. See #285
    -            and not mod_name.startswith('encodings.')
    -        )
    -        _clear_modules(del_modules)
    +        try:
    +            yield saved
    +        except:
    +            # dump any exception
    +            class_, exc, tb = sys.exc_info()
    +            saved_cls = pickle.dumps(class_)
    +            saved_exc = pickle.dumps(exc)
    +            raise
    +        finally:
    +            sys.modules.update(saved)
    +            # remove any modules imported since
    +            del_modules = (
    +                mod_name for mod_name in sys.modules
    +                if mod_name not in saved
    +                # exclude any encodings modules. See #285
    +                and not mod_name.startswith('encodings.')
    +            )
    +            _clear_modules(del_modules)
    +    except:
    +        # reload and re-raise any exception, using restored modules
    +        class_, exc, tb = sys.exc_info()
    +        new_cls = pickle.loads(saved_cls)
    +        new_exc = pickle.loads(saved_exc)
    +        compat.reraise(new_cls, new_exc, tb)
     
     
     def _clear_modules(module_names):
    
    From dce270b4271ad6607c28103c9199303121b52015 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 23:40:30 -0500
    Subject: [PATCH 4594/8469] Make sure to monkey-patch the easy_install module
     in the setup context. Fixes the other former test failure. Ref #315.
    
    ---
     setup.py                              |  1 +
     setuptools/tests/test_easy_install.py | 24 ++++++++++++++++++++++++
     2 files changed, 25 insertions(+)
    
    diff --git a/setup.py b/setup.py
    index ff519e3e44..937b5794b5 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -210,6 +210,7 @@ def _save_entry_points(self):
         tests_require=[
             'setuptools[ssl]',
             'pytest',
    +        'mock',
         ],
         setup_requires=[
         ] + pytest_runner,
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 530f89f34e..546fa75082 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -13,7 +13,9 @@
     import distutils.core
     
     import pytest
    +import mock
     
    +from setuptools import sandbox
     from setuptools.compat import StringIO, BytesIO, urlparse
     from setuptools.sandbox import run_setup, SandboxViolation
     from setuptools.command.easy_install import (
    @@ -227,6 +229,27 @@ def test_local_index(self):
                 else:
                     del os.environ['PYTHONPATH']
     
    +    @contextlib.contextmanager
    +    def user_install_setup_context(self, *args, **kwargs):
    +        """
    +        Wrap sandbox.setup_context to patch easy_install in that context to
    +        appear as user-installed.
    +        """
    +        with self.orig_context(*args, **kwargs):
    +            import setuptools.command.easy_install as ei
    +            ei.__file__ = site.USER_SITE
    +            yield
    +
    +
    +    def patched_setup_context(self):
    +        self.orig_context = sandbox.setup_context
    +
    +        return mock.patch(
    +            'setuptools.sandbox.setup_context',
    +            self.user_install_setup_context,
    +        )
    +
    +
         def test_setup_requires(self):
             """Regression test for Distribute issue #318
     
    @@ -241,6 +264,7 @@ def test_setup_requires(self):
             try:
                 with quiet_context():
                     with reset_setup_stop_context():
    +                  with self.patched_setup_context():
                         run_setup(test_setup_py, ['install'])
             except SandboxViolation:
                 self.fail('Installation caused SandboxViolation')
    
    From 457b0161e28614dec6b6ff0f1dbbc090d9e0c597 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Mon, 29 Dec 2014 23:41:03 -0500
    Subject: [PATCH 4595/8469] Reindent
    
    ---
     setuptools/tests/test_easy_install.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 546fa75082..38a49bf788 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -264,8 +264,8 @@ def test_setup_requires(self):
             try:
                 with quiet_context():
                     with reset_setup_stop_context():
    -                  with self.patched_setup_context():
    -                    run_setup(test_setup_py, ['install'])
    +                    with self.patched_setup_context():
    +                        run_setup(test_setup_py, ['install'])
             except SandboxViolation:
                 self.fail('Installation caused SandboxViolation')
             except IndexError:
    
    From dbab8ae868d8b15d7082ee19bbd577140dea9652 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 09:26:59 -0500
    Subject: [PATCH 4596/8469] Indent script for clarity
    
    ---
     setuptools/tests/test_easy_install.py | 36 +++++++++++++--------------
     1 file changed, 18 insertions(+), 18 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 530f89f34e..bb6b7fc57b 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -35,24 +35,24 @@ def get_entry_map(self, group):
         def as_requirement(self):
             return 'spec'
     
    -WANTED = """\
    -#!%s
    -# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
    -__requires__ = 'spec'
    -import sys
    -from pkg_resources import load_entry_point
    -
    -if __name__ == '__main__':
    -    sys.exit(
    -        load_entry_point('spec', 'console_scripts', 'name')()
    -    )
    -""" % nt_quote_arg(fix_jython_executable(sys.executable, ""))
    -
    -SETUP_PY = """\
    -from setuptools import setup
    -
    -setup(name='foo')
    -"""
    +WANTED = textwrap.dedent("""
    +    #!%s
    +    # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
    +    __requires__ = 'spec'
    +    import sys
    +    from pkg_resources import load_entry_point
    +
    +    if __name__ == '__main__':
    +        sys.exit(
    +            load_entry_point('spec', 'console_scripts', 'name')()
    +        )
    +    """).lstrip() % nt_quote_arg(fix_jython_executable(sys.executable, ""))
    +
    +SETUP_PY = textwrap.dedent("""
    +    from setuptools import setup
    +
    +    setup(name='foo')
    +    """).lstrip()
     
     class TestEasyInstallTest(unittest.TestCase):
     
    
    From 10197f6d76a56d358236ceb35435d3789d0fd2b0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 09:45:51 -0500
    Subject: [PATCH 4597/8469] Extract variable for clarity of reading
    
    ---
     setuptools/command/easy_install.py | 12 ++++++++----
     1 file changed, 8 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
    index 125ceba2fa..1a2f56ae60 100755
    --- a/setuptools/command/easy_install.py
    +++ b/setuptools/command/easy_install.py
    @@ -1549,10 +1549,14 @@ def save(self):
     
         def add(self, dist):
             """Add `dist` to the distribution map"""
    -        if (dist.location not in self.paths and (
    -            dist.location not in self.sitedirs or
    -            dist.location == os.getcwd()  # account for '.' being in PYTHONPATH
    -        )):
    +        new_path = (
    +            dist.location not in self.paths and (
    +                dist.location not in self.sitedirs or
    +                # account for '.' being in PYTHONPATH
    +                dist.location == os.getcwd()
    +            )
    +        )
    +        if new_path:
                 self.paths.append(dist.location)
                 self.dirty = True
             Environment.add(self, dist)
    
    From 292d4db0eb5c7591eed972ed9085362167816de0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 09:48:55 -0500
    Subject: [PATCH 4598/8469] Rewrite test to remove Windows-specific handling
     and instead capture the underlying expectation.
    
    ---
     setuptools/tests/test_easy_install.py | 7 +++----
     1 file changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index bb6b7fc57b..a8f274d5e3 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -114,10 +114,9 @@ def test_add_from_cwd_site_sets_dirty(self):
             self.assertTrue(pth.dirty)
     
         def test_add_from_site_is_ignored(self):
    -        if os.name != 'nt':
    -            location = '/test/location/does-not-have-to-exist'
    -        else:
    -            location = 'c:\\does_not_exist'
    +        location = '/test/location/does-not-have-to-exist'
    +        # PthDistributions expects all locations to be normalized
    +        location = pkg_resources.normalize_path(location)
             pth = PthDistributions('does-not_exist', [location, ])
             self.assertTrue(not pth.dirty)
             pth.add(PRDistribution(location))
    
    From 470028e10ea01e57ece6df3c953a309e0017d068 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 09:51:57 -0500
    Subject: [PATCH 4599/8469] Rewrite file operations using context managers.
    
    ---
     setuptools/tests/test_easy_install.py | 26 +++++++++-----------------
     1 file changed, 9 insertions(+), 17 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index a8f274d5e3..0bb4c22f8d 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -128,9 +128,8 @@ class TestUserInstallTest(unittest.TestCase):
         def setUp(self):
             self.dir = tempfile.mkdtemp()
             setup = os.path.join(self.dir, 'setup.py')
    -        f = open(setup, 'w')
    -        f.write(SETUP_PY)
    -        f.close()
    +        with open(setup, 'w') as f:
    +            f.write(SETUP_PY)
             self.old_cwd = os.getcwd()
             os.chdir(self.dir)
     
    @@ -191,11 +190,8 @@ def test_local_index(self):
             new_location = tempfile.mkdtemp()
             target = tempfile.mkdtemp()
             egg_file = os.path.join(new_location, 'foo-1.0.egg-info')
    -        f = open(egg_file, 'w')
    -        try:
    +        with open(egg_file, 'w') as f:
                 f.write('Name: foo\n')
    -        finally:
    -            f.close()
     
             sys.path.append(target)
             old_ppath = os.environ.get('PYTHONPATH')
    @@ -358,12 +354,11 @@ def create_setup_requires_package(path):
         test_setup_py = os.path.join(test_pkg, 'setup.py')
         os.mkdir(test_pkg)
     
    -    f = open(test_setup_py, 'w')
    -    f.write(textwrap.dedent("""\
    -        import setuptools
    -        setuptools.setup(**%r)
    -    """ % test_setup_attrs))
    -    f.close()
    +    with open(test_setup_py, 'w') as f:
    +        f.write(textwrap.dedent("""\
    +            import setuptools
    +            setuptools.setup(**%r)
    +        """ % test_setup_attrs))
     
         foobar_path = os.path.join(path, 'foobar-0.1.tar.gz')
         make_trivial_sdist(
    @@ -392,11 +387,8 @@ def make_trivial_sdist(dist_path, setup_py):
             MemFile = StringIO
         setup_py_bytes = MemFile(setup_py.encode('utf-8'))
         setup_py_file.size = len(setup_py_bytes.getvalue())
    -    dist = tarfile.open(dist_path, 'w:gz')
    -    try:
    +    with tarfile.open(dist_path, 'w:gz') as dist:
             dist.addfile(setup_py_file, fileobj=setup_py_bytes)
    -    finally:
    -        dist.close()
     
     
     @contextlib.contextmanager
    
    From 7794b1b0348f2cb76317b40a5ec7931527501c94 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:01:23 -0500
    Subject: [PATCH 4600/8469] Add compatibility shim for tarfile.open
    
    ---
     setuptools/tests/py26compat.py        | 12 ++++++++++++
     setuptools/tests/test_easy_install.py |  4 +++-
     2 files changed, 15 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index d4fb891af6..24e6dbe293 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -1,4 +1,6 @@
    +import sys
     import unittest
    +import tarfile
     
     try:
     	# provide skipIf for Python 2.4-2.6
    @@ -12,3 +14,13 @@ def skip(*args, **kwargs):
     				return skip
     			return func
     		return skipper
    +
    +def _tarfile_open_ex(*args, **kwargs):
    +	"""
    +	Extend result with an __exit__ to close the file.
    +	"""
    +	res = tarfile.open(*args, **kwargs)
    +	res.__exit__ = lambda self: self.close()
    +	return res
    +
    +tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else  tarfile.open
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 0bb4c22f8d..1abb82fdfe 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -26,6 +26,8 @@
     import setuptools.tests.server
     import pkg_resources
     
    +from .py26compat import tarfile_open
    +
     class FakeDist(object):
         def get_entry_map(self, group):
             if group != 'console_scripts':
    @@ -387,7 +389,7 @@ def make_trivial_sdist(dist_path, setup_py):
             MemFile = StringIO
         setup_py_bytes = MemFile(setup_py.encode('utf-8'))
         setup_py_file.size = len(setup_py_bytes.getvalue())
    -    with tarfile.open(dist_path, 'w:gz') as dist:
    +    with tarfile_open(dist_path, 'w:gz') as dist:
             dist.addfile(setup_py_file, fileobj=setup_py_bytes)
     
     
    
    From cd4aab1dff5f40aeaa08174a05f15527f67f66d4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:04:27 -0500
    Subject: [PATCH 4601/8469] Include __enter__ in shim
    
    ---
     setuptools/tests/py26compat.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index 24e6dbe293..ead72fa6b5 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -17,10 +17,11 @@ def skip(*args, **kwargs):
     
     def _tarfile_open_ex(*args, **kwargs):
     	"""
    -	Extend result with an __exit__ to close the file.
    +	Extend result as a context manager.
     	"""
     	res = tarfile.open(*args, **kwargs)
     	res.__exit__ = lambda self: self.close()
    +	res.__enter__ = lambda self: self
     	return res
     
     tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else  tarfile.open
    
    From 271734598e6c9fc50b4809ee223cc3281d54615c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:12:57 -0500
    Subject: [PATCH 4602/8469] Try without self, as methods are set on the
     instance. Also include parameters to __exit__.
    
    ---
     setuptools/tests/py26compat.py | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index ead72fa6b5..efe2f95651 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -20,8 +20,9 @@ def _tarfile_open_ex(*args, **kwargs):
     	Extend result as a context manager.
     	"""
     	res = tarfile.open(*args, **kwargs)
    -	res.__exit__ = lambda self: self.close()
    -	res.__enter__ = lambda self: self
    +	res.__exit__ = lambda exc_type, exc_value, traceback: self.close()
    +	res.__enter__ = lambda: res
     	return res
     
    -tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else  tarfile.open
    +tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else tarfile.open
    +tarfile_open = _tarfile_open_ex
    
    From f678f5c1a197c504ae6703f3b4e5658f9e2db1f6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:15:45 -0500
    Subject: [PATCH 4603/8469] Remove spurious reference to self. Remove debugging
     code.
    
    ---
     setuptools/tests/py26compat.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index efe2f95651..e120e7447a 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -20,9 +20,8 @@ def _tarfile_open_ex(*args, **kwargs):
     	Extend result as a context manager.
     	"""
     	res = tarfile.open(*args, **kwargs)
    -	res.__exit__ = lambda exc_type, exc_value, traceback: self.close()
    +	res.__exit__ = lambda exc_type, exc_value, traceback: res.close()
     	res.__enter__ = lambda: res
     	return res
     
     tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else tarfile.open
    -tarfile_open = _tarfile_open_ex
    
    From de1af740bc79592faac63b3c0c8d50383b373dd4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:20:30 -0500
    Subject: [PATCH 4604/8469] Extract common operation of dedent and left strip
    
    ---
     setuptools/tests/test_easy_install.py | 24 ++++++++++++++++--------
     1 file changed, 16 insertions(+), 8 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 1abb82fdfe..d915f3c5b5 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -28,6 +28,14 @@
     
     from .py26compat import tarfile_open
     
    +
    +def DALS(input):
    +    """
    +    Dedent and left-strip
    +    """
    +    return textwrap.dedent(input).lstrip()
    +
    +
     class FakeDist(object):
         def get_entry_map(self, group):
             if group != 'console_scripts':
    @@ -37,7 +45,7 @@ def get_entry_map(self, group):
         def as_requirement(self):
             return 'spec'
     
    -WANTED = textwrap.dedent("""
    +WANTED = DALS("""
         #!%s
         # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
         __requires__ = 'spec'
    @@ -48,13 +56,13 @@ def as_requirement(self):
             sys.exit(
                 load_entry_point('spec', 'console_scripts', 'name')()
             )
    -    """).lstrip() % nt_quote_arg(fix_jython_executable(sys.executable, ""))
    +    """) % nt_quote_arg(fix_jython_executable(sys.executable, ""))
     
    -SETUP_PY = textwrap.dedent("""
    +SETUP_PY = DALS("""
         from setuptools import setup
     
         setup(name='foo')
    -    """).lstrip()
    +    """)
     
     class TestEasyInstallTest(unittest.TestCase):
     
    @@ -295,14 +303,14 @@ def create_sdist():
                 dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz')
                 make_trivial_sdist(
                     dist_path,
    -                textwrap.dedent("""
    +                DALS("""
                         import setuptools
                         setuptools.setup(
                             name="setuptools-test-fetcher",
                             version="1.0",
                             setup_requires = ['does-not-exist'],
                         )
    -                """).lstrip())
    +                """))
                 yield dist_path
     
         def test_setup_requires_overrides_version_conflict(self):
    @@ -357,7 +365,7 @@ def create_setup_requires_package(path):
         os.mkdir(test_pkg)
     
         with open(test_setup_py, 'w') as f:
    -        f.write(textwrap.dedent("""\
    +        f.write(DALS("""
                 import setuptools
                 setuptools.setup(**%r)
             """ % test_setup_attrs))
    @@ -365,7 +373,7 @@ def create_setup_requires_package(path):
         foobar_path = os.path.join(path, 'foobar-0.1.tar.gz')
         make_trivial_sdist(
             foobar_path,
    -        textwrap.dedent("""\
    +        DALS("""
                 import setuptools
                 setuptools.setup(
                     name='foobar',
    
    From 1a0233012a7a800bf585f739c4121e2ee830436d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:21:10 -0500
    Subject: [PATCH 4605/8469] Extract script variable for clarity
    
    ---
     setuptools/tests/test_easy_install.py | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index d915f3c5b5..050633319d 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -301,16 +301,18 @@ def create_sdist():
             """
             with tempdir_context() as dir:
                 dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz')
    -            make_trivial_sdist(
    -                dist_path,
    -                DALS("""
    +            script = DALS("""
                         import setuptools
                         setuptools.setup(
                             name="setuptools-test-fetcher",
                             version="1.0",
                             setup_requires = ['does-not-exist'],
                         )
    -                """))
    +                """)
    +            make_trivial_sdist(
    +                dist_path,
    +                script,
    +            )
                 yield dist_path
     
         def test_setup_requires_overrides_version_conflict(self):
    
    From ef6b79453e26811eb387a8252834bf1f990f2a8d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:21:39 -0500
    Subject: [PATCH 4606/8469] Reindent
    
    ---
     setuptools/tests/test_easy_install.py | 17 +++++++----------
     1 file changed, 7 insertions(+), 10 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 050633319d..4ee5adbe37 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -302,17 +302,14 @@ def create_sdist():
             with tempdir_context() as dir:
                 dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz')
                 script = DALS("""
    -                    import setuptools
    -                    setuptools.setup(
    -                        name="setuptools-test-fetcher",
    -                        version="1.0",
    -                        setup_requires = ['does-not-exist'],
    -                    )
    +                import setuptools
    +                setuptools.setup(
    +                    name="setuptools-test-fetcher",
    +                    version="1.0",
    +                    setup_requires = ['does-not-exist'],
    +                )
                     """)
    -            make_trivial_sdist(
    -                dist_path,
    -                script,
    -            )
    +            make_trivial_sdist(dist_path, script)
                 yield dist_path
     
         def test_setup_requires_overrides_version_conflict(self):
    
    From bf03c647971da1e3c5b69626fecf7f7be2830043 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:25:49 -0500
    Subject: [PATCH 4607/8469] reset_setup_stop_context is apparently no longer
     needed.
    
    ---
     setuptools/tests/test_easy_install.py | 7 +++----
     1 file changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 4ee5adbe37..dd1655d3a2 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -245,7 +245,6 @@ def test_setup_requires(self):
     
             try:
                 with quiet_context():
    -                with reset_setup_stop_context():
                         run_setup(test_setup_py, ['install'])
             except SandboxViolation:
                 self.fail('Installation caused SandboxViolation')
    @@ -281,8 +280,7 @@ def test_setup_requires_honors_fetch_params(self):
                                 '--allow-hosts', p_index_loc,
                                 '--exclude-scripts', '--install-dir', temp_install_dir,
                                 dist_file]
    -                        with reset_setup_stop_context():
    -                            with argv_context(['easy_install']):
    +                        with argv_context(['easy_install']):
                                     # attempt to install the dist. It should fail because
                                     #  it doesn't exist.
                                     with pytest.raises(SystemExit):
    @@ -331,7 +329,6 @@ def test_setup_requires_overrides_version_conflict(self):
                     test_pkg = create_setup_requires_package(temp_dir)
                     test_setup_py = os.path.join(test_pkg, 'setup.py')
                     with quiet_context() as (stdout, stderr):
    -                    with reset_setup_stop_context():
                             try:
                                 # Don't even need to install the package, just
                                 # running the setup.py at all is sufficient
    @@ -438,6 +435,8 @@ def reset_setup_stop_context():
         in distutils.core so that the setup() command will run naturally.
         """
         saved = distutils.core._setup_stop_after
    +    if saved is None:
    +        raise ValueError("Not Needed")
         distutils.core._setup_stop_after = None
         yield
         distutils.core._setup_stop_after = saved
    
    From f3d7a63e56f7d0ba768a10a2787e25679869922f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:26:45 -0500
    Subject: [PATCH 4608/8469] Remove reset_setup_stop_context and reindent.
    
    ---
     setuptools/tests/test_easy_install.py | 39 +++++++++------------------
     1 file changed, 12 insertions(+), 27 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index dd1655d3a2..4ca659d522 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -245,7 +245,7 @@ def test_setup_requires(self):
     
             try:
                 with quiet_context():
    -                    run_setup(test_setup_py, ['install'])
    +                run_setup(test_setup_py, ['install'])
             except SandboxViolation:
                 self.fail('Installation caused SandboxViolation')
             except IndexError:
    @@ -281,10 +281,10 @@ def test_setup_requires_honors_fetch_params(self):
                                 '--exclude-scripts', '--install-dir', temp_install_dir,
                                 dist_file]
                             with argv_context(['easy_install']):
    -                                # attempt to install the dist. It should fail because
    -                                #  it doesn't exist.
    -                                with pytest.raises(SystemExit):
    -                                    easy_install_pkg.main(ei_params)
    +                            # attempt to install the dist. It should fail because
    +                            #  it doesn't exist.
    +                            with pytest.raises(SystemExit):
    +                                easy_install_pkg.main(ei_params)
             # there should have been two or three requests to the server
             #  (three happens on Python 3.3a)
             self.assertTrue(2 <= len(p_index.requests) <= 3)
    @@ -329,13 +329,13 @@ def test_setup_requires_overrides_version_conflict(self):
                     test_pkg = create_setup_requires_package(temp_dir)
                     test_setup_py = os.path.join(test_pkg, 'setup.py')
                     with quiet_context() as (stdout, stderr):
    -                        try:
    -                            # Don't even need to install the package, just
    -                            # running the setup.py at all is sufficient
    -                            run_setup(test_setup_py, ['--name'])
    -                        except VersionConflict:
    -                            self.fail('Installing setup.py requirements '
    -                                'caused a VersionConflict')
    +                    try:
    +                        # Don't even need to install the package, just
    +                        # running the setup.py at all is sufficient
    +                        run_setup(test_setup_py, ['--name'])
    +                    except VersionConflict:
    +                        self.fail('Installing setup.py requirements '
    +                            'caused a VersionConflict')
     
                     lines = stdout.readlines()
                     self.assertTrue(len(lines) > 0)
    @@ -426,21 +426,6 @@ def argv_context(repl):
         yield
         sys.argv[:] = old_argv
     
    -@contextlib.contextmanager
    -def reset_setup_stop_context():
    -    """
    -    When the setuptools tests are run using setup.py test, and then
    -    one wants to invoke another setup() command (such as easy_install)
    -    within those tests, it's necessary to reset the global variable
    -    in distutils.core so that the setup() command will run naturally.
    -    """
    -    saved = distutils.core._setup_stop_after
    -    if saved is None:
    -        raise ValueError("Not Needed")
    -    distutils.core._setup_stop_after = None
    -    yield
    -    distutils.core._setup_stop_after = saved
    -
     
     @contextlib.contextmanager
     def quiet_context():
    
    From e3a4428d6a4e3889992ebb1765f27d9b9807325b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:28:40 -0500
    Subject: [PATCH 4609/8469] Remove unused import
    
    ---
     setuptools/tests/test_easy_install.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 4ca659d522..d4d29e2775 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -10,7 +10,6 @@
     import textwrap
     import tarfile
     import logging
    -import distutils.core
     
     import pytest
     
    
    From c2948e8c76a2778371b779d56682ec61d48dfbc3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:30:42 -0500
    Subject: [PATCH 4610/8469] Reindent for clarity
    
    ---
     setuptools/tests/test_easy_install.py | 9 ++++++---
     1 file changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index d4d29e2775..ca943948d9 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -275,10 +275,13 @@ def test_setup_requires_honors_fetch_params(self):
                 with TestSetupRequires.create_sdist() as dist_file:
                     with tempdir_context() as temp_install_dir:
                         with environment_context(PYTHONPATH=temp_install_dir):
    -                        ei_params = ['--index-url', p_index.url,
    +                        ei_params = [
    +                            '--index-url', p_index.url,
                                 '--allow-hosts', p_index_loc,
    -                            '--exclude-scripts', '--install-dir', temp_install_dir,
    -                            dist_file]
    +                            '--exclude-scripts',
    +                            '--install-dir', temp_install_dir,
    +                            dist_file,
    +                        ]
                             with argv_context(['easy_install']):
                                 # attempt to install the dist. It should fail because
                                 #  it doesn't exist.
    
    From 2376cb11cd1383622c97e52006ccabf12c78fffe Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:37:52 -0500
    Subject: [PATCH 4611/8469] Slice the iterable rather than converting to a list
     and slicing that.
    
    ---
     setuptools/tests/test_easy_install.py | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index ca943948d9..053b697166 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -10,6 +10,7 @@
     import textwrap
     import tarfile
     import logging
    +import itertools
     
     import pytest
     
    @@ -82,7 +83,8 @@ def test_get_script_args(self):
     
             old_platform = sys.platform
             try:
    -            name, script = [i for i in next(get_script_args(dist))][0:2]
    +            args = next(get_script_args(dist))
    +            name, script = itertools.islice(args, 2)
             finally:
                 sys.platform = old_platform
     
    
    From 3967fa33dcd84a1ae365961774cd54848bb27900 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 10:39:34 -0500
    Subject: [PATCH 4612/8469] Please don't feign a monkey patch when one isn't
     used.
    
    ---
     setuptools/tests/test_easy_install.py | 8 ++------
     1 file changed, 2 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 053b697166..95b3fead48 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -81,12 +81,8 @@ def test_install_site_py(self):
         def test_get_script_args(self):
             dist = FakeDist()
     
    -        old_platform = sys.platform
    -        try:
    -            args = next(get_script_args(dist))
    -            name, script = itertools.islice(args, 2)
    -        finally:
    -            sys.platform = old_platform
    +        args = next(get_script_args(dist))
    +        name, script = itertools.islice(args, 2)
     
             self.assertEqual(script, WANTED)
     
    
    From be743b272a20673a4bc6c472920009396c5aabe4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:00:16 -0500
    Subject: [PATCH 4613/8469] Update changelog
    
    ---
     CHANGES.txt | 5 -----
     1 file changed, 5 deletions(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 3d059e416b..59dd8842ab 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -10,11 +10,6 @@ CHANGES
       retain support for subversion will need to use a third party library. The
       extant implementation is being ported to `setuptools_svn
       `_.
    -
    ----
    -future
    ----
    -
     * Issue #315: Updated setuptools to hide its own loaded modules during
       installation of another package. This change will enable setuptools to
       upgrade (or downgrade) itself even when its own metadata and implementation
    
    From 926b1c8c82655353b8b637c3abc2adc1285425c8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:00:34 -0500
    Subject: [PATCH 4614/8469] Bumped to 10.0 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 0feb10558e..07c04ce8c7 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "9.2"
    +DEFAULT_VERSION = "10.0"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 465f8ef87c..b8a2473440 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '9.2'
    +__version__ = '10.0'
    
    From 7c528325aa4644e2bb94eef2de8783c709cb5d6d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:05:21 -0500
    Subject: [PATCH 4615/8469] Added tag 10.0 for changeset 0c4d18a747a6
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index 39cb4517b0..c186d2462f 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -176,3 +176,4 @@ cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
     0d7b9b63d06ab7f68bc8edd56cb2034e6395d7fc 9.0
     fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1
     3ed27d68d3f41bb5daa2afecfa9180d5958fe9d3 9.1
    +0c4d18a747a6d39bff8e194a58af949a960d674a 10.0
    
    From b84228bc44ec5e26b576e1e74d1c95630189f9b8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:05:51 -0500
    Subject: [PATCH 4616/8469] Bumped to 10.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 07c04ce8c7..5d5a723a9b 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "10.0"
    +DEFAULT_VERSION = "10.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index b8a2473440..d5d41219b1 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '10.0'
    +__version__ = '10.1'
    
    From a3203de1a3d8745b7431cd3ef4704f7eb3d6e529 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:21:44 -0500
    Subject: [PATCH 4617/8469] Add change history to docs
    
    ---
     docs/history.txt | 8 ++++++++
     docs/index.txt   | 1 +
     2 files changed, 9 insertions(+)
     create mode 100644 docs/history.txt
    
    diff --git a/docs/history.txt b/docs/history.txt
    new file mode 100644
    index 0000000000..268137cde2
    --- /dev/null
    +++ b/docs/history.txt
    @@ -0,0 +1,8 @@
    +:tocdepth: 2
    +
    +.. _changes:
    +
    +History
    +*******
    +
    +.. include:: ../CHANGES (links).txt
    diff --git a/docs/index.txt b/docs/index.txt
    index 53839beed9..d8eb968bc9 100644
    --- a/docs/index.txt
    +++ b/docs/index.txt
    @@ -16,6 +16,7 @@ Documentation content:
     .. toctree::
        :maxdepth: 2
     
    +   history
        roadmap
        python3
        using
    
    From ede1df71401a16c74dea9c1962bd1085538ac3d7 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:22:57 -0500
    Subject: [PATCH 4618/8469] Remove changes file from long_description.
    
    ---
     setup.py | 9 +--------
     1 file changed, 1 insertion(+), 8 deletions(-)
    
    diff --git a/setup.py b/setup.py
    index f441815f28..544f18f5c2 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -90,15 +90,8 @@ def _save_entry_points(self):
     
     readme_file = io.open('README.txt', encoding='utf-8')
     
    -# The release script adds hyperlinks to issues,
    -# but if the release script has not run, fall back to the source file
    -changes_names = 'CHANGES (links).txt', 'CHANGES.txt'
    -changes_fn = next(iter(filter(os.path.exists, changes_names)))
    -changes_file = io.open(changes_fn, encoding='utf-8')
    -
     with readme_file:
    -    with changes_file:
    -        long_description = readme_file.read() + '\n' + changes_file.read()
    +    long_description = readme_file.read()
     
     package_data = {
             'setuptools': ['script (dev).tmpl', 'script.tmpl', 'site-patch.py']}
    
    From caea578cd02a7cb2f7cfa453dfabff66e56aff8d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:39:07 -0500
    Subject: [PATCH 4619/8469] Moved linkify logic to documentation builder as
     Sphinx extension.
    
    ---
     docs/conf.py |  2 +-
     linkify.py   | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
     release.py   | 40 ----------------------------------------
     3 files changed, 53 insertions(+), 41 deletions(-)
     create mode 100644 linkify.py
    
    diff --git a/docs/conf.py b/docs/conf.py
    index 8be5c3dd99..6cb8f6363c 100644
    --- a/docs/conf.py
    +++ b/docs/conf.py
    @@ -28,7 +28,7 @@
     
     # Add any Sphinx extension module names here, as strings. They can be extensions
     # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
    -extensions = []
    +extensions = ['linkify']
     
     # Add any paths that contain templates here, relative to this directory.
     templates_path = ['_templates']
    diff --git a/linkify.py b/linkify.py
    new file mode 100644
    index 0000000000..1d925abaa8
    --- /dev/null
    +++ b/linkify.py
    @@ -0,0 +1,52 @@
    +"""
    +Sphinx plugin to add links to the changelog.
    +"""
    +
    +import re
    +import os
    +
    +
    +link_patterns = [
    +    r"(Issue )?#(?P\d+)",
    +    r"Pull Request ?#(?P\d+)",
    +    r"Distribute #(?P\d+)",
    +    r"Buildout #(?P\d+)",
    +    r"Old Setuptools #(?P\d+)",
    +    r"Jython #(?P\d+)",
    +    r"Python #(?P\d+)",
    +]
    +
    +issue_urls = dict(
    +    pull_request='https://bitbucket.org'
    +        '/pypa/setuptools/pull-request/{pull_request}',
    +    issue='https://bitbucket.org/pypa/setuptools/issue/{issue}',
    +    distribute='https://bitbucket.org/tarek/distribute/issue/{distribute}',
    +    buildout='https://github.com/buildout/buildout/issues/{buildout}',
    +    old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}',
    +    jython='http://bugs.jython.org/issue{jython}',
    +    python='http://bugs.python.org/issue{python}',
    +)
    +
    +
    +def _linkify(source, dest):
    +    pattern = '|'.join(link_patterns)
    +    with open(source) as source:
    +        out = re.sub(pattern, replacer, source.read())
    +    with open(dest, 'w') as dest:
    +        dest.write(out)
    +
    +
    +def replacer(match):
    +    text = match.group(0)
    +    match_dict = match.groupdict()
    +    for key in match_dict:
    +        if match_dict[key]:
    +            url = issue_urls[key].format(**match_dict)
    +            return "`{text} <{url}>`_".format(text=text, url=url)
    +
    +def setup(app):
    +    _linkify('CHANGES.txt', 'CHANGES (links).txt')
    +    app.connect('build-finished', remove_file)
    +
    +def remove_file(app, exception):
    +    os.remove('CHANGES (links).txt')
    diff --git a/release.py b/release.py
    index d2f82775b6..d067930b62 100644
    --- a/release.py
    +++ b/release.py
    @@ -3,7 +3,6 @@
     install jaraco.packaging and run 'python -m jaraco.packaging.release'
     """
     
    -import re
     import os
     import subprocess
     
    @@ -14,7 +13,6 @@
     
     
     def before_upload():
    -    _linkify('CHANGES.txt', 'CHANGES (links).txt')
         BootstrapBookmark.add()
     
     
    @@ -33,44 +31,6 @@ def after_push():
     
     os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1"
     
    -link_patterns = [
    -    r"(Issue )?#(?P\d+)",
    -    r"Pull Request ?#(?P\d+)",
    -    r"Distribute #(?P\d+)",
    -    r"Buildout #(?P\d+)",
    -    r"Old Setuptools #(?P\d+)",
    -    r"Jython #(?P\d+)",
    -    r"Python #(?P\d+)",
    -]
    -
    -issue_urls = dict(
    -    pull_request='https://bitbucket.org'
    -        '/pypa/setuptools/pull-request/{pull_request}',
    -    issue='https://bitbucket.org/pypa/setuptools/issue/{issue}',
    -    distribute='https://bitbucket.org/tarek/distribute/issue/{distribute}',
    -    buildout='https://github.com/buildout/buildout/issues/{buildout}',
    -    old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}',
    -    jython='http://bugs.jython.org/issue{jython}',
    -    python='http://bugs.python.org/issue{python}',
    -)
    -
    -
    -def _linkify(source, dest):
    -    pattern = '|'.join(link_patterns)
    -    with open(source) as source:
    -        out = re.sub(pattern, replacer, source.read())
    -    with open(dest, 'w') as dest:
    -        dest.write(out)
    -
    -
    -def replacer(match):
    -    text = match.group(0)
    -    match_dict = match.groupdict()
    -    for key in match_dict:
    -        if match_dict[key]:
    -            url = issue_urls[key].format(**match_dict)
    -            return "`{text} <{url}>`_".format(text=text, url=url)
    -
     class BootstrapBookmark:
         name = 'bootstrap'
     
    
    From 07be3d028d9026a858fe28b7fd64bba37b8ec457 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:52:21 -0500
    Subject: [PATCH 4620/8469] Resave with excess whitespace removed
    
    ---
     README.txt | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/README.txt b/README.txt
    index c6973298ec..11a5d6df93 100755
    --- a/README.txt
    +++ b/README.txt
    @@ -83,12 +83,12 @@ Alternatively, Setuptools may be installed to a user-local path::
     
         > wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user
     
    -Note that on some older systems (noted on Debian 6 and CentOS 5 installations), 
    -`wget` may refuse to download `ez_setup.py`, complaining that the certificate common name `*.c.ssl.fastly.net` 
    +Note that on some older systems (noted on Debian 6 and CentOS 5 installations),
    +`wget` may refuse to download `ez_setup.py`, complaining that the certificate common name `*.c.ssl.fastly.net`
     does not match the host name `bootstrap.pypa.io`. In addition, the `ez_setup.py` script may then encounter similar problems using
    -`wget` internally to download `setuptools-x.y.zip`, complaining that the certificate common name of `www.python.org` does not match the 
    -host name `pypi.python.org`. Those are known issues, related to a bug in the older versions of `wget` 
    -(see `Issue 59 `_). If you happen to encounter them, 
    +`wget` internally to download `setuptools-x.y.zip`, complaining that the certificate common name of `www.python.org` does not match the
    +host name `pypi.python.org`. Those are known issues, related to a bug in the older versions of `wget`
    +(see `Issue 59 `_). If you happen to encounter them,
     install Setuptools as follows::
     
         > wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
    
    From 000d9ed18eb3849d2c825c043133891e2e6f6680 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 11:52:48 -0500
    Subject: [PATCH 4621/8469] Add link to change history from readme.
    
    ---
     README.txt | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/README.txt b/README.txt
    index 11a5d6df93..e21c40697a 100755
    --- a/README.txt
    +++ b/README.txt
    @@ -5,6 +5,8 @@ Installing and Using Setuptools
     .. contents:: **Table of Contents**
     
     
    +`Change History `_.
    +
     -------------------------
     Installation Instructions
     -------------------------
    
    From 9419ec6858f28bc23fde222c223cc20dc28a0874 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:35:21 -0500
    Subject: [PATCH 4622/8469] Add test capturing failure. Ref #319.
    
    ---
     setuptools/tests/test_easy_install.py | 17 +++++++++++++++++
     1 file changed, 17 insertions(+)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 590fce9bc8..46c2df2cad 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -275,6 +275,23 @@ def test_setup_requires(self):
                 pass
     
     
    +@pytest.yield_fixture
    +def distutils_package():
    +    distutils_setup_py = SETUP_PY.replace(
    +        'from setuptools import setup',
    +        'from distutils.core import setup',
    +    )
    +    with tempdir_context(cd=os.chdir):
    +        with open('setup.py', 'w') as f:
    +            f.write(distutils_setup_py)
    +        yield
    +
    +
    +class TestDistutilsPackage:
    +    def test_bdist_egg_available_on_distutils_pkg(self, distutils_package):
    +        run_setup('setup.py', ['bdist_egg'])
    +
    +
     class TestSetupRequires(unittest.TestCase):
     
         def test_setup_requires_honors_fetch_params(self):
    
    From fddd230b60c17ca2100e41962de7b9e16ee85408 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:37:02 -0500
    Subject: [PATCH 4623/8469] Ensure setuptools is present in the environment
     before invoking setup.py from easy_install. Fixes #319.
    
    ---
     setuptools/sandbox.py | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
    index c6840ce4a8..b90d1e1bb6 100755
    --- a/setuptools/sandbox.py
    +++ b/setuptools/sandbox.py
    @@ -152,6 +152,8 @@ def setup_context(setup_dir):
                     with save_argv():
                         with override_temp(temp_dir):
                             with pushd(setup_dir):
    +                            # ensure setuptools commands are available
    +                            __import__('setuptools')
                                 yield
     
     
    
    From 2982a56628f1ca521b1335298f22a5c6e370e299 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:37:43 -0500
    Subject: [PATCH 4624/8469] Update changelog
    
    ---
     CHANGES.txt | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 59dd8842ab..5161fbe5e4 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,12 @@
     CHANGES
     =======
     
    +------
    +10.0.1
    +------
    +
    +* Issue #319: Fixed issue installing pure distutils packages.
    +
     ----
     10.0
     ----
    
    From 8029be0e2f76eb600719f74271850327aa5c1463 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:40:16 -0500
    Subject: [PATCH 4625/8469] Bumped to 10.0.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 5d5a723a9b..d0174d9aa7 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "10.1"
    +DEFAULT_VERSION = "10.0.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index d5d41219b1..540d81da62 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '10.1'
    +__version__ = '10.0.1'
    
    From e1df3251967c41007f6159456eb19d5f66747a48 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:40:17 -0500
    Subject: [PATCH 4626/8469] Added tag 10.0.1 for changeset 4c41e2cdd70b
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index c186d2462f..fde652215a 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -177,3 +177,4 @@ cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3
     fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1
     3ed27d68d3f41bb5daa2afecfa9180d5958fe9d3 9.1
     0c4d18a747a6d39bff8e194a58af949a960d674a 10.0
    +4c41e2cdd70beb0da556d71f46a67734c14f2bc2 10.0.1
    
    From d5f207d917ee1ad998545cc0cd86817a609754bd Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:40:47 -0500
    Subject: [PATCH 4627/8469] Bumped to 10.0.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index d0174d9aa7..97767f184c 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "10.0.1"
    +DEFAULT_VERSION = "10.0.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 540d81da62..63388b1fa2 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '10.0.1'
    +__version__ = '10.0.2'
    
    From 65d8715705e07dc7f091e2da47a7ada923c6cfbb Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:42:58 -0500
    Subject: [PATCH 4628/8469] Remove lingering reference to linked changelog.
    
    ---
     release.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/release.py b/release.py
    index d067930b62..a76d2de489 100644
    --- a/release.py
    +++ b/release.py
    @@ -17,7 +17,6 @@ def before_upload():
     
     
     def after_push():
    -    os.remove('CHANGES (links).txt')
         BootstrapBookmark.push()
     
     files_with_versions = (
    
    From c7de48c1f42611b25b0ab776ece87763515cc120 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:50:39 -0500
    Subject: [PATCH 4629/8469] Update copyright
    
    ---
     docs/conf.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/docs/conf.py b/docs/conf.py
    index 6cb8f6363c..5ea2e05e8b 100644
    --- a/docs/conf.py
    +++ b/docs/conf.py
    @@ -44,7 +44,7 @@
     
     # General information about the project.
     project = 'Setuptools'
    -copyright = '2009-2013, The fellowship of the packaging'
    +copyright = '2009-2014, The fellowship of the packaging'
     
     # The version info for the project you're documenting, acts as replacement for
     # |version| and |release|, also used in various other places throughout the
    
    From 9875a7b2586d737ac4d2294044187e17e5533e35 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Tue, 30 Dec 2014 12:57:30 -0500
    Subject: [PATCH 4630/8469] Remove support for setup.py test. Use the
     recommended test runner (setup.py ptr).
    
    ---
     setup.py | 30 ------------------------------
     1 file changed, 30 deletions(-)
    
    diff --git a/setup.py b/setup.py
    index 544f18f5c2..b4b93b38e3 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -4,7 +4,6 @@
     import os
     import sys
     import textwrap
    -import contextlib
     
     # Allow to run setup.py from another directory.
     os.chdir(os.path.dirname(os.path.abspath(__file__)))
    @@ -27,7 +26,6 @@
     
     import setuptools
     from setuptools.command.build_py import build_py as _build_py
    -from setuptools.command.test import test as _test
     
     scripts = []
     
    @@ -61,32 +59,6 @@ def build_package_data(self):
                     outf, copied = self.copy_file(srcfile, target)
                     srcfile = os.path.abspath(srcfile)
     
    -class test(_test):
    -    """Specific test class to avoid rewriting the entry_points.txt"""
    -    def run(self):
    -        with self._save_entry_points():
    -            _test.run(self)
    -
    -    @contextlib.contextmanager
    -    def _save_entry_points(self):
    -        entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt')
    -
    -        if not os.path.exists(entry_points):
    -            yield
    -            return
    -
    -        # save the content
    -        with open(entry_points, 'rb') as f:
    -            ep_content = f.read()
    -
    -        # run the tests
    -        try:
    -            yield
    -        finally:
    -            # restore the file
    -            with open(entry_points, 'wb') as f:
    -                f.write(ep_content)
    -
     
     readme_file = io.open('README.txt', encoding='utf-8')
     
    @@ -116,7 +88,6 @@ def _save_entry_points(self):
         long_description=long_description,
         keywords="CPAN PyPI distutils eggs package management",
         url="https://bitbucket.org/pypa/setuptools",
    -    test_suite='setuptools.tests',
         src_root=src_root,
         packages=setuptools.find_packages(),
         package_data=package_data,
    @@ -125,7 +96,6 @@ def _save_entry_points(self):
     
         zip_safe=True,
     
    -    cmdclass={'test': test},
         entry_points={
             "distutils.commands": [
                 "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
    
    From 54e96d8d8a6e18901d8e3e708fd0e82bfaba9569 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 09:52:20 -0500
    Subject: [PATCH 4631/8469] Add test capturing requirement. Ref #320.
    
    ---
     setuptools/tests/test_sdist.py | 18 ++++++++++++++++++
     1 file changed, 18 insertions(+)
    
    diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py
    index bece76d263..090e7304e4 100644
    --- a/setuptools/tests/test_sdist.py
    +++ b/setuptools/tests/test_sdist.py
    @@ -11,6 +11,7 @@
     import contextlib
     from setuptools.tests.py26compat import skipIf
     
    +import pkg_resources
     from setuptools.compat import StringIO, unicode, PY3, PY2
     from setuptools.command.sdist import sdist
     from setuptools.command.egg_info import manifest_maker
    @@ -416,5 +417,22 @@ def test_sdist_with_latin1_encoded_filename(self):
                     self.assertFalse(filename in cmd.filelist.files)
     
     
    +def test_default_revctrl():
    +    """
    +    When _default_revctrl was removed from the `setuptools.command.sdist`
    +    module in 10.0, it broke some systems which keep an old install of
    +    setuptools (Distribute) around. Those old versions require that the
    +    setuptools package continue to implement that interface, so this
    +    function provides that interface, stubbed. See #320 for details.
    +
    +    This interface must be maintained until Ubuntu 12.04 is no longer
    +    supported (by Setuptools).
    +    """
    +    ep_def = 'svn_cvs = setuptools.command.sdist:_default_revctrl'
    +    ep = pkg_resources.EntryPoint.parse(ep_def)
    +    res = ep.load(require=False)
    +    assert hasattr(res, '__iter__')
    +
    +
     def test_suite():
         return unittest.defaultTestLoader.loadTestsFromName(__name__)
    
    From 314d143ffcc838e1dbf7177b601c139f8d0b609f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:15:10 -0500
    Subject: [PATCH 4632/8469] Restore _default_revctrl implementation (stubbed).
     Fixes #320.
    
    ---
     CHANGES.txt                 | 8 ++++++++
     setuptools/command/sdist.py | 1 +
     2 files changed, 9 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 5161fbe5e4..9b8a81cbc5 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,14 @@
     CHANGES
     =======
     
    +----
    +10.1
    +----
    +
    +* Issue #320: Added a compatibility implementation of `sdist._default_revctrl`
    +  so that systems relying on that interface do not fail (namely, Ubuntu 12.04
    +  and similar Debian releases).
    +
     ------
     10.0.1
     ------
    diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
    index 371bf547ae..a4e8288aaa 100755
    --- a/setuptools/command/sdist.py
    +++ b/setuptools/command/sdist.py
    @@ -11,6 +11,7 @@
     
     READMES = ('README', 'README.rst', 'README.txt')
     
    +_default_revctrl = list
     
     def walk_revctrl(dirname=''):
         """Find all files under revision control"""
    
    From f9596f503713a3063396540e835080d0ba44b5e6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:15:36 -0500
    Subject: [PATCH 4633/8469] Fix syntax on changelog
    
    ---
     CHANGES.txt | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index 9b8a81cbc5..a09ad310d7 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -6,7 +6,8 @@ CHANGES
     10.1
     ----
     
    -* Issue #320: Added a compatibility implementation of `sdist._default_revctrl`
    +* Issue #320: Added a compatibility implementation of
    +  ``sdist._default_revctrl``
       so that systems relying on that interface do not fail (namely, Ubuntu 12.04
       and similar Debian releases).
     
    
    From 1b2f562052873336769203c661a7a357dd5b5189 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:16:24 -0500
    Subject: [PATCH 4634/8469] Bumped to 10.1 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 97767f184c..5d5a723a9b 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "10.0.2"
    +DEFAULT_VERSION = "10.1"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index 63388b1fa2..d5d41219b1 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '10.0.2'
    +__version__ = '10.1'
    
    From 0f9c2c6ef32cc8c8d5e12a17e28f87942b755e2f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:16:47 -0500
    Subject: [PATCH 4635/8469] Added tag 10.1 for changeset 26b00011ec65
    
    ---
     .hgtags | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/.hgtags b/.hgtags
    index fde652215a..a4071fd761 100644
    --- a/.hgtags
    +++ b/.hgtags
    @@ -178,3 +178,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1
     3ed27d68d3f41bb5daa2afecfa9180d5958fe9d3 9.1
     0c4d18a747a6d39bff8e194a58af949a960d674a 10.0
     4c41e2cdd70beb0da556d71f46a67734c14f2bc2 10.0.1
    +26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1
    
    From f61070d6d216a3de70202b5c9cff9a125f1823b9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:17:21 -0500
    Subject: [PATCH 4636/8469] Bumped to 10.2 in preparation for next release.
    
    ---
     ez_setup.py           | 2 +-
     setuptools/version.py | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ez_setup.py b/ez_setup.py
    index 5d5a723a9b..62ead23a01 100644
    --- a/ez_setup.py
    +++ b/ez_setup.py
    @@ -36,7 +36,7 @@
     except ImportError:
         USER_SITE = None
     
    -DEFAULT_VERSION = "10.1"
    +DEFAULT_VERSION = "10.2"
     DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
     
     def _python_cmd(*args):
    diff --git a/setuptools/version.py b/setuptools/version.py
    index d5d41219b1..6b917706c0 100644
    --- a/setuptools/version.py
    +++ b/setuptools/version.py
    @@ -1 +1 @@
    -__version__ = '10.1'
    +__version__ = '10.2'
    
    From 7e6639875e34bd8150a2c430f4d214da9c197e94 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:19:25 -0500
    Subject: [PATCH 4637/8469] Remove superfluous parentheses
    
    ---
     setuptools/command/sdist.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
    index a4e8288aaa..3d33df80ee 100755
    --- a/setuptools/command/sdist.py
    +++ b/setuptools/command/sdist.py
    @@ -9,7 +9,7 @@
     
     import pkg_resources
     
    -READMES = ('README', 'README.rst', 'README.txt')
    +READMES = 'README', 'README.rst', 'README.txt'
     
     _default_revctrl = list
     
    
    From 032ff62dd86be10a2580389f4f91f82ec20fd47b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 10:24:29 -0500
    Subject: [PATCH 4638/8469] Remove unnecessary branch
    
    ---
     pkg_resources/__init__.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 0664f66600..8854de86f0 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2300,8 +2300,7 @@ def parse(cls, src, dist=None):
             except ValueError:
                 msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
                 raise ValueError(msg, src)
    -        else:
    -            return cls(name.strip(), value.strip(), attrs, extras, dist)
    +        return cls(name.strip(), value.strip(), attrs, extras, dist)
     
         @classmethod
         def parse_group(cls, group, lines, dist=None):
    
    From 6deadf03439b91582206605f0ce3a35d9da46e09 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 11:24:54 -0500
    Subject: [PATCH 4639/8469] Extract pattern and entry point parsing from
     EntryPoint.parse.
    
    ---
     pkg_resources/__init__.py | 39 +++++++++++++++++++++++----------------
     1 file changed, 23 insertions(+), 16 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 8854de86f0..572f845961 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2272,6 +2272,14 @@ def require(self, env=None, installer=None):
             items = working_set.resolve(reqs, env, installer)
             list(map(working_set.add, items))
     
    +    pattern = re.compile(
    +        r'(?P\w+)\s*'
    +        r'=\s*'
    +        r'(?P[\w.]+)\s*'
    +        r'(:\s*(?P[\w.]+))?\s*'
    +        r'(?P\[.*\])?\s*$'
    +    )
    +
         @classmethod
         def parse(cls, src, dist=None):
             """Parse a single entry point from string `src`
    @@ -2283,24 +2291,23 @@ def parse(cls, src, dist=None):
             The entry name and module name are required, but the ``:attrs`` and
             ``[extras]`` parts are optional
             """
    -        try:
    -            attrs = extras = ()
    -            name, value = src.split('=', 1)
    -            if '[' in value:
    -                value, extras = value.split('[', 1)
    -                req = Requirement.parse("x[" + extras)
    -                if req.specs:
    -                    raise ValueError
    -                extras = req.extras
    -            if ':' in value:
    -                value, attrs = value.split(':', 1)
    -                if not MODULE(attrs.rstrip()):
    -                    raise ValueError
    -                attrs = attrs.rstrip().split('.')
    -        except ValueError:
    +        m = cls.pattern.match(src)
    +        if not m:
                 msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
                 raise ValueError(msg, src)
    -        return cls(name.strip(), value.strip(), attrs, extras, dist)
    +        res = m.groupdict()
    +        extras = cls._parse_extras(res['extras'])
    +        attrs = (res['attr'] or '').split('.')
    +        return cls(res['name'], res['module'], attrs, extras, dist)
    +
    +    @classmethod
    +    def _parse_extras(cls, extras_spec):
    +        if not extras_spec:
    +            return ()
    +        req = Requirement.parse('x' + extras_spec)
    +        if req.specs:
    +            raise ValueError()
    +        return req.extras
     
         @classmethod
         def parse_group(cls, group, lines, dist=None):
    
    From 5eb17624d427730b21ec5de800e4aae036014d01 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 11:47:46 -0500
    Subject: [PATCH 4640/8469] Correct implementation fixing failing tests
    
    ---
     pkg_resources/__init__.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 572f845961..dc69b72503 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2273,7 +2273,8 @@ def require(self, env=None, installer=None):
             list(map(working_set.add, items))
     
         pattern = re.compile(
    -        r'(?P\w+)\s*'
    +        r'\s*'
    +        r'(?P[\w. -]+?)\s*'
             r'=\s*'
             r'(?P[\w.]+)\s*'
             r'(:\s*(?P[\w.]+))?\s*'
    @@ -2297,7 +2298,7 @@ def parse(cls, src, dist=None):
                 raise ValueError(msg, src)
             res = m.groupdict()
             extras = cls._parse_extras(res['extras'])
    -        attrs = (res['attr'] or '').split('.')
    +        attrs = res['attr'].split('.') if res['attr'] else ()
             return cls(res['name'], res['module'], attrs, extras, dist)
     
         @classmethod
    
    From d1ed7aca039caf079a97d3f47347439db6fd469d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 11:59:17 -0500
    Subject: [PATCH 4641/8469] Use reduce to retrieve attributes. Reuse error from
     AttributeError when translating to ImportError.
    
    ---
     pkg_resources/__init__.py | 9 ++++-----
     1 file changed, 4 insertions(+), 5 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index dc69b72503..f3f7bcc91e 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2258,11 +2258,10 @@ def load(self, require=True, env=None, installer=None):
                 self.require(env, installer)
             entry = __import__(self.module_name, globals(), globals(),
                 ['__name__'])
    -        for attr in self.attrs:
    -            try:
    -                entry = getattr(entry, attr)
    -            except AttributeError:
    -                raise ImportError("%r has no %r attribute" % (entry, attr))
    +        try:
    +            entry = functools.reduce(getattr, self.attrs, entry)
    +        except AttributeError as exc:
    +            raise ImportError(str(exc))
             return entry
     
         def require(self, env=None, installer=None):
    
    From ca23023d779848dc68160d5ab1fa8d5eeca35b78 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 11:59:36 -0500
    Subject: [PATCH 4642/8469] Return value directly
    
    ---
     pkg_resources/__init__.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index f3f7bcc91e..f8f84a5f0a 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2259,10 +2259,9 @@ def load(self, require=True, env=None, installer=None):
             entry = __import__(self.module_name, globals(), globals(),
                 ['__name__'])
             try:
    -            entry = functools.reduce(getattr, self.attrs, entry)
    +            return functools.reduce(getattr, self.attrs, entry)
             except AttributeError as exc:
                 raise ImportError(str(exc))
    -        return entry
     
         def require(self, env=None, installer=None):
             if self.extras and not self.dist:
    
    From 83f82bb2eb0b21cfa9a3f299aa8560d600b5c5b9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 12:00:14 -0500
    Subject: [PATCH 4643/8469] Rename variable for clarity
    
    ---
     pkg_resources/__init__.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index f8f84a5f0a..360f3e5543 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2256,10 +2256,10 @@ def __repr__(self):
         def load(self, require=True, env=None, installer=None):
             if require:
                 self.require(env, installer)
    -        entry = __import__(self.module_name, globals(), globals(),
    +        module = __import__(self.module_name, globals(), globals(),
                 ['__name__'])
             try:
    -            return functools.reduce(getattr, self.attrs, entry)
    +            return functools.reduce(getattr, self.attrs, module)
             except AttributeError as exc:
                 raise ImportError(str(exc))
     
    
    From 5e22ed05a7e1f3c787de06ef73b3facd1cdd1f7c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 12:06:32 -0500
    Subject: [PATCH 4644/8469] Extract _load method which is the same as calling
     .load(False).
    
    ---
     pkg_resources/__init__.py | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 360f3e5543..29b1f163f5 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2256,6 +2256,9 @@ def __repr__(self):
         def load(self, require=True, env=None, installer=None):
             if require:
                 self.require(env, installer)
    +        return self._load()
    +
    +    def _load(self):
             module = __import__(self.module_name, globals(), globals(),
                 ['__name__'])
             try:
    
    From a8cc5bd6104fe69756ae188e1482eedd5840d34b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 12:07:33 -0500
    Subject: [PATCH 4645/8469] Don't allow imports relative to the pkg_resources
     module.
    
    ---
     pkg_resources/__init__.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index 29b1f163f5..f689b02918 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2259,8 +2259,7 @@ def load(self, require=True, env=None, installer=None):
             return self._load()
     
         def _load(self):
    -        module = __import__(self.module_name, globals(), globals(),
    -            ['__name__'])
    +        module = __import__(self.module_name, fromlist=['__name__'], level=0)
             try:
                 return functools.reduce(getattr, self.attrs, module)
             except AttributeError as exc:
    
    From 80a28fa8c044ccb74e4ae54544be8c449ebd03e8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 12:35:32 -0500
    Subject: [PATCH 4646/8469] Use underlying invocation of ._load directly
    
    ---
     setuptools/command/test.py     | 2 +-
     setuptools/dist.py             | 3 ++-
     setuptools/tests/test_sdist.py | 2 +-
     3 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/command/test.py b/setuptools/command/test.py
    index 1038da71af..2bf5cb1605 100644
    --- a/setuptools/command/test.py
    +++ b/setuptools/command/test.py
    @@ -172,4 +172,4 @@ def _resolve_as_ep(val):
             if val is None:
                 return
             parsed = EntryPoint.parse("x=" + val)
    -        return parsed.load(require=False)()
    +        return parsed._load()()
    diff --git a/setuptools/dist.py b/setuptools/dist.py
    index 7a94d4b38e..eb14644488 100644
    --- a/setuptools/dist.py
    +++ b/setuptools/dist.py
    @@ -434,7 +434,8 @@ def get_command_class(self, command):
         def print_commands(self):
             for ep in pkg_resources.iter_entry_points('distutils.commands'):
                 if ep.name not in self.cmdclass:
    -                cmdclass = ep.load(False) # don't require extras, we're not running
    +                # don't require extras as the commands won't be invoked
    +                cmdclass = ep._load()
                     self.cmdclass[ep.name] = cmdclass
             return _Distribution.print_commands(self)
     
    diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py
    index 090e7304e4..123e3ea9bd 100644
    --- a/setuptools/tests/test_sdist.py
    +++ b/setuptools/tests/test_sdist.py
    @@ -430,7 +430,7 @@ def test_default_revctrl():
         """
         ep_def = 'svn_cvs = setuptools.command.sdist:_default_revctrl'
         ep = pkg_resources.EntryPoint.parse(ep_def)
    -    res = ep.load(require=False)
    +    res = ep._load()
         assert hasattr(res, '__iter__')
     
     
    
    From f7df5613b53aafe3204da22945b772ce1ffa937c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 12:38:57 -0500
    Subject: [PATCH 4647/8469] Officially deprecated
     EntryPoint.load(require=False).
    
    ---
     CHANGES.txt               | 6 ++++++
     pkg_resources/__init__.py | 6 ++++++
     2 files changed, 12 insertions(+)
    
    diff --git a/CHANGES.txt b/CHANGES.txt
    index a09ad310d7..efbb43f8df 100644
    --- a/CHANGES.txt
    +++ b/CHANGES.txt
    @@ -2,6 +2,12 @@
     CHANGES
     =======
     
    +----
    +next
    +----
    +
    +* Deprecated use of EntryPoint.load(require=False).
    +
     ----
     10.1
     ----
    diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
    index f689b02918..a0b354ff55 100644
    --- a/pkg_resources/__init__.py
    +++ b/pkg_resources/__init__.py
    @@ -2256,6 +2256,12 @@ def __repr__(self):
         def load(self, require=True, env=None, installer=None):
             if require:
                 self.require(env, installer)
    +        else:
    +            warnings.warn(
    +                "`require` parameter is deprecated. Use "
    +                "EntryPoint._load instead.",
    +                DeprecationWarning,
    +            )
             return self._load()
     
         def _load(self):
    
    From ec6e6fb1d2078c619e85fa2eb6290f0cee813e2a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:22:53 -0500
    Subject: [PATCH 4648/8469] Normalize indentation and whitespace
    
    ---
     setuptools/archive_util.py | 36 ++++++++++++++++++++++--------------
     1 file changed, 22 insertions(+), 14 deletions(-)
    
    diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py
    index 67a67e2362..2cd5b34e80 100755
    --- a/setuptools/archive_util.py
    +++ b/setuptools/archive_util.py
    @@ -64,20 +64,23 @@ def unpack_directory(filename, extract_dir, progress_filter=default_filter):
         Raises ``UnrecognizedFormat`` if `filename` is not a directory
         """
         if not os.path.isdir(filename):
    -        raise UnrecognizedFormat("%s is not a directory" % (filename,))
    +        raise UnrecognizedFormat("%s is not a directory" % filename)
     
    -    paths = {filename:('',extract_dir)}
    +    paths = {
    +        filename: ('', extract_dir),
    +    }
         for base, dirs, files in os.walk(filename):
    -        src,dst = paths[base]
    +        src, dst = paths[base]
             for d in dirs:
    -            paths[os.path.join(base,d)] = src+d+'/', os.path.join(dst,d)
    +            paths[os.path.join(base, d)] = src + d + '/', os.path.join(dst, d)
             for f in files:
    -            target = os.path.join(dst,f)
    -            target = progress_filter(src+f, target)
    +            target = os.path.join(dst, f)
    +            target = progress_filter(src + f, target)
                 if not target:
    -                continue    # skip non-files
    +                # skip non-files
    +                continue
                 ensure_directory(target)
    -            f = os.path.join(base,f)
    +            f = os.path.join(base, f)
                 shutil.copyfile(f, target)
                 shutil.copystat(f, target)
     
    @@ -112,7 +115,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
                     # file
                     ensure_directory(target)
                     data = z.read(info.filename)
    -                f = open(target,'wb')
    +                f = open(target, 'wb')
                     try:
                         f.write(data)
                     finally:
    @@ -137,18 +140,21 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
                 "%s is not a compressed or uncompressed tar file" % (filename,)
             )
         with contextlib.closing(tarobj):
    -        tarobj.chown = lambda *args: None   # don't do any chowning!
    +        # don't do any chowning!
    +        tarobj.chown = lambda *args: None
             for member in tarobj:
                 name = member.name
                 # don't extract absolute paths or ones with .. in them
                 if not name.startswith('/') and '..' not in name.split('/'):
                     prelim_dst = os.path.join(extract_dir, *name.split('/'))
     
    -                # resolve any links and to extract the link targets as normal files
    +                # resolve any links and to extract the link targets as normal
    +                # files
                     while member is not None and (member.islnk() or member.issym()):
                         linkpath = member.linkname
                         if member.issym():
    -                        linkpath = posixpath.join(posixpath.dirname(member.name), linkpath)
    +                        base = posixpath.dirname(member.name)
    +                        linkpath = posixpath.join(base, linkpath)
                             linkpath = posixpath.normpath(linkpath)
                         member = tarobj._getmember(linkpath)
     
    @@ -158,9 +164,11 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter):
                             if final_dst.endswith(os.sep):
                                 final_dst = final_dst[:-1]
                             try:
    -                            tarobj._extract_member(member, final_dst)  # XXX Ugh
    +                            # XXX Ugh
    +                            tarobj._extract_member(member, final_dst)
                             except tarfile.ExtractError:
    -                            pass    # chown/chmod/mkfifo/mknode/makedev failed
    +                            # chown/chmod/mkfifo/mknode/makedev failed
    +                            pass
             return True
     
     extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile
    
    From eb61e5c989cda3f5e021150f91561a88ba6db73e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:24:21 -0500
    Subject: [PATCH 4649/8469] Use contextlib.closing on tarfile compat shim
    
    ---
     setuptools/tests/py26compat.py | 6 ++----
     1 file changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index e120e7447a..b1ffa87703 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -1,6 +1,7 @@
     import sys
     import unittest
     import tarfile
    +import contextlib
     
     try:
     	# provide skipIf for Python 2.4-2.6
    @@ -19,9 +20,6 @@ def _tarfile_open_ex(*args, **kwargs):
     	"""
     	Extend result as a context manager.
     	"""
    -	res = tarfile.open(*args, **kwargs)
    -	res.__exit__ = lambda exc_type, exc_value, traceback: res.close()
    -	res.__enter__ = lambda: res
    -	return res
    +	return contextlib.closing(tarfile.open(*args, **kwargs))
     
     tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else tarfile.open
    
    From 86a0dc8419a3649389bd7d58a1f7c79bae0baad6 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:29:26 -0500
    Subject: [PATCH 4650/8469] Use simple context manager; don't bother deleting
     the variable.
    
    ---
     setuptools/archive_util.py | 6 +-----
     1 file changed, 1 insertion(+), 5 deletions(-)
    
    diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py
    index 2cd5b34e80..b3c9fa5690 100755
    --- a/setuptools/archive_util.py
    +++ b/setuptools/archive_util.py
    @@ -115,12 +115,8 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter):
                     # file
                     ensure_directory(target)
                     data = z.read(info.filename)
    -                f = open(target, 'wb')
    -                try:
    +                with open(target, 'wb') as f:
                         f.write(data)
    -                finally:
    -                    f.close()
    -                    del data
                 unix_attributes = info.external_attr >> 16
                 if unix_attributes:
                     os.chmod(target, unix_attributes)
    
    From 05dfef7ed54dba0f858115be441febc94b79010a Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:45:33 -0500
    Subject: [PATCH 4651/8469] Rewrite assert
    
    ---
     setuptools/tests/test_msvc9compiler.py | 18 +++++++-----------
     1 file changed, 7 insertions(+), 11 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 970f76793d..8567aa586c 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -7,12 +7,13 @@
     
     import os
     import shutil
    -import sys
     import tempfile
     import unittest
     import distutils.errors
     import contextlib
     
    +import pytest
    +
     # importing only setuptools should apply the patch
     __import__('setuptools')
     
    @@ -93,11 +94,8 @@ def test_find_vcvarsall_patch(self):
                 # skip
                 return
     
    -        self.assertEqual(
    -            "setuptools.msvc9_support",
    -            distutils.msvc9compiler.find_vcvarsall.__module__,
    -            "find_vcvarsall was not patched"
    -        )
    +        mod_name = distutils.msvc9compiler.find_vcvarsall.__module__
    +        assert mod_name == "setuptools.msvc9_support", "find_vcvarsall unpatched"
     
             find_vcvarsall = distutils.msvc9compiler.find_vcvarsall
             query_vcvarsall = distutils.msvc9compiler.query_vcvarsall
    @@ -108,12 +106,10 @@ def test_find_vcvarsall_patch(self):
                 with MockReg():
                     self.assertIsNone(find_vcvarsall(9.0))
     
    -                try:
    +                expected = distutils.errors.DistutilsPlatformError
    +                with pytest.raises(expected) as exc:
                         query_vcvarsall(9.0)
    -                    self.fail('Expected DistutilsPlatformError from query_vcvarsall()')
    -                except distutils.errors.DistutilsPlatformError:
    -                    exc_message = str(sys.exc_info()[1])
    -                self.assertIn('aka.ms/vcpython27', exc_message)
    +                assert 'aka.ms/vcpython27' in str(exc)
     
             key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir'
             key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir'
    
    From 04cf504041b38b85c8f2e9ffddda5897b2161e67 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:48:52 -0500
    Subject: [PATCH 4652/8469] Use pytest importorskip for skip logic
    
    ---
     setuptools/tests/test_msvc9compiler.py | 6 ++----
     1 file changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 8567aa586c..2774751262 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -17,6 +17,8 @@
     # importing only setuptools should apply the patch
     __import__('setuptools')
     
    +pytest.importorskip("distutils.msvc9compiler")
    +
     class MockReg:
         """Mock for distutils.msvc9compiler.Reg. We patch it
         with an instance of this class that mocks out the
    @@ -90,10 +92,6 @@ def patch_env(**replacements):
     class TestMSVC9Compiler(unittest.TestCase):
     
         def test_find_vcvarsall_patch(self):
    -        if not hasattr(distutils, 'msvc9compiler'):
    -            # skip
    -            return
    -
             mod_name = distutils.msvc9compiler.find_vcvarsall.__module__
             assert mod_name == "setuptools.msvc9_support", "find_vcvarsall unpatched"
     
    
    From 06b3378ac1263b3f284b45ca0dcbfe71e55e29fd Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Wed, 31 Dec 2014 14:51:55 -0500
    Subject: [PATCH 4653/8469] Report skipped tests
    
    ---
     .travis.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index 5f644e00a3..004a97ebdf 100644
    --- a/.travis.yml
    +++ b/.travis.yml
    @@ -12,5 +12,5 @@ script:
      - python bootstrap.py
      - python setup.py egg_info
     
    - - python setup.py ptr
    + - python setup.py ptr --addopts='-rs'
      - python ez_setup.py --version 7.0
    
    From a75c16ed451046c6c642fb818fe96af55171355e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:00:30 -0500
    Subject: [PATCH 4654/8469] Ported window wrapper tests from doctest to unit
     tests.
    
    ---
     setuptools/tests/test_windows_wrappers.py | 178 ++++++++++++++++++++++
     setuptools/tests/win_script_wrapper.txt   | 154 -------------------
     2 files changed, 178 insertions(+), 154 deletions(-)
     create mode 100644 setuptools/tests/test_windows_wrappers.py
     delete mode 100644 setuptools/tests/win_script_wrapper.txt
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    new file mode 100644
    index 0000000000..910129179a
    --- /dev/null
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -0,0 +1,178 @@
    +"""
    +Python Script Wrapper for Windows
    +=================================
    +
    +setuptools includes wrappers for Python scripts that allows them to be
    +executed like regular windows programs.  There are 2 wrappers, once
    +for command-line programs, cli.exe, and one for graphical programs,
    +gui.exe.  These programs are almost identical, function pretty much
    +the same way, and are generated from the same source file.  The
    +wrapper programs are used by copying them to the directory containing
    +the script they are to wrap and with the same name as the script they
    +are to wrap.
    +"""
    +
    +import os, sys
    +import textwrap
    +import subprocess
    +
    +import pytest
    +
    +from setuptools.command.easy_install import nt_quote_arg
    +import pkg_resources
    +
    +
    +pytestmark = pytest.mark.skipif(sys.platform != 'win32', reason="Windows only")
    +
    +
    +class WrapperTester:
    +    @classmethod
    +    def create_script(cls, tempdir):
    +        """
    +        Create a simple script, foo-script.py
    +
    +        Note that the script starts with a Unix-style '#!' line saying which
    +        Python executable to run.  The wrapper will use this line to find the
    +        correct Python executable.
    +        """
    +
    +        sample_directory = tempdir
    +        script = cls.script_tmpl % dict(python_exe=nt_quote_arg
    +            (sys.executable))
    +
    +        f = open(os.path.join(sample_directory, cls.script_name), 'w')
    +        f.write(script)
    +        f.close()
    +
    +        # also copy cli.exe to the sample directory
    +
    +        f = open(os.path.join(sample_directory, cls.wrapper_name), 'wb')
    +        f.write(
    +            pkg_resources.resource_string('setuptools', cls.wrapper_source)
    +            )
    +        f.close()
    +
    +
    +class TestCLI(WrapperTester):
    +    script_name = 'foo-script.py'
    +    wrapper_source = 'cli-32.exe'
    +    wrapper_name = 'foo.exe'
    +    script_tmpl = textwrap.dedent("""
    +        #!%(python_exe)s
    +        import sys
    +        input = repr(sys.stdin.read())
    +        print(sys.argv[0][-14:])
    +        print(sys.argv[1:])
    +        print(input)
    +        if __debug__:
    +            print('non-optimized')
    +        """).lstrip()
    +
    +    def test_basic(self, tmpdir):
    +        """
    +        When the copy of cli.exe, foo.exe in this example, runs, it examines
    +        the path name it was run with and computes a Python script path name
    +        by removing the '.exe' suffix and adding the '-script.py' suffix. (For
    +        GUI programs, the suffix '-script-pyw' is added.)  This is why we
    +        named out script the way we did.  Now we can run out script by running
    +        the wrapper:
    +
    +        This example was a little pathological in that it exercised windows
    +        (MS C runtime) quoting rules:
    +
    +        - Strings containing spaces are surrounded by double quotes.
    +
    +        - Double quotes in strings need to be escaped by preceding them with
    +          back slashes.
    +
    +        - One or more backslashes preceding double quotes need to be escaped
    +          by preceding each of them with back slashes.
    +        """
    +        sample_directory = str(tmpdir)
    +        self.create_script(sample_directory)
    +        cmd = [os.path.join(sample_directory, 'foo.exe'), 'arg1', 'arg 2',
    +            'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
    +        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
    +        stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii'))
    +        actual = stdout.decode('ascii').replace('\r\n', '\n')
    +        expected = textwrap.dedent(r"""
    +            \foo-script.py
    +            ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
    +            'hello\nworld\n'
    +            non-optimized
    +            """).lstrip()
    +        assert actual == expected
    +
    +    def test_with_options(self, tmpdir):
    +        """
    +        Specifying Python Command-line Options
    +        --------------------------------------
    +
    +        You can specify a single argument on the '#!' line.  This can be used
    +        to specify Python options like -O, to run in optimized mode or -i
    +        to start the interactive interpreter.  You can combine multiple
    +        options as usual. For example, to run in optimized mode and
    +        enter the interpreter after running the script, you could use -Oi:
    +        """
    +        sample_directory = str(tmpdir)
    +        self.create_script(sample_directory)
    +        f = open(os.path.join(sample_directory, 'foo-script.py'), 'w')
    +        f.write(textwrap.dedent("""
    +            #!%(python_exe)s  -Oi
    +            import sys
    +            input = repr(sys.stdin.read())
    +            print(sys.argv[0][-14:])
    +            print(sys.argv[1:])
    +            print(input)
    +            if __debug__:
    +                print('non-optimized')
    +            sys.ps1 = '---'
    +            """).lstrip() % dict(python_exe=nt_quote_arg(sys.executable)))
    +        f.close()
    +        cmd = [os.path.join(sample_directory, 'foo.exe')]
    +        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
    +        stdout, stderr = proc.communicate()
    +        actual = stdout.decode('ascii').replace('\r\n', '\n')
    +        expected = textwrap.dedent(r"""
    +            \foo-script.py
    +            []
    +            ''
    +            ---
    +            """).lstrip()
    +        assert actual == expected
    +
    +
    +class TestGUI(WrapperTester):
    +    """
    +    Testing the GUI Version
    +    -----------------------
    +    """
    +    script_name = 'bar-script.pyw'
    +    wrapper_source = 'gui-32.exe'
    +    wrapper_name = 'bar.exe'
    +
    +    script_tmpl = textwrap.dedent("""
    +        #!%(python_exe)s
    +        import sys
    +        f = open(sys.argv[1], 'wb')
    +        bytes_written = f.write(repr(sys.argv[2]).encode('utf-8'))
    +        f.close()
    +        """).strip()
    +
    +    def test_basic(self, tmpdir):
    +        """Test the GUI version with the simple scipt, bar-script.py"""
    +        sample_directory = str(tmpdir)
    +        self.create_script(sample_directory)
    +
    +        cmd = [
    +            os.path.join(sample_directory, 'bar.exe'),
    +            os.path.join(sample_directory, 'test_output.txt'),
    +            'Test Argument',
    +        ]
    +        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
    +        stdout, stderr = proc.communicate()
    +        assert not stdout
    +        assert not stderr
    +        f_out = open(os.path.join(sample_directory, 'test_output.txt'), 'rb')
    +        assert f_out.read().decode('ascii') == repr('Test Argument')
    +        f_out.close()
    diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt
    deleted file mode 100644
    index b3a52e0abd..0000000000
    --- a/setuptools/tests/win_script_wrapper.txt
    +++ /dev/null
    @@ -1,154 +0,0 @@
    -Python Script Wrapper for Windows
    -=================================
    -
    -setuptools includes wrappers for Python scripts that allows them to be
    -executed like regular windows programs.  There are 2 wrappers, once
    -for command-line programs, cli.exe, and one for graphical programs,
    -gui.exe.  These programs are almost identical, function pretty much
    -the same way, and are generated from the same source file.  The
    -wrapper programs are used by copying them to the directory containing
    -the script they are to wrap and with the same name as the script they
    -are to wrap.  In the rest of this document, we'll give an example that
    -will illustrate this.
    -
    -Let's create a simple script, foo-script.py:
    -
    -    >>> import os, sys, tempfile
    -    >>> from setuptools.command.easy_install import nt_quote_arg
    -    >>> sample_directory = tempfile.mkdtemp()
    -    >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w')
    -    >>> bytes_written = f.write(
    -    ... """#!%(python_exe)s
    -    ... import sys
    -    ... input = repr(sys.stdin.read())
    -    ... print(sys.argv[0][-14:])
    -    ... print(sys.argv[1:])
    -    ... print(input)
    -    ... if __debug__:
    -    ...     print('non-optimized')
    -    ... """ % dict(python_exe=nt_quote_arg(sys.executable)))
    -    >>> f.close()
    -
    -Note that the script starts with a Unix-style '#!' line saying which
    -Python executable to run.  The wrapper will use this to find the
    -correct Python executable.
    -
    -We'll also copy cli.exe to the sample-directory with the name foo.exe:
    -
    -    >>> import pkg_resources
    -    >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb')
    -    >>> bytes_written = f.write(
    -    ...     pkg_resources.resource_string('setuptools', 'cli-32.exe')
    -    ...     )
    -    >>> f.close()
    -
    -When the copy of cli.exe, foo.exe in this example, runs, it examines
    -the path name it was run with and computes a Python script path name
    -by removing the '.exe' suffix and adding the '-script.py' suffix. (For
    -GUI programs, the suffix '-script-pyw' is added.)  This is why we
    -named out script the way we did.  Now we can run out script by running
    -the wrapper:
    -
    -    >>> import subprocess
    -    >>> cmd = [os.path.join(sample_directory, 'foo.exe'), 'arg1', 'arg 2',
    -    ...     'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
    -    >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
    -    >>> stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii'))
    -    >>> bytes = sys.stdout.write(stdout.decode('ascii').replace('\r\n', '\n'))
    -    \foo-script.py
    -    ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
    -    'hello\nworld\n'
    -    non-optimized
    -
    -This example was a little pathological in that it exercised windows
    -(MS C runtime) quoting rules:
    -
    -- Strings containing spaces are surrounded by double quotes.
    -
    -- Double quotes in strings need to be escaped by preceding them with
    -  back slashes.
    -
    -- One or more backslashes preceding double quotes need to be escaped
    -  by preceding each of them with back slashes.
    -
    -
    -Specifying Python Command-line Options
    ---------------------------------------
    -
    -You can specify a single argument on the '#!' line.  This can be used
    -to specify Python options like -O, to run in optimized mode or -i
    -to start the interactive interpreter.  You can combine multiple
    -options as usual. For example, to run in optimized mode and
    -enter the interpreter after running the script, you could use -Oi:
    -
    -    >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w')
    -    >>> bytes_written = f.write(
    -    ... """#!%(python_exe)s  -Oi
    -    ... import sys
    -    ... input = repr(sys.stdin.read())
    -    ... print(sys.argv[0][-14:])
    -    ... print(sys.argv[1:])
    -    ... print(input)
    -    ... if __debug__:
    -    ...     print('non-optimized')
    -    ... sys.ps1 = '---'
    -    ... """ % dict(python_exe=nt_quote_arg(sys.executable)))
    -    >>> f.close()
    -    >>> cmd = [os.path.join(sample_directory, 'foo.exe')]
    -    >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
    -    >>> stdout, stderr = proc.communicate()
    -    >>> bytes = sys.stdout.write(stdout.decode('ascii').replace('\r\n', '\n'))
    -    \foo-script.py
    -    []
    -    ''
    -    ---
    -
    -Testing the GUI Version
    ------------------------
    -
    -Now let's test the GUI version with the simple scipt, bar-script.py:
    -
    -    >>> import os, sys, tempfile
    -    >>> from setuptools.command.easy_install import nt_quote_arg
    -    >>> sample_directory = tempfile.mkdtemp()
    -    >>> f = open(os.path.join(sample_directory, 'bar-script.pyw'), 'w')
    -    >>> bytes_written = f.write(
    -    ... """#!%(python_exe)s
    -    ... import sys
    -    ... f = open(sys.argv[1], 'wb')
    -    ... bytes_written = f.write(repr(sys.argv[2]).encode('utf-8'))
    -    ... f.close()
    -    ... """ % dict(python_exe=nt_quote_arg(sys.executable)))
    -    >>> f.close()
    -
    -We'll also copy gui.exe to the sample-directory with the name bar.exe:
    -
    -    >>> import pkg_resources
    -    >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb')
    -    >>> bytes_written = f.write(
    -    ...     pkg_resources.resource_string('setuptools', 'gui-32.exe')
    -    ...     )
    -    >>> f.close()
    -
    -Finally, we'll run the script and check the result:
    -
    -    >>> cmd = [
    -    ...     os.path.join(sample_directory, 'bar.exe'),
    -    ...     os.path.join(sample_directory, 'test_output.txt'),
    -    ...     'Test Argument',
    -    ... ]
    -    >>> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
    -    >>> stdout, stderr = proc.communicate()
    -    >>> print(stdout.decode('ascii'))
    -    
    -    >>> f_out = open(os.path.join(sample_directory, 'test_output.txt'), 'rb')
    -    >>> print(f_out.read().decode('ascii'))
    -    'Test Argument'
    -    >>> f_out.close()
    -
    -
    -We're done with the sample_directory:
    -
    -    >>> import shutil
    -    >>> shutil.rmtree(sample_directory)
    -
    
    From aee1868928e70bc6fdbd91649d596380646bf481 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:03:18 -0500
    Subject: [PATCH 4655/8469] Simplify script creation with context managers and
     leveraging local variables for the template population.
    
    ---
     setuptools/tests/test_windows_wrappers.py | 18 +++++++-----------
     1 file changed, 7 insertions(+), 11 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 910129179a..92e9f88284 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -37,20 +37,16 @@ def create_script(cls, tempdir):
             """
     
             sample_directory = tempdir
    -        script = cls.script_tmpl % dict(python_exe=nt_quote_arg
    -            (sys.executable))
    +        python_exe = nt_quote_arg(sys.executable)
    +        script = cls.script_tmpl % locals()
     
    -        f = open(os.path.join(sample_directory, cls.script_name), 'w')
    -        f.write(script)
    -        f.close()
    +        with open(os.path.join(sample_directory, cls.script_name), 'w') as f:
    +            f.write(script)
     
             # also copy cli.exe to the sample directory
    -
    -        f = open(os.path.join(sample_directory, cls.wrapper_name), 'wb')
    -        f.write(
    -            pkg_resources.resource_string('setuptools', cls.wrapper_source)
    -            )
    -        f.close()
    +        with open(os.path.join(sample_directory, cls.wrapper_name), 'wb') as f:
    +            w = pkg_resources.resource_string('setuptools', cls.wrapper_source)
    +            f.write(w)
     
     
     class TestCLI(WrapperTester):
    
    From 17f9e3abbd8b6ed2e1bb941f9f37659d9bf757f0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:07:02 -0500
    Subject: [PATCH 4656/8469] More context managers
    
    ---
     setuptools/tests/test_windows_wrappers.py | 14 +++++++-------
     1 file changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 92e9f88284..29aa9c6d0c 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -112,8 +112,7 @@ def test_with_options(self, tmpdir):
             """
             sample_directory = str(tmpdir)
             self.create_script(sample_directory)
    -        f = open(os.path.join(sample_directory, 'foo-script.py'), 'w')
    -        f.write(textwrap.dedent("""
    +        tmpl = textwrap.dedent("""
                 #!%(python_exe)s  -Oi
                 import sys
                 input = repr(sys.stdin.read())
    @@ -123,8 +122,9 @@ def test_with_options(self, tmpdir):
                 if __debug__:
                     print('non-optimized')
                 sys.ps1 = '---'
    -            """).lstrip() % dict(python_exe=nt_quote_arg(sys.executable)))
    -        f.close()
    +            """).lstrip()
    +        with open(os.path.join(sample_directory, 'foo-script.py'), 'w') as f:
    +            f.write(tmpl % dict(python_exe=nt_quote_arg(sys.executable)))
             cmd = [os.path.join(sample_directory, 'foo.exe')]
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
             stdout, stderr = proc.communicate()
    @@ -169,6 +169,6 @@ def test_basic(self, tmpdir):
             stdout, stderr = proc.communicate()
             assert not stdout
             assert not stderr
    -        f_out = open(os.path.join(sample_directory, 'test_output.txt'), 'rb')
    -        assert f_out.read().decode('ascii') == repr('Test Argument')
    -        f_out.close()
    +        with open(os.path.join(sample_directory, 'test_output.txt'), 'rb') as f_out:
    +            actual = f_out.read().decode('ascii')
    +        assert actual == repr('Test Argument')
    
    From f43351575a3f92cd5422973a03c577f787c5898c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:09:10 -0500
    Subject: [PATCH 4657/8469] Update docs
    
    ---
     setuptools/tests/test_windows_wrappers.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 29aa9c6d0c..0e165bd929 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -3,7 +3,7 @@
     =================================
     
     setuptools includes wrappers for Python scripts that allows them to be
    -executed like regular windows programs.  There are 2 wrappers, once
    +executed like regular windows programs.  There are 2 wrappers, one
     for command-line programs, cli.exe, and one for graphical programs,
     gui.exe.  These programs are almost identical, function pretty much
     the same way, and are generated from the same source file.  The
    @@ -69,7 +69,7 @@ def test_basic(self, tmpdir):
             When the copy of cli.exe, foo.exe in this example, runs, it examines
             the path name it was run with and computes a Python script path name
             by removing the '.exe' suffix and adding the '-script.py' suffix. (For
    -        GUI programs, the suffix '-script-pyw' is added.)  This is why we
    +        GUI programs, the suffix '-script.pyw' is added.)  This is why we
             named out script the way we did.  Now we can run out script by running
             the wrapper:
     
    
    From 88b8ad6b797cb9dcd898fc1b125dc90cc35c565f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:13:58 -0500
    Subject: [PATCH 4658/8469] Extract prep_script method
    
    ---
     setuptools/tests/test_windows_wrappers.py | 11 ++++++++---
     1 file changed, 8 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 0e165bd929..187177f76a 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -26,6 +26,12 @@
     
     
     class WrapperTester:
    +
    +    @classmethod
    +    def prep_script(cls, template):
    +        python_exe = nt_quote_arg(sys.executable)
    +        return template % locals()
    +
         @classmethod
         def create_script(cls, tempdir):
             """
    @@ -37,8 +43,7 @@ def create_script(cls, tempdir):
             """
     
             sample_directory = tempdir
    -        python_exe = nt_quote_arg(sys.executable)
    -        script = cls.script_tmpl % locals()
    +        script = cls.prep_script(cls.script_tmpl)
     
             with open(os.path.join(sample_directory, cls.script_name), 'w') as f:
                 f.write(script)
    @@ -124,7 +129,7 @@ def test_with_options(self, tmpdir):
                 sys.ps1 = '---'
                 """).lstrip()
             with open(os.path.join(sample_directory, 'foo-script.py'), 'w') as f:
    -            f.write(tmpl % dict(python_exe=nt_quote_arg(sys.executable)))
    +            f.write(self.prep_script(tmpl))
             cmd = [os.path.join(sample_directory, 'foo.exe')]
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
             stdout, stderr = proc.communicate()
    
    From 506d6f75a02e7943efbada210798c4798fb89835 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:16:32 -0500
    Subject: [PATCH 4659/8469] Leverage LocalPath characteristics of tmpdir.
    
    ---
     setuptools/tests/test_windows_wrappers.py | 30 ++++++++++-------------
     1 file changed, 13 insertions(+), 17 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 187177f76a..70e23a402d 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -12,7 +12,7 @@
     are to wrap.
     """
     
    -import os, sys
    +import sys
     import textwrap
     import subprocess
     
    @@ -33,7 +33,7 @@ def prep_script(cls, template):
             return template % locals()
     
         @classmethod
    -    def create_script(cls, tempdir):
    +    def create_script(cls, tmpdir):
             """
             Create a simple script, foo-script.py
     
    @@ -42,14 +42,13 @@ def create_script(cls, tempdir):
             correct Python executable.
             """
     
    -        sample_directory = tempdir
             script = cls.prep_script(cls.script_tmpl)
     
    -        with open(os.path.join(sample_directory, cls.script_name), 'w') as f:
    +        with (tmpdir / cls.script_name).open('w') as f:
                 f.write(script)
     
             # also copy cli.exe to the sample directory
    -        with open(os.path.join(sample_directory, cls.wrapper_name), 'wb') as f:
    +        with (tmpdir / cls.wrapper_name).open('wb') as f:
                 w = pkg_resources.resource_string('setuptools', cls.wrapper_source)
                 f.write(w)
     
    @@ -89,9 +88,8 @@ def test_basic(self, tmpdir):
             - One or more backslashes preceding double quotes need to be escaped
               by preceding each of them with back slashes.
             """
    -        sample_directory = str(tmpdir)
    -        self.create_script(sample_directory)
    -        cmd = [os.path.join(sample_directory, 'foo.exe'), 'arg1', 'arg 2',
    +        self.create_script(tmpdir)
    +        cmd = [str(tmpdir / 'foo.exe'), 'arg1', 'arg 2',
                 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
             stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii'))
    @@ -115,8 +113,7 @@ def test_with_options(self, tmpdir):
             options as usual. For example, to run in optimized mode and
             enter the interpreter after running the script, you could use -Oi:
             """
    -        sample_directory = str(tmpdir)
    -        self.create_script(sample_directory)
    +        self.create_script(tmpdir)
             tmpl = textwrap.dedent("""
                 #!%(python_exe)s  -Oi
                 import sys
    @@ -128,9 +125,9 @@ def test_with_options(self, tmpdir):
                     print('non-optimized')
                 sys.ps1 = '---'
                 """).lstrip()
    -        with open(os.path.join(sample_directory, 'foo-script.py'), 'w') as f:
    +        with (tmpdir / 'foo-script.py').open('w') as f:
                 f.write(self.prep_script(tmpl))
    -        cmd = [os.path.join(sample_directory, 'foo.exe')]
    +        cmd = [str(tmpdir / 'foo.exe')]
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
             stdout, stderr = proc.communicate()
             actual = stdout.decode('ascii').replace('\r\n', '\n')
    @@ -162,18 +159,17 @@ class TestGUI(WrapperTester):
     
         def test_basic(self, tmpdir):
             """Test the GUI version with the simple scipt, bar-script.py"""
    -        sample_directory = str(tmpdir)
    -        self.create_script(sample_directory)
    +        self.create_script(tmpdir)
     
             cmd = [
    -            os.path.join(sample_directory, 'bar.exe'),
    -            os.path.join(sample_directory, 'test_output.txt'),
    +            str(tmpdir / 'bar.exe'),
    +            str(tmpdir / 'test_output.txt'),
                 'Test Argument',
             ]
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
             stdout, stderr = proc.communicate()
             assert not stdout
             assert not stderr
    -        with open(os.path.join(sample_directory, 'test_output.txt'), 'rb') as f_out:
    +        with (tmpdir / 'test_output.txt').open('rb') as f_out:
                 actual = f_out.read().decode('ascii')
             assert actual == repr('Test Argument')
    
    From 64b8fc3f09adb0843bae6f118da8147b8697e4dd Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:23:57 -0500
    Subject: [PATCH 4660/8469] Reindent for clarity
    
    ---
     setuptools/tests/test_windows_wrappers.py | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index 70e23a402d..b6c1e573d1 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -89,8 +89,14 @@ def test_basic(self, tmpdir):
               by preceding each of them with back slashes.
             """
             self.create_script(tmpdir)
    -        cmd = [str(tmpdir / 'foo.exe'), 'arg1', 'arg 2',
    -            'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
    +        cmd = [
    +            str(tmpdir / 'foo.exe'),
    +            'arg1',
    +            'arg 2',
    +            'arg "2\\"',
    +            'arg 4\\',
    +            'arg5 a\\\\b',
    +        ]
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
             stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii'))
             actual = stdout.decode('ascii').replace('\r\n', '\n')
    
    From 0ede8363da2b989b2b498bf16eb6d30a6ae088ac Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:25:02 -0500
    Subject: [PATCH 4661/8469] Remove additional tests, no longer relevant.
    
    ---
     setuptools/tests/__init__.py | 12 ------------
     1 file changed, 12 deletions(-)
    
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index e5d6545ad0..3aa5525dab 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -2,7 +2,6 @@
     import sys
     import os
     import unittest
    -import doctest
     import distutils.core
     import distutils.cmd
     from distutils.errors import DistutilsOptionError, DistutilsPlatformError
    @@ -16,17 +15,6 @@
     from setuptools import Feature
     from setuptools.depends import Require
     
    -def additional_tests():
    -    suite = unittest.TestSuite((
    -        doctest.DocFileSuite(
    -            'api_tests.txt',
    -            optionflags=doctest.ELLIPSIS, package='pkg_resources',
    -            ),
    -        ))
    -    if sys.platform == 'win32':
    -        suite.addTest(doctest.DocFileSuite('win_script_wrapper.txt'))
    -    return suite
    -
     def makeSetup(**args):
         """Return distribution from 'setup(**args)', without executing commands"""
     
    
    From 81c4405729df21fe5326df0bc2f2ed3e99d3e735 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:33:08 -0500
    Subject: [PATCH 4662/8469] Convert DependsTests to pytest discovered tests.
    
    ---
     setuptools/tests/__init__.py | 77 ++++++++++++++++++------------------
     1 file changed, 38 insertions(+), 39 deletions(-)
    
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index 3aa5525dab..bb3a0b3107 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -10,6 +10,8 @@
     from distutils.version import LooseVersion
     from setuptools.compat import func_code
     
    +import pytest
    +
     import setuptools.dist
     import setuptools.depends as dep
     from setuptools import Feature
    @@ -29,7 +31,7 @@ def makeSetup(**args):
             distutils.core._setup_stop_after = None
     
     
    -class DependsTests(unittest.TestCase):
    +class TestDepends:
     
         def testExtractConst(self):
             if not hasattr(dep, 'extract_constant'):
    @@ -42,21 +44,24 @@ def f1():
                 y = z
     
             fc = func_code(f1)
    +
             # unrecognized name
    -        self.assertEqual(dep.extract_constant(fc,'q', -1), None)
    +        assert dep.extract_constant(fc,'q', -1) is None
     
             # constant assigned
    -        self.assertEqual(dep.extract_constant(fc,'x', -1), "test")
    +        dep.extract_constant(fc,'x', -1) == "test"
     
             # expression assigned
    -        self.assertEqual(dep.extract_constant(fc,'y', -1), -1)
    +        dep.extract_constant(fc,'y', -1) == -1
     
             # recognized name, not assigned
    -        self.assertEqual(dep.extract_constant(fc,'z', -1), None)
    +        dep.extract_constant(fc,'z', -1) is None
     
         def testFindModule(self):
    -        self.assertRaises(ImportError, dep.find_module, 'no-such.-thing')
    -        self.assertRaises(ImportError, dep.find_module, 'setuptools.non-existent')
    +        with pytest.raises(ImportError):
    +            dep.find_module('no-such.-thing')
    +        with pytest.raises(ImportError):
    +            dep.find_module('setuptools.non-existent')
             f,p,i = dep.find_module('setuptools.tests')
             f.close()
     
    @@ -66,15 +71,9 @@ def testModuleExtract(self):
                 return
     
             from email import __version__
    -        self.assertEqual(
    -            dep.get_module_constant('email','__version__'), __version__
    -        )
    -        self.assertEqual(
    -            dep.get_module_constant('sys','version'), sys.version
    -        )
    -        self.assertEqual(
    -            dep.get_module_constant('setuptools.tests','__doc__'),__doc__
    -        )
    +        assert dep.get_module_constant('email','__version__') == __version__
    +        assert dep.get_module_constant('sys','version') == sys.version
    +        assert dep.get_module_constant('setuptools.tests','__doc__') == __doc__
     
         def testRequire(self):
             if not hasattr(dep, 'extract_constant'):
    @@ -83,40 +82,40 @@ def testRequire(self):
     
             req = Require('Email','1.0.3','email')
     
    -        self.assertEqual(req.name, 'Email')
    -        self.assertEqual(req.module, 'email')
    -        self.assertEqual(req.requested_version, '1.0.3')
    -        self.assertEqual(req.attribute, '__version__')
    -        self.assertEqual(req.full_name(), 'Email-1.0.3')
    +        assert req.name == 'Email'
    +        assert req.module == 'email'
    +        assert req.requested_version == '1.0.3'
    +        assert req.attribute == '__version__'
    +        assert req.full_name() == 'Email-1.0.3'
     
             from email import __version__
    -        self.assertEqual(req.get_version(), __version__)
    -        self.assertTrue(req.version_ok('1.0.9'))
    -        self.assertTrue(not req.version_ok('0.9.1'))
    -        self.assertTrue(not req.version_ok('unknown'))
    +        assert req.get_version() == __version__
    +        assert req.version_ok('1.0.9')
    +        assert not req.version_ok('0.9.1')
    +        assert not req.version_ok('unknown')
     
    -        self.assertTrue(req.is_present())
    -        self.assertTrue(req.is_current())
    +        assert req.is_present()
    +        assert req.is_current()
     
             req = Require('Email 3000','03000','email',format=LooseVersion)
    -        self.assertTrue(req.is_present())
    -        self.assertTrue(not req.is_current())
    -        self.assertTrue(not req.version_ok('unknown'))
    +        assert req.is_present()
    +        assert not req.is_current()
    +        assert not req.version_ok('unknown')
     
             req = Require('Do-what-I-mean','1.0','d-w-i-m')
    -        self.assertTrue(not req.is_present())
    -        self.assertTrue(not req.is_current())
    +        assert not req.is_present()
    +        assert not req.is_current()
     
             req = Require('Tests', None, 'tests', homepage="http://example.com")
    -        self.assertEqual(req.format, None)
    -        self.assertEqual(req.attribute, None)
    -        self.assertEqual(req.requested_version, None)
    -        self.assertEqual(req.full_name(), 'Tests')
    -        self.assertEqual(req.homepage, 'http://example.com')
    +        assert req.format is None
    +        assert req.attribute is None
    +        assert req.requested_version is None
    +        assert req.full_name() == 'Tests'
    +        assert req.homepage == 'http://example.com'
     
             paths = [os.path.dirname(p) for p in __path__]
    -        self.assertTrue(req.is_present(paths))
    -        self.assertTrue(req.is_current(paths))
    +        assert req.is_present(paths)
    +        assert req.is_current(paths)
     
     
     class DistroTests(unittest.TestCase):
    
    From c10ab0661e13776146e2948c67593c65035ccf8c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:36:43 -0500
    Subject: [PATCH 4663/8469] Unify detection of bytecode
    
    ---
     setuptools/tests/__init__.py | 15 +++++++--------
     1 file changed, 7 insertions(+), 8 deletions(-)
    
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index bb3a0b3107..900b019956 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -31,6 +31,11 @@ def makeSetup(**args):
             distutils.core._setup_stop_after = None
     
     
    +needs_bytecode = pytest.mark.skipif(
    +    not hasattr(dep, 'get_module_constant'),
    +    reason="bytecode support not available",
    +)
    +
     class TestDepends:
     
         def testExtractConst(self):
    @@ -65,21 +70,15 @@ def testFindModule(self):
             f,p,i = dep.find_module('setuptools.tests')
             f.close()
     
    +    @needs_bytecode
         def testModuleExtract(self):
    -        if not hasattr(dep, 'get_module_constant'):
    -            # skip on non-bytecode platforms
    -            return
    -
             from email import __version__
             assert dep.get_module_constant('email','__version__') == __version__
             assert dep.get_module_constant('sys','version') == sys.version
             assert dep.get_module_constant('setuptools.tests','__doc__') == __doc__
     
    +    @needs_bytecode
         def testRequire(self):
    -        if not hasattr(dep, 'extract_constant'):
    -            # skip on non-bytecode platformsh
    -            return
    -
             req = Require('Email','1.0.3','email')
     
             assert req.name == 'Email'
    
    From 5a2207aefc31c5cefc07d26957f8b1c23694d5f8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 11:48:22 -0500
    Subject: [PATCH 4664/8469] Removed remainder of unittest dependence in
     setuptools/tests/__init__.py
    
    ---
     setuptools/tests/__init__.py | 179 ++++++++++++++++-------------------
     1 file changed, 83 insertions(+), 96 deletions(-)
    
    diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
    index 900b019956..b8a29cbac2 100644
    --- a/setuptools/tests/__init__.py
    +++ b/setuptools/tests/__init__.py
    @@ -1,7 +1,6 @@
     """Tests for the 'setuptools' package"""
     import sys
     import os
    -import unittest
     import distutils.core
     import distutils.cmd
     from distutils.errors import DistutilsOptionError, DistutilsPlatformError
    @@ -117,9 +116,9 @@ def testRequire(self):
             assert req.is_current(paths)
     
     
    -class DistroTests(unittest.TestCase):
    +class TestDistro:
     
    -    def setUp(self):
    +    def setup_method(self, method):
             self.e1 = Extension('bar.ext',['bar.c'])
             self.e2 = Extension('c.y', ['y.c'])
     
    @@ -131,21 +130,21 @@ def setUp(self):
             )
     
         def testDistroType(self):
    -        self.assertTrue(isinstance(self.dist,setuptools.dist.Distribution))
    +        assert isinstance(self.dist,setuptools.dist.Distribution)
     
         def testExcludePackage(self):
             self.dist.exclude_package('a')
    -        self.assertEqual(self.dist.packages, ['b','c'])
    +        assert self.dist.packages == ['b','c']
     
             self.dist.exclude_package('b')
    -        self.assertEqual(self.dist.packages, ['c'])
    -        self.assertEqual(self.dist.py_modules, ['x'])
    -        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])
    +        assert self.dist.packages == ['c']
    +        assert self.dist.py_modules == ['x']
    +        assert self.dist.ext_modules == [self.e1, self.e2]
     
             self.dist.exclude_package('c')
    -        self.assertEqual(self.dist.packages, [])
    -        self.assertEqual(self.dist.py_modules, ['x'])
    -        self.assertEqual(self.dist.ext_modules, [self.e1])
    +        assert self.dist.packages == []
    +        assert self.dist.py_modules == ['x']
    +        assert self.dist.ext_modules == [self.e1]
     
             # test removals from unspecified options
             makeSetup().exclude_package('x')
    @@ -153,21 +152,21 @@ def testExcludePackage(self):
         def testIncludeExclude(self):
             # remove an extension
             self.dist.exclude(ext_modules=[self.e1])
    -        self.assertEqual(self.dist.ext_modules, [self.e2])
    +        assert self.dist.ext_modules == [self.e2]
     
             # add it back in
             self.dist.include(ext_modules=[self.e1])
    -        self.assertEqual(self.dist.ext_modules, [self.e2, self.e1])
    +        assert self.dist.ext_modules == [self.e2, self.e1]
     
             # should not add duplicate
             self.dist.include(ext_modules=[self.e1])
    -        self.assertEqual(self.dist.ext_modules, [self.e2, self.e1])
    +        assert self.dist.ext_modules == [self.e2, self.e1]
     
         def testExcludePackages(self):
             self.dist.exclude(packages=['c','b','a'])
    -        self.assertEqual(self.dist.packages, [])
    -        self.assertEqual(self.dist.py_modules, ['x'])
    -        self.assertEqual(self.dist.ext_modules, [self.e1])
    +        assert self.dist.packages == []
    +        assert self.dist.py_modules == ['x']
    +        assert self.dist.ext_modules == [self.e1]
     
         def testEmpty(self):
             dist = makeSetup()
    @@ -176,49 +175,41 @@ def testEmpty(self):
             dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2])
     
         def testContents(self):
    -        self.assertTrue(self.dist.has_contents_for('a'))
    +        assert self.dist.has_contents_for('a')
             self.dist.exclude_package('a')
    -        self.assertTrue(not self.dist.has_contents_for('a'))
    +        assert not self.dist.has_contents_for('a')
     
    -        self.assertTrue(self.dist.has_contents_for('b'))
    +        assert self.dist.has_contents_for('b')
             self.dist.exclude_package('b')
    -        self.assertTrue(not self.dist.has_contents_for('b'))
    +        assert not self.dist.has_contents_for('b')
     
    -        self.assertTrue(self.dist.has_contents_for('c'))
    +        assert self.dist.has_contents_for('c')
             self.dist.exclude_package('c')
    -        self.assertTrue(not self.dist.has_contents_for('c'))
    +        assert not self.dist.has_contents_for('c')
     
         def testInvalidIncludeExclude(self):
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.include, nonexistent_option='x'
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.exclude, nonexistent_option='x'
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.include, packages={'x':'y'}
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.exclude, packages={'x':'y'}
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.include, ext_modules={'x':'y'}
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.exclude, ext_modules={'x':'y'}
    -        )
    -
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.include, package_dir=['q']
    -        )
    -        self.assertRaises(DistutilsSetupError,
    -            self.dist.exclude, package_dir=['q']
    -        )
    -
    -
    -class FeatureTests(unittest.TestCase):
    -
    -    def setUp(self):
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.include(nonexistent_option='x')
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.exclude(nonexistent_option='x')
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.include(packages={'x':'y'})
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.exclude(packages={'x':'y'})
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.include(ext_modules={'x':'y'})
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.exclude(ext_modules={'x':'y'})
    +
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.include(package_dir=['q'])
    +        with pytest.raises(DistutilsSetupError):
    +            self.dist.exclude(package_dir=['q'])
    +
    +
    +class TestFeatures:
    +
    +    def setup_method(self, method):
             self.req = Require('Distutils','1.0.3','distutils')
             self.dist = makeSetup(
                 features={
    @@ -240,80 +231,75 @@ def setUp(self):
             )
     
         def testDefaults(self):
    -        self.assertTrue(not
    -            Feature(
    -                "test",standard=True,remove='x',available=False
    -            ).include_by_default()
    -        )
    -        self.assertTrue(
    -            Feature("test",standard=True,remove='x').include_by_default()
    -        )
    +        assert not Feature(
    +            "test",standard=True,remove='x',available=False
    +        ).include_by_default()
    +        assert Feature("test",standard=True,remove='x').include_by_default()
             # Feature must have either kwargs, removes, or require_features
    -        self.assertRaises(DistutilsSetupError, Feature, "test")
    +        with pytest.raises(DistutilsSetupError):
    +            Feature("test")
     
         def testAvailability(self):
    -        self.assertRaises(
    -            DistutilsPlatformError,
    -            self.dist.features['dwim'].include_in, self.dist
    -        )
    +        with pytest.raises(DistutilsPlatformError):
    +            self.dist.features['dwim'].include_in(self.dist)
     
         def testFeatureOptions(self):
             dist = self.dist
    -        self.assertTrue(
    +        assert (
                 ('with-dwim',None,'include DWIM') in dist.feature_options
             )
    -        self.assertTrue(
    +        assert (
                 ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options
             )
    -        self.assertTrue(
    +        assert (
                 ('with-bar',None,'include bar (default)') in dist.feature_options
             )
    -        self.assertTrue(
    +        assert (
                 ('without-bar',None,'exclude bar') in dist.feature_options
             )
    -        self.assertEqual(dist.feature_negopt['without-foo'],'with-foo')
    -        self.assertEqual(dist.feature_negopt['without-bar'],'with-bar')
    -        self.assertEqual(dist.feature_negopt['without-dwim'],'with-dwim')
    -        self.assertTrue(not 'without-baz' in dist.feature_negopt)
    +        assert dist.feature_negopt['without-foo'] == 'with-foo'
    +        assert dist.feature_negopt['without-bar'] == 'with-bar'
    +        assert dist.feature_negopt['without-dwim'] == 'with-dwim'
    +        assert (not 'without-baz' in dist.feature_negopt)
     
         def testUseFeatures(self):
             dist = self.dist
    -        self.assertEqual(dist.with_foo,1)
    -        self.assertEqual(dist.with_bar,0)
    -        self.assertEqual(dist.with_baz,1)
    -        self.assertTrue(not 'bar_et' in dist.py_modules)
    -        self.assertTrue(not 'pkg.bar' in dist.packages)
    -        self.assertTrue('pkg.baz' in dist.packages)
    -        self.assertTrue('scripts/baz_it' in dist.scripts)
    -        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
    -        self.assertEqual(dist.ext_modules,[])
    -        self.assertEqual(dist.require_features, [self.req])
    +        assert dist.with_foo == 1
    +        assert dist.with_bar == 0
    +        assert dist.with_baz == 1
    +        assert (not 'bar_et' in dist.py_modules)
    +        assert (not 'pkg.bar' in dist.packages)
    +        assert ('pkg.baz' in dist.packages)
    +        assert ('scripts/baz_it' in dist.scripts)
    +        assert (('libfoo','foo/foofoo.c') in dist.libraries)
    +        assert dist.ext_modules == []
    +        assert dist.require_features == [self.req]
     
             # If we ask for bar, it should fail because we explicitly disabled
             # it on the command line
    -        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
    +        with pytest.raises(DistutilsOptionError):
    +            dist.include_feature('bar')
     
         def testFeatureWithInvalidRemove(self):
    -        self.assertRaises(
    -            SystemExit, makeSetup, features = {'x':Feature('x', remove='y')}
    -        )
    +        with pytest.raises(SystemExit):
    +            makeSetup(features={'x':Feature('x', remove='y')})
     
    -class TestCommandTests(unittest.TestCase):
    +class TestCommandTests:
     
         def testTestIsCommand(self):
             test_cmd = makeSetup().get_command_obj('test')
    -        self.assertTrue(isinstance(test_cmd, distutils.cmd.Command))
    +        assert (isinstance(test_cmd, distutils.cmd.Command))
     
         def testLongOptSuiteWNoDefault(self):
             ts1 = makeSetup(script_args=['test','--test-suite=foo.tests.suite'])
             ts1 = ts1.get_command_obj('test')
             ts1.ensure_finalized()
    -        self.assertEqual(ts1.test_suite, 'foo.tests.suite')
    +        assert ts1.test_suite == 'foo.tests.suite'
     
         def testDefaultSuite(self):
             ts2 = makeSetup(test_suite='bar.tests.suite').get_command_obj('test')
             ts2.ensure_finalized()
    -        self.assertEqual(ts2.test_suite, 'bar.tests.suite')
    +        assert ts2.test_suite == 'bar.tests.suite'
     
         def testDefaultWModuleOnCmdLine(self):
             ts3 = makeSetup(
    @@ -321,16 +307,17 @@ def testDefaultWModuleOnCmdLine(self):
                 script_args=['test','-m','foo.tests']
             ).get_command_obj('test')
             ts3.ensure_finalized()
    -        self.assertEqual(ts3.test_module, 'foo.tests')
    -        self.assertEqual(ts3.test_suite,  'foo.tests.test_suite')
    +        assert ts3.test_module == 'foo.tests'
    +        assert ts3.test_suite == 'foo.tests.test_suite'
     
         def testConflictingOptions(self):
             ts4 = makeSetup(
                 script_args=['test','-m','bar.tests', '-s','foo.tests.suite']
             ).get_command_obj('test')
    -        self.assertRaises(DistutilsOptionError, ts4.ensure_finalized)
    +        with pytest.raises(DistutilsOptionError):
    +            ts4.ensure_finalized()
     
         def testNoSuite(self):
             ts5 = makeSetup().get_command_obj('test')
             ts5.ensure_finalized()
    -        self.assertEqual(ts5.test_suite, None)
    +        assert ts5.test_suite == None
    
    From 8e8467a5abcaf920184dd07f6e0c092989aa12ff Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:23:39 -0500
    Subject: [PATCH 4665/8469] Convert test_dist_info to pytest form
    
    ---
     setuptools/tests/test_dist_info.py | 23 ++++++++---------------
     1 file changed, 8 insertions(+), 15 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index a8adb68c2d..5f3b595293 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -3,23 +3,17 @@
     import os
     import shutil
     import tempfile
    -import unittest
     import textwrap
     
    -try:
    -    import ast
    -except:
    -    pass
    +import pytest
     
     import pkg_resources
     
    -from setuptools.tests.py26compat import skipIf
    -
     def DALS(s):
         "dedent and left-strip"
         return textwrap.dedent(s).lstrip()
     
    -class TestDistInfo(unittest.TestCase):
    +class TestDistInfo:
     
         def test_distinfo(self):
             dists = {}
    @@ -34,18 +28,17 @@ def test_distinfo(self):
             assert versioned.version == '2.718' # from filename
             assert unversioned.version == '0.3' # from METADATA
     
    -    @skipIf('ast' not in globals(),
    -        "ast is used to test conditional dependencies (Python >= 2.6)")
    +    @pytest.mark.importorskip('ast')
         def test_conditional_dependencies(self):
             requires = [pkg_resources.Requirement.parse('splort==4'),
                         pkg_resources.Requirement.parse('quux>=1.1')]
     
             for d in pkg_resources.find_distributions(self.tmpdir):
    -            self.assertEqual(d.requires(), requires[:1])
    -            self.assertEqual(d.requires(extras=('baz',)), requires)
    -            self.assertEqual(d.extras, ['baz'])
    +            assert d.requires() == requires[:1]
    +            assert d.requires(extras=('baz',)) == requires
    +            assert d.extras == ['baz']
     
    -    def setUp(self):
    +    def setup_method(self, method):
             self.tmpdir = tempfile.mkdtemp()
             versioned = os.path.join(self.tmpdir,
                                      'VersionedDistribution-2.718.dist-info')
    @@ -79,5 +72,5 @@ def setUp(self):
             finally:
                 metadata_file.close()
     
    -    def tearDown(self):
    +    def teardown_method(self, method):
             shutil.rmtree(self.tmpdir)
    
    From a476eca3548d454b7b9589f4e10c91c17e491c1f Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:26:19 -0500
    Subject: [PATCH 4666/8469] Use contexts for opening files
    
    ---
     setuptools/tests/test_dist_info.py | 10 ++--------
     1 file changed, 2 insertions(+), 8 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index 5f3b595293..812e6c46f2 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -43,8 +43,7 @@ def setup_method(self, method):
             versioned = os.path.join(self.tmpdir,
                                      'VersionedDistribution-2.718.dist-info')
             os.mkdir(versioned)
    -        metadata_file = open(os.path.join(versioned, 'METADATA'), 'w+')
    -        try:
    +        with open(os.path.join(versioned, 'METADATA'), 'w+') as metadata_file:
                 metadata_file.write(DALS(
                     """
                     Metadata-Version: 1.2
    @@ -53,13 +52,10 @@ def setup_method(self, method):
                     Provides-Extra: baz
                     Requires-Dist: quux (>=1.1); extra == 'baz'
                     """))
    -        finally:
    -            metadata_file.close()
             unversioned = os.path.join(self.tmpdir,
                                        'UnversionedDistribution.dist-info')
             os.mkdir(unversioned)
    -        metadata_file = open(os.path.join(unversioned, 'METADATA'), 'w+')
    -        try:
    +        with open(os.path.join(unversioned, 'METADATA'), 'w+') as metadata_file:
                 metadata_file.write(DALS(
                     """
                     Metadata-Version: 1.2
    @@ -69,8 +65,6 @@ def setup_method(self, method):
                     Provides-Extra: baz
                     Requires-Dist: quux (>=1.1); extra == 'baz'
                     """))
    -        finally:
    -            metadata_file.close()
     
         def teardown_method(self, method):
             shutil.rmtree(self.tmpdir)
    
    From ef3ee2cfee65f99d320983cbf6e32448b2cefbbe Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:34:23 -0500
    Subject: [PATCH 4667/8469] Extract commonality of metadata template.
    
    ---
     setuptools/tests/test_dist_info.py | 37 ++++++++++++++++--------------
     1 file changed, 20 insertions(+), 17 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index 812e6c46f2..91195c52b3 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -38,33 +38,36 @@ def test_conditional_dependencies(self):
                 assert d.requires(extras=('baz',)) == requires
                 assert d.extras == ['baz']
     
    +    metadata_template = DALS("""
    +        Metadata-Version: 1.2
    +        Name: {name}
    +        {version}
    +        Requires-Dist: splort (==4)
    +        Provides-Extra: baz
    +        Requires-Dist: quux (>=1.1); extra == 'baz'
    +        """)
    +
         def setup_method(self, method):
             self.tmpdir = tempfile.mkdtemp()
             versioned = os.path.join(self.tmpdir,
                                      'VersionedDistribution-2.718.dist-info')
             os.mkdir(versioned)
             with open(os.path.join(versioned, 'METADATA'), 'w+') as metadata_file:
    -            metadata_file.write(DALS(
    -                """
    -                Metadata-Version: 1.2
    -                Name: VersionedDistribution
    -                Requires-Dist: splort (4)
    -                Provides-Extra: baz
    -                Requires-Dist: quux (>=1.1); extra == 'baz'
    -                """))
    +            metadata = self.metadata_template.format(
    +                name='VersionedDistribution',
    +                version='',
    +            ).replace('\n\n', '\n')
    +            metadata = metadata.replace('==4', '4')
    +            metadata_file.write(metadata)
             unversioned = os.path.join(self.tmpdir,
                                        'UnversionedDistribution.dist-info')
             os.mkdir(unversioned)
             with open(os.path.join(unversioned, 'METADATA'), 'w+') as metadata_file:
    -            metadata_file.write(DALS(
    -                """
    -                Metadata-Version: 1.2
    -                Name: UnversionedDistribution
    -                Version: 0.3
    -                Requires-Dist: splort (==4)
    -                Provides-Extra: baz
    -                Requires-Dist: quux (>=1.1); extra == 'baz'
    -                """))
    +            metadata = self.metadata_template.format(
    +                name='UnversionedDistribution',
    +                version='Version: 0.3',
    +            )
    +            metadata_file.write(metadata)
     
         def teardown_method(self, method):
             shutil.rmtree(self.tmpdir)
    
    From 600992dff64b3aefe0061b9861a48cf3558adcdc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:34:47 -0500
    Subject: [PATCH 4668/8469] I'm pretty sure this deviance was incidental.
    
    ---
     setuptools/tests/test_dist_info.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index 91195c52b3..edf3ffff77 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -57,7 +57,6 @@ def setup_method(self, method):
                     name='VersionedDistribution',
                     version='',
                 ).replace('\n\n', '\n')
    -            metadata = metadata.replace('==4', '4')
                 metadata_file.write(metadata)
             unversioned = os.path.join(self.tmpdir,
                                        'UnversionedDistribution.dist-info')
    
    From 3d4e8cfb4339e641f65def5185bcc784f6190df5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:35:34 -0500
    Subject: [PATCH 4669/8469] Extract variables to nicen indentation.
    
    ---
     setuptools/tests/test_dist_info.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index edf3ffff77..ed3f18867a 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -49,8 +49,8 @@ def test_conditional_dependencies(self):
     
         def setup_method(self, method):
             self.tmpdir = tempfile.mkdtemp()
    -        versioned = os.path.join(self.tmpdir,
    -                                 'VersionedDistribution-2.718.dist-info')
    +        dist_info_name = 'VersionedDistribution-2.718.dist-info'
    +        versioned = os.path.join(self.tmpdir, dist_info_name)
             os.mkdir(versioned)
             with open(os.path.join(versioned, 'METADATA'), 'w+') as metadata_file:
                 metadata = self.metadata_template.format(
    @@ -58,8 +58,8 @@ def setup_method(self, method):
                     version='',
                 ).replace('\n\n', '\n')
                 metadata_file.write(metadata)
    -        unversioned = os.path.join(self.tmpdir,
    -                                   'UnversionedDistribution.dist-info')
    +        dist_info_name = 'UnversionedDistribution.dist-info'
    +        unversioned = os.path.join(self.tmpdir, dist_info_name)
             os.mkdir(unversioned)
             with open(os.path.join(unversioned, 'METADATA'), 'w+') as metadata_file:
                 metadata = self.metadata_template.format(
    
    From 40fe6f7674b00bb6a8ed81185e938c105845a040 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:37:29 -0500
    Subject: [PATCH 4670/8469] Build a dict in a generator expression.
    
    ---
     setuptools/tests/test_dist_info.py | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index ed3f18867a..7d1247b32d 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -16,9 +16,10 @@ def DALS(s):
     class TestDistInfo:
     
         def test_distinfo(self):
    -        dists = {}
    -        for d in pkg_resources.find_distributions(self.tmpdir):
    -            dists[d.project_name] = d
    +        dists = dict(
    +            (d.project_name, d)
    +            for d in pkg_resources.find_distributions(self.tmpdir)
    +        )
     
             assert len(dists) == 2, dists
     
    
    From c04985bc9b29c2e181697b10059e99fc77ef532d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:38:53 -0500
    Subject: [PATCH 4671/8469] Build requires using map
    
    ---
     setuptools/tests/test_dist_info.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index 7d1247b32d..eab173357c 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -31,8 +31,8 @@ def test_distinfo(self):
     
         @pytest.mark.importorskip('ast')
         def test_conditional_dependencies(self):
    -        requires = [pkg_resources.Requirement.parse('splort==4'),
    -                    pkg_resources.Requirement.parse('quux>=1.1')]
    +        specs = 'splort==4', 'quux>=1.1'
    +        requires = list(map(pkg_resources.Requirement.parse, specs))
     
             for d in pkg_resources.find_distributions(self.tmpdir):
                 assert d.requires() == requires[:1]
    
    From 4f9b50728ae8c5cf81b13b2d4fd3098b9f18dfb1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:48:11 -0500
    Subject: [PATCH 4672/8469] Use pytest for skips
    
    ---
     setuptools/tests/py26compat.py         | 14 ----------
     setuptools/tests/test_find_packages.py |  5 ++--
     setuptools/tests/test_markerlib.py     | 36 ++++++++++++--------------
     setuptools/tests/test_resources.py     |  7 ++---
     setuptools/tests/test_sdist.py         |  8 +++---
     5 files changed, 28 insertions(+), 42 deletions(-)
    
    diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py
    index b1ffa87703..c53b480926 100644
    --- a/setuptools/tests/py26compat.py
    +++ b/setuptools/tests/py26compat.py
    @@ -1,21 +1,7 @@
     import sys
    -import unittest
     import tarfile
     import contextlib
     
    -try:
    -	# provide skipIf for Python 2.4-2.6
    -	skipIf = unittest.skipIf
    -except AttributeError:
    -	def skipIf(condition, reason):
    -		def skipper(func):
    -			def skip(*args, **kwargs):
    -				return
    -			if condition:
    -				return skip
    -			return func
    -		return skipper
    -
     def _tarfile_open_ex(*args, **kwargs):
     	"""
     	Extend result as a context manager.
    diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py
    index fe390728c9..50513a6963 100644
    --- a/setuptools/tests/test_find_packages.py
    +++ b/setuptools/tests/test_find_packages.py
    @@ -6,9 +6,10 @@
     import unittest
     import platform
     
    +import pytest
    +
     import setuptools
     from setuptools import find_packages
    -from setuptools.tests.py26compat import skipIf
     
     find_420_packages = setuptools.PEP420PackageFinder.find
     
    @@ -123,7 +124,7 @@ def test_dir_with_packages_in_subdir_is_excluded(self):
             packages = find_packages(self.dist_dir)
             self.assertTrue('build.pkg' not in packages)
     
    -    @skipIf(not has_symlink(), 'Symlink support required')
    +    @pytest.mark.skipif(not has_symlink(), reason='Symlink support required')
         def test_symlinked_packages_are_included(self):
             """
             A symbolically-linked directory should be treated like any other
    diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py
    index dae71cba46..0cb9e70add 100644
    --- a/setuptools/tests/test_markerlib.py
    +++ b/setuptools/tests/test_markerlib.py
    @@ -1,23 +1,19 @@
     import os
     import unittest
    -from setuptools.tests.py26compat import skipIf
     
    -try:
    -    import ast
    -except ImportError:
    -    pass
    +import pytest
    +
     
     class TestMarkerlib(unittest.TestCase):
     
    -    @skipIf('ast' not in globals(),
    -        "ast not available (Python < 2.6?)")
    +    @pytest.mark.importorskip('ast')
         def test_markers(self):
             from _markerlib import interpret, default_environment, compile
    -        
    +
             os_name = os.name
    -        
    +
             self.assertTrue(interpret(""))
    -        
    +
             self.assertTrue(interpret("os.name != 'buuuu'"))
             self.assertTrue(interpret("os_name != 'buuuu'"))
             self.assertTrue(interpret("python_version > '1.0'"))
    @@ -27,7 +23,7 @@ def test_markers(self):
             self.assertTrue(interpret("'%s' in os.name" % os_name))
             self.assertTrue(interpret("'%s' in os_name" % os_name))
             self.assertTrue(interpret("'buuuu' not in os.name"))
    -        
    +
             self.assertFalse(interpret("os.name == 'buuuu'"))
             self.assertFalse(interpret("os_name == 'buuuu'"))
             self.assertFalse(interpret("python_version < '1.0'"))
    @@ -35,14 +31,14 @@ def test_markers(self):
             self.assertFalse(interpret("python_version >= '5.0'"))
             self.assertFalse(interpret("python_version <= '1.0'"))
             self.assertFalse(interpret("'%s' not in os.name" % os_name))
    -        self.assertFalse(interpret("'buuuu' in os.name and python_version >= '5.0'"))    
    -        self.assertFalse(interpret("'buuuu' in os_name and python_version >= '5.0'"))    
    -        
    +        self.assertFalse(interpret("'buuuu' in os.name and python_version >= '5.0'"))
    +        self.assertFalse(interpret("'buuuu' in os_name and python_version >= '5.0'"))
    +
             environment = default_environment()
             environment['extra'] = 'test'
             self.assertTrue(interpret("extra == 'test'", environment))
             self.assertFalse(interpret("extra == 'doc'", environment))
    -        
    +
             def raises_nameError():
                 try:
                     interpret("python.version == '42'")
    @@ -50,9 +46,9 @@ def raises_nameError():
                     pass
                 else:
                     raise Exception("Expected NameError")
    -        
    +
             raises_nameError()
    -        
    +
             def raises_syntaxError():
                 try:
                     interpret("(x for x in (4,))")
    @@ -60,9 +56,9 @@ def raises_syntaxError():
                     pass
                 else:
                     raise Exception("Expected SyntaxError")
    -            
    +
             raises_syntaxError()
    -        
    +
             statement = "python_version == '5'"
             self.assertEqual(compile(statement).__doc__, statement)
    -        
    +
    diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
    index f9f2e459ef..ba8835a946 100644
    --- a/setuptools/tests/test_resources.py
    +++ b/setuptools/tests/test_resources.py
    @@ -8,6 +8,8 @@
     import shutil
     from unittest import TestCase
     
    +import pytest
    +
     import pkg_resources
     from pkg_resources import (parse_requirements, VersionConflict, parse_version,
         Distribution, EntryPoint, Requirement, safe_version, safe_name,
    @@ -18,7 +20,6 @@
     from setuptools.command.easy_install import (get_script_header, is_sh,
         nt_quote_arg)
     from setuptools.compat import StringIO, iteritems, PY3
    -from .py26compat import skipIf
     
     def safe_repr(obj, short=False):
         """ copied from Python2.7"""
    @@ -612,8 +613,8 @@ def tearDown(self):
             pkg_resources._namespace_packages = self._ns_pkgs.copy()
             sys.path = self._prev_sys_path[:]
     
    -    msg = "Test fails when /tmp is a symlink. See #231"
    -    @skipIf(os.path.islink(tempfile.gettempdir()), msg)
    +    @pytest.mark.skipif(os.path.islink(tempfile.gettempdir()),
    +        reason="Test fails when /tmp is a symlink. See #231")
         def test_two_levels_deep(self):
             """
             Test nested namespace packages
    diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py
    index 123e3ea9bd..120911d25a 100644
    --- a/setuptools/tests/test_sdist.py
    +++ b/setuptools/tests/test_sdist.py
    @@ -9,7 +9,8 @@
     import unittest
     import unicodedata
     import contextlib
    -from setuptools.tests.py26compat import skipIf
    +
    +import pytest
     
     import pkg_resources
     from setuptools.compat import StringIO, unicode, PY3, PY2
    @@ -336,8 +337,9 @@ def test_read_manifest_skips_non_utf8_filenames(self):
                 filename = filename.decode('latin-1')
                 self.assertFalse(filename in cmd.filelist.files)
     
    -    @skipIf(PY3 and locale.getpreferredencoding() != 'UTF-8',
    -            'Unittest fails if locale is not utf-8 but the manifests is recorded correctly')
    +    @pytest.mark.skipif(PY3 and locale.getpreferredencoding() != 'UTF-8',
    +        reason='Unittest fails if locale is not utf-8 but the manifests is '
    +            'recorded correctly')
         def test_sdist_with_utf8_encoded_filename(self):
             # Test for #303.
             dist = Distribution(SETUP_ATTRS)
    
    From b2d5b933ca507817db94e58bf0fb3e7d20ae12f2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 16:56:53 -0500
    Subject: [PATCH 4673/8469] Remove unused imports
    
    ---
     setuptools/tests/test_packageindex.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
    index 664566a36c..d1d6ca8d93 100644
    --- a/setuptools/tests/test_packageindex.py
    +++ b/setuptools/tests/test_packageindex.py
    @@ -4,7 +4,7 @@
     import os
     import unittest
     import pkg_resources
    -from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url
    +from setuptools.compat import httplib, HTTPError, unicode, pathname2url
     import distutils.errors
     import setuptools.package_index
     from setuptools.tests.server import IndexServer
    
    From ed54215c1ca6be3874ad8d861b8514dc3009bbb4 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:02:09 -0500
    Subject: [PATCH 4674/8469] Use serve_forever and shutdown, now available.
    
    ---
     setuptools/tests/server.py | 20 ++------------------
     1 file changed, 2 insertions(+), 18 deletions(-)
    
    diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py
    index ae2381e355..266ee5bdc3 100644
    --- a/setuptools/tests/server.py
    +++ b/setuptools/tests/server.py
    @@ -23,12 +23,8 @@ def __init__(self, server_address=('', 0),
             HTTPServer.__init__(self, server_address, RequestHandlerClass)
             self._run = True
     
    -    def serve(self):
    -        while self._run:
    -            self.handle_request()
    -
         def start(self):
    -        self.thread = threading.Thread(target=self.serve)
    +        self.thread = threading.Thread(target=self.serve_forever)
             self.thread.start()
     
         def stop(self):
    @@ -37,19 +33,7 @@ def stop(self):
             # Let the server finish the last request and wait for a new one.
             time.sleep(0.1)
     
    -        # self.shutdown is not supported on python < 2.6, so just
    -        #  set _run to false, and make a request, causing it to
    -        #  terminate.
    -        self._run = False
    -        url = 'http://127.0.0.1:%(server_port)s/' % vars(self)
    -        try:
    -            if sys.version_info >= (2, 6):
    -                urllib2.urlopen(url, timeout=5)
    -            else:
    -                urllib2.urlopen(url)
    -        except URLError:
    -            # ignore any errors; all that's important is the request
    -            pass
    +        self.shutdown()
             self.thread.join()
             self.socket.close()
     
    
    From 9f6d874dfc15a4d695dbed3ffa9bd3ed56008350 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:03:21 -0500
    Subject: [PATCH 4675/8469] Use property
    
    ---
     setuptools/tests/server.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py
    index 266ee5bdc3..b53168d1b5 100644
    --- a/setuptools/tests/server.py
    +++ b/setuptools/tests/server.py
    @@ -61,6 +61,6 @@ def __init__(self, server_address=('', 0),
         def run(self):
             self.serve_forever()
     
    +    @property
         def url(self):
             return 'http://localhost:%(server_port)s/' % vars(self)
    -    url = property(url)
    
    From d4411774ba9ee79480c8128b4e8f610481a65cf3 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:03:42 -0500
    Subject: [PATCH 4676/8469] Remove unused imports
    
    ---
     setuptools/tests/server.py | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py
    index b53168d1b5..6b21427992 100644
    --- a/setuptools/tests/server.py
    +++ b/setuptools/tests/server.py
    @@ -1,11 +1,10 @@
     """Basic http server for tests to simulate PyPI or custom indexes
     """
    -import sys
    +
     import time
     import threading
     from setuptools.compat import BaseHTTPRequestHandler
    -from setuptools.compat import (urllib2, URLError, HTTPServer,
    -                               SimpleHTTPRequestHandler)
    +from setuptools.compat import HTTPServer, SimpleHTTPRequestHandler
     
     class IndexServer(HTTPServer):
         """Basic single-threaded http server simulating a package index
    
    From 64a1da4d9c2e85d28e9c4040bcccb5abbdd689ce Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:05:55 -0500
    Subject: [PATCH 4677/8469] Remove unused imports
    
    ---
     setuptools/tests/test_bdist_egg.py | 5 +----
     1 file changed, 1 insertion(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index cf4bcd1179..208f63dd8b 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -8,10 +8,7 @@
     import tempfile
     import unittest
     
    -from distutils.errors import DistutilsError
     from setuptools.compat import StringIO
    -from setuptools.command.bdist_egg import bdist_egg
    -from setuptools.command import easy_install as easy_install_pkg
     from setuptools.dist import Distribution
     
     SETUP_PY = """\
    @@ -56,7 +53,7 @@ def test_bdist_egg(self):
                 ))
             os.makedirs(os.path.join('build', 'src'))
             old_stdout = sys.stdout
    -        sys.stdout = o = StringIO()
    +        sys.stdout = StringIO()
             try:
                 dist.parse_command_line()
                 dist.run_commands()
    
    From 189b1c027e626496b7b7bb1b5996123f54286075 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:06:47 -0500
    Subject: [PATCH 4678/8469] Use context opener
    
    ---
     setuptools/tests/test_bdist_egg.py | 10 ++++------
     1 file changed, 4 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index 208f63dd8b..58d25b7056 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -23,12 +23,10 @@ def setUp(self):
             self.dir = tempfile.mkdtemp()
             self.old_cwd = os.getcwd()
             os.chdir(self.dir)
    -        f = open('setup.py', 'w')
    -        f.write(SETUP_PY)
    -        f.close()
    -        f = open('hi.py', 'w')
    -        f.write('1\n')
    -        f.close()
    +        with open('setup.py', 'w') as f:
    +            f.write(SETUP_PY)
    +        with open('hi.py', 'w') as f:
    +            f.write('1\n')
             if sys.version >= "2.6":
                 self.old_base = site.USER_BASE
                 site.USER_BASE = tempfile.mkdtemp()
    
    From 0bc8f31f5d694578cec3d0b8b4951db06fc921fb Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:10:57 -0500
    Subject: [PATCH 4679/8469] Move contexts to their own module
    
    ---
     setuptools/tests/contexts.py          | 59 +++++++++++++++++++++++
     setuptools/tests/test_easy_install.py | 69 ++++-----------------------
     2 files changed, 69 insertions(+), 59 deletions(-)
     create mode 100644 setuptools/tests/contexts.py
    
    diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py
    new file mode 100644
    index 0000000000..a9626ae67a
    --- /dev/null
    +++ b/setuptools/tests/contexts.py
    @@ -0,0 +1,59 @@
    +import tempfile
    +import os
    +import shutil
    +import sys
    +import contextlib
    +
    +from ..compat import StringIO
    +
    +
    +@contextlib.contextmanager
    +def tempdir(cd=lambda dir:None):
    +    temp_dir = tempfile.mkdtemp()
    +    orig_dir = os.getcwd()
    +    try:
    +        cd(temp_dir)
    +        yield temp_dir
    +    finally:
    +        cd(orig_dir)
    +        shutil.rmtree(temp_dir)
    +
    +
    +@contextlib.contextmanager
    +def environment(**updates):
    +    old_env = os.environ.copy()
    +    os.environ.update(updates)
    +    try:
    +        yield
    +    finally:
    +        for key in updates:
    +            del os.environ[key]
    +        os.environ.update(old_env)
    +
    +
    +@contextlib.contextmanager
    +def argv(repl):
    +    old_argv = sys.argv[:]
    +    sys.argv[:] = repl
    +    yield
    +    sys.argv[:] = old_argv
    +
    +
    +@contextlib.contextmanager
    +def quiet():
    +    """
    +    Redirect stdout/stderr to StringIO objects to prevent console output from
    +    distutils commands.
    +    """
    +
    +    old_stdout = sys.stdout
    +    old_stderr = sys.stderr
    +    new_stdout = sys.stdout = StringIO()
    +    new_stderr = sys.stderr = StringIO()
    +    try:
    +        yield new_stdout, new_stderr
    +    finally:
    +        new_stdout.seek(0)
    +        new_stderr.seek(0)
    +        sys.stdout = old_stdout
    +        sys.stderr = old_stderr
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 46c2df2cad..19e1674caa 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -29,6 +29,7 @@
     import pkg_resources
     
     from .py26compat import tarfile_open
    +from . import contexts
     
     
     def DALS(input):
    @@ -264,7 +265,7 @@ def test_setup_requires(self):
             test_setup_py = os.path.join(test_pkg, 'setup.py')
     
             try:
    -            with quiet_context():
    +            with contexts.quiet():
                     with self.patched_setup_context():
                         run_setup(test_setup_py, ['install'])
             except SandboxViolation:
    @@ -281,7 +282,7 @@ def distutils_package():
             'from setuptools import setup',
             'from distutils.core import setup',
         )
    -    with tempdir_context(cd=os.chdir):
    +    with contexts.tempdir(cd=os.chdir):
             with open('setup.py', 'w') as f:
                 f.write(distutils_setup_py)
             yield
    @@ -309,11 +310,11 @@ def test_setup_requires_honors_fetch_params(self):
                 # Some platforms (Jython) don't find a port to which to bind,
                 #  so skip this test for them.
                 return
    -        with quiet_context():
    +        with contexts.quiet():
                 # create an sdist that has a build-time dependency.
                 with TestSetupRequires.create_sdist() as dist_file:
    -                with tempdir_context() as temp_install_dir:
    -                    with environment_context(PYTHONPATH=temp_install_dir):
    +                with contexts.tempdir() as temp_install_dir:
    +                    with contexts.environment(PYTHONPATH=temp_install_dir):
                             ei_params = [
                                 '--index-url', p_index.url,
                                 '--allow-hosts', p_index_loc,
    @@ -321,7 +322,7 @@ def test_setup_requires_honors_fetch_params(self):
                                 '--install-dir', temp_install_dir,
                                 dist_file,
                             ]
    -                        with argv_context(['easy_install']):
    +                        with contexts.argv(['easy_install']):
                                 # attempt to install the dist. It should fail because
                                 #  it doesn't exist.
                                 with pytest.raises(SystemExit):
    @@ -338,7 +339,7 @@ def create_sdist():
             Return an sdist with a setup_requires dependency (of something that
             doesn't exist)
             """
    -        with tempdir_context() as dir:
    +        with contexts.tempdir() as dir:
                 dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz')
                 script = DALS("""
                     import setuptools
    @@ -366,10 +367,10 @@ def test_setup_requires_overrides_version_conflict(self):
             working_set.add(fake_dist)
     
             try:
    -            with tempdir_context() as temp_dir:
    +            with contexts.tempdir() as temp_dir:
                     test_pkg = create_setup_requires_package(temp_dir)
                     test_setup_py = os.path.join(test_pkg, 'setup.py')
    -                with quiet_context() as (stdout, stderr):
    +                with contexts.quiet() as (stdout, stderr):
                         try:
                             # Don't even need to install the package, just
                             # running the setup.py at all is sufficient
    @@ -436,53 +437,3 @@ def make_trivial_sdist(dist_path, setup_py):
         setup_py_file.size = len(setup_py_bytes.getvalue())
         with tarfile_open(dist_path, 'w:gz') as dist:
             dist.addfile(setup_py_file, fileobj=setup_py_bytes)
    -
    -
    -@contextlib.contextmanager
    -def tempdir_context(cd=lambda dir:None):
    -    temp_dir = tempfile.mkdtemp()
    -    orig_dir = os.getcwd()
    -    try:
    -        cd(temp_dir)
    -        yield temp_dir
    -    finally:
    -        cd(orig_dir)
    -        shutil.rmtree(temp_dir)
    -
    -@contextlib.contextmanager
    -def environment_context(**updates):
    -    old_env = os.environ.copy()
    -    os.environ.update(updates)
    -    try:
    -        yield
    -    finally:
    -        for key in updates:
    -            del os.environ[key]
    -        os.environ.update(old_env)
    -
    -@contextlib.contextmanager
    -def argv_context(repl):
    -    old_argv = sys.argv[:]
    -    sys.argv[:] = repl
    -    yield
    -    sys.argv[:] = old_argv
    -
    -
    -@contextlib.contextmanager
    -def quiet_context():
    -    """
    -    Redirect stdout/stderr to StringIO objects to prevent console output from
    -    distutils commands.
    -    """
    -
    -    old_stdout = sys.stdout
    -    old_stderr = sys.stderr
    -    new_stdout = sys.stdout = StringIO()
    -    new_stderr = sys.stderr = StringIO()
    -    try:
    -        yield new_stdout, new_stderr
    -    finally:
    -        new_stdout.seek(0)
    -        new_stderr.seek(0)
    -        sys.stdout = old_stdout
    -        sys.stderr = old_stderr
    
    From 32f39a11f9196984c50b2193ca40c2472040ed96 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:14:19 -0500
    Subject: [PATCH 4680/8469] Use quiet context instead of copy pasta.
    
    ---
     setuptools/tests/test_bdist_egg.py | 10 ++++------
     1 file changed, 4 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index 58d25b7056..519f27c9d7 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -8,9 +8,11 @@
     import tempfile
     import unittest
     
    -from setuptools.compat import StringIO
     from setuptools.dist import Distribution
     
    +from . import contexts
    +
    +
     SETUP_PY = """\
     from setuptools import setup
     
    @@ -50,13 +52,9 @@ def test_bdist_egg(self):
                 py_modules=['hi']
                 ))
             os.makedirs(os.path.join('build', 'src'))
    -        old_stdout = sys.stdout
    -        sys.stdout = StringIO()
    -        try:
    +        with contexts.quiet():
                 dist.parse_command_line()
                 dist.run_commands()
    -        finally:
    -            sys.stdout = old_stdout
     
             # let's see if we got our egg link at the right place
             [content] = os.listdir('dist')
    
    From ae7007467caf6d29936c0e7ff9f9d92f610aeb98 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:14:41 -0500
    Subject: [PATCH 4681/8469] Python 2.6 is required
    
    ---
     setuptools/tests/test_bdist_egg.py | 19 ++++++++-----------
     1 file changed, 8 insertions(+), 11 deletions(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index 519f27c9d7..1b406f5ccc 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -4,7 +4,6 @@
     import re
     import shutil
     import site
    -import sys
     import tempfile
     import unittest
     
    @@ -29,20 +28,18 @@ def setUp(self):
                 f.write(SETUP_PY)
             with open('hi.py', 'w') as f:
                 f.write('1\n')
    -        if sys.version >= "2.6":
    -            self.old_base = site.USER_BASE
    -            site.USER_BASE = tempfile.mkdtemp()
    -            self.old_site = site.USER_SITE
    -            site.USER_SITE = tempfile.mkdtemp()
    +        self.old_base = site.USER_BASE
    +        site.USER_BASE = tempfile.mkdtemp()
    +        self.old_site = site.USER_SITE
    +        site.USER_SITE = tempfile.mkdtemp()
     
         def tearDown(self):
             os.chdir(self.old_cwd)
             shutil.rmtree(self.dir)
    -        if sys.version >= "2.6":
    -            shutil.rmtree(site.USER_BASE)
    -            shutil.rmtree(site.USER_SITE)
    -            site.USER_BASE = self.old_base
    -            site.USER_SITE = self.old_site
    +        shutil.rmtree(site.USER_BASE)
    +        shutil.rmtree(site.USER_SITE)
    +        site.USER_BASE = self.old_base
    +        site.USER_SITE = self.old_site
     
         def test_bdist_egg(self):
             dist = Distribution(dict(
    
    From 1cbdf581186e1f34f1e48673f5faf60922e66799 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:31:37 -0500
    Subject: [PATCH 4682/8469] Replace setup and teardown with pytest fixtures.
    
    ---
     setuptools/tests/test_bdist_egg.py | 62 ++++++++++++++----------------
     1 file changed, 29 insertions(+), 33 deletions(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index 1b406f5ccc..d29ef4419d 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -2,10 +2,9 @@
     """
     import os
     import re
    -import shutil
    -import site
    -import tempfile
    -import unittest
    +
    +import pytest
    +import mock
     
     from setuptools.dist import Distribution
     
    @@ -18,30 +17,31 @@
     setup(name='foo', py_modules=['hi'])
     """
     
    -class TestDevelopTest(unittest.TestCase):
    -
    -    def setUp(self):
    -        self.dir = tempfile.mkdtemp()
    -        self.old_cwd = os.getcwd()
    -        os.chdir(self.dir)
    -        with open('setup.py', 'w') as f:
    -            f.write(SETUP_PY)
    -        with open('hi.py', 'w') as f:
    -            f.write('1\n')
    -        self.old_base = site.USER_BASE
    -        site.USER_BASE = tempfile.mkdtemp()
    -        self.old_site = site.USER_SITE
    -        site.USER_SITE = tempfile.mkdtemp()
    -
    -    def tearDown(self):
    -        os.chdir(self.old_cwd)
    -        shutil.rmtree(self.dir)
    -        shutil.rmtree(site.USER_BASE)
    -        shutil.rmtree(site.USER_SITE)
    -        site.USER_BASE = self.old_base
    -        site.USER_SITE = self.old_site
    -
    -    def test_bdist_egg(self):
    +@pytest.yield_fixture
    +def user_override():
    +    """
    +    Override site.USER_BASE and site.USER_SITE with temporary directories in
    +    a context.
    +    """
    +    with contexts.tempdir() as user_base:
    +        with mock.patch('site.USER_BASE', user_base):
    +            with contexts.tempdir() as user_site:
    +                with mock.patch('site.USER_SITE', user_site):
    +                    yield
    +
    +
    +@pytest.yield_fixture
    +def setup_context(tmpdir):
    +    with (tmpdir/'setup.py').open('w') as f:
    +        f.write(SETUP_PY)
    +    with (tmpdir/'hi.py').open('w') as f:
    +        f.write('1\n')
    +    with tmpdir.as_cwd():
    +        yield tmpdir
    +
    +
    +class TestDevelopTest:
    +    def test_bdist_egg(self, setup_context, user_override):
             dist = Distribution(dict(
                 script_name='setup.py',
                 script_args=['bdist_egg'],
    @@ -55,8 +55,4 @@ def test_bdist_egg(self):
     
             # let's see if we got our egg link at the right place
             [content] = os.listdir('dist')
    -        self.assertTrue(re.match('foo-0.0.0-py[23].\d.egg$', content))
    -
    -def test_suite():
    -    return unittest.makeSuite(TestDevelopTest)
    -
    +        assert re.match('foo-0.0.0-py[23].\d.egg$', content)
    
    From 0003313ff59f74efe21893a7278c5e89ba58afea Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:33:02 -0500
    Subject: [PATCH 4683/8469] Correct naming artifact.
    
    ---
     setuptools/tests/test_bdist_egg.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index d29ef4419d..08bc75d7bc 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -40,7 +40,7 @@ def setup_context(tmpdir):
             yield tmpdir
     
     
    -class TestDevelopTest:
    +class Test:
         def test_bdist_egg(self, setup_context, user_override):
             dist = Distribution(dict(
                 script_name='setup.py',
    
    From 903c0d6a3bda96a0b193cc6efd2f8e868d4d82e2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:35:05 -0500
    Subject: [PATCH 4684/8469] Use namespacing for easier reading
    
    ---
     setuptools/tests/test_build_ext.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
    index a92e53ae26..32e4ad403d 100644
    --- a/setuptools/tests/test_build_ext.py
    +++ b/setuptools/tests/test_build_ext.py
    @@ -1,7 +1,8 @@
     """build_ext tests
     """
     import unittest
    -from distutils.command.build_ext import build_ext as distutils_build_ext
    +import distutils.command.build_ext as orig
    +
     from setuptools.command.build_ext import build_ext
     from setuptools.dist import Distribution
     
    @@ -15,5 +16,5 @@ def test_get_ext_filename(self):
             cmd = build_ext(dist)
             cmd.ext_map['foo/bar'] = ''
             res = cmd.get_ext_filename('foo')
    -        wanted = distutils_build_ext.get_ext_filename(cmd, 'foo')
    +        wanted = orig.build_ext.get_ext_filename(cmd, 'foo')
             assert res == wanted
    
    From 615fc93eba554dba65b3545ead2405014e2a4af8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:35:37 -0500
    Subject: [PATCH 4685/8469] Remodel comment as docstring.
    
    ---
     setuptools/tests/test_build_ext.py | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
    index 32e4ad403d..cc8a35e55f 100644
    --- a/setuptools/tests/test_build_ext.py
    +++ b/setuptools/tests/test_build_ext.py
    @@ -9,9 +9,11 @@
     class TestBuildExtTest(unittest.TestCase):
     
         def test_get_ext_filename(self):
    -        # setuptools needs to give back the same
    -        # result than distutils, even if the fullname
    -        # is not in ext_map
    +        """
    +        Setuptools needs to give back the same
    +        result as distutils, even if the fullname
    +        is not in ext_map.
    +        """
             dist = Distribution()
             cmd = build_ext(dist)
             cmd.ext_map['foo/bar'] = ''
    
    From 359a80897decd64a0d997005dc7cb731fc294133 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:36:29 -0500
    Subject: [PATCH 4686/8469] Use pytest for test discovery in build_ext
    
    ---
     setuptools/tests/test_build_ext.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
    index cc8a35e55f..3f356aca3c 100644
    --- a/setuptools/tests/test_build_ext.py
    +++ b/setuptools/tests/test_build_ext.py
    @@ -1,12 +1,11 @@
     """build_ext tests
     """
    -import unittest
     import distutils.command.build_ext as orig
     
     from setuptools.command.build_ext import build_ext
     from setuptools.dist import Distribution
     
    -class TestBuildExtTest(unittest.TestCase):
    +class TestBuildExt:
     
         def test_get_ext_filename(self):
             """
    
    From 64a3d8b243a2c41dc43b29567652518f1b08992d Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 17:36:49 -0500
    Subject: [PATCH 4687/8469] Remove superfluous comment
    
    ---
     setuptools/tests/test_build_ext.py | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
    index 3f356aca3c..0719ba44ae 100644
    --- a/setuptools/tests/test_build_ext.py
    +++ b/setuptools/tests/test_build_ext.py
    @@ -1,12 +1,9 @@
    -"""build_ext tests
    -"""
     import distutils.command.build_ext as orig
     
     from setuptools.command.build_ext import build_ext
     from setuptools.dist import Distribution
     
     class TestBuildExt:
    -
         def test_get_ext_filename(self):
             """
             Setuptools needs to give back the same
    
    From 0ef90459f8c249a53a0c5e9daaa8a4cf407f7fe9 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 18:09:36 -0500
    Subject: [PATCH 4688/8469] Convert test_develop to use pytest
    
    ---
     setuptools/tests/test_develop.py | 13 ++++++-------
     1 file changed, 6 insertions(+), 7 deletions(-)
    
    diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
    index 66d182eb46..9d8a56c330 100644
    --- a/setuptools/tests/test_develop.py
    +++ b/setuptools/tests/test_develop.py
    @@ -5,7 +5,6 @@
     import site
     import sys
     import tempfile
    -import unittest
     
     from distutils.errors import DistutilsError
     from setuptools.command.develop import develop
    @@ -23,9 +22,9 @@
     INIT_PY = """print "foo"
     """
     
    -class TestDevelopTest(unittest.TestCase):
    +class TestDevelopTest:
     
    -    def setUp(self):
    +    def setup_method(self, method):
             if sys.version < "2.6" or hasattr(sys, 'real_prefix'):
                 return
     
    @@ -50,7 +49,7 @@ def setUp(self):
             self.old_site = site.USER_SITE
             site.USER_SITE = tempfile.mkdtemp()
     
    -    def tearDown(self):
    +    def teardown_method(self, method):
             if sys.version < "2.6" or hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
                 return
     
    @@ -86,7 +85,7 @@ def test_develop(self):
             # let's see if we got our egg link at the right place
             content = os.listdir(site.USER_SITE)
             content.sort()
    -        self.assertEqual(content, ['easy-install.pth', 'foo.egg-link'])
    +        assert content == ['easy-install.pth', 'foo.egg-link']
     
             # Check that we are using the right code.
             egg_link_file = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt')
    @@ -100,9 +99,9 @@ def test_develop(self):
             finally:
                 init_file.close()
             if sys.version < "3":
    -            self.assertEqual(init, 'print "foo"')
    +            assert init == 'print "foo"'
             else:
    -            self.assertEqual(init, 'print("foo")')
    +            assert init == 'print("foo")'
     
         def notest_develop_with_setup_requires(self):
     
    
    From a5b9b91081943cb771a3fc7b5873410599513332 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 18:12:40 -0500
    Subject: [PATCH 4689/8469] Remove consideration for older Pythons
    
    ---
     setuptools/tests/test_develop.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
    index 9d8a56c330..890880dcb4 100644
    --- a/setuptools/tests/test_develop.py
    +++ b/setuptools/tests/test_develop.py
    @@ -25,7 +25,7 @@
     class TestDevelopTest:
     
         def setup_method(self, method):
    -        if sys.version < "2.6" or hasattr(sys, 'real_prefix'):
    +        if hasattr(sys, 'real_prefix'):
                 return
     
             # Directory structure
    @@ -50,7 +50,7 @@ def setup_method(self, method):
             site.USER_SITE = tempfile.mkdtemp()
     
         def teardown_method(self, method):
    -        if sys.version < "2.6" or hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
    +        if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
                 return
     
             os.chdir(self.old_cwd)
    @@ -61,7 +61,7 @@ def teardown_method(self, method):
             site.USER_SITE = self.old_site
     
         def test_develop(self):
    -        if sys.version < "2.6" or hasattr(sys, 'real_prefix'):
    +        if hasattr(sys, 'real_prefix'):
                 return
             dist = Distribution(
                 dict(name='foo',
    
    From c3319da5b2e4a8d597a5b27d4a034199eea78745 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 18:13:41 -0500
    Subject: [PATCH 4690/8469] Remove apparently unused method.
    
    ---
     setuptools/tests/test_develop.py | 17 -----------------
     1 file changed, 17 deletions(-)
    
    diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
    index 890880dcb4..f18ddd6ef0 100644
    --- a/setuptools/tests/test_develop.py
    +++ b/setuptools/tests/test_develop.py
    @@ -102,20 +102,3 @@ def test_develop(self):
                 assert init == 'print "foo"'
             else:
                 assert init == 'print("foo")'
    -
    -    def notest_develop_with_setup_requires(self):
    -
    -        wanted = ("Could not find suitable distribution for "
    -                  "Requirement.parse('I-DONT-EXIST')")
    -        old_dir = os.getcwd()
    -        os.chdir(self.dir)
    -        try:
    -            try:
    -                Distribution({'setup_requires': ['I_DONT_EXIST']})
    -            except DistutilsError:
    -                e = sys.exc_info()[1]
    -                error = str(e)
    -                if error == wanted:
    -                    pass
    -        finally:
    -            os.chdir(old_dir)
    
    From f8285cac4b95e6b43869e27093ef04552e665681 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 23:31:22 -0500
    Subject: [PATCH 4691/8469] Move fixture to a fixtures module and make that
     fixture available globally.
    
    ---
     conftest.py                        |  1 +
     setuptools/tests/fixtures.py       | 16 ++++++++++++++++
     setuptools/tests/test_bdist_egg.py | 15 ---------------
     3 files changed, 17 insertions(+), 15 deletions(-)
     create mode 100644 conftest.py
     create mode 100644 setuptools/tests/fixtures.py
    
    diff --git a/conftest.py b/conftest.py
    new file mode 100644
    index 0000000000..a513bb9e2b
    --- /dev/null
    +++ b/conftest.py
    @@ -0,0 +1 @@
    +pytest_plugins = 'setuptools.tests.fixtures'
    diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
    new file mode 100644
    index 0000000000..6b0e53f395
    --- /dev/null
    +++ b/setuptools/tests/fixtures.py
    @@ -0,0 +1,16 @@
    +import mock
    +import pytest
    +
    +from . import contexts
    +
    +@pytest.yield_fixture
    +def user_override():
    +    """
    +    Override site.USER_BASE and site.USER_SITE with temporary directories in
    +    a context.
    +    """
    +    with contexts.tempdir() as user_base:
    +        with mock.patch('site.USER_BASE', user_base):
    +            with contexts.tempdir() as user_site:
    +                with mock.patch('site.USER_SITE', user_site):
    +                    yield
    diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py
    index 08bc75d7bc..ccfb2ea76b 100644
    --- a/setuptools/tests/test_bdist_egg.py
    +++ b/setuptools/tests/test_bdist_egg.py
    @@ -4,32 +4,17 @@
     import re
     
     import pytest
    -import mock
     
     from setuptools.dist import Distribution
     
     from . import contexts
     
    -
     SETUP_PY = """\
     from setuptools import setup
     
     setup(name='foo', py_modules=['hi'])
     """
     
    -@pytest.yield_fixture
    -def user_override():
    -    """
    -    Override site.USER_BASE and site.USER_SITE with temporary directories in
    -    a context.
    -    """
    -    with contexts.tempdir() as user_base:
    -        with mock.patch('site.USER_BASE', user_base):
    -            with contexts.tempdir() as user_site:
    -                with mock.patch('site.USER_SITE', user_site):
    -                    yield
    -
    -
     @pytest.yield_fixture
     def setup_context(tmpdir):
         with (tmpdir/'setup.py').open('w') as f:
    
    From 0b799319a7360bbf2497c037188217334346ba39 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 23:38:02 -0500
    Subject: [PATCH 4692/8469] Convert select tests to pytest model.
    
    ---
     setuptools/tests/test_easy_install.py | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 19e1674caa..61eb868fcb 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -133,9 +133,9 @@ def test_add_from_site_is_ignored(self):
             self.assertTrue(not pth.dirty)
     
     
    -class TestUserInstallTest(unittest.TestCase):
    +class TestUserInstallTest:
     
    -    def setUp(self):
    +    def setup_method(self, method):
             self.dir = tempfile.mkdtemp()
             setup = os.path.join(self.dir, 'setup.py')
             with open(setup, 'w') as f:
    @@ -151,7 +151,7 @@ def setUp(self):
             site.USER_SITE = tempfile.mkdtemp()
             easy_install_pkg.__file__ = site.USER_SITE
     
    -    def tearDown(self):
    +    def teardown_method(self, method):
             os.chdir(self.old_cwd)
             shutil.rmtree(self.dir)
     
    @@ -170,7 +170,7 @@ def test_user_install_implied(self):
             cmd = easy_install(dist)
             cmd.args = ['py']
             cmd.ensure_finalized()
    -        self.assertTrue(cmd.user, 'user should be implied')
    +        assert cmd.user, 'user should be implied'
     
         def test_multiproc_atexit(self):
             try:
    @@ -191,7 +191,7 @@ def test_user_install_not_implied_without_usersite_enabled(self):
             cmd = easy_install(dist)
             cmd.args = ['py']
             cmd.initialize_options()
    -        self.assertFalse(cmd.user, 'NOT user should be implied')
    +        assert not cmd.user, 'NOT user should be implied'
     
         def test_local_index(self):
             # make sure the local index is used
    @@ -217,7 +217,7 @@ def test_local_index(self):
                 res = cmd.easy_install('foo')
                 actual = os.path.normcase(os.path.realpath(res.location))
                 expected = os.path.normcase(os.path.realpath(new_location))
    -            self.assertEqual(actual, expected)
    +            assert actual == expected
             finally:
                 sys.path.remove(target)
                 for basedir in [new_location, target, ]:
    
    From bb7a25abe65fba3fa3e8ae3973321f1fedab8e37 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 23:47:12 -0500
    Subject: [PATCH 4693/8469] Also save the ENABLE_USER_SITE setting in the
     user_override.
    
    ---
     setuptools/tests/contexts.py | 10 ++++++++++
     setuptools/tests/fixtures.py |  3 ++-
     2 files changed, 12 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py
    index a9626ae67a..1620bdb305 100644
    --- a/setuptools/tests/contexts.py
    +++ b/setuptools/tests/contexts.py
    @@ -3,6 +3,7 @@
     import shutil
     import sys
     import contextlib
    +import site
     
     from ..compat import StringIO
     
    @@ -57,3 +58,12 @@ def quiet():
             new_stderr.seek(0)
             sys.stdout = old_stdout
             sys.stderr = old_stderr
    +
    +
    +@contextlib.contextmanager
    +def save_user_site_setting():
    +    saved = site.ENABLE_USER_SITE
    +    try:
    +        yield saved
    +    finally:
    +        site.ENABLE_USER_SITE = saved
    diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
    index 6b0e53f395..225c2ea398 100644
    --- a/setuptools/tests/fixtures.py
    +++ b/setuptools/tests/fixtures.py
    @@ -13,4 +13,5 @@ def user_override():
             with mock.patch('site.USER_BASE', user_base):
                 with contexts.tempdir() as user_site:
                     with mock.patch('site.USER_SITE', user_site):
    -                    yield
    +                    with contexts.save_user_site_setting():
    +                        yield
    
    From 81be05c12fd45550981d1d2a8a4e452482389376 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 23:53:59 -0500
    Subject: [PATCH 4694/8469] Replace some setup/teardown code with the fixture.
    
    ---
     setuptools/tests/test_easy_install.py | 12 ++----------
     1 file changed, 2 insertions(+), 10 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 61eb868fcb..69f42d5626 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -133,6 +133,7 @@ def test_add_from_site_is_ignored(self):
             self.assertTrue(not pth.dirty)
     
     
    +@pytest.mark.usefixtures("user_override")
     class TestUserInstallTest:
     
         def setup_method(self, method):
    @@ -143,26 +144,17 @@ def setup_method(self, method):
             self.old_cwd = os.getcwd()
             os.chdir(self.dir)
     
    -        self.old_enable_site = site.ENABLE_USER_SITE
             self.old_file = easy_install_pkg.__file__
    -        self.old_base = site.USER_BASE
    -        site.USER_BASE = tempfile.mkdtemp()
    -        self.old_site = site.USER_SITE
    -        site.USER_SITE = tempfile.mkdtemp()
             easy_install_pkg.__file__ = site.USER_SITE
     
         def teardown_method(self, method):
             os.chdir(self.old_cwd)
             shutil.rmtree(self.dir)
     
    -        shutil.rmtree(site.USER_BASE)
    -        shutil.rmtree(site.USER_SITE)
    -        site.USER_BASE = self.old_base
    -        site.USER_SITE = self.old_site
    -        site.ENABLE_USER_SITE = self.old_enable_site
             easy_install_pkg.__file__ = self.old_file
     
         def test_user_install_implied(self):
    +        easy_install_pkg.__file__ = site.USER_SITE
             site.ENABLE_USER_SITE = True # disabled sometimes
             #XXX: replace with something meaningfull
             dist = Distribution()
    
    From e1df8f970338c1d20fca384c4258ebb01a5e6682 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Thu, 1 Jan 2015 23:54:42 -0500
    Subject: [PATCH 4695/8469] Normalize whitespace
    
    ---
     setuptools/tests/test_easy_install.py | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 69f42d5626..9922716c29 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -235,7 +235,6 @@ def user_install_setup_context(self, *args, **kwargs):
                 ei.__file__ = site.USER_SITE
                 yield
     
    -
         def patched_setup_context(self):
             self.orig_context = sandbox.setup_context
     
    @@ -244,7 +243,6 @@ def patched_setup_context(self):
                 self.user_install_setup_context,
             )
     
    -
         def test_setup_requires(self):
             """Regression test for Distribute issue #318
     
    
    From bc030aa9e1e5822524bb3ec9b8a0213f579b7b7c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 00:02:30 -0500
    Subject: [PATCH 4696/8469] Replace much of setup/teardown with another
     fixture.
    
    ---
     setuptools/tests/test_easy_install.py | 21 ++++++++++-----------
     1 file changed, 10 insertions(+), 11 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 9922716c29..04a362f5d3 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -133,24 +133,23 @@ def test_add_from_site_is_ignored(self):
             self.assertTrue(not pth.dirty)
     
     
    +@pytest.yield_fixture
    +def setup_context(tmpdir):
    +    with (tmpdir/'setup.py').open('w') as f:
    +        f.write(SETUP_PY)
    +    with tmpdir.as_cwd():
    +        yield tmpdir
    +
    +
     @pytest.mark.usefixtures("user_override")
    +@pytest.mark.usefixtures("setup_context")
     class TestUserInstallTest:
     
         def setup_method(self, method):
    -        self.dir = tempfile.mkdtemp()
    -        setup = os.path.join(self.dir, 'setup.py')
    -        with open(setup, 'w') as f:
    -            f.write(SETUP_PY)
    -        self.old_cwd = os.getcwd()
    -        os.chdir(self.dir)
    -
             self.old_file = easy_install_pkg.__file__
             easy_install_pkg.__file__ = site.USER_SITE
     
         def teardown_method(self, method):
    -        os.chdir(self.old_cwd)
    -        shutil.rmtree(self.dir)
    -
             easy_install_pkg.__file__ = self.old_file
     
         def test_user_install_implied(self):
    @@ -251,7 +250,7 @@ def test_setup_requires(self):
             SandboxViolation.
             """
     
    -        test_pkg = create_setup_requires_package(self.dir)
    +        test_pkg = create_setup_requires_package(os.getcwd())
             test_setup_py = os.path.join(test_pkg, 'setup.py')
     
             try:
    
    From 2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 00:09:56 -0500
    Subject: [PATCH 4697/8469] Replace remaining setup/teardown with a simple
     mock.
    
    ---
     setuptools/tests/test_easy_install.py | 8 +-------
     1 file changed, 1 insertion(+), 7 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index 04a362f5d3..e052ff1e60 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -145,13 +145,7 @@ def setup_context(tmpdir):
     @pytest.mark.usefixtures("setup_context")
     class TestUserInstallTest:
     
    -    def setup_method(self, method):
    -        self.old_file = easy_install_pkg.__file__
    -        easy_install_pkg.__file__ = site.USER_SITE
    -
    -    def teardown_method(self, method):
    -        easy_install_pkg.__file__ = self.old_file
    -
    +    @mock.patch('setuptools.command.easy_install.__file__', None)
         def test_user_install_implied(self):
             easy_install_pkg.__file__ = site.USER_SITE
             site.ENABLE_USER_SITE = True # disabled sometimes
    
    From a73be3ae059fd1583f9930b76116ae977e29c174 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 00:12:02 -0500
    Subject: [PATCH 4698/8469] Remove unused entries in manifest, fixing spurious
     warnings.
    
    ---
     MANIFEST.in | 7 +++----
     1 file changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/MANIFEST.in b/MANIFEST.in
    index f6caf61a99..ed60948bf9 100644
    --- a/MANIFEST.in
    +++ b/MANIFEST.in
    @@ -1,7 +1,6 @@
    -recursive-include setuptools *.py *.txt *.exe *.xml
    -recursive-include tests *.py *.c *.pyx *.txt
    -recursive-include setuptools/tests *.html entries*
    -recursive-include setuptools/tests/svn_data *.zip
    +recursive-include setuptools *.py *.exe *.xml
    +recursive-include tests *.py *.c *.pyx
    +recursive-include setuptools/tests *.html
     recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
     recursive-include _markerlib *.py
     recursive-include pkg_resources *.py *.txt
    
    From 943d583e1ec0d6e4a8a4f3be4361223c39e937d5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 09:17:00 -0500
    Subject: [PATCH 4699/8469] Remove unused import
    
    ---
     setuptools/tests/test_develop.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py
    index f18ddd6ef0..ed1b194a78 100644
    --- a/setuptools/tests/test_develop.py
    +++ b/setuptools/tests/test_develop.py
    @@ -6,7 +6,6 @@
     import sys
     import tempfile
     
    -from distutils.errors import DistutilsError
     from setuptools.command.develop import develop
     from setuptools.dist import Distribution
     
    
    From b14ed9cb87ba7f9aff5baecceae9ca54351a6b4e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 09:37:45 -0500
    Subject: [PATCH 4700/8469] Convert remaining tests in test_easy_install to
     pytest.
    
    ---
     setuptools/tests/test_easy_install.py | 31 +++++++++++++--------------
     1 file changed, 15 insertions(+), 16 deletions(-)
    
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index e052ff1e60..b3fa9cff80 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -4,7 +4,6 @@
     import os
     import shutil
     import tempfile
    -import unittest
     import site
     import contextlib
     import textwrap
    @@ -67,7 +66,7 @@ def as_requirement(self):
         setup(name='foo')
         """)
     
    -class TestEasyInstallTest(unittest.TestCase):
    +class TestEasyInstallTest:
     
         def test_install_site_py(self):
             dist = Distribution()
    @@ -77,7 +76,7 @@ def test_install_site_py(self):
             try:
                 cmd.install_site_py()
                 sitepy = os.path.join(cmd.install_dir, 'site.py')
    -            self.assertTrue(os.path.exists(sitepy))
    +            assert os.path.exists(sitepy)
             finally:
                 shutil.rmtree(cmd.install_dir)
     
    @@ -87,7 +86,7 @@ def test_get_script_args(self):
             args = next(get_script_args(dist))
             name, script = itertools.islice(args, 2)
     
    -        self.assertEqual(script, WANTED)
    +        assert script == WANTED
     
         def test_no_find_links(self):
             # new option '--no-find-links', that blocks find-links added at
    @@ -100,7 +99,7 @@ def test_no_find_links(self):
             cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok')
             cmd.args = ['ok']
             cmd.ensure_finalized()
    -        self.assertEqual(cmd.package_index.scanned_urls, {})
    +        assert cmd.package_index.scanned_urls == {}
     
             # let's try without it (default behavior)
             cmd = easy_install(dist)
    @@ -110,27 +109,27 @@ def test_no_find_links(self):
             cmd.args = ['ok']
             cmd.ensure_finalized()
             keys = sorted(cmd.package_index.scanned_urls.keys())
    -        self.assertEqual(keys, ['link1', 'link2'])
    +        assert keys == ['link1', 'link2']
     
     
    -class TestPTHFileWriter(unittest.TestCase):
    +class TestPTHFileWriter:
         def test_add_from_cwd_site_sets_dirty(self):
             '''a pth file manager should set dirty
             if a distribution is in site but also the cwd
             '''
             pth = PthDistributions('does-not_exist', [os.getcwd()])
    -        self.assertTrue(not pth.dirty)
    +        assert not pth.dirty
             pth.add(PRDistribution(os.getcwd()))
    -        self.assertTrue(pth.dirty)
    +        assert pth.dirty
     
         def test_add_from_site_is_ignored(self):
             location = '/test/location/does-not-have-to-exist'
             # PthDistributions expects all locations to be normalized
             location = pkg_resources.normalize_path(location)
             pth = PthDistributions('does-not_exist', [location, ])
    -        self.assertTrue(not pth.dirty)
    +        assert not pth.dirty
             pth.add(PRDistribution(location))
    -        self.assertTrue(not pth.dirty)
    +        assert not pth.dirty
     
     
     @pytest.yield_fixture
    @@ -276,7 +275,7 @@ def test_bdist_egg_available_on_distutils_pkg(self, distutils_package):
             run_setup('setup.py', ['bdist_egg'])
     
     
    -class TestSetupRequires(unittest.TestCase):
    +class TestSetupRequires:
     
         def test_setup_requires_honors_fetch_params(self):
             """
    @@ -312,8 +311,8 @@ def test_setup_requires_honors_fetch_params(self):
                                     easy_install_pkg.main(ei_params)
             # there should have been two or three requests to the server
             #  (three happens on Python 3.3a)
    -        self.assertTrue(2 <= len(p_index.requests) <= 3)
    -        self.assertEqual(p_index.requests[0].path, '/does-not-exist/')
    +        assert 2 <= len(p_index.requests) <= 3
    +        assert p_index.requests[0].path == '/does-not-exist/'
     
         @staticmethod
         @contextlib.contextmanager
    @@ -363,8 +362,8 @@ def test_setup_requires_overrides_version_conflict(self):
                                 'caused a VersionConflict')
     
                     lines = stdout.readlines()
    -                self.assertTrue(len(lines) > 0)
    -                self.assertTrue(lines[-1].strip(), 'test_pkg')
    +                assert len(lines) > 0
    +                assert lines[-1].strip(), 'test_pkg'
             finally:
                 pkg_resources.__setstate__(pr_state)
     
    
    From bbb68a8b848f9dbd4d44419fdae93b5e057763e5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 09:49:58 -0500
    Subject: [PATCH 4701/8469] Rewrite test using pytest.
    
    ---
     setuptools/tests/fixtures.py      |  7 ++++++
     setuptools/tests/test_egg_info.py | 39 +++++++++++--------------------
     2 files changed, 20 insertions(+), 26 deletions(-)
    
    diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
    index 225c2ea398..0b1eaf5f22 100644
    --- a/setuptools/tests/fixtures.py
    +++ b/setuptools/tests/fixtures.py
    @@ -3,6 +3,7 @@
     
     from . import contexts
     
    +
     @pytest.yield_fixture
     def user_override():
         """
    @@ -15,3 +16,9 @@ def user_override():
                     with mock.patch('site.USER_SITE', user_site):
                         with contexts.save_user_site_setting():
                             yield
    +
    +
    +@pytest.yield_fixture
    +def tmpdir_cwd(tmpdir):
    +    with tmpdir.as_cwd() as orig:
    +        yield orig
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 6b4d917f5a..d8c3252e61 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -2,22 +2,11 @@
     import tempfile
     import shutil
     import stat
    -import unittest
     
     from . import environment
     
     
    -class TestEggInfo(unittest.TestCase):
    -
    -    def setUp(self):
    -        self.test_dir = tempfile.mkdtemp()
    -
    -        self.old_cwd = os.getcwd()
    -        os.chdir(self.test_dir)
    -
    -    def tearDown(self):
    -        os.chdir(self.old_cwd)
    -        shutil.rmtree(self.test_dir)
    +class TestEggInfo:
     
         def _create_project(self):
             with open('setup.py', 'w') as f:
    @@ -33,7 +22,7 @@ def _create_project(self):
                 f.write('def run():\n')
                 f.write("    print('hello')\n")
     
    -    def test_egg_base_installed_egg_info(self):
    +    def test_egg_base_installed_egg_info(self, tmpdir_cwd):
             self._create_project()
             temp_dir = tempfile.mkdtemp(prefix='setuptools-test.')
             os.chmod(temp_dir, stat.S_IRWXU)
    @@ -54,7 +43,7 @@ def test_egg_base_installed_egg_info(self):
                         '--install-lib', paths['lib'],
                         '--install-scripts', paths['scripts'],
                         '--install-data', paths['data']],
    -                pypath=os.pathsep.join([paths['lib'], self.old_cwd]),
    +                pypath=os.pathsep.join([paths['lib'], str(tmpdir_cwd)]),
                     data_stream=1,
                     env=environ)
                 if code:
    @@ -63,17 +52,15 @@ def test_egg_base_installed_egg_info(self):
                 for dirpath, dirnames, filenames in os.walk(paths['lib']):
                     if os.path.basename(dirpath) == 'EGG-INFO':
                         egg_info = sorted(filenames)
    -            self.assertEqual(
    -                egg_info,
    -                ['PKG-INFO',
    -                 'SOURCES.txt',
    -                 'dependency_links.txt',
    -                 'entry_points.txt',
    -                 'not-zip-safe',
    -                 'top_level.txt'])
    +
    +            expected = [
    +                'PKG-INFO',
    +                'SOURCES.txt',
    +                'dependency_links.txt',
    +                'entry_points.txt',
    +                'not-zip-safe',
    +                'top_level.txt',
    +            ]
    +            assert egg_info == expected
             finally:
                 shutil.rmtree(temp_dir)
    -
    -
    -def test_suite():
    -    return unittest.defaultTestLoader.loadTestsFromName(__name__)
    
    From b21f02bdaeab48de81c90142b5ff80c900739613 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 09:55:33 -0500
    Subject: [PATCH 4702/8469] Combine DALS implementations in textwrap module.
    
    ---
     setuptools/tests/test_dist_info.py        |  5 +----
     setuptools/tests/test_easy_install.py     | 11 +++--------
     setuptools/tests/test_windows_wrappers.py |  2 ++
     3 files changed, 6 insertions(+), 12 deletions(-)
    
    diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
    index eab173357c..6d0ab58792 100644
    --- a/setuptools/tests/test_dist_info.py
    +++ b/setuptools/tests/test_dist_info.py
    @@ -3,15 +3,12 @@
     import os
     import shutil
     import tempfile
    -import textwrap
     
     import pytest
     
     import pkg_resources
    +from .textwrap import DALS
     
    -def DALS(s):
    -    "dedent and left-strip"
    -    return textwrap.dedent(s).lstrip()
     
     class TestDistInfo:
     
    diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
    index b3fa9cff80..30789e8397 100644
    --- a/setuptools/tests/test_easy_install.py
    +++ b/setuptools/tests/test_easy_install.py
    @@ -1,12 +1,13 @@
     """Easy install Tests
     """
    +from __future__ import absolute_import
    +
     import sys
     import os
     import shutil
     import tempfile
     import site
     import contextlib
    -import textwrap
     import tarfile
     import logging
     import itertools
    @@ -29,13 +30,7 @@
     
     from .py26compat import tarfile_open
     from . import contexts
    -
    -
    -def DALS(input):
    -    """
    -    Dedent and left-strip
    -    """
    -    return textwrap.dedent(input).lstrip()
    +from .textwrap import DALS
     
     
     class FakeDist(object):
    diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py
    index b6c1e573d1..5b14d07b0e 100644
    --- a/setuptools/tests/test_windows_wrappers.py
    +++ b/setuptools/tests/test_windows_wrappers.py
    @@ -12,6 +12,8 @@
     are to wrap.
     """
     
    +from __future__ import absolute_import
    +
     import sys
     import textwrap
     import subprocess
    
    From e814d51b89cdfb3cd5ec567726c5756f6872041e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 09:59:44 -0500
    Subject: [PATCH 4703/8469] Replace cluttered script generation with multiline
     strings
    
    ---
     setuptools/tests/test_egg_info.py | 28 ++++++++++++++++++----------
     1 file changed, 18 insertions(+), 10 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index d8c3252e61..6d51955cf0 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -4,23 +4,31 @@
     import stat
     
     from . import environment
    +from .textwrap import DALS
     
     
     class TestEggInfo:
     
    +    setup_script = DALS("""
    +        from setuptools import setup
    +
    +        setup(
    +            name='foo',
    +            py_modules=['hello'],
    +            entry_points={'console_scripts': ['hi = hello.run']},
    +            zip_safe=False,
    +        )
    +        """)
    +
         def _create_project(self):
             with open('setup.py', 'w') as f:
    -            f.write('from setuptools import setup\n')
    -            f.write('\n')
    -            f.write('setup(\n')
    -            f.write("    name='foo',\n")
    -            f.write("    py_modules=['hello'],\n")
    -            f.write("    entry_points={'console_scripts': ['hi = hello.run']},\n")
    -            f.write('    zip_safe=False,\n')
    -            f.write('    )\n')
    +            f.write(self.setup_script)
    +
             with open('hello.py', 'w') as f:
    -            f.write('def run():\n')
    -            f.write("    print('hello')\n")
    +            f.write(DALS("""
    +                def run():
    +                    print('hello')
    +                """))
     
         def test_egg_base_installed_egg_info(self, tmpdir_cwd):
             self._create_project()
    
    From 66ed0829c7d9e59592d0d977ac7f51e772b666f8 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:03:30 -0500
    Subject: [PATCH 4704/8469] Use contexts for tempdir generation
    
    ---
     setuptools/tests/contexts.py      |  4 ++--
     setuptools/tests/test_egg_info.py | 10 +++-------
     2 files changed, 5 insertions(+), 9 deletions(-)
    
    diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py
    index 1620bdb305..10691606eb 100644
    --- a/setuptools/tests/contexts.py
    +++ b/setuptools/tests/contexts.py
    @@ -9,8 +9,8 @@
     
     
     @contextlib.contextmanager
    -def tempdir(cd=lambda dir:None):
    -    temp_dir = tempfile.mkdtemp()
    +def tempdir(cd=lambda dir:None, **kwargs):
    +    temp_dir = tempfile.mkdtemp(**kwargs)
         orig_dir = os.getcwd()
         try:
             cd(temp_dir)
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 6d51955cf0..6d7ba3453d 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -1,10 +1,9 @@
     import os
    -import tempfile
    -import shutil
     import stat
     
     from . import environment
     from .textwrap import DALS
    +from . import contexts
     
     
     class TestEggInfo:
    @@ -32,9 +31,8 @@ def run():
     
         def test_egg_base_installed_egg_info(self, tmpdir_cwd):
             self._create_project()
    -        temp_dir = tempfile.mkdtemp(prefix='setuptools-test.')
    -        os.chmod(temp_dir, stat.S_IRWXU)
    -        try:
    +        with contexts.tempdir(prefix='setuptools-test.') as temp_dir:
    +            os.chmod(temp_dir, stat.S_IRWXU)
                 paths = {}
                 for dirname in ['home', 'lib', 'scripts', 'data', 'egg-base']:
                     paths[dirname] = os.path.join(temp_dir, dirname)
    @@ -70,5 +68,3 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                     'top_level.txt',
                 ]
                 assert egg_info == expected
    -        finally:
    -            shutil.rmtree(temp_dir)
    
    From a0bfbbff64b076dab3d4c07b488043a42932bd3e Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:07:53 -0500
    Subject: [PATCH 4705/8469] Rewrite paths construction as generator expression.
    
    ---
     setuptools/tests/test_egg_info.py | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 6d7ba3453d..a92779d513 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -33,10 +33,12 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
             self._create_project()
             with contexts.tempdir(prefix='setuptools-test.') as temp_dir:
                 os.chmod(temp_dir, stat.S_IRWXU)
    -            paths = {}
    -            for dirname in ['home', 'lib', 'scripts', 'data', 'egg-base']:
    -                paths[dirname] = os.path.join(temp_dir, dirname)
    -                os.mkdir(paths[dirname])
    +            subs = 'home', 'lib', 'scripts', 'data', 'egg-base'
    +            paths = dict(
    +                (dirname, os.path.join(temp_dir, dirname))
    +                for dirname in subs
    +            )
    +            list(map(os.mkdir, paths.values()))
                 config = os.path.join(paths['home'], '.pydistutils.cfg')
                 with open(config, 'w') as f:
                     f.write('[egg_info]\n')
    
    From 0dc996c482a8ec3e248b57ed731ec24286e408e1 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:08:56 -0500
    Subject: [PATCH 4706/8469] Rewrite config generation
    
    ---
     setuptools/tests/test_egg_info.py | 7 +++++--
     1 file changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index a92779d513..4a161c8b1c 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -41,8 +41,11 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                 list(map(os.mkdir, paths.values()))
                 config = os.path.join(paths['home'], '.pydistutils.cfg')
                 with open(config, 'w') as f:
    -                f.write('[egg_info]\n')
    -                f.write('egg-base = %s\n' % paths['egg-base'])
    +                f.write(DALS("""
    +                    [egg_info]
    +                    egg-base = %(egg-base)s
    +                    """ % paths
    +                ))
                 environ = os.environ.copy()
                 environ['HOME'] = paths['home']
                 code, data = environment.run_setup_py(
    
    From 73124a8934cf152a0f853809bc78e5dd42d8b9c2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:09:38 -0500
    Subject: [PATCH 4707/8469] Rewrite command construction for clarity.
    
    ---
     setuptools/tests/test_egg_info.py | 13 ++++++++-----
     1 file changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 4a161c8b1c..f20877a56a 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -48,12 +48,15 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                     ))
                 environ = os.environ.copy()
                 environ['HOME'] = paths['home']
    +            cmd = [
    +                'install',
    +                '--home', paths['home'],
    +                '--install-lib', paths['lib'],
    +                '--install-scripts', paths['scripts'],
    +                '--install-data', paths['data'],
    +            ]
                 code, data = environment.run_setup_py(
    -                cmd=[
    -                    'install', '--home', paths['home'],
    -                    '--install-lib', paths['lib'],
    -                    '--install-scripts', paths['scripts'],
    -                    '--install-data', paths['data']],
    +                cmd=cmd,
                     pypath=os.pathsep.join([paths['lib'], str(tmpdir_cwd)]),
                     data_stream=1,
                     env=environ)
    
    From d7aa4bbad9497e548fd0c7b4f935fe1eb94ba613 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:09:53 -0500
    Subject: [PATCH 4708/8469] Use trailing comma for consistency.
    
    ---
     setuptools/tests/test_egg_info.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index f20877a56a..efc66c937b 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -59,7 +59,8 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                     cmd=cmd,
                     pypath=os.pathsep.join([paths['lib'], str(tmpdir_cwd)]),
                     data_stream=1,
    -                env=environ)
    +                env=environ,
    +            )
                 if code:
                     raise AssertionError(data)
                 egg_info = None
    
    From 0822c8ff070891e63471e63b67ea97ff9803c0f5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:15:02 -0500
    Subject: [PATCH 4709/8469] Extract method for _find_egg_info_files.
    
    ---
     setuptools/tests/test_egg_info.py | 18 +++++++++++++-----
     1 file changed, 13 insertions(+), 5 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index efc66c937b..450c898e6a 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -63,10 +63,8 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                 )
                 if code:
                     raise AssertionError(data)
    -            egg_info = None
    -            for dirpath, dirnames, filenames in os.walk(paths['lib']):
    -                if os.path.basename(dirpath) == 'EGG-INFO':
    -                    egg_info = sorted(filenames)
    +
    +            actual = self._find_egg_info_files(paths['lib'])
     
                 expected = [
                     'PKG-INFO',
    @@ -76,4 +74,14 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                     'not-zip-safe',
                     'top_level.txt',
                 ]
    -            assert egg_info == expected
    +            assert sorted(actual) == expected
    +
    +    def _find_egg_info_files(self, root):
    +        results = (
    +            filenames
    +            for dirpath, dirnames, filenames in os.walk(root)
    +            if os.path.basename(dirpath) == 'EGG-INFO'
    +        )
    +        # expect exactly one result
    +        result, = results
    +        return result
    
    From deef22ce4589e31cc23c4e4d570ee6fab75bd06c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:16:54 -0500
    Subject: [PATCH 4710/8469] Use update to set the home environment variable.
    
    ---
     setuptools/tests/test_egg_info.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 450c898e6a..77d2eee755 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -46,8 +46,9 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd):
                         egg-base = %(egg-base)s
                         """ % paths
                     ))
    -            environ = os.environ.copy()
    -            environ['HOME'] = paths['home']
    +            environ = os.environ.copy().update(
    +                HOME=paths['home'],
    +            )
                 cmd = [
                     'install',
                     '--home', paths['home'],
    
    From 08bac0ab2f411b7d50d04d8df66d24d24de6644b Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:25:29 -0500
    Subject: [PATCH 4711/8469] Extract fixture for the environment.
    
    ---
     setuptools/tests/test_egg_info.py | 84 +++++++++++++++++--------------
     1 file changed, 47 insertions(+), 37 deletions(-)
    
    diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
    index 77d2eee755..a1caf9fd30 100644
    --- a/setuptools/tests/test_egg_info.py
    +++ b/setuptools/tests/test_egg_info.py
    @@ -1,6 +1,8 @@
     import os
     import stat
     
    +import pytest
    +
     from . import environment
     from .textwrap import DALS
     from . import contexts
    @@ -29,53 +31,61 @@ def run():
                         print('hello')
                     """))
     
    -    def test_egg_base_installed_egg_info(self, tmpdir_cwd):
    -        self._create_project()
    -        with contexts.tempdir(prefix='setuptools-test.') as temp_dir:
    -            os.chmod(temp_dir, stat.S_IRWXU)
    +    @pytest.yield_fixture
    +    def env(self):
    +        class Environment(str): pass
    +
    +        with contexts.tempdir(prefix='setuptools-test.') as env_dir:
    +            env = Environment(env_dir)
    +            os.chmod(env_dir, stat.S_IRWXU)
                 subs = 'home', 'lib', 'scripts', 'data', 'egg-base'
    -            paths = dict(
    -                (dirname, os.path.join(temp_dir, dirname))
    +            env.paths = dict(
    +                (dirname, os.path.join(env_dir, dirname))
                     for dirname in subs
                 )
    -            list(map(os.mkdir, paths.values()))
    -            config = os.path.join(paths['home'], '.pydistutils.cfg')
    +            list(map(os.mkdir, env.paths.values()))
    +            config = os.path.join(env.paths['home'], '.pydistutils.cfg')
                 with open(config, 'w') as f:
                     f.write(DALS("""
                         [egg_info]
                         egg-base = %(egg-base)s
    -                    """ % paths
    +                    """ % env.paths
                     ))
    -            environ = os.environ.copy().update(
    -                HOME=paths['home'],
    -            )
    -            cmd = [
    -                'install',
    -                '--home', paths['home'],
    -                '--install-lib', paths['lib'],
    -                '--install-scripts', paths['scripts'],
    -                '--install-data', paths['data'],
    -            ]
    -            code, data = environment.run_setup_py(
    -                cmd=cmd,
    -                pypath=os.pathsep.join([paths['lib'], str(tmpdir_cwd)]),
    -                data_stream=1,
    -                env=environ,
    -            )
    -            if code:
    -                raise AssertionError(data)
    +            yield env
    +
    +    def test_egg_base_installed_egg_info(self, tmpdir_cwd, env):
    +        self._create_project()
    +
    +        environ = os.environ.copy().update(
    +            HOME=env.paths['home'],
    +        )
    +        cmd = [
    +            'install',
    +            '--home', env.paths['home'],
    +            '--install-lib', env.paths['lib'],
    +            '--install-scripts', env.paths['scripts'],
    +            '--install-data', env.paths['data'],
    +        ]
    +        code, data = environment.run_setup_py(
    +            cmd=cmd,
    +            pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]),
    +            data_stream=1,
    +            env=environ,
    +        )
    +        if code:
    +            raise AssertionError(data)
     
    -            actual = self._find_egg_info_files(paths['lib'])
    +        actual = self._find_egg_info_files(env.paths['lib'])
     
    -            expected = [
    -                'PKG-INFO',
    -                'SOURCES.txt',
    -                'dependency_links.txt',
    -                'entry_points.txt',
    -                'not-zip-safe',
    -                'top_level.txt',
    -            ]
    -            assert sorted(actual) == expected
    +        expected = [
    +            'PKG-INFO',
    +            'SOURCES.txt',
    +            'dependency_links.txt',
    +            'entry_points.txt',
    +            'not-zip-safe',
    +            'top_level.txt',
    +        ]
    +        assert sorted(actual) == expected
     
         def _find_egg_info_files(self, root):
             results = (
    
    From 8fdf776320fa82dfe4b5dc86f8986f6e22fa6ac2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:33:13 -0500
    Subject: [PATCH 4712/8469] Update test_find_packages to use pytest
    
    ---
     setuptools/tests/test_find_packages.py | 19 +++++++++----------
     1 file changed, 9 insertions(+), 10 deletions(-)
    
    diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py
    index 50513a6963..06a7c02e46 100644
    --- a/setuptools/tests/test_find_packages.py
    +++ b/setuptools/tests/test_find_packages.py
    @@ -3,7 +3,6 @@
     import sys
     import shutil
     import tempfile
    -import unittest
     import platform
     
     import pytest
    @@ -34,13 +33,13 @@ def has_symlink():
         )
         return can_symlink() and not bad_symlink
     
    -class TestFindPackages(unittest.TestCase):
    +class TestFindPackages:
     
    -    def setUp(self):
    +    def setup_method(self, method):
             self.dist_dir = tempfile.mkdtemp()
             self._make_pkg_structure()
     
    -    def tearDown(self):
    +    def teardown_method(self, method):
             shutil.rmtree(self.dist_dir)
     
         def _make_pkg_structure(self):
    @@ -88,7 +87,7 @@ def _touch(self, path, dir_=None):
         def test_regular_package(self):
             self._touch('__init__.py', self.pkg_dir)
             packages = find_packages(self.dist_dir)
    -        self.assertEqual(packages, ['pkg', 'pkg.subpkg'])
    +        assert packages == ['pkg', 'pkg.subpkg']
     
         def test_exclude(self):
             self._touch('__init__.py', self.pkg_dir)
    @@ -103,7 +102,7 @@ def test_include_excludes_other(self):
             alt_dir = self._mkdir('other_pkg', self.dist_dir)
             self._touch('__init__.py', alt_dir)
             packages = find_packages(self.dist_dir, include=['other_pkg'])
    -        self.assertEqual(packages, ['other_pkg'])
    +        assert packages == ['other_pkg']
     
         def test_dir_with_dot_is_skipped(self):
             shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets'))
    @@ -111,7 +110,7 @@ def test_dir_with_dot_is_skipped(self):
             self._touch('__init__.py', data_dir)
             self._touch('file.dat', data_dir)
             packages = find_packages(self.dist_dir)
    -        self.assertTrue('pkg.some.data' not in packages)
    +        assert 'pkg.some.data' not in packages
     
         def test_dir_with_packages_in_subdir_is_excluded(self):
             """
    @@ -122,7 +121,7 @@ def test_dir_with_packages_in_subdir_is_excluded(self):
             build_pkg_dir = self._mkdir('pkg', build_dir)
             self._touch('__init__.py', build_pkg_dir)
             packages = find_packages(self.dist_dir)
    -        self.assertTrue('build.pkg' not in packages)
    +        assert 'build.pkg' not in packages
     
         @pytest.mark.skipif(not has_symlink(), reason='Symlink support required')
         def test_symlinked_packages_are_included(self):
    @@ -137,10 +136,10 @@ def test_symlinked_packages_are_included(self):
             os.symlink('pkg', linked_pkg)
             assert os.path.isdir(linked_pkg)
             packages = find_packages(self.dist_dir)
    -        self.assertTrue('lpkg' in packages)
    +        assert 'lpkg' in packages
     
         def _assert_packages(self, actual, expected):
    -        self.assertEqual(set(actual), set(expected))
    +        assert set(actual) == set(expected)
     
         def test_pep420_ns_package(self):
             packages = find_420_packages(
    
    From 9534a401d57558cf469263beb0a35895dc81d043 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:41:10 -0500
    Subject: [PATCH 4713/8469] Resave with excess whitespace removed
    
    ---
     setuptools/tests/test_integration.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py
    index 8d6c1e55db..411203ff6d 100644
    --- a/setuptools/tests/test_integration.py
    +++ b/setuptools/tests/test_integration.py
    @@ -27,7 +27,7 @@ def install_context(request, tmpdir, monkeypatch):
         def fin():
             # undo the monkeypatch, particularly needed under
             # windows because of kept handle on cwd
    -        monkeypatch.undo() 
    +        monkeypatch.undo()
             new_cwd.remove()
             user_base.remove()
             user_site.remove()
    
    From cf66bbce25e2631bc36d6edfd609705a53b6ef61 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:41:41 -0500
    Subject: [PATCH 4714/8469] Add omitted module.
    
    ---
     setuptools/tests/textwrap.py | 8 ++++++++
     1 file changed, 8 insertions(+)
     create mode 100644 setuptools/tests/textwrap.py
    
    diff --git a/setuptools/tests/textwrap.py b/setuptools/tests/textwrap.py
    new file mode 100644
    index 0000000000..5cd9e5bca8
    --- /dev/null
    +++ b/setuptools/tests/textwrap.py
    @@ -0,0 +1,8 @@
    +from __future__ import absolute_import
    +
    +import textwrap
    +
    +
    +def DALS(s):
    +    "dedent and left-strip"
    +    return textwrap.dedent(s).lstrip()
    
    From 30f3068b7429f401bcbf1955de8fa370f3f8c8b0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:42:49 -0500
    Subject: [PATCH 4715/8469] Remove expected failure from pbr package as it
     appears to be working now.
    
    ---
     setuptools/tests/test_integration.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py
    index 411203ff6d..3a6abeaa44 100644
    --- a/setuptools/tests/test_integration.py
    +++ b/setuptools/tests/test_integration.py
    @@ -71,7 +71,6 @@ def test_virtualenvwrapper(install_context):
                      'virtualenvwrapper', 'hook_loader.py')
     
     
    -@pytest.mark.xfail
     def test_pbr(install_context):
         _install_one('pbr', install_context,
                      'pbr', 'core.py')
    
    From 6fbf8f8eb100b60155ace52aaad3eee076e690f0 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:50:17 -0500
    Subject: [PATCH 4716/8469] Use simple assertions and pytest runner for
     test_markerlib.
    
    ---
     setuptools/tests/test_markerlib.py | 51 +++++++++++++++---------------
     1 file changed, 25 insertions(+), 26 deletions(-)
    
    diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py
    index 0cb9e70add..8197b49dc4 100644
    --- a/setuptools/tests/test_markerlib.py
    +++ b/setuptools/tests/test_markerlib.py
    @@ -1,10 +1,9 @@
     import os
    -import unittest
     
     import pytest
     
     
    -class TestMarkerlib(unittest.TestCase):
    +class TestMarkerlib:
     
         @pytest.mark.importorskip('ast')
         def test_markers(self):
    @@ -12,32 +11,32 @@ def test_markers(self):
     
             os_name = os.name
     
    -        self.assertTrue(interpret(""))
    -
    -        self.assertTrue(interpret("os.name != 'buuuu'"))
    -        self.assertTrue(interpret("os_name != 'buuuu'"))
    -        self.assertTrue(interpret("python_version > '1.0'"))
    -        self.assertTrue(interpret("python_version < '5.0'"))
    -        self.assertTrue(interpret("python_version <= '5.0'"))
    -        self.assertTrue(interpret("python_version >= '1.0'"))
    -        self.assertTrue(interpret("'%s' in os.name" % os_name))
    -        self.assertTrue(interpret("'%s' in os_name" % os_name))
    -        self.assertTrue(interpret("'buuuu' not in os.name"))
    -
    -        self.assertFalse(interpret("os.name == 'buuuu'"))
    -        self.assertFalse(interpret("os_name == 'buuuu'"))
    -        self.assertFalse(interpret("python_version < '1.0'"))
    -        self.assertFalse(interpret("python_version > '5.0'"))
    -        self.assertFalse(interpret("python_version >= '5.0'"))
    -        self.assertFalse(interpret("python_version <= '1.0'"))
    -        self.assertFalse(interpret("'%s' not in os.name" % os_name))
    -        self.assertFalse(interpret("'buuuu' in os.name and python_version >= '5.0'"))
    -        self.assertFalse(interpret("'buuuu' in os_name and python_version >= '5.0'"))
    +        assert interpret("")
    +
    +        assert interpret("os.name != 'buuuu'")
    +        assert interpret("os_name != 'buuuu'")
    +        assert interpret("python_version > '1.0'")
    +        assert interpret("python_version < '5.0'")
    +        assert interpret("python_version <= '5.0'")
    +        assert interpret("python_version >= '1.0'")
    +        assert interpret("'%s' in os.name" % os_name)
    +        assert interpret("'%s' in os_name" % os_name)
    +        assert interpret("'buuuu' not in os.name")
    +
    +        assert not interpret("os.name == 'buuuu'")
    +        assert not interpret("os_name == 'buuuu'")
    +        assert not interpret("python_version < '1.0'")
    +        assert not interpret("python_version > '5.0'")
    +        assert not interpret("python_version >= '5.0'")
    +        assert not interpret("python_version <= '1.0'")
    +        assert not interpret("'%s' not in os.name" % os_name)
    +        assert not interpret("'buuuu' in os.name and python_version >= '5.0'")
    +        assert not interpret("'buuuu' in os_name and python_version >= '5.0'")
     
             environment = default_environment()
             environment['extra'] = 'test'
    -        self.assertTrue(interpret("extra == 'test'", environment))
    -        self.assertFalse(interpret("extra == 'doc'", environment))
    +        assert interpret("extra == 'test'", environment)
    +        assert not interpret("extra == 'doc'", environment)
     
             def raises_nameError():
                 try:
    @@ -60,5 +59,5 @@ def raises_syntaxError():
             raises_syntaxError()
     
             statement = "python_version == '5'"
    -        self.assertEqual(compile(statement).__doc__, statement)
    +        assert compile(statement).__doc__ == statement
     
    
    From 7c075fcc356078930535230fbc975b76db9d68cc Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:55:40 -0500
    Subject: [PATCH 4717/8469] Extend contexts environment patching logic based on
     context manager in test_msvc9compiler and use it.
    
    ---
     setuptools/tests/contexts.py           | 30 +++++++++++++++++++------
     setuptools/tests/test_msvc9compiler.py | 31 +++-----------------------
     2 files changed, 26 insertions(+), 35 deletions(-)
    
    diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py
    index 10691606eb..a604cd415a 100644
    --- a/setuptools/tests/contexts.py
    +++ b/setuptools/tests/contexts.py
    @@ -21,15 +21,31 @@ def tempdir(cd=lambda dir:None, **kwargs):
     
     
     @contextlib.contextmanager
    -def environment(**updates):
    -    old_env = os.environ.copy()
    -    os.environ.update(updates)
    +def environment(**replacements):
    +    """
    +    In a context, patch the environment with replacements. Pass None values
    +    to clear the values.
    +    """
    +    saved = dict(
    +        (key, os.environ['key'])
    +        for key in replacements
    +        if key in os.environ
    +    )
    +
    +    # remove values that are null
    +    remove = (key for (key, value) in replacements.items() if value is None)
    +    for key in list(remove):
    +        os.environ.pop(key, None)
    +        replacements.pop(key)
    +
    +    os.environ.update(replacements)
    +
         try:
    -        yield
    +        yield saved
         finally:
    -        for key in updates:
    -            del os.environ[key]
    -        os.environ.update(old_env)
    +        for key in replacements:
    +            os.environ.pop(key, None)
    +        os.environ.update(saved)
     
     
     @contextlib.contextmanager
    diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py
    index 2774751262..2a117dc94f 100644
    --- a/setuptools/tests/test_msvc9compiler.py
    +++ b/setuptools/tests/test_msvc9compiler.py
    @@ -10,10 +10,11 @@
     import tempfile
     import unittest
     import distutils.errors
    -import contextlib
     
     import pytest
     
    +from . import contexts
    +
     # importing only setuptools should apply the patch
     __import__('setuptools')
     
    @@ -62,32 +63,6 @@ def __exit__(self, exc_type, exc_value, exc_tb):
             distutils.msvc9compiler.Reg.read_keys = self.original_read_keys
             distutils.msvc9compiler.Reg.read_values = self.original_read_values
     
    -@contextlib.contextmanager
    -def patch_env(**replacements):
    -    """
    -    In a context, patch the environment with replacements. Pass None values
    -    to clear the values.
    -    """
    -    saved = dict(
    -        (key, os.environ['key'])
    -        for key in replacements
    -        if key in os.environ
    -    )
    -
    -    # remove values that are null
    -    remove = (key for (key, value) in replacements.items() if value is None)
    -    for key in list(remove):
    -        os.environ.pop(key, None)
    -        replacements.pop(key)
    -
    -    os.environ.update(replacements)
    -
    -    try:
    -        yield saved
    -    finally:
    -        for key in replacements:
    -            os.environ.pop(key, None)
    -        os.environ.update(saved)
     
     class TestMSVC9Compiler(unittest.TestCase):
     
    @@ -100,7 +75,7 @@ def test_find_vcvarsall_patch(self):
     
             # No registry entries or environment variable means we should
             # not find anything
    -        with patch_env(VS90COMNTOOLS=None):
    +        with contexts.environment(VS90COMNTOOLS=None):
                 with MockReg():
                     self.assertIsNone(find_vcvarsall(9.0))
     
    
    From 23d9089cb0e74b75ead48991509f9dff3fa5eff2 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 10:58:16 -0500
    Subject: [PATCH 4718/8469] Reorganize imports
    
    ---
     setuptools/tests/test_packageindex.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
    index d1d6ca8d93..6aec44f93c 100644
    --- a/setuptools/tests/test_packageindex.py
    +++ b/setuptools/tests/test_packageindex.py
    @@ -1,11 +1,11 @@
    -"""Package Index Tests
    -"""
     import sys
     import os
     import unittest
    -import pkg_resources
    -from setuptools.compat import httplib, HTTPError, unicode, pathname2url
     import distutils.errors
    +
    +from setuptools.compat import httplib, HTTPError, unicode, pathname2url
    +
    +import pkg_resources
     import setuptools.package_index
     from setuptools.tests.server import IndexServer
     
    
    From 58c0f87887ee451424da702bfd70c0332e28ac5c Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 11:05:52 -0500
    Subject: [PATCH 4719/8469] Remove dependence on unittest in favor of pytest
     for test_packgeindex
    
    ---
     setuptools/tests/test_packageindex.py | 63 +++++++++++++++------------
     1 file changed, 36 insertions(+), 27 deletions(-)
    
    diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
    index 6aec44f93c..5a46f6138e 100644
    --- a/setuptools/tests/test_packageindex.py
    +++ b/setuptools/tests/test_packageindex.py
    @@ -9,7 +9,8 @@
     import setuptools.package_index
     from setuptools.tests.server import IndexServer
     
    -class TestPackageIndex(unittest.TestCase):
    +
    +class TestPackageIndex:
     
         def test_bad_url_bad_port(self):
             index = setuptools.package_index.PackageIndex()
    @@ -18,9 +19,9 @@ def test_bad_url_bad_port(self):
                 v = index.open_url(url)
             except Exception:
                 v = sys.exc_info()[1]
    -            self.assertTrue(url in str(v))
    +            assert url in str(v)
             else:
    -            self.assertTrue(isinstance(v, HTTPError))
    +            assert isinstance(v, HTTPError)
     
         def test_bad_url_typo(self):
             # issue 16
    @@ -35,9 +36,9 @@ def test_bad_url_typo(self):
                 v = index.open_url(url)
             except Exception:
                 v = sys.exc_info()[1]
    -            self.assertTrue(url in str(v))
    +            assert url in str(v)
             else:
    -            self.assertTrue(isinstance(v, HTTPError))
    +            assert isinstance(v, HTTPError)
     
         def test_bad_url_bad_status_line(self):
             index = setuptools.package_index.PackageIndex(
    @@ -53,7 +54,7 @@ def _urlopen(*args):
                 v = index.open_url(url)
             except Exception:
                 v = sys.exc_info()[1]
    -            self.assertTrue('line' in str(v))
    +            assert 'line' in str(v)
             else:
                 raise AssertionError('Should have raise here!')
     
    @@ -94,7 +95,7 @@ def test_url_ok(self):
                 hosts=('www.example.com',)
             )
             url = 'file:///tmp/test_package_index'
    -        self.assertTrue(index.url_ok(url, True))
    +        assert index.url_ok(url, True)
     
         def test_links_priority(self):
             """
    @@ -127,21 +128,30 @@ def test_links_priority(self):
             server.stop()
     
             # the distribution has been found
    -        self.assertTrue('foobar' in pi)
    +        assert 'foobar' in pi
             # we have only one link, because links are compared without md5
    -        self.assertTrue(len(pi['foobar'])==1)
    +        assert len(pi['foobar'])==1
             # the link should be from the index
    -        self.assertTrue('correct_md5' in pi['foobar'][0].location)
    +        assert 'correct_md5' in pi['foobar'][0].location
     
         def test_parse_bdist_wininst(self):
    -        self.assertEqual(setuptools.package_index.parse_bdist_wininst(
    -            'reportlab-2.5.win32-py2.4.exe'), ('reportlab-2.5', '2.4', 'win32'))
    -        self.assertEqual(setuptools.package_index.parse_bdist_wininst(
    -            'reportlab-2.5.win32.exe'), ('reportlab-2.5', None, 'win32'))
    -        self.assertEqual(setuptools.package_index.parse_bdist_wininst(
    -            'reportlab-2.5.win-amd64-py2.7.exe'), ('reportlab-2.5', '2.7', 'win-amd64'))
    -        self.assertEqual(setuptools.package_index.parse_bdist_wininst(
    -            'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64'))
    +        parse = setuptools.package_index.parse_bdist_wininst
    +
    +        actual = parse('reportlab-2.5.win32-py2.4.exe')
    +        expected = 'reportlab-2.5', '2.4', 'win32'
    +        assert actual == expected
    +
    +        actual = parse('reportlab-2.5.win32.exe')
    +        expected = 'reportlab-2.5', None, 'win32'
    +        assert actual == expected
    +
    +        actual = parse('reportlab-2.5.win-amd64-py2.7.exe')
    +        expected = 'reportlab-2.5', '2.7', 'win-amd64'
    +        assert actual == expected
    +
    +        actual = parse('reportlab-2.5.win-amd64.exe')
    +        expected = 'reportlab-2.5', None, 'win-amd64'
    +        assert actual == expected
     
         def test__vcs_split_rev_from_url(self):
             """
    @@ -149,8 +159,8 @@ def test__vcs_split_rev_from_url(self):
             """
             vsrfu = setuptools.package_index.PackageIndex._vcs_split_rev_from_url
             url, rev = vsrfu('https://example.com/bar@2995')
    -        self.assertEqual(url, 'https://example.com/bar')
    -        self.assertEqual(rev, '2995')
    +        assert url == 'https://example.com/bar'
    +        assert rev == '2995'
     
         def test_local_index(self):
             """
    @@ -173,31 +183,30 @@ def test_md5(self):
             checker = setuptools.package_index.HashChecker.from_url(
                 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478')
             checker.feed('You should probably not be using MD5'.encode('ascii'))
    -        self.assertEqual(checker.hash.hexdigest(),
    -            'f12895fdffbd45007040d2e44df98478')
    -        self.assertTrue(checker.is_valid())
    +        assert checker.hash.hexdigest() == 'f12895fdffbd45007040d2e44df98478'
    +        assert checker.is_valid()
     
         def test_other_fragment(self):
             "Content checks should succeed silently if no hash is present"
             checker = setuptools.package_index.HashChecker.from_url(
                 'http://foo/bar#something%20completely%20different')
             checker.feed('anything'.encode('ascii'))
    -        self.assertTrue(checker.is_valid())
    +        assert checker.is_valid()
     
         def test_blank_md5(self):
             "Content checks should succeed if a hash is empty"
             checker = setuptools.package_index.HashChecker.from_url(
                 'http://foo/bar#md5=')
             checker.feed('anything'.encode('ascii'))
    -        self.assertTrue(checker.is_valid())
    +        assert checker.is_valid()
     
         def test_get_hash_name_md5(self):
             checker = setuptools.package_index.HashChecker.from_url(
                 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478')
    -        self.assertEqual(checker.hash_name, 'md5')
    +        assert checker.hash_name == 'md5'
     
         def test_report(self):
             checker = setuptools.package_index.HashChecker.from_url(
                 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478')
             rep = checker.report(lambda x: x, 'My message about %s')
    -        self.assertEqual(rep, 'My message about md5')
    +        assert rep == 'My message about md5'
    
    From 637da2c7c72edcc5582a4892ae7e18d76910fdf5 Mon Sep 17 00:00:00 2001
    From: "Jason R. Coombs" 
    Date: Fri, 2 Jan 2015 11:13:12 -0500
    Subject: [PATCH 4720/8469] Use tmpdir in test_local_index for brevity and
     isolation.
    
    ---
     setuptools/tests/test_packageindex.py | 15 ++++++---------
     1 file changed, 6 insertions(+), 9 deletions(-)
    
    diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
    index 5a46f6138e..098d4e3faf 100644
    --- a/setuptools/tests/test_packageindex.py
    +++ b/setuptools/tests/test_packageindex.py
    @@ -162,18 +162,15 @@ def test__vcs_split_rev_from_url(self):
             assert url == 'https://example.com/bar'
             assert rev == '2995'
     
    -    def test_local_index(self):
    +    def test_local_index(self, tmpdir):
             """
             local_open should be able to read an index from the file system.
             """
    -        f = open('index.html', 'w')
    -        f.write('
    content
    ') - f.close() - try: - url = 'file:' + pathname2url(os.getcwd()) + '/' - res = setuptools.package_index.local_open(url) - finally: - os.remove('index.html') + index_file = tmpdir / 'index.html' + with index_file.open('w') as f: + f.write('
    content
    ') + url = 'file:' + pathname2url(str(tmpdir)) + '/' + res = setuptools.package_index.local_open(url) assert 'content' in res.read() From 9ed373760301e531de21009f26700e55177265e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:14:16 -0500 Subject: [PATCH 4721/8469] Remove additional references to unittest. --- setuptools/tests/test_packageindex.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 098d4e3faf..3e9d1d84e9 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,6 +1,4 @@ import sys -import os -import unittest import distutils.errors from setuptools.compat import httplib, HTTPError, unicode, pathname2url @@ -174,7 +172,7 @@ def test_local_index(self, tmpdir): assert 'content' in res.read() -class TestContentCheckers(unittest.TestCase): +class TestContentCheckers: def test_md5(self): checker = setuptools.package_index.HashChecker.from_url( From 3412dfc4261abb80dbbd4a17ae3b06308a4a0d95 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:41:30 -0500 Subject: [PATCH 4722/8469] Ported test_resources to pytest from unittest. --- setuptools/tests/test_resources.py | 383 +++++++++++++++-------------- 1 file changed, 200 insertions(+), 183 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index ba8835a946..ecd45bcad9 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -1,12 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# NOTE: the shebang and encoding lines are for ScriptHeaderTests do not remove +# NOTE: the shebang and encoding lines are for TestScriptHeader do not remove import os import sys import tempfile import shutil -from unittest import TestCase import pytest @@ -48,36 +47,32 @@ def get_metadata_lines(self,name): dist_from_fn = pkg_resources.Distribution.from_filename -class DistroTests(TestCase): +class TestDistro: def testCollection(self): # empty path should produce no distributions ad = pkg_resources.Environment([], platform=None, python=None) - self.assertEqual(list(ad), []) - self.assertEqual(ad['FooPkg'],[]) + assert list(ad) == [] + assert ad['FooPkg'] == [] ad.add(dist_from_fn("FooPkg-1.3_1.egg")) ad.add(dist_from_fn("FooPkg-1.4-py2.4-win32.egg")) ad.add(dist_from_fn("FooPkg-1.2-py2.4.egg")) # Name is in there now - self.assertTrue(ad['FooPkg']) + assert ad['FooPkg'] # But only 1 package - self.assertEqual(list(ad), ['foopkg']) + assert list(ad) == ['foopkg'] # Distributions sort by version - self.assertEqual( - [dist.version for dist in ad['FooPkg']], ['1.4','1.3-1','1.2'] - ) + assert [dist.version for dist in ad['FooPkg']] == ['1.4','1.3-1','1.2'] + # Removing a distribution leaves sequence alone ad.remove(ad['FooPkg'][1]) - self.assertEqual( - [dist.version for dist in ad['FooPkg']], ['1.4','1.2'] - ) + assert [dist.version for dist in ad['FooPkg']] == ['1.4','1.2'] + # And inserting adds them in order ad.add(dist_from_fn("FooPkg-1.9.egg")) - self.assertEqual( - [dist.version for dist in ad['FooPkg']], ['1.9','1.4','1.2'] - ) + assert [dist.version for dist in ad['FooPkg']] == ['1.9','1.4','1.2'] ws = WorkingSet([]) foo12 = dist_from_fn("FooPkg-1.2-py2.4.egg") @@ -85,31 +80,32 @@ def testCollection(self): req, = parse_requirements("FooPkg>=1.3") # Nominal case: no distros on path, should yield all applicable - self.assertEqual(ad.best_match(req,ws).version, '1.9') + assert ad.best_match(req, ws).version == '1.9' # If a matching distro is already installed, should return only that ws.add(foo14) - self.assertEqual(ad.best_match(req,ws).version, '1.4') + assert ad.best_match(req, ws).version == '1.4' # If the first matching distro is unsuitable, it's a version conflict ws = WorkingSet([]) ws.add(foo12) ws.add(foo14) - self.assertRaises(VersionConflict, ad.best_match, req, ws) + with pytest.raises(VersionConflict): + ad.best_match(req, ws) # If more than one match on the path, the first one takes precedence ws = WorkingSet([]) ws.add(foo14) ws.add(foo12) ws.add(foo14) - self.assertEqual(ad.best_match(req,ws).version, '1.4') + assert ad.best_match(req, ws).version == '1.4' def checkFooPkg(self,d): - self.assertEqual(d.project_name, "FooPkg") - self.assertEqual(d.key, "foopkg") - self.assertEqual(d.version, "1.3.post1") - self.assertEqual(d.py_version, "2.4") - self.assertEqual(d.platform, "win32") - self.assertEqual(d.parsed_version, parse_version("1.3-1")) + assert d.project_name == "FooPkg" + assert d.key == "foopkg" + assert d.version == "1.3.post1" + assert d.py_version == "2.4" + assert d.platform == "win32" + assert d.parsed_version == parse_version("1.3-1") def testDistroBasics(self): d = Distribution( @@ -119,8 +115,8 @@ def testDistroBasics(self): self.checkFooPkg(d) d = Distribution("/some/path") - self.assertEqual(d.py_version, sys.version[:3]) - self.assertEqual(d.platform, None) + assert d.py_version == sys.version[:3] + assert d.platform == None def testDistroParse(self): d = dist_from_fn("FooPkg-1.3.post1-py2.4-win32.egg") @@ -141,10 +137,7 @@ def distRequires(self, txt): return Distribution("/foo", metadata=Metadata(('depends.txt', txt))) def checkRequires(self, dist, txt, extras=()): - self.assertEqual( - list(dist.requires(extras)), - list(parse_requirements(txt)) - ) + assert list(dist.requires(extras)) == list(parse_requirements(txt)) def testDistroDependsSimple(self): for v in "Twisted>=1.5", "Twisted>=1.5\nZConfig>=2.0": @@ -154,11 +147,11 @@ def testResolve(self): ad = pkg_resources.Environment([]) ws = WorkingSet([]) # Resolving no requirements -> nothing to install - self.assertEqual(list(ws.resolve([],ad)), []) + assert list(ws.resolve([], ad)) == [] # Request something not in the collection -> DistributionNotFound - self.assertRaises( - pkg_resources.DistributionNotFound, ws.resolve, parse_requirements("Foo"), ad - ) + with pytest.raises(pkg_resources.DistributionNotFound): + ws.resolve(parse_requirements("Foo"), ad) + Foo = Distribution.from_filename( "/foo_dir/Foo-1.2.egg", metadata=Metadata(('depends.txt', "[bar]\nBaz>=2.0")) @@ -169,28 +162,25 @@ def testResolve(self): # Request thing(s) that are available -> list to activate for i in range(3): targets = list(ws.resolve(parse_requirements("Foo"), ad)) - self.assertEqual(targets, [Foo]) + assert targets == [Foo] list(map(ws.add,targets)) - self.assertRaises(VersionConflict, ws.resolve, - parse_requirements("Foo==0.9"), ad) + with pytest.raises(VersionConflict): + ws.resolve(parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset # Request an extra that causes an unresolved dependency for "Baz" - self.assertRaises( - pkg_resources.DistributionNotFound, ws.resolve,parse_requirements("Foo[bar]"), ad - ) + with pytest.raises(pkg_resources.DistributionNotFound): + ws.resolve(parse_requirements("Foo[bar]"), ad) Baz = Distribution.from_filename( "/foo_dir/Baz-2.1.egg", metadata=Metadata(('depends.txt', "Foo")) ) ad.add(Baz) # Activation list now includes resolved dependency - self.assertEqual( - list(ws.resolve(parse_requirements("Foo[bar]"), ad)), [Foo,Baz] - ) + assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) ==[Foo,Baz] # Requests for conflicting versions produce VersionConflict - self.assertRaises(VersionConflict, - ws.resolve, parse_requirements("Foo==1.2\nFoo!=1.2"), ad) + with pytest.raises(VersionConflict): + ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) def testDistroDependsOptions(self): d = self.distRequires(""" @@ -215,49 +205,50 @@ def testDistroDependsOptions(self): d,"Twisted>=1.5 fcgiapp>=0.1 ZConfig>=2.0 docutils>=0.3".split(), ["fastcgi", "docgen"] ) - self.assertRaises(pkg_resources.UnknownExtra, d.requires, ["foo"]) + with pytest.raises(pkg_resources.UnknownExtra): + d.requires(["foo"]) -class EntryPointTests(TestCase): +class TestEntryPoints: def assertfields(self, ep): - self.assertEqual(ep.name,"foo") - self.assertEqual(ep.module_name,"setuptools.tests.test_resources") - self.assertEqual(ep.attrs, ("EntryPointTests",)) - self.assertEqual(ep.extras, ("x",)) - self.assertTrue(ep.load() is EntryPointTests) - self.assertEqual( - str(ep), - "foo = setuptools.tests.test_resources:EntryPointTests [x]" + assert ep.name == "foo" + assert ep.module_name == "setuptools.tests.test_resources" + assert ep.attrs == ("TestEntryPoints",) + assert ep.extras == ("x",) + assert ep.load() is TestEntryPoints + assert ( + str(ep) == + "foo = setuptools.tests.test_resources:TestEntryPoints [x]" ) - def setUp(self): + def setup_method(self, method): self.dist = Distribution.from_filename( "FooPkg-1.2-py2.4.egg", metadata=Metadata(('requires.txt','[x]'))) def testBasics(self): ep = EntryPoint( - "foo", "setuptools.tests.test_resources", ["EntryPointTests"], + "foo", "setuptools.tests.test_resources", ["TestEntryPoints"], ["x"], self.dist ) self.assertfields(ep) def testParse(self): - s = "foo = setuptools.tests.test_resources:EntryPointTests [x]" + s = "foo = setuptools.tests.test_resources:TestEntryPoints [x]" ep = EntryPoint.parse(s, self.dist) self.assertfields(ep) ep = EntryPoint.parse("bar baz= spammity[PING]") - self.assertEqual(ep.name,"bar baz") - self.assertEqual(ep.module_name,"spammity") - self.assertEqual(ep.attrs, ()) - self.assertEqual(ep.extras, ("ping",)) + assert ep.name == "bar baz" + assert ep.module_name == "spammity" + assert ep.attrs == () + assert ep.extras == ("ping",) ep = EntryPoint.parse(" fizzly = wocka:foo") - self.assertEqual(ep.name,"fizzly") - self.assertEqual(ep.module_name,"wocka") - self.assertEqual(ep.attrs, ("foo",)) - self.assertEqual(ep.extras, ()) + assert ep.name == "fizzly" + assert ep.module_name == "wocka" + assert ep.attrs == ("foo",) + assert ep.extras == () def testRejects(self): for ep in [ @@ -268,9 +259,9 @@ def testRejects(self): else: raise AssertionError("Should've been bad", ep) def checkSubMap(self, m): - self.assertEqual(len(m), len(self.submap_expect)) + assert len(m) == len(self.submap_expect) for key, ep in iteritems(self.submap_expect): - self.assertEqual(repr(m.get(key)), repr(ep)) + assert repr(m.get(key)) == repr(ep) submap_expect = dict( feature1=EntryPoint('feature1', 'somemodule', ['somefunction']), @@ -286,63 +277,71 @@ def checkSubMap(self, m): def testParseList(self): self.checkSubMap(EntryPoint.parse_group("xyz", self.submap_str)) - self.assertRaises(ValueError, EntryPoint.parse_group, "x a", "foo=bar") - self.assertRaises(ValueError, EntryPoint.parse_group, "x", - ["foo=baz", "foo=bar"]) + with pytest.raises(ValueError): + EntryPoint.parse_group("x a", "foo=bar") + with pytest.raises(ValueError): + EntryPoint.parse_group("x", ["foo=baz", "foo=bar"]) def testParseMap(self): m = EntryPoint.parse_map({'xyz':self.submap_str}) self.checkSubMap(m['xyz']) - self.assertEqual(list(m.keys()),['xyz']) + assert list(m.keys()) == ['xyz'] m = EntryPoint.parse_map("[xyz]\n"+self.submap_str) self.checkSubMap(m['xyz']) - self.assertEqual(list(m.keys()),['xyz']) - self.assertRaises(ValueError, EntryPoint.parse_map, ["[xyz]", "[xyz]"]) - self.assertRaises(ValueError, EntryPoint.parse_map, self.submap_str) + assert list(m.keys()) == ['xyz'] + with pytest.raises(ValueError): + EntryPoint.parse_map(["[xyz]", "[xyz]"]) + with pytest.raises(ValueError): + EntryPoint.parse_map(self.submap_str) -class RequirementsTests(TestCase): +class TestRequirements: def testBasics(self): r = Requirement.parse("Twisted>=1.2") - self.assertEqual(str(r),"Twisted>=1.2") - self.assertEqual(repr(r),"Requirement.parse('Twisted>=1.2')") - self.assertEqual(r, Requirement("Twisted", [('>=','1.2')], ())) - self.assertEqual(r, Requirement("twisTed", [('>=','1.2')], ())) - self.assertNotEqual(r, Requirement("Twisted", [('>=','2.0')], ())) - self.assertNotEqual(r, Requirement("Zope", [('>=','1.2')], ())) - self.assertNotEqual(r, Requirement("Zope", [('>=','3.0')], ())) - self.assertNotEqual(r, Requirement.parse("Twisted[extras]>=1.2")) + assert str(r) == "Twisted>=1.2" + assert repr(r) == "Requirement.parse('Twisted>=1.2')" + assert r == Requirement("Twisted", [('>=','1.2')], ()) + assert r == Requirement("twisTed", [('>=','1.2')], ()) + assert r != Requirement("Twisted", [('>=','2.0')], ()) + assert r != Requirement("Zope", [('>=','1.2')], ()) + assert r != Requirement("Zope", [('>=','3.0')], ()) + assert r != Requirement.parse("Twisted[extras]>=1.2") def testOrdering(self): r1 = Requirement("Twisted", [('==','1.2c1'),('>=','1.2')], ()) r2 = Requirement("Twisted", [('>=','1.2'),('==','1.2c1')], ()) - self.assertEqual(r1,r2) - self.assertEqual(str(r1),str(r2)) - self.assertEqual(str(r2),"Twisted==1.2c1,>=1.2") + assert r1 == r2 + assert str(r1) == str(r2) + assert str(r2) == "Twisted==1.2c1,>=1.2" def testBasicContains(self): r = Requirement("Twisted", [('>=','1.2')], ()) foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") twist11 = Distribution.from_filename("Twisted-1.1.egg") twist12 = Distribution.from_filename("Twisted-1.2.egg") - self.assertTrue(parse_version('1.2') in r) - self.assertTrue(parse_version('1.1') not in r) - self.assertTrue('1.2' in r) - self.assertTrue('1.1' not in r) - self.assertTrue(foo_dist not in r) - self.assertTrue(twist11 not in r) - self.assertTrue(twist12 in r) + assert parse_version('1.2') in r + assert parse_version('1.1') not in r + assert '1.2' in r + assert '1.1' not in r + assert foo_dist not in r + assert twist11 not in r + assert twist12 in r def testOptionsAndHashing(self): r1 = Requirement.parse("Twisted[foo,bar]>=1.2") r2 = Requirement.parse("Twisted[bar,FOO]>=1.2") - self.assertEqual(r1,r2) - self.assertEqual(r1.extras, ("foo","bar")) - self.assertEqual(r2.extras, ("bar","foo")) # extras are normalized - self.assertEqual(hash(r1), hash(r2)) - self.assertEqual( - hash(r1), hash(("twisted", packaging.specifiers.SpecifierSet(">=1.2"), - frozenset(["foo","bar"]))) + assert r1 == r2 + assert r1.extras == ("foo","bar") + assert r2.extras == ("bar","foo") # extras are normalized + assert hash(r1) == hash(r2) + assert ( + hash(r1) + == + hash(( + "twisted", + packaging.specifiers.SpecifierSet(">=1.2"), + frozenset(["foo","bar"]), + )) ) def testVersionEquality(self): @@ -350,42 +349,42 @@ def testVersionEquality(self): r2 = Requirement.parse("foo!=0.3a4") d = Distribution.from_filename - self.assertTrue(d("foo-0.3a4.egg") not in r1) - self.assertTrue(d("foo-0.3a1.egg") not in r1) - self.assertTrue(d("foo-0.3a4.egg") not in r2) + assert d("foo-0.3a4.egg") not in r1 + assert d("foo-0.3a1.egg") not in r1 + assert d("foo-0.3a4.egg") not in r2 - self.assertTrue(d("foo-0.3a2.egg") in r1) - self.assertTrue(d("foo-0.3a2.egg") in r2) - self.assertTrue(d("foo-0.3a3.egg") in r2) - self.assertTrue(d("foo-0.3a5.egg") in r2) + assert d("foo-0.3a2.egg") in r1 + assert d("foo-0.3a2.egg") in r2 + assert d("foo-0.3a3.egg") in r2 + assert d("foo-0.3a5.egg") in r2 def testSetuptoolsProjectName(self): """ The setuptools project should implement the setuptools package. """ - self.assertEqual( - Requirement.parse('setuptools').project_name, 'setuptools') + assert ( + Requirement.parse('setuptools').project_name == 'setuptools') # setuptools 0.7 and higher means setuptools. - self.assertEqual( - Requirement.parse('setuptools == 0.7').project_name, 'setuptools') - self.assertEqual( - Requirement.parse('setuptools == 0.7a1').project_name, 'setuptools') - self.assertEqual( - Requirement.parse('setuptools >= 0.7').project_name, 'setuptools') + assert ( + Requirement.parse('setuptools == 0.7').project_name == 'setuptools') + assert ( + Requirement.parse('setuptools == 0.7a1').project_name == 'setuptools') + assert ( + Requirement.parse('setuptools >= 0.7').project_name == 'setuptools') -class ParseTests(TestCase): +class TestParsing: def testEmptyParse(self): - self.assertEqual(list(parse_requirements('')), []) + assert list(parse_requirements('')) == [] def testYielding(self): for inp,out in [ ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']), (['x\n\n','y'], ['x','y']), ]: - self.assertEqual(list(pkg_resources.yield_lines(inp)),out) + assert list(pkg_resources.yield_lines(inp)) == out def testSplitting(self): sample = """ @@ -401,48 +400,65 @@ def testSplitting(self): [q] v """ - self.assertEqual(list(pkg_resources.split_sections(sample)), - [(None,["x"]), ("Y",["z","a"]), ("b",["c"]), ("d",[]), ("q",["v"])] + assert ( + list(pkg_resources.split_sections(sample)) + == + [ + (None, ["x"]), + ("Y", ["z", "a"]), + ("b", ["c"]), + ("d", []), + ("q", ["v"]), + ] ) - self.assertRaises(ValueError,list,pkg_resources.split_sections("[foo")) + with pytest.raises(ValueError): + list(pkg_resources.split_sections("[foo")) def testSafeName(self): - self.assertEqual(safe_name("adns-python"), "adns-python") - self.assertEqual(safe_name("WSGI Utils"), "WSGI-Utils") - self.assertEqual(safe_name("WSGI Utils"), "WSGI-Utils") - self.assertEqual(safe_name("Money$$$Maker"), "Money-Maker") - self.assertNotEqual(safe_name("peak.web"), "peak-web") + assert safe_name("adns-python") == "adns-python" + assert safe_name("WSGI Utils") == "WSGI-Utils" + assert safe_name("WSGI Utils") == "WSGI-Utils" + assert safe_name("Money$$$Maker") == "Money-Maker" + assert safe_name("peak.web") != "peak-web" def testSafeVersion(self): - self.assertEqual(safe_version("1.2-1"), "1.2.post1") - self.assertEqual(safe_version("1.2 alpha"), "1.2.alpha") - self.assertEqual(safe_version("2.3.4 20050521"), "2.3.4.20050521") - self.assertEqual(safe_version("Money$$$Maker"), "Money-Maker") - self.assertEqual(safe_version("peak.web"), "peak.web") + assert safe_version("1.2-1") == "1.2.post1" + assert safe_version("1.2 alpha") == "1.2.alpha" + assert safe_version("2.3.4 20050521") == "2.3.4.20050521" + assert safe_version("Money$$$Maker") == "Money-Maker" + assert safe_version("peak.web") == "peak.web" def testSimpleRequirements(self): - self.assertEqual( - list(parse_requirements('Twis-Ted>=1.2-1')), + assert ( + list(parse_requirements('Twis-Ted>=1.2-1')) + == [Requirement('Twis-Ted',[('>=','1.2-1')], ())] ) - self.assertEqual( - list(parse_requirements('Twisted >=1.2, \ # more\n<2.0')), + assert ( + list(parse_requirements('Twisted >=1.2, \ # more\n<2.0')) + == [Requirement('Twisted',[('>=','1.2'),('<','2.0')], ())] ) - self.assertEqual( - Requirement.parse("FooBar==1.99a3"), + assert ( + Requirement.parse("FooBar==1.99a3") + == Requirement("FooBar", [('==','1.99a3')], ()) ) - self.assertRaises(ValueError,Requirement.parse,">=2.3") - self.assertRaises(ValueError,Requirement.parse,"x\\") - self.assertRaises(ValueError,Requirement.parse,"x==2 q") - self.assertRaises(ValueError,Requirement.parse,"X==1\nY==2") - self.assertRaises(ValueError,Requirement.parse,"#") + with pytest.raises(ValueError): + Requirement.parse(">=2.3") + with pytest.raises(ValueError): + Requirement.parse("x\\") + with pytest.raises(ValueError): + Requirement.parse("x==2 q") + with pytest.raises(ValueError): + Requirement.parse("X==1\nY==2") + with pytest.raises(ValueError): + Requirement.parse("#") def testVersionEquality(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - self.assertEqual(p1,p2, (s1,s2,p1,p2)) + assert p1 == p2, (s1,s2,p1,p2) c('1.2-rc1', '1.2rc1') c('0.4', '0.4.0') @@ -458,7 +474,7 @@ def c(s1,s2): def testVersionOrdering(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - self.assertTrue(p1 tuple(parse_version("2.0"))) - self.assertTrue(parse_version("3.0") >= tuple(parse_version("2.0"))) - self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) - self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + assert parse_version("1.0") < tuple(parse_version("2.0")) + assert parse_version("1.0") <= tuple(parse_version("2.0")) + assert parse_version("1.0") == tuple(parse_version("1.0")) + assert parse_version("3.0") > tuple(parse_version("2.0")) + assert parse_version("3.0") >= tuple(parse_version("2.0")) + assert parse_version("3.0") != tuple(parse_version("2.0")) + assert not (parse_version("3.0") != tuple(parse_version("3.0"))) def testVersionHashable(self): """ Ensure that our versions stay hashable even though we've subclassed them and added some shim code to them. """ - self.assertEqual( - hash(parse_version("1.0")), - hash(parse_version("1.0")), + assert ( + hash(parse_version("1.0")) + == + hash(parse_version("1.0")) ) -class ScriptHeaderTests(TestCase): +class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' exe_with_spaces = r'C:\Program Files\Python33\python.exe' @@ -546,17 +563,15 @@ def test_get_script_header(self): if not sys.platform.startswith('java') or not is_sh(sys.executable): # This test is for non-Jython platforms expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) - self.assertEqual(get_script_header('#!/usr/local/bin/python'), - expected) + assert get_script_header('#!/usr/local/bin/python') == expected expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) - self.assertEqual(get_script_header('#!/usr/bin/python -x'), - expected) - self.assertEqual(get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe), - '#!%s -x\n' % self.non_ascii_exe) + assert get_script_header('#!/usr/bin/python -x') == expected + candidate = get_script_header('#!/usr/bin/python', + executable=self.non_ascii_exe) + assert candidate == '#!%s -x\n' % self.non_ascii_exe candidate = get_script_header('#!/usr/bin/python', executable=self.exe_with_spaces) - self.assertEqual(candidate, '#!"%s"\n' % self.exe_with_spaces) + assert candidate == '#!"%s"\n' % self.exe_with_spaces def test_get_script_header_jython_workaround(self): # This test doesn't work with Python 3 in some locales @@ -577,38 +592,40 @@ def getProperty(property): try: # A mock sys.executable that uses a shebang line (this file) exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') - self.assertEqual( - get_script_header('#!/usr/local/bin/python', executable=exe), - '#!/usr/bin/env %s\n' % exe) + assert ( + get_script_header('#!/usr/local/bin/python', executable=exe) + == + '#!/usr/bin/env %s\n' % exe + ) # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted sys.stdout = sys.stderr = StringIO() - self.assertEqual(get_script_header('#!/usr/bin/python -x', - executable=exe), - '#!%s -x\n' % exe) - self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue()) + candidate = get_script_header('#!/usr/bin/python -x', + executable=exe) + assert candidate == '#!%s -x\n' % exe + assert 'Unable to adapt shebang line' in sys.stdout.getvalue() sys.stdout = sys.stderr = StringIO() - self.assertEqual(get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe), - '#!%s -x\n' % self.non_ascii_exe) - self.assertTrue('Unable to adapt shebang line' in sys.stdout.getvalue()) + candidate = get_script_header('#!/usr/bin/python', + executable=self.non_ascii_exe) + assert candidate == '#!%s -x\n' % self.non_ascii_exe + assert 'Unable to adapt shebang line' in sys.stdout.getvalue() finally: del sys.modules["java"] sys.platform = platform sys.stdout, sys.stderr = stdout, stderr -class NamespaceTests(TestCase): +class TestNamespaces: - def setUp(self): + def setup_method(self, method): self._ns_pkgs = pkg_resources._namespace_packages.copy() self._tmpdir = tempfile.mkdtemp(prefix="tests-setuptools-") os.makedirs(os.path.join(self._tmpdir, "site-pkgs")) self._prev_sys_path = sys.path[:] sys.path.append(os.path.join(self._tmpdir, "site-pkgs")) - def tearDown(self): + def teardown_method(self, method): shutil.rmtree(self._tmpdir) pkg_resources._namespace_packages = self._ns_pkgs.copy() sys.path = self._prev_sys_path[:] From c3e74e46e20ceb7cc126f28611d0b9c098a333f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:43:29 -0500 Subject: [PATCH 4723/8469] Ported test_sandbox to pytest from unittest. --- setuptools/tests/test_sandbox.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 6a890ebc97..138e7f87c0 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -3,7 +3,6 @@ import sys import os import shutil -import unittest import tempfile import types @@ -24,12 +23,12 @@ def has_win32com(): return False return True -class TestSandbox(unittest.TestCase): +class TestSandbox: - def setUp(self): + def setup_method(self, method): self.dir = tempfile.mkdtemp() - def tearDown(self): + def teardown_method(self, method): shutil.rmtree(self.dir) def test_devnull(self): @@ -78,6 +77,3 @@ def test_setup_py_with_CRLF(self): with open(setup_py, 'wb') as stream: stream.write(b'"degenerate script"\r\n') setuptools.sandbox._execfile(setup_py, globals()) - -if __name__ == '__main__': - unittest.main() From 4837776968b41fd22d74e560f07e554fcff47d72 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:45:35 -0500 Subject: [PATCH 4724/8469] Use importorskip to detect/load win32com --- setuptools/tests/test_sandbox.py | 45 ++++++++++++-------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 138e7f87c0..426c56145b 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -6,22 +6,12 @@ import tempfile import types +import pytest + import pkg_resources import setuptools.sandbox from setuptools.sandbox import DirectorySandbox, SandboxViolation -def has_win32com(): - """ - Run this to determine if the local machine has win32com, and if it - does, include additional tests. - """ - if not sys.platform.startswith('win32'): - return False - try: - __import__('win32com') - except ImportError: - return False - return True class TestSandbox: @@ -44,23 +34,22 @@ def do_write(): _file_writer = staticmethod(_file_writer) - if has_win32com(): - def test_win32com(self): - """ - win32com should not be prevented from caching COM interfaces - in gen_py. - """ - import win32com - gen_py = win32com.__gen_path__ - target = os.path.join(gen_py, 'test_write') - sandbox = DirectorySandbox(self.dir) + def test_win32com(self): + """ + win32com should not be prevented from caching COM interfaces + in gen_py. + """ + win32com = pytest.importorskip('win32com') + gen_py = win32com.__gen_path__ + target = os.path.join(gen_py, 'test_write') + sandbox = DirectorySandbox(self.dir) + try: try: - try: - sandbox.run(self._file_writer(target)) - except SandboxViolation: - self.fail("Could not create gen_py file due to SandboxViolation") - finally: - if os.path.exists(target): os.remove(target) + sandbox.run(self._file_writer(target)) + except SandboxViolation: + self.fail("Could not create gen_py file due to SandboxViolation") + finally: + if os.path.exists(target): os.remove(target) def test_setup_py_with_BOM(self): """ From b96f9cd4b2832c4b70b23473dfed1e6f291dd119 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:47:54 -0500 Subject: [PATCH 4725/8469] Minor cleanup --- setuptools/tests/test_sandbox.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 426c56145b..d09d164f63 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -1,6 +1,5 @@ """develop tests """ -import sys import os import shutil import tempfile @@ -25,15 +24,13 @@ def test_devnull(self): sandbox = DirectorySandbox(self.dir) sandbox.run(self._file_writer(os.devnull)) + @staticmethod def _file_writer(path): def do_write(): - f = open(path, 'w') - f.write('xxx') - f.close() + with open(path, 'w') as f: + f.write('xxx') return do_write - _file_writer = staticmethod(_file_writer) - def test_win32com(self): """ win32com should not be prevented from caching COM interfaces @@ -49,7 +46,8 @@ def test_win32com(self): except SandboxViolation: self.fail("Could not create gen_py file due to SandboxViolation") finally: - if os.path.exists(target): os.remove(target) + if os.path.exists(target): + os.remove(target) def test_setup_py_with_BOM(self): """ From 8b899dabec8d2f050e4a13dfc78ec4bcb5b620df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:50:29 -0500 Subject: [PATCH 4726/8469] Use tmpdir fixture --- setuptools/tests/test_sandbox.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index d09d164f63..6e5ce04a47 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -1,8 +1,6 @@ """develop tests """ import os -import shutil -import tempfile import types import pytest @@ -14,14 +12,8 @@ class TestSandbox: - def setup_method(self, method): - self.dir = tempfile.mkdtemp() - - def teardown_method(self, method): - shutil.rmtree(self.dir) - - def test_devnull(self): - sandbox = DirectorySandbox(self.dir) + def test_devnull(self, tmpdir): + sandbox = DirectorySandbox(str(tmpdir)) sandbox.run(self._file_writer(os.devnull)) @staticmethod @@ -31,7 +23,7 @@ def do_write(): f.write('xxx') return do_write - def test_win32com(self): + def test_win32com(self, tmpdir): """ win32com should not be prevented from caching COM interfaces in gen_py. @@ -39,7 +31,7 @@ def test_win32com(self): win32com = pytest.importorskip('win32com') gen_py = win32com.__gen_path__ target = os.path.join(gen_py, 'test_write') - sandbox = DirectorySandbox(self.dir) + sandbox = DirectorySandbox(str(tmpdir)) try: try: sandbox.run(self._file_writer(target)) @@ -59,8 +51,8 @@ def test_setup_py_with_BOM(self): setuptools.sandbox._execfile(target, vars(namespace)) assert namespace.result == 'passed' - def test_setup_py_with_CRLF(self): - setup_py = os.path.join(self.dir, 'setup.py') - with open(setup_py, 'wb') as stream: + def test_setup_py_with_CRLF(self, tmpdir): + setup_py = tmpdir / 'setup.py' + with setup_py.open('wb') as stream: stream.write(b'"degenerate script"\r\n') - setuptools.sandbox._execfile(setup_py, globals()) + setuptools.sandbox._execfile(str(setup_py), globals()) From a6cfae4a1d1a0fb1c71b6fe353b9d1030417811a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:58:30 -0500 Subject: [PATCH 4727/8469] Converted sdist tests to pytest --- setuptools/tests/test_sdist.py | 55 ++++++++++++++++------------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 120911d25a..943a5deec5 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -6,7 +6,6 @@ import shutil import sys import tempfile -import unittest import unicodedata import contextlib @@ -78,9 +77,9 @@ def decompose(path): return path -class TestSdistTest(unittest.TestCase): +class TestSdistTest: - def setUp(self): + def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') f.write(SETUP_PY) @@ -98,7 +97,7 @@ def setUp(self): self.old_cwd = os.getcwd() os.chdir(self.temp_dir) - def tearDown(self): + def teardown_method(self, method): os.chdir(self.old_cwd) shutil.rmtree(self.temp_dir) @@ -117,9 +116,9 @@ def test_package_data_in_sdist(self): cmd.run() manifest = cmd.filelist.files - self.assertTrue(os.path.join('sdist_test', 'a.txt') in manifest) - self.assertTrue(os.path.join('sdist_test', 'b.txt') in manifest) - self.assertTrue(os.path.join('sdist_test', 'c.rst') not in manifest) + assert os.path.join('sdist_test', 'a.txt') in manifest + assert os.path.join('sdist_test', 'b.txt') in manifest + assert os.path.join('sdist_test', 'c.rst') not in manifest def test_defaults_case_sensitivity(self): @@ -144,9 +143,9 @@ def test_defaults_case_sensitivity(self): # lowercase all names so we can test in a case-insensitive way to make sure the files are not included manifest = map(lambda x: x.lower(), cmd.filelist.files) - self.assertFalse('readme.rst' in manifest, manifest) - self.assertFalse('setup.py' in manifest, manifest) - self.assertFalse('setup.cfg' in manifest, manifest) + assert 'readme.rst' not in manifest, manifest + assert 'setup.py' not in manifest, manifest + assert 'setup.cfg' not in manifest, manifest def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. @@ -184,7 +183,7 @@ def test_manifest_is_written_with_utf8_encoding(self): fs_enc = sys.getfilesystemencoding() filename = filename.decode(fs_enc) - self.assertTrue(posix(filename) in u_contents) + assert posix(filename) in u_contents # Python 3 only if PY3: @@ -223,10 +222,10 @@ def test_write_manifest_allows_utf8_filenames(self): self.fail(e) # The manifest should contain the UTF-8 filename - self.assertTrue(posix(filename) in contents) + assert posix(filename) in contents # The filelist should have been updated as well - self.assertTrue(u_filename in mm.filelist.files) + assert u_filename in mm.filelist.files def test_write_manifest_skips_non_utf8_filenames(self): """ @@ -264,10 +263,10 @@ def test_write_manifest_skips_non_utf8_filenames(self): self.fail(e) # The Latin-1 filename should have been skipped - self.assertFalse(posix(filename) in contents) + assert posix(filename) not in contents # The filelist should have been updated as well - self.assertFalse(u_filename in mm.filelist.files) + assert u_filename not in mm.filelist.files def test_manifest_is_read_with_utf8_encoding(self): # Test for #303. @@ -298,7 +297,7 @@ def test_manifest_is_read_with_utf8_encoding(self): # The filelist should contain the UTF-8 filename if PY3: filename = filename.decode('utf-8') - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files # Python 3 only if PY3: @@ -335,7 +334,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): # The Latin-1 filename should have been skipped filename = filename.decode('latin-1') - self.assertFalse(filename in cmd.filelist.files) + assert filename not in cmd.filelist.files @pytest.mark.skipif(PY3 and locale.getpreferredencoding() != 'UTF-8', reason='Unittest fails if locale is not utf-8 but the manifests is ' @@ -364,15 +363,15 @@ def test_sdist_with_utf8_encoded_filename(self): if fs_enc == 'cp1252': # Python 3 mangles the UTF-8 filename filename = filename.decode('cp1252') - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files else: filename = filename.decode('mbcs') - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files else: filename = filename.decode('utf-8') - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files else: - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files def test_sdist_with_latin1_encoded_filename(self): # Test for #303. @@ -384,7 +383,7 @@ def test_sdist_with_latin1_encoded_filename(self): # Latin-1 filename filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) open(filename, 'w').close() - self.assertTrue(os.path.isfile(filename)) + assert os.path.isfile(filename) with quiet(): cmd.run() @@ -400,11 +399,11 @@ def test_sdist_with_latin1_encoded_filename(self): else: filename = filename.decode('latin-1') - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files else: # The Latin-1 filename should have been skipped filename = filename.decode('latin-1') - self.assertFalse(filename in cmd.filelist.files) + filename not in cmd.filelist.files else: # Under Python 2 there seems to be no decoded string in the # filelist. However, due to decode and encoding of the @@ -414,9 +413,9 @@ def test_sdist_with_latin1_encoded_filename(self): # be proformed for the manifest output. fs_enc = sys.getfilesystemencoding() filename.decode(fs_enc) - self.assertTrue(filename in cmd.filelist.files) + assert filename in cmd.filelist.files except UnicodeDecodeError: - self.assertFalse(filename in cmd.filelist.files) + filename not in cmd.filelist.files def test_default_revctrl(): @@ -434,7 +433,3 @@ def test_default_revctrl(): ep = pkg_resources.EntryPoint.parse(ep_def) res = ep._load() assert hasattr(res, '__iter__') - - -def test_suite(): - return unittest.defaultTestLoader.loadTestsFromName(__name__) From ee20548e4039df2a49157f5d85090286434ced5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 11:58:58 -0500 Subject: [PATCH 4728/8469] Remove unused imports --- setuptools/tests/test_test.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index df92085e5d..edd1769a3a 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -9,10 +9,8 @@ import tempfile import unittest -from distutils.errors import DistutilsError from setuptools.compat import StringIO, PY2 from setuptools.command.test import test -from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution SETUP_PY = """\ From a974f8c7b1b30bdb462531627a39255a0b82fdff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:00:11 -0500 Subject: [PATCH 4729/8469] Use DALS for nicer indentation --- setuptools/tests/test_test.py | 52 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index edd1769a3a..9a8f9313ed 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -13,37 +13,43 @@ from setuptools.command.test import test from setuptools.dist import Distribution -SETUP_PY = """\ -from setuptools import setup - -setup(name='foo', - packages=['name', 'name.space', 'name.space.tests'], - namespace_packages=['name'], - test_suite='name.space.tests.test_suite', -) -""" +from .textwrap import DALS + +SETUP_PY = DALS(""" + from setuptools import setup + + setup(name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + ) + """) + +NS_INIT = DALS(""" + # -*- coding: Latin-1 -*- + # Söme Arbiträry Ünicode to test Issüé 310 + try: + __import__('pkg_resources').declare_namespace(__name__) + except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) + """) -NS_INIT = """# -*- coding: Latin-1 -*- -# Söme Arbiträry Ünicode to test Issüé 310 -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - from pkgutil import extend_path - __path__ = extend_path(__path__, __name__) -""" # Make sure this is Latin-1 binary, before writing: if PY2: NS_INIT = NS_INIT.decode('UTF-8') NS_INIT = NS_INIT.encode('Latin-1') -TEST_PY = """import unittest +TEST_PY = DALS(""" + import unittest -class TestTest(unittest.TestCase): - def test_test(self): - print "Foo" # Should fail under Python 3 unless 2to3 is used + class TestTest(unittest.TestCase): + def test_test(self): + print "Foo" # Should fail under Python 3 unless 2to3 is used + + test_suite = unittest.makeSuite(TestTest) + """) -test_suite = unittest.makeSuite(TestTest) -""" class TestTestTest(unittest.TestCase): From 14beff81f0f4369a3323a84f49d53747a38bccfd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:01:57 -0500 Subject: [PATCH 4730/8469] Port test_test to pytest --- setuptools/tests/test_test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 9a8f9313ed..f527aa240a 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -7,7 +7,6 @@ import site import sys import tempfile -import unittest from setuptools.compat import StringIO, PY2 from setuptools.command.test import test @@ -51,9 +50,9 @@ def test_test(self): """) -class TestTestTest(unittest.TestCase): +class TestTestTest: - def setUp(self): + def setup_method(self, method): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return @@ -90,7 +89,7 @@ def setUp(self): self.old_site = site.USER_SITE site.USER_SITE = tempfile.mkdtemp() - def tearDown(self): + def teardown_method(self, method): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return From d66783b40a483c9edf6117d7ebbb49c18e00de17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:02:52 -0500 Subject: [PATCH 4731/8469] Python 2.6 can be assumed --- setuptools/tests/test_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index f527aa240a..abd0038b7e 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -53,7 +53,7 @@ def test_test(self): class TestTestTest: def setup_method(self, method): - if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + if hasattr(sys, 'real_prefix'): return # Directory structure @@ -90,7 +90,7 @@ def setup_method(self, method): site.USER_SITE = tempfile.mkdtemp() def teardown_method(self, method): - if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + if hasattr(sys, 'real_prefix'): return os.chdir(self.old_cwd) @@ -101,7 +101,7 @@ def teardown_method(self, method): site.USER_SITE = self.old_site def test_test(self): - if sys.version < "2.6" or hasattr(sys, 'real_prefix'): + if hasattr(sys, 'real_prefix'): return dist = Distribution(dict( From f0eaf642ac52c02cc605ee1222bd143ef5f36623 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:06:51 -0500 Subject: [PATCH 4732/8469] Use skipif marker for real_prefix --- setuptools/tests/test_test.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index abd0038b7e..5d7b72ba6a 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -8,6 +8,8 @@ import sys import tempfile +import pytest + from setuptools.compat import StringIO, PY2 from setuptools.command.test import test from setuptools.dist import Distribution @@ -50,12 +52,10 @@ def test_test(self): """) +@pytest.mark.skipif('hasattr(sys, "real_prefix")') class TestTestTest: def setup_method(self, method): - if hasattr(sys, 'real_prefix'): - return - # Directory structure self.dir = tempfile.mkdtemp() os.mkdir(os.path.join(self.dir, 'name')) @@ -90,9 +90,6 @@ def setup_method(self, method): site.USER_SITE = tempfile.mkdtemp() def teardown_method(self, method): - if hasattr(sys, 'real_prefix'): - return - os.chdir(self.old_cwd) shutil.rmtree(self.dir) shutil.rmtree(site.USER_BASE) @@ -101,9 +98,6 @@ def teardown_method(self, method): site.USER_SITE = self.old_site def test_test(self): - if hasattr(sys, 'real_prefix'): - return - dist = Distribution(dict( name='foo', packages=['name', 'name.space', 'name.space.tests'], From 6a5d120fa48b91f4e4cd78404f48daa8f97a2bc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:08:30 -0500 Subject: [PATCH 4733/8469] Use context opener --- setuptools/tests/test_test.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 5d7b72ba6a..aec9ec98ef 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -61,27 +61,27 @@ def setup_method(self, method): os.mkdir(os.path.join(self.dir, 'name')) os.mkdir(os.path.join(self.dir, 'name', 'space')) os.mkdir(os.path.join(self.dir, 'name', 'space', 'tests')) + # setup.py setup = os.path.join(self.dir, 'setup.py') - f = open(setup, 'wt') - f.write(SETUP_PY) - f.close() + with open(setup, 'wt') as f: + f.write(SETUP_PY) self.old_cwd = os.getcwd() + # name/__init__.py init = os.path.join(self.dir, 'name', '__init__.py') - f = open(init, 'wb') - f.write(NS_INIT) - f.close() + with open(init, 'wb') as f: + f.write(NS_INIT) + # name/space/__init__.py init = os.path.join(self.dir, 'name', 'space', '__init__.py') - f = open(init, 'wt') - f.write('#empty\n') - f.close() + with open(init, 'wt') as f: + f.write('#empty\n') + # name/space/tests/__init__.py init = os.path.join(self.dir, 'name', 'space', 'tests', '__init__.py') - f = open(init, 'wt') - f.write(TEST_PY) - f.close() + with open(init, 'wt') as f: + f.write(TEST_PY) os.chdir(self.dir) self.old_base = site.USER_BASE From f6684c70f00276cc1ffa5225e543fbf7d7de6e71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:13:45 -0500 Subject: [PATCH 4734/8469] Use useroverride fixture --- setuptools/tests/test_test.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index aec9ec98ef..6d279e40d2 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -53,6 +53,7 @@ def test_test(self): @pytest.mark.skipif('hasattr(sys, "real_prefix")') +@pytest.mark.usefixture('useroverride') class TestTestTest: def setup_method(self, method): @@ -84,18 +85,10 @@ def setup_method(self, method): f.write(TEST_PY) os.chdir(self.dir) - self.old_base = site.USER_BASE - site.USER_BASE = tempfile.mkdtemp() - self.old_site = site.USER_SITE - site.USER_SITE = tempfile.mkdtemp() def teardown_method(self, method): os.chdir(self.old_cwd) shutil.rmtree(self.dir) - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site def test_test(self): dist = Distribution(dict( From 2ebaaf2315395b99b6790717659cb26a25cb715f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:35:03 -0500 Subject: [PATCH 4735/8469] Replace setup/teardown with a shorter, more elegant fixture. --- setuptools/tests/test_test.py | 60 ++++++++++++++--------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 6d279e40d2..1f4a7dda5b 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -3,10 +3,8 @@ """develop tests """ import os -import shutil import site import sys -import tempfile import pytest @@ -52,44 +50,32 @@ def test_test(self): """) +@pytest.fixture +def sample_test(tmpdir_cwd): + os.makedirs('name/space/tests') + + # setup.py + with open('setup.py', 'wt') as f: + f.write(SETUP_PY) + + # name/__init__.py + with open('name/__init__.py', 'wb') as f: + f.write(NS_INIT) + + # name/space/__init__.py + with open('name/space/__init__.py', 'wt') as f: + f.write('#empty\n') + + # name/space/tests/__init__.py + with open('name/space/tests/__init__.py', 'wt') as f: + f.write(TEST_PY) + + @pytest.mark.skipif('hasattr(sys, "real_prefix")') -@pytest.mark.usefixture('useroverride') +@pytest.mark.usefixtures('user_override') +@pytest.mark.usefixtures('sample_test') class TestTestTest: - def setup_method(self, method): - # Directory structure - self.dir = tempfile.mkdtemp() - os.mkdir(os.path.join(self.dir, 'name')) - os.mkdir(os.path.join(self.dir, 'name', 'space')) - os.mkdir(os.path.join(self.dir, 'name', 'space', 'tests')) - - # setup.py - setup = os.path.join(self.dir, 'setup.py') - with open(setup, 'wt') as f: - f.write(SETUP_PY) - self.old_cwd = os.getcwd() - - # name/__init__.py - init = os.path.join(self.dir, 'name', '__init__.py') - with open(init, 'wb') as f: - f.write(NS_INIT) - - # name/space/__init__.py - init = os.path.join(self.dir, 'name', 'space', '__init__.py') - with open(init, 'wt') as f: - f.write('#empty\n') - - # name/space/tests/__init__.py - init = os.path.join(self.dir, 'name', 'space', 'tests', '__init__.py') - with open(init, 'wt') as f: - f.write(TEST_PY) - - os.chdir(self.dir) - - def teardown_method(self, method): - os.chdir(self.old_cwd) - shutil.rmtree(self.dir) - def test_test(self): dist = Distribution(dict( name='foo', From ea576715047f0b4356d2ee39ec7c603305db0e8a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:37:39 -0500 Subject: [PATCH 4736/8469] Use quiet context --- setuptools/tests/test_test.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 1f4a7dda5b..51c3a9b406 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -4,15 +4,15 @@ """ import os import site -import sys import pytest -from setuptools.compat import StringIO, PY2 +from setuptools.compat import PY2 from setuptools.command.test import test from setuptools.dist import Distribution from .textwrap import DALS +from . import contexts SETUP_PY = DALS(""" from setuptools import setup @@ -90,13 +90,10 @@ def test_test(self): cmd.ensure_finalized() cmd.install_dir = site.USER_SITE cmd.user = 1 - old_stdout = sys.stdout - sys.stdout = StringIO() - try: - try: # try/except/finally doesn't work in Python 2.4, so we need nested try-statements. + with contexts.quiet(): + try: cmd.run() - except SystemExit: # The test runner calls sys.exit, stop that making an error. + except SystemExit: + # The test runner calls sys.exit; suppress the exception pass - finally: - sys.stdout = old_stdout From 23c128e6ba47135134c317f42f1f42426eb9ae78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:44:43 -0500 Subject: [PATCH 4737/8469] Suppress exceptions in a context for clarity, brevity, and reuse. --- setuptools/tests/contexts.py | 8 ++++++++ setuptools/tests/test_test.py | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index a604cd415a..d06a333f08 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -83,3 +83,11 @@ def save_user_site_setting(): yield saved finally: site.ENABLE_USER_SITE = saved + + +@contextlib.contextmanager +def suppress_exceptions(*excs): + try: + yield + except excs: + pass diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 51c3a9b406..41b7d07884 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -91,9 +91,6 @@ def test_test(self): cmd.install_dir = site.USER_SITE cmd.user = 1 with contexts.quiet(): - try: + # The test runner calls sys.exit + with contexts.suppress_exceptions(SystemExit): cmd.run() - except SystemExit: - # The test runner calls sys.exit; suppress the exception - pass - From adda5ac7b25a17843749f054e48bc36de4c54b72 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:45:38 -0500 Subject: [PATCH 4738/8469] Extract var --- setuptools/tests/test_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 41b7d07884..f2b444f7a7 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -77,13 +77,14 @@ def sample_test(tmpdir_cwd): class TestTestTest: def test_test(self): - dist = Distribution(dict( + params = dict( name='foo', packages=['name', 'name.space', 'name.space.tests'], namespace_packages=['name'], test_suite='name.space.tests.test_suite', use_2to3=True, - )) + ) + dist = Distribution(params) dist.script_name = 'setup.py' cmd = test(dist) cmd.user = 1 From 69c864c159b9f960e8881f5a60d20453ad17a30f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:55:29 -0500 Subject: [PATCH 4739/8469] Use unicode literals to define files as text, and encode specifically when saving files. --- setuptools/tests/test_test.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index f2b444f7a7..4430e6eae4 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,13 +1,12 @@ # -*- coding: UTF-8 -*- -"""develop tests -""" +from __future__ import unicode_literals + import os import site import pytest -from setuptools.compat import PY2 from setuptools.command.test import test from setuptools.dist import Distribution @@ -34,11 +33,6 @@ __path__ = extend_path(__path__, __name__) """) -# Make sure this is Latin-1 binary, before writing: -if PY2: - NS_INIT = NS_INIT.decode('UTF-8') -NS_INIT = NS_INIT.encode('Latin-1') - TEST_PY = DALS(""" import unittest @@ -60,7 +54,7 @@ def sample_test(tmpdir_cwd): # name/__init__.py with open('name/__init__.py', 'wb') as f: - f.write(NS_INIT) + f.write(NS_INIT.encode('Latin-1')) # name/space/__init__.py with open('name/space/__init__.py', 'wt') as f: From 73dd2fa9592d68e037a27468c36fdf3b32e0e16f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:56:31 -0500 Subject: [PATCH 4740/8469] Update comment to reflect issue was reported in Distribute. --- setuptools/tests/test_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 4430e6eae4..a66294c951 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -25,7 +25,7 @@ NS_INIT = DALS(""" # -*- coding: Latin-1 -*- - # Söme Arbiträry Ünicode to test Issüé 310 + # Söme Arbiträry Ünicode to test Distribute Issüé 310 try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: From 6f3dd242a7856fb7d6be2a59fccbab449367285b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:57:07 -0500 Subject: [PATCH 4741/8469] Normalize imports --- setuptools/tests/test_upload_docs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 769f16cc5a..a1bd835f49 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -1,6 +1,13 @@ """build_ext tests """ -import sys, os, shutil, tempfile, unittest, site, zipfile +import sys +import os +import shutil +import tempfile +import unittest +import site +import zipfile + from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution From e97379a558d1134ae402a428cda975911ba7d9e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 12:58:14 -0500 Subject: [PATCH 4742/8469] Use DALS --- setuptools/tests/test_upload_docs.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index a1bd835f49..f4e43d7c4e 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -11,11 +11,16 @@ from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution -SETUP_PY = """\ -from setuptools import setup +from .textwrap import DALS + + +SETUP_PY = DALS( + """ + from setuptools import setup + + setup(name='foo') + """) -setup(name='foo') -""" class TestUploadDocsTest(unittest.TestCase): def setUp(self): From 3c40f86c2e1fac7707b6a7f2a25920fbb74ee270 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:00:18 -0500 Subject: [PATCH 4743/8469] Remove dependence on unittest in test_upload_docs --- setuptools/tests/test_upload_docs.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index f4e43d7c4e..2d478866c4 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -4,7 +4,6 @@ import os import shutil import tempfile -import unittest import site import zipfile @@ -22,8 +21,8 @@ """) -class TestUploadDocsTest(unittest.TestCase): - def setUp(self): +class TestUploadDocsTest: + def setup_method(self, method): self.dir = tempfile.mkdtemp() setup = os.path.join(self.dir, 'setup.py') f = open(setup, 'w') @@ -49,7 +48,7 @@ def setUp(self): self.old_site = site.USER_SITE site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp() - def tearDown(self): + def teardown_method(self, method): os.chdir(self.old_cwd) shutil.rmtree(self.dir) if sys.version >= "2.6": From ddbaa77c8f1ad3cbb42957f03707804b13863d18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:01:03 -0500 Subject: [PATCH 4744/8469] Remove copy pasta --- setuptools/tests/test_upload_docs.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 2d478866c4..f7052e6eac 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -1,5 +1,3 @@ -"""build_ext tests -""" import sys import os import shutil From 144cd7bb846c5bcbadf1676d5455a065de52419a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:06:33 -0500 Subject: [PATCH 4745/8469] Leverage fixtures for sample project and user_overrides. --- setuptools/tests/test_upload_docs.py | 53 ++++++++++------------------ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index f7052e6eac..9e85f0d6cf 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -1,10 +1,10 @@ -import sys import os import shutil import tempfile -import site import zipfile +import pytest + from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution @@ -19,41 +19,25 @@ """) -class TestUploadDocsTest: - def setup_method(self, method): - self.dir = tempfile.mkdtemp() - setup = os.path.join(self.dir, 'setup.py') - f = open(setup, 'w') +@pytest.fixture +def sample_project(tmpdir_cwd): + # setup.py + with open('setup.py', 'wt') as f: f.write(SETUP_PY) - f.close() - self.old_cwd = os.getcwd() - os.chdir(self.dir) - self.upload_dir = os.path.join(self.dir, 'build') - os.mkdir(self.upload_dir) + os.mkdir('build') - # A test document. - f = open(os.path.join(self.upload_dir, 'index.html'), 'w') + # A test document. + with open('build/index.html', 'w') as f: f.write("Hello world.") - f.close() - - # An empty folder. - os.mkdir(os.path.join(self.upload_dir, 'empty')) - - if sys.version >= "2.6": - self.old_base = site.USER_BASE - site.USER_BASE = upload_docs.USER_BASE = tempfile.mkdtemp() - self.old_site = site.USER_SITE - site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp() - - def teardown_method(self, method): - os.chdir(self.old_cwd) - shutil.rmtree(self.dir) - if sys.version >= "2.6": - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site + + # An empty folder. + os.mkdir('build/empty') + + +@pytest.mark.usefixtures('sample_project') +@pytest.mark.usefixtures('user_override') +class TestUploadDocsTest: def test_create_zipfile(self): # Test to make sure zipfile creation handles common cases. @@ -62,8 +46,7 @@ def test_create_zipfile(self): dist = Distribution() cmd = upload_docs(dist) - cmd.upload_dir = self.upload_dir - cmd.target_dir = self.upload_dir + cmd.target_dir = cmd.upload_dir = 'build' tmp_dir = tempfile.mkdtemp() tmp_file = os.path.join(tmp_dir, 'foo.zip') try: From b72261b9a0c9e45c730eff86fae594428f6f932a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:07:41 -0500 Subject: [PATCH 4746/8469] Replace comment with clearer docstring. --- setuptools/tests/test_upload_docs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 9e85f0d6cf..6fe9e051db 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -40,8 +40,10 @@ def sample_project(tmpdir_cwd): class TestUploadDocsTest: def test_create_zipfile(self): - # Test to make sure zipfile creation handles common cases. - # This explicitly includes a folder containing an empty folder. + """ + Ensure zipfile creation handles common cases, including a folder + containing an empty folder. + """ dist = Distribution() From a87442aab8bd8779b562043540c467ffffb4d581 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:09:46 -0500 Subject: [PATCH 4747/8469] Use tempdir context --- setuptools/tests/test_upload_docs.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 6fe9e051db..66d06dc018 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -1,6 +1,4 @@ import os -import shutil -import tempfile import zipfile import pytest @@ -9,6 +7,7 @@ from setuptools.dist import Distribution from .textwrap import DALS +from . import contexts SETUP_PY = DALS( @@ -49,9 +48,8 @@ def test_create_zipfile(self): cmd = upload_docs(dist) cmd.target_dir = cmd.upload_dir = 'build' - tmp_dir = tempfile.mkdtemp() - tmp_file = os.path.join(tmp_dir, 'foo.zip') - try: + with contexts.tempdir() as tmp_dir: + tmp_file = os.path.join(tmp_dir, 'foo.zip') zip_file = cmd.create_zipfile(tmp_file) assert zipfile.is_zipfile(tmp_file) @@ -61,6 +59,3 @@ def test_create_zipfile(self): assert zip_file.namelist() == ['index.html'] zip_file.close() - finally: - shutil.rmtree(tmp_dir) - From 8aee42417b6635979dc0da1beba3eae4fc6c3c7c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:13:23 -0500 Subject: [PATCH 4748/8469] woh what? --- setuptools/tests/test_upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 66d06dc018..ea5c358765 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -54,7 +54,7 @@ def test_create_zipfile(self): assert zipfile.is_zipfile(tmp_file) - zip_file = zipfile.ZipFile(tmp_file) # woh... + zip_file = zipfile.ZipFile(tmp_file) assert zip_file.namelist() == ['index.html'] From afedfedb4669e8f4ab1677bdb71bb9895fb2dc13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:14:31 -0500 Subject: [PATCH 4749/8469] Open zip file in context --- setuptools/tests/test_upload_docs.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index ea5c358765..85f6d864fc 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -54,8 +54,5 @@ def test_create_zipfile(self): assert zipfile.is_zipfile(tmp_file) - zip_file = zipfile.ZipFile(tmp_file) - - assert zip_file.namelist() == ['index.html'] - - zip_file.close() + with zipfile.ZipFile(tmp_file) as zip_file: + assert zip_file.namelist() == ['index.html'] From db80c8f857b0c4ff3a5ad02a59e6442629599914 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:19:13 -0500 Subject: [PATCH 4750/8469] Use closing for Python 2.6 compatibility --- setuptools/tests/test_upload_docs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 85f6d864fc..cc71cadb23 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -1,5 +1,6 @@ import os import zipfile +import contextlib import pytest @@ -54,5 +55,5 @@ def test_create_zipfile(self): assert zipfile.is_zipfile(tmp_file) - with zipfile.ZipFile(tmp_file) as zip_file: + with contextlib.closing(zipfile.ZipFile(tmp_file)) as zip_file: assert zip_file.namelist() == ['index.html'] From 398440e9a878ed9a6dbd8843151bc08e4ba5059a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:24:45 -0500 Subject: [PATCH 4751/8469] Remove unittest dependency from test_msvc9compiler. --- setuptools/tests/test_msvc9compiler.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 2a117dc94f..a1637941a1 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -8,7 +8,6 @@ import os import shutil import tempfile -import unittest import distutils.errors import pytest @@ -64,7 +63,7 @@ def __exit__(self, exc_type, exc_value, exc_tb): distutils.msvc9compiler.Reg.read_values = self.original_read_values -class TestMSVC9Compiler(unittest.TestCase): +class TestMSVC9Compiler: def test_find_vcvarsall_patch(self): mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ @@ -77,7 +76,7 @@ def test_find_vcvarsall_patch(self): # not find anything with contexts.environment(VS90COMNTOOLS=None): with MockReg(): - self.assertIsNone(find_vcvarsall(9.0)) + assert find_vcvarsall(9.0) is None expected = distutils.errors.DistutilsPlatformError with pytest.raises(expected) as exc: @@ -104,11 +103,11 @@ def test_find_vcvarsall_patch(self): key_64: mock_installdir_2, } ): - self.assertEqual(mock_vcvarsall_bat_1, find_vcvarsall(9.0)) + assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) # Ensure we get the local machine value if it's there with MockReg(hkey_local_machine={key_32: mock_installdir_2}): - self.assertEqual(mock_vcvarsall_bat_2, find_vcvarsall(9.0)) + assert mock_vcvarsall_bat_2 == find_vcvarsall(9.0) # Ensure we prefer the 64-bit local machine key # (*not* the Wow6432Node key) @@ -120,7 +119,7 @@ def test_find_vcvarsall_patch(self): key_64: mock_installdir_2, } ): - self.assertEqual(mock_vcvarsall_bat_1, find_vcvarsall(9.0)) + assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) finally: shutil.rmtree(mock_installdir_1) shutil.rmtree(mock_installdir_2) From 56d5fbca3e587bf124d3a1a2a095cd29a9e7e375 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:26:15 -0500 Subject: [PATCH 4752/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index efbb43f8df..1fd1fd4ac8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ next ---- * Deprecated use of EntryPoint.load(require=False). +* Substantial refactoring of all unit tests. Tests are now much leaner and + re-use a lot of fixtures and contexts for better clarity of purpose. ---- 10.1 From ed24bfcd1c3b9b7d83e433152c85dd6400edb4e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:43:18 -0500 Subject: [PATCH 4753/8469] Use mock to patch msvc9compiler.Reg. --- setuptools/tests/test_msvc9compiler.py | 90 +++++++++++++------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index a1637941a1..9ed23e3886 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -11,6 +11,7 @@ import distutils.errors import pytest +import mock from . import contexts @@ -19,48 +20,41 @@ pytest.importorskip("distutils.msvc9compiler") -class MockReg: - """Mock for distutils.msvc9compiler.Reg. We patch it - with an instance of this class that mocks out the - functions that access the registry. - """ - - def __init__(self, hkey_local_machine={}, hkey_current_user={}): - self.hklm = hkey_local_machine - self.hkcu = hkey_current_user - - def __enter__(self): - self.original_read_keys = distutils.msvc9compiler.Reg.read_keys - self.original_read_values = distutils.msvc9compiler.Reg.read_values - - _winreg = getattr(distutils.msvc9compiler, '_winreg', None) - winreg = getattr(distutils.msvc9compiler, 'winreg', _winreg) - hives = { - winreg.HKEY_CURRENT_USER: self.hkcu, - winreg.HKEY_LOCAL_MACHINE: self.hklm, - } +def mock_reg(hkcu=None, hklm=None): + """ + Return a mock for distutils.msvc9compiler.Reg, patched + to mock out the functions that access the registry. + """ - def read_keys(cls, base, key): - """Return list of registry keys.""" - hive = hives.get(base, {}) - return [k.rpartition('\\')[2] - for k in hive if k.startswith(key.lower())] + _winreg = getattr(distutils.msvc9compiler, '_winreg', None) + winreg = getattr(distutils.msvc9compiler, 'winreg', _winreg) - def read_values(cls, base, key): - """Return dict of registry keys and values.""" - hive = hives.get(base, {}) - return dict((k.rpartition('\\')[2], hive[k]) - for k in hive if k.startswith(key.lower())) + hives = { + winreg.HKEY_CURRENT_USER: hkcu or {}, + winreg.HKEY_LOCAL_MACHINE: hklm or {}, + } - distutils.msvc9compiler.Reg.read_keys = classmethod(read_keys) - distutils.msvc9compiler.Reg.read_values = classmethod(read_values) + @classmethod + def read_keys(cls, base, key): + """Return list of registry keys.""" + hive = hives.get(base, {}) + return [ + k.rpartition('\\')[2] + for k in hive if k.startswith(key.lower()) + ] - return self + @classmethod + def read_values(cls, base, key): + """Return dict of registry keys and values.""" + hive = hives.get(base, {}) + return dict( + (k.rpartition('\\')[2], hive[k]) + for k in hive if k.startswith(key.lower()) + ) - def __exit__(self, exc_type, exc_value, exc_tb): - distutils.msvc9compiler.Reg.read_keys = self.original_read_keys - distutils.msvc9compiler.Reg.read_values = self.original_read_values + return mock.patch.multiple(distutils.msvc9compiler.Reg, + read_keys=read_keys, read_values=read_values) class TestMSVC9Compiler: @@ -75,7 +69,7 @@ def test_find_vcvarsall_patch(self): # No registry entries or environment variable means we should # not find anything with contexts.environment(VS90COMNTOOLS=None): - with MockReg(): + with mock_reg(): assert find_vcvarsall(9.0) is None expected = distutils.errors.DistutilsPlatformError @@ -96,29 +90,33 @@ def test_find_vcvarsall_patch(self): open(mock_vcvarsall_bat_2, 'w').close() try: # Ensure we get the current user's setting first - with MockReg( - hkey_current_user={key_32: mock_installdir_1}, - hkey_local_machine={ + reg = mock_reg( + hkcu={ + key_32: mock_installdir_1, + }, + hklm={ key_32: mock_installdir_2, key_64: mock_installdir_2, - } - ): + }, + ) + with reg: assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) # Ensure we get the local machine value if it's there - with MockReg(hkey_local_machine={key_32: mock_installdir_2}): + with mock_reg(hklm={key_32: mock_installdir_2}): assert mock_vcvarsall_bat_2 == find_vcvarsall(9.0) # Ensure we prefer the 64-bit local machine key # (*not* the Wow6432Node key) - with MockReg( - hkey_local_machine={ + reg = mock_reg( + hklm={ # This *should* only exist on 32-bit machines key_32: mock_installdir_1, # This *should* only exist on 64-bit machines key_64: mock_installdir_2, } - ): + ) + with reg: assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) finally: shutil.rmtree(mock_installdir_1) From fb125b61118422a32af19e8cc88eccd13aed14f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:46:30 -0500 Subject: [PATCH 4754/8469] Split test into two --- setuptools/tests/test_msvc9compiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 9ed23e3886..02790ae7c2 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -77,6 +77,8 @@ def test_find_vcvarsall_patch(self): query_vcvarsall(9.0) assert 'aka.ms/vcpython27' in str(exc) + def test_find_vcvarsall_patch_2(self): + find_vcvarsall = distutils.msvc9compiler.find_vcvarsall key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' From 5485e8bacd95d03f1ee45343a1ae3afec2ecd882 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 13:49:15 -0500 Subject: [PATCH 4755/8469] Split the first test into two more tests. --- setuptools/tests/test_msvc9compiler.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 02790ae7c2..fd344678be 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -57,17 +57,21 @@ def read_values(cls, base, key): read_keys=read_keys, read_values=read_values) -class TestMSVC9Compiler: +class TestModulePatch: - def test_find_vcvarsall_patch(self): + def test_patched(self): + "Test the module is actually patched" mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ assert mod_name == "setuptools.msvc9_support", "find_vcvarsall unpatched" + def test_no_registry_entryies_means_nothing_found(self): + """ + No registry entries or environment variable should lead to an error + directing the user to download vcpython27. + """ find_vcvarsall = distutils.msvc9compiler.find_vcvarsall query_vcvarsall = distutils.msvc9compiler.query_vcvarsall - # No registry entries or environment variable means we should - # not find anything with contexts.environment(VS90COMNTOOLS=None): with mock_reg(): assert find_vcvarsall(9.0) is None From 2604aac7bb9e9b38546557fc2baaec98057d5740 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 14:22:33 -0500 Subject: [PATCH 4756/8469] Extract three more tests, using fixtures to unify the common aspects. --- setuptools/tests/test_msvc9compiler.py | 124 +++++++++++++++++-------- 1 file changed, 83 insertions(+), 41 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index fd344678be..918f889848 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -6,8 +6,7 @@ """ import os -import shutil -import tempfile +import contextlib import distutils.errors import pytest @@ -59,6 +58,9 @@ def read_values(cls, base, key): class TestModulePatch: + key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' + key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' + def test_patched(self): "Test the module is actually patched" mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ @@ -81,49 +83,89 @@ def test_no_registry_entryies_means_nothing_found(self): query_vcvarsall(9.0) assert 'aka.ms/vcpython27' in str(exc) - def test_find_vcvarsall_patch_2(self): - find_vcvarsall = distutils.msvc9compiler.find_vcvarsall - key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' - key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' - - # Make two mock files so we can tell whether HCKU entries are - # preferred to HKLM entries. - mock_installdir_1 = tempfile.mkdtemp() - mock_vcvarsall_bat_1 = os.path.join(mock_installdir_1, 'vcvarsall.bat') - open(mock_vcvarsall_bat_1, 'w').close() - mock_installdir_2 = tempfile.mkdtemp() - mock_vcvarsall_bat_2 = os.path.join(mock_installdir_2, 'vcvarsall.bat') - open(mock_vcvarsall_bat_2, 'w').close() - try: - # Ensure we get the current user's setting first + @pytest.yield_fixture + def user_preferred_setting(self): + """ + Set up environment with different install dirs for user vs. system + and yield the user_install_dir for the expected result. + """ + with self.mock_install_dir() as user_install_dir: + with self.mock_install_dir() as system_install_dir: + reg = mock_reg( + hkcu={ + self.key_32: user_install_dir, + }, + hklm={ + self.key_32: system_install_dir, + self.key_64: system_install_dir, + }, + ) + with reg: + yield user_install_dir + + def test_prefer_current_user(self, user_preferred_setting): + """ + Ensure user's settings are preferred. + """ + result = distutils.msvc9compiler.find_vcvarsall(9.0) + assert user_preferred_setting == result + + @pytest.yield_fixture + def local_machine_setting(self): + """ + Set up environment with only the system environment configured. + """ + with self.mock_install_dir() as system_install_dir: reg = mock_reg( - hkcu={ - key_32: mock_installdir_1, - }, hklm={ - key_32: mock_installdir_2, - key_64: mock_installdir_2, + self.key_32: system_install_dir, }, ) with reg: - assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) + yield system_install_dir - # Ensure we get the local machine value if it's there - with mock_reg(hklm={key_32: mock_installdir_2}): - assert mock_vcvarsall_bat_2 == find_vcvarsall(9.0) + def test_local_machine_recognized(self, local_machine_setting): + """ + Ensure machine setting is honored if user settings are not present. + """ + result = distutils.msvc9compiler.find_vcvarsall(9.0) + assert local_machine_setting == result - # Ensure we prefer the 64-bit local machine key - # (*not* the Wow6432Node key) - reg = mock_reg( - hklm={ - # This *should* only exist on 32-bit machines - key_32: mock_installdir_1, - # This *should* only exist on 64-bit machines - key_64: mock_installdir_2, - } - ) - with reg: - assert mock_vcvarsall_bat_1 == find_vcvarsall(9.0) - finally: - shutil.rmtree(mock_installdir_1) - shutil.rmtree(mock_installdir_2) + @pytest.yield_fixture + def x64_preferred_setting(self): + """ + Set up environment with 64-bit and 32-bit system settings configured + and yield the 64-bit location. + """ + with self.mock_install_dir() as x32_dir: + with self.mock_install_dir() as x64_dir: + reg = mock_reg( + hklm={ + # This *should* only exist on 32-bit machines + self.key_32: x32_dir, + # This *should* only exist on 64-bit machines + self.key_64: x64_dir, + }, + ) + with reg: + yield x64_dir + + def test_ensure_64_bit_preferred(self, x64_preferred_setting): + """ + Ensure 64-bit system key is preferred. + """ + result = distutils.msvc9compiler.find_vcvarsall(9.0) + assert x64_preferred_setting == result + + @staticmethod + @contextlib.contextmanager + def mock_install_dir(): + """ + Make a mock install dir in a unique location so that tests can + distinguish which dir was detected in a given scenario. + """ + with contexts.tempdir() as result: + vcvarsall = os.path.join(result, 'vcvarsall.bat') + with open(vcvarsall, 'w'): + pass + yield From 91754ae31f631bb8bf4e9717799730be07a6331b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 14:25:21 -0500 Subject: [PATCH 4757/8469] Move docstring to test class. --- setuptools/tests/test_msvc9compiler.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 918f889848..a0820fff91 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -1,8 +1,5 @@ -"""msvc9compiler monkey patch test - -This test ensures that importing setuptools is sufficient to replace -the standard find_vcvarsall function with our patched version that -finds the Visual C++ for Python package. +""" +Tests for msvc9compiler. """ import os @@ -57,6 +54,11 @@ def read_values(cls, base, key): class TestModulePatch: + """ + Ensure that importing setuptools is sufficient to replace + the standard find_vcvarsall function with a version that + recognizes the "Visual C++ for Python" package. + """ key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' From 95c31ede51c28ffe8432a2a51c9879a5ae8bf259 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 14:27:24 -0500 Subject: [PATCH 4758/8469] Update changelog --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1fd1fd4ac8..54368f02b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ CHANGES ======= ---- -next +10.2 ---- * Deprecated use of EntryPoint.load(require=False). From 27e9015a7d5043290fb1f04f5ad0582a294ee43b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 14:29:00 -0500 Subject: [PATCH 4759/8469] Added tag 10.2 for changeset 651d41db5884 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a4071fd761..374a25bc1e 100644 --- a/.hgtags +++ b/.hgtags @@ -179,3 +179,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 0c4d18a747a6d39bff8e194a58af949a960d674a 10.0 4c41e2cdd70beb0da556d71f46a67734c14f2bc2 10.0.1 26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1 +651d41db58849d4fc50e466f4dc458d448480c4e 10.2 From 0c8f0cb4bfe39fd7840c0242dd059269c0266445 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 14:29:29 -0500 Subject: [PATCH 4760/8469] Bumped to 10.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 62ead23a01..82e7963e24 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "10.2" +DEFAULT_VERSION = "10.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 6b917706c0..fb86d074b4 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '10.2' +__version__ = '10.3' From fb1b7680cee8b4e751b29f6d46a6fcedb51e4e31 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Fri, 2 Jan 2015 15:31:47 -0600 Subject: [PATCH 4761/8469] Fix regression in entry-point name parsing See #323 for more details. --- pkg_resources/__init__.py | 2 +- tests/test_pkg_resources.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a0b354ff55..ac3807d8a6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2280,7 +2280,7 @@ def require(self, env=None, installer=None): pattern = re.compile( r'\s*' - r'(?P[\w. -]+?)\s*' + r'(?P[+\w. -]+?)\s*' r'=\s*' r'(?P[\w.]+)\s*' r'(:\s*(?P[\w.]+))?\s*' diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 564d7cec4f..4dfd14b3be 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -109,3 +109,11 @@ def test_setuptools_not_imported(self): ) cmd = [sys.executable, '-c', '; '.join(lines)] subprocess.check_call(cmd) + + +class TestEntryPoint: + """Tests that ensure EntryPoint behaviour doesn't regress.""" + def test_accepts_old_entry_points(self): + """https://bitbucket.org/pypa/setuptools/issue/323/install-issues-with-102""" + entry_point_string = 'html+mako = mako.ext.pygmentplugin:MakoHtmlLexer' + pkg_resources.EntryPoint.parse(entry_point_string) From 1f953c4c2f954cc04df15a008cbd32e7bb1dfe04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 16:40:32 -0500 Subject: [PATCH 4762/8469] Update changelog. Fixes #323. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 54368f02b3..18d664b513 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +10.2.1 +------ + +* Issue #323: Fix regression in entry point name parsing. + ---- 10.2 ---- From ef428d7278002b558541300fb7b7a96c8dbac830 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 16:45:16 -0500 Subject: [PATCH 4763/8469] Move tests to be adjacent with other parsing tests. --- setuptools/tests/test_resources.py | 5 +++++ tests/test_pkg_resources.py | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index ecd45bcad9..94370ff1f6 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -250,6 +250,11 @@ def testParse(self): assert ep.attrs == ("foo",) assert ep.extras == () + # plus in the name + spec = "html+mako = mako.ext.pygmentplugin:MakoHtmlLexer" + ep = EntryPoint.parse(spec) + assert ep.name == 'html+mako' + def testRejects(self): for ep in [ "foo", "x=1=2", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2", diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 4dfd14b3be..564d7cec4f 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -109,11 +109,3 @@ def test_setuptools_not_imported(self): ) cmd = [sys.executable, '-c', '; '.join(lines)] subprocess.check_call(cmd) - - -class TestEntryPoint: - """Tests that ensure EntryPoint behaviour doesn't regress.""" - def test_accepts_old_entry_points(self): - """https://bitbucket.org/pypa/setuptools/issue/323/install-issues-with-102""" - entry_point_string = 'html+mako = mako.ext.pygmentplugin:MakoHtmlLexer' - pkg_resources.EntryPoint.parse(entry_point_string) From a1fab3a5fd6bc0ed9b40885fbcfe7ba199f95493 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 16:45:48 -0500 Subject: [PATCH 4764/8469] Bumped to 10.2.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 82e7963e24..7ca120d305 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "10.3" +DEFAULT_VERSION = "10.2.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index fb86d074b4..0e655f8acf 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '10.3' +__version__ = '10.2.1' From aeedadcf7c473f2f171dd9120d10996829144fe4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 16:46:00 -0500 Subject: [PATCH 4765/8469] Added tag 10.2.1 for changeset 1f5de53c079d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 374a25bc1e..388294a42e 100644 --- a/.hgtags +++ b/.hgtags @@ -180,3 +180,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 4c41e2cdd70beb0da556d71f46a67734c14f2bc2 10.0.1 26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1 651d41db58849d4fc50e466f4dc458d448480c4e 10.2 +1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 From 1ec7cafa9e8c8ea06adc582078444df886896830 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 16:46:29 -0500 Subject: [PATCH 4766/8469] Bumped to 10.2.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 7ca120d305..a9aae11f64 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "10.2.1" +DEFAULT_VERSION = "10.2.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 0e655f8acf..addf63a642 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '10.2.1' +__version__ = '10.2.2' From 654c26f78a3031c34b81f338d3b6d1a3a87c34da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 17:39:01 -0500 Subject: [PATCH 4767/8469] Removing shlib_test (apparently unused and broken). --- tests/shlib_test/hello.c | 168 --------------------------------- tests/shlib_test/hello.pyx | 4 - tests/shlib_test/hellolib.c | 3 - tests/shlib_test/setup.py | 10 -- tests/shlib_test/test_hello.py | 7 -- 5 files changed, 192 deletions(-) delete mode 100755 tests/shlib_test/hello.c delete mode 100755 tests/shlib_test/hello.pyx delete mode 100755 tests/shlib_test/hellolib.c delete mode 100755 tests/shlib_test/setup.py delete mode 100755 tests/shlib_test/test_hello.py diff --git a/tests/shlib_test/hello.c b/tests/shlib_test/hello.c deleted file mode 100755 index 9998372ccd..0000000000 --- a/tests/shlib_test/hello.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated by Pyrex 0.9.3 on Thu Jan 05 17:47:12 2006 */ - -#include "Python.h" -#include "structmember.h" -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif - - -typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ -static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/ -static int __Pyx_EndUnpack(PyObject *, int); /*proto*/ -static int __Pyx_PrintItem(PyObject *); /*proto*/ -static int __Pyx_PrintNewline(void); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static void __Pyx_ReRaise(void); /*proto*/ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ -static PyObject *__Pyx_GetExcValue(void); /*proto*/ -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ -static void __Pyx_WriteUnraisable(char *name); /*proto*/ -static void __Pyx_AddTraceback(char *funcname); /*proto*/ -static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ -static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/ -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ - -static PyObject *__pyx_m; -static PyObject *__pyx_b; -static int __pyx_lineno; -static char *__pyx_filename; -staticforward char **__pyx_f; - -/* Declarations from hello */ - -char (*(get_hello_msg(void))); /*proto*/ - -/* Implementation of hello */ - -static PyObject *__pyx_n_hello; - -static PyObject *__pyx_f_5hello_hello(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_5hello_hello(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - - /* "C:\cygwin\home\pje\setuptools\tests\shlib_test\hello.pyx":4 */ - __pyx_1 = PyString_FromString(get_hello_msg()); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("hello.hello"); - __pyx_r = 0; - __pyx_L0:; - return __pyx_r; -} - -static __Pyx_InternTabEntry __pyx_intern_tab[] = { - {&__pyx_n_hello, "hello"}, - {0, 0} -}; - -static struct PyMethodDef __pyx_methods[] = { - {"hello", (PyCFunction)__pyx_f_5hello_hello, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -DL_EXPORT(void) inithello(void); /*proto*/ -DL_EXPORT(void) inithello(void) { - __pyx_m = Py_InitModule4("hello", __pyx_methods, 0, 0, PYTHON_API_VERSION); - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; - __pyx_b = PyImport_AddModule("__builtin__"); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; - if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; - - /* "C:\cygwin\home\pje\setuptools\tests\shlib_test\hello.pyx":3 */ - return; - __pyx_L1:; - __Pyx_AddTraceback("hello"); -} - -static char *__pyx_filenames[] = { - "hello.pyx", -}; -statichere char **__pyx_f = __pyx_filenames; - -/* Runtime support code */ - -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { - while (t->p) { - *t->p = PyString_InternFromString(t->s); - if (!*t->p) - return -1; - ++t; - } - return 0; -} - -#include "compile.h" -#include "frameobject.h" -#include "traceback.h" - -static void __Pyx_AddTraceback(char *funcname) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyObject *py_globals = 0; - PyObject *empty_tuple = 0; - PyObject *empty_string = 0; - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - - py_srcfile = PyString_FromString(__pyx_filename); - if (!py_srcfile) goto bad; - py_funcname = PyString_FromString(funcname); - if (!py_funcname) goto bad; - py_globals = PyModule_GetDict(__pyx_m); - if (!py_globals) goto bad; - empty_tuple = PyTuple_New(0); - if (!empty_tuple) goto bad; - empty_string = PyString_FromString(""); - if (!empty_string) goto bad; - py_code = PyCode_New( - 0, /*int argcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ - empty_tuple, /*PyObject *consts,*/ - empty_tuple, /*PyObject *names,*/ - empty_tuple, /*PyObject *varnames,*/ - empty_tuple, /*PyObject *freevars,*/ - empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - __pyx_lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ - ); - if (!py_code) goto bad; - py_frame = PyFrame_New( - PyThreadState_Get(), /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - py_globals, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - py_frame->f_lineno = __pyx_lineno; - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - Py_XDECREF(empty_tuple); - Py_XDECREF(empty_string); - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} diff --git a/tests/shlib_test/hello.pyx b/tests/shlib_test/hello.pyx deleted file mode 100755 index 58ce6919a2..0000000000 --- a/tests/shlib_test/hello.pyx +++ /dev/null @@ -1,4 +0,0 @@ -cdef extern char *get_hello_msg() - -def hello(): - return get_hello_msg() diff --git a/tests/shlib_test/hellolib.c b/tests/shlib_test/hellolib.c deleted file mode 100755 index 88d65cee92..0000000000 --- a/tests/shlib_test/hellolib.c +++ /dev/null @@ -1,3 +0,0 @@ -extern char* get_hello_msg() { - return "Hello, world!"; -} diff --git a/tests/shlib_test/setup.py b/tests/shlib_test/setup.py deleted file mode 100755 index b0c93996f3..0000000000 --- a/tests/shlib_test/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -from setuptools import setup, Extension, Library - -setup( - name="shlib_test", - ext_modules = [ - Library("hellolib", ["hellolib.c"]), - Extension("hello", ["hello.pyx"], libraries=["hellolib"]) - ], - test_suite="test_hello.HelloWorldTest", -) diff --git a/tests/shlib_test/test_hello.py b/tests/shlib_test/test_hello.py deleted file mode 100755 index 6da02e31d4..0000000000 --- a/tests/shlib_test/test_hello.py +++ /dev/null @@ -1,7 +0,0 @@ -from unittest import TestCase - -class HelloWorldTest(TestCase): - def testHelloMsg(self): - from hello import hello - self.assertEqual(hello(), "Hello, world!") - From fef7cd3c41b12404da3790775474a5fef9a93fbb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 17:45:02 -0500 Subject: [PATCH 4768/8469] Should be sufficient to invoke ./bootstrap. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 004a97ebdf..3650e6b6c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,8 @@ python: - pypy # command to run tests script: - # invoke bootstrap and override egg_info based on setup.py in checkout + # update egg_info based on setup.py in checkout - python bootstrap.py - - python setup.py egg_info - python setup.py ptr --addopts='-rs' - python ez_setup.py --version 7.0 From 41f2c5ec8dd669747f3cfd8d6b2ae9a40d219545 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 17:47:29 -0500 Subject: [PATCH 4769/8469] Bump version loaded by ez_setup.py --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3650e6b6c3..0e648b3869 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ script: - python bootstrap.py - python setup.py ptr --addopts='-rs' - - python ez_setup.py --version 7.0 + - python ez_setup.py --version 10.2.1 From 07e879f2f26d85bbb5c7437e7b1ff714774b3ed3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 21:49:37 -0500 Subject: [PATCH 4770/8469] Add output to determine if egg-info is being created. --- bootstrap.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index cbc1ca9d68..919594f74f 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -28,8 +28,10 @@ """) def ensure_egg_info(): - if not os.path.exists('setuptools.egg-info'): - build_egg_info() + if os.path.exists('setuptools.egg-info'): + return + print("adding minimal entry_points") + build_egg_info() def build_egg_info(): From e0d05d467ffaae3eae7d8f23c8eb58775a4e5afa Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Fri, 2 Jan 2015 21:51:55 -0500 Subject: [PATCH 4771/8469] Upgrade packaging lib to 15.0 --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 58 +++++++++++++++---- pkg_resources/_vendor/packaging/version.py | 25 ++++++++ pkg_resources/_vendor/vendored.txt | 2 +- 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index d3e50f1e17..36f1a35c85 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "14.5" +__version__ = "15.0" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 8022578621..9ad0a635ed 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -458,21 +458,59 @@ def _compare_greater_than_equal(self, prospective, spec): @_require_version_compare def _compare_less_than(self, prospective, spec): - # Less than are defined as exclusive operators, this implies that - # pre-releases do not match for the same series as the spec. This is - # implemented by making V imply !=V.*. + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. spec = Version(spec) - return (prospective > spec - and self._get_operator("!=")(prospective, str(spec) + ".*")) + + # Check to see if the prospective version is greater than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective > spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a post-release version, that we do not accept + # post-release versions for the version mentioned in the specifier + # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). + if not spec.is_postrelease and prospective.is_postrelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # Ensure that we do not allow a local version of the version mentioned + # in the specifier, which is techincally greater than, to match. + if prospective.local is not None: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # greater than the spec version *and* it's not a pre-release of the + # same version in the spec. + return True def _compare_arbitrary(self, prospective, spec): return str(prospective).lower() == str(spec).lower() diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index 8d779a48d7..cf8afb16d6 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -95,6 +95,10 @@ def __repr__(self): def public(self): return self._version + @property + def base_version(self): + return self._version + @property def local(self): return None @@ -103,6 +107,10 @@ def local(self): def is_prerelease(self): return False + @property + def is_postrelease(self): + return False + _legacy_version_component_re = re.compile( r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, @@ -269,6 +277,19 @@ def __str__(self): def public(self): return str(self).split("+", 1)[0] + @property + def base_version(self): + parts = [] + + # Epoch + if self._version.epoch != 0: + parts.append("{0}!".format(self._version.epoch)) + + # Release segment + parts.append(".".join(str(x) for x in self._version.release)) + + return "".join(parts) + @property def local(self): version_string = str(self) @@ -279,6 +300,10 @@ def local(self): def is_prerelease(self): return bool(self._version.dev or self._version.pre) + @property + def is_postrelease(self): + return bool(self._version.post) + def _parse_letter_version(letter, number): if letter: diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 723e026b61..75a31670c6 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1 +1 @@ -packaging==14.5 +packaging==15.0 From 44d61f17fe8c04fc6046fe04a88a076a49ce6c2e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 21:57:30 -0500 Subject: [PATCH 4772/8469] Also print a message here --- bootstrap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap.py b/bootstrap.py index 919594f74f..60a1b88dad 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -45,6 +45,7 @@ def build_egg_info(): def run_egg_info(): + print("Regenerating egg_info") subprocess.check_call([sys.executable, 'setup.py', 'egg_info']) From 685922ef03d8357a94624b799824bde61d27a9eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:02:21 -0500 Subject: [PATCH 4773/8469] Try generating egg_info twice. --- bootstrap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index 60a1b88dad..70f962583d 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -45,8 +45,11 @@ def build_egg_info(): def run_egg_info(): + cmd = [sys.executable, 'setup.py', 'egg_info'] print("Regenerating egg_info") - subprocess.check_call([sys.executable, 'setup.py', 'egg_info']) + subprocess.check_call(cmd) + print("...and again.") + subprocess.check_call(cmd) if __name__ == '__main__': From 20628e6bfa410188168a972e08671e58f01dc0d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:20:30 -0500 Subject: [PATCH 4774/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 18d664b513..62ab43014e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +11.0 +---- + +* Interop #3: Upgrade to Packaging 15.0; updates to PEP 440 so that >1.7 does + not exclude 1.7.1 but does exclude 1.7.0 and 1.7.0.post1. + ------ 10.2.1 ------ From ae8816bb3febff152a08b7c80d0952059cd34b54 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:23:34 -0500 Subject: [PATCH 4775/8469] Add link support for Interopability bugs. --- linkify.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linkify.py b/linkify.py index 1d925abaa8..d845581ce0 100644 --- a/linkify.py +++ b/linkify.py @@ -14,6 +14,7 @@ r"Old Setuptools #(?P\d+)", r"Jython #(?P\d+)", r"Python #(?P\d+)", + r"Interop #(?P\d+)", ] issue_urls = dict( @@ -25,6 +26,7 @@ old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', jython='http://bugs.jython.org/issue{jython}', python='http://bugs.python.org/issue{python}', + interop='https://github.com/pypa/interoperability/issues/{interop}', ) From 8217189c27787731912e8c8281a7d713e8682095 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:27:51 -0500 Subject: [PATCH 4776/8469] Bumped to 11.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a9aae11f64..0466a6509b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "10.2.2" +DEFAULT_VERSION = "11.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index addf63a642..142093be57 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '10.2.2' +__version__ = '11.0' From 93c74ef3ff9d787ffff90d6aceb60fd6f334d618 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:27:52 -0500 Subject: [PATCH 4777/8469] Added tag 11.0 for changeset b4b92805bc0e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 388294a42e..8594f6ad38 100644 --- a/.hgtags +++ b/.hgtags @@ -181,3 +181,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1 651d41db58849d4fc50e466f4dc458d448480c4e 10.2 1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 +b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 From b76da40361a632e084ee556910fd392e679e31ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:28:31 -0500 Subject: [PATCH 4778/8469] Bumped to 11.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0466a6509b..740af722d5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.0" +DEFAULT_VERSION = "11.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 142093be57..1b1703fdb9 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.0' +__version__ = '11.1' From cf269fdecffcf8dc2f07fa1f3da383be6a336587 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 22:36:53 -0500 Subject: [PATCH 4779/8469] Correct project name --- linkify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkify.py b/linkify.py index d845581ce0..e7b3ca7be6 100644 --- a/linkify.py +++ b/linkify.py @@ -26,7 +26,7 @@ old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', jython='http://bugs.jython.org/issue{jython}', python='http://bugs.python.org/issue{python}', - interop='https://github.com/pypa/interoperability/issues/{interop}', + interop='https://github.com/pypa/interoperability-peps/issues/{interop}', ) From ba8336727d818011c3bdd19c02f0ad92f59a5c7a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 02:16:32 -0500 Subject: [PATCH 4780/8469] Moved TestScriptHeader tests to more appropriate module. --- setuptools/tests/test_easy_install.py | 70 ++++++++++++++++++++++++++- setuptools/tests/test_resources.py | 69 +------------------------- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 30789e8397..b8918b1732 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,3 +1,7 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# NOTE: the shebang and encoding lines are for TestScriptHeader do not remove + """Easy install Tests """ from __future__ import absolute_import @@ -16,10 +20,13 @@ import mock from setuptools import sandbox +from setuptools import compat from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import ( - easy_install, fix_jython_executable, get_script_args, nt_quote_arg) + easy_install, fix_jython_executable, get_script_args, nt_quote_arg, + get_script_header, +) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -414,3 +421,64 @@ def make_trivial_sdist(dist_path, setup_py): setup_py_file.size = len(setup_py_bytes.getvalue()) with tarfile_open(dist_path, 'w:gz') as dist: dist.addfile(setup_py_file, fileobj=setup_py_bytes) + + +class TestScriptHeader: + non_ascii_exe = '/Users/José/bin/python' + exe_with_spaces = r'C:\Program Files\Python33\python.exe' + + def test_get_script_header(self): + if not sys.platform.startswith('java') or not is_sh(sys.executable): + # This test is for non-Jython platforms + expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) + assert get_script_header('#!/usr/local/bin/python') == expected + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) + assert get_script_header('#!/usr/bin/python -x') == expected + candidate = get_script_header('#!/usr/bin/python', + executable=self.non_ascii_exe) + assert candidate == '#!%s -x\n' % self.non_ascii_exe + candidate = get_script_header('#!/usr/bin/python', + executable=self.exe_with_spaces) + assert candidate == '#!"%s"\n' % self.exe_with_spaces + + def test_get_script_header_jython_workaround(self): + # This test doesn't work with Python 3 in some locales + if compat.PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): + return + + class java: + class lang: + class System: + @staticmethod + def getProperty(property): + return "" + sys.modules["java"] = java + + platform = sys.platform + sys.platform = 'java1.5.0_13' + stdout, stderr = sys.stdout, sys.stderr + try: + # A mock sys.executable that uses a shebang line (this file) + exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') + assert ( + get_script_header('#!/usr/local/bin/python', executable=exe) + == + '#!/usr/bin/env %s\n' % exe + ) + + # Ensure we generate what is basically a broken shebang line + # when there's options, with a warning emitted + sys.stdout = sys.stderr = StringIO() + candidate = get_script_header('#!/usr/bin/python -x', + executable=exe) + assert candidate == '#!%s -x\n' % exe + assert 'Unable to adapt shebang line' in sys.stdout.getvalue() + sys.stdout = sys.stderr = StringIO() + candidate = get_script_header('#!/usr/bin/python', + executable=self.non_ascii_exe) + assert candidate == '#!%s -x\n' % self.non_ascii_exe + assert 'Unable to adapt shebang line' in sys.stdout.getvalue() + finally: + del sys.modules["java"] + sys.platform = platform + sys.stdout, sys.stderr = stdout, stderr diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 94370ff1f6..39d7ba4904 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -1,7 +1,3 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# NOTE: the shebang and encoding lines are for TestScriptHeader do not remove - import os import sys import tempfile @@ -16,9 +12,7 @@ packaging = pkg_resources.packaging -from setuptools.command.easy_install import (get_script_header, is_sh, - nt_quote_arg) -from setuptools.compat import StringIO, iteritems, PY3 +from setuptools.compat import iteritems def safe_repr(obj, short=False): """ copied from Python2.7""" @@ -560,67 +554,6 @@ def testVersionHashable(self): ) -class TestScriptHeader: - non_ascii_exe = '/Users/José/bin/python' - exe_with_spaces = r'C:\Program Files\Python33\python.exe' - - def test_get_script_header(self): - if not sys.platform.startswith('java') or not is_sh(sys.executable): - # This test is for non-Jython platforms - expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/local/bin/python') == expected - expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/bin/python -x') == expected - candidate = get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe) - assert candidate == '#!%s -x\n' % self.non_ascii_exe - candidate = get_script_header('#!/usr/bin/python', - executable=self.exe_with_spaces) - assert candidate == '#!"%s"\n' % self.exe_with_spaces - - def test_get_script_header_jython_workaround(self): - # This test doesn't work with Python 3 in some locales - if PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): - return - - class java: - class lang: - class System: - @staticmethod - def getProperty(property): - return "" - sys.modules["java"] = java - - platform = sys.platform - sys.platform = 'java1.5.0_13' - stdout, stderr = sys.stdout, sys.stderr - try: - # A mock sys.executable that uses a shebang line (this file) - exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') - assert ( - get_script_header('#!/usr/local/bin/python', executable=exe) - == - '#!/usr/bin/env %s\n' % exe - ) - - # Ensure we generate what is basically a broken shebang line - # when there's options, with a warning emitted - sys.stdout = sys.stderr = StringIO() - candidate = get_script_header('#!/usr/bin/python -x', - executable=exe) - assert candidate == '#!%s -x\n' % exe - assert 'Unable to adapt shebang line' in sys.stdout.getvalue() - sys.stdout = sys.stderr = StringIO() - candidate = get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe) - assert candidate == '#!%s -x\n' % self.non_ascii_exe - assert 'Unable to adapt shebang line' in sys.stdout.getvalue() - finally: - del sys.modules["java"] - sys.platform = platform - sys.stdout, sys.stderr = stdout, stderr - - class TestNamespaces: def setup_method(self, method): From 26a1521e870855ef89e6481f94293cded8237571 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 02:21:13 -0500 Subject: [PATCH 4781/8469] Remove remaining reference to setuptools from test_resources --- pkg_resources/__init__.py | 2 ++ setuptools/tests/test_resources.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ac3807d8a6..f004315a6b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -52,6 +52,8 @@ else: string_types = str, eval('unicode') +iteritems = (lambda i: i.items()) if PY3 else lambda i: i.iteritems() + # capture these to bypass sandboxing from os import utime try: diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 39d7ba4904..351549fab1 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -12,7 +12,6 @@ packaging = pkg_resources.packaging -from setuptools.compat import iteritems def safe_repr(obj, short=False): """ copied from Python2.7""" @@ -259,7 +258,7 @@ def testRejects(self): def checkSubMap(self, m): assert len(m) == len(self.submap_expect) - for key, ep in iteritems(self.submap_expect): + for key, ep in pkg_resources.iteritems(self.submap_expect): assert repr(m.get(key)) == repr(ep) submap_expect = dict( From d0a3a68d5192935730eeab840790f35af971086a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 02:29:01 -0500 Subject: [PATCH 4782/8469] Moved test_resources and test_pkg_resources to pkg_resources package. --- pkg_resources/tests/__init__.py | 0 {tests => pkg_resources/tests}/test_pkg_resources.py | 0 {setuptools => pkg_resources}/tests/test_resources.py | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 pkg_resources/tests/__init__.py rename {tests => pkg_resources/tests}/test_pkg_resources.py (100%) rename {setuptools => pkg_resources}/tests/test_resources.py (98%) diff --git a/pkg_resources/tests/__init__.py b/pkg_resources/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py similarity index 100% rename from tests/test_pkg_resources.py rename to pkg_resources/tests/test_pkg_resources.py diff --git a/setuptools/tests/test_resources.py b/pkg_resources/tests/test_resources.py similarity index 98% rename from setuptools/tests/test_resources.py rename to pkg_resources/tests/test_resources.py index 351549fab1..6cc3de0b93 100644 --- a/setuptools/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -206,13 +206,13 @@ class TestEntryPoints: def assertfields(self, ep): assert ep.name == "foo" - assert ep.module_name == "setuptools.tests.test_resources" + assert ep.module_name == "pkg_resources.tests.test_resources" assert ep.attrs == ("TestEntryPoints",) assert ep.extras == ("x",) assert ep.load() is TestEntryPoints assert ( str(ep) == - "foo = setuptools.tests.test_resources:TestEntryPoints [x]" + "foo = pkg_resources.tests.test_resources:TestEntryPoints [x]" ) def setup_method(self, method): @@ -221,13 +221,13 @@ def setup_method(self, method): def testBasics(self): ep = EntryPoint( - "foo", "setuptools.tests.test_resources", ["TestEntryPoints"], + "foo", "pkg_resources.tests.test_resources", ["TestEntryPoints"], ["x"], self.dist ) self.assertfields(ep) def testParse(self): - s = "foo = setuptools.tests.test_resources:TestEntryPoints [x]" + s = "foo = pkg_resources.tests.test_resources:TestEntryPoints [x]" ep = EntryPoint.parse(s, self.dist) self.assertfields(ep) From 8c34127f5050967ef4da9be21d7bc717a3d5cdd3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 02:41:47 -0500 Subject: [PATCH 4783/8469] Restore missing import --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b8918b1732..fc1a26d065 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -25,7 +25,7 @@ from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import ( easy_install, fix_jython_executable, get_script_args, nt_quote_arg, - get_script_header, + get_script_header, is_sh, ) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg From 4af0a332c3d292932998f2ae550abc7af95f1ede Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 02:48:22 -0500 Subject: [PATCH 4784/8469] Rewrite skip/xfail --- setuptools/tests/test_easy_install.py | 36 ++++++++++++++------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fc1a26d065..b364eca23a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -427,25 +427,27 @@ class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' exe_with_spaces = r'C:\Program Files\Python33\python.exe' + @pytest.mark.skipif( + sys.platform.startswith('java') and is_sh(sys.executable), + reason="Test cannot run under java when executable is sh" + ) def test_get_script_header(self): - if not sys.platform.startswith('java') or not is_sh(sys.executable): - # This test is for non-Jython platforms - expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/local/bin/python') == expected - expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/bin/python -x') == expected - candidate = get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe) - assert candidate == '#!%s -x\n' % self.non_ascii_exe - candidate = get_script_header('#!/usr/bin/python', - executable=self.exe_with_spaces) - assert candidate == '#!"%s"\n' % self.exe_with_spaces - + expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) + assert get_script_header('#!/usr/local/bin/python') == expected + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) + assert get_script_header('#!/usr/bin/python -x') == expected + candidate = get_script_header('#!/usr/bin/python', + executable=self.non_ascii_exe) + assert candidate == '#!%s -x\n' % self.non_ascii_exe + candidate = get_script_header('#!/usr/bin/python', + executable=self.exe_with_spaces) + assert candidate == '#!"%s"\n' % self.exe_with_spaces + + @pytest.mark.xfail( + compat.PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"), + reason="Test fails in this locale on Python 3" + ) def test_get_script_header_jython_workaround(self): - # This test doesn't work with Python 3 in some locales - if compat.PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"): - return - class java: class lang: class System: From f74153cd1cfee6bef9a8628937fa2eee7d2da4c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:01:02 -0500 Subject: [PATCH 4785/8469] Test is passing when LC_CTYPE isn't present. According to the original ticket, Distribute 103, this test was only failing for "C" and "POSIX", so only expect the failure there. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b364eca23a..834b83e4f7 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -444,7 +444,7 @@ def test_get_script_header(self): assert candidate == '#!"%s"\n' % self.exe_with_spaces @pytest.mark.xfail( - compat.PY3 and os.environ.get("LC_CTYPE") in (None, "C", "POSIX"), + compat.PY3 and os.environ.get("LC_CTYPE") in ("C", "POSIX"), reason="Test fails in this locale on Python 3" ) def test_get_script_header_jython_workaround(self): From 1434374b64408c1a21ce75de662ca2a65e72ab1c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:07:13 -0500 Subject: [PATCH 4786/8469] Use mock to patch sys.modules --- setuptools/tests/test_easy_install.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 834b83e4f7..a27fef1313 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -447,15 +447,9 @@ def test_get_script_header(self): compat.PY3 and os.environ.get("LC_CTYPE") in ("C", "POSIX"), reason="Test fails in this locale on Python 3" ) + @mock.patch.dict(sys.modules, java=mock.Mock(lang=mock.Mock(System= + mock.Mock(getProperty=mock.Mock(return_value=""))))) def test_get_script_header_jython_workaround(self): - class java: - class lang: - class System: - @staticmethod - def getProperty(property): - return "" - sys.modules["java"] = java - platform = sys.platform sys.platform = 'java1.5.0_13' stdout, stderr = sys.stdout, sys.stderr @@ -481,6 +475,5 @@ def getProperty(property): assert candidate == '#!%s -x\n' % self.non_ascii_exe assert 'Unable to adapt shebang line' in sys.stdout.getvalue() finally: - del sys.modules["java"] sys.platform = platform sys.stdout, sys.stderr = stdout, stderr From f3875aa79c616d605b86a7c60c35c627401a4953 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:10:21 -0500 Subject: [PATCH 4787/8469] Use mock to patch sys.platform --- setuptools/tests/test_easy_install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a27fef1313..cd02348001 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -449,9 +449,8 @@ def test_get_script_header(self): ) @mock.patch.dict(sys.modules, java=mock.Mock(lang=mock.Mock(System= mock.Mock(getProperty=mock.Mock(return_value=""))))) + @mock.patch('sys.platform', 'java1.5.0_13') def test_get_script_header_jython_workaround(self): - platform = sys.platform - sys.platform = 'java1.5.0_13' stdout, stderr = sys.stdout, sys.stderr try: # A mock sys.executable that uses a shebang line (this file) @@ -475,5 +474,4 @@ def test_get_script_header_jython_workaround(self): assert candidate == '#!%s -x\n' % self.non_ascii_exe assert 'Unable to adapt shebang line' in sys.stdout.getvalue() finally: - sys.platform = platform sys.stdout, sys.stderr = stdout, stderr From a1ef38f99bc7df9464c4a2bcb3c374a9c81da6d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:16:28 -0500 Subject: [PATCH 4788/8469] Use contexts.quiet for stdout/stderr trapping --- setuptools/tests/test_easy_install.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index cd02348001..f45e5c63ad 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -451,8 +451,7 @@ def test_get_script_header(self): mock.Mock(getProperty=mock.Mock(return_value=""))))) @mock.patch('sys.platform', 'java1.5.0_13') def test_get_script_header_jython_workaround(self): - stdout, stderr = sys.stdout, sys.stderr - try: + with contexts.quiet() as (stdout, stderr): # A mock sys.executable that uses a shebang line (this file) exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') assert ( @@ -463,15 +462,13 @@ def test_get_script_header_jython_workaround(self): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = sys.stderr = StringIO() candidate = get_script_header('#!/usr/bin/python -x', executable=exe) assert candidate == '#!%s -x\n' % exe - assert 'Unable to adapt shebang line' in sys.stdout.getvalue() - sys.stdout = sys.stderr = StringIO() + assert 'Unable to adapt shebang line' in stderr.getvalue() + + with contexts.quiet() as (stdout, stderr): candidate = get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) assert candidate == '#!%s -x\n' % self.non_ascii_exe - assert 'Unable to adapt shebang line' in sys.stdout.getvalue() - finally: - sys.stdout, sys.stderr = stdout, stderr + assert 'Unable to adapt shebang line' in stderr.getvalue() From 75501354959789632a7f133edc1fc90decf061c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:18:01 -0500 Subject: [PATCH 4789/8469] Pull logic out of the context --- setuptools/tests/test_easy_install.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f45e5c63ad..fac13104d3 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -451,14 +451,15 @@ def test_get_script_header(self): mock.Mock(getProperty=mock.Mock(return_value=""))))) @mock.patch('sys.platform', 'java1.5.0_13') def test_get_script_header_jython_workaround(self): + # A mock sys.executable that uses a shebang line (this file) + exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') + assert ( + get_script_header('#!/usr/local/bin/python', executable=exe) + == + '#!/usr/bin/env %s\n' % exe + ) + with contexts.quiet() as (stdout, stderr): - # A mock sys.executable that uses a shebang line (this file) - exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') - assert ( - get_script_header('#!/usr/local/bin/python', executable=exe) - == - '#!/usr/bin/env %s\n' % exe - ) # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted From 93847bd1cad5f5a058a18e06630ab0c22099677f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:19:39 -0500 Subject: [PATCH 4790/8469] Extract variable for clearer assertion. --- setuptools/tests/test_easy_install.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fac13104d3..befbd2fa60 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -453,11 +453,8 @@ def test_get_script_header(self): def test_get_script_header_jython_workaround(self): # A mock sys.executable that uses a shebang line (this file) exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') - assert ( - get_script_header('#!/usr/local/bin/python', executable=exe) - == - '#!/usr/bin/env %s\n' % exe - ) + header = get_script_header('#!/usr/local/bin/python', executable=exe) + assert header == '#!/usr/bin/env %s\n' % exe with contexts.quiet() as (stdout, stderr): From 63c14c76f8976864b90263da26eaa09f531e61b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:23:26 -0500 Subject: [PATCH 4791/8469] Rewrite comment --- setuptools/tests/test_easy_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index befbd2fa60..f93dbd4cd8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -457,9 +457,8 @@ def test_get_script_header_jython_workaround(self): assert header == '#!/usr/bin/env %s\n' % exe with contexts.quiet() as (stdout, stderr): - - # Ensure we generate what is basically a broken shebang line - # when there's options, with a warning emitted + # When options are included, generate a broken shebang line + # with a warning emitted candidate = get_script_header('#!/usr/bin/python -x', executable=exe) assert candidate == '#!%s -x\n' % exe From 29f9540d973d5e2f5dbc5dd631287b6f059c8630 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:35:38 -0500 Subject: [PATCH 4792/8469] Remove dependence of the script on its own file, but instead generate the necessary file in a temporary directory. --- setuptools/tests/test_easy_install.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f93dbd4cd8..cfc4d6bf28 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,6 +1,4 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# NOTE: the shebang and encoding lines are for TestScriptHeader do not remove +#! -*- coding: utf-8 -*- """Easy install Tests """ @@ -450,9 +448,17 @@ def test_get_script_header(self): @mock.patch.dict(sys.modules, java=mock.Mock(lang=mock.Mock(System= mock.Mock(getProperty=mock.Mock(return_value=""))))) @mock.patch('sys.platform', 'java1.5.0_13') - def test_get_script_header_jython_workaround(self): - # A mock sys.executable that uses a shebang line (this file) - exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') + def test_get_script_header_jython_workaround(self, tmpdir): + # Create a mock sys.executable that uses a shebang line + header = DALS(""" + #!/usr/bin/python + # -*- coding: utf-8 -*- + """) + exe = tmpdir / 'exe.py' + with exe.open('w') as f: + f.write(header) + exe = str(exe) + header = get_script_header('#!/usr/local/bin/python', executable=exe) assert header == '#!/usr/bin/env %s\n' % exe From a849ee957f3ba12945278f88e473eb3612faf4b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Jan 2015 03:39:21 -0500 Subject: [PATCH 4793/8469] It appears as if Python 2.6 gets its warnings on a different pipe. --- setuptools/tests/test_easy_install.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index cfc4d6bf28..042711786a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -462,16 +462,20 @@ def test_get_script_header_jython_workaround(self, tmpdir): header = get_script_header('#!/usr/local/bin/python', executable=exe) assert header == '#!/usr/bin/env %s\n' % exe + expect_out = 'stdout' if sys.version_info < (2,7) else 'stderr' + with contexts.quiet() as (stdout, stderr): # When options are included, generate a broken shebang line # with a warning emitted candidate = get_script_header('#!/usr/bin/python -x', executable=exe) assert candidate == '#!%s -x\n' % exe - assert 'Unable to adapt shebang line' in stderr.getvalue() + output = locals()[expect_out] + assert 'Unable to adapt shebang line' in output.getvalue() with contexts.quiet() as (stdout, stderr): candidate = get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) assert candidate == '#!%s -x\n' % self.non_ascii_exe - assert 'Unable to adapt shebang line' in stderr.getvalue() + output = locals()[expect_out] + assert 'Unable to adapt shebang line' in output.getvalue() From 9d6a6e5927ae0e67164383e419f3145fc154467e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 11:35:16 -0500 Subject: [PATCH 4794/8469] Use except/as, now supported by Python 2.6 --- pkg_resources/__init__.py | 10 ++++------ setuptools/command/easy_install.py | 12 ++++-------- setuptools/command/sdist.py | 3 ++- setuptools/command/upload_docs.py | 3 +-- setuptools/dist.py | 3 +-- setuptools/msvc9_support.py | 3 +-- setuptools/package_index.py | 15 +++++---------- setuptools/sandbox.py | 3 +-- setuptools/tests/test_packageindex.py | 12 ++++-------- setuptools/tests/test_sdist.py | 12 ++++-------- 10 files changed, 27 insertions(+), 49 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f004315a6b..41d3eb388a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -843,8 +843,7 @@ def find_plugins(self, plugin_env, full_env=None, installer=None, try: resolvees = shadow_set.resolve(req, env, installer) - except ResolutionError: - v = sys.exc_info()[1] + except ResolutionError as v: # save error info error_info[dist] = v if fallback: @@ -1340,8 +1339,8 @@ def is_invalid_marker(cls, text): """ try: cls.evaluate_marker(text) - except SyntaxError: - return cls.normalize_exception(sys.exc_info()[1]) + except SyntaxError as e: + return cls.normalize_exception(e) return False @staticmethod @@ -1456,8 +1455,7 @@ def _markerlib_evaluate(cls, text): env[new_key] = env.pop(key) try: result = _markerlib.interpret(text, env) - except NameError: - e = sys.exc_info()[1] + except NameError as e: raise SyntaxError(e.args[0]) return result diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 1a2f56ae60..02ce7636dc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -698,13 +698,11 @@ def process_distribution(self, requirement, dist, deps=True, *info): distros = WorkingSet([]).resolve( [requirement], self.local_index, self.easy_install ) - except DistributionNotFound: - e = sys.exc_info()[1] + except DistributionNotFound as e: raise DistutilsError( "Could not find required distribution %s" % e.args ) - except VersionConflict: - e = sys.exc_info()[1] + except VersionConflict as e: raise DistutilsError( "Installed distribution %s conflicts with requirement %s" % e.args @@ -1044,8 +1042,7 @@ def run_setup(self, setup_script, setup_base, args): ) try: run_setup(setup_script, args) - except SystemExit: - v = sys.exc_info()[1] + except SystemExit as v: raise DistutilsError("Setup script exited with %s" % (v.args[0],)) def build_and_install(self, setup_script, setup_base): @@ -1889,8 +1886,7 @@ def chmod(path, mode): log.debug("changing mode of %s to %o", path, mode) try: _chmod(path, mode) - except os.error: - e = sys.exc_info()[1] + except os.error as e: log.debug("chmod failed: %s", e) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 3d33df80ee..851a177524 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -70,7 +70,8 @@ def __read_template_hack(self): try: orig.sdist.read_template(self) except: - sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() + _, _, tb = sys.exc_info() + tb.tb_next.tb_frame.f_locals['template'].close() raise # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index cd6c300c9f..001ee936e4 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -169,8 +169,7 @@ def upload_file(self, filename): conn.putheader('Authorization', auth) conn.endheaders() conn.send(body) - except socket.error: - e = sys.exc_info()[1] + except socket.error as e: self.announce(str(e), log.ERROR) return diff --git a/setuptools/dist.py b/setuptools/dist.py index eb14644488..1917a610e3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -131,8 +131,7 @@ def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: pkg_resources.EntryPoint.parse_map(value) - except ValueError: - e = sys.exc_info()[1] + except ValueError as e: raise DistutilsSetupError(e) def check_test_suite(dist, attr, value): diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index d0be70e2a9..e76d70f079 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -50,8 +50,7 @@ def find_vcvarsall(version): def query_vcvarsall(version, *args, **kwargs): try: return unpatched['query_vcvarsall'](version, *args, **kwargs) - except distutils.errors.DistutilsPlatformError: - exc = sys.exc_info()[1] + except distutils.errors.DistutilsPlatformError as exc: if exc and "vcvarsall.bat" in exc.args[0]: message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0]) if int(version) == 9: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 58572ce663..5ed19130d7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -699,25 +699,21 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url, self.opener) - except (ValueError, httplib.InvalidURL): - v = sys.exc_info()[1] + except (ValueError, httplib.InvalidURL) as v: msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) else: raise DistutilsError('%s %s' % (url, msg)) - except urllib2.HTTPError: - v = sys.exc_info()[1] + except urllib2.HTTPError as v: return v - except urllib2.URLError: - v = sys.exc_info()[1] + except urllib2.URLError as v: if warning: self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) - except httplib.BadStatusLine: - v = sys.exc_info()[1] + except httplib.BadStatusLine as v: if warning: self.warn(warning, v.line) else: @@ -726,8 +722,7 @@ def open_url(self, url, warning=None): 'down, %s' % (url, v.line) ) - except httplib.HTTPException: - v = sys.exc_info()[1] + except httplib.HTTPException as v: if warning: self.warn(warning, v) else: diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index b90d1e1bb6..7971f42c1c 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -199,8 +199,7 @@ def runner(): ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) DirectorySandbox(setup_dir).run(runner) - except SystemExit: - v = sys.exc_info()[1] + except SystemExit as v: if v.args and v.args[0]: raise # Normal exit, just return diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 3e9d1d84e9..dcd90d6fe7 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -15,8 +15,7 @@ def test_bad_url_bad_port(self): url = 'http://127.0.0.1:0/nonesuch/test_package_index' try: v = index.open_url(url) - except Exception: - v = sys.exc_info()[1] + except Exception as v: assert url in str(v) else: assert isinstance(v, HTTPError) @@ -32,8 +31,7 @@ def test_bad_url_typo(self): url = 'url:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunk' try: v = index.open_url(url) - except Exception: - v = sys.exc_info()[1] + except Exception as v: assert url in str(v) else: assert isinstance(v, HTTPError) @@ -50,8 +48,7 @@ def _urlopen(*args): url = 'http://example.com' try: v = index.open_url(url) - except Exception: - v = sys.exc_info()[1] + except Exception as v: assert 'line' in str(v) else: raise AssertionError('Should have raise here!') @@ -68,8 +65,7 @@ def test_bad_url_double_scheme(self): url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk' try: index.open_url(url) - except distutils.errors.DistutilsError: - error = sys.exc_info()[1] + except distutils.errors.DistutilsError as error: msg = unicode(error) assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg or 'Name or service not known' in msg return diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 943a5deec5..68f83ca79b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -174,8 +174,7 @@ def test_manifest_is_written_with_utf8_encoding(self): # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The manifest should contain the UTF-8 filename @@ -217,8 +216,7 @@ def test_write_manifest_allows_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The manifest should contain the UTF-8 filename @@ -258,8 +256,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The Latin-1 filename should have been skipped @@ -328,8 +325,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): with quiet(): try: cmd.read_manifest() - except UnicodeDecodeError: - e = sys.exc_info()[1] + except UnicodeDecodeError as e: self.fail(e) # The Latin-1 filename should have been skipped From 0a8b9a3152c736d8e2f8a01f5a9547546b907de7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 11:55:34 -0500 Subject: [PATCH 4795/8469] And again in doctest --- pkg_resources/api_tests.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 50e04b8737..a6c25a378f 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -210,8 +210,7 @@ working set triggers a ``pkg_resources.VersionConflict`` error: >>> try: ... ws.find(Requirement.parse("Bar==1.0")) - ... except pkg_resources.VersionConflict: - ... exc = sys.exc_info()[1] + ... except pkg_resources.VersionConflict as exc: ... print(str(exc)) ... else: ... raise AssertionError("VersionConflict was not raised") From 3593a64ed6755876702ce362e1dfc87849c0952b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:09:27 -0500 Subject: [PATCH 4796/8469] Skip integration tests when one of the packages under test is already installed, as the installation will fail in that case. --- setuptools/tests/test_integration.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 3a6abeaa44..92a27080f9 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -14,6 +14,17 @@ from setuptools.dist import Distribution +def setup_module(module): + packages = 'stevedore', 'virtualenvwrapper', 'pbr', 'novaclient' + for pkg in packages: + try: + __import__(pkg) + tmpl = "Integration tests cannot run when {pkg} is installed" + pytest.skip(tmpl.format(**locals())) + except ImportError: + pass + + @pytest.fixture def install_context(request, tmpdir, monkeypatch): """Fixture to set up temporary installation directory. From fba8ee7abecb12726293438e8af19d7c3fa54bb8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:22:53 -0500 Subject: [PATCH 4797/8469] Remove try/except/fail - Exceptions are failures by default. --- pkg_resources/tests/test_resources.py | 6 ++---- setuptools/tests/test_easy_install.py | 12 +++--------- setuptools/tests/test_sandbox.py | 6 ++---- setuptools/tests/test_sdist.py | 20 ++++---------------- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 6cc3de0b93..82a987b7a2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -593,10 +593,8 @@ def test_two_levels_deep(self): pkg2_init.close() import pkg1 assert "pkg1" in pkg_resources._namespace_packages - try: - import pkg1.pkg2 - except ImportError: - self.fail("Setuptools tried to import the parent namespace package") + # attempt to import pkg2 from site-pkgs2 + import pkg1.pkg2 # check the _namespace_packages dict assert "pkg1.pkg2" in pkg_resources._namespace_packages assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"] diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 042711786a..7baa989a31 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -250,8 +250,6 @@ def test_setup_requires(self): with contexts.quiet(): with self.patched_setup_context(): run_setup(test_setup_py, ['install']) - except SandboxViolation: - self.fail('Installation caused SandboxViolation') except IndexError: # Test fails in some cases due to bugs in Python # See https://bitbucket.org/pypa/setuptools/issue/201 @@ -353,13 +351,9 @@ def test_setup_requires_overrides_version_conflict(self): test_pkg = create_setup_requires_package(temp_dir) test_setup_py = os.path.join(test_pkg, 'setup.py') with contexts.quiet() as (stdout, stderr): - try: - # Don't even need to install the package, just - # running the setup.py at all is sufficient - run_setup(test_setup_py, ['--name']) - except VersionConflict: - self.fail('Installing setup.py requirements ' - 'caused a VersionConflict') + # Don't even need to install the package, just + # running the setup.py at all is sufficient + run_setup(test_setup_py, ['--name']) lines = stdout.readlines() assert len(lines) > 0 diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 6e5ce04a47..cadc4812a7 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -33,10 +33,8 @@ def test_win32com(self, tmpdir): target = os.path.join(gen_py, 'test_write') sandbox = DirectorySandbox(str(tmpdir)) try: - try: - sandbox.run(self._file_writer(target)) - except SandboxViolation: - self.fail("Could not create gen_py file due to SandboxViolation") + # attempt to create gen_py file + sandbox.run(self._file_writer(target)) finally: if os.path.exists(target): os.remove(target) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 68f83ca79b..d3494d7a69 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -172,10 +172,7 @@ def test_manifest_is_written_with_utf8_encoding(self): manifest.close() # The manifest should be UTF-8 encoded - try: - u_contents = contents.decode('UTF-8') - except UnicodeDecodeError as e: - self.fail(e) + u_contents = contents.decode('UTF-8') # The manifest should contain the UTF-8 filename if PY2: @@ -214,10 +211,7 @@ def test_write_manifest_allows_utf8_filenames(self): manifest.close() # The manifest should be UTF-8 encoded - try: - contents.decode('UTF-8') - except UnicodeDecodeError as e: - self.fail(e) + contents.decode('UTF-8') # The manifest should contain the UTF-8 filename assert posix(filename) in contents @@ -254,10 +248,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): manifest.close() # The manifest should be UTF-8 encoded - try: - contents.decode('UTF-8') - except UnicodeDecodeError as e: - self.fail(e) + contents.decode('UTF-8') # The Latin-1 filename should have been skipped assert posix(filename) not in contents @@ -323,10 +314,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): # Re-read manifest cmd.filelist.files = [] with quiet(): - try: - cmd.read_manifest() - except UnicodeDecodeError as e: - self.fail(e) + cmd.read_manifest() # The Latin-1 filename should have been skipped filename = filename.decode('latin-1') From db8efa2a8141205c405cd36f8c8a1aa0b1b7defa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:25:38 -0500 Subject: [PATCH 4798/8469] Extract variable --- pkg_resources/tests/test_resources.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 82a987b7a2..fbb9db62ea 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -210,10 +210,8 @@ def assertfields(self, ep): assert ep.attrs == ("TestEntryPoints",) assert ep.extras == ("x",) assert ep.load() is TestEntryPoints - assert ( - str(ep) == - "foo = pkg_resources.tests.test_resources:TestEntryPoints [x]" - ) + expect = "foo = pkg_resources.tests.test_resources:TestEntryPoints [x]" + assert str(ep) == expect def setup_method(self, method): self.dist = Distribution.from_filename( From d8de6c98d879adbe5b8df731a5b61c06a48b9a2f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:43:13 -0500 Subject: [PATCH 4799/8469] Add another assertion on the exception. --- pkg_resources/tests/test_resources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index fbb9db62ea..cf16bf0359 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -172,9 +172,12 @@ def testResolve(self): # Activation list now includes resolved dependency assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) ==[Foo,Baz] # Requests for conflicting versions produce VersionConflict - with pytest.raises(VersionConflict): + with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) + msg = 'Foo 0.9 is installed but Foo==1.2 is required by []' + assert str(vc).endswith(msg) + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 From 06b95e98f06916ccbd04b60e9d3866e3d6bf7ae2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:44:16 -0500 Subject: [PATCH 4800/8469] Remove unreachable branch --- pkg_resources/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 41d3eb388a..bcee9d285c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -627,8 +627,7 @@ def find(self, req): if dist is not None and dist not in req: # XXX add more info raise VersionConflict(dist, req) - else: - return dist + return dist def iter_entry_points(self, group, name=None): """Yield entry point objects from `group` matching `name` From 880ccea0220509bfaf483a50beefc128299a5b03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:00:50 -0500 Subject: [PATCH 4801/8469] Add test for WorkingSet.find() when a conflict occurs. --- pkg_resources/tests/test_resources.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index cf16bf0359..79961e6c32 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -205,6 +205,22 @@ def testDistroDependsOptions(self): d.requires(["foo"]) +class TestWorkingSet: + def test_find_conflicting(self): + ws = WorkingSet([]) + Foo = Distribution.from_filename("/foo_dir/Foo-1.2.egg") + ws.add(Foo) + + # create a requirement that conflicts with Foo 1.2 + req = next(parse_requirements("Foo<1.2")) + + with pytest.raises(VersionConflict) as vc: + ws.find(req) + + msg = 'Foo 1.2 is installed but Foo<1.2 is required' + assert str(vc).endswith(msg) + + class TestEntryPoints: def assertfields(self, ep): From 23d5e4a81a61c5e6617fa69fd0b2bc440fa20c45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:25:28 -0500 Subject: [PATCH 4802/8469] Test the report method --- pkg_resources/__init__.py | 33 +++++++++++++++++++++++---- pkg_resources/tests/test_resources.py | 6 ++--- setuptools/command/easy_install.py | 5 +--- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index bcee9d285c..0846c0acb8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -317,8 +317,34 @@ class ResolutionError(Exception): def __repr__(self): return self.__class__.__name__+repr(self.args) + class VersionConflict(ResolutionError): - """An already-installed version conflicts with the requested version""" + """ + An already-installed version conflicts with the requested version. + + Should be initialized with the installed Distribution, the requested + Requirement, and optionally a list of dists that required the installed + Distribution. + """ + + @property + def dist(self): + return self.args[0] + + @property + def req(self): + return self.args[1] + + @property + def required_by(self): + return self.args[2] if len(self.args) > 2 else [] + + def report(self): + template = "{self.dist} is installed but {self.req} is required" + if self.required_by: + template += " by {self.required_by}" + return template.format(**locals()) + class DistributionNotFound(ResolutionError): """A requested distribution was not found""" @@ -763,9 +789,8 @@ def resolve(self, requirements, env=None, installer=None, to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency - tmpl = "%s is installed but %s is required by %s" - args = dist, req, list(required_by.get(req, [])) - raise VersionConflict(tmpl % args) + dependent_req = list(required_by.get(req, [])) + raise VersionConflict(dist, req, dependent_req) # push the new requirements onto the stack new_requirements = dist.requires(req.extras)[::-1] diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 79961e6c32..5cf3a6579f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -175,8 +175,8 @@ def testResolve(self): with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) - msg = 'Foo 0.9 is installed but Foo==1.2 is required by []' - assert str(vc).endswith(msg) + msg = 'Foo 0.9 is installed but Foo==1.2 is required' + assert vc.value.report() == msg def testDistroDependsOptions(self): d = self.distRequires(""" @@ -218,7 +218,7 @@ def test_find_conflicting(self): ws.find(req) msg = 'Foo 1.2 is installed but Foo<1.2 is required' - assert str(vc).endswith(msg) + assert vc.value.report() == msg class TestEntryPoints: diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 02ce7636dc..d05f4c65af 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -703,10 +703,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): "Could not find required distribution %s" % e.args ) except VersionConflict as e: - raise DistutilsError( - "Installed distribution %s conflicts with requirement %s" - % e.args - ) + raise DistutilsError(e.report()) if self.always_copy or self.always_copy_from: # Force all the relevant distros to be copied or activated for dist in distros: From ddb012669aa26fffd6791283e6405fa34bf9f0e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:39:31 -0500 Subject: [PATCH 4803/8469] Split out ContextualVersionConflict --- pkg_resources/__init__.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0846c0acb8..277da3f948 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -322,11 +322,12 @@ class VersionConflict(ResolutionError): """ An already-installed version conflicts with the requested version. - Should be initialized with the installed Distribution, the requested - Requirement, and optionally a list of dists that required the installed - Distribution. + Should be initialized with the installed Distribution and the requested + Requirement. """ + _template = "{self.dist} is installed but {self.req} is required" + @property def dist(self): return self.args[0] @@ -335,15 +336,21 @@ def dist(self): def req(self): return self.args[1] + def report(self): + return self._template.format(**locals()) + + +class ContextualVersionConflict(VersionConflict): + """ + A VersionConflict that accepts a third parameter, the list of the + requirements that required the installed Distribution. + """ + + _template = VersionConflict._template + ' by {self.required_by}' + @property def required_by(self): - return self.args[2] if len(self.args) > 2 else [] - - def report(self): - template = "{self.dist} is installed but {self.req} is required" - if self.required_by: - template += " by {self.required_by}" - return template.format(**locals()) + return self.args[2] class DistributionNotFound(ResolutionError): @@ -790,7 +797,7 @@ def resolve(self, requirements, env=None, installer=None, if dist not in req: # Oops, the "best" so far conflicts with a dependency dependent_req = list(required_by.get(req, [])) - raise VersionConflict(dist, req, dependent_req) + raise ContextualVersionConflict(dist, req, dependent_req) # push the new requirements onto the stack new_requirements = dist.requires(req.extras)[::-1] From a7ae16215eab4487954d546f583e30869696adfc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:41:29 -0500 Subject: [PATCH 4804/8469] No need to mutate the set to a list; just use the set. --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 277da3f948..522247e06c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -342,7 +342,7 @@ def report(self): class ContextualVersionConflict(VersionConflict): """ - A VersionConflict that accepts a third parameter, the list of the + A VersionConflict that accepts a third parameter, the set of the requirements that required the installed Distribution. """ @@ -796,7 +796,7 @@ def resolve(self, requirements, env=None, installer=None, to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency - dependent_req = list(required_by.get(req, [])) + dependent_req = required_by[req] raise ContextualVersionConflict(dist, req, dependent_req) # push the new requirements onto the stack From 0529be8ca5487513336da8fd35108c52aa95e582 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:58:33 -0500 Subject: [PATCH 4805/8469] Only raise a ContextualVersionConflict when dependent requirements are present. --- pkg_resources/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 522247e06c..d51f301bf3 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -339,6 +339,16 @@ def req(self): def report(self): return self._template.format(**locals()) + def with_context(self, required_by): + """ + If required_by is non-empty, return a version of self that is a + ContextualVersionConflict. + """ + if not required_by: + return self + args = self.args + (required_by,) + return ContextualVersionConflict(*args) + class ContextualVersionConflict(VersionConflict): """ @@ -797,7 +807,7 @@ def resolve(self, requirements, env=None, installer=None, if dist not in req: # Oops, the "best" so far conflicts with a dependency dependent_req = required_by[req] - raise ContextualVersionConflict(dist, req, dependent_req) + raise VersionConflict(dist, req).with_context(dependent_req) # push the new requirements onto the stack new_requirements = dist.requires(req.extras)[::-1] From 72e3a1ce5986c54fed71da1f65aed4022008511f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:13:05 -0500 Subject: [PATCH 4806/8469] Normalize whitespace --- pkg_resources/tests/test_resources.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 5cf3a6579f..13ed4eb19e 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -23,21 +23,23 @@ def safe_repr(obj, short=False): return result return result[:pkg_resources._MAX_LENGTH] + ' [truncated]...' + class Metadata(pkg_resources.EmptyProvider): """Mock object to return metadata as if from an on-disk distribution""" - def __init__(self,*pairs): + def __init__(self, *pairs): self.metadata = dict(pairs) - def has_metadata(self,name): + def has_metadata(self, name): return name in self.metadata - def get_metadata(self,name): + def get_metadata(self, name): return self.metadata[name] - def get_metadata_lines(self,name): + def get_metadata_lines(self, name): return pkg_resources.yield_lines(self.get_metadata(name)) + dist_from_fn = pkg_resources.Distribution.from_filename class TestDistro: From cdb9797a1107afd4d7baf021b2af84946d349a2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:24:22 -0500 Subject: [PATCH 4807/8469] Add test capturing expectation when dependencies conflict during resolve. Fixes #281 --- pkg_resources/tests/test_resources.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 13ed4eb19e..7ba65786ed 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -222,6 +222,31 @@ def test_find_conflicting(self): msg = 'Foo 1.2 is installed but Foo<1.2 is required' assert vc.value.report() == msg + def test_resolve_conflicts_with_prior(self): + """ + A ContextualVersionConflict should be raised when a requirement + conflicts with a prior requirement for a different package. + """ + # Create installation where Foo depends on Baz 1.0 and Bar depends on + # Baz 2.0. + ws = WorkingSet([]) + md = Metadata(('depends.txt', "Baz==1.0")) + Foo = Distribution.from_filename("/foo_dir/Foo-1.0.egg", metadata=md) + ws.add(Foo) + md = Metadata(('depends.txt', "Baz==2.0")) + Bar = Distribution.from_filename("/foo_dir/Bar-1.0.egg", metadata=md) + ws.add(Bar) + Baz = Distribution.from_filename("/foo_dir/Baz-1.0.egg") + ws.add(Baz) + Baz = Distribution.from_filename("/foo_dir/Baz-2.0.egg") + ws.add(Baz) + + with pytest.raises(VersionConflict) as vc: + ws.resolve(parse_requirements("Foo\nBar\n")) + + msg = "Baz 1.0 is installed but Baz==2.0 is required by {'Bar'}" + assert vc.value.report() == msg + class TestEntryPoints: From 0b7d713f812e7d84f143bd84f0734ae77169bb68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:28:07 -0500 Subject: [PATCH 4808/8469] Fix test failure on Python 2 --- pkg_resources/tests/test_resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7ba65786ed..f252ddff0e 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -245,6 +245,8 @@ def test_resolve_conflicts_with_prior(self): ws.resolve(parse_requirements("Foo\nBar\n")) msg = "Baz 1.0 is installed but Baz==2.0 is required by {'Bar'}" + if pkg_resources.PY2: + msg = msg.replace("{'Bar'}", "set(['Bar'])") assert vc.value.report() == msg From 9974d0bd67352392328a3dda07699e80cc90596c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:35:30 -0500 Subject: [PATCH 4809/8469] Update changelog --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 62ab43014e..8fc9e981ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,17 @@ CHANGES ======= +---- +11.1 +---- + +* Issue #281: Since Setuptools 6.1 (Issue #268), a ValueError would be raised + in certain cases where VersionConflict was raised with two arguments, which + occurred in ``pkg_resources.WorkingSet.find``. This release adds support + for indicating the dependent packages while maintaining support for + a VersionConflict when no dependent package context is known. New unit tests + now capture the expected interface. + ---- 11.0 ---- From 89591dcd22840ab6e38a484ca5864c8e1d728223 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:36:22 -0500 Subject: [PATCH 4810/8469] Added tag 11.1 for changeset 6cd2b18f4be2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8594f6ad38..021c8ff463 100644 --- a/.hgtags +++ b/.hgtags @@ -182,3 +182,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 651d41db58849d4fc50e466f4dc458d448480c4e 10.2 1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 +6cd2b18f4be2a9c188fa505b34505b32f4a4554b 11.1 From 3e33c18af2c26a9b01383647157f4c1da275f67f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:36:52 -0500 Subject: [PATCH 4811/8469] Bumped to 11.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 740af722d5..388ff490d7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.1" +DEFAULT_VERSION = "11.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 1b1703fdb9..a6fd3e36a9 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.1' +__version__ = '11.2' From 371c355c4f8b406e0390bf964bb4d7f4266ba3e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 14:40:47 -0500 Subject: [PATCH 4812/8469] Remove references to removed files --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index ed60948bf9..428bbd1e15 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ recursive-include setuptools *.py *.exe *.xml -recursive-include tests *.py *.c *.pyx +recursive-include tests *.py recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html recursive-include _markerlib *.py From 76dd319a776b3fb7bc7836eb18429ab407379ea9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 15:35:24 -0500 Subject: [PATCH 4813/8469] Reuse list2cmdline for argument quoting. --- setuptools/command/easy_install.py | 32 ++---------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d05f4c65af..c68fe7577b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -35,6 +35,7 @@ import site import struct import contextlib +import subprocess from setuptools import Command from setuptools.sandbox import run_setup @@ -1825,36 +1826,7 @@ def is_sh(executable): def nt_quote_arg(arg): """Quote a command line argument according to Windows parsing rules""" - - result = [] - needquote = False - nb = 0 - - needquote = (" " in arg) or ("\t" in arg) - if needquote: - result.append('"') - - for c in arg: - if c == '\\': - nb += 1 - elif c == '"': - # double preceding backslashes, then add a \" - result.append('\\' * (nb * 2) + '\\"') - nb = 0 - else: - if nb: - result.append('\\' * nb) - nb = 0 - result.append(c) - - if nb: - result.append('\\' * nb) - - if needquote: - result.append('\\' * nb) # double the trailing backslashes - result.append('"') - - return ''.join(result) + return subprocess.list2cmdline([arg]) def is_python_script(script_text, filename): From 4108a12a41f3c413f2ea5e8ede3075d67067cba5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 15:49:50 -0500 Subject: [PATCH 4814/8469] Extract method for getting script args --- setuptools/command/easy_install.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c68fe7577b..4e05d6707a 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1904,15 +1904,19 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): """ Yield write_script() argument tuples for a distribution's entrypoints """ - gen_class = cls.get_writer(wininst) - spec = str(dist.as_requirement()) + writer = cls.get_writer(wininst) header = get_script_header("", executable, wininst) + return cls._gen_args(dist, writer, header) + + @classmethod + def _gen_args(cls, dist, writer, header): + spec = str(dist.as_requirement()) for type_ in 'console', 'gui': group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): - script_text = gen_class.template % locals() - for res in gen_class._get_script_args(type_, name, header, - script_text): + script_text = writer.template % locals() + for res in writer._get_script_args(type_, name, header, + script_text): yield res @classmethod From d7cb597b9697e11d3f13e46d6af787ffc82571d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 15:56:19 -0500 Subject: [PATCH 4815/8469] No need to pass the writer - just invoke it directly. --- setuptools/command/easy_install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4e05d6707a..d5d518de1d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1906,16 +1906,16 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): """ writer = cls.get_writer(wininst) header = get_script_header("", executable, wininst) - return cls._gen_args(dist, writer, header) + return writer._gen_args(dist, header) @classmethod - def _gen_args(cls, dist, writer, header): + def _gen_args(cls, dist, header): spec = str(dist.as_requirement()) for type_ in 'console', 'gui': group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): - script_text = writer.template % locals() - for res in writer._get_script_args(type_, name, header, + script_text = cls.template % locals() + for res in cls._get_script_args(type_, name, header, script_text): yield res From aabff23148950b34d1f956e7d5a63c6cd098662e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 15:59:22 -0500 Subject: [PATCH 4816/8469] Move trailing comment --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d5d518de1d..e52b47361d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -918,7 +918,8 @@ def install_exe(self, dist_filename, tmpdir): f.write('%s: %s\n' % (k.replace('_', '-').title(), v)) f.close() script_dir = os.path.join(_egg_info, 'scripts') - self.delete_blockers( # delete entry-point scripts to avoid duping + # delete entry-point scripts to avoid duping + self.delete_blockers( [os.path.join(script_dir, args[0]) for args in get_script_args(dist)] ) From 2170df350911390a4a9a205763475dc7a7a2fb54 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 16:21:11 -0500 Subject: [PATCH 4817/8469] Move decision logic about windows/header generation closer to install_scripts, as it doesn't appear to be used elsewhere. --- setuptools/command/easy_install.py | 15 +++++++++------ setuptools/command/install_scripts.py | 10 ++++++---- setuptools/tests/test_easy_install.py | 6 +++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e52b47361d..d8d11d5030 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -745,7 +745,7 @@ def maybe_move(self, spec, dist_filename, setup_base): def install_wrapper_scripts(self, dist): if not self.exclude_scripts: - for args in get_script_args(dist): + for args in ScriptWriter._gen_args(dist): self.write_script(*args) def install_script(self, dist, script_name, script_text, dev_path=None): @@ -921,7 +921,7 @@ def install_exe(self, dist_filename, tmpdir): # delete entry-point scripts to avoid duping self.delete_blockers( [os.path.join(script_dir, args[0]) for args in - get_script_args(dist)] + ScriptWriter._gen_args(dist)] ) # Build .egg file from tmpdir bdist_egg.make_zipfile( @@ -1902,15 +1902,18 @@ class ScriptWriter(object): @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): - """ - Yield write_script() argument tuples for a distribution's entrypoints - """ + # for backward compatibility writer = cls.get_writer(wininst) header = get_script_header("", executable, wininst) return writer._gen_args(dist, header) @classmethod - def _gen_args(cls, dist, header): + def _gen_args(cls, dist, header=None): + """ + Yield write_script() argument tuples for a distribution's entrypoints + """ + if header is None: + header = get_script_header("", sys_executable) spec = str(dist.as_requirement()) for type_ in 'console', 'gui': group = type_ + '_scripts' diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index eb79fa3c73..eb5ed0f28d 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -13,9 +13,9 @@ def initialize_options(self): self.no_ep = False def run(self): - from setuptools.command.easy_install import get_script_args - from setuptools.command.easy_install import sys_executable - + from setuptools.command.easy_install import ( + ScriptWriter, sys_executable, get_script_header, + ) self.run_command("egg_info") if self.distribution.scripts: orig.install_scripts.run(self) # run first to set up self.outfiles @@ -35,7 +35,9 @@ def run(self): is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) - for args in get_script_args(dist, executable, is_wininst): + writer = ScriptWriter.get_writer(force_windows=is_wininst) + header = get_script_header("", executable, wininst=is_wininst) + for args in writer._gen_args(dist, header): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7baa989a31..bc94b0c4ab 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -22,8 +22,8 @@ from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup, SandboxViolation from setuptools.command.easy_install import ( - easy_install, fix_jython_executable, get_script_args, nt_quote_arg, - get_script_header, is_sh, + easy_install, fix_jython_executable, nt_quote_arg, + get_script_header, is_sh, ScriptWriter, ) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -83,7 +83,7 @@ def test_install_site_py(self): def test_get_script_args(self): dist = FakeDist() - args = next(get_script_args(dist)) + args = next(ScriptWriter._gen_args(dist)) name, script = itertools.islice(args, 2) assert script == WANTED From ef9c3db451e2f24fc8821287e79a1ef48e0c5cf5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 16:43:55 -0500 Subject: [PATCH 4818/8469] Move get_script_header into ScriptWriter --- setuptools/command/easy_install.py | 50 ++++++++++++++------------- setuptools/command/install_scripts.py | 4 ++- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d8d11d5030..c2928c7769 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1593,30 +1593,8 @@ def _first_line_re(): def get_script_header(script_text, executable=sys_executable, wininst=False): - """Create a #! line, getting options (if any) from script_text""" - first = (script_text + '\n').splitlines()[0] - match = _first_line_re().match(first) - options = '' - if match: - options = match.group(1) or '' - if options: - options = ' ' + options - if wininst: - executable = "python.exe" - else: - executable = nt_quote_arg(executable) - hdr = "#!%(executable)s%(options)s\n" % locals() - if not isascii(hdr): - # Non-ascii path to sys.executable, use -x to prevent warnings - if options: - if options.strip().startswith('-'): - options = ' -x' + options.strip()[1:] - # else: punt, we can't do it, let the warning happen anyway - else: - options = ' -x' - executable = fix_jython_executable(executable, options) - hdr = "#!%(executable)s%(options)s\n" % locals() - return hdr + executable = "python.exe" if wininst else nt_quote_arg(executable) + return ScriptWriter.get_header(script_text, executable) def auto_chmod(func, arg, exc): @@ -1903,6 +1881,7 @@ class ScriptWriter(object): @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): # for backward compatibility + warnings.warn("Use _gen_args", DeprecationWarning) writer = cls.get_writer(wininst) header = get_script_header("", executable, wininst) return writer._gen_args(dist, header) @@ -1934,6 +1913,29 @@ def _get_script_args(cls, type_, name, header, script_text): # Simply write the stub with no extension. yield (name, header + script_text) + @classmethod + def get_header(cls, script_text, executable): + """Create a #! line, getting options (if any) from script_text""" + first = (script_text + '\n').splitlines()[0] + match = _first_line_re().match(first) + options = '' + if match: + options = match.group(1) or '' + if options: + options = ' ' + options + hdr = "#!%(executable)s%(options)s\n" % locals() + if not isascii(hdr): + # Non-ascii path to sys.executable, use -x to prevent warnings + if options: + if options.strip().startswith('-'): + options = ' -x' + options.strip()[1:] + # else: punt, we can't do it, let the warning happen anyway + else: + options = ' -x' + executable = fix_jython_executable(executable, options) + hdr = "#!%(executable)s%(options)s\n" % locals() + return hdr + class WindowsScriptWriter(ScriptWriter): @classmethod diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index eb5ed0f28d..de74145f40 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -35,8 +35,10 @@ def run(self): is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) + if is_wininst: + executable = "python.exe" writer = ScriptWriter.get_writer(force_windows=is_wininst) - header = get_script_header("", executable, wininst=is_wininst) + header = get_script_header("", executable) for args in writer._gen_args(dist, header): self.write_script(*args) From db3ee08fdba76c74e3f25ae7d7f56117e68223b0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 16:44:19 -0500 Subject: [PATCH 4819/8469] Remove unused imports --- setuptools/tests/test_easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index bc94b0c4ab..b42d2c07c5 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -20,7 +20,7 @@ from setuptools import sandbox from setuptools import compat from setuptools.compat import StringIO, BytesIO, urlparse -from setuptools.sandbox import run_setup, SandboxViolation +from setuptools.sandbox import run_setup from setuptools.command.easy_install import ( easy_install, fix_jython_executable, nt_quote_arg, get_script_header, is_sh, ScriptWriter, @@ -28,7 +28,7 @@ from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution -from pkg_resources import working_set, VersionConflict +from pkg_resources import working_set from pkg_resources import Distribution as PRDistribution import setuptools.tests.server import pkg_resources From 390e64c37fb7dcb57b8e6062192e4c4375be8b78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 16:56:23 -0500 Subject: [PATCH 4820/8469] Moved get_script_header into ScriptWriter class --- setuptools/command/easy_install.py | 11 ++++++----- setuptools/tests/test_easy_install.py | 28 +++++++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c2928c7769..bf64838467 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1592,11 +1592,6 @@ def _first_line_re(): return re.compile(first_line_re.pattern.decode()) -def get_script_header(script_text, executable=sys_executable, wininst=False): - executable = "python.exe" if wininst else nt_quote_arg(executable) - return ScriptWriter.get_header(script_text, executable) - - def auto_chmod(func, arg, exc): if func is os.remove and os.name == 'nt': chmod(arg, stat.S_IWRITE) @@ -1886,6 +1881,11 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): header = get_script_header("", executable, wininst) return writer._gen_args(dist, header) + @classmethod + def get_script_header(cls, script_text, executable=sys_executable, wininst=False): + executable = "python.exe" if wininst else nt_quote_arg(executable) + return cls.get_header(script_text, executable) + @classmethod def _gen_args(cls, dist, header=None): """ @@ -2016,6 +2016,7 @@ def _get_script_args(cls, type_, name, header, script_text): # for backward-compatibility get_script_args = ScriptWriter.get_script_args +get_script_header = ScriptWriter.get_script_header def get_win_launcher(type): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b42d2c07c5..5d1068ea3c 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -23,7 +23,7 @@ from setuptools.sandbox import run_setup from setuptools.command.easy_install import ( easy_install, fix_jython_executable, nt_quote_arg, - get_script_header, is_sh, ScriptWriter, + is_sh, ScriptWriter, ) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -425,15 +425,22 @@ class TestScriptHeader: ) def test_get_script_header(self): expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/local/bin/python') == expected + actual = ScriptWriter.get_script_header('#!/usr/local/bin/python') + assert actual == expected + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) - assert get_script_header('#!/usr/bin/python -x') == expected - candidate = get_script_header('#!/usr/bin/python', + actual = ScriptWriter.get_script_header('#!/usr/bin/python -x') + assert actual == expected + + actual = ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) - assert candidate == '#!%s -x\n' % self.non_ascii_exe - candidate = get_script_header('#!/usr/bin/python', + expected = '#!%s -x\n' % self.non_ascii_exe + assert actual == expected + + actual = ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.exe_with_spaces) - assert candidate == '#!"%s"\n' % self.exe_with_spaces + expected = '#!"%s"\n' % self.exe_with_spaces + assert actual == expected @pytest.mark.xfail( compat.PY3 and os.environ.get("LC_CTYPE") in ("C", "POSIX"), @@ -453,7 +460,8 @@ def test_get_script_header_jython_workaround(self, tmpdir): f.write(header) exe = str(exe) - header = get_script_header('#!/usr/local/bin/python', executable=exe) + header = ScriptWriter.get_script_header('#!/usr/local/bin/python', + executable=exe) assert header == '#!/usr/bin/env %s\n' % exe expect_out = 'stdout' if sys.version_info < (2,7) else 'stderr' @@ -461,14 +469,14 @@ def test_get_script_header_jython_workaround(self, tmpdir): with contexts.quiet() as (stdout, stderr): # When options are included, generate a broken shebang line # with a warning emitted - candidate = get_script_header('#!/usr/bin/python -x', + candidate = ScriptWriter.get_script_header('#!/usr/bin/python -x', executable=exe) assert candidate == '#!%s -x\n' % exe output = locals()[expect_out] assert 'Unable to adapt shebang line' in output.getvalue() with contexts.quiet() as (stdout, stderr): - candidate = get_script_header('#!/usr/bin/python', + candidate = ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) assert candidate == '#!%s -x\n' % self.non_ascii_exe output = locals()[expect_out] From c3beddd034239005c98f7285a2936c513c5a81be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 17:12:37 -0500 Subject: [PATCH 4821/8469] Deprecate and remove usage of easy_install.get_script_header. --- setuptools/command/easy_install.py | 12 ++++++++---- setuptools/command/install_scripts.py | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bf64838467..9eb741591e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -754,7 +754,7 @@ def install_script(self, dist, script_name, script_text, dev_path=None): is_script = is_python_script(script_text, script_name) if is_script: - script_text = (get_script_header(script_text) + + script_text = (ScriptWriter.get_header(script_text) + self._load_template(dev_path) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') @@ -1878,11 +1878,13 @@ def get_script_args(cls, dist, executable=sys_executable, wininst=False): # for backward compatibility warnings.warn("Use _gen_args", DeprecationWarning) writer = cls.get_writer(wininst) - header = get_script_header("", executable, wininst) + header = cls.get_script_header("", executable, wininst) return writer._gen_args(dist, header) @classmethod def get_script_header(cls, script_text, executable=sys_executable, wininst=False): + # for backward compatibility + warnings.warn("Use get_header", DeprecationWarning) executable = "python.exe" if wininst else nt_quote_arg(executable) return cls.get_header(script_text, executable) @@ -1892,7 +1894,7 @@ def _gen_args(cls, dist, header=None): Yield write_script() argument tuples for a distribution's entrypoints """ if header is None: - header = get_script_header("", sys_executable) + header = cls.get_header() spec = str(dist.as_requirement()) for type_ in 'console', 'gui': group = type_ + '_scripts' @@ -1914,8 +1916,10 @@ def _get_script_args(cls, type_, name, header, script_text): yield (name, header + script_text) @classmethod - def get_header(cls, script_text, executable): + def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" + if executable is None: + executable = nt_quote_arg(sys_executable) first = (script_text + '\n').splitlines()[0] match = _first_line_re().match(first) options = '' diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index de74145f40..138e4ea279 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -14,7 +14,7 @@ def initialize_options(self): def run(self): from setuptools.command.easy_install import ( - ScriptWriter, sys_executable, get_script_header, + ScriptWriter, sys_executable, nt_quote_arg, ) self.run_command("egg_info") if self.distribution.scripts: @@ -38,7 +38,7 @@ def run(self): if is_wininst: executable = "python.exe" writer = ScriptWriter.get_writer(force_windows=is_wininst) - header = get_script_header("", executable) + header = ScriptWriter.get_header("", nt_quote_arg(executable)) for args in writer._gen_args(dist, header): self.write_script(*args) From 261d57232c74954468688a76aab2caea80ed42fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 17:14:11 -0500 Subject: [PATCH 4822/8469] Rename _gen_args to get_args (for consistency). --- setuptools/command/easy_install.py | 10 +++++----- setuptools/command/install_scripts.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9eb741591e..5c50dbe285 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -745,7 +745,7 @@ def maybe_move(self, spec, dist_filename, setup_base): def install_wrapper_scripts(self, dist): if not self.exclude_scripts: - for args in ScriptWriter._gen_args(dist): + for args in ScriptWriter.get_args(dist): self.write_script(*args) def install_script(self, dist, script_name, script_text, dev_path=None): @@ -921,7 +921,7 @@ def install_exe(self, dist_filename, tmpdir): # delete entry-point scripts to avoid duping self.delete_blockers( [os.path.join(script_dir, args[0]) for args in - ScriptWriter._gen_args(dist)] + ScriptWriter.get_args(dist)] ) # Build .egg file from tmpdir bdist_egg.make_zipfile( @@ -1876,10 +1876,10 @@ class ScriptWriter(object): @classmethod def get_script_args(cls, dist, executable=sys_executable, wininst=False): # for backward compatibility - warnings.warn("Use _gen_args", DeprecationWarning) + warnings.warn("Use get_args", DeprecationWarning) writer = cls.get_writer(wininst) header = cls.get_script_header("", executable, wininst) - return writer._gen_args(dist, header) + return writer.get_args(dist, header) @classmethod def get_script_header(cls, script_text, executable=sys_executable, wininst=False): @@ -1889,7 +1889,7 @@ def get_script_header(cls, script_text, executable=sys_executable, wininst=False return cls.get_header(script_text, executable) @classmethod - def _gen_args(cls, dist, header=None): + def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distribution's entrypoints """ diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 138e4ea279..1717e1cf56 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,7 +39,7 @@ def run(self): executable = "python.exe" writer = ScriptWriter.get_writer(force_windows=is_wininst) header = ScriptWriter.get_header("", nt_quote_arg(executable)) - for args in writer._gen_args(dist, header): + for args in writer.get_args(dist, header): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 5d1068ea3c..f919ae2010 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -83,7 +83,7 @@ def test_install_site_py(self): def test_get_script_args(self): dist = FakeDist() - args = next(ScriptWriter._gen_args(dist)) + args = next(ScriptWriter.get_args(dist)) name, script = itertools.islice(args, 2) assert script == WANTED From 3c78eb2348dff5d493d0cd5a34aef812db8385ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 17:20:15 -0500 Subject: [PATCH 4823/8469] Extract method for parsing options. --- setuptools/command/easy_install.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5c50dbe285..6ec96564eb 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1920,13 +1920,9 @@ def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" if executable is None: executable = nt_quote_arg(sys_executable) - first = (script_text + '\n').splitlines()[0] - match = _first_line_re().match(first) - options = '' - if match: - options = match.group(1) or '' - if options: - options = ' ' + options + + options = cls._extract_options(script_text) + hdr = "#!%(executable)s%(options)s\n" % locals() if not isascii(hdr): # Non-ascii path to sys.executable, use -x to prevent warnings @@ -1940,6 +1936,20 @@ def get_header(cls, script_text="", executable=None): hdr = "#!%(executable)s%(options)s\n" % locals() return hdr + @classmethod + def _extract_options(cls, orig_script): + """ + Extract any options from the first line of the script. + """ + first = (orig_script + '\n').splitlines()[0] + match = _first_line_re().match(first) + options = '' + if match: + options = match.group(1) or '' + if options: + options = ' ' + options + return options + class WindowsScriptWriter(ScriptWriter): @classmethod From efba85513b5c11ddbddf785906b5b4e9b596771a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 17:49:21 -0500 Subject: [PATCH 4824/8469] Extract method for handling non-ascii exe. Strip out excess whitespace from option handling. --- setuptools/command/easy_install.py | 37 +++++++++++++++------------ setuptools/tests/test_easy_install.py | 4 +-- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6ec96564eb..61e242d671 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1922,19 +1922,11 @@ def get_header(cls, script_text="", executable=None): executable = nt_quote_arg(sys_executable) options = cls._extract_options(script_text) + options = cls._handle_non_ascii_exe(executable, options) + tmpl = '#!{executable} {options}\n' if options else '#!{executable}\n' - hdr = "#!%(executable)s%(options)s\n" % locals() - if not isascii(hdr): - # Non-ascii path to sys.executable, use -x to prevent warnings - if options: - if options.strip().startswith('-'): - options = ' -x' + options.strip()[1:] - # else: punt, we can't do it, let the warning happen anyway - else: - options = ' -x' executable = fix_jython_executable(executable, options) - hdr = "#!%(executable)s%(options)s\n" % locals() - return hdr + return tmpl.format(**locals()) @classmethod def _extract_options(cls, orig_script): @@ -1943,12 +1935,23 @@ def _extract_options(cls, orig_script): """ first = (orig_script + '\n').splitlines()[0] match = _first_line_re().match(first) - options = '' - if match: - options = match.group(1) or '' - if options: - options = ' ' + options - return options + options = match.group(1) or '' if match else '' + return options.strip() + + @classmethod + def _handle_non_ascii_exe(cls, executable, options): + if isascii(executable): + return options + + # Non-ascii path to sys.executable, use -x to prevent warnings + if not options: + return '-x' + + if not options.strip().startswith('-'): + # punt, we can't do it, let the warning happen anyway + return options + + return '-x' + options.strip()[1:] class WindowsScriptWriter(ScriptWriter): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f919ae2010..8687086625 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -428,7 +428,7 @@ def test_get_script_header(self): actual = ScriptWriter.get_script_header('#!/usr/local/bin/python') assert actual == expected - expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) actual = ScriptWriter.get_script_header('#!/usr/bin/python -x') assert actual == expected @@ -471,7 +471,7 @@ def test_get_script_header_jython_workaround(self, tmpdir): # with a warning emitted candidate = ScriptWriter.get_script_header('#!/usr/bin/python -x', executable=exe) - assert candidate == '#!%s -x\n' % exe + assert candidate == '#!%s -x\n' % exe output = locals()[expect_out] assert 'Unable to adapt shebang line' in output.getvalue() From bd9d38030cee59eb0e2ef9c8fb98fda5b1ff470f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 21:18:09 -0500 Subject: [PATCH 4825/8469] Added new class CommandSpec, which will be used for abstracting the command handling for script headers. --- setuptools/command/easy_install.py | 95 +++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 61e242d671..bb0d869483 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -60,10 +60,6 @@ warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) -sys_executable = os.environ.get('__PYVENV_LAUNCHER__', - os.path.normpath(sys.executable)) - - __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', 'main', 'get_exe_prefixes', @@ -1855,6 +1851,88 @@ def fix_jython_executable(executable, options): return executable +class CommandSpec(list): + """ + A command spec for a #! header, specified as a list of arguments akin to + those passed to Popen. + """ + + options = [] + _default = os.path.normpath(sys.executable) + launcher = os.environ.get('__PYVENV_LAUNCHER__', _default) + + @classmethod + def from_environment(cls): + return cls.from_string(cls.launcher) + + @classmethod + def from_string(cls, string): + """ + Construct a command spec from a simple string, assumed to represent + the full name to an executable. + """ + return cls._for_jython(string) or cls([string]) + + def install_options(self, script_text): + self.options.extend(self._extract_options(script_text)) + cmdline = subprocess.list2cmdline(self) + if not isascii(cmdline): + self.options[:0] = ['-x'] + + @staticmethod + def _extract_options(orig_script): + """ + Extract any options from the first line of the script. + """ + first = (orig_script + '\n').splitlines()[0] + match = _first_line_re().match(first) + options = match.group(1) or '' if match else '' + return options.strip() + + def as_header(self): + return self._render(self + list(self.options)) + + @staticmethod + def _render(items): + cmdline = subprocess.list2cmdline(items) + return '#!' + cmdline + '\n' + + +class JythonCommandSpec(CommandSpec): + @classmethod + def from_string(cls, string): + """ + On Jython, construct an instance of this class. + On platforms other than Jython, return None. + """ + needs_jython_spec = ( + sys.platform.startswith('java') + and + __import__('java').lang.System.getProperty('os.name') != 'Linux' + ) + return cls([string]) if needs_jython_spec else None + + def as_header(self): + """ + Workaround Jython's sys.executable being a .sh (an invalid + shebang line interpreter) + """ + if not is_sh(self[0]): + return super(JythonCommandSpec, self).as_header() + + if self.options: + # Can't apply the workaround, leave it broken + log.warn( + "WARNING: Unable to adapt shebang line for Jython," + " the following script is NOT executable\n" + " see http://bugs.jython.org/issue1112 for" + " more information.") + return super(JythonCommandSpec, self).as_header() + + items = ['/usr/bin/env'] + self + list(self.options) + return self._render(items) + + class ScriptWriter(object): """ Encapsulates behavior around writing entry point scripts for console and @@ -1874,17 +1952,19 @@ class ScriptWriter(object): """).lstrip() @classmethod - def get_script_args(cls, dist, executable=sys_executable, wininst=False): + def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_args", DeprecationWarning) + executable = executable or CommandSpec.launcher writer = cls.get_writer(wininst) header = cls.get_script_header("", executable, wininst) return writer.get_args(dist, header) @classmethod - def get_script_header(cls, script_text, executable=sys_executable, wininst=False): + def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_header", DeprecationWarning) + executable = executable or CommandSpec.launcher executable = "python.exe" if wininst else nt_quote_arg(executable) return cls.get_header(script_text, executable) @@ -1918,8 +1998,7 @@ def _get_script_args(cls, type_, name, header, script_text): @classmethod def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" - if executable is None: - executable = nt_quote_arg(sys_executable) + executable = executable or nt_quote_arg(CommandSpec.launcher) options = cls._extract_options(script_text) options = cls._handle_non_ascii_exe(executable, options) From 3ababa264dc404e9f8eae01045a4531b0b5bd692 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 21:31:05 -0500 Subject: [PATCH 4826/8469] Update install_scripts to use CommandSpec for generating script headers. --- setuptools/command/easy_install.py | 13 +++++++++++++ setuptools/command/install_scripts.py | 12 +++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bb0d869483..5667864b5d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1861,6 +1861,19 @@ class CommandSpec(list): _default = os.path.normpath(sys.executable) launcher = os.environ.get('__PYVENV_LAUNCHER__', _default) + @classmethod + def from_param(cls, param): + """ + Construct a CommandSpec from a parameter to build_scripts, which may + be None. + """ + if isinstance(param, cls): + return param + if param is None: + return cls.from_environment() + # otherwise, assume it's a string. + return cls.from_string(param) + @classmethod def from_environment(cls): return cls.from_string(cls.launcher) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 1717e1cf56..722b0566ea 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -13,9 +13,8 @@ def initialize_options(self): self.no_ep = False def run(self): - from setuptools.command.easy_install import ( - ScriptWriter, sys_executable, nt_quote_arg, - ) + from setuptools.command.easy_install import ScriptWriter, CommandSpec + self.run_command("egg_info") if self.distribution.scripts: orig.install_scripts.run(self) # run first to set up self.outfiles @@ -31,15 +30,14 @@ def run(self): ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') - executable = getattr(bs_cmd, 'executable', sys_executable) + cmd = CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) if is_wininst: - executable = "python.exe" + cmd = CommandSpec.from_string("python.exe") writer = ScriptWriter.get_writer(force_windows=is_wininst) - header = ScriptWriter.get_header("", nt_quote_arg(executable)) - for args in writer.get_args(dist, header): + for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): From 254c2f03c69fd6ae34e70c1f89cb7ccbc4b5fed3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 21:44:38 -0500 Subject: [PATCH 4827/8469] Use CommandSpec in get_script_header --- setuptools/command/easy_install.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5667864b5d..f075200c1d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -36,6 +36,7 @@ import struct import contextlib import subprocess +import shlex from setuptools import Command from setuptools.sandbox import run_setup @@ -1884,10 +1885,10 @@ def from_string(cls, string): Construct a command spec from a simple string, assumed to represent the full name to an executable. """ - return cls._for_jython(string) or cls([string]) + return JythonCommandSpec.from_string(string) or cls([string]) def install_options(self, script_text): - self.options.extend(self._extract_options(script_text)) + self.options = shlex.split(self._extract_options(script_text)) cmdline = subprocess.list2cmdline(self) if not isascii(cmdline): self.options[:0] = ['-x'] @@ -1977,9 +1978,11 @@ def get_script_args(cls, dist, executable=None, wininst=False): def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_header", DeprecationWarning) - executable = executable or CommandSpec.launcher - executable = "python.exe" if wininst else nt_quote_arg(executable) - return cls.get_header(script_text, executable) + if wininst: + executable = "python.exe" + cmd = CommandSpec.from_param(executable) + cmd.install_options(script_text) + return cmd.as_header() @classmethod def get_args(cls, dist, header=None): From 126d971737a7b0fc89b0b84c2b48f6fd139df729 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 21:53:03 -0500 Subject: [PATCH 4828/8469] Use CommandSpec in ScriptWriter, removing now unused methods. --- setuptools/command/easy_install.py | 36 +++--------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f075200c1d..7f8a98003f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2014,39 +2014,9 @@ def _get_script_args(cls, type_, name, header, script_text): @classmethod def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" - executable = executable or nt_quote_arg(CommandSpec.launcher) - - options = cls._extract_options(script_text) - options = cls._handle_non_ascii_exe(executable, options) - tmpl = '#!{executable} {options}\n' if options else '#!{executable}\n' - - executable = fix_jython_executable(executable, options) - return tmpl.format(**locals()) - - @classmethod - def _extract_options(cls, orig_script): - """ - Extract any options from the first line of the script. - """ - first = (orig_script + '\n').splitlines()[0] - match = _first_line_re().match(first) - options = match.group(1) or '' if match else '' - return options.strip() - - @classmethod - def _handle_non_ascii_exe(cls, executable, options): - if isascii(executable): - return options - - # Non-ascii path to sys.executable, use -x to prevent warnings - if not options: - return '-x' - - if not options.strip().startswith('-'): - # punt, we can't do it, let the warning happen anyway - return options - - return '-x' + options.strip()[1:] + cmd = CommandSpec.from_param(executable) + cmd.install_options(script_text) + return cmd.as_header() class WindowsScriptWriter(ScriptWriter): From ab6887a55394c77982212c058c59addeb77736f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:02:56 -0500 Subject: [PATCH 4829/8469] Remove redundant line --- setuptools/command/easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7f8a98003f..0b24c8e3ab 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1969,7 +1969,6 @@ class ScriptWriter(object): def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_args", DeprecationWarning) - executable = executable or CommandSpec.launcher writer = cls.get_writer(wininst) header = cls.get_script_header("", executable, wininst) return writer.get_args(dist, header) From 6ab7d6dbb13e0ef1f44bf0461f3ffdb06f07b3b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:11:08 -0500 Subject: [PATCH 4830/8469] Add test demonstrating how a custom launch command spec that could be passed as the script executable. --- setuptools/tests/test_easy_install.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 8687086625..3a8ddbfbcd 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -23,7 +23,7 @@ from setuptools.sandbox import run_setup from setuptools.command.easy_install import ( easy_install, fix_jython_executable, nt_quote_arg, - is_sh, ScriptWriter, + is_sh, ScriptWriter, CommandSpec, ) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg @@ -481,3 +481,21 @@ def test_get_script_header_jython_workaround(self, tmpdir): assert candidate == '#!%s -x\n' % self.non_ascii_exe output = locals()[expect_out] assert 'Unable to adapt shebang line' in output.getvalue() + + +class TestCommandSpec: + def test_custom_launch_command(self): + """ + Show how a custom CommandSpec could be used to specify a #! executable + which takes parameters. + """ + cmd = CommandSpec(['/usr/bin/env', 'python3']) + assert cmd.as_header() == '#!/usr/bin/env python3\n' + + def test_from_param_for_CommandSpec_is_passthrough(self): + """ + from_param should return an instance of a CommandSpec + """ + cmd = CommandSpec(['python']) + cmd_new = CommandSpec.from_param(cmd) + assert cmd is cmd_new From 4356a2dc99a74be0d970f63e045eba40f463695d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:22:44 -0500 Subject: [PATCH 4831/8469] Allow CommandSpec to be constructed simply from a list. --- setuptools/command/easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0b24c8e3ab..fb953dbb2f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1870,6 +1870,8 @@ def from_param(cls, param): """ if isinstance(param, cls): return param + if isinstance(param, list): + return cls(param) if param is None: return cls.from_environment() # otherwise, assume it's a string. From 0ad48553589fc68faeb7a5fc2f76da128249ac86 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:29:37 -0500 Subject: [PATCH 4832/8469] Add test capturing expectation around sys.executable having spaces in the name. --- setuptools/command/easy_install.py | 9 ++++++--- setuptools/tests/test_easy_install.py | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fb953dbb2f..54a3bc3a03 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1859,8 +1859,11 @@ class CommandSpec(list): """ options = [] - _default = os.path.normpath(sys.executable) - launcher = os.environ.get('__PYVENV_LAUNCHER__', _default) + + @classmethod + def _sys_executable(cls): + _default = os.path.normpath(sys.executable) + return os.environ.get('__PYVENV_LAUNCHER__', _default) @classmethod def from_param(cls, param): @@ -1879,7 +1882,7 @@ def from_param(cls, param): @classmethod def from_environment(cls): - return cls.from_string(cls.launcher) + return cls.from_string(cls._sys_executable()) @classmethod def from_string(cls, string): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3a8ddbfbcd..e1f0678816 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -499,3 +499,9 @@ def test_from_param_for_CommandSpec_is_passthrough(self): cmd = CommandSpec(['python']) cmd_new = CommandSpec.from_param(cmd) assert cmd is cmd_new + + def test_from_environment_with_spaces_in_executable(self): + with mock.patch('sys.executable', TestScriptHeader.exe_with_spaces): + cmd = CommandSpec.from_environment() + assert len(cmd) == 1 + assert cmd.as_header().startswith('#!"') From 3b68368e30aa51d4a7f96053501c604a8cb6fe42 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:44:28 -0500 Subject: [PATCH 4833/8469] Change the way string values are interpreted from build.executable - now they must be quoted or otherwise escaped suitable for parsing by shlex.split. --- setuptools/command/easy_install.py | 9 +++++---- setuptools/tests/test_easy_install.py | 9 +++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 54a3bc3a03..340b1fac93 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1882,15 +1882,16 @@ def from_param(cls, param): @classmethod def from_environment(cls): - return cls.from_string(cls._sys_executable()) + return cls.from_string('"' + cls._sys_executable() + '"') @classmethod def from_string(cls, string): """ - Construct a command spec from a simple string, assumed to represent - the full name to an executable. + Construct a command spec from a simple string representing a command + line parseable by shlex.split. """ - return JythonCommandSpec.from_string(string) or cls([string]) + items = shlex.split(string) + return JythonCommandSpec.from_string(string) or cls(items) def install_options(self, script_text): self.options = shlex.split(self._extract_options(script_text)) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e1f0678816..a3d5b0a951 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -505,3 +505,12 @@ def test_from_environment_with_spaces_in_executable(self): cmd = CommandSpec.from_environment() assert len(cmd) == 1 assert cmd.as_header().startswith('#!"') + + def test_from_simple_string_uses_shlex(self): + """ + In order to support `executable = /usr/bin/env my-python`, make sure + from_param invokes shlex on that input. + """ + cmd = CommandSpec.from_param('/usr/bin/env my-python') + assert len(cmd) == 2 + assert '"' not in cmd.as_header() From b2c646684986070b34b92aef52d2f57391c99626 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:45:56 -0500 Subject: [PATCH 4834/8469] Fix failing test (now that expectation is different). --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a3d5b0a951..72b040e1af 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -438,7 +438,7 @@ def test_get_script_header(self): assert actual == expected actual = ScriptWriter.get_script_header('#!/usr/bin/python', - executable=self.exe_with_spaces) + executable='"'+self.exe_with_spaces+'"') expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected From 81df10c70a695360683d76daa1737ba3feb56f6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 22:48:07 -0500 Subject: [PATCH 4835/8469] Update note in changelog --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8fc9e981ef..d6cf236a69 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +---- +12.0 +---- + +* Issue #188: Setuptools now support multiple entities in the value for + ``build.executable``, such that an executable of "/usr/bin/env my-python" may + be specified. This means that systems with a specified executable whose name + has spaces in the path must be updated to escape or quote that value. + ---- 11.1 ---- From 3ba436a301a5e020de8c33fbeca016c205511f4a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 12:58:07 -0500 Subject: [PATCH 4836/8469] Bump stacklevel to 2 to inform the caller of the issue. --- pkg_resources/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a0b354ff55..0e6223de48 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2261,6 +2261,7 @@ def load(self, require=True, env=None, installer=None): "`require` parameter is deprecated. Use " "EntryPoint._load instead.", DeprecationWarning, + stacklevel=2, ) return self._load() From 0a655117169b85d529c6f65c8895ad4bff824b6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 13:00:26 -0500 Subject: [PATCH 4837/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8fc9e981ef..956b1ad406 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +---- +11.2 +---- + +* Pip #2326: Report deprecation warning at stacklevel 2 for easier diagnosis. + ---- 11.1 ---- From 85df7c83592f997764717253a5f7c23caaf7b966 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 13:03:22 -0500 Subject: [PATCH 4838/8469] Added tag 11.2 for changeset feb5971e7827 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 021c8ff463..c966497049 100644 --- a/.hgtags +++ b/.hgtags @@ -183,3 +183,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 6cd2b18f4be2a9c188fa505b34505b32f4a4554b 11.1 +feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 From b38ede5b91f82c552f1d79a0346ea5f24b0b7d1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 13:03:59 -0500 Subject: [PATCH 4839/8469] Bumped to 11.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 388ff490d7..e3de282940 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.2" +DEFAULT_VERSION = "11.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index a6fd3e36a9..b1a75f410f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.2' +__version__ = '11.3' From dd0ef1f363e42a8859889ba319b37a29c1f03855 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 13:07:42 -0500 Subject: [PATCH 4840/8469] Add support for linkifying pip issues. --- linkify.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linkify.py b/linkify.py index e7b3ca7be6..5c6e16b443 100644 --- a/linkify.py +++ b/linkify.py @@ -15,6 +15,7 @@ r"Jython #(?P\d+)", r"Python #(?P\d+)", r"Interop #(?P\d+)", + r"Pip #(?P\d+)", ] issue_urls = dict( @@ -27,6 +28,7 @@ jython='http://bugs.jython.org/issue{jython}', python='http://bugs.python.org/issue{python}', interop='https://github.com/pypa/interoperability-peps/issues/{interop}', + pip='https://github.com/pypa/pip/issues/{pip}', ) From 7fa87f2fbdf84d414e069ca96f6c6d860d7e0505 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 13:12:16 -0500 Subject: [PATCH 4841/8469] Update changelog. --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 956b1ad406..9ebfb14542 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,7 +36,9 @@ CHANGES 10.2 ---- -* Deprecated use of EntryPoint.load(require=False). +* Deprecated use of EntryPoint.load(require=False). Passing a boolean to a + function to select behavior is an anti-pattern. Instead use + ``Entrypoint._load()``. * Substantial refactoring of all unit tests. Tests are now much leaner and re-use a lot of fixtures and contexts for better clarity of purpose. From 92a553d3adeb431cdf92b136ac9ccc3f2ef98bf1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 14:21:41 -0500 Subject: [PATCH 4842/8469] Add EntryPoint.resolve and deprecate most usage of EntryPoint.load. Removed EntryPoint._load. --- CHANGES.txt | 14 ++++++++++++++ pkg_resources/__init__.py | 22 ++++++++++++++-------- setuptools/command/test.py | 2 +- setuptools/dist.py | 2 +- setuptools/tests/test_sdist.py | 2 +- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9ebfb14542..ab93a9c660 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,20 @@ CHANGES ======= +---- +11.3 +---- + +* Expose ``EntryPoint.resolve`` in place of EntryPoint._load, implementing the + simple, non-requiring load. Deprecated all uses of ``EntryPoint._load`` + except for calling with no parameters, which is just a shortcut for + ``ep.require(); ep.resolve();``. + + Apps currently invoking ``ep.load(require=False)`` should instead do the + following if wanting to avoid the deprecating warning:: + + getattr(ep, "resolve", lambda: ep.load(require=False))() + ---- 11.2 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b31ae53204..fd8efaa8c5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2294,19 +2294,25 @@ def __str__(self): def __repr__(self): return "EntryPoint.parse(%r)" % str(self) - def load(self, require=True, env=None, installer=None): - if require: - self.require(env, installer) - else: + def load(self, require=True, *args, **kwargs): + """ + Require packages for this EntryPoint, then resolve it. + """ + if not require or args or kwargs: warnings.warn( - "`require` parameter is deprecated. Use " - "EntryPoint._load instead.", + "Parameters to load are deprecated. Call .resolve and " + ".require separately.", DeprecationWarning, stacklevel=2, ) - return self._load() + if require: + self.require(*args, **kwargs) + return self.resolve() - def _load(self): + def resolve(self): + """ + Resolve the entry point from its module and attrs. + """ module = __import__(self.module_name, fromlist=['__name__'], level=0) try: return functools.reduce(getattr, self.attrs, module) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 2bf5cb1605..42689f7012 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -172,4 +172,4 @@ def _resolve_as_ep(val): if val is None: return parsed = EntryPoint.parse("x=" + val) - return parsed._load()() + return parsed.resolve()() diff --git a/setuptools/dist.py b/setuptools/dist.py index 1917a610e3..bc29b131b8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -434,7 +434,7 @@ def print_commands(self): for ep in pkg_resources.iter_entry_points('distutils.commands'): if ep.name not in self.cmdclass: # don't require extras as the commands won't be invoked - cmdclass = ep._load() + cmdclass = ep.resolve() self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index d3494d7a69..9013b505db 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -415,5 +415,5 @@ def test_default_revctrl(): """ ep_def = 'svn_cvs = setuptools.command.sdist:_default_revctrl' ep = pkg_resources.EntryPoint.parse(ep_def) - res = ep._load() + res = ep.resolve() assert hasattr(res, '__iter__') From 94391e16a7c821df85a00c82a48b3326d7155fc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 14:23:33 -0500 Subject: [PATCH 4843/8469] Added tag 11.3 for changeset a1a6a1ac9113 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c966497049..cef45b3b5b 100644 --- a/.hgtags +++ b/.hgtags @@ -184,3 +184,4 @@ fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 6cd2b18f4be2a9c188fa505b34505b32f4a4554b 11.1 feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 +a1a6a1ac9113b90009052ca7263174a488434099 11.3 From 6fe9a6147ff850b64ffc241f65c2411f53fb34c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Jan 2015 14:24:10 -0500 Subject: [PATCH 4844/8469] Bumped to 11.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e3de282940..1b567ef740 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.3" +DEFAULT_VERSION = "11.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index b1a75f410f..cef537ae73 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.3' +__version__ = '11.4' From 32ce474415accc4ad11fdbab57f7a65176d4197b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 09:48:30 -0500 Subject: [PATCH 4845/8469] Restore support for printable characters in the entry point name. Fixes #327. --- CHANGES.txt | 7 +++++++ pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_resources.py | 11 +++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index ab93a9c660..5fce5d9cf0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +11.3.1 +------ + +* Issue #327: Formalize and restore support for any printable character in an + entry point name. + ---- 11.3 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index fd8efaa8c5..c0c095b253 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2328,7 +2328,7 @@ def require(self, env=None, installer=None): pattern = re.compile( r'\s*' - r'(?P[+\w. -]+?)\s*' + r'(?P.+?)\s*' r'=\s*' r'(?P[\w.]+)\s*' r'(:\s*(?P[\w.]+))?\s*' diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index f252ddff0e..4a82167bf2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -2,6 +2,7 @@ import sys import tempfile import shutil +import string import pytest @@ -302,6 +303,16 @@ def testRejects(self): except ValueError: pass else: raise AssertionError("Should've been bad", ep) + def test_printable_name(self): + """ + Allow any printable character in the name. + """ + # Create a name with all printable characters; strip the whitespace. + name = string.printable.strip() + spec = "{name} = module:attr".format(**locals()) + ep = EntryPoint.parse(spec) + assert ep.name == name + def checkSubMap(self, m): assert len(m) == len(self.submap_expect) for key, ep in pkg_resources.iteritems(self.submap_expect): From 1524a98d7e0e5344134ef51e77cfe5a04e582a8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:01:51 -0500 Subject: [PATCH 4846/8469] Equal signs are now allowed in entry point names. --- pkg_resources/tests/test_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 4a82167bf2..00ba0cf565 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -297,7 +297,7 @@ def testParse(self): def testRejects(self): for ep in [ - "foo", "x=1=2", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2", + "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2", ]: try: EntryPoint.parse(ep) except ValueError: pass From de11e9e9b57db01e029657acb1148a9fd70581b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:02:44 -0500 Subject: [PATCH 4847/8469] Refactor for clarity --- pkg_resources/tests/test_resources.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 00ba0cf565..36cb64827f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -296,9 +296,8 @@ def testParse(self): assert ep.name == 'html+mako' def testRejects(self): - for ep in [ - "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2", - ]: + specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" + for ep in specs: try: EntryPoint.parse(ep) except ValueError: pass else: raise AssertionError("Should've been bad", ep) From 9d04e13b60ccd4ec6058c31e219d6e7d124f9574 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:07:03 -0500 Subject: [PATCH 4848/8469] Use pytests parametrize to create separate tests for each spec --- pkg_resources/tests/test_resources.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 36cb64827f..9c1eaeec42 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -295,12 +295,12 @@ def testParse(self): ep = EntryPoint.parse(spec) assert ep.name == 'html+mako' - def testRejects(self): - specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" - for ep in specs: - try: EntryPoint.parse(ep) - except ValueError: pass - else: raise AssertionError("Should've been bad", ep) + reject_specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" + @pytest.mark.parametrize("reject_spec", reject_specs) + def test_reject_spec(self, reject_spec): + try: EntryPoint.parse(reject_spec) + except ValueError: pass + else: raise AssertionError("Should've been bad", reject_spec) def test_printable_name(self): """ From 7d4bd8dabb45242671527282474c84179c967ede Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:08:15 -0500 Subject: [PATCH 4849/8469] Use pytest.raises for brevity and clarity of purpose. --- pkg_resources/tests/test_resources.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 9c1eaeec42..a55478a249 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -298,9 +298,8 @@ def testParse(self): reject_specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" @pytest.mark.parametrize("reject_spec", reject_specs) def test_reject_spec(self, reject_spec): - try: EntryPoint.parse(reject_spec) - except ValueError: pass - else: raise AssertionError("Should've been bad", reject_spec) + with pytest.raises(ValueError): + EntryPoint.parse(reject_spec) def test_printable_name(self): """ From 37c72186f7cd585a0ceab8d11c3baede009ca961 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:11:49 -0500 Subject: [PATCH 4850/8469] Bumped to 11.3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1b567ef740..955a8008a3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.4" +DEFAULT_VERSION = "11.3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index cef537ae73..6e50490aab 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.4' +__version__ = '11.3.1' From 6c02bf0985ae092a1ac94d8176b6e710675e9ccb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:11:53 -0500 Subject: [PATCH 4851/8469] Added tag 11.3.1 for changeset 1116e568f534 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cef45b3b5b..343bfa9e6b 100644 --- a/.hgtags +++ b/.hgtags @@ -185,3 +185,4 @@ b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 6cd2b18f4be2a9c188fa505b34505b32f4a4554b 11.1 feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 a1a6a1ac9113b90009052ca7263174a488434099 11.3 +1116e568f534ad8f4f41328a0f5fa183eb739c90 11.3.1 From a8f60a73238ae67e0c5a04e437fd9f4edf08bbd6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jan 2015 10:12:28 -0500 Subject: [PATCH 4852/8469] Bumped to 11.3.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 955a8008a3..f1e4aeaeb2 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.3.1" +DEFAULT_VERSION = "11.3.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 6e50490aab..1e71f92d11 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.3.1' +__version__ = '11.3.2' From 74637dd638a30c153d9af60688078c7e12d810d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:23:57 -0500 Subject: [PATCH 4853/8469] Extract Exception saving behavior. --- setuptools/sandbox.py | 70 +++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 7971f42c1c..37d89a2ae6 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -92,6 +92,37 @@ def pushd(target): os.chdir(saved) +class ExceptionSaver: + """ + A Context Manager that will save an exception, serialized, and restore it + later. + """ + def __enter__(self): + return self + + def __exit__(self, type, exc, tb): + if not exc: + return + + # dump the exception + self.saved_type = pickle.dumps(type) + self.saved_exc = pickle.dumps(exc) + self.tb = tb + + # suppress the exception + return True + + def resume(self): + "restore and re-raise any exception" + + if 'saved_exc' not in vars(self): + return + + type = pickle.loads(self.saved_type) + exc = pickle.loads(self.saved_exc) + compat.reraise(type, exc, self.tb) + + @contextlib.contextmanager def save_modules(): """ @@ -101,31 +132,20 @@ def save_modules(): outside the context. """ saved = sys.modules.copy() - try: - try: - yield saved - except: - # dump any exception - class_, exc, tb = sys.exc_info() - saved_cls = pickle.dumps(class_) - saved_exc = pickle.dumps(exc) - raise - finally: - sys.modules.update(saved) - # remove any modules imported since - del_modules = ( - mod_name for mod_name in sys.modules - if mod_name not in saved - # exclude any encodings modules. See #285 - and not mod_name.startswith('encodings.') - ) - _clear_modules(del_modules) - except: - # reload and re-raise any exception, using restored modules - class_, exc, tb = sys.exc_info() - new_cls = pickle.loads(saved_cls) - new_exc = pickle.loads(saved_exc) - compat.reraise(new_cls, new_exc, tb) + with ExceptionSaver() as saved_exc: + yield saved + + sys.modules.update(saved) + # remove any modules imported since + del_modules = ( + mod_name for mod_name in sys.modules + if mod_name not in saved + # exclude any encodings modules. See #285 + and not mod_name.startswith('encodings.') + ) + _clear_modules(del_modules) + + saved_exc.resume() def _clear_modules(module_names): From 19c95d3ef6dba78bf6431b6b13d000bc19e84cd6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:24:17 -0500 Subject: [PATCH 4854/8469] Remove unused import --- setuptools/tests/test_sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index cadc4812a7..9a2a6b7b32 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -7,7 +7,7 @@ import pkg_resources import setuptools.sandbox -from setuptools.sandbox import DirectorySandbox, SandboxViolation +from setuptools.sandbox import DirectorySandbox class TestSandbox: From c10a38e97daf7aad2167b3b444be8542dccc652e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:32:39 -0500 Subject: [PATCH 4855/8469] Add tests for new ExceptionSaver --- setuptools/tests/test_sandbox.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 9a2a6b7b32..33fb3329c2 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -54,3 +54,31 @@ def test_setup_py_with_CRLF(self, tmpdir): with setup_py.open('wb') as stream: stream.write(b'"degenerate script"\r\n') setuptools.sandbox._execfile(str(setup_py), globals()) + + +class TestExceptionSaver: + def test_exception_trapped(self): + with setuptools.sandbox.ExceptionSaver(): + raise ValueError("details") + + def test_exception_resumed(self): + with setuptools.sandbox.ExceptionSaver() as saved_exc: + raise ValueError("details") + + with pytest.raises(ValueError) as caught: + saved_exc.resume() + + assert isinstance(caught.value, ValueError) + assert str(caught.value) == 'details' + + def test_exception_reconstructed(self): + orig_exc = ValueError("details") + + with setuptools.sandbox.ExceptionSaver() as saved_exc: + raise orig_exc + + with pytest.raises(ValueError) as caught: + saved_exc.resume() + + assert isinstance(caught.value, ValueError) + assert caught.value is not orig_exc From a33a5ba6ed5be3affc10fd0e789799b7490d2053 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:38:25 -0500 Subject: [PATCH 4856/8469] Adding test for non-exceptional condition. --- setuptools/tests/test_sandbox.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 33fb3329c2..1340cecf13 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -82,3 +82,9 @@ def test_exception_reconstructed(self): assert isinstance(caught.value, ValueError) assert caught.value is not orig_exc + + def test_no_exception_passes_quietly(self): + with setuptools.sandbox.ExceptionSaver() as saved_exc: + pass + + saved_exc.resume() From 9948d3c8a7880cbc13012e8a3fedda130614601d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:40:02 -0500 Subject: [PATCH 4857/8469] Make attributes private and remove redundant naming. --- setuptools/sandbox.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 37d89a2ae6..0847ef4118 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -105,9 +105,9 @@ def __exit__(self, type, exc, tb): return # dump the exception - self.saved_type = pickle.dumps(type) - self.saved_exc = pickle.dumps(exc) - self.tb = tb + self._type = pickle.dumps(type) + self._exc = pickle.dumps(exc) + self._tb = tb # suppress the exception return True @@ -115,12 +115,12 @@ def __exit__(self, type, exc, tb): def resume(self): "restore and re-raise any exception" - if 'saved_exc' not in vars(self): + if '_exc' not in vars(self): return - type = pickle.loads(self.saved_type) - exc = pickle.loads(self.saved_exc) - compat.reraise(type, exc, self.tb) + type = pickle.loads(self._type) + exc = pickle.loads(self._exc) + compat.reraise(type, exc, self._tb) @contextlib.contextmanager From 9c3d6750cbef8e0673e4123aa39149e28a8a098e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:49:12 -0500 Subject: [PATCH 4858/8469] Add test capturing failure when the Exception is not pickleable. Ref #329. --- setuptools/tests/test_sandbox.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 1340cecf13..6e1e9e1cd2 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -88,3 +88,15 @@ def test_no_exception_passes_quietly(self): pass saved_exc.resume() + + def test_unpickleable_exception(self): + class CantPickleThis(Exception): + "This Exception is unpickleable because it's not in globals" + + with setuptools.sandbox.ExceptionSaver() as saved_exc: + raise CantPickleThis('detail') + + with pytest.raises(setuptools.sandbox.UnpickleableException) as caught: + saved_exc.resume() + + assert str(caught.value) == "CantPickleThis('detail',)" From 9cf04f13f2ff72a7befa15f8f4835d2c662508e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 22:06:09 -0500 Subject: [PATCH 4859/8469] Wrap unpickleable exceptions in another class. Fixes #329. --- setuptools/sandbox.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 0847ef4118..83283ca3dc 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -92,6 +92,22 @@ def pushd(target): os.chdir(saved) +class UnpickleableException(Exception): + """ + An exception representing another Exception that could not be pickled. + """ + @classmethod + def dump(cls, type, exc): + """ + Always return a dumped (pickled) type and exc. If exc can't be pickled, + wrap it in UnpickleableException first. + """ + try: + return pickle.dumps(type), pickle.dumps(exc) + except Exception: + return cls.dump(cls, cls(repr(exc))) + + class ExceptionSaver: """ A Context Manager that will save an exception, serialized, and restore it @@ -105,8 +121,7 @@ def __exit__(self, type, exc, tb): return # dump the exception - self._type = pickle.dumps(type) - self._exc = pickle.dumps(exc) + self._saved = UnpickleableException.dump(type, exc) self._tb = tb # suppress the exception @@ -115,11 +130,10 @@ def __exit__(self, type, exc, tb): def resume(self): "restore and re-raise any exception" - if '_exc' not in vars(self): + if '_saved' not in vars(self): return - type = pickle.loads(self._type) - exc = pickle.loads(self._exc) + type, exc = map(pickle.loads, self._saved) compat.reraise(type, exc, self._tb) From 72d5cc0b9ea095437bf2796298dd3658624c081e Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Fri, 9 Jan 2015 09:40:48 +0000 Subject: [PATCH 4860/8469] Access os.environ[key], not os.environ['key'] --- setuptools/tests/contexts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index d06a333f08..4a46176557 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -27,7 +27,7 @@ def environment(**replacements): to clear the values. """ saved = dict( - (key, os.environ['key']) + (key, os.environ[key]) for key in replacements if key in os.environ ) From 35b0d82423b88702bbaaa20436b28720c70e3a6d Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 12 Jan 2015 17:31:44 -0500 Subject: [PATCH 4861/8469] Fix tox settings so they work Update the dependency list to include the mock package. Update the way py.test is called to only scan the setuptools directory, to avoid scanning all of the packages installed in .tox and other temporary directories. --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 1ac4620277..7aeffdd8a9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,7 @@ [tox] envlist = py26,py27,py31,py32,py33,py34 [testenv] -deps=pytest -commands=py.test {posargs} +deps= + pytest + mock +commands=py.test setuptools {posargs} From 3fcf597f4db0a82fabde4d06bc287b6573763496 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 13 Jan 2015 09:17:24 -0500 Subject: [PATCH 4862/8469] fix instances of consecutive articles (closes #23221) Patch by Karan Goel. --- dir_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir_util.py b/dir_util.py index 0924c9b0f7..d5cd8e3e24 100644 --- a/dir_util.py +++ b/dir_util.py @@ -81,7 +81,7 @@ def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. - 'base_dir' is just the a name of a directory which doesn't necessarily + 'base_dir' is just the name of a directory which doesn't necessarily exist yet; 'files' is a list of filenames to be interpreted relative to 'base_dir'. 'base_dir' + the directory portion of every file in 'files' will be created if it doesn't already exist. 'mode', 'verbose' and From 3789d73e316092bc2b65960f3fa8706bc0afa3c3 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 14 Jan 2015 23:56:35 -0500 Subject: [PATCH 4863/8469] fix parsing reST with code or code-block directives (closes #23063) Patch by Marc Abramowitz. --- command/check.py | 8 ++++---- tests/test_check.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/command/check.py b/command/check.py index 22b9349dd6..7ebe707cff 100644 --- a/command/check.py +++ b/command/check.py @@ -122,7 +122,7 @@ def _check_rst_data(self, data): """Returns warnings when the provided data doesn't compile.""" source_path = StringIO() parser = Parser() - settings = frontend.OptionParser().get_default_values() + settings = frontend.OptionParser(components=(Parser,)).get_default_values() settings.tab_width = 4 settings.pep_references = None settings.rfc_references = None @@ -138,8 +138,8 @@ def _check_rst_data(self, data): document.note_source(source_path, -1) try: parser.parse(data, document) - except AttributeError: - reporter.messages.append((-1, 'Could not finish the parsing.', - '', {})) + except AttributeError as e: + reporter.messages.append( + (-1, 'Could not finish the parsing: %s.' % e, '', {})) return reporter.messages diff --git a/tests/test_check.py b/tests/test_check.py index 601b68686b..959fa9085c 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,4 +1,5 @@ """Tests for distutils.command.check.""" +import textwrap import unittest from test.support import run_unittest @@ -92,6 +93,36 @@ def test_check_restructuredtext(self): cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEqual(cmd._warnings, 0) + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") + def test_check_restructuredtext_with_syntax_highlight(self): + # Don't fail if there is a `code` or `code-block` directive + + example_rst_docs = [] + example_rst_docs.append(textwrap.dedent("""\ + Here's some code: + + .. code:: python + + def foo(): + pass + """)) + example_rst_docs.append(textwrap.dedent("""\ + Here's some code: + + .. code-block:: python + + def foo(): + pass + """)) + + for rest_with_code in example_rst_docs: + pkg_info, dist = self.create_dist(long_description=rest_with_code) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEqual(cmd._warnings, 0) + msgs = cmd._check_rst_data(rest_with_code) + self.assertEqual(len(msgs), 0) + def test_check_all(self): metadata = {'url': 'xxx', 'author': 'xxx'} From cde1eb84bd1813ff4425fe6f05cbdeba8e410c13 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 15 Jan 2015 23:25:04 +0100 Subject: [PATCH 4864/8469] Use unittest.mock from standard library instead of external mock with Python >=3.3. --- setup.py | 3 +-- setuptools/tests/fixtures.py | 5 ++++- setuptools/tests/test_easy_install.py | 5 ++++- setuptools/tests/test_msvc9compiler.py | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b4b93b38e3..63093917cd 100755 --- a/setup.py +++ b/setup.py @@ -170,8 +170,7 @@ def build_package_data(self): tests_require=[ 'setuptools[ssl]', 'pytest', - 'mock', - ], + ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner, ) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 0b1eaf5f22..c70c38cb71 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,4 +1,7 @@ -import mock +try: + from unittest import mock +except ImportError: + import mock import pytest from . import contexts diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 72b040e1af..689860c3a6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,7 +15,10 @@ import itertools import pytest -import mock +try: + from unittest import mock +except ImportError: + import mock from setuptools import sandbox from setuptools import compat diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index a0820fff91..e54e7a6e18 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -7,7 +7,10 @@ import distutils.errors import pytest -import mock +try: + from unittest import mock +except ImportError: + import mock from . import contexts From 1cd6c9a1f6840ff82217a9e7059b8ec7049f3a32 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 19:41:04 -0500 Subject: [PATCH 4865/8469] Skip integration tests when SSL is broken. Ref #317. --- setuptools/tests/test_integration.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 92a27080f9..90bb43136c 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -12,6 +12,7 @@ from setuptools.command.easy_install import easy_install from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution +from setuptools.compat import urlopen def setup_module(module): @@ -24,6 +25,11 @@ def setup_module(module): except ImportError: pass + try: + urlopen('https://pypi.python.org/pypi') + except Exception as exc: + pytest.skip(reason=str(exc)) + @pytest.fixture def install_context(request, tmpdir, monkeypatch): From 3558c1a03584064e9bb86d3886009902eec6832d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 19:53:25 -0500 Subject: [PATCH 4866/8469] Have mock_install_dir actually yield the file name. Ref #317. --- setuptools/tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index e54e7a6e18..82c4d521af 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -173,4 +173,4 @@ def mock_install_dir(): vcvarsall = os.path.join(result, 'vcvarsall.bat') with open(vcvarsall, 'w'): pass - yield + yield vcvarsall From 903de3abdd20a96051cedad2f0f4287a3a4b11b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 20:48:10 -0500 Subject: [PATCH 4867/8469] Just the path is expected --- setuptools/tests/test_msvc9compiler.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 82c4d521af..0790e3d2e4 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -113,7 +113,8 @@ def test_prefer_current_user(self, user_preferred_setting): Ensure user's settings are preferred. """ result = distutils.msvc9compiler.find_vcvarsall(9.0) - assert user_preferred_setting == result + expected = os.path.join(user_preferred_setting, 'vcvarsall.bat') + assert expected == result @pytest.yield_fixture def local_machine_setting(self): @@ -134,7 +135,8 @@ def test_local_machine_recognized(self, local_machine_setting): Ensure machine setting is honored if user settings are not present. """ result = distutils.msvc9compiler.find_vcvarsall(9.0) - assert local_machine_setting == result + expected = os.path.join(local_machine_setting, 'vcvarsall.bat') + assert expected == result @pytest.yield_fixture def x64_preferred_setting(self): @@ -160,7 +162,8 @@ def test_ensure_64_bit_preferred(self, x64_preferred_setting): Ensure 64-bit system key is preferred. """ result = distutils.msvc9compiler.find_vcvarsall(9.0) - assert x64_preferred_setting == result + expected = os.path.join(x64_preferred_setting, 'vcvarsall.bat') + assert expected == result @staticmethod @contextlib.contextmanager @@ -173,4 +176,4 @@ def mock_install_dir(): vcvarsall = os.path.join(result, 'vcvarsall.bat') with open(vcvarsall, 'w'): pass - yield vcvarsall + yield result From 07dac60e9e33d9d74232eab325a3a8ad6a05e50d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 19:57:21 -0500 Subject: [PATCH 4868/8469] Remove unused import --- setuptools/msvc9_support.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index e76d70f079..2e4032b145 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1,5 +1,3 @@ -import sys - try: import distutils.msvc9compiler except ImportError: From 64f09ab5fb6c9c0a0344e50388022ee6e2e85d85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 20:28:02 -0500 Subject: [PATCH 4869/8469] Extract variables --- setuptools/msvc9_support.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 2e4032b145..a69c7474c8 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -27,13 +27,15 @@ def patch_for_specialized_compiler(): def find_vcvarsall(version): Reg = distutils.msvc9compiler.Reg VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' + key = VC_BASE % ('', version) try: # Per-user installs register the compiler path here - productdir = Reg.get_value(VC_BASE % ('', version), "installdir") + productdir = Reg.get_value(key, "installdir") except KeyError: try: # All-user installs on a 64-bit system register here - productdir = Reg.get_value(VC_BASE % ('Wow6432Node\\', version), "installdir") + key = VC_BASE % ('Wow6432Node\\', version) + productdir = Reg.get_value(key, "installdir") except KeyError: productdir = None From 21ebac859dff95cb593180f7fffdf74d8a5e5275 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Jan 2015 21:09:57 -0500 Subject: [PATCH 4870/8469] Fix failing test by reverting to author's original intent. Ref #317 --- setuptools/tests/test_msvc9compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 0790e3d2e4..09e0460c56 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -142,7 +142,7 @@ def test_local_machine_recognized(self, local_machine_setting): def x64_preferred_setting(self): """ Set up environment with 64-bit and 32-bit system settings configured - and yield the 64-bit location. + and yield the canonical location. """ with self.mock_install_dir() as x32_dir: with self.mock_install_dir() as x64_dir: @@ -155,7 +155,7 @@ def x64_preferred_setting(self): }, ) with reg: - yield x64_dir + yield x32_dir def test_ensure_64_bit_preferred(self, x64_preferred_setting): """ From 921fc3e28378598912d69d3f2a6ebdd090ed3e4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 15:33:09 -0500 Subject: [PATCH 4871/8469] Renamed .get_writer to .best and removed boolean argument. --- CHANGES.txt | 2 ++ setuptools/command/easy_install.py | 25 +++++++++++++++++++------ setuptools/command/install_scripts.py | 11 ++++++----- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index afec81561a..ad419d2539 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ CHANGES ``build.executable``, such that an executable of "/usr/bin/env my-python" may be specified. This means that systems with a specified executable whose name has spaces in the path must be updated to escape or quote that value. +* Deprecated ``easy_install.ScriptWriter.get_writer``, replaced by ``.best()`` + with slightly different semantics (no force_windows flag). ------ 11.3.1 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 340b1fac93..b61ab03494 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -742,7 +742,7 @@ def maybe_move(self, spec, dist_filename, setup_base): def install_wrapper_scripts(self, dist): if not self.exclude_scripts: - for args in ScriptWriter.get_args(dist): + for args in ScriptWriter.best().get_args(dist): self.write_script(*args) def install_script(self, dist, script_name, script_text, dev_path=None): @@ -1975,7 +1975,7 @@ class ScriptWriter(object): def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility warnings.warn("Use get_args", DeprecationWarning) - writer = cls.get_writer(wininst) + writer = (WindowsScriptWriter if wininst else ScriptWriter).best() header = cls.get_script_header("", executable, wininst) return writer.get_args(dist, header) @@ -2007,9 +2007,16 @@ def get_args(cls, dist, header=None): @classmethod def get_writer(cls, force_windows): - if force_windows or sys.platform == 'win32': - return WindowsScriptWriter.get_writer() - return cls + # for backward compatibility + warnings.warn("Use best", DeprecationWarning) + return WindowsScriptWriter.best() if force_windows else cls.best() + + @classmethod + def best(cls): + """ + Select the best ScriptWriter for this environment. + """ + return WindowsScriptWriter.best() if sys.platform == 'win32' else cls @classmethod def _get_script_args(cls, type_, name, header, script_text): @@ -2027,8 +2034,14 @@ def get_header(cls, script_text="", executable=None): class WindowsScriptWriter(ScriptWriter): @classmethod def get_writer(cls): + # for backward compatibility + warnings.warn("Use best", DeprecationWarning) + return cls.best() + + @classmethod + def best(cls): """ - Get a script writer suitable for Windows + Select the best ScriptWriter suitable for Windows """ writer_lookup = dict( executable=WindowsExecutableLauncherWriter, diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 722b0566ea..ad89c5fd6f 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -13,7 +13,7 @@ def initialize_options(self): self.no_ep = False def run(self): - from setuptools.command.easy_install import ScriptWriter, CommandSpec + import setuptools.command.easy_install as ei self.run_command("egg_info") if self.distribution.scripts: @@ -30,14 +30,15 @@ def run(self): ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') - cmd = CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) + cmd = ei.CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) is_wininst = getattr( self.get_finalized_command("bdist_wininst"), '_is_running', False ) + writer = ei.ScriptWriter if is_wininst: - cmd = CommandSpec.from_string("python.exe") - writer = ScriptWriter.get_writer(force_windows=is_wininst) - for args in writer.get_args(dist, cmd.as_header()): + cmd = ei.CommandSpec.from_string("python.exe") + writer = ei.WindowsScriptWriter + for args in writer.best().get_args(dist, cmd.as_header()): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): From 2e8bbf46b8fba71b22d20e69224d86e4750726c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 16:38:28 -0500 Subject: [PATCH 4872/8469] Bumped to 12.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f1e4aeaeb2..70d45e1598 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "11.3.2" +DEFAULT_VERSION = "12.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 1e71f92d11..f4e58d4652 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '11.3.2' +__version__ = '12.0' From fd43bed470262e8bb2dc87b78886ccca52b8ce52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 16:38:31 -0500 Subject: [PATCH 4873/8469] Added tag 12.0 for changeset 55666947c9eb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 343bfa9e6b..4763ed8196 100644 --- a/.hgtags +++ b/.hgtags @@ -186,3 +186,4 @@ b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 a1a6a1ac9113b90009052ca7263174a488434099 11.3 1116e568f534ad8f4f41328a0f5fa183eb739c90 11.3.1 +55666947c9eb7e3ba78081ad6ae004807c84aede 12.0 From cda3ccf5c2b87212ca53b91fb782e2b858686dd3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 16:39:06 -0500 Subject: [PATCH 4874/8469] Bumped to 12.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 70d45e1598..dd1fea71b0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0" +DEFAULT_VERSION = "12.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index f4e58d4652..9e9002b4d2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0' +__version__ = '12.1' From 072653066beade0dc5fde02c26e747002ab80baa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 17:22:22 -0500 Subject: [PATCH 4875/8469] Restore setuptools.command.easy_install.sys_executable for pbr compatibility. --- CHANGES.txt | 8 ++++++++ setuptools/command/easy_install.py | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ad419d2539..d67758763e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +------ +12.0.1 +------ + +* Restore ``setuptools.command.easy_install.sys_executable`` for pbr + compatibility. For the future, tools should construct a CommandSpec + explicitly. + ---- 12.0 ---- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b61ab03494..adb18140cc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -56,7 +56,6 @@ ) import pkg_resources - # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) @@ -1917,6 +1916,9 @@ def _render(items): cmdline = subprocess.list2cmdline(items) return '#!' + cmdline + '\n' +# For pbr compat; will be removed in a future version. +sys_executable = CommandSpec._sys_executable() + class JythonCommandSpec(CommandSpec): @classmethod @@ -2238,4 +2240,3 @@ def gen_usage(script_name): yield finally: distutils.core.gen_usage = saved - From 085191a65831a18f81bd654d2171bcb7b0b3381a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 17:37:36 -0500 Subject: [PATCH 4876/8469] Bumped to 12.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index dd1fea71b0..040a1c26b4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.1" +DEFAULT_VERSION = "12.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 9e9002b4d2..06db60e2b6 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.1' +__version__ = '12.0.1' From f1c04084ce88023ead9ef12b1aa7756fb1cb94b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 17:37:38 -0500 Subject: [PATCH 4877/8469] Added tag 12.0.1 for changeset 747018b2e35a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4763ed8196..8e3336491a 100644 --- a/.hgtags +++ b/.hgtags @@ -187,3 +187,4 @@ feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 a1a6a1ac9113b90009052ca7263174a488434099 11.3 1116e568f534ad8f4f41328a0f5fa183eb739c90 11.3.1 55666947c9eb7e3ba78081ad6ae004807c84aede 12.0 +747018b2e35a40cb4b1c444f150f013d02197c64 12.0.1 From 57fb24d60656bc99192c9768ff04dd78de9ef695 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Jan 2015 17:38:07 -0500 Subject: [PATCH 4878/8469] Bumped to 12.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 040a1c26b4..d86456fe54 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.1" +DEFAULT_VERSION = "12.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 06db60e2b6..dd108765cb 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.1' +__version__ = '12.0.2' From fd7fb7ade0fc879e24543f13c39b00de073004bc Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 17 Jan 2015 21:41:55 +0100 Subject: [PATCH 4879/8469] Fix "AttributeError: 'TarFile' object has no attribute '__exit__'" with Python 3.1. --- setuptools/tests/py26compat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index c53b480926..c56808816e 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -8,4 +8,7 @@ def _tarfile_open_ex(*args, **kwargs): """ return contextlib.closing(tarfile.open(*args, **kwargs)) -tarfile_open = _tarfile_open_ex if sys.version_info < (2,7) else tarfile.open +if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2): + tarfile_open = _tarfile_open_ex +else: + tarfile_open = tarfile.open From 49a3b4c156062e4212ed59e2061a178577196fb6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 15:51:42 -0500 Subject: [PATCH 4880/8469] Remove unintended shebang. Fixes #333. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 689860c3a6..5e36044d30 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,4 +1,4 @@ -#! -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """Easy install Tests """ From f2685d1d9311fa2603ea069d4ed13a74624c8f8c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:22:59 -0500 Subject: [PATCH 4881/8469] Extract messages as class attributes for nicer indentation. --- setuptools/command/easy_install.py | 161 ++++++++++++++++------------- 1 file changed, 88 insertions(+), 73 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index adb18140cc..fcd96bea34 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -445,43 +445,49 @@ def check_site_dir(self): self.pth_file = None # and don't create a .pth file self.install_dir = instdir - def cant_write_to_target(self): - template = """can't create or remove files in install directory + __cant_write_msg = textwrap.dedent(""" + can't create or remove files in install directory -The following error occurred while trying to add or remove files in the -installation directory: + The following error occurred while trying to add or remove files in the + installation directory: - %s + %s -The installation directory you specified (via --install-dir, --prefix, or -the distutils default setting) was: + The installation directory you specified (via --install-dir, --prefix, or + the distutils default setting) was: - %s -""" - msg = template % (sys.exc_info()[1], self.install_dir,) + %s + """).lstrip() - if not os.path.exists(self.install_dir): - msg += """ -This directory does not currently exist. Please create it and try again, or -choose a different installation directory (using the -d or --install-dir -option). -""" - else: - msg += """ -Perhaps your account does not have write access to this directory? If the -installation directory is a system-owned directory, you may need to sign in -as the administrator or "root" account. If you do not have administrative -access to this machine, you may wish to choose a different installation -directory, preferably one that is listed in your PYTHONPATH environment -variable. + __not_exists_id = textwrap.dedent(""" + This directory does not currently exist. Please create it and try again, or + choose a different installation directory (using the -d or --install-dir + option). + """).lstrip() -For information on other options, you may wish to consult the -documentation at: + __access_msg = textwrap.dedent(""" + Perhaps your account does not have write access to this directory? If the + installation directory is a system-owned directory, you may need to sign in + as the administrator or "root" account. If you do not have administrative + access to this machine, you may wish to choose a different installation + directory, preferably one that is listed in your PYTHONPATH environment + variable. - https://pythonhosted.org/setuptools/easy_install.html + For information on other options, you may wish to consult the + documentation at: -Please make the appropriate changes for your system and try again. -""" + https://pythonhosted.org/setuptools/easy_install.html + + Please make the appropriate changes for your system and try again. + """).lstrip() + + def cant_write_to_target(self): + msg = self._cant_write_msg % (sys.exc_info()[1], self.install_dir,) + + if not os.path.exists(self.install_dir): + msg += '\n' + self.__not_exists_id + else: + msg += '\n' + self.__access_msg raise DistutilsError(msg) def check_pth_processing(self): @@ -979,46 +985,52 @@ def process(src, dst): f.write('\n'.join(locals()[name]) + '\n') f.close() + __mv_warning = textwrap.dedent(""" + Because this distribution was installed --multi-version, before you can + import modules from this package in an application, you will need to + 'import pkg_resources' and then use a 'require()' call similar to one of + these examples, in order to select the desired version: + + pkg_resources.require("%(name)s") # latest installed version + pkg_resources.require("%(name)s==%(version)s") # this exact version + pkg_resources.require("%(name)s>=%(version)s") # this version or higher + """).lstrip() + + __id_warning = textwrap.dedent(""" + Note also that the installation directory must be on sys.path at runtime for + this to work. (e.g. by being the application's script directory, by being on + PYTHONPATH, or by being added to sys.path by your code.) + """) + def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" msg = "\n%(what)s %(eggloc)s%(extras)s" if self.multi_version and not self.no_report: - msg += """ - -Because this distribution was installed --multi-version, before you can -import modules from this package in an application, you will need to -'import pkg_resources' and then use a 'require()' call similar to one of -these examples, in order to select the desired version: - - pkg_resources.require("%(name)s") # latest installed version - pkg_resources.require("%(name)s==%(version)s") # this exact version - pkg_resources.require("%(name)s>=%(version)s") # this version or higher -""" + msg += '\n' + self.__mv_warning if self.install_dir not in map(normalize_path, sys.path): - msg += """ + msg += '\n' + self.__id_warning -Note also that the installation directory must be on sys.path at runtime for -this to work. (e.g. by being the application's script directory, by being on -PYTHONPATH, or by being added to sys.path by your code.) -""" eggloc = dist.location name = dist.project_name version = dist.version extras = '' # TODO: self.report_extras(req, dist) return msg % locals() - def report_editable(self, spec, setup_script): - dirname = os.path.dirname(setup_script) - python = sys.executable - return """\nExtracted editable version of %(spec)s to %(dirname)s + __editable_msg = textwrap.dedent(""" + Extracted editable version of %(spec)s to %(dirname)s -If it uses setuptools in its setup script, you can activate it in -"development" mode by going to that directory and running:: + If it uses setuptools in its setup script, you can activate it in + "development" mode by going to that directory and running:: - %(python)s setup.py develop + %(python)s setup.py develop -See the setuptools documentation for the "develop" command for more info. -""" % locals() + See the setuptools documentation for the "develop" command for more info. + """).lstrip() + + def report_editable(self, spec, setup_script): + dirname = os.path.dirname(setup_script) + python = sys.executable + return '\n' + self.__editable_msg % locals() def run_setup(self, setup_script, setup_base, args): sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg) @@ -1169,35 +1181,38 @@ def byte_compile(self, to_compile): finally: log.set_verbosity(self.verbose) # restore original verbosity - def no_default_version_msg(self): - template = """bad install directory or PYTHONPATH + __no_default_msg = textwrap.dedent(""" + bad install directory or PYTHONPATH -You are attempting to install a package to a directory that is not -on PYTHONPATH and which Python does not read ".pth" files from. The -installation directory you specified (via --install-dir, --prefix, or -the distutils default setting) was: + You are attempting to install a package to a directory that is not + on PYTHONPATH and which Python does not read ".pth" files from. The + installation directory you specified (via --install-dir, --prefix, or + the distutils default setting) was: - %s + %s -and your PYTHONPATH environment variable currently contains: + and your PYTHONPATH environment variable currently contains: - %r + %r -Here are some of your options for correcting the problem: + Here are some of your options for correcting the problem: -* You can choose a different installation directory, i.e., one that is - on PYTHONPATH or supports .pth files + * You can choose a different installation directory, i.e., one that is + on PYTHONPATH or supports .pth files -* You can add the installation directory to the PYTHONPATH environment - variable. (It must then also be on PYTHONPATH whenever you run - Python and want to use the package(s) you are installing.) + * You can add the installation directory to the PYTHONPATH environment + variable. (It must then also be on PYTHONPATH whenever you run + Python and want to use the package(s) you are installing.) -* You can set up the installation directory to support ".pth" files by - using one of the approaches described here: + * You can set up the installation directory to support ".pth" files by + using one of the approaches described here: - https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations + https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations -Please make the appropriate changes for your system and try again.""" + Please make the appropriate changes for your system and try again.""").lstrip() + + def no_default_version_msg(self): + template = self.__no_default_msg return template % (self.install_dir, os.environ.get('PYTHONPATH', '')) def install_site_py(self): From 7cf2343ad9f5b77992422598d27d1f70e9473db0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:45:22 -0500 Subject: [PATCH 4882/8469] Extract variable for bdist_wininst command --- setuptools/command/install_scripts.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index ad89c5fd6f..cad524ec89 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -31,9 +31,8 @@ def run(self): ) bs_cmd = self.get_finalized_command('build_scripts') cmd = ei.CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) - is_wininst = getattr( - self.get_finalized_command("bdist_wininst"), '_is_running', False - ) + bw_cmd = self.get_finalized_command("bdist_wininst") + is_wininst = getattr(bw_cmd, '_is_running', False) writer = ei.ScriptWriter if is_wininst: cmd = ei.CommandSpec.from_string("python.exe") From 0d32bf350dce5cf21c821b9216799fa53550c5c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:46:46 -0500 Subject: [PATCH 4883/8469] Extract variable for exec_param --- setuptools/command/install_scripts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index cad524ec89..f85f452022 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -30,7 +30,8 @@ def run(self): ei_cmd.egg_name, ei_cmd.egg_version, ) bs_cmd = self.get_finalized_command('build_scripts') - cmd = ei.CommandSpec.from_param(getattr(bs_cmd, 'executable', None)) + exec_param = getattr(bs_cmd, 'executable', None) + cmd = ei.CommandSpec.from_param(exec_param) bw_cmd = self.get_finalized_command("bdist_wininst") is_wininst = getattr(bw_cmd, '_is_running', False) writer = ei.ScriptWriter From 0a0f7d5816fa7e42fd787d4923265adc965e1360 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:54:01 -0500 Subject: [PATCH 4884/8469] Defer resolution of the CommandSpec and do it exactly once. --- setuptools/command/install_scripts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index f85f452022..af079fbb15 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -31,13 +31,13 @@ def run(self): ) bs_cmd = self.get_finalized_command('build_scripts') exec_param = getattr(bs_cmd, 'executable', None) - cmd = ei.CommandSpec.from_param(exec_param) bw_cmd = self.get_finalized_command("bdist_wininst") is_wininst = getattr(bw_cmd, '_is_running', False) writer = ei.ScriptWriter if is_wininst: - cmd = ei.CommandSpec.from_string("python.exe") + exec_param = "python.exe" writer = ei.WindowsScriptWriter + cmd = ei.CommandSpec.from_param(exec_param) for args in writer.best().get_args(dist, cmd.as_header()): self.write_script(*args) From 97f96e8cd4d1938095101f26a28f17d6a3f97435 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:55:09 -0500 Subject: [PATCH 4885/8469] Extract writer resolution as a variable --- setuptools/command/install_scripts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index af079fbb15..8d251ee724 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -37,8 +37,10 @@ def run(self): if is_wininst: exec_param = "python.exe" writer = ei.WindowsScriptWriter + # resolve the writer to the environment + writer = writer.best() cmd = ei.CommandSpec.from_param(exec_param) - for args in writer.best().get_args(dist, cmd.as_header()): + for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) def write_script(self, script_name, contents, mode="t", *ignored): From 43ffa78752de38190b2480b68d9ad908cf1b7fa5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 19:57:02 -0500 Subject: [PATCH 4886/8469] Allow the CommandSpec class to be resolved by the writer. --- setuptools/command/easy_install.py | 2 ++ setuptools/command/install_scripts.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index fcd96bea34..9d25a1397b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1988,6 +1988,8 @@ class ScriptWriter(object): ) """).lstrip() + command_spec_class = CommandSpec + @classmethod def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 8d251ee724..9d4ac4207b 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,7 +39,7 @@ def run(self): writer = ei.WindowsScriptWriter # resolve the writer to the environment writer = writer.best() - cmd = ei.CommandSpec.from_param(exec_param) + cmd = writer.command_spec_cls.from_param(exec_param) for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) From 659e2bd057382e4819f38c2c77ff3b7783d63c6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:11:29 -0500 Subject: [PATCH 4887/8469] Adding test capturing failure where sys.executable loses backslashes on Windows. Ref #331. --- setuptools/tests/test_easy_install.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 5e36044d30..914613647d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -517,3 +517,11 @@ def test_from_simple_string_uses_shlex(self): cmd = CommandSpec.from_param('/usr/bin/env my-python') assert len(cmd) == 2 assert '"' not in cmd.as_header() + + def test_sys_executable(self): + """ + CommandSpec.from_string(sys.executable) should contain just that param. + """ + cmd = CommandSpec.from_string(sys.executable) + assert len(cmd) == 1 + assert cmd[0] == sys.executable From 246a5982a37f38c70012326577278582f0b01ef2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:17:12 -0500 Subject: [PATCH 4888/8469] Use the command spec as resolved by the best ScriptWriter. --- setuptools/tests/test_easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 914613647d..cbbe99db6e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -522,6 +522,7 @@ def test_sys_executable(self): """ CommandSpec.from_string(sys.executable) should contain just that param. """ - cmd = CommandSpec.from_string(sys.executable) + writer = ScriptWriter.best() + cmd = writer.command_spec_class.from_string(sys.executable) assert len(cmd) == 1 assert cmd[0] == sys.executable From 8711abcb4bac42e771647718e6994c6847e0383a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:18:38 -0500 Subject: [PATCH 4889/8469] Also use command_spec_class in ScriptWriter. --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9d25a1397b..137193f139 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2004,7 +2004,7 @@ def get_script_header(cls, script_text, executable=None, wininst=False): warnings.warn("Use get_header", DeprecationWarning) if wininst: executable = "python.exe" - cmd = CommandSpec.from_param(executable) + cmd = cls.command_spec_class.from_param(executable) cmd.install_options(script_text) return cmd.as_header() @@ -2045,7 +2045,7 @@ def _get_script_args(cls, type_, name, header, script_text): @classmethod def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" - cmd = CommandSpec.from_param(executable) + cmd = cls.command_spec_class.from_param(executable) cmd.install_options(script_text) return cmd.as_header() From 27ffea086d37a26dbac2ebbd8b1e0edb4c8a803e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:27:56 -0500 Subject: [PATCH 4890/8469] Use non-posix semantics in a WindowsCommandSpec and use that class in the Windows script writers. Fixes #331. --- setuptools/command/easy_install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 137193f139..541666cee2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1873,6 +1873,7 @@ class CommandSpec(list): """ options = [] + split_args = dict() @classmethod def _sys_executable(cls): @@ -1904,7 +1905,7 @@ def from_string(cls, string): Construct a command spec from a simple string representing a command line parseable by shlex.split. """ - items = shlex.split(string) + items = shlex.split(string, **cls.split_args) return JythonCommandSpec.from_string(string) or cls(items) def install_options(self, script_text): @@ -1935,6 +1936,10 @@ def _render(items): sys_executable = CommandSpec._sys_executable() +class WindowsCommandSpec(CommandSpec): + split_args = dict(posix=False) + + class JythonCommandSpec(CommandSpec): @classmethod def from_string(cls, string): @@ -2051,6 +2056,8 @@ def get_header(cls, script_text="", executable=None): class WindowsScriptWriter(ScriptWriter): + command_spec_class = WindowsCommandSpec + @classmethod def get_writer(cls): # for backward compatibility From 768ffcf6707173a6ca34e71ba8776d282ccd41bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:32:31 -0500 Subject: [PATCH 4891/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d67758763e..e9da34d2fb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +12.0.2 +------ + +* Issue #331: Fixed ``install_scripts`` command on Windows systems corrupting + the header. + ------ 12.0.1 ------ From 4fb993309210598e35e6db7bef9dcd6f19bb2117 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:34:55 -0500 Subject: [PATCH 4892/8469] Added tag 12.0.2 for changeset a177ea34bf81 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8e3336491a..7542030ccd 100644 --- a/.hgtags +++ b/.hgtags @@ -188,3 +188,4 @@ a1a6a1ac9113b90009052ca7263174a488434099 11.3 1116e568f534ad8f4f41328a0f5fa183eb739c90 11.3.1 55666947c9eb7e3ba78081ad6ae004807c84aede 12.0 747018b2e35a40cb4b1c444f150f013d02197c64 12.0.1 +a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 From c1f5cdb9d49d2dc6872c1c51a94dbcc95526666a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:35:36 -0500 Subject: [PATCH 4893/8469] Bumped to 12.0.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d86456fe54..1a33e27645 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.2" +DEFAULT_VERSION = "12.0.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index dd108765cb..410c5970ca 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.2' +__version__ = '12.0.3' From e584d52bc8080aa0e1dfec9514068bfef175b7fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:46:32 -0500 Subject: [PATCH 4894/8469] Correct command reference. --- setuptools/command/install_scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 9d4ac4207b..20c2cce9f7 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,7 +39,7 @@ def run(self): writer = ei.WindowsScriptWriter # resolve the writer to the environment writer = writer.best() - cmd = writer.command_spec_cls.from_param(exec_param) + cmd = writer.command_spec_class.from_param(exec_param) for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) From 45ee5d3515f43c022ad4587f31325135c5ce4a3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:48:20 -0500 Subject: [PATCH 4895/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index e9da34d2fb..80a9e9c9d0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +12.0.3 +------ + +* Fixed incorrect class attribute in ``install_scripts``. Tests would be nice. + ------ 12.0.2 ------ From df3410f0134a756c9d8ef659694157985fa86aba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:48:32 -0500 Subject: [PATCH 4896/8469] Added tag 12.0.3 for changeset bf8c5bcacd49 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7542030ccd..dd756cbcb4 100644 --- a/.hgtags +++ b/.hgtags @@ -189,3 +189,4 @@ a1a6a1ac9113b90009052ca7263174a488434099 11.3 55666947c9eb7e3ba78081ad6ae004807c84aede 12.0 747018b2e35a40cb4b1c444f150f013d02197c64 12.0.1 a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 +bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 From c808d232427ed8072b3b46b9e1c03df9d4cf9f76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Jan 2015 20:49:13 -0500 Subject: [PATCH 4897/8469] Bumped to 12.0.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 1a33e27645..2d7611c083 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.3" +DEFAULT_VERSION = "12.0.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 410c5970ca..2527f6f75a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.3' +__version__ = '12.0.4' From ad794c2809cc2ad0a48a14129dca82996f14af28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 20:33:29 -0500 Subject: [PATCH 4898/8469] Use a .best classmethod to resolve JythonCommandSpec when relevant. --- setuptools/command/easy_install.py | 35 +++++++++++++++++---------- setuptools/command/install_scripts.py | 2 +- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dda183c817..9978c132dc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1875,6 +1875,13 @@ class CommandSpec(list): options = [] split_args = dict() + @classmethod + def best(cls): + """ + Choose the best CommandSpec class based on environmental conditions. + """ + return cls if not JythonCommandSpec.relevant() else JythonCommandSpec + @classmethod def _sys_executable(cls): _default = os.path.normpath(sys.executable) @@ -1897,9 +1904,7 @@ def from_param(cls, param): @classmethod def from_environment(cls): - string = '"' + cls._sys_executable() + '"' - jython_spec = JythonCommandSpec.from_string(string) - return jython_spec or cls([cls._sys_executable()]) + return cls([cls._sys_executable()]) @classmethod def from_string(cls, string): @@ -1908,7 +1913,7 @@ def from_string(cls, string): line parseable by shlex.split. """ items = shlex.split(string, **cls.split_args) - return JythonCommandSpec.from_string(string) or cls(items) + return cls(items) def install_options(self, script_text): self.options = shlex.split(self._extract_options(script_text)) @@ -1944,17 +1949,21 @@ class WindowsCommandSpec(CommandSpec): class JythonCommandSpec(CommandSpec): @classmethod - def from_string(cls, string): - """ - On Jython, construct an instance of this class. - On platforms other than Jython, return None. - """ - needs_jython_spec = ( + def relevant(cls): + return ( sys.platform.startswith('java') and __import__('java').lang.System.getProperty('os.name') != 'Linux' ) - return cls([string]) if needs_jython_spec else None + + @classmethod + def from_environment(cls): + string = '"' + cls._sys_executable() + '"' + return cls.from_string(string) + + @classmethod + def from_string(cls, string): + return cls([string]) def as_header(self): """ @@ -2011,7 +2020,7 @@ def get_script_header(cls, script_text, executable=None, wininst=False): warnings.warn("Use get_header", DeprecationWarning) if wininst: executable = "python.exe" - cmd = cls.command_spec_class.from_param(executable) + cmd = cls.command_spec_class.best().from_param(executable) cmd.install_options(script_text) return cmd.as_header() @@ -2052,7 +2061,7 @@ def _get_script_args(cls, type_, name, header, script_text): @classmethod def get_header(cls, script_text="", executable=None): """Create a #! line, getting options (if any) from script_text""" - cmd = cls.command_spec_class.from_param(executable) + cmd = cls.command_spec_class.best().from_param(executable) cmd.install_options(script_text) return cmd.as_header() diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 20c2cce9f7..be66cb2252 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -39,7 +39,7 @@ def run(self): writer = ei.WindowsScriptWriter # resolve the writer to the environment writer = writer.best() - cmd = writer.command_spec_class.from_param(exec_param) + cmd = writer.command_spec_class.best().from_param(exec_param) for args in writer.get_args(dist, cmd.as_header()): self.write_script(*args) From 9209b9f7ce6ecb4d9518037b2463bbedd544dcfc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 20:48:18 -0500 Subject: [PATCH 4899/8469] Decode file as latin-1 when opening to ensure decoding any bytes. --- setuptools/command/easy_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9978c132dc..5e25f2cd20 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1801,9 +1801,8 @@ def is_python(text, filename=''): def is_sh(executable): """Determine if the specified executable is a .sh (contains a #! line)""" try: - fp = open(executable) - magic = fp.read(2) - fp.close() + with open(executable, encoding='latin-1') as fp: + magic = fp.read(2) except (OSError, IOError): return executable return magic == '#!' From adbb4edde04b071e4b092b675bb0c2ffb66a0977 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 21:03:56 -0500 Subject: [PATCH 4900/8469] Deprecate fix_jython_executable and replace with JythonCommandSpec --- setuptools/command/easy_install.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5e25f2cd20..b8efff73f1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1844,25 +1844,14 @@ def chmod(path, mode): def fix_jython_executable(executable, options): - if sys.platform.startswith('java') and is_sh(executable): - # Workaround for Jython is not needed on Linux systems. - import java + warnings.warn("Use JythonCommandSpec", DeprecationWarning, stacklevel=2) - if java.lang.System.getProperty("os.name") == "Linux": - return executable + if not JythonCommandSpec.relevant(): + return executable - # Workaround Jython's sys.executable being a .sh (an invalid - # shebang line interpreter) - if options: - # Can't apply the workaround, leave it broken - log.warn( - "WARNING: Unable to adapt shebang line for Jython," - " the following script is NOT executable\n" - " see http://bugs.jython.org/issue1112 for" - " more information.") - else: - return '/usr/bin/env %s' % executable - return executable + cmd = CommandSpec.best().from_param(executable) + cmd.install_options(options) + return cmd.as_header().lstrip('#!').rstrip('\n') class CommandSpec(list): From 0a81b14fbfdf9b41bf128c99da42a374dff6122a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 21:05:41 -0500 Subject: [PATCH 4901/8469] Replace use of fix_jython_executable with CommandSpec invocation. --- setuptools/tests/test_easy_install.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a2f26e0885..3be829c56a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -26,7 +26,7 @@ from setuptools.sandbox import run_setup import setuptools.command.easy_install as ei from setuptools.command.easy_install import ( - easy_install, fix_jython_executable, nt_quote_arg, + easy_install, nt_quote_arg, is_sh, ScriptWriter, CommandSpec, ) from setuptools.command.easy_install import PthDistributions @@ -51,8 +51,7 @@ def get_entry_map(self, group): def as_requirement(self): return 'spec' -WANTED = DALS(""" - #!%s +WANTED = ei.CommandSpec.best().from_environment().as_header() + DALS(""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' import sys @@ -62,7 +61,7 @@ def as_requirement(self): sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) - """) % nt_quote_arg(fix_jython_executable(sys.executable, "")) + """) SETUP_PY = DALS(""" from setuptools import setup From 2554cbb108a56ab4932e7f1a773f5a57abdabcd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 21:09:10 -0500 Subject: [PATCH 4902/8469] Use module namespace. --- setuptools/tests/test_easy_install.py | 51 +++++++++++++-------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3be829c56a..51d6f09421 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -25,10 +25,6 @@ from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup import setuptools.command.easy_install as ei -from setuptools.command.easy_install import ( - easy_install, nt_quote_arg, - is_sh, ScriptWriter, CommandSpec, -) from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution @@ -73,7 +69,7 @@ class TestEasyInstallTest: def test_install_site_py(self): dist = Distribution() - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.sitepy_installed = False cmd.install_dir = tempfile.mkdtemp() try: @@ -86,7 +82,7 @@ def test_install_site_py(self): def test_get_script_args(self): dist = FakeDist() - args = next(ScriptWriter.get_args(dist)) + args = next(ei.ScriptWriter.get_args(dist)) name, script = itertools.islice(args, 2) assert script == WANTED @@ -95,7 +91,7 @@ def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at # the project level dist = Distribution() - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.check_pth_processing = lambda: True cmd.no_find_links = True cmd.find_links = ['link1', 'link2'] @@ -105,7 +101,7 @@ def test_no_find_links(self): assert cmd.package_index.scanned_urls == {} # let's try without it (default behavior) - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.check_pth_processing = lambda: True cmd.find_links = ['link1', 'link2'] cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok') @@ -154,7 +150,7 @@ def test_user_install_implied(self): #XXX: replace with something meaningfull dist = Distribution() dist.script_name = 'setup.py' - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.args = ['py'] cmd.ensure_finalized() assert cmd.user, 'user should be implied' @@ -175,7 +171,7 @@ def test_user_install_not_implied_without_usersite_enabled(self): #XXX: replace with something meaningfull dist = Distribution() dist.script_name = 'setup.py' - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.args = ['py'] cmd.initialize_options() assert not cmd.user, 'NOT user should be implied' @@ -196,7 +192,7 @@ def test_local_index(self): try: dist = Distribution() dist.script_name = 'setup.py' - cmd = easy_install(dist) + cmd = ei.easy_install(dist) cmd.install_dir = target cmd.args = ['foo'] cmd.ensure_finalized() @@ -423,24 +419,25 @@ class TestScriptHeader: exe_with_spaces = r'C:\Program Files\Python33\python.exe' @pytest.mark.skipif( - sys.platform.startswith('java') and is_sh(sys.executable), + sys.platform.startswith('java') and ei.is_sh(sys.executable), reason="Test cannot run under java when executable is sh" ) def test_get_script_header(self): - expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) - actual = ScriptWriter.get_script_header('#!/usr/local/bin/python') + expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable)) + actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python') assert actual == expected - expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) - actual = ScriptWriter.get_script_header('#!/usr/bin/python -x') + expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath + (sys.executable)) + actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x') assert actual == expected - actual = ScriptWriter.get_script_header('#!/usr/bin/python', + actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) expected = '#!%s -x\n' % self.non_ascii_exe assert actual == expected - actual = ScriptWriter.get_script_header('#!/usr/bin/python', + actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable='"'+self.exe_with_spaces+'"') expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected @@ -463,7 +460,7 @@ def test_get_script_header_jython_workaround(self, tmpdir): f.write(header) exe = str(exe) - header = ScriptWriter.get_script_header('#!/usr/local/bin/python', + header = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python', executable=exe) assert header == '#!/usr/bin/env %s\n' % exe @@ -472,14 +469,14 @@ def test_get_script_header_jython_workaround(self, tmpdir): with contexts.quiet() as (stdout, stderr): # When options are included, generate a broken shebang line # with a warning emitted - candidate = ScriptWriter.get_script_header('#!/usr/bin/python -x', + candidate = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x', executable=exe) assert candidate == '#!%s -x\n' % exe output = locals()[expect_out] assert 'Unable to adapt shebang line' in output.getvalue() with contexts.quiet() as (stdout, stderr): - candidate = ScriptWriter.get_script_header('#!/usr/bin/python', + candidate = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) assert candidate == '#!%s -x\n' % self.non_ascii_exe output = locals()[expect_out] @@ -492,20 +489,20 @@ def test_custom_launch_command(self): Show how a custom CommandSpec could be used to specify a #! executable which takes parameters. """ - cmd = CommandSpec(['/usr/bin/env', 'python3']) + cmd = ei.CommandSpec(['/usr/bin/env', 'python3']) assert cmd.as_header() == '#!/usr/bin/env python3\n' def test_from_param_for_CommandSpec_is_passthrough(self): """ from_param should return an instance of a CommandSpec """ - cmd = CommandSpec(['python']) - cmd_new = CommandSpec.from_param(cmd) + cmd = ei.CommandSpec(['python']) + cmd_new = ei.CommandSpec.from_param(cmd) assert cmd is cmd_new def test_from_environment_with_spaces_in_executable(self): with mock.patch('sys.executable', TestScriptHeader.exe_with_spaces): - cmd = CommandSpec.from_environment() + cmd = ei.CommandSpec.from_environment() assert len(cmd) == 1 assert cmd.as_header().startswith('#!"') @@ -514,7 +511,7 @@ def test_from_simple_string_uses_shlex(self): In order to support `executable = /usr/bin/env my-python`, make sure from_param invokes shlex on that input. """ - cmd = CommandSpec.from_param('/usr/bin/env my-python') + cmd = ei.CommandSpec.from_param('/usr/bin/env my-python') assert len(cmd) == 2 assert '"' not in cmd.as_header() @@ -522,7 +519,7 @@ def test_sys_executable(self): """ CommandSpec.from_string(sys.executable) should contain just that param. """ - writer = ScriptWriter.best() + writer = ei.ScriptWriter.best() cmd = writer.command_spec_class.from_string(sys.executable) assert len(cmd) == 1 assert cmd[0] == sys.executable From 209fbc31d5df376de6db40bc6b1d1d50e87a0a83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 21:11:36 -0500 Subject: [PATCH 4903/8469] Move global into the only method where it's used. --- setuptools/tests/test_easy_install.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 51d6f09421..ab6a8f0dab 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -47,18 +47,6 @@ def get_entry_map(self, group): def as_requirement(self): return 'spec' -WANTED = ei.CommandSpec.best().from_environment().as_header() + DALS(""" - # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' - __requires__ = 'spec' - import sys - from pkg_resources import load_entry_point - - if __name__ == '__main__': - sys.exit( - load_entry_point('spec', 'console_scripts', 'name')() - ) - """) - SETUP_PY = DALS(""" from setuptools import setup @@ -80,12 +68,24 @@ def test_install_site_py(self): shutil.rmtree(cmd.install_dir) def test_get_script_args(self): + header = ei.CommandSpec.best().from_environment().as_header() + expected = header + DALS(""" + # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' + __requires__ = 'spec' + import sys + from pkg_resources import load_entry_point + + if __name__ == '__main__': + sys.exit( + load_entry_point('spec', 'console_scripts', 'name')() + ) + """) dist = FakeDist() args = next(ei.ScriptWriter.get_args(dist)) name, script = itertools.islice(args, 2) - assert script == WANTED + assert script == expected def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at From d66e85f360940a5e583ef6a363d20e8aa8cfd486 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 21:47:02 -0500 Subject: [PATCH 4904/8469] Use io module for Python 2 compatibility --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b8efff73f1..206fc58dc6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -37,6 +37,7 @@ import contextlib import subprocess import shlex +import io from setuptools import Command from setuptools.sandbox import run_setup @@ -1801,7 +1802,7 @@ def is_python(text, filename=''): def is_sh(executable): """Determine if the specified executable is a .sh (contains a #! line)""" try: - with open(executable, encoding='latin-1') as fp: + with io.open(executable, encoding='latin-1') as fp: magic = fp.read(2) except (OSError, IOError): return executable From d3e60f4d454d43f0b0bf3d5e0811bf5b8fbeb92d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 22:06:15 -0500 Subject: [PATCH 4905/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 80a9e9c9d0..97c16c5e22 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +12.0.4 +------ + +* Issue #335: Fix script header generation on Windows. + ------ 12.0.3 ------ From fe1968668732b7a60e94b311d59182a9d710cac7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 22:08:41 -0500 Subject: [PATCH 4906/8469] Added tag 12.0.4 for changeset 73dcfc90e3ee --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dd756cbcb4..99bd72930e 100644 --- a/.hgtags +++ b/.hgtags @@ -190,3 +190,4 @@ a1a6a1ac9113b90009052ca7263174a488434099 11.3 747018b2e35a40cb4b1c444f150f013d02197c64 12.0.1 a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 +73dcfc90e3eecec6baddea19302c6b342e68e2fa 12.0.4 From 71f6d20fcaa959ef429aa162d1f7c1fa73f52a44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 22:16:20 -0500 Subject: [PATCH 4907/8469] Bumped to 12.0.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2d7611c083..a720627825 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -36,7 +36,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.4" +DEFAULT_VERSION = "12.0.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): diff --git a/setuptools/version.py b/setuptools/version.py index 2527f6f75a..8bb69c5f6d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.4' +__version__ = '12.0.5' From 2cf86e6e6e8f68370eb797eade989168b37edcf1 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 19 Jan 2015 21:11:33 +1100 Subject: [PATCH 4908/8469] pep8 and pep257 compliance --- ez_setup.py | 85 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a720627825..bbcef8c703 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -"""Bootstrap setuptools installation +"""Bootstrap setuptools installation. To use setuptools in your package's setup.py, include this file in the same directory and add this to the top of your setup.py:: @@ -39,8 +39,11 @@ DEFAULT_VERSION = "12.0.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" + def _python_cmd(*args): """ + Execute a command. + Return True if the command succeeded. """ args = (sys.executable,) + args @@ -48,6 +51,7 @@ def _python_cmd(*args): def _install(archive_filename, install_args=()): + """Install Setuptools.""" with archive_context(archive_filename): # installing log.warn('Installing Setuptools') @@ -59,6 +63,7 @@ def _install(archive_filename, install_args=()): def _build_egg(egg, archive_filename, to_dir): + """Build Setuptools egg.""" with archive_context(archive_filename): # building an egg log.warn('Building a Setuptools egg in %s', to_dir) @@ -70,20 +75,19 @@ def _build_egg(egg, archive_filename, to_dir): class ContextualZipFile(zipfile.ZipFile): - """ - Supplement ZipFile class to support context manager for Python 2.6 - """ + + """Supplement ZipFile class to support context manager for Python 2.6.""" def __enter__(self): + """Context manager __enter__ hook.""" return self def __exit__(self, type, value, traceback): + """Context manager __exit__ hook.""" self.close() def __new__(cls, *args, **kwargs): - """ - Construct a ZipFile or ContextualZipFile as appropriate - """ + """Construct a ZipFile or ContextualZipFile as appropriate.""" if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) return super(ContextualZipFile, cls).__new__(cls) @@ -91,7 +95,7 @@ def __new__(cls, *args, **kwargs): @contextlib.contextmanager def archive_context(filename): - # extracting the archive + """Extract archive.""" tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() @@ -112,6 +116,7 @@ def archive_context(filename): def _do_download(version, download_base, to_dir, download_delay): + """Download Setuptools.""" egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): @@ -129,8 +134,10 @@ def _do_download(version, download_base, to_dir, download_delay): setuptools.bootstrap_install_from = egg -def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, +def use_setuptools( + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): + """Download, install and use Setuptools.""" to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) @@ -146,9 +153,9 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, except pkg_resources.VersionConflict as VC_err: if imported: msg = textwrap.dedent(""" - The required version of setuptools (>={version}) is not available, - and can't be installed while this script is running. Please - install a more recent version first, using + The required version of setuptools (>={version}) is not + available, and can't be installed while this script is running. + Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using {VC_err.args[0]!r}) @@ -160,10 +167,12 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, del pkg_resources, sys.modules['pkg_resources'] return _do_download(version, download_base, to_dir, download_delay) + def _clean_check(cmd, target): """ - Run the command to download target. If the command fails, clean up before - re-raising the error. + Run the command to download target. + + If the command fails, clean up before re-raising the error. """ try: subprocess.check_call(cmd) @@ -172,10 +181,13 @@ def _clean_check(cmd, target): os.unlink(target) raise + def download_file_powershell(url, target): """ - Download the file at url to target using Powershell (which will validate - trust). Raise an exception if the command cannot complete. + Download the file at url to target using Powershell. + + Powershell will validate trust. + Raise an exception if the command cannot complete. """ target = os.path.abspath(target) ps_cmd = ( @@ -191,7 +203,9 @@ def download_file_powershell(url, target): ] _clean_check(cmd, target) + def has_powershell(): + """Determine if Powershell is available.""" if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] @@ -202,13 +216,18 @@ def has_powershell(): return False return True + download_file_powershell.viable = has_powershell + def download_file_curl(url, target): + """Use curl to download the file.""" cmd = ['curl', url, '--silent', '--output', target] _clean_check(cmd, target) + def has_curl(): + """Determine if curl is available.""" cmd = ['curl', '--version'] with open(os.path.devnull, 'wb') as devnull: try: @@ -217,13 +236,18 @@ def has_curl(): return False return True + download_file_curl.viable = has_curl + def download_file_wget(url, target): + """Use wget to download the file.""" cmd = ['wget', url, '--quiet', '--output-document', target] _clean_check(cmd, target) + def has_wget(): + """Determine if wget is available.""" cmd = ['wget', '--version'] with open(os.path.devnull, 'wb') as devnull: try: @@ -232,13 +256,12 @@ def has_wget(): return False return True + download_file_wget.viable = has_wget + def download_file_insecure(url, target): - """ - Use Python to download the file, even though it cannot authenticate the - connection. - """ + """Use Python to download the file, without connection authentication.""" src = urlopen(url) try: # Read all the data in one block. @@ -250,9 +273,12 @@ def download_file_insecure(url, target): with open(target, "wb") as dst: dst.write(data) + download_file_insecure.viable = lambda: True + def get_best_downloader(): + """Determine the best downloader.""" downloaders = ( download_file_powershell, download_file_curl, @@ -262,10 +288,12 @@ def get_best_downloader(): viable_downloaders = (dl for dl in downloaders if dl.viable()) return next(viable_downloaders, None) -def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, + +def download_setuptools( + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader): """ - Download setuptools from a specified location and return its filename + Download setuptools from a specified location and return its filename. `version` should be a valid setuptools version number that is available as an sdist for download under the `download_base` URL (which should end @@ -287,16 +315,18 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, downloader(url, saveto) return os.path.realpath(saveto) + def _build_install_args(options): """ - Build the arguments to 'python setup.py install' on the setuptools package + Build the arguments to 'python setup.py install' on the setuptools package. + + Returns list of command line arguments. """ return ['--user'] if options.user_install else [] + def _parse_args(): - """ - Parse the command line for options - """ + """Parse the command line for options.""" parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, @@ -318,8 +348,9 @@ def _parse_args(): # positional arguments are ignored return options + def main(): - """Install or upgrade setuptools and EasyInstall""" + """Install or upgrade setuptools and EasyInstall.""" options = _parse_args() archive = download_setuptools( version=options.version, From dc1b07f1dfc92e097be704ad19824194a95317d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 09:40:43 -0500 Subject: [PATCH 4909/8469] Add test capturing regression in script creation in WindowsScriptWriter. --- setuptools/tests/test_easy_install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index cbbe99db6e..a2f26e0885 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -24,6 +24,7 @@ from setuptools import compat from setuptools.compat import StringIO, BytesIO, urlparse from setuptools.sandbox import run_setup +import setuptools.command.easy_install as ei from setuptools.command.easy_install import ( easy_install, fix_jython_executable, nt_quote_arg, is_sh, ScriptWriter, CommandSpec, @@ -526,3 +527,14 @@ def test_sys_executable(self): cmd = writer.command_spec_class.from_string(sys.executable) assert len(cmd) == 1 assert cmd[0] == sys.executable + + +class TestWindowsScriptWriter: + def test_header(self): + hdr = ei.WindowsScriptWriter.get_script_header('') + assert hdr.startswith('#!') + assert hdr.endswith('\n') + hdr = hdr.lstrip('#!') + hdr = hdr.rstrip('\n') + # header should not start with an escaped quote + assert not hdr.startswith('\\"') From c279903336c73f74c9c8df7aac1e43fb6046c34e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Jan 2015 09:56:16 -0500 Subject: [PATCH 4910/8469] Bypass string handling when default behavior of sys.executable is used. --- setuptools/command/easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 541666cee2..dda183c817 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1897,7 +1897,9 @@ def from_param(cls, param): @classmethod def from_environment(cls): - return cls.from_string('"' + cls._sys_executable() + '"') + string = '"' + cls._sys_executable() + '"' + jython_spec = JythonCommandSpec.from_string(string) + return jython_spec or cls([cls._sys_executable()]) @classmethod def from_string(cls, string): From 0478d8fa223ca94e5c9a3f42dd5f92ed8be1270f Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 20 Jan 2015 11:24:18 -0800 Subject: [PATCH 4911/8469] remove warning on normalization It seems inappropriate to show a warning on schemes officially supported in PEP 440. --HG-- branch : no-normalize-warning --- setuptools/dist.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index bc29b131b8..03d7852010 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -276,13 +276,6 @@ def __init__(self, attrs=None): ver = packaging.version.Version(self.metadata.version) normalized_version = str(ver) if self.metadata.version != normalized_version: - warnings.warn( - "The version specified requires normalization, " - "consider using '%s' instead of '%s'." % ( - normalized_version, - self.metadata.version, - ) - ) self.metadata.version = normalized_version except (packaging.version.InvalidVersion, TypeError): warnings.warn( From 3b71b0907d1b989a1a27fee8a7357ec361e08b71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Jan 2015 08:44:55 -0500 Subject: [PATCH 4912/8469] Backout some ugly docstrings from rigorous implementation of ill-conceived PEP-257. --- ez_setup.py | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bbcef8c703..90e3d82067 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python + """Bootstrap setuptools installation. To use setuptools in your package's setup.py, include this @@ -13,6 +14,7 @@ This file can also be run as a script to install or upgrade setuptools. """ + import os import shutil import sys @@ -79,11 +81,9 @@ class ContextualZipFile(zipfile.ZipFile): """Supplement ZipFile class to support context manager for Python 2.6.""" def __enter__(self): - """Context manager __enter__ hook.""" return self def __exit__(self, type, value, traceback): - """Context manager __exit__ hook.""" self.close() def __new__(cls, *args, **kwargs): @@ -95,7 +95,11 @@ def __new__(cls, *args, **kwargs): @contextlib.contextmanager def archive_context(filename): - """Extract archive.""" + """ + Unzip filename to a temporary directory, set to the cwd. + + The unzipped target is cleaned up after. + """ tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() @@ -137,10 +141,22 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): - """Download, install and use Setuptools.""" + """ + Download, install, and import Setuptools. + + Return None. + """ to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) + conflict_tmpl = textwrap.dedent(""" + The required version of setuptools (>={version}) is not available, + and can't be installed while this script is running. Please + install a more recent version first, using + 'easy_install -U setuptools'. + + (Currently using {VC_err.args[0]!r}) + """) try: import pkg_resources except ImportError: @@ -152,14 +168,7 @@ def use_setuptools( return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.VersionConflict as VC_err: if imported: - msg = textwrap.dedent(""" - The required version of setuptools (>={version}) is not - available, and can't be installed while this script is running. - Please install a more recent version first, using - 'easy_install -U setuptools'. - - (Currently using {VC_err.args[0]!r}) - """).format(VC_err=VC_err, version=version) + msg = conflict_tmpl.format(VC_err=VC_err, version=version) sys.stderr.write(msg) sys.exit(2) @@ -185,7 +194,7 @@ def _clean_check(cmd, target): def download_file_powershell(url, target): """ Download the file at url to target using Powershell. - + Powershell will validate trust. Raise an exception if the command cannot complete. """ @@ -215,19 +224,15 @@ def has_powershell(): except Exception: return False return True - - download_file_powershell.viable = has_powershell def download_file_curl(url, target): - """Use curl to download the file.""" cmd = ['curl', url, '--silent', '--output', target] _clean_check(cmd, target) def has_curl(): - """Determine if curl is available.""" cmd = ['curl', '--version'] with open(os.path.devnull, 'wb') as devnull: try: @@ -235,19 +240,15 @@ def has_curl(): except Exception: return False return True - - download_file_curl.viable = has_curl def download_file_wget(url, target): - """Use wget to download the file.""" cmd = ['wget', url, '--quiet', '--output-document', target] _clean_check(cmd, target) def has_wget(): - """Determine if wget is available.""" cmd = ['wget', '--version'] with open(os.path.devnull, 'wb') as devnull: try: @@ -255,8 +256,6 @@ def has_wget(): except Exception: return False return True - - download_file_wget.viable = has_wget @@ -272,13 +271,10 @@ def download_file_insecure(url, target): # Write all the data in one block to avoid creating a partial file. with open(target, "wb") as dst: dst.write(data) - - download_file_insecure.viable = lambda: True def get_best_downloader(): - """Determine the best downloader.""" downloaders = ( download_file_powershell, download_file_curl, From 47236e6fff9884a1bb4a023a7c0a3ea56819f212 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 22 Jan 2015 14:01:28 +0000 Subject: [PATCH 4913/8469] Reintroduce use of setup_requirements writer This was originally removed due to an underlying issue (#315) with the upgrade code, which combined with this writer caused upgrades to fail. Issue #315 is resolved now so we can add this writer back. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 63093917cd..d02b7875fb 100755 --- a/setup.py +++ b/setup.py @@ -126,6 +126,7 @@ def build_package_data(self): "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", + "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements", "entry_points.txt = setuptools.command.egg_info:write_entries", "eager_resources.txt = setuptools.command.egg_info:overwrite_arg", "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg", From 2436fdf2b3b65073879366505925c0dc18132943 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Jan 2015 10:21:35 -0500 Subject: [PATCH 4914/8469] Remove docs on 'using', which only describe the no longer necessary bootstrapping technique. Ref #336. --- docs/index.txt | 1 - docs/using.txt | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 docs/using.txt diff --git a/docs/index.txt b/docs/index.txt index d8eb968bc9..529f08f354 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -19,7 +19,6 @@ Documentation content: history roadmap python3 - using setuptools easy_install pkg_resources diff --git a/docs/using.txt b/docs/using.txt deleted file mode 100644 index bd80893da2..0000000000 --- a/docs/using.txt +++ /dev/null @@ -1,13 +0,0 @@ -================================ -Using Setuptools in your project -================================ - -To use Setuptools in your project, the recommended way is to ship -`ez_setup.py` alongside your `setup.py` script and call -it at the very beginning of `setup.py` like this:: - - from ez_setup import use_setuptools - use_setuptools() - -More info on `ez_setup.py` can be found at `the project home page -`_. From 57d6e0fc1ff66e5569296af5cf409cbbcf025148 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Jan 2015 10:25:38 -0500 Subject: [PATCH 4915/8469] Deprecated use_setuptools. Fixes #336. --- ez_setup.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 90e3d82067..45c924653a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,18 +1,9 @@ #!/usr/bin/env python -"""Bootstrap setuptools installation. - -To use setuptools in your package's setup.py, include this -file in the same directory and add this to the top of your setup.py:: - - from ez_setup import use_setuptools - use_setuptools() - -To require a specific version of setuptools, set a download -mirror, or use an alternate download directory, simply supply -the appropriate options to ``use_setuptools()``. +""" +Setuptools bootstrapping installer. -This file can also be run as a script to install or upgrade setuptools. +Run this script to install or upgrade setuptools. """ import os @@ -25,6 +16,7 @@ import platform import textwrap import contextlib +import warnings from distutils import log @@ -142,10 +134,15 @@ def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): """ - Download, install, and import Setuptools. + *deprecated* Download, install, and import Setuptools. Return None. """ + warnings.warn( + "`use_setuptools` is deprecated. To enforce a specific " + "version of setuptools, use `pkg_resources.require`.", + DeprecationWarning, + ) to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) From 732f5e89a8e417ff536d9a51a85d7b328e80dab1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Jan 2015 08:29:56 -0500 Subject: [PATCH 4916/8469] Add test capturing Attribute error. Ref #339. --- setuptools/tests/test_easy_install.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ab6a8f0dab..4331d30e68 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -13,6 +13,7 @@ import tarfile import logging import itertools +import distutils.errors import pytest try: @@ -110,6 +111,16 @@ def test_no_find_links(self): keys = sorted(cmd.package_index.scanned_urls.keys()) assert keys == ['link1', 'link2'] + def test_write_exception(self): + """ + Test that `cant_write_to_target` is rendered as a DistutilsError. + """ + dist = Distribution() + cmd = ei.easy_install(dist) + cmd.install_dir = os.getcwd() + with pytest.raises(distutils.errors.DistutilsError): + cmd.cant_write_to_target() + class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): From 7824a2b4c6c53615feb18ff558a8a60b44e8fd41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Jan 2015 08:32:27 -0500 Subject: [PATCH 4917/8469] Reference the proper attribute. Fixes #339. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 206fc58dc6..e057b508e9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -483,7 +483,7 @@ def check_site_dir(self): """).lstrip() def cant_write_to_target(self): - msg = self._cant_write_msg % (sys.exc_info()[1], self.install_dir,) + msg = self.__cant_write_msg % (sys.exc_info()[1], self.install_dir,) if not os.path.exists(self.install_dir): msg += '\n' + self.__not_exists_id From 27416cfc54c46ab68e3fddd9c3312421b408b038 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Jan 2015 08:33:04 -0500 Subject: [PATCH 4918/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 97c16c5e22..183f973464 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +12.0.5 +------ + +* Issue #339: Correct Attribute reference in ``cant_write_to_target``. + ------ 12.0.4 ------ From be6f94e2b60be95f9324ed24bc06190d5581e30a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Jan 2015 08:35:05 -0500 Subject: [PATCH 4919/8469] Added tag 12.0.5 for changeset 01fbfc9194a2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 99bd72930e..7748122538 100644 --- a/.hgtags +++ b/.hgtags @@ -191,3 +191,4 @@ a1a6a1ac9113b90009052ca7263174a488434099 11.3 a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 73dcfc90e3eecec6baddea19302c6b342e68e2fa 12.0.4 +01fbfc9194a2bc502edd682eebbf4d2f1bc79eee 12.0.5 From f5098c20ae773bff28ac809a6dea9459f24a27dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 26 Jan 2015 08:35:43 -0500 Subject: [PATCH 4920/8469] Bumped to 12.0.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 45c924653a..5a3f9d42e4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.5" +DEFAULT_VERSION = "12.0.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index 8bb69c5f6d..56d97f7fcc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.5' +__version__ = '12.0.6' From fae9ca36955cdaebb81936bb54c3e9e44b5e6928 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 29 Jan 2015 13:50:20 +0000 Subject: [PATCH 4921/8469] Update warning to clarify when and how the instance should be use directly or what to do otherwise. --- pkg_resources/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c0c095b253..2ce663d2ce 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -182,8 +182,10 @@ def old_parse_version(s): "You have iterated over the result of " "pkg_resources.parse_version. This is a legacy behavior which is " "inconsistent with the new version class introduced in setuptools " - "8.0. That class should be used directly instead of attempting to " - "iterate over the result.", + "8.0. In most cases, conversion to a tuple is unnecessary. For " + "comparison of versions, sort the Version instances directly. If " + "you have another use case requiring the tuple, please file a " + "bug with the setuptools project describing that need.", RuntimeWarning, stacklevel=1, ) From 78d6f0dc55852b9489a17c1e25e8215aef1c7df9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 31 Jan 2015 12:05:05 +0200 Subject: [PATCH 4922/8469] Issue #23326: Removed __ne__ implementations. Since fixing default __ne__ implementation in issue #21408 they are redundant. --- version.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/version.py b/version.py index ebcab84e4e..af14cc1348 100644 --- a/version.py +++ b/version.py @@ -48,12 +48,6 @@ def __eq__(self, other): return c return c == 0 - def __ne__(self, other): - c = self._cmp(other) - if c is NotImplemented: - return c - return c != 0 - def __lt__(self, other): c = self._cmp(other) if c is NotImplemented: From 492758aff46622fb93845f96b9062dab029064f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Feb 2015 22:28:29 +0400 Subject: [PATCH 4923/8469] Re-use context available in sandbox. --- setuptools/sandbox.py | 4 +++- setuptools/tests/contexts.py | 8 -------- setuptools/tests/test_easy_install.py | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 83283ca3dc..6725512357 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -47,8 +47,10 @@ def _execfile(filename, globals, locals=None): @contextlib.contextmanager -def save_argv(): +def save_argv(repl=None): saved = sys.argv[:] + if repl is not None: + sys.argv[:] = repl try: yield saved finally: diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 4a46176557..1d29284b46 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -48,14 +48,6 @@ def environment(**replacements): os.environ.update(saved) -@contextlib.contextmanager -def argv(repl): - old_argv = sys.argv[:] - sys.argv[:] = repl - yield - sys.argv[:] = old_argv - - @contextlib.contextmanager def quiet(): """ diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4331d30e68..b9b2e392ee 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -312,7 +312,7 @@ def test_setup_requires_honors_fetch_params(self): '--install-dir', temp_install_dir, dist_file, ] - with contexts.argv(['easy_install']): + with sandbox.save_argv(['easy_install']): # attempt to install the dist. It should fail because # it doesn't exist. with pytest.raises(SystemExit): From 88f62bfe62531bed69f871425d21d8c4e3203ecf Mon Sep 17 00:00:00 2001 From: MinRK Date: Thu, 5 Feb 2015 12:11:23 -0800 Subject: [PATCH 4924/8469] soften normalized version warning indicate that normalization is happening, but don't be pushy about changing valid versions. --HG-- branch : no-normalize-warning --- setuptools/dist.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 03d7852010..ffbc7c4861 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -276,6 +276,12 @@ def __init__(self, attrs=None): ver = packaging.version.Version(self.metadata.version) normalized_version = str(ver) if self.metadata.version != normalized_version: + warnings.warn( + "Normalizing '%s' to '%s'" % ( + self.metadata.version, + normalized_version, + ) + ) self.metadata.version = normalized_version except (packaging.version.InvalidVersion, TypeError): warnings.warn( From 0c2d002a26ac527938c56eccb5edf04591da33b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 10 Feb 2015 20:14:48 -0500 Subject: [PATCH 4925/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 183f973464..f77ab24b4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +12.1 +---- + +* Pull Request #118: Soften warning for non-normalized versions in + Distribution. + ------ 12.0.5 ------ From f12a54d83140cb65a7a0098eeb20e469ce7fb5b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 10 Feb 2015 20:15:39 -0500 Subject: [PATCH 4926/8469] Bumped to 12.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5a3f9d42e4..b1d68cc88f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.0.6" +DEFAULT_VERSION = "12.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index 56d97f7fcc..9e9002b4d2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.0.6' +__version__ = '12.1' From d26bdb80a713fbd0080e94d0f5f6836afce87600 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 10 Feb 2015 20:15:43 -0500 Subject: [PATCH 4927/8469] Added tag 12.1 for changeset 7bca89384348 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7748122538..e9d7e3debe 100644 --- a/.hgtags +++ b/.hgtags @@ -192,3 +192,4 @@ a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 73dcfc90e3eecec6baddea19302c6b342e68e2fa 12.0.4 01fbfc9194a2bc502edd682eebbf4d2f1bc79eee 12.0.5 +7bca8938434839dbb546b8bfccd9aab7a86d851e 12.1 From 5d2f77f308c8ccc89be855994da1b7503b5a4294 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 10 Feb 2015 20:17:22 -0500 Subject: [PATCH 4928/8469] Bumped to 12.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index b1d68cc88f..1a360cedd1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.1" +DEFAULT_VERSION = "12.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index 9e9002b4d2..c59a57778d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.1' +__version__ = '12.2' From cf6639df27879641b6ea561fa38ec52320b09780 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 09:42:21 -0500 Subject: [PATCH 4929/8469] Add comments --- ez_setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 1a360cedd1..154cae0abb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -160,16 +160,21 @@ def use_setuptools( return _do_download(version, download_base, to_dir, download_delay) try: pkg_resources.require("setuptools>=" + version) + # a suitable version is already installed return except pkg_resources.DistributionNotFound: + # no version of setuptools was found return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.VersionConflict as VC_err: if imported: + # setuptools was imported prior to invocation of this function, + # so it's not safe to unload it. msg = conflict_tmpl.format(VC_err=VC_err, version=version) sys.stderr.write(msg) sys.exit(2) - # otherwise, reload ok + # otherwise, unload pkg_resources to allow the downloaded version to + # take precedence. del pkg_resources, sys.modules['pkg_resources'] return _do_download(version, download_base, to_dir, download_delay) From 4df44da1561f239f63ee24a44acfba06d3898de4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 09:49:33 -0500 Subject: [PATCH 4930/8469] Extract function for unloading pkg_resources. Ref #345. --- ez_setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 154cae0abb..4bffc14cac 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -175,10 +175,15 @@ def use_setuptools( # otherwise, unload pkg_resources to allow the downloaded version to # take precedence. - del pkg_resources, sys.modules['pkg_resources'] + del pkg_resources + _unload_pkg_resources() return _do_download(version, download_base, to_dir, download_delay) +def _unload_pkg_resources(): + del sys.modules['pkg_resources'] + + def _clean_check(cmd, target): """ Run the command to download target. From e1bc6caa509afc1df671a21b94d33906a88930d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 09:51:51 -0500 Subject: [PATCH 4931/8469] Unload all pkg_resources modules and not just the main module. Fixes #345. --- ez_setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 4bffc14cac..0734d6c547 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -181,7 +181,12 @@ def use_setuptools( def _unload_pkg_resources(): - del sys.modules['pkg_resources'] + del_modules = [ + name for name in sys.modules + if name.startswith('pkg_resources') + ] + for mod_name in del_modules: + del sys.modules[mod_name] def _clean_check(cmd, target): From cd6f8d58314ce146b18142f4be56fc2a18f977d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 09:53:52 -0500 Subject: [PATCH 4932/8469] Collapse common behavior --- ez_setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0734d6c547..a1c69d0b3c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -163,8 +163,8 @@ def use_setuptools( # a suitable version is already installed return except pkg_resources.DistributionNotFound: - # no version of setuptools was found - return _do_download(version, download_base, to_dir, download_delay) + # no version of setuptools was found; allow download + pass except pkg_resources.VersionConflict as VC_err: if imported: # setuptools was imported prior to invocation of this function, @@ -177,7 +177,8 @@ def use_setuptools( # take precedence. del pkg_resources _unload_pkg_resources() - return _do_download(version, download_base, to_dir, download_delay) + + return _do_download(version, download_base, to_dir, download_delay) def _unload_pkg_resources(): From 947b300262d3415f4a1a073887973f2772792ae0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:02:04 -0500 Subject: [PATCH 4933/8469] Refactor behavior into a single try/except block with exactly one invocation of _do_download. --- ez_setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a1c69d0b3c..d8d2ad8bde 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -156,12 +156,12 @@ def use_setuptools( """) try: import pkg_resources - except ImportError: - return _do_download(version, download_base, to_dir, download_delay) - try: pkg_resources.require("setuptools>=" + version) # a suitable version is already installed return + except ImportError: + # pkg_resources not available; setuptools is not installed; download + pass except pkg_resources.DistributionNotFound: # no version of setuptools was found; allow download pass From 1ba919120ead7b064e1b0b80e4174d7c4435e700 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:05:59 -0500 Subject: [PATCH 4934/8469] Extract _conflict_bail function --- ez_setup.py | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d8d2ad8bde..19af8969b3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -146,14 +146,6 @@ def use_setuptools( to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) - conflict_tmpl = textwrap.dedent(""" - The required version of setuptools (>={version}) is not available, - and can't be installed while this script is running. Please - install a more recent version first, using - 'easy_install -U setuptools'. - - (Currently using {VC_err.args[0]!r}) - """) try: import pkg_resources pkg_resources.require("setuptools>=" + version) @@ -167,11 +159,7 @@ def use_setuptools( pass except pkg_resources.VersionConflict as VC_err: if imported: - # setuptools was imported prior to invocation of this function, - # so it's not safe to unload it. - msg = conflict_tmpl.format(VC_err=VC_err, version=version) - sys.stderr.write(msg) - sys.exit(2) + _conflict_bail(VC_err, version) # otherwise, unload pkg_resources to allow the downloaded version to # take precedence. @@ -181,6 +169,24 @@ def use_setuptools( return _do_download(version, download_base, to_dir, download_delay) +def _conflict_bail(VC_err, version): + """ + Setuptools was imported prior to invocation, so it is + unsafe to unload it. Bail out. + """ + conflict_tmpl = textwrap.dedent(""" + The required version of setuptools (>={version}) is not available, + and can't be installed while this script is running. Please + install a more recent version first, using + 'easy_install -U setuptools'. + + (Currently using {VC_err.args[0]!r}) + """) + msg = conflict_tmpl.format(**locals()) + sys.stderr.write(msg) + sys.exit(2) + + def _unload_pkg_resources(): del_modules = [ name for name in sys.modules From bd6fbd3fd8d4e5346a3464898cd3e303bc58f552 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:07:26 -0500 Subject: [PATCH 4935/8469] Add comment --- ez_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 19af8969b3..26e42998f8 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -144,8 +144,12 @@ def use_setuptools( DeprecationWarning, ) to_dir = os.path.abspath(to_dir) + + # prior to importing, capture the module state for + # representative modules. rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) + try: import pkg_resources pkg_resources.require("setuptools>=" + version) From 3735dd9e689cd98d6ee45fcdac21d1f41c952a76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:15:58 -0500 Subject: [PATCH 4936/8469] Update changelog --- CHANGES.txt | 11 +++++++++++ ez_setup.py | 10 +++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f77ab24b4c..4e058be805 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +---- +12.2 +---- + +* Issue #345: Unload all modules under pkg_resources during + ``ez_setup.use_setuptools()``. +* Issue #336: Removed deprecation from ``ez_setup.use_setuptools``, + as it is clearly still used by buildout's bootstrap. ``ez_setup`` + remains deprecated for use by individual packages. + ---- 12.1 ---- @@ -14,6 +24,7 @@ CHANGES ------ * Issue #339: Correct Attribute reference in ``cant_write_to_target``. +* Issue #336: Deprecated ``ez_setup.use_setuptools``. ------ 12.0.4 diff --git a/ez_setup.py b/ez_setup.py index 26e42998f8..4bd83580f0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -134,15 +134,11 @@ def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): """ - *deprecated* Download, install, and import Setuptools. + Ensure that a setuptools version is installed. - Return None. + Return None. Raise SystemExit if the requested version + or later cannot be installed. """ - warnings.warn( - "`use_setuptools` is deprecated. To enforce a specific " - "version of setuptools, use `pkg_resources.require`.", - DeprecationWarning, - ) to_dir = os.path.abspath(to_dir) # prior to importing, capture the module state for From e69b9745ff0d8bd3ab134a80d1c91707377d06ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:19:24 -0500 Subject: [PATCH 4937/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4e058be805..45658bb0e5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ CHANGES * Issue #336: Removed deprecation from ``ez_setup.use_setuptools``, as it is clearly still used by buildout's bootstrap. ``ez_setup`` remains deprecated for use by individual packages. +* Simplified implementation of ``ez_setup.use_setuptools``. ---- 12.1 From dcc413ea650eacd7c9fdcf824f65501dd39748ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:24:28 -0500 Subject: [PATCH 4938/8469] Added tag 12.2 for changeset 5ff5c804a8fa --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e9d7e3debe..1b63050d0c 100644 --- a/.hgtags +++ b/.hgtags @@ -193,3 +193,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 73dcfc90e3eecec6baddea19302c6b342e68e2fa 12.0.4 01fbfc9194a2bc502edd682eebbf4d2f1bc79eee 12.0.5 7bca8938434839dbb546b8bfccd9aab7a86d851e 12.1 +5ff5c804a8fa580cff499ba0025ff2e6a5474fd0 12.2 From 582d31e08ea15893f98deddfaa476cd294f1b5db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:25:13 -0500 Subject: [PATCH 4939/8469] Bumped to 12.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4bd83580f0..426a22c922 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.2" +DEFAULT_VERSION = "12.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index c59a57778d..c2fa1dce56 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.2' +__version__ = '12.3' From c30d4387af485202103c76b13c2741b5bd78b410 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Feb 2015 10:32:17 -0500 Subject: [PATCH 4940/8469] Bump script used for ez_setup.py --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e648b3869..16605597f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ script: - python bootstrap.py - python setup.py ptr --addopts='-rs' - - python ez_setup.py --version 10.2.1 + - python ez_setup.py --version 12.2 From 47cbdc5228ca5a730518f1cca83df283c54f7249 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 18 Feb 2015 20:42:49 +0100 Subject: [PATCH 4941/8469] Fix setuptools.command.easy_install.extract_wininst_cfg() with Python 2.6 and 2.7. It was broken since commit 3bbd42903af8, which changed chr(0) (which is '\x00') into bytes([0]). bytes([0]) is '[0]' in Python 2.6 and 2.7 and b'\x00' in Python 3. --- setuptools/command/easy_install.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e057b508e9..b039e2da6c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1413,13 +1413,8 @@ def extract_wininst_cfg(dist_filename): {'version': '', 'target_version': ''}) try: part = f.read(cfglen) - # part is in bytes, but we need to read up to the first null - # byte. - if sys.version_info >= (2, 6): - null_byte = bytes([0]) - else: - null_byte = chr(0) - config = part.split(null_byte, 1)[0] + # Read up to the first null byte. + config = part.split(b'\0', 1)[0] # Now the config is in bytes, but for RawConfigParser, it should # be text, so decode it. config = config.decode(sys.getfilesystemencoding()) From b16a6dd269e4fd283a78834c7f379c977aad0f6e Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 18 Feb 2015 21:09:01 +0100 Subject: [PATCH 4942/8469] Delete some dead code. --- setuptools/command/bdist_egg.py | 13 ++----------- setuptools/command/build_py.py | 17 +---------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 34fdeec21f..87dce882e3 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -2,7 +2,6 @@ Build .egg distributions""" -# This module should be kept compatible with Python 2.3 from distutils.errors import DistutilsSetupError from distutils.dir_util import remove_tree, mkpath from distutils import log @@ -406,10 +405,6 @@ def scan_module(egg_dir, base, name, stubs): if bad in symbols: log.warn("%s: module MAY be using inspect.%s", module, bad) safe = False - if '__name__' in symbols and '__main__' in symbols and '.' not in module: - if sys.version[:3] == "2.4": # -m works w/zipfiles in 2.5 - log.warn("%s: top-level module may be 'python -m' script", module) - safe = False return safe @@ -441,7 +436,7 @@ def can_scan(): ] -def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, +def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=True, mode='w'): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" @@ -463,11 +458,7 @@ def visit(z, dirname, names): z.write(path, p) log.debug("adding '%s'" % p) - if compress is None: - # avoid 2.3 zipimport bug when 64 bits - compress = (sys.version >= "2.4") - - compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)] + compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: z = zipfile.ZipFile(zip_filename, mode, compression=compression) for dirname, dirs, files in os.walk(base_dir): diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 98080694ad..a873d54b10 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -136,22 +136,7 @@ def analyze_manifest(self): mf.setdefault(src_dirs[d], []).append(path) def get_data_files(self): - pass # kludge 2.4 for lazy computation - - if sys.version < "2.4": # Python 2.4 already has this code - def get_outputs(self, include_bytecode=1): - """Return complete list of files copied to the build directory - - This includes both '.py' files and data files, as well as '.pyc' - and '.pyo' files if 'include_bytecode' is true. (This method is - needed for the 'install_lib' command to do its job properly, and to - generate a correct installation manifest.) - """ - return orig.build_py.get_outputs(self, include_bytecode) + [ - os.path.join(build_dir, filename) - for package, src_dir, build_dir, filenames in self.data_files - for filename in filenames - ] + pass # Lazily compute data files in _get_data_files() function. def check_package(self, package, package_dir): """Check namespace packages' __init__ for declare_namespace""" From 02fac66f96af6b6952d227809186db1c5ae628a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Feb 2015 22:36:06 -0600 Subject: [PATCH 4943/8469] Use rst.linker for generating linked changelog --- docs/conf.py | 49 ++++++++++++++++++++++++++++++++++++++++++++- linkify.py | 56 ---------------------------------------------------- setup.py | 1 + 3 files changed, 49 insertions(+), 57 deletions(-) delete mode 100644 linkify.py diff --git a/docs/conf.py b/docs/conf.py index 5ea2e05e8b..248309871d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,7 +28,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['linkify'] +extensions = ['rst.linker'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -198,3 +198,50 @@ # If false, no module index is generated. #latex_use_modindex = True + +link_files = { + 'CHANGES.txt': dict( + using=dict( + BB='https://bitbucket.org', + GH='https://github.com', + ), + replace=[ + dict( + pattern=r"(Issue )?#(?P\d+)", + url='{BB}/pypa/setuptools/issue/{issue}', + ), + dict( + pattern=r"Pull Request ?#(?P\d+)", + url='{BB}/pypa/setuptools/pull-request/{pull_request}', + ), + dict( + pattern=r"Distribute #(?P\d+)", + url='{BB}/tarek/distribute/issue/{distribute}', + ), + dict( + pattern=r"Buildout #(?P\d+)", + url='{GH}/buildout/buildout/issues/{buildout}', + ), + dict( + pattern=r"Old Setuptools #(?P\d+)", + url='http://bugs.python.org/setuptools/issue{old_setuptools}', + ), + dict( + pattern=r"Jython #(?P\d+)", + url='http://bugs.jython.org/issue{jython}', + ), + dict( + pattern=r"Python #(?P\d+)", + url='http://bugs.python.org/issue{python}', + ), + dict( + pattern=r"Interop #(?P\d+)", + url='{GH}/pypa/interoperability-peps/issues/{interop}', + ), + dict( + pattern=r"Pip #(?P\d+)", + url='{GH}/pypa/pip/issues/{pip}', + ), + ], + ), +} diff --git a/linkify.py b/linkify.py deleted file mode 100644 index 5c6e16b443..0000000000 --- a/linkify.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Sphinx plugin to add links to the changelog. -""" - -import re -import os - - -link_patterns = [ - r"(Issue )?#(?P\d+)", - r"Pull Request ?#(?P\d+)", - r"Distribute #(?P\d+)", - r"Buildout #(?P\d+)", - r"Old Setuptools #(?P\d+)", - r"Jython #(?P\d+)", - r"Python #(?P\d+)", - r"Interop #(?P\d+)", - r"Pip #(?P\d+)", -] - -issue_urls = dict( - pull_request='https://bitbucket.org' - '/pypa/setuptools/pull-request/{pull_request}', - issue='https://bitbucket.org/pypa/setuptools/issue/{issue}', - distribute='https://bitbucket.org/tarek/distribute/issue/{distribute}', - buildout='https://github.com/buildout/buildout/issues/{buildout}', - old_setuptools='http://bugs.python.org/setuptools/issue{old_setuptools}', - jython='http://bugs.jython.org/issue{jython}', - python='http://bugs.python.org/issue{python}', - interop='https://github.com/pypa/interoperability-peps/issues/{interop}', - pip='https://github.com/pypa/pip/issues/{pip}', -) - - -def _linkify(source, dest): - pattern = '|'.join(link_patterns) - with open(source) as source: - out = re.sub(pattern, replacer, source.read()) - with open(dest, 'w') as dest: - dest.write(out) - - -def replacer(match): - text = match.group(0) - match_dict = match.groupdict() - for key in match_dict: - if match_dict[key]: - url = issue_urls[key].format(**match_dict) - return "`{text} <{url}>`_".format(text=text, url=url) - -def setup(app): - _linkify('CHANGES.txt', 'CHANGES (links).txt') - app.connect('build-finished', remove_file) - -def remove_file(app, exception): - os.remove('CHANGES (links).txt') diff --git a/setup.py b/setup.py index 63093917cd..9d4330acad 100755 --- a/setup.py +++ b/setup.py @@ -172,6 +172,7 @@ def build_package_data(self): 'pytest', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ + 'rst.linker', ] + pytest_runner, ) From 70b0594ff0d67dba65feb59a606007768eced05b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Feb 2015 08:51:24 -0500 Subject: [PATCH 4944/8469] Only require rst.linker when docs commands are invoked. Also specify sphinx dependency. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9d4330acad..807c0180df 100755 --- a/setup.py +++ b/setup.py @@ -76,6 +76,8 @@ def build_package_data(self): package_data.setdefault('setuptools.command', []).extend(['*.xml']) pytest_runner = ['pytest-runner'] if 'ptr' in sys.argv else [] +needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) +sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else [] setup_params = dict( name="setuptools", @@ -172,8 +174,7 @@ def build_package_data(self): 'pytest', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ - 'rst.linker', - ] + pytest_runner, + ] + sphinx + pytest_runner, ) if __name__ == '__main__': From 34bd844443954929c7199e772e715ed6f0669332 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Feb 2015 08:52:48 -0500 Subject: [PATCH 4945/8469] Update conditional setup-time dependency to also support pytest and test commands. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 807c0180df..e1b302a36b 100755 --- a/setup.py +++ b/setup.py @@ -75,7 +75,8 @@ def build_package_data(self): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) -pytest_runner = ['pytest-runner'] if 'ptr' in sys.argv else [] +needs_pytest = set(['ptr', 'pytest', 'test']) in sys.argv else [] +pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else [] From eaeaf36088bccfcb35e798dcfa4ad187ef05f2f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Feb 2015 08:54:00 -0500 Subject: [PATCH 4946/8469] Move pytest config to pytest.ini (as it conflicts with the pytest-runner pytest command). --- pytest.ini | 3 +++ setup.cfg | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100755 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100755 index 0000000000..91d64bb800 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt +norecursedirs=dist build *.egg diff --git a/setup.cfg b/setup.cfg index 5937edd035..a6da2c7771 100755 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,7 @@ tag_build = dev release = egg_info -RDb '' source = register sdist binary binary = bdist_egg upload --show-response +test = pytest [build_sphinx] source-dir = docs/ @@ -19,7 +20,3 @@ formats = gztar zip [wheel] universal=1 - -[pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt -norecursedirs=dist build *.egg From d21b8dbfa1f0ad6f4c3f5b4101035c228bd6a6d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Feb 2015 08:54:29 -0500 Subject: [PATCH 4947/8469] Now tests may be invoked simply with setup.py test. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 16605597f3..45cace4be1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,5 @@ script: # update egg_info based on setup.py in checkout - python bootstrap.py - - python setup.py ptr --addopts='-rs' + - python setup.py test --addopts='-rs' - python ez_setup.py --version 12.2 From 3bf060e378ce5d942079452450864ef30bdaa44f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Feb 2015 09:03:49 -0500 Subject: [PATCH 4948/8469] Correct usage in needs_pytest --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e1b302a36b..438e512bde 100755 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ def build_package_data(self): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) -needs_pytest = set(['ptr', 'pytest', 'test']) in sys.argv else [] +needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else [] From 0dc29630918288846f3a398d884de8ecd9db7ced Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 26 Feb 2015 13:59:06 -0500 Subject: [PATCH 4949/8469] Formally describe the supported documentation build process. Fixes #354. --- docs/developer-guide.txt | 17 +++++++++++++++++ docs/development.txt | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 558d6ee76c..27c304e5cf 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -109,3 +109,20 @@ Setuptools follows ``semver`` with some exceptions: - Omits 'v' prefix for tags. .. explain value of reflecting meaning in versions. + +---------------------- +Building Documentation +---------------------- + +Setuptools relies on the Sphinx system for building documentation and in +particular the ``build_sphinx`` distutils command. To build the +documentation, invoke:: + + python setup.py build_sphinx + +from the root of the repository. Setuptools will download a compatible +build of Sphinx and any requisite plugins and then build the +documentation in the build/sphinx directory. + +Setuptools does not support invoking the doc builder from the docs/ +directory as some tools expect. diff --git a/docs/development.txt b/docs/development.txt index 6fe30f6eb1..455f038afa 100644 --- a/docs/development.txt +++ b/docs/development.txt @@ -33,4 +33,3 @@ setuptools changes. You have been warned. developer-guide formats releases - From d98aadec63981a34eff17f502038e132fa131432 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 26 Feb 2015 14:13:50 -0500 Subject: [PATCH 4950/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 45658bb0e5..5be5471143 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +---- +12.3 +---- + +* Documentation is now linked using the rst.linker package. +* Fix ``setuptools.command.easy_install.extract_wininst_cfg()`` + with Python 2.6 and 2.7. +* Issue #354. Added documentation on building setuptools + documentation. + ---- 12.2 ---- From 89f72e5dc90554be4dddd09381150a67588266cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 26 Feb 2015 14:15:26 -0500 Subject: [PATCH 4951/8469] Added tag 12.3 for changeset 8d50aac3b207 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1b63050d0c..b0ab3b1630 100644 --- a/.hgtags +++ b/.hgtags @@ -194,3 +194,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 01fbfc9194a2bc502edd682eebbf4d2f1bc79eee 12.0.5 7bca8938434839dbb546b8bfccd9aab7a86d851e 12.1 5ff5c804a8fa580cff499ba0025ff2e6a5474fd0 12.2 +8d50aac3b20793954121edb300b477cc75f3ec96 12.3 From f8813bed5e035a4b7f3deba54949439e846c8125 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 26 Feb 2015 14:16:10 -0500 Subject: [PATCH 4952/8469] Bumped to 12.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 426a22c922..5221b4ffe8 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.3" +DEFAULT_VERSION = "12.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index c2fa1dce56..f64c79854e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.3' +__version__ = '12.4' From 5153b6f17cb2b6fac162a9ae1a989b976cc6d7de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Mar 2015 17:50:32 -0500 Subject: [PATCH 4953/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 5be5471143..82f4db61a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +12.4 +---- + +* Pull Request #119: Restore writing of ``setup_requires`` to metadata + (previously added in 8.4 and removed in 9.0). + ---- 12.3 ---- From fe899eef84b75a58aeb443e36904e9f4a5fd5c20 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 4 Mar 2015 10:10:44 -0500 Subject: [PATCH 4954/8469] Reindent header --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 021e7feeb4..7a404f82a7 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ #!/usr/bin/env python -"""Distutils setup file, used to install or test 'setuptools'""" +""" +Distutils setup file, used to install or test 'setuptools' +""" + import io import os import sys From 7a410b2cafcbeac951d88e8070b378cfb1001de0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 4 Mar 2015 11:07:53 -0500 Subject: [PATCH 4955/8469] Added tag 12.4 for changeset 297931cb8cac --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b0ab3b1630..9a949af9cb 100644 --- a/.hgtags +++ b/.hgtags @@ -195,3 +195,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 7bca8938434839dbb546b8bfccd9aab7a86d851e 12.1 5ff5c804a8fa580cff499ba0025ff2e6a5474fd0 12.2 8d50aac3b20793954121edb300b477cc75f3ec96 12.3 +297931cb8cac7d44d970adb927efd6cb36ac3526 12.4 From 7aa02cb6109845a421aabdc366216dacfdf38d33 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 4 Mar 2015 11:09:37 -0500 Subject: [PATCH 4956/8469] Bumped to 12.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5221b4ffe8..6f6a83196f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.4" +DEFAULT_VERSION = "12.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index f64c79854e..e5fc9c8ca2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.4' +__version__ = '12.5' From ee36e46917421eb503f2e6d41f7421463564845b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 19:28:34 -0500 Subject: [PATCH 4957/8469] Backed out changeset: 8bff4399a7af; Fixes #356 --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 7a404f82a7..5d98de0689 100755 --- a/setup.py +++ b/setup.py @@ -132,7 +132,6 @@ def build_package_data(self): "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", - "setup_requires.txt = setuptools.command.egg_info:write_setup_requirements", "entry_points.txt = setuptools.command.egg_info:write_entries", "eager_resources.txt = setuptools.command.egg_info:overwrite_arg", "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg", From 80df5396a629d49b826b7522f7a72c15b75b710a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 19:31:08 -0500 Subject: [PATCH 4958/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 82f4db61a0..78469cbdc1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +13.0 +---- + +* Issue #356: Back out Pull Request #119 as it requires Setuptools 10 or later + as the source during an upgrade. + ---- 12.4 ---- From 4e0a8cd8f37e4f427a75cac454bea4aca0c4ea0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 19:37:20 -0500 Subject: [PATCH 4959/8469] Remove build_py (unused) --- CHANGES.txt | 1 + setup.py | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 78469cbdc1..bf0acb1a85 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ CHANGES * Issue #356: Back out Pull Request #119 as it requires Setuptools 10 or later as the source during an upgrade. +* Removed apparently unused build_py class in setup.py. ---- 12.4 diff --git a/setup.py b/setup.py index 5d98de0689..234a78853d 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,6 @@ exec(ver_file.read(), main_ns) import setuptools -from setuptools.command.build_py import build_py as _build_py scripts = [] @@ -49,20 +48,6 @@ def _gen_console_scripts(): console_scripts = list(_gen_console_scripts()) - -# specific command that is used to generate windows .exe files -class build_py(_build_py): - def build_package_data(self): - """Copy data files into build directory""" - for package, src_dir, build_dir, filenames in self.data_files: - for filename in filenames: - target = os.path.join(build_dir, filename) - self.mkpath(os.path.dirname(target)) - srcfile = os.path.join(src_dir, filename) - outf, copied = self.copy_file(srcfile, target) - srcfile = os.path.abspath(srcfile) - - readme_file = io.open('README.txt', encoding='utf-8') with readme_file: From 67aa21c88ef5e57d7a2d0f379c970e5987c14cd4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 19:51:32 -0500 Subject: [PATCH 4960/8469] Bumped to 13.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6f6a83196f..a709688f68 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "12.5" +DEFAULT_VERSION = "13.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index e5fc9c8ca2..0a56eb68ae 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '12.5' +__version__ = '13.0' From 2168ff0927546296e304dc457d6a013edf0dfe7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:16:35 -0500 Subject: [PATCH 4961/8469] Update changelog --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bf0acb1a85..1b99e9c55f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,9 @@ CHANGES * Issue #356: Back out Pull Request #119 as it requires Setuptools 10 or later as the source during an upgrade. -* Removed apparently unused build_py class in setup.py. +* Removed build_py class from setup.py. According to 892f439d216e, this + functionality was added to support upgrades from old Distribute versions, + 0.6.5 and 0.6.6. ---- 12.4 From 9f12c42238c20fa92efbc78a0762b57756c20d24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:37:51 -0500 Subject: [PATCH 4962/8469] Added tag 13.0 for changeset df34cc186242 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9a949af9cb..15190e1c00 100644 --- a/.hgtags +++ b/.hgtags @@ -196,3 +196,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 5ff5c804a8fa580cff499ba0025ff2e6a5474fd0 12.2 8d50aac3b20793954121edb300b477cc75f3ec96 12.3 297931cb8cac7d44d970adb927efd6cb36ac3526 12.4 +df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 From e556b07add2c521523bfd48f69397b0982bcc963 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:42:28 -0500 Subject: [PATCH 4963/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 1b99e9c55f..cc9c393970 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +13.0.1 +------ + +Re-release of 13.0. Intermittent connectivity issues caused the release +process to fail and PyPI uploads no longer accept files for 13.0. + ---- 13.0 ---- From 1914157913c7e28c21ccb8fa5ffe7581721d5bad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:42:40 -0500 Subject: [PATCH 4964/8469] Bumped to 13.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a709688f68..0fd17a5c5f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "13.0" +DEFAULT_VERSION = "13.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index 0a56eb68ae..d1ff172762 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '13.0' +__version__ = '13.0.1' From 5a1ac91fede0884c66cb2008485c13020f831a10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:42:42 -0500 Subject: [PATCH 4965/8469] Added tag 13.0.1 for changeset ae1a5c5cf78f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 15190e1c00..0a790e0187 100644 --- a/.hgtags +++ b/.hgtags @@ -197,3 +197,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 8d50aac3b20793954121edb300b477cc75f3ec96 12.3 297931cb8cac7d44d970adb927efd6cb36ac3526 12.4 df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 +ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 From 570305131f408b42522d1d7e87292ec752457e65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 20:43:59 -0500 Subject: [PATCH 4966/8469] Bumped to 13.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0fd17a5c5f..d0af7948d5 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "13.0.1" +DEFAULT_VERSION = "13.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" diff --git a/setuptools/version.py b/setuptools/version.py index d1ff172762..525a47ea0f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '13.0.1' +__version__ = '13.0.2' From 973df2da9c895ce58955121f6cf7cbde4b7fe0ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 21:30:58 -0500 Subject: [PATCH 4967/8469] Extract function for _download_args --- ez_setup.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d0af7948d5..e58f43d3ec 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -364,14 +364,19 @@ def _parse_args(): return options +def _download_args(options): + """Return args for download_setuptools function from cmdline args.""" + return dict( + version=options.version, + download_base=options.download_base, + downloader_factory=options.downloader_factory, + ) + + def main(): """Install or upgrade setuptools and EasyInstall.""" options = _parse_args() - archive = download_setuptools( - version=options.version, - download_base=options.download_base, - downloader_factory=options.downloader_factory, - ) + archive = download_setuptools(**_download_args(options)) return _install(archive, _build_install_args(options)) if __name__ == '__main__': From 4368e4a2d3f1e0de7a29b909c2cff599b211a441 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 21:47:08 -0500 Subject: [PATCH 4968/8469] Add --to-dir to bootstrap script --- CHANGES.txt | 8 ++++++++ ez_setup.py | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index cc9c393970..62272286ec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +13.1 +---- + +Bootstrap script now accepts ``--to-dir`` to customize save directory or +allow for re-use of existing repository of setuptools versions. See +Pull Request #112 for an alternate implementation. + ------ 13.0.1 ------ diff --git a/ez_setup.py b/ez_setup.py index e58f43d3ec..9ece89d7e7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -32,6 +32,7 @@ DEFAULT_VERSION = "13.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" +DEFAULT_SAVE_DIR = os.curdir def _python_cmd(*args): @@ -132,7 +133,7 @@ def _do_download(version, download_base, to_dir, download_delay): def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15): + to_dir=DEFAULT_SAVE_DIR, download_delay=15): """ Ensure that a setuptools version is installed. @@ -306,7 +307,8 @@ def get_best_downloader(): def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader): + to_dir=DEFAULT_SAVE_DIR, delay=15, + downloader_factory=get_best_downloader): """ Download setuptools from a specified location and return its filename. @@ -359,6 +361,11 @@ def _parse_args(): '--version', help="Specify which version to download", default=DEFAULT_VERSION, ) + parser.add_option( + '--to-dir', + help="Directory to save (and re-use) package", + default=DEFAULT_SAVE_DIR, + ) options, args = parser.parse_args() # positional arguments are ignored return options @@ -370,6 +377,7 @@ def _download_args(options): version=options.version, download_base=options.download_base, downloader_factory=options.downloader_factory, + to_dir=options.to_dir, ) From cf8edd7c24a6afdb81ac928f348faeaba77860bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 5 Mar 2015 22:28:53 -0500 Subject: [PATCH 4969/8469] Update changelog --- CHANGES.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 62272286ec..dfb7ba398d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,12 +3,20 @@ CHANGES ======= ---- -13.1 +14.0 ---- -Bootstrap script now accepts ``--to-dir`` to customize save directory or -allow for re-use of existing repository of setuptools versions. See -Pull Request #112 for an alternate implementation. +* Bootstrap script now accepts ``--to-dir`` to customize save directory or + allow for re-use of existing repository of setuptools versions. See + Pull Request #112 for an alternate implementation. +* Issue #285: ``easy_install`` no longer will default to installing + packages to the "user site packages" directory if it is itself installed + there. Instead, the user must pass ``--user`` in all cases to install + packages to the user site packages. + This behavior now matches that of "pip install". To configure + an environment to always install to the user site packages, consider + using the "install-dir" and "scripts-dir" parameters to easy_install + through an appropriate distutils config file. ------ 13.0.1 From 78337beb23e68b062f60f42e1f7baf1d51f2587d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 10:50:30 -0500 Subject: [PATCH 4970/8469] Include pytest.ini in MANIFEST.in. Fixes #359. --- CHANGES.txt | 7 +++++++ MANIFEST.in | 1 + 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index cc9c393970..f7c56b4a9c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +13.0.2 +------ + +* Issue #359: Include pytest.ini in the sdist so invocation of py.test on the + sdist honors the pytest configuration. + ------ 13.0.1 ------ diff --git a/MANIFEST.in b/MANIFEST.in index 428bbd1e15..8a4523a901 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,3 +9,4 @@ include *.txt include MANIFEST.in include launcher.c include msvc-build-launcher.cmd +include pytest.ini From 64297dfe3bf0088480b0499b6bb5dc7d5946938b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 10:56:46 -0500 Subject: [PATCH 4971/8469] Added tag 13.0.2 for changeset e22a1d613bdd --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0a790e0187..e21214e5c3 100644 --- a/.hgtags +++ b/.hgtags @@ -198,3 +198,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 297931cb8cac7d44d970adb927efd6cb36ac3526 12.4 df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 +e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 From 01e38bed190a1278f231f101431e2d09071de678 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 6 Mar 2015 09:11:39 -0800 Subject: [PATCH 4972/8469] Add __ne__ method to Requirement class It seems like if it has an `__eq__` method, it should probably have a `__ne__` method. I ran into this while working on pip -- see https://github.com/pypa/pip/pull/2493#discussion_r25955295 --- pkg_resources/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2ce663d2ce..7701292b4c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2907,6 +2907,9 @@ def __eq__(self, other): self.hashCmp == other.hashCmp ) + def __ne__(self, other): + return not self == other + def __contains__(self, item): if isinstance(item, Distribution): if item.key != self.key: From d138579b07086630732fa949a947dfad34a241d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:46:27 -0500 Subject: [PATCH 4973/8469] Update test to match new expectation following pull request #109. Refs #285. --- setuptools/tests/test_easy_install.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b9b2e392ee..af09d6811a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -156,15 +156,17 @@ class TestUserInstallTest: @mock.patch('setuptools.command.easy_install.__file__', None) def test_user_install_implied(self): + # simulate setuptools installed in user site packages easy_install_pkg.__file__ = site.USER_SITE - site.ENABLE_USER_SITE = True # disabled sometimes - #XXX: replace with something meaningfull + site.ENABLE_USER_SITE = True + + # create a finalized easy_install command dist = Distribution() dist.script_name = 'setup.py' cmd = ei.easy_install(dist) cmd.args = ['py'] cmd.ensure_finalized() - assert cmd.user, 'user should be implied' + assert not cmd.user, 'user should not be implied' def test_multiproc_atexit(self): try: From c05957b09a66c4728c9a578e2e5f33fbd7b97977 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:48:40 -0500 Subject: [PATCH 4974/8469] Use pytest.importorskip. --- setuptools/tests/test_easy_install.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index af09d6811a..8ba0c49cb4 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -169,11 +169,7 @@ def test_user_install_implied(self): assert not cmd.user, 'user should not be implied' def test_multiproc_atexit(self): - try: - __import__('multiprocessing') - except ImportError: - # skip the test if multiprocessing is not available - return + pytest.importorskip('multiprocessing') log = logging.getLogger('test_easy_install') logging.basicConfig(level=logging.INFO, stream=sys.stderr) From 1ea8018e5c3a8c7c8d980368efc5ac3b81df37e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:49:04 -0500 Subject: [PATCH 4975/8469] Rename test to reflect implementation. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 8ba0c49cb4..36d6642850 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -155,7 +155,7 @@ def setup_context(tmpdir): class TestUserInstallTest: @mock.patch('setuptools.command.easy_install.__file__', None) - def test_user_install_implied(self): + def test_user_install_not_implied(self): # simulate setuptools installed in user site packages easy_install_pkg.__file__ = site.USER_SITE site.ENABLE_USER_SITE = True From 55f0838ddfdd301f6f69369f94a3b476b5591b71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:49:46 -0500 Subject: [PATCH 4976/8469] Move related tests into proximity --- setuptools/tests/test_easy_install.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 36d6642850..2f7b27c59f 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -168,13 +168,6 @@ def test_user_install_not_implied(self): cmd.ensure_finalized() assert not cmd.user, 'user should not be implied' - def test_multiproc_atexit(self): - pytest.importorskip('multiprocessing') - - log = logging.getLogger('test_easy_install') - logging.basicConfig(level=logging.INFO, stream=sys.stderr) - log.info('this should not break') - def test_user_install_not_implied_without_usersite_enabled(self): site.ENABLE_USER_SITE = False # usually enabled #XXX: replace with something meaningfull @@ -185,6 +178,13 @@ def test_user_install_not_implied_without_usersite_enabled(self): cmd.initialize_options() assert not cmd.user, 'NOT user should be implied' + def test_multiproc_atexit(self): + pytest.importorskip('multiprocessing') + + log = logging.getLogger('test_easy_install') + logging.basicConfig(level=logging.INFO, stream=sys.stderr) + log.info('this should not break') + def test_local_index(self): # make sure the local index is used # when easy_install looks for installed From dc5ad278255437f54f3033e5c526d6f2d1d1f2e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:51:33 -0500 Subject: [PATCH 4977/8469] Functions now mirror each other. --- setuptools/tests/test_easy_install.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2f7b27c59f..ec5d5faa42 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -155,7 +155,7 @@ def setup_context(tmpdir): class TestUserInstallTest: @mock.patch('setuptools.command.easy_install.__file__', None) - def test_user_install_not_implied(self): + def test_user_install_not_implied_user_site_enabled(self): # simulate setuptools installed in user site packages easy_install_pkg.__file__ = site.USER_SITE site.ENABLE_USER_SITE = True @@ -168,9 +168,11 @@ def test_user_install_not_implied(self): cmd.ensure_finalized() assert not cmd.user, 'user should not be implied' - def test_user_install_not_implied_without_usersite_enabled(self): - site.ENABLE_USER_SITE = False # usually enabled - #XXX: replace with something meaningfull + def test_user_install_not_implied_user_site_disabled(self): + # ensure user-site not enabled + site.ENABLE_USER_SITE = False + + # create a finalized easy_install command dist = Distribution() dist.script_name = 'setup.py' cmd = ei.easy_install(dist) From 997f97fcf456e9f63664e356e5ed2838e33d4cba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:53:13 -0500 Subject: [PATCH 4978/8469] Extract method for common behavior. --- setuptools/tests/test_easy_install.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ec5d5faa42..eed3bdb51b 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -160,25 +160,23 @@ def test_user_install_not_implied_user_site_enabled(self): easy_install_pkg.__file__ = site.USER_SITE site.ENABLE_USER_SITE = True - # create a finalized easy_install command - dist = Distribution() - dist.script_name = 'setup.py' - cmd = ei.easy_install(dist) - cmd.args = ['py'] - cmd.ensure_finalized() - assert not cmd.user, 'user should not be implied' + self.assert_not_user_site() def test_user_install_not_implied_user_site_disabled(self): # ensure user-site not enabled site.ENABLE_USER_SITE = False + self.assert_not_user_site() + + @staticmethod + def assert_not_user_site(): # create a finalized easy_install command dist = Distribution() dist.script_name = 'setup.py' cmd = ei.easy_install(dist) cmd.args = ['py'] - cmd.initialize_options() - assert not cmd.user, 'NOT user should be implied' + cmd.ensure_finalized() + assert not cmd.user, 'user should not be implied' def test_multiproc_atexit(self): pytest.importorskip('multiprocessing') From 52172aa131f643c83370aa36968fa3f279c53858 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 15:58:03 -0500 Subject: [PATCH 4979/8469] Move patching into the patch methods. --- setuptools/tests/test_easy_install.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index eed3bdb51b..773ca6b663 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -154,18 +154,14 @@ def setup_context(tmpdir): @pytest.mark.usefixtures("setup_context") class TestUserInstallTest: - @mock.patch('setuptools.command.easy_install.__file__', None) + # simulate setuptools installed in user site packages + @mock.patch('setuptools.command.easy_install.__file__', site.USER_SITE) + @mock.patch('site.ENABLE_USER_SITE', True) def test_user_install_not_implied_user_site_enabled(self): - # simulate setuptools installed in user site packages - easy_install_pkg.__file__ = site.USER_SITE - site.ENABLE_USER_SITE = True - self.assert_not_user_site() + @mock.patch('site.ENABLE_USER_SITE', False) def test_user_install_not_implied_user_site_disabled(self): - # ensure user-site not enabled - site.ENABLE_USER_SITE = False - self.assert_not_user_site() @staticmethod From 85dd199e880fdf29a2dbe25bff944b5fc3b1081e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:00:56 -0500 Subject: [PATCH 4980/8469] Replace comment with docstring assertion. --- setuptools/tests/test_easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 773ca6b663..4942acbf75 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -182,9 +182,10 @@ def test_multiproc_atexit(self): log.info('this should not break') def test_local_index(self): - # make sure the local index is used - # when easy_install looks for installed - # packages + """ + The local index must be used when easy_install locates installed + packages. + """ new_location = tempfile.mkdtemp() target = tempfile.mkdtemp() egg_file = os.path.join(new_location, 'foo-1.0.egg-info') From ac3e0877123c9cb1a4d53653e273dfb3f1d40ed3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:16:18 -0500 Subject: [PATCH 4981/8469] Extract fixture for foo_package. --- setuptools/tests/test_easy_install.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4942acbf75..791e303841 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -181,17 +181,19 @@ def test_multiproc_atexit(self): logging.basicConfig(level=logging.INFO, stream=sys.stderr) log.info('this should not break') - def test_local_index(self): + @pytest.fixture() + def foo_package(self, tmpdir): + egg_file = tmpdir / 'foo-1.0.egg-info' + with egg_file.open('w') as f: + f.write('Name: foo\n') + return str(tmpdir) + + def test_local_index(self, foo_package): """ The local index must be used when easy_install locates installed packages. """ - new_location = tempfile.mkdtemp() target = tempfile.mkdtemp() - egg_file = os.path.join(new_location, 'foo-1.0.egg-info') - with open(egg_file, 'w') as f: - f.write('Name: foo\n') - sys.path.append(target) old_ppath = os.environ.get('PYTHONPATH') os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) @@ -202,14 +204,14 @@ def test_local_index(self): cmd.install_dir = target cmd.args = ['foo'] cmd.ensure_finalized() - cmd.local_index.scan([new_location]) + cmd.local_index.scan([foo_package]) res = cmd.easy_install('foo') actual = os.path.normcase(os.path.realpath(res.location)) - expected = os.path.normcase(os.path.realpath(new_location)) + expected = os.path.normcase(os.path.realpath(foo_package)) assert actual == expected finally: sys.path.remove(target) - for basedir in [new_location, target, ]: + for basedir in [target, ]: if not os.path.exists(basedir) or not os.path.isdir(basedir): continue try: From a2719779b6604634f87aed64cf4413486ccca88c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:19:57 -0500 Subject: [PATCH 4982/8469] Extract install_target as fixture --- setuptools/tests/test_easy_install.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 791e303841..1acf08b50b 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -188,20 +188,23 @@ def foo_package(self, tmpdir): f.write('Name: foo\n') return str(tmpdir) - def test_local_index(self, foo_package): + @pytest.fixture() + def install_target(self, tmpdir): + return str(tmpdir) + + def test_local_index(self, foo_package, install_target): """ The local index must be used when easy_install locates installed packages. """ - target = tempfile.mkdtemp() - sys.path.append(target) + sys.path.append(install_target) old_ppath = os.environ.get('PYTHONPATH') os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) try: dist = Distribution() dist.script_name = 'setup.py' cmd = ei.easy_install(dist) - cmd.install_dir = target + cmd.install_dir = install_target cmd.args = ['foo'] cmd.ensure_finalized() cmd.local_index.scan([foo_package]) @@ -210,14 +213,7 @@ def test_local_index(self, foo_package): expected = os.path.normcase(os.path.realpath(foo_package)) assert actual == expected finally: - sys.path.remove(target) - for basedir in [target, ]: - if not os.path.exists(basedir) or not os.path.isdir(basedir): - continue - try: - shutil.rmtree(basedir) - except: - pass + sys.path.remove(install_target) if old_ppath is not None: os.environ['PYTHONPATH'] = old_ppath else: From c3b4d4bc997f71943b29bb8dccbdfcbc72bd7488 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:33:25 -0500 Subject: [PATCH 4983/8469] Extract sys.path and os.environ patching into install_target fixture --- setuptools/tests/test_easy_install.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1acf08b50b..6e2b25ddde 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -188,18 +188,19 @@ def foo_package(self, tmpdir): f.write('Name: foo\n') return str(tmpdir) - @pytest.fixture() + @pytest.yield_fixture() def install_target(self, tmpdir): - return str(tmpdir) + target = str(tmpdir) + with mock.patch('sys.path', sys.path + [target]): + python_path = os.path.pathsep.join(sys.path) + with mock.patch.dict(os.environ, PYTHONPATH=python_path): + yield target def test_local_index(self, foo_package, install_target): """ The local index must be used when easy_install locates installed packages. """ - sys.path.append(install_target) - old_ppath = os.environ.get('PYTHONPATH') - os.environ['PYTHONPATH'] = os.path.pathsep.join(sys.path) try: dist = Distribution() dist.script_name = 'setup.py' @@ -213,11 +214,7 @@ def test_local_index(self, foo_package, install_target): expected = os.path.normcase(os.path.realpath(foo_package)) assert actual == expected finally: - sys.path.remove(install_target) - if old_ppath is not None: - os.environ['PYTHONPATH'] = old_ppath - else: - del os.environ['PYTHONPATH'] + pass @contextlib.contextmanager def user_install_setup_context(self, *args, **kwargs): From 427b3bf0f2ddc07cc01637605277ca555d5b26ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:34:34 -0500 Subject: [PATCH 4984/8469] Remove unnecessary block --- setuptools/tests/test_easy_install.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6e2b25ddde..7d61fb8333 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -201,20 +201,17 @@ def test_local_index(self, foo_package, install_target): The local index must be used when easy_install locates installed packages. """ - try: - dist = Distribution() - dist.script_name = 'setup.py' - cmd = ei.easy_install(dist) - cmd.install_dir = install_target - cmd.args = ['foo'] - cmd.ensure_finalized() - cmd.local_index.scan([foo_package]) - res = cmd.easy_install('foo') - actual = os.path.normcase(os.path.realpath(res.location)) - expected = os.path.normcase(os.path.realpath(foo_package)) - assert actual == expected - finally: - pass + dist = Distribution() + dist.script_name = 'setup.py' + cmd = ei.easy_install(dist) + cmd.install_dir = install_target + cmd.args = ['foo'] + cmd.ensure_finalized() + cmd.local_index.scan([foo_package]) + res = cmd.easy_install('foo') + actual = os.path.normcase(os.path.realpath(res.location)) + expected = os.path.normcase(os.path.realpath(foo_package)) + assert actual == expected @contextlib.contextmanager def user_install_setup_context(self, *args, **kwargs): From 47c3c95f074c8d10cf946511196a75d7e3a1738b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 16:59:43 -0500 Subject: [PATCH 4985/8469] Edit changelog --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 608dd77d02..611b0124ca 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ CHANGES * Bootstrap script now accepts ``--to-dir`` to customize save directory or allow for re-use of existing repository of setuptools versions. See - Pull Request #112 for an alternate implementation. + Pull Request #112 for background. * Issue #285: ``easy_install`` no longer will default to installing packages to the "user site packages" directory if it is itself installed there. Instead, the user must pass ``--user`` in all cases to install From adbfaa73e54eef2a24673f49995c933eb0f88adf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 17:30:09 -0500 Subject: [PATCH 4986/8469] Bumped to 14.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 9ece89d7e7..a1d95ac215 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "13.0.2" +DEFAULT_VERSION = "14.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 525a47ea0f..7720175dcc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '13.0.2' +__version__ = '14.0' From 761473c7f30b8df3872416357224174ba8b654a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 17:30:11 -0500 Subject: [PATCH 4987/8469] Added tag 14.0 for changeset a3a105f795f8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e21214e5c3..256a8171b9 100644 --- a/.hgtags +++ b/.hgtags @@ -199,3 +199,4 @@ bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 +a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 From 45bf0df21a53809a891ea5bb45e5407a2ebb5e02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 17:30:46 -0500 Subject: [PATCH 4988/8469] Bumped to 14.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a1d95ac215..3374c36f76 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.0" +DEFAULT_VERSION = "14.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 7720175dcc..2ac79c2318 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.0' +__version__ = '14.1' From ab794ef306bcbe88c1fde6439ed02f889487c239 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 22:59:39 -0500 Subject: [PATCH 4989/8469] Use filter(None) for brevity --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4e84152018..81573fea80 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -435,7 +435,7 @@ def check_site_dir(self): self.pth_file = None PYTHONPATH = os.environ.get('PYTHONPATH', '').split(os.pathsep) - if instdir not in map(normalize_path, [_f for _f in PYTHONPATH if _f]): + if instdir not in map(normalize_path, filter(None, PYTHONPATH)): # only PYTHONPATH dirs need a site.py, so pretend it's there self.sitepy_installed = True elif self.multi_version and not os.path.exists(pth_file): From 275336b8fb9171ba8bf7a7114a2d6ae41993848b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:11:45 -0500 Subject: [PATCH 4990/8469] Remove comment that references a setup command, but even at the time it was committed, it's not duplicate code from anything in setuptools, and I'm unaware of what a setup command is. --- setuptools/command/easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 81573fea80..c9e61d1310 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -238,7 +238,6 @@ def finalize_options(self): self.config_vars['usersite'] = self.install_usersite # fix the install_dir if "--user" was used - # XXX: duplicate of the code in the setup command if self.user and site.ENABLE_USER_SITE: self.create_home_path() if self.install_userbase is None: From 126161426c858f6b3e73a330086d9bb0d2995a12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:16:27 -0500 Subject: [PATCH 4991/8469] Calculate scheme name directly. --- setuptools/command/easy_install.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c9e61d1310..c35ae16cf3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -244,10 +244,8 @@ def finalize_options(self): raise DistutilsPlatformError( "User base directory is not specified") self.install_base = self.install_platbase = self.install_userbase - if os.name == 'posix': - self.select_scheme("unix_user") - else: - self.select_scheme(os.name + "_user") + scheme_name = os.name.replace('posix', 'unix') + '_user' + self.select_scheme(scheme_name) self.expand_basedirs() self.expand_dirs() From 3a8d4728cbc3080a7a816f87dc20efafae6e28e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:19:23 -0500 Subject: [PATCH 4992/8469] Extract method for fixing install dir --- setuptools/command/easy_install.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c35ae16cf3..872f6bb896 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -237,15 +237,7 @@ def finalize_options(self): self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite - # fix the install_dir if "--user" was used - if self.user and site.ENABLE_USER_SITE: - self.create_home_path() - if self.install_userbase is None: - raise DistutilsPlatformError( - "User base directory is not specified") - self.install_base = self.install_platbase = self.install_userbase - scheme_name = os.name.replace('posix', 'unix') + '_user' - self.select_scheme(scheme_name) + self._fix_install_dir_for_user_site() self.expand_basedirs() self.expand_dirs() @@ -340,6 +332,19 @@ def finalize_options(self): self.outputs = [] + def _fix_install_dir_for_user_site(self): + """ + Fix the install_dir if "--user" was used. + """ + if self.user and site.ENABLE_USER_SITE: + self.create_home_path() + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + scheme_name = os.name.replace('posix', 'unix') + '_user' + self.select_scheme(scheme_name) + def _expand_attrs(self, attrs): for attr in attrs: val = getattr(self, attr) From 727f1668fc61f74867cc0cfdfabdd6d23699a6d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:21:01 -0500 Subject: [PATCH 4993/8469] Use short circuit instead of nesting functionality. --- setuptools/command/easy_install.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 872f6bb896..efe5f68b37 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -336,14 +336,16 @@ def _fix_install_dir_for_user_site(self): """ Fix the install_dir if "--user" was used. """ - if self.user and site.ENABLE_USER_SITE: - self.create_home_path() - if self.install_userbase is None: - raise DistutilsPlatformError( - "User base directory is not specified") - self.install_base = self.install_platbase = self.install_userbase - scheme_name = os.name.replace('posix', 'unix') + '_user' - self.select_scheme(scheme_name) + if not self.user or not site.ENABLE_USER_SITE: + return + + self.create_home_path() + if self.install_userbase is None: + raise DistutilsPlatformError( + "User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + scheme_name = os.name.replace('posix', 'unix') + '_user' + self.select_scheme(scheme_name) def _expand_attrs(self, attrs): for attr in attrs: From f922da30d3d4d6ef6ac99f65509cf243dcce1ea4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:22:40 -0500 Subject: [PATCH 4994/8469] Extract variable for error message. --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index efe5f68b37..9f480f053d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -341,8 +341,8 @@ def _fix_install_dir_for_user_site(self): self.create_home_path() if self.install_userbase is None: - raise DistutilsPlatformError( - "User base directory is not specified") + msg = "User base directory is not specified" + raise DistutilsPlatformError(msg) self.install_base = self.install_platbase = self.install_userbase scheme_name = os.name.replace('posix', 'unix') + '_user' self.select_scheme(scheme_name) From 537c16561318df78f1a512101d0eca1b0593616e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:29:47 -0500 Subject: [PATCH 4995/8469] Filter blockers in the iterable --- setuptools/command/easy_install.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9f480f053d..531ac8ff87 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -200,8 +200,11 @@ def initialize_options(self): ) def delete_blockers(self, blockers): - for filename in blockers: - if os.path.exists(filename) or os.path.islink(filename): + extant_blockers = ( + filename for filename in blockers + if os.path.exists(filename) or os.path.islink(filename) + ) + for filename in extant_blockers: log.info("Deleting %s", filename) if not self.dry_run: if (os.path.isdir(filename) and From f9fd181f25d50bd149c715c7ac52827da34d0e59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:31:49 -0500 Subject: [PATCH 4996/8469] Extract method for filename deletion. --- setuptools/command/easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 531ac8ff87..01c67ccc57 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -204,7 +204,9 @@ def delete_blockers(self, blockers): filename for filename in blockers if os.path.exists(filename) or os.path.islink(filename) ) - for filename in extant_blockers: + list(map(self._delete_filename, extant_blockers)) + + def _delete_filename(self, filename): log.info("Deleting %s", filename) if not self.dry_run: if (os.path.isdir(filename) and From 7ab342a1ed684563ee7742fc3f7fd04fac5b7fc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:35:27 -0500 Subject: [PATCH 4997/8469] Remove excess indent --- setuptools/command/easy_install.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 01c67ccc57..7dbbc878a4 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -207,13 +207,13 @@ def delete_blockers(self, blockers): list(map(self._delete_filename, extant_blockers)) def _delete_filename(self, filename): - log.info("Deleting %s", filename) - if not self.dry_run: - if (os.path.isdir(filename) and - not os.path.islink(filename)): - rmtree(filename) - else: - os.unlink(filename) + log.info("Deleting %s", filename) + if not self.dry_run: + if (os.path.isdir(filename) and + not os.path.islink(filename)): + rmtree(filename) + else: + os.unlink(filename) def finalize_options(self): if self.version: From e4fe5c76f89d0249ff7035a38795fa5ae1e38f09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:36:10 -0500 Subject: [PATCH 4998/8469] Short circuit on dry run --- setuptools/command/easy_install.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7dbbc878a4..7f360e055e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -208,12 +208,14 @@ def delete_blockers(self, blockers): def _delete_filename(self, filename): log.info("Deleting %s", filename) - if not self.dry_run: - if (os.path.isdir(filename) and - not os.path.islink(filename)): - rmtree(filename) - else: - os.unlink(filename) + if self.dry_run: + return + + if (os.path.isdir(filename) and + not os.path.islink(filename)): + rmtree(filename) + else: + os.unlink(filename) def finalize_options(self): if self.version: From 16060fd91b26126c6f1fce2c1dba4a79cf85177e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:36:45 -0500 Subject: [PATCH 4999/8469] Extract variable for is_tree --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7f360e055e..bf380f1313 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -211,8 +211,8 @@ def _delete_filename(self, filename): if self.dry_run: return - if (os.path.isdir(filename) and - not os.path.islink(filename)): + is_tree = os.path.isdir(filename) and not os.path.islink(filename) + if is_tree: rmtree(filename) else: os.unlink(filename) From 16a4240286b5202e2a52c22efb63fc3c1ba7ab02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:39:36 -0500 Subject: [PATCH 5000/8469] More concisely describe the removal. --- setuptools/command/easy_install.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bf380f1313..0828be84cf 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -212,10 +212,8 @@ def _delete_filename(self, filename): return is_tree = os.path.isdir(filename) and not os.path.islink(filename) - if is_tree: - rmtree(filename) - else: - os.unlink(filename) + remover = rmtree if is_tree else os.unlink + remover(filename) def finalize_options(self): if self.version: From cbc3c959feecae75c1ce7864543c7f3a14b65ab0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 Mar 2015 23:40:47 -0500 Subject: [PATCH 5001/8469] Use 'path' to describe a file or directory. --- setuptools/command/easy_install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0828be84cf..276b6f99ba 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -204,16 +204,16 @@ def delete_blockers(self, blockers): filename for filename in blockers if os.path.exists(filename) or os.path.islink(filename) ) - list(map(self._delete_filename, extant_blockers)) + list(map(self._delete_path, extant_blockers)) - def _delete_filename(self, filename): - log.info("Deleting %s", filename) + def _delete_path(self, path): + log.info("Deleting %s", path) if self.dry_run: return - is_tree = os.path.isdir(filename) and not os.path.islink(filename) + is_tree = os.path.isdir(path) and not os.path.islink(path) remover = rmtree if is_tree else os.unlink - remover(filename) + remover(path) def finalize_options(self): if self.version: From 0721693f695db566cb7f8253cdcd50d21559ac94 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 9 Mar 2015 08:38:48 +0100 Subject: [PATCH 5002/8469] fix makefile s/setuptools/pkg_resources/ --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ab60b882c3..37dd26eb91 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,6 @@ empty: exit 1 update-vendored: - rm -rf setuptools/_vendor/packaging - pip install -r setuptools/_vendor/vendored.txt -t setuptools/_vendor/ - rm -rf setuptools/_vendor/*.{egg,dist}-info + rm -rf pkg_resources/_vendor/packaging + pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ + rm -rf pkg_resources/_vendor/*.{egg,dist}-info From 170af2c8010aa7e7ff0d1c71d8ee6bcb2aea51cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 21:26:16 -0400 Subject: [PATCH 5003/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 611b0124ca..6c2ff946f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +14.1 +---- + +* Pull Request #125: Add ``__ne__`` to Requirement class. +* Various refactoring of easy_install. + ---- 14.0 ---- From 12a9c92696884ea7a3a63ac57abbe8fafdad501e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 21:31:11 -0400 Subject: [PATCH 5004/8469] Added tag 14.1 for changeset 9751a1671a12 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 256a8171b9..83bc4f5ae5 100644 --- a/.hgtags +++ b/.hgtags @@ -200,3 +200,4 @@ df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 +9751a1671a124e30ae344d1510b9c1dbb14f2775 14.1 From 09c966b75de843ec24c6fbababdc19772b24268d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 21:31:50 -0400 Subject: [PATCH 5005/8469] Bumped to 14.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3374c36f76..913a4ceb54 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.1" +DEFAULT_VERSION = "14.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 2ac79c2318..a52fd83269 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.1' +__version__ = '14.2' From 1919a4358eebcfd48e24756e0bb68035e8750800 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:09:26 -0400 Subject: [PATCH 5006/8469] Remove regression test for Distribute issue #318. The continuing relevance of this test is questionnaible, given that user installs of setuptools no longer imply user installs of other packages. Ref #360. --- setuptools/tests/test_easy_install.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7d61fb8333..c571499822 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -232,26 +232,6 @@ def patched_setup_context(self): self.user_install_setup_context, ) - def test_setup_requires(self): - """Regression test for Distribute issue #318 - - Ensure that a package with setup_requires can be installed when - setuptools is installed in the user site-packages without causing a - SandboxViolation. - """ - - test_pkg = create_setup_requires_package(os.getcwd()) - test_setup_py = os.path.join(test_pkg, 'setup.py') - - try: - with contexts.quiet(): - with self.patched_setup_context(): - run_setup(test_setup_py, ['install']) - except IndexError: - # Test fails in some cases due to bugs in Python - # See https://bitbucket.org/pypa/setuptools/issue/201 - pass - @pytest.yield_fixture def distutils_package(): From 24b1723a48ef5ba95afeabf96f8021b939d8391a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:40:27 -0400 Subject: [PATCH 5007/8469] Bypass the checking of site-packages when asserting not user install in site-packages. Fixes #360. --- setuptools/tests/test_easy_install.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c571499822..e71bbfc9e8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -154,13 +154,23 @@ def setup_context(tmpdir): @pytest.mark.usefixtures("setup_context") class TestUserInstallTest: + # prevent check that site-packages is writable. easy_install + # shouldn't be writing to system site-packages during finalize + # options, but while it does, bypass the behavior. + prev_sp_write = mock.patch( + 'setuptools.command.easy_install.easy_install.check_site_dir', + mock.Mock(), + ) + # simulate setuptools installed in user site packages @mock.patch('setuptools.command.easy_install.__file__', site.USER_SITE) @mock.patch('site.ENABLE_USER_SITE', True) + @prev_sp_write def test_user_install_not_implied_user_site_enabled(self): self.assert_not_user_site() @mock.patch('site.ENABLE_USER_SITE', False) + @prev_sp_write def test_user_install_not_implied_user_site_disabled(self): self.assert_not_user_site() From 6ef3f6262aac874f61483a3cc96da1e2a0b1a362 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:41:54 -0400 Subject: [PATCH 5008/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6c2ff946f3..3e72eaa1b5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +14.1.1 +------ + +* Issue #360: Removed undesirable behavior from test runs, preventing + write tests and installation to system site packages. + ---- 14.1 ---- From aba25cd363c6f7dc9469f00a1c56ef8f4ffc6f17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:44:48 -0400 Subject: [PATCH 5009/8469] Bumped to 14.1.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 913a4ceb54..c5a256a7d2 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.2" +DEFAULT_VERSION = "14.1.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index a52fd83269..8800c2074d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.2' +__version__ = '14.1.1' From a9cb52adc1ce9337e4c5c2602c48ab6daba680a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:44:50 -0400 Subject: [PATCH 5010/8469] Added tag 14.1.1 for changeset 07fcc3226782 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 83bc4f5ae5..5990158081 100644 --- a/.hgtags +++ b/.hgtags @@ -201,3 +201,4 @@ ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 9751a1671a124e30ae344d1510b9c1dbb14f2775 14.1 +07fcc3226782b979cedaaf456c7f1c5b2fdafd2c 14.1.1 From 0e0db0408fbcbb0a0a6de45a70dca32f5d91170b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Mar 2015 22:45:30 -0400 Subject: [PATCH 5011/8469] Bumped to 14.1.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c5a256a7d2..d4fd86c484 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.1.1" +DEFAULT_VERSION = "14.1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 8800c2074d..134b5685f6 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.1.1' +__version__ = '14.1.2' From 4a4ca5aefb4d78046f16adbdcc2ce96f262522b2 Mon Sep 17 00:00:00 2001 From: MinRK Date: Thu, 5 Feb 2015 11:48:02 -0800 Subject: [PATCH 5012/8469] ensure py_version and platform are str in hashcmp avoids unorderable None, str when sorting dists on Python 3 --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7701292b4c..a1dce2d804 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2448,8 +2448,8 @@ def hashcmp(self): self.precedence, self.key, _remove_md5_fragment(self.location), - self.py_version, - self.platform, + self.py_version or '', + self.platform or '', ) def __hash__(self): From 3ccb5a4fba4eccdb22e325c82593b8e4e91a0354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Fran=C3=A7ois=20Natali?= Date: Sat, 7 Feb 2015 13:27:50 +0000 Subject: [PATCH 5013/8469] Issue #23285: PEP 475 -- Retry system calls failing with EINTR. --- spawn.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/spawn.py b/spawn.py index 22e87e8fdb..5dd415a283 100644 --- a/spawn.py +++ b/spawn.py @@ -137,9 +137,6 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): try: pid, status = os.waitpid(pid, 0) except OSError as exc: - import errno - if exc.errno == errno.EINTR: - continue if not DEBUG: cmd = executable raise DistutilsExecError( From c14a53783773ecd520e998f72a2fd8fe4d58d8ca Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 7 Feb 2015 16:00:45 -0800 Subject: [PATCH 5014/8469] Version bump for 3.4.3rc1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index dfe62ffa4a..e8782819e1 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.2" +__version__ = "3.4.3rc1" #--end constants-- From 5bf2ae1154e0722c9de295d4ec9f9721b629af73 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 7 Feb 2015 16:00:55 -0800 Subject: [PATCH 5015/8469] Release bump for 3.5.0a1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 328bea6ffe..67ec78b295 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.5.0a0" +__version__ = "3.5.0a1" #--end constants-- From 2f7d730baf32b841c1b99d58b8efe3f8ca0423b8 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 14 Feb 2015 09:50:59 -0800 Subject: [PATCH 5016/8469] Closes #23437: Make user scripts directory versioned on Windows (patch by pmoore) --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index d768dc5463..67db007a02 100644 --- a/command/install.py +++ b/command/install.py @@ -51,7 +51,7 @@ 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', - 'scripts': '$userbase/Scripts', + 'scripts': '$userbase/Python$py_version_nodot/Scripts', 'data' : '$userbase', } From 1f83754d9d44682de0958692d91f1ac4c9bdfec3 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 22 Feb 2015 23:55:39 -0800 Subject: [PATCH 5017/8469] Release bump for 3.4.3 final. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e8782819e1..00a5859738 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.4.3rc1" +__version__ = "3.4.3" #--end constants-- From 4ffb1b7d89010474216e3baabef175c139aa4522 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 08:15:36 -0400 Subject: [PATCH 5018/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3e72eaa1b5..ca15f587f2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +14.2 +---- + +* Issue #137: Update ``Distribution.hashcmp`` so that Distributions with + None for pyversion or platform can be compared against Distributions + defining those attributes. + ------ 14.1.1 ------ From 6301007c244531948add7852db54045e9c3a11ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 08:18:41 -0400 Subject: [PATCH 5019/8469] Bumped to 14.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d4fd86c484..913a4ceb54 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.1.2" +DEFAULT_VERSION = "14.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 134b5685f6..a52fd83269 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.1.2' +__version__ = '14.2' From dd8c2936e235a91a62f5ee3a8045614184f0c108 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 08:18:43 -0400 Subject: [PATCH 5020/8469] Added tag 14.2 for changeset d714fb731de7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5990158081..8508404cd2 100644 --- a/.hgtags +++ b/.hgtags @@ -202,3 +202,4 @@ e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 9751a1671a124e30ae344d1510b9c1dbb14f2775 14.1 07fcc3226782b979cedaaf456c7f1c5b2fdafd2c 14.1.1 +d714fb731de779a1337d2d78cd413931f1f06193 14.2 From 6d69e5a0d777c6a564ec32f9b726da64f2a5ad9c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 08:19:20 -0400 Subject: [PATCH 5021/8469] Bumped to 14.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 913a4ceb54..5428375062 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.2" +DEFAULT_VERSION = "14.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index a52fd83269..89a024f067 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.2' +__version__ = '14.3' From e4a80d4fdf2871f538716034aa539014aea7abd9 Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Thu, 5 Mar 2015 01:42:38 +0100 Subject: [PATCH 5022/8469] Default to 755 permissions since checks later on test for non-group-writability --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a1dce2d804..0e32f45211 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2958,7 +2958,7 @@ def ensure_directory(path): os.makedirs(dirname) -def _bypass_ensure_directory(path, mode=0o777): +def _bypass_ensure_directory(path, mode=0o755): """Sandbox-bypassing version of ensure_directory()""" if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') From 4b8f2273ff4fe2d8343d79d0ecb81db7a9ad323c Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 8 Mar 2015 00:24:34 -0800 Subject: [PATCH 5023/8469] Release bump for 3.5.0a2. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 67ec78b295..451c5fbebc 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.5.0a1" +__version__ = "3.5.0a2" #--end constants-- From 729daffe61a5e6c5705ddf2aba36f9e0caf42f37 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 09:35:09 -0400 Subject: [PATCH 5024/8469] Remove unused parameter. --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0e32f45211..c3686f8897 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2958,14 +2958,14 @@ def ensure_directory(path): os.makedirs(dirname) -def _bypass_ensure_directory(path, mode=0o755): +def _bypass_ensure_directory(path): """Sandbox-bypassing version of ensure_directory()""" if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') dirname, filename = split(path) if dirname and filename and not isdir(dirname): _bypass_ensure_directory(dirname) - mkdir(dirname, mode) + mkdir(dirname, 0o755) def split_sections(s): From 1a4c6632a304225cfd797d5a1d6881578cb81af1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 09:42:23 -0400 Subject: [PATCH 5025/8469] Update changelog. Fixes #254. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ca15f587f2..fa161fc617 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +14.3 +---- + +* Issue #254: When creating temporary egg cache on Unix, use mode 755 + for creating the directory to avoid the subsequent warning if + the directory is group writable. + ---- 14.2 ---- From 482a2457aa5b28d1223cfb4f9130585bf8c9e8fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 09:47:06 -0400 Subject: [PATCH 5026/8469] Added tag 14.3 for changeset e3c635a7d463 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8508404cd2..ff5c6433f0 100644 --- a/.hgtags +++ b/.hgtags @@ -203,3 +203,4 @@ a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 9751a1671a124e30ae344d1510b9c1dbb14f2775 14.1 07fcc3226782b979cedaaf456c7f1c5b2fdafd2c 14.1.1 d714fb731de779a1337d2d78cd413931f1f06193 14.2 +e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 From 1581c8404e12f32190d3bc29825b9910a46f2347 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2015 09:47:40 -0400 Subject: [PATCH 5027/8469] Bumped to 14.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 5428375062..c8549761be 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.3" +DEFAULT_VERSION = "14.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 89a024f067..5b9a2bc63f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.3' +__version__ = '14.4' From 2283fc214217e5c3dca8cc65045271ab5d0ea522 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Thu, 19 Mar 2015 09:48:18 -0700 Subject: [PATCH 5028/8469] DistributionNotFound: Show requirers It is very helpful to know who required the missing package. E.g.: pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution was not found and is required by smlib.log. Note that there was a comment: "unfortunately, zc.buildout uses a str(err) to get the name of the distribution here..", but I did a search in the `buildout` code and I think that is no longer true, so I think that we're free to make the exception message more helpful without risk of breaking buildout: # In clone from https://github.com/buildout/buildout $ ag DistributionNotFound src/zc/buildout/buildout.py 686: except (ImportError, pkg_resources.DistributionNotFound): $ pip install --download=. --no-install zc.buildout ... Saved ./zc.buildout-2.3.1.tar.gz ... $ tar xf zc.buildout-2.3.1.tar.gz $ ag DistributionNotFound zc.buildout-2.3.1 zc.buildout-2.3.1/src/zc/buildout/buildout.py 686: except (ImportError, pkg_resources.DistributionNotFound): --HG-- branch : DistributionNotFound_list_requirers --- pkg_resources/__init__.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c3686f8897..4e820c0973 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -798,13 +798,16 @@ def resolve(self, requirements, env=None, installer=None, ws = WorkingSet([]) dist = best[req.key] = env.best_match(req, ws, installer) if dist is None: - #msg = ("The '%s' distribution was not found on this " - # "system, and is required by this application.") - #raise DistributionNotFound(msg % req) - - # unfortunately, zc.buildout uses a str(err) - # to get the name of the distribution here.. - raise DistributionNotFound(req) + requirers = required_by.get(req, None) + if requirers: + requirers_str = ', '.join(requirers) + else: + requirers_str = 'this application' + msg = ("The '%s' distribution was not found " + "and is required by %s." + % (req, requirers_str)) + warnings.warn(msg) + raise DistributionNotFound(msg) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency From 3ff70513dceb10287c79ca9eb902e42b74f3e55f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 19 Mar 2015 14:10:49 -0400 Subject: [PATCH 5029/8469] Replace deprecated usage with preferred usage. Fixes #364. --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a9940677ea..50f3d5c0c2 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -168,7 +168,8 @@ def run(self): self.mkpath(self.egg_info) installer = self.distribution.fetch_build_egg for ep in iter_entry_points('egg_info.writers'): - writer = ep.load(installer=installer) + ep.require(installer=installer) + writer = ep.resolve() writer(self, ep.name, os.path.join(self.egg_info, ep.name)) # Get rid of native_libs.txt if it was put there by older bdist_egg From a54a764326d516950861d2d317150e7e172bd99f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 11:26:02 -0400 Subject: [PATCH 5030/8469] Add test capturing failure to parse package names with hyphens. Ref #307 --- pkg_resources/tests/test_resources.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index a55478a249..92f076a12b 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -207,6 +207,16 @@ def testDistroDependsOptions(self): with pytest.raises(pkg_resources.UnknownExtra): d.requires(["foo"]) + def test_pkg_name_with_hyphen(self): + "Package names with hyphens are supported" + name = 'setuptools-markdown-1.0.egg' + dist = Distribution.from_filename(name) + assert dist.project_name == "setuptools-markdown" + assert dist.key == "setuptools-markdown" + assert dist.version == "1.0" + assert dist.py_version is None + assert dist.platform is None + class TestWorkingSet: def test_find_conflicting(self): From a074b625e3c765ac62cb4240d5c8d1d35152f8f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 12:34:02 -0400 Subject: [PATCH 5031/8469] Update EGG_NAME regular expression matcher to allow names to include dashes. Fixes failing test and fixes #307. --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c3686f8897..4cdb40dc35 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2267,8 +2267,8 @@ def yield_lines(strs): CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( - r"(?P[^-]+)" - r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?", + r"(?P.*?)" + r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?$", re.VERBOSE | re.IGNORECASE ).match From e1c326e105c1bbd3585e5867973b8d54dc9d4929 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 12:41:00 -0400 Subject: [PATCH 5032/8469] Reindent EGG_NAME to reflect structure. --- pkg_resources/__init__.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4cdb40dc35..507bacc645 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2267,9 +2267,17 @@ def yield_lines(strs): CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( - r"(?P.*?)" - r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?$", - re.VERBOSE | re.IGNORECASE + r""" + (?P.*?) ( + -(?P[^-]+) ( + -py(?P[^-]+) ( + -(?P.+) + )? + )? + )? + $ + """, + re.VERBOSE | re.IGNORECASE, ).match From a631a0700d2ebcc9ee98c91d474f351974cc0b92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 13:30:51 -0400 Subject: [PATCH 5033/8469] Match Python 3 for bdist_dumb. --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5ed19130d7..963b4b412a 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -140,8 +140,9 @@ def interpret_distro_name( parts = basename.split('-') if not py_version: for i,p in enumerate(parts[2:]): - if len(p)==5 and p.startswith('py2.'): - return # It's a bdist_dumb, not an sdist -- bail out + if p.match('py\d\.\d'): + # It's a bdist_dumb, not an sdist -- bail out + return for p in range(1,len(parts)+1): yield Distribution( From 00477b5b3e1f42b5ad9cdc553652e04beb675dbb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 13:31:38 -0400 Subject: [PATCH 5034/8469] Remove unused variable --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 963b4b412a..c117cb6206 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -139,7 +139,7 @@ def interpret_distro_name( parts = basename.split('-') if not py_version: - for i,p in enumerate(parts[2:]): + for p in parts[2:]: if p.match('py\d\.\d'): # It's a bdist_dumb, not an sdist -- bail out return From edf097e299d4382700f819288cb08390c53e109d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 13:34:15 -0400 Subject: [PATCH 5035/8469] Flat is better than nested. --- setuptools/package_index.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index c117cb6206..51769cdfb4 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -138,11 +138,9 @@ def interpret_distro_name( # versions in distribution archive names (sdist and bdist). parts = basename.split('-') - if not py_version: - for p in parts[2:]: - if p.match('py\d\.\d'): - # It's a bdist_dumb, not an sdist -- bail out - return + if not py_version and any(p.match('py\d\.\d') for p in parts[2:]): + # it is a bdist_dumb, not an sdist -- bail out + return for p in range(1,len(parts)+1): yield Distribution( From c21f34b66f67d7948d2f99143636cd1dab7734a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:29:44 -0400 Subject: [PATCH 5036/8469] Extract method for warning of legacy version --- pkg_resources/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 507bacc645..1bb67a71fa 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2500,6 +2500,11 @@ def key(self): def parsed_version(self): if not hasattr(self, "_parsed_version"): self._parsed_version = parse_version(self.version) + self._warn_legacy_version() + + return self._parsed_version + + def _warn_legacy_version(self): if isinstance( self._parsed_version, packaging.version.LegacyVersion): # While an empty version is techincally a legacy version and @@ -2520,7 +2525,6 @@ def parsed_version(self): PEP440Warning, ) - return self._parsed_version @property def version(self): From acd20ca332bb3f0ad48c7d92f832bfb2121decc1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:34:18 -0400 Subject: [PATCH 5037/8469] Reindent warning and use short circuits for flatter implementation. --- pkg_resources/__init__.py | 42 +++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 1bb67a71fa..f76114727f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -36,6 +36,7 @@ import plistlib import email.parser import tempfile +import textwrap from pkgutil import get_importer PY3 = sys.version_info > (3,) @@ -2505,26 +2506,29 @@ def parsed_version(self): return self._parsed_version def _warn_legacy_version(self): - if isinstance( - self._parsed_version, packaging.version.LegacyVersion): - # While an empty version is techincally a legacy version and - # is not a valid PEP 440 version, it's also unlikely to - # actually come from someone and instead it is more likely that - # it comes from setuptools attempting to parse a filename and - # including it in the list. So for that we'll gate this warning - # on if the version is anything at all or not. - if self.version: - warnings.warn( - "'%s (%s)' is being parsed as a legacy, non PEP 440, " - "version. You may find odd behavior and sort order. " - "In particular it will be sorted as less than 0.0. It " - "is recommend to migrate to PEP 440 compatible " - "versions." % ( - self.project_name, self.version, - ), - PEP440Warning, - ) + LV = packaging.version.LegacyVersion + is_legacy = isinstance(self._parsed_version, LV) + if not is_legacy: + return + + # While an empty version is techincally a legacy version and + # is not a valid PEP 440 version, it's also unlikely to + # actually come from someone and instead it is more likely that + # it comes from setuptools attempting to parse a filename and + # including it in the list. So for that we'll gate this warning + # on if the version is anything at all or not. + if not self.version: + return + + tmpl = textwrap.dedent(""" + '%s (%s)' is being parsed as a legacy, non PEP 440, + version. You may find odd behavior and sort order. + In particular it will be sorted as less than 0.0. It + is recommend to migrate to PEP 440 compatible + versions. + """).strip().replace('\n', ' ') + warnings.warn(tmpl % (self.project_name, self.version), PEP440Warning) @property def version(self): From 80c6b750898c53a0f627c64a0b953ae0e5fdb9d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:38:04 -0400 Subject: [PATCH 5038/8469] Prefer new string formatting. Re-use variable names. --- pkg_resources/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f76114727f..607d0eece1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2521,14 +2521,15 @@ def _warn_legacy_version(self): return tmpl = textwrap.dedent(""" - '%s (%s)' is being parsed as a legacy, non PEP 440, + '{project_name} ({version})' is being parsed as a legacy, + non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. """).strip().replace('\n', ' ') - warnings.warn(tmpl % (self.project_name, self.version), PEP440Warning) + warnings.warn(tmpl.format(**vars(self)), PEP440Warning) @property def version(self): From 5e00a02ea1f7473c952d4d359891db4f53ac1778 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:48:38 -0400 Subject: [PATCH 5039/8469] Disable warning of LegacyVersion in parsed_version. This functionality should be called explicitly at whatever times are appropriate for the warning. Fixes #307. --- pkg_resources/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 607d0eece1..6aac82961c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2501,7 +2501,6 @@ def key(self): def parsed_version(self): if not hasattr(self, "_parsed_version"): self._parsed_version = parse_version(self.version) - self._warn_legacy_version() return self._parsed_version From 8ae39ab3a0bb12f17d2cabfdc27725b0992ba3c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:53:44 -0400 Subject: [PATCH 5040/8469] Backed out changeset 6e045b2724d0 and 56d7ea3d42b2. Ref #307. --- pkg_resources/__init__.py | 4 ++-- pkg_resources/tests/test_resources.py | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4cdb40dc35..c3686f8897 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2267,8 +2267,8 @@ def yield_lines(strs): CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( - r"(?P.*?)" - r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?$", + r"(?P[^-]+)" + r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?", re.VERBOSE | re.IGNORECASE ).match diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 92f076a12b..a55478a249 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -207,16 +207,6 @@ def testDistroDependsOptions(self): with pytest.raises(pkg_resources.UnknownExtra): d.requires(["foo"]) - def test_pkg_name_with_hyphen(self): - "Package names with hyphens are supported" - name = 'setuptools-markdown-1.0.egg' - dist = Distribution.from_filename(name) - assert dist.project_name == "setuptools-markdown" - assert dist.key == "setuptools-markdown" - assert dist.version == "1.0" - assert dist.py_version is None - assert dist.platform is None - class TestWorkingSet: def test_find_conflicting(self): From 01bb6e0e9217255cd835cefb8162463dac5d8e6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 15:58:37 -0400 Subject: [PATCH 5041/8469] Correct regex usage --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 963b4b412a..95eb1cf3c2 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -140,7 +140,7 @@ def interpret_distro_name( parts = basename.split('-') if not py_version: for i,p in enumerate(parts[2:]): - if p.match('py\d\.\d'): + if re.match('py\d\.\d$', p): # It's a bdist_dumb, not an sdist -- bail out return From 94a92f47c4b323c3897a83dae6b91f524f0e2c25 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 16:02:05 -0400 Subject: [PATCH 5042/8469] Update changelog --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index fa161fc617..018407fae3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +------ +14.3.1 +------ + +* Issue #307: Removed PEP-440 warning during parsing of versions + in ``pkg_resources.Distribution``. +* Issue #364: Replace deprecated usage with recommended usage of + ``EntryPoint.load``. + ---- 14.3 ---- From fcb4bf6759c8fa674d749f2129f833195cd50431 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 16:08:27 -0400 Subject: [PATCH 5043/8469] Bumped to 14.3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c8549761be..0dab29fcee 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.4" +DEFAULT_VERSION = "14.3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 5b9a2bc63f..5fed68f1b5 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.4' +__version__ = '14.3.1' From 6feb154a786c35872a90269990999fe140bc71a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 16:08:30 -0400 Subject: [PATCH 5044/8469] Added tag 14.3.1 for changeset 608948cef7e0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ff5c6433f0..07885aa304 100644 --- a/.hgtags +++ b/.hgtags @@ -204,3 +204,4 @@ a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 07fcc3226782b979cedaaf456c7f1c5b2fdafd2c 14.1.1 d714fb731de779a1337d2d78cd413931f1f06193 14.2 e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 +608948cef7e0ab8951691b149f5b6f0184a5635e 14.3.1 From f0b26583b2abdfba057dc199d31701497ad894c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 16:09:13 -0400 Subject: [PATCH 5045/8469] Bumped to 14.3.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 0dab29fcee..683aeef4fe 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.3.1" +DEFAULT_VERSION = "14.3.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 5fed68f1b5..a2f34e924b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.3.1' +__version__ = '14.3.2' From e1f0b4019be6efa9c20f0f0dae13009f071ff2a0 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 24 Mar 2015 08:20:42 -0700 Subject: [PATCH 5046/8469] DistributionNotFound: Move message template to class --HG-- branch : DistributionNotFound_list_requirers --- pkg_resources/__init__.py | 34 ++++++++++++++++++++++-------- setuptools/command/easy_install.py | 4 +--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4e820c0973..6f1ab9b7df 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -368,6 +368,30 @@ def required_by(self): class DistributionNotFound(ResolutionError): """A requested distribution was not found""" + _template = ("The '{self.req}' distribution was not found " + "and is required by {self.requirers_str}") + + @property + def req(self): + return self.args[0] + + @property + def requirers(self): + return self.args[1] + + @property + def requirers_str(self): + if not self.requirers: + return 'the application' + return ', '.join(self.requirers) + + def report(self): + return self._template.format(**locals()) + + def __str__(self): + return self.report() + + class UnknownExtra(ResolutionError): """Distribution doesn't have an "extra feature" of the given name""" _provider_factories = {} @@ -799,15 +823,7 @@ def resolve(self, requirements, env=None, installer=None, dist = best[req.key] = env.best_match(req, ws, installer) if dist is None: requirers = required_by.get(req, None) - if requirers: - requirers_str = ', '.join(requirers) - else: - requirers_str = 'this application' - msg = ("The '%s' distribution was not found " - "and is required by %s." - % (req, requirers_str)) - warnings.warn(msg) - raise DistributionNotFound(msg) + raise DistributionNotFound(req, requirers) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 276b6f99ba..f2bfa68d17 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -709,9 +709,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): [requirement], self.local_index, self.easy_install ) except DistributionNotFound as e: - raise DistutilsError( - "Could not find required distribution %s" % e.args - ) + raise DistutilsError(str(e)) except VersionConflict as e: raise DistutilsError(e.report()) if self.always_copy or self.always_copy_from: From 34e0ed958b2a56ceb394e15f189ea9f932af0785 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Mar 2015 11:05:47 -0400 Subject: [PATCH 5047/8469] Update changelog --- CHANGES.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 018407fae3..61fd91df84 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,20 @@ CHANGES ======= +---- +15.0 +---- + +* Pull Request #126: DistributionNotFound message now lists the package or + packages that required it. E.g.:: + + pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution was not found and is required by smlib.log. + + Note that zc.buildout once dependended on the string rendering of this + message to determine the package that was not found. This expectation + has since been changed, but older versions of buildout may experience + problems. + ------ 14.3.1 ------ From 9a33ea35df1a77e721ebeb1700acaa74ca28a430 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Mar 2015 11:07:10 -0400 Subject: [PATCH 5048/8469] Bumped to 15.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 683aeef4fe..a3e69dc102 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "14.3.2" +DEFAULT_VERSION = "15.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index a2f34e924b..60d8514e11 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '14.3.2' +__version__ = '15.0' From 8cff8857708d580441192c02af9dab910ba11ebb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Mar 2015 11:07:31 -0400 Subject: [PATCH 5049/8469] Added tag 15.0b1 for changeset 617699fd3e44 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 07885aa304..778682e1a9 100644 --- a/.hgtags +++ b/.hgtags @@ -205,3 +205,4 @@ a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 d714fb731de779a1337d2d78cd413931f1f06193 14.2 e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 608948cef7e0ab8951691b149f5b6f0184a5635e 14.3.1 +617699fd3e44e54b6f95b80bfcf78164df37f266 15.0b1 From 95fd4bbb5ba5ce152673dcc1b03b370cea0fab89 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 29 Mar 2015 15:34:26 -0700 Subject: [PATCH 5050/8469] Release bump for Python 3.5.0a3. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 451c5fbebc..6b4287094b 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.5.0a2" +__version__ = "3.5.0a3" #--end constants-- From 933e26cd75231ba6402c38e4044e001a5d47fa3f Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 30 Mar 2015 03:40:43 +0200 Subject: [PATCH 5051/8469] Fix some typos. --- pkg_resources/__init__.py | 4 ++-- pkg_resources/_vendor/packaging/specifiers.py | 2 +- setuptools/command/easy_install.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a8a1694288..f033c10ef1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2528,7 +2528,7 @@ def _warn_legacy_version(self): if not is_legacy: return - # While an empty version is techincally a legacy version and + # While an empty version is technically a legacy version and # is not a valid PEP 440 version, it's also unlikely to # actually come from someone and instead it is more likely that # it comes from setuptools attempting to parse a filename and @@ -2542,7 +2542,7 @@ def _warn_legacy_version(self): non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It - is recommend to migrate to PEP 440 compatible + is recommended to migrate to PEP 440 compatible versions. """).strip().replace('\n', ' ') diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 9ad0a635ed..77516cf47b 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -502,7 +502,7 @@ def _compare_greater_than(self, prospective, spec): return False # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is techincally greater than, to match. + # in the specifier, which is technically greater than, to match. if prospective.local is not None: if Version(prospective.base_version) == Version(spec.base_version): return False diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f2bfa68d17..74803b59d2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -152,7 +152,7 @@ class easy_install(Command): create_index = PackageIndex def initialize_options(self): - # the --user option seemst to be an opt-in one, + # the --user option seems to be an opt-in one, # so the default should be False. self.user = 0 self.zip_ok = self.local_snapshots_ok = None From 8fe7605a2787648a23c28741e20ba403e95a357b Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 30 Mar 2015 04:26:56 +0200 Subject: [PATCH 5052/8469] Fix setuptools.sandbox._execfile() with Python 3.1. It fixes failure of setuptools.tests.test_sandbox.TestSandbox.test_setup_py_with_CRLF() with Python 3.1. --- setuptools/sandbox.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 6725512357..31e3eb2d0a 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -34,12 +34,12 @@ def _execfile(filename, globals, locals=None): Python 3 implementation of execfile. """ mode = 'rb' - # Python 2.6 compile requires LF for newlines, so use deprecated - # Universal newlines support. - if sys.version_info < (2, 7): - mode += 'U' with open(filename, mode) as stream: script = stream.read() + # compile() function in Python 2.6 and 3.1 requires LF line endings. + if sys.version_info[:2] < (2, 7) or sys.version_info[:2] >= (3, 0) and sys.version_info[:2] < (3, 2): + script = script.replace(b'\r\n', b'\n') + script = script.replace(b'\r', b'\n') if locals is None: locals = globals code = compile(script, filename, 'exec') From dface890cfe4a198b9271a5800e9d494f79e85b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Apr 2015 18:25:40 -0400 Subject: [PATCH 5053/8469] Update changelog. --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 61fd91df84..9670846f36 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,7 @@ CHANGES Note that zc.buildout once dependended on the string rendering of this message to determine the package that was not found. This expectation has since been changed, but older versions of buildout may experience - problems. + problems. See Buildout #242 for details. ------ 14.3.1 From 9e41a767df241615b024236f579bb62673f9f4a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Apr 2015 18:26:05 -0400 Subject: [PATCH 5054/8469] Added tag 15.0 for changeset d2c4d8486715 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 778682e1a9..acdb85deea 100644 --- a/.hgtags +++ b/.hgtags @@ -206,3 +206,4 @@ d714fb731de779a1337d2d78cd413931f1f06193 14.2 e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 608948cef7e0ab8951691b149f5b6f0184a5635e 14.3.1 617699fd3e44e54b6f95b80bfcf78164df37f266 15.0b1 +d2c4d84867154243993876d6248aafec1fd12679 15.0 From 56e49ec7d8b1c9fd7f2c36d041a87bb756baa2a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Apr 2015 18:26:41 -0400 Subject: [PATCH 5055/8469] Bumped to 15.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a3e69dc102..36ea3c2405 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "15.0" +DEFAULT_VERSION = "15.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 60d8514e11..1b29a7b435 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '15.0' +__version__ = '15.1' From 1dd10a4945fc57b6a9e52d09b634c778fce44852 Mon Sep 17 00:00:00 2001 From: Tom Bechtold Date: Sun, 5 Apr 2015 06:35:14 +0000 Subject: [PATCH 5056/8469] Created new branch fix-type-error-skip-reason --HG-- branch : fix-type-error-skip-reason From 82d003629ef23fd7f0dc2fb71d5edc937271ffd8 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Sun, 5 Apr 2015 08:39:18 +0200 Subject: [PATCH 5057/8469] Fix TypeError for pytest.skip() pytests skip() method doesn't have a 'reason' parameter. This fixes: TypeError: skip() got an unexpected keyword argument 'reason' --HG-- branch : fix-type-error-skip-reason --- setuptools/tests/test_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 90bb43136c..07f06db24f 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -28,7 +28,7 @@ def setup_module(module): try: urlopen('https://pypi.python.org/pypi') except Exception as exc: - pytest.skip(reason=str(exc)) + pytest.skip(str(exc)) @pytest.fixture From 7fa0438c7f004f96a81f810fa44e9daddad233f2 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 10 Apr 2015 13:24:41 +0300 Subject: [PATCH 5058/8469] Issue #23865: close() methods in multiple modules now are idempotent and more robust at shutdown. If needs to release multiple resources, they are released even if errors are occured. --- text_file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/text_file.py b/text_file.py index 40b8484a68..478336f0d2 100644 --- a/text_file.py +++ b/text_file.py @@ -118,10 +118,11 @@ def open(self, filename): def close(self): """Close the current file and forget everything we know about it (filename, current line number).""" - self.file.close() + file = self.file self.file = None self.filename = None self.current_line = None + file.close() def gen_error(self, msg, line=None): outmsg = [] From 6b108b8442eba8295a12655281e1b32b85a94a7b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 13 Apr 2015 14:21:02 -0400 Subject: [PATCH 5059/8469] Issue #23731: Implement PEP 488. The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied. --- command/build_py.py | 4 ++-- command/install_lib.py | 16 ++++++++-------- tests/test_build_py.py | 4 ++-- tests/test_install_lib.py | 13 ++++++------- util.py | 9 +++++---- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index 9100b96a2a..cf0ca57c32 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -314,10 +314,10 @@ def get_outputs(self, include_bytecode=1): if include_bytecode: if self.compile: outputs.append(importlib.util.cache_from_source( - filename, debug_override=True)) + filename, optimization='')) if self.optimize > 0: outputs.append(importlib.util.cache_from_source( - filename, debug_override=False)) + filename, optimization=self.optimize)) outputs += [ os.path.join(build_dir, filename) diff --git a/command/install_lib.py b/command/install_lib.py index 215813ba97..6154cf0943 100644 --- a/command/install_lib.py +++ b/command/install_lib.py @@ -22,15 +22,15 @@ class install_lib(Command): # possible scenarios: # 1) no compilation at all (--no-compile --no-optimize) # 2) compile .pyc only (--compile --no-optimize; default) - # 3) compile .pyc and "level 1" .pyo (--compile --optimize) - # 4) compile "level 1" .pyo only (--no-compile --optimize) - # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more) - # 6) compile "level 2" .pyo only (--no-compile --optimize-more) + # 3) compile .pyc and "opt-1" .pyc (--compile --optimize) + # 4) compile "opt-1" .pyc only (--no-compile --optimize) + # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more) + # 6) compile "opt-2" .pyc only (--no-compile --optimize-more) # - # The UI for this is two option, 'compile' and 'optimize'. + # The UI for this is two options, 'compile' and 'optimize'. # 'compile' is strictly boolean, and only decides whether to # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and - # decides both whether to generate .pyo files and what level of + # decides both whether to generate .pyc files and what level of # optimization to use. user_options = [ @@ -166,10 +166,10 @@ def _bytecode_filenames(self, py_filenames): continue if self.compile: bytecode_files.append(importlib.util.cache_from_source( - py_file, debug_override=True)) + py_file, optimization='')) if self.optimize > 0: bytecode_files.append(importlib.util.cache_from_source( - py_file, debug_override=False)) + py_file, optimization=self.optimize)) return bytecode_files diff --git a/tests/test_build_py.py b/tests/test_build_py.py index c8f6b89919..18283dc722 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -120,8 +120,8 @@ def test_byte_compile_optimized(self): found = os.listdir(cmd.build_lib) self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) - self.assertEqual(sorted(found), - ['boiledeggs.%s.pyo' % sys.implementation.cache_tag]) + expect = 'boiledeggs.{}.opt-1.pyc'.format(sys.implementation.cache_tag) + self.assertEqual(sorted(found), [expect]) def test_dir_in_package_data(self): """ diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 40dd1a95a6..5378aa8249 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -44,12 +44,11 @@ def test_byte_compile(self): f = os.path.join(project_dir, 'foo.py') self.write_file(f, '# python file') cmd.byte_compile([f]) - pyc_file = importlib.util.cache_from_source('foo.py', - debug_override=True) - pyo_file = importlib.util.cache_from_source('foo.py', - debug_override=False) + pyc_file = importlib.util.cache_from_source('foo.py', optimization='') + pyc_opt_file = importlib.util.cache_from_source('foo.py', + optimization=cmd.optimize) self.assertTrue(os.path.exists(pyc_file)) - self.assertTrue(os.path.exists(pyo_file)) + self.assertTrue(os.path.exists(pyc_opt_file)) def test_get_outputs(self): project_dir, dist = self.create_dist() @@ -66,8 +65,8 @@ def test_get_outputs(self): cmd.distribution.packages = ['spam'] cmd.distribution.script_name = 'setup.py' - # get_outputs should return 4 elements: spam/__init__.py, .pyc and - # .pyo, foo.import-tag-abiflags.so / foo.pyd + # get_outputs should return 4 elements: spam/__init__.py and .pyc, + # foo.import-tag-abiflags.so / foo.pyd outputs = cmd.get_outputs() self.assertEqual(len(outputs), 4, outputs) diff --git a/util.py b/util.py index 5adcac5a95..e423325de4 100644 --- a/util.py +++ b/util.py @@ -322,11 +322,11 @@ def byte_compile (py_files, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None): - """Byte-compile a collection of Python source files to either .pyc - or .pyo files in a __pycache__ subdirectory. 'py_files' is a list + """Byte-compile a collection of Python source files to .pyc + files in a __pycache__ subdirectory. 'py_files' is a list of files to compile; any files that don't end in ".py" are silently skipped. 'optimize' must be one of the following: - 0 - don't optimize (generate .pyc) + 0 - don't optimize 1 - normal optimization (like "python -O") 2 - extra optimization (like "python -OO") If 'force' is true, all files are recompiled regardless of @@ -438,8 +438,9 @@ def byte_compile (py_files, # cfile - byte-compiled file # dfile - purported source filename (same as 'file' by default) if optimize >= 0: + opt = '' if optimize == 0 else optimize cfile = importlib.util.cache_from_source( - file, debug_override=not optimize) + file, optimization=opt) else: cfile = importlib.util.cache_from_source(file) dfile = file From d8fda18abfeff18dd1b1588fbca707d1b2b14214 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2015 08:58:22 -0400 Subject: [PATCH 5060/8469] Bump packaging version to 15.1 --- CHANGES.txt | 6 +++ docs/conf.py | 4 ++ pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 48 ++++++++----------- pkg_resources/_vendor/vendored.txt | 2 +- 5 files changed, 32 insertions(+), 30 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9670846f36..012d859392 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +---- +15.1 +---- + +* Updated Packaging to 15.1 to address Packaging #28. + ---- 15.0 ---- diff --git a/docs/conf.py b/docs/conf.py index 248309871d..ba3a35bc31 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -242,6 +242,10 @@ pattern=r"Pip #(?P\d+)", url='{GH}/pypa/pip/issues/{pip}', ), + dict( + pattern=r"Packaging #(?P\d+)", + url='{GH}/pypa/packaging/issues/{packaging}', + ), ], ), } diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index 36f1a35c85..d524399519 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "15.0" +__version__ = "15.1" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 77516cf47b..d5d8a95674 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -502,7 +502,7 @@ def _compare_greater_than(self, prospective, spec): return False # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is technically greater than, to match. + # in the specifier, which is techincally greater than, to match. if prospective.local is not None: if Version(prospective.base_version) == Version(spec.base_version): return False @@ -673,10 +673,14 @@ def prereleases(self): if self._prereleases is not None: return self._prereleases + # If we don't have any specifiers, and we don't have a forced value, + # then we'll just return None since we don't know if this should have + # pre-releases or not. + if not self._specs: + return None + # Otherwise we'll see if any of the given specifiers accept # prereleases, if any of them do we'll return True, otherwise False. - # Note: The use of any() here means that an empty set of specifiers - # will always return False, this is an explicit design decision. return any(s.prereleases for s in self._specs) @prereleases.setter @@ -688,27 +692,21 @@ def contains(self, item, prereleases=None): if not isinstance(item, (LegacyVersion, Version)): item = parse(item) + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + # We can determine if we're going to allow pre-releases by looking to # see if any of the underlying items supports them. If none of them do # and this item is a pre-release then we do not allow it and we can # short circuit that here. # Note: This means that 1.0.dev1 would not be contained in something # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 - if (not (self.prereleases or prereleases)) and item.is_prerelease: + if not prereleases and item.is_prerelease: return False - # Determine if we're forcing a prerelease or not, we bypass - # self.prereleases here and use self._prereleases because we want to - # only take into consideration actual *forced* values. The underlying - # specifiers will handle the other logic. - # The logic here is: If prereleases is anything but None, we'll just - # go aheand and continue to use that. However if - # prereleases is None, then we'll use whatever the - # value of self._prereleases is as long as it is not - # None itself. - if prereleases is None and self._prereleases is not None: - prereleases = self._prereleases - # We simply dispatch to the underlying specs here to make sure that the # given version is contained within all of them. # Note: This use of all() here means that an empty set of specifiers @@ -719,24 +717,18 @@ def contains(self, item, prereleases=None): ) def filter(self, iterable, prereleases=None): - # Determine if we're forcing a prerelease or not, we bypass - # self.prereleases here and use self._prereleases because we want to - # only take into consideration actual *forced* values. The underlying - # specifiers will handle the other logic. - # The logic here is: If prereleases is anything but None, we'll just - # go aheand and continue to use that. However if - # prereleases is None, then we'll use whatever the - # value of self._prereleases is as long as it is not - # None itself. - if prereleases is None and self._prereleases is not None: - prereleases = self._prereleases + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases # If we have any specifiers, then we want to wrap our iterable in the # filter method for each one, this will act as a logical AND amongst # each specifier. if self._specs: for spec in self._specs: - iterable = spec.filter(iterable, prereleases=prereleases) + iterable = spec.filter(iterable, prereleases=bool(prereleases)) return iterable # If we do not have any specifiers, then we need to have a rough filter # which will filter out any pre-releases, unless there are no final diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 75a31670c6..28da422673 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1 +1 @@ -packaging==15.0 +packaging==15.1 From 66ec87700c358bcce3805f6be6da3e7d71519e03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2015 09:01:42 -0400 Subject: [PATCH 5061/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 012d859392..50064f6851 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES ---- * Updated Packaging to 15.1 to address Packaging #28. +* Fix ``setuptools.sandbox._execfile()`` with Python 3.1. ---- 15.0 From 3da4cd143348c46a7fc5469bf3d4b4008201e5c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2015 09:16:21 -0400 Subject: [PATCH 5062/8469] Added tag 15.1 for changeset 10fde952613b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index acdb85deea..75e65cd6d6 100644 --- a/.hgtags +++ b/.hgtags @@ -207,3 +207,4 @@ e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 608948cef7e0ab8951691b149f5b6f0184a5635e 14.3.1 617699fd3e44e54b6f95b80bfcf78164df37f266 15.0b1 d2c4d84867154243993876d6248aafec1fd12679 15.0 +10fde952613b7a3f650fb1f6b6ed58cbd232fa3c 15.1 From c2cc7435a96775ef4cd018930fdd83b8ba1dd45d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2015 09:17:24 -0400 Subject: [PATCH 5063/8469] Bumped to 15.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 36ea3c2405..6804679b72 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "15.1" +DEFAULT_VERSION = "15.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 1b29a7b435..2771d9394e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '15.1' +__version__ = '15.2' From 2ce0b4fac1ee4933717f90da0a0f78784194e681 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 19 Apr 2015 13:51:40 -0700 Subject: [PATCH 5064/8469] Version number bump for Python 3.5.0a4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 6b4287094b..37bfd5a8f7 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.5.0a3" +__version__ = "3.5.0a4" #--end constants-- From 2039b2aeba48685275bd2b341bf69d3f3f63786b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Tue, 21 Apr 2015 22:24:09 +0300 Subject: [PATCH 5065/8469] Check for Jython using sys.platform, not os.name --- setuptools/sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 31e3eb2d0a..213cebff25 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -10,7 +10,7 @@ import pkg_resources -if os.name == "java": +if sys.platform.startswith('java'): import org.python.modules.posix.PosixModule as _os else: _os = sys.modules[os.name] From 0e2d03c65eee67b2357069bd0de3eda453d8a319 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 10:14:37 -0400 Subject: [PATCH 5066/8469] Extract function for initializing the master working set. Fixes #373. --- pkg_resources/__init__.py | 48 +++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f033c10ef1..0721baa883 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3053,20 +3053,34 @@ def _initialize(g): g[name] = getattr(_manager, name) _initialize(globals()) -# Prepare the master working set and make the ``require()`` API available -working_set = WorkingSet._build_master() -_declare_state('object', working_set=working_set) - -require = working_set.require -iter_entry_points = working_set.iter_entry_points -add_activation_listener = working_set.subscribe -run_script = working_set.run_script -# backward compatibility -run_main = run_script -# Activate all distributions already on sys.path, and ensure that -# all distributions added to the working set in the future (e.g. by -# calling ``require()``) will get activated as well. -add_activation_listener(lambda dist: dist.activate()) -working_set.entries=[] -# match order -list(map(working_set.add_entry, sys.path)) + +def _initialize_master_working_set(): + """ + Prepare the master working set and make the ``require()`` + API available. + + This function has explicit effects on the global state + of pkg_resources. It is intended to be invoked once at + the initialization of this module. + + Invocation by other packages is unsupported and done + at their own risk. + """ + working_set = WorkingSet._build_master() + _declare_state('object', working_set=working_set) + + require = working_set.require + iter_entry_points = working_set.iter_entry_points + add_activation_listener = working_set.subscribe + run_script = working_set.run_script + # backward compatibility + run_main = run_script + # Activate all distributions already on sys.path, and ensure that + # all distributions added to the working set in the future (e.g. by + # calling ``require()``) will get activated as well. + add_activation_listener(lambda dist: dist.activate()) + working_set.entries=[] + # match order + list(map(working_set.add_entry, sys.path)) + globals().update(locals()) +_initialize_master_working_set() From a78cfe13a10e176f867d8a7b20f70ccfbbaa0d8d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 10:44:13 -0400 Subject: [PATCH 5067/8469] Declare variables for nicer linting. --- pkg_resources/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0721baa883..17dcbe991a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -89,6 +89,12 @@ import packaging.specifiers +# declare some globals that will be defined later to +# satisfy the linters. +require = None +working_set = None + + class PEP440Warning(RuntimeWarning): """ Used when there is an issue with a version or specifier not complying with From bb239c08fbfcb689ef743786c70f655d8a3f9035 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 10:46:47 -0400 Subject: [PATCH 5068/8469] Use _call_aside to signal early that the function is called immediately. --- pkg_resources/__init__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 17dcbe991a..f2b13d9967 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3051,15 +3051,23 @@ def _mkstemp(*args,**kw): warnings.filterwarnings("ignore", category=PEP440Warning, append=True) -# Set up global resource manager (deliberately not state-saved) -_manager = ResourceManager() +# from jaraco.functools 1.3 +def _call_aside(f, *args, **kwargs): + f(*args, **kwargs) + return f + + +@functools.partial(_call_aside, globals()) def _initialize(g): - for name in dir(_manager): + "Set up global resource manager (deliberately not state-saved)" + manager = ResourceManager() + g['_manager'] = manager + for name in dir(manager): if not name.startswith('_'): - g[name] = getattr(_manager, name) -_initialize(globals()) + g[name] = getattr(manager, name) +@_call_aside def _initialize_master_working_set(): """ Prepare the master working set and make the ``require()`` @@ -3089,4 +3097,3 @@ def _initialize_master_working_set(): # match order list(map(working_set.add_entry, sys.path)) globals().update(locals()) -_initialize_master_working_set() From ba2699fae236a351cc4d3acf7a7a7d50bb614722 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 10:50:53 -0400 Subject: [PATCH 5069/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 50064f6851..d10e218809 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +15.2 +---- + +* Issue #373: Provisionally expose + ``pkg_resources._initialize_master_working_set``, allowing for + imperative re-initialization of the master working set. + ---- 15.1 ---- From f0f8bf5b6deedb85e7b4b120e30c6d90891c9baf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 10:58:40 -0400 Subject: [PATCH 5070/8469] Partial appears to behave differently on Python 2.6. Also, this syntax is more congruent and easier to read. --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f2b13d9967..412e64c405 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3057,8 +3057,8 @@ def _call_aside(f, *args, **kwargs): return f -@functools.partial(_call_aside, globals()) -def _initialize(g): +@_call_aside +def _initialize(g=globals()): "Set up global resource manager (deliberately not state-saved)" manager = ResourceManager() g['_manager'] = manager From 11117b86c94d37c4cdc8607fa8aa125b51b9e9de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 11:02:09 -0400 Subject: [PATCH 5071/8469] Added tag 15.2 for changeset df5dc9c7aa75 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 75e65cd6d6..88e9fa67fa 100644 --- a/.hgtags +++ b/.hgtags @@ -208,3 +208,4 @@ e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 617699fd3e44e54b6f95b80bfcf78164df37f266 15.0b1 d2c4d84867154243993876d6248aafec1fd12679 15.0 10fde952613b7a3f650fb1f6b6ed58cbd232fa3c 15.1 +df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 From 42c62a7a344e2139f285c571930d179866167bd5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 11:02:44 -0400 Subject: [PATCH 5072/8469] Bumped to 15.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6804679b72..89970943af 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "15.2" +DEFAULT_VERSION = "15.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 2771d9394e..f0d1b4d4b0 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '15.2' +__version__ = '15.3' From 498414b82737a860bb94d787dd426a430ef9de1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 15:11:58 -0400 Subject: [PATCH 5073/8469] Remove use of deprecated imp module, avoiding deprecation warnings. --- pkg_resources/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 412e64c405..51c2bb008a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -21,7 +21,8 @@ import io import time import re -import imp +import _imp +import types import zipfile import zipimport import warnings @@ -2163,7 +2164,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = imp.new_module(packageName) + module = sys.modules[packageName] = types.ModuleType(packageName) module.__path__ = [] _set_parent_ns(packageName) elif not hasattr(module,'__path__'): @@ -2182,7 +2183,7 @@ def _handle_ns(packageName, path_item): def declare_namespace(packageName): """Declare that package 'packageName' is a namespace package""" - imp.acquire_lock() + _imp.acquire_lock() try: if packageName in _namespace_packages: return @@ -2209,18 +2210,18 @@ def declare_namespace(packageName): _handle_ns(packageName, path_item) finally: - imp.release_lock() + _imp.release_lock() def fixup_namespace_packages(path_item, parent=None): """Ensure that previously-declared namespace packages include path_item""" - imp.acquire_lock() + _imp.acquire_lock() try: for package in _namespace_packages.get(parent,()): subpath = _handle_ns(package, path_item) if subpath: fixup_namespace_packages(subpath, package) finally: - imp.release_lock() + _imp.release_lock() def file_ns_handler(importer, path_item, packageName, module): """Compute an ns-package subpath for a filesystem or zipfile importer""" From cbb12f9391afee2012a22bb5a95027b09a5713bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Apr 2015 20:07:23 -0400 Subject: [PATCH 5074/8469] Restore compatibility for Python 3.2 and earlier. --- pkg_resources/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 51c2bb008a..79384174d7 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -21,7 +21,6 @@ import io import time import re -import _imp import types import zipfile import zipimport @@ -40,6 +39,12 @@ import textwrap from pkgutil import get_importer +try: + import _imp +except ImportError: + # Python 3.2 compatibility + import imp as _imp + PY3 = sys.version_info > (3,) PY2 = not PY3 From 33544f0bf806d73495b00b9f8a0e45c25742fbc1 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 1 May 2015 08:23:57 -0700 Subject: [PATCH 5075/8469] Nicer error when problem in install_requires Instead of: $ python setup.py egg_info error in adminweb setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers We now have the more helpful: $ python setup.py egg_info error in adminweb setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers. Error: Expected version spec in smsdk.authsvc>=0.0.8,2.0 at 2.0 It took me longer than it should to find the problem with the old error message. The new error message would've helped greatly. --- setuptools/dist.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ffbc7c4861..220bcf8c68 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -122,11 +122,15 @@ def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: list(pkg_resources.parse_requirements(value)) - except (TypeError,ValueError): + except (TypeError, ValueError) as e: raise DistutilsSetupError( "%r must be a string or list of strings " - "containing valid project/version requirement specifiers" % (attr,) + "containing valid project/version requirement specifiers.\n" + "Error: %s" + % (attr, ' '.join(e.args)) ) + + def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: From fb27525a41a3f941aac906564d144d7177d35a79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 11:59:38 -0400 Subject: [PATCH 5076/8469] Let the exception render itself. --- setuptools/dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 220bcf8c68..892044dd3d 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -126,8 +126,8 @@ def check_requirements(dist, attr, value): raise DistutilsSetupError( "%r must be a string or list of strings " "containing valid project/version requirement specifiers.\n" - "Error: %s" - % (attr, ' '.join(e.args)) + "%s" + % (attr, e) ) From cd79379c95051b94a7facf56ac09c99f7cd31da0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 12:27:10 -0400 Subject: [PATCH 5077/8469] Replace ValueErrors containing implicit contract about the structure of the message with a RequirementParseError explicitly joining arguments for the string representation. --- pkg_resources/__init__.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 79384174d7..4ed713295f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -21,7 +21,7 @@ import io import time import re -import types +import imp import zipfile import zipimport import warnings @@ -39,12 +39,6 @@ import textwrap from pkgutil import get_importer -try: - import _imp -except ImportError: - # Python 3.2 compatibility - import imp as _imp - PY3 = sys.version_info > (3,) PY2 = not PY3 @@ -2169,7 +2163,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = types.ModuleType(packageName) + module = sys.modules[packageName] = imp.new_module(packageName) module.__path__ = [] _set_parent_ns(packageName) elif not hasattr(module,'__path__'): @@ -2188,7 +2182,7 @@ def _handle_ns(packageName, path_item): def declare_namespace(packageName): """Declare that package 'packageName' is a namespace package""" - _imp.acquire_lock() + imp.acquire_lock() try: if packageName in _namespace_packages: return @@ -2215,18 +2209,18 @@ def declare_namespace(packageName): _handle_ns(packageName, path_item) finally: - _imp.release_lock() + imp.release_lock() def fixup_namespace_packages(path_item, parent=None): """Ensure that previously-declared namespace packages include path_item""" - _imp.acquire_lock() + imp.acquire_lock() try: for package in _namespace_packages.get(parent,()): subpath = _handle_ns(package, path_item) if subpath: fixup_namespace_packages(subpath, package) finally: - _imp.release_lock() + imp.release_lock() def file_ns_handler(importer, path_item, packageName, module): """Compute an ns-package subpath for a filesystem or zipfile importer""" @@ -2859,6 +2853,11 @@ def issue_warning(*args,**kw): warnings.warn(stacklevel=level + 1, *args, **kw) +class RequirementParseError(ValueError): + def __str__(self): + return ' '.join(self.args) + + def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` @@ -2877,14 +2876,14 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): line = next(lines) p = 0 except StopIteration: - raise ValueError( + raise RequirementParseError( "\\ must not appear on the last nonblank line" ) match = ITEM(line, p) if not match: msg = "Expected " + item_name + " in" - raise ValueError(msg, line, "at", line[p:]) + raise RequirementParseError(msg, line, "at", line[p:]) items.append(match.group(*groups)) p = match.end() @@ -2895,7 +2894,7 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): p = match.end() elif not TERMINATOR(line, p): msg = "Expected ',' or end-of-list in" - raise ValueError(msg, line, "at", line[p:]) + raise RequirementParseError(msg, line, "at", line[p:]) match = TERMINATOR(line, p) # skip the terminator, if any @@ -2906,7 +2905,7 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): for line in lines: match = DISTRO(line) if not match: - raise ValueError("Missing distribution spec", line) + raise RequirementParseError("Missing distribution spec", line) project_name = match.group(1) p = match.end() extras = [] From 95a68afdf62f63e044f600ab87a4410db6bdf128 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 12:34:02 -0400 Subject: [PATCH 5078/8469] Render the error message as a single line without a period (for consistency with other usage). --- setuptools/dist.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 892044dd3d..05669366f9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -123,13 +123,11 @@ def check_requirements(dist, attr, value): try: list(pkg_resources.parse_requirements(value)) except (TypeError, ValueError) as e: - raise DistutilsSetupError( + tmpl = ( "%r must be a string or list of strings " - "containing valid project/version requirement specifiers.\n" - "%s" - % (attr, e) + "containing valid project/version requirement specifiers; %s" ) - + raise DistutilsSetupError(tmpl % (attr, e)) def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" From e55483f33a61c302461ed480a3556d746b8aba40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 12:35:19 -0400 Subject: [PATCH 5079/8469] Extract variable for clarity. --- pkg_resources/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4ed713295f..779bd36723 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2876,9 +2876,8 @@ def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): line = next(lines) p = 0 except StopIteration: - raise RequirementParseError( - "\\ must not appear on the last nonblank line" - ) + msg = "\\ must not appear on the last nonblank line" + raise RequirementParseError(msg) match = ITEM(line, p) if not match: From 0cc8362038f6feb3ede00ee9ce8ba8c7d04940d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 12:39:16 -0400 Subject: [PATCH 5080/8469] Use new string formatting --- setuptools/dist.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 05669366f9..d7ad46552a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -115,19 +115,20 @@ def check_extras(dist, attr, value): def assert_bool(dist, attr, value): """Verify that value is True, False, 0, or 1""" if bool(value) != value: - raise DistutilsSetupError( - "%r must be a boolean value (got %r)" % (attr,value) - ) + tmpl = "{attr!r} must be a boolean value (got {value!r})" + raise DistutilsSetupError(tmpl.format(attr=attr, value=value)) + + def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: list(pkg_resources.parse_requirements(value)) - except (TypeError, ValueError) as e: + except (TypeError, ValueError) as error: tmpl = ( - "%r must be a string or list of strings " - "containing valid project/version requirement specifiers; %s" + "{attr!r} must be a string or list of strings " + "containing valid project/version requirement specifiers; {error}" ) - raise DistutilsSetupError(tmpl % (attr, e)) + raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" From 0e086ac6e1b12a1db040e1852ca524c625bc53fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2015 12:56:24 -0400 Subject: [PATCH 5081/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index d10e218809..089077b44e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +15.3 +---- + +* Pull Request #130: Better error messages for errors in + parsed requirements. + ---- 15.2 ---- From 8b78e4b3bb977323247073fa99de62fdf8571630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Sat, 16 May 2015 15:56:43 +0300 Subject: [PATCH 5082/8469] Don't install tests in site-packages --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 234a78853d..afaf9f6145 100755 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ def _gen_console_scripts(): keywords="CPAN PyPI distutils eggs package management", url="https://bitbucket.org/pypa/setuptools", src_root=src_root, - packages=setuptools.find_packages(), + packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, py_modules=['easy_install'], From 766d1fbd091c92d68c85eae404aee1d792c815aa Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 16 May 2015 22:13:27 +0300 Subject: [PATCH 5083/8469] Issue #16314: Added support for the LZMA compression in distutils. --- archive_util.py | 21 ++--- command/bdist.py | 3 +- command/bdist_dumb.py | 3 +- tests/test_archive_util.py | 154 +++++++++++++++++++++++++------------ tests/test_bdist.py | 2 +- 5 files changed, 121 insertions(+), 62 deletions(-) diff --git a/archive_util.py b/archive_util.py index 4470bb0222..bed1384900 100644 --- a/archive_util.py +++ b/archive_util.py @@ -57,26 +57,28 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, """Create a (possibly compressed) tar file from all the files under 'base_dir'. - 'compress' must be "gzip" (the default), "compress", "bzip2", or None. - (compress will be deprecated in Python 3.2) + 'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or + None. ("compress" will be deprecated in Python 3.2) 'owner' and 'group' can be used to define an owner and a group for the archive that is being built. If not provided, the current owner and group will be used. The output tar file will be named 'base_dir' + ".tar", possibly plus - the appropriate compression extension (".gz", ".bz2" or ".Z"). + the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z"). Returns the output filename. """ - tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''} - compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'compress': '.Z'} + tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', 'xz': 'xz', None: '', + 'compress': ''} + compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz', + 'compress': '.Z'} # flags for compression program, each element of list will be an argument if compress is not None and compress not in compress_ext.keys(): raise ValueError( - "bad value for 'compress': must be None, 'gzip', 'bzip2' " - "or 'compress'") + "bad value for 'compress': must be None, 'gzip', 'bzip2', " + "'xz' or 'compress'") archive_name = base_name + '.tar' if compress != 'compress': @@ -177,6 +179,7 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): ARCHIVE_FORMATS = { 'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"), 'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"), + 'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"), 'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"), 'tar': (make_tarball, [('compress', None)], "uncompressed tar file"), 'zip': (make_zipfile, [],"ZIP file") @@ -197,8 +200,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, """Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific - extension; 'format' is the archive format: one of "zip", "tar", "ztar", - or "gztar". + extension; 'format' is the archive format: one of "zip", "tar", "gztar", + "bztar", "xztar", or "ztar". 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the diff --git a/command/bdist.py b/command/bdist.py index 6814a1c382..014871d280 100644 --- a/command/bdist.py +++ b/command/bdist.py @@ -61,13 +61,14 @@ class bdist(Command): 'nt': 'zip'} # Establish the preferred order (for the --help-formats option). - format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar', + format_commands = ['rpm', 'gztar', 'bztar', 'xztar', 'ztar', 'tar', 'wininst', 'zip', 'msi'] # And the real information. format_command = {'rpm': ('bdist_rpm', "RPM distribution"), 'gztar': ('bdist_dumb', "gzip'ed tar file"), 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'xztar': ('bdist_dumb', "xz'ed tar file"), 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), 'wininst': ('bdist_wininst', diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index 4405d12c05..f1bfb24923 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -22,7 +22,8 @@ class bdist_dumb(Command): "platform name to embed in generated filenames " "(default: %s)" % get_platform()), ('format=', 'f', - "archive format to create (tar, ztar, gztar, zip)"), + "archive format to create (tar, gztar, bztar, xztar, " + "ztar, zip)"), ('keep-temp', 'k', "keep the pseudo-installation tree around after " + "creating the distribution archive"), diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 2d72af4aa6..81d4c74a7b 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -13,7 +13,7 @@ ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import check_warnings, run_unittest, patch +from test.support import check_warnings, run_unittest, patch, change_cwd try: import grp @@ -34,6 +34,16 @@ except ImportError: ZLIB_SUPPORT = False +try: + import bz2 +except ImportError: + bz2 = None + +try: + import lzma +except ImportError: + lzma = None + def can_fs_encode(filename): """ Return True if the filename can be saved in the file system. @@ -52,19 +62,36 @@ class ArchiveUtilTestCase(support.TempdirManager, unittest.TestCase): @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') - def test_make_tarball(self): - self._make_tarball('archive') + def test_make_tarball(self, name='archive'): + # creating something to tar + tmpdir = self._create_files() + self._make_tarball(tmpdir, name, '.tar.gz') + # trying an uncompressed one + self._make_tarball(tmpdir, name, '.tar', compress=None) @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + def test_make_tarball_gzip(self): + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.gz', compress='gzip') + + @unittest.skipUnless(bz2, 'Need bz2 support to run') + def test_make_tarball_bzip2(self): + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.bz2', compress='bzip2') + + @unittest.skipUnless(lzma, 'Need lzma support to run') + def test_make_tarball_xz(self): + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.xz', compress='xz') + @unittest.skipUnless(can_fs_encode('Ã¥rchiv'), 'File system cannot handle this filename') def test_make_tarball_latin1(self): """ Mirror test_make_tarball, except filename contains latin characters. """ - self._make_tarball('Ã¥rchiv') # note this isn't a real word + self.test_make_tarball('Ã¥rchiv') # note this isn't a real word - @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') @unittest.skipUnless(can_fs_encode('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–'), 'File system cannot handle this filename') def test_make_tarball_extended(self): @@ -72,16 +99,9 @@ def test_make_tarball_extended(self): Mirror test_make_tarball, except filename contains extended characters outside the latin charset. """ - self._make_tarball('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive - - def _make_tarball(self, target_name): - # creating something to tar - tmpdir = self.mkdtemp() - self.write_file([tmpdir, 'file1'], 'xxx') - self.write_file([tmpdir, 'file2'], 'xxx') - os.mkdir(os.path.join(tmpdir, 'sub')) - self.write_file([tmpdir, 'sub', 'file3'], 'xxx') + self.test_make_tarball('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive + def _make_tarball(self, tmpdir, target_name, suffix, **kwargs): tmpdir2 = self.mkdtemp() unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0], "source and target should be on same drive") @@ -89,27 +109,13 @@ def _make_tarball(self, target_name): base_name = os.path.join(tmpdir2, target_name) # working with relative paths to avoid tar warnings - old_dir = os.getcwd() - os.chdir(tmpdir) - try: - make_tarball(splitdrive(base_name)[1], '.') - finally: - os.chdir(old_dir) + with change_cwd(tmpdir): + make_tarball(splitdrive(base_name)[1], 'dist', **kwargs) # check if the compressed tarball was created - tarball = base_name + '.tar.gz' - self.assertTrue(os.path.exists(tarball)) - - # trying an uncompressed one - base_name = os.path.join(tmpdir2, target_name) - old_dir = os.getcwd() - os.chdir(tmpdir) - try: - make_tarball(splitdrive(base_name)[1], '.', compress=None) - finally: - os.chdir(old_dir) - tarball = base_name + '.tar' + tarball = base_name + suffix self.assertTrue(os.path.exists(tarball)) + self.assertEqual(self._tarinfo(tarball), self._created_files) def _tarinfo(self, path): tar = tarfile.open(path) @@ -120,6 +126,9 @@ def _tarinfo(self, path): finally: tar.close() + _created_files = ('dist', 'dist/file1', 'dist/file2', + 'dist/sub', 'dist/sub/file3', 'dist/sub2') + def _create_files(self): # creating something to tar tmpdir = self.mkdtemp() @@ -130,15 +139,15 @@ def _create_files(self): os.mkdir(os.path.join(dist, 'sub')) self.write_file([dist, 'sub', 'file3'], 'xxx') os.mkdir(os.path.join(dist, 'sub2')) - tmpdir2 = self.mkdtemp() - base_name = os.path.join(tmpdir2, 'archive') - return tmpdir, tmpdir2, base_name + return tmpdir @unittest.skipUnless(find_executable('tar') and find_executable('gzip') and ZLIB_SUPPORT, 'Need the tar, gzip and zlib command to run') def test_tarfile_vs_tar(self): - tmpdir, tmpdir2, base_name = self._create_files() + tmpdir = self._create_files() + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') old_dir = os.getcwd() os.chdir(tmpdir) try: @@ -164,7 +173,8 @@ def test_tarfile_vs_tar(self): self.assertTrue(os.path.exists(tarball2)) # let's compare both tarballs - self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2)) + self.assertEqual(self._tarinfo(tarball), self._created_files) + self.assertEqual(self._tarinfo(tarball2), self._created_files) # trying an uncompressed one base_name = os.path.join(tmpdir2, 'archive') @@ -191,7 +201,8 @@ def test_tarfile_vs_tar(self): @unittest.skipUnless(find_executable('compress'), 'The compress program is required') def test_compress_deprecated(self): - tmpdir, tmpdir2, base_name = self._create_files() + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') # using compress and testing the PendingDeprecationWarning old_dir = os.getcwd() @@ -224,17 +235,17 @@ def test_compress_deprecated(self): 'Need zip and zlib support to run') def test_make_zipfile(self): # creating something to tar - tmpdir = self.mkdtemp() - self.write_file([tmpdir, 'file1'], 'xxx') - self.write_file([tmpdir, 'file2'], 'xxx') - - tmpdir2 = self.mkdtemp() - base_name = os.path.join(tmpdir2, 'archive') - make_zipfile(base_name, tmpdir) + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + with change_cwd(tmpdir): + make_zipfile(base_name, 'dist') # check if the compressed tarball was created tarball = base_name + '.zip' self.assertTrue(os.path.exists(tarball)) + with zipfile.ZipFile(tarball) as zf: + self.assertEqual(sorted(zf.namelist()), + ['dist/file1', 'dist/file2', 'dist/sub/file3']) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile_no_zlib(self): @@ -250,18 +261,24 @@ def fake_zipfile(*a, **kw): patch(self, archive_util.zipfile, 'ZipFile', fake_zipfile) # create something to tar and compress - tmpdir, tmpdir2, base_name = self._create_files() - make_zipfile(base_name, tmpdir) + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + with change_cwd(tmpdir): + make_zipfile(base_name, 'dist') tarball = base_name + '.zip' self.assertEqual(called, [((tarball, "w"), {'compression': zipfile.ZIP_STORED})]) self.assertTrue(os.path.exists(tarball)) + with zipfile.ZipFile(tarball) as zf: + self.assertEqual(sorted(zf.namelist()), + ['dist/file1', 'dist/file2', 'dist/sub/file3']) def test_check_archive_formats(self): self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), 'xxx') - self.assertEqual(check_archive_formats(['gztar', 'zip']), None) + self.assertIsNone(check_archive_formats(['gztar', 'bztar', 'xztar', + 'ztar', 'tar', 'zip'])) def test_make_archive(self): tmpdir = self.mkdtemp() @@ -282,6 +299,41 @@ def _breaks(*args, **kw): finally: del ARCHIVE_FORMATS['xxx'] + def test_make_archive_tar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'tar', base_dir, 'dist') + self.assertTrue(os.path.exists(res)) + self.assertEqual(os.path.basename(res), 'archive.tar') + self.assertEqual(self._tarinfo(res), self._created_files) + + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + def test_make_archive_gztar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'gztar', base_dir, 'dist') + self.assertTrue(os.path.exists(res)) + self.assertEqual(os.path.basename(res), 'archive.tar.gz') + self.assertEqual(self._tarinfo(res), self._created_files) + + @unittest.skipUnless(bz2, 'Need bz2 support to run') + def test_make_archive_bztar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'bztar', base_dir, 'dist') + self.assertTrue(os.path.exists(res)) + self.assertEqual(os.path.basename(res), 'archive.tar.bz2') + self.assertEqual(self._tarinfo(res), self._created_files) + + @unittest.skipUnless(bz2, 'Need xz support to run') + def test_make_archive_xztar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp() , 'archive') + res = make_archive(base_name, 'xztar', base_dir, 'dist') + self.assertTrue(os.path.exists(res)) + self.assertEqual(os.path.basename(res), 'archive.tar.xz') + self.assertEqual(self._tarinfo(res), self._created_files) + def test_make_archive_owner_group(self): # testing make_archive with owner and group, with various combinations # this works even if there's not gid/uid support @@ -291,7 +343,8 @@ def test_make_archive_owner_group(self): else: group = owner = 'root' - base_dir, root_dir, base_name = self._create_files() + base_dir = self._create_files() + root_dir = self.mkdtemp() base_name = os.path.join(self.mkdtemp() , 'archive') res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner, group=group) @@ -311,7 +364,8 @@ def test_make_archive_owner_group(self): @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") def test_tarfile_root_owner(self): - tmpdir, tmpdir2, base_name = self._create_files() + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') old_dir = os.getcwd() os.chdir(tmpdir) group = grp.getgrgid(0)[0] diff --git a/tests/test_bdist.py b/tests/test_bdist.py index 503a6e857d..f762f5d987 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -21,7 +21,7 @@ def test_formats(self): # what formats does bdist offer? formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar', - 'wininst', 'zip', 'ztar'] + 'wininst', 'xztar', 'zip', 'ztar'] found = sorted(cmd.format_command) self.assertEqual(found, formats) From a583aac0ebff225a9b138cda7d60047d7f7f462c Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 17 May 2015 02:23:02 +0300 Subject: [PATCH 5084/8469] Fixed issue #16314 test for the case when lzma is not available. --- tests/test_archive_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 81d4c74a7b..02fa1e27a4 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -325,7 +325,7 @@ def test_make_archive_bztar(self): self.assertEqual(os.path.basename(res), 'archive.tar.bz2') self.assertEqual(self._tarinfo(res), self._created_files) - @unittest.skipUnless(bz2, 'Need xz support to run') + @unittest.skipUnless(lzma, 'Need xz support to run') def test_make_archive_xztar(self): base_dir = self._create_files() base_name = os.path.join(self.mkdtemp() , 'archive') From bdb02cc81b0caee69db336b0093cbc7243a25879 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 May 2015 15:03:59 +0800 Subject: [PATCH 5085/8469] Update changelog --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 089077b44e..6d3466a9d6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,11 +3,13 @@ CHANGES ======= ---- -15.3 +16.0 ---- * Pull Request #130: Better error messages for errors in parsed requirements. +* Pull Request #133: Removed ``setuptools.tests`` from the + installed packages. ---- 15.2 From c7a68c40760615084c2f3cd4db4158cd248af3aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 May 2015 15:07:22 +0800 Subject: [PATCH 5086/8469] Bumped to 16.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 89970943af..14aef949b3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "15.3" +DEFAULT_VERSION = "16.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index f0d1b4d4b0..fd4afc5ae6 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '15.3' +__version__ = '16.0' From d6edbf0cbf36901fea369cafa5c6c3577591eeb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 May 2015 15:08:31 +0800 Subject: [PATCH 5087/8469] Added tag 16.0 for changeset e0825f0c7d59 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 88e9fa67fa..86037d84f0 100644 --- a/.hgtags +++ b/.hgtags @@ -209,3 +209,4 @@ e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 d2c4d84867154243993876d6248aafec1fd12679 15.0 10fde952613b7a3f650fb1f6b6ed58cbd232fa3c 15.1 df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 +e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 From 1f7177fc0f54fac1d76ee8a1c77f93cb2f6f7dc1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 May 2015 15:09:52 +0800 Subject: [PATCH 5088/8469] Bumped to 16.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 14aef949b3..e2b35663f3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "16.0" +DEFAULT_VERSION = "16.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index fd4afc5ae6..aeccd8e337 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '16.0' +__version__ = '16.1' From 37ec45e05a5c9b6dfccbfc97caf466496b727616 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 20 May 2015 16:10:04 +0300 Subject: [PATCH 5089/8469] Issue #24245: Eliminated senseless expect clauses that have no any effect. Patch by Martin Panter. --- core.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/core.py b/core.py index 2bfe66aa2f..f05b34b295 100644 --- a/core.py +++ b/core.py @@ -221,8 +221,6 @@ def run_setup (script_name, script_args=None, stop_after="run"): # Hmm, should we do something if exiting with a non-zero code # (ie. error)? pass - except: - raise if _setup_distribution is None: raise RuntimeError(("'distutils.core.setup()' was never called -- " From 6debf8d3d7c4ad63d2aae277fc9b4581c851548e Mon Sep 17 00:00:00 2001 From: James Polley Date: Fri, 22 May 2015 14:54:34 -0700 Subject: [PATCH 5090/8469] Expand the range of valid operators to include comparators --- pkg_resources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 779bd36723..b4029c4a74 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1489,6 +1489,10 @@ def get_op(cls, op): 'in': lambda x, y: x in y, '==': operator.eq, '!=': operator.ne, + '<': operator.lt, + '>': operator.gt, + '<=': operator.le, + '>=': operator.ge, } if hasattr(symbol, 'or_test'): ops[symbol.or_test] = cls.test From d034a5ec7f707499139f90eb846b9e720923124c Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 23 May 2015 09:02:50 -0700 Subject: [PATCH 5091/8469] Issue #23970: Adds distutils._msvccompiler for new Visual Studio versions. --- _msvccompiler.py | 561 +++++++++++++++++++++++++++++++++++++ ccompiler.py | 2 +- command/bdist_wininst.py | 31 +- command/build_ext.py | 36 +-- tests/test_msvccompiler.py | 160 +++++++++++ 5 files changed, 752 insertions(+), 38 deletions(-) create mode 100644 _msvccompiler.py create mode 100644 tests/test_msvccompiler.py diff --git a/_msvccompiler.py b/_msvccompiler.py new file mode 100644 index 0000000000..896d9d927f --- /dev/null +++ b/_msvccompiler.py @@ -0,0 +1,561 @@ +"""distutils._msvccompiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for Microsoft Visual Studio 2015. + +The module is compatible with VS 2015 and later. You can find legacy support +for older versions in distutils.msvc9compiler and distutils.msvccompiler. +""" + +# Written by Perry Stoll +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) +# ported to VS 2005 and VS 2008 by Christian Heimes +# ported to VS 2015 by Steve Dower + +import os +import subprocess +import re + +from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import CCompiler, gen_lib_options +from distutils import log +from distutils.util import get_platform + +import winreg +from itertools import count + +def _find_vcvarsall(): + with winreg.OpenKeyEx( + winreg.HKEY_LOCAL_MACHINE, + r"Software\Microsoft\VisualStudio\SxS\VC7", + access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY + ) as key: + if not key: + log.debug("Visual C++ is not registered") + return None + + best_version = 0 + best_dir = None + for i in count(): + try: + v, vc_dir, vt = winreg.EnumValue(key, i) + except OSError: + break + if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir): + try: + version = int(float(v)) + except (ValueError, TypeError): + continue + if version >= 14 and version > best_version: + best_version, best_dir = version, vc_dir + if not best_version: + log.debug("No suitable Visual C++ version found") + return None + + vcvarsall = os.path.join(best_dir, "vcvarsall.bat") + if not os.path.isfile(vcvarsall): + log.debug("%s cannot be found", vcvarsall) + return None + + return vcvarsall + +def _get_vc_env(plat_spec): + if os.getenv("DISTUTILS_USE_SDK"): + return { + key.lower(): value + for key, value in os.environ.items() + } + + vcvarsall = _find_vcvarsall() + if not vcvarsall: + raise DistutilsPlatformError("Unable to find vcvarsall.bat") + + try: + out = subprocess.check_output( + '"{}" {} && set'.format(vcvarsall, plat_spec), + shell=True, + stderr=subprocess.STDOUT, + universal_newlines=True, + ) + except subprocess.CalledProcessError as exc: + log.error(exc.output) + raise DistutilsPlatformError("Error executing {}" + .format(exc.cmd)) + + return { + key.lower(): value + for key, _, value in + (line.partition('=') for line in out.splitlines()) + if key and value + } + +def _find_exe(exe, paths=None): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + if not paths: + paths = os.getenv('path').split(os.pathsep) + for p in paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + return exe + +# A map keyed by get_platform() return values to values accepted by +# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is +# the param to cross-compile on x86 targetting amd64.) +PLAT_TO_VCVARS = { + 'win32' : 'x86', + 'win-amd64' : 'amd64', +} + +class MSVCCompiler(CCompiler) : + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'msvc' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = (_c_extensions + _cpp_extensions + + _rc_extensions + _mc_extensions) + res_extension = '.res' + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + + def __init__(self, verbose=0, dry_run=0, force=0): + CCompiler.__init__ (self, verbose, dry_run, force) + # target platform (.plat_name is consistent with 'bdist') + self.plat_name = None + self.initialized = False + + def initialize(self, plat_name=None): + # multi-init means we would need to check platform same each time... + assert not self.initialized, "don't init multiple times" + if plat_name is None: + plat_name = get_platform() + # sanity check for platforms to prevent obscure errors later. + if plat_name not in PLAT_TO_VCVARS: + raise DistutilsPlatformError("--plat-name must be one of {}" + .format(tuple(PLAT_TO_VCVARS))) + + # On x86, 'vcvarsall.bat amd64' creates an env that doesn't work; + # to cross compile, you use 'x86_amd64'. + # On AMD64, 'vcvarsall.bat amd64' is a native build env; to cross + # compile use 'x86' (ie, it runs the x86 compiler directly) + if plat_name == get_platform() or plat_name == 'win32': + # native build or cross-compile to win32 + plat_spec = PLAT_TO_VCVARS[plat_name] + else: + # cross compile from win32 -> some 64bit + plat_spec = '{}_{}'.format( + PLAT_TO_VCVARS[get_platform()], + PLAT_TO_VCVARS[plat_name] + ) + + vc_env = _get_vc_env(plat_spec) + if not vc_env: + raise DistutilsPlatformError("Unable to find a compatible " + "Visual Studio installation.") + + paths = vc_env.get('path', '').split(os.pathsep) + self.cc = _find_exe("cl.exe", paths) + self.linker = _find_exe("link.exe", paths) + self.lib = _find_exe("lib.exe", paths) + self.rc = _find_exe("rc.exe", paths) # resource compiler + self.mc = _find_exe("mc.exe", paths) # message compiler + self.mt = _find_exe("mt.exe", paths) # message compiler + + for dir in vc_env.get('include', '').split(os.pathsep): + if dir: + self.add_include_dir(dir) + + for dir in vc_env.get('lib', '').split(os.pathsep): + if dir: + self.add_library_dir(dir) + + self.preprocess_options = None + self.compile_options = [ + '/nologo', '/Ox', '/MD', '/W3', '/GL', '/DNDEBUG' + ] + self.compile_options_debug = [ + '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG' + ] + + self.ldflags_shared = [ + '/nologo', '/DLL', '/INCREMENTAL:NO' + ] + self.ldflags_shared_debug = [ + '/nologo', '/DLL', '/INCREMENTAL:no', '/DEBUG:FULL' + ] + self.ldflags_static = [ + '/nologo' + ] + + self.initialized = True + + # -- Worker methods ------------------------------------------------ + + def object_filenames(self, + source_filenames, + strip_dir=0, + output_dir=''): + ext_map = {ext: self.obj_extension for ext in self.src_extensions} + ext_map.update((ext, self.res_extension) + for ext in self._rc_extensions + self._mc_extensions) + + def make_out_path(p): + base, ext = os.path.splitext(p) + if strip_dir: + base = os.path.basename(base) + else: + _, base = os.path.splitdrive(base) + if base.startswith((os.path.sep, os.path.altsep)): + base = base[1:] + try: + return base + ext_map[ext] + except LookupError: + # Better to raise an exception instead of silently continuing + # and later complain about sources and targets having + # different lengths + raise CompileError("Don't know how to compile {}".format(p)) + + output_dir = output_dir or '' + return [ + os.path.join(output_dir, make_out_path(src_name)) + for src_name in source_filenames + ] + + + def compile(self, sources, + output_dir=None, macros=None, include_dirs=None, debug=0, + extra_preargs=None, extra_postargs=None, depends=None): + + if not self.initialized: + self.initialize() + compile_info = self._setup_compile(output_dir, macros, include_dirs, + sources, depends, extra_postargs) + macros, objects, extra_postargs, pp_opts, build = compile_info + + compile_opts = extra_preargs or [] + compile_opts.append('/c') + if debug: + compile_opts.extend(self.compile_options_debug) + else: + compile_opts.extend(self.compile_options) + + + add_cpp_opts = False + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = "/Tc" + src + elif ext in self._cpp_extensions: + input_opt = "/Tp" + src + add_cpp_opts = True + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn([self.rc] + pp_opts + [output_opt, input_opt]) + except DistutilsExecError as msg: + raise CompileError(msg) + continue + elif ext in self._mc_extensions: + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) + try: + # first compile .MC to .RC and .H file + self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src]) + base, _ = os.path.splitext(os.path.basename (src)) + rc_file = os.path.join(rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn([self.rc, "/fo" + obj, rc_file]) + + except DistutilsExecError as msg: + raise CompileError(msg) + continue + else: + # how to handle this file? + raise CompileError("Don't know how to compile {} to {}" + .format(src, obj)) + + args = [self.cc] + compile_opts + pp_opts + if add_cpp_opts: + args.append('/EHsc') + args.append(input_opt) + args.append("/Fo" + obj) + args.extend(extra_postargs) + + try: + self.spawn(args) + except DistutilsExecError as msg: + raise CompileError(msg) + + return objects + + + def create_static_lib(self, + objects, + output_libname, + output_dir=None, + debug=0, + target_lang=None): + + if not self.initialized: + self.initialize() + objects, output_dir = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, + output_dir=output_dir) + + if self._need_link(objects, output_filename): + lib_args = objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + try: + self.spawn([self.lib] + lib_args) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + + def link(self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=0, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None): + + if not self.initialized: + self.initialize() + objects, output_dir = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, + runtime_library_dirs) + libraries, library_dirs, runtime_library_dirs = fixed_args + + if runtime_library_dirs: + self.warn("I don't know what to do with 'runtime_library_dirs': " + + str(runtime_library_dirs)) + + lib_opts = gen_lib_options(self, + library_dirs, runtime_library_dirs, + libraries) + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + ldflags = (self.ldflags_shared_debug if debug + else self.ldflags_shared) + if target_desc == CCompiler.EXECUTABLE: + ldflags = ldflags[1:] + + export_opts = [] + for sym in (export_symbols or []): + export_opts.append("/EXPORT:" + sym) + + ld_args = (ldflags + lib_opts + export_opts + + objects + ['/OUT:' + output_filename]) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + build_temp = os.path.dirname(objects[0]) + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename)) + implib_file = os.path.join( + build_temp, + self.library_filename(dll_name)) + ld_args.append ('/IMPLIB:' + implib_file) + + self.manifest_setup_ldargs(output_filename, build_temp, ld_args) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + self.mkpath(os.path.dirname(output_filename)) + try: + self.spawn([self.linker] + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + + # embed the manifest + # XXX - this is somewhat fragile - if mt.exe fails, distutils + # will still consider the DLL up-to-date, but it will not have a + # manifest. Maybe we should link to a temp file? OTOH, that + # implies a build environment error that shouldn't go undetected. + mfinfo = self.manifest_get_embed_info(target_desc, ld_args) + if mfinfo is not None: + mffilename, mfid = mfinfo + out_arg = '-outputresource:{};{}'.format(output_filename, mfid) + try: + self.spawn([self.mt, '-nologo', '-manifest', + mffilename, out_arg]) + except DistutilsExecError as msg: + raise LinkError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + def manifest_setup_ldargs(self, output_filename, build_temp, ld_args): + # If we need a manifest at all, an embedded manifest is recommended. + # See MSDN article titled + # "How to: Embed a Manifest Inside a C/C++ Application" + # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) + # Ask the linker to generate the manifest in the temp dir, so + # we can check it, and possibly embed it, later. + temp_manifest = os.path.join( + build_temp, + os.path.basename(output_filename) + ".manifest") + ld_args.append('/MANIFESTFILE:' + temp_manifest) + + def manifest_get_embed_info(self, target_desc, ld_args): + # If a manifest should be embedded, return a tuple of + # (manifest_filename, resource_id). Returns None if no manifest + # should be embedded. See http://bugs.python.org/issue7833 for why + # we want to avoid any manifest for extension modules if we can) + for arg in ld_args: + if arg.startswith("/MANIFESTFILE:"): + temp_manifest = arg.split(":", 1)[1] + break + else: + # no /MANIFESTFILE so nothing to do. + return None + if target_desc == CCompiler.EXECUTABLE: + # by default, executables always get the manifest with the + # CRT referenced. + mfid = 1 + else: + # Extension modules try and avoid any manifest if possible. + mfid = 2 + temp_manifest = self._remove_visual_c_ref(temp_manifest) + if temp_manifest is None: + return None + return temp_manifest, mfid + + def _remove_visual_c_ref(self, manifest_file): + try: + # Remove references to the Visual C runtime, so they will + # fall through to the Visual C dependency of Python.exe. + # This way, when installed for a restricted user (e.g. + # runtimes are not in WinSxS folder, but in Python's own + # folder), the runtimes do not need to be in every folder + # with .pyd's. + # Returns either the filename of the modified manifest or + # None if no manifest should be embedded. + manifest_f = open(manifest_file) + try: + manifest_buf = manifest_f.read() + finally: + manifest_f.close() + pattern = re.compile( + r"""|)""", + re.DOTALL) + manifest_buf = re.sub(pattern, "", manifest_buf) + pattern = "\s*" + manifest_buf = re.sub(pattern, "", manifest_buf) + # Now see if any other assemblies are referenced - if not, we + # don't want a manifest embedded. + pattern = re.compile( + r"""|)""", re.DOTALL) + if re.search(pattern, manifest_buf) is None: + return None + + manifest_f = open(manifest_file, 'w') + try: + manifest_f.write(manifest_buf) + return manifest_file + finally: + manifest_f.close() + except OSError: + pass + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "/LIBPATH:" + dir + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC") + + def library_option(self, lib): + return self.library_filename(lib) + + def find_library_file(self, dirs, lib, debug=0): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] + for dir in dirs: + for name in try_names: + libfile = os.path.join(dir, self.library_filename(name)) + if os.path.isfile(libfile): + return libfile + else: + # Oops, didn't find it in *any* of 'dirs' + return None diff --git a/ccompiler.py b/ccompiler.py index 911e84dd3b..b7df394ecc 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -959,7 +959,7 @@ def get_default_compiler(osname=None, platform=None): # is assumed to be in the 'distutils' package.) compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"), - 'msvc': ('msvccompiler', 'MSVCCompiler', + 'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"), 'cygwin': ('cygwinccompiler', 'CygwinCCompiler', "Cygwin port of GNU C Compiler for Win32"), diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 959a8bf62e..a3eff7e7cf 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -303,7 +303,6 @@ def get_installer_filename(self, fullname): return installer_name def get_exe_bytes(self): - from distutils.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. # Without actually finding and executing the target version and parsing @@ -313,20 +312,28 @@ def get_exe_bytes(self): # We can then execute this program to obtain any info we need, such # as the real sys.version string for the build. cur_version = get_python_version() - if self.target_version and self.target_version != cur_version: - # If the target version is *later* than us, then we assume they - # use what we use - # string compares seem wrong, but are what sysconfig.py itself uses - if self.target_version > cur_version: - bv = get_build_version() + + # If the target version is *later* than us, then we assume they + # use what we use + # string compares seem wrong, but are what sysconfig.py itself uses + if self.target_version and self.target_version < cur_version: + if self.target_version < "2.4": + bv = 6.0 + elif self.target_version == "2.4": + bv = 7.1 + elif self.target_version == "2.5": + bv = 8.0 + elif self.target_version <= "3.2": + bv = 9.0 + elif self.target_version <= "3.4": + bv = 10.0 else: - if self.target_version < "2.4": - bv = 6.0 - else: - bv = 7.1 + bv = 14.0 else: # for current version - use authoritative check. - bv = get_build_version() + from msvcrt import CRT_ASSEMBLY_VERSION + bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])) + # wininst-x.y.exe is in the same directory as this file directory = os.path.dirname(__file__) diff --git a/command/build_ext.py b/command/build_ext.py index c5a3ce1915..d4cb11e6db 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -19,10 +19,6 @@ from site import USER_BASE -if os.name == 'nt': - from distutils.msvccompiler import get_build_version - MSVC_VERSION = int(get_build_version()) - # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). extension_name_re = re.compile \ @@ -206,27 +202,17 @@ def finalize_options(self): _sys_home = getattr(sys, '_home', None) if _sys_home: self.library_dirs.append(_sys_home) - if MSVC_VERSION >= 9: - # Use the .lib files for the correct architecture - if self.plat_name == 'win32': - suffix = 'win32' - else: - # win-amd64 or win-ia64 - suffix = self.plat_name[4:] - new_lib = os.path.join(sys.exec_prefix, 'PCbuild') - if suffix: - new_lib = os.path.join(new_lib, suffix) - self.library_dirs.append(new_lib) - - elif MSVC_VERSION == 8: - self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VS8.0')) - elif MSVC_VERSION == 7: - self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VS7.1')) + + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = 'win32' else: - self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PC', 'VC6')) + # win-amd64 or win-ia64 + suffix = self.plat_name[4:] + new_lib = os.path.join(sys.exec_prefix, 'PCbuild') + if suffix: + new_lib = os.path.join(new_lib, suffix) + self.library_dirs.append(new_lib) # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs @@ -716,7 +702,7 @@ def get_libraries(self, ext): # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. if sys.platform == "win32": - from distutils.msvccompiler import MSVCCompiler + from distutils._msvccompiler import MSVCCompiler if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py new file mode 100644 index 0000000000..b4407543b1 --- /dev/null +++ b/tests/test_msvccompiler.py @@ -0,0 +1,160 @@ +"""Tests for distutils._msvccompiler.""" +import sys +import unittest +import os + +from distutils.errors import DistutilsPlatformError +from distutils.tests import support +from test.support import run_unittest + +# A manifest with the only assembly reference being the msvcrt assembly, so +# should have the assembly completely stripped. Note that although the +# assembly has a reference the assembly is removed - that is +# currently a "feature", not a bug :) +_MANIFEST_WITH_ONLY_MSVC_REFERENCE = """\ + + + + + + + + + + + + + + + + + +""" + +# A manifest with references to assemblies other than msvcrt. When processed, +# this assembly should be returned with just the msvcrt part removed. +_MANIFEST_WITH_MULTIPLE_REFERENCES = """\ + + + + + + + + + + + + + + + + + + + + + + +""" + +_CLEANED_MANIFEST = """\ + + + + + + + + + + + + + + + + + + +""" + +SKIP_MESSAGE = (None if sys.platform == "win32" else + "These tests are only for win32") + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) +class msvccompilerTestCase(support.TempdirManager, + unittest.TestCase): + + def test_no_compiler(self): + # makes sure query_vcvarsall raises + # a DistutilsPlatformError if the compiler + # is not found + from distutils._msvccompiler import _get_vc_env + def _find_vcvarsall(): + return None + + import distutils._msvccompiler as _msvccompiler + old_find_vcvarsall = _msvccompiler._find_vcvarsall + _msvccompiler._find_vcvarsall = _find_vcvarsall + try: + self.assertRaises(DistutilsPlatformError, _get_vc_env, + 'wont find this version') + finally: + _msvccompiler._find_vcvarsall = old_find_vcvarsall + + def test_remove_visual_c_ref(self): + from distutils._msvccompiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES) + finally: + f.close() + + compiler = MSVCCompiler() + compiler._remove_visual_c_ref(manifest) + + # see what we got + f = open(manifest) + try: + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + finally: + f.close() + + # makes sure the manifest was properly cleaned + self.assertEqual(content, _CLEANED_MANIFEST) + + def test_remove_entire_manifest(self): + from distutils._msvccompiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE) + finally: + f.close() + + compiler = MSVCCompiler() + got = compiler._remove_visual_c_ref(manifest) + self.assertIsNone(got) + + +def test_suite(): + return unittest.makeSuite(msvccompilerTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) From 739202377f34c4058ce96bafd0150c4299fa21c0 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 23 May 2015 12:15:57 -0700 Subject: [PATCH 5092/8469] Issue #23970: Fixes bdist_wininst not working on non-Windows platform. --- command/bdist_wininst.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index a3eff7e7cf..0c0e2c1a26 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -331,8 +331,13 @@ def get_exe_bytes(self): bv = 14.0 else: # for current version - use authoritative check. - from msvcrt import CRT_ASSEMBLY_VERSION - bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])) + try: + from msvcrt import CRT_ASSEMBLY_VERSION + except ImportError: + # cross-building, so assume the latest version + bv = 14.0 + else: + bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])) # wininst-x.y.exe is in the same directory as this file From 1ae0b75fb909b3fa1bd42702d4ab2a943a8f7155 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sat, 23 May 2015 17:43:05 -0700 Subject: [PATCH 5093/8469] Version bump for 3.5.0b1. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 37bfd5a8f7..686ca1de88 100644 --- a/__init__.py +++ b/__init__.py @@ -13,5 +13,5 @@ # Updated automatically by the Python release process. # #--start constants-- -__version__ = "3.5.0a4" +__version__ = "3.5.0b1" #--end constants-- From 0db81b9974abf772d40f64f77c9d7220f880b4e9 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 25 May 2015 21:24:00 -0500 Subject: [PATCH 5094/8469] keep distutils version in sync with python version automatically --- __init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/__init__.py b/__init__.py index 6eb79cb639..d823d040a1 100644 --- a/__init__.py +++ b/__init__.py @@ -8,10 +8,6 @@ setup (...) """ -# Distutils version -# -# Updated automatically by the Python release process. -# -#--start constants-- -__version__ = "3.2.6" -#--end constants-- +import sys + +__version__ = sys.version[:sys.version.index(' ')] From 16da5eac3a04bc4224082ee54f5f0f5b1c8d92db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 May 2015 18:12:23 -0400 Subject: [PATCH 5095/8469] extract variable for nicer indentation --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 74803b59d2..515c89d595 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2024,8 +2024,8 @@ def get_args(cls, dist, header=None): group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): script_text = cls.template % locals() - for res in cls._get_script_args(type_, name, header, - script_text): + args = cls._get_script_args(type_, name, header, script_text) + for res in args: yield res @classmethod From 7ee56c5270d979f73c248c3ef5bac48793cd77d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 May 2015 18:14:16 -0400 Subject: [PATCH 5096/8469] Update docstring to include the actual entry point names (for hits when grepping). --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 515c89d595..2c127126ce 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2015,7 +2015,8 @@ def get_script_header(cls, script_text, executable=None, wininst=False): @classmethod def get_args(cls, dist, header=None): """ - Yield write_script() argument tuples for a distribution's entrypoints + Yield write_script() argument tuples for a distribution's + console_scripts and gui_scripts entry points. """ if header is None: header = cls.get_header() From b2847255769f7e40fa757c830020cb2daad7860d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 May 2015 18:40:01 -0400 Subject: [PATCH 5097/8469] Disallow path separators in script names. Fixes #390 --- setuptools/command/easy_install.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2c127126ce..1b32b1c821 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2024,11 +2024,21 @@ def get_args(cls, dist, header=None): for type_ in 'console', 'gui': group = type_ + '_scripts' for name, ep in dist.get_entry_map(group).items(): + cls._ensure_safe_name(name) script_text = cls.template % locals() args = cls._get_script_args(type_, name, header, script_text) for res in args: yield res + @staticmethod + def _ensure_safe_name(name): + """ + Prevent paths in *_scripts entry point names. + """ + has_path_sep = re.search(r'[\\/]', name) + if has_path_sep: + raise ValueError("Path separators not allowed in script names") + @classmethod def get_writer(cls, force_windows): # for backward compatibility From c87fd7aa8017f31ccf42ed66bae1f31f1cfef642 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 May 2015 18:42:49 -0400 Subject: [PATCH 5098/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6d3466a9d6..4ea74081ba 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +17.0 +---- + +* Issue #390: Disallow console scripts with path separators in + the name. Removes unintended functionality and brings behavior + into parity wih pip. + ---- 16.0 ---- From 75d108c95186aef502333c471ab103baa0602871 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 28 May 2015 15:28:22 +0200 Subject: [PATCH 5099/8469] Issue #378: Do not use internal importlib._bootstrap module. --- CHANGES.txt | 1 + pkg_resources/__init__.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4ea74081ba..08879612b6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES 17.0 ---- +* Issue #378: Do not use internal importlib._bootstrap module. * Issue #390: Disallow console scripts with path separators in the name. Removes unintended functionality and brings behavior into parity wih pip. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 779bd36723..7bb0bdb317 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -69,9 +69,9 @@ # Avoid try/except due to potential problems with delayed import mechanisms. if sys.version_info >= (3, 3) and sys.implementation.name == "cpython": - import importlib._bootstrap as importlib_bootstrap + import importlib.machinery as importlib_machinery else: - importlib_bootstrap = None + importlib_machinery = None try: import parser @@ -1720,8 +1720,8 @@ def _get(self, path): register_loader_type(type(None), DefaultProvider) -if importlib_bootstrap is not None: - register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) +if importlib_machinery is not None: + register_loader_type(importlib_machinery.SourceFileLoader, DefaultProvider) class EmptyProvider(NullProvider): @@ -2128,8 +2128,8 @@ def find_on_path(importer, path_item, only=False): break register_finder(pkgutil.ImpImporter, find_on_path) -if importlib_bootstrap is not None: - register_finder(importlib_bootstrap.FileFinder, find_on_path) +if importlib_machinery is not None: + register_finder(importlib_machinery.FileFinder, find_on_path) _declare_state('dict', _namespace_handlers={}) _declare_state('dict', _namespace_packages={}) @@ -2237,8 +2237,8 @@ def file_ns_handler(importer, path_item, packageName, module): register_namespace_handler(pkgutil.ImpImporter, file_ns_handler) register_namespace_handler(zipimport.zipimporter, file_ns_handler) -if importlib_bootstrap is not None: - register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler) +if importlib_machinery is not None: + register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler) def null_ns_handler(importer, path_item, packageName, module): From 13cf22d8341ebc19d4d43a2b66101192abdfd380 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2015 17:54:02 -0400 Subject: [PATCH 5100/8469] Correct typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 08879612b6..92cb6a4f7b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,7 @@ CHANGES * Issue #378: Do not use internal importlib._bootstrap module. * Issue #390: Disallow console scripts with path separators in the name. Removes unintended functionality and brings behavior - into parity wih pip. + into parity with pip. ---- 16.0 From 664646d91c8af89509193c747916eb3f4d920db8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2015 17:54:28 -0400 Subject: [PATCH 5101/8469] Bumped to 17.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e2b35663f3..ca42b878b3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "16.1" +DEFAULT_VERSION = "17.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index aeccd8e337..f4fad79b07 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '16.1' +__version__ = '17.0' From f5e82ccfefafe8ab8373db980e47bc23f3b601dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2015 22:22:30 -0400 Subject: [PATCH 5102/8469] Added tag 17.0 for changeset 8e5624096101 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 86037d84f0..a797d4e66f 100644 --- a/.hgtags +++ b/.hgtags @@ -210,3 +210,4 @@ d2c4d84867154243993876d6248aafec1fd12679 15.0 10fde952613b7a3f650fb1f6b6ed58cbd232fa3c 15.1 df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 +8e56240961015347fed477f00ca6a0783e81d3a2 17.0 From 435745ff2ff4be11ba68c41f297fbcbc3ee1fed5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2015 22:23:34 -0400 Subject: [PATCH 5103/8469] Bumped to 17.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index ca42b878b3..7966a1da28 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "17.0" +DEFAULT_VERSION = "17.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index f4fad79b07..f57a6fba9d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '17.0' +__version__ = '17.1' From 90a3e3b896d4f86337692f361a5a1bdcbf310bf9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:05:00 -0400 Subject: [PATCH 5104/8469] Add tests capturing expectation for range comparison operators (Ref #380). --- pkg_resources/api_tests.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index a6c25a378f..fc645d4800 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -417,3 +417,9 @@ Environment Markers >>> em("'yx' in 'x'") False + + >>> em("python_version >= '2.6'") + True + + >>> em("python_version > '2.5'") + True From c3bf0dd4521637a1301187af0aa8732613674561 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:22:01 -0400 Subject: [PATCH 5105/8469] Remove now deprecated test capturing failure of range comparison operators (Ref #380). --- pkg_resources/api_tests.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index fc645d4800..1c852e817c 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -364,9 +364,6 @@ Environment Markers >>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit! Language feature not supported in environment markers - >>> print(im("'x' < 'y'")) - '<' operator not allowed in environment markers - >>> print(im("'x' < 'y' < 'z'")) Chained comparison not allowed in environment markers From 208af4d231da879174ba189c2f756360ae6dca0a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:34:17 -0400 Subject: [PATCH 5106/8469] Add test capturing possible violation in expectation due to new Python 2.7.10 release. Ref #380. --- pkg_resources/tests/test_markers.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pkg_resources/tests/test_markers.py diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py new file mode 100644 index 0000000000..d8844e74e3 --- /dev/null +++ b/pkg_resources/tests/test_markers.py @@ -0,0 +1,16 @@ +try: + import unittest.mock as mock +except ImportError: + import mock + +from pkg_resources import evaluate_marker + + +@mock.patch.dict('pkg_resources.MarkerEvaluation.values', + python_full_version=mock.Mock(return_value='2.7.10')) +def test_lexicographic_ordering(): + """ + Although one might like 2.7.10 to be greater than 2.7.3, + the marker spec only supports lexicographic ordering. + """ + assert evaluate_marker("python_full_version > '2.7.3'") is False From 3ab82175e1d843d8f09f69f2d82ffc5d7d9a03df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:37:34 -0400 Subject: [PATCH 5107/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 92cb6a4f7b..4734ff049f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +17.1 +---- + +* Issue #380: Add support for range operators on environment + marker evaluation. + ---- 17.0 ---- From f7a6205b6145e5ba29d3be6b05d923ea50bab9c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:38:05 -0400 Subject: [PATCH 5108/8469] Added tag 17.1 for changeset a37bcaaeab36 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a797d4e66f..d554dc6340 100644 --- a/.hgtags +++ b/.hgtags @@ -211,3 +211,4 @@ d2c4d84867154243993876d6248aafec1fd12679 15.0 df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 8e56240961015347fed477f00ca6a0783e81d3a2 17.0 +a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 From 77b0d0176a4c26de3121d135853b28c3f290c3c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:39:14 -0400 Subject: [PATCH 5109/8469] Bumped to 17.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 7966a1da28..dd5bf5b950 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "17.1" +DEFAULT_VERSION = "17.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index f57a6fba9d..7da47b5e3b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '17.1' +__version__ = '17.2' From c1044e3706ed28a6913e0dfcb4f7eec713af34c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jun 2015 13:22:43 -0400 Subject: [PATCH 5110/8469] Backed out unintended changes made in f572ec9, restoring use of 'imp' module for dynamic module creation originally committed in 06ac3674 and 4c121bd24f. --- pkg_resources/__init__.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4ed713295f..c3b3d7af31 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -21,7 +21,7 @@ import io import time import re -import imp +import types import zipfile import zipimport import warnings @@ -39,6 +39,12 @@ import textwrap from pkgutil import get_importer +try: + import _imp +except ImportError: + # Python 3.2 compatibility + import imp as _imp + PY3 = sys.version_info > (3,) PY2 = not PY3 @@ -2163,7 +2169,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = imp.new_module(packageName) + module = sys.modules[packageName] = types.ModuleType(packageName) module.__path__ = [] _set_parent_ns(packageName) elif not hasattr(module,'__path__'): @@ -2182,7 +2188,7 @@ def _handle_ns(packageName, path_item): def declare_namespace(packageName): """Declare that package 'packageName' is a namespace package""" - imp.acquire_lock() + _imp.acquire_lock() try: if packageName in _namespace_packages: return @@ -2209,18 +2215,18 @@ def declare_namespace(packageName): _handle_ns(packageName, path_item) finally: - imp.release_lock() + _imp.release_lock() def fixup_namespace_packages(path_item, parent=None): """Ensure that previously-declared namespace packages include path_item""" - imp.acquire_lock() + _imp.acquire_lock() try: for package in _namespace_packages.get(parent,()): subpath = _handle_ns(package, path_item) if subpath: fixup_namespace_packages(subpath, package) finally: - imp.release_lock() + _imp.release_lock() def file_ns_handler(importer, path_item, packageName, module): """Compute an ns-package subpath for a filesystem or zipfile importer""" From 9b9c404a50c48e9be857c8743f80c7f8398d9d85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jun 2015 13:29:05 -0400 Subject: [PATCH 5111/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4734ff049f..9ca376fae4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +------ +17.1.1 +------ + +* Backed out unintended changes to pkg_resources, restoring removal of + deprecated imp module (`ref + `_). + ---- 17.1 ---- From bcd3e0055d24ea0b0077a2d986f6c4090489a644 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jun 2015 13:36:25 -0400 Subject: [PATCH 5112/8469] Bumped to 17.1.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index dd5bf5b950..46cd2099ba 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "17.2" +DEFAULT_VERSION = "17.1.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 7da47b5e3b..6c8b4c2be8 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '17.2' +__version__ = '17.1.1' From 805f39c73599c71536a8c62e5d67506d830c799a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jun 2015 13:36:26 -0400 Subject: [PATCH 5113/8469] Added tag 17.1.1 for changeset 4a0d01d690ff --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d554dc6340..ebbc6a12b9 100644 --- a/.hgtags +++ b/.hgtags @@ -212,3 +212,4 @@ df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 8e56240961015347fed477f00ca6a0783e81d3a2 17.0 a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 +4a0d01d690ff184904293e7a3244ac24ec060a73 17.1.1 From c1d71724e6f73eec022cb86161cf777ff37b009b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Jun 2015 13:37:34 -0400 Subject: [PATCH 5114/8469] Bumped to 17.1.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 46cd2099ba..07e4f6d851 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "17.1.1" +DEFAULT_VERSION = "17.1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 6c8b4c2be8..a9da9717b0 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '17.1.1' +__version__ = '17.1.2' From a811c089a4362c0dc6c4a84b708953dde9ebdbf8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Jun 2015 12:33:54 -0400 Subject: [PATCH 5115/8469] Detect Cython later in the build process, allowing the library to be specified in setup_requires. Fixes #288. --- CHANGES.txt | 24 ++++++++++++++++++++++++ setuptools/command/build_ext.py | 15 +++------------ setuptools/extension.py | 21 ++++++++++----------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9ca376fae4..5a1c7493f0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,30 @@ CHANGES ======= +---- +18.0 +---- + +* Dropped support for builds with Pyrex. Only Cython is supported. +* Issue #288: Detect Cython later in the build process, after + ``setup_requires`` dependencies are resolved. + Projects backed by Cython can now be readily built + with a ``setup_requires`` dependency. For example:: + + ext = setuptools.Extension('mylib', ['src/CythonStuff.pyx', 'src/CStuff.c']) + setuptools.setup( + ... + ext_modules=[ext], + setup_requires=['cython'], + ) + + For compatibility with older versions of setuptools, packagers should + still include ``src/CythonMod.c`` in the source distributions or + require that Cython be present before building source distributions. + However, for systems with this build of setuptools, Cython will be + downloaded on demand. + + ------ 17.1.1 ------ diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index e4b2c593f3..92e4a189b8 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -11,8 +11,8 @@ from setuptools.extension import Library try: - # Attempt to use Pyrex for building extensions, if available - from Pyrex.Distutils.build_ext import build_ext as _build_ext + # Attempt to use Cython for building extensions, if available + from Cython.Distutils.build_ext import build_ext as _build_ext except ImportError: _build_ext = _du_build_ext @@ -42,7 +42,6 @@ if_dl = lambda s: s if have_rtld else '' - class build_ext(_build_ext): def run(self): """Build extensions in build directory, then copy if --inplace""" @@ -74,15 +73,6 @@ def copy_extensions_to_source(self): if ext._needs_stub: self.write_stub(package_dir or os.curdir, ext, True) - if _build_ext is not _du_build_ext and not hasattr(_build_ext, - 'pyrex_sources'): - # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 - def swig_sources(self, sources, *otherargs): - # first do any Pyrex processing - sources = _build_ext.swig_sources(self, sources) or sources - # Then do any actual SWIG stuff on the remainder - return _du_build_ext.swig_sources(self, sources, *otherargs) - def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: @@ -176,6 +166,7 @@ def get_export_symbols(self, ext): return _build_ext.get_export_symbols(self, ext) def build_extension(self, ext): + ext._convert_pyx_sources_to_lang() _compiler = self.compiler try: if isinstance(ext, Library): diff --git a/setuptools/extension.py b/setuptools/extension.py index 8178ed33d7..a7c40f8664 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -12,35 +12,34 @@ msvc9_support.patch_for_specialized_compiler() -def have_pyrex(): +def _have_cython(): """ - Return True if Cython or Pyrex can be imported. + Return True if Cython can be imported. """ - pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' - for pyrex_impl in pyrex_impls: + cython_impls = 'Cython.Distutils.build_ext', + for cython_impl in cython_impls: try: - # from (pyrex_impl) import build_ext - __import__(pyrex_impl, fromlist=['build_ext']).build_ext + # from (cython_impl) import build_ext + __import__(cython_impl, fromlist=['build_ext']).build_ext return True except Exception: pass return False +# for compatibility +have_pyrex = _have_cython + class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" - def __init__(self, *args, **kw): - _Extension.__init__(self, *args, **kw) - self._convert_pyx_sources_to_lang() - def _convert_pyx_sources_to_lang(self): """ Replace sources with .pyx extensions to sources with the target language extension. This mechanism allows language authors to supply pre-converted sources but to prefer the .pyx sources. """ - if have_pyrex(): + if _have_cython(): # the build has Cython, so allow it to compile the .pyx files return lang = self.language or '' From 7bbbe8f420a1d52652eca080b3302f2fa64d9c30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Jun 2015 12:46:41 -0400 Subject: [PATCH 5116/8469] Bumped to 18.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 07e4f6d851..6db030d7c8 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "17.1.2" +DEFAULT_VERSION = "18.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index a9da9717b0..407a82bc46 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '17.1.2' +__version__ = '18.0' From 8c428b55cd4649bea3092f134bda8c919b96fe94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Jun 2015 12:47:02 -0400 Subject: [PATCH 5117/8469] Added tag 18.0b1 for changeset fac98a49bd98 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ebbc6a12b9..1c413807d4 100644 --- a/.hgtags +++ b/.hgtags @@ -213,3 +213,4 @@ e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 8e56240961015347fed477f00ca6a0783e81d3a2 17.0 a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 4a0d01d690ff184904293e7a3244ac24ec060a73 17.1.1 +fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 From 3c047624cfa74a42320334ed6ec0dd7b6bd789b6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 10 Jun 2015 14:56:52 -0400 Subject: [PATCH 5118/8469] Remove loop, made unnecessary by removal of support for Pyrex --- setuptools/extension.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index a7c40f8664..35eb7c7c55 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -16,14 +16,13 @@ def _have_cython(): """ Return True if Cython can be imported. """ - cython_impls = 'Cython.Distutils.build_ext', - for cython_impl in cython_impls: - try: - # from (cython_impl) import build_ext - __import__(cython_impl, fromlist=['build_ext']).build_ext - return True - except Exception: - pass + cython_impl = 'Cython.Distutils.build_ext', + try: + # from (cython_impl) import build_ext + __import__(cython_impl, fromlist=['build_ext']).build_ext + return True + except Exception: + pass return False # for compatibility From e5588b705a2418bd7c46aeae4971f7ebe4bd6ead Mon Sep 17 00:00:00 2001 From: Stephen Drake Date: Thu, 11 Jun 2015 03:22:51 +0000 Subject: [PATCH 5119/8469] Don't quote executable name twice in script headers Don't quote the executable name in JythonCommandSpec.from_environment() since it is quoted if necessary in CommandSpec._render(). With the executable quoted on initialisation of JythonCommandSpec, the quotes get escaped in the resulting header, eg: #!/usr/bin/env \"/path/to/jython\" --- setuptools/command/easy_install.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 1b32b1c821..df1655bfb0 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1944,15 +1944,6 @@ def relevant(cls): __import__('java').lang.System.getProperty('os.name') != 'Linux' ) - @classmethod - def from_environment(cls): - string = '"' + cls._sys_executable() + '"' - return cls.from_string(string) - - @classmethod - def from_string(cls, string): - return cls([string]) - def as_header(self): """ Workaround Jython's sys.executable being a .sh (an invalid From 79e447fcc29d4591f1a4b3403840357e8bccb234 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jun 2015 11:05:37 -0400 Subject: [PATCH 5120/8469] Fix test failure when __PYVENV_LAUNCHER__ is set. Fixes #396. --- setuptools/tests/test_easy_install.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index e71bbfc9e8..a690315d16 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -488,9 +488,11 @@ def test_from_param_for_CommandSpec_is_passthrough(self): cmd_new = ei.CommandSpec.from_param(cmd) assert cmd is cmd_new + @mock.patch('sys.executable', TestScriptHeader.exe_with_spaces) + @mock.patch.dict(os.environ) def test_from_environment_with_spaces_in_executable(self): - with mock.patch('sys.executable', TestScriptHeader.exe_with_spaces): - cmd = ei.CommandSpec.from_environment() + del os.environ['__PYVENV_LAUNCHER__'] + cmd = ei.CommandSpec.from_environment() assert len(cmd) == 1 assert cmd.as_header().startswith('#!"') From ca3a52c7b79fa6d8279c2c5eea739414dd481aee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Jun 2015 11:10:46 -0400 Subject: [PATCH 5121/8469] Update changelog --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5a1c7493f0..8b229910c4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,7 +24,9 @@ CHANGES require that Cython be present before building source distributions. However, for systems with this build of setuptools, Cython will be downloaded on demand. - +* Issue #396: Fixed test failure on OS X. +* Pull Request #136: Remove excessive quoting from shebang headers + for Jython. ------ 17.1.1 From 01c1e7b38b4017e705c8a42b72281b1048afeec2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Jun 2015 18:51:26 -0400 Subject: [PATCH 5122/8469] Added tag 18.0 for changeset 0a49ee524b0a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1c413807d4..5e08eb8add 100644 --- a/.hgtags +++ b/.hgtags @@ -214,3 +214,4 @@ e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 4a0d01d690ff184904293e7a3244ac24ec060a73 17.1.1 fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 +0a49ee524b0a1d67d2a11c8c22f082b57acd7ae1 18.0 From 47413a2792fb772f4bdcf7a61a843b495464feae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Jun 2015 18:52:38 -0400 Subject: [PATCH 5123/8469] Bumped to 18.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6db030d7c8..cc8da01ecb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.0" +DEFAULT_VERSION = "18.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 407a82bc46..92f360079d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.0' +__version__ = '18.1' From ea96c15d03dea659cb3cd572e1246bb15ec68e1c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Jun 2015 20:20:13 -0400 Subject: [PATCH 5124/8469] Conditionally remove __PYVENV_LAUNCHER__ --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a690315d16..66601bfe11 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -491,7 +491,7 @@ def test_from_param_for_CommandSpec_is_passthrough(self): @mock.patch('sys.executable', TestScriptHeader.exe_with_spaces) @mock.patch.dict(os.environ) def test_from_environment_with_spaces_in_executable(self): - del os.environ['__PYVENV_LAUNCHER__'] + os.environ.pop('__PYVENV_LAUNCHER__', None) cmd = ei.CommandSpec.from_environment() assert len(cmd) == 1 assert cmd.as_header().startswith('#!"') From a23e95f499849815db5c852a4983388c8a27b0cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jun 2015 16:59:21 -0400 Subject: [PATCH 5125/8469] Update changelog. Along with f44e81f2f62f, fixes #401. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8b229910c4..58c723124c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +18.0.1 +------ + +* Issue #401: Fix failure in test suite. + ---- 18.0 ---- From fc350581c83b27d5846b192016f7525059790f5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jun 2015 16:59:48 -0400 Subject: [PATCH 5126/8469] Bumped to 18.0.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index cc8da01ecb..3762bd80e6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.1" +DEFAULT_VERSION = "18.0.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 92f360079d..0c6e893f6b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.1' +__version__ = '18.0.1' From bf0d9092a69ecbdcf5e5a768bdd892b616ce11bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jun 2015 16:59:50 -0400 Subject: [PATCH 5127/8469] Added tag 18.0.1 for changeset e364795c1b09 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5e08eb8add..2b76cd275e 100644 --- a/.hgtags +++ b/.hgtags @@ -215,3 +215,4 @@ a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 4a0d01d690ff184904293e7a3244ac24ec060a73 17.1.1 fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 0a49ee524b0a1d67d2a11c8c22f082b57acd7ae1 18.0 +e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 From d215171466c4c7511044f92337e215ceda26d07f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Jun 2015 17:01:04 -0400 Subject: [PATCH 5128/8469] Bumped to 18.0.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 3762bd80e6..4fea4ec3e4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.0.1" +DEFAULT_VERSION = "18.0.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 0c6e893f6b..0767a409a3 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.0.1' +__version__ = '18.0.2' From e0beae7ae0bea46e4af3892bd4d9298d256d3205 Mon Sep 17 00:00:00 2001 From: vrutsky Date: Thu, 2 Jul 2015 11:00:57 +0000 Subject: [PATCH 5129/8469] fix typo: "a a" --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 89c08e23f8..0feb09ea95 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1467,7 +1467,7 @@ are included in any source distribution you build. This is a big improvement over having to manually write a ``MANIFEST.in`` file and try to keep it in sync with your project. So, if you are using CVS or Subversion, and your source distributions only need to include files that you're tracking in -revision control, don't create a a ``MANIFEST.in`` file for your project. +revision control, don't create a ``MANIFEST.in`` file for your project. (And, if you already have one, you might consider deleting it the next time you would otherwise have to change it.) From d51ba2d7a8850a7fb56a6572b372626dd1cd3631 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 20 Jul 2015 16:35:49 +0100 Subject: [PATCH 5130/8469] Big performance fix for find_packages by ignoring hidden dirs earlier --- setuptools/__init__.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8188f12528..f653635989 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -81,10 +81,20 @@ def _all_dirs(base_path): for dir in dirs: yield os.path.relpath(os.path.join(root, dir), base_path) + @staticmethod + def _suitable_dirs(base_path): + """ + Return all suitable package dirs in base_path, relative to base_path + """ + for root, dirs, files in os.walk(base_path, followlinks=True): + # Mutate dirs to trim the search: + dirs[:] = filterfalse(lambda n: '.' in n, dirs) + for dir in dirs: + yield os.path.relpath(os.path.join(root, dir), base_path) + @classmethod def _find_packages_iter(cls, base_path): - dirs = cls._all_dirs(base_path) - suitable = filterfalse(lambda n: '.' in n, dirs) + suitable = cls._suitable_dirs(base_path) return ( path.replace(os.path.sep, '.') for path in suitable From 7c42a077cf4a91e095a2bc4964927de32b5cab78 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Tue, 28 Jul 2015 15:55:07 +1200 Subject: [PATCH 5131/8469] Issue #23426: run_setup was broken in distutils. Patch from Alexander Belopolsky. --- core.py | 5 ++--- tests/test_core.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/core.py b/core.py index f05b34b295..d603d4a45a 100644 --- a/core.py +++ b/core.py @@ -204,16 +204,15 @@ def run_setup (script_name, script_args=None, stop_after="run"): global _setup_stop_after, _setup_distribution _setup_stop_after = stop_after - save_argv = sys.argv + save_argv = sys.argv.copy() g = {'__file__': script_name} - l = {} try: try: sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args with open(script_name, 'rb') as f: - exec(f.read(), g, l) + exec(f.read(), g) finally: sys.argv = save_argv _setup_stop_after = None diff --git a/tests/test_core.py b/tests/test_core.py index 41321f7db4..57856f19b6 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -28,6 +28,21 @@ setup() """ +setup_does_nothing = """\ +from distutils.core import setup +setup() +""" + + +setup_defines_subclass = """\ +from distutils.core import setup +from distutils.command.install import install as _install + +class install(_install): + sub_commands = _install.sub_commands + ['cmd'] + +setup(cmdclass={'install': install}) +""" class CoreTestCase(support.EnvironGuard, unittest.TestCase): @@ -65,6 +80,21 @@ def test_run_setup_provides_file(self): distutils.core.run_setup( self.write_setup(setup_using___file__)) + def test_run_setup_preserves_sys_argv(self): + # Make sure run_setup does not clobber sys.argv + argv_copy = sys.argv.copy() + distutils.core.run_setup( + self.write_setup(setup_does_nothing)) + self.assertEqual(sys.argv, argv_copy) + + def test_run_setup_defines_subclass(self): + # Make sure the script can use __file__; if that's missing, the test + # setup.py script will raise NameError. + dist = distutils.core.run_setup( + self.write_setup(setup_defines_subclass)) + install = dist.get_command_obj('install') + self.assertIn('cmd', install.sub_commands) + def test_run_setup_uses_current_dir(self): # This tests that the setup script is run with the current directory # as its own current directory; this was temporarily broken by a From 84deb7074ef2c9086aeb440f84738fef0bc67f74 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 30 Jul 2015 11:51:06 -0700 Subject: [PATCH 5132/8469] Update default msvccompiler link options to match the options used for core builds. This ensures that wheels will work when moved to machines that have the same subset of the MSVC libraries as a regular CPython install. Specifically, vcruntime##0.dll may not be installed, and should not be a dependency. --- _msvccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 896d9d927f..4e2eed72a9 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -207,10 +207,10 @@ def initialize(self, plat_name=None): ] self.ldflags_shared = [ - '/nologo', '/DLL', '/INCREMENTAL:NO' + '/nologo', '/DLL', '/INCREMENTAL:NO', '/LTCG', '/nodefaultlib:libucrt.lib', 'ucrt.lib' ] self.ldflags_shared_debug = [ - '/nologo', '/DLL', '/INCREMENTAL:no', '/DEBUG:FULL' + '/nologo', '/DLL', '/INCREMENTAL:no', '/LTCG', '/DEBUG:FULL', '/nodefaultlib:libucrtd.lib', 'ucrtd.lib' ] self.ldflags_static = [ '/nologo' From e3886227ec1c8db491f79eaf46500d65b81b7d6d Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 1 Aug 2015 20:13:21 -0400 Subject: [PATCH 5133/8469] Upgrade packaging to 15.3 --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 24 +++++++++++++++++-- pkg_resources/_vendor/packaging/version.py | 2 ++ pkg_resources/_vendor/vendored.txt | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index d524399519..eadb794eec 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -22,7 +22,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "15.1" +__version__ = "15.3" __author__ = "Donald Stufft" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index d5d8a95674..891664f05c 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -151,6 +151,14 @@ def _coerce_version(self, version): version = parse(version) return version + @property + def operator(self): + return self._spec[0] + + @property + def version(self): + return self._spec[1] + @property def prereleases(self): return self._prereleases @@ -159,6 +167,9 @@ def prereleases(self): def prereleases(self, value): self._prereleases = value + def __contains__(self, item): + return self.contains(item) + def contains(self, item, prereleases=None): # Determine if prereleases are to be allowed or not. if prereleases is None: @@ -176,7 +187,7 @@ def contains(self, item, prereleases=None): # Actually do the comparison to determine if this item is contained # within this Specifier or not. - return self._get_operator(self._spec[0])(item, self._spec[1]) + return self._get_operator(self.operator)(item, self.version) def filter(self, iterable, prereleases=None): yielded = False @@ -526,7 +537,7 @@ def prereleases(self): # operators, and if they are if they are including an explicit # prerelease. operator, version = self._spec - if operator in ["==", ">=", "<=", "~="]: + if operator in ["==", ">=", "<=", "~=", "==="]: # The == specifier can include a trailing .*, if it does we # want to remove before parsing. if operator == "==" and version.endswith(".*"): @@ -666,6 +677,12 @@ def __ne__(self, other): return self._specs != other._specs + def __len__(self): + return len(self._specs) + + def __iter__(self): + return iter(self._specs) + @property def prereleases(self): # If we have been given an explicit prerelease modifier, then we'll @@ -687,6 +704,9 @@ def prereleases(self): def prereleases(self, value): self._prereleases = value + def __contains__(self, item): + return self.contains(item) + def contains(self, item, prereleases=None): # Ensure that our item is a Version or LegacyVersion instance. if not isinstance(item, (LegacyVersion, Version)): diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index cf8afb16d6..4ba574b9fa 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -324,6 +324,8 @@ def _parse_letter_version(letter, number): letter = "b" elif letter in ["c", "pre", "preview"]: letter = "rc" + elif letter in ["rev", "r"]: + letter = "post" return letter, int(number) if not letter and number: diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 28da422673..4cf7664ec9 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1 +1 @@ -packaging==15.1 +packaging==15.3 From 8a65cea4898dcbdf26ac5b9488964b59a8724a5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2015 14:51:26 -0400 Subject: [PATCH 5134/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 58c723124c..6dda9dbb2d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +---- +18.1 +---- + +* Upgrade to vendored packaging 15.3. + ------ 18.0.1 ------ From 35bd5713397e0a25eaf1d79230fd1f119838f109 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2015 14:51:39 -0400 Subject: [PATCH 5135/8469] Bumped to 18.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4fea4ec3e4..cc8da01ecb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.0.2" +DEFAULT_VERSION = "18.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 0767a409a3..92f360079d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.0.2' +__version__ = '18.1' From cacab2e858037a14060925d3422bc32c152719b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2015 14:51:41 -0400 Subject: [PATCH 5136/8469] Added tag 18.1 for changeset c0395f556c35 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2b76cd275e..51ada8d776 100644 --- a/.hgtags +++ b/.hgtags @@ -216,3 +216,4 @@ a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 0a49ee524b0a1d67d2a11c8c22f082b57acd7ae1 18.0 e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 +c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 From 30ece5ff98b651251c491ecf9c7f8c12ebe0f6b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2015 14:52:45 -0400 Subject: [PATCH 5137/8469] Bumped to 18.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index cc8da01ecb..f46e986bc6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.1" +DEFAULT_VERSION = "18.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 92f360079d..715ea4a651 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.1' +__version__ = '18.2' From 8b68b23eea750175cdf4ee91547fac64434ce34c Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 5 Aug 2015 11:39:19 -0700 Subject: [PATCH 5138/8469] Issue #24798: _msvccompiler.py doesn't properly support manifests --- _msvccompiler.py | 167 +++++++++++-------------------------- tests/test_msvccompiler.py | 121 --------------------------- 2 files changed, 50 insertions(+), 238 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 4e2eed72a9..b344616e60 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -15,7 +15,6 @@ import os import subprocess -import re from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -182,7 +181,8 @@ def initialize(self, plat_name=None): raise DistutilsPlatformError("Unable to find a compatible " "Visual Studio installation.") - paths = vc_env.get('path', '').split(os.pathsep) + self._paths = vc_env.get('path', '') + paths = self._paths.split(os.pathsep) self.cc = _find_exe("cl.exe", paths) self.linker = _find_exe("link.exe", paths) self.lib = _find_exe("lib.exe", paths) @@ -199,23 +199,41 @@ def initialize(self, plat_name=None): self.add_library_dir(dir) self.preprocess_options = None + # Use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib + # later to dynamically link to ucrtbase but not vcruntime. self.compile_options = [ - '/nologo', '/Ox', '/MD', '/W3', '/GL', '/DNDEBUG' + '/nologo', '/Ox', '/MT', '/W3', '/GL', '/DNDEBUG' ] self.compile_options_debug = [ - '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG' + '/nologo', '/Od', '/MTd', '/Zi', '/W3', '/D_DEBUG' ] - self.ldflags_shared = [ - '/nologo', '/DLL', '/INCREMENTAL:NO', '/LTCG', '/nodefaultlib:libucrt.lib', 'ucrt.lib' + ldflags = [ + '/nologo', '/INCREMENTAL:NO', '/LTCG', '/nodefaultlib:libucrt.lib', 'ucrt.lib', ] - self.ldflags_shared_debug = [ - '/nologo', '/DLL', '/INCREMENTAL:no', '/LTCG', '/DEBUG:FULL', '/nodefaultlib:libucrtd.lib', 'ucrtd.lib' - ] - self.ldflags_static = [ - '/nologo' + ldflags_debug = [ + '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL', '/nodefaultlib:libucrtd.lib', 'ucrtd.lib', ] + self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1'] + self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1'] + self.ldflags_shared = [*ldflags, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO'] + self.ldflags_shared_debug = [*ldflags_debug, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO'] + self.ldflags_static = [*ldflags] + self.ldflags_static_debug = [*ldflags_debug] + + self._ldflags = { + (CCompiler.EXECUTABLE, None): self.ldflags_exe, + (CCompiler.EXECUTABLE, False): self.ldflags_exe, + (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug, + (CCompiler.SHARED_OBJECT, None): self.ldflags_shared, + (CCompiler.SHARED_OBJECT, False): self.ldflags_shared, + (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug, + (CCompiler.SHARED_LIBRARY, None): self.ldflags_static, + (CCompiler.SHARED_LIBRARY, False): self.ldflags_static, + (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug, + } + self.initialized = True # -- Worker methods ------------------------------------------------ @@ -224,9 +242,12 @@ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): - ext_map = {ext: self.obj_extension for ext in self.src_extensions} - ext_map.update((ext, self.res_extension) - for ext in self._rc_extensions + self._mc_extensions) + ext_map = { + **{ext: self.obj_extension for ext in self.src_extensions}, + **{ext: self.res_extension for ext in self._rc_extensions + self._mc_extensions}, + } + + output_dir = output_dir or '' def make_out_path(p): base, ext = os.path.splitext(p) @@ -237,18 +258,17 @@ def make_out_path(p): if base.startswith((os.path.sep, os.path.altsep)): base = base[1:] try: - return base + ext_map[ext] + # XXX: This may produce absurdly long paths. We should check + # the length of the result and trim base until we fit within + # 260 characters. + return os.path.join(output_dir, base + ext_map[ext]) except LookupError: # Better to raise an exception instead of silently continuing # and later complain about sources and targets having # different lengths raise CompileError("Don't know how to compile {}".format(p)) - output_dir = output_dir or '' - return [ - os.path.join(output_dir, make_out_path(src_name)) - for src_name in source_filenames - ] + return list(map(make_out_path, source_filenames)) def compile(self, sources, @@ -359,6 +379,7 @@ def create_static_lib(self, if debug: pass # XXX what goes here? try: + log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args)) self.spawn([self.lib] + lib_args) except DistutilsExecError as msg: raise LibError(msg) @@ -399,14 +420,9 @@ def link(self, output_filename = os.path.join(output_dir, output_filename) if self._need_link(objects, output_filename): - ldflags = (self.ldflags_shared_debug if debug - else self.ldflags_shared) - if target_desc == CCompiler.EXECUTABLE: - ldflags = ldflags[1:] + ldflags = self._ldflags[target_desc, debug] - export_opts = [] - for sym in (export_symbols or []): - export_opts.append("/EXPORT:" + sym) + export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])] ld_args = (ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]) @@ -425,8 +441,6 @@ def link(self, self.library_filename(dll_name)) ld_args.append ('/IMPLIB:' + implib_file) - self.manifest_setup_ldargs(output_filename, build_temp, ld_args) - if extra_preargs: ld_args[:0] = extra_preargs if extra_postargs: @@ -434,101 +448,20 @@ def link(self, self.mkpath(os.path.dirname(output_filename)) try: + log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args)) self.spawn([self.linker] + ld_args) except DistutilsExecError as msg: raise LinkError(msg) - - # embed the manifest - # XXX - this is somewhat fragile - if mt.exe fails, distutils - # will still consider the DLL up-to-date, but it will not have a - # manifest. Maybe we should link to a temp file? OTOH, that - # implies a build environment error that shouldn't go undetected. - mfinfo = self.manifest_get_embed_info(target_desc, ld_args) - if mfinfo is not None: - mffilename, mfid = mfinfo - out_arg = '-outputresource:{};{}'.format(output_filename, mfid) - try: - self.spawn([self.mt, '-nologo', '-manifest', - mffilename, out_arg]) - except DistutilsExecError as msg: - raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) - def manifest_setup_ldargs(self, output_filename, build_temp, ld_args): - # If we need a manifest at all, an embedded manifest is recommended. - # See MSDN article titled - # "How to: Embed a Manifest Inside a C/C++ Application" - # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx) - # Ask the linker to generate the manifest in the temp dir, so - # we can check it, and possibly embed it, later. - temp_manifest = os.path.join( - build_temp, - os.path.basename(output_filename) + ".manifest") - ld_args.append('/MANIFESTFILE:' + temp_manifest) - - def manifest_get_embed_info(self, target_desc, ld_args): - # If a manifest should be embedded, return a tuple of - # (manifest_filename, resource_id). Returns None if no manifest - # should be embedded. See http://bugs.python.org/issue7833 for why - # we want to avoid any manifest for extension modules if we can) - for arg in ld_args: - if arg.startswith("/MANIFESTFILE:"): - temp_manifest = arg.split(":", 1)[1] - break - else: - # no /MANIFESTFILE so nothing to do. - return None - if target_desc == CCompiler.EXECUTABLE: - # by default, executables always get the manifest with the - # CRT referenced. - mfid = 1 - else: - # Extension modules try and avoid any manifest if possible. - mfid = 2 - temp_manifest = self._remove_visual_c_ref(temp_manifest) - if temp_manifest is None: - return None - return temp_manifest, mfid - - def _remove_visual_c_ref(self, manifest_file): + def spawn(self, cmd): + old_path = os.getenv('path') try: - # Remove references to the Visual C runtime, so they will - # fall through to the Visual C dependency of Python.exe. - # This way, when installed for a restricted user (e.g. - # runtimes are not in WinSxS folder, but in Python's own - # folder), the runtimes do not need to be in every folder - # with .pyd's. - # Returns either the filename of the modified manifest or - # None if no manifest should be embedded. - manifest_f = open(manifest_file) - try: - manifest_buf = manifest_f.read() - finally: - manifest_f.close() - pattern = re.compile( - r"""|)""", - re.DOTALL) - manifest_buf = re.sub(pattern, "", manifest_buf) - pattern = "\s*" - manifest_buf = re.sub(pattern, "", manifest_buf) - # Now see if any other assemblies are referenced - if not, we - # don't want a manifest embedded. - pattern = re.compile( - r"""|)""", re.DOTALL) - if re.search(pattern, manifest_buf) is None: - return None - - manifest_f = open(manifest_file, 'w') - try: - manifest_f.write(manifest_buf) - return manifest_file - finally: - manifest_f.close() - except OSError: - pass + os.environ['path'] = self._paths + return super().spawn(cmd) + finally: + os.environ['path'] = old_path # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index b4407543b1..1f8890792e 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -7,88 +7,6 @@ from distutils.tests import support from test.support import run_unittest -# A manifest with the only assembly reference being the msvcrt assembly, so -# should have the assembly completely stripped. Note that although the -# assembly has a reference the assembly is removed - that is -# currently a "feature", not a bug :) -_MANIFEST_WITH_ONLY_MSVC_REFERENCE = """\ - - - - - - - - - - - - - - - - - -""" - -# A manifest with references to assemblies other than msvcrt. When processed, -# this assembly should be returned with just the msvcrt part removed. -_MANIFEST_WITH_MULTIPLE_REFERENCES = """\ - - - - - - - - - - - - - - - - - - - - - - -""" - -_CLEANED_MANIFEST = """\ - - - - - - - - - - - - - - - - - - -""" SKIP_MESSAGE = (None if sys.platform == "win32" else "These tests are only for win32") @@ -114,45 +32,6 @@ def _find_vcvarsall(): finally: _msvccompiler._find_vcvarsall = old_find_vcvarsall - def test_remove_visual_c_ref(self): - from distutils._msvccompiler import MSVCCompiler - tempdir = self.mkdtemp() - manifest = os.path.join(tempdir, 'manifest') - f = open(manifest, 'w') - try: - f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES) - finally: - f.close() - - compiler = MSVCCompiler() - compiler._remove_visual_c_ref(manifest) - - # see what we got - f = open(manifest) - try: - # removing trailing spaces - content = '\n'.join([line.rstrip() for line in f.readlines()]) - finally: - f.close() - - # makes sure the manifest was properly cleaned - self.assertEqual(content, _CLEANED_MANIFEST) - - def test_remove_entire_manifest(self): - from distutils._msvccompiler import MSVCCompiler - tempdir = self.mkdtemp() - manifest = os.path.join(tempdir, 'manifest') - f = open(manifest, 'w') - try: - f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE) - finally: - f.close() - - compiler = MSVCCompiler() - got = compiler._remove_visual_c_ref(manifest) - self.assertIsNone(got) - - def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From 8434fc905458f1fa6cadf7c52550b9fac80e2b7d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 5 Aug 2015 11:48:14 -0700 Subject: [PATCH 5139/8469] Rebuild wininst-14.0[-amd64].exe with updated tools. --- command/wininst-14.0-amd64.exe | Bin 84480 -> 136192 bytes command/wininst-14.0.exe | Bin 75264 -> 129024 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-14.0-amd64.exe b/command/wininst-14.0-amd64.exe index 43b85b6d4f2dd93f4b77c4b904276293ff667054..7a5e78d52bcc5db0be1baff6cdad41e172a5b81f 100644 GIT binary patch delta 78379 zcmbrn34Bw<7C)Y)pYN&|`9K!QbfL@X96C<0FsLx#x{=4S2qxI&eGRKL0+SHDdZyV)^{p~ydyJI@OKWRDAIfK2&I6drrvoj0t z$3MF0n8Mzt9ocx#?Eju)Jo`T9n2Y!1+cF%#;QdC+q0U+C{S||Iqh-32;BQ-$yO7G# zY5&rqZ=EjNsngAWteMU{dE2yDWUa23uBD;1PB%!e)3v}K{^kEe?yv7_SZ0u?=racv z9@FbqQ9_nMH?u9?sRo_RLU7T4IR@Q!O0U%GraslPONSf;o{1&WJ4>%iZT3{p&g}+y z7p(LmV(kFHTM-zfm%A9c-K5*3LFqQ*JyatCA@(l|`3KFP=beYI;(-)p(CM1tby{9x z=-ir70*Z8~g05D6&d{TI7QWi!>xR75(3xYT)IMNo-(x2i$Y*dl356NldLlY z{~4PgZ4;!cL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n+*>3xJWtKCRkja z%UbTO-WsHmTmP=><;A`Jb9qpkMsMt^LEL=Z_7|a-dwTxI`YsluGYt8^G$85a3-t#6 zte|%o^Yr2H4x=~!{~ktsPI%im?tVN*NDy4%u>Ms%>9~>o3Gkac7%Kqo0sIxO11o|5 z4)_;XeIxL7fOUA@15WU3JO_y%Z~#WG1$Y!-7M|0bVvY$!2Yl&1I1%u~`{B`e z9KZ=aQvgMQ$6z;!F2n^T@F9T9DxoOw<$wq990q<6&{BoVOyC61;kgJr-Ssd`{Rqs6 zj05nm)$n%wD__3@Ry+z12YzuqmUlcB;Oue6y5q?K9s<~kXCd$_fGVCe;@QC1(|8hr zZw7ox!Po=Gs~R?cBV#Lpfgc3S{44VKM=L4;k35ax0Nw)VzZpIPyc1w1o>9Py0e9lD0VjA7Pa1H7A!2LL>v$rE z(|fP;HJ$$uKAQYEE|BRvE&VUDd`cev`b z|AA=db9K)(K6myxb`h7csF(MA@$)PK(+jv|hqNPgNBWM;9eF#7cP!sgwqwnXH80e@ zK>z*FLX^kU#?@MCrP|cm^xDkYyxQX0<+W#PJ+;?s{kMf|i`o{qP1=^eEpJ=hw)$-+ zx1HVAzU}(9pzR^sW46a_4@upgzP)(+^6h2Y*KA+Eebe^Z?K`*EZLi->+eM!6e*kZ< B_80&F diff --git a/command/wininst-14.0.exe b/command/wininst-14.0.exe index 764524d746b35fe28228e41e8b75a6ed665d9228..cc43296b677a5b995899bb60bbe0e632163e64ae 100644 GIT binary patch literal 129024 zcmeFaeSB2awLg3&Gf9Rpa0W~?rBP!^T6CyJ2Q+blPF^NKAviH)hNuBrA)QWrp6-Fj0f15Hxb0@7iZ3 zFM@4vpXc*?{&@nk&p!KQ?X}lld+oK?emNEQY!r-wAeiveG(l*?lm49C{p*g|AP7^h zes!v_ZPJ_9v>6t@dCg+q_g81Hs(<)<_1}3g`~L4d^w7hB?C-A3u9qIl{{BPRrFT_j zKlt#9mDf+1l9m$({mz`c@|UWYrYC-mzdV!vYrH!xwHg1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kCrQH%t?w8Lcrv4d2#W z(0l|d8KI5VCV;G2py@(wk#>W&O1n+_3+*e~quORrw@Z6X8>Snso2t`;zVl%}eQR_Z zbbj6IFra63t-9}YoAhz!31)-&Rm)qJ^}zZg+ix=xAyVryt22Sn3jFCvB$75k|8u=y zI0qw|l|IR2FfBCw+9a7iuxzzW$`CR;GEZim$vU5PF{?G}a#mZ`l`IKz)rH0NWL>8P z!X;w+wND)m5sOyGs^ioN>LhitIt9WuMXgrr)h4w~ZC7XO>kMxi{%H7%VXDbua+(TF zE>pS5V|vh3WqQ=K&9uX`%k(SLKGO@PgQizaZTZUTj`&F2+W?)_lKtqxli@7W3ogo#vlIkDtS) z`?9&teB9h*K5ag4z63k|iCHp#W$uPv<9K0-whXroV&a zCN8g8-?YAEeH(V*ed|Zo&#ax+zgxev^0p{jtS!NoY)iALZRs|AY~KOf6Sk*d zA@8SAk#{58Xp>B{tN$b1;v z!oJMkX1)sJFh1+|S#M#_{+f7HMVAKnzrm<;q3Jd1z1XPVP`9hURmpxU`8&uk={S^L@tc}1%JzjSo6uCyW` zTxzKF86Gg~Fw`3UU^r_SoqkigCOs=XFTE&zd-_$F-CP~l1vea^e!Ai7Qw|Q! zZ~`iKYIkXOYv<~mx-#8b9RSHZbE^N1X21%ZQD211dPUu-?uJDO*F?jAiqj-(QZ#Cf qUSro}Yn+-~%?eGiX065pW^L3|!Li+<*{0d9*{R{USKd<%=l?II%z#M% From 504d4012293d09847e02d5aa5b495db730077f4f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Aug 2015 14:06:28 -0400 Subject: [PATCH 5140/8469] Remove unused _all_dirs. Prefer 'candidate' to 'suitable'. Update documentation. --- setuptools/__init__.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index f653635989..2c492446a6 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -73,31 +73,24 @@ def require_parents(packages): yield pkg @staticmethod - def _all_dirs(base_path): + def _candidate_dirs(base_path): """ - Return all dirs in base_path, relative to base_path + Return all dirs in base_path that might be packages. """ + has_dot = lambda name: '.' in name for root, dirs, files in os.walk(base_path, followlinks=True): - for dir in dirs: - yield os.path.relpath(os.path.join(root, dir), base_path) - - @staticmethod - def _suitable_dirs(base_path): - """ - Return all suitable package dirs in base_path, relative to base_path - """ - for root, dirs, files in os.walk(base_path, followlinks=True): - # Mutate dirs to trim the search: - dirs[:] = filterfalse(lambda n: '.' in n, dirs) + # Exclude directories that contain a period, as they cannot be + # packages. Mutate the list to avoid traversal. + dirs[:] = filterfalse(has_dot, dirs) for dir in dirs: yield os.path.relpath(os.path.join(root, dir), base_path) @classmethod def _find_packages_iter(cls, base_path): - suitable = cls._suitable_dirs(base_path) + candidates = cls._candidate_dirs(base_path) return ( path.replace(os.path.sep, '.') - for path in suitable + for path in candidates if cls._looks_like_package(os.path.join(base_path, path)) ) From e999c1c445b3891e972ad9353cca334e82621363 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Aug 2015 14:18:54 -0400 Subject: [PATCH 5141/8469] Update changelog. Fixes #412. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6dda9dbb2d..e95f616bfb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +---- +18.2 +---- + +* Issue #412: More efficient directory search in ``find_packages``. + ---- 18.1 ---- From 94e5864e4ff57bfb82bca76fe8d00e15b646fe98 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Fri, 7 Aug 2015 19:48:03 -0700 Subject: [PATCH 5142/8469] Issue #4214: Remove ineffectual /pdb:none option from msvc9compiler.py --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 9688f20019..a5a5010053 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -413,7 +413,7 @@ def initialize(self, plat_name=None): self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] if self.__version >= 7: self.ldflags_shared_debug = [ - '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None' + '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG' ] self.ldflags_static = [ '/nologo'] From 2271e6d1d51c694a73a541b497fb26cc506516d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 17:43:21 +0100 Subject: [PATCH 5143/8469] Link packaging versions to CHANGELOG in packaging project. Fixes #416. --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index ba3a35bc31..c2a6387309 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -246,6 +246,10 @@ pattern=r"Packaging #(?P\d+)", url='{GH}/pypa/packaging/issues/{packaging}', ), + dict( + pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", + url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', + ), ], ), } From 595ed8baab48541dd1bbb2c6907c5463305b646b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 17:46:00 +0100 Subject: [PATCH 5144/8469] Rephrase to allow link --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index e95f616bfb..10027a9048 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -91,7 +91,7 @@ CHANGES 15.1 ---- -* Updated Packaging to 15.1 to address Packaging #28. +* Updated to Packaging 15.1 to address Packaging #28. * Fix ``setuptools.sandbox._execfile()`` with Python 3.1. ---- From 831d2feb383f0d1699582e265e931cf435421741 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 17:46:14 +0100 Subject: [PATCH 5145/8469] Added tag 18.2 for changeset 1a981f2e5031 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 51ada8d776..447b5cdb4d 100644 --- a/.hgtags +++ b/.hgtags @@ -217,3 +217,4 @@ fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 0a49ee524b0a1d67d2a11c8c22f082b57acd7ae1 18.0 e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 +1a981f2e5031f55267dc2a28fa1b42274a1b64b2 18.2 From 413d2abe55dc436b22516ac663f14dd85987d3d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 17:47:20 +0100 Subject: [PATCH 5146/8469] Bumped to 18.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f46e986bc6..a13ce1568a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.2" +DEFAULT_VERSION = "18.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 715ea4a651..861921f0bf 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.2' +__version__ = '18.3' From 1f9c2b756ae6050e11d2dfde03a48df354fb0835 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 19:33:55 +0100 Subject: [PATCH 5147/8469] Extract variable --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index df1655bfb0..dfdd757e7b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1530,7 +1530,8 @@ def save(self): if not self.dirty: return - data = '\n'.join(map(self.make_relative, self.paths)) + rel_paths = map(self.make_relative, self.paths) + data = '\n'.join(rel_paths) if data: log.debug("Saving %s", self.filename) data = ( From 9dc51a56c6133f2b115bc8133236e25cd2bb0a31 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 19:36:06 +0100 Subject: [PATCH 5148/8469] Do join late --- setuptools/command/easy_install.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dfdd757e7b..4688cc4293 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1530,9 +1530,8 @@ def save(self): if not self.dirty: return - rel_paths = map(self.make_relative, self.paths) - data = '\n'.join(rel_paths) - if data: + rel_paths = list(map(self.make_relative, self.paths)) + if rel_paths: log.debug("Saving %s", self.filename) data = ( "import sys; sys.__plen = len(sys.path)\n" @@ -1541,7 +1540,7 @@ def save(self): " del sys.path[sys.__plen:];" " p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;" " sys.__egginsert = p+len(new)\n" - ) % data + ) % '\n'.join(rel_paths) if os.path.islink(self.filename): os.unlink(self.filename) From 3f2ccea66a3deee1e4a4234d695dd94282ec3819 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 19:46:57 +0100 Subject: [PATCH 5149/8469] Extract method for wrapping lines --- setuptools/command/easy_install.py | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4688cc4293..15b260dd48 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1533,14 +1533,8 @@ def save(self): rel_paths = list(map(self.make_relative, self.paths)) if rel_paths: log.debug("Saving %s", self.filename) - data = ( - "import sys; sys.__plen = len(sys.path)\n" - "%s\n" - "import sys; new=sys.path[sys.__plen:];" - " del sys.path[sys.__plen:];" - " p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;" - " sys.__egginsert = p+len(new)\n" - ) % '\n'.join(rel_paths) + lines = self._wrap_lines(rel_paths) + data = '\n'.join(lines) + '\n' if os.path.islink(self.filename): os.unlink(self.filename) @@ -1554,6 +1548,26 @@ def save(self): self.dirty = False + def _wrap_lines(self, lines): + yield self._inline(""" + import sys + sys.__plen = len(sys.path) + """) + for line in lines: + yield line + yield self._inline(""" + import sys + new = sys.path[sys.__plen:] + del sys.path[sys.__plen:] + p = getattr(sys, '__egginsert', 0) + sys.path[p:p] = new + sys.__egginsert = p + len(new) + """) + + @staticmethod + def _inline(text): + return textwrap.dedent(text).strip().replace('\n', '; ') + def add(self, dist): """Add `dist` to the distribution map""" new_path = ( From 50aaf9938a4437db7f2949df6ecb6460c789ff28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 19:47:55 +0100 Subject: [PATCH 5150/8469] Open file in context manager --- setuptools/command/easy_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 15b260dd48..0e91215656 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1538,9 +1538,8 @@ def save(self): if os.path.islink(self.filename): os.unlink(self.filename) - f = open(self.filename, 'wt') - f.write(data) - f.close() + with open(self.filename, 'wt') as f: + f.write(data) elif os.path.exists(self.filename): log.debug("Deleting empty %s", self.filename) From 5cbb2ada2e22f95b1dd0cd8ed14643a8cb3766cd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 19:58:12 +0100 Subject: [PATCH 5151/8469] Calculate prelude and postlude early --- setuptools/command/easy_install.py | 33 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0e91215656..b6b0cffd02 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1547,25 +1547,26 @@ def save(self): self.dirty = False - def _wrap_lines(self, lines): - yield self._inline(""" - import sys - sys.__plen = len(sys.path) - """) + @classmethod + def _wrap_lines(cls, lines): + yield cls.prelude for line in lines: yield line - yield self._inline(""" - import sys - new = sys.path[sys.__plen:] - del sys.path[sys.__plen:] - p = getattr(sys, '__egginsert', 0) - sys.path[p:p] = new - sys.__egginsert = p + len(new) - """) + yield cls.postlude - @staticmethod - def _inline(text): - return textwrap.dedent(text).strip().replace('\n', '; ') + _inline = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') + prelude = _inline(""" + import sys + sys.__plen = len(sys.path) + """) + postlude = _inline(""" + import sys + new = sys.path[sys.__plen:] + del sys.path[sys.__plen:] + p = getattr(sys, '__egginsert', 0) + sys.path[p:p] = new + sys.__egginsert = p + len(new) + """) def add(self, dist): """Add `dist` to the distribution map""" From e2124f4d4c74770ccc0b9fc5f0e17becda578063 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 20:29:08 +0100 Subject: [PATCH 5152/8469] Extract a class for the behavior that rewrites the sys.path --- setuptools/command/easy_install.py | 50 ++++++++++++++++++------------ 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b6b0cffd02..2b639c1ba3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1547,26 +1547,9 @@ def save(self): self.dirty = False - @classmethod - def _wrap_lines(cls, lines): - yield cls.prelude - for line in lines: - yield line - yield cls.postlude - - _inline = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') - prelude = _inline(""" - import sys - sys.__plen = len(sys.path) - """) - postlude = _inline(""" - import sys - new = sys.path[sys.__plen:] - del sys.path[sys.__plen:] - p = getattr(sys, '__egginsert', 0) - sys.path[p:p] = new - sys.__egginsert = p + len(new) - """) + @staticmethod + def _wrap_lines(lines): + return lines def add(self, dist): """Add `dist` to the distribution map""" @@ -1605,6 +1588,33 @@ def make_relative(self, path): return path +class RewritePthDistributions(PthDistributions): + + @classmethod + def _wrap_lines(cls, lines): + yield cls.prelude + for line in lines: + yield line + yield cls.postlude + + _inline = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') + prelude = _inline(""" + import sys + sys.__plen = len(sys.path) + """) + postlude = _inline(""" + import sys + new = sys.path[sys.__plen:] + del sys.path[sys.__plen:] + p = getattr(sys, '__egginsert', 0) + sys.path[p:p] = new + sys.__egginsert = p + len(new) + """) + + +PthDistributions = RewritePthDistributions + + def _first_line_re(): """ Return a regular expression based on first_line_re suitable for matching From b0b9dae622b4bcebf96555753d1310319a90bbbe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Aug 2015 20:47:45 +0100 Subject: [PATCH 5153/8469] Allow disabling of the sys.path rewrite technique using an environment variable. --- CHANGES.txt | 15 +++++++++++++++ setuptools/command/easy_install.py | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 10027a9048..2ad565bc24 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,21 @@ CHANGES ======= +---- +18.3 +---- + +* Setuptools now allows disabling of the manipulation of the sys.path + during the processing of the easy-install.pth file. To do so, set + the environment variable ``SETUPTOOLS_SYS_PATH_TECHNIQUE`` to + anything but "rewrite" (consider "raw"). During any install operation + with manipulation disabled, setuptools packages will be appended to + sys.path naturally. + + Future versions may change the default behavior to disable + manipulation. If so, the default behavior can be retained by setting + the variable to "rewrite". + ---- 18.2 ---- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2b639c1ba3..7c0dfa99c5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1612,7 +1612,8 @@ def _wrap_lines(cls, lines): """) -PthDistributions = RewritePthDistributions +if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'rewrite') == 'rewrite': + PthDistributions = RewritePthDistributions def _first_line_re(): From e5c83ccacb4e61147cb75f4edbe15d68b304b1c5 Mon Sep 17 00:00:00 2001 From: grizzlynyo Date: Sat, 29 Aug 2015 17:29:49 +0300 Subject: [PATCH 5154/8469] update dependency links --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index afaf9f6145..4a48792489 100755 --- a/setup.py +++ b/setup.py @@ -151,10 +151,10 @@ def _gen_console_scripts(): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==1.0.1", + "certs": "certifi==2015.04.28", }, dependency_links=[ - 'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790', + 'https://pypi.python.org/packages/source/c/certifi/certifi-2015.04.28.tar.gz#md5=12c7c3a063b2ff97a0f8291d8de41e8c', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ], scripts=[], From 4e854d1e6ffd5ee1adffd8750589b0a16517d67c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 11:12:58 -0400 Subject: [PATCH 5155/8469] Allow dict.update to do the iteration --- setuptools/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2c492446a6..f1798328e5 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -124,9 +124,8 @@ class Command(_Command): def __init__(self, dist, **kw): # Add support for keyword arguments - _Command.__init__(self,dist) - for k,v in kw.items(): - setattr(self,k,v) + _Command.__init__(self, dist) + vars(self).update(kw) def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) From af9943a4906a808c8d7c2b5004ba48f32400f1d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 11:14:45 -0400 Subject: [PATCH 5156/8469] Replace comment with docstring. Fixes #423 --- setuptools/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index f1798328e5..1f421da430 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -123,7 +123,10 @@ class Command(_Command): command_consumes_arguments = False def __init__(self, dist, **kw): - # Add support for keyword arguments + """ + Construct the command for dist, updating + vars(self) with any keyword parameters. + """ _Command.__init__(self, dist) vars(self).update(kw) From 028ae1a595c08c581fff6ff52883d2719d8f8160 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 11:15:46 -0400 Subject: [PATCH 5157/8469] Allow dict.update to do the iteration --- setuptools/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 1f421da430..9e76ae11aa 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -132,8 +132,7 @@ def __init__(self, dist, **kw): def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) - for k,v in kw.items(): - setattr(cmd,k,v) # update command with keywords + vars(cmd).update(kw) return cmd distutils.core.Command = Command # we can't patch distutils.cmd, alas From 29b422607f3083b9ffebba57fc255f45a20353f3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 11:16:34 -0400 Subject: [PATCH 5158/8469] Prefer preceding line comments --- setuptools/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9e76ae11aa..9bbc06bb36 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -135,7 +135,8 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): vars(cmd).update(kw) return cmd -distutils.core.Command = Command # we can't patch distutils.cmd, alas +# we can't patch distutils.cmd, alas +distutils.core.Command = Command def findall(dir = os.curdir): """Find all files under 'dir' and return the list of full filenames @@ -150,4 +151,5 @@ def findall(dir = os.curdir): all_files.extend(filter(os.path.isfile, files)) return all_files -distutils.filelist.findall = findall # fix findall bug in distutils. +# fix findall bug in distutils. +distutils.filelist.findall = findall From e8ffa23f83d13de6ef3e4fe61b5e481c5e6c1d5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 11:34:32 -0400 Subject: [PATCH 5159/8469] Add reference to bug report --- setuptools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 9bbc06bb36..39dd60c662 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -151,5 +151,5 @@ def findall(dir = os.curdir): all_files.extend(filter(os.path.isfile, files)) return all_files -# fix findall bug in distutils. +# fix findall bug in distutils (http://bugs.python.org/issue12885) distutils.filelist.findall = findall From d7f14ca7b710fe301273909ea858fefbaa093e6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 13:13:11 -0400 Subject: [PATCH 5160/8469] Use modern mechanism for test discovery --- tests/test_filelist.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index e82bc3d2ed..278809c09b 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -7,7 +7,7 @@ from distutils.errors import DistutilsTemplateError from distutils.filelist import glob_to_re, translate_pattern, FileList -from test.support import captured_stdout, run_unittest +from test.support import captured_stdout from distutils.tests import support MANIFEST_IN = """\ @@ -292,8 +292,5 @@ def test_process_template(self): self.assertWarnings() -def test_suite(): - return unittest.makeSuite(FileListTestCase) - if __name__ == "__main__": - run_unittest(test_suite()) + unittest.main() From 2822a45bc27876169fd57bad2fdf2d9d5ae2aede Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 13:22:56 -0400 Subject: [PATCH 5161/8469] Issue #12285: Add test capturing failure. --- tests/test_filelist.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 278809c09b..6b3bde0d9b 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -6,7 +6,9 @@ from distutils.log import WARN from distutils.errors import DistutilsTemplateError from distutils.filelist import glob_to_re, translate_pattern, FileList +from distutils import filelist +import test.support from test.support import captured_stdout from distutils.tests import support @@ -292,5 +294,13 @@ def test_process_template(self): self.assertWarnings() +class FindAllTestCase(unittest.TestCase): + @test.support.skip_unless_symlink + def test_missing_symlink(self): + with test.support.temp_cwd(): + os.symlink('foo', 'bar') + self.assertEqual(filelist.findall(), []) + + if __name__ == "__main__": unittest.main() From 3bf3f37dd03a1978f6c8386dd348f681241494a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 13:26:48 -0400 Subject: [PATCH 5162/8469] Add another test capturing the basic discovery expectation. --- tests/test_filelist.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 6b3bde0d9b..45ff565373 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -301,6 +301,17 @@ def test_missing_symlink(self): os.symlink('foo', 'bar') self.assertEqual(filelist.findall(), []) + def test_basic_discovery(self): + with test.support.temp_cwd(): + os.mkdir('foo') + file1 = os.path.join('foo', 'file1.txt') + test.support.create_empty_file(file1) + os.mkdir('bar') + file2 = os.path.join('bar', 'file2.txt') + test.support.create_empty_file(file2) + expected = [file1, file2] + self.assertEqual(filelist.findall(), expected) + if __name__ == "__main__": unittest.main() From c05680c5d1b4f0a688a4e560fabde6aa3022596d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 13:53:14 -0400 Subject: [PATCH 5163/8469] Replace initialize/inject loop with a list comprehension --- setuptools/__init__.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 39dd60c662..a884d2d327 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,6 +1,7 @@ """Extensions to the 'distutils' for large or complex distributions""" import os +import functools import distutils.core import distutils.filelist from distutils.core import Command as _Command @@ -138,18 +139,24 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): # we can't patch distutils.cmd, alas distutils.core.Command = Command -def findall(dir = os.curdir): +def findall(dir=os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ - all_files = [] - for base, dirs, files in os.walk(dir, followlinks=True): - if base==os.curdir or base.startswith(os.curdir+os.sep): - base = base[2:] - if base: - files = [os.path.join(base, f) for f in files] - all_files.extend(filter(os.path.isfile, files)) - return all_files + def _strip_leading_curdir(base): + do_strip = base == os.curdir or base.startswith(os.curdir + os.sep) + return base[2:] if do_strip else base + + def _base_prepend(base): + base = _strip_leading_curdir(base) + return functools.partial(os.path.join, base) + + return [ + file + for base, dirs, files in os.walk(dir, followlinks=True) + for file in map(_base_prepend(base), files) + if os.path.isfile(file) + ] # fix findall bug in distutils (http://bugs.python.org/issue12885) distutils.filelist.findall = findall From 8496cfb24aa20109e64a3b03c972792cd911c086 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 13:56:54 -0400 Subject: [PATCH 5164/8469] Use relpath to produce results relative to 'dir' --- setuptools/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a884d2d327..0d1994dc1f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -143,18 +143,13 @@ def findall(dir=os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ - def _strip_leading_curdir(base): - do_strip = base == os.curdir or base.startswith(os.curdir + os.sep) - return base[2:] if do_strip else base - - def _base_prepend(base): - base = _strip_leading_curdir(base) - return functools.partial(os.path.join, base) + def _prepend(base): + return functools.partial(os.path.join, os.path.relpath(base, dir)) return [ file for base, dirs, files in os.walk(dir, followlinks=True) - for file in map(_base_prepend(base), files) + for file in map(_prepend(base), files) if os.path.isfile(file) ] From e54077ba1964fbb59f3f1df7b9290694a4dc964d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 17:32:51 +0200 Subject: [PATCH 5165/8469] Add docstring and additional test revealing nuances of the implementation as found in setuptools. --- tests/test_filelist.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 45ff565373..571acdbc08 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -302,6 +302,11 @@ def test_missing_symlink(self): self.assertEqual(filelist.findall(), []) def test_basic_discovery(self): + """ + When findall is called with no parameters or with + '.' as the parameter, the dot should be omitted from + the results. + """ with test.support.temp_cwd(): os.mkdir('foo') file1 = os.path.join('foo', 'file1.txt') @@ -312,6 +317,17 @@ def test_basic_discovery(self): expected = [file1, file2] self.assertEqual(filelist.findall(), expected) + def test_non_local_discovery(self): + """ + When findall is called with another path, the full + path name should be returned. + """ + with test.support.temp_dir() as temp_dir: + file1 = os.path.join(temp_dir, 'file1.txt') + test.support.create_empty_file(file1) + expected = [file1] + self.assertEqual(filelist.findall(temp_dir), expected) + if __name__ == "__main__": unittest.main() From 656ef5739b3f21070ed3a434ef4911a922b3cf5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2015 14:05:58 -0400 Subject: [PATCH 5166/8469] Sort result to avoid spurious errors due to order. --- tests/test_filelist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 571acdbc08..e719198c6d 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -314,8 +314,8 @@ def test_basic_discovery(self): os.mkdir('bar') file2 = os.path.join('bar', 'file2.txt') test.support.create_empty_file(file2) - expected = [file1, file2] - self.assertEqual(filelist.findall(), expected) + expected = [file2, file1] + self.assertEqual(sorted(filelist.findall()), expected) def test_non_local_discovery(self): """ From 56afdde1131d3d67360c4032a518b59007255579 Mon Sep 17 00:00:00 2001 From: Ankur Dedania Date: Mon, 31 Aug 2015 20:10:01 +0000 Subject: [PATCH 5167/8469] Adds #257, pip style version --HG-- branch : AbsoluteMSTR/adds-257-pip-style-version-1441051798003 --- setuptools/command/easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7c0dfa99c5..62c24d77ca 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -217,7 +217,9 @@ def _delete_path(self, path): def finalize_options(self): if self.version: - print('setuptools %s' % get_distribution('setuptools').version) + dist = get_distribution('setuptools') + print('setuptools %s from %s (python %s)' % ( + dist.version, dist.location, sys.version[:3])) sys.exit() py_version = sys.version.split()[0] From e2e71004c87d3afa3dc8692739b477d2d70aa2e6 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 1 Sep 2015 14:59:18 -0400 Subject: [PATCH 5168/8469] Look deeper at .egg-info files for package name and version information when available. --- pkg_resources/__init__.py | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d09e0b6f9a..938f481872 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2466,6 +2466,13 @@ def _remove_md5_fragment(location): return location +def _version_from_file(fid): + for line in fid: + if line.lower().startswith('version:'): + version = safe_version(line.split(':', 1)[1].strip()) + return version + + class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' @@ -2483,7 +2490,7 @@ def __init__(self, location=None, metadata=None, project_name=None, 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: @@ -2491,9 +2498,25 @@ def from_location(cls, location, basename, metadata=None,**kw): 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()] + + # Some packages e.g. numpy and scipy use distutils instead of + # setuptools, and their version numbers can get mangled when + # converted to filenames (e.g., 1.11.0.dev0+2329eae to + # 1.11.0.dev0_2329eae). These will not be parsed properly + # downstream by Distribution and safe_version, so we need to + # take an extra step and try to get the version number from + # the file itself instead of the filename. + if ext == '.egg-info': + full_name = os.path.join(location, basename + ext) + try: + with open(full_name, 'r') as fid: + version_ = _version_from_file(fid) + version = version_ if version_ is not None else version + except IOError: + pass return cls( location, metadata, project_name=project_name, version=version, py_version=py_version, platform=platform, **kw @@ -2584,13 +2607,11 @@ def version(self): 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): From 7f8157b378c7e03ef332a59b63c08b375876b976 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 3 Sep 2015 09:46:44 -0400 Subject: [PATCH 5169/8469] Setuptools supports Python 3.5 and 3.6 --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 4a48792489..1a425747fa 100755 --- a/setup.py +++ b/setup.py @@ -144,6 +144,8 @@ def _gen_console_scripts(): Programming Language :: Python :: 3.2 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 From 41ec7a69440cf0dd489c57c015521503d797636e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2015 13:20:48 -0400 Subject: [PATCH 5170/8469] Update python3 docs to indicate that 2to3 is mildly deprecated, and removing legacy details. --- docs/python3.txt | 74 ++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 52 deletions(-) diff --git a/docs/python3.txt b/docs/python3.txt index df173000f2..d550cb68c1 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -5,16 +5,22 @@ Supporting both Python 2 and Python 3 with Setuptools Starting with Distribute version 0.6.2 and Setuptools 0.7, the Setuptools project supported Python 3. Installing and using setuptools for Python 3 code works exactly the same as for Python 2 -code, but Setuptools also helps you to support Python 2 and Python 3 from -the same source code by letting you run 2to3 on the code as a part of the -build process, by setting the keyword parameter ``use_2to3`` to True. +code. +Setuptools provides a facility to invoke 2to3 on the code as a part of the +build process, by setting the keyword parameter ``use_2to3`` to True, but +the Setuptools strongly recommends instead developing a unified codebase +using `six `_, +`future `_, or another compatibility +library. -Setuptools as help during porting -================================= -Setuptools can make the porting process much easier by automatically running -2to3 as a part of the test running. To do this you need to configure the +Using 2to3 +========== + +Setuptools attempts to make the porting process easier by automatically +running +2to3 as a part of running tests. To do so, you need to configure the setup.py so that you can run the unit tests with ``python setup.py test``. See :ref:`test` for more information on this. @@ -37,23 +43,23 @@ to a list of names of packages containing fixers. To exclude fixers, the parameter ``use_2to3_exclude_fixers`` can be set to fixer names to be skipped. -A typical setup.py can look something like this:: +An example setup.py might look something like this:: from setuptools import setup setup( name='your.module', - version = '1.0', + version='1.0', description='This is your awesome module', author='You', author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - use_2to3 = True, - convert_2to3_doctests = ['src/your/module/README.txt'], - use_2to3_fixers = ['your.fixers'], - use_2to3_exclude_fixers = ['lib2to3.fixes.fix_import'], + package_dir={'': 'src'}, + packages=['your', 'you.module'], + test_suite='your.module.tests', + use_2to3=True, + convert_2to3_doctests=['src/your/module/README.txt'], + use_2to3_fixers=['your.fixers'], + use_2to3_exclude_fixers=['lib2to3.fixes.fix_import'], ) Differential conversion @@ -86,39 +92,3 @@ Advanced features If you don't want to run the 2to3 conversion on the doctests in Python files, you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``. - -Note on compatibility with older versions of setuptools -======================================================= - -Setuptools earlier than 0.7 does not know about the new keyword parameters to -support Python 3. -As a result it will warn about the unknown keyword parameters if you use -those versions of setuptools instead of Distribute under Python 2. This output -is not an error, and -install process will continue as normal, but if you want to get rid of that -error this is easy. Simply conditionally add the new parameters into an extra -dict and pass that dict into setup():: - - from setuptools import setup - import sys - - extra = {} - if sys.version_info >= (3,): - extra['use_2to3'] = True - extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] - extra['use_2to3_fixers'] = ['your.fixers'] - - setup( - name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - **extra - ) - -This way the parameters will only be used under Python 3, where Distribute or -Setuptools 0.7 or later is required. From 0f3521f227793e2707b682d23f5cce36983e07a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2015 13:28:01 -0400 Subject: [PATCH 5171/8469] Remove documentation on merge, now relevant only for posterity (reference in the source tree). --- docs/index.txt | 1 - docs/merge-faq.txt | 80 ----------------------------- docs/merge.txt | 122 --------------------------------------------- 3 files changed, 203 deletions(-) delete mode 100644 docs/merge-faq.txt delete mode 100644 docs/merge.txt diff --git a/docs/index.txt b/docs/index.txt index 529f08f354..6ac3725269 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -23,4 +23,3 @@ Documentation content: easy_install pkg_resources development - merge diff --git a/docs/merge-faq.txt b/docs/merge-faq.txt deleted file mode 100644 index ea45f30cfa..0000000000 --- a/docs/merge-faq.txt +++ /dev/null @@ -1,80 +0,0 @@ -Setuptools/Distribute Merge FAQ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -How do I upgrade from Distribute? -================================= - -Distribute specifically prohibits installation of Setuptools 0.7 from Distribute 0.6. There are then two options for upgrading. - -Note that after upgrading using either technique, the only option to downgrade to either version is to completely uninstall Distribute and Setuptools 0.7 versions before reinstalling an 0.6 release. - -Use Distribute 0.7 ------------------- - -The PYPA has put together a compatibility wrapper, a new release of Distribute version 0.7. This package will install over Distribute 0.6.x installations and will replace Distribute with a simple wrapper that requires Setuptools 0.7 or later. This technique is experimental, but initial results indicate this technique is the easiest upgrade path. - - -Uninstall ---------- - -First, completely uninstall Distribute. Since Distribute does not have an automated installation routine, this process is manual. Follow the instructions in the README for uninstalling. - - -How do I upgrade from Setuptools 0.6? -===================================== - -There are no special instructions for upgrading over older versions of Setuptools. Simply use `easy_install -U` or run the latest `ez_setup.py`. - -Where does the merge occur? -======================================================== - -The merge is occurring between the heads of the default branch of Distribute and the setuptools-0.6 branch of Setuptools. The Setuptools SVN repo has been converted to a Mercurial repo hosted on Bitbucket. The work is still underway, so the exact changesets included may change, although the anticipated merge targets are Setuptools at 0.6c12 and Distribute at 0.6.35. - -What happens to other branches? -======================================================== - -Distribute 0.7 was abandoned long ago and won't be included in the resulting code tree, but may be retained for posterity in the original repo. - -Setuptools default branch (also 0.7 development) may also be abandoned or may be incorporated into the new merged line if desirable (and as resources allow). - -What history is lost/changed? -======================================================== - -As setuptools was not on Mercurial when the fork occurred and as Distribute did not include the full setuptools history (prior to the creation of the setuptools-0.6 branch), the two source trees were not compatible. In order to most effectively communicate the code history, the Distribute code was grafted onto the (originally private) setuptools Mercurial repo. Although this grafting maintained the full code history with names, dates, and changes, it did lose the original hashes of those changes. Therefore, references to changes by hash (including tags) are lost. - -Additionally, any heads that were not actively merged into the Distribute 0.6.35 release were also omitted. As a result, the changesets included in the merge repo are those from the original setuptools repo and all changesets ancestral to the Distribute 0.6.35 release. - -What features will be in the merged code base? -======================================================== - -In general, all "features" added in distribute will be included in setuptools. Where there exist conflicts or undesirable features, we will be explicit about what these limitations are. Changes that are backward-incompatible from setuptools 0.6 to distribute will likely be removed, and these also will be well documented. - -Bootstrapping scripts (ez_setup/distribute_setup) and docs, as with distribute, will be maintained in the repository and built as part of the release process. Documentation and bootstrapping scripts will be hosted at python.org, as they are with distribute now. Documentation at telecommunity will be updated to refer or redirect to the new, merged docs. - -On the whole, the merged setuptools should be largely compatible with the latest releases of both setuptools and distribute and will be an easy transition for users of either library. - -Who is invited to contribute? Who is excluded? -======================================================== - -While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. - -We have lots of ideas for how we'd like to improve the codebase, release process, everything. Like distribute, the post-merge setuptools will have its source hosted on Bitbucket. (So if you're currently a distribute contributor, about the only thing that's going to change is the URL of the repository you follow.) Also like distribute, it'll support Python 3, and hopefully we'll soon merge Vinay Sajip's patches to make it run on Python 3 without needing 2to3 to be run on the code first. - -While we've worked privately to initiate this merge due to the potential sensitivity of the topic, no one is excluded from this effort. We invite all members of the community, especially those most familiar with Python packaging and its challenges to join us in the effort. - -Why Setuptools and not Distribute or another name? -======================================================== - -We do, however, understand that this announcement might be unsettling for some. The setuptools name has been subjected to a lot of deprecation in recent years, so the idea that it will now be the preferred name instead of distribute might be somewhat difficult or disorienting for some. We considered use of another name (Distribute or an entirely new name), but that would serve to only complicate matters further. Instead, our goal is to simplify the packaging landscape but without losing any hard-won advancements. We hope that the people who worked to spread the first message will be equally enthusiastic about spreading the new one, and we especially look forward to seeing the new posters and slogans celebrating setuptools. - -What is the timeframe of release? -======================================================== - -There are no hard timeframes for any of this effort, although progress is underway and a draft merge is underway and being tested privately. As an unfunded volunteer effort, our time to put in on it is limited, and we've both had some recent health and other challenges that have made working on this difficult, which in part explains why we haven't met our original deadline of a completed merge before PyCon. - -The final Setuptools 0.7 was cut on June 1, 2013 and will be released to PyPI shortly thereafter. - -What version number can I expect for the new release? -======================================================== - -The new release will roughly follow the previous trend for setuptools and release the new release as 0.7. This number is somewhat arbitrary, but we wanted something other than 0.6 to distinguish it from its ancestor forks but not 1.0 to avoid putting too much emphasis on the release itself and to focus on merging the functionality. In the future, the project will likely adopt a versioning scheme similar to semver to convey semantic meaning about the release in the version number. diff --git a/docs/merge.txt b/docs/merge.txt deleted file mode 100644 index ba37d6e4ca..0000000000 --- a/docs/merge.txt +++ /dev/null @@ -1,122 +0,0 @@ -Merge with Distribute -~~~~~~~~~~~~~~~~~~~~~ - -In 2013, the fork of Distribute was merged back into Setuptools. This -document describes some of the details of the merge. - -.. toctree:: - :maxdepth: 2 - - merge-faq - -Process -======= - -In order to try to accurately reflect the fork and then re-merge of the -projects, the merge process brought both code trees together into one -repository and grafted the Distribute fork onto the Setuptools development -line (as if it had been created as a branch in the first place). - -The rebase to get distribute onto setuptools went something like this:: - - hg phase -d -f -r 26b4c29b62db - hg rebase -s 26b4c29b62db -d 7a5cf59c78d7 - -The technique required a late version of mercurial (2.5) to work correctly. - -The only code that was included was the code that was ancestral to the public -releases of Distribute 0.6. Additionally, because Setuptools was not hosted -on Mercurial at the time of the fork and because the Distribute fork did not -include a complete conversion of the Setuptools history, the Distribute -changesets had to be re-applied to a new, different conversion of the -Setuptools SVN repository. As a result, all of the hashes have changed. - -Distribute was grafted in a 'distribute' branch and the 'setuptools-0.6' -branch was targeted for the merge. The 'setuptools' branch remains with -unreleased code and may be incorporated in the future. - -Reconciling Differences -======================= - -There were both technical and philosophical differences between Setuptools -and Distribute. To reconcile these differences in a manageable way, the -following technique was undertaken: - -Create a 'Setuptools-Distribute merge' branch, based on a late release of -Distribute (0.6.35). This was done with a00b441856c4. - -In that branch, first remove code that is no longer relevant to -Setuptools (such as the setuptools patching code). - -Next, in the the merge branch, create another base from at the point where the -fork occurred (such that the code is still essentially an older but pristine -setuptools). This base can be found as 955792b069d0. This creates two heads -in the merge branch, each with a basis in the fork. - -Then, repeatedly copy changes for a -single file or small group of files from a late revision of that file in the -'setuptools-0.6' branch (1aae1efe5733 was used) and commit those changes on -the setuptools-only head. That head is then merged with the head with -Distribute changes. It is in this Mercurial -merge operation that the fundamental differences between Distribute and -Setuptools are reconciled, but since only a single file or small set of files -are used, the scope is limited. - -Finally, once all the challenging files have been reconciled and merged, the -remaining changes from the setuptools-0.6 branch are merged, deferring to the -reconciled changes (a1fa855a5a62 and 160ccaa46be0). - -Originally, jaraco attempted all of this using anonymous heads in the -Distribute branch, but later realized this technique made for a somewhat -unclear merge process, so the changes were re-committed as described above -for clarity. In this way, the "distribute" and "setuptools" branches can -continue to track the official Distribute changesets. - -Concessions -=========== - -With the merge of Setuptools and Distribute, the following concessions were -made: - -Differences from setuptools 0.6c12: - -Major Changes -------------- - -* Python 3 support. -* Improved support for GAE. -* Support `PEP-370 `_ per-user site - packages. -* Sort order of Distributions in pkg_resources now prefers PyPI to external - links (Distribute issue 163). -* Python 2.4 or greater is required (drop support for Python 2.3). - -Minor Changes -------------- - -* Wording of some output has changed to replace contractions with their - canonical form (i.e. prefer "could not" to "couldn't"). -* Manifest files are only written for 32-bit .exe launchers. - -Differences from Distribute 0.6.36: - -Major Changes -------------- - -* The _distribute property of the setuptools module has been removed. -* Distributions are once again installed as zipped eggs by default, per the - rationale given in `the seminal bug report - `_ indicates that the feature - should remain and no substantial justification was given in the `Distribute - report `_. - -Minor Changes -------------- - -* The patch for `#174 `_ - has been rolled-back, as the comment on the ticket indicates that the patch - addressed a symptom and not the fundamental issue. -* ``easy_install`` (the command) once again honors setup.cfg if found in the - current directory. The "mis-behavior" characterized in `#99 - `_ is actually intended - behavior, and no substantial rationale was given for the deviation. From ceb604c40ef9d095942952e7bb535bf8dd3295ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2015 13:36:04 -0400 Subject: [PATCH 5172/8469] Update documentation to reflect no integrated SCM support. --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 0feb09ea95..0646eff5ac 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2595,8 +2595,8 @@ those methods' docstrings for more details. Adding Support for Other Revision Control Systems ------------------------------------------------- -If you would like to create a plugin for ``setuptools`` to find files in other -source control systems besides CVS and Subversion, you can do so by adding an +If you would like to create a plugin for ``setuptools`` to find files in +source control systems, you can do so by adding an entry point to the ``setuptools.file_finders`` group. The entry point should be a function accepting a single directory name, and should yield all the filenames within that directory (and any subdirectories thereof) that From 5fcd56e4962e04ba01c278f492f4a95e581d5882 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2015 13:37:35 -0400 Subject: [PATCH 5173/8469] Remove cruft from Subclassing section --- docs/setuptools.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 0646eff5ac..e2753cba50 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2652,9 +2652,7 @@ Subclassing ``Command`` ----------------------- Sorry, this section isn't written yet, and neither is a lot of what's below -this point, except for the change log. You might want to `subscribe to changes -in this page `_ to see when new documentation is -added or updated. +this point. XXX From abf566993bb10869d6003279bff292e0e5044120 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 13:30:29 -0400 Subject: [PATCH 5174/8469] Update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2ad565bc24..bce05c5ef7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,9 @@ CHANGES manipulation. If so, the default behavior can be retained by setting the variable to "rewrite". +* Issue #257: ``easy_install --version`` now shows more detail + about the installation location and Python version. + ---- 18.2 ---- From bbb481088c030bed9c837068d0a3b956c2e26446 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 13:45:21 -0400 Subject: [PATCH 5175/8469] Extract version handling as a separate method --- setuptools/command/easy_install.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 62c24d77ca..45d180bb3c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -215,12 +215,19 @@ def _delete_path(self, path): remover = rmtree if is_tree else os.unlink remover(path) + @staticmethod + def _render_version(): + """ + Render the Setuptools version and installation details, then exit. + """ + ver = sys.version[:3] + dist = get_distribution('setuptools') + tmpl = 'setuptools {dist.version} from {dist.location} (Python {ver})' + print(tmpl.format(**locals())) + raise SystemExit() + def finalize_options(self): - if self.version: - dist = get_distribution('setuptools') - print('setuptools %s from %s (python %s)' % ( - dist.version, dist.location, sys.version[:3])) - sys.exit() + self.version and self._render_version() py_version = sys.version.split()[0] prefix, exec_prefix = get_config_vars('prefix', 'exec_prefix') From 421db46870409b6b0cf797dac8869fddc8156191 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 13:59:27 -0400 Subject: [PATCH 5176/8469] Python 3.6 isn't yet a thing, apparently. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 1a425747fa..2b367a6dda 100755 --- a/setup.py +++ b/setup.py @@ -145,7 +145,6 @@ def _gen_console_scripts(): 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 From aba8a0c034fb9a0917d5a7d3508c87a800666718 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 14:02:32 -0400 Subject: [PATCH 5177/8469] Added tag 18.3 for changeset b59320212c83 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 447b5cdb4d..40769986c1 100644 --- a/.hgtags +++ b/.hgtags @@ -218,3 +218,4 @@ fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 1a981f2e5031f55267dc2a28fa1b42274a1b64b2 18.2 +b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 From c8364b9cf2eeccf684777e53ae4abad2e4fc30b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 14:06:13 -0400 Subject: [PATCH 5178/8469] Bumped to 18.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a13ce1568a..53988038d1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.3" +DEFAULT_VERSION = "18.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 861921f0bf..0cf7321a05 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.3' +__version__ = '18.4' From 9366bb0996cd7c8d3f77ee45f84ddd77f7ded8b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 22:30:23 -0400 Subject: [PATCH 5179/8469] Add tests capturing expected behavior, including failure to match expectation indicated in docstring. --- setuptools/tests/test_setuptools.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 setuptools/tests/test_setuptools.py diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py new file mode 100644 index 0000000000..f6bec644d1 --- /dev/null +++ b/setuptools/tests/test_setuptools.py @@ -0,0 +1,24 @@ +import pytest + +import setuptools + + +@pytest.fixture +def example_source(tmpdir): + tmpdir.mkdir('foo') + (tmpdir / 'foo/bar.py').write('') + (tmpdir / 'readme.txt').write('') + return tmpdir + + +def test_findall(example_source): + found = list(setuptools.findall(str(example_source))) + expected = ['readme.txt', 'foo/bar.py'] + assert found == expected + + +def test_findall_curdir(example_source): + with example_source.as_cwd(): + found = list(setuptools.findall()) + expected = ['readme.txt', 'foo/bar.py'] + assert found == expected From 3c0d3a91f64a9174f6e3473bbcea3be42045004a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 22:35:48 -0400 Subject: [PATCH 5180/8469] Update docstring and test to match long-standing expectation in behavior. --- setuptools/__init__.py | 5 +++-- setuptools/tests/test_setuptools.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2c492446a6..63ee15ed6e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -137,8 +137,9 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): distutils.core.Command = Command # we can't patch distutils.cmd, alas def findall(dir = os.curdir): - """Find all files under 'dir' and return the list of full filenames - (relative to 'dir'). + """ + Find all files under 'dir' and return the list of full filenames. + Unless dir is '.', return full filenames with dir prepended. """ all_files = [] for base, dirs, files in os.walk(dir, followlinks=True): diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index f6bec644d1..e1a06c96da 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -14,6 +14,7 @@ def example_source(tmpdir): def test_findall(example_source): found = list(setuptools.findall(str(example_source))) expected = ['readme.txt', 'foo/bar.py'] + expected = [example_source.join(fn) for fn in expected] assert found == expected From 32a47417750420524e1270cc5e3fc749eb9e5a89 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Sep 2015 22:58:47 -0400 Subject: [PATCH 5181/8469] Restore old behavior for calculating the base. Fixes failing test and fixes #425. --- setuptools/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index e939033612..490026190f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -145,7 +145,9 @@ def findall(dir=os.curdir): Unless dir is '.', return full filenames with dir prepended. """ def _prepend(base): - return functools.partial(os.path.join, os.path.relpath(base, dir)) + if base == os.curdir or base.startswith(os.curdir + os.sep): + base = base[2:] + return functools.partial(os.path.join, base) return [ file From 38a40150670a18742a85435ed2baba422c002a68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Sep 2015 01:16:14 -0400 Subject: [PATCH 5182/8469] Another refactor of findall, this time separating the simple walk / join operation from the conditional relative path. --- setuptools/__init__.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 490026190f..a7d75ed44c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -139,22 +139,29 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): # we can't patch distutils.cmd, alas distutils.core.Command = Command + +def _find_all_simple(path): + """ + Find all files under 'path' + """ + return ( + os.path.join(base, file) + for base, dirs, files in os.walk(path, followlinks=True) + for file in files + ) + + def findall(dir=os.curdir): """ Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. """ - def _prepend(base): - if base == os.curdir or base.startswith(os.curdir + os.sep): - base = base[2:] - return functools.partial(os.path.join, base) - - return [ - file - for base, dirs, files in os.walk(dir, followlinks=True) - for file in map(_prepend(base), files) - if os.path.isfile(file) - ] + files = _find_all_simple(dir) + if dir == os.curdir: + make_rel = functools.partial(os.path.relpath, start=dir) + files = map(make_rel, files) + return list(files) + # fix findall bug in distutils (http://bugs.python.org/issue12885) distutils.filelist.findall = findall From a56aee24962dea7f9d8b46fbedb79fec988ee246 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Sep 2015 02:23:09 -0400 Subject: [PATCH 5183/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index bce05c5ef7..4700f0674d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +18.3.1 +------ + +* Issue #425: Correct regression in setuptools.findall. + ---- 18.3 ---- From 9aec33a0cf4a3bcd152d3d142946a98530588af4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Sep 2015 02:23:25 -0400 Subject: [PATCH 5184/8469] Bumped to 18.3.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 53988038d1..15104c59cb 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.4" +DEFAULT_VERSION = "18.3.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 0cf7321a05..12568fa212 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.4' +__version__ = '18.3.1' From eb749460d656527d90322f380730e01362c254d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Sep 2015 09:15:48 +0200 Subject: [PATCH 5185/8469] Added tag 18.3.1 for changeset 7a705b610abb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 40769986c1..e225e3694d 100644 --- a/.hgtags +++ b/.hgtags @@ -219,3 +219,4 @@ e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 1a981f2e5031f55267dc2a28fa1b42274a1b64b2 18.2 b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 +7a705b610abb1177ca169311c4ee261f3e4f0957 18.3.1 From 0846f06f326b9f369772b6fe1c980434bc9b9c1b Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 8 Sep 2015 21:39:01 -0700 Subject: [PATCH 5186/8469] Issue #25027: Reverts partial-static build options and adds vcruntime140.dll to Windows installation. --- _msvccompiler.py | 76 +++++++++++++++++++++++++++++++------- tests/test_msvccompiler.py | 58 ++++++++++++++++++++++++++--- 2 files changed, 116 insertions(+), 18 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index b344616e60..82b78a0ffe 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -14,6 +14,8 @@ # ported to VS 2015 by Steve Dower import os +import shutil +import stat import subprocess from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ @@ -25,7 +27,7 @@ import winreg from itertools import count -def _find_vcvarsall(): +def _find_vcvarsall(plat_spec): with winreg.OpenKeyEx( winreg.HKEY_LOCAL_MACHINE, r"Software\Microsoft\VisualStudio\SxS\VC7", @@ -33,7 +35,7 @@ def _find_vcvarsall(): ) as key: if not key: log.debug("Visual C++ is not registered") - return None + return None, None best_version = 0 best_dir = None @@ -51,14 +53,23 @@ def _find_vcvarsall(): best_version, best_dir = version, vc_dir if not best_version: log.debug("No suitable Visual C++ version found") - return None + return None, None vcvarsall = os.path.join(best_dir, "vcvarsall.bat") if not os.path.isfile(vcvarsall): log.debug("%s cannot be found", vcvarsall) - return None + return None, None - return vcvarsall + vcruntime = None + vcruntime_spec = _VCVARS_PLAT_TO_VCRUNTIME_REDIST.get(plat_spec) + if vcruntime_spec: + vcruntime = os.path.join(best_dir, + vcruntime_spec.format(best_version)) + if not os.path.isfile(vcruntime): + log.debug("%s cannot be found", vcruntime) + vcruntime = None + + return vcvarsall, vcruntime def _get_vc_env(plat_spec): if os.getenv("DISTUTILS_USE_SDK"): @@ -67,7 +78,7 @@ def _get_vc_env(plat_spec): for key, value in os.environ.items() } - vcvarsall = _find_vcvarsall() + vcvarsall, vcruntime = _find_vcvarsall(plat_spec) if not vcvarsall: raise DistutilsPlatformError("Unable to find vcvarsall.bat") @@ -83,12 +94,16 @@ def _get_vc_env(plat_spec): raise DistutilsPlatformError("Error executing {}" .format(exc.cmd)) - return { + env = { key.lower(): value for key, _, value in (line.partition('=') for line in out.splitlines()) if key and value } + + if vcruntime: + env['py_vcruntime_redist'] = vcruntime + return env def _find_exe(exe, paths=None): """Return path to an MSVC executable program. @@ -115,6 +130,20 @@ def _find_exe(exe, paths=None): 'win-amd64' : 'amd64', } +# A map keyed by get_platform() return values to the file under +# the VC install directory containing the vcruntime redistributable. +_VCVARS_PLAT_TO_VCRUNTIME_REDIST = { + 'x86' : 'redist\\x86\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', + 'amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', + 'x86_amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', +} + +# A set containing the DLLs that are guaranteed to be available for +# all micro versions of this Python version. Known extension +# dependencies that are not in this set will be copied to the output +# path. +_BUNDLED_DLLS = frozenset(['vcruntime140.dll']) + class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" @@ -189,6 +218,7 @@ def initialize(self, plat_name=None): self.rc = _find_exe("rc.exe", paths) # resource compiler self.mc = _find_exe("mc.exe", paths) # message compiler self.mt = _find_exe("mt.exe", paths) # message compiler + self._vcruntime_redist = vc_env.get('py_vcruntime_redist', '') for dir in vc_env.get('include', '').split(os.pathsep): if dir: @@ -199,20 +229,26 @@ def initialize(self, plat_name=None): self.add_library_dir(dir) self.preprocess_options = None - # Use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib + # If vcruntime_redist is available, link against it dynamically. Otherwise, + # use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib # later to dynamically link to ucrtbase but not vcruntime. self.compile_options = [ - '/nologo', '/Ox', '/MT', '/W3', '/GL', '/DNDEBUG' + '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG' ] + self.compile_options.append('/MD' if self._vcruntime_redist else '/MT') + self.compile_options_debug = [ - '/nologo', '/Od', '/MTd', '/Zi', '/W3', '/D_DEBUG' + '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG' ] ldflags = [ - '/nologo', '/INCREMENTAL:NO', '/LTCG', '/nodefaultlib:libucrt.lib', 'ucrt.lib', + '/nologo', '/INCREMENTAL:NO', '/LTCG' ] + if not self._vcruntime_redist: + ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib')) + ldflags_debug = [ - '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL', '/nodefaultlib:libucrtd.lib', 'ucrtd.lib', + '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL' ] self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1'] @@ -446,15 +482,29 @@ def link(self, if extra_postargs: ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) + output_dir = os.path.dirname(os.path.abspath(output_filename)) + self.mkpath(output_dir) try: log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args)) self.spawn([self.linker] + ld_args) + self._copy_vcruntime(output_dir) except DistutilsExecError as msg: raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) + def _copy_vcruntime(self, output_dir): + vcruntime = self._vcruntime_redist + if not vcruntime or not os.path.isfile(vcruntime): + return + + if os.path.basename(vcruntime).lower() in _BUNDLED_DLLS: + return + + log.debug('Copying "%s"', vcruntime) + vcruntime = shutil.copy(vcruntime, output_dir) + os.chmod(vcruntime, stat.S_IWRITE) + def spawn(self, cmd): old_path = os.getenv('path') try: diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index 1f8890792e..0b8a69fa5a 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -3,6 +3,8 @@ import unittest import os +import distutils._msvccompiler as _msvccompiler + from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest @@ -19,19 +21,65 @@ def test_no_compiler(self): # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found - from distutils._msvccompiler import _get_vc_env - def _find_vcvarsall(): - return None + def _find_vcvarsall(plat_spec): + return None, None - import distutils._msvccompiler as _msvccompiler old_find_vcvarsall = _msvccompiler._find_vcvarsall _msvccompiler._find_vcvarsall = _find_vcvarsall try: - self.assertRaises(DistutilsPlatformError, _get_vc_env, + self.assertRaises(DistutilsPlatformError, + _msvccompiler._get_vc_env, 'wont find this version') finally: _msvccompiler._find_vcvarsall = old_find_vcvarsall + def test_compiler_options(self): + # suppress path to vcruntime from _find_vcvarsall to + # check that /MT is added to compile options + old_find_vcvarsall = _msvccompiler._find_vcvarsall + def _find_vcvarsall(plat_spec): + return old_find_vcvarsall(plat_spec)[0], None + _msvccompiler._find_vcvarsall = _find_vcvarsall + try: + compiler = _msvccompiler.MSVCCompiler() + compiler.initialize() + + self.assertIn('/MT', compiler.compile_options) + self.assertNotIn('/MD', compiler.compile_options) + finally: + _msvccompiler._find_vcvarsall = old_find_vcvarsall + + def test_vcruntime_copy(self): + # force path to a known file - it doesn't matter + # what we copy as long as its name is not in + # _msvccompiler._BUNDLED_DLLS + old_find_vcvarsall = _msvccompiler._find_vcvarsall + def _find_vcvarsall(plat_spec): + return old_find_vcvarsall(plat_spec)[0], __file__ + _msvccompiler._find_vcvarsall = _find_vcvarsall + try: + tempdir = self.mkdtemp() + compiler = _msvccompiler.MSVCCompiler() + compiler.initialize() + compiler._copy_vcruntime(tempdir) + + self.assertTrue(os.path.isfile(os.path.join( + tempdir, os.path.basename(__file__)))) + finally: + _msvccompiler._find_vcvarsall = old_find_vcvarsall + + def test_vcruntime_skip_copy(self): + tempdir = self.mkdtemp() + compiler = _msvccompiler.MSVCCompiler() + compiler.initialize() + dll = compiler._vcruntime_redist + self.assertTrue(os.path.isfile(dll)) + + compiler._copy_vcruntime(tempdir) + + self.assertFalse(os.path.isfile(os.path.join( + tempdir, os.path.basename(dll)))) + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From fd5d6fbed8f41d9ad678d2b2ace8c1d6564f00a3 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 8 Sep 2015 23:42:51 -0700 Subject: [PATCH 5187/8469] Moves distutils test import within skippable class. --- tests/test_msvccompiler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index 0b8a69fa5a..874d6035e8 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -3,8 +3,6 @@ import unittest import os -import distutils._msvccompiler as _msvccompiler - from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest @@ -18,6 +16,7 @@ class msvccompilerTestCase(support.TempdirManager, unittest.TestCase): def test_no_compiler(self): + import distutils._msvccompiler as _msvccompiler # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found @@ -34,6 +33,7 @@ def _find_vcvarsall(plat_spec): _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_compiler_options(self): + import distutils._msvccompiler as _msvccompiler # suppress path to vcruntime from _find_vcvarsall to # check that /MT is added to compile options old_find_vcvarsall = _msvccompiler._find_vcvarsall @@ -50,6 +50,7 @@ def _find_vcvarsall(plat_spec): _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_vcruntime_copy(self): + import distutils._msvccompiler as _msvccompiler # force path to a known file - it doesn't matter # what we copy as long as its name is not in # _msvccompiler._BUNDLED_DLLS @@ -69,6 +70,8 @@ def _find_vcvarsall(plat_spec): _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_vcruntime_skip_copy(self): + import distutils._msvccompiler as _msvccompiler + tempdir = self.mkdtemp() compiler = _msvccompiler.MSVCCompiler() compiler.initialize() From 465364f3af646e6285e2c6fd461fd44113164ff7 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Wed, 9 Sep 2015 06:54:57 -0700 Subject: [PATCH 5188/8469] Whitespace fixes to make the commit hook on hg.python.org happy. --- _msvccompiler.py | 4 ++-- tests/test_msvccompiler.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 82b78a0ffe..03a5f10ee7 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -100,7 +100,7 @@ def _get_vc_env(plat_spec): (line.partition('=') for line in out.splitlines()) if key and value } - + if vcruntime: env['py_vcruntime_redist'] = vcruntime return env @@ -236,7 +236,7 @@ def initialize(self, plat_name=None): '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG' ] self.compile_options.append('/MD' if self._vcruntime_redist else '/MT') - + self.compile_options_debug = [ '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG' ] diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index 874d6035e8..c4d911ff83 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -77,7 +77,7 @@ def test_vcruntime_skip_copy(self): compiler.initialize() dll = compiler._vcruntime_redist self.assertTrue(os.path.isfile(dll)) - + compiler._copy_vcruntime(tempdir) self.assertFalse(os.path.isfile(os.path.join( From 94416707fd59a65f4a8f7f70541d6b3fc018b626 Mon Sep 17 00:00:00 2001 From: Andy Freeland Date: Thu, 10 Sep 2015 01:03:42 -0400 Subject: [PATCH 5189/8469] Add support for python_platform_implementation environment marker This patch adds support for the 'python_platform_implementation' environment marker as defined by PEP-0426: https://www.python.org/dev/peps/pep-0426/#environment-markers --- pkg_resources/__init__.py | 1 + pkg_resources/api_tests.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 42ddcf7c17..639dc4a6ee 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1403,6 +1403,7 @@ class MarkerEvaluation(object): 'python_version': lambda: platform.python_version()[:3], 'platform_version': platform.version, 'platform_machine': platform.machine, + 'platform_python_implementation': platform.python_implementation, 'python_implementation': platform.python_implementation, } diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 1c852e817c..d28db0f5f8 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -420,3 +420,6 @@ Environment Markers >>> em("python_version > '2.5'") True + + >>> im("platform_python_implementation=='CPython'") + False From 2509f6beef005a88eede79503086f8c0ba1b484c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 12 Sep 2015 17:20:47 -0700 Subject: [PATCH 5190/8469] fix name of argument in docstring and the docs (closes #25076) Patch by TAKASE Arihiro. --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 911e84dd3b..e93a27363f 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -752,7 +752,7 @@ def runtime_library_dir_option(self, dir): raise NotImplementedError def library_option(self, lib): - """Return the compiler option to add 'dir' to the list of libraries + """Return the compiler option to add 'lib' to the list of libraries linked into the shared library or executable. """ raise NotImplementedError From 0c984fb56249c3d58cf1be3015e36afab77c184c Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sun, 13 Sep 2015 18:01:43 +0000 Subject: [PATCH 5191/8469] Add the PyPA Code of Conduct --- README.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.txt b/README.txt index e21c40697a..799ad0088f 100755 --- a/README.txt +++ b/README.txt @@ -223,3 +223,14 @@ Credits the Python Packaging Authority (PyPA) and the larger Python community. .. _files: + + +--------------- +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`_. + +.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/ From 30a15dcce774cd9ed2a3f09644aea42fb9f1e819 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:00:22 +0200 Subject: [PATCH 5192/8469] Add another test capturing issue described in http://bugs.python.org/issue12885 --- setuptools/tests/test_setuptools.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index f6bec644d1..83c42e3e84 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -1,3 +1,5 @@ +import os + import pytest import setuptools @@ -22,3 +24,24 @@ def test_findall_curdir(example_source): found = list(setuptools.findall()) expected = ['readme.txt', 'foo/bar.py'] assert found == expected + + +@pytest.fixture +def can_symlink(tmpdir): + """ + Skip if cannot create a symbolic link + """ + link_fn = 'link' + target_fn = 'target' + try: + os.symlink(target_fn, link_fn) + except (OSError, NotImplementedError, AttributeError): + pytest.skip("Cannot create symbolic links") + os.remove(link_fn) + + +def test_findall_missing_symlink(tmpdir, can_symlink): + with tmpdir.as_cwd(): + os.symlink('foo', 'bar') + found = list(setuptools.findall()) + assert found == [] From 22a8ace27c7d7aadfa0fa9311686541a2169092c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:07:48 +0200 Subject: [PATCH 5193/8469] Only return results that are files. Fixes failing test and corrects additional regression in 18.3. --- setuptools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a7d75ed44c..712ec082b0 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -144,11 +144,12 @@ def _find_all_simple(path): """ Find all files under 'path' """ - return ( + results = ( os.path.join(base, file) for base, dirs, files in os.walk(path, followlinks=True) for file in files ) + return filter(os.path.isfile, results) def findall(dir=os.curdir): From b7236c18f5a3b4f5f44d97eb67ce9e3cc56715f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:12:15 +0200 Subject: [PATCH 5194/8469] Issue #12285: Replace implementation of findall with implementation from Setuptools 7ce820d524db. --- filelist.py | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/filelist.py b/filelist.py index db3f7a9680..6522e69f06 100644 --- a/filelist.py +++ b/filelist.py @@ -6,6 +6,7 @@ import os, re import fnmatch +import functools from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log @@ -242,35 +243,28 @@ def exclude_pattern (self, pattern, # ---------------------------------------------------------------------- # Utility functions +def _find_all_simple(path): + """ + Find all files under 'path' + """ + results = ( + os.path.join(base, file) + for base, dirs, files in os.walk(path, followlinks=True) + for file in files + ) + return filter(os.path.isfile, results) + + def findall(dir=os.curdir): - """Find all files under 'dir' and return the list of full filenames - (relative to 'dir'). """ - from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK - - list = [] - stack = [dir] - pop = stack.pop - push = stack.append - - while stack: - dir = pop() - names = os.listdir(dir) - - for name in names: - if dir != os.curdir: # avoid the dreaded "./" syndrome - fullname = os.path.join(dir, name) - else: - fullname = name - - # Avoid excess stat calls -- just one will do, thank you! - stat = os.stat(fullname) - mode = stat[ST_MODE] - if S_ISREG(mode): - list.append(fullname) - elif S_ISDIR(mode) and not S_ISLNK(mode): - push(fullname) - return list + Find all files under 'dir' and return the list of full filenames. + Unless dir is '.', return full filenames with dir prepended. + """ + files = _find_all_simple(dir) + if dir == os.curdir: + make_rel = functools.partial(os.path.relpath, start=dir) + files = map(make_rel, files) + return list(files) def glob_to_re(pattern): From 7e28912d0cfd017577df59c465bf770a8182d232 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:26:38 +0200 Subject: [PATCH 5195/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4700f0674d..32dd44860b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +18.3.2 +------ + +* Correct another regression in setuptools.findall + where the fix for Python #12885 was lost. + ------ 18.3.1 ------ @@ -26,6 +33,9 @@ CHANGES * Issue #257: ``easy_install --version`` now shows more detail about the installation location and Python version. +* Refactor setuptools.findall in preparation for re-submission + back to distutils. + ---- 18.2 ---- From ec01ecef42dd6f9813a9beca71dfdb92fb539719 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:27:06 +0200 Subject: [PATCH 5196/8469] Bumped to 18.3.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 15104c59cb..a07dd4d5b1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.3.1" +DEFAULT_VERSION = "18.3.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 12568fa212..787141c772 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.3.1' +__version__ = '18.3.2' From 2bec03891c629702face5f7f1cace2e73e6b8fe5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:27:10 +0200 Subject: [PATCH 5197/8469] Added tag 18.3.2 for changeset 1e120f04bcaa --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e225e3694d..c72034f40b 100644 --- a/.hgtags +++ b/.hgtags @@ -220,3 +220,4 @@ c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 1a981f2e5031f55267dc2a28fa1b42274a1b64b2 18.2 b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 7a705b610abb1177ca169311c4ee261f3e4f0957 18.3.1 +1e120f04bcaa2421c4df0eb6678c3019ba4a82f6 18.3.2 From 351f51dcefd0fc260f005d30eb60f23a4fcd3ac1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 19 Sep 2015 18:33:23 +0200 Subject: [PATCH 5198/8469] Bumped to 18.3.3 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index a07dd4d5b1..2247dd7979 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.3.2" +DEFAULT_VERSION = "18.3.3" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 787141c772..79dd2dabcd 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.3.2' +__version__ = '18.3.3' From 9f5f2ac2aa55dbac1dfe9da6c7a46d82355c75fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Sep 2015 07:29:18 -0400 Subject: [PATCH 5199/8469] Simplify implementation of Requirement.parse. --- pkg_resources/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 42ddcf7c17..ce8f2e98ec 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2983,12 +2983,8 @@ def __repr__(self): return "Requirement.parse(%r)" % str(self) @staticmethod def parse(s): - reqs = list(parse_requirements(s)) - if reqs: - if len(reqs) == 1: - return reqs[0] - raise ValueError("Expected only one requirement", s) - raise ValueError("No requirements found", s) + req, = parse_requirements(s) + return req def _get_mro(cls): From bc3389a6048b23871e50eaab20d8df06ba3ff53d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Sep 2015 07:50:30 -0400 Subject: [PATCH 5200/8469] Extract _requirement_spec method for rendering the requirement specification for scripts. Ref #439. --- setuptools/command/easy_install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 45d180bb3c..2faff4c253 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -766,7 +766,7 @@ def install_wrapper_scripts(self, dist): def install_script(self, dist, script_name, script_text, dev_path=None): """Generate a legacy script wrapper and install it""" - spec = str(dist.as_requirement()) + spec = self._requirement_spec(dist) is_script = is_python_script(script_text, script_name) if is_script: @@ -774,6 +774,10 @@ def install_script(self, dist, script_name, script_text, dev_path=None): self._load_template(dev_path) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') + @staticmethod + def _requirement_spec(dist): + return str(dist.as_requirement()) + @staticmethod def _load_template(dev_path): """ From b9e23adff55624ba2c3527c9f807ec7962b58c5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Sep 2015 08:07:30 -0400 Subject: [PATCH 5201/8469] Backed out changeset 38b415c244b8 --- setuptools/command/easy_install.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2faff4c253..45d180bb3c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -766,7 +766,7 @@ def install_wrapper_scripts(self, dist): def install_script(self, dist, script_name, script_text, dev_path=None): """Generate a legacy script wrapper and install it""" - spec = self._requirement_spec(dist) + spec = str(dist.as_requirement()) is_script = is_python_script(script_text, script_name) if is_script: @@ -774,10 +774,6 @@ def install_script(self, dist, script_name, script_text, dev_path=None): self._load_template(dev_path) % locals()) self.write_script(script_name, _to_ascii(script_text), 'b') - @staticmethod - def _requirement_spec(dist): - return str(dist.as_requirement()) - @staticmethod def _load_template(dev_path): """ From f8a519501546f5d5f81ad00ecc7d160bd72e748e Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 5 Oct 2015 10:35:00 -0700 Subject: [PATCH 5202/8469] Issue #25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed. --- _msvccompiler.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 03a5f10ee7..10a9ffda24 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -28,15 +28,17 @@ from itertools import count def _find_vcvarsall(plat_spec): - with winreg.OpenKeyEx( - winreg.HKEY_LOCAL_MACHINE, - r"Software\Microsoft\VisualStudio\SxS\VC7", - access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY - ) as key: - if not key: - log.debug("Visual C++ is not registered") - return None, None + try: + key = winreg.OpenKeyEx( + winreg.HKEY_LOCAL_MACHINE, + r"Software\Microsoft\VisualStudio\SxS\VC7", + access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY + ) + except OSError: + log.debug("Visual C++ is not registered") + return None, None + with key: best_version = 0 best_dir = None for i in count(): From 0a30d49169f5e73c86f452f284d10ed4b1646ff4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 19:59:20 -0400 Subject: [PATCH 5203/8469] Calculate test_args on demand rather than setting an attribute. --- setuptools/command/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 42689f7012..a80d91adb2 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -72,10 +72,6 @@ def finalize_options(self): "You may specify a module or a suite, but not both" ) - self.test_args = [self.test_suite] - - if self.verbose: - self.test_args.insert(0, '--verbose') if self.test_loader is None: self.test_loader = getattr(self.distribution, 'test_loader', None) if self.test_loader is None: @@ -83,6 +79,11 @@ def finalize_options(self): if self.test_runner is None: self.test_runner = getattr(self.distribution, 'test_runner', None) + @property + def test_args(self): + verbose = ['--verbose'] if self.verbose else [] + return verbose + [self.test_suite] + def with_project_on_sys_path(self, func): with_2to3 = PY3 and getattr(self.distribution, 'use_2to3', False) From a33e201d1a86dd108e8641f641ff24c7f00ba054 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:03:33 -0400 Subject: [PATCH 5204/8469] Move value checking into its own block. --- setuptools/command/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index a80d91adb2..4d859808e7 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -62,15 +62,16 @@ def initialize_options(self): def finalize_options(self): + if self.test_suite and self.test_module: + raise DistutilsOptionError( + "You may specify a module or a suite, but not both" + ) + if self.test_suite is None: if self.test_module is None: self.test_suite = self.distribution.test_suite else: self.test_suite = self.test_module + ".test_suite" - elif self.test_module: - raise DistutilsOptionError( - "You may specify a module or a suite, but not both" - ) if self.test_loader is None: self.test_loader = getattr(self.distribution, 'test_loader', None) From 82f3e20506b4e2646880ec7ac5bb6b10e03e8c40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:03:59 -0400 Subject: [PATCH 5205/8469] Extract variable for nicer indentation --- setuptools/command/test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 4d859808e7..225f4673ce 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -63,9 +63,8 @@ def initialize_options(self): def finalize_options(self): if self.test_suite and self.test_module: - raise DistutilsOptionError( - "You may specify a module or a suite, but not both" - ) + msg = "You may specify a module or a suite, but not both" + raise DistutilsOptionError(msg) if self.test_suite is None: if self.test_module is None: From 552ca4d4c712c68c90601ff3f70cf4115b1636ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:12:12 -0400 Subject: [PATCH 5206/8469] Resolve test_suite directly rather than referencing test_args --- setuptools/command/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 225f4673ce..3e9f5f72c4 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -147,7 +147,7 @@ def run_tests(self): # re-import them from the build location. Required when 2to3 is used # with namespace packages. if PY3 and getattr(self.distribution, 'use_2to3', False): - module = self.test_args[-1].split('.')[0] + module = self.test_suite.split('.')[0] if module in _namespace_packages: del_modules = [] if module in sys.modules: From 476381578991476afeca2e28a96b51fdbef50c13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:15:25 -0400 Subject: [PATCH 5207/8469] Just pass 'unittest' as argv[0] - the full path to the file shouldn't be relevant --- setuptools/command/test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 3e9f5f72c4..5f93d92eeb 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,6 +1,5 @@ from distutils.errors import DistutilsOptionError from unittest import TestLoader -import unittest import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, @@ -159,7 +158,7 @@ def run_tests(self): list(map(sys.modules.__delitem__, del_modules)) unittest_main( - None, None, [unittest.__file__] + self.test_args, + None, None, ['unittest'] + self.test_args, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), ) From 0f14cd9c52944d924c7d9ac350e4f904b0edb0af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:16:23 -0400 Subject: [PATCH 5208/8469] Extract _argv property. --- setuptools/command/test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 5f93d92eeb..549cfb21e5 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -158,11 +158,15 @@ def run_tests(self): list(map(sys.modules.__delitem__, del_modules)) unittest_main( - None, None, ['unittest'] + self.test_args, + None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), ) + @property + def _argv(self): + return ['unittest'] + self.test_args + @staticmethod def _resolve_as_ep(val): """ From 9c9bfb0fc0f1f667bdabf220e939349143e0d9ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:17:37 -0400 Subject: [PATCH 5209/8469] Re-use _argv for the announcement --- setuptools/command/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 549cfb21e5..75d55bad54 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -134,11 +134,11 @@ def run(self): self.distribution.fetch_build_eggs(self.distribution.tests_require) if self.test_suite: - cmd = ' '.join(self.test_args) + cmd = ' '.join(self._argv) if self.dry_run: - self.announce('skipping "unittest %s" (dry run)' % cmd) + self.announce('skipping "%s" (dry run)' % cmd) else: - self.announce('running "unittest %s"' % cmd) + self.announce('running "%s"' % cmd) self.with_project_on_sys_path(self.run_tests) def run_tests(self): From 8223f2804628034993247add70943888d96d6348 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:38:36 -0400 Subject: [PATCH 5210/8469] Only include test_suite in args if one is specified. Ref #446. --- setuptools/command/test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 75d55bad54..11e4a019cf 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -80,8 +80,13 @@ def finalize_options(self): @property def test_args(self): - verbose = ['--verbose'] if self.verbose else [] - return verbose + [self.test_suite] + return list(self._test_args()) + + def _test_args(self): + if self.verbose: + yield '--verbose' + if self.test_suite: + yield self.test_suite def with_project_on_sys_path(self, func): with_2to3 = PY3 and getattr(self.distribution, 'use_2to3', False) From 5a9aed6e210628d16cd446c163fa50c9841dba34 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:40:47 -0400 Subject: [PATCH 5211/8469] Accept a pattern argument, supplied by later versions of unittest. --- setuptools/command/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 11e4a019cf..13b8b46b46 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -11,7 +11,7 @@ class ScanningLoader(TestLoader): - def loadTestsFromModule(self, module): + def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module If the module is a package, load tests from all the modules in it. From 34910765fbafb53bec6604b730875d010a863ae2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:41:25 -0400 Subject: [PATCH 5212/8469] Always execute tests, even if no test_suite is supplied. Fixes #446. --- setuptools/command/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 13b8b46b46..9c6a8e0477 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -138,7 +138,7 @@ def run(self): if self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) - if self.test_suite: + if True: cmd = ' '.join(self._argv) if self.dry_run: self.announce('skipping "%s" (dry run)' % cmd) From 63140936955baeaf8390ddad115af1947787f37f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:41:50 -0400 Subject: [PATCH 5213/8469] Remove unreachable branch. --- setuptools/command/test.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 9c6a8e0477..160e21c95e 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -138,13 +138,12 @@ def run(self): if self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) - if True: - cmd = ' '.join(self._argv) - if self.dry_run: - self.announce('skipping "%s" (dry run)' % cmd) - else: - self.announce('running "%s"' % cmd) - self.with_project_on_sys_path(self.run_tests) + cmd = ' '.join(self._argv) + if self.dry_run: + self.announce('skipping "%s" (dry run)' % cmd) + else: + self.announce('running "%s"' % cmd) + self.with_project_on_sys_path(self.run_tests) def run_tests(self): # Purge modules under test from sys.modules. The test loader will From d24ca2822867ef944f959ba420a1c4cf47bae859 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 20:43:46 -0400 Subject: [PATCH 5214/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 32dd44860b..d20077535e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +18.4 +---- + +* Issue #446: Test command now always invokes unittest, even + if no test suite is supplied. + ------ 18.3.2 ------ From cab9d9c40afac011cc7e12989dc387094a4f1285 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 21:04:06 -0400 Subject: [PATCH 5215/8469] Bumped to 18.4 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2247dd7979..53988038d1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.3.3" +DEFAULT_VERSION = "18.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 79dd2dabcd..0cf7321a05 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.3.3' +__version__ = '18.4' From 23391cf15730456b0e9aad8140cf26f699ecab76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 21:04:08 -0400 Subject: [PATCH 5216/8469] Added tag 18.4 for changeset 6203335278be --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c72034f40b..d7ea9e2e30 100644 --- a/.hgtags +++ b/.hgtags @@ -221,3 +221,4 @@ c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 7a705b610abb1177ca169311c4ee261f3e4f0957 18.3.1 1e120f04bcaa2421c4df0eb6678c3019ba4a82f6 18.3.2 +6203335278be7543d31790d9fba55739469a4c6c 18.4 From 513c0d0f73951677f006cb43fcbc2127154ccbe7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Oct 2015 21:05:24 -0400 Subject: [PATCH 5217/8469] Bumped to 18.5 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 53988038d1..50e0dfc69a 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.4" +DEFAULT_VERSION = "18.5" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 0cf7321a05..1be1f7ec20 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.4' +__version__ = '18.5' From d1b750124e38d63b26a96e8c0921c02de3b0869d Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 19 Oct 2015 10:56:35 +0100 Subject: [PATCH 5218/8469] Corrected instructions for running tests. The package name from pypi is `pytest`, and running raw `py.test` results in errors. --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 27c304e5cf..87ddf28fb5 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -94,7 +94,7 @@ The primary tests are run using py.test. To run the tests:: $ python setup.py ptr -Or install py.test into your environment and run ``py.test``. +Or install ``pytest`` into your environment and run ``py.test setuptools``. Under continuous integration, additional tests may be run. See the ``.travis.yml`` file for full details on the tests run under Travis-CI. From bfc525457225a7c0a45553d0fcf29592230e9855 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 19 Oct 2015 12:06:08 +0100 Subject: [PATCH 5219/8469] Added test utility for building files quickly. And made use of it in test_egg_info. --- setuptools/tests/files.py | 32 +++++++++++++++++++++++++++++++ setuptools/tests/test_egg_info.py | 23 +++++++++++----------- 2 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 setuptools/tests/files.py diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py new file mode 100644 index 0000000000..4364241baa --- /dev/null +++ b/setuptools/tests/files.py @@ -0,0 +1,32 @@ +import os + + +def build_files(file_defs, prefix=""): + """ + Build a set of files/directories, as described by the file_defs dictionary. + + Each key/value pair in the dictionary is interpreted as a filename/contents + pair. If the contents value is a dictionary, a directory is created, and the + dictionary interpreted as the files within it, recursively. + + For example: + + {"README.txt": "A README file", + "foo": { + "__init__.py": "", + "bar": { + "__init__.py": "", + }, + "baz.py": "# Some code", + } + } + """ + for name, contents in file_defs.items(): + full_name = os.path.join(prefix, name) + if isinstance(contents, dict): + if not os.path.exists(full_name): + os.makedirs(full_name) + build_files(contents, prefix=full_name) + else: + with open(full_name, 'w') as f: + f.write(contents) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a1caf9fd30..8d831107e8 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -4,6 +4,7 @@ import pytest from . import environment +from .files import build_files from .textwrap import DALS from . import contexts @@ -22,14 +23,13 @@ class TestEggInfo: """) def _create_project(self): - with open('setup.py', 'w') as f: - f.write(self.setup_script) - - with open('hello.py', 'w') as f: - f.write(DALS(""" + build_files({ + 'setup.py': self.setup_script, + 'hello.py': DALS(""" def run(): print('hello') - """)) + """) + }) @pytest.yield_fixture def env(self): @@ -44,13 +44,14 @@ class Environment(str): pass for dirname in subs ) list(map(os.mkdir, env.paths.values())) - config = os.path.join(env.paths['home'], '.pydistutils.cfg') - with open(config, 'w') as f: - f.write(DALS(""" + build_files({ + env.paths['home']: { + '.pydistutils.cfg': DALS(""" [egg_info] egg-base = %(egg-base)s - """ % env.paths - )) + """ % env.paths) + } + }) yield env def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): From 0b9fa15f89c18733d3b17d147a64a72134e0d8a3 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 19 Oct 2015 11:49:29 +0100 Subject: [PATCH 5220/8469] Pulled out some test code for re-use. --- setuptools/tests/test_egg_info.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 8d831107e8..4977ea014c 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -57,6 +57,20 @@ class Environment(str): pass def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() + self._run_install_command(tmpdir_cwd, env) + actual = self._find_egg_info_files(env.paths['lib']) + + expected = [ + 'PKG-INFO', + 'SOURCES.txt', + 'dependency_links.txt', + 'entry_points.txt', + 'not-zip-safe', + 'top_level.txt', + ] + assert sorted(actual) == expected + + def _run_install_command(self, tmpdir_cwd, env): environ = os.environ.copy().update( HOME=env.paths['home'], ) @@ -76,18 +90,6 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): if code: raise AssertionError(data) - actual = self._find_egg_info_files(env.paths['lib']) - - expected = [ - 'PKG-INFO', - 'SOURCES.txt', - 'dependency_links.txt', - 'entry_points.txt', - 'not-zip-safe', - 'top_level.txt', - ] - assert sorted(actual) == expected - def _find_egg_info_files(self, root): results = ( filenames From a9c3739984908d8ed9e902e3a6efe21f031c2908 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 19 Oct 2015 12:04:26 +0100 Subject: [PATCH 5221/8469] Added test to ensure that egg_info applies MANIFEST.in The 'self.read_template()' line of manifest_maker was previously uncovered by any test, and the test suite passed if you commented it out. --- setuptools/tests/test_egg_info.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4977ea014c..8281fdc1a4 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -58,7 +58,7 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() self._run_install_command(tmpdir_cwd, env) - actual = self._find_egg_info_files(env.paths['lib']) + _, actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', @@ -70,6 +70,21 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): ] assert sorted(actual) == expected + def test_manifest_template_is_read(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'MANIFEST.in': DALS(""" + recursive-include docs *.rst + """), + 'docs': { + 'usage.rst': "Run 'hi'", + } + }) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir, _ = self._find_egg_info_files(env.paths['lib']) + sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') + assert 'docs/usage.rst' in open(sources_txt).read().split('\n') + def _run_install_command(self, tmpdir_cwd, env): environ = os.environ.copy().update( HOME=env.paths['home'], @@ -92,7 +107,7 @@ def _run_install_command(self, tmpdir_cwd, env): def _find_egg_info_files(self, root): results = ( - filenames + (dirpath, filenames) for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) From ae6c73f07680da77345f5ccfac4facde30ad4d7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Oct 2015 16:57:13 -0400 Subject: [PATCH 5222/8469] Dropping support for Python 3.2 and earlier Python 3 versions. Currently only log a warning, but future versions will fail. --- .travis.yml | 1 - CHANGES.txt | 8 ++++++++ pkg_resources/__init__.py | 7 +++++++ setup.py | 2 -- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45cace4be1..0097ab8955 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: python python: - 2.6 - 2.7 - - 3.2 - 3.3 - 3.4 - pypy diff --git a/CHANGES.txt b/CHANGES.txt index d20077535e..6c7239d1a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +18.5 +---- + +* In preparation for dropping support for Python 3.2, a warning is + now logged when pkg_resources is imported on Python 3.2 or earlier + Python 3 versions. + ---- 18.4 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ce8f2e98ec..ae36375506 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -95,6 +95,13 @@ import packaging.specifiers +if (3, 0) < sys.version_info < (3, 3): + msg = ( + "Support for Python 3.0-3.2 has been dropped. Future versions " + "will fail here." + ) + warnings.warn(msg) + # declare some globals that will be defined later to # satisfy the linters. require = None diff --git a/setup.py b/setup.py index 2b367a6dda..6226111d41 100755 --- a/setup.py +++ b/setup.py @@ -140,8 +140,6 @@ def _gen_console_scripts(): Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.1 - Programming Language :: Python :: 3.2 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 From 03cc3be9da0f1d31a3e4f2272d3ebb28ed761b35 Mon Sep 17 00:00:00 2001 From: Dweep Shah Date: Mon, 26 Oct 2015 16:45:04 -0400 Subject: [PATCH 5223/8469] Unload all pkg_resources modules and not just the main module. Fixes #453. --- ez_setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 50e0dfc69a..bbfe0544c4 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -125,7 +125,12 @@ def _do_download(version, download_base, to_dir, download_delay): # Remove previously-imported pkg_resources if present (see # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: - del sys.modules['pkg_resources'] + del_modules = [ + name for name in sys.modules + if name.startswith('pkg_resources') + ] + for mod_name in del_modules: + del sys.modules[mod_name] import setuptools setuptools.bootstrap_install_from = egg From dca452f0ed773557f5a5013cd77f76edfcbbb74e Mon Sep 17 00:00:00 2001 From: Dweep Shah Date: Tue, 27 Oct 2015 16:35:06 -0400 Subject: [PATCH 5224/8469] Uses an existing method to delete pkg_resources --- ez_setup.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bbfe0544c4..a197715527 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -125,12 +125,7 @@ def _do_download(version, download_base, to_dir, download_delay): # Remove previously-imported pkg_resources if present (see # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: - del_modules = [ - name for name in sys.modules - if name.startswith('pkg_resources') - ] - for mod_name in del_modules: - del sys.modules[mod_name] + _unload_pkg_resources() import setuptools setuptools.bootstrap_install_from = egg From 57ebfa41e0f96b97e599ecd931b7ae8a143e096e Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Sun, 1 Nov 2015 12:35:38 +0300 Subject: [PATCH 5225/8469] Fix "dictionary changed size during iteration" env is being modified at the same time as being iterated which leads to RuntimeError: dictionary changed size during iteration. --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ae36375506..df662dfe4d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1536,7 +1536,7 @@ def _markerlib_evaluate(cls, text): # markerlib implements Metadata 1.2 (PEP 345) environment markers. # Translate the variables to Metadata 2.0 (PEP 426). env = _markerlib.default_environment() - for key in env.keys(): + for key in tuple(env.keys()): new_key = key.replace('.', '_') env[new_key] = env.pop(key) try: From 2e236152228a7d2aec383fcecd70731f96ad4de3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Nov 2015 12:07:00 -0500 Subject: [PATCH 5226/8469] Extract a a method to encapsulate behavior and documentation. Rewrite for loop as legacy-style dictionary comprehension. --- pkg_resources/__init__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index df662dfe4d..fb8704fdf9 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1525,6 +1525,17 @@ def evaluate_marker(cls, text, extra=None): """ return cls.interpret(parser.expr(text).totuple(1)[1]) + @staticmethod + def _translate_metadata2(env): + """ + Markerlib implements Metadata 1.2 (PEP 345) environment markers. + Translate the variables to Metadata 2.0 (PEP 426). + """ + return dict( + (key.replace('.', '_'), value) + for key, value in env + ) + @classmethod def _markerlib_evaluate(cls, text): """ @@ -1533,12 +1544,8 @@ def _markerlib_evaluate(cls, text): Raise SyntaxError if marker is invalid. """ import _markerlib - # markerlib implements Metadata 1.2 (PEP 345) environment markers. - # Translate the variables to Metadata 2.0 (PEP 426). - env = _markerlib.default_environment() - for key in tuple(env.keys()): - new_key = key.replace('.', '_') - env[new_key] = env.pop(key) + + env = cls._translate_metadata2(_markerlib.default_environment()) try: result = _markerlib.interpret(text, env) except NameError as e: From d76ce5c06cb8c290e8f2cc803c85ae97543a3de2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Nov 2015 19:19:01 -0500 Subject: [PATCH 5227/8469] Update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6c7239d1a2..bd05b8bd18 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,10 @@ CHANGES * In preparation for dropping support for Python 3.2, a warning is now logged when pkg_resources is imported on Python 3.2 or earlier Python 3 versions. +* `Add support for python_platform_implementation environment marker + `_. +* `Fix dictionary mutation during iteration + `_. ---- 18.4 From 260c08f4bacf1d2e0833f30522f5b55c7440ec7a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Nov 2015 19:19:41 -0500 Subject: [PATCH 5228/8469] Added tag 18.5 for changeset 31dc6d2ac0f5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d7ea9e2e30..5729d664e1 100644 --- a/.hgtags +++ b/.hgtags @@ -222,3 +222,4 @@ b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 7a705b610abb1177ca169311c4ee261f3e4f0957 18.3.1 1e120f04bcaa2421c4df0eb6678c3019ba4a82f6 18.3.2 6203335278be7543d31790d9fba55739469a4c6c 18.4 +31dc6d2ac0f5ab766652602fe6ca716fff7180e7 18.5 From 2ac80cd8a4ab5d9398c51fbfcc71489141f4f1c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Nov 2015 19:21:10 -0500 Subject: [PATCH 5229/8469] Bumped to 18.6 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 50e0dfc69a..c41c10e9cd 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.5" +DEFAULT_VERSION = "18.6" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 1be1f7ec20..74e48b047d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.5' +__version__ = '18.6' From f06fb88362616b452cf6da3de78eb18a759526a5 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 2 Nov 2015 03:37:02 +0000 Subject: [PATCH 5230/8469] Issue #25523: Correct "a" article to "an" article This changes the main documentation, doc strings, source code comments, and a couple error messages in the test suite. In some cases the word was removed or edited some other way to fix the grammar. --- cygwinccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index d28b1b368a..c879646c0f 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -10,9 +10,9 @@ # # * if you use a msvc compiled python version (1.5.2) # 1. you have to insert a __GNUC__ section in its config.h -# 2. you have to generate a import library for its dll +# 2. you have to generate an import library for its dll # - create a def-file for python??.dll -# - create a import library using +# - create an import library using # dlltool --dllname python15.dll --def python15.def \ # --output-lib libpython15.a # @@ -318,7 +318,7 @@ def __init__(self, verbose=0, dry_run=0, force=0): self.dll_libraries = get_msvcr() # Because these compilers aren't configured in Python's pyconfig.h file by -# default, we should at least warn the user if he is using a unmodified +# default, we should at least warn the user if he is using an unmodified # version. CONFIG_H_OK = "ok" From 5b72c2587563f6190db732cb5b49e1868fa546e2 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Thu, 5 Nov 2015 11:37:38 +1300 Subject: [PATCH 5231/8469] Fix EBNF for package specifications. --- docs/pkg_resources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 6c6405a82e..3d40a1a242 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -592,7 +592,7 @@ Requirements Parsing The syntax of a requirement specifier can be defined in EBNF as follows:: - requirement ::= project_name versionspec? extras? + requirement ::= project_name extras? versionspec? versionspec ::= comparison version (',' comparison version)* comparison ::= '<' | '<=' | '!=' | '==' | '>=' | '>' | '~=' | '===' extras ::= '[' extralist? ']' From 1b3e7be2deb5caf890dc7a53896357e4b938979e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 12 Nov 2015 13:15:41 +0200 Subject: [PATCH 5232/8469] Restore old distutils logging threshold after running test_log. --- tests/test_log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_log.py b/tests/test_log.py index ce66ee51e7..0c2ad7a426 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -14,8 +14,8 @@ def test_non_ascii(self): # error handler) old_stdout = sys.stdout old_stderr = sys.stderr + old_threshold = log.set_threshold(log.DEBUG) try: - log.set_threshold(log.DEBUG) with NamedTemporaryFile(mode="w+", encoding='ascii') as stdout, \ NamedTemporaryFile(mode="w+", encoding='ascii') as stderr: sys.stdout = stdout @@ -27,6 +27,7 @@ def test_non_ascii(self): stderr.seek(0) self.assertEqual(stderr.read().rstrip(), "fatal:\\xe9") finally: + log.set_threshold(old_threshold) sys.stdout = old_stdout sys.stderr = old_stderr From 4e0ac6d444c79d2858a6d3cb8b7b523ccf3f54e3 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 12 Nov 2015 19:46:23 +0200 Subject: [PATCH 5233/8469] Issue #25607: Restore old distutils logging threshold after running tests that parse command line arguments. --- tests/test_core.py | 2 ++ tests/test_dist.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/test_core.py b/tests/test_core.py index 41321f7db4..654227ca18 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -9,6 +9,7 @@ from test.support import captured_stdout, run_unittest import unittest from distutils.tests import support +from distutils import log # setup script that uses __file__ setup_using___file__ = """\ @@ -36,6 +37,7 @@ def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() self.old_argv = sys.argv, sys.argv[:] + self.addCleanup(log.set_threshold, log._global_log.threshold) def tearDown(self): sys.stdout = self.old_stdout diff --git a/tests/test_dist.py b/tests/test_dist.py index b7fd3fbf90..1f104cef67 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -13,6 +13,7 @@ from test.support import TESTFN, captured_stdout, run_unittest from distutils.tests import support +from distutils import log class test_dist(Command): @@ -405,6 +406,7 @@ def test_fix_help_options(self): def test_show_help(self): # smoke test, just makes sure some help is displayed + self.addCleanup(log.set_threshold, log._global_log.threshold) dist = Distribution() sys.argv = [] dist.help = 1 From a88effc90cdc99974ae65c008238566cdab4b98e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Nov 2015 10:42:48 -0500 Subject: [PATCH 5234/8469] Update docs to reflect preferred usage with latest pytest-runner. --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 27c304e5cf..b6f5bb9f97 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -92,7 +92,7 @@ Testing The primary tests are run using py.test. To run the tests:: - $ python setup.py ptr + $ python setup.py test Or install py.test into your environment and run ``py.test``. From b6a3ccf987ce2f8d13e1520563223bd76460744a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Nov 2015 19:16:09 -0500 Subject: [PATCH 5235/8469] Extract function for detecting unpacked egg. Ref #462. --- pkg_resources/__init__.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d09e0b6f9a..0c024f1b79 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1716,7 +1716,7 @@ def _setup_prefix(self): 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 @@ -2099,7 +2099,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 +2115,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 +2135,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 +2282,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() From 40436edb86b034979b716695ec68fe55bb656d79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 Nov 2015 19:18:37 -0500 Subject: [PATCH 5236/8469] Only detect a path as an unpacked egg if it also has an EGG-INFO directory. Fixes #462. --- CHANGES.txt | 7 +++++++ pkg_resources/__init__.py | 1 + 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index bd05b8bd18..60d43fb287 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +---- +18.6 +---- + +* Issue #462: Provide a more refined detection of unpacked egg + directories, avoiding detecting zc.recipe.egg wheel as an egg. + ---- 18.5 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0c024f1b79..8841ee6321 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2288,6 +2288,7 @@ def _is_unpacked_egg(path): """ return ( path.lower().endswith('.egg') + and os.path.isdir(os.path.join(path, 'EGG-INFO')) ) def _set_parent_ns(packageName): From f05162f5583979a3cc56492b91211cbe54353efa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 10:54:46 -0500 Subject: [PATCH 5237/8469] Short circuit on skipped behavior, leaving main behavior in the body of the method. --- setuptools/command/easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 45d180bb3c..4fae256058 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -760,9 +760,10 @@ def maybe_move(self, spec, dist_filename, setup_base): 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""" From 998ceceaeb3dfce1b2b05a82aaf356db54f46de6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:27:22 -0500 Subject: [PATCH 5238/8469] Back out 435b1b762fba. The change breaks detection of zip eggs. Reopens #462. --- CHANGES.txt | 7 ------- pkg_resources/__init__.py | 1 - 2 files changed, 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 60d43fb287..bd05b8bd18 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,13 +2,6 @@ CHANGES ======= ----- -18.6 ----- - -* Issue #462: Provide a more refined detection of unpacked egg - directories, avoiding detecting zc.recipe.egg wheel as an egg. - ---- 18.5 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 8841ee6321..0c024f1b79 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2288,7 +2288,6 @@ def _is_unpacked_egg(path): """ return ( path.lower().endswith('.egg') - and os.path.isdir(os.path.join(path, 'EGG-INFO')) ) def _set_parent_ns(packageName): From f4576e373b51fab07eec7f6f2cde3ffa2e04f6c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:32:45 -0500 Subject: [PATCH 5239/8469] Add VersionlessRequirement adapter to suppress the version number in a Distribution. Ref #439. --- setuptools/command/develop.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 368b64fed7..0959d9378c 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -167,3 +167,26 @@ def install_egg_scripts(self, dist): script_text = f.read() f.close() self.install_script(dist, script_name, script_text, script_path) + + +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 From c23be8f034d8600191decd7e843ae93619d15298 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:35:27 -0500 Subject: [PATCH 5240/8469] Adapt the dist to suppress the version in the requirement when installing scripts under the develop command. Fixes #439. --- setuptools/command/develop.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 0959d9378c..360872fce3 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -168,6 +168,10 @@ def install_egg_scripts(self, dist): f.close() self.install_script(dist, script_name, script_text, script_path) + def install_wrapper_scripts(self, dist): + dist = VersionlessRequirement(dist) + return super(develop, self).install_wrapper_scripts(dist) + class VersionlessRequirement(object): """ From de6c530852988f412f7e546a5a60f02b6a2e06e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:36:46 -0500 Subject: [PATCH 5241/8469] Update changelog; ref #439. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index bd05b8bd18..c4b456f6d3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +---- +18.6 +---- + +* Issue #439: When installing entry_point scripts under development, + omit the version number of the package, allowing any version of the + package to be used. + ---- 18.5 ---- From 6e6872addad422b164c7a9a0e8711a7264978c58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:43:58 -0500 Subject: [PATCH 5242/8469] Added tag 18.6 for changeset dfe190b09908 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5729d664e1..d95f31dde4 100644 --- a/.hgtags +++ b/.hgtags @@ -223,3 +223,4 @@ b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 1e120f04bcaa2421c4df0eb6678c3019ba4a82f6 18.3.2 6203335278be7543d31790d9fba55739469a4c6c 18.4 31dc6d2ac0f5ab766652602fe6ca716fff7180e7 18.5 +dfe190b09908f6b953209d13573063809de451b8 18.6 From 172bd064abe5a973f38ab9641a80b39782ad2cde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:46:14 -0500 Subject: [PATCH 5243/8469] Bumped to 18.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index c41c10e9cd..20d80e8ef1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.6" +DEFAULT_VERSION = "18.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 74e48b047d..f6dc6bf473 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.6' +__version__ = '18.7' From f34cf8e9242d2b4c25b5a511f9f74fbffcb17c4f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 11:58:35 -0500 Subject: [PATCH 5244/8469] Suppress testing of upload-releases-as-zip script --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 91d64bb800..351942f439 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py norecursedirs=dist build *.egg From e311cafb5305a445def27fbc79fdc5f098c76728 Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Tue, 24 Nov 2015 13:46:26 -0500 Subject: [PATCH 5245/8469] issue #464: don't crash using super() on a old-style class --- setuptools/command/develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 360872fce3..5ae25d71c4 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -170,7 +170,7 @@ def install_egg_scripts(self, dist): def install_wrapper_scripts(self, dist): dist = VersionlessRequirement(dist) - return super(develop, self).install_wrapper_scripts(dist) + return easy_install.install_wrapper_scripts(self, dist) class VersionlessRequirement(object): From ea6c487fbfe70032a1dddb0b4501e66420eefeb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 18:51:29 -0500 Subject: [PATCH 5246/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c4b456f6d3..b14e910359 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= + +------ +18.6.1 +------ + +* Issue #464: Correct regression in invocation of superclass on old-style + class on Python 2. + ---- 18.6 ---- From a84f4878c07509a79af863cabf29ce4de6f212c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 18:52:20 -0500 Subject: [PATCH 5247/8469] Bumped to 18.6.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 20d80e8ef1..06918e1b89 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.7" +DEFAULT_VERSION = "18.6.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index f6dc6bf473..9f17b0ab3e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.7' +__version__ = '18.6.1' From ceaafa112be304add1353435599df514dbcbe9ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 18:52:22 -0500 Subject: [PATCH 5248/8469] Added tag 18.6.1 for changeset 804f87045a90 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d95f31dde4..6ed522b450 100644 --- a/.hgtags +++ b/.hgtags @@ -224,3 +224,4 @@ b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 6203335278be7543d31790d9fba55739469a4c6c 18.4 31dc6d2ac0f5ab766652602fe6ca716fff7180e7 18.5 dfe190b09908f6b953209d13573063809de451b8 18.6 +804f87045a901f1dc121cf9149143d654228dc13 18.6.1 From cf39578632c13d49866fe924bf4c5f5ba48db554 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 18:54:16 -0500 Subject: [PATCH 5249/8469] Bumped to 18.6.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 06918e1b89..4740248f70 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.6.1" +DEFAULT_VERSION = "18.6.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 9f17b0ab3e..86ad21c692 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.6.1' +__version__ = '18.6.2' From 3bcf6213d25381d9df9baa2b7a16c9449fbf78e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 18:55:48 -0500 Subject: [PATCH 5250/8469] Use context manager for opening file --- setuptools/tests/test_develop.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ed1b194a78..b920655d51 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -32,15 +32,13 @@ def setup_method(self, method): os.mkdir(os.path.join(self.dir, 'foo')) # setup.py setup = os.path.join(self.dir, 'setup.py') - f = open(setup, 'w') - f.write(SETUP_PY) - f.close() + with open(setup, 'w') as f: + f.write(SETUP_PY) self.old_cwd = os.getcwd() # foo/__init__.py init = os.path.join(self.dir, 'foo', '__init__.py') - f = open(init, 'w') - f.write(INIT_PY) - f.close() + with open(init, 'w') as f: + f.write(INIT_PY) os.chdir(self.dir) self.old_base = site.USER_BASE From bc7f3b0a36a1c676809f89eae7299afbb7f70f32 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:32:13 -0500 Subject: [PATCH 5251/8469] Extract setup/teardown methods as proper fixtures. --- setuptools/tests/test_develop.py | 57 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index b920655d51..96b9f4ef4f 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -6,8 +6,12 @@ import sys import tempfile +import pytest + from setuptools.command.develop import develop from setuptools.dist import Distribution +from . import contexts + SETUP_PY = """\ from setuptools import setup @@ -21,43 +25,42 @@ INIT_PY = """print "foo" """ +@pytest.yield_fixture +def temp_user(monkeypatch): + with contexts.tempdir() as user_base: + with contexts.tempdir() as user_site: + monkeypatch.setattr('site.USER_BASE', user_base) + monkeypatch.setattr('site.USER_SITE', user_site) + yield + + +@pytest.yield_fixture +def test_env(tmpdir, temp_user): + target = tmpdir + foo = target.mkdir('foo') + setup = target / 'setup.py' + if setup.isfile(): + raise ValueError(dir(target)) + with setup.open('w') as f: + f.write(SETUP_PY) + init = foo / '__init__.py' + with init.open('w') as f: + f.write(INIT_PY) + with target.as_cwd(): + yield target + + class TestDevelopTest: def setup_method(self, method): if hasattr(sys, 'real_prefix'): return - # Directory structure - self.dir = tempfile.mkdtemp() - os.mkdir(os.path.join(self.dir, 'foo')) - # setup.py - setup = os.path.join(self.dir, 'setup.py') - with open(setup, 'w') as f: - f.write(SETUP_PY) - self.old_cwd = os.getcwd() - # foo/__init__.py - init = os.path.join(self.dir, 'foo', '__init__.py') - with open(init, 'w') as f: - f.write(INIT_PY) - - os.chdir(self.dir) - self.old_base = site.USER_BASE - site.USER_BASE = tempfile.mkdtemp() - self.old_site = site.USER_SITE - site.USER_SITE = tempfile.mkdtemp() - def teardown_method(self, method): if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix): return - os.chdir(self.old_cwd) - shutil.rmtree(self.dir) - shutil.rmtree(site.USER_BASE) - shutil.rmtree(site.USER_SITE) - site.USER_BASE = self.old_base - site.USER_SITE = self.old_site - - def test_develop(self): + def test_develop(self, test_env): if hasattr(sys, 'real_prefix'): return dist = Distribution( From 448cfc53cd16fb11562def2ee8b9bf66ed178b21 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:37:11 -0500 Subject: [PATCH 5252/8469] Replace silent test acceptance with a proper skip check --- setuptools/tests/test_develop.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 96b9f4ef4f..2baf83bbad 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -51,18 +51,9 @@ def test_env(tmpdir, temp_user): class TestDevelopTest: - - def setup_method(self, method): - if hasattr(sys, 'real_prefix'): - return - - def teardown_method(self, method): - if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix): - return - + @pytest.mark.skipif(hasattr(sys, 'real_prefix'), + reason="Cannot run when invoked in a virtualenv") def test_develop(self, test_env): - if hasattr(sys, 'real_prefix'): - return dist = Distribution( dict(name='foo', packages=['foo'], From e1e3570fb01aa4f1fe6d0e56cfb73d38b781a307 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:38:13 -0500 Subject: [PATCH 5253/8469] Extract variable --- setuptools/tests/test_develop.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 2baf83bbad..49e007e677 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -54,12 +54,13 @@ class TestDevelopTest: @pytest.mark.skipif(hasattr(sys, 'real_prefix'), reason="Cannot run when invoked in a virtualenv") def test_develop(self, test_env): - dist = Distribution( - dict(name='foo', - packages=['foo'], - use_2to3=True, - version='0.0', - )) + settings = dict( + name='foo', + packages=['foo'], + use_2to3=True, + version='0.0', + ) + dist = Distribution(settings) dist.script_name = 'setup.py' cmd = develop(dist) cmd.user = 1 From 731c83fd5ebe79a7643465e68310c11387b427e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:41:32 -0500 Subject: [PATCH 5254/8469] Remove unused imports --- setuptools/tests/test_develop.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 49e007e677..962c4f3cf9 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -1,10 +1,8 @@ """develop tests """ import os -import shutil import site import sys -import tempfile import pytest From 693f20d40fca6b41ac629665901c350cd3dcd4e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:45:12 -0500 Subject: [PATCH 5255/8469] Use quiet context to suppress stdout. --- setuptools/tests/test_develop.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 962c4f3cf9..f0adcb187c 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -65,12 +65,8 @@ def test_develop(self, test_env): cmd.ensure_finalized() cmd.install_dir = site.USER_SITE cmd.user = 1 - old_stdout = sys.stdout - #sys.stdout = StringIO() - try: + with contexts.quiet(): cmd.run() - finally: - sys.stdout = old_stdout # let's see if we got our egg link at the right place content = os.listdir(site.USER_SITE) From 0861296a63b3fafd059759840fb62ba12d4e6adc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 19:47:58 -0500 Subject: [PATCH 5256/8469] Use io.open and its context for simpler reading of a file --- setuptools/tests/test_develop.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index f0adcb187c..ec6554629c 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -3,6 +3,7 @@ import os import site import sys +import io import pytest @@ -74,16 +75,12 @@ def test_develop(self, test_env): assert content == ['easy-install.pth', 'foo.egg-link'] # Check that we are using the right code. - egg_link_file = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt') - try: + fn = os.path.join(site.USER_SITE, 'foo.egg-link') + with io.open(fn) as egg_link_file: path = egg_link_file.read().split()[0].strip() - finally: - egg_link_file.close() - init_file = open(os.path.join(path, 'foo', '__init__.py'), 'rt') - try: + fn = os.path.join(path, 'foo', '__init__.py') + with io.open(fn) as init_file: init = init_file.read().strip() - finally: - init_file.close() if sys.version < "3": assert init == 'print "foo"' else: From 951a3b9df51c1c46a39753dc6f2854ea18f45729 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 20:01:32 -0500 Subject: [PATCH 5257/8469] Use if clause. --- setuptools/tests/test_develop.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ec6554629c..35f3ea256d 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -10,6 +10,7 @@ from setuptools.command.develop import develop from setuptools.dist import Distribution from . import contexts +from setuptools.compat import PY3 SETUP_PY = """\ @@ -81,7 +82,6 @@ def test_develop(self, test_env): fn = os.path.join(path, 'foo', '__init__.py') with io.open(fn) as init_file: init = init_file.read().strip() - if sys.version < "3": - assert init == 'print "foo"' - else: - assert init == 'print("foo")' + + expected = 'print("foo")' if PY3 else 'print "foo"' + assert init == expected From 436be23a0ac5d7f21f261bdcd6fd9119a4f55346 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 20:38:52 -0500 Subject: [PATCH 5258/8469] Rename tests for clarity --- setuptools/tests/test_develop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 35f3ea256d..725c4ce211 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -50,10 +50,10 @@ def test_env(tmpdir, temp_user): yield target -class TestDevelopTest: +class TestDevelop: @pytest.mark.skipif(hasattr(sys, 'real_prefix'), reason="Cannot run when invoked in a virtualenv") - def test_develop(self, test_env): + def test_2to3_user_mode(self, test_env): settings = dict( name='foo', packages=['foo'], From 7bd76e0869310de9da5a32ca2c860f6a1fa461b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Nov 2015 21:21:09 -0500 Subject: [PATCH 5259/8469] Draft a test for testing the new expectation for develop command (and general functionality when console scripts are present). --- setuptools/tests/test_develop.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 725c4ce211..71f0d69aa0 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -85,3 +85,28 @@ def test_2to3_user_mode(self, test_env): expected = 'print("foo")' if PY3 else 'print "foo"' assert init == expected + + def test_console_scripts(self, tmpdir): + """ + Test that console scripts are installed and that they reference + only the project by name and not the current version. + """ + pytest.skip("TODO: needs a fixture to cause 'develop' " + "to be invoked without mutating environment.") + settings = dict( + name='foo', + packages=['foo'], + version='0.0', + entry_points={ + 'console_scripts': [ + 'foocmd = foo:foo', + ], + }, + ) + dist = Distribution(settings) + dist.script_name = 'setup.py' + cmd = develop(dist) + cmd.ensure_finalized() + cmd.install_dir = tmpdir + cmd.run() + #assert '0.0' not in foocmd_text From adc0d911143caf6a174fed7b71b75249404d5eff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Nov 2015 09:43:50 -0500 Subject: [PATCH 5260/8469] No need for a separate DEVGUIDE --- DEVGUIDE.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 DEVGUIDE.txt diff --git a/DEVGUIDE.txt b/DEVGUIDE.txt deleted file mode 100644 index 066a3a6bfb..0000000000 --- a/DEVGUIDE.txt +++ /dev/null @@ -1 +0,0 @@ -The canonical development guide can be found in docs/developer-guide.txt. From 75a571e4d9d5f5c3fde661c54a368b533be1978b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Nov 2015 10:04:33 -0500 Subject: [PATCH 5261/8469] Skip the test when running under venv also --- setuptools/tests/test_develop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 71f0d69aa0..ab5da00e87 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -51,8 +51,10 @@ def test_env(tmpdir, temp_user): class TestDevelop: - @pytest.mark.skipif(hasattr(sys, 'real_prefix'), - reason="Cannot run when invoked in a virtualenv") + in_virtualenv = hasattr(sys, 'real_prefix') + in_venv = hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix + @pytest.mark.skipif(in_virtualenv or in_venv, + reason="Cannot run when invoked in a virtualenv or venv") def test_2to3_user_mode(self, test_env): settings = dict( name='foo', From 63c3e2e1ba805f64ad251a90c1182bdd06e28a12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Nov 2015 10:44:07 -0500 Subject: [PATCH 5262/8469] Update tox tests so they run the full suite of tests using the canonical technique. Include .tox in norecursedirs to avoid testing all the dependencies and environment. Update docs to reflect findings (https://bitbucket.org/spookylukey/setuptools/commits/88339d2e4af661a60a42bc14c4ff3e68cd19fa21#comment-2558164). --- docs/developer-guide.txt | 3 ++- tox.ini | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index b6f5bb9f97..ae33649b59 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -94,7 +94,8 @@ The primary tests are run using py.test. To run the tests:: $ python setup.py test -Or install py.test into your environment and run ``py.test``. +Or install py.test into your environment and run ``PYTHONPATH=. py.test`` +or ``python -m pytest``. Under continuous integration, additional tests may be run. See the ``.travis.yml`` file for full details on the tests run under Travis-CI. diff --git a/tox.ini b/tox.ini index 7aeffdd8a9..9061869fd2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,5 @@ [tox] envlist = py26,py27,py31,py32,py33,py34 + [testenv] -deps= - pytest - mock -commands=py.test setuptools {posargs} +commands=python setup.py test From 9186dd6e15a7f7102ec4d3bf0f9c660ea6c7f082 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 12:43:20 -0500 Subject: [PATCH 5263/8469] Add a bit more detail about the setup script and what to expect. Fixes #466. --- docs/setuptools.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e2753cba50..d6a62de865 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -112,10 +112,16 @@ the distutils. Here's a minimal setup script using setuptools:: ) As you can see, it doesn't take much to use setuptools in a project. -Just by doing the above, this project will be able to produce eggs, upload to +Run that script in your project folder, alongside the Python packages +you have developed. + +Invoke that script to produce eggs, upload to PyPI, and automatically include all packages in the directory where the setup.py lives. See the `Command Reference`_ section below to see what -commands you can give to this setup script. +commands you can give to this setup script. For example, +to produce a source distribution, simply invoke:: + + python setup.py sdist Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your From 08edac82f02e771ff82f01938208def8ef9991b0 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 13 Nov 2015 07:02:56 +1100 Subject: [PATCH 5264/8469] Fix docstring started with """" instead of """ --- setuptools/py31compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index c487ac0439..8fe6dd9d70 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -20,7 +20,7 @@ def get_path(name): 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. From 03e7e8c23889bcac55d2cb563ad8deb172e77210 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Sun, 15 Nov 2015 22:30:46 -0500 Subject: [PATCH 5265/8469] Add tests ref #419. --- setuptools/tests/test_egg_info.py | 96 +++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a1caf9fd30..b4195e06e6 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,9 +6,14 @@ from . import environment from .textwrap import DALS from . import contexts +from pkg_resources import WorkingSet, Requirement -class TestEggInfo: +class Environment(str): + pass + + +class TestEggInfo(object): setup_script = DALS(""" from setuptools import setup @@ -33,8 +38,6 @@ def run(): @pytest.yield_fixture def env(self): - class Environment(str): pass - with contexts.tempdir(prefix='setuptools-test.') as env_dir: env = Environment(env_dir) os.chmod(env_dir, stat.S_IRWXU) @@ -49,8 +52,7 @@ class Environment(str): pass f.write(DALS(""" [egg_info] egg-base = %(egg-base)s - """ % env.paths - )) + """ % env.paths)) yield env def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): @@ -96,3 +98,87 @@ def _find_egg_info_files(self, root): # expect exactly one result result, = results return result + + +class TestEggInfoDistutils(object): + + version = '1.11.0.dev0+2329eae' + setup_script = DALS(""" + from distutils.core import setup + + setup( + name='foo', + py_modules=['hello'], + version='%s', + ) + """) + + def _create_project(self): + with open('setup.py', 'w') as f: + f.write(self.setup_script % self.version) + + with open('hello.py', 'w') as f: + f.write(DALS(""" + def run(): + print('hello') + """)) + + @pytest.yield_fixture + def env(self): + with contexts.tempdir(prefix='setuptools-test.') as env_dir: + env = Environment(env_dir) + os.chmod(env_dir, stat.S_IRWXU) + subs = 'home', 'lib', 'scripts', 'data', 'egg-base' + env.paths = dict( + (dirname, os.path.join(env_dir, dirname)) + for dirname in subs + ) + list(map(os.mkdir, env.paths.values())) + config = os.path.join(env.paths['home'], '.pydistutils.cfg') + with open(config, 'w') as f: + f.write(DALS(""" + [egg_info] + egg-base = %(egg-base)s + """ % env.paths)) + yield env + + def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): + self._create_project() + + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + cmd = [ + 'install', + '--home', env.paths['home'], + '--install-lib', env.paths['lib'], + '--install-scripts', env.paths['scripts'], + '--install-data', env.paths['data'], + ] + code, data = environment.run_setup_py( + cmd=cmd, + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + if code: + raise AssertionError(data) + + actual = self._find_egg_info_file(env.paths['lib']) + # On Py3k it can be e.g. foo-1.11.0.dev0_2329eae-py3.4.egg-info + # but 2.7 doesn't add the Python version, so to be expedient we + # just check our start and end, omitting the potential version num + assert actual.startswith('foo-' + self.version.replace('+', '_')) + assert actual.endswith('.egg-info') + # this requirement parsing will raise a VersionConflict unless the + # .egg-info file is parsed (see #419 on BitBucket) + req = Requirement.parse('foo>=1.9') + dist = WorkingSet([env.paths['lib']]).find(req) + assert dist.version == self.version + + def _find_egg_info_file(self, root): + # expect exactly one result + result = (filename for dirpath, dirnames, filenames in os.walk(root) + for filename in filenames if filename.endswith('.egg-info')) + result, = result + return result From 5681e303fca322007efd10a6004221795295414e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 16:53:27 -0500 Subject: [PATCH 5266/8469] Adding script from idg serpro. Ref #432. --- scripts/upload-old-releases-as-zip.py | 234 ++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 scripts/upload-old-releases-as-zip.py diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py new file mode 100644 index 0000000000..5349281911 --- /dev/null +++ b/scripts/upload-old-releases-as-zip.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import errno +import glob +import hashlib +import json +import os +import shutil +import tarfile +import tempfile +import urllib +import urllib2 + +from distutils.version import LooseVersion + +OK = '\033[92m' +FAIL = '\033[91m' +END = '\033[0m' +DISTRIBUTION = "setuptools" + + +class SetuptoolsOldReleasesWithoutZip(object): + """docstring for SetuptoolsOldReleases""" + + def __init__(self): + super(SetuptoolsOldReleasesWithoutZip, self).__init__() + self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) + print "Downloading %s releases..." % DISTRIBUTION + print "All releases will be downloaded to %s" % self.dirpath + self.data_json_setuptools = self.get_json_data(DISTRIBUTION) + self.valid_releases_numbers = sorted([ + release + for release in self.data_json_setuptools['releases'] + # This condition is motivated by 13.0 release, which + # comes as "13.0": [], in the json + if self.data_json_setuptools['releases'][release] + ], key=LooseVersion) + self.total_downloaded_ok = 0 + + def get_json_data(self, package_name): + """ + "releases": { + "0.7.2": [ + { + "has_sig": false, + "upload_time": "2013-06-09T16:10:00", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.2.tar.gz", # NOQA + "md5_digest": "de44cd90f8a1c713d6c2bff67bbca65d", + "downloads": 159014, + "filename": "setuptools-0.7.2.tar.gz", + "packagetype": "sdist", + "size": 633077 + } + ], + "0.7.3": [ + { + "has_sig": false, + "upload_time": "2013-06-18T21:08:56", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.3.tar.gz", # NOQA + "md5_digest": "c854adacbf9067d330a847f06f7a8eba", + "downloads": 30594, + "filename": "setuptools-0.7.3.tar.gz", + "packagetype": "sdist", + "size": 751152 + } + ], + "12.3": [ + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:51", + "comment_text": "", + "python_version": "3.4", + "url": "https://pypi.python.org/packages/3.4/s/setuptools/setuptools-12.3-py2.py3-none-any.whl", # NOQA + "md5_digest": "31f51a38497a70efadf5ce8d4c2211ab", + "downloads": 288451, + "filename": "setuptools-12.3-py2.py3-none-any.whl", + "packagetype": "bdist_wheel", + "size": 501904 + }, + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:43", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.tar.gz", # NOQA + "md5_digest": "67614b6d560fa4f240e99cd553ec7f32", + "downloads": 110109, + "filename": "setuptools-12.3.tar.gz", + "packagetype": "sdist", + "size": 635025 + }, + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:47", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip", # NOQA + "md5_digest": "abc799e7db6e7281535bf342bfc41a12", + "downloads": 67539, + "filename": "setuptools-12.3.zip", + "packagetype": "sdist", + "size": 678783 + } + ], + """ + url = "https://pypi.python.org/pypi/%s/json" % (package_name,) + data = json.load(urllib2.urlopen(urllib2.Request(url))) + + # Mainly for debug. + json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) + with open(json_filename, 'w') as outfile: + json.dump( + data, + outfile, + sort_keys=True, + indent=4, + separators=(',', ': '), + ) + + return data + + def get_setuptools_releases_without_zip_counterpart(self): + # Get set(all_valid_releases) - set(releases_with_zip), so now we have + # the releases without zip. + return set(self.valid_releases_numbers) - set([ + release + for release in self.valid_releases_numbers + for same_version_release_dict in self.data_json_setuptools['releases'][release] # NOQA + if 'zip' in same_version_release_dict['filename'] + ]) + + def download_setuptools_releases_without_zip_counterpart(self): + try: + releases_without_zip = self.get_setuptools_releases_without_zip_counterpart() # NOQA + failed_md5_releases = [] + # This is a "strange" loop, going through all releases and + # testing only the release I need to download, but I thought it + # would be mouch more readable than trying to iterate through + # releases I need and get into traverse hell values inside dicts + # inside dicts of the json to get the distribution's url to + # download. + for release in self.valid_releases_numbers: + if release in releases_without_zip: + for same_version_release_dict in self.data_json_setuptools['releases'][release]: # NOQA + if 'tar.gz' in same_version_release_dict['filename']: + print "Downloading %s..." % release + local_file = '%s/%s' % ( + self.dirpath, + same_version_release_dict["filename"] + ) + urllib.urlretrieve( + same_version_release_dict["url"], + local_file + ) + targz = open(local_file, 'rb').read() + hexdigest = hashlib.md5(targz).hexdigest() + if (hexdigest != same_version_release_dict['md5_digest']): # NOQA + print FAIL + "FAIL: md5 for %s didn't match!" % release + END # NOQA + failed_md5_releases.append(release) + else: + self.total_downloaded_ok += 1 + print 'Total releases without zip: %s' % len(releases_without_zip) + print 'Total downloaded: %s' % self.total_downloaded_ok + if failed_md5_releases: + raise(Exception( + FAIL + ( + "FAIL: these releases %s failed the md5 check!" % + ','.join(failed_md5_releases) + ) + END + )) + elif self.total_downloaded_ok != len(releases_without_zip): + raise(Exception( + FAIL + ( + "FAIL: Unknown error occured. Please check the logs." + ) + END + )) + else: + print OK + "All releases downloaded and md5 checked." + END + + except OSError as e: + if e.errno != errno.EEXIST: + raise e + + def convert_targz_to_zip(self): + print "Converting the tar.gz to zip..." + files = glob.glob('%s/*.tar.gz' % self.dirpath) + total_converted = 0 + for targz in sorted(files, key=LooseVersion): + # Extract and remove tar. + tar = tarfile.open(targz) + tar.extractall(path=self.dirpath) + tar.close() + os.remove(targz) + + # Zip the extracted tar. + setuptools_folder_path = targz.replace('.tar.gz', '') + setuptools_folder_name = setuptools_folder_path.split("/")[-1] + print setuptools_folder_name + shutil.make_archive( + setuptools_folder_path, + 'zip', + self.dirpath, + setuptools_folder_name + ) + # Exclude extracted tar folder. + shutil.rmtree(setuptools_folder_path.replace('.zip', '')) + total_converted += 1 + print 'Total converted: %s' % total_converted + if self.total_downloaded_ok != total_converted: + raise(Exception( + FAIL + ( + "FAIL: Total number of downloaded releases is different" + " from converted ones. Please check the logs." + ) + END + )) + print "Done with the tar.gz->zip. Check folder %s." % main.dirpath + + def upload_zips_to_pypi(self): + print 'Uploading to pypi...' + zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) + for zips in glob.glob('%s/*.zip' % self.dirpath): + # Put the twine upload code here + pass + + +main = SetuptoolsOldReleasesWithoutZip() +main.download_setuptools_releases_without_zip_counterpart() +main.convert_targz_to_zip() +main.upload_zips_to_pypi() From 34668623d92b950634a2fcf750d902fb34f321ae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 16:53:56 -0500 Subject: [PATCH 5267/8469] Only execute when invoked as script --- scripts/upload-old-releases-as-zip.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 5349281911..e08e4bb498 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -228,7 +228,8 @@ def upload_zips_to_pypi(self): pass -main = SetuptoolsOldReleasesWithoutZip() -main.download_setuptools_releases_without_zip_counterpart() -main.convert_targz_to_zip() -main.upload_zips_to_pypi() +if __name__ == '__main__': + main = SetuptoolsOldReleasesWithoutZip() + main.download_setuptools_releases_without_zip_counterpart() + main.convert_targz_to_zip() + main.upload_zips_to_pypi() From 2ac91b232f9f7061c53b51520353c31b12d576be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:00:39 -0500 Subject: [PATCH 5268/8469] Extract parameter to exceptions and remove superfluous parentheses --- scripts/upload-old-releases-as-zip.py | 31 ++++++++++++--------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index e08e4bb498..f0ca41c370 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -167,18 +167,16 @@ def download_setuptools_releases_without_zip_counterpart(self): print 'Total releases without zip: %s' % len(releases_without_zip) print 'Total downloaded: %s' % self.total_downloaded_ok if failed_md5_releases: - raise(Exception( - FAIL + ( - "FAIL: these releases %s failed the md5 check!" % - ','.join(failed_md5_releases) - ) + END - )) + msg = FAIL + ( + "FAIL: these releases %s failed the md5 check!" % + ','.join(failed_md5_releases) + ) + END + raise Exception(msg) elif self.total_downloaded_ok != len(releases_without_zip): - raise(Exception( - FAIL + ( - "FAIL: Unknown error occured. Please check the logs." - ) + END - )) + msg = FAIL + ( + "FAIL: Unknown error occured. Please check the logs." + ) + END + raise Exception(msg) else: print OK + "All releases downloaded and md5 checked." + END @@ -212,12 +210,11 @@ def convert_targz_to_zip(self): total_converted += 1 print 'Total converted: %s' % total_converted if self.total_downloaded_ok != total_converted: - raise(Exception( - FAIL + ( - "FAIL: Total number of downloaded releases is different" - " from converted ones. Please check the logs." - ) + END - )) + msg = FAIL + ( + "FAIL: Total number of downloaded releases is different" + " from converted ones. Please check the logs." + ) + END + raise Exception(msg) print "Done with the tar.gz->zip. Check folder %s." % main.dirpath def upload_zips_to_pypi(self): From e30ea433fbfc1de15e23bcb4f2310c525fa5ea0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:01:26 -0500 Subject: [PATCH 5269/8469] Run 2to3 on script --- scripts/upload-old-releases-as-zip.py | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index f0ca41c370..33a3e29c75 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -9,8 +9,8 @@ import shutil import tarfile import tempfile -import urllib -import urllib2 +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse from distutils.version import LooseVersion @@ -26,8 +26,8 @@ class SetuptoolsOldReleasesWithoutZip(object): def __init__(self): super(SetuptoolsOldReleasesWithoutZip, self).__init__() self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) - print "Downloading %s releases..." % DISTRIBUTION - print "All releases will be downloaded to %s" % self.dirpath + print("Downloading %s releases..." % DISTRIBUTION) + print("All releases will be downloaded to %s" % self.dirpath) self.data_json_setuptools = self.get_json_data(DISTRIBUTION) self.valid_releases_numbers = sorted([ release @@ -109,7 +109,7 @@ def get_json_data(self, package_name): ], """ url = "https://pypi.python.org/pypi/%s/json" % (package_name,) - data = json.load(urllib2.urlopen(urllib2.Request(url))) + data = json.load(urllib.request.urlopen(urllib.request.Request(url))) # Mainly for debug. json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) @@ -148,24 +148,24 @@ def download_setuptools_releases_without_zip_counterpart(self): if release in releases_without_zip: for same_version_release_dict in self.data_json_setuptools['releases'][release]: # NOQA if 'tar.gz' in same_version_release_dict['filename']: - print "Downloading %s..." % release + print("Downloading %s..." % release) local_file = '%s/%s' % ( self.dirpath, same_version_release_dict["filename"] ) - urllib.urlretrieve( + urllib.request.urlretrieve( same_version_release_dict["url"], local_file ) targz = open(local_file, 'rb').read() hexdigest = hashlib.md5(targz).hexdigest() if (hexdigest != same_version_release_dict['md5_digest']): # NOQA - print FAIL + "FAIL: md5 for %s didn't match!" % release + END # NOQA + print(FAIL + "FAIL: md5 for %s didn't match!" % release + END) # NOQA failed_md5_releases.append(release) else: self.total_downloaded_ok += 1 - print 'Total releases without zip: %s' % len(releases_without_zip) - print 'Total downloaded: %s' % self.total_downloaded_ok + print('Total releases without zip: %s' % len(releases_without_zip)) + print('Total downloaded: %s' % self.total_downloaded_ok) if failed_md5_releases: msg = FAIL + ( "FAIL: these releases %s failed the md5 check!" % @@ -178,14 +178,14 @@ def download_setuptools_releases_without_zip_counterpart(self): ) + END raise Exception(msg) else: - print OK + "All releases downloaded and md5 checked." + END + print(OK + "All releases downloaded and md5 checked." + END) except OSError as e: if e.errno != errno.EEXIST: raise e def convert_targz_to_zip(self): - print "Converting the tar.gz to zip..." + print("Converting the tar.gz to zip...") files = glob.glob('%s/*.tar.gz' % self.dirpath) total_converted = 0 for targz in sorted(files, key=LooseVersion): @@ -198,7 +198,7 @@ def convert_targz_to_zip(self): # Zip the extracted tar. setuptools_folder_path = targz.replace('.tar.gz', '') setuptools_folder_name = setuptools_folder_path.split("/")[-1] - print setuptools_folder_name + print(setuptools_folder_name) shutil.make_archive( setuptools_folder_path, 'zip', @@ -208,17 +208,17 @@ def convert_targz_to_zip(self): # Exclude extracted tar folder. shutil.rmtree(setuptools_folder_path.replace('.zip', '')) total_converted += 1 - print 'Total converted: %s' % total_converted + print('Total converted: %s' % total_converted) if self.total_downloaded_ok != total_converted: msg = FAIL + ( "FAIL: Total number of downloaded releases is different" " from converted ones. Please check the logs." ) + END raise Exception(msg) - print "Done with the tar.gz->zip. Check folder %s." % main.dirpath + print("Done with the tar.gz->zip. Check folder %s." % main.dirpath) def upload_zips_to_pypi(self): - print 'Uploading to pypi...' + print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) for zips in glob.glob('%s/*.zip' % self.dirpath): # Put the twine upload code here From fac5dc448b0a4a451da001ab629c134623399cc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:07:42 -0500 Subject: [PATCH 5270/8469] Add twine implementation --- scripts/upload-old-releases-as-zip.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 33a3e29c75..c1ce41f59a 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -1,6 +1,11 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# declare and require dependencies +__requires__ = [ + 'twine', +]; __import__('pkg_resources') + import errno import glob import hashlib @@ -11,9 +16,11 @@ import tempfile import urllib.request, urllib.parse, urllib.error import urllib.request, urllib.error, urllib.parse - from distutils.version import LooseVersion +from twine.commands import upload + + OK = '\033[92m' FAIL = '\033[91m' END = '\033[0m' @@ -221,8 +228,8 @@ def upload_zips_to_pypi(self): print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) for zips in glob.glob('%s/*.zip' % self.dirpath): - # Put the twine upload code here - pass + print("simulated upload of", zips); continue + upload.upload(dists=list(zips)) if __name__ == '__main__': From 8329fb1ab5832f6ab07ed03929814bc4a4aeecd8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:08:25 -0500 Subject: [PATCH 5271/8469] Remove repeat glob code --- scripts/upload-old-releases-as-zip.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c1ce41f59a..0c722d4876 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -227,9 +227,8 @@ def convert_targz_to_zip(self): def upload_zips_to_pypi(self): print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) - for zips in glob.glob('%s/*.zip' % self.dirpath): - print("simulated upload of", zips); continue - upload.upload(dists=list(zips)) + print("simulated upload of", zips); return + upload.upload(dists=zips) if __name__ == '__main__': From 1837b319518745e80e32a3ec23ccd28b7fec3634 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:14:23 -0500 Subject: [PATCH 5272/8469] Reorganize imports --- scripts/upload-old-releases-as-zip.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 0c722d4876..c7c89fa79a 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -14,8 +14,9 @@ import shutil import tarfile import tempfile -import urllib.request, urllib.parse, urllib.error -import urllib.request, urllib.error, urllib.parse +import urllib.request +import urllib.parse +import urllib.error from distutils.version import LooseVersion from twine.commands import upload From 7ffe08ef8185d87c0dfff1d5567f9d84f8e47ba7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:19:48 -0500 Subject: [PATCH 5273/8469] Remove unnecessary __init__ --- scripts/upload-old-releases-as-zip.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c7c89fa79a..1a63872038 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -14,6 +14,7 @@ import shutil import tarfile import tempfile +import codecs import urllib.request import urllib.parse import urllib.error @@ -32,7 +33,6 @@ class SetuptoolsOldReleasesWithoutZip(object): """docstring for SetuptoolsOldReleases""" def __init__(self): - super(SetuptoolsOldReleasesWithoutZip, self).__init__() self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) print("Downloading %s releases..." % DISTRIBUTION) print("All releases will be downloaded to %s" % self.dirpath) @@ -117,7 +117,10 @@ def get_json_data(self, package_name): ], """ url = "https://pypi.python.org/pypi/%s/json" % (package_name,) - data = json.load(urllib.request.urlopen(urllib.request.Request(url))) + resp = urllib.request.urlopen(urllib.request.Request(url)) + charset = resp.info().get_content_charset() + reader = codecs.getreader(charset)(resp) + data = json.load(reader) # Mainly for debug. json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) From fcdbdc6fa628daffb6e80d5f333311705f86207a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:20:07 -0500 Subject: [PATCH 5274/8469] Remove unnecessary superclass --- scripts/upload-old-releases-as-zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 1a63872038..c4b1bfb5ff 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -29,7 +29,7 @@ DISTRIBUTION = "setuptools" -class SetuptoolsOldReleasesWithoutZip(object): +class SetuptoolsOldReleasesWithoutZip: """docstring for SetuptoolsOldReleases""" def __init__(self): From cff3a4820a926b379b5556ab28c9e5bd67152926 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:21:39 -0500 Subject: [PATCH 5275/8469] Use a local path rather than a tempdir that never gets cleaned up. --- scripts/upload-old-releases-as-zip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c4b1bfb5ff..38cfcd5544 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -13,7 +13,6 @@ import os import shutil import tarfile -import tempfile import codecs import urllib.request import urllib.parse @@ -33,7 +32,8 @@ class SetuptoolsOldReleasesWithoutZip: """docstring for SetuptoolsOldReleases""" def __init__(self): - self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) + self.dirpath = './dist' + os.makedirs(self.dirpath, exist_ok=True) print("Downloading %s releases..." % DISTRIBUTION) print("All releases will be downloaded to %s" % self.dirpath) self.data_json_setuptools = self.get_json_data(DISTRIBUTION) From 32237eae19b3722b2a1c87bc0a74613c5f12d6fd Mon Sep 17 00:00:00 2001 From: sunpoet Date: Fri, 20 Nov 2015 05:54:41 +0800 Subject: [PATCH 5276/8469] Fix package list inconsistency caused by namespace package on Python 3.5 namespace package will be skipped during installation. Since Python 3.5, .pyo files are removed and new .opt-1.pyc (and .opt-2.pyc) files are introduced [1]. However setuptools does not understand that new naming therefore the corresponding foo.opt-1.pyc is still added into package list (via --record). The inconsistency leads to a packaging error. [1] https://www.python.org/dev/peps/pep-0488/ --- setuptools/command/install_lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 9b7722276b..78fe689152 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -79,6 +79,8 @@ def _gen_exclusion_paths(): 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, From 68e4344ceaff4dd88ffbfbf5370639cc854a8af8 Mon Sep 17 00:00:00 2001 From: grizzlynyo Date: Sat, 21 Nov 2015 14:13:19 +0200 Subject: [PATCH 5277/8469] update certifi to 2015.11.20 --HG-- branch : sync_certifi --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6226111d41..9d7f228d21 100755 --- a/setup.py +++ b/setup.py @@ -150,10 +150,10 @@ def _gen_console_scripts(): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2015.04.28", + "certs": "certifi==2015.11.20", }, dependency_links=[ - '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', ], scripts=[], From 864de11cf162c693fe248b609d73545cacb622df Mon Sep 17 00:00:00 2001 From: grizzlynyo Date: Sat, 21 Nov 2015 15:15:23 +0200 Subject: [PATCH 5278/8469] fix an issue for bdist_wininst with gui_scripts: The script header was always generated with non-gui executable. This was caused by by adjust_header assuming the executable is always an absolute path. Fixed by using find_executables() from distutils. --HG-- branch : bdist_wininst_gui_scripts --- setuptools/command/easy_install.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 45d180bb3c..7ceac03f68 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2137,10 +2137,13 @@ def _adjust_header(type_, orig_header): pattern, repl = repl, pattern pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) new_header = pattern_ob.sub(string=orig_header, repl=repl) - 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 + if sys.platform == 'win32': + from distutils.spawn import find_executable + + clean_header = new_header[2:-1].strip('"') + if not find_executable(clean_header): + # the adjusted version doesn't exist, so return the original + return orig_header return new_header From aa8a6c90ac9b165ee1c6e6e3d72fff34adba2850 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 21:20:36 -0500 Subject: [PATCH 5279/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b14e910359..a6b9f72047 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,12 @@ CHANGES ======= +---- +18.7 +---- + +* Update dependency on certify. + ------ 18.6.1 ------ From fb2860e63f463355aa3c9e824adff48dfeaad837 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 21:28:59 -0500 Subject: [PATCH 5280/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a6b9f72047..73855d1c2c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES ---- * Update dependency on certify. +* Pull Request #160: Improve detection of gui script in + ``easy_install._adjust_header``. ------ 18.6.1 From a361ef49cda256e1f53894470cb921d19e04e853 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 21:35:51 -0500 Subject: [PATCH 5281/8469] Extract _use_header method --- setuptools/command/easy_install.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f3b5fa6201..9e9c5e544f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -20,6 +20,7 @@ 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 @@ -2126,8 +2127,8 @@ def _get_script_args(cls, type_, name, header, script_text): 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). @@ -2138,14 +2139,19 @@ def _adjust_header(type_, orig_header): pattern, repl = repl, pattern pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE) new_header = pattern_ob.sub(string=orig_header, repl=repl) - if sys.platform == 'win32': - from distutils.spawn import find_executable - - clean_header = new_header[2:-1].strip('"') - if not find_executable(clean_header): - # the adjusted version doesn't exist, so return the original - return orig_header - return new_header + 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('"') + return sys.platform != 'win32' or find_executable(clean_header) class WindowsExecutableLauncherWriter(WindowsScriptWriter): From a63119c9ebd8e7c578203628023877f7aa3f7e97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 22:41:52 -0500 Subject: [PATCH 5282/8469] Make test.test_args a non-data property per Pull Request #155. --- CHANGES.txt | 2 ++ setuptools/command/test.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 73855d1c2c..f399636ff4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ CHANGES * Update dependency on certify. * Pull Request #160: Improve detection of gui script in ``easy_install._adjust_header``. +* Made ``test.test_args`` a non-data property; alternate fix + for the issue reported in Pull Request #155. ------ 18.6.1 diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 160e21c95e..c26f5fc939 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -41,6 +41,17 @@ def loadTestsFromModule(self, module, pattern=None): 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 @@ def finalize_options(self): 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()) From 1a5cecf5cf61861816a2e02e513256b614b492d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 22:55:03 -0500 Subject: [PATCH 5283/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index f399636ff4..ebe7643337 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,8 @@ CHANGES ``easy_install._adjust_header``. * Made ``test.test_args`` a non-data property; alternate fix for the issue reported in Pull Request #155. +* Issue #453: In ``ez_setup`` bootstrap module, unload all + ``pkg_resources`` modules following download. ------ 18.6.1 From e99e20ceb50b6292be0d383ec67f2ca6692a6d70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 27 Nov 2015 23:04:23 -0500 Subject: [PATCH 5284/8469] Update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ebe7643337..fa89b09bec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,9 @@ CHANGES for the issue reported in Pull Request #155. * Issue #453: In ``ez_setup`` bootstrap module, unload all ``pkg_resources`` modules following download. +* Pull Request #158: Honor `PEP-488 + `_ when excluding + files for namespace packages. ------ 18.6.1 From 141d093b0e7f50459c8053ee4619c9991473be6e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 11:51:17 -0500 Subject: [PATCH 5285/8469] Move test into pkg_resources tests --- pkg_resources/tests/test_pkg_resources.py | 96 +++++++++++++++++++++++ setuptools/tests/test_egg_info.py | 85 -------------------- 2 files changed, 96 insertions(+), 85 deletions(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 564d7cec4f..257cbb5ba6 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -5,9 +5,17 @@ import datetime import time import subprocess +import stat + +import pytest import pkg_resources +from setuptools.tests.textwrap import DALS +from setuptools.tests import contexts +from setuptools.tests import environment + + try: unicode except NameError: @@ -109,3 +117,91 @@ def test_setuptools_not_imported(self): ) cmd = [sys.executable, '-c', '; '.join(lines)] subprocess.check_call(cmd) + + + +class TestEggInfoDistutils(object): + + version = '1.11.0.dev0+2329eae' + setup_script = DALS(""" + from distutils.core import setup + + setup( + name='foo', + py_modules=['hello'], + version='%s', + ) + """) + + def _create_project(self): + with open('setup.py', 'w') as f: + f.write(self.setup_script % self.version) + + with open('hello.py', 'w') as f: + f.write(DALS(""" + def run(): + print('hello') + """)) + + @pytest.yield_fixture + def env(self): + class Environment(str): + pass + with contexts.tempdir(prefix='setuptools-test.') as env_dir: + env = Environment(env_dir) + os.chmod(env_dir, stat.S_IRWXU) + subs = 'home', 'lib', 'scripts', 'data', 'egg-base' + env.paths = dict( + (dirname, os.path.join(env_dir, dirname)) + for dirname in subs + ) + list(map(os.mkdir, env.paths.values())) + config = os.path.join(env.paths['home'], '.pydistutils.cfg') + with open(config, 'w') as f: + f.write(DALS(""" + [egg_info] + egg-base = %(egg-base)s + """ % env.paths)) + yield env + + def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): + self._create_project() + + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + cmd = [ + 'install', + '--home', env.paths['home'], + '--install-lib', env.paths['lib'], + '--install-scripts', env.paths['scripts'], + '--install-data', env.paths['data'], + ] + code, data = environment.run_setup_py( + cmd=cmd, + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + if code: + raise AssertionError(data) + + actual = self._find_egg_info_file(env.paths['lib']) + # On Py3k it can be e.g. foo-1.11.0.dev0_2329eae-py3.4.egg-info + # but 2.7 doesn't add the Python version, so to be expedient we + # just check our start and end, omitting the potential version num + assert actual.startswith('foo-' + self.version.replace('+', '_')) + assert actual.endswith('.egg-info') + # this requirement parsing will raise a VersionConflict unless the + # .egg-info file is parsed (see #419 on BitBucket) + req = pkg_resources.Requirement.parse('foo>=1.9') + dist = pkg_resources.WorkingSet([env.paths['lib']]).find(req) + assert dist.version == self.version + + def _find_egg_info_file(self, root): + # expect exactly one result + result = (filename for dirpath, dirnames, filenames in os.walk(root) + for filename in filenames if filename.endswith('.egg-info')) + result, = result + return result + diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index b4195e06e6..645c379c6f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,7 +6,6 @@ from . import environment from .textwrap import DALS from . import contexts -from pkg_resources import WorkingSet, Requirement class Environment(str): @@ -98,87 +97,3 @@ def _find_egg_info_files(self, root): # expect exactly one result result, = results return result - - -class TestEggInfoDistutils(object): - - version = '1.11.0.dev0+2329eae' - setup_script = DALS(""" - from distutils.core import setup - - setup( - name='foo', - py_modules=['hello'], - version='%s', - ) - """) - - def _create_project(self): - with open('setup.py', 'w') as f: - f.write(self.setup_script % self.version) - - with open('hello.py', 'w') as f: - f.write(DALS(""" - def run(): - print('hello') - """)) - - @pytest.yield_fixture - def env(self): - with contexts.tempdir(prefix='setuptools-test.') as env_dir: - env = Environment(env_dir) - os.chmod(env_dir, stat.S_IRWXU) - subs = 'home', 'lib', 'scripts', 'data', 'egg-base' - env.paths = dict( - (dirname, os.path.join(env_dir, dirname)) - for dirname in subs - ) - list(map(os.mkdir, env.paths.values())) - config = os.path.join(env.paths['home'], '.pydistutils.cfg') - with open(config, 'w') as f: - f.write(DALS(""" - [egg_info] - egg-base = %(egg-base)s - """ % env.paths)) - yield env - - def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): - self._create_project() - - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - cmd = [ - 'install', - '--home', env.paths['home'], - '--install-lib', env.paths['lib'], - '--install-scripts', env.paths['scripts'], - '--install-data', env.paths['data'], - ] - code, data = environment.run_setup_py( - cmd=cmd, - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - if code: - raise AssertionError(data) - - actual = self._find_egg_info_file(env.paths['lib']) - # On Py3k it can be e.g. foo-1.11.0.dev0_2329eae-py3.4.egg-info - # but 2.7 doesn't add the Python version, so to be expedient we - # just check our start and end, omitting the potential version num - assert actual.startswith('foo-' + self.version.replace('+', '_')) - assert actual.endswith('.egg-info') - # this requirement parsing will raise a VersionConflict unless the - # .egg-info file is parsed (see #419 on BitBucket) - req = Requirement.parse('foo>=1.9') - dist = WorkingSet([env.paths['lib']]).find(req) - assert dist.version == self.version - - def _find_egg_info_file(self, root): - # expect exactly one result - result = (filename for dirpath, dirnames, filenames in os.walk(root) - for filename in filenames if filename.endswith('.egg-info')) - result, = result - return result From 25fc8c1d05c84ea9d6155be4326e837f90dd173d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 11:54:23 -0500 Subject: [PATCH 5286/8469] Rename test to match intention. --- pkg_resources/tests/test_pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 257cbb5ba6..698aefbd9f 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -164,7 +164,7 @@ class Environment(str): """ % env.paths)) yield env - def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): + def test_version_resolved_from_egg_info(self, tmpdir_cwd, env): self._create_project() environ = os.environ.copy().update( From 41868fe7c4f75708b3cb663bf1b76405223869b0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 12:54:28 -0500 Subject: [PATCH 5287/8469] Rewrite test to simply create the egg_info. --- pkg_resources/tests/test_pkg_resources.py | 115 +++++++--------------- 1 file changed, 35 insertions(+), 80 deletions(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 698aefbd9f..8b9a317a74 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -8,13 +8,10 @@ import stat import pytest +import py import pkg_resources -from setuptools.tests.textwrap import DALS -from setuptools.tests import contexts -from setuptools.tests import environment - try: unicode @@ -120,88 +117,46 @@ def test_setuptools_not_imported(self): -class TestEggInfoDistutils(object): +class TestDeepVersionLookup(object): - version = '1.11.0.dev0+2329eae' - setup_script = DALS(""" - from distutils.core import setup + @pytest.fixture + def env(self, tmpdir): + """ + Create a package environment, similar to a virtualenv, + in which packages are installed. + """ + class Environment(str): + pass - setup( - name='foo', - py_modules=['hello'], - version='%s', + env = Environment(tmpdir) + tmpdir.chmod(stat.S_IRWXU) + subs = 'home', 'lib', 'scripts', 'data', 'egg-base' + env.paths = dict( + (dirname, str(tmpdir / dirname)) + for dirname in subs ) - """) - - def _create_project(self): - with open('setup.py', 'w') as f: - f.write(self.setup_script % self.version) + list(map(os.mkdir, env.paths.values())) + return env - with open('hello.py', 'w') as f: - f.write(DALS(""" - def run(): - print('hello') - """)) + def create_foo_pkg(self, env, version): + """ + Create a foo package installed to env.paths['lib'] + as version. + """ + safe_version = pkg_resources.safe_version(version) + lib = py.path.local(env.paths['lib']) + egg_info = lib / 'foo-' + safe_version + '.egg-info' + egg_info.mkdir() + pkg_info = egg_info / 'PKG_INFO' + with pkg_info.open('w') as strm: + strm.write('version: ' + version) + + def test_version_resolved_from_egg_info(self, env): + version = '1.11.0.dev0+2329eae' + self.create_foo_pkg(env, version) - @pytest.yield_fixture - def env(self): - class Environment(str): - pass - with contexts.tempdir(prefix='setuptools-test.') as env_dir: - env = Environment(env_dir) - os.chmod(env_dir, stat.S_IRWXU) - subs = 'home', 'lib', 'scripts', 'data', 'egg-base' - env.paths = dict( - (dirname, os.path.join(env_dir, dirname)) - for dirname in subs - ) - list(map(os.mkdir, env.paths.values())) - config = os.path.join(env.paths['home'], '.pydistutils.cfg') - with open(config, 'w') as f: - f.write(DALS(""" - [egg_info] - egg-base = %(egg-base)s - """ % env.paths)) - yield env - - def test_version_resolved_from_egg_info(self, tmpdir_cwd, env): - self._create_project() - - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - cmd = [ - 'install', - '--home', env.paths['home'], - '--install-lib', env.paths['lib'], - '--install-scripts', env.paths['scripts'], - '--install-data', env.paths['data'], - ] - code, data = environment.run_setup_py( - cmd=cmd, - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - if code: - raise AssertionError(data) - - actual = self._find_egg_info_file(env.paths['lib']) - # On Py3k it can be e.g. foo-1.11.0.dev0_2329eae-py3.4.egg-info - # but 2.7 doesn't add the Python version, so to be expedient we - # just check our start and end, omitting the potential version num - assert actual.startswith('foo-' + self.version.replace('+', '_')) - assert actual.endswith('.egg-info') # this requirement parsing will raise a VersionConflict unless the # .egg-info file is parsed (see #419 on BitBucket) req = pkg_resources.Requirement.parse('foo>=1.9') dist = pkg_resources.WorkingSet([env.paths['lib']]).find(req) - assert dist.version == self.version - - def _find_egg_info_file(self, root): - # expect exactly one result - result = (filename for dirpath, dirnames, filenames in os.walk(root) - for filename in filenames if filename.endswith('.egg-info')) - result, = result - return result - + assert dist.version == version From 9744cf2edf82eeda796ca22bf21ac0056c8aa925 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:00:32 -0500 Subject: [PATCH 5288/8469] Rewrite test to use distutils' install_egg_info to generate the metadata. --- pkg_resources/tests/test_pkg_resources.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 8b9a317a74..0a03dd9360 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -6,9 +6,10 @@ import time import subprocess import stat +import distutils.dist +import distutils.command.install_egg_info import pytest -import py import pkg_resources @@ -117,7 +118,7 @@ def test_setuptools_not_imported(self): -class TestDeepVersionLookup(object): +class TestDeepVersionLookupDistutils(object): @pytest.fixture def env(self, tmpdir): @@ -140,16 +141,16 @@ class Environment(str): def create_foo_pkg(self, env, version): """ - Create a foo package installed to env.paths['lib'] + Create a foo package installed (distutils-style) to env.paths['lib'] as version. """ - safe_version = pkg_resources.safe_version(version) - lib = py.path.local(env.paths['lib']) - egg_info = lib / 'foo-' + safe_version + '.egg-info' - egg_info.mkdir() - pkg_info = egg_info / 'PKG_INFO' - with pkg_info.open('w') as strm: - strm.write('version: ' + version) + attrs = dict(name='foo', version=version) + dist = distutils.dist.Distribution(attrs) + iei_cmd = distutils.command.install_egg_info.install_egg_info(dist) + iei_cmd.initialize_options() + iei_cmd.install_dir = env.paths['lib'] + iei_cmd.finalize_options() + iei_cmd.run() def test_version_resolved_from_egg_info(self, env): version = '1.11.0.dev0+2329eae' From 423ef416ff975934fc3a2166b7fec76b3861da65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:14:56 -0500 Subject: [PATCH 5289/8469] Rewrite _version_from_file using iterables and filters --- pkg_resources/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 938f481872..59787a954a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2466,11 +2466,11 @@ def _remove_md5_fragment(location): return location -def _version_from_file(fid): - for line in fid: - if line.lower().startswith('version:'): - version = safe_version(line.split(':', 1)[1].strip()) - return version +def _version_from_file(lines): + is_version_line = lambda line: line.lower().startswith('version:') + version_lines = filter(is_version_line, lines) + line = next(iter(version_lines)) + return safe_version(line.split(':', 1)[1].strip()) class Distribution(object): From 498e9d316fad24d848e80a7394c45f2740dd24bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:16:14 -0500 Subject: [PATCH 5290/8469] Use partition to avoid integer literals --- pkg_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 59787a954a..c4071f11e4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2470,7 +2470,8 @@ def _version_from_file(lines): is_version_line = lambda line: line.lower().startswith('version:') version_lines = filter(is_version_line, lines) line = next(iter(version_lines)) - return safe_version(line.split(':', 1)[1].strip()) + _, _, value = line.partition(':') + return safe_version(value.strip()) class Distribution(object): From 653987e5827beb668a2b32d9512fc7b238576155 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:21:01 -0500 Subject: [PATCH 5291/8469] Return None when no version is encountered. --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c4071f11e4..9a3ca36c86 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2469,9 +2469,9 @@ def _remove_md5_fragment(location): def _version_from_file(lines): is_version_line = lambda line: line.lower().startswith('version:') version_lines = filter(is_version_line, lines) - line = next(iter(version_lines)) + line = next(iter(version_lines), '') _, _, value = line.partition(':') - return safe_version(value.strip()) + return safe_version(value.strip()) or None class Distribution(object): From 87ceb61bbb4a668539111efd84c5e0de7649e097 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:21:54 -0500 Subject: [PATCH 5292/8469] Add docstring --- pkg_resources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 9a3ca36c86..e4decac388 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2467,6 +2467,10 @@ def _remove_md5_fragment(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), '') From 78b89bdb89e27a165619496fc0b84979664784e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 13:46:53 -0500 Subject: [PATCH 5293/8469] Extract method for _version_from_egg_info. --- pkg_resources/__init__.py | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index e4decac388..3090dd8197 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2497,6 +2497,7 @@ def __init__(self, location=None, metadata=None, project_name=None, @classmethod def from_location(cls, location, basename, metadata=None, **kw): project_name, version, py_version, platform = [None]*4 + dist_path = os.path.join(location, basename) basename, ext = os.path.splitext(basename) if ext.lower() in _distributionImpl: # .dist-info gets much metadata differently @@ -2507,26 +2508,34 @@ def from_location(cls, location, basename, metadata=None, **kw): ) cls = _distributionImpl[ext.lower()] - # Some packages e.g. numpy and scipy use distutils instead of - # setuptools, and their version numbers can get mangled when - # converted to filenames (e.g., 1.11.0.dev0+2329eae to - # 1.11.0.dev0_2329eae). These will not be parsed properly - # downstream by Distribution and safe_version, so we need to - # take an extra step and try to get the version number from - # the file itself instead of the filename. - if ext == '.egg-info': - full_name = os.path.join(location, basename + ext) - try: - with open(full_name, 'r') as fid: - version_ = _version_from_file(fid) - version = version_ if version_ is not None else version - except IOError: - pass + version = cls._version_from_egg_info(dist_path) or version return cls( location, metadata, project_name=project_name, version=version, py_version=py_version, platform=platform, **kw ) + @staticmethod + def _version_from_egg_info(dist_path): + """ + 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. + """ + _, ext = os.path.splitext(dist_path) + if ext != '.egg-info' or not os.path.isfile(dist_path): + return + try: + with open(dist_path) as strm: + return _version_from_file(strm) + except IOError: + pass + @property def hashcmp(self): return ( From ca89b06983e1a099bab3a7fe540ef72d210484b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 14:00:30 -0500 Subject: [PATCH 5294/8469] Encapsulate egg-info special behavior in EggInfoDistribution class. --- pkg_resources/__init__.py | 46 ++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3090dd8197..631c85476b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2516,25 +2516,7 @@ def from_location(cls, location, basename, metadata=None, **kw): @staticmethod def _version_from_egg_info(dist_path): - """ - 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. - """ - _, ext = os.path.splitext(dist_path) - if ext != '.egg-info' or not os.path.isfile(dist_path): - return - try: - with open(dist_path) as strm: - return _version_from_file(strm) - except IOError: - pass + pass @property def hashcmp(self): @@ -2830,6 +2812,30 @@ def extras(self): return [dep for dep in self._dep_map if dep] +class EggInfoDistribution(Distribution): + + @staticmethod + def _version_from_egg_info(dist_path): + """ + 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. + """ + if not os.path.isfile(dist_path): + return + try: + with open(dist_path) as strm: + return _version_from_file(strm) + except IOError: + pass + + class DistInfoDistribution(Distribution): """Wrap an actual or potential sys.path entry w/metadata, .dist-info style""" PKG_INFO = 'METADATA' @@ -2895,7 +2901,7 @@ def reqs_for_extra(extra): _distributionImpl = { '.egg': Distribution, - '.egg-info': Distribution, + '.egg-info': EggInfoDistribution, '.dist-info': DistInfoDistribution, } From df5516526d165a13c50ef51a392b73955025e7fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 14:08:21 -0500 Subject: [PATCH 5295/8469] Rename method as _version_from_metadata. --- pkg_resources/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 631c85476b..7c3e18b433 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2500,22 +2500,22 @@ def from_location(cls, location, basename, metadata=None, **kw): dist_path = os.path.join(location, basename) 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' ) - cls = _distributionImpl[ext.lower()] - version = cls._version_from_egg_info(dist_path) or version + version = cls._version_from_metadata(dist_path) or version return cls( location, metadata, project_name=project_name, version=version, py_version=py_version, platform=platform, **kw ) @staticmethod - def _version_from_egg_info(dist_path): + def _version_from_metadata(dist_path): pass @property @@ -2815,7 +2815,7 @@ def extras(self): class EggInfoDistribution(Distribution): @staticmethod - def _version_from_egg_info(dist_path): + def _version_from_metadata(dist_path): """ Packages installed by distutils (e.g. numpy or scipy), which uses an old safe_version, and so From 65036cf1fd4454d09513482140f1a6524ca66100 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 14:18:09 -0500 Subject: [PATCH 5296/8469] Update changelog. Fixes #419. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index fa89b09bec..32e516d5b4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,9 @@ CHANGES * Pull Request #158: Honor `PEP-488 `_ when excluding files for namespace packages. +* Issue #419 and Pull Request #144: Add experimental support for + reading the version info from distutils-installed metadata rather + than using the version in the filename. ------ 18.6.1 From e79907fc0a582234cbddcdc964ebf8206120469d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 17:57:44 -0500 Subject: [PATCH 5297/8469] Bumped to 18.7 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 2f5e485632..762e26baff 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.6.2" +DEFAULT_VERSION = "18.7" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 86ad21c692..f6dc6bf473 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.6.2' +__version__ = '18.7' From b7bdb8f00a99a430b4a2ca642978caee682d5911 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 17:57:45 -0500 Subject: [PATCH 5298/8469] Added tag 18.7 for changeset 67d07805606a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6ed522b450..075aca3008 100644 --- a/.hgtags +++ b/.hgtags @@ -225,3 +225,4 @@ b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 31dc6d2ac0f5ab766652602fe6ca716fff7180e7 18.5 dfe190b09908f6b953209d13573063809de451b8 18.6 804f87045a901f1dc121cf9149143d654228dc13 18.6.1 +67d07805606aead09349d5b91d7d26c68ddad2fc 18.7 From c11203148a150299fac498918b76c0dd83c3fd81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Nov 2015 17:59:46 -0500 Subject: [PATCH 5299/8469] Bumped to 18.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 762e26baff..e0cefe2d86 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.7" +DEFAULT_VERSION = "18.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index f6dc6bf473..aeb7307bc5 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.7' +__version__ = '18.8' From 07199bdc471d257822a56fb7c75bc1d4c7ccc36f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 30 Nov 2015 11:27:59 -0500 Subject: [PATCH 5300/8469] Always use Python 3 filter in pkg_resources --- pkg_resources/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 46f09a2d94..0bd27d46d2 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -37,6 +37,7 @@ import email.parser import tempfile import textwrap +import itertools from pkgutil import get_importer try: @@ -53,6 +54,7 @@ if PY2: from urlparse import urlparse, urlunparse + filter = itertools.ifilter if PY3: string_types = str, From 7a37ebfae2843651e41d481794d19adff2eb110d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 30 Nov 2015 11:28:57 -0500 Subject: [PATCH 5301/8469] Always use Python 3 map in pkg_resources --- pkg_resources/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0bd27d46d2..eaebb2fa5b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -55,6 +55,7 @@ if PY2: from urlparse import urlparse, urlunparse filter = itertools.ifilter + map = itertools.imap if PY3: string_types = str, From dfbc96168d8b921bd6b02fe7aeceeeb930f68cfe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 09:24:52 -0500 Subject: [PATCH 5302/8469] Add test for regression on Python 3 when LANG=C and there is non-ascii in the metadata file before the version. Ref #469. --- pkg_resources/tests/test_pkg_resources.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 0a03dd9360..31eee63598 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -1,3 +1,6 @@ +# coding: utf-8 +from __future__ import unicode_literals + import sys import tempfile import os @@ -144,7 +147,8 @@ def create_foo_pkg(self, env, version): Create a foo package installed (distutils-style) to env.paths['lib'] as version. """ - attrs = dict(name='foo', version=version) + ld = "This package has unicode metadata! â„" + attrs = dict(name='foo', version=version, long_description=ld) dist = distutils.dist.Distribution(attrs) iei_cmd = distutils.command.install_egg_info.install_egg_info(dist) iei_cmd.initialize_options() From 18a329d0498b4f3bbe0b5dda8063d1a910cb6945 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 09:26:14 -0500 Subject: [PATCH 5303/8469] Also run the tests with LANG=C --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0097ab8955..c5ea081551 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,5 @@ script: - python bootstrap.py - python setup.py test --addopts='-rs' + - LANG=C python setup.py test - python ez_setup.py --version 12.2 From 3c257e67279bdb82c2525515bb305816f70c1615 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 09:27:45 -0500 Subject: [PATCH 5304/8469] Always run tests with LANG=C to capture issues in that restrictive environment. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5ea081551..4bc6ebd61b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,5 @@ script: # update egg_info based on setup.py in checkout - python bootstrap.py - - python setup.py test --addopts='-rs' - - LANG=C python setup.py test + - LANG=C python setup.py test --addopts='-rs' - python ez_setup.py --version 12.2 From e82b7d5a1f8d48f4b957888b6a2e345f06716aee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 09:29:24 -0500 Subject: [PATCH 5305/8469] Travis has 3.5 now also --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4bc6ebd61b..9afbf067c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - 2.7 - 3.3 - 3.4 + - 3.5 - pypy # command to run tests script: From e5b87949322042b310e509c7d332a9beb708935d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 09:34:14 -0500 Subject: [PATCH 5306/8469] Force consistent ordering with PYTHONHASHSEED=0 --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9afbf067c3..ac12cd7ea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,12 @@ python: - 3.4 - 3.5 - pypy -# command to run tests +env: + - LANG=C + - PYTHONHASHSEED=0 script: # update egg_info based on setup.py in checkout - python bootstrap.py - - LANG=C python setup.py test --addopts='-rs' + - python setup.py test --addopts='-rs' - python ez_setup.py --version 12.2 From edc8a0e1459cc9c8c08872f5c6262a7ab44dbb15 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 10:11:32 -0500 Subject: [PATCH 5307/8469] I meant for the variables to be defined together --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac12cd7ea4..3f7b14b498 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,7 @@ python: - 3.5 - pypy env: - - LANG=C - - PYTHONHASHSEED=0 + - LANG=C PYTHONHASHSEED=0 script: # update egg_info based on setup.py in checkout - python bootstrap.py From 4660f43ea68a13ddba2de0cdf7da410ea2b3a576 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 10:25:02 -0500 Subject: [PATCH 5308/8469] Try LC_ALL --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f7b14b498..88b9ed8621 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ python: - 3.5 - pypy env: - - LANG=C PYTHONHASHSEED=0 + - LC_ALL=C PYTHONHASHSEED=0 script: # update egg_info based on setup.py in checkout - python bootstrap.py From e36ec568112d58b584383469392ce2e0b43f88e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 11:09:34 -0500 Subject: [PATCH 5309/8469] Bump version installed by bootstrap tester --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 88b9ed8621..cab7064016 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ script: - python bootstrap.py - python setup.py test --addopts='-rs' - - python ez_setup.py --version 12.2 + - python ez_setup.py --version 18.6.1 From 718c66c493beb2e24f7f84a423cec378b7d701a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 11:11:13 -0500 Subject: [PATCH 5310/8469] Re-use metadata loading functionality from Provider. Fixes #469. --- CHANGES.txt | 7 +++++++ pkg_resources/__init__.py | 23 +++++++---------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 32e516d5b4..7f7ab9bd93 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,13 @@ CHANGES ======= +------ +18.7.1 +------ + +* Issue #469: Refactored logic for Issue #419 fix to re-use metadata + loading from Provider. + ---- 18.7 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index eaebb2fa5b..fe5c644df3 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2507,7 +2507,6 @@ def __init__(self, location=None, metadata=None, project_name=None, @classmethod def from_location(cls, location, basename, metadata=None, **kw): project_name, version, py_version, platform = [None]*4 - dist_path = os.path.join(location, basename) basename, ext = os.path.splitext(basename) if ext.lower() in _distributionImpl: cls = _distributionImpl[ext.lower()] @@ -2517,16 +2516,13 @@ def from_location(cls, location, basename, metadata=None, **kw): project_name, version, py_version, platform = match.group( 'name', 'ver', 'pyver', 'plat' ) - - version = cls._version_from_metadata(dist_path) or version return cls( location, metadata, project_name=project_name, version=version, py_version=py_version, platform=platform, **kw - ) + )._reload_version() - @staticmethod - def _version_from_metadata(dist_path): - pass + def _reload_version(self): + return self @property def hashcmp(self): @@ -2824,8 +2820,7 @@ def extras(self): class EggInfoDistribution(Distribution): - @staticmethod - def _version_from_metadata(dist_path): + def _reload_version(self): """ Packages installed by distutils (e.g. numpy or scipy), which uses an old safe_version, and so @@ -2837,13 +2832,9 @@ def _version_from_metadata(dist_path): take an extra step and try to get the version number from the metadata file itself instead of the filename. """ - if not os.path.isfile(dist_path): - return - try: - with open(dist_path) as strm: - return _version_from_file(strm) - except IOError: - pass + md_version = _version_from_file(self._get_metadata(self.PKG_INFO)) + self._version = md_version or self._version + return self class DistInfoDistribution(Distribution): From d693850138a93b2e46262d33e8c1bc0b9b1a7312 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 11:25:18 -0500 Subject: [PATCH 5311/8469] Leave _version unset if no metadata version was found. --- pkg_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index fe5c644df3..c53215c60c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2833,7 +2833,8 @@ def _reload_version(self): the metadata file itself instead of the filename. """ md_version = _version_from_file(self._get_metadata(self.PKG_INFO)) - self._version = md_version or self._version + if md_version: + self._version = md_version return self From 6081eb70a20b2176386973720bbf6fd5d9846644 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 11:53:50 -0500 Subject: [PATCH 5312/8469] Read metadata as utf-8; Fixes failure when LC_ALL=C --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c53215c60c..3cd67fa05e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2021,7 +2021,7 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': - with open(self.path,'rU') as f: + with io.open(self.path, 'rU', encoding='utf-8') as f: metadata = f.read() return metadata raise KeyError("No metadata except PKG-INFO is available") From 5d6c6a9008fa15d8bd116ba61d968a744d85bda4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 12:24:54 -0500 Subject: [PATCH 5313/8469] Run tests with and without LC_ALL=C --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cab7064016..e32524ccd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ python: - 3.5 - pypy env: - - LC_ALL=C PYTHONHASHSEED=0 + - LC_ALL=C + - "" script: # update egg_info based on setup.py in checkout - python bootstrap.py From 81c103f75d22580b14f162103232632444c9ec6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 12:27:21 -0500 Subject: [PATCH 5314/8469] Expect failure on LC_ALL=C also --- setuptools/tests/test_easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 66601bfe11..fa51009884 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -430,8 +430,10 @@ def test_get_script_header(self): expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected + c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) + is_ascii = c_type in ("C", "POSIX") @pytest.mark.xfail( - compat.PY3 and os.environ.get("LC_CTYPE") in ("C", "POSIX"), + compat.PY3 and is_ascii, reason="Test fails in this locale on Python 3" ) @mock.patch.dict(sys.modules, java=mock.Mock(lang=mock.Mock(System= From efededd6aa8be5ab054037ee32680a772d06a3c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 12:41:58 -0500 Subject: [PATCH 5315/8469] Expect failures on these tests due to ASCII --- setuptools/tests/__init__.py | 4 ++++ setuptools/tests/test_easy_install.py | 4 +--- setuptools/tests/test_sdist.py | 8 +++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index b8a29cbac2..a93be13484 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -16,6 +16,10 @@ from setuptools import Feature from setuptools.depends import Require +c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) +is_ascii = c_type in ("C", "POSIX") +fail_on_ascii = pytest.mark.xfail(is_ascii, "Test fails in this locale") + def makeSetup(**args): """Return distribution from 'setup(**args)', without executing commands""" diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fa51009884..00e16b63f5 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -35,7 +35,7 @@ import pkg_resources from .py26compat import tarfile_open -from . import contexts +from . import contexts, is_ascii from .textwrap import DALS @@ -430,8 +430,6 @@ def test_get_script_header(self): expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected - c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) - is_ascii = c_type in ("C", "POSIX") @pytest.mark.xfail( compat.PY3 and is_ascii, reason="Test fails in this locale on Python 3" diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 9013b505db..4313c456d5 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -16,6 +16,8 @@ from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution +from setuptools.tests import fail_on_ascii + SETUP_ATTRS = { 'name': 'sdist_test', @@ -147,6 +149,7 @@ def test_defaults_case_sensitivity(self): assert 'setup.py' not in manifest, manifest assert 'setup.cfg' not in manifest, manifest + @fail_on_ascii def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -256,6 +259,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): # The filelist should have been updated as well assert u_filename not in mm.filelist.files + @fail_on_ascii def test_manifest_is_read_with_utf8_encoding(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -320,9 +324,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): filename = filename.decode('latin-1') assert filename not in cmd.filelist.files - @pytest.mark.skipif(PY3 and locale.getpreferredencoding() != 'UTF-8', - reason='Unittest fails if locale is not utf-8 but the manifests is ' - 'recorded correctly') + @fail_on_ascii def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From df2fad0435a7875bbbb2f91240754d85a8aebc1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 12:45:10 -0500 Subject: [PATCH 5316/8469] Correct usage --- setuptools/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index a93be13484..fed076289b 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -18,7 +18,7 @@ c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) is_ascii = c_type in ("C", "POSIX") -fail_on_ascii = pytest.mark.xfail(is_ascii, "Test fails in this locale") +fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") def makeSetup(**args): """Return distribution from 'setup(**args)', without executing commands""" From 7cb174c62560328ed051bb9596c4926c8577d3d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:06:48 -0500 Subject: [PATCH 5317/8469] Force later pytest --- .travis.yml | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e32524ccd1..537e17554d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,9 @@ env: - LC_ALL=C - "" script: + # avoid VersionConflict when newer version is required + - python -m pip install -U pytest + # update egg_info based on setup.py in checkout - python bootstrap.py diff --git a/setup.py b/setup.py index 9d7f228d21..dfb578a152 100755 --- a/setup.py +++ b/setup.py @@ -159,7 +159,7 @@ def _gen_console_scripts(): scripts=[], tests_require=[ 'setuptools[ssl]', - 'pytest', + 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + sphinx + pytest_runner, From a477a657941bed882db1eec1deb8339f0af2a14a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:09:03 -0500 Subject: [PATCH 5318/8469] Invoke old pip directly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 537e17554d..e8cd2f9ac6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - "" script: # avoid VersionConflict when newer version is required - - python -m pip install -U pytest + - pip install -U pytest # update egg_info based on setup.py in checkout - python bootstrap.py From fac9d7a483ea00e7627a2890e4f5f5f95a7c975c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:10:53 -0500 Subject: [PATCH 5319/8469] Reorder tests --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e8cd2f9ac6..f8722567cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ python: - 3.5 - pypy env: - - LC_ALL=C - "" + - LC_ALL=C script: # avoid VersionConflict when newer version is required - pip install -U pytest From e7fdbbf85712acea80a591d2ec079b5349a53129 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:14:18 -0500 Subject: [PATCH 5320/8469] Try inlining the xfail marker. --- setuptools/tests/test_sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 4313c456d5..cc7661e6ea 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -16,7 +16,7 @@ from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution -from setuptools.tests import fail_on_ascii +from setuptools.tests import fail_on_ascii, is_ascii SETUP_ATTRS = { @@ -149,7 +149,7 @@ def test_defaults_case_sensitivity(self): assert 'setup.py' not in manifest, manifest assert 'setup.cfg' not in manifest, manifest - @fail_on_ascii + @pytest.mark.xfail(is_ascii, reason="Test fails in this locale") def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From 2e46cd7f81c5cf46ae45f8d7687ed4a4f9132a76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:20:47 -0500 Subject: [PATCH 5321/8469] WTF --- setuptools/tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index cc7661e6ea..4d100fad4f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -152,6 +152,7 @@ def test_defaults_case_sensitivity(self): @pytest.mark.xfail(is_ascii, reason="Test fails in this locale") def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. + assert not is_ascii dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' mm = manifest_maker(dist) From b4724ffead99897ce9c1411ff59206977df64f5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:31:01 -0500 Subject: [PATCH 5322/8469] Try setting LC_CTYPE also --- .travis.yml | 2 +- setuptools/tests/test_sdist.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8722567cd..0a7981386f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ python: - pypy env: - "" - - LC_ALL=C + - LC_ALL=C LC_CTYPE=C script: # avoid VersionConflict when newer version is required - pip install -U pytest diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 4d100fad4f..df46518b0a 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """sdist tests""" -import locale import os import shutil import sys @@ -9,14 +8,12 @@ import unicodedata import contextlib -import pytest - import pkg_resources from setuptools.compat import StringIO, unicode, PY3, PY2 from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution -from setuptools.tests import fail_on_ascii, is_ascii +from setuptools.tests import fail_on_ascii SETUP_ATTRS = { @@ -149,10 +146,9 @@ def test_defaults_case_sensitivity(self): assert 'setup.py' not in manifest, manifest assert 'setup.cfg' not in manifest, manifest - @pytest.mark.xfail(is_ascii, reason="Test fails in this locale") + @fail_on_ascii def test_manifest_is_written_with_utf8_encoding(self): # Test for #303. - assert not is_ascii dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' mm = manifest_maker(dist) From adcf02655449638849df8a77064b030a22dd648f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 13:59:18 -0500 Subject: [PATCH 5323/8469] Output the env in the test run --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0a7981386f..0bfb11bb53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,9 @@ script: # avoid VersionConflict when newer version is required - pip install -U pytest + # Output the env, because the travis docs just can't be trusted + - env + # update egg_info based on setup.py in checkout - python bootstrap.py From 8e0ac92076007aa6e49f22029003b9618605c996 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 14:07:15 -0500 Subject: [PATCH 5324/8469] Expect failure running Python 3 only tests on Python 2 --- setuptools/tests/__init__.py | 1 + setuptools/tests/test_sdist.py | 210 +++++++++++++++++---------------- 2 files changed, 107 insertions(+), 104 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index fed076289b..f985a6e4cb 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -20,6 +20,7 @@ is_ascii = c_type in ("C", "POSIX") fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") + def makeSetup(**args): """Return distribution from 'setup(**args)', without executing commands""" diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index df46518b0a..2b4d52070f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -8,6 +8,8 @@ import unicodedata import contextlib +import pytest + import pkg_resources from setuptools.compat import StringIO, unicode, PY3, PY2 from setuptools.command.sdist import sdist @@ -16,6 +18,9 @@ from setuptools.tests import fail_on_ascii +py3_only = pytest.mark.xfail(PY2, reason="Test runs on Python 3 only") + + SETUP_ATTRS = { 'name': 'sdist_test', 'version': '0.0', @@ -181,80 +186,79 @@ def test_manifest_is_written_with_utf8_encoding(self): assert posix(filename) in u_contents - # Python 3 only - if PY3: + @py3_only + def test_write_manifest_allows_utf8_filenames(self): + # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') - def test_write_manifest_allows_utf8_filenames(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') - - # UTF-8 filename - filename = os.path.join(b('sdist_test'), b('smörbröd.py')) - - # Must touch the file or risk removal - open(filename, "w").close() - - # Add filename and write manifest - with quiet(): - mm.run() - u_filename = filename.decode('utf-8') - mm.filelist.files.append(u_filename) - # Re-write manifest - mm.write_manifest() - - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() - - # The manifest should be UTF-8 encoded - contents.decode('UTF-8') - - # The manifest should contain the UTF-8 filename - assert posix(filename) in contents - - # The filelist should have been updated as well - assert u_filename in mm.filelist.files - - def test_write_manifest_skips_non_utf8_filenames(self): - """ - Files that cannot be encoded to UTF-8 (specifically, those that - weren't originally successfully decoded and have surrogate - escapes) should be omitted from the manifest. - See https://bitbucket.org/tarek/distribute/issue/303 for history. - """ - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - mm = manifest_maker(dist) - mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - os.mkdir('sdist_test.egg-info') - - # Latin-1 filename - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) - - # Add filename with surrogates and write manifest - with quiet(): - mm.run() - u_filename = filename.decode('utf-8', 'surrogateescape') - mm.filelist.append(u_filename) - # Re-write manifest - mm.write_manifest() - - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() - - # The manifest should be UTF-8 encoded - contents.decode('UTF-8') - - # The Latin-1 filename should have been skipped - assert posix(filename) not in contents - - # The filelist should have been updated as well - assert u_filename not in mm.filelist.files + # UTF-8 filename + filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + + # Must touch the file or risk removal + open(filename, "w").close() + + # Add filename and write manifest + with quiet(): + mm.run() + u_filename = filename.decode('utf-8') + mm.filelist.files.append(u_filename) + # Re-write manifest + mm.write_manifest() + + manifest = open(mm.manifest, 'rbU') + contents = manifest.read() + manifest.close() + + # The manifest should be UTF-8 encoded + contents.decode('UTF-8') + + # The manifest should contain the UTF-8 filename + assert posix(filename) in contents + + # The filelist should have been updated as well + assert u_filename in mm.filelist.files + + @py3_only + def test_write_manifest_skips_non_utf8_filenames(self): + """ + Files that cannot be encoded to UTF-8 (specifically, those that + weren't originally successfully decoded and have surrogate + escapes) should be omitted from the manifest. + See https://bitbucket.org/tarek/distribute/issue/303 for history. + """ + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + mm = manifest_maker(dist) + mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + os.mkdir('sdist_test.egg-info') + + # Latin-1 filename + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + + # Add filename with surrogates and write manifest + with quiet(): + mm.run() + u_filename = filename.decode('utf-8', 'surrogateescape') + mm.filelist.append(u_filename) + # Re-write manifest + mm.write_manifest() + + manifest = open(mm.manifest, 'rbU') + contents = manifest.read() + manifest.close() + + # The manifest should be UTF-8 encoded + contents.decode('UTF-8') + + # The Latin-1 filename should have been skipped + assert posix(filename) not in contents + + # The filelist should have been updated as well + assert u_filename not in mm.filelist.files @fail_on_ascii def test_manifest_is_read_with_utf8_encoding(self): @@ -288,38 +292,36 @@ def test_manifest_is_read_with_utf8_encoding(self): filename = filename.decode('utf-8') assert filename in cmd.filelist.files - # Python 3 only - if PY3: + @py3_only + def test_read_manifest_skips_non_utf8_filenames(self): + # Test for #303. + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + # Create manifest + with quiet(): + cmd.run() + + # Add Latin-1 filename to manifest + filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') + manifest = open(cmd.manifest, 'ab') + manifest.write(b('\n') + filename) + manifest.close() + + # The file must exist to be included in the filelist + open(filename, 'w').close() + + # Re-read manifest + cmd.filelist.files = [] + with quiet(): + cmd.read_manifest() - def test_read_manifest_skips_non_utf8_filenames(self): - # Test for #303. - dist = Distribution(SETUP_ATTRS) - dist.script_name = 'setup.py' - cmd = sdist(dist) - cmd.ensure_finalized() - - # Create manifest - with quiet(): - cmd.run() - - # Add Latin-1 filename to manifest - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) - cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') - manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n') + filename) - manifest.close() - - # The file must exist to be included in the filelist - open(filename, 'w').close() - - # Re-read manifest - cmd.filelist.files = [] - with quiet(): - cmd.read_manifest() - - # The Latin-1 filename should have been skipped - filename = filename.decode('latin-1') - assert filename not in cmd.filelist.files + # The Latin-1 filename should have been skipped + filename = filename.decode('latin-1') + assert filename not in cmd.filelist.files @fail_on_ascii def test_sdist_with_utf8_encoded_filename(self): From dc67e7816dcc9f2f5d2056fe4b4613c74fe1e0d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 14:08:43 -0500 Subject: [PATCH 5325/8469] Expect fail when LC_ALL=C --- setuptools/tests/test_sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 2b4d52070f..ec3c8aa9a9 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -187,6 +187,7 @@ def test_manifest_is_written_with_utf8_encoding(self): assert posix(filename) in u_contents @py3_only + @fail_on_ascii def test_write_manifest_allows_utf8_filenames(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From 42cba609fdb7b639b9fa6d48742afceb8b6e93ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 14:14:11 -0500 Subject: [PATCH 5326/8469] Bumped to 18.7.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e0cefe2d86..36a0975808 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.8" +DEFAULT_VERSION = "18.7.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index aeb7307bc5..ac653aa16e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.8' +__version__ = '18.7.1' From 7e2d02ab43988a87ec5c2d443f900f382d731b6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 14:14:13 -0500 Subject: [PATCH 5327/8469] Added tag 18.7.1 for changeset 3041e1fc409b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 075aca3008..508adf5b97 100644 --- a/.hgtags +++ b/.hgtags @@ -226,3 +226,4 @@ b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 dfe190b09908f6b953209d13573063809de451b8 18.6 804f87045a901f1dc121cf9149143d654228dc13 18.6.1 67d07805606aead09349d5b91d7d26c68ddad2fc 18.7 +3041e1fc409be90e885968b90faba405420fc161 18.7.1 From dadd14d82c5f1db83704eb1c6da0b62998cb25a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 14:15:38 -0500 Subject: [PATCH 5328/8469] Bumped to 18.7.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 36a0975808..975b45c56c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.7.1" +DEFAULT_VERSION = "18.7.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index ac653aa16e..5e40c6584c 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.7.1' +__version__ = '18.7.2' From 98ea00965bed70ccf57eb58394d15739fb7372ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 21:59:33 -0500 Subject: [PATCH 5329/8469] Use context manager for opening file --- setuptools/command/easy_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9e9c5e544f..547a88428d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -805,9 +805,8 @@ def write_script(self, script_name, contents, mode="t", blockers=()): 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): From 2086ae7b381287872add8fe9a91b74498d501679 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Dec 2015 22:00:45 -0500 Subject: [PATCH 5330/8469] Extract variable --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 547a88428d..79f068b1d0 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -772,8 +772,8 @@ def install_script(self, dist, script_name, script_text, dev_path=None): 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 From 9a86e5c638a16afc092c9895ae24c4669248448e Mon Sep 17 00:00:00 2001 From: Stanislaw Pitucha Date: Mon, 7 Dec 2015 16:13:26 +1100 Subject: [PATCH 5331/8469] Fix multiline strings with missing spaces --- setuptools/dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d7ad46552a..03369da81c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -160,7 +160,7 @@ def check_packages(dist, attr, value): for pkgname in value: if not re.match(r'\w+(\.\w+)*', pkgname): distutils.log.warn( - "WARNING: %r not a valid package name; please use only" + "WARNING: %r not a valid package name; please use only " ".-separated package names in setup.py", pkgname ) @@ -818,7 +818,7 @@ def include_in(self,dist): if not self.available: raise DistutilsPlatformError( - self.description+" is required," + self.description+" is required, " "but is not available on this platform" ) From b859bf9ded7c6d4fb056a0b47a11caea6321de60 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Mon, 7 Dec 2015 06:51:09 +0000 Subject: [PATCH 5332/8469] Created new branch get_command_list --HG-- branch : get_command_list From fc916c8ea1f7ac0ee5cc56dfaa0ab4ef6aee1cfb Mon Sep 17 00:00:00 2001 From: Sachi King Date: Mon, 7 Dec 2015 19:52:21 +1300 Subject: [PATCH 5333/8469] Add get_command_list to dist and process distutils.commands entry points --HG-- branch : get_command_list --- setuptools/dist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index d7ad46552a..c5f04b33d1 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -440,6 +440,14 @@ def print_commands(self): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) + def get_command_list(self): + for ep in pkg_resources.iter_entry_points('distutils.commands'): + if ep.name not in self.cmdclass: + # don't require extras as the commands won't be invoked + cmdclass = ep.resolve() + self.cmdclass[ep.name] = cmdclass + return _Distribution.get_command_list(self) + def _set_feature(self,name,status): """Set feature's inclusion status""" setattr(self,self._feature_attrname(name),status) From bb967deca4ff251c5aa8f0404b1223e94d9a301b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 19:04:13 -0500 Subject: [PATCH 5334/8469] Don't rely on repr for an HTML attribute value (could end up with 'u' prefix). Fixes #471. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cabf10392f..dd2df22987 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1037,7 +1037,7 @@ def local_open(url): break elif os.path.isdir(os.path.join(filename,f)): f+='/' - files.append("%s" % (f,f)) + files.append('{name}'.format(name=f)) else: body = ("%s" % url) + \ "%s" % '\n'.join(files) From 59e47d76244bf25a9c385800328394e97be74b48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 19:06:03 -0500 Subject: [PATCH 5335/8469] Update syntax for modern style --- setuptools/package_index.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index dd2df22987..330b83919e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1031,12 +1031,12 @@ 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: + if f == 'index.html': + with open(os.path.join(filename, f), 'r') as fp: body = fp.read() break - elif os.path.isdir(os.path.join(filename,f)): - f+='/' + elif os.path.isdir(os.path.join(filename, f)): + f += '/' files.append('{name}'.format(name=f)) else: body = ("%s" % url) + \ From 5a662289e866fb9bac77736ffede2fca05c79367 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 19:06:41 -0500 Subject: [PATCH 5336/8469] Extract variable --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 330b83919e..1c156f0753 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1031,11 +1031,12 @@ def local_open(url): elif path.endswith('/') and os.path.isdir(filename): files = [] for f in os.listdir(filename): + filepath = os.path.join(filename, f) if f == 'index.html': - with open(os.path.join(filename, f), 'r') as fp: + with open(filepath, 'r') as fp: body = fp.read() break - elif os.path.isdir(os.path.join(filename, f)): + elif os.path.isdir(filepath): f += '/' files.append('{name}'.format(name=f)) else: From 95ac77a928a08c836c6f4ccc066a797357207abc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 19:14:04 -0500 Subject: [PATCH 5337/8469] Use new string formatting here as well --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1c156f0753..525cb64578 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1040,8 +1040,9 @@ def local_open(url): f += '/' files.append('{name}'.format(name=f)) else: - body = ("%s" % url) + \ - "%s" % '\n'.join(files) + tmpl = ("{url}" + "{files}") + body = tmpl.format(url=url, files='\n'.join(files)) status, message = 200, "OK" else: status, message, body = 404, "Path not found", "Not found" From 434d573a2d4d1c7b00d36f8c4f8b5c4b64b46e63 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 19:36:18 -0500 Subject: [PATCH 5338/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 7f7ab9bd93..bacace8d33 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,13 @@ CHANGES ======= +------ +18.7.2 +------ + +* Issue #471: Don't rely on repr for an HTML attribute value in + package_index. + ------ 18.7.1 ------ From 91afe3b30dd32d439ab8914ba3a80bbe2d9f293c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2015 21:24:40 -0500 Subject: [PATCH 5339/8469] Avoid errors when metadata directory is broken. Ref #419. --- CHANGES.txt | 2 ++ pkg_resources/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bacace8d33..a48cd3e10d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ CHANGES * Issue #471: Don't rely on repr for an HTML attribute value in package_index. +* Issue #419: Avoid errors in FileMetadata when the metadata directory + is broken. ------ 18.7.1 diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3cd67fa05e..2cb851b102 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2017,7 +2017,7 @@ def __init__(self, path): 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': From a377c191b9394376988029934ec26f1edaab1812 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:45:38 -0500 Subject: [PATCH 5340/8469] Remove deprecated use of 'U' in io.open mode parameter. Fixes #472. --- CHANGES.txt | 2 ++ pkg_resources/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index a48cd3e10d..0fcf4c6196 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES package_index. * Issue #419: Avoid errors in FileMetadata when the metadata directory is broken. +* Issue #472: Remove deprecated use of 'U' in mode parameter + when opening files. ------ 18.7.1 diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2cb851b102..f65fef3eaf 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2021,7 +2021,7 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': - with io.open(self.path, 'rU', encoding='utf-8') 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") From e76a139ca4fad75c4ce8b3bc95e0009ea0823eb5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:48:31 -0500 Subject: [PATCH 5341/8469] Use io.open in build_py --- setuptools/command/build_py.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index a873d54b10..779adf2a92 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -5,6 +5,8 @@ import sys import fnmatch import textwrap +import io + try: from setuptools.lib2to3_ex import Mixin2to3 @@ -157,7 +159,7 @@ def check_package(self, package, package_dir): else: return init_py - f = open(init_py, 'rbU') + f = io.open(init_py, 'rb') if 'declare_namespace'.encode() not in f.read(): from distutils.errors import DistutilsError From 2ef88b8e709f0c090a3f7f8c7f612aacbbcd648f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:49:48 -0500 Subject: [PATCH 5342/8469] Use context manager for closing file --- setuptools/command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 779adf2a92..c971626c1a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -159,7 +159,8 @@ def check_package(self, package, package_dir): else: return init_py - f = io.open(init_py, 'rb') + with io.open(init_py, 'rb') as f: + contents = f.read() if 'declare_namespace'.encode() not in f.read(): from distutils.errors import DistutilsError @@ -169,7 +170,6 @@ def check_package(self, package, package_dir): 'fix it.\n(See the setuptools manual under ' '"Namespace Packages" for details.)\n"' % (package,) ) - f.close() return init_py def initialize_options(self): From d7b8b096a206b178d588049a396d5687dbe7235a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:50:30 -0500 Subject: [PATCH 5343/8469] Prefer bytes literal --- setuptools/command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index c971626c1a..f0d767054d 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -161,7 +161,7 @@ def check_package(self, package, package_dir): with io.open(init_py, 'rb') as f: contents = f.read() - if 'declare_namespace'.encode() not in f.read(): + if b'declare_namespace' not in f.read(): from distutils.errors import DistutilsError raise DistutilsError( From 2b2c7c76e8eda4c608183c8e75d9eb0123724135 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:51:23 -0500 Subject: [PATCH 5344/8469] Move import to top --- setuptools/command/build_py.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index f0d767054d..43159c7c41 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -6,6 +6,7 @@ import fnmatch import textwrap import io +import distutils.errors try: @@ -162,9 +163,7 @@ def check_package(self, package, package_dir): with io.open(init_py, 'rb') as f: contents = f.read() if b'declare_namespace' not in f.read(): - from distutils.errors import DistutilsError - - raise DistutilsError( + 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 ' From fc28df6ec826b3bd1ffa89d55d3674aa89d2f5fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:52:39 -0500 Subject: [PATCH 5345/8469] Remove hanging indent --- setuptools/command/build_py.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 43159c7c41..e729f71274 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -183,8 +183,10 @@ def get_package_dir(self, package): 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, [])) + globs = ( + self.exclude_package_data.get('', []) + + self.exclude_package_data.get(package, []) + ) bad = [] for pattern in globs: bad.extend( From a0ad4c94c41a9af9f2479567139ba6489305b9cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 02:59:46 -0500 Subject: [PATCH 5346/8469] Rewrite init/loop/extend as dual-for generator expression. --- setuptools/command/build_py.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index e729f71274..5bbf087055 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -187,14 +187,14 @@ def exclude_data_files(self, package, src_dir, files): 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)) - ) + bad = dict.fromkeys( + item + for pattern in globs + for item in fnmatch.filter( + files, + os.path.join(src_dir, convert_path(pattern)), ) - bad = dict.fromkeys(bad) + ) seen = {} return [ f for f in files if f not in bad From 4e960934f61c50b98953d6cd12b72b30e85bccf3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:00:28 -0500 Subject: [PATCH 5347/8469] Prefer set to dict.fromkeys --- setuptools/command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 5bbf087055..3ae331fd79 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -187,7 +187,7 @@ def exclude_data_files(self, package, src_dir, files): self.exclude_package_data.get('', []) + self.exclude_package_data.get(package, []) ) - bad = dict.fromkeys( + bad = set( item for pattern in globs for item in fnmatch.filter( From 3744e23d533ab5b0ebcb34f6d8792777c3433014 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:14:08 -0500 Subject: [PATCH 5348/8469] Reindent to remove trailing comment --- setuptools/command/build_py.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 3ae331fd79..55aed23069 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -197,8 +197,12 @@ def exclude_data_files(self, package, src_dir, files): ) seen = {} 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 fn not in seen + and seen.setdefault(fn, 1) ] From a8d85057026bc070b2f73b57133f1910218ad815 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:20:12 -0500 Subject: [PATCH 5349/8469] Use a defaultdict and count to track seen items --- setuptools/command/build_py.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 55aed23069..317dbba4a6 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -7,6 +7,8 @@ import textwrap import io import distutils.errors +import collections +import itertools try: @@ -195,14 +197,13 @@ def exclude_data_files(self, package, src_dir, files): os.path.join(src_dir, convert_path(pattern)), ) ) - seen = {} + seen = collections.defaultdict(itertools.count) return [ fn for fn in files if fn not in bad # ditch dupes - and fn not in seen - and seen.setdefault(fn, 1) + and not next(seen[fn]) ] From 1c7e97f95ea74c241b91dfb975c709940ba00f47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:26:58 -0500 Subject: [PATCH 5350/8469] Remove unused import --- setuptools/command/build_py.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 317dbba4a6..b2dafec970 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -2,7 +2,6 @@ from distutils.util import convert_path import distutils.command.build_py as orig import os -import sys import fnmatch import textwrap import io From 41112f5afd0d2b0c14899ab1cf2c27183e64d6ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:34:35 -0500 Subject: [PATCH 5351/8469] Use io.open for future compatibility and consistency --- setuptools/command/build_py.py | 2 +- setuptools/command/develop.py | 6 +++--- setuptools/command/egg_info.py | 4 ++-- setuptools/command/sdist.py | 6 ++---- setuptools/tests/test_sdist.py | 18 +++++++++--------- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b2dafec970..8a50f03261 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -163,7 +163,7 @@ def check_package(self, package, package_dir): with io.open(init_py, 'rb') as f: contents = f.read() - if b'declare_namespace' not in 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 " diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 5ae25d71c4..3a16cdc79b 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -3,6 +3,7 @@ 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 @@ -163,9 +164,8 @@ def install_egg_scripts(self, dist): 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): diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 50f3d5c0c2..9a9193c136 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -10,6 +10,7 @@ import os import re import sys +import io try: from setuptools_svn import svn_utils @@ -471,10 +472,9 @@ def get_pkg_info_revision(): # a subversion revision # if os.path.exists('PKG-INFO'): - f = open('PKG-INFO', 'rU') + 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)) - f.close() return 0 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 851a177524..71196512aa 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -3,6 +3,7 @@ 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 @@ def _manifest_is_not_generated(self): 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()) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index ec3c8aa9a9..8ec9a4cb7d 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -7,6 +7,7 @@ import tempfile import unicodedata import contextlib +import io import pytest @@ -81,6 +82,11 @@ def decompose(path): return path +def read_all_bytes(filename): + with io.open(filename, 'rb') as fp: + return fp.read() + + class TestSdistTest: def setup_method(self, method): @@ -172,9 +178,7 @@ def test_manifest_is_written_with_utf8_encoding(self): mm.filelist.append(filename) mm.write_manifest() - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() + contents = read_all_bytes(mm.manifest) # The manifest should be UTF-8 encoded u_contents = contents.decode('UTF-8') @@ -210,9 +214,7 @@ def test_write_manifest_allows_utf8_filenames(self): # Re-write manifest mm.write_manifest() - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() + contents = read_all_bytes(mm.manifest) # The manifest should be UTF-8 encoded contents.decode('UTF-8') @@ -248,9 +250,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): # Re-write manifest mm.write_manifest() - manifest = open(mm.manifest, 'rbU') - contents = manifest.read() - manifest.close() + contents = read_all_bytes(mm.manifest) # The manifest should be UTF-8 encoded contents.decode('UTF-8') From 50d864aa0693530a70efd6ffc8007d8328bfea6d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:35:46 -0500 Subject: [PATCH 5352/8469] Reindent --- setuptools/command/egg_info.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9a9193c136..fb94a04431 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -472,9 +472,9 @@ def get_pkg_info_revision(): # a subversion revision # if os.path.exists('PKG-INFO'): - 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)) + 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 From 1265c31f954afe7a1e47edc6dddfe7a5d4c9aa2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:40:13 -0500 Subject: [PATCH 5353/8469] Replace comment with docstring --- setuptools/command/egg_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index fb94a04431..57e89c0707 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -468,9 +468,10 @@ 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. + """ if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: From ebaf4f2547e71247248abc77f9899e2106482646 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:51:59 -0500 Subject: [PATCH 5354/8469] Deprecate get_pkg_info_revision --- CHANGES.txt | 7 ++++--- setuptools/command/egg_info.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0fcf4c6196..cb9bb02d04 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,10 +3,11 @@ CHANGES ======= ------- -18.7.2 ------- +---- +18.8 +---- +* Deprecated ``egg_info.get_pkg_info_revision``. * Issue #471: Don't rely on repr for an HTML attribute value in package_index. * Issue #419: Avoid errors in FileMetadata when the metadata directory diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 57e89c0707..3afd0a4528 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -11,6 +11,7 @@ import re import sys import io +import warnings try: from setuptools_svn import svn_utils @@ -472,6 +473,7 @@ def get_pkg_info_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'): with io.open('PKG-INFO') as f: for line in f: From 6840f40ad0cc4df8c98cd8b78f4c86d6200c1b57 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:53:38 -0500 Subject: [PATCH 5355/8469] Remove check that would never succeed, because svn_utils always returns an integer and get_svn_revision always returns a non-empty string. --- setuptools/command/egg_info.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 3afd0a4528..28aa79941b 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -186,9 +186,7 @@ def tags(self): 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 From 2a379eac97f2defcb828589ad5b46ace8a54d0f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:54:32 -0500 Subject: [PATCH 5356/8469] Reorganize imports --- setuptools/command/egg_info.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 28aa79941b..8b393a71ab 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -13,11 +13,6 @@ import io import warnings -try: - from setuptools_svn import svn_utils -except ImportError: - pass - from setuptools import Command from setuptools.command.sdist import sdist from setuptools.compat import basestring, PY3, StringIO @@ -29,6 +24,12 @@ 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" From 81ca4fea9e4672f39864439f2049108ad731c8fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:57:25 -0500 Subject: [PATCH 5357/8469] Move imports to top --- setuptools/command/egg_info.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8b393a71ab..1301bd84e1 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -12,11 +12,15 @@ import sys import io import warnings +import time + +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) @@ -61,8 +65,6 @@ def initialize_options(self): 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, @@ -189,8 +191,6 @@ def tags(self): if self.tag_svn_revision: version += '-r%s' % self.get_svn_revision() if self.tag_date: - import time - version += time.strftime("-%Y%m%d") return version @@ -391,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) From a718819d2849196e902808301c9a95724510c5c1 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 10 Dec 2015 11:35:41 +1300 Subject: [PATCH 5358/8469] First shot at removing usage of _markerlib and switching to the PEP 508 implementation in packaging. --- Makefile | 3 + _markerlib/__init__.py | 16 - _markerlib/markers.py | 119 - pkg_resources/__init__.py | 158 +- pkg_resources/_vendor/packaging/__about__.py | 24 +- pkg_resources/_vendor/packaging/__init__.py | 16 +- pkg_resources/_vendor/packaging/_compat.py | 16 +- .../_vendor/packaging/_structures.py | 16 +- pkg_resources/_vendor/packaging/markers.py | 249 ++ .../_vendor/packaging/requirements.py | 118 + pkg_resources/_vendor/packaging/specifiers.py | 38 +- pkg_resources/_vendor/packaging/version.py | 16 +- pkg_resources/_vendor/pyparsing.py | 3805 +++++++++++++++++ pkg_resources/_vendor/vendored.txt | 1 + pkg_resources/api_tests.txt | 64 +- pkg_resources/tests/test_markers.py | 8 +- setuptools/tests/test_dist_info.py | 1 - setuptools/tests/test_markerlib.py | 63 - 18 files changed, 4259 insertions(+), 472 deletions(-) delete mode 100644 _markerlib/__init__.py delete mode 100644 _markerlib/markers.py create mode 100644 pkg_resources/_vendor/packaging/markers.py create mode 100644 pkg_resources/_vendor/packaging/requirements.py create mode 100644 pkg_resources/_vendor/pyparsing.py delete mode 100644 setuptools/tests/test_markerlib.py diff --git a/Makefile b/Makefile index 37dd26eb91..c2295cda54 100644 --- a/Makefile +++ b/Makefile @@ -3,5 +3,8 @@ empty: update-vendored: rm -rf pkg_resources/_vendor/packaging + rm -rf pkg_resources/_vendor/pyparsing pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ + sed -i -e 's/ \(pyparsing\)/ pkg_resources._vendor.\1/' \ + pkg_resources/_vendor/packaging/*.py rm -rf pkg_resources/_vendor/*.{egg,dist}-info diff --git a/_markerlib/__init__.py b/_markerlib/__init__.py deleted file mode 100644 index e2b237b1f6..0000000000 --- a/_markerlib/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - import ast - from _markerlib.markers import default_environment, compile, interpret -except ImportError: - if 'ast' in globals(): - raise - def default_environment(): - return {} - def compile(marker): - def marker_fn(environment=None, override=None): - # 'empty markers are True' heuristic won't install extra deps. - return not marker.strip() - marker_fn.__doc__ = marker - return marker_fn - def interpret(marker, environment=None, override=None): - return compile(marker)() diff --git a/_markerlib/markers.py b/_markerlib/markers.py deleted file mode 100644 index fa837061e0..0000000000 --- a/_markerlib/markers.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -"""Interpret PEP 345 environment markers. - -EXPR [in|==|!=|not in] EXPR [or|and] ... - -where EXPR belongs to any of those: - - python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - python_full_version = sys.version.split()[0] - os.name = os.name - sys.platform = sys.platform - platform.version = platform.version() - platform.machine = platform.machine() - platform.python_implementation = platform.python_implementation() - a free string, like '2.6', or 'win32' -""" - -__all__ = ['default_environment', 'compile', 'interpret'] - -import ast -import os -import platform -import sys -import weakref - -_builtin_compile = compile - -try: - from platform import python_implementation -except ImportError: - if os.name == "java": - # Jython 2.5 has ast module, but not platform.python_implementation() function. - def python_implementation(): - return "Jython" - else: - raise - - -# restricted set of variables -_VARS = {'sys.platform': sys.platform, - 'python_version': '%s.%s' % sys.version_info[:2], - # FIXME parsing sys.platform is not reliable, but there is no other - # way to get e.g. 2.7.2+, and the PEP is defined with sys.version - 'python_full_version': sys.version.split(' ', 1)[0], - 'os.name': os.name, - 'platform.version': platform.version(), - 'platform.machine': platform.machine(), - 'platform.python_implementation': python_implementation(), - 'extra': None # wheel extension - } - -for var in list(_VARS.keys()): - if '.' in var: - _VARS[var.replace('.', '_')] = _VARS[var] - -def default_environment(): - """Return copy of default PEP 385 globals dictionary.""" - return dict(_VARS) - -class ASTWhitelist(ast.NodeTransformer): - def __init__(self, statement): - self.statement = statement # for error messages - - ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str) - # Bool operations - ALLOWED += (ast.And, ast.Or) - # Comparison operations - ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn) - - def visit(self, node): - """Ensure statement only contains allowed nodes.""" - if not isinstance(node, self.ALLOWED): - raise SyntaxError('Not allowed in environment markers.\n%s\n%s' % - (self.statement, - (' ' * node.col_offset) + '^')) - return ast.NodeTransformer.visit(self, node) - - def visit_Attribute(self, node): - """Flatten one level of attribute access.""" - new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx) - return ast.copy_location(new_node, node) - -def parse_marker(marker): - tree = ast.parse(marker, mode='eval') - new_tree = ASTWhitelist(marker).generic_visit(tree) - return new_tree - -def compile_marker(parsed_marker): - return _builtin_compile(parsed_marker, '', 'eval', - dont_inherit=True) - -_cache = weakref.WeakValueDictionary() - -def compile(marker): - """Return compiled marker as a function accepting an environment dict.""" - try: - return _cache[marker] - except KeyError: - pass - if not marker.strip(): - def marker_fn(environment=None, override=None): - """""" - return True - else: - compiled_marker = compile_marker(parse_marker(marker)) - def marker_fn(environment=None, override=None): - """override updates environment""" - if override is None: - override = {} - if environment is None: - environment = default_environment() - environment.update(override) - return eval(compiled_marker, environment) - marker_fn.__doc__ = marker - _cache[marker] = marker_fn - return _cache[marker] - -def interpret(marker, environment=None): - return compile(marker)(environment) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3cd67fa05e..82a357022b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -90,6 +90,8 @@ try: import pkg_resources._vendor.packaging.version import pkg_resources._vendor.packaging.specifiers + import pkg_resources._vendor.packaging.requirements + import pkg_resources._vendor.packaging.markers packaging = pkg_resources._vendor.packaging except ImportError: # fallback to naturally-installed version; allows system packagers to @@ -1420,13 +1422,15 @@ class MarkerEvaluation(object): @classmethod def is_invalid_marker(cls, text): """ - Validate text as a PEP 426 environment marker; return an exception + Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise. """ try: cls.evaluate_marker(text) - except SyntaxError as e: - return cls.normalize_exception(e) + except packaging.markers.InvalidMarker as e: + e.filename = None + e.lineno = None + return e return False @staticmethod @@ -1518,48 +1522,14 @@ def get_op(cls, op): @classmethod def evaluate_marker(cls, text, extra=None): """ - Evaluate a PEP 426 environment marker on CPython 2.4+. + Evaluate a PEP 508 environment marker on CPython 2.4+. Return a boolean indicating the marker result in this environment. - Raise SyntaxError if marker is invalid. + Raise InvalidMarker if marker is invalid. - This implementation uses the 'parser' module, which is not implemented - on - Jython and has been superseded by the 'ast' module in Python 2.6 and - later. + This implementation uses the 'pyparsing' module. """ - return cls.interpret(parser.expr(text).totuple(1)[1]) - - @staticmethod - def _translate_metadata2(env): - """ - Markerlib implements Metadata 1.2 (PEP 345) environment markers. - Translate the variables to Metadata 2.0 (PEP 426). - """ - return dict( - (key.replace('.', '_'), value) - for key, value in env - ) - - @classmethod - def _markerlib_evaluate(cls, text): - """ - Evaluate a PEP 426 environment marker using markerlib. - Return a boolean indicating the marker result in this environment. - Raise SyntaxError if marker is invalid. - """ - import _markerlib - - env = cls._translate_metadata2(_markerlib.default_environment()) - try: - result = _markerlib.interpret(text, env) - except NameError as e: - raise SyntaxError(e.args[0]) - return result - - if 'parser' not in globals(): - # Fall back to less-complete _markerlib implementation if 'parser' module - # is not available. - evaluate_marker = _markerlib_evaluate + marker = packaging.markers.Marker(text) + return marker.evaluate() @classmethod def interpret(cls, nodelist): @@ -2314,18 +2284,6 @@ def yield_lines(strs): for s in yield_lines(ss): yield s -# whitespace and comment -LINE_END = re.compile(r"\s*(#.*)?$").match -# line continuation -CONTINUE = re.compile(r"\s*\\\s*(#.*)?$").match -# Distribution or extra -DISTRO = re.compile(r"\s*((\w|[-.])+)").match -# ver. info -VERSION = re.compile(r"\s*(<=?|>=?|===?|!=|~=)\s*((\w|[-.*_!+])+)").match -# comma between items -COMMA = re.compile(r"\s*,").match -OBRACKET = re.compile(r"\s*\[").match -CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( r""" @@ -2861,34 +2819,22 @@ def _dep_map(self): self.__dep_map = self._compute_dependencies() return self.__dep_map - def _preparse_requirement(self, requires_dist): - """Convert 'Foobar (1); baz' to ('Foobar ==1', 'baz') - Split environment marker, add == prefix to version specifiers as - necessary, and remove parenthesis. - """ - parts = requires_dist.split(';', 1) + [''] - distvers = parts[0].strip() - mark = parts[1].strip() - distvers = re.sub(self.EQEQ, r"\1==\2\3", distvers) - distvers = distvers.replace('(', '').replace(')', '') - return (distvers, mark) - def _compute_dependencies(self): """Recompute this distribution's dependencies.""" - from _markerlib import compile as compile_marker dm = self.__dep_map = {None: []} reqs = [] # Including any condition expressions for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: - distvers, mark = self._preparse_requirement(req) - parsed = next(parse_requirements(distvers)) - parsed.marker_fn = compile_marker(mark) + current_req = packaging.requirements.Requirement(req) + specs = _parse_requirement_specs(current_req) + parsed = Requirement(current_req.name, specs, current_req.extras) + parsed._marker = current_req.marker reqs.append(parsed) def reqs_for_extra(extra): for req in reqs: - if req.marker_fn(override={'extra':extra}): + if not req._marker or req._marker.evaluate({'extra': extra}): yield req common = frozenset(reqs_for_extra(None)) @@ -2926,6 +2872,13 @@ def __str__(self): return ' '.join(self.args) +def _parse_requirement_specs(req): + if req.specifier: + return [(spec.operator, spec.version) for spec in req.specifier] + else: + return [] + + def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` @@ -2934,60 +2887,17 @@ def parse_requirements(strs): # create a steppable iterator, so we can handle \-continuations lines = iter(yield_lines(strs)) - def scan_list(ITEM, TERMINATOR, line, p, groups, item_name): - - items = [] - - while not TERMINATOR(line, p): - if CONTINUE(line, p): - try: - line = next(lines) - p = 0 - except StopIteration: - msg = "\\ must not appear on the last nonblank line" - raise RequirementParseError(msg) - - match = ITEM(line, p) - if not match: - msg = "Expected " + item_name + " in" - raise RequirementParseError(msg, line, "at", line[p:]) - - items.append(match.group(*groups)) - p = match.end() - - match = COMMA(line, p) - if match: - # skip the comma - p = match.end() - elif not TERMINATOR(line, p): - msg = "Expected ',' or end-of-list in" - raise RequirementParseError(msg, line, "at", line[p:]) - - match = TERMINATOR(line, p) - # skip the terminator, if any - if match: - p = match.end() - return line, p, items - for line in lines: - match = DISTRO(line) - if not match: - raise RequirementParseError("Missing distribution spec", line) - project_name = match.group(1) - p = match.end() - extras = [] - - match = OBRACKET(line, p) - if match: - p = match.end() - line, p, extras = scan_list( - DISTRO, CBRACKET, line, p, (1,), "'extra' name" - ) - - line, p, specs = scan_list(VERSION, LINE_END, line, p, (1, 2), - "version spec") - specs = [(op, val) for op, val in specs] - yield Requirement(project_name, specs, extras) + # Drop comments -- a hash without a space may be in a URL. + if ' #' in line: + line = line[:line.find(' #')] + # If there is a line continuation, drop it, and append the next line. + if line.endswith('\\'): + line = line[:-2].strip() + line += next(lines) + req = packaging.requirements.Requirement(line) + specs = _parse_requirement_specs(req) + yield Requirement(req.name, specs, req.extras) class Requirement: diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index eadb794eec..7058e69a47 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function __all__ = [ @@ -22,10 +12,10 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "15.3" +__version__ = "15.4.dev0" -__author__ = "Donald Stufft" +__author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" -__license__ = "Apache License, Version 2.0" -__copyright__ = "Copyright 2014 %s" % __author__ +__license__ = "BSD or Apache License, Version 2.0" +__copyright__ = "Copyright 2014-2015 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/__init__.py b/pkg_resources/_vendor/packaging/__init__.py index c39a8eab8e..5ee6220203 100644 --- a/pkg_resources/_vendor/packaging/__init__.py +++ b/pkg_resources/_vendor/packaging/__init__.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function from .__about__ import ( diff --git a/pkg_resources/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py index 5c396ceac6..210bb80b7e 100644 --- a/pkg_resources/_vendor/packaging/_compat.py +++ b/pkg_resources/_vendor/packaging/_compat.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function import sys diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py index 0ae9bb52a2..ccc27861c3 100644 --- a/pkg_resources/_vendor/packaging/_structures.py +++ b/pkg_resources/_vendor/packaging/_structures.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py new file mode 100644 index 0000000000..e9c6805ad8 --- /dev/null +++ b/pkg_resources/_vendor/packaging/markers.py @@ -0,0 +1,249 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import operator +import os +import platform +import sys + +from pkg_resources._vendor.pyparsing import ParseException, ParseResults, stringStart, stringEnd +from pkg_resources._vendor.pyparsing import ZeroOrMore, Group, Forward, QuotedString +from pkg_resources._vendor.pyparsing import Literal as L # noqa + +from ._compat import string_types +from .specifiers import Specifier, InvalidSpecifier + + +__all__ = [ + "InvalidMarker", "UndefinedComparison", "Marker", "default_environment", +] + + +class InvalidMarker(ValueError): + """ + An invalid marker was found, users should refer to PEP 508. + """ + + +class UndefinedComparison(ValueError): + """ + An invalid operation was attempted on a value that doesn't support it. + """ + + +class Node(object): + + def __init__(self, value): + self.value = value + + def __str__(self): + return str(self.value) + + def __repr__(self): + return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) + + +class Variable(Node): + pass + + +class Value(Node): + pass + + +VARIABLE = ( + L("implementation_version") | + L("python_implementation") | + L("implementation_name") | + L("python_full_version") | + L("platform_release") | + L("platform_version") | + L("platform_machine") | + L("platform_system") | + L("python_version") | + L("sys_platform") | + L("os_name") | + L("extra") +) +VARIABLE.setParseAction(lambda s, l, t: Variable(t[0])) + +VERSION_CMP = ( + L("===") | + L("==") | + L(">=") | + L("<=") | + L("!=") | + L("~=") | + L(">") | + L("<") +) + +MARKER_OP = VERSION_CMP | L("not in") | L("in") + +MARKER_VALUE = QuotedString("'") | QuotedString('"') +MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0])) + +BOOLOP = L("and") | L("or") + +MARKER_VAR = VARIABLE | MARKER_VALUE + +MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR) +MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0])) + +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() + +MARKER_EXPR = Forward() +MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN) +MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR) + +MARKER = stringStart + MARKER_EXPR + stringEnd + + +def _coerce_parse_result(results): + if isinstance(results, ParseResults): + return [_coerce_parse_result(i) for i in results] + else: + return results + + +def _format_marker(marker, first=True): + assert isinstance(marker, (list, tuple, string_types)) + + # Sometimes we have a structure like [[...]] which is a single item list + # where the single item is itself it's own list. In that case we want skip + # the rest of this function so that we don't get extraneous () on the + # outside. + if (isinstance(marker, list) and len(marker) == 1 + and isinstance(marker[0], (list, tuple))): + return _format_marker(marker[0]) + + if isinstance(marker, list): + inner = (_format_marker(m, first=False) for m in marker) + if first: + return " ".join(inner) + else: + return "(" + " ".join(inner) + ")" + elif isinstance(marker, tuple): + return '{0} {1} "{2}"'.format(*marker) + else: + return marker + + +_operators = { + "in": lambda lhs, rhs: lhs in rhs, + "not in": lambda lhs, rhs: lhs not in rhs, + "<": operator.lt, + "<=": operator.le, + "==": operator.eq, + "!=": operator.ne, + ">=": operator.ge, + ">": operator.gt, +} + + +def _eval_op(lhs, op, rhs): + try: + spec = Specifier("".join([op, rhs])) + except InvalidSpecifier: + pass + else: + return spec.contains(lhs) + + oper = _operators.get(op) + if oper is None: + raise UndefinedComparison( + "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) + ) + + return oper(lhs, rhs) + + +def _evaluate_markers(markers, environment): + groups = [[]] + + for marker in markers: + assert isinstance(marker, (list, tuple, string_types)) + + if isinstance(marker, list): + groups[-1].append(_evaluate_markers(marker, environment)) + elif isinstance(marker, tuple): + lhs, op, rhs = marker + if isinstance(lhs, Variable): + value = _eval_op(environment[lhs.value], op, rhs.value) + else: + value = _eval_op(lhs.value, op, environment[rhs.value]) + groups[-1].append(value) + else: + assert marker in ["and", "or"] + if marker == "or": + groups.append([]) + + return any(all(item) for item in groups) + + +def format_full_version(info): + version = '{0.major}.{0.minor}.{0.micro}'.format(info) + kind = info.releaselevel + if kind != 'final': + version += kind[0] + str(info.serial) + return version + + +def default_environment(): + if hasattr(sys, 'implementation'): + iver = format_full_version(sys.implementation.version) + implementation_name = sys.implementation.name + else: + iver = '0' + implementation_name = '' + + return { + "implementation_name": implementation_name, + "implementation_version": iver, + "os_name": os.name, + "platform_machine": platform.machine(), + "platform_release": platform.release(), + "platform_system": platform.system(), + "platform_version": platform.version(), + "python_full_version": platform.python_version(), + "python_implementation": platform.python_implementation(), + "python_version": platform.python_version()[:3], + "sys_platform": sys.platform, + } + + +class Marker(object): + + def __init__(self, marker): + try: + self._markers = _coerce_parse_result(MARKER.parseString(marker)) + except ParseException: + self._markers = None + + # We do this because we can't do raise ... from None in Python 2.x + if self._markers is None: + raise InvalidMarker("Invalid marker: {0!r}".format(marker)) + + def __str__(self): + return _format_marker(self._markers) + + def __repr__(self): + return "".format(str(self)) + + def evaluate(self, environment=None): + """Evaluate a marker. + + Return the boolean from evaluating the given marker against the + environment. environment is an optional argument to override all or + part of the determined environment. + + The environment is determined from the current Python process. + """ + current_environment = default_environment() + if environment is not None: + current_environment.update(environment) + + return _evaluate_markers(self._markers, current_environment) diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py new file mode 100644 index 0000000000..95b2d986cc --- /dev/null +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -0,0 +1,118 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import string +import re + +from pkg_resources._vendor.pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from pkg_resources._vendor.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from pkg_resources._vendor.pyparsing import Literal as L # noqa +from six.moves.urllib import parse as urlparse + +from .markers import MARKER_EXPR, Marker +from .specifiers import LegacySpecifier, Specifier, SpecifierSet + + +class InvalidRequirement(ValueError): + """ + An invalid requirement was found, users should refer to PEP 508. + """ + + +ALPHANUM = Word(string.ascii_letters + string.digits) + +LBRACKET = L("[").suppress() +RBRACKET = L("]").suppress() +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() +COMMA = L(",").suppress() +SEMICOLON = L(";").suppress() +AT = L("@").suppress() + +PUNCTUATION = Word("-_.") +IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM) +IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END)) + +NAME = IDENTIFIER("name") +EXTRA = IDENTIFIER + +URI = Regex(r'[^ ]+')("url") +URL = (AT + URI) + +EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) +EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") + +VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE) +VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) + +VERSION_ONE = VERSION_PEP440 | VERSION_LEGACY +VERSION_MANY = VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE) +VERSION_MANY.setParseAction( + lambda s, l, t: SpecifierSet(','.join(t.asList())) +) +VERSION_SPEC = ((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)("specifier") + +MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") +MARKER_EXPR.setParseAction( + lambda s, l, t: Marker(s[t._original_start:t._original_end]) +) +MARKER_SEPERATOR = SEMICOLON +MARKER = MARKER_SEPERATOR + MARKER_EXPR + +VERSION_AND_MARKER = Optional(VERSION_SPEC) + Optional(MARKER) +URL_AND_MARKER = URL + Optional(MARKER) + +NAMED_REQUIREMENT = \ + NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) + +REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd + + +class Requirement(object): + + # TODO: Can we test whether something is contained within a requirement? + # If so how do we do that? Do we need to test against the _name_ of + # the thing as well as the version? What about the markers? + # TODO: Can we normalize the name and extra name? + + def __init__(self, requirement_string): + try: + req = REQUIREMENT.parseString(requirement_string) + except ParseException: + raise InvalidRequirement( + "Invalid requirement: {0!r}".format(requirement_string)) + + self.name = req.name + if req.url: + parsed_url = urlparse.urlparse(req.url) + if not (parsed_url.scheme and parsed_url.netloc) or ( + not parsed_url.scheme and not parsed_url.netloc): + raise InvalidRequirement("Invalid URL given") + self.url = req.url + else: + self.url = None + self.extras = req.extras.asList() if req.extras else [] + self.specifier = req.specifier if req.specifier else None + self.marker = req.marker if req.marker else None + + def __str__(self): + parts = [self.name] + + if self.extras: + parts.append("[{0}]".format(",".join(sorted(self.extras)))) + + if self.specifier: + parts.append(str(self.specifier)) + + if self.url: + parts.append("@ {0}".format(self.url)) + + if self.marker: + parts.append("; {0}".format(self.marker)) + + return "".join(parts) + + def __repr__(self): + return "".format(str(self)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 891664f05c..b1fca708e9 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function import abc @@ -223,10 +213,8 @@ def filter(self, iterable, prereleases=None): class LegacySpecifier(_IndividualSpecifier): - _regex = re.compile( + _regex_str = ( r""" - ^ - \s* (?P(==|!=|<=|>=|<|>)) \s* (?P @@ -234,12 +222,11 @@ class LegacySpecifier(_IndividualSpecifier): # is a "legacy" specifier and the version string can be just # about anything. ) - \s* - $ - """, - re.VERBOSE | re.IGNORECASE, + """ ) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.X | re.I) + _operators = { "==": "equal", "!=": "not_equal", @@ -284,10 +271,8 @@ def wrapped(self, prospective, spec): class Specifier(_IndividualSpecifier): - _regex = re.compile( + _regex_str = ( r""" - ^ - \s* (?P(~=|==|!=|<=|>=|<|>|===)) (?P (?: @@ -378,12 +363,11 @@ class Specifier(_IndividualSpecifier): (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release ) ) - \s* - $ - """, - re.VERBOSE | re.IGNORECASE, + """ ) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.X | re.I) + _operators = { "~=": "compatible", "==": "equal", diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index 4ba574b9fa..83b5ee8c5e 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -1,16 +1,6 @@ -# Copyright 2014 Donald Stufft -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. from __future__ import absolute_import, division, print_function import collections diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py new file mode 100644 index 0000000000..3e02dbee20 --- /dev/null +++ b/pkg_resources/_vendor/pyparsing.py @@ -0,0 +1,3805 @@ +# module pyparsing.py +# +# Copyright (c) 2003-2015 Paul T. McGuire +# +# 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. +# + +__doc__ = \ +""" +pyparsing module - Classes and methods to define and execute parsing grammars + +The pyparsing module is an alternative approach to creating and executing simple grammars, +vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you +don't need to learn a new syntax for defining grammars or matching expressions - the parsing module +provides a library of classes that you use to construct the grammar directly in Python. + +Here is a program to parse "Hello, World!" (or any greeting of the form C{", !"}):: + + from pyparsing import Word, alphas + + # define grammar of a greeting + greet = Word( alphas ) + "," + Word( alphas ) + "!" + + hello = "Hello, World!" + print (hello, "->", greet.parseString( hello )) + +The program outputs the following:: + + Hello, World! -> ['Hello', ',', 'World', '!'] + +The Python representation of the grammar is quite readable, owing to the self-explanatory +class names, and the use of '+', '|' and '^' operators. + +The parsed results returned from C{parseString()} can be accessed as a nested list, a dictionary, or an +object with named attributes. + +The pyparsing module handles some of the problems that are typically vexing when writing text parsers: + - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) + - quoted strings + - embedded comments +""" + +__version__ = "2.0.6" +__versionTime__ = "9 Nov 2015 19:03" +__author__ = "Paul McGuire " + +import string +from weakref import ref as wkref +import copy +import sys +import warnings +import re +import sre_constants +import collections +import pprint +import functools +import itertools + +#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) ) + +__all__ = [ +'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty', +'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal', +'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or', +'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException', +'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException', +'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 'Upcase', +'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore', +'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col', +'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString', +'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums', +'htmlComment', 'javaStyleComment', 'keepOriginalText', 'line', 'lineEnd', 'lineStart', 'lineno', +'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral', +'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables', +'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity', +'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd', +'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute', +'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass', +] + +PY_3 = sys.version.startswith('3') +if PY_3: + _MAX_INT = sys.maxsize + basestring = str + unichr = chr + _ustr = str + + # build list of single arg builtins, that can be used as parse actions + singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max] + +else: + _MAX_INT = sys.maxint + range = xrange + + def _ustr(obj): + """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries + str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It + then < returns the unicode object | encodes it with the default encoding | ... >. + """ + if isinstance(obj,unicode): + return obj + + try: + # If this works, then _ustr(obj) has the same behaviour as str(obj), so + # it won't break any existing code. + return str(obj) + + except UnicodeEncodeError: + # The Python docs (http://docs.python.org/ref/customization.html#l2h-182) + # state that "The return value must be a string object". However, does a + # unicode object (being a subclass of basestring) count as a "string + # object"? + # If so, then return a unicode object: + return unicode(obj) + # Else encode it... but how? There are many choices... :) + # Replace unprintables with escape codes? + #return unicode(obj).encode(sys.getdefaultencoding(), 'backslashreplace_errors') + # Replace unprintables with question marks? + #return unicode(obj).encode(sys.getdefaultencoding(), 'replace') + # ... + + # build list of single arg builtins, tolerant of Python version, that can be used as parse actions + singleArgBuiltins = [] + import __builtin__ + for fname in "sum len sorted reversed list tuple set any all min max".split(): + try: + singleArgBuiltins.append(getattr(__builtin__,fname)) + except AttributeError: + continue + +_generatorType = type((y for y in range(1))) + +def _xml_escape(data): + """Escape &, <, >, ", ', etc. in a string of data.""" + + # ampersand must be replaced first + from_symbols = '&><"\'' + to_symbols = ('&'+s+';' for s in "amp gt lt quot apos".split()) + for from_,to_ in zip(from_symbols, to_symbols): + data = data.replace(from_, to_) + return data + +class _Constants(object): + pass + +alphas = string.ascii_lowercase + string.ascii_uppercase +nums = "0123456789" +hexnums = nums + "ABCDEFabcdef" +alphanums = alphas + nums +_bslash = chr(92) +printables = "".join(c for c in string.printable if c not in string.whitespace) + +class ParseBaseException(Exception): + """base exception class for all parsing runtime exceptions""" + # Performance tuning: we construct a *lot* of these, so keep this + # constructor as small and fast as possible + def __init__( self, pstr, loc=0, msg=None, elem=None ): + self.loc = loc + if msg is None: + self.msg = pstr + self.pstr = "" + else: + self.msg = msg + self.pstr = pstr + self.parserElement = elem + + def __getattr__( self, aname ): + """supported attributes by name are: + - lineno - returns the line number of the exception text + - col - returns the column number of the exception text + - line - returns the line containing the exception text + """ + if( aname == "lineno" ): + return lineno( self.loc, self.pstr ) + elif( aname in ("col", "column") ): + return col( self.loc, self.pstr ) + elif( aname == "line" ): + return line( self.loc, self.pstr ) + else: + raise AttributeError(aname) + + def __str__( self ): + return "%s (at char %d), (line:%d, col:%d)" % \ + ( self.msg, self.loc, self.lineno, self.column ) + def __repr__( self ): + return _ustr(self) + def markInputline( self, markerString = ">!<" ): + """Extracts the exception line from the input string, and marks + the location of the exception with a special symbol. + """ + line_str = self.line + line_column = self.column - 1 + if markerString: + line_str = "".join((line_str[:line_column], + markerString, line_str[line_column:])) + return line_str.strip() + def __dir__(self): + return "loc msg pstr parserElement lineno col line " \ + "markInputline __str__ __repr__".split() + +class ParseException(ParseBaseException): + """exception thrown when parse expressions don't match class; + supported attributes by name are: + - lineno - returns the line number of the exception text + - col - returns the column number of the exception text + - line - returns the line containing the exception text + """ + pass + +class ParseFatalException(ParseBaseException): + """user-throwable exception thrown when inconsistent parse content + is found; stops all parsing immediately""" + pass + +class ParseSyntaxException(ParseFatalException): + """just like C{L{ParseFatalException}}, but thrown internally when an + C{L{ErrorStop}} ('-' operator) indicates that parsing is to stop immediately because + an unbacktrackable syntax error has been found""" + def __init__(self, pe): + super(ParseSyntaxException, self).__init__( + pe.pstr, pe.loc, pe.msg, pe.parserElement) + +#~ class ReparseException(ParseBaseException): + #~ """Experimental class - parse actions can raise this exception to cause + #~ pyparsing to reparse the input string: + #~ - with a modified input string, and/or + #~ - with a modified start location + #~ Set the values of the ReparseException in the constructor, and raise the + #~ exception in a parse action to cause pyparsing to use the new string/location. + #~ Setting the values as None causes no change to be made. + #~ """ + #~ def __init_( self, newstring, restartLoc ): + #~ self.newParseText = newstring + #~ self.reparseLoc = restartLoc + +class RecursiveGrammarException(Exception): + """exception thrown by C{validate()} if the grammar could be improperly recursive""" + def __init__( self, parseElementList ): + self.parseElementTrace = parseElementList + + def __str__( self ): + return "RecursiveGrammarException: %s" % self.parseElementTrace + +class _ParseResultsWithOffset(object): + def __init__(self,p1,p2): + self.tup = (p1,p2) + def __getitem__(self,i): + return self.tup[i] + def __repr__(self): + return repr(self.tup) + def setOffset(self,i): + self.tup = (self.tup[0],i) + +class ParseResults(object): + """Structured parse results, to provide multiple means of access to the parsed data: + - as a list (C{len(results)}) + - by list index (C{results[0], results[1]}, etc.) + - by attribute (C{results.}) + """ + def __new__(cls, toklist, name=None, asList=True, modal=True ): + if isinstance(toklist, cls): + return toklist + retobj = object.__new__(cls) + retobj.__doinit = True + return retobj + + # Performance tuning: we construct a *lot* of these, so keep this + # constructor as small and fast as possible + def __init__( self, toklist, name=None, asList=True, modal=True, isinstance=isinstance ): + if self.__doinit: + self.__doinit = False + self.__name = None + self.__parent = None + self.__accumNames = {} + if isinstance(toklist, list): + self.__toklist = toklist[:] + elif isinstance(toklist, _generatorType): + self.__toklist = list(toklist) + else: + self.__toklist = [toklist] + self.__tokdict = dict() + + if name is not None and name: + if not modal: + self.__accumNames[name] = 0 + if isinstance(name,int): + name = _ustr(name) # will always return a str, but use _ustr for consistency + self.__name = name + if not (isinstance(toklist, (type(None), basestring, list)) and toklist in (None,'',[])): + if isinstance(toklist,basestring): + toklist = [ toklist ] + if asList: + if isinstance(toklist,ParseResults): + self[name] = _ParseResultsWithOffset(toklist.copy(),0) + else: + self[name] = _ParseResultsWithOffset(ParseResults(toklist[0]),0) + self[name].__name = name + else: + try: + self[name] = toklist[0] + except (KeyError,TypeError,IndexError): + self[name] = toklist + + def __getitem__( self, i ): + if isinstance( i, (int,slice) ): + return self.__toklist[i] + else: + if i not in self.__accumNames: + return self.__tokdict[i][-1][0] + else: + return ParseResults([ v[0] for v in self.__tokdict[i] ]) + + def __setitem__( self, k, v, isinstance=isinstance ): + if isinstance(v,_ParseResultsWithOffset): + self.__tokdict[k] = self.__tokdict.get(k,list()) + [v] + sub = v[0] + elif isinstance(k,int): + self.__toklist[k] = v + sub = v + else: + self.__tokdict[k] = self.__tokdict.get(k,list()) + [_ParseResultsWithOffset(v,0)] + sub = v + if isinstance(sub,ParseResults): + sub.__parent = wkref(self) + + def __delitem__( self, i ): + if isinstance(i,(int,slice)): + mylen = len( self.__toklist ) + del self.__toklist[i] + + # convert int to slice + if isinstance(i, int): + if i < 0: + i += mylen + i = slice(i, i+1) + # get removed indices + removed = list(range(*i.indices(mylen))) + removed.reverse() + # fixup indices in token dictionary + #~ for name in self.__tokdict: + #~ occurrences = self.__tokdict[name] + #~ for j in removed: + #~ for k, (value, position) in enumerate(occurrences): + #~ occurrences[k] = _ParseResultsWithOffset(value, position - (position > j)) + for name,occurrences in self.__tokdict.items(): + for j in removed: + for k, (value, position) in enumerate(occurrences): + occurrences[k] = _ParseResultsWithOffset(value, position - (position > j)) + else: + del self.__tokdict[i] + + def __contains__( self, k ): + return k in self.__tokdict + + def __len__( self ): return len( self.__toklist ) + def __bool__(self): return len( self.__toklist ) > 0 + __nonzero__ = __bool__ + def __iter__( self ): return iter( self.__toklist ) + def __reversed__( self ): return iter( self.__toklist[::-1] ) + def iterkeys( self ): + """Returns all named result keys.""" + if hasattr(self.__tokdict, "iterkeys"): + return self.__tokdict.iterkeys() + else: + return iter(self.__tokdict) + + def itervalues( self ): + """Returns all named result values.""" + return (self[k] for k in self.iterkeys()) + + def iteritems( self ): + return ((k, self[k]) for k in self.iterkeys()) + + if PY_3: + keys = iterkeys + values = itervalues + items = iteritems + else: + def keys( self ): + """Returns all named result keys.""" + return list(self.iterkeys()) + + def values( self ): + """Returns all named result values.""" + return list(self.itervalues()) + + def items( self ): + """Returns all named result keys and values as a list of tuples.""" + return list(self.iteritems()) + + def haskeys( self ): + """Since keys() returns an iterator, this method is helpful in bypassing + code that looks for the existence of any defined results names.""" + return bool(self.__tokdict) + + def pop( self, *args, **kwargs): + """Removes and returns item at specified index (default=last). + Supports both list and dict semantics for pop(). If passed no + argument or an integer argument, it will use list semantics + and pop tokens from the list of parsed tokens. If passed a + non-integer argument (most likely a string), it will use dict + semantics and pop the corresponding value from any defined + results names. A second default return value argument is + supported, just as in dict.pop().""" + if not args: + args = [-1] + for k,v in kwargs.items(): + if k == 'default': + args = (args[0], v) + else: + raise TypeError("pop() got an unexpected keyword argument '%s'" % k) + if (isinstance(args[0], int) or + len(args) == 1 or + args[0] in self): + index = args[0] + ret = self[index] + del self[index] + return ret + else: + defaultvalue = args[1] + return defaultvalue + + def get(self, key, defaultValue=None): + """Returns named result matching the given key, or if there is no + such name, then returns the given C{defaultValue} or C{None} if no + C{defaultValue} is specified.""" + if key in self: + return self[key] + else: + return defaultValue + + def insert( self, index, insStr ): + """Inserts new element at location index in the list of parsed tokens.""" + self.__toklist.insert(index, insStr) + # fixup indices in token dictionary + #~ for name in self.__tokdict: + #~ occurrences = self.__tokdict[name] + #~ for k, (value, position) in enumerate(occurrences): + #~ occurrences[k] = _ParseResultsWithOffset(value, position + (position > index)) + for name,occurrences in self.__tokdict.items(): + for k, (value, position) in enumerate(occurrences): + occurrences[k] = _ParseResultsWithOffset(value, position + (position > index)) + + def append( self, item ): + """Add single element to end of ParseResults list of elements.""" + self.__toklist.append(item) + + def extend( self, itemseq ): + """Add sequence of elements to end of ParseResults list of elements.""" + if isinstance(itemseq, ParseResults): + self += itemseq + else: + self.__toklist.extend(itemseq) + + def clear( self ): + """Clear all elements and results names.""" + del self.__toklist[:] + self.__tokdict.clear() + + def __getattr__( self, name ): + try: + return self[name] + except KeyError: + return "" + + if name in self.__tokdict: + if name not in self.__accumNames: + return self.__tokdict[name][-1][0] + else: + return ParseResults([ v[0] for v in self.__tokdict[name] ]) + else: + return "" + + def __add__( self, other ): + ret = self.copy() + ret += other + return ret + + def __iadd__( self, other ): + if other.__tokdict: + offset = len(self.__toklist) + addoffset = lambda a: offset if a<0 else a+offset + otheritems = other.__tokdict.items() + otherdictitems = [(k, _ParseResultsWithOffset(v[0],addoffset(v[1])) ) + for (k,vlist) in otheritems for v in vlist] + for k,v in otherdictitems: + self[k] = v + if isinstance(v[0],ParseResults): + v[0].__parent = wkref(self) + + self.__toklist += other.__toklist + self.__accumNames.update( other.__accumNames ) + return self + + def __radd__(self, other): + if isinstance(other,int) and other == 0: + return self.copy() + + def __repr__( self ): + return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) ) + + def __str__( self ): + return '[' + ', '.join(_ustr(i) if isinstance(i, ParseResults) else repr(i) for i in self.__toklist) + ']' + + def _asStringList( self, sep='' ): + out = [] + for item in self.__toklist: + if out and sep: + out.append(sep) + if isinstance( item, ParseResults ): + out += item._asStringList() + else: + out.append( _ustr(item) ) + return out + + def asList( self ): + """Returns the parse results as a nested list of matching tokens, all converted to strings.""" + return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist] + + def asDict( self ): + """Returns the named parse results as dictionary.""" + if PY_3: + return dict( self.items() ) + else: + return dict( self.iteritems() ) + + def copy( self ): + """Returns a new copy of a C{ParseResults} object.""" + ret = ParseResults( self.__toklist ) + ret.__tokdict = self.__tokdict.copy() + ret.__parent = self.__parent + ret.__accumNames.update( self.__accumNames ) + ret.__name = self.__name + return ret + + def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ): + """Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.""" + nl = "\n" + out = [] + namedItems = dict((v[1],k) for (k,vlist) in self.__tokdict.items() + for v in vlist) + nextLevelIndent = indent + " " + + # collapse out indents if formatting is not desired + if not formatted: + indent = "" + nextLevelIndent = "" + nl = "" + + selfTag = None + if doctag is not None: + selfTag = doctag + else: + if self.__name: + selfTag = self.__name + + if not selfTag: + if namedItemsOnly: + return "" + else: + selfTag = "ITEM" + + out += [ nl, indent, "<", selfTag, ">" ] + + for i,res in enumerate(self.__toklist): + if isinstance(res,ParseResults): + if i in namedItems: + out += [ res.asXML(namedItems[i], + namedItemsOnly and doctag is None, + nextLevelIndent, + formatted)] + else: + out += [ res.asXML(None, + namedItemsOnly and doctag is None, + nextLevelIndent, + formatted)] + else: + # individual token, see if there is a name for it + resTag = None + if i in namedItems: + resTag = namedItems[i] + if not resTag: + if namedItemsOnly: + continue + else: + resTag = "ITEM" + xmlBodyText = _xml_escape(_ustr(res)) + out += [ nl, nextLevelIndent, "<", resTag, ">", + xmlBodyText, + "" ] + + out += [ nl, indent, "" ] + return "".join(out) + + def __lookup(self,sub): + for k,vlist in self.__tokdict.items(): + for v,loc in vlist: + if sub is v: + return k + return None + + def getName(self): + """Returns the results name for this token expression.""" + if self.__name: + return self.__name + elif self.__parent: + par = self.__parent() + if par: + return par.__lookup(self) + else: + return None + elif (len(self) == 1 and + len(self.__tokdict) == 1 and + self.__tokdict.values()[0][0][1] in (0,-1)): + return self.__tokdict.keys()[0] + else: + return None + + def dump(self,indent='',depth=0): + """Diagnostic method for listing out the contents of a C{ParseResults}. + Accepts an optional C{indent} argument so that this string can be embedded + in a nested display of other data.""" + out = [] + NL = '\n' + out.append( indent+_ustr(self.asList()) ) + if self.haskeys(): + items = sorted(self.items()) + for k,v in items: + if out: + out.append(NL) + out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) + if isinstance(v,ParseResults): + if v: + out.append( v.dump(indent,depth+1) ) + else: + out.append(_ustr(v)) + else: + out.append(_ustr(v)) + elif any(isinstance(vv,ParseResults) for vv in self): + v = self + for i,vv in enumerate(v): + if isinstance(vv,ParseResults): + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),vv.dump(indent,depth+1) )) + else: + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),_ustr(vv))) + + return "".join(out) + + def pprint(self, *args, **kwargs): + """Pretty-printer for parsed results as a list, using the C{pprint} module. + Accepts additional positional or keyword args as defined for the + C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})""" + pprint.pprint(self.asList(), *args, **kwargs) + + # add support for pickle protocol + def __getstate__(self): + return ( self.__toklist, + ( self.__tokdict.copy(), + self.__parent is not None and self.__parent() or None, + self.__accumNames, + self.__name ) ) + + def __setstate__(self,state): + self.__toklist = state[0] + (self.__tokdict, + par, + inAccumNames, + self.__name) = state[1] + self.__accumNames = {} + self.__accumNames.update(inAccumNames) + if par is not None: + self.__parent = wkref(par) + else: + self.__parent = None + + def __dir__(self): + return dir(super(ParseResults,self)) + list(self.keys()) + +collections.MutableMapping.register(ParseResults) + +def col (loc,strg): + """Returns current column within a string, counting newlines as line separators. + The first column is number 1. + + Note: the default parsing behavior is to expand tabs in the input string + before starting the parsing process. See L{I{ParserElement.parseString}} for more information + on parsing strings containing C{}s, and suggested methods to maintain a + consistent view of the parsed string, the parse location, and line and column + positions within the parsed string. + """ + s = strg + return 1 if loc} for more information + on parsing strings containing C{}s, and suggested methods to maintain a + consistent view of the parsed string, the parse location, and line and column + positions within the parsed string. + """ + return strg.count("\n",0,loc) + 1 + +def line( loc, strg ): + """Returns the line of text containing loc within a string, counting newlines as line separators. + """ + lastCR = strg.rfind("\n", 0, loc) + nextCR = strg.find("\n", loc) + if nextCR >= 0: + return strg[lastCR+1:nextCR] + else: + return strg[lastCR+1:] + +def _defaultStartDebugAction( instring, loc, expr ): + print (("Match " + _ustr(expr) + " at loc " + _ustr(loc) + "(%d,%d)" % ( lineno(loc,instring), col(loc,instring) ))) + +def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ): + print ("Matched " + _ustr(expr) + " -> " + str(toks.asList())) + +def _defaultExceptionDebugAction( instring, loc, expr, exc ): + print ("Exception raised:" + _ustr(exc)) + +def nullDebugAction(*args): + """'Do-nothing' debug action, to suppress debugging output during parsing.""" + pass + +# Only works on Python 3.x - nonlocal is toxic to Python 2 installs +#~ 'decorator to trim function calls to match the arity of the target' +#~ def _trim_arity(func, maxargs=3): + #~ if func in singleArgBuiltins: + #~ return lambda s,l,t: func(t) + #~ limit = 0 + #~ foundArity = False + #~ def wrapper(*args): + #~ nonlocal limit,foundArity + #~ while 1: + #~ try: + #~ ret = func(*args[limit:]) + #~ foundArity = True + #~ return ret + #~ except TypeError: + #~ if limit == maxargs or foundArity: + #~ raise + #~ limit += 1 + #~ continue + #~ return wrapper + +# this version is Python 2.x-3.x cross-compatible +'decorator to trim function calls to match the arity of the target' +def _trim_arity(func, maxargs=2): + if func in singleArgBuiltins: + return lambda s,l,t: func(t) + limit = [0] + foundArity = [False] + def wrapper(*args): + while 1: + try: + ret = func(*args[limit[0]:]) + foundArity[0] = True + return ret + except TypeError: + if limit[0] <= maxargs and not foundArity[0]: + limit[0] += 1 + continue + raise + return wrapper + +class ParserElement(object): + """Abstract base level parser element class.""" + DEFAULT_WHITE_CHARS = " \n\t\r" + verbose_stacktrace = False + + @staticmethod + def setDefaultWhitespaceChars( chars ): + """Overrides the default whitespace chars + """ + ParserElement.DEFAULT_WHITE_CHARS = chars + + @staticmethod + def inlineLiteralsUsing(cls): + """ + Set class to be used for inclusion of string literals into a parser. + """ + ParserElement.literalStringClass = cls + + def __init__( self, savelist=False ): + self.parseAction = list() + self.failAction = None + #~ self.name = "" # don't define self.name, let subclasses try/except upcall + self.strRepr = None + self.resultsName = None + self.saveAsList = savelist + self.skipWhitespace = True + self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS + self.copyDefaultWhiteChars = True + self.mayReturnEmpty = False # used when checking for left-recursion + self.keepTabs = False + self.ignoreExprs = list() + self.debug = False + self.streamlined = False + self.mayIndexError = True # used to optimize exception handling for subclasses that don't advance parse index + self.errmsg = "" + self.modalResults = True # used to mark results names as modal (report only last) or cumulative (list all) + self.debugActions = ( None, None, None ) #custom debug actions + self.re = None + self.callPreparse = True # used to avoid redundant calls to preParse + self.callDuringTry = False + + def copy( self ): + """Make a copy of this C{ParserElement}. Useful for defining different parse actions + for the same parsing pattern, using copies of the original parse element.""" + cpy = copy.copy( self ) + cpy.parseAction = self.parseAction[:] + cpy.ignoreExprs = self.ignoreExprs[:] + if self.copyDefaultWhiteChars: + cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS + return cpy + + def setName( self, name ): + """Define name for this expression, for use in debugging.""" + self.name = name + self.errmsg = "Expected " + self.name + if hasattr(self,"exception"): + self.exception.msg = self.errmsg + return self + + def setResultsName( self, name, listAllMatches=False ): + """Define name for referencing matching tokens as a nested attribute + of the returned parse results. + NOTE: this returns a *copy* of the original C{ParserElement} object; + this is so that the client can define a basic element, such as an + integer, and reference it in multiple places with different names. + + You can also set results names using the abbreviated syntax, + C{expr("name")} in place of C{expr.setResultsName("name")} - + see L{I{__call__}<__call__>}. + """ + newself = self.copy() + if name.endswith("*"): + name = name[:-1] + listAllMatches=True + newself.resultsName = name + newself.modalResults = not listAllMatches + return newself + + def setBreak(self,breakFlag = True): + """Method to invoke the Python pdb debugger when this element is + about to be parsed. Set C{breakFlag} to True to enable, False to + disable. + """ + if breakFlag: + _parseMethod = self._parse + def breaker(instring, loc, doActions=True, callPreParse=True): + import pdb + pdb.set_trace() + return _parseMethod( instring, loc, doActions, callPreParse ) + breaker._originalParseMethod = _parseMethod + self._parse = breaker + else: + if hasattr(self._parse,"_originalParseMethod"): + self._parse = self._parse._originalParseMethod + return self + + def setParseAction( self, *fns, **kwargs ): + """Define action 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) + - loc = the location of the matching substring + - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object + If the functions in fns modify the tokens, they can return them as the return + value from fn, and the modified list of tokens will replace the original. + Otherwise, fn does not need to return any value. + + Note: the default parsing behavior is to expand tabs in the input string + before starting the parsing process. See L{I{parseString}} for more information + on parsing strings containing C{}s, and suggested methods to maintain a + consistent view of the parsed string, the parse location, and line and column + positions within the parsed string. + """ + self.parseAction = list(map(_trim_arity, list(fns))) + self.callDuringTry = kwargs.get("callDuringTry", False) + return self + + def addParseAction( self, *fns, **kwargs ): + """Add parse action to expression's list of parse actions. See L{I{setParseAction}}.""" + self.parseAction += list(map(_trim_arity, list(fns))) + self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False) + return self + + def addCondition(self, *fns, **kwargs): + """Add a boolean predicate function to expression's list of parse actions. See + L{I{setParseAction}}. Optional keyword argument C{message} can + be used to define a custom message to be used in the raised exception.""" + msg = kwargs.get("message") or "failed user-defined condition" + for fn in fns: + def pa(s,l,t): + if not bool(_trim_arity(fn)(s,l,t)): + raise ParseException(s,l,msg) + return t + self.parseAction.append(pa) + self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False) + return self + + def setFailAction( self, fn ): + """Define action to perform if parsing fails at this expression. + Fail acton fn is a callable function that takes the arguments + C{fn(s,loc,expr,err)} where: + - s = string being parsed + - loc = location where expression match was attempted and failed + - expr = the parse expression that failed + - err = the exception thrown + The function returns no value. It may throw C{L{ParseFatalException}} + if it is desired to stop parsing immediately.""" + self.failAction = fn + return self + + def _skipIgnorables( self, instring, loc ): + exprsFound = True + while exprsFound: + exprsFound = False + for e in self.ignoreExprs: + try: + while 1: + loc,dummy = e._parse( instring, loc ) + exprsFound = True + except ParseException: + pass + return loc + + def preParse( self, instring, loc ): + if self.ignoreExprs: + loc = self._skipIgnorables( instring, loc ) + + if self.skipWhitespace: + wt = self.whiteChars + instrlen = len(instring) + while loc < instrlen and instring[loc] in wt: + loc += 1 + + return loc + + def parseImpl( self, instring, loc, doActions=True ): + return loc, [] + + def postParse( self, instring, loc, tokenlist ): + return tokenlist + + #~ @profile + def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ): + debugging = ( self.debug ) #and doActions ) + + if debugging or self.failAction: + #~ print ("Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )) + if (self.debugActions[0] ): + self.debugActions[0]( instring, loc, self ) + if callPreParse and self.callPreparse: + preloc = self.preParse( instring, loc ) + else: + preloc = loc + tokensStart = preloc + try: + try: + loc,tokens = self.parseImpl( instring, preloc, doActions ) + except IndexError: + raise ParseException( instring, len(instring), self.errmsg, self ) + except ParseBaseException as err: + #~ print ("Exception raised:", err) + if self.debugActions[2]: + self.debugActions[2]( instring, tokensStart, self, err ) + if self.failAction: + self.failAction( instring, tokensStart, self, err ) + raise + else: + if callPreParse and self.callPreparse: + preloc = self.preParse( instring, loc ) + else: + preloc = loc + tokensStart = preloc + if self.mayIndexError or loc >= len(instring): + try: + loc,tokens = self.parseImpl( instring, preloc, doActions ) + except IndexError: + raise ParseException( instring, len(instring), self.errmsg, self ) + else: + loc,tokens = self.parseImpl( instring, preloc, doActions ) + + tokens = self.postParse( instring, loc, tokens ) + + retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults ) + if self.parseAction and (doActions or self.callDuringTry): + if debugging: + try: + for fn in self.parseAction: + tokens = fn( instring, tokensStart, retTokens ) + if tokens is not None: + retTokens = ParseResults( tokens, + self.resultsName, + asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), + modal=self.modalResults ) + except ParseBaseException as err: + #~ print "Exception raised in user parse action:", err + if (self.debugActions[2] ): + self.debugActions[2]( instring, tokensStart, self, err ) + raise + else: + for fn in self.parseAction: + tokens = fn( instring, tokensStart, retTokens ) + if tokens is not None: + retTokens = ParseResults( tokens, + self.resultsName, + asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), + modal=self.modalResults ) + + if debugging: + #~ print ("Matched",self,"->",retTokens.asList()) + if (self.debugActions[1] ): + self.debugActions[1]( instring, tokensStart, loc, self, retTokens ) + + return loc, retTokens + + def tryParse( self, instring, loc ): + try: + return self._parse( instring, loc, doActions=False )[0] + except ParseFatalException: + raise ParseException( instring, loc, self.errmsg, self) + + # this method gets repeatedly called during backtracking with the same arguments - + # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression + def _parseCache( self, instring, loc, doActions=True, callPreParse=True ): + lookup = (self,instring,loc,callPreParse,doActions) + if lookup in ParserElement._exprArgCache: + value = ParserElement._exprArgCache[ lookup ] + if isinstance(value, Exception): + raise value + return (value[0],value[1].copy()) + else: + try: + value = self._parseNoCache( instring, loc, doActions, callPreParse ) + ParserElement._exprArgCache[ lookup ] = (value[0],value[1].copy()) + return value + except ParseBaseException as pe: + pe.__traceback__ = None + ParserElement._exprArgCache[ lookup ] = pe + raise + + _parse = _parseNoCache + + # argument cache for optimizing repeated calls when backtracking through recursive expressions + _exprArgCache = {} + @staticmethod + def resetCache(): + ParserElement._exprArgCache.clear() + + _packratEnabled = False + @staticmethod + def enablePackrat(): + """Enables "packrat" parsing, which adds memoizing to the parsing logic. + Repeated parse attempts at the same string location (which happens + often in many complex grammars) can immediately return a cached value, + instead of re-executing parsing/validating code. Memoizing is done of + both valid results and parsing exceptions. + + This speedup may break existing programs that use parse actions that + have side-effects. For this reason, packrat parsing is disabled when + you first import pyparsing. To activate the packrat feature, your + program must call the class method C{ParserElement.enablePackrat()}. If + your program uses C{psyco} to "compile as you go", you must call + C{enablePackrat} before calling C{psyco.full()}. If you do not do this, + Python will crash. For best results, call C{enablePackrat()} immediately + after importing pyparsing. + """ + if not ParserElement._packratEnabled: + ParserElement._packratEnabled = True + ParserElement._parse = ParserElement._parseCache + + def parseString( self, instring, parseAll=False ): + """Execute the parse expression with the given string. + This is the main interface to the client code, once the complete + expression has been built. + + If you want the grammar to require that the entire input string be + successfully parsed, then set C{parseAll} to True (equivalent to ending + the grammar with C{L{StringEnd()}}). + + Note: C{parseString} implicitly calls C{expandtabs()} on the input string, + in order to report proper column numbers in parse actions. + If the input string contains tabs and + the grammar uses parse actions that use the C{loc} argument to index into the + string being parsed, you can ensure you have a consistent view of the input + string by: + - calling C{parseWithTabs} on your grammar before calling C{parseString} + (see L{I{parseWithTabs}}) + - define your parse action using the full C{(s,loc,toks)} signature, and + reference the input string using the parse action's C{s} argument + - explictly expand the tabs in your input string before calling + C{parseString} + """ + ParserElement.resetCache() + if not self.streamlined: + self.streamline() + #~ self.saveAsList = True + for e in self.ignoreExprs: + e.streamline() + if not self.keepTabs: + instring = instring.expandtabs() + try: + loc, tokens = self._parse( instring, 0 ) + if parseAll: + loc = self.preParse( instring, loc ) + se = Empty() + StringEnd() + se._parse( instring, loc ) + except ParseBaseException as exc: + if ParserElement.verbose_stacktrace: + raise + else: + # catch and re-raise exception from here, clears out pyparsing internal stack trace + raise exc + else: + return tokens + + def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ): + """Scan the input string for expression matches. Each match will return the + matching tokens, start location, and end location. May be called with optional + C{maxMatches} argument, to clip scanning after 'n' matches are found. If + C{overlap} is specified, then overlapping matches will be reported. + + Note that the start and end locations are reported relative to the string + being parsed. See L{I{parseString}} for more information on parsing + strings with embedded tabs.""" + if not self.streamlined: + self.streamline() + for e in self.ignoreExprs: + e.streamline() + + if not self.keepTabs: + instring = _ustr(instring).expandtabs() + instrlen = len(instring) + loc = 0 + preparseFn = self.preParse + parseFn = self._parse + ParserElement.resetCache() + matches = 0 + try: + while loc <= instrlen and matches < maxMatches: + try: + preloc = preparseFn( instring, loc ) + nextLoc,tokens = parseFn( instring, preloc, callPreParse=False ) + except ParseException: + loc = preloc+1 + else: + if nextLoc > loc: + matches += 1 + yield tokens, preloc, nextLoc + if overlap: + nextloc = preparseFn( instring, loc ) + if nextloc > loc: + loc = nextLoc + else: + loc += 1 + else: + loc = nextLoc + else: + loc = preloc+1 + except ParseBaseException as exc: + if ParserElement.verbose_stacktrace: + raise + else: + # catch and re-raise exception from here, clears out pyparsing internal stack trace + raise exc + + def transformString( self, instring ): + """Extension to C{L{scanString}}, to modify matching text with modified tokens that may + be returned from a parse action. To use C{transformString}, define a grammar and + attach a parse action to it that modifies the returned token list. + Invoking C{transformString()} on a target string will then scan for matches, + and replace the matched text patterns according to the logic in the parse + action. C{transformString()} returns the resulting transformed string.""" + out = [] + lastE = 0 + # force preservation of s, to minimize unwanted transformation of string, and to + # keep string locs straight between transformString and scanString + self.keepTabs = True + try: + for t,s,e in self.scanString( instring ): + out.append( instring[lastE:s] ) + if t: + if isinstance(t,ParseResults): + out += t.asList() + elif isinstance(t,list): + out += t + else: + out.append(t) + lastE = e + out.append(instring[lastE:]) + out = [o for o in out if o] + return "".join(map(_ustr,_flatten(out))) + except ParseBaseException as exc: + if ParserElement.verbose_stacktrace: + raise + else: + # catch and re-raise exception from here, clears out pyparsing internal stack trace + raise exc + + def searchString( self, instring, maxMatches=_MAX_INT ): + """Another extension to C{L{scanString}}, simplifying the access to the tokens found + to match the given parse expression. May be called with optional + C{maxMatches} argument, to clip searching after 'n' matches are found. + """ + try: + return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ]) + except ParseBaseException as exc: + if ParserElement.verbose_stacktrace: + raise + else: + # catch and re-raise exception from here, clears out pyparsing internal stack trace + raise exc + + def __add__(self, other ): + """Implementation of + operator - returns C{L{And}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return And( [ self, other ] ) + + def __radd__(self, other ): + """Implementation of + operator when left operand is not a C{L{ParserElement}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return other + self + + def __sub__(self, other): + """Implementation of - operator, returns C{L{And}} with error stop""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return And( [ self, And._ErrorStop(), other ] ) + + def __rsub__(self, other ): + """Implementation of - operator when left operand is not a C{L{ParserElement}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return other - self + + def __mul__(self,other): + """Implementation of * operator, allows use of C{expr * 3} in place of + C{expr + expr + expr}. Expressions may also me multiplied by a 2-integer + tuple, similar to C{{min,max}} multipliers in regular expressions. Tuples + may also include C{None} as in: + - C{expr*(n,None)} or C{expr*(n,)} is equivalent + to C{expr*n + L{ZeroOrMore}(expr)} + (read as "at least n instances of C{expr}") + - C{expr*(None,n)} is equivalent to C{expr*(0,n)} + (read as "0 to n instances of C{expr}") + - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)} + - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)} + + Note that C{expr*(None,n)} does not raise an exception if + more than n exprs exist in the input stream; that is, + C{expr*(None,n)} does not enforce a maximum number of expr + occurrences. If this behavior is desired, then write + C{expr*(None,n) + ~expr} + + """ + if isinstance(other,int): + minElements, optElements = other,0 + elif isinstance(other,tuple): + other = (other + (None, None))[:2] + if other[0] is None: + other = (0, other[1]) + if isinstance(other[0],int) and other[1] is None: + if other[0] == 0: + return ZeroOrMore(self) + if other[0] == 1: + return OneOrMore(self) + else: + return self*other[0] + ZeroOrMore(self) + elif isinstance(other[0],int) and isinstance(other[1],int): + minElements, optElements = other + optElements -= minElements + else: + raise TypeError("cannot multiply 'ParserElement' and ('%s','%s') objects", type(other[0]),type(other[1])) + else: + raise TypeError("cannot multiply 'ParserElement' and '%s' objects", type(other)) + + if minElements < 0: + raise ValueError("cannot multiply ParserElement by negative value") + if optElements < 0: + raise ValueError("second tuple value must be greater or equal to first tuple value") + if minElements == optElements == 0: + raise ValueError("cannot multiply ParserElement by 0 or (0,0)") + + if (optElements): + def makeOptionalList(n): + if n>1: + return Optional(self + makeOptionalList(n-1)) + else: + return Optional(self) + if minElements: + if minElements == 1: + ret = self + makeOptionalList(optElements) + else: + ret = And([self]*minElements) + makeOptionalList(optElements) + else: + ret = makeOptionalList(optElements) + else: + if minElements == 1: + ret = self + else: + ret = And([self]*minElements) + return ret + + def __rmul__(self, other): + return self.__mul__(other) + + def __or__(self, other ): + """Implementation of | operator - returns C{L{MatchFirst}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return MatchFirst( [ self, other ] ) + + def __ror__(self, other ): + """Implementation of | operator when left operand is not a C{L{ParserElement}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return other | self + + def __xor__(self, other ): + """Implementation of ^ operator - returns C{L{Or}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return Or( [ self, other ] ) + + def __rxor__(self, other ): + """Implementation of ^ operator when left operand is not a C{L{ParserElement}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return other ^ self + + def __and__(self, other ): + """Implementation of & operator - returns C{L{Each}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return Each( [ self, other ] ) + + def __rand__(self, other ): + """Implementation of & operator when left operand is not a C{L{ParserElement}}""" + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + if not isinstance( other, ParserElement ): + warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), + SyntaxWarning, stacklevel=2) + return None + return other & self + + def __invert__( self ): + """Implementation of ~ operator - returns C{L{NotAny}}""" + return NotAny( self ) + + def __call__(self, name=None): + """Shortcut for C{L{setResultsName}}, with C{listAllMatches=default}:: + userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno") + could be written as:: + userdata = Word(alphas)("name") + Word(nums+"-")("socsecno") + + If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be + passed as C{True}. + + If C{name} is omitted, same as calling C{L{copy}}. + """ + if name is not None: + return self.setResultsName(name) + else: + return self.copy() + + def suppress( self ): + """Suppresses the output of this C{ParserElement}; useful to keep punctuation from + cluttering up returned output. + """ + return Suppress( self ) + + def leaveWhitespace( self ): + """Disables the skipping of whitespace before matching the characters in the + C{ParserElement}'s defined pattern. This is normally only used internally by + the pyparsing module, but may be needed in some whitespace-sensitive grammars. + """ + self.skipWhitespace = False + return self + + def setWhitespaceChars( self, chars ): + """Overrides the default whitespace chars + """ + self.skipWhitespace = True + self.whiteChars = chars + self.copyDefaultWhiteChars = False + return self + + def parseWithTabs( self ): + """Overrides default behavior to expand C{}s to spaces before parsing the input string. + Must be called before C{parseString} when the input grammar contains elements that + match C{} characters.""" + self.keepTabs = True + return self + + def ignore( self, other ): + """Define expression to be ignored (e.g., comments) while doing pattern + matching; may be called repeatedly, to define multiple comment or other + ignorable patterns. + """ + if isinstance( other, Suppress ): + if other not in self.ignoreExprs: + self.ignoreExprs.append( other.copy() ) + else: + self.ignoreExprs.append( Suppress( other.copy() ) ) + return self + + def setDebugActions( self, startAction, successAction, exceptionAction ): + """Enable display of debugging messages while doing pattern matching.""" + self.debugActions = (startAction or _defaultStartDebugAction, + successAction or _defaultSuccessDebugAction, + exceptionAction or _defaultExceptionDebugAction) + self.debug = True + return self + + def setDebug( self, flag=True ): + """Enable display of debugging messages while doing pattern matching. + Set C{flag} to True to enable, False to disable.""" + if flag: + self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction ) + else: + self.debug = False + return self + + def __str__( self ): + return self.name + + def __repr__( self ): + return _ustr(self) + + def streamline( self ): + self.streamlined = True + self.strRepr = None + return self + + def checkRecursion( self, parseElementList ): + pass + + def validate( self, validateTrace=[] ): + """Check defined expressions for valid structure, check for infinite recursive definitions.""" + self.checkRecursion( [] ) + + def parseFile( self, file_or_filename, parseAll=False ): + """Execute the parse expression on the given file or filename. + If a filename is specified (instead of a file object), + the entire file is opened, read, and closed before parsing. + """ + try: + file_contents = file_or_filename.read() + except AttributeError: + f = open(file_or_filename, "r") + file_contents = f.read() + f.close() + try: + return self.parseString(file_contents, parseAll) + except ParseBaseException as exc: + if ParserElement.verbose_stacktrace: + raise + else: + # catch and re-raise exception from here, clears out pyparsing internal stack trace + raise exc + + def __eq__(self,other): + if isinstance(other, ParserElement): + return self is other or self.__dict__ == other.__dict__ + elif isinstance(other, basestring): + try: + self.parseString(_ustr(other), parseAll=True) + return True + except ParseBaseException: + return False + else: + return super(ParserElement,self)==other + + def __ne__(self,other): + return not (self == other) + + def __hash__(self): + return hash(id(self)) + + def __req__(self,other): + return self == other + + def __rne__(self,other): + return not (self == other) + + def runTests(self, tests, parseAll=False): + """Execute the parse expression on a series of test strings, showing each + test, the parsed results or where the parse failed. Quick and easy way to + run a parse expression against a list of sample strings. + + Parameters: + - tests - a list of separate test strings, or a multiline string of test strings + - parseAll - (default=False) - flag to pass to C{L{parseString}} when running tests + """ + if isinstance(tests, basestring): + tests = map(str.strip, tests.splitlines()) + for t in tests: + out = [t] + try: + out.append(self.parseString(t, parseAll=parseAll).dump()) + except ParseException as pe: + if '\n' in t: + out.append(line(pe.loc, t)) + out.append(' '*(col(pe.loc,t)-1) + '^') + else: + out.append(' '*pe.loc + '^') + out.append(str(pe)) + out.append('') + print('\n'.join(out)) + + +class Token(ParserElement): + """Abstract C{ParserElement} subclass, for defining atomic matching patterns.""" + def __init__( self ): + super(Token,self).__init__( savelist=False ) + + +class Empty(Token): + """An empty token, will always match.""" + def __init__( self ): + super(Empty,self).__init__() + self.name = "Empty" + self.mayReturnEmpty = True + self.mayIndexError = False + + +class NoMatch(Token): + """A token that will never match.""" + def __init__( self ): + super(NoMatch,self).__init__() + self.name = "NoMatch" + self.mayReturnEmpty = True + self.mayIndexError = False + self.errmsg = "Unmatchable token" + + def parseImpl( self, instring, loc, doActions=True ): + raise ParseException(instring, loc, self.errmsg, self) + + +class Literal(Token): + """Token to exactly match a specified string.""" + def __init__( self, matchString ): + super(Literal,self).__init__() + self.match = matchString + self.matchLen = len(matchString) + try: + self.firstMatchChar = matchString[0] + except IndexError: + warnings.warn("null string passed to Literal; use Empty() instead", + SyntaxWarning, stacklevel=2) + self.__class__ = Empty + self.name = '"%s"' % _ustr(self.match) + self.errmsg = "Expected " + self.name + self.mayReturnEmpty = False + self.mayIndexError = False + + # Performance tuning: this routine gets called a *lot* + # if this is a single character match string and the first character matches, + # short-circuit as quickly as possible, and avoid calling startswith + #~ @profile + def parseImpl( self, instring, loc, doActions=True ): + if (instring[loc] == self.firstMatchChar and + (self.matchLen==1 or instring.startswith(self.match,loc)) ): + return loc+self.matchLen, self.match + raise ParseException(instring, loc, self.errmsg, self) +_L = Literal +ParserElement.literalStringClass = Literal + +class Keyword(Token): + """Token to exactly match a specified string as a keyword, that is, it must be + immediately followed by a non-keyword character. Compare with C{L{Literal}}:: + Literal("if") will match the leading C{'if'} in C{'ifAndOnlyIf'}. + Keyword("if") will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'} + Accepts two optional constructor arguments in addition to the keyword string: + C{identChars} is a string of characters that would be valid identifier characters, + defaulting to all alphanumerics + "_" and "$"; C{caseless} allows case-insensitive + matching, default is C{False}. + """ + DEFAULT_KEYWORD_CHARS = alphanums+"_$" + + def __init__( self, matchString, identChars=DEFAULT_KEYWORD_CHARS, caseless=False ): + super(Keyword,self).__init__() + self.match = matchString + self.matchLen = len(matchString) + try: + self.firstMatchChar = matchString[0] + except IndexError: + warnings.warn("null string passed to Keyword; use Empty() instead", + SyntaxWarning, stacklevel=2) + self.name = '"%s"' % self.match + self.errmsg = "Expected " + self.name + self.mayReturnEmpty = False + self.mayIndexError = False + self.caseless = caseless + if caseless: + self.caselessmatch = matchString.upper() + identChars = identChars.upper() + self.identChars = set(identChars) + + def parseImpl( self, instring, loc, doActions=True ): + if self.caseless: + if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and + (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and + (loc == 0 or instring[loc-1].upper() not in self.identChars) ): + return loc+self.matchLen, self.match + else: + if (instring[loc] == self.firstMatchChar and + (self.matchLen==1 or instring.startswith(self.match,loc)) and + (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and + (loc == 0 or instring[loc-1] not in self.identChars) ): + return loc+self.matchLen, self.match + raise ParseException(instring, loc, self.errmsg, self) + + def copy(self): + c = super(Keyword,self).copy() + c.identChars = Keyword.DEFAULT_KEYWORD_CHARS + return c + + @staticmethod + def setDefaultKeywordChars( chars ): + """Overrides the default Keyword chars + """ + Keyword.DEFAULT_KEYWORD_CHARS = chars + +class CaselessLiteral(Literal): + """Token to match a specified string, ignoring case of letters. + Note: the matched results will always be in the case of the given + match string, NOT the case of the input text. + """ + def __init__( self, matchString ): + super(CaselessLiteral,self).__init__( matchString.upper() ) + # Preserve the defining literal. + self.returnString = matchString + self.name = "'%s'" % self.returnString + self.errmsg = "Expected " + self.name + + def parseImpl( self, instring, loc, doActions=True ): + if instring[ loc:loc+self.matchLen ].upper() == self.match: + return loc+self.matchLen, self.returnString + raise ParseException(instring, loc, self.errmsg, self) + +class CaselessKeyword(Keyword): + def __init__( self, matchString, identChars=Keyword.DEFAULT_KEYWORD_CHARS ): + super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True ) + + def parseImpl( self, instring, loc, doActions=True ): + if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and + (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ): + return loc+self.matchLen, self.match + raise ParseException(instring, loc, self.errmsg, self) + +class Word(Token): + """Token for matching words composed of allowed character sets. + Defined with string containing all allowed initial characters, + an optional string containing allowed body characters (if omitted, + defaults to the initial character set), and an optional minimum, + maximum, and/or exact length. The default value for C{min} is 1 (a + minimum value < 1 is not valid); the default values for C{max} and C{exact} + are 0, meaning no maximum or exact length restriction. An optional + C{exclude} parameter can list characters that might be found in + the input C{bodyChars} string; useful to define a word of all printables + except for one or two characters, for instance. + """ + def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ): + super(Word,self).__init__() + if excludeChars: + initChars = ''.join(c for c in initChars if c not in excludeChars) + if bodyChars: + bodyChars = ''.join(c for c in bodyChars if c not in excludeChars) + self.initCharsOrig = initChars + self.initChars = set(initChars) + if bodyChars : + self.bodyCharsOrig = bodyChars + self.bodyChars = set(bodyChars) + else: + self.bodyCharsOrig = initChars + self.bodyChars = set(initChars) + + self.maxSpecified = max > 0 + + if min < 1: + raise ValueError("cannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitted") + + self.minLen = min + + if max > 0: + self.maxLen = max + else: + self.maxLen = _MAX_INT + + if exact > 0: + self.maxLen = exact + self.minLen = exact + + self.name = _ustr(self) + self.errmsg = "Expected " + self.name + self.mayIndexError = False + self.asKeyword = asKeyword + + if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0): + if self.bodyCharsOrig == self.initCharsOrig: + self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig) + elif len(self.initCharsOrig) == 1: + self.reString = "%s[%s]*" % \ + (re.escape(self.initCharsOrig), + _escapeRegexRangeChars(self.bodyCharsOrig),) + else: + self.reString = "[%s][%s]*" % \ + (_escapeRegexRangeChars(self.initCharsOrig), + _escapeRegexRangeChars(self.bodyCharsOrig),) + if self.asKeyword: + self.reString = r"\b"+self.reString+r"\b" + try: + self.re = re.compile( self.reString ) + except: + self.re = None + + def parseImpl( self, instring, loc, doActions=True ): + if self.re: + result = self.re.match(instring,loc) + if not result: + raise ParseException(instring, loc, self.errmsg, self) + + loc = result.end() + return loc, result.group() + + if not(instring[ loc ] in self.initChars): + raise ParseException(instring, loc, self.errmsg, self) + + start = loc + loc += 1 + instrlen = len(instring) + bodychars = self.bodyChars + maxloc = start + self.maxLen + maxloc = min( maxloc, instrlen ) + while loc < maxloc and instring[loc] in bodychars: + loc += 1 + + throwException = False + if loc - start < self.minLen: + throwException = True + if self.maxSpecified and loc < instrlen and instring[loc] in bodychars: + throwException = True + if self.asKeyword: + if (start>0 and instring[start-1] in bodychars) or (loc4: + return s[:4]+"..." + else: + return s + + if ( self.initCharsOrig != self.bodyCharsOrig ): + self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) ) + else: + self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig) + + return self.strRepr + + +class Regex(Token): + """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. + """ + compiledREtype = type(re.compile("[A-Z]")) + def __init__( self, pattern, flags=0): + """The parameters C{pattern} and C{flags} are passed to the C{re.compile()} function as-is. See the Python C{re} module for an explanation of the acceptable patterns and flags.""" + super(Regex,self).__init__() + + if isinstance(pattern, basestring): + if len(pattern) == 0: + warnings.warn("null string passed to Regex; use Empty() instead", + SyntaxWarning, stacklevel=2) + + self.pattern = pattern + self.flags = flags + + try: + self.re = re.compile(self.pattern, self.flags) + self.reString = self.pattern + except sre_constants.error: + warnings.warn("invalid pattern (%s) passed to Regex" % pattern, + SyntaxWarning, stacklevel=2) + raise + + elif isinstance(pattern, Regex.compiledREtype): + self.re = pattern + self.pattern = \ + self.reString = str(pattern) + self.flags = flags + + else: + raise ValueError("Regex may only be constructed with a string or a compiled RE object") + + self.name = _ustr(self) + self.errmsg = "Expected " + self.name + self.mayIndexError = False + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + result = self.re.match(instring,loc) + if not result: + raise ParseException(instring, loc, self.errmsg, self) + + loc = result.end() + d = result.groupdict() + ret = ParseResults(result.group()) + if d: + for k in d: + ret[k] = d[k] + return loc,ret + + def __str__( self ): + try: + return super(Regex,self).__str__() + except: + pass + + if self.strRepr is None: + self.strRepr = "Re:(%s)" % repr(self.pattern) + + return self.strRepr + + +class QuotedString(Token): + """Token for matching strings that are delimited by quoting characters. + """ + def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None): + """ + Defined with the following parameters: + - quoteChar - string of one or more characters defining the quote delimiting string + - escChar - character to escape quotes, typically backslash (default=None) + - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None) + - multiline - boolean indicating whether quotes can span multiple lines (default=C{False}) + - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True}) + - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar) + """ + super(QuotedString,self).__init__() + + # remove white space from quote chars - wont work anyway + quoteChar = quoteChar.strip() + if len(quoteChar) == 0: + warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) + raise SyntaxError() + + if endQuoteChar is None: + endQuoteChar = quoteChar + else: + endQuoteChar = endQuoteChar.strip() + if len(endQuoteChar) == 0: + warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) + raise SyntaxError() + + self.quoteChar = quoteChar + self.quoteCharLen = len(quoteChar) + self.firstQuoteChar = quoteChar[0] + self.endQuoteChar = endQuoteChar + self.endQuoteCharLen = len(endQuoteChar) + self.escChar = escChar + self.escQuote = escQuote + self.unquoteResults = unquoteResults + + if multiline: + self.flags = re.MULTILINE | re.DOTALL + self.pattern = r'%s(?:[^%s%s]' % \ + ( re.escape(self.quoteChar), + _escapeRegexRangeChars(self.endQuoteChar[0]), + (escChar is not None and _escapeRegexRangeChars(escChar) or '') ) + else: + self.flags = 0 + self.pattern = r'%s(?:[^%s\n\r%s]' % \ + ( re.escape(self.quoteChar), + _escapeRegexRangeChars(self.endQuoteChar[0]), + (escChar is not None and _escapeRegexRangeChars(escChar) or '') ) + if len(self.endQuoteChar) > 1: + self.pattern += ( + '|(?:' + ')|(?:'.join("%s[^%s]" % (re.escape(self.endQuoteChar[:i]), + _escapeRegexRangeChars(self.endQuoteChar[i])) + for i in range(len(self.endQuoteChar)-1,0,-1)) + ')' + ) + if escQuote: + self.pattern += (r'|(?:%s)' % re.escape(escQuote)) + if escChar: + self.pattern += (r'|(?:%s.)' % re.escape(escChar)) + self.escCharReplacePattern = re.escape(self.escChar)+"(.)" + self.pattern += (r')*%s' % re.escape(self.endQuoteChar)) + + try: + self.re = re.compile(self.pattern, self.flags) + self.reString = self.pattern + except sre_constants.error: + warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern, + SyntaxWarning, stacklevel=2) + raise + + self.name = _ustr(self) + self.errmsg = "Expected " + self.name + self.mayIndexError = False + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None + if not result: + raise ParseException(instring, loc, self.errmsg, self) + + loc = result.end() + ret = result.group() + + if self.unquoteResults: + + # strip off quotes + ret = ret[self.quoteCharLen:-self.endQuoteCharLen] + + if isinstance(ret,basestring): + # replace escaped characters + if self.escChar: + ret = re.sub(self.escCharReplacePattern,"\g<1>",ret) + + # replace escaped quotes + if self.escQuote: + ret = ret.replace(self.escQuote, self.endQuoteChar) + + return loc, ret + + def __str__( self ): + try: + return super(QuotedString,self).__str__() + except: + pass + + if self.strRepr is None: + self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar) + + return self.strRepr + + +class CharsNotIn(Token): + """Token for matching words composed of characters *not* in a given set. + Defined with string containing all disallowed characters, and an optional + minimum, maximum, and/or exact length. The default value for C{min} is 1 (a + minimum value < 1 is not valid); the default values for C{max} and C{exact} + are 0, meaning no maximum or exact length restriction. + """ + def __init__( self, notChars, min=1, max=0, exact=0 ): + super(CharsNotIn,self).__init__() + self.skipWhitespace = False + self.notChars = notChars + + if min < 1: + raise ValueError("cannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permitted") + + self.minLen = min + + if max > 0: + self.maxLen = max + else: + self.maxLen = _MAX_INT + + if exact > 0: + self.maxLen = exact + self.minLen = exact + + self.name = _ustr(self) + self.errmsg = "Expected " + self.name + self.mayReturnEmpty = ( self.minLen == 0 ) + self.mayIndexError = False + + def parseImpl( self, instring, loc, doActions=True ): + if instring[loc] in self.notChars: + raise ParseException(instring, loc, self.errmsg, self) + + start = loc + loc += 1 + notchars = self.notChars + maxlen = min( start+self.maxLen, len(instring) ) + while loc < maxlen and \ + (instring[loc] not in notchars): + loc += 1 + + if loc - start < self.minLen: + raise ParseException(instring, loc, self.errmsg, self) + + return loc, instring[start:loc] + + def __str__( self ): + try: + return super(CharsNotIn, self).__str__() + except: + pass + + if self.strRepr is None: + if len(self.notChars) > 4: + self.strRepr = "!W:(%s...)" % self.notChars[:4] + else: + self.strRepr = "!W:(%s)" % self.notChars + + return self.strRepr + +class White(Token): + """Special matching class for matching whitespace. Normally, whitespace is ignored + by pyparsing grammars. This class is included when some whitespace structures + are significant. Define with a string containing the whitespace characters to be + matched; default is C{" \\t\\r\\n"}. Also takes optional C{min}, C{max}, and C{exact} arguments, + as defined for the C{L{Word}} class.""" + whiteStrs = { + " " : "", + "\t": "", + "\n": "", + "\r": "", + "\f": "", + } + def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0): + super(White,self).__init__() + self.matchWhite = ws + self.setWhitespaceChars( "".join(c for c in self.whiteChars if c not in self.matchWhite) ) + #~ self.leaveWhitespace() + self.name = ("".join(White.whiteStrs[c] for c in self.matchWhite)) + self.mayReturnEmpty = True + self.errmsg = "Expected " + self.name + + self.minLen = min + + if max > 0: + self.maxLen = max + else: + self.maxLen = _MAX_INT + + if exact > 0: + self.maxLen = exact + self.minLen = exact + + def parseImpl( self, instring, loc, doActions=True ): + if not(instring[ loc ] in self.matchWhite): + raise ParseException(instring, loc, self.errmsg, self) + start = loc + loc += 1 + maxloc = start + self.maxLen + maxloc = min( maxloc, len(instring) ) + while loc < maxloc and instring[loc] in self.matchWhite: + loc += 1 + + if loc - start < self.minLen: + raise ParseException(instring, loc, self.errmsg, self) + + return loc, instring[start:loc] + + +class _PositionToken(Token): + def __init__( self ): + super(_PositionToken,self).__init__() + self.name=self.__class__.__name__ + self.mayReturnEmpty = True + self.mayIndexError = False + +class GoToColumn(_PositionToken): + """Token to advance to a specific column of input text; useful for tabular report scraping.""" + def __init__( self, colno ): + super(GoToColumn,self).__init__() + self.col = colno + + def preParse( self, instring, loc ): + if col(loc,instring) != self.col: + instrlen = len(instring) + if self.ignoreExprs: + loc = self._skipIgnorables( instring, loc ) + while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col : + loc += 1 + return loc + + def parseImpl( self, instring, loc, doActions=True ): + thiscol = col( loc, instring ) + if thiscol > self.col: + raise ParseException( instring, loc, "Text not in expected column", self ) + newloc = loc + self.col - thiscol + ret = instring[ loc: newloc ] + return newloc, ret + +class LineStart(_PositionToken): + """Matches if current position is at the beginning of a line within the parse string""" + def __init__( self ): + super(LineStart,self).__init__() + self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") ) + self.errmsg = "Expected start of line" + + def preParse( self, instring, loc ): + preloc = super(LineStart,self).preParse(instring,loc) + if instring[preloc] == "\n": + loc += 1 + return loc + + def parseImpl( self, instring, loc, doActions=True ): + if not( loc==0 or + (loc == self.preParse( instring, 0 )) or + (instring[loc-1] == "\n") ): #col(loc, instring) != 1: + raise ParseException(instring, loc, self.errmsg, self) + return loc, [] + +class LineEnd(_PositionToken): + """Matches if current position is at the end of a line within the parse string""" + def __init__( self ): + super(LineEnd,self).__init__() + self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") ) + self.errmsg = "Expected end of line" + + def parseImpl( self, instring, loc, doActions=True ): + if loc len(instring): + return loc, [] + else: + raise ParseException(instring, loc, self.errmsg, self) + +class WordStart(_PositionToken): + """Matches if the current position is at the beginning of a Word, and + is not preceded by any character in a given set of C{wordChars} + (default=C{printables}). To emulate the C{\b} behavior of regular expressions, + use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of + the string being parsed, or at the beginning of a line. + """ + def __init__(self, wordChars = printables): + super(WordStart,self).__init__() + self.wordChars = set(wordChars) + self.errmsg = "Not at the start of a word" + + def parseImpl(self, instring, loc, doActions=True ): + if loc != 0: + if (instring[loc-1] in self.wordChars or + instring[loc] not in self.wordChars): + raise ParseException(instring, loc, self.errmsg, self) + return loc, [] + +class WordEnd(_PositionToken): + """Matches if the current position is at the end of a Word, and + is not followed by any character in a given set of C{wordChars} + (default=C{printables}). To emulate the C{\b} behavior of regular expressions, + use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of + the string being parsed, or at the end of a line. + """ + def __init__(self, wordChars = printables): + super(WordEnd,self).__init__() + self.wordChars = set(wordChars) + self.skipWhitespace = False + self.errmsg = "Not at the end of a word" + + def parseImpl(self, instring, loc, doActions=True ): + instrlen = len(instring) + if instrlen>0 and loc maxExcLoc: + maxException = err + maxExcLoc = err.loc + except IndexError: + if len(instring) > maxExcLoc: + maxException = ParseException(instring,len(instring),e.errmsg,self) + maxExcLoc = len(instring) + else: + # save match among all matches, to retry longest to shortest + matches.append((loc2, e)) + + if matches: + matches.sort(key=lambda x: -x[0]) + for _,e in matches: + try: + return e._parse( instring, loc, doActions ) + except ParseException as err: + err.__traceback__ = None + if err.loc > maxExcLoc: + maxException = err + maxExcLoc = err.loc + + if maxException is not None: + maxException.msg = self.errmsg + raise maxException + else: + raise ParseException(instring, loc, "no defined alternatives to match", self) + + + def __ixor__(self, other ): + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + return self.append( other ) #Or( [ self, other ] ) + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "{" + " ^ ".join(_ustr(e) for e in self.exprs) + "}" + + return self.strRepr + + def checkRecursion( self, parseElementList ): + subRecCheckList = parseElementList[:] + [ self ] + for e in self.exprs: + e.checkRecursion( subRecCheckList ) + + +class MatchFirst(ParseExpression): + """Requires that at least one C{ParseExpression} is found. + If two expressions match, the first one listed is the one that will match. + May be constructed using the C{'|'} operator. + """ + def __init__( self, exprs, savelist = False ): + super(MatchFirst,self).__init__(exprs, savelist) + if self.exprs: + self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs) + else: + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + maxExcLoc = -1 + maxException = None + for e in self.exprs: + try: + ret = e._parse( instring, loc, doActions ) + return ret + except ParseException as err: + if err.loc > maxExcLoc: + maxException = err + maxExcLoc = err.loc + except IndexError: + if len(instring) > maxExcLoc: + maxException = ParseException(instring,len(instring),e.errmsg,self) + maxExcLoc = len(instring) + + # only got here if no expression matched, raise exception for match that made it the furthest + else: + if maxException is not None: + maxException.msg = self.errmsg + raise maxException + else: + raise ParseException(instring, loc, "no defined alternatives to match", self) + + def __ior__(self, other ): + if isinstance( other, basestring ): + other = ParserElement.literalStringClass( other ) + return self.append( other ) #MatchFirst( [ self, other ] ) + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "{" + " | ".join(_ustr(e) for e in self.exprs) + "}" + + return self.strRepr + + def checkRecursion( self, parseElementList ): + subRecCheckList = parseElementList[:] + [ self ] + for e in self.exprs: + e.checkRecursion( subRecCheckList ) + + +class Each(ParseExpression): + """Requires all given C{ParseExpression}s to be found, but in any order. + Expressions may be separated by whitespace. + May be constructed using the C{'&'} operator. + """ + def __init__( self, exprs, savelist = True ): + super(Each,self).__init__(exprs, savelist) + self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs) + self.skipWhitespace = True + self.initExprGroups = True + + def parseImpl( self, instring, loc, doActions=True ): + if self.initExprGroups: + self.opt1map = dict((id(e.expr),e) for e in self.exprs if isinstance(e,Optional)) + opt1 = [ e.expr for e in self.exprs if isinstance(e,Optional) ] + opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e,Optional)] + self.optionals = opt1 + opt2 + self.multioptionals = [ e.expr for e in self.exprs if isinstance(e,ZeroOrMore) ] + self.multirequired = [ e.expr for e in self.exprs if isinstance(e,OneOrMore) ] + self.required = [ e for e in self.exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ] + self.required += self.multirequired + self.initExprGroups = False + tmpLoc = loc + tmpReqd = self.required[:] + tmpOpt = self.optionals[:] + matchOrder = [] + + keepMatching = True + while keepMatching: + tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired + failed = [] + for e in tmpExprs: + try: + tmpLoc = e.tryParse( instring, tmpLoc ) + except ParseException: + failed.append(e) + else: + matchOrder.append(self.opt1map.get(id(e),e)) + if e in tmpReqd: + tmpReqd.remove(e) + elif e in tmpOpt: + tmpOpt.remove(e) + if len(failed) == len(tmpExprs): + keepMatching = False + + if tmpReqd: + missing = ", ".join(_ustr(e) for e in tmpReqd) + raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing ) + + # add any unmatched Optionals, in case they have default values defined + matchOrder += [e for e in self.exprs if isinstance(e,Optional) and e.expr in tmpOpt] + + resultlist = [] + for e in matchOrder: + loc,results = e._parse(instring,loc,doActions) + resultlist.append(results) + + finalResults = ParseResults([]) + for r in resultlist: + dups = {} + for k in r.keys(): + if k in finalResults: + tmp = ParseResults(finalResults[k]) + tmp += ParseResults(r[k]) + dups[k] = tmp + finalResults += ParseResults(r) + for k,v in dups.items(): + finalResults[k] = v + return loc, finalResults + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "{" + " & ".join(_ustr(e) for e in self.exprs) + "}" + + return self.strRepr + + def checkRecursion( self, parseElementList ): + subRecCheckList = parseElementList[:] + [ self ] + for e in self.exprs: + e.checkRecursion( subRecCheckList ) + + +class ParseElementEnhance(ParserElement): + """Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.""" + def __init__( self, expr, savelist=False ): + super(ParseElementEnhance,self).__init__(savelist) + if isinstance( expr, basestring ): + expr = Literal(expr) + self.expr = expr + self.strRepr = None + if expr is not None: + self.mayIndexError = expr.mayIndexError + self.mayReturnEmpty = expr.mayReturnEmpty + self.setWhitespaceChars( expr.whiteChars ) + self.skipWhitespace = expr.skipWhitespace + self.saveAsList = expr.saveAsList + self.callPreparse = expr.callPreparse + self.ignoreExprs.extend(expr.ignoreExprs) + + def parseImpl( self, instring, loc, doActions=True ): + if self.expr is not None: + return self.expr._parse( instring, loc, doActions, callPreParse=False ) + else: + raise ParseException("",loc,self.errmsg,self) + + def leaveWhitespace( self ): + self.skipWhitespace = False + self.expr = self.expr.copy() + if self.expr is not None: + self.expr.leaveWhitespace() + return self + + def ignore( self, other ): + if isinstance( other, Suppress ): + if other not in self.ignoreExprs: + super( ParseElementEnhance, self).ignore( other ) + if self.expr is not None: + self.expr.ignore( self.ignoreExprs[-1] ) + else: + super( ParseElementEnhance, self).ignore( other ) + if self.expr is not None: + self.expr.ignore( self.ignoreExprs[-1] ) + return self + + def streamline( self ): + super(ParseElementEnhance,self).streamline() + if self.expr is not None: + self.expr.streamline() + return self + + def checkRecursion( self, parseElementList ): + if self in parseElementList: + raise RecursiveGrammarException( parseElementList+[self] ) + subRecCheckList = parseElementList[:] + [ self ] + if self.expr is not None: + self.expr.checkRecursion( subRecCheckList ) + + def validate( self, validateTrace=[] ): + tmp = validateTrace[:]+[self] + if self.expr is not None: + self.expr.validate(tmp) + self.checkRecursion( [] ) + + def __str__( self ): + try: + return super(ParseElementEnhance,self).__str__() + except: + pass + + if self.strRepr is None and self.expr is not None: + self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) ) + return self.strRepr + + +class FollowedBy(ParseElementEnhance): + """Lookahead matching of the given parse expression. C{FollowedBy} + does *not* advance the parsing position within the input string, it only + verifies that the specified parse expression matches at the current + position. C{FollowedBy} always returns a null token list.""" + def __init__( self, expr ): + super(FollowedBy,self).__init__(expr) + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + self.expr.tryParse( instring, loc ) + return loc, [] + + +class NotAny(ParseElementEnhance): + """Lookahead to disallow matching with the given parse expression. C{NotAny} + does *not* advance the parsing position within the input string, it only + verifies that the specified parse expression does *not* match at the current + position. Also, C{NotAny} does *not* skip over leading whitespace. C{NotAny} + always returns a null token list. May be constructed using the '~' operator.""" + def __init__( self, expr ): + super(NotAny,self).__init__(expr) + #~ self.leaveWhitespace() + self.skipWhitespace = False # do NOT use self.leaveWhitespace(), don't want to propagate to exprs + self.mayReturnEmpty = True + self.errmsg = "Found unwanted token, "+_ustr(self.expr) + + def parseImpl( self, instring, loc, doActions=True ): + try: + self.expr.tryParse( instring, loc ) + except (ParseException,IndexError): + pass + else: + raise ParseException(instring, loc, self.errmsg, self) + return loc, [] + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "~{" + _ustr(self.expr) + "}" + + return self.strRepr + + +class ZeroOrMore(ParseElementEnhance): + """Optional repetition of zero or more of the given expression.""" + def __init__( self, expr ): + super(ZeroOrMore,self).__init__(expr) + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + tokens = [] + try: + loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) + hasIgnoreExprs = ( len(self.ignoreExprs) > 0 ) + while 1: + if hasIgnoreExprs: + preloc = self._skipIgnorables( instring, loc ) + else: + preloc = loc + loc, tmptokens = self.expr._parse( instring, preloc, doActions ) + if tmptokens or tmptokens.haskeys(): + tokens += tmptokens + except (ParseException,IndexError): + pass + + return loc, tokens + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "[" + _ustr(self.expr) + "]..." + + return self.strRepr + + def setResultsName( self, name, listAllMatches=False ): + ret = super(ZeroOrMore,self).setResultsName(name,listAllMatches) + ret.saveAsList = True + return ret + + +class OneOrMore(ParseElementEnhance): + """Repetition of one or more of the given expression.""" + def parseImpl( self, instring, loc, doActions=True ): + # must be at least one + loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) + try: + hasIgnoreExprs = ( len(self.ignoreExprs) > 0 ) + while 1: + if hasIgnoreExprs: + preloc = self._skipIgnorables( instring, loc ) + else: + preloc = loc + loc, tmptokens = self.expr._parse( instring, preloc, doActions ) + if tmptokens or tmptokens.haskeys(): + tokens += tmptokens + except (ParseException,IndexError): + pass + + return loc, tokens + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "{" + _ustr(self.expr) + "}..." + + return self.strRepr + + def setResultsName( self, name, listAllMatches=False ): + ret = super(OneOrMore,self).setResultsName(name,listAllMatches) + ret.saveAsList = True + return ret + +class _NullToken(object): + def __bool__(self): + return False + __nonzero__ = __bool__ + def __str__(self): + return "" + +_optionalNotMatched = _NullToken() +class Optional(ParseElementEnhance): + """Optional matching of the given expression. + A default return string can also be specified, if the optional expression + is not found. + """ + def __init__( self, expr, default=_optionalNotMatched ): + super(Optional,self).__init__( expr, savelist=False ) + self.defaultValue = default + self.mayReturnEmpty = True + + def parseImpl( self, instring, loc, doActions=True ): + try: + loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) + except (ParseException,IndexError): + if self.defaultValue is not _optionalNotMatched: + if self.expr.resultsName: + tokens = ParseResults([ self.defaultValue ]) + tokens[self.expr.resultsName] = self.defaultValue + else: + tokens = [ self.defaultValue ] + else: + tokens = [] + return loc, tokens + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + if self.strRepr is None: + self.strRepr = "[" + _ustr(self.expr) + "]" + + return self.strRepr + + +class SkipTo(ParseElementEnhance): + """Token for skipping over all undefined text until the matched expression is found. + If C{include} is set to true, the matched expression is also parsed (the skipped text + and matched expression are returned as a 2-element list). The C{ignore} + argument is used to define grammars (typically quoted strings and comments) that + might contain false matches. + """ + def __init__( self, other, include=False, ignore=None, failOn=None ): + super( SkipTo, self ).__init__( other ) + self.ignoreExpr = ignore + self.mayReturnEmpty = True + self.mayIndexError = False + self.includeMatch = include + self.asList = False + if failOn is not None and isinstance(failOn, basestring): + self.failOn = Literal(failOn) + else: + self.failOn = failOn + self.errmsg = "No match found for "+_ustr(self.expr) + + def parseImpl( self, instring, loc, doActions=True ): + startLoc = loc + instrlen = len(instring) + expr = self.expr + failParse = False + while loc <= instrlen: + try: + if self.failOn: + try: + self.failOn.tryParse(instring, loc) + except ParseBaseException: + pass + else: + failParse = True + raise ParseException(instring, loc, "Found expression " + str(self.failOn)) + failParse = False + if self.ignoreExpr is not None: + while 1: + try: + loc = self.ignoreExpr.tryParse(instring,loc) + # print("found ignoreExpr, advance to", loc) + except ParseBaseException: + break + expr._parse( instring, loc, doActions=False, callPreParse=False ) + skipText = instring[startLoc:loc] + if self.includeMatch: + loc,mat = expr._parse(instring,loc,doActions,callPreParse=False) + if mat: + skipRes = ParseResults( skipText ) + skipRes += mat + return loc, [ skipRes ] + else: + return loc, [ skipText ] + else: + return loc, [ skipText ] + except (ParseException,IndexError): + if failParse: + raise + else: + loc += 1 + raise ParseException(instring, loc, self.errmsg, self) + +class Forward(ParseElementEnhance): + """Forward declaration of an expression to be defined later - + used for recursive grammars, such as algebraic infix notation. + When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator. + + Note: take care when assigning to C{Forward} not to overlook precedence of operators. + Specifically, '|' has a lower precedence than '<<', so that:: + fwdExpr << a | b | c + will actually be evaluated as:: + (fwdExpr << a) | b | c + thereby leaving b and c out as parseable alternatives. It is recommended that you + explicitly group the values inserted into the C{Forward}:: + fwdExpr << (a | b | c) + Converting to use the '<<=' operator instead will avoid this problem. + """ + def __init__( self, other=None ): + super(Forward,self).__init__( other, savelist=False ) + + def __lshift__( self, other ): + if isinstance( other, basestring ): + other = ParserElement.literalStringClass(other) + self.expr = other + self.mayReturnEmpty = other.mayReturnEmpty + self.strRepr = None + self.mayIndexError = self.expr.mayIndexError + self.mayReturnEmpty = self.expr.mayReturnEmpty + self.setWhitespaceChars( self.expr.whiteChars ) + self.skipWhitespace = self.expr.skipWhitespace + self.saveAsList = self.expr.saveAsList + self.ignoreExprs.extend(self.expr.ignoreExprs) + return self + + def __ilshift__(self, other): + return self << other + + def leaveWhitespace( self ): + self.skipWhitespace = False + return self + + def streamline( self ): + if not self.streamlined: + self.streamlined = True + if self.expr is not None: + self.expr.streamline() + return self + + def validate( self, validateTrace=[] ): + if self not in validateTrace: + tmp = validateTrace[:]+[self] + if self.expr is not None: + self.expr.validate(tmp) + self.checkRecursion([]) + + def __str__( self ): + if hasattr(self,"name"): + return self.name + + self._revertClass = self.__class__ + self.__class__ = _ForwardNoRecurse + try: + if self.expr is not None: + retString = _ustr(self.expr) + else: + retString = "None" + finally: + self.__class__ = self._revertClass + return self.__class__.__name__ + ": " + retString + + def copy(self): + if self.expr is not None: + return super(Forward,self).copy() + else: + ret = Forward() + ret <<= self + return ret + +class _ForwardNoRecurse(Forward): + def __str__( self ): + return "..." + +class TokenConverter(ParseElementEnhance): + """Abstract subclass of C{ParseExpression}, for converting parsed results.""" + def __init__( self, expr, savelist=False ): + super(TokenConverter,self).__init__( expr )#, savelist ) + self.saveAsList = False + +class Upcase(TokenConverter): + """Converter to upper case all matching tokens.""" + def __init__(self, *args): + super(Upcase,self).__init__(*args) + warnings.warn("Upcase class is deprecated, use upcaseTokens parse action instead", + DeprecationWarning,stacklevel=2) + + def postParse( self, instring, loc, tokenlist ): + return list(map( str.upper, tokenlist )) + + +class Combine(TokenConverter): + """Converter to concatenate all matching tokens to a single string. + By default, the matching patterns must also be contiguous in the input string; + this can be disabled by specifying C{'adjacent=False'} in the constructor. + """ + def __init__( self, expr, joinString="", adjacent=True ): + super(Combine,self).__init__( expr ) + # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself + if adjacent: + self.leaveWhitespace() + self.adjacent = adjacent + self.skipWhitespace = True + self.joinString = joinString + self.callPreparse = True + + def ignore( self, other ): + if self.adjacent: + ParserElement.ignore(self, other) + else: + super( Combine, self).ignore( other ) + return self + + def postParse( self, instring, loc, tokenlist ): + retToks = tokenlist.copy() + del retToks[:] + retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults) + + if self.resultsName and retToks.haskeys(): + return [ retToks ] + else: + return retToks + +class Group(TokenConverter): + """Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.""" + def __init__( self, expr ): + super(Group,self).__init__( expr ) + self.saveAsList = True + + def postParse( self, instring, loc, tokenlist ): + return [ tokenlist ] + +class Dict(TokenConverter): + """Converter to return a repetitive expression as a list, but also as a dictionary. + Each element can also be referenced using the first token in the expression as its key. + Useful for tabular report scraping when the first column can be used as a item key. + """ + def __init__( self, expr ): + super(Dict,self).__init__( expr ) + self.saveAsList = True + + def postParse( self, instring, loc, tokenlist ): + for i,tok in enumerate(tokenlist): + if len(tok) == 0: + continue + ikey = tok[0] + if isinstance(ikey,int): + ikey = _ustr(tok[0]).strip() + if len(tok)==1: + tokenlist[ikey] = _ParseResultsWithOffset("",i) + elif len(tok)==2 and not isinstance(tok[1],ParseResults): + tokenlist[ikey] = _ParseResultsWithOffset(tok[1],i) + else: + dictvalue = tok.copy() #ParseResults(i) + del dictvalue[0] + if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.haskeys()): + tokenlist[ikey] = _ParseResultsWithOffset(dictvalue,i) + else: + tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0],i) + + if self.resultsName: + return [ tokenlist ] + else: + return tokenlist + + +class Suppress(TokenConverter): + """Converter for ignoring the results of a parsed expression.""" + def postParse( self, instring, loc, tokenlist ): + return [] + + def suppress( self ): + return self + + +class OnlyOnce(object): + """Wrapper for parse actions, to ensure they are only called once.""" + def __init__(self, methodCall): + self.callable = _trim_arity(methodCall) + self.called = False + def __call__(self,s,l,t): + if not self.called: + results = self.callable(s,l,t) + self.called = True + return results + raise ParseException(s,l,"") + def reset(self): + self.called = False + +def traceParseAction(f): + """Decorator for debugging parse actions.""" + f = _trim_arity(f) + def z(*paArgs): + thisFunc = f.func_name + s,l,t = paArgs[-3:] + if len(paArgs)>3: + thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc + sys.stderr.write( ">>entering %s(line: '%s', %d, %s)\n" % (thisFunc,line(l,s),l,t) ) + try: + ret = f(*paArgs) + except Exception as exc: + sys.stderr.write( "<", "|".join( [ _escapeRegexChars(sym) for sym in symbols] )) + try: + if len(symbols)==len("".join(symbols)): + return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ) + else: + return Regex( "|".join(re.escape(sym) for sym in symbols) ) + except: + warnings.warn("Exception creating Regex for oneOf, building MatchFirst", + SyntaxWarning, stacklevel=2) + + + # last resort, just use MatchFirst + return MatchFirst( [ parseElementClass(sym) for sym in symbols ] ) + +def dictOf( key, value ): + """Helper to easily and clearly define a dictionary by specifying the respective patterns + for the key and value. Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens + in the proper order. The key pattern can include delimiting markers or punctuation, + as long as they are suppressed, thereby leaving the significant key text. The value + pattern can include named results, so that the C{Dict} results can include named token + fields. + """ + return Dict( ZeroOrMore( Group ( key + value ) ) ) + +def originalTextFor(expr, asString=True): + """Helper to return the original, untokenized text for a given expression. Useful to + restore the parsed fields of an HTML start tag into the raw tag text itself, or to + revert separate tokens with intervening whitespace back to the original matching + input text. Simpler to use than the parse action C{L{keepOriginalText}}, and does not + require the inspect module to chase up the call stack. By default, returns a + string containing the original parsed text. + + If the optional C{asString} argument is passed as C{False}, then the return value is a + C{L{ParseResults}} containing any results names that were originally matched, and a + single token containing the original matched text from the input string. So if + the expression passed to C{L{originalTextFor}} contains expressions with defined + results names, you must set C{asString} to C{False} if you want to preserve those + results name values.""" + locMarker = Empty().setParseAction(lambda s,loc,t: loc) + endlocMarker = locMarker.copy() + endlocMarker.callPreparse = False + matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end") + if asString: + extractText = lambda s,l,t: s[t._original_start:t._original_end] + else: + def extractText(s,l,t): + del t[:] + t.insert(0, s[t._original_start:t._original_end]) + del t["_original_start"] + del t["_original_end"] + matchExpr.setParseAction(extractText) + return matchExpr + +def ungroup(expr): + """Helper to undo pyparsing's default grouping of And expressions, even + if all but one are non-empty.""" + return TokenConverter(expr).setParseAction(lambda t:t[0]) + +def locatedExpr(expr): + """Helper to decorate a returned token with its starting and ending locations in the input string. + This helper adds the following results names: + - locn_start = location where matched expression begins + - locn_end = location where matched expression ends + - value = the actual parsed results + + Be careful if the input text contains C{} characters, you may want to call + C{L{ParserElement.parseWithTabs}} + """ + locator = Empty().setParseAction(lambda s,l,t: l) + return Group(locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end")) + + +# convenience constants for positional expressions +empty = Empty().setName("empty") +lineStart = LineStart().setName("lineStart") +lineEnd = LineEnd().setName("lineEnd") +stringStart = StringStart().setName("stringStart") +stringEnd = StringEnd().setName("stringEnd") + +_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1]) +_escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16))) +_escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8))) +_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE) +_charRange = Group(_singleChar + Suppress("-") + _singleChar) +_reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]" + +def srange(s): + r"""Helper to easily define string ranges for use in Word construction. Borrows + syntax from regexp '[]' string range definitions:: + srange("[0-9]") -> "0123456789" + srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" + srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" + The input string must be enclosed in []'s, and the returned string is the expanded + character set joined into a single string. + The values enclosed in the []'s may be:: + a single character + an escaped character with a leading backslash (such as \- or \]) + an escaped hex character with a leading '\x' (\x21, which is a '!' character) + (\0x## is also supported for backwards compatibility) + an escaped octal character with a leading '\0' (\041, which is a '!' character) + a range of any of the above, separated by a dash ('a-z', etc.) + any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.) + """ + _expanded = lambda p: p if not isinstance(p,ParseResults) else ''.join(unichr(c) for c in range(ord(p[0]),ord(p[1])+1)) + try: + return "".join(_expanded(part) for part in _reBracketExpr.parseString(s).body) + except: + return "" + +def matchOnlyAtCol(n): + """Helper method for defining parse actions that require matching at a specific + column in the input text. + """ + def verifyCol(strg,locn,toks): + if col(locn,strg) != n: + raise ParseException(strg,locn,"matched token not at column %d" % n) + return verifyCol + +def replaceWith(replStr): + """Helper method for common parse actions that simply return a literal value. Especially + useful when used with C{L{transformString}()}. + """ + #def _replFunc(*args): + # return [replStr] + #return _replFunc + return functools.partial(next, itertools.repeat([replStr])) + +def removeQuotes(s,l,t): + """Helper parse action for removing quotation marks from parsed quoted strings. + To use, add this parse action to quoted string using:: + quotedString.setParseAction( removeQuotes ) + """ + return t[0][1:-1] + +def upcaseTokens(s,l,t): + """Helper parse action to convert tokens to upper case.""" + return [ tt.upper() for tt in map(_ustr,t) ] + +def downcaseTokens(s,l,t): + """Helper parse action to convert tokens to lower case.""" + return [ tt.lower() for tt in map(_ustr,t) ] + +def keepOriginalText(s,startLoc,t): + """DEPRECATED - use new helper method C{L{originalTextFor}}. + Helper parse action to preserve original parsed text, + overriding any nested parse actions.""" + try: + endloc = getTokensEndLoc() + except ParseException: + raise ParseFatalException("incorrect usage of keepOriginalText - may only be called as a parse action") + del t[:] + t += ParseResults(s[startLoc:endloc]) + return t + +def getTokensEndLoc(): + """Method to be called from within a parse action to determine the end + location of the parsed tokens.""" + import inspect + fstack = inspect.stack() + try: + # search up the stack (through intervening argument normalizers) for correct calling routine + for f in fstack[2:]: + if f[3] == "_parseNoCache": + endloc = f[0].f_locals["loc"] + return endloc + else: + raise ParseFatalException("incorrect usage of getTokensEndLoc - may only be called from within a parse action") + finally: + del fstack + +def _makeTags(tagStr, xml): + """Internal helper to construct opening and closing tag expressions, given a tag name""" + if isinstance(tagStr,basestring): + resname = tagStr + tagStr = Keyword(tagStr, caseless=not xml) + else: + resname = tagStr.name + + tagAttrName = Word(alphas,alphanums+"_-:") + if (xml): + tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes ) + openTag = Suppress("<") + tagStr("tag") + \ + Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \ + Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">") + else: + printablesLessRAbrack = "".join(c for c in printables if c not in ">") + tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack) + openTag = Suppress("<") + tagStr("tag") + \ + Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \ + Optional( Suppress("=") + tagAttrValue ) ))) + \ + Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">") + closeTag = Combine(_L("") + + openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % tagStr) + closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % tagStr) + openTag.tag = resname + closeTag.tag = resname + return openTag, closeTag + +def makeHTMLTags(tagStr): + """Helper to construct opening and closing tag expressions for HTML, given a tag name""" + return _makeTags( tagStr, False ) + +def makeXMLTags(tagStr): + """Helper to construct opening and closing tag expressions for XML, given a tag name""" + return _makeTags( tagStr, True ) + +def withAttribute(*args,**attrDict): + """Helper to create a validating parse action to be used with start tags created + with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag + with a required attribute value, to avoid false matches on common tags such as + C{} or C{

    }. + + Call C{withAttribute} with a series of attribute names and values. Specify the list + of filter attributes names and values as: + - keyword arguments, as in C{(align="right")}, or + - as an explicit dict with C{**} operator, when an attribute name is also a Python + reserved word, as in C{**{"class":"Customer", "align":"right"}} + - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) + For attribute names with a namespace prefix, you must use the second form. Attribute + names are matched insensitive to upper/lower case. + + If just testing for C{class} (with or without a namespace), use C{L{withClass}}. + + To verify that the attribute exists, but without specifying a value, pass + C{withAttribute.ANY_VALUE} as the value. + """ + if args: + attrs = args[:] + else: + attrs = attrDict.items() + attrs = [(k,v) for k,v in attrs] + def pa(s,l,tokens): + for attrName,attrValue in attrs: + if attrName not in tokens: + raise ParseException(s,l,"no matching attribute " + attrName) + if attrValue != withAttribute.ANY_VALUE and tokens[attrName] != attrValue: + raise ParseException(s,l,"attribute '%s' has value '%s', must be '%s'" % + (attrName, tokens[attrName], attrValue)) + return pa +withAttribute.ANY_VALUE = object() + +def withClass(classname, namespace=''): + """Simplified version of C{L{withAttribute}} when matching on a div class - made + difficult because C{class} is a reserved word in Python. + """ + classattr = "%s:class" % namespace if namespace else "class" + return withAttribute(**{classattr : classname}) + +opAssoc = _Constants() +opAssoc.LEFT = object() +opAssoc.RIGHT = object() + +def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): + """Helper method for constructing grammars of expressions made up of + operators working in a precedence hierarchy. Operators may be unary or + binary, left- or right-associative. Parse actions can also be attached + to operator expressions. + + Parameters: + - baseExpr - expression representing the most basic element for the nested + - opList - list of tuples, one for each operator precedence level in the + expression grammar; each tuple is of the form + (opExpr, numTerms, rightLeftAssoc, parseAction), where: + - opExpr is the pyparsing expression for the operator; + may also be a string, which will be converted to a Literal; + if numTerms is 3, opExpr is a tuple of two expressions, for the + two operators separating the 3 terms + - numTerms is the number of terms for this operator (must + be 1, 2, or 3) + - rightLeftAssoc is the indicator whether the operator is + right or left associative, using the pyparsing-defined + 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) + - lpar - expression for matching left-parentheses (default=Suppress('(')) + - rpar - expression for matching right-parentheses (default=Suppress(')')) + """ + ret = Forward() + lastExpr = baseExpr | ( lpar + ret + rpar ) + for i,operDef in enumerate(opList): + opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] + if arity == 3: + if opExpr is None or len(opExpr) != 2: + raise ValueError("if numterms=3, opExpr must be a tuple or list of two expressions") + opExpr1, opExpr2 = opExpr + thisExpr = Forward()#.setName("expr%d" % i) + if rightLeftAssoc == opAssoc.LEFT: + if arity == 1: + matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + lastExpr) + Group( lastExpr + OneOrMore( opExpr + lastExpr ) ) + else: + matchExpr = FollowedBy(lastExpr+lastExpr) + Group( lastExpr + OneOrMore(lastExpr) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr) + \ + Group( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + elif rightLeftAssoc == opAssoc.RIGHT: + if arity == 1: + # try to avoid LR with this extra test + if not isinstance(opExpr, Optional): + opExpr = Optional(opExpr) + matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + thisExpr) + Group( lastExpr + OneOrMore( opExpr + thisExpr ) ) + else: + matchExpr = FollowedBy(lastExpr + thisExpr) + Group( lastExpr + OneOrMore( thisExpr ) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) + \ + Group( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + else: + raise ValueError("operator must indicate right or left associativity") + if pa: + matchExpr.setParseAction( pa ) + thisExpr <<= ( matchExpr | lastExpr ) + lastExpr = thisExpr + ret <<= lastExpr + return ret +operatorPrecedence = infixNotation + +dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"').setName("string enclosed in double quotes") +sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'").setName("string enclosed in single quotes") +quotedString = Regex(r'''(?:"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*')''').setName("quotedString using single or double quotes") +unicodeString = Combine(_L('u') + quotedString.copy()) + +def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()): + """Helper method for defining nested lists enclosed in opening and closing + delimiters ("(" and ")" are the default). + + Parameters: + - opener - opening character for a nested list (default="("); can also be a pyparsing expression + - closer - closing character for a nested list (default=")"); can also be a pyparsing expression + - content - expression for items within the nested lists (default=None) + - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString) + + If an expression is not provided for the content argument, the nested + expression will capture all whitespace-delimited content between delimiters + as a list of separate values. + + Use the C{ignoreExpr} argument to define expressions that may contain + opening or closing characters that should not be treated as opening + or closing characters for nesting, such as quotedString or a comment + expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. + The default is L{quotedString}, but if no expressions are to be ignored, + then pass C{None} for this argument. + """ + if opener == closer: + raise ValueError("opening and closing strings cannot be the same") + if content is None: + if isinstance(opener,basestring) and isinstance(closer,basestring): + if len(opener) == 1 and len(closer)==1: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (empty.copy()+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS + ).setParseAction(lambda t:t[0].strip())) + else: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + ~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (Combine(OneOrMore(~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + raise ValueError("opening and closing arguments must be strings if no content expression is given") + ret = Forward() + if ignoreExpr is not None: + ret <<= Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) + else: + ret <<= Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) + return ret + +def indentedBlock(blockStatementExpr, indentStack, indent=True): + """Helper method for defining space-delimited indentation blocks, such as + those used to define block statements in Python source code. + + Parameters: + - blockStatementExpr - expression defining syntax of statement that + is repeated within the indented block + - indentStack - list created by caller to manage indentation stack + (multiple statementWithIndentedBlock expressions within a single grammar + should share a common indentStack) + - indent - boolean indicating whether block must be indented beyond the + the current level; set to False for block of left-most statements + (default=True) + + A valid block must contain at least one C{blockStatement}. + """ + def checkPeerIndent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if curCol != indentStack[-1]: + if curCol > indentStack[-1]: + raise ParseFatalException(s,l,"illegal nesting") + raise ParseException(s,l,"not a peer entry") + + def checkSubIndent(s,l,t): + curCol = col(l,s) + if curCol > indentStack[-1]: + indentStack.append( curCol ) + else: + raise ParseException(s,l,"not a subentry") + + def checkUnindent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): + raise ParseException(s,l,"not an unindent") + indentStack.pop() + + NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) + INDENT = Empty() + Empty().setParseAction(checkSubIndent) + PEER = Empty().setParseAction(checkPeerIndent) + UNDENT = Empty().setParseAction(checkUnindent) + if indent: + smExpr = Group( Optional(NL) + + #~ FollowedBy(blockStatementExpr) + + INDENT + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) + UNDENT) + else: + smExpr = Group( Optional(NL) + + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) + blockStatementExpr.ignore(_bslash + LineEnd()) + return smExpr + +alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") +punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") + +anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:")) +commonHTMLEntity = Combine(_L("&") + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";").streamline() +_htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),'><& "')) +replaceHTMLEntity = lambda t : t.entity in _htmlEntityMap and _htmlEntityMap[t.entity] or None + +# it's easy to get these comment structures wrong - they're very common, so may as well make them available +cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment") + +htmlComment = Regex(r"") +restOfLine = Regex(r".*").leaveWhitespace() +dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment") +cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?>> import os >>> print(im("sys_platform")) - Comparison or logical expression expected + Invalid marker: 'sys_platform' >>> print(im("sys_platform==")) - invalid syntax + Invalid marker: 'sys_platform==' >>> print(im("sys_platform=='win32'")) False >>> print(im("sys=='x'")) - Unknown name 'sys' + Invalid marker: "sys=='x'" >>> print(im("(extra)")) - Comparison or logical expression expected + Invalid marker: '(extra)' >>> print(im("(extra")) - invalid syntax + Invalid marker: '(extra' >>> print(im("os.open('foo')=='y'")) - Language feature not supported in environment markers + Invalid marker: "os.open('foo')=='y'" >>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit! - Language feature not supported in environment markers + Invalid marker: "'x'=='y' and os.open('foo')=='y'" >>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit! - Language feature not supported in environment markers + Invalid marker: "'x'=='x' or os.open('foo')=='y'" >>> print(im("'x' < 'y' < 'z'")) - Chained comparison not allowed in environment markers + Invalid marker: "'x' < 'y' < 'z'" >>> print(im("r'x'=='x'")) - Only plain strings allowed in environment markers + Invalid marker: "r'x'=='x'" >>> print(im("'''x'''=='x'")) - Only plain strings allowed in environment markers + Invalid marker: "'''x'''=='x'" >>> print(im('"""x"""=="x"')) - Only plain strings allowed in environment markers + Invalid marker: '"""x"""=="x"' - >>> print(im(r"'x\n'=='x'")) - Only plain strings allowed in environment markers + >>> print(im(r"x\n=='x'")) + Invalid marker: "x\\n=='x'" >>> print(im("os.open=='y'")) - Language feature not supported in environment markers + Invalid marker: "os.open=='y'" - >>> em('"x"=="x"') + >>> em("'linux' in sys_platform") True - >>> em('"x"=="y"') - False - - >>> em('"x"=="y" and "x"=="x"') - False - - >>> em('"x"=="y" or "x"=="x"') - True - - >>> em('"x"=="y" and "x"=="q" or "z"=="z"') - True - - >>> em('"x"=="y" and ("x"=="q" or "z"=="z")') - False - - >>> em('"x"=="y" and "z"=="z" or "x"=="q"') - False - - >>> em('"x"=="x" and "z"=="z" or "x"=="q"') - True - - >>> em("sys_platform=='win32'") == (sys.platform=='win32') - True - - >>> em("'x' in 'yx'") - True - - >>> em("'yx' in 'x'") - False - >>> em("python_version >= '2.6'") True >>> em("python_version > '2.5'") True - >>> im("platform_python_implementation=='CPython'") + >>> im("implementation_name=='CPython'") False diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index d8844e74e3..2f4b52c5f4 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -8,9 +8,5 @@ @mock.patch.dict('pkg_resources.MarkerEvaluation.values', python_full_version=mock.Mock(return_value='2.7.10')) -def test_lexicographic_ordering(): - """ - Although one might like 2.7.10 to be greater than 2.7.3, - the marker spec only supports lexicographic ordering. - """ - assert evaluate_marker("python_full_version > '2.7.3'") is False +def test_ordering(): + assert evaluate_marker("python_full_version > '2.7.3'") is True diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 6d0ab58792..47d7a4950e 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -26,7 +26,6 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - @pytest.mark.importorskip('ast') def test_conditional_dependencies(self): specs = 'splort==4', 'quux>=1.1' requires = list(map(pkg_resources.Requirement.parse, specs)) diff --git a/setuptools/tests/test_markerlib.py b/setuptools/tests/test_markerlib.py deleted file mode 100644 index 8197b49dc4..0000000000 --- a/setuptools/tests/test_markerlib.py +++ /dev/null @@ -1,63 +0,0 @@ -import os - -import pytest - - -class TestMarkerlib: - - @pytest.mark.importorskip('ast') - def test_markers(self): - from _markerlib import interpret, default_environment, compile - - os_name = os.name - - assert interpret("") - - assert interpret("os.name != 'buuuu'") - assert interpret("os_name != 'buuuu'") - assert interpret("python_version > '1.0'") - assert interpret("python_version < '5.0'") - assert interpret("python_version <= '5.0'") - assert interpret("python_version >= '1.0'") - assert interpret("'%s' in os.name" % os_name) - assert interpret("'%s' in os_name" % os_name) - assert interpret("'buuuu' not in os.name") - - assert not interpret("os.name == 'buuuu'") - assert not interpret("os_name == 'buuuu'") - assert not interpret("python_version < '1.0'") - assert not interpret("python_version > '5.0'") - assert not interpret("python_version >= '5.0'") - assert not interpret("python_version <= '1.0'") - assert not interpret("'%s' not in os.name" % os_name) - assert not interpret("'buuuu' in os.name and python_version >= '5.0'") - assert not interpret("'buuuu' in os_name and python_version >= '5.0'") - - environment = default_environment() - environment['extra'] = 'test' - assert interpret("extra == 'test'", environment) - assert not interpret("extra == 'doc'", environment) - - def raises_nameError(): - try: - interpret("python.version == '42'") - except NameError: - pass - else: - raise Exception("Expected NameError") - - raises_nameError() - - def raises_syntaxError(): - try: - interpret("(x for x in (4,))") - except SyntaxError: - pass - else: - raise Exception("Expected SyntaxError") - - raises_syntaxError() - - statement = "python_version == '5'" - assert compile(statement).__doc__ == statement - From bca120fe59c78901914d837fd8dd9d0048196c87 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 10 Dec 2015 18:29:31 +1300 Subject: [PATCH 5359/8469] Update to the newest packaging, and collapse _parse_requirement_specs --- pkg_resources/__init__.py | 5 +---- pkg_resources/_vendor/packaging/requirements.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d463945f88..d81430c7d4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2873,10 +2873,7 @@ def __str__(self): def _parse_requirement_specs(req): - if req.specifier: - return [(spec.operator, spec.version) for spec in req.specifier] - else: - return [] + return [(spec.operator, spec.version) for spec in req.specifier] def parse_requirements(strs): diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 95b2d986cc..dc3672e7c8 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -48,11 +48,13 @@ class InvalidRequirement(ValueError): VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) VERSION_ONE = VERSION_PEP440 | VERSION_LEGACY -VERSION_MANY = VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE) -VERSION_MANY.setParseAction( - lambda s, l, t: SpecifierSet(','.join(t.asList())) -) -VERSION_SPEC = ((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)("specifier") +VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), + joinString=",")("_raw_spec") +_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) +_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') + +VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") +VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") MARKER_EXPR.setParseAction( @@ -61,7 +63,7 @@ class InvalidRequirement(ValueError): MARKER_SEPERATOR = SEMICOLON MARKER = MARKER_SEPERATOR + MARKER_EXPR -VERSION_AND_MARKER = Optional(VERSION_SPEC) + Optional(MARKER) +VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) URL_AND_MARKER = URL + Optional(MARKER) NAMED_REQUIREMENT = \ @@ -94,7 +96,7 @@ def __init__(self, requirement_string): else: self.url = None self.extras = req.extras.asList() if req.extras else [] - self.specifier = req.specifier if req.specifier else None + self.specifier = SpecifierSet(req.specifier) self.marker = req.marker if req.marker else None def __str__(self): From 76ffa368456be9ecbcb81a8ba3196f1246e444c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:04:44 -0500 Subject: [PATCH 5360/8469] Use context manager for opening file --- setuptools/command/develop.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 3a16cdc79b..85118767ba 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -125,9 +125,8 @@ def install_for_development(self): # 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) From 07037d10760792ffe616349ab7642b2fce0a0527 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:07:13 -0500 Subject: [PATCH 5361/8469] Extract variable, avoiding hanging indent. --- setuptools/command/develop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 85118767ba..07b66ccb13 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -54,8 +54,8 @@ def finalize_options(self): # 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) From 5ba1d009e2c44b63fc2d2e1de09fd1d768c10fca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:13:30 -0500 Subject: [PATCH 5362/8469] Use context for opening file. --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 525cb64578..f81b8d78ea 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -359,8 +359,9 @@ def scan_egg_links(self, search_path): self.scan_egg_link(item, entry) def scan_egg_link(self, path, entry): - lines = [_f for _f in map(str.strip, - open(os.path.join(path, entry))) if _f] + 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: for dist in find_distributions(os.path.join(path, lines[0])): dist.location = os.path.join(path, *lines) From cd28f4e0eddf3f571cb0efe05a23fa4a7a254de7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:16:25 -0500 Subject: [PATCH 5363/8469] Replace nested code with short-circuit return. --- setuptools/package_index.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f81b8d78ea..5adb8c2b2f 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -362,11 +362,15 @@ def scan_egg_link(self, path, entry): 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: - 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) + + if len(lines) != 2: + # format is not recognized; punt + return + + 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) def process_index(self,url,page): """Process the contents of a PyPI page""" From 2f7d95690e53fe92a82b055b82c4dc02b6a3339c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:18:38 -0500 Subject: [PATCH 5364/8469] Extract variables for improved documentation. --- setuptools/package_index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5adb8c2b2f..36231f116e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -367,7 +367,9 @@ def scan_egg_link(self, path, entry): # format is not recognized; punt return - for dist in find_distributions(os.path.join(path, lines[0])): + 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) From dacc24690e7c8503744ce433aae6dd74a50e2337 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:26:16 -0500 Subject: [PATCH 5365/8469] Extract if in for loop --- setuptools/package_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 36231f116e..00ce3ea5cb 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -352,8 +352,8 @@ def url_ok(self, url, fatal=False): self.warn(msg, url) def scan_egg_links(self, search_path): - for item in search_path: - if os.path.isdir(item): + dirs = filter(os.path.isdir, search_path) + for item in dirs: for entry in os.listdir(item): if entry.endswith('.egg-link'): self.scan_egg_link(item, entry) From 6b8c9181fbb0ef5b223ba45ed361991c601d1d13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:28:36 -0500 Subject: [PATCH 5366/8469] Get filter from the future --- setuptools/compat.py | 4 ++++ setuptools/package_index.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/compat.py b/setuptools/compat.py index 73e6e4aa7e..68ec97d4f3 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -29,6 +29,8 @@ 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""") @@ -59,6 +61,8 @@ urlunsplit, splittag, ) filterfalse = itertools.filterfalse + filter = filter + map = map def reraise(tp, value, tb=None): if value.__traceback__ is not tb: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 00ce3ea5cb..095688f9d7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -20,7 +20,7 @@ urlparse, urlunparse, unquote, splituser, url2pathname, name2codepoint, unichr, urljoin, urlsplit, urlunsplit, - ConfigParser) + ConfigParser, filter) from setuptools.compat import filterfalse from fnmatch import translate from setuptools.py26compat import strip_fragment From 6667ea387d5694cf936644898acd20000ca7b1ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:34:36 -0500 Subject: [PATCH 5367/8469] Replace nested for loop with dual-for generator expression. --- setuptools/package_index.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 095688f9d7..3456f715fc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -6,6 +6,7 @@ import socket import base64 import hashlib +import itertools from functools import wraps from pkg_resources import ( @@ -353,10 +354,13 @@ def url_ok(self, url, fatal=False): def scan_egg_links(self, search_path): dirs = filter(os.path.isdir, search_path) - for item in dirs: - for entry in os.listdir(item): - if entry.endswith('.egg-link'): - self.scan_egg_link(item, entry) + 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): with open(os.path.join(path, entry)) as raw_lines: From e99626c4eadf2e45ca5d729aaa3a5b4bb667536b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:36:25 -0500 Subject: [PATCH 5368/8469] Reclaim space from hanging indents --- setuptools/package_index.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3456f715fc..b0837628fe 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -17,11 +17,11 @@ 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, filter) +from setuptools.compat import ( + urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote, + splituser, url2pathname, name2codepoint, unichr, urljoin, urlsplit, + urlunsplit, ConfigParser, filter, +) from setuptools.compat import filterfalse from fnmatch import translate from setuptools.py26compat import strip_fragment From 6a10b4afbad5dca346b7fc7a5d8bb6d08d3286b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 10:37:09 -0500 Subject: [PATCH 5369/8469] Also use map from the future --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b0837628fe..7c071457ef 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -20,7 +20,7 @@ from setuptools.compat import ( urllib2, httplib, StringIO, HTTPError, urlparse, urlunparse, unquote, splituser, url2pathname, name2codepoint, unichr, urljoin, urlsplit, - urlunsplit, ConfigParser, filter, + urlunsplit, ConfigParser, filter, map, ) from setuptools.compat import filterfalse from fnmatch import translate From f351891c97500738be1f23b5e83b955e2d5bdd23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 12:26:46 -0500 Subject: [PATCH 5370/8469] Bumped to 18.8 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 975b45c56c..e0cefe2d86 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.7.2" +DEFAULT_VERSION = "18.8" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 5e40c6584c..aeb7307bc5 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.7.2' +__version__ = '18.8' From 6f9eccba4ca2404ad476ef121226489296171a03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 12:26:47 -0500 Subject: [PATCH 5371/8469] Added tag 18.8 for changeset c811801ffa1d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 508adf5b97..b34cd7fa0a 100644 --- a/.hgtags +++ b/.hgtags @@ -227,3 +227,4 @@ dfe190b09908f6b953209d13573063809de451b8 18.6 804f87045a901f1dc121cf9149143d654228dc13 18.6.1 67d07805606aead09349d5b91d7d26c68ddad2fc 18.7 3041e1fc409be90e885968b90faba405420fc161 18.7.1 +c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 From 7fd5df90d1f251a22bdb74bed21cebf298b6a8e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 11 Dec 2015 12:28:10 -0500 Subject: [PATCH 5372/8469] Bumped to 18.9 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index e0cefe2d86..6b8696567b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.8" +DEFAULT_VERSION = "18.9" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index aeb7307bc5..9c79593e15 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.8' +__version__ = '18.9' From a627cf9a72f8fca78b0520b72a5b44a0bbea9b8c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 10:05:24 -0500 Subject: [PATCH 5373/8469] Add test capturing infinite recursion. Ref #440. --- setuptools/tests/test_sandbox.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 6e1e9e1cd2..624954df6a 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -100,3 +100,13 @@ class CantPickleThis(Exception): saved_exc.resume() assert str(caught.value) == "CantPickleThis('detail',)" + + def test_unpickleable_exception_when_hiding_setuptools(self): + """ + As revealed in #440, an infinite recursion can occur if an unpickleable + exception while setuptools is hidden. Ensure this doesn't happen. + """ + sandbox = setuptools.sandbox + with sandbox.save_modules(): + sandbox.hide_setuptools() + raise sandbox.SandboxViolation('test') From bf8331685d1d5bb88cc6cf09236601f0dbe62330 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 10:45:04 -0500 Subject: [PATCH 5374/8469] Refine test to not make additional references to exceptions in setuptools.sandbox, but instead create a bespoke unpickleable exception. Ref #440. --- setuptools/tests/test_sandbox.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 624954df6a..a54c2fa076 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -106,7 +106,15 @@ def test_unpickleable_exception_when_hiding_setuptools(self): As revealed in #440, an infinite recursion can occur if an unpickleable exception while setuptools is hidden. Ensure this doesn't happen. """ - sandbox = setuptools.sandbox - with sandbox.save_modules(): - sandbox.hide_setuptools() - raise sandbox.SandboxViolation('test') + class ExceptionUnderTest(Exception): + """ + An unpickleable exception (not in globals). + """ + + with pytest.raises(setuptools.sandbox.UnpickleableException) as exc: + with setuptools.sandbox.save_modules(): + setuptools.sandbox.hide_setuptools() + raise ExceptionUnderTest() + + msg, = exc.value.args + assert msg == 'ExceptionUnderTest()' From 264b5dc6b9cf48b22bd2263d426026d7b8f45608 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 10:48:20 -0500 Subject: [PATCH 5375/8469] Prevent infinite recursion when UnpickleableException occurs in a sandbox context. Fixes #440. --- CHANGES.txt | 9 +++++++++ setuptools/sandbox.py | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index cb9bb02d04..ff31275a17 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,15 @@ CHANGES ======= +------ +18.8.1 +------ + +* Issue #440: Prevent infinite recursion when a SandboxViolation + or other UnpickleableException occurs in a sandbox context + with setuptools hidden. Fixes regression introduced in Setuptools + 12.0. + ---- 18.8 ---- diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 213cebff25..b8b1bac1b9 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -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 @@ def dump(cls, type, exc): 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))) From ce481836f31142b939f4b93a6eba90630ba354fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:00:02 -0500 Subject: [PATCH 5376/8469] caught is a better name here --- setuptools/tests/test_sandbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index a54c2fa076..40bd2ebedd 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -111,10 +111,10 @@ class ExceptionUnderTest(Exception): An unpickleable exception (not in globals). """ - with pytest.raises(setuptools.sandbox.UnpickleableException) as exc: + with pytest.raises(setuptools.sandbox.UnpickleableException) as caught: with setuptools.sandbox.save_modules(): setuptools.sandbox.hide_setuptools() raise ExceptionUnderTest() - msg, = exc.value.args + msg, = caught.value.args assert msg == 'ExceptionUnderTest()' From 3915be7722713c51aab291ed9720c7b83585d2b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:10:33 -0500 Subject: [PATCH 5377/8469] Add another test capturing violated expectation that SandboxViolation would be raised in a sandbox/hidden_setuptools context. Ref #440. --- setuptools/tests/test_sandbox.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 40bd2ebedd..fefd46f7e6 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -118,3 +118,24 @@ class ExceptionUnderTest(Exception): msg, = caught.value.args assert msg == 'ExceptionUnderTest()' + + def test_sandbox_violation_raised_hiding_setuptools(self, tmpdir): + """ + When in a sandbox with setuptools hidden, a SandboxViolation + should reflect a proper exception and not be wrapped in + an UnpickleableException. + """ + def write_file(): + "Trigger a SandboxViolation by writing outside the sandbox" + with open('/etc/foo', 'w'): + pass + sandbox = DirectorySandbox(str(tmpdir)) + with pytest.raises(setuptools.sandbox.SandboxViolation) as caught: + with setuptools.sandbox.save_modules(): + setuptools.sandbox.hide_setuptools() + sandbox.run(write_file) + + cmd, args, kwargs = caught.value.args + assert cmd == 'open' + assert args == ('/etc/foo', 'w') + assert kwargs == {} From 1d74aaab3372b6727158802c610043ca036ce5d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:29:01 -0500 Subject: [PATCH 5378/8469] Always import for SandboxViolation so it's pickleable. Ref #440. --- setuptools/sandbox.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index b8b1bac1b9..85de85ff9f 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -384,6 +384,7 @@ def __init__(self, sandbox, exceptions=_EXCEPTIONS): AbstractSandbox.__init__(self) def _violation(self, operation, *args, **kw): + from setuptools.sandbox import SandboxViolation raise SandboxViolation(operation, args, kw) if _file: From fa91749d1272c8a00c0c779a4ae9969ff277ee45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:57:40 -0500 Subject: [PATCH 5379/8469] Bumped to 18.8.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 6b8696567b..bbc4c92622 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.9" +DEFAULT_VERSION = "18.8.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 9c79593e15..bd0d8b71ae 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.9' +__version__ = '18.8.1' From 54852faf6a8c5f1383ac59243dc1e9bcafbbcfc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:57:42 -0500 Subject: [PATCH 5380/8469] Added tag 18.8.1 for changeset fbf06fa35f93 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b34cd7fa0a..ee080d5da0 100644 --- a/.hgtags +++ b/.hgtags @@ -228,3 +228,4 @@ dfe190b09908f6b953209d13573063809de451b8 18.6 67d07805606aead09349d5b91d7d26c68ddad2fc 18.7 3041e1fc409be90e885968b90faba405420fc161 18.7.1 c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 +fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 From 17d7ac38c0570bee51f3f202138d522a4cdf5669 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2015 11:58:57 -0500 Subject: [PATCH 5381/8469] Bumped to 18.8.2 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bbc4c92622..bd2acccd25 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.8.1" +DEFAULT_VERSION = "18.8.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index bd0d8b71ae..067c5e3743 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.8.1' +__version__ = '18.8.2' From 5eafe7644d18eddd77a5573ecc30b4c98efbb2c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 04:12:53 -0500 Subject: [PATCH 5382/8469] Prefer setdefault to hasattr/setattr --- setuptools/dist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d7ad46552a..b0c52838a9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -267,8 +267,7 @@ def __init__(self, attrs=None): 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 :) From 2f0e172bdab76b0c972b5d1480bcccc88f63c7ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 04:48:26 -0500 Subject: [PATCH 5383/8469] Add test capturing InterpolationSyntaxError on Python 3 and KeyError on Python 2 --- setuptools/tests/test_packageindex.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index dcd90d6fe7..897590e809 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,7 +1,11 @@ +from __future__ import absolute_import + import sys +import os import distutils.errors from setuptools.compat import httplib, HTTPError, unicode, pathname2url +from .textwrap import DALS import pkg_resources import setuptools.package_index @@ -201,3 +205,20 @@ def test_report(self): 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') rep = checker.report(lambda x: x, 'My message about %s') assert rep == 'My message about md5' + + +class TestPyPIConfig: + def test_percent_in_password(self, tmpdir, monkeypatch): + monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) + pypirc = tmpdir / '.pypirc' + with pypirc.open('w') as strm: + strm.write(DALS(""" + [pypi] + repository=https://pypi.python.org + username=jaraco + password=pity% + """)) + cfg = setuptools.package_index.PyPIConfig() + cred = cfg.creds_by_repository['pypi'] + assert cred.username == 'jaraco' + assert cred.password == 'pity%' From 477fef2d71db14b82d74ea73f4f90e02876d1967 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 04:51:03 -0500 Subject: [PATCH 5384/8469] Add test capturing InterpolationSyntaxError on Python 3. Ref #442 --- setuptools/tests/test_packageindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 897590e809..746860d561 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -219,6 +219,6 @@ def test_percent_in_password(self, tmpdir, monkeypatch): password=pity% """)) cfg = setuptools.package_index.PyPIConfig() - cred = cfg.creds_by_repository['pypi'] + cred = cfg.creds_by_repository['https://pypi.python.org'] assert cred.username == 'jaraco' assert cred.password == 'pity%' From ca4321bb5833e2daa7bee1a32a3dee37cb49f012 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 04:55:43 -0500 Subject: [PATCH 5385/8469] Use the modern name for the configparser module --- setuptools/command/easy_install.py | 8 ++++---- setuptools/command/setopt.py | 4 ++-- setuptools/compat.py | 4 ++-- setuptools/package_index.py | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 79f068b1d0..9ca3b5152d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1402,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: @@ -1415,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(" Date: Mon, 14 Dec 2015 05:31:46 -0500 Subject: [PATCH 5386/8469] Use SafeConfigParser in PyPIConfig file. Allows percent signs to be specified using two percent signs. Fixes #442. --- CHANGES.txt | 8 ++++++++ setuptools/package_index.py | 4 ++-- setuptools/tests/test_packageindex.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ff31275a17..1396d5fec2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,14 @@ CHANGES ======= +---- +19.0 +---- + +* Issue #442: Use SafeConfigParser for parsing .pypirc file. Now + fields containing the percent symbol (%) must have each percent + replaced with two percent symbols (%%). + ------ 18.8.1 ------ diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a26b58bcb7..322f9a6140 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -945,14 +945,14 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPIConfig(configparser.ConfigParser): +class PyPIConfig(configparser.SafeConfigParser): def __init__(self): """ Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - configparser.ConfigParser.__init__(self, defaults) + configparser.SafeConfigParser.__init__(self, defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 746860d561..a3e45adcf6 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -216,7 +216,7 @@ def test_percent_in_password(self, tmpdir, monkeypatch): [pypi] repository=https://pypi.python.org username=jaraco - password=pity% + password=pity%% """)) cfg = setuptools.package_index.PyPIConfig() cred = cfg.creds_by_repository['https://pypi.python.org'] From fbcbb51009bc76df9f2c66547439474799b9ab15 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 05:38:30 -0500 Subject: [PATCH 5387/8469] Use RawConfigParser instead of SafeConfigParser in PyPIConfig class. Interpolated values are no longer supported. Since backward compatibility could not be retained in either case, prefer the simpler, more direct format. Ref #442. --- CHANGES.txt | 5 ++--- setuptools/package_index.py | 4 ++-- setuptools/tests/test_packageindex.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1396d5fec2..355c75506e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,9 +7,8 @@ CHANGES 19.0 ---- -* Issue #442: Use SafeConfigParser for parsing .pypirc file. Now - fields containing the percent symbol (%) must have each percent - replaced with two percent symbols (%%). +* Issue #442: Use RawConfigParser for parsing .pypirc file. + Interpolated values are no longer honored in .pypirc files. ------ 18.8.1 diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 322f9a6140..2c565e88d2 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -945,14 +945,14 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPIConfig(configparser.SafeConfigParser): +class PyPIConfig(configparser.RawConfigParser): def __init__(self): """ Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - configparser.SafeConfigParser.__init__(self, defaults) + configparser.RawConfigParser.__init__(self, defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index a3e45adcf6..746860d561 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -216,7 +216,7 @@ def test_percent_in_password(self, tmpdir, monkeypatch): [pypi] repository=https://pypi.python.org username=jaraco - password=pity%% + password=pity% """)) cfg = setuptools.package_index.PyPIConfig() cred = cfg.creds_by_repository['https://pypi.python.org'] From 4765b89927b56b4ae8758b18d8cdd822d9007dae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 19:47:38 -0500 Subject: [PATCH 5388/8469] Bumped to 19.0 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bd2acccd25..eacaff174f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "18.8.2" +DEFAULT_VERSION = "19.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 067c5e3743..3b7740f105 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '18.8.2' +__version__ = '19.0' From 2b175325dc6a0516dbfeb902d2fc15e2b5f240ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 19:47:40 -0500 Subject: [PATCH 5389/8469] Added tag 19.0 for changeset cc41477ecf92 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ee080d5da0..85ed009543 100644 --- a/.hgtags +++ b/.hgtags @@ -229,3 +229,4 @@ dfe190b09908f6b953209d13573063809de451b8 18.6 3041e1fc409be90e885968b90faba405420fc161 18.7.1 c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 +cc41477ecf92f221c113736fac2830bf8079d40c 19.0 From 627d4b47c20ca79cd3ce1bb99d1b54ccf457a561 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 19:49:02 -0500 Subject: [PATCH 5390/8469] Bumped to 19.1 in preparation for next release. --- ez_setup.py | 2 +- setuptools/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index eacaff174f..da0f034dfc 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -30,7 +30,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "19.0" +DEFAULT_VERSION = "19.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir diff --git a/setuptools/version.py b/setuptools/version.py index 3b7740f105..a4bfb3ca55 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.0' +__version__ = '19.1' From 8427babe8e6418012cec2c408fee0eb95b4564a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 20:57:20 -0500 Subject: [PATCH 5391/8469] ez_setup now loads latest version using metadata --- ez_setup.py | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index da0f034dfc..bd73ca9daa 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -16,7 +16,8 @@ import platform import textwrap import contextlib -import warnings +import json +import codecs from distutils import log @@ -30,7 +31,8 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "19.1" +LATEST = object() +DEFAULT_VERSION = LATEST DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir @@ -140,6 +142,7 @@ def use_setuptools( Return None. Raise SystemExit if the requested version or later cannot be installed. """ + version = _resolve_version(version) to_dir = os.path.abspath(to_dir) # prior to importing, capture the module state for @@ -321,6 +324,7 @@ def download_setuptools( ``downloader_factory`` should be a function taking no arguments and returning a function for downloading a URL to a target. """ + version = _resolve_version(version) # making sure we use the absolute path to_dir = os.path.abspath(to_dir) zip_name = "setuptools-%s.zip" % version @@ -333,6 +337,27 @@ def download_setuptools( return os.path.realpath(saveto) +def _resolve_version(version): + """ + Resolve LATEST version + """ + if version is not LATEST: + return version + + with urlopen('https://pypi.python.org/pypi/setuptools/json') as resp: + charset = resp.info().get_content_charset() + reader = codecs.getreader(charset) + doc = json.load(reader(resp)) + + def by_vals(ver_string): + try: + return tuple(map(int, ver_string.split('.'))) + except Exception: + return (0,) + + return max(doc['releases'], key=by_vals) + + def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package. From d150f9d4b67300a7f4c557a5c95252a947558201 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:10:43 -0500 Subject: [PATCH 5392/8469] Just use the indicated version directly. --- ez_setup.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index bd73ca9daa..c099186119 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -349,13 +349,7 @@ def _resolve_version(version): reader = codecs.getreader(charset) doc = json.load(reader(resp)) - def by_vals(ver_string): - try: - return tuple(map(int, ver_string.split('.'))) - except Exception: - return (0,) - - return max(doc['releases'], key=by_vals) + return doc['info']['version'] def _build_install_args(options): From 5919897c159a1d5b093107dde380f3c1c81f356a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:26:21 -0500 Subject: [PATCH 5393/8469] Use contextlib.closing for the response --- ez_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index c099186119..d8c3305e11 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -344,7 +344,8 @@ def _resolve_version(version): if version is not LATEST: return version - with urlopen('https://pypi.python.org/pypi/setuptools/json') as resp: + resp = urlopen('https://pypi.python.org/pypi/setuptools/json') + with contextlib.closing(resp): charset = resp.info().get_content_charset() reader = codecs.getreader(charset) doc = json.load(reader(resp)) From 70fb4bec6c4a8fd5cb82cab29efb4a2ce8d227b0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:31:04 -0500 Subject: [PATCH 5394/8469] Restore Python 2.7 compatibility --- ez_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index d8c3305e11..1320ac9296 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -346,7 +346,11 @@ def _resolve_version(version): resp = urlopen('https://pypi.python.org/pypi/setuptools/json') with contextlib.closing(resp): - charset = resp.info().get_content_charset() + try: + charset = resp.info().get_content_charset() + except Exception: + # Python 2 compat; assume UTF-8 + charset = 'UTF-8' reader = codecs.getreader(charset) doc = json.load(reader(resp)) From 7217bff3e01372a98ec19ad29079a8c1680b9500 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:31:49 -0500 Subject: [PATCH 5395/8469] release script no longer mutates ez_setup.py --- release.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release.py b/release.py index a76d2de489..22aeae0223 100644 --- a/release.py +++ b/release.py @@ -19,9 +19,7 @@ def before_upload(): def after_push(): BootstrapBookmark.push() -files_with_versions = ( - 'ez_setup.py', 'setuptools/version.py', -) +files_with_versions = 'setuptools/version.py', # bdist_wheel must be included or pip will break dist_commands = 'sdist', 'bdist_wheel' From 2fa748c3eb25908ff3fe6e3e256638562c614aed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:37:14 -0500 Subject: [PATCH 5396/8469] No longer need to specify a version in the test run. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0bfb11bb53..54d9c395bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,4 +20,6 @@ script: - python bootstrap.py - python setup.py test --addopts='-rs' - - python ez_setup.py --version 18.6.1 + + # test the bootstrap script + - python ez_setup.py From 2a24c4c7f67090f4ea73d42a2442b5eaf55d4f39 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Dec 2015 21:52:49 -0500 Subject: [PATCH 5397/8469] Update changelog --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 355c75506e..4bd8c4a6aa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,14 @@ CHANGES ======= +---- +19.1 +---- + +* The bootstrap script ``ez_setup.py`` now automatically detects + the latest version of setuptools (using PyPI JSON API) rather + than hard-coding a particular value. + ---- 19.0 ---- From 6d8ecefd8e915a8ec4e73649b3e352b7d48931f2 Mon Sep 17 00:00:00 2001 From: lsenta Date: Wed, 16 Dec 2015 12:15:53 +0100 Subject: [PATCH 5398/8469] Fixes #475: correct a typo in metadata environment marker evaluation --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f65fef3eaf..b55e4127b4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1537,7 +1537,7 @@ def _translate_metadata2(env): """ return dict( (key.replace('.', '_'), value) - for key, value in env + for key, value in env.items() ) @classmethod From 1542dc13b25c29ae8ccdda47bc2260572c9d1327 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 08:02:19 -0500 Subject: [PATCH 5399/8469] Update changelog --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4bd8c4a6aa..f68cd4189b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ CHANGES * The bootstrap script ``ez_setup.py`` now automatically detects the latest version of setuptools (using PyPI JSON API) rather than hard-coding a particular value. +* Issue #475: Fix incorrect usage in _translate_metadata2. ---- 19.0 From 89a239d8a2e2dc0dc42d717ad131957f1063a456 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 08:04:01 -0500 Subject: [PATCH 5400/8469] Now that bootstrap script automatically installs the latest published version, it's no longer necessary to track the _current_ bootstrap version with a bookmark. --- release.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/release.py b/release.py index 22aeae0223..dd1d6a1caf 100644 --- a/release.py +++ b/release.py @@ -4,21 +4,12 @@ """ import os -import subprocess import pkg_resources pkg_resources.require('jaraco.packaging>=2.0') pkg_resources.require('wheel') - -def before_upload(): - BootstrapBookmark.add() - - -def after_push(): - BootstrapBookmark.push() - files_with_versions = 'setuptools/version.py', # bdist_wheel must be included or pip will break @@ -27,22 +18,3 @@ def after_push(): test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" - -class BootstrapBookmark: - name = 'bootstrap' - - @classmethod - def add(cls): - cmd = ['hg', 'bookmark', '-i', cls.name, '-f'] - subprocess.Popen(cmd) - - @classmethod - def push(cls): - """ - Push the bootstrap bookmark - """ - push_command = ['hg', 'push', '-B', cls.name] - # don't use check_call here because mercurial will return a non-zero - # code even if it succeeds at pushing the bookmark (because there are - # no changesets to be pushed). !dm mercurial - subprocess.call(push_command) From 4e64dd995a2d3c07efb9472bbd2cd6045d515046 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 08:10:00 -0500 Subject: [PATCH 5401/8469] Update changelog to reference ticket --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f68cd4189b..4e71bd725e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,8 @@ CHANGES 19.1 ---- -* The bootstrap script ``ez_setup.py`` now automatically detects +* Issue #215: The bootstrap script ``ez_setup.py`` now + automatically detects the latest version of setuptools (using PyPI JSON API) rather than hard-coding a particular value. * Issue #475: Fix incorrect usage in _translate_metadata2. From 2776f28710f3a7e034bb5166e43e150275062c3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 08:18:05 -0500 Subject: [PATCH 5402/8469] Added tag 19.1 for changeset 834782ce4915 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 85ed009543..f8f7ee7c1a 100644 --- a/.hgtags +++ b/.hgtags @@ -230,3 +230,4 @@ dfe190b09908f6b953209d13573063809de451b8 18.6 c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 cc41477ecf92f221c113736fac2830bf8079d40c 19.0 +834782ce49154e9744e499e00eb392c347f9e034 19.1 From cfcfccb6c78490ed368fa08d7ee84418ac4706a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 08:19:26 -0500 Subject: [PATCH 5403/8469] Bumped to 19.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index a4bfb3ca55..16f3f6385f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.1' +__version__ = '19.2' From d8a425e00d05c0cd0896b6e684b18304c6bbf717 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:05:43 -0500 Subject: [PATCH 5404/8469] In resolve version, always cast to a string (avoiding Unicode on Python 2). Fixes #476. --- CHANGES.txt | 7 +++++++ ez_setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4e71bd725e..3764d79989 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,13 @@ CHANGES ======= +------ +19.1.1 +------ + +* Issue #476: Cast version to string (using default encoding) + to avoid creating Unicode types on Python 2 clients. + ---- 19.1 ---- diff --git a/ez_setup.py b/ez_setup.py index 1320ac9296..39ea44bcf1 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -354,7 +354,7 @@ def _resolve_version(version): reader = codecs.getreader(charset) doc = json.load(reader(resp)) - return doc['info']['version'] + return str(doc['info']['version']) def _build_install_args(options): From 156bf219d2e9c99b3a241fa59dd4c652cfa90a45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:10:07 -0500 Subject: [PATCH 5405/8469] Explicitly quote strings rather than relying on repr. Fixes #477. --- CHANGES.txt | 3 +++ ez_setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3764d79989..48fc18a906 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ CHANGES * Issue #476: Cast version to string (using default encoding) to avoid creating Unicode types on Python 2 clients. +* Issue #477: In Powershell downloader, use explicit rendering + of strings, rather than rely on ``repr``, which can be + incorrect (especially on Python 2). ---- 19.1 diff --git a/ez_setup.py b/ez_setup.py index 39ea44bcf1..16f707a655 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -225,7 +225,7 @@ def download_file_powershell(url, target): ps_cmd = ( "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " "[System.Net.CredentialCache]::DefaultCredentials; " - "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" + '(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")' % vars() ) cmd = [ From 0923ea577d1374b39a4d5e57688c0c9739ed3734 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:10:27 -0500 Subject: [PATCH 5406/8469] Prefer locals to vars --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index 16f707a655..9715bdc7b0 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -226,7 +226,7 @@ def download_file_powershell(url, target): "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " "[System.Net.CredentialCache]::DefaultCredentials; " '(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")' - % vars() + % locals() ) cmd = [ 'powershell', From 79d6a93283b6fab9a1aa8f63a0024eff43f88716 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:27:29 -0500 Subject: [PATCH 5407/8469] Bumped to 19.1.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 16f3f6385f..1ed115074e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.2' +__version__ = '19.1.1' From 4e75ee7fc0fa6bc9ff00bbc338ca883f0f21f968 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:27:30 -0500 Subject: [PATCH 5408/8469] Added tag 19.1.1 for changeset 0a2a3d89416e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f8f7ee7c1a..eb98b62a26 100644 --- a/.hgtags +++ b/.hgtags @@ -231,3 +231,4 @@ c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 cc41477ecf92f221c113736fac2830bf8079d40c 19.0 834782ce49154e9744e499e00eb392c347f9e034 19.1 +0a2a3d89416e1642cf6f41d22dbc07b3d3c15a4d 19.1.1 From 8a91baa090870aa3e70ea26c716ccde955ec1381 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:29:18 -0500 Subject: [PATCH 5409/8469] Bumped to 19.1.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 1ed115074e..961ff96e6b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.1.1' +__version__ = '19.1.2' From 3f4ef89512da6a3e89f27121446ec59773869017 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Wed, 23 Dec 2015 14:07:40 -0500 Subject: [PATCH 5410/8469] Fix failing test on Windows due to path separator --- setuptools/tests/test_setuptools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 8aca593ad9..e59800d2ec 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -23,7 +23,7 @@ def test_findall(example_source): def test_findall_curdir(example_source): with example_source.as_cwd(): found = list(setuptools.findall()) - expected = ['readme.txt', 'foo/bar.py'] + expected = ['readme.txt', os.path.join('foo', 'bar.py')] assert found == expected From 2f2011b3d9e21861f003181ab0c3abb9701df83b Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Thu, 24 Dec 2015 15:45:14 -0500 Subject: [PATCH 5411/8469] Fix failing test on Windows due to path formatting bugs --- setuptools/tests/test_easy_install.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 00e16b63f5..f0330f17e7 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -446,10 +446,15 @@ def test_get_script_header_jython_workaround(self, tmpdir): exe = tmpdir / 'exe.py' with exe.open('w') as f: f.write(header) - exe = str(exe) + + exe = ei.nt_quote_arg(os.path.normpath(str(exe))) + + # Make sure Windows paths are quoted properly before they're sent + # through shlex.split by get_script_header + executable = '"%s"' % exe if os.path.splitdrive(exe)[0] else exe header = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python', - executable=exe) + executable=executable) assert header == '#!/usr/bin/env %s\n' % exe expect_out = 'stdout' if sys.version_info < (2,7) else 'stderr' @@ -458,7 +463,7 @@ def test_get_script_header_jython_workaround(self, tmpdir): # When options are included, generate a broken shebang line # with a warning emitted candidate = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x', - executable=exe) + executable=executable) assert candidate == '#!%s -x\n' % exe output = locals()[expect_out] assert 'Unable to adapt shebang line' in output.getvalue() From 9578a0f640dac57f95a391c9f2a1ebdaba1a0846 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Thu, 24 Dec 2015 16:16:19 -0500 Subject: [PATCH 5412/8469] Prevent exception in atexit handlers when cert store's tempfile is already cleaned up by py.test. --- setuptools/ssl_support.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index cc7db067e9..7394f4f531 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -223,6 +223,12 @@ def __init__(self, stores=(), certs=()): self.addcerts(certs) atexit.register(self.close) + def close(self): + try: + super(MyCertFile, self).close() + except OSError: + pass + _wincerts = MyCertFile(stores=['CA', 'ROOT']) return _wincerts.name From 3172bf9505e5d6b6f95b8b6a7f3dbde9cfe4ce48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 09:56:47 -0500 Subject: [PATCH 5413/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 48fc18a906..005f2ce643 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,12 @@ CHANGES ======= +---- +19.2 +---- + +* Pull Request #163: Add get_command_list method to Distribution. + ------ 19.1.1 ------ From 57809ecf386e1c87bfbed81baf4a3d7f9af9dbbe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:23:52 -0500 Subject: [PATCH 5414/8469] Separate _find_egg_info_files into two methods, one for each of the needed outputs. --- setuptools/tests/test_egg_info.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 74beb7f59a..e92ef920e9 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -60,7 +60,7 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() self._run_install_command(tmpdir_cwd, env) - _, actual = self._find_egg_info_files(env.paths['lib']) + actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', @@ -83,7 +83,7 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): } }) self._run_install_command(tmpdir_cwd, env) - egg_info_dir, _ = self._find_egg_info_files(env.paths['lib']) + egg_info_dir = self._find_egg_info_dir(env.paths['lib']) sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') assert 'docs/usage.rst' in open(sources_txt).read().split('\n') @@ -107,12 +107,15 @@ def _run_install_command(self, tmpdir_cwd, env): if code: raise AssertionError(data) - def _find_egg_info_files(self, root): + def _find_egg_info_dir(self, root): results = ( - (dirpath, filenames) + dirpath for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) # expect exactly one result result, = results return result + + def _find_egg_info_files(self, root): + return os.listdir(self._find_egg_info_dir(root)) From f4ad85091ab6a78134de046ef5c7a57cffa273ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:28:25 -0500 Subject: [PATCH 5415/8469] Wrap the result in a DirList to avoid tuple unpacking and unused variables --- setuptools/tests/test_egg_info.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 74beb7f59a..333d11d6f4 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -60,7 +60,7 @@ def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() self._run_install_command(tmpdir_cwd, env) - _, actual = self._find_egg_info_files(env.paths['lib']) + actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', @@ -83,7 +83,7 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): } }) self._run_install_command(tmpdir_cwd, env) - egg_info_dir, _ = self._find_egg_info_files(env.paths['lib']) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') assert 'docs/usage.rst' in open(sources_txt).read().split('\n') @@ -108,8 +108,13 @@ def _run_install_command(self, tmpdir_cwd, env): raise AssertionError(data) def _find_egg_info_files(self, root): + class DirList(list): + def __init__(self, files, base): + super(DirList, self).__init__(files) + self.base = base + results = ( - (dirpath, filenames) + DirList(filenames, dirpath) for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) From 81f26b644ab1bbb56eb0b2161a0aec752c51bf54 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:49:28 -0500 Subject: [PATCH 5416/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 005f2ce643..7ed7434be1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES ---- * Pull Request #163: Add get_command_list method to Distribution. +* Pull Request #162: Add missing whitespace to multiline string + literals. ------ 19.1.1 From c8deca55f387fe2be58842a610aea761d642725c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:52:52 -0500 Subject: [PATCH 5417/8469] Bumped to 19.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 961ff96e6b..16f3f6385f 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.1.2' +__version__ = '19.2' From b5b4ff480354eb52f17835cad6c828f12d2d5b6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:52:54 -0500 Subject: [PATCH 5418/8469] Added tag 19.2 for changeset 5d24cf9d1ced --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index eb98b62a26..60ce3f9483 100644 --- a/.hgtags +++ b/.hgtags @@ -232,3 +232,4 @@ fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 cc41477ecf92f221c113736fac2830bf8079d40c 19.0 834782ce49154e9744e499e00eb392c347f9e034 19.1 0a2a3d89416e1642cf6f41d22dbc07b3d3c15a4d 19.1.1 +5d24cf9d1ced76c406ab3c4a94c25d1fe79b94bc 19.2 From 6bdbe8957d8c8d293e3fea3fa4baf45eb7c3a3a4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 10:54:28 -0500 Subject: [PATCH 5419/8469] Bumped to 19.3 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 16f3f6385f..09bbb730c0 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.2' +__version__ = '19.3' From 7d63ebffa598f12b55d9fd0a41768ec88ff70528 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Dec 2015 20:50:55 -0500 Subject: [PATCH 5420/8469] Add tests capturing platform_python_implementation and implementation_version --- pkg_resources/api_tests.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index ccb4b5cdeb..2458c32204 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -391,5 +391,11 @@ Environment Markers >>> em("python_version > '2.5'") True - >>> im("implementation_name=='CPython'") + >>> im("implementation_name=='cpython'") + False + + >>> im("platform_python_implementation=='CPython'") + False + + >>> im("implementation_version=='3.5.1'") False From 06872bb0bbbeb953e90bd0941444b0d499056557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 11:51:01 -0500 Subject: [PATCH 5421/8469] Update vendoring technique to match that used for packaging. Ref #229. --HG-- branch : feature/issue-229 --- Makefile | 6 +- pkg_resources/tests/test_resources.py | 4 +- setup.py | 3 - setuptools/__init__.py | 9 +- setuptools/_vendor/__init__.py | 0 setuptools/_vendor/six-1.7.3.egg | Bin 8240 -> 0 bytes setuptools/_vendor/six.py | 868 ++++++++++++++++++++++++++ setuptools/_vendor/vendored.txt | 1 + setuptools/bootstrap.py | 27 - setuptools/command/bdist_egg.py | 7 +- setuptools/command/develop.py | 7 +- setuptools/command/easy_install.py | 10 +- setuptools/command/egg_info.py | 7 +- setuptools/command/rotate.py | 7 +- setuptools/command/sdist.py | 7 +- setuptools/command/setopt.py | 7 +- setuptools/command/test.py | 7 +- setuptools/command/upload_docs.py | 10 +- setuptools/depends.py | 7 +- setuptools/dist.py | 7 +- setuptools/package_index.py | 10 +- setuptools/sandbox.py | 10 +- setuptools/ssl_support.py | 7 +- setuptools/tests/__init__.py | 7 +- setuptools/tests/contexts.py | 7 +- setuptools/tests/server.py | 8 +- setuptools/tests/test_bdist_egg.py | 1 - setuptools/tests/test_develop.py | 7 +- setuptools/tests/test_easy_install.py | 11 +- setuptools/tests/test_integration.py | 8 +- setuptools/tests/test_packageindex.py | 10 +- setuptools/tests/test_sdist.py | 8 +- setuptools/tests/test_test.py | 1 - setuptools/unicode_utils.py | 8 +- 34 files changed, 1036 insertions(+), 68 deletions(-) create mode 100644 setuptools/_vendor/__init__.py delete mode 100644 setuptools/_vendor/six-1.7.3.egg create mode 100644 setuptools/_vendor/six.py create mode 100644 setuptools/_vendor/vendored.txt delete mode 100644 setuptools/bootstrap.py diff --git a/Makefile b/Makefile index 37dd26eb91..54dad480fa 100644 --- a/Makefile +++ b/Makefile @@ -3,5 +3,9 @@ empty: update-vendored: rm -rf pkg_resources/_vendor/packaging - pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ + python3.5 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ rm -rf pkg_resources/_vendor/*.{egg,dist}-info + + rm -rf setuptools/_vendor/six + python3.5 -m pip install -r setuptools/_vendor/vendored.txt -t setuptools/_vendor/ + rm -rf setuptools/_vendor/*.{egg,dist}-info diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 92d0e49c38..9fda892fb6 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -14,8 +14,6 @@ packaging = pkg_resources.packaging -import six - def safe_repr(obj, short=False): """ copied from Python2.7""" try: @@ -315,7 +313,7 @@ def test_printable_name(self): def checkSubMap(self, m): assert len(m) == len(self.submap_expect) - for key, ep in six.iteritems(self.submap_expect): + for key, ep in self.submap_expect.items(): assert repr(m.get(key)) == repr(ep) submap_expect = dict( diff --git a/setup.py b/setup.py index a21e5025ad..dfb578a152 100755 --- a/setup.py +++ b/setup.py @@ -148,9 +148,6 @@ def _gen_console_scripts(): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), - install_requires=[ - 'six>=1.5', - ], extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2015.11.20", diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fffcac76ea..6e1e5aa418 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,7 +1,5 @@ """Extensions to the 'distutils' for large or complex distributions""" -__import__('setuptools.bootstrap').bootstrap.ensure_deps() - import os import functools import distutils.core @@ -10,7 +8,12 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from six.moves import filterfalse +try: + from setuptools._vendor.six.moves import filterfalse +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import filterfalse import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/_vendor/__init__.py b/setuptools/_vendor/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/_vendor/six-1.7.3.egg b/setuptools/_vendor/six-1.7.3.egg deleted file mode 100644 index fe3e82c69bba092242593de34724c5eea6644b06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8240 zcmZvC1yCH@*7e{63_*i?(BK63!F6yC?(Po3-Q7Zv;1Jw(a1HJf+!7!#IDzozey{%b z?z{E6YFAfv^;%u~oV`|e)oK+51VlUl000E&+8#)b#mz=i69WJlRsaC~3~f7C)5ujn+YU^s$jU(IuJ-?pgz_|yx@$i1EeMN(5mb4yhs+UN&d{k~f_ z0MOhs>bB71;zG|&>sJhz0j`@r@0{i-L32UqEm63)Nl>>YbHh`&jGB!!T3s3)()u3` z9U(?ClkxtZ8$a*-y0uSfzS*Z5x65ZAV64pMwmN+XdihqLDD*gQfD$yM{wa#@dpG>C z-KS~0O`i$k+{s@NT&* zNeCbPttffqI= z(D!)b2Q(fek`0RGLKQ0JM5JV!^xv1@jqDRp37`~+mH_ZmencfiaTPTGv4V+zpF6+J zvnm7{v>kl{L{B&3y+zXU6%uDAoCxgq2a;3Ui6K};NxyfNRau!vM#_DwidyZXGxP&y z4Zm-bOpEP4fjW^0c3=3BzoAf%jE(O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T@3Vr_g?haC3Luu z#caE*gvrdrfmpUvINxEYXR7Dw++FGUC%wT(0Y;NLEYl;JfVr|?#eOuJjB1Vf$6YOS zkrSt!N?Mfzq+K7BQr`?5oeC)N6#hsfan-?G&_U2HP()f*S*y`5M&Gn0rc4sze&l*^ z6#RHoX$g%epFXLLZb7=1#XE{@!e^fqZ@;C zBpWUyXX6AX{z&p}VuY(*%1B^Sz52svBe0*!3v1_MxS1;vG^N1nR!aL=h7-X)lo2Uj zuJ3+T52dFugV@2gj_o*zI85HD^>`+Y)PV8~OG$_#wfEHTyGdC^bi`UE{;4PYH-1M7 zi3IGDFG*ytQKKckvcTt}L4K2Gq1vm!JBwG_6A5q?hlw+HHNFCqd^o#}eA^ajYh8p2fo7K|6b;J3EzdJr1F+7 zGHBfHmerxwj9r(|-dSzuT}E18q>LkFE=t*th~4fMKPttxVH^rDfe>oxKmg0?h}$)} z;>55Q2JYodu`y$3{U<^R8s_i9>y^1GzYuUE=Q!y4@T3dG)v?F7WU)(LHJK$!Z@0Pl z8Tw!1)asqf2an95Po~wb?5s|1-ABA2UaQs@ppnSZ5#Q^KW4T-^Em+S~+`{j^mtr{| z`}zvvIyH^jw)p9rrEc{|BlC-(#o;c^Tuy!w89|5R>*!loZ@p(7;U~S4v1Kiv+E!v8 zr0TpcdEW&pb|BdT7ihsx4nHr}7hjOy=OZ&?6q>{jP;2N#X!<+qPJcPm9VwgIbHvV! z{ECC$tq2@BbXg~zEaOP5UR4v~@l+5Tn&&Bst=@lPJKufUnpLqM7P{p^rQb!h5eoC@9y+Z zihp|3e<(WtPVxVp>Ywm`&cJ`*DSzzs-_87OBL2zn&*lFQgD&~s82)QBR1}c@+Oa?X R0U!e+|5$nIpF077{|78O^Y{P& diff --git a/setuptools/_vendor/six.py b/setuptools/_vendor/six.py new file mode 100644 index 0000000000..190c0239cd --- /dev/null +++ b/setuptools/_vendor/six.py @@ -0,0 +1,868 @@ +"""Utilities for writing code that runs on Python 2 and 3""" + +# Copyright (c) 2010-2015 Benjamin Peterson +# +# 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. + +from __future__ import absolute_import + +import functools +import itertools +import operator +import sys +import types + +__author__ = "Benjamin Peterson " +__version__ = "1.10.0" + + +# Useful for very coarse version differentiation. +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 +PY34 = sys.version_info[0:2] >= (3, 4) + +if PY3: + string_types = str, + integer_types = int, + class_types = type, + text_type = str + binary_type = bytes + + MAXSIZE = sys.maxsize +else: + string_types = basestring, + integer_types = (int, long) + class_types = (type, types.ClassType) + text_type = unicode + binary_type = str + + if sys.platform.startswith("java"): + # Jython always uses 32 bits. + MAXSIZE = int((1 << 31) - 1) + else: + # It's possible to have sizeof(long) != sizeof(Py_ssize_t). + class X(object): + + def __len__(self): + return 1 << 31 + try: + len(X()) + except OverflowError: + # 32-bit + MAXSIZE = int((1 << 31) - 1) + else: + # 64-bit + MAXSIZE = int((1 << 63) - 1) + del X + + +def _add_doc(func, doc): + """Add documentation to a function.""" + func.__doc__ = doc + + +def _import_module(name): + """Import module, returning the module after the last dot.""" + __import__(name) + return sys.modules[name] + + +class _LazyDescr(object): + + def __init__(self, name): + self.name = name + + def __get__(self, obj, tp): + result = self._resolve() + setattr(obj, self.name, result) # Invokes __set__. + try: + # This is a bit ugly, but it avoids running this again by + # removing this descriptor. + delattr(obj.__class__, self.name) + except AttributeError: + pass + return result + + +class MovedModule(_LazyDescr): + + def __init__(self, name, old, new=None): + super(MovedModule, self).__init__(name) + if PY3: + if new is None: + new = name + self.mod = new + else: + self.mod = old + + def _resolve(self): + return _import_module(self.mod) + + def __getattr__(self, attr): + _module = self._resolve() + value = getattr(_module, attr) + setattr(self, attr, value) + return value + + +class _LazyModule(types.ModuleType): + + def __init__(self, name): + super(_LazyModule, self).__init__(name) + self.__doc__ = self.__class__.__doc__ + + def __dir__(self): + attrs = ["__doc__", "__name__"] + attrs += [attr.name for attr in self._moved_attributes] + return attrs + + # Subclasses should override this + _moved_attributes = [] + + +class MovedAttribute(_LazyDescr): + + def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): + super(MovedAttribute, self).__init__(name) + if PY3: + if new_mod is None: + new_mod = name + self.mod = new_mod + if new_attr is None: + if old_attr is None: + new_attr = name + else: + new_attr = old_attr + self.attr = new_attr + else: + self.mod = old_mod + if old_attr is None: + old_attr = name + self.attr = old_attr + + def _resolve(self): + module = _import_module(self.mod) + return getattr(module, self.attr) + + +class _SixMetaPathImporter(object): + + """ + A meta path importer to import six.moves and its submodules. + + This class implements a PEP302 finder and loader. It should be compatible + with Python 2.5 and all existing versions of Python3 + """ + + def __init__(self, six_module_name): + self.name = six_module_name + self.known_modules = {} + + def _add_module(self, mod, *fullnames): + for fullname in fullnames: + self.known_modules[self.name + "." + fullname] = mod + + def _get_module(self, fullname): + return self.known_modules[self.name + "." + fullname] + + def find_module(self, fullname, path=None): + if fullname in self.known_modules: + return self + return None + + def __get_module(self, fullname): + try: + return self.known_modules[fullname] + except KeyError: + raise ImportError("This loader does not know module " + fullname) + + def load_module(self, fullname): + try: + # in case of a reload + return sys.modules[fullname] + except KeyError: + pass + mod = self.__get_module(fullname) + if isinstance(mod, MovedModule): + mod = mod._resolve() + else: + mod.__loader__ = self + sys.modules[fullname] = mod + return mod + + def is_package(self, fullname): + """ + Return true, if the named module is a package. + + We need this method to get correct spec objects with + Python 3.4 (see PEP451) + """ + return hasattr(self.__get_module(fullname), "__path__") + + def get_code(self, fullname): + """Return None + + Required, if is_package is implemented""" + self.__get_module(fullname) # eventually raises ImportError + return None + get_source = get_code # same as get_code + +_importer = _SixMetaPathImporter(__name__) + + +class _MovedItems(_LazyModule): + + """Lazy loading of moved objects""" + __path__ = [] # mark as package + + +_moved_attributes = [ + MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), + MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), + MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), + MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), + MovedAttribute("intern", "__builtin__", "sys"), + MovedAttribute("map", "itertools", "builtins", "imap", "map"), + MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), + MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), + MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), + MovedAttribute("reduce", "__builtin__", "functools"), + MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), + MovedAttribute("StringIO", "StringIO", "io"), + MovedAttribute("UserDict", "UserDict", "collections"), + MovedAttribute("UserList", "UserList", "collections"), + MovedAttribute("UserString", "UserString", "collections"), + MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), + MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), + MovedModule("builtins", "__builtin__"), + MovedModule("configparser", "ConfigParser"), + MovedModule("copyreg", "copy_reg"), + MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), + MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), + MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), + MovedModule("http_cookies", "Cookie", "http.cookies"), + MovedModule("html_entities", "htmlentitydefs", "html.entities"), + MovedModule("html_parser", "HTMLParser", "html.parser"), + MovedModule("http_client", "httplib", "http.client"), + MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), + MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), + MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), + MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), + MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), + MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), + MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), + MovedModule("cPickle", "cPickle", "pickle"), + MovedModule("queue", "Queue"), + MovedModule("reprlib", "repr"), + MovedModule("socketserver", "SocketServer"), + MovedModule("_thread", "thread", "_thread"), + MovedModule("tkinter", "Tkinter"), + MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), + MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), + MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), + MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), + MovedModule("tkinter_tix", "Tix", "tkinter.tix"), + MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), + MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), + MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), + MovedModule("tkinter_colorchooser", "tkColorChooser", + "tkinter.colorchooser"), + MovedModule("tkinter_commondialog", "tkCommonDialog", + "tkinter.commondialog"), + MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), + MovedModule("tkinter_font", "tkFont", "tkinter.font"), + MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), + MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", + "tkinter.simpledialog"), + MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), + MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), + MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), + MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), + MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), + MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), +] +# Add windows specific modules. +if sys.platform == "win32": + _moved_attributes += [ + MovedModule("winreg", "_winreg"), + ] + +for attr in _moved_attributes: + setattr(_MovedItems, attr.name, attr) + if isinstance(attr, MovedModule): + _importer._add_module(attr, "moves." + attr.name) +del attr + +_MovedItems._moved_attributes = _moved_attributes + +moves = _MovedItems(__name__ + ".moves") +_importer._add_module(moves, "moves") + + +class Module_six_moves_urllib_parse(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_parse""" + + +_urllib_parse_moved_attributes = [ + MovedAttribute("ParseResult", "urlparse", "urllib.parse"), + MovedAttribute("SplitResult", "urlparse", "urllib.parse"), + MovedAttribute("parse_qs", "urlparse", "urllib.parse"), + MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), + MovedAttribute("urldefrag", "urlparse", "urllib.parse"), + MovedAttribute("urljoin", "urlparse", "urllib.parse"), + MovedAttribute("urlparse", "urlparse", "urllib.parse"), + MovedAttribute("urlsplit", "urlparse", "urllib.parse"), + MovedAttribute("urlunparse", "urlparse", "urllib.parse"), + MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), + MovedAttribute("quote", "urllib", "urllib.parse"), + MovedAttribute("quote_plus", "urllib", "urllib.parse"), + MovedAttribute("unquote", "urllib", "urllib.parse"), + MovedAttribute("unquote_plus", "urllib", "urllib.parse"), + MovedAttribute("urlencode", "urllib", "urllib.parse"), + MovedAttribute("splitquery", "urllib", "urllib.parse"), + MovedAttribute("splittag", "urllib", "urllib.parse"), + MovedAttribute("splituser", "urllib", "urllib.parse"), + MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), + MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), + MovedAttribute("uses_params", "urlparse", "urllib.parse"), + MovedAttribute("uses_query", "urlparse", "urllib.parse"), + MovedAttribute("uses_relative", "urlparse", "urllib.parse"), +] +for attr in _urllib_parse_moved_attributes: + setattr(Module_six_moves_urllib_parse, attr.name, attr) +del attr + +Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes + +_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), + "moves.urllib_parse", "moves.urllib.parse") + + +class Module_six_moves_urllib_error(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_error""" + + +_urllib_error_moved_attributes = [ + MovedAttribute("URLError", "urllib2", "urllib.error"), + MovedAttribute("HTTPError", "urllib2", "urllib.error"), + MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), +] +for attr in _urllib_error_moved_attributes: + setattr(Module_six_moves_urllib_error, attr.name, attr) +del attr + +Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes + +_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), + "moves.urllib_error", "moves.urllib.error") + + +class Module_six_moves_urllib_request(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_request""" + + +_urllib_request_moved_attributes = [ + MovedAttribute("urlopen", "urllib2", "urllib.request"), + MovedAttribute("install_opener", "urllib2", "urllib.request"), + MovedAttribute("build_opener", "urllib2", "urllib.request"), + MovedAttribute("pathname2url", "urllib", "urllib.request"), + MovedAttribute("url2pathname", "urllib", "urllib.request"), + MovedAttribute("getproxies", "urllib", "urllib.request"), + MovedAttribute("Request", "urllib2", "urllib.request"), + MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), + MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), + MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), + MovedAttribute("BaseHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), + MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), + MovedAttribute("FileHandler", "urllib2", "urllib.request"), + MovedAttribute("FTPHandler", "urllib2", "urllib.request"), + MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), + MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), + MovedAttribute("urlretrieve", "urllib", "urllib.request"), + MovedAttribute("urlcleanup", "urllib", "urllib.request"), + MovedAttribute("URLopener", "urllib", "urllib.request"), + MovedAttribute("FancyURLopener", "urllib", "urllib.request"), + MovedAttribute("proxy_bypass", "urllib", "urllib.request"), +] +for attr in _urllib_request_moved_attributes: + setattr(Module_six_moves_urllib_request, attr.name, attr) +del attr + +Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes + +_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), + "moves.urllib_request", "moves.urllib.request") + + +class Module_six_moves_urllib_response(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_response""" + + +_urllib_response_moved_attributes = [ + MovedAttribute("addbase", "urllib", "urllib.response"), + MovedAttribute("addclosehook", "urllib", "urllib.response"), + MovedAttribute("addinfo", "urllib", "urllib.response"), + MovedAttribute("addinfourl", "urllib", "urllib.response"), +] +for attr in _urllib_response_moved_attributes: + setattr(Module_six_moves_urllib_response, attr.name, attr) +del attr + +Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes + +_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), + "moves.urllib_response", "moves.urllib.response") + + +class Module_six_moves_urllib_robotparser(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_robotparser""" + + +_urllib_robotparser_moved_attributes = [ + MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), +] +for attr in _urllib_robotparser_moved_attributes: + setattr(Module_six_moves_urllib_robotparser, attr.name, attr) +del attr + +Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes + +_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), + "moves.urllib_robotparser", "moves.urllib.robotparser") + + +class Module_six_moves_urllib(types.ModuleType): + + """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" + __path__ = [] # mark as package + parse = _importer._get_module("moves.urllib_parse") + error = _importer._get_module("moves.urllib_error") + request = _importer._get_module("moves.urllib_request") + response = _importer._get_module("moves.urllib_response") + robotparser = _importer._get_module("moves.urllib_robotparser") + + def __dir__(self): + return ['parse', 'error', 'request', 'response', 'robotparser'] + +_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), + "moves.urllib") + + +def add_move(move): + """Add an item to six.moves.""" + setattr(_MovedItems, move.name, move) + + +def remove_move(name): + """Remove item from six.moves.""" + try: + delattr(_MovedItems, name) + except AttributeError: + try: + del moves.__dict__[name] + except KeyError: + raise AttributeError("no such move, %r" % (name,)) + + +if PY3: + _meth_func = "__func__" + _meth_self = "__self__" + + _func_closure = "__closure__" + _func_code = "__code__" + _func_defaults = "__defaults__" + _func_globals = "__globals__" +else: + _meth_func = "im_func" + _meth_self = "im_self" + + _func_closure = "func_closure" + _func_code = "func_code" + _func_defaults = "func_defaults" + _func_globals = "func_globals" + + +try: + advance_iterator = next +except NameError: + def advance_iterator(it): + return it.next() +next = advance_iterator + + +try: + callable = callable +except NameError: + def callable(obj): + return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) + + +if PY3: + def get_unbound_function(unbound): + return unbound + + create_bound_method = types.MethodType + + def create_unbound_method(func, cls): + return func + + Iterator = object +else: + def get_unbound_function(unbound): + return unbound.im_func + + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + + def create_unbound_method(func, cls): + return types.MethodType(func, None, cls) + + class Iterator(object): + + def next(self): + return type(self).__next__(self) + + callable = callable +_add_doc(get_unbound_function, + """Get the function out of a possibly unbound function""") + + +get_method_function = operator.attrgetter(_meth_func) +get_method_self = operator.attrgetter(_meth_self) +get_function_closure = operator.attrgetter(_func_closure) +get_function_code = operator.attrgetter(_func_code) +get_function_defaults = operator.attrgetter(_func_defaults) +get_function_globals = operator.attrgetter(_func_globals) + + +if PY3: + def iterkeys(d, **kw): + return iter(d.keys(**kw)) + + def itervalues(d, **kw): + return iter(d.values(**kw)) + + def iteritems(d, **kw): + return iter(d.items(**kw)) + + def iterlists(d, **kw): + return iter(d.lists(**kw)) + + viewkeys = operator.methodcaller("keys") + + viewvalues = operator.methodcaller("values") + + viewitems = operator.methodcaller("items") +else: + def iterkeys(d, **kw): + return d.iterkeys(**kw) + + def itervalues(d, **kw): + return d.itervalues(**kw) + + def iteritems(d, **kw): + return d.iteritems(**kw) + + def iterlists(d, **kw): + return d.iterlists(**kw) + + viewkeys = operator.methodcaller("viewkeys") + + viewvalues = operator.methodcaller("viewvalues") + + viewitems = operator.methodcaller("viewitems") + +_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") +_add_doc(itervalues, "Return an iterator over the values of a dictionary.") +_add_doc(iteritems, + "Return an iterator over the (key, value) pairs of a dictionary.") +_add_doc(iterlists, + "Return an iterator over the (key, [values]) pairs of a dictionary.") + + +if PY3: + def b(s): + return s.encode("latin-1") + + def u(s): + return s + unichr = chr + import struct + int2byte = struct.Struct(">B").pack + del struct + byte2int = operator.itemgetter(0) + indexbytes = operator.getitem + iterbytes = iter + import io + StringIO = io.StringIO + BytesIO = io.BytesIO + _assertCountEqual = "assertCountEqual" + if sys.version_info[1] <= 1: + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" + else: + _assertRaisesRegex = "assertRaisesRegex" + _assertRegex = "assertRegex" +else: + def b(s): + return s + # Workaround for standalone backslash + + def u(s): + return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") + unichr = unichr + int2byte = chr + + def byte2int(bs): + return ord(bs[0]) + + def indexbytes(buf, i): + return ord(buf[i]) + iterbytes = functools.partial(itertools.imap, ord) + import StringIO + StringIO = BytesIO = StringIO.StringIO + _assertCountEqual = "assertItemsEqual" + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" +_add_doc(b, """Byte literal""") +_add_doc(u, """Text literal""") + + +def assertCountEqual(self, *args, **kwargs): + return getattr(self, _assertCountEqual)(*args, **kwargs) + + +def assertRaisesRegex(self, *args, **kwargs): + return getattr(self, _assertRaisesRegex)(*args, **kwargs) + + +def assertRegex(self, *args, **kwargs): + return getattr(self, _assertRegex)(*args, **kwargs) + + +if PY3: + exec_ = getattr(moves.builtins, "exec") + + def reraise(tp, value, tb=None): + if value is None: + value = tp() + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + +else: + def exec_(_code_, _globs_=None, _locs_=None): + """Execute code in a namespace.""" + if _globs_ is None: + frame = sys._getframe(1) + _globs_ = frame.f_globals + if _locs_ is None: + _locs_ = frame.f_locals + del frame + elif _locs_ is None: + _locs_ = _globs_ + exec("""exec _code_ in _globs_, _locs_""") + + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb +""") + + +if sys.version_info[:2] == (3, 2): + exec_("""def raise_from(value, from_value): + if from_value is None: + raise value + raise value from from_value +""") +elif sys.version_info[:2] > (3, 2): + exec_("""def raise_from(value, from_value): + raise value from from_value +""") +else: + def raise_from(value, from_value): + raise value + + +print_ = getattr(moves.builtins, "print", None) +if print_ is None: + def print_(*args, **kwargs): + """The new-style print function for Python 2.4 and 2.5.""" + fp = kwargs.pop("file", sys.stdout) + if fp is None: + return + + def write(data): + if not isinstance(data, basestring): + data = str(data) + # If the file has an encoding, encode unicode with it. + if (isinstance(fp, file) and + isinstance(data, unicode) and + fp.encoding is not None): + errors = getattr(fp, "errors", None) + if errors is None: + errors = "strict" + data = data.encode(fp.encoding, errors) + fp.write(data) + want_unicode = False + sep = kwargs.pop("sep", None) + if sep is not None: + if isinstance(sep, unicode): + want_unicode = True + elif not isinstance(sep, str): + raise TypeError("sep must be None or a string") + end = kwargs.pop("end", None) + if end is not None: + if isinstance(end, unicode): + want_unicode = True + elif not isinstance(end, str): + raise TypeError("end must be None or a string") + if kwargs: + raise TypeError("invalid keyword arguments to print()") + if not want_unicode: + for arg in args: + if isinstance(arg, unicode): + want_unicode = True + break + if want_unicode: + newline = unicode("\n") + space = unicode(" ") + else: + newline = "\n" + space = " " + if sep is None: + sep = space + if end is None: + end = newline + for i, arg in enumerate(args): + if i: + write(sep) + write(arg) + write(end) +if sys.version_info[:2] < (3, 3): + _print = print_ + + def print_(*args, **kwargs): + fp = kwargs.get("file", sys.stdout) + flush = kwargs.pop("flush", False) + _print(*args, **kwargs) + if flush and fp is not None: + fp.flush() + +_add_doc(reraise, """Reraise an exception.""") + +if sys.version_info[0:2] < (3, 4): + def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, + updated=functools.WRAPPER_UPDATES): + def wrapper(f): + f = functools.wraps(wrapped, assigned, updated)(f) + f.__wrapped__ = wrapped + return f + return wrapper +else: + wraps = functools.wraps + + +def with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) + + +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper + + +def python_2_unicode_compatible(klass): + """ + A decorator that defines __unicode__ and __str__ methods under Python 2. + Under Python 3 it does nothing. + + To support Python 2 and 3 with a single code base, define a __str__ method + returning text and apply this decorator to the class. + """ + if PY2: + if '__str__' not in klass.__dict__: + raise ValueError("@python_2_unicode_compatible cannot be applied " + "to %s because it doesn't define __str__()." % + klass.__name__) + klass.__unicode__ = klass.__str__ + klass.__str__ = lambda self: self.__unicode__().encode('utf-8') + return klass + + +# Complete the moves implementation. +# This code is at the end of this module to speed up module loading. +# Turn this module into a package. +__path__ = [] # required for PEP 302 and PEP 451 +__package__ = __name__ # see PEP 366 @ReservedAssignment +if globals().get("__spec__") is not None: + __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable +# Remove other six meta path importers, since they cause problems. This can +# happen if six is removed from sys.modules and then reloaded. (Setuptools does +# this for some reason.) +if sys.meta_path: + for i, importer in enumerate(sys.meta_path): + # Here's some real nastiness: Another "instance" of the six module might + # be floating around. Therefore, we can't use isinstance() to check for + # the six meta path importer, since the other six instance will have + # inserted an importer with different class. + if (type(importer).__name__ == "_SixMetaPathImporter" and + importer.name == __name__): + del sys.meta_path[i] + break + del i, importer +# Finally, add the importer to the meta path import hook. +sys.meta_path.append(_importer) diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt new file mode 100644 index 0000000000..b6e34eb294 --- /dev/null +++ b/setuptools/_vendor/vendored.txt @@ -0,0 +1 @@ +six==1.10.0 diff --git a/setuptools/bootstrap.py b/setuptools/bootstrap.py deleted file mode 100644 index 0cd95778ef..0000000000 --- a/setuptools/bootstrap.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -When setuptools is installed in a clean environment, it doesn't have its -dependencies, so it can't run to install its dependencies. This module -checks those dependencies and if one or more are missing, it uses vendored -versions. -""" - -import os -import sys -import glob - -def ensure_deps(): - """ - Detect if dependencies are installed and if not, use vendored versions. - """ - try: - __import__('six') - except ImportError: - use_vendor_deps() - -def use_vendor_deps(): - """ - Use vendored versions - """ - here = os.path.dirname(__file__) - eggs = glob.glob(here + '/_vendor/*.egg') - sys.path.extend(eggs) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 73f8e3f14b..7816481988 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -11,7 +11,12 @@ import marshal import textwrap -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index ef9ac22d21..c401c8d4c5 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,7 +5,12 @@ import glob import io -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6aab38c8de..51c38ddfa3 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,8 +40,14 @@ import shlex import io -import six -from six.moves import configparser +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import configparser +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import configparser from setuptools import Command from setuptools.sandbox import run_setup diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 19849e66a5..5b996a11be 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -14,7 +14,12 @@ import warnings import time -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from setuptools import Command from setuptools.command.sdist import sdist diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 09eac496a4..1ee1c538e8 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -3,7 +3,12 @@ from distutils.errors import DistutilsOptionError import os -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from setuptools import Command diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 3b9f7dd5eb..59990cd69a 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,7 +5,12 @@ import sys import io -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from setuptools.utils import cs_path_exists diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index f78e0cd50a..1441e51224 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,7 +4,12 @@ import distutils import os -from six.moves import configparser +try: + from setuptools._vendor.six.moves import configparser +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import configparser from setuptools import Command diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 5f2e229956..32ff7f157c 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -2,7 +2,12 @@ from unittest import TestLoader import sys -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 43b5d76ab8..60e9fb7efc 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,8 +16,14 @@ import sys import shutil -from six.moves import http_client, urllib -import six +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import http_client, urllib +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import http_client, urllib from pkg_resources import iter_entry_points diff --git a/setuptools/depends.py b/setuptools/depends.py index 43617e6d95..e633c05b76 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -4,7 +4,12 @@ from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' diff --git a/setuptools/dist.py b/setuptools/dist.py index 7335c9670e..11b42d19c3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -13,7 +13,12 @@ from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six from setuptools.depends import Require from setuptools import windows_support diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 657b467f3a..08c368909a 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -14,8 +14,14 @@ except ImportError: from urllib2 import splituser -import six -from six.moves import urllib, http_client, configparser +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import urllib, http_client, configparser +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import urllib, http_client, configparser from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 43b84791fd..47d7f40c80 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,8 +8,14 @@ import contextlib import pickle -import six -from six.moves import builtins +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import builtins +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import builtins import pkg_resources diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 8fd7836bf2..327c2fcb17 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,7 +3,12 @@ import atexit import re -from six.moves import urllib, http_client +try: + from setuptools._vendor.six.moves import urllib, http_client +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import urllib, http_client import pkg_resources from pkg_resources import ResolutionError, ExtractionError diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index b2c6894f0c..0a625993e6 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -8,7 +8,12 @@ from distutils.core import Extension from distutils.version import LooseVersion -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six import pytest import setuptools.dist diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index d9dcad84c5..3a0ce6b56d 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -5,7 +5,12 @@ import contextlib import site -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six @contextlib.contextmanager diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 1fee0563a8..ef5c8f62df 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -4,7 +4,13 @@ import time import threading -from six.moves import BaseHTTPServer, SimpleHTTPServer +try: + from setuptools._vendor.six.moves import BaseHTTPServer, SimpleHTTPServer +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import BaseHTTPServer, SimpleHTTPServer + class IndexServer(BaseHTTPServer.HTTPServer): """Basic single-threaded http server simulating a package index diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index f8a68378eb..ccfb2ea76b 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -3,7 +3,6 @@ import os import re -import six import pytest from setuptools.dist import Distribution diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 236b3aa605..71aaed6a78 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -5,7 +5,12 @@ import sys import io -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six import pytest diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 30220b7f23..de34ca2733 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,8 +16,15 @@ import distutils.errors import io -import six -from six.moves import urllib +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import urllib +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import urllib + import pytest try: from unittest import mock diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 11a6ff5a5f..1c57402008 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -7,7 +7,13 @@ import os import sys -from six.moves import urllib +try: + from setuptools._vendor.six.moves import urllib +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + from six.moves import urllib + import pytest diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index dca4c2aaf8..649e8a4ef1 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -4,8 +4,14 @@ import os import distutils.errors -import six -from six.moves import urllib, http_client +try: + from setuptools._vendor import six + from setuptools._vendor.six.moves import urllib, http_client +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + from six.moves import urllib, http_client from .textwrap import DALS import pkg_resources diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index c173d713a8..ea176733dc 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,13 @@ import contextlib import io -import six +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six + import pytest import pkg_resources diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 6587dc40dd..4155a5b137 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -6,7 +6,6 @@ import site from distutils.errors import DistutilsError -import six import pytest from setuptools.command.test import test diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index f028589efb..1fdb0a9136 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,7 +1,13 @@ import unicodedata import sys -import six + +try: + from setuptools._vendor import six +except ImportError: + # fallback to naturally-installed version; allows system packagers to + # omit vendored packages. + import six # HFS Plus uses decomposed UTF-8 def decompose(path): From e0e02ba96d8ee3b7be76adeec1ec9b9c3c004516 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Thu, 31 Dec 2015 13:36:36 -0500 Subject: [PATCH 5422/8469] Adds the regression test for distribute issue 323 that I attached to #207. This is to ensure that any fix to #207 does not introduce another regression. --- setuptools/tests/contexts.py | 13 ++ setuptools/tests/test_easy_install.py | 189 ++++++++++++++++++++++---- 2 files changed, 173 insertions(+), 29 deletions(-) diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 8c9a2d3ead..ae28c7c36e 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -6,6 +6,7 @@ import site from setuptools.extern import six +import pkg_resources @contextlib.contextmanager @@ -77,6 +78,18 @@ def save_user_site_setting(): site.ENABLE_USER_SITE = saved +@contextlib.contextmanager +def save_pkg_resources_state(): + pr_state = pkg_resources.__getstate__() + # also save sys.path + sys_path = sys.path[:] + try: + yield pr_state, sys_path + finally: + sys.path[:] = sys_path + pkg_resources.__setstate__(pr_state) + + @contextlib.contextmanager def suppress_exceptions(*excs): try: diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 94e317b362..4f9e52d144 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -18,6 +18,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib +import time import pytest try: @@ -310,32 +311,32 @@ def create_sdist(): """ with contexts.tempdir() as dir: dist_path = os.path.join(dir, 'setuptools-test-fetcher-1.0.tar.gz') - script = DALS(""" - import setuptools - setuptools.setup( - name="setuptools-test-fetcher", - version="1.0", - setup_requires = ['does-not-exist'], - ) - """) - make_trivial_sdist(dist_path, script) + make_sdist(dist_path, [ + ('setup.py', DALS(""" + import setuptools + setuptools.setup( + name="setuptools-test-fetcher", + version="1.0", + setup_requires = ['does-not-exist'], + ) + """))]) yield dist_path def test_setup_requires_overrides_version_conflict(self): """ - Regression test for issue #323. + Regression test for distribution issue 323: + https://bitbucket.org/tarek/distribute/issues/323 Ensures that a distribution's setup_requires requirements can still be installed and used locally even if a conflicting version of that requirement is already on the path. """ - pr_state = pkg_resources.__getstate__() fake_dist = PRDistribution('does-not-matter', project_name='foobar', version='0.0') working_set.add(fake_dist) - try: + with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: test_pkg = create_setup_requires_package(temp_dir) test_setup_py = os.path.join(test_pkg, 'setup.py') @@ -347,19 +348,154 @@ def test_setup_requires_overrides_version_conflict(self): lines = stdout.readlines() assert len(lines) > 0 assert lines[-1].strip(), 'test_pkg' - finally: - pkg_resources.__setstate__(pr_state) + def test_setup_requires_override_nspkg(self): + """ + Like ``test_setup_requires_overrides_version_conflict`` but where the + ``setup_requires`` package is part of a namespace package that has + *already* been imported. + """ + + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + foobar_1_archive = os.path.join(temp_dir, 'foo.bar-0.1.tar.gz') + make_nspkg_sdist(foobar_1_archive, 'foo.bar', '0.1') + # Now actually go ahead an extract to the temp dir and add the + # extracted path to sys.path so foo.bar v0.1 is importable + foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1') + os.mkdir(foobar_1_dir) + with tarfile.open(foobar_1_archive) as tf: + tf.extractall(foobar_1_dir) + sys.path.insert(1, foobar_1_dir) + + dist = PRDistribution(foobar_1_dir, project_name='foo.bar', + version='0.1') + working_set.add(dist) + + template = DALS("""\ + import foo # Even with foo imported first the + # setup_requires package should override + import setuptools + setuptools.setup(**%r) + + if not (hasattr(foo, '__path__') and + len(foo.__path__) == 2): + print('FAIL') + + if 'foo.bar-0.2' not in foo.__path__[0]: + print('FAIL') + """) + + test_pkg = create_setup_requires_package( + temp_dir, 'foo.bar', '0.2', make_nspkg_sdist, template) + + test_setup_py = os.path.join(test_pkg, 'setup.py') -def create_setup_requires_package(path): + with contexts.quiet() as (stdout, stderr): + try: + # Don't even need to install the package, just + # running the setup.py at all is sufficient + run_setup(test_setup_py, ['--name']) + except VersionConflict: + self.fail('Installing setup.py requirements ' + 'caused a VersionConflict') + + assert 'FAIL' not in stdout.getvalue() + lines = stdout.readlines() + assert len(lines) > 0 + assert lines[-1].strip() == 'test_pkg' + + +def make_trivial_sdist(dist_path, distname, version): + """ + Create a simple sdist tarball at dist_path, containing just a simple + setup.py. + """ + + make_sdist(dist_path, [ + ('setup.py', + DALS("""\ + import setuptools + setuptools.setup( + name=%r, + version=%r + ) + """ % (distname, version)))]) + + +def make_nspkg_sdist(dist_path, distname, version): + """ + Make an sdist tarball with distname and version which also contains one + package with the same name as distname. The top-level package is + designated a namespace package). + """ + + parts = distname.split('.') + nspackage = parts[0] + + packages = ['.'.join(parts[:idx]) for idx in range(1, len(parts) + 1)] + + setup_py = DALS("""\ + import setuptools + setuptools.setup( + name=%r, + version=%r, + packages=%r, + namespace_packages=[%r] + ) + """ % (distname, version, packages, nspackage)) + + init = "__import__('pkg_resources').declare_namespace(__name__)" + + files = [('setup.py', setup_py), + (os.path.join(nspackage, '__init__.py'), init)] + for package in packages[1:]: + filename = os.path.join(*(package.split('.') + ['__init__.py'])) + files.append((filename, '')) + + make_sdist(dist_path, files) + + +def make_sdist(dist_path, files): + """ + Create a simple sdist tarball at dist_path, containing the files + listed in ``files`` as ``(filename, content)`` tuples. + """ + + dist = tarfile.open(dist_path, 'w:gz') + + try: + # Python 3 (StringIO gets converted to io module) + MemFile = BytesIO + except AttributeError: + MemFile = StringIO + + try: + for filename, content in files: + file_bytes = MemFile(content.encode('utf-8')) + file_info = tarfile.TarInfo(name=filename) + file_info.size = len(file_bytes.getvalue()) + file_info.mtime = int(time.time()) + dist.addfile(file_info, fileobj=file_bytes) + finally: + dist.close() + + +def create_setup_requires_package(path, distname='foobar', version='0.1', + make_package=make_trivial_sdist, + setup_py_template=None): """Creates a source tree under path for a trivial test package that has a single requirement in setup_requires--a tarball for that requirement is also created and added to the dependency_links argument. + + ``distname`` and ``version`` refer to the name/version of the package that + the test package requires via ``setup_requires``. The name of the test + package itself is just 'test_pkg'. """ test_setup_attrs = { 'name': 'test_pkg', 'version': '0.0', - 'setup_requires': ['foobar==0.1'], + 'setup_requires': ['%s==%s' % (distname, version)], 'dependency_links': [os.path.abspath(path)] } @@ -367,22 +503,17 @@ def create_setup_requires_package(path): test_setup_py = os.path.join(test_pkg, 'setup.py') os.mkdir(test_pkg) - with open(test_setup_py, 'w') as f: - f.write(DALS(""" + if setup_py_template is None: + setup_py_template = DALS("""\ import setuptools setuptools.setup(**%r) - """ % test_setup_attrs)) + """) - foobar_path = os.path.join(path, 'foobar-0.1.tar.gz') - make_trivial_sdist( - foobar_path, - DALS(""" - import setuptools - setuptools.setup( - name='foobar', - version='0.1' - ) - """)) + with open(test_setup_py, 'w') as f: + f.write(setup_py_template % test_setup_attrs) + + foobar_path = os.path.join(path, '%s-%s.tar.gz' % (distname, version)) + make_package(foobar_path, distname, version) return test_pkg From d3de33538948081d9ef39168fde870c977e30115 Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Thu, 31 Dec 2015 14:17:41 -0500 Subject: [PATCH 5423/8469] Fixes the original root cause of #231, and re-enables the test when the tempdir is a symlink (this does not explicitly test that /tmp itself is a symlink, but the effect is the same--only one of the path levels needs to be a symlink to reproduce this isssue) --- pkg_resources/__init__.py | 9 +++++++-- pkg_resources/tests/test_resources.py | 26 ++++++++++++++++++++------ 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7becc9515a..7d2fa7e9b2 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2182,9 +2182,14 @@ def _handle_ns(packageName, path_item): path = module.__path__ path.append(subpath) loader.load_module(packageName) + + # Ensure that all paths on __path__ have been run through + # normalize_path + normalized_paths = set(_normalize_cached(p) for p in module.__path__) for path_item in path: - if path_item not in module.__path__: - module.__path__.append(path_item) + normalized = _normalize_cached(path_item) + if normalized not in normalized_paths: + module.__path__.append(normalized) return subpath def declare_namespace(packageName): diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 4241765ade..ba12d85766 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -610,18 +610,32 @@ class TestNamespaces: def setup_method(self, method): self._ns_pkgs = pkg_resources._namespace_packages.copy() - self._tmpdir = tempfile.mkdtemp(prefix="tests-setuptools-") + + # Further, test case where the temp dir is a symlink, where applicable + # See #231 + if hasattr(os, 'symlink'): + real_tmpdir = tempfile.mkdtemp(prefix="real-tests-setuptools-") + tmpdir_base, tmpdir_name = os.path.split(real_tmpdir) + tmpdir = os.path.join(tmpdir_base, tmpdir_name[5:]) + os.symlink(real_tmpdir, tmpdir) + self._real_tmpdir = real_tmpdir + self._tmpdir = tmpdir + else: + tmpdir = tempfile.mkdtemp(prefix="tests-setuptools-") + self._real_tmpdir = self._tmpdir = tmpdir + os.makedirs(os.path.join(self._tmpdir, "site-pkgs")) self._prev_sys_path = sys.path[:] sys.path.append(os.path.join(self._tmpdir, "site-pkgs")) def teardown_method(self, method): - shutil.rmtree(self._tmpdir) + shutil.rmtree(self._real_tmpdir) + if os.path.islink(self._tmpdir): + os.unlink(self._tmpdir) + pkg_resources._namespace_packages = self._ns_pkgs.copy() sys.path = self._prev_sys_path[:] - @pytest.mark.skipif(os.path.islink(tempfile.gettempdir()), - reason="Test fails when /tmp is a symlink. See #231") def test_two_levels_deep(self): """ Test nested namespace packages @@ -653,7 +667,7 @@ def test_two_levels_deep(self): assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"] # check the __path__ attribute contains both paths expected = [ - os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"), - os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2"), + os.path.join(self._real_tmpdir, "site-pkgs", "pkg1", "pkg2"), + os.path.join(self._real_tmpdir, "site-pkgs2", "pkg1", "pkg2"), ] assert pkg1.pkg2.__path__ == expected From 952c1bafda1929c74c737646aa025e6ffad6632e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 16:30:47 -0500 Subject: [PATCH 5424/8469] Modeling after Astropy's technique for bundling libraries, the imports are now much cleaner. Thanks @embray. Ref #229. --HG-- branch : feature/issue-229 --- pytest.ini | 2 +- setuptools/__init__.py | 7 +--- setuptools/command/bdist_egg.py | 7 +--- setuptools/command/develop.py | 7 +--- setuptools/command/easy_install.py | 10 ++---- setuptools/command/egg_info.py | 7 +--- setuptools/command/rotate.py | 7 +--- setuptools/command/sdist.py | 7 +--- setuptools/command/setopt.py | 7 +--- setuptools/command/test.py | 7 +--- setuptools/command/upload_docs.py | 10 ++---- setuptools/depends.py | 7 +--- setuptools/dist.py | 7 +--- setuptools/extern/__init__.py | 0 setuptools/extern/six.py | 46 +++++++++++++++++++++++++++ setuptools/package_index.py | 10 ++---- setuptools/sandbox.py | 10 ++---- setuptools/ssl_support.py | 7 +--- setuptools/tests/__init__.py | 7 +--- setuptools/tests/contexts.py | 7 +--- setuptools/tests/server.py | 7 +--- setuptools/tests/test_develop.py | 7 +--- setuptools/tests/test_easy_install.py | 10 ++---- setuptools/tests/test_integration.py | 9 +----- setuptools/tests/test_packageindex.py | 10 ++---- setuptools/tests/test_sdist.py | 7 +--- setuptools/unicode_utils.py | 8 +---- 27 files changed, 77 insertions(+), 160 deletions(-) create mode 100644 setuptools/extern/__init__.py create mode 100644 setuptools/extern/six.py diff --git a/pytest.ini b/pytest.ini index 351942f439..bfb4e4f8f2 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py -norecursedirs=dist build *.egg +norecursedirs=dist build *.egg setuptools/extern diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 6e1e5aa418..ec0d5dc2a4 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,12 +8,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -try: - from setuptools._vendor.six.moves import filterfalse -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import filterfalse +from setuptools.extern.six.moves import filterfalse import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 7816481988..9cebd7fa02 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -11,12 +11,7 @@ import marshal import textwrap -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index c401c8d4c5..11b5df10a8 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,12 +5,7 @@ import glob import io -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 51c38ddfa3..a11618d1a0 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,14 +40,8 @@ import shlex import io -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import configparser -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import configparser +from setuptools.extern import six +from setuptools.extern.six.moves import configparser from setuptools import Command from setuptools.sandbox import run_setup diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5b996a11be..cf46d24a85 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -14,12 +14,7 @@ import warnings import time -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from setuptools import Command from setuptools.command.sdist import sdist diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 1ee1c538e8..804f962a7b 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -3,12 +3,7 @@ from distutils.errors import DistutilsOptionError import os -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from setuptools import Command diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 59990cd69a..6640d4e3c9 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,12 +5,7 @@ import sys import io -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from setuptools.utils import cs_path_exists diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 1441e51224..7f332be5a4 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,12 +4,7 @@ import distutils import os -try: - from setuptools._vendor.six.moves import configparser -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import configparser +from setuptools.extern.six.moves import configparser from setuptools import Command diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 32ff7f157c..3a2a9b933c 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -2,12 +2,7 @@ from unittest import TestLoader import sys -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 60e9fb7efc..ca35a3ce1c 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,14 +16,8 @@ import sys import shutil -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import http_client, urllib -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import http_client, urllib +from setuptools.extern import six +from setuptools.extern.six.moves import http_client, urllib from pkg_resources import iter_entry_points diff --git a/setuptools/depends.py b/setuptools/depends.py index e633c05b76..9f7c9a3551 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -4,12 +4,7 @@ from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' diff --git a/setuptools/dist.py b/setuptools/dist.py index 11b42d19c3..7073122560 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -13,12 +13,7 @@ from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six from setuptools.depends import Require from setuptools import windows_support diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/extern/six.py b/setuptools/extern/six.py new file mode 100644 index 0000000000..2685c5e6cd --- /dev/null +++ b/setuptools/extern/six.py @@ -0,0 +1,46 @@ +""" +Handle loading six package from system or from the bundled copy +""" + +import imp + + +_SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] + + +def _find_module(name, path=None): + """ + Alternative to `imp.find_module` that can also search in subpackages. + """ + + parts = name.split('.') + + for part in parts: + if path is not None: + path = [path] + + fh, path, descr = imp.find_module(part, path) + + return fh, path, descr + + +def _import_six(search_path=_SIX_SEARCH_PATH): + for mod_name in search_path: + try: + mod_info = _find_module(mod_name) + except ImportError: + continue + + imp.load_module(__name__, *mod_info) + + break + + else: + raise ImportError( + "The 'six' module of minimum version {0} is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.") + + +_import_six() diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 08c368909a..ea136c097c 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -14,14 +14,8 @@ except ImportError: from urllib2 import splituser -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import urllib, http_client, configparser -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import urllib, http_client, configparser +from setuptools.extern import six +from setuptools.extern.six.moves import urllib, http_client, configparser from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 47d7f40c80..37035f3792 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,14 +8,8 @@ import contextlib import pickle -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import builtins -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import builtins +from setuptools.extern import six +from setuptools.extern.six.moves import builtins import pkg_resources diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 327c2fcb17..7baedd1977 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,12 +3,7 @@ import atexit import re -try: - from setuptools._vendor.six.moves import urllib, http_client -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import urllib, http_client +from setuptools.extern.six.moves import urllib, http_client import pkg_resources from pkg_resources import ResolutionError, ExtractionError diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 0a625993e6..3244735600 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -8,12 +8,7 @@ from distutils.core import Extension from distutils.version import LooseVersion -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six import pytest import setuptools.dist diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 3a0ce6b56d..8c9a2d3ead 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -5,12 +5,7 @@ import contextlib import site -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six @contextlib.contextmanager diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index ef5c8f62df..6a687937bb 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -4,12 +4,7 @@ import time import threading -try: - from setuptools._vendor.six.moves import BaseHTTPServer, SimpleHTTPServer -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import BaseHTTPServer, SimpleHTTPServer +from setuptools.extern.six.moves import BaseHTTPServer, SimpleHTTPServer class IndexServer(BaseHTTPServer.HTTPServer): diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 71aaed6a78..1b84449995 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -5,12 +5,7 @@ import sys import io -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six import pytest diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index de34ca2733..94e317b362 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,14 +16,8 @@ import distutils.errors import io -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import urllib -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import urllib +from setuptools.extern import six +from setuptools.extern.six.moves import urllib import pytest try: diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 1c57402008..04772ba5eb 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -7,14 +7,7 @@ import os import sys -try: - from setuptools._vendor.six.moves import urllib -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - from six.moves import urllib - - +from setuptools.extern.six.moves import urllib import pytest from setuptools.command.easy_install import easy_install diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 649e8a4ef1..6a76b5fcff 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -4,14 +4,8 @@ import os import distutils.errors -try: - from setuptools._vendor import six - from setuptools._vendor.six.moves import urllib, http_client -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six - from six.moves import urllib, http_client +from setuptools.extern import six +from setuptools.extern.six.moves import urllib, http_client from .textwrap import DALS import pkg_resources diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index ea176733dc..753b507df9 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,12 +9,7 @@ import contextlib import io -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six import pytest diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 1fdb0a9136..18903d9ef9 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,13 +1,7 @@ import unicodedata import sys - -try: - from setuptools._vendor import six -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import six +from setuptools.extern import six # HFS Plus uses decomposed UTF-8 def decompose(path): From ddb91c20793d8e5e8a01e0302afeaaba76776741 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 16:38:40 -0500 Subject: [PATCH 5425/8469] Make the technique even more generic --HG-- branch : feature/issue-229 --- setuptools/extern/six.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/extern/six.py b/setuptools/extern/six.py index 2685c5e6cd..6076c208dd 100644 --- a/setuptools/extern/six.py +++ b/setuptools/extern/six.py @@ -1,11 +1,11 @@ """ -Handle loading six package from system or from the bundled copy +Handle loading a package from system or from the bundled copy """ import imp -_SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] +_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): @@ -24,7 +24,7 @@ def _find_module(name, path=None): return fh, path, descr -def _import_six(search_path=_SIX_SEARCH_PATH): +def _import_in_place(search_path=_SEARCH_PATH): for mod_name in search_path: try: mod_info = _find_module(mod_name) @@ -32,15 +32,14 @@ def _import_six(search_path=_SIX_SEARCH_PATH): continue imp.load_module(__name__, *mod_info) - break else: raise ImportError( - "The 'six' module of minimum version {0} is required; " + "The '{name}' package is required; " "normally this is bundled with this package so if you get " "this warning, consult the packager of your " - "distribution.") + "distribution.".format(name=_SEARCH_PATH[-1])) -_import_six() +_import_in_place() From 9b985a9112d9be396adca6a1948076378c70cc34 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Dec 2015 16:47:55 -0500 Subject: [PATCH 5426/8469] Use the same technique in pkg_resources, relying on an 'extern' module to resolve the conditional import. --HG-- branch : feature/issue-229 --- pkg_resources/__init__.py | 13 +++----- pkg_resources/extern/__init__.py | 0 pkg_resources/extern/packaging.py | 45 +++++++++++++++++++++++++++ pkg_resources/tests/test_resources.py | 3 +- pytest.ini | 2 +- setuptools/command/egg_info.py | 2 +- setuptools/dist.py | 3 +- 7 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 pkg_resources/extern/__init__.py create mode 100644 pkg_resources/extern/packaging.py diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b55e4127b4..82382962c6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -87,15 +87,10 @@ except ImportError: pass -try: - import pkg_resources._vendor.packaging.version - import pkg_resources._vendor.packaging.specifiers - packaging = pkg_resources._vendor.packaging -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import packaging.version - import packaging.specifiers + +from pkg_resources.extern import packaging +__import__('pkg_resources.extern.packaging.version') +__import__('pkg_resources.extern.packaging.specifiers') if (3, 0) < sys.version_info < (3, 3): diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg_resources/extern/packaging.py b/pkg_resources/extern/packaging.py new file mode 100644 index 0000000000..47f58eab21 --- /dev/null +++ b/pkg_resources/extern/packaging.py @@ -0,0 +1,45 @@ +""" +Handle loading a package from system or from the bundled copy +""" + +import imp + + +_SEARCH_PATH = ['pkg_resources._vendor.packaging', 'packaging'] + + +def _find_module(name, path=None): + """ + Alternative to `imp.find_module` that can also search in subpackages. + """ + + parts = name.split('.') + + for part in parts: + if path is not None: + path = [path] + + fh, path, descr = imp.find_module(part, path) + + return fh, path, descr + + +def _import_in_place(search_path=_SEARCH_PATH): + for mod_name in search_path: + try: + mod_info = _find_module(mod_name) + except ImportError: + continue + + imp.load_module(__name__, *mod_info) + break + + else: + raise ImportError( + "The '{name}' package is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.".format(name=_SEARCH_PATH[-1])) + + +_import_in_place() diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 9fda892fb6..141d63ad51 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -5,14 +5,13 @@ import string import pytest +from pkg_resources.extern import packaging import pkg_resources from pkg_resources import (parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, WorkingSet) -packaging = pkg_resources.packaging - def safe_repr(obj, short=False): """ copied from Python2.7""" diff --git a/pytest.ini b/pytest.ini index bfb4e4f8f2..ab4a6df381 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py -norecursedirs=dist build *.egg setuptools/extern +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index cf46d24a85..18a3105fc3 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -26,7 +26,7 @@ safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) import setuptools.unicode_utils as unicode_utils -from pkg_resources import packaging +from pkg_resources.extern import packaging try: from setuptools_svn import svn_utils diff --git a/setuptools/dist.py b/setuptools/dist.py index 7073122560..4964a9e8ab 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -14,13 +14,12 @@ DistutilsSetupError) from setuptools.extern import six +from pkg_resources.extern import packaging from setuptools.depends import Require from setuptools import windows_support import pkg_resources -packaging = pkg_resources.packaging - def _get_unpatched(cls): """Protect against re-patching the distutils if reloaded From 9a531b50020849193a55262b3f9cfc375ad3f37c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Jan 2016 21:22:29 -0500 Subject: [PATCH 5427/8469] Move extern.packaging into a package to enable package-relative imports to resolve propertly. Ref #229. --HG-- branch : feature/issue-229 --- pkg_resources/extern/{packaging.py => packaging/__init__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkg_resources/extern/{packaging.py => packaging/__init__.py} (100%) diff --git a/pkg_resources/extern/packaging.py b/pkg_resources/extern/packaging/__init__.py similarity index 100% rename from pkg_resources/extern/packaging.py rename to pkg_resources/extern/packaging/__init__.py From 9d9d74deb049ce7cf367a1baff5c6f13ea3b457e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 14:02:35 -0500 Subject: [PATCH 5428/8469] Create a PEP 302 importer for managing conditional import of vendored packages from the 'extern' namespace. This technique avoids the use of 'imp' and works even when setuptools is installed as a zipped egg. Ref #229. --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 42 ++++++++++++++++++++ pkg_resources/extern/packaging/__init__.py | 45 ---------------------- setuptools/extern/__init__.py | 42 ++++++++++++++++++++ setuptools/extern/six.py | 45 ---------------------- 4 files changed, 84 insertions(+), 90 deletions(-) delete mode 100644 pkg_resources/extern/packaging/__init__.py delete mode 100644 setuptools/extern/six.py diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index e69de29bb2..3b3076c01b 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -0,0 +1,42 @@ +import sys + +_VENDORED_NAMES = 'packaging', +_SEARCH_PATH = 'pkg_resources._vendor.', '' + +class VendorImporter: + """ + A PEP 302 meta path importer for finding optionally-vendored + or otherwise naturally-installed packages from __name__. + """ + def find_module(self, fullname, path=None): + root, base, target = fullname.partition(__name__ + '.') + if root: + return + if not any(map(target.startswith, _VENDORED_NAMES)): + return + return self + + def load_module(self, fullname): + root, base, target = fullname.partition(__name__ + '.') + for prefix in _SEARCH_PATH: + try: + __import__(prefix + target) + mod = sys.modules[prefix + target] + sys.modules[fullname] = mod + return mod + except ImportError: + pass + else: + raise ImportError( + "The '{target}' package is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.".format(**locals()) + ) + + @classmethod + def install(cls): + if not any(isinstance(imp, cls) for imp in sys.meta_path): + sys.meta_path.append(cls()) + +VendorImporter.install() diff --git a/pkg_resources/extern/packaging/__init__.py b/pkg_resources/extern/packaging/__init__.py deleted file mode 100644 index 47f58eab21..0000000000 --- a/pkg_resources/extern/packaging/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -Handle loading a package from system or from the bundled copy -""" - -import imp - - -_SEARCH_PATH = ['pkg_resources._vendor.packaging', 'packaging'] - - -def _find_module(name, path=None): - """ - Alternative to `imp.find_module` that can also search in subpackages. - """ - - parts = name.split('.') - - for part in parts: - if path is not None: - path = [path] - - fh, path, descr = imp.find_module(part, path) - - return fh, path, descr - - -def _import_in_place(search_path=_SEARCH_PATH): - for mod_name in search_path: - try: - mod_info = _find_module(mod_name) - except ImportError: - continue - - imp.load_module(__name__, *mod_info) - break - - else: - raise ImportError( - "The '{name}' package is required; " - "normally this is bundled with this package so if you get " - "this warning, consult the packager of your " - "distribution.".format(name=_SEARCH_PATH[-1])) - - -_import_in_place() diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index e69de29bb2..803d9e9a4a 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -0,0 +1,42 @@ +import sys + +_VENDORED_NAMES = 'six', +_SEARCH_PATH = 'setuptools._vendor.', '' + +class VendorImporter: + """ + A PEP 302 meta path importer for finding optionally-vendored + or otherwise naturally-installed packages from __name__. + """ + def find_module(self, fullname, path=None): + root, base, target = fullname.partition(__name__ + '.') + if root: + return + if not any(map(target.startswith, _VENDORED_NAMES)): + return + return self + + def load_module(self, fullname): + root, base, target = fullname.partition(__name__ + '.') + for prefix in _SEARCH_PATH: + try: + __import__(prefix + target) + mod = sys.modules[prefix + target] + sys.modules[fullname] = mod + return mod + except ImportError: + pass + else: + raise ImportError( + "The '{target}' package is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.".format(**locals()) + ) + + @classmethod + def install(cls): + if not any(isinstance(imp, cls) for imp in sys.meta_path): + sys.meta_path.append(cls()) + +VendorImporter.install() diff --git a/setuptools/extern/six.py b/setuptools/extern/six.py deleted file mode 100644 index 6076c208dd..0000000000 --- a/setuptools/extern/six.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -Handle loading a package from system or from the bundled copy -""" - -import imp - - -_SEARCH_PATH = ['setuptools._vendor.six', 'six'] - - -def _find_module(name, path=None): - """ - Alternative to `imp.find_module` that can also search in subpackages. - """ - - parts = name.split('.') - - for part in parts: - if path is not None: - path = [path] - - fh, path, descr = imp.find_module(part, path) - - return fh, path, descr - - -def _import_in_place(search_path=_SEARCH_PATH): - for mod_name in search_path: - try: - mod_info = _find_module(mod_name) - except ImportError: - continue - - imp.load_module(__name__, *mod_info) - break - - else: - raise ImportError( - "The '{name}' package is required; " - "normally this is bundled with this package so if you get " - "this warning, consult the packager of your " - "distribution.".format(name=_SEARCH_PATH[-1])) - - -_import_in_place() From de5caaee3c9a23600b96f512ed2054b4e27357a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 14:31:19 -0500 Subject: [PATCH 5429/8469] Make VendorImporter more generic --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 33 +++++++++++++++++++------------- setuptools/extern/__init__.py | 33 +++++++++++++++++++------------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 3b3076c01b..17a582ea50 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -1,24 +1,31 @@ import sys -_VENDORED_NAMES = 'packaging', -_SEARCH_PATH = 'pkg_resources._vendor.', '' - class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored - or otherwise naturally-installed packages from __name__. + or otherwise naturally-installed packages from root_name. """ + def __init__(self, root_name, vendored_names=(), vendor_pkg=None): + self.root_name = root_name + self.vendored_names = set(vendored_names) + self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') + + @property + def search_path(self): + yield self.vendor_pkg + '.' + yield '' + def find_module(self, fullname, path=None): - root, base, target = fullname.partition(__name__ + '.') + root, base, target = fullname.partition(self.root_name + '.') if root: return - if not any(map(target.startswith, _VENDORED_NAMES)): + if not any(map(target.startswith, self.vendored_names)): return return self def load_module(self, fullname): - root, base, target = fullname.partition(__name__ + '.') - for prefix in _SEARCH_PATH: + root, base, target = fullname.partition(self.root_name + '.') + for prefix in self.search_path: try: __import__(prefix + target) mod = sys.modules[prefix + target] @@ -34,9 +41,9 @@ def load_module(self, fullname): "distribution.".format(**locals()) ) - @classmethod - def install(cls): - if not any(isinstance(imp, cls) for imp in sys.meta_path): - sys.meta_path.append(cls()) + def install(self): + if self not in sys.meta_path: + sys.meta_path.append(self) -VendorImporter.install() +names = 'packaging', +VendorImporter(__name__, names).install() diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 803d9e9a4a..1329285cf3 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,24 +1,31 @@ import sys -_VENDORED_NAMES = 'six', -_SEARCH_PATH = 'setuptools._vendor.', '' - class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored - or otherwise naturally-installed packages from __name__. + or otherwise naturally-installed packages from root_name. """ + def __init__(self, root_name, vendored_names=(), vendor_pkg=None): + self.root_name = root_name + self.vendored_names = set(vendored_names) + self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') + + @property + def search_path(self): + yield self.vendor_pkg + '.' + yield '' + def find_module(self, fullname, path=None): - root, base, target = fullname.partition(__name__ + '.') + root, base, target = fullname.partition(self.root_name + '.') if root: return - if not any(map(target.startswith, _VENDORED_NAMES)): + if not any(map(target.startswith, self.vendored_names)): return return self def load_module(self, fullname): - root, base, target = fullname.partition(__name__ + '.') - for prefix in _SEARCH_PATH: + root, base, target = fullname.partition(self.root_name + '.') + for prefix in self.search_path: try: __import__(prefix + target) mod = sys.modules[prefix + target] @@ -34,9 +41,9 @@ def load_module(self, fullname): "distribution.".format(**locals()) ) - @classmethod - def install(cls): - if not any(isinstance(imp, cls) for imp in sys.meta_path): - sys.meta_path.append(cls()) + def install(self): + if self not in sys.meta_path: + sys.meta_path.append(self) -VendorImporter.install() +names = 'six', +VendorImporter(__name__, names).install() From a76f5c03136f0c69e8c366bf4069ec8d89d85da7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 15:15:47 -0500 Subject: [PATCH 5430/8469] Pop the module off the stack, preventing the 'Version' class from having a different manifestation in packaging than in pkg_resources. --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 3 +-- setuptools/extern/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 17a582ea50..b7f87ee9ca 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -28,8 +28,7 @@ def load_module(self, fullname): for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[prefix + target] - sys.modules[fullname] = mod + mod = sys.modules[fullname] = sys.modules.pop(prefix + target) return mod except ImportError: pass diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 1329285cf3..e1400238c7 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -28,8 +28,7 @@ def load_module(self, fullname): for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[prefix + target] - sys.modules[fullname] = mod + mod = sys.modules[fullname] = sys.modules.pop(prefix + target) return mod except ImportError: pass From 2dc55bc1a9904ffd44d4cd5a3c83c7a1f12c75ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 15:23:48 -0500 Subject: [PATCH 5431/8469] Combine separate VendorImporters into a single one in pkg_resources.extern --HG-- branch : feature/issue-229 --- pkg_resources/__init__.py | 1 - pkg_resources/extern/__init__.py | 1 + setuptools/extern/__init__.py | 45 +------------------------------- 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 82382962c6..f55c8abe2e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -87,7 +87,6 @@ except ImportError: pass - from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') __import__('pkg_resources.extern.packaging.specifiers') diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index b7f87ee9ca..944967c256 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -1,5 +1,6 @@ import sys + class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index e1400238c7..7a0c578029 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,48 +1,5 @@ -import sys +from pkg_resources.extern import VendorImporter -class VendorImporter: - """ - A PEP 302 meta path importer for finding optionally-vendored - or otherwise naturally-installed packages from root_name. - """ - def __init__(self, root_name, vendored_names=(), vendor_pkg=None): - self.root_name = root_name - self.vendored_names = set(vendored_names) - self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') - - @property - def search_path(self): - yield self.vendor_pkg + '.' - yield '' - - def find_module(self, fullname, path=None): - root, base, target = fullname.partition(self.root_name + '.') - if root: - return - if not any(map(target.startswith, self.vendored_names)): - return - return self - - def load_module(self, fullname): - root, base, target = fullname.partition(self.root_name + '.') - for prefix in self.search_path: - try: - __import__(prefix + target) - mod = sys.modules[fullname] = sys.modules.pop(prefix + target) - return mod - except ImportError: - pass - else: - raise ImportError( - "The '{target}' package is required; " - "normally this is bundled with this package so if you get " - "this warning, consult the packager of your " - "distribution.".format(**locals()) - ) - - def install(self): - if self not in sys.meta_path: - sys.meta_path.append(self) names = 'six', VendorImporter(__name__, names).install() From 6a5145a04f1c7f671620c0146a2ce0241afee60c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 16:14:44 -0500 Subject: [PATCH 5432/8469] Based on experimentation, the canonical module name needs to be in sys.modules on Python prior to 3.3, but must be omitted on Python 3.3 and later. --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 944967c256..9b1599f813 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -29,7 +29,10 @@ def load_module(self, fullname): for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[fullname] = sys.modules.pop(prefix + target) + mod = sys.modules[prefix + target] + sys.modules[fullname] = mod + if sys.version_info > (3, 3): + del sys.modules[prefix + target] return mod except ImportError: pass From b875143b79b2e2ac6d87496d699e82e8123b6e5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 16:20:14 -0500 Subject: [PATCH 5433/8469] Add some docstrings --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 9b1599f813..2d338426d8 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -13,10 +13,17 @@ def __init__(self, root_name, vendored_names=(), vendor_pkg=None): @property def search_path(self): + """ + Search first the vendor package then as a natural package. + """ yield self.vendor_pkg + '.' yield '' def find_module(self, fullname, path=None): + """ + Return self when fullname starts with root_name and the + target module is one vendored through this importer. + """ root, base, target = fullname.partition(self.root_name + '.') if root: return @@ -25,6 +32,9 @@ def find_module(self, fullname, path=None): return self def load_module(self, fullname): + """ + Iterate over the search path to locate and load fullname. + """ root, base, target = fullname.partition(self.root_name + '.') for prefix in self.search_path: try: @@ -45,6 +55,9 @@ def load_module(self, fullname): ) def install(self): + """ + Install this importer into sys.meta_path if not already present. + """ if self not in sys.meta_path: sys.meta_path.append(self) From f81c6c36c062d40834cee8add4947c211e5e152c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jan 2016 16:30:44 -0500 Subject: [PATCH 5434/8469] Extract variable for extant name. Add comment about the hack. --HG-- branch : feature/issue-229 --- pkg_resources/extern/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 2d338426d8..5e81c0bb94 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -38,11 +38,17 @@ def load_module(self, fullname): root, base, target = fullname.partition(self.root_name + '.') for prefix in self.search_path: try: - __import__(prefix + target) - mod = sys.modules[prefix + target] + extant = prefix + target + __import__(extant) + mod = sys.modules[extant] sys.modules[fullname] = mod + # mysterious hack: + # Remove the reference to the extant package/module + # 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): - del sys.modules[prefix + target] + del sys.modules[extant] return mod except ImportError: pass From a2484bd0b21ddd984823067dc2c4fbcdf0bc70e6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jan 2016 20:15:55 -0500 Subject: [PATCH 5435/8469] Move six to pkg_resources for use there. --HG-- branch : feature/issue-229 --- Makefile | 9 +++------ {setuptools => pkg_resources}/_vendor/six.py | 0 pkg_resources/_vendor/vendored.txt | 1 + pkg_resources/extern/__init__.py | 2 +- setuptools/_vendor/__init__.py | 0 setuptools/_vendor/vendored.txt | 1 - setuptools/extern/__init__.py | 2 +- 7 files changed, 6 insertions(+), 9 deletions(-) rename {setuptools => pkg_resources}/_vendor/six.py (100%) delete mode 100644 setuptools/_vendor/__init__.py delete mode 100644 setuptools/_vendor/vendored.txt diff --git a/Makefile b/Makefile index 54dad480fa..353b987e4c 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,7 @@ empty: exit 1 update-vendored: - rm -rf pkg_resources/_vendor/packaging - python3.5 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ + rm -rf pkg_resources/_vendor/packaging* + rm -rf pkg_resources/_vendor/six* + python3 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ rm -rf pkg_resources/_vendor/*.{egg,dist}-info - - rm -rf setuptools/_vendor/six - python3.5 -m pip install -r setuptools/_vendor/vendored.txt -t setuptools/_vendor/ - rm -rf setuptools/_vendor/*.{egg,dist}-info diff --git a/setuptools/_vendor/six.py b/pkg_resources/_vendor/six.py similarity index 100% rename from setuptools/_vendor/six.py rename to pkg_resources/_vendor/six.py diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 4cf7664ec9..eec98267a1 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1 +1,2 @@ packaging==15.3 +six==1.10.0 diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 5e81c0bb94..317f4b8d19 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -67,5 +67,5 @@ def install(self): if self not in sys.meta_path: sys.meta_path.append(self) -names = 'packaging', +names = 'packaging', 'six' VendorImporter(__name__, names).install() diff --git a/setuptools/_vendor/__init__.py b/setuptools/_vendor/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt deleted file mode 100644 index b6e34eb294..0000000000 --- a/setuptools/_vendor/vendored.txt +++ /dev/null @@ -1 +0,0 @@ -six==1.10.0 diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 7a0c578029..6859aa5b5c 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -2,4 +2,4 @@ names = 'six', -VendorImporter(__name__, names).install() +VendorImporter(__name__, names, 'pkg_resources._vendor').install() From b639cf0fa905f6fda3879c991197b759aaa20091 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jan 2016 20:34:46 -0500 Subject: [PATCH 5436/8469] Use six in pkg_resources. --HG-- branch : feature/issue-229 --- pkg_resources/__init__.py | 31 ++++++++------------------- pkg_resources/tests/test_resources.py | 5 ++--- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f55c8abe2e..7becc9515a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -37,7 +37,6 @@ import email.parser import tempfile import textwrap -import itertools from pkgutil import get_importer try: @@ -46,23 +45,8 @@ # Python 3.2 compatibility import imp as _imp -PY3 = sys.version_info > (3,) -PY2 = not PY3 - -if PY3: - from urllib.parse import urlparse, urlunparse - -if PY2: - from urlparse import urlparse, urlunparse - filter = itertools.ifilter - map = itertools.imap - -if PY3: - string_types = str, -else: - string_types = str, eval('unicode') - -iteritems = (lambda i: i.items()) if PY3 else lambda i: i.iteritems() +from pkg_resources.extern import six +from pkg_resources.extern.six.moves import urllib # capture these to bypass sandboxing from os import utime @@ -92,6 +76,9 @@ __import__('pkg_resources.extern.packaging.specifiers') +filter = six.moves.filter +map = six.moves.map + if (3, 0) < sys.version_info < (3, 3): msg = ( "Support for Python 3.0-3.2 has been dropped. Future versions " @@ -549,7 +536,7 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist, string_types): + if isinstance(dist, six.string_types): dist = Requirement.parse(dist) if isinstance(dist, Requirement): dist = get_provider(dist) @@ -2297,7 +2284,7 @@ def _set_parent_ns(packageName): def yield_lines(strs): """Yield non-empty/non-comment lines of a string or sequence""" - if isinstance(strs, string_types): + if isinstance(strs, six.string_types): for s in strs.splitlines(): s = s.strip() # skip blank lines/comments @@ -2464,9 +2451,9 @@ def parse_map(cls, data, dist=None): def _remove_md5_fragment(location): if not location: return '' - parsed = urlparse(location) + parsed = urllib.parse.urlparse(location) if parsed[-1].startswith('md5='): - return urlunparse(parsed[:-1] + ('',)) + return urllib.parse.urlunparse(parsed[:-1] + ('',)) return location diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 141d63ad51..4241765ade 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -244,9 +244,8 @@ def test_resolve_conflicts_with_prior(self): with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo\nBar\n")) - msg = "Baz 1.0 is installed but Baz==2.0 is required by {'Bar'}" - if pkg_resources.PY2: - msg = msg.replace("{'Bar'}", "set(['Bar'])") + msg = "Baz 1.0 is installed but Baz==2.0 is required by " + msg += repr(set(['Bar'])) assert vc.value.report() == msg From d49c41c6ebc16371efabe0b92b417457cf9c47d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jan 2016 21:01:29 -0500 Subject: [PATCH 5437/8469] Added tag 19.3b1 for changeset 66fa131a0d77 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 60ce3f9483..ab249d8fe0 100644 --- a/.hgtags +++ b/.hgtags @@ -233,3 +233,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 834782ce49154e9744e499e00eb392c347f9e034 19.1 0a2a3d89416e1642cf6f41d22dbc07b3d3c15a4d 19.1.1 5d24cf9d1ced76c406ab3c4a94c25d1fe79b94bc 19.2 +66fa131a0d77a1b0e6f89ccb76b254cfb07d3da3 19.3b1 From a1a4a1f1358f73ee58e8f068352903f42f88a27a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jan 2016 16:07:36 -0500 Subject: [PATCH 5438/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 339b137d15..e8106c4065 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -235,6 +235,8 @@ CHANGES parsed requirements. * Pull Request #133: Removed ``setuptools.tests`` from the installed packages. +* Pull Request #129: Address deprecation warning due to usage + of imp module. ---- 15.2 From ebc54982b1085b05054a75dbcdd16008ac20a60e Mon Sep 17 00:00:00 2001 From: Erik Bray Date: Wed, 6 Jan 2016 17:08:56 -0500 Subject: [PATCH 5439/8469] Sort __path__ entries for namespace packages according to their order in sys.path. This ensures that lookups in __path__ will be the same as sys.path resolution. This also adds a replace argument to Distribution.insert_on meant to be used with the replace argumen to WorkingSet.add. This ensures that new sys.path entries added via WorkingSet.add are inserted at the beginning, rather than appended to the end. This is necessary for consistency with the above change, and kind of makes more sense anyways. This means that if a Distribution is added to a WorkingSet, that replaces a different version of that Distribution, the new version of that Distribution will have its location first on sys.path. --- pkg_resources/__init__.py | 28 +++++++++++++--------- pkg_resources/tests/test_resources.py | 34 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7d2fa7e9b2..46db5cc79e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -755,7 +755,7 @@ def add(self, dist, entry=None, insert=True, replace=False): will be called. """ if insert: - dist.insert_on(self.entries, entry) + dist.insert_on(self.entries, entry, replace=replace) if entry is None: entry = dist.location @@ -2183,13 +2183,16 @@ def _handle_ns(packageName, path_item): path.append(subpath) loader.load_module(packageName) - # Ensure that all paths on __path__ have been run through - # normalize_path - normalized_paths = set(_normalize_cached(p) for p in module.__path__) - for path_item in path: - normalized = _normalize_cached(path_item) - if normalized not in normalized_paths: - module.__path__.append(normalized) + # Rebuild mod.__path__ ensuring that all entries are ordered + # corresponding to their sys.path order + sys_path= [(p and _normalize_cached(p) or p) for p in sys.path] + def sort_key(p): + parts = p.split(os.sep) + parts = parts[:-(packageName.count('.') + 1)] + return sys_path.index(_normalize_cached(os.sep.join(parts))) + + path.sort(key=sort_key) + module.__path__[:] = [_normalize_cached(p) for p in path] return subpath def declare_namespace(packageName): @@ -2644,7 +2647,7 @@ def activate(self, path=None): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: path = sys.path - self.insert_on(path) + self.insert_on(path, replace=True) if path is sys.path: fixup_namespace_packages(self.location) for pkg in self._get_metadata('namespace_packages.txt'): @@ -2721,7 +2724,7 @@ def get_entry_info(self, group, name): """Return the EntryPoint object for `group`+`name`, or ``None``""" return self.get_entry_map(group).get(name) - def insert_on(self, path, loc = None): + def insert_on(self, path, loc=None, replace=False): """Insert self.location in path before its nearest parent directory""" loc = loc or self.location @@ -2745,7 +2748,10 @@ def insert_on(self, path, loc = None): else: if path is sys.path: self.check_version_conflict() - path.append(loc) + if replace: + path.insert(0, loc) + else: + path.append(loc) return # p is the spot where we found or inserted loc; now remove duplicates diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index ba12d85766..7176cc7002 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -671,3 +671,37 @@ def test_two_levels_deep(self): os.path.join(self._real_tmpdir, "site-pkgs2", "pkg1", "pkg2"), ] assert pkg1.pkg2.__path__ == expected + + def test_path_order(self): + """ + Test that if multiple versions of the same namespace package subpackage + are on different sys.path entries, that only the one earliest on + sys.path is imported, and that the namespace package's __path__ is in + the correct order. + + Regression test for https://bitbucket.org/pypa/setuptools/issues/207 + """ + + site_pkgs = ["site-pkgs", "site-pkgs2", "site-pkgs3"] + + ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" + vers_str = "__version__ = %r" + + for idx, site in enumerate(site_pkgs): + if idx > 0: + sys.path.append(os.path.join(self._tmpdir, site)) + os.makedirs(os.path.join(self._tmpdir, site, "nspkg", "subpkg")) + with open(os.path.join(self._tmpdir, site, "nspkg", + "__init__.py"), "w") as f: + f.write(ns_str) + + with open(os.path.join(self._tmpdir, site, "nspkg", "subpkg", + "__init__.py"), "w") as f: + f.write(vers_str % (idx + 1)) + + import nspkg.subpkg + import nspkg + assert nspkg.__path__ == [os.path.join(self._real_tmpdir, site, + "nspkg") + for site in site_pkgs] + assert nspkg.subpkg.__version__ == 1 From 3bd5118eaa87b4f6598e0a473fec3623b6579d3b Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 7 Jan 2016 14:04:36 +1100 Subject: [PATCH 5440/8469] Destroy MarkerEvaluation for being pointless, fix two silly mistakes in tests and update packaging changes. --- Makefile | 2 + pkg_resources/__init__.py | 181 ++---------------- pkg_resources/_vendor/packaging/markers.py | 4 +- .../_vendor/packaging/requirements.py | 13 +- pkg_resources/_vendor/packaging/specifiers.py | 6 +- pkg_resources/_vendor/vendored.txt | 1 + pkg_resources/api_tests.txt | 2 +- pkg_resources/tests/test_markers.py | 12 +- 8 files changed, 46 insertions(+), 175 deletions(-) diff --git a/Makefile b/Makefile index c2295cda54..b2ba0be263 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,6 @@ update-vendored: pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ sed -i -e 's/ \(pyparsing\)/ pkg_resources._vendor.\1/' \ pkg_resources/_vendor/packaging/*.py + sed -i -e 's/ \(six\)/ pkg_resources._vendor.\1/' \ + pkg_resources/_vendor/packaging/*.py rm -rf pkg_resources/_vendor/*.{egg,dist}-info diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d81430c7d4..aa221347c5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1407,170 +1407,31 @@ def to_filename(name): return name.replace('-','_') -class MarkerEvaluation(object): - values = { - 'os_name': lambda: os.name, - 'sys_platform': lambda: sys.platform, - 'python_full_version': platform.python_version, - 'python_version': lambda: platform.python_version()[:3], - 'platform_version': platform.version, - 'platform_machine': platform.machine, - 'platform_python_implementation': platform.python_implementation, - 'python_implementation': platform.python_implementation, - } - - @classmethod - def is_invalid_marker(cls, text): - """ - Validate text as a PEP 508 environment marker; return an exception - if invalid or False otherwise. - """ - try: - cls.evaluate_marker(text) - except packaging.markers.InvalidMarker as e: - e.filename = None - e.lineno = None - return e - return False - - @staticmethod - def normalize_exception(exc): - """ - Given a SyntaxError from a marker evaluation, normalize the error - message: - - Remove indications of filename and line number. - - Replace platform-specific error messages with standard error - messages. - """ - subs = { - 'unexpected EOF while parsing': 'invalid syntax', - 'parenthesis is never closed': 'invalid syntax', - } - exc.filename = None - exc.lineno = None - exc.msg = subs.get(exc.msg, exc.msg) - return exc - - @classmethod - def and_test(cls, nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - items = [ - cls.interpret(nodelist[i]) - for i in range(1, len(nodelist), 2) - ] - return functools.reduce(operator.and_, items) - - @classmethod - def test(cls, nodelist): - # MUST NOT short-circuit evaluation, or invalid syntax can be skipped! - items = [ - cls.interpret(nodelist[i]) - for i in range(1, len(nodelist), 2) - ] - return functools.reduce(operator.or_, items) - - @classmethod - def atom(cls, nodelist): - t = nodelist[1][0] - if t == token.LPAR: - if nodelist[2][0] == token.RPAR: - raise SyntaxError("Empty parentheses") - return cls.interpret(nodelist[2]) - msg = "Language feature not supported in environment markers" - raise SyntaxError(msg) - - @classmethod - def comparison(cls, nodelist): - if len(nodelist) > 4: - msg = "Chained comparison not allowed in environment markers" - raise SyntaxError(msg) - comp = nodelist[2][1] - cop = comp[1] - if comp[0] == token.NAME: - if len(nodelist[2]) == 3: - if cop == 'not': - cop = 'not in' - else: - cop = 'is not' - try: - cop = cls.get_op(cop) - except KeyError: - msg = repr(cop) + " operator not allowed in environment markers" - raise SyntaxError(msg) - return cop(cls.evaluate(nodelist[1]), cls.evaluate(nodelist[3])) - - @classmethod - def get_op(cls, op): - ops = { - symbol.test: cls.test, - symbol.and_test: cls.and_test, - symbol.atom: cls.atom, - symbol.comparison: cls.comparison, - 'not in': lambda x, y: x not in y, - 'in': lambda x, y: x in y, - '==': operator.eq, - '!=': operator.ne, - '<': operator.lt, - '>': operator.gt, - '<=': operator.le, - '>=': operator.ge, - } - if hasattr(symbol, 'or_test'): - ops[symbol.or_test] = cls.test - return ops[op] - - @classmethod - def evaluate_marker(cls, text, extra=None): - """ - Evaluate a PEP 508 environment marker on CPython 2.4+. - Return a boolean indicating the marker result in this environment. - Raise InvalidMarker if marker is invalid. - - This implementation uses the 'pyparsing' module. - """ - marker = packaging.markers.Marker(text) - return marker.evaluate() +def invalid_marker(text): + """ + Validate text as a PEP 508 environment marker; return an exception + if invalid or False otherwise. + """ + try: + evaluate_marker(text) + except packaging.markers.InvalidMarker as e: + e.filename = None + e.lineno = None + return e + return False - @classmethod - def interpret(cls, nodelist): - while len(nodelist)==2: nodelist = nodelist[1] - try: - op = cls.get_op(nodelist[0]) - except KeyError: - raise SyntaxError("Comparison or logical expression expected") - return op(nodelist) - @classmethod - def evaluate(cls, nodelist): - while len(nodelist)==2: nodelist = nodelist[1] - kind = nodelist[0] - name = nodelist[1] - if kind==token.NAME: - try: - op = cls.values[name] - except KeyError: - raise SyntaxError("Unknown name %r" % name) - return op() - if kind==token.STRING: - s = nodelist[1] - if not cls._safe_string(s): - raise SyntaxError( - "Only plain strings allowed in environment markers") - return s[1:-1] - msg = "Language feature not supported in environment markers" - raise SyntaxError(msg) +def evaluate_marker(text, extra=None): + """ + Evaluate a PEP 508 environment marker. + Return a boolean indicating the marker result in this environment. + Raise InvalidMarker if marker is invalid. - @staticmethod - def _safe_string(cand): - return ( - cand[:1] in "'\"" and - not cand.startswith('"""') and - not cand.startswith("'''") and - '\\' not in cand - ) + This implementation uses the 'pyparsing' module. + """ + marker = packaging.markers.Marker(text) + return marker.evaluate() -invalid_marker = MarkerEvaluation.is_invalid_marker -evaluate_marker = MarkerEvaluation.evaluate_marker class NullProvider: """Try to implement resources and metadata for arbitrary PEP 302 loaders""" diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index e9c6805ad8..db8f1c25e9 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -55,7 +55,7 @@ class Value(Node): VARIABLE = ( L("implementation_version") | - L("python_implementation") | + L("platform_python_implementation") | L("implementation_name") | L("python_full_version") | L("platform_release") | @@ -209,7 +209,7 @@ def default_environment(): "platform_system": platform.system(), "platform_version": platform.version(), "python_full_version": platform.python_version(), - "python_implementation": platform.python_implementation(), + "platform_python_implementation": platform.python_implementation(), "python_version": platform.python_version()[:3], "sys_platform": sys.platform, } diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index dc3672e7c8..658716c6b6 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -9,7 +9,7 @@ from pkg_resources._vendor.pyparsing import stringStart, stringEnd, originalTextFor, ParseException from pkg_resources._vendor.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine from pkg_resources._vendor.pyparsing import Literal as L # noqa -from six.moves.urllib import parse as urlparse +from pkg_resources._vendor.six.moves.urllib import parse as urlparse from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet @@ -73,6 +73,12 @@ class InvalidRequirement(ValueError): class Requirement(object): + """Parse a requirement. + + Parse a given requirement string into its parts, such as name, specifier, + URL, and extras. Raises InvalidRequirement on a badly-formed requirement + string. + """ # TODO: Can we test whether something is contained within a requirement? # If so how do we do that? Do we need to test against the _name_ of @@ -82,9 +88,10 @@ class Requirement(object): def __init__(self, requirement_string): try: req = REQUIREMENT.parseString(requirement_string) - except ParseException: + except ParseException as e: raise InvalidRequirement( - "Invalid requirement: {0!r}".format(requirement_string)) + "Invalid requirement, parse error at \"{0!r}\"".format( + requirement_string[e.loc:e.loc + 8])) self.name = req.name if req.url: diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index b1fca708e9..cef90084f8 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -225,7 +225,8 @@ class LegacySpecifier(_IndividualSpecifier): """ ) - _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.X | re.I) + _regex = re.compile( + r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "==": "equal", @@ -366,7 +367,8 @@ class Specifier(_IndividualSpecifier): """ ) - _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.X | re.I) + _regex = re.compile( + r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "~=": "compatible", diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 27bbc925eb..fcb72075f3 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,2 +1,3 @@ packaging==15.3 pyparsing==2.0.6 +six==1.10.0 diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 2458c32204..9df56b4b0a 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -382,7 +382,7 @@ Environment Markers >>> print(im("os.open=='y'")) Invalid marker: "os.open=='y'" - >>> em("'linux' in sys_platform") + >>> em("sys_platform=='win32'") == (sys.platform=='win32') True >>> em("python_version >= '2.6'") diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index 2f4b52c5f4..0af3089e78 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -1,12 +1,10 @@ try: - import unittest.mock as mock + import unitest.mock as mock except ImportError: - import mock + import mock from pkg_resources import evaluate_marker - -@mock.patch.dict('pkg_resources.MarkerEvaluation.values', - python_full_version=mock.Mock(return_value='2.7.10')) -def test_ordering(): - assert evaluate_marker("python_full_version > '2.7.3'") is True +@mock.patch('platform.python_version', return_value='2.7.10') +def test_ordering(python_version_mock): + assert evaluate_marker("python_full_version > '2.7.3'") is True From 027ca18211667f9467319d8dc2f0ca1137f86474 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 7 Jan 2016 14:21:49 +1100 Subject: [PATCH 5441/8469] Properly merge from default. --- Makefile | 11 +++++---- pkg_resources/__init__.py | 47 ++++++++++++--------------------------- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index b2ba0be263..7574057c19 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,10 @@ empty: exit 1 update-vendored: - rm -rf pkg_resources/_vendor/packaging - rm -rf pkg_resources/_vendor/pyparsing - pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ - sed -i -e 's/ \(pyparsing\)/ pkg_resources._vendor.\1/' \ - pkg_resources/_vendor/packaging/*.py - sed -i -e 's/ \(six\)/ pkg_resources._vendor.\1/' \ + rm -rf pkg_resources/_vendor/packaging* + rm -rf pkg_resources/_vendor/six* + rm -rf pkg_resources/_vendor/pyparsing* + python3 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ + sed -i -e 's/ \(pyparsing|six\)/ pkg_resources.extern.\1/' \ pkg_resources/_vendor/packaging/*.py rm -rf pkg_resources/_vendor/*.{egg,dist}-info diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index aa221347c5..4e3a25aeb3 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -37,7 +37,6 @@ import email.parser import tempfile import textwrap -import itertools from pkgutil import get_importer try: @@ -46,23 +45,8 @@ # Python 3.2 compatibility import imp as _imp -PY3 = sys.version_info > (3,) -PY2 = not PY3 - -if PY3: - from urllib.parse import urlparse, urlunparse - -if PY2: - from urlparse import urlparse, urlunparse - filter = itertools.ifilter - map = itertools.imap - -if PY3: - string_types = str, -else: - string_types = str, eval('unicode') - -iteritems = (lambda i: i.items()) if PY3 else lambda i: i.iteritems() +from pkg_resources.extern import six +from pkg_resources.extern.six.moves import urllib # capture these to bypass sandboxing from os import utime @@ -87,18 +71,15 @@ except ImportError: pass -try: - import pkg_resources._vendor.packaging.version - import pkg_resources._vendor.packaging.specifiers - import pkg_resources._vendor.packaging.requirements - import pkg_resources._vendor.packaging.markers - packaging = pkg_resources._vendor.packaging -except ImportError: - # fallback to naturally-installed version; allows system packagers to - # omit vendored packages. - import packaging.version - import packaging.specifiers +from pkg_resources.extern import packaging +__import__('pkg_resources.extern.packaging.version') +__import__('pkg_resources.extern.packaging.specifiers') +__import__('pkg_resources._vendor.packaging.requirements') +__import__('pkg_resources._vendor.packaging.markers') + +filter = six.moves.filter +map = six.moves.map if (3, 0) < sys.version_info < (3, 3): msg = ( @@ -557,7 +538,7 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist, string_types): + if isinstance(dist, six.string_types): dist = Requirement.parse(dist) if isinstance(dist, Requirement): dist = get_provider(dist) @@ -2134,7 +2115,7 @@ def _set_parent_ns(packageName): def yield_lines(strs): """Yield non-empty/non-comment lines of a string or sequence""" - if isinstance(strs, string_types): + if isinstance(strs, six.string_types): for s in strs.splitlines(): s = s.strip() # skip blank lines/comments @@ -2289,9 +2270,9 @@ def parse_map(cls, data, dist=None): def _remove_md5_fragment(location): if not location: return '' - parsed = urlparse(location) + parsed = urllib.parse.urlparse(location) if parsed[-1].startswith('md5='): - return urlunparse(parsed[:-1] + ('',)) + return urllib.parse.urlunparse(parsed[:-1] + ('',)) return location From 7e1ca274068f946e5eb9cac457718ff37326d3a6 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 7 Jan 2016 15:04:10 +1100 Subject: [PATCH 5442/8469] Shift packaging to use shiny extern. --- pkg_resources/_vendor/packaging/markers.py | 6 +++--- pkg_resources/_vendor/packaging/requirements.py | 8 ++++---- pkg_resources/extern/__init__.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index db8f1c25e9..d5b6ddbea7 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -8,9 +8,9 @@ import platform import sys -from pkg_resources._vendor.pyparsing import ParseException, ParseResults, stringStart, stringEnd -from pkg_resources._vendor.pyparsing import ZeroOrMore, Group, Forward, QuotedString -from pkg_resources._vendor.pyparsing import Literal as L # noqa +from pkg_resources.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd +from pkg_resources.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString +from pkg_resources.extern.pyparsing import Literal as L # noqa from ._compat import string_types from .specifiers import Specifier, InvalidSpecifier diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 658716c6b6..8a9cd195e2 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -6,10 +6,10 @@ import string import re -from pkg_resources._vendor.pyparsing import stringStart, stringEnd, originalTextFor, ParseException -from pkg_resources._vendor.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine -from pkg_resources._vendor.pyparsing import Literal as L # noqa -from pkg_resources._vendor.six.moves.urllib import parse as urlparse +from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from pkg_resources.extern.pyparsing import Literal as L # noqa +from pkg_resources.extern.six.moves.urllib import parse as urlparse from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 317f4b8d19..6758d36f11 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -67,5 +67,5 @@ def install(self): if self not in sys.meta_path: sys.meta_path.append(self) -names = 'packaging', 'six' +names = 'packaging', 'pyparsing', 'six' VendorImporter(__name__, names).install() From 2b3cf9b12b23ac6beca6808c4c7620aa77f168e3 Mon Sep 17 00:00:00 2001 From: Darjus Loktevic Date: Mon, 11 Jan 2016 23:23:36 +1100 Subject: [PATCH 5443/8469] Remove JythonCommandSpec as it's not required on Jython 2.7 and setuptools no longer supports anything 2.5, but had to test for 'Jython on Windows' in two other places --- setup.py | 3 +- setuptools/command/easy_install.py | 48 +++------------------------ setuptools/tests/test_easy_install.py | 45 ------------------------- 3 files changed, 7 insertions(+), 89 deletions(-) diff --git a/setup.py b/setup.py index dfb578a152..5378e6c5d9 100755 --- a/setup.py +++ b/setup.py @@ -59,7 +59,8 @@ def _gen_console_scripts(): os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0") ) -if sys.platform == 'win32' or force_windows_specific_files: +if (sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt')) \ + or force_windows_specific_files: package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a11618d1a0..fccfade29c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1876,17 +1876,6 @@ def chmod(path, mode): log.debug("chmod failed: %s", e) -def fix_jython_executable(executable, options): - warnings.warn("Use JythonCommandSpec", DeprecationWarning, stacklevel=2) - - if not JythonCommandSpec.relevant(): - return executable - - cmd = CommandSpec.best().from_param(executable) - cmd.install_options(options) - return cmd.as_header().lstrip('#!').rstrip('\n') - - class CommandSpec(list): """ A command spec for a #! header, specified as a list of arguments akin to @@ -1901,7 +1890,7 @@ def best(cls): """ Choose the best CommandSpec class based on environmental conditions. """ - return cls if not JythonCommandSpec.relevant() else JythonCommandSpec + return cls @classmethod def _sys_executable(cls): @@ -1968,36 +1957,6 @@ class WindowsCommandSpec(CommandSpec): split_args = dict(posix=False) -class JythonCommandSpec(CommandSpec): - @classmethod - def relevant(cls): - return ( - sys.platform.startswith('java') - and - __import__('java').lang.System.getProperty('os.name') != 'Linux' - ) - - def as_header(self): - """ - Workaround Jython's sys.executable being a .sh (an invalid - shebang line interpreter) - """ - if not is_sh(self[0]): - return super(JythonCommandSpec, self).as_header() - - if self.options: - # Can't apply the workaround, leave it broken - log.warn( - "WARNING: Unable to adapt shebang line for Jython," - " the following script is NOT executable\n" - " see http://bugs.jython.org/issue1112 for" - " more information.") - return super(JythonCommandSpec, self).as_header() - - items = ['/usr/bin/env'] + self + list(self.options) - return self._render(items) - - class ScriptWriter(object): """ Encapsulates behavior around writing entry point scripts for console and @@ -2074,7 +2033,10 @@ def best(cls): """ Select the best ScriptWriter for this environment. """ - return WindowsScriptWriter.best() if sys.platform == 'win32' else cls + if sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt'): + return WindowsScriptWriter.best() + else: + return cls @classmethod def _get_script_args(cls, type_, name, header, script_text): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 94e317b362..93f94b85c8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -427,51 +427,6 @@ def test_get_script_header(self): expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected - @pytest.mark.xfail( - six.PY3 and is_ascii, - reason="Test fails in this locale on Python 3" - ) - @mock.patch.dict(sys.modules, java=mock.Mock(lang=mock.Mock(System= - mock.Mock(getProperty=mock.Mock(return_value=""))))) - @mock.patch('sys.platform', 'java1.5.0_13') - def test_get_script_header_jython_workaround(self, tmpdir): - # Create a mock sys.executable that uses a shebang line - header = DALS(""" - #!/usr/bin/python - # -*- coding: utf-8 -*- - """) - exe = tmpdir / 'exe.py' - with exe.open('w') as f: - f.write(header) - - exe = ei.nt_quote_arg(os.path.normpath(str(exe))) - - # Make sure Windows paths are quoted properly before they're sent - # through shlex.split by get_script_header - executable = '"%s"' % exe if os.path.splitdrive(exe)[0] else exe - - header = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python', - executable=executable) - assert header == '#!/usr/bin/env %s\n' % exe - - expect_out = 'stdout' if sys.version_info < (2,7) else 'stderr' - - with contexts.quiet() as (stdout, stderr): - # When options are included, generate a broken shebang line - # with a warning emitted - candidate = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x', - executable=executable) - assert candidate == '#!%s -x\n' % exe - output = locals()[expect_out] - assert 'Unable to adapt shebang line' in output.getvalue() - - with contexts.quiet() as (stdout, stderr): - candidate = ei.ScriptWriter.get_script_header('#!/usr/bin/python', - executable=self.non_ascii_exe) - assert candidate == '#!%s -x\n' % self.non_ascii_exe - output = locals()[expect_out] - assert 'Unable to adapt shebang line' in output.getvalue() - class TestCommandSpec: def test_custom_launch_command(self): From d293e9bcca56765b0ec06d6d7f542cc2c71ad001 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Jan 2016 20:06:17 -0500 Subject: [PATCH 5444/8469] Added tag 19.3 for changeset 32bba9bf8cce --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ab249d8fe0..4f89a01a43 100644 --- a/.hgtags +++ b/.hgtags @@ -234,3 +234,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 0a2a3d89416e1642cf6f41d22dbc07b3d3c15a4d 19.1.1 5d24cf9d1ced76c406ab3c4a94c25d1fe79b94bc 19.2 66fa131a0d77a1b0e6f89ccb76b254cfb07d3da3 19.3b1 +32bba9bf8cce8350b560a7591c9ef5884a194211 19.3 From ecc8c659b45cec0b69335a74445de2be500c382a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Jan 2016 20:08:11 -0500 Subject: [PATCH 5445/8469] Bumped to 19.4 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 09bbb730c0..7ff48baa70 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.3' +__version__ = '19.4' From 434aef220e6ec7cfc609bce631ef8528c930c20c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:11:13 -0500 Subject: [PATCH 5446/8469] Move trailing comment to docstring --- setuptools/command/build_py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 8a50f03261..32e37e52a3 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -59,7 +59,8 @@ def run(self): self.byte_compile(orig.build_py.get_outputs(self, include_bytecode=0)) def __getattr__(self, attr): - if attr == 'data_files': # lazily compute data files + "lazily compute data files" + if attr == 'data_files': self.data_files = files = self._get_data_files() return files return orig.build_py.__getattr__(self, attr) From f55db00043f3f47b7121c42d54433bc80a01c243 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:11:54 -0500 Subject: [PATCH 5447/8469] Remove superfluous local variable --- setuptools/command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 32e37e52a3..c24646c398 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -61,8 +61,8 @@ def run(self): def __getattr__(self, attr): "lazily compute data files" if attr == 'data_files': - self.data_files = files = self._get_data_files() - return files + self.data_files = self._get_data_files() + return self.data_files return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): From 775cb73ed72e87951254bbbe373951be9caac4df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:16:11 -0500 Subject: [PATCH 5448/8469] Extract function for getting data files for package. --- setuptools/command/build_py.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index c24646c398..3ddc767311 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -75,8 +75,9 @@ def build_module(self, module, module_file, package): def _get_data_files(self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" self.analyze_manifest() - data = [] - for package in self.packages or (): + return list(map(self._get_pkg_data_files, self.packages or ())) + + def _get_pkg_data_files(self, package): # Locate package source directory src_dir = self.get_package_dir(package) @@ -90,8 +91,7 @@ def _get_data_files(self): filenames = [ file[plen:] for file in self.find_data_files(package, src_dir) ] - data.append((package, src_dir, build_dir, filenames)) - return data + return package, src_dir, build_dir, filenames def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" From ddfbfa731e2cf73dc03b5a3345996afac843441e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:16:39 -0500 Subject: [PATCH 5449/8469] Reindent --- setuptools/command/build_py.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 3ddc767311..5021bd1f1e 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -78,20 +78,20 @@ def _get_data_files(self): return list(map(self._get_pkg_data_files, self.packages or ())) def _get_pkg_data_files(self, package): - # Locate package source directory - src_dir = self.get_package_dir(package) + # Locate package source directory + src_dir = self.get_package_dir(package) - # Compute package build directory - build_dir = os.path.join(*([self.build_lib] + package.split('.'))) + # Compute package build directory + build_dir = os.path.join(*([self.build_lib] + package.split('.'))) - # Length of path to strip from found files - plen = len(src_dir) + 1 + # Length of path to strip from found files + plen = len(src_dir) + 1 - # Strip directory from globbed filenames - filenames = [ - file[plen:] for file in self.find_data_files(package, src_dir) - ] - return package, src_dir, build_dir, filenames + # Strip directory from globbed filenames + filenames = [ + file[plen:] for file in self.find_data_files(package, src_dir) + ] + return package, src_dir, build_dir, filenames def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" From 0f590c0d72709128f32c23437fe0183386c69d1c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:33:04 -0500 Subject: [PATCH 5450/8469] Prefer relpath to string slicing for computing a path relative to a base. Fixes #341. --- CHANGES.txt | 6 ++++++ setuptools/command/build_py.py | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e8106c4065..c8a9f8ab3d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +19.3.1 +------ + +* Issue #341: Correct error in path handling of package data + files in ``build_py`` command when package is empty. + ---- 19.3 ---- diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 5021bd1f1e..0c1026aad7 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -84,12 +84,10 @@ def _get_pkg_data_files(self, package): # Compute package build directory build_dir = os.path.join(*([self.build_lib] + package.split('.'))) - # Length of path to strip from found files - plen = len(src_dir) + 1 - # Strip directory from globbed filenames filenames = [ - file[plen:] for file in self.find_data_files(package, src_dir) + os.path.relpath(file, src_dir) + for file in self.find_data_files(package, src_dir) ] return package, src_dir, build_dir, filenames From 8af3b6ef5b4173a0d0d6735147c98c882ae98344 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 06:54:00 -0500 Subject: [PATCH 5451/8469] Always use Python 3 version of map --- pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_pkg_resources.py | 2 ++ pkg_resources/tests/test_resources.py | 4 +++- setuptools/__init__.py | 2 +- setuptools/command/alias.py | 2 ++ setuptools/command/build_py.py | 1 + setuptools/command/easy_install.py | 2 +- setuptools/command/egg_info.py | 1 + setuptools/command/install_egg_info.py | 2 ++ setuptools/command/test.py | 1 + setuptools/dist.py | 1 + setuptools/extension.py | 2 ++ setuptools/package_index.py | 2 +- setuptools/sandbox.py | 2 +- setuptools/ssl_support.py | 2 +- setuptools/tests/test_dist_info.py | 2 ++ setuptools/tests/test_egg_info.py | 2 ++ setuptools/tests/test_sdist.py | 1 + 18 files changed, 26 insertions(+), 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7becc9515a..8382571e6a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -46,7 +46,7 @@ import imp as _imp from pkg_resources.extern import six -from pkg_resources.extern.six.moves import urllib +from pkg_resources.extern.six.moves import urllib, map # capture these to bypass sandboxing from os import utime diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 31eee63598..8b276ffcfd 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -12,6 +12,8 @@ import distutils.dist import distutils.command.install_egg_info +from pkg_resources.extern.six.moves import map + import pytest import pkg_resources diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 4241765ade..84133a326b 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -4,6 +4,8 @@ import shutil import string +from pkg_resources.extern.six.moves import map + import pytest from pkg_resources.extern import packaging @@ -158,7 +160,7 @@ def testResolve(self): for i in range(3): targets = list(ws.resolve(parse_requirements("Foo"), ad)) assert targets == [Foo] - list(map(ws.add,targets)) + list(map(ws.add, targets)) with pytest.raises(VersionConflict): ws.resolve(parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset diff --git a/setuptools/__init__.py b/setuptools/__init__.py index ec0d5dc2a4..67b57e4f46 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from setuptools.extern.six.moves import filterfalse +from setuptools.extern.six.moves import filterfalse, map import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 452a9244ea..4532b1cc0d 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,5 +1,7 @@ from distutils.errors import DistutilsOptionError +from setuptools.extern.six.moves import map + from setuptools.command.setopt import edit_config, option_base, config_file diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 0c1026aad7..8623c777cf 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -9,6 +9,7 @@ import collections import itertools +from setuptools.extern.six.moves import map try: from setuptools.lib2to3_ex import Mixin2to3 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a11618d1a0..d3c0acfb4b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -41,7 +41,7 @@ import io from setuptools.extern import six -from setuptools.extern.six.moves import configparser +from setuptools.extern.six.moves import configparser, map from setuptools import Command from setuptools.sandbox import run_setup diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 18a3105fc3..d1bd9b0406 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -15,6 +15,7 @@ import time from setuptools.extern import six +from setuptools.extern.six.moves import map from setuptools import Command from setuptools.command.sdist import sdist diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index fd0f118b33..f777538f0f 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,6 +1,8 @@ from distutils import log, dir_util import os +from setuptools.extern.six.moves import map + from setuptools import Command from setuptools.archive_util import unpack_archive import pkg_resources diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 3a2a9b933c..371e913b6f 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -3,6 +3,7 @@ import sys from setuptools.extern import six +from setuptools.extern.six.moves import map from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, diff --git a/setuptools/dist.py b/setuptools/dist.py index 4964a9e8ab..7785541582 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -14,6 +14,7 @@ DistutilsSetupError) from setuptools.extern import six +from setuptools.extern.six.moves import map from pkg_resources.extern import packaging from setuptools.depends import Require diff --git a/setuptools/extension.py b/setuptools/extension.py index 35eb7c7c55..d10609b699 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -5,6 +5,8 @@ import distutils.errors import distutils.extension +from setuptools.extern.six.moves import map + from .dist import _get_unpatched from . import msvc9_support diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ea136c097c..c53343e4c8 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -15,7 +15,7 @@ from urllib2 import splituser from setuptools.extern import six -from setuptools.extern.six.moves import urllib, http_client, configparser +from setuptools.extern.six.moves import urllib, http_client, configparser, map from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 37035f3792..668bcac72c 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -9,7 +9,7 @@ import pickle from setuptools.extern import six -from setuptools.extern.six.moves import builtins +from setuptools.extern.six.moves import builtins, map import pkg_resources diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 7baedd1977..511d2fa8cd 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,7 +3,7 @@ import atexit import re -from setuptools.extern.six.moves import urllib, http_client +from setuptools.extern.six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 6d0ab58792..abd0a76389 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -4,6 +4,8 @@ import shutil import tempfile +from setuptools.extern.six.moves import map + import pytest import pkg_resources diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 333d11d6f4..7d51585b1f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,6 +1,8 @@ import os import stat +from setuptools.extern.six.moves import map + import pytest from . import environment diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 753b507df9..d2a1f1bbfb 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -10,6 +10,7 @@ import io from setuptools.extern import six +from setuptools.extern.six.moves import map import pytest From 71429b10081c7ae0ad596c33d95b735af80f9248 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 10:41:47 -0500 Subject: [PATCH 5452/8469] Fix two failures in sorting where filename parts became a factor in the version. Ref #432. --- scripts/upload-old-releases-as-zip.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 38cfcd5544..d718e3bbbe 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -195,11 +195,19 @@ def download_setuptools_releases_without_zip_counterpart(self): if e.errno != errno.EEXIST: raise e + @staticmethod + def version_from_filename(filename): + basename = os.path.basename(filename) + name, ext = os.path.splitext(basename) + if name.endswith('.tar'): + name, ext2 = os.path.splitext(name) + return LooseVersion(name) + def convert_targz_to_zip(self): print("Converting the tar.gz to zip...") files = glob.glob('%s/*.tar.gz' % self.dirpath) total_converted = 0 - for targz in sorted(files, key=LooseVersion): + for targz in sorted(files, key=self.version_from_filename): # Extract and remove tar. tar = tarfile.open(targz) tar.extractall(path=self.dirpath) @@ -230,8 +238,7 @@ def convert_targz_to_zip(self): def upload_zips_to_pypi(self): print('Uploading to pypi...') - zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) - print("simulated upload of", zips); return + zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=self.version_from_filename) upload.upload(dists=zips) From b6056e0aa0de04bc1fe702f299d8187a8c224a03 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 10:51:45 -0500 Subject: [PATCH 5453/8469] Copy all the defaults from twine.commands.upload, as they're not exposed in the API. Ref #432 --- scripts/upload-old-releases-as-zip.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index d718e3bbbe..94fd1ce887 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -239,7 +239,20 @@ def convert_targz_to_zip(self): def upload_zips_to_pypi(self): print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=self.version_from_filename) - upload.upload(dists=zips) + upload.upload( + dists=zips, + repository='pypi', + sign=False, + identity=None, + username=None, + password=None, + comment=None, + sign_with='gpg', + config_file='~/.pypirc', + skip_existing=False, + cert=None, + client_cert=None, + ) if __name__ == '__main__': From 3f702d545e8fcb20d60224420b9c3b20a0700608 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 10:55:18 -0500 Subject: [PATCH 5454/8469] Omit cert and client_cert, the latest release of twine is different than what is seen in master. --- scripts/upload-old-releases-as-zip.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 94fd1ce887..9737337cff 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -250,8 +250,6 @@ def upload_zips_to_pypi(self): sign_with='gpg', config_file='~/.pypirc', skip_existing=False, - cert=None, - client_cert=None, ) From 3c6446900f27be1c954e0123a94d797bd6e70b83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 11:06:11 -0500 Subject: [PATCH 5455/8469] Pin to 1.6.4 due to https://github.com/pypa/twine/issues/158. Ref #432. --- scripts/upload-old-releases-as-zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 9737337cff..e3047fdece 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -3,7 +3,7 @@ # declare and require dependencies __requires__ = [ - 'twine', + 'twine==1.6.4', ]; __import__('pkg_resources') import errno From 70697b3a8c795a25de56a30d41cca76ad18d78fb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 11:20:04 -0500 Subject: [PATCH 5456/8469] Remove script as it's no longer needed. Fixes #432. --- scripts/upload-old-releases-as-zip.py | 260 -------------------------- 1 file changed, 260 deletions(-) delete mode 100644 scripts/upload-old-releases-as-zip.py diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py deleted file mode 100644 index e3047fdece..0000000000 --- a/scripts/upload-old-releases-as-zip.py +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# declare and require dependencies -__requires__ = [ - 'twine==1.6.4', -]; __import__('pkg_resources') - -import errno -import glob -import hashlib -import json -import os -import shutil -import tarfile -import codecs -import urllib.request -import urllib.parse -import urllib.error -from distutils.version import LooseVersion - -from twine.commands import upload - - -OK = '\033[92m' -FAIL = '\033[91m' -END = '\033[0m' -DISTRIBUTION = "setuptools" - - -class SetuptoolsOldReleasesWithoutZip: - """docstring for SetuptoolsOldReleases""" - - def __init__(self): - self.dirpath = './dist' - os.makedirs(self.dirpath, exist_ok=True) - print("Downloading %s releases..." % DISTRIBUTION) - print("All releases will be downloaded to %s" % self.dirpath) - self.data_json_setuptools = self.get_json_data(DISTRIBUTION) - self.valid_releases_numbers = sorted([ - release - for release in self.data_json_setuptools['releases'] - # This condition is motivated by 13.0 release, which - # comes as "13.0": [], in the json - if self.data_json_setuptools['releases'][release] - ], key=LooseVersion) - self.total_downloaded_ok = 0 - - def get_json_data(self, package_name): - """ - "releases": { - "0.7.2": [ - { - "has_sig": false, - "upload_time": "2013-06-09T16:10:00", - "comment_text": "", - "python_version": "source", - "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.2.tar.gz", # NOQA - "md5_digest": "de44cd90f8a1c713d6c2bff67bbca65d", - "downloads": 159014, - "filename": "setuptools-0.7.2.tar.gz", - "packagetype": "sdist", - "size": 633077 - } - ], - "0.7.3": [ - { - "has_sig": false, - "upload_time": "2013-06-18T21:08:56", - "comment_text": "", - "python_version": "source", - "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.3.tar.gz", # NOQA - "md5_digest": "c854adacbf9067d330a847f06f7a8eba", - "downloads": 30594, - "filename": "setuptools-0.7.3.tar.gz", - "packagetype": "sdist", - "size": 751152 - } - ], - "12.3": [ - { - "has_sig": false, - "upload_time": "2015-02-26T19:15:51", - "comment_text": "", - "python_version": "3.4", - "url": "https://pypi.python.org/packages/3.4/s/setuptools/setuptools-12.3-py2.py3-none-any.whl", # NOQA - "md5_digest": "31f51a38497a70efadf5ce8d4c2211ab", - "downloads": 288451, - "filename": "setuptools-12.3-py2.py3-none-any.whl", - "packagetype": "bdist_wheel", - "size": 501904 - }, - { - "has_sig": false, - "upload_time": "2015-02-26T19:15:43", - "comment_text": "", - "python_version": "source", - "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.tar.gz", # NOQA - "md5_digest": "67614b6d560fa4f240e99cd553ec7f32", - "downloads": 110109, - "filename": "setuptools-12.3.tar.gz", - "packagetype": "sdist", - "size": 635025 - }, - { - "has_sig": false, - "upload_time": "2015-02-26T19:15:47", - "comment_text": "", - "python_version": "source", - "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip", # NOQA - "md5_digest": "abc799e7db6e7281535bf342bfc41a12", - "downloads": 67539, - "filename": "setuptools-12.3.zip", - "packagetype": "sdist", - "size": 678783 - } - ], - """ - url = "https://pypi.python.org/pypi/%s/json" % (package_name,) - resp = urllib.request.urlopen(urllib.request.Request(url)) - charset = resp.info().get_content_charset() - reader = codecs.getreader(charset)(resp) - data = json.load(reader) - - # Mainly for debug. - json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) - with open(json_filename, 'w') as outfile: - json.dump( - data, - outfile, - sort_keys=True, - indent=4, - separators=(',', ': '), - ) - - return data - - def get_setuptools_releases_without_zip_counterpart(self): - # Get set(all_valid_releases) - set(releases_with_zip), so now we have - # the releases without zip. - return set(self.valid_releases_numbers) - set([ - release - for release in self.valid_releases_numbers - for same_version_release_dict in self.data_json_setuptools['releases'][release] # NOQA - if 'zip' in same_version_release_dict['filename'] - ]) - - def download_setuptools_releases_without_zip_counterpart(self): - try: - releases_without_zip = self.get_setuptools_releases_without_zip_counterpart() # NOQA - failed_md5_releases = [] - # This is a "strange" loop, going through all releases and - # testing only the release I need to download, but I thought it - # would be mouch more readable than trying to iterate through - # releases I need and get into traverse hell values inside dicts - # inside dicts of the json to get the distribution's url to - # download. - for release in self.valid_releases_numbers: - if release in releases_without_zip: - for same_version_release_dict in self.data_json_setuptools['releases'][release]: # NOQA - if 'tar.gz' in same_version_release_dict['filename']: - print("Downloading %s..." % release) - local_file = '%s/%s' % ( - self.dirpath, - same_version_release_dict["filename"] - ) - urllib.request.urlretrieve( - same_version_release_dict["url"], - local_file - ) - targz = open(local_file, 'rb').read() - hexdigest = hashlib.md5(targz).hexdigest() - if (hexdigest != same_version_release_dict['md5_digest']): # NOQA - print(FAIL + "FAIL: md5 for %s didn't match!" % release + END) # NOQA - failed_md5_releases.append(release) - else: - self.total_downloaded_ok += 1 - print('Total releases without zip: %s' % len(releases_without_zip)) - print('Total downloaded: %s' % self.total_downloaded_ok) - if failed_md5_releases: - msg = FAIL + ( - "FAIL: these releases %s failed the md5 check!" % - ','.join(failed_md5_releases) - ) + END - raise Exception(msg) - elif self.total_downloaded_ok != len(releases_without_zip): - msg = FAIL + ( - "FAIL: Unknown error occured. Please check the logs." - ) + END - raise Exception(msg) - else: - print(OK + "All releases downloaded and md5 checked." + END) - - except OSError as e: - if e.errno != errno.EEXIST: - raise e - - @staticmethod - def version_from_filename(filename): - basename = os.path.basename(filename) - name, ext = os.path.splitext(basename) - if name.endswith('.tar'): - name, ext2 = os.path.splitext(name) - return LooseVersion(name) - - def convert_targz_to_zip(self): - print("Converting the tar.gz to zip...") - files = glob.glob('%s/*.tar.gz' % self.dirpath) - total_converted = 0 - for targz in sorted(files, key=self.version_from_filename): - # Extract and remove tar. - tar = tarfile.open(targz) - tar.extractall(path=self.dirpath) - tar.close() - os.remove(targz) - - # Zip the extracted tar. - setuptools_folder_path = targz.replace('.tar.gz', '') - setuptools_folder_name = setuptools_folder_path.split("/")[-1] - print(setuptools_folder_name) - shutil.make_archive( - setuptools_folder_path, - 'zip', - self.dirpath, - setuptools_folder_name - ) - # Exclude extracted tar folder. - shutil.rmtree(setuptools_folder_path.replace('.zip', '')) - total_converted += 1 - print('Total converted: %s' % total_converted) - if self.total_downloaded_ok != total_converted: - msg = FAIL + ( - "FAIL: Total number of downloaded releases is different" - " from converted ones. Please check the logs." - ) + END - raise Exception(msg) - print("Done with the tar.gz->zip. Check folder %s." % main.dirpath) - - def upload_zips_to_pypi(self): - print('Uploading to pypi...') - zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=self.version_from_filename) - upload.upload( - dists=zips, - repository='pypi', - sign=False, - identity=None, - username=None, - password=None, - comment=None, - sign_with='gpg', - config_file='~/.pypirc', - skip_existing=False, - ) - - -if __name__ == '__main__': - main = SetuptoolsOldReleasesWithoutZip() - main.download_setuptools_releases_without_zip_counterpart() - main.convert_targz_to_zip() - main.upload_zips_to_pypi() From bafe9fba05aefdd679770d54e3a74fc0cab538d5 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 16 Jan 2016 12:39:10 -0800 Subject: [PATCH 5457/8469] Issue #25850: Use cross-compilation by default for 64-bit Windows. --- _msvccompiler.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 10a9ffda24..d0ba7d6d1e 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -125,11 +125,11 @@ def _find_exe(exe, paths=None): return exe # A map keyed by get_platform() return values to values accepted by -# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is -# the param to cross-compile on x86 targetting amd64.) +# 'vcvarsall.bat'. Always cross-compile from x86 to work with the +# lighter-weight MSVC installs that do not include native 64-bit tools. PLAT_TO_VCVARS = { 'win32' : 'x86', - 'win-amd64' : 'amd64', + 'win-amd64' : 'x86_amd64', } # A map keyed by get_platform() return values to the file under @@ -193,19 +193,8 @@ def initialize(self, plat_name=None): raise DistutilsPlatformError("--plat-name must be one of {}" .format(tuple(PLAT_TO_VCVARS))) - # On x86, 'vcvarsall.bat amd64' creates an env that doesn't work; - # to cross compile, you use 'x86_amd64'. - # On AMD64, 'vcvarsall.bat amd64' is a native build env; to cross - # compile use 'x86' (ie, it runs the x86 compiler directly) - if plat_name == get_platform() or plat_name == 'win32': - # native build or cross-compile to win32 - plat_spec = PLAT_TO_VCVARS[plat_name] - else: - # cross compile from win32 -> some 64bit - plat_spec = '{}_{}'.format( - PLAT_TO_VCVARS[get_platform()], - PLAT_TO_VCVARS[plat_name] - ) + # Get the vcvarsall.bat spec for the requested platform. + plat_spec = PLAT_TO_VCVARS[plat_name] vc_env = _get_vc_env(plat_spec) if not vc_env: From 7a7aaaf398456bb31074f4446d8c1290d9695019 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 16 Jan 2016 13:54:53 -0800 Subject: [PATCH 5458/8469] Issue #26071: bdist_wininst created binaries fail to start and find 32bit Python --- command/wininst-14.0-amd64.exe | Bin 136192 -> 589824 bytes command/wininst-14.0.exe | Bin 129024 -> 460288 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-14.0-amd64.exe b/command/wininst-14.0-amd64.exe index 7a5e78d52bcc5db0be1baff6cdad41e172a5b81f..22299543a97ffc1525a3b1c778cb158d6c6430ad 100644 GIT binary patch literal 589824 zcmdqKd3amJ_3$rSR;(<}bsz!*0R$Lu5sSg0I5;V~i4yQW7A5 zjcl-TQK1ydQYfJBnLvAO>zE4{^PsNa*u9?9?BSCouBh~L{Dey7^`-CSLy z-rugy=XceQhKxN>{c2;2)$h=;NANqO<-M`5@Z0wAhHAmv_OM^2w>|uBwZNTw&D7~q zcCMziVVCR5I|^L~|MlSua&bFcN4o~*4|ciQ`?*}Pd=7>T{X0d5Lw9w>hg%YUk@0xr7zujJ!|6+;A{>|*~n&)-7 zc6?drIzJcpJ-@YI6}s;08{gf}^}MHV#J=H^V^__K5momZH4%cO?jj_8{`@Z2l#^#& zc}46Bmuu`ZZ~>gI-|@Smr}hduh&Y|>fVsR;qV9oU!5QPX&tK5xYCd_U1E}gqU0s&| z(C{6&;K^4{yXMN-F4ugDa|PkCG>gFZ`3p+9vu4klN}S>yJai4^W$X9BT{Ytd0EL$> zcE=qK(T<&Jm}{*3dxdLbf;HwEBN-|!4=r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Y>9N{d)aq-Ev`pYZAC742a2z}B+R~34cOFGY-o(Q5_$mA{ zzKq|+@8=Kk$N8`L3w#RD#zF_?v|4xxP@^sqZeJX^o`Wh5lItWD@_40*(p4z|@y%2Q ztB)df<*Sp_$5aP__(}C?b+P)2x=B5+wg#AfM0;6#6Zp9`3{8vT<$u7`-qjE4HH`*F zTSEszo?^^4mLfGDg=j5t8k$L+r|HY|I6Z}Y_Xl88ed~6sIgoF16go+kj;uG(de|Cc zHDNj=?9T?X2iR2h5d&$34LO2~_cV34*3e;YrW|2w~)e;>H2xzI)!24s~Z zgoVjC#LN=r0beae7=Hl=nvK9&TODB+PBsVNP!+-#KqTh?M=k@5Bmj!k2M}q2UFif6 zLI6P+@a{ciC>c&hlCdNkdleytWCoc-=HooHjI1JS$jg9bTY!6alXC3hC&bMcXGlNs zUVyX5#D(H>;%CxXX{^aL#M3=2*cs1)$j=iIfT!aGH;2t*3y`IkA{eg%u3w9j+(rcD zEo>{>!FIE~Y(FGF4B3yt`A#C7xLGO@1GRLYn&M$6ZbWhQl=@0zh?JN?} zCGCoKRpa#G`rq^teT}{zXJ5>c8hdu_M*Fsi_FM>$1VJ7nW{TNjk+=k)ex+EPe$|sy zT>lTxn#OaL`AU(p#C?)G121HuD4uiG!#f*ri@?2ekOWGK)y?AJs~XO{sqokVIR9|F zYH(B0md2;^WB3{TEPe@Wxdfr497om9`4b2!=W%ptA~Zv!>?ZI4AVY;Qz|#?EeJZrR zQrLi)xl7n1lmmXAjiSvM&P*bb1Fa6g?S_#glT0OhaGX4a99~CFQTyN!={|A}Ve({5 zUKE{pC8k~j19O*M%J0DvKEWc~C0ydKVi}3Tj3|s>B9!3VvDln9>rmf#CI Date: Sat, 16 Jan 2016 17:17:52 -0500 Subject: [PATCH 5459/8469] Update changelog --- CHANGES.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c8a9f8ab3d..06c6aad105 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,11 +2,17 @@ CHANGES ======= -19.3.1 ------- +19.4 +---- * Issue #341: Correct error in path handling of package data files in ``build_py`` command when package is empty. +* Distribute #323, Issue #141, Issue #207, and + Pull Request #167: Another implementation of + ``pkg_resources.WorkingSet`` and ``pkg_resources.Distribution`` + that supports replacing an extant package with a new one, + allowing for setup_requires dependencies to supersede installed + packages for the session. ---- 19.3 From efb37fc9c2e20f79f742e976e1bcd7fa2a27c5f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 17:23:18 -0500 Subject: [PATCH 5460/8469] Just use BytesIO --- setuptools/tests/test_easy_install.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 4f9e52d144..77cf8da108 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -464,15 +464,9 @@ def make_sdist(dist_path, files): dist = tarfile.open(dist_path, 'w:gz') - try: - # Python 3 (StringIO gets converted to io module) - MemFile = BytesIO - except AttributeError: - MemFile = StringIO - try: for filename, content in files: - file_bytes = MemFile(content.encode('utf-8')) + file_bytes = io.BytesIO(content.encode('utf-8')) file_info = tarfile.TarInfo(name=filename) file_info.size = len(file_bytes.getvalue()) file_info.mtime = int(time.time()) From d716b3c03b111512133126a5f42c7553bfb43174 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 17:32:19 -0500 Subject: [PATCH 5461/8469] Re-use tarfile_open for Python 2.6 compatibilty. --- setuptools/tests/test_easy_install.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 77cf8da108..895ce7aa18 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -364,7 +364,7 @@ def test_setup_requires_override_nspkg(self): # extracted path to sys.path so foo.bar v0.1 is importable foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1') os.mkdir(foobar_1_dir) - with tarfile.open(foobar_1_archive) as tf: + with tarfile_open(foobar_1_archive) as tf: tf.extractall(foobar_1_dir) sys.path.insert(1, foobar_1_dir) @@ -462,17 +462,13 @@ def make_sdist(dist_path, files): listed in ``files`` as ``(filename, content)`` tuples. """ - dist = tarfile.open(dist_path, 'w:gz') - - try: + with tarfile_open(dist_path, 'w:gz') as dist: for filename, content in files: file_bytes = io.BytesIO(content.encode('utf-8')) file_info = tarfile.TarInfo(name=filename) file_info.size = len(file_bytes.getvalue()) file_info.mtime = int(time.time()) dist.addfile(file_info, fileobj=file_bytes) - finally: - dist.close() def create_setup_requires_package(path, distname='foobar', version='0.1', From 670a9c895e6180e72a069f5208f0ed2ae38b9728 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 17:38:00 -0500 Subject: [PATCH 5462/8469] Get VersionConflict from pkg_resources. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 895ce7aa18..99ac731741 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -396,7 +396,7 @@ def test_setup_requires_override_nspkg(self): # Don't even need to install the package, just # running the setup.py at all is sufficient run_setup(test_setup_py, ['--name']) - except VersionConflict: + except pkg_resources.VersionConflict: self.fail('Installing setup.py requirements ' 'caused a VersionConflict') From 400d10f9ed6d353fcd349727342c153839eb8a69 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 17:38:44 -0500 Subject: [PATCH 5463/8469] Added tag 19.4 for changeset f47f3671508b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4f89a01a43..1e7eeff0c4 100644 --- a/.hgtags +++ b/.hgtags @@ -235,3 +235,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 5d24cf9d1ced76c406ab3c4a94c25d1fe79b94bc 19.2 66fa131a0d77a1b0e6f89ccb76b254cfb07d3da3 19.3b1 32bba9bf8cce8350b560a7591c9ef5884a194211 19.3 +f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 From 7372d185e72fda6c8ad3eea6c5faac61eae602c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2016 17:39:54 -0500 Subject: [PATCH 5464/8469] Bumped to 19.5 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 7ff48baa70..59c4552914 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.4' +__version__ = '19.5' From e888c6cdacaa883214a06fad0ccd5789f2066b4f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Mon, 18 Jan 2016 08:48:21 +0000 Subject: [PATCH 5465/8469] Make 19.4 same level header as other version numbers. The problem was that restructured text considered 19.4 is a sibtitle to "CHANGES". --HG-- branch : svetlyak40wt/make-194-same-level-header-as-other-vers-1453106898145 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 06c6aad105..8992df6a89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,7 @@ CHANGES ======= +---- 19.4 ---- From 34941986add5899b43614e3cfc0f590eb9d1ca20 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 18 Jan 2016 12:15:08 +0100 Subject: [PATCH 5466/8469] subprocess._optim_args_from_interpreter_flags() Issue #26100: * Add subprocess._optim_args_from_interpreter_flags() * Add test.support.optim_args_from_interpreter_flags() * Use new functions in distutils, test_cmd_line_script, test_compileall and test_inspect The change enables test_details() test of test_inspect when -O or -OO command line option is used. --- util.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/util.py b/util.py index e423325de4..fdcf6fabae 100644 --- a/util.py +++ b/util.py @@ -7,8 +7,8 @@ import os import re import importlib.util -import sys import string +import sys from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -350,6 +350,11 @@ def byte_compile (py_files, generated in indirect mode; unless you know what you're doing, leave it set to None. """ + + # Late import to fix a bootstrap issue: _posixsubprocess is built by + # setup.py, but setup.py uses distutils. + import subprocess + # nothing is done if sys.dont_write_bytecode is True if sys.dont_write_bytecode: raise DistutilsByteCompileError('byte-compiling is disabled.') @@ -412,11 +417,9 @@ def byte_compile (py_files, script.close() - cmd = [sys.executable, script_name] - if optimize == 1: - cmd.insert(1, "-O") - elif optimize == 2: - cmd.insert(1, "-OO") + cmd = [sys.executable] + cmd.extend(subprocess._optim_args_from_interpreter_flags()) + cmd.append(script_name) spawn(cmd, dry_run=dry_run) execute(os.remove, (script_name,), "removing %s" % script_name, dry_run=dry_run) From 0f0ca87e0b6fb7a9737962cf41d9d4ba81ff9c0f Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Tue, 19 Jan 2016 04:58:32 +0000 Subject: [PATCH 5467/8469] Make all headers on the same level in CHANGES.txt. --HG-- branch : svetlyak40wt/make-194-same-level-header-as-other-vers-1453106898145 --- CHANGES.txt | 232 +--------------------------------------------------- 1 file changed, 1 insertion(+), 231 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8992df6a89..5242f73169 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,7 +2,6 @@ CHANGES ======= ----- 19.4 ---- @@ -15,7 +14,6 @@ CHANGES allowing for setup_requires dependencies to supersede installed packages for the session. ----- 19.3 ---- @@ -23,7 +21,6 @@ CHANGES dependencies conditionally from vendored copies or primary locations. Adds a new dependency on six. ----- 19.2 ---- @@ -31,7 +28,6 @@ CHANGES * Pull Request #162: Add missing whitespace to multiline string literals. ------- 19.1.1 ------ @@ -41,7 +37,6 @@ CHANGES of strings, rather than rely on ``repr``, which can be incorrect (especially on Python 2). ----- 19.1 ---- @@ -51,14 +46,12 @@ CHANGES than hard-coding a particular value. * Issue #475: Fix incorrect usage in _translate_metadata2. ----- 19.0 ---- * Issue #442: Use RawConfigParser for parsing .pypirc file. Interpolated values are no longer honored in .pypirc files. ------- 18.8.1 ------ @@ -67,7 +60,6 @@ CHANGES with setuptools hidden. Fixes regression introduced in Setuptools 12.0. ----- 18.8 ---- @@ -79,14 +71,12 @@ CHANGES * Issue #472: Remove deprecated use of 'U' in mode parameter when opening files. ------- 18.7.1 ------ * Issue #469: Refactored logic for Issue #419 fix to re-use metadata loading from Provider. ----- 18.7 ---- @@ -104,14 +94,12 @@ CHANGES reading the version info from distutils-installed metadata rather than using the version in the filename. ------- 18.6.1 ------ * Issue #464: Correct regression in invocation of superclass on old-style class on Python 2. ----- 18.6 ---- @@ -119,7 +107,6 @@ CHANGES omit the version number of the package, allowing any version of the package to be used. ----- 18.5 ---- @@ -131,27 +118,23 @@ CHANGES * `Fix dictionary mutation during iteration `_. ----- 18.4 ---- * Issue #446: Test command now always invokes unittest, even if no test suite is supplied. ------- 18.3.2 ------ * Correct another regression in setuptools.findall where the fix for Python #12885 was lost. ------- 18.3.1 ------ * Issue #425: Correct regression in setuptools.findall. ----- 18.3 ---- @@ -172,25 +155,21 @@ CHANGES * Refactor setuptools.findall in preparation for re-submission back to distutils. ----- 18.2 ---- * Issue #412: More efficient directory search in ``find_packages``. ----- 18.1 ---- * Upgrade to vendored packaging 15.3. ------- 18.0.1 ------ * Issue #401: Fix failure in test suite. ----- 18.0 ---- @@ -216,7 +195,6 @@ CHANGES * Pull Request #136: Remove excessive quoting from shebang headers for Jython. ------- 17.1.1 ------ @@ -224,14 +202,12 @@ CHANGES deprecated imp module (`ref `_). ----- 17.1 ---- * Issue #380: Add support for range operators on environment marker evaluation. ----- 17.0 ---- @@ -240,7 +216,6 @@ CHANGES the name. Removes unintended functionality and brings behavior into parity with pip. ----- 16.0 ---- @@ -251,7 +226,6 @@ CHANGES * Pull Request #129: Address deprecation warning due to usage of imp module. ----- 15.2 ---- @@ -259,14 +233,12 @@ CHANGES ``pkg_resources._initialize_master_working_set``, allowing for imperative re-initialization of the master working set. ----- 15.1 ---- * Updated to Packaging 15.1 to address Packaging #28. * Fix ``setuptools.sandbox._execfile()`` with Python 3.1. ----- 15.0 ---- @@ -280,7 +252,6 @@ CHANGES has since been changed, but older versions of buildout may experience problems. See Buildout #242 for details. ------- 14.3.1 ------ @@ -289,7 +260,6 @@ CHANGES * Issue #364: Replace deprecated usage with recommended usage of ``EntryPoint.load``. ----- 14.3 ---- @@ -297,7 +267,6 @@ CHANGES for creating the directory to avoid the subsequent warning if the directory is group writable. ----- 14.2 ---- @@ -305,21 +274,18 @@ CHANGES None for pyversion or platform can be compared against Distributions defining those attributes. ------- 14.1.1 ------ * Issue #360: Removed undesirable behavior from test runs, preventing write tests and installation to system site packages. ----- 14.1 ---- * Pull Request #125: Add ``__ne__`` to Requirement class. * Various refactoring of easy_install. ----- 14.0 ---- @@ -335,21 +301,18 @@ CHANGES using the "install-dir" and "scripts-dir" parameters to easy_install through an appropriate distutils config file. ------- 13.0.2 ------ * Issue #359: Include pytest.ini in the sdist so invocation of py.test on the sdist honors the pytest configuration. ------- 13.0.1 ------ Re-release of 13.0. Intermittent connectivity issues caused the release process to fail and PyPI uploads no longer accept files for 13.0. ----- 13.0 ---- @@ -359,14 +322,12 @@ process to fail and PyPI uploads no longer accept files for 13.0. functionality was added to support upgrades from old Distribute versions, 0.6.5 and 0.6.6. ----- 12.4 ---- * Pull Request #119: Restore writing of ``setup_requires`` to metadata (previously added in 8.4 and removed in 9.0). ----- 12.3 ---- @@ -376,7 +337,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #354. Added documentation on building setuptools documentation. ----- 12.2 ---- @@ -387,40 +347,34 @@ process to fail and PyPI uploads no longer accept files for 13.0. remains deprecated for use by individual packages. * Simplified implementation of ``ez_setup.use_setuptools``. ----- 12.1 ---- * Pull Request #118: Soften warning for non-normalized versions in Distribution. ------- 12.0.5 ------ * Issue #339: Correct Attribute reference in ``cant_write_to_target``. * Issue #336: Deprecated ``ez_setup.use_setuptools``. ------- 12.0.4 ------ * Issue #335: Fix script header generation on Windows. ------- 12.0.3 ------ * Fixed incorrect class attribute in ``install_scripts``. Tests would be nice. ------- 12.0.2 ------ * Issue #331: Fixed ``install_scripts`` command on Windows systems corrupting the header. ------- 12.0.1 ------ @@ -428,7 +382,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. compatibility. For the future, tools should construct a CommandSpec explicitly. ----- 12.0 ---- @@ -439,14 +392,12 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Deprecated ``easy_install.ScriptWriter.get_writer``, replaced by ``.best()`` with slightly different semantics (no force_windows flag). ------- 11.3.1 ------ * Issue #327: Formalize and restore support for any printable character in an entry point name. ----- 11.3 ---- @@ -460,13 +411,11 @@ process to fail and PyPI uploads no longer accept files for 13.0. getattr(ep, "resolve", lambda: ep.load(require=False))() ----- 11.2 ---- * Pip #2326: Report deprecation warning at stacklevel 2 for easier diagnosis. ----- 11.1 ---- @@ -477,20 +426,17 @@ process to fail and PyPI uploads no longer accept files for 13.0. a VersionConflict when no dependent package context is known. New unit tests now capture the expected interface. ----- 11.0 ---- * Interop #3: Upgrade to Packaging 15.0; updates to PEP 440 so that >1.7 does not exclude 1.7.1 but does exclude 1.7.0 and 1.7.0.post1. ------- 10.2.1 ------ * Issue #323: Fix regression in entry point name parsing. ----- 10.2 ---- @@ -500,7 +446,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Substantial refactoring of all unit tests. Tests are now much leaner and re-use a lot of fixtures and contexts for better clarity of purpose. ----- 10.1 ---- @@ -509,13 +454,11 @@ process to fail and PyPI uploads no longer accept files for 13.0. so that systems relying on that interface do not fail (namely, Ubuntu 12.04 and similar Debian releases). ------- 10.0.1 ------ * Issue #319: Fixed issue installing pure distutils packages. ----- 10.0 ---- @@ -528,53 +471,45 @@ process to fail and PyPI uploads no longer accept files for 13.0. upgrade (or downgrade) itself even when its own metadata and implementation change. ---- 9.1 --- * Prefer vendored packaging library `as recommended `_. ------ 9.0.1 ----- * Issue #312: Restored presence of pkg_resources API tests (doctest) to sdist. ---- 9.0 --- * Issue #314: Disabled support for ``setup_requires`` metadata to avoid issue where Setuptools was unable to upgrade over earlier versions. ---- 8.4 --- * Pull Request #106: Now write ``setup_requires`` metadata. ---- 8.3 --- * Issue #311: Decoupled pkg_resources from setuptools once again. ``pkg_resources`` is now a package instead of a module. ------ 8.2.1 ----- * Issue #306: Suppress warnings about Version format except in select scenarios (such as installation). ---- 8.2 --- * Pull Request #85: Search egg-base when adding egg-info to manifest. ---- 8.1 --- @@ -584,7 +519,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. ``pkg_resources.PEP440Warning``, instead of RuntimeWarning. * Disabled warnings on empty versions. ------ 8.0.4 ----- @@ -594,27 +528,23 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #296: Add warning when a version is parsed as legacy. This warning will make it easier for developers to recognize deprecated version numbers. ------ 8.0.3 ----- * Issue #296: Restored support for ``__hash__`` on parse_version results. ------ 8.0.2 ----- * Issue #296: Restored support for ``__getitem__`` and sort operations on parse_version result. ------ 8.0.1 ----- * Issue #296: Restore support for iteration over parse_version result, but deprecated that usage with a warning. Fixes failure with buildout. ---- 8.0 --- @@ -627,7 +557,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. supported. Setuptools now "vendors" the `packaging `_ library. ---- 7.0 --- @@ -644,28 +573,24 @@ process to fail and PyPI uploads no longer accept files for 13.0. adapted to ignore ``.eggs``. The files will need to be manually moved or will be retrieved again. Most use cases will require no attention. ---- 6.1 --- * Issue #268: When resolving package versions, a VersionConflict now reports which package previously required the conflicting version. ------ 6.0.2 ----- * Issue #262: Fixed regression in pip install due to egg-info directories being omitted. Re-opens Issue #118. ------ 6.0.1 ----- * Issue #259: Fixed regression with namespace package handling on ``single version, externally managed`` installs. ---- 6.0 --- @@ -696,7 +621,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. recognize the specially-packaged compiler package for easy extension module support on Python 2.6, 2.7, and 3.2. ---- 5.8 --- @@ -704,7 +628,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. Python 3, supporting environments where builtins have been patched to make Python 3 look more like Python 2. ---- 5.7 --- @@ -715,20 +638,17 @@ process to fail and PyPI uploads no longer accept files for 13.0. notes and detailed in Issue #154 was likely not an increase over the status quo, but rather only an increase over not storing the zip info at all. ---- 5.6 --- * Issue #242: Use absolute imports in svn_utils to avoid issues if the installing package adds an xml module to the path. ------ 5.5.1 ----- * Issue #239: Fix typo in 5.5 such that fix did not take. ---- 5.5 --- @@ -736,20 +656,17 @@ process to fail and PyPI uploads no longer accept files for 13.0. Distribution objects and validates the syntax just like install_requires and tests_require directives. ------ 5.4.2 ----- * Issue #236: Corrected regression in execfile implementation for Python 2.6. ------ 5.4.1 ----- * Python #7776: (ssl_support) Correct usage of host for validation when tunneling for HTTPS. ---- 5.4 --- @@ -760,7 +677,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. in startup time by enabling this feature. This feature is not enabled by default because it causes a substantial increase in memory usage. ---- 5.3 --- @@ -769,7 +685,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Prune revision control directories (e.g .svn) from base path as well as sub-directories. ---- 5.2 --- @@ -781,7 +696,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * During install_egg_info, the generated lines for namespace package .pth files are now processed even during a dry run. ---- 5.1 --- @@ -789,20 +703,17 @@ process to fail and PyPI uploads no longer accept files for 13.0. building on the work in Issue #168. Special thanks to Jurko Gospodnetic and PJE. ------ 5.0.2 ----- * Issue #220: Restored script templates. ------ 5.0.1 ----- * Renamed script templates to end with .tmpl now that they no longer need to be processed by 2to3. Fixes spurious syntax errors during build/install. ---- 5.0 --- @@ -810,7 +721,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Incidentally, script templates were updated not to include the triple-quote escaping. -------------------------- 3.7.1 and 3.8.1 and 4.0.1 ------------------------- @@ -818,48 +728,41 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #218: Setuptools 3.8.1 superseded 4.0.1, and 4.x was removed from the available versions to install. ---- 4.0 --- * Issue #210: ``setup.py develop`` now copies scripts in binary mode rather than text mode, matching the behavior of the ``install`` command. ---- 3.8 --- * Extend Issue #197 workaround to include all Python 3 versions prior to 3.2.2. ---- 3.7 --- * Issue #193: Improved handling of Unicode filenames when building manifests. ---- 3.6 --- * Issue #203: Honor proxy settings for Powershell downloader in the bootstrap routine. ------ 3.5.2 ----- * Issue #168: More robust handling of replaced zip files and stale caches. Fixes ZipImportError complaining about a 'bad local header'. ------ 3.5.1 ----- * Issue #199: Restored ``install._install`` for compatibility with earlier NumPy versions. ---- 3.5 --- @@ -870,32 +773,27 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #192: Preferred bootstrap location is now https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). ------ 3.4.4 ----- * Issue #184: Correct failure where find_package over-matched packages when directory traversal isn't short-circuited. ------ 3.4.3 ----- * Issue #183: Really fix test command with Python 3.1. ------ 3.4.2 ----- * Issue #183: Fix additional regression in test command on Python 3.1. ------ 3.4.1 ----- * Issue #180: Fix regression in test command not caught by py.test-run tests. ---- 3.4 --- @@ -906,13 +804,11 @@ process to fail and PyPI uploads no longer accept files for 13.0. now installs naturally on IronPython. Behavior on CPython should be unchanged. ---- 3.3 --- * Add ``include`` parameter to ``setuptools.find_packages()``. ---- 3.2 --- @@ -920,27 +816,23 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #162: Update dependency on certifi to 1.0.1. * Issue #164: Update dependency on wincertstore to 0.2. ---- 3.1 --- * Issue #161: Restore Features functionality to allow backward compatibility (for Features) until the uses of that functionality is sufficiently removed. ------ 3.0.2 ----- * Correct typo in previous bugfix. ------ 3.0.1 ----- * Issue #157: Restore support for Python 2.6 in bootstrap script where ``zipfile.ZipFile`` does not yet have support for context managers. ---- 3.0 --- @@ -968,7 +860,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. Python 3 environments. * Issue #156: Fix spelling of __PYVENV_LAUNCHER__ variable. ---- 2.2 --- @@ -977,21 +868,18 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #128: Fixed issue where only the first dependency link was honored in a distribution where multiple dependency links were supplied. ------ 2.1.2 ----- * Issue #144: Read long_description using codecs module to avoid errors installing on systems where LANG=C. ------ 2.1.1 ----- * Issue #139: Fix regression in re_finder for CVS repos (and maybe Git repos as well). ---- 2.1 --- @@ -999,7 +887,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. in a zip-imported file. * Issue #131: Fix RuntimeError when constructing an egg fetcher. ------ 2.0.2 ----- @@ -1007,13 +894,11 @@ process to fail and PyPI uploads no longer accept files for 13.0. not containing parser module. * Fix NameError in ``sdist:re_finder``. ------ 2.0.1 ----- * Issue #124: Fixed error in list detection in upload_docs. ---- 2.0 --- @@ -1026,14 +911,12 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Removed ``pkg_resources.ImpWrapper``. Clients that expected this class should use ``pkgutil.ImpImporter`` instead. ------ 1.4.2 ----- * Issue #116: Correct TypeError when reading a local package index on Python 3. ------ 1.4.1 ----- @@ -1063,7 +946,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. for legacy SVN releases and support for SVN without the subprocess command would simple go away as support for the older SVNs does. ---- 1.4 --- @@ -1072,19 +954,16 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Pull Request #21: Omit unwanted newlines in ``package_index._encode_auth`` when the username/password pair length indicates wrapping. ------ 1.3.2 ----- * Issue #99: Fix filename encoding issues in SVN support. ------ 1.3.1 ----- * Remove exuberant warning in SVN support when SVN is not used. ---- 1.3 --- @@ -1095,7 +974,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. implementation if present. * Correct NameError in ``ssl_support`` module (``socket.error``). ---- 1.2 --- @@ -1108,7 +986,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Setuptools "natural" launcher support, introduced in 1.0, is now officially supported. ------ 1.1.7 ----- @@ -1119,39 +996,33 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Distribute #363 and Issue #55: Skip an sdist test that fails on locales other than UTF-8. ------ 1.1.6 ----- * Distribute #349: ``sandbox.execfile`` now opens the target file in binary mode, thus honoring a BOM in the file when compiled. ------ 1.1.5 ----- * Issue #69: Second attempt at fix (logic was reversed). ------ 1.1.4 ----- * Issue #77: Fix error in upload command (Python 2.4). ------ 1.1.3 ----- * Fix NameError in previous patch. ------ 1.1.2 ----- * Issue #69: Correct issue where 404 errors are returned for URLs with fragments in them (such as #egg=). ------ 1.1.1 ----- @@ -1159,7 +1030,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. environments where a trusted SSL connection cannot be validated. * Issue #76: Fix AttributeError in upload command with Python 2.4. ---- 1.1 --- @@ -1167,7 +1037,6 @@ process to fail and PyPI uploads no longer accept files for 13.0. condition when a host is blocked via ``--allow-hosts``. * Issue #72: Restored Python 2.4 compatibility in ``ez_setup.py``. ---- 1.0 --- @@ -1204,13 +1073,11 @@ not all users will find 1.0 a drop-in replacement for 0.9. * Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting`` options to easy_install. These options have been deprecated since 0.6a11. ------ 0.9.8 ----- * Issue #53: Fix NameErrors in `_vcs_split_rev_from_url`. ------ 0.9.7 ----- @@ -1220,79 +1087,67 @@ not all users will find 1.0 a drop-in replacement for 0.9. referenced by bookmark. * Add underscore-separated keys to environment markers (markerlib). ------ 0.9.6 ----- * Issue #44: Test failure on Python 2.4 when MD5 hash doesn't have a `.name` attribute. ------ 0.9.5 ----- * Python #17980: Fix security vulnerability in SSL certificate validation. ------ 0.9.4 ----- * Issue #43: Fix issue (introduced in 0.9.1) with version resolution when upgrading over other releases of Setuptools. ------ 0.9.3 ----- * Issue #42: Fix new ``AttributeError`` introduced in last fix. ------ 0.9.2 ----- * Issue #42: Fix regression where blank checksums would trigger an ``AttributeError``. ------ 0.9.1 ----- * Distribute #386: Allow other positional and keyword arguments to os.open. * Corrected dependency on certifi mis-referenced in 0.9. ---- 0.9 --- * `package_index` now validates hashes other than MD5 in download links. ---- 0.8 --- * Code base now runs on Python 2.4 - Python 3.3 without Python 2to3 conversion. ------ 0.7.8 ----- * Distribute #375: Yet another fix for yet another regression. ------ 0.7.7 ----- * Distribute #375: Repair AttributeError created in last release (redo). * Issue #30: Added test for get_cache_path. ------ 0.7.6 ----- * Distribute #375: Repair AttributeError created in last release. ------ 0.7.5 ----- @@ -1302,33 +1157,28 @@ not all users will find 1.0 a drop-in replacement for 0.9. ``SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT`` in addition to the now deprecated ``DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT``. ------ 0.7.4 ----- * Issue #20: Fix comparison of parsed SVN version on Python 3. ------ 0.7.3 ----- * Issue #1: Disable installation of Windows-specific files on non-Windows systems. * Use new sysconfig module with Python 2.7 or >=3.2. ------ 0.7.2 ----- * Issue #14: Use markerlib when the `parser` module is not available. * Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI. ------ 0.7.1 ----- * Fix NameError (Issue #3) again - broken in bad merge. ---- 0.7 --- @@ -1346,13 +1196,11 @@ Added several features that were slated for setuptools 0.6c12: * Added support for SSL certificate validation when installing packages from an HTTPS service. ------ 0.7b4 ----- * Issue #3: Fixed NameError in SSL support. ------- 0.6.49 ------ @@ -1360,21 +1208,18 @@ Added several features that were slated for setuptools 0.6c12: to avoid errors when the cache path does not yet exist. Fixes the error reported in Distribute #375. ------- 0.6.48 ------ * Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in 0.6.46 (redo). ------- 0.6.47 ------ * Correct AttributeError in ``ResourceManager.get_cache_path`` introduced in 0.6.46. ------- 0.6.46 ------ @@ -1382,27 +1227,23 @@ Added several features that were slated for setuptools 0.6c12: customized egg cache location specifies a directory that's group- or world-writable. ------- 0.6.45 ------ * Distribute #379: ``distribute_setup.py`` now traps VersionConflict as well, restoring ability to upgrade from an older setuptools version. ------- 0.6.44 ------ * ``distribute_setup.py`` has been updated to allow Setuptools 0.7 to satisfy use_setuptools. ------- 0.6.43 ------ * Distribute #378: Restore support for Python 2.4 Syntax (regression in 0.6.42). ------- 0.6.42 ------ @@ -1410,7 +1251,6 @@ Added several features that were slated for setuptools 0.6c12: * Distribute #337: Moved site.py to setuptools/site-patch.py (graft of very old patch from setuptools trunk which inspired PR #31). ------- 0.6.41 ------ @@ -1419,14 +1259,12 @@ Added several features that were slated for setuptools 0.6c12: * Added a new function ``easy_install.get_win_launcher`` which may be used by third-party libraries such as buildout to get a suitable script launcher. ------- 0.6.40 ------ * Distribute #376: brought back cli.exe and gui.exe that were deleted in the previous release. ------- 0.6.39 ------ @@ -1438,13 +1276,11 @@ Added several features that were slated for setuptools 0.6c12: check the contents of the file against the zip contents during each invocation of get_resource_filename. ------- 0.6.38 ------ * Distribute #371: The launcher manifest file is now installed properly. ------- 0.6.37 ------ @@ -1454,7 +1290,6 @@ Added several features that were slated for setuptools 0.6c12: in `this Microsoft article `_. ------- 0.6.36 ------ @@ -1464,7 +1299,6 @@ Added several features that were slated for setuptools 0.6c12: under Windows. Easy_install now skips all directories when processing metadata scripts. ------- 0.6.35 ------ @@ -1476,13 +1310,11 @@ how it parses version numbers. 0.6. Updated the documentation to match more closely with the version parsing as intended in setuptools 0.6. ------- 0.6.34 ------ * Distribute #341: 0.6.33 fails to build under Python 2.4. ------- 0.6.33 ------ @@ -1495,7 +1327,6 @@ how it parses version numbers. for details. * Distribute #341: Fix a ResourceWarning. ------- 0.6.32 ------ @@ -1504,7 +1335,6 @@ how it parses version numbers. * Distribute #335: Backed out `setup_requires` superceding installed requirements until regression can be addressed. ------- 0.6.31 ------ @@ -1529,14 +1359,12 @@ how it parses version numbers. would have been in had that egg been on the path when pkg_resources was first imported. ------- 0.6.30 ------ * Distribute #328: Clean up temporary directories in distribute_setup.py. * Fix fatal bug in distribute_setup.py. ------- 0.6.29 ------ @@ -1568,7 +1396,6 @@ how it parses version numbers. * `distribute_setup.py` now allows a `--download-base` argument for retrieving distribute from a specified location. ------- 0.6.28 ------ @@ -1578,7 +1405,6 @@ how it parses version numbers. * Distribute #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on Python 3.3. ------- 0.6.27 ------ @@ -1589,7 +1415,6 @@ how it parses version numbers. * Distribute #231: Don't fiddle with system python when used with buildout (bootstrap.py) ------- 0.6.26 ------ @@ -1598,7 +1423,6 @@ how it parses version numbers. installation of a source distribution; now fulfillment of setup_requires dependencies will honor the parameters passed to easy_install. ------- 0.6.25 ------ @@ -1614,13 +1438,11 @@ how it parses version numbers. 449. * Distribute #273: Legacy script launchers now install with Python2/3 support. ------- 0.6.24 ------ * Distribute #249: Added options to exclude 2to3 fixers ------- 0.6.23 ------ @@ -1636,13 +1458,11 @@ how it parses version numbers. * Distribute #227: easy_install now passes its arguments to setup.py bdist_egg * Distribute #225: Fixed a NameError on Python 2.5, 2.4 ------- 0.6.21 ------ * Distribute #225: FIxed a regression on py2.4 ------- 0.6.20 ------ @@ -1650,19 +1470,16 @@ how it parses version numbers. * Distribute #212: Fix issue where easy_instal fails on Python 3 on windows installer. * Distribute #213: Fix typo in documentation. ------- 0.6.19 ------ * Distribute #206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' ------- 0.6.18 ------ * Distribute #210: Fixed a regression introduced by Distribute #204 fix. ------- 0.6.17 ------ @@ -1675,7 +1492,6 @@ how it parses version numbers. * Distribute #205: Sandboxing doesn't preserve working_set. Leads to setup_requires problems. ------- 0.6.16 ------ @@ -1685,7 +1501,6 @@ how it parses version numbers. * Distribute #195: Cython build support. * Distribute #200: Issues with recognizing 64-bit packages on Windows. ------- 0.6.15 ------ @@ -1693,7 +1508,6 @@ how it parses version numbers. * Several issues under Python 3 has been solved. * Distribute #146: Fixed missing DLL files after easy_install of windows exe package. ------- 0.6.14 ------ @@ -1703,7 +1517,6 @@ how it parses version numbers. Thanks to David and Zooko. * Distribute #174: Fixed the edit mode when its used with setuptools itself ------- 0.6.13 ------ @@ -1712,13 +1525,11 @@ how it parses version numbers. * Distribute #163: scan index links before external links, and don't use the md5 when comparing two distributions ------- 0.6.12 ------ * Distribute #149: Fixed various failures on 2.3/2.4 ------- 0.6.11 ------ @@ -1735,7 +1546,6 @@ how it parses version numbers. * Distribute #138: cant_write_to_target error when setup_requires is used. * Distribute #147: respect the sys.dont_write_bytecode flag ------- 0.6.10 ------ @@ -1743,7 +1553,6 @@ how it parses version numbers. zc.buildout uses the exception message to get the name of the distribution. ------ 0.6.9 ----- @@ -1770,14 +1579,12 @@ how it parses version numbers. * Distribute #100: making sure there's no SandboxViolation when the setup script patches setuptools. ------ 0.6.8 ----- * Added "check_packages" in dist. (added in Setuptools 0.6c11) * Fixed the DONT_PATCH_SETUPTOOLS state. ------ 0.6.7 ----- @@ -1802,14 +1609,12 @@ how it parses version numbers. * Distribute #74: no_fake should be True by default. * Distribute #72: avoid a bootstrapping issue with easy_install -U ------ 0.6.6 ----- * Unified the bootstrap file so it works on both py2.x and py3k without 2to3 (patch by Holger Krekel) ------ 0.6.5 ----- @@ -1828,7 +1633,6 @@ how it parses version numbers. * Fixed a hole in sandboxing allowing builtin file to write outside of the sandbox. ------ 0.6.4 ----- @@ -1840,7 +1644,6 @@ how it parses version numbers. * Fixed a bootstrap bug on the use_setuptools() API. ------ 0.6.3 ----- @@ -1854,7 +1657,6 @@ bootstrapping * Fixed a bug in sorting that caused bootstrap to fail on Python 3. ------ 0.6.2 ----- @@ -1886,7 +1688,6 @@ bootstrapping * Make sure setuptools is patched when running through easy_install This closes Old Setuptools #40. ------ 0.6.1 ----- @@ -1914,7 +1715,6 @@ bootstrapping and --root or --prefix is provided, but is not in the same location. This closes Distribute #10. ---- 0.6 --- @@ -1957,7 +1757,6 @@ easy_install * Immediately close all file handles. This closes Distribute #3. ------ 0.6c9 ----- @@ -1998,7 +1797,6 @@ easy_install gracefully under Google App Engine (with an ``ImportError`` loading the C-based module, instead of getting a ``NameError``). ------ 0.6c7 ----- @@ -2009,7 +1807,6 @@ easy_install ``--root`` or ``--single-version-externally-managed``, due to the parent package not having the child package as an attribute. ------ 0.6c6 ----- @@ -2033,7 +1830,6 @@ easy_install * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in their names as packages. ------ 0.6c5 ----- @@ -2043,7 +1839,6 @@ easy_install * Fix uploaded ``bdist_wininst`` packages being described as suitable for "any" version by Python 2.5, even if a ``--target-version`` was specified. ------ 0.6c4 ----- @@ -2073,13 +1868,11 @@ easy_install listed a namespace package ``foo.bar`` without explicitly listing ``foo`` as a namespace package. ------ 0.6c3 ----- * Fixed breakages caused by Subversion 1.4's new "working copy" format ------ 0.6c2 ----- @@ -2090,7 +1883,6 @@ easy_install * Running ``setup.py develop`` on a setuptools-using project will now install setuptools if needed, instead of only downloading the egg. ------ 0.6c1 ----- @@ -2114,7 +1906,6 @@ easy_install the version was overridden on the command line that built the source distribution.) ------ 0.6b4 ----- @@ -2127,7 +1918,6 @@ easy_install * Fixed redundant warnings about missing ``README`` file(s); it should now appear only if you are actually a source distribution. ------ 0.6b3 ----- @@ -2138,7 +1928,6 @@ easy_install ``include_package_data`` and ``package_data`` are used to refer to the same files. ------ 0.6b1 ----- @@ -2146,7 +1935,6 @@ easy_install the name of a ``.py`` loader/wrapper. (Python's import machinery ignores this suffix when searching for an extension module.) ------- 0.6a11 ------ @@ -2180,13 +1968,11 @@ easy_install it. Previously, the file could be left open and the actual error would be masked by problems trying to remove the open file on Windows systems. ------- 0.6a10 ------ * Fixed the ``develop`` command ignoring ``--find-links``. ------ 0.6a9 ----- @@ -2238,7 +2024,6 @@ easy_install back into an ``.egg`` file or directory and install it as such. ------ 0.6a8 ----- @@ -2266,13 +2051,11 @@ easy_install metadata cache to pretend that the egg has valid version information, until it has a chance to make it actually be so (via the ``egg_info`` command). ------ 0.6a5 ----- * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. ------ 0.6a3 ----- @@ -2280,7 +2063,6 @@ easy_install on Windows and other platforms. (The special handling is only for Windows; other platforms are treated the same as for ``console_scripts``.) ------ 0.6a2 ----- @@ -2289,7 +2071,6 @@ easy_install scripts get an ``.exe`` wrapper so you can just type their name. On other platforms, the scripts are written without a file extension. ------ 0.6a1 ----- @@ -2335,7 +2116,6 @@ easy_install or documented, and never would have worked without EasyInstall - which it pre-dated and was never compatible with. ------- 0.5a12 ------ @@ -2343,14 +2123,12 @@ easy_install ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't handle ``-m`` on zipped modules. ------- 0.5a11 ------ * Fix breakage of the "develop" command that was caused by the addition of ``--always-unzip`` to the ``easy_install`` command. ------ 0.5a9 ----- @@ -2385,7 +2163,6 @@ easy_install * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``. ------ 0.5a8 ----- @@ -2413,7 +2190,6 @@ easy_install * Added a "setopt" command that sets a single option in a specified distutils configuration file. ------ 0.5a7 ----- @@ -2421,7 +2197,6 @@ easy_install fix for "upload" and a temporary workaround for lack of .egg support in PyPI. ------ 0.5a6 ----- @@ -2440,7 +2215,6 @@ easy_install revisions compare *lower* than the version specified in setup.py (e.g. by using ``--tag-build=dev``). ------ 0.5a5 ----- @@ -2468,7 +2242,6 @@ easy_install accordingly. ``easy_install.py`` is still installed as a script, but not as a module. ------ 0.5a4 ----- @@ -2484,7 +2257,6 @@ easy_install * Setup scripts using setuptools now always install using ``easy_install`` internally, for ease of uninstallation and upgrading. ------ 0.5a1 ----- @@ -2499,7 +2271,6 @@ easy_install from setuptools import setup # etc... ------ 0.4a2 ----- @@ -2527,7 +2298,6 @@ easy_install their ``command_consumes_arguments`` attribute to ``True`` in order to receive an ``args`` option containing the rest of the command line. ------ 0.3a2 ----- @@ -2537,8 +2307,8 @@ easy_install * Misc. bug fixes ------ 0.3a1 ----- * Initial release. + From e2f1814e0d3d8963cf3a1eb4dff6d400b58b4a52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 18:13:32 -0500 Subject: [PATCH 5468/8469] Invoke import on importlib.machinery directly. Access an attribute to force import in delayed-import environments. Fixes #487. --- CHANGES.txt | 7 +++++++ pkg_resources/__init__.py | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 06c6aad105..a6f58b2d8d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +19.4.1 +------ + +* Issue #487: Use direct invocation of ``importlib.machinery`` + in ``pkg_resources`` to avoid missing detection on relevant + platforms. + 19.4 ---- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 50b86cdbeb..3ecf4c6458 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -60,10 +60,11 @@ from os import open as os_open from os.path import isdir, split -# Avoid try/except due to potential problems with delayed import mechanisms. -if sys.version_info >= (3, 3) and sys.implementation.name == "cpython": +try: import importlib.machinery as importlib_machinery -else: + # access attribute to force import under delayed import mechanisms. + importlib_machinery.__name__ +except ImportError: importlib_machinery = None try: From dcfeab73aa5309b24c31d2d3f32073aad99ef05c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 18:37:25 -0500 Subject: [PATCH 5469/8469] Bumped to 19.4.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 59c4552914..3ee13bc90e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.5' +__version__ = '19.4.1' From 25a12d49012ef636eb5cc929163f89188b084c3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 18:37:27 -0500 Subject: [PATCH 5470/8469] Added tag 19.4.1 for changeset 0bda3291ac72 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1e7eeff0c4..f3337a205b 100644 --- a/.hgtags +++ b/.hgtags @@ -236,3 +236,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 66fa131a0d77a1b0e6f89ccb76b254cfb07d3da3 19.3b1 32bba9bf8cce8350b560a7591c9ef5884a194211 19.3 f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 +0bda3291ac725750b899b4ba3e4b6765e7645daa 19.4.1 From 9363ee420bd803f333b31466796ff00a183de66e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 18:49:52 -0500 Subject: [PATCH 5471/8469] Extract variable for candidate encodings --- setuptools/unicode_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 18903d9ef9..6eee635167 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -22,11 +22,13 @@ def filesys_decode(path): NONE when no expected encoding works """ - fs_enc = sys.getfilesystemencoding() if isinstance(path, six.text_type): return path - for enc in (fs_enc, "utf-8"): + fs_enc = sys.getfilesystemencoding() + candidates = fs_enc, 'utf-8' + + for enc in candidates: try: return path.decode(enc) except UnicodeDecodeError: From 3d018c03405ecb21dfb717311f176c6586df343a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 19:02:08 -0500 Subject: [PATCH 5472/8469] Add test capturing failure. Ref #486. --- setuptools/tests/test_unicode_utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 setuptools/tests/test_unicode_utils.py diff --git a/setuptools/tests/test_unicode_utils.py b/setuptools/tests/test_unicode_utils.py new file mode 100644 index 0000000000..a24a9bd530 --- /dev/null +++ b/setuptools/tests/test_unicode_utils.py @@ -0,0 +1,10 @@ +from setuptools import unicode_utils + + +def test_filesys_decode_fs_encoding_is_None(monkeypatch): + """ + Test filesys_decode does not raise TypeError when + getfilesystemencoding returns None. + """ + monkeypatch.setattr('sys.getfilesystemencoding', lambda: None) + unicode_utils.filesys_decode(b'test') From 3223234b137e9766a6f4e892a3369b13f57f878b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 19:08:57 -0500 Subject: [PATCH 5473/8469] Avoid TypeError when getfilesystemencoding returns None. Fixes #486. --- CHANGES.txt | 6 ++++++ setuptools/unicode_utils.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c7f68ab449..11298b57d8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +19.4.2 +------ + +* Issue #486: Correct TypeError when getfilesystemencoding + returns None. + 19.4.1 ------ diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 6eee635167..ffab3e24ac 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -25,7 +25,7 @@ def filesys_decode(path): if isinstance(path, six.text_type): return path - fs_enc = sys.getfilesystemencoding() + fs_enc = sys.getfilesystemencoding() or 'utf-8' candidates = fs_enc, 'utf-8' for enc in candidates: From d0bd7a5612088e5da516c0b183c2b8a04a0e5306 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 20:57:04 -0500 Subject: [PATCH 5474/8469] Relicense the package as MIT license. Drop licensing as PSF and Zope as neither of those licenses grant authority for use outside their respective projects. Vendored projects are licensed under their respective licenses, currently MIT for six and Apache v2 for packaging. Fixes #132. --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index dfb578a152..c7cd364bcc 100755 --- a/setup.py +++ b/setup.py @@ -75,7 +75,6 @@ def _gen_console_scripts(): "Python packages", author="Python Packaging Authority", author_email="distutils-sig@python.org", - license="PSF or ZPL", long_description=long_description, keywords="CPAN PyPI distutils eggs package management", url="https://bitbucket.org/pypa/setuptools", @@ -134,8 +133,7 @@ def _gen_console_scripts(): classifiers=textwrap.dedent(""" Development Status :: 5 - Production/Stable Intended Audience :: Developers - License :: OSI Approved :: Python Software Foundation License - License :: OSI Approved :: Zope Public License + License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 From 589a2c0c319ba39ebcce7a64c36dc11aefd0ebc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 21:01:32 -0500 Subject: [PATCH 5475/8469] Update changelog. --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 11298b57d8..8177e5bf12 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ CHANGES * Issue #486: Correct TypeError when getfilesystemencoding returns None. +* Issue #139: Clarified the license as MIT. 19.4.1 ------ From 5505c6a063f59d0025103a392be1efd067dc1781 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 21:26:06 -0500 Subject: [PATCH 5476/8469] Update changelog --- CHANGES.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8177e5bf12..0fbfc26d2d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,14 @@ CHANGES ======= -19.4.2 ------- +19.5 +---- * Issue #486: Correct TypeError when getfilesystemencoding returns None. * Issue #139: Clarified the license as MIT. +* Pull Request #169: Removed special handling of command + spec in scripts for Jython. 19.4.1 ------ From 520cf79afe622d6537c2f036f686350eb6722f04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 21:26:24 -0500 Subject: [PATCH 5477/8469] Bumped to 19.5 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 3ee13bc90e..59c4552914 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.4.1' +__version__ = '19.5' From d7b2598ff6d4709ec56be71ca80533ccb31a90ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 21:26:26 -0500 Subject: [PATCH 5478/8469] Added tag 19.5 for changeset 0a68cbab7258 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f3337a205b..dac6f5e3ae 100644 --- a/.hgtags +++ b/.hgtags @@ -237,3 +237,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 32bba9bf8cce8350b560a7591c9ef5884a194211 19.3 f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 0bda3291ac725750b899b4ba3e4b6765e7645daa 19.4.1 +0a68cbab72580a6f8d3bf9c45206669eefcd256b 19.5 From 3b7b733ca9f2e3193426682ae6357b3f29307aa2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2016 21:28:03 -0500 Subject: [PATCH 5479/8469] Bumped to 19.6 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 59c4552914..74a70a41fe 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.5' +__version__ = '19.6' From e7f9dab06dc2515fe11e7f31ea948eed5e141470 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Jan 2016 10:07:40 -0500 Subject: [PATCH 5480/8469] Add 'launch' hook, based on pip.utils.setuptools_build --- CHANGES.txt | 15 +++++++++++++++ setuptools/launch.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 setuptools/launch.py diff --git a/CHANGES.txt b/CHANGES.txt index 0fbfc26d2d..c82ec5a510 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,21 @@ CHANGES ======= +19.6 +---- + +* Added a new entry script ``setuptools.launch``, + implementing the shim found in + ``pip.util.setuptools_build``. Use this command to launch + distutils-only packages under setuptools in the same way that + pip does, causing the setuptools monkeypatching of distutils + to be invoked prior to invoking a script. Useful for debugging + or otherwise installing a distutils-only package under + setuptools when pip isn't available or otherwise does not + expose the desired functionality. For example:: + + $ python -m setuptools.launch setup.py develop + 19.5 ---- diff --git a/setuptools/launch.py b/setuptools/launch.py new file mode 100644 index 0000000000..68cce68112 --- /dev/null +++ b/setuptools/launch.py @@ -0,0 +1,28 @@ +""" +Launch the Python script on the command line after +setuptools is bootstrapped via import. +""" + +# Note that setuptools gets imported implicitly by the +# invocation of this script using python -m setuptools.launch + +import tokenize +import sys + + +def load(): + """ + Load the script in sys.argv[1] and run it as if it had + been invoked naturally. + """ + globals()['__file__'] = sys.argv[1] + sys.argv[:] = sys.argv[1:] + + open_ = getattr(tokenize, 'open', open) + script = open_(__file__).read() + norm_script = script.replace('\\r\\n', '\\n') + return compile(norm_script, __file__, 'exec') + + +if __name__ == '__main__': + exec(load()) From 57d450a4e0485c8c9db04a5b6d02615c3798f418 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Jan 2016 11:49:11 -0500 Subject: [PATCH 5481/8469] Also hide Cython when hiding setuptools, as setuptools will have imported Cython and Cython references the distutils.Extension. Fixes #488. --- CHANGES.txt | 3 +++ setuptools/sandbox.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index c82ec5a510..28d2ef630a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,9 @@ CHANGES expose the desired functionality. For example:: $ python -m setuptools.launch setup.py develop +* Issue #488: Fix dual manifestation of Extension class in + extension packages installed as dependencies when Cython + is present. 19.5 ---- diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 668bcac72c..23e296b18b 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -207,8 +207,12 @@ def _needs_hiding(mod_name): True >>> _needs_hiding('distutils') True + >>> _needs_hiding('os') + False + >>> _needs_hiding('Cython') + True """ - pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)') + pattern = re.compile('(setuptools|pkg_resources|distutils|Cython)(\.|$)') return bool(pattern.match(mod_name)) From 41b2ead9e312dbf88f86121c5eab1736972b352b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Jan 2016 12:04:35 -0500 Subject: [PATCH 5482/8469] Added tag 19.6b1 for changeset 34121bf49b1a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dac6f5e3ae..d6741a605f 100644 --- a/.hgtags +++ b/.hgtags @@ -238,3 +238,4 @@ cc41477ecf92f221c113736fac2830bf8079d40c 19.0 f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 0bda3291ac725750b899b4ba3e4b6765e7645daa 19.4.1 0a68cbab72580a6f8d3bf9c45206669eefcd256b 19.5 +34121bf49b1a7ac77da7f7c75105c8a920218dd7 19.6b1 From c697d2a55a6c52564e1de9e066ebefacb15de4af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Jan 2016 19:52:16 -0500 Subject: [PATCH 5483/8469] Added tag 19.6 for changeset 3c2332e4ec72 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d6741a605f..4f9c3a8f2e 100644 --- a/.hgtags +++ b/.hgtags @@ -239,3 +239,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 0bda3291ac725750b899b4ba3e4b6765e7645daa 19.4.1 0a68cbab72580a6f8d3bf9c45206669eefcd256b 19.5 34121bf49b1a7ac77da7f7c75105c8a920218dd7 19.6b1 +3c2332e4ec72717bf17321473e5c3ad6e5778903 19.6 From bdd0e2d6a9bc38ae1c8b035364b7b23da0845233 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Jan 2016 19:53:32 -0500 Subject: [PATCH 5484/8469] Bumped to 19.7 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 74a70a41fe..2e0bba8709 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.6' +__version__ = '19.7' From 634b0aefca69d135dd5226a44fac4c44a47c328d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jan 2016 21:15:02 -0500 Subject: [PATCH 5485/8469] Rather than re-use globals of setuptools.launch, build a unique namespace in which to launch the script. Prevents imports from occuring relative to 'setuptools' on Python 2. Ref #490. --- setuptools/launch.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/setuptools/launch.py b/setuptools/launch.py index 68cce68112..06e15e1e6e 100644 --- a/setuptools/launch.py +++ b/setuptools/launch.py @@ -10,19 +10,26 @@ import sys -def load(): +def run(): """ - Load the script in sys.argv[1] and run it as if it had + Run the script in sys.argv[1] as if it had been invoked naturally. """ - globals()['__file__'] = sys.argv[1] + __builtins__ + script_name = sys.argv[1] + namespace = dict( + __file__ = script_name, + __name__ = '__main__', + __doc__ = None, + ) sys.argv[:] = sys.argv[1:] open_ = getattr(tokenize, 'open', open) - script = open_(__file__).read() + script = open_(script_name).read() norm_script = script.replace('\\r\\n', '\\n') - return compile(norm_script, __file__, 'exec') + code = compile(norm_script, script_name, 'exec') + exec(code, namespace) if __name__ == '__main__': - exec(load()) + run() From e01792ec62653b00b6d1c25e1ca0d10d22c1b6b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Jan 2016 14:30:34 -0500 Subject: [PATCH 5486/8469] Combine redundant imports of future functionality --- pkg_resources/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3ecf4c6458..2ba5ca4201 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -46,7 +46,7 @@ import imp as _imp from pkg_resources.extern import six -from pkg_resources.extern.six.moves import urllib, map +from pkg_resources.extern.six.moves import urllib, map, filter # capture these to bypass sandboxing from os import utime @@ -77,9 +77,6 @@ __import__('pkg_resources.extern.packaging.specifiers') -filter = six.moves.filter -map = six.moves.map - if (3, 0) < sys.version_info < (3, 3): msg = ( "Support for Python 3.0-3.2 has been dropped. Future versions " From 397d759e48bc93597c535c2335c9da37178721a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Jan 2016 14:34:31 -0500 Subject: [PATCH 5487/8469] Pull up DefaultProvider registration into a classmethod. --- pkg_resources/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2ba5ca4201..b4f910c621 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1725,10 +1725,14 @@ def _get(self, path): with open(path, 'rb') as stream: return stream.read() -register_loader_type(type(None), DefaultProvider) + @classmethod + def _register(cls): + register_loader_type(type(None), cls) -if importlib_machinery is not None: - register_loader_type(importlib_machinery.SourceFileLoader, DefaultProvider) + if importlib_machinery is not None: + register_loader_type(importlib_machinery.SourceFileLoader, cls) + +DefaultProvider._register() class EmptyProvider(NullProvider): From 66b3a623dd256def923ddde303b8c95592d0223b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Jan 2016 14:42:03 -0500 Subject: [PATCH 5488/8469] Adapt resolution of classes from importlib.machinery. Restores compatibility for PyPy3 where importlib.machinery exists but FileFinder and SourceFileLoader aren't implemented. --- pkg_resources/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b4f910c621..f15becbbcb 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1727,10 +1727,9 @@ def _get(self, path): @classmethod def _register(cls): - register_loader_type(type(None), cls) - - if importlib_machinery is not None: - register_loader_type(importlib_machinery.SourceFileLoader, cls) + loader_cls = getattr(importlib_machinery, 'SourceFileLoader', + type(None)) + register_loader_type(loader_cls, cls) DefaultProvider._register() @@ -2138,7 +2137,7 @@ def find_on_path(importer, path_item, only=False): break register_finder(pkgutil.ImpImporter, find_on_path) -if importlib_machinery is not None: +if hasattr(importlib_machinery, 'FileFinder'): register_finder(importlib_machinery.FileFinder, find_on_path) _declare_state('dict', _namespace_handlers={}) @@ -2255,7 +2254,7 @@ def file_ns_handler(importer, path_item, packageName, module): register_namespace_handler(pkgutil.ImpImporter, file_ns_handler) register_namespace_handler(zipimport.zipimporter, file_ns_handler) -if importlib_machinery is not None: +if hasattr(importlib_machinery, 'FileFinder'): register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler) From 8a3d7feb9b044c9a51664eb3a91677240ed9ccf6 Mon Sep 17 00:00:00 2001 From: Matt Iversen Date: Fri, 29 Jan 2016 00:45:29 +1100 Subject: [PATCH 5489/8469] Test on pypy3 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 54d9c395bc..6304d5e7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ python: - 3.4 - 3.5 - pypy + - pypy3 env: - "" - LC_ALL=C LC_CTYPE=C From e2081731f4c41a1461c76c262ed020321c71549b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jan 2016 10:00:04 -0500 Subject: [PATCH 5490/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 28d2ef630a..90ae01a9ac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +19.6.1 +------ + +* Restore compatibility for PyPy 3 compatibility lost in + 19.4.1 addressing Issue #487. +* ``setuptools.launch`` shim now loads scripts in a new + namespace, avoiding getting relative imports from + the setuptools package on Python 2. + 19.6 ---- @@ -16,6 +25,7 @@ CHANGES expose the desired functionality. For example:: $ python -m setuptools.launch setup.py develop + * Issue #488: Fix dual manifestation of Extension class in extension packages installed as dependencies when Cython is present. From d6df1b3444cb487484ff8202cff121b147c0e1d5 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Fri, 29 Jan 2016 05:13:36 +1100 Subject: [PATCH 5491/8469] Allow failures with pypy3 for now --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6304d5e7f1..ae14639aeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,9 @@ python: - 3.5 - pypy - pypy3 +matrix: + allow_failures: + - python: pypy3 env: - "" - LC_ALL=C LC_CTYPE=C From 7b4bb264a3f44b18db85d623e23451379518e12a Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Fri, 29 Jan 2016 05:15:41 +1100 Subject: [PATCH 5492/8469] Bumped to 19.6.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 2e0bba8709..41300aee69 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.7' +__version__ = '19.6.1' From 0ed59a4c02f32cd23699b95cc3c38775a19f7840 Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Fri, 29 Jan 2016 05:16:00 +1100 Subject: [PATCH 5493/8469] Added tag 19.6.1 for changeset 35d9179d0439 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4f9c3a8f2e..2fd2cd338a 100644 --- a/.hgtags +++ b/.hgtags @@ -240,3 +240,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 0a68cbab72580a6f8d3bf9c45206669eefcd256b 19.5 34121bf49b1a7ac77da7f7c75105c8a920218dd7 19.6b1 3c2332e4ec72717bf17321473e5c3ad6e5778903 19.6 +35d9179d04390aada66eceae9ceb7b9274f67646 19.6.1 From eca386ea886913f115a4a4456702a838515a7e7e Mon Sep 17 00:00:00 2001 From: Matthew Iversen Date: Fri, 29 Jan 2016 05:19:57 +1100 Subject: [PATCH 5494/8469] Bumped to 19.6.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 41300aee69..89a23e8bfc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.6.1' +__version__ = '19.6.2' From d16b24ef68298295224f078c96fcbf732aa0dacc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:24:04 -0500 Subject: [PATCH 5495/8469] Extract function _rebuild_mod_path --- pkg_resources/__init__.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f15becbbcb..3398a56b48 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2183,18 +2183,24 @@ def _handle_ns(packageName, path_item): path = module.__path__ path.append(subpath) loader.load_module(packageName) + _rebuild_mod_path(path, packageName, module) + return subpath - # Rebuild mod.__path__ ensuring that all entries are ordered - # corresponding to their sys.path order - sys_path= [(p and _normalize_cached(p) or p) for p in sys.path] - def sort_key(p): - parts = p.split(os.sep) - parts = parts[:-(packageName.count('.') + 1)] - return sys_path.index(_normalize_cached(os.sep.join(parts))) - path.sort(key=sort_key) - module.__path__[:] = [_normalize_cached(p) for p in path] - return subpath +def _rebuild_mod_path(orig_path, package_name, module): + """ + Rebuild module.__path__ ensuring that all entries are ordered + corresponding to their sys.path order + """ + sys_path= [(p and _normalize_cached(p) or p) for p in sys.path] + def sort_key(p): + parts = p.split(os.sep) + parts = parts[:-(package_name.count('.') + 1)] + return sys_path.index(_normalize_cached(os.sep.join(parts))) + + orig_path.sort(key=sort_key) + module.__path__[:] = [_normalize_cached(p) for p in orig_path] + def declare_namespace(packageName): """Declare that package 'packageName' is a namespace package""" From c8a0d2d70aedf13382c6e0a506c04d449851ec45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:28:06 -0500 Subject: [PATCH 5496/8469] Rename inner function and add docstring --- pkg_resources/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3398a56b48..7065806234 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2192,13 +2192,16 @@ def _rebuild_mod_path(orig_path, package_name, module): Rebuild module.__path__ ensuring that all entries are ordered corresponding to their sys.path order """ - sys_path= [(p and _normalize_cached(p) or p) for p in sys.path] - def sort_key(p): + sys_path = [(p and _normalize_cached(p) or p) for p in sys.path] + def position_in_sys_path(p): + """ + Return the ordinal of the path based on its position in sys.path + """ parts = p.split(os.sep) parts = parts[:-(package_name.count('.') + 1)] return sys_path.index(_normalize_cached(os.sep.join(parts))) - orig_path.sort(key=sort_key) + orig_path.sort(key=position_in_sys_path) module.__path__[:] = [_normalize_cached(p) for p in orig_path] From 94e1f4c266b7fdde993c5fde05f87dcc0afd186e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:46:53 -0500 Subject: [PATCH 5497/8469] Normalize all paths, not excluding ''. Fixes #491. --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7065806234..7ba23bf588 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2192,7 +2192,7 @@ def _rebuild_mod_path(orig_path, package_name, module): Rebuild module.__path__ ensuring that all entries are ordered corresponding to their sys.path order """ - sys_path = [(p and _normalize_cached(p) or p) for p in sys.path] + sys_path = [_normalize_cached(p) for p in sys.path] def position_in_sys_path(p): """ Return the ordinal of the path based on its position in sys.path From 584a30b2a7dd601ee46ff9746d9084e3a223ecc8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:50:26 -0500 Subject: [PATCH 5498/8469] Update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 90ae01a9ac..a158997401 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +19.6.2 +------ + +* Issue #491: Correct regression incurred in 19.4 where + a double-namespace package installed using pip would + cause a TypeError. + 19.6.1 ------ From 15d072b8ff76fa2c1e0895041a3ba736d0db048e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:50:55 -0500 Subject: [PATCH 5499/8469] Added tag 19.6.2 for changeset d2782cbb2f15 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2fd2cd338a..11c9451561 100644 --- a/.hgtags +++ b/.hgtags @@ -241,3 +241,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 34121bf49b1a7ac77da7f7c75105c8a920218dd7 19.6b1 3c2332e4ec72717bf17321473e5c3ad6e5778903 19.6 35d9179d04390aada66eceae9ceb7b9274f67646 19.6.1 +d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 From 783fe0bbcec577fcca5f5fbc247c2b0b86697721 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 04:52:13 -0500 Subject: [PATCH 5500/8469] Bumped to 19.6.3 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 89a23e8bfc..9228cbfb87 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.6.2' +__version__ = '19.6.3' From 0dcee791dfdcfacddaaec79b29f30a347a147413 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 21:35:13 -0500 Subject: [PATCH 5501/8469] Extract variable for template string --- pkg_resources/__init__.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7ba23bf588..4fdc5f91c5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1174,22 +1174,23 @@ def extraction_error(self): old_exc = sys.exc_info()[1] cache_path = self.extraction_path or get_default_cache() - err = ExtractionError("""Can't extract file(s) to egg cache + tmpl = textwrap.dedent(""" + Can't extract file(s) to egg cache -The following error occurred while trying to extract file(s) to the Python egg -cache: + The following error occurred while trying to extract file(s) to the Python egg + cache: - %s + %s -The Python egg cache directory is currently set to: + The Python egg cache directory is currently set to: - %s + %s -Perhaps your account does not have write access to this directory? You can -change the cache directory by setting the PYTHON_EGG_CACHE environment -variable to point to an accessible directory. -""" % (old_exc, cache_path) - ) + Perhaps your account does not have write access to this directory? You can + change the cache directory by setting the PYTHON_EGG_CACHE environment + variable to point to an accessible directory. + """).lstrip() + err = ExtractionError(tmpl % (old_exc, cache_path)) err.manager = self err.cache_path = cache_path err.original_error = old_exc From f9bd9b9f5df54ef5a0bf8d16c3a889ab8c640580 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jan 2016 21:36:23 -0500 Subject: [PATCH 5502/8469] Use new style string formatting --- pkg_resources/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4fdc5f91c5..d04cd347d4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1180,17 +1180,17 @@ def extraction_error(self): The following error occurred while trying to extract file(s) to the Python egg cache: - %s + {old_exc} The Python egg cache directory is currently set to: - %s + {cache_path} Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. """).lstrip() - err = ExtractionError(tmpl % (old_exc, cache_path)) + err = ExtractionError(tmpl.format(**locals())) err.manager = self err.cache_path = cache_path err.original_error = old_exc From 3ae46c30225eb46e1f5aada1a19e88b79f04dc72 Mon Sep 17 00:00:00 2001 From: Julien Cigar Date: Wed, 3 Feb 2016 10:25:07 +0100 Subject: [PATCH 5503/8469] FreeBSD: Add root certificate from ca_root_nss. On FreeBSD root certificates from certificate authorities included in the Mozilla NSS library are provided by the ca_root_nss package: jcigar@frodon:~/ > pkg info -l ca_root_nss-3.21 ca_root_nss-3.21: /usr/local/etc/ssl/cert.pem.sample /usr/local/openssl/cert.pem.sample /usr/local/share/certs/ca-root-nss.crt /usr/local/share/licenses/ca_root_nss-3.21/LICENSE /usr/local/share/licenses/ca_root_nss-3.21/MPL /usr/local/share/licenses/ca_root_nss-3.21/catalog.mk On some machines there is no symbolic link (/etc/ssl/cert.pem) installed --- setuptools/ssl_support.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 511d2fa8cd..657197cfb1 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -25,6 +25,7 @@ /usr/local/share/certs/ca-root.crt /etc/ssl/cert.pem /System/Library/OpenSSL/certs/cert.pem +/usr/local/share/certs/ca-root-nss.crt """.strip().split() From 725bf101f83f4a8f1bd3e11704664481d102775d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 08:20:09 -0500 Subject: [PATCH 5504/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a158997401..50f1f8f1aa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +19.7 +---- + +* `Off-project PR `_: + For FreeBSD, also honor root certificates from ca_root_nss. + 19.6.2 ------ From 9221fdd1e7f04d257d5cf8af98e8f94bd73a4fec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 08:20:24 -0500 Subject: [PATCH 5505/8469] Bumped to 19.7 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 9228cbfb87..2e0bba8709 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.6.3' +__version__ = '19.7' From 0b07812cf5aeb88602502e8338cfbc660bc94ffe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 08:20:28 -0500 Subject: [PATCH 5506/8469] Added tag 19.7 for changeset c6e619ce910d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 11c9451561..0fa346ab48 100644 --- a/.hgtags +++ b/.hgtags @@ -242,3 +242,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 3c2332e4ec72717bf17321473e5c3ad6e5778903 19.6 35d9179d04390aada66eceae9ceb7b9274f67646 19.6.1 d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 +c6e619ce910d1650cc2433f94e5594964085f973 19.7 From 53bef9f89286363756bc8efbbba243486897969a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 08:22:13 -0500 Subject: [PATCH 5507/8469] Bumped to 19.8 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 2e0bba8709..5d04285101 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.7' +__version__ = '19.8' From e3d7334022838f8153a06b0105c6b8f4a32762a2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 09:02:34 -0500 Subject: [PATCH 5508/8469] Rewrite setup/teardown methods as pytest fixtures, encapsulating concepts for clarity. Incidentally, this also fixes #231. --- pkg_resources/tests/test_resources.py | 94 +++++++++++++++------------ 1 file changed, 52 insertions(+), 42 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 6f68bf7763..49acd03693 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -610,35 +610,41 @@ def testVersionHashable(self): class TestNamespaces: - def setup_method(self, method): - self._ns_pkgs = pkg_resources._namespace_packages.copy() - - # Further, test case where the temp dir is a symlink, where applicable - # See #231 - if hasattr(os, 'symlink'): - real_tmpdir = tempfile.mkdtemp(prefix="real-tests-setuptools-") - tmpdir_base, tmpdir_name = os.path.split(real_tmpdir) - tmpdir = os.path.join(tmpdir_base, tmpdir_name[5:]) - os.symlink(real_tmpdir, tmpdir) - self._real_tmpdir = real_tmpdir - self._tmpdir = tmpdir - else: - tmpdir = tempfile.mkdtemp(prefix="tests-setuptools-") - self._real_tmpdir = self._tmpdir = tmpdir - - os.makedirs(os.path.join(self._tmpdir, "site-pkgs")) - self._prev_sys_path = sys.path[:] - sys.path.append(os.path.join(self._tmpdir, "site-pkgs")) - - def teardown_method(self, method): - shutil.rmtree(self._real_tmpdir) - if os.path.islink(self._tmpdir): - os.unlink(self._tmpdir) - - pkg_resources._namespace_packages = self._ns_pkgs.copy() - sys.path = self._prev_sys_path[:] - - def test_two_levels_deep(self): + @pytest.yield_fixture + def symlinked_tmpdir(self, tmpdir): + """ + Where available, return the tempdir as a symlink, + which as revealed in #231 is more fragile than + a natural tempdir. + """ + if not hasattr(os, 'symlink'): + return str(tmpdir) + + link_name = str(tmpdir) + '-linked' + os.symlink(str(tmpdir), link_name) + try: + yield type(tmpdir)(link_name) + finally: + os.unlink(link_name) + + @pytest.yield_fixture(autouse=True) + def patched_path(self, tmpdir): + """ + Patch sys.path to include the 'site-pkgs' dir. Also + restore pkg_resources._namespace_packages to its + former state. + """ + saved_ns_pkgs = pkg_resources._namespace_packages.copy() + saved_sys_path = sys.path[:] + site_pkgs = tmpdir.mkdir('site-pkgs') + sys.path.append(str(site_pkgs)) + try: + yield + finally: + pkg_resources._namespace_packages = saved_ns_pkgs + sys.path = saved_sys_path + + def test_two_levels_deep(self, symlinked_tmpdir): """ Test nested namespace packages Create namespace packages in the following tree : @@ -647,16 +653,18 @@ def test_two_levels_deep(self): Check both are in the _namespace_packages dict and that their __path__ is correct """ - sys.path.append(os.path.join(self._tmpdir, "site-pkgs2")) - os.makedirs(os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2")) - os.makedirs(os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2")) + real_tmpdir = str(symlinked_tmpdir.realpath()) + tmpdir = str(symlinked_tmpdir) + sys.path.append(os.path.join(tmpdir, "site-pkgs2")) + os.makedirs(os.path.join(tmpdir, "site-pkgs", "pkg1", "pkg2")) + os.makedirs(os.path.join(tmpdir, "site-pkgs2", "pkg1", "pkg2")) ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" for site in ["site-pkgs", "site-pkgs2"]: - pkg1_init = open(os.path.join(self._tmpdir, site, + pkg1_init = open(os.path.join(tmpdir, site, "pkg1", "__init__.py"), "w") pkg1_init.write(ns_str) pkg1_init.close() - pkg2_init = open(os.path.join(self._tmpdir, site, + pkg2_init = open(os.path.join(tmpdir, site, "pkg1", "pkg2", "__init__.py"), "w") pkg2_init.write(ns_str) pkg2_init.close() @@ -669,12 +677,12 @@ def test_two_levels_deep(self): assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"] # check the __path__ attribute contains both paths expected = [ - os.path.join(self._real_tmpdir, "site-pkgs", "pkg1", "pkg2"), - os.path.join(self._real_tmpdir, "site-pkgs2", "pkg1", "pkg2"), + os.path.join(real_tmpdir, "site-pkgs", "pkg1", "pkg2"), + os.path.join(real_tmpdir, "site-pkgs2", "pkg1", "pkg2"), ] assert pkg1.pkg2.__path__ == expected - def test_path_order(self): + def test_path_order(self, symlinked_tmpdir): """ Test that if multiple versions of the same namespace package subpackage are on different sys.path entries, that only the one earliest on @@ -684,6 +692,8 @@ def test_path_order(self): Regression test for https://bitbucket.org/pypa/setuptools/issues/207 """ + real_tmpdir = str(symlinked_tmpdir.realpath()) + tmpdir = str(symlinked_tmpdir) site_pkgs = ["site-pkgs", "site-pkgs2", "site-pkgs3"] ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" @@ -691,19 +701,19 @@ def test_path_order(self): for idx, site in enumerate(site_pkgs): if idx > 0: - sys.path.append(os.path.join(self._tmpdir, site)) - os.makedirs(os.path.join(self._tmpdir, site, "nspkg", "subpkg")) - with open(os.path.join(self._tmpdir, site, "nspkg", + sys.path.append(os.path.join(tmpdir, site)) + os.makedirs(os.path.join(tmpdir, site, "nspkg", "subpkg")) + with open(os.path.join(tmpdir, site, "nspkg", "__init__.py"), "w") as f: f.write(ns_str) - with open(os.path.join(self._tmpdir, site, "nspkg", "subpkg", + with open(os.path.join(tmpdir, site, "nspkg", "subpkg", "__init__.py"), "w") as f: f.write(vers_str % (idx + 1)) import nspkg.subpkg import nspkg - assert nspkg.__path__ == [os.path.join(self._real_tmpdir, site, + assert nspkg.__path__ == [os.path.join(real_tmpdir, site, "nspkg") for site in site_pkgs] assert nspkg.subpkg.__version__ == 1 From 397879392e928a873953bddd978dd87292211e62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:06:00 -0500 Subject: [PATCH 5509/8469] Use py.path objects for cleaner setup --- pkg_resources/tests/test_resources.py | 28 ++++++++++++--------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 49acd03693..00f0307d3e 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -653,21 +653,17 @@ def test_two_levels_deep(self, symlinked_tmpdir): Check both are in the _namespace_packages dict and that their __path__ is correct """ - real_tmpdir = str(symlinked_tmpdir.realpath()) - tmpdir = str(symlinked_tmpdir) - sys.path.append(os.path.join(tmpdir, "site-pkgs2")) - os.makedirs(os.path.join(tmpdir, "site-pkgs", "pkg1", "pkg2")) - os.makedirs(os.path.join(tmpdir, "site-pkgs2", "pkg1", "pkg2")) + real_tmpdir = symlinked_tmpdir.realpath() + tmpdir = symlinked_tmpdir + sys.path.append(str(tmpdir / 'site-pkgs2')) + site_dirs = tmpdir / 'site-pkgs', tmpdir / 'site-pkgs2' ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" - for site in ["site-pkgs", "site-pkgs2"]: - pkg1_init = open(os.path.join(tmpdir, site, - "pkg1", "__init__.py"), "w") - pkg1_init.write(ns_str) - pkg1_init.close() - pkg2_init = open(os.path.join(tmpdir, site, - "pkg1", "pkg2", "__init__.py"), "w") - pkg2_init.write(ns_str) - pkg2_init.close() + for site in site_dirs: + pkg1 = site / 'pkg1' + pkg2 = pkg1 / 'pkg2' + pkg2.ensure_dir() + (pkg1 / '__init__.py').write_text(ns_str, encoding='utf-8') + (pkg2 / '__init__.py').write_text(ns_str, encoding='utf-8') import pkg1 assert "pkg1" in pkg_resources._namespace_packages # attempt to import pkg2 from site-pkgs2 @@ -677,8 +673,8 @@ def test_two_levels_deep(self, symlinked_tmpdir): assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"] # check the __path__ attribute contains both paths expected = [ - os.path.join(real_tmpdir, "site-pkgs", "pkg1", "pkg2"), - os.path.join(real_tmpdir, "site-pkgs2", "pkg1", "pkg2"), + str(real_tmpdir / "site-pkgs" / "pkg1" / "pkg2"), + str(real_tmpdir / "site-pkgs2" / "pkg1" / "pkg2"), ] assert pkg1.pkg2.__path__ == expected From 656a5f3b9c4f289c28e2810ce10ca71b571d6a2c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:13:36 -0500 Subject: [PATCH 5510/8469] Extract variable for readability --- pkg_resources/tests/test_resources.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 00f0307d3e..c6ab6d0e67 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -709,7 +709,9 @@ def test_path_order(self, symlinked_tmpdir): import nspkg.subpkg import nspkg - assert nspkg.__path__ == [os.path.join(real_tmpdir, site, - "nspkg") - for site in site_pkgs] + expected = [ + os.path.join(real_tmpdir, site, "nspkg") + for site in site_pkgs + ] + assert nspkg.__path__ == expected assert nspkg.subpkg.__version__ == 1 From 3ff6789b02e2543cb352c8c9f89ceda5c61ca74e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:16:32 -0500 Subject: [PATCH 5511/8469] Use py.path objects for cleaner setup --- pkg_resources/tests/test_resources.py | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index c6ab6d0e67..553eecb4b8 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -688,30 +688,30 @@ def test_path_order(self, symlinked_tmpdir): Regression test for https://bitbucket.org/pypa/setuptools/issues/207 """ - real_tmpdir = str(symlinked_tmpdir.realpath()) - tmpdir = str(symlinked_tmpdir) - site_pkgs = ["site-pkgs", "site-pkgs2", "site-pkgs3"] + tmpdir = symlinked_tmpdir + site_dirs = ( + tmpdir / "site-pkgs", + tmpdir / "site-pkgs2", + tmpdir / "site-pkgs3", + ) ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" vers_str = "__version__ = %r" - for idx, site in enumerate(site_pkgs): + for idx, site in enumerate(site_dirs): if idx > 0: - sys.path.append(os.path.join(tmpdir, site)) - os.makedirs(os.path.join(tmpdir, site, "nspkg", "subpkg")) - with open(os.path.join(tmpdir, site, "nspkg", - "__init__.py"), "w") as f: - f.write(ns_str) - - with open(os.path.join(tmpdir, site, "nspkg", "subpkg", - "__init__.py"), "w") as f: - f.write(vers_str % (idx + 1)) + sys.path.append(str(site)) + nspkg = site / 'nspkg' + subpkg = nspkg / 'subpkg' + subpkg.ensure_dir() + (nspkg / '__init__.py').write_text(ns_str, encoding='utf-8') + (subpkg / '__init__.py').write_text(vers_str % (idx + 1), encoding='utf-8') import nspkg.subpkg import nspkg expected = [ - os.path.join(real_tmpdir, site, "nspkg") - for site in site_pkgs + str(site.realpath() / 'nspkg') + for site in site_dirs ] assert nspkg.__path__ == expected assert nspkg.subpkg.__version__ == 1 From a9a38182f64da197bd52efdf3c63d68448c80942 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:17:48 -0500 Subject: [PATCH 5512/8469] Use consistent numbering for clarity. --- pkg_resources/tests/test_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 553eecb4b8..5b3ba5463b 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -698,14 +698,14 @@ def test_path_order(self, symlinked_tmpdir): ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" vers_str = "__version__ = %r" - for idx, site in enumerate(site_dirs): - if idx > 0: + for number, site in enumerate(site_dirs, 1): + if number > 1: sys.path.append(str(site)) nspkg = site / 'nspkg' subpkg = nspkg / 'subpkg' subpkg.ensure_dir() (nspkg / '__init__.py').write_text(ns_str, encoding='utf-8') - (subpkg / '__init__.py').write_text(vers_str % (idx + 1), encoding='utf-8') + (subpkg / '__init__.py').write_text(vers_str % number, encoding='utf-8') import nspkg.subpkg import nspkg From 20413e816e9c0809c97598b0a758120be6460f90 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:20:29 -0500 Subject: [PATCH 5513/8469] Extract ns_str as class attribute --- pkg_resources/tests/test_resources.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 5b3ba5463b..e25fbc780f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -610,6 +610,8 @@ def testVersionHashable(self): class TestNamespaces: + ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" + @pytest.yield_fixture def symlinked_tmpdir(self, tmpdir): """ @@ -657,13 +659,12 @@ def test_two_levels_deep(self, symlinked_tmpdir): tmpdir = symlinked_tmpdir sys.path.append(str(tmpdir / 'site-pkgs2')) site_dirs = tmpdir / 'site-pkgs', tmpdir / 'site-pkgs2' - ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" for site in site_dirs: pkg1 = site / 'pkg1' pkg2 = pkg1 / 'pkg2' pkg2.ensure_dir() - (pkg1 / '__init__.py').write_text(ns_str, encoding='utf-8') - (pkg2 / '__init__.py').write_text(ns_str, encoding='utf-8') + (pkg1 / '__init__.py').write_text(self.ns_str, encoding='utf-8') + (pkg2 / '__init__.py').write_text(self.ns_str, encoding='utf-8') import pkg1 assert "pkg1" in pkg_resources._namespace_packages # attempt to import pkg2 from site-pkgs2 @@ -695,7 +696,6 @@ def test_path_order(self, symlinked_tmpdir): tmpdir / "site-pkgs3", ) - ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" vers_str = "__version__ = %r" for number, site in enumerate(site_dirs, 1): @@ -704,7 +704,7 @@ def test_path_order(self, symlinked_tmpdir): nspkg = site / 'nspkg' subpkg = nspkg / 'subpkg' subpkg.ensure_dir() - (nspkg / '__init__.py').write_text(ns_str, encoding='utf-8') + (nspkg / '__init__.py').write_text(self.ns_str, encoding='utf-8') (subpkg / '__init__.py').write_text(vers_str % number, encoding='utf-8') import nspkg.subpkg From 8954900a7c88831cf96679f404c2e02e16cefda0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Feb 2016 10:22:24 -0500 Subject: [PATCH 5514/8469] Remove unused imports --- pkg_resources/tests/test_resources.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index e25fbc780f..542795cfaa 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -1,7 +1,5 @@ import os import sys -import tempfile -import shutil import string from pkg_resources.extern.six.moves import map From 0e689bb35e8af9f079f6985a11c80268575f786e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:25:06 -0500 Subject: [PATCH 5515/8469] Backout changeset 1ae2a75724bbba56373784f185a7f235ed0f24a4 --- setuptools/command/install_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index fd0f118b33..992709f19a 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -27,7 +27,7 @@ def finalize_options(self): ).egg_name() + '.egg-info' self.source = ei_cmd.egg_info self.target = os.path.join(self.install_dir, basename) - self.outputs = [self.target] + self.outputs = [] def run(self): self.run_command('egg_info') From 64378483fd433d4c7ca6a50c588b9bcb297de392 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:31:49 -0500 Subject: [PATCH 5516/8469] Bumped to 20.0 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 5d04285101..b4d85e519c 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.8' +__version__ = '20.0' From bc9ec216eb133fd0b593dfd2661878f9c020bc7a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:38:18 -0500 Subject: [PATCH 5517/8469] Fix syntax errors on Python 2 --- pkg_resources/tests/test_resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 542795cfaa..efaf8db4e6 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -618,7 +618,8 @@ def symlinked_tmpdir(self, tmpdir): a natural tempdir. """ if not hasattr(os, 'symlink'): - return str(tmpdir) + yield str(tmpdir) + return link_name = str(tmpdir) + '-linked' os.symlink(str(tmpdir), link_name) From b8d92af19e26efa9bf50c2d3e63618b0a6f09fa5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:38:50 -0500 Subject: [PATCH 5518/8469] Fix failing tests on Python 2 --- pkg_resources/tests/test_resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index efaf8db4e6..f2afdf9527 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import os import sys import string From f15fef5e8c96e2d20ed2007fa7cacd9ef61c9313 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:40:56 -0500 Subject: [PATCH 5519/8469] Added tag 20.0 for changeset 2a60daeff0cd --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0fa346ab48..678b2e369f 100644 --- a/.hgtags +++ b/.hgtags @@ -243,3 +243,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 35d9179d04390aada66eceae9ceb7b9274f67646 19.6.1 d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 c6e619ce910d1650cc2433f94e5594964085f973 19.7 +2a60daeff0cdb039b20b2058aaad7dae7bcd2c1c 20.0 From 5375ca253fb968b9351658de2abc738f758071ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Feb 2016 09:42:10 -0500 Subject: [PATCH 5520/8469] Bumped to 20.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index b4d85e519c..0e828f12c8 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.0' +__version__ = '20.1' From ba5633b3c7b9317b87130a2ea671d8c008a673d6 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 8 Feb 2016 16:51:52 +1100 Subject: [PATCH 5521/8469] Switch back to SyntaxError for invalid markers, stops consumers having to import packaging themselves --- pkg_resources/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4e3a25aeb3..b0b04579c4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1395,7 +1395,7 @@ def invalid_marker(text): """ try: evaluate_marker(text) - except packaging.markers.InvalidMarker as e: + except SyntaxError as e: e.filename = None e.lineno = None return e @@ -1406,12 +1406,15 @@ def evaluate_marker(text, extra=None): """ Evaluate a PEP 508 environment marker. Return a boolean indicating the marker result in this environment. - Raise InvalidMarker if marker is invalid. + Raise SyntaxError if marker is invalid. This implementation uses the 'pyparsing' module. """ marker = packaging.markers.Marker(text) - return marker.evaluate() + try: + return marker.evaluate() + except packaging.marker.InvalidMarker as e: + raise SyntaxError(e) class NullProvider: From cf9402a0d8b83b15353801b9a16e1330426a049c Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 8 Feb 2016 17:00:03 +1100 Subject: [PATCH 5522/8469] Update to packaging 16.1 --- Makefile | 2 +- pkg_resources/_vendor/packaging/__about__.py | 4 +- pkg_resources/_vendor/packaging/markers.py | 48 ++++++++++++++----- .../_vendor/packaging/requirements.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 18 +++---- pkg_resources/_vendor/vendored.txt | 2 +- 6 files changed, 51 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 7574057c19..e0aa419526 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,6 @@ update-vendored: rm -rf pkg_resources/_vendor/six* rm -rf pkg_resources/_vendor/pyparsing* python3 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ - sed -i -e 's/ \(pyparsing|six\)/ pkg_resources.extern.\1/' \ + sed -i 's/ \(pyparsing\|six\)/ pkg_resources.extern.\1/' \ pkg_resources/_vendor/packaging/*.py rm -rf pkg_resources/_vendor/*.{egg,dist}-info diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index 7058e69a47..313613b953 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,10 +12,10 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "15.4.dev0" +__version__ = "16.1" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" __license__ = "BSD or Apache License, Version 2.0" -__copyright__ = "Copyright 2014-2015 %s" % __author__ +__copyright__ = "Copyright 2014-2016 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index d5b6ddbea7..9e906015f5 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -17,7 +17,8 @@ __all__ = [ - "InvalidMarker", "UndefinedComparison", "Marker", "default_environment", + "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", + "Marker", "default_environment", ] @@ -33,6 +34,13 @@ class UndefinedComparison(ValueError): """ +class UndefinedEnvironmentName(ValueError): + """ + A name was attempted to be used that does not exist inside of the + environment. + """ + + class Node(object): def __init__(self, value): @@ -116,8 +124,8 @@ def _format_marker(marker, first=True): # where the single item is itself it's own list. In that case we want skip # the rest of this function so that we don't get extraneous () on the # outside. - if (isinstance(marker, list) and len(marker) == 1 - and isinstance(marker[0], (list, tuple))): + if (isinstance(marker, list) and len(marker) == 1 and + isinstance(marker[0], (list, tuple))): return _format_marker(marker[0]) if isinstance(marker, list): @@ -161,6 +169,20 @@ def _eval_op(lhs, op, rhs): return oper(lhs, rhs) +_undefined = object() + + +def _get_env(environment, name): + value = environment.get(name, _undefined) + + if value is _undefined: + raise UndefinedEnvironmentName( + "{0!r} does not exist in evaluation environment.".format(name) + ) + + return value + + def _evaluate_markers(markers, environment): groups = [[]] @@ -171,11 +193,15 @@ def _evaluate_markers(markers, environment): groups[-1].append(_evaluate_markers(marker, environment)) elif isinstance(marker, tuple): lhs, op, rhs = marker + if isinstance(lhs, Variable): - value = _eval_op(environment[lhs.value], op, rhs.value) + lhs_value = _get_env(environment, lhs.value) + rhs_value = rhs.value else: - value = _eval_op(lhs.value, op, environment[rhs.value]) - groups[-1].append(value) + lhs_value = lhs.value + rhs_value = _get_env(environment, rhs.value) + + groups[-1].append(_eval_op(lhs_value, op, rhs_value)) else: assert marker in ["and", "or"] if marker == "or": @@ -220,12 +246,10 @@ class Marker(object): def __init__(self, marker): try: self._markers = _coerce_parse_result(MARKER.parseString(marker)) - except ParseException: - self._markers = None - - # We do this because we can't do raise ... from None in Python 2.x - if self._markers is None: - raise InvalidMarker("Invalid marker: {0!r}".format(marker)) + except ParseException as e: + err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( + marker, marker[e.loc:e.loc + 8]) + raise InvalidMarker(err_str) def __str__(self): return _format_marker(self._markers) diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 8a9cd195e2..16032ac6b2 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -102,7 +102,7 @@ def __init__(self, requirement_string): self.url = req.url else: self.url = None - self.extras = req.extras.asList() if req.extras else [] + self.extras = set(req.extras.asList() if req.extras else []) self.specifier = SpecifierSet(req.specifier) self.marker = req.marker if req.marker else None diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index cef90084f8..31845c611a 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -194,8 +194,8 @@ def filter(self, iterable, prereleases=None): # If our version is a prerelease, and we were not set to allow # prereleases, then we'll store it for later incase nothing # else matches this specifier. - if (parsed_version.is_prerelease - and not (prereleases or self.prereleases)): + if (parsed_version.is_prerelease and not + (prereleases or self.prereleases)): found_prereleases.append(version) # Either this is not a prerelease, or we should have been # accepting prereleases from the begining. @@ -395,8 +395,8 @@ def _compare_compatible(self, prospective, spec): prefix = ".".join( list( itertools.takewhile( - lambda x: (not x.startswith("post") - and not x.startswith("dev")), + lambda x: (not x.startswith("post") and not + x.startswith("dev")), _version_split(spec), ) )[:-1] @@ -405,13 +405,15 @@ def _compare_compatible(self, prospective, spec): # Add the prefix notation to the end of our string prefix += ".*" - return (self._get_operator(">=")(prospective, spec) - and self._get_operator("==")(prospective, prefix)) + return (self._get_operator(">=")(prospective, spec) and + self._get_operator("==")(prospective, prefix)) @_require_version_compare def _compare_equal(self, prospective, spec): # We need special logic to handle prefix matching if spec.endswith(".*"): + # In the case of prefix matching we want to ignore local segment. + prospective = Version(prospective.public) # Split the spec out by dots, and pretend that there is an implicit # dot in between a release segment and a pre-release segment. spec = _version_split(spec[:-2]) # Remove the trailing .* @@ -563,8 +565,8 @@ def _pad_version(left, right): right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) # Get the rest of our versions - left_split.append(left[len(left_split):]) - right_split.append(left[len(right_split):]) + left_split.append(left[len(left_split[0]):]) + right_split.append(right[len(right_split[0]):]) # Insert our padding left_split.insert( diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index fcb72075f3..fbaaa5f186 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ -packaging==15.3 +packaging==16.1 pyparsing==2.0.6 six==1.10.0 From 43d0308ad6a8c83be645b09e8c1871b36ff3c4c9 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 9 Feb 2016 17:12:47 +1100 Subject: [PATCH 5523/8469] Correct tests after the move to packaging 16.1. --- pkg_resources/__init__.py | 4 ++-- pkg_resources/api_tests.txt | 28 +++++++++++++-------------- pkg_resources/tests/test_resources.py | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b0b04579c4..286c03ed04 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1410,10 +1410,10 @@ def evaluate_marker(text, extra=None): This implementation uses the 'pyparsing' module. """ - marker = packaging.markers.Marker(text) try: + marker = packaging.markers.Marker(text) return marker.evaluate() - except packaging.marker.InvalidMarker as e: + except packaging.markers.InvalidMarker as e: raise SyntaxError(e) diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 9df56b4b0a..4fbd3d235d 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -338,49 +338,49 @@ Environment Markers >>> import os >>> print(im("sys_platform")) - Invalid marker: 'sys_platform' + Invalid marker: 'sys_platform', parse error at '' >>> print(im("sys_platform==")) - Invalid marker: 'sys_platform==' + Invalid marker: 'sys_platform==', parse error at '' >>> print(im("sys_platform=='win32'")) False >>> print(im("sys=='x'")) - Invalid marker: "sys=='x'" + Invalid marker: "sys=='x'", parse error at "sys=='x'" >>> print(im("(extra)")) - Invalid marker: '(extra)' + Invalid marker: '(extra)', parse error at ')' >>> print(im("(extra")) - Invalid marker: '(extra' + Invalid marker: '(extra', parse error at '' >>> print(im("os.open('foo')=='y'")) - Invalid marker: "os.open('foo')=='y'" + Invalid marker: "os.open('foo')=='y'", parse error at 'os.open(' >>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit! - Invalid marker: "'x'=='y' and os.open('foo')=='y'" + Invalid marker: "'x'=='y' and os.open('foo')=='y'", parse error at 'and os.o' >>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit! - Invalid marker: "'x'=='x' or os.open('foo')=='y'" + Invalid marker: "'x'=='x' or os.open('foo')=='y'", parse error at 'or os.op' >>> print(im("'x' < 'y' < 'z'")) - Invalid marker: "'x' < 'y' < 'z'" + Invalid marker: "'x' < 'y' < 'z'", parse error at "< 'z'" >>> print(im("r'x'=='x'")) - Invalid marker: "r'x'=='x'" + Invalid marker: "r'x'=='x'", parse error at "r'x'=='x" >>> print(im("'''x'''=='x'")) - Invalid marker: "'''x'''=='x'" + Invalid marker: "'''x'''=='x'", parse error at "'x'''=='" >>> print(im('"""x"""=="x"')) - Invalid marker: '"""x"""=="x"' + Invalid marker: '"""x"""=="x"', parse error at '"x"""=="' >>> print(im(r"x\n=='x'")) - Invalid marker: "x\\n=='x'" + Invalid marker: "x\\n=='x'", parse error at "x\\n=='x'" >>> print(im("os.open=='y'")) - Invalid marker: "os.open=='y'" + Invalid marker: "os.open=='y'", parse error at 'os.open=' >>> em("sys_platform=='win32'") == (sys.platform=='win32') True diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 4241765ade..8066753bdd 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -383,7 +383,7 @@ def testOptionsAndHashing(self): r2 = Requirement.parse("Twisted[bar,FOO]>=1.2") assert r1 == r2 assert r1.extras == ("foo","bar") - assert r2.extras == ("bar","foo") # extras are normalized + assert r2.extras == ("foo","bar") assert hash(r1) == hash(r2) assert ( hash(r1) From 605d57a077d65dba6bc554426e50fe2ba04502af Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 11 Feb 2016 13:10:36 +0200 Subject: [PATCH 5524/8469] Issue #25985: sys.version_info is now used instead of sys.version to format short Python version. --- command/bdist_msi.py | 2 +- command/bdist_wininst.py | 2 +- command/build.py | 4 ++-- command/install.py | 4 ++-- command/install_egg_info.py | 4 ++-- sysconfig.py | 2 +- tests/test_build.py | 5 +++-- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index b3cfe9ceff..f6c21aee44 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -199,7 +199,7 @@ def run(self): target_version = self.target_version if not target_version: assert self.skip_build, "Should have already checked this" - target_version = sys.version[0:3] + target_version = '%d.%d' % sys.version_info[:2] plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0c0e2c1a26..d3e1d3af22 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -141,7 +141,7 @@ def run(self): target_version = self.target_version if not target_version: assert self.skip_build, "Should have already checked this" - target_version = sys.version[0:3] + target_version = '%d.%d' % sys.version_info[:2] plat_specifier = ".%s-%s" % (self.plat_name, target_version) build = self.get_finalized_command('build') build.build_lib = os.path.join(build.build_base, diff --git a/command/build.py b/command/build.py index 337dd0bfc1..c6f52e61e1 100644 --- a/command/build.py +++ b/command/build.py @@ -81,7 +81,7 @@ def finalize_options(self): "--plat-name only supported on Windows (try " "using './configure --help' on your platform)") - plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3]) + plat_specifier = ".%s-%d.%d" % (self.plat_name, *sys.version_info[:2]) # Make it so Python 2.x and Python 2.x with --with-pydebug don't # share the same build directories. Doing so confuses the build @@ -114,7 +114,7 @@ def finalize_options(self): 'temp' + plat_specifier) if self.build_scripts is None: self.build_scripts = os.path.join(self.build_base, - 'scripts-' + sys.version[0:3]) + 'scripts-%d.%d' % sys.version_info[:2]) if self.executable is None: self.executable = os.path.normpath(sys.executable) diff --git a/command/install.py b/command/install.py index 67db007a02..9474e9c599 100644 --- a/command/install.py +++ b/command/install.py @@ -290,8 +290,8 @@ def finalize_options(self): 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, - 'py_version_short': py_version[0:3], - 'py_version_nodot': py_version[0] + py_version[2], + 'py_version_short': '%d.%d' % sys.version_info[:2], + 'py_version_nodot': '%d%d' % sys.version_info[:2], 'sys_prefix': prefix, 'prefix': prefix, 'sys_exec_prefix': exec_prefix, diff --git a/command/install_egg_info.py b/command/install_egg_info.py index c2a7d649c0..0ddc7367cc 100644 --- a/command/install_egg_info.py +++ b/command/install_egg_info.py @@ -21,10 +21,10 @@ def initialize_options(self): def finalize_options(self): self.set_undefined_options('install_lib',('install_dir','install_dir')) - basename = "%s-%s-py%s.egg-info" % ( + basename = "%s-%s-py%d.%d.egg-info" % ( to_filename(safe_name(self.distribution.get_name())), to_filename(safe_version(self.distribution.get_version())), - sys.version[:3] + *sys.version_info[:2] ) self.target = os.path.join(self.install_dir, basename) self.outputs = [self.target] diff --git a/sysconfig.py b/sysconfig.py index 573724ddd7..d203f8e42b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -70,7 +70,7 @@ def get_python_version(): leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. """ - return sys.version[:3] + return '%d.%d' % sys.version_info[:2] def get_python_inc(plat_specific=0, prefix=None): diff --git a/tests/test_build.py b/tests/test_build.py index 3391f36d4b..b020a5ba35 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -27,7 +27,7 @@ def test_finalize_options(self): # build_platlib is 'build/lib.platform-x.x[-pydebug]' # examples: # build/lib.macosx-10.3-i386-2.7 - plat_spec = '.%s-%s' % (cmd.plat_name, sys.version[0:3]) + plat_spec = '.%s-%d.%d' % (cmd.plat_name, *sys.version_info[:2]) if hasattr(sys, 'gettotalrefcount'): self.assertTrue(cmd.build_platlib.endswith('-pydebug')) plat_spec += '-pydebug' @@ -42,7 +42,8 @@ def test_finalize_options(self): self.assertEqual(cmd.build_temp, wanted) # build_scripts is build/scripts-x.x - wanted = os.path.join(cmd.build_base, 'scripts-' + sys.version[0:3]) + wanted = os.path.join(cmd.build_base, + 'scripts-%d.%d' % sys.version_info[:2]) self.assertEqual(cmd.build_scripts, wanted) # executable is os.path.normpath(sys.executable) From 0975916c1436759b5e373733561142caf708def4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Feb 2016 23:29:17 -0500 Subject: [PATCH 5525/8469] Replace upload docs with a reference to distutils docs, as setuptools no longer provides an upload command. --- docs/setuptools.txt | 51 +++------------------------------------------ 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d6a62de865..064acd5ffa 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2328,54 +2328,9 @@ available: ``upload`` - Upload source and/or egg distributions to PyPI =========================================================== -PyPI now supports uploading project files for redistribution; uploaded files -are easily found by EasyInstall, even if you don't have download links on your -project's home page. - -Although Python 2.5 will support uploading all types of distributions to PyPI, -setuptools only supports source distributions and eggs. (This is partly -because PyPI's upload support is currently broken for various other file -types.) To upload files, you must include the ``upload`` command *after* the -``sdist`` or ``bdist_egg`` commands on the setup command line. For example:: - - setup.py bdist_egg upload # create an egg and upload it - setup.py sdist upload # create a source distro and upload it - setup.py sdist bdist_egg upload # create and upload both - -Note that to upload files for a project, the corresponding version must already -be registered with PyPI, using the distutils ``register`` command. It's -usually a good idea to include the ``register`` command at the start of the -command line, so that any registration problems can be found and fixed before -building and uploading the distributions, e.g.:: - - setup.py register sdist bdist_egg upload - -This will update PyPI's listing for your project's current version. - -Note, by the way, that the metadata in your ``setup()`` call determines what -will be listed in PyPI for your package. Try to fill out as much of it as -possible, as it will save you a lot of trouble manually adding and updating -your PyPI listings. Just put it in ``setup.py`` and use the ``register`` -command to keep PyPI up to date. - -The ``upload`` command has a few options worth noting: - -``--sign, -s`` - Sign each uploaded file using GPG (GNU Privacy Guard). The ``gpg`` program - must be available for execution on the system ``PATH``. - -``--identity=NAME, -i NAME`` - Specify the identity or key name for GPG to use when signing. The value of - this option will be passed through the ``--local-user`` option of the - ``gpg`` program. - -``--show-response`` - Display the full response text from server; this is useful for debugging - PyPI problems. - -``--repository=URL, -r URL`` - The URL of the repository to upload to. Defaults to - https://pypi.python.org/pypi (i.e., the main PyPI installation). +The ``upload`` command is implemented and `documented +`_ +in distutils. .. _upload_docs: From 5367a7399762a9098ea689c7cdcb54fb9748dd66 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Feb 2016 23:47:28 -0500 Subject: [PATCH 5526/8469] Override upload command to load passwords from keyring when available and not otherwise specified. --- CHANGES.txt | 8 ++++++++ docs/setuptools.txt | 16 ++++++++++++++++ setuptools/command/__init__.py | 2 +- setuptools/command/upload.py | 23 +++++++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 setuptools/command/upload.py diff --git a/CHANGES.txt b/CHANGES.txt index 9089b4b891..a7a70ab7ca 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,14 @@ CHANGES ======= +20.1 +---- + +Added support for using passwords from keyring in the upload +command. See `the upload docs +`_ +for details. + 20.0 ---- diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 064acd5ffa..610a0e613d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2332,6 +2332,22 @@ The ``upload`` command is implemented and `documented `_ in distutils. +Setuptools augments the ``upload`` command with support +for `keyring `_, +allowing the password to be stored in a secure +location and not in plaintext in the .pypirc file. To use +keyring, first install keyring and set the password for +the relevant repository, e.g.:: + + python -m keyring set + Password for '' in '': ******** + +Then, in .pypirc, set the repository configuration as normal, +but omit the password. Thereafter, uploads will use the +password from the keyring. + +New in 20.1: Added keyring support. + .. _upload_docs: ``upload_docs`` - Upload package documentation to PyPI diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index f6dbc39c40..3fb2f6dfcb 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', 'upload_docs', + 'register', 'bdist_wininst', 'upload_docs', 'upload', ] from distutils.command.bdist import bdist diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py new file mode 100644 index 0000000000..08c20ba868 --- /dev/null +++ b/setuptools/command/upload.py @@ -0,0 +1,23 @@ +from distutils.command import upload as orig + + +class upload(orig.upload): + """ + Override default upload behavior to look up password + in the keyring if available. + """ + + def finalize_options(self): + orig.upload.finalize_options(self) + self.password or self._load_password_from_keyring() + + def _load_password_from_keyring(self): + """ + Attempt to load password from keyring. Suppress Exceptions. + """ + try: + keyring = __import__('keyring') + self.password = keyring.get_password(self.repository, + self.username) + except Exception: + pass From b70dc2865f85659d18a3b1e5445eda40c18f1479 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Feb 2016 23:49:12 -0500 Subject: [PATCH 5527/8469] Added tag 20.1 for changeset 06c9d3ffae80 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 678b2e369f..4fa766d3e3 100644 --- a/.hgtags +++ b/.hgtags @@ -244,3 +244,4 @@ f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 c6e619ce910d1650cc2433f94e5594964085f973 19.7 2a60daeff0cdb039b20b2058aaad7dae7bcd2c1c 20.0 +06c9d3ffae80d7f5786c0a454d040d253d47fc03 20.1 From fdc4a82ac68ac18c10151546bc660f56dca131ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 Feb 2016 23:51:09 -0500 Subject: [PATCH 5528/8469] Bumped to 20.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 0e828f12c8..425e19d9a2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.1' +__version__ = '20.2' From 1e0ecae918c4c43f29b139b0dffa9d73b208e13b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:07:19 -0500 Subject: [PATCH 5529/8469] Remove unused import --- setuptools/command/upload_docs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ca35a3ce1c..0a57d5d31a 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -13,7 +13,6 @@ import socket import zipfile import tempfile -import sys import shutil from setuptools.extern import six From 076e6b32c38a5bd6141bf533ff87eb23e54eca67 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:10:53 -0500 Subject: [PATCH 5530/8469] Upload_docs should also resolve passwords from keyring same as upload command. --- CHANGES.txt | 8 +++++++- setuptools/command/upload_docs.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a7a70ab7ca..504281da83 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,10 +2,16 @@ CHANGES ======= +20.1.1 +------ + +* Update ``upload_docs`` command to also honor keyring + for password resolution. + 20.1 ---- -Added support for using passwords from keyring in the upload +* Added support for using passwords from keyring in the upload command. See `the upload docs `_ for details. diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 0a57d5d31a..f887b47e52 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -8,7 +8,6 @@ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError -from distutils.command.upload import upload import os import socket import zipfile @@ -19,6 +18,7 @@ from setuptools.extern.six.moves import http_client, urllib from pkg_resources import iter_entry_points +from .upload import upload errors = 'surrogateescape' if six.PY3 else 'strict' From f8b1293c408bbb652bec3f2ae6e5b4f33f3ca55e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:11:07 -0500 Subject: [PATCH 5531/8469] Bumped to 20.1.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 425e19d9a2..4494728457 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.2' +__version__ = '20.1.1' From 3a209fa2a09a19f0ba5ee9b708475de8b00dd54f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:11:08 -0500 Subject: [PATCH 5532/8469] Added tag 20.1.1 for changeset 919a40f18431 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4fa766d3e3..e2bfe097a0 100644 --- a/.hgtags +++ b/.hgtags @@ -245,3 +245,4 @@ d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 c6e619ce910d1650cc2433f94e5594964085f973 19.7 2a60daeff0cdb039b20b2058aaad7dae7bcd2c1c 20.0 06c9d3ffae80d7f5786c0a454d040d253d47fc03 20.1 +919a40f1843131249f98104c73f3aee3fc835e67 20.1.1 From 236b0499acc167551df9553f7d20e8a5d0c010e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:13:37 -0500 Subject: [PATCH 5533/8469] Bumped to 20.1.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 4494728457..4211fc44be 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.1.1' +__version__ = '20.1.2' From 8ccd428cd2a733891bffce13e017774ea82bd8d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Feb 2016 11:15:03 -0500 Subject: [PATCH 5534/8469] Correct syntax in changelog --- CHANGES.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 504281da83..75b13e46db 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,9 +12,9 @@ CHANGES ---- * Added support for using passwords from keyring in the upload -command. See `the upload docs -`_ -for details. + command. See `the upload docs + `_ + for details. 20.0 ---- From e8f5160ce40e05753d29ced35cf9b246ef12eb2d Mon Sep 17 00:00:00 2001 From: JGoutin Date: Sun, 14 Feb 2016 20:15:36 +0000 Subject: [PATCH 5535/8469] Improve support for standalones MVC++ 9.0/10.0 compilers by setting directly the environment if Vcvarsall.bat is missing or fail. --- setuptools/msvc9_support.py | 265 ++++++++++++++++++++++++++++++++++-- 1 file changed, 255 insertions(+), 10 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index a69c7474c8..5dad8db2fc 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -48,16 +48,261 @@ def find_vcvarsall(version): return unpatched['find_vcvarsall'](version) def query_vcvarsall(version, *args, **kwargs): + message = '' + + # Try to get environement from vcvarsall.bat (Classical way) try: return unpatched['query_vcvarsall'](version, *args, **kwargs) except distutils.errors.DistutilsPlatformError as exc: - if exc and "vcvarsall.bat" in exc.args[0]: - message = 'Microsoft Visual C++ %0.1f is required (%s).' % (version, exc.args[0]) - if int(version) == 9: - # This redirection link is maintained by Microsoft. - # Contact vspython@microsoft.com if it needs updating. - raise distutils.errors.DistutilsPlatformError( - message + ' Get it from http://aka.ms/vcpython27' - ) - raise distutils.errors.DistutilsPlatformError(message) - raise + # Error if Vcvarsall.bat is missing + message = exc.args[0] + except ValueError as exc: + # Error if environment not set after executing vcvarsall.bat + message = exc.args[0] + + # If vcvarsall.bat fail, try to set environment directly + try: + return setvcenv(version, *args, **kwargs) + except distutils.errors.DistutilsPlatformError as exc: + # Error if MSVC++ directory not found or environment not set + message = exc.args[0] + + # Raise error + if message and "vcvarsall.bat" in message: + # Special error message if MSVC++ not installed + message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ + (version, message) + if int(version) == 9: + # For VC++ 9.0 Redirect user to Vc++ for Python 2.7 : + # This redirection link is maintained by Microsoft. + # Contact vspython@microsoft.com if it needs updating. + message += r' Get it from http://aka.ms/vcpython27' + elif int(version) == 10: + # For VC++ 10.0 Redirect user to Windows SDK 7.1 + message += ' Get it with "Microsoft Windows SDK for Windows 7": ' + message += r'www.microsoft.com/download/details.aspx?id=8279' + raise distutils.errors.DistutilsPlatformError(message) + raise(message) + +def setvcenv(VcVer, arch): + """ + Return environment variables for specified Microsoft Visual C++ version + and platform. + """ + from os.path import join, isdir + from os import environ + from distutils.errors import DistutilsPlatformError + + # Find current and target architecture + CurrentCpu = environ['processor_architecture'].lower() + TargetCpu = arch[arch.find('_') + 1:] + + # Find "Windows" and "Program Files" system directories + WinDir = environ['WinDir'] + ProgramFiles = environ['ProgramFiles'] + if CurrentCpu != 'x86': + ProgramFilesX86 = environ['ProgramFiles(x86)'] + else: + ProgramFilesX86 = ProgramFiles + + # Set registry base paths + reg_value = distutils.msvc9compiler.Reg.get_value + if CurrentCpu != 'x86': + node = r'\Wow6432Node' + else: + node = '' + VsReg = r'Software%s\Microsoft\VisualStudio\SxS\VS7' % node + VcReg = r'Software%s\Microsoft\VisualStudio\SxS\VC7' % node + VcForPythonReg = r'Software%s\Microsoft\DevDiv\VCForPython\%0.1f' %\ + (node, VcVer) + WindowsSdkReg = r'Software%s\Microsoft\Microsoft SDKs\Windows' % node + + # Set Platform subdirectories + if TargetCpu == 'amd64': + pltsd1, pltsd2 = r'\amd64', r'\x64' + if CurrentCpu == 'amd64': + pltsd3 = r'\amd64' + else: + pltsd3 = r'\x86_amd64' + elif TargetCpu == 'ia64': + pltsd1, pltsd2 = r'\ia64', r'\ia64' + if CurrentCpu == 'ia64': + pltsd3 = r'\ia64' + else: + pltsd3 = r'\x86_ia64' + else: + pltsd1, pltsd2, pltsd3 = '', '', '' + + # Find Microsoft Visual Studio directory + try: + # Try to get it from registry + VsInstallDir = reg_value(VsReg, '%0.1f' % VcVer) + except KeyError: + # If fail, use default path + VsInstallDir = join(ProgramFilesX86, + 'Microsoft Visual Studio %0.1f' % VcVer) + + # Find Microsoft Visual C++ directory + try: + # Try to get it from registry + VcInstallDir = reg_value(VcReg, '%0.1f' % VcVer) + except KeyError: + try: + # Try to get "VC++ for Python" version from registry + VcInstallDir = join(reg_value(VcForPythonReg, 'installdir'), 'VC') + except KeyError: + # If fail, use default path + VcInstallDir = join(ProgramFilesX86, + r'Microsoft Visual Studio %0.1f\VC' % VcVer) + if not isdir(VcInstallDir): + raise DistutilsPlatformError('vcvarsall.bat and Visual C++ ' + 'directory not found') + + # Find Microsoft Windows SDK directory + WindowsSdkDir = '' + if VcVer == 9.0: + WindowsSdkVer = ('7.0', '6.1', '6.0a') + elif VcVer == 10.0: + WindowsSdkVer = ('7.1', '7.0a') + else: + WindowsSdkVer = () + for ver in WindowsSdkVer: + # Try to get it from registry + try: + WindowsSdkDir = reg_value(join(WindowsSdkReg, 'v%s' % ver), + 'installationfolder') + break + except KeyError: + pass + if not WindowsSdkDir or not isdir(WindowsSdkDir): + # Try to get "VC++ for Python" version from registry + try: + WindowsSdkDir = join(reg_value(VcForPythonReg, 'installdir'), + 'WinSDK') + except: + pass + if not WindowsSdkDir or not isdir(WindowsSdkDir): + # If fail, use default path + for ver in WindowsSdkVer: + d = join(ProgramFiles, r'Microsoft SDKs\Windows\v%s' % ver) + if isdir(d): + WindowsSdkDir = d + if not WindowsSdkDir: + # If fail, use Platform SDK + WindowsSdkDir = join(VcInstallDir, 'PlatformSDK') + + # Find Microsoft .NET Framework 32bit directory + try: + # Try to get it from registry + FrameworkDir32 = reg_value(VcReg, 'frameworkdir32') + except KeyError: + # If fail, use default path + FrameworkDir32 = join(WinDir, r'Microsoft.NET\Framework') + + # Find Microsoft .NET Framework 64bit directory + try: + # Try to get it from registry + FrameworkDir64 = reg_value(VcReg, 'frameworkdir64') + except KeyError: + # If fail, use default path + FrameworkDir64 = join(WinDir, r'Microsoft.NET\Framework64') + + # Find Microsoft .NET Framework Versions + if VcVer == 10.0: + try: + # Try to get v4 from registry + v4 = reg_value(VcReg, 'frameworkver32') + if v4.lower()[:2] != 'v4': + raise KeyError('Not the V4') + except KeyError: + # If fail, use last v4 version + v4 = 'v4.0.30319' + FrameworkVer = (v4, 'v3.5') + elif VcVer == 9.0: + FrameworkVer = ('v3.5', 'v2.0.50727') + elif VcVer == 8.0: + FrameworkVer = ('v3.0', 'v2.0.50727') + + # Set Microsoft Visual Studio Tools + VSTools = [join(VsInstallDir, r'Common7\IDE'), + join(VsInstallDir, r'Common7\Tools')] + + # Set Microsoft Visual C++ Includes + VCIncludes = join(VcInstallDir, 'Include') + + # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries + VCLibraries = [join(VcInstallDir, 'Lib' + pltsd1), + join(VcInstallDir, r'ATLMFC\LIB' + pltsd1)] + + # Set Microsoft Visual C++ Tools + VCTools = [join(VcInstallDir, 'VCPackages'), + join(VcInstallDir, 'Bin' + pltsd3)] + if pltsd3: + VCTools.append(join(VcInstallDir, 'Bin')) + + # Set Microsoft Windows SDK Include + OSLibraries = join(WindowsSdkDir, 'Lib' + pltsd2) + + # Set Microsoft Windows SDK Libraries + OSIncludes = [join(WindowsSdkDir, 'Include'), + join(WindowsSdkDir, r'Include\gl')] + + # Set Microsoft Windows SDK Tools + SdkTools = [join(WindowsSdkDir, 'Bin')] + if TargetCpu != 'x86': + SdkTools.append(join(WindowsSdkDir, 'Bin' + pltsd2)) + if VcVer == 10.0: + SdkTools.append(join(WindowsSdkDir, r'Bin\NETFX 4.0 Tools' + pltsd2)) + + # Set Microsoft Windows SDK Setup + SdkSetup = join(WindowsSdkDir, 'Setup') + + # Set Microsoft .NET Framework Tools + FxTools = [] + for ver in FrameworkVer: + FxTools.append(join(FrameworkDir32, ver)) + if TargetCpu != 'x86' and CurrentCpu != 'x86': + for ver in FrameworkVer: + FxTools.append(join(FrameworkDir64, ver)) + + # Set Microsoft Visual Studio Team System Database + VsTDb = join(VsInstallDir, r'VSTSDB\Deploy') + + # Return Environment Variables + env = {} + env['include'] = [VCIncludes, OSIncludes] + env['lib'] = [VCLibraries, OSLibraries, FxTools] + env['libpath'] = [VCLibraries, FxTools] + env['path'] = [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools] + + def checkpath(path, varlist): + # Function that add valid paths in list in not already present + if isdir(path) and path not in varlist: + varlist.append(path) + + for key in env.keys(): + var = [] + # Add valid paths + for val in env[key]: + if type(val) is str: + # Path + checkpath(val, var) + else: + # Paths list + for subval in val: + checkpath(subval, var) + + # Add values from actual environment + try: + for val in environ[key].split(';'): + checkpath(val, var) + except KeyError: + pass + + # Format paths to Environment Variable string + if var: + env[key] = ';'.join(var) + else: + raise DistutilsPlatformError("%s environment variable is empty" % + key.upper()) + return env From 11e560431408ccab2ef5e35721ef61d664d13693 Mon Sep 17 00:00:00 2001 From: JGoutin Date: Thu, 18 Feb 2016 19:59:21 +0000 Subject: [PATCH 5536/8469] Update with comments. --- setuptools/msvc9_support.py | 76 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 5dad8db2fc..7e8a2a25d0 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -62,7 +62,11 @@ def query_vcvarsall(version, *args, **kwargs): # If vcvarsall.bat fail, try to set environment directly try: - return setvcenv(version, *args, **kwargs) + if not args: + arch = 'x86' + else: + arch = args[0] + return setvcenv(version, kwargs.get('arch', arch)) except distutils.errors.DistutilsPlatformError as exc: # Error if MSVC++ directory not found or environment not set message = exc.args[0] @@ -82,7 +86,7 @@ def query_vcvarsall(version, *args, **kwargs): message += ' Get it with "Microsoft Windows SDK for Windows 7": ' message += r'www.microsoft.com/download/details.aspx?id=8279' raise distutils.errors.DistutilsPlatformError(message) - raise(message) + raise distutils.errors.DistutilsPlatformError(message) def setvcenv(VcVer, arch): """ @@ -96,21 +100,17 @@ def setvcenv(VcVer, arch): # Find current and target architecture CurrentCpu = environ['processor_architecture'].lower() TargetCpu = arch[arch.find('_') + 1:] + Tar_not_x86 = TargetCpu != 'x86' + Cur_not_x86 = CurrentCpu != 'x86' # Find "Windows" and "Program Files" system directories WinDir = environ['WinDir'] ProgramFiles = environ['ProgramFiles'] - if CurrentCpu != 'x86': - ProgramFilesX86 = environ['ProgramFiles(x86)'] - else: - ProgramFilesX86 = ProgramFiles + ProgramFilesX86 = environ.get('ProgramFiles(x86)', ProgramFiles) # Set registry base paths reg_value = distutils.msvc9compiler.Reg.get_value - if CurrentCpu != 'x86': - node = r'\Wow6432Node' - else: - node = '' + node = r'\Wow6432Node' if Cur_not_x86 else '' VsReg = r'Software%s\Microsoft\VisualStudio\SxS\VS7' % node VcReg = r'Software%s\Microsoft\VisualStudio\SxS\VC7' % node VcForPythonReg = r'Software%s\Microsoft\DevDiv\VCForPython\%0.1f' %\ @@ -119,19 +119,23 @@ def setvcenv(VcVer, arch): # Set Platform subdirectories if TargetCpu == 'amd64': - pltsd1, pltsd2 = r'\amd64', r'\x64' + plt_subd_lib = r'\amd64' + plt_subd_sdk = r'\x64' if CurrentCpu == 'amd64': - pltsd3 = r'\amd64' + plt_subd_tools = r'\amd64' else: - pltsd3 = r'\x86_amd64' + plt_subd_tools = r'\x86_amd64' elif TargetCpu == 'ia64': - pltsd1, pltsd2 = r'\ia64', r'\ia64' + plt_subd_lib = r'\ia64' + plt_subd_sdk = r'\ia64' if CurrentCpu == 'ia64': - pltsd3 = r'\ia64' + plt_subd_tools = r'\ia64' else: - pltsd3 = r'\x86_ia64' + plt_subd_tools = r'\x86_ia64' else: - pltsd1, pltsd2, pltsd3 = '', '', '' + plt_subd_lib = '' + plt_subd_sdk = '' + plt_subd_tools = '' # Find Microsoft Visual Studio directory try: @@ -228,20 +232,20 @@ def setvcenv(VcVer, arch): join(VsInstallDir, r'Common7\Tools')] # Set Microsoft Visual C++ Includes - VCIncludes = join(VcInstallDir, 'Include') + VCIncludes = [join(VcInstallDir, 'Include')] # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries - VCLibraries = [join(VcInstallDir, 'Lib' + pltsd1), - join(VcInstallDir, r'ATLMFC\LIB' + pltsd1)] + VCLibraries = [join(VcInstallDir, 'Lib' + plt_subd_lib), + join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib)] # Set Microsoft Visual C++ Tools VCTools = [join(VcInstallDir, 'VCPackages'), - join(VcInstallDir, 'Bin' + pltsd3)] - if pltsd3: + join(VcInstallDir, 'Bin' + plt_subd_tools)] + if plt_subd_tools: VCTools.append(join(VcInstallDir, 'Bin')) # Set Microsoft Windows SDK Include - OSLibraries = join(WindowsSdkDir, 'Lib' + pltsd2) + OSLibraries = [join(WindowsSdkDir, 'Lib' + plt_subd_sdk)] # Set Microsoft Windows SDK Libraries OSIncludes = [join(WindowsSdkDir, 'Include'), @@ -249,24 +253,23 @@ def setvcenv(VcVer, arch): # Set Microsoft Windows SDK Tools SdkTools = [join(WindowsSdkDir, 'Bin')] - if TargetCpu != 'x86': - SdkTools.append(join(WindowsSdkDir, 'Bin' + pltsd2)) + if Tar_not_x86: + SdkTools.append(join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) if VcVer == 10.0: - SdkTools.append(join(WindowsSdkDir, r'Bin\NETFX 4.0 Tools' + pltsd2)) + SdkTools.append(join(WindowsSdkDir, + r'Bin\NETFX 4.0 Tools' + plt_subd_sdk)) # Set Microsoft Windows SDK Setup - SdkSetup = join(WindowsSdkDir, 'Setup') + SdkSetup = [join(WindowsSdkDir, 'Setup')] # Set Microsoft .NET Framework Tools - FxTools = [] - for ver in FrameworkVer: - FxTools.append(join(FrameworkDir32, ver)) - if TargetCpu != 'x86' and CurrentCpu != 'x86': + FxTools = [join(FrameworkDir32, ver) for ver in FrameworkVer] + if Tar_not_x86 and Cur_not_x86: for ver in FrameworkVer: FxTools.append(join(FrameworkDir64, ver)) # Set Microsoft Visual Studio Team System Database - VsTDb = join(VsInstallDir, r'VSTSDB\Deploy') + VsTDb = [join(VsInstallDir, r'VSTSDB\Deploy')] # Return Environment Variables env = {} @@ -284,13 +287,8 @@ def checkpath(path, varlist): var = [] # Add valid paths for val in env[key]: - if type(val) is str: - # Path - checkpath(val, var) - else: - # Paths list - for subval in val: - checkpath(subval, var) + for subval in val: + checkpath(subval, var) # Add values from actual environment try: From 335aba6f265f694612e610c6acceb34c182a94c5 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 19 Feb 2016 14:20:30 +1100 Subject: [PATCH 5537/8469] Correct tests under both Python 2 and 3. --- pkg_resources/__init__.py | 4 ++-- pkg_resources/tests/test_resources.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 118cb63b12..5b68da154b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -75,8 +75,8 @@ from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') __import__('pkg_resources.extern.packaging.specifiers') -__import__('pkg_resources._vendor.packaging.requirements') -__import__('pkg_resources._vendor.packaging.markers') +__import__('pkg_resources.extern.packaging.requirements') +__import__('pkg_resources.extern.packaging.markers') if (3, 0) < sys.version_info < (3, 3): diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 909b29d395..7b98ae0d91 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -384,8 +384,8 @@ def testOptionsAndHashing(self): r1 = Requirement.parse("Twisted[foo,bar]>=1.2") r2 = Requirement.parse("Twisted[bar,FOO]>=1.2") assert r1 == r2 - assert r1.extras == ("foo","bar") - assert r2.extras == ("foo","bar") + assert set(r1.extras) == set(("foo", "bar")) + assert set(r2.extras) == set(("foo", "bar")) assert hash(r1) == hash(r2) assert ( hash(r1) From e5f397829451be329a91838275977cebac45375d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 09:34:14 -0500 Subject: [PATCH 5538/8469] Use io module and text type in install_site_py --- setuptools/command/easy_install.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 46056173ec..08bc9c510b 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1239,17 +1239,14 @@ def install_site_py(self): sitepy = os.path.join(self.install_dir, "site.py") source = resource_string("setuptools", "site-patch.py") + source = source.decode('utf-8') current = "" if os.path.exists(sitepy): log.debug("Checking existing site.py in %s", self.install_dir) - f = open(sitepy, 'rb') - current = f.read() - # we want str, not bytes - if six.PY3: - current = current.decode() + with io.open(sitepy) as strm: + current = strm.read() - f.close() if not current.startswith('def __boot():'): raise DistutilsError( "%s is not a setuptools-generated site.py; please" @@ -1260,9 +1257,8 @@ def install_site_py(self): log.info("Creating %s", sitepy) if not self.dry_run: ensure_directory(sitepy) - f = open(sitepy, 'wb') - f.write(source) - f.close() + with io.open(sitepy, 'w', encoding='utf-8') as strm: + strm.write(source) self.byte_compile([sitepy]) self.sitepy_installed = True From 24cc60e8ded40d5cdfedc79c85dc778d80f688a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 09:36:13 -0500 Subject: [PATCH 5539/8469] Use pytest tmpdir fixture for simplicity and clarity. --- setuptools/tests/test_easy_install.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 07d8a3c508..9dacd8e028 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -59,17 +59,13 @@ def as_requirement(self): class TestEasyInstallTest: - def test_install_site_py(self): + def test_install_site_py(self, tmpdir): dist = Distribution() cmd = ei.easy_install(dist) cmd.sitepy_installed = False - cmd.install_dir = tempfile.mkdtemp() - try: - cmd.install_site_py() - sitepy = os.path.join(cmd.install_dir, 'site.py') - assert os.path.exists(sitepy) - finally: - shutil.rmtree(cmd.install_dir) + cmd.install_dir = str(tmpdir) + cmd.install_site_py() + assert (tmpdir / 'site.py').exists() def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() From bfd610e2b7f1ad369b75f777b3fa7472347b49c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 09:43:09 -0500 Subject: [PATCH 5540/8469] Remove unused imports --- setuptools/tests/test_easy_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 9dacd8e028..55b8b05af1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,7 +16,6 @@ import distutils.errors import io -from setuptools.extern import six from setuptools.extern.six.moves import urllib import time @@ -38,7 +37,7 @@ import pkg_resources from .py26compat import tarfile_open -from . import contexts, is_ascii +from . import contexts from .textwrap import DALS From 4f85ab4276a862467a927e2d1603e063728ba647 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 10:18:31 -0500 Subject: [PATCH 5541/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 75b13e46db..9209a1dbb0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +Next +---- + +* Pull Request #174: Add more aggressive support for + Windows SDK in msvc9compiler patch. + 20.1.1 ------ From fe6891c949de75626396167a4aae78b276ed0223 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 10:56:53 -0500 Subject: [PATCH 5542/8469] Fix typo, correcting failures on late Pythons when mock is not already installed. --- pkg_resources/tests/test_markers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index 0af3089e78..8d451de3c1 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -1,5 +1,5 @@ try: - import unitest.mock as mock + import unittest.mock as mock except ImportError: import mock From 54f5299b42541b8f2fc56fb24d2fde6fbd4f7078 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 10:58:10 -0500 Subject: [PATCH 5543/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 95d44e68fa..0ec49a674c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ CHANGES * Pull Request #173: Replace dual PEP 345 _markerlib implementation and PEP 426 implementation of environment marker support from packaging 16.1 and PEP 508. Fixes Issue #122. + See also Pull Request #175, Pull Request #168, and + Pull Request #164. 20.1.1 ------ From be18a01654d05ebfba04e713c20c1fbd4d170dc3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:10:17 -0500 Subject: [PATCH 5544/8469] Add hyperlinks to PEPs in changelog. --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index c2a6387309..155f83f3a4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -250,6 +250,10 @@ pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', ), + dict( + pattern=r"PEP[- ](?P\d+)", + url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', + ), ], ), } From 1b31a684e7198b9f46faaeddcae0cb94a0e43e84 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:12:13 -0500 Subject: [PATCH 5545/8469] Add timestamps to changelog. --- docs/conf.py | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 155f83f3a4..1a4da380fe 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -254,6 +254,10 @@ pattern=r"PEP[- ](?P\d+)", url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), + dict( + pattern=r"^(?m)((?P\d+(\.\d+){1,2}))\n[-=]+\n", + with_scm="{text}\n{rev[timestamp]}\n", + ), ], ), } diff --git a/setup.py b/setup.py index 2aedfc1237..a59d374d4f 100755 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def _gen_console_scripts(): needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) -sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else [] +sphinx = ['sphinx', 'rst.linker>=1.4'] if needs_sphinx else [] setup_params = dict( name="setuptools", From d5bedd9e5ffd604476a9ee794ad744393c856aeb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:17:06 -0500 Subject: [PATCH 5546/8469] Remove explicit PEP links now that the linker handles it. --- CHANGES.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 75b13e46db..307803e3e7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -165,8 +165,7 @@ CHANGES for the issue reported in Pull Request #155. * Issue #453: In ``ez_setup`` bootstrap module, unload all ``pkg_resources`` modules following download. -* Pull Request #158: Honor `PEP-488 - `_ when excluding +* Pull Request #158: Honor PEP-488 when excluding files for namespace packages. * Issue #419 and Pull Request #144: Add experimental support for reading the version info from distutils-installed metadata rather @@ -626,7 +625,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 8.0 --- -* Implement `PEP 440 `_ within +* Implement PEP 440 within pkg_resources and setuptools. This change deprecates some version numbers such that they will no longer be installable without using the ``===`` escape hatch. See `the changes to test_resources @@ -1699,7 +1698,7 @@ how it parses version numbers. * Distribute #65: cli.exe and gui.exe are now generated at build time, depending on the platform in use. -* Distribute #67: Fixed doc typo (PEP 381/382) +* Distribute #67: Fixed doc typo (PEP 381/PEP 382). * Distribute no longer shadows setuptools if we require a 0.7-series setuptools. And an error is raised when installing a 0.7 setuptools with From 95c576ffedcf2312c24a7595a8f2da7f8994afcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:17:46 -0500 Subject: [PATCH 5547/8469] Update changelog --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 307803e3e7..fca4406833 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,11 @@ CHANGES ======= +20.2 +---- + +* Changelog now includes release dates and links to PEPs. + 20.1.1 ------ From 2c460f86e5b8669168088d78fac563bad363c24d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:23:43 -0500 Subject: [PATCH 5548/8469] Bumped to 20.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 09bbb730c0..425e19d9a2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '19.3' +__version__ = '20.2' From 707c631f8ff144fa76a37a38f6ab7ba0e03f9a9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:23:46 -0500 Subject: [PATCH 5549/8469] Added tag 20.2 for changeset 74c4ffbe1f39 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e2bfe097a0..f2b0e2b7b5 100644 --- a/.hgtags +++ b/.hgtags @@ -246,3 +246,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 2a60daeff0cdb039b20b2058aaad7dae7bcd2c1c 20.0 06c9d3ffae80d7f5786c0a454d040d253d47fc03 20.1 919a40f1843131249f98104c73f3aee3fc835e67 20.1.1 +74c4ffbe1f399345eb4f6a64785cfff54f7e6e7e 20.2 From 43ed305c15d7da6c5b0a1f42e0ded028105a05df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 11:44:29 -0500 Subject: [PATCH 5550/8469] Bumped to 20.3 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 425e19d9a2..7e20c8bf5a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.2' +__version__ = '20.3' From a8a49c4aab1410a11b8e75e5003b0df88875d2c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 16:08:32 -0500 Subject: [PATCH 5551/8469] Update changelog to reflect new findings. --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2bfec5fdf7..63ae24fd88 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,7 +10,12 @@ CHANGES and PEP 426 implementation of environment marker support from packaging 16.1 and PEP 508. Fixes Issue #122. See also Pull Request #175, Pull Request #168, and - Pull Request #164. + Pull Request #164. Additionally: + - ``Requirement.parse`` no longer retains the order of extras. + - ``parse_requirements`` now requires that all versions be + PEP-440 compliant, as revealed in #499. Packages released + with invalid local versions should be re-released using + the proper local version syntax, e.g. ``mypkg-1.0+myorg.1``. 20.1.1 ------ From 2ac4408ba8b0d6203b9556fe819f393040230aaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Feb 2016 16:13:30 -0500 Subject: [PATCH 5552/8469] Add test capturing previously allowed usage. Ref #499. --- pkg_resources/tests/test_resources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7b98ae0d91..a8bf35fc9c 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -508,6 +508,9 @@ def testSimpleRequirements(self): with pytest.raises(ValueError): Requirement.parse("#") + def test_local_version(self): + req, = parse_requirements('foo==1.0.org1') + def testVersionEquality(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) From b7292405eeb61fac73fb5507c30e169a47166723 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 23 Feb 2016 14:25:06 +1100 Subject: [PATCH 5553/8469] Update to packaging 16.4. Fixes #499. --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/requirements.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 8 +++++--- pkg_resources/_vendor/vendored.txt | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index 313613b953..e4c32ea179 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,7 +12,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.1" +__version__ = "16.4" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 16032ac6b2..361f157bbb 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -47,7 +47,7 @@ class InvalidRequirement(ValueError): VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE) VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) -VERSION_ONE = VERSION_PEP440 | VERSION_LEGACY +VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",")("_raw_spec") _VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 31845c611a..5ee8f02339 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -218,9 +218,11 @@ class LegacySpecifier(_IndividualSpecifier): (?P(==|!=|<=|>=|<|>)) \s* (?P - [^\s]* # We just match everything, except for whitespace since this - # is a "legacy" specifier and the version string can be just - # about anything. + [^;\s)]* # We just match everything, except for whitespace, + # a semi-colon for marker support, and closing paren + # since versions can be enclosed in them. Since this is + # a "legacy" specifier and the version string can be + # just about anything. ) """ ) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index fbaaa5f186..002ef95556 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ -packaging==16.1 +packaging==16.4 pyparsing==2.0.6 six==1.10.0 From b165a8bec12ec7a7cf606ceb83e94e80f22445dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 11:01:28 -0400 Subject: [PATCH 5554/8469] Rename variable for consistency --- setuptools/msvc9_support.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 7e8a2a25d0..2524ec414c 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -88,7 +88,7 @@ def query_vcvarsall(version, *args, **kwargs): raise distutils.errors.DistutilsPlatformError(message) raise distutils.errors.DistutilsPlatformError(message) -def setvcenv(VcVer, arch): +def setvcenv(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. @@ -114,7 +114,7 @@ def setvcenv(VcVer, arch): VsReg = r'Software%s\Microsoft\VisualStudio\SxS\VS7' % node VcReg = r'Software%s\Microsoft\VisualStudio\SxS\VC7' % node VcForPythonReg = r'Software%s\Microsoft\DevDiv\VCForPython\%0.1f' %\ - (node, VcVer) + (node, version) WindowsSdkReg = r'Software%s\Microsoft\Microsoft SDKs\Windows' % node # Set Platform subdirectories @@ -140,16 +140,16 @@ def setvcenv(VcVer, arch): # Find Microsoft Visual Studio directory try: # Try to get it from registry - VsInstallDir = reg_value(VsReg, '%0.1f' % VcVer) + VsInstallDir = reg_value(VsReg, '%0.1f' % version) except KeyError: # If fail, use default path VsInstallDir = join(ProgramFilesX86, - 'Microsoft Visual Studio %0.1f' % VcVer) + 'Microsoft Visual Studio %0.1f' % version) # Find Microsoft Visual C++ directory try: # Try to get it from registry - VcInstallDir = reg_value(VcReg, '%0.1f' % VcVer) + VcInstallDir = reg_value(VcReg, '%0.1f' % version) except KeyError: try: # Try to get "VC++ for Python" version from registry @@ -157,16 +157,16 @@ def setvcenv(VcVer, arch): except KeyError: # If fail, use default path VcInstallDir = join(ProgramFilesX86, - r'Microsoft Visual Studio %0.1f\VC' % VcVer) + r'Microsoft Visual Studio %0.1f\VC' % version) if not isdir(VcInstallDir): raise DistutilsPlatformError('vcvarsall.bat and Visual C++ ' 'directory not found') # Find Microsoft Windows SDK directory WindowsSdkDir = '' - if VcVer == 9.0: + if version == 9.0: WindowsSdkVer = ('7.0', '6.1', '6.0a') - elif VcVer == 10.0: + elif version == 10.0: WindowsSdkVer = ('7.1', '7.0a') else: WindowsSdkVer = () @@ -212,7 +212,7 @@ def setvcenv(VcVer, arch): FrameworkDir64 = join(WinDir, r'Microsoft.NET\Framework64') # Find Microsoft .NET Framework Versions - if VcVer == 10.0: + if version == 10.0: try: # Try to get v4 from registry v4 = reg_value(VcReg, 'frameworkver32') @@ -222,9 +222,9 @@ def setvcenv(VcVer, arch): # If fail, use last v4 version v4 = 'v4.0.30319' FrameworkVer = (v4, 'v3.5') - elif VcVer == 9.0: + elif version == 9.0: FrameworkVer = ('v3.5', 'v2.0.50727') - elif VcVer == 8.0: + elif version == 8.0: FrameworkVer = ('v3.0', 'v2.0.50727') # Set Microsoft Visual Studio Tools @@ -255,7 +255,7 @@ def setvcenv(VcVer, arch): SdkTools = [join(WindowsSdkDir, 'Bin')] if Tar_not_x86: SdkTools.append(join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) - if VcVer == 10.0: + if version == 10.0: SdkTools.append(join(WindowsSdkDir, r'Bin\NETFX 4.0 Tools' + plt_subd_sdk)) From 17379ffe70c7d6c8c7de65013c91bc20c7b8b274 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 11:10:47 -0400 Subject: [PATCH 5555/8469] Include 'arch' in the function signature rather than processing arguments by hand. --- setuptools/msvc9_support.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 2524ec414c..fc8102c9c3 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -47,12 +47,12 @@ def find_vcvarsall(version): return unpatched['find_vcvarsall'](version) -def query_vcvarsall(version, *args, **kwargs): +def query_vcvarsall(version, arch='x86', *args, **kwargs): message = '' # Try to get environement from vcvarsall.bat (Classical way) try: - return unpatched['query_vcvarsall'](version, *args, **kwargs) + return unpatched['query_vcvarsall'](version, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError as exc: # Error if Vcvarsall.bat is missing message = exc.args[0] @@ -62,11 +62,7 @@ def query_vcvarsall(version, *args, **kwargs): # If vcvarsall.bat fail, try to set environment directly try: - if not args: - arch = 'x86' - else: - arch = args[0] - return setvcenv(version, kwargs.get('arch', arch)) + return setvcenv(version, arch) except distutils.errors.DistutilsPlatformError as exc: # Error if MSVC++ directory not found or environment not set message = exc.args[0] From 21480cfc6fbe1da481698484549ecb490f098994 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 11:14:33 -0400 Subject: [PATCH 5556/8469] Make function private and don't use a different name for it, as it performs the same purpose. Also, it doesn't set anything. --- setuptools/msvc9_support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index fc8102c9c3..3b5133c8a9 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -62,7 +62,7 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): # If vcvarsall.bat fail, try to set environment directly try: - return setvcenv(version, arch) + return _query_vcvarsall(version, arch) except distutils.errors.DistutilsPlatformError as exc: # Error if MSVC++ directory not found or environment not set message = exc.args[0] @@ -84,7 +84,7 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): raise distutils.errors.DistutilsPlatformError(message) raise distutils.errors.DistutilsPlatformError(message) -def setvcenv(version, arch): +def _query_vcvarsall(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. From 36ec20b295897ff953908af0fd2791e56ae3d0b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 13:41:06 -0400 Subject: [PATCH 5557/8469] Move imports to the top and normalize usage. --- setuptools/msvc9_support.py | 90 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 3b5133c8a9..2d5d2a8405 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1,3 +1,6 @@ +import os +import distutils.errors + try: import distutils.msvc9compiler except ImportError: @@ -40,8 +43,7 @@ def find_vcvarsall(version): productdir = None if productdir: - import os - vcvarsall = os.path.join(productdir, "vcvarsall.bat") + vcvarsall = os.path.os.path.join(productdir, "vcvarsall.bat") if os.path.isfile(vcvarsall): return vcvarsall @@ -89,20 +91,16 @@ def _query_vcvarsall(version, arch): Return environment variables for specified Microsoft Visual C++ version and platform. """ - from os.path import join, isdir - from os import environ - from distutils.errors import DistutilsPlatformError - # Find current and target architecture - CurrentCpu = environ['processor_architecture'].lower() + CurrentCpu = os.environ['processor_architecture'].lower() TargetCpu = arch[arch.find('_') + 1:] Tar_not_x86 = TargetCpu != 'x86' Cur_not_x86 = CurrentCpu != 'x86' # Find "Windows" and "Program Files" system directories - WinDir = environ['WinDir'] - ProgramFiles = environ['ProgramFiles'] - ProgramFilesX86 = environ.get('ProgramFiles(x86)', ProgramFiles) + WinDir = os.environ['WinDir'] + ProgramFiles = os.environ['ProgramFiles'] + ProgramFilesX86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) # Set registry base paths reg_value = distutils.msvc9compiler.Reg.get_value @@ -139,7 +137,7 @@ def _query_vcvarsall(version, arch): VsInstallDir = reg_value(VsReg, '%0.1f' % version) except KeyError: # If fail, use default path - VsInstallDir = join(ProgramFilesX86, + VsInstallDir = os.path.join(ProgramFilesX86, 'Microsoft Visual Studio %0.1f' % version) # Find Microsoft Visual C++ directory @@ -149,13 +147,13 @@ def _query_vcvarsall(version, arch): except KeyError: try: # Try to get "VC++ for Python" version from registry - VcInstallDir = join(reg_value(VcForPythonReg, 'installdir'), 'VC') + VcInstallDir = os.path.join(reg_value(VcForPythonReg, 'installdir'), 'VC') except KeyError: # If fail, use default path - VcInstallDir = join(ProgramFilesX86, + VcInstallDir = os.path.join(ProgramFilesX86, r'Microsoft Visual Studio %0.1f\VC' % version) - if not isdir(VcInstallDir): - raise DistutilsPlatformError('vcvarsall.bat and Visual C++ ' + if not os.path.isdir(VcInstallDir): + raise distutils.errors.DistutilsPlatformError('vcvarsall.bat and Visual C++ ' 'directory not found') # Find Microsoft Windows SDK directory @@ -169,27 +167,27 @@ def _query_vcvarsall(version, arch): for ver in WindowsSdkVer: # Try to get it from registry try: - WindowsSdkDir = reg_value(join(WindowsSdkReg, 'v%s' % ver), + WindowsSdkDir = reg_value(os.path.join(WindowsSdkReg, 'v%s' % ver), 'installationfolder') break except KeyError: pass - if not WindowsSdkDir or not isdir(WindowsSdkDir): + if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # Try to get "VC++ for Python" version from registry try: - WindowsSdkDir = join(reg_value(VcForPythonReg, 'installdir'), + WindowsSdkDir = os.path.join(reg_value(VcForPythonReg, 'installdir'), 'WinSDK') except: pass - if not WindowsSdkDir or not isdir(WindowsSdkDir): + if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # If fail, use default path for ver in WindowsSdkVer: - d = join(ProgramFiles, r'Microsoft SDKs\Windows\v%s' % ver) - if isdir(d): + d = os.path.join(ProgramFiles, r'Microsoft SDKs\Windows\v%s' % ver) + if os.path.isdir(d): WindowsSdkDir = d if not WindowsSdkDir: # If fail, use Platform SDK - WindowsSdkDir = join(VcInstallDir, 'PlatformSDK') + WindowsSdkDir = os.path.join(VcInstallDir, 'PlatformSDK') # Find Microsoft .NET Framework 32bit directory try: @@ -197,7 +195,7 @@ def _query_vcvarsall(version, arch): FrameworkDir32 = reg_value(VcReg, 'frameworkdir32') except KeyError: # If fail, use default path - FrameworkDir32 = join(WinDir, r'Microsoft.NET\Framework') + FrameworkDir32 = os.path.join(WinDir, r'Microsoft.NET\Framework') # Find Microsoft .NET Framework 64bit directory try: @@ -205,7 +203,7 @@ def _query_vcvarsall(version, arch): FrameworkDir64 = reg_value(VcReg, 'frameworkdir64') except KeyError: # If fail, use default path - FrameworkDir64 = join(WinDir, r'Microsoft.NET\Framework64') + FrameworkDir64 = os.path.join(WinDir, r'Microsoft.NET\Framework64') # Find Microsoft .NET Framework Versions if version == 10.0: @@ -224,48 +222,48 @@ def _query_vcvarsall(version, arch): FrameworkVer = ('v3.0', 'v2.0.50727') # Set Microsoft Visual Studio Tools - VSTools = [join(VsInstallDir, r'Common7\IDE'), - join(VsInstallDir, r'Common7\Tools')] + VSTools = [os.path.join(VsInstallDir, r'Common7\IDE'), + os.path.join(VsInstallDir, r'Common7\Tools')] # Set Microsoft Visual C++ Includes - VCIncludes = [join(VcInstallDir, 'Include')] + VCIncludes = [os.path.join(VcInstallDir, 'Include')] # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries - VCLibraries = [join(VcInstallDir, 'Lib' + plt_subd_lib), - join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib)] + VCLibraries = [os.path.join(VcInstallDir, 'Lib' + plt_subd_lib), + os.path.join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib)] # Set Microsoft Visual C++ Tools - VCTools = [join(VcInstallDir, 'VCPackages'), - join(VcInstallDir, 'Bin' + plt_subd_tools)] + VCTools = [os.path.join(VcInstallDir, 'VCPackages'), + os.path.join(VcInstallDir, 'Bin' + plt_subd_tools)] if plt_subd_tools: - VCTools.append(join(VcInstallDir, 'Bin')) + VCTools.append(os.path.join(VcInstallDir, 'Bin')) # Set Microsoft Windows SDK Include - OSLibraries = [join(WindowsSdkDir, 'Lib' + plt_subd_sdk)] + OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + plt_subd_sdk)] # Set Microsoft Windows SDK Libraries - OSIncludes = [join(WindowsSdkDir, 'Include'), - join(WindowsSdkDir, r'Include\gl')] + OSIncludes = [os.path.join(WindowsSdkDir, 'Include'), + os.path.join(WindowsSdkDir, r'Include\gl')] # Set Microsoft Windows SDK Tools - SdkTools = [join(WindowsSdkDir, 'Bin')] + SdkTools = [os.path.join(WindowsSdkDir, 'Bin')] if Tar_not_x86: - SdkTools.append(join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) + SdkTools.append(os.path.join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) if version == 10.0: - SdkTools.append(join(WindowsSdkDir, + SdkTools.append(os.path.join(WindowsSdkDir, r'Bin\NETFX 4.0 Tools' + plt_subd_sdk)) # Set Microsoft Windows SDK Setup - SdkSetup = [join(WindowsSdkDir, 'Setup')] + SdkSetup = [os.path.join(WindowsSdkDir, 'Setup')] # Set Microsoft .NET Framework Tools - FxTools = [join(FrameworkDir32, ver) for ver in FrameworkVer] + FxTools = [os.path.join(FrameworkDir32, ver) for ver in FrameworkVer] if Tar_not_x86 and Cur_not_x86: for ver in FrameworkVer: - FxTools.append(join(FrameworkDir64, ver)) + FxTools.append(os.path.join(FrameworkDir64, ver)) # Set Microsoft Visual Studio Team System Database - VsTDb = [join(VsInstallDir, r'VSTSDB\Deploy')] + VsTDb = [os.path.join(VsInstallDir, r'VSTSDB\Deploy')] # Return Environment Variables env = {} @@ -276,7 +274,7 @@ def _query_vcvarsall(version, arch): def checkpath(path, varlist): # Function that add valid paths in list in not already present - if isdir(path) and path not in varlist: + if os.path.isdir(path) and path not in varlist: varlist.append(path) for key in env.keys(): @@ -288,15 +286,15 @@ def checkpath(path, varlist): # Add values from actual environment try: - for val in environ[key].split(';'): + for val in os.environ[key].split(';'): checkpath(val, var) except KeyError: pass # Format paths to Environment Variable string if var: - env[key] = ';'.join(var) + env[key] = ';'.os.path.join(var) else: - raise DistutilsPlatformError("%s environment variable is empty" % + raise distutils.errors.DistutilsPlatformError("%s environment variable is empty" % key.upper()) return env From d773b79ae2143f18c941179f1b4e39a3e5c460af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 13:50:28 -0400 Subject: [PATCH 5558/8469] Reindent to eliminate long lines and hanging indents. --- setuptools/msvc9_support.py | 52 +++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 2d5d2a8405..095957fa5e 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -137,8 +137,8 @@ def _query_vcvarsall(version, arch): VsInstallDir = reg_value(VsReg, '%0.1f' % version) except KeyError: # If fail, use default path - VsInstallDir = os.path.join(ProgramFilesX86, - 'Microsoft Visual Studio %0.1f' % version) + name = 'Microsoft Visual Studio %0.1f' % version + VsInstallDir = os.path.join(ProgramFilesX86, name) # Find Microsoft Visual C++ directory try: @@ -147,14 +147,15 @@ def _query_vcvarsall(version, arch): except KeyError: try: # Try to get "VC++ for Python" version from registry - VcInstallDir = os.path.join(reg_value(VcForPythonReg, 'installdir'), 'VC') + install_base = reg_value(VcForPythonReg, 'installdir') + VcInstallDir = os.path.join(install_base, 'VC') except KeyError: # If fail, use default path - VcInstallDir = os.path.join(ProgramFilesX86, - r'Microsoft Visual Studio %0.1f\VC' % version) + default = r'Microsoft Visual Studio %0.1f\VC' % version + VcInstallDir = os.path.join(ProgramFilesX86, default) if not os.path.isdir(VcInstallDir): - raise distutils.errors.DistutilsPlatformError('vcvarsall.bat and Visual C++ ' - 'directory not found') + msg = 'vcvarsall.bat and Visual C++ directory not found' + raise distutils.errors.DistutilsPlatformError(msg) # Find Microsoft Windows SDK directory WindowsSdkDir = '' @@ -167,22 +168,23 @@ def _query_vcvarsall(version, arch): for ver in WindowsSdkVer: # Try to get it from registry try: - WindowsSdkDir = reg_value(os.path.join(WindowsSdkReg, 'v%s' % ver), - 'installationfolder') + loc = os.path.join(WindowsSdkReg, 'v%s' % ver) + WindowsSdkDir = reg_value(loc, 'installationfolder') break except KeyError: pass if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # Try to get "VC++ for Python" version from registry try: - WindowsSdkDir = os.path.join(reg_value(VcForPythonReg, 'installdir'), - 'WinSDK') + install_base = reg_value(VcForPythonReg, 'installdir') + WindowsSdkDir = os.path.join(install_base, 'WinSDK') except: pass if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # If fail, use default path for ver in WindowsSdkVer: - d = os.path.join(ProgramFiles, r'Microsoft SDKs\Windows\v%s' % ver) + path = r'Microsoft SDKs\Windows\v%s' % ver + d = os.path.join(ProgramFiles, path) if os.path.isdir(d): WindowsSdkDir = d if not WindowsSdkDir: @@ -229,12 +231,16 @@ def _query_vcvarsall(version, arch): VCIncludes = [os.path.join(VcInstallDir, 'Include')] # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries - VCLibraries = [os.path.join(VcInstallDir, 'Lib' + plt_subd_lib), - os.path.join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib)] + VCLibraries = [ + os.path.join(VcInstallDir, 'Lib' + plt_subd_lib), + os.path.join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib), + ] # Set Microsoft Visual C++ Tools - VCTools = [os.path.join(VcInstallDir, 'VCPackages'), - os.path.join(VcInstallDir, 'Bin' + plt_subd_tools)] + VCTools = [ + os.path.join(VcInstallDir, 'VCPackages'), + os.path.join(VcInstallDir, 'Bin' + plt_subd_tools), + ] if plt_subd_tools: VCTools.append(os.path.join(VcInstallDir, 'Bin')) @@ -242,16 +248,18 @@ def _query_vcvarsall(version, arch): OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + plt_subd_sdk)] # Set Microsoft Windows SDK Libraries - OSIncludes = [os.path.join(WindowsSdkDir, 'Include'), - os.path.join(WindowsSdkDir, r'Include\gl')] + OSIncludes = [ + os.path.join(WindowsSdkDir, 'Include'), + os.path.join(WindowsSdkDir, r'Include\gl'), + ] # Set Microsoft Windows SDK Tools SdkTools = [os.path.join(WindowsSdkDir, 'Bin')] if Tar_not_x86: SdkTools.append(os.path.join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) if version == 10.0: - SdkTools.append(os.path.join(WindowsSdkDir, - r'Bin\NETFX 4.0 Tools' + plt_subd_sdk)) + path = r'Bin\NETFX 4.0 Tools' + plt_subd_sdk + SdkTools.append(os.path.join(WindowsSdkDir, path)) # Set Microsoft Windows SDK Setup SdkSetup = [os.path.join(WindowsSdkDir, 'Setup')] @@ -295,6 +303,6 @@ def checkpath(path, varlist): if var: env[key] = ';'.os.path.join(var) else: - raise distutils.errors.DistutilsPlatformError("%s environment variable is empty" % - key.upper()) + msg = "%s environment variable is empty" % key.upper() + raise distutils.errors.DistutilsPlatformError(msg) return env From ad0bd62b505fedcfb0b18585bc8a9a3e55346c55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 13:51:23 -0400 Subject: [PATCH 5559/8469] Remove redundant call --- setuptools/msvc9_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 095957fa5e..4450338304 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -83,7 +83,7 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK for Windows 7": ' message += r'www.microsoft.com/download/details.aspx?id=8279' - raise distutils.errors.DistutilsPlatformError(message) + raise distutils.errors.DistutilsPlatformError(message) def _query_vcvarsall(version, arch): From 3a122756eb4a75048e3778627bac6dd3590fbe5c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:04:10 -0400 Subject: [PATCH 5560/8469] Extract PlatformInfo class for capturing some of the platform info calculations. --- setuptools/msvc9_support.py | 87 ++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 4450338304..2ef94ada17 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -86,16 +86,53 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): raise distutils.errors.DistutilsPlatformError(message) + +class PlatformInfo: + current_cpu = os.environ['processor_architecture'].lower() + + def __init__(self, arch): + self.arch = arch + + @property + def target_cpu(self): + return self.arch[self.arch.find('_') + 1:] + + def target_is_x86(self): + return self.target_cpu == 'x86' + + def current_is_x86(self): + return self.current_cpu != 'x86' + + @property + def lib_extra(self): + return ( + r'\amd64' if self.target_cpu == 'amd64' else + r'\ia64' if self.target_cpu == 'ia64' else + '' + ) + + @property + def sdk_extra(self): + return ( + r'\x64' if self.target_cpu == 'amd64' else + r'\ia64' if self.target_cpu == 'ia64' else + '' + ) + + @property + def tools_extra(self): + path = self.lib_extra + if self.target_cpu != self.current_cpu: + path = path.replace('\\', '\\x86_') + return path + + def _query_vcvarsall(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. """ - # Find current and target architecture - CurrentCpu = os.environ['processor_architecture'].lower() - TargetCpu = arch[arch.find('_') + 1:] - Tar_not_x86 = TargetCpu != 'x86' - Cur_not_x86 = CurrentCpu != 'x86' + pi = PlatformInfo(arch) # Find "Windows" and "Program Files" system directories WinDir = os.environ['WinDir'] @@ -104,33 +141,13 @@ def _query_vcvarsall(version, arch): # Set registry base paths reg_value = distutils.msvc9compiler.Reg.get_value - node = r'\Wow6432Node' if Cur_not_x86 else '' + node = r'\Wow6432Node' if not pi.current_is_x86() else '' VsReg = r'Software%s\Microsoft\VisualStudio\SxS\VS7' % node VcReg = r'Software%s\Microsoft\VisualStudio\SxS\VC7' % node VcForPythonReg = r'Software%s\Microsoft\DevDiv\VCForPython\%0.1f' %\ (node, version) WindowsSdkReg = r'Software%s\Microsoft\Microsoft SDKs\Windows' % node - # Set Platform subdirectories - if TargetCpu == 'amd64': - plt_subd_lib = r'\amd64' - plt_subd_sdk = r'\x64' - if CurrentCpu == 'amd64': - plt_subd_tools = r'\amd64' - else: - plt_subd_tools = r'\x86_amd64' - elif TargetCpu == 'ia64': - plt_subd_lib = r'\ia64' - plt_subd_sdk = r'\ia64' - if CurrentCpu == 'ia64': - plt_subd_tools = r'\ia64' - else: - plt_subd_tools = r'\x86_ia64' - else: - plt_subd_lib = '' - plt_subd_sdk = '' - plt_subd_tools = '' - # Find Microsoft Visual Studio directory try: # Try to get it from registry @@ -232,20 +249,20 @@ def _query_vcvarsall(version, arch): # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries VCLibraries = [ - os.path.join(VcInstallDir, 'Lib' + plt_subd_lib), - os.path.join(VcInstallDir, r'ATLMFC\LIB' + plt_subd_lib), + os.path.join(VcInstallDir, 'Lib' + pi.lib_extra), + os.path.join(VcInstallDir, r'ATLMFC\LIB' + pi.lib_extra), ] # Set Microsoft Visual C++ Tools VCTools = [ os.path.join(VcInstallDir, 'VCPackages'), - os.path.join(VcInstallDir, 'Bin' + plt_subd_tools), + os.path.join(VcInstallDir, 'Bin' + pi.tools_extra), ] - if plt_subd_tools: + if pi.tools_extra: VCTools.append(os.path.join(VcInstallDir, 'Bin')) # Set Microsoft Windows SDK Include - OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + plt_subd_sdk)] + OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + pi.sdk_extra)] # Set Microsoft Windows SDK Libraries OSIncludes = [ @@ -255,10 +272,10 @@ def _query_vcvarsall(version, arch): # Set Microsoft Windows SDK Tools SdkTools = [os.path.join(WindowsSdkDir, 'Bin')] - if Tar_not_x86: - SdkTools.append(os.path.join(WindowsSdkDir, 'Bin' + plt_subd_sdk)) + if not pi.target_is_x86(): + SdkTools.append(os.path.join(WindowsSdkDir, 'Bin' + pi.sdk_extra)) if version == 10.0: - path = r'Bin\NETFX 4.0 Tools' + plt_subd_sdk + path = r'Bin\NETFX 4.0 Tools' + pi.sdk_extra SdkTools.append(os.path.join(WindowsSdkDir, path)) # Set Microsoft Windows SDK Setup @@ -266,7 +283,7 @@ def _query_vcvarsall(version, arch): # Set Microsoft .NET Framework Tools FxTools = [os.path.join(FrameworkDir32, ver) for ver in FrameworkVer] - if Tar_not_x86 and Cur_not_x86: + if not pi.target_is_x86() and not pi.current_is_x86(): for ver in FrameworkVer: FxTools.append(os.path.join(FrameworkDir64, ver)) From 9919fdfa31b19a1f9741dba6ba5ee94c0a4cbbae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:08:39 -0400 Subject: [PATCH 5561/8469] Pull program files and win dir resolution into PlatformInfo --- setuptools/msvc9_support.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 2ef94ada17..d1b7b11f84 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -89,6 +89,9 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): class PlatformInfo: current_cpu = os.environ['processor_architecture'].lower() + win_dir = os.environ['WinDir'] + program_files = os.environ['ProgramFiles'] + program_files_x86 = os.environ.get('ProgramFiles(x86)', program_files) def __init__(self, arch): self.arch = arch @@ -134,11 +137,6 @@ def _query_vcvarsall(version, arch): """ pi = PlatformInfo(arch) - # Find "Windows" and "Program Files" system directories - WinDir = os.environ['WinDir'] - ProgramFiles = os.environ['ProgramFiles'] - ProgramFilesX86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) - # Set registry base paths reg_value = distutils.msvc9compiler.Reg.get_value node = r'\Wow6432Node' if not pi.current_is_x86() else '' @@ -155,7 +153,7 @@ def _query_vcvarsall(version, arch): except KeyError: # If fail, use default path name = 'Microsoft Visual Studio %0.1f' % version - VsInstallDir = os.path.join(ProgramFilesX86, name) + VsInstallDir = os.path.join(pi.program_files_x86, name) # Find Microsoft Visual C++ directory try: @@ -169,7 +167,7 @@ def _query_vcvarsall(version, arch): except KeyError: # If fail, use default path default = r'Microsoft Visual Studio %0.1f\VC' % version - VcInstallDir = os.path.join(ProgramFilesX86, default) + VcInstallDir = os.path.join(pi.program_files_x86, default) if not os.path.isdir(VcInstallDir): msg = 'vcvarsall.bat and Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) @@ -201,7 +199,7 @@ def _query_vcvarsall(version, arch): # If fail, use default path for ver in WindowsSdkVer: path = r'Microsoft SDKs\Windows\v%s' % ver - d = os.path.join(ProgramFiles, path) + d = os.path.join(pi.program_files, path) if os.path.isdir(d): WindowsSdkDir = d if not WindowsSdkDir: @@ -214,7 +212,7 @@ def _query_vcvarsall(version, arch): FrameworkDir32 = reg_value(VcReg, 'frameworkdir32') except KeyError: # If fail, use default path - FrameworkDir32 = os.path.join(WinDir, r'Microsoft.NET\Framework') + FrameworkDir32 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') # Find Microsoft .NET Framework 64bit directory try: @@ -222,7 +220,7 @@ def _query_vcvarsall(version, arch): FrameworkDir64 = reg_value(VcReg, 'frameworkdir64') except KeyError: # If fail, use default path - FrameworkDir64 = os.path.join(WinDir, r'Microsoft.NET\Framework64') + FrameworkDir64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') # Find Microsoft .NET Framework Versions if version == 10.0: From 6b07888982b459b98ef358e35f5cd28bd9e720f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:34:29 -0400 Subject: [PATCH 5562/8469] Extract resolution of registry paths into a RegistryInfo object. --- setuptools/msvc9_support.py | 65 +++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index d1b7b11f84..aac6ca1217 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -130,26 +130,57 @@ def tools_extra(self): return path +class RegistryInfo: + def __init__(self, platform_info, version): + self.platform_info = platform_info + self.version = version + + @property + def microsoft(self): + return os.path.join( + 'Software', + '' if self.platform_info.current_is_x86() else 'Wow6432Node', + 'Microsoft', + ) + + @property + def sxs(self): + return os.path.join(self.microsoft, r'VisualStudio\SxS') + + @property + def vc(self): + return os.path.join(self.sxs, 'VC7') + + @property + def vs(self): + return os.path.join(self.sxs, 'VS7') + + @property + def vc_for_python(self): + path = r'DevDiv\VCForPython\%0.1f' % self.version + return os.path.join(self.microsoft, path) + + @property + def windows_sdk(self): + return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') + + def lookup(self, base, key): + return distutils.msvc9compiler.Reg.get_value(base, key) + + def _query_vcvarsall(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. """ pi = PlatformInfo(arch) - - # Set registry base paths - reg_value = distutils.msvc9compiler.Reg.get_value - node = r'\Wow6432Node' if not pi.current_is_x86() else '' - VsReg = r'Software%s\Microsoft\VisualStudio\SxS\VS7' % node - VcReg = r'Software%s\Microsoft\VisualStudio\SxS\VC7' % node - VcForPythonReg = r'Software%s\Microsoft\DevDiv\VCForPython\%0.1f' %\ - (node, version) - WindowsSdkReg = r'Software%s\Microsoft\Microsoft SDKs\Windows' % node + reg = RegistryInfo(pi, version) + reg_value = reg.lookup # Find Microsoft Visual Studio directory try: # Try to get it from registry - VsInstallDir = reg_value(VsReg, '%0.1f' % version) + VsInstallDir = reg_value(reg.vs, '%0.1f' % version) except KeyError: # If fail, use default path name = 'Microsoft Visual Studio %0.1f' % version @@ -158,11 +189,11 @@ def _query_vcvarsall(version, arch): # Find Microsoft Visual C++ directory try: # Try to get it from registry - VcInstallDir = reg_value(VcReg, '%0.1f' % version) + VcInstallDir = reg_value(reg.vc, '%0.1f' % version) except KeyError: try: # Try to get "VC++ for Python" version from registry - install_base = reg_value(VcForPythonReg, 'installdir') + install_base = reg_value(reg.vc_for_python, 'installdir') VcInstallDir = os.path.join(install_base, 'VC') except KeyError: # If fail, use default path @@ -183,7 +214,7 @@ def _query_vcvarsall(version, arch): for ver in WindowsSdkVer: # Try to get it from registry try: - loc = os.path.join(WindowsSdkReg, 'v%s' % ver) + loc = os.path.join(reg.windows_sdk, 'v%s' % ver) WindowsSdkDir = reg_value(loc, 'installationfolder') break except KeyError: @@ -191,7 +222,7 @@ def _query_vcvarsall(version, arch): if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # Try to get "VC++ for Python" version from registry try: - install_base = reg_value(VcForPythonReg, 'installdir') + install_base = reg_value(reg.vc_for_python, 'installdir') WindowsSdkDir = os.path.join(install_base, 'WinSDK') except: pass @@ -209,7 +240,7 @@ def _query_vcvarsall(version, arch): # Find Microsoft .NET Framework 32bit directory try: # Try to get it from registry - FrameworkDir32 = reg_value(VcReg, 'frameworkdir32') + FrameworkDir32 = reg_value(reg.vc, 'frameworkdir32') except KeyError: # If fail, use default path FrameworkDir32 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') @@ -217,7 +248,7 @@ def _query_vcvarsall(version, arch): # Find Microsoft .NET Framework 64bit directory try: # Try to get it from registry - FrameworkDir64 = reg_value(VcReg, 'frameworkdir64') + FrameworkDir64 = reg_value(reg.vc, 'frameworkdir64') except KeyError: # If fail, use default path FrameworkDir64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') @@ -226,7 +257,7 @@ def _query_vcvarsall(version, arch): if version == 10.0: try: # Try to get v4 from registry - v4 = reg_value(VcReg, 'frameworkver32') + v4 = reg_value(reg.vc, 'frameworkver32') if v4.lower()[:2] != 'v4': raise KeyError('Not the V4') except KeyError: From 5f174090a545e6a441d37f7fbe66153544d0e162 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:51:48 -0400 Subject: [PATCH 5563/8469] Have lookup return None when it fails, moving the moving much of the try/except logic into single-line fallback expressions. --- setuptools/msvc9_support.py | 73 ++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index aac6ca1217..6e86b14d40 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -165,7 +165,10 @@ def windows_sdk(self): return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') def lookup(self, base, key): - return distutils.msvc9compiler.Reg.get_value(base, key) + try: + return distutils.msvc9compiler.Reg.get_value(base, key) + except KeyError: + pass def _query_vcvarsall(version, arch): @@ -178,27 +181,22 @@ def _query_vcvarsall(version, arch): reg_value = reg.lookup # Find Microsoft Visual Studio directory - try: - # Try to get it from registry - VsInstallDir = reg_value(reg.vs, '%0.1f' % version) - except KeyError: - # If fail, use default path - name = 'Microsoft Visual Studio %0.1f' % version - VsInstallDir = os.path.join(pi.program_files_x86, name) + name = 'Microsoft Visual Studio %0.1f' % version + default_vs = os.path.join(pi.program_files_x86, name) + VsInstallDir = reg_value(reg.vs, '%0.1f' % version) or default_vs # Find Microsoft Visual C++ directory - try: - # Try to get it from registry - VcInstallDir = reg_value(reg.vc, '%0.1f' % version) - except KeyError: - try: - # Try to get "VC++ for Python" version from registry - install_base = reg_value(reg.vc_for_python, 'installdir') - VcInstallDir = os.path.join(install_base, 'VC') - except KeyError: - # If fail, use default path - default = r'Microsoft Visual Studio %0.1f\VC' % version - VcInstallDir = os.path.join(pi.program_files_x86, default) + + # If fail, use default path + default = r'Microsoft Visual Studio %0.1f\VC' % version + guess_vc = os.path.join(pi.program_files_x86, default) + + # Try to get "VC++ for Python" version from registry + install_base = reg_value(reg.vc_for_python, 'installdir') + default_vc = os.path.join(install_base, 'VC') if install_base else guess_vc + + VcInstallDir = reg_value(reg.vc, '%0.1f' % version) or default_vc + if not os.path.isdir(VcInstallDir): msg = 'vcvarsall.bat and Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) @@ -213,19 +211,15 @@ def _query_vcvarsall(version, arch): WindowsSdkVer = () for ver in WindowsSdkVer: # Try to get it from registry - try: - loc = os.path.join(reg.windows_sdk, 'v%s' % ver) - WindowsSdkDir = reg_value(loc, 'installationfolder') + loc = os.path.join(reg.windows_sdk, 'v%s' % ver) + WindowsSdkDir = reg_value(loc, 'installationfolder') + if WindowsSdkDir: break - except KeyError: - pass if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # Try to get "VC++ for Python" version from registry - try: - install_base = reg_value(reg.vc_for_python, 'installdir') + install_base = reg_value(reg.vc_for_python, 'installdir') + if install_base: WindowsSdkDir = os.path.join(install_base, 'WinSDK') - except: - pass if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # If fail, use default path for ver in WindowsSdkVer: @@ -238,23 +232,20 @@ def _query_vcvarsall(version, arch): WindowsSdkDir = os.path.join(VcInstallDir, 'PlatformSDK') # Find Microsoft .NET Framework 32bit directory - try: - # Try to get it from registry - FrameworkDir32 = reg_value(reg.vc, 'frameworkdir32') - except KeyError: - # If fail, use default path - FrameworkDir32 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') + guess_fw = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') + FrameworkDir32 = reg_value(reg.vc, 'frameworkdir32') or guess_fw # Find Microsoft .NET Framework 64bit directory - try: - # Try to get it from registry - FrameworkDir64 = reg_value(reg.vc, 'frameworkdir64') - except KeyError: - # If fail, use default path - FrameworkDir64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') + guess_fw64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') + FrameworkDir64 = reg_value(reg.vc, 'frameworkdir64') or guess_fw64 # Find Microsoft .NET Framework Versions if version == 10.0: + v4 = reg_value(reg.vc, 'frameworkver32') + if v4 and v4.lower()[:2] != 'v4': + v4 = None + v4 = v4 or 'v4.0.30319' + try: # Try to get v4 from registry v4 = reg_value(reg.vc, 'frameworkver32') From 758b4249b82b63657fe1b31d59810b4ee098473c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:53:08 -0400 Subject: [PATCH 5564/8469] Remove another hanging indent --- setuptools/msvc9_support.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 6e86b14d40..fbf81bab6e 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -241,19 +241,11 @@ def _query_vcvarsall(version, arch): # Find Microsoft .NET Framework Versions if version == 10.0: - v4 = reg_value(reg.vc, 'frameworkver32') - if v4 and v4.lower()[:2] != 'v4': + v4 = reg_value(reg.vc, 'frameworkver32') or '' + if v4.lower()[:2] != 'v4': v4 = None + # default to last v4 version v4 = v4 or 'v4.0.30319' - - try: - # Try to get v4 from registry - v4 = reg_value(reg.vc, 'frameworkver32') - if v4.lower()[:2] != 'v4': - raise KeyError('Not the V4') - except KeyError: - # If fail, use last v4 version - v4 = 'v4.0.30319' FrameworkVer = (v4, 'v3.5') elif version == 9.0: FrameworkVer = ('v3.5', 'v2.0.50727') @@ -261,8 +253,10 @@ def _query_vcvarsall(version, arch): FrameworkVer = ('v3.0', 'v2.0.50727') # Set Microsoft Visual Studio Tools - VSTools = [os.path.join(VsInstallDir, r'Common7\IDE'), - os.path.join(VsInstallDir, r'Common7\Tools')] + VSTools = [ + os.path.join(VsInstallDir, r'Common7\IDE'), + os.path.join(VsInstallDir, r'Common7\Tools'), + ] # Set Microsoft Visual C++ Includes VCIncludes = [os.path.join(VcInstallDir, 'Include')] From 6d11de6d754a73307dd62c7ba499c3f14c5f675b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 15:56:47 -0400 Subject: [PATCH 5565/8469] Move finding of visual studio into RegistryInfo --- setuptools/msvc9_support.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index fbf81bab6e..7728eb79bb 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -164,6 +164,14 @@ def vc_for_python(self): def windows_sdk(self): return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') + def find_visual_studio(self): + """ + Find Microsoft Visual Studio directory + """ + name = 'Microsoft Visual Studio %0.1f' % self.version + default = os.path.join(self.platform_info.program_files_x86, name) + return self.lookup(self.vs, '%0.1f' % self.version) or default + def lookup(self, base, key): try: return distutils.msvc9compiler.Reg.get_value(base, key) @@ -180,11 +188,6 @@ def _query_vcvarsall(version, arch): reg = RegistryInfo(pi, version) reg_value = reg.lookup - # Find Microsoft Visual Studio directory - name = 'Microsoft Visual Studio %0.1f' % version - default_vs = os.path.join(pi.program_files_x86, name) - VsInstallDir = reg_value(reg.vs, '%0.1f' % version) or default_vs - # Find Microsoft Visual C++ directory # If fail, use default path @@ -254,8 +257,8 @@ def _query_vcvarsall(version, arch): # Set Microsoft Visual Studio Tools VSTools = [ - os.path.join(VsInstallDir, r'Common7\IDE'), - os.path.join(VsInstallDir, r'Common7\Tools'), + os.path.join(reg.find_visual_studio(), r'Common7\IDE'), + os.path.join(reg.find_visual_studio(), r'Common7\Tools'), ] # Set Microsoft Visual C++ Includes @@ -302,7 +305,7 @@ def _query_vcvarsall(version, arch): FxTools.append(os.path.join(FrameworkDir64, ver)) # Set Microsoft Visual Studio Team System Database - VsTDb = [os.path.join(VsInstallDir, r'VSTSDB\Deploy')] + VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] # Return Environment Variables env = {} From 0dc21cb9a6a5195f1b7e6ae47901b32fb9b486eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:17:48 -0500 Subject: [PATCH 5566/8469] Extract find_visual_c method into RegistryInfo --- setuptools/msvc9_support.py | 50 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 7728eb79bb..4a1ec54ee7 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -172,6 +172,26 @@ def find_visual_studio(self): default = os.path.join(self.platform_info.program_files_x86, name) return self.lookup(self.vs, '%0.1f' % self.version) or default + def find_visual_c(self): + """ + Find Microsoft Visual C++ directory + """ + # If fail, use default path + default = r'Microsoft Visual Studio %0.1f\VC' % self.version + guess_vc = os.path.join(self.platform_info.program_files_x86, default) + + # Try to get "VC++ for Python" version from registry + install_base = self.lookup(self.vc_for_python, 'installdir') + default_vc = os.path.join(install_base, 'VC') if install_base else guess_vc + + result = self.lookup(self.vc, '%0.1f' % self.version) or default_vc + + if not os.path.isdir(result): + msg = 'vcvarsall.bat and Visual C++ directory not found' + raise distutils.errors.DistutilsPlatformError(msg) + + return result + def lookup(self, base, key): try: return distutils.msvc9compiler.Reg.get_value(base, key) @@ -188,22 +208,6 @@ def _query_vcvarsall(version, arch): reg = RegistryInfo(pi, version) reg_value = reg.lookup - # Find Microsoft Visual C++ directory - - # If fail, use default path - default = r'Microsoft Visual Studio %0.1f\VC' % version - guess_vc = os.path.join(pi.program_files_x86, default) - - # Try to get "VC++ for Python" version from registry - install_base = reg_value(reg.vc_for_python, 'installdir') - default_vc = os.path.join(install_base, 'VC') if install_base else guess_vc - - VcInstallDir = reg_value(reg.vc, '%0.1f' % version) or default_vc - - if not os.path.isdir(VcInstallDir): - msg = 'vcvarsall.bat and Visual C++ directory not found' - raise distutils.errors.DistutilsPlatformError(msg) - # Find Microsoft Windows SDK directory WindowsSdkDir = '' if version == 9.0: @@ -232,7 +236,7 @@ def _query_vcvarsall(version, arch): WindowsSdkDir = d if not WindowsSdkDir: # If fail, use Platform SDK - WindowsSdkDir = os.path.join(VcInstallDir, 'PlatformSDK') + WindowsSdkDir = os.path.join(reg.find_visual_c(), 'PlatformSDK') # Find Microsoft .NET Framework 32bit directory guess_fw = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') @@ -262,21 +266,21 @@ def _query_vcvarsall(version, arch): ] # Set Microsoft Visual C++ Includes - VCIncludes = [os.path.join(VcInstallDir, 'Include')] + VCIncludes = [os.path.join(reg.find_visual_c(), 'Include')] # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries VCLibraries = [ - os.path.join(VcInstallDir, 'Lib' + pi.lib_extra), - os.path.join(VcInstallDir, r'ATLMFC\LIB' + pi.lib_extra), + os.path.join(reg.find_visual_c(), 'Lib' + pi.lib_extra), + os.path.join(reg.find_visual_c(), r'ATLMFC\LIB' + pi.lib_extra), ] # Set Microsoft Visual C++ Tools VCTools = [ - os.path.join(VcInstallDir, 'VCPackages'), - os.path.join(VcInstallDir, 'Bin' + pi.tools_extra), + os.path.join(reg.find_visual_c(), 'VCPackages'), + os.path.join(reg.find_visual_c(), 'Bin' + pi.tools_extra), ] if pi.tools_extra: - VCTools.append(os.path.join(VcInstallDir, 'Bin')) + VCTools.append(os.path.join(reg.find_visual_c(), 'Bin')) # Set Microsoft Windows SDK Include OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + pi.sdk_extra)] From 0a3b6506627f7caddc400ce779d9a9dc4b3505e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:22:12 -0500 Subject: [PATCH 5567/8469] Extract find_windows_sdk method in RegistryInfo. --- setuptools/msvc9_support.py | 78 +++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 4a1ec54ee7..8fb532e7b1 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -192,6 +192,40 @@ def find_visual_c(self): return result + def find_windows_sdk(self): + """ + Find Microsoft Windows SDK directory + """ + WindowsSdkDir = '' + if self.version == 9.0: + WindowsSdkVer = ('7.0', '6.1', '6.0a') + elif self.version == 10.0: + WindowsSdkVer = ('7.1', '7.0a') + else: + WindowsSdkVer = () + for ver in WindowsSdkVer: + # Try to get it from registry + loc = os.path.join(self.windows_sdk, 'v%s' % ver) + WindowsSdkDir = self.lookup(loc, 'installationfolder') + if WindowsSdkDir: + break + if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): + # Try to get "VC++ for Python" version from registry + install_base = self.lookup(self.vc_for_python, 'installdir') + if install_base: + WindowsSdkDir = os.path.join(install_base, 'WinSDK') + if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): + # If fail, use default path + for ver in WindowsSdkVer: + path = r'Microsoft SDKs\Windows\v%s' % ver + d = os.path.join(self.platform_info.program_files, path) + if os.path.isdir(d): + WindowsSdkDir = d + if not WindowsSdkDir: + # If fail, use Platform SDK + WindowsSdkDir = os.path.join(self.find_visual_c(), 'PlatformSDK') + return WindowsSdkDir + def lookup(self, base, key): try: return distutils.msvc9compiler.Reg.get_value(base, key) @@ -208,36 +242,6 @@ def _query_vcvarsall(version, arch): reg = RegistryInfo(pi, version) reg_value = reg.lookup - # Find Microsoft Windows SDK directory - WindowsSdkDir = '' - if version == 9.0: - WindowsSdkVer = ('7.0', '6.1', '6.0a') - elif version == 10.0: - WindowsSdkVer = ('7.1', '7.0a') - else: - WindowsSdkVer = () - for ver in WindowsSdkVer: - # Try to get it from registry - loc = os.path.join(reg.windows_sdk, 'v%s' % ver) - WindowsSdkDir = reg_value(loc, 'installationfolder') - if WindowsSdkDir: - break - if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): - # Try to get "VC++ for Python" version from registry - install_base = reg_value(reg.vc_for_python, 'installdir') - if install_base: - WindowsSdkDir = os.path.join(install_base, 'WinSDK') - if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): - # If fail, use default path - for ver in WindowsSdkVer: - path = r'Microsoft SDKs\Windows\v%s' % ver - d = os.path.join(pi.program_files, path) - if os.path.isdir(d): - WindowsSdkDir = d - if not WindowsSdkDir: - # If fail, use Platform SDK - WindowsSdkDir = os.path.join(reg.find_visual_c(), 'PlatformSDK') - # Find Microsoft .NET Framework 32bit directory guess_fw = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') FrameworkDir32 = reg_value(reg.vc, 'frameworkdir32') or guess_fw @@ -283,24 +287,24 @@ def _query_vcvarsall(version, arch): VCTools.append(os.path.join(reg.find_visual_c(), 'Bin')) # Set Microsoft Windows SDK Include - OSLibraries = [os.path.join(WindowsSdkDir, 'Lib' + pi.sdk_extra)] + OSLibraries = [os.path.join(reg.find_windows_sdk(), 'Lib' + pi.sdk_extra)] # Set Microsoft Windows SDK Libraries OSIncludes = [ - os.path.join(WindowsSdkDir, 'Include'), - os.path.join(WindowsSdkDir, r'Include\gl'), + os.path.join(reg.find_windows_sdk(), 'Include'), + os.path.join(reg.find_windows_sdk(), r'Include\gl'), ] # Set Microsoft Windows SDK Tools - SdkTools = [os.path.join(WindowsSdkDir, 'Bin')] + SdkTools = [os.path.join(reg.find_windows_sdk(), 'Bin')] if not pi.target_is_x86(): - SdkTools.append(os.path.join(WindowsSdkDir, 'Bin' + pi.sdk_extra)) + SdkTools.append(os.path.join(reg.find_windows_sdk(), 'Bin' + pi.sdk_extra)) if version == 10.0: path = r'Bin\NETFX 4.0 Tools' + pi.sdk_extra - SdkTools.append(os.path.join(WindowsSdkDir, path)) + SdkTools.append(os.path.join(reg.find_windows_sdk(), path)) # Set Microsoft Windows SDK Setup - SdkSetup = [os.path.join(WindowsSdkDir, 'Setup')] + SdkSetup = [os.path.join(reg.find_windows_sdk(), 'Setup')] # Set Microsoft .NET Framework Tools FxTools = [os.path.join(FrameworkDir32, ver) for ver in FrameworkVer] From 22c3b2f50df1f0cadc39eb359037ca83e2689dcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:27:35 -0500 Subject: [PATCH 5568/8469] Extract find_dot_net_versions method in RegistryInfo. --- setuptools/msvc9_support.py | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 8fb532e7b1..ca71addbb5 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -226,6 +226,23 @@ def find_windows_sdk(self): WindowsSdkDir = os.path.join(self.find_visual_c(), 'PlatformSDK') return WindowsSdkDir + def find_dot_net_versions(self): + """ + Find Microsoft .NET Framework Versions + """ + if self.version == 10.0: + v4 = self.lookup(self.vc, 'frameworkver32') or '' + if v4.lower()[:2] != 'v4': + v4 = None + # default to last v4 version + v4 = v4 or 'v4.0.30319' + FrameworkVer = (v4, 'v3.5') + elif self.version == 9.0: + FrameworkVer = ('v3.5', 'v2.0.50727') + elif self.version == 8.0: + FrameworkVer = ('v3.0', 'v2.0.50727') + return FrameworkVer + def lookup(self, base, key): try: return distutils.msvc9compiler.Reg.get_value(base, key) @@ -250,19 +267,6 @@ def _query_vcvarsall(version, arch): guess_fw64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') FrameworkDir64 = reg_value(reg.vc, 'frameworkdir64') or guess_fw64 - # Find Microsoft .NET Framework Versions - if version == 10.0: - v4 = reg_value(reg.vc, 'frameworkver32') or '' - if v4.lower()[:2] != 'v4': - v4 = None - # default to last v4 version - v4 = v4 or 'v4.0.30319' - FrameworkVer = (v4, 'v3.5') - elif version == 9.0: - FrameworkVer = ('v3.5', 'v2.0.50727') - elif version == 8.0: - FrameworkVer = ('v3.0', 'v2.0.50727') - # Set Microsoft Visual Studio Tools VSTools = [ os.path.join(reg.find_visual_studio(), r'Common7\IDE'), @@ -307,9 +311,9 @@ def _query_vcvarsall(version, arch): SdkSetup = [os.path.join(reg.find_windows_sdk(), 'Setup')] # Set Microsoft .NET Framework Tools - FxTools = [os.path.join(FrameworkDir32, ver) for ver in FrameworkVer] + FxTools = [os.path.join(FrameworkDir32, ver) for ver in reg.find_dot_net_versions()] if not pi.target_is_x86() and not pi.current_is_x86(): - for ver in FrameworkVer: + for ver in reg.find_dot_net_versions(): FxTools.append(os.path.join(FrameworkDir64, ver)) # Set Microsoft Visual Studio Team System Database From 904ecaa94be171a5d7750ea81e1327ab91d07057 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:34:51 -0500 Subject: [PATCH 5569/8469] Rewrite for/append loop as simple list comprehension on the product of roots and versions. --- setuptools/msvc9_support.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index ca71addbb5..b15ebeec0e 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1,4 +1,5 @@ import os +import itertools import distutils.errors try: @@ -311,10 +312,14 @@ def _query_vcvarsall(version, arch): SdkSetup = [os.path.join(reg.find_windows_sdk(), 'Setup')] # Set Microsoft .NET Framework Tools - FxTools = [os.path.join(FrameworkDir32, ver) for ver in reg.find_dot_net_versions()] - if not pi.target_is_x86() and not pi.current_is_x86(): - for ver in reg.find_dot_net_versions(): - FxTools.append(os.path.join(FrameworkDir64, ver)) + roots = [FrameworkDir32] + include_64_framework = not pi.target_is_x86() and not pi.current_is_x86() + roots += [FrameworkDir64] if include_64_framework else [] + + FxTools = [ + os.path.join(root, ver) + for root, ver in itertools.product(roots, reg.find_dot_net_versions()) + ] # Set Microsoft Visual Studio Team System Database VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] From 124b0d651e42aa93e4ef1735245cdbd76f3e86fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:36:17 -0500 Subject: [PATCH 5570/8469] Rewrite init/set with singular construction. --- setuptools/msvc9_support.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index b15ebeec0e..a82803e548 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -325,11 +325,12 @@ def _query_vcvarsall(version, arch): VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] # Return Environment Variables - env = {} - env['include'] = [VCIncludes, OSIncludes] - env['lib'] = [VCLibraries, OSLibraries, FxTools] - env['libpath'] = [VCLibraries, FxTools] - env['path'] = [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools] + env = dict( + include=[VCIncludes, OSIncludes], + lib=[VCLibraries, OSLibraries, FxTools], + libpath=[VCLibraries, FxTools], + path=[VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools], + ) def checkpath(path, varlist): # Function that add valid paths in list in not already present From 5688d67516e28349157fa239dae102470da82ca3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:40:08 -0500 Subject: [PATCH 5571/8469] Replace last usage of reg_value --- setuptools/msvc9_support.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index a82803e548..25d8987558 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -258,15 +258,14 @@ def _query_vcvarsall(version, arch): """ pi = PlatformInfo(arch) reg = RegistryInfo(pi, version) - reg_value = reg.lookup # Find Microsoft .NET Framework 32bit directory guess_fw = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') - FrameworkDir32 = reg_value(reg.vc, 'frameworkdir32') or guess_fw + FrameworkDir32 = reg.lookup(reg.vc, 'frameworkdir32') or guess_fw # Find Microsoft .NET Framework 64bit directory guess_fw64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') - FrameworkDir64 = reg_value(reg.vc, 'frameworkdir64') or guess_fw64 + FrameworkDir64 = reg.lookup(reg.vc, 'frameworkdir64') or guess_fw64 # Set Microsoft Visual Studio Tools VSTools = [ From 37bea1dab1aff98021a4d7bab986cafac1d2a537 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 19:42:50 -0500 Subject: [PATCH 5572/8469] Correct find/replace error --- setuptools/msvc9_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 25d8987558..855cdc8790 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -352,7 +352,7 @@ def checkpath(path, varlist): # Format paths to Environment Variable string if var: - env[key] = ';'.os.path.join(var) + env[key] = ';'.join(var) else: msg = "%s environment variable is empty" % key.upper() raise distutils.errors.DistutilsPlatformError(msg) From 57f3b022aa3054e7ea281091d782292d5895086c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 20:50:51 -0500 Subject: [PATCH 5573/8469] Rewrite env builder routine to a simple function, _build_paths, using iterables and common recipes. --- setuptools/msvc9_support.py | 77 ++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 855cdc8790..85a8cf4497 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -7,6 +7,9 @@ except ImportError: pass +import six + + unpatched = dict() def patch_for_specialized_compiler(): @@ -323,37 +326,49 @@ def _query_vcvarsall(version, arch): # Set Microsoft Visual Studio Team System Database VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] - # Return Environment Variables - env = dict( - include=[VCIncludes, OSIncludes], - lib=[VCLibraries, OSLibraries, FxTools], - libpath=[VCLibraries, FxTools], - path=[VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools], + return dict( + include=_build_paths('include', [VCIncludes, OSIncludes]), + lib=_build_paths('lib', [VCLibraries, OSLibraries, FxTools]), + libpath=_build_paths('libpath', [VCLibraries, FxTools]), + path=_build_paths('path', [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools]), ) - def checkpath(path, varlist): - # Function that add valid paths in list in not already present - if os.path.isdir(path) and path not in varlist: - varlist.append(path) - - for key in env.keys(): - var = [] - # Add valid paths - for val in env[key]: - for subval in val: - checkpath(subval, var) - # Add values from actual environment - try: - for val in os.environ[key].split(';'): - checkpath(val, var) - except KeyError: - pass - - # Format paths to Environment Variable string - if var: - env[key] = ';'.join(var) - else: - msg = "%s environment variable is empty" % key.upper() - raise distutils.errors.DistutilsPlatformError(msg) - return env +def _build_paths(name, spec_path_lists): + """ + Given an environment variable name and specified paths, + return a pathsep-separated string of paths containing + unique, extant, directories from those paths and from + the environment variable. Raise an error if no paths + are resolved. + """ + # flatten spec_path_lists + spec_paths = itertools.chain.from_iterable(spec_path_lists) + env_paths = os.environ.get(name, '').split(os.pathsep) + paths = itertools.chain(spec_paths, env_paths) + extant_paths = list(filter(os.path.isdir, paths)) + if not extant_paths: + msg = "%s environment variable is empty" % name.upper() + raise distutils.errors.DistutilsPlatformError(msg) + unique_paths = unique_everseen(extant_paths) + return os.pathsep.join(unique_paths) + + +# from Python docs +def unique_everseen(iterable, key=None): + "List unique elements, preserving order. Remember all elements ever seen." + # unique_everseen('AAAABBBCCDAABBB') --> A B C D + # unique_everseen('ABBCcAD', str.lower) --> A B C D + seen = set() + seen_add = seen.add + filterfalse = six.moves.filterfalse + if key is None: + for element in filterfalse(seen.__contains__, iterable): + seen_add(element) + yield element + else: + for element in iterable: + k = key(element) + if k not in seen: + seen_add(k) + yield element From 80ee0f54d4408fac616ae12b7dd60b6c514f98d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 21:10:07 -0500 Subject: [PATCH 5574/8469] Avoid setting a variable when the value is never used. --- setuptools/msvc9_support.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 85a8cf4497..e1e0841457 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -59,12 +59,12 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): # Try to get environement from vcvarsall.bat (Classical way) try: return unpatched['query_vcvarsall'](version, arch, *args, **kwargs) - except distutils.errors.DistutilsPlatformError as exc: + except distutils.errors.DistutilsPlatformError: # Error if Vcvarsall.bat is missing - message = exc.args[0] - except ValueError as exc: + pass + except ValueError: # Error if environment not set after executing vcvarsall.bat - message = exc.args[0] + pass # If vcvarsall.bat fail, try to set environment directly try: From b85f1ed5eaa2eca271b28a0aaddfebadfb8dedde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 21:11:35 -0500 Subject: [PATCH 5575/8469] Rename function again for clarity. --- setuptools/msvc9_support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index e1e0841457..c0587f3132 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -68,7 +68,7 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): # If vcvarsall.bat fail, try to set environment directly try: - return _query_vcvarsall(version, arch) + return _compute_env(version, arch) except distutils.errors.DistutilsPlatformError as exc: # Error if MSVC++ directory not found or environment not set message = exc.args[0] @@ -254,7 +254,7 @@ def lookup(self, base, key): pass -def _query_vcvarsall(version, arch): +def _compute_env(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. From dd70b3b6f6c00d753d7ff80ed8cf74448606e266 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 21:19:37 -0500 Subject: [PATCH 5576/8469] Extract function for _augment_exception. --- setuptools/msvc9_support.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index c0587f3132..e80fb859c7 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -54,8 +54,6 @@ def find_vcvarsall(version): return unpatched['find_vcvarsall'](version) def query_vcvarsall(version, arch='x86', *args, **kwargs): - message = '' - # Try to get environement from vcvarsall.bat (Classical way) try: return unpatched['query_vcvarsall'](version, arch, *args, **kwargs) @@ -70,10 +68,18 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): try: return _compute_env(version, arch) except distutils.errors.DistutilsPlatformError as exc: - # Error if MSVC++ directory not found or environment not set - message = exc.args[0] + _augment_exception(exc, version) + raise + + +def _augment_exception(exc, version): + """ + Add details to the exception message to help guide the user + as to what action will resolve it. + """ + # Error if MSVC++ directory not found or environment not set + message = exc.args[0] - # Raise error if message and "vcvarsall.bat" in message: # Special error message if MSVC++ not installed message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ @@ -88,7 +94,7 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): message += ' Get it with "Microsoft Windows SDK for Windows 7": ' message += r'www.microsoft.com/download/details.aspx?id=8279' - raise distutils.errors.DistutilsPlatformError(message) + exc.args[0] = message class PlatformInfo: From a75fd253b2d77fb4896146c6dbf6d4aca0a756d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Feb 2016 21:20:29 -0500 Subject: [PATCH 5577/8469] I don't imagine message will ever resolve to False --- setuptools/msvc9_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index e80fb859c7..714035d382 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -80,7 +80,7 @@ def _augment_exception(exc, version): # Error if MSVC++ directory not found or environment not set message = exc.args[0] - if message and "vcvarsall.bat" in message: + if "vcvarsall.bat" in message: # Special error message if MSVC++ not installed message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ (version, message) From ef3d89d581b83fa214d5563d4e3a9e7c901746ab Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Thu, 25 Feb 2016 00:56:38 +1100 Subject: [PATCH 5578/8469] Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries. As of Xcode 7, SDKs for Apple platforms now include textual-format stub libraries whose file names have a .tbd extension rather than the standard OS X .dylib extension. The Apple compiler tool chain handles these stub libraries transparently and the installed system shared libraries are still .dylibs. However, the new stub libraries cause problems for third-party programs that support building with Apple SDKs and make build-time decisions based on the presence or paths of system-supplied shared libraries in the SDK. In particular, building Python itself with an SDK fails to find system-supplied libraries during setup.py's build of standard library extension modules. The solution is to have find_library_file() in Distutils search for .tbd files, along with the existing types (.a, .so, and .dylib). Patch by Tim Smith. --- ccompiler.py | 4 ++-- unixccompiler.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 82fd7d5c4d..b71d1d39bc 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -875,9 +875,9 @@ def executable_filename(self, basename, strip_dir=0, output_dir=''): def library_filename(self, libname, lib_type='static', # or 'shared' strip_dir=0, output_dir=''): assert output_dir is not None - if lib_type not in ("static", "shared", "dylib"): + if lib_type not in ("static", "shared", "dylib", "xcode_stub"): raise ValueError( - "'lib_type' must be \"static\", \"shared\" or \"dylib\"") + "'lib_type' must be \"static\", \"shared\", \"dylib\", or \"xcode_stub\"") fmt = getattr(self, lib_type + "_lib_format") ext = getattr(self, lib_type + "_lib_extension") diff --git a/unixccompiler.py b/unixccompiler.py index 094a2f0bd0..92d14dfee7 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -76,7 +76,9 @@ class UnixCCompiler(CCompiler): static_lib_extension = ".a" shared_lib_extension = ".so" dylib_lib_extension = ".dylib" + xcode_stub_lib_extension = ".tbd" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" + xcode_stub_lib_format = dylib_lib_format if sys.platform == "cygwin": exe_extension = ".exe" @@ -255,12 +257,28 @@ def library_option(self, lib): def find_library_file(self, dirs, lib, debug=0): shared_f = self.library_filename(lib, lib_type='shared') dylib_f = self.library_filename(lib, lib_type='dylib') + xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub') static_f = self.library_filename(lib, lib_type='static') if sys.platform == 'darwin': # On OSX users can specify an alternate SDK using # '-isysroot', calculate the SDK root if it is specified # (and use it further on) + # + # Note that, as of Xcode 7, Apple SDKs may contain textual stub + # libraries with .tbd extensions rather than the normal .dylib + # shared libraries installed in /. The Apple compiler tool + # chain handles this transparently but it can cause problems + # for programs that are being built with an SDK and searching + # for specific libraries. Callers of find_library_file need to + # keep in mind that the base filename of the returned SDK library + # file might have a different extension from that of the library + # file installed on the running system, for example: + # /Applications/Xcode.app/Contents/Developer/Platforms/ + # MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ + # usr/lib/libedit.tbd + # vs + # /usr/lib/libedit.dylib cflags = sysconfig.get_config_var('CFLAGS') m = re.search(r'-isysroot\s+(\S+)', cflags) if m is None: @@ -274,6 +292,7 @@ def find_library_file(self, dirs, lib, debug=0): shared = os.path.join(dir, shared_f) dylib = os.path.join(dir, dylib_f) static = os.path.join(dir, static_f) + xcode_stub = os.path.join(dir, xcode_stub_f) if sys.platform == 'darwin' and ( dir.startswith('/System/') or ( @@ -282,6 +301,7 @@ def find_library_file(self, dirs, lib, debug=0): shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) + xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f) # We're second-guessing the linker here, with not much hard # data to go on: GCC seems to prefer the shared library, so I'm @@ -289,6 +309,8 @@ def find_library_file(self, dirs, lib, debug=0): # ignoring even GCC's "-static" option. So sue me. if os.path.exists(dylib): return dylib + elif os.path.exists(xcode_stub): + return xcode_stub elif os.path.exists(shared): return shared elif os.path.exists(static): From 28a36c91cddf2e318f189ef67aa390f1cc616df3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Feb 2016 21:52:35 -0500 Subject: [PATCH 5579/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 63ae24fd88..ad0e40c65d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +20.2.1 +------ + +* Issue #499: Restore compatiblity for legacy versions + by bumping to packaging 16.4. + 20.2 ---- From 7160fc64313e738cbd225232ccf9b3fbac1fba19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Feb 2016 22:00:55 -0500 Subject: [PATCH 5580/8469] Bumped to 20.2.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 7e20c8bf5a..acad2a445c 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.3' +__version__ = '20.2.1' From ac2ae5892db8d278331c6a4bcaa12b54eeed1157 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Feb 2016 22:01:00 -0500 Subject: [PATCH 5581/8469] Added tag 20.2.1 for changeset 1aacb05fbdfe --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f2b0e2b7b5..dd40a1e24f 100644 --- a/.hgtags +++ b/.hgtags @@ -247,3 +247,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 06c9d3ffae80d7f5786c0a454d040d253d47fc03 20.1 919a40f1843131249f98104c73f3aee3fc835e67 20.1.1 74c4ffbe1f399345eb4f6a64785cfff54f7e6e7e 20.2 +1aacb05fbdfe06cee904e7a138a4aa6df7b88a63 20.2.1 From 97178b56f1bf760b1a300668282debc8f39ea6e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Feb 2016 22:04:29 -0500 Subject: [PATCH 5582/8469] Bumped to 20.2.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index acad2a445c..60fb638c23 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.2.1' +__version__ = '20.2.2' From 52cd445ed59b3ca3a31cb2426cbf90db04fbf41d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Feb 2016 08:48:22 -0500 Subject: [PATCH 5583/8469] Add test capturing expectation that spaces between version specifiers should be allowed. Ref #502. --- pkg_resources/tests/test_resources.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index a8bf35fc9c..7a4ecb38cc 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -511,6 +511,10 @@ def testSimpleRequirements(self): def test_local_version(self): req, = parse_requirements('foo==1.0.org1') + def test_spaces_between_multiple_versions(self): + req, = parse_requirements('foo>=1.0, <3') + req, = parse_requirements('foo >= 1.0, < 3') + def testVersionEquality(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) From 1edd380c867c08eedf5e396654b4ec3bed23e25d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:11:47 -0500 Subject: [PATCH 5584/8469] Replace makefile with pavement file, granting portability on OS X and Windows. Fixes #505. --- Makefile | 11 ----------- pavement.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) delete mode 100644 Makefile create mode 100644 pavement.py diff --git a/Makefile b/Makefile deleted file mode 100644 index e0aa419526..0000000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -empty: - exit 1 - -update-vendored: - rm -rf pkg_resources/_vendor/packaging* - rm -rf pkg_resources/_vendor/six* - rm -rf pkg_resources/_vendor/pyparsing* - python3 -m pip install -r pkg_resources/_vendor/vendored.txt -t pkg_resources/_vendor/ - sed -i 's/ \(pyparsing\|six\)/ pkg_resources.extern.\1/' \ - pkg_resources/_vendor/packaging/*.py - rm -rf pkg_resources/_vendor/*.{egg,dist}-info diff --git a/pavement.py b/pavement.py new file mode 100644 index 0000000000..8d7574e296 --- /dev/null +++ b/pavement.py @@ -0,0 +1,28 @@ +import re + +from paver.easy import task, path as Path +import pip + +def remove_all(paths): + for path in paths: + path.rmtree() if path.isdir() else path.remove() + +@task +def update_vendored(): + vendor = Path('pkg_resources/_vendor') + remove_all(vendor.glob('packaging*')) + remove_all(vendor.glob('six*')) + remove_all(vendor.glob('pyparsing*')) + install_args = [ + 'install', + '-r', str(vendor/'vendored.txt'), + '-t', str(vendor), + ] + pip.main(install_args) + packaging = vendor / 'packaging' + for file in packaging.glob('*.py'): + text = file.text() + text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) + file.write_text(text) + remove_all(vendor.glob('*.dist-info')) + remove_all(vendor.glob('*.egg-info')) From 721536a8c21a0f6a0dcd0ca92b5e5a613fb42c5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:19:56 -0500 Subject: [PATCH 5585/8469] Re-run vendoring on packaging 16.4 (adding utils.py module, apparently omitted). --- pkg_resources/_vendor/packaging/utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pkg_resources/_vendor/packaging/utils.py diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py new file mode 100644 index 0000000000..942387cef5 --- /dev/null +++ b/pkg_resources/_vendor/packaging/utils.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import re + + +_canonicalize_regex = re.compile(r"[-_.]+") + + +def canonicalize_name(name): + # This is taken from PEP 503. + return _canonicalize_regex.sub("-", name).lower() From 26f98e0a8cd1671520e3e8c64a4aa6400873ce9b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:20:52 -0500 Subject: [PATCH 5586/8469] Bump vendored packaging to 16.5. Fixes #502. --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/requirements.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 10 +++++----- pkg_resources/_vendor/vendored.txt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index e4c32ea179..47e5a6f58c 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,7 +12,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.4" +__version__ = "16.5" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 361f157bbb..0c8c4a3852 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -49,7 +49,7 @@ class InvalidRequirement(ValueError): VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), - joinString=",")("_raw_spec") + joinString=",", adjacent=False)("_raw_spec") _VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) _VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 5ee8f02339..7f5a76cfd6 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -218,11 +218,11 @@ class LegacySpecifier(_IndividualSpecifier): (?P(==|!=|<=|>=|<|>)) \s* (?P - [^;\s)]* # We just match everything, except for whitespace, - # a semi-colon for marker support, and closing paren - # since versions can be enclosed in them. Since this is - # a "legacy" specifier and the version string can be - # just about anything. + [^,;\s)]* # Since this is a "legacy" specifier, and the version + # string can be just about anything, we match everything + # except for whitespace, a semi-colon for marker support, + # a closing paren since versions can be enclosed in + # them, and a comma since it's a version separator. ) """ ) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 002ef95556..aac1267c62 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ -packaging==16.4 +packaging==16.5 pyparsing==2.0.6 six==1.10.0 From 3855edb641a6895af3f8e3ce89e3fef012a883b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:24:21 -0500 Subject: [PATCH 5587/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ad0e40c65d..b7325031ee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +20.2.2 +------ + +* Issue #502: Correct regression in parsing of multiple + version specifiers separated by commas and spaces. + 20.2.1 ------ From 5f38188ed53f37a5a683cace20e73d6c8652518a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:28:19 -0500 Subject: [PATCH 5588/8469] Ignore pavement.py --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index ab4a6df381..2fa3a3ecc4 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern From 52a14114ea81a2feeb6edcdc0754bfb8376c15ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:48:21 -0500 Subject: [PATCH 5589/8469] Added tag 20.2.2 for changeset 48aa5271ef1c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dd40a1e24f..0ab43c5805 100644 --- a/.hgtags +++ b/.hgtags @@ -248,3 +248,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 919a40f1843131249f98104c73f3aee3fc835e67 20.1.1 74c4ffbe1f399345eb4f6a64785cfff54f7e6e7e 20.2 1aacb05fbdfe06cee904e7a138a4aa6df7b88a63 20.2.1 +48aa5271ef1cd5379cf91a1c958e490692b978e7 20.2.2 From a46fd8327e5c13b45fcc92322b4fe00a76f307da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:50:45 -0500 Subject: [PATCH 5590/8469] Bumped to 20.2.3 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 60fb638c23..10f3ca212a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.2.2' +__version__ = '20.2.3' From 0ed33b7a4db605e4608f56d6bdb5efe81762b4cb Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 1 Mar 2016 16:07:42 +1100 Subject: [PATCH 5591/8469] Shift requirement parsing inside Requirement --- pkg_resources/__init__.py | 42 ++++++++++++--------------- pkg_resources/tests/test_resources.py | 25 ++++++++-------- setuptools/command/easy_install.py | 5 +--- setuptools/tests/test_dist_info.py | 4 ++- 4 files changed, 35 insertions(+), 41 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 5b68da154b..2fb7bc5101 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2693,15 +2693,11 @@ def _compute_dependencies(self): reqs = [] # Including any condition expressions for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: - current_req = packaging.requirements.Requirement(req) - specs = _parse_requirement_specs(current_req) - parsed = Requirement(current_req.name, specs, current_req.extras) - parsed._marker = current_req.marker - reqs.append(parsed) + reqs.extend(parse_requirements(req)) def reqs_for_extra(extra): for req in reqs: - if not req._marker or req._marker.evaluate({'extra': extra}): + if not req.marker or req.marker.evaluate({'extra': extra}): yield req common = frozenset(reqs_for_extra(None)) @@ -2739,10 +2735,6 @@ def __str__(self): return ' '.join(self.args) -def _parse_requirement_specs(req): - return [(spec.operator, spec.version) for spec in req.specifier] - - def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` @@ -2759,33 +2751,35 @@ def parse_requirements(strs): if line.endswith('\\'): line = line[:-2].strip() line += next(lines) - req = packaging.requirements.Requirement(line) - specs = _parse_requirement_specs(req) - yield Requirement(req.name, specs, req.extras) + yield Requirement(line) class Requirement: - def __init__(self, project_name, specs, extras): + def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" - self.unsafe_name, project_name = project_name, safe_name(project_name) + try: + self.req = packaging.requirements.Requirement(requirement_string) + except packaging.requirements.InvalidRequirement as e: + raise RequirementParseError(str(e)) + self.unsafe_name = self.req.name + project_name = safe_name(self.req.name) self.project_name, self.key = project_name, project_name.lower() - self.specifier = packaging.specifiers.SpecifierSet( - ",".join(["".join([x, y]) for x, y in specs]) - ) - self.specs = specs - self.extras = tuple(map(safe_extra, extras)) + self.specifier = self.req.specifier + self.specs = [ + (spec.operator, spec.version) for spec in self.req.specifier] + self.extras = tuple(map(safe_extra, self.req.extras)) + self.marker = self.req.marker + self.url = self.req.url self.hashCmp = ( self.key, self.specifier, frozenset(self.extras), + str(self.marker) ) self.__hash = hash(self.hashCmp) def __str__(self): - extras = ','.join(self.extras) - if extras: - extras = '[%s]' % extras - return '%s%s%s' % (self.project_name, extras, self.specifier) + return str(self.req) def __eq__(self, other): return ( diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7a4ecb38cc..16fc319808 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -353,22 +353,22 @@ def testBasics(self): r = Requirement.parse("Twisted>=1.2") assert str(r) == "Twisted>=1.2" assert repr(r) == "Requirement.parse('Twisted>=1.2')" - assert r == Requirement("Twisted", [('>=','1.2')], ()) - assert r == Requirement("twisTed", [('>=','1.2')], ()) - assert r != Requirement("Twisted", [('>=','2.0')], ()) - assert r != Requirement("Zope", [('>=','1.2')], ()) - assert r != Requirement("Zope", [('>=','3.0')], ()) - assert r != Requirement.parse("Twisted[extras]>=1.2") + assert r == Requirement("Twisted>=1.2") + assert r == Requirement("twisTed>=1.2") + assert r != Requirement("Twisted>=2.0") + assert r != Requirement("Zope>=1.2") + assert r != Requirement("Zope>=3.0") + assert r != Requirement("Twisted[extras]>=1.2") def testOrdering(self): - r1 = Requirement("Twisted", [('==','1.2c1'),('>=','1.2')], ()) - r2 = Requirement("Twisted", [('>=','1.2'),('==','1.2c1')], ()) + r1 = Requirement("Twisted==1.2c1,>=1.2") + r2 = Requirement("Twisted>=1.2,==1.2c1") assert r1 == r2 assert str(r1) == str(r2) assert str(r2) == "Twisted==1.2c1,>=1.2" def testBasicContains(self): - r = Requirement("Twisted", [('>=','1.2')], ()) + r = Requirement("Twisted>=1.2") foo_dist = Distribution.from_filename("FooPkg-1.3_1.egg") twist11 = Distribution.from_filename("Twisted-1.1.egg") twist12 = Distribution.from_filename("Twisted-1.2.egg") @@ -394,6 +394,7 @@ def testOptionsAndHashing(self): "twisted", packaging.specifiers.SpecifierSet(">=1.2"), frozenset(["foo","bar"]), + 'None' )) ) @@ -485,17 +486,17 @@ def testSimpleRequirements(self): assert ( list(parse_requirements('Twis-Ted>=1.2-1')) == - [Requirement('Twis-Ted',[('>=','1.2-1')], ())] + [Requirement('Twis-Ted>=1.2-1')] ) assert ( list(parse_requirements('Twisted >=1.2, \ # more\n<2.0')) == - [Requirement('Twisted',[('>=','1.2'),('<','2.0')], ())] + [Requirement('Twisted>=1.2,<2.0')] ) assert ( Requirement.parse("FooBar==1.99a3") == - Requirement("FooBar", [('==','1.99a3')], ()) + Requirement("FooBar==1.99a3") ) with pytest.raises(ValueError): Requirement.parse(">=2.3") diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 08bc9c510b..97de339544 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -710,10 +710,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): elif requirement is None or dist not in requirement: # if we wound up with a different version, resolve what we've got distreq = dist.as_requirement() - requirement = requirement or distreq - requirement = Requirement( - distreq.project_name, distreq.specs, requirement.extras - ) + requirement = Requirement(str(distreq.req)) log.info("Processing dependencies for %s", requirement) try: distros = WorkingSet([]).resolve( diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 002968a344..9f226a55fc 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -34,7 +34,9 @@ def test_conditional_dependencies(self): for d in pkg_resources.find_distributions(self.tmpdir): assert d.requires() == requires[:1] - assert d.requires(extras=('baz',)) == requires + assert d.requires(extras=('baz',)) == [ + requires[0], + pkg_resources.Requirement.parse('quux>=1.1;extra=="baz"')] assert d.extras == ['baz'] metadata_template = DALS(""" From 75282e5568039e3dae52ee41ada35baf56f0567c Mon Sep 17 00:00:00 2001 From: JGoutin Date: Wed, 2 Mar 2016 18:51:40 +0000 Subject: [PATCH 5592/8469] First, thanks for the review. This is very instructive for me and the code is clearer now. I tested your reviewed version, and it work (Tested only on Windows x86, Python 3.4, Windows SDK 7.1 actually). I did the following changes : * Add many docstrings, and improve existing ones. * Change some comments that was unclear. * Move .NET Framework directory/version finders in "RegistryInfo", like others. * Started to add support for the MSVC++14.0 standalone compiler. (Note that this is Work in progress). This also help me to find what fail in actual structure. * Add "msvc9_" prefix to actual patch functions and unpatched dict for better readability. * Add VCforPython27 alternative in _augment_exception for IA64 (Arch not supported by VCforPython27) * Replace "lib_extra" and "sdk_extra" by more generic "ccpu_dir" and "tcpu_dir" functions (For better compatibility with MSVC++14) * Changes some parts (like VSTools) for reduce line length, avoid repetitions and improve PEP8. * Make "unique_everseen" and "lookup" private. But, it is not finished, I need at least to do: - Finish MSVC++14 support. - Remove patch for "find_vcvarsall" for MSVC++9 ? (Now "query_vcvarsall" patch also support VC++ for Python 2.7) - Make more tests with more compilers/platforms/Python combination. - Check compatibility with MSVC++11 and 12. - Rename the file in "msvc_support.py" ? (not MSVC9 only) - Rename "RegistryInfo" ? - Make compute_env a class ? for split subparts like you did it for "RegistryInfo" and "PlatformInfo" --- setuptools/msvc9_support.py | 421 ++++++++++++++++++++++++++++-------- 1 file changed, 334 insertions(+), 87 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 714035d382..a956a5b0d0 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1,22 +1,45 @@ +""" +This module improve support for Microsoft Visual C++ compilers. (Windows Only) +""" import os import itertools import distutils.errors try: - import distutils.msvc9compiler + # Distutil file for MSVC++ 9.0 and upper + import distutils.msvc9compiler as msvc9compiler +except ImportError: + pass + +try: + # Distutil file for MSVC++ 14.0 and upper + import distutils._msvccompiler as msvc14compiler except ImportError: pass -import six +import six unpatched = dict() + def patch_for_specialized_compiler(): """ - Patch functions in distutils.msvc9compiler to use the standalone compiler - build for Python (Windows only). Fall back to original behavior when the - standalone compiler is not available. + Patch functions in distutils to use standalone Microsoft Visual C++ + compilers. + + Known supported compilers: + -------------------------- + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); + Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Windows SDK 6.1 (x86, x64, ia64) + + Microsoft Visual C++ 10.0: + Microsoft Windows SDK 7.1 (x86, x64, ia64) + + Microsoft Visual C++ 14.0: + Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ if 'distutils' not in globals(): # The module isn't available to be patched @@ -26,13 +49,44 @@ def patch_for_specialized_compiler(): # Already patched return - unpatched.update(vars(distutils.msvc9compiler)) + try: + # Patch distutils.msvc9compiler + unpatched['msvc9_find_vcvarsall'] = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall + unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall + msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall + except: + pass + + try: + # Patch distutils._msvccompiler._get_vc_env + unpatched['msv14_get_vc_env'] = msvc14compiler._get_vc_env + msvc14compiler._get_vc_env = msvc14_get_vc_env + except: + pass - distutils.msvc9compiler.find_vcvarsall = find_vcvarsall - distutils.msvc9compiler.query_vcvarsall = query_vcvarsall -def find_vcvarsall(version): - Reg = distutils.msvc9compiler.Reg +def msvc9_find_vcvarsall(version): + """ + Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone + compiler build for Python (VCForPython). Fall back to original behavior + when the standalone compiler is not available. + + Known supported compilers + ------------------------- + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) + + Parameters + ---------- + version: float + Required Microsoft Visual C++ version. + + Return + ------ + vcvarsall.bat path: str + """ + Reg = msvc9compiler.Reg VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' key = VC_BASE % ('', version) try: @@ -51,12 +105,38 @@ def find_vcvarsall(version): if os.path.isfile(vcvarsall): return vcvarsall - return unpatched['find_vcvarsall'](version) + return unpatched['msvc9_find_vcvarsall'](version) -def query_vcvarsall(version, arch='x86', *args, **kwargs): + +def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): + """ + Patched "distutils.msvc9compiler.query_vcvarsall" for support standalones + compilers. + + Known supported compilers + ------------------------- + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); + Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Windows SDK 6.1 (x86, x64, ia64) + + Microsoft Visual C++ 10.0: + Microsoft Windows SDK 7.1 (x86, x64, ia64) + + Parameters + ---------- + ver: float + Required Microsoft Visual C++ version. + arch: str + Target architecture. + + Return + ------ + environment: dict + """ # Try to get environement from vcvarsall.bat (Classical way) try: - return unpatched['query_vcvarsall'](version, arch, *args, **kwargs) + return unpatched['msvc9_query_vcvarsall'](ver, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError: # Error if Vcvarsall.bat is missing pass @@ -66,13 +146,46 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs): # If vcvarsall.bat fail, try to set environment directly try: - return _compute_env(version, arch) + return _compute_env(ver, arch) except distutils.errors.DistutilsPlatformError as exc: - _augment_exception(exc, version) + _augment_exception(exc, ver, arch) raise -def _augment_exception(exc, version): +def msvc14_get_vc_env(plat_spec): + """ + Patched "distutils._msvccompiler._get_vc_env" for support standalones + compilers. + + Known supported compilers + ------------------------- + Microsoft Visual C++ 14.0: + Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + + Parameters + ---------- + plat_spec: str + Target architecture. + + Return + ------ + environment: dict + """ + try: + return unpatched['msv14_get_vc_env'](plat_spec) + except distutils.errors.DistutilsPlatformError: + # Error if Vcvarsall.bat is missing + pass + + # If vcvarsall.bat fail, try to set environment directly + try: + return _compute_env(version, plat_spec) + except distutils.errors.DistutilsPlatformError as exc: + _augment_exception(exc, version, plat_spec) + raise + + +def _augment_exception(exc, version, arch): """ Add details to the exception message to help guide the user as to what action will resolve it. @@ -85,26 +198,40 @@ def _augment_exception(exc, version): message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ (version, message) if int(version) == 9: - # For VC++ 9.0 Redirect user to Vc++ for Python 2.7 : - # This redirection link is maintained by Microsoft. - # Contact vspython@microsoft.com if it needs updating. - message += r' Get it from http://aka.ms/vcpython27' + if arch.lower().find('ia64') > -1: + # For VC++ 9.0, if IA64 support is needed, redirect user + # to Windows SDK 7.0 + message += ' Get it with "Microsoft Windows SDK 7.0": ' + message += r'www.microsoft.com/download/details.aspx?id=3138' + else: + # For VC++ 9.0 redirect user to Vc++ for Python 2.7 : + # This redirection link is maintained by Microsoft. + # Contact vspython@microsoft.com if it needs updating. + message += r' Get it from http://aka.ms/vcpython27' elif int(version) == 10: # For VC++ 10.0 Redirect user to Windows SDK 7.1 - message += ' Get it with "Microsoft Windows SDK for Windows 7": ' + message += ' Get it with "Microsoft Windows SDK 7.1": ' message += r'www.microsoft.com/download/details.aspx?id=8279' exc.args[0] = message class PlatformInfo: + """ + Find architecture informations and system paths. + + Parameters + ---------- + arch: str + Target architecture. + """ current_cpu = os.environ['processor_architecture'].lower() win_dir = os.environ['WinDir'] program_files = os.environ['ProgramFiles'] program_files_x86 = os.environ.get('ProgramFiles(x86)', program_files) def __init__(self, arch): - self.arch = arch + self.arch = arch.lower() @property def target_cpu(self): @@ -116,85 +243,157 @@ def target_is_x86(self): def current_is_x86(self): return self.current_cpu != 'x86' - @property - def lib_extra(self): + def ccpu_dir(self, hidex86=False, x64=False): + """ + Current platform specific subfolder. + + Parameters + ---------- + hidex86: bool + return '' and not '\x86' if architecture is x86. + x64: bool + return '\x64' and not '\amd64' if architecture is amd64. + + Return + ------ + subfolder: str (starting with'\') + """ return ( - r'\amd64' if self.target_cpu == 'amd64' else - r'\ia64' if self.target_cpu == 'ia64' else - '' + '' if (self.current_cpu == 'x86' and hidex86) else + r'\x64' if (self.current_cpu == 'amd64' and x64) else + r'\%s' % self.current_cpu ) - @property - def sdk_extra(self): + def tcpu_dir(self, hidex86=False, x64=False): + """ + Target platform specific subfolder. + + Parameters + ---------- + hidex86: bool + return '' and not '\x86' if architecture is x86. + x64: bool + return '\x64' and not '\amd64' if architecture is amd64. + + Return + ------ + subfolder: str (starting with'\') + """ return ( - r'\x64' if self.target_cpu == 'amd64' else - r'\ia64' if self.target_cpu == 'ia64' else - '' + '' if (self.target_cpu == 'x86' and hidex86) else + r'\x64' if (self.target_cpu == 'amd64' and x64) else + r'\%s' % self.target_cpu ) - @property - def tools_extra(self): - path = self.lib_extra + def tools_extra(self, forcex86=False): + """ + Platform specific subfolder for Visual C++ Tools. + + Parameters + ---------- + forcex86: bool + If cross compilation, return 'x86' as current architecture even + if current acritecture is not x86. + + Return + ------ + subfolder: str (starting with'\') + """ + path = self.tcpu_dir(True) if self.target_cpu != self.current_cpu: - path = path.replace('\\', '\\x86_') + current = 'x86' if forcex86 else self.current_cpu + path = path.replace('\\', '\\%s_' % current) return path class RegistryInfo: + """ + Find Microsoft Visual C++ compiler related paths using registry or + default paths. + + Parameters + ---------- + platform_info: platform_info + "platform_info" instance. + version: float + Required Microsoft Visual C++ version. + """ def __init__(self, platform_info, version): - self.platform_info = platform_info + self.pi = platform_info self.version = version @property def microsoft(self): + """ + Microsoft registry path. + """ return os.path.join( 'Software', - '' if self.platform_info.current_is_x86() else 'Wow6432Node', + '' if self.pi.current_is_x86() else 'Wow6432Node', 'Microsoft', ) @property def sxs(self): + """ + Visual Studio SxS registry path. + """ return os.path.join(self.microsoft, r'VisualStudio\SxS') @property def vc(self): + """ + Visual C++ registry path. + """ return os.path.join(self.sxs, 'VC7') @property def vs(self): + """ + Visual Studio registry path. + """ return os.path.join(self.sxs, 'VS7') @property def vc_for_python(self): + """ + Visual C++ for Python. + """ path = r'DevDiv\VCForPython\%0.1f' % self.version return os.path.join(self.microsoft, path) @property def windows_sdk(self): + """ + Windows/Platform SDK registry path. + """ return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') def find_visual_studio(self): """ - Find Microsoft Visual Studio directory + Find Microsoft Visual Studio directory. """ + # Default path name = 'Microsoft Visual Studio %0.1f' % self.version - default = os.path.join(self.platform_info.program_files_x86, name) - return self.lookup(self.vs, '%0.1f' % self.version) or default + default = os.path.join(self.pi.program_files_x86, name) + + # Try to get path from registry, if fail use default path + return self._lookup(self.vs, '%0.1f' % self.version) or default def find_visual_c(self): """ - Find Microsoft Visual C++ directory + Find Microsoft Visual C++ directory. """ - # If fail, use default path + # Default path default = r'Microsoft Visual Studio %0.1f\VC' % self.version - guess_vc = os.path.join(self.platform_info.program_files_x86, default) + guess_vc = os.path.join(self.pi.program_files_x86, default) - # Try to get "VC++ for Python" version from registry - install_base = self.lookup(self.vc_for_python, 'installdir') - default_vc = os.path.join(install_base, 'VC') if install_base else guess_vc + # Try to get "VC++ for Python" path from registry as default path + python_vc = self._lookup(self.vc_for_python, 'installdir') + default_vc = os.path.join(python_vc, 'VC') if python_vc else guess_vc - result = self.lookup(self.vc, '%0.1f' % self.version) or default_vc + # Try to get path from registry, if fail use default path + result = self._lookup(self.vc, '%0.1f' % self.version) or default_vc if not os.path.isdir(result): msg = 'vcvarsall.bat and Visual C++ directory not found' @@ -204,7 +403,7 @@ def find_visual_c(self): def find_windows_sdk(self): """ - Find Microsoft Windows SDK directory + Find Microsoft Windows SDK directory. """ WindowsSdkDir = '' if self.version == 9.0: @@ -216,19 +415,19 @@ def find_windows_sdk(self): for ver in WindowsSdkVer: # Try to get it from registry loc = os.path.join(self.windows_sdk, 'v%s' % ver) - WindowsSdkDir = self.lookup(loc, 'installationfolder') + WindowsSdkDir = self._lookup(loc, 'installationfolder') if WindowsSdkDir: break if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # Try to get "VC++ for Python" version from registry - install_base = self.lookup(self.vc_for_python, 'installdir') + install_base = self._lookup(self.vc_for_python, 'installdir') if install_base: WindowsSdkDir = os.path.join(install_base, 'WinSDK') if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): # If fail, use default path for ver in WindowsSdkVer: path = r'Microsoft SDKs\Windows\v%s' % ver - d = os.path.join(self.platform_info.program_files, path) + d = os.path.join(self.pi.program_files, path) if os.path.isdir(d): WindowsSdkDir = d if not WindowsSdkDir: @@ -238,10 +437,10 @@ def find_windows_sdk(self): def find_dot_net_versions(self): """ - Find Microsoft .NET Framework Versions + Find Microsoft .NET Framework Versions. """ if self.version == 10.0: - v4 = self.lookup(self.vc, 'frameworkver32') or '' + v4 = self._lookup(self.vc, 'frameworkver32') or '' if v4.lower()[:2] != 'v4': v4 = None # default to last v4 version @@ -253,9 +452,29 @@ def find_dot_net_versions(self): FrameworkVer = ('v3.0', 'v2.0.50727') return FrameworkVer - def lookup(self, base, key): + def find_dot_net_32(self): + """ + Find Microsoft .NET Framework 32bit directory. + """ + # Default path + guess_fw = os.path.join(self.pi.win_dir, r'Microsoft.NET\Framework') + + # Try to get path from registry, if fail use default path + return self._lookup(self.vc, 'frameworkdir32') or guess_fw + + def find_dot_net_64(self): + """ + Find Microsoft .NET Framework 64bit directory. + """ + # Default path + guess_fw = os.path.join(self.pi.win_dir, r'Microsoft.NET\Framework64') + + # Try to get path from registry, if fail use default path + return self._lookup(self.vc, 'frameworkdir64') or guess_fw + + def _lookup(self, base, key): try: - return distutils.msvc9compiler.Reg.get_value(base, key) + return msvc9compiler.Reg.get_value(base, key) except KeyError: pass @@ -264,45 +483,56 @@ def _compute_env(version, arch): """ Return environment variables for specified Microsoft Visual C++ version and platform. + + Microsoft Visual C++ known compatibles versions + ----------------------------------------------- + 9.0, 10.0, 14.0 """ pi = PlatformInfo(arch) reg = RegistryInfo(pi, version) - # Find Microsoft .NET Framework 32bit directory - guess_fw = os.path.join(pi.win_dir, r'Microsoft.NET\Framework') - FrameworkDir32 = reg.lookup(reg.vc, 'frameworkdir32') or guess_fw - - # Find Microsoft .NET Framework 64bit directory - guess_fw64 = os.path.join(pi.win_dir, r'Microsoft.NET\Framework64') - FrameworkDir64 = reg.lookup(reg.vc, 'frameworkdir64') or guess_fw64 - # Set Microsoft Visual Studio Tools - VSTools = [ - os.path.join(reg.find_visual_studio(), r'Common7\IDE'), - os.path.join(reg.find_visual_studio(), r'Common7\Tools'), - ] + paths = [r'Common7\IDE', r'Common7\Tools'] + if version >= 14.0: + paths.append(r'Common7\IDE\CommonExtensions\Microsoft\TestWindow') + paths.append(r'Team Tools\Performance Tools') + paths.append(r'Team Tools\Performance Tools' + pi.ccpu_dir(True, True)) + VSTools = [os.path.join(reg.find_visual_studio(), path) for path in paths] - # Set Microsoft Visual C++ Includes - VCIncludes = [os.path.join(reg.find_visual_c(), 'Include')] + # Set Microsoft Visual C++ & Microsoft Foundation Class Includes + VCIncludes = [os.path.join(reg.find_visual_c(), 'Include'), + os.path.join(reg.find_visual_c(), 'ATLMFC\Include')] # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries - VCLibraries = [ - os.path.join(reg.find_visual_c(), 'Lib' + pi.lib_extra), - os.path.join(reg.find_visual_c(), r'ATLMFC\LIB' + pi.lib_extra), - ] + paths = ['Lib' + pi.tcpu_dir(True), r'ATLMFC\Lib' + pi.tcpu_dir(True)] + if version >= 14.0: + paths.append(r'Lib\store' + pi.tcpu_dir(True)) + VCLibraries = [os.path.join(reg.find_visual_c(), path) for path in paths] + + # Set Microsoft Visual C++ store references Libraries + if version >= 14.0: + path = r'Lib\store\references' + VCStoreRefs = [os.path.join(reg.find_visual_c(), path)] + else: + VCStoreRefs = [] # Set Microsoft Visual C++ Tools + path = 'Bin' + pi.tools_extra(False if version >= 14.0 else True) VCTools = [ os.path.join(reg.find_visual_c(), 'VCPackages'), - os.path.join(reg.find_visual_c(), 'Bin' + pi.tools_extra), + os.path.join(reg.find_visual_c(), path), ] - if pi.tools_extra: + if pi.tools_extra() and version >= 14.0: + path = 'Bin' + pi.ccpu_dir(True) + VCTools.append(os.path.join(reg.find_visual_c(), path)) + else: VCTools.append(os.path.join(reg.find_visual_c(), 'Bin')) - # Set Microsoft Windows SDK Include - OSLibraries = [os.path.join(reg.find_windows_sdk(), 'Lib' + pi.sdk_extra)] - # Set Microsoft Windows SDK Libraries + path = 'Lib' + pi.tcpu_dir(True, True) + OSLibraries = [os.path.join(reg.find_windows_sdk(), path)] + + # Set Microsoft Windows SDK Include OSIncludes = [ os.path.join(reg.find_windows_sdk(), 'Include'), os.path.join(reg.find_windows_sdk(), r'Include\gl'), @@ -311,18 +541,19 @@ def _compute_env(version, arch): # Set Microsoft Windows SDK Tools SdkTools = [os.path.join(reg.find_windows_sdk(), 'Bin')] if not pi.target_is_x86(): - SdkTools.append(os.path.join(reg.find_windows_sdk(), 'Bin' + pi.sdk_extra)) + path = 'Bin' + pi.tcpu_dir(True, True) + SdkTools.append(os.path.join(reg.find_windows_sdk(), path)) if version == 10.0: - path = r'Bin\NETFX 4.0 Tools' + pi.sdk_extra + path = r'Bin\NETFX 4.0 Tools' + pi.tcpu_dir(True, True) SdkTools.append(os.path.join(reg.find_windows_sdk(), path)) # Set Microsoft Windows SDK Setup SdkSetup = [os.path.join(reg.find_windows_sdk(), 'Setup')] # Set Microsoft .NET Framework Tools - roots = [FrameworkDir32] + roots = [reg.find_dot_net_32()] include_64_framework = not pi.target_is_x86() and not pi.current_is_x86() - roots += [FrameworkDir64] if include_64_framework else [] + roots += [reg.find_dot_net_64()] if include_64_framework else [] FxTools = [ os.path.join(root, ver) @@ -332,11 +563,27 @@ def _compute_env(version, arch): # Set Microsoft Visual Studio Team System Database VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] + # Set Microsoft Build Engine + path = r'\MSBuild\%0.1f\bin%s' % (version, pi.ccpu_dir(True)) + MSBuild = [ + os.path.join(pi.program_files_x86, path), + os.path.join(pi.program_files, path) + ] + + # Set Microsoft HTML Help Workshop + path = 'HTML Help Workshop' + HTMLWork = [ + os.path.join(pi.program_files_x86, path), + os.path.join(pi.program_files, path) + ] + + # Return environment return dict( include=_build_paths('include', [VCIncludes, OSIncludes]), lib=_build_paths('lib', [VCLibraries, OSLibraries, FxTools]), - libpath=_build_paths('libpath', [VCLibraries, FxTools]), - path=_build_paths('path', [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, FxTools]), + libpath=_build_paths('libpath', [VCLibraries, FxTools, VCStoreRefs]), + path=_build_paths('path', [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, + FxTools, MSBuild, HTMLWork]), ) @@ -356,12 +603,12 @@ def _build_paths(name, spec_path_lists): if not extant_paths: msg = "%s environment variable is empty" % name.upper() raise distutils.errors.DistutilsPlatformError(msg) - unique_paths = unique_everseen(extant_paths) + unique_paths = _unique_everseen(extant_paths) return os.pathsep.join(unique_paths) # from Python docs -def unique_everseen(iterable, key=None): +def _unique_everseen(iterable, key=None): "List unique elements, preserving order. Remember all elements ever seen." # unique_everseen('AAAABBBCCDAABBB') --> A B C D # unique_everseen('ABBCcAD', str.lower) --> A B C D From 72db3cf5ff66ddab3f6e14880f5545d759938ae6 Mon Sep 17 00:00:00 2001 From: JGoutin Date: Thu, 3 Mar 2016 18:00:58 +0000 Subject: [PATCH 5593/8469] * Move non registry parts from RegistryInfo to SystemInfo. * Rename many variable to use the same names as in MSVC .bat files. This really help to compare the Python script with original sources. * Split compute_env to EnvironmentInfo class. * Continue to add support for MSVC14. * Some more little fixes. --- setuptools/msvc9_support.py | 775 +++++++++++++++++++++++------------- 1 file changed, 509 insertions(+), 266 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index a956a5b0d0..8835c22d10 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -4,6 +4,7 @@ import os import itertools import distutils.errors +import winreg try: # Distutil file for MSVC++ 9.0 and upper @@ -30,16 +31,16 @@ def patch_for_specialized_compiler(): Known supported compilers: -------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); - Microsoft Windows SDK 7.0 (x86, x64, ia64); - Microsoft Windows SDK 6.1 (x86, x64, ia64) + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); + Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Windows SDK 6.1 (x86, x64, ia64) - Microsoft Visual C++ 10.0: - Microsoft Windows SDK 7.1 (x86, x64, ia64) + Microsoft Visual C++ 10.0: + Microsoft Windows SDK 7.1 (x86, x64, ia64) - Microsoft Visual C++ 14.0: - Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual C++ 14.0: + Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ if 'distutils' not in globals(): # The module isn't available to be patched @@ -74,8 +75,8 @@ def msvc9_find_vcvarsall(version): Known supported compilers ------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Parameters ---------- @@ -115,13 +116,13 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): Known supported compilers ------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); - Microsoft Windows SDK 7.0 (x86, x64, ia64); - Microsoft Windows SDK 6.1 (x86, x64, ia64) + Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); + Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Windows SDK 6.1 (x86, x64, ia64) - Microsoft Visual C++ 10.0: - Microsoft Windows SDK 7.1 (x86, x64, ia64) + Microsoft Visual C++ 10.0: + Microsoft Windows SDK 7.1 (x86, x64, ia64) Parameters ---------- @@ -138,15 +139,15 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): try: return unpatched['msvc9_query_vcvarsall'](ver, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError: - # Error if Vcvarsall.bat is missing + # Pass error if Vcvarsall.bat is missing pass except ValueError: - # Error if environment not set after executing vcvarsall.bat + # Pass error if environment not set after executing vcvarsall.bat pass - # If vcvarsall.bat fail, try to set environment directly + # If error, try to set environment directly try: - return _compute_env(ver, arch) + return EnvironmentInfo(arch, ver).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, ver, arch) raise @@ -159,8 +160,8 @@ def msvc14_get_vc_env(plat_spec): Known supported compilers ------------------------- - Microsoft Visual C++ 14.0: - Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual C++ 14.0: + Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Parameters ---------- @@ -171,21 +172,22 @@ def msvc14_get_vc_env(plat_spec): ------ environment: dict """ + # Try to get environement from vcvarsall.bat (Classical way) try: return unpatched['msv14_get_vc_env'](plat_spec) except distutils.errors.DistutilsPlatformError: - # Error if Vcvarsall.bat is missing + # Pass error Vcvarsall.bat is missing pass - # If vcvarsall.bat fail, try to set environment directly + # If error, try to set environment directly try: - return _compute_env(version, plat_spec) + return EnvironmentInfo(plat_spec, vcvermin=14.0).return_env() except distutils.errors.DistutilsPlatformError as exc: - _augment_exception(exc, version, plat_spec) + _augment_exception(exc, 14.0) raise -def _augment_exception(exc, version, arch): +def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user as to what action will resolve it. @@ -193,32 +195,33 @@ def _augment_exception(exc, version, arch): # Error if MSVC++ directory not found or environment not set message = exc.args[0] - if "vcvarsall.bat" in message: + if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ (version, message) - if int(version) == 9: + msdownload = r'www.microsoft.com/download/details.aspx?id=%d' + if version == 9.0: if arch.lower().find('ia64') > -1: # For VC++ 9.0, if IA64 support is needed, redirect user # to Windows SDK 7.0 message += ' Get it with "Microsoft Windows SDK 7.0": ' - message += r'www.microsoft.com/download/details.aspx?id=3138' + message += msdownload % 3138 else: # For VC++ 9.0 redirect user to Vc++ for Python 2.7 : # This redirection link is maintained by Microsoft. # Contact vspython@microsoft.com if it needs updating. message += r' Get it from http://aka.ms/vcpython27' - elif int(version) == 10: + elif version == 10.0: # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' - message += r'www.microsoft.com/download/details.aspx?id=8279' + message += msdownload % 8279 exc.args[0] = message class PlatformInfo: """ - Find architecture informations and system paths. + Current and Target Architectures informations. Parameters ---------- @@ -226,9 +229,6 @@ class PlatformInfo: Target architecture. """ current_cpu = os.environ['processor_architecture'].lower() - win_dir = os.environ['WinDir'] - program_files = os.environ['ProgramFiles'] - program_files_x86 = os.environ.get('ProgramFiles(x86)', program_files) def __init__(self, arch): self.arch = arch.lower() @@ -241,9 +241,9 @@ def target_is_x86(self): return self.target_cpu == 'x86' def current_is_x86(self): - return self.current_cpu != 'x86' + return self.current_cpu == 'x86' - def ccpu_dir(self, hidex86=False, x64=False): + def current_dir(self, hidex86=False, x64=False): """ Current platform specific subfolder. @@ -256,7 +256,8 @@ def ccpu_dir(self, hidex86=False, x64=False): Return ------ - subfolder: str (starting with'\') + subfolder: str + "\target" """ return ( '' if (self.current_cpu == 'x86' and hidex86) else @@ -264,7 +265,7 @@ def ccpu_dir(self, hidex86=False, x64=False): r'\%s' % self.current_cpu ) - def tcpu_dir(self, hidex86=False, x64=False): + def target_dir(self, hidex86=False, x64=False): """ Target platform specific subfolder. @@ -277,7 +278,8 @@ def tcpu_dir(self, hidex86=False, x64=False): Return ------ - subfolder: str (starting with'\') + subfolder: str + "\current" """ return ( '' if (self.target_cpu == 'x86' and hidex86) else @@ -285,9 +287,9 @@ def tcpu_dir(self, hidex86=False, x64=False): r'\%s' % self.target_cpu ) - def tools_extra(self, forcex86=False): + def cross_dir(self, forcex86=False): """ - Platform specific subfolder for Visual C++ Tools. + Cross platform specific subfolder. Parameters ---------- @@ -297,9 +299,11 @@ def tools_extra(self, forcex86=False): Return ------ - subfolder: str (starting with'\') + subfolder: str + "\current" if target architecture is current architecture, + "\current_target" if not. """ - path = self.tcpu_dir(True) + path = self.target_dir(True) if self.target_cpu != self.current_cpu: current = 'x86' if forcex86 else self.current_cpu path = path.replace('\\', '\\%s_' % current) @@ -308,24 +312,25 @@ def tools_extra(self, forcex86=False): class RegistryInfo: """ - Find Microsoft Visual C++ compiler related paths using registry or - default paths. + Microsoft Visual Studio related registry informations. Parameters ---------- - platform_info: platform_info - "platform_info" instance. - version: float - Required Microsoft Visual C++ version. + platform_info: PlatformInfo + "PlatformInfo" instance. """ - def __init__(self, platform_info, version): + HKEYS = (winreg.HKEY_USERS, + winreg.HKEY_CURRENT_USER, + winreg.HKEY_LOCAL_MACHINE, + winreg.HKEY_CLASSES_ROOT) + + def __init__(self, platform_info): self.pi = platform_info - self.version = version @property def microsoft(self): """ - Microsoft registry path. + Microsoft software registry key. """ return os.path.join( 'Software', @@ -336,292 +341,530 @@ def microsoft(self): @property def sxs(self): """ - Visual Studio SxS registry path. + Microsoft Visual Studio SxS registry key. """ return os.path.join(self.microsoft, r'VisualStudio\SxS') @property def vc(self): """ - Visual C++ registry path. + Microsoft Visual C++ registry key. """ return os.path.join(self.sxs, 'VC7') @property def vs(self): """ - Visual Studio registry path. + Microsoft Visual Studio registry key. """ return os.path.join(self.sxs, 'VS7') @property def vc_for_python(self): """ - Visual C++ for Python. + Microsoft Visual C++ for Python registry key. """ - path = r'DevDiv\VCForPython\%0.1f' % self.version + path = r'DevDiv\VCForPython' return os.path.join(self.microsoft, path) @property def windows_sdk(self): """ - Windows/Platform SDK registry path. + Microsoft Windows/Platform SDK registry key. """ return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') - def find_visual_studio(self): + def lookup(self, key, name): + """ + Look for values in registry. + + Parameters + ---------- + key: str + Registry key path where look. + name: str + Value name to find. + + Return + ------ + str: value + """ + for hkey in self.HKEYS: + try: + bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) + except FileNotFoundError: + continue + try: + return winreg.QueryValueEx(bkey, name)[0] + except FileNotFoundError: + pass + + +class SystemInfo: + """ + Microsoft Windows and Visual Studio related system inormations. + + Parameters + ---------- + registry_info: RegistryInfo + "RegistryInfo" instance. + vcver: float + Required Microsoft Visual C++ version. + """ + WinDir = os.environ['WinDir'] + ProgramFiles = os.environ['ProgramFiles'] + ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) + + def __init__(self, registry_info, vcver=None): + self.ri = registry_info + if vcver: + self.vcver = vcver + else: + try: + self.vcver = self.find_availables_vcver()[-1] + except IndexError: + err = 'No Microsoft Visual C++ version found' + raise distutils.errors.DistutilsPlatformError(err) + + def find_availables_vcver(self): + """ + Find all availables Microsoft Visual C++ versions. + """ + vckeys = (self.ri.vc, self.ri.vc_for_python) + vsvers = [] + for hkey in self.ri.HKEYS: + for key in vckeys: + try: + bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) + except FileNotFoundError: + continue + subkeys, values, _ = winreg.QueryInfoKey(bkey) + for i in range(values): + try: + ver = float(winreg.EnumValue(bkey, i)[0]) + if ver not in vsvers: + vsvers.append(ver) + except ValueError: + pass + for i in range(subkeys): + try: + ver = float(winreg.EnumKey(bkey, i)) + if ver not in vsvers: + vsvers.append(ver) + except ValueError: + pass + return sorted(vsvers) + + @property + def VSInstallDir(self): """ - Find Microsoft Visual Studio directory. + Microsoft Visual Studio directory. """ # Default path - name = 'Microsoft Visual Studio %0.1f' % self.version - default = os.path.join(self.pi.program_files_x86, name) + name = 'Microsoft Visual Studio %0.1f' % self.vcver + default = os.path.join(self.ProgramFilesx86, name) # Try to get path from registry, if fail use default path - return self._lookup(self.vs, '%0.1f' % self.version) or default + return self.ri.lookup(self.ri.vs, '%0.1f' % self.vcver) or default - def find_visual_c(self): + @property + def VCInstallDir(self): """ - Find Microsoft Visual C++ directory. + Microsoft Visual C++ directory. """ # Default path - default = r'Microsoft Visual Studio %0.1f\VC' % self.version - guess_vc = os.path.join(self.pi.program_files_x86, default) + default = r'Microsoft Visual Studio %0.1f\VC' % self.vcver + guess_vc = os.path.join(self.ProgramFilesx86, default) # Try to get "VC++ for Python" path from registry as default path - python_vc = self._lookup(self.vc_for_python, 'installdir') + path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vcver) + python_vc = self.ri.lookup(path, 'installdir') default_vc = os.path.join(python_vc, 'VC') if python_vc else guess_vc # Try to get path from registry, if fail use default path - result = self._lookup(self.vc, '%0.1f' % self.version) or default_vc + result = self.ri.lookup(self.ri.vc, '%0.1f' % self.vcver) or default_vc if not os.path.isdir(result): - msg = 'vcvarsall.bat and Visual C++ directory not found' + msg = 'Microsoft Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) return result - def find_windows_sdk(self): + @property + def WindowsSdkDir(self): """ - Find Microsoft Windows SDK directory. + Microsoft Windows SDK directory. """ - WindowsSdkDir = '' - if self.version == 9.0: - WindowsSdkVer = ('7.0', '6.1', '6.0a') - elif self.version == 10.0: - WindowsSdkVer = ('7.1', '7.0a') + sdkdir = '' + if self.vcver == 9.0: + sdkver = ('7.0', '6.1', '6.0a') + elif self.vcver == 10.0: + sdkver = ('7.1', '7.0a') + elif self.vcver == 14.0: + sdkver = ('10.0', '8.1', '8.1a') else: - WindowsSdkVer = () - for ver in WindowsSdkVer: + sdkver = () + for ver in sdkver: # Try to get it from registry - loc = os.path.join(self.windows_sdk, 'v%s' % ver) - WindowsSdkDir = self._lookup(loc, 'installationfolder') - if WindowsSdkDir: + loc = os.path.join(self.ri.windows_sdk, 'v%s' % ver) + sdkdir = self.ri.lookup(loc, 'installationfolder') + if sdkdir: break - if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): + if not sdkdir or not os.path.isdir(sdkdir): # Try to get "VC++ for Python" version from registry - install_base = self._lookup(self.vc_for_python, 'installdir') + path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vcver) + install_base = self.ri.lookup(path, 'installdir') if install_base: - WindowsSdkDir = os.path.join(install_base, 'WinSDK') - if not WindowsSdkDir or not os.path.isdir(WindowsSdkDir): - # If fail, use default path - for ver in WindowsSdkVer: + sdkdir = os.path.join(install_base, 'WinSDK') + if not sdkdir or not os.path.isdir(sdkdir): + # If fail, use default new path + for ver in sdkver: + intver = ver[:ver.rfind('.')] + path = r'Microsoft SDKs\Windows Kits\%s' % (intver) + d = os.path.join(self.ProgramFiles, path) + if os.path.isdir(d): + sdkdir = d + if not sdkdir or not os.path.isdir(sdkdir): + # If fail, use default old path + for ver in sdkver: path = r'Microsoft SDKs\Windows\v%s' % ver - d = os.path.join(self.pi.program_files, path) + d = os.path.join(self.ProgramFiles, path) if os.path.isdir(d): - WindowsSdkDir = d - if not WindowsSdkDir: + sdkdir = d + if not sdkdir: # If fail, use Platform SDK - WindowsSdkDir = os.path.join(self.find_visual_c(), 'PlatformSDK') - return WindowsSdkDir - - def find_dot_net_versions(self): - """ - Find Microsoft .NET Framework Versions. - """ - if self.version == 10.0: - v4 = self._lookup(self.vc, 'frameworkver32') or '' - if v4.lower()[:2] != 'v4': - v4 = None - # default to last v4 version - v4 = v4 or 'v4.0.30319' - FrameworkVer = (v4, 'v3.5') - elif self.version == 9.0: - FrameworkVer = ('v3.5', 'v2.0.50727') - elif self.version == 8.0: - FrameworkVer = ('v3.0', 'v2.0.50727') - return FrameworkVer + sdkdir = os.path.join(self.VCInstallDir, 'PlatformSDK') + return sdkdir - def find_dot_net_32(self): + @property + def FrameworkDir32(self): """ - Find Microsoft .NET Framework 32bit directory. + Microsoft .NET Framework 32bit directory. """ # Default path - guess_fw = os.path.join(self.pi.win_dir, r'Microsoft.NET\Framework') + guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework') # Try to get path from registry, if fail use default path - return self._lookup(self.vc, 'frameworkdir32') or guess_fw + return self.ri.lookup(self.ri.vc, 'frameworkdir32') or guess_fw - def find_dot_net_64(self): + @property + def FrameworkDir64(self): """ - Find Microsoft .NET Framework 64bit directory. + Microsoft .NET Framework 64bit directory. """ # Default path - guess_fw = os.path.join(self.pi.win_dir, r'Microsoft.NET\Framework64') + guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework64') # Try to get path from registry, if fail use default path - return self._lookup(self.vc, 'frameworkdir64') or guess_fw + return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw - def _lookup(self, base, key): - try: - return msvc9compiler.Reg.get_value(base, key) - except KeyError: - pass + @property + def FrameworkVersion32(self): + """ + Microsoft .NET Framework 32bit versions. + """ + return self._find_dot_net_versions(32) + + @property + def FrameworkVersion64(self): + """ + Microsoft .NET Framework 64bit versions. + """ + return self._find_dot_net_versions(64) + def _find_dot_net_versions(self, bits=32): + """ + Find Microsoft .NET Framework versions. -def _compute_env(version, arch): + Parameters + ---------- + bits: int + Platform number of bits: 32 or 64. + """ + # Find actual .NET version + ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' + + # Set .NET versions for specified MSVC++ version + if self.vcver >= 14.0: + frameworkver = (ver, 'v4.0') + elif self.vcver == 10.0: + if ver.lower()[:2] != 'v4': + ver = '' + ver = ver or 'v4.0.30319' + frameworkver = (ver, 'v3.5') + elif self.vcver == 9.0: + frameworkver = ('v3.5', 'v2.0.50727') + elif self.vcver == 8.0: + frameworkver = ('v3.0', 'v2.0.50727') + return frameworkver + + +class EnvironmentInfo: """ Return environment variables for specified Microsoft Visual C++ version - and platform. + and platform : Lib, Include, Path and libpath. - Microsoft Visual C++ known compatibles versions - ----------------------------------------------- - 9.0, 10.0, 14.0 - """ - pi = PlatformInfo(arch) - reg = RegistryInfo(pi, version) - - # Set Microsoft Visual Studio Tools - paths = [r'Common7\IDE', r'Common7\Tools'] - if version >= 14.0: - paths.append(r'Common7\IDE\CommonExtensions\Microsoft\TestWindow') - paths.append(r'Team Tools\Performance Tools') - paths.append(r'Team Tools\Performance Tools' + pi.ccpu_dir(True, True)) - VSTools = [os.path.join(reg.find_visual_studio(), path) for path in paths] - - # Set Microsoft Visual C++ & Microsoft Foundation Class Includes - VCIncludes = [os.path.join(reg.find_visual_c(), 'Include'), - os.path.join(reg.find_visual_c(), 'ATLMFC\Include')] - - # Set Microsoft Visual C++ & Microsoft Foundation Class Libraries - paths = ['Lib' + pi.tcpu_dir(True), r'ATLMFC\Lib' + pi.tcpu_dir(True)] - if version >= 14.0: - paths.append(r'Lib\store' + pi.tcpu_dir(True)) - VCLibraries = [os.path.join(reg.find_visual_c(), path) for path in paths] - - # Set Microsoft Visual C++ store references Libraries - if version >= 14.0: - path = r'Lib\store\references' - VCStoreRefs = [os.path.join(reg.find_visual_c(), path)] - else: - VCStoreRefs = [] - - # Set Microsoft Visual C++ Tools - path = 'Bin' + pi.tools_extra(False if version >= 14.0 else True) - VCTools = [ - os.path.join(reg.find_visual_c(), 'VCPackages'), - os.path.join(reg.find_visual_c(), path), - ] - if pi.tools_extra() and version >= 14.0: - path = 'Bin' + pi.ccpu_dir(True) - VCTools.append(os.path.join(reg.find_visual_c(), path)) - else: - VCTools.append(os.path.join(reg.find_visual_c(), 'Bin')) - - # Set Microsoft Windows SDK Libraries - path = 'Lib' + pi.tcpu_dir(True, True) - OSLibraries = [os.path.join(reg.find_windows_sdk(), path)] - - # Set Microsoft Windows SDK Include - OSIncludes = [ - os.path.join(reg.find_windows_sdk(), 'Include'), - os.path.join(reg.find_windows_sdk(), r'Include\gl'), - ] - - # Set Microsoft Windows SDK Tools - SdkTools = [os.path.join(reg.find_windows_sdk(), 'Bin')] - if not pi.target_is_x86(): - path = 'Bin' + pi.tcpu_dir(True, True) - SdkTools.append(os.path.join(reg.find_windows_sdk(), path)) - if version == 10.0: - path = r'Bin\NETFX 4.0 Tools' + pi.tcpu_dir(True, True) - SdkTools.append(os.path.join(reg.find_windows_sdk(), path)) - - # Set Microsoft Windows SDK Setup - SdkSetup = [os.path.join(reg.find_windows_sdk(), 'Setup')] - - # Set Microsoft .NET Framework Tools - roots = [reg.find_dot_net_32()] - include_64_framework = not pi.target_is_x86() and not pi.current_is_x86() - roots += [reg.find_dot_net_64()] if include_64_framework else [] - - FxTools = [ - os.path.join(root, ver) - for root, ver in itertools.product(roots, reg.find_dot_net_versions()) - ] - - # Set Microsoft Visual Studio Team System Database - VsTDb = [os.path.join(reg.find_visual_studio(), r'VSTSDB\Deploy')] - - # Set Microsoft Build Engine - path = r'\MSBuild\%0.1f\bin%s' % (version, pi.ccpu_dir(True)) - MSBuild = [ - os.path.join(pi.program_files_x86, path), - os.path.join(pi.program_files, path) - ] - - # Set Microsoft HTML Help Workshop - path = 'HTML Help Workshop' - HTMLWork = [ - os.path.join(pi.program_files_x86, path), - os.path.join(pi.program_files, path) - ] - - # Return environment - return dict( - include=_build_paths('include', [VCIncludes, OSIncludes]), - lib=_build_paths('lib', [VCLibraries, OSLibraries, FxTools]), - libpath=_build_paths('libpath', [VCLibraries, FxTools, VCStoreRefs]), - path=_build_paths('path', [VCTools, VSTools, VsTDb, SdkTools, SdkSetup, - FxTools, MSBuild, HTMLWork]), - ) - - -def _build_paths(name, spec_path_lists): - """ - Given an environment variable name and specified paths, - return a pathsep-separated string of paths containing - unique, extant, directories from those paths and from - the environment variable. Raise an error if no paths - are resolved. + This function is compatible with Microsoft Visual C++ 9.0 to 14.0. + + Parameters + ---------- + arch: str + Target architecture. + vcver: float + Required Microsoft Visual C++ version. If not set, autodetect the last + version. + vcvermin: float + Minimum Microsoft Visual C++ version. """ - # flatten spec_path_lists - spec_paths = itertools.chain.from_iterable(spec_path_lists) - env_paths = os.environ.get(name, '').split(os.pathsep) - paths = itertools.chain(spec_paths, env_paths) - extant_paths = list(filter(os.path.isdir, paths)) - if not extant_paths: - msg = "%s environment variable is empty" % name.upper() - raise distutils.errors.DistutilsPlatformError(msg) - unique_paths = _unique_everseen(extant_paths) - return os.pathsep.join(unique_paths) - - -# from Python docs -def _unique_everseen(iterable, key=None): - "List unique elements, preserving order. Remember all elements ever seen." - # unique_everseen('AAAABBBCCDAABBB') --> A B C D - # unique_everseen('ABBCcAD', str.lower) --> A B C D - seen = set() - seen_add = seen.add - filterfalse = six.moves.filterfalse - if key is None: - for element in filterfalse(seen.__contains__, iterable): - seen_add(element) - yield element - else: - for element in iterable: - k = key(element) - if k not in seen: - seen_add(k) + def __init__(self, arch, vcver=None, vcvermin=None): + self.pi = PlatformInfo(arch) + self.ri = RegistryInfo(self.pi) + self.si = SystemInfo(self.ri, vcver) + + if self.vcver < vcvermin: + err = 'No suitable Microsoft Visual C++ version found' + raise distutils.errors.DistutilsPlatformError(err) + + @property + def vcver(self): + """ + Microsoft Visual C++ version. + """ + return self.si.vcver + + @property + def VSTools(self): + """ + Microsoft Visual Studio Tools + """ + paths = [r'Common7\IDE', r'Common7\Tools'] + if self.vcver >= 14.0: + arch_subdir = self.pi.current_dir(hidex86=True, x64=True) + paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] + paths += [r'Team Tools\Performance Tools'] + paths += [r'Team Tools\Performance Tools%s' % arch_subdir] + return [os.path.join(self.si.VSInstallDir, path) for path in paths] + + @property + def VCIncludes(self): + """ + Microsoft Visual C++ & Microsoft Foundation Class Includes + """ + return [os.path.join(self.si.VCInstallDir, 'Include'), + os.path.join(self.si.VCInstallDir, 'ATLMFC\Include')] + + @property + def VCLibraries(self): + """ + Microsoft Visual C++ & Microsoft Foundation Class Libraries + """ + arch_subdir = self.pi.target_dir(hidex86=True) + paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] + if self.vcver >= 14.0: + paths += [r'Lib\store%s' % arch_subdir] + return [os.path.join(self.si.VCInstallDir, path) for path in paths] + + @property + def VCStoreRefs(self): + """ + Microsoft Visual C++ store references Libraries + """ + path = os.path.join(self.si.VCInstallDir, r'Lib\store\references') + return [path] if self.vcver >= 14.0 else [] + + @property + def VCTools(self): + """ + Microsoft Visual C++ Tools + """ + forcex86 = True if self.vcver <= 10.0 else False + arch_subdir = self.pi.cross_dir(forcex86) + tools = [ + os.path.join(self.si.VCInstallDir, 'VCPackages'), + os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir), + ] + if self.pi.cross_dir() and self.vcver >= 14.0: + path = 'Bin%s' % self.pi.current_dir(hidex86=True) + tools += [os.path.join(self.si.VCInstallDir, path)] + else: + tools += [os.path.join(self.si.VCInstallDir, 'Bin')] + return tools + + @property + def OSLibraries(self): + """ + Microsoft Windows SDK Libraries + """ + arch_subdir = self.pi.target_dir(hidex86=True, x64=True) + return [os.path.join(self.si.WindowsSdkDir, 'Bin%s' % arch_subdir)] + + @property + def OSIncludes(self): + """ + Microsoft Windows SDK Include + """ + return [ + os.path.join(self.si.WindowsSdkDir, 'Include'), + os.path.join(self.si.WindowsSdkDir, r'Include\gl'), + ] + + @property + def SdkTools(self): + """ + Microsoft Windows SDK Tools + """ + if self.vcver <= 10: + arch_subdir = self.pi.target_dir(hidex86=True, x64=True) + else: + arch_subdir = self.pi.target_dir(x64=True) + tools = [os.path.join(self.si.WindowsSdkDir, 'Bin')] + if not self.pi.target_is_x86(): + path = 'Bin%s' % arch_subdir + tools += [os.path.join(self.si.WindowsSdkDir, path)] + if self.vcver == 10.0: + path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir + tools += [os.path.join(self.si.WindowsSdkDir, path)] + return tools + + @property + def SdkSetup(self): + """ + Microsoft Windows SDK Setup + """ + return [os.path.join(self.si.WindowsSdkDir, 'Setup')] + + @property + def FxTools(self): + """ + Microsoft .NET Framework Tools + """ + pi = self.pi + si = self.si + if self.vcver <= 10.0: + include32 = True + include64 = not pi.target_is_x86() and not pi.current_is_x86() + else: + include32 = pi.target_is_x86() or pi.current_is_x86() + include64 = pi.current_cpu == 'amd64' or pi.target_cpu == 'amd64' + tools = [] + if include32: + tools += [ + os.path.join(si.FrameworkDir32, ver) + for ver in si.FrameworkVersion32 + ] + if include64: + tools += [ + os.path.join(si.FrameworkDir64, ver) + for ver in si.FrameworkVersion64 + ] + return tools + + @property + def VsTDb(self): + """ + Microsoft Visual Studio Team System Database + """ + return [os.path.join(self.si.VSInstallDir, r'VSTSDB\Deploy')] + + @property + def MSBuild(self): + """ + Microsoft Build Engine + """ + arch_subdir = self.pi.current_dir(hidex86=True) + path = r'\MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) + return [ + os.path.join(self.si.ProgramFilesx86, path), + os.path.join(self.si.ProgramFiles, path) + ] + + @property + def HTMLWs(self): + """ + Microsoft HTML Help Workshop + """ + return [ + os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), + os.path.join(self.si.ProgramFiles, 'HTML Help Workshop') + ] + + @property + def VCRuntimeRedist(self): + """ + Microsoft Visual C++ runtime redistribuable dll + """ + arch_subdir = self.pi.target_dir(x64=True) + vcruntime = 'redist%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' + vcruntime = vcruntime % (arch_subdir, self.vcver, self.vcver) + return os.path.join(self.si.VCInstallDir, vcruntime) + + def return_env(self): + """ + Return environment dict. + """ + env = dict( + include=self._build_paths('include', + [self.VCIncludes, + self.OSIncludes]), + lib=self._build_paths('lib', + [self.VCLibraries, + self.OSLibraries, + self.FxTools]), + libpath=self._build_paths('libpath', + [self.VCLibraries, + self.FxTools, + self.VCStoreRefs]), + path=self._build_paths('path', + [self.VCTools, + self.VSTools, + self.VsTDb, + self.SdkTools, + self.SdkSetup, + self.FxTools, + self.MSBuild, + self.HTMLWs]), + ) + if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist): + env['py_vcruntime_redist'] = self.VCRuntimeRedist + return env + + def _build_paths(self, name, spec_path_lists): + """ + Given an environment variable name and specified paths, + return a pathsep-separated string of paths containing + unique, extant, directories from those paths and from + the environment variable. Raise an error if no paths + are resolved. + """ + # flatten spec_path_lists + spec_paths = itertools.chain.from_iterable(spec_path_lists) + env_paths = os.environ.get(name, '').split(os.pathsep) + paths = itertools.chain(spec_paths, env_paths) + extant_paths = list(filter(os.path.isdir, paths)) + if not extant_paths: + msg = "%s environment variable is empty" % name.upper() + raise distutils.errors.DistutilsPlatformError(msg) + unique_paths = self._unique_everseen(extant_paths) + return os.pathsep.join(unique_paths) + + # from Python docs + def _unique_everseen(self, iterable, key=None): + """ + List unique elements, preserving order. + Remember all elements ever seen. + """ + # unique_everseen('AAAABBBCCDAABBB') --> A B C D + # unique_everseen('ABBCcAD', str.lower) --> A B C D + seen = set() + seen_add = seen.add + filterfalse = six.moves.filterfalse + if key is None: + for element in filterfalse(seen.__contains__, iterable): + seen_add(element) yield element + else: + for element in iterable: + k = key(element) + if k not in seen: + seen_add(k) + yield element From 321b27c9cc8e5a5e316488f457a890765a06f9ca Mon Sep 17 00:00:00 2001 From: JGoutin Date: Fri, 4 Mar 2016 15:54:44 +0000 Subject: [PATCH 5594/8469] * Continue do add support for MSVC14 (Still work in progress). * Add support for MSVC11 and 12 (Only few changes with actual code needed for them). * Python 2 compatibility for winreg. --- setuptools/msvc9_support.py | 150 ++++++++++++++++++++++++++++-------- 1 file changed, 119 insertions(+), 31 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 8835c22d10..0e144a8047 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -4,23 +4,22 @@ import os import itertools import distutils.errors -import winreg +import six +import six.moves.winreg as winreg try: - # Distutil file for MSVC++ 9.0 and upper + # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) import distutils.msvc9compiler as msvc9compiler except ImportError: pass try: - # Distutil file for MSVC++ 14.0 and upper + # Distutil file for MSVC++ 14.0 and upper (Python 3.5) import distutils._msvccompiler as msvc14compiler except ImportError: pass -import six - unpatched = dict() @@ -73,6 +72,8 @@ def msvc9_find_vcvarsall(version): compiler build for Python (VCForPython). Fall back to original behavior when the standalone compiler is not available. + Redirect the path of "vcvarsall.bat". + Known supported compilers ------------------------- Microsoft Visual C++ 9.0: @@ -114,6 +115,8 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): Patched "distutils.msvc9compiler.query_vcvarsall" for support standalones compilers. + Set environment without use of "vcvarsall.bat". + Known supported compilers ------------------------- Microsoft Visual C++ 9.0: @@ -158,6 +161,8 @@ def msvc14_get_vc_env(plat_spec): Patched "distutils._msvccompiler._get_vc_env" for support standalones compilers. + Set environment without use of "vcvarsall.bat". + Known supported compilers ------------------------- Microsoft Visual C++ 14.0: @@ -338,24 +343,31 @@ def microsoft(self): 'Microsoft', ) + @property + def visualstudio(self): + """ + Microsoft Visual Studio root registry key. + """ + return os.path.join(self.microsoft, r'VisualStudio') + @property def sxs(self): """ Microsoft Visual Studio SxS registry key. """ - return os.path.join(self.microsoft, r'VisualStudio\SxS') + return os.path.join(self.visualstudio, 'SxS') @property def vc(self): """ - Microsoft Visual C++ registry key. + Microsoft Visual C++ VC7 registry key. """ return os.path.join(self.sxs, 'VC7') @property def vs(self): """ - Microsoft Visual Studio registry key. + Microsoft Visual Studio VS7 registry key. """ return os.path.join(self.sxs, 'VS7') @@ -496,14 +508,16 @@ def WindowsSdkDir(self): Microsoft Windows SDK directory. """ sdkdir = '' - if self.vcver == 9.0: + if self.vcver <= 9.0: sdkver = ('7.0', '6.1', '6.0a') elif self.vcver == 10.0: sdkver = ('7.1', '7.0a') - elif self.vcver == 14.0: - sdkver = ('10.0', '8.1', '8.1a') - else: - sdkver = () + elif self.vcver == 11.0: + sdkver = ('8.0', '8.0a') + elif self.vcver == 12.0: + sdkver = ('8.1', '8.1a') + elif self.vcver >= 14.0: + sdkver = ('10.0', '8.1') for ver in sdkver: # Try to get it from registry loc = os.path.join(self.ri.windows_sdk, 'v%s' % ver) @@ -536,6 +550,15 @@ def WindowsSdkDir(self): sdkdir = os.path.join(self.VCInstallDir, 'PlatformSDK') return sdkdir + @property + def FSharpInstallDir(self): + """ + Microsoft Visual F# directory. + """ + path = r'%0.1f\Setup\F#' % self.vcver + path = os.path.join(self.ri.visualstudio, path) + return self.ri.lookup(path, 'productdir') or '' + @property def FrameworkDir32(self): """ @@ -585,16 +608,16 @@ def _find_dot_net_versions(self, bits=32): ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' # Set .NET versions for specified MSVC++ version - if self.vcver >= 14.0: + if self.vcver >= 12.0: frameworkver = (ver, 'v4.0') - elif self.vcver == 10.0: + elif self.vcver >= 10.0: if ver.lower()[:2] != 'v4': ver = '' ver = ver or 'v4.0.30319' frameworkver = (ver, 'v3.5') elif self.vcver == 9.0: frameworkver = ('v3.5', 'v2.0.50727') - elif self.vcver == 8.0: + if self.vcver == 8.0: frameworkver = ('v3.0', 'v2.0.50727') return frameworkver @@ -606,6 +629,9 @@ class EnvironmentInfo: This function is compatible with Microsoft Visual C++ 9.0 to 14.0. + Script created by analysing Microsoft environment configuration files like + "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ... + Parameters ---------- arch: str @@ -669,8 +695,9 @@ def VCStoreRefs(self): """ Microsoft Visual C++ store references Libraries """ - path = os.path.join(self.si.VCInstallDir, r'Lib\store\references') - return [path] if self.vcver >= 14.0 else [] + if self.vcver < 14.0: + return [] + return os.path.join(self.si.VCInstallDir, r'Lib\store\references') @property def VCTools(self): @@ -703,25 +730,36 @@ def OSIncludes(self): """ Microsoft Windows SDK Include """ - return [ - os.path.join(self.si.WindowsSdkDir, 'Include'), - os.path.join(self.si.WindowsSdkDir, r'Include\gl'), - ] + if self.vcver <= 10.0: + return [ + os.path.join(self.si.WindowsSdkDir, 'Include'), + os.path.join(self.si.WindowsSdkDir, r'Include\gl') + ] + elif self.vcver <= 12.0: + return [ + os.path.join(self.si.WindowsSdkDir, r'include\shared'), + os.path.join(self.si.WindowsSdkDir, r'include\um'), + os.path.join(self.si.WindowsSdkDir, r'include\winrt') + ] @property def SdkTools(self): """ Microsoft Windows SDK Tools """ - if self.vcver <= 10: - arch_subdir = self.pi.target_dir(hidex86=True, x64=True) + if self.vcver <= 11.0: + tools = [os.path.join(self.si.WindowsSdkDir, 'Bin')] else: - arch_subdir = self.pi.target_dir(x64=True) - tools = [os.path.join(self.si.WindowsSdkDir, 'Bin')] - if not self.pi.target_is_x86(): + tools = [os.path.join(self.si.WindowsSdkDir, r'Bin\x86')] + if not self.pi.current_is_x86(): + arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] - if self.vcver == 10.0: + if self.vcver == 10.0 or self.vcver == 11.0: + if self.pi.target_is_x86(): + arch_subdir = '' + else: + arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] return tools @@ -759,6 +797,22 @@ def FxTools(self): ] return tools + @property + def NetFxSDKLibraries(self): + """ + Microsoft .Net Framework SDK Libraries + """ + if self.vcver < 14.0: + return [] + + @property + def NetFxSDKIncludes(self): + """ + Microsoft .Net Framework SDK Includes + """ + if self.vcver < 14.0: + return [] + @property def VsTDb(self): """ @@ -771,6 +825,8 @@ def MSBuild(self): """ Microsoft Build Engine """ + if self.vcver < 12.0: + return [] arch_subdir = self.pi.current_dir(hidex86=True) path = r'\MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) return [ @@ -783,11 +839,38 @@ def HTMLWs(self): """ Microsoft HTML Help Workshop """ + if self.vcver < 11.0: + return [] return [ os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), os.path.join(self.si.ProgramFiles, 'HTML Help Workshop') ] + @property + def UCRTLibraries(self): + """ + Microsoft Universal CRT Libraries + """ + if self.vcver < 14.0: + return [] + + @property + def UCRTIncludes(self): + """ + Microsoft Universal CRT Include + """ + if self.vcver < 14.0: + return [] + + @property + def FSharp(self): + """ + Microsoft Visual F# + """ + if self.vcver < 11.0 and self.vcver > 12.0: + return [] + return self.si.FSharpInstallDir + @property def VCRuntimeRedist(self): """ @@ -805,11 +888,15 @@ def return_env(self): env = dict( include=self._build_paths('include', [self.VCIncludes, - self.OSIncludes]), + self.OSIncludes, + self.UCRTIncludes, + self.NetFxSDKIncludes]), lib=self._build_paths('lib', [self.VCLibraries, self.OSLibraries, - self.FxTools]), + self.FxTools, + self.UCRTLibraries, + self.NetFxSDKLibraries]), libpath=self._build_paths('libpath', [self.VCLibraries, self.FxTools, @@ -822,7 +909,8 @@ def return_env(self): self.SdkSetup, self.FxTools, self.MSBuild, - self.HTMLWs]), + self.HTMLWs, + self.FSharp]), ) if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist): env['py_vcruntime_redist'] = self.VCRuntimeRedist From de4bdcffb9f11769465ba3b6bb67cfb8a5b196e2 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 7 Mar 2016 10:33:25 +1100 Subject: [PATCH 5595/8469] Change pkg_resources.Requirement to be a subclass of packaging --- pkg_resources/__init__.py | 21 +++++++-------------- pkg_resources/tests/test_resources.py | 2 +- setuptools/command/easy_install.py | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2fb7bc5101..af336deb34 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2754,33 +2754,26 @@ def parse_requirements(strs): yield Requirement(line) -class Requirement: +class Requirement(packaging.requirements.Requirement): def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" try: - self.req = packaging.requirements.Requirement(requirement_string) + super(Requirement, self).__init__(requirement_string) except packaging.requirements.InvalidRequirement as e: raise RequirementParseError(str(e)) - self.unsafe_name = self.req.name - project_name = safe_name(self.req.name) - self.project_name, self.key = project_name, project_name.lower() - self.specifier = self.req.specifier + self.unsafe_name = self.name + self.project_name, self.key = self.name, self.name.lower() self.specs = [ - (spec.operator, spec.version) for spec in self.req.specifier] - self.extras = tuple(map(safe_extra, self.req.extras)) - self.marker = self.req.marker - self.url = self.req.url + (spec.operator, spec.version) for spec in self.specifier] + self.extras = tuple(map(safe_extra, self.extras)) self.hashCmp = ( self.key, self.specifier, frozenset(self.extras), - str(self.marker) + str(self.marker) if self.marker else None, ) self.__hash = hash(self.hashCmp) - def __str__(self): - return str(self.req) - def __eq__(self, other): return ( isinstance(other, Requirement) and diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 16fc319808..5f08400171 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -394,7 +394,7 @@ def testOptionsAndHashing(self): "twisted", packaging.specifiers.SpecifierSet(">=1.2"), frozenset(["foo","bar"]), - 'None' + None )) ) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 97de339544..0733065e19 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -710,7 +710,7 @@ def process_distribution(self, requirement, dist, deps=True, *info): elif requirement is None or dist not in requirement: # if we wound up with a different version, resolve what we've got distreq = dist.as_requirement() - requirement = Requirement(str(distreq.req)) + requirement = Requirement(str(distreq)) log.info("Processing dependencies for %s", requirement) try: distros = WorkingSet([]).resolve( From bd090b8067e77d30325f5b8acc22f9b323c7c222 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 7 Mar 2016 14:41:53 +1100 Subject: [PATCH 5596/8469] Add in safe_name for project_name, which disappeared in my refactor. --- pkg_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index af336deb34..03def160af 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2762,7 +2762,8 @@ def __init__(self, requirement_string): except packaging.requirements.InvalidRequirement as e: raise RequirementParseError(str(e)) self.unsafe_name = self.name - self.project_name, self.key = self.name, self.name.lower() + project_name = safe_name(self.name) + self.project_name, self.key = project_name, project_name.lower() self.specs = [ (spec.operator, spec.version) for spec in self.specifier] self.extras = tuple(map(safe_extra, self.extras)) From 280cce52534dc639fbb2064fa2e2d1e597901882 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 8 Mar 2016 10:38:59 +1100 Subject: [PATCH 5597/8469] Add in a test that checks comparsion of Requirement with markers --- pkg_resources/tests/test_resources.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 5f08400171..1444b9ba06 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -509,6 +509,28 @@ def testSimpleRequirements(self): with pytest.raises(ValueError): Requirement.parse("#") + def test_requirements_with_markers(self): + assert ( + Requirement.parse("foobar;os_name=='a'") + == + Requirement.parse("foobar;os_name=='a'") + ) + assert ( + Requirement.parse("name==1.1;python_version=='2.7'") + != + Requirement.parse("name==1.1;python_version=='3.3'") + ) + assert ( + Requirement.parse("name==1.0;python_version=='2.7'") + != + Requirement.parse("name==1.2;python_version=='2.7'") + ) + assert ( + Requirement.parse("name[foo]==1.0;python_version=='3.3'") + != + Requirement.parse("name[foo,bar]==1.0;python_version=='3.3'") + ) + def test_local_version(self): req, = parse_requirements('foo==1.0.org1') From 2ddbf6a51af22fafb50ed1e979413c4168bcff60 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2016 17:10:59 -0400 Subject: [PATCH 5598/8469] Update changelog --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b7325031ee..630df9622d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,16 @@ CHANGES ======= +20.3 +---- + +* Pull Request #179: ``pkg_resources.Requirement`` objects are + now a subclass of ``packaging.requirements.Requirement``, + allowing any environment markers and url (if any) to be + affiliated with the requirement +* Pull Request #179: Restore use of RequirementParseError + exception unintentionally dropped in 20.2. + 20.2.2 ------ From 8dec43f3a33ece894c182b1e681e5e205ba391f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2016 17:11:08 -0400 Subject: [PATCH 5599/8469] Bumped to 20.3 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 10f3ca212a..7e20c8bf5a 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.2.3' +__version__ = '20.3' From 5029eaeaaaa4dba80111db659618024603dda41e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2016 17:11:10 -0400 Subject: [PATCH 5600/8469] Added tag 20.3 for changeset 9c55a3a1268a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0ab43c5805..d195692d92 100644 --- a/.hgtags +++ b/.hgtags @@ -249,3 +249,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 74c4ffbe1f399345eb4f6a64785cfff54f7e6e7e 20.2 1aacb05fbdfe06cee904e7a138a4aa6df7b88a63 20.2.1 48aa5271ef1cd5379cf91a1c958e490692b978e7 20.2.2 +9c55a3a1268a33b4a57b96b2b9fa2cd0701780ee 20.3 From e570a849413f3325c3583afa1fe4f083c9302f92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Mar 2016 17:13:38 -0400 Subject: [PATCH 5601/8469] Bumped to 20.4 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 7e20c8bf5a..ae23d3a2fc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.3' +__version__ = '20.4' From ae6ebd7837573c7f86b07b14725937b3f9d43d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Thu, 17 Mar 2016 01:10:15 +0000 Subject: [PATCH 5602/8469] Remove the import hook when unloading the old pkg_resources modules --HG-- branch : agronholm/remove-the-import-hook-when-unloading-th-1458177009332 --- ez_setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 9715bdc7b0..4faa52183c 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -192,6 +192,11 @@ def _conflict_bail(VC_err, version): def _unload_pkg_resources(): + from pkg_resources.extern import VendorImporter + sys.meta_path = [importer for importer in sys.meta_path if + not isinstance(importer, VendorImporter)] + del VendorImporter + del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') From bc618da735a02a1cebb85fd979ccdd317b308276 Mon Sep 17 00:00:00 2001 From: Alexey Kotlyarov Date: Thu, 17 Mar 2016 16:06:41 +1100 Subject: [PATCH 5603/8469] Remove CVS and Subversion references in include_package_data docs --- docs/setuptools.txt | 96 +++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 61 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 610a0e613d..d267bf2914 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -258,10 +258,9 @@ unless you need the associated ``setuptools`` feature. ``include_package_data`` If set to ``True``, this tells ``setuptools`` to automatically include any - data files it finds inside your package directories, that are either under - CVS or Subversion control, or which are specified by your ``MANIFEST.in`` - file. For more information, see the section below on `Including Data - Files`_. + data files it finds inside your package directories that are specified by + your ``MANIFEST.in`` file. For more information, see the section below on + `Including Data Files`_. ``exclude_package_data`` A dictionary mapping package names to lists of glob patterns that should @@ -785,17 +784,15 @@ e.g.:: ) This tells setuptools to install any data files it finds in your packages. -The data files must be under CVS or Subversion control, or else they must be -specified via the distutils' ``MANIFEST.in`` file. (They can also be tracked -by another revision control system, using an appropriate plugin. See the -section below on `Adding Support for Other Revision Control Systems`_ for -information on how to write such plugins.) - -If the data files are not under version control, or are not in a supported -version control system, or if you want finer-grained control over what files -are included (for example, if you have documentation files in your package -directories and want to exclude them from installation), then you can also use -the ``package_data`` keyword, e.g.:: +The data files must be specified via the distutils' ``MANIFEST.in`` file. +(They can also be tracked by a revision control system, using an appropriate +plugin. See the section below on `Adding Support for Revision Control +Systems`_ for information on how to write such plugins.) + +If you want finer-grained control over what files are included (for example, +if you have documentation files in your package directories and want to exclude +them from installation), then you can also use the ``package_data`` keyword, +e.g.:: from setuptools import setup, find_packages setup( @@ -853,8 +850,7 @@ converts slashes to appropriate platform-specific separators at build time. Python 2.4; there is `some documentation for the feature`__ available on the python.org website. If using the setuptools-specific ``include_package_data`` argument, files specified by ``package_data`` will *not* be automatically -added to the manifest unless they are tracked by a supported version control -system, or are listed in the MANIFEST.in file.) +added to the manifest unless they are listed in the MANIFEST.in file.) __ http://docs.python.org/dist/node11.html @@ -887,8 +883,7 @@ included as a result of using ``include_package_data``. In summary, the three options allow you to: ``include_package_data`` - Accept all data files and directories matched by ``MANIFEST.in`` or found - in source control. + Accept all data files and directories matched by ``MANIFEST.in``. ``package_data`` Specify additional patterns to match files and directories that may or may @@ -1231,15 +1226,14 @@ Your Project's Dependencies target audience isn't able to compile packages (e.g. most Windows users) and your package or some of its dependencies include C code. -Subversion or CVS Users and Co-Developers +Revision Control System Users and Co-Developers Users and co-developers who are tracking your in-development code using - CVS, Subversion, or some other revision control system should probably read - this manual's sections regarding such development. Alternately, you may - wish to create a quick-reference guide containing the tips from this manual - that apply to your particular situation. For example, if you recommend - that people use ``setup.py develop`` when tracking your in-development - code, you should let them know that this needs to be run after every update - or commit. + a revision control system should probably read this manual's sections + regarding such development. Alternately, you may wish to create a + quick-reference guide containing the tips from this manual that apply to + your particular situation. For example, if you recommend that people use + ``setup.py develop`` when tracking your in-development code, you should let + them know that this needs to be run after every update or commit. Similarly, if you remove modules or data files from your project, you should remind them to run ``setup.py clean --all`` and delete any obsolete @@ -1467,25 +1461,10 @@ use the appropriate defaults.) Generating Source Distributions ------------------------------- -``setuptools`` enhances the distutils' default algorithm for source file -selection, so that all files managed by CVS or Subversion in your project tree -are included in any source distribution you build. This is a big improvement -over having to manually write a ``MANIFEST.in`` file and try to keep it in -sync with your project. So, if you are using CVS or Subversion, and your -source distributions only need to include files that you're tracking in -revision control, don't create a ``MANIFEST.in`` file for your project. -(And, if you already have one, you might consider deleting it the next time -you would otherwise have to change it.) - -(NOTE: other revision control systems besides CVS and Subversion can be -supported using plugins; see the section below on `Adding Support for Other -Revision Control Systems`_ for information on how to write such plugins.) - -If you need to include automatically generated files, or files that are kept in -an unsupported revision control system, you'll need to create a ``MANIFEST.in`` -file to specify any files that the default file location algorithm doesn't -catch. See the distutils documentation for more information on the format of -the ``MANIFEST.in`` file. +If you need to include automatically generated files, you'll need to create a +``MANIFEST.in`` file to specify any files that the default file location +algorithm doesn't catch. See the distutils documentation for more information +on the format of the ``MANIFEST.in`` file. But, be sure to ignore any part of the distutils documentation that deals with ``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you @@ -1501,12 +1480,6 @@ the options that the distutils' more complex ``sdist`` process requires. For all practical purposes, you'll probably use only the ``--formats`` option, if you use any option at all. -(By the way, if you're using some other revision control system, you might -consider creating and publishing a `revision control plugin for setuptools`_.) - - -.. _revision control plugin for setuptools: `Adding Support for Other Revision Control Systems`_ - Making your package available for EasyInstall --------------------------------------------- @@ -1687,9 +1660,10 @@ Of course, for this to work, your source distributions must include the C code generated by Pyrex, as well as your original ``.pyx`` files. This means that you will probably want to include current ``.c`` files in your revision control system, rebuilding them whenever you check changes in for the ``.pyx`` -source files. This will ensure that people tracking your project in CVS or -Subversion will be able to build it even if they don't have Pyrex installed, -and that your source releases will be similarly usable with or without Pyrex. +source files. This will ensure that people tracking your project in a revision +control system will be able to build it even if they don't have Pyrex +installed, and that your source releases will be similarly usable with or +without Pyrex. ----------------- @@ -2569,15 +2543,15 @@ the ``cmd`` object's ``write_file()``, ``delete_file()``, and those methods' docstrings for more details. -Adding Support for Other Revision Control Systems +Adding Support for Revision Control Systems ------------------------------------------------- If you would like to create a plugin for ``setuptools`` to find files in -source control systems, you can do so by adding an -entry point to the ``setuptools.file_finders`` group. The entry point should -be a function accepting a single directory name, and should yield -all the filenames within that directory (and any subdirectories thereof) that -are under revision control. +source control systems, you can do so by adding an entry point to the +``setuptools.file_finders`` group. The entry point should be a function +accepting a single directory name, and should yield all the filenames within +that directory (and any subdirectories thereof) that are under revision +control. For example, if you were going to create a plugin for a revision control system called "foobar", you would write a function something like this: From 071e0ed8fea0ab719a9b4a7d1f71c27a5754b819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Thu, 17 Mar 2016 05:56:44 +0000 Subject: [PATCH 5604/8469] Safer way to remove the import hook --HG-- branch : agronholm/remove-the-import-hook-when-unloading-th-1458177009332 --- ez_setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index 4faa52183c..d6f4b78cb7 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -192,11 +192,8 @@ def _conflict_bail(VC_err, version): def _unload_pkg_resources(): - from pkg_resources.extern import VendorImporter sys.meta_path = [importer for importer in sys.meta_path if - not isinstance(importer, VendorImporter)] - del VendorImporter - + importer.__class__.__module__ != 'pkg_resources.extern'] del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') From db587f4f8c93b6630f6a07f984ce68d0918b929f Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 18 Mar 2016 15:33:08 +1100 Subject: [PATCH 5605/8469] Update documentation for ``Requirement``. --- docs/pkg_resources.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 3d40a1a242..7b979ec303 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -590,20 +590,7 @@ Requirements Parsing parse multiple specifiers from a string or iterable of strings, use ``parse_requirements()`` instead.) - The syntax of a requirement specifier can be defined in EBNF as follows:: - - requirement ::= project_name extras? versionspec? - versionspec ::= comparison version (',' comparison version)* - comparison ::= '<' | '<=' | '!=' | '==' | '>=' | '>' | '~=' | '===' - extras ::= '[' extralist? ']' - extralist ::= identifier (',' identifier)* - project_name ::= identifier - identifier ::= [-A-Za-z0-9_]+ - version ::= [-A-Za-z0-9_.]+ - - Tokens can be separated by whitespace, and a requirement can be continued - over multiple lines using a backslash (``\\``). Line-end comments (using - ``#``) are also allowed. + The syntax of a requirement specifier is defined in full in PEP 508. Some examples of valid requirement specifiers:: @@ -611,6 +598,7 @@ Requirements Parsing Fizzy [foo, bar] PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1 SomethingWhoseVersionIDontCareAbout + SomethingWithMarker[foo]>1.0;python_version<"2.7" The project name is the only required portion of a requirement string, and if it's the only thing supplied, the requirement will accept any version @@ -631,6 +619,11 @@ Requirements Parsing ``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary distributions to sys.path at runtime. + The "markers" in a requirement are used to specify when a requirement + should be installed -- the requirement will be installed if the marker + evaluates as true in the current environment. For example, specifying + ``argparse;python_version<"2.7"`` will not install in an Python 2.7 or 3.3 + environment, but will in a Python 2.6 environment. ``Requirement`` Methods and Attributes -------------------------------------- @@ -680,6 +673,12 @@ Requirements Parsing order. The `op` in each tuple is a comparison operator, represented as a string. The `version` is the (unparsed) version number. +``marker`` + An instance of ``packaging.markers.Marker`` that allows evaluation + against the current environment. May be None if no marker specified. + +``url`` + The location to download the requirement from if specified. Entry Points ============ From dc04903df2b3820d11e3600bf52d1aa457044e35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2016 10:43:13 -0400 Subject: [PATCH 5606/8469] Update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 630df9622d..755c7ab6b2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +20.3.1 +------ + +* Issue #519: Remove import hook when reloading the + ``pkg_resources`` module. + 20.3 ---- From d8d4272a7ead62a39679b1beb599d3d1d72a6bfa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2016 10:49:00 -0400 Subject: [PATCH 5607/8469] Update changelog --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 755c7ab6b2..c01c6e7749 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ CHANGES * Issue #519: Remove import hook when reloading the ``pkg_resources`` module. +* Pull Request #184: Update documentation in ``pkg_resources`` + around new ``Requirement`` implementation. 20.3 ---- From 42b002c05ca3ea382cd2ee90563556c9efd3b5e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2016 11:14:00 -0400 Subject: [PATCH 5608/8469] Bumped to 20.3.1 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index ae23d3a2fc..16d59e449d 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.4' +__version__ = '20.3.1' From af0a412ebc9f8e58941883f81522d5ff4c808067 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2016 11:14:01 -0400 Subject: [PATCH 5609/8469] Added tag 20.3.1 for changeset 3e87e975a95c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d195692d92..49c22e51a3 100644 --- a/.hgtags +++ b/.hgtags @@ -250,3 +250,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 1aacb05fbdfe06cee904e7a138a4aa6df7b88a63 20.2.1 48aa5271ef1cd5379cf91a1c958e490692b978e7 20.2.2 9c55a3a1268a33b4a57b96b2b9fa2cd0701780ee 20.3 +3e87e975a95c780eec497ef9e5a742f7adfb77ec 20.3.1 From 11fef28599ccefe77ae61c47c7b2ee183e267508 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Mar 2016 11:16:38 -0400 Subject: [PATCH 5610/8469] Bumped to 20.3.2 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 16d59e449d..a92101a109 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.3.1' +__version__ = '20.3.2' From 741f3bbcbbbd73076a44100a0e112f6dd86864b6 Mon Sep 17 00:00:00 2001 From: Alexey Kotlyarov Date: Sun, 20 Mar 2016 20:27:59 +1100 Subject: [PATCH 5611/8469] Point towards SCM plugins for including source files --- docs/setuptools.txt | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d267bf2914..886216ea37 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1461,10 +1461,18 @@ use the appropriate defaults.) Generating Source Distributions ------------------------------- -If you need to include automatically generated files, you'll need to create a -``MANIFEST.in`` file to specify any files that the default file location -algorithm doesn't catch. See the distutils documentation for more information -on the format of the ``MANIFEST.in`` file. +``setuptools`` enhances the distutils' default algorithm for source file +selection with pluggable endpoints for looking up files to include. If you are +using a revision control system, and your source distributions only need to +include files that you're tracking in revision control, use a corresponding +plugin instead of writing a ``MANIFEST.in`` file. See the section below on +`Adding Support for Revision Control Systems`_ for information on plugins. + +If you need to include automatically generated files, or files that are kept in +an unsupported revision control system, you'll need to create a ``MANIFEST.in`` +file to specify any files that the default file location algorithm doesn't +catch. See the distutils documentation for more information on the format of +the ``MANIFEST.in`` file. But, be sure to ignore any part of the distutils documentation that deals with ``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you @@ -2546,9 +2554,15 @@ those methods' docstrings for more details. Adding Support for Revision Control Systems ------------------------------------------------- -If you would like to create a plugin for ``setuptools`` to find files in -source control systems, you can do so by adding an entry point to the -``setuptools.file_finders`` group. The entry point should be a function +If the files you want to include in the source distribution are tracked using +Git, Mercurial or SVN, you can use the following packages to achieve that: + +- Git and Mercurial: `setuptools_scm `_ +- SVN: `setuptools_svn `_ + +If you would like to create a plugin for ``setuptools`` to find files tracked +by another revision control system, you can do so by adding an entry point to +the ``setuptools.file_finders`` group. The entry point should be a function accepting a single directory name, and should yield all the filenames within that directory (and any subdirectories thereof) that are under revision control. From 07a1c6988ad6b270a29b1059b7ec71191d67c9bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Mar 2016 15:12:30 -0400 Subject: [PATCH 5612/8469] Rename variables for clarity and easier troubleshooting (avoid masking intermediate 'parts' value). --- pkg_resources/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 03def160af..0534f54fca 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2028,12 +2028,13 @@ def _rebuild_mod_path(orig_path, package_name, module): corresponding to their sys.path order """ sys_path = [_normalize_cached(p) for p in sys.path] - def position_in_sys_path(p): + def position_in_sys_path(path): """ Return the ordinal of the path based on its position in sys.path """ - parts = p.split(os.sep) - parts = parts[:-(package_name.count('.') + 1)] + path_parts = path.split(os.sep) + module_parts = package_name.count('.') + 1 + parts = path_parts[:-module_parts] return sys_path.index(_normalize_cached(os.sep.join(parts))) orig_path.sort(key=position_in_sys_path) From 2d8cb89459af1d68f7efd7da902c9e6954504740 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 24 Mar 2016 11:37:38 +1100 Subject: [PATCH 5613/8469] Support environment markers in *_requires, via WorkingSet. --- pkg_resources/__init__.py | 4 ++ pkg_resources/tests/test_resources.py | 5 +++ setuptools/tests/test_egg_info.py | 63 +++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0534f54fca..bb69b60744 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -809,6 +809,10 @@ def resolve(self, requirements, env=None, installer=None, if req in processed: # Ignore cyclic or redundant dependencies continue + # If the req has a marker, evaluate it -- skipping the req if + # it evaluates to False. + if req.marker and not req.marker.evaluate(): + continue dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 1444b9ba06..1d3d5315ea 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -182,6 +182,11 @@ def testResolve(self): msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg + ws = WorkingSet([]) # reset + # Environment markers are evaluated at resolution time + res = ws.resolve(parse_requirements("Foo;python_version<'2'"), ad) + assert list(res) == [] + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7d51585b1f..6aed315ff7 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,4 +1,5 @@ import os +import glob import stat from setuptools.extern.six.moves import map @@ -89,17 +90,61 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') assert 'docs/usage.rst' in open(sources_txt).read().split('\n') - def _run_install_command(self, tmpdir_cwd, env): + def _setup_script_with_requires(self, requires_line): + setup_script = DALS(""" + from setuptools import setup + + setup( + name='foo', + %s + zip_safe=False, + ) + """ % requires_line) + build_files({ + 'setup.py': setup_script, + }) + + def test_install_requires_with_markers(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """install_requires=["barbazquux;python_version<'2'"],""") + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + assert "barbazquux;python_version<'2'" in open( + requires_txt).read().split('\n') + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_setup_requires_with_markers(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """setup_requires=["barbazquux;python_version<'2'"],""") + self._run_install_command(tmpdir_cwd, env) + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_tests_require_with_markers(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """tests_require=["barbazquux;python_version<'2'"],""") + data = self._run_install_command( + tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_extra_requires_with_markers(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """extra_requires={":python_version<'2'": ["barbazquux"]},""") + self._run_install_command(tmpdir_cwd, env) + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], ) - cmd = [ - 'install', - '--home', env.paths['home'], - '--install-lib', env.paths['lib'], - '--install-scripts', env.paths['scripts'], - '--install-data', env.paths['data'], - ] + if cmd is None: + cmd = [ + 'install', + '--home', env.paths['home'], + '--install-lib', env.paths['lib'], + '--install-scripts', env.paths['scripts'], + '--install-data', env.paths['data'], + ] code, data = environment.run_setup_py( cmd=cmd, pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), @@ -108,6 +153,8 @@ def _run_install_command(self, tmpdir_cwd, env): ) if code: raise AssertionError(data) + if output: + assert output in data def _find_egg_info_files(self, root): class DirList(list): From 0f147d3f3cffda76b6be0fa3e5b396ede7f3bbf2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Mar 2016 09:42:35 -0400 Subject: [PATCH 5614/8469] Extract decision point into a variable --- tests/manual_test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index af4ec09bea..808fa55ae0 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -43,10 +43,8 @@ def _tempdir(*args, **kwargs): _VARS = {'base': '.', 'py_version_short': PYVER} -if sys.platform == 'win32': - PURELIB = INSTALL_SCHEMES['nt']['purelib'] -else: - PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] +scheme = 'nt' if sys.platform == 'win32' else 'unix_prefix' +PURELIB = INSTALL_SCHEMES[scheme]['purelib'] @tempdir From 7fc3b347bce66eaed9bae410338f6a9f3108a970 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 30 Mar 2016 02:43:44 +1100 Subject: [PATCH 5615/8469] Update vendored packaging to 16.6 Closes #503 --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/markers.py | 7 ++++++- pkg_resources/_vendor/vendored.txt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index 47e5a6f58c..baa907556c 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,7 +12,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.5" +__version__ = "16.6" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index 9e906015f5..bac852df23 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -73,9 +73,14 @@ class Value(Node): L("python_version") | L("sys_platform") | L("os_name") | + L("os.name") | # PEP-345 + L("sys.platform") | # PEP-345 + L("platform.version") | # PEP-345 + L("platform.machine") | # PEP-345 + L("platform.python_implementation") | # PEP-345 L("extra") ) -VARIABLE.setParseAction(lambda s, l, t: Variable(t[0])) +VARIABLE.setParseAction(lambda s, l, t: Variable(t[0].replace('.', '_'))) VERSION_CMP = ( L("===") | diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index aac1267c62..1d03759ff0 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ -packaging==16.5 +packaging==16.6 pyparsing==2.0.6 six==1.10.0 From 3b90be7bb6323eb44d0f28864509c1d47aa098de Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 12:17:06 -0400 Subject: [PATCH 5616/8469] Update most bitbucket references to point to Github now. Fixes #422. --- CHANGES.txt | 79 ++++++++++++++++----------- README.txt | 4 +- docs/conf.py | 6 +- docs/developer-guide.txt | 29 +++++----- docs/setuptools.txt | 2 +- pkg_resources/tests/test_resources.py | 2 +- release.py | 2 +- setup.py | 2 +- setuptools/command/easy_install.py | 4 +- setuptools/command/install.py | 2 +- setuptools/dist.py | 4 +- 11 files changed, 74 insertions(+), 62 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c01c6e7749..f44a39841d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,22 +2,35 @@ CHANGES ======= +20.4 +---- + +* Issue #422: Moved hosting to `Github + `_ + from `Bitbucket `_. + Issues have been migrated, though all issues and comments + are attributed to bb-migration. So if you have a particular + issue or issues to which you've been subscribed, you will + want to "watch" the equivalent issue in Github. + The Bitbucket project will be retained for the indefinite + future, but Github now hosts the canonical project repository. + 20.3.1 ------ * Issue #519: Remove import hook when reloading the ``pkg_resources`` module. -* Pull Request #184: Update documentation in ``pkg_resources`` +* BB Pull Request #184: Update documentation in ``pkg_resources`` around new ``Requirement`` implementation. 20.3 ---- -* Pull Request #179: ``pkg_resources.Requirement`` objects are +* BB Pull Request #179: ``pkg_resources.Requirement`` objects are now a subclass of ``packaging.requirements.Requirement``, allowing any environment markers and url (if any) to be affiliated with the requirement -* Pull Request #179: Restore use of RequirementParseError +* BB Pull Request #179: Restore use of RequirementParseError exception unintentionally dropped in 20.2. 20.2.2 @@ -36,11 +49,11 @@ CHANGES ---- * Changelog now includes release dates and links to PEPs. -* Pull Request #173: Replace dual PEP 345 _markerlib implementation +* BB Pull Request #173: Replace dual PEP 345 _markerlib implementation and PEP 426 implementation of environment marker support from packaging 16.1 and PEP 508. Fixes Issue #122. - See also Pull Request #175, Pull Request #168, and - Pull Request #164. Additionally: + See also BB Pull Request #175, BB Pull Request #168, and + BB Pull Request #164. Additionally: - ``Requirement.parse`` no longer retains the order of extras. - ``parse_requirements`` now requires that all versions be PEP-440 compliant, as revealed in #499. Packages released @@ -115,7 +128,7 @@ CHANGES * Issue #486: Correct TypeError when getfilesystemencoding returns None. * Issue #139: Clarified the license as MIT. -* Pull Request #169: Removed special handling of command +* BB Pull Request #169: Removed special handling of command spec in scripts for Jython. 19.4.1 @@ -131,7 +144,7 @@ CHANGES * Issue #341: Correct error in path handling of package data files in ``build_py`` command when package is empty. * Distribute #323, Issue #141, Issue #207, and - Pull Request #167: Another implementation of + BB Pull Request #167: Another implementation of ``pkg_resources.WorkingSet`` and ``pkg_resources.Distribution`` that supports replacing an extant package with a new one, allowing for setup_requires dependencies to supersede installed @@ -147,8 +160,8 @@ CHANGES 19.2 ---- -* Pull Request #163: Add get_command_list method to Distribution. -* Pull Request #162: Add missing whitespace to multiline string +* BB Pull Request #163: Add get_command_list method to Distribution. +* BB Pull Request #162: Add missing whitespace to multiline string literals. 19.1.1 @@ -204,15 +217,15 @@ CHANGES ---- * Update dependency on certify. -* Pull Request #160: Improve detection of gui script in +* BB Pull Request #160: Improve detection of gui script in ``easy_install._adjust_header``. * Made ``test.test_args`` a non-data property; alternate fix - for the issue reported in Pull Request #155. + for the issue reported in BB Pull Request #155. * Issue #453: In ``ez_setup`` bootstrap module, unload all ``pkg_resources`` modules following download. -* Pull Request #158: Honor PEP-488 when excluding +* BB Pull Request #158: Honor PEP-488 when excluding files for namespace packages. -* Issue #419 and Pull Request #144: Add experimental support for +* Issue #419 and BB Pull Request #144: Add experimental support for reading the version info from distutils-installed metadata rather than using the version in the filename. @@ -314,7 +327,7 @@ CHANGES However, for systems with this build of setuptools, Cython will be downloaded on demand. * Issue #396: Fixed test failure on OS X. -* Pull Request #136: Remove excessive quoting from shebang headers +* BB Pull Request #136: Remove excessive quoting from shebang headers for Jython. 17.1.1 @@ -341,11 +354,11 @@ CHANGES 16.0 ---- -* Pull Request #130: Better error messages for errors in +* BB Pull Request #130: Better error messages for errors in parsed requirements. -* Pull Request #133: Removed ``setuptools.tests`` from the +* BB Pull Request #133: Removed ``setuptools.tests`` from the installed packages. -* Pull Request #129: Address deprecation warning due to usage +* BB Pull Request #129: Address deprecation warning due to usage of imp module. 15.2 @@ -364,7 +377,7 @@ CHANGES 15.0 ---- -* Pull Request #126: DistributionNotFound message now lists the package or +* BB Pull Request #126: DistributionNotFound message now lists the package or packages that required it. E.g.:: pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution was not found and is required by smlib.log. @@ -405,7 +418,7 @@ CHANGES 14.1 ---- -* Pull Request #125: Add ``__ne__`` to Requirement class. +* BB Pull Request #125: Add ``__ne__`` to Requirement class. * Various refactoring of easy_install. 14.0 @@ -413,7 +426,7 @@ CHANGES * Bootstrap script now accepts ``--to-dir`` to customize save directory or allow for re-use of existing repository of setuptools versions. See - Pull Request #112 for background. + BB Pull Request #112 for background. * Issue #285: ``easy_install`` no longer will default to installing packages to the "user site packages" directory if it is itself installed there. Instead, the user must pass ``--user`` in all cases to install @@ -438,7 +451,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 13.0 ---- -* Issue #356: Back out Pull Request #119 as it requires Setuptools 10 or later +* Issue #356: Back out BB Pull Request #119 as it requires Setuptools 10 or later as the source during an upgrade. * Removed build_py class from setup.py. According to 892f439d216e, this functionality was added to support upgrades from old Distribute versions, @@ -447,7 +460,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 12.4 ---- -* Pull Request #119: Restore writing of ``setup_requires`` to metadata +* BB Pull Request #119: Restore writing of ``setup_requires`` to metadata (previously added in 8.4 and removed in 9.0). 12.3 @@ -472,7 +485,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 12.1 ---- -* Pull Request #118: Soften warning for non-normalized versions in +* BB Pull Request #118: Soften warning for non-normalized versions in Distribution. 12.0.5 @@ -613,7 +626,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 8.4 --- -* Pull Request #106: Now write ``setup_requires`` metadata. +* BB Pull Request #106: Now write ``setup_requires`` metadata. 8.3 --- @@ -630,7 +643,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 8.2 --- -* Pull Request #85: Search egg-base when adding egg-info to manifest. +* BB Pull Request #85: Search egg-base when adding egg-info to manifest. 8.1 --- @@ -733,9 +746,9 @@ process to fail and PyPI uploads no longer accept files for 13.0. Any users producing distributions with filenames that match those above case-insensitively, but not case-sensitively, should rename those files in their repository for better portability. -* Pull Request #72: When using ``single_version_externally_managed``, the +* BB Pull Request #72: When using ``single_version_externally_managed``, the exclusion list now includes Python 3.2 ``__pycache__`` entries. -* Pull Request #76 and Pull Request #78: lines in top_level.txt are now +* BB Pull Request #76 and BB Pull Request #78: lines in top_level.txt are now ordered deterministically. * Issue #118: The egg-info directory is now no longer included in the list of outputs. @@ -934,7 +947,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. 3.2 --- -* Pull Request #39: Add support for C++ targets from Cython ``.pyx`` files. +* BB Pull Request #39: Add support for C++ targets from Cython ``.pyx`` files. * Issue #162: Update dependency on certifi to 1.0.1. * Issue #164: Update dependency on wincertstore to 0.2. @@ -977,7 +990,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. security vulnerabilities presented by use of tar archives in ez_setup.py. It also leverages the security features added to ZipFile.extract in Python 2.7.4. * Issue #65: Removed deprecated Features functionality. -* Pull Request #28: Remove backport of ``_bytecode_filenames`` which is +* BB Pull Request #28: Remove backport of ``_bytecode_filenames`` which is available in Python 2.6 and later, but also has better compatibility with Python 3 environments. * Issue #156: Fix spelling of __PYVENV_LAUNCHER__ variable. @@ -1073,7 +1086,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #27: ``easy_install`` will now use credentials from .pypirc if present for connecting to the package index. -* Pull Request #21: Omit unwanted newlines in ``package_index._encode_auth`` +* BB Pull Request #21: Omit unwanted newlines in ``package_index._encode_auth`` when the username/password pair length indicates wrapping. 1.3.2 @@ -1415,7 +1428,7 @@ Added several features that were slated for setuptools 0.6c12: 0.6.36 ------ -* Pull Request #35: In Buildout #64, it was reported that +* BB Pull Request #35: In Buildout #64, it was reported that under Python 3, installation of distutils scripts could attempt to copy the ``__pycache__`` directory as a file, causing an error, apparently only under Windows. Easy_install now skips all directories when processing @@ -1490,7 +1503,7 @@ how it parses version numbers. 0.6.29 ------ -* Pull Request #14: Honor file permissions in zip files. +* BB Pull Request #14: Honor file permissions in zip files. * Distribute #327: Merged pull request #24 to fix a dependency problem with pip. * Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301. * If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` diff --git a/README.txt b/README.txt index 799ad0088f..f94c6fcb46 100755 --- a/README.txt +++ b/README.txt @@ -18,7 +18,7 @@ basic routine, so below are some examples to get you started. Setuptools requires Python 2.6 or later. To install setuptools on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x -`_. +`_. The link provided to ez_setup.py is a bookmark to bootstrap script for the latest known stable release. @@ -176,7 +176,7 @@ them there, so this reference list can be updated. If you have working, *tested* patches to correct problems or add features, you may submit them to the `setuptools bug tracker`_. -.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/issues +.. _setuptools bug tracker: https://github.com/pypa/setuptools/issues .. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html .. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html .. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html diff --git a/docs/conf.py b/docs/conf.py index 1a4da380fe..6570f66129 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -208,11 +208,11 @@ replace=[ dict( pattern=r"(Issue )?#(?P\d+)", - url='{BB}/pypa/setuptools/issue/{issue}', + url='{GH}/pypa/setuptools/issues/{issue}', ), dict( - pattern=r"Pull Request ?#(?P\d+)", - url='{BB}/pypa/setuptools/pull-request/{pull_request}', + pattern=r"BB Pull Request ?#(?P\d+)", + url='{BB}/pypa/setuptools/pull-request/{bb_pull_request}', ), dict( pattern=r"Distribute #(?P\d+)", diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index ae33649b59..688300dcea 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -23,10 +23,10 @@ quality of contribution. Project Management ------------------ -Setuptools is maintained primarily in Bitbucket at `this home -`_. Setuptools is maintained under the +Setuptools is maintained primarily in Github at `this home +`_. Setuptools is maintained under the Python Packaging Authority (PyPA) with several core contributors. All bugs -for Setuptools are filed and the canonical source is maintained in Bitbucket. +for Setuptools are filed and the canonical source is maintained in Github. User support and discussions are done through the issue tracker (for specific) issues, through the distutils-sig mailing list, or on IRC (Freenode) at @@ -44,7 +44,7 @@ describing the motivation behind making changes. First search to see if a ticket already exists for your issue. If not, create one. Try to think from the perspective of the reader. Explain what behavior you expected, what you got instead, and what factors might have contributed to the unexpected -behavior. In Bitbucket, surround a block of code or traceback with the triple +behavior. In Github, surround a block of code or traceback with the triple backtick "\`\`\`" so that it is formatted nicely. Filing a ticket provides a forum for justification, discussion, and @@ -61,17 +61,17 @@ jump to the in-depth discussion about any subject referenced. Source Code ----------- -Grab the code at Bitbucket:: +Grab the code at Github:: - $ hg clone https://bitbucket.org/pypa/setuptools + $ git checkout https://github.com/pypa/setuptools If you want to contribute changes, we recommend you fork the repository on -Bitbucket, commit the changes to your repository, and then make a pull request -on Bitbucket. If you make some changes, don't forget to: +Github, commit the changes to your repository, and then make a pull request +on Github. If you make some changes, don't forget to: - add a note in CHANGES.txt -Please commit all changes in the 'default' branch against the latest available +Please commit all changes in the 'master' branch against the latest available commit or for bug-fixes, against an earlier commit or release in which the bug occurred. @@ -79,12 +79,11 @@ If you find yourself working on more than one issue at a time, Setuptools generally prefers Git-style branches, so use Mercurial bookmarks or Git branches or multiple forks to maintain separate efforts. -Setuptools also maintains an unofficial `Git mirror in Github -`_. Contributors are welcome to submit -pull requests here, but because they are not integrated with the Bitbucket -Issue tracker, linking pull requests to tickets is more difficult. The -Continuous Integration tests that validate every release are run from this -mirror. +The Continuous Integration tests that validate every release are run +from this repository. + +For posterity, the old `Bitbucket mirror +`_ is available. ------- Testing diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 886216ea37..eeeab93737 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2658,5 +2658,5 @@ confirmed via the list are actual bugs, and which you have reduced to a minimal set of steps to reproduce. .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ -.. _setuptools bug tracker: https://bitbucket.org/pypa/setuptools/ +.. _setuptools bug tracker: https://github.com/pypa/setuptools/ diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 1444b9ba06..f59d55d5f6 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -717,7 +717,7 @@ def test_path_order(self, symlinked_tmpdir): sys.path is imported, and that the namespace package's __path__ is in the correct order. - Regression test for https://bitbucket.org/pypa/setuptools/issues/207 + Regression test for https://github.com/pypa/setuptools/issues/207 """ tmpdir = symlinked_tmpdir diff --git a/release.py b/release.py index dd1d6a1caf..a55643838c 100644 --- a/release.py +++ b/release.py @@ -15,6 +15,6 @@ # bdist_wheel must be included or pip will break dist_commands = 'sdist', 'bdist_wheel' -test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools" +test_info = "Travis-CI tests: http://travis-ci.org/#!/pypa/setuptools" os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" diff --git a/setup.py b/setup.py index a59d374d4f..b26190ff50 100755 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ def _gen_console_scripts(): author_email="distutils-sig@python.org", long_description=long_description, keywords="CPAN PyPI distutils eggs package management", - url="https://bitbucket.org/pypa/setuptools", + url="https://github.com/pypa/setuptools", src_root=src_root, packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0733065e19..ea5cb028a5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -780,7 +780,7 @@ def _load_template(dev_path): There are a couple of template scripts in the package. This function loads one of them and prepares it for use. """ - # See https://bitbucket.org/pypa/setuptools/issue/134 for info + # See https://github.com/pypa/setuptools/issues/134 for info # on script file naming and downstream issues with SVR4 name = 'script.tmpl' if dev_path: @@ -1762,7 +1762,7 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): # * Does not support the dict.pop() method, forcing us to use the # get/del patterns instead. For more detailed information see the # following links: - # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 + # https://github.com/pypa/setuptools/issues/202#issuecomment-202913420 # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 old_entry = cache[p] del cache[p] diff --git a/setuptools/command/install.py b/setuptools/command/install.py index d2bca2ec59..31a5ddb577 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -8,7 +8,7 @@ import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for -# now. See https://bitbucket.org/pypa/setuptools/issue/199/ +# now. See https://github.com/pypa/setuptools/issues/199/ _install = orig.install diff --git a/setuptools/dist.py b/setuptools/dist.py index 7785541582..086e0a587f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -720,7 +720,7 @@ class Feature: """ **deprecated** -- The `Feature` facility was never completely implemented or supported, `has reported issues - `_ and will be removed in + `_ and will be removed in a future version. A subset of the distribution that can be excluded if unneeded/wanted @@ -777,7 +777,7 @@ class Feature: def warn_deprecated(): warnings.warn( "Features are deprecated and will be removed in a future " - "version. See http://bitbucket.org/pypa/setuptools/65.", + "version. See https://github.com/pypa/setuptools/issues/65.", DeprecationWarning, stacklevel=3, ) From 05a9f1d0e3d8cceb95a7c8345ee4fa2ae804280e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 12:29:03 -0400 Subject: [PATCH 5617/8469] Bumped to 20.4 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index a92101a109..ae23d3a2fc 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.3.2' +__version__ = '20.4' From 5fcd3ff51a0fee030e74a6b96ea688ae537a281d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 12:29:05 -0400 Subject: [PATCH 5618/8469] Added tag 20.4 for changeset 06692c64fb9b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 49c22e51a3..cf8443bbc1 100644 --- a/.hgtags +++ b/.hgtags @@ -251,3 +251,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 48aa5271ef1cd5379cf91a1c958e490692b978e7 20.2.2 9c55a3a1268a33b4a57b96b2b9fa2cd0701780ee 20.3 3e87e975a95c780eec497ef9e5a742f7adfb77ec 20.3.1 +06692c64fb9b5843331a918ab7093f151412ec8e 20.4 From 87e29214dcffdd456bafa4f7ba5174fe383c01b2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 12:31:47 -0400 Subject: [PATCH 5619/8469] Bumped to 20.5 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index ae23d3a2fc..b70b51e35b 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.4' +__version__ = '20.5' From 2f95af84d585c19a8eb6a8e6d437acdbe3c3d2ae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 13:02:42 -0400 Subject: [PATCH 5620/8469] Use jaraco.packaging 2.11 for better support for bookmarks and thus Git push targets. --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index a55643838c..cd4848f014 100644 --- a/release.py +++ b/release.py @@ -7,7 +7,7 @@ import pkg_resources -pkg_resources.require('jaraco.packaging>=2.0') +pkg_resources.require('jaraco.packaging>=2.11') pkg_resources.require('wheel') files_with_versions = 'setuptools/version.py', From dd0c78d26b7510481bc4587c9bb5a6fbfd2b5c8d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 13:13:18 -0400 Subject: [PATCH 5621/8469] Just render the date and not the time of tagged releases in the changelog. --- docs/conf.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6570f66129..1bf9c33489 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -256,7 +256,7 @@ ), dict( pattern=r"^(?m)((?P\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]}\n", + with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", ), ], ), diff --git a/setup.py b/setup.py index b26190ff50..7986906d7c 100755 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def _gen_console_scripts(): needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) -sphinx = ['sphinx', 'rst.linker>=1.4'] if needs_sphinx else [] +sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else [] setup_params = dict( name="setuptools", From 378a5bb49a004ee34a446e208a3bcbb4e9d732ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 13:13:38 -0400 Subject: [PATCH 5622/8469] Added tag 20.5 for changeset f8174392e9e9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cf8443bbc1..06e21d5121 100644 --- a/.hgtags +++ b/.hgtags @@ -252,3 +252,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 9c55a3a1268a33b4a57b96b2b9fa2cd0701780ee 20.3 3e87e975a95c780eec497ef9e5a742f7adfb77ec 20.3.1 06692c64fb9b5843331a918ab7093f151412ec8e 20.4 +f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 From ca90f3cf6b2604f49256f04ff8147dfee707ce59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 13:16:16 -0400 Subject: [PATCH 5623/8469] Bumped to 20.6 in preparation for next release. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index b70b51e35b..6496a76f28 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '20.5' +__version__ = '20.6' From a04851c3e7b7e2b87f62d2de7e54c97c87881fcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:12:30 -0400 Subject: [PATCH 5624/8469] Attempting a new streamlined, Travis-powered release process. --- .travis.yml | 10 ++++++++++ CHANGES.txt | 7 +++++++ docs/releases.txt | 27 ++++++++++----------------- release.py | 20 -------------------- setup.cfg | 17 +++++++++++++++-- setup.py | 11 ++++------- setuptools/version.py | 4 +++- 7 files changed, 49 insertions(+), 47 deletions(-) delete mode 100644 release.py diff --git a/.travis.yml b/.travis.yml index ae14639aeb..e93c3750d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,3 +27,13 @@ script: # test the bootstrap script - python ez_setup.py +before_deploy: + - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 +deploy: + provider: pypi + on: + tags: true + user: jaraco + password: + secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= + distributions: release diff --git a/CHANGES.txt b/CHANGES.txt index a784c33cc9..c95017d91c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +20.6 +---- + +* New release process that relies on + `bumpversion `_ + and Travis CI for continuous deployment. + 20.5 ---- diff --git a/docs/releases.txt b/docs/releases.txt index a9742c2076..3f29334a99 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -3,19 +3,14 @@ Release Process =============== In order to allow for rapid, predictable releases, Setuptools uses a -mechanical technique for releases. The release script, ``release.py`` in the -repository, defines the details of the releases, and is executed by the -`jaraco.packaging `_ release -module. The script does some checks (some interactive) and fully automates -the release process. +mechanical technique for releases, enacted by Travis following a +successful build of a tagged release per +`PyPI deployment `_. -A Setuptools release manager must have maintainer access on PyPI to the -project and administrative access to the Bitbucket project. - -To make a release, run the following from a Mercurial checkout at the -revision slated for release:: - - python -m jaraco.packaging.release +To cut a release, install and run ``bumpversion {part}`` where ``part`` +is major, minor, or patch based on the scope of the changes in the +release. Then, push the commits to the master branch. If tests pass, +the release will be uploaded to PyPI. Bootstrap Bookmark ------------------ @@ -23,7 +18,7 @@ Bootstrap Bookmark Setuptools has a bootstrap script (ez_setup.py) which is hosted in the repository and must be updated with each release (to bump the default version). The "published" version of the script is the one indicated by the ``bootstrap`` -bookmark (Mercurial) or branch (Git). +branch. Therefore, the latest bootstrap script can be retrieved by checking out the repository at that bookmark. It's also possible to get the bootstrap script for @@ -57,7 +52,5 @@ corrected quickly, in many cases before other users have yet to encounter them. Release Managers ---------------- -Jason R. Coombs is the primary release manager. Additionally, the following -people have access to create releases: - -- Matthew Iversen (Ivoz) +Additionally, anyone with push access to the master branch has access to cut +releases. diff --git a/release.py b/release.py deleted file mode 100644 index cd4848f014..0000000000 --- a/release.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Setuptools is released using 'jaraco.packaging.release'. To make a release, -install jaraco.packaging and run 'python -m jaraco.packaging.release' -""" - -import os - -import pkg_resources - -pkg_resources.require('jaraco.packaging>=2.11') -pkg_resources.require('wheel') - -files_with_versions = 'setuptools/version.py', - -# bdist_wheel must be included or pip will break -dist_commands = 'sdist', 'bdist_wheel' - -test_info = "Travis-CI tests: http://travis-ci.org/#!/pypa/setuptools" - -os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1" diff --git a/setup.cfg b/setup.cfg index a6da2c7771..72967fa40a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,10 @@ [egg_info] -tag_build = dev +tag_build = .post +tag_date = 1 [aliases] -release = egg_info -RDb '' +clean_egg_info = egg_info -RDb '' +release = clean_egg_info build_sphinx sdist bdist_wheel upload_docs source = register sdist binary binary = bdist_egg upload --show-response test = pytest @@ -20,3 +22,14 @@ formats = gztar zip [wheel] universal=1 + +[bumpversion] +current_version = 20.5 +commit = True +tag = True +parse = (?P\d+)\.(?P\d+)(\.(?P\d+))? +serialize= + {major}.{minor}.{patch} + {major}.{minor} + +[bumpversion:file:setup.py] diff --git a/setup.py b/setup.py index 7986906d7c..021edab3a5 100755 --- a/setup.py +++ b/setup.py @@ -22,11 +22,6 @@ SETUP_COMMANDS = command_ns['__all__'] -main_ns = {} -ver_path = convert_path('setuptools/version.py') -with open(ver_path) as ver_file: - exec(ver_file.read(), main_ns) - import setuptools scripts = [] @@ -68,10 +63,12 @@ def _gen_console_scripts(): pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else [] +needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) +wheel = ['wheel'] if needs_wheel else [] setup_params = dict( name="setuptools", - version=main_ns['__version__'], + version="20.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", @@ -161,7 +158,7 @@ def _gen_console_scripts(): 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ - ] + sphinx + pytest_runner, + ] + sphinx + pytest_runner + wheel, ) if __name__ == '__main__': diff --git a/setuptools/version.py b/setuptools/version.py index 6496a76f28..2f94302727 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1,3 @@ -__version__ = '20.6' +import pkg_resources + +__version__ = pkg_resources.require('setuptools')[0].version From af4b8f9370b9e18a9f5fe43e17161533e1a31646 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:18:14 -0400 Subject: [PATCH 5625/8469] Follow semver to the letter for simplicity. --- CHANGES.txt | 6 ++++-- docs/developer-guide.txt | 5 +---- setup.cfg | 6 +----- setup.py | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c95017d91c..abd5f24b04 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,14 @@ CHANGES ======= -20.6 ----- +v20.6.0 +------- * New release process that relies on `bumpversion `_ and Travis CI for continuous deployment. +* Project versioning semantics now follow + `semver `_ precisely. 20.5 ---- diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 688300dcea..c82adbb93d 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -103,10 +103,7 @@ Under continuous integration, additional tests may be run. See the Semantic Versioning ------------------- -Setuptools follows ``semver`` with some exceptions: - -- Uses two-segment version when three segment version ends in zero -- Omits 'v' prefix for tags. +Setuptools follows ``semver``. .. explain value of reflecting meaning in versions. diff --git a/setup.cfg b/setup.cfg index 72967fa40a..6112885dce 100755 --- a/setup.cfg +++ b/setup.cfg @@ -24,12 +24,8 @@ formats = gztar zip universal=1 [bumpversion] -current_version = 20.5 +current_version = 20.5.0 commit = True tag = True -parse = (?P\d+)\.(?P\d+)(\.(?P\d+))? -serialize= - {major}.{minor}.{patch} - {major}.{minor} [bumpversion:file:setup.py] diff --git a/setup.py b/setup.py index 021edab3a5..3e50cf5cf8 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.5", + version="20.5.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 1627f58f4ca1d03bfc53d918373cb681a57d661d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:19:54 -0400 Subject: [PATCH 5626/8469] =?UTF-8?q?Bump=20version:=2020.5.0=20=E2=86=92?= =?UTF-8?q?=2020.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 13 +++++++------ setup.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6112885dce..a671f6511d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,8 @@ +[bumpversion] +current_version = 20.6.0 +commit = True +tag = True + [egg_info] tag_build = .post tag_date = 1 @@ -21,11 +26,7 @@ upload-dir = docs/build/html formats = gztar zip [wheel] -universal=1 - -[bumpversion] -current_version = 20.5.0 -commit = True -tag = True +universal = 1 [bumpversion:file:setup.py] + diff --git a/setup.py b/setup.py index 3e50cf5cf8..32d965bfd4 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.5.0", + version="20.6.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From dc1ae6511bb84838d62a02b0ca0b03e16bf7379c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:19:54 -0400 Subject: [PATCH 5627/8469] Added tag v20.6.0 for changeset 114f3dbc8a73 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 06e21d5121..11c59b33ac 100644 --- a/.hgtags +++ b/.hgtags @@ -253,3 +253,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 3e87e975a95c780eec497ef9e5a742f7adfb77ec 20.3.1 06692c64fb9b5843331a918ab7093f151412ec8e 20.4 f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 +114f3dbc8a73dacbce2ebe08bb70ca76ab18390e v20.6.0 From aed09e8a3b4af5472f893a5f702e739a61d94153 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:31:04 -0400 Subject: [PATCH 5628/8469] Add fallback version to enable egg_info bootstrap --- setuptools/version.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index 2f94302727..049e7febcf 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1,3 +1,6 @@ import pkg_resources -__version__ = pkg_resources.require('setuptools')[0].version +try: + __version__ = pkg_resources.require('setuptools')[0].version +except Exception: + __version__ = 'unknown' From 763d5ef1c8d382c6cd6f0dd247d7c6c9e3447a11 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:31:17 -0400 Subject: [PATCH 5629/8469] =?UTF-8?q?Bump=20version:=2020.6.0=20=E2=86=92?= =?UTF-8?q?=2020.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a671f6511d..abb03906b0 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.0 +current_version = 20.6.1 commit = True tag = True diff --git a/setup.py b/setup.py index 32d965bfd4..a07b803fa3 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.0", + version="20.6.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 3e7bd668b6b2fa22fa46af7a43af9804fe12dbc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:31:17 -0400 Subject: [PATCH 5630/8469] Added tag v20.6.1 for changeset a3d4006688fe --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 11c59b33ac..42eb27b191 100644 --- a/.hgtags +++ b/.hgtags @@ -254,3 +254,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 06692c64fb9b5843331a918ab7093f151412ec8e 20.4 f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 114f3dbc8a73dacbce2ebe08bb70ca76ab18390e v20.6.0 +a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 From 06a1e422cbed7a9bc0aadca7ba2fe9c5bf88d3c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:45:31 -0400 Subject: [PATCH 5631/8469] Try setting Python version and all_branches: true per https://github.com/travis-ci/dpl/issues/166 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e93c3750d4..5504751af3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,10 @@ deploy: provider: pypi on: tags: true + all_branches: true user: jaraco password: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release + python: 3.5 + env: "" From 125066cb8dd2d44cc2ed9bded916840a59d4f1ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:45:37 -0400 Subject: [PATCH 5632/8469] =?UTF-8?q?Bump=20version:=2020.6.1=20=E2=86=92?= =?UTF-8?q?=2020.6.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index abb03906b0..2d0cb18510 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.1 +current_version = 20.6.2 commit = True tag = True diff --git a/setup.py b/setup.py index a07b803fa3..e96c4a0dcc 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.1", + version="20.6.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 26b8954244aae8cb16b4ff6079c7db8c13cc45b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:45:37 -0400 Subject: [PATCH 5633/8469] Added tag v20.6.2 for changeset 283150971260 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 42eb27b191..03048e9790 100644 --- a/.hgtags +++ b/.hgtags @@ -255,3 +255,4 @@ c6e619ce910d1650cc2433f94e5594964085f973 19.7 f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 114f3dbc8a73dacbce2ebe08bb70ca76ab18390e v20.6.0 a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 +2831509712601a78fddf46e51d6f41ae0f92bd0e v20.6.2 From 7feff474ea6fb05b0c369557e72dfc3b4385fb58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:52:05 -0400 Subject: [PATCH 5634/8469] Took a chance on 'env:' and lost --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5504751af3..26f53311da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,4 +39,3 @@ deploy: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release python: 3.5 - env: "" From 9bc17cf4cd018979b1d56bf3e2b14651bc451bcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:52:13 -0400 Subject: [PATCH 5635/8469] =?UTF-8?q?Bump=20version:=2020.6.2=20=E2=86=92?= =?UTF-8?q?=2020.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2d0cb18510..ac29c73b0d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.2 +current_version = 20.6.3 commit = True tag = True diff --git a/setup.py b/setup.py index e96c4a0dcc..202da4496e 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.2", + version="20.6.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9aa3b8e064da93f1f156c97b84db0fdbdd2dcb6f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 14:52:14 -0400 Subject: [PATCH 5636/8469] Added tag v20.6.3 for changeset 8b46dc41cb23 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 03048e9790..37e6114169 100644 --- a/.hgtags +++ b/.hgtags @@ -256,3 +256,4 @@ f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 114f3dbc8a73dacbce2ebe08bb70ca76ab18390e v20.6.0 a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 2831509712601a78fddf46e51d6f41ae0f92bd0e v20.6.2 +8b46dc41cb234c435b950a879214a6dee54c9dd2 v20.6.3 From 4c7ee26f9b2d2a04ba853bd55b63e2776277a539 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 15:00:09 -0400 Subject: [PATCH 5637/8469] Ignore doc building during release; rely on separate dpl step. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index ac29c73b0d..adfdf5ae9a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,7 @@ tag_date = 1 [aliases] clean_egg_info = egg_info -RDb '' -release = clean_egg_info build_sphinx sdist bdist_wheel upload_docs +release = clean_egg_info sdist bdist_wheel source = register sdist binary binary = bdist_egg upload --show-response test = pytest From 26004981b800a24654a43d88fc0d609d247ca9b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 15:00:19 -0400 Subject: [PATCH 5638/8469] =?UTF-8?q?Bump=20version:=2020.6.3=20=E2=86=92?= =?UTF-8?q?=2020.6.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index adfdf5ae9a..64fc368de0 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.3 +current_version = 20.6.4 commit = True tag = True diff --git a/setup.py b/setup.py index 202da4496e..a16dafe6ff 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.3", + version="20.6.4", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 1cbd2d0255b30c5093721ddd4d330509726b53d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 15:00:19 -0400 Subject: [PATCH 5639/8469] Added tag v20.6.4 for changeset 7258be20fe93 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 37e6114169..b241a81386 100644 --- a/.hgtags +++ b/.hgtags @@ -257,3 +257,4 @@ f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 2831509712601a78fddf46e51d6f41ae0f92bd0e v20.6.2 8b46dc41cb234c435b950a879214a6dee54c9dd2 v20.6.3 +7258be20fe93bbf936dc1a81ce71c04c5880663e v20.6.4 From eae952e4f29f58e39be1a0a28cf5a5793f79e906 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 16:18:46 -0400 Subject: [PATCH 5640/8469] Logic in upload_docs will only trigger docs build if no docs dir was specified, so explicitly build during release. Fixes #524. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 64fc368de0..1d9dda37fb 100755 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,7 @@ tag_date = 1 [aliases] clean_egg_info = egg_info -RDb '' -release = clean_egg_info sdist bdist_wheel +release = clean_egg_info sdist bdist_wheel build_sphinx source = register sdist binary binary = bdist_egg upload --show-response test = pytest From fbbeb19d4c7662844e7af5cb1fea4d7cc95ff146 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 16:18:51 -0400 Subject: [PATCH 5641/8469] =?UTF-8?q?Bump=20version:=2020.6.4=20=E2=86=92?= =?UTF-8?q?=2020.6.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1d9dda37fb..eda6916dfc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.4 +current_version = 20.6.5 commit = True tag = True diff --git a/setup.py b/setup.py index a16dafe6ff..14219945ff 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.4", + version="20.6.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 767651439daaec3cc1092d915248c2e179a85e38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 16:18:51 -0400 Subject: [PATCH 5642/8469] Added tag v20.6.5 for changeset 7e0ab283db4e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b241a81386..475de904f1 100644 --- a/.hgtags +++ b/.hgtags @@ -258,3 +258,4 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 2831509712601a78fddf46e51d6f41ae0f92bd0e v20.6.2 8b46dc41cb234c435b950a879214a6dee54c9dd2 v20.6.3 7258be20fe93bbf936dc1a81ce71c04c5880663e v20.6.4 +7e0ab283db4e6f780777f7f06af475f044631fa1 v20.6.5 From e7d3147949379b607ff1168feb5962836f637ede Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 16:27:09 -0400 Subject: [PATCH 5643/8469] Don't test the bootstrap script. It fails when deploys are happening, which is common when releases are being made. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26f53311da..2611f02a89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,6 @@ script: - python setup.py test --addopts='-rs' - # test the bootstrap script - - python ez_setup.py before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 deploy: From fd4f10290ea64f72a139fe23b811b40bc1f48f17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Mar 2016 16:32:01 -0400 Subject: [PATCH 5644/8469] Recognize semver versions with v prefix in rst.linker config --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1bf9c33489..6877c5c062 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -255,7 +255,7 @@ url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), dict( - pattern=r"^(?m)((?P\d+(\.\d+){1,2}))\n[-=]+\n", + pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", ), ], From 506821451fce2c2e877b44b42a99ace5afdbcb81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 09:43:26 -0400 Subject: [PATCH 5645/8469] Update changelog --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index abd5f24b04..bdffa06d01 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +v20.6.6 +------- + +* Issue #503: Restore support for PEP 345 environment + markers by updating to Packaging 16.6. + v20.6.0 ------- @@ -10,6 +16,9 @@ v20.6.0 and Travis CI for continuous deployment. * Project versioning semantics now follow `semver `_ precisely. + The 'v' prefix on version numbers now also allows + version numbers to be referenced in the changelog, + e.g. https://pythonhosted.org/setuptools/history.html#v20-6-0. 20.5 ---- From 37b75145ea308e1d4db0eabe587d4f64bda991e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 16:32:24 -0400 Subject: [PATCH 5646/8469] Update tags for rebase to 'distribute' branch (Mercurial) --HG-- branch : distribute --- .hgtags | 92 +++++++++++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 52 deletions(-) diff --git a/.hgtags b/.hgtags index c42cee41a9..2d0c400688 100644 --- a/.hgtags +++ b/.hgtags @@ -1,55 +1,43 @@ -1010d08fd8dfd2f1496843b557b5369a0beba82a 0.6 -4d114c5f2a3ecb4a0fa552075dbbb221b19e291b 0.6.1 -41415244ee90664042d277d0b1f0f59c04ddd0e4 0.6.2 -e033bf2d3d05f4a7130f5f8f5de152c4db9ff32e 0.6.3 -e06c416e911c61771708f5afbf3f35db0e12ba71 0.6.4 -2df182df8a0224d429402de3cddccdb97af6ea21 0.6.5 -f1fb564d6d67a6340ff33df2f5a74b89753f159d 0.6.6 -71f08668d050589b92ecd164a4f5a91f3484313b 0.6.7 -445547a5729ed5517cf1a9baad595420a8831ef8 0.6.8 -669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 -669ed9388b17ec461380cc41760a9a7384fb5284 0.6.9 -ac7d9b14ac43fecb8b65de548b25773553facaee 0.6.9 -0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 -0fd5c506037880409308f2b79c6e901d21e7fe92 0.6.10 -f18396c6e1875476279d8bbffd8e6dadcc695136 0.6.10 -e00987890c0b386f09d0f6b73d8558b72f6367f1 0.6.11 -48a97bc89e2f65fc9b78b358d7dc89ba9ec9524a 0.6.12 -dae247400d0ca1fdfaf38db275622c9bec550b08 0.6.13 -2b9d9977ea75b8eb3766bab808ef31f192d2b1bc 0.6.14 -51a9d1a1f31a4be3107d06cf088aff8e182dc633 0.6.15 -3f1ff138e947bfc1c9bcfe0037030b7bfb4ab3a5 0.6.16 -9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 -9c40f23d0bda3f3f169686e27a422f853fa4d0fa 0.6.17 -4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 -4bbc01e4709ea7425cf0c186bbaf1d928cfa2a65 0.6.17 -0502d5117d8304ab21084912758ed28812a5a8f1 0.6.17 -74108d7f07343556a8db94e8122221a43243f586 0.6.18 -611910892a0421633d72677979f94a25ef590d54 0.6.19 -a7cf5ae137f1646adf86ce5d6b5d8b7bd6eab69f 0.6.20 -c4a375336d552129aef174486018ed09c212d684 0.6.20 -de44acab3cfce1f5bc811d6c0fa1a88ca0e9533f 0.6.21 -1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 -1a1ab844f03e10528ae693ad3cb45064e08f49e5 0.6.23 -9406c5dac8429216f1a264e6f692fdc534476acd 0.6.23 -7fd7b6e30a0effa082baed1c4103a0efa56be98c 0.6.24 -6124053afb5c98f11e146ae62049b4c232d50dc5 0.6.25 -b69f072c000237435e17b8bbb304ba6f957283eb 0.6.26 -469c3b948e41ef28752b3cdf3c7fb9618355ebf5 0.6.27 -fc379e63586ad3c6838e1bda216548ba8270b8f0 0.6.28 -4f82563d0f5d1af1fb215c0ac87f38b16bb5c42d 0.6.29 -7464fc916fa4d8308e34e45a1198512fe04c97b4 0.6.30 -17bc972d67edd96c7748061910172e1200a73efe 0.6.31 -b1a7f86b315a1f8c20036d718d6dc641bb84cac6 0.6.32 -6acac3919ae9a7dba2cbecbe3d4b31ece25d5f09 0.6.33 -23c310bf4ae8e4616e37027f08891702f5a33bc9 0.6.34 -2abe1117543be0edbafb10c7c159d1bcb1cb1b87 0.6.35 -c813a29e831f266d427d4a4bce3da97f475a8eee 0.6.36 -be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 -2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 -f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 -d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 -0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 +7e9441311eb21dd1fbc32cfbad58168e46c5450e 0.6 +26f429772565f69d1f6d21adf57c3d8c40197129 0.6.1 +6f46749a7454be6e044a54cd73c51318b74bdee8 0.6.2 +34b80fb58862d18f8f957f98a883ed4a72d06f8e 0.6.3 +fb04abddb50d82a9005c9082c94d5eb983be1d79 0.6.4 +8ae0bd250b4a0d58cbaf16b4354ad60f73f24a01 0.6.5 +88847883dfed39829d3a5ed292ad540723ad31cc 0.6.6 +fcbef325349ada38f6c674eb92db82664cf6437c 0.6.7 +3af7f2b8270b9bb34fb65f08ee567bfe8e2a6a5a 0.6.8 +669725d03fd1e345ea47590e9b14cb19742b96a2 0.6.9 +eff3ca9c2d8d39e24c221816c52a37f964535336 0.6.10 +88710e34b91c98c9348749722cce3acd574d177d 0.6.11 +5ce754773a43ac21f7bd13872f45c75e27b593f8 0.6.12 +de36566d35e51bee7cfc86ffa694795e52f4147c 0.6.13 +e5f3f0ffe9e1a243d49a06f26c79dd160f521483 0.6.14 +dc03a300ec7a89ad773047172d43e52b34e7cd1e 0.6.15 +e620fb4ee8ba17debadb614fb583c6dfac229dea 0.6.16 +21df276275b5a47c6a994927d69ad3d90cf62b5d 0.6.17 +e9264ca4ba8c24239c36a8426a0394f7c7d5dd83 0.6.18 +aed31b1fa47ed1f39e55c75b76bbbdb80775b7f1 0.6.19 +c6e6273587816c3e486ef7739e53c864a0145251 0.6.20 +7afdf4c84a713fe151e6163ab25d45e8727ce653 0.6.21 +105066342777cd1319a95d7ae0271a2ea1ac33fe 0.6.23 +7b5ef4e6c80e82541dffb5a9a130d81550d5a835 0.6.24 +9c014a80f32e532371826ed1dc3236975f37f371 0.6.25 +ff8c4d6c8e5d2093750a58a3d43b76556570007c 0.6.26 +2a5c42ed097a195e398b97261c40cd66c8da8913 0.6.27 +4ed34b38851f90278cfe2bff75784f7e32883725 0.6.28 +acecfa2cfb6fca207dd2f4e025c695def3bb6b40 0.6.29 +e950f50addff150859f5990b9df2a33c691b6354 0.6.30 +06dae3faee2de50ff17b90719df410b2ebc5b71e 0.6.31 +1f4f79258ed5b418f680a55d3006f41aa6a56d2b 0.6.32 +89f57bf1406a5e745470af35446902c21ac9b6f6 0.6.33 +3c8f9fc13862124cf20ef2ff2140254fb272bb94 0.6.34 +7c3f8b9eb7cfa17481c835d5caaa918d337c7a83 0.6.35 +192094c0d1e2e5d2cb5c718f84a36c9de04b314b 0.6.36 +66d4e3b8899166e4c04189ee1831c649b7ff38bf 0.6.37 +398d58aa8bba33778c30ce72055a27d4b425809c 0.6.38 +f457fc2a3ebe609d8ca7a869eb65b7506ecf49ef 0.6.39 +9089a40343981baa593b9bb5953f9088e9507099 0.6.40 ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 From c2f0ac786148d7614a7c8591c6ae56ea710e5453 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 17:26:01 -0400 Subject: [PATCH 5647/8469] Fix error in docs build --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index bdffa06d01..8bc59a1bbb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -80,6 +80,7 @@ v20.6.0 packaging 16.1 and PEP 508. Fixes Issue #122. See also BB Pull Request #175, BB Pull Request #168, and BB Pull Request #164. Additionally: + - ``Requirement.parse`` no longer retains the order of extras. - ``parse_requirements`` now requires that all versions be PEP-440 compliant, as revealed in #499. Packages released From 53a9c83a227c1277165a1bdec013bbb4465edd8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 21:58:23 -0400 Subject: [PATCH 5648/8469] =?UTF-8?q?Bump=20version:=2020.6.5=20=E2=86=92?= =?UTF-8?q?=2020.6.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index eda6916dfc..07d2bd2835 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.5 +current_version = 20.6.6 commit = True tag = True diff --git a/setup.py b/setup.py index 14219945ff..c559befaea 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.5", + version="20.6.6", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From d198cbc480ceb09d5c7e35b5aaee7eeb87cab767 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 21:58:23 -0400 Subject: [PATCH 5649/8469] Added tag v20.6.6 for changeset 57d63b38e855 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8ef51c93af..ecb71c8b14 100644 --- a/.hgtags +++ b/.hgtags @@ -247,3 +247,4 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 8b46dc41cb234c435b950a879214a6dee54c9dd2 v20.6.3 7258be20fe93bbf936dc1a81ce71c04c5880663e v20.6.4 7e0ab283db4e6f780777f7f06af475f044631fa1 v20.6.5 +57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 From 11f68796ae1fb41a1318b58b89868a933e3b4c74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 22:09:19 -0400 Subject: [PATCH 5650/8469] Ensure sphinx is present for building docs --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c559befaea..1aa31687d4 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ def _gen_console_scripts(): needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] -needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) +needs_sphinx = set(['build_sphinx', 'upload_docs', 'release']).intersection(sys.argv) sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else [] needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] From 3acfce0f3cd74981bb7690fedd5f26690278ce38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Mar 2016 22:09:39 -0400 Subject: [PATCH 5651/8469] Added tag v20.6.6 for changeset b04dbdd161d7 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index ecb71c8b14..03747dc713 100644 --- a/.hgtags +++ b/.hgtags @@ -248,3 +248,5 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 7258be20fe93bbf936dc1a81ce71c04c5880663e v20.6.4 7e0ab283db4e6f780777f7f06af475f044631fa1 v20.6.5 57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 +57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 +b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 From 9332edbf23be5d38488957bc8043ada2f1baddaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 09:03:50 -0400 Subject: [PATCH 5652/8469] Remove unused imports --- pkg_resources/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index bb69b60744..2f35b34d55 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -28,8 +28,6 @@ import stat import functools import pkgutil -import token -import symbol import operator import platform import collections @@ -67,11 +65,6 @@ except ImportError: importlib_machinery = None -try: - import parser -except ImportError: - pass - from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') __import__('pkg_resources.extern.packaging.specifiers') From e7a27ca0a3ba06f69836872342089e7333f24a3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 10:40:36 -0400 Subject: [PATCH 5653/8469] Extract separate test for test_environment_markers in test_resources. Remove unused variable. --- pkg_resources/tests/test_resources.py | 8 ++++++-- setuptools/tests/test_egg_info.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 1e1767710f..3a8c8e548a 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -182,8 +182,12 @@ def testResolve(self): msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg - ws = WorkingSet([]) # reset - # Environment markers are evaluated at resolution time + def test_environment_markers(self): + """ + Environment markers are evaluated at resolution time. + """ + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) res = ws.resolve(parse_requirements("Foo;python_version<'2'"), ad) assert list(res) == [] diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 6aed315ff7..fd5f26fc2d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -123,7 +123,7 @@ def test_setup_requires_with_markers(self, tmpdir_cwd, env): def test_tests_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """tests_require=["barbazquux;python_version<'2'"],""") - data = self._run_install_command( + self._run_install_command( tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -154,7 +154,7 @@ def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): if code: raise AssertionError(data) if output: - assert output in data + assert output in data def _find_egg_info_files(self, root): class DirList(list): From 04d10ff025e1cbef7ec93a2008c930e856045c8a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 10:25:44 -0400 Subject: [PATCH 5654/8469] Bypass environment marker evaluation in requirements resolution. Ref #523. --- CHANGES.txt | 6 ++++++ pkg_resources/__init__.py | 6 ++++-- pkg_resources/tests/test_resources.py | 1 + setuptools/tests/test_egg_info.py | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8bc59a1bbb..dee622ac53 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +v20.6.7 +------- + +* Issue #523: Disabled support for environment markers + introduced in v20.5. + v20.6.6 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2f35b34d55..eb84f4ba1b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -804,8 +804,10 @@ def resolve(self, requirements, env=None, installer=None, continue # If the req has a marker, evaluate it -- skipping the req if # it evaluates to False. - if req.marker and not req.marker.evaluate(): - continue + # https://github.com/pypa/setuptools/issues/523 + _issue_523_bypass = True + if not _issue_523_bypass and req.marker and not req.marker.evaluate(): + continue dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 3a8c8e548a..791d8ee399 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -182,6 +182,7 @@ def testResolve(self): msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_environment_markers(self): """ Environment markers are evaluated at resolution time. diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index fd5f26fc2d..d37567b48f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -104,6 +104,7 @@ def _setup_script_with_requires(self, requires_line): 'setup.py': setup_script, }) + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_install_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """install_requires=["barbazquux;python_version<'2'"],""") @@ -114,12 +115,14 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): requires_txt).read().split('\n') assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_setup_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """setup_requires=["barbazquux;python_version<'2'"],""") self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_tests_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """tests_require=["barbazquux;python_version<'2'"],""") From d48e839e34b1dc4f64707935f58e4bc0824457c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 10:47:10 -0400 Subject: [PATCH 5655/8469] =?UTF-8?q?Bump=20version:=2020.6.6=20=E2=86=92?= =?UTF-8?q?=2020.6.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 07d2bd2835..31fa0d34f2 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.6 +current_version = 20.6.7 commit = True tag = True diff --git a/setup.py b/setup.py index 1aa31687d4..9067abe2a3 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.6", + version="20.6.7", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 3484b70027caa26648d7d7270bef827629d633a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 10:47:10 -0400 Subject: [PATCH 5656/8469] Added tag v20.6.7 for changeset 0804d30b6ead --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 03747dc713..95b15456ea 100644 --- a/.hgtags +++ b/.hgtags @@ -250,3 +250,4 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 +0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 From f4c7a06cc90bed1e1feadd343e5a9fec3433e004 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 1 Apr 2016 14:43:06 +1100 Subject: [PATCH 5657/8469] Drop unused safe_repr function When _assertIn was removed from test_resources, the safe_repr function was not dropped, leaving it with no callers, so drop it. --- pkg_resources/tests/test_resources.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 791d8ee399..98b8dcd7b3 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -15,17 +15,6 @@ WorkingSet) -def safe_repr(obj, short=False): - """ copied from Python2.7""" - try: - result = repr(obj) - except Exception: - result = object.__repr__(obj) - if not short or len(result) < pkg_resources._MAX_LENGTH: - return result - return result[:pkg_resources._MAX_LENGTH] + ' [truncated]...' - - class Metadata(pkg_resources.EmptyProvider): """Mock object to return metadata as if from an on-disk distribution""" From c5189c3992f32dcabf5cb294340bf4cad294de23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Apr 2016 17:01:51 -0400 Subject: [PATCH 5658/8469] Rename CHANGES and README files for nicer rendering on Github. --- .gitignore | 1 - .hgignore | 1 - CHANGES.txt => CHANGES.rst | 0 README.txt => README.rst | 0 docs/conf.py | 2 +- docs/developer-guide.txt | 2 +- docs/history.txt | 2 +- setup.py | 2 +- 8 files changed, 4 insertions(+), 6 deletions(-) rename CHANGES.txt => CHANGES.rst (100%) rename README.txt => README.rst (100%) diff --git a/.gitignore b/.gitignore index 05c0808d6c..4d77520f68 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ distribute.egg-info setuptools.egg-info .coverage .tox -CHANGES (links).txt *.egg *.py[cod] *.swp diff --git a/.hgignore b/.hgignore index d70c9a7c48..ebc53b33d5 100644 --- a/.hgignore +++ b/.hgignore @@ -8,7 +8,6 @@ distribute.egg-info setuptools.egg-info .coverage .tox -CHANGES (links).txt *.egg *.py[cod] *.swp diff --git a/CHANGES.txt b/CHANGES.rst similarity index 100% rename from CHANGES.txt rename to CHANGES.rst diff --git a/README.txt b/README.rst similarity index 100% rename from README.txt rename to README.rst diff --git a/docs/conf.py b/docs/conf.py index 6877c5c062..f315e2b720 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,7 +200,7 @@ #latex_use_modindex = True link_files = { - 'CHANGES.txt': dict( + 'CHANGES.rst': dict( using=dict( BB='https://bitbucket.org', GH='https://github.com', diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index c82adbb93d..7cd3c6d2dc 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -69,7 +69,7 @@ If you want to contribute changes, we recommend you fork the repository on Github, commit the changes to your repository, and then make a pull request on Github. If you make some changes, don't forget to: -- add a note in CHANGES.txt +- add a note in CHANGES.rst Please commit all changes in the 'master' branch against the latest available commit or for bug-fixes, against an earlier commit or release in which the diff --git a/docs/history.txt b/docs/history.txt index 268137cde2..8e217503ba 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -5,4 +5,4 @@ History ******* -.. include:: ../CHANGES (links).txt +.. include:: ../CHANGES (links).rst diff --git a/setup.py b/setup.py index 1aa31687d4..573fb595f7 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ def _gen_console_scripts(): console_scripts = list(_gen_console_scripts()) -readme_file = io.open('README.txt', encoding='utf-8') +readme_file = io.open('README.rst', encoding='utf-8') with readme_file: long_description = readme_file.read() From 1cdd940877e158f2b748f67f09d1f1321a113998 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 4 Apr 2016 16:27:32 +1000 Subject: [PATCH 5659/8469] Restore evaluating environment markers in WorkingSet Correctly deal with parsed requirements that include extras as a marker inside WorkingSet that are populated from METADATA inside wheels, like we get from pip>=7. This partially reverts commit 04d10ff025e1cbef7ec93a2008c930e856045c8a. Closes: #523 --- pkg_resources/__init__.py | 14 ++++- pkg_resources/tests/test_resources.py | 79 +++++++++++++++++++++++++-- setuptools/tests/test_egg_info.py | 3 - 3 files changed, 85 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index eb84f4ba1b..4f0a487e01 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -791,6 +791,8 @@ def resolve(self, requirements, env=None, installer=None, # key -> dist best = {} to_activate = [] + # Map requirement to the extras that require it + extra_req_mapping = {} # Mapping of requirement to set of distributions that required it; # useful for reporting info about conflicts. @@ -804,9 +806,14 @@ def resolve(self, requirements, env=None, installer=None, continue # If the req has a marker, evaluate it -- skipping the req if # it evaluates to False. - # https://github.com/pypa/setuptools/issues/523 - _issue_523_bypass = True - if not _issue_523_bypass and req.marker and not req.marker.evaluate(): + if req.marker: + result = [] + if req in extra_req_mapping: + for extra in extra_req_mapping[req] or ['']: + result.append(req.marker.evaluate({'extra': extra})) + else: + result.append(req.marker.evaluate()) + if not any(result): continue dist = best.get(req.key) if dist is None: @@ -840,6 +847,7 @@ def resolve(self, requirements, env=None, installer=None, # Register the new requirements needed by req for new_requirement in new_requirements: required_by[new_requirement].add(req.project_name) + extra_req_mapping[new_requirement] = req.extras processed[req] = True diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 98b8dcd7b3..7f86c79786 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -171,16 +171,85 @@ def testResolve(self): msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg - @pytest.mark.xfail(reason="Functionality disabled; see #523") - def test_environment_markers(self): - """ - Environment markers are evaluated at resolution time. - """ + def test_environment_marker_evaluation_negative(self): + """Environment markers are evaluated at resolution time.""" ad = pkg_resources.Environment([]) ws = WorkingSet([]) res = ws.resolve(parse_requirements("Foo;python_version<'2'"), ad) assert list(res) == [] + def test_environment_marker_evaluation_positive(self): + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) + Foo = Distribution.from_filename("/foo_dir/Foo-1.2.dist-info") + ad.add(Foo) + res = ws.resolve(parse_requirements("Foo;python_version>='2'"), ad) + assert list(res) == [Foo] + + def test_marker_evaluation_with_extras(self): + """Extras are also evaluated as markers at resolution time.""" + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) + # Metadata needs to be native strings due to cStringIO behaviour in + # 2.6, so use str(). + Foo = Distribution.from_filename( + "/foo_dir/Foo-1.2.dist-info", + metadata=Metadata(("METADATA", str("Provides-Extra: baz\n" + "Requires-Dist: quux; extra=='baz'"))) + ) + ad.add(Foo) + assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo] + quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info") + ad.add(quux) + res = list(ws.resolve(parse_requirements("Foo[baz]"), ad)) + assert res == [Foo,quux] + + def test_marker_evaluation_with_multiple_extras(self): + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) + # Metadata needs to be native strings due to cStringIO behaviour in + # 2.6, so use str(). + Foo = Distribution.from_filename( + "/foo_dir/Foo-1.2.dist-info", + metadata=Metadata(("METADATA", str("Provides-Extra: baz\n" + "Requires-Dist: quux; extra=='baz'\n" + "Provides-Extra: bar\n" + "Requires-Dist: fred; extra=='bar'\n"))) + ) + ad.add(Foo) + quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info") + ad.add(quux) + fred = Distribution.from_filename("/foo_dir/fred-0.1.dist-info") + ad.add(fred) + res = list(ws.resolve(parse_requirements("Foo[baz,bar]"), ad)) + assert sorted(res) == [fred,quux,Foo] + + def test_marker_evaluation_with_extras_loop(self): + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) + # Metadata needs to be native strings due to cStringIO behaviour in + # 2.6, so use str(). + a = Distribution.from_filename( + "/foo_dir/a-0.2.dist-info", + metadata=Metadata(("METADATA", str("Requires-Dist: c[a]"))) + ) + b = Distribution.from_filename( + "/foo_dir/b-0.3.dist-info", + metadata=Metadata(("METADATA", str("Requires-Dist: c[b]"))) + ) + c = Distribution.from_filename( + "/foo_dir/c-1.0.dist-info", + metadata=Metadata(("METADATA", str("Provides-Extra: a\n" + "Requires-Dist: b;extra=='a'\n" + "Provides-Extra: b\n" + "Requires-Dist: foo;extra=='b'"))) + ) + foo = Distribution.from_filename("/foo_dir/foo-0.1.dist-info") + for dist in (a, b, c, foo): + ad.add(dist) + res = list(ws.resolve(parse_requirements("a"), ad)) + assert res == [a, c, b, foo] + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index d37567b48f..fd5f26fc2d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -104,7 +104,6 @@ def _setup_script_with_requires(self, requires_line): 'setup.py': setup_script, }) - @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_install_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """install_requires=["barbazquux;python_version<'2'"],""") @@ -115,14 +114,12 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): requires_txt).read().split('\n') assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_setup_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """setup_requires=["barbazquux;python_version<'2'"],""") self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_tests_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """tests_require=["barbazquux;python_version<'2'"],""") From 01a84af28027f666c5aabc76b33312fc52378348 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Apr 2016 11:45:47 +0100 Subject: [PATCH 5660/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index dee622ac53..cf18b7f71e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v20.6.8 +------- + +* Issue #523: Restored support for environment markers, + now honoring 'extra' environment markers. + v20.6.7 ------- From 19fd04bae3809caf61208e3d085491990222aca8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Apr 2016 11:45:53 +0100 Subject: [PATCH 5661/8469] Added tag v20.6.8 for changeset a00910db03ec --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 95b15456ea..3bafe1a96e 100644 --- a/.hgtags +++ b/.hgtags @@ -251,3 +251,4 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 +a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 From 5c36cd3890dad731a0e3d9764345377406770c31 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Apr 2016 11:59:18 +0100 Subject: [PATCH 5662/8469] Extract method for testing marker evaluation --- pkg_resources/__init__.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4f0a487e01..c3e3e96ca4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -804,17 +804,10 @@ def resolve(self, requirements, env=None, installer=None, if req in processed: # Ignore cyclic or redundant dependencies continue - # If the req has a marker, evaluate it -- skipping the req if - # it evaluates to False. - if req.marker: - result = [] - if req in extra_req_mapping: - for extra in extra_req_mapping[req] or ['']: - result.append(req.marker.evaluate({'extra': extra})) - else: - result.append(req.marker.evaluate()) - if not any(result): - continue + + if not self._markers_pass(req, extra_req_mapping): + continue + dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map @@ -854,6 +847,26 @@ def resolve(self, requirements, env=None, installer=None, # return list of distros to activate return to_activate + @staticmethod + def _markers_pass(req, extra_req_mapping): + """ + Return False if the req has a marker and fails + evaluation. Otherwise, return True. + + extra_req_mapping is a map of requirements to + extras. + """ + if not req.marker: + return True + + result = [] + if req in extra_req_mapping: + for extra in extra_req_mapping[req] or ['']: + result.append(req.marker.evaluate({'extra': extra})) + else: + result.append(req.marker.evaluate()) + return any(result) + def find_plugins(self, plugin_env, full_env=None, installer=None, fallback=True): """Find all activatable distributions in `plugin_env` From a31716f5a86061d7409b8c08154d3b52ff324efd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 5 Apr 2016 13:36:59 +0100 Subject: [PATCH 5663/8469] Remove fallback value until there's something that explains or requires it. --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c3e3e96ca4..0867771989 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -861,7 +861,7 @@ def _markers_pass(req, extra_req_mapping): result = [] if req in extra_req_mapping: - for extra in extra_req_mapping[req] or ['']: + for extra in extra_req_mapping[req]: result.append(req.marker.evaluate({'extra': extra})) else: result.append(req.marker.evaluate()) From 3d8c2245cb09e0db917648f2cf57f99fd10caca1 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 6 Apr 2016 14:49:02 +1000 Subject: [PATCH 5664/8469] Reinstate the or guard in WorkingSet._markers_pass --- pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_resources.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0867771989..c3e3e96ca4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -861,7 +861,7 @@ def _markers_pass(req, extra_req_mapping): result = [] if req in extra_req_mapping: - for extra in extra_req_mapping[req]: + for extra in extra_req_mapping[req] or ['']: result.append(req.marker.evaluate({'extra': extra})) else: result.append(req.marker.evaluate()) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7f86c79786..7907224ee7 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -186,6 +186,12 @@ def test_environment_marker_evaluation_positive(self): res = ws.resolve(parse_requirements("Foo;python_version>='2'"), ad) assert list(res) == [Foo] + def test_environment_marker_evaluation_called(self): + ws = WorkingSet([]) + req, = parse_requirements("bar;python_version<'4'") + extra_req_mapping = {req: ()} + assert ws._markers_pass(req, extra_req_mapping) == True + def test_marker_evaluation_with_extras(self): """Extras are also evaluated as markers at resolution time.""" ad = pkg_resources.Environment([]) From b1eeba1cd70d6735578cab5e2363c8de653de022 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 6 Apr 2016 16:30:08 +1000 Subject: [PATCH 5665/8469] Stop comparing repr()'s in TestEntryPoint In Python 3, the default order of iterables can not determined, so comparing the repr of objects that include tuples is not static like it is under Python 2. Compare the attributes of EntryPoint instead, making sure to sort .attrs and .extras. Closes: #526 --- pkg_resources/tests/test_resources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7f86c79786..f7ddef55e0 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -382,7 +382,10 @@ def test_printable_name(self): def checkSubMap(self, m): assert len(m) == len(self.submap_expect) for key, ep in self.submap_expect.items(): - assert repr(m.get(key)) == repr(ep) + assert m.get(key).name == ep.name + assert m.get(key).module_name == ep.module_name + assert sorted(m.get(key).attrs) == sorted(ep.attrs) + assert sorted(m.get(key).extras) == sorted(ep.extras) submap_expect = dict( feature1=EntryPoint('feature1', 'somemodule', ['somefunction']), From c7873d38c4478f86864666cd1231877d1183b820 Mon Sep 17 00:00:00 2001 From: riot Date: Thu, 7 Apr 2016 14:39:32 +0200 Subject: [PATCH 5666/8469] This helps finding packages with bad utf Checking hundreds of possibly installed packages manually should NOT be expected of the user ;) --- pkg_resources/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0867771989..8eb697f4d1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1859,7 +1859,10 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': with io.open(self.path, encoding='utf-8') as f: - metadata = f.read() + try: + metadata = f.read() + except UnicodeDecodeError as e: + raise Exception("Bad utf in package: %s - %s" % (self.path, e)) return metadata raise KeyError("No metadata except PKG-INFO is available") From be663b8596fc3e3d02cb5716db1d638788a0230e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 22:05:20 +0100 Subject: [PATCH 5667/8469] Extract _ReqExtras to encapsulate that functionality and decouple it from WorkingSet. --- pkg_resources/__init__.py | 53 +++++++++++++++------------ pkg_resources/tests/test_resources.py | 23 ++++++++++-- 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c3e3e96ca4..d0ba515993 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -791,8 +791,8 @@ def resolve(self, requirements, env=None, installer=None, # key -> dist best = {} to_activate = [] - # Map requirement to the extras that require it - extra_req_mapping = {} + + req_extras = _ReqExtras() # Mapping of requirement to set of distributions that required it; # useful for reporting info about conflicts. @@ -805,7 +805,7 @@ def resolve(self, requirements, env=None, installer=None, # Ignore cyclic or redundant dependencies continue - if not self._markers_pass(req, extra_req_mapping): + if not req_extras.markers_pass(req): continue dist = best.get(req.key) @@ -840,33 +840,13 @@ def resolve(self, requirements, env=None, installer=None, # Register the new requirements needed by req for new_requirement in new_requirements: required_by[new_requirement].add(req.project_name) - extra_req_mapping[new_requirement] = req.extras + req_extras[new_requirement] = req.extras processed[req] = True # return list of distros to activate return to_activate - @staticmethod - def _markers_pass(req, extra_req_mapping): - """ - Return False if the req has a marker and fails - evaluation. Otherwise, return True. - - extra_req_mapping is a map of requirements to - extras. - """ - if not req.marker: - return True - - result = [] - if req in extra_req_mapping: - for extra in extra_req_mapping[req] or ['']: - result.append(req.marker.evaluate({'extra': extra})) - else: - result.append(req.marker.evaluate()) - return any(result) - def find_plugins(self, plugin_env, full_env=None, installer=None, fallback=True): """Find all activatable distributions in `plugin_env` @@ -993,6 +973,31 @@ def __setstate__(self, e_k_b_c): self.callbacks = callbacks[:] +class _ReqExtras(dict): + """ + Map each requirement to the extras that demanded it. + """ + + def markers_pass(self, req): + """ + Evaluate markers for req against each extra that + demanded it. + + Return False if the req has a marker and fails + evaluation. Otherwise, return True. + """ + if not req.marker: + return True + + result = [] + if req in self: + for extra in self[req] or ['']: + result.append(req.marker.evaluate({'extra': extra})) + else: + result.append(req.marker.evaluate()) + return any(result) + + class Environment(object): """Searchable snapshot of distributions on a search path""" diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 7907224ee7..acc8dc1e15 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -187,10 +187,25 @@ def test_environment_marker_evaluation_positive(self): assert list(res) == [Foo] def test_environment_marker_evaluation_called(self): - ws = WorkingSet([]) - req, = parse_requirements("bar;python_version<'4'") - extra_req_mapping = {req: ()} - assert ws._markers_pass(req, extra_req_mapping) == True + """ + If one package foo requires bar without any extras, + markers should pass for bar. + """ + parent_req, = parse_requirements("foo") + req, = parse_requirements("bar;python_version>='2'") + req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) + assert req_extras.markers_pass(req) + + parent_req, = parse_requirements("foo[]") + req, = parse_requirements("bar;python_version>='2'") + req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) + assert req_extras.markers_pass(req) + + # this is a little awkward; I would want this to fail + parent_req, = parse_requirements("foo") + req, = parse_requirements("bar;python_version>='2' and extra==''") + req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) + assert req_extras.markers_pass(req) def test_marker_evaluation_with_extras(self): """Extras are also evaluated as markers at resolution time.""" From f664385be2051cd135ad52e1563993945e0abe10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 22:22:58 +0100 Subject: [PATCH 5668/8469] Adjust expectation that 'extra' is not in the marker evaluation if no extras demanded the requirement. --- pkg_resources/__init__.py | 22 ++++++++++++---------- pkg_resources/tests/test_resources.py | 8 +++++--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d0ba515993..04064d5a10 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -35,6 +35,7 @@ import email.parser import tempfile import textwrap +import itertools from pkgutil import get_importer try: @@ -986,16 +987,17 @@ def markers_pass(self, req): Return False if the req has a marker and fails evaluation. Otherwise, return True. """ - if not req.marker: - return True - - result = [] - if req in self: - for extra in self[req] or ['']: - result.append(req.marker.evaluate({'extra': extra})) - else: - result.append(req.marker.evaluate()) - return any(result) + extra_evals = ( + req.marker.evaluate({'extra': extra}) + for extra in self.get(req, ()) + ) + # set up a late-evaluated simple marker evaluation. + simple_eval = ( + req.marker.evaluate() + for _ in (None,) + ) + evals = itertools.chain(extra_evals, simple_eval) + return not req.marker or any(evals) class Environment(object): diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index acc8dc1e15..bd074f2234 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -201,11 +201,13 @@ def test_environment_marker_evaluation_called(self): req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) assert req_extras.markers_pass(req) - # this is a little awkward; I would want this to fail + # extra should not be present in the marker namespace if + # no markers were supplied parent_req, = parse_requirements("foo") - req, = parse_requirements("bar;python_version>='2' and extra==''") + req, = parse_requirements("bar;extra==''") req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) - assert req_extras.markers_pass(req) + with pytest.raises(packaging.markers.UndefinedEnvironmentName): + req_extras.markers_pass(req) def test_marker_evaluation_with_extras(self): """Extras are also evaluated as markers at resolution time.""" From 8ce73d4450eb646b80c004e57b82ed9eabe24f35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 22:24:53 +0100 Subject: [PATCH 5669/8469] Rely on short-circuit in 'or' rather than building a separate iterable. --- pkg_resources/__init__.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 04064d5a10..ab48cf7ab3 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -35,7 +35,6 @@ import email.parser import tempfile import textwrap -import itertools from pkgutil import get_importer try: @@ -991,13 +990,7 @@ def markers_pass(self, req): req.marker.evaluate({'extra': extra}) for extra in self.get(req, ()) ) - # set up a late-evaluated simple marker evaluation. - simple_eval = ( - req.marker.evaluate() - for _ in (None,) - ) - evals = itertools.chain(extra_evals, simple_eval) - return not req.marker or any(evals) + return not req.marker or any(extra_evals) or req.marker.evaluate() class Environment(object): From 6462571024e69a285a17c8f790ad13774790990a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 23:08:32 +0100 Subject: [PATCH 5670/8469] Trap additional exceptions. Fixes #536. --- CHANGES.rst | 7 +++++++ setuptools/msvc9_support.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index cf18b7f71e..b29977ce82 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v20.7 +----- + +* Issue #536: In msvc9_support, trap additional exceptions + that might occur when importing + ``distutils.msvc9compiler`` in mingw environments. + v20.6.8 ------- diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index a69c7474c8..9d869580ec 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1,6 +1,6 @@ try: import distutils.msvc9compiler -except ImportError: +except Exception: pass unpatched = dict() From f9f7277f7caac4e6946217c3cd221cb1a82b8982 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 23:12:02 +0100 Subject: [PATCH 5671/8469] Update changelog --- CHANGES.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b29977ce82..248c32fa53 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,12 +2,17 @@ CHANGES ======= -v20.7 ------ +v20.7.0 +------- +* Refactored extra enviroment marker processing + in WorkingSet. +* Issue #533: Fixed intermittent test failures. * Issue #536: In msvc9_support, trap additional exceptions that might occur when importing ``distutils.msvc9compiler`` in mingw environments. +* Issue #537: Provide better context when package + metadata fails to decode in UTF-8. v20.6.8 ------- From 84f1525334eb3e6757ee692767301f62536da260 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 7 Apr 2016 23:42:02 +0100 Subject: [PATCH 5672/8469] Instead of reasing a new exception, just augment the existing exception, avoiding any concerns about exception type, but still communicating the context necessary to trace the issue. Ref #537. --- pkg_resources/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index be215ccf7c..ce4e775567 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1861,8 +1861,11 @@ def get_metadata(self, name): with io.open(self.path, encoding='utf-8') as f: try: metadata = f.read() - except UnicodeDecodeError as e: - raise Exception("Bad utf in package: %s - %s" % (self.path, e)) + except UnicodeDecodeError as exc: + # add path context to error message + tmpl = " in {self.path}" + exc.reason += tmpl.format(self=self) + raise return metadata raise KeyError("No metadata except PKG-INFO is available") From 7aff0f9f743263c7f223b45f79c106eb2a72345c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Apr 2016 21:17:35 +0200 Subject: [PATCH 5673/8469] =?UTF-8?q?Bump=20version:=2020.6.7=20=E2=86=92?= =?UTF-8?q?=2020.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 31fa0d34f2..6ec7f46477 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.7 +current_version = 20.7.0 commit = True tag = True diff --git a/setup.py b/setup.py index 25726da1a1..1de76ce986 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.7", + version="20.7.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a1d3c39f9f282360cbe2978df5240808cb55c347 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Apr 2016 21:17:36 +0200 Subject: [PATCH 5674/8469] Added tag v20.7.0 for changeset 0262ab29fc24 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3bafe1a96e..f3b82ececd 100644 --- a/.hgtags +++ b/.hgtags @@ -252,3 +252,4 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 +0262ab29fc2417b502a55f49b7fd43528fbd3df4 v20.7.0 From 5253f7fbcea33e28af6348c3cc0f65334cad5623 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 10 Apr 2016 18:39:35 -0400 Subject: [PATCH 5675/8469] Swap out hard tabs for spaces --- setuptools/launch.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/setuptools/launch.py b/setuptools/launch.py index 06e15e1e6e..b05cbd2cfe 100644 --- a/setuptools/launch.py +++ b/setuptools/launch.py @@ -11,25 +11,25 @@ def run(): - """ - Run the script in sys.argv[1] as if it had - been invoked naturally. - """ - __builtins__ - script_name = sys.argv[1] - namespace = dict( - __file__ = script_name, - __name__ = '__main__', - __doc__ = None, - ) - sys.argv[:] = sys.argv[1:] + """ + Run the script in sys.argv[1] as if it had + been invoked naturally. + """ + __builtins__ + script_name = sys.argv[1] + namespace = dict( + __file__ = script_name, + __name__ = '__main__', + __doc__ = None, + ) + sys.argv[:] = sys.argv[1:] - open_ = getattr(tokenize, 'open', open) - script = open_(script_name).read() - norm_script = script.replace('\\r\\n', '\\n') - code = compile(norm_script, script_name, 'exec') - exec(code, namespace) + open_ = getattr(tokenize, 'open', open) + script = open_(script_name).read() + norm_script = script.replace('\\r\\n', '\\n') + code = compile(norm_script, script_name, 'exec') + exec(code, namespace) if __name__ == '__main__': - run() + run() From 52d420e6309d2be19e848cfb32a43191e4623e6b Mon Sep 17 00:00:00 2001 From: ncoghlan Date: Tue, 12 Apr 2016 00:10:49 +1000 Subject: [PATCH 5676/8469] Update rationale for the zip_safe flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Importing from a zip file no longer significantly reduces the number of stat calls during import, and may even slow imports down if too many archives are added to sys.path. The outdated rationale was noted by Thomas Güttler on distutils-sig --- docs/setuptools.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index eeeab93737..57818281b8 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1270,7 +1270,8 @@ Creating System Packages Setting the ``zip_safe`` flag ----------------------------- -For maximum performance, Python packages are best installed as zip files. +For some use cases (such as bundling as part of a larger application), Python +packages may be run directly from a zip file. Not all packages, however, are capable of running in compressed form, because they may expect to be able to access either source code or data files as normal operating system files. So, ``setuptools`` can install your project From e5822f0d5be6386bf86cde03988bfdf1bfc2e935 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 08:37:57 +0200 Subject: [PATCH 5677/8469] Update changelog. Fixes #543. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 248c32fa53..40cab4fb76 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v20.8.0 +------- + +* Issue #543: Re-release so that latest release doesn't + cause déjà vu with distribute and setuptools 0.7 in + older environments. + v20.7.0 ------- From f676f1a8e36d4a887a81aba3cba64f2bec850ec7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 08:39:13 +0200 Subject: [PATCH 5678/8469] =?UTF-8?q?Bump=20version:=2020.7.0=20=E2=86=92?= =?UTF-8?q?=2020.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6ec7f46477..9940bbc3e9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.7.0 +current_version = 20.8.0 commit = True tag = True diff --git a/setup.py b/setup.py index 1de76ce986..08720fb581 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.7.0", + version="20.8.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From bc35160987a7dda23de0c898a7e8ae4363504cde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 08:39:14 +0200 Subject: [PATCH 5679/8469] Added tag v20.8.0 for changeset 7f56b6f40de3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f3b82ececd..9348b875e5 100644 --- a/.hgtags +++ b/.hgtags @@ -253,3 +253,4 @@ b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 0262ab29fc2417b502a55f49b7fd43528fbd3df4 v20.7.0 +7f56b6f40de39456c78507a14c288709712881cb v20.8.0 From dd5caefb987dbd15495047fc653fa71d4667eb43 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 09:03:49 +0200 Subject: [PATCH 5680/8469] Always inject extra into the environment when evaluating markers. Fixes #544. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 4 ++-- pkg_resources/tests/test_resources.py | 10 +--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 40cab4fb76..acfe3df3a6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v20.8.1 +------- + +* Issue #544: Fix issue with extra environment marker + processing in WorkingSet due to refactor in v20.7.0. + v20.8.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ce4e775567..2eab823047 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -988,9 +988,9 @@ def markers_pass(self, req): """ extra_evals = ( req.marker.evaluate({'extra': extra}) - for extra in self.get(req, ()) + for extra in self.get(req, ()) + (None,) ) - return not req.marker or any(extra_evals) or req.marker.evaluate() + return not req.marker or any(extra_evals) class Environment(object): diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 0a72d94144..31847dc842 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -189,7 +189,7 @@ def test_environment_marker_evaluation_positive(self): def test_environment_marker_evaluation_called(self): """ If one package foo requires bar without any extras, - markers should pass for bar. + markers should pass for bar without extras. """ parent_req, = parse_requirements("foo") req, = parse_requirements("bar;python_version>='2'") @@ -201,14 +201,6 @@ def test_environment_marker_evaluation_called(self): req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) assert req_extras.markers_pass(req) - # extra should not be present in the marker namespace if - # no markers were supplied - parent_req, = parse_requirements("foo") - req, = parse_requirements("bar;extra==''") - req_extras = pkg_resources._ReqExtras({req: parent_req.extras}) - with pytest.raises(packaging.markers.UndefinedEnvironmentName): - req_extras.markers_pass(req) - def test_marker_evaluation_with_extras(self): """Extras are also evaluated as markers at resolution time.""" ad = pkg_resources.Environment([]) From 8b62ac49a915ab16bde75635bd6c58d2ec66b19c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 09:03:55 +0200 Subject: [PATCH 5681/8469] =?UTF-8?q?Bump=20version:=2020.8.0=20=E2=86=92?= =?UTF-8?q?=2020.8.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9940bbc3e9..565ed00986 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.8.0 +current_version = 20.8.1 commit = True tag = True diff --git a/setup.py b/setup.py index 08720fb581..834fdeee06 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.8.0", + version="20.8.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 4950c05901da4382741cc8ce22a12da50436e2cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Apr 2016 09:03:55 +0200 Subject: [PATCH 5682/8469] Added tag v20.8.1 for changeset 8cf9340669ae --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9348b875e5..8a522a5333 100644 --- a/.hgtags +++ b/.hgtags @@ -254,3 +254,4 @@ b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 0262ab29fc2417b502a55f49b7fd43528fbd3df4 v20.7.0 7f56b6f40de39456c78507a14c288709712881cb v20.8.0 +8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 From 18b7ab638a52b1dc2899f2e32b33f41d931ce2f4 Mon Sep 17 00:00:00 2001 From: Rick Liu Date: Fri, 15 Apr 2016 12:19:52 -0700 Subject: [PATCH 5683/8469] Handle not-zip-safe egg (folder) deletion in rotate command --- setuptools/command/rotate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 804f962a7b..b89353f529 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -2,6 +2,7 @@ from distutils import log from distutils.errors import DistutilsOptionError import os +import shutil from setuptools.extern import six @@ -59,4 +60,7 @@ def run(self): for (t, f) in files: log.info("Deleting %s", f) if not self.dry_run: - os.unlink(f) + if os.path.isdir(f): + shutil.rmtree(f) + else: + os.unlink(f) From c949b7d6f0f28461a15237ac9d54ad0b2db4c439 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Fri, 18 Mar 2016 10:06:38 +0200 Subject: [PATCH 5684/8469] remove _markerlib from manifest Signed-off-by: Gabi Davar --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index dfea20495c..668e13ce06 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,6 @@ recursive-include setuptools *.py *.exe *.xml recursive-include tests *.py recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html -recursive-include _markerlib *.py recursive-include setuptools/_vendor * recursive-include pkg_resources *.py *.txt include *.py From fb5f96f0b3d145a1d874f4fedfb8a746c2e3be49 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Wed, 2 Dec 2015 20:14:54 +0200 Subject: [PATCH 5685/8469] bump certifi to 2016.2.28 Signed-off-by: Gabi Davar --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 834fdeee06..50565c9d47 100755 --- a/setup.py +++ b/setup.py @@ -146,10 +146,10 @@ def _gen_console_scripts(): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2015.11.20", + "certs": "certifi==2016.2.28", }, dependency_links=[ - 'https://pypi.python.org/packages/source/c/certifi/certifi-2015.11.20.tar.gz#md5=25134646672c695c1ff1593c2dd75d08', + 'https://pypi.python.org/packages/source/c/certifi/certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650', 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ], scripts=[], From 614e827135daf7b7b6e19d5711de46982327423e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Apr 2016 10:52:28 +0200 Subject: [PATCH 5686/8469] update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index acfe3df3a6..7d3ce2fce6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v20.9.0 +------- + +* #548: Update certify version to 2016.2.28 +* #545: Safely handle deletion of non-zip eggs in rotate + command. + v20.8.1 ------- From c748a49baec0df9e94adcb59443a756af7e902ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Apr 2016 10:54:30 +0200 Subject: [PATCH 5687/8469] =?UTF-8?q?Bump=20version:=2020.8.1=20=E2=86=92?= =?UTF-8?q?=2020.9.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 565ed00986..f2b8d25496 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.8.1 +current_version = 20.9.0 commit = True tag = True diff --git a/setup.py b/setup.py index 50565c9d47..a29f0a1708 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.8.1", + version="20.9.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From dc1100855f390dc6f7a85a85e3e209e01d46f114 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Apr 2016 10:54:31 +0200 Subject: [PATCH 5688/8469] Added tag v20.9.0 for changeset 8bf8aaa139bb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8a522a5333..e1c9258e38 100644 --- a/.hgtags +++ b/.hgtags @@ -255,3 +255,4 @@ a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 0262ab29fc2417b502a55f49b7fd43528fbd3df4 v20.7.0 7f56b6f40de39456c78507a14c288709712881cb v20.8.0 8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 +8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 From fc6aec49d66daaf28d0c1a5ddb31766a056599f1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Apr 2016 17:00:33 +0100 Subject: [PATCH 5689/8469] Limit deploys to Python 3.5 and only the standard run. Ref #549. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2611f02a89..fdb4d5530c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,9 @@ deploy: on: tags: true all_branches: true + python: 3.5 + condition: -z $LC_ALL user: jaraco password: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release - python: 3.5 From 2fbcd3426032bd175fbab63a7e26fba76369eeb9 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 17 Apr 2016 18:07:20 +0200 Subject: [PATCH 5690/8469] Feature/msvc discovery It's finished !! Now, it fully support MSVC from 9.0 to 14.0, and all theses standalone distributions: - Microsoft Visual C++ Compiler for Python 2.7 (MSVC++9.0, x86, amd64) - Microsoft Windows SDK 6.1 (MSVC++9.0, x86, x64, ia64) - Microsoft Windows SDK 7.0 (MSVC++9.0, x86, x64, ia64) - Microsoft Windows SDK 7.1 (MSVC++10.0, x86, x64, ia64) - Microsoft Visual C++ Build Tools 2015 (MSVC++14.0, x86, x64, arm) Next step: - Code review. - Test it with some MSVC versions/Architectures/Python versions combinations. I have also some comments on the global implementation: - I think `msvc9_find_vcvarsall` can now be deleted. - Maybe rename the file, by example "msvc_support.py". - Maybe Implementing it (And other distutils patchs) for not be only called by "setuptools", but also by "pkg_resources": This will automatically activate patchs for some externals packages like "Cython" transparently. --- setuptools/msvc9_support.py | 301 ++++++++++++++++++++++++++++-------- 1 file changed, 239 insertions(+), 62 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 0e144a8047..860ab9f51c 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -379,12 +379,33 @@ def vc_for_python(self): path = r'DevDiv\VCForPython' return os.path.join(self.microsoft, path) + @property + def microsoft_sdk(self): + """ + Microsoft SDK registry key. + """ + return os.path.join(self.microsoft, 'Microsoft SDKs') + @property def windows_sdk(self): """ Microsoft Windows/Platform SDK registry key. """ - return os.path.join(self.microsoft, r'Microsoft SDKs\Windows') + return os.path.join(self.microsoft_sdk, 'Windows') + + @property + def netfx_sdk(self): + """ + Microsoft .NET Framework SDK registry key. + """ + return os.path.join(self.microsoft_sdk, 'NETFXSDK') + + @property + def windows_kits_roots(self): + """ + Microsoft Windows Kits Roots registry key. + """ + return os.path.join(self.microsoft, r'Windows Kits\Installed Roots') def lookup(self, key, name): """ @@ -429,6 +450,7 @@ class SystemInfo: def __init__(self, registry_info, vcver=None): self.ri = registry_info + self.pi = self.ri.pi if vcver: self.vcver = vcver else: @@ -503,22 +525,29 @@ def VCInstallDir(self): return result @property - def WindowsSdkDir(self): + def WindowsSdkVersion(self): """ - Microsoft Windows SDK directory. + Microsoft Windows SDK versions. """ - sdkdir = '' + # Set Windows SDK versions for specified MSVC++ version if self.vcver <= 9.0: - sdkver = ('7.0', '6.1', '6.0a') + return ('7.0', '6.1', '6.0a') elif self.vcver == 10.0: - sdkver = ('7.1', '7.0a') + return ('7.1', '7.0a') elif self.vcver == 11.0: - sdkver = ('8.0', '8.0a') + return ('8.0', '8.0a') elif self.vcver == 12.0: - sdkver = ('8.1', '8.1a') + return ('8.1', '8.1a') elif self.vcver >= 14.0: - sdkver = ('10.0', '8.1') - for ver in sdkver: + return ('10.0', '8.1') + + @property + def WindowsSdkDir(self): + """ + Microsoft Windows SDK directory. + """ + sdkdir = '' + for ver in self.WindowsSdkVersion: # Try to get it from registry loc = os.path.join(self.ri.windows_sdk, 'v%s' % ver) sdkdir = self.ri.lookup(loc, 'installationfolder') @@ -532,7 +561,7 @@ def WindowsSdkDir(self): sdkdir = os.path.join(install_base, 'WinSDK') if not sdkdir or not os.path.isdir(sdkdir): # If fail, use default new path - for ver in sdkver: + for ver in self.WindowsSdkVersion: intver = ver[:ver.rfind('.')] path = r'Microsoft SDKs\Windows Kits\%s' % (intver) d = os.path.join(self.ProgramFiles, path) @@ -540,7 +569,7 @@ def WindowsSdkDir(self): sdkdir = d if not sdkdir or not os.path.isdir(sdkdir): # If fail, use default old path - for ver in sdkver: + for ver in self.WindowsSdkVersion: path = r'Microsoft SDKs\Windows\v%s' % ver d = os.path.join(self.ProgramFiles, path) if os.path.isdir(d): @@ -550,6 +579,37 @@ def WindowsSdkDir(self): sdkdir = os.path.join(self.VCInstallDir, 'PlatformSDK') return sdkdir + @property + def WindowsSDKExecutablePath(self): + """ + Microsoft Windows SDK executable directory. + """ + # Find WinSDK NetFx Tools registry dir name + if self.vcver <= 11.0: + netfxver = 35 + arch = '' + else: + netfxver = 40 + hidex86 = True if self.vcver <= 12.0 else False + arch = self.pi.current_dir(x64=True, hidex86=hidex86) + fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-')) + + # liste all possibles registry paths + regpaths = [] + if self.vcver >= 14.0: + for ver in self.NetFxSdkVersion: + regpaths += [os.path.join(self.ri.netfx_sdk, ver, fx)] + + for ver in self.WindowsSdkVersion: + regpaths += [os.path.join(self.ri.windows_sdk, 'v%sA' % ver, fx)] + + # Return installation folder from the more recent path + for path in regpaths: + execpath = self.ri.lookup(path, 'installationfolder') + if execpath: + break + return execpath + @property def FSharpInstallDir(self): """ @@ -559,6 +619,48 @@ def FSharpInstallDir(self): path = os.path.join(self.ri.visualstudio, path) return self.ri.lookup(path, 'productdir') or '' + @property + def UniversalCRTSdkDir(self): + """ + Microsoft Universal CRT SDK directory. + """ + # Set Kit Roots versions for specified MSVC++ version + if self.vcver >= 14.0: + vers = ('10', '81') + else: + vers = () + + # Find path of the more recent Kit + for ver in vers: + sdkdir = self.ri.lookup(self.ri.windows_kits_roots, + 'kitsroot%s' % ver) + if sdkdir: + break + return sdkdir or '' + + @property + def NetFxSdkVersion(self): + """ + Microsoft .NET Framework SDK versions. + """ + # Set FxSdk versions for specified MSVC++ version + if self.vcver >= 14.0: + return ('4.6.1', '4.6') + else: + return () + + @property + def NetFxSdkDir(self): + """ + Microsoft .NET Framework SDK directory. + """ + for ver in self.NetFxSdkVersion: + loc = os.path.join(self.ri.netfx_sdk, ver) + sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder') + if sdkdir: + break + return sdkdir or '' + @property def FrameworkDir32(self): """ @@ -611,10 +713,8 @@ def _find_dot_net_versions(self, bits=32): if self.vcver >= 12.0: frameworkver = (ver, 'v4.0') elif self.vcver >= 10.0: - if ver.lower()[:2] != 'v4': - ver = '' - ver = ver or 'v4.0.30319' - frameworkver = (ver, 'v3.5') + frameworkver = ('v4.0.30319' if ver.lower()[:2] != 'v4' else ver, + 'v3.5') elif self.vcver == 9.0: frameworkver = ('v3.5', 'v2.0.50727') if self.vcver == 8.0: @@ -647,9 +747,10 @@ def __init__(self, arch, vcver=None, vcvermin=None): self.ri = RegistryInfo(self.pi) self.si = SystemInfo(self.ri, vcver) - if self.vcver < vcvermin: - err = 'No suitable Microsoft Visual C++ version found' - raise distutils.errors.DistutilsPlatformError(err) + if vcvermin: + if self.vcver < vcvermin: + err = 'No suitable Microsoft Visual C++ version found' + raise distutils.errors.DistutilsPlatformError(err) @property def vcver(self): @@ -664,11 +765,13 @@ def VSTools(self): Microsoft Visual Studio Tools """ paths = [r'Common7\IDE', r'Common7\Tools'] + if self.vcver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] paths += [r'Team Tools\Performance Tools'] paths += [r'Team Tools\Performance Tools%s' % arch_subdir] + return [os.path.join(self.si.VSInstallDir, path) for path in paths] @property @@ -686,8 +789,10 @@ def VCLibraries(self): """ arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] + if self.vcver >= 14.0: paths += [r'Lib\store%s' % arch_subdir] + return [os.path.join(self.si.VCInstallDir, path) for path in paths] @property @@ -706,15 +811,16 @@ def VCTools(self): """ forcex86 = True if self.vcver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) - tools = [ - os.path.join(self.si.VCInstallDir, 'VCPackages'), - os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir), - ] + tools = [os.path.join(self.si.VCInstallDir, 'VCPackages'), + os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir)] + if self.pi.cross_dir() and self.vcver >= 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) tools += [os.path.join(self.si.VCInstallDir, path)] + else: tools += [os.path.join(self.si.VCInstallDir, 'Bin')] + return tools @property @@ -722,39 +828,71 @@ def OSLibraries(self): """ Microsoft Windows SDK Libraries """ - arch_subdir = self.pi.target_dir(hidex86=True, x64=True) - return [os.path.join(self.si.WindowsSdkDir, 'Bin%s' % arch_subdir)] + if self.vcver <= 10.0: + arch_subdir = self.pi.target_dir(hidex86=True, x64=True) + return [os.path.join(self.si.WindowsSdkDir, 'Bin%s' % arch_subdir)] + + else: + arch_subdir = self.pi.target_dir(x64=True) + lib = os.path.join(self.si.WindowsSdkDir, 'lib') + libver = self._get_content_dirname(lib) + return [os.path.join(lib, r'%sum%s' % (libver, arch_subdir))] @property def OSIncludes(self): """ Microsoft Windows SDK Include """ + include = os.path.join(self.si.WindowsSdkDir, 'include') + if self.vcver <= 10.0: - return [ - os.path.join(self.si.WindowsSdkDir, 'Include'), - os.path.join(self.si.WindowsSdkDir, r'Include\gl') - ] - elif self.vcver <= 12.0: - return [ - os.path.join(self.si.WindowsSdkDir, r'include\shared'), - os.path.join(self.si.WindowsSdkDir, r'include\um'), - os.path.join(self.si.WindowsSdkDir, r'include\winrt') - ] + return [include, os.path.join(include, 'gl')] + + else: + if self.vcver >= 14.0: + sdkver = self._get_content_dirname(include) + else: + sdkver = '' + return [os.path.join(include, '%sshared' % sdkver), + os.path.join(include, '%sum' % sdkver), + os.path.join(include, '%swinrt' % sdkver)] + + @property + def OSLibpath(self): + """ + Microsoft Windows SDK Libraries Paths + """ + ref = os.path.join(self.si.WindowsSdkDir, 'References') + libpath = [os.path.join(ref, r'CommonConfiguration\Neutral')] + + if self.vcver >= 14.0: + libpath += [ref, + os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), + os.path.join(ref, r'Windows.Foundation.' + r'UniversalApiContract\1.0.0.0'), + os.path.join(ref, r'Windows.Foundation.' + r'FoundationContract\1.0.0.0'), + os.path.join(ref, r'Windows.Networking.Connectivity.' + r'WwanContract\1.0.0.0'), + os.path.join(self.si.WindowsSdkDir, r'ExtensionSDKs' + r'\Microsoft.VCLibs\%0.1f\References' + r'\CommonConfiguration\neutral' % + self.vcver)] + return libpath @property def SdkTools(self): """ Microsoft Windows SDK Tools """ - if self.vcver <= 11.0: - tools = [os.path.join(self.si.WindowsSdkDir, 'Bin')] - else: - tools = [os.path.join(self.si.WindowsSdkDir, r'Bin\x86')] + tools = [os.path.join(self.si.WindowsSdkDir, + 'Bin' if self.vcver <= 11.0 else r'Bin\x86')] + if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] + if self.vcver == 10.0 or self.vcver == 11.0: if self.pi.target_is_x86(): arch_subdir = '' @@ -762,6 +900,10 @@ def SdkTools(self): arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] + + if self.si.WindowsSDKExecutablePath: + tools += [self.si.WindowsSDKExecutablePath] + return tools @property @@ -778,23 +920,21 @@ def FxTools(self): """ pi = self.pi si = self.si + if self.vcver <= 10.0: include32 = True include64 = not pi.target_is_x86() and not pi.current_is_x86() else: include32 = pi.target_is_x86() or pi.current_is_x86() include64 = pi.current_cpu == 'amd64' or pi.target_cpu == 'amd64' + tools = [] if include32: - tools += [ - os.path.join(si.FrameworkDir32, ver) - for ver in si.FrameworkVersion32 - ] + tools += [os.path.join(si.FrameworkDir32, ver) + for ver in si.FrameworkVersion32] if include64: - tools += [ - os.path.join(si.FrameworkDir64, ver) - for ver in si.FrameworkVersion64 - ] + tools += [os.path.join(si.FrameworkDir64, ver) + for ver in si.FrameworkVersion64] return tools @property @@ -802,17 +942,22 @@ def NetFxSDKLibraries(self): """ Microsoft .Net Framework SDK Libraries """ - if self.vcver < 14.0: + if self.vcver < 14.0 or not self.si.NetFxSdkDir: return [] + arch_subdir = self.pi.target_dir(x64=True) + return [os.path.join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)] + @property def NetFxSDKIncludes(self): """ Microsoft .Net Framework SDK Includes """ - if self.vcver < 14.0: + if self.vcver < 14.0 or not self.si.NetFxSdkDir: return [] + return [os.path.join(self.si.NetFxSdkDir, r'include\um')] + @property def VsTDb(self): """ @@ -827,24 +972,22 @@ def MSBuild(self): """ if self.vcver < 12.0: return [] + arch_subdir = self.pi.current_dir(hidex86=True) path = r'\MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) - return [ - os.path.join(self.si.ProgramFilesx86, path), - os.path.join(self.si.ProgramFiles, path) - ] + return [os.path.join(self.si.ProgramFilesx86, path), + os.path.join(self.si.ProgramFiles, path)] @property - def HTMLWs(self): + def HTMLHelpWorkshop(self): """ Microsoft HTML Help Workshop """ if self.vcver < 11.0: return [] - return [ - os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), - os.path.join(self.si.ProgramFiles, 'HTML Help Workshop') - ] + + return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), + os.path.join(self.si.ProgramFiles, 'HTML Help Workshop')] @property def UCRTLibraries(self): @@ -854,6 +997,11 @@ def UCRTLibraries(self): if self.vcver < 14.0: return [] + arch_subdir = self.pi.target_dir(x64=True) + lib = os.path.join(self.si.UniversalCRTSdkDir, 'lib') + ucrtver = self._get_content_dirname(lib) + return [os.path.join(lib, '%sucrt%s' % (ucrtver, arch_subdir))] + @property def UCRTIncludes(self): """ @@ -862,6 +1010,10 @@ def UCRTIncludes(self): if self.vcver < 14.0: return [] + include = os.path.join(self.si.UniversalCRTSdkDir, 'include') + ucrtver = self._get_content_dirname(include) + return [os.path.join(include, '%sucrt' % ucrtver)] + @property def FSharp(self): """ @@ -869,6 +1021,7 @@ def FSharp(self): """ if self.vcver < 11.0 and self.vcver > 12.0: return [] + return self.si.FSharpInstallDir @property @@ -900,7 +1053,8 @@ def return_env(self): libpath=self._build_paths('libpath', [self.VCLibraries, self.FxTools, - self.VCStoreRefs]), + self.VCStoreRefs, + self.OSLibpath]), path=self._build_paths('path', [self.VCTools, self.VSTools, @@ -909,7 +1063,7 @@ def return_env(self): self.SdkSetup, self.FxTools, self.MSBuild, - self.HTMLWs, + self.HTMLHelpWorkshop, self.FSharp]), ) if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist): @@ -940,9 +1094,11 @@ def _unique_everseen(self, iterable, key=None): """ List unique elements, preserving order. Remember all elements ever seen. + + _unique_everseen('AAAABBBCCDAABBB') --> A B C D + + _unique_everseen('ABBCcAD', str.lower) --> A B C D """ - # unique_everseen('AAAABBBCCDAABBB') --> A B C D - # unique_everseen('ABBCcAD', str.lower) --> A B C D seen = set() seen_add = seen.add filterfalse = six.moves.filterfalse @@ -956,3 +1112,24 @@ def _unique_everseen(self, iterable, key=None): if k not in seen: seen_add(k) yield element + + def _get_content_dirname(self, path): + """ + Return name of the first dir in path or '' if no dir found. + + Parameters + ---------- + path: str + Path where search dir. + + Return + ------ + foldername: str + "name\" or "" + """ + try: + name = os.listdir(path) + if name: + return '%s\\' % name[0] + except FileNotFoundError: + return '' From d8587a79301f6eba5334f9e365188b9a9af1d2ac Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 17 Apr 2016 18:46:24 +0200 Subject: [PATCH 5691/8469] Update msvc9_support.py --- setuptools/msvc9_support.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 860ab9f51c..38acc43f45 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -1131,5 +1131,6 @@ def _get_content_dirname(self, path): name = os.listdir(path) if name: return '%s\\' % name[0] + return '' except FileNotFoundError: return '' From df05ebf3e88858ae7ac74071bd20c86782e1415d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 18 Apr 2016 15:08:49 -0400 Subject: [PATCH 5692/8469] Preserve order of egg_info section in setup.cfg egg_info is the dictionary with information that is injected into setup.cfg. edit_config uses RawConfigParser which uses collections.OrderedDict for all the data. When we use a simple dict(), when we loop through items in edit_config, we see random behavior as a result the fields tag_svn_revision/tag_date/tag_build are added to the setup.cfg randomly. So if we sort the items by key when we traverse items we will get deterministic output as RawConfigParser uses OrderedDict internally by default. --- setuptools/command/setopt.py | 7 +++- setuptools/tests/test_egg_info.py | 62 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 7f332be5a4..912da78254 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -2,6 +2,7 @@ from distutils import log from distutils.errors import DistutilsOptionError import distutils +import operator import os from setuptools.extern.six.moves import configparser @@ -42,7 +43,8 @@ def edit_config(filename, settings, dry_run=False): log.debug("Reading configuration from %s", filename) opts = configparser.RawConfigParser() opts.read([filename]) - for section, options in settings.items(): + for section, options in sorted(settings.items(), + key=operator.itemgetter(0)): if options is None: log.info("Deleting section [%s] from %s", section, filename) opts.remove_section(section) @@ -50,7 +52,8 @@ def edit_config(filename, settings, dry_run=False): if not opts.has_section(section): log.debug("Adding new section [%s] to %s", section, filename) opts.add_section(section) - for option, value in options.items(): + for option, value in sorted(options.items(), + key=operator.itemgetter(0)): if value is None: log.debug( "Deleting %s.%s from %s", diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index fd5f26fc2d..d37b127e77 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,7 +1,16 @@ import os import glob +import re import stat +import sys +try: + from unittest import mock +except ImportError: + import mock + +from setuptools.command.egg_info import egg_info +from setuptools.dist import Distribution from setuptools.extern.six.moves import map import pytest @@ -59,6 +68,59 @@ def env(self): }) yield env + def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): + setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') + build_files({ + setup_cfg: DALS(""" + [egg_info] + """), + }) + dist = Distribution() + ei = egg_info(dist) + ei.initialize_options() + ei.save_version_info(setup_cfg) + + with open(setup_cfg, 'r') as f: + content = f.read() + + assert '[egg_info]' in content + assert 'tag_build =' in content + assert 'tag_date = 0' in content + assert 'tag_svn_revision = 0' in content + + if sys.version_info[0:2] >= (2, 7): + assert re.search('tag_build.*tag_date.*tag_svn_revision', + content, + re.MULTILINE | re.DOTALL) is not None + + def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): + setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') + build_files({ + setup_cfg: DALS(""" + [egg_info] + tag_build = + tag_date = 0 + tag_svn_revision = 0 + """), + }) + dist = Distribution() + ei = egg_info(dist) + ei.initialize_options() + ei.save_version_info(setup_cfg) + + with open(setup_cfg, 'r') as f: + content = f.read() + + assert '[egg_info]' in content + assert 'tag_build =' in content + assert 'tag_date = 0' in content + assert 'tag_svn_revision = 0' in content + + if sys.version_info[0:2] >= (2, 7): + assert re.search('tag_build.*tag_date.*tag_svn_revision', + content, + re.MULTILINE | re.DOTALL) is not None + def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() From 085247fa441f9b0fac05117ca1a3283e3510fb32 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:25:21 -0400 Subject: [PATCH 5693/8469] Use OrderedDict to retain deterministic ordering of version info in egg_info command. Remove lexicographic ordering in setopt.edit_config. Ref #553 --- setuptools/command/egg_info.py | 23 +++++++++++++++-------- setuptools/command/setopt.py | 7 ++----- setuptools/tests/test_egg_info.py | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index d1bd9b0406..3c033300e8 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -13,6 +13,7 @@ import io import warnings import time +import collections from setuptools.extern import six from setuptools.extern.six.moves import map @@ -66,14 +67,20 @@ def initialize_options(self): self.vtags = None def save_version_info(self, filename): - values = dict( - egg_info=dict( - tag_svn_revision=0, - tag_date=0, - tag_build=self.tags(), - ) - ) - edit_config(filename, values) + """ + Materialize the values of svn_revision and date into the + build tag. Install these keys in a deterministic order + to avoid arbitrary reordering on subsequent builds. + """ + # python 2.6 compatibility + odict = getattr(collections, 'OrderedDict', dict) + egg_info = odict() + # follow the order these keys would have been added + # when PYTHONHASHSEED=0 + egg_info['tag_date'] = 0 + egg_info['tag_svn_revision'] = 0 + egg_info['tag_build'] = self.tags() + edit_config(filename, dict(egg_info=egg_info)) def finalize_options(self): self.egg_name = safe_name(self.distribution.get_name()) diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 912da78254..7f332be5a4 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -2,7 +2,6 @@ from distutils import log from distutils.errors import DistutilsOptionError import distutils -import operator import os from setuptools.extern.six.moves import configparser @@ -43,8 +42,7 @@ def edit_config(filename, settings, dry_run=False): log.debug("Reading configuration from %s", filename) opts = configparser.RawConfigParser() opts.read([filename]) - for section, options in sorted(settings.items(), - key=operator.itemgetter(0)): + for section, options in settings.items(): if options is None: log.info("Deleting section [%s] from %s", section, filename) opts.remove_section(section) @@ -52,8 +50,7 @@ def edit_config(filename, settings, dry_run=False): if not opts.has_section(section): log.debug("Adding new section [%s] to %s", section, filename) opts.add_section(section) - for option, value in sorted(options.items(), - key=operator.itemgetter(0)): + for option, value in options.items(): if value is None: log.debug( "Deleting %s.%s from %s", diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index d37b127e77..7e7dd4a974 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -89,7 +89,7 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): assert 'tag_svn_revision = 0' in content if sys.version_info[0:2] >= (2, 7): - assert re.search('tag_build.*tag_date.*tag_svn_revision', + assert re.search('tag_date.*tag_svn_revision.*tag_build', content, re.MULTILINE | re.DOTALL) is not None From d1f96eed5e4a7e2346521a4666cb2678c155634e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:25:42 -0400 Subject: [PATCH 5694/8469] Remove unused import --- setuptools/tests/test_egg_info.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7e7dd4a974..ec000126a7 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -4,11 +4,6 @@ import stat import sys -try: - from unittest import mock -except ImportError: - import mock - from setuptools.command.egg_info import egg_info from setuptools.dist import Distribution from setuptools.extern.six.moves import map From 90fb7be170b825f1db84c338829806144838cdc8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:26:45 -0400 Subject: [PATCH 5695/8469] Dedent --- setuptools/tests/test_egg_info.py | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index ec000126a7..1e447b08c6 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -78,15 +78,15 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): with open(setup_cfg, 'r') as f: content = f.read() - assert '[egg_info]' in content - assert 'tag_build =' in content - assert 'tag_date = 0' in content - assert 'tag_svn_revision = 0' in content + assert '[egg_info]' in content + assert 'tag_build =' in content + assert 'tag_date = 0' in content + assert 'tag_svn_revision = 0' in content - if sys.version_info[0:2] >= (2, 7): - assert re.search('tag_date.*tag_svn_revision.*tag_build', - content, - re.MULTILINE | re.DOTALL) is not None + if sys.version_info[0:2] >= (2, 7): + assert re.search('tag_date.*tag_svn_revision.*tag_build', + content, + re.MULTILINE | re.DOTALL) is not None def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') @@ -106,15 +106,15 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): with open(setup_cfg, 'r') as f: content = f.read() - assert '[egg_info]' in content - assert 'tag_build =' in content - assert 'tag_date = 0' in content - assert 'tag_svn_revision = 0' in content + assert '[egg_info]' in content + assert 'tag_build =' in content + assert 'tag_date = 0' in content + assert 'tag_svn_revision = 0' in content - if sys.version_info[0:2] >= (2, 7): - assert re.search('tag_build.*tag_date.*tag_svn_revision', - content, - re.MULTILINE | re.DOTALL) is not None + if sys.version_info[0:2] >= (2, 7): + assert re.search('tag_build.*tag_date.*tag_svn_revision', + content, + re.MULTILINE | re.DOTALL) is not None def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() From c4d546e69bf43a57d13be83a4fe5119af8704388 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:28:12 -0400 Subject: [PATCH 5696/8469] Remove superfluous slice --- setuptools/tests/test_egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1e447b08c6..7f52fe22b5 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -83,7 +83,7 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): assert 'tag_date = 0' in content assert 'tag_svn_revision = 0' in content - if sys.version_info[0:2] >= (2, 7): + if sys.version_info >= (2, 7): assert re.search('tag_date.*tag_svn_revision.*tag_build', content, re.MULTILINE | re.DOTALL) is not None @@ -111,7 +111,7 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): assert 'tag_date = 0' in content assert 'tag_svn_revision = 0' in content - if sys.version_info[0:2] >= (2, 7): + if sys.version_info >= (2, 7): assert re.search('tag_build.*tag_date.*tag_svn_revision', content, re.MULTILINE | re.DOTALL) is not None From 46b76edc1e451276e1fb9e31c90c311898486de3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:32:34 -0400 Subject: [PATCH 5697/8469] Extract method for validating the order. --- setuptools/tests/test_egg_info.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7f52fe22b5..efe61eea6b 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -83,10 +83,18 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): assert 'tag_date = 0' in content assert 'tag_svn_revision = 0' in content - if sys.version_info >= (2, 7): - assert re.search('tag_date.*tag_svn_revision.*tag_build', - content, - re.MULTILINE | re.DOTALL) is not None + expected_order = 'tag_date', 'tag_svn_revision', 'tag_build' + self._validate_content_order(content, expected_order) + + @staticmethod + def _validate_content_order(content, expected_order): + if sys.version_info < (2, 7): + # order cannot be guaranteed on Python 2.6 + return + + pattern = '.*'.join(expected_order) + flags = re.MULTILINE | re.DOTALL + assert re.search(pattern, content, flags) def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') @@ -111,10 +119,8 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): assert 'tag_date = 0' in content assert 'tag_svn_revision = 0' in content - if sys.version_info >= (2, 7): - assert re.search('tag_build.*tag_date.*tag_svn_revision', - content, - re.MULTILINE | re.DOTALL) is not None + expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' + self._validate_content_order(content, expected_order) def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): self._create_project() From 66932720c96591ea74015844d713cd5724f4e8af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:47:13 -0400 Subject: [PATCH 5698/8469] Move Python 2.6 exception into specific test, capturing that the expected order is different on Python 2.6, not because of the lack of OrderedDict, but because of different behavior in RawConfigParser. Ref #553. --- setuptools/tests/test_egg_info.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index efe61eea6b..76569c3080 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -87,12 +87,12 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): self._validate_content_order(content, expected_order) @staticmethod - def _validate_content_order(content, expected_order): - if sys.version_info < (2, 7): - # order cannot be guaranteed on Python 2.6 - return - - pattern = '.*'.join(expected_order) + def _validate_content_order(content, expected): + """ + Assert that the strings in expected appear in content + in order. + """ + pattern = '.*'.join(expected) flags = re.MULTILINE | re.DOTALL assert re.search(pattern, content, flags) @@ -120,6 +120,12 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): assert 'tag_svn_revision = 0' in content expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' + + if sys.version_info < (2, 7): + # On Python 2.6, config gets overridden, retaining order + # from the dict. + expected_order = dict.fromkeys(expected_order).keys() + self._validate_content_order(content, expected_order) def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): From 25b2a2d2d586fa80df71e73adb98ab472d97eb10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:48:39 -0400 Subject: [PATCH 5699/8469] It's not necessary to build a file with an empty egg_info. --- setuptools/tests/test_egg_info.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 76569c3080..7b4f708f53 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -65,11 +65,6 @@ def env(self): def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') - build_files({ - setup_cfg: DALS(""" - [egg_info] - """), - }) dist = Distribution() ei = egg_info(dist) ei.initialize_options() From ae8574c0652f2f25c84521dd26af0688f9882fa2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:52:13 -0400 Subject: [PATCH 5700/8469] Add docstrings explaining the intention of the test. Ref #553. --- setuptools/tests/test_egg_info.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7b4f708f53..8fbf132354 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -64,6 +64,12 @@ def env(self): yield env def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): + """ + When the egg_info section is empty or not present, running + save_version_info should add the settings to the setup.cfg + in a deterministic order, consistent with the ordering found + on Python 2.6 and 2.7 with PYTHONHASHSEED=0. + """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') dist = Distribution() ei = egg_info(dist) @@ -92,6 +98,13 @@ def _validate_content_order(content, expected): assert re.search(pattern, content, flags) def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): + """ + When running save_version_info on an existing setup.cfg + with the 'default' values present from a previous run, + the file should remain unchanged, except on Python 2.6, + where the order of the keys will be changed to match the + order as found in a dictionary of those keys. + """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') build_files({ setup_cfg: DALS(""" From 7ec2dd5ec7eb6ff7c2bc7f4aedd21a73c5d399a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 09:55:04 -0400 Subject: [PATCH 5701/8469] Update changelog. Closes #553. --- CHANGES.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7d3ce2fce6..e0e3828dde 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v20.10.0 +-------- + +* #553: egg_info section is now generated in a + deterministic order, matching the order generated + by earlier versions of Python. Except on Python 2.6, + order is preserved when existing settings are present. + v20.9.0 ------- From 3ea245437c2094a5eae415732c7b349606fd111f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 10:16:37 -0400 Subject: [PATCH 5702/8469] Correction for expected dict order when PYTHONHASHSEED=0 --- setuptools/command/egg_info.py | 2 +- setuptools/tests/test_egg_info.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 3c033300e8..8e1502a5ff 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -77,9 +77,9 @@ def save_version_info(self, filename): egg_info = odict() # follow the order these keys would have been added # when PYTHONHASHSEED=0 + egg_info['tag_build'] = self.tags() egg_info['tag_date'] = 0 egg_info['tag_svn_revision'] = 0 - egg_info['tag_build'] = self.tags() edit_config(filename, dict(egg_info=egg_info)) def finalize_options(self): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 8fbf132354..3a0db58f9d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -84,7 +84,8 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): assert 'tag_date = 0' in content assert 'tag_svn_revision = 0' in content - expected_order = 'tag_date', 'tag_svn_revision', 'tag_build' + expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' + self._validate_content_order(content, expected_order) @staticmethod @@ -93,6 +94,10 @@ def _validate_content_order(content, expected): Assert that the strings in expected appear in content in order. """ + if sys.version_info < (2, 7): + # On Python 2.6, expect dict key order. + expected = dict.fromkeys(expected).keys() + pattern = '.*'.join(expected) flags = re.MULTILINE | re.DOTALL assert re.search(pattern, content, flags) @@ -129,11 +134,6 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' - if sys.version_info < (2, 7): - # On Python 2.6, config gets overridden, retaining order - # from the dict. - expected_order = dict.fromkeys(expected_order).keys() - self._validate_content_order(content, expected_order) def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): From 5cc432e39c4e8689d117ccc9001d03e47ac5a902 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Apr 2016 10:25:09 -0400 Subject: [PATCH 5703/8469] Support pypy3 also --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fdb4d5530c..0cb6263acc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,6 @@ python: - 3.5 - pypy - pypy3 -matrix: - allow_failures: - - python: pypy3 env: - "" - LC_ALL=C LC_CTYPE=C From f9e6b8fd2d46a2a4efabffaf51151652ef06e55b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Fri, 22 Apr 2016 07:52:42 +0200 Subject: [PATCH 5704/8469] Fix six import --- setuptools/msvc9_support.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 38acc43f45..58e34204fc 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -4,8 +4,7 @@ import os import itertools import distutils.errors -import six -import six.moves.winreg as winreg +from setuptools.extern.six.moves import winreg, filterfalse try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) @@ -1101,7 +1100,6 @@ def _unique_everseen(self, iterable, key=None): """ seen = set() seen_add = seen.add - filterfalse = six.moves.filterfalse if key is None: for element in filterfalse(seen.__contains__, iterable): seen_add(element) From 6c9c3c7e4d53394149c82637f18c0e55d4baca65 Mon Sep 17 00:00:00 2001 From: Brooks Kindle Date: Sat, 23 Apr 2016 11:01:39 -0700 Subject: [PATCH 5705/8469] Prompt for password on upload. The upload command wasn't prompting for a password. If there was no password specified in ~/.pypirc, the upload command, python setup.py sdist upload would fail and raise a TypeError. The workaround for this was to use python setup.py sdist register upload since the register command does prompt for a password. This commit ensures that the upload command prompts for a password if not given one by ~/.pypirc or the register command. --- setuptools/command/upload.py | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 08c20ba868..43c0b0d7ef 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -3,13 +3,18 @@ class upload(orig.upload): """ - Override default upload behavior to look up password - in the keyring if available. + Override default upload behavior to obtain password + in a variety of different ways. """ def finalize_options(self): orig.upload.finalize_options(self) - self.password or self._load_password_from_keyring() + # Attempt to obtain password. Short circuit evaluation at the first + # sign of success. + self.password = ( + self.password or self._load_password_from_keyring() or + self._prompt_for_password() + ) def _load_password_from_keyring(self): """ @@ -17,7 +22,22 @@ def _load_password_from_keyring(self): """ try: keyring = __import__('keyring') - self.password = keyring.get_password(self.repository, - self.username) + password = keyring.get_password(self.repository, self.username) except Exception: - pass + password = None + finally: + return password + + def _prompt_for_password(self): + """ + Prompt for a password on the tty. Suppress Exceptions. + """ + password = None + try: + import getpass + while not password: + password = getpass.getpass() + except (Exception, KeyboardInterrupt): + password = None + finally: + return password From fc2afb512cd077a64b008470e213e624495d6efe Mon Sep 17 00:00:00 2001 From: Geoffrey Sneddon Date: Sat, 23 Apr 2016 23:44:24 +0100 Subject: [PATCH 5706/8469] Update packaging to 16.7 This adds support for the deprecated python_implementation marker which was an undocumented setuptools marker prior to 20.2 in addition to the newer markers. --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/markers.py | 11 ++++++++++- pkg_resources/_vendor/vendored.txt | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index baa907556c..c21a758b82 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,7 +12,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.6" +__version__ = "16.7" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index bac852df23..c5d29cd99a 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -78,9 +78,18 @@ class Value(Node): L("platform.version") | # PEP-345 L("platform.machine") | # PEP-345 L("platform.python_implementation") | # PEP-345 + L("python_implementation") | # undocumented setuptools legacy L("extra") ) -VARIABLE.setParseAction(lambda s, l, t: Variable(t[0].replace('.', '_'))) +ALIASES = { + 'os.name': 'os_name', + 'sys.platform': 'sys_platform', + 'platform.version': 'platform_version', + 'platform.machine': 'platform_machine', + 'platform.python_implementation': 'platform_python_implementation', + 'python_implementation': 'platform_python_implementation' +} +VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) VERSION_CMP = ( L("===") | diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 1d03759ff0..46532c0a34 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ -packaging==16.6 +packaging==16.7 pyparsing==2.0.6 six==1.10.0 From 39b80901d20354b093e8220c137ce971c35c20c5 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sun, 24 Apr 2016 01:55:09 +0300 Subject: [PATCH 5707/8469] Issue #26089: Remove duplicate field 'license' from DistributionMetadata It was renamed to 'license' in 178d19cff163. Patch by Augustin Laville. --- dist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dist.py b/dist.py index ffb33ff645..62a24516cf 100644 --- a/dist.py +++ b/dist.py @@ -1018,8 +1018,7 @@ class DistributionMetadata: "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", - "contact_email", "license", "classifiers", - "download_url", + "contact_email", "classifiers", "download_url", # PEP 314 "provides", "requires", "obsoletes", ) From 95f6afb74ad25d2b616ed44499035595fe945fc5 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 24 Apr 2016 13:25:01 +0300 Subject: [PATCH 5708/8469] Issue #23277: Remove more unused sys and os imports. --- tests/test_clean.py | 1 - tests/test_config.py | 1 - tests/test_install_data.py | 1 - tests/test_install_headers.py | 1 - tests/test_unixccompiler.py | 1 - 5 files changed, 5 deletions(-) diff --git a/tests/test_clean.py b/tests/test_clean.py index b64f300a04..df88ec1e34 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -1,5 +1,4 @@ """Tests for distutils.command.clean.""" -import sys import os import unittest import getpass diff --git a/tests/test_config.py b/tests/test_config.py index 4de825a81e..0929f8a47d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,5 +1,4 @@ """Tests for distutils.pypirc.pypirc.""" -import sys import os import unittest import tempfile diff --git a/tests/test_install_data.py b/tests/test_install_data.py index 4d8c00acb9..d73624d00b 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -1,5 +1,4 @@ """Tests for distutils.command.install_data.""" -import sys import os import unittest import getpass diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index d953157bb7..d9ed6b7fd2 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -1,5 +1,4 @@ """Tests for distutils.command.install_headers.""" -import sys import os import unittest import getpass diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 3d14e12aa9..7c95be56d3 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,5 +1,4 @@ """Tests for distutils.unixccompiler.""" -import os import sys import unittest from test.support import EnvironmentVarGuard, run_unittest From 905adfca47183d923e35135c4795a3b0439c6104 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 24 Apr 2016 21:41:02 +0300 Subject: [PATCH 5709/8469] Issue #23277: Remove unused imports in tests. --- tests/test_bdist_rpm.py | 4 ---- tests/test_build_ext.py | 1 - tests/test_clean.py | 1 - tests/test_config.py | 1 - tests/test_cygwinccompiler.py | 3 +-- tests/test_dep_util.py | 1 - tests/test_file_util.py | 1 - tests/test_install_data.py | 1 - tests/test_install_headers.py | 1 - tests/test_spawn.py | 5 ++--- 10 files changed, 3 insertions(+), 16 deletions(-) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 25c14abd32..c1a2a041ee 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -3,16 +3,12 @@ import unittest import sys import os -import tempfile -import shutil from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support from distutils.spawn import find_executable -from distutils import spawn -from distutils.errors import DistutilsExecError SETUP_PY = """\ from distutils.core import setup diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 366ffbec9f..3d84f8b1d7 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -166,7 +166,6 @@ def test_finalize_options(self): cmd = self.build_ext(dist) cmd.finalize_options() - from distutils import sysconfig py_include = sysconfig.get_python_inc() self.assertIn(py_include, cmd.include_dirs) diff --git a/tests/test_clean.py b/tests/test_clean.py index df88ec1e34..c605afd860 100644 --- a/tests/test_clean.py +++ b/tests/test_clean.py @@ -1,7 +1,6 @@ """Tests for distutils.command.clean.""" import os import unittest -import getpass from distutils.command.clean import clean from distutils.tests import support diff --git a/tests/test_config.py b/tests/test_config.py index 0929f8a47d..d91dedd3a8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,7 +1,6 @@ """Tests for distutils.pypirc.pypirc.""" import os import unittest -import tempfile from distutils.core import PyPIRCCommand from distutils.core import Distribution diff --git a/tests/test_cygwinccompiler.py b/tests/test_cygwinccompiler.py index 856921679d..9dc869de4c 100644 --- a/tests/test_cygwinccompiler.py +++ b/tests/test_cygwinccompiler.py @@ -3,11 +3,10 @@ import sys import os from io import BytesIO -import subprocess from test.support import run_unittest from distutils import cygwinccompiler -from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, +from distutils.cygwinccompiler import (check_config_h, CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN, get_versions, get_msvcr) diff --git a/tests/test_dep_util.py b/tests/test_dep_util.py index 3e1c366892..c6fae39cfb 100644 --- a/tests/test_dep_util.py +++ b/tests/test_dep_util.py @@ -1,7 +1,6 @@ """Tests for distutils.dep_util.""" import unittest import os -import time from distutils.dep_util import newer, newer_pairwise, newer_group from distutils.errors import DistutilsFileError diff --git a/tests/test_file_util.py b/tests/test_file_util.py index a6d04f065d..03040afc79 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -1,7 +1,6 @@ """Tests for distutils.file_util.""" import unittest import os -import shutil import errno from unittest.mock import patch diff --git a/tests/test_install_data.py b/tests/test_install_data.py index d73624d00b..32ab296a32 100644 --- a/tests/test_install_data.py +++ b/tests/test_install_data.py @@ -1,7 +1,6 @@ """Tests for distutils.command.install_data.""" import os import unittest -import getpass from distutils.command.install_data import install_data from distutils.tests import support diff --git a/tests/test_install_headers.py b/tests/test_install_headers.py index d9ed6b7fd2..2217b321e6 100644 --- a/tests/test_install_headers.py +++ b/tests/test_install_headers.py @@ -1,7 +1,6 @@ """Tests for distutils.command.install_headers.""" import os import unittest -import getpass from distutils.command.install_headers import install_headers from distutils.tests import support diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 6c7eb20c47..f507ef7750 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -1,11 +1,10 @@ """Tests for distutils.spawn.""" import unittest import os -import time -from test.support import captured_stdout, run_unittest +from test.support import run_unittest from distutils.spawn import _nt_quote_args -from distutils.spawn import spawn, find_executable +from distutils.spawn import spawn from distutils.errors import DistutilsExecError from distutils.tests import support From 1746f3caf7a6a71c04f79da2b89c888cb5daadec Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 25 Apr 2016 00:12:32 +0300 Subject: [PATCH 5710/8469] Removed unused imports. --- command/config.py | 2 +- command/register.py | 2 +- command/sdist.py | 1 - extension.py | 1 - text_file.py | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/command/config.py b/command/config.py index 847e858160..b1fd09e016 100644 --- a/command/config.py +++ b/command/config.py @@ -9,7 +9,7 @@ this header file lives". """ -import sys, os, re +import os, re from distutils.core import Command from distutils.errors import DistutilsExecError diff --git a/command/register.py b/command/register.py index b49f86fe58..a3e0893a0b 100644 --- a/command/register.py +++ b/command/register.py @@ -5,7 +5,7 @@ # created 2002/10/21, Richard Jones -import os, string, getpass +import getpass import io import urllib.parse, urllib.request from warnings import warn diff --git a/command/sdist.py b/command/sdist.py index 7ea3d5fa27..35a06eb09b 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -3,7 +3,6 @@ Implements the Distutils 'sdist' command (create a source distribution).""" import os -import string import sys from types import * from glob import glob diff --git a/extension.py b/extension.py index 7efbb74f89..c507da360a 100644 --- a/extension.py +++ b/extension.py @@ -4,7 +4,6 @@ modules in setup scripts.""" import os -import sys import warnings # This class is really only used by the "build_ext" command, so it might diff --git a/text_file.py b/text_file.py index 478336f0d2..93abad38f4 100644 --- a/text_file.py +++ b/text_file.py @@ -4,7 +4,7 @@ that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" -import sys, os, io +import sys, io class TextFile: From 89509b570ffeed71361942b5f13fb07b1e6abf6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:09:49 -0500 Subject: [PATCH 5711/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e0e3828dde..aee09f1460 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,8 @@ v20.10.0 deterministic order, matching the order generated by earlier versions of Python. Except on Python 2.6, order is preserved when existing settings are present. +* #556: Update to Packaging 16.7, restoring support + for deprecated ``python_implmentation`` marker. v20.9.0 ------- From b663992a4864dffd1ee29e2c7d735c795acfd4a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:18:14 -0500 Subject: [PATCH 5712/8469] Update changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index aee09f1460..be3d2ca493 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ v20.10.0 order is preserved when existing settings are present. * #556: Update to Packaging 16.7, restoring support for deprecated ``python_implmentation`` marker. +* #555: Upload command now prompts for a password + when uploading to PyPI (or other repository) if no + password is present in .pypirc or in the keyring. v20.9.0 ------- From 9b53df4becddd3efe5d8a2f15273ca6ce9fdb843 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:19:28 -0500 Subject: [PATCH 5713/8469] Move import to header --- setuptools/command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 43c0b0d7ef..0e8bbea382 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -1,3 +1,4 @@ +import getpass from distutils.command import upload as orig @@ -34,7 +35,6 @@ def _prompt_for_password(self): """ password = None try: - import getpass while not password: password = getpass.getpass() except (Exception, KeyboardInterrupt): From a3b119e14df4aff213231492470587f88457a241 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:20:51 -0500 Subject: [PATCH 5714/8469] Add carriage return for symmetry --- setuptools/command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 0e8bbea382..a001d461a4 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -13,7 +13,8 @@ def finalize_options(self): # Attempt to obtain password. Short circuit evaluation at the first # sign of success. self.password = ( - self.password or self._load_password_from_keyring() or + self.password or + self._load_password_from_keyring() or self._prompt_for_password() ) From c105d6f18a5a17b0a47fda5a2df2f8f47352b037 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:25:33 -0500 Subject: [PATCH 5715/8469] Simplify logic by eliminating retries in password prompt and returning results directly. --- setuptools/command/upload.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index a001d461a4..484baa5a53 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -24,21 +24,15 @@ def _load_password_from_keyring(self): """ try: keyring = __import__('keyring') - password = keyring.get_password(self.repository, self.username) + return keyring.get_password(self.repository, self.username) except Exception: - password = None - finally: - return password + pass def _prompt_for_password(self): """ Prompt for a password on the tty. Suppress Exceptions. """ - password = None try: - while not password: - password = getpass.getpass() + return getpass.getpass() except (Exception, KeyboardInterrupt): - password = None - finally: - return password + pass From b97d31d00919dfac4c378d14555e25e24f42a00f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 Apr 2016 23:26:16 -0500 Subject: [PATCH 5716/8469] Added tag v20.10.0 for changeset 98779f519092 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e1c9258e38..ff12f86d96 100644 --- a/.hgtags +++ b/.hgtags @@ -256,3 +256,4 @@ a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 7f56b6f40de39456c78507a14c288709712881cb v20.8.0 8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 +98779f519092c6c766878b38705ef6e70249126c v20.10.0 From 9ad12ecb7c605cafbfa27e5eb6a1990b7afaf3a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Apr 2016 09:15:29 -0500 Subject: [PATCH 5717/8469] =?UTF-8?q?Bump=20version:=2020.9.0=20=E2=86=92?= =?UTF-8?q?=2020.10.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f2b8d25496..676c80b8eb 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.9.0 +current_version = 20.10.0 commit = True tag = True diff --git a/setup.py b/setup.py index a29f0a1708..439f6206d1 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.9.0", + version="20.10.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8910c6e28c248f614d4043d4acb7ca5058b79507 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Apr 2016 09:16:27 -0500 Subject: [PATCH 5718/8469] Added tag v20.10.0 for changeset c72faa468919 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e1c9258e38..1c05264d17 100644 --- a/.hgtags +++ b/.hgtags @@ -256,3 +256,4 @@ a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 7f56b6f40de39456c78507a14c288709712881cb v20.8.0 8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 +c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 From a02ea2f44be9a7d2f1697e5ed962ad82d10a7f72 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Apr 2016 09:24:09 -0500 Subject: [PATCH 5719/8469] Try comparing eq --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0cb6263acc..feeb039fcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ deploy: tags: true all_branches: true python: 3.5 - condition: -z $LC_ALL + condition: $LC_ALL != "C" user: jaraco password: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= From a144fab84b5d49fe8cfa1c504b7af4740f7dfd59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Apr 2016 09:24:38 -0500 Subject: [PATCH 5720/8469] =?UTF-8?q?Bump=20version:=2020.10.0=20=E2=86=92?= =?UTF-8?q?=2020.10.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 676c80b8eb..775dbda27e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.10.0 +current_version = 20.10.1 commit = True tag = True diff --git a/setup.py b/setup.py index 439f6206d1..f72ed3a16a 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.10.0", + version="20.10.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 005cb1dd7e423160a3af26a41281dbf8ea2cd5b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Apr 2016 09:24:39 -0500 Subject: [PATCH 5721/8469] Added tag v20.10.1 for changeset 3b5fdd077c7d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1c05264d17..61bd9da643 100644 --- a/.hgtags +++ b/.hgtags @@ -257,3 +257,4 @@ a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 +3b5fdd077c7d83d02c4979ad69cc0bf199b47587 v20.10.1 From cf470e31326312d68b84b81501b0eb91389042d9 Mon Sep 17 00:00:00 2001 From: Jim Fulton Date: Mon, 25 Apr 2016 15:18:27 -0400 Subject: [PATCH 5722/8469] Fix setuptools url and curl wants --location to follow redirects This change also removes: sys.meta_path = [importer for importer in sys.meta_path if importer.__class__.__module__ != 'pkg_resources.extern'] from _unload_pkg_resources. These lines were removed from the version at: https://bootstrap.pypa.io/ez_setup.py I don't know why the code there and here differs. --- ez_setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index d6f4b78cb7..46184871bd 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -33,7 +33,7 @@ LATEST = object() DEFAULT_VERSION = LATEST -DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" +DEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir @@ -192,8 +192,6 @@ def _conflict_bail(VC_err, version): def _unload_pkg_resources(): - sys.meta_path = [importer for importer in sys.meta_path if - importer.__class__.__module__ != 'pkg_resources.extern'] del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') @@ -253,7 +251,7 @@ def has_powershell(): def download_file_curl(url, target): - cmd = ['curl', url, '--silent', '--output', target] + cmd = ['curl', url, '--location', '--silent', '--output', target] _clean_check(cmd, target) From 3728c541b655efb91a14868d93a38216149e6757 Mon Sep 17 00:00:00 2001 From: Jim Fulton Date: Mon, 25 Apr 2016 16:59:19 -0400 Subject: [PATCH 5723/8469] restore previous fix that was never deployed. --- ez_setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ez_setup.py b/ez_setup.py index 46184871bd..a39054bf98 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -192,6 +192,8 @@ def _conflict_bail(VC_err, version): def _unload_pkg_resources(): + sys.meta_path = [importer for importer in sys.meta_path if + importer.__class__.__module__ != 'pkg_resources.extern'] del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') From e0dcf2ea12f26ed859606bed54fb4b2ede9b0d28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Apr 2016 09:49:23 -0400 Subject: [PATCH 5724/8469] Remove unnecessary mention of Python 2.6, now required. --- ez_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index a39054bf98..f2487fe8b3 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -373,7 +373,7 @@ def _parse_args(): parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, - help='install in user site package (requires Python 2.6 or later)') + help='install in user site package') parser.add_option( '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, From 661440a9248792656455022b6fba51343e58cd50 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Apr 2016 10:00:01 -0400 Subject: [PATCH 5725/8469] Separate clauses onto different lines for clarity and consistency. --- ez_setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ez_setup.py b/ez_setup.py index f2487fe8b3..e3dd140f11 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -192,8 +192,11 @@ def _conflict_bail(VC_err, version): def _unload_pkg_resources(): - sys.meta_path = [importer for importer in sys.meta_path if - importer.__class__.__module__ != 'pkg_resources.extern'] + sys.meta_path = [ + importer + for importer in sys.meta_path + if importer.__class__.__module__ != 'pkg_resources.extern' + ] del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') From a73118b9e3c125910ce3a50ab1e676632b4c12d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 Apr 2016 12:01:09 -0400 Subject: [PATCH 5726/8469] Remove ez_setup.py from master branch (and packaged sdist releases). --- CHANGES.rst | 9 + docs/releases.txt | 19 +-- ez_setup.py | 420 ---------------------------------------------- 3 files changed, 17 insertions(+), 431 deletions(-) delete mode 100644 ez_setup.py diff --git a/CHANGES.rst b/CHANGES.rst index be3d2ca493..c8bfe2d3eb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,15 @@ CHANGES ======= +v21.0.0 +------- + +* Removed ez_setup.py from Setuptools sdist. The + bootstrap script will be maintained in its own + branch and should be generally be retrieved from + its canonical location at + https://bootstrap.pypa.io/ez_setup.py. + v20.10.0 -------- diff --git a/docs/releases.txt b/docs/releases.txt index 3f29334a99..c84ddd75e4 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -10,23 +10,20 @@ successful build of a tagged release per To cut a release, install and run ``bumpversion {part}`` where ``part`` is major, minor, or patch based on the scope of the changes in the release. Then, push the commits to the master branch. If tests pass, -the release will be uploaded to PyPI. +the release will be uploaded to PyPI (from the Python 3.5 tests). -Bootstrap Bookmark ------------------- +Bootstrap Branch +---------------- -Setuptools has a bootstrap script (ez_setup.py) which is hosted in the -repository and must be updated with each release (to bump the default version). -The "published" version of the script is the one indicated by the ``bootstrap`` -branch. +Setuptools has a bootstrap script (ez_setup.py), which is hosted in the +repository in the ``bootstrap`` branch. -Therefore, the latest bootstrap script can be retrieved by checking out the -repository at that bookmark. It's also possible to get the bootstrap script for -any particular release by grabbing the script from that tagged release. +Therefore, the latest bootstrap script can be retrieved by checking out +that branch. The officially-published location of the bootstrap script is hosted on Python infrastructure (#python-infra on freenode) at https://bootstrap.pypa.io and -is updated every fifteen minutes from the bootstrap script. Sometimes, +is updated every fifteen minutes from the bootstrap branch. Sometimes, especially when the bootstrap script is rolled back, this process doesn't work as expected and requires manual intervention. diff --git a/ez_setup.py b/ez_setup.py deleted file mode 100644 index e3dd140f11..0000000000 --- a/ez_setup.py +++ /dev/null @@ -1,420 +0,0 @@ -#!/usr/bin/env python - -""" -Setuptools bootstrapping installer. - -Run this script to install or upgrade setuptools. -""" - -import os -import shutil -import sys -import tempfile -import zipfile -import optparse -import subprocess -import platform -import textwrap -import contextlib -import json -import codecs - -from distutils import log - -try: - from urllib.request import urlopen -except ImportError: - from urllib2 import urlopen - -try: - from site import USER_SITE -except ImportError: - USER_SITE = None - -LATEST = object() -DEFAULT_VERSION = LATEST -DEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/" -DEFAULT_SAVE_DIR = os.curdir - - -def _python_cmd(*args): - """ - Execute a command. - - Return True if the command succeeded. - """ - args = (sys.executable,) + args - return subprocess.call(args) == 0 - - -def _install(archive_filename, install_args=()): - """Install Setuptools.""" - with archive_context(archive_filename): - # installing - log.warn('Installing Setuptools') - if not _python_cmd('setup.py', 'install', *install_args): - log.warn('Something went wrong during the installation.') - log.warn('See the error message above.') - # exitcode will be 2 - return 2 - - -def _build_egg(egg, archive_filename, to_dir): - """Build Setuptools egg.""" - with archive_context(archive_filename): - # building an egg - log.warn('Building a Setuptools egg in %s', to_dir) - _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) - # returning the result - log.warn(egg) - if not os.path.exists(egg): - raise IOError('Could not build the egg.') - - -class ContextualZipFile(zipfile.ZipFile): - - """Supplement ZipFile class to support context manager for Python 2.6.""" - - def __enter__(self): - return self - - def __exit__(self, type, value, traceback): - self.close() - - def __new__(cls, *args, **kwargs): - """Construct a ZipFile or ContextualZipFile as appropriate.""" - if hasattr(zipfile.ZipFile, '__exit__'): - return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls) - - -@contextlib.contextmanager -def archive_context(filename): - """ - Unzip filename to a temporary directory, set to the cwd. - - The unzipped target is cleaned up after. - """ - tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s', tmpdir) - old_wd = os.getcwd() - try: - os.chdir(tmpdir) - with ContextualZipFile(filename) as archive: - archive.extractall() - - # going in the directory - subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) - os.chdir(subdir) - log.warn('Now working in %s', subdir) - yield - - finally: - os.chdir(old_wd) - shutil.rmtree(tmpdir) - - -def _do_download(version, download_base, to_dir, download_delay): - """Download Setuptools.""" - egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' - % (version, sys.version_info[0], sys.version_info[1])) - if not os.path.exists(egg): - archive = download_setuptools(version, download_base, - to_dir, download_delay) - _build_egg(egg, archive, to_dir) - sys.path.insert(0, egg) - - # Remove previously-imported pkg_resources if present (see - # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). - if 'pkg_resources' in sys.modules: - _unload_pkg_resources() - - import setuptools - setuptools.bootstrap_install_from = egg - - -def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=DEFAULT_SAVE_DIR, download_delay=15): - """ - Ensure that a setuptools version is installed. - - Return None. Raise SystemExit if the requested version - or later cannot be installed. - """ - version = _resolve_version(version) - to_dir = os.path.abspath(to_dir) - - # prior to importing, capture the module state for - # representative modules. - rep_modules = 'pkg_resources', 'setuptools' - imported = set(sys.modules).intersection(rep_modules) - - try: - import pkg_resources - pkg_resources.require("setuptools>=" + version) - # a suitable version is already installed - return - except ImportError: - # pkg_resources not available; setuptools is not installed; download - pass - except pkg_resources.DistributionNotFound: - # no version of setuptools was found; allow download - pass - except pkg_resources.VersionConflict as VC_err: - if imported: - _conflict_bail(VC_err, version) - - # otherwise, unload pkg_resources to allow the downloaded version to - # take precedence. - del pkg_resources - _unload_pkg_resources() - - return _do_download(version, download_base, to_dir, download_delay) - - -def _conflict_bail(VC_err, version): - """ - Setuptools was imported prior to invocation, so it is - unsafe to unload it. Bail out. - """ - conflict_tmpl = textwrap.dedent(""" - The required version of setuptools (>={version}) is not available, - and can't be installed while this script is running. Please - install a more recent version first, using - 'easy_install -U setuptools'. - - (Currently using {VC_err.args[0]!r}) - """) - msg = conflict_tmpl.format(**locals()) - sys.stderr.write(msg) - sys.exit(2) - - -def _unload_pkg_resources(): - sys.meta_path = [ - importer - for importer in sys.meta_path - if importer.__class__.__module__ != 'pkg_resources.extern' - ] - del_modules = [ - name for name in sys.modules - if name.startswith('pkg_resources') - ] - for mod_name in del_modules: - del sys.modules[mod_name] - - -def _clean_check(cmd, target): - """ - Run the command to download target. - - If the command fails, clean up before re-raising the error. - """ - try: - subprocess.check_call(cmd) - except subprocess.CalledProcessError: - if os.access(target, os.F_OK): - os.unlink(target) - raise - - -def download_file_powershell(url, target): - """ - Download the file at url to target using Powershell. - - Powershell will validate trust. - Raise an exception if the command cannot complete. - """ - target = os.path.abspath(target) - ps_cmd = ( - "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " - "[System.Net.CredentialCache]::DefaultCredentials; " - '(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")' - % locals() - ) - cmd = [ - 'powershell', - '-Command', - ps_cmd, - ] - _clean_check(cmd, target) - - -def has_powershell(): - """Determine if Powershell is available.""" - if platform.system() != 'Windows': - return False - cmd = ['powershell', '-Command', 'echo test'] - with open(os.path.devnull, 'wb') as devnull: - try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except Exception: - return False - return True -download_file_powershell.viable = has_powershell - - -def download_file_curl(url, target): - cmd = ['curl', url, '--location', '--silent', '--output', target] - _clean_check(cmd, target) - - -def has_curl(): - cmd = ['curl', '--version'] - with open(os.path.devnull, 'wb') as devnull: - try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except Exception: - return False - return True -download_file_curl.viable = has_curl - - -def download_file_wget(url, target): - cmd = ['wget', url, '--quiet', '--output-document', target] - _clean_check(cmd, target) - - -def has_wget(): - cmd = ['wget', '--version'] - with open(os.path.devnull, 'wb') as devnull: - try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except Exception: - return False - return True -download_file_wget.viable = has_wget - - -def download_file_insecure(url, target): - """Use Python to download the file, without connection authentication.""" - src = urlopen(url) - try: - # Read all the data in one block. - data = src.read() - finally: - src.close() - - # Write all the data in one block to avoid creating a partial file. - with open(target, "wb") as dst: - dst.write(data) -download_file_insecure.viable = lambda: True - - -def get_best_downloader(): - downloaders = ( - download_file_powershell, - download_file_curl, - download_file_wget, - download_file_insecure, - ) - viable_downloaders = (dl for dl in downloaders if dl.viable()) - return next(viable_downloaders, None) - - -def download_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=DEFAULT_SAVE_DIR, delay=15, - downloader_factory=get_best_downloader): - """ - Download setuptools from a specified location and return its filename. - - `version` should be a valid setuptools version number that is available - as an sdist for download under the `download_base` URL (which should end - with a '/'). `to_dir` is the directory where the egg will be downloaded. - `delay` is the number of seconds to pause before an actual download - attempt. - - ``downloader_factory`` should be a function taking no arguments and - returning a function for downloading a URL to a target. - """ - version = _resolve_version(version) - # making sure we use the absolute path - to_dir = os.path.abspath(to_dir) - zip_name = "setuptools-%s.zip" % version - url = download_base + zip_name - saveto = os.path.join(to_dir, zip_name) - if not os.path.exists(saveto): # Avoid repeated downloads - log.warn("Downloading %s", url) - downloader = downloader_factory() - downloader(url, saveto) - return os.path.realpath(saveto) - - -def _resolve_version(version): - """ - Resolve LATEST version - """ - if version is not LATEST: - return version - - resp = urlopen('https://pypi.python.org/pypi/setuptools/json') - with contextlib.closing(resp): - try: - charset = resp.info().get_content_charset() - except Exception: - # Python 2 compat; assume UTF-8 - charset = 'UTF-8' - reader = codecs.getreader(charset) - doc = json.load(reader(resp)) - - return str(doc['info']['version']) - - -def _build_install_args(options): - """ - Build the arguments to 'python setup.py install' on the setuptools package. - - Returns list of command line arguments. - """ - return ['--user'] if options.user_install else [] - - -def _parse_args(): - """Parse the command line for options.""" - parser = optparse.OptionParser() - parser.add_option( - '--user', dest='user_install', action='store_true', default=False, - help='install in user site package') - parser.add_option( - '--download-base', dest='download_base', metavar="URL", - default=DEFAULT_URL, - help='alternative URL from where to download the setuptools package') - parser.add_option( - '--insecure', dest='downloader_factory', action='store_const', - const=lambda: download_file_insecure, default=get_best_downloader, - help='Use internal, non-validating downloader' - ) - parser.add_option( - '--version', help="Specify which version to download", - default=DEFAULT_VERSION, - ) - parser.add_option( - '--to-dir', - help="Directory to save (and re-use) package", - default=DEFAULT_SAVE_DIR, - ) - options, args = parser.parse_args() - # positional arguments are ignored - return options - - -def _download_args(options): - """Return args for download_setuptools function from cmdline args.""" - return dict( - version=options.version, - download_base=options.download_base, - downloader_factory=options.downloader_factory, - to_dir=options.to_dir, - ) - - -def main(): - """Install or upgrade setuptools and EasyInstall.""" - options = _parse_args() - archive = download_setuptools(**_download_args(options)) - return _install(archive, _build_install_args(options)) - -if __name__ == '__main__': - sys.exit(main()) From 11cd038b9bf7231b2007c8accb406062965fa8a0 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Fri, 29 Apr 2016 18:11:51 +0200 Subject: [PATCH 5727/8469] Tests and fixes Tests advancement: I tested WinSDK 7.1, WinSDK 7.0, WinSDK 6.1, VC for Python 2.7 with current arch as X86 and all possible target architecture. Environment generated from script is good for all (With some little fixes in this commit), some path are add on some case, I will look if I need to remove them. I need also to check .Net Framework 64bit in this case. I need also to do test for sames compilers on X64 architecture, I will also test MSVC++ 2015 Build tools on X64. I looked for create automated test on AppVeyor for this, but it is impossible to only have one of theses compilers only installed... So I did all test manually. --- setuptools/msvc9_support.py | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 58e34204fc..94de6fd19f 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -235,7 +235,7 @@ class PlatformInfo: current_cpu = os.environ['processor_architecture'].lower() def __init__(self, arch): - self.arch = arch.lower() + self.arch = arch.lower().replace('x64', 'amd64') @property def target_cpu(self): @@ -810,7 +810,7 @@ def VCTools(self): """ forcex86 = True if self.vcver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) - tools = [os.path.join(self.si.VCInstallDir, 'VCPackages'), + tools = [os.path.join(self.si.VCInstallDir, r'VCPackages'), os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir)] if self.pi.cross_dir() and self.vcver >= 14.0: @@ -829,7 +829,7 @@ def OSLibraries(self): """ if self.vcver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) - return [os.path.join(self.si.WindowsSdkDir, 'Bin%s' % arch_subdir)] + return [os.path.join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] else: arch_subdir = self.pi.target_dir(x64=True) @@ -862,7 +862,13 @@ def OSLibpath(self): Microsoft Windows SDK Libraries Paths """ ref = os.path.join(self.si.WindowsSdkDir, 'References') - libpath = [os.path.join(ref, r'CommonConfiguration\Neutral')] + libpath = [] + + if self.vcver <= 9.0: + libpath += self.OSLibraries + + if self.vcver >= 11.0: + libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')] if self.vcver >= 14.0: libpath += [ref, @@ -910,6 +916,9 @@ def SdkSetup(self): """ Microsoft Windows SDK Setup """ + if self.vcver > 9.0: + return [] + return [os.path.join(self.si.WindowsSdkDir, 'Setup')] @property @@ -1033,27 +1042,35 @@ def VCRuntimeRedist(self): vcruntime = vcruntime % (arch_subdir, self.vcver, self.vcver) return os.path.join(self.si.VCInstallDir, vcruntime) - def return_env(self): + def return_env(self, exists=True): """ Return environment dict. + + Parameters + ---------- + exists: bool + It True, only return existing paths. """ env = dict( include=self._build_paths('include', [self.VCIncludes, self.OSIncludes, self.UCRTIncludes, - self.NetFxSDKIncludes]), + self.NetFxSDKIncludes], + exists), lib=self._build_paths('lib', [self.VCLibraries, self.OSLibraries, self.FxTools, self.UCRTLibraries, - self.NetFxSDKLibraries]), + self.NetFxSDKLibraries], + exists), libpath=self._build_paths('libpath', [self.VCLibraries, self.FxTools, self.VCStoreRefs, - self.OSLibpath]), + self.OSLibpath], + exists), path=self._build_paths('path', [self.VCTools, self.VSTools, @@ -1063,13 +1080,14 @@ def return_env(self): self.FxTools, self.MSBuild, self.HTMLHelpWorkshop, - self.FSharp]), + self.FSharp], + exists), ) if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist): env['py_vcruntime_redist'] = self.VCRuntimeRedist return env - def _build_paths(self, name, spec_path_lists): + def _build_paths(self, name, spec_path_lists, exists): """ Given an environment variable name and specified paths, return a pathsep-separated string of paths containing @@ -1081,7 +1099,7 @@ def _build_paths(self, name, spec_path_lists): spec_paths = itertools.chain.from_iterable(spec_path_lists) env_paths = os.environ.get(name, '').split(os.pathsep) paths = itertools.chain(spec_paths, env_paths) - extant_paths = list(filter(os.path.isdir, paths)) + extant_paths = list(filter(os.path.isdir, paths)) if exists else paths if not extant_paths: msg = "%s environment variable is empty" % name.upper() raise distutils.errors.DistutilsPlatformError(msg) From d4486dc692f07db138a129d08803ceb8f55ae4b8 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Fri, 29 Apr 2016 18:25:50 +0200 Subject: [PATCH 5728/8469] useless 'r' before str --- setuptools/msvc9_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 94de6fd19f..dba7c39299 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -810,7 +810,7 @@ def VCTools(self): """ forcex86 = True if self.vcver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) - tools = [os.path.join(self.si.VCInstallDir, r'VCPackages'), + tools = [os.path.join(self.si.VCInstallDir, 'VCPackages'), os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir)] if self.pi.cross_dir() and self.vcver >= 14.0: From 01e1189c7156de07fb9f8646fb2282379ddbc5b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 May 2016 09:37:01 -0400 Subject: [PATCH 5729/8469] =?UTF-8?q?Bump=20version:=2020.10.1=20=E2=86=92?= =?UTF-8?q?=2021.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 775dbda27e..d0c301b3b3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.10.1 +current_version = 21.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index f72ed3a16a..58c707853e 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.10.1", + version="21.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 30837057ae74a38e29b67c62adb8e6d5be44b97c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 May 2016 09:37:02 -0400 Subject: [PATCH 5730/8469] Added tag v21.0.0 for changeset ddd3f81eb9e0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 61bd9da643..d907c1f6c5 100644 --- a/.hgtags +++ b/.hgtags @@ -258,3 +258,4 @@ a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 3b5fdd077c7d83d02c4979ad69cc0bf199b47587 v20.10.1 +ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 From 28ef4014b03a6d1b2428def3bb78e665679a5b12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 May 2016 10:06:01 -0400 Subject: [PATCH 5731/8469] Restore ability for msvc9_support to be imported on non-Windows platforms. --- setuptools/msvc9_support.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index dba7c39299..1737cc217f 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -2,9 +2,26 @@ This module improve support for Microsoft Visual C++ compilers. (Windows Only) """ import os +import collections import itertools import distutils.errors -from setuptools.extern.six.moves import winreg, filterfalse +from setuptools.extern.six.moves import filterfalse + +try: + from setuptools.extern.six.moves import winreg + safe_env = os.environ +except ImportError: + """ + Mock winreg and environ so the module can be imported + on this platform. + """ + class winreg: + HKEY_USERS = None + HKEY_CURRENT_USER = None + HKEY_LOCAL_MACHINE = None + HKEY_CLASSES_ROOT = None + safe_env = collections.defaultdict(lambda: '') + try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) @@ -232,7 +249,7 @@ class PlatformInfo: arch: str Target architecture. """ - current_cpu = os.environ['processor_architecture'].lower() + current_cpu = safe_env['processor_architecture'].lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @@ -443,8 +460,8 @@ class SystemInfo: vcver: float Required Microsoft Visual C++ version. """ - WinDir = os.environ['WinDir'] - ProgramFiles = os.environ['ProgramFiles'] + WinDir = safe_env['WinDir'] + ProgramFiles = safe_env['ProgramFiles'] ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vcver=None): From 0d3a896695ae028eca50330490f6ea2811450e0e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 May 2016 10:18:57 -0400 Subject: [PATCH 5732/8469] Convert tabs to spaces. Fixes #489. --- docs/conf.py | 120 ++++++++++++++++----------------- setuptools/py26compat.py | 20 +++--- setuptools/py27compat.py | 12 ++-- setuptools/tests/py26compat.py | 8 +-- 4 files changed, 80 insertions(+), 80 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f315e2b720..604e7138e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,64 +200,64 @@ #latex_use_modindex = True link_files = { - 'CHANGES.rst': dict( - using=dict( - BB='https://bitbucket.org', - GH='https://github.com', - ), - replace=[ - dict( - pattern=r"(Issue )?#(?P\d+)", - url='{GH}/pypa/setuptools/issues/{issue}', - ), - dict( - pattern=r"BB Pull Request ?#(?P\d+)", - url='{BB}/pypa/setuptools/pull-request/{bb_pull_request}', - ), - dict( - pattern=r"Distribute #(?P\d+)", - url='{BB}/tarek/distribute/issue/{distribute}', - ), - dict( - pattern=r"Buildout #(?P\d+)", - url='{GH}/buildout/buildout/issues/{buildout}', - ), - dict( - pattern=r"Old Setuptools #(?P\d+)", - url='http://bugs.python.org/setuptools/issue{old_setuptools}', - ), - dict( - pattern=r"Jython #(?P\d+)", - url='http://bugs.jython.org/issue{jython}', - ), - dict( - pattern=r"Python #(?P\d+)", - url='http://bugs.python.org/issue{python}', - ), - dict( - pattern=r"Interop #(?P\d+)", - url='{GH}/pypa/interoperability-peps/issues/{interop}', - ), - dict( - pattern=r"Pip #(?P\d+)", - url='{GH}/pypa/pip/issues/{pip}', - ), - dict( - pattern=r"Packaging #(?P\d+)", - url='{GH}/pypa/packaging/issues/{packaging}', - ), - dict( - pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", - url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', - ), - dict( - pattern=r"PEP[- ](?P\d+)", - url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', - ), - dict( - pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", - ), - ], - ), + 'CHANGES.rst': dict( + using=dict( + BB='https://bitbucket.org', + GH='https://github.com', + ), + replace=[ + dict( + pattern=r"(Issue )?#(?P\d+)", + url='{GH}/pypa/setuptools/issues/{issue}', + ), + dict( + pattern=r"BB Pull Request ?#(?P\d+)", + url='{BB}/pypa/setuptools/pull-request/{bb_pull_request}', + ), + dict( + pattern=r"Distribute #(?P\d+)", + url='{BB}/tarek/distribute/issue/{distribute}', + ), + dict( + pattern=r"Buildout #(?P\d+)", + url='{GH}/buildout/buildout/issues/{buildout}', + ), + dict( + pattern=r"Old Setuptools #(?P\d+)", + url='http://bugs.python.org/setuptools/issue{old_setuptools}', + ), + dict( + pattern=r"Jython #(?P\d+)", + url='http://bugs.jython.org/issue{jython}', + ), + dict( + pattern=r"Python #(?P\d+)", + url='http://bugs.python.org/issue{python}', + ), + dict( + pattern=r"Interop #(?P\d+)", + url='{GH}/pypa/interoperability-peps/issues/{interop}', + ), + dict( + pattern=r"Pip #(?P\d+)", + url='{GH}/pypa/pip/issues/{pip}', + ), + dict( + pattern=r"Packaging #(?P\d+)", + url='{GH}/pypa/packaging/issues/{packaging}', + ), + dict( + pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", + url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', + ), + dict( + pattern=r"PEP[- ](?P\d+)", + url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', + ), + dict( + pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", + with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", + ), + ], + ), } diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index e52bd85b36..40cbb88e67 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -5,18 +5,18 @@ import sys try: - from urllib.parse import splittag + from urllib.parse import splittag except ImportError: - from urllib import splittag + from urllib import splittag def strip_fragment(url): - """ - In `Python 8280 `_, Python 2.7 and - later was patched to disregard the fragment when making URL requests. - Do the same for Python 2.6 and earlier. - """ - url, fragment = splittag(url) - return url + """ + In `Python 8280 `_, Python 2.7 and + later was patched to disregard the fragment when making URL requests. + Do the same for Python 2.6 and earlier. + """ + url, fragment = splittag(url) + return url if sys.version_info >= (2,7): - strip_fragment = lambda x: x + strip_fragment = lambda x: x diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 9d2886db99..702f7d65b6 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -5,11 +5,11 @@ import sys def get_all_headers(message, key): - """ - Given an HTTPMessage, return all headers matching a given key. - """ - return message.get_all(key) + """ + Given an HTTPMessage, return all headers matching a given key. + """ + return message.get_all(key) if sys.version_info < (3,): - def get_all_headers(message, key): - return message.getheaders(key) + def get_all_headers(message, key): + return message.getheaders(key) diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index c56808816e..7211f2757e 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -3,10 +3,10 @@ import contextlib def _tarfile_open_ex(*args, **kwargs): - """ - Extend result as a context manager. - """ - return contextlib.closing(tarfile.open(*args, **kwargs)) + """ + Extend result as a context manager. + """ + return contextlib.closing(tarfile.open(*args, **kwargs)) if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2): tarfile_open = _tarfile_open_ex From c0f5771495dea58b07f4a1d36badd4cef08aa687 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 May 2016 10:20:04 -0400 Subject: [PATCH 5733/8469] Tabs to spaces in two more files. Ref #489. --- pavement.py | 38 +++++++++++++++++++------------------- setuptools/version.py | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pavement.py b/pavement.py index 8d7574e296..303e9bac4f 100644 --- a/pavement.py +++ b/pavement.py @@ -4,25 +4,25 @@ import pip def remove_all(paths): - for path in paths: - path.rmtree() if path.isdir() else path.remove() + for path in paths: + path.rmtree() if path.isdir() else path.remove() @task def update_vendored(): - vendor = Path('pkg_resources/_vendor') - remove_all(vendor.glob('packaging*')) - remove_all(vendor.glob('six*')) - remove_all(vendor.glob('pyparsing*')) - install_args = [ - 'install', - '-r', str(vendor/'vendored.txt'), - '-t', str(vendor), - ] - pip.main(install_args) - packaging = vendor / 'packaging' - for file in packaging.glob('*.py'): - text = file.text() - text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) - file.write_text(text) - remove_all(vendor.glob('*.dist-info')) - remove_all(vendor.glob('*.egg-info')) + vendor = Path('pkg_resources/_vendor') + remove_all(vendor.glob('packaging*')) + remove_all(vendor.glob('six*')) + remove_all(vendor.glob('pyparsing*')) + install_args = [ + 'install', + '-r', str(vendor/'vendored.txt'), + '-t', str(vendor), + ] + pip.main(install_args) + packaging = vendor / 'packaging' + for file in packaging.glob('*.py'): + text = file.text() + text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) + file.write_text(text) + remove_all(vendor.glob('*.dist-info')) + remove_all(vendor.glob('*.egg-info')) diff --git a/setuptools/version.py b/setuptools/version.py index 049e7febcf..f2b407228e 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1,6 +1,6 @@ import pkg_resources try: - __version__ = pkg_resources.require('setuptools')[0].version + __version__ = pkg_resources.require('setuptools')[0].version except Exception: - __version__ = 'unknown' + __version__ = 'unknown' From 144f72286d67f8e0368333bf1c3115ebce18c374 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Mon, 2 May 2016 20:21:49 +0200 Subject: [PATCH 5734/8469] Some fixes After testing VC Builds Tools 2015 with current = Amd64 and target = Amd64, x86, Arm --- setuptools/msvc9_support.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 1737cc217f..7cafd062e2 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -324,11 +324,11 @@ def cross_dir(self, forcex86=False): "\current" if target architecture is current architecture, "\current_target" if not. """ - path = self.target_dir(True) - if self.target_cpu != self.current_cpu: - current = 'x86' if forcex86 else self.current_cpu - path = path.replace('\\', '\\%s_' % current) - return path + current = 'x86' if forcex86 else self.current_cpu + if self.target_cpu != current: + return self.target_dir().replace('\\', '\\%s_' % current) + else: + return '' class RegistryInfo: @@ -818,24 +818,27 @@ def VCStoreRefs(self): """ if self.vcver < 14.0: return [] - return os.path.join(self.si.VCInstallDir, r'Lib\store\references') + return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')] @property def VCTools(self): """ Microsoft Visual C++ Tools """ + si = self.si + tools = [os.path.join(si.VCInstallDir, 'VCPackages')] + forcex86 = True if self.vcver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) - tools = [os.path.join(self.si.VCInstallDir, 'VCPackages'), - os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir)] + if arch_subdir: + tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.pi.cross_dir() and self.vcver >= 14.0: + if self.vcver >= 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) - tools += [os.path.join(self.si.VCInstallDir, path)] + tools += [os.path.join(si.VCInstallDir, path)] else: - tools += [os.path.join(self.si.VCInstallDir, 'Bin')] + tools += [os.path.join(si.VCInstallDir, 'Bin')] return tools @@ -999,9 +1002,8 @@ def MSBuild(self): return [] arch_subdir = self.pi.current_dir(hidex86=True) - path = r'\MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) - return [os.path.join(self.si.ProgramFilesx86, path), - os.path.join(self.si.ProgramFiles, path)] + path = r'MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) + return [os.path.join(self.si.ProgramFilesx86, path)] @property def HTMLHelpWorkshop(self): @@ -1011,8 +1013,7 @@ def HTMLHelpWorkshop(self): if self.vcver < 11.0: return [] - return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), - os.path.join(self.si.ProgramFiles, 'HTML Help Workshop')] + return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')] @property def UCRTLibraries(self): From 0f476502ecbaf05870a9126e9b1caee9d95b7792 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 3 May 2016 14:38:52 +0100 Subject: [PATCH 5735/8469] build_ext: always import _CONFIG_VARS from distutils.sysconfig instead of sysconfig otherwise `distutils.sysconfig.customize_compiler` does not configure OSX compiler for -dynamiclib See https://github.com/pypa/setuptools/issues/571 --- setuptools/command/build_ext.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 92e4a189b8..f331f3a03e 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -16,15 +16,11 @@ except ImportError: _build_ext = _du_build_ext -try: - # Python 2.7 or >=3.2 - from sysconfig import _CONFIG_VARS -except ImportError: - from distutils.sysconfig import get_config_var +from distutils.sysconfig import get_config_var - get_config_var("LDSHARED") # make sure _config_vars is initialized - del get_config_var - from distutils.sysconfig import _config_vars as _CONFIG_VARS +get_config_var("LDSHARED") # make sure _config_vars is initialized +del get_config_var +from distutils.sysconfig import _config_vars as _CONFIG_VARS have_rtld = False use_stubs = False From a1b5cdeacee878322b0aa52af208a2f826b4b800 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 4 May 2016 11:57:32 -0400 Subject: [PATCH 5736/8469] Issue #20120: Use RawConfigParser for .pypirc parsing, removing support for interpolation unintentionally added with move to Python 3. Behavior no longer does any interpolation in .pypirc files, matching behavior in Python 2.7 and Setuptools 19.0. --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 382aca8fc1..f0c7373171 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,7 @@ that uses .pypirc in the distutils.command package. """ import os -from configparser import ConfigParser +from configparser import RawConfigParser from distutils.cmd import Command @@ -53,7 +53,7 @@ def _read_pypirc(self): repository = self.repository or self.DEFAULT_REPOSITORY realm = self.realm or self.DEFAULT_REALM - config = ConfigParser() + config = RawConfigParser() config.read(rc) sections = config.sections() if 'distutils' in sections: From d7dc0fde71d3ff0090222419b973df0c5a73802c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 6 May 2016 09:29:56 -0400 Subject: [PATCH 5737/8469] README and CHANGES were renamed. Update MANIFEST.in to include them once again in the source distributions. Fixes #575. --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 668e13ce06..cfd1b00108 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,7 +5,7 @@ recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.htm recursive-include setuptools/_vendor * recursive-include pkg_resources *.py *.txt include *.py -include *.txt +include *.rst include MANIFEST.in include launcher.c include msvc-build-launcher.cmd From 08bcd16f9f4aaa13f7af7aa146fa2af8964f364b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 May 2016 17:05:27 -0400 Subject: [PATCH 5738/8469] =?UTF-8?q?Bump=20version:=2020.6.7=20=E2=86=92?= =?UTF-8?q?=2020.6.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 31fa0d34f2..65358f404a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 20.6.7 +current_version = 20.6.8 commit = True tag = True diff --git a/setup.py b/setup.py index 25726da1a1..8ed134fbc6 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="20.6.7", + version="20.6.8", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 46a816272d42694a0529c60a4d28ca948074bdce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 May 2016 17:05:53 -0400 Subject: [PATCH 5739/8469] Added tag v20.6.8 for changeset 018e4a727cf6 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 3bafe1a96e..f19b6eb897 100644 --- a/.hgtags +++ b/.hgtags @@ -252,3 +252,5 @@ a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 +a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 +018e4a727cf691d6404cd24ffb25e8eebea2fad4 v20.6.8 From 59b774b0c33c7351c83ac86a2ebd64e27cacc381 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Wed, 18 May 2016 13:03:33 +0100 Subject: [PATCH 5740/8469] build_ext: move block customizing compiler for shared lib into a function --- setuptools/command/build_ext.py | 36 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index f331f3a03e..1caf8c818b 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -22,6 +22,27 @@ del get_config_var from distutils.sysconfig import _config_vars as _CONFIG_VARS + +def _customize_compiler_for_shlib(compiler): + if sys.platform == "darwin": + # building .dylib requires additional compiler flags on OSX; here we + # temporarily substitute the pyconfig.h variables so that distutils' + # 'customize_compiler' uses them before we build the shared libraries. + tmp = _CONFIG_VARS.copy() + try: + # XXX Help! I don't have any idea whether these are right... + _CONFIG_VARS['LDSHARED'] = ( + "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup") + _CONFIG_VARS['CCSHARED'] = " -dynamiclib" + _CONFIG_VARS['SO'] = ".dylib" + customize_compiler(compiler) + finally: + _CONFIG_VARS.clear() + _CONFIG_VARS.update(tmp) + else: + customize_compiler(compiler) + + have_rtld = False use_stubs = False libtype = 'shared' @@ -120,20 +141,7 @@ def setup_shlib_compiler(self): compiler = self.shlib_compiler = new_compiler( compiler=self.compiler, dry_run=self.dry_run, force=self.force ) - if sys.platform == "darwin": - tmp = _CONFIG_VARS.copy() - try: - # XXX Help! I don't have any idea whether these are right... - _CONFIG_VARS['LDSHARED'] = ( - "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup") - _CONFIG_VARS['CCSHARED'] = " -dynamiclib" - _CONFIG_VARS['SO'] = ".dylib" - customize_compiler(compiler) - finally: - _CONFIG_VARS.clear() - _CONFIG_VARS.update(tmp) - else: - customize_compiler(compiler) + _customize_compiler_for_shlib(compiler) if self.include_dirs is not None: compiler.set_include_dirs(self.include_dirs) From c8f9fd8c0d61f74fdcf10d96cf7608a256ecbe40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 May 2016 20:04:59 -0400 Subject: [PATCH 5741/8469] Update changelog. Ref #572. --- CHANGES.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index c8bfe2d3eb..dd2e2c73a0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v21.1.0 +------- + +* #572: In build_ext, now always import ``_CONFIG_VARS`` + from ``distutils`` rather than from ``sysconfig`` + to allow ``distutils.sysconfig.customize_compiler`` + configure the OS X compiler for ``-dynamiclib``. + v21.0.0 ------- From 77e39c4c3f4cde33cb8d84f78a1bf6a1bb6ba659 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 May 2016 20:18:09 -0400 Subject: [PATCH 5742/8469] =?UTF-8?q?Bump=20version:=2021.0.0=20=E2=86=92?= =?UTF-8?q?=2021.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d0c301b3b3..764cab0bdf 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 21.0.0 +current_version = 21.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 58c707853e..65568b8078 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="21.0.0", + version="21.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a0fc5c1ebb910f7ab01f8a86f0fb6cc4d61db66a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 May 2016 20:18:10 -0400 Subject: [PATCH 5743/8469] Added tag v21.1.0 for changeset 02643fe95030 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 79d527ad80..8140911a1e 100644 --- a/.hgtags +++ b/.hgtags @@ -260,3 +260,4 @@ c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 3b5fdd077c7d83d02c4979ad69cc0bf199b47587 v20.10.1 ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 018e4a727cf691d6404cd24ffb25e8eebea2fad4 v20.6.8 +02643fe9503033edd2fc5a54c8d4361a6c185be4 v21.1.0 From 6437f524bd60e943be9415818f1554bfda56920f Mon Sep 17 00:00:00 2001 From: Last G Date: Thu, 19 May 2016 11:35:18 +0200 Subject: [PATCH 5744/8469] Get site-packages dirs from site.py too --- setuptools/command/easy_install.py | 5 +++++ setuptools/tests/test_easy_install.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ea5cb028a5..0bd3ea45d9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1347,6 +1347,11 @@ def get_site_dirs(): if site.ENABLE_USER_SITE: sitedirs.append(site.USER_SITE) + try: + sitedirs.extend(site.getsitepackages()) + except AttributeError: + pass + sitedirs = list(map(normalize_path, sitedirs)) return sitedirs diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 55b8b05af1..b9f820d809 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -119,6 +119,10 @@ def test_write_exception(self): with pytest.raises(distutils.errors.DistutilsError): cmd.cant_write_to_target() + @mock.patch('site.getsitepackages', lambda: ['/setuptools/test/site-packages']) + def test_all_site_dirs(self): + assert '/setuptools/test/site-packages' in ei.get_site_dirs() + class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): From 61143d61e148ea2d3efa61df1c459c55cdb35739 Mon Sep 17 00:00:00 2001 From: Last G Date: Thu, 19 May 2016 17:21:32 +0200 Subject: [PATCH 5745/8469] Fix tests for working in environment without site.getsitepakages --- setuptools/tests/test_easy_install.py | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b9f820d809..aec65a1173 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -41,6 +41,22 @@ from .textwrap import DALS +@contextlib.contextmanager +def _mark_removing_patcher(obj, attr, newval): + setattr(obj, attr, newval) + try: + yield + finally: + delattr(obj, attr) + + +def magic_patch_object(obj, attr, newval): + if hasattr(obj, attr): + return mock.patch.object(obj, attr, newval) + else: + return _mark_removing_patcher(obj, attr, newval) + + class FakeDist(object): def get_entry_map(self, group): if group != 'console_scripts': @@ -119,10 +135,21 @@ def test_write_exception(self): with pytest.raises(distutils.errors.DistutilsError): cmd.cant_write_to_target() - @mock.patch('site.getsitepackages', lambda: ['/setuptools/test/site-packages']) + @magic_patch_object(site, 'getsitepackages', lambda: ['/setuptools/test/site-packages']) def test_all_site_dirs(self): assert '/setuptools/test/site-packages' in ei.get_site_dirs() + def test_all_site_dirs_works_without_getsitepackages(self): + getsitepackages_old = None + if hasattr(site, 'getsitepackages'): + getsitepackages_old = site.getsitepackages + del site.getsitepackages + try: + assert ei.get_site_dirs() + finally: + if getsitepackages_old is not None: + site.getsitepackages = getsitepackages_old + class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): From 99fb3277660297459fbc080a8c6def98a8c52421 Mon Sep 17 00:00:00 2001 From: Last G Date: Thu, 19 May 2016 17:31:24 +0200 Subject: [PATCH 5746/8469] Replace contextlib with decorator --- setuptools/tests/test_easy_install.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aec65a1173..a4fd39fe57 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -10,6 +10,7 @@ import tempfile import site import contextlib +import functools import tarfile import logging import itertools @@ -41,20 +42,24 @@ from .textwrap import DALS -@contextlib.contextmanager -def _mark_removing_patcher(obj, attr, newval): - setattr(obj, attr, newval) - try: - yield - finally: - delattr(obj, attr) +def _mock_removing_patcher(obj, attr, newval): + def decorator(fn): + @functools.wraps(fn) + def wrapper(*args, **kwargs): + setattr(obj, attr, newval) + try: + return fn(*args, **kwargs) + finally: + delattr(obj, attr) + return wrapper + return decorator def magic_patch_object(obj, attr, newval): if hasattr(obj, attr): return mock.patch.object(obj, attr, newval) else: - return _mark_removing_patcher(obj, attr, newval) + return _mock_removing_patcher(obj, attr, newval) class FakeDist(object): From beddb52c98e81a191e04d61e020aca238d46b57b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Thu, 19 May 2016 18:06:49 +0200 Subject: [PATCH 5747/8469] Update msvc9_support.py --- setuptools/msvc9_support.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 7cafd062e2..8cfba11ecb 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -4,6 +4,7 @@ import os import collections import itertools +import platform import distutils.errors from setuptools.extern.six.moves import filterfalse @@ -57,6 +58,10 @@ def patch_for_specialized_compiler(): Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ + if platform.system() != 'Windows': + # Don't need to patch if not on Windows + return + if 'distutils' not in globals(): # The module isn't available to be patched return @@ -71,14 +76,14 @@ def patch_for_specialized_compiler(): msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall - except: + except Exception: pass try: # Patch distutils._msvccompiler._get_vc_env unpatched['msv14_get_vc_env'] = msvc14compiler._get_vc_env msvc14compiler._get_vc_env = msvc14_get_vc_env - except: + except Exception: pass @@ -193,7 +198,7 @@ def msvc14_get_vc_env(plat_spec): ------ environment: dict """ - # Try to get environement from vcvarsall.bat (Classical way) + # Try to get environment from vcvarsall.bat (Classical way) try: return unpatched['msv14_get_vc_env'](plat_spec) except distutils.errors.DistutilsPlatformError: @@ -278,7 +283,7 @@ def current_dir(self, hidex86=False, x64=False): Return ------ subfolder: str - "\target" + '\target', or '' (see hidex86 parameter) """ return ( '' if (self.current_cpu == 'x86' and hidex86) else @@ -300,7 +305,7 @@ def target_dir(self, hidex86=False, x64=False): Return ------ subfolder: str - "\current" + '\current', or '' (see hidex86 parameter) """ return ( '' if (self.target_cpu == 'x86' and hidex86) else @@ -315,20 +320,20 @@ def cross_dir(self, forcex86=False): Parameters ---------- forcex86: bool - If cross compilation, return 'x86' as current architecture even - if current acritecture is not x86. + Use 'x86' as current architecture even if current acritecture is + not x86. Return ------ subfolder: str - "\current" if target architecture is current architecture, - "\current_target" if not. + '' if target architecture is current architecture, + '\current_target' if not. """ current = 'x86' if forcex86 else self.current_cpu - if self.target_cpu != current: - return self.target_dir().replace('\\', '\\%s_' % current) - else: - return '' + return ( + '' if self.target_cpu == current else + self.target_dir().replace('\\', '\\%s_' % current) + ) class RegistryInfo: From 2e3b0c3f3285fcf18de4dd6f5593c48084ace283 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:20:47 -0400 Subject: [PATCH 5748/8469] Remove unused import --- setuptools/tests/test_easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a4fd39fe57..39afaf97a1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -6,7 +6,6 @@ import sys import os -import shutil import tempfile import site import contextlib From 6d83e28f216e750b7c20d6c1f9df4529565e9ee9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:25:40 -0400 Subject: [PATCH 5749/8469] Prefer the amazing monkeypatch fixture from pytest to bespoke inline implementations. --- setuptools/tests/test_easy_install.py | 43 +++++++-------------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 39afaf97a1..ecfda5d224 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -9,7 +9,6 @@ import tempfile import site import contextlib -import functools import tarfile import logging import itertools @@ -41,26 +40,6 @@ from .textwrap import DALS -def _mock_removing_patcher(obj, attr, newval): - def decorator(fn): - @functools.wraps(fn) - def wrapper(*args, **kwargs): - setattr(obj, attr, newval) - try: - return fn(*args, **kwargs) - finally: - delattr(obj, attr) - return wrapper - return decorator - - -def magic_patch_object(obj, attr, newval): - if hasattr(obj, attr): - return mock.patch.object(obj, attr, newval) - else: - return _mock_removing_patcher(obj, attr, newval) - - class FakeDist(object): def get_entry_map(self, group): if group != 'console_scripts': @@ -139,20 +118,18 @@ def test_write_exception(self): with pytest.raises(distutils.errors.DistutilsError): cmd.cant_write_to_target() - @magic_patch_object(site, 'getsitepackages', lambda: ['/setuptools/test/site-packages']) - def test_all_site_dirs(self): + def test_all_site_dirs(self, monkeypatch): + """ + get_site_dirs should always return site dirs reported by + site.getsitepackages. + """ + mock_gsp = lambda: ['/setuptools/test/site-packages'] + monkeypatch.setattr(site, 'getsitepackages', mock_gsp) assert '/setuptools/test/site-packages' in ei.get_site_dirs() - def test_all_site_dirs_works_without_getsitepackages(self): - getsitepackages_old = None - if hasattr(site, 'getsitepackages'): - getsitepackages_old = site.getsitepackages - del site.getsitepackages - try: - assert ei.get_site_dirs() - finally: - if getsitepackages_old is not None: - site.getsitepackages = getsitepackages_old + def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch): + monkeypatch.delattr(site, 'getsitepackages', raising=False) + assert ei.get_site_dirs() class TestPTHFileWriter: From b0c4ff4663183745aeb761dab6dc89740dd39b08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:28:49 -0400 Subject: [PATCH 5750/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index dd2e2c73a0..98ec904072 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v21.2.0 +------- + +* #539: In the easy_install get_site_dirs, honor all + paths found in ``site.getsitepackages``. + v21.1.0 ------- From c3a21a08b16af1eb1e2b47972ecdab6df3d79b7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:30:11 -0400 Subject: [PATCH 5751/8469] Normalize imports --- setuptools/command/easy_install.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0bd3ea45d9..39afb65387 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -15,8 +15,10 @@ from glob import glob from distutils.util import get_platform from distutils.util import convert_path, subst_vars -from distutils.errors import DistutilsArgError, DistutilsOptionError, \ - DistutilsError, DistutilsPlatformError +from distutils.errors import ( + DistutilsArgError, DistutilsOptionError, + DistutilsError, DistutilsPlatformError, +) 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 c18482b4a81e6bd7b46290688451d7b7bcead99c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:34:46 -0400 Subject: [PATCH 5752/8469] Add docstring --- setuptools/command/easy_install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 39afb65387..774f0f21f1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -76,6 +76,12 @@ def is_64bit(): def samefile(p1, p2): + """ + Determine if two paths reference the same file. + + Augments os.path.samefile to work on Windows and + suppresses errors if the path doesn't exist. + """ both_exist = os.path.exists(p1) and os.path.exists(p2) use_samefile = hasattr(os.path, 'samefile') and both_exist if use_samefile: From 0ffc51a989d34ecaf072169db60988c30ec1686f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:55:14 -0400 Subject: [PATCH 5753/8469] Reindent for clarity and to remove hanging indents. --- setuptools/command/easy_install.py | 146 ++++++++++++++++++----------- 1 file changed, 92 insertions(+), 54 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 774f0f21f1..e9ba5956b1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -266,8 +266,10 @@ def finalize_options(self): self.expand_basedirs() self.expand_dirs() - self._expand('install_dir', 'script_dir', 'build_directory', - 'site_dirs') + self._expand( + 'install_dir', 'script_dir', 'build_directory', + 'site_dirs', + ) # If a non-default installation directory was specified, default the # script directory to match it. if self.script_dir is None: @@ -387,9 +389,15 @@ def expand_basedirs(self): def expand_dirs(self): """Calls `os.path.expanduser` on install dirs.""" - self._expand_attrs(['install_purelib', 'install_platlib', - 'install_lib', 'install_headers', - 'install_scripts', 'install_data', ]) + dirs = [ + 'install_purelib', + 'install_platlib', + 'install_lib', + 'install_headers', + 'install_scripts', + 'install_data', + ] + self._expand_attrs(dirs) def run(self): if self.verbose != self.distribution.verbose: @@ -523,6 +531,12 @@ def check_pth_processing(self): pth_file = self.pseudo_tempname() + ".pth" ok_file = pth_file + '.ok' ok_exists = os.path.exists(ok_file) + doc = "; ".join([ + "import os", + "f = open({ok_file!r}, 'w')", + "f.write('OK')", + "f.close()\n", + ]).format(**locals()) try: if ok_exists: os.unlink(ok_file) @@ -534,16 +548,18 @@ def check_pth_processing(self): self.cant_write_to_target() else: try: - f.write("import os; f = open(%r, 'w'); f.write('OK'); " - "f.close()\n" % (ok_file,)) + f.write(doc) f.close() f = None executable = sys.executable if os.name == 'nt': dirname, basename = os.path.split(executable) alt = os.path.join(dirname, 'pythonw.exe') - if (basename.lower() == 'python.exe' and - os.path.exists(alt)): + use_alt = ( + basename.lower() == 'python.exe' and + os.path.exists(alt) + ) + if use_alt: # use pythonw.exe to avoid opening a console window executable = alt @@ -610,7 +626,6 @@ def check_editable(self, spec): def easy_install(self, spec, deps=False): tmpdir = tempfile.mkdtemp(prefix="easy_install-") - download = None if not self.editable: self.install_site_py() @@ -619,9 +634,8 @@ def easy_install(self, spec, deps=False): if URL_SCHEME(spec): # It's a url, download it to tmpdir and process self.not_editable(spec) - download = self.package_index.download(spec, tmpdir) - return self.install_item(None, download, tmpdir, deps, - True) + dl = self.package_index.download(spec, tmpdir) + return self.install_item(None, dl, tmpdir, deps, True) elif os.path.exists(spec): # Existing file or directory, just process it directly @@ -747,8 +761,9 @@ def should_unzip(self, dist): def maybe_move(self, spec, dist_filename, setup_base): dst = os.path.join(self.build_directory, spec.key) if os.path.exists(dst): - msg = ("%r already exists in %s; build directory %s will not be " - "kept") + msg = ( + "%r already exists in %s; build directory %s will not be kept" + ) log.warn(msg, spec.key, self.build_directory, setup_base) return setup_base if os.path.isdir(dist_filename): @@ -866,8 +881,10 @@ def egg_distribution(self, egg_path): return Distribution.from_filename(egg_path, metadata=metadata) def install_egg(self, egg_path, tmpdir): - destination = os.path.join(self.install_dir, - os.path.basename(egg_path)) + destination = os.path.join( + self.install_dir, + os.path.basename(egg_path), + ) destination = os.path.abspath(destination) if not self.dry_run: ensure_directory(destination) @@ -877,8 +894,11 @@ def install_egg(self, egg_path, tmpdir): if os.path.isdir(destination) and not os.path.islink(destination): dir_util.remove_tree(destination, dry_run=self.dry_run) elif os.path.exists(destination): - self.execute(os.unlink, (destination,), "Removing " + - destination) + self.execute( + os.unlink, + (destination,), + "Removing " + destination, + ) try: new_dist_is_zipped = False if os.path.isdir(egg_path): @@ -895,12 +915,18 @@ def install_egg(self, egg_path, tmpdir): f, m = shutil.move, "Moving" else: f, m = shutil.copy2, "Copying" - self.execute(f, (egg_path, destination), - (m + " %s to %s") % - (os.path.basename(egg_path), - os.path.dirname(destination))) - update_dist_caches(destination, - fix_zipimporter_caches=new_dist_is_zipped) + self.execute( + f, + (egg_path, destination), + (m + " %s to %s") % ( + os.path.basename(egg_path), + os.path.dirname(destination) + ), + ) + update_dist_caches( + destination, + fix_zipimporter_caches=new_dist_is_zipped, + ) except: update_dist_caches(destination, fix_zipimporter_caches=False) raise @@ -923,8 +949,8 @@ def install_exe(self, dist_filename, tmpdir): ) # Convert the .exe to an unpacked egg - egg_path = dist.location = os.path.join(tmpdir, dist.egg_name() + - '.egg') + egg_path = os.path.join(tmpdir, dist.egg_name() + '.egg') + dist.location = egg_path egg_tmp = egg_path + '.tmp' _egg_info = os.path.join(egg_tmp, 'EGG-INFO') pkg_inf = os.path.join(_egg_info, 'PKG-INFO') @@ -942,13 +968,13 @@ def install_exe(self, dist_filename, tmpdir): f.close() script_dir = os.path.join(_egg_info, 'scripts') # delete entry-point scripts to avoid duping - self.delete_blockers( - [os.path.join(script_dir, args[0]) for args in - ScriptWriter.get_args(dist)] - ) + self.delete_blockers([ + os.path.join(script_dir, args[0]) + for args in ScriptWriter.get_args(dist) + ]) # Build .egg file from tmpdir bdist_egg.make_zipfile( - egg_path, egg_tmp, verbose=self.verbose, dry_run=self.dry_run + egg_path, egg_tmp, verbose=self.verbose, dry_run=self.dry_run, ) # install the .egg return self.install_egg(egg_path, tmpdir) @@ -1136,7 +1162,7 @@ def update_pth(self, dist): if dist.location in self.pth_file.paths: log.info( "%s is already the active version in easy-install.pth", - dist + dist, ) else: log.info("Adding %s to easy-install.pth file", dist) @@ -1197,7 +1223,7 @@ def byte_compile(self, to_compile): if self.optimize: byte_compile( to_compile, optimize=self.optimize, force=1, - dry_run=self.dry_run + dry_run=self.dry_run, ) finally: log.set_verbosity(self.verbose) # restore original verbosity @@ -1325,15 +1351,20 @@ def get_site_dirs(): if sys.platform in ('os2emx', 'riscos'): sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) elif os.sep == '/': - sitedirs.extend([os.path.join(prefix, - "lib", - "python" + sys.version[:3], - "site-packages"), - os.path.join(prefix, "lib", "site-python")]) + sitedirs.extend([ + os.path.join( + prefix, + "lib", + "python" + sys.version[:3], + "site-packages", + ), + os.path.join(prefix, "lib", "site-python"), + ]) else: - sitedirs.extend( - [prefix, os.path.join(prefix, "lib", "site-packages")] - ) + sitedirs.extend([ + prefix, + os.path.join(prefix, "lib", "site-packages"), + ]) if sys.platform == 'darwin': # for framework builds *only* we add the standard Apple # locations. Currently only per-user, but /Library and @@ -1341,12 +1372,14 @@ def get_site_dirs(): if 'Python.framework' in prefix: home = os.environ.get('HOME') if home: - sitedirs.append( - os.path.join(home, - 'Library', - 'Python', - sys.version[:3], - 'site-packages')) + home_sp = os.path.join( + home, + 'Library', + 'Python', + sys.version[:3], + 'site-packages', + ) + sitedirs.append(home_sp) lib_paths = get_path('purelib'), get_path('platlib') for site_lib in lib_paths: if site_lib not in sitedirs: @@ -1427,8 +1460,8 @@ def extract_wininst_cfg(dist_filename): return None # not a valid tag f.seek(prepended - (12 + cfglen)) - cfg = configparser.RawConfigParser( - {'version': '', 'target_version': ''}) + init = {'version': '', 'target_version': ''} + cfg = configparser.RawConfigParser(init) try: part = f.read(cfglen) # Read up to the first null byte. @@ -1451,7 +1484,8 @@ def get_exe_prefixes(exe_filename): """Get exe->egg path translations for a given .exe file""" prefixes = [ - ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), + ('PURELIB/', ''), + ('PLATLIB/pywin32_system32', ''), ('PLATLIB/', ''), ('SCRIPTS/', 'EGG-INFO/scripts/'), ('DATA/lib/site-packages', ''), @@ -2084,8 +2118,11 @@ def _get_script_args(cls, type_, name, header, script_text): "For Windows, add a .py extension" ext = dict(console='.pya', gui='.pyw')[type_] if ext not in os.environ['PATHEXT'].lower().split(';'): - warnings.warn("%s not listed in PATHEXT; scripts will not be " - "recognized as executables." % ext, UserWarning) + msg = ( + "{ext} not listed in PATHEXT; scripts will not be " + "recognized as executables." + ).format(**locals()) + warnings.warn(msg, UserWarning) old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old.remove(ext) header = cls._adjust_header(type_, header) @@ -2251,7 +2288,8 @@ def _show_help(self, *args, **kw): setup( script_args=['-q', 'easy_install', '-v'] + argv, script_name=sys.argv[0] or 'easy_install', - distclass=DistributionWithoutHelpCommands, **kw + distclass=DistributionWithoutHelpCommands, + **kw ) From e92023ee5ebf949082c2db0bb446ba52b1ba8ff4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:58:15 -0400 Subject: [PATCH 5754/8469] Re-use _inline for nicer one-line scripts. --- setuptools/command/easy_install.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e9ba5956b1..ccc66cf719 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -113,6 +113,9 @@ def isascii(s): return False +_one_liner = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') + + class easy_install(Command): """Manage a download/build/install process""" description = "Find/get/install Python packages" @@ -531,12 +534,12 @@ def check_pth_processing(self): pth_file = self.pseudo_tempname() + ".pth" ok_file = pth_file + '.ok' ok_exists = os.path.exists(ok_file) - doc = "; ".join([ - "import os", - "f = open({ok_file!r}, 'w')", - "f.write('OK')", - "f.close()\n", - ]).format(**locals()) + tmpl = _one_liner(""" + import os + f = open({ok_file!r}, 'w') + f.write('OK') + f.close() + """) + '\n' try: if ok_exists: os.unlink(ok_file) @@ -548,7 +551,7 @@ def check_pth_processing(self): self.cant_write_to_target() else: try: - f.write(doc) + f.write(tmpl.format(**locals())) f.close() f = None executable = sys.executable @@ -1645,12 +1648,11 @@ def _wrap_lines(cls, lines): yield line yield cls.postlude - _inline = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') - prelude = _inline(""" + prelude = _one_liner(""" import sys sys.__plen = len(sys.path) """) - postlude = _inline(""" + postlude = _one_liner(""" import sys new = sys.path[sys.__plen:] del sys.path[sys.__plen:] From 731214ec6fc486e9a26f0ec83dd2434f346e6b4a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:59:43 -0400 Subject: [PATCH 5755/8469] =?UTF-8?q?Bump=20version:=2021.1.0=20=E2=86=92?= =?UTF-8?q?=2021.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 764cab0bdf..e13f8c64e9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 21.1.0 +current_version = 21.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 65568b8078..c497e6a980 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="21.1.0", + version="21.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a048b0ab8aa0eb9307bea33a043c10ff487975a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 10:59:44 -0400 Subject: [PATCH 5756/8469] Added tag v21.2.0 for changeset 40b8fac6db11 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8140911a1e..1d9db8cfc9 100644 --- a/.hgtags +++ b/.hgtags @@ -261,3 +261,4 @@ c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 018e4a727cf691d6404cd24ffb25e8eebea2fad4 v20.6.8 02643fe9503033edd2fc5a54c8d4361a6c185be4 v21.1.0 +40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 From 9c4f8ecbcec6d2107e2fbfca69faec9dec358dad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 11:40:46 -0400 Subject: [PATCH 5757/8469] getsitepackages may not be present --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ecfda5d224..fd06b6efc8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -124,7 +124,7 @@ def test_all_site_dirs(self, monkeypatch): site.getsitepackages. """ mock_gsp = lambda: ['/setuptools/test/site-packages'] - monkeypatch.setattr(site, 'getsitepackages', mock_gsp) + monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False) assert '/setuptools/test/site-packages' in ei.get_site_dirs() def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch): From de5db9dbd9da6802219fe1b70ba84207f60470dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 May 2016 11:41:37 -0400 Subject: [PATCH 5758/8469] Added tag v21.2.0 for changeset 9959424676a4 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 1d9db8cfc9..257ff80e45 100644 --- a/.hgtags +++ b/.hgtags @@ -262,3 +262,5 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 018e4a727cf691d6404cd24ffb25e8eebea2fad4 v20.6.8 02643fe9503033edd2fc5a54c8d4361a6c185be4 v21.1.0 40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 +40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 +9959424676a4aac1c14e430ff6f4210fdb0442d9 v21.2.0 From 6e11e32e4ac8afc30bf3a85d8e583ba55b1a1848 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 13:29:58 -0400 Subject: [PATCH 5759/8469] Remove extra redundant work. Patch the module so behavior is the same on Unix systems even if not invoked. Tests still pass on Linux due to import protections. --- setuptools/msvc9_support.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 8cfba11ecb..d1f1a7a0d1 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -4,7 +4,6 @@ import os import collections import itertools -import platform import distutils.errors from setuptools.extern.six.moves import filterfalse @@ -58,10 +57,6 @@ def patch_for_specialized_compiler(): Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ - if platform.system() != 'Windows': - # Don't need to patch if not on Windows - return - if 'distutils' not in globals(): # The module isn't available to be patched return From 81cbfafddd92b39a6598ad3372e33eb28fadaf7d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 13:32:58 -0400 Subject: [PATCH 5760/8469] Add missing C for consistency. --- setuptools/msvc9_support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index d1f1a7a0d1..995828833b 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -76,7 +76,7 @@ def patch_for_specialized_compiler(): try: # Patch distutils._msvccompiler._get_vc_env - unpatched['msv14_get_vc_env'] = msvc14compiler._get_vc_env + unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env msvc14compiler._get_vc_env = msvc14_get_vc_env except Exception: pass @@ -195,7 +195,7 @@ def msvc14_get_vc_env(plat_spec): """ # Try to get environment from vcvarsall.bat (Classical way) try: - return unpatched['msv14_get_vc_env'](plat_spec) + return unpatched['msvc14_get_vc_env'](plat_spec) except distutils.errors.DistutilsPlatformError: # Pass error Vcvarsall.bat is missing pass From b83cf1a68091b8de46f0ba19f1ce2f031d9cdc94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 13:41:32 -0400 Subject: [PATCH 5761/8469] Use underscore to separate words (or acronyms) for clarity (vc_ver). --- setuptools/msvc9_support.py | 120 ++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 995828833b..d4b7521a58 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -457,28 +457,28 @@ class SystemInfo: ---------- registry_info: RegistryInfo "RegistryInfo" instance. - vcver: float + vc_ver: float Required Microsoft Visual C++ version. """ WinDir = safe_env['WinDir'] ProgramFiles = safe_env['ProgramFiles'] ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) - def __init__(self, registry_info, vcver=None): + def __init__(self, registry_info, vc_ver=None): self.ri = registry_info self.pi = self.ri.pi - if vcver: - self.vcver = vcver + if vc_ver: + self.vc_ver = vc_ver else: try: - self.vcver = self.find_availables_vcver()[-1] + self.vc_ver = self.find_available_vc_vers()[-1] except IndexError: err = 'No Microsoft Visual C++ version found' raise distutils.errors.DistutilsPlatformError(err) - def find_availables_vcver(self): + def find_available_vc_vers(self): """ - Find all availables Microsoft Visual C++ versions. + Find all available Microsoft Visual C++ versions. """ vckeys = (self.ri.vc, self.ri.vc_for_python) vsvers = [] @@ -511,11 +511,11 @@ def VSInstallDir(self): Microsoft Visual Studio directory. """ # Default path - name = 'Microsoft Visual Studio %0.1f' % self.vcver + name = 'Microsoft Visual Studio %0.1f' % self.vc_ver default = os.path.join(self.ProgramFilesx86, name) # Try to get path from registry, if fail use default path - return self.ri.lookup(self.ri.vs, '%0.1f' % self.vcver) or default + return self.ri.lookup(self.ri.vs, '%0.1f' % self.vc_ver) or default @property def VCInstallDir(self): @@ -523,16 +523,16 @@ def VCInstallDir(self): Microsoft Visual C++ directory. """ # Default path - default = r'Microsoft Visual Studio %0.1f\VC' % self.vcver + default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver guess_vc = os.path.join(self.ProgramFilesx86, default) # Try to get "VC++ for Python" path from registry as default path - path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vcver) + path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) python_vc = self.ri.lookup(path, 'installdir') default_vc = os.path.join(python_vc, 'VC') if python_vc else guess_vc # Try to get path from registry, if fail use default path - result = self.ri.lookup(self.ri.vc, '%0.1f' % self.vcver) or default_vc + result = self.ri.lookup(self.ri.vc, '%0.1f' % self.vc_ver) or default_vc if not os.path.isdir(result): msg = 'Microsoft Visual C++ directory not found' @@ -546,15 +546,15 @@ def WindowsSdkVersion(self): Microsoft Windows SDK versions. """ # Set Windows SDK versions for specified MSVC++ version - if self.vcver <= 9.0: + if self.vc_ver <= 9.0: return ('7.0', '6.1', '6.0a') - elif self.vcver == 10.0: + elif self.vc_ver == 10.0: return ('7.1', '7.0a') - elif self.vcver == 11.0: + elif self.vc_ver == 11.0: return ('8.0', '8.0a') - elif self.vcver == 12.0: + elif self.vc_ver == 12.0: return ('8.1', '8.1a') - elif self.vcver >= 14.0: + elif self.vc_ver >= 14.0: return ('10.0', '8.1') @property @@ -571,7 +571,7 @@ def WindowsSdkDir(self): break if not sdkdir or not os.path.isdir(sdkdir): # Try to get "VC++ for Python" version from registry - path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vcver) + path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) install_base = self.ri.lookup(path, 'installdir') if install_base: sdkdir = os.path.join(install_base, 'WinSDK') @@ -601,18 +601,18 @@ def WindowsSDKExecutablePath(self): Microsoft Windows SDK executable directory. """ # Find WinSDK NetFx Tools registry dir name - if self.vcver <= 11.0: + if self.vc_ver <= 11.0: netfxver = 35 arch = '' else: netfxver = 40 - hidex86 = True if self.vcver <= 12.0 else False + hidex86 = True if self.vc_ver <= 12.0 else False arch = self.pi.current_dir(x64=True, hidex86=hidex86) fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-')) # liste all possibles registry paths regpaths = [] - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: for ver in self.NetFxSdkVersion: regpaths += [os.path.join(self.ri.netfx_sdk, ver, fx)] @@ -631,7 +631,7 @@ def FSharpInstallDir(self): """ Microsoft Visual F# directory. """ - path = r'%0.1f\Setup\F#' % self.vcver + path = r'%0.1f\Setup\F#' % self.vc_ver path = os.path.join(self.ri.visualstudio, path) return self.ri.lookup(path, 'productdir') or '' @@ -641,7 +641,7 @@ def UniversalCRTSdkDir(self): Microsoft Universal CRT SDK directory. """ # Set Kit Roots versions for specified MSVC++ version - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: vers = ('10', '81') else: vers = () @@ -660,7 +660,7 @@ def NetFxSdkVersion(self): Microsoft .NET Framework SDK versions. """ # Set FxSdk versions for specified MSVC++ version - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: return ('4.6.1', '4.6') else: return () @@ -726,14 +726,14 @@ def _find_dot_net_versions(self, bits=32): ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' # Set .NET versions for specified MSVC++ version - if self.vcver >= 12.0: + if self.vc_ver >= 12.0: frameworkver = (ver, 'v4.0') - elif self.vcver >= 10.0: + elif self.vc_ver >= 10.0: frameworkver = ('v4.0.30319' if ver.lower()[:2] != 'v4' else ver, 'v3.5') - elif self.vcver == 9.0: + elif self.vc_ver == 9.0: frameworkver = ('v3.5', 'v2.0.50727') - if self.vcver == 8.0: + if self.vc_ver == 8.0: frameworkver = ('v3.0', 'v2.0.50727') return frameworkver @@ -752,24 +752,24 @@ class EnvironmentInfo: ---------- arch: str Target architecture. - vcver: float + vc_ver: float Required Microsoft Visual C++ version. If not set, autodetect the last version. - vcvermin: float + vc_min_ver: float Minimum Microsoft Visual C++ version. """ - def __init__(self, arch, vcver=None, vcvermin=None): + def __init__(self, arch, vc_ver=None, vc_min_ver=None): self.pi = PlatformInfo(arch) self.ri = RegistryInfo(self.pi) - self.si = SystemInfo(self.ri, vcver) + self.si = SystemInfo(self.ri, vc_ver) - if vcvermin: - if self.vcver < vcvermin: + if vc_min_ver: + if self.vc_ver < vc_min_ver: err = 'No suitable Microsoft Visual C++ version found' raise distutils.errors.DistutilsPlatformError(err) @property - def vcver(self): + def vc_ver(self): """ Microsoft Visual C++ version. """ @@ -782,7 +782,7 @@ def VSTools(self): """ paths = [r'Common7\IDE', r'Common7\Tools'] - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] paths += [r'Team Tools\Performance Tools'] @@ -806,7 +806,7 @@ def VCLibraries(self): arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: paths += [r'Lib\store%s' % arch_subdir] return [os.path.join(self.si.VCInstallDir, path) for path in paths] @@ -816,7 +816,7 @@ def VCStoreRefs(self): """ Microsoft Visual C++ store references Libraries """ - if self.vcver < 14.0: + if self.vc_ver < 14.0: return [] return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')] @@ -828,12 +828,12 @@ def VCTools(self): si = self.si tools = [os.path.join(si.VCInstallDir, 'VCPackages')] - forcex86 = True if self.vcver <= 10.0 else False + forcex86 = True if self.vc_ver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) if arch_subdir: tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) tools += [os.path.join(si.VCInstallDir, path)] @@ -847,7 +847,7 @@ def OSLibraries(self): """ Microsoft Windows SDK Libraries """ - if self.vcver <= 10.0: + if self.vc_ver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) return [os.path.join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] @@ -864,11 +864,11 @@ def OSIncludes(self): """ include = os.path.join(self.si.WindowsSdkDir, 'include') - if self.vcver <= 10.0: + if self.vc_ver <= 10.0: return [include, os.path.join(include, 'gl')] else: - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: sdkver = self._get_content_dirname(include) else: sdkver = '' @@ -884,13 +884,13 @@ def OSLibpath(self): ref = os.path.join(self.si.WindowsSdkDir, 'References') libpath = [] - if self.vcver <= 9.0: + if self.vc_ver <= 9.0: libpath += self.OSLibraries - if self.vcver >= 11.0: + if self.vc_ver >= 11.0: libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')] - if self.vcver >= 14.0: + if self.vc_ver >= 14.0: libpath += [ref, os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), os.path.join(ref, r'Windows.Foundation.' @@ -902,7 +902,7 @@ def OSLibpath(self): os.path.join(self.si.WindowsSdkDir, r'ExtensionSDKs' r'\Microsoft.VCLibs\%0.1f\References' r'\CommonConfiguration\neutral' % - self.vcver)] + self.vc_ver)] return libpath @property @@ -911,14 +911,14 @@ def SdkTools(self): Microsoft Windows SDK Tools """ tools = [os.path.join(self.si.WindowsSdkDir, - 'Bin' if self.vcver <= 11.0 else r'Bin\x86')] + 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86')] if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] - if self.vcver == 10.0 or self.vcver == 11.0: + if self.vc_ver == 10.0 or self.vc_ver == 11.0: if self.pi.target_is_x86(): arch_subdir = '' else: @@ -936,7 +936,7 @@ def SdkSetup(self): """ Microsoft Windows SDK Setup """ - if self.vcver > 9.0: + if self.vc_ver > 9.0: return [] return [os.path.join(self.si.WindowsSdkDir, 'Setup')] @@ -949,7 +949,7 @@ def FxTools(self): pi = self.pi si = self.si - if self.vcver <= 10.0: + if self.vc_ver <= 10.0: include32 = True include64 = not pi.target_is_x86() and not pi.current_is_x86() else: @@ -970,7 +970,7 @@ def NetFxSDKLibraries(self): """ Microsoft .Net Framework SDK Libraries """ - if self.vcver < 14.0 or not self.si.NetFxSdkDir: + if self.vc_ver < 14.0 or not self.si.NetFxSdkDir: return [] arch_subdir = self.pi.target_dir(x64=True) @@ -981,7 +981,7 @@ def NetFxSDKIncludes(self): """ Microsoft .Net Framework SDK Includes """ - if self.vcver < 14.0 or not self.si.NetFxSdkDir: + if self.vc_ver < 14.0 or not self.si.NetFxSdkDir: return [] return [os.path.join(self.si.NetFxSdkDir, r'include\um')] @@ -998,11 +998,11 @@ def MSBuild(self): """ Microsoft Build Engine """ - if self.vcver < 12.0: + if self.vc_ver < 12.0: return [] arch_subdir = self.pi.current_dir(hidex86=True) - path = r'MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) + path = r'MSBuild\%0.1f\bin%s' % (self.vc_ver, arch_subdir) return [os.path.join(self.si.ProgramFilesx86, path)] @property @@ -1010,7 +1010,7 @@ def HTMLHelpWorkshop(self): """ Microsoft HTML Help Workshop """ - if self.vcver < 11.0: + if self.vc_ver < 11.0: return [] return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')] @@ -1020,7 +1020,7 @@ def UCRTLibraries(self): """ Microsoft Universal CRT Libraries """ - if self.vcver < 14.0: + if self.vc_ver < 14.0: return [] arch_subdir = self.pi.target_dir(x64=True) @@ -1033,7 +1033,7 @@ def UCRTIncludes(self): """ Microsoft Universal CRT Include """ - if self.vcver < 14.0: + if self.vc_ver < 14.0: return [] include = os.path.join(self.si.UniversalCRTSdkDir, 'include') @@ -1045,7 +1045,7 @@ def FSharp(self): """ Microsoft Visual F# """ - if self.vcver < 11.0 and self.vcver > 12.0: + if self.vc_ver < 11.0 and self.vc_ver > 12.0: return [] return self.si.FSharpInstallDir @@ -1057,7 +1057,7 @@ def VCRuntimeRedist(self): """ arch_subdir = self.pi.target_dir(x64=True) vcruntime = 'redist%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' - vcruntime = vcruntime % (arch_subdir, self.vcver, self.vcver) + vcruntime = vcruntime % (arch_subdir, self.vc_ver, self.vc_ver) return os.path.join(self.si.VCInstallDir, vcruntime) def return_env(self, exists=True): From 4f6fc8537842c14b03c4a1ffd25b88f2f4c276c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 14:55:31 -0400 Subject: [PATCH 5762/8469] Use itertools.chain for more lenient support of any iterable types and also more uniform indentation. --- setuptools/command/build_py.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 8623c777cf..3849b6ad6e 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -94,8 +94,10 @@ def _get_pkg_data_files(self, package): def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" - globs = (self.package_data.get('', []) - + self.package_data.get(package, [])) + globs = itertools.chain( + self.package_data.get('', []), + self.package_data.get(package, []), + ) files = self.manifest_files.get(package, [])[:] for pattern in globs: # Each pattern has to be converted to a platform-specific path From efecaf8cdb7ca4623d2efd53590adf976fd36954 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:06:59 -0400 Subject: [PATCH 5763/8469] Add test ref #261. --- setuptools/tests/test_build_py.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 setuptools/tests/test_build_py.py diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py new file mode 100644 index 0000000000..ed1703accd --- /dev/null +++ b/setuptools/tests/test_build_py.py @@ -0,0 +1,31 @@ +import os + +import pytest + +from setuptools.dist import Distribution + + +@pytest.yield_fixture +def tmpdir_as_cwd(tmpdir): + with tmpdir.as_cwd(): + yield tmpdir + + +def test_directories_in_package_data_glob(tmpdir_as_cwd): + """ + Directories matching the glob in package_data should + not be included in the package data. + + Regression test for #261. + """ + dist = Distribution(dict( + script_name='setup.py', + script_args=['build_py'], + packages=[''], + name='foo', + package_data={'': ['path/*']}, + )) + os.makedirs('path/subpath') + #with contexts.quiet(): + dist.parse_command_line() + dist.run_commands() From 2d765a69b19bb92882582249942d607684dd14eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:18:04 -0400 Subject: [PATCH 5764/8469] Refactor build_py.find_data_files to use iterables, constructing the files list directly. Ref #261. --- setuptools/command/build_py.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 3849b6ad6e..34f3903729 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -98,10 +98,18 @@ def find_data_files(self, package, src_dir): self.package_data.get('', []), self.package_data.get(package, []), ) - files = self.manifest_files.get(package, [])[:] - for pattern in globs: + globs_expanded = ( # Each pattern has to be converted to a platform-specific path - files.extend(glob(os.path.join(src_dir, convert_path(pattern)))) + glob(os.path.join(src_dir, convert_path(pattern))) + for pattern in globs + ) + # flatten the expanded globs into an iterable of matches + globs_matches = itertools.chain.from_iterable(globs_expanded) + glob_files = globs_matches + files = list(itertools.chain( + self.manifest_files.get(package, []), + glob_files, + )) return self.exclude_data_files(package, src_dir, files) def build_package_data(self): From 8f0ac47db9fe2934725aa9c8a7b0089451ed033d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:18:32 -0400 Subject: [PATCH 5765/8469] Filter non-files in find_data_files. Fixes #261. --- setuptools/command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 34f3903729..23e8b31c35 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -9,7 +9,7 @@ import collections import itertools -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter try: from setuptools.lib2to3_ex import Mixin2to3 @@ -105,7 +105,7 @@ def find_data_files(self, package, src_dir): ) # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) - glob_files = globs_matches + glob_files = filter(os.path.isfile, globs_matches) files = list(itertools.chain( self.manifest_files.get(package, []), glob_files, From dde1bfbf9aca70f4d78c349059ba43b3d40eb0e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:21:28 -0400 Subject: [PATCH 5766/8469] Rewrite globs as chain of iterables. --- setuptools/command/build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 23e8b31c35..4ce353142a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -194,9 +194,9 @@ def get_package_dir(self, package): 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, []) + globs = itertools.chain( + self.exclude_package_data.get('', []), + self.exclude_package_data.get(package, []), ) bad = set( item From ba0b4d2eb91961a2237064850deca9e711ee4368 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:22:09 -0400 Subject: [PATCH 5767/8469] Allow files to be iterable in exclude_data_files --- setuptools/command/build_py.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 4ce353142a..41b2660c20 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -106,10 +106,10 @@ def find_data_files(self, package, src_dir): # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) glob_files = filter(os.path.isfile, globs_matches) - files = list(itertools.chain( + files = itertools.chain( self.manifest_files.get(package, []), glob_files, - )) + ) return self.exclude_data_files(package, src_dir, files) def build_package_data(self): @@ -198,6 +198,7 @@ def exclude_data_files(self, package, src_dir, files): self.exclude_package_data.get('', []), self.exclude_package_data.get(package, []), ) + files = list(files) bad = set( item for pattern in globs From c05fd0799bb2a83ab877f317e8630a403a3514f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:40:01 -0400 Subject: [PATCH 5768/8469] Rewrite find_data_files and exclude_data_files to follow the same pattern for building platform_patterns. --- setuptools/command/build_py.py | 41 ++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 41b2660c20..cd91a85e7e 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -94,15 +94,17 @@ def _get_pkg_data_files(self, package): def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" - globs = itertools.chain( - self.package_data.get('', []), - self.package_data.get(package, []), + spec = self.package_data + raw_patterns = itertools.chain( + spec.get('', []), + spec.get(package, []), ) - globs_expanded = ( + platform_patterns = ( # Each pattern has to be converted to a platform-specific path - glob(os.path.join(src_dir, convert_path(pattern))) - for pattern in globs + os.path.join(src_dir, convert_path(pattern)) + for pattern in raw_patterns ) + globs_expanded = map(glob, platform_patterns) # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) glob_files = filter(os.path.isfile, globs_matches) @@ -194,19 +196,24 @@ def get_package_dir(self, package): def exclude_data_files(self, package, src_dir, files): """Filter filenames for package's data files in 'src_dir'""" - globs = itertools.chain( - self.exclude_package_data.get('', []), - self.exclude_package_data.get(package, []), - ) files = list(files) - bad = set( - item - for pattern in globs - for item in fnmatch.filter( - files, - os.path.join(src_dir, convert_path(pattern)), - ) + spec = self.exclude_package_data + raw_patterns = itertools.chain( + spec.get('', []), + spec.get(package, []), + ) + platform_patterns = ( + # Each pattern has to be converted to a platform-specific path + os.path.join(src_dir, convert_path(pattern)) + for pattern in raw_patterns + ) + match_groups = ( + fnmatch.filter(files, pattern) + for pattern in platform_patterns ) + # flatten the groups of matches into an iterable of matches + matches = itertools.chain.from_iterable(match_groups) + bad = set(matches) seen = collections.defaultdict(itertools.count) return [ fn From 1af011b1f1dac17485c0cf8fe9eb08c43b5b6f2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:53:06 -0400 Subject: [PATCH 5769/8469] Extract duplicate code into a single method. --- setuptools/command/build_py.py | 48 ++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index cd91a85e7e..1db0acb953 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -94,17 +94,12 @@ def _get_pkg_data_files(self, package): def find_data_files(self, package, src_dir): """Return filenames for package's data files in 'src_dir'""" - spec = self.package_data - raw_patterns = itertools.chain( - spec.get('', []), - spec.get(package, []), - ) - platform_patterns = ( - # Each pattern has to be converted to a platform-specific path - os.path.join(src_dir, convert_path(pattern)) - for pattern in raw_patterns + patterns = self._get_platform_patterns( + self.package_data, + package, + src_dir, ) - globs_expanded = map(glob, platform_patterns) + globs_expanded = map(glob, patterns) # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) glob_files = filter(os.path.isfile, globs_matches) @@ -197,19 +192,14 @@ def get_package_dir(self, package): def exclude_data_files(self, package, src_dir, files): """Filter filenames for package's data files in 'src_dir'""" files = list(files) - spec = self.exclude_package_data - raw_patterns = itertools.chain( - spec.get('', []), - spec.get(package, []), - ) - platform_patterns = ( - # Each pattern has to be converted to a platform-specific path - os.path.join(src_dir, convert_path(pattern)) - for pattern in raw_patterns + patterns = self._get_platform_patterns( + self.exclude_package_data, + package, + src_dir, ) match_groups = ( fnmatch.filter(files, pattern) - for pattern in platform_patterns + for pattern in patterns ) # flatten the groups of matches into an iterable of matches matches = itertools.chain.from_iterable(match_groups) @@ -223,6 +213,24 @@ def exclude_data_files(self, package, src_dir, files): and not next(seen[fn]) ] + @staticmethod + def _get_platform_patterns(spec, package, src_dir): + """ + yield platfrom-specific path patterns (suitable for glob + or fn_match) from a glob-based spec (such as + self.package_data or self.exclude_package_data) + matching package in src_dir. + """ + raw_patterns = itertools.chain( + spec.get('', []), + spec.get(package, []), + ) + return ( + # Each pattern has to be converted to a platform-specific path + os.path.join(src_dir, convert_path(pattern)) + for pattern in raw_patterns + ) + def assert_relative(path): if not os.path.isabs(path): From e75bb0594bad10cb307620359abcd3b5779ecfd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:59:45 -0400 Subject: [PATCH 5770/8469] Re-use unique_everseen from itertools recipes. --- setuptools/command/build_py.py | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 1db0acb953..758a3fdfe8 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -6,10 +6,9 @@ import textwrap import io import distutils.errors -import collections import itertools -from setuptools.extern.six.moves import map, filter +from setuptools.extern.six.moves import map, filter, filterfalse try: from setuptools.lib2to3_ex import Mixin2to3 @@ -204,14 +203,13 @@ def exclude_data_files(self, package, src_dir, files): # flatten the groups of matches into an iterable of matches matches = itertools.chain.from_iterable(match_groups) bad = set(matches) - seen = collections.defaultdict(itertools.count) - return [ + keepers = ( fn for fn in files if fn not in bad - # ditch dupes - and not next(seen[fn]) - ] + ) + # ditch dupes + return list(_unique_everseen(keepers)) @staticmethod def _get_platform_patterns(spec, package, src_dir): @@ -232,6 +230,25 @@ def _get_platform_patterns(spec, package, src_dir): ) +# from Python docs +def _unique_everseen(iterable, key=None): + "List unique elements, preserving order. Remember all elements ever seen." + # unique_everseen('AAAABBBCCDAABBB') --> A B C D + # unique_everseen('ABBCcAD', str.lower) --> A B C D + seen = set() + seen_add = seen.add + if key is None: + for element in filterfalse(seen.__contains__, iterable): + seen_add(element) + yield element + else: + for element in iterable: + k = key(element) + if k not in seen: + seen_add(k) + yield element + + def assert_relative(path): if not os.path.isabs(path): return path From 24cd05319842f1c3a06d4266ea1c13f8a621ac3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 16:08:16 -0400 Subject: [PATCH 5771/8469] Update changelog. Ref #261. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 98ec904072..b6a7ba0f73 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v21.2.1 +------- + +* #261: Exclude directories when resolving globs in + package_data. + v21.2.0 ------- From 5be89b652f6d9daf19183019ac84d6c737430022 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 16:08:27 -0400 Subject: [PATCH 5772/8469] =?UTF-8?q?Bump=20version:=2021.2.0=20=E2=86=92?= =?UTF-8?q?=2021.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e13f8c64e9..e9f13074ef 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 21.2.0 +current_version = 21.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index c497e6a980..4ee0ac323e 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="21.2.0", + version="21.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 29bef0ef4c71c0e9a88f1db889b47310568cc160 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 16:08:28 -0400 Subject: [PATCH 5773/8469] Added tag v21.2.1 for changeset 694111eadb10 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 257ff80e45..400e6e899a 100644 --- a/.hgtags +++ b/.hgtags @@ -264,3 +264,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 9959424676a4aac1c14e430ff6f4210fdb0442d9 v21.2.0 +694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 From 30a0d1c5414ec93ffd4f83cfcc67d426847ce30d Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 26 May 2016 05:35:26 +0000 Subject: [PATCH 5774/8469] Issue #27076: Doc, comment and tests spelling fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most fixes to Doc/ and Lib/ directories by Ville Skyttä. --- msvc9compiler.py | 2 +- tests/test_unixccompiler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index da4b21d22a..0b1fd19ff6 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -51,7 +51,7 @@ # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is -# the param to cross-compile on x86 targetting amd64.) +# the param to cross-compile on x86 targeting amd64.) PLAT_TO_VCVARS = { 'win32' : 'x86', 'win-amd64' : 'amd64', diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index 3d14e12aa9..e171ee9c4d 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -127,7 +127,7 @@ def gcv(v): self.assertEqual(self.cc.linker_so[0], 'my_cc') @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS X') - def test_osx_explict_ldshared(self): + def test_osx_explicit_ldshared(self): # Issue #18080: # ensure that setting CC env variable does not change # explicit LDSHARED setting for linker From df04790b5ca3705a327321916aeceee5dd469a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Thu, 26 May 2016 14:13:46 +0200 Subject: [PATCH 5775/8469] Fix broken link --- docs/easy_install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 8dd176fdfb..a66909b121 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -677,7 +677,7 @@ locations, build options, etc., EasyInstall will respect your existing settings until and unless you override them explicitly in an ``[easy_install]`` section. For more information, see also the current Python documentation on the `use and -location of distutils configuration files `_. +location of distutils configuration files `_. Notice that ``easy_install`` will use the ``setup.cfg`` from the current working directory only if it was triggered from ``setup.py`` through the From ab46f6f3f562ac966896d310c4bfed176762a6c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 May 2016 12:17:32 -0400 Subject: [PATCH 5776/8469] Add reference to issue 470 in changelog for 20.5. Fixes #470. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b6a7ba0f73..4cf780aeec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -109,7 +109,7 @@ v20.6.0 20.5 ---- -* BB Pull Request #185: Add support for environment markers +* BB Pull Request #185, #470: Add support for environment markers in requirements in install_requires, setup_requires, tests_require as well as adding a test for the existing extra_requires machinery. From b1446e0a5342bc1843cb38495ae84a6ca27c8a9e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 May 2016 12:18:59 -0400 Subject: [PATCH 5777/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 4cf780aeec..bceb8a2797 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v21.2.2 +------- + +* Minor fixes to changelog and docs. + v21.2.1 ------- From 15cec8c321f1f77b4331363ec3fbed87ea00ab64 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 May 2016 12:19:08 -0400 Subject: [PATCH 5778/8469] =?UTF-8?q?Bump=20version:=2021.2.1=20=E2=86=92?= =?UTF-8?q?=2021.2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e9f13074ef..ad8e1292de 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 21.2.1 +current_version = 21.2.2 commit = True tag = True diff --git a/setup.py b/setup.py index 4ee0ac323e..391cacae76 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="21.2.1", + version="21.2.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 6e248ac4d9920b6f173c1184335448121db5bfb3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 May 2016 12:19:09 -0400 Subject: [PATCH 5779/8469] Added tag v21.2.2 for changeset 274f33435e9c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 400e6e899a..5f9296f389 100644 --- a/.hgtags +++ b/.hgtags @@ -265,3 +265,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 9959424676a4aac1c14e430ff6f4210fdb0442d9 v21.2.0 694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 +274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 From a797c9be8e5cc015127c4dd82c545ad2fe6655ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:01:46 -0400 Subject: [PATCH 5780/8469] Use context for closing file --- setuptools/command/upload_docs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index f887b47e52..133fd323c9 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -102,9 +102,8 @@ def run(self): shutil.rmtree(tmp_dir) def upload_file(self, filename): - f = open(filename, 'rb') - content = f.read() - f.close() + with open(filename, 'rb') as f: + content = f.read() meta = self.distribution.metadata data = { ':action': 'doc_upload', From daf695c9c05db4f64d0c7d977054cf0a450d4839 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:34:47 -0400 Subject: [PATCH 5781/8469] Use bytes literals and simpler encoding logic when constructing multipart post --- setuptools/command/upload_docs.py | 34 +++++++++++++------------------ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 133fd323c9..638a1f6df4 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -21,15 +21,9 @@ from .upload import upload -errors = 'surrogateescape' if six.PY3 else 'strict' - - -# This is not just a replacement for byte literals -# but works as a general purpose encoder -def b(s, encoding='utf-8'): - if isinstance(s, six.text_type): - return s.encode(encoding, errors) - return s +def _encode(s): + errors = 'surrogateescape' if six.PY3 else 'strict' + return s.encode('utf-8', errors) class upload_docs(upload): @@ -111,16 +105,16 @@ def upload_file(self, filename): 'content': (os.path.basename(filename), content), } # set up the authentication - credentials = b(self.username + ':' + self.password) + credentials = _encode(self.username + ':' + self.password) credentials = standard_b64encode(credentials) if six.PY3: credentials = credentials.decode('ascii') auth = "Basic " + credentials # Build up the MIME payload for the POST data - boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = b('\n--') + b(boundary) - end_boundary = sep_boundary + b('--') + boundary = b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = b'\n--' + boundary + end_boundary = sep_boundary + b'--' body = [] for key, values in six.iteritems(data): title = '\nContent-Disposition: form-data; name="%s"' % key @@ -132,16 +126,16 @@ def upload_file(self, filename): title += '; filename="%s"' % value[0] value = value[1] else: - value = b(value) + value = _encode(value) body.append(sep_boundary) - body.append(b(title)) - body.append(b("\n\n")) + body.append(_encode(title)) + body.append(b"\n\n") body.append(value) - if value and value[-1:] == b('\r'): - body.append(b('\n')) # write an extra newline (lurve Macs) + if value and value[-1:] == b'\r': + body.append(b'\n') # write an extra newline (lurve Macs) body.append(end_boundary) - body.append(b("\n")) - body = b('').join(body) + body.append(b"\n") + body = b''.join(body) self.announce("Submitting documentation to %s" % (self.repository), log.INFO) From 81d8a9560f4a14fe5376f4d86643aa6bdf361869 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:45:38 -0400 Subject: [PATCH 5782/8469] Extract method for _build_parts. --- setuptools/command/upload_docs.py | 48 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 638a1f6df4..7136fea041 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -13,6 +13,7 @@ import zipfile import tempfile import shutil +import itertools from setuptools.extern import six from setuptools.extern.six.moves import http_client, urllib @@ -95,6 +96,26 @@ def run(self): finally: shutil.rmtree(tmp_dir) + @staticmethod + def _build_parts(data, sep_boundary): + for key, values in six.iteritems(data): + title = '\nContent-Disposition: form-data; name="%s"' % key + # handle multiple entries for the same name + if not isinstance(values, list): + values = [values] + for value in values: + if type(value) is tuple: + title += '; filename="%s"' % value[0] + value = value[1] + else: + value = _encode(value) + yield sep_boundary + yield _encode(title) + yield b"\n\n" + yield value + if value and value[-1:] == b'\r': + yield b'\n' # write an extra newline (lurve Macs) + def upload_file(self, filename): with open(filename, 'rb') as f: content = f.read() @@ -115,27 +136,12 @@ def upload_file(self, filename): boundary = b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = b'\n--' + boundary end_boundary = sep_boundary + b'--' - body = [] - for key, values in six.iteritems(data): - title = '\nContent-Disposition: form-data; name="%s"' % key - # handle multiple entries for the same name - if not isinstance(values, list): - values = [values] - for value in values: - if type(value) is tuple: - title += '; filename="%s"' % value[0] - value = value[1] - else: - value = _encode(value) - body.append(sep_boundary) - body.append(_encode(title)) - body.append(b"\n\n") - body.append(value) - if value and value[-1:] == b'\r': - body.append(b'\n') # write an extra newline (lurve Macs) - body.append(end_boundary) - body.append(b"\n") - body = b''.join(body) + end_items = end_boundary, b"\n", + body_items = itertools.chain( + self._build_parts(data, sep_boundary), + end_items, + ) + body = b''.join(body_items) self.announce("Submitting documentation to %s" % (self.repository), log.INFO) From 5e9c9d2fc751749e9ced584a548b197a552179bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:52:19 -0400 Subject: [PATCH 5783/8469] Extract method for _build_multipart --- setuptools/command/upload_docs.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 7136fea041..de38e8aff0 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -116,6 +116,21 @@ def _build_parts(data, sep_boundary): if value and value[-1:] == b'\r': yield b'\n' # write an extra newline (lurve Macs) + @classmethod + def _build_multipart(cls, data): + """ + Build up the MIME payload for the POST data + """ + boundary = b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = b'\n--' + boundary + end_boundary = sep_boundary + b'--' + end_items = end_boundary, b"\n", + body_items = itertools.chain( + cls._build_parts(data, sep_boundary), + end_items, + ) + return b''.join(body_items) + def upload_file(self, filename): with open(filename, 'rb') as f: content = f.read() @@ -132,16 +147,7 @@ def upload_file(self, filename): credentials = credentials.decode('ascii') auth = "Basic " + credentials - # Build up the MIME payload for the POST data - boundary = b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = b'\n--' + boundary - end_boundary = sep_boundary + b'--' - end_items = end_boundary, b"\n", - body_items = itertools.chain( - self._build_parts(data, sep_boundary), - end_items, - ) - body = b''.join(body_items) + body = self._build_multipart(data) self.announce("Submitting documentation to %s" % (self.repository), log.INFO) From 0e17685d76ce5b7f28b3396e362e3f960c912a37 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:55:31 -0400 Subject: [PATCH 5784/8469] Extract method for _build_part --- setuptools/command/upload_docs.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index de38e8aff0..86a7146844 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -96,9 +96,14 @@ def run(self): finally: shutil.rmtree(tmp_dir) - @staticmethod - def _build_parts(data, sep_boundary): + @classmethod + def _build_parts(cls, data, sep_boundary): for key, values in six.iteritems(data): + for part in cls._build_part(key, values): + yield part + + @staticmethod + def _build_part(key, values, sep_boundary): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if not isinstance(values, list): From 4b0aaa921e46afbfa2f98069ea016f80c3ab1c84 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 21:55:48 -0400 Subject: [PATCH 5785/8469] Normalize indent --- setuptools/command/upload_docs.py | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 86a7146844..4ad66c293b 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -104,22 +104,22 @@ def _build_parts(cls, data, sep_boundary): @staticmethod def _build_part(key, values, sep_boundary): - title = '\nContent-Disposition: form-data; name="%s"' % key - # handle multiple entries for the same name - if not isinstance(values, list): - values = [values] - for value in values: - if type(value) is tuple: - title += '; filename="%s"' % value[0] - value = value[1] - else: - value = _encode(value) - yield sep_boundary - yield _encode(title) - yield b"\n\n" - yield value - if value and value[-1:] == b'\r': - yield b'\n' # write an extra newline (lurve Macs) + title = '\nContent-Disposition: form-data; name="%s"' % key + # handle multiple entries for the same name + if not isinstance(values, list): + values = [values] + for value in values: + if type(value) is tuple: + title += '; filename="%s"' % value[0] + value = value[1] + else: + value = _encode(value) + yield sep_boundary + yield _encode(title) + yield b"\n\n" + yield value + if value and value[-1:] == b'\r': + yield b'\n' # write an extra newline (lurve Macs) @classmethod def _build_multipart(cls, data): From f84edd610dbc12497a79b172312e2061979f5523 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 22:05:47 -0400 Subject: [PATCH 5786/8469] Replace _build_parts with map and flatten. --- setuptools/command/upload_docs.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 4ad66c293b..3158c43584 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -14,6 +14,7 @@ import tempfile import shutil import itertools +import functools from setuptools.extern import six from setuptools.extern.six.moves import http_client, urllib @@ -96,14 +97,9 @@ def run(self): finally: shutil.rmtree(tmp_dir) - @classmethod - def _build_parts(cls, data, sep_boundary): - for key, values in six.iteritems(data): - for part in cls._build_part(key, values): - yield part - @staticmethod - def _build_part(key, values, sep_boundary): + def _build_part(item, sep_boundary): + key, values = item title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if not isinstance(values, list): @@ -130,10 +126,13 @@ def _build_multipart(cls, data): sep_boundary = b'\n--' + boundary end_boundary = sep_boundary + b'--' end_items = end_boundary, b"\n", - body_items = itertools.chain( - cls._build_parts(data, sep_boundary), - end_items, + builder = functools.partial( + cls._build_part, + sep_boundary=sep_boundary, ) + part_groups = map(builder, data.items()) + parts = itertools.chain.from_iterable(part_groups) + body_items = itertools.chain(parts, end_items) return b''.join(body_items) def upload_file(self, filename): From 1f1601d16b93b12451363b46b4b0725300f9b21b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 22:26:29 -0400 Subject: [PATCH 5787/8469] Return content type in _build_multipart --- setuptools/command/upload_docs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 3158c43584..01b4904616 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -133,7 +133,8 @@ def _build_multipart(cls, data): part_groups = map(builder, data.items()) parts = itertools.chain.from_iterable(part_groups) body_items = itertools.chain(parts, end_items) - return b''.join(body_items) + content_type = 'multipart/form-data; boundary=%s' % boundary + return b''.join(body_items), content_type def upload_file(self, filename): with open(filename, 'rb') as f: @@ -151,7 +152,7 @@ def upload_file(self, filename): credentials = credentials.decode('ascii') auth = "Basic " + credentials - body = self._build_multipart(data) + body, ct = self._build_multipart(data) self.announce("Submitting documentation to %s" % (self.repository), log.INFO) @@ -173,7 +174,7 @@ def upload_file(self, filename): try: conn.connect() conn.putrequest("POST", url) - content_type = 'multipart/form-data; boundary=%s' % boundary + content_type = ct conn.putheader('Content-type', content_type) conn.putheader('Content-length', str(len(body))) conn.putheader('Authorization', auth) From f0a0f6f4ac7bbe405d29c9312956ce973b3e4be0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 May 2016 22:35:19 -0400 Subject: [PATCH 5788/8469] Add test for build_multipart --- setuptools/tests/test_upload_docs.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index cc71cadb23..d3dee61664 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -57,3 +57,15 @@ def test_create_zipfile(self): with contextlib.closing(zipfile.ZipFile(tmp_file)) as zip_file: assert zip_file.namelist() == ['index.html'] + + def test_build_multipart(self): + data = dict( + a="foo", + b="bar", + file=('file.txt', b'content'), + ) + body, content_type = upload_docs._build_multipart(data) + assert 'form-data' in content_type + assert isinstance(body, bytes) + assert b'foo' in body + assert b'content' in body From 094a51dd604d96656ab68f0f64e3169ceebab59c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jun 2016 08:59:16 -0400 Subject: [PATCH 5789/8469] Move setuptools to beginning of user-agent header. Fixes #598. --- CHANGES.rst | 8 ++++++++ setuptools/package_index.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bceb8a2797..1eba41b1db 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v21.3.0 +------- + +* #598: Setuptools now lists itself first in the User-Agent + for web requests, better following the guidelines in + `RFC 7231 + `_. + v21.2.2 ------- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index c53343e4c8..567ab53afc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -202,8 +202,8 @@ def find_external_links(url, page): if match: yield urllib.parse.urljoin(url, htmldecode(match.group(1))) -user_agent = "Python-urllib/%s setuptools/%s" % ( - sys.version[:3], require('setuptools')[0].version +user_agent = "setuptools/%s Python-urllib/%s" % ( + require('setuptools')[0].version, sys.version[:3], ) class ContentChecker(object): From e53e6ea4b46eb0a746fc1549be5ba90c0d3bc7dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jun 2016 09:06:09 -0400 Subject: [PATCH 5790/8469] Use newer string formatting for rendering user agent. Re-use __version__ from main package. --- setuptools/package_index.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 567ab53afc..e87504db66 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -17,6 +17,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map +import setuptools from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, require, Environment, find_distributions, safe_name, safe_version, @@ -46,6 +47,11 @@ _SOCKET_TIMEOUT = 15 + +_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" +user_agent = _tmpl.format(py_major=sys.version[:3], **globals()) + + def parse_bdist_wininst(name): """Return (base,pyversion) or (None,None) for possible .exe name""" @@ -202,9 +208,6 @@ def find_external_links(url, page): if match: yield urllib.parse.urljoin(url, htmldecode(match.group(1))) -user_agent = "setuptools/%s Python-urllib/%s" % ( - require('setuptools')[0].version, sys.version[:3], -) class ContentChecker(object): """ From 7851c724c3a0d8529fb3b03b938b173083d62dac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jun 2016 09:07:44 -0400 Subject: [PATCH 5791/8469] =?UTF-8?q?Bump=20version:=2021.2.2=20=E2=86=92?= =?UTF-8?q?=2022.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ad8e1292de..e094371798 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 21.2.2 +current_version = 22.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 391cacae76..cc4909505b 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="21.2.2", + version="22.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 031e535529afe83cf47463ca3866f3cf8513ee34 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jun 2016 09:07:44 -0400 Subject: [PATCH 5792/8469] Added tag v22.0.0 for changeset 451fbedb4c22 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5f9296f389..d89ecbb2e6 100644 --- a/.hgtags +++ b/.hgtags @@ -266,3 +266,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 9959424676a4aac1c14e430ff6f4210fdb0442d9 v21.2.0 694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 +451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 From 7dadb206287fccf173e9e3f7eaed8b79fe03dae4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jun 2016 09:26:35 -0400 Subject: [PATCH 5793/8469] Update changelog to reflect unintended bumpversion --- CHANGES.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1eba41b1db..77edc67ba6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,9 +2,12 @@ CHANGES ======= -v21.3.0 +v22.0.0 ------- +Intended to be v21.3.0, but jaraco accidentally released as +a major bump. + * #598: Setuptools now lists itself first in the User-Agent for web requests, better following the guidelines in `RFC 7231 From 11d5bb9e47754f0f4ded5379450e83e29d3661fb Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Thu, 2 Jun 2016 11:58:43 +0200 Subject: [PATCH 5794/8469] Fixing #190 following proposal by @jaraco --- setuptools/command/build_py.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 758a3fdfe8..0bad829525 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,6 +8,7 @@ import distutils.errors import itertools +from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse try: @@ -66,6 +67,9 @@ def __getattr__(self, attr): return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): + if six.PY2 and isinstance(package, six.string_types): + # avoid errors on Python 2 when unicode is passed (#190) + package = package.split('.') outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: From 3f054be58270984d4c8e5b1e499f573dbae02975 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 2 Jun 2016 10:07:09 +0000 Subject: [PATCH 5795/8469] Issue #27171: Fix typos in documentation, comments, and test function names --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 366ffbec9f..8f62b1a848 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -279,7 +279,7 @@ def test_get_source_files(self): def test_compiler_option(self): # cmd.compiler is an option and - # should not be overriden by a compiler instance + # should not be overridden by a compiler instance # when the command is run dist = Distribution() cmd = self.build_ext(dist) From 29389166af9931b6a533a60556d9c6e6929b71b1 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 2 Jun 2016 13:45:53 -0700 Subject: [PATCH 5796/8469] Issue #21776: distutils.upload now correctly handles HTTPError Initial patch by Claudiu Popa. --- command/upload.py | 14 +++++++------- tests/test_upload.py | 31 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/command/upload.py b/command/upload.py index 1c4fc48a12..0afcbf233e 100644 --- a/command/upload.py +++ b/command/upload.py @@ -181,21 +181,21 @@ def upload_file(self, command, pyversion, filename): result = urlopen(request) status = result.getcode() reason = result.msg - except OSError as e: - self.announce(str(e), log.ERROR) - raise except HTTPError as e: status = e.code reason = e.msg + except OSError as e: + self.announce(str(e), log.ERROR) + raise if status == 200: self.announce('Server response (%s): %s' % (status, reason), log.INFO) + if self.show_response: + text = self._read_pypi_response(result) + msg = '\n'.join(('-' * 75, text, '-' * 75)) + self.announce(msg, log.INFO) else: msg = 'Upload failed (%s): %s' % (status, reason) self.announce(msg, log.ERROR) raise DistutilsError(msg) - if self.show_response: - text = self._read_pypi_response(result) - msg = '\n'.join(('-' * 75, text, '-' * 75)) - self.announce(msg, log.INFO) diff --git a/tests/test_upload.py b/tests/test_upload.py index dccaf77e3e..19193d5b05 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -1,13 +1,16 @@ """Tests for distutils.command.upload.""" import os import unittest +import unittest.mock as mock +from urllib.request import HTTPError + from test.support import run_unittest from distutils.command import upload as upload_mod from distutils.command.upload import upload from distutils.core import Distribution from distutils.errors import DistutilsError -from distutils.log import INFO +from distutils.log import ERROR, INFO from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase @@ -144,6 +147,32 @@ def test_upload_fails(self): self.next_code = 404 self.assertRaises(DistutilsError, self.test_upload) + def test_wrong_exception_order(self): + tmp = self.mkdtemp() + path = os.path.join(tmp, 'xxx') + self.write_file(path) + dist_files = [('xxx', '2.6', path)] # command, pyversion, filename + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) + + pkg_dir, dist = self.create_dist(dist_files=dist_files) + tests = [ + (OSError('oserror'), 'oserror', OSError), + (HTTPError('url', 400, 'httperror', {}, None), + 'Upload failed (400): httperror', DistutilsError), + ] + for exception, expected, raised_exception in tests: + with self.subTest(exception=type(exception).__name__): + with mock.patch('distutils.command.upload.urlopen', + new=mock.Mock(side_effect=exception)): + with self.assertRaises(raised_exception): + cmd = upload(dist) + cmd.ensure_finalized() + cmd.run() + results = self.get_logs(ERROR) + self.assertIn(expected, results[-1]) + self.clear_logs() + + def test_suite(): return unittest.makeSuite(uploadTestCase) From aa96da3cae9512054399bb99ed7ecd098f8d671e Mon Sep 17 00:00:00 2001 From: Michael Klich Date: Thu, 2 Jun 2016 22:02:30 +0100 Subject: [PATCH 5797/8469] Update link to Resource Management API --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 57818281b8..807a2722eb 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -917,7 +917,7 @@ use its resource management API. See also `Accessing Package Resources`_ for a quick example of converting code that uses ``__file__`` to use ``pkg_resources`` instead. -.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PythonEggs#resource-management +.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PkgResources#resourcemanager-api .. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources From e72668091ee1b8e4358a84260ac0cf0ea06b4dea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 09:10:19 -0400 Subject: [PATCH 5798/8469] Extract context manager for project_on_sys_path in test command --- setuptools/command/test.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 371e913b6f..39746a02bf 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,6 +1,7 @@ +import sys +import contextlib from distutils.errors import DistutilsOptionError from unittest import TestLoader -import sys from setuptools.extern import six from setuptools.extern.six.moves import map @@ -102,6 +103,14 @@ def _test_args(self): yield self.test_suite def with_project_on_sys_path(self, func): + """ + Backward compatibility for project_on_sys_path context. + """ + with self.project_on_sys_path(): + func() + + @contextlib.contextmanager + def project_on_sys_path(self): with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False) if with_2to3: @@ -137,7 +146,7 @@ def with_project_on_sys_path(self, func): working_set.__init__() add_activation_listener(lambda dist: dist.activate()) require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) - func() + yield finally: sys.path[:] = old_path sys.modules.clear() @@ -154,9 +163,11 @@ def run(self): cmd = ' '.join(self._argv) if self.dry_run: self.announce('skipping "%s" (dry run)' % cmd) - else: - self.announce('running "%s"' % cmd) - self.with_project_on_sys_path(self.run_tests) + return + + self.announce('running "%s"' % cmd) + with self.project_on_sys_path(): + self.run_tests() def run_tests(self): # Purge modules under test from sys.modules. The test loader will From 2c937bc53f208ab7b604f83c0c349b3ff9c6e5bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 09:52:52 -0400 Subject: [PATCH 5799/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 77edc67ba6..93447eb5c3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v22.0.1 +------- + +* #190: On Python 2, if unicode is passed for packages to + ``build_py`` command, it will be handled just as with + text on Python 3. + v22.0.0 ------- From 6e927802f1a25c83cf4055c4880804a349419dfb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 09:54:13 -0400 Subject: [PATCH 5800/8469] =?UTF-8?q?Bump=20version:=2022.0.0=20=E2=86=92?= =?UTF-8?q?=2022.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e094371798..89a7024ee6 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.0 +current_version = 22.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index cc4909505b..9c296f9d99 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.0", + version="22.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 62edd467886ff9dd1b67fd213b2aab98af55eb0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 09:54:14 -0400 Subject: [PATCH 5801/8469] Added tag v22.0.1 for changeset f5c4923b0400 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d89ecbb2e6..69687f0eb5 100644 --- a/.hgtags +++ b/.hgtags @@ -267,3 +267,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 +f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 From f1c0149b8f25325e2f75367289ee2732396b85f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:00:37 -0400 Subject: [PATCH 5802/8469] Upload setuptools releases to pypi.io (Warehouse). Fixes #589 (presumably). --- CHANGES.rst | 5 +++++ setup.cfg | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 93447eb5c3..b74c21897d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v22.0.2 +------- + +* #589: Releases are now uploaded to pypi.io (Warehouse). + v22.0.1 ------- diff --git a/setup.cfg b/setup.cfg index 89a7024ee6..33519ff2c5 100755 --- a/setup.cfg +++ b/setup.cfg @@ -19,6 +19,9 @@ source-dir = docs/ build-dir = docs/build all_files = 1 +[upload] +repository = https://pypi.io/pypi + [upload_docs] upload-dir = docs/build/html From 6ce8d8325e807dab5d8e3c91b275c9edecf28735 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:00:45 -0400 Subject: [PATCH 5803/8469] =?UTF-8?q?Bump=20version:=2022.0.1=20=E2=86=92?= =?UTF-8?q?=2022.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 33519ff2c5..613f38d31e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.1 +current_version = 22.0.2 commit = True tag = True diff --git a/setup.py b/setup.py index 9c296f9d99..23966bd249 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.1", + version="22.0.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 0cb7d00601c451faca392b652273dadfd85ca6fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:00:45 -0400 Subject: [PATCH 5804/8469] Added tag v22.0.2 for changeset 8610a8b9635f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 69687f0eb5..7a9528868a 100644 --- a/.hgtags +++ b/.hgtags @@ -268,3 +268,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 +8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 From 108198edebeb655c6ad04ebefd6af9208a7ff863 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:30:03 -0400 Subject: [PATCH 5805/8469] Specify the repository URL in Travis config also. Fixes #589. --- .travis.yml | 1 + CHANGES.rst | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index feeb039fcd..de2bd43c06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 deploy: provider: pypi + server: https://pypi.io/pypi on: tags: true all_branches: true diff --git a/CHANGES.rst b/CHANGES.rst index b74c21897d..3f17c5da78 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v22.0.3 +------- + +* #589: Releases are now uploaded to pypi.io (Warehouse) + even when releases are made on Twine via Travis. + v22.0.2 ------- From ffe7c1a456338ae5db59e1bfaa4bd10bc8c3fec8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:30:10 -0400 Subject: [PATCH 5806/8469] =?UTF-8?q?Bump=20version:=2022.0.2=20=E2=86=92?= =?UTF-8?q?=2022.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 613f38d31e..db9b1e3b6c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.2 +current_version = 22.0.3 commit = True tag = True diff --git a/setup.py b/setup.py index 23966bd249..8a54b28100 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.2", + version="22.0.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 64ff31db2f1edf67ae8f1039531de80ce82eff0f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 10:30:10 -0400 Subject: [PATCH 5807/8469] Added tag v22.0.3 for changeset efee7d74a847 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7a9528868a..15c155a2bc 100644 --- a/.hgtags +++ b/.hgtags @@ -269,3 +269,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 +efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 From 8e3d9f9642b83da914bc3c752fcb229a3d552a3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:22:44 -0400 Subject: [PATCH 5808/8469] Update the upload endpoint to use a different hostname and path. Ref #589. --- .travis.yml | 3 ++- CHANGES.rst | 6 ++++++ setup.cfg | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index de2bd43c06..e91f7e783f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,8 @@ before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 deploy: provider: pypi - server: https://pypi.io/pypi + # Also update server in setup.cfg + server: https://upload.pypi.io/legacy/ on: tags: true all_branches: true diff --git a/CHANGES.rst b/CHANGES.rst index 3f17c5da78..df0c9824bf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v22.0.4 +------- + +* #589: Upload releases to pypi.io using the upload + hostname and legacy path. + v22.0.3 ------- diff --git a/setup.cfg b/setup.cfg index db9b1e3b6c..bca1dae28d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,8 @@ build-dir = docs/build all_files = 1 [upload] -repository = https://pypi.io/pypi +# also update in .travis.yml +repository = https://upload.pypi.io/legacy/ [upload_docs] upload-dir = docs/build/html From 6c4b4d0bf6ae8ee190ef9be7d80c2c11a6be0e3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:22:51 -0400 Subject: [PATCH 5809/8469] =?UTF-8?q?Bump=20version:=2022.0.3=20=E2=86=92?= =?UTF-8?q?=2022.0.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index bca1dae28d..82a735888c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.3 +current_version = 22.0.4 commit = True tag = True @@ -20,7 +20,6 @@ build-dir = docs/build all_files = 1 [upload] -# also update in .travis.yml repository = https://upload.pypi.io/legacy/ [upload_docs] diff --git a/setup.py b/setup.py index 8a54b28100..7baa60b9b1 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.3", + version="22.0.4", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 68a155efd0441f6ba87e4327b7a08fb22f5912af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:22:51 -0400 Subject: [PATCH 5810/8469] Added tag v22.0.4 for changeset 77b20c09b047 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 15c155a2bc..6f1f50329e 100644 --- a/.hgtags +++ b/.hgtags @@ -270,3 +270,4 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 +77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 From 9be2402fe54f0fff1af9e0d2c420c18e62a318af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:29:36 -0400 Subject: [PATCH 5811/8469] Try semicolon for comment --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 82a735888c..47248a67d8 100755 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,7 @@ build-dir = docs/build all_files = 1 [upload] +; also update .travis.yml repository = https://upload.pypi.io/legacy/ [upload_docs] From 01e1054c171649eb7d29659855a6879197de1c6e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:42:30 -0400 Subject: [PATCH 5812/8469] Override the repository for uploading docs (back to default). Fixes #604. --- CHANGES.rst | 6 ++++++ setup.cfg | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index df0c9824bf..b763607c7f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v22.0.5 +------- + +* #604: Restore repository for upload_docs command + to restore publishing of docs during release. + v22.0.4 ------- diff --git a/setup.cfg b/setup.cfg index 47248a67d8..e34ebee731 100755 --- a/setup.cfg +++ b/setup.cfg @@ -25,6 +25,7 @@ repository = https://upload.pypi.io/legacy/ [upload_docs] upload-dir = docs/build/html +repository = https://pypi.python.org/pypi [sdist] formats = gztar zip From 3b3b06f8da98aa888d99bdcca91a627f3baf2a5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:42:38 -0400 Subject: [PATCH 5813/8469] =?UTF-8?q?Bump=20version:=2022.0.4=20=E2=86=92?= =?UTF-8?q?=2022.0.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index e34ebee731..4d0b30ff38 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.4 +current_version = 22.0.5 commit = True tag = True @@ -20,7 +20,6 @@ build-dir = docs/build all_files = 1 [upload] -; also update .travis.yml repository = https://upload.pypi.io/legacy/ [upload_docs] diff --git a/setup.py b/setup.py index 7baa60b9b1..6cde31f798 100755 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.4", + version="22.0.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f12843c138838ec8b42faa092c40afb709b63e25 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 11:42:39 -0400 Subject: [PATCH 5814/8469] Added tag v22.0.5 for changeset d5832e5deb77 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6f1f50329e..86954cd885 100644 --- a/.hgtags +++ b/.hgtags @@ -271,3 +271,4 @@ f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 +d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 From ffddefca6a6974f8f02a992f132e3e7a1feadcea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 13:38:40 -0400 Subject: [PATCH 5815/8469] Add rst.linker to docs requirements. --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000..442df9fad8 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +rst.linker From 8fea56035d22fc46e8237fa8f6b1b548fd0105d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 14:15:57 -0400 Subject: [PATCH 5816/8469] Patch changelog relative to 'docs' now that docs are built in RTD --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 604e7138e5..07d6ad41ca 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,7 +200,7 @@ #latex_use_modindex = True link_files = { - 'CHANGES.rst': dict( + '../CHANGES.rst': dict( using=dict( BB='https://bitbucket.org', GH='https://github.com', From a99a2b3ef7bc932d561a622fde9f5f81aaf2bada Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 21:20:48 -0400 Subject: [PATCH 5817/8469] Bump rst.linker for RTD support --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 442df9fad8..0871ed76ae 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1 @@ -rst.linker +rst.linker>=1.6.1 From 12e8b4c7d283cfbe4432703ee9698ef7232fdd77 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jun 2016 21:31:16 -0400 Subject: [PATCH 5818/8469] No longer build docs using 'build_sphinx' command and instead rely on RTD. Ref #604. --- setup.cfg | 11 +---------- setup.py | 4 +--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4d0b30ff38..0d1ea3acb7 100755 --- a/setup.cfg +++ b/setup.cfg @@ -9,23 +9,14 @@ tag_date = 1 [aliases] clean_egg_info = egg_info -RDb '' -release = clean_egg_info sdist bdist_wheel build_sphinx +release = clean_egg_info sdist bdist_wheel source = register sdist binary binary = bdist_egg upload --show-response test = pytest -[build_sphinx] -source-dir = docs/ -build-dir = docs/build -all_files = 1 - [upload] repository = https://upload.pypi.io/legacy/ -[upload_docs] -upload-dir = docs/build/html -repository = https://pypi.python.org/pypi - [sdist] formats = gztar zip diff --git a/setup.py b/setup.py index 6cde31f798..98b046f822 100755 --- a/setup.py +++ b/setup.py @@ -61,8 +61,6 @@ def _gen_console_scripts(): needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] -needs_sphinx = set(['build_sphinx', 'upload_docs', 'release']).intersection(sys.argv) -sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else [] needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] @@ -158,7 +156,7 @@ def _gen_console_scripts(): 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ - ] + sphinx + pytest_runner + wheel, + ] + pytest_runner + wheel, ) if __name__ == '__main__': From f43c0f0651edfe1f52b0a178cfe2a5234a008af0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jun 2016 09:15:26 -0400 Subject: [PATCH 5819/8469] Add badge for docs --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f94c6fcb46..4f833ecfc4 100755 --- a/README.rst +++ b/README.rst @@ -5,7 +5,8 @@ Installing and Using Setuptools .. contents:: **Table of Contents** -`Change History `_. +.. image:: https://setuptools.readthedocs.io/en/latest/?badge=latest + :target: https://setuptools.readthedocs.io ------------------------- Installation Instructions From f1c18134f23f8ad7cbf624097e242939bb540fa2 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Sun, 5 Jun 2016 00:41:58 +0200 Subject: [PATCH 5820/8469] - Issue #26884: Fix linking extension modules for cross builds. Patch by Xavier de Gaye. --- command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index d4cb11e6db..f03a4e31d8 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -748,7 +748,7 @@ def get_libraries(self, ext): if sysconfig.get_config_var('Py_ENABLE_SHARED'): pythonlib = 'python{}.{}{}'.format( sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, - sys.abiflags) + sysconfig.get_config_var('ABIFLAGS')) return ext.libraries + [pythonlib] else: return ext.libraries From 5b8e477917ada86de6f23ffe5ba9831b258e9329 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Sun, 5 Jun 2016 01:17:57 +0200 Subject: [PATCH 5821/8469] - Issue #21272: Use _sysconfigdata.py to initialize distutils.sysconfig. --- sysconfig.py | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index d203f8e42b..f205dcadeb 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -415,38 +415,11 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" - g = {} - # load the installed Makefile: - try: - filename = get_makefile_filename() - parse_makefile(filename, g) - except OSError as msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # load the installed pyconfig.h: - try: - filename = get_config_h_filename() - with open(filename) as file: - parse_config_h(file, g) - except OSError as msg: - my_msg = "invalid Python installation: unable to open %s" % filename - if hasattr(msg, "strerror"): - my_msg = my_msg + " (%s)" % msg.strerror - - raise DistutilsPlatformError(my_msg) - - # On AIX, there are wrong paths to the linker scripts in the Makefile - # -- these paths are relative to the Python source, but when installed - # the scripts are in another directory. - if python_build: - g['LDSHARED'] = g['BLDSHARED'] - + # _sysconfigdata is generated at build time, see the sysconfig module + from _sysconfigdata import build_time_vars global _config_vars - _config_vars = g + _config_vars = {} + _config_vars.update(build_time_vars) def _init_nt(): From 16361e51b834153f2e0e96897ebf33163c18016b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Jun 2016 15:14:16 -0400 Subject: [PATCH 5822/8469] Remove ARM launchers. Fixes #611. --- CHANGES.rst | 7 +++++++ msvc-build-launcher.cmd | 16 ---------------- setuptools/cli-arm-32.exe | Bin 69120 -> 0 bytes setuptools/command/easy_install.py | 3 --- setuptools/gui-arm-32.exe | Bin 69120 -> 0 bytes 5 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 setuptools/cli-arm-32.exe delete mode 100644 setuptools/gui-arm-32.exe diff --git a/CHANGES.rst b/CHANGES.rst index b763607c7f..f13e8c6225 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v23.0.0 +------- + +* #611: Removed ARM executables for CLI and GUI script + launchers on Windows. If this was a feature you cared + about, please comment in the ticket. + v22.0.5 ------- diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index e54c4f6c33..92da290ed1 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -35,21 +35,5 @@ if "%ERRORLEVEL%"=="0" ( echo Windows SDK 6.1 not found to build Windows 64-bit version ) -REM Windows RT ARM build requires both freeware -REM "Visual Studio Express 2012 for Windows 8" and -REM "Visual Studio Express 2012 for Windows Desktop" to be installed from -REM http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products -set PATH=%PATH_OLD% -set PATH=C:\Program Files\Microsoft Visual Studio 11.0\VC;%PATH% -set PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC;%PATH% -call VCVARSALL x86_arm >nul 2>&1 -if "%ERRORLEVEL%"=="0" ( - echo Building Windows RT Version ... - cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:CONSOLE /out:setuptools/cli-arm-32.exe - cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:WINDOWS /out:setuptools/gui-arm-32.exe -) else ( - echo Visual Studio ^(Express^) 2012 not found to build Windows RT Version -) - set PATH=%PATH_OLD% diff --git a/setuptools/cli-arm-32.exe b/setuptools/cli-arm-32.exe deleted file mode 100644 index 2f40402d4370fd0b032331896762593dd75b5ae0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69120 zcmeFa3s_Xwxj(%2o(luRWdu|}G#dt$Fo2_|LBV7kb)ybO;w3eSse_0aq5=Zun3@Y} zl9D?So1&PM*0jNx^e|p>B+(O_Id{ro~8_ZivZjZZqHS-FpTxNiXO5 zf8Y6k&v^>Z+V9$Hugkmc?|Rp7tyyw=BhxU(v@pRSW5+=0&!#;8&Vyqt_PW<%*^$WK zr5)pnf0wqxRZ%Nc*HqnAQ@TkgE3K@osuR|h3pHCRg^EgH{?g^brmA)2xiK+O8KJ1( zzaggZnOn=M!Y1yk7pi`M_mxd;RZR;0d5FGJwOx6CS$Tiv*0ohX!TUt`+Xeb+qr0k6 zp)ZB#zbbTDMVX7@{%biYS-{xaoSuC-|BhS2etayQGjc{`4laqR>!Zn_CK!Rs*5UhSF?bMPl-Cg7uql56W6s=~b)|Ksj8#X#2@cEv6Av@u&jzk@ zRd1|>io*&+GzDhFpN+ATxz(yiAGyOp@s~<3SO07jUrlXI8Jv_dLD?w&CS3JHHk;zF zd}9?nij~yNVw^?(t*QVjp z#<`k{BE+RqdgS*~SsKe=x%Dz@y#Cx$X|(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g0&tMmzagFa2aUEiv==}+oE)3@u*F=a7TF|{#U zVwz*Z<7dQca=rmo1 z&Z6I-Z`L2xAJgZ>J``(-eIm9wc3147*dwt-adv!O{KEKx_{R7x@y+qa;%)I~TBjHK+OyrhDprAelw;v{oY zSyF2fCDIJKm^MM1p*3sEwEhw5h~W{YsNyJdR9RG2R4sCws7s5^h~6IE8oe_*oR@hl zayw0*5tAL07qc+tRLt2JM+~JqEiof8J25YDVIq}z``k-&JLX=S%S>pC5DmpZ98;_} z>qAg7&iL+lQ(|!a8}dpGX=I9uGw zxKnXw;~a6H#kI#>ip!X@eNO9~kOWOaSVDNhfrLW|N09F5#Ms1riByiK63-^)B`tKP z8WC7{QQ-Vbv^JLWS9rvX2yH}mL|(+gRRxiGu?u4hVwc96VvA$Vv1PH@ad~mWJ^?6CyHH!8HED~r=E$UQb&==SLj=nm!l{I_366x%5;_vDB{&nh6Ih}mQI+VQs7@T7s7VY<3{RYq ls7)mP@bGHE+@*6(bBpI9U;h34I|u%q1OLu}|D`$be*m(8q7(oC From dac38d28df3cfa1afb4370e2303c87822f1ffb86 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Jun 2016 15:16:24 -0400 Subject: [PATCH 5823/8469] Update changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f13e8c6225..a645529280 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,9 @@ v23.0.0 * #611: Removed ARM executables for CLI and GUI script launchers on Windows. If this was a feature you cared about, please comment in the ticket. +* #604: Removed docs building support. The project + now relies on documentation hosted at + https://setuptools.readthedocs.io/. v22.0.5 ------- From cb0a2aeb86953d6b3cf6f039bb887fb8c7e8d1e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Jun 2016 15:18:34 -0400 Subject: [PATCH 5824/8469] =?UTF-8?q?Bump=20version:=2022.0.5=20=E2=86=92?= =?UTF-8?q?=2023.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0d1ea3acb7..e21e1c2b97 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.5 +current_version = 23.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 98b046f822..8642ea34eb 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="22.0.5", + version="23.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a73ca4fdcd1ba386159eb6ceb66d40af674a034c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Jun 2016 15:18:34 -0400 Subject: [PATCH 5825/8469] Added tag v23.0.0 for changeset 8664c631bf3a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 86954cd885..d43b8997d8 100644 --- a/.hgtags +++ b/.hgtags @@ -272,3 +272,4 @@ f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 +8664c631bf3a817a7deba86c13b67eccc1f81091 v23.0.0 From 7c3fafbc0017fa29a42d0eda69b37b37c4b465c2 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 10 Jun 2016 23:00:52 +0300 Subject: [PATCH 5826/8469] Issue #20900: distutils register command now decodes HTTP responses correctly Initial patch by ingrid. --- command/register.py | 6 +++--- tests/test_register.py | 14 ++++++++++++++ tests/test_upload.py | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/command/register.py b/command/register.py index b49f86fe58..86343c8017 100644 --- a/command/register.py +++ b/command/register.py @@ -296,9 +296,9 @@ def post_to_server(self, data, auth=None): result = 500, str(e) else: if self.show_response: - data = result.read() + data = self._read_pypi_response(result) result = 200, 'OK' if self.show_response: - dashes = '-' * 75 - self.announce('%s%r%s' % (dashes, data, dashes)) + msg = '\n'.join(('-' * 75, data, '-' * 75)) + self.announce(msg, log.INFO) return result diff --git a/tests/test_register.py b/tests/test_register.py index 6180133994..01acf2375f 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -301,6 +301,20 @@ def test_list_classifiers(self): results = self.get_logs(INFO) self.assertEqual(results, ['running check', 'xxx']) + def test_show_response(self): + # test that the --show-response option return a well formatted response + cmd = self._get_cmd() + inputs = Inputs('1', 'tarek', 'y') + register_module.input = inputs.__call__ + cmd.show_response = 1 + try: + cmd.run() + finally: + del register_module.input + + results = self.get_logs(INFO) + self.assertEqual(results[3], 75 * '-' + '\nxxx\n' + 75 * '-') + def test_suite(): return unittest.makeSuite(RegisterTestCase) diff --git a/tests/test_upload.py b/tests/test_upload.py index 19193d5b05..964aac7e80 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -140,7 +140,7 @@ def test_upload(self): # The PyPI response body was echoed results = self.get_logs(INFO) - self.assertIn('xyzzy\n', results[-1]) + self.assertEqual(results[-1], 75 * '-' + '\nxyzzy\n' + 75 * '-') def test_upload_fails(self): self.next_msg = "Not Found" From 9070733b989cf7350ff11aab41f0d6f541700f84 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Tue, 14 Jun 2016 08:55:19 +0200 Subject: [PATCH 5827/8469] - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS. --- sysconfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysconfig.py b/sysconfig.py index f205dcadeb..e9cc4a95d4 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -242,6 +242,8 @@ def get_makefile_filename(): return os.path.join(_sys_home or project_base, "Makefile") lib_dir = get_python_lib(plat_specific=0, standard_lib=1) config_file = 'config-{}{}'.format(get_python_version(), build_flags) + if hasattr(sys.implementation, '_multiarch'): + config_file += '-%s' % sys.implementation._multiarch return os.path.join(lib_dir, config_file, 'Makefile') From 089c6f4fa347563cf9753ea0370723ed1b00bc89 Mon Sep 17 00:00:00 2001 From: "doko@ubuntu.com" Date: Tue, 14 Jun 2016 09:22:16 +0200 Subject: [PATCH 5828/8469] - Issue #23968: Update distutils/sysconfig.py to look for the renamed _sysconfigdata module too. --- sysconfig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index e9cc4a95d4..f72b7f5a19 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -418,7 +418,9 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" # _sysconfigdata is generated at build time, see the sysconfig module - from _sysconfigdata import build_time_vars + name = '_sysconfigdata_' + sys.abiflags + _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + build_time_vars = _temp.build_time_vars global _config_vars _config_vars = {} _config_vars.update(build_time_vars) From 9abc044eeb7c6c4acc72c0f537cc249e817b83e3 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 14 Jun 2016 20:01:41 +0200 Subject: [PATCH 5829/8469] Some fixes - Fix issue #593 - Fix some forgotten "vcver" => "vc_ver" renames in previous commit. - Add comment on why I didn't followed PEP8 for some variables names. --- setuptools/msvc9_support.py | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index d4b7521a58..d1ed2edc93 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -202,7 +202,7 @@ def msvc14_get_vc_env(plat_spec): # If error, try to set environment directly try: - return EnvironmentInfo(plat_spec, vcvermin=14.0).return_env() + return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, 14.0) raise @@ -237,7 +237,7 @@ def _augment_exception(exc, version, arch=''): message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 - exc.args[0] = message + exc.args = (message, ) class PlatformInfo: @@ -460,6 +460,8 @@ class SystemInfo: vc_ver: float Required Microsoft Visual C++ version. """ + # Variables and properties in this class use originals CamelCase variables + # names from Microsoft source files for more easy comparaison. WinDir = safe_env['WinDir'] ProgramFiles = safe_env['ProgramFiles'] ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) @@ -481,7 +483,7 @@ def find_available_vc_vers(self): Find all available Microsoft Visual C++ versions. """ vckeys = (self.ri.vc, self.ri.vc_for_python) - vsvers = [] + vc_vers = [] for hkey in self.ri.HKEYS: for key in vckeys: try: @@ -492,18 +494,18 @@ def find_available_vc_vers(self): for i in range(values): try: ver = float(winreg.EnumValue(bkey, i)[0]) - if ver not in vsvers: - vsvers.append(ver) + if ver not in vc_vers: + vc_vers.append(ver) except ValueError: pass for i in range(subkeys): try: ver = float(winreg.EnumKey(bkey, i)) - if ver not in vsvers: - vsvers.append(ver) + if ver not in vc_vers: + vc_vers.append(ver) except ValueError: pass - return sorted(vsvers) + return sorted(vc_vers) @property def VSInstallDir(self): @@ -527,18 +529,18 @@ def VCInstallDir(self): guess_vc = os.path.join(self.ProgramFilesx86, default) # Try to get "VC++ for Python" path from registry as default path - path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) - python_vc = self.ri.lookup(path, 'installdir') + reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) + python_vc = self.ri.lookup(reg_path, 'installdir') default_vc = os.path.join(python_vc, 'VC') if python_vc else guess_vc # Try to get path from registry, if fail use default path - result = self.ri.lookup(self.ri.vc, '%0.1f' % self.vc_ver) or default_vc + path = self.ri.lookup(self.ri.vc, '%0.1f' % self.vc_ver) or default_vc - if not os.path.isdir(result): + if not os.path.isdir(path): msg = 'Microsoft Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) - return result + return path @property def WindowsSdkVersion(self): @@ -758,6 +760,8 @@ class EnvironmentInfo: vc_min_ver: float Minimum Microsoft Visual C++ version. """ + # Variables and properties in this class use originals CamelCase variables + # names from Microsoft source files for more easy comparaison. def __init__(self, arch, vc_ver=None, vc_min_ver=None): self.pi = PlatformInfo(arch) self.ri = RegistryInfo(self.pi) @@ -773,7 +777,7 @@ def vc_ver(self): """ Microsoft Visual C++ version. """ - return self.si.vcver + return self.si.vc_ver @property def VSTools(self): @@ -1101,7 +1105,7 @@ def return_env(self, exists=True): self.FSharp], exists), ) - if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist): + if self.vc_ver >= 14 and os.path.isfile(self.VCRuntimeRedist): env['py_vcruntime_redist'] = self.VCRuntimeRedist return env From 7b9d0828be06389c7e81946ba049231396eb9f3d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Fri, 17 Jun 2016 09:32:38 -0700 Subject: [PATCH 5830/8469] Issue #27048: Prevents distutils failing on Windows when environment variables contain non-ASCII characters --- _msvccompiler.py | 6 ++---- tests/test_msvccompiler.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index d0ba7d6d1e..b120273fe9 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -86,11 +86,9 @@ def _get_vc_env(plat_spec): try: out = subprocess.check_output( - '"{}" {} && set'.format(vcvarsall, plat_spec), - shell=True, + 'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec), stderr=subprocess.STDOUT, - universal_newlines=True, - ) + ).decode('utf-16le', errors='replace') except subprocess.CalledProcessError as exc: log.error(exc.output) raise DistutilsPlatformError("Error executing {}" diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index c4d911ff83..4dc24886c8 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -83,6 +83,24 @@ def test_vcruntime_skip_copy(self): self.assertFalse(os.path.isfile(os.path.join( tempdir, os.path.basename(dll)))) + def test_get_vc_env_unicode(self): + import distutils._msvccompiler as _msvccompiler + + test_var = 'ṰḖṤṪ┅ṼẨṜ' + test_value = '₃â´â‚…' + + # Ensure we don't early exit from _get_vc_env + old_distutils_use_sdk = os.environ.pop('DISTUTILS_USE_SDK', None) + os.environ[test_var] = test_value + try: + env = _msvccompiler._get_vc_env('x86') + self.assertIn(test_var.lower(), env) + self.assertEqual(test_value, env[test_var.lower()]) + finally: + os.environ.pop(test_var) + if old_distutils_use_sdk: + os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From 574bde6ee98b09b974ac5e0adbe46eeebc5173b6 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sat, 18 Jun 2016 21:42:37 +0300 Subject: [PATCH 5831/8469] Issue #27349: Fix typo in distutils upload command --- command/upload.py | 2 +- tests/test_upload.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/command/upload.py b/command/upload.py index 0afcbf233e..1fd574a9f1 100644 --- a/command/upload.py +++ b/command/upload.py @@ -91,7 +91,7 @@ def upload_file(self, command, pyversion, filename): data = { # action ':action': 'file_upload', - 'protcol_version': '1', + 'protocol_version': '1', # identify release 'name': meta.get_name(), diff --git a/tests/test_upload.py b/tests/test_upload.py index 964aac7e80..3eecf8afd4 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -130,13 +130,14 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) - self.assertEqual(headers['Content-length'], '2161') + self.assertEqual(headers['Content-length'], '2162') content_type = headers['Content-type'] self.assertTrue(content_type.startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') expected_url = 'https://pypi.python.org/pypi' self.assertEqual(self.last_open.req.get_full_url(), expected_url) self.assertTrue(b'xxx' in self.last_open.req.data) + self.assertIn(b'protocol_version', self.last_open.req.data) # The PyPI response body was echoed results = self.get_logs(INFO) From 32821f0c7684148df899f79932c2e138c3ace6f5 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 20 Jun 2016 21:41:34 +0300 Subject: [PATCH 5832/8469] Issue #20120: Add a test case to verify the % char can be used in .pypirc I noticed that there is no test for this feature while doing triaging work on pypa/pypi-legacy. --- tests/test_config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 4de825a81e..0b91d19a54 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -18,6 +18,7 @@ index-servers = server1 server2 + server3 [server1] username:me @@ -28,6 +29,10 @@ password: secret realm:acme repository:http://another.pypi/ + +[server3] +username:cbiggles +password:yh^%#rest-of-my-password """ PYPIRC_OLD = """\ @@ -113,6 +118,20 @@ def test_server_empty_registration(self): finally: f.close() + def test_config_interpolation(self): + # using the % character in .pypirc should not raise an error (#20120) + self.write_file(self.rc, PYPIRC) + cmd = self._cmd(self.dist) + cmd.repository = 'server3' + config = cmd._read_pypirc() + + config = list(sorted(config.items())) + waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'), + ('repository', 'https://pypi.python.org/pypi'), + ('server', 'server3'), ('username', 'cbiggles')] + self.assertEqual(config, waited) + + def test_suite(): return unittest.makeSuite(PyPIRCCommandTestCase) From c986bbf7359a5db45a6e96689729b2f04d2bd3e8 Mon Sep 17 00:00:00 2001 From: The Gitter Badger Date: Thu, 23 Jun 2016 14:37:14 +0000 Subject: [PATCH 5833/8469] Add Gitter badge --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 4f833ecfc4..1c6a0b8675 100755 --- a/README.rst +++ b/README.rst @@ -37,6 +37,10 @@ Powershell command. Start up Powershell and paste this command:: > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - +.. image:: https://badges.gitter.im/pypa/setuptools.svg + :alt: Join the chat at https://gitter.im/pypa/setuptools + :target: https://gitter.im/pypa/setuptools?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge + You must start the Powershell with Administrative privileges or you may choose to install a user-local installation:: From 90d7e0e1b1e1da326f73d4dbdc81e9a4e72daa5c Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 24 Jun 2016 08:48:27 +0300 Subject: [PATCH 5834/8469] Make PyPIRCCommandTestCase derive from a base class Several test cases in distutils use PyPIRCCommandTestCase as their base class and as a result of that the following tests were ran more than once: * test_server_registration * test_server_empty_registration * test_config_interpolation This commit moves the infrastructure used by other tests into a new BasePyPIRCCommandTestCase class. --- tests/test_config.py | 9 ++++++--- tests/test_register.py | 4 ++-- tests/test_sdist.py | 4 ++-- tests/test_upload.py | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 0b91d19a54..3dd92d6166 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -52,14 +52,14 @@ """ -class PyPIRCCommandTestCase(support.TempdirManager, +class BasePyPIRCCommandTestCase(support.TempdirManager, support.LoggingSilencer, support.EnvironGuard, unittest.TestCase): def setUp(self): """Patches the environment.""" - super(PyPIRCCommandTestCase, self).setUp() + super(BasePyPIRCCommandTestCase, self).setUp() self.tmp_dir = self.mkdtemp() os.environ['HOME'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') @@ -78,7 +78,10 @@ def initialize_options(self): def tearDown(self): """Removes the patch.""" set_threshold(self.old_threshold) - super(PyPIRCCommandTestCase, self).tearDown() + super(BasePyPIRCCommandTestCase, self).tearDown() + + +class PyPIRCCommandTestCase(BasePyPIRCCommandTestCase): def test_server_registration(self): # This test makes sure PyPIRCCommand knows how to: diff --git a/tests/test_register.py b/tests/test_register.py index 01acf2375f..e68b0af3ce 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -12,7 +12,7 @@ from distutils.errors import DistutilsSetupError from distutils.log import INFO -from distutils.tests.test_config import PyPIRCCommandTestCase +from distutils.tests.test_config import BasePyPIRCCommandTestCase try: import docutils @@ -72,7 +72,7 @@ def getheader(self, name, default=None): }.get(name.lower(), default) -class RegisterTestCase(PyPIRCCommandTestCase): +class RegisterTestCase(BasePyPIRCCommandTestCase): def setUp(self): super(RegisterTestCase, self).setUp() diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 5a04e0ddd0..5444b815a8 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -23,7 +23,7 @@ from distutils.command.sdist import sdist, show_formats from distutils.core import Distribution -from distutils.tests.test_config import PyPIRCCommandTestCase +from distutils.tests.test_config import BasePyPIRCCommandTestCase from distutils.errors import DistutilsOptionError from distutils.spawn import find_executable from distutils.log import WARN @@ -52,7 +52,7 @@ somecode%(sep)sdoc.txt """ -class SDistTestCase(PyPIRCCommandTestCase): +class SDistTestCase(BasePyPIRCCommandTestCase): def setUp(self): # PyPIRCCommandTestCase creates a temp dir already diff --git a/tests/test_upload.py b/tests/test_upload.py index 3eecf8afd4..e836cc4947 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -12,7 +12,7 @@ from distutils.errors import DistutilsError from distutils.log import ERROR, INFO -from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase +from distutils.tests.test_config import PYPIRC, BasePyPIRCCommandTestCase PYPIRC_LONG_PASSWORD = """\ [distutils] @@ -66,7 +66,7 @@ def getcode(self): return self.code -class uploadTestCase(PyPIRCCommandTestCase): +class uploadTestCase(BasePyPIRCCommandTestCase): def setUp(self): super(uploadTestCase, self).setUp() From 3cee4d8f79a20f1d67b194ee383dddd826695e0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 09:44:52 -0400 Subject: [PATCH 5835/8469] Nicer indentation --- setuptools/command/egg_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8e1502a5ff..829f03f96e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -52,8 +52,10 @@ class egg_info(Command): ] boolean_options = ['tag-date', 'tag-svn-revision'] - negative_opt = {'no-svn-revision': 'tag-svn-revision', - 'no-date': 'tag-date'} + negative_opt = { + 'no-svn-revision': 'tag-svn-revision', + 'no-date': 'tag-date', + } def initialize_options(self): self.egg_name = None From 542a921bb6943feb1c90874ba5151c94622b52b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 10:17:41 -0400 Subject: [PATCH 5836/8469] Mark tag_svn_revision as deprecated. Ref #619. --- CHANGES.rst | 6 ++++++ setuptools/command/egg_info.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index a645529280..055d7aa9fb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v23.1.0 +------- + +* #619: Deprecated ``tag_svn_revision`` distribution + option. + v23.0.0 ------- diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 829f03f96e..5183eedc8e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -199,6 +199,10 @@ def tags(self): if self.tag_build: version += self.tag_build if self.tag_svn_revision: + warnings.warn( + "tag_svn_revision is deprecated and will not be honored " + "in a future release" + ) version += '-r%s' % self.get_svn_revision() if self.tag_date: version += time.strftime("-%Y%m%d") From 6c1cc9fa3acfa32571e5e10c76c8a87f993adb8e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 10:17:52 -0400 Subject: [PATCH 5837/8469] =?UTF-8?q?Bump=20version:=2023.0.0=20=E2=86=92?= =?UTF-8?q?=2023.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e21e1c2b97..d371955f77 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 23.0.0 +current_version = 23.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 8642ea34eb..558bd34542 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="23.0.0", + version="23.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From ce3ad9e1927faff667ad2bf2fec43a0e5254bdf4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jun 2016 10:17:52 -0400 Subject: [PATCH 5838/8469] Added tag v23.1.0 for changeset 6c74559c732c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d43b8997d8..b27122d0da 100644 --- a/.hgtags +++ b/.hgtags @@ -273,3 +273,4 @@ efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 8664c631bf3a817a7deba86c13b67eccc1f81091 v23.0.0 +6c74559c732c56f61b465d613458ec1a930884b6 v23.1.0 From 5d8c17c312e4586ea7a37673f147f9e9622617c7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 25 Jun 2016 14:38:28 +0200 Subject: [PATCH 5839/8469] readme: update links to documentation --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1c6a0b8675..d8d8a6e53b 100755 --- a/README.rst +++ b/README.rst @@ -182,10 +182,10 @@ them there, so this reference list can be updated. If you have working, the `setuptools bug tracker`_. .. _setuptools bug tracker: https://github.com/pypa/setuptools/issues -.. _The Internal Structure of Python Eggs: https://pythonhosted.org/setuptools/formats.html -.. _The setuptools Developer's Guide: https://pythonhosted.org/setuptools/setuptools.html -.. _The pkg_resources API reference: https://pythonhosted.org/setuptools/pkg_resources.html -.. _The EasyInstall user's guide and reference manual: https://pythonhosted.org/setuptools/easy_install.html +.. _The Internal Structure of Python Eggs: https://setuptools.readthedocs.io/en/latest/formats.html +.. _The setuptools Developer's Guide: https://setuptools.readthedocs.io/en/latest/developer-guide.html +.. _The pkg_resources API reference: https://setuptools.readthedocs.io/en/latest/pkg_resources.html +.. _The EasyInstall user's guide and reference manual: https://setuptools.readthedocs.io/en/latest/easy_install.html .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ From bba4b3975c834655df6e97f89ed099ab21594d1c Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 26 Jun 2016 01:33:23 +0700 Subject: [PATCH 5840/8469] Fix misspellings --- CHANGES.rst | 4 ++-- docs/easy_install.txt | 4 ++-- pkg_resources/__init__.py | 2 +- pkg_resources/_vendor/packaging/specifiers.py | 2 +- pkg_resources/_vendor/pyparsing.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 055d7aa9fb..482059b39f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -129,7 +129,7 @@ v20.8.0 v20.7.0 ------- -* Refactored extra enviroment marker processing +* Refactored extra environment marker processing in WorkingSet. * Issue #533: Fixed intermittent test failures. * Issue #536: In msvc9_support, trap additional exceptions @@ -216,7 +216,7 @@ v20.6.0 20.2.1 ------ -* Issue #499: Restore compatiblity for legacy versions +* Issue #499: Restore compatibility for legacy versions by bumping to packaging 16.4. 20.2 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index a66909b121..591589fb2d 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -577,7 +577,7 @@ activated or deactivated. As a result, if you are using EasyInstall to upgrade an existing package, or to install a package with the same name as an existing package, EasyInstall will warn you of the conflict. (This is an improvement over ``setup.py -install``, becuase the ``distutils`` just install new packages on top of old +install``, because the ``distutils`` just install new packages on top of old ones, possibly combining two unrelated packages or leaving behind modules that have been deleted in the newer version of the package.) @@ -606,7 +606,7 @@ can be safely installed as a zipfile, and then acts on its analysis. (Previous versions would not install a package as a zipfile unless you used the ``--zip-ok`` option.) -The current analysis approach is fairly conservative; it currenly looks for: +The current analysis approach is fairly conservative; it currently looks for: * Any use of the ``__file__`` or ``__path__`` variables (which should be replaced with ``pkg_resources`` API calls) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2eab823047..15cb93fdc4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1367,7 +1367,7 @@ def get_default_cache(): return os.path.join(dirname, 'Python-Eggs') else: raise RuntimeError( - "Please set the PYTHON_EGG_CACHE enviroment variable" + "Please set the PYTHON_EGG_CACHE environment variable" ) def safe_name(name): diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 7f5a76cfd6..9b6353f052 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -198,7 +198,7 @@ def filter(self, iterable, prereleases=None): (prereleases or self.prereleases)): found_prereleases.append(version) # Either this is not a prerelease, or we should have been - # accepting prereleases from the begining. + # accepting prereleases from the beginning. else: yielded = True yield version diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py index 3e02dbee20..2284cadcd9 100644 --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -1112,7 +1112,7 @@ def parseString( self, instring, parseAll=False ): (see L{I{parseWithTabs}}) - define your parse action using the full C{(s,loc,toks)} signature, and reference the input string using the parse action's C{s} argument - - explictly expand the tabs in your input string before calling + - explicitly expand the tabs in your input string before calling C{parseString} """ ParserElement.resetCache() From 45597769a552c9bf9f7e425a6a9d3c26064841cf Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sat, 25 Jun 2016 18:41:51 +0200 Subject: [PATCH 5841/8469] Fix test_all_site_dirs on Windows. --- setuptools/tests/test_easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fd06b6efc8..c903d2bd69 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -30,7 +30,7 @@ from setuptools.command.easy_install import PthDistributions from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution -from pkg_resources import working_set +from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution import setuptools.tests.server import pkg_resources @@ -123,9 +123,10 @@ def test_all_site_dirs(self, monkeypatch): get_site_dirs should always return site dirs reported by site.getsitepackages. """ - mock_gsp = lambda: ['/setuptools/test/site-packages'] + path = normalize_path('/setuptools/test/site-packages') + mock_gsp = lambda: [path] monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False) - assert '/setuptools/test/site-packages' in ei.get_site_dirs() + assert path in ei.get_site_dirs() def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch): monkeypatch.delattr(site, 'getsitepackages', raising=False) From 6baa4a140f77d17e131febb3d76d0dae3ca4dfc9 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sat, 25 Jun 2016 22:44:05 +0200 Subject: [PATCH 5842/8469] Remove CommandSpec.from_param test using sys.executable. It was based on the assumption that CommandSpec.from_param(sys.executable) should always return a 1-element list. Since from_param parses the argument and sys.executable may contain unquoted spaces, this simply can't be guaranteed. --- setuptools/tests/test_easy_install.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c903d2bd69..7e77e819a1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -591,15 +591,6 @@ def test_from_simple_string_uses_shlex(self): assert len(cmd) == 2 assert '"' not in cmd.as_header() - def test_sys_executable(self): - """ - CommandSpec.from_string(sys.executable) should contain just that param. - """ - writer = ei.ScriptWriter.best() - cmd = writer.command_spec_class.from_string(sys.executable) - assert len(cmd) == 1 - assert cmd[0] == sys.executable - class TestWindowsScriptWriter: def test_header(self): From 9c3cdde0ddbae5684bfec874e6d8ca239ffb6379 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sun, 26 Jun 2016 00:53:14 +0200 Subject: [PATCH 5843/8469] Split up single TestScriptHeader test into multiple tests. --- setuptools/tests/test_easy_install.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7e77e819a1..02f2705983 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -528,29 +528,32 @@ def make_trivial_sdist(dist_path, setup_py): dist.addfile(setup_py_file, fileobj=setup_py_bytes) +@pytest.mark.skipif( + sys.platform.startswith('java') and ei.is_sh(sys.executable), + reason="Test cannot run under java when executable is sh" +) class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' exe_with_spaces = r'C:\Program Files\Python33\python.exe' - @pytest.mark.skipif( - sys.platform.startswith('java') and ei.is_sh(sys.executable), - reason="Test cannot run under java when executable is sh" - ) def test_get_script_header(self): expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable)) actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python') assert actual == expected + def test_get_script_header_args(self): expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath (sys.executable)) actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x') assert actual == expected + def test_get_script_header_non_ascii_exe(self): actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) expected = '#!%s -x\n' % self.non_ascii_exe assert actual == expected + def test_get_script_header_exe_with_spaces(self): actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable='"'+self.exe_with_spaces+'"') expected = '#!"%s"\n' % self.exe_with_spaces From 6f79ca2b726b2b92d007d09fb855f19ede5a1921 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Wed, 22 Jun 2016 17:42:32 +0200 Subject: [PATCH 5844/8469] Test quoting of shebang lines. See issues #188 and #398; on Windows, the launcher executables support shebangs that use quotes to escape spaces, so these should be used when necessary. On the other hand, Unix systems don't support shebangs with quotes so they should never have quotes. --- setuptools/tests/test_install_scripts.py | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 setuptools/tests/test_install_scripts.py diff --git a/setuptools/tests/test_install_scripts.py b/setuptools/tests/test_install_scripts.py new file mode 100644 index 0000000000..7393241f84 --- /dev/null +++ b/setuptools/tests/test_install_scripts.py @@ -0,0 +1,88 @@ +"""install_scripts tests +""" + +import io +import sys + +import pytest + +from setuptools.command.install_scripts import install_scripts +from setuptools.dist import Distribution +from . import contexts + + +class TestInstallScripts: + settings = dict( + name='foo', + entry_points={'console_scripts': ['foo=foo:foo']}, + version='0.0', + ) + unix_exe = '/usr/dummy-test-path/local/bin/python' + unix_spaces_exe = '/usr/bin/env dummy-test-python' + win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.3\\python.exe' + + def _run_install_scripts(self, install_dir, executable=None): + dist = Distribution(self.settings) + dist.script_name = 'setup.py' + cmd = install_scripts(dist) + cmd.install_dir = install_dir + if executable is not None: + bs = cmd.get_finalized_command('build_scripts') + bs.executable = executable + cmd.ensure_finalized() + with contexts.quiet(): + cmd.run() + + @pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') + def test_sys_executable_escaping_unix(self, tmpdir, monkeypatch): + """ + Ensure that shebang is not quoted on Unix when getting the Python exe + from sys.executable. + """ + expected = '#!%s\n' % self.unix_exe + monkeypatch.setattr('sys.executable', self.unix_exe) + with tmpdir.as_cwd(): + self._run_install_scripts(str(tmpdir)) + with io.open(str(tmpdir.join('foo')), 'r') as f: + actual = f.readline() + assert actual == expected + + @pytest.mark.skipif(sys.platform != 'win32', reason='Windows only') + def test_sys_executable_escaping_win32(self, tmpdir, monkeypatch): + """ + Ensure that shebang is quoted on Windows when getting the Python exe + from sys.executable and it contains a space. + """ + expected = '#!"%s"\n' % self.win32_exe + monkeypatch.setattr('sys.executable', self.win32_exe) + with tmpdir.as_cwd(): + self._run_install_scripts(str(tmpdir)) + with io.open(str(tmpdir.join('foo-script.py')), 'r') as f: + actual = f.readline() + assert actual == expected + + @pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') + def test_executable_with_spaces_escaping_unix(self, tmpdir): + """ + Ensure that shebang on Unix is not quoted, even when a value with spaces + is specified using --executable. + """ + expected = '#!%s\n' % self.unix_spaces_exe + with tmpdir.as_cwd(): + self._run_install_scripts(str(tmpdir), self.unix_spaces_exe) + with io.open(str(tmpdir.join('foo')), 'r') as f: + actual = f.readline() + assert actual == expected + + @pytest.mark.skipif(sys.platform != 'win32', reason='Windows only') + def test_executable_arg_escaping_win32(self, tmpdir): + """ + Ensure that shebang on Windows is quoted when getting a path with spaces + from --executable, that is itself properly quoted. + """ + expected = '#!"%s"\n' % self.win32_exe + with tmpdir.as_cwd(): + self._run_install_scripts(str(tmpdir), '"' + self.win32_exe + '"') + with io.open(str(tmpdir.join('foo-script.py')), 'r') as f: + actual = f.readline() + assert actual == expected From 3132833570c90d52f6c2a422506732e82d772cdd Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sun, 26 Jun 2016 01:48:30 +0200 Subject: [PATCH 5845/8469] Ensure shebang lines are correctly quoted if sys.executable contains spaces. Fixes issue #398. This only special-cases sys.executable; if the --executable parameter is used, paths with spaces have to be quoted there explicitly. While this change also applies to Unix platforms, if sys.executable contains spaces on Unix, any shebang lines created with it aren't going to work either way, whether they are quoted or not. --- setuptools/command/easy_install.py | 11 ++++++++++- setuptools/command/install_scripts.py | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9ca1554ebe..d63fb529be 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1985,9 +1985,18 @@ def _extract_options(orig_script): def as_header(self): return self._render(self + list(self.options)) + @staticmethod + def _strip_quotes(item): + _QUOTES = '"\'' + for q in _QUOTES: + if item.startswith(q) and item.endswith(q): + return item[1:-1] + return item + @staticmethod def _render(items): - cmdline = subprocess.list2cmdline(items) + cmdline = subprocess.list2cmdline( + CommandSpec._strip_quotes(item.strip()) for item in items) return '#!' + cmdline + '\n' # For pbr compat; will be removed in a future version. diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index be66cb2252..16234273a2 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,6 +1,7 @@ from distutils import log import distutils.command.install_scripts as orig import os +import sys from pkg_resources import Distribution, PathMetadata, ensure_directory @@ -37,6 +38,10 @@ def run(self): if is_wininst: exec_param = "python.exe" writer = ei.WindowsScriptWriter + if exec_param == sys.executable: + # In case the path to the Python executable contains a space, wrap + # it so it's not split up. + exec_param = [exec_param] # resolve the writer to the environment writer = writer.best() cmd = writer.command_spec_class.best().from_param(exec_param) From 4720c481c62d5cc0a40dd212a32c641125be8e9c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 29 Jun 2016 10:22:12 +0200 Subject: [PATCH 5846/8469] Don't use deprecated 'U' flag to read manifest The universal newlines mode ('U' flag) is deprecated since Python 3.4. It only replaces "\r\n" with "\n", but it doesn't split lines at "\r" (Mac newline). In practice, the flag was useless, the sdist.read_manifest() method already uses line.strip() and so removes newline characters. --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 6640d4e3c9..f200b9469a 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -179,7 +179,7 @@ def read_manifest(self): distribution. """ log.info("reading manifest file '%s'", self.manifest) - manifest = open(self.manifest, 'rbU') + manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. if six.PY3: From cb88c78645a37ff81efa440f82e3df234bf2c9cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 10:17:26 -0400 Subject: [PATCH 5847/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 055d7aa9fb..a529514dbb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v23.2.0 +------- + +* #623: Remove used of deprecated 'U' flag when reading + manifests. + v23.1.0 ------- From 54325a753f688285c71a6db0a062116e6dc6976c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:06:19 -0400 Subject: [PATCH 5848/8469] Rename msvc9_support to simply msvc. --- CHANGES.rst | 2 ++ setuptools/extension.py | 4 ++-- setuptools/{msvc9_support.py => msvc.py} | 5 +++-- setuptools/tests/test_msvc9compiler.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) rename setuptools/{msvc9_support.py => msvc.py} (99%) diff --git a/CHANGES.rst b/CHANGES.rst index 4ee60250e6..7a1be7324c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ Next * Pull Request #174: Add more aggressive support for Windows SDK in msvc9compiler patch. +* Renamed ``setuptools.msvc9_support`` to + ``setuptools.msvc``. v21.2.0 ------- diff --git a/setuptools/extension.py b/setuptools/extension.py index d10609b699..b9d68178a1 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -8,11 +8,11 @@ from setuptools.extern.six.moves import map from .dist import _get_unpatched -from . import msvc9_support +from . import msvc _Extension = _get_unpatched(distutils.core.Extension) -msvc9_support.patch_for_specialized_compiler() +msvc.patch_for_specialized_compiler() def _have_cython(): """ diff --git a/setuptools/msvc9_support.py b/setuptools/msvc.py similarity index 99% rename from setuptools/msvc9_support.py rename to setuptools/msvc.py index d1ed2edc93..63031ac235 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc.py @@ -1,6 +1,7 @@ """ -This module improve support for Microsoft Visual C++ compilers. (Windows Only) +This module adds improved support for Microsoft Visual C++ compilers. """ + import os import collections import itertools @@ -30,7 +31,7 @@ class winreg: pass try: - # Distutil file for MSVC++ 14.0 and upper (Python 3.5) + # Distutil file for MSVC++ 14.0 and upper (Python 3.5+) import distutils._msvccompiler as msvc14compiler except ImportError: pass diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index 09e0460c56..86475834c4 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -69,7 +69,7 @@ class TestModulePatch: def test_patched(self): "Test the module is actually patched" mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ - assert mod_name == "setuptools.msvc9_support", "find_vcvarsall unpatched" + assert mod_name == "setuptools.msvc", "find_vcvarsall unpatched" def test_no_registry_entryies_means_nothing_found(self): """ From 22da89cd92578bc5af6375276a6b3f2c5bd98fb1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:09:58 -0400 Subject: [PATCH 5849/8469] =?UTF-8?q?Bump=20version:=2023.1.0=20=E2=86=92?= =?UTF-8?q?=2023.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d371955f77..609fdd9812 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 23.1.0 +current_version = 23.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 558bd34542..764b5f87e3 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="23.1.0", + version="23.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 2370ce3abb2f92e84948aaafa398ce56587d7bb2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:09:58 -0400 Subject: [PATCH 5850/8469] Added tag v23.2.0 for changeset 65b3fe899db4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b27122d0da..07723c39c7 100644 --- a/.hgtags +++ b/.hgtags @@ -274,3 +274,4 @@ efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 8664c631bf3a817a7deba86c13b67eccc1f81091 v23.0.0 6c74559c732c56f61b465d613458ec1a930884b6 v23.1.0 +65b3fe899db4086e66afa067a1311eea2a88d5e2 v23.2.0 From cbc3e03505a6c2a1893312c0ec555b2dec615000 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:16:19 -0400 Subject: [PATCH 5851/8469] Update changelog --- CHANGES.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index a529514dbb..0ecdf45414 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,9 +2,12 @@ CHANGES ======= -v23.2.0 +v23.2.1 ------- +Re-release of v23.2.0, which was missing the intended +commits. + * #623: Remove used of deprecated 'U' flag when reading manifests. From fece3b75874e79f01cecedd41eb035f180400a18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:21:44 -0400 Subject: [PATCH 5852/8469] =?UTF-8?q?Bump=20version:=2023.2.0=20=E2=86=92?= =?UTF-8?q?=2023.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 609fdd9812..9d7689895f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 23.2.0 +current_version = 23.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index 764b5f87e3..6963334ab8 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="23.2.0", + version="23.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 94d97d07df600cca0d51703b13297b73f5b1d9d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:21:51 -0400 Subject: [PATCH 5853/8469] Added tag v23.2.1 for changeset a011298221c3 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 07723c39c7..11d64b6c3b 100644 --- a/.hgtags +++ b/.hgtags @@ -275,3 +275,5 @@ d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 8664c631bf3a817a7deba86c13b67eccc1f81091 v23.0.0 6c74559c732c56f61b465d613458ec1a930884b6 v23.1.0 65b3fe899db4086e66afa067a1311eea2a88d5e2 v23.2.0 +e10c848a82ffb925741c65dd8a8fc8b50b3c3e14 v23.2.1 +a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 From 349e33139adf073c3b55065b1de658868622ccdd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:27:59 -0400 Subject: [PATCH 5854/8469] Rename test for msvc module as well --- setuptools/tests/{test_msvc9compiler.py => test_msvc.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename setuptools/tests/{test_msvc9compiler.py => test_msvc.py} (100%) diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc.py similarity index 100% rename from setuptools/tests/test_msvc9compiler.py rename to setuptools/tests/test_msvc.py From f2a0b309367cfdade3c0c18d8c69612010351120 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:38:21 -0400 Subject: [PATCH 5855/8469] Extract template as variable to avoid line continuation. --- setuptools/msvc.py | 4 ++-- setuptools/tests/test_msvc.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 63031ac235..500a00f9ef 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -219,8 +219,8 @@ def _augment_exception(exc, version, arch=''): if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed - message = 'Microsoft Visual C++ %0.1f is required (%s).' %\ - (version, message) + tmpl = 'Microsoft Visual C++ %0.1f is required (%s).' + message = tmpl % version, message msdownload = r'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: if arch.lower().find('ia64') > -1: diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 86475834c4..2fbd56bf4f 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -1,5 +1,5 @@ """ -Tests for msvc9compiler. +Tests for msvc support module. """ import os From 0746957d513d74e6a9f5e2375a10d1d4a0a5108c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:41:20 -0400 Subject: [PATCH 5856/8469] Remove superfluous raw strings --- setuptools/msvc.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 500a00f9ef..27118ed9d1 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -219,9 +219,9 @@ def _augment_exception(exc, version, arch=''): if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed - tmpl = 'Microsoft Visual C++ %0.1f is required (%s).' - message = tmpl % version, message - msdownload = r'www.microsoft.com/download/details.aspx?id=%d' + tmpl = 'Microsoft Visual C++ {version:0.1f} is required {message}.' + message = tmpl.format(**locals()) + msdownload = 'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: if arch.lower().find('ia64') > -1: # For VC++ 9.0, if IA64 support is needed, redirect user @@ -232,7 +232,7 @@ def _augment_exception(exc, version, arch=''): # For VC++ 9.0 redirect user to Vc++ for Python 2.7 : # This redirection link is maintained by Microsoft. # Contact vspython@microsoft.com if it needs updating. - message += r' Get it from http://aka.ms/vcpython27' + message += ' Get it from http://aka.ms/vcpython27' elif version == 10.0: # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' @@ -365,7 +365,7 @@ def visualstudio(self): """ Microsoft Visual Studio root registry key. """ - return os.path.join(self.microsoft, r'VisualStudio') + return os.path.join(self.microsoft, 'VisualStudio') @property def sxs(self): @@ -860,7 +860,7 @@ def OSLibraries(self): arch_subdir = self.pi.target_dir(x64=True) lib = os.path.join(self.si.WindowsSdkDir, 'lib') libver = self._get_content_dirname(lib) - return [os.path.join(lib, r'%sum%s' % (libver, arch_subdir))] + return [os.path.join(lib, '%sum%s' % (libver, arch_subdir))] @property def OSIncludes(self): @@ -898,13 +898,13 @@ def OSLibpath(self): if self.vc_ver >= 14.0: libpath += [ref, os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), - os.path.join(ref, r'Windows.Foundation.' + os.path.join(ref, 'Windows.Foundation.' r'UniversalApiContract\1.0.0.0'), - os.path.join(ref, r'Windows.Foundation.' + os.path.join(ref, 'Windows.Foundation.' r'FoundationContract\1.0.0.0'), - os.path.join(ref, r'Windows.Networking.Connectivity.' + os.path.join(ref, 'Windows.Networking.Connectivity.' r'WwanContract\1.0.0.0'), - os.path.join(self.si.WindowsSdkDir, r'ExtensionSDKs' + os.path.join(self.si.WindowsSdkDir, 'ExtensionSDKs' r'\Microsoft.VCLibs\%0.1f\References' r'\CommonConfiguration\neutral' % self.vc_ver)] From e404a4aa3b3aa62c5f2c956f3076ddb9155a6829 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:47:53 -0400 Subject: [PATCH 5857/8469] Reindent to avoid raw strings and hanging indents. Let os.path.join provide the backslash characters. --- setuptools/msvc.py | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 27118ed9d1..0b483ea303 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -896,18 +896,34 @@ def OSLibpath(self): libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')] if self.vc_ver >= 14.0: - libpath += [ref, - os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), - os.path.join(ref, 'Windows.Foundation.' - r'UniversalApiContract\1.0.0.0'), - os.path.join(ref, 'Windows.Foundation.' - r'FoundationContract\1.0.0.0'), - os.path.join(ref, 'Windows.Networking.Connectivity.' - r'WwanContract\1.0.0.0'), - os.path.join(self.si.WindowsSdkDir, 'ExtensionSDKs' - r'\Microsoft.VCLibs\%0.1f\References' - r'\CommonConfiguration\neutral' % - self.vc_ver)] + libpath += [ + ref, + os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), + os.path.join( + ref, + 'Windows.Foundation.UniversalApiContract' + '1.0.0.0', + ), + os.path.join( + ref, + 'Windows.Foundation.FoundationContract', + '1.0.0.0', + ), + os.path.join( + ref, + 'Windows.Networking.Connectivity.WwanContract' + '1.0.0.0', + ), + os.path.join( + self.si.WindowsSdkDir, + 'ExtensionSDKs', + 'Microsoft.VCLibs', + '%0.1f' % self.vc_ver, + 'References', + 'CommonConfiguration', + 'neutral', + ), + ] return libpath @property From 4742d661ab7b6ca643610b2b1f5100cd582d75b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 12:48:31 -0400 Subject: [PATCH 5858/8469] Extract variable for bin_dir --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 0b483ea303..bbf66570a6 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -931,8 +931,8 @@ def SdkTools(self): """ Microsoft Windows SDK Tools """ - tools = [os.path.join(self.si.WindowsSdkDir, - 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86')] + bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' + tools = [os.path.join(self.si.WindowsSdkDir, bin_dir)] if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) From 590ae3ae964c201fb58273e074b10c4d432592bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 13:31:12 -0400 Subject: [PATCH 5859/8469] Update changelog --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cf81d58778..d94da2dcdc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,8 +2,8 @@ CHANGES ======= -Next ----- +v24.0.0 +------- * Pull Request #174: Add more aggressive support for Windows SDK in msvc9compiler patch. From f26b15fb8296d0d008b9cf857cf33eb049a95ff2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 13:32:36 -0400 Subject: [PATCH 5860/8469] =?UTF-8?q?Bump=20version:=2023.2.1=20=E2=86=92?= =?UTF-8?q?=2024.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9d7689895f..e35e1b8ffc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 23.2.1 +current_version = 24.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 6963334ab8..5602989275 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="23.2.1", + version="24.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From ca2c0f9aae22081a458848e9ca6baf71f54b88e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jul 2016 13:32:36 -0400 Subject: [PATCH 5861/8469] Added tag v24.0.0 for changeset 8d37b17a93ec --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 11d64b6c3b..ccf6efff9c 100644 --- a/.hgtags +++ b/.hgtags @@ -277,3 +277,4 @@ d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 65b3fe899db4086e66afa067a1311eea2a88d5e2 v23.2.0 e10c848a82ffb925741c65dd8a8fc8b50b3c3e14 v23.2.1 a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 +8d37b17a93ec3e5fff9e040fc3f14ab7b7b24b2c v24.0.0 From 79d1fc0d9f50af9f51a3c7a7188e4afc644a4aac Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 14:04:06 +0200 Subject: [PATCH 5862/8469] msvc fixe Fixes : - Bad argument name - Better Python 2 compatibility --- setuptools/msvc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index bbf66570a6..a03f4fe3b7 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -203,7 +203,7 @@ def msvc14_get_vc_env(plat_spec): # If error, try to set environment directly try: - return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env() + return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, 14.0) raise @@ -442,11 +442,11 @@ def lookup(self, key, name): for hkey in self.HKEYS: try: bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) - except FileNotFoundError: + except IOError: continue try: return winreg.QueryValueEx(bkey, name)[0] - except FileNotFoundError: + except IOError: pass @@ -489,7 +489,7 @@ def find_available_vc_vers(self): for key in vckeys: try: bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) - except FileNotFoundError: + except IOError: continue subkeys, values, _ = winreg.QueryInfoKey(bkey) for i in range(values): @@ -1187,5 +1187,5 @@ def _get_content_dirname(self, path): if name: return '%s\\' % name[0] return '' - except FileNotFoundError: + except IOError: return '' From b90df6ddf053d18c32c72502521eecb36bc454a6 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 14:06:54 +0200 Subject: [PATCH 5863/8469] Update msvc.py --- setuptools/msvc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index a03f4fe3b7..d5a48dce02 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -237,6 +237,10 @@ def _augment_exception(exc, version, arch=''): # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 + elif version >= 14.0: + # For VC++ 14.0 Redirect user to Visual C++ Build Tools + message += ' Get it with "Visual C++ Build Tools": ' + r'http://landinghub.visualstudio.com/visual-cpp-build-tools' exc.args = (message, ) From 4751aeef452878881a2b0d81a2624c1c5e72b911 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 14:33:36 +0200 Subject: [PATCH 5864/8469] Update msvc.py --- setuptools/msvc.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index d5a48dce02..b85d66e084 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -3,7 +3,6 @@ """ import os -import collections import itertools import distutils.errors from setuptools.extern.six.moves import filterfalse @@ -21,7 +20,7 @@ class winreg: HKEY_CURRENT_USER = None HKEY_LOCAL_MACHINE = None HKEY_CLASSES_ROOT = None - safe_env = collections.defaultdict(lambda: '') + safe_env = dict() try: @@ -36,7 +35,7 @@ class winreg: except ImportError: pass - + unpatched = dict() @@ -237,10 +236,6 @@ def _augment_exception(exc, version, arch=''): # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 - elif version >= 14.0: - # For VC++ 14.0 Redirect user to Visual C++ Build Tools - message += ' Get it with "Visual C++ Build Tools": ' - r'http://landinghub.visualstudio.com/visual-cpp-build-tools' exc.args = (message, ) @@ -254,7 +249,7 @@ class PlatformInfo: arch: str Target architecture. """ - current_cpu = safe_env['processor_architecture'].lower() + current_cpu = safe_env.get('processor_architecture', '').lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @@ -467,9 +462,9 @@ class SystemInfo: """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. - WinDir = safe_env['WinDir'] - ProgramFiles = safe_env['ProgramFiles'] - ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) + WinDir = safe_env.get('WinDir', '') + ProgramFiles = safe_env.get('ProgramFiles', '') + ProgramFilesx86 = safe_env.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vc_ver=None): self.ri = registry_info From 2d0a77530153a53e3a9a00ae1f7d0d800d6af604 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:06:11 +0200 Subject: [PATCH 5865/8469] Update CHANGES.rst --- CHANGES.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index d94da2dcdc..2f2d689f06 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,11 @@ v24.0.0 ------- * Pull Request #174: Add more aggressive support for - Windows SDK in msvc9compiler patch. + standalone Microsoft Visual C++ compilers in + msvc9compiler patch. + Particularly : Windows SDK 6.0 and 6.1 + (MSVC++ 9.0), Windows SDK 7.0 (MSVC++ 10.0), + Visual C++ Build Tools 2015 (MSVC++14) * Renamed ``setuptools.msvc9_support`` to ``setuptools.msvc``. From 7b9290771ec850cf7f5e21e168048b12e1e59cf4 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:17:08 +0200 Subject: [PATCH 5866/8469] Update msvc.py --- setuptools/msvc.py | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index b85d66e084..8216e94a8d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1,27 +1,16 @@ """ This module adds improved support for Microsoft Visual C++ compilers. """ - import os +import platform import itertools import distutils.errors from setuptools.extern.six.moves import filterfalse try: from setuptools.extern.six.moves import winreg - safe_env = os.environ except ImportError: - """ - Mock winreg and environ so the module can be imported - on this platform. - """ - class winreg: - HKEY_USERS = None - HKEY_CURRENT_USER = None - HKEY_LOCAL_MACHINE = None - HKEY_CLASSES_ROOT = None - safe_env = dict() - + pass try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) @@ -35,7 +24,7 @@ class winreg: except ImportError: pass - + unpatched = dict() @@ -57,6 +46,10 @@ def patch_for_specialized_compiler(): Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ + if platform.system() != Windows: + # Compilers only availables on Microsoft Windows + return + if 'distutils' not in globals(): # The module isn't available to be patched return @@ -249,7 +242,7 @@ class PlatformInfo: arch: str Target architecture. """ - current_cpu = safe_env.get('processor_architecture', '').lower() + current_cpu = os.environ.get('processor_architecture', '').lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @@ -462,9 +455,9 @@ class SystemInfo: """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. - WinDir = safe_env.get('WinDir', '') - ProgramFiles = safe_env.get('ProgramFiles', '') - ProgramFilesx86 = safe_env.get('ProgramFiles(x86)', ProgramFiles) + WinDir = os.environ.get('WinDir', '') + ProgramFiles = os.environ.get('ProgramFiles', '') + ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vc_ver=None): self.ri = registry_info From b4b913b18c07a9d2bce8ae57da7e8c45bf17c28b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:22:40 +0200 Subject: [PATCH 5867/8469] Update msvc.py --- setuptools/msvc.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 8216e94a8d..5e6c1c2580 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -9,8 +9,18 @@ try: from setuptools.extern.six.moves import winreg + safe_env = os.environ except ImportError: - pass + """ + Mock winreg and environ so the module can be imported + on this platform. + """ + class winreg: + HKEY_USERS = None + HKEY_CURRENT_USER = None + HKEY_LOCAL_MACHINE = None + HKEY_CLASSES_ROOT = None + safe_env = collections.defaultdict(lambda: '') try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) @@ -242,7 +252,7 @@ class PlatformInfo: arch: str Target architecture. """ - current_cpu = os.environ.get('processor_architecture', '').lower() + current_cpu = safe_env.get('processor_architecture', '').lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @@ -455,9 +465,9 @@ class SystemInfo: """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. - WinDir = os.environ.get('WinDir', '') - ProgramFiles = os.environ.get('ProgramFiles', '') - ProgramFilesx86 = os.environ.get('ProgramFiles(x86)', ProgramFiles) + WinDir = safe_env.get('WinDir', '') + ProgramFiles = safe_env.get('ProgramFiles', '') + ProgramFilesx86 = safe_env.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vc_ver=None): self.ri = registry_info @@ -1128,7 +1138,7 @@ def _build_paths(self, name, spec_path_lists, exists): """ # flatten spec_path_lists spec_paths = itertools.chain.from_iterable(spec_path_lists) - env_paths = os.environ.get(name, '').split(os.pathsep) + env_paths = safe_env.get(name, '').split(os.pathsep) paths = itertools.chain(spec_paths, env_paths) extant_paths = list(filter(os.path.isdir, paths)) if exists else paths if not extant_paths: From 2aa04076e57845abdf9e0cc5238bdcc23ae5e58e Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:26:20 +0200 Subject: [PATCH 5868/8469] Update msvc.py --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 5e6c1c2580..0851b19333 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -7,10 +7,10 @@ import distutils.errors from setuptools.extern.six.moves import filterfalse -try: +if platform.system() == Windows: from setuptools.extern.six.moves import winreg safe_env = os.environ -except ImportError: +else: """ Mock winreg and environ so the module can be imported on this platform. From a0bc231f8fee1f2df0c04b92eb070e66536d622e Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:28:12 +0200 Subject: [PATCH 5869/8469] Update msvc.py --- setuptools/msvc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 0851b19333..f1213f3296 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -4,6 +4,7 @@ import os import platform import itertools +import collections import distutils.errors from setuptools.extern.six.moves import filterfalse From c12e784cce4104244353e18e73dedbb588061de7 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:31:18 +0200 Subject: [PATCH 5870/8469] Update msvc.py --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index f1213f3296..990382c0f4 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -8,7 +8,7 @@ import distutils.errors from setuptools.extern.six.moves import filterfalse -if platform.system() == Windows: +if platform.system() == 'Windows': from setuptools.extern.six.moves import winreg safe_env = os.environ else: @@ -57,7 +57,7 @@ def patch_for_specialized_compiler(): Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ - if platform.system() != Windows: + if platform.system() != 'Windows': # Compilers only availables on Microsoft Windows return From fb2673566eb04bcf315a5dc28193a59c1dce902b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 15:42:45 +0200 Subject: [PATCH 5871/8469] Update msvc.py --- setuptools/msvc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 990382c0f4..8c612129d5 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -4,7 +4,6 @@ import os import platform import itertools -import collections import distutils.errors from setuptools.extern.six.moves import filterfalse @@ -21,7 +20,7 @@ class winreg: HKEY_CURRENT_USER = None HKEY_LOCAL_MACHINE = None HKEY_CLASSES_ROOT = None - safe_env = collections.defaultdict(lambda: '') + safe_env = dict() try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) From a2ce15c43be744cbf0cbf8763950f5f5d566625f Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 16:00:49 +0200 Subject: [PATCH 5872/8469] Update CHANGES.rst --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 2f2d689f06..a3599f2719 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v24.0.1 +------- + +* Fixes on ``setuptools.msvc`` mainly for Python 2 + and Linux. + v24.0.0 ------- From 8932c2d04e6c4258093cf919e525c61c7663250e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2016 12:19:18 -0400 Subject: [PATCH 5873/8469] Update changelog to reference issues --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a3599f2719..5f2b60764e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,8 +5,8 @@ CHANGES v24.0.1 ------- -* Fixes on ``setuptools.msvc`` mainly for Python 2 - and Linux. +* #625 and #626: Fixes on ``setuptools.msvc`` mainly + for Python 2 and Linux. v24.0.0 ------- From 6e405e85df9f7694f549bb98f4c6a080e86d79e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2016 12:19:26 -0400 Subject: [PATCH 5874/8469] =?UTF-8?q?Bump=20version:=2024.0.0=20=E2=86=92?= =?UTF-8?q?=2024.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e35e1b8ffc..d7eff8d1f2 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.0.0 +current_version = 24.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 5602989275..fde901a512 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.0.0", + version="24.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 6be486070f5badd8e8d954977cc673714256568f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2016 12:19:26 -0400 Subject: [PATCH 5875/8469] Added tag v24.0.1 for changeset 130a58f9503f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ccf6efff9c..f430934b38 100644 --- a/.hgtags +++ b/.hgtags @@ -278,3 +278,4 @@ d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 e10c848a82ffb925741c65dd8a8fc8b50b3c3e14 v23.2.1 a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 8d37b17a93ec3e5fff9e040fc3f14ab7b7b24b2c v24.0.0 +130a58f9503fe07ca8c7a34675b7d3a976f163d7 v24.0.1 From 7b303ef300faad048b21005e17d1ca83e4ad3a18 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 19:04:03 +0200 Subject: [PATCH 5876/8469] Minor change : Link to MSVC14 Standalone Add the new link to "Microsoft Visual C++ Build Tools" if MSVC14 is not installed. --- setuptools/msvc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 8c612129d5..b543c568fb 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -221,7 +221,7 @@ def _augment_exception(exc, version, arch=''): if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed - tmpl = 'Microsoft Visual C++ {version:0.1f} is required {message}.' + tmpl = 'Microsoft Visual C++ {version:0.1f} is required.' message = tmpl.format(**locals()) msdownload = 'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: @@ -239,6 +239,10 @@ def _augment_exception(exc, version, arch=''): # For VC++ 10.0 Redirect user to Windows SDK 7.1 message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 + 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') exc.args = (message, ) From 46aa62fb47f569ce1e3f5eb9ae83f9b363f9da81 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 19:13:00 +0200 Subject: [PATCH 5877/8469] Update CHANGES.rst --- CHANGES.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 94d99fda58..23e85a7b2a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v24.0.2 +------- + +* If MSVC14 is needed ``setuptools.msvc`` no redirect + user to Visual C++ Build Tools web page. + v24.0.1 ------- @@ -14,8 +20,8 @@ v24.0.0 * Pull Request #174: Add more aggressive support for standalone Microsoft Visual C++ compilers in msvc9compiler patch. - Particularly : Windows SDK 6.0 and 6.1 - (MSVC++ 9.0), Windows SDK 7.0 (MSVC++ 10.0), + Particularly : Windows SDK 6.1 and 7.0 + (MSVC++ 9.0), Windows SDK 7.1 (MSVC++ 10.0), Visual C++ Build Tools 2015 (MSVC++14) * Renamed ``setuptools.msvc9_support`` to ``setuptools.msvc``. From 2a835337bfe7d4831b59c448e729e6a609c2c38f Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 19:13:31 +0200 Subject: [PATCH 5878/8469] Update CHANGES.rst --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 23e85a7b2a..2b01135d08 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ CHANGES v24.0.2 ------- -* If MSVC14 is needed ``setuptools.msvc`` no redirect +* If MSVC++14 is needed ``setuptools.msvc`` no redirect user to Visual C++ Build Tools web page. v24.0.1 From cb29ee77631530b6e15bc84ba8762bcda0ad4467 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sun, 3 Jul 2016 21:28:19 +0200 Subject: [PATCH 5879/8469] Update CHANGES.rst --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2b01135d08..e04bdf05d7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ CHANGES v24.0.2 ------- -* If MSVC++14 is needed ``setuptools.msvc`` no redirect +* If MSVC++14 is needed ``setuptools.msvc`` now redirect user to Visual C++ Build Tools web page. v24.0.1 From 7ef0e255cd8ed3f99058e8c3c11fd8b537d5fcd0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jul 2016 11:22:36 -0400 Subject: [PATCH 5880/8469] =?UTF-8?q?Bump=20version:=2024.0.1=20=E2=86=92?= =?UTF-8?q?=2024.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d7eff8d1f2..303569f6dd 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.0.1 +current_version = 24.0.2 commit = True tag = True diff --git a/setup.py b/setup.py index fde901a512..798d4db467 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.0.1", + version="24.0.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e3e21fd3d608d72ebe1ba2e4d2b3a59fbca76554 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jul 2016 11:22:36 -0400 Subject: [PATCH 5881/8469] Added tag v24.0.2 for changeset 7996c56bf6a2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f430934b38..afb158b1ff 100644 --- a/.hgtags +++ b/.hgtags @@ -279,3 +279,4 @@ e10c848a82ffb925741c65dd8a8fc8b50b3c3e14 v23.2.1 a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 8d37b17a93ec3e5fff9e040fc3f14ab7b7b24b2c v24.0.0 130a58f9503fe07ca8c7a34675b7d3a976f163d7 v24.0.1 +7996c56bf6a2f81427b2f91eb11e64d690353493 v24.0.2 From 1b228fa0e3f07c73de0053985565293b795e6e96 Mon Sep 17 00:00:00 2001 From: Tim Savannah Date: Tue, 5 Jul 2016 16:35:17 -0400 Subject: [PATCH 5882/8469] Skip empty egg directories, which may be leftover from previous installations --- pkg_resources/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 15cb93fdc4..35725c06c5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1975,6 +1975,9 @@ def find_on_path(importer, path_item, only=False): fullpath = os.path.join(path_item, entry) if os.path.isdir(fullpath): # egg-info directory, allow getting metadata + if len(os.listdir(fullpath)) == 0: + # Empty egg directory, skip. + continue metadata = PathMetadata(path_item, fullpath) else: metadata = FileMetadata(fullpath) From fb1867e305660161c2960dfcfc5a95d41310e19d Mon Sep 17 00:00:00 2001 From: Tim Savannah Date: Tue, 5 Jul 2016 16:37:26 -0400 Subject: [PATCH 5883/8469] Scan for distributions in reverse order, so we find the newest version of a distribution (instead of the oldest) --- pkg_resources/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 35725c06c5..645eda813c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1969,7 +1969,11 @@ def find_on_path(importer, path_item, only=False): ) else: # scan for .egg and .egg-info in directory - for entry in os.listdir(path_item): + + path_item_entries = os.listdir(path_item) + # Reverse so we find the newest version of a distribution, + path_item_entries.reverse() + for entry in path_item_entries: lower = entry.lower() if lower.endswith('.egg-info') or lower.endswith('.dist-info'): fullpath = os.path.join(path_item, entry) From e0805ec6a33ff22977723258a99f0184a508bef2 Mon Sep 17 00:00:00 2001 From: Tim Savannah Date: Tue, 5 Jul 2016 18:47:53 -0400 Subject: [PATCH 5884/8469] Ammend: fb1867e305660161c2960dfcfc5a95d41310e19d add missing sort --- pkg_resources/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 645eda813c..72b03bc1f8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1972,6 +1972,7 @@ def find_on_path(importer, path_item, only=False): path_item_entries = os.listdir(path_item) # Reverse so we find the newest version of a distribution, + path_item_entries.sort() path_item_entries.reverse() for entry in path_item_entries: lower = entry.lower() From eb17f80c10c171808db4f6d81709dc3c9ebf27d6 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 6 Jul 2016 15:27:35 -0400 Subject: [PATCH 5885/8469] Switch to the new upload url for PyPI --- config.py | 2 +- tests/test_config.py | 4 ++-- tests/test_upload.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index 106e146598..9b06d7699e 100644 --- a/config.py +++ b/config.py @@ -21,7 +21,7 @@ class PyPIRCCommand(Command): """Base command that knows how to handle the .pypirc file """ - DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' + DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/' DEFAULT_REALM = 'pypi' repository = None realm = None diff --git a/tests/test_config.py b/tests/test_config.py index 4de825a81e..c37381550d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -87,7 +87,7 @@ def test_server_registration(self): config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi'), + ('repository', 'https://upload.pypi.io/legacy/'), ('server', 'server1'), ('username', 'me')] self.assertEqual(config, waited) @@ -96,7 +96,7 @@ def test_server_registration(self): config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi'), + ('repository', 'https://upload.pypi.io/legacy/'), ('server', 'server-login'), ('username', 'tarek')] self.assertEqual(config, waited) diff --git a/tests/test_upload.py b/tests/test_upload.py index 8532369aa5..5a462e5a94 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -127,7 +127,7 @@ def test_upload(self): self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') self.assertEqual(self.last_open.req.get_full_url(), - 'https://pypi.python.org/pypi') + 'https://upload.pypi.io/legacy/') self.assertIn(b'xxx', self.last_open.req.data) # The PyPI response body was echoed From cbbadc228b01710721939a776b4f2dd008e9c322 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 6 Jul 2016 16:18:39 -0400 Subject: [PATCH 5886/8469] Switch to the new upload url for PyPI --- config.py | 2 +- tests/test_config.py | 4 ++-- tests/test_upload.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 382aca8fc1..2d5770c618 100644 --- a/config.py +++ b/config.py @@ -21,7 +21,7 @@ class PyPIRCCommand(Command): """Base command that knows how to handle the .pypirc file """ - DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' + DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/' DEFAULT_REALM = 'pypi' repository = None realm = None diff --git a/tests/test_config.py b/tests/test_config.py index 4de825a81e..c37381550d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -87,7 +87,7 @@ def test_server_registration(self): config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi'), + ('repository', 'https://upload.pypi.io/legacy/'), ('server', 'server1'), ('username', 'me')] self.assertEqual(config, waited) @@ -96,7 +96,7 @@ def test_server_registration(self): config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi'), + ('repository', 'https://upload.pypi.io/legacy/'), ('server', 'server-login'), ('username', 'tarek')] self.assertEqual(config, waited) diff --git a/tests/test_upload.py b/tests/test_upload.py index dccaf77e3e..bf4d558bf7 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -90,7 +90,7 @@ def test_finalize_options(self): cmd.finalize_options() for attr, waited in (('username', 'me'), ('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi')): + ('repository', 'https://upload.pypi.io/legacy/')): self.assertEqual(getattr(cmd, attr), waited) def test_saved_password(self): @@ -131,7 +131,7 @@ def test_upload(self): content_type = headers['Content-type'] self.assertTrue(content_type.startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') - expected_url = 'https://pypi.python.org/pypi' + expected_url = 'https://upload.pypi.io/legacy/' self.assertEqual(self.last_open.req.get_full_url(), expected_url) self.assertTrue(b'xxx' in self.last_open.req.data) From f568a513f3be48c8f778da29719b7573b869e6c0 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 6 Jul 2016 17:46:37 -0400 Subject: [PATCH 5887/8469] Fix a test with the new upload URL --- tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 6763f57388..c7bbd6d108 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -130,7 +130,7 @@ def test_config_interpolation(self): config = list(sorted(config.items())) waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'), - ('repository', 'https://pypi.python.org/pypi'), + ('repository', 'https://upload.pypi.io/legacy/'), ('server', 'server3'), ('username', 'cbiggles')] self.assertEqual(config, waited) From f11c5c1af6806da60cedfdbc94b4548fefec73bb Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 11 Jul 2016 07:51:37 +0000 Subject: [PATCH 5888/8469] English spelling and grammar fixes --- tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 8f62b1a848..4e397ea4c9 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -243,7 +243,7 @@ def test_check_extensions_list(self): self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) # second element of each tuple in 'ext_modules' - # must be a ary (build info) + # must be a dictionary (build info) exts = [('foo.bar', '')] self.assertRaises(DistutilsSetupError, cmd.check_extensions_list, exts) From 843988ea2e4e4df34abf343e05fa1bac17680f5c Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 12 Jul 2016 22:28:51 +0700 Subject: [PATCH 5889/8469] Remove trailing whitespace --- setuptools/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/utils.py b/setuptools/utils.py index 91e4b87f65..080b9a8e23 100644 --- a/setuptools/utils.py +++ b/setuptools/utils.py @@ -3,9 +3,9 @@ def cs_path_exists(fspath): - if not os.path.exists(fspath): + if not os.path.exists(fspath): return False # make absolute so we always have a directory abspath = os.path.abspath(fspath) directory, filename = os.path.split(abspath) - return filename in os.listdir(directory) \ No newline at end of file + return filename in os.listdir(directory) From 6d11e88f938f09ef16db4c6064b6e74acba4db1d Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 12 Jul 2016 22:00:43 +0700 Subject: [PATCH 5890/8469] Fix quantity of blank lines after code object. --- bootstrap.py | 1 + pavement.py | 2 ++ setup.py | 1 + setuptools/__init__.py | 4 +++ setuptools/archive_util.py | 2 ++ setuptools/command/bdist_wininst.py | 1 + setuptools/command/build_ext.py | 2 ++ setuptools/command/build_py.py | 1 + setuptools/command/develop.py | 1 + setuptools/command/easy_install.py | 1 + setuptools/command/install_lib.py | 1 + setuptools/command/sdist.py | 1 + setuptools/command/test.py | 2 ++ setuptools/depends.py | 4 +-- setuptools/dist.py | 13 +++++++--- setuptools/extension.py | 2 ++ setuptools/lib2to3_ex.py | 4 +++ setuptools/msvc.py | 1 + setuptools/package_index.py | 17 +++++++++++++ setuptools/py26compat.py | 1 + setuptools/py27compat.py | 1 + setuptools/py31compat.py | 3 +++ setuptools/sandbox.py | 34 +++++++------------------- setuptools/ssl_support.py | 4 +++ setuptools/tests/__init__.py | 2 ++ setuptools/tests/py26compat.py | 1 + setuptools/tests/server.py | 5 ++++ setuptools/tests/test_bdist_egg.py | 1 + setuptools/tests/test_build_ext.py | 2 ++ setuptools/tests/test_develop.py | 2 ++ setuptools/tests/test_easy_install.py | 6 +++++ setuptools/tests/test_egg_info.py | 1 + setuptools/tests/test_find_packages.py | 4 +++ setuptools/tests/test_packageindex.py | 1 + setuptools/tests/test_sandbox.py | 1 + setuptools/tests/test_sdist.py | 1 - tests/manual_test.py | 3 +++ 37 files changed, 102 insertions(+), 32 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 70f962583d..bf7fb431e8 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -27,6 +27,7 @@ requires.txt = setuptools.command.egg_info:write_requirements """) + def ensure_egg_info(): if os.path.exists('setuptools.egg-info'): return diff --git a/pavement.py b/pavement.py index 303e9bac4f..f620c790d8 100644 --- a/pavement.py +++ b/pavement.py @@ -3,10 +3,12 @@ from paver.easy import task, path as Path import pip + def remove_all(paths): for path in paths: path.rmtree() if path.isdir() else path.remove() + @task def update_vendored(): vendor = Path('pkg_resources/_vendor') diff --git a/setup.py b/setup.py index 798d4db467..bac726bf66 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = [] + def _gen_console_scripts(): yield "easy_install = setuptools.command.easy_install:main" diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 67b57e4f46..2523ccc78f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -32,6 +32,7 @@ class PackageFinder(object): + @classmethod def find(cls, where='.', exclude=(), include=('*',)): """Return a list all Python packages found within directory 'where' @@ -108,7 +109,9 @@ def _build_filter(*patterns): """ return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) + class PEP420PackageFinder(PackageFinder): + @staticmethod def _looks_like_package(path): return True @@ -119,6 +122,7 @@ def _looks_like_package(path): _Command = _get_unpatched(_Command) + class Command(_Command): __doc__ = _Command.__doc__ diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index b3c9fa5690..4da24ec20d 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -15,9 +15,11 @@ from pkg_resources import ensure_directory, ContextualZipFile from distutils.errors import DistutilsError + class UnrecognizedFormat(DistutilsError): """Couldn't recognize the archive type""" + def default_filter(src,dst): """The default progress/filter callback; returns True for all files""" return dst diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 073de97b46..8243c917ee 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,6 +2,7 @@ class bdist_wininst(orig.bdist_wininst): + def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 1caf8c818b..e6db0764e8 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,7 +59,9 @@ def _customize_compiler_for_shlib(compiler): if_dl = lambda s: s if have_rtld else '' + class build_ext(_build_ext): + def run(self): """Build extensions in build directory, then copy if --inplace""" old_inplace, self.inplace = self.inplace, 0 diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 0bad829525..b5de9bda52 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -15,6 +15,7 @@ from setuptools.lib2to3_ex import Mixin2to3 except ImportError: class Mixin2to3: + def run_2to3(self, files, doctests=True): "do nothing" diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 11b5df10a8..3eb8612054 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -186,6 +186,7 @@ class VersionlessRequirement(object): >>> str(adapted_dist.as_requirement()) 'foo' """ + def __init__(self, dist): self.__dist = dist diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9ca1554ebe..73bdb0cb4c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2158,6 +2158,7 @@ def _use_header(new_header): class WindowsExecutableLauncherWriter(WindowsScriptWriter): + @classmethod def _get_script_args(cls, type_, name, header, script_text): """ diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 78fe689152..2b31c3e38b 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -3,6 +3,7 @@ from itertools import product, starmap import distutils.command.install_lib as orig + class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index f200b9469a..041ee42e2f 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -15,6 +15,7 @@ _default_revctrl = list + def walk_revctrl(dirname=''): """Find all files under revision control""" for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 39746a02bf..2d1adba85a 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -14,6 +14,7 @@ class ScanningLoader(TestLoader): + def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module @@ -46,6 +47,7 @@ def loadTestsFromModule(self, module, pattern=None): # adapted from jaraco.classes.properties:NonDataProperty class NonDataProperty(object): + def __init__(self, fget): self.fget = fget diff --git a/setuptools/depends.py b/setuptools/depends.py index 9f7c9a3551..ef3dbb916a 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -10,6 +10,7 @@ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] + class Require: """A prerequisite to building or installing a distribution""" @@ -39,7 +40,6 @@ def version_ok(self, version): str(version) != "unknown" and version >= self.requested_version def get_version(self, paths=None, default="unknown"): - """Get version number of installed module, 'None', or 'default' Search 'paths' for module. If not found, return 'None'. If found, @@ -78,7 +78,6 @@ def is_current(self, paths=None): def _iter_code(code): - """Yield '(op,arg)' pair for each operation in code object 'code'""" from array import array @@ -131,7 +130,6 @@ def find_module(module, paths=None): def get_module_constant(module, symbol, default=-1, paths=None): - """Find 'module' by searching 'paths', and extract 'symbol' Return 'None' if 'module' does not exist on 'paths', or it does not define diff --git a/setuptools/dist.py b/setuptools/dist.py index 086e0a587f..ee85cf5276 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -38,6 +38,7 @@ def _get_unpatched(cls): _Distribution = _get_unpatched(_Distribution) + def _patch_distribution_metadata_write_pkg_info(): """ Workaround issue #197 - Python 3 prior to 3.2.2 uses an environment-local @@ -61,6 +62,7 @@ def write_pkg_info(self, base_dir): sequence = tuple, list + def check_importable(dist, attr, value): try: ep = pkg_resources.EntryPoint.parse('x='+value) @@ -80,6 +82,8 @@ def assert_string_list(dist, attr, value): raise DistutilsSetupError( "%r must be a list of strings (got %r)" % (attr,value) ) + + def check_nsp(dist, attr, value): """Verify that namespace packages are valid""" assert_string_list(dist,attr,value) @@ -97,6 +101,7 @@ def check_nsp(dist, attr, value): " is not: please correct this in setup.py", nsp, parent ) + def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: @@ -113,6 +118,7 @@ def check_extras(dist, attr, value): "requirement specifiers." ) + def assert_bool(dist, attr, value): """Verify that value is True, False, 0, or 1""" if bool(value) != value: @@ -131,6 +137,7 @@ def check_requirements(dist, attr, value): ) raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) + def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: @@ -138,10 +145,12 @@ def check_entry_points(dist, attr, value): except ValueError as e: raise DistutilsSetupError(e) + def check_test_suite(dist, attr, value): if not isinstance(value, six.string_types): raise DistutilsSetupError("test_suite must be a string") + def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" if isinstance(value,dict): @@ -157,6 +166,7 @@ def check_package_data(dist, attr, value): "wildcard patterns" ) + def check_packages(dist, attr, value): for pkgname in value: if not re.match(r'\w+(\.\w+)*', pkgname): @@ -815,7 +825,6 @@ def include_by_default(self): return self.available and self.standard def include_in(self,dist): - """Ensure feature and its requirements are included in distribution You may override this in a subclass to perform additional operations on @@ -836,7 +845,6 @@ def include_in(self,dist): dist.include_feature(f) def exclude_from(self,dist): - """Ensure feature is excluded from distribution You may override this in a subclass to perform additional operations on @@ -852,7 +860,6 @@ def exclude_from(self,dist): dist.exclude_package(item) def validate(self,dist): - """Verify that feature makes sense in context of distribution This method is called by the distribution just before it parses its diff --git a/setuptools/extension.py b/setuptools/extension.py index b9d68178a1..d265b7a354 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -14,6 +14,7 @@ msvc.patch_for_specialized_compiler() + def _have_cython(): """ Return True if Cython can be imported. @@ -48,6 +49,7 @@ def _convert_pyx_sources_to_lang(self): sub = functools.partial(re.sub, '.pyx$', target_ext) self.sources = list(map(sub, self.sources)) + class Library(Extension): """Just like a regular Extension, but built as a library instead""" diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index feef591a88..f7296786ea 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -12,7 +12,9 @@ from lib2to3.refactor import RefactoringTool, get_fixers_from_package import setuptools + class DistutilsRefactoringTool(RefactoringTool): + def log_error(self, msg, *args, **kw): log.error(msg, *args) @@ -22,7 +24,9 @@ def log_message(self, msg, *args): def log_debug(self, msg, *args): log.debug(msg, *args) + class Mixin2to3(_Mixin2to3): + def run_2to3(self, files, doctests = False): # See of the distribution option has been set, otherwise check the # setuptools default. diff --git a/setuptools/msvc.py b/setuptools/msvc.py index b543c568fb..012ab32c74 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -769,6 +769,7 @@ class EnvironmentInfo: """ # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. + def __init__(self, arch, vc_ver=None, vc_min_ver=None): self.pi = PlatformInfo(arch) self.ri = RegistryInfo(self.pi) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e87504db66..e9b304b19d 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -85,6 +85,7 @@ def egg_info_for_url(url): if '#' in base: base, fragment = base.split('#',1) return base,fragment + def distros_for_url(url, metadata=None): """Yield egg or source distribution objects that might be found at a URL""" base, fragment = egg_info_for_url(url) @@ -97,6 +98,7 @@ def distros_for_url(url, metadata=None): ): yield dist + def distros_for_location(location, basename, metadata=None): """Yield egg or source distribution objects based on basename""" if basename.endswith('.egg.zip'): @@ -118,6 +120,7 @@ def distros_for_location(location, basename, metadata=None): return interpret_distro_name(location, basename, metadata) return [] # no extension matched + def distros_for_filename(filename, metadata=None): """Yield possible egg or source distribution objects based on a filename""" return distros_for_location( @@ -177,6 +180,7 @@ def unique_everseen(iterable, key=None): seen_add(k) yield element + def unique_values(func): """ Wrap a function returning an iterable such that the resulting iterable @@ -190,6 +194,7 @@ def wrapper(*args, **kwargs): REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) # this line is here to fix emacs' cruddy broken syntax highlighting + @unique_values def find_external_links(url, page): """Find rel="homepage" and rel="download" links in `page`, yielding URLs""" @@ -213,6 +218,7 @@ class ContentChecker(object): """ A null content checker that defines the interface for checking content """ + def feed(self, block): """ Feed a block of data to the hash. @@ -232,6 +238,7 @@ def report(self, reporter, template): """ return + class HashChecker(ContentChecker): pattern = re.compile( r'(?Psha1|sha224|sha384|sha256|sha512|md5)=' @@ -672,6 +679,7 @@ def gen_setup(self, filename, fragment, tmpdir): ) dl_blocksize = 8192 + def _download_to(self, url, filename): self.info("Downloading %s", url) # Download the file @@ -883,12 +891,14 @@ def warn(self, msg, *args): # references, a hexadecimal numeric reference, or a named reference). entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub + def uchr(c): if not isinstance(c, int): return c if c>255: return six.unichr(c) return chr(c) + def decode_entity(match): what = match.group(1) if what.startswith('#x'): @@ -899,10 +909,12 @@ def decode_entity(match): what = six.moves.html_entities.name2codepoint.get(what, match.group(0)) return uchr(what) + def htmldecode(text): """Decode HTML entities in the given text.""" return entity_sub(decode_entity, text) + def socket_timeout(timeout=15): def _socket_timeout(func): def _socket_timeout(*args, **kwargs): @@ -915,6 +927,7 @@ def _socket_timeout(*args, **kwargs): return _socket_timeout return _socket_timeout + def _encode_auth(auth): """ A function compatible with Python 2.3-3.3 that will encode @@ -937,10 +950,12 @@ def _encode_auth(auth): # strip the trailing carriage return return encoded.replace('\n','') + class Credential(object): """ A username/password pair. Use like a namedtuple. """ + def __init__(self, username, password): self.username = username self.password = password @@ -952,6 +967,7 @@ def __iter__(self): def __str__(self): return '%(username)s:%(password)s' % vars(self) + class PyPIConfig(configparser.RawConfigParser): def __init__(self): @@ -1042,6 +1058,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): def fix_sf_url(url): return url # backward compatibility + def local_open(url): """Read a local path, with special support for directories""" scheme, server, path, param, query, frag = urllib.parse.urlparse(url) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 40cbb88e67..74ec3980e1 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -9,6 +9,7 @@ except ImportError: from urllib import splittag + def strip_fragment(url): """ In `Python 8280 `_, Python 2.7 and diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 702f7d65b6..66aecc2a0a 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -4,6 +4,7 @@ import sys + def get_all_headers(message, key): """ Given an HTTPMessage, return all headers matching a given key. diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 8fe6dd9d70..04a314ef61 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -8,6 +8,7 @@ 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") @@ -19,12 +20,14 @@ def get_path(name): 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. """ + def __init__(self): self.name = None # Handle mkdtemp raising an exception self.name = tempfile.mkdtemp() diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 23e296b18b..83c3afdb36 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -29,6 +29,7 @@ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] + def _execfile(filename, globals, locals=None): """ Python 3 implementation of execfile. @@ -117,6 +118,7 @@ class ExceptionSaver: A Context Manager that will save an exception, serialized, and restore it later. """ + def __enter__(self): return self @@ -237,6 +239,7 @@ def run_setup(setup_script, args): # reset to include setup dir, w/clean callback list working_set.__init__() working_set.callbacks.append(lambda dist:dist.activate()) + def runner(): ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) @@ -280,6 +283,7 @@ def run(self, func): def _mk_dual_path_wrapper(name): original = getattr(_os,name) + def wrap(self,src,dst,*args,**kw): if self._active: src,dst = self._remap_pair(name,src,dst,*args,**kw) @@ -291,6 +295,7 @@ def wrap(self,src,dst,*args,**kw): def _mk_single_path_wrapper(name, original=None): original = original or getattr(_os,name) + def wrap(self,path,*args,**kw): if self._active: path = self._remap_input(name,path,*args,**kw) @@ -309,6 +314,7 @@ def wrap(self,path,*args,**kw): def _mk_single_with_return(name): original = getattr(_os,name) + def wrap(self,path,*args,**kw): if self._active: path = self._remap_input(name,path,*args,**kw) @@ -321,6 +327,7 @@ def wrap(self,path,*args,**kw): def _mk_query(name): original = getattr(_os,name) + def wrap(self,*args,**kw): retval = original(*args,**kw) if self._active: @@ -364,6 +371,7 @@ def _remap_pair(self,operation,src,dst,*args,**kw): # it appears pywin32 is not installed, so no need to exclude. pass + class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" @@ -453,6 +461,7 @@ def open(self, file, flags, mode=0o777, *args, **kw): "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) + class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" @@ -468,29 +477,4 @@ def __str__(self): maintainers to find out if a fix or workaround is available.""" % self.args - - - - - - - - - - - - - - - - - - - - - - - - - # diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 657197cfb1..ecede5092a 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -161,6 +161,7 @@ def https_open(self, req): class VerifyingHTTPSConn(HTTPSConnection): """Simple verifying connection: no auth, subclasses, timeouts, etc.""" + def __init__(self, host, ca_bundle, **kw): HTTPSConnection.__init__(self, host, **kw) self.ca_bundle = ca_bundle @@ -192,6 +193,7 @@ def connect(self): self.sock.close() raise + def opener_for(ca_bundle=None): """Get a urlopen() replacement that uses ca_bundle for verification""" return urllib.request.build_opener( @@ -201,6 +203,7 @@ def opener_for(ca_bundle=None): _wincerts = None + def get_win_certfile(): global _wincerts if _wincerts is not None: @@ -212,6 +215,7 @@ def get_win_certfile(): return None class MyCertFile(CertFile): + def __init__(self, stores=(), certs=()): CertFile.__init__(self) for store in stores: diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 3244735600..569b060f09 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -40,6 +40,7 @@ def makeSetup(**args): reason="bytecode support not available", ) + class TestDepends: def testExtractConst(self): @@ -289,6 +290,7 @@ def testFeatureWithInvalidRemove(self): with pytest.raises(SystemExit): makeSetup(features={'x':Feature('x', remove='y')}) + class TestCommandTests: def testTestIsCommand(self): diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index 7211f2757e..5325dad6e0 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -2,6 +2,7 @@ import tarfile import contextlib + def _tarfile_open_ex(*args, **kwargs): """ Extend result as a context manager. diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 6a687937bb..9e5fefb76c 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -18,6 +18,7 @@ class IndexServer(BaseHTTPServer.HTTPServer): # The index files should be located in setuptools/tests/indexes s.stop() """ + def __init__(self, server_address=('', 0), RequestHandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler): BaseHTTPServer.HTTPServer.__init__(self, server_address, @@ -42,16 +43,20 @@ def base_url(self): port = self.server_port return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port + class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): + def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) self.send_response(200, 'OK') + class MockServer(BaseHTTPServer.HTTPServer, threading.Thread): """ A simple HTTP Server that records the requests made to it. """ + def __init__(self, server_address=('', 0), RequestHandlerClass=RequestRecorder): BaseHTTPServer.HTTPServer.__init__(self, server_address, diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index ccfb2ea76b..a7ceac8696 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -15,6 +15,7 @@ setup(name='foo', py_modules=['hi']) """ + @pytest.yield_fixture def setup_context(tmpdir): with (tmpdir/'setup.py').open('w') as f: diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 0719ba44ae..5168ebf05b 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -3,7 +3,9 @@ from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution + class TestBuildExt: + def test_get_ext_filename(self): """ Setuptools needs to give back the same diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 1b84449995..d22e5e4a3f 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -26,6 +26,7 @@ INIT_PY = """print "foo" """ + @pytest.yield_fixture def temp_user(monkeypatch): with contexts.tempdir() as user_base: @@ -54,6 +55,7 @@ def test_env(tmpdir, temp_user): class TestDevelop: in_virtualenv = hasattr(sys, 'real_prefix') in_venv = hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix + @pytest.mark.skipif(in_virtualenv or in_venv, reason="Cannot run when invoked in a virtualenv or venv") def test_2to3_user_mode(self, test_env): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index fd06b6efc8..894c4fd8b5 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -41,6 +41,7 @@ class FakeDist(object): + def get_entry_map(self, group): if group != 'console_scripts': return {} @@ -55,6 +56,7 @@ def as_requirement(self): setup(name='foo') """) + class TestEasyInstallTest: def test_install_site_py(self, tmpdir): @@ -133,6 +135,7 @@ def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch): class TestPTHFileWriter: + def test_add_from_cwd_site_sets_dirty(self): '''a pth file manager should set dirty if a distribution is in site but also the cwd @@ -266,6 +269,7 @@ def distutils_package(): class TestDistutilsPackage: + def test_bdist_egg_available_on_distutils_pkg(self, distutils_package): run_setup('setup.py', ['bdist_egg']) @@ -557,6 +561,7 @@ def test_get_script_header(self): class TestCommandSpec: + def test_custom_launch_command(self): """ Show how a custom CommandSpec could be used to specify a #! executable @@ -601,6 +606,7 @@ def test_sys_executable(self): class TestWindowsScriptWriter: + def test_header(self): hdr = ei.WindowsScriptWriter.get_script_header('') assert hdr.startswith('#!') diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 3a0db58f9d..afbda2cc9e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -235,6 +235,7 @@ def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): def _find_egg_info_files(self, root): class DirList(list): + def __init__(self, files, base): super(DirList, self).__init__(files) self.base = base diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 06a7c02e46..65e7243d65 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -13,6 +13,8 @@ find_420_packages = setuptools.PEP420PackageFinder.find # modeled after CPython's test.support.can_symlink + + def can_symlink(): TESTFN = tempfile.mktemp() symlink_path = TESTFN + "can_symlink" @@ -26,6 +28,7 @@ def can_symlink(): globals().update(can_symlink=lambda: can) return can + def has_symlink(): bad_symlink = ( # Windows symlink directory detection is broken on Python 3.2 @@ -33,6 +36,7 @@ def has_symlink(): ) return can_symlink() and not bad_symlink + class TestFindPackages: def setup_method(self, method): diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 6a76b5fcff..61f5909b83 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -209,6 +209,7 @@ def test_report(self): class TestPyPIConfig: + def test_percent_in_password(self, tmpdir, monkeypatch): monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) pypirc = tmpdir / '.pypirc' diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index fefd46f7e6..aa6138e49b 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -57,6 +57,7 @@ def test_setup_py_with_CRLF(self, tmpdir): class TestExceptionSaver: + def test_exception_trapped(self): with setuptools.sandbox.ExceptionSaver(): raise ValueError("details") diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index d2a1f1bbfb..16d0eb07dc 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -132,7 +132,6 @@ def test_package_data_in_sdist(self): assert os.path.join('sdist_test', 'b.txt') in manifest assert os.path.join('sdist_test', 'c.rst') not in manifest - def test_defaults_case_sensitivity(self): """ Make sure default files (README.*, etc.) are added in a case-sensitive diff --git a/tests/manual_test.py b/tests/manual_test.py index 808fa55ae0..0904b607e0 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -10,9 +10,11 @@ from six.moves import urllib + def _system_call(*args): assert subprocess.call(args) == 0 + def tempdir(func): def _tempdir(*args, **kwargs): test_dir = tempfile.mkdtemp() @@ -62,6 +64,7 @@ def test_virtualenv(): res = f.read() assert 'setuptools' in res + @tempdir def test_full(): """virtualenv + pip + buildout""" From 7ba7d1b9737c95e7dc77c0379a81f886d23653a4 Mon Sep 17 00:00:00 2001 From: stepshal Date: Wed, 13 Jul 2016 11:53:42 +0700 Subject: [PATCH 5891/8469] Fix comparison with None. --- setuptools/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 3244735600..87dc8f5412 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -325,4 +325,4 @@ def testConflictingOptions(self): def testNoSuite(self): ts5 = makeSetup().get_command_obj('test') ts5.ensure_finalized() - assert ts5.test_suite == None + assert ts5.test_suite is None From f1e3a3fc4199c80e1eca7af0d1bd10544faf1542 Mon Sep 17 00:00:00 2001 From: stepshal Date: Wed, 13 Jul 2016 14:49:35 +0700 Subject: [PATCH 5892/8469] Format block comments. --- setuptools/site-patch.py | 4 ++-- setuptools/tests/environment.py | 8 ++++---- setuptools/tests/test_build_py.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index c2168019ad..bb887ad05a 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -10,7 +10,7 @@ def __boot(): pic = getattr(sys,'path_importer_cache',{}) stdpath = sys.path[len(PYTHONPATH):] mydir = os.path.dirname(__file__) - #print "searching",stdpath,sys.path + # print "searching",stdpath,sys.path for item in stdpath: if item==mydir or not item: @@ -39,7 +39,7 @@ def __boot(): else: raise ImportError("Couldn't find the real 'site' module") - #print "loaded", __file__ + # print "loaded", __file__ known_paths = dict([(makepath(item)[1],1) for item in sys.path]) # 2.2 comp diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index a23c0504e7..e523772184 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -25,11 +25,11 @@ def run_setup_py(cmd, pypath=None, path=None, for envname in os.environ: env[envname] = os.environ[envname] - #override the python path if needed + # override the python path if needed if pypath is not None: env["PYTHONPATH"] = pypath - #overide the execution path if needed + # overide the execution path if needed if path is not None: env["PATH"] = path if not env.get("PATH", ""): @@ -50,11 +50,11 @@ def run_setup_py(cmd, pypath=None, path=None, except OSError: return 1, '' - #decode the console string if needed + # decode the console string if needed if hasattr(data, "decode"): # use the default encoding data = data.decode() data = unicodedata.normalize('NFC', data) - #communciate calls wait() + # communciate calls wait() return proc.returncode, data diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index ed1703accd..860c569c2e 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -26,6 +26,6 @@ def test_directories_in_package_data_glob(tmpdir_as_cwd): package_data={'': ['path/*']}, )) os.makedirs('path/subpath') - #with contexts.quiet(): + # with contexts.quiet(): dist.parse_command_line() dist.run_commands() From c064f573cd7dcfd684afe9fb6d827afb6c3bd363 Mon Sep 17 00:00:00 2001 From: stepshal Date: Wed, 13 Jul 2016 15:16:47 +0700 Subject: [PATCH 5893/8469] tests: match closing bracket for visual identation --- setuptools/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 3244735600..02e5b9bcb7 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -221,7 +221,7 @@ def setup_method(self, method): 'foo': Feature("foo",standard=True,require_features=['baz',self.req]), 'bar': Feature("bar", standard=True, packages=['pkg.bar'], py_modules=['bar_et'], remove=['bar.ext'], - ), + ), 'baz': Feature( "baz", optional=False, packages=['pkg.baz'], scripts = ['scripts/baz_it'], From 053a3a12cf0cc902e0f869b8cc4cff997f73fc84 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 06:59:30 +0700 Subject: [PATCH 5894/8469] Add missing blank line. --- setuptools/package_index.py | 1 + setuptools/unicode_utils.py | 1 + 2 files changed, 2 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e9b304b19d..7fb8b95495 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -162,6 +162,7 @@ def interpret_distro_name( platform = platform ) + # From Python 2.7 docs def unique_everseen(iterable, key=None): "List unique elements, preserving order. Remember all elements ever seen." diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index ffab3e24ac..7c63efd20b 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -3,6 +3,7 @@ from setuptools.extern import six + # HFS Plus uses decomposed UTF-8 def decompose(path): if isinstance(path, six.text_type): From f749ccab1e55723848946c9aba5c3eddebe0b24e Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 09:26:06 +0700 Subject: [PATCH 5895/8469] Add missing whitespace. --- setuptools/archive_util.py | 2 +- setuptools/depends.py | 12 +-- setuptools/dist.py | 136 ++++++++++++------------- setuptools/package_index.py | 74 +++++++------- setuptools/py26compat.py | 2 +- setuptools/sandbox.py | 68 ++++++------- setuptools/site-patch.py | 10 +- setuptools/tests/__init__.py | 72 ++++++------- setuptools/tests/contexts.py | 2 +- setuptools/tests/test_find_packages.py | 2 +- 10 files changed, 190 insertions(+), 190 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 4da24ec20d..d195063815 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -20,7 +20,7 @@ class UnrecognizedFormat(DistutilsError): """Couldn't recognize the archive type""" -def default_filter(src,dst): +def default_filter(src, dst): """The default progress/filter callback; returns True for all files""" return dst diff --git a/setuptools/depends.py b/setuptools/depends.py index ef3dbb916a..eb1d7b13ff 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -31,7 +31,7 @@ def __init__(self, name, requested_version, module, homepage='', def full_name(self): """Return full package/distribution name, w/version""" if self.requested_version is not None: - return '%s-%s' % (self.name,self.requested_version) + return '%s-%s' % (self.name, self.requested_version) return self.name def version_ok(self, version): @@ -52,7 +52,7 @@ def get_version(self, paths=None, default="unknown"): if self.attribute is None: try: - f,p,i = find_module(self.module,paths) + f, p, i = find_module(self.module, paths) if f: f.close() return default except ImportError: @@ -83,7 +83,7 @@ def _iter_code(code): from array import array from dis import HAVE_ARGUMENT, EXTENDED_ARG - bytes = array('b',code.co_code) + bytes = array('b', code.co_code) eof = len(code.co_code) ptr = 0 @@ -107,7 +107,7 @@ def _iter_code(code): arg = None ptr += 1 - yield op,arg + yield op, arg def find_module(module, paths=None): @@ -117,14 +117,14 @@ def find_module(module, paths=None): while parts: part = parts.pop(0) - f, path, (suffix,mode,kind) = info = imp.find_module(part, paths) + f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) if kind==PKG_DIRECTORY: parts = parts or ['__init__'] paths = [path] elif parts: - raise ImportError("Can't find %r in %s" % (parts,module)) + raise ImportError("Can't find %r in %s" % (parts, module)) return info diff --git a/setuptools/dist.py b/setuptools/dist.py index ee85cf5276..f229d726f4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -67,10 +67,10 @@ def check_importable(dist, attr, value): try: ep = pkg_resources.EntryPoint.parse('x='+value) assert not ep.extras - except (TypeError,ValueError,AttributeError,AssertionError): + except (TypeError, ValueError, AttributeError, AssertionError): raise DistutilsSetupError( "%r must be importable 'module:attrs' string (got %r)" - % (attr,value) + % (attr, value) ) @@ -78,15 +78,15 @@ def assert_string_list(dist, attr, value): """Verify that value is a string list or None""" try: assert ''.join(value)!=value - except (TypeError,ValueError,AttributeError,AssertionError): + except (TypeError, ValueError, AttributeError, AssertionError): raise DistutilsSetupError( - "%r must be a list of strings (got %r)" % (attr,value) + "%r must be a list of strings (got %r)" % (attr, value) ) def check_nsp(dist, attr, value): """Verify that namespace packages are valid""" - assert_string_list(dist,attr,value) + assert_string_list(dist, attr, value) for nsp in value: if not dist.has_contents_for(nsp): raise DistutilsSetupError( @@ -105,13 +105,13 @@ def check_nsp(dist, attr, value): def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: - for k,v in value.items(): + for k, v in value.items(): if ':' in k: - k,m = k.split(':',1) + k, m = k.split(':', 1) if pkg_resources.invalid_marker(m): raise DistutilsSetupError("Invalid environment marker: "+m) list(pkg_resources.parse_requirements(v)) - except (TypeError,ValueError,AttributeError): + except (TypeError, ValueError, AttributeError): raise DistutilsSetupError( "'extras_require' must be a dictionary whose values are " "strings or lists of strings containing valid project/version " @@ -153,9 +153,9 @@ def check_test_suite(dist, attr, value): def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" - if isinstance(value,dict): - for k,v in value.items(): - if not isinstance(k,str): break + if isinstance(value, dict): + for k, v in value.items(): + if not isinstance(k, str): break try: iter(v) except TypeError: break @@ -274,12 +274,12 @@ def __init__(self, attrs=None): # Make sure we have any eggs needed to interpret 'attrs' if attrs is not None: self.dependency_links = attrs.pop('dependency_links', []) - assert_string_list(self,'dependency_links',self.dependency_links) + assert_string_list(self, 'dependency_links', self.dependency_links) 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'): vars(self).setdefault(ep.name, None) - _Distribution.__init__(self,attrs) + _Distribution.__init__(self, attrs) if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) @@ -311,9 +311,9 @@ def parse_command_line(self): self._finalize_features() return result - def _feature_attrname(self,name): + def _feature_attrname(self, name): """Convert feature name to corresponding option attribute name""" - return 'with_'+name.replace('-','_') + return 'with_'+name.replace('-', '_') def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" @@ -331,7 +331,7 @@ def finalize_options(self): self._set_global_opts_from_features() for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): - value = getattr(self,ep.name,None) + value = getattr(self, ep.name, None) if value is not None: ep.require(installer=self.fetch_build_egg) ep.load()(self, ep.name, value) @@ -364,7 +364,7 @@ def fetch_build_egg(self, req): cmd.package_index.to_scan = [] except AttributeError: from setuptools.command.easy_install import easy_install - dist = self.__class__({'script_args':['easy_install']}) + dist = self.__class__({'script_args': ['easy_install']}) dist.parse_config_files() opts = dist.get_option_dict('easy_install') keep = ( @@ -395,8 +395,8 @@ def _set_global_opts_from_features(self): go = [] no = self.negative_opt.copy() - for name,feature in self.features.items(): - self._set_feature(name,None) + for name, feature in self.features.items(): + self._set_feature(name, None) feature.validate(self) if feature.optional: @@ -417,25 +417,25 @@ def _finalize_features(self): """Add/remove features and resolve dependencies between them""" # First, flag all the enabled items (and thus their dependencies) - for name,feature in self.features.items(): + for name, feature in self.features.items(): enabled = self.feature_is_included(name) if enabled or (enabled is None and feature.include_by_default()): feature.include_in(self) - self._set_feature(name,1) + self._set_feature(name, 1) # Then disable the rest, so that off-by-default features don't # get flagged as errors when they're required by an enabled feature - for name,feature in self.features.items(): + for name, feature in self.features.items(): if not self.feature_is_included(name): feature.exclude_from(self) - self._set_feature(name,0) + self._set_feature(name, 0) def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: return self.cmdclass[command] - for ep in pkg_resources.iter_entry_points('distutils.commands',command): + for ep in pkg_resources.iter_entry_points('distutils.commands', command): ep.require(installer=self.fetch_build_egg) self.cmdclass[command] = cmdclass = ep.load() return cmdclass @@ -458,15 +458,15 @@ def get_command_list(self): self.cmdclass[ep.name] = cmdclass return _Distribution.get_command_list(self) - def _set_feature(self,name,status): + def _set_feature(self, name, status): """Set feature's inclusion status""" - setattr(self,self._feature_attrname(name),status) + setattr(self, self._feature_attrname(name), status) - def feature_is_included(self,name): + def feature_is_included(self, name): """Return 1 if feature is included, 0 if excluded, 'None' if unknown""" - return getattr(self,self._feature_attrname(name)) + return getattr(self, self._feature_attrname(name)) - def include_feature(self,name): + def include_feature(self, name): """Request inclusion of feature named 'name'""" if self.feature_is_included(name)==0: @@ -475,9 +475,9 @@ def include_feature(self,name): descr + " is required, but was excluded or is not available" ) self.features[name].include_in(self) - self._set_feature(name,1) + self._set_feature(name, 1) - def include(self,**attrs): + def include(self, **attrs): """Add items to distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would add 'x' to @@ -492,14 +492,14 @@ def include(self,**attrs): will try to call 'dist._include_foo({"bar":"baz"})', which can then handle whatever special inclusion logic is needed. """ - for k,v in attrs.items(): + for k, v in attrs.items(): include = getattr(self, '_include_'+k, None) if include: include(v) else: - self._include_misc(k,v) + self._include_misc(k, v) - def exclude_package(self,package): + def exclude_package(self, package): """Remove packages, modules, and extensions in named package""" pfx = package+'.' @@ -521,7 +521,7 @@ def exclude_package(self,package): if p.name != package and not p.name.startswith(pfx) ] - def has_contents_for(self,package): + def has_contents_for(self, package): """Return true if 'exclude_package(package)' would do something""" pfx = package+'.' @@ -530,48 +530,48 @@ def has_contents_for(self,package): if p==package or p.startswith(pfx): return True - def _exclude_misc(self,name,value): + def _exclude_misc(self, name, value): """Handle 'exclude()' for list/tuple attrs without a special handler""" - if not isinstance(value,sequence): + if not isinstance(value, sequence): raise DistutilsSetupError( "%s: setting must be a list or tuple (%r)" % (name, value) ) try: - old = getattr(self,name) + old = getattr(self, name) except AttributeError: raise DistutilsSetupError( "%s: No such distribution setting" % name ) - if old is not None and not isinstance(old,sequence): + if old is not None and not isinstance(old, sequence): raise DistutilsSetupError( name+": this setting cannot be changed via include/exclude" ) elif old: - setattr(self,name,[item for item in old if item not in value]) + setattr(self, name, [item for item in old if item not in value]) - def _include_misc(self,name,value): + def _include_misc(self, name, value): """Handle 'include()' for list/tuple attrs without a special handler""" - if not isinstance(value,sequence): + if not isinstance(value, sequence): raise DistutilsSetupError( "%s: setting must be a list (%r)" % (name, value) ) try: - old = getattr(self,name) + old = getattr(self, name) except AttributeError: raise DistutilsSetupError( "%s: No such distribution setting" % name ) if old is None: - setattr(self,name,value) - elif not isinstance(old,sequence): + setattr(self, name, value) + elif not isinstance(old, sequence): raise DistutilsSetupError( name+": this setting cannot be changed via include/exclude" ) else: - setattr(self,name,old+[item for item in value if item not in old]) + setattr(self, name, old+[item for item in value if item not in old]) - def exclude(self,**attrs): + def exclude(self, **attrs): """Remove items from distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from @@ -587,15 +587,15 @@ def exclude(self,**attrs): will try to call 'dist._exclude_foo({"bar":"baz"})', which can then handle whatever special exclusion logic is needed. """ - for k,v in attrs.items(): + for k, v in attrs.items(): exclude = getattr(self, '_exclude_'+k, None) if exclude: exclude(v) else: - self._exclude_misc(k,v) + self._exclude_misc(k, v) - def _exclude_packages(self,packages): - if not isinstance(packages,sequence): + def _exclude_packages(self, packages): + if not isinstance(packages, sequence): raise DistutilsSetupError( "packages: setting must be a list or tuple (%r)" % (packages,) ) @@ -610,17 +610,17 @@ def _parse_command_opts(self, parser, args): command = args[0] aliases = self.get_option_dict('aliases') while command in aliases: - src,alias = aliases[command] + src, alias = aliases[command] del aliases[command] # ensure each alias can expand only once! import shlex - args[:1] = shlex.split(alias,True) + args[:1] = shlex.split(alias, True) command = args[0] nargs = _Distribution._parse_command_opts(self, parser, args) # Handle commands that want to consume all remaining arguments cmd_class = self.get_command_class(command) - if getattr(cmd_class,'command_consumes_arguments',None): + if getattr(cmd_class, 'command_consumes_arguments', None): self.get_option_dict(command)['args'] = ("command line", nargs) if nargs is not None: return [] @@ -639,20 +639,20 @@ def get_cmdline_options(self): d = {} - for cmd,opts in self.command_options.items(): + for cmd, opts in self.command_options.items(): - for opt,(src,val) in opts.items(): + for opt, (src, val) in opts.items(): if src != "command line": continue - opt = opt.replace('_','-') + opt = opt.replace('_', '-') if val==0: cmdobj = self.get_command_obj(cmd) neg_opt = self.negative_opt.copy() - neg_opt.update(getattr(cmdobj,'negative_opt',{})) - for neg,pos in neg_opt.items(): + neg_opt.update(getattr(cmdobj, 'negative_opt', {})) + for neg, pos in neg_opt.items(): if pos==opt: opt=neg val=None @@ -663,7 +663,7 @@ def get_cmdline_options(self): elif val==1: val = None - d.setdefault(cmd,{})[opt] = val + d.setdefault(cmd, {})[opt] = val return d @@ -677,7 +677,7 @@ def iter_distribution_names(self): yield module for ext in self.ext_modules or (): - if isinstance(ext,tuple): + if isinstance(ext, tuple): name, buildinfo = ext else: name = ext.name @@ -800,16 +800,16 @@ def __init__(self, description, standard=False, available=True, self.standard = standard self.available = available self.optional = optional - if isinstance(require_features,(str,Require)): + if isinstance(require_features, (str, Require)): require_features = require_features, self.require_features = [ - r for r in require_features if isinstance(r,str) + r for r in require_features if isinstance(r, str) ] - er = [r for r in require_features if not isinstance(r,str)] + er = [r for r in require_features if not isinstance(r, str)] if er: extras['require_features'] = er - if isinstance(remove,str): + if isinstance(remove, str): remove = remove, self.remove = remove self.extras = extras @@ -824,7 +824,7 @@ def include_by_default(self): """Should this feature be included by default?""" return self.available and self.standard - def include_in(self,dist): + def include_in(self, dist): """Ensure feature and its requirements are included in distribution You may override this in a subclass to perform additional operations on @@ -844,7 +844,7 @@ def include_in(self,dist): for f in self.require_features: dist.include_feature(f) - def exclude_from(self,dist): + def exclude_from(self, dist): """Ensure feature is excluded from distribution You may override this in a subclass to perform additional operations on @@ -859,7 +859,7 @@ def exclude_from(self,dist): for item in self.remove: dist.exclude_package(item) - def validate(self,dist): + def validate(self, dist): """Verify that feature makes sense in context of distribution This method is called by the distribution just before it parses its diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e9b304b19d..f3ee5ec0a1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -37,7 +37,7 @@ '([^<]+)\n\s+\\(md5\\)' ) -URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match +URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() __all__ = [ @@ -62,18 +62,18 @@ def parse_bdist_wininst(name): if lower.endswith('.win32.exe'): base = name[:-10] plat = 'win32' - elif lower.startswith('.win32-py',-16): + elif lower.startswith('.win32-py', -16): py_ver = name[-7:-4] base = name[:-16] plat = 'win32' elif lower.endswith('.win-amd64.exe'): base = name[:-14] plat = 'win-amd64' - elif lower.startswith('.win-amd64-py',-20): + elif lower.startswith('.win-amd64-py', -20): py_ver = name[-7:-4] base = name[:-20] plat = 'win-amd64' - return base,py_ver,plat + return base, py_ver, plat def egg_info_for_url(url): @@ -82,8 +82,8 @@ def egg_info_for_url(url): base = urllib.parse.unquote(path.split('/')[-1]) if server=='sourceforge.net' and base=='download': # XXX Yuck base = urllib.parse.unquote(path.split('/')[-2]) - if '#' in base: base, fragment = base.split('#',1) - return base,fragment + if '#' in base: base, fragment = base.split('#', 1) + return base, fragment def distros_for_url(url, metadata=None): @@ -155,7 +155,7 @@ def interpret_distro_name( # it is a bdist_dumb, not an sdist -- bail out return - for p in range(1,len(parts)+1): + for p in range(1, len(parts)+1): yield Distribution( location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]), py_version=py_version, precedence = precedence, @@ -209,7 +209,7 @@ def find_external_links(url, page): for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: - match = HREF.search(page,pos) + match = HREF.search(page, pos) if match: yield urllib.parse.urljoin(url, htmldecode(match.group(1))) @@ -279,12 +279,12 @@ def __init__( self, index_url="https://pypi.python.org/simple", hosts=('*',), ca_bundle=None, verify_ssl=True, *args, **kw ): - Environment.__init__(self,*args,**kw) + Environment.__init__(self, *args, **kw) self.index_url = index_url + "/"[:not index_url.endswith('/')] self.scanned_urls = {} self.fetched_urls = {} self.package_pages = {} - self.allows = re.compile('|'.join(map(translate,hosts))).match + self.allows = re.compile('|'.join(map(translate, hosts))).match self.to_scan = [] if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()): self.opener = ssl_support.opener_for(ca_bundle) @@ -335,7 +335,7 @@ def process_url(self, url, retrieve=False): for match in HREF.finditer(page): link = urllib.parse.urljoin(base, htmldecode(match.group(1))) self.process_url(link) - if url.startswith(self.index_url) and getattr(f,'code',None)!=404: + if url.startswith(self.index_url) and getattr(f, 'code', None)!=404: page = self.process_index(url, page) def process_filename(self, fn, nested=False): @@ -347,7 +347,7 @@ def process_filename(self, fn, nested=False): if os.path.isdir(fn) and not nested: path = os.path.realpath(fn) for item in os.listdir(path): - self.process_filename(os.path.join(path,item), True) + self.process_filename(os.path.join(path, item), True) dists = distros_for_filename(fn) if dists: @@ -391,7 +391,7 @@ def scan_egg_link(self, path, entry): dist.precedence = SOURCE_DIST self.add(dist) - def process_index(self,url,page): + def process_index(self, url, page): """Process the contents of a PyPI page""" def scan(link): # Process a URL to see if it's for a package page @@ -403,7 +403,7 @@ def scan(link): # it's a package page, sanitize and index it pkg = safe_name(parts[0]) ver = safe_version(parts[1]) - self.package_pages.setdefault(pkg.lower(),{})[link] = True + self.package_pages.setdefault(pkg.lower(), {})[link] = True return to_filename(pkg), to_filename(ver) return None, None @@ -422,13 +422,13 @@ def scan(link): base, frag = egg_info_for_url(new_url) if base.endswith('.py') and not frag: if ver: - new_url+='#egg=%s-%s' % (pkg,ver) + new_url+='#egg=%s-%s' % (pkg, ver) else: self.need_version_info(url) self.scan_url(new_url) return PYPI_MD5.sub( - lambda m: '%s' % m.group(1,3,2), page + lambda m: '%s' % m.group(1, 3, 2), page ) else: return "" # no sense double-scanning non-package pages @@ -441,7 +441,7 @@ def need_version_info(self, url): def scan_all(self, msg=None, *args): if self.index_url not in self.fetched_urls: - if msg: self.warn(msg,*args) + if msg: self.warn(msg, *args) self.info( "Scanning index of all packages (this may take a while)" ) @@ -458,7 +458,7 @@ def find_packages(self, requirement): # We couldn't find the target package, so search the index page too self.not_found_in_index(requirement) - for url in list(self.package_pages.get(requirement.key,())): + for url in list(self.package_pages.get(requirement.key, ())): # scan each page that might be related to the desired package self.scan_url(url) @@ -469,7 +469,7 @@ def obtain(self, requirement, installer=None): if dist in requirement: return dist self.debug("%s does not match %s", requirement, dist) - return super(PackageIndex, self).obtain(requirement,installer) + return super(PackageIndex, self).obtain(requirement, installer) def check_hash(self, checker, filename, tfp): """ @@ -534,14 +534,14 @@ def download(self, spec, tmpdir): of `tmpdir`, and the local filename is returned. Various errors may be raised if a problem occurs during downloading. """ - if not isinstance(spec,Requirement): + if not isinstance(spec, Requirement): scheme = URL_SCHEME(spec) if scheme: # It's a url, download it to tmpdir found = self._download_url(scheme.group(1), spec, tmpdir) base, fragment = egg_info_for_url(spec) if base.endswith('.py'): - found = self.gen_setup(found,fragment,tmpdir) + found = self.gen_setup(found, fragment, tmpdir) return found elif os.path.exists(spec): # Existing file or directory, just return it @@ -554,7 +554,7 @@ def download(self, spec, tmpdir): "Not a URL, existing file, or requirement spec: %r" % (spec,) ) - return getattr(self.fetch_distribution(spec, tmpdir),'location',None) + return getattr(self.fetch_distribution(spec, tmpdir), 'location', None) def fetch_distribution( self, requirement, tmpdir, force_scan=False, source=False, @@ -590,7 +590,7 @@ def find(req, env=None): if dist.precedence==DEVELOP_DIST and not develop_ok: if dist not in skipped: - self.warn("Skipping development or system egg: %s",dist) + self.warn("Skipping development or system egg: %s", dist) skipped[dist] = 1 continue @@ -632,7 +632,7 @@ def fetch(self, requirement, tmpdir, force_scan=False, source=False): ``location`` of the downloaded distribution instead of a distribution object. """ - dist = self.fetch_distribution(requirement,tmpdir,force_scan,source) + dist = self.fetch_distribution(requirement, tmpdir, force_scan, source) if dist is not None: return dist.location return None @@ -670,7 +670,7 @@ def gen_setup(self, filename, fragment, tmpdir): raise DistutilsError( "Can't unambiguously interpret project/version identifier %r; " "any dashes in the name or version should be escaped using " - "underscores. %r" % (fragment,dists) + "underscores. %r" % (fragment, dists) ) else: raise DistutilsError( @@ -689,7 +689,7 @@ def _download_to(self, url, filename): fp = self.open_url(strip_fragment(url)) if isinstance(fp, urllib.error.HTTPError): raise DistutilsError( - "Can't download %s: %s %s" % (url, fp.code,fp.msg) + "Can't download %s: %s %s" % (url, fp.code, fp.msg) ) headers = fp.info() blocknum = 0 @@ -700,7 +700,7 @@ def _download_to(self, url, filename): sizes = get_all_headers(headers, 'Content-Length') size = max(map(int, sizes)) self.reporthook(url, filename, blocknum, bs, size) - with open(filename,'wb') as tfp: + with open(filename, 'wb') as tfp: while True: block = fp.read(bs) if block: @@ -759,14 +759,14 @@ def _download_url(self, scheme, url, tmpdir): name, fragment = egg_info_for_url(url) if name: while '..' in name: - name = name.replace('..','.').replace('\\','_') + name = name.replace('..', '.').replace('\\', '_') else: name = "__downloaded__" # default if URL has no path contents if name.endswith('.egg.zip'): name = name[:-4] # strip the extra .zip before download - filename = os.path.join(tmpdir,name) + filename = os.path.join(tmpdir, name) # Download the file # @@ -787,7 +787,7 @@ def scan_url(self, url): def _attempt_download(self, url, filename): headers = self._download_to(url, filename) - if 'html' in headers.get('content-type','').lower(): + if 'html' in headers.get('content-type', '').lower(): return self._download_html(url, headers, filename) else: return filename @@ -808,16 +808,16 @@ def _download_html(self, url, headers, filename): raise DistutilsError("Unexpected HTML page found at "+url) def _download_svn(self, url, filename): - url = url.split('#',1)[0] # remove any fragment for svn's sake + url = url.split('#', 1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: - netloc, path = path[2:].split('/',1) + netloc, path = path[2:].split('/', 1) auth, host = splituser(netloc) if auth: if ':' in auth: - user, pw = auth.split(':',1) + user, pw = auth.split(':', 1) creds = " --username=%s --password=%s" % (user, pw) else: creds = " --username="+auth @@ -835,7 +835,7 @@ def _vcs_split_rev_from_url(url, pop_prefix=False): scheme = scheme.split('+', 1)[-1] # Some fragment identification fails - path = path.split('#',1)[0] + path = path.split('#', 1)[0] rev = None if '@' in path: @@ -847,7 +847,7 @@ def _vcs_split_rev_from_url(url, pop_prefix=False): return url, rev def _download_git(self, url, filename): - filename = filename.split('#',1)[0] + filename = filename.split('#', 1)[0] url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) self.info("Doing git clone from %s to %s", url, filename) @@ -863,7 +863,7 @@ def _download_git(self, url, filename): return filename def _download_hg(self, url, filename): - filename = filename.split('#',1)[0] + filename = filename.split('#', 1)[0] url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True) self.info("Doing hg clone from %s to %s", url, filename) @@ -948,7 +948,7 @@ def _encode_auth(auth): # convert back to a string encoded = encoded_bytes.decode() # strip the trailing carriage return - return encoded.replace('\n','') + return encoded.replace('\n', '') class Credential(object): diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 74ec3980e1..7c60c90ea5 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -19,5 +19,5 @@ def strip_fragment(url): url, fragment = splittag(url) return url -if sys.version_info >= (2,7): +if sys.version_info >= (2, 7): strip_fragment = lambda x: x diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 83c3afdb36..c6bab096d0 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -238,7 +238,7 @@ def run_setup(setup_script, args): sys.path.insert(0, setup_dir) # reset to include setup dir, w/clean callback list working_set.__init__() - working_set.callbacks.append(lambda dist:dist.activate()) + working_set.callbacks.append(lambda dist: dist.activate()) def runner(): ns = dict(__file__=setup_script, __name__='__main__') @@ -258,12 +258,12 @@ class AbstractSandbox: def __init__(self): self._attrs = [ name for name in dir(_os) - if not name.startswith('_') and hasattr(self,name) + if not name.startswith('_') and hasattr(self, name) ] def _copy(self, source): for name in self._attrs: - setattr(os, name, getattr(source,name)) + setattr(os, name, getattr(source, name)) def run(self, func): """Run 'func' under os sandboxing""" @@ -282,24 +282,24 @@ def run(self, func): self._copy(_os) def _mk_dual_path_wrapper(name): - original = getattr(_os,name) + original = getattr(_os, name) - def wrap(self,src,dst,*args,**kw): + def wrap(self, src, dst, *args, **kw): if self._active: - src,dst = self._remap_pair(name,src,dst,*args,**kw) - return original(src,dst,*args,**kw) + src, dst = self._remap_pair(name, src, dst, *args, **kw) + return original(src, dst, *args, **kw) return wrap for name in ["rename", "link", "symlink"]: - if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name) + if hasattr(_os, name): locals()[name] = _mk_dual_path_wrapper(name) def _mk_single_path_wrapper(name, original=None): - original = original or getattr(_os,name) + original = original or getattr(_os, name) - def wrap(self,path,*args,**kw): + def wrap(self, path, *args, **kw): if self._active: - path = self._remap_input(name,path,*args,**kw) - return original(path,*args,**kw) + path = self._remap_input(name, path, *args, **kw) + return original(path, *args, **kw) return wrap if _file: @@ -310,51 +310,51 @@ def wrap(self,path,*args,**kw): "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat", "startfile", "mkfifo", "mknod", "pathconf", "access" ]: - if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name) + if hasattr(_os, name): locals()[name] = _mk_single_path_wrapper(name) def _mk_single_with_return(name): - original = getattr(_os,name) + original = getattr(_os, name) - def wrap(self,path,*args,**kw): + def wrap(self, path, *args, **kw): if self._active: - path = self._remap_input(name,path,*args,**kw) - return self._remap_output(name, original(path,*args,**kw)) - return original(path,*args,**kw) + path = self._remap_input(name, path, *args, **kw) + return self._remap_output(name, original(path, *args, **kw)) + return original(path, *args, **kw) return wrap for name in ['readlink', 'tempnam']: - if hasattr(_os,name): locals()[name] = _mk_single_with_return(name) + if hasattr(_os, name): locals()[name] = _mk_single_with_return(name) def _mk_query(name): - original = getattr(_os,name) + original = getattr(_os, name) - def wrap(self,*args,**kw): - retval = original(*args,**kw) + def wrap(self, *args, **kw): + retval = original(*args, **kw) if self._active: return self._remap_output(name, retval) return retval return wrap for name in ['getcwd', 'tmpnam']: - if hasattr(_os,name): locals()[name] = _mk_query(name) + if hasattr(_os, name): locals()[name] = _mk_query(name) - def _validate_path(self,path): + def _validate_path(self, path): """Called to remap or validate any path, whether input or output""" return path - def _remap_input(self,operation,path,*args,**kw): + def _remap_input(self, operation, path, *args, **kw): """Called for path inputs""" return self._validate_path(path) - def _remap_output(self,operation,path): + def _remap_output(self, operation, path): """Called for path outputs""" return self._validate_path(path) - def _remap_pair(self,operation,src,dst,*args,**kw): + def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" return ( - self._remap_input(operation+'-from',src,*args,**kw), - self._remap_input(operation+'-to',dst,*args,**kw) + self._remap_input(operation+'-from', src, *args, **kw), + self._remap_input(operation+'-to', dst, *args, **kw) ) @@ -388,7 +388,7 @@ class DirectorySandbox(AbstractSandbox): def __init__(self, sandbox, exceptions=_EXCEPTIONS): self._sandbox = os.path.normcase(os.path.realpath(sandbox)) - self._prefix = os.path.join(self._sandbox,'') + self._prefix = os.path.join(self._sandbox, '') self._exceptions = [ os.path.normcase(os.path.realpath(path)) for path in exceptions @@ -403,12 +403,12 @@ def _violation(self, operation, *args, **kw): def _file(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("file", path, mode, *args, **kw) - return _file(path,mode,*args,**kw) + return _file(path, mode, *args, **kw) def _open(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("open", path, mode, *args, **kw) - return _open(path,mode,*args,**kw) + return _open(path, mode, *args, **kw) def tmpnam(self): self._violation("tmpnam") @@ -448,13 +448,13 @@ def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" if not self._ok(src) or not self._ok(dst): self._violation(operation, src, dst, *args, **kw) - return (src,dst) + return (src, dst) def open(self, file, flags, mode=0o777, *args, **kw): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode, *args, **kw) - return _os.open(file,flags,mode, *args, **kw) + return _os.open(file, flags, mode, *args, **kw) WRITE_FLAGS = functools.reduce( operator.or_, [getattr(_os, a, 0) for a in diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index c2168019ad..159d254e3b 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -7,7 +7,7 @@ def __boot(): else: PYTHONPATH = PYTHONPATH.split(os.pathsep) - pic = getattr(sys,'path_importer_cache',{}) + pic = getattr(sys, 'path_importer_cache', {}) stdpath = sys.path[len(PYTHONPATH):] mydir = os.path.dirname(__file__) #print "searching",stdpath,sys.path @@ -25,14 +25,14 @@ def __boot(): else: try: import imp # Avoid import loop in Python >= 3.3 - stream, path, descr = imp.find_module('site',[item]) + stream, path, descr = imp.find_module('site', [item]) except ImportError: continue if stream is None: continue try: # This should actually reload the current module - imp.load_module('site',stream,path,descr) + imp.load_module('site', stream, path, descr) finally: stream.close() break @@ -41,9 +41,9 @@ def __boot(): #print "loaded", __file__ - known_paths = dict([(makepath(item)[1],1) for item in sys.path]) # 2.2 comp + known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp - oldpos = getattr(sys,'__egginsert',0) # save old insertion position + oldpos = getattr(sys, '__egginsert', 0) # save old insertion position sys.__egginsert = 0 # and reset the current one for item in PYTHONPATH: diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 569b060f09..50a4fff80a 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -27,7 +27,7 @@ def makeSetup(**args): distutils.core._setup_stop_after = "commandline" # Don't let system command line leak into tests! - args.setdefault('script_args',['install']) + args.setdefault('script_args', ['install']) try: return setuptools.setup(**args) @@ -56,35 +56,35 @@ def f1(): fc = six.get_function_code(f1) # unrecognized name - assert dep.extract_constant(fc,'q', -1) is None + assert dep.extract_constant(fc, 'q', -1) is None # constant assigned - dep.extract_constant(fc,'x', -1) == "test" + dep.extract_constant(fc, 'x', -1) == "test" # expression assigned - dep.extract_constant(fc,'y', -1) == -1 + dep.extract_constant(fc, 'y', -1) == -1 # recognized name, not assigned - dep.extract_constant(fc,'z', -1) is None + dep.extract_constant(fc, 'z', -1) is None def testFindModule(self): with pytest.raises(ImportError): dep.find_module('no-such.-thing') with pytest.raises(ImportError): dep.find_module('setuptools.non-existent') - f,p,i = dep.find_module('setuptools.tests') + f, p, i = dep.find_module('setuptools.tests') f.close() @needs_bytecode def testModuleExtract(self): from email import __version__ - assert dep.get_module_constant('email','__version__') == __version__ - assert dep.get_module_constant('sys','version') == sys.version - assert dep.get_module_constant('setuptools.tests','__doc__') == __doc__ + assert dep.get_module_constant('email', '__version__') == __version__ + assert dep.get_module_constant('sys', 'version') == sys.version + assert dep.get_module_constant('setuptools.tests', '__doc__') == __doc__ @needs_bytecode def testRequire(self): - req = Require('Email','1.0.3','email') + req = Require('Email', '1.0.3', 'email') assert req.name == 'Email' assert req.module == 'email' @@ -101,12 +101,12 @@ def testRequire(self): assert req.is_present() assert req.is_current() - req = Require('Email 3000','03000','email',format=LooseVersion) + req = Require('Email 3000', '03000', 'email', format=LooseVersion) assert req.is_present() assert not req.is_current() assert not req.version_ok('unknown') - req = Require('Do-what-I-mean','1.0','d-w-i-m') + req = Require('Do-what-I-mean', '1.0', 'd-w-i-m') assert not req.is_present() assert not req.is_current() @@ -125,22 +125,22 @@ def testRequire(self): class TestDistro: def setup_method(self, method): - self.e1 = Extension('bar.ext',['bar.c']) + self.e1 = Extension('bar.ext', ['bar.c']) self.e2 = Extension('c.y', ['y.c']) self.dist = makeSetup( packages=['a', 'a.b', 'a.b.c', 'b', 'c'], - py_modules=['b.d','x'], + py_modules=['b.d', 'x'], ext_modules = (self.e1, self.e2), package_dir = {}, ) def testDistroType(self): - assert isinstance(self.dist,setuptools.dist.Distribution) + assert isinstance(self.dist, setuptools.dist.Distribution) def testExcludePackage(self): self.dist.exclude_package('a') - assert self.dist.packages == ['b','c'] + assert self.dist.packages == ['b', 'c'] self.dist.exclude_package('b') assert self.dist.packages == ['c'] @@ -169,7 +169,7 @@ def testIncludeExclude(self): assert self.dist.ext_modules == [self.e2, self.e1] def testExcludePackages(self): - self.dist.exclude(packages=['c','b','a']) + self.dist.exclude(packages=['c', 'b', 'a']) assert self.dist.packages == [] assert self.dist.py_modules == ['x'] assert self.dist.ext_modules == [self.e1] @@ -199,13 +199,13 @@ def testInvalidIncludeExclude(self): with pytest.raises(DistutilsSetupError): self.dist.exclude(nonexistent_option='x') with pytest.raises(DistutilsSetupError): - self.dist.include(packages={'x':'y'}) + self.dist.include(packages={'x': 'y'}) with pytest.raises(DistutilsSetupError): - self.dist.exclude(packages={'x':'y'}) + self.dist.exclude(packages={'x': 'y'}) with pytest.raises(DistutilsSetupError): - self.dist.include(ext_modules={'x':'y'}) + self.dist.include(ext_modules={'x': 'y'}) with pytest.raises(DistutilsSetupError): - self.dist.exclude(ext_modules={'x':'y'}) + self.dist.exclude(ext_modules={'x': 'y'}) with pytest.raises(DistutilsSetupError): self.dist.include(package_dir=['q']) @@ -216,31 +216,31 @@ def testInvalidIncludeExclude(self): class TestFeatures: def setup_method(self, method): - self.req = Require('Distutils','1.0.3','distutils') + self.req = Require('Distutils', '1.0.3', 'distutils') self.dist = makeSetup( features={ - 'foo': Feature("foo",standard=True,require_features=['baz',self.req]), + 'foo': Feature("foo", standard=True, require_features=['baz', self.req]), 'bar': Feature("bar", standard=True, packages=['pkg.bar'], py_modules=['bar_et'], remove=['bar.ext'], ), 'baz': Feature( "baz", optional=False, packages=['pkg.baz'], scripts = ['scripts/baz_it'], - libraries=[('libfoo','foo/foofoo.c')] + libraries=[('libfoo', 'foo/foofoo.c')] ), 'dwim': Feature("DWIM", available=False, remove='bazish'), }, script_args=['--without-bar', 'install'], packages = ['pkg.bar', 'pkg.foo'], py_modules = ['bar_et', 'bazish'], - ext_modules = [Extension('bar.ext',['bar.c'])] + ext_modules = [Extension('bar.ext', ['bar.c'])] ) def testDefaults(self): assert not Feature( - "test",standard=True,remove='x',available=False + "test", standard=True, remove='x', available=False ).include_by_default() - assert Feature("test",standard=True,remove='x').include_by_default() + assert Feature("test", standard=True, remove='x').include_by_default() # Feature must have either kwargs, removes, or require_features with pytest.raises(DistutilsSetupError): Feature("test") @@ -252,16 +252,16 @@ def testAvailability(self): def testFeatureOptions(self): dist = self.dist assert ( - ('with-dwim',None,'include DWIM') in dist.feature_options + ('with-dwim', None, 'include DWIM') in dist.feature_options ) assert ( - ('without-dwim',None,'exclude DWIM (default)') in dist.feature_options + ('without-dwim', None, 'exclude DWIM (default)') in dist.feature_options ) assert ( - ('with-bar',None,'include bar (default)') in dist.feature_options + ('with-bar', None, 'include bar (default)') in dist.feature_options ) assert ( - ('without-bar',None,'exclude bar') in dist.feature_options + ('without-bar', None, 'exclude bar') in dist.feature_options ) assert dist.feature_negopt['without-foo'] == 'with-foo' assert dist.feature_negopt['without-bar'] == 'with-bar' @@ -277,7 +277,7 @@ def testUseFeatures(self): assert (not 'pkg.bar' in dist.packages) assert ('pkg.baz' in dist.packages) assert ('scripts/baz_it' in dist.scripts) - assert (('libfoo','foo/foofoo.c') in dist.libraries) + assert (('libfoo', 'foo/foofoo.c') in dist.libraries) assert dist.ext_modules == [] assert dist.require_features == [self.req] @@ -288,7 +288,7 @@ def testUseFeatures(self): def testFeatureWithInvalidRemove(self): with pytest.raises(SystemExit): - makeSetup(features={'x':Feature('x', remove='y')}) + makeSetup(features={'x': Feature('x', remove='y')}) class TestCommandTests: @@ -298,7 +298,7 @@ def testTestIsCommand(self): assert (isinstance(test_cmd, distutils.cmd.Command)) def testLongOptSuiteWNoDefault(self): - ts1 = makeSetup(script_args=['test','--test-suite=foo.tests.suite']) + ts1 = makeSetup(script_args=['test', '--test-suite=foo.tests.suite']) ts1 = ts1.get_command_obj('test') ts1.ensure_finalized() assert ts1.test_suite == 'foo.tests.suite' @@ -311,7 +311,7 @@ def testDefaultSuite(self): def testDefaultWModuleOnCmdLine(self): ts3 = makeSetup( test_suite='bar.tests', - script_args=['test','-m','foo.tests'] + script_args=['test', '-m', 'foo.tests'] ).get_command_obj('test') ts3.ensure_finalized() assert ts3.test_module == 'foo.tests' @@ -319,7 +319,7 @@ def testDefaultWModuleOnCmdLine(self): def testConflictingOptions(self): ts4 = makeSetup( - script_args=['test','-m','bar.tests', '-s','foo.tests.suite'] + script_args=['test', '-m', 'bar.tests', '-s', 'foo.tests.suite'] ).get_command_obj('test') with pytest.raises(DistutilsOptionError): ts4.ensure_finalized() diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index ae28c7c36e..535ae10766 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -10,7 +10,7 @@ @contextlib.contextmanager -def tempdir(cd=lambda dir:None, **kwargs): +def tempdir(cd=lambda dir: None, **kwargs): temp_dir = tempfile.mkdtemp(**kwargs) orig_dir = os.getcwd() try: diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 65e7243d65..df51b04fd1 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -32,7 +32,7 @@ def can_symlink(): def has_symlink(): bad_symlink = ( # Windows symlink directory detection is broken on Python 3.2 - platform.system() == 'Windows' and sys.version_info[:2] == (3,2) + platform.system() == 'Windows' and sys.version_info[:2] == (3, 2) ) return can_symlink() and not bad_symlink From 39bcc16e47957bea4178a27f2ef872a78276ff40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Jul 2016 00:58:42 -0400 Subject: [PATCH 5896/8469] Remove commented code --- setuptools/site-patch.py | 3 --- setuptools/tests/test_build_py.py | 1 - 2 files changed, 4 deletions(-) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 680e93551d..3e89ef2fea 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -10,7 +10,6 @@ def __boot(): pic = getattr(sys, 'path_importer_cache', {}) stdpath = sys.path[len(PYTHONPATH):] mydir = os.path.dirname(__file__) - # print "searching",stdpath,sys.path for item in stdpath: if item==mydir or not item: @@ -39,8 +38,6 @@ def __boot(): else: raise ImportError("Couldn't find the real 'site' module") - # print "loaded", __file__ - known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp oldpos = getattr(sys, '__egginsert', 0) # save old insertion position diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index 860c569c2e..cc701ae67f 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -26,6 +26,5 @@ def test_directories_in_package_data_glob(tmpdir_as_cwd): package_data={'': ['path/*']}, )) os.makedirs('path/subpath') - # with contexts.quiet(): dist.parse_command_line() dist.run_commands() From dc2d1dc249bec8e3a864e2aa6002a8e27adc4b7c Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 12:11:49 +0700 Subject: [PATCH 5897/8469] Fix missing whitespace around operator. --- pavement.py | 2 +- setuptools/depends.py | 20 +++++------ setuptools/dist.py | 48 +++++++++++++-------------- setuptools/lib2to3_ex.py | 2 +- setuptools/package_index.py | 40 +++++++++++----------- setuptools/py31compat.py | 2 +- setuptools/sandbox.py | 6 ++-- setuptools/site-patch.py | 8 ++--- setuptools/ssl_support.py | 2 +- setuptools/tests/test_bdist_egg.py | 4 +-- setuptools/tests/test_easy_install.py | 4 +-- setuptools/tests/test_packageindex.py | 2 +- 12 files changed, 70 insertions(+), 70 deletions(-) diff --git a/pavement.py b/pavement.py index f620c790d8..3d8400865f 100644 --- a/pavement.py +++ b/pavement.py @@ -17,7 +17,7 @@ def update_vendored(): remove_all(vendor.glob('pyparsing*')) install_args = [ 'install', - '-r', str(vendor/'vendored.txt'), + '-r', str(vendor / 'vendored.txt'), '-t', str(vendor), ] pip.main(install_args) diff --git a/setuptools/depends.py b/setuptools/depends.py index eb1d7b13ff..01f4a23a02 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -89,16 +89,16 @@ def _iter_code(code): ptr = 0 extended_arg = 0 - while ptr=HAVE_ARGUMENT: + if op >= HAVE_ARGUMENT: - arg = bytes[ptr+1] + bytes[ptr+2]*256 + extended_arg + arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg ptr += 3 - if op==EXTENDED_ARG: + if op == EXTENDED_ARG: long_type = six.integer_types[-1] extended_arg = arg * long_type(65536) continue @@ -119,7 +119,7 @@ def find_module(module, paths=None): part = parts.pop(0) f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) - if kind==PKG_DIRECTORY: + if kind == PKG_DIRECTORY: parts = parts or ['__init__'] paths = [path] @@ -143,12 +143,12 @@ def get_module_constant(module, symbol, default=-1, paths=None): return None try: - if kind==PY_COMPILED: + if kind == PY_COMPILED: f.read(8) # skip magic & date code = marshal.load(f) - elif kind==PY_FROZEN: + elif kind == PY_FROZEN: code = imp.get_frozen_object(module) - elif kind==PY_SOURCE: + elif kind == PY_SOURCE: code = compile(f.read(), path, 'exec') else: # Not something we can parse; we'll have to import it. :( @@ -190,9 +190,9 @@ def extract_constant(code, symbol, default=-1): for op, arg in _iter_code(code): - if op==LOAD_CONST: + if op == LOAD_CONST: const = code.co_consts[arg] - elif arg==name_idx and (op==STORE_NAME or op==STORE_GLOBAL): + elif arg == name_idx and (op == STORE_NAME or op == STORE_GLOBAL): return const else: const = default diff --git a/setuptools/dist.py b/setuptools/dist.py index f229d726f4..b4ff3861fe 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -65,7 +65,7 @@ def write_pkg_info(self, base_dir): def check_importable(dist, attr, value): try: - ep = pkg_resources.EntryPoint.parse('x='+value) + ep = pkg_resources.EntryPoint.parse('x=' + value) assert not ep.extras except (TypeError, ValueError, AttributeError, AssertionError): raise DistutilsSetupError( @@ -77,7 +77,7 @@ def check_importable(dist, attr, value): def assert_string_list(dist, attr, value): """Verify that value is a string list or None""" try: - assert ''.join(value)!=value + assert ''.join(value) != value except (TypeError, ValueError, AttributeError, AssertionError): raise DistutilsSetupError( "%r must be a list of strings (got %r)" % (attr, value) @@ -109,7 +109,7 @@ def check_extras(dist, attr, value): if ':' in k: k, m = k.split(':', 1) if pkg_resources.invalid_marker(m): - raise DistutilsSetupError("Invalid environment marker: "+m) + raise DistutilsSetupError("Invalid environment marker: " + m) list(pkg_resources.parse_requirements(v)) except (TypeError, ValueError, AttributeError): raise DistutilsSetupError( @@ -162,7 +162,7 @@ def check_package_data(dist, attr, value): else: return raise DistutilsSetupError( - attr+" must be a dictionary mapping package names to lists of " + attr + " must be a dictionary mapping package names to lists of " "wildcard patterns" ) @@ -313,7 +313,7 @@ def parse_command_line(self): def _feature_attrname(self, name): """Convert feature name to corresponding option attribute name""" - return 'with_'+name.replace('-', '_') + return 'with_' + name.replace('-', '_') def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" @@ -402,13 +402,13 @@ def _set_global_opts_from_features(self): if feature.optional: descr = feature.description incdef = ' (default)' - excdef='' + excdef = '' if not feature.include_by_default(): excdef, incdef = incdef, excdef - go.append(('with-'+name, None, 'include '+descr+incdef)) - go.append(('without-'+name, None, 'exclude '+descr+excdef)) - no['without-'+name] = 'with-'+name + go.append(('with-' + name, None, 'include ' + descr + incdef)) + go.append(('without-' + name, None, 'exclude ' + descr + excdef)) + no['without-' + name] = 'with-' + name self.global_options = self.feature_options = go + self.global_options self.negative_opt = self.feature_negopt = no @@ -469,7 +469,7 @@ def feature_is_included(self, name): def include_feature(self, name): """Request inclusion of feature named 'name'""" - if self.feature_is_included(name)==0: + if self.feature_is_included(name) == 0: descr = self.features[name].description raise DistutilsOptionError( descr + " is required, but was excluded or is not available" @@ -493,7 +493,7 @@ def include(self, **attrs): handle whatever special inclusion logic is needed. """ for k, v in attrs.items(): - include = getattr(self, '_include_'+k, None) + include = getattr(self, '_include_' + k, None) if include: include(v) else: @@ -502,7 +502,7 @@ def include(self, **attrs): def exclude_package(self, package): """Remove packages, modules, and extensions in named package""" - pfx = package+'.' + pfx = package + '.' if self.packages: self.packages = [ p for p in self.packages @@ -524,10 +524,10 @@ def exclude_package(self, package): def has_contents_for(self, package): """Return true if 'exclude_package(package)' would do something""" - pfx = package+'.' + pfx = package + '.' for p in self.iter_distribution_names(): - if p==package or p.startswith(pfx): + if p == package or p.startswith(pfx): return True def _exclude_misc(self, name, value): @@ -544,7 +544,7 @@ def _exclude_misc(self, name, value): ) if old is not None and not isinstance(old, sequence): raise DistutilsSetupError( - name+": this setting cannot be changed via include/exclude" + name + ": this setting cannot be changed via include/exclude" ) elif old: setattr(self, name, [item for item in old if item not in value]) @@ -566,10 +566,10 @@ def _include_misc(self, name, value): setattr(self, name, value) elif not isinstance(old, sequence): raise DistutilsSetupError( - name+": this setting cannot be changed via include/exclude" + name + ": this setting cannot be changed via include/exclude" ) else: - setattr(self, name, old+[item for item in value if item not in old]) + setattr(self, name, old + [item for item in value if item not in old]) def exclude(self, **attrs): """Remove items from distribution that are named in keyword arguments @@ -588,7 +588,7 @@ def exclude(self, **attrs): handle whatever special exclusion logic is needed. """ for k, v in attrs.items(): - exclude = getattr(self, '_exclude_'+k, None) + exclude = getattr(self, '_exclude_' + k, None) if exclude: exclude(v) else: @@ -648,19 +648,19 @@ def get_cmdline_options(self): opt = opt.replace('_', '-') - if val==0: + if val == 0: cmdobj = self.get_command_obj(cmd) neg_opt = self.negative_opt.copy() neg_opt.update(getattr(cmdobj, 'negative_opt', {})) for neg, pos in neg_opt.items(): - if pos==opt: - opt=neg - val=None + if pos == opt: + opt = neg + val = None break else: raise AssertionError("Shouldn't be able to get here") - elif val==1: + elif val == 1: val = None d.setdefault(cmd, {})[opt] = val @@ -835,7 +835,7 @@ def include_in(self, dist): if not self.available: raise DistutilsPlatformError( - self.description+" is required, " + self.description + " is required, " "but is not available on this platform" ) diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index f7296786ea..ac5f8096a9 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -34,7 +34,7 @@ def run_2to3(self, files, doctests = False): return if not files: return - log.info("Fixing "+" ".join(files)) + log.info("Fixing " + " ".join(files)) self.__build_fixer_names() self.__exclude_fixers() if doctests: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cdedef8341..4590e93f74 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -80,7 +80,7 @@ def egg_info_for_url(url): parts = urllib.parse.urlparse(url) scheme, server, path, parameters, query, fragment = parts base = urllib.parse.unquote(path.split('/')[-1]) - if server=='sourceforge.net' and base=='download': # XXX Yuck + if server == 'sourceforge.net' and base == 'download': # XXX Yuck base = urllib.parse.unquote(path.split('/')[-2]) if '#' in base: base, fragment = base.split('#', 1) return base, fragment @@ -155,7 +155,7 @@ def interpret_distro_name( # it is a bdist_dumb, not an sdist -- bail out return - for p in range(1, len(parts)+1): + for p in range(1, len(parts) + 1): yield Distribution( location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]), py_version=py_version, precedence = precedence, @@ -209,7 +209,7 @@ def find_external_links(url, page): for tag in ("Home Page", "Download URL"): pos = page.find(tag) - if pos!=-1: + if pos != -1: match = HREF.search(page, pos) if match: yield urllib.parse.urljoin(url, htmldecode(match.group(1))) @@ -336,7 +336,7 @@ def process_url(self, url, retrieve=False): for match in HREF.finditer(page): link = urllib.parse.urljoin(base, htmldecode(match.group(1))) self.process_url(link) - if url.startswith(self.index_url) and getattr(f, 'code', None)!=404: + if url.startswith(self.index_url) and getattr(f, 'code', None) != 404: page = self.process_index(url, page) def process_filename(self, fn, nested=False): @@ -357,7 +357,7 @@ def process_filename(self, fn, nested=False): def url_ok(self, url, fatal=False): s = URL_SCHEME(url) - if (s and s.group(1).lower()=='file') or self.allows(urllib.parse.urlparse(url)[1]): + if (s and s.group(1).lower() == 'file') or self.allows(urllib.parse.urlparse(url)[1]): return True msg = ("\nNote: Bypassing %s (disallowed host; see " "http://bit.ly/1dg9ijs for details).\n") @@ -400,7 +400,7 @@ def scan(link): parts = list(map( urllib.parse.unquote, link[len(self.index_url):].split('/') )) - if len(parts)==2 and '#' not in parts[1]: + if len(parts) == 2 and '#' not in parts[1]: # it's a package page, sanitize and index it pkg = safe_name(parts[0]) ver = safe_version(parts[1]) @@ -423,7 +423,7 @@ def scan(link): base, frag = egg_info_for_url(new_url) if base.endswith('.py') and not frag: if ver: - new_url+='#egg=%s-%s' % (pkg, ver) + new_url += '#egg=%s-%s' % (pkg, ver) else: self.need_version_info(url) self.scan_url(new_url) @@ -449,11 +449,11 @@ def scan_all(self, msg=None, *args): self.scan_url(self.index_url) def find_packages(self, requirement): - self.scan_url(self.index_url + requirement.unsafe_name+'/') + self.scan_url(self.index_url + requirement.unsafe_name + '/') if not self.package_pages.get(requirement.key): # Fall back to safe version of the name - self.scan_url(self.index_url + requirement.project_name+'/') + self.scan_url(self.index_url + requirement.project_name + '/') if not self.package_pages.get(requirement.key): # We couldn't find the target package, so search the index page too @@ -589,13 +589,13 @@ def find(req, env=None): for dist in env[req.key]: - if dist.precedence==DEVELOP_DIST and not develop_ok: + if dist.precedence == DEVELOP_DIST and not develop_ok: if dist not in skipped: self.warn("Skipping development or system egg: %s", dist) skipped[dist] = 1 continue - if dist in req and (dist.precedence<=SOURCE_DIST or not source): + if dist in req and (dist.precedence <= SOURCE_DIST or not source): return dist if force_scan: @@ -645,7 +645,7 @@ def gen_setup(self, filename, fragment, tmpdir): interpret_distro_name(filename, match.group(1), None) if d.version ] or [] - if len(dists)==1: # unambiguous ``#egg`` fragment + if len(dists) == 1: # unambiguous ``#egg`` fragment basename = os.path.basename(filename) # Make sure the file has been downloaded to the temp dir. @@ -654,7 +654,7 @@ def gen_setup(self, filename, fragment, tmpdir): from setuptools.command.easy_install import samefile if not samefile(filename, dst): shutil.copy2(filename, dst) - filename=dst + filename = dst with open(os.path.join(tmpdir, 'setup.py'), 'w') as file: file.write( @@ -771,13 +771,13 @@ def _download_url(self, scheme, url, tmpdir): # Download the file # - if scheme=='svn' or scheme.startswith('svn+'): + if scheme == 'svn' or scheme.startswith('svn+'): return self._download_svn(url, filename) - elif scheme=='git' or scheme.startswith('git+'): + elif scheme == 'git' or scheme.startswith('git+'): return self._download_git(url, filename) elif scheme.startswith('hg+'): return self._download_hg(url, filename) - elif scheme=='file': + elif scheme == 'file': return urllib.request.url2pathname(urllib.parse.urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed @@ -806,7 +806,7 @@ def _download_html(self, url, headers, filename): break # not an index page file.close() os.unlink(filename) - raise DistutilsError("Unexpected HTML page found at "+url) + raise DistutilsError("Unexpected HTML page found at " + url) def _download_svn(self, url, filename): url = url.split('#', 1)[0] # remove any fragment for svn's sake @@ -821,7 +821,7 @@ def _download_svn(self, url, filename): user, pw = auth.split(':', 1) creds = " --username=%s --password=%s" % (user, pw) else: - creds = " --username="+auth + creds = " --username=" + auth netloc = host parts = scheme, netloc, url, p, q, f url = urllib.parse.urlunparse(parts) @@ -896,7 +896,7 @@ def warn(self, msg, *args): def uchr(c): if not isinstance(c, int): return c - if c>255: return six.unichr(c) + if c > 255: return six.unichr(c) return chr(c) @@ -1046,7 +1046,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): # Put authentication info back into request URL if same host, # so that links found on the page will work s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url) - if s2==scheme and h2==host: + if s2 == scheme and h2 == host: parts = s2, netloc, path2, param2, query2, frag2 fp.url = urllib.parse.urlunparse(parts) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 04a314ef61..414b377b59 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -12,7 +12,7 @@ def get_path(name): if name not in ('platlib', 'purelib'): raise ValueError("Name must be purelib or platlib") - return get_python_lib(name=='platlib') + return get_python_lib(name == 'platlib') try: # Python >=3.2 diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index c6bab096d0..5ed45f8459 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -234,7 +234,7 @@ def run_setup(setup_script, args): setup_dir = os.path.abspath(os.path.dirname(setup_script)) with setup_context(setup_dir): try: - sys.argv[:] = [setup_script]+list(args) + sys.argv[:] = [setup_script] + list(args) sys.path.insert(0, setup_dir) # reset to include setup dir, w/clean callback list working_set.__init__() @@ -353,8 +353,8 @@ def _remap_output(self, operation, path): def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" return ( - self._remap_input(operation+'-from', src, *args, **kw), - self._remap_input(operation+'-to', dst, *args, **kw) + self._remap_input(operation + '-from', src, *args, **kw), + self._remap_input(operation + '-to', dst, *args, **kw) ) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 3e89ef2fea..6cfac4d62b 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -2,7 +2,7 @@ def __boot(): import sys import os PYTHONPATH = os.environ.get('PYTHONPATH') - if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): + if PYTHONPATH is None or (sys.platform == 'win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) @@ -12,7 +12,7 @@ def __boot(): mydir = os.path.dirname(__file__) for item in stdpath: - if item==mydir or not item: + if item == mydir or not item: continue # skip if current dir. on Windows, or my own directory importer = pic.get(item) if importer is not None: @@ -55,7 +55,7 @@ def __boot(): for item in sys.path: p, np = makepath(item) - if np==nd and insert_at is None: + if np == nd and insert_at is None: # We've hit the first 'system' path entry, so added entries go here insert_at = len(new_path) @@ -68,6 +68,6 @@ def __boot(): sys.path[:] = new_path -if __name__=='site': +if __name__ == 'site': __boot() del __boot diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index ecede5092a..f4ba8a92d6 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -235,7 +235,7 @@ def close(self): def find_ca_bundle(): """Return an existing CA bundle path, or None""" - if os.name=='nt': + if os.name == 'nt': return get_win_certfile() else: for cert_path in cert_paths: diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index a7ceac8696..42c44edfca 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -18,9 +18,9 @@ @pytest.yield_fixture def setup_context(tmpdir): - with (tmpdir/'setup.py').open('w') as f: + with (tmpdir / 'setup.py').open('w') as f: f.write(SETUP_PY) - with (tmpdir/'hi.py').open('w') as f: + with (tmpdir / 'hi.py').open('w') as f: f.write('1\n') with tmpdir.as_cwd(): yield tmpdir diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 894c4fd8b5..821e6fb2c6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -157,7 +157,7 @@ def test_add_from_site_is_ignored(self): @pytest.yield_fixture def setup_context(tmpdir): - with (tmpdir/'setup.py').open('w') as f: + with (tmpdir / 'setup.py').open('w') as f: f.write(SETUP_PY) with tmpdir.as_cwd(): yield tmpdir @@ -555,7 +555,7 @@ def test_get_script_header(self): assert actual == expected actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', - executable='"'+self.exe_with_spaces+'"') + executable='"' + self.exe_with_spaces + '"') expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 61f5909b83..dda5538283 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -129,7 +129,7 @@ def test_links_priority(self): # the distribution has been found assert 'foobar' in pi # we have only one link, because links are compared without md5 - assert len(pi['foobar'])==1 + assert len(pi['foobar']) == 1 # the link should be from the index assert 'correct_md5' in pi['foobar'][0].location From a0d8df6b769dd6d83dd88d9f4f9aa6234b9bcbc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Jul 2016 01:12:04 -0400 Subject: [PATCH 5898/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e04bdf05d7..925c05be8a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v24.0.3 +------- + +* Updated style in much of the codebase to match + community expectations. See #632, #633, #634, + #637, #639, #638, #642, #648. + v24.0.2 ------- From c24033af6c965481b34296180d7daef749daf179 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Jul 2016 01:12:14 -0400 Subject: [PATCH 5899/8469] =?UTF-8?q?Bump=20version:=2024.0.2=20=E2=86=92?= =?UTF-8?q?=2024.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 303569f6dd..5ded051df9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.0.2 +current_version = 24.0.3 commit = True tag = True diff --git a/setup.py b/setup.py index bac726bf66..1d742addd6 100755 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.0.2", + version="24.0.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8e80ee745b620086bea2111236f85fa2376d748f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Jul 2016 01:12:15 -0400 Subject: [PATCH 5900/8469] Added tag v24.0.3 for changeset d425bd1ee620 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index afb158b1ff..17e1c0a467 100644 --- a/.hgtags +++ b/.hgtags @@ -280,3 +280,4 @@ a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 8d37b17a93ec3e5fff9e040fc3f14ab7b7b24b2c v24.0.0 130a58f9503fe07ca8c7a34675b7d3a976f163d7 v24.0.1 7996c56bf6a2f81427b2f91eb11e64d690353493 v24.0.2 +d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 From 93612718350a0dd0bb09d21986ef9333a6f5cb1f Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 12:32:22 +0700 Subject: [PATCH 5901/8469] Fix spacing after comment hash. --- setuptools/package_index.py | 2 +- setuptools/py31compat.py | 4 ++-- setuptools/site-patch.py | 4 ++-- setuptools/tests/test_dist_info.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cdedef8341..4606c5aed5 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -325,7 +325,7 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() - if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. + if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. if isinstance(f, urllib.error.HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 04a314ef61..c2c4eed848 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -29,7 +29,7 @@ class TemporaryDirectory(object): """ def __init__(self): - self.name = None # Handle mkdtemp raising an exception + self.name = None # Handle mkdtemp raising an exception self.name = tempfile.mkdtemp() def __enter__(self): @@ -38,7 +38,7 @@ def __enter__(self): def __exit__(self, exctype, excvalue, exctrace): try: shutil.rmtree(self.name, True) - except OSError: #removal errors are not the only possible + except OSError: # removal errors are not the only possible pass self.name = None diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 3e89ef2fea..9af7c6905d 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -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.3 stream, path, descr = imp.find_module('site', [item]) except ImportError: continue @@ -38,7 +38,7 @@ def __boot(): else: raise ImportError("Couldn't find the real 'site' module") - known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp + known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp oldpos = getattr(sys, '__egginsert', 0) # save old insertion position sys.__egginsert = 0 # and reset the current one diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 9f226a55fc..db3cb2e740 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -25,8 +25,8 @@ def test_distinfo(self): unversioned = dists['UnversionedDistribution'] versioned = dists['VersionedDistribution'] - assert versioned.version == '2.718' # from filename - assert unversioned.version == '0.3' # from METADATA + assert versioned.version == '2.718' # from filename + assert unversioned.version == '0.3' # from METADATA def test_conditional_dependencies(self): specs = 'splort==4', 'quux>=1.1' From c72c5966e23de51fc7ab460faad5a6d3d20531c9 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 12:37:39 +0700 Subject: [PATCH 5902/8469] Make exactly one space after comma. --- setuptools/tests/__init__.py | 2 +- setuptools/tests/environment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 915196823e..ad7d7ee512 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -220,7 +220,7 @@ def setup_method(self, method): self.dist = makeSetup( features={ 'foo': Feature("foo", standard=True, require_features=['baz', self.req]), - 'bar': Feature("bar", standard=True, packages=['pkg.bar'], + 'bar': Feature("bar", standard=True, packages=['pkg.bar'], py_modules=['bar_et'], remove=['bar.ext'], ), 'baz': Feature( diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index e523772184..b0e3bd36a8 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -51,7 +51,7 @@ def run_setup_py(cmd, pypath=None, path=None, return 1, '' # decode the console string if needed - if hasattr(data, "decode"): + if hasattr(data, "decode"): # use the default encoding data = data.decode() data = unicodedata.normalize('NFC', data) From a4190dd14802db1017f67332919377c9e14f95ad Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 08:58:30 +0700 Subject: [PATCH 5903/8469] Match closing bracket identation of opening bracket's line. --- setuptools/tests/test_bdist_egg.py | 2 +- setuptools/tests/test_egg_info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index a7ceac8696..4cbfdb649a 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -33,7 +33,7 @@ def test_bdist_egg(self, setup_context, user_override): script_args=['bdist_egg'], name='foo', py_modules=['hi'] - )) + )) os.makedirs(os.path.join('build', 'src')) with contexts.quiet(): dist.parse_command_line() diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index afbda2cc9e..dea7f9928f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -179,7 +179,7 @@ def _setup_script_with_requires(self, requires_line): """ % requires_line) build_files({ 'setup.py': setup_script, - }) + }) def test_install_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( From 2e1ca9656b566b57c7736ef229e9d46c0aa7216c Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 12:47:40 +0700 Subject: [PATCH 5904/8469] Remove whitespace around parameter '=' sign. --- setuptools/launch.py | 6 +++--- setuptools/lib2to3_ex.py | 2 +- setuptools/package_index.py | 6 +++--- setuptools/tests/__init__.py | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/setuptools/launch.py b/setuptools/launch.py index b05cbd2cfe..308283ea93 100644 --- a/setuptools/launch.py +++ b/setuptools/launch.py @@ -18,9 +18,9 @@ def run(): __builtins__ script_name = sys.argv[1] namespace = dict( - __file__ = script_name, - __name__ = '__main__', - __doc__ = None, + __file__=script_name, + __name__='__main__', + __doc__=None, ) sys.argv[:] = sys.argv[1:] diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index f7296786ea..308086bcd4 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -27,7 +27,7 @@ def log_debug(self, msg, *args): class Mixin2to3(_Mixin2to3): - def run_2to3(self, files, doctests = False): + def run_2to3(self, files, doctests=False): # See of the distribution option has been set, otherwise check the # setuptools default. if self.distribution.use_2to3 is not True: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cdedef8341..45ea49ad35 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -94,7 +94,7 @@ def distros_for_url(url, metadata=None): match = EGG_FRAGMENT.match(fragment) if match: for dist in interpret_distro_name( - url, match.group(1), metadata, precedence = CHECKOUT_DIST + url, match.group(1), metadata, precedence=CHECKOUT_DIST ): yield dist @@ -158,8 +158,8 @@ def interpret_distro_name( for p in range(1, len(parts)+1): yield Distribution( location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]), - py_version=py_version, precedence = precedence, - platform = platform + py_version=py_version, precedence=precedence, + platform=platform ) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 915196823e..c059b1783e 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -131,8 +131,8 @@ def setup_method(self, method): self.dist = makeSetup( packages=['a', 'a.b', 'a.b.c', 'b', 'c'], py_modules=['b.d', 'x'], - ext_modules = (self.e1, self.e2), - package_dir = {}, + ext_modules=(self.e1, self.e2), + package_dir={}, ) def testDistroType(self): @@ -225,15 +225,15 @@ def setup_method(self, method): ), 'baz': Feature( "baz", optional=False, packages=['pkg.baz'], - scripts = ['scripts/baz_it'], + scripts=['scripts/baz_it'], libraries=[('libfoo', 'foo/foofoo.c')] ), 'dwim': Feature("DWIM", available=False, remove='bazish'), }, script_args=['--without-bar', 'install'], - packages = ['pkg.bar', 'pkg.foo'], - py_modules = ['bar_et', 'bazish'], - ext_modules = [Extension('bar.ext', ['bar.c'])] + packages=['pkg.bar', 'pkg.foo'], + py_modules=['bar_et', 'bazish'], + ext_modules=[Extension('bar.ext', ['bar.c'])] ) def testDefaults(self): From 98477464ed0d9ffd0b39e8baac15dfcd568dcb22 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Fri, 8 Jul 2016 20:39:10 +0200 Subject: [PATCH 5905/8469] Add python/external_requires keywords to setup This should allow setuptools to write the metadata Requires-Python and Requires-External from PEP345 to the PKGINFO file --- setup.py | 2 ++ setuptools/dist.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/setup.py b/setup.py index 1d742addd6..1960f653b1 100755 --- a/setup.py +++ b/setup.py @@ -95,6 +95,8 @@ def _gen_console_scripts(): "install_requires = setuptools.dist:check_requirements", "tests_require = setuptools.dist:check_requirements", "setup_requires = setuptools.dist:check_requirements", + "python_requires = setuptools.dist:check_specifier", + "external_requires = setuptools.dist:assert_string_list", "entry_points = setuptools.dist:check_entry_points", "test_suite = setuptools.dist:check_test_suite", "zip_safe = setuptools.dist:assert_bool", diff --git a/setuptools/dist.py b/setuptools/dist.py index f229d726f4..29b0f2662b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -39,6 +39,22 @@ def _get_unpatched(cls): _Distribution = _get_unpatched(_Distribution) +def _patch_distribution_metadata_write_pkg_file(): + """Patch write_pkg_file to also write Requires-Python/Requires-External""" + original_write = distutils.dist.DistributionMetadata.write_pkg_file + def write_pkg_file(self, file): + """Write the PKG-INFO format data to a file object. + """ + original_write(self, file) + if hasattr(self, 'python_requires'): + file.write('Requires-Python: %s\n' % self.python_requires) + if getattr(self, 'external_requires', []): + self._write_list(file, 'Requires-External', self.external_requires) + + distutils.dist.DistributionMetadata.write_pkg_file = write_pkg_file +_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 @@ -138,6 +154,18 @@ def check_requirements(dist, attr, value): raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) +def check_specifier(dist, attr, value): + """Verify that value is a valid version specifier""" + try: + packaging.specifiers.SpecifierSet(value) + except packaging.specifiers.InvalidSpecifier as error: + tmpl = ( + "{attr!r} must be a string or list of strings " + "containing valid version specifiers; {error}" + ) + raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) + + def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: @@ -303,6 +331,10 @@ def __init__(self, attrs=None): "setuptools, pip, and PyPI. Please see PEP 440 for more " "details." % self.metadata.version ) + if getattr(self, 'python_requires', None): + self.metadata.python_requires = self.python_requires + if getattr(self, 'external_requires', None): + self.metadata.external_requires = self.external_requires def parse_command_line(self): """Process features after parsing command line options""" From d9a251b704b87e9a0e5090213e7799c468c4bbf5 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Sun, 10 Jul 2016 20:51:37 +0200 Subject: [PATCH 5906/8469] Drop external_requires keyword --- setup.py | 1 - setuptools/dist.py | 4 ---- 2 files changed, 5 deletions(-) diff --git a/setup.py b/setup.py index 1960f653b1..0a031b0552 100755 --- a/setup.py +++ b/setup.py @@ -96,7 +96,6 @@ def _gen_console_scripts(): "tests_require = setuptools.dist:check_requirements", "setup_requires = setuptools.dist:check_requirements", "python_requires = setuptools.dist:check_specifier", - "external_requires = setuptools.dist:assert_string_list", "entry_points = setuptools.dist:check_entry_points", "test_suite = setuptools.dist:check_test_suite", "zip_safe = setuptools.dist:assert_bool", diff --git a/setuptools/dist.py b/setuptools/dist.py index 29b0f2662b..27cf85017c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -48,8 +48,6 @@ def write_pkg_file(self, file): original_write(self, file) if hasattr(self, 'python_requires'): file.write('Requires-Python: %s\n' % self.python_requires) - if getattr(self, 'external_requires', []): - self._write_list(file, 'Requires-External', self.external_requires) distutils.dist.DistributionMetadata.write_pkg_file = write_pkg_file _patch_distribution_metadata_write_pkg_file() @@ -333,8 +331,6 @@ def __init__(self, attrs=None): ) if getattr(self, 'python_requires', None): self.metadata.python_requires = self.python_requires - if getattr(self, 'external_requires', None): - self.metadata.external_requires = self.external_requires def parse_command_line(self): """Process features after parsing command line options""" From 020771f5e631741de31255283aa81adc05a26a9d Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Mon, 11 Jul 2016 11:30:11 +0200 Subject: [PATCH 5907/8469] Add basic tests and docs for python_requires --- docs/setuptools.txt | 4 ++++ setuptools/tests/test_egg_info.py | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 807a2722eb..0f9556636a 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -302,6 +302,10 @@ unless you need the associated ``setuptools`` feature. installed to support those features. See the section below on `Declaring Dependencies`_ for details and examples of the format of this argument. +``python_requires`` + A string corresponding to a version specifier (as defined in PEP 440) for + the Python version, used to specify the Requires-Python defined in PEP 345. + ``setup_requires`` A string or list of strings specifying what other distributions need to be present in order for the *setup script* to run. ``setuptools`` will diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index afbda2cc9e..d758ff903e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -210,6 +210,30 @@ def test_extra_requires_with_markers(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_python_requires_egg_info(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """python_requires='>=2.7.12',""") + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + code, data = environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') + assert 'Requires-Python: >=2.7.12' in open(pkginfo).read().split('\n') + + def test_python_requires_install(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """python_requires='>=1.2.3',""") + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') + assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') + def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], From 01de794bc829cc9eb0c1512b3570acec970e1acf Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 21:45:22 +0700 Subject: [PATCH 5908/8469] Put imports in same block alphabeticaly. --- setuptools/archive_util.py | 2 +- setuptools/command/bdist_egg.py | 2 +- setuptools/depends.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_packageindex.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index d195063815..3b41db1529 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -12,8 +12,8 @@ import shutil import posixpath import contextlib -from pkg_resources import ensure_directory, ContextualZipFile from distutils.errors import DistutilsError +from pkg_resources import ensure_directory, ContextualZipFile class UnrecognizedFormat(DistutilsError): diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9cebd7fa02..c40022a164 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -8,8 +8,8 @@ from types import CodeType import sys import os -import marshal import textwrap +import marshal from setuptools.extern import six diff --git a/setuptools/depends.py b/setuptools/depends.py index eb1d7b13ff..865d41517e 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,8 +1,8 @@ import sys import imp import marshal -from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion +from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from setuptools.extern import six diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 894c4fd8b5..94b25f2ebd 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,8 +15,8 @@ import distutils.errors import io -from setuptools.extern.six.moves import urllib import time +from setuptools.extern.six.moves import urllib import pytest try: diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 61f5909b83..877f304988 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -7,10 +7,10 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client -from .textwrap import DALS import pkg_resources import setuptools.package_index from setuptools.tests.server import IndexServer +from .textwrap import DALS class TestPackageIndex: From c07d0df02c9a22838099e1d86f31015d19c92a87 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 14 Jul 2016 21:52:34 +0700 Subject: [PATCH 5909/8469] Use isinstance() instead of type() for a typecheck. --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 01b4904616..ccc1c76ffc 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -105,7 +105,7 @@ def _build_part(item, sep_boundary): if not isinstance(values, list): values = [values] for value in values: - if type(value) is tuple: + if isinstance(value, tuple): title += '; filename="%s"' % value[0] value = value[1] else: From 80a2ff9e3055e216a5238e81a6933f6a342b17fb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 11:10:01 -0400 Subject: [PATCH 5910/8469] Add safeguard against improper installs when using a clean repository checkout. Fixes #659. --- CHANGES.rst | 6 ++++++ setup.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 925c05be8a..aa1d1b83c1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v24.1.0 +------- + +* #659: ``setup.py`` now will fail fast and with a helpful + error message when the necessary metadata is missing. + v24.0.3 ------- diff --git a/setup.py b/setup.py index 1d742addd6..69c55417a1 100755 --- a/setup.py +++ b/setup.py @@ -11,6 +11,11 @@ # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) +# Prevent improper installs without necessary metadata. See #659 +if not os.path.exists('setuptools.egg-info'): + msg = "Cannot build setuptools without metadata. Run bootstrap.py" + raise RuntimeError(msg) + src_root = None from distutils.util import convert_path From 39374cb5747b8cc18240f474d10d17913f203b67 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 11:43:04 -0400 Subject: [PATCH 5911/8469] Add test capturing expectation of PYPI_MD5 pattern --- setuptools/tests/test_packageindex.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index dda5538283..b2b0d537fe 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -15,6 +15,16 @@ class TestPackageIndex: + def test_regex(self): + hash_url = 'http://other_url?:action=show_md5&' + hash_url += 'digest=0123456789abcdef0123456789abcdef' + doc = """ + Name + (md5) + """.lstrip().format(**locals()) + assert setuptools.package_index.PYPI_MD5.match(doc) + def test_bad_url_bad_port(self): index = setuptools.package_index.PackageIndex() url = 'http://127.0.0.1:0/nonesuch/test_package_index' From 9879ab252e02c3c482536e31067a567df223dd28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 11:55:29 -0400 Subject: [PATCH 5912/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index aa1d1b83c1..f28164d636 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ v24.1.0 * #659: ``setup.py`` now will fail fast and with a helpful error message when the necessary metadata is missing. +* More style updates. See #656, #635, #640, + #644, #650, #652, and #655. v24.0.3 ------- From ad2b148e4c07c7d0195d4265d6bb144ef6465065 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 11:55:34 -0400 Subject: [PATCH 5913/8469] =?UTF-8?q?Bump=20version:=2024.0.3=20=E2=86=92?= =?UTF-8?q?=2024.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5ded051df9..2e0cc2674f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.0.3 +current_version = 24.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 69c55417a1..48a20b81bb 100755 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.0.3", + version="24.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e6d6f7bd99d7329a5689980ac74c9e227bd0f503 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 11:55:35 -0400 Subject: [PATCH 5914/8469] Added tag v24.1.0 for changeset a7d2f79f0996 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 17e1c0a467..812b7a3fcc 100644 --- a/.hgtags +++ b/.hgtags @@ -281,3 +281,4 @@ a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 130a58f9503fe07ca8c7a34675b7d3a976f163d7 v24.0.1 7996c56bf6a2f81427b2f91eb11e64d690353493 v24.0.2 d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 +a7d2f79f0996d881794af0f87595032098202811 v24.1.0 From 0ef2f3616fd1e19ef2fafeebbc7f904a1fefcd51 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 04:07:20 +0700 Subject: [PATCH 5915/8469] Test for membership should be 'not in'. --- setuptools/tests/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 66f238546e..53bd836cad 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -266,15 +266,15 @@ def testFeatureOptions(self): assert dist.feature_negopt['without-foo'] == 'with-foo' assert dist.feature_negopt['without-bar'] == 'with-bar' assert dist.feature_negopt['without-dwim'] == 'with-dwim' - assert (not 'without-baz' in dist.feature_negopt) + assert ('without-baz' not in dist.feature_negopt) def testUseFeatures(self): dist = self.dist assert dist.with_foo == 1 assert dist.with_bar == 0 assert dist.with_baz == 1 - assert (not 'bar_et' in dist.py_modules) - assert (not 'pkg.bar' in dist.packages) + assert ('bar_et' not in dist.py_modules) + assert ('pkg.bar' not in dist.packages) assert ('pkg.baz' in dist.packages) assert ('scripts/baz_it' in dist.scripts) assert (('libfoo', 'foo/foofoo.c') in dist.libraries) From f2bf9162c26ee17cef89425135d2c684d6e8ce98 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 04:25:53 +0700 Subject: [PATCH 5916/8469] Format block comment. --- setuptools/tests/test_develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index d22e5e4a3f..f1580785b5 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -114,4 +114,4 @@ def test_console_scripts(self, tmpdir): cmd.ensure_finalized() cmd.install_dir = tmpdir cmd.run() - #assert '0.0' not in foocmd_text + # assert '0.0' not in foocmd_text From 64335b63f9e03e71d0acd885b8bfd0b4b7a60aa8 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 04:13:28 +0700 Subject: [PATCH 5917/8469] Put colon-separated compound statement on separate lines. --- pkg_resources/__init__.py | 3 ++- setuptools/depends.py | 3 ++- setuptools/dist.py | 9 ++++++--- setuptools/lib2to3_ex.py | 3 ++- setuptools/package_index.py | 21 ++++++++++++++------- setuptools/sandbox.py | 12 ++++++++---- 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 15cb93fdc4..6337db9921 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2837,7 +2837,8 @@ def parse(s): def _get_mro(cls): """Get an mro for a type or classic class""" if not isinstance(cls, type): - class cls(cls, object): pass + class cls(cls, object): + pass return cls.__mro__[1:] return cls.__mro__ diff --git a/setuptools/depends.py b/setuptools/depends.py index 48c2015636..7534459001 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -53,7 +53,8 @@ def get_version(self, paths=None, default="unknown"): if self.attribute is None: try: f, p, i = find_module(self.module, paths) - if f: f.close() + if f: + f.close() return default except ImportError: return None diff --git a/setuptools/dist.py b/setuptools/dist.py index b4ff3861fe..b8ada9b98b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -155,8 +155,10 @@ def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" if isinstance(value, dict): for k, v in value.items(): - if not isinstance(k, str): break - try: iter(v) + if not isinstance(k, str): + break + try: + iter(v) except TypeError: break else: @@ -807,7 +809,8 @@ def __init__(self, description, standard=False, available=True, r for r in require_features if isinstance(r, str) ] er = [r for r in require_features if not isinstance(r, str)] - if er: extras['require_features'] = er + if er: + extras['require_features'] = er if isinstance(remove, str): remove = remove, diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index c58d840740..467e57d2c6 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -45,7 +45,8 @@ def run_2to3(self, files, doctests=False): _Mixin2to3.run_2to3(self, files) def __build_fixer_names(self): - if self.fixer_names: return + if self.fixer_names: + return self.fixer_names = [] for p in setuptools.lib2to3_fixer_packages: self.fixer_names.extend(get_fixers_from_package(p)) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8764faa620..77f5f96efe 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -82,14 +82,16 @@ def egg_info_for_url(url): base = urllib.parse.unquote(path.split('/')[-1]) if server == 'sourceforge.net' and base == 'download': # XXX Yuck base = urllib.parse.unquote(path.split('/')[-2]) - if '#' in base: base, fragment = base.split('#', 1) + if '#' in base: + base, fragment = base.split('#', 1) return base, fragment def distros_for_url(url, metadata=None): """Yield egg or source distribution objects that might be found at a URL""" base, fragment = egg_info_for_url(url) - for dist in distros_for_location(url, base, metadata): yield dist + for dist in distros_for_location(url, base, metadata): + yield dist if fragment: match = EGG_FRAGMENT.match(fragment) if match: @@ -289,7 +291,8 @@ def __init__( self.to_scan = [] if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()): self.opener = ssl_support.opener_for(ca_bundle) - else: self.opener = urllib.request.urlopen + else: + self.opener = urllib.request.urlopen def process_url(self, url, retrieve=False): """Evaluate a URL as a possible download, and maybe retrieve it""" @@ -317,7 +320,8 @@ def process_url(self, url, retrieve=False): self.info("Reading %s", url) self.fetched_urls[url] = True # prevent multiple fetch attempts f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url) - if f is None: return + if f is None: + return self.fetched_urls[f.url] = True if 'html' not in f.headers.get('content-type', '').lower(): f.close() # not html, we can't process it @@ -442,7 +446,8 @@ def need_version_info(self, url): def scan_all(self, msg=None, *args): if self.index_url not in self.fetched_urls: - if msg: self.warn(msg, *args) + if msg: + self.warn(msg, *args) self.info( "Scanning index of all packages (this may take a while)" ) @@ -714,7 +719,8 @@ def _download_to(self, url, filename): self.check_hash(checker, filename, tfp) return headers finally: - if fp: fp.close() + if fp: + fp.close() def reporthook(self, url, filename, blocknum, blksize, size): pass # no-op @@ -896,7 +902,8 @@ def warn(self, msg, *args): def uchr(c): if not isinstance(c, int): return c - if c > 255: return six.unichr(c) + if c > 255: + return six.unichr(c) return chr(c) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 5ed45f8459..c89593b180 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -291,7 +291,8 @@ def wrap(self, src, dst, *args, **kw): return wrap for name in ["rename", "link", "symlink"]: - if hasattr(_os, name): locals()[name] = _mk_dual_path_wrapper(name) + if hasattr(_os, name): + locals()[name] = _mk_dual_path_wrapper(name) def _mk_single_path_wrapper(name, original=None): original = original or getattr(_os, name) @@ -310,7 +311,8 @@ def wrap(self, path, *args, **kw): "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat", "startfile", "mkfifo", "mknod", "pathconf", "access" ]: - if hasattr(_os, name): locals()[name] = _mk_single_path_wrapper(name) + if hasattr(_os, name): + locals()[name] = _mk_single_path_wrapper(name) def _mk_single_with_return(name): original = getattr(_os, name) @@ -323,7 +325,8 @@ def wrap(self, path, *args, **kw): return wrap for name in ['readlink', 'tempnam']: - if hasattr(_os, name): locals()[name] = _mk_single_with_return(name) + if hasattr(_os, name): + locals()[name] = _mk_single_with_return(name) def _mk_query(name): original = getattr(_os, name) @@ -336,7 +339,8 @@ def wrap(self, *args, **kw): return wrap for name in ['getcwd', 'tmpnam']: - if hasattr(_os, name): locals()[name] = _mk_query(name) + if hasattr(_os, name): + locals()[name] = _mk_query(name) def _validate_path(self, path): """Called to remap or validate any path, whether input or output""" From 82b908759cddf344274f8c9360eaef79517e9c7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:26:20 -0400 Subject: [PATCH 5918/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f28164d636..2946fc6d51 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v24.1.1 +------- + +* More style updates. See #660, #661, #641. + v24.1.0 ------- From 01463e00ca98f74f1e0d5923a0d16c635be4f94c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:27:44 -0400 Subject: [PATCH 5919/8469] =?UTF-8?q?Bump=20version:=2024.1.0=20=E2=86=92?= =?UTF-8?q?=2024.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2e0cc2674f..87265c01dc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.1.0 +current_version = 24.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 48a20b81bb..2de0a13562 100755 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.1.0", + version="24.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 18f760aa07da104d7ed156b7f085bd05fb0c964d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:27:44 -0400 Subject: [PATCH 5920/8469] Added tag v24.1.1 for changeset d29075e7f879 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 812b7a3fcc..5cc35326cb 100644 --- a/.hgtags +++ b/.hgtags @@ -282,3 +282,4 @@ a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 7996c56bf6a2f81427b2f91eb11e64d690353493 v24.0.2 d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 a7d2f79f0996d881794af0f87595032098202811 v24.1.0 +d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 From b4e1b1f67d9cd50086c7acafcdff8c02b41988b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:30:22 -0400 Subject: [PATCH 5921/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 2946fc6d51..28924a9745 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v24.2.0 +------- + +* #631: Add support for ``python_requires`` keyword. + v24.1.1 ------- From 587fef5c66600232a290ce71c2e1ddf2727d3b41 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:30:28 -0400 Subject: [PATCH 5922/8469] =?UTF-8?q?Bump=20version:=2024.1.1=20=E2=86=92?= =?UTF-8?q?=2024.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 87265c01dc..f94f03c8cf 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.1.1 +current_version = 24.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 67407c746c..e9aa97a9dd 100755 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.1.1", + version="24.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 966e2fa4118277ed4551aa2215ac6ebac34b37e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jul 2016 19:30:28 -0400 Subject: [PATCH 5923/8469] Added tag v24.2.0 for changeset ed9e7bd8caf9 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5cc35326cb..85c47bdbba 100644 --- a/.hgtags +++ b/.hgtags @@ -283,3 +283,4 @@ a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 a7d2f79f0996d881794af0f87595032098202811 v24.1.0 d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 +ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 From 39bf3155d47c0024240be414a611dcb6d549f53c Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 09:37:34 +0700 Subject: [PATCH 5924/8469] Add missing blank lines after class or function definition. --- setup.py | 1 + setuptools/__init__.py | 2 ++ setuptools/archive_util.py | 1 + setuptools/command/bdist_egg.py | 1 + setuptools/command/easy_install.py | 2 ++ setuptools/depends.py | 1 + setuptools/dist.py | 6 ++++++ setuptools/extension.py | 2 ++ setuptools/package_index.py | 3 +++ setuptools/py26compat.py | 1 + setuptools/py27compat.py | 1 + setuptools/sandbox.py | 1 + setuptools/site-patch.py | 1 + setuptools/tests/py26compat.py | 1 + setuptools/tests/test_easy_install.py | 1 + tests/manual_test.py | 2 ++ 16 files changed, 27 insertions(+) diff --git a/setup.py b/setup.py index e9aa97a9dd..7bd3a079f3 100755 --- a/setup.py +++ b/setup.py @@ -47,6 +47,7 @@ def _gen_console_scripts(): yield ("easy_install-{shortver} = setuptools.command.easy_install:main" .format(shortver=sys.version[:3])) + console_scripts = list(_gen_console_scripts()) readme_file = io.open('README.rst', encoding='utf-8') diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2523ccc78f..cf0c39f2f8 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -116,6 +116,7 @@ class PEP420PackageFinder(PackageFinder): def _looks_like_package(path): return True + find_packages = PackageFinder.find setup = distutils.core.setup @@ -141,6 +142,7 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): vars(cmd).update(kw) return cmd + # we can't patch distutils.cmd, alas distutils.core.Command = Command diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 3b41db1529..24d4e7bbb5 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -169,4 +169,5 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): pass return True + extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index c40022a164..50744b87d4 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -432,6 +432,7 @@ def can_scan(): # Attribute names of options for commands that might need to be convinced to # install to the egg build directory + INSTALL_DIRECTORY_ATTRS = [ 'install_lib', 'install_dir', 'install_data', 'install_base' ] diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 73bdb0cb4c..5ce529b2d6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1831,6 +1831,7 @@ def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): normalized_path, zipimport._zip_directory_cache, updater=clear_and_remove_cached_zip_archive_directory_data) + # PyPy Python implementation does not allow directly writing to the # zipimport._zip_directory_cache and so prevents us from attempting to correct # its content. The best we can do there is clear the problematic cache content @@ -1990,6 +1991,7 @@ def _render(items): cmdline = subprocess.list2cmdline(items) return '#!' + cmdline + '\n' + # For pbr compat; will be removed in a future version. sys_executable = CommandSpec._sys_executable() diff --git a/setuptools/depends.py b/setuptools/depends.py index 7534459001..d5a344ada7 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -213,4 +213,5 @@ def _update_globals(): del globals()[name] __all__.remove(name) + _update_globals() diff --git a/setuptools/dist.py b/setuptools/dist.py index bfdbb3b5fe..0a19255313 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -36,12 +36,14 @@ def _get_unpatched(cls): ) return cls + _Distribution = _get_unpatched(_Distribution) def _patch_distribution_metadata_write_pkg_file(): """Patch write_pkg_file to also write Requires-Python/Requires-External""" original_write = distutils.dist.DistributionMetadata.write_pkg_file + def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ @@ -50,6 +52,8 @@ def write_pkg_file(self, file): file.write('Requires-Python: %s\n' % self.python_requires) distutils.dist.DistributionMetadata.write_pkg_file = write_pkg_file + + _patch_distribution_metadata_write_pkg_file() @@ -72,6 +76,8 @@ def write_pkg_info(self, base_dir): self.write_pkg_file(pkg_info) distutils.dist.DistributionMetadata.write_pkg_info = write_pkg_info + + _patch_distribution_metadata_write_pkg_info() sequence = tuple, list diff --git a/setuptools/extension.py b/setuptools/extension.py index d265b7a354..5ea72c060d 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -28,6 +28,7 @@ def _have_cython(): pass return False + # for compatibility have_pyrex = _have_cython @@ -53,6 +54,7 @@ def _convert_pyx_sources_to_lang(self): class Library(Extension): """Just like a regular Extension, but built as a library instead""" + distutils.core.Extension = Extension distutils.extension.Extension = Extension if 'distutils.command.build_ext' in sys.modules: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 77f5f96efe..0ea09bd6fe 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -194,6 +194,7 @@ def wrapper(*args, **kwargs): return unique_everseen(func(*args, **kwargs)) return wrapper + REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) # this line is here to fix emacs' cruddy broken syntax highlighting @@ -894,6 +895,7 @@ def info(self, msg, *args): def warn(self, msg, *args): log.warn(msg, *args) + # This pattern matches a character entity reference (a decimal numeric # references, a hexadecimal numeric reference, or a named reference). entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub @@ -1059,6 +1061,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): return fp + # adding a timeout to avoid freezing package_index open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 7c60c90ea5..90cd695a35 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -19,5 +19,6 @@ def strip_fragment(url): url, fragment = splittag(url) return url + if sys.version_info >= (2, 7): strip_fragment = lambda x: x diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 66aecc2a0a..57eb150b47 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -11,6 +11,7 @@ def get_all_headers(message, key): """ return message.get_all(key) + if sys.version_info < (3,): def get_all_headers(message, key): return message.getheaders(key) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index c89593b180..df630d3eec 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -460,6 +460,7 @@ def open(self, file, flags, mode=0o777, *args, **kw): self._violation("os.open", file, flags, mode, *args, **kw) return _os.open(file, flags, mode, *args, **kw) + WRITE_FLAGS = functools.reduce( operator.or_, [getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index a7d13fcd8d..f09ab52252 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -68,6 +68,7 @@ def __boot(): sys.path[:] = new_path + if __name__ == 'site': __boot() del __boot diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py index 5325dad6e0..18cece051c 100644 --- a/setuptools/tests/py26compat.py +++ b/setuptools/tests/py26compat.py @@ -9,6 +9,7 @@ def _tarfile_open_ex(*args, **kwargs): """ return contextlib.closing(tarfile.open(*args, **kwargs)) + if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2): tarfile_open = _tarfile_open_ex else: diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aa905f5ac0..2c17ac7614 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -50,6 +50,7 @@ def get_entry_map(self, group): def as_requirement(self): return 'spec' + SETUP_PY = DALS(""" from setuptools import setup diff --git a/tests/manual_test.py b/tests/manual_test.py index 0904b607e0..9987e6629a 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -27,6 +27,7 @@ def _tempdir(*args, **kwargs): shutil.rmtree(test_dir) return _tempdir + SIMPLE_BUILDOUT = """\ [buildout] @@ -90,6 +91,7 @@ def test_full(): assert eggs == ['extensions-0.3-py2.6.egg', 'zc.recipe.egg-1.2.2-py2.6.egg'] + if __name__ == '__main__': test_virtualenv() test_full() From 789462de79c5f51ba24256d80ad2dac2e4fe2888 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 10:23:29 +0700 Subject: [PATCH 5925/8469] Add missing blank line. --- setuptools/lib2to3_ex.py | 1 + setuptools/msvc.py | 1 + setuptools/tests/test_bdist_egg.py | 2 ++ 3 files changed, 4 insertions(+) diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index 467e57d2c6..c8632bc5f6 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -10,6 +10,7 @@ from distutils.util import Mixin2to3 as _Mixin2to3 from distutils import log from lib2to3.refactor import RefactoringTool, get_fixers_from_package + import setuptools diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 012ab32c74..2a665c9290 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -5,6 +5,7 @@ import platform import itertools import distutils.errors + from setuptools.extern.six.moves import filterfalse if platform.system() == 'Windows': diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 5aabf404fd..c77aa226ed 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -9,6 +9,7 @@ from . import contexts + SETUP_PY = """\ from setuptools import setup @@ -27,6 +28,7 @@ def setup_context(tmpdir): class Test: + def test_bdist_egg(self, setup_context, user_override): dist = Distribution(dict( script_name='setup.py', From d079163e74166860fedbfe0abcfcb820507368fd Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Sun, 17 Jul 2016 14:52:16 +0200 Subject: [PATCH 5926/8469] Also update the Metadata-Version when adding Requires-Python --- setuptools/dist.py | 38 ++++++++++++++++++++++++++++++- setuptools/tests/test_egg_info.py | 6 +++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 0a19255313..705ce9a3d3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -12,6 +12,7 @@ from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) +from distutils.util import rfc822_escape from setuptools.extern import six from setuptools.extern.six.moves import map @@ -44,10 +45,45 @@ def _patch_distribution_metadata_write_pkg_file(): """Patch write_pkg_file to also write Requires-Python/Requires-External""" original_write = distutils.dist.DistributionMetadata.write_pkg_file + # Based on Python 3.5 version def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ - original_write(self, file) + version = '1.0' + if (self.provides or self.requires or self.obsoletes or + self.classifiers or self.download_url): + version = '1.1' + # Setuptools specific for PEP 345 + if hasattr(self, 'python_requires'): + version = '1.2' + + file.write('Metadata-Version: %s\n' % version) + file.write('Name: %s\n' % self.get_name()) + file.write('Version: %s\n' % self.get_version()) + file.write('Summary: %s\n' % self.get_description()) + file.write('Home-page: %s\n' % self.get_url()) + file.write('Author: %s\n' % self.get_contact()) + file.write('Author-email: %s\n' % self.get_contact_email()) + file.write('License: %s\n' % self.get_license()) + if self.download_url: + file.write('Download-URL: %s\n' % self.download_url) + + long_desc = rfc822_escape(self.get_long_description()) + file.write('Description: %s\n' % long_desc) + + keywords = ','.join(self.get_keywords()) + if keywords: + file.write('Keywords: %s\n' % keywords) + + self._write_list(file, 'Platform', self.get_platforms()) + self._write_list(file, 'Classifier', self.get_classifiers()) + + # PEP 314 + self._write_list(file, 'Requires', self.get_requires()) + self._write_list(file, 'Provides', self.get_provides()) + self._write_list(file, 'Obsoletes', self.get_obsoletes()) + + # Setuptools specific for PEP 345 if hasattr(self, 'python_requires'): file.write('Requires-Python: %s\n' % self.python_requires) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 0b9da53810..dff2a8c8ec 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -223,8 +223,10 @@ def test_python_requires_egg_info(self, tmpdir_cwd, env): env=environ, ) egg_info_dir = os.path.join('.', 'foo.egg-info') - pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') - assert 'Requires-Python: >=2.7.12' in open(pkginfo).read().split('\n') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + assert 'Requires-Python: >=2.7.12' in pkg_info_lines + assert 'Metadata-Version: 1.2' in pkg_info_lines def test_python_requires_install(self, tmpdir_cwd, env): self._setup_script_with_requires( From 6a628a665c968ea0b5d08cd4f769436e0aba15f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 07:26:52 -0400 Subject: [PATCH 5927/8469] Remove unused variable --- setuptools/dist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 705ce9a3d3..59a5ecf238 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -43,7 +43,6 @@ def _get_unpatched(cls): def _patch_distribution_metadata_write_pkg_file(): """Patch write_pkg_file to also write Requires-Python/Requires-External""" - original_write = distutils.dist.DistributionMetadata.write_pkg_file # Based on Python 3.5 version def write_pkg_file(self, file): From b8d3bf71fae4829eceda274ccd322a8536bf3743 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 07:37:02 -0400 Subject: [PATCH 5928/8469] Adding preliminary support for enforcing style rules --- pytest.ini | 3 +++ setup.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pytest.ini b/pytest.ini index 2fa3a3ecc4..c693a4c342 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,6 @@ [pytest] addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern +flake8-ignore = + setuptools/site-patch.py F821 + setuptools/py*compat.py F811 diff --git a/setup.py b/setup.py index 7bd3a079f3..0aa394fb31 100755 --- a/setup.py +++ b/setup.py @@ -161,6 +161,9 @@ def _gen_console_scripts(): scripts=[], tests_require=[ 'setuptools[ssl]', + 'pytest-flake8', + # workaround for pytest-flake8 #7 + 'flake8<3dev', 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ From c9a8458db8e767c833d881f1ed42118eed7ffed9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 07:40:43 -0400 Subject: [PATCH 5929/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 28924a9745..63a634fb1c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v24.2.1 +------- + +* #667: Update Metadata-Version to 1.2 when + ``python_requires`` is supplied. + v24.2.0 ------- From 2f33817e85c57237457159c65b77b7a1626d062f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 08:03:39 -0400 Subject: [PATCH 5930/8469] =?UTF-8?q?Bump=20version:=2024.2.0=20=E2=86=92?= =?UTF-8?q?=2024.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f94f03c8cf..8b067cdc43 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.2.0 +current_version = 24.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index 0aa394fb31..73809f4c05 100755 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.2.0", + version="24.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From be2684d801b99757d35345809d6a0343ce863d75 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 08:03:40 -0400 Subject: [PATCH 5931/8469] Added tag v24.2.1 for changeset 5b577d179a7e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 85c47bdbba..a05be9a89d 100644 --- a/.hgtags +++ b/.hgtags @@ -284,3 +284,4 @@ d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 a7d2f79f0996d881794af0f87595032098202811 v24.1.0 d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 +5b577d179a7e2f3020712c376c0200901e5c93c1 v24.2.1 From 9f77a068c02a3937762b8292c20e06d072247825 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 12:14:42 -0400 Subject: [PATCH 5932/8469] Disable os.link during make_distribution. Fixes #516. Note that better would be if sdist provided some sort of hooks to better control the file copying, but since it does not, this technique will suffice for now. --- CHANGES.rst | 8 ++++++++ setuptools/command/sdist.py | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 63a634fb1c..b01a6fadb7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v24.3.0 +------- + +* #516: Disable ``os.link`` to avoid hard linking + in ``sdist.make_distribution``, avoiding errors on + systems that support hard links but not on the + file system in which the build is occurring. + v24.2.1 ------- diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 041ee42e2f..b86aae50f8 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,6 +4,7 @@ import os import sys import io +import contextlib from setuptools.extern import six @@ -65,6 +66,32 @@ def run(self): if data not in dist_files: dist_files.append(data) + def make_distribution(self): + """ + Workaround for #516 + """ + with self._remove_os_link(): + orig.sdist.make_distribution(self) + + @staticmethod + @contextlib.contextmanager + def _remove_os_link(): + """ + In a context, remove and restore os.link if it exists + """ + class NoValue: + pass + orig_val = getattr(os, 'link', NoValue) + try: + del os.link + except Exception: + pass + try: + yield + finally: + if orig_val is not NoValue: + setattr(os, 'link', orig_val) + def __read_template_hack(self): # This grody hack closes the template file (MANIFEST.in) if an # exception occurs during read_template. From 48f4155552b31928ef88b68e25e78db330b8b919 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 12:15:22 -0400 Subject: [PATCH 5933/8469] =?UTF-8?q?Bump=20version:=2024.2.1=20=E2=86=92?= =?UTF-8?q?=2024.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8b067cdc43..50dee23b36 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.2.1 +current_version = 24.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index 73809f4c05..d05ec7419c 100755 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.2.1", + version="24.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e8d8a79224dd0e3b2af8a1f5708b06cc62e2b61a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 21 Jul 2016 12:15:23 -0400 Subject: [PATCH 5934/8469] Added tag v24.3.0 for changeset 83ca05973c16 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a05be9a89d..53264d8520 100644 --- a/.hgtags +++ b/.hgtags @@ -285,3 +285,4 @@ a7d2f79f0996d881794af0f87595032098202811 v24.1.0 d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 5b577d179a7e2f3020712c376c0200901e5c93c1 v24.2.1 +83ca05973c16102145b339aec7e170d94966a2ba v24.3.0 From 7f118aaae6a49171a91248cc413dc78eb497a054 Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 21 Jul 2016 10:17:11 +0700 Subject: [PATCH 5935/8469] Fix continuation line unaligned for hanging indent. --- setuptools/dist.py | 6 +++--- setuptools/sandbox.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 0a19255313..c539f6efbc 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -542,19 +542,19 @@ def exclude_package(self, package): if self.packages: self.packages = [ p for p in self.packages - if p != package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.py_modules: self.py_modules = [ p for p in self.py_modules - if p != package and not p.startswith(pfx) + if p != package and not p.startswith(pfx) ] if self.ext_modules: self.ext_modules = [ p for p in self.ext_modules - if p.name != package and not p.name.startswith(pfx) + if p.name != package and not p.name.startswith(pfx) ] def has_contents_for(self, package): diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index df630d3eec..2babb63654 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -258,7 +258,7 @@ class AbstractSandbox: def __init__(self): self._attrs = [ name for name in dir(_os) - if not name.startswith('_') and hasattr(self, name) + if not name.startswith('_') and hasattr(self, name) ] def _copy(self, source): From b3b8a8d106ecf9dbdb933f4f2a09ec65003b7d05 Mon Sep 17 00:00:00 2001 From: stepshal Date: Fri, 22 Jul 2016 12:56:21 +0700 Subject: [PATCH 5936/8469] Use 'except Exception:' instead of 'except:'. --- setuptools/command/easy_install.py | 4 ++-- setuptools/command/sdist.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5ce529b2d6..468b9be726 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -431,7 +431,7 @@ def pseudo_tempname(self): """ try: pid = os.getpid() - except: + except Exception: pid = random.randint(0, sys.maxsize) return os.path.join(self.install_dir, "test-easy-install-%s" % pid) @@ -929,7 +929,7 @@ def install_egg(self, egg_path, tmpdir): destination, fix_zipimporter_caches=new_dist_is_zipped, ) - except: + except Exception: update_dist_caches(destination, fix_zipimporter_caches=False) raise diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b86aae50f8..b6125f5888 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -99,7 +99,7 @@ def __read_template_hack(self): # file. try: orig.sdist.read_template(self) - except: + except Exception: _, _, tb = sys.exc_info() tb.tb_next.tb_frame.f_locals['template'].close() raise From 7c0cfe7a3e4123bbb66f540e829e98673ca1ed7f Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Fri, 22 Jul 2016 12:15:29 +0200 Subject: [PATCH 5937/8469] Issue #27472: Add test.support.unix_shell as the path to the default shell. --- tests/test_spawn.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index f507ef7750..5edc24a3a1 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -1,7 +1,8 @@ """Tests for distutils.spawn.""" import unittest +import sys import os -from test.support import run_unittest +from test.support import run_unittest, unix_shell from distutils.spawn import _nt_quote_args from distutils.spawn import spawn @@ -29,9 +30,9 @@ def test_spawn(self): # creating something executable # through the shell that returns 1 - if os.name == 'posix': + if sys.platform != 'win32': exe = os.path.join(tmpdir, 'foo.sh') - self.write_file(exe, '#!/bin/sh\nexit 1') + self.write_file(exe, '#!%s\nexit 1' % unix_shell) else: exe = os.path.join(tmpdir, 'foo.bat') self.write_file(exe, 'exit 1') @@ -40,9 +41,9 @@ def test_spawn(self): self.assertRaises(DistutilsExecError, spawn, [exe]) # now something that works - if os.name == 'posix': + if sys.platform != 'win32': exe = os.path.join(tmpdir, 'foo.sh') - self.write_file(exe, '#!/bin/sh\nexit 0') + self.write_file(exe, '#!%s\nexit 0' % unix_shell) else: exe = os.path.join(tmpdir, 'foo.bat') self.write_file(exe, 'exit 0') From 4df6b3592b3a8e21006ee5d5b8e96ca685748954 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 14:50:42 -0400 Subject: [PATCH 5938/8469] Adding simple appveyor config --- appveyor.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..bd43fb2d8d --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,14 @@ +environment: + + matrix: + - PYTHON: "C:\\Python35-x64" + +install: + - "mklink /s /d \"C:\\Program Files\\Python\" %PYTHON%" + - "SET PYTHON=\"C:\\Program Files\\Python\"" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + +build: off + +test_script: + - "%PYTHON%\\python setup.py test" From b1781f2786d062c6c4678f18b9355421297c6d47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 14:53:18 -0400 Subject: [PATCH 5939/8469] Correct mklink usage. Symlink is the default. --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index bd43fb2d8d..35938480bb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,8 @@ environment: - PYTHON: "C:\\Python35-x64" install: - - "mklink /s /d \"C:\\Program Files\\Python\" %PYTHON%" + # symlink python from a directory with a space + - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%" - "SET PYTHON=\"C:\\Program Files\\Python\"" - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" From 299aaee1b09372f1735a640a849082cd8abda979 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 14:55:03 -0400 Subject: [PATCH 5940/8469] Need to bootstrap egg_info. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 35938480bb..4fdef703f9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,4 +12,5 @@ install: build: off test_script: + - "%PYTHON%\\python bootstrap.py" - "%PYTHON%\\python setup.py test" From 0f6fa71ca87f0a849455fbffd18ec30081317a98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 14:58:36 -0400 Subject: [PATCH 5941/8469] Should be able to execute without specifying the full path. --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4fdef703f9..4ae6c791d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,5 +12,5 @@ install: build: off test_script: - - "%PYTHON%\\python bootstrap.py" - - "%PYTHON%\\python setup.py test" + - "python bootstrap.py" + - "python setup.py test" From 2dff41bc302204b1a30af94f40650da4aa23e063 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 15:06:50 -0400 Subject: [PATCH 5942/8469] Docs must be built from docs directory and not from root now. --- docs/developer-guide.txt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 7cd3c6d2dc..ad47cafd8b 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -111,15 +111,5 @@ Setuptools follows ``semver``. Building Documentation ---------------------- -Setuptools relies on the Sphinx system for building documentation and in -particular the ``build_sphinx`` distutils command. To build the -documentation, invoke:: - - python setup.py build_sphinx - -from the root of the repository. Setuptools will download a compatible -build of Sphinx and any requisite plugins and then build the -documentation in the build/sphinx directory. - -Setuptools does not support invoking the doc builder from the docs/ -directory as some tools expect. +Setuptools relies on the Sphinx system for building documentation. +To accommodate RTD, docs must be built from the docs/ directory. From b594b7c00dd43d3ae2b1a0b349cd0436fb8232d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 15:09:05 -0400 Subject: [PATCH 5943/8469] Reference gitter in dev guide --- docs/developer-guide.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index ad47cafd8b..3ff77c25d9 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -32,8 +32,8 @@ User support and discussions are done through the issue tracker (for specific) issues, through the distutils-sig mailing list, or on IRC (Freenode) at #pypa. -Discussions about development happen on the pypa-dev mailing list or on IRC -(Freenode) at #pypa-dev. +Discussions about development happen on the pypa-dev mailing list or on +`Gitter `_. ----------------- Authoring Tickets From 451b84a0c56e23eea5396981747d570c80aef773 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 15:16:19 -0400 Subject: [PATCH 5944/8469] Correct spelling --- setuptools/tests/test_msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 2fbd56bf4f..9b5ffba01a 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -71,7 +71,7 @@ def test_patched(self): mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ assert mod_name == "setuptools.msvc", "find_vcvarsall unpatched" - def test_no_registry_entryies_means_nothing_found(self): + def test_no_registry_entries_means_nothing_found(self): """ No registry entries or environment variable should lead to an error directing the user to download vcpython27. From 9fff1f8cdf26b67e8b5299f5295112c5ca5aa40b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:00:54 -0400 Subject: [PATCH 5945/8469] Add reference to pull request for functionality added in 18.3. --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b01a6fadb7..c65bbce3fc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -520,7 +520,8 @@ v20.6.0 18.3 ---- -* Setuptools now allows disabling of the manipulation of the sys.path +* BB Pull Request #135: Setuptools now allows disabling of + the manipulation of the sys.path during the processing of the easy-install.pth file. To do so, set the environment variable ``SETUPTOOLS_SYS_PATH_TECHNIQUE`` to anything but "rewrite" (consider "raw"). During any install operation From 8b693597c1bbe6effb24ba209f1f36fd17ee9e90 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:11:35 -0400 Subject: [PATCH 5946/8469] Add docs on building docs --- docs/developer-guide.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 3ff77c25d9..70e7f1cd0a 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -113,3 +113,8 @@ Building Documentation Setuptools relies on the Sphinx system for building documentation. To accommodate RTD, docs must be built from the docs/ directory. + +To build them, you need to have installed the requirements specified +in docs/requirements.txt. One way to do this is to use rwt: + + setuptools/docs$ python -m rwt -r requirements.txt -- -m sphinx . html From 3c9a71fa4e161500d45b64590274007871303280 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:28:50 -0400 Subject: [PATCH 5947/8469] Update changelog --- CHANGES.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index c65bbce3fc..97f4638628 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,16 @@ CHANGES ======= +v24.3.1 +------- + +* #398: Fix shebang handling on Windows in script + headers where spaces in ``sys.executable`` would + produce an improperly-formatted shebang header, + introduced in 12.0 with the fix for #188. + +* #663, #670: More style updates. + v24.3.0 ------- From 0b10bf4ecc20b8a2ad033af53bd17d37b85ab60e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:29:11 -0400 Subject: [PATCH 5948/8469] =?UTF-8?q?Bump=20version:=2024.3.0=20=E2=86=92?= =?UTF-8?q?=2024.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 50dee23b36..52edb99c32 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.3.0 +current_version = 24.3.1 commit = True tag = True diff --git a/setup.py b/setup.py index d05ec7419c..6863a900a6 100755 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.3.0", + version="24.3.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9b058f7a10a4cca6541ef9f02b5a3a2703aacaea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:29:11 -0400 Subject: [PATCH 5949/8469] Added tag v24.3.1 for changeset e14229dd2abc --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 53264d8520..f8d0ce84ff 100644 --- a/.hgtags +++ b/.hgtags @@ -286,3 +286,4 @@ d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 5b577d179a7e2f3020712c376c0200901e5c93c1 v24.2.1 83ca05973c16102145b339aec7e170d94966a2ba v24.3.0 +e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 From e211f4584ac59f404a3e1a17c6b54dff18468cf6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:17:27 -0400 Subject: [PATCH 5950/8469] Set sys path technique to raw by default. Fixes #674. --- CHANGES.rst | 19 +++++++++++++++++++ setuptools/command/easy_install.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 97f4638628..83c10ce7b5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,25 @@ CHANGES ======= +v25.0.0 +------- + +* #674: Default ``sys.path`` manipulation by easy-install.pth + is now "raw", meaning that when writing easy-install.pth + during any install operation, the ``sys.path`` will not be + rewritten, giving preference to easy_installed packages. + + To retain the old behavior when using any easy_install + operation (including ``setup.py install`` when setuptools is + present), set the environment variable: + + SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite + + This project hopes that that few if any environments find it + necessary to retain the old behavior, and intends to drop + support for it altogether in a future release. Please report + any relevant concerns in the ticket for this change. + v24.3.1 ------- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 19f8286b2e..0e0dc2c4f4 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1661,7 +1661,7 @@ def _wrap_lines(cls, lines): """) -if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'rewrite') == 'rewrite': +if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'raw') == 'rewrite': PthDistributions = RewritePthDistributions From 2473c6f91d52699c050f83b8b68224e0ded581d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:30:31 -0400 Subject: [PATCH 5951/8469] =?UTF-8?q?Bump=20version:=2024.3.1=20=E2=86=92?= =?UTF-8?q?=2025.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 52edb99c32..1c72e12472 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 24.3.1 +current_version = 25.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 6863a900a6..14b1b78dbe 100755 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ def _gen_console_scripts(): setup_params = dict( name="setuptools", - version="24.3.1", + version="25.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8a133bd9d91d7c40dabac05ad64f8a008f552f7c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 04:30:33 -0400 Subject: [PATCH 5952/8469] Added tag v25.0.0 for changeset 58e92028ab00 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f8d0ce84ff..4b814cda7f 100644 --- a/.hgtags +++ b/.hgtags @@ -287,3 +287,4 @@ ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 5b577d179a7e2f3020712c376c0200901e5c93c1 v24.2.1 83ca05973c16102145b339aec7e170d94966a2ba v24.3.0 e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 +58e92028ab0061f1f80d98e769c9143305275242 v25.0.0 From 2b8cf28f3be32903b79e5b5b579fab38105791dd Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sat, 23 Jul 2016 12:56:52 +0200 Subject: [PATCH 5953/8469] Exception will not raise because MSVC9 may be find by new behavior at setuptools/msvc.py line 171. --- setuptools/tests/test_msvc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 9b5ffba01a..ad96752d94 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -83,10 +83,12 @@ def test_no_registry_entries_means_nothing_found(self): with mock_reg(): assert find_vcvarsall(9.0) is None - expected = distutils.errors.DistutilsPlatformError - with pytest.raises(expected) as exc: + try: query_vcvarsall(9.0) - assert 'aka.ms/vcpython27' in str(exc) + except Exception as exc: + expected = distutils.errors.DistutilsPlatformError + assert isinstance(expected, exc) + assert 'aka.ms/vcpython27' in str(exc) @pytest.yield_fixture def user_preferred_setting(self): From 1a0644e065bfe2f05a64d92b4abd31392d471751 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Sat, 23 Jul 2016 13:01:13 +0200 Subject: [PATCH 5954/8469] Update test_msvc.py --- setuptools/tests/test_msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index ad96752d94..a0c76ea0da 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -87,7 +87,7 @@ def test_no_registry_entries_means_nothing_found(self): query_vcvarsall(9.0) except Exception as exc: expected = distutils.errors.DistutilsPlatformError - assert isinstance(expected, exc) + assert isinstance(exc, expected) assert 'aka.ms/vcpython27' in str(exc) @pytest.yield_fixture From 145acd3ccfb7aac2b9658ce8ef4f5cb3fa265d94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:03:13 -0400 Subject: [PATCH 5955/8469] Only require the metadata when setup is invoked, not on import. Fixes #676. --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 14b1b78dbe..880d3f81b7 100755 --- a/setup.py +++ b/setup.py @@ -11,10 +11,11 @@ # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) -# Prevent improper installs without necessary metadata. See #659 -if not os.path.exists('setuptools.egg-info'): - msg = "Cannot build setuptools without metadata. Run bootstrap.py" - raise RuntimeError(msg) +def require_metadata(): + "Prevent improper installs without necessary metadata. See #659" + if not os.path.exists('setuptools.egg-info'): + msg = "Cannot build setuptools without metadata. Run bootstrap.py" + raise RuntimeError(msg) src_root = None @@ -171,4 +172,5 @@ def _gen_console_scripts(): ) if __name__ == '__main__': + require_metadata() dist = setuptools.setup(**setup_params) From 09ca40cc931c611952d344b96d1d6a5bfd6b502c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:22:14 -0400 Subject: [PATCH 5956/8469] Refactor setup script for nicer indentation and readability. --- setup.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 880d3f81b7..017a4119e1 100755 --- a/setup.py +++ b/setup.py @@ -56,14 +56,22 @@ def _gen_console_scripts(): with readme_file: long_description = readme_file.read() -package_data = { - 'setuptools': ['script (dev).tmpl', 'script.tmpl', 'site-patch.py']} +package_data = dict( + setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], +) + force_windows_specific_files = ( os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") not in (None, "", "0") ) -if (sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt')) \ - or force_windows_specific_files: + +include_windows_files = ( + sys.platform == 'win32' or + os.name == 'java' and os._name == 'nt' or + force_windows_specific_files +) + +if include_windows_files: package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) @@ -76,7 +84,7 @@ def _gen_console_scripts(): name="setuptools", version="25.0.0", description="Easily download, build, install, upgrade, and uninstall " - "Python packages", + "Python packages", author="Python Packaging Authority", author_email="distutils-sig@python.org", long_description=long_description, From cc5004500ea05e868f9a661500f3fd29a4d05037 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:26:53 -0400 Subject: [PATCH 5957/8469] Move imports to the top --- setup.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index 017a4119e1..a162872d10 100755 --- a/setup.py +++ b/setup.py @@ -7,6 +7,9 @@ import os import sys import textwrap +from distutils.util import convert_path + +import setuptools # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -19,16 +22,13 @@ def require_metadata(): src_root = None -from distutils.util import convert_path +def read_commands(): + command_ns = {} + init_path = convert_path('setuptools/command/__init__.py') + with open(init_path) as init_file: + exec(init_file.read(), command_ns) + return command_ns['__all__'] -command_ns = {} -init_path = convert_path('setuptools/command/__init__.py') -with open(init_path) as init_file: - exec(init_file.read(), command_ns) - -SETUP_COMMANDS = command_ns['__all__'] - -import setuptools scripts = [] @@ -101,7 +101,7 @@ def _gen_console_scripts(): entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() - for cmd in SETUP_COMMANDS + for cmd in read_commands() ], "distutils.setup_keywords": [ "eager_resources = setuptools.dist:assert_string_list", From 4842be2133a0438524cab3b8e2abada6df9e7c5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:32:23 -0400 Subject: [PATCH 5958/8469] Compute dependency links, enabling short lines and codifying the path resolution. --- setup.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a162872d10..cff9088807 100755 --- a/setup.py +++ b/setup.py @@ -80,6 +80,16 @@ def _gen_console_scripts(): needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] +def pypi_link(pkg_filename): + """ + Given the filename, including md5 fragment, construct the + dependency link for PyPI. + """ + root = 'https://pypi.python.org/packages/source' + name, sep, rest = pkg_filename.partition('-') + parts = root, name[0], name, pkg_filename + return '/'.join(parts) + setup_params = dict( name="setuptools", version="25.0.0", @@ -164,8 +174,12 @@ def _gen_console_scripts(): "certs": "certifi==2016.2.28", }, dependency_links=[ - 'https://pypi.python.org/packages/source/c/certifi/certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650', - 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', + pypi_link( + 'certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650', + ), + pypi_link( + 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', + ), ], scripts=[], tests_require=[ From 2eb1007f8d1a2cf6b60f19df665c5dade3d7c8da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:35:41 -0400 Subject: [PATCH 5959/8469] Remove unused variable --- setup.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index cff9088807..6065321603 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ def require_metadata(): msg = "Cannot build setuptools without metadata. Run bootstrap.py" raise RuntimeError(msg) -src_root = None def read_commands(): command_ns = {} @@ -30,9 +29,6 @@ def read_commands(): return command_ns['__all__'] -scripts = [] - - def _gen_console_scripts(): yield "easy_install = setuptools.command.easy_install:main" @@ -49,11 +45,7 @@ def _gen_console_scripts(): .format(shortver=sys.version[:3])) -console_scripts = list(_gen_console_scripts()) - -readme_file = io.open('README.rst', encoding='utf-8') - -with readme_file: +with io.open('README.rst', encoding='utf-8') as readme_file: long_description = readme_file.read() package_data = dict( @@ -100,7 +92,7 @@ def pypi_link(pkg_filename): long_description=long_description, keywords="CPAN PyPI distutils eggs package management", url="https://github.com/pypa/setuptools", - src_root=src_root, + src_root=None, packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, @@ -146,7 +138,7 @@ def pypi_link(pkg_filename): "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": console_scripts, + "console_scripts": list(_gen_console_scripts()), "setuptools.installation": ['eggsecutable = setuptools.command.easy_install:bootstrap'], From bf866865418c7c58970b9f8da9151f7df3cba6af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:44:59 -0400 Subject: [PATCH 5960/8469] Eliminate dependence on convert_path. Windows allows forward slashes, so just use them. --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 6065321603..4eb3f78ed4 100755 --- a/setup.py +++ b/setup.py @@ -7,12 +7,13 @@ import os import sys import textwrap -from distutils.util import convert_path import setuptools +here = os.path.dirname(__file__) + # Allow to run setup.py from another directory. -os.chdir(os.path.dirname(os.path.abspath(__file__))) +here and os.chdir(here) def require_metadata(): "Prevent improper installs without necessary metadata. See #659" @@ -23,7 +24,8 @@ def require_metadata(): def read_commands(): command_ns = {} - init_path = convert_path('setuptools/command/__init__.py') + cmd_module_path = 'setuptools/command/__init__.py' + init_path = os.path.join(here, cmd_module_path) with open(init_path) as init_file: exec(init_file.read(), command_ns) return command_ns['__all__'] From 5a63f386217cae916c60cc8a89ae1115df9ea7f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:51:20 -0400 Subject: [PATCH 5961/8469] Only chdir when executed, which may be unnecessary, but keeping it for compatibility. --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 4eb3f78ed4..355b0aaa45 100755 --- a/setup.py +++ b/setup.py @@ -10,10 +10,9 @@ import setuptools + here = os.path.dirname(__file__) -# Allow to run setup.py from another directory. -here and os.chdir(here) def require_metadata(): "Prevent improper installs without necessary metadata. See #659" @@ -47,7 +46,8 @@ def _gen_console_scripts(): .format(shortver=sys.version[:3])) -with io.open('README.rst', encoding='utf-8') as readme_file: +readme_path = os.path.join(here, 'README.rst') +with io.open(readme_path, encoding='utf-8') as readme_file: long_description = readme_file.read() package_data = dict( @@ -188,5 +188,7 @@ def pypi_link(pkg_filename): ) if __name__ == '__main__': + # allow setup.py to run from another directory + here and os.path.chdir(here) require_metadata() dist = setuptools.setup(**setup_params) From 8dea0697aa3089de31f96c02d734d9ed05d3dac9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jul 2016 13:56:57 -0400 Subject: [PATCH 5962/8469] Mark failing tests as xfail until they can be resolved. Ref #591. --- pkg_resources/tests/test_resources.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 31847dc842..e0dbb65279 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -3,6 +3,7 @@ import os import sys import string +import platform from pkg_resources.extern.six.moves import map @@ -763,6 +764,9 @@ def patched_path(self, tmpdir): pkg_resources._namespace_packages = saved_ns_pkgs sys.path = saved_sys_path + issue591 = pytest.mark.xfail(platform.system()=='Windows', reason="#591") + + @issue591 def test_two_levels_deep(self, symlinked_tmpdir): """ Test nested namespace packages @@ -796,6 +800,7 @@ def test_two_levels_deep(self, symlinked_tmpdir): ] assert pkg1.pkg2.__path__ == expected + @issue591 def test_path_order(self, symlinked_tmpdir): """ Test that if multiple versions of the same namespace package subpackage From 52e41435776bf0d07de4e14a51944085b2235609 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 24 Jul 2016 09:33:26 +0700 Subject: [PATCH 5963/8469] setup.py: add missing blank line. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 355b0aaa45..9df3da1616 100755 --- a/setup.py +++ b/setup.py @@ -74,6 +74,7 @@ def _gen_console_scripts(): needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] + def pypi_link(pkg_filename): """ Given the filename, including md5 fragment, construct the @@ -84,6 +85,7 @@ def pypi_link(pkg_filename): parts = root, name[0], name, pkg_filename return '/'.join(parts) + setup_params = dict( name="setuptools", version="25.0.0", From 86689c912fe8d7c0c468e177f0f1f8b9260d4924 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 24 Jul 2016 17:59:53 +0700 Subject: [PATCH 5964/8469] docs/conf.py: split multiple imports on one line. --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 07d6ad41ca..be0101521d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # Allow Sphinx to find the setup command that is imported below, as referenced above. -import sys, os +import os +import sys sys.path.append(os.path.abspath('..')) import setup as setup_script From a8026f2911ed96c6a8f9a91e297e09af40bbce8c Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 24 Jul 2016 19:40:17 +0700 Subject: [PATCH 5965/8469] README: make exactly one space after period. --- README.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index d8d8a6e53b..2cf762d7d6 100755 --- a/README.rst +++ b/README.rst @@ -57,7 +57,7 @@ The recommended way to install setuptools on Windows is to download distribution file and install it for you. Once installation is complete, you will find an ``easy_install`` program in -your Python ``Scripts`` subdirectory. For simple invocation and best results, +your Python ``Scripts`` subdirectory. For simple invocation and best results, add this directory to your ``PATH`` environment variable, if it is not already present. If you did a user-local install, the ``Scripts`` subdirectory is ``$env:APPDATA\Python\Scripts``. @@ -134,7 +134,7 @@ Downloads ========= All setuptools downloads can be found at `the project's home page in the Python -Package Index`_. Scroll to the very bottom of the page to find the links. +Package Index`_. Scroll to the very bottom of the page to find the links. .. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools @@ -175,9 +175,9 @@ learning about Setuptools, Python Eggs, and EasyInstall: * `The Internal Structure of Python Eggs`_ Questions, comments, and bug reports should be directed to the `distutils-sig -mailing list`_. If you have written (or know of) any tutorials, documentation, +mailing list`_. If you have written (or know of) any tutorials, documentation, plug-ins, or other resources for setuptools users, please let us know about -them there, so this reference list can be updated. If you have working, +them there, so this reference list can be updated. If you have working, *tested* patches to correct problems or add features, you may submit them to the `setuptools bug tracker`_. @@ -194,13 +194,13 @@ Credits ------- * The original design for the ``.egg`` format and the ``pkg_resources`` API was - co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first + co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first version of ``pkg_resources``, and supplied the OS X operating system version compatibility algorithm. * Ian Bicking implemented many early "creature comfort" features of easy_install, including support for downloading via Sourceforge and - Subversion repositories. Ian's comments on the Web-SIG about WSGI + Subversion repositories. Ian's comments on the Web-SIG about WSGI application deployment also inspired the concept of "entry points" in eggs, and he has given talks at PyCon and elsewhere to inform and educate the community about eggs and setuptools. @@ -215,7 +215,7 @@ Credits * Significant parts of the implementation of setuptools were funded by the Open Source Applications Foundation, to provide a plug-in infrastructure for the - Chandler PIM application. In addition, many OSAF staffers (such as Mike + Chandler PIM application. In addition, many OSAF staffers (such as Mike "Code Bear" Taylor) contributed their time and stress as guinea pigs for the use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) @@ -224,7 +224,7 @@ Credits and addressed many defects. * Since the merge with Distribute, Jason R. Coombs is the - maintainer of setuptools. The project is maintained in coordination with + maintainer of setuptools. The project is maintained in coordination with the Python Packaging Authority (PyPA) and the larger Python community. .. _files: From 6156244cdeb74e39538516c9889596cbf994b68e Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 24 Jul 2016 21:44:15 +0700 Subject: [PATCH 5966/8469] CHANGES: make exactly one space after period. --- CHANGES.rst | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 83c10ce7b5..5442f2a601 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1250,12 +1250,12 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #125: Prevent Subversion support from creating a ~/.subversion directory just for checking the presence of a Subversion repository. -* Issue #12: Namespace packages are now imported lazily. That is, the mere +* Issue #12: Namespace packages are now imported lazily. That is, the mere declaration of a namespace package in an egg on ``sys.path`` no longer - causes it to be imported when ``pkg_resources`` is imported. Note that this + causes it to be imported when ``pkg_resources`` is imported. Note that this change means that all of a namespace package's ``__init__.py`` files must include a ``declare_namespace()`` call in order to ensure that they will be - handled properly at runtime. In 2.x it was possible to get away without + handled properly at runtime. In 2.x it was possible to get away without including the declaration, but only at the cost of forcing namespace packages to be imported early, which 3.0 no longer does. * Issue #148: When building (bdist_egg), setuptools no longer adds @@ -2036,7 +2036,7 @@ how it parses version numbers. * Distribute #67: Fixed doc typo (PEP 381/PEP 382). * Distribute no longer shadows setuptools if we require a 0.7-series - setuptools. And an error is raised when installing a 0.7 setuptools with + setuptools. And an error is raised when installing a 0.7 setuptools with distribute. * When run from within buildout, no attempt is made to modify an existing @@ -2336,7 +2336,7 @@ easy_install * Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``. * Allow ``.py`` files found by the ``include_package_data`` option to be - automatically included. Remove duplicate data file matches if both + automatically included. Remove duplicate data file matches if both ``include_package_data`` and ``package_data`` are used to refer to the same files. @@ -2377,7 +2377,7 @@ easy_install directory doesn't need to support .pth files. * ``MANIFEST.in`` is now forcibly closed when any errors occur while reading - it. Previously, the file could be left open and the actual error would be + it. Previously, the file could be left open and the actual error would be masked by problems trying to remove the open file on Windows systems. 0.6a10 @@ -2390,7 +2390,7 @@ easy_install * The ``sdist`` command no longer uses the traditional ``MANIFEST`` file to create source distributions. ``MANIFEST.in`` is still read and processed, - as are the standard defaults and pruning. But the manifest is built inside + as are the standard defaults and pruning. But the manifest is built inside the project's ``.egg-info`` directory as ``SOURCES.txt``, and it is rebuilt every time the ``egg_info`` command is run. @@ -2426,11 +2426,11 @@ easy_install command so that you can more easily wrap a "flat" egg in a system package. * Enhanced ``bdist_rpm`` so that it installs single-version eggs that - don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, + don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed, since all RPMs are now built in a more backwards-compatible format. * Support full roundtrip translation of eggs to and from ``bdist_wininst`` - format. Running ``bdist_wininst`` on a setuptools-based package wraps the + format. Running ``bdist_wininst`` on a setuptools-based package wraps the egg in an .exe that will safely install it as an egg (i.e., with metadata and entry-point wrapper scripts), and ``easy_install`` can turn the .exe back into an ``.egg`` file or directory and install it as such. @@ -2454,19 +2454,19 @@ easy_install * Fixed some problems with fresh checkouts of projects that don't include ``.egg-info/PKG-INFO`` under revision control and put the project's source - code directly in the project directory. If such a package had any + code directly in the project directory. If such a package had any requirements that get processed before the ``egg_info`` command can be run, the setup scripts would fail with a "Missing 'Version:' header and/or PKG-INFO file" error, because the egg runtime interpreted the unbuilt metadata in a directory on ``sys.path`` (i.e. the current directory) as - being a corrupted egg. Setuptools now monkeypatches the distribution + being a corrupted egg. Setuptools now monkeypatches the distribution metadata cache to pretend that the egg has valid version information, until it has a chance to make it actually be so (via the ``egg_info`` command). 0.6a5 ----- - * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. + * Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests. 0.6a3 ----- @@ -2479,8 +2479,8 @@ easy_install ----- * Added ``console_scripts`` entry point group to allow installing scripts - without the need to create separate script files. On Windows, console - scripts get an ``.exe`` wrapper so you can just type their name. On other + without the need to create separate script files. On Windows, console + scripts get an ``.exe`` wrapper so you can just type their name. On other platforms, the scripts are written without a file extension. 0.6a1 @@ -2490,7 +2490,7 @@ easy_install the target package, using a ``--no-egg`` option. * The ``build_ext`` command now works better when using the ``--inplace`` - option and multiple Python versions. It now makes sure that all extensions + option and multiple Python versions. It now makes sure that all extensions match the current Python version, even if newer copies were built for a different Python version. @@ -2520,11 +2520,11 @@ easy_install * ``setuptools`` now finds its commands, ``setup()`` argument validators, and metadata writers using entry points, so that they can be extended by - third-party packages. See `Creating distutils Extensions + third-party packages. See `Creating distutils Extensions `_ for more details. - * The vestigial ``depends`` command has been removed. It was never finished + * The vestigial ``depends`` command has been removed. It was never finished or documented, and never would have worked without EasyInstall - which it pre-dated and was never compatible with. @@ -2558,9 +2558,9 @@ easy_install * ``setup.py install`` now automatically detects when an "unmanaged" package or module is going to be on ``sys.path`` ahead of a package being installed, - thereby preventing the newer version from being imported. If this occurs, + thereby preventing the newer version from being imported. If this occurs, a warning message is output to ``sys.stderr``, but installation proceeds - anyway. The warning message informs the user what files or directories + anyway. The warning message informs the user what files or directories need deleting, and advises them they can also use EasyInstall (with the ``--delete-conflicting`` option) to do it automatically. @@ -2581,14 +2581,14 @@ easy_install * The "egg_info" command now always sets the distribution metadata to "safe" forms of the distribution name and version, so that distribution files will be generated with parseable names (i.e., ones that don't include '-' in the - name or version). Also, this means that if you use the various ``--tag`` + name or version). Also, this means that if you use the various ``--tag`` options of "egg_info", any distributions generated will use the tags in the version, not just egg distributions. * Added support for defining command aliases in distutils configuration files, - under the "[aliases]" section. To prevent recursion and to allow aliases to + under the "[aliases]" section. To prevent recursion and to allow aliases to call the command of the same name, a given alias can be expanded only once - per command-line invocation. You can define new aliases with the "alias" + per command-line invocation. You can define new aliases with the "alias" command, either for the local, global, or per-user configuration. * Added "rotate" command to delete old distribution files, given a set of @@ -2596,7 +2596,7 @@ easy_install recently-modified distribution files matching each pattern.) * Added "saveopts" command that saves all command-line options for the current - invocation to the local, global, or per-user configuration file. Useful for + invocation to the local, global, or per-user configuration file. Useful for setting defaults without having to hand-edit a configuration file. * Added a "setopt" command that sets a single option in a specified distutils @@ -2615,7 +2615,7 @@ easy_install * Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it will include all files under revision control (CVS or Subversion) in the current directory, and it will regenerate the list every time you create a - source distribution, not just when you tell it to. This should make the + source distribution, not just when you tell it to. This should make the default "do what you mean" more often than the distutils' default behavior did, while still retaining the old behavior in the presence of MANIFEST.in. @@ -2630,14 +2630,14 @@ easy_install 0.5a5 ----- - * Added ``develop`` command to ``setuptools``-based packages. This command + * Added ``develop`` command to ``setuptools``-based packages. This command installs an ``.egg-link`` pointing to the package's source directory, and script wrappers that ``execfile()`` the source versions of the package's - scripts. This lets you put your development checkout(s) on sys.path without + scripts. This lets you put your development checkout(s) on sys.path without having to actually install them. (To uninstall the link, use use ``setup.py develop --uninstall``.) - * Added ``egg_info`` command to ``setuptools``-based packages. This command + * Added ``egg_info`` command to ``setuptools``-based packages. This command just creates or updates the "projectname.egg-info" directory, without building an egg. (It's used by the ``bdist_egg``, ``test``, and ``develop`` commands.) @@ -2645,11 +2645,11 @@ easy_install * Enhanced the ``test`` command so that it doesn't install the package, but instead builds any C extensions in-place, updates the ``.egg-info`` metadata, adds the source directory to ``sys.path``, and runs the tests - directly on the source. This avoids an "unmanaged" installation of the + directly on the source. This avoids an "unmanaged" installation of the package to ``site-packages`` or elsewhere. * Made ``easy_install`` a standard ``setuptools`` command, moving it from - the ``easy_install`` module to ``setuptools.command.easy_install``. Note + the ``easy_install`` module to ``setuptools.command.easy_install``. Note that if you were importing or extending it, you must now change your imports accordingly. ``easy_install.py`` is still installed as a script, but not as a module. @@ -2660,10 +2660,10 @@ easy_install * Setup scripts using setuptools can now list their dependencies directly in the setup.py file, without having to manually create a ``depends.txt`` file. The ``install_requires`` and ``extras_require`` arguments to ``setup()`` - are used to create a dependencies file automatically. If you are manually + are used to create a dependencies file automatically. If you are manually creating ``depends.txt`` right now, please switch to using these setup arguments as soon as practical, because ``depends.txt`` support will be - removed in the 0.6 release cycle. For documentation on the new arguments, + removed in the 0.6 release cycle. For documentation on the new arguments, see the ``setuptools.dist.Distribution`` class. * Setup scripts using setuptools now always install using ``easy_install`` @@ -2672,7 +2672,7 @@ easy_install 0.5a1 ----- - * Added support for "self-installation" bootstrapping. Packages can now + * Added support for "self-installation" bootstrapping. Packages can now include ``ez_setup.py`` in their source distribution, and add the following to their ``setup.py``, in order to automatically bootstrap installation of setuptools as part of their setup process:: @@ -2692,21 +2692,21 @@ easy_install * All downloads are now managed by the ``PackageIndex`` class (which is now subclassable and replaceable), so that embedders can more easily override - download logic, give download progress reports, etc. The class has also + download logic, give download progress reports, etc. The class has also been moved to the new ``setuptools.package_index`` module. * The ``Installer`` class no longer handles downloading, manages a temporary - directory, or tracks the ``zip_ok`` option. Downloading is now handled + directory, or tracks the ``zip_ok`` option. Downloading is now handled by ``PackageIndex``, and ``Installer`` has become an ``easy_install`` command class based on ``setuptools.Command``. * There is a new ``setuptools.sandbox.run_setup()`` API to invoke a setup script in a directory sandbox, and a new ``setuptools.archive_util`` module - with an ``unpack_archive()`` API. These were split out of EasyInstall to + with an ``unpack_archive()`` API. These were split out of EasyInstall to allow reuse by other tools and applications. * ``setuptools.Command`` now supports reinitializing commands using keyword - arguments to set/reset options. Also, ``Command`` subclasses can now set + arguments to set/reset options. Also, ``Command`` subclasses can now set their ``command_consumes_arguments`` attribute to ``True`` in order to receive an ``args`` option containing the rest of the command line. @@ -2715,7 +2715,7 @@ easy_install * Added new options to ``bdist_egg`` to allow tagging the egg's version number with a subversion revision number, the current date, or an explicit tag - value. Run ``setup.py bdist_egg --help`` to get more information. + value. Run ``setup.py bdist_egg --help`` to get more information. * Misc. bug fixes From cfaab99763f94c1e73f8bc4c1a61648b70ecae72 Mon Sep 17 00:00:00 2001 From: stepshal Date: Mon, 25 Jul 2016 01:24:33 +0700 Subject: [PATCH 5967/8469] docs/conf.py: remove unused boilerplate. --- docs/conf.py | 97 ---------------------------------------------------- 1 file changed, 97 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index be0101521d..dc0d8faec7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,9 +37,6 @@ # The suffix of source filenames. source_suffix = '.txt' -# The encoding of source files. -#source_encoding = 'utf-8' - # The master toctree document. master_doc = 'index' @@ -56,43 +53,13 @@ # The full version, including alpha/beta/rc tags. release = setup_script.setup_params['version'] -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of documents that shouldn't be included in the build. -#unused_docs = [] - # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - # -- Options for HTML output --------------------------------------------------- @@ -100,11 +67,6 @@ # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'nature' -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_theme'] @@ -115,24 +77,6 @@ # A shorter title for the navigation bar. Default is the same as html_title. html_short_title = "Setuptools" -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. html_use_smartypants = True @@ -140,42 +84,18 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = {'index': 'indexsidebar.html'} -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - # If false, no module index is generated. html_use_modindex = False # If false, no index is generated. html_use_index = False -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = '' - # Output file base name for HTML help builder. htmlhelp_basename = 'Setuptoolsdoc' # -- Options for LaTeX output -------------------------------------------------- -# The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ @@ -183,23 +103,6 @@ 'The fellowship of the packaging', 'manual'), ] -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_use_modindex = True - link_files = { '../CHANGES.rst': dict( using=dict( From 4d82b38241d6edc2dcc4264a9d474fc6aba8f61e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 08:50:38 -0400 Subject: [PATCH 5968/8469] Update changelog to more clearly indicate the effect of the change. --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5442f2a601..acbd206bf1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,8 @@ v25.0.0 * #674: Default ``sys.path`` manipulation by easy-install.pth is now "raw", meaning that when writing easy-install.pth during any install operation, the ``sys.path`` will not be - rewritten, giving preference to easy_installed packages. + rewritten and will no longer give preference to easy_installed + packages. To retain the old behavior when using any easy_install operation (including ``setup.py install`` when setuptools is From d70b7b47644c2436a50f9d8dc8627dc5809fb5b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 08:54:19 -0400 Subject: [PATCH 5969/8469] Update changelog --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index acbd206bf1..54b35023b3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,17 @@ CHANGES ======= +v25.0.1 +------- + +* Cleanup of setup.py script. + +* Fixed documentation builders by allowing setup.py + to be imported without having bootstrapped the + metadata. + +* More style cleanup. See #677, #678, #679, #681, #685. + v25.0.0 ------- From 5bff01fe9b15cbec748d83f6c229a2b66b096729 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 08:54:25 -0400 Subject: [PATCH 5970/8469] =?UTF-8?q?Bump=20version:=2025.0.0=20=E2=86=92?= =?UTF-8?q?=2025.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1c72e12472..881d2d1a01 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.0.0 +current_version = 25.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 9df3da1616..af5e3ac418 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.0.0", + version="25.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 21ab99e53f0c263a2210cf51525d6edcae1ae9a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 08:54:26 -0400 Subject: [PATCH 5971/8469] Added tag v25.0.1 for changeset 0591bce16c7f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4b814cda7f..f75b16d264 100644 --- a/.hgtags +++ b/.hgtags @@ -288,3 +288,4 @@ ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 83ca05973c16102145b339aec7e170d94966a2ba v24.3.0 e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 58e92028ab0061f1f80d98e769c9143305275242 v25.0.0 +0591bce16c7f94191cea925929cc8b0ce6baca09 v25.0.1 From 0c1f6b6a53368a4b39f6617e13f50e11eac5bae1 Mon Sep 17 00:00:00 2001 From: stepshal Date: Mon, 25 Jul 2016 20:19:47 +0700 Subject: [PATCH 5972/8469] docs/easy_install.txt: remove repeated word. --- docs/easy_install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 591589fb2d..bd9f0e863d 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -768,7 +768,7 @@ Command-Line Options run by scripts that are already installed. ``--user`` (New in 0.6.11) - Use the the user-site-packages as specified in :pep:`370` + Use the user-site-packages as specified in :pep:`370` instead of the global site-packages. ``--always-copy, -a`` (New in 0.5a4) From 1918a41831fbef6d4b67dc484c647d56658bae1d Mon Sep 17 00:00:00 2001 From: Elias Dorneles Date: Mon, 25 Jul 2016 10:38:51 -0300 Subject: [PATCH 5973/8469] fix: use os.chdir to change directory --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index af5e3ac418..e4d85b0b3f 100755 --- a/setup.py +++ b/setup.py @@ -191,6 +191,6 @@ def pypi_link(pkg_filename): if __name__ == '__main__': # allow setup.py to run from another directory - here and os.path.chdir(here) + here and os.chdir(here) require_metadata() dist = setuptools.setup(**setup_params) From 3fcd44be1e8d3d8b9f229333e8f43d4893658183 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 8 Jun 2016 16:56:06 +0200 Subject: [PATCH 5974/8469] check if a download is successfull before deciding not to try the next possible dist --- setuptools/package_index.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0ea09bd6fe..8f8bf6ed66 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -602,24 +602,26 @@ def find(req, env=None): continue if dist in req and (dist.precedence <= SOURCE_DIST or not source): - return dist + mylocation = self.download(dist.location, tmpdir) + if os.path.exists(mylocation): + return dist, mylocation if force_scan: self.prescan() self.find_packages(requirement) - dist = find(requirement) + dist, mylocation = find(requirement) if local_index is not None: - dist = dist or find(requirement, local_index) + dist, mylocation = dist, mylocation if dist else find(requirement, local_index) if dist is None: if self.to_scan is not None: self.prescan() - dist = find(requirement) + dist, mylocation = find(requirement) if dist is None and not force_scan: self.find_packages(requirement) - dist = find(requirement) + dist, mylocation = find(requirement) if dist is None: self.warn( @@ -629,7 +631,7 @@ def find(req, env=None): ) else: self.info("Best match: %s", dist) - return dist.clone(location=self.download(dist.location, tmpdir)) + return dist.clone(location=mylocation) def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` From 1e5bb5e680d00fcfc74078d0ea2d12760879b3c7 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Wed, 8 Jun 2016 18:04:00 +0200 Subject: [PATCH 5975/8469] addressed remarks, None, None since a tuple is expected --- setuptools/package_index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8f8bf6ed66..a6918123dd 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -605,14 +605,15 @@ def find(req, env=None): mylocation = self.download(dist.location, tmpdir) if os.path.exists(mylocation): return dist, mylocation + return None, None if force_scan: self.prescan() self.find_packages(requirement) dist, mylocation = find(requirement) - if local_index is not None: - dist, mylocation = dist, mylocation if dist else find(requirement, local_index) + if not dist and local_index is not None: + dist, mylocation = find(requirement, local_index) if dist is None: if self.to_scan is not None: From c4ef24f6bac7b4c12b3cfc71258524185d220fc7 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Jun 2016 17:25:02 +0200 Subject: [PATCH 5976/8469] don't return a tuple, add a new attribute to current returnvalue --- setuptools/package_index.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a6918123dd..b7247120f3 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -604,25 +604,25 @@ def find(req, env=None): if dist in req and (dist.precedence <= SOURCE_DIST or not source): mylocation = self.download(dist.location, tmpdir) if os.path.exists(mylocation): - return dist, mylocation - return None, None + dist._location = mylocation + return dist if force_scan: self.prescan() self.find_packages(requirement) - dist, mylocation = find(requirement) + dist = find(requirement) if not dist and local_index is not None: - dist, mylocation = find(requirement, local_index) + dist = find(requirement, local_index) if dist is None: if self.to_scan is not None: self.prescan() - dist, mylocation = find(requirement) + dist = find(requirement) if dist is None and not force_scan: self.find_packages(requirement) - dist, mylocation = find(requirement) + dist = find(requirement) if dist is None: self.warn( @@ -632,7 +632,7 @@ def find(req, env=None): ) else: self.info("Best match: %s", dist) - return dist.clone(location=mylocation) + return dist.clone(location=dist._location) def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` From e2124c84b83e8ad6adb3dd8e8ed846eea4f7601f Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Jun 2016 17:30:02 +0200 Subject: [PATCH 5977/8469] pick better names for variables --- setuptools/package_index.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b7247120f3..89eb578641 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -602,9 +602,8 @@ def find(req, env=None): continue if dist in req and (dist.precedence <= SOURCE_DIST or not source): - mylocation = self.download(dist.location, tmpdir) - if os.path.exists(mylocation): - dist._location = mylocation + dist.download_location = self.download(dist.location, tmpdir) + if os.path.exists(dist.download_location): return dist if force_scan: @@ -632,7 +631,7 @@ def find(req, env=None): ) else: self.info("Best match: %s", dist) - return dist.clone(location=dist._location) + return dist.clone(location=dist.download_location) def fetch(self, requirement, tmpdir, force_scan=False, source=False): """Obtain a file suitable for fulfilling `requirement` From e2af2337adc2996e8aabaef2780dea8ac3e88487 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Fri, 24 Jun 2016 17:45:31 +0200 Subject: [PATCH 5978/8469] specify that no 'working' links were found, previous behaviour didn't check if downloads could succeed --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 89eb578641..8d965f4902 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -625,7 +625,7 @@ def find(req, env=None): if dist is None: self.warn( - "No local packages or download links found for %s%s", + "No local packages or working download links found for %s%s", (source and "a source distribution of " or ""), requirement, ) From 87c776227a5bf3443cddc9f26255ff7ab90d9829 Mon Sep 17 00:00:00 2001 From: Jens Timmerman Date: Mon, 25 Jul 2016 13:43:01 +0200 Subject: [PATCH 5979/8469] added changes to changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 54b35023b3..3a61f240fd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,11 @@ v25.0.1 * More style cleanup. See #677, #678, #679, #681, #685. +* #609: setuptools will now try to download a distribution from + the next possible download location if the first download fails. + This means you can now specify multiple links as ``dependency_links`` + and all links will be tried until a working download link is encountered. + v25.0.0 ------- From 8009a4a87261708de5cdc2dada1508d9fcf51a35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:39:32 -0400 Subject: [PATCH 5980/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 54b35023b3..a1ef21c2d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v25.0.2 +------- + +* #688: Fix AttributeError in setup.py when invoked not from + the current directory. + v25.0.1 ------- From 192d3cb295be20ff3c28a79fb16210e024f23dd0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:39:39 -0400 Subject: [PATCH 5981/8469] =?UTF-8?q?Bump=20version:=2025.0.1=20=E2=86=92?= =?UTF-8?q?=2025.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 881d2d1a01..164ce51398 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.0.1 +current_version = 25.0.2 commit = True tag = True diff --git a/setup.py b/setup.py index af5e3ac418..c0c166ea81 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.0.1", + version="25.0.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b15b40d3fdd88e6206de5d29c09fcc7e84779f8a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:39:40 -0400 Subject: [PATCH 5982/8469] Added tag v25.0.2 for changeset dc92db3e29a4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f75b16d264..4d75d103fa 100644 --- a/.hgtags +++ b/.hgtags @@ -289,3 +289,4 @@ ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 58e92028ab0061f1f80d98e769c9143305275242 v25.0.0 0591bce16c7f94191cea925929cc8b0ce6baca09 v25.0.1 +dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 From a4b7c659a63c924040fc03e96bf4befe4f11979d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:41:33 -0400 Subject: [PATCH 5983/8469] Added tag v25.0.2 for changeset 91eeaf2f33db --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 4d75d103fa..2acb78355a 100644 --- a/.hgtags +++ b/.hgtags @@ -290,3 +290,5 @@ e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 58e92028ab0061f1f80d98e769c9143305275242 v25.0.0 0591bce16c7f94191cea925929cc8b0ce6baca09 v25.0.1 dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 +dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 +91eeaf2f33db99d8f78f8261931a1aea8fe8d952 v25.0.2 From 76a3d326724eb0157e7a3c67c38139639c78e9ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:48:05 -0400 Subject: [PATCH 5984/8469] Update changelog --- CHANGES.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4f366f7480..5aa2733c98 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v25.1.0 +------- + +* #609: Setuptools will now try to download a distribution from + the next possible download location if the first download fails. + This means you can now specify multiple links as ``dependency_links`` + and all links will be tried until a working download link is encountered. + v25.0.2 ------- @@ -19,11 +27,6 @@ v25.0.1 * More style cleanup. See #677, #678, #679, #681, #685. -* #609: setuptools will now try to download a distribution from - the next possible download location if the first download fails. - This means you can now specify multiple links as ``dependency_links`` - and all links will be tried until a working download link is encountered. - v25.0.0 ------- From 168970b89c9ac421b153981f4ded731bf376a5cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:48:10 -0400 Subject: [PATCH 5985/8469] =?UTF-8?q?Bump=20version:=2025.0.2=20=E2=86=92?= =?UTF-8?q?=2025.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 164ce51398..a9f2e021a3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.0.2 +current_version = 25.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index b03fd40a5c..be86c29c91 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.0.2", + version="25.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 29016f7e696cdefba227ab761929698b4c636cb7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 Jul 2016 10:48:11 -0400 Subject: [PATCH 5986/8469] Added tag v25.1.0 for changeset 529a76a860c5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2acb78355a..0e5e1b78f2 100644 --- a/.hgtags +++ b/.hgtags @@ -292,3 +292,4 @@ e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 91eeaf2f33db99d8f78f8261931a1aea8fe8d952 v25.0.2 +529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 From d506d3d7411e890028092b72f1005d487a5398f1 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Wed, 27 Jul 2016 19:13:51 +0200 Subject: [PATCH 5987/8469] Fix regression in commit #e404a4a Missing `,` --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2a665c9290..c762c28fd8 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -909,7 +909,7 @@ def OSLibpath(self): os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), os.path.join( ref, - 'Windows.Foundation.UniversalApiContract' + 'Windows.Foundation.UniversalApiContract', '1.0.0.0', ), os.path.join( @@ -919,7 +919,7 @@ def OSLibpath(self): ), os.path.join( ref, - 'Windows.Networking.Connectivity.WwanContract' + 'Windows.Networking.Connectivity.WwanContract', '1.0.0.0', ), os.path.join( From 6e0a29decbf6395e35f4b352e6d75d46b523727d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jul 2016 10:17:35 -0400 Subject: [PATCH 5988/8469] Also force newer version of flake8, required by pytest-flake8 0.6. --- .travis.yml | 2 +- appveyor.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e91f7e783f..e275605b65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - LC_ALL=C LC_CTYPE=C script: # avoid VersionConflict when newer version is required - - pip install -U pytest + - pip install -U pytest flake8 # Output the env, because the travis docs just can't be trusted - env diff --git a/appveyor.yml b/appveyor.yml index 4ae6c791d1..144568136c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,5 +12,6 @@ install: build: off test_script: + - "python -m pip install -U flake8" - "python bootstrap.py" - "python setup.py test" From 93c69277ef3519239857263d8c996fce23335d38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jul 2016 10:24:58 -0400 Subject: [PATCH 5989/8469] Maybe just the pin needs to be removed --- .travis.yml | 2 +- appveyor.yml | 1 - setup.py | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e275605b65..e91f7e783f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - LC_ALL=C LC_CTYPE=C script: # avoid VersionConflict when newer version is required - - pip install -U pytest flake8 + - pip install -U pytest # Output the env, because the travis docs just can't be trusted - env diff --git a/appveyor.yml b/appveyor.yml index 144568136c..4ae6c791d1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,5 @@ install: build: off test_script: - - "python -m pip install -U flake8" - "python bootstrap.py" - "python setup.py test" diff --git a/setup.py b/setup.py index be86c29c91..0cf1d0b207 100755 --- a/setup.py +++ b/setup.py @@ -181,8 +181,6 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - # workaround for pytest-flake8 #7 - 'flake8<3dev', 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ From 10e1523a77919e0fd65098946aa1f6dcbceca087 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 27 Jul 2016 11:45:36 +0200 Subject: [PATCH 5990/8469] ignore .tox in pytest avoids errors in setup.py test if tox has been run --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index c693a4c342..640716a648 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .tox flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 From 279e625938d7991755c0aeba63f4293d9b67fa0f Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 27 Jul 2016 13:35:44 +0200 Subject: [PATCH 5991/8469] only insert eggs ahead of parent if not already on path in `insert_on(replace=False)` and set `replace=False` by default in `activate()` Fixes pkg_resources modifying sys.path for all eggs with SETUPTOOLS_SYS_PATH_TECHINQUE=raw --- pkg_resources/__init__.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6337db9921..602549bec9 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2503,11 +2503,11 @@ def _get_metadata(self, name): for line in self.get_metadata_lines(name): yield line - def activate(self, path=None): + def activate(self, path=None, replace=False): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: path = sys.path - self.insert_on(path, replace=True) + self.insert_on(path, replace=replace) if path is sys.path: fixup_namespace_packages(self.location) for pkg in self._get_metadata('namespace_packages.txt'): @@ -2585,7 +2585,24 @@ def get_entry_info(self, group, name): return self.get_entry_map(group).get(name) def insert_on(self, path, loc=None, replace=False): - """Insert self.location in path before its nearest parent directory""" + """Ensure self.location is on path + + If replace=False (default): + - If location is already in path anywhere, do nothing. + - Else: + - If it's an egg and its parent directory is on path, + insert just ahead of the parent. + - Else: add to the end of path. + If replace=True: + - If location is already on path anywhere (not eggs) + or higher priority than its parent (eggs) + do nothing. + - Else: + - If it's an egg and its parent directory is on path, + insert just ahead of the parent, + removing any lower-priority entries. + - Else: add it to the front of path. + """ loc = loc or self.location if not loc: @@ -2600,6 +2617,9 @@ def insert_on(self, path, loc=None, replace=False): break elif item == bdir and self.precedence == EGG_DIST: # if it's an .egg, give it precedence over its directory + # UNLESS it's already been added to sys.path and replace=False + if (not replace) and nloc in npath[p:]: + return if path is sys.path: self.check_version_conflict() path.insert(p, loc) From 4d158f842cbadb0d4b3bbeee3a8488f5f9a3dee4 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 27 Jul 2016 14:42:38 +0200 Subject: [PATCH 5992/8469] only call `dist.activate(True)` for *new* dists, not those loaded by default. --- pkg_resources/__init__.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 602549bec9..6aabd4c5c1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -947,11 +947,17 @@ def require(self, *requirements): return needed - def subscribe(self, callback): - """Invoke `callback` for all distributions (including existing ones)""" + def subscribe(self, callback, existing=True): + """Invoke `callback` for all distributions + + If `existing=True` (default), + call on all existing ones, as well. + """ if callback in self.callbacks: return self.callbacks.append(callback) + if not existing: + return for dist in self: callback(dist) @@ -2967,10 +2973,14 @@ def _initialize_master_working_set(): run_script = working_set.run_script # backward compatibility run_main = run_script - # Activate all distributions already on sys.path, and ensure that - # all distributions added to the working set in the future (e.g. by - # calling ``require()``) will get activated as well. - add_activation_listener(lambda dist: dist.activate()) + # Activate all distributions already on sys.path with replace=False and + # ensure that all distributions added to the working set in the future + # (e.g. by calling ``require()``) will get activated as well, + # with higher priority (replace=True). + for dist in working_set: + dist.activate(replace=False) + del dist + add_activation_listener(lambda dist: dist.activate(replace=True), existing=False) working_set.entries=[] # match order list(map(working_set.add_entry, sys.path)) From 58c02d28c216d4195429b220d14ba7326e93a62b Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 27 Jul 2016 15:10:53 +0200 Subject: [PATCH 5993/8469] insert(replace=False) should really be a no-op if path is found that includes removing duplicates. --- pkg_resources/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6aabd4c5c1..6d4727348f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2620,7 +2620,11 @@ def insert_on(self, path, loc=None, replace=False): for p, item in enumerate(npath): if item == nloc: - break + if replace: + break + else: + # don't modify path (even removing duplicates) if found and not replace + return elif item == bdir and self.precedence == EGG_DIST: # if it's an .egg, give it precedence over its directory # UNLESS it's already been added to sys.path and replace=False From 9e3f3cb5f58caf69e003023d724a8793e8d1c184 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jul 2016 15:00:01 -0400 Subject: [PATCH 5994/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5aa2733c98..77bd1c7951 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v25.1.1 +------- + +* #686: Fix issue in sys.path ordering by pkg_resources when + rewrite technique is "raw". +* #699: Fix typo in msvc support. + v25.1.0 ------- From ced5db7822ece3d4e4822b12dde5a67a6a60e90b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jul 2016 15:00:06 -0400 Subject: [PATCH 5995/8469] =?UTF-8?q?Bump=20version:=2025.1.0=20=E2=86=92?= =?UTF-8?q?=2025.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a9f2e021a3..25d403eea5 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.0 +current_version = 25.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 0cf1d0b207..1b18ab9296 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.0", + version="25.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 7cb842e1e81cbff7e1a0e04a46e1da96113f9a15 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 Jul 2016 15:00:06 -0400 Subject: [PATCH 5996/8469] Added tag v25.1.1 for changeset 392ee093902e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0e5e1b78f2..cf704a4367 100644 --- a/.hgtags +++ b/.hgtags @@ -293,3 +293,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 91eeaf2f33db99d8f78f8261931a1aea8fe8d952 v25.0.2 529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 +392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 From ba535ea4958e17a2cb2e79df093f50d057c07562 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Thu, 28 Jul 2016 23:03:45 +0200 Subject: [PATCH 5997/8469] Fix for #646 --- setuptools/msvc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index c762c28fd8..6fb3300b06 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -449,10 +449,14 @@ def lookup(self, key, name): for hkey in self.HKEYS: try: bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) + except OSError: + continue except IOError: continue try: return winreg.QueryValueEx(bkey, name)[0] + except OSError: + pass except IOError: pass From ca9749b3c9b6ec565686347db0e47cd272a4c524 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 29 Jul 2016 10:09:43 +0200 Subject: [PATCH 5998/8469] fix NameError when initial working_set is empty by defining dist so there's something to delete --- pkg_resources/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6d4727348f..9f0ea6ec5c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2981,6 +2981,7 @@ def _initialize_master_working_set(): # ensure that all distributions added to the working set in the future # (e.g. by calling ``require()``) will get activated as well, # with higher priority (replace=True). + dist = None # ensure dist is defined for del dist below for dist in working_set: dist.activate(replace=False) del dist From 15e0f14c1a7275a944c8c0c3f0f0e4badefa646a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 Jul 2016 23:54:30 -0400 Subject: [PATCH 5999/8469] Remove copy of rmtree, as Python 2.3 is no longer supported. --- setuptools/command/easy_install.py | 34 +----------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0e0dc2c4f4..ae9079d80c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2230,39 +2230,7 @@ def load_launcher_manifest(name): def rmtree(path, ignore_errors=False, onerror=auto_chmod): - """Recursively delete a directory tree. - - This code is taken from the Python 2.4 version of 'shutil', because - the 2.3 version doesn't really work right. - """ - if ignore_errors: - def onerror(*args): - pass - elif onerror is None: - def onerror(*args): - raise - names = [] - try: - names = os.listdir(path) - except os.error: - onerror(os.listdir, path, sys.exc_info()) - for name in names: - fullname = os.path.join(path, name) - try: - mode = os.lstat(fullname).st_mode - except os.error: - mode = 0 - if stat.S_ISDIR(mode): - rmtree(fullname, ignore_errors, onerror) - else: - try: - os.remove(fullname) - except os.error: - onerror(os.remove, fullname, sys.exc_info()) - try: - os.rmdir(path) - except os.error: - onerror(os.rmdir, path, sys.exc_info()) + return shutil.rmtree(path, ignore_errors, onerror) def current_umask(): From 849b034ac5440def5327172fa799fbbb3d40db98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 08:11:33 -0400 Subject: [PATCH 6000/8469] Don't rely on mock in the plugin --- setuptools/tests/fixtures.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index c70c38cb71..1e81ee2620 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,22 +1,18 @@ -try: - from unittest import mock -except ImportError: - import mock import pytest from . import contexts @pytest.yield_fixture -def user_override(): +def user_override(monkeypatch): """ Override site.USER_BASE and site.USER_SITE with temporary directories in a context. """ with contexts.tempdir() as user_base: - with mock.patch('site.USER_BASE', user_base): + monkeypatch.setattr('site.USER_BASE', user_base) with contexts.tempdir() as user_site: - with mock.patch('site.USER_SITE', user_site): + monkeypatch.setattr('site.USER_SITE', user_site) with contexts.save_user_site_setting(): yield From 1074affc4a94224f30692db4ab0d45ed29ac8c8d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 08:12:18 -0400 Subject: [PATCH 6001/8469] Reindent --- setuptools/tests/fixtures.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 1e81ee2620..5204c8d126 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -10,11 +10,11 @@ def user_override(monkeypatch): a context. """ with contexts.tempdir() as user_base: - monkeypatch.setattr('site.USER_BASE', user_base) - with contexts.tempdir() as user_site: - monkeypatch.setattr('site.USER_SITE', user_site) - with contexts.save_user_site_setting(): - yield + monkeypatch.setattr('site.USER_BASE', user_base) + with contexts.tempdir() as user_site: + monkeypatch.setattr('site.USER_SITE', user_site) + with contexts.save_user_site_setting(): + yield @pytest.yield_fixture From 7317122ae9092ab72d1ae82bad1afc887fca6508 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 10:42:13 -0400 Subject: [PATCH 6002/8469] Add test capturing undesirable behavior when unicode characters appear in the filename of a zip sdist. Ref #704. --- setuptools/tests/test_easy_install.py | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 11299c7c60..b7429d49bd 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -135,6 +135,57 @@ def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch): monkeypatch.delattr(site, 'getsitepackages', raising=False) assert ei.get_site_dirs() + @pytest.fixture + def sdist_unicode(self, tmpdir): + files = [ + ( + 'setup.py', + DALS(""" + import setuptools + setuptools.setup( + name="setuptools-test-unicode", + version="1.0", + packages=["mypkg"], + include_package_data=True, + ) + """), + ), + ( + 'mypkg/__init__.py', + "", + ), + ( + u'mypkg/\u2603.txt', + "", + ), + ] + sdist_name = 'setuptools-test-unicode-1.0.zip' + sdist = tmpdir / sdist_name + import zipfile + # can't use make_sdist, because the issue only occurs + # with zip sdists. + sdist_zip = zipfile.ZipFile(str(sdist), 'w') + for filename, content in files: + sdist_zip.writestr(filename, content) + sdist_zip.close() + return str(sdist) + + def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): + """ + The install command should execute correctly even if + the package has unicode filenames. + """ + dist = Distribution({'script_args': ['easy_install']}) + target = (tmpdir / 'target').ensure_dir() + cmd = ei.easy_install( + dist, + install_dir=str(target), + args=['x'], + ) + monkeypatch.setitem(os.environ, 'PYTHONPATH', str(target)) + cmd.ensure_finalized() + cmd.easy_install(sdist_unicode) + class TestPTHFileWriter: From 3f6926a9b069f48f22dd74d80733d62433e54162 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 10:44:45 -0400 Subject: [PATCH 6003/8469] Include Python 2.7 in the appveyor matrix to capture failures on older Pythons. Ref #704. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 4ae6c791d1..f3d22f0982 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,7 @@ environment: matrix: - PYTHON: "C:\\Python35-x64" + - PYTHON: "C:\\Python27-x64" install: # symlink python from a directory with a space From 2e8a63bd67e3f7261a5999503269465c58611f48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 10:52:32 -0400 Subject: [PATCH 6004/8469] Mark test as xfail. Ref #706. --- setuptools/tests/test_easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b7429d49bd..161c673ffa 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -170,6 +170,8 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) + @pytest.mark.xfail(os.environ.get('LANG') == 'C', + reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 5ef93a05518c3cc6b48f45d1a7213fcb69df90b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 10:53:05 -0400 Subject: [PATCH 6005/8469] Move import to top --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 161c673ffa..0f1ab2539c 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,6 +14,7 @@ import itertools import distutils.errors import io +import zipfile import time from setuptools.extern.six.moves import urllib @@ -161,7 +162,6 @@ def sdist_unicode(self, tmpdir): ] sdist_name = 'setuptools-test-unicode-1.0.zip' sdist = tmpdir / sdist_name - import zipfile # can't use make_sdist, because the issue only occurs # with zip sdists. sdist_zip = zipfile.ZipFile(str(sdist), 'w') From 857949575022946cc60c7cd1d0d088246d3f7540 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:05:33 -0400 Subject: [PATCH 6006/8469] Ensure that tmpdir is unicode. Fixes #704. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ae9079d80c..4783ce48dc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -627,7 +627,7 @@ def check_editable(self, spec): ) def easy_install(self, spec, deps=False): - tmpdir = tempfile.mkdtemp(prefix="easy_install-") + tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) if not self.editable: self.install_site_py() From 82d6b404903bebabb8ae3df2453001d0fb086e6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:07:48 -0400 Subject: [PATCH 6007/8469] Use the logic already vetted for determining ascii context. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 0f1ab2539c..b209490142 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -170,7 +170,7 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) - @pytest.mark.xfail(os.environ.get('LANG') == 'C', + @pytest.mark.xfail(setuptools.tests.is_ascii, reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ From d38321d4bbb2f04de89706cd7274397cbfc879fb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:12:31 -0400 Subject: [PATCH 6008/8469] For now mark test as xfail until the issue can be diagnosed and resolved. Ref #707. --- setuptools/tests/test_msvc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index a0c76ea0da..0d0a90f54e 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -6,6 +6,8 @@ import contextlib import distutils.errors +import six + import pytest try: from unittest import mock @@ -71,6 +73,8 @@ def test_patched(self): mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ assert mod_name == "setuptools.msvc", "find_vcvarsall unpatched" + @pytest.mark.xfail(six.PY2, + reason="https://github.com/pypa/setuptools/issues/707") def test_no_registry_entries_means_nothing_found(self): """ No registry entries or environment variable should lead to an error From 0e4c33da98882fee354d21082103392b26af3615 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:15:19 -0400 Subject: [PATCH 6009/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 77bd1c7951..13ffe9e76a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v25.1.2 +------- + +* #704: Fix errors when installing a zip sdist which contained + files named with non-ascii characters on Windows would + crash the install when it attempted to clean up the build. + v25.1.1 ------- From 6571ce8b2152c0c6e1e7012fe07970e96484a1a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:17:13 -0400 Subject: [PATCH 6010/8469] Report skips and xfails on CI builds --- .travis.yml | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e91f7e783f..32b664d878 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ script: # update egg_info based on setup.py in checkout - python bootstrap.py - - python setup.py test --addopts='-rs' + - python setup.py test --addopts='-rsx' before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 diff --git a/appveyor.yml b/appveyor.yml index f3d22f0982..ebf446bf18 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,4 +14,4 @@ build: off test_script: - "python bootstrap.py" - - "python setup.py test" + - "python setup.py test --addopts='-rsx'" From 09234d3084739075e0aba59002419c341a59a47e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:19:38 -0400 Subject: [PATCH 6011/8469] Correct import --- setuptools/tests/test_msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 0d0a90f54e..8c7e17d3c1 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -6,7 +6,7 @@ import contextlib import distutils.errors -import six +from setuptools.extern import six import pytest try: From 39912c7e8c5160a9805ca5f55ff671ffe2e521cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:27:14 -0400 Subject: [PATCH 6012/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 13ffe9e76a..bc2bf5b5d3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ v25.1.2 * #704: Fix errors when installing a zip sdist which contained files named with non-ascii characters on Windows would crash the install when it attempted to clean up the build. +* #646: MSVC compatibility - catch errors properly in + RegistryInfo.lookup. v25.1.1 ------- From 6d37deba69a8483f0591594081429d67d68f6ff1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:28:56 -0400 Subject: [PATCH 6013/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index bc2bf5b5d3..de70d0413a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,8 @@ v25.1.2 crash the install when it attempted to clean up the build. * #646: MSVC compatibility - catch errors properly in RegistryInfo.lookup. +* #702: Prevent UnboundLocalError when initial working_set + is empty. v25.1.1 ------- From 573a34e3ab68a73ba2407d4990e68eba43c964ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Jul 2016 11:30:19 -0400 Subject: [PATCH 6014/8469] Added tag v25.1.2 for changeset 1cbb29c23543 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cf704a4367..597d07da47 100644 --- a/.hgtags +++ b/.hgtags @@ -294,3 +294,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 91eeaf2f33db99d8f78f8261931a1aea8fe8d952 v25.0.2 529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 +1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 From 6c93713d75f5888cc9654ec23fc05f5b7772b51a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jul 2016 20:39:07 -0400 Subject: [PATCH 6015/8469] Rewrite test_dist_info using pytest fixtures. --- setuptools/tests/test_dist_info.py | 81 ++++++++++++++++-------------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index db3cb2e740..92ef6e8c9c 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -14,10 +14,47 @@ class TestDistInfo: - def test_distinfo(self): + metadata_template = DALS(""" + Metadata-Version: 1.2 + Name: {name} + {version} + Requires-Dist: splort (==4) + Provides-Extra: baz + Requires-Dist: quux (>=1.1); extra == 'baz' + """) + + @pytest.fixture + def metadata(self, tmpdir): + dist_info_name = 'VersionedDistribution-2.718.dist-info' + versioned = tmpdir / dist_info_name + versioned.mkdir() + filename = versioned / 'METADATA' + filename.write_text( + self.metadata_template.format( + name='VersionedDistribution', + version='', + ).replace('\n\n', '\n'), + encoding='utf-8', + ) + + dist_info_name = 'UnversionedDistribution.dist-info' + unversioned = tmpdir / dist_info_name + unversioned.mkdir() + filename = unversioned / 'METADATA' + filename.write_text( + self.metadata_template.format( + name='UnversionedDistribution', + version='Version: 0.3', + ), + encoding='utf-8', + ) + + return str(tmpdir) + + def test_distinfo(self, metadata): dists = dict( (d.project_name, d) - for d in pkg_resources.find_distributions(self.tmpdir) + for d in pkg_resources.find_distributions(metadata) ) assert len(dists) == 2, dists @@ -28,46 +65,14 @@ def test_distinfo(self): assert versioned.version == '2.718' # from filename assert unversioned.version == '0.3' # from METADATA - def test_conditional_dependencies(self): + def test_conditional_dependencies(self, metadata): specs = 'splort==4', 'quux>=1.1' requires = list(map(pkg_resources.Requirement.parse, specs)) - for d in pkg_resources.find_distributions(self.tmpdir): + for d in pkg_resources.find_distributions(metadata): assert d.requires() == requires[:1] assert d.requires(extras=('baz',)) == [ requires[0], - pkg_resources.Requirement.parse('quux>=1.1;extra=="baz"')] + pkg_resources.Requirement.parse('quux>=1.1;extra=="baz"'), + ] assert d.extras == ['baz'] - - metadata_template = DALS(""" - Metadata-Version: 1.2 - Name: {name} - {version} - Requires-Dist: splort (==4) - Provides-Extra: baz - Requires-Dist: quux (>=1.1); extra == 'baz' - """) - - def setup_method(self, method): - self.tmpdir = tempfile.mkdtemp() - dist_info_name = 'VersionedDistribution-2.718.dist-info' - versioned = os.path.join(self.tmpdir, dist_info_name) - os.mkdir(versioned) - with open(os.path.join(versioned, 'METADATA'), 'w+') as metadata_file: - metadata = self.metadata_template.format( - name='VersionedDistribution', - version='', - ).replace('\n\n', '\n') - metadata_file.write(metadata) - dist_info_name = 'UnversionedDistribution.dist-info' - unversioned = os.path.join(self.tmpdir, dist_info_name) - os.mkdir(unversioned) - with open(os.path.join(unversioned, 'METADATA'), 'w+') as metadata_file: - metadata = self.metadata_template.format( - name='UnversionedDistribution', - version='Version: 0.3', - ) - metadata_file.write(metadata) - - def teardown_method(self, method): - shutil.rmtree(self.tmpdir) From 52f72bb8d233ca518f4782c5dd9569c6764c53ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jul 2016 20:44:13 -0400 Subject: [PATCH 6016/8469] Extract variable for content --- setuptools/tests/test_dist_info.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 92ef6e8c9c..122d94a065 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -29,25 +29,21 @@ def metadata(self, tmpdir): versioned = tmpdir / dist_info_name versioned.mkdir() filename = versioned / 'METADATA' - filename.write_text( - self.metadata_template.format( - name='VersionedDistribution', - version='', - ).replace('\n\n', '\n'), - encoding='utf-8', - ) + content = self.metadata_template.format( + name='VersionedDistribution', + version='', + ).replace('\n\n', '\n') + filename.write_text(content, encoding='utf-8') dist_info_name = 'UnversionedDistribution.dist-info' unversioned = tmpdir / dist_info_name unversioned.mkdir() filename = unversioned / 'METADATA' - filename.write_text( - self.metadata_template.format( - name='UnversionedDistribution', - version='Version: 0.3', - ), - encoding='utf-8', + content = self.metadata_template.format( + name='UnversionedDistribution', + version='Version: 0.3', ) + filename.write_text(content, encoding='utf-8') return str(tmpdir) From 8cc9cd3c76ee2ab313163cf2bee54e5ba31f9f6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jul 2016 20:56:26 -0400 Subject: [PATCH 6017/8469] Build metadata programmatically to avoid weird double-newline removal. --- setuptools/tests/test_dist_info.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 122d94a065..0d1aed0317 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -14,34 +14,39 @@ class TestDistInfo: - metadata_template = DALS(""" + metadata_base = DALS(""" Metadata-Version: 1.2 - Name: {name} - {version} Requires-Dist: splort (==4) Provides-Extra: baz Requires-Dist: quux (>=1.1); extra == 'baz' """) + @classmethod + def build_metadata(cls, **kwargs): + lines = ( + '{key}: {value}\n'.format(**locals()) + for key, value in kwargs.items() + ) + return cls.metadata_base + ''.join(lines) + @pytest.fixture def metadata(self, tmpdir): dist_info_name = 'VersionedDistribution-2.718.dist-info' versioned = tmpdir / dist_info_name versioned.mkdir() filename = versioned / 'METADATA' - content = self.metadata_template.format( - name='VersionedDistribution', - version='', - ).replace('\n\n', '\n') + content = self.build_metadata( + Name='VersionedDistribution', + ) filename.write_text(content, encoding='utf-8') dist_info_name = 'UnversionedDistribution.dist-info' unversioned = tmpdir / dist_info_name unversioned.mkdir() filename = unversioned / 'METADATA' - content = self.metadata_template.format( - name='UnversionedDistribution', - version='Version: 0.3', + content = self.build_metadata( + Name='UnversionedDistribution', + Version='0.3', ) filename.write_text(content, encoding='utf-8') From ffce5a1fb043e4b17666fca6919cd94fabb3536a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 16:20:03 -0400 Subject: [PATCH 6018/8469] Remove unused imports --- setuptools/tests/test_dist_info.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 0d1aed0317..094a97ea65 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -1,9 +1,5 @@ """Test .dist-info style distributions. """ -import os -import shutil -import tempfile - from setuptools.extern.six.moves import map import pytest From 477ee99aa7229bdce83ca80049359284c6332f2d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 16:22:05 -0400 Subject: [PATCH 6019/8469] The future is here! (Fix test failures on Python 2.7 introduced in 8cc9cd3c76). --- setuptools/tests/test_dist_info.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 094a97ea65..f7e7d2bf0a 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -1,5 +1,8 @@ """Test .dist-info style distributions. """ + +from __future__ import unicode_literals + from setuptools.extern.six.moves import map import pytest From f60a5de47aa0a821ad1175b4c54f71b65ed05d72 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 16:31:55 -0400 Subject: [PATCH 6020/8469] =?UTF-8?q?Bump=20version:=2025.1.1=20=E2=86=92?= =?UTF-8?q?=2025.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 25d403eea5..b34560df5d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.1 +current_version = 25.1.2 commit = True tag = True diff --git a/setup.py b/setup.py index 1b18ab9296..202077d1fc 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.1", + version="25.1.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a509a879308ccf0937d20751665aaf8cdb0d27f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 16:32:19 -0400 Subject: [PATCH 6021/8469] Added tag 25.1.2 for changeset c350190e7bbf --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 597d07da47..fb280fed3e 100644 --- a/.hgtags +++ b/.hgtags @@ -295,3 +295,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 +c350190e7bbf274e6728f14af7451b1fd3aaeba2 25.1.2 From 315cd94d90349748016c842a3d7f851c631b76b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 21:23:21 -0400 Subject: [PATCH 6022/8469] Reorganize imports --- setuptools/archive_util.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 24d4e7bbb5..b6411cc548 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -1,11 +1,5 @@ """Utilities for extracting common archive formats""" - -__all__ = [ - "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", - "UnrecognizedFormat", "extraction_drivers", "unpack_directory", -] - import zipfile import tarfile import os @@ -13,9 +7,16 @@ import posixpath import contextlib from distutils.errors import DistutilsError + from pkg_resources import ensure_directory, ContextualZipFile +__all__ = [ + "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", + "UnrecognizedFormat", "extraction_drivers", "unpack_directory", +] + + class UnrecognizedFormat(DistutilsError): """Couldn't recognize the archive type""" From 4b1f577d73bc9d66a82e6e5ad84af89c9dca5c49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 22:06:49 -0400 Subject: [PATCH 6023/8469] Add test capturing #709. --- setuptools/tests/test_archive_util.py | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 setuptools/tests/test_archive_util.py diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py new file mode 100644 index 0000000000..0c282b738e --- /dev/null +++ b/setuptools/tests/test_archive_util.py @@ -0,0 +1,52 @@ +import six + +import pytest + +from setuptools import archive_util + +@pytest.fixture +def tarfile_with_unicode(tmpdir): + """ + Create a tarfile containing only a file whose name is + a zero byte file called testimäge.png. + + TODO: Is it possible to generate this file programmatically? + """ + data = ( + b'\x1f\x8b\x08\x00R\xfe\x9fW\x00\x03\xed\xd6AO\x13A\x14\x00' + b'\xe0\x11b\x8c\x8d\' z\xf02\x07=x\xd9\xce\xcc\xce\xec\xd4\xc3' + b'&\xa21\xb4X\\lI\xa3r0\xc3v\xc1\x8a\xec6\xcbbz3\x1cH\x80x\x93' + b'x\xeaQ\x12\x13\x0f$z\xd5\x13\x17\xa9U\x8e&\xfc\x06\x13\xff' + b'\x82\xb3\xa5\n\xb6J!\x16\x8c\xf0\xbed2\x9d\xd7\xe9v\xba\xb3' + b'\xafo\x8c\xe4\xa8\xaa\xa4=U\xf4\xc2\xa4\xf1 \xf2f\xa3\xd2\xcc' + b'\x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dc\xd0' + b'\xd33\x02\xbf9\xcbJq}f\xe0t\xdf\'\x04~\x95\xeb0\x9c\x10\x8e' + b'\xd0a\xd7\xfeX\xa7\xfc\x8f\xf3\xe5\xd7\xfc\xe7\xc2\xe2P\xff' + b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + b'\x008\xa8\xef\xb1g\xe1Z\x00(\x00\x00' + ) + target = tmpdir / 'unicode-pkg-1.0.tar.gz' + with open(str(target), mode='wb') as tf: + tf.write(data) + return str(target) + + +def test_unicode_files(tarfile_with_unicode, tmpdir): + target = tmpdir / 'out' + archive_util.unpack_archive(tarfile_with_unicode, six.text_type(target)) From 96159fc86c3ae19afe63e4699430f600c407f4d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 22:17:36 -0400 Subject: [PATCH 6024/8469] Add coding header --- setuptools/tests/test_archive_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index 0c282b738e..1936d2a572 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -1,3 +1,5 @@ +# coding: utf-8 + import six import pytest From 1b8dc8c7ac45662f7719b1bd531d0575e7fb1f02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 22:30:09 -0400 Subject: [PATCH 6025/8469] Fix UnicodeDecodeError when tarfile names have non-ascii characters. Fixes #709. --- setuptools/archive_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index b6411cc548..a1960be880 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -143,6 +143,8 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): tarobj.chown = lambda *args: None for member in tarobj: name = member.name + if isinstance(name, bytes): + name = name.decode(tarfile.ENCODING) # don't extract absolute paths or ones with .. in them if not name.startswith('/') and '..' not in name.split('/'): prelim_dst = os.path.join(extract_dir, *name.split('/')) From 406885845bdb94abe7c6c63df1f1874e09a36d9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 22:31:54 -0400 Subject: [PATCH 6026/8469] Update changelog. Ref #709. --- CHANGES.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index de70d0413a..9c85be311f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,10 +2,16 @@ CHANGES ======= +v25.1.3 +------- + +* #709: Fix errors when installing a tar.gz sdist that contained + files named with non-ascii characters on Python 2.7. + v25.1.2 ------- -* #704: Fix errors when installing a zip sdist which contained +* #704: Fix errors when installing a zip sdist that contained files named with non-ascii characters on Windows would crash the install when it attempted to clean up the build. * #646: MSVC compatibility - catch errors properly in From 12dc2c65240bb6d609db30a56dbb1fe217771a17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 22:44:45 -0400 Subject: [PATCH 6027/8469] Get six from extern --- setuptools/tests/test_archive_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index 1936d2a572..3f67b2d479 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -1,11 +1,12 @@ # coding: utf-8 -import six +from setuptools.extern import six import pytest from setuptools import archive_util + @pytest.fixture def tarfile_with_unicode(tmpdir): """ From f9b2902f312834ca6676f0b79bedf845c2bc42c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Aug 2016 23:02:27 -0400 Subject: [PATCH 6028/8469] _extract_member needs final_dst to be a native string. Ref #710. --- setuptools/archive_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index a1960be880..6493b448e4 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -8,6 +8,8 @@ import contextlib from distutils.errors import DistutilsError +from setuptools.extern import six + from pkg_resources import ensure_directory, ContextualZipFile @@ -164,6 +166,8 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): if final_dst: if final_dst.endswith(os.sep): final_dst = final_dst[:-1] + if six.PY2: + final_dst = final_dst.encode(tarfile.ENCODING) try: # XXX Ugh tarobj._extract_member(member, final_dst) From b822e86d4b41cd54c12e6d5fdf3f7d00e89bb4d4 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 2 Aug 2016 13:31:38 +0200 Subject: [PATCH 6029/8469] Revert "Ensure that tmpdir is unicode. Fixes #704." This reverts commit 857949575022946cc60c7cd1d0d088246d3f7540. As we can see on https://github.com/pypa/setuptools/issues/709, this breaks many things (easy_install C extensions, all py3.5 tests, run with LANG=C). So instead of fixing in a hurry all new bugs due to this, I propose to revert this commit until all downsides of this change have been investigated. Related bug: https://github.com/pypa/setuptools/issues/709 Related bug: https://github.com/pypa/setuptools/issues/710 Related bug: https://github.com/pypa/setuptools/issues/712 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 4783ce48dc..ae9079d80c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -627,7 +627,7 @@ def check_editable(self, spec): ) def easy_install(self, spec, deps=False): - tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) + tmpdir = tempfile.mkdtemp(prefix="easy_install-") if not self.editable: self.install_site_py() From d12b01679cb0e2e6a3ea1832891614c6ee86095c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 08:54:51 -0400 Subject: [PATCH 6030/8469] Backout 1b8dc8c7ac. Reopens #709. --- setuptools/archive_util.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 6493b448e4..163550927c 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -145,8 +145,6 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): tarobj.chown = lambda *args: None for member in tarobj: name = member.name - if isinstance(name, bytes): - name = name.decode(tarfile.ENCODING) # don't extract absolute paths or ones with .. in them if not name.startswith('/') and '..' not in name.split('/'): prelim_dst = os.path.join(extract_dir, *name.split('/')) From 27e455c506748ad119813f2f8a23d1cc13726100 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 08:55:32 -0400 Subject: [PATCH 6031/8469] Backout f9b2902f312. Reopens #710. --- setuptools/archive_util.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 163550927c..b6411cc548 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -8,8 +8,6 @@ import contextlib from distutils.errors import DistutilsError -from setuptools.extern import six - from pkg_resources import ensure_directory, ContextualZipFile @@ -164,8 +162,6 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): if final_dst: if final_dst.endswith(os.sep): final_dst = final_dst[:-1] - if six.PY2: - final_dst = final_dst.encode(tarfile.ENCODING) try: # XXX Ugh tarobj._extract_member(member, final_dst) From 0d0bc3003b3613318a382ff14917060cda43c9f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 09:25:55 -0400 Subject: [PATCH 6032/8469] Mark tests as xfail. Ref #704 Ref #709 Ref #710. --- setuptools/tests/test_archive_util.py | 1 + setuptools/tests/test_easy_install.py | 1 + 2 files changed, 2 insertions(+) diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index 3f67b2d479..3e679c115f 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -50,6 +50,7 @@ def tarfile_with_unicode(tmpdir): return str(target) +@pytest.mark.xfail(reason="#710 and #712") def test_unicode_files(tarfile_with_unicode, tmpdir): target = tmpdir / 'out' archive_util.unpack_archive(tarfile_with_unicode, six.text_type(target)) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b209490142..9b10c42877 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -172,6 +172,7 @@ def sdist_unicode(self, tmpdir): @pytest.mark.xfail(setuptools.tests.is_ascii, reason="https://github.com/pypa/setuptools/issues/706") + @pytest.mark.xfail(reason="#709 and #710") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 1559cabbaf0bd537767bd0c13d875dc05a13720f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 09:27:50 -0400 Subject: [PATCH 6033/8469] Update changelog --- CHANGES.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9c85be311f..5a2b992885 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,8 +5,9 @@ CHANGES v25.1.3 ------- -* #709: Fix errors when installing a tar.gz sdist that contained - files named with non-ascii characters on Python 2.7. +* #714 and #704: Revert fix as it breaks other components + downstream that can't handle unicode. See #709, #710, + and #712. v25.1.2 ------- From ebe606c6b7925823ac98c7014f1fc61de3274b48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 09:36:46 -0400 Subject: [PATCH 6034/8469] =?UTF-8?q?Bump=20version:=2025.1.2=20=E2=86=92?= =?UTF-8?q?=2025.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b34560df5d..4f08b809b6 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.2 +current_version = 25.1.3 commit = True tag = True diff --git a/setup.py b/setup.py index 202077d1fc..2309b7d2ee 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.2", + version="25.1.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b0d667dbaedf16e77da46f420827d7493ed66d10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 09:36:47 -0400 Subject: [PATCH 6035/8469] Added tag v25.1.3 for changeset 86e668badaf4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fb280fed3e..1b83318553 100644 --- a/.hgtags +++ b/.hgtags @@ -296,3 +296,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 c350190e7bbf274e6728f14af7451b1fd3aaeba2 25.1.2 +86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 From 3f54d45ad832984b0601efe6ff62f6d16a4de2a5 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 2 Aug 2016 18:26:02 +0200 Subject: [PATCH 6036/8469] Patch distutils._msvccompiler.library_dir_option Try to fix #694. --- setuptools/msvc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 6fb3300b06..419b2292c9 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -85,6 +85,11 @@ def patch_for_specialized_compiler(): except Exception: pass + try: + # Patch distutils._msvccompiler.library_dir_option + unpatched['msvc14_library_dir_option'] = msvc14compiler.library_dir_option + msvc14compiler.library_dir_option = msvc14_library_dir_option + def msvc9_find_vcvarsall(version): """ @@ -212,6 +217,12 @@ def msvc14_get_vc_env(plat_spec): raise +def msvc14_library_dir_option(dir): + if ' ' in dir: + dir = '"%s"' % dir + return unpatched['msvc14_library_dir_option'](dir) + + def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user From 2214dbbd6fb407cf2313dba44558557072cf0974 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 2 Aug 2016 18:29:53 +0200 Subject: [PATCH 6037/8469] Update msvc.py --- setuptools/msvc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 419b2292c9..2a746332e7 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -89,6 +89,8 @@ def patch_for_specialized_compiler(): # Patch distutils._msvccompiler.library_dir_option unpatched['msvc14_library_dir_option'] = msvc14compiler.library_dir_option msvc14compiler.library_dir_option = msvc14_library_dir_option + except Exception: + pass def msvc9_find_vcvarsall(version): From 2c4346bcc47ec1fd6fc77bd5bb4f760ed7c6667c Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 2 Aug 2016 18:42:24 +0200 Subject: [PATCH 6038/8469] Update msvc.py --- setuptools/msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2a746332e7..785d879bf8 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -220,7 +220,7 @@ def msvc14_get_vc_env(plat_spec): def msvc14_library_dir_option(dir): - if ' ' in dir: + if ' ' in dir and '"' not in dir: dir = '"%s"' % dir return unpatched['msvc14_library_dir_option'](dir) From 8d1349a2291054d1048c0f1a7180a96817c5f427 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 12:47:41 -0400 Subject: [PATCH 6039/8469] Change order of xfail, giving the unfiltered one precedence. --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 9b10c42877..27d703f5f2 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -170,9 +170,9 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) + @pytest.mark.xfail(reason="#709 and #710") @pytest.mark.xfail(setuptools.tests.is_ascii, reason="https://github.com/pypa/setuptools/issues/706") - @pytest.mark.xfail(reason="#709 and #710") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 6a4e5446c941291ec5e7c56cee1d5a872300c955 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2016 13:10:24 -0400 Subject: [PATCH 6040/8469] Try only applying one xfail. --- setuptools/tests/test_easy_install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 27d703f5f2..da0a355c41 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -171,8 +171,9 @@ def sdist_unicode(self, tmpdir): return str(sdist) @pytest.mark.xfail(reason="#709 and #710") - @pytest.mark.xfail(setuptools.tests.is_ascii, - reason="https://github.com/pypa/setuptools/issues/706") + # also + #@pytest.mark.xfail(setuptools.tests.is_ascii, + # reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 4732c1eb7830b7970ad545f3a4630a824650331b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 2 Aug 2016 20:09:53 +0200 Subject: [PATCH 6041/8469] Fix #707 MSVC patch and Python 2 #707 Fix Python 2 Compatibility, and improve registry lookup (Key may not always be in 64bit registry node). --- setuptools/msvc.py | 67 +++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 6fb3300b06..4616d4beb4 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -356,23 +356,12 @@ class RegistryInfo: def __init__(self, platform_info): self.pi = platform_info - @property - def microsoft(self): - """ - Microsoft software registry key. - """ - return os.path.join( - 'Software', - '' if self.pi.current_is_x86() else 'Wow6432Node', - 'Microsoft', - ) - @property def visualstudio(self): """ Microsoft Visual Studio root registry key. """ - return os.path.join(self.microsoft, 'VisualStudio') + return 'VisualStudio' @property def sxs(self): @@ -400,15 +389,14 @@ def vc_for_python(self): """ Microsoft Visual C++ for Python registry key. """ - path = r'DevDiv\VCForPython' - return os.path.join(self.microsoft, path) + return r'DevDiv\VCForPython' @property def microsoft_sdk(self): """ Microsoft SDK registry key. """ - return os.path.join(self.microsoft, 'Microsoft SDKs') + return 'Microsoft SDKs' @property def windows_sdk(self): @@ -429,11 +417,29 @@ def windows_kits_roots(self): """ Microsoft Windows Kits Roots registry key. """ - return os.path.join(self.microsoft, r'Windows Kits\Installed Roots') + return r'Windows Kits\Installed Roots' + + def microsoft(self, key, x86=False): + """ + Return key in Microsoft software registry. + + Parameters + ---------- + key: str + Registry key path where look. + x86: str + Force x86 software registry. + + Return + ------ + str: value + """ + node64 = '' if self.pi.current_is_x86() or x86 else r'\Wow6432Node' + return os.path.join('Software', node64, 'Microsoft', key) def lookup(self, key, name): """ - Look for values in registry. + Look for values in registry in Microsoft software registry. Parameters ---------- @@ -446,18 +452,23 @@ def lookup(self, key, name): ------ str: value """ + KEY_READ = winreg.KEY_READ + openkey = winreg.OpenKey + ms = self.microsoft for hkey in self.HKEYS: try: - bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) - except OSError: - continue - except IOError: - continue + bkey = openkey(hkey, ms(key), 0, KEY_READ) + except (OSError, IOError): + if not self.pi.current_is_x86(): + try: + bkey = openkey(hkey, ms(key, True), 0, KEY_READ) + except (OSError, IOError): + continue + else: + continue try: return winreg.QueryValueEx(bkey, name)[0] - except OSError: - pass - except IOError: + except (OSError, IOError): pass @@ -500,7 +511,7 @@ def find_available_vc_vers(self): for key in vckeys: try: bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) - except IOError: + except (OSError, IOError): continue subkeys, values, _ = winreg.QueryInfoKey(bkey) for i in range(values): @@ -813,7 +824,7 @@ def VCIncludes(self): Microsoft Visual C++ & Microsoft Foundation Class Includes """ return [os.path.join(self.si.VCInstallDir, 'Include'), - os.path.join(self.si.VCInstallDir, 'ATLMFC\Include')] + os.path.join(self.si.VCInstallDir, r'ATLMFC\Include')] @property def VCLibraries(self): @@ -1199,5 +1210,5 @@ def _get_content_dirname(self, path): if name: return '%s\\' % name[0] return '' - except IOError: + except (OSError, IOError): return '' From 3ebd9363b715b4dd1a0aa1d89a596d08e4b41d84 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 2 Aug 2016 20:11:25 +0200 Subject: [PATCH 6042/8469] Update test_msvc.py --- setuptools/tests/test_msvc.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 8c7e17d3c1..14e0f208aa 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -73,8 +73,6 @@ def test_patched(self): mod_name = distutils.msvc9compiler.find_vcvarsall.__module__ assert mod_name == "setuptools.msvc", "find_vcvarsall unpatched" - @pytest.mark.xfail(six.PY2, - reason="https://github.com/pypa/setuptools/issues/707") def test_no_registry_entries_means_nothing_found(self): """ No registry entries or environment variable should lead to an error From c3f23f70001777fd66c7c33b9101bb114540a53a Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Wed, 3 Aug 2016 11:18:26 +0200 Subject: [PATCH 6043/8469] Issue #20767: Fix -R option for FreeBSD/clang. --- unixccompiler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unixccompiler.py b/unixccompiler.py index 92d14dfee7..3f321c28dc 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -227,6 +227,8 @@ def runtime_library_dir_option(self, dir): if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir + elif sys.platform[:7] == "freebsd": + return "-Wl,-rpath=" + dir elif sys.platform[:5] == "hp-ux": if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] From de46545db087dc81ea24d2a8695f8fe6ff6a0c78 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 2 Aug 2016 12:13:41 +0200 Subject: [PATCH 6044/8469] Fix _have_cython In 3c047624, we remove the loop, but we miss to convert the tuple to a string. Because the exception is just ignored, we don't see that __import__ won't works --- setuptools/extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index 5ea72c060d..6b9c19f8b6 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -19,7 +19,7 @@ def _have_cython(): """ Return True if Cython can be imported. """ - cython_impl = 'Cython.Distutils.build_ext', + cython_impl = 'Cython.Distutils.build_ext' try: # from (cython_impl) import build_ext __import__(cython_impl, fromlist=['build_ext']).build_ext From 18c0fdab26ba13a9cf142408d7f1f2566be21fa7 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Wed, 3 Aug 2016 13:55:56 +0200 Subject: [PATCH 6045/8469] Fix logging using arguments instead of formatter --- setuptools/command/bdist_egg.py | 14 +++++++------- setuptools/package_index.py | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 50744b87d4..cbea7537e2 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -129,7 +129,7 @@ def do_install_data(self): self.distribution.data_files.append(item) try: - log.info("installing package data to %s" % self.bdist_dir) + log.info("installing package data to %s", self.bdist_dir) self.call_command('install_data', force=0, root=None) finally: self.distribution.data_files = old @@ -152,7 +152,7 @@ def run(self): self.run_command("egg_info") # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. - log.info("installing library code to %s" % self.bdist_dir) + log.info("installing library code to %s", self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root instcmd.root = None @@ -169,7 +169,7 @@ def run(self): pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py') self.stubs.append(pyfile) - log.info("creating stub loader for %s" % ext_name) + log.info("creating stub loader for %s", ext_name) if not self.dry_run: write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) @@ -186,14 +186,14 @@ def run(self): self.mkpath(egg_info) if self.distribution.scripts: script_dir = os.path.join(egg_info, 'scripts') - log.info("installing scripts to %s" % script_dir) + log.info("installing scripts to %s", script_dir) self.call_command('install_scripts', install_dir=script_dir, no_ep=1) self.copy_metadata_to(egg_info) native_libs = os.path.join(egg_info, "native_libs.txt") if all_outputs: - log.info("writing %s" % native_libs) + log.info("writing %s", native_libs) if not self.dry_run: ensure_directory(native_libs) libs_file = open(native_libs, 'wt') @@ -201,7 +201,7 @@ def run(self): libs_file.write('\n') libs_file.close() elif os.path.isfile(native_libs): - log.info("removing %s" % native_libs) + log.info("removing %s", native_libs) if not self.dry_run: os.unlink(native_libs) @@ -458,7 +458,7 @@ def visit(z, dirname, names): p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) - log.debug("adding '%s'" % p) + log.debug("adding '%s'", p) compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8d965f4902..9ef782cbc6 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1038,8 +1038,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): cred = PyPIConfig().find_credential(url) if cred: auth = str(cred) - info = cred.username, url - log.info('Authenticating as %s for %s (from .pypirc)' % info) + log.info('Authenticating as %s for %s (from .pypirc)', cred.username, url) if auth: auth = "Basic " + _encode_auth(auth) From 651e3ffacb4208469e97a4eeaba623f5413daa7d Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Wed, 3 Aug 2016 20:15:55 +0200 Subject: [PATCH 6046/8469] Fix from @vallsv Fix from @vallsv --- setuptools/msvc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 785d879bf8..3e2472a281 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -87,8 +87,8 @@ def patch_for_specialized_compiler(): try: # Patch distutils._msvccompiler.library_dir_option - unpatched['msvc14_library_dir_option'] = msvc14compiler.library_dir_option - msvc14compiler.library_dir_option = msvc14_library_dir_option + unpatched['msvc14_library_dir_option'] = msvc14compiler.MSVCCompiler.library_dir_option + msvc14compiler.MSVCCompiler.library_dir_option = msvc14_library_dir_option except Exception: pass @@ -219,10 +219,10 @@ def msvc14_get_vc_env(plat_spec): raise -def msvc14_library_dir_option(dir): +def msvc14_library_dir_option(self, dir): if ' ' in dir and '"' not in dir: dir = '"%s"' % dir - return unpatched['msvc14_library_dir_option'](dir) + return unpatched['msvc14_library_dir_option'](self, dir) def _augment_exception(exc, version, arch=''): From e639c9f681154bb0e5530543beefd015040406ac Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 3 Aug 2016 18:43:38 -0400 Subject: [PATCH 6047/8469] Switch upload.pypi.io to upload.pypi.org --- config.py | 2 +- tests/test_config.py | 4 ++-- tests/test_upload.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.py b/config.py index 9b06d7699e..96469ca91c 100644 --- a/config.py +++ b/config.py @@ -21,7 +21,7 @@ class PyPIRCCommand(Command): """Base command that knows how to handle the .pypirc file """ - DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/' + DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/' DEFAULT_REALM = 'pypi' repository = None realm = None diff --git a/tests/test_config.py b/tests/test_config.py index c37381550d..8286e1d9ac 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -87,7 +87,7 @@ def test_server_registration(self): config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://upload.pypi.io/legacy/'), + ('repository', 'https://upload.pypi.org/legacy/'), ('server', 'server1'), ('username', 'me')] self.assertEqual(config, waited) @@ -96,7 +96,7 @@ def test_server_registration(self): config = cmd._read_pypirc() config = list(sorted(config.items())) waited = [('password', 'secret'), ('realm', 'pypi'), - ('repository', 'https://upload.pypi.io/legacy/'), + ('repository', 'https://upload.pypi.org/legacy/'), ('server', 'server-login'), ('username', 'tarek')] self.assertEqual(config, waited) diff --git a/tests/test_upload.py b/tests/test_upload.py index 5a462e5a94..1402343e0a 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -127,7 +127,7 @@ def test_upload(self): self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') self.assertEqual(self.last_open.req.get_full_url(), - 'https://upload.pypi.io/legacy/') + 'https://upload.pypi.org/legacy/') self.assertIn(b'xxx', self.last_open.req.data) # The PyPI response body was echoed From a2605b297c147a1ad54078181d32fe369fa4f37d Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Wed, 3 Aug 2016 21:55:39 -0400 Subject: [PATCH 6048/8469] use abi3 extension if Extension().is_abi3 --- setuptools/command/build_ext.py | 13 +++++++++++++ setuptools/extension.py | 4 ++++ setuptools/tests/test_build_ext.py | 20 +++++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index e6db0764e8..dad2899913 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,6 +59,14 @@ def _customize_compiler_for_shlib(compiler): if_dl = lambda s: s if have_rtld else '' +def get_abi3_suffix(): + """Return the file extension for an abi3-compliant Extension()""" + import imp + for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): + if '.abi3' in suffix: # Unix + return suffix + elif suffix == '.pyd': # Windows + return suffix class build_ext(_build_ext): @@ -96,6 +104,11 @@ def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] + if sys.version_info[0] != 2 and getattr(ext, 'is_abi3'): + from distutils.sysconfig import get_config_var + so_ext = get_config_var('SO') + filename = filename[:-len(so_ext)] + filename = filename + get_abi3_suffix() if isinstance(ext, Library): fn, ext = os.path.splitext(filename) return self.shlib_compiler.library_filename(fn, libtype) diff --git a/setuptools/extension.py b/setuptools/extension.py index 5ea72c060d..a6cc091512 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -36,6 +36,10 @@ def _have_cython(): class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" + def __init__(self, name, sources, is_abi3=False, **kw): + self.is_abi3 = is_abi3 + _Extension.__init__(self, name, sources, **kw) + def _convert_pyx_sources_to_lang(self): """ Replace sources with .pyx extensions to sources with the target diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 5168ebf05b..e0f2e73b20 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,8 +1,10 @@ +import sys import distutils.command.build_ext as orig +from distutils.sysconfig import get_config_var from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution - +from setuptools.extension import Extension class TestBuildExt: @@ -18,3 +20,19 @@ def test_get_ext_filename(self): res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted + + def test_abi3_filename(self): + """ + Filename needs to be loadable by several versions + of Python 3 if 'is_abi3' is truthy on Extension() + """ + dist = Distribution(dict(ext_modules=[Extension('spam.eggs', [], is_abi3=True)])) + cmd = build_ext(dist) + res = cmd.get_ext_filename('spam.eggs') + + if sys.version_info[0] == 2: + assert res.endswith(get_config_var('SO')) + elif sys.platform == 'win32': + assert res.endswith('eggs.pyd') + else: + assert 'abi3' in res \ No newline at end of file From 5f3dac49084b38a248682475635f866e795f484c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 3 Aug 2016 22:08:08 -0400 Subject: [PATCH 6049/8469] In package_index, reindent long lines. --- setuptools/package_index.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9ef782cbc6..82cd608f55 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -290,7 +290,12 @@ def __init__( self.package_pages = {} self.allows = re.compile('|'.join(map(translate, hosts))).match self.to_scan = [] - if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()): + use_ssl = ( + verify_ssl + and ssl_support.is_available + and (ca_bundle or ssl_support.find_ca_bundle()) + ) + if use_ssl: self.opener = ssl_support.opener_for(ca_bundle) else: self.opener = urllib.request.urlopen @@ -320,7 +325,8 @@ def process_url(self, url, retrieve=False): self.info("Reading %s", url) self.fetched_urls[url] = True # prevent multiple fetch attempts - f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url) + tmpl = "Download error on %s: %%s -- Some packages may not be found!" + f = self.open_url(url, tmpl % url) if f is None: return self.fetched_urls[f.url] = True @@ -362,7 +368,8 @@ def process_filename(self, fn, nested=False): def url_ok(self, url, fatal=False): s = URL_SCHEME(url) - if (s and s.group(1).lower() == 'file') or self.allows(urllib.parse.urlparse(url)[1]): + is_file = s and s.group(1).lower() == 'file' + if is_file or self.allows(urllib.parse.urlparse(url)[1]): return True msg = ("\nNote: Bypassing %s (disallowed host; see " "http://bit.ly/1dg9ijs for details).\n") @@ -1038,7 +1045,8 @@ def open_with_auth(url, opener=urllib.request.urlopen): cred = PyPIConfig().find_credential(url) if cred: auth = str(cred) - log.info('Authenticating as %s for %s (from .pypirc)', cred.username, url) + info = cred.username, url + log.info('Authenticating as %s for %s (from .pypirc)', *info) if auth: auth = "Basic " + _encode_auth(auth) From 7b1fa7643e2599f24956323a2066a6e26dc57b82 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Thu, 4 Aug 2016 12:22:54 +0200 Subject: [PATCH 6050/8469] doc for msvc14_library_dir_option --- setuptools/msvc.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 3e2472a281..da26371ca3 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -86,7 +86,7 @@ def patch_for_specialized_compiler(): pass try: - # Patch distutils._msvccompiler.library_dir_option + # Patch distutils._msvccompiler.MSVCCompiler.library_dir_option unpatched['msvc14_library_dir_option'] = msvc14compiler.MSVCCompiler.library_dir_option msvc14compiler.MSVCCompiler.library_dir_option = msvc14_library_dir_option except Exception: @@ -220,7 +220,21 @@ def msvc14_get_vc_env(plat_spec): def msvc14_library_dir_option(self, dir): + """ + Patched "distutils._msvccompiler.MSVCCompiler.library_dir_option" + to fix unquoted path in "\LIBPATH" argument when a space is on path. + + Parameters + ---------- + dir: str + Path to convert in "\LIBPATH" argument. + + Return + ------ + "\LIBPATH" argument: str + """ if ' ' in dir and '"' not in dir: + # Quote if space and not already quoted dir = '"%s"' % dir return unpatched['msvc14_library_dir_option'](self, dir) From a60816441e9b185a09f1dacdb2d5612d9a324787 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Aug 2016 07:11:07 -0400 Subject: [PATCH 6051/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5a2b992885..eda524766c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v25.1.4 +------- + +* #717 +* #713 +* #707 via #715 + v25.1.3 ------- From b8bb34bbe89baec3dee225eeb7e17951578f5368 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Aug 2016 07:11:14 -0400 Subject: [PATCH 6052/8469] =?UTF-8?q?Bump=20version:=2025.1.3=20=E2=86=92?= =?UTF-8?q?=2025.1.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4f08b809b6..ae67632a0b 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.3 +current_version = 25.1.4 commit = True tag = True diff --git a/setup.py b/setup.py index 2309b7d2ee..d7933ab34d 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.3", + version="25.1.4", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From eb4a2e50b292fc9ce1cc2a55bf3a18fc303b4c24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Aug 2016 07:11:15 -0400 Subject: [PATCH 6053/8469] Added tag v25.1.4 for changeset 6f55250b9c58 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1b83318553..9eb5938644 100644 --- a/.hgtags +++ b/.hgtags @@ -297,3 +297,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 c350190e7bbf274e6728f14af7451b1fd3aaeba2 25.1.2 86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 +6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 From aa835dcab3b98944c928a73eab8b091479514155 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Aug 2016 13:13:37 -0400 Subject: [PATCH 6054/8469] Collapse two functions into one. --- pkg_resources/__init__.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 9f0ea6ec5c..2a053b509e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1468,16 +1468,11 @@ def has_resource(self, resource_name): def has_metadata(self, name): return self.egg_info and self._has(self._fn(self.egg_info, name)) - if sys.version_info <= (3,): - def get_metadata(self, name): - if not self.egg_info: - return "" - return self._get(self._fn(self.egg_info, name)) - else: - def get_metadata(self, name): - if not self.egg_info: - return "" - return self._get(self._fn(self.egg_info, name)).decode("utf-8") + def get_metadata(self, name): + if not self.egg_info: + return "" + value = self._get(self._fn(self.egg_info, name)) + return value.decode('utf-8') if six.PY3 else value def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) From 21efdb5615f98a60cfa0b6130a1c2d93e5faa28e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Aug 2016 13:14:45 -0400 Subject: [PATCH 6055/8469] Allow an environment to suppress errors when reading metadata by setting PKG_RESOURCES_METADATA_ERRORS='replace'. Ref #719. --- pkg_resources/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2a053b509e..b402ddd693 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1859,7 +1859,9 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': - with io.open(self.path, encoding='utf-8') as f: + env_key = 'PKG_RESOURCES_METADATA_ERRORS' + errors = os.environ.get(env_key, 'strict') + with io.open(self.path, encoding='utf-8', errors=errors) as f: try: metadata = f.read() except UnicodeDecodeError as exc: From dcf1cef2ed47f923c873cef9ea42727cfb819c7d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 4 Aug 2016 18:46:15 -0400 Subject: [PATCH 6056/8469] setup.py: Bump `certifi` to version `2016.8.2`. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d7933ab34d..ca3cf4058a 100755 --- a/setup.py +++ b/setup.py @@ -167,11 +167,11 @@ def pypi_link(pkg_filename): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2016.2.28", + "certs": "certifi==2016.8.2", }, dependency_links=[ pypi_link( - 'certifi-2016.2.28.tar.gz#md5=5d672aa766e1f773c75cfeccd02d3650', + 'certifi-2016.8.2.tar.gz#md5=004ae166985d3a684bcac5368e22ed63', ), pypi_link( 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', From e3805614a5ed770d3ba86acd339a24947c19a65b Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 5 Aug 2016 12:58:47 +0200 Subject: [PATCH 6057/8469] quote library_dir_option after calling unpatched version avoids double-quotes if the calling function does the quoting correctly. --- setuptools/msvc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2700a2b066..97dd441c5c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -233,10 +233,11 @@ def msvc14_library_dir_option(self, dir): ------ "\LIBPATH" argument: str """ - if ' ' in dir and '"' not in dir: + opt = unpatched['msvc14_library_dir_option'](self, dir) + if ' ' in opt and '"' not in opt: # Quote if space and not already quoted - dir = '"%s"' % dir - return unpatched['msvc14_library_dir_option'](self, dir) + opt = '"%s"' % opt + return opt def _augment_exception(exc, version, arch=''): From dab253cb72eb7c098393f985e32585e079607f66 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 5 Aug 2016 07:45:09 -0400 Subject: [PATCH 6058/8469] call finalize_options in test --- setuptools/tests/test_build_ext.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index e0f2e73b20..c71aadca8f 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -2,7 +2,7 @@ import distutils.command.build_ext as orig from distutils.sysconfig import get_config_var -from setuptools.command.build_ext import build_ext +from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution from setuptools.extension import Extension @@ -26,8 +26,13 @@ def test_abi3_filename(self): Filename needs to be loadable by several versions of Python 3 if 'is_abi3' is truthy on Extension() """ - dist = Distribution(dict(ext_modules=[Extension('spam.eggs', [], is_abi3=True)])) + print(get_abi3_suffix()) + + extension = Extension('spam.eggs', ['eggs.c'], is_abi3=True) + dist = Distribution(dict(ext_modules=[extension])) cmd = build_ext(dist) + cmd.finalize_options() + assert 'spam.eggs' in cmd.ext_map res = cmd.get_ext_filename('spam.eggs') if sys.version_info[0] == 2: From 702a4277768f0781e3d0a4cf770d29621f7f2cc3 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 5 Aug 2016 07:55:57 -0400 Subject: [PATCH 6059/8469] rename is_abi3 to py_limited_api --- setuptools/command/build_ext.py | 4 +++- setuptools/extension.py | 4 ++-- setuptools/tests/test_build_ext.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index dad2899913..7bb4d24c8c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -104,7 +104,9 @@ def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if sys.version_info[0] != 2 and getattr(ext, 'is_abi3'): + if (sys.version_info[0] != 2 + and getattr(ext, 'py_limited_api') + and get_abi3_suffix()): from distutils.sysconfig import get_config_var so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] diff --git a/setuptools/extension.py b/setuptools/extension.py index a6cc091512..c8e9bc7db6 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -36,8 +36,8 @@ def _have_cython(): class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" - def __init__(self, name, sources, is_abi3=False, **kw): - self.is_abi3 = is_abi3 + def __init__(self, name, sources, py_limited_api=False, **kw): + self.py_limited_api = py_limited_api _Extension.__init__(self, name, sources, **kw) def _convert_pyx_sources_to_lang(self): diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index c71aadca8f..100869f6a2 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -28,7 +28,7 @@ def test_abi3_filename(self): """ print(get_abi3_suffix()) - extension = Extension('spam.eggs', ['eggs.c'], is_abi3=True) + extension = Extension('spam.eggs', ['eggs.c'], py_limited_api=True) dist = Distribution(dict(ext_modules=[extension])) cmd = build_ext(dist) cmd.finalize_options() From 0a3f850b3bc6c888f0f8810e453e664f9fd320f6 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 5 Aug 2016 08:01:58 -0400 Subject: [PATCH 6060/8469] gate test against get_abi3_suffix() --- setuptools/tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 100869f6a2..f2e1f59dbc 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -35,7 +35,7 @@ def test_abi3_filename(self): assert 'spam.eggs' in cmd.ext_map res = cmd.get_ext_filename('spam.eggs') - if sys.version_info[0] == 2: + if sys.version_info[0] == 2 or not get_abi3_suffix(): assert res.endswith(get_config_var('SO')) elif sys.platform == 'win32': assert res.endswith('eggs.pyd') From 9d60e5d491298f36a5de33c60c462d1a900844e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 10:30:46 -0400 Subject: [PATCH 6061/8469] Forget the environment variable, and just log a warning when a metadata can't be decoded. Ref #719. --- pkg_resources/__init__.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b402ddd693..7dbd13a679 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1,3 +1,5 @@ +# coding: utf-8 + """ Package resource API -------------------- @@ -1859,19 +1861,19 @@ def has_metadata(self, name): def get_metadata(self, name): if name=='PKG-INFO': - env_key = 'PKG_RESOURCES_METADATA_ERRORS' - errors = os.environ.get(env_key, 'strict') - with io.open(self.path, encoding='utf-8', errors=errors) as f: - try: - metadata = f.read() - except UnicodeDecodeError as exc: - # add path context to error message - tmpl = " in {self.path}" - exc.reason += tmpl.format(self=self) - raise + with io.open(self.path, encoding='utf-8', errors="replace") as f: + metadata = f.read() + self._warn_on_replacement(metadata) return metadata raise KeyError("No metadata except PKG-INFO is available") + def _warn_on_replacement(self, metadata): + replacement_char = '�' + if replacement_char in metadata: + tmpl = "{self.path} could not be properly decoded in UTF-8" + msg = tmpl.format(**locals()) + warnings.warn(msg) + def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) From 09cbf5e63f5c9e84438cf69711a7a6b767106506 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 10:41:12 -0400 Subject: [PATCH 6062/8469] Restore Python 2 compatibility. Ref #719. --- pkg_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7dbd13a679..94afaaf74d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1868,7 +1868,8 @@ def get_metadata(self, name): raise KeyError("No metadata except PKG-INFO is available") def _warn_on_replacement(self, metadata): - replacement_char = '�' + # Python 2.6 and 3.2 compat for: replacement_char = '�' + replacement_char = b'\xef\xbf\xbd'.decode('utf-8') if replacement_char in metadata: tmpl = "{self.path} could not be properly decoded in UTF-8" msg = tmpl.format(**locals()) From cadadb03546aced58233be95683a2674627ca899 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 10:43:58 -0400 Subject: [PATCH 6063/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index eda524766c..07f0d191d9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v25.1.5 +------- + +* #720 +* #723 + v25.1.4 ------- From cf36cf1e47f4a4dda14297ce8612d19faade4ccb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 11:09:33 -0400 Subject: [PATCH 6064/8469] Correct tag for v25.1.2 --- .hgtags | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.hgtags b/.hgtags index 9eb5938644..4eaae61de9 100644 --- a/.hgtags +++ b/.hgtags @@ -295,6 +295,6 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 -c350190e7bbf274e6728f14af7451b1fd3aaeba2 25.1.2 +c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 From 0fc25ba55daa069374812e33897c712553fdc3f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 11:12:50 -0400 Subject: [PATCH 6065/8469] =?UTF-8?q?Bump=20version:=2025.1.4=20=E2=86=92?= =?UTF-8?q?=2025.1.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ae67632a0b..3fad1dbca2 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.4 +current_version = 25.1.5 commit = True tag = True diff --git a/setup.py b/setup.py index ca3cf4058a..67891be2e0 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.4", + version="25.1.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 409e1383315ef3f5f2f074b5d95a0bd9c2d66cdf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 11:12:51 -0400 Subject: [PATCH 6066/8469] Added tag v25.1.5 for changeset 76143bb477b5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4eaae61de9..bff7e77e4d 100644 --- a/.hgtags +++ b/.hgtags @@ -298,3 +298,4 @@ dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 +76143bb477b50314ab6f4ccc4ced80ee43f0dc94 v25.1.5 From a5791ac002d9d00759b63727f9c930a2acba7d9f Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Fri, 5 Aug 2016 17:44:26 +0200 Subject: [PATCH 6067/8469] revert `library_dir_option` patch. Revert patch on `distutils._msvccompiler.MSVCCompiler.library_dir_option` See comments on #694. --- setuptools/msvc.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 97dd441c5c..4616d4beb4 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -85,13 +85,6 @@ def patch_for_specialized_compiler(): except Exception: pass - try: - # Patch distutils._msvccompiler.MSVCCompiler.library_dir_option - unpatched['msvc14_library_dir_option'] = msvc14compiler.MSVCCompiler.library_dir_option - msvc14compiler.MSVCCompiler.library_dir_option = msvc14_library_dir_option - except Exception: - pass - def msvc9_find_vcvarsall(version): """ @@ -219,27 +212,6 @@ def msvc14_get_vc_env(plat_spec): raise -def msvc14_library_dir_option(self, dir): - """ - Patched "distutils._msvccompiler.MSVCCompiler.library_dir_option" - to fix unquoted path in "\LIBPATH" argument when a space is on path. - - Parameters - ---------- - dir: str - Path to convert in "\LIBPATH" argument. - - Return - ------ - "\LIBPATH" argument: str - """ - opt = unpatched['msvc14_library_dir_option'](self, dir) - if ' ' in opt and '"' not in opt: - # Quote if space and not already quoted - opt = '"%s"' % opt - return opt - - def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user From 79d4a0c6ef679e0b29e00ed854d06deb355c89e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 12:07:32 -0400 Subject: [PATCH 6068/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 07f0d191d9..3077f39dcc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v25.1.6 +------- + +* #725 + v25.1.5 ------- From 38fce51e389f9e7872f4e8062f854e442ef4d75f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 12:07:38 -0400 Subject: [PATCH 6069/8469] =?UTF-8?q?Bump=20version:=2025.1.5=20=E2=86=92?= =?UTF-8?q?=2025.1.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3fad1dbca2..ae2125f852 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.5 +current_version = 25.1.6 commit = True tag = True diff --git a/setup.py b/setup.py index 67891be2e0..d0c50bd663 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.5", + version="25.1.6", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 1b2e94943653960347936bba0eff54cb8dbfc638 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Aug 2016 12:07:39 -0400 Subject: [PATCH 6070/8469] Added tag v25.1.6 for changeset 2db4c66aeae4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bff7e77e4d..19ccb0e4e4 100644 --- a/.hgtags +++ b/.hgtags @@ -299,3 +299,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 76143bb477b50314ab6f4ccc4ced80ee43f0dc94 v25.1.5 +2db4c66aeae47217aaf92099a9875e9e810c9cbb v25.1.6 From 29c8385814335e91538d76b68578b6c0ab483c1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Aug 2016 14:39:07 -0400 Subject: [PATCH 6071/8469] Update upload target --- .travis.yml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 32b664d878..ed077d9460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_deploy: deploy: provider: pypi # Also update server in setup.cfg - server: https://upload.pypi.io/legacy/ + server: https://upload.pypi.org/legacy/ on: tags: true all_branches: true diff --git a/setup.cfg b/setup.cfg index ae2125f852..77b731d937 100755 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ binary = bdist_egg upload --show-response test = pytest [upload] -repository = https://upload.pypi.io/legacy/ +repository = https://upload.pypi.org/legacy/ [sdist] formats = gztar zip From 838395475ceafc0287b49b1b6d00cd589417acb0 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Fri, 12 Aug 2016 07:44:46 -0500 Subject: [PATCH 6072/8469] Add LICENSE file for expectant auditors The classifier in setup.py should be enough for most auditors, but some have automated tooling that checks for LICENSE files and reads those. This helps all auditors (downstream redistributors and users) who can not just rely on the classifier. Related to #612 --- CHANGES.rst | 6 ++++++ LICENSE | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 LICENSE diff --git a/CHANGES.rst b/CHANGES.rst index 3077f39dcc..f52053399b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v25.2.0 +------- + +* #612 via #730: Add a LICENSE file which needs to be provided by the terms of + the MIT license. + v25.1.6 ------- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..6e0693b4b0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2016 Jason R Coombs + +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. From 043bf1e726b8a59f88c6d3120c350b9d31677876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Aug 2016 15:05:16 -0400 Subject: [PATCH 6073/8469] =?UTF-8?q?Bump=20version:=2025.1.6=20=E2=86=92?= =?UTF-8?q?=2025.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 77b731d937..92fd835400 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.1.6 +current_version = 25.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index d0c50bd663..fa82f3609b 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.1.6", + version="25.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From c5d5d63262ad9e44b6d51a0b486c7d288c65b2ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Aug 2016 15:05:17 -0400 Subject: [PATCH 6074/8469] Added tag v25.2.0 for changeset 2083d7c3fadc --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 19ccb0e4e4..75a9fb0899 100644 --- a/.hgtags +++ b/.hgtags @@ -300,3 +300,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 76143bb477b50314ab6f4ccc4ced80ee43f0dc94 v25.1.5 2db4c66aeae47217aaf92099a9875e9e810c9cbb v25.1.6 +2083d7c3fadcf15b3bc07f7532440efbcf8fd18d v25.2.0 From c3b6f615a61533779754c014b71f4db4761574fa Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Sat, 13 Aug 2016 10:59:01 +0300 Subject: [PATCH 6075/8469] bump certifi to 2016.8.8 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index fa82f3609b..5fa237d575 100755 --- a/setup.py +++ b/setup.py @@ -167,11 +167,11 @@ def pypi_link(pkg_filename): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2016.8.2", + "certs": "certifi==2016.8.8", }, dependency_links=[ pypi_link( - 'certifi-2016.8.2.tar.gz#md5=004ae166985d3a684bcac5368e22ed63', + 'certifi-2016.8.8.tar.gz#md5=b57513f7670482da45bb350b792f659e', ), pypi_link( 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', From 7c7a24d130ee00344a41115cbacd1b0d2147d983 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Aug 2016 11:22:08 -0400 Subject: [PATCH 6076/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f52053399b..bffad4c570 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v25.3.0 +------- + +#731: Bump certifi. + v25.2.0 ------- From b432bcae27cadc91a7df4ee4851a41ccb0674bf9 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Sun, 14 Aug 2016 08:06:59 +0200 Subject: [PATCH 6077/8469] Update tox.ini envlist to match supported Pythons Pythons 3.1, 3.2 are no longer supported, but Python 3.5, Pypy, and Pypy3 are. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9061869fd2..8c09e7df18 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py31,py32,py33,py34 +envlist = py26,py27,py33,py34,py35,pypy,pypy3 [testenv] commands=python setup.py test From f47bc22fc59d6262ece42722e3a502c672f0558f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 14 Aug 2016 20:40:18 -0400 Subject: [PATCH 6078/8469] Include the license in sdists and similar packagings. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index cfd1b00108..e25a5ea577 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,6 +7,7 @@ recursive-include pkg_resources *.py *.txt include *.py include *.rst include MANIFEST.in +include LICENSE include launcher.c include msvc-build-launcher.cmd include pytest.ini From 853a9df48cc056a07e17511a2b65918af9605bbc Mon Sep 17 00:00:00 2001 From: Ofekmeister Date: Tue, 16 Aug 2016 02:12:38 -0400 Subject: [PATCH 6079/8469] Fix issue #459 Patched sys.argv[0] before loading entry point --- setuptools/command/easy_install.py | 2 ++ setuptools/tests/test_easy_install.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ae9079d80c..e2a7dc46c9 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2022,6 +2022,8 @@ class ScriptWriter(object): from pkg_resources import load_entry_point if __name__ == '__main__': + import re + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() ) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index da0a355c41..a4b1dfd528 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -78,6 +78,8 @@ def test_get_script_args(self): from pkg_resources import load_entry_point if __name__ == '__main__': + import re + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) From 5e1693d225b2416712e11da591f60c085ce62957 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 16 Aug 2016 12:43:16 +0200 Subject: [PATCH 6080/8469] numpy.distutils and distutils._msvccompiler compatibility - Fix compatibility between `numpy.distutils` and `distutils._msvccompiler`. See #728 : Setuptools 24 `msvc.py` improvement import `distutils._msvccompiler` (New Python 3.5 C compiler for MSVC >= 14), but this one is not compatible with `numpy.distutils` (because not patched with `numpy.distutils.ccompiler.gen_lib_options`) and return unquoted libpaths when linking. The problem was patched in Numpy, but need to be patched also in Setuptools for compatibility between older versions of Numpy and `distutils._msvccompiler` (and indirectly Setuptools > 24). - Replace some residuals `except Exception`. --- setuptools/msvc.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 4616d4beb4..bd486fa12f 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -75,14 +75,23 @@ def patch_for_specialized_compiler(): msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall - except Exception: + except NameError: pass try: # Patch distutils._msvccompiler._get_vc_env unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env msvc14compiler._get_vc_env = msvc14_get_vc_env - except Exception: + except NameError: + pass + + try: + # Apply "gen_lib_options" patch from Numpy to "distutils._msvccompiler" + # to fix compatibility between "numpy.distutils" and + # "distutils._msvccompiler" (for Numpy < 1.11.2) + import numpy.distutils as np_distutils + msvc14compiler.gen_lib_options = np_distutils.ccompiler.gen_lib_options + except (ImportError, NameError): pass @@ -243,7 +252,8 @@ 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'http://landinghub.visualstudio.com/' + 'visual-cpp-build-tools') exc.args = (message, ) From 4c2b0a2d9c19218086b5a6ecb837403bd5bb8135 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 16 Aug 2016 12:55:19 +0200 Subject: [PATCH 6081/8469] Add history for unquoted libpaths problem --- CHANGES.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bffad4c570..9f098df907 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v25.3.1 +------- + +* #739 Fix unquoted libpaths by fixing compatibility between `numpy.distutils` and `distutils._msvccompiler` for numpy < 1.11.2 (Fix issue #728, error also fixed in Numpy). + v25.3.0 ------- @@ -16,20 +21,21 @@ v25.2.0 v25.1.6 ------- -* #725 +* #725: revert `library_dir_option` patch (Error is related to `numpy.distutils` and make errors on non Numpy users). v25.1.5 ------- * #720 -* #723 +* #723: Improve patch for `library_dir_option`. v25.1.4 ------- * #717 * #713 -* #707 via #715 +* #707: Fix Python 2 compatibility for MSVC by catching errors properly. +* #715: Fix unquoted libpaths by patching `library_dir_option`. v25.1.3 ------- From 38d6743427f0aa31eaf2eb07df5cd11b6526d036 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 16 Aug 2016 19:12:42 +0200 Subject: [PATCH 6082/8469] Patch with numpy at execution time and not at import time --- setuptools/msvc.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index bd486fa12f..4646d83f95 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -79,19 +79,17 @@ def patch_for_specialized_compiler(): pass try: - # Patch distutils._msvccompiler._get_vc_env + # Patch distutils._msvccompiler._get_vc_env for numpy compatibility unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env msvc14compiler._get_vc_env = msvc14_get_vc_env except NameError: pass try: - # Apply "gen_lib_options" patch from Numpy to "distutils._msvccompiler" - # to fix compatibility between "numpy.distutils" and - # "distutils._msvccompiler" (for Numpy < 1.11.2) - import numpy.distutils as np_distutils - msvc14compiler.gen_lib_options = np_distutils.ccompiler.gen_lib_options - except (ImportError, NameError): + # Patch distutils._msvccompiler.gen_lib_options + unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options + msvc14compiler.gen_lib_options = msvc14_gen_lib_options + except NameError: pass @@ -221,6 +219,19 @@ def msvc14_get_vc_env(plat_spec): raise +def msvc14_gen_lib_options(*args, **kwargs): + """ + Patched "distutils._msvccompiler.gen_lib_options" for fix + compatibility between "numpy.distutils" and "distutils._msvccompiler" + (for Numpy < 1.11.2) + """ + if "numpy" in distutils.ccompiler.CCompiler.spawn.__module__: + import numpy as np + return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) + else: + return unpatched['msvc14_gen_lib_options'](*args, **kwargs) + + def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user From f5802f369d5b7b76a7feb4c49e2e49840058bf3b Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 16 Aug 2016 19:33:07 +0200 Subject: [PATCH 6083/8469] Improve numpy.distutils detection Agree with @pitrou comment. --- setuptools/msvc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 4646d83f95..57153d8a4b 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -2,6 +2,7 @@ This module adds improved support for Microsoft Visual C++ compilers. """ import os +import sys import platform import itertools import distutils.errors @@ -225,7 +226,7 @@ def msvc14_gen_lib_options(*args, **kwargs): compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ - if "numpy" in distutils.ccompiler.CCompiler.spawn.__module__: + if "numpy.distutils" in sys.modules: import numpy as np return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) else: From 21be70b60cfea8da91df4687a21f262a59809073 Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Tue, 16 Aug 2016 19:34:48 +0200 Subject: [PATCH 6084/8469] Wrong line for comment --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 57153d8a4b..360c1a68de 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -80,14 +80,14 @@ def patch_for_specialized_compiler(): pass try: - # Patch distutils._msvccompiler._get_vc_env for numpy compatibility + # Patch distutils._msvccompiler._get_vc_env unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env msvc14compiler._get_vc_env = msvc14_get_vc_env except NameError: pass try: - # Patch distutils._msvccompiler.gen_lib_options + # Patch distutils._msvccompiler.gen_lib_options for Numpy unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options msvc14compiler.gen_lib_options = msvc14_gen_lib_options except NameError: From fadf148e520e84cdd23856457040799dfe9fa592 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Tue, 16 Aug 2016 15:59:17 +1000 Subject: [PATCH 6085/8469] Add tests for MANIFEST.in --- setuptools/tests/test_manifest.py | 210 ++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 setuptools/tests/test_manifest.py diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py new file mode 100644 index 0000000000..abee5128e7 --- /dev/null +++ b/setuptools/tests/test_manifest.py @@ -0,0 +1,210 @@ +# -*- coding: utf-8 -*- +"""sdist tests""" + +import contextlib +import os +import shutil +import sys +import tempfile + +from setuptools.command.egg_info import egg_info +from setuptools.dist import Distribution +from setuptools.extern import six +from setuptools.tests.textwrap import DALS + +import pytest + +py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") + + +def make_local_path(s): + """Converts '/' in a string to os.sep""" + return s.replace('/', os.sep) + + +SETUP_ATTRS = { + 'name': 'app', + 'version': '0.0', + 'packages': ['app'], +} + + +SETUP_PY = """\ +from setuptools import setup + +setup(**%r) +""" % SETUP_ATTRS + + +@contextlib.contextmanager +def quiet(): + old_stdout, old_stderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = six.StringIO(), six.StringIO() + try: + yield + finally: + sys.stdout, sys.stderr = old_stdout, old_stderr + + +def touch(filename): + open(filename, 'w').close() + +# The set of files always in the manifest, including all files in the +# .egg-info directory +default_files = frozenset(map(make_local_path, [ + 'README.rst', + 'MANIFEST.in', + 'setup.py', + 'app.egg-info/PKG-INFO', + 'app.egg-info/SOURCES.txt', + 'app.egg-info/dependency_links.txt', + 'app.egg-info/top_level.txt', + 'app/__init__.py', +])) + + +class TestManifestTest: + + def setup_method(self, method): + self.temp_dir = tempfile.mkdtemp() + f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') + f.write(SETUP_PY) + f.close() + + """ + Create a file tree like: + - LICENSE + - README.rst + - testing.rst + - .hidden.rst + - app/ + - __init__.py + - a.txt + - b.txt + - c.rst + - static/ + - app.js + - app.js.map + - app.css + - app.css.map + """ + + for fname in ['README.rst', '.hidden.rst', 'testing.rst', 'LICENSE']: + touch(os.path.join(self.temp_dir, fname)) + + # Set up the rest of the test package + test_pkg = os.path.join(self.temp_dir, 'app') + os.mkdir(test_pkg) + for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: + touch(os.path.join(test_pkg, fname)) + + # Some compiled front-end assets to include + static = os.path.join(test_pkg, 'static') + os.mkdir(static) + for fname in ['app.js', 'app.js.map', 'app.css', 'app.css.map']: + touch(os.path.join(static, fname)) + + self.old_cwd = os.getcwd() + os.chdir(self.temp_dir) + + def teardown_method(self, method): + os.chdir(self.old_cwd) + shutil.rmtree(self.temp_dir) + + def make_manifest(self, contents): + """Write a MANIFEST.in.""" + with open(os.path.join(self.temp_dir, 'MANIFEST.in'), 'w') as f: + f.write(DALS(contents)) + + def get_files(self): + """Run egg_info and get all the files to include, as a set""" + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = egg_info(dist) + cmd.ensure_finalized() + + cmd.run() + + return set(cmd.filelist.files) + + def test_no_manifest(self): + """Check a missing MANIFEST.in includes only the standard files.""" + assert (default_files - set(['MANIFEST.in'])) == self.get_files() + + def test_empty_files(self): + """Check an empty MANIFEST.in includes only the standard files.""" + self.make_manifest("") + assert default_files == self.get_files() + + def test_include(self): + """Include extra rst files in the project root.""" + self.make_manifest("include *.rst") + files = default_files | set([ + 'testing.rst', '.hidden.rst']) + assert files == self.get_files() + + def test_exclude(self): + """Include everything in app/ except the text files""" + l = make_local_path + self.make_manifest( + """ + include app/* + exclude app/*.txt + """) + files = default_files | set([l('app/c.rst')]) + assert files == self.get_files() + + def test_include_multiple(self): + """Include with multiple patterns.""" + l = make_local_path + self.make_manifest("include app/*.txt app/static/*") + files = default_files | set([ + l('app/a.txt'), l('app/b.txt'), + l('app/static/app.js'), l('app/static/app.js.map'), + l('app/static/app.css'), l('app/static/app.css.map')]) + assert files == self.get_files() + + def test_graft(self): + """Include the whole app/static/ directory.""" + l = make_local_path + self.make_manifest("graft app/static") + files = default_files | set([ + l('app/static/app.js'), l('app/static/app.js.map'), + l('app/static/app.css'), l('app/static/app.css.map')]) + assert files == self.get_files() + + def test_graft_global_exclude(self): + """Exclude all *.map files in the project.""" + l = make_local_path + self.make_manifest( + """ + graft app/static + global-exclude *.map + """) + files = default_files | set([ + l('app/static/app.js'), l('app/static/app.css')]) + assert files == self.get_files() + + def test_global_include(self): + """Include all *.rst, *.js, and *.css files in the whole tree.""" + l = make_local_path + self.make_manifest( + """ + global-include *.rst *.js *.css + """) + files = default_files | set([ + '.hidden.rst', 'testing.rst', l('app/c.rst'), + l('app/static/app.js'), l('app/static/app.css')]) + assert files == self.get_files() + + def test_graft_prune(self): + """Include all files in app/, except for the whole app/static/ dir.""" + l = make_local_path + self.make_manifest( + """ + graft app + prune app/static + """) + files = default_files | set([ + l('app/a.txt'), l('app/b.txt'), l('app/c.rst')]) + assert files == self.get_files() From 498f86b8979b644234e8cfebfa990385504e926f Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Tue, 16 Aug 2016 16:36:58 +1000 Subject: [PATCH 6086/8469] Copy FileList tests from distutils --- setuptools/tests/test_manifest.py | 283 +++++++++++++++++++++++++++++- 1 file changed, 274 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index abee5128e7..6e67ca6146 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -6,8 +6,10 @@ import shutil import sys import tempfile +from distutils import log +from distutils.errors import DistutilsTemplateError -from setuptools.command.egg_info import egg_info +from setuptools.command.egg_info import FileList, egg_info from setuptools.dist import Distribution from setuptools.extern import six from setuptools.tests.textwrap import DALS @@ -63,10 +65,23 @@ def touch(filename): ])) -class TestManifestTest: +class TempDirTestCase(object): def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() + self.old_cwd = os.getcwd() + os.chdir(self.temp_dir) + + def teardown_method(self, method): + os.chdir(self.old_cwd) + shutil.rmtree(self.temp_dir) + + +class TestManifestTest(TempDirTestCase): + + def setup_method(self, method): + super(TestManifestTest, self).setup_method(method) + f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') f.write(SETUP_PY) f.close() @@ -104,13 +119,6 @@ def setup_method(self, method): for fname in ['app.js', 'app.js.map', 'app.css', 'app.css.map']: touch(os.path.join(static, fname)) - self.old_cwd = os.getcwd() - os.chdir(self.temp_dir) - - def teardown_method(self, method): - os.chdir(self.old_cwd) - shutil.rmtree(self.temp_dir) - def make_manifest(self, contents): """Write a MANIFEST.in.""" with open(os.path.join(self.temp_dir, 'MANIFEST.in'), 'w') as f: @@ -208,3 +216,260 @@ def test_graft_prune(self): files = default_files | set([ l('app/a.txt'), l('app/b.txt'), l('app/c.rst')]) assert files == self.get_files() + + +class TestFileListTest(TempDirTestCase): + """ + A copy of the relevant bits of distutils/tests/test_filelist.py, + to ensure setuptools' version of FileList keeps parity with distutils. + """ + + def setup_method(self, method): + super(TestFileListTest, self).setup_method(method) + self.threshold = log.set_threshold(log.FATAL) + self._old_log = log.Log._log + log.Log._log = self._log + self.logs = [] + + def teardown_method(self, method): + log.set_threshold(self.threshold) + log.Log._log = self._old_log + super(TestFileListTest, self).teardown_method(method) + + def _log(self, level, msg, args): + if level not in (log.DEBUG, log.INFO, log.WARN, log.ERROR, log.FATAL): + raise ValueError('%s wrong log level' % str(level)) + self.logs.append((level, msg, args)) + + def get_logs(self, *levels): + def _format(msg, args): + if len(args) == 0: + return msg + return msg % args + return [_format(msg, args) for level, msg, args + in self.logs if level in levels] + + def clear_logs(self): + self.logs = [] + + def assertNoWarnings(self): + assert self.get_logs(log.WARN) == [] + self.clear_logs() + + def assertWarnings(self): + assert len(self.get_logs(log.WARN)) > 0 + self.clear_logs() + + def make_files(self, files): + for file in files: + file = os.path.join(self.temp_dir, file) + dirname, basename = os.path.split(file) + if not os.path.exists(dirname): + os.makedirs(dirname) + open(file, 'w').close() + + def test_process_template_line(self): + # testing all MANIFEST.in template patterns + file_list = FileList() + l = make_local_path + + # simulated file list + self.make_files([ + 'foo.tmp', 'ok', 'xo', 'four.txt', + 'buildout.cfg', + # filelist does not filter out VCS directories, + # it's sdist that does + l('.hg/last-message.txt'), + l('global/one.txt'), + l('global/two.txt'), + l('global/files.x'), + l('global/here.tmp'), + l('f/o/f.oo'), + l('dir/graft-one'), + l('dir/dir2/graft2'), + l('dir3/ok'), + l('dir3/sub/ok.txt'), + ]) + + MANIFEST_IN = DALS("""\ + include ok + include xo + exclude xo + include foo.tmp + include buildout.cfg + global-include *.x + global-include *.txt + global-exclude *.tmp + recursive-include f *.oo + recursive-exclude global *.x + graft dir + prune dir3 + """) + + for line in MANIFEST_IN.split('\n'): + if not line: + continue + file_list.process_template_line(line) + + wanted = [ + 'buildout.cfg', + 'four.txt', + 'ok', + l('.hg/last-message.txt'), + l('dir/graft-one'), + l('dir/dir2/graft2'), + l('f/o/f.oo'), + l('global/one.txt'), + l('global/two.txt'), + ] + file_list.sort() + + assert file_list.files == wanted + + def test_exclude_pattern(self): + # return False if no match + file_list = FileList() + assert not file_list.exclude_pattern('*.py') + + # return True if files match + file_list = FileList() + file_list.files = ['a.py', 'b.py'] + assert file_list.exclude_pattern('*.py') + + # test excludes + file_list = FileList() + file_list.files = ['a.py', 'a.txt'] + file_list.exclude_pattern('*.py') + assert file_list.files == ['a.txt'] + + def test_include_pattern(self): + # return False if no match + file_list = FileList() + file_list.set_allfiles([]) + assert not file_list.include_pattern('*.py') + + # return True if files match + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt']) + assert file_list.include_pattern('*.py') + + # test * matches all files + file_list = FileList() + assert file_list.allfiles is None + file_list.set_allfiles(['a.py', 'b.txt']) + file_list.include_pattern('*') + assert file_list.allfiles == ['a.py', 'b.txt'] + + def test_process_template(self): + l = make_local_path + # invalid lines + file_list = FileList() + for action in ('include', 'exclude', 'global-include', + 'global-exclude', 'recursive-include', + 'recursive-exclude', 'graft', 'prune', 'blarg'): + try: + file_list.process_template_line(action) + except DistutilsTemplateError: + pass + except Exception: + assert False, "Incorrect error thrown" + else: + assert False, "Should have thrown an error" + + # include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', l('d/c.py')]) + + file_list.process_template_line('include *.py') + assert file_list.files == ['a.py'] + self.assertNoWarnings() + + file_list.process_template_line('include *.rb') + assert file_list.files == ['a.py'] + self.assertWarnings() + + # exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', l('d/c.py')] + + file_list.process_template_line('exclude *.py') + assert file_list.files == ['b.txt', l('d/c.py')] + self.assertNoWarnings() + + file_list.process_template_line('exclude *.rb') + assert file_list.files == ['b.txt', l('d/c.py')] + self.assertWarnings() + + # global-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', l('d/c.py')]) + + file_list.process_template_line('global-include *.py') + assert file_list.files == ['a.py', l('d/c.py')] + self.assertNoWarnings() + + file_list.process_template_line('global-include *.rb') + assert file_list.files == ['a.py', l('d/c.py')] + self.assertWarnings() + + # global-exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', l('d/c.py')] + + file_list.process_template_line('global-exclude *.py') + assert file_list.files == ['b.txt'] + self.assertNoWarnings() + + file_list.process_template_line('global-exclude *.rb') + assert file_list.files == ['b.txt'] + self.assertWarnings() + + # recursive-include + file_list = FileList() + file_list.set_allfiles(['a.py', l('d/b.py'), l('d/c.txt'), + l('d/d/e.py')]) + + file_list.process_template_line('recursive-include d *.py') + assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + self.assertNoWarnings() + + file_list.process_template_line('recursive-include e *.py') + assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + self.assertWarnings() + + # recursive-exclude + file_list = FileList() + file_list.files = ['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')] + + file_list.process_template_line('recursive-exclude d *.py') + assert file_list.files == ['a.py', l('d/c.txt')] + self.assertNoWarnings() + + file_list.process_template_line('recursive-exclude e *.py') + assert file_list.files == ['a.py', l('d/c.txt')] + self.assertWarnings() + + # graft + file_list = FileList() + file_list.set_allfiles(['a.py', l('d/b.py'), l('d/d/e.py'), + l('f/f.py')]) + + file_list.process_template_line('graft d') + assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + self.assertNoWarnings() + + file_list.process_template_line('graft e') + assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + self.assertWarnings() + + # prune + file_list = FileList() + file_list.files = ['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')] + + file_list.process_template_line('prune d') + assert file_list.files == ['a.py', l('f/f.py')] + self.assertNoWarnings() + + file_list.process_template_line('prune e') + assert file_list.files == ['a.py', l('f/f.py')] + self.assertWarnings() From d806e4cf59b252eb2120483347c4f3772f4ca386 Mon Sep 17 00:00:00 2001 From: insiv Date: Wed, 17 Aug 2016 22:07:48 +0700 Subject: [PATCH 6087/8469] Remove whitespace around parameter = sign. --- pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_resources.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2a053b509e..8d967c0749 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1913,7 +1913,7 @@ def __init__(self, importer): self.module_path = importer.archive self._setup_prefix() -_declare_state('dict', _distribution_finders = {}) +_declare_state('dict', _distribution_finders={}) def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index e0dbb65279..e4827fa598 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -114,7 +114,7 @@ def testDistroParse(self): def testDistroMetadata(self): d = Distribution( "/some/path", project_name="FooPkg", py_version="2.4", platform="win32", - metadata = Metadata( + metadata=Metadata( ('PKG-INFO',"Metadata-Version: 1.0\nVersion: 1.3-1\n") ) ) From 37f1dd197243d18667b1d7fee489013d53b3bd06 Mon Sep 17 00:00:00 2001 From: insiv Date: Wed, 17 Aug 2016 22:24:43 +0700 Subject: [PATCH 6088/8469] Add missing whitespace around operators. --- pkg_resources/__init__.py | 56 +++++++++++++-------------- pkg_resources/tests/test_resources.py | 12 +++--- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2a053b509e..a4704c7298 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -155,7 +155,7 @@ def _parse_version_parts(s): # pad for numeric comparison yield part.zfill(8) else: - yield '*'+part + yield '*' + part # ensure that alpha/beta/candidate are before final yield '*final' @@ -217,13 +217,13 @@ def __getstate__(): state = {} g = globals() for k, v in _state_vars.items(): - state[k] = g['_sget_'+v](g[k]) + state[k] = g['_sget_' + v](g[k]) return state def __setstate__(state): g = globals() for k, v in state.items(): - g['_sset_'+_state_vars[k]](k, g[k], v) + g['_sset_' + _state_vars[k]](k, g[k], v) return state def _sget_dict(val): @@ -314,7 +314,7 @@ def get_supported_platform(): class ResolutionError(Exception): """Abstract base for dependency resolution errors""" def __repr__(self): - return self.__class__.__name__+repr(self.args) + return self.__class__.__name__ + repr(self.args) class VersionConflict(ResolutionError): @@ -477,7 +477,7 @@ def compatible_platforms(provided, required): XXX Needs compatibility checks for Linux and other unixy OSes. """ - if provided is None or required is None or provided==required: + if provided is None or required is None or provided == required: # easy case return True @@ -732,7 +732,7 @@ def __iter__(self): for key in self.entry_keys[item]: if key not in seen: - seen[key]=1 + seen[key] = 1 yield self.by_key[key] def add(self, dist, entry=None, insert=True, replace=False): @@ -1033,7 +1033,7 @@ def can_add(self, dist): is returned. """ return (self.python is None or dist.py_version is None - or dist.py_version==self.python) \ + or dist.py_version == self.python) \ and compatible_platforms(dist.platform, self.platform) def remove(self, dist): @@ -1238,7 +1238,7 @@ def get_cache_path(self, archive_name, names=()): extract, as it tracks the generated names for possible cleanup later. """ extract_path = self.extraction_path or get_default_cache() - target_path = os.path.join(extract_path, archive_name+'-tmp', *names) + target_path = os.path.join(extract_path, archive_name + '-tmp', *names) try: _bypass_ensure_directory(target_path) except: @@ -1344,7 +1344,7 @@ def get_default_cache(): except KeyError: pass - if os.name!='nt': + if os.name != 'nt': return os.path.expanduser('~/.python-eggs') # XXX this may be locale-specific! @@ -1492,7 +1492,7 @@ def metadata_listdir(self, name): return [] def run_script(self, script_name, namespace): - script = 'scripts/'+script_name + script = 'scripts/' + script_name if not self.has_metadata(script): raise ResolutionError("No script named %r" % script_name) script_text = self.get_metadata(script).replace('\r\n', '\n') @@ -1553,7 +1553,7 @@ def _setup_prefix(self): # of multiple eggs; that's why we use module_path instead of .archive path = self.module_path old = None - while path!=old: + while path != old: if _is_unpacked_egg(path): self.egg_name = os.path.basename(path) self.egg_info = os.path.join(path, 'EGG-INFO') @@ -1679,7 +1679,7 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self, module) - self.zip_pre = self.loader.archive+os.sep + self.zip_pre = self.loader.archive + os.sep def _zipinfo_name(self, fspath): # Convert a virtual filename (full path to file) into a zipfile subpath @@ -1693,9 +1693,9 @@ def _zipinfo_name(self, fspath): def _parts(self, zip_path): # Convert a zipfile subpath into an egg-relative path part list. # pseudo-fs path - fspath = self.zip_pre+zip_path - if fspath.startswith(self.egg_root+os.sep): - return fspath[len(self.egg_root)+1:].split(os.sep) + fspath = self.zip_pre + zip_path + if fspath.startswith(self.egg_root + os.sep): + return fspath[len(self.egg_root) + 1:].split(os.sep) raise AssertionError( "%s is not a subpath of %s" % (fspath, self.egg_root) ) @@ -1766,7 +1766,7 @@ def _extract_resource(self, manager, zip_path): # so proceed. return real_path # Windows, del old file and retry - elif os.name=='nt': + elif os.name == 'nt': unlink(real_path) rename(tmpnam, real_path) return real_path @@ -1786,7 +1786,7 @@ def _is_current(self, file_path, zip_path): if not os.path.isfile(file_path): return False stat = os.stat(file_path) - if stat.st_size!=size or stat.st_mtime!=timestamp: + if stat.st_size != size or stat.st_mtime != timestamp: return False # check that the contents match zip_contents = self.loader.get_data(zip_path) @@ -1855,10 +1855,10 @@ def __init__(self, path): self.path = path def has_metadata(self, name): - return name=='PKG-INFO' and os.path.isfile(self.path) + return name == 'PKG-INFO' and os.path.isfile(self.path) def get_metadata(self, name): - if name=='PKG-INFO': + if name == 'PKG-INFO': with io.open(self.path, encoding='utf-8') as f: try: metadata = f.read() @@ -1905,7 +1905,7 @@ class EggMetadata(ZipProvider): def __init__(self, importer): """Create a metadata provider from a zipimporter""" - self.zip_pre = importer.archive+os.sep + self.zip_pre = importer.archive + os.sep self.loader = importer if importer.prefix: self.module_path = os.path.join(importer.archive, importer.prefix) @@ -2117,7 +2117,7 @@ def file_ns_handler(importer, path_item, packageName, module): subpath = os.path.join(path_item, packageName.split('.')[-1]) normalized = _normalize_cached(subpath) for item in module.__path__: - if _normalize_cached(item)==normalized: + if _normalize_cached(item) == normalized: break else: # Only return the path if it's not already there @@ -2294,7 +2294,7 @@ def parse_group(cls, group, lines, dist=None): ep = cls.parse(line, dist) if ep.name in this: raise ValueError("Duplicate entry point", group, ep.name) - this[ep.name]=ep + this[ep.name] = ep return this @classmethod @@ -2356,7 +2356,7 @@ def __init__(self, location=None, metadata=None, project_name=None, @classmethod def from_location(cls, location, basename, metadata=None, **kw): - project_name, version, py_version, platform = [None]*4 + project_name, version, py_version, platform = [None] * 4 basename, ext = os.path.splitext(basename) if ext.lower() in _distributionImpl: cls = _distributionImpl[ext.lower()] @@ -2478,9 +2478,9 @@ def _dep_map(self): extra, marker = extra.split(':', 1) if invalid_marker(marker): # XXX warn - reqs=[] + reqs = [] elif not evaluate_marker(marker): - reqs=[] + reqs = [] extra = safe_extra(extra) or None dm.setdefault(extra,[]).extend(parse_requirements(reqs)) return dm @@ -2611,7 +2611,7 @@ def insert_on(self, path, loc=None, replace=False): nloc = _normalize_cached(loc) bdir = os.path.dirname(nloc) - npath= [(p and _normalize_cached(p) or p) for p in path] + npath = [(p and _normalize_cached(p) or p) for p in path] for p, item in enumerate(npath): if item == nloc: @@ -2642,7 +2642,7 @@ def insert_on(self, path, loc=None, replace=False): # p is the spot where we found or inserted loc; now remove duplicates while True: try: - np = npath.index(nloc, p+1) + np = npath.index(nloc, p + 1) except ValueError: break else: @@ -2981,7 +2981,7 @@ def _initialize_master_working_set(): dist.activate(replace=False) del dist add_activation_listener(lambda dist: dist.activate(replace=True), existing=False) - working_set.entries=[] + working_set.entries = [] # match order list(map(working_set.add_entry, sys.path)) globals().update(locals()) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index e0dbb65279..3649a30a48 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -164,7 +164,7 @@ def testResolve(self): ad.add(Baz) # Activation list now includes resolved dependency - assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) ==[Foo,Baz] + assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) == [Foo,Baz] # Requests for conflicting versions produce VersionConflict with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) @@ -426,7 +426,7 @@ def testParseMap(self): m = EntryPoint.parse_map({'xyz':self.submap_str}) self.checkSubMap(m['xyz']) assert list(m.keys()) == ['xyz'] - m = EntryPoint.parse_map("[xyz]\n"+self.submap_str) + m = EntryPoint.parse_map("[xyz]\n" + self.submap_str) self.checkSubMap(m['xyz']) assert list(m.keys()) == ['xyz'] with pytest.raises(ValueError): @@ -644,7 +644,7 @@ def c(s1,s2): def testVersionOrdering(self): def c(s1,s2): p1, p2 = parse_version(s1),parse_version(s2) - assert p1 Date: Wed, 17 Aug 2016 22:47:37 +0700 Subject: [PATCH 6089/8469] Fix spacing after comment hash. --- pkg_resources/tests/test_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index e0dbb65279..854bc327b5 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -153,7 +153,7 @@ def testResolve(self): list(map(ws.add, targets)) with pytest.raises(VersionConflict): ws.resolve(parse_requirements("Foo==0.9"), ad) - ws = WorkingSet([]) # reset + ws = WorkingSet([]) # reset # Request an extra that causes an unresolved dependency for "Baz" with pytest.raises(pkg_resources.DistributionNotFound): From bbfaa7817d92bc2e04e4b4fa89d2b9a783f053cd Mon Sep 17 00:00:00 2001 From: insiv Date: Wed, 17 Aug 2016 22:51:31 +0700 Subject: [PATCH 6090/8469] Fix comparison with None. --- pkg_resources/tests/test_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index e0dbb65279..963308b23f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -103,7 +103,7 @@ def testDistroBasics(self): d = Distribution("/some/path") assert d.py_version == sys.version[:3] - assert d.platform == None + assert d.platform is None def testDistroParse(self): d = dist_from_fn("FooPkg-1.3.post1-py2.4-win32.egg") From 84aec138dc4311c3f23ff78e9916e00b457a1896 Mon Sep 17 00:00:00 2001 From: insiv Date: Wed, 17 Aug 2016 23:05:38 +0700 Subject: [PATCH 6091/8469] Upgrade pyparsing to version 2.1.8 --- pkg_resources/_vendor/pyparsing.py | 3358 +++++++++++++++++++++------- pkg_resources/_vendor/vendored.txt | 2 +- 2 files changed, 2565 insertions(+), 795 deletions(-) diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py index 2284cadcd9..89cffc10b8 100644 --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -48,7 +48,7 @@ The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of '+', '|' and '^' operators. -The parsed results returned from C{parseString()} can be accessed as a nested list, a dictionary, or an +The parsed results returned from L{I{ParserElement.parseString}} can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: @@ -57,8 +57,8 @@ class names, and the use of '+', '|' and '^' operators. - embedded comments """ -__version__ = "2.0.6" -__versionTime__ = "9 Nov 2015 19:03" +__version__ = "2.1.8" +__versionTime__ = "14 Aug 2016 08:43 UTC" __author__ = "Paul McGuire " import string @@ -70,8 +70,22 @@ class names, and the use of '+', '|' and '^' operators. import sre_constants import collections import pprint -import functools -import itertools +import traceback +import types +from datetime import datetime + +try: + from _thread import RLock +except ImportError: + from threading import RLock + +try: + from collections import OrderedDict as _OrderedDict +except ImportError: + try: + from ordereddict import OrderedDict as _OrderedDict + except ImportError: + _OrderedDict = None #~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) ) @@ -81,21 +95,23 @@ class names, and the use of '+', '|' and '^' operators. 'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or', 'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException', 'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException', -'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 'Upcase', +'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore', 'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col', 'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString', 'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums', -'htmlComment', 'javaStyleComment', 'keepOriginalText', 'line', 'lineEnd', 'lineStart', 'lineno', +'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno', 'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral', 'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables', 'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity', 'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd', 'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute', 'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass', +'tokenMap', 'pyparsing_common', ] -PY_3 = sys.version.startswith('3') +system_version = tuple(sys.version_info)[:3] +PY_3 = system_version[0] == 3 if PY_3: _MAX_INT = sys.maxsize basestring = str @@ -123,18 +139,11 @@ def _ustr(obj): return str(obj) except UnicodeEncodeError: - # The Python docs (http://docs.python.org/ref/customization.html#l2h-182) - # state that "The return value must be a string object". However, does a - # unicode object (being a subclass of basestring) count as a "string - # object"? - # If so, then return a unicode object: - return unicode(obj) - # Else encode it... but how? There are many choices... :) - # Replace unprintables with escape codes? - #return unicode(obj).encode(sys.getdefaultencoding(), 'backslashreplace_errors') - # Replace unprintables with question marks? - #return unicode(obj).encode(sys.getdefaultencoding(), 'replace') - # ... + # Else encode it + ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace') + xmlcharref = Regex('&#\d+;') + xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:]) + return xmlcharref.transformString(ret) # build list of single arg builtins, tolerant of Python version, that can be used as parse actions singleArgBuiltins = [] @@ -160,7 +169,7 @@ def _xml_escape(data): class _Constants(object): pass -alphas = string.ascii_lowercase + string.ascii_uppercase +alphas = string.ascii_uppercase + string.ascii_lowercase nums = "0123456789" hexnums = nums + "ABCDEFabcdef" alphanums = alphas + nums @@ -180,6 +189,15 @@ def __init__( self, pstr, loc=0, msg=None, elem=None ): self.msg = msg self.pstr = pstr self.parserElement = elem + self.args = (pstr, loc, msg) + + @classmethod + def _from_exception(cls, pe): + """ + internal factory method to simplify creating one type of ParseException + from another - avoids having __init__ signature conflicts among subclasses + """ + return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement) def __getattr__( self, aname ): """supported attributes by name are: @@ -212,15 +230,26 @@ def markInputline( self, markerString = ">!<" ): markerString, line_str[line_column:])) return line_str.strip() def __dir__(self): - return "loc msg pstr parserElement lineno col line " \ - "markInputline __str__ __repr__".split() + return "lineno col line".split() + dir(type(self)) class ParseException(ParseBaseException): - """exception thrown when parse expressions don't match class; - supported attributes by name are: - - lineno - returns the line number of the exception text - - col - returns the column number of the exception text - - line - returns the line containing the exception text + """ + Exception thrown when parse expressions don't match class; + supported attributes by name are: + - lineno - returns the line number of the exception text + - col - returns the column number of the exception text + - line - returns the line containing the exception text + + Example:: + try: + Word(nums).setName("integer").parseString("ABC") + except ParseException as pe: + print(pe) + print("column: {}".format(pe.col)) + + prints:: + Expected integer (at char 0), (line:1, col:1) + column: 1 """ pass @@ -230,12 +259,10 @@ class ParseFatalException(ParseBaseException): pass class ParseSyntaxException(ParseFatalException): - """just like C{L{ParseFatalException}}, but thrown internally when an - C{L{ErrorStop}} ('-' operator) indicates that parsing is to stop immediately because - an unbacktrackable syntax error has been found""" - def __init__(self, pe): - super(ParseSyntaxException, self).__init__( - pe.pstr, pe.loc, pe.msg, pe.parserElement) + """just like L{ParseFatalException}, but thrown internally when an + L{ErrorStop} ('-' operator) indicates that parsing is to stop + immediately because an unbacktrackable syntax error has been found""" + pass #~ class ReparseException(ParseBaseException): #~ """Experimental class - parse actions can raise this exception to cause @@ -251,7 +278,7 @@ def __init__(self, pe): #~ self.reparseLoc = restartLoc class RecursiveGrammarException(Exception): - """exception thrown by C{validate()} if the grammar could be improperly recursive""" + """exception thrown by L{ParserElement.validate} if the grammar could be improperly recursive""" def __init__( self, parseElementList ): self.parseElementTrace = parseElementList @@ -269,12 +296,44 @@ def setOffset(self,i): self.tup = (self.tup[0],i) class ParseResults(object): - """Structured parse results, to provide multiple means of access to the parsed data: + """ + Structured parse results, to provide multiple means of access to the parsed data: - as a list (C{len(results)}) - by list index (C{results[0], results[1]}, etc.) - - by attribute (C{results.}) - """ - def __new__(cls, toklist, name=None, asList=True, modal=True ): + - by attribute (C{results.} - see L{ParserElement.setResultsName}) + + Example:: + integer = Word(nums) + date_str = (integer.setResultsName("year") + '/' + + integer.setResultsName("month") + '/' + + integer.setResultsName("day")) + # equivalent form: + # date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + result = date_str.parseString("1999/12/31") + + def test(s, fn=repr): + print("%s -> %s" % (s, fn(eval(s)))) + test("list(result)") + test("result[0]") + test("result['month']") + test("result.day") + test("'month' in result") + test("'minutes' in result") + test("result.dump()", str) + prints:: + list(result) -> ['1999', '/', '12', '/', '31'] + result[0] -> '1999' + result['month'] -> '12' + result.day -> '31' + 'month' in result -> True + 'minutes' in result -> False + result.dump() -> ['1999', '/', '12', '/', '31'] + - day: 31 + - month: 12 + - year: 1999 + """ + def __new__(cls, toklist=None, name=None, asList=True, modal=True ): if isinstance(toklist, cls): return toklist retobj = object.__new__(cls) @@ -283,12 +342,16 @@ def __new__(cls, toklist, name=None, asList=True, modal=True ): # Performance tuning: we construct a *lot* of these, so keep this # constructor as small and fast as possible - def __init__( self, toklist, name=None, asList=True, modal=True, isinstance=isinstance ): + def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ): if self.__doinit: self.__doinit = False self.__name = None self.__parent = None self.__accumNames = {} + self.__asList = asList + self.__modal = modal + if toklist is None: + toklist = [] if isinstance(toklist, list): self.__toklist = toklist[:] elif isinstance(toklist, _generatorType): @@ -331,7 +394,7 @@ def __setitem__( self, k, v, isinstance=isinstance ): if isinstance(v,_ParseResultsWithOffset): self.__tokdict[k] = self.__tokdict.get(k,list()) + [v] sub = v[0] - elif isinstance(k,int): + elif isinstance(k,(int,slice)): self.__toklist[k] = v sub = v else: @@ -354,11 +417,6 @@ def __delitem__( self, i ): removed = list(range(*i.indices(mylen))) removed.reverse() # fixup indices in token dictionary - #~ for name in self.__tokdict: - #~ occurrences = self.__tokdict[name] - #~ for j in removed: - #~ for k, (value, position) in enumerate(occurrences): - #~ occurrences[k] = _ParseResultsWithOffset(value, position - (position > j)) for name,occurrences in self.__tokdict.items(): for j in removed: for k, (value, position) in enumerate(occurrences): @@ -370,39 +428,52 @@ def __contains__( self, k ): return k in self.__tokdict def __len__( self ): return len( self.__toklist ) - def __bool__(self): return len( self.__toklist ) > 0 + def __bool__(self): return ( not not self.__toklist ) __nonzero__ = __bool__ def __iter__( self ): return iter( self.__toklist ) def __reversed__( self ): return iter( self.__toklist[::-1] ) - def iterkeys( self ): - """Returns all named result keys.""" + def _iterkeys( self ): if hasattr(self.__tokdict, "iterkeys"): return self.__tokdict.iterkeys() else: return iter(self.__tokdict) - def itervalues( self ): - """Returns all named result values.""" - return (self[k] for k in self.iterkeys()) + def _itervalues( self ): + return (self[k] for k in self._iterkeys()) - def iteritems( self ): - return ((k, self[k]) for k in self.iterkeys()) + def _iteritems( self ): + return ((k, self[k]) for k in self._iterkeys()) if PY_3: - keys = iterkeys - values = itervalues - items = iteritems + keys = _iterkeys + """Returns an iterator of all named result keys (Python 3.x only).""" + + values = _itervalues + """Returns an iterator of all named result values (Python 3.x only).""" + + items = _iteritems + """Returns an iterator of all named result key-value tuples (Python 3.x only).""" + else: + iterkeys = _iterkeys + """Returns an iterator of all named result keys (Python 2.x only).""" + + itervalues = _itervalues + """Returns an iterator of all named result values (Python 2.x only).""" + + iteritems = _iteritems + """Returns an iterator of all named result key-value tuples (Python 2.x only).""" + def keys( self ): - """Returns all named result keys.""" + """Returns all named result keys (as a list in Python 2.x, as an iterator in Python 3.x).""" return list(self.iterkeys()) def values( self ): - """Returns all named result values.""" + """Returns all named result values (as a list in Python 2.x, as an iterator in Python 3.x).""" return list(self.itervalues()) def items( self ): - """Returns all named result keys and values as a list of tuples.""" + """Returns all named result key-values (as a list of tuples in Python 2.x, as an iterator in Python 3.x).""" return list(self.iteritems()) def haskeys( self ): @@ -411,14 +482,39 @@ def haskeys( self ): return bool(self.__tokdict) def pop( self, *args, **kwargs): - """Removes and returns item at specified index (default=last). - Supports both list and dict semantics for pop(). If passed no - argument or an integer argument, it will use list semantics - and pop tokens from the list of parsed tokens. If passed a - non-integer argument (most likely a string), it will use dict - semantics and pop the corresponding value from any defined - results names. A second default return value argument is - supported, just as in dict.pop().""" + """ + Removes and returns item at specified index (default=C{last}). + Supports both C{list} and C{dict} semantics for C{pop()}. If passed no + argument or an integer argument, it will use C{list} semantics + and pop tokens from the list of parsed tokens. If passed a + non-integer argument (most likely a string), it will use C{dict} + semantics and pop the corresponding value from any defined + results names. A second default return value argument is + supported, just as in C{dict.pop()}. + + Example:: + def remove_first(tokens): + tokens.pop(0) + print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321'] + print(OneOrMore(Word(nums)).addParseAction(remove_first).parseString("0 123 321")) # -> ['123', '321'] + + label = Word(alphas) + patt = label("LABEL") + OneOrMore(Word(nums)) + print(patt.parseString("AAB 123 321").dump()) + + # Use pop() in a parse action to remove named result (note that corresponding value is not + # removed from list form of results) + def remove_LABEL(tokens): + tokens.pop("LABEL") + return tokens + patt.addParseAction(remove_LABEL) + print(patt.parseString("AAB 123 321").dump()) + prints:: + ['AAB', '123', '321'] + - LABEL: AAB + + ['AAB', '123', '321'] + """ if not args: args = [-1] for k,v in kwargs.items(): @@ -438,39 +534,83 @@ def pop( self, *args, **kwargs): return defaultvalue def get(self, key, defaultValue=None): - """Returns named result matching the given key, or if there is no - such name, then returns the given C{defaultValue} or C{None} if no - C{defaultValue} is specified.""" + """ + Returns named result matching the given key, or if there is no + such name, then returns the given C{defaultValue} or C{None} if no + C{defaultValue} is specified. + + Similar to C{dict.get()}. + + Example:: + integer = Word(nums) + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + result = date_str.parseString("1999/12/31") + print(result.get("year")) # -> '1999' + print(result.get("hour", "not specified")) # -> 'not specified' + print(result.get("hour")) # -> None + """ if key in self: return self[key] else: return defaultValue def insert( self, index, insStr ): - """Inserts new element at location index in the list of parsed tokens.""" + """ + Inserts new element at location index in the list of parsed tokens. + + Similar to C{list.insert()}. + + Example:: + print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321'] + + # use a parse action to insert the parse location in the front of the parsed results + def insert_locn(locn, tokens): + tokens.insert(0, locn) + print(OneOrMore(Word(nums)).addParseAction(insert_locn).parseString("0 123 321")) # -> [0, '0', '123', '321'] + """ self.__toklist.insert(index, insStr) # fixup indices in token dictionary - #~ for name in self.__tokdict: - #~ occurrences = self.__tokdict[name] - #~ for k, (value, position) in enumerate(occurrences): - #~ occurrences[k] = _ParseResultsWithOffset(value, position + (position > index)) for name,occurrences in self.__tokdict.items(): for k, (value, position) in enumerate(occurrences): occurrences[k] = _ParseResultsWithOffset(value, position + (position > index)) def append( self, item ): - """Add single element to end of ParseResults list of elements.""" + """ + Add single element to end of ParseResults list of elements. + + Example:: + print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321'] + + # use a parse action to compute the sum of the parsed integers, and add it to the end + def append_sum(tokens): + tokens.append(sum(map(int, tokens))) + print(OneOrMore(Word(nums)).addParseAction(append_sum).parseString("0 123 321")) # -> ['0', '123', '321', 444] + """ self.__toklist.append(item) def extend( self, itemseq ): - """Add sequence of elements to end of ParseResults list of elements.""" + """ + Add sequence of elements to end of ParseResults list of elements. + + Example:: + patt = OneOrMore(Word(alphas)) + + # use a parse action to append the reverse of the matched strings, to make a palindrome + def make_palindrome(tokens): + tokens.extend(reversed([t[::-1] for t in tokens])) + return ''.join(tokens) + print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl' + """ if isinstance(itemseq, ParseResults): self += itemseq else: self.__toklist.extend(itemseq) def clear( self ): - """Clear all elements and results names.""" + """ + Clear all elements and results names. + """ del self.__toklist[:] self.__tokdict.clear() @@ -511,7 +651,11 @@ def __iadd__( self, other ): def __radd__(self, other): if isinstance(other,int) and other == 0: + # useful for merging many ParseResults using sum() builtin return self.copy() + else: + # this may raise a TypeError - so be it + return other + self def __repr__( self ): return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) ) @@ -531,18 +675,60 @@ def _asStringList( self, sep='' ): return out def asList( self ): - """Returns the parse results as a nested list of matching tokens, all converted to strings.""" + """ + Returns the parse results as a nested list of matching tokens, all converted to strings. + + Example:: + patt = OneOrMore(Word(alphas)) + result = patt.parseString("sldkj lsdkj sldkj") + # even though the result prints in string-like form, it is actually a pyparsing ParseResults + print(type(result), result) # -> ['sldkj', 'lsdkj', 'sldkj'] + + # Use asList() to create an actual list + result_list = result.asList() + print(type(result_list), result_list) # -> ['sldkj', 'lsdkj', 'sldkj'] + """ return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist] def asDict( self ): - """Returns the named parse results as dictionary.""" + """ + Returns the named parse results as a nested dictionary. + + Example:: + integer = Word(nums) + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + result = date_str.parseString('12/31/1999') + print(type(result), repr(result)) # -> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]}) + + result_dict = result.asDict() + print(type(result_dict), repr(result_dict)) # -> {'day': '1999', 'year': '12', 'month': '31'} + + # even though a ParseResults supports dict-like access, sometime you just need to have a dict + import json + print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable + print(json.dumps(result.asDict())) # -> {"month": "31", "day": "1999", "year": "12"} + """ if PY_3: - return dict( self.items() ) + item_fn = self.items else: - return dict( self.iteritems() ) + item_fn = self.iteritems + + def toItem(obj): + if isinstance(obj, ParseResults): + if obj.haskeys(): + return obj.asDict() + else: + return [toItem(v) for v in obj] + else: + return obj + + return dict((k,toItem(v)) for k,v in item_fn()) def copy( self ): - """Returns a new copy of a C{ParseResults} object.""" + """ + Returns a new copy of a C{ParseResults} object. + """ ret = ParseResults( self.__toklist ) ret.__tokdict = self.__tokdict.copy() ret.__parent = self.__parent @@ -551,7 +737,9 @@ def copy( self ): return ret def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ): - """Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.""" + """ + (Deprecated) Returns the parse results as XML. Tags are created for tokens and lists that have defined results names. + """ nl = "\n" out = [] namedItems = dict((v[1],k) for (k,vlist) in self.__tokdict.items() @@ -617,7 +805,27 @@ def __lookup(self,sub): return None def getName(self): - """Returns the results name for this token expression.""" + """ + Returns the results name for this token expression. Useful when several + different expressions might match at a particular location. + + Example:: + integer = Word(nums) + ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d") + house_number_expr = Suppress('#') + Word(nums, alphanums) + user_data = (Group(house_number_expr)("house_number") + | Group(ssn_expr)("ssn") + | Group(integer)("age")) + user_info = OneOrMore(user_data) + + result = user_info.parseString("22 111-22-3333 #221B") + for item in result: + print(item.getName(), ':', item[0]) + prints:: + age : 22 + ssn : 111-22-3333 + house_number : 221B + """ if self.__name: return self.__name elif self.__parent: @@ -633,40 +841,72 @@ def getName(self): else: return None - def dump(self,indent='',depth=0): - """Diagnostic method for listing out the contents of a C{ParseResults}. - Accepts an optional C{indent} argument so that this string can be embedded - in a nested display of other data.""" + def dump(self, indent='', depth=0, full=True): + """ + Diagnostic method for listing out the contents of a C{ParseResults}. + Accepts an optional C{indent} argument so that this string can be embedded + in a nested display of other data. + + Example:: + integer = Word(nums) + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + result = date_str.parseString('12/31/1999') + print(result.dump()) + prints:: + ['12', '/', '31', '/', '1999'] + - day: 1999 + - month: 31 + - year: 12 + """ out = [] NL = '\n' out.append( indent+_ustr(self.asList()) ) - if self.haskeys(): - items = sorted(self.items()) - for k,v in items: - if out: - out.append(NL) - out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) - if isinstance(v,ParseResults): - if v: - out.append( v.dump(indent,depth+1) ) + if full: + if self.haskeys(): + items = sorted(self.items()) + for k,v in items: + if out: + out.append(NL) + out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) + if isinstance(v,ParseResults): + if v: + out.append( v.dump(indent,depth+1) ) + else: + out.append(_ustr(v)) else: out.append(_ustr(v)) - else: - out.append(_ustr(v)) - elif any(isinstance(vv,ParseResults) for vv in self): - v = self - for i,vv in enumerate(v): - if isinstance(vv,ParseResults): - out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),vv.dump(indent,depth+1) )) - else: - out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),_ustr(vv))) + elif any(isinstance(vv,ParseResults) for vv in self): + v = self + for i,vv in enumerate(v): + if isinstance(vv,ParseResults): + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),vv.dump(indent,depth+1) )) + else: + out.append("\n%s%s[%d]:\n%s%s%s" % (indent,(' '*(depth)),i,indent,(' '*(depth+1)),_ustr(vv))) return "".join(out) def pprint(self, *args, **kwargs): - """Pretty-printer for parsed results as a list, using the C{pprint} module. - Accepts additional positional or keyword args as defined for the - C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})""" + """ + Pretty-printer for parsed results as a list, using the C{pprint} module. + Accepts additional positional or keyword args as defined for the + C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint}) + + Example:: + ident = Word(alphas, alphanums) + num = Word(nums) + func = Forward() + term = ident | num | Group('(' + func + ')') + func <<= ident + Group(Optional(delimitedList(term))) + result = func.parseString("fna a,b,(fnb c,d,200),100") + result.pprint(width=40) + prints:: + ['fna', + ['a', + 'b', + ['(', 'fnb', ['c', 'd', '200'], ')'], + '100']] + """ pprint.pprint(self.asList(), *args, **kwargs) # add support for pickle protocol @@ -690,8 +930,11 @@ def __setstate__(self,state): else: self.__parent = None + def __getnewargs__(self): + return self.__toklist, self.__name, self.__asList, self.__modal + def __dir__(self): - return dir(super(ParseResults,self)) + list(self.keys()) + return (dir(type(self)) + list(self.keys())) collections.MutableMapping.register(ParseResults) @@ -771,6 +1014,31 @@ def _trim_arity(func, maxargs=2): return lambda s,l,t: func(t) limit = [0] foundArity = [False] + + # traceback return data structure changed in Py3.5 - normalize back to plain tuples + if system_version[:2] >= (3,5): + def extract_stack(limit=0): + # special handling for Python 3.5.0 - extra deep call stack by 1 + offset = -3 if system_version == (3,5,0) else -2 + frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset] + return [(frame_summary.filename, frame_summary.lineno)] + def extract_tb(tb, limit=0): + frames = traceback.extract_tb(tb, limit=limit) + frame_summary = frames[-1] + return [(frame_summary.filename, frame_summary.lineno)] + else: + extract_stack = traceback.extract_stack + extract_tb = traceback.extract_tb + + # synthesize what would be returned by traceback.extract_stack at the call to + # user's parse action 'func', so that we don't incur call penalty at parse time + + LINE_DIFF = 6 + # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND + # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!! + this_line = extract_stack(limit=2)[-1] + pa_call_line_synth = (this_line[0], this_line[1]+LINE_DIFF) + def wrapper(*args): while 1: try: @@ -778,12 +1046,33 @@ def wrapper(*args): foundArity[0] = True return ret except TypeError: - if limit[0] <= maxargs and not foundArity[0]: + # re-raise TypeErrors if they did not come from our arity testing + if foundArity[0]: + raise + else: + try: + tb = sys.exc_info()[-1] + if not extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth: + raise + finally: + del tb + + if limit[0] <= maxargs: limit[0] += 1 continue raise + + # copy func name to wrapper for sensible debug output + func_name = "" + try: + func_name = getattr(func, '__name__', + getattr(func, '__class__').__name__) + except Exception: + func_name = str(func) + wrapper.__name__ = func_name + return wrapper - + class ParserElement(object): """Abstract base level parser element class.""" DEFAULT_WHITE_CHARS = " \n\t\r" @@ -791,7 +1080,16 @@ class ParserElement(object): @staticmethod def setDefaultWhitespaceChars( chars ): - """Overrides the default whitespace chars + r""" + Overrides the default whitespace chars + + Example:: + # default whitespace chars are space, and newline + OneOrMore(Word(alphas)).parseString("abc def\nghi jkl") # -> ['abc', 'def', 'ghi', 'jkl'] + + # change to just treat newline as significant + ParserElement.setDefaultWhitespaceChars(" \t") + OneOrMore(Word(alphas)).parseString("abc def\nghi jkl") # -> ['abc', 'def'] """ ParserElement.DEFAULT_WHITE_CHARS = chars @@ -799,8 +1097,22 @@ def setDefaultWhitespaceChars( chars ): def inlineLiteralsUsing(cls): """ Set class to be used for inclusion of string literals into a parser. + + Example:: + # default literal class used is Literal + integer = Word(nums) + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + date_str.parseString("1999/12/31") # -> ['1999', '/', '12', '/', '31'] + + + # change to Suppress + ParserElement.inlineLiteralsUsing(Suppress) + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + + date_str.parseString("1999/12/31") # -> ['1999', '12', '31'] """ - ParserElement.literalStringClass = cls + ParserElement._literalStringClass = cls def __init__( self, savelist=False ): self.parseAction = list() @@ -826,8 +1138,21 @@ def __init__( self, savelist=False ): self.callDuringTry = False def copy( self ): - """Make a copy of this C{ParserElement}. Useful for defining different parse actions - for the same parsing pattern, using copies of the original parse element.""" + """ + Make a copy of this C{ParserElement}. Useful for defining different parse actions + for the same parsing pattern, using copies of the original parse element. + + Example:: + integer = Word(nums).setParseAction(lambda toks: int(toks[0])) + integerK = integer.copy().addParseAction(lambda toks: toks[0]*1024) + Suppress("K") + integerM = integer.copy().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M") + + print(OneOrMore(integerK | integerM | integer).parseString("5K 100 640K 256M")) + prints:: + [5120, 100, 655360, 268435456] + Equivalent form of C{expr.copy()} is just C{expr()}:: + integerM = integer().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M") + """ cpy = copy.copy( self ) cpy.parseAction = self.parseAction[:] cpy.ignoreExprs = self.ignoreExprs[:] @@ -836,7 +1161,13 @@ def copy( self ): return cpy def setName( self, name ): - """Define name for this expression, for use in debugging.""" + """ + Define name for this expression, makes debugging and exception messages clearer. + + Example:: + Word(nums).parseString("ABC") # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1) + Word(nums).setName("integer").parseString("ABC") # -> Exception: Expected integer (at char 0), (line:1, col:1) + """ self.name = name self.errmsg = "Expected " + self.name if hasattr(self,"exception"): @@ -844,15 +1175,24 @@ def setName( self, name ): return self def setResultsName( self, name, listAllMatches=False ): - """Define name for referencing matching tokens as a nested attribute - of the returned parse results. - NOTE: this returns a *copy* of the original C{ParserElement} object; - this is so that the client can define a basic element, such as an - integer, and reference it in multiple places with different names. - - You can also set results names using the abbreviated syntax, - C{expr("name")} in place of C{expr.setResultsName("name")} - - see L{I{__call__}<__call__>}. + """ + Define name for referencing matching tokens as a nested attribute + of the returned parse results. + NOTE: this returns a *copy* of the original C{ParserElement} object; + this is so that the client can define a basic element, such as an + integer, and reference it in multiple places with different names. + + You can also set results names using the abbreviated syntax, + C{expr("name")} in place of C{expr.setResultsName("name")} - + see L{I{__call__}<__call__>}. + + Example:: + date_str = (integer.setResultsName("year") + '/' + + integer.setResultsName("month") + '/' + + integer.setResultsName("day")) + + # equivalent form: + date_str = integer("year") + '/' + integer("month") + '/' + integer("day") """ newself = self.copy() if name.endswith("*"): @@ -881,42 +1221,76 @@ def breaker(instring, loc, doActions=True, callPreParse=True): return self def setParseAction( self, *fns, **kwargs ): - """Define action 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) - - loc = the location of the matching substring - - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object - If the functions in fns modify the tokens, they can return them as the return - value from fn, and the modified list of tokens will replace the original. - Otherwise, fn does not need to return any value. - - Note: the default parsing behavior is to expand tabs in the input string - before starting the parsing process. See L{I{parseString}} for more information - on parsing strings containing C{}s, and suggested methods to maintain a - consistent view of the parsed string, the parse location, and line and column - positions within the parsed string. - """ + """ + Define action 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) + - loc = the location of the matching substring + - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object + If the functions in fns modify the tokens, they can return them as the return + value from fn, and the modified list of tokens will replace the original. + Otherwise, fn does not need to return any value. + + Optional keyword arguments: + - callDuringTry = (default=C{False}) indicate if parse action should be run during lookaheads and alternate testing + + Note: the default parsing behavior is to expand tabs in the input string + before starting the parsing process. See L{I{parseString}} for more information + on parsing strings containing C{}s, and suggested methods to maintain a + consistent view of the parsed string, the parse location, and line and column + positions within the parsed string. + + Example:: + integer = Word(nums) + date_str = integer + '/' + integer + '/' + integer + + date_str.parseString("1999/12/31") # -> ['1999', '/', '12', '/', '31'] + + # use parse action to convert to ints at parse time + integer = Word(nums).setParseAction(lambda toks: int(toks[0])) + date_str = integer + '/' + integer + '/' + integer + + # note that integer fields are now ints, not strings + date_str.parseString("1999/12/31") # -> [1999, '/', 12, '/', 31] + """ self.parseAction = list(map(_trim_arity, list(fns))) self.callDuringTry = kwargs.get("callDuringTry", False) return self def addParseAction( self, *fns, **kwargs ): - """Add parse action to expression's list of parse actions. See L{I{setParseAction}}.""" + """ + Add parse action to expression's list of parse actions. See L{I{setParseAction}}. + + See examples in L{I{copy}}. + """ self.parseAction += list(map(_trim_arity, list(fns))) self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False) return self def addCondition(self, *fns, **kwargs): """Add a boolean predicate function to expression's list of parse actions. See - L{I{setParseAction}}. Optional keyword argument C{message} can - be used to define a custom message to be used in the raised exception.""" - msg = kwargs.get("message") or "failed user-defined condition" + L{I{setParseAction}} for function call signatures. Unlike C{setParseAction}, + functions passed to C{addCondition} need to return boolean success/fail of the condition. + + Optional keyword arguments: + - message = define a custom message to be used in the raised exception + - fatal = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException + + Example:: + integer = Word(nums).setParseAction(lambda toks: int(toks[0])) + year_int = integer.copy() + year_int.addCondition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later") + date_str = year_int + '/' + integer + '/' + integer + + result = date_str.parseString("1999/12/31") # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1) + """ + msg = kwargs.get("message", "failed user-defined condition") + exc_type = ParseFatalException if kwargs.get("fatal", False) else ParseException for fn in fns: def pa(s,l,t): if not bool(_trim_arity(fn)(s,l,t)): - raise ParseException(s,l,msg) - return t + raise exc_type(s,l,msg) self.parseAction.append(pa) self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False) return self @@ -1043,43 +1417,132 @@ def tryParse( self, instring, loc ): return self._parse( instring, loc, doActions=False )[0] except ParseFatalException: raise ParseException( instring, loc, self.errmsg, self) + + def canParseNext(self, instring, loc): + try: + self.tryParse(instring, loc) + except (ParseException, IndexError): + return False + else: + return True + + class _UnboundedCache(object): + def __init__(self): + cache = {} + self.not_in_cache = not_in_cache = object() + + def get(self, key): + return cache.get(key, not_in_cache) + + def set(self, key, value): + cache[key] = value + + def clear(self): + cache.clear() + + self.get = types.MethodType(get, self) + self.set = types.MethodType(set, self) + self.clear = types.MethodType(clear, self) + + if _OrderedDict is not None: + class _FifoCache(object): + def __init__(self, size): + self.not_in_cache = not_in_cache = object() + + cache = _OrderedDict() + + def get(self, key): + return cache.get(key, not_in_cache) + + def set(self, key, value): + cache[key] = value + if len(cache) > size: + cache.popitem(False) + + def clear(self): + cache.clear() + + self.get = types.MethodType(get, self) + self.set = types.MethodType(set, self) + self.clear = types.MethodType(clear, self) + + else: + class _FifoCache(object): + def __init__(self, size): + self.not_in_cache = not_in_cache = object() + + cache = {} + key_fifo = collections.deque([], size) + + def get(self, key): + return cache.get(key, not_in_cache) + + def set(self, key, value): + cache[key] = value + if len(cache) > size: + cache.pop(key_fifo.popleft(), None) + key_fifo.append(key) + + def clear(self): + cache.clear() + key_fifo.clear() + + self.get = types.MethodType(get, self) + self.set = types.MethodType(set, self) + self.clear = types.MethodType(clear, 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 + packrat_cache_lock = RLock() + packrat_cache_stats = [0, 0] # this method gets repeatedly called during backtracking with the same arguments - # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression def _parseCache( self, instring, loc, doActions=True, callPreParse=True ): - lookup = (self,instring,loc,callPreParse,doActions) - if lookup in ParserElement._exprArgCache: - value = ParserElement._exprArgCache[ lookup ] - if isinstance(value, Exception): - raise value - return (value[0],value[1].copy()) - else: - try: - value = self._parseNoCache( instring, loc, doActions, callPreParse ) - ParserElement._exprArgCache[ lookup ] = (value[0],value[1].copy()) - return value - except ParseBaseException as pe: - pe.__traceback__ = None - ParserElement._exprArgCache[ lookup ] = pe - raise + HIT, MISS = 0, 1 + lookup = (self, instring, loc, callPreParse, doActions) + with ParserElement.packrat_cache_lock: + cache = ParserElement.packrat_cache + value = cache.get(lookup) + if value is cache.not_in_cache: + ParserElement.packrat_cache_stats[MISS] += 1 + try: + value = self._parseNoCache(instring, loc, doActions, callPreParse) + except ParseBaseException as pe: + # cache a copy of the exception, without the traceback + cache.set(lookup, pe.__class__(*pe.args)) + raise + else: + cache.set(lookup, (value[0], value[1].copy())) + return value + else: + ParserElement.packrat_cache_stats[HIT] += 1 + if isinstance(value, Exception): + raise value + return (value[0], value[1].copy()) _parse = _parseNoCache - # argument cache for optimizing repeated calls when backtracking through recursive expressions - _exprArgCache = {} @staticmethod def resetCache(): - ParserElement._exprArgCache.clear() + ParserElement.packrat_cache.clear() + ParserElement.packrat_cache_stats[:] = [0] * len(ParserElement.packrat_cache_stats) _packratEnabled = False @staticmethod - def enablePackrat(): + def enablePackrat(cache_size_limit=128): """Enables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. - + + Parameters: + - cache_size_limit - (default=C{128}) - if an integer value is provided + will limit the size of the packrat cache; if None is passed, then + the cache size will be unbounded; if 0 is passed, the cache will + be effectively disabled. + This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your @@ -1088,32 +1551,45 @@ def enablePackrat(): C{enablePackrat} before calling C{psyco.full()}. If you do not do this, Python will crash. For best results, call C{enablePackrat()} immediately after importing pyparsing. + + Example:: + import pyparsing + pyparsing.ParserElement.enablePackrat() """ if not ParserElement._packratEnabled: ParserElement._packratEnabled = True + if cache_size_limit is None: + ParserElement.packrat_cache = ParserElement._UnboundedCache() + else: + ParserElement.packrat_cache = ParserElement._FifoCache(cache_size_limit) ParserElement._parse = ParserElement._parseCache def parseString( self, instring, parseAll=False ): - """Execute the parse expression with the given string. - This is the main interface to the client code, once the complete - expression has been built. - - If you want the grammar to require that the entire input string be - successfully parsed, then set C{parseAll} to True (equivalent to ending - the grammar with C{L{StringEnd()}}). - - Note: C{parseString} implicitly calls C{expandtabs()} on the input string, - in order to report proper column numbers in parse actions. - If the input string contains tabs and - the grammar uses parse actions that use the C{loc} argument to index into the - string being parsed, you can ensure you have a consistent view of the input - string by: - - calling C{parseWithTabs} on your grammar before calling C{parseString} - (see L{I{parseWithTabs}}) - - define your parse action using the full C{(s,loc,toks)} signature, and - reference the input string using the parse action's C{s} argument - - explicitly expand the tabs in your input string before calling - C{parseString} + """ + Execute the parse expression with the given string. + This is the main interface to the client code, once the complete + expression has been built. + + If you want the grammar to require that the entire input string be + successfully parsed, then set C{parseAll} to True (equivalent to ending + the grammar with C{L{StringEnd()}}). + + Note: C{parseString} implicitly calls C{expandtabs()} on the input string, + in order to report proper column numbers in parse actions. + If the input string contains tabs and + the grammar uses parse actions that use the C{loc} argument to index into the + string being parsed, you can ensure you have a consistent view of the input + string by: + - calling C{parseWithTabs} on your grammar before calling C{parseString} + (see L{I{parseWithTabs}}) + - define your parse action using the full C{(s,loc,toks)} signature, and + reference the input string using the parse action's C{s} argument + - explictly expand the tabs in your input string before calling + C{parseString} + + Example:: + Word('a').parseString('aaaaabaaa') # -> ['aaaaa'] + Word('a').parseString('aaaaabaaa', parseAll=True) # -> Exception: Expected end of text """ ParserElement.resetCache() if not self.streamlined: @@ -1139,14 +1615,35 @@ def parseString( self, instring, parseAll=False ): return tokens def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ): - """Scan the input string for expression matches. Each match will return the - matching tokens, start location, and end location. May be called with optional - C{maxMatches} argument, to clip scanning after 'n' matches are found. If - C{overlap} is specified, then overlapping matches will be reported. - - Note that the start and end locations are reported relative to the string - being parsed. See L{I{parseString}} for more information on parsing - strings with embedded tabs.""" + """ + Scan the input string for expression matches. Each match will return the + matching tokens, start location, and end location. May be called with optional + C{maxMatches} argument, to clip scanning after 'n' matches are found. If + C{overlap} is specified, then overlapping matches will be reported. + + Note that the start and end locations are reported relative to the string + being parsed. See L{I{parseString}} for more information on parsing + strings with embedded tabs. + + Example:: + source = "sldjf123lsdjjkf345sldkjf879lkjsfd987" + print(source) + for tokens,start,end in Word(alphas).scanString(source): + print(' '*start + '^'*(end-start)) + print(' '*start + tokens[0]) + + prints:: + + sldjf123lsdjjkf345sldkjf879lkjsfd987 + ^^^^^ + sldjf + ^^^^^^^ + lsdjjkf + ^^^^^^ + sldkjf + ^^^^^^ + lkjsfd + """ if not self.streamlined: self.streamline() for e in self.ignoreExprs: @@ -1189,12 +1686,22 @@ def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ): raise exc def transformString( self, instring ): - """Extension to C{L{scanString}}, to modify matching text with modified tokens that may - be returned from a parse action. To use C{transformString}, define a grammar and - attach a parse action to it that modifies the returned token list. - Invoking C{transformString()} on a target string will then scan for matches, - and replace the matched text patterns according to the logic in the parse - action. C{transformString()} returns the resulting transformed string.""" + """ + Extension to C{L{scanString}}, to modify matching text with modified tokens that may + be returned from a parse action. To use C{transformString}, define a grammar and + attach a parse action to it that modifies the returned token list. + Invoking C{transformString()} on a target string will then scan for matches, + and replace the matched text patterns according to the logic in the parse + action. C{transformString()} returns the resulting transformed string. + + Example:: + wd = Word(alphas) + wd.setParseAction(lambda toks: toks[0].title()) + + print(wd.transformString("now is the winter of our discontent made glorious summer by this sun of york.")) + Prints:: + Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York. + """ out = [] lastE = 0 # force preservation of s, to minimize unwanted transformation of string, and to @@ -1222,9 +1729,18 @@ def transformString( self, instring ): raise exc def searchString( self, instring, maxMatches=_MAX_INT ): - """Another extension to C{L{scanString}}, simplifying the access to the tokens found - to match the given parse expression. May be called with optional - C{maxMatches} argument, to clip searching after 'n' matches are found. + """ + Another extension to C{L{scanString}}, simplifying the access to the tokens found + to match the given parse expression. May be called with optional + C{maxMatches} argument, to clip searching after 'n' matches are found. + + Example:: + # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters + cap_word = Word(alphas.upper(), alphas.lower()) + + print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity")) + prints:: + ['More', 'Iron', 'Lead', 'Gold', 'I'] """ try: return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ]) @@ -1235,10 +1751,34 @@ def searchString( self, instring, maxMatches=_MAX_INT ): # catch and re-raise exception from here, clears out pyparsing internal stack trace raise exc + def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False): + """ + Generator method to split a string using the given expression as a separator. + May be called with optional C{maxsplit} argument, to limit the number of splits; + and the optional C{includeSeparators} argument (default=C{False}), if the separating + matching text should be included in the split results. + + Example:: + punc = oneOf(list(".,;:/-!?")) + print(list(punc.split("This, this?, this sentence, is badly punctuated!"))) + prints:: + ['This', ' this', '', ' this sentence', ' is badly punctuated', ''] + """ + splits = 0 + last = 0 + for t,s,e in self.scanString(instring, maxMatches=maxsplit): + yield instring[last:s] + if includeSeparators: + yield t[0] + last = e + yield instring[last:] + def __add__(self, other ): - """Implementation of + operator - returns C{L{And}}""" + """ + Implementation of + operator - returns C{L{And}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1246,9 +1786,11 @@ def __add__(self, other ): return And( [ self, other ] ) def __radd__(self, other ): - """Implementation of + operator when left operand is not a C{L{ParserElement}}""" + """ + Implementation of + operator when left operand is not a C{L{ParserElement}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1256,9 +1798,11 @@ def __radd__(self, other ): return other + self def __sub__(self, other): - """Implementation of - operator, returns C{L{And}} with error stop""" + """ + Implementation of - operator, returns C{L{And}} with error stop + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1266,9 +1810,11 @@ def __sub__(self, other): return And( [ self, And._ErrorStop(), other ] ) def __rsub__(self, other ): - """Implementation of - operator when left operand is not a C{L{ParserElement}}""" + """ + Implementation of - operator when left operand is not a C{L{ParserElement}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1276,24 +1822,24 @@ def __rsub__(self, other ): return other - self def __mul__(self,other): - """Implementation of * operator, allows use of C{expr * 3} in place of - C{expr + expr + expr}. Expressions may also me multiplied by a 2-integer - tuple, similar to C{{min,max}} multipliers in regular expressions. Tuples - may also include C{None} as in: - - C{expr*(n,None)} or C{expr*(n,)} is equivalent + """ + Implementation of * operator, allows use of C{expr * 3} in place of + C{expr + expr + expr}. Expressions may also me multiplied by a 2-integer + tuple, similar to C{{min,max}} multipliers in regular expressions. Tuples + may also include C{None} as in: + - C{expr*(n,None)} or C{expr*(n,)} is equivalent to C{expr*n + L{ZeroOrMore}(expr)} (read as "at least n instances of C{expr}") - - C{expr*(None,n)} is equivalent to C{expr*(0,n)} + - C{expr*(None,n)} is equivalent to C{expr*(0,n)} (read as "0 to n instances of C{expr}") - - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)} - - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)} - - Note that C{expr*(None,n)} does not raise an exception if - more than n exprs exist in the input stream; that is, - C{expr*(None,n)} does not enforce a maximum number of expr - occurrences. If this behavior is desired, then write - C{expr*(None,n) + ~expr} - + - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)} + - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)} + + Note that C{expr*(None,n)} does not raise an exception if + more than n exprs exist in the input stream; that is, + C{expr*(None,n)} does not enforce a maximum number of expr + occurrences. If this behavior is desired, then write + C{expr*(None,n) + ~expr} """ if isinstance(other,int): minElements, optElements = other,0 @@ -1347,9 +1893,11 @@ def __rmul__(self, other): return self.__mul__(other) def __or__(self, other ): - """Implementation of | operator - returns C{L{MatchFirst}}""" + """ + Implementation of | operator - returns C{L{MatchFirst}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1357,9 +1905,11 @@ def __or__(self, other ): return MatchFirst( [ self, other ] ) def __ror__(self, other ): - """Implementation of | operator when left operand is not a C{L{ParserElement}}""" + """ + Implementation of | operator when left operand is not a C{L{ParserElement}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1367,9 +1917,11 @@ def __ror__(self, other ): return other | self def __xor__(self, other ): - """Implementation of ^ operator - returns C{L{Or}}""" + """ + Implementation of ^ operator - returns C{L{Or}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1377,9 +1929,11 @@ def __xor__(self, other ): return Or( [ self, other ] ) def __rxor__(self, other ): - """Implementation of ^ operator when left operand is not a C{L{ParserElement}}""" + """ + Implementation of ^ operator when left operand is not a C{L{ParserElement}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1387,9 +1941,11 @@ def __rxor__(self, other ): return other ^ self def __and__(self, other ): - """Implementation of & operator - returns C{L{Each}}""" + """ + Implementation of & operator - returns C{L{Each}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1397,9 +1953,11 @@ def __and__(self, other ): return Each( [ self, other ] ) def __rand__(self, other ): - """Implementation of & operator when left operand is not a C{L{ParserElement}}""" + """ + Implementation of & operator when left operand is not a C{L{ParserElement}} + """ if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) if not isinstance( other, ParserElement ): warnings.warn("Cannot combine element of type %s with ParserElement" % type(other), SyntaxWarning, stacklevel=2) @@ -1407,41 +1965,49 @@ def __rand__(self, other ): return other & self def __invert__( self ): - """Implementation of ~ operator - returns C{L{NotAny}}""" + """ + Implementation of ~ operator - returns C{L{NotAny}} + """ return NotAny( self ) def __call__(self, name=None): - """Shortcut for C{L{setResultsName}}, with C{listAllMatches=default}:: - userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno") - could be written as:: - userdata = Word(alphas)("name") + Word(nums+"-")("socsecno") - - If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be - passed as C{True}. + """ + Shortcut for C{L{setResultsName}}, with C{listAllMatches=default}. + + If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be + passed as C{True}. - If C{name} is omitted, same as calling C{L{copy}}. - """ + If C{name} is omitted, same as calling C{L{copy}}. + + Example:: + # these are equivalent + userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno") + userdata = Word(alphas)("name") + Word(nums+"-")("socsecno") + """ if name is not None: return self.setResultsName(name) else: return self.copy() def suppress( self ): - """Suppresses the output of this C{ParserElement}; useful to keep punctuation from - cluttering up returned output. + """ + Suppresses the output of this C{ParserElement}; useful to keep punctuation from + cluttering up returned output. """ return Suppress( self ) def leaveWhitespace( self ): - """Disables the skipping of whitespace before matching the characters in the - C{ParserElement}'s defined pattern. This is normally only used internally by - the pyparsing module, but may be needed in some whitespace-sensitive grammars. + """ + Disables the skipping of whitespace before matching the characters in the + C{ParserElement}'s defined pattern. This is normally only used internally by + the pyparsing module, but may be needed in some whitespace-sensitive grammars. """ self.skipWhitespace = False return self def setWhitespaceChars( self, chars ): - """Overrides the default whitespace chars + """ + Overrides the default whitespace chars """ self.skipWhitespace = True self.whiteChars = chars @@ -1449,26 +2015,41 @@ def setWhitespaceChars( self, chars ): return self def parseWithTabs( self ): - """Overrides default behavior to expand C{}s to spaces before parsing the input string. - Must be called before C{parseString} when the input grammar contains elements that - match C{} characters.""" + """ + Overrides default behavior to expand C{}s to spaces before parsing the input string. + Must be called before C{parseString} when the input grammar contains elements that + match C{} characters. + """ self.keepTabs = True return self def ignore( self, other ): - """Define expression to be ignored (e.g., comments) while doing pattern - matching; may be called repeatedly, to define multiple comment or other - ignorable patterns. """ + Define expression to be ignored (e.g., comments) while doing pattern + matching; may be called repeatedly, to define multiple comment or other + ignorable patterns. + + Example:: + patt = OneOrMore(Word(alphas)) + patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj'] + + patt.ignore(cStyleComment) + patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd'] + """ + if isinstance(other, basestring): + other = Suppress(other) + if isinstance( other, Suppress ): if other not in self.ignoreExprs: - self.ignoreExprs.append( other.copy() ) + self.ignoreExprs.append(other) else: self.ignoreExprs.append( Suppress( other.copy() ) ) return self def setDebugActions( self, startAction, successAction, exceptionAction ): - """Enable display of debugging messages while doing pattern matching.""" + """ + Enable display of debugging messages while doing pattern matching. + """ self.debugActions = (startAction or _defaultStartDebugAction, successAction or _defaultSuccessDebugAction, exceptionAction or _defaultExceptionDebugAction) @@ -1476,8 +2057,39 @@ def setDebugActions( self, startAction, successAction, exceptionAction ): return self def setDebug( self, flag=True ): - """Enable display of debugging messages while doing pattern matching. - Set C{flag} to True to enable, False to disable.""" + """ + Enable display of debugging messages while doing pattern matching. + Set C{flag} to True to enable, False to disable. + + Example:: + wd = Word(alphas).setName("alphaword") + integer = Word(nums).setName("numword") + term = wd | integer + + # turn on debugging for wd + wd.setDebug() + + OneOrMore(term).parseString("abc 123 xyz 890") + + prints:: + Match alphaword at loc 0(1,1) + Matched alphaword -> ['abc'] + Match alphaword at loc 3(1,4) + Exception raised:Expected alphaword (at char 4), (line:1, col:5) + Match alphaword at loc 7(1,8) + Matched alphaword -> ['xyz'] + Match alphaword at loc 11(1,12) + Exception raised:Expected alphaword (at char 12), (line:1, col:13) + Match alphaword at loc 15(1,16) + Exception raised:Expected alphaword (at char 15), (line:1, col:16) + + The output shown is that produced by the default debug actions. Prior to attempting + to match the C{wd} expression, the debugging message C{"Match at loc (,)"} + is shown. Then if the parse succeeds, a C{"Matched"} message is shown, or an C{"Exception raised"} + message is shown. Also note the use of L{setName} to assign a human-readable name to the expression, + which makes debugging and exception messages easier to understand - for instance, the default + name created for the C{Word} expression without calling C{setName} is C{"W:(ABCD...)"}. + """ if flag: self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction ) else: @@ -1499,20 +2111,22 @@ def checkRecursion( self, parseElementList ): pass def validate( self, validateTrace=[] ): - """Check defined expressions for valid structure, check for infinite recursive definitions.""" + """ + Check defined expressions for valid structure, check for infinite recursive definitions. + """ self.checkRecursion( [] ) def parseFile( self, file_or_filename, parseAll=False ): - """Execute the parse expression on the given file or filename. - If a filename is specified (instead of a file object), - the entire file is opened, read, and closed before parsing. + """ + Execute the parse expression on the given file or filename. + If a filename is specified (instead of a file object), + the entire file is opened, read, and closed before parsing. """ try: file_contents = file_or_filename.read() except AttributeError: - f = open(file_or_filename, "r") - file_contents = f.read() - f.close() + with open(file_or_filename, "r") as f: + file_contents = f.read() try: return self.parseString(file_contents, parseAll) except ParseBaseException as exc: @@ -1524,13 +2138,9 @@ def parseFile( self, file_or_filename, parseAll=False ): def __eq__(self,other): if isinstance(other, ParserElement): - return self is other or self.__dict__ == other.__dict__ + return self is other or vars(self) == vars(other) elif isinstance(other, basestring): - try: - self.parseString(_ustr(other), parseAll=True) - return True - except ParseBaseException: - return False + return self.matches(other) else: return super(ParserElement,self)==other @@ -1546,40 +2156,161 @@ def __req__(self,other): def __rne__(self,other): return not (self == other) - def runTests(self, tests, parseAll=False): - """Execute the parse expression on a series of test strings, showing each - test, the parsed results or where the parse failed. Quick and easy way to - run a parse expression against a list of sample strings. + def matches(self, testString, parseAll=True): + """ + Method for quick testing of a parser against a test string. Good for simple + inline microtests of sub expressions while building up larger parser.0 - Parameters: - - tests - a list of separate test strings, or a multiline string of test strings - - parseAll - (default=False) - flag to pass to C{L{parseString}} when running tests + Parameters: + - testString - to test against this expression for a match + - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests + + Example:: + expr = Word(nums) + assert expr.matches("100") + """ + try: + self.parseString(_ustr(testString), parseAll=parseAll) + return True + except ParseBaseException: + return False + + def runTests(self, tests, parseAll=True, comment='#', fullDump=True, printResults=True, failureTests=False): + """ + Execute the parse expression on a series of test strings, showing each + test, the parsed results or where the parse failed. Quick and easy way to + run a parse expression against a list of sample strings. + + Parameters: + - tests - a list of separate test strings, or a multiline string of test strings + - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests + - comment - (default=C{'#'}) - expression for indicating embedded comments in the test + string; pass None to disable comment filtering + - fullDump - (default=C{True}) - dump results as list followed by results names in nested outline; + if False, only dump nested list + - printResults - (default=C{True}) prints test output to stdout + - failureTests - (default=C{False}) indicates if these tests are expected to fail parsing + + Returns: a (success, results) tuple, where success indicates that all tests succeeded + (or failed if C{failureTests} is True), and the results contain a list of lines of each + test's output + + Example:: + number_expr = pyparsing_common.number.copy() + + result = number_expr.runTests(''' + # unsigned integer + 100 + # negative integer + -100 + # float with scientific notation + 6.02e23 + # integer with scientific notation + 1e-12 + ''') + print("Success" if result[0] else "Failed!") + + result = number_expr.runTests(''' + # stray character + 100Z + # missing leading digit before '.' + -.100 + # too many '.' + 3.14.159 + ''', failureTests=True) + print("Success" if result[0] else "Failed!") + prints:: + # unsigned integer + 100 + [100] + + # negative integer + -100 + [-100] + + # float with scientific notation + 6.02e23 + [6.02e+23] + + # integer with scientific notation + 1e-12 + [1e-12] + + Success + + # stray character + 100Z + ^ + FAIL: Expected end of text (at char 3), (line:1, col:4) + + # missing leading digit before '.' + -.100 + ^ + FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1) + + # too many '.' + 3.14.159 + ^ + FAIL: Expected end of text (at char 4), (line:1, col:5) + + Success """ if isinstance(tests, basestring): - tests = map(str.strip, tests.splitlines()) + tests = list(map(str.strip, tests.rstrip().splitlines())) + if isinstance(comment, basestring): + comment = Literal(comment) + allResults = [] + comments = [] + success = True for t in tests: - out = [t] + if comment is not None and comment.matches(t, False) or comments and not t: + comments.append(t) + continue + if not t: + continue + out = ['\n'.join(comments), t] + comments = [] try: - out.append(self.parseString(t, parseAll=parseAll).dump()) - except ParseException as pe: + result = self.parseString(t, parseAll=parseAll) + out.append(result.dump(full=fullDump)) + success = success and not failureTests + except ParseBaseException as pe: + fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else "" if '\n' in t: out.append(line(pe.loc, t)) - out.append(' '*(col(pe.loc,t)-1) + '^') + out.append(' '*(col(pe.loc,t)-1) + '^' + fatal) else: - out.append(' '*pe.loc + '^') - out.append(str(pe)) - out.append('') - print('\n'.join(out)) + out.append(' '*pe.loc + '^' + fatal) + out.append("FAIL: " + str(pe)) + success = success and failureTests + result = pe + except Exception as exc: + out.append("FAIL-EXCEPTION: " + str(exc)) + success = success and failureTests + result = exc + + if printResults: + if fullDump: + out.append('') + print('\n'.join(out)) + + allResults.append((t, result)) + + return success, allResults class Token(ParserElement): - """Abstract C{ParserElement} subclass, for defining atomic matching patterns.""" + """ + Abstract C{ParserElement} subclass, for defining atomic matching patterns. + """ def __init__( self ): super(Token,self).__init__( savelist=False ) class Empty(Token): - """An empty token, will always match.""" + """ + An empty token, will always match. + """ def __init__( self ): super(Empty,self).__init__() self.name = "Empty" @@ -1588,7 +2319,9 @@ def __init__( self ): class NoMatch(Token): - """A token that will never match.""" + """ + A token that will never match. + """ def __init__( self ): super(NoMatch,self).__init__() self.name = "NoMatch" @@ -1601,7 +2334,19 @@ def parseImpl( self, instring, loc, doActions=True ): class Literal(Token): - """Token to exactly match a specified string.""" + """ + Token to exactly match a specified string. + + Example:: + Literal('blah').parseString('blah') # -> ['blah'] + Literal('blah').parseString('blahfooblah') # -> ['blah'] + Literal('blah').parseString('bla') # -> Exception: Expected "blah" + + For case-insensitive matching, use L{CaselessLiteral}. + + For keyword matching (force word break before and after the matched string), + use L{Keyword} or L{CaselessKeyword}. + """ def __init__( self, matchString ): super(Literal,self).__init__() self.match = matchString @@ -1627,17 +2372,24 @@ def parseImpl( self, instring, loc, doActions=True ): return loc+self.matchLen, self.match raise ParseException(instring, loc, self.errmsg, self) _L = Literal -ParserElement.literalStringClass = Literal +ParserElement._literalStringClass = Literal class Keyword(Token): - """Token to exactly match a specified string as a keyword, that is, it must be - immediately followed by a non-keyword character. Compare with C{L{Literal}}:: - Literal("if") will match the leading C{'if'} in C{'ifAndOnlyIf'}. - Keyword("if") will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'} - Accepts two optional constructor arguments in addition to the keyword string: - C{identChars} is a string of characters that would be valid identifier characters, - defaulting to all alphanumerics + "_" and "$"; C{caseless} allows case-insensitive - matching, default is C{False}. + """ + Token to exactly match a specified string as a keyword, that is, it must be + immediately followed by a non-keyword character. Compare with C{L{Literal}}: + - C{Literal("if")} will match the leading C{'if'} in C{'ifAndOnlyIf'}. + - C{Keyword("if")} will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'} + Accepts two optional constructor arguments in addition to the keyword string: + - C{identChars} is a string of characters that would be valid identifier characters, + defaulting to all alphanumerics + "_" and "$" + - C{caseless} allows case-insensitive matching, default is C{False}. + + Example:: + Keyword("start").parseString("start") # -> ['start'] + Keyword("start").parseString("starting") # -> Exception + + For case-insensitive matching, use L{CaselessKeyword}. """ DEFAULT_KEYWORD_CHARS = alphanums+"_$" @@ -1686,9 +2438,15 @@ def setDefaultKeywordChars( chars ): Keyword.DEFAULT_KEYWORD_CHARS = chars class CaselessLiteral(Literal): - """Token to match a specified string, ignoring case of letters. - Note: the matched results will always be in the case of the given - match string, NOT the case of the input text. + """ + Token to match a specified string, ignoring case of letters. + Note: the matched results will always be in the case of the given + match string, NOT the case of the input text. + + Example:: + OneOrMore(CaselessLiteral("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD'] + + (Contrast with example for L{CaselessKeyword}.) """ def __init__( self, matchString ): super(CaselessLiteral,self).__init__( matchString.upper() ) @@ -1703,6 +2461,14 @@ def parseImpl( self, instring, loc, doActions=True ): raise ParseException(instring, loc, self.errmsg, self) class CaselessKeyword(Keyword): + """ + Caseless version of L{Keyword}. + + Example:: + OneOrMore(CaselessKeyword("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD'] + + (Contrast with example for L{CaselessLiteral}.) + """ def __init__( self, matchString, identChars=Keyword.DEFAULT_KEYWORD_CHARS ): super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True ) @@ -1713,16 +2479,51 @@ def parseImpl( self, instring, loc, doActions=True ): raise ParseException(instring, loc, self.errmsg, self) class Word(Token): - """Token for matching words composed of allowed character sets. - Defined with string containing all allowed initial characters, - an optional string containing allowed body characters (if omitted, - defaults to the initial character set), and an optional minimum, - maximum, and/or exact length. The default value for C{min} is 1 (a - minimum value < 1 is not valid); the default values for C{max} and C{exact} - are 0, meaning no maximum or exact length restriction. An optional - C{exclude} parameter can list characters that might be found in - the input C{bodyChars} string; useful to define a word of all printables - except for one or two characters, for instance. + """ + Token for matching words composed of allowed character sets. + Defined with string containing all allowed initial characters, + an optional string containing allowed body characters (if omitted, + defaults to the initial character set), and an optional minimum, + maximum, and/or exact length. The default value for C{min} is 1 (a + minimum value < 1 is not valid); the default values for C{max} and C{exact} + are 0, meaning no maximum or exact length restriction. An optional + C{excludeChars} parameter can list characters that might be found in + the input C{bodyChars} string; useful to define a word of all printables + except for one or two characters, for instance. + + L{srange} is useful for defining custom character set strings for defining + C{Word} expressions, using range notation from regular expression character sets. + + A common mistake is to use C{Word} to match a specific literal string, as in + C{Word("Address")}. Remember that C{Word} uses the string argument to define + I{sets} of matchable characters. This expression would match "Add", "AAA", + "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'. + To match an exact literal string, use L{Literal} or L{Keyword}. + + pyparsing includes helper strings for building Words: + - L{alphas} + - L{nums} + - L{alphanums} + - L{hexnums} + - L{alphas8bit} (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.) + - L{punc8bit} (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.) + - L{printables} (any non-whitespace character) + + Example:: + # a word composed of digits + integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9")) + + # a word with a leading capital, and zero or more lowercase + capital_word = Word(alphas.upper(), alphas.lower()) + + # hostnames are alphanumeric, with leading alpha, and '-' + hostname = Word(alphas, alphanums+'-') + + # roman numeral (not a strict parser, accepts invalid mix of characters) + roman = Word("IVXLCDM") + + # any string of non-whitespace characters, except for ',' + csv_value = Word(printables, excludeChars=",") """ def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ): super(Word,self).__init__() @@ -1837,8 +2638,17 @@ def charsAsStr(s): class Regex(Token): - """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. + """ + 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...)}), these will be preserved as + named parse results. + + Example:: + realnum = Regex(r"[+-]?\d+\.\d*") + date = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)') + # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression + roman = Regex(r"M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") """ compiledREtype = type(re.compile("[A-Z]")) def __init__( self, pattern, flags=0): @@ -1846,7 +2656,7 @@ def __init__( self, pattern, flags=0): super(Regex,self).__init__() if isinstance(pattern, basestring): - if len(pattern) == 0: + if not pattern: warnings.warn("null string passed to Regex; use Empty() instead", SyntaxWarning, stacklevel=2) @@ -1901,23 +2711,36 @@ def __str__( self ): class QuotedString(Token): - """Token for matching strings that are delimited by quoting characters. + r""" + Token for matching strings that are delimited by quoting characters. + + Defined with the following parameters: + - quoteChar - string of one or more characters defining the quote delimiting string + - escChar - character to escape quotes, typically backslash (default=C{None}) + - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=C{None}) + - multiline - boolean indicating whether quotes can span multiple lines (default=C{False}) + - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True}) + - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar) + - convertWhitespaceEscapes - convert escaped whitespace (C{'\t'}, C{'\n'}, etc.) to actual whitespace (default=C{True}) + + Example:: + qs = QuotedString('"') + print(qs.searchString('lsjdf "This is the quote" sldjf')) + complex_qs = QuotedString('{{', endQuoteChar='}}') + print(complex_qs.searchString('lsjdf {{This is the "quote"}} sldjf')) + sql_qs = QuotedString('"', escQuote='""') + print(sql_qs.searchString('lsjdf "This is the quote with ""embedded"" quotes" sldjf')) + prints:: + [['This is the quote']] + [['This is the "quote"']] + [['This is the quote with "embedded" quotes']] """ - def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None): - """ - Defined with the following parameters: - - quoteChar - string of one or more characters defining the quote delimiting string - - escChar - character to escape quotes, typically backslash (default=None) - - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None) - - multiline - boolean indicating whether quotes can span multiple lines (default=C{False}) - - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True}) - - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar) - """ + def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None, convertWhitespaceEscapes=True): super(QuotedString,self).__init__() # remove white space from quote chars - wont work anyway quoteChar = quoteChar.strip() - if len(quoteChar) == 0: + if not quoteChar: warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) raise SyntaxError() @@ -1925,7 +2748,7 @@ def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unq endQuoteChar = quoteChar else: endQuoteChar = endQuoteChar.strip() - if len(endQuoteChar) == 0: + if not endQuoteChar: warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) raise SyntaxError() @@ -1937,6 +2760,7 @@ def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unq self.escChar = escChar self.escQuote = escQuote self.unquoteResults = unquoteResults + self.convertWhitespaceEscapes = convertWhitespaceEscapes if multiline: self.flags = re.MULTILINE | re.DOTALL @@ -1990,6 +2814,17 @@ def parseImpl( self, instring, loc, doActions=True ): ret = ret[self.quoteCharLen:-self.endQuoteCharLen] if isinstance(ret,basestring): + # replace escaped whitespace + if '\\' in ret and self.convertWhitespaceEscapes: + ws_map = { + r'\t' : '\t', + r'\n' : '\n', + r'\f' : '\f', + r'\r' : '\r', + } + for wslit,wschar in ws_map.items(): + ret = ret.replace(wslit, wschar) + # replace escaped characters if self.escChar: ret = re.sub(self.escCharReplacePattern,"\g<1>",ret) @@ -2013,11 +2848,20 @@ def __str__( self ): class CharsNotIn(Token): - """Token for matching words composed of characters *not* in a given set. - Defined with string containing all disallowed characters, and an optional - minimum, maximum, and/or exact length. The default value for C{min} is 1 (a - minimum value < 1 is not valid); the default values for C{max} and C{exact} - are 0, meaning no maximum or exact length restriction. + """ + Token for matching words composed of characters I{not} in a given set (will + include whitespace in matched characters if not listed in the provided exclusion set - see example). + Defined with string containing all disallowed characters, and an optional + minimum, maximum, and/or exact length. The default value for C{min} is 1 (a + minimum value < 1 is not valid); the default values for C{max} and C{exact} + are 0, meaning no maximum or exact length restriction. + + Example:: + # define a comma-separated-value as anything that is not a ',' + csv_value = CharsNotIn(',') + print(delimitedList(csv_value).parseString("dkls,lsdkjf,s12 34,@!#,213")) + prints:: + ['dkls', 'lsdkjf', 's12 34', '@!#', '213'] """ def __init__( self, notChars, min=1, max=0, exact=0 ): super(CharsNotIn,self).__init__() @@ -2075,11 +2919,13 @@ def __str__( self ): return self.strRepr class White(Token): - """Special matching class for matching whitespace. Normally, whitespace is ignored - by pyparsing grammars. This class is included when some whitespace structures - are significant. Define with a string containing the whitespace characters to be - matched; default is C{" \\t\\r\\n"}. Also takes optional C{min}, C{max}, and C{exact} arguments, - as defined for the C{L{Word}} class.""" + """ + Special matching class for matching whitespace. Normally, whitespace is ignored + by pyparsing grammars. This class is included when some whitespace structures + are significant. Define with a string containing the whitespace characters to be + matched; default is C{" \\t\\r\\n"}. Also takes optional C{min}, C{max}, and C{exact} arguments, + as defined for the C{L{Word}} class. + """ whiteStrs = { " " : "", "\t": "", @@ -2131,7 +2977,9 @@ def __init__( self ): self.mayIndexError = False class GoToColumn(_PositionToken): - """Token to advance to a specific column of input text; useful for tabular report scraping.""" + """ + Token to advance to a specific column of input text; useful for tabular report scraping. + """ def __init__( self, colno ): super(GoToColumn,self).__init__() self.col = colno @@ -2154,7 +3002,9 @@ def parseImpl( self, instring, loc, doActions=True ): return newloc, ret class LineStart(_PositionToken): - """Matches if current position is at the beginning of a line within the parse string""" + """ + Matches if current position is at the beginning of a line within the parse string + """ def __init__( self ): super(LineStart,self).__init__() self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") ) @@ -2174,7 +3024,9 @@ def parseImpl( self, instring, loc, doActions=True ): return loc, [] class LineEnd(_PositionToken): - """Matches if current position is at the end of a line within the parse string""" + """ + Matches if current position is at the end of a line within the parse string + """ def __init__( self ): super(LineEnd,self).__init__() self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") ) @@ -2192,7 +3044,9 @@ def parseImpl( self, instring, loc, doActions=True ): raise ParseException(instring, loc, self.errmsg, self) class StringStart(_PositionToken): - """Matches if current position is at the beginning of the parse string""" + """ + Matches if current position is at the beginning of the parse string + """ def __init__( self ): super(StringStart,self).__init__() self.errmsg = "Expected start of text" @@ -2205,7 +3059,9 @@ def parseImpl( self, instring, loc, doActions=True ): return loc, [] class StringEnd(_PositionToken): - """Matches if current position is at the end of the parse string""" + """ + Matches if current position is at the end of the parse string + """ def __init__( self ): super(StringEnd,self).__init__() self.errmsg = "Expected end of text" @@ -2221,11 +3077,12 @@ def parseImpl( self, instring, loc, doActions=True ): raise ParseException(instring, loc, self.errmsg, self) class WordStart(_PositionToken): - """Matches if the current position is at the beginning of a Word, and - is not preceded by any character in a given set of C{wordChars} - (default=C{printables}). To emulate the C{\b} behavior of regular expressions, - use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of - the string being parsed, or at the beginning of a line. + """ + Matches if the current position is at the beginning of a Word, and + is not preceded by any character in a given set of C{wordChars} + (default=C{printables}). To emulate the C{\b} behavior of regular expressions, + use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of + the string being parsed, or at the beginning of a line. """ def __init__(self, wordChars = printables): super(WordStart,self).__init__() @@ -2240,11 +3097,12 @@ def parseImpl(self, instring, loc, doActions=True ): return loc, [] class WordEnd(_PositionToken): - """Matches if the current position is at the end of a Word, and - is not followed by any character in a given set of C{wordChars} - (default=C{printables}). To emulate the C{\b} behavior of regular expressions, - use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of - the string being parsed, or at the end of a line. + """ + Matches if the current position is at the end of a Word, and + is not followed by any character in a given set of C{wordChars} + (default=C{printables}). To emulate the C{\b} behavior of regular expressions, + use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of + the string being parsed, or at the end of a line. """ def __init__(self, wordChars = printables): super(WordEnd,self).__init__() @@ -2262,18 +3120,21 @@ def parseImpl(self, instring, loc, doActions=True ): class ParseExpression(ParserElement): - """Abstract subclass of ParserElement, for combining and post-processing parsed tokens.""" + """ + Abstract subclass of ParserElement, for combining and post-processing parsed tokens. + """ def __init__( self, exprs, savelist = False ): super(ParseExpression,self).__init__(savelist) if isinstance( exprs, _generatorType ): exprs = list(exprs) if isinstance( exprs, basestring ): - self.exprs = [ Literal( exprs ) ] - elif isinstance( exprs, collections.Sequence ): + self.exprs = [ ParserElement._literalStringClass( exprs ) ] + elif isinstance( exprs, collections.Iterable ): + exprs = list(exprs) # if sequence of strings provided, wrap with Literal if all(isinstance(expr, basestring) for expr in exprs): - exprs = map(Literal, exprs) + exprs = map(ParserElement._literalStringClass, exprs) self.exprs = list(exprs) else: try: @@ -2351,7 +3212,7 @@ def streamline( self ): self.mayReturnEmpty |= other.mayReturnEmpty self.mayIndexError |= other.mayIndexError - self.errmsg = "Expected " + str(self) + self.errmsg = "Expected " + _ustr(self) return self @@ -2371,9 +3232,19 @@ def copy(self): return ret class And(ParseExpression): - """Requires all given C{ParseExpression}s to be found in the given order. - Expressions may be separated by whitespace. - May be constructed using the C{'+'} operator. + """ + Requires all given C{ParseExpression}s to be found in the given order. + Expressions may be separated by whitespace. + May be constructed using the C{'+'} operator. + May also be constructed using the C{'-'} operator, which will suppress backtracking. + + Example:: + integer = Word(nums) + name_expr = OneOrMore(Word(alphas)) + + expr = And([integer("id"),name_expr("name"),integer("age")]) + # more easily written as: + expr = integer("id") + name_expr("name") + integer("age") """ class _ErrorStop(Empty): @@ -2405,9 +3276,9 @@ def parseImpl( self, instring, loc, doActions=True ): raise except ParseBaseException as pe: pe.__traceback__ = None - raise ParseSyntaxException(pe) + raise ParseSyntaxException._from_exception(pe) except IndexError: - raise ParseSyntaxException( ParseException(instring, len(instring), self.errmsg, self) ) + raise ParseSyntaxException(instring, len(instring), self.errmsg, self) else: loc, exprtokens = e._parse( instring, loc, doActions ) if exprtokens or exprtokens.haskeys(): @@ -2416,7 +3287,7 @@ def parseImpl( self, instring, loc, doActions=True ): def __iadd__(self, other ): if isinstance( other, basestring ): - other = Literal( other ) + other = ParserElement._literalStringClass( other ) return self.append( other ) #And( [ self, other ] ) def checkRecursion( self, parseElementList ): @@ -2437,9 +3308,18 @@ def __str__( self ): class Or(ParseExpression): - """Requires that at least one C{ParseExpression} is found. - If two expressions match, the expression that matches the longest string will be used. - May be constructed using the C{'^'} operator. + """ + Requires that at least one C{ParseExpression} is found. + If two expressions match, the expression that matches the longest string will be used. + May be constructed using the C{'^'} operator. + + Example:: + # construct Or using '^' operator + + number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums)) + print(number.searchString("123 3.1416 789")) + prints:: + [['123'], ['3.1416'], ['789']] """ def __init__( self, exprs, savelist = False ): super(Or,self).__init__(exprs, savelist) @@ -2488,7 +3368,7 @@ def parseImpl( self, instring, loc, doActions=True ): def __ixor__(self, other ): if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) return self.append( other ) #Or( [ self, other ] ) def __str__( self ): @@ -2507,9 +3387,21 @@ def checkRecursion( self, parseElementList ): class MatchFirst(ParseExpression): - """Requires that at least one C{ParseExpression} is found. - If two expressions match, the first one listed is the one that will match. - May be constructed using the C{'|'} operator. + """ + Requires that at least one C{ParseExpression} is found. + If two expressions match, the first one listed is the one that will match. + May be constructed using the C{'|'} operator. + + Example:: + # construct MatchFirst using '|' operator + + # watch the order of expressions to match + number = Word(nums) | Combine(Word(nums) + '.' + Word(nums)) + print(number.searchString("123 3.1416 789")) # Fail! -> [['123'], ['3'], ['1416'], ['789']] + + # put more selective expression first + number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums) + print(number.searchString("123 3.1416 789")) # Better -> [['123'], ['3.1416'], ['789']] """ def __init__( self, exprs, savelist = False ): super(MatchFirst,self).__init__(exprs, savelist) @@ -2544,7 +3436,7 @@ def parseImpl( self, instring, loc, doActions=True ): def __ior__(self, other ): if isinstance( other, basestring ): - other = ParserElement.literalStringClass( other ) + other = ParserElement._literalStringClass( other ) return self.append( other ) #MatchFirst( [ self, other ] ) def __str__( self ): @@ -2563,9 +3455,58 @@ def checkRecursion( self, parseElementList ): class Each(ParseExpression): - """Requires all given C{ParseExpression}s to be found, but in any order. - Expressions may be separated by whitespace. - May be constructed using the C{'&'} operator. + """ + Requires all given C{ParseExpression}s to be found, but in any order. + Expressions may be separated by whitespace. + May be constructed using the C{'&'} operator. + + Example:: + color = oneOf("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN") + shape_type = oneOf("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON") + integer = Word(nums) + shape_attr = "shape:" + shape_type("shape") + posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn") + color_attr = "color:" + color("color") + size_attr = "size:" + integer("size") + + # use Each (using operator '&') to accept attributes in any order + # (shape and posn are required, color and size are optional) + shape_spec = shape_attr & posn_attr & Optional(color_attr) & Optional(size_attr) + + shape_spec.runTests(''' + shape: SQUARE color: BLACK posn: 100, 120 + shape: CIRCLE size: 50 color: BLUE posn: 50,80 + color:GREEN size:20 shape:TRIANGLE posn:20,40 + ''' + ) + prints:: + shape: SQUARE color: BLACK posn: 100, 120 + ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']] + - color: BLACK + - posn: ['100', ',', '120'] + - x: 100 + - y: 120 + - shape: SQUARE + + + shape: CIRCLE size: 50 color: BLUE posn: 50,80 + ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']] + - color: BLUE + - posn: ['50', ',', '80'] + - x: 50 + - y: 80 + - shape: CIRCLE + - size: 50 + + + color: GREEN size: 20 shape: TRIANGLE posn: 20,40 + ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']] + - color: GREEN + - posn: ['20', ',', '40'] + - x: 20 + - y: 40 + - shape: TRIANGLE + - size: 20 """ def __init__( self, exprs, savelist = True ): super(Each,self).__init__(exprs, savelist) @@ -2619,17 +3560,7 @@ def parseImpl( self, instring, loc, doActions=True ): loc,results = e._parse(instring,loc,doActions) resultlist.append(results) - finalResults = ParseResults([]) - for r in resultlist: - dups = {} - for k in r.keys(): - if k in finalResults: - tmp = ParseResults(finalResults[k]) - tmp += ParseResults(r[k]) - dups[k] = tmp - finalResults += ParseResults(r) - for k,v in dups.items(): - finalResults[k] = v + finalResults = sum(resultlist, ParseResults([])) return loc, finalResults def __str__( self ): @@ -2648,11 +3579,16 @@ def checkRecursion( self, parseElementList ): class ParseElementEnhance(ParserElement): - """Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.""" + """ + Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens. + """ def __init__( self, expr, savelist=False ): super(ParseElementEnhance,self).__init__(savelist) if isinstance( expr, basestring ): - expr = Literal(expr) + if issubclass(ParserElement._literalStringClass, Token): + expr = ParserElement._literalStringClass(expr) + else: + expr = ParserElement._literalStringClass(Literal(expr)) self.expr = expr self.strRepr = None if expr is not None: @@ -2720,10 +3656,22 @@ def __str__( self ): class FollowedBy(ParseElementEnhance): - """Lookahead matching of the given parse expression. C{FollowedBy} - does *not* advance the parsing position within the input string, it only + """ + Lookahead matching of the given parse expression. C{FollowedBy} + does I{not} advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current - position. C{FollowedBy} always returns a null token list.""" + position. C{FollowedBy} always returns a null token list. + + Example:: + # use FollowedBy to match a label only if it is followed by a ':' + data_word = Word(alphas) + label = data_word + FollowedBy(':') + attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)) + + OneOrMore(attr_expr).parseString("shape: SQUARE color: BLACK posn: upper left").pprint() + prints:: + [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']] + """ def __init__( self, expr ): super(FollowedBy,self).__init__(expr) self.mayReturnEmpty = True @@ -2734,11 +3682,16 @@ def parseImpl( self, instring, loc, doActions=True ): class NotAny(ParseElementEnhance): - """Lookahead to disallow matching with the given parse expression. C{NotAny} - does *not* advance the parsing position within the input string, it only - verifies that the specified parse expression does *not* match at the current - position. Also, C{NotAny} does *not* skip over leading whitespace. C{NotAny} - always returns a null token list. May be constructed using the '~' operator.""" + """ + Lookahead to disallow matching with the given parse expression. C{NotAny} + does I{not} advance the parsing position within the input string, it only + verifies that the specified parse expression does I{not} match at the current + position. Also, C{NotAny} does I{not} skip over leading whitespace. C{NotAny} + always returns a null token list. May be constructed using the '~' operator. + + Example:: + + """ def __init__( self, expr ): super(NotAny,self).__init__(expr) #~ self.leaveWhitespace() @@ -2747,11 +3700,7 @@ def __init__( self, expr ): self.errmsg = "Found unwanted token, "+_ustr(self.expr) def parseImpl( self, instring, loc, doActions=True ): - try: - self.expr.tryParse( instring, loc ) - except (ParseException,IndexError): - pass - else: + if self.expr.canParseNext(instring, loc): raise ParseException(instring, loc, self.errmsg, self) return loc, [] @@ -2764,80 +3713,114 @@ def __str__( self ): return self.strRepr - -class ZeroOrMore(ParseElementEnhance): - """Optional repetition of zero or more of the given expression.""" - def __init__( self, expr ): - super(ZeroOrMore,self).__init__(expr) - self.mayReturnEmpty = True +class _MultipleMatch(ParseElementEnhance): + def __init__( self, expr, stopOn=None): + super(_MultipleMatch, self).__init__(expr) + ender = stopOn + if isinstance(ender, basestring): + ender = ParserElement._literalStringClass(ender) + self.not_ender = ~ender if ender is not None else None def parseImpl( self, instring, loc, doActions=True ): - tokens = [] + self_expr_parse = self.expr._parse + self_skip_ignorables = self._skipIgnorables + check_ender = self.not_ender is not None + if check_ender: + try_not_ender = self.not_ender.tryParse + + # must be at least one (but first see if we are the stopOn sentinel; + # if so, fail) + if check_ender: + try_not_ender(instring, loc) + loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False ) try: - loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) - hasIgnoreExprs = ( len(self.ignoreExprs) > 0 ) + hasIgnoreExprs = (not not self.ignoreExprs) while 1: + if check_ender: + try_not_ender(instring, loc) if hasIgnoreExprs: - preloc = self._skipIgnorables( instring, loc ) + preloc = self_skip_ignorables( instring, loc ) else: preloc = loc - loc, tmptokens = self.expr._parse( instring, preloc, doActions ) + loc, tmptokens = self_expr_parse( instring, preloc, doActions ) if tmptokens or tmptokens.haskeys(): tokens += tmptokens except (ParseException,IndexError): pass return loc, tokens + +class OneOrMore(_MultipleMatch): + """ + Repetition of one or more of the given expression. + + Parameters: + - expr - expression that must match one or more times + - stopOn - (default=C{None}) - expression for a terminating sentinel + (only required if the sentinel would ordinarily match the repetition + expression) + + Example:: + data_word = Word(alphas) + label = data_word + FollowedBy(':') + attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join)) + + text = "shape: SQUARE posn: upper left color: BLACK" + OneOrMore(attr_expr).parseString(text).pprint() # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']] + + # use stopOn attribute for OneOrMore to avoid reading label string as part of the data + attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)) + OneOrMore(attr_expr).parseString(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']] + + # could also be written as + (attr_expr * (1,)).parseString(text).pprint() + """ def __str__( self ): if hasattr(self,"name"): return self.name if self.strRepr is None: - self.strRepr = "[" + _ustr(self.expr) + "]..." + self.strRepr = "{" + _ustr(self.expr) + "}..." return self.strRepr def setResultsName( self, name, listAllMatches=False ): - ret = super(ZeroOrMore,self).setResultsName(name,listAllMatches) + ret = super(OneOrMore,self).setResultsName(name,listAllMatches) ret.saveAsList = True return ret +class ZeroOrMore(_MultipleMatch): + """ + Optional repetition of zero or more of the given expression. + + Parameters: + - expr - expression that must match zero or more times + - stopOn - (default=C{None}) - expression for a terminating sentinel + (only required if the sentinel would ordinarily match the repetition + expression) -class OneOrMore(ParseElementEnhance): - """Repetition of one or more of the given expression.""" + Example: similar to L{OneOrMore} + """ + def __init__( self, expr, stopOn=None): + super(ZeroOrMore,self).__init__(expr, stopOn=stopOn) + self.mayReturnEmpty = True + def parseImpl( self, instring, loc, doActions=True ): - # must be at least one - loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False ) try: - hasIgnoreExprs = ( len(self.ignoreExprs) > 0 ) - while 1: - if hasIgnoreExprs: - preloc = self._skipIgnorables( instring, loc ) - else: - preloc = loc - loc, tmptokens = self.expr._parse( instring, preloc, doActions ) - if tmptokens or tmptokens.haskeys(): - tokens += tmptokens + return super(ZeroOrMore, self).parseImpl(instring, loc, doActions) except (ParseException,IndexError): - pass - - return loc, tokens + return loc, [] def __str__( self ): if hasattr(self,"name"): return self.name if self.strRepr is None: - self.strRepr = "{" + _ustr(self.expr) + "}..." + self.strRepr = "[" + _ustr(self.expr) + "]..." return self.strRepr - def setResultsName( self, name, listAllMatches=False ): - ret = super(OneOrMore,self).setResultsName(name,listAllMatches) - ret.saveAsList = True - return ret - class _NullToken(object): def __bool__(self): return False @@ -2847,9 +3830,39 @@ def __str__(self): _optionalNotMatched = _NullToken() class Optional(ParseElementEnhance): - """Optional matching of the given expression. - A default return string can also be specified, if the optional expression - is not found. + """ + Optional matching of the given expression. + + Parameters: + - expr - expression that must match zero or more times + - default (optional) - value to be returned if the optional expression is not found. + + Example:: + # US postal code can be a 5-digit zip, plus optional 4-digit qualifier + zip = Combine(Word(nums, exact=5) + Optional('-' + Word(nums, exact=4))) + zip.runTests(''' + # traditional ZIP code + 12345 + + # ZIP+4 form + 12101-0001 + + # invalid ZIP + 98765- + ''') + prints:: + # traditional ZIP code + 12345 + ['12345'] + + # ZIP+4 form + 12101-0001 + ['12101-0001'] + + # invalid ZIP + 98765- + ^ + FAIL: Expected end of text (at char 5), (line:1, col:6) """ def __init__( self, expr, default=_optionalNotMatched ): super(Optional,self).__init__( expr, savelist=False ) @@ -2879,13 +3892,60 @@ def __str__( self ): return self.strRepr - class SkipTo(ParseElementEnhance): - """Token for skipping over all undefined text until the matched expression is found. - If C{include} is set to true, the matched expression is also parsed (the skipped text - and matched expression are returned as a 2-element list). The C{ignore} - argument is used to define grammars (typically quoted strings and comments) that - might contain false matches. + """ + Token for skipping over all undefined text until the matched expression is found. + + Parameters: + - expr - target expression marking the end of the data to be skipped + - include - (default=C{False}) if True, the target expression is also parsed + (the skipped text and target expression are returned as a 2-element list). + - ignore - (default=C{None}) used to define grammars (typically quoted strings and + comments) that might contain false matches to the target expression + - failOn - (default=C{None}) define expressions that are not allowed to be + included in the skipped test; if found before the target expression is found, + the SkipTo is not a match + + Example:: + report = ''' + Outstanding Issues Report - 1 Jan 2000 + + # | Severity | Description | Days Open + -----+----------+-------------------------------------------+----------- + 101 | Critical | Intermittent system crash | 6 + 94 | Cosmetic | Spelling error on Login ('log|n') | 14 + 79 | Minor | System slow when running too many reports | 47 + ''' + integer = Word(nums) + SEP = Suppress('|') + # use SkipTo to simply match everything up until the next SEP + # - ignore quoted strings, so that a '|' character inside a quoted string does not match + # - parse action will call token.strip() for each matched token, i.e., the description body + string_data = SkipTo(SEP, ignore=quotedString) + string_data.setParseAction(tokenMap(str.strip)) + ticket_expr = (integer("issue_num") + SEP + + string_data("sev") + SEP + + string_data("desc") + SEP + + integer("days_open")) + + for tkt in ticket_expr.searchString(report): + print tkt.dump() + prints:: + ['101', 'Critical', 'Intermittent system crash', '6'] + - days_open: 6 + - desc: Intermittent system crash + - issue_num: 101 + - sev: Critical + ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14'] + - days_open: 14 + - desc: Spelling error on Login ('log|n') + - issue_num: 94 + - sev: Cosmetic + ['79', 'Minor', 'System slow when running too many reports', '47'] + - days_open: 47 + - desc: System slow when running too many reports + - issue_num: 79 + - sev: Minor """ def __init__( self, other, include=False, ignore=None, failOn=None ): super( SkipTo, self ).__init__( other ) @@ -2894,77 +3954,85 @@ def __init__( self, other, include=False, ignore=None, failOn=None ): self.mayIndexError = False self.includeMatch = include self.asList = False - if failOn is not None and isinstance(failOn, basestring): - self.failOn = Literal(failOn) + if isinstance(failOn, basestring): + self.failOn = ParserElement._literalStringClass(failOn) else: self.failOn = failOn self.errmsg = "No match found for "+_ustr(self.expr) def parseImpl( self, instring, loc, doActions=True ): - startLoc = loc + startloc = loc instrlen = len(instring) expr = self.expr - failParse = False - while loc <= instrlen: - try: - if self.failOn: + expr_parse = self.expr._parse + self_failOn_canParseNext = self.failOn.canParseNext if self.failOn is not None else None + self_ignoreExpr_tryParse = self.ignoreExpr.tryParse if self.ignoreExpr is not None else None + + tmploc = loc + while tmploc <= instrlen: + if self_failOn_canParseNext is not None: + # break if failOn expression matches + if self_failOn_canParseNext(instring, tmploc): + break + + if self_ignoreExpr_tryParse is not None: + # advance past ignore expressions + while 1: try: - self.failOn.tryParse(instring, loc) + tmploc = self_ignoreExpr_tryParse(instring, tmploc) except ParseBaseException: - pass - else: - failParse = True - raise ParseException(instring, loc, "Found expression " + str(self.failOn)) - failParse = False - if self.ignoreExpr is not None: - while 1: - try: - loc = self.ignoreExpr.tryParse(instring,loc) - # print("found ignoreExpr, advance to", loc) - except ParseBaseException: - break - expr._parse( instring, loc, doActions=False, callPreParse=False ) - skipText = instring[startLoc:loc] - if self.includeMatch: - loc,mat = expr._parse(instring,loc,doActions,callPreParse=False) - if mat: - skipRes = ParseResults( skipText ) - skipRes += mat - return loc, [ skipRes ] - else: - return loc, [ skipText ] - else: - return loc, [ skipText ] - except (ParseException,IndexError): - if failParse: - raise - else: - loc += 1 - raise ParseException(instring, loc, self.errmsg, self) + break + + try: + expr_parse(instring, tmploc, doActions=False, callPreParse=False) + except (ParseException, IndexError): + # no match, advance loc in string + tmploc += 1 + else: + # matched skipto expr, done + break + + else: + # ran off the end of the input string without matching skipto expr, fail + raise ParseException(instring, loc, self.errmsg, self) + + # build up return values + loc = tmploc + skiptext = instring[startloc:loc] + skipresult = ParseResults(skiptext) + + if self.includeMatch: + loc, mat = expr_parse(instring,loc,doActions,callPreParse=False) + skipresult += mat + + return loc, skipresult class Forward(ParseElementEnhance): - """Forward declaration of an expression to be defined later - - used for recursive grammars, such as algebraic infix notation. - When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator. - - Note: take care when assigning to C{Forward} not to overlook precedence of operators. - Specifically, '|' has a lower precedence than '<<', so that:: - fwdExpr << a | b | c - will actually be evaluated as:: - (fwdExpr << a) | b | c - thereby leaving b and c out as parseable alternatives. It is recommended that you - explicitly group the values inserted into the C{Forward}:: - fwdExpr << (a | b | c) - Converting to use the '<<=' operator instead will avoid this problem. + """ + Forward declaration of an expression to be defined later - + used for recursive grammars, such as algebraic infix notation. + When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator. + + Note: take care when assigning to C{Forward} not to overlook precedence of operators. + Specifically, '|' has a lower precedence than '<<', so that:: + fwdExpr << a | b | c + will actually be evaluated as:: + (fwdExpr << a) | b | c + thereby leaving b and c out as parseable alternatives. It is recommended that you + explicitly group the values inserted into the C{Forward}:: + fwdExpr << (a | b | c) + Converting to use the '<<=' operator instead will avoid this problem. + + See L{ParseResults.pprint} for an example of a recursive parser created using + C{Forward}. """ def __init__( self, other=None ): super(Forward,self).__init__( other, savelist=False ) def __lshift__( self, other ): if isinstance( other, basestring ): - other = ParserElement.literalStringClass(other) + other = ParserElement._literalStringClass(other) self.expr = other - self.mayReturnEmpty = other.mayReturnEmpty self.strRepr = None self.mayIndexError = self.expr.mayIndexError self.mayReturnEmpty = self.expr.mayReturnEmpty @@ -2998,7 +4066,9 @@ def validate( self, validateTrace=[] ): def __str__( self ): if hasattr(self,"name"): return self.name + return self.__class__.__name__ + ": ..." + # stubbed out for now - creates awful memory and perf issues self._revertClass = self.__class__ self.__class__ = _ForwardNoRecurse try: @@ -3023,26 +4093,29 @@ def __str__( self ): return "..." class TokenConverter(ParseElementEnhance): - """Abstract subclass of C{ParseExpression}, for converting parsed results.""" + """ + Abstract subclass of C{ParseExpression}, for converting parsed results. + """ def __init__( self, expr, savelist=False ): super(TokenConverter,self).__init__( expr )#, savelist ) self.saveAsList = False -class Upcase(TokenConverter): - """Converter to upper case all matching tokens.""" - def __init__(self, *args): - super(Upcase,self).__init__(*args) - warnings.warn("Upcase class is deprecated, use upcaseTokens parse action instead", - DeprecationWarning,stacklevel=2) - - def postParse( self, instring, loc, tokenlist ): - return list(map( str.upper, tokenlist )) - - class Combine(TokenConverter): - """Converter to concatenate all matching tokens to a single string. - By default, the matching patterns must also be contiguous in the input string; - this can be disabled by specifying C{'adjacent=False'} in the constructor. + """ + Converter to concatenate all matching tokens to a single string. + By default, the matching patterns must also be contiguous in the input string; + this can be disabled by specifying C{'adjacent=False'} in the constructor. + + Example:: + real = Word(nums) + '.' + Word(nums) + print(real.parseString('3.1416')) # -> ['3', '.', '1416'] + # will also erroneously match the following + print(real.parseString('3. 1416')) # -> ['3', '.', '1416'] + + real = Combine(Word(nums) + '.' + Word(nums)) + print(real.parseString('3.1416')) # -> ['3.1416'] + # no match when there are internal spaces + print(real.parseString('3. 1416')) # -> Exception: Expected W:(0123...) """ def __init__( self, expr, joinString="", adjacent=True ): super(Combine,self).__init__( expr ) @@ -3072,7 +4145,19 @@ def postParse( self, instring, loc, tokenlist ): return retToks class Group(TokenConverter): - """Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.""" + """ + Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions. + + Example:: + ident = Word(alphas) + num = Word(nums) + term = ident | num + func = ident + Optional(delimitedList(term)) + print(func.parseString("fn a,b,100")) # -> ['fn', 'a', 'b', '100'] + + func = ident + Group(Optional(delimitedList(term))) + print(func.parseString("fn a,b,100")) # -> ['fn', ['a', 'b', '100']] + """ def __init__( self, expr ): super(Group,self).__init__( expr ) self.saveAsList = True @@ -3081,9 +4166,40 @@ def postParse( self, instring, loc, tokenlist ): return [ tokenlist ] class Dict(TokenConverter): - """Converter to return a repetitive expression as a list, but also as a dictionary. - Each element can also be referenced using the first token in the expression as its key. - Useful for tabular report scraping when the first column can be used as a item key. + """ + Converter to return a repetitive expression as a list, but also as a dictionary. + Each element can also be referenced using the first token in the expression as its key. + Useful for tabular report scraping when the first column can be used as a item key. + + Example:: + data_word = Word(alphas) + label = data_word + FollowedBy(':') + attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join)) + + text = "shape: SQUARE posn: upper left color: light blue texture: burlap" + attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)) + + # print attributes as plain groups + print(OneOrMore(attr_expr).parseString(text).dump()) + + # instead of OneOrMore(expr), parse using Dict(OneOrMore(Group(expr))) - Dict will auto-assign names + result = Dict(OneOrMore(Group(attr_expr))).parseString(text) + print(result.dump()) + + # access named fields as dict entries, or output as dict + print(result['shape']) + print(result.asDict()) + prints:: + ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] + + [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] + - color: light blue + - posn: upper left + - shape: SQUARE + - texture: burlap + SQUARE + {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'} + See more examples at L{ParseResults} of accessing fields by results name. """ def __init__( self, expr ): super(Dict,self).__init__( expr ) @@ -3115,7 +4231,24 @@ def postParse( self, instring, loc, tokenlist ): class Suppress(TokenConverter): - """Converter for ignoring the results of a parsed expression.""" + """ + Converter for ignoring the results of a parsed expression. + + Example:: + source = "a, b, c,d" + wd = Word(alphas) + wd_list1 = wd + ZeroOrMore(',' + wd) + print(wd_list1.parseString(source)) + + # often, delimiters that are useful during parsing are just in the + # way afterward - use Suppress to keep them out of the parsed output + wd_list2 = wd + ZeroOrMore(Suppress(',') + wd) + print(wd_list2.parseString(source)) + prints:: + ['a', ',', 'b', ',', 'c', ',', 'd'] + ['a', 'b', 'c', 'd'] + (See also L{delimitedList}.) + """ def postParse( self, instring, loc, tokenlist ): return [] @@ -3124,7 +4257,9 @@ def suppress( self ): class OnlyOnce(object): - """Wrapper for parse actions, to ensure they are only called once.""" + """ + Wrapper for parse actions, to ensure they are only called once. + """ def __init__(self, methodCall): self.callable = _trim_arity(methodCall) self.called = False @@ -3138,20 +4273,36 @@ def reset(self): self.called = False def traceParseAction(f): - """Decorator for debugging parse actions.""" + """ + Decorator for debugging parse actions. + + Example:: + wd = Word(alphas) + + @traceParseAction + def remove_duplicate_chars(tokens): + return ''.join(sorted(set(''.join(tokens))) + + wds = OneOrMore(wd).setParseAction(remove_duplicate_chars) + print(wds.parseString("slkdjs sld sldd sdlf sdljf")) + prints:: + >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {})) + <3: thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc - sys.stderr.write( ">>entering %s(line: '%s', %d, %s)\n" % (thisFunc,line(l,s),l,t) ) + sys.stderr.write( ">>entering %s(line: '%s', %d, %r)\n" % (thisFunc,line(l,s),l,t) ) try: ret = f(*paArgs) except Exception as exc: sys.stderr.write( "< ['aa', 'bb', 'cc'] + delimitedList(Word(hexnums), delim=':', combine=True).parseString("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] """ dlName = _ustr(expr)+" ["+_ustr(delim)+" "+_ustr(expr)+"]..." if combine: @@ -3177,11 +4333,15 @@ def delimitedList( expr, delim=",", combine=False ): return ( expr + ZeroOrMore( Suppress( delim ) + expr ) ).setName(dlName) def countedArray( expr, intExpr=None ): - """Helper to define a counted list of expressions. - This helper defines a pattern of the form:: - integer expr expr expr... - where the leading integer tells how many expr expressions follow. - The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. + """ + Helper to define a counted list of expressions. + This helper defines a pattern of the form:: + integer expr expr expr... + where the leading integer tells how many expr expressions follow. + The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. + + Example:: + countedArray(Word(alphas)).parseString('2 ab cd ef') # -> ['ab', 'cd'] """ arrayExpr = Forward() def countFieldParseAction(s,l,t): @@ -3194,7 +4354,7 @@ def countFieldParseAction(s,l,t): intExpr = intExpr.copy() intExpr.setName("arrayLen") intExpr.addParseAction(countFieldParseAction, callDuringTry=True) - return ( intExpr + arrayExpr ) + return ( intExpr + arrayExpr ).setName('(len) ' + _ustr(expr) + '...') def _flatten(L): ret = [] @@ -3206,16 +4366,17 @@ def _flatten(L): return ret def matchPreviousLiteral(expr): - """Helper to define an expression that is indirectly defined from - the tokens matched in a previous expression, that is, it looks - for a 'repeat' of a previous expression. For example:: - first = Word(nums) - second = matchPreviousLiteral(first) - matchExpr = first + ":" + second - will match C{"1:1"}, but not C{"1:2"}. Because this matches a - previous literal, will also match the leading C{"1:1"} in C{"1:10"}. - If this is not desired, use C{matchPreviousExpr}. - Do *not* use with packrat parsing enabled. + """ + Helper to define an expression that is indirectly defined from + the tokens matched in a previous expression, that is, it looks + for a 'repeat' of a previous expression. For example:: + first = Word(nums) + second = matchPreviousLiteral(first) + matchExpr = first + ":" + second + will match C{"1:1"}, but not C{"1:2"}. Because this matches a + previous literal, will also match the leading C{"1:1"} in C{"1:10"}. + If this is not desired, use C{matchPreviousExpr}. + Do I{not} use with packrat parsing enabled. """ rep = Forward() def copyTokenToRepeater(s,l,t): @@ -3225,24 +4386,26 @@ def copyTokenToRepeater(s,l,t): else: # flatten t tokens tflat = _flatten(t.asList()) - rep << And( [ Literal(tt) for tt in tflat ] ) + rep << And(Literal(tt) for tt in tflat) else: rep << Empty() expr.addParseAction(copyTokenToRepeater, callDuringTry=True) + rep.setName('(prev) ' + _ustr(expr)) return rep def matchPreviousExpr(expr): - """Helper to define an expression that is indirectly defined from - the tokens matched in a previous expression, that is, it looks - for a 'repeat' of a previous expression. For example:: - first = Word(nums) - second = matchPreviousExpr(first) - matchExpr = first + ":" + second - will match C{"1:1"}, but not C{"1:2"}. Because this matches by - expressions, will *not* match the leading C{"1:1"} in C{"1:10"}; - the expressions are evaluated first, and then compared, so - C{"1"} is compared with C{"10"}. - Do *not* use with packrat parsing enabled. + """ + Helper to define an expression that is indirectly defined from + the tokens matched in a previous expression, that is, it looks + for a 'repeat' of a previous expression. For example:: + first = Word(nums) + second = matchPreviousExpr(first) + matchExpr = first + ":" + second + will match C{"1:1"}, but not C{"1:2"}. Because this matches by + expressions, will I{not} match the leading C{"1:1"} in C{"1:10"}; + the expressions are evaluated first, and then compared, so + C{"1"} is compared with C{"10"}. + Do I{not} use with packrat parsing enabled. """ rep = Forward() e2 = expr.copy() @@ -3255,6 +4418,7 @@ def mustMatchTheseTokens(s,l,t): raise ParseException("",0,"") rep.setParseAction( mustMatchTheseTokens, callDuringTry=True ) expr.addParseAction(copyTokenToRepeater, callDuringTry=True) + rep.setName('(prev) ' + _ustr(expr)) return rep def _escapeRegexRangeChars(s): @@ -3266,16 +4430,27 @@ def _escapeRegexRangeChars(s): return _ustr(s) def oneOf( strs, caseless=False, useRegex=True ): - """Helper to quickly define a set of alternative Literals, and makes sure to do - longest-first testing when there is a conflict, regardless of the input order, - but returns a C{L{MatchFirst}} for best performance. - - Parameters: - - strs - a string of space-delimited literals, or a list of string literals - - caseless - (default=False) - treat all literals as caseless - - useRegex - (default=True) - as an optimization, will generate a Regex + """ + Helper to quickly define a set of alternative Literals, and makes sure to do + longest-first testing when there is a conflict, regardless of the input order, + but returns a C{L{MatchFirst}} for best performance. + + Parameters: + - strs - a string of space-delimited literals, or a collection of string literals + - caseless - (default=C{False}) - treat all literals as caseless + - useRegex - (default=C{True}) - as an optimization, will generate a Regex object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or if creating a C{Regex} raises an exception) + + Example:: + comp_oper = oneOf("< = > <= >= !=") + var = Word(alphas) + number = Word(nums) + term = var | number + comparison_expr = term + comp_oper + term + print(comparison_expr.searchString("B = 12 AA=23 B<=AA AA>12")) + prints:: + [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] """ if caseless: isequal = ( lambda a,b: a.upper() == b.upper() ) @@ -3289,12 +4464,10 @@ def oneOf( strs, caseless=False, useRegex=True ): symbols = [] if isinstance(strs,basestring): symbols = strs.split() - elif isinstance(strs, collections.Sequence): - symbols = list(strs[:]) - elif isinstance(strs, _generatorType): + elif isinstance(strs, collections.Iterable): symbols = list(strs) else: - warnings.warn("Invalid argument to oneOf, expected string or list", + warnings.warn("Invalid argument to oneOf, expected string or iterable", SyntaxWarning, stacklevel=2) if not symbols: return NoMatch() @@ -3318,41 +4491,76 @@ def oneOf( strs, caseless=False, useRegex=True ): #~ print (strs,"->", "|".join( [ _escapeRegexChars(sym) for sym in symbols] )) try: if len(symbols)==len("".join(symbols)): - return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ) + return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ).setName(' | '.join(symbols)) else: - return Regex( "|".join(re.escape(sym) for sym in symbols) ) + return Regex( "|".join(re.escape(sym) for sym in symbols) ).setName(' | '.join(symbols)) except: warnings.warn("Exception creating Regex for oneOf, building MatchFirst", SyntaxWarning, stacklevel=2) # last resort, just use MatchFirst - return MatchFirst( [ parseElementClass(sym) for sym in symbols ] ) + return MatchFirst(parseElementClass(sym) for sym in symbols).setName(' | '.join(symbols)) def dictOf( key, value ): - """Helper to easily and clearly define a dictionary by specifying the respective patterns - for the key and value. Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens - in the proper order. The key pattern can include delimiting markers or punctuation, - as long as they are suppressed, thereby leaving the significant key text. The value - pattern can include named results, so that the C{Dict} results can include named token - fields. + """ + Helper to easily and clearly define a dictionary by specifying the respective patterns + for the key and value. Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens + in the proper order. The key pattern can include delimiting markers or punctuation, + as long as they are suppressed, thereby leaving the significant key text. The value + pattern can include named results, so that the C{Dict} results can include named token + fields. + + Example:: + text = "shape: SQUARE posn: upper left color: light blue texture: burlap" + attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)) + print(OneOrMore(attr_expr).parseString(text).dump()) + + attr_label = label + attr_value = Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join) + + # similar to Dict, but simpler call format + result = dictOf(attr_label, attr_value).parseString(text) + print(result.dump()) + print(result['shape']) + print(result.shape) # object attribute access works too + print(result.asDict()) + prints:: + [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] + - color: light blue + - posn: upper left + - shape: SQUARE + - texture: burlap + SQUARE + SQUARE + {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} """ return Dict( ZeroOrMore( Group ( key + value ) ) ) def originalTextFor(expr, asString=True): - """Helper to return the original, untokenized text for a given expression. Useful to - restore the parsed fields of an HTML start tag into the raw tag text itself, or to - revert separate tokens with intervening whitespace back to the original matching - input text. Simpler to use than the parse action C{L{keepOriginalText}}, and does not - require the inspect module to chase up the call stack. By default, returns a - string containing the original parsed text. + """ + Helper to return the original, untokenized text for a given expression. Useful to + restore the parsed fields of an HTML start tag into the raw tag text itself, or to + revert separate tokens with intervening whitespace back to the original matching + input text. By default, returns astring containing the original parsed text. - If the optional C{asString} argument is passed as C{False}, then the return value is a - C{L{ParseResults}} containing any results names that were originally matched, and a - single token containing the original matched text from the input string. So if - the expression passed to C{L{originalTextFor}} contains expressions with defined - results names, you must set C{asString} to C{False} if you want to preserve those - results name values.""" + If the optional C{asString} argument is passed as C{False}, then the return value is a + C{L{ParseResults}} containing any results names that were originally matched, and a + single token containing the original matched text from the input string. So if + the expression passed to C{L{originalTextFor}} contains expressions with defined + results names, you must set C{asString} to C{False} if you want to preserve those + results name values. + + Example:: + src = "this is test bold text normal text " + for tag in ("b","i"): + opener,closer = makeHTMLTags(tag) + patt = originalTextFor(opener + SkipTo(closer) + closer) + print(patt.searchString(src)[0]) + prints:: + [' bold text '] + ['text'] + """ locMarker = Empty().setParseAction(lambda s,loc,t: loc) endlocMarker = locMarker.copy() endlocMarker.callPreparse = False @@ -3361,27 +4569,37 @@ def originalTextFor(expr, asString=True): extractText = lambda s,l,t: s[t._original_start:t._original_end] else: def extractText(s,l,t): - del t[:] - t.insert(0, s[t._original_start:t._original_end]) - del t["_original_start"] - del t["_original_end"] + t[:] = [s[t.pop('_original_start'):t.pop('_original_end')]] matchExpr.setParseAction(extractText) + matchExpr.ignoreExprs = expr.ignoreExprs return matchExpr def ungroup(expr): - """Helper to undo pyparsing's default grouping of And expressions, even - if all but one are non-empty.""" + """ + Helper to undo pyparsing's default grouping of And expressions, even + if all but one are non-empty. + """ return TokenConverter(expr).setParseAction(lambda t:t[0]) def locatedExpr(expr): - """Helper to decorate a returned token with its starting and ending locations in the input string. - This helper adds the following results names: - - locn_start = location where matched expression begins - - locn_end = location where matched expression ends - - value = the actual parsed results - - Be careful if the input text contains C{} characters, you may want to call - C{L{ParserElement.parseWithTabs}} + """ + Helper to decorate a returned token with its starting and ending locations in the input string. + This helper adds the following results names: + - locn_start = location where matched expression begins + - locn_end = location where matched expression ends + - value = the actual parsed results + + Be careful if the input text contains C{} characters, you may want to call + C{L{ParserElement.parseWithTabs}} + + Example:: + wd = Word(alphas) + for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): + print(match) + prints:: + [[0, 'ljsdf', 5]] + [[8, 'lksdjjf', 15]] + [[18, 'lkkjj', 23]] """ locator = Empty().setParseAction(lambda s,l,t: l) return Group(locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end")) @@ -3402,21 +4620,22 @@ def locatedExpr(expr): _reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]" def srange(s): - r"""Helper to easily define string ranges for use in Word construction. Borrows - syntax from regexp '[]' string range definitions:: - srange("[0-9]") -> "0123456789" - srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" - srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" - The input string must be enclosed in []'s, and the returned string is the expanded - character set joined into a single string. - The values enclosed in the []'s may be:: - a single character - an escaped character with a leading backslash (such as \- or \]) - an escaped hex character with a leading '\x' (\x21, which is a '!' character) - (\0x## is also supported for backwards compatibility) - an escaped octal character with a leading '\0' (\041, which is a '!' character) - a range of any of the above, separated by a dash ('a-z', etc.) - any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.) + r""" + Helper to easily define string ranges for use in Word construction. Borrows + syntax from regexp '[]' string range definitions:: + srange("[0-9]") -> "0123456789" + srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" + srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" + The input string must be enclosed in []'s, and the returned string is the expanded + character set joined into a single string. + The values enclosed in the []'s may be: + - a single character + - an escaped character with a leading backslash (such as C{\-} or C{\]}) + - an escaped hex character with a leading C{'\x'} (C{\x21}, which is a C{'!'} character) + (C{\0x##} is also supported for backwards compatibility) + - an escaped octal character with a leading C{'\0'} (C{\041}, which is a C{'!'} character) + - a range of any of the above, separated by a dash (C{'a-z'}, etc.) + - any combination of the above (C{'aeiouy'}, C{'a-zA-Z0-9_$'}, etc.) """ _expanded = lambda p: p if not isinstance(p,ParseResults) else ''.join(unichr(c) for c in range(ord(p[0]),ord(p[1])+1)) try: @@ -3425,8 +4644,9 @@ def srange(s): return "" def matchOnlyAtCol(n): - """Helper method for defining parse actions that require matching at a specific - column in the input text. + """ + Helper method for defining parse actions that require matching at a specific + column in the input text. """ def verifyCol(strg,locn,toks): if col(locn,strg) != n: @@ -3434,57 +4654,83 @@ def verifyCol(strg,locn,toks): return verifyCol def replaceWith(replStr): - """Helper method for common parse actions that simply return a literal value. Especially - useful when used with C{L{transformString}()}. """ - #def _replFunc(*args): - # return [replStr] - #return _replFunc - return functools.partial(next, itertools.repeat([replStr])) + Helper method for common parse actions that simply return a literal value. Especially + useful when used with C{L{transformString}()}. + + Example:: + num = Word(nums).setParseAction(lambda toks: int(toks[0])) + na = oneOf("N/A NA").setParseAction(replaceWith(math.nan)) + term = na | num + + OneOrMore(term).parseString("324 234 N/A 234") # -> [324, 234, nan, 234] + """ + return lambda s,l,t: [replStr] def removeQuotes(s,l,t): - """Helper parse action for removing quotation marks from parsed quoted strings. - To use, add this parse action to quoted string using:: - quotedString.setParseAction( removeQuotes ) """ - return t[0][1:-1] + Helper parse action for removing quotation marks from parsed quoted strings. -def upcaseTokens(s,l,t): - """Helper parse action to convert tokens to upper case.""" - return [ tt.upper() for tt in map(_ustr,t) ] + Example:: + # by default, quotation marks are included in parsed results + quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"] -def downcaseTokens(s,l,t): - """Helper parse action to convert tokens to lower case.""" - return [ tt.lower() for tt in map(_ustr,t) ] + # use removeQuotes to strip quotation marks from parsed results + quotedString.setParseAction(removeQuotes) + quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"] + """ + return t[0][1:-1] + +def tokenMap(func, *args): + """ + Helper to define a parse action by mapping a function to all elements of a ParseResults list.If any additional + args are passed, they are forwarded to the given function as additional arguments after + the token, as in C{hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))}, which will convert the + parsed data to an integer using base 16. + + Example (compare the last to example in L{ParserElement.transformString}:: + hex_ints = OneOrMore(Word(hexnums)).setParseAction(tokenMap(int, 16)) + hex_ints.runTests(''' + 00 11 22 aa FF 0a 0d 1a + ''') + + upperword = Word(alphas).setParseAction(tokenMap(str.upper)) + OneOrMore(upperword).runTests(''' + my kingdom for a horse + ''') + + wd = Word(alphas).setParseAction(tokenMap(str.title)) + OneOrMore(wd).setParseAction(' '.join).runTests(''' + now is the winter of our discontent made glorious summer by this sun of york + ''') + prints:: + 00 11 22 aa FF 0a 0d 1a + [0, 17, 34, 170, 255, 10, 13, 26] + + my kingdom for a horse + ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] + + now is the winter of our discontent made glorious summer by this sun of york + ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York'] + """ + def pa(s,l,t): + return [func(tokn, *args) for tokn in t] -def keepOriginalText(s,startLoc,t): - """DEPRECATED - use new helper method C{L{originalTextFor}}. - Helper parse action to preserve original parsed text, - overriding any nested parse actions.""" - try: - endloc = getTokensEndLoc() - except ParseException: - raise ParseFatalException("incorrect usage of keepOriginalText - may only be called as a parse action") - del t[:] - t += ParseResults(s[startLoc:endloc]) - return t - -def getTokensEndLoc(): - """Method to be called from within a parse action to determine the end - location of the parsed tokens.""" - import inspect - fstack = inspect.stack() try: - # search up the stack (through intervening argument normalizers) for correct calling routine - for f in fstack[2:]: - if f[3] == "_parseNoCache": - endloc = f[0].f_locals["loc"] - return endloc - else: - raise ParseFatalException("incorrect usage of getTokensEndLoc - may only be called from within a parse action") - finally: - del fstack + func_name = getattr(func, '__name__', + getattr(func, '__class__').__name__) + except Exception: + func_name = str(func) + pa.__name__ = func_name + return pa + +upcaseTokens = tokenMap(lambda t: _ustr(t).upper()) +"""Helper parse action to convert tokens to upper case.""" + +downcaseTokens = tokenMap(lambda t: _ustr(t).lower()) +"""Helper parse action to convert tokens to lower case.""" + def _makeTags(tagStr, xml): """Internal helper to construct opening and closing tag expressions, given a tag name""" if isinstance(tagStr,basestring): @@ -3508,40 +4754,90 @@ def _makeTags(tagStr, xml): Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">") closeTag = Combine(_L("") - openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % tagStr) - closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % tagStr) + openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % resname) + closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % resname) openTag.tag = resname closeTag.tag = resname return openTag, closeTag def makeHTMLTags(tagStr): - """Helper to construct opening and closing tag expressions for HTML, given a tag name""" + """ + Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches + tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. + + Example:: + text = 'More info at the pyparsing wiki page' + # makeHTMLTags returns pyparsing expressions for the opening and closing tags as a 2-tuple + a,a_end = makeHTMLTags("A") + link_expr = a + SkipTo(a_end)("link_text") + a_end + + for link in link_expr.searchString(text): + # attributes in the tag (like "href" shown here) are also accessible as named results + print(link.link_text, '->', link.href) + prints:: + pyparsing -> http://pyparsing.wikispaces.com + """ return _makeTags( tagStr, False ) def makeXMLTags(tagStr): - """Helper to construct opening and closing tag expressions for XML, given a tag name""" + """ + Helper to construct opening and closing tag expressions for XML, given a tag name. Matches + tags only in the given upper/lower case. + + Example: similar to L{makeHTMLTags} + """ return _makeTags( tagStr, True ) def withAttribute(*args,**attrDict): - """Helper to create a validating parse action to be used with start tags created - with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag - with a required attribute value, to avoid false matches on common tags such as - C{} or C{

    }. - - Call C{withAttribute} with a series of attribute names and values. Specify the list - of filter attributes names and values as: - - keyword arguments, as in C{(align="right")}, or - - as an explicit dict with C{**} operator, when an attribute name is also a Python + """ + Helper to create a validating parse action to be used with start tags created + with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag + with a required attribute value, to avoid false matches on common tags such as + C{} or C{
    }. + + Call C{withAttribute} with a series of attribute names and values. Specify the list + of filter attributes names and values as: + - keyword arguments, as in C{(align="right")}, or + - as an explicit dict with C{**} operator, when an attribute name is also a Python reserved word, as in C{**{"class":"Customer", "align":"right"}} - - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) - For attribute names with a namespace prefix, you must use the second form. Attribute - names are matched insensitive to upper/lower case. + - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) + For attribute names with a namespace prefix, you must use the second form. Attribute + names are matched insensitive to upper/lower case. - If just testing for C{class} (with or without a namespace), use C{L{withClass}}. - - To verify that the attribute exists, but without specifying a value, pass - C{withAttribute.ANY_VALUE} as the value. - """ + If just testing for C{class} (with or without a namespace), use C{L{withClass}}. + + To verify that the attribute exists, but without specifying a value, pass + C{withAttribute.ANY_VALUE} as the value. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this has no type
    +
    + + ''' + div,div_end = makeHTMLTags("div") + + # only match div tag having a type attribute with value "grid" + div_grid = div().setParseAction(withAttribute(type="grid")) + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + # construct a match with any div tag having a type attribute, regardless of the value + div_any_type = div().setParseAction(withAttribute(type=withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ if args: attrs = args[:] else: @@ -3558,9 +4854,37 @@ def pa(s,l,tokens): withAttribute.ANY_VALUE = object() def withClass(classname, namespace=''): - """Simplified version of C{L{withAttribute}} when matching on a div class - made - difficult because C{class} is a reserved word in Python. - """ + """ + Simplified version of C{L{withAttribute}} when matching on a div class - made + difficult because C{class} is a reserved word in Python. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this <div> has no class
    +
    + + ''' + div,div_end = makeHTMLTags("div") + div_grid = div().setParseAction(withClass("grid")) + + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + div_any_type = div().setParseAction(withClass(withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ classattr = "%s:class" % namespace if namespace else "class" return withAttribute(**{classattr : classname}) @@ -3569,40 +4893,69 @@ def withClass(classname, namespace=''): opAssoc.RIGHT = object() def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): - """Helper method for constructing grammars of expressions made up of - operators working in a precedence hierarchy. Operators may be unary or - binary, left- or right-associative. Parse actions can also be attached - to operator expressions. - - Parameters: - - baseExpr - expression representing the most basic element for the nested - - opList - list of tuples, one for each operator precedence level in the - expression grammar; each tuple is of the form - (opExpr, numTerms, rightLeftAssoc, parseAction), where: - - opExpr is the pyparsing expression for the operator; - may also be a string, which will be converted to a Literal; - if numTerms is 3, opExpr is a tuple of two expressions, for the - two operators separating the 3 terms - - numTerms is the number of terms for this operator (must - be 1, 2, or 3) - - rightLeftAssoc is the indicator whether the operator is - right or left associative, using the pyparsing-defined - 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) - - lpar - expression for matching left-parentheses (default=Suppress('(')) - - rpar - expression for matching right-parentheses (default=Suppress(')')) + """ + Helper method for constructing grammars of expressions made up of + operators working in a precedence hierarchy. Operators may be unary or + binary, left- or right-associative. Parse actions can also be attached + to operator expressions. + + Parameters: + - baseExpr - expression representing the most basic element for the nested + - opList - list of tuples, one for each operator precedence level in the + expression grammar; each tuple is of the form + (opExpr, numTerms, rightLeftAssoc, parseAction), where: + - opExpr is the pyparsing expression for the operator; + may also be a string, which will be converted to a Literal; + if numTerms is 3, opExpr is a tuple of two expressions, for the + two operators separating the 3 terms + - numTerms is the number of terms for this operator (must + be 1, 2, or 3) + - rightLeftAssoc is the indicator whether the operator is + right or left associative, using the pyparsing-defined + 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) + - lpar - expression for matching left-parentheses (default=C{Suppress('(')}) + - rpar - expression for matching right-parentheses (default=C{Suppress(')')}) + + Example:: + # simple example of four-function arithmetic with ints and variable names + integer = pyparsing_common.signedInteger + varname = pyparsing_common.identifier + + arith_expr = infixNotation(integer | varname, + [ + ('-', 1, opAssoc.RIGHT), + (oneOf('* /'), 2, opAssoc.LEFT), + (oneOf('+ -'), 2, opAssoc.LEFT), + ]) + + arith_expr.runTests(''' + 5+3*6 + (5+3)*6 + -2--11 + ''', fullDump=False) + prints:: + 5+3*6 + [[5, '+', [3, '*', 6]]] + + (5+3)*6 + [[[5, '+', 3], '*', 6]] + + -2--11 + [[['-', 2], '-', ['-', 11]]] """ ret = Forward() lastExpr = baseExpr | ( lpar + ret + rpar ) for i,operDef in enumerate(opList): opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] + termName = "%s term" % opExpr if arity < 3 else "%s%s term" % opExpr if arity == 3: if opExpr is None or len(opExpr) != 2: raise ValueError("if numterms=3, opExpr must be a tuple or list of two expressions") opExpr1, opExpr2 = opExpr - thisExpr = Forward()#.setName("expr%d" % i) + thisExpr = Forward().setName(termName) if rightLeftAssoc == opAssoc.LEFT: if arity == 1: matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) @@ -3636,37 +4989,77 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): raise ValueError("operator must indicate right or left associativity") if pa: matchExpr.setParseAction( pa ) - thisExpr <<= ( matchExpr | lastExpr ) + thisExpr <<= ( matchExpr.setName(termName) | lastExpr ) lastExpr = thisExpr ret <<= lastExpr return ret + operatorPrecedence = infixNotation +"""(Deprecated) Former name of C{L{infixNotation}}, will be dropped in a future release.""" -dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"').setName("string enclosed in double quotes") -sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'").setName("string enclosed in single quotes") -quotedString = Regex(r'''(?:"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*')''').setName("quotedString using single or double quotes") -unicodeString = Combine(_L('u') + quotedString.copy()) +dblQuotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"').setName("string enclosed in double quotes") +sglQuotedString = Combine(Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("string enclosed in single quotes") +quotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"'| + Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("quotedString using single or double quotes") +unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal") def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()): - """Helper method for defining nested lists enclosed in opening and closing - delimiters ("(" and ")" are the default). - - Parameters: - - opener - opening character for a nested list (default="("); can also be a pyparsing expression - - closer - closing character for a nested list (default=")"); can also be a pyparsing expression - - content - expression for items within the nested lists (default=None) - - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString) - - If an expression is not provided for the content argument, the nested - expression will capture all whitespace-delimited content between delimiters - as a list of separate values. - - Use the C{ignoreExpr} argument to define expressions that may contain - opening or closing characters that should not be treated as opening - or closing characters for nesting, such as quotedString or a comment - expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. - The default is L{quotedString}, but if no expressions are to be ignored, - then pass C{None} for this argument. + """ + Helper method for defining nested lists enclosed in opening and closing + delimiters ("(" and ")" are the default). + + Parameters: + - opener - opening character for a nested list (default=C{"("}); can also be a pyparsing expression + - closer - closing character for a nested list (default=C{")"}); can also be a pyparsing expression + - content - expression for items within the nested lists (default=C{None}) + - ignoreExpr - expression for ignoring opening and closing delimiters (default=C{quotedString}) + + If an expression is not provided for the content argument, the nested + expression will capture all whitespace-delimited content between delimiters + as a list of separate values. + + Use the C{ignoreExpr} argument to define expressions that may contain + opening or closing characters that should not be treated as opening + or closing characters for nesting, such as quotedString or a comment + expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. + The default is L{quotedString}, but if no expressions are to be ignored, + then pass C{None} for this argument. + + Example:: + data_type = oneOf("void int short long char float double") + decl_data_type = Combine(data_type + Optional(Word('*'))) + ident = Word(alphas+'_', alphanums+'_') + number = pyparsing_common.number + arg = Group(decl_data_type + ident) + LPAR,RPAR = map(Suppress, "()") + + code_body = nestedExpr('{', '}', ignoreExpr=(quotedString | cStyleComment)) + + c_function = (decl_data_type("type") + + ident("name") + + LPAR + Optional(delimitedList(arg), [])("args") + RPAR + + code_body("body")) + c_function.ignore(cStyleComment) + + source_code = ''' + int is_odd(int x) { + return (x%2); + } + + int dec_to_hex(char hchar) { + if (hchar >= '0' && hchar <= '9') { + return (ord(hchar)-ord('0')); + } else { + return (10+ord(hchar)-ord('A')); + } + } + ''' + for func in c_function.searchString(source_code): + print("%(name)s (%(type)s) args: %(args)s" % func) + + prints:: + is_odd (int) args: [['int', 'x']] + dec_to_hex (int) args: [['char', 'hchar']] """ if opener == closer: raise ValueError("opening and closing strings cannot be the same") @@ -3697,23 +5090,86 @@ def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.cop ret <<= Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) else: ret <<= Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) + ret.setName('nested %s%s expression' % (opener,closer)) return ret def indentedBlock(blockStatementExpr, indentStack, indent=True): - """Helper method for defining space-delimited indentation blocks, such as - those used to define block statements in Python source code. + """ + Helper method for defining space-delimited indentation blocks, such as + those used to define block statements in Python source code. - Parameters: - - blockStatementExpr - expression defining syntax of statement that + Parameters: + - blockStatementExpr - expression defining syntax of statement that is repeated within the indented block - - indentStack - list created by caller to manage indentation stack + - indentStack - list created by caller to manage indentation stack (multiple statementWithIndentedBlock expressions within a single grammar should share a common indentStack) - - indent - boolean indicating whether block must be indented beyond the + - indent - boolean indicating whether block must be indented beyond the the current level; set to False for block of left-most statements - (default=True) - - A valid block must contain at least one C{blockStatement}. + (default=C{True}) + + A valid block must contain at least one C{blockStatement}. + + Example:: + data = ''' + def A(z): + A1 + B = 100 + G = A2 + A2 + A3 + B + def BB(a,b,c): + BB1 + def BBA(): + bba1 + bba2 + bba3 + C + D + def spam(x,y): + def eggs(z): + pass + ''' + + + indentStack = [1] + stmt = Forward() + + identifier = Word(alphas, alphanums) + funcDecl = ("def" + identifier + Group( "(" + Optional( delimitedList(identifier) ) + ")" ) + ":") + func_body = indentedBlock(stmt, indentStack) + funcDef = Group( funcDecl + func_body ) + + rvalue = Forward() + funcCall = Group(identifier + "(" + Optional(delimitedList(rvalue)) + ")") + rvalue << (funcCall | identifier | Word(nums)) + assignment = Group(identifier + "=" + rvalue) + stmt << ( funcDef | assignment | identifier ) + + module_body = OneOrMore(stmt) + + parseTree = module_body.parseString(data) + parseTree.pprint() + prints:: + [['def', + 'A', + ['(', 'z', ')'], + ':', + [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], + 'B', + ['def', + 'BB', + ['(', 'a', 'b', 'c', ')'], + ':', + [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], + 'C', + 'D', + ['def', + 'spam', + ['(', 'x', 'y', ')'], + ':', + [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] """ def checkPeerIndent(s,l,t): if l >= len(s): return @@ -3738,9 +5194,9 @@ def checkUnindent(s,l,t): indentStack.pop() NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) - INDENT = Empty() + Empty().setParseAction(checkSubIndent) - PEER = Empty().setParseAction(checkPeerIndent) - UNDENT = Empty().setParseAction(checkUnindent) + INDENT = (Empty() + Empty().setParseAction(checkSubIndent)).setName('INDENT') + PEER = Empty().setParseAction(checkPeerIndent).setName('') + UNDENT = Empty().setParseAction(checkUnindent).setName('UNINDENT') if indent: smExpr = Group( Optional(NL) + #~ FollowedBy(blockStatementExpr) + @@ -3749,57 +5205,371 @@ def checkUnindent(s,l,t): smExpr = Group( Optional(NL) + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) blockStatementExpr.ignore(_bslash + LineEnd()) - return smExpr + return smExpr.setName('indented block') alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") -anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:")) -commonHTMLEntity = Combine(_L("&") + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";").streamline() -_htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),'><& "')) -replaceHTMLEntity = lambda t : t.entity in _htmlEntityMap and _htmlEntityMap[t.entity] or None +anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:").setName('any tag')) +_htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\'')) +commonHTMLEntity = Regex('&(?P' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity") +def replaceHTMLEntity(t): + """Helper parser action to replace common HTML entities with their special characters""" + return _htmlEntityMap.get(t.entity) # it's easy to get these comment structures wrong - they're very common, so may as well make them available -cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment") +cStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/').setName("C style comment") +"Comment of the form C{/* ... */}" -htmlComment = Regex(r"") -restOfLine = Regex(r".*").leaveWhitespace() -dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment") -cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?").setName("HTML comment") +"Comment of the form C{}" + +restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line") +dblSlashComment = Regex(r"//(?:\\\n|[^\n])*").setName("// comment") +"Comment of the form C{// ... (to end of line)}" + +cppStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/'| dblSlashComment).setName("C++ style comment") +"Comment of either form C{L{cStyleComment}} or C{L{dblSlashComment}}" javaStyleComment = cppStyleComment +"Same as C{L{cppStyleComment}}" + pythonStyleComment = Regex(r"#.*").setName("Python style comment") +"Comment of the form C{# ... (to end of line)}" + _commasepitem = Combine(OneOrMore(Word(printables, excludeChars=',') + Optional( Word(" \t") + ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem") commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") +"""Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" + +# some other useful expressions - using lower-case class name since we are really using this as a namespace +class pyparsing_common: + """ + Here are some common low-level expressions that may be useful in jump-starting parser development: + - numeric forms (L{integers}, L{reals}, L{scientific notation}) + - common L{programming identifiers} + - network addresses (L{MAC}, L{IPv4}, L{IPv6}) + - ISO8601 L{dates} and L{datetime} + - L{UUID} + Parse actions: + - C{L{convertToInteger}} + - C{L{convertToFloat}} + - C{L{convertToDate}} + - C{L{convertToDatetime}} + - C{L{stripHTMLTags}} + + Example:: + pyparsing_common.number.runTests(''' + # any int or real number, returned as the appropriate type + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.fnumber.runTests(''' + # any int or real number, returned as float + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.hex_integer.runTests(''' + # hex numbers + 100 + FF + ''') + + pyparsing_common.fraction.runTests(''' + # fractions + 1/2 + -3/4 + ''') + + pyparsing_common.mixed_integer.runTests(''' + # mixed fractions + 1 + 1/2 + -3/4 + 1-3/4 + ''') + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(''' + # uuid + 12345678-1234-5678-1234-567812345678 + ''') + prints:: + # any int or real number, returned as the appropriate type + 100 + [100] + + -100 + [-100] + + +100 + [100] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # any int or real number, returned as float + 100 + [100.0] + + -100 + [-100.0] + + +100 + [100.0] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # hex numbers + 100 + [256] + + FF + [255] + + # fractions + 1/2 + [0.5] + + -3/4 + [-0.75] + + # mixed fractions + 1 + [1] + + 1/2 + [0.5] + + -3/4 + [-0.75] + + 1-3/4 + [1.75] + + # uuid + 12345678-1234-5678-1234-567812345678 + [UUID('12345678-1234-5678-1234-567812345678')] + """ + + convertToInteger = tokenMap(int) + """ + Parse action for converting parsed integers to Python int + """ + + convertToFloat = tokenMap(float) + """ + Parse action for converting parsed numbers to Python float + """ + + integer = Word(nums).setName("integer").setParseAction(convertToInteger) + """expression that parses an unsigned integer, returns an int""" + + hex_integer = Word(hexnums).setName("hex integer").setParseAction(tokenMap(int,16)) + """expression that parses a hexadecimal integer, returns an int""" + + signedInteger = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) + """expression that parses an integer with optional leading sign, returns an int""" + + fraction = (signedInteger().setParseAction(convertToFloat) + '/' + signedInteger().setParseAction(convertToFloat)).setName("fraction") + """fractional expression of an integer divided by an integer, returns a float""" + fraction.addParseAction(lambda t: t[0]/t[-1]) + + mixed_integer = (fraction | signedInteger + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") + """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" + mixed_integer.addParseAction(sum) + + real = Regex(r'[+-]?\d+\.\d*').setName("real number").setParseAction(convertToFloat) + """expression that parses a floating point number and returns a float""" + sciReal = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) + """expression that parses a floating point number with optional scientific notation and returns a float""" + + # streamlining this expression makes the docs nicer-looking + number = (sciReal | real | signedInteger).streamline() + """any numeric expression, returns the corresponding Python type""" + + fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat) + """any int or real number, returned as float""" + + identifier = Word(alphas+'_', alphanums+'_').setName("identifier") + """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" + + ipv4_address = Regex(r'(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}').setName("IPv4 address") + "IPv4 address (C{0.0.0.0 - 255.255.255.255})" + + _ipv6_part = Regex(r'[0-9a-fA-F]{1,4}').setName("hex_integer") + _full_ipv6_address = (_ipv6_part + (':' + _ipv6_part)*7).setName("full IPv6 address") + _short_ipv6_address = (Optional(_ipv6_part + (':' + _ipv6_part)*(0,6)) + "::" + Optional(_ipv6_part + (':' + _ipv6_part)*(0,6))).setName("short IPv6 address") + _short_ipv6_address.addCondition(lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8) + _mixed_ipv6_address = ("::ffff:" + ipv4_address).setName("mixed IPv6 address") + ipv6_address = Combine((_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).setName("IPv6 address")).setName("IPv6 address") + "IPv6 address (long, short, or mixed form)" + + mac_address = Regex(r'[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}').setName("MAC address") + "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" + + @staticmethod + def convertToDate(fmt="%Y-%m-%d"): + """ + Helper to create a parse action for converting parsed date string to Python datetime.date + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%d"}) + + Example:: + date_expr = pyparsing_common.iso8601_date.copy() + date_expr.setParseAction(pyparsing_common.convertToDate()) + print(date_expr.parseString("1999-12-31")) + prints:: + [datetime.date(1999, 12, 31)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt).date() + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + @staticmethod + def convertToDatetime(fmt="%Y-%m-%dT%H:%M:%S.%f"): + """ + Helper to create a parse action for converting parsed datetime string to Python datetime.datetime + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%dT%H:%M:%S.%f"}) + + Example:: + dt_expr = pyparsing_common.iso8601_datetime.copy() + dt_expr.setParseAction(pyparsing_common.convertToDatetime()) + print(dt_expr.parseString("1999-12-31T23:59:59.999")) + prints:: + [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt) + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + iso8601_date = Regex(r'(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?').setName("ISO8601 date") + "ISO8601 date (C{yyyy-mm-dd})" + + iso8601_datetime = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?').setName("ISO8601 datetime") + "ISO8601 datetime (C{yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)}) - trailing seconds, milliseconds, and timezone optional; accepts separating C{'T'} or C{' '}" + + uuid = Regex(r'[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}').setName("UUID") + "UUID (C{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})" + + _html_stripper = anyOpenTag.suppress() | anyCloseTag.suppress() + @staticmethod + def stripHTMLTags(s, l, tokens): + """ + Parse action to remove HTML tags from web page HTML source + + Example:: + # strip HTML links from normal text + text = 'More info at the
    pyparsing wiki page' + td,td_end = makeHTMLTags("TD") + table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end + + print(table_text.parseString(text).body) # -> 'More info at the pyparsing wiki page' + """ + return pyparsing_common._html_stripper.transformString(tokens[0]) if __name__ == "__main__": - selectToken = CaselessLiteral( "select" ) - fromToken = CaselessLiteral( "from" ) - - ident = Word( alphas, alphanums + "_$" ) - columnName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens ) - columnNameList = Group( delimitedList( columnName ) ).setName("columns") - tableName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens ) - tableNameList = Group( delimitedList( tableName ) ).setName("tables") - simpleSQL = ( selectToken + \ - ( '*' | columnNameList ).setResultsName( "columns" ) + \ - fromToken + \ - tableNameList.setResultsName( "tables" ) ) - - simpleSQL.runTests("""\ - SELECT * from XYZZY, ABC - select * from SYS.XYZZY - Select A from Sys.dual - Select AA,BB,CC from Sys.dual - Select A, B, C from Sys.dual - Select A, B, C from Sys.dual - Xelect A, B, C from Sys.dual - Select A, B, C frox Sys.dual - Select - Select ^^^ frox Sys.dual - Select A, B, C from Sys.dual, Table2""") + selectToken = CaselessLiteral("select") + fromToken = CaselessLiteral("from") + + ident = Word(alphas, alphanums + "_$") + + columnName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + columnNameList = Group(delimitedList(columnName)).setName("columns") + columnSpec = ('*' | columnNameList) + + tableName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + tableNameList = Group(delimitedList(tableName)).setName("tables") + simpleSQL = selectToken("command") + columnSpec("columns") + fromToken + tableNameList("tables") + + # demo runTests method, including embedded comments in test string + simpleSQL.runTests(""" + # '*' as column list and dotted table name + select * from SYS.XYZZY + + # caseless match on "SELECT", and casts back to "select" + SELECT * from XYZZY, ABC + + # list of column names, and mixed case SELECT keyword + Select AA,BB,CC from Sys.dual + + # multiple tables + Select A, B, C from Sys.dual, Table2 + + # invalid SELECT keyword - should fail + Xelect A, B, C from Sys.dual + + # incomplete command - should fail + Select + + # invalid column name - should fail + Select ^^^ frox Sys.dual + + """) + + pyparsing_common.number.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + # any int or real number, returned as float + pyparsing_common.fnumber.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + pyparsing_common.hex_integer.runTests(""" + 100 + FF + """) + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(""" + 12345678-1234-5678-1234-567812345678 + """) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 46532c0a34..a30a409d48 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,3 @@ packaging==16.7 -pyparsing==2.0.6 +pyparsing==2.1.8 six==1.10.0 From a527fa46a1bb7829af90a3bea544709995c4f1ea Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 18 Aug 2016 08:42:56 +0700 Subject: [PATCH 6092/8469] Add missing whitespace after comma. --- pkg_resources/__init__.py | 34 ++++++------- pkg_resources/tests/test_resources.py | 70 +++++++++++++-------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 5821429206..d94e63392d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -752,8 +752,8 @@ def add(self, dist, entry=None, insert=True, replace=False): if entry is None: entry = dist.location - keys = self.entry_keys.setdefault(entry,[]) - keys2 = self.entry_keys.setdefault(dist.location,[]) + keys = self.entry_keys.setdefault(entry, []) + keys2 = self.entry_keys.setdefault(dist.location, []) if not replace and dist.key in self.by_key: # ignore hidden distros return @@ -1353,7 +1353,7 @@ def get_default_cache(): # best option, should be locale-safe (('APPDATA',), None), (('USERPROFILE',), app_data), - (('HOMEDRIVE','HOMEPATH'), app_data), + (('HOMEDRIVE', 'HOMEPATH'), app_data), (('HOMEPATH',), app_data), (('HOME',), None), # 95/98/ME @@ -1392,7 +1392,7 @@ def safe_version(version): # normalize the version return str(packaging.version.Version(version)) except packaging.version.InvalidVersion: - version = version.replace(' ','.') + version = version.replace(' ', '.') return re.sub('[^A-Za-z0-9.]+', '-', version) @@ -1410,7 +1410,7 @@ def to_filename(name): Any '-' characters are currently replaced with '_'. """ - return name.replace('-','_') + return name.replace('-', '_') def invalid_marker(text): @@ -1508,7 +1508,7 @@ def run_script(self, script_name, namespace): cache[script_filename] = ( len(script_text), 0, script_text.split('\n'), script_filename ) - script_code = compile(script_text, script_filename,'exec') + script_code = compile(script_text, script_filename, 'exec') exec(script_code, namespace, namespace) def _has(self, path): @@ -1965,7 +1965,7 @@ def find_on_path(importer, path_item, only=False): if _is_unpacked_egg(path_item): yield Distribution.from_filename( path_item, metadata=PathMetadata( - path_item, os.path.join(path_item,'EGG-INFO') + path_item, os.path.join(path_item, 'EGG-INFO') ) ) else: @@ -2037,7 +2037,7 @@ def _handle_ns(packageName, path_item): module = sys.modules[packageName] = types.ModuleType(packageName) module.__path__ = [] _set_parent_ns(packageName) - elif not hasattr(module,'__path__'): + elif not hasattr(module, '__path__'): raise TypeError("Not a package:", packageName) handler = _find_adapter(_namespace_handlers, importer) subpath = handler(importer, path_item, packageName, module) @@ -2089,8 +2089,8 @@ def declare_namespace(packageName): # Track what packages are namespaces, so when new path items are added, # they can be updated - _namespace_packages.setdefault(parent,[]).append(packageName) - _namespace_packages.setdefault(packageName,[]) + _namespace_packages.setdefault(parent, []).append(packageName) + _namespace_packages.setdefault(packageName, []) for path_item in path: # Ensure all the parent's path items are reflected in the child, @@ -2104,7 +2104,7 @@ def fixup_namespace_packages(path_item, parent=None): """Ensure that previously-declared namespace packages include path_item""" _imp.acquire_lock() try: - for package in _namespace_packages.get(parent,()): + for package in _namespace_packages.get(parent, ()): subpath = _handle_ns(package, path_item) if subpath: fixup_namespace_packages(subpath, package) @@ -2482,7 +2482,7 @@ def _dep_map(self): elif not evaluate_marker(marker): reqs = [] extra = safe_extra(extra) or None - dm.setdefault(extra,[]).extend(parse_requirements(reqs)) + dm.setdefault(extra, []).extend(parse_requirements(reqs)) return dm def requires(self, extras=()): @@ -2578,7 +2578,7 @@ def get_entry_map(self, group=None): self._get_metadata('entry_points.txt'), self ) if group is not None: - return ep_map.get(group,{}) + return ep_map.get(group, {}) return ep_map def get_entry_info(self, group, name): @@ -2682,7 +2682,7 @@ def has_version(self): return False return True - def clone(self,**kw): + def clone(self, **kw): """Copy this distribution, substituting in any changed keyword args""" names = 'project_name version py_version platform location precedence' for attr in names.split(): @@ -2769,7 +2769,7 @@ def reqs_for_extra(extra): } -def issue_warning(*args,**kw): +def issue_warning(*args, **kw): level = 1 g = globals() try: @@ -2916,12 +2916,12 @@ def split_sections(s): # wrap up last segment yield section, content -def _mkstemp(*args,**kw): +def _mkstemp(*args, **kw): old_open = os.open try: # temporarily bypass sandboxing os.open = os_open - return tempfile.mkstemp(*args,**kw) + return tempfile.mkstemp(*args, **kw) finally: # and then put it back os.open = old_open diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 4e7652e3d1..1d663b83b5 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -51,15 +51,15 @@ def testCollection(self): assert list(ad) == ['foopkg'] # Distributions sort by version - assert [dist.version for dist in ad['FooPkg']] == ['1.4','1.3-1','1.2'] + assert [dist.version for dist in ad['FooPkg']] == ['1.4', '1.3-1', '1.2'] # Removing a distribution leaves sequence alone ad.remove(ad['FooPkg'][1]) - assert [dist.version for dist in ad['FooPkg']] == ['1.4','1.2'] + assert [dist.version for dist in ad['FooPkg']] == ['1.4', '1.2'] # And inserting adds them in order ad.add(dist_from_fn("FooPkg-1.9.egg")) - assert [dist.version for dist in ad['FooPkg']] == ['1.9','1.4','1.2'] + assert [dist.version for dist in ad['FooPkg']] == ['1.9', '1.4', '1.2'] ws = WorkingSet([]) foo12 = dist_from_fn("FooPkg-1.2-py2.4.egg") @@ -86,7 +86,7 @@ def testCollection(self): ws.add(foo14) assert ad.best_match(req, ws).version == '1.4' - def checkFooPkg(self,d): + def checkFooPkg(self, d): assert d.project_name == "FooPkg" assert d.key == "foopkg" assert d.version == "1.3.post1" @@ -97,7 +97,7 @@ def checkFooPkg(self,d): def testDistroBasics(self): d = Distribution( "/some/path", - project_name="FooPkg",version="1.3-1",py_version="2.4",platform="win32" + project_name="FooPkg", version="1.3-1", py_version="2.4", platform="win32" ) self.checkFooPkg(d) @@ -115,7 +115,7 @@ def testDistroMetadata(self): d = Distribution( "/some/path", project_name="FooPkg", py_version="2.4", platform="win32", metadata=Metadata( - ('PKG-INFO',"Metadata-Version: 1.0\nVersion: 1.3-1\n") + ('PKG-INFO', "Metadata-Version: 1.0\nVersion: 1.3-1\n") ) ) self.checkFooPkg(d) @@ -164,7 +164,7 @@ def testResolve(self): ad.add(Baz) # Activation list now includes resolved dependency - assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) == [Foo,Baz] + assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) == [Foo, Baz] # Requests for conflicting versions produce VersionConflict with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) @@ -218,7 +218,7 @@ def test_marker_evaluation_with_extras(self): quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info") ad.add(quux) res = list(ws.resolve(parse_requirements("Foo[baz]"), ad)) - assert res == [Foo,quux] + assert res == [Foo, quux] def test_marker_evaluation_with_multiple_extras(self): ad = pkg_resources.Environment([]) @@ -238,7 +238,7 @@ def test_marker_evaluation_with_multiple_extras(self): fred = Distribution.from_filename("/foo_dir/fred-0.1.dist-info") ad.add(fred) res = list(ws.resolve(parse_requirements("Foo[baz,bar]"), ad)) - assert sorted(res) == [fred,quux,Foo] + assert sorted(res) == [fred, quux, Foo] def test_marker_evaluation_with_extras_loop(self): ad = pkg_resources.Environment([]) @@ -274,19 +274,19 @@ def testDistroDependsOptions(self): docutils>=0.3 [fastcgi] fcgiapp>=0.1""") - self.checkRequires(d,"Twisted>=1.5") + self.checkRequires(d, "Twisted>=1.5") self.checkRequires( - d,"Twisted>=1.5 ZConfig>=2.0 docutils>=0.3".split(), ["docgen"] + d, "Twisted>=1.5 ZConfig>=2.0 docutils>=0.3".split(), ["docgen"] ) self.checkRequires( - d,"Twisted>=1.5 fcgiapp>=0.1".split(), ["fastcgi"] + d, "Twisted>=1.5 fcgiapp>=0.1".split(), ["fastcgi"] ) self.checkRequires( - d,"Twisted>=1.5 ZConfig>=2.0 docutils>=0.3 fcgiapp>=0.1".split(), - ["docgen","fastcgi"] + d, "Twisted>=1.5 ZConfig>=2.0 docutils>=0.3 fcgiapp>=0.1".split(), + ["docgen", "fastcgi"] ) self.checkRequires( - d,"Twisted>=1.5 fcgiapp>=0.1 ZConfig>=2.0 docutils>=0.3".split(), + d, "Twisted>=1.5 fcgiapp>=0.1 ZConfig>=2.0 docutils>=0.3".split(), ["fastcgi", "docgen"] ) with pytest.raises(pkg_resources.UnknownExtra): @@ -348,7 +348,7 @@ def assertfields(self, ep): def setup_method(self, method): self.dist = Distribution.from_filename( - "FooPkg-1.2-py2.4.egg", metadata=Metadata(('requires.txt','[x]'))) + "FooPkg-1.2-py2.4.egg", metadata=Metadata(('requires.txt', '[x]'))) def testBasics(self): ep = EntryPoint( @@ -405,7 +405,7 @@ def checkSubMap(self, m): submap_expect = dict( feature1=EntryPoint('feature1', 'somemodule', ['somefunction']), - feature2=EntryPoint('feature2', 'another.module', ['SomeClass'], ['extra1','extra2']), + feature2=EntryPoint('feature2', 'another.module', ['SomeClass'], ['extra1', 'extra2']), feature3=EntryPoint('feature3', 'this.module', extras=['something']) ) submap_str = """ @@ -423,7 +423,7 @@ def testParseList(self): EntryPoint.parse_group("x", ["foo=baz", "foo=bar"]) def testParseMap(self): - m = EntryPoint.parse_map({'xyz':self.submap_str}) + m = EntryPoint.parse_map({'xyz': self.submap_str}) self.checkSubMap(m['xyz']) assert list(m.keys()) == ['xyz'] m = EntryPoint.parse_map("[xyz]\n" + self.submap_str) @@ -480,7 +480,7 @@ def testOptionsAndHashing(self): hash(( "twisted", packaging.specifiers.SpecifierSet(">=1.2"), - frozenset(["foo","bar"]), + frozenset(["foo", "bar"]), None )) ) @@ -521,9 +521,9 @@ def testEmptyParse(self): assert list(parse_requirements('')) == [] def testYielding(self): - for inp,out in [ - ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']), - (['x\n\n','y'], ['x','y']), + for inp, out in [ + ([], []), ('x', ['x']), ([[]], []), (' x\n y', ['x', 'y']), + (['x\n\n', 'y'], ['x', 'y']), ]: assert list(pkg_resources.yield_lines(inp)) == out @@ -626,9 +626,9 @@ def test_spaces_between_multiple_versions(self): req, = parse_requirements('foo >= 1.0, < 3') def testVersionEquality(self): - def c(s1,s2): - p1, p2 = parse_version(s1),parse_version(s2) - assert p1 == p2, (s1,s2,p1,p2) + def c(s1, s2): + p1, p2 = parse_version(s1), parse_version(s2) + assert p1 == p2, (s1, s2, p1, p2) c('1.2-rc1', '1.2rc1') c('0.4', '0.4.0') @@ -642,13 +642,13 @@ def c(s1,s2): c('1.2.a', '1.2a') def testVersionOrdering(self): - def c(s1,s2): - p1, p2 = parse_version(s1),parse_version(s2) - assert p1 < p2, (s1,s2,p1,p2) + def c(s1, s2): + p1, p2 = parse_version(s1), parse_version(s2) + assert p1 < p2, (s1, s2, p1, p2) - c('2.1','2.1.1') - c('2a1','2b0') - c('2a1','2.1') + c('2.1', '2.1.1') + c('2a1', '2b0') + c('2a1', '2.1') c('2.3a1', '2.3') c('2.1-1', '2.1-2') c('2.1-1', '2.1.1') @@ -660,8 +660,8 @@ def c(s1,s2): c('0.4', '4.0') c('0.0.4', '0.4.0') c('0post1', '0.4post1') - c('2.1.0-rc1','2.1.0') - c('2.1dev','2.1a0') + c('2.1.0-rc1', '2.1.0') + c('2.1dev', '2.1a0') torture = """ 0.80.1-3 0.80.1-2 0.80.1-1 0.79.9999+0.80.0pre4-1 @@ -669,9 +669,9 @@ def c(s1,s2): 0.77.2-1 0.77.1-1 0.77.0-1 """.split() - for p,v1 in enumerate(torture): + for p, v1 in enumerate(torture): for v2 in torture[p + 1:]: - c(v2,v1) + c(v2, v1) def testVersionBuildout(self): """ From 10bf8e72f80925d924abfa6d635ad738233ae79c Mon Sep 17 00:00:00 2001 From: stepshal Date: Thu, 18 Aug 2016 09:12:15 +0700 Subject: [PATCH 6093/8469] Fix spacing after comment hash. --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 5821429206..17b69727bd 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2976,7 +2976,7 @@ def _initialize_master_working_set(): # ensure that all distributions added to the working set in the future # (e.g. by calling ``require()``) will get activated as well, # with higher priority (replace=True). - dist = None # ensure dist is defined for del dist below + dist = None # ensure dist is defined for del dist below for dist in working_set: dist.activate(replace=False) del dist From 8d1eecaef52a1baf2b9fc6c772880d8c537b562f Mon Sep 17 00:00:00 2001 From: "J. Goutin" Date: Thu, 18 Aug 2016 13:42:07 +0200 Subject: [PATCH 6094/8469] Add numpy version check --- setuptools/msvc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 360c1a68de..bffaa6aa40 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -6,6 +6,7 @@ import platform import itertools import distutils.errors +from distutils.version import StrictVersion from setuptools.extern.six.moves import filterfalse @@ -228,9 +229,9 @@ def msvc14_gen_lib_options(*args, **kwargs): """ if "numpy.distutils" in sys.modules: import numpy as np - return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) - else: - return unpatched['msvc14_gen_lib_options'](*args, **kwargs) + if StrictVersion(np.__version__) < StrictVersion('1.11.2'): + return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) + return unpatched['msvc14_gen_lib_options'](*args, **kwargs) def _augment_exception(exc, version, arch=''): From 643f0ae4b4330f0cacec3654a7cb1e94a9316618 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 15:57:20 -0400 Subject: [PATCH 6095/8469] Update changelog --- CHANGES.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9f098df907..b47465debb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,15 +2,16 @@ CHANGES ======= -v25.3.1 +v25.3.0 ------- * #739 Fix unquoted libpaths by fixing compatibility between `numpy.distutils` and `distutils._msvccompiler` for numpy < 1.11.2 (Fix issue #728, error also fixed in Numpy). -v25.3.0 -------- +* #731: Bump certifi. + +* Style updates. See #740, #741, #743, #744, #742, #747. -#731: Bump certifi. +* #735: include license file. v25.2.0 ------- From 787383732d45e6565f0e68e268a7157e3198cd8c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 15:57:32 -0400 Subject: [PATCH 6096/8469] =?UTF-8?q?Bump=20version:=2025.2.0=20=E2=86=92?= =?UTF-8?q?=2025.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 92fd835400..6e543e94ad 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.2.0 +current_version = 25.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index 5fa237d575..4b3bf3fefd 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.2.0", + version="25.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 7c32dac163b1d8f1256caf0a4e42ed19ff74d150 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 15:57:32 -0400 Subject: [PATCH 6097/8469] Added tag v25.3.0 for changeset 2371456ae99d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 75a9fb0899..ccc770e240 100644 --- a/.hgtags +++ b/.hgtags @@ -301,3 +301,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 76143bb477b50314ab6f4ccc4ced80ee43f0dc94 v25.1.5 2db4c66aeae47217aaf92099a9875e9e810c9cbb v25.1.6 2083d7c3fadcf15b3bc07f7532440efbcf8fd18d v25.2.0 +2371456ae99d11187c33deacf1308aded31081d9 v25.3.0 From fc6050ad4c1481be0a1aba1f056e76aa8be50039 Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Fri, 19 Aug 2016 15:58:00 -0400 Subject: [PATCH 6098/8469] changelog --- CHANGES.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5a2b992885..3c4b118e70 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,14 @@ v25.1.3 * #714 and #704: Revert fix as it breaks other components downstream that can't handle unicode. See #709, #710, and #712. +* Add Extension(py_limited_api=True). When set to a truthy value, + that extension gets a filename apropriate for code using Py_LIMITED_API. + When used correctly this allows a single compiled extension to work on + all future versions of CPython 3. + The py_limited_api argument only controls the filename. To be + compatible with multiple versions of Python 3, the C extension + will also need to set -DPy_LIMITED_API=... and be modified to use + only the functions in the limited API. v25.1.2 ------- From c6d604f053b12920d774324b9fa36211fa9e2eaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:01:42 -0400 Subject: [PATCH 6099/8469] Move changelog into a new release --- CHANGES.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 10be582143..cd20395205 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,18 @@ CHANGES ======= +v25.4.0 +------- + +* Add Extension(py_limited_api=True). When set to a truthy value, + that extension gets a filename apropriate for code using Py_LIMITED_API. + When used correctly this allows a single compiled extension to work on + all future versions of CPython 3. + The py_limited_api argument only controls the filename. To be + compatible with multiple versions of Python 3, the C extension + will also need to set -DPy_LIMITED_API=... and be modified to use + only the functions in the limited API. + v25.3.0 ------- @@ -44,14 +56,6 @@ v25.1.3 * #714 and #704: Revert fix as it breaks other components downstream that can't handle unicode. See #709, #710, and #712. -* Add Extension(py_limited_api=True). When set to a truthy value, - that extension gets a filename apropriate for code using Py_LIMITED_API. - When used correctly this allows a single compiled extension to work on - all future versions of CPython 3. - The py_limited_api argument only controls the filename. To be - compatible with multiple versions of Python 3, the C extension - will also need to set -DPy_LIMITED_API=... and be modified to use - only the functions in the limited API. v25.1.2 ------- From c7ee084a4e94b2061f50b7a6633f814cf3caf615 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:02:23 -0400 Subject: [PATCH 6100/8469] Reorganize imports --- setuptools/command/build_ext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 7bb4d24c8c..81d0c32cf3 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,12 +1,12 @@ +import os +import sys +import itertools from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler from distutils.errors import DistutilsError from distutils import log -import os -import sys -import itertools from setuptools.extension import Library @@ -104,7 +104,7 @@ def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if (sys.version_info[0] != 2 + if (sys.version_info[0] != 2 and getattr(ext, 'py_limited_api') and get_abi3_suffix()): from distutils.sysconfig import get_config_var From a3a04186f0b0b8fb9206f2813a768d655a7acc04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:02:39 -0400 Subject: [PATCH 6101/8469] Move import to top --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 81d0c32cf3..df8f03fc30 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,6 +1,7 @@ import os import sys import itertools +import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler @@ -61,7 +62,6 @@ def _customize_compiler_for_shlib(compiler): def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" - import imp for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): if '.abi3' in suffix: # Unix return suffix From e3b053192c96cc247c3e12dae78923631397dce7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:05:04 -0400 Subject: [PATCH 6102/8469] Move import to the top --- setuptools/command/build_ext.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index df8f03fc30..ca46b22a40 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -5,7 +5,7 @@ from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler -from distutils.sysconfig import customize_compiler +from distutils.sysconfig import customize_compiler, get_config_var from distutils.errors import DistutilsError from distutils import log @@ -17,10 +17,8 @@ except ImportError: _build_ext = _du_build_ext -from distutils.sysconfig import get_config_var - -get_config_var("LDSHARED") # make sure _config_vars is initialized -del get_config_var +# make sure _config_vars is initialized +get_config_var("LDSHARED") from distutils.sysconfig import _config_vars as _CONFIG_VARS @@ -107,7 +105,6 @@ def get_ext_filename(self, fullname): if (sys.version_info[0] != 2 and getattr(ext, 'py_limited_api') and get_abi3_suffix()): - from distutils.sysconfig import get_config_var so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() From 097e92abaa7b72815a5eb9c232293ef4bbc1b626 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:06:58 -0400 Subject: [PATCH 6103/8469] Extract variable for boolean expression for nicer indentation. --- setuptools/command/build_ext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index ca46b22a40..9caabfd534 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -10,6 +10,7 @@ from distutils import log from setuptools.extension import Library +from setuptools.extern import six try: # Attempt to use Cython for building extensions, if available @@ -102,9 +103,12 @@ def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - if (sys.version_info[0] != 2 + use_abi3 = ( + six.PY3 and getattr(ext, 'py_limited_api') - and get_abi3_suffix()): + and get_abi3_suffix() + ) + if use_abi3: so_ext = get_config_var('SO') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() From 2cde914c7bc8c8e5a59f937317d47898b38426e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:09:06 -0400 Subject: [PATCH 6104/8469] Use six for python major version detection --- setuptools/tests/test_build_ext.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index f2e1f59dbc..0edc92ec7c 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,7 +1,9 @@ import sys import distutils.command.build_ext as orig - from distutils.sysconfig import get_config_var + +from setuptools.extern import six + from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution from setuptools.extension import Extension @@ -27,7 +29,7 @@ def test_abi3_filename(self): of Python 3 if 'is_abi3' is truthy on Extension() """ print(get_abi3_suffix()) - + extension = Extension('spam.eggs', ['eggs.c'], py_limited_api=True) dist = Distribution(dict(ext_modules=[extension])) cmd = build_ext(dist) @@ -35,9 +37,9 @@ def test_abi3_filename(self): assert 'spam.eggs' in cmd.ext_map res = cmd.get_ext_filename('spam.eggs') - if sys.version_info[0] == 2 or not get_abi3_suffix(): + if six.PY2 or not get_abi3_suffix(): assert res.endswith(get_config_var('SO')) elif sys.platform == 'win32': assert res.endswith('eggs.pyd') else: - assert 'abi3' in res \ No newline at end of file + assert 'abi3' in res From cea7420c9417f14f6c069dabf1df23055f681af1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:10:05 -0400 Subject: [PATCH 6105/8469] =?UTF-8?q?Bump=20version:=2025.3.0=20=E2=86=92?= =?UTF-8?q?=2025.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6e543e94ad..b089c68d3c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.3.0 +current_version = 25.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index 4b3bf3fefd..cd4353d00b 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.3.0", + version="25.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8aae14c12ea79b6d293e40db02c027e1279a46a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:10:05 -0400 Subject: [PATCH 6106/8469] Added tag v25.4.0 for changeset f713f9faaaa3 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ccc770e240..06083e1c43 100644 --- a/.hgtags +++ b/.hgtags @@ -302,3 +302,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 2db4c66aeae47217aaf92099a9875e9e810c9cbb v25.1.6 2083d7c3fadcf15b3bc07f7532440efbcf8fd18d v25.2.0 2371456ae99d11187c33deacf1308aded31081d9 v25.3.0 +f713f9faaaa33c0e9a628dc9322ef8d1fbeb8319 v25.4.0 From a7931d03be180878538bae00c78d93304e5ca09b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:26:18 -0400 Subject: [PATCH 6107/8469] Rewrite test, dynamically generating the .tar.gz file, with help from dstufft in #748. --- setuptools/tests/test_archive_util.py | 50 ++++++++++----------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index 3e679c115f..b789e9acef 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -1,5 +1,8 @@ # coding: utf-8 +import tarfile +import io + from setuptools.extern import six import pytest @@ -12,41 +15,24 @@ def tarfile_with_unicode(tmpdir): """ Create a tarfile containing only a file whose name is a zero byte file called testimäge.png. - - TODO: Is it possible to generate this file programmatically? """ - data = ( - b'\x1f\x8b\x08\x00R\xfe\x9fW\x00\x03\xed\xd6AO\x13A\x14\x00' - b'\xe0\x11b\x8c\x8d\' z\xf02\x07=x\xd9\xce\xcc\xce\xec\xd4\xc3' - b'&\xa21\xb4X\\lI\xa3r0\xc3v\xc1\x8a\xec6\xcbbz3\x1cH\x80x\x93' - b'x\xeaQ\x12\x13\x0f$z\xd5\x13\x17\xa9U\x8e&\xfc\x06\x13\xff' - b'\x82\xb3\xa5\n\xb6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1f\xde\xbf@\xc7\xfa\xcfEK\xfe[B\x10\xa8\xffGAW\xe9F\xfd\xefP' - b'\xfb\x894\x7f[\xfb\xcd\x14\xcef\xae\x0f\xe6tE/\xdc4\xdc\xd0' - b'\xd33\x02\xbf9\xcbJq}f\xe0t\xdf\'\x04~\x95\xeb0\x9c\x10\x8e' - b'\xd0a\xd7\xfeX\xa7\xfc\x8f\xf3\xe5\xd7\xfc\xe7\xc2\xe2P\xff' - b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' - b'\x008\xa8\xef\xb1g\xe1Z\x00(\x00\x00' - ) + tarobj = io.BytesIO() + + with tarfile.open(fileobj=tarobj, mode="w:gz") as tgz: + data = b"" + + filename = "testimäge.png" + if six.PY2: + filename = filename.decode('utf-8') + + t = tarfile.TarInfo(filename) + t.size = len(data) + + tgz.addfile(t, io.BytesIO(data)) + target = tmpdir / 'unicode-pkg-1.0.tar.gz' with open(str(target), mode='wb') as tf: - tf.write(data) + tf.write(tarobj.getvalue()) return str(target) From c296634d44de4a9715d09e4773b73b2d233fbbc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 19 Aug 2016 16:50:58 -0400 Subject: [PATCH 6108/8469] Pin to pytest < 3 until skip errors can be resolved. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cd4353d00b..db61973500 100755 --- a/setup.py +++ b/setup.py @@ -181,7 +181,7 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - 'pytest>=2.8', + 'pytest>=2.8,<3.0dev', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner + wheel, From 08511f5fdfe04a8ea6e3ae73e086e8a29a0a5cd1 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sat, 20 Aug 2016 04:37:32 +0700 Subject: [PATCH 6109/8469] Fix quantity of blank lines after code object, class of function definition. --- pkg_resources/__init__.py | 55 +++++++++++++++++++++++ pkg_resources/extern/__init__.py | 2 + pkg_resources/tests/test_markers.py | 1 + pkg_resources/tests/test_pkg_resources.py | 8 +++- pkg_resources/tests/test_resources.py | 4 ++ setuptools/command/build_ext.py | 2 + setuptools/tests/test_build_ext.py | 1 + setuptools/tests/test_manifest.py | 1 + 8 files changed, 73 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 87455a0d57..033fc8aaef 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -209,10 +209,12 @@ def parse_version(v): _state_vars = {} + def _declare_state(vartype, **kw): globals().update(kw) _state_vars.update(dict.fromkeys(kw, vartype)) + def __getstate__(): state = {} g = globals() @@ -220,25 +222,31 @@ def __getstate__(): state[k] = g['_sget_' + v](g[k]) return state + def __setstate__(state): g = globals() for k, v in state.items(): g['_sset_' + _state_vars[k]](k, g[k], v) return state + def _sget_dict(val): return val.copy() + def _sset_dict(key, ob, state): ob.clear() ob.update(state) + def _sget_object(val): return val.__getstate__() + def _sset_object(key, ob, state): ob.__setstate__(state) + _sget_none = _sset_none = lambda *args: None @@ -265,6 +273,7 @@ def get_supported_platform(): pass return plat + __all__ = [ # Basic resource access and distribution/entry point discovery 'require', 'run_script', 'get_provider', 'get_distribution', @@ -311,8 +320,10 @@ def get_supported_platform(): 'run_main', 'AvailableDistributions', ] + class ResolutionError(Exception): """Abstract base for dependency resolution errors""" + def __repr__(self): return self.__class__.__name__ + repr(self.args) @@ -391,6 +402,8 @@ def __str__(self): class UnknownExtra(ResolutionError): """Distribution doesn't have an "extra feature" of the given name""" + + _provider_factories = {} PY_MAJOR = sys.version[:3] @@ -400,6 +413,7 @@ class UnknownExtra(ResolutionError): CHECKOUT_DIST = 0 DEVELOP_DIST = -1 + def register_loader_type(loader_type, provider_factory): """Register `provider_factory` to make providers for `loader_type` @@ -409,6 +423,7 @@ def register_loader_type(loader_type, provider_factory): """ _provider_factories[loader_type] = provider_factory + def get_provider(moduleOrReq): """Return an IResourceProvider for the named module or requirement""" if isinstance(moduleOrReq, Requirement): @@ -421,6 +436,7 @@ def get_provider(moduleOrReq): loader = getattr(module, '__loader__', None) return _find_adapter(_provider_factories, loader)(module) + def _macosx_vers(_cache=[]): if not _cache: version = platform.mac_ver()[0] @@ -436,9 +452,11 @@ def _macosx_vers(_cache=[]): _cache.append(version.split('.')) return _cache[0] + def _macosx_arch(machine): return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine) + def get_build_platform(): """Return this platform's string for platform-specific distributions @@ -464,6 +482,7 @@ def get_build_platform(): pass return plat + macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") # XXX backward compat @@ -524,9 +543,11 @@ def run_script(dist_spec, script_name): ns['__name__'] = name require(dist_spec)[0].run_script(script_name, ns) + # backward compatibility run_main = run_script + def get_distribution(dist): """Return a current distribution object for a Requirement or string""" if isinstance(dist, six.string_types): @@ -537,14 +558,17 @@ def get_distribution(dist): raise TypeError("Expected string, Requirement, or Distribution", dist) return dist + def load_entry_point(dist, group, name): """Return `name` entry point of `group` for `dist` or raise ImportError""" return get_distribution(dist).load_entry_point(group, name) + def get_entry_map(dist, group=None): """Return the entry point map for `group`, or the full entry map""" return get_distribution(dist).get_entry_map(group) + def get_entry_info(dist, group, name): """Return the EntryPoint object for `group`+`name`, or ``None``""" return get_distribution(dist).get_entry_info(group, name) @@ -1332,6 +1356,7 @@ def cleanup_resources(self, force=False): """ # XXX + def get_default_cache(): """Determine the default cache location @@ -1376,6 +1401,7 @@ def get_default_cache(): "Please set the PYTHON_EGG_CACHE environment variable" ) + def safe_name(name): """Convert an arbitrary string to a standard distribution name @@ -1538,6 +1564,7 @@ def _get(self, path): "Can't perform this operation for loaders without 'get_data()'" ) + register_loader_type(object, NullProvider) @@ -1562,6 +1589,7 @@ def _setup_prefix(self): old = path path, base = os.path.split(path) + class DefaultProvider(EggProvider): """Provides access to package resources in the filesystem""" @@ -1587,6 +1615,7 @@ def _register(cls): type(None)) register_loader_type(loader_cls, cls) + DefaultProvider._register() @@ -1601,6 +1630,7 @@ class EmptyProvider(NullProvider): def __init__(self): pass + empty_provider = EmptyProvider() @@ -1836,6 +1866,7 @@ def _eager_to_zip(self, resource_name): def _resource_to_zip(self, resource_name): return self._zipinfo_name(self._fn(self.module_path, resource_name)) + register_loader_type(zipimport.zipimporter, ZipProvider) @@ -1913,8 +1944,10 @@ def __init__(self, importer): self.module_path = importer.archive self._setup_prefix() + _declare_state('dict', _distribution_finders={}) + def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items @@ -1931,6 +1964,7 @@ def find_distributions(path_item, only=False): finder = _find_adapter(_distribution_finders, importer) return finder(importer, path_item, only) + def find_eggs_in_zip(importer, path_item, only=False): """ Find eggs in zip files; possibly multiple nested eggs. @@ -1951,12 +1985,17 @@ def find_eggs_in_zip(importer, path_item, only=False): for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath): yield dist + register_finder(zipimport.zipimporter, find_eggs_in_zip) + def find_nothing(importer, path_item, only=False): return () + + register_finder(object, find_nothing) + def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" path_item = _normalize_cached(path_item) @@ -1997,6 +2036,8 @@ def find_on_path(importer, path_item, only=False): for item in dists: yield item break + + register_finder(pkgutil.ImpImporter, find_on_path) if hasattr(importlib_machinery, 'FileFinder'): @@ -2023,6 +2064,7 @@ def namespace_handler(importer, path_entry, moduleName, module): """ _namespace_handlers[importer_type] = namespace_handler + def _handle_ns(packageName, path_item): """Ensure that named package includes a subpath of path_item (if needed)""" @@ -2055,6 +2097,7 @@ def _rebuild_mod_path(orig_path, package_name, module): corresponding to their sys.path order """ sys_path = [_normalize_cached(p) for p in sys.path] + def position_in_sys_path(path): """ Return the ordinal of the path based on its position in sys.path @@ -2100,6 +2143,7 @@ def declare_namespace(packageName): finally: _imp.release_lock() + def fixup_namespace_packages(path_item, parent=None): """Ensure that previously-declared namespace packages include path_item""" _imp.acquire_lock() @@ -2111,6 +2155,7 @@ def fixup_namespace_packages(path_item, parent=None): finally: _imp.release_lock() + def file_ns_handler(importer, path_item, packageName, module): """Compute an ns-package subpath for a filesystem or zipfile importer""" @@ -2123,6 +2168,7 @@ def file_ns_handler(importer, path_item, packageName, module): # Only return the path if it's not already there return subpath + register_namespace_handler(pkgutil.ImpImporter, file_ns_handler) register_namespace_handler(zipimport.zipimporter, file_ns_handler) @@ -2133,6 +2179,7 @@ def file_ns_handler(importer, path_item, packageName, module): def null_ns_handler(importer, path_item, packageName, module): return None + register_namespace_handler(object, null_ns_handler) @@ -2140,6 +2187,7 @@ def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" return os.path.normcase(os.path.realpath(filename)) + def _normalize_cached(filename, _cache={}): try: return _cache[filename] @@ -2147,6 +2195,7 @@ 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. @@ -2155,6 +2204,7 @@ def _is_unpacked_egg(path): path.lower().endswith('.egg') ) + def _set_parent_ns(packageName): parts = packageName.split('.') name = parts.pop() @@ -2176,6 +2226,7 @@ def yield_lines(strs): for s in yield_lines(ss): yield s + MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( r""" @@ -2783,6 +2834,7 @@ def issue_warning(*args, **kw): class RequirementParseError(ValueError): + def __str__(self): return ' '.join(self.args) @@ -2807,6 +2859,7 @@ def parse_requirements(strs): class Requirement(packaging.requirements.Requirement): + def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" try: @@ -2867,6 +2920,7 @@ class cls(cls, object): return cls.__mro__[1:] return cls.__mro__ + def _find_adapter(registry, ob): """Return an adapter factory for `ob` from `registry`""" for t in _get_mro(getattr(ob, '__class__', type(ob))): @@ -2916,6 +2970,7 @@ def split_sections(s): # wrap up last segment yield section, content + def _mkstemp(*args, **kw): old_open = os.open try: diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 6758d36f11..492f66f10d 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -6,6 +6,7 @@ class VendorImporter: A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. """ + def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self.vendored_names = set(vendored_names) @@ -67,5 +68,6 @@ def install(self): if self not in sys.meta_path: sys.meta_path.append(self) + names = 'packaging', 'pyparsing', 'six' VendorImporter(__name__, names).install() diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index 8d451de3c1..78810b6ef6 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -5,6 +5,7 @@ from pkg_resources import evaluate_marker + @mock.patch('platform.python_version', return_value='2.7.10') def test_ordering(python_version_mock): assert evaluate_marker("python_full_version > '2.7.3'") is True diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 8b276ffcfd..361fe65767 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -24,6 +24,7 @@ except NameError: unicode = str + def timestamp(dt): """ Return a timestamp for a local, naive datetime instance. @@ -34,13 +35,16 @@ def timestamp(dt): # Python 3.2 and earlier return time.mktime(dt.timetuple()) + class EggRemover(unicode): + def __call__(self): if self in sys.path: sys.path.remove(self) if os.path.exists(self): os.remove(self) + class TestZipProvider(object): finalizers = [] @@ -94,7 +98,9 @@ def test_resource_filename_rewrites_on_change(self): assert f.read() == 'hello, world!' manager.cleanup_resources() + class TestResourceManager(object): + def test_get_cache_path(self): mgr = pkg_resources.ResourceManager() path = mgr.get_cache_path('foo') @@ -107,6 +113,7 @@ class TestIndependence: """ Tests to ensure that pkg_resources runs independently from setuptools. """ + def test_setuptools_not_imported(self): """ In a separate Python environment, import pkg_resources and assert @@ -122,7 +129,6 @@ def test_setuptools_not_imported(self): subprocess.check_call(cmd) - class TestDeepVersionLookupDistutils(object): @pytest.fixture diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 1d663b83b5..2ed5623359 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -34,6 +34,7 @@ def get_metadata_lines(self, name): dist_from_fn = pkg_resources.Distribution.from_filename + class TestDistro: def testCollection(self): @@ -294,6 +295,7 @@ def testDistroDependsOptions(self): class TestWorkingSet: + def test_find_conflicting(self): ws = WorkingSet([]) Foo = Distribution.from_filename("/foo_dir/Foo-1.2.egg") @@ -380,6 +382,7 @@ def testParse(self): assert ep.name == 'html+mako' reject_specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" + @pytest.mark.parametrize("reject_spec", reject_specs) def test_reject_spec(self, reject_spec): with pytest.raises(ValueError): @@ -434,6 +437,7 @@ def testParseMap(self): with pytest.raises(ValueError): EntryPoint.parse_map(self.submap_str) + class TestRequirements: def testBasics(self): diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 9caabfd534..f994b62654 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -59,6 +59,7 @@ def _customize_compiler_for_shlib(compiler): if_dl = lambda s: s if have_rtld else '' + def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): @@ -67,6 +68,7 @@ def get_abi3_suffix(): elif suffix == '.pyd': # Windows return suffix + class build_ext(_build_ext): def run(self): diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 0edc92ec7c..ac002f44ec 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -8,6 +8,7 @@ from setuptools.dist import Distribution from setuptools.extension import Extension + class TestBuildExt: def test_get_ext_filename(self): diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 6e67ca6146..6360270d5b 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -51,6 +51,7 @@ def quiet(): def touch(filename): open(filename, 'w').close() + # The set of files always in the manifest, including all files in the # .egg-info directory default_files = frozenset(map(make_local_path, [ From e3ffde678c36ca778476574194cdc6d436d82263 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sat, 20 Aug 2016 08:15:52 +0700 Subject: [PATCH 6110/8469] Remove trailing whitespace. (#751) --- setuptools/msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index bffaa6aa40..26e399cc1c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -223,7 +223,7 @@ def msvc14_get_vc_env(plat_spec): def msvc14_gen_lib_options(*args, **kwargs): """ - Patched "distutils._msvccompiler.gen_lib_options" for fix + Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ From d687531884ee25d5a517d529b2fd535831b70115 Mon Sep 17 00:00:00 2001 From: Torsten Landschoff Date: Sat, 20 Aug 2016 09:23:24 +0200 Subject: [PATCH 6111/8469] Make Extension accept positional arguments again (fixes #752). As a side effect, py_limited_api may now only be passed as keyword argument. I think it is early enough for this feature to change this and enforce the flag to be passed as a keyword... --- setuptools/extension.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/extension.py b/setuptools/extension.py index da94c3fa6c..f8058b729f 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -36,9 +36,11 @@ def _have_cython(): class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" - def __init__(self, name, sources, py_limited_api=False, **kw): - self.py_limited_api = py_limited_api - _Extension.__init__(self, name, sources, **kw) + def __init__(self, name, sources, *args, **kw): + # The *args is needed for compatibility as calls may use positional + # arguments. py_limited_api may be set only via keyword. + self.py_limited_api = kw.pop("py_limited_api", False) + _Extension.__init__(self, name, sources, *args, **kw) def _convert_pyx_sources_to_lang(self): """ From 06df852e7cda567b6f8ab6831486285f0e2989a4 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Sat, 20 Aug 2016 15:10:57 +0300 Subject: [PATCH 6112/8469] fix tests on windows (#754) - have tox pass env variables used by setuptools on windows. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 8c09e7df18..7ce7ce4152 100644 --- a/tox.ini +++ b/tox.ini @@ -2,4 +2,5 @@ envlist = py26,py27,py33,py34,py35,pypy,pypy3 [testenv] +passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python setup.py test From 735a66a5588aadcf02a10b58338d476803916b99 Mon Sep 17 00:00:00 2001 From: Ofekmeister Date: Sat, 20 Aug 2016 13:37:33 -0400 Subject: [PATCH 6113/8469] Make import unconditional Put import on top and updated CHANGES.rst --- CHANGES.rst | 3 +++ setuptools/command/easy_install.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cd20395205..cc027f4118 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ CHANGES v25.4.0 ------- +* #459 via #736: On Windows systems, sys.argv[0] now correctly becomes the + name of entry point. + * Add Extension(py_limited_api=True). When set to a truthy value, that extension gets a filename apropriate for code using Py_LIMITED_API. When used correctly this allows a single compiled extension to work on diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e2a7dc46c9..5065661fa7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2018,11 +2018,11 @@ class ScriptWriter(object): template = textwrap.dedent(""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r + import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': - import re sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point(%(spec)r, %(group)r, %(name)r)() diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index a4b1dfd528..82e1d7e8b8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -74,11 +74,11 @@ def test_get_script_args(self): expected = header + DALS(""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' + import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': - import re sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('spec', 'console_scripts', 'name')() From 774707dce2a31748382aaa019848014a17d0a04a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 17:31:07 -0400 Subject: [PATCH 6114/8469] Issue #27819: Simply default to gztar for sdist formats by default on all platforms. --- command/sdist.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 35a06eb09b..f1b8d91977 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -91,9 +91,6 @@ def checking_metadata(self): negative_opt = {'no-defaults': 'use-defaults', 'no-prune': 'prune' } - default_format = {'posix': 'gztar', - 'nt': 'zip' } - sub_commands = [('check', checking_metadata)] def initialize_options(self): @@ -110,7 +107,7 @@ def initialize_options(self): self.manifest_only = 0 self.force_manifest = 0 - self.formats = None + self.formats = ['gztar'] self.keep_temp = 0 self.dist_dir = None @@ -126,13 +123,6 @@ def finalize_options(self): self.template = "MANIFEST.in" self.ensure_string_list('formats') - if self.formats is None: - try: - self.formats = [self.default_format[os.name]] - except KeyError: - raise DistutilsPlatformError( - "don't know how to create source distributions " - "on platform %s" % os.name) bad_format = archive_util.check_archive_formats(self.formats) if bad_format: From b9baa94e18e91671f9acde4e0e033be1391a7fde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 17:44:54 -0400 Subject: [PATCH 6115/8469] Default to gztar for sdists on all platforms. Ref #748. --- CHANGES.rst | 7 +++++++ setuptools/command/sdist.py | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index cd20395205..c6839a0d54 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v26.0.0 +------- + +* #748: By default, sdists are now produced in gzipped tarfile + format by default on all platforms, adding forward compatibility + for the same behavior in Python 3.6 (See Python #27819). + v25.4.0 ------- diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b6125f5888..1d4f5d5489 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -66,6 +66,17 @@ def run(self): if data not in dist_files: dist_files.append(data) + def initialize_options(self): + orig.sdist.initialize_options(self) + + self._default_to_gztar() + + def _default_to_gztar(self): + # only needed on Python prior to 3.6. + if sys.version_info >= (3, 6, 0, 'beta', 1): + return + self.formats = ['gztar'] + def make_distribution(self): """ Workaround for #516 From 0a603394831bbd9d837994aea5fa0342cc7b0291 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 17:50:41 -0400 Subject: [PATCH 6116/8469] Update changelog --- CHANGES.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 065c77baa0..e23c4e94b6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,12 +9,14 @@ v26.0.0 format by default on all platforms, adding forward compatibility for the same behavior in Python 3.6 (See Python #27819). +* #459 via #736: On Windows with script launchers, + sys.argv[0] now reflects + the name of the entry point, consistent with the behavior in + distlib and pip wrappers. + v25.4.0 ------- -* #459 via #736: On Windows systems, sys.argv[0] now correctly becomes the - name of entry point. - * Add Extension(py_limited_api=True). When set to a truthy value, that extension gets a filename apropriate for code using Py_LIMITED_API. When used correctly this allows a single compiled extension to work on From 6883ff3b2832a0197d52d3d8f0640ae41f52b312 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 18:27:10 -0400 Subject: [PATCH 6117/8469] Update changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e23c4e94b6..5e5bd61406 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,9 @@ v26.0.0 the name of the entry point, consistent with the behavior in distlib and pip wrappers. +* #752 via #753: When indicating ``py_limited_api`` to Extension, + it must be passed as a keyword argument. + v25.4.0 ------- From 22501ae355cbefcea9a58fe7c4ac4395250c1aca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 18:27:14 -0400 Subject: [PATCH 6118/8469] =?UTF-8?q?Bump=20version:=2025.4.0=20=E2=86=92?= =?UTF-8?q?=2026.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b089c68d3c..cf5d01a8d8 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 25.4.0 +current_version = 26.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index db61973500..16d752feac 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="25.4.0", + version="26.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b51be80bd1496a2c5338f41dc7c663409c1b53a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 18:27:14 -0400 Subject: [PATCH 6119/8469] Added tag v26.0.0 for changeset 7cb13a0cd176 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 06083e1c43..6e59e31847 100644 --- a/.hgtags +++ b/.hgtags @@ -303,3 +303,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 2083d7c3fadcf15b3bc07f7532440efbcf8fd18d v25.2.0 2371456ae99d11187c33deacf1308aded31081d9 v25.3.0 f713f9faaaa33c0e9a628dc9322ef8d1fbeb8319 v25.4.0 +7cb13a0cd176f39500701b24dbfec603ead5110c v26.0.0 From 64727bb4d1eb2a44d2b9a67be8d7c613fe78ccef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Aug 2016 20:21:01 -0400 Subject: [PATCH 6120/8469] Issue is fixed, so just exclude the offending version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 16d752feac..f3084a4e04 100755 --- a/setup.py +++ b/setup.py @@ -181,7 +181,7 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - 'pytest>=2.8,<3.0dev', + 'pytest>=2.8,!=3.0.0', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner + wheel, From 1aa71905fc9bd9a13f2b0c371e869ae8eb27308c Mon Sep 17 00:00:00 2001 From: stepshal Date: Mon, 22 Aug 2016 19:25:13 +0700 Subject: [PATCH 6121/8469] Make exactly one space after comma. (#756) --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 033fc8aaef..27d70a60a4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -276,7 +276,7 @@ def get_supported_platform(): __all__ = [ # Basic resource access and distribution/entry point discovery - 'require', 'run_script', 'get_provider', 'get_distribution', + 'require', 'run_script', 'get_provider', 'get_distribution', 'load_entry_point', 'get_entry_map', 'get_entry_info', 'iter_entry_points', 'resource_string', 'resource_stream', 'resource_filename', From 452e13ce06ca0cdebebc61c9326a2db184095353 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Sat, 30 Jul 2016 16:52:11 +0300 Subject: [PATCH 6122/8469] fix for extra names containing '-' --- pkg_resources/__init__.py | 6 +++--- pkg_resources/tests/test_resources.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 27d70a60a4..80da5c1879 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1428,7 +1428,7 @@ def safe_extra(extra): Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased. """ - return re.sub('[^A-Za-z0-9.]+', '_', extra).lower() + return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower() def to_filename(name): @@ -2807,8 +2807,8 @@ def reqs_for_extra(extra): dm[None].extend(common) for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: - extra = safe_extra(extra.strip()) - dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) + s_extra = safe_extra(extra.strip()) + dm[s_extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 2ed5623359..3b13884b94 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -221,6 +221,24 @@ def test_marker_evaluation_with_extras(self): res = list(ws.resolve(parse_requirements("Foo[baz]"), ad)) assert res == [Foo, quux] + def test_marker_evaluation_with_extras_normlized(self): + """Extras are also evaluated as markers at resolution time.""" + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) + # Metadata needs to be native strings due to cStringIO behaviour in + # 2.6, so use str(). + Foo = Distribution.from_filename( + "/foo_dir/Foo-1.2.dist-info", + metadata=Metadata(("METADATA", str("Provides-Extra: baz-lightyear\n" + "Requires-Dist: quux; extra=='baz-lightyear'"))) + ) + ad.add(Foo) + assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo] + quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info") + ad.add(quux) + res = list(ws.resolve(parse_requirements("Foo[baz-lightyear]"), ad)) + assert res == [Foo, quux] + def test_marker_evaluation_with_multiple_extras(self): ad = pkg_resources.Environment([]) ws = WorkingSet([]) From 96ec2c80e6e7943e8413c07e487ee1eed7d135e7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 24 Aug 2016 18:12:02 +0200 Subject: [PATCH 6123/8469] add SUSE cert bundle location --- setuptools/ssl_support.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index f4ba8a92d6..e95dc071dc 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -26,6 +26,7 @@ /etc/ssl/cert.pem /System/Library/OpenSSL/certs/cert.pem /usr/local/share/certs/ca-root-nss.crt +/etc/ssl/ca-bundle.pem """.strip().split() From 7576d32d009142030ae64a867d407c536bad9752 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 24 Aug 2016 18:12:32 +0200 Subject: [PATCH 6124/8469] reference certifi pem bundle properly --- setuptools/ssl_support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index e95dc071dc..1627263027 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -243,6 +243,7 @@ def find_ca_bundle(): if os.path.isfile(cert_path): return cert_path try: - return pkg_resources.resource_filename('certifi', 'cacert.pem') + import certifi + return certifi.where() except (ImportError, ResolutionError, ExtractionError): return None From 691e6ac03339d6aef045e05872b286d91e9f49b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Aug 2016 08:45:33 -0400 Subject: [PATCH 6125/8469] Add appdirs as vendored package. Ref #763. --- pavement.py | 2 + pkg_resources/_vendor/appdirs.py | 552 ++++++++++++++++++ pkg_resources/_vendor/packaging/specifiers.py | 2 +- pkg_resources/_vendor/vendored.txt | 1 + pkg_resources/extern/__init__.py | 2 +- 5 files changed, 557 insertions(+), 2 deletions(-) create mode 100644 pkg_resources/_vendor/appdirs.py diff --git a/pavement.py b/pavement.py index 3d8400865f..f85617d4fe 100644 --- a/pavement.py +++ b/pavement.py @@ -12,9 +12,11 @@ def remove_all(paths): @task def update_vendored(): vendor = Path('pkg_resources/_vendor') + # pip uninstall doesn't support -t, so do it manually remove_all(vendor.glob('packaging*')) remove_all(vendor.glob('six*')) remove_all(vendor.glob('pyparsing*')) + remove_all(vendor.glob('appdirs*')) install_args = [ 'install', '-r', str(vendor / 'vendored.txt'), diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py new file mode 100644 index 0000000000..f4dba0953c --- /dev/null +++ b/pkg_resources/_vendor/appdirs.py @@ -0,0 +1,552 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2005-2010 ActiveState Software Inc. +# Copyright (c) 2013 Eddy Petrișor + +"""Utilities for determining application-specific dirs. + +See for details and usage. +""" +# Dev Notes: +# - MSDN on where to store app data files: +# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 +# - 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__ = '.'.join(map(str, __version_info__)) + + +import sys +import os + +PY3 = sys.version_info[0] == 3 + +if PY3: + unicode = str + +if sys.platform.startswith('java'): + import platform + os_name = platform.java_ver()[3][0] + if os_name.startswith('Windows'): # "Windows XP", "Windows 7", etc. + system = 'win32' + elif os_name.startswith('Mac'): # "Mac OS X", etc. + system = 'darwin' + else: # "Linux", "SunOS", "FreeBSD", etc. + # Setting this to "linux2" is not ideal, but only Windows or Mac + # are actually checked for and the rest of the module expects + # *sys.platform* style strings. + system = 'linux2' +else: + system = sys.platform + + + +def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): + r"""Return full path to the user-specific data 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 ".". + 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 + + for a discussion of issues. + + Typical user data directories are: + Mac OS X: ~/Library/Application Support/ + Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined + Win XP (not roaming): C:\Documents and Settings\\Application Data\\ + Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ + Win 7 (not roaming): C:\Users\\AppData\Local\\ + Win 7 (roaming): C:\Users\\AppData\Roaming\\ + + For Unix, we follow the XDG spec and support $XDG_DATA_HOME. + That means, by default "~/.local/share/". + """ + if system == "win32": + if appauthor is None: + appauthor = appname + const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA" + path = os.path.normpath(_get_win_folder(const)) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + elif system == 'darwin': + path = os.path.expanduser('~/Library/Application Support/') + if appname: + path = os.path.join(path, appname) + else: + path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share")) + if appname: + path = os.path.join(path, appname) + if appname and version: + path = os.path.join(path, version) + return path + + +def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): + """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. + "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 ".". + Only applied when appname is present. + "multipath" is an optional parameter only applicable to *nix + which indicates that the entire list of data dirs should be + returned. By default, the first item from XDG_DATA_DIRS is + returned, or '/usr/local/share/', + if XDG_DATA_DIRS is not set + + Typical user data directories are: + Mac OS X: /Library/Application Support/ + Unix: /usr/local/share/ or /usr/share/ + Win XP: C:\Documents and Settings\All Users\Application Data\\ + Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) + Win 7: C:\ProgramData\\ # Hidden, but writeable on Win 7. + + For Unix, this is using the $XDG_DATA_DIRS[0] default. + + WARNING: Do not use this on Windows. See the Vista-Fail note above for why. + """ + if system == "win32": + if appauthor is None: + appauthor = appname + path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA")) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + elif system == 'darwin': + path = os.path.expanduser('/Library/Application Support') + if appname: + path = os.path.join(path, appname) + else: + # XDG default for $XDG_DATA_DIRS + # only first, if multipath is False + path = os.getenv('XDG_DATA_DIRS', + os.pathsep.join(['/usr/local/share', '/usr/share'])) + pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] + if appname: + if version: + appname = os.path.join(appname, version) + pathlist = [os.sep.join([x, appname]) for x in pathlist] + + if multipath: + path = os.pathsep.join(pathlist) + else: + path = pathlist[0] + return path + + if appname and version: + path = os.path.join(path, version) + return path + + +def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): + r"""Return full path to the user-specific config 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 ".". + 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 + + for a discussion of issues. + + Typical user data directories are: + Mac OS X: same as user_data_dir + Unix: ~/.config/ # 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/". + """ + if system in ["win32", "darwin"]: + path = user_data_dir(appname, appauthor, None, roaming) + else: + path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser("~/.config")) + if appname: + path = os.path.join(path, appname) + if appname and version: + path = os.path.join(path, version) + return path + + +def site_config_dir(appname=None, appauthor=None, version=None, multipath=False): + """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. + "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 ".". + Only applied when appname is present. + "multipath" is an optional parameter only applicable to *nix + which indicates that the entire list of config dirs should be + returned. By default, the first item from XDG_CONFIG_DIRS is + returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set + + Typical user data directories are: + Mac OS X: same as site_data_dir + Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in + $XDG_CONFIG_DIRS + Win *: same as site_data_dir + Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) + + For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False + + WARNING: Do not use this on Windows. See the Vista-Fail note above for why. + """ + if system in ["win32", "darwin"]: + path = site_data_dir(appname, appauthor) + if appname and version: + path = os.path.join(path, version) + else: + # XDG default for $XDG_CONFIG_DIRS + # only first, if multipath is False + path = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg') + pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] + if appname: + if version: + appname = os.path.join(appname, version) + pathlist = [os.sep.join([x, appname]) for x in pathlist] + + if multipath: + path = os.pathsep.join(pathlist) + else: + path = pathlist[0] + return path + + +def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): + r"""Return full path to the user-specific cache 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 ".". + Only applied when appname is present. + "opinion" (boolean) can be False to disable the appending of + "Cache" to the base app data dir for Windows. See + discussion below. + + Typical user cache directories are: + Mac OS X: ~/Library/Caches/ + Unix: ~/.cache/ (XDG default) + Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache + Vista: C:\Users\\AppData\Local\\\Cache + + On Windows the only suggestion in the MSDN docs is that local settings go in + the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming + app data dir (the default returned by `user_data_dir` above). Apps typically + put cache data somewhere *under* the given dir here. Some examples: + ...\Mozilla\Firefox\Profiles\\Cache + ...\Acme\SuperApp\Cache\1.0 + OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. + This can be disabled with the `opinion=False` option. + """ + if system == "win32": + if appauthor is None: + appauthor = appname + path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA")) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + if opinion: + path = os.path.join(path, "Cache") + elif system == 'darwin': + path = os.path.expanduser('~/Library/Caches') + if appname: + path = os.path.join(path, appname) + else: + path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) + 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. + + "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 ".". + Only applied when appname is present. + "opinion" (boolean) can be False to disable the appending of + "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: + Mac OS X: ~/Library/Logs/ + Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined + Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs + Vista: C:\Users\\AppData\Local\\\Logs + + On Windows the only suggestion in the MSDN docs is that local settings + go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in + examples of what some windows apps use for a logs dir.) + + OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA` + value for Windows and appends "log" to the user cache dir for Unix. + This can be disabled with the `opinion=False` option. + """ + if system == "darwin": + path = os.path.join( + os.path.expanduser('~/Library/Logs'), + appname) + elif system == "win32": + path = user_data_dir(appname, appauthor, version) + version = False + if opinion: + path = os.path.join(path, "Logs") + else: + path = user_cache_dir(appname, appauthor, version) + version = False + if opinion: + path = os.path.join(path, "log") + if appname and version: + path = os.path.join(path, version) + return path + + +class AppDirs(object): + """Convenience wrapper for getting application dirs.""" + def __init__(self, appname, appauthor=None, version=None, roaming=False, + multipath=False): + self.appname = appname + self.appauthor = appauthor + self.version = version + self.roaming = roaming + self.multipath = multipath + + @property + def user_data_dir(self): + return user_data_dir(self.appname, self.appauthor, + version=self.version, roaming=self.roaming) + + @property + def site_data_dir(self): + return site_data_dir(self.appname, self.appauthor, + version=self.version, multipath=self.multipath) + + @property + def user_config_dir(self): + return user_config_dir(self.appname, self.appauthor, + version=self.version, roaming=self.roaming) + + @property + def site_config_dir(self): + return site_config_dir(self.appname, self.appauthor, + version=self.version, multipath=self.multipath) + + @property + def user_cache_dir(self): + return user_cache_dir(self.appname, self.appauthor, + version=self.version) + + @property + def user_log_dir(self): + return user_log_dir(self.appname, self.appauthor, + version=self.version) + + +#---- internal support stuff + +def _get_win_folder_from_registry(csidl_name): + """This is a fallback technique at best. I'm not sure if using the + registry for this guarantees us the correct answer for all CSIDL_* + names. + """ + import _winreg + + shell_folder_name = { + "CSIDL_APPDATA": "AppData", + "CSIDL_COMMON_APPDATA": "Common AppData", + "CSIDL_LOCAL_APPDATA": "Local AppData", + }[csidl_name] + + key = _winreg.OpenKey( + _winreg.HKEY_CURRENT_USER, + r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" + ) + dir, type = _winreg.QueryValueEx(key, shell_folder_name) + return dir + + +def _get_win_folder_with_pywin32(csidl_name): + from win32com.shell import shellcon, shell + dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0) + # Try to make this a unicode path because SHGetFolderPath does + # not return unicode strings when there is unicode data in the + # path. + try: + dir = unicode(dir) + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in dir: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + try: + import win32api + dir = win32api.GetShortPathName(dir) + except ImportError: + pass + except UnicodeError: + pass + return dir + + +def _get_win_folder_with_ctypes(csidl_name): + import ctypes + + csidl_const = { + "CSIDL_APPDATA": 26, + "CSIDL_COMMON_APPDATA": 35, + "CSIDL_LOCAL_APPDATA": 28, + }[csidl_name] + + buf = ctypes.create_unicode_buffer(1024) + ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf) + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in buf: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + buf2 = ctypes.create_unicode_buffer(1024) + if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024): + buf = buf2 + + return buf.value + +def _get_win_folder_with_jna(csidl_name): + import array + from com.sun import jna + from com.sun.jna.platform import win32 + + buf_size = win32.WinDef.MAX_PATH * 2 + buf = array.zeros('c', buf_size) + shell = win32.Shell32.INSTANCE + shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf) + dir = jna.Native.toString(buf.tostring()).rstrip("\0") + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in dir: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + buf = array.zeros('c', buf_size) + kernel = win32.Kernel32.INSTANCE + if kernal.GetShortPathName(dir, buf, buf_size): + dir = jna.Native.toString(buf.tostring()).rstrip("\0") + + return dir + +if system == "win32": + try: + import win32com.shell + _get_win_folder = _get_win_folder_with_pywin32 + except ImportError: + try: + from ctypes import windll + _get_win_folder = _get_win_folder_with_ctypes + except ImportError: + try: + import com.sun.jna + _get_win_folder = _get_win_folder_with_jna + except ImportError: + _get_win_folder = _get_win_folder_from_registry + + +#---- self test code + +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") + + print("-- app dirs (with optional 'version')") + dirs = AppDirs(appname, appauthor, version="1.0") + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (without optional 'version')") + dirs = AppDirs(appname, appauthor) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (without optional 'appauthor')") + dirs = AppDirs(appname) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (with disabled 'appauthor')") + dirs = AppDirs(appname, appauthor=False) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 9b6353f052..7f5a76cfd6 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -198,7 +198,7 @@ def filter(self, iterable, prereleases=None): (prereleases or self.prereleases)): found_prereleases.append(version) # Either this is not a prerelease, or we should have been - # accepting prereleases from the beginning. + # accepting prereleases from the begining. else: yielded = True yield version diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index a30a409d48..2b51c5474f 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,3 +1,4 @@ packaging==16.7 pyparsing==2.1.8 six==1.10.0 +appdirs==1.4.0 diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 492f66f10d..b4156fec20 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -69,5 +69,5 @@ def install(self): sys.meta_path.append(self) -names = 'packaging', 'pyparsing', 'six' +names = 'packaging', 'pyparsing', 'six', 'appdirs' VendorImporter(__name__, names).install() From beec7ff9b0e301e6fffb21f9a8d999829eb8e678 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Aug 2016 08:55:25 -0400 Subject: [PATCH 6126/8469] Rely on appdirs for resolving a cache dir for Python-Eggs. Fixes #763. --- CHANGES.rst | 8 +++++++ pkg_resources/__init__.py | 50 +++++++-------------------------------- 2 files changed, 17 insertions(+), 41 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5e5bd61406..78cea8079f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v26.1.0 +------- + +* #763: ``pkg_resources.get_default_cache`` now defers to the + `appdirs project `_ to + resolve the cache directory. Adds a vendored dependency on + appdirs to pkg_resources. + v26.0.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 27d70a60a4..a93a3da7af 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -65,6 +65,7 @@ except ImportError: importlib_machinery = None +from pkg_resources.extern import appdirs from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') __import__('pkg_resources.extern.packaging.specifiers') @@ -1358,48 +1359,15 @@ def cleanup_resources(self, force=False): def get_default_cache(): - """Determine the default cache location - - This returns the ``PYTHON_EGG_CACHE`` environment variable, if set. - Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the - "Application Data" directory. On all other systems, it's "~/.python-eggs". """ - try: - return os.environ['PYTHON_EGG_CACHE'] - except KeyError: - pass - - if os.name != 'nt': - return os.path.expanduser('~/.python-eggs') - - # XXX this may be locale-specific! - app_data = 'Application Data' - app_homes = [ - # best option, should be locale-safe - (('APPDATA',), None), - (('USERPROFILE',), app_data), - (('HOMEDRIVE', 'HOMEPATH'), app_data), - (('HOMEPATH',), app_data), - (('HOME',), None), - # 95/98/ME - (('WINDIR',), app_data), - ] - - for keys, subdir in app_homes: - dirname = '' - for key in keys: - if key in os.environ: - dirname = os.path.join(dirname, os.environ[key]) - else: - break - else: - if subdir: - dirname = os.path.join(dirname, subdir) - return os.path.join(dirname, 'Python-Eggs') - else: - raise RuntimeError( - "Please set the PYTHON_EGG_CACHE environment variable" - ) + Return the ``PYTHON_EGG_CACHE`` environment variable + or a platform-relevant user cache dir for an app + named "Python-Eggs". + """ + return ( + os.environ.get('PYTHON_EGG_CACHE') + or appdirs.user_cache_dir(appname='Python-Eggs') + ) def safe_name(name): From 495bb634f8cb450ee11130917de1c1b85486071f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Aug 2016 10:04:07 -0400 Subject: [PATCH 6127/8469] =?UTF-8?q?Bump=20version:=2026.0.0=20=E2=86=92?= =?UTF-8?q?=2026.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index cf5d01a8d8..eea97c9bb0 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 26.0.0 +current_version = 26.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index f3084a4e04..c37c998022 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="26.0.0", + version="26.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f455ee4f5881fa549c2dc864efc9848e170de6ef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Aug 2016 10:04:08 -0400 Subject: [PATCH 6128/8469] Added tag v26.1.0 for changeset b299cfc9d7d8 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6e59e31847..9977a89680 100644 --- a/.hgtags +++ b/.hgtags @@ -304,3 +304,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 2371456ae99d11187c33deacf1308aded31081d9 v25.3.0 f713f9faaaa33c0e9a628dc9322ef8d1fbeb8319 v25.4.0 7cb13a0cd176f39500701b24dbfec603ead5110c v26.0.0 +b299cfc9d7d89070e8eec9751a8be72c8a75506b v26.1.0 From c7c6522000dc6a32f5933dc837b188b612744b3b Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 29 Aug 2016 16:20:54 +1000 Subject: [PATCH 6129/8469] Install py.test>=2.8,<3 The 3.x series is currently broken. Until py.test works again, 3.x should not be used by anything. --- .travis.yml | 2 +- setup.py | 2 +- tox.ini | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed077d9460..81d1f170f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - LC_ALL=C LC_CTYPE=C script: # avoid VersionConflict when newer version is required - - pip install -U pytest + - pip install -U 'pytest>=2.8,<3' # Output the env, because the travis docs just can't be trusted - env diff --git a/setup.py b/setup.py index c37c998022..3b7ab31bf8 100755 --- a/setup.py +++ b/setup.py @@ -181,7 +181,7 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - 'pytest>=2.8,!=3.0.0', + 'pytest>=2.8,<3', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner + wheel, diff --git a/tox.ini b/tox.ini index 7ce7ce4152..868ba317e7 100644 --- a/tox.ini +++ b/tox.ini @@ -2,5 +2,8 @@ envlist = py26,py27,py33,py34,py35,pypy,pypy3 [testenv] +deps= + pytest-flake8 + pytest>=2.8,<3 passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir -commands=python setup.py test +commands=python setup.py test --addopts='-rsx' From a3a7cac18c91f953957cb5fa440f203ed1f2b5fd Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 29 Aug 2016 10:28:29 +0200 Subject: [PATCH 6130/8469] easy_install: update links to documentation --- setuptools/command/easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5065661fa7..e8b90c704e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -8,7 +8,7 @@ packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ https://pythonhosted.org/setuptools/easy_install.html +__ https://setuptools.readthedocs.io/en/latest/easy_install.html """ @@ -512,7 +512,7 @@ def check_site_dir(self): For information on other options, you may wish to consult the documentation at: - https://pythonhosted.org/setuptools/easy_install.html + https://setuptools.readthedocs.io/en/latest/easy_install.html Please make the appropriate changes for your system and try again. """).lstrip() @@ -1256,7 +1256,8 @@ def byte_compile(self, to_compile): * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations + https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations + Please make the appropriate changes for your system and try again.""").lstrip() From 367b540c62c522fde1f8f048cfb75a6af32fc318 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 29 Aug 2016 16:46:55 -0400 Subject: [PATCH 6131/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 78cea8079f..be52f56f95 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v26.1.1 +------- + +* Re-release of 26.1.0 with pytest pinned to allow for automated + deployement and thus proper packaging environment variables, + fixing issues with missing executable launchers. + v26.1.0 ------- From e4ba41ec7f54370a030fb09f9f0a334396f38489 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 29 Aug 2016 16:47:02 -0400 Subject: [PATCH 6132/8469] =?UTF-8?q?Bump=20version:=2026.1.0=20=E2=86=92?= =?UTF-8?q?=2026.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index eea97c9bb0..3bcd66a972 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 26.1.0 +current_version = 26.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 3b7ab31bf8..9263c5b74a 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="26.1.0", + version="26.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 336258f31655704751d1d0d0b9381d5b4e55b659 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 29 Aug 2016 16:47:02 -0400 Subject: [PATCH 6133/8469] Added tag v26.1.1 for changeset e1d057e23b2f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9977a89680..88f2dc60ae 100644 --- a/.hgtags +++ b/.hgtags @@ -305,3 +305,4 @@ c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 f713f9faaaa33c0e9a628dc9322ef8d1fbeb8319 v25.4.0 7cb13a0cd176f39500701b24dbfec603ead5110c v26.0.0 b299cfc9d7d89070e8eec9751a8be72c8a75506b v26.1.0 +e1d057e23b2fec5991084744c356a6c7e05b219d v26.1.1 From f3f736a749a120d124e54e325875775c9e124ee0 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 30 Aug 2016 10:47:49 -0700 Subject: [PATCH 6134/8469] =?UTF-8?q?Issue=20#27895:=20=20Spelling=20fixes?= =?UTF-8?q?=20(Contributed=20by=20Ville=20Skytt=C3=A4).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 5e18c61360..77a07ef39d 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -125,7 +125,7 @@ def test_reg_class(self): self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') # looking for values that should exist on all - # windows registeries versions. + # windows registry versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') self.assertIn(v, ('0', '1', '2')) From 3ac5842595463683cbc1d980a8b770d84cef84f9 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Wed, 31 Aug 2016 08:22:29 +0100 Subject: [PATCH 6135/8469] Closes #27904: Improved logging statements to defer formatting until needed. --- archive_util.py | 2 +- cmd.py | 3 +-- command/bdist_dumb.py | 2 +- command/build_ext.py | 6 +++--- command/config.py | 2 +- command/install.py | 2 +- command/register.py | 6 +++--- command/sdist.py | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/archive_util.py b/archive_util.py index bed1384900..78ae5757c3 100644 --- a/archive_util.py +++ b/archive_util.py @@ -171,7 +171,7 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): path = os.path.normpath(os.path.join(dirpath, name)) if os.path.isfile(path): zip.write(path, path) - log.info("adding '%s'" % path) + log.info("adding '%s'", path) zip.close() return zip_filename diff --git a/cmd.py b/cmd.py index c89d5efc45..b5d9dc387d 100644 --- a/cmd.py +++ b/cmd.py @@ -329,8 +329,7 @@ def get_sub_commands(self): # -- External world manipulation ----------------------------------- def warn(self, msg): - log.warn("warning: %s: %s\n" % - (self.get_command_name(), msg)) + log.warn("warning: %s: %s\n", self.get_command_name(), msg) def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index f1bfb24923..e9274d925a 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -85,7 +85,7 @@ def run(self): install.skip_build = self.skip_build install.warn_dir = 0 - log.info("installing to %s" % self.bdist_dir) + log.info("installing to %s", self.bdist_dir) self.run_command('install') # And make an archive relative to the root of the diff --git a/command/build_ext.py b/command/build_ext.py index f03a4e31d8..5e51ae4ba1 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -363,9 +363,9 @@ def check_extensions_list(self, extensions): ext_name, build_info = ext - log.warn(("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" - "-- please convert to Extension instance" % ext_name)) + log.warn("old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s'" + "-- please convert to Extension instance", ext_name) if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): diff --git a/command/config.py b/command/config.py index b1fd09e016..4ae153d194 100644 --- a/command/config.py +++ b/command/config.py @@ -337,7 +337,7 @@ def dump_file(filename, head=None): If head is not None, will be dumped before the file content. """ if head is None: - log.info('%s' % filename) + log.info('%s', filename) else: log.info(head) file = open(filename) diff --git a/command/install.py b/command/install.py index 9474e9c599..fca05d69c6 100644 --- a/command/install.py +++ b/command/install.py @@ -385,7 +385,7 @@ def dump_dirs(self, msg): else: opt_name = opt_name.translate(longopt_xlate) val = getattr(self, opt_name) - log.debug(" %s: %s" % (opt_name, val)) + log.debug(" %s: %s", opt_name, val) def finalize_unix(self): """Finalizes options for posix platforms.""" diff --git a/command/register.py b/command/register.py index 456d50d519..0fac94e9e5 100644 --- a/command/register.py +++ b/command/register.py @@ -94,7 +94,7 @@ def verify_metadata(self): ''' # send the info to the server and report the result (code, result) = self.post_to_server(self.build_post_data('verify')) - log.info('Server response (%s): %s' % (code, result)) + log.info('Server response (%s): %s', code, result) def send_metadata(self): ''' Send the metadata to the package index server. @@ -205,7 +205,7 @@ def send_metadata(self): data['email'] = input(' EMail: ') code, result = self.post_to_server(data) if code != 200: - log.info('Server response (%s): %s' % (code, result)) + log.info('Server response (%s): %s', code, result) else: log.info('You will receive an email shortly.') log.info(('Follow the instructions in it to ' @@ -216,7 +216,7 @@ def send_metadata(self): while not data['email']: data['email'] = input('Your email address: ') code, result = self.post_to_server(data) - log.info('Server response (%s): %s' % (code, result)) + log.info('Server response (%s): %s', code, result) def build_post_data(self, action): # figure the data to send - the metadata plus some additional diff --git a/command/sdist.py b/command/sdist.py index f1b8d91977..4fd1d4715d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -412,7 +412,7 @@ def make_release_tree(self, base_dir, files): log.info(msg) for file in files: if not os.path.isfile(file): - log.warn("'%s' not a regular file -- skipping" % file) + log.warn("'%s' not a regular file -- skipping", file) else: dest = os.path.join(base_dir, file) self.copy_file(file, dest, link=link) From 0685847e2065e046808e038fd50d3368be24541f Mon Sep 17 00:00:00 2001 From: R David Murray Date: Wed, 31 Aug 2016 11:39:35 -0400 Subject: [PATCH 6136/8469] #27904: fix distutils tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Ville Skyttä. --- tests/test_build_py.py | 3 ++- tests/test_install_lib.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 18283dc722..0712e92c6a 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -168,7 +168,8 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertIn('byte-compiling is disabled', self.logs[0][1]) + self.assertIn('byte-compiling is disabled', + self.logs[0][1] % self.logs[0][2]) def test_suite(): diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py index 5378aa8249..fda6315bbc 100644 --- a/tests/test_install_lib.py +++ b/tests/test_install_lib.py @@ -104,7 +104,8 @@ def test_dont_write_bytecode(self): finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertIn('byte-compiling is disabled', self.logs[0][1]) + self.assertIn('byte-compiling is disabled', + self.logs[0][1] % self.logs[0][2]) def test_suite(): From ac97b020927d8c00d43595afe46749ef6cab7159 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 13:55:33 -0400 Subject: [PATCH 6137/8469] Issue #27919: Deprecate extra_path option in distutils. --- command/install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/install.py b/command/install.py index fca05d69c6..0258d3deae 100644 --- a/command/install.py +++ b/command/install.py @@ -175,6 +175,7 @@ def initialize_options(self): self.compile = None self.optimize = None + # Deprecated # These two are for putting non-packagized distributions into their # own directory and creating a .pth file if it makes sense. # 'extra_path' comes from the setup file; 'install_path_file' can @@ -344,6 +345,7 @@ def finalize_options(self): 'scripts', 'data', 'headers', 'userbase', 'usersite') + # Deprecated # Well, we're not actually fully completely finalized yet: we still # have to deal with 'extra_path', which is the hack for allowing # non-packagized module distributions (hello, Numerical Python!) to @@ -490,6 +492,10 @@ def handle_extra_path(self): self.extra_path = self.distribution.extra_path if self.extra_path is not None: + log.warn( + "Distribution option extra_path is deprecated. " + "See issue27919 for details." + ) if isinstance(self.extra_path, str): self.extra_path = self.extra_path.split(',') From 4d035167b3b441e86d58e4d865b8b2c2dd5407a7 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 1 Sep 2016 21:42:30 -0300 Subject: [PATCH 6138/8469] Use pytest>=3.0.2 The bug that lead to pin it (pytest-dev/pytest#1888) was fixed in 3.0.2 --- .travis.yml | 2 +- setup.py | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81d1f170f3..b8bca7cc7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - LC_ALL=C LC_CTYPE=C script: # avoid VersionConflict when newer version is required - - pip install -U 'pytest>=2.8,<3' + - pip install -U 'pytest>=3.0.2' # Output the env, because the travis docs just can't be trusted - env diff --git a/setup.py b/setup.py index 9263c5b74a..90702c1d7d 100755 --- a/setup.py +++ b/setup.py @@ -181,7 +181,7 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - 'pytest>=2.8,<3', + 'pytest>=3.0.2', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner + wheel, diff --git a/tox.ini b/tox.ini index 868ba317e7..806e6ed26f 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,6 @@ envlist = py26,py27,py33,py34,py35,pypy,pypy3 [testenv] deps= pytest-flake8 - pytest>=2.8,<3 + pytest>=3.0.2 passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python setup.py test --addopts='-rsx' From b15f55c3838ea7dd2719178b3c8ca995b4e9e2e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 21:55:22 -0400 Subject: [PATCH 6139/8469] Backed out changeset cc86e9e102e8 --- tests/test_filelist.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index e719198c6d..391af3cba2 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -9,7 +9,7 @@ from distutils import filelist import test.support -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.tests import support MANIFEST_IN = """\ @@ -329,5 +329,12 @@ def test_non_local_discovery(self): self.assertEqual(filelist.findall(temp_dir), expected) +def test_suite(): + return unittest.TestSuite([ + unittest.makeSuite(FileListTestCase), + unittest.makeSuite(FindAllTestCase), + ]) + + if __name__ == "__main__": - unittest.main() + run_unittest(test_suite()) From 1bab356fbc59272d9e17f03e52930cd4574ffa0a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 22:28:51 -0400 Subject: [PATCH 6140/8469] Only apply findall patch on affected Pythons. --- setuptools/__init__.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index cf0c39f2f8..4270394744 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,6 +1,7 @@ """Extensions to the 'distutils' for large or complex distributions""" import os +import sys import functools import distutils.core import distutils.filelist @@ -17,7 +18,7 @@ __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', - 'find_packages' + 'find_packages', ] __version__ = setuptools.version.__version__ @@ -171,5 +172,14 @@ def findall(dir=os.curdir): return list(files) -# fix findall bug in distutils (http://bugs.python.org/issue12885) -distutils.filelist.findall = findall +has_issue_12885 = ( + sys.version_info < (3, 4, 6) + or + (3, 5) < sys.version_info <= (3, 5, 3) + or + (3, 6) < sys.version_info +) + +if has_issue_12885: + # fix findall bug in distutils (http://bugs.python.org/issue12885) + distutils.filelist.findall = findall From 7f8144544f23f4fd84d339d846b91d4e3b703dd4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 22:58:56 -0400 Subject: [PATCH 6141/8469] Provide forward compatibility for Warehouse as the default repository for the upload command. --- CHANGES.rst | 22 ++++++++++++++++++++++ setuptools/__init__.py | 17 +++++++++++++++++ setuptools/command/upload_docs.py | 5 +++++ 3 files changed, 44 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index be52f56f95..a45575ac17 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,28 @@ CHANGES ======= +v27.0.0 +------- + +* Now use Warehouse by default for + ``upload``, patching ``distutils.config.PyPIRCCommand`` to + affect default behavior. + + Any config in .pypirc should be updated to replace + + https://pypi.python.org/pypi/ + + with + + https://upload.pypi.org/legacy/ + + Similarly, any passwords stored in the keyring should be + updated to use this new value for "system". + + The ``upload_docs`` command will continue to use the python.org + site, but the command is now deprecated. Users are urged to use + Read The Docs instead. + v26.1.1 ------- diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 4270394744..2ca971038b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -183,3 +183,20 @@ def findall(dir=os.curdir): if has_issue_12885: # fix findall bug in distutils (http://bugs.python.org/issue12885) distutils.filelist.findall = findall + + +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) + or + (3, 6) < sys.version_info +) + +if needs_warehouse: + warehouse = 'https://upload.pypi.org/legacy/' + distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ccc1c76ffc..269dc2d503 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -29,6 +29,10 @@ def _encode(s): class upload_docs(upload): + # override the default repository as upload_docs isn't + # supported by Warehouse (and won't be). + DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi/' + description = 'Upload documentation to PyPI' user_options = [ @@ -53,6 +57,7 @@ def initialize_options(self): self.target_dir = None def finalize_options(self): + log.warn("Upload_docs command is deprecated. Use RTD instead.") upload.finalize_options(self) if self.upload_dir is None: if self.has_sphinx(): From bfef652ebcddc99c4b891f96f3d42a3c51bfcccc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Sep 2016 23:27:45 -0400 Subject: [PATCH 6142/8469] Issue #12885: Revert commits in 3.4 branch which is security-only fixes. --- filelist.py | 48 ++++++++++++++++++++++++------------------ tests/test_filelist.py | 48 ++---------------------------------------- 2 files changed, 29 insertions(+), 67 deletions(-) diff --git a/filelist.py b/filelist.py index 6522e69f06..db3f7a9680 100644 --- a/filelist.py +++ b/filelist.py @@ -6,7 +6,6 @@ import os, re import fnmatch -import functools from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log @@ -243,28 +242,35 @@ def exclude_pattern (self, pattern, # ---------------------------------------------------------------------- # Utility functions -def _find_all_simple(path): - """ - Find all files under 'path' - """ - results = ( - os.path.join(base, file) - for base, dirs, files in os.walk(path, followlinks=True) - for file in files - ) - return filter(os.path.isfile, results) - - def findall(dir=os.curdir): + """Find all files under 'dir' and return the list of full filenames + (relative to 'dir'). """ - Find all files under 'dir' and return the list of full filenames. - Unless dir is '.', return full filenames with dir prepended. - """ - files = _find_all_simple(dir) - if dir == os.curdir: - make_rel = functools.partial(os.path.relpath, start=dir) - files = map(make_rel, files) - return list(files) + from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK + + list = [] + stack = [dir] + pop = stack.pop + push = stack.append + + while stack: + dir = pop() + names = os.listdir(dir) + + for name in names: + if dir != os.curdir: # avoid the dreaded "./" syndrome + fullname = os.path.join(dir, name) + else: + fullname = name + + # Avoid excess stat calls -- just one will do, thank you! + stat = os.stat(fullname) + mode = stat[ST_MODE] + if S_ISREG(mode): + list.append(fullname) + elif S_ISDIR(mode) and not S_ISLNK(mode): + push(fullname) + return list def glob_to_re(pattern): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 391af3cba2..278809c09b 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -6,10 +6,8 @@ from distutils.log import WARN from distutils.errors import DistutilsTemplateError from distutils.filelist import glob_to_re, translate_pattern, FileList -from distutils import filelist -import test.support -from test.support import captured_stdout, run_unittest +from test.support import captured_stdout from distutils.tests import support MANIFEST_IN = """\ @@ -294,47 +292,5 @@ def test_process_template(self): self.assertWarnings() -class FindAllTestCase(unittest.TestCase): - @test.support.skip_unless_symlink - def test_missing_symlink(self): - with test.support.temp_cwd(): - os.symlink('foo', 'bar') - self.assertEqual(filelist.findall(), []) - - def test_basic_discovery(self): - """ - When findall is called with no parameters or with - '.' as the parameter, the dot should be omitted from - the results. - """ - with test.support.temp_cwd(): - os.mkdir('foo') - file1 = os.path.join('foo', 'file1.txt') - test.support.create_empty_file(file1) - os.mkdir('bar') - file2 = os.path.join('bar', 'file2.txt') - test.support.create_empty_file(file2) - expected = [file2, file1] - self.assertEqual(sorted(filelist.findall()), expected) - - def test_non_local_discovery(self): - """ - When findall is called with another path, the full - path name should be returned. - """ - with test.support.temp_dir() as temp_dir: - file1 = os.path.join(temp_dir, 'file1.txt') - test.support.create_empty_file(file1) - expected = [file1] - self.assertEqual(filelist.findall(temp_dir), expected) - - -def test_suite(): - return unittest.TestSuite([ - unittest.makeSuite(FileListTestCase), - unittest.makeSuite(FindAllTestCase), - ]) - - if __name__ == "__main__": - run_unittest(test_suite()) + unittest.main() From d6efc9424328b42a3c7aeae758bab35bc7df5014 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 19:09:42 -0400 Subject: [PATCH 6143/8469] Introduce a new monkey module to encapsulate the monkeypatching. --- setuptools/__init__.py | 6 +++--- setuptools/dist.py | 19 ++----------------- setuptools/extension.py | 2 +- setuptools/monkey.py | 22 ++++++++++++++++++++++ 4 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 setuptools/monkey.py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 2ca971038b..4038ee83af 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -5,7 +5,6 @@ import functools import distutils.core import distutils.filelist -from distutils.core import Command as _Command from distutils.util import convert_path from fnmatch import fnmatchcase @@ -13,7 +12,8 @@ import setuptools.version from setuptools.extension import Extension -from setuptools.dist import Distribution, Feature, _get_unpatched +from setuptools.dist import Distribution, Feature +from setuptools.monkey import _get_unpatched from setuptools.depends import Require __all__ = [ @@ -122,7 +122,7 @@ def _looks_like_package(path): setup = distutils.core.setup -_Command = _get_unpatched(_Command) +_Command = _get_unpatched(distutils.core.Command) class Command(_Command): diff --git a/setuptools/dist.py b/setuptools/dist.py index 820df6d5d6..380b9436fd 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -9,7 +9,6 @@ import distutils.core import distutils.cmd import distutils.dist -from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from distutils.util import rfc822_escape @@ -20,25 +19,11 @@ from setuptools.depends import Require from setuptools import windows_support +from setuptools.monkey import _get_unpatched import pkg_resources -def _get_unpatched(cls): - """Protect against re-patching the distutils if reloaded - - Also ensures that no other distutils extension monkeypatched the distutils - first. - """ - while cls.__module__.startswith('setuptools'): - cls, = cls.__bases__ - if not cls.__module__.startswith('distutils'): - raise AssertionError( - "distutils has already been patched by %r" % cls - ) - return cls - - -_Distribution = _get_unpatched(_Distribution) +_Distribution = _get_unpatched(distutils.core.Distribution) def _patch_distribution_metadata_write_pkg_file(): diff --git a/setuptools/extension.py b/setuptools/extension.py index f8058b729f..7ef3fad27b 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -7,7 +7,7 @@ from setuptools.extern.six.moves import map -from .dist import _get_unpatched +from .monkey import _get_unpatched from . import msvc _Extension = _get_unpatched(distutils.core.Extension) diff --git a/setuptools/monkey.py b/setuptools/monkey.py new file mode 100644 index 0000000000..b6baf49d68 --- /dev/null +++ b/setuptools/monkey.py @@ -0,0 +1,22 @@ +""" +Monkey patching of distutils. +""" + + +__all__ = [] +"everything is private" + + +def _get_unpatched(cls): + """Protect against re-patching the distutils if reloaded + + Also ensures that no other distutils extension monkeypatched the distutils + first. + """ + while cls.__module__.startswith('setuptools'): + cls, = cls.__bases__ + if not cls.__module__.startswith('distutils'): + raise AssertionError( + "distutils has already been patched by %r" % cls + ) + return cls From 57a5c05e6f460260f1339dce37407c724ad4c5e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 19:28:08 -0400 Subject: [PATCH 6144/8469] Move monkeypatching in package module into monkey. --- setuptools/__init__.py | 38 +++----------------------------------- setuptools/monkey.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 4038ee83af..0129658a40 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,7 +1,6 @@ """Extensions to the 'distutils' for large or complex distributions""" import os -import sys import functools import distutils.core import distutils.filelist @@ -13,8 +12,8 @@ import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribution, Feature -from setuptools.monkey import _get_unpatched from setuptools.depends import Require +from . import monkey __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', @@ -122,7 +121,7 @@ def _looks_like_package(path): setup = distutils.core.setup -_Command = _get_unpatched(distutils.core.Command) +_Command = monkey._get_unpatched(distutils.core.Command) class Command(_Command): @@ -144,10 +143,6 @@ def reinitialize_command(self, command, reinit_subcommands=0, **kw): return cmd -# we can't patch distutils.cmd, alas -distutils.core.Command = Command - - def _find_all_simple(path): """ Find all files under 'path' @@ -172,31 +167,4 @@ def findall(dir=os.curdir): return list(files) -has_issue_12885 = ( - sys.version_info < (3, 4, 6) - or - (3, 5) < sys.version_info <= (3, 5, 3) - or - (3, 6) < sys.version_info -) - -if has_issue_12885: - # fix findall bug in distutils (http://bugs.python.org/issue12885) - distutils.filelist.findall = findall - - -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) - or - (3, 6) < sys.version_info -) - -if needs_warehouse: - warehouse = 'https://upload.pypi.org/legacy/' - distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse +monkey.patch_all() diff --git a/setuptools/monkey.py b/setuptools/monkey.py index b6baf49d68..189fa4e032 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -2,6 +2,11 @@ Monkey patching of distutils. """ +import sys +import distutils.filelist + +import setuptools + __all__ = [] "everything is private" @@ -20,3 +25,36 @@ def _get_unpatched(cls): "distutils has already been patched by %r" % cls ) return cls + + +def patch_all(): + # we can't patch distutils.cmd, alas + distutils.core.Command = setuptools.Command + + has_issue_12885 = ( + sys.version_info < (3, 4, 6) + or + (3, 5) < sys.version_info <= (3, 5, 3) + or + (3, 6) < sys.version_info + ) + + if has_issue_12885: + # fix findall bug in distutils (http://bugs.python.org/issue12885) + distutils.filelist.findall = setuptools.findall + + 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) + or + (3, 6) < sys.version_info + ) + + if needs_warehouse: + warehouse = 'https://upload.pypi.org/legacy/' + distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse From 443cabec148460b3a688923df1a63f689d1164c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 19:30:10 -0400 Subject: [PATCH 6145/8469] Remove private prefix from monkey as monkey module explicitly declares that all functions are private. --- setuptools/__init__.py | 2 +- setuptools/dist.py | 4 ++-- setuptools/extension.py | 4 ++-- setuptools/monkey.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 0129658a40..41b590d7b5 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -121,7 +121,7 @@ def _looks_like_package(path): setup = distutils.core.setup -_Command = monkey._get_unpatched(distutils.core.Command) +_Command = monkey.get_unpatched(distutils.core.Command) class Command(_Command): diff --git a/setuptools/dist.py b/setuptools/dist.py index 380b9436fd..7a4249f1a1 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -19,11 +19,11 @@ from setuptools.depends import Require from setuptools import windows_support -from setuptools.monkey import _get_unpatched +from setuptools.monkey import get_unpatched import pkg_resources -_Distribution = _get_unpatched(distutils.core.Distribution) +_Distribution = get_unpatched(distutils.core.Distribution) def _patch_distribution_metadata_write_pkg_file(): diff --git a/setuptools/extension.py b/setuptools/extension.py index 7ef3fad27b..073d9459a9 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -7,10 +7,10 @@ from setuptools.extern.six.moves import map -from .monkey import _get_unpatched +from .monkey import get_unpatched from . import msvc -_Extension = _get_unpatched(distutils.core.Extension) +_Extension = get_unpatched(distutils.core.Extension) msvc.patch_for_specialized_compiler() diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 189fa4e032..1961dfbaa6 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -12,7 +12,7 @@ "everything is private" -def _get_unpatched(cls): +def get_unpatched(cls): """Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils From cd22ba427f9b201d6bc48586ddf4595312b9e19e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 19:50:27 -0400 Subject: [PATCH 6146/8469] Move (much of?) the rest of the monkey patching into the monkey module --- setuptools/dist.py | 129 ++++++++++++++++------------------------ setuptools/extension.py | 15 +---- setuptools/monkey.py | 41 +++++++++++++ 3 files changed, 95 insertions(+), 90 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 7a4249f1a1..d321e6c537 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -23,83 +23,58 @@ import pkg_resources -_Distribution = get_unpatched(distutils.core.Distribution) - - -def _patch_distribution_metadata_write_pkg_file(): - """Patch write_pkg_file to also write Requires-Python/Requires-External""" - - # Based on Python 3.5 version - def write_pkg_file(self, file): - """Write the PKG-INFO format data to a file object. - """ - version = '1.0' - if (self.provides or self.requires or self.obsoletes or - self.classifiers or self.download_url): - version = '1.1' - # Setuptools specific for PEP 345 - if hasattr(self, 'python_requires'): - version = '1.2' - - file.write('Metadata-Version: %s\n' % version) - file.write('Name: %s\n' % self.get_name()) - file.write('Version: %s\n' % self.get_version()) - file.write('Summary: %s\n' % self.get_description()) - file.write('Home-page: %s\n' % self.get_url()) - file.write('Author: %s\n' % self.get_contact()) - file.write('Author-email: %s\n' % self.get_contact_email()) - file.write('License: %s\n' % self.get_license()) - if self.download_url: - file.write('Download-URL: %s\n' % self.download_url) - - long_desc = rfc822_escape(self.get_long_description()) - file.write('Description: %s\n' % long_desc) - - keywords = ','.join(self.get_keywords()) - if keywords: - file.write('Keywords: %s\n' % keywords) - - self._write_list(file, 'Platform', self.get_platforms()) - self._write_list(file, 'Classifier', self.get_classifiers()) - - # PEP 314 - self._write_list(file, 'Requires', self.get_requires()) - self._write_list(file, 'Provides', self.get_provides()) - self._write_list(file, 'Obsoletes', self.get_obsoletes()) - - # Setuptools specific for PEP 345 - if hasattr(self, 'python_requires'): - file.write('Requires-Python: %s\n' % self.python_requires) - - distutils.dist.DistributionMetadata.write_pkg_file = write_pkg_file - - -_patch_distribution_metadata_write_pkg_file() - - -def _patch_distribution_metadata_write_pkg_info(): +# Based on Python 3.5 version +def write_pkg_file(self, file): + """Write the PKG-INFO format data to a file object. """ - 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. + version = '1.0' + if (self.provides or self.requires or self.obsoletes or + self.classifiers or self.download_url): + version = '1.1' + # Setuptools specific for PEP 345 + if hasattr(self, 'python_requires'): + version = '1.2' + + file.write('Metadata-Version: %s\n' % version) + file.write('Name: %s\n' % self.get_name()) + file.write('Version: %s\n' % self.get_version()) + file.write('Summary: %s\n' % self.get_description()) + file.write('Home-page: %s\n' % self.get_url()) + file.write('Author: %s\n' % self.get_contact()) + file.write('Author-email: %s\n' % self.get_contact_email()) + file.write('License: %s\n' % self.get_license()) + if self.download_url: + file.write('Download-URL: %s\n' % self.download_url) + + long_desc = rfc822_escape(self.get_long_description()) + file.write('Description: %s\n' % long_desc) + + keywords = ','.join(self.get_keywords()) + if keywords: + file.write('Keywords: %s\n' % keywords) + + self._write_list(file, 'Platform', self.get_platforms()) + self._write_list(file, 'Classifier', self.get_classifiers()) + + # PEP 314 + self._write_list(file, 'Requires', self.get_requires()) + self._write_list(file, 'Provides', self.get_provides()) + self._write_list(file, 'Obsoletes', self.get_obsoletes()) + + # Setuptools specific for PEP 345 + if hasattr(self, 'python_requires'): + file.write('Requires-Python: %s\n' % self.python_requires) + + +# from Python 3.4 +def write_pkg_info(self, base_dir): + """Write the PKG-INFO file into the release tree. """ - environment_local = (3,) <= sys.version_info[:3] < (3, 2, 2) - if not environment_local: - return - - # 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) - - distutils.dist.DistributionMetadata.write_pkg_info = write_pkg_info + with open(os.path.join(base_dir, 'PKG-INFO'), 'w', + encoding='UTF-8') as pkg_info: + self.write_pkg_file(pkg_info) -_patch_distribution_metadata_write_pkg_info() - sequence = tuple, list @@ -230,6 +205,9 @@ def check_packages(dist, attr, value): ) +_Distribution = get_unpatched(distutils.core.Distribution) + + class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -777,11 +755,6 @@ def handle_display_options(self, option_order): sys.stdout.detach(), encoding, errors, newline, line_buffering) -# Install it throughout the distutils -for module in distutils.dist, distutils.core, distutils.cmd: - module.Distribution = Distribution - - class Feature: """ **deprecated** -- The `Feature` facility was never completely implemented diff --git a/setuptools/extension.py b/setuptools/extension.py index 073d9459a9..03068d35bb 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -1,4 +1,3 @@ -import sys import re import functools import distutils.core @@ -8,11 +7,6 @@ from setuptools.extern.six.moves import map from .monkey import get_unpatched -from . import msvc - -_Extension = get_unpatched(distutils.core.Extension) - -msvc.patch_for_specialized_compiler() def _have_cython(): @@ -33,6 +27,9 @@ def _have_cython(): have_pyrex = _have_cython +_Extension = get_unpatched(distutils.core.Extension) + + class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" @@ -59,9 +56,3 @@ def _convert_pyx_sources_to_lang(self): class Library(Extension): """Just like a regular Extension, but built as a library instead""" - - -distutils.core.Extension = Extension -distutils.extension.Extension = Extension -if 'distutils.command.build_ext' in sys.modules: - sys.modules['distutils.command.build_ext'].Extension = Extension diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 1961dfbaa6..a2cac0e06a 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -58,3 +58,44 @@ def patch_all(): if needs_warehouse: warehouse = 'https://upload.pypi.org/legacy/' 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: + module.Distribution = setuptools.dist.Distribution + + # Install the patched Extension + distutils.core.Extension = setuptools.extension.Extension + distutils.extension.Extension = setuptools.extension.Extension + if 'distutils.command.build_ext' in sys.modules: + sys.modules['distutils.command.build_ext'].Extension = ( + setuptools.extension.Extension + ) + + # patch MSVC + __import__('setuptools.msvc') + setuptools.msvc.patch_for_specialized_compiler() + + +def _patch_distribution_metadata_write_pkg_file(): + """Patch write_pkg_file to also write Requires-Python/Requires-External""" + distutils.dist.DistributionMetadata.write_pkg_file = ( + setuptools.dist.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 + ) From 6a74dc955603fb6dcdaa2877b332c7ff1c55dfad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 20:05:03 -0400 Subject: [PATCH 6147/8469] distutils will always be in globals --- setuptools/msvc.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 26e399cc1c..d7c8895502 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -63,10 +63,6 @@ def patch_for_specialized_compiler(): # Compilers only availables on Microsoft Windows return - if 'distutils' not in globals(): - # The module isn't available to be patched - return - if unpatched: # Already patched return From 3c5cf653dbc0ab10d08738ee4e4db26710903466 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 20:29:14 -0400 Subject: [PATCH 6148/8469] Move msvc patch logic into monkey module. --- setuptools/monkey.py | 59 +++++++++++++++++++++++++++-- setuptools/msvc.py | 90 +++++++++++--------------------------------- 2 files changed, 79 insertions(+), 70 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index a2cac0e06a..6d341b4333 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -4,6 +4,7 @@ import sys import distutils.filelist +import platform import setuptools @@ -74,9 +75,7 @@ def patch_all(): setuptools.extension.Extension ) - # patch MSVC - __import__('setuptools.msvc') - setuptools.msvc.patch_for_specialized_compiler() + patch_for_msvc_specialized_compiler() def _patch_distribution_metadata_write_pkg_file(): @@ -99,3 +98,57 @@ def _patch_distribution_metadata_write_pkg_info(): distutils.dist.DistributionMetadata.write_pkg_info = ( setuptools.dist.write_pkg_info ) + + +unpatched = dict() + + +def patch_for_msvc_specialized_compiler(): + """ + Patch functions in distutils to use standalone Microsoft Visual C++ + compilers. + """ + try: + # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) + import distutils.msvc9compiler as msvc9compiler + except ImportError: + pass + + try: + # Distutil file for MSVC++ 14.0 and upper (Python 3.5+) + import distutils._msvccompiler as msvc14compiler + except ImportError: + pass + + if platform.system() != 'Windows': + # Compilers only availables on Microsoft Windows + return + + unpatched = __import__('setuptools.msvc').msvc.unpatched + + if unpatched: + # Already patched + return + + try: + # Patch distutils.msvc9compiler + unpatched['msvc9_find_vcvarsall'] = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall + unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall + msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall + except NameError: + pass + + try: + # Patch distutils._msvccompiler._get_vc_env + unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env + msvc14compiler._get_vc_env = msvc14_get_vc_env + except NameError: + pass + + try: + # Patch distutils._msvccompiler.gen_lib_options for Numpy + unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options + msvc14compiler.gen_lib_options = msvc14_gen_lib_options + except NameError: + pass diff --git a/setuptools/msvc.py b/setuptools/msvc.py index d7c8895502..10507ab231 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1,6 +1,20 @@ """ -This module adds improved support for Microsoft Visual C++ compilers. +Improved support for Microsoft Visual C++ compilers. + +Known supported compilers: +-------------------------- +Microsoft Visual C++ 9.0: + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); + Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Windows SDK 6.1 (x86, x64, ia64) + +Microsoft Visual C++ 10.0: + Microsoft Windows SDK 7.1 (x86, x64, ia64) + +Microsoft Visual C++ 14.0: + Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) """ + import os import sys import platform @@ -10,6 +24,8 @@ from setuptools.extern.six.moves import filterfalse +from . import monkey + if platform.system() == 'Windows': from setuptools.extern.six.moves import winreg safe_env = os.environ @@ -26,70 +42,10 @@ class winreg: safe_env = dict() try: - # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) - import distutils.msvc9compiler as msvc9compiler + from distutils.msvc9compiler import Reg except ImportError: pass -try: - # Distutil file for MSVC++ 14.0 and upper (Python 3.5+) - import distutils._msvccompiler as msvc14compiler -except ImportError: - pass - - -unpatched = dict() - - -def patch_for_specialized_compiler(): - """ - Patch functions in distutils to use standalone Microsoft Visual C++ - compilers. - - Known supported compilers: - -------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); - Microsoft Windows SDK 7.0 (x86, x64, ia64); - Microsoft Windows SDK 6.1 (x86, x64, ia64) - - Microsoft Visual C++ 10.0: - Microsoft Windows SDK 7.1 (x86, x64, ia64) - - Microsoft Visual C++ 14.0: - Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) - """ - if platform.system() != 'Windows': - # Compilers only availables on Microsoft Windows - return - - if unpatched: - # Already patched - return - - try: - # Patch distutils.msvc9compiler - unpatched['msvc9_find_vcvarsall'] = msvc9compiler.find_vcvarsall - msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall - unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall - msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall - except NameError: - pass - - try: - # Patch distutils._msvccompiler._get_vc_env - unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env - msvc14compiler._get_vc_env = msvc14_get_vc_env - except NameError: - pass - - try: - # Patch distutils._msvccompiler.gen_lib_options for Numpy - unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options - msvc14compiler.gen_lib_options = msvc14_gen_lib_options - except NameError: - pass - def msvc9_find_vcvarsall(version): """ @@ -113,7 +69,6 @@ def msvc9_find_vcvarsall(version): ------ vcvarsall.bat path: str """ - Reg = msvc9compiler.Reg VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' key = VC_BASE % ('', version) try: @@ -132,7 +87,7 @@ def msvc9_find_vcvarsall(version): if os.path.isfile(vcvarsall): return vcvarsall - return unpatched['msvc9_find_vcvarsall'](version) + return monkey.unpatched['msvc9_find_vcvarsall'](version) def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): @@ -165,7 +120,8 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ # Try to get environement from vcvarsall.bat (Classical way) try: - return unpatched['msvc9_query_vcvarsall'](ver, arch, *args, **kwargs) + orig = monkey.unpatched['msvc9_query_vcvarsall'] + return orig(ver, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError: # Pass error if Vcvarsall.bat is missing pass @@ -204,7 +160,7 @@ def msvc14_get_vc_env(plat_spec): """ # Try to get environment from vcvarsall.bat (Classical way) try: - return unpatched['msvc14_get_vc_env'](plat_spec) + return monkey.unpatched['msvc14_get_vc_env'](plat_spec) except distutils.errors.DistutilsPlatformError: # Pass error Vcvarsall.bat is missing pass @@ -227,7 +183,7 @@ def msvc14_gen_lib_options(*args, **kwargs): import numpy as np if StrictVersion(np.__version__) < StrictVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) - return unpatched['msvc14_gen_lib_options'](*args, **kwargs) + return monkey.unpatched['msvc14_gen_lib_options'](*args, **kwargs) def _augment_exception(exc, version, arch=''): From 634a3c9e360812480646dc0baa1035bfc75137f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 20:31:42 -0400 Subject: [PATCH 6149/8469] Update changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index a45575ac17..385fd07f71 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,6 +24,9 @@ v27.0.0 site, but the command is now deprecated. Users are urged to use Read The Docs instead. +* Introduce the ``monkey`` module to encapsulate the distutils + monkeypatching behavior. + v26.1.1 ------- From 9915760daaffca6d14444f83929a8cf25bdf1f7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Sep 2016 20:38:39 -0400 Subject: [PATCH 6150/8469] Use unpatched locally --- setuptools/monkey.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 6d341b4333..3e4f49e1af 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -124,8 +124,6 @@ def patch_for_msvc_specialized_compiler(): # Compilers only availables on Microsoft Windows return - unpatched = __import__('setuptools.msvc').msvc.unpatched - if unpatched: # Already patched return From fa187c39baf5fa0fee1feb3568177afb244ac30b Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Mon, 5 Sep 2016 09:34:22 +0200 Subject: [PATCH 6151/8469] Use LooseVersion instread of StrictVersion --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 26e399cc1c..c7dd797605 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -6,7 +6,7 @@ import platform import itertools import distutils.errors -from distutils.version import StrictVersion +from distutils.version import LooseVersion from setuptools.extern.six.moves import filterfalse @@ -229,7 +229,7 @@ def msvc14_gen_lib_options(*args, **kwargs): """ if "numpy.distutils" in sys.modules: import numpy as np - if StrictVersion(np.__version__) < StrictVersion('1.11.2'): + if LooseVersion(np.__version__) < LooseVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) return unpatched['msvc14_gen_lib_options'](*args, **kwargs) From 175d71c6352e17dc2b752160ec78d2cb90e7c271 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Sep 2016 22:24:01 -0400 Subject: [PATCH 6152/8469] Issue #27960: Revert state to 675e20c38fdac6, backing out all changes by developed for Issue #12885. --- tests/test_filelist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 278809c09b..e82bc3d2ed 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -7,7 +7,7 @@ from distutils.errors import DistutilsTemplateError from distutils.filelist import glob_to_re, translate_pattern, FileList -from test.support import captured_stdout +from test.support import captured_stdout, run_unittest from distutils.tests import support MANIFEST_IN = """\ @@ -292,5 +292,8 @@ def test_process_template(self): self.assertWarnings() +def test_suite(): + return unittest.makeSuite(FileListTestCase) + if __name__ == "__main__": - unittest.main() + run_unittest(test_suite()) From 54343cdaee7de324b15f3ace93657f34a53c5e34 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Tue, 6 Sep 2016 11:10:34 +0200 Subject: [PATCH 6153/8469] Use LegacyVersion instead of LooseVersion - Also apply the patch for numpy 1.11.2 pre release --- setuptools/msvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index c7dd797605..ecbea81849 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -6,7 +6,7 @@ import platform import itertools import distutils.errors -from distutils.version import LooseVersion +from pkg_resources.extern.packaging.version import LegacyVersion from setuptools.extern.six.moves import filterfalse @@ -229,7 +229,7 @@ def msvc14_gen_lib_options(*args, **kwargs): """ if "numpy.distutils" in sys.modules: import numpy as np - if LooseVersion(np.__version__) < LooseVersion('1.11.2'): + if LegacyVersion(np.__version__) < LegacyVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) return unpatched['msvc14_gen_lib_options'](*args, **kwargs) From 84f35582fc98b213e51d9924ae9f726212069560 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 7 Sep 2016 12:03:06 +0000 Subject: [PATCH 6154/8469] =?UTF-8?q?Issue=20#27895:=20=20Spelling=20fixes?= =?UTF-8?q?=20(Contributed=20by=20Ville=20Skytt=C3=A4).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_msvc9compiler.py b/tests/test_msvc9compiler.py index 5e18c61360..77a07ef39d 100644 --- a/tests/test_msvc9compiler.py +++ b/tests/test_msvc9compiler.py @@ -125,7 +125,7 @@ def test_reg_class(self): self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') # looking for values that should exist on all - # windows registeries versions. + # windows registry versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') self.assertIn(v, ('0', '1', '2')) From dd0f44984d23f8953affce76fed4735a04c60803 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida Date: Thu, 8 Sep 2016 11:54:38 -0300 Subject: [PATCH 6155/8469] pytest: ignore all .* directories In Cloud9 a .c9 directory is created. Other IDEs like to add .directories as well --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 640716a648..b35abfa908 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .tox +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 From fe41e077426b41fee85c7bd5800029796fb4b8c9 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Thu, 8 Sep 2016 13:59:53 -0400 Subject: [PATCH 6156/8469] #27364: fix "incorrect" uses of escape character in the stdlib. And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter. --- cmd.py | 2 +- command/bdist_msi.py | 4 ++-- command/build_scripts.py | 2 +- cygwinccompiler.py | 2 +- msvc9compiler.py | 2 +- sysconfig.py | 2 +- versionpredicate.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd.py b/cmd.py index b5d9dc387d..939f795945 100644 --- a/cmd.py +++ b/cmd.py @@ -221,7 +221,7 @@ def ensure_string(self, option, default=None): self._ensure_stringlike(option, "string", default) def ensure_string_list(self, option): - """Ensure that 'option' is a list of strings. If 'option' is + r"""Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"]. diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f6c21aee44..a4bd5a589d 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -623,7 +623,7 @@ def add_ui(self): cost = PyDialog(db, "DiskCostDlg", x, y, w, h, modal, title, "OK", "OK", "OK", bitmap=False) cost.text("Title", 15, 6, 200, 15, 0x30003, - "{\DlgFontBold8}Disk Space Requirements") + r"{\DlgFontBold8}Disk Space Requirements") cost.text("Description", 20, 20, 280, 20, 0x30003, "The disk space required for the installation of the selected features.") cost.text("Text", 20, 53, 330, 60, 3, @@ -670,7 +670,7 @@ def add_ui(self): progress = PyDialog(db, "ProgressDlg", x, y, w, h, modeless, title, "Cancel", "Cancel", "Cancel", bitmap=False) progress.text("Title", 20, 15, 200, 15, 0x30003, - "{\DlgFontBold8}[Progress1] [ProductName]") + r"{\DlgFontBold8}[Progress1] [ProductName]") progress.text("Text", 35, 65, 300, 30, 3, "Please wait while the Installer [Progress2] [ProductName]. " "This may take several minutes.") diff --git a/command/build_scripts.py b/command/build_scripts.py index 90a8380a04..ccc70e6465 100644 --- a/command/build_scripts.py +++ b/command/build_scripts.py @@ -51,7 +51,7 @@ def run(self): def copy_scripts(self): - """Copy each script listed in 'self.scripts'; if it's marked as a + r"""Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. diff --git a/cygwinccompiler.py b/cygwinccompiler.py index c879646c0f..1c36990347 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -368,7 +368,7 @@ def check_config_h(): return (CONFIG_H_UNCERTAIN, "couldn't read '%s': %s" % (fn, exc.strerror)) -RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)') +RE_VERSION = re.compile(br'(\d+\.\d+(\.\d+)*)') def _find_exe_version(cmd): """Find the version of an executable by running `cmd` in the shell. diff --git a/msvc9compiler.py b/msvc9compiler.py index 0b1fd19ff6..2119127622 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -716,7 +716,7 @@ def _remove_visual_c_ref(self, manifest_file): r"""VC\d{2}\.CRT("|').*?(/>|)""", re.DOTALL) manifest_buf = re.sub(pattern, "", manifest_buf) - pattern = "\s*" + pattern = r"\s*" manifest_buf = re.sub(pattern, "", manifest_buf) # Now see if any other assemblies are referenced - if not, we # don't want a manifest embedded. diff --git a/sysconfig.py b/sysconfig.py index f72b7f5a19..681359870c 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -278,7 +278,7 @@ def parse_config_h(fp, g=None): # Regexes needed for parsing Makefile (and similar syntaxes, # like old-style Setup files). -_variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") +_variable_rx = re.compile(r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)") _findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)") _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}") diff --git a/versionpredicate.py b/versionpredicate.py index b0dd9f45bf..062c98f248 100644 --- a/versionpredicate.py +++ b/versionpredicate.py @@ -154,7 +154,7 @@ def split_provision(value): global _provision_rx if _provision_rx is None: _provision_rx = re.compile( - "([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", + r"([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$", re.ASCII) value = value.strip() m = _provision_rx.match(value) From 00ac09a54693e77cbe791d0f8ca85db20a547e14 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Fri, 9 Sep 2016 07:20:49 -0400 Subject: [PATCH 6157/8469] Use EXT_SUFFIX instead of SO for py_limited_api renaming --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index f994b62654..454c91fbf0 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -111,7 +111,7 @@ def get_ext_filename(self, fullname): and get_abi3_suffix() ) if use_abi3: - so_ext = get_config_var('SO') + so_ext = get_config_var('EXT_SUFFIX') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): From 18f4f4f56e4dfeeb152e86b4a84f84256ff0b57a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 09:57:04 -0400 Subject: [PATCH 6158/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index a45575ac17..9a48c1cb40 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,7 @@ CHANGES ======= + v27.0.0 ------- @@ -24,6 +25,11 @@ v27.0.0 site, but the command is now deprecated. Users are urged to use Read The Docs instead. +* #776: Use EXT_SUFFIX for py_limited_api renaming. + +* #774 and #775: Use LegacyVersion from packaging when + detecting numpy versions. + v26.1.1 ------- From c550d2d91f19e42257926f108bc269a759a2a13e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 10:04:29 -0400 Subject: [PATCH 6159/8469] =?UTF-8?q?Bump=20version:=2026.1.1=20=E2=86=92?= =?UTF-8?q?=2027.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3bcd66a972..655b8f2127 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 26.1.1 +current_version = 27.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 90702c1d7d..40977fe470 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="26.1.1", + version="27.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From c5645385252c45575569a01622405115d49cd1b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 10:13:36 -0400 Subject: [PATCH 6160/8469] Remove unused import --- setuptools/dist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d321e6c537..2f7bb59adf 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -2,7 +2,6 @@ import re import os -import sys import warnings import numbers import distutils.log From 20a2f628283a0af476020cc394e4dca1dcdeaadd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 10:27:32 -0400 Subject: [PATCH 6161/8469] Add Deprecation warning for _get_unpatched. --- setuptools/dist.py | 5 +++++ setuptools/monkey.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 2f7bb59adf..b004f9287c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -22,6 +22,11 @@ import pkg_resources +def _get_unpatched(cls): + warnings.warn("Do not call this function", DeprecationWarning) + return get_unpatched(cls) + + # Based on Python 3.5 version def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 3e4f49e1af..5a0cf43bfd 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -10,7 +10,10 @@ __all__ = [] -"everything is private" +""" +Everything is private. Contact the project team +if you think you need this functionality. +""" def get_unpatched(cls): From 857c16bbb93e0293a21a8c00a421cc6ebe63614d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 10:28:21 -0400 Subject: [PATCH 6162/8469] Move changelog following v27 release --- CHANGES.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 385fd07f71..4fec8a9601 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v27.1.0 +------- + +* Introduce the (private) ``monkey`` module to encapsulate + the distutils monkeypatching behavior. + v27.0.0 ------- @@ -24,9 +30,6 @@ v27.0.0 site, but the command is now deprecated. Users are urged to use Read The Docs instead. -* Introduce the ``monkey`` module to encapsulate the distutils - monkeypatching behavior. - v26.1.1 ------- From 1aa1d6c94b108147030fdf11057df3251b7eefda Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 10:51:34 -0400 Subject: [PATCH 6163/8469] =?UTF-8?q?Bump=20version:=2027.0.0=20=E2=86=92?= =?UTF-8?q?=2027.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 655b8f2127..15570e34d1 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.0.0 +current_version = 27.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 40977fe470..a4d5f60705 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.0.0", + version="27.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a343901877cfe4fa922c40076f3c16aa59d4b265 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 11:05:18 -0400 Subject: [PATCH 6164/8469] Remove unused import --- setuptools/tests/test_msvc.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 14e0f208aa..a0c76ea0da 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -6,8 +6,6 @@ import contextlib import distutils.errors -from setuptools.extern import six - import pytest try: from unittest import mock From 602dc92bd696ad292b4ab44638a01d0035d560ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 11:24:34 -0400 Subject: [PATCH 6165/8469] Fix msvc monkeypatching, revealed by Appveyor tests. Fixes #778. --- CHANGES.rst | 5 +++++ setuptools/monkey.py | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 35e69661b8..58a36db73b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v27.1.1 +------- + +* #778: Fix MSVC monkeypatching. + v27.1.0 ------- diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 5a0cf43bfd..63891e7476 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -7,6 +7,7 @@ import platform import setuptools +from . import msvc __all__ = [] @@ -134,22 +135,22 @@ def patch_for_msvc_specialized_compiler(): try: # Patch distutils.msvc9compiler unpatched['msvc9_find_vcvarsall'] = msvc9compiler.find_vcvarsall - msvc9compiler.find_vcvarsall = msvc9_find_vcvarsall + msvc9compiler.find_vcvarsall = msvc.msvc9_find_vcvarsall unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall - msvc9compiler.query_vcvarsall = msvc9_query_vcvarsall + msvc9compiler.query_vcvarsall = msvc.msvc9_query_vcvarsall except NameError: pass try: # Patch distutils._msvccompiler._get_vc_env unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env - msvc14compiler._get_vc_env = msvc14_get_vc_env + msvc14compiler._get_vc_env = msvc.msvc14_get_vc_env except NameError: pass try: # Patch distutils._msvccompiler.gen_lib_options for Numpy unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options - msvc14compiler.gen_lib_options = msvc14_gen_lib_options + msvc14compiler.gen_lib_options = msvc.msvc14_gen_lib_options except NameError: pass From a5eba2162977f28450bbc7c53b09f2272d7c118a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 11:24:44 -0400 Subject: [PATCH 6166/8469] =?UTF-8?q?Bump=20version:=2027.1.0=20=E2=86=92?= =?UTF-8?q?=2027.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 15570e34d1..cb99a56ecf 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.1.0 +current_version = 27.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index a4d5f60705..c81ddaf192 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.1.0", + version="27.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a6524a5c0d40aedbaa06eb41c70990c44a1dfd15 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Fri, 9 Sep 2016 11:50:41 -0400 Subject: [PATCH 6167/8469] Move msvc import to avoid a circular import --- setuptools/monkey.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 63891e7476..3308383162 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -7,7 +7,6 @@ import platform import setuptools -from . import msvc __all__ = [] @@ -112,6 +111,8 @@ def patch_for_msvc_specialized_compiler(): Patch functions in distutils to use standalone Microsoft Visual C++ compilers. """ + from . import msvc + try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) import distutils.msvc9compiler as msvc9compiler From 93443d79b18d4c318de366dc6ba585b2e9476d04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 11:56:44 -0400 Subject: [PATCH 6168/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 58a36db73b..99de268426 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v27.1.2 +------- + +* #779 via #781: Fix circular import. + v27.1.1 ------- From 5cc0ec25c0ef816de01b7416aa6bef172f91566d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 11:57:25 -0400 Subject: [PATCH 6169/8469] =?UTF-8?q?Bump=20version:=2027.1.1=20=E2=86=92?= =?UTF-8?q?=2027.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index cb99a56ecf..69dd615105 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.1.1 +current_version = 27.1.2 commit = True tag = True diff --git a/setup.py b/setup.py index c81ddaf192..b2b1a0e12f 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.1.1", + version="27.1.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b6f2fee975c570d2beadb9007e6302411f91ab4b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 12:39:43 -0400 Subject: [PATCH 6170/8469] Consolidate function patching and resolution of unpatched function, aligning pattern with the patched classes. --- setuptools/monkey.py | 33 ++++++++++++++++++++------------- setuptools/msvc.py | 10 +++++----- setuptools/py26compat.py | 7 +++++++ 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 3308383162..24739d97f8 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -6,6 +6,8 @@ import distutils.filelist import platform +from .py26compat import import_module + import setuptools @@ -103,7 +105,20 @@ def _patch_distribution_metadata_write_pkg_info(): ) -unpatched = dict() +def patch_func(replacement, original): + # first set the 'unpatched' attribute on the replacement to + # point to the original. + vars(replacement).setdefault('unpatched', original) + + # next resolve the module in which the original func resides + target_mod = import_module(original.__module__) + + # finally replace the function in the original module + setattr(target_mod, original.__name__, replacement) + + +def get_unpatched_func(candidate): + return getattr(candidate, 'unpatched') def patch_for_msvc_specialized_compiler(): @@ -129,29 +144,21 @@ def patch_for_msvc_specialized_compiler(): # Compilers only availables on Microsoft Windows return - if unpatched: - # Already patched - return - try: # Patch distutils.msvc9compiler - unpatched['msvc9_find_vcvarsall'] = msvc9compiler.find_vcvarsall - msvc9compiler.find_vcvarsall = msvc.msvc9_find_vcvarsall - unpatched['msvc9_query_vcvarsall'] = msvc9compiler.query_vcvarsall - msvc9compiler.query_vcvarsall = msvc.msvc9_query_vcvarsall + patch_func(msvc.msvc9_find_vcvarsall, msvc9compiler.find_vcvarsall) + patch_func(msvc.msvc9_query_vcvarsall, msvc9compiler.query_vcvarsall) except NameError: pass try: # Patch distutils._msvccompiler._get_vc_env - unpatched['msvc14_get_vc_env'] = msvc14compiler._get_vc_env - msvc14compiler._get_vc_env = msvc.msvc14_get_vc_env + patch_func(msvc.msvc14_get_vc_env, msvc14compiler._get_vc_env) except NameError: pass try: # Patch distutils._msvccompiler.gen_lib_options for Numpy - unpatched['msvc14_gen_lib_options'] = msvc14compiler.gen_lib_options - msvc14compiler.gen_lib_options = msvc.msvc14_gen_lib_options + patch_func(msvc.msvc14_gen_lib_options, msvc14compiler.gen_lib_options) except NameError: pass diff --git a/setuptools/msvc.py b/setuptools/msvc.py index a902a4a768..ae5a2b6aa9 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -24,7 +24,7 @@ from setuptools.extern.six.moves import filterfalse -from . import monkey +from .monkey import get_unpatched_func if platform.system() == 'Windows': from setuptools.extern.six.moves import winreg @@ -87,7 +87,7 @@ def msvc9_find_vcvarsall(version): if os.path.isfile(vcvarsall): return vcvarsall - return monkey.unpatched['msvc9_find_vcvarsall'](version) + return get_unpatched_func(msvc9_find_vcvarsall)(version) def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): @@ -120,7 +120,7 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ # Try to get environement from vcvarsall.bat (Classical way) try: - orig = monkey.unpatched['msvc9_query_vcvarsall'] + orig = get_unpatched_func(msvc9_query_vcvarsall) return orig(ver, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError: # Pass error if Vcvarsall.bat is missing @@ -160,7 +160,7 @@ def msvc14_get_vc_env(plat_spec): """ # Try to get environment from vcvarsall.bat (Classical way) try: - return monkey.unpatched['msvc14_get_vc_env'](plat_spec) + return get_unpatched_func(msvc14_get_vc_env)(plat_spec) except distutils.errors.DistutilsPlatformError: # Pass error Vcvarsall.bat is missing pass @@ -183,7 +183,7 @@ def msvc14_gen_lib_options(*args, **kwargs): import numpy as np if LegacyVersion(np.__version__) < LegacyVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) - return monkey.unpatched['msvc14_gen_lib_options'](*args, **kwargs) + return get_unpatched_func(msvc14_gen_lib_options)(*args, **kwargs) def _augment_exception(exc, version, arch=''): diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 90cd695a35..5778cdf1ba 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -22,3 +22,10 @@ def strip_fragment(url): if sys.version_info >= (2, 7): strip_fragment = lambda x: x + + +try: + from importlib import import_module +except ImportError: + def import_module(module_name): + return __import__(module_name, fromlist=['__name__']) From b7b9cb23f217095e79c618c0e3196712d2d9a285 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 12:45:21 -0400 Subject: [PATCH 6171/8469] Use programmatic import and add comment explaining purpose. --- setuptools/monkey.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 24739d97f8..5f098986b1 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -126,7 +126,8 @@ def patch_for_msvc_specialized_compiler(): Patch functions in distutils to use standalone Microsoft Visual C++ compilers. """ - from . import msvc + # import late to avoid circular imports on Python < 3.5 + msvc = import_module('setuptools.msvc') try: # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) From 7756f651df47dc870e886c1b13c5b48068c2dd5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 12:54:34 -0400 Subject: [PATCH 6172/8469] Allow get_unpatched to be called to get unpatched version of a class or function, further harmonizing the interfaces. --- setuptools/monkey.py | 14 ++++++++++++-- setuptools/msvc.py | 10 +++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 5f098986b1..7a23641c8d 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -5,6 +5,7 @@ import sys import distutils.filelist import platform +import types from .py26compat import import_module @@ -18,7 +19,16 @@ """ -def get_unpatched(cls): +def get_unpatched(item): + lookup = ( + get_unpatched_class if isinstance(item, type) else + get_unpatched_function if isinstance(item, types.FunctionType) else + lambda item: None + ) + return lookup(item) + + +def get_unpatched_class(cls): """Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils @@ -117,7 +127,7 @@ def patch_func(replacement, original): setattr(target_mod, original.__name__, replacement) -def get_unpatched_func(candidate): +def get_unpatched_function(candidate): return getattr(candidate, 'unpatched') diff --git a/setuptools/msvc.py b/setuptools/msvc.py index ae5a2b6aa9..e9665e10cb 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -24,7 +24,7 @@ from setuptools.extern.six.moves import filterfalse -from .monkey import get_unpatched_func +from .monkey import get_unpatched if platform.system() == 'Windows': from setuptools.extern.six.moves import winreg @@ -87,7 +87,7 @@ def msvc9_find_vcvarsall(version): if os.path.isfile(vcvarsall): return vcvarsall - return get_unpatched_func(msvc9_find_vcvarsall)(version) + return get_unpatched(msvc9_find_vcvarsall)(version) def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): @@ -120,7 +120,7 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ # Try to get environement from vcvarsall.bat (Classical way) try: - orig = get_unpatched_func(msvc9_query_vcvarsall) + orig = get_unpatched(msvc9_query_vcvarsall) return orig(ver, arch, *args, **kwargs) except distutils.errors.DistutilsPlatformError: # Pass error if Vcvarsall.bat is missing @@ -160,7 +160,7 @@ def msvc14_get_vc_env(plat_spec): """ # Try to get environment from vcvarsall.bat (Classical way) try: - return get_unpatched_func(msvc14_get_vc_env)(plat_spec) + return get_unpatched(msvc14_get_vc_env)(plat_spec) except distutils.errors.DistutilsPlatformError: # Pass error Vcvarsall.bat is missing pass @@ -183,7 +183,7 @@ def msvc14_gen_lib_options(*args, **kwargs): import numpy as np if LegacyVersion(np.__version__) < LegacyVersion('1.11.2'): return np.distutils.ccompiler.gen_lib_options(*args, **kwargs) - return get_unpatched_func(msvc14_gen_lib_options)(*args, **kwargs) + return get_unpatched(msvc14_gen_lib_options)(*args, **kwargs) def _augment_exception(exc, version, arch=''): From c49d0a044c0483f956902068a87f732b38cbbf6e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 12:55:28 -0400 Subject: [PATCH 6173/8469] Extract a variable for nicer indentation. --- setuptools/monkey.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 7a23641c8d..c9a52c610b 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -37,9 +37,8 @@ def get_unpatched_class(cls): while cls.__module__.startswith('setuptools'): cls, = cls.__bases__ if not cls.__module__.startswith('distutils'): - raise AssertionError( - "distutils has already been patched by %r" % cls - ) + msg = "distutils has already been patched by %r" % cls + raise AssertionError(msg) return cls From 2a7a7179ca18b1c97e435726e62c3ab0227fb20e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 12:57:02 -0400 Subject: [PATCH 6174/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 99de268426..da6322a2e7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v27.2.0 +------- + +* Nicer, more consistent interfaces for msvc monkeypatching. + v27.1.2 ------- From b700b3611d39d28a64973ec6abd006fc75af5df0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Sep 2016 13:04:26 -0400 Subject: [PATCH 6175/8469] Account for the class might be old style on Python 2. --- setuptools/monkey.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index c9a52c610b..c4289762db 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -8,6 +8,7 @@ import types from .py26compat import import_module +from setuptools.extern import six import setuptools @@ -21,7 +22,7 @@ def get_unpatched(item): lookup = ( - get_unpatched_class if isinstance(item, type) else + get_unpatched_class if isinstance(item, six.class_types) else get_unpatched_function if isinstance(item, types.FunctionType) else lambda item: None ) From d0f84684de3a4c3d9dbb1602f9810d9688847e09 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Fri, 9 Sep 2016 18:29:10 -0700 Subject: [PATCH 6176/8469] Issue #28046: Fix distutils Why do we have two sysconfig modules again? --- sysconfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 681359870c..229626e1b4 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -418,7 +418,11 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" # _sysconfigdata is generated at build time, see the sysconfig module - name = '_sysconfigdata_' + sys.abiflags + name = '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( + abi=sys.abiflags, + platform=sys.platform, + multiarch=getattr(sys.implementation, '_multiarch', ''), + ) _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) build_time_vars = _temp.build_time_vars global _config_vars From ba17bdeda7e2d5c1ac05be611569785b3aec20bd Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 11 Sep 2016 12:50:02 +0300 Subject: [PATCH 6177/8469] Issue #22493: Inline flags now should be used only at the start of the regular expression. Deprecation warning is emitted if uses them in the middle of the regular expression. --- filelist.py | 15 ++++++++++----- tests/test_filelist.py | 14 +++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/filelist.py b/filelist.py index 6522e69f06..c92d5fdba3 100644 --- a/filelist.py +++ b/filelist.py @@ -302,21 +302,26 @@ def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0): else: return pattern + # ditch start and end characters + start, _, end = glob_to_re('_').partition('_') + if pattern: pattern_re = glob_to_re(pattern) + assert pattern_re.startswith(start) and pattern_re.endswith(end) else: pattern_re = '' if prefix is not None: - # ditch end of pattern character - empty_pattern = glob_to_re('') - prefix_re = glob_to_re(prefix)[:-len(empty_pattern)] + prefix_re = glob_to_re(prefix) + assert prefix_re.startswith(start) and prefix_re.endswith(end) + prefix_re = prefix_re[len(start): len(prefix_re) - len(end)] sep = os.sep if os.sep == '\\': sep = r'\\' - pattern_re = "^" + sep.join((prefix_re, ".*" + pattern_re)) + pattern_re = pattern_re[len(start): len(pattern_re) - len(end)] + pattern_re = r'%s\A%s%s.*%s%s' % (start, prefix_re, sep, pattern_re, end) else: # no prefix -- respect anchor flag if anchor: - pattern_re = "^" + pattern_re + pattern_re = r'%s\A%s' % (start, pattern_re[len(start):]) return re.compile(pattern_re) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 391af3cba2..c71342d0dc 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -51,14 +51,14 @@ def test_glob_to_re(self): for glob, regex in ( # simple cases - ('foo*', r'foo[^%(sep)s]*\Z(?ms)'), - ('foo?', r'foo[^%(sep)s]\Z(?ms)'), - ('foo??', r'foo[^%(sep)s][^%(sep)s]\Z(?ms)'), + ('foo*', r'(?s:foo[^%(sep)s]*)\Z'), + ('foo?', r'(?s:foo[^%(sep)s])\Z'), + ('foo??', r'(?s:foo[^%(sep)s][^%(sep)s])\Z'), # special cases - (r'foo\\*', r'foo\\\\[^%(sep)s]*\Z(?ms)'), - (r'foo\\\*', r'foo\\\\\\[^%(sep)s]*\Z(?ms)'), - ('foo????', r'foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s]\Z(?ms)'), - (r'foo\\??', r'foo\\\\[^%(sep)s][^%(sep)s]\Z(?ms)')): + (r'foo\\*', r'(?s:foo\\\\[^%(sep)s]*)\Z'), + (r'foo\\\*', r'(?s:foo\\\\\\[^%(sep)s]*)\Z'), + ('foo????', r'(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z'), + (r'foo\\??', r'(?s:foo\\\\[^%(sep)s][^%(sep)s])\Z')): regex = regex % {'sep': sep} self.assertEqual(glob_to_re(glob), regex) From 8a0f7a5412ea23ca0a9a2f9ef9352879b11909d1 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Sun, 11 Sep 2016 22:22:24 +0200 Subject: [PATCH 6178/8469] Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAME environment variable that is defined when cross-compiling. --- sysconfig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 229626e1b4..8bf1a7016b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -418,11 +418,12 @@ def expand_makefile_vars(s, vars): def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" # _sysconfigdata is generated at build time, see the sysconfig module - name = '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( + name = os.environ.get('_PYTHON_SYSCONFIGDATA_NAME', + '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( abi=sys.abiflags, platform=sys.platform, multiarch=getattr(sys.implementation, '_multiarch', ''), - ) + )) _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) build_time_vars = _temp.build_time_vars global _config_vars From 1f23f9a25e6c91554954185e84497056062093be Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 13 Sep 2016 10:54:45 +1200 Subject: [PATCH 6179/8469] Don't duplicate error case in package_index easy_install has code to handle parsing a requirement, catching the ValueError and then raising a DistUtilsError. This code was entirely duplicated in package_index, so I've slightly refactored to remove the duplication. --- setuptools/command/easy_install.py | 14 +++----------- setuptools/package_index.py | 17 ++++++++++------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e8b90c704e..a3792ce223 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -49,8 +49,9 @@ from setuptools.py31compat import get_path, get_config_vars from setuptools.command import setopt from setuptools.archive_util import unpack_archive -from setuptools.package_index import PackageIndex -from setuptools.package_index import URL_SCHEME +from setuptools.package_index import ( + PackageIndex, parse_requirement_arg, URL_SCHEME, +) from setuptools.command import bdist_egg, egg_info from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, @@ -1522,15 +1523,6 @@ def get_exe_prefixes(exe_filename): return prefixes -def parse_requirement_arg(spec): - try: - return Requirement.parse(spec) - except ValueError: - raise DistutilsError( - "Not a URL, existing file, or requirement spec: %r" % (spec,) - ) - - class PthDistributions(Environment): """A .pth file with Distribution paths in it""" diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 82cd608f55..3fb39269e1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -52,6 +52,15 @@ user_agent = _tmpl.format(py_major=sys.version[:3], **globals()) +def parse_requirement_arg(spec): + try: + return Requirement.parse(spec) + except ValueError: + raise DistutilsError( + "Not a URL, existing file, or requirement spec: %r" % (spec,) + ) + + def parse_bdist_wininst(name): """Return (base,pyversion) or (None,None) for possible .exe name""" @@ -561,13 +570,7 @@ def download(self, spec, tmpdir): # Existing file or directory, just return it return spec else: - try: - spec = Requirement.parse(spec) - except ValueError: - raise DistutilsError( - "Not a URL, existing file, or requirement spec: %r" % - (spec,) - ) + spec = parse_requirement_arg(spec) return getattr(self.fetch_distribution(spec, tmpdir), 'location', None) def fetch_distribution( From 11ef9a98f1da8c883fc346ce78afbad78d5eff83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Sep 2016 13:54:26 -0400 Subject: [PATCH 6180/8469] Suppress ValueError in fixup_namespace_packages. Fixes #520. Fixes #513. --- CHANGES.rst | 3 +++ pkg_resources/__init__.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index da6322a2e7..af25cc4a2e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ CHANGES v27.2.0 ------- +* #520 and #513: Suppress ValueErrors in fixup_namespace_packages + when lookup fails. + * Nicer, more consistent interfaces for msvc monkeypatching. v27.1.2 diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a93a3da7af..4208c4ec47 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2066,6 +2066,15 @@ def _rebuild_mod_path(orig_path, package_name, module): """ sys_path = [_normalize_cached(p) for p in sys.path] + def safe_sys_path_index(entry): + """ + Workaround for #520 and #513. + """ + try: + return sys_path.index(entry) + except ValueError: + return float('inf') + def position_in_sys_path(path): """ Return the ordinal of the path based on its position in sys.path @@ -2073,7 +2082,7 @@ def position_in_sys_path(path): path_parts = path.split(os.sep) module_parts = package_name.count('.') + 1 parts = path_parts[:-module_parts] - return sys_path.index(_normalize_cached(os.sep.join(parts))) + return safe_sys_path_index(_normalize_cached(os.sep.join(parts))) orig_path.sort(key=position_in_sys_path) module.__path__[:] = [_normalize_cached(p) for p in orig_path] From 629ad3da717eb360eda53874e590b48f0a5acd2e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Sep 2016 14:00:36 -0400 Subject: [PATCH 6181/8469] =?UTF-8?q?Bump=20version:=2027.1.2=20=E2=86=92?= =?UTF-8?q?=2027.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 69dd615105..ce161ffe44 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.1.2 +current_version = 27.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index b2b1a0e12f..d04d9b5bd5 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.1.2", + version="27.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 53d8b6b69d9a24e53bf25d830124c4698fe44ce3 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 18 Sep 2016 03:52:48 +0700 Subject: [PATCH 6182/8469] Upgrade pyparsing to version 2.1.9 --- pkg_resources/_vendor/pyparsing.py | 158 ++++++++++++++++++++++++----- pkg_resources/_vendor/vendored.txt | 2 +- 2 files changed, 131 insertions(+), 29 deletions(-) mode change 100644 => 100755 pkg_resources/_vendor/pyparsing.py diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py old mode 100644 new mode 100755 index 89cffc10b8..d602a35af7 --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -1,6 +1,6 @@ # module pyparsing.py # -# Copyright (c) 2003-2015 Paul T. McGuire +# Copyright (c) 2003-2016 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,15 +31,18 @@ don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python. -Here is a program to parse "Hello, World!" (or any greeting of the form C{", !"}):: +Here is a program to parse "Hello, World!" (or any greeting of the form +C{", !"}), built up using L{Word}, L{Literal}, and L{And} elements +(L{'+'} operator gives L{And} expressions, strings are auto-converted to +L{Literal} expressions):: from pyparsing import Word, alphas # define grammar of a greeting - greet = Word( alphas ) + "," + Word( alphas ) + "!" + greet = Word(alphas) + "," + Word(alphas) + "!" hello = "Hello, World!" - print (hello, "->", greet.parseString( hello )) + print (hello, "->", greet.parseString(hello)) The program outputs the following:: @@ -48,7 +51,7 @@ The Python representation of the grammar is quite readable, owing to the self-explanatory class names, and the use of '+', '|' and '^' operators. -The parsed results returned from L{I{ParserElement.parseString}} can be accessed as a nested list, a dictionary, or an +The L{ParseResults} object returned from L{ParserElement.parseString} can be accessed as a nested list, a dictionary, or an object with named attributes. The pyparsing module handles some of the problems that are typically vexing when writing text parsers: @@ -57,8 +60,8 @@ class names, and the use of '+', '|' and '^' operators. - embedded comments """ -__version__ = "2.1.8" -__versionTime__ = "14 Aug 2016 08:43 UTC" +__version__ = "2.1.9" +__versionTime__ = "10 Sep 2016 15:10 UTC" __author__ = "Paul McGuire " import string @@ -107,7 +110,7 @@ class names, and the use of '+', '|' and '^' operators. 'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd', 'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute', 'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass', -'tokenMap', 'pyparsing_common', +'CloseMatch', 'tokenMap', 'pyparsing_common', ] system_version = tuple(sys.version_info)[:3] @@ -291,7 +294,7 @@ def __init__(self,p1,p2): def __getitem__(self,i): return self.tup[i] def __repr__(self): - return repr(self.tup) + return repr(self.tup[0]) def setOffset(self,i): self.tup = (self.tup[0],i) @@ -310,6 +313,7 @@ class ParseResults(object): # equivalent form: # date_str = integer("year") + '/' + integer("month") + '/' + integer("day") + # parseString returns a ParseResults object result = date_str.parseString("1999/12/31") def test(s, fn=repr): @@ -836,8 +840,8 @@ def getName(self): return None elif (len(self) == 1 and len(self.__tokdict) == 1 and - self.__tokdict.values()[0][0][1] in (0,-1)): - return self.__tokdict.keys()[0] + next(iter(self.__tokdict.values()))[0][1] in (0,-1)): + return next(iter(self.__tokdict.keys())) else: return None @@ -1775,7 +1779,15 @@ def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False): def __add__(self, other ): """ - Implementation of + operator - returns C{L{And}} + Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement + converts them to L{Literal}s by default. + + Example:: + greet = Word(alphas) + "," + Word(alphas) + "!" + hello = "Hello, World!" + print (hello, "->", greet.parseString(hello)) + Prints:: + Hello, World! -> ['Hello', ',', 'World', '!'] """ if isinstance( other, basestring ): other = ParserElement._literalStringClass( other ) @@ -1972,7 +1984,7 @@ def __invert__( self ): def __call__(self, name=None): """ - Shortcut for C{L{setResultsName}}, with C{listAllMatches=default}. + Shortcut for C{L{setResultsName}}, with C{listAllMatches=False}. If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be passed as C{True}. @@ -2083,7 +2095,8 @@ def setDebug( self, flag=True ): Match alphaword at loc 15(1,16) Exception raised:Expected alphaword (at char 15), (line:1, col:16) - The output shown is that produced by the default debug actions. Prior to attempting + The output shown is that produced by the default debug actions - custom debug actions can be + specified using L{setDebugActions}. Prior to attempting to match the C{wd} expression, the debugging message C{"Match at loc (,)"} is shown. Then if the parse succeeds, a C{"Matched"} message is shown, or an C{"Exception raised"} message is shown. Also note the use of L{setName} to assign a human-readable name to the expression, @@ -2393,8 +2406,10 @@ class Keyword(Token): """ DEFAULT_KEYWORD_CHARS = alphanums+"_$" - def __init__( self, matchString, identChars=DEFAULT_KEYWORD_CHARS, caseless=False ): + def __init__( self, matchString, identChars=None, caseless=False ): super(Keyword,self).__init__() + if identChars is None: + identChars = Keyword.DEFAULT_KEYWORD_CHARS self.match = matchString self.matchLen = len(matchString) try: @@ -2469,7 +2484,7 @@ class CaselessKeyword(Keyword): (Contrast with example for L{CaselessLiteral}.) """ - def __init__( self, matchString, identChars=Keyword.DEFAULT_KEYWORD_CHARS ): + def __init__( self, matchString, identChars=None ): super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True ) def parseImpl( self, instring, loc, doActions=True ): @@ -2478,6 +2493,67 @@ def parseImpl( self, instring, loc, doActions=True ): return loc+self.matchLen, self.match raise ParseException(instring, loc, self.errmsg, self) +class CloseMatch(Token): + """ + A variation on L{Literal} which matches "close" matches, that is, + strings with at most 'n' mismatching characters. C{CloseMatch} takes parameters: + - C{match_string} - string to be matched + - C{maxMismatches} - (C{default=1}) maximum number of mismatches allowed to count as a match + + The results from a successful parse will contain the matched text from the input string and the following named results: + - C{mismatches} - a list of the positions within the match_string where mismatches were found + - C{original} - the original match_string used to compare against the input string + + If C{mismatches} is an empty list, then the match was an exact match. + + Example:: + patt = CloseMatch("ATCATCGAATGGA") + patt.parseString("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']}) + patt.parseString("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1) + + # exact match + patt.parseString("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']}) + + # close match allowing up to 2 mismatches + patt = CloseMatch("ATCATCGAATGGA", maxMismatches=2) + patt.parseString("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']}) + """ + def __init__(self, match_string, maxMismatches=1): + super(CloseMatch,self).__init__() + self.name = match_string + self.match_string = match_string + self.maxMismatches = maxMismatches + self.errmsg = "Expected %r (with up to %d mismatches)" % (self.match_string, self.maxMismatches) + self.mayIndexError = False + self.mayReturnEmpty = False + + def parseImpl( self, instring, loc, doActions=True ): + start = loc + instrlen = len(instring) + maxloc = start + len(self.match_string) + + if maxloc <= instrlen: + match_string = self.match_string + match_stringloc = 0 + mismatches = [] + maxMismatches = self.maxMismatches + + for match_stringloc,s_m in enumerate(zip(instring[loc:maxloc], self.match_string)): + src,mat = s_m + if src != mat: + mismatches.append(match_stringloc) + if len(mismatches) > maxMismatches: + break + else: + loc = match_stringloc + 1 + results = ParseResults([instring[start:loc]]) + results['original'] = self.match_string + results['mismatches'] = mismatches + return loc, results + + raise ParseException(instring, loc, self.errmsg, self) + + class Word(Token): """ Token for matching words composed of allowed character sets. @@ -2646,7 +2722,7 @@ class Regex(Token): Example:: realnum = Regex(r"[+-]?\d+\.\d*") - date = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)') + date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)') # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression roman = Regex(r"M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})") """ @@ -4274,7 +4350,10 @@ def reset(self): def traceParseAction(f): """ - Decorator for debugging parse actions. + Decorator for debugging parse actions. + + When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".} + When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised. Example:: wd = Word(alphas) @@ -4339,9 +4418,16 @@ def countedArray( expr, intExpr=None ): integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. + + If C{intExpr} is specified, it should be a pyparsing expression that produces an integer value. Example:: countedArray(Word(alphas)).parseString('2 ab cd ef') # -> ['ab', 'cd'] + + # in this parser, the leading integer value is given in binary, + # '10' indicating that 2 values are in the array + binaryConstant = Word('01').setParseAction(lambda t: int(t[0], 2)) + countedArray(Word(alphas), intExpr=binaryConstant).parseString('10 ab cd ef') # -> ['ab', 'cd'] """ arrayExpr = Forward() def countFieldParseAction(s,l,t): @@ -4726,10 +4812,10 @@ def pa(s,l,t): return pa upcaseTokens = tokenMap(lambda t: _ustr(t).upper()) -"""Helper parse action to convert tokens to upper case.""" +"""(Deprecated) Helper parse action to convert tokens to upper case. Deprecated in favor of L{pyparsing_common.upcaseTokens}""" downcaseTokens = tokenMap(lambda t: _ustr(t).lower()) -"""Helper parse action to convert tokens to lower case.""" +"""(Deprecated) Helper parse action to convert tokens to lower case. Deprecated in favor of L{pyparsing_common.downcaseTokens}""" def _makeTags(tagStr, xml): """Internal helper to construct opening and closing tag expressions, given a tag name""" @@ -4921,7 +5007,7 @@ def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): Example:: # simple example of four-function arithmetic with ints and variable names - integer = pyparsing_common.signedInteger + integer = pyparsing_common.signed_integer varname = pyparsing_common.identifier arith_expr = infixNotation(integer | varname, @@ -5241,23 +5327,27 @@ def replaceHTMLEntity(t): Optional( Word(" \t") + ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem") commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") -"""Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" +"""(Deprecated) Predefined expression of 1 or more printable words or quoted strings, separated by commas. + This expression is deprecated in favor of L{pyparsing_common.comma_separated_list}.""" # some other useful expressions - using lower-case class name since we are really using this as a namespace class pyparsing_common: """ Here are some common low-level expressions that may be useful in jump-starting parser development: - - numeric forms (L{integers}, L{reals}, L{scientific notation}) + - numeric forms (L{integers}, L{reals}, L{scientific notation}) - common L{programming identifiers} - network addresses (L{MAC}, L{IPv4}, L{IPv6}) - ISO8601 L{dates} and L{datetime} - L{UUID} + - L{comma-separated list} Parse actions: - C{L{convertToInteger}} - C{L{convertToFloat}} - C{L{convertToDate}} - C{L{convertToDatetime}} - C{L{stripHTMLTags}} + - C{L{upcaseTokens}} + - C{L{downcaseTokens}} Example:: pyparsing_common.number.runTests(''' @@ -5393,25 +5483,25 @@ class pyparsing_common: hex_integer = Word(hexnums).setName("hex integer").setParseAction(tokenMap(int,16)) """expression that parses a hexadecimal integer, returns an int""" - signedInteger = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) + signed_integer = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) """expression that parses an integer with optional leading sign, returns an int""" - fraction = (signedInteger().setParseAction(convertToFloat) + '/' + signedInteger().setParseAction(convertToFloat)).setName("fraction") + fraction = (signed_integer().setParseAction(convertToFloat) + '/' + signed_integer().setParseAction(convertToFloat)).setName("fraction") """fractional expression of an integer divided by an integer, returns a float""" fraction.addParseAction(lambda t: t[0]/t[-1]) - mixed_integer = (fraction | signedInteger + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") + mixed_integer = (fraction | signed_integer + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" mixed_integer.addParseAction(sum) real = Regex(r'[+-]?\d+\.\d*').setName("real number").setParseAction(convertToFloat) """expression that parses a floating point number and returns a float""" - sciReal = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) + sci_real = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) """expression that parses a floating point number with optional scientific notation and returns a float""" # streamlining this expression makes the docs nicer-looking - number = (sciReal | real | signedInteger).streamline() + number = (sci_real | real | signed_integer).streamline() """any numeric expression, returns the corresponding Python type""" fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat) @@ -5503,6 +5593,18 @@ def stripHTMLTags(s, l, tokens): """ return pyparsing_common._html_stripper.transformString(tokens[0]) + _commasepitem = Combine(OneOrMore(~Literal(",") + ~LineEnd() + Word(printables, excludeChars=',') + + Optional( White(" \t") ) ) ).streamline().setName("commaItem") + comma_separated_list = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("comma separated list") + """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" + + upcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).upper())) + """Parse action to convert tokens to upper case.""" + + downcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).lower())) + """Parse action to convert tokens to lower case.""" + + if __name__ == "__main__": selectToken = CaselessLiteral("select") diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 2b51c5474f..22e1309c8a 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ packaging==16.7 -pyparsing==2.1.8 +pyparsing==2.1.9 six==1.10.0 appdirs==1.4.0 From 5e4eea7d600f44321e76689890f9f885669f34c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Sep 2016 17:05:07 -0400 Subject: [PATCH 6183/8469] In test command, add installed eggs to PYTHONPATH when invoking tests so that subprocesses will also have the dependencies available. Fixes #794. --- CHANGES.rst | 7 +++++ setuptools/command/test.py | 57 ++++++++++++++++++++++++++++++++------ setuptools/dist.py | 1 + 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index af25cc4a2e..54a4d52a56 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v27.3.0 +------- + +* #794: In test command, add installed eggs to PYTHONPATH + when invoking tests so that subprocesses will also have the + dependencies available. + v27.2.0 ------- diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 2d1adba85a..e0650d27f4 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,10 +1,12 @@ +import os +import operator import sys import contextlib from distutils.errors import DistutilsOptionError from unittest import TestLoader from setuptools.extern import six -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, @@ -112,7 +114,7 @@ def with_project_on_sys_path(self, func): func() @contextlib.contextmanager - def project_on_sys_path(self): + def project_on_sys_path(self, include_dists=[]): with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False) if with_2to3: @@ -144,23 +146,57 @@ def project_on_sys_path(self): old_modules = sys.modules.copy() try: - sys.path.insert(0, normalize_path(ei_cmd.egg_base)) + project_path = normalize_path(ei_cmd.egg_base) + sys.path.insert(0, project_path) working_set.__init__() add_activation_listener(lambda dist: dist.activate()) require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) - yield + with self.paths_on_pythonpath([project_path]): + yield finally: sys.path[:] = old_path sys.modules.clear() sys.modules.update(old_modules) working_set.__init__() + @staticmethod + @contextlib.contextmanager + def paths_on_pythonpath(paths): + """ + Add the indicated paths to the head of the PYTHONPATH environment + variable so that subprocesses will also see the packages at + these paths. + + Do this in a context that restores the value on exit. + """ + nothing = object() + orig_pythonpath = os.environ.get('PYTHONPATH', nothing) + current_pythonpath = os.environ.get('PYTHONPATH', '') + try: + prefix = os.pathsep.join(paths) + to_join = filter(None, [prefix, current_pythonpath]) + new_path = os.pathsep.join(to_join) + if new_path: + os.environ['PYTHONPATH'] = new_path + yield + finally: + if orig_pythonpath is nothing: + os.environ.pop('PYTHONPATH', None) + else: + os.environ['PYTHONPATH'] = orig_pythonpath + def run(self): + installed_dists = [] if self.distribution.install_requires: - self.distribution.fetch_build_eggs( - self.distribution.install_requires) + installed_dists.extend( + self.distribution.fetch_build_eggs( + self.distribution.install_requires, + )) if self.distribution.tests_require: - self.distribution.fetch_build_eggs(self.distribution.tests_require) + installed_dists.extend( + self.distribution.fetch_build_eggs( + self.distribution.tests_require, + )) cmd = ' '.join(self._argv) if self.dry_run: @@ -168,8 +204,11 @@ def run(self): return self.announce('running "%s"' % cmd) - with self.project_on_sys_path(): - self.run_tests() + + paths = map(operator.attrgetter('location'), installed_dists) + with self.paths_on_pythonpath(paths): + with self.project_on_sys_path(): + self.run_tests() def run_tests(self): # Purge modules under test from sys.modules. The test loader will diff --git a/setuptools/dist.py b/setuptools/dist.py index b004f9287c..364f2b4d37 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -362,6 +362,7 @@ def fetch_build_eggs(self, requires): ) for dist in resolved_dists: pkg_resources.working_set.add(dist, replace=True) + return resolved_dists def finalize_options(self): _Distribution.finalize_options(self) From 55c36fdfa8fdc3b4581e0331cc91a069a001da51 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 18 Sep 2016 04:25:06 +0700 Subject: [PATCH 6184/8469] Add missing whitespace. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3fb39269e1..3e8d6818f7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -293,7 +293,7 @@ def __init__( ca_bundle=None, verify_ssl=True, *args, **kw ): Environment.__init__(self, *args, **kw) - self.index_url = index_url + "/"[:not index_url.endswith('/')] + self.index_url = index_url + "/" [:not index_url.endswith('/')] self.scanned_urls = {} self.fetched_urls = {} self.package_pages = {} From 2f3b7b204187a1c93c391ffac96a9220cbb57f91 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Sep 2016 09:20:17 -0400 Subject: [PATCH 6185/8469] Extract test.install_dists and distill it with a variable extraction and fallback variables. --- CHANGES.rst | 3 ++- setuptools/command/test.py | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 54a4d52a56..8af3b938ab 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,8 @@ v27.3.0 * #794: In test command, add installed eggs to PYTHONPATH when invoking tests so that subprocesses will also have the - dependencies available. + dependencies available. Fixes `tox 330 + `_. v27.2.0 ------- diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e0650d27f4..48d5b5e104 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -2,6 +2,7 @@ import operator import sys import contextlib +import itertools from distutils.errors import DistutilsOptionError from unittest import TestLoader @@ -185,18 +186,18 @@ def paths_on_pythonpath(paths): else: os.environ['PYTHONPATH'] = orig_pythonpath + def install_dists(self): + """ + Install the requirements indicated by self.distribution and + return an iterable of the dists that were built. + """ + dist = self.distribution + ir_d = dist.fetch_build_eggs(dist.install_requires or []) + tr_d = dist.fetch_build_eggs(dist.tests_require or []) + return itertools.chain(ir_d, tr_d) + def run(self): - installed_dists = [] - if self.distribution.install_requires: - installed_dists.extend( - self.distribution.fetch_build_eggs( - self.distribution.install_requires, - )) - if self.distribution.tests_require: - installed_dists.extend( - self.distribution.fetch_build_eggs( - self.distribution.tests_require, - )) + installed_dists = self.install_dists() cmd = ' '.join(self._argv) if self.dry_run: From 2148592395ef4da0d408be26bf5839117ee0e5fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Sep 2016 09:27:23 -0400 Subject: [PATCH 6186/8469] Even better, use a static method --- setuptools/command/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 48d5b5e104..38bbcd8bc8 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -186,18 +186,18 @@ def paths_on_pythonpath(paths): else: os.environ['PYTHONPATH'] = orig_pythonpath - def install_dists(self): + @staticmethod + def install_dists(dist): """ Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ - dist = self.distribution ir_d = dist.fetch_build_eggs(dist.install_requires or []) tr_d = dist.fetch_build_eggs(dist.tests_require or []) return itertools.chain(ir_d, tr_d) def run(self): - installed_dists = self.install_dists() + installed_dists = self.install_dists(self.distribution) cmd = ' '.join(self._argv) if self.dry_run: From 560e787eec3b5801de158eccd492f26d2440051e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Sep 2016 21:18:44 -0400 Subject: [PATCH 6187/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8af3b938ab..19452d4ffd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,8 @@ v27.3.0 dependencies available. Fixes `tox 330 `_. +* #795: Update vendored pyparsing 2.1.9. + v27.2.0 ------- From f773e19f4f85fae7312de57d6995fcb7c4795a30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Sep 2016 21:18:51 -0400 Subject: [PATCH 6188/8469] =?UTF-8?q?Bump=20version:=2027.2.0=20=E2=86=92?= =?UTF-8?q?=2027.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ce161ffe44..2c6fa292e5 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.2.0 +current_version = 27.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index d04d9b5bd5..b16cef30f1 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.2.0", + version="27.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From aac208c1c711c5819024f88890e244dd18801feb Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Sun, 14 Aug 2016 05:59:35 +0200 Subject: [PATCH 6189/8469] Do not search excluded directories for packages Previously, PackageFinder.find would search the whole directory tree looking for packages, then remove excluded packages from this list. This made building a package very slow under some circumstances where the file tree was large. This change stops PackageFinder.find from descending in to directories that will never be included. --- setuptools/__init__.py | 83 ++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 41b590d7b5..892626e6a6 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from setuptools.extern.six.moves import filterfalse, map +from setuptools.extern.six.moves import filter, filterfalse, map import setuptools.version from setuptools.extension import Extension @@ -32,13 +32,18 @@ class PackageFinder(object): + """ + Generate a list of all Python packages found within a directory + """ @classmethod def find(cls, where='.', exclude=(), include=('*',)): """Return a list all Python packages found within directory 'where' - 'where' should be supplied as a "cross-platform" (i.e. URL-style) - path; it will be converted to the appropriate local path syntax. + 'where' is the root directory which will be searched for packages. It + should be supplied as a "cross-platform" (i.e. URL-style) path; it will + be converted to the appropriate local path syntax. + 'exclude' is a sequence of package names to exclude; '*' can be used as a wildcard in the names, such that 'foo.*' will exclude all subpackages of 'foo' (but not 'foo' itself). @@ -47,65 +52,47 @@ def find(cls, where='.', exclude=(), include=('*',)): specified, only the named packages will be included. If it's not specified, all found packages will be included. 'include' can contain shell style wildcard patterns just like 'exclude'. - - The list of included packages is built up first and then any - explicitly excluded packages are removed from it. - """ - out = cls._find_packages_iter(convert_path(where)) - out = cls.require_parents(out) - includes = cls._build_filter(*include) - excludes = cls._build_filter('ez_setup', '*__pycache__', *exclude) - out = filter(includes, out) - out = filterfalse(excludes, out) - return list(out) - - @staticmethod - def require_parents(packages): """ - Exclude any apparent package that apparently doesn't include its - parent. - For example, exclude 'foo.bar' if 'foo' is not present. - """ - found = [] - for pkg in packages: - base, sep, child = pkg.rpartition('.') - if base and base not in found: - continue - found.append(pkg) - yield pkg + return list(cls._find_packages_iter( + convert_path(where), + cls._build_filter('ez_setup', '*__pycache__', *exclude), + cls._build_filter(*include))) - @staticmethod - def _candidate_dirs(base_path): + @classmethod + def _find_packages_iter(cls, where, exclude, include): """ - Return all dirs in base_path that might be packages. + All the packages found in 'where' that pass the 'include' filter, but + not the 'exclude' filter. """ - has_dot = lambda name: '.' in name - for root, dirs, files in os.walk(base_path, followlinks=True): - # Exclude directories that contain a period, as they cannot be - # packages. Mutate the list to avoid traversal. - dirs[:] = filterfalse(has_dot, dirs) - for dir in dirs: - yield os.path.relpath(os.path.join(root, dir), base_path) - - @classmethod - def _find_packages_iter(cls, base_path): - candidates = cls._candidate_dirs(base_path) - return ( - path.replace(os.path.sep, '.') - for path in candidates - if cls._looks_like_package(os.path.join(base_path, path)) - ) + for root, dirs, files in os.walk(where, followlinks=True): + # Copy dirs to iterate over it, then empty dirs. + all_dirs = dirs[:] + dirs[:] = [] + + for dir in all_dirs: + full_path = os.path.join(root, dir) + rel_path = os.path.relpath(full_path, where) + package = rel_path.replace(os.path.sep, '.') + + # Check if the directory is a package and passes the filters + if ('.' not in dir + and include(package) + and not exclude(package) + and cls._looks_like_package(full_path)): + yield package + dirs.append(dir) @staticmethod def _looks_like_package(path): + """Does a directory look like a package?""" return os.path.isfile(os.path.join(path, '__init__.py')) @staticmethod def _build_filter(*patterns): """ Given a list of patterns, return a callable that will be true only if - the input matches one of the patterns. + the input matches at least one of the patterns. """ return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) From 75a78dc2feedb9287155f146d0b855ea46924961 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 22 Sep 2016 10:16:40 +1000 Subject: [PATCH 6190/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 19452d4ffd..d115533a8a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +In development +-------------- + +* #733: Do not search excluded directories for packages. + v27.3.0 ------- From 0e1b6fe0004764dcc4adc45bc0bb2665f5bedd04 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Sat, 24 Sep 2016 16:24:37 +0300 Subject: [PATCH 6191/8469] certifi 2016.8.31 (#797) --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b16cef30f1..22bdae1088 100755 --- a/setup.py +++ b/setup.py @@ -167,11 +167,11 @@ def pypi_link(pkg_filename): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2016.8.8", + "certs": "certifi==2016.8.31", }, dependency_links=[ pypi_link( - 'certifi-2016.8.8.tar.gz#md5=b57513f7670482da45bb350b792f659e', + 'certifi-2016.8.31.tar.gz#md5=2f22d484a36d38d98be74f9eeb2846ec', ), pypi_link( 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', From 992adf2f5684e6660335d616149e050b3eaaed17 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 26 Sep 2016 14:00:00 +1000 Subject: [PATCH 6192/8469] Note find_packages backwards incompatible change Also add a test for the new behaviour. --- CHANGES.rst | 4 ++++ setuptools/tests/test_find_packages.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d115533a8a..cf8bcaf90a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,10 @@ In development -------------- * #733: Do not search excluded directories for packages. + This introduced a backwards incompatible change in ``find_packages()`` + so that ``find_packages(exclude=['foo']) == []``, excluding subpackages of ``foo``. + Previously, ``find_packages(exclude=['foo']) == ['foo.bar']``, + even though the parent ``foo`` package was excluded. v27.3.0 ------- diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index df51b04fd1..9d31ccd7a2 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -98,6 +98,15 @@ def test_exclude(self): packages = find_packages(self.dist_dir, exclude=('pkg.*',)) assert packages == ['pkg'] + def test_exclude_recursive(self): + """ + Excluding a parent package should exclude all child packages as well. + """ + self._touch('__init__.py', self.pkg_dir) + self._touch('__init__.py', self.sub_pkg_dir) + packages = find_packages(self.dist_dir, exclude=('pkg',)) + assert packages == [] + def test_include_excludes_other(self): """ If include is specified, other packages should be excluded. From 44a670456c81f844cad1d5aa713cd304ed80fc09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 13:34:36 -0500 Subject: [PATCH 6193/8469] Patch MSVC functions by name. Fixes #790. --- CHANGES.rst | 9 +++++++ setuptools/monkey.py | 64 ++++++++++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 19452d4ffd..0246c461cb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,15 @@ CHANGES ======= +v27.3.1 +------- + +* #790: In MSVC monkeypatching, explicitly patch each + function by name in the target module instead of inferring + the module from the function's ``__module__``. Improves + compatibility with other packages that might have previously + patched distutils functions (i.e. NumPy). + v27.3.0 ------- diff --git a/setuptools/monkey.py b/setuptools/monkey.py index c4289762db..43b97b4d95 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -6,6 +6,7 @@ import distutils.filelist import platform import types +import functools from .py26compat import import_module from setuptools.extern import six @@ -115,16 +116,21 @@ def _patch_distribution_metadata_write_pkg_info(): ) -def patch_func(replacement, original): - # first set the 'unpatched' attribute on the replacement to +def patch_func(replacement, target_mod, func_name): + """ + Patch func_name in target_mod with replacement + + Important - original must be resolved by name to avoid + patching an already patched function. + """ + original = getattr(target_mod, func_name) + + # set the 'unpatched' attribute on the replacement to # point to the original. vars(replacement).setdefault('unpatched', original) - # next resolve the module in which the original func resides - target_mod = import_module(original.__module__) - - # finally replace the function in the original module - setattr(target_mod, original.__name__, replacement) + # replace the function in the original module + setattr(target_mod, func_name, replacement) def get_unpatched_function(candidate): @@ -139,37 +145,43 @@ def patch_for_msvc_specialized_compiler(): # import late to avoid circular imports on Python < 3.5 msvc = import_module('setuptools.msvc') - try: - # Distutil file for MSVC++ 9.0 and upper (Python 2.7 to 3.4) - import distutils.msvc9compiler as msvc9compiler - except ImportError: - pass - - try: - # Distutil file for MSVC++ 14.0 and upper (Python 3.5+) - import distutils._msvccompiler as msvc14compiler - except ImportError: - pass - if platform.system() != 'Windows': # Compilers only availables on Microsoft Windows return + def patch_params(mod_name, func_name): + """ + Prepare the parameters for patch_func to patch indicated function. + """ + repl_prefix = 'msvc9_' if 'msvc9' in mod_name else 'msvc14_' + repl_name = repl_prefix + func_name.lstrip('_') + repl = getattr(msvc, repl_name) + mod = import_module(mod_name) + if not hasattr(mod, func_name): + raise ImportError(func_name) + return repl, mod, func_name + + # Python 2.7 to 3.4 + msvc9 = functools.partial(patch_params, 'distutils.msvc9compiler') + + # Python 3.5+ + msvc14 = functools.partial(patch_params, 'distutils._msvccompiler') + try: # Patch distutils.msvc9compiler - patch_func(msvc.msvc9_find_vcvarsall, msvc9compiler.find_vcvarsall) - patch_func(msvc.msvc9_query_vcvarsall, msvc9compiler.query_vcvarsall) - except NameError: + patch_func(*msvc9('find_vcvarsall')) + patch_func(*msvc9('query_vcvarsall')) + except ImportError: pass try: # Patch distutils._msvccompiler._get_vc_env - patch_func(msvc.msvc14_get_vc_env, msvc14compiler._get_vc_env) - except NameError: + patch_func(*msvc14('_get_vc_env')) + except ImportError: pass try: # Patch distutils._msvccompiler.gen_lib_options for Numpy - patch_func(msvc.msvc14_gen_lib_options, msvc14compiler.gen_lib_options) - except NameError: + patch_func(*msvc14('gen_lib_options')) + except ImportError: pass From e91f0b18021ba6ba073d9db19d4b5afb91f3f55e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 13:45:29 -0500 Subject: [PATCH 6194/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d115533a8a..1861cb6b2c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ In development * #733: Do not search excluded directories for packages. +* #795: Bump certifi. + v27.3.0 ------- From 394318306bac8e5cab251ca4cb099c40aebc97fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 13:46:49 -0500 Subject: [PATCH 6195/8469] =?UTF-8?q?Bump=20version:=2027.3.0=20=E2=86=92?= =?UTF-8?q?=2027.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2c6fa292e5..549aff1605 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.3.0 +current_version = 27.3.1 commit = True tag = True diff --git a/setup.py b/setup.py index b16cef30f1..67c66b3ccb 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.3.0", + version="27.3.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 441e50c2eb29078d5b42046e14834837ffac9c9f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 13:57:39 -0500 Subject: [PATCH 6196/8469] Define version in changelog --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 11d9ca9329..0ce8e52b89 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,8 +2,8 @@ CHANGES ======= -In development --------------- +v28.0.0 +------- * #733: Do not search excluded directories for packages. This introduced a backwards incompatible change in ``find_packages()`` From 2b5937f56b9b1d8d91c1247540f41437ba99016e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 13:58:38 -0500 Subject: [PATCH 6197/8469] Remove Mercurial metadata --- .hgignore | 15 --- .hgtags | 308 ------------------------------------------------------ 2 files changed, 323 deletions(-) delete mode 100644 .hgignore delete mode 100644 .hgtags diff --git a/.hgignore b/.hgignore deleted file mode 100644 index ebc53b33d5..0000000000 --- a/.hgignore +++ /dev/null @@ -1,15 +0,0 @@ -syntax: glob -bin -build -dist -include -lib -distribute.egg-info -setuptools.egg-info -.coverage -.tox -*.egg -*.py[cod] -*.swp -*~ -.git* diff --git a/.hgtags b/.hgtags deleted file mode 100644 index 88f2dc60ae..0000000000 --- a/.hgtags +++ /dev/null @@ -1,308 +0,0 @@ -7e9441311eb21dd1fbc32cfbad58168e46c5450e 0.6 -26f429772565f69d1f6d21adf57c3d8c40197129 0.6.1 -6f46749a7454be6e044a54cd73c51318b74bdee8 0.6.2 -34b80fb58862d18f8f957f98a883ed4a72d06f8e 0.6.3 -fb04abddb50d82a9005c9082c94d5eb983be1d79 0.6.4 -8ae0bd250b4a0d58cbaf16b4354ad60f73f24a01 0.6.5 -88847883dfed39829d3a5ed292ad540723ad31cc 0.6.6 -fcbef325349ada38f6c674eb92db82664cf6437c 0.6.7 -3af7f2b8270b9bb34fb65f08ee567bfe8e2a6a5a 0.6.8 -669725d03fd1e345ea47590e9b14cb19742b96a2 0.6.9 -eff3ca9c2d8d39e24c221816c52a37f964535336 0.6.10 -88710e34b91c98c9348749722cce3acd574d177d 0.6.11 -5ce754773a43ac21f7bd13872f45c75e27b593f8 0.6.12 -de36566d35e51bee7cfc86ffa694795e52f4147c 0.6.13 -e5f3f0ffe9e1a243d49a06f26c79dd160f521483 0.6.14 -dc03a300ec7a89ad773047172d43e52b34e7cd1e 0.6.15 -e620fb4ee8ba17debadb614fb583c6dfac229dea 0.6.16 -21df276275b5a47c6a994927d69ad3d90cf62b5d 0.6.17 -e9264ca4ba8c24239c36a8426a0394f7c7d5dd83 0.6.18 -aed31b1fa47ed1f39e55c75b76bbbdb80775b7f1 0.6.19 -c6e6273587816c3e486ef7739e53c864a0145251 0.6.20 -7afdf4c84a713fe151e6163ab25d45e8727ce653 0.6.21 -105066342777cd1319a95d7ae0271a2ea1ac33fe 0.6.23 -7b5ef4e6c80e82541dffb5a9a130d81550d5a835 0.6.24 -9c014a80f32e532371826ed1dc3236975f37f371 0.6.25 -ff8c4d6c8e5d2093750a58a3d43b76556570007c 0.6.26 -2a5c42ed097a195e398b97261c40cd66c8da8913 0.6.27 -4ed34b38851f90278cfe2bff75784f7e32883725 0.6.28 -acecfa2cfb6fca207dd2f4e025c695def3bb6b40 0.6.29 -e950f50addff150859f5990b9df2a33c691b6354 0.6.30 -06dae3faee2de50ff17b90719df410b2ebc5b71e 0.6.31 -1f4f79258ed5b418f680a55d3006f41aa6a56d2b 0.6.32 -89f57bf1406a5e745470af35446902c21ac9b6f6 0.6.33 -3c8f9fc13862124cf20ef2ff2140254fb272bb94 0.6.34 -7c3f8b9eb7cfa17481c835d5caaa918d337c7a83 0.6.35 -192094c0d1e2e5d2cb5c718f84a36c9de04b314b 0.6.36 -66d4e3b8899166e4c04189ee1831c649b7ff38bf 0.6.37 -398d58aa8bba33778c30ce72055a27d4b425809c 0.6.38 -f457fc2a3ebe609d8ca7a869eb65b7506ecf49ef 0.6.39 -9b2e2aa06e058c63e06c5e42a7f279ddae2dfb7d 0.7b1 -9089a40343981baa593b9bb5953f9088e9507099 0.6.40 -ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 -f30167716b659f96c5e0b7ea3d5be2bcff8c0eac 0.6.42 -8951daac6c1bc7b24c7fb054fd369f2c5b88cdb3 0.7b2 -35086ee286732b0f63d2be18d9f26f2734586e2d 0.6.43 -63e4eb2d61204f77f9b557201a0efa187b05a611 0.7b3 -73aa98aee6bbc4a9d19a334a8ac928dece7799c6 0.6.44 -53b4ac9a748aa28893aaca42c41e5e99568667bb 0.7b4 -ddca71ae5ceb9b14512dc60ea83802c10e224cf0 0.6.45 -7f2c08e9ca22023d1499c512fccc1513813b7dc4 0.7 -024dd30ed702135f5328975042566e48cc479d7d 0.7.1 -d04c05f035e3a5636006fc34f4be7e6c77035d17 0.7.2 -d212e48e0cef689acba57ed017289c027660b23c 0.7.3 -74c6c12268059986f9cc0b535399594f1d131201 0.8b1 -85640475dda0621f20e11db0995fa07f51744a98 0.7.4 -b57e5ba934767dd498669b17551678081b3047b5 0.6.46 -dd5bbc116c53d3732d22f983e7ca6d8cfabd3b08 0.7.5 -512744f3f306aea0fdde4cfd600af8b2d6e773e7 0.8b2 -8af9839a76407eebf3610fcd3e7973f1625abaa2 0.8b3 -ee2c967017024197b38e39ced852808265387a4b 0.6.47 -48d3d26cbea68e21c96e51f01092e8fdead5cd60 0.7.6 -5b3c7981a02b4a86af1b10ae16492899b515d485 0.8b4 -cae9127e0534fc46d7ddbc11f68dc88fd9311459 0.6.48 -1506fa538fff01e70424530a32a44e070720cf3c 0.7.7 -5679393794978a1d3e1e087472b8a0fdf3d8423c 0.8b5 -26f59ec0f0f69714d28a891aaad048e3b9fcd6f7 0.8b6 -f657df1f1ed46596d236376649c99a470662b4ba 0.6.49 -236de1de68b14230036147c7c9e7c09b215b53ee 0.7.8 -979d598822bc64b05fb177a2ba221e75ee5b44d3 0.8b7 -e3d70539e79f39a97f69674ab038661961a1eb43 0.8 -3078b1e566399bf0c5590f3528df03d0c23a0777 0.9 -9e5a8f734662dd36e6fd6e4ba9031d0e2d294632 0.9.1 -37444bb32e172aaacbc0aeafdf5a778ee471723d 0.9.2 -3e9d2e89de3aa499382d6be2ec8b64d2a29f7f13 0.9.3 -1aef141fc968113e4c521d1edf6ea863c4ff7e00 0.9.4 -88e3d6788facbb2dd6467a23c4f35529a5ce20a1 0.9.5 -acc6c5d61d0f82040c237ac7ea010c0fc9e67d66 0.9.6 -19965a03c1d5231c894e0fabfaf45af1fd99f484 0.9.7 -e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 -7b91ff93a30ef78634b7bb34f4a6229a5de281ee 1.0b1 -aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 -8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 -c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 -d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 -2e42e86546100c9f6845b04eb31b75c5add05f78 1.1.1 -462fe5ccd8befeb2a235e8295d6d73eb3a49cc78 1.1.2 -ddf3561d6a54087745f4bf6ea2048b86195d6fe2 1.1.3 -f94c7e4fa03077e069c1c3cef93ead735559e706 1.1.4 -d9bb58331007ee3f69d31983a180f56b15c731c3 1.1.5 -5e426bdeb46b87e299422adc419f4163b6c78d13 1.1.6 -cc9b19cd0ec64e44308a852e9b9fdc6026ea2e46 1.1.7 -4c7dc4ae2440ae3e9ba26b4a12ffca3407e7030d 1.2b1 -77921bbe3931caf40474dc36e55d3d541981c749 1.2 -19873119647deae8a68e9ed683317b9ee170a8d8 1.3 -a197b626075a8c2e393a08c42a20bd2624a41092 1.3.1 -076b472a9e3f840021e9d5509878337e6e5fcd89 1.3.2 -0d1bdb99a535a2c7ed4edd37141fb0b54348b713 1.4b1 -a13f8c18ce742bc83c794b9eea57980cb94ae18a 1.4 -9a5f26d7df8ef779cb5f40cc0389343fb4c61365 1.4.1 -274cb3beba4f22d5f461b0578b6d56e171d94f2e 1.4.2 -0bb1df93c2eaa50e95ccfce18208b0cca20ebae3 2.0 -bbdba51e1bc1779728ed351529252f73543ace65 2.0.1 -5a62ac60ba31d249db1cfcff31d85ca26421be6d 2.0.2 -c49c651997ebec3b40b71139e8a6a6a15c62c848 2.1 -b5be6c2b828cb92d27f52fccc725ce86a37e9ce0 2.1.1 -ab1c2a26e06f2a2006e8e867e4d41ccf1d6cf9b2 2.2b1 -caab085e829f29679d0e47430b2761af6b20fc76 2.1.2 -39f7ef5ef22183f3eba9e05a46068e1d9fd877b0 2.2 -faba785e9b9e05ba890d0851ef1f3287c32fcac2 3.0b1 -8e8c50925f18eafb7e66fe020aa91a85b9a4b122 3.0 -cd9e857476ac70515f7436f846b593f696ac672d 3.0.1 -bad1f30ee0dfa7a2af4f428d06f62efa39ca48db 3.0.2 -47224d55ddc6bb08c1d17a219f124d0d9c524491 3.1 -07c459bea1c58ff52e0576fc29c1865d18a83b09 3.2 -b306e681a945406833fb297ae10241e2241fc22b 3.3 -78c8cfbe3e1017d1653c48f7306b2c4b4911bf1a 4.0b1 -5cb90066d98700e6d37a01d95c4a2090e730ae02 3.4 -e39de2d3eb774b70c023a1151758213cc9ed2178 3.4.1 -369f6f90f69683702cc0b72827ccf949977808b0 3.4.2 -06a56e063c327b0606f9e9690764279d424646b2 3.4.3 -0917d575d26091a184796624743825914994bf95 3.4.4 -98f29d521c3a57bae0090d2bc5597d93db95b108 3.5 -254d8c625f4620993ce2d2b21212ba01cf307fe6 3.5.1 -572201d08eadc59210f6f0f28f9dc79f906672d3 3.5.2 -e94e768594a1405efde0b79cc60549dd8a4cda9a 3.6 -292dfca15d33e72a862d044183a6ad7c06862a19 3.7b1 -49bd27eebf212c067392796bb2d0fa6d8e583586 3.7 -2fa97c06cc013a9c82f4c1219711e72238d5b6e6 3.8 -9b422fc0b8b97cdb62f02d754283f747adef7f83 3.7.1 -40744de29b848f0e88139ba91d645c08a56855e9 3.8.1 -84d936fd18a93d16c46e68ee2e39f5733f3cd863 5.0 -871bd7b4326f48860ebe0baccdaea8fe4f8f8583 5.0.1 -95996b713722376679c3168b15ab12ea8360dd5f 5.0.2 -3a948b6d01e3449b478fcdc532c44eb3cea5ee10 5.1 -f493e6c4ffd88951871110858c141385305e0077 5.2 -1f9505cfd7524ce0c83ab31d139f47b39c56ccbe 5.3 -baae103e80c307008b156e426a07eb9f486eb4f0 5.4 -ba3b08c7bffd6123e1a7d58994f15e8051a67cb7 5.4.1 -7adcf1397f6eccb9e73eda294343de2943f7c8fb 5.4.2 -68910a89f97a508a64f9f235dc64ad43d4477ea0 5.5 -949a66af4f03521e1404deda940aa951418a13d2 5.5.1 -a1fc0220bfa3581158688789f6dfdc00672eb99b 5.6 -37ed55fd310d0cd32009dc5676121e86b404a23d 5.7 -67550a8ed9f4ef49ee5a31f433adbf5a0eaeccf9 5.8 -755cbfd3743ffb186cdf7e20be8e61dbdaa22503 6.0 -bc6655b4acf205dd9f25c702955645656077398a 6.0.1 -1ae2a75724bbba56373784f185a7f235ed0f24a4 6.0.2b1 -01271e84e5125fcc4f0f368a6e21116a5722953c 6.0.2 -7ea80190d494a766c6356fce85c844703964b6cc 6.1 -df26609c2f614f5fc9110342e4003ee8bd95cf84 7.0 -850a5c155c48b6ecfbb83b961586ea359b561522 8.0b1 -7ea0e7498e4ddbf63b6929ee83c75a9207996b08 8.0 -1af3a5f24f7dd4e51d117f701918052b7de65c99 8.1b1 -d62bf4e407b3b9b5bedcc1396a9ba46f35571902 8.0.1 -1c03d512e39d5cfd711ae3ed7e316769f427e43b 8.0.2 -6c3467488123ce70b1dd009145a02f51fb78cdcc 8.0.3 -2c467afffe9fe1e14618b576fac6b4f7c412a61e 8.0.4 -3f87370b6863e5a4e831b394ef1a58e0e97a4336 8.1 -995f6d9651312cd481ca1e5ddb271cbdd0474c57 8.2 -efbe39dae0aba9a7db399f6442758ae94e315c93 8.2.1 -cd14b2a72e51c7d13873ab6c2041f901b1a7a1cd 8.3 -0eee586a153f068142c1a0df4bc2635ed2c1a1cc 9.0b1 -921e60a0f9067311571fde9ccf2f35223159d9f6 8.4 -0d7b9b63d06ab7f68bc8edd56cb2034e6395d7fc 9.0 -fa069bf2411a150c9379d31a04d1c3836e2d3027 9.0.1 -3ed27d68d3f41bb5daa2afecfa9180d5958fe9d3 9.1 -0c4d18a747a6d39bff8e194a58af949a960d674a 10.0 -4c41e2cdd70beb0da556d71f46a67734c14f2bc2 10.0.1 -26b00011ec65b8f7b4f3d51078ec0a694701a45c 10.1 -651d41db58849d4fc50e466f4dc458d448480c4e 10.2 -1f5de53c079d577ead9d80265c9e006503b16457 10.2.1 -b4b92805bc0e9802da0b597d00df4fa42b30bc40 11.0 -6cd2b18f4be2a9c188fa505b34505b32f4a4554b 11.1 -feb5971e7827483bbdeb67613126bb79ed09e6d9 11.2 -a1a6a1ac9113b90009052ca7263174a488434099 11.3 -1116e568f534ad8f4f41328a0f5fa183eb739c90 11.3.1 -55666947c9eb7e3ba78081ad6ae004807c84aede 12.0 -747018b2e35a40cb4b1c444f150f013d02197c64 12.0.1 -a177ea34bf81662b904fe3af46f3c8719a947ef1 12.0.2 -bf8c5bcacd49bf0f9648013a40ebfc8f7c727f7b 12.0.3 -73dcfc90e3eecec6baddea19302c6b342e68e2fa 12.0.4 -01fbfc9194a2bc502edd682eebbf4d2f1bc79eee 12.0.5 -7bca8938434839dbb546b8bfccd9aab7a86d851e 12.1 -5ff5c804a8fa580cff499ba0025ff2e6a5474fd0 12.2 -8d50aac3b20793954121edb300b477cc75f3ec96 12.3 -297931cb8cac7d44d970adb927efd6cb36ac3526 12.4 -df34cc18624279faffdbc729c0a11e6ab0f46572 13.0 -ae1a5c5cf78f4f9f98c054f1c8cec6168d1d19b4 13.0.1 -e22a1d613bddf311e125eecd9c1e1cad02ab5063 13.0.2 -a3a105f795f8362f26e84e9acbc237ee2d6bcca4 14.0 -9751a1671a124e30ae344d1510b9c1dbb14f2775 14.1 -07fcc3226782b979cedaaf456c7f1c5b2fdafd2c 14.1.1 -d714fb731de779a1337d2d78cd413931f1f06193 14.2 -e3c635a7d463c7713c647d1aa560f83fd8e27ef0 14.3 -608948cef7e0ab8951691b149f5b6f0184a5635e 14.3.1 -617699fd3e44e54b6f95b80bfcf78164df37f266 15.0b1 -d2c4d84867154243993876d6248aafec1fd12679 15.0 -10fde952613b7a3f650fb1f6b6ed58cbd232fa3c 15.1 -df5dc9c7aa7521f552824dee1ed1315cfe180844 15.2 -e0825f0c7d5963c498266fe3c175220c695ae83b 16.0 -8e56240961015347fed477f00ca6a0783e81d3a2 17.0 -a37bcaaeab367f2364ed8c070659d52a4c0ae38e 17.1 -4a0d01d690ff184904293e7a3244ac24ec060a73 17.1.1 -fac98a49bd984ef5accf7177674d693277bfbaef 18.0b1 -0a49ee524b0a1d67d2a11c8c22f082b57acd7ae1 18.0 -e364795c1b09c70b6abb53770e09763b52bf807d 18.0.1 -c0395f556c35d8311fdfe2bda6846b91149819cd 18.1 -1a981f2e5031f55267dc2a28fa1b42274a1b64b2 18.2 -b59320212c8371d0be9e5e6c5f7eec392124c009 18.3 -7a705b610abb1177ca169311c4ee261f3e4f0957 18.3.1 -1e120f04bcaa2421c4df0eb6678c3019ba4a82f6 18.3.2 -6203335278be7543d31790d9fba55739469a4c6c 18.4 -31dc6d2ac0f5ab766652602fe6ca716fff7180e7 18.5 -dfe190b09908f6b953209d13573063809de451b8 18.6 -804f87045a901f1dc121cf9149143d654228dc13 18.6.1 -67d07805606aead09349d5b91d7d26c68ddad2fc 18.7 -3041e1fc409be90e885968b90faba405420fc161 18.7.1 -c811801ffa1de758cf01fbf6a86e4c04ff0c0935 18.8 -fbf06fa35f93a43f044b1645a7e4ff470edb462c 18.8.1 -cc41477ecf92f221c113736fac2830bf8079d40c 19.0 -834782ce49154e9744e499e00eb392c347f9e034 19.1 -0a2a3d89416e1642cf6f41d22dbc07b3d3c15a4d 19.1.1 -5d24cf9d1ced76c406ab3c4a94c25d1fe79b94bc 19.2 -66fa131a0d77a1b0e6f89ccb76b254cfb07d3da3 19.3b1 -32bba9bf8cce8350b560a7591c9ef5884a194211 19.3 -f47f3671508b015e9bb735603d3a0a6ec6a77b01 19.4 -0bda3291ac725750b899b4ba3e4b6765e7645daa 19.4.1 -0a68cbab72580a6f8d3bf9c45206669eefcd256b 19.5 -34121bf49b1a7ac77da7f7c75105c8a920218dd7 19.6b1 -3c2332e4ec72717bf17321473e5c3ad6e5778903 19.6 -35d9179d04390aada66eceae9ceb7b9274f67646 19.6.1 -d2782cbb2f15ca6831ab9426fbf8d4d6ca60db8a 19.6.2 -c6e619ce910d1650cc2433f94e5594964085f973 19.7 -2a60daeff0cdb039b20b2058aaad7dae7bcd2c1c 20.0 -06c9d3ffae80d7f5786c0a454d040d253d47fc03 20.1 -919a40f1843131249f98104c73f3aee3fc835e67 20.1.1 -74c4ffbe1f399345eb4f6a64785cfff54f7e6e7e 20.2 -1aacb05fbdfe06cee904e7a138a4aa6df7b88a63 20.2.1 -48aa5271ef1cd5379cf91a1c958e490692b978e7 20.2.2 -9c55a3a1268a33b4a57b96b2b9fa2cd0701780ee 20.3 -3e87e975a95c780eec497ef9e5a742f7adfb77ec 20.3.1 -06692c64fb9b5843331a918ab7093f151412ec8e 20.4 -f8174392e9e9c6a21ea5df0f22cb4ca885c799ca 20.5 -114f3dbc8a73dacbce2ebe08bb70ca76ab18390e v20.6.0 -a3d4006688fe5e754d0e709a52a00b8191819979 v20.6.1 -2831509712601a78fddf46e51d6f41ae0f92bd0e v20.6.2 -8b46dc41cb234c435b950a879214a6dee54c9dd2 v20.6.3 -7258be20fe93bbf936dc1a81ce71c04c5880663e v20.6.4 -7e0ab283db4e6f780777f7f06af475f044631fa1 v20.6.5 -57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 -57d63b38e85515d06e06d3cea62e35e6c54b5093 v20.6.6 -b04dbdd161d7f68903a53e1dbd1fa5b5fde73f94 v20.6.6 -0804d30b6ead64e0e324aefd67439b84df2d1c01 v20.6.7 -a00910db03ec15865e4c8506820d4ad1df3e26f3 v20.6.8 -0262ab29fc2417b502a55f49b7fd43528fbd3df4 v20.7.0 -7f56b6f40de39456c78507a14c288709712881cb v20.8.0 -8cf9340669ae26e2b31f68b9c3f885ab7bdd65ce v20.8.1 -8bf8aaa139bb6a36fcd243214d6730a214ae08f5 v20.9.0 -c72faa468919fd2f226c97e94d4e64a6506860e5 v20.10.0 -3b5fdd077c7d83d02c4979ad69cc0bf199b47587 v20.10.1 -ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 -018e4a727cf691d6404cd24ffb25e8eebea2fad4 v20.6.8 -02643fe9503033edd2fc5a54c8d4361a6c185be4 v21.1.0 -40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 -40b8fac6db119aca9c462993d01908492769fc4f v21.2.0 -9959424676a4aac1c14e430ff6f4210fdb0442d9 v21.2.0 -694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 -274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 -451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 -f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 -8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 -efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 -77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 -d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 -8664c631bf3a817a7deba86c13b67eccc1f81091 v23.0.0 -6c74559c732c56f61b465d613458ec1a930884b6 v23.1.0 -65b3fe899db4086e66afa067a1311eea2a88d5e2 v23.2.0 -e10c848a82ffb925741c65dd8a8fc8b50b3c3e14 v23.2.1 -a011298221c3d47aa539ae4c119c51861caf6438 v23.2.1 -8d37b17a93ec3e5fff9e040fc3f14ab7b7b24b2c v24.0.0 -130a58f9503fe07ca8c7a34675b7d3a976f163d7 v24.0.1 -7996c56bf6a2f81427b2f91eb11e64d690353493 v24.0.2 -d425bd1ee620772fe90e0dd2a7530b0d6a642601 v24.0.3 -a7d2f79f0996d881794af0f87595032098202811 v24.1.0 -d29075e7f8797891e8c59fb58c4d8d1b79954b34 v24.1.1 -ed9e7bd8caf95261d528ee3db117611dc42814eb v24.2.0 -5b577d179a7e2f3020712c376c0200901e5c93c1 v24.2.1 -83ca05973c16102145b339aec7e170d94966a2ba v24.3.0 -e14229dd2abc034530447d64ed87fddb944347bd v24.3.1 -58e92028ab0061f1f80d98e769c9143305275242 v25.0.0 -0591bce16c7f94191cea925929cc8b0ce6baca09 v25.0.1 -dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 -dc92db3e29a4d1ac57d383091e6cf734d04ed54b v25.0.2 -91eeaf2f33db99d8f78f8261931a1aea8fe8d952 v25.0.2 -529a76a860c50d3cc262759b5b9ce28f171236f9 v25.1.0 -392ee093902e14a1d2a6eefc389a7b9ac78b3f9e v25.1.1 -1cbb29c235439331a76c7b6b5cf8701f763478d3 v25.1.2 -c350190e7bbf274e6728f14af7451b1fd3aaeba2 v25.1.2 -86e668badaf45315bb8506ac2312665d129a0322 v25.1.3 -6f55250b9c5856557ac669d1f966bba8be9eb1d2 v25.1.4 -76143bb477b50314ab6f4ccc4ced80ee43f0dc94 v25.1.5 -2db4c66aeae47217aaf92099a9875e9e810c9cbb v25.1.6 -2083d7c3fadcf15b3bc07f7532440efbcf8fd18d v25.2.0 -2371456ae99d11187c33deacf1308aded31081d9 v25.3.0 -f713f9faaaa33c0e9a628dc9322ef8d1fbeb8319 v25.4.0 -7cb13a0cd176f39500701b24dbfec603ead5110c v26.0.0 -b299cfc9d7d89070e8eec9751a8be72c8a75506b v26.1.0 -e1d057e23b2fec5991084744c356a6c7e05b219d v26.1.1 From 69061481e345bfd1f1d07795b3541c07e498d2df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 14:13:03 -0500 Subject: [PATCH 6198/8469] Add changelog entry. Ref #719. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index eda524766c..b69ac26c2a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,9 @@ CHANGES ======= +* #719: Suppress decoding errors and instead log a warning + when metadata cannot be decoded. + v25.1.4 ------- From 35ea365b50bd1a64375fdbcce187affab22af3b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 14:17:34 -0500 Subject: [PATCH 6199/8469] Put main logic in the top-level body of the function. --- pkg_resources/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index af986ac316..37bf1482af 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1859,12 +1859,13 @@ def has_metadata(self, name): return name == 'PKG-INFO' and os.path.isfile(self.path) def get_metadata(self, name): - if name == 'PKG-INFO': - with io.open(self.path, encoding='utf-8', errors="replace") as f: - metadata = f.read() - self._warn_on_replacement(metadata) - return metadata - raise KeyError("No metadata except PKG-INFO is available") + if name != 'PKG-INFO': + raise KeyError("No metadata except PKG-INFO is available") + + with io.open(self.path, encoding='utf-8', errors="replace") as f: + metadata = f.read() + self._warn_on_replacement(metadata) + return metadata def _warn_on_replacement(self, metadata): # Python 2.6 and 3.2 compat for: replacement_char = '�' From ae50b560c46773697f0f3894ac34de37fda2fadd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 27 Sep 2016 14:52:00 -0500 Subject: [PATCH 6200/8469] =?UTF-8?q?Bump=20version:=2027.3.1=20=E2=86=92?= =?UTF-8?q?=2028.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 549aff1605..ec0baddc18 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 27.3.1 +current_version = 28.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 96dcbecc11..1be4e11c15 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="27.3.1", + version="28.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 0c6f3d33cd15a4558e437b70b0507f221f00e3eb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 28 Sep 2016 23:13:58 -0700 Subject: [PATCH 6201/8469] build_ext: correctly parse the link_objects user option (closes #1703178) Patch by Valerie Lambert. --- command/build_ext.py | 1 + tests/test_build_ext.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index f03a4e31d8..7c278ef0af 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -166,6 +166,7 @@ def finalize_options(self): self.include_dirs.append(plat_py_include) self.ensure_string_list('libraries') + self.ensure_string_list('link_objects') # Life is easier if we're not forever checking for None, so # simplify these options to empty lists if unset diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 4e397ea4c9..f3df564e37 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -195,6 +195,13 @@ def test_finalize_options(self): cmd.finalize_options() self.assertEqual(cmd.rpath, ['one', 'two']) + # make sure cmd.link_objects is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.link_objects = 'one two,three' + cmd.finalize_options() + self.assertEqual(cmd.link_objects, ['one', 'two', 'three']) + # XXX more tests to perform for win32 # make sure define is turned into 2-tuples From 910aa9da283c16facdc4b150b6aa7d65ec11d94c Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Wed, 28 Sep 2016 09:37:15 +0300 Subject: [PATCH 6202/8469] certifi-2016.9.26 --- CHANGES.rst | 5 +++++ setup.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7c4ff8138c..57dc798579 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v28.0.1 +------- + +* #803: Bump certifi to 2016.9.26. + v28.0.0 ------- diff --git a/setup.py b/setup.py index 1be4e11c15..198112010e 100755 --- a/setup.py +++ b/setup.py @@ -167,11 +167,11 @@ def pypi_link(pkg_filename): """).strip().splitlines(), extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2016.8.31", + "certs": "certifi==2016.9.26", }, dependency_links=[ pypi_link( - 'certifi-2016.8.31.tar.gz#md5=2f22d484a36d38d98be74f9eeb2846ec', + 'certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d', ), pypi_link( 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', From 31360f268321ea2018758a497c17e923a7585610 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sat, 1 Oct 2016 21:15:35 +0700 Subject: [PATCH 6203/8469] Fix misspellings in changelog. --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7c4ff8138c..dd421776c1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -90,7 +90,7 @@ v26.1.1 ------- * Re-release of 26.1.0 with pytest pinned to allow for automated - deployement and thus proper packaging environment variables, + deployment and thus proper packaging environment variables, fixing issues with missing executable launchers. v26.1.0 @@ -120,7 +120,7 @@ v25.4.0 ------- * Add Extension(py_limited_api=True). When set to a truthy value, - that extension gets a filename apropriate for code using Py_LIMITED_API. + that extension gets a filename appropriate for code using Py_LIMITED_API. When used correctly this allows a single compiled extension to work on all future versions of CPython 3. The py_limited_api argument only controls the filename. To be From e6d7c40652743005e70ddec1a3e5c7466e52a313 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Oct 2016 11:59:36 -0400 Subject: [PATCH 6204/8469] Disable nspkg.pth behavior on Python 3.3+. Fixes #805 and fixes pypa/pip#1924. --- CHANGES.rst | 6 ++++++ setuptools/command/install_egg_info.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7c4ff8138c..c536a7bea4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.1.0 +------- + +* #805: Disable ``-nspkg.pth`` behavior on Python 3.3+ where + PEP-420 functionality is adequate. Fixes pip #1924. + v28.0.0 ------- diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 60b615d2b9..7834e1070d 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -82,9 +82,10 @@ def install_namespaces(self): _nspkg_tmpl = ( "import sys, types, os", + "pep420 = sys.version_info > (3, 3)", "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", - "m = not ie and " + "m = not ie and not pep420 and " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From 67487d66104dc9382e6c11a5cb317c0a079672fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Oct 2016 14:36:28 -0400 Subject: [PATCH 6205/8469] =?UTF-8?q?Bump=20version:=2028.0.0=20=E2=86=92?= =?UTF-8?q?=2028.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ec0baddc18..c0e3edba2e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.0.0 +current_version = 28.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 1be4e11c15..b97088d73b 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.0.0", + version="28.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b8032e136b864af0607c781371ee6a8730f67efc Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Sat, 1 Oct 2016 16:15:09 -0500 Subject: [PATCH 6206/8469] Issue #13756: Fix building extensions modules on Cygwin Patch by Roumen Petrov, based on original patch by Jason Tishler. --- command/build_ext.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 74de782d8a..9155626a47 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -715,13 +715,6 @@ def get_libraries(self, ext): return ext.libraries + [pythonlib] else: return ext.libraries - elif sys.platform[:6] == "cygwin": - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - # don't extend ext.libraries, it may be shared with other - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib] elif sys.platform[:6] == "atheos": from distutils import sysconfig From fedef1341c3b5610e75fcd1fbdefa383cafe7565 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Oct 2016 17:31:29 -0400 Subject: [PATCH 6207/8469] =?UTF-8?q?Bump=20version:=2028.0.0=20=E2=86=92?= =?UTF-8?q?=2028.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ec0baddc18..c0e3edba2e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.0.0 +current_version = 28.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 198112010e..6ef0226a4e 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.0.0", + version="28.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From cf469bf239cc6c0d4ebb766c5e2b6c6098e2b28b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Oct 2016 17:40:19 -0400 Subject: [PATCH 6208/8469] Pin to Pytest 3.0.2 as it appears 3.0.3 re-introduces pytest-dev/pytest#1888. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6ef0226a4e..ff6809ed0b 100755 --- a/setup.py +++ b/setup.py @@ -181,7 +181,8 @@ def pypi_link(pkg_filename): tests_require=[ 'setuptools[ssl]', 'pytest-flake8', - 'pytest>=3.0.2', + # pin pytest to 3.0.2 for pytest-dev/pytest#1888 + 'pytest==3.0.2', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ ] + pytest_runner + wheel, From 4893826a79d5155205fb557ab032fc989629db6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Oct 2016 09:22:27 -0500 Subject: [PATCH 6209/8469] =?UTF-8?q?Bump=20version:=2028.1.0=20=E2=86=92?= =?UTF-8?q?=2028.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index c0e3edba2e..4177952cae 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.1.0 +current_version = 28.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index ff6809ed0b..dabfe4fd28 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.1.0", + version="28.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 06e8590eef402ebcb2a179875572549b5fe8d946 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Tue, 4 Oct 2016 20:54:44 +0300 Subject: [PATCH 6210/8469] Issue #28222: Don't fail if pygments is not available We can't just skip the test if docutils is available, but pygments is not because the purpose of the test was testing a bug in _check_rst_data(). --- tests/test_check.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_check.py b/tests/test_check.py index 959fa9085c..3d22868e31 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -7,6 +7,12 @@ from distutils.tests import support from distutils.errors import DistutilsSetupError +try: + import pygments +except ImportError: + pygments = None + + class CheckTestCase(support.LoggingSilencer, support.TempdirManager, unittest.TestCase): @@ -119,9 +125,15 @@ def foo(): pkg_info, dist = self.create_dist(long_description=rest_with_code) cmd = check(dist) cmd.check_restructuredtext() - self.assertEqual(cmd._warnings, 0) msgs = cmd._check_rst_data(rest_with_code) - self.assertEqual(len(msgs), 0) + if pygments is not None: + self.assertEqual(len(msgs), 0) + else: + self.assertEqual(len(msgs), 1) + self.assertEqual( + str(msgs[0][1]), + 'Cannot analyze code. Pygments package not found.' + ) def test_check_all(self): From 2ecc8a4428dbc75bdfd96681283c7235b120f4bd Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 22 Sep 2016 13:44:01 +1000 Subject: [PATCH 6211/8469] Find nested packages with excluded parent `find_packages(exclude=['pkg'])` should still find and include the `pkg.subpkg` package. Fixes #808 --- setuptools/__init__.py | 16 ++++++++++------ setuptools/tests/test_find_packages.py | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 892626e6a6..baec38849e 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -75,13 +75,17 @@ def _find_packages_iter(cls, where, exclude, include): rel_path = os.path.relpath(full_path, where) package = rel_path.replace(os.path.sep, '.') - # Check if the directory is a package and passes the filters - if ('.' not in dir - and include(package) - and not exclude(package) - and cls._looks_like_package(full_path)): + # Skip directory trees that are not valid packages + if ('.' in dir or not cls._looks_like_package(full_path)): + continue + + # Should this package be included? + if include(package) and not exclude(package): yield package - dirs.append(dir) + + # Keep searching subdirectories, as there may be more packages + # down there, even if the parent was excluded. + dirs.append(dir) @staticmethod def _looks_like_package(path): diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 9d31ccd7a2..6dc1b3ac72 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -100,12 +100,12 @@ def test_exclude(self): def test_exclude_recursive(self): """ - Excluding a parent package should exclude all child packages as well. + Excluding a parent package should not exclude child packages as well. """ self._touch('__init__.py', self.pkg_dir) self._touch('__init__.py', self.sub_pkg_dir) packages = find_packages(self.dist_dir, exclude=('pkg',)) - assert packages == [] + assert packages == ['pkg.subpkg'] def test_include_excludes_other(self): """ From 6e61c13148641c695c53434654be7d9f09a04e65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Oct 2016 08:22:01 -0700 Subject: [PATCH 6212/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 13ad781485..983f51c2ac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.2.0 +------- + +* #809: In ``find_packages()``, restore support for excluding + a parent package without excluding a child package. + v28.1.0 ------- From 1e311f519afaf3f5d00538ff64b50bd8c15eef02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Oct 2016 08:23:14 -0700 Subject: [PATCH 6213/8469] =?UTF-8?q?Bump=20version:=2028.2.0=20=E2=86=92?= =?UTF-8?q?=2028.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4177952cae..810b75102e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.2.0 +current_version = 28.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index dabfe4fd28..7e7d181550 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.2.0", + version="28.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 802caebb62fda50adb23250fcf9bf4c559d3ea65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Oct 2016 12:22:55 -0700 Subject: [PATCH 6214/8469] Update changelog to match actual release --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index cec3c3b50c..32ccfcaa1e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,7 +2,7 @@ CHANGES ======= -v28.2.0 +v28.3.0 ------- * #809: In ``find_packages()``, restore support for excluding From 76fd560cde2b43e9afb42f988e0537547ae22afc Mon Sep 17 00:00:00 2001 From: stepshal Date: Sat, 8 Oct 2016 16:56:25 +0700 Subject: [PATCH 6215/8469] Upgrade pyparsing to version 2.1.10 --- pkg_resources/_vendor/pyparsing.py | 85 ++++++++++++++++++------------ pkg_resources/_vendor/vendored.txt | 2 +- 2 files changed, 53 insertions(+), 34 deletions(-) mode change 100755 => 100644 pkg_resources/_vendor/pyparsing.py diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py old mode 100755 new mode 100644 index d602a35af7..a21224359e --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -60,8 +60,8 @@ class names, and the use of '+', '|' and '^' operators. - embedded comments """ -__version__ = "2.1.9" -__versionTime__ = "10 Sep 2016 15:10 UTC" +__version__ = "2.1.10" +__versionTime__ = "07 Oct 2016 01:31 UTC" __author__ = "Paul McGuire " import string @@ -868,7 +868,7 @@ def dump(self, indent='', depth=0, full=True): out.append( indent+_ustr(self.asList()) ) if full: if self.haskeys(): - items = sorted(self.items()) + items = sorted((str(k), v) for k,v in self.items()) for k,v in items: if out: out.append(NL) @@ -879,7 +879,7 @@ def dump(self, indent='', depth=0, full=True): else: out.append(_ustr(v)) else: - out.append(_ustr(v)) + out.append(repr(v)) elif any(isinstance(vv,ParseResults) for vv in self): v = self for i,vv in enumerate(v): @@ -953,7 +953,7 @@ def col (loc,strg): positions within the parsed string. """ s = strg - return 1 if loc Date: Fri, 14 Oct 2016 08:09:25 +0200 Subject: [PATCH 6216/8469] Follow PEP8 for keyword arguments syntax in setup --- docs/setuptools.txt | 89 ++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 0f9556636a..5ce2c7b1ea 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -106,9 +106,9 @@ the distutils. Here's a minimal setup script using setuptools:: from setuptools import setup, find_packages setup( - name = "HelloWorld", - version = "0.1", - packages = find_packages(), + name="HelloWorld", + version="0.1", + packages=find_packages(), ) As you can see, it doesn't take much to use setuptools in a project. @@ -130,16 +130,16 @@ dependencies, and perhaps some data files and scripts:: from setuptools import setup, find_packages setup( - name = "HelloWorld", - version = "0.1", - packages = find_packages(), - scripts = ['say_hello.py'], + name="HelloWorld", + version="0.1", + packages=find_packages(), + scripts=['say_hello.py'], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine - install_requires = ['docutils>=0.3'], + install_requires=['docutils>=0.3'], - package_data = { + package_data={ # If any package contains *.txt or *.rst files, include them: '': ['*.txt', '*.rst'], # And include any *.msg files found in the 'hello' package, too: @@ -147,12 +147,12 @@ dependencies, and perhaps some data files and scripts:: }, # metadata for upload to PyPI - author = "Me", - author_email = "me@example.com", - description = "This is an Example Package", - license = "PSF", - keywords = "hello world example examples", - url = "http://example.com/HelloWorld/", # project home page, if any + author="Me", + author_email="me@example.com", + description="This is an Example Package", + license="PSF", + keywords="hello world example examples", + url="http://example.com/HelloWorld/", # project home page, if any # could also include long_description, download_url, classifiers, etc. ) @@ -431,7 +431,7 @@ the same directory as the setup script. Some projects use a ``src`` or ``lib`` directory as the root of their source tree, and those projects would of course use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir = {'':'src'}`` in their +such projects also need something like ``package_dir={'':'src'}`` in their ``setup()`` arguments, but that's just a normal distutils thing.) Anyway, ``find_packages()`` walks the target directory, filtering by inclusion @@ -522,7 +522,7 @@ as the following:: setup( # other arguments here... - entry_points = { + entry_points={ 'setuptools.installation': [ 'eggsecutable = my_package.some_module:main_func', ] @@ -674,7 +674,7 @@ installed:: setup( ... - dependency_links = [ + dependency_links=[ "http://peak.telecommunity.com/snapshots/" ], ) @@ -699,7 +699,7 @@ For example, let's say that Project A offers optional PDF and reST support:: setup( name="Project-A", ... - extras_require = { + extras_require={ 'PDF': ["ReportLab>=1.2", "RXP"], 'reST': ["docutils>=0.3"], } @@ -721,7 +721,7 @@ declare it like this, so that the "PDF" requirements are only resolved if the setup( name="Project-A", ... - entry_points = { + entry_points={ 'console_scripts': [ 'rst2pdf = project_a.tools.pdfgen [PDF]', 'rst2html = project_a.tools.htmlgen', @@ -736,7 +736,7 @@ might declare the dependency like this:: setup( name="Project-B", - install_requires = ["Project-A[PDF]"], + install_requires=["Project-A[PDF]"], ... ) @@ -759,7 +759,7 @@ setup to this:: setup( name="Project-A", ... - extras_require = { + extras_require={ 'PDF': [], 'reST': ["docutils>=0.3"], } @@ -784,7 +784,7 @@ e.g.:: from setuptools import setup, find_packages setup( ... - include_package_data = True + include_package_data=True ) This tells setuptools to install any data files it finds in your packages. @@ -801,7 +801,7 @@ e.g.:: from setuptools import setup, find_packages setup( ... - package_data = { + package_data={ # If any package contains *.txt or *.rst files, include them: '': ['*.txt', '*.rst'], # And include any *.msg files found in the 'hello' package, too: @@ -828,10 +828,10 @@ The setuptools setup file might look like this:: from setuptools import setup, find_packages setup( ... - packages = find_packages('src'), # include all packages under src - package_dir = {'':'src'}, # tell distutils packages are under src + packages=find_packages('src'), # include all packages under src + package_dir={'':'src'}, # tell distutils packages are under src - package_data = { + package_data={ # If any package contains *.txt files, include them: '': ['*.txt'], # And include any *.dat files found in the 'data' subdirectory @@ -868,13 +868,13 @@ to do things like this:: from setuptools import setup, find_packages setup( ... - packages = find_packages('src'), # include all packages under src - package_dir = {'':'src'}, # tell distutils packages are under src + packages=find_packages('src'), # include all packages under src + package_dir={'':'src'}, # tell distutils packages are under src - include_package_data = True, # include everything in source control + include_package_data=True, # include everything in source control # ...but exclude README.txt from all packages - exclude_package_data = { '': ['README.txt'] }, + exclude_package_data={'': ['README.txt']}, ) The ``exclude_package_data`` option is a dictionary mapping package names to @@ -1035,21 +1035,21 @@ for our hypothetical blogging tool:: setup( # ... - entry_points = {'blogtool.parsers': '.rst = some_module:SomeClass'} + entry_points={'blogtool.parsers': '.rst = some_module:SomeClass'} ) setup( # ... - entry_points = {'blogtool.parsers': ['.rst = some_module:a_func']} + entry_points={'blogtool.parsers': ['.rst = some_module:a_func']} ) setup( # ... - entry_points = """ + entry_points=""" [blogtool.parsers] .rst = some.nested.module:SomeClass.some_classmethod [reST] """, - extras_require = dict(reST = "Docutils>=0.3.5") + extras_require=dict(reST="Docutils>=0.3.5") ) The ``entry_points`` argument to ``setup()`` accepts either a string with @@ -1343,7 +1343,7 @@ participates in. For example, the ZopeInterface project might do this:: setup( # ... - namespace_packages = ['zope'] + namespace_packages=['zope'] ) because it contains a ``zope.interface`` package that lives in the ``zope`` @@ -1599,7 +1599,7 @@ to specify your ``install_requires`` (or other requirements) to include .. code-block:: python - install_requires = ["OtherProject>=0.2a1.dev-r143,==dev"] + install_requires=["OtherProject>=0.2a1.dev-r143,==dev"] The above example says, "I really want at least this particular development revision number, but feel free to follow and use an ``#egg=OtherProject-dev`` @@ -2303,7 +2303,7 @@ available: setup( # ... - test_suite = "my_package.tests.test_all" + test_suite="my_package.tests.test_all" ) If you did not set a ``test_suite`` in your ``setup()`` call, and do not @@ -2427,7 +2427,7 @@ project's setup script:: setup( # ... - entry_points = { + entry_points={ "distutils.commands": [ "foo = mypackage.some_module:foo", ], @@ -2459,7 +2459,7 @@ distutils extension project's setup script:: setup( # ... - entry_points = { + entry_points={ "distutils.commands": [ "foo = mypackage.some_module:foo", ], @@ -2521,7 +2521,7 @@ project that uses the argument:: setup( # ... - entry_points = { + entry_points={ "distutils.setup_keywords": [ "foo_bar = setuptools.dist:assert_string_list", ], @@ -2540,7 +2540,7 @@ a file. Here's what the writer utility looks like:: argname = os.path.splitext(basename)[0] value = getattr(cmd.distribution, argname, None) if value is not None: - value = '\n'.join(value)+'\n' + value = '\n'.join(value) + '\n' cmd.write_or_delete_file(argname, filename, value) As you can see, ``egg_info.writers`` entry points must be a function taking @@ -2582,9 +2582,9 @@ called "foobar", you would write a function something like this: And you would register it in a setup script using something like this:: - entry_points = { + entry_points={ "setuptools.file_finders": [ - "foobar = my_foobar_module:find_files_for_foobar" + "foobar = my_foobar_module:find_files_for_foobar", ] } @@ -2664,4 +2664,3 @@ set of steps to reproduce. .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ .. _setuptools bug tracker: https://github.com/pypa/setuptools/ - From edeee301585be35f764b27ea2a77d54e5b8aedfd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 13:56:43 -0400 Subject: [PATCH 6217/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 32ccfcaa1e..49b1c34b2c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.4.0 +------- + +* #732: Now extras with a hyphen are honored per PEP 426. +* #811: Update to pyparsing 2.1.10. + v28.3.0 ------- From 45112961a7fa764f5a26663563da5ff84abb4dc1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:06:28 -0400 Subject: [PATCH 6218/8469] Remove wildcard imports from distutils.command.sdist --- command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 4fd1d4715d..690bd66f2c 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -4,17 +4,17 @@ import os import sys -from types import * from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile -from distutils.errors import * from distutils.filelist import FileList from distutils import log from distutils.util import convert_path +from distutils.errors import DistutilsTemplateError, DistutilsOptionError + def show_formats(): """Print all possible values for the 'formats' option (used by From dcbe64d83ff6c6f60e0fc5756f91c966da930b84 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:08:28 -0400 Subject: [PATCH 6219/8469] Remove unused import and reorganize imports of modules. --- command/sdist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 690bd66f2c..c13dbbf895 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -8,7 +8,9 @@ from warnings import warn from distutils.core import Command -from distutils import dir_util, dep_util, file_util, archive_util +from distutils import dir_util +from distutils import file_util +from distutils import archive_util from distutils.text_file import TextFile from distutils.filelist import FileList from distutils import log From 03f46fcf082aa89ab4dbb516d333918429f6e4e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:10:07 -0400 Subject: [PATCH 6220/8469] Replace trailing comments with block-level comments --- command/sdist.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index c13dbbf895..28cd0d9ef1 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -261,11 +261,13 @@ def add_defaults(self): # getting distribution.data_files if self.distribution.has_data_files(): for item in self.distribution.data_files: - if isinstance(item, str): # plain file + if isinstance(item, str): + # plain file item = convert_path(item) if os.path.isfile(item): self.filelist.append(item) - else: # a (dirname, filenames) tuple + else: + # a (dirname, filenames) tuple dirname, filenames = item for f in filenames: f = convert_path(f) From e50f854c4a6d2641aaad5421268fb6f717984e21 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:13:51 -0400 Subject: [PATCH 6221/8469] Rely on degenerate behavior in list.extend, as found in distutils. --- setuptools/command/sdist.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 1d4f5d5489..52c5805547 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -150,9 +150,8 @@ def add_defaults(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = list(filter(cs_path_exists, glob(pattern))) - if files: - self.filelist.extend(files) + files = filter(cs_path_exists, glob(pattern)) + self.filelist.extend(files) # getting python files if self.distribution.has_pure_modules(): From a0fe4c8e9be2a490db4bcbaf3ffe634623ea31cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:14:42 -0400 Subject: [PATCH 6222/8469] Always use iterator-based filter --- setuptools/command/sdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 52c5805547..546c96d15e 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -7,6 +7,7 @@ import contextlib from setuptools.extern import six +from setuptools.extern.six.moves import filter from setuptools.utils import cs_path_exists From c6f609397210c4fab5163aaa8eddf16dc0bee370 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:44:11 -0400 Subject: [PATCH 6223/8469] Get names for README files from class attribute, allowing subclass to override. --- command/sdist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 28cd0d9ef1..e5121666b8 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -95,6 +95,8 @@ def checking_metadata(self): sub_commands = [('check', checking_metadata)] + READMES = 'README', 'README.txt' + def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of # the manifest template and manifest file. @@ -218,7 +220,7 @@ def add_defaults(self): Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ - standards = [('README', 'README.txt'), self.distribution.script_name] + standards = [self.READMES, self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): alts = fn From 8ed698da6784b13344a63c9988faa00d281bc6d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:53:32 -0400 Subject: [PATCH 6224/8469] Extract methods from sdist.add_defaults, allowing subclasses to override or inject different behaviors. --- command/sdist.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/command/sdist.py b/command/sdist.py index e5121666b8..c66d82713d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -220,6 +220,15 @@ def add_defaults(self): Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ + self._add_defaults_standards() + self._add_defaults_optional() + self._add_defaults_python() + self._add_defaults_data_files() + self._add_defaults_ext() + self._add_defaults_c_libs() + self._add_defaults_scripts() + + def _add_defaults_standards(self): standards = [self.READMES, self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): @@ -240,11 +249,13 @@ def add_defaults(self): else: self.warn("standard file '%s' not found" % fn) + def _add_defaults_optional(self): optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) + def _add_defaults_python(self): # build_py is used to get: # - python modules # - files defined in package_data @@ -260,6 +271,7 @@ def add_defaults(self): for filename in filenames: self.filelist.append(os.path.join(src_dir, filename)) + def _add_defaults_data_files(self): # getting distribution.data_files if self.distribution.has_data_files(): for item in self.distribution.data_files: @@ -276,14 +288,17 @@ def add_defaults(self): if os.path.isfile(f): self.filelist.append(f) + def _add_defaults_ext(self): if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') self.filelist.extend(build_ext.get_source_files()) + def _add_defaults_c_libs(self): if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') self.filelist.extend(build_clib.get_source_files()) + def _add_defaults_scripts(self): if self.distribution.has_scripts(): build_scripts = self.get_finalized_command('build_scripts') self.filelist.extend(build_scripts.get_source_files()) From 252ee6f45e0c90a21ec951cb8d024c81ab4e2b73 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 14:55:42 -0400 Subject: [PATCH 6225/8469] Move READMES definition into class attribute. --- setuptools/command/sdist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 546c96d15e..addc6a56bb 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -13,8 +13,6 @@ import pkg_resources -READMES = 'README', 'README.rst', 'README.txt' - _default_revctrl = list @@ -41,6 +39,8 @@ class sdist(orig.sdist): negative_opt = {} + READMES = 'README', 'README.rst', 'README.txt' + def run(self): self.run_command('egg_info') ei_cmd = self.get_finalized_command('egg_info') @@ -128,7 +128,7 @@ def __read_template_hack(self): read_template = __read_template_hack def add_defaults(self): - standards = [READMES, + standards = [self.READMES, self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): @@ -180,13 +180,13 @@ def add_defaults(self): self.filelist.extend(build_scripts.get_source_files()) def check_readme(self): - for f in READMES: + for f in self.READMES: if os.path.exists(f): return else: self.warn( "standard file not found: should have one of " + - ', '.join(READMES) + ', '.join(self.READMES) ) def make_release_tree(self, base_dir, files): From 57b4b8456508a65861aaf46e8a17c2d7361daed7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:11:24 -0400 Subject: [PATCH 6226/8469] Adding setuptools.command.py36compat module with functionality copied from distutils.command.sdist in 6d5603e41569 --- setuptools/command/py36compat.py | 114 +++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 setuptools/command/py36compat.py diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py new file mode 100644 index 0000000000..d92b9d487d --- /dev/null +++ b/setuptools/command/py36compat.py @@ -0,0 +1,114 @@ +import os +from glob import glob +from distutils.util import convert_path +from distutils.command import sdist + + +class sdist_add_defaults: + """ + Mix-in providing forward-compatibility for functionality as found in + distutils on Python 3.7. + """ + + def add_defaults(self): + """Add all the default files to self.filelist: + - README or README.txt + - setup.py + - test/test*.py + - all pure Python modules mentioned in setup script + - all files pointed by package_data (build_py) + - all files defined in data_files. + - all files defined as scripts. + - all C sources listed as part of extensions or C libraries + in the setup script (doesn't catch C headers!) + Warns if (README or README.txt) or setup.py are missing; everything + else is optional. + """ + self._add_defaults_standards() + self._add_defaults_optional() + self._add_defaults_python() + self._add_defaults_data_files() + self._add_defaults_ext() + self._add_defaults_c_libs() + self._add_defaults_scripts() + + def _add_defaults_standards(self): + standards = [self.READMES, self.distribution.script_name] + for fn in standards: + if isinstance(fn, tuple): + alts = fn + got_it = False + for fn in alts: + if os.path.exists(fn): + got_it = True + self.filelist.append(fn) + break + + if not got_it: + self.warn("standard file not found: should have one of " + + ', '.join(alts)) + else: + if os.path.exists(fn): + self.filelist.append(fn) + else: + self.warn("standard file '%s' not found" % fn) + + def _add_defaults_optional(self): + optional = ['test/test*.py', 'setup.cfg'] + for pattern in optional: + files = filter(os.path.isfile, glob(pattern)) + self.filelist.extend(files) + + def _add_defaults_python(self): + # build_py is used to get: + # - python modules + # - files defined in package_data + build_py = self.get_finalized_command('build_py') + + # getting python files + if self.distribution.has_pure_modules(): + self.filelist.extend(build_py.get_source_files()) + + # getting package_data files + # (computed in build_py.data_files by build_py.finalize_options) + for pkg, src_dir, build_dir, filenames in build_py.data_files: + for filename in filenames: + self.filelist.append(os.path.join(src_dir, filename)) + + def _add_defaults_data_files(self): + # getting distribution.data_files + if self.distribution.has_data_files(): + for item in self.distribution.data_files: + if isinstance(item, str): + # plain file + item = convert_path(item) + if os.path.isfile(item): + self.filelist.append(item) + else: + # a (dirname, filenames) tuple + dirname, filenames = item + for f in filenames: + f = convert_path(f) + if os.path.isfile(f): + self.filelist.append(f) + + def _add_defaults_ext(self): + if self.distribution.has_ext_modules(): + build_ext = self.get_finalized_command('build_ext') + self.filelist.extend(build_ext.get_source_files()) + + def _add_defaults_c_libs(self): + if self.distribution.has_c_libraries(): + build_clib = self.get_finalized_command('build_clib') + self.filelist.extend(build_clib.get_source_files()) + + def _add_defaults_scripts(self): + if self.distribution.has_scripts(): + build_scripts = self.get_finalized_command('build_scripts') + self.filelist.extend(build_scripts.get_source_files()) + + +if hasattr(sdist.sdist, '_add_defaults_standards'): + # disable the functionality already available upstream + class sdist_add_defaults: + pass From 3b05fac47289e9835e5bd6f2efb130df59a73ffb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:39:01 -0400 Subject: [PATCH 6227/8469] Add case-sensitive file comparison for detecting/adding standard default files. --- command/sdist.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index c66d82713d..0cc01192f3 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -32,6 +32,24 @@ def show_formats(): FancyGetopt(formats).print_help( "List of available source distribution formats:") + +def cs_path_exists(fspath): + """ + Case-sensitive path existence check + + >>> cs_path_exists(__file__) + True + >>> cs_path_exists(__file__.upper()) + False + """ + if not os.path.exists(fspath): + return False + # make absolute so we always have a directory + abspath = os.path.abspath(fspath) + directory, filename = os.path.split(abspath) + return filename in os.listdir(directory) + + class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -235,7 +253,7 @@ def _add_defaults_standards(self): alts = fn got_it = False for fn in alts: - if os.path.exists(fn): + if cs_path_exists(fn): got_it = True self.filelist.append(fn) break @@ -244,7 +262,7 @@ def _add_defaults_standards(self): self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if os.path.exists(fn): + if cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) From ed0dd7aea6253700672dc87b3abe63b3b52b63e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:41:42 -0400 Subject: [PATCH 6228/8469] Make cs_path_exists a protected, static method --- command/sdist.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/command/sdist.py b/command/sdist.py index 0cc01192f3..180e28626d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -33,23 +33,6 @@ def show_formats(): "List of available source distribution formats:") -def cs_path_exists(fspath): - """ - Case-sensitive path existence check - - >>> cs_path_exists(__file__) - True - >>> cs_path_exists(__file__.upper()) - False - """ - if not os.path.exists(fspath): - return False - # make absolute so we always have a directory - abspath = os.path.abspath(fspath) - directory, filename = os.path.split(abspath) - return filename in os.listdir(directory) - - class sdist(Command): description = "create a source distribution (tarball, zip file, etc.)" @@ -246,6 +229,23 @@ def add_defaults(self): self._add_defaults_c_libs() self._add_defaults_scripts() + @staticmethod + def _cs_path_exists(fspath): + """ + Case-sensitive path existence check + + >>> sdist._cs_path_exists(__file__) + True + >>> sdist._cs_path_exists(__file__.upper()) + False + """ + if not os.path.exists(fspath): + return False + # make absolute so we always have a directory + abspath = os.path.abspath(fspath) + directory, filename = os.path.split(abspath) + return filename in os.listdir(directory) + def _add_defaults_standards(self): standards = [self.READMES, self.distribution.script_name] for fn in standards: @@ -253,7 +253,7 @@ def _add_defaults_standards(self): alts = fn got_it = False for fn in alts: - if cs_path_exists(fn): + if self._cs_path_exists(fn): got_it = True self.filelist.append(fn) break @@ -262,7 +262,7 @@ def _add_defaults_standards(self): self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if cs_path_exists(fn): + if self._cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) From 36bcc35f0cf0d99d20fe9610f4001c513d851cfd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:43:01 -0400 Subject: [PATCH 6229/8469] Update sdist_add_defaults to match CPython db8bb1bd6ac5 --- setuptools/command/py36compat.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index d92b9d487d..883221da9b 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -3,6 +3,8 @@ from distutils.util import convert_path from distutils.command import sdist +from setuptools.extern.six.moves import filter + class sdist_add_defaults: """ @@ -32,6 +34,23 @@ def add_defaults(self): self._add_defaults_c_libs() self._add_defaults_scripts() + @staticmethod + def _cs_path_exists(fspath): + """ + Case-sensitive path existence check + + >>> sdist._cs_path_exists(__file__) + True + >>> sdist._cs_path_exists(__file__.upper()) + False + """ + if not os.path.exists(fspath): + return False + # make absolute so we always have a directory + abspath = os.path.abspath(fspath) + directory, filename = os.path.split(abspath) + return filename in os.listdir(directory) + def _add_defaults_standards(self): standards = [self.READMES, self.distribution.script_name] for fn in standards: @@ -39,7 +58,7 @@ def _add_defaults_standards(self): alts = fn got_it = False for fn in alts: - if os.path.exists(fn): + if self._cs_path_exists(fn): got_it = True self.filelist.append(fn) break @@ -48,7 +67,7 @@ def _add_defaults_standards(self): self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if os.path.exists(fn): + if self._cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) From e704747721609fcb25267041292c14493751b61c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:49:20 -0400 Subject: [PATCH 6230/8469] Update doctest to pass --- setuptools/command/py36compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 883221da9b..def5906ab7 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -39,9 +39,9 @@ def _cs_path_exists(fspath): """ Case-sensitive path existence check - >>> sdist._cs_path_exists(__file__) + >>> sdist_add_defaults._cs_path_exists(__file__) True - >>> sdist._cs_path_exists(__file__.upper()) + >>> sdist_add_defaults._cs_path_exists(__file__.upper()) False """ if not os.path.exists(fspath): From 6b175fcf513fa98f03b4c529cccfa3d256e91e19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:52:50 -0400 Subject: [PATCH 6231/8469] Add note about editing the code --- setuptools/command/py36compat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index def5906ab7..61063e7542 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -10,6 +10,9 @@ class sdist_add_defaults: """ Mix-in providing forward-compatibility for functionality as found in distutils on Python 3.7. + + Do not edit the code in this class except to update functionality + as implemented in distutils. Instead, override in the subclass. """ def add_defaults(self): From 17f89f4ffca731f1ee3d49aad717415013d047d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 15:53:16 -0400 Subject: [PATCH 6232/8469] Update sdist to use sdist_add_defaults forward compatibility. --- setuptools/command/sdist.py | 51 ++++++------------------------------- setuptools/utils.py | 11 -------- 2 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 setuptools/utils.py diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index addc6a56bb..b85d7d03ee 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,4 +1,3 @@ -from glob import glob from distutils import log import distutils.command.sdist as orig import os @@ -7,9 +6,8 @@ import contextlib from setuptools.extern import six -from setuptools.extern.six.moves import filter -from setuptools.utils import cs_path_exists +from .py36compat import sdist_add_defaults import pkg_resources @@ -23,7 +21,7 @@ def walk_revctrl(dirname=''): yield item -class sdist(orig.sdist): +class sdist(sdist_add_defaults, orig.sdist): """Smart sdist that finds anything supported by revision control""" user_options = [ @@ -127,34 +125,8 @@ def __read_template_hack(self): if has_leaky_handle: read_template = __read_template_hack - def add_defaults(self): - standards = [self.READMES, - self.distribution.script_name] - for fn in standards: - if isinstance(fn, tuple): - alts = fn - got_it = 0 - for fn in alts: - if cs_path_exists(fn): - got_it = 1 - self.filelist.append(fn) - break - - if not got_it: - self.warn("standard file not found: should have one of " + - ', '.join(alts)) - else: - if cs_path_exists(fn): - self.filelist.append(fn) - else: - self.warn("standard file '%s' not found" % fn) - - optional = ['test/test*.py', 'setup.cfg'] - for pattern in optional: - files = filter(cs_path_exists, glob(pattern)) - self.filelist.extend(files) - - # getting python files + def _add_defaults_python(self): + """getting python files""" if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) @@ -167,17 +139,10 @@ def add_defaults(self): self.filelist.extend([os.path.join(src_dir, filename) for filename in filenames]) - if self.distribution.has_ext_modules(): - build_ext = self.get_finalized_command('build_ext') - self.filelist.extend(build_ext.get_source_files()) - - if self.distribution.has_c_libraries(): - build_clib = self.get_finalized_command('build_clib') - self.filelist.extend(build_clib.get_source_files()) - - if self.distribution.has_scripts(): - build_scripts = self.get_finalized_command('build_scripts') - self.filelist.extend(build_scripts.get_source_files()) + def _add_defaults_data_files(self): + """ + Don't add any data files, but why? + """ def check_readme(self): for f in self.READMES: diff --git a/setuptools/utils.py b/setuptools/utils.py deleted file mode 100644 index 080b9a8e23..0000000000 --- a/setuptools/utils.py +++ /dev/null @@ -1,11 +0,0 @@ -import os -import os.path - - -def cs_path_exists(fspath): - if not os.path.exists(fspath): - return False - # make absolute so we always have a directory - abspath = os.path.abspath(fspath) - directory, filename = os.path.split(abspath) - return filename in os.listdir(directory) From f1cf491f360110af0b580758418c1a8ae7ae658b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 16:00:00 -0400 Subject: [PATCH 6233/8469] Update changelog --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 49b1c34b2c..69f966d73b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,10 @@ v28.4.0 * #732: Now extras with a hyphen are honored per PEP 426. * #811: Update to pyparsing 2.1.10. +* Updated ``setuptools.command.sdist`` to re-use most of + the functionality directly from ``distutils.command.sdist`` + for the ``add_defaults`` method with strategic overrides. + See #750 for rationale. v28.3.0 ------- From a3104077dddc72c3b34ba83c46edded1ebd99d3c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 16:13:40 -0400 Subject: [PATCH 6234/8469] Update changelog. Ref #762. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 69f966d73b..5521c72fc1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ v28.4.0 the functionality directly from ``distutils.command.sdist`` for the ``add_defaults`` method with strategic overrides. See #750 for rationale. +* #760 via #762: Look for certificate bundle where SUSE + Linux typically presents it. Use ``certifi.where()`` to locate + the bundle. v28.3.0 ------- From 7edbffcc92c89b96f37e9e007e0f7f9490c49232 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 16:43:02 -0400 Subject: [PATCH 6235/8469] =?UTF-8?q?Bump=20version:=2028.3.0=20=E2=86=92?= =?UTF-8?q?=2028.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 810b75102e..95879c2135 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.3.0 +current_version = 28.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index 7e7d181550..c3b556d5c3 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.3.0", + version="28.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8810250b5ad5df929b0d4db37d676e6f494cbda5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 18:56:12 -0400 Subject: [PATCH 6236/8469] Run tests with tox --- .travis.yml | 4 ++-- docs/developer-guide.txt | 8 +++----- setup.py | 10 +--------- tox.ini | 8 ++++---- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8bca7cc7f..45be20a18d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,13 @@ script: # avoid VersionConflict when newer version is required - pip install -U 'pytest>=3.0.2' - # Output the env, because the travis docs just can't be trusted + # Output the env, to verify behavior - env # update egg_info based on setup.py in checkout - python bootstrap.py - - python setup.py test --addopts='-rsx' + - python -m tox before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 70e7f1cd0a..c8f51b0208 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -89,12 +89,10 @@ For posterity, the old `Bitbucket mirror Testing ------- -The primary tests are run using py.test. To run the tests:: +The primary tests are run using tox. To run the tests, first make +sure you have tox installed, then invoke it:: - $ python setup.py test - -Or install py.test into your environment and run ``PYTHONPATH=. py.test`` -or ``python -m pytest``. + $ tox Under continuous integration, additional tests may be run. See the ``.travis.yml`` file for full details on the tests run under Travis-CI. diff --git a/setup.py b/setup.py index c3b556d5c3..2948e5152f 100755 --- a/setup.py +++ b/setup.py @@ -69,8 +69,6 @@ def _gen_console_scripts(): package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) -needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) -pytest_runner = ['pytest-runner'] if needs_pytest else [] needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] @@ -178,14 +176,8 @@ def pypi_link(pkg_filename): ), ], scripts=[], - tests_require=[ - 'setuptools[ssl]', - 'pytest-flake8', - # pin pytest to 3.0.2 for pytest-dev/pytest#1888 - 'pytest==3.0.2', - ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ - ] + pytest_runner + wheel, + ] + wheel, ) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 806e6ed26f..770fbd8608 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ -[tox] -envlist = py26,py27,py33,py34,py35,pypy,pypy3 - [testenv] deps= pytest-flake8 pytest>=3.0.2 + setuptools[ssl] + py{26,27,32}: mock + passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir -commands=python setup.py test --addopts='-rsx' +commands=python -m pytest -rsx From 839c5f11bf01d66d5dde6efdf0874b7773aa0161 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 20:02:14 -0400 Subject: [PATCH 6237/8469] Install tox and not pytest. tox will install pytest. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45be20a18d..76fd04b994 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,7 @@ env: - "" - LC_ALL=C LC_CTYPE=C script: - # avoid VersionConflict when newer version is required - - pip install -U 'pytest>=3.0.2' + - pip install tox # Output the env, to verify behavior - env From bb45468d27615c2ce9f9c9757a367c44d6ee80d2 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Tue, 16 Aug 2016 16:40:10 +1000 Subject: [PATCH 6238/8469] Much faster implementation of FileList, for big egg_info speedups --- setuptools/command/egg_info.py | 262 ++++++++++++++++++++++++++---- setuptools/glob.py | 165 +++++++++++++++++++ setuptools/tests/test_manifest.py | 68 ++++++-- 3 files changed, 451 insertions(+), 44 deletions(-) create mode 100644 setuptools/glob.py diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5183eedc8e..6cc8f4c45e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -3,6 +3,7 @@ Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList +from distutils.errors import DistutilsInternalError from distutils.util import convert_path from distutils import log import distutils.errors @@ -27,6 +28,7 @@ parse_requirements, safe_name, parse_version, safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename) import setuptools.unicode_utils as unicode_utils +from setuptools.glob import glob from pkg_resources.extern import packaging @@ -36,6 +38,88 @@ pass +def translate_pattern(glob): + """ + Translate a file path glob like '*.txt' in to a regular expression. + This differs from fnmatch.translate which allows wildcards to match + directory separators. It also knows about '**/' which matches any number of + directories. + """ + pat = '' + + # This will split on '/' within [character classes]. This is deliberate. + chunks = glob.split(os.path.sep) + + sep = re.escape(os.sep) + valid_char = '[^%s]' % (sep,) + + for c, chunk in enumerate(chunks): + last_chunk = c == len(chunks) - 1 + + # Chunks that are a literal ** are globstars. They match anything. + if chunk == '**': + if last_chunk: + # Match anything if this is the last component + pat += '.*' + else: + # Match '(name/)*' + pat += '(?:%s+%s)*' % (valid_char, sep) + continue # Break here as the whole path component has been handled + + # Find any special characters in the remainder + i = 0 + chunk_len = len(chunk) + while i < chunk_len: + char = chunk[i] + if char == '*': + # Match any number of name characters + pat += valid_char + '*' + elif char == '?': + # Match a name character + pat += valid_char + elif char == '[': + # Character class + inner_i = i + 1 + # Skip initial !/] chars + if inner_i < chunk_len and chunk[inner_i] == '!': + inner_i = inner_i + 1 + if inner_i < chunk_len and chunk[inner_i] == ']': + inner_i = inner_i + 1 + + # Loop till the closing ] is found + while inner_i < chunk_len and chunk[inner_i] != ']': + inner_i = inner_i + 1 + + if inner_i >= chunk_len: + # Got to the end of the string without finding a closing ] + # Do not treat this as a matching group, but as a literal [ + pat += re.escape(char) + else: + # Grab the insides of the [brackets] + inner = chunk[i + 1:inner_i] + char_class = '' + + # Class negation + if inner[0] == '!': + char_class = '^' + inner = inner[1:] + + char_class += re.escape(inner) + pat += '[%s]' % (char_class,) + + # Skip to the end ] + i = inner_i + else: + pat += re.escape(char) + i += 1 + + # Join each chunk with the dir separator + if not last_chunk: + pat += sep + + return re.compile(pat + r'\Z(?ms)') + + class egg_info(Command): description = "create a distribution's .egg-info directory" @@ -239,7 +323,151 @@ def check_broken_egg_info(self): class FileList(_FileList): - """File list that accepts only existing, platform-independent paths""" + # Implementations of the various MANIFEST.in commands + + def process_template_line(self, line): + # Parse the line: split it up, make sure the right number of words + # is there, and return the relevant words. 'action' is always + # defined: it's the first word of the line. Which of the other + # three are defined depends on the action; it'll be either + # patterns, (dir and patterns), or (dir_pattern). + (action, patterns, dir, dir_pattern) = self._parse_template_line(line) + + # OK, now we know that the action is valid and we have the + # right number of words on the line for that action -- so we + # can proceed with minimal error-checking. + if action == 'include': + self.debug_print("include " + ' '.join(patterns)) + for pattern in patterns: + if not self.include(pattern): + log.warn("warning: no files found matching '%s'", pattern) + + elif action == 'exclude': + self.debug_print("exclude " + ' '.join(patterns)) + for pattern in patterns: + if not self.exclude(pattern): + log.warn(("warning: no previously-included files " + "found matching '%s'"), pattern) + + elif action == 'global-include': + self.debug_print("global-include " + ' '.join(patterns)) + for pattern in patterns: + if not self.global_include(pattern): + log.warn(("warning: no files found matching '%s' " + "anywhere in distribution"), pattern) + + elif action == 'global-exclude': + self.debug_print("global-exclude " + ' '.join(patterns)) + for pattern in patterns: + if not self.global_exclude(pattern): + log.warn(("warning: no previously-included files matching " + "'%s' found anywhere in distribution"), + pattern) + + elif action == 'recursive-include': + self.debug_print("recursive-include %s %s" % + (dir, ' '.join(patterns))) + for pattern in patterns: + if not self.recursive_include(dir, pattern): + log.warn(("warning: no files found matching '%s' " + "under directory '%s'"), + pattern, dir) + + elif action == 'recursive-exclude': + self.debug_print("recursive-exclude %s %s" % + (dir, ' '.join(patterns))) + for pattern in patterns: + if not self.recursive_exclude(dir, pattern): + log.warn(("warning: no previously-included files matching " + "'%s' found under directory '%s'"), + pattern, dir) + + elif action == 'graft': + self.debug_print("graft " + dir_pattern) + if not self.graft(dir_pattern): + log.warn("warning: no directories found matching '%s'", + dir_pattern) + + elif action == 'prune': + self.debug_print("prune " + dir_pattern) + if not self.prune(dir_pattern): + log.warn(("no previously-included directories found " + "matching '%s'"), dir_pattern) + + else: + raise DistutilsInternalError( + "this cannot happen: invalid action '%s'" % action) + + def _remove_files(self, predicate): + """ + Remove all files from the file list that match the predicate. + Return True if any matching files were removed + """ + found = False + for i in range(len(self.files) - 1, -1, -1): + if predicate(self.files[i]): + self.debug_print(" removing " + self.files[i]) + del self.files[i] + found = True + return found + + def include(self, pattern): + """Include files that match 'pattern'.""" + found = [f for f in glob(pattern) if not os.path.isdir(f)] + self.extend(found) + return bool(found) + + def exclude(self, pattern): + """Exclude files that match 'pattern'.""" + match = translate_pattern(pattern) + return self._remove_files(match.match) + + def recursive_include(self, dir, pattern): + """ + Include all files anywhere in 'dir/' that match the pattern. + """ + full_pattern = os.path.join(dir, '**', pattern) + found = [f for f in glob(full_pattern, recursive=True) + if not os.path.isdir(f)] + self.extend(found) + return bool(found) + + def recursive_exclude(self, dir, pattern): + """ + Exclude any file anywhere in 'dir/' that match the pattern. + """ + match = translate_pattern(os.path.join(dir, '**', pattern)) + return self._remove_files(match.match) + + def graft(self, dir): + """Include all files from 'dir/'.""" + found = distutils.filelist.findall(dir) + self.extend(found) + return bool(found) + + def prune(self, dir): + """Filter out files from 'dir/'.""" + match = translate_pattern(os.path.join(dir, '**')) + return self._remove_files(match.match) + + def global_include(self, pattern): + """ + Include all files anywhere in the current directory that match the + pattern. This is very inefficient on large file trees. + """ + if self.allfiles is None: + self.findall() + match = translate_pattern(os.path.join('**', pattern)) + found = [f for f in self.allfiles if match.match(f)] + self.extend(found) + return bool(found) + + def global_exclude(self, pattern): + """ + Exclude all files anywhere that match the pattern. + """ + match = translate_pattern(os.path.join('**', pattern)) + return self._remove_files(match.match) def append(self, item): if item.endswith('\r'): # Fix older sdists built on Windows @@ -302,7 +530,6 @@ def run(self): self.filelist = FileList() if not os.path.exists(self.manifest): self.write_manifest() # it must exist so it'll get in the list - self.filelist.findall() self.add_defaults() if os.path.exists(self.template): self.read_template() @@ -341,38 +568,13 @@ def add_defaults(self): elif os.path.exists(self.manifest): self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') - self._add_egg_info(cmd=ei_cmd) - self.filelist.include_pattern("*", prefix=ei_cmd.egg_info) - - def _add_egg_info(self, cmd): - """ - Add paths for egg-info files for an external egg-base. - - The egg-info files are written to egg-base. If egg-base is - outside the current working directory, this method - searchs the egg-base directory for files to include - in the manifest. Uses distutils.filelist.findall (which is - really the version monkeypatched in by setuptools/__init__.py) - to perform the search. - - Since findall records relative paths, prefix the returned - paths with cmd.egg_base, so add_default's include_pattern call - (which is looking for the absolute cmd.egg_info) will match - them. - """ - if cmd.egg_base == os.curdir: - # egg-info files were already added by something else - return - - discovered = distutils.filelist.findall(cmd.egg_base) - resolved = (os.path.join(cmd.egg_base, path) for path in discovered) - self.filelist.allfiles.extend(resolved) + self.filelist.graft(ei_cmd.egg_info) def prune_file_list(self): build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() - self.filelist.exclude_pattern(None, prefix=build.build_base) - self.filelist.exclude_pattern(None, prefix=base_dir) + self.filelist.prune(build.build_base) + self.filelist.prune(base_dir) sep = re.escape(os.sep) self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep, is_regex=1) diff --git a/setuptools/glob.py b/setuptools/glob.py new file mode 100644 index 0000000000..f51b9c8363 --- /dev/null +++ b/setuptools/glob.py @@ -0,0 +1,165 @@ +""" +Filename globbing utility. Mostly a copy of `glob` from Python 3.5. + +Changes include: + * `yield from` and PEP3102 `*` removed. + * `bytes` changed to `six.binary_type`. + * Hidden files are not ignored. +""" + +import os +import re +import fnmatch +from setuptools.extern.six import binary_type + +__all__ = ["glob", "iglob", "escape"] + +def glob(pathname, recursive=False): + """Return a list of paths matching a pathname pattern. + + The pattern may contain simple shell-style wildcards a la + fnmatch. However, unlike fnmatch, filenames starting with a + dot are special cases that are not matched by '*' and '?' + patterns. + + If recursive is true, the pattern '**' will match any files and + zero or more directories and subdirectories. + """ + return list(iglob(pathname, recursive=recursive)) + +def iglob(pathname, recursive=False): + """Return an iterator which yields the paths matching a pathname pattern. + + The pattern may contain simple shell-style wildcards a la + fnmatch. However, unlike fnmatch, filenames starting with a + dot are special cases that are not matched by '*' and '?' + patterns. + + If recursive is true, the pattern '**' will match any files and + zero or more directories and subdirectories. + """ + it = _iglob(pathname, recursive) + if recursive and _isrecursive(pathname): + s = next(it) # skip empty string + assert not s + return it + +def _iglob(pathname, recursive): + dirname, basename = os.path.split(pathname) + if not has_magic(pathname): + if basename: + if os.path.lexists(pathname): + yield pathname + else: + # Patterns ending with a slash should match only directories + if os.path.isdir(dirname): + yield pathname + return + if not dirname: + if recursive and _isrecursive(basename): + for x in glob2(dirname, basename): + yield x + else: + for x in glob1(dirname, basename): + yield x + return + # `os.path.split()` returns the argument itself as a dirname if it is a + # drive or UNC path. Prevent an infinite recursion if a drive or UNC path + # contains magic characters (i.e. r'\\?\C:'). + if dirname != pathname and has_magic(dirname): + dirs = _iglob(dirname, recursive) + else: + dirs = [dirname] + if has_magic(basename): + if recursive and _isrecursive(basename): + glob_in_dir = glob2 + else: + glob_in_dir = glob1 + else: + glob_in_dir = glob0 + for dirname in dirs: + for name in glob_in_dir(dirname, basename): + yield os.path.join(dirname, name) + +# These 2 helper functions non-recursively glob inside a literal directory. +# They return a list of basenames. `glob1` accepts a pattern while `glob0` +# takes a literal basename (so it only has to check for its existence). + +def glob1(dirname, pattern): + if not dirname: + if isinstance(pattern, binary_type): + dirname = os.curdir.encode('ASCII') + else: + dirname = os.curdir + try: + names = os.listdir(dirname) + except OSError: + return [] + return fnmatch.filter(names, pattern) + +def glob0(dirname, basename): + if not basename: + # `os.path.split()` returns an empty basename for paths ending with a + # directory separator. 'q*x/' should match only directories. + if os.path.isdir(dirname): + return [basename] + else: + if os.path.lexists(os.path.join(dirname, basename)): + return [basename] + return [] + +# This helper function recursively yields relative pathnames inside a literal +# directory. + +def glob2(dirname, pattern): + assert _isrecursive(pattern) + yield pattern[:0] + for x in _rlistdir(dirname): + yield x + + +# Recursively yields relative pathnames inside a literal directory. +def _rlistdir(dirname): + if not dirname: + if isinstance(dirname, binary_type): + dirname = binary_type(os.curdir, 'ASCII') + else: + dirname = os.curdir + try: + names = os.listdir(dirname) + except os.error: + return + for x in names: + yield x + path = os.path.join(dirname, x) if dirname else x + for y in _rlistdir(path): + yield os.path.join(x, y) + + +magic_check = re.compile('([*?[])') +magic_check_bytes = re.compile(b'([*?[])') + +def has_magic(s): + if isinstance(s, binary_type): + match = magic_check_bytes.search(s) + else: + match = magic_check.search(s) + return match is not None + +def _isrecursive(pattern): + if isinstance(pattern, binary_type): + return pattern == b'**' + else: + return pattern == '**' + +def escape(pathname): + """Escape all special characters. + """ + # Escaping is done by wrapping any of "*?[" between square brackets. + # Metacharacters do not work in the drive part and shouldn't be escaped. + drive, pathname = os.path.splitdrive(pathname) + if isinstance(pathname, binary_type): + pathname = magic_check_bytes.sub(br'[\1]', pathname) + else: + pathname = magic_check.sub(r'[\1]', pathname) + return drive + pathname diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 6360270d5b..558de2c775 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -9,7 +9,7 @@ from distutils import log from distutils.errors import DistutilsTemplateError -from setuptools.command.egg_info import FileList, egg_info +from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution from setuptools.extern import six from setuptools.tests.textwrap import DALS @@ -66,6 +66,34 @@ def touch(filename): ])) +def get_pattern(glob): + return translate_pattern(make_local_path(glob)).pattern + + +def test_translated_pattern_test(): + l = make_local_path + assert get_pattern('foo') == r'foo\Z(?ms)' + assert get_pattern(l('foo/bar')) == l(r'foo\/bar\Z(?ms)') + + # Glob matching + assert get_pattern('*.txt') == l(r'[^\/]*\.txt\Z(?ms)') + assert get_pattern('dir/*.txt') == l(r'dir\/[^\/]*\.txt\Z(?ms)') + assert get_pattern('*/*.py') == l(r'[^\/]*\/[^\/]*\.py\Z(?ms)') + assert get_pattern('docs/page-?.txt') \ + == l(r'docs\/page\-[^\/]\.txt\Z(?ms)') + + # Globstars change what they mean depending upon where they are + assert get_pattern(l('foo/**/bar')) == l(r'foo\/(?:[^\/]+\/)*bar\Z(?ms)') + assert get_pattern(l('foo/**')) == l(r'foo\/.*\Z(?ms)') + assert get_pattern(l('**')) == r'.*\Z(?ms)' + + # Character classes + assert get_pattern('pre[one]post') == r'pre[one]post\Z(?ms)' + assert get_pattern('hello[!one]world') == r'hello[^one]world\Z(?ms)' + assert get_pattern('[]one].txt') == r'[\]one]\.txt\Z(?ms)' + assert get_pattern('foo[!]one]bar') == r'foo[^\]one]bar\Z(?ms)' + + class TempDirTestCase(object): def setup_method(self, method): @@ -346,23 +374,21 @@ def test_exclude_pattern(self): def test_include_pattern(self): # return False if no match file_list = FileList() - file_list.set_allfiles([]) + self.make_files([]) assert not file_list.include_pattern('*.py') # return True if files match file_list = FileList() - file_list.set_allfiles(['a.py', 'b.txt']) + self.make_files(['a.py', 'b.txt']) assert file_list.include_pattern('*.py') # test * matches all files file_list = FileList() - assert file_list.allfiles is None - file_list.set_allfiles(['a.py', 'b.txt']) + self.make_files(['a.py', 'b.txt']) file_list.include_pattern('*') - assert file_list.allfiles == ['a.py', 'b.txt'] + assert file_list.files == ['a.py', 'b.txt'] - def test_process_template(self): - l = make_local_path + def test_process_template_line_invalid(self): # invalid lines file_list = FileList() for action in ('include', 'exclude', 'global-include', @@ -377,9 +403,11 @@ def test_process_template(self): else: assert False, "Should have thrown an error" + def test_include(self): + l = make_local_path # include file_list = FileList() - file_list.set_allfiles(['a.py', 'b.txt', l('d/c.py')]) + self.make_files(['a.py', 'b.txt', l('d/c.py')]) file_list.process_template_line('include *.py') assert file_list.files == ['a.py'] @@ -389,6 +417,8 @@ def test_process_template(self): assert file_list.files == ['a.py'] self.assertWarnings() + def test_exclude(self): + l = make_local_path # exclude file_list = FileList() file_list.files = ['a.py', 'b.txt', l('d/c.py')] @@ -401,9 +431,11 @@ def test_process_template(self): assert file_list.files == ['b.txt', l('d/c.py')] self.assertWarnings() + def test_global_include(self): + l = make_local_path # global-include file_list = FileList() - file_list.set_allfiles(['a.py', 'b.txt', l('d/c.py')]) + self.make_files(['a.py', 'b.txt', l('d/c.py')]) file_list.process_template_line('global-include *.py') assert file_list.files == ['a.py', l('d/c.py')] @@ -413,6 +445,8 @@ def test_process_template(self): assert file_list.files == ['a.py', l('d/c.py')] self.assertWarnings() + def test_global_exclude(self): + l = make_local_path # global-exclude file_list = FileList() file_list.files = ['a.py', 'b.txt', l('d/c.py')] @@ -425,10 +459,11 @@ def test_process_template(self): assert file_list.files == ['b.txt'] self.assertWarnings() + def test_recursive_include(self): + l = make_local_path # recursive-include file_list = FileList() - file_list.set_allfiles(['a.py', l('d/b.py'), l('d/c.txt'), - l('d/d/e.py')]) + self.make_files(['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')]) file_list.process_template_line('recursive-include d *.py') assert file_list.files == [l('d/b.py'), l('d/d/e.py')] @@ -438,6 +473,8 @@ def test_process_template(self): assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertWarnings() + def test_recursive_exclude(self): + l = make_local_path # recursive-exclude file_list = FileList() file_list.files = ['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')] @@ -450,10 +487,11 @@ def test_process_template(self): assert file_list.files == ['a.py', l('d/c.txt')] self.assertWarnings() + def test_graft(self): + l = make_local_path # graft file_list = FileList() - file_list.set_allfiles(['a.py', l('d/b.py'), l('d/d/e.py'), - l('f/f.py')]) + self.make_files(['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')]) file_list.process_template_line('graft d') assert file_list.files == [l('d/b.py'), l('d/d/e.py')] @@ -463,6 +501,8 @@ def test_process_template(self): assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertWarnings() + def test_prune(self): + l = make_local_path # prune file_list = FileList() file_list.files = ['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')] From 96171b18a802fbc566b328000d5b22c8f5ce40e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 20:35:56 -0400 Subject: [PATCH 6239/8469] Just use backports.unittest_mock so that tox can be invoked naturally (without having to specify an env). --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 770fbd8608..3ed74117c0 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ deps= pytest-flake8 pytest>=3.0.2 setuptools[ssl] - py{26,27,32}: mock + backports.unittest_mock passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python -m pytest -rsx From eb4646dd4fa237916330384f1deec6596df37102 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 20:49:59 -0400 Subject: [PATCH 6240/8469] Simply invoke tox for Python 2.6 compatibility --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 76fd04b994..0da450da76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,8 @@ script: # update egg_info based on setup.py in checkout - python bootstrap.py - - python -m tox + #- python -m tox + - tox before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 From f42292cbc6d9448ab4f0e27f7b6f90ed8f1ea8a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 22:14:29 -0400 Subject: [PATCH 6241/8469] Use backports.unittest_mock 1.2 for Python 3.2 and 2.6 compatibility. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3ed74117c0..6305ed2eb6 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ deps= pytest-flake8 pytest>=3.0.2 setuptools[ssl] - backports.unittest_mock + backports.unittest_mock>=1.2 passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python -m pytest -rsx From d644c2076cff008da8a36afbf3a6a0b24c766956 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 22:19:58 -0400 Subject: [PATCH 6242/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5521c72fc1..d69f556319 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v28.5.0 +------- + +* #810: Tests are now invoked with tox and not setup.py test. + v28.4.0 ------- From 07abd732f9a9d40da8ae59a3dfd213bea4f39aff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 22:24:55 -0400 Subject: [PATCH 6243/8469] Install and invoke tox in appveyor --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ebf446bf18..299c35b7c2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,4 +14,5 @@ build: off test_script: - "python bootstrap.py" - - "python setup.py test --addopts='-rsx'" + - "python -m pip install tox" + - "tox" From 3e3d83ad49e7f45cc8d2f343590f774c41069b74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 22:32:26 -0400 Subject: [PATCH 6244/8469] Update changelog. Fixes #249. Fixes #450 --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d69f556319..3482b760d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,8 @@ v28.5.0 ------- * #810: Tests are now invoked with tox and not setup.py test. +* #249 and #450 via #764: Avoid scanning the whole tree + when building the manifest. v28.4.0 ------- From 15d10c3655c441beb50fef522b4959fbab4fc3d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 22:43:35 -0400 Subject: [PATCH 6245/8469] Now running under tox, Python 2.6 gets a non-zero PYTHONHASHSEED, so tests are simpler. --- setuptools/tests/test_egg_info.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index dff2a8c8ec..240385a25c 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -94,10 +94,6 @@ def _validate_content_order(content, expected): Assert that the strings in expected appear in content in order. """ - if sys.version_info < (2, 7): - # On Python 2.6, expect dict key order. - expected = dict.fromkeys(expected).keys() - pattern = '.*'.join(expected) flags = re.MULTILINE | re.DOTALL assert re.search(pattern, content, flags) From 6ef8ff56dfdba9a51ce55b9a6cd8ff922d786ac1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 23:03:21 -0400 Subject: [PATCH 6246/8469] Allow passing posargs --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6305ed2eb6..7e2c804992 100644 --- a/tox.ini +++ b/tox.ini @@ -6,4 +6,4 @@ deps= backports.unittest_mock>=1.2 passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir -commands=python -m pytest -rsx +commands=python -m pytest {posargs:-rsx} From c52797512e98c12a383c41697deda0f563b452a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 23:10:15 -0400 Subject: [PATCH 6247/8469] Just skip these tests on Python 2.6. --- setuptools/tests/test_egg_info.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 240385a25c..4c76782639 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -63,12 +63,18 @@ def env(self): }) yield env + dict_order_fails = pytest.mark.skipif( + sys.version_info < (2,7), + reason="Intermittent failures on Python 2.6", + ) + + @dict_order_fails def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): """ When the egg_info section is empty or not present, running save_version_info should add the settings to the setup.cfg in a deterministic order, consistent with the ordering found - on Python 2.6 and 2.7 with PYTHONHASHSEED=0. + on Python 2.7 with PYTHONHASHSEED=0. """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') dist = Distribution() @@ -98,13 +104,12 @@ def _validate_content_order(content, expected): flags = re.MULTILINE | re.DOTALL assert re.search(pattern, content, flags) + @dict_order_fails def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): """ When running save_version_info on an existing setup.cfg with the 'default' values present from a previous run, - the file should remain unchanged, except on Python 2.6, - where the order of the keys will be changed to match the - order as found in a dictionary of those keys. + the file should remain unchanged. """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') build_files({ From 5af3d094d1d26f06d9e7f3fbf6f1cd55a2e51d8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Oct 2016 23:12:21 -0400 Subject: [PATCH 6248/8469] =?UTF-8?q?Bump=20version:=2028.4.0=20=E2=86=92?= =?UTF-8?q?=2028.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 95879c2135..c2b34b33b3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.4.0 +current_version = 28.5.0 commit = True tag = True diff --git a/setup.py b/setup.py index 2948e5152f..3ae7a09f3c 100755 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.4.0", + version="28.5.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 736017394379b33b7526de38a9a5bbad57fce8e6 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Sat, 15 Oct 2016 23:32:09 +0200 Subject: [PATCH 6249/8469] Add 3.6-dev and nightly to travis configuration --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0da450da76..f39673fda1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,14 @@ python: - 3.3 - 3.4 - 3.5 + - "3.6-dev" + - nightly - pypy - - pypy3 +matrix: + fast_finish: true + allow_failures: + - python: "3.6-dev" + - python: nightly env: - "" - LC_ALL=C LC_CTYPE=C From 1d9870bf54159a0d2b0a70505c740e8e43a7ae6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Oct 2016 19:00:50 -0400 Subject: [PATCH 6250/8469] Restore pypy3 tests. Ref #815. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f39673fda1..e5e5e6f213 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ python: - "3.6-dev" - nightly - pypy + - pypy3 matrix: fast_finish: true allow_failures: From 48317edf59bc1e1067df6d2a22898a083d4f226a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Oct 2016 19:06:00 -0400 Subject: [PATCH 6251/8469] No need to allow failures, as there are no known failures. --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5e5e6f213..006316d16d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,6 @@ python: - nightly - pypy - pypy3 -matrix: - fast_finish: true - allow_failures: - - python: "3.6-dev" - - python: nightly env: - "" - LC_ALL=C LC_CTYPE=C From 772773cd3b61f9773f571a63cd8a73dd8f9049f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Oct 2016 12:35:48 -0400 Subject: [PATCH 6252/8469] Update changelog --- CHANGES.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3482b760d0..bcb507980d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,15 @@ CHANGES ======= +v28.6.0 +------- + +* #629: When scanning for packages, ``pkg_resources`` now + ignores empty egg-info directories and gives precedence to + packages whose versions are lexicographically greatest, + a rough approximation for preferring the latest available + version. + v28.5.0 ------- From 9b92671faddc36f754ec2f67bd25f9e8ae66311b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Oct 2016 12:35:57 -0400 Subject: [PATCH 6253/8469] =?UTF-8?q?Bump=20version:=2028.5.0=20=E2=86=92?= =?UTF-8?q?=2028.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index c2b34b33b3..1cafb9ae7f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.5.0 +current_version = 28.6.0 commit = True tag = True diff --git a/setup.py b/setup.py index 3ae7a09f3c..eb8df62a41 100755 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.5.0", + version="28.6.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From d7523602f9fd7d81b19a6526221875fcb5a258eb Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Tue, 18 Oct 2016 09:51:58 +1100 Subject: [PATCH 6254/8469] Sort manifest file list in tests Different OS's and file systems return lists of files in different orders, not always creation order. This caused intermittent test failures. The file list is now sorted prior to being checked to ensure a consistent order across all systems. Fixes #816 --- setuptools/tests/test_manifest.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 558de2c775..8bcf4f5cbc 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -351,8 +351,8 @@ def test_process_template_line(self): l('global/one.txt'), l('global/two.txt'), ] - file_list.sort() + file_list.sort() assert file_list.files == wanted def test_exclude_pattern(self): @@ -369,6 +369,7 @@ def test_exclude_pattern(self): file_list = FileList() file_list.files = ['a.py', 'a.txt'] file_list.exclude_pattern('*.py') + file_list.sort() assert file_list.files == ['a.txt'] def test_include_pattern(self): @@ -386,6 +387,7 @@ def test_include_pattern(self): file_list = FileList() self.make_files(['a.py', 'b.txt']) file_list.include_pattern('*') + file_list.sort() assert file_list.files == ['a.py', 'b.txt'] def test_process_template_line_invalid(self): @@ -410,10 +412,12 @@ def test_include(self): self.make_files(['a.py', 'b.txt', l('d/c.py')]) file_list.process_template_line('include *.py') + file_list.sort() assert file_list.files == ['a.py'] self.assertNoWarnings() file_list.process_template_line('include *.rb') + file_list.sort() assert file_list.files == ['a.py'] self.assertWarnings() @@ -424,10 +428,12 @@ def test_exclude(self): file_list.files = ['a.py', 'b.txt', l('d/c.py')] file_list.process_template_line('exclude *.py') + file_list.sort() assert file_list.files == ['b.txt', l('d/c.py')] self.assertNoWarnings() file_list.process_template_line('exclude *.rb') + file_list.sort() assert file_list.files == ['b.txt', l('d/c.py')] self.assertWarnings() @@ -438,10 +444,12 @@ def test_global_include(self): self.make_files(['a.py', 'b.txt', l('d/c.py')]) file_list.process_template_line('global-include *.py') + file_list.sort() assert file_list.files == ['a.py', l('d/c.py')] self.assertNoWarnings() file_list.process_template_line('global-include *.rb') + file_list.sort() assert file_list.files == ['a.py', l('d/c.py')] self.assertWarnings() @@ -452,10 +460,12 @@ def test_global_exclude(self): file_list.files = ['a.py', 'b.txt', l('d/c.py')] file_list.process_template_line('global-exclude *.py') + file_list.sort() assert file_list.files == ['b.txt'] self.assertNoWarnings() file_list.process_template_line('global-exclude *.rb') + file_list.sort() assert file_list.files == ['b.txt'] self.assertWarnings() @@ -466,10 +476,12 @@ def test_recursive_include(self): self.make_files(['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')]) file_list.process_template_line('recursive-include d *.py') + file_list.sort() assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertNoWarnings() file_list.process_template_line('recursive-include e *.py') + file_list.sort() assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertWarnings() @@ -480,10 +492,12 @@ def test_recursive_exclude(self): file_list.files = ['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')] file_list.process_template_line('recursive-exclude d *.py') + file_list.sort() assert file_list.files == ['a.py', l('d/c.txt')] self.assertNoWarnings() file_list.process_template_line('recursive-exclude e *.py') + file_list.sort() assert file_list.files == ['a.py', l('d/c.txt')] self.assertWarnings() @@ -494,10 +508,12 @@ def test_graft(self): self.make_files(['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')]) file_list.process_template_line('graft d') + file_list.sort() assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertNoWarnings() file_list.process_template_line('graft e') + file_list.sort() assert file_list.files == [l('d/b.py'), l('d/d/e.py')] self.assertWarnings() @@ -508,9 +524,11 @@ def test_prune(self): file_list.files = ['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')] file_list.process_template_line('prune d') + file_list.sort() assert file_list.files == ['a.py', l('f/f.py')] self.assertNoWarnings() file_list.process_template_line('prune e') + file_list.sort() assert file_list.files == ['a.py', l('f/f.py')] self.assertWarnings() From 31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96 Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 18 Oct 2016 20:24:35 +0700 Subject: [PATCH 6255/8469] Fix quantity of blank lines. --- bootstrap.py | 1 - docs/conf.py | 2 -- pkg_resources/__init__.py | 9 ++------- pkg_resources/tests/test_pkg_resources.py | 5 +---- pkg_resources/tests/test_resources.py | 7 ++----- setup.py | 7 ------- setuptools/__init__.py | 1 - setuptools/archive_util.py | 1 - setuptools/command/__init__.py | 1 - setuptools/command/bdist_egg.py | 2 +- setuptools/command/bdist_wininst.py | 1 - setuptools/command/build_ext.py | 2 -- setuptools/command/easy_install.py | 7 +++---- setuptools/command/sdist.py | 2 ++ setuptools/command/setopt.py | 1 - setuptools/command/test.py | 2 -- setuptools/extension.py | 1 - setuptools/extern/__init__.py | 1 - setuptools/glob.py | 11 +++++++++++ setuptools/lib2to3_ex.py | 2 -- setuptools/monkey.py | 1 - setuptools/msvc.py | 3 +++ setuptools/package_index.py | 7 +++++-- setuptools/py26compat.py | 2 +- setuptools/py27compat.py | 1 + setuptools/py31compat.py | 1 + setuptools/sandbox.py | 6 ++++++ setuptools/ssl_support.py | 5 +++-- setuptools/tests/__init__.py | 4 ---- setuptools/tests/server.py | 1 - setuptools/tests/test_bdist_egg.py | 2 -- setuptools/tests/test_build_ext.py | 1 - setuptools/tests/test_develop.py | 1 - setuptools/tests/test_easy_install.py | 8 -------- setuptools/tests/test_egg_info.py | 1 - setuptools/tests/test_find_packages.py | 1 - setuptools/tests/test_integration.py | 1 + setuptools/tests/test_manifest.py | 4 ---- setuptools/tests/test_packageindex.py | 3 --- setuptools/tests/test_sandbox.py | 6 ++++-- setuptools/tests/test_sdist.py | 5 ----- setuptools/tests/test_test.py | 1 - setuptools/tests/test_upload_docs.py | 2 -- setuptools/tests/test_windows_wrappers.py | 2 -- tests/manual_test.py | 1 + 45 files changed, 48 insertions(+), 88 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index bf7fb431e8..c5f470a4fa 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -10,7 +10,6 @@ import textwrap import subprocess - minimal_egg_info = textwrap.dedent(""" [distutils.commands] egg_info = setuptools.command.egg_info:egg_info diff --git a/docs/conf.py b/docs/conf.py index dc0d8faec7..fae8e63255 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,7 +60,6 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' - # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with @@ -93,7 +92,6 @@ # Output file base name for HTML help builder. htmlhelp_basename = 'Setuptoolsdoc' - # -- Options for LaTeX output -------------------------------------------------- # Grouping the document tree into LaTeX files. List of tuples diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 33b3f56c9d..12226d4bd1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1,5 +1,4 @@ # coding: utf-8 - """ Package resource API -------------------- @@ -74,7 +73,6 @@ __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') - if (3, 0) < sys.version_info < (3, 3): msg = ( "Support for Python 3.0-3.2 has been dropped. Future versions " @@ -96,7 +94,6 @@ class PEP440Warning(RuntimeWarning): class _SetuptoolsVersionMixin(object): - def __hash__(self): return super(_SetuptoolsVersionMixin, self).__hash__() @@ -578,7 +575,6 @@ def get_entry_info(dist, group, name): class IMetadataProvider: - def has_metadata(name): """Does the package's distribution contain the named metadata?""" @@ -2738,7 +2734,6 @@ def extras(self): class EggInfoDistribution(Distribution): - def _reload_version(self): """ Packages installed by distutils (e.g. numpy or scipy), @@ -2825,7 +2820,6 @@ def issue_warning(*args, **kw): class RequirementParseError(ValueError): - def __str__(self): return ' '.join(self.args) @@ -2850,7 +2844,6 @@ def parse_requirements(strs): class Requirement(packaging.requirements.Requirement): - def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" try: @@ -2906,8 +2899,10 @@ def parse(s): def _get_mro(cls): """Get an mro for a type or classic class""" if not isinstance(cls, type): + class cls(cls, object): pass + return cls.__mro__[1:] return cls.__mro__ diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 361fe65767..49bf7a04b8 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -18,7 +18,6 @@ import pkg_resources - try: unicode except NameError: @@ -37,7 +36,6 @@ def timestamp(dt): class EggRemover(unicode): - def __call__(self): if self in sys.path: sys.path.remove(self) @@ -100,7 +98,6 @@ def test_resource_filename_rewrites_on_change(self): class TestResourceManager(object): - def test_get_cache_path(self): mgr = pkg_resources.ResourceManager() path = mgr.get_cache_path('foo') @@ -130,13 +127,13 @@ def test_setuptools_not_imported(self): class TestDeepVersionLookupDistutils(object): - @pytest.fixture def env(self, tmpdir): """ Create a package environment, similar to a virtualenv, in which packages are installed. """ + class Environment(str): pass diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 3b13884b94..00ca74262a 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -36,7 +36,6 @@ def get_metadata_lines(self, name): class TestDistro: - def testCollection(self): # empty path should produce no distributions ad = pkg_resources.Environment([], platform=None, python=None) @@ -313,7 +312,6 @@ def testDistroDependsOptions(self): class TestWorkingSet: - def test_find_conflicting(self): ws = WorkingSet([]) Foo = Distribution.from_filename("/foo_dir/Foo-1.2.egg") @@ -356,7 +354,6 @@ def test_resolve_conflicts_with_prior(self): class TestEntryPoints: - def assertfields(self, ep): assert ep.name == "foo" assert ep.module_name == "pkg_resources.tests.test_resources" @@ -457,7 +454,6 @@ def testParseMap(self): class TestRequirements: - def testBasics(self): r = Requirement.parse("Twisted>=1.2") assert str(r) == "Twisted>=1.2" @@ -538,7 +534,6 @@ def testSetuptoolsProjectName(self): class TestParsing: - def testEmptyParse(self): assert list(parse_requirements('')) == [] @@ -701,6 +696,7 @@ def testVersionBuildout(self): value of parse_version. The new parse_version returns a Version class which needs to support this behavior, at least for now. """ + def buildout(parsed_version): _final_parts = '*final-', '*final' @@ -709,6 +705,7 @@ def _final_version(parsed_version): if (part[:1] == '*') and (part not in _final_parts): return False return True + return _final_version(parsed_version) assert buildout(parse_version("1.0")) diff --git a/setup.py b/setup.py index eb8df62a41..6cb140977b 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,6 @@ import setuptools - here = os.path.dirname(__file__) @@ -97,11 +96,8 @@ def pypi_link(pkg_filename): src_root=None, packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, - py_modules=['easy_install'], - zip_safe=True, - entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() @@ -141,12 +137,9 @@ def pypi_link(pkg_filename): "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], "console_scripts": list(_gen_console_scripts()), - "setuptools.installation": ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, - - classifiers=textwrap.dedent(""" Development Status :: 5 - Production/Stable Intended Audience :: Developers diff --git a/setuptools/__init__.py b/setuptools/__init__.py index baec38849e..54577ceded 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -102,7 +102,6 @@ def _build_filter(*patterns): class PEP420PackageFinder(PackageFinder): - @staticmethod def _looks_like_package(path): return True diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index b6411cc548..cc82b3da36 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -10,7 +10,6 @@ from pkg_resources import ensure_directory, ContextualZipFile - __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", "UnrecognizedFormat", "extraction_drivers", "unpack_directory", diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 3fb2f6dfcb..efbe9411c1 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -10,7 +10,6 @@ from setuptools.command import install_scripts - if 'egg' not in bdist.format_commands: bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") bdist.format_commands.append('egg') diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index cbea7537e2..8cd9dfefe2 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -429,10 +429,10 @@ def can_scan(): log.warn("Please ask the author to include a 'zip_safe'" " setting (either True or False) in the package's setup.py") + # Attribute names of options for commands that might need to be convinced to # install to the egg build directory - INSTALL_DIRECTORY_ATTRS = [ 'install_lib', 'install_dir', 'install_data', 'install_base' ] diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 8243c917ee..073de97b46 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,7 +2,6 @@ class bdist_wininst(orig.bdist_wininst): - def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 454c91fbf0..12dc88cdbf 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -56,7 +56,6 @@ def _customize_compiler_for_shlib(compiler): except ImportError: pass - if_dl = lambda s: s if have_rtld else '' @@ -70,7 +69,6 @@ def get_abi3_suffix(): class build_ext(_build_ext): - def run(self): """Build extensions in build directory, then copy if --inplace""" old_inplace, self.inplace = self.inplace, 0 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a3792ce223..03dd6768d5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1,5 +1,4 @@ #!/usr/bin/env python - """ Easy Install ------------ @@ -64,7 +63,6 @@ # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) - __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', 'main', 'get_exe_prefixes', @@ -92,6 +90,7 @@ def samefile(p1, p2): if six.PY2: + def _to_ascii(s): return s @@ -102,6 +101,7 @@ def isascii(s): except UnicodeError: return False else: + def _to_ascii(s): return s.encode('ascii') @@ -1632,7 +1632,6 @@ def make_relative(self, path): class RewritePthDistributions(PthDistributions): - @classmethod def _wrap_lines(cls, lines): yield cls.prelude @@ -1837,6 +1836,7 @@ def clear_and_remove_cached_zip_archive_directory_data(path, old_entry): _replace_zip_directory_cache_data = \ _remove_and_clear_zip_directory_cache_data else: + def _replace_zip_directory_cache_data(normalized_path): def replace_cached_zip_archive_directory_data(path, old_entry): # N.B. In theory, we could load the zip directory information just @@ -2164,7 +2164,6 @@ def _use_header(new_header): class WindowsExecutableLauncherWriter(WindowsScriptWriter): - @classmethod def _get_script_args(cls, type_, name, header, script_text): """ diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b85d7d03ee..9975753d9f 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -89,8 +89,10 @@ def _remove_os_link(): """ In a context, remove and restore os.link if it exists """ + class NoValue: pass + orig_val = getattr(os, 'link', NoValue) try: del os.link diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 7f332be5a4..7e57cc0262 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -8,7 +8,6 @@ from setuptools import Command - __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 38bbcd8bc8..270674e21e 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -17,7 +17,6 @@ class ScanningLoader(TestLoader): - def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module @@ -50,7 +49,6 @@ def loadTestsFromModule(self, module, pattern=None): # adapted from jaraco.classes.properties:NonDataProperty class NonDataProperty(object): - def __init__(self, fget): self.fget = fget diff --git a/setuptools/extension.py b/setuptools/extension.py index 03068d35bb..29468894f8 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -26,7 +26,6 @@ def _have_cython(): # for compatibility have_pyrex = _have_cython - _Extension = get_unpatched(distutils.core.Extension) diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 6859aa5b5c..2cd08b7ed9 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,5 +1,4 @@ from pkg_resources.extern import VendorImporter - names = 'six', VendorImporter(__name__, names, 'pkg_resources._vendor').install() diff --git a/setuptools/glob.py b/setuptools/glob.py index f51b9c8363..6c781de349 100644 --- a/setuptools/glob.py +++ b/setuptools/glob.py @@ -14,6 +14,7 @@ __all__ = ["glob", "iglob", "escape"] + def glob(pathname, recursive=False): """Return a list of paths matching a pathname pattern. @@ -27,6 +28,7 @@ def glob(pathname, recursive=False): """ return list(iglob(pathname, recursive=recursive)) + def iglob(pathname, recursive=False): """Return an iterator which yields the paths matching a pathname pattern. @@ -44,6 +46,7 @@ def iglob(pathname, recursive=False): assert not s return it + def _iglob(pathname, recursive): dirname, basename = os.path.split(pathname) if not has_magic(pathname): @@ -81,10 +84,12 @@ def _iglob(pathname, recursive): for name in glob_in_dir(dirname, basename): yield os.path.join(dirname, name) + # These 2 helper functions non-recursively glob inside a literal directory. # They return a list of basenames. `glob1` accepts a pattern while `glob0` # takes a literal basename (so it only has to check for its existence). + def glob1(dirname, pattern): if not dirname: if isinstance(pattern, binary_type): @@ -97,6 +102,7 @@ def glob1(dirname, pattern): return [] return fnmatch.filter(names, pattern) + def glob0(dirname, basename): if not basename: # `os.path.split()` returns an empty basename for paths ending with a @@ -108,9 +114,11 @@ def glob0(dirname, basename): return [basename] return [] + # This helper function recursively yields relative pathnames inside a literal # directory. + def glob2(dirname, pattern): assert _isrecursive(pattern) yield pattern[:0] @@ -139,6 +147,7 @@ def _rlistdir(dirname): magic_check = re.compile('([*?[])') magic_check_bytes = re.compile(b'([*?[])') + def has_magic(s): if isinstance(s, binary_type): match = magic_check_bytes.search(s) @@ -146,12 +155,14 @@ def has_magic(s): match = magic_check.search(s) return match is not None + def _isrecursive(pattern): if isinstance(pattern, binary_type): return pattern == b'**' else: return pattern == '**' + def escape(pathname): """Escape all special characters. """ diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index c8632bc5f6..4b1a73feb2 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -15,7 +15,6 @@ class DistutilsRefactoringTool(RefactoringTool): - def log_error(self, msg, *args, **kw): log.error(msg, *args) @@ -27,7 +26,6 @@ def log_debug(self, msg, *args): class Mixin2to3(_Mixin2to3): - def run_2to3(self, files, doctests=False): # See of the distribution option has been set, otherwise check the # setuptools default. diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 43b97b4d95..aabc280f6b 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -13,7 +13,6 @@ import setuptools - __all__ = [] """ Everything is private. Contact the project team diff --git a/setuptools/msvc.py b/setuptools/msvc.py index e9665e10cb..ef85f64a48 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -34,11 +34,13 @@ Mock winreg and environ so the module can be imported on this platform. """ + class winreg: HKEY_USERS = None HKEY_CURRENT_USER = None HKEY_LOCAL_MACHINE = None HKEY_CLASSES_ROOT = None + safe_env = dict() try: @@ -458,6 +460,7 @@ class SystemInfo: vc_ver: float Required Microsoft Visual C++ version. """ + # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. WinDir = safe_env.get('WinDir', '') diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3e8d6818f7..3bb97154c1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -47,7 +47,6 @@ _SOCKET_TIMEOUT = 15 - _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" user_agent = _tmpl.format(py_major=sys.version[:3], **globals()) @@ -198,9 +197,11 @@ def unique_values(func): Wrap a function returning an iterable such that the resulting iterable only ever yields unique items. """ + @wraps(func) def wrapper(*args, **kwargs): return unique_everseen(func(*args, **kwargs)) + return wrapper @@ -415,6 +416,7 @@ def scan_egg_link(self, path, entry): def process_index(self, url, page): """Process the contents of a PyPI page""" + def scan(link): # Process a URL to see if it's for a package page if link.startswith(self.index_url): @@ -946,7 +948,9 @@ def _socket_timeout(*args, **kwargs): return func(*args, **kwargs) finally: socket.setdefaulttimeout(old_timeout) + return _socket_timeout + return _socket_timeout @@ -991,7 +995,6 @@ def __str__(self): class PyPIConfig(configparser.RawConfigParser): - def __init__(self): """ Load from ~/.pypirc diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py index 5778cdf1ba..4d3add8ca8 100644 --- a/setuptools/py26compat.py +++ b/setuptools/py26compat.py @@ -23,9 +23,9 @@ def strip_fragment(url): if sys.version_info >= (2, 7): strip_fragment = lambda x: x - try: from importlib import import_module except ImportError: + def import_module(module_name): return __import__(module_name, fromlist=['__name__']) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 57eb150b47..4e3e4ab34f 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -13,5 +13,6 @@ def get_all_headers(message, key): if sys.version_info < (3,): + def get_all_headers(message, key): return message.getheaders(key) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 1e959e281f..44b025d4b2 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -14,6 +14,7 @@ def get_path(name): raise ValueError("Name must be purelib or platlib") return get_python_lib(name == 'platlib') + try: # Python >=3.2 from tempfile import TemporaryDirectory diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 2babb63654..53ce155131 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -99,6 +99,7 @@ class UnpickleableException(Exception): """ An exception representing another Exception that could not be pickled. """ + @staticmethod def dump(type, exc): """ @@ -243,6 +244,7 @@ def run_setup(setup_script, args): def runner(): ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) + DirectorySandbox(setup_dir).run(runner) except SystemExit as v: if v.args and v.args[0]: @@ -301,6 +303,7 @@ def wrap(self, path, *args, **kw): if self._active: path = self._remap_input(name, path, *args, **kw) return original(path, *args, **kw) + return wrap if _file: @@ -322,6 +325,7 @@ def wrap(self, path, *args, **kw): path = self._remap_input(name, path, *args, **kw) return self._remap_output(name, original(path, *args, **kw)) return original(path, *args, **kw) + return wrap for name in ['readlink', 'tempnam']: @@ -336,6 +340,7 @@ def wrap(self, *args, **kw): if self._active: return self._remap_output(name, retval) return retval + return wrap for name in ['getcwd', 'tmpnam']: @@ -404,6 +409,7 @@ def _violation(self, operation, *args, **kw): raise SandboxViolation(operation, args, kw) if _file: + def _file(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("file", path, mode, *args, **kw) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 1627263027..82f8870ab8 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -29,7 +29,6 @@ /etc/ssl/ca-bundle.pem """.strip().split() - try: HTTPSHandler = urllib.request.HTTPSHandler HTTPSConnection = http_client.HTTPSConnection @@ -50,10 +49,13 @@ match_hostname = None if not CertificateError: + class CertificateError(ValueError): pass + if not match_hostname: + def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 @@ -216,7 +218,6 @@ def get_win_certfile(): return None class MyCertFile(CertFile): - def __init__(self, stores=(), certs=()): CertFile.__init__(self) for store in stores: diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 53bd836cad..dbf1620108 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -42,7 +42,6 @@ def makeSetup(**args): class TestDepends: - def testExtractConst(self): if not hasattr(dep, 'extract_constant'): # skip on non-bytecode platforms @@ -123,7 +122,6 @@ def testRequire(self): class TestDistro: - def setup_method(self, method): self.e1 = Extension('bar.ext', ['bar.c']) self.e2 = Extension('c.y', ['y.c']) @@ -214,7 +212,6 @@ def testInvalidIncludeExclude(self): class TestFeatures: - def setup_method(self, method): self.req = Require('Distutils', '1.0.3', 'distutils') self.dist = makeSetup( @@ -292,7 +289,6 @@ def testFeatureWithInvalidRemove(self): class TestCommandTests: - def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') assert (isinstance(test_cmd, distutils.cmd.Command)) diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 9e5fefb76c..35312120bb 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -45,7 +45,6 @@ def base_url(self): class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): - def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index c77aa226ed..5aabf404fd 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -9,7 +9,6 @@ from . import contexts - SETUP_PY = """\ from setuptools import setup @@ -28,7 +27,6 @@ def setup_context(tmpdir): class Test: - def test_bdist_egg(self, setup_context, user_override): dist = Distribution(dict( script_name='setup.py', diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index ac002f44ec..602571540f 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -10,7 +10,6 @@ class TestBuildExt: - def test_get_ext_filename(self): """ Setuptools needs to give back the same diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index f1580785b5..4cf483f281 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -13,7 +13,6 @@ from setuptools.dist import Distribution from . import contexts - SETUP_PY = """\ from setuptools import setup diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 82e1d7e8b8..209e6b78ff 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - """Easy install Tests """ from __future__ import absolute_import @@ -42,7 +41,6 @@ class FakeDist(object): - def get_entry_map(self, group): if group != 'console_scripts': return {} @@ -60,7 +58,6 @@ def as_requirement(self): class TestEasyInstallTest: - def test_install_site_py(self, tmpdir): dist = Distribution() cmd = ei.easy_install(dist) @@ -194,7 +191,6 @@ def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): class TestPTHFileWriter: - def test_add_from_cwd_site_sets_dirty(self): '''a pth file manager should set dirty if a distribution is in site but also the cwd @@ -328,13 +324,11 @@ def distutils_package(): class TestDistutilsPackage: - def test_bdist_egg_available_on_distutils_pkg(self, distutils_package): run_setup('setup.py', ['bdist_egg']) class TestSetupRequires: - def test_setup_requires_honors_fetch_params(self): """ When easy_install installs a source distribution which specifies @@ -623,7 +617,6 @@ def test_get_script_header_exe_with_spaces(self): class TestCommandSpec: - def test_custom_launch_command(self): """ Show how a custom CommandSpec could be used to specify a #! executable @@ -659,7 +652,6 @@ def test_from_simple_string_uses_shlex(self): class TestWindowsScriptWriter: - def test_header(self): hdr = ei.WindowsScriptWriter.get_script_header('') assert hdr.startswith('#!') diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4c76782639..12c104972e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -262,7 +262,6 @@ def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): def _find_egg_info_files(self, root): class DirList(list): - def __init__(self, files, base): super(DirList, self).__init__(files) self.base = base diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 6dc1b3ac72..a6023de9d5 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -38,7 +38,6 @@ def has_symlink(): class TestFindPackages: - def setup_method(self, method): self.dist_dir = tempfile.mkdtemp() self._make_pkg_structure() diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 04772ba5eb..78fb0627b0 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -49,6 +49,7 @@ def fin(): user_base.remove() user_site.remove() install_dir.remove() + request.addfinalizer(fin) # Change the environment and site settings to control where the diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 8bcf4f5cbc..602c43a274 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -30,7 +30,6 @@ def make_local_path(s): 'packages': ['app'], } - SETUP_PY = """\ from setuptools import setup @@ -95,7 +94,6 @@ def test_translated_pattern_test(): class TempDirTestCase(object): - def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() self.old_cwd = os.getcwd() @@ -107,14 +105,12 @@ def teardown_method(self, method): class TestManifestTest(TempDirTestCase): - def setup_method(self, method): super(TestManifestTest, self).setup_method(method) f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') f.write(SETUP_PY) f.close() - """ Create a file tree like: - LICENSE diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index f9bf895b5e..f09dd78c31 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -14,7 +14,6 @@ class TestPackageIndex: - def test_regex(self): hash_url = 'http://other_url?:action=show_md5&' hash_url += 'digest=0123456789abcdef0123456789abcdef' @@ -184,7 +183,6 @@ def test_local_index(self, tmpdir): class TestContentCheckers: - def test_md5(self): checker = setuptools.package_index.HashChecker.from_url( 'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478') @@ -219,7 +217,6 @@ def test_report(self): class TestPyPIConfig: - def test_percent_in_password(self, tmpdir, monkeypatch): monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) pypirc = tmpdir / '.pypirc' diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index aa6138e49b..b92a477a2f 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -11,7 +11,6 @@ class TestSandbox: - def test_devnull(self, tmpdir): sandbox = DirectorySandbox(str(tmpdir)) sandbox.run(self._file_writer(os.devnull)) @@ -21,6 +20,7 @@ def _file_writer(path): def do_write(): with open(path, 'w') as f: f.write('xxx') + return do_write def test_win32com(self, tmpdir): @@ -57,7 +57,6 @@ def test_setup_py_with_CRLF(self, tmpdir): class TestExceptionSaver: - def test_exception_trapped(self): with setuptools.sandbox.ExceptionSaver(): raise ValueError("details") @@ -107,6 +106,7 @@ def test_unpickleable_exception_when_hiding_setuptools(self): As revealed in #440, an infinite recursion can occur if an unpickleable exception while setuptools is hidden. Ensure this doesn't happen. """ + class ExceptionUnderTest(Exception): """ An unpickleable exception (not in globals). @@ -126,10 +126,12 @@ def test_sandbox_violation_raised_hiding_setuptools(self, tmpdir): should reflect a proper exception and not be wrapped in an UnpickleableException. """ + def write_file(): "Trigger a SandboxViolation by writing outside the sandbox" with open('/etc/foo', 'w'): pass + sandbox = DirectorySandbox(str(tmpdir)) with pytest.raises(setuptools.sandbox.SandboxViolation) as caught: with setuptools.sandbox.save_modules(): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 16d0eb07dc..609c7830f2 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -20,10 +20,8 @@ from setuptools.dist import Distribution from setuptools.tests import fail_on_ascii - py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") - SETUP_ATTRS = { 'name': 'sdist_test', 'version': '0.0', @@ -31,14 +29,12 @@ 'package_data': {'sdist_test': ['*.txt']} } - SETUP_PY = """\ from setuptools import setup setup(**%r) """ % SETUP_ATTRS - if six.PY3: LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1') else: @@ -90,7 +86,6 @@ def read_all_bytes(filename): class TestSdistTest: - def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 4155a5b137..7ea43c5797 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -70,7 +70,6 @@ def sample_test(tmpdir_cwd): @pytest.mark.usefixtures('user_override') @pytest.mark.usefixtures('sample_test') class TestTestTest: - def test_test(self): params = dict( name='foo', diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index d3dee61664..5d50bb0b2f 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -10,7 +10,6 @@ from .textwrap import DALS from . import contexts - SETUP_PY = DALS( """ from setuptools import setup @@ -38,7 +37,6 @@ def sample_project(tmpdir_cwd): @pytest.mark.usefixtures('sample_project') @pytest.mark.usefixtures('user_override') class TestUploadDocsTest: - def test_create_zipfile(self): """ Ensure zipfile creation handles common cases, including a folder diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py index 5b14d07b0e..d2871c0f40 100644 --- a/setuptools/tests/test_windows_wrappers.py +++ b/setuptools/tests/test_windows_wrappers.py @@ -23,12 +23,10 @@ from setuptools.command.easy_install import nt_quote_arg import pkg_resources - pytestmark = pytest.mark.skipif(sys.platform != 'win32', reason="Windows only") class WrapperTester: - @classmethod def prep_script(cls, template): python_exe = nt_quote_arg(sys.executable) diff --git a/tests/manual_test.py b/tests/manual_test.py index 9987e6629a..e5aaf179c6 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -25,6 +25,7 @@ def _tempdir(*args, **kwargs): finally: os.chdir(old_dir) shutil.rmtree(test_dir) + return _tempdir From df1bd4e17a082b9b634f62d799807a18e526a7c0 Mon Sep 17 00:00:00 2001 From: stepshal Date: Wed, 19 Oct 2016 00:10:40 +0700 Subject: [PATCH 6256/8469] Fix spacing after comment hash. --- setuptools/depends.py | 2 +- setuptools/dist.py | 4 ++-- setuptools/package_index.py | 36 ++++++++++++++++++------------------ setuptools/site-patch.py | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index d5a344ada7..89d39a50a1 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -145,7 +145,7 @@ def get_module_constant(module, symbol, default=-1, paths=None): try: if kind == PY_COMPILED: - f.read(8) # skip magic & date + f.read(8) # skip magic & date code = marshal.load(f) elif kind == PY_FROZEN: code = imp.get_frozen_object(module) diff --git a/setuptools/dist.py b/setuptools/dist.py index 364f2b4d37..367c26eaca 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -412,7 +412,7 @@ def fetch_build_egg(self, req): ) for key in list(opts): if key not in keep: - del opts[key] # don't use any other settings + del opts[key] # don't use any other settings if self.dependency_links: links = self.dependency_links[:] if 'find_links' in opts: @@ -650,7 +650,7 @@ def _parse_command_opts(self, parser, args): aliases = self.get_option_dict('aliases') while command in aliases: src, alias = aliases[command] - del aliases[command] # ensure each alias can expand only once! + del aliases[command] # ensure each alias can expand only once! import shlex args[:1] = shlex.split(alias, True) command = args[0] diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3bb97154c1..e5249b27f0 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -88,7 +88,7 @@ def egg_info_for_url(url): parts = urllib.parse.urlparse(url) scheme, server, path, parameters, query, fragment = parts base = urllib.parse.unquote(path.split('/')[-1]) - if server == 'sourceforge.net' and base == 'download': # XXX Yuck + if server == 'sourceforge.net' and base == 'download': # XXX Yuck base = urllib.parse.unquote(path.split('/')[-2]) if '#' in base: base, fragment = base.split('#', 1) @@ -112,7 +112,7 @@ def distros_for_url(url, metadata=None): def distros_for_location(location, basename, metadata=None): """Yield egg or source distribution objects based on basename""" if basename.endswith('.egg.zip'): - basename = basename[:-4] # strip the .zip + basename = basename[:-4] # strip the .zip if basename.endswith('.egg') and '-' in basename: # only one, unambiguous interpretation return [Distribution.from_location(location, basename, metadata)] @@ -334,17 +334,17 @@ def process_url(self, url, retrieve=False): return self.info("Reading %s", url) - self.fetched_urls[url] = True # prevent multiple fetch attempts + self.fetched_urls[url] = True # prevent multiple fetch attempts tmpl = "Download error on %s: %%s -- Some packages may not be found!" f = self.open_url(url, tmpl % url) if f is None: return self.fetched_urls[f.url] = True if 'html' not in f.headers.get('content-type', '').lower(): - f.close() # not html, we can't process it + f.close() # not html, we can't process it return - base = f.url # handle redirects + base = f.url # handle redirects page = f.read() if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. if isinstance(f, urllib.error.HTTPError): @@ -438,7 +438,7 @@ def scan(link): except ValueError: pass - pkg, ver = scan(url) # ensure this page is in the page index + pkg, ver = scan(url) # ensure this page is in the page index if pkg: # process individual package page for new_url in find_external_links(url, page): @@ -455,7 +455,7 @@ def scan(link): lambda m: '%s' % m.group(1, 3, 2), page ) else: - return "" # no sense double-scanning non-package pages + return "" # no sense double-scanning non-package pages def need_version_info(self, url): self.scan_all( @@ -530,12 +530,12 @@ def prescan(self): """Scan urls scheduled for prescanning (e.g. --find-links)""" if self.to_scan: list(map(self.scan_url, self.to_scan)) - self.to_scan = None # from now on, go ahead and process immediately + self.to_scan = None # from now on, go ahead and process immediately def not_found_in_index(self, requirement): - if self[requirement.key]: # we've seen at least one distro + if self[requirement.key]: # we've seen at least one distro meth, msg = self.info, "Couldn't retrieve index page for %r" - else: # no distros seen for this name, might be misspelled + else: # no distros seen for this name, might be misspelled meth, msg = (self.warn, "Couldn't find index page for %r (maybe misspelled?)") meth(msg, requirement.unsafe_name) @@ -665,7 +665,7 @@ def gen_setup(self, filename, fragment, tmpdir): interpret_distro_name(filename, match.group(1), None) if d.version ] or [] - if len(dists) == 1: # unambiguous ``#egg`` fragment + if len(dists) == 1: # unambiguous ``#egg`` fragment basename = os.path.basename(filename) # Make sure the file has been downloaded to the temp dir. @@ -738,7 +738,7 @@ def _download_to(self, url, filename): fp.close() def reporthook(self, url, filename, blocknum, blksize, size): - pass # no-op + pass # no-op def open_url(self, url, warning=None): if url.startswith('file:'): @@ -783,10 +783,10 @@ def _download_url(self, scheme, url, tmpdir): while '..' in name: name = name.replace('..', '.').replace('\\', '_') else: - name = "__downloaded__" # default if URL has no path contents + name = "__downloaded__" # default if URL has no path contents if name.endswith('.egg.zip'): - name = name[:-4] # strip the extra .zip before download + name = name[:-4] # strip the extra .zip before download filename = os.path.join(tmpdir, name) @@ -801,7 +801,7 @@ def _download_url(self, scheme, url, tmpdir): elif scheme == 'file': return urllib.request.url2pathname(urllib.parse.urlparse(url)[2]) else: - self.url_ok(url, True) # raises error if not allowed + self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) def scan_url(self, url): @@ -824,13 +824,13 @@ def _download_html(self, url, headers, filename): file.close() os.unlink(filename) return self._download_svn(url, filename) - break # not an index page + break # not an index page file.close() os.unlink(filename) raise DistutilsError("Unexpected HTML page found at " + url) def _download_svn(self, url, filename): - url = url.split('#', 1)[0] # remove any fragment for svn's sake + url = url.split('#', 1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) @@ -1082,7 +1082,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): def fix_sf_url(url): - return url # backward compatibility + return url # backward compatibility def local_open(url): diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index f09ab52252..92194abda4 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -40,13 +40,13 @@ def __boot(): known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp - oldpos = getattr(sys, '__egginsert', 0) # save old insertion position - sys.__egginsert = 0 # and reset the current one + oldpos = getattr(sys, '__egginsert', 0) # save old insertion position + sys.__egginsert = 0 # and reset the current one for item in PYTHONPATH: addsitedir(item) - sys.__egginsert += oldpos # restore effective old position + sys.__egginsert += oldpos # restore effective old position d, nd = makepath(stdpath[0]) insert_at = None From ed3fac3741f01ce05c139216e5af58c238c63f29 Mon Sep 17 00:00:00 2001 From: stepshal Date: Wed, 19 Oct 2016 00:23:56 +0700 Subject: [PATCH 6257/8469] Fix quantity of blank lines. --- setuptools/command/build_py.py | 2 +- setuptools/msvc.py | 1 + setuptools/sandbox.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b5de9bda52..289e6fb81b 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -14,8 +14,8 @@ try: from setuptools.lib2to3_ex import Mixin2to3 except ImportError: - class Mixin2to3: + class Mixin2to3: def run_2to3(self, files, doctests=True): "do nothing" diff --git a/setuptools/msvc.py b/setuptools/msvc.py index ef85f64a48..447ddb3822 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -761,6 +761,7 @@ class EnvironmentInfo: vc_min_ver: float Minimum Microsoft Visual C++ version. """ + # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 53ce155131..39afd57ed6 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -290,6 +290,7 @@ def wrap(self, src, dst, *args, **kw): if self._active: src, dst = self._remap_pair(name, src, dst, *args, **kw) return original(src, dst, *args, **kw) + return wrap for name in ["rename", "link", "symlink"]: From fd4e8e7d33c701bc904f8063d1ee91c436f904f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Oct 2016 11:32:44 -0400 Subject: [PATCH 6258/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index bcb507980d..47164e095d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,11 @@ CHANGES ======= +v28.6.1 +------- + +* #816: Fix manifest file list order in tests. + v28.6.0 ------- From d7c802d072989f6543f584fa6dfdd57b140ca43e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Oct 2016 11:32:51 -0400 Subject: [PATCH 6259/8469] =?UTF-8?q?Bump=20version:=2028.6.0=20=E2=86=92?= =?UTF-8?q?=2028.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1cafb9ae7f..d27005858f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.6.0 +current_version = 28.6.1 commit = True tag = True diff --git a/setup.py b/setup.py index 6cb140977b..ef007d931c 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.6.0", + version="28.6.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f19e5732da07d22ea0d7c7a64ba7e736ba2d1a52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Oct 2016 14:02:08 -0400 Subject: [PATCH 6260/8469] Use rpartition for simplicity --- setuptools/dist.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 367c26eaca..a3099fcd92 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -112,9 +112,8 @@ def check_nsp(dist, attr, value): "Distribution contains no modules or packages for " + "namespace package %r" % nsp ) - if '.' in nsp: - parent = '.'.join(nsp.split('.')[:-1]) - if parent not in value: + parent, sep, child = nsp.rpartition('.') + if parent and parent not in value: distutils.log.warn( "WARNING: %r is declared as a package namespace, but %r" " is not: please correct this in setup.py", nsp, parent From b5299c316942b61cbc98750c0ed93f3a4c69b16a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Oct 2016 14:02:16 -0400 Subject: [PATCH 6261/8469] Reindent --- setuptools/dist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index a3099fcd92..dbb083bb79 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -114,10 +114,10 @@ def check_nsp(dist, attr, value): ) parent, sep, child = nsp.rpartition('.') if parent and parent not in value: - distutils.log.warn( - "WARNING: %r is declared as a package namespace, but %r" - " is not: please correct this in setup.py", nsp, parent - ) + distutils.log.warn( + "WARNING: %r is declared as a package namespace, but %r" + " is not: please correct this in setup.py", nsp, parent + ) def check_extras(dist, attr, value): From d382def1367e9d9b288e9b04b6f2da5987052b5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 19 Oct 2016 14:03:56 -0400 Subject: [PATCH 6262/8469] Use a meaningful variable name --- setuptools/dist.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index dbb083bb79..612040c855 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -105,15 +105,16 @@ def assert_string_list(dist, attr, value): def check_nsp(dist, attr, value): """Verify that namespace packages are valid""" - assert_string_list(dist, attr, value) - for nsp in value: + ns_packages = value + assert_string_list(dist, attr, ns_packages) + for nsp in ns_packages: if not dist.has_contents_for(nsp): raise DistutilsSetupError( "Distribution contains no modules or packages for " + "namespace package %r" % nsp ) parent, sep, child = nsp.rpartition('.') - if parent and parent not in value: + if parent and parent not in ns_packages: distutils.log.warn( "WARNING: %r is declared as a package namespace, but %r" " is not: please correct this in setup.py", nsp, parent From d5494571842c63e4b1903d8f455727e408464ff5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:25:03 -0400 Subject: [PATCH 6263/8469] Extract namespace handling into a separate module and mix-in class. --- setuptools/command/install_egg_info.py | 61 +------------------------ setuptools/namespaces.py | 63 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 59 deletions(-) create mode 100755 setuptools/namespaces.py diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 7834e1070d..edc4718b68 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -1,14 +1,13 @@ from distutils import log, dir_util import os -from setuptools.extern.six.moves import map - from setuptools import Command +from setuptools import namespaces from setuptools.archive_util import unpack_archive import pkg_resources -class install_egg_info(Command): +class install_egg_info(namespaces.Installer, Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" @@ -61,59 +60,3 @@ def skimmer(src, dst): return dst unpack_archive(self.source, self.target, skimmer) - - def install_namespaces(self): - nsp = self._get_all_ns_packages() - if not nsp: - return - filename, ext = os.path.splitext(self.target) - filename += '-nspkg.pth' - self.outputs.append(filename) - log.info("Installing %s", filename) - lines = map(self._gen_nspkg_line, nsp) - - if self.dry_run: - # always generate the lines, even in dry run - list(lines) - return - - with open(filename, 'wt') as f: - f.writelines(lines) - - _nspkg_tmpl = ( - "import sys, types, os", - "pep420 = sys.version_info > (3, 3)", - "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", - "ie = os.path.exists(os.path.join(p,'__init__.py'))", - "m = not ie and not pep420 and " - "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", - "mp = (m or []) and m.__dict__.setdefault('__path__',[])", - "(p not in mp) and mp.append(p)", - ) - "lines for the namespace installer" - - _nspkg_tmpl_multi = ( - 'm and setattr(sys.modules[%(parent)r], %(child)r, m)', - ) - "additional line(s) when a parent package is indicated" - - @classmethod - def _gen_nspkg_line(cls, pkg): - # ensure pkg is not a unicode string under Python 2.7 - pkg = str(pkg) - pth = tuple(pkg.split('.')) - tmpl_lines = cls._nspkg_tmpl - parent, sep, child = pkg.rpartition('.') - if parent: - tmpl_lines += cls._nspkg_tmpl_multi - return ';'.join(tmpl_lines) % locals() + '\n' - - def _get_all_ns_packages(self): - """Return sorted list of all package namespaces""" - nsp = set() - for pkg in self.distribution.namespace_packages or []: - pkg = pkg.split('.') - while pkg: - nsp.add('.'.join(pkg)) - pkg.pop() - return sorted(nsp) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py new file mode 100755 index 0000000000..13829521bc --- /dev/null +++ b/setuptools/namespaces.py @@ -0,0 +1,63 @@ +import os +from distutils import log + +from setuptools.extern.six.moves import map + + +class Installer: + + def install_namespaces(self): + nsp = self._get_all_ns_packages() + if not nsp: + return + filename, ext = os.path.splitext(self.target) + filename += '-nspkg.pth' + self.outputs.append(filename) + log.info("Installing %s", filename) + lines = map(self._gen_nspkg_line, nsp) + + if self.dry_run: + # always generate the lines, even in dry run + list(lines) + return + + with open(filename, 'wt') as f: + f.writelines(lines) + + _nspkg_tmpl = ( + "import sys, types, os", + "pep420 = sys.version_info > (3, 3)", + "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", + "ie = os.path.exists(os.path.join(p,'__init__.py'))", + "m = not ie and not pep420 and " + "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "mp = (m or []) and m.__dict__.setdefault('__path__',[])", + "(p not in mp) and mp.append(p)", + ) + "lines for the namespace installer" + + _nspkg_tmpl_multi = ( + 'm and setattr(sys.modules[%(parent)r], %(child)r, m)', + ) + "additional line(s) when a parent package is indicated" + + @classmethod + def _gen_nspkg_line(cls, pkg): + # ensure pkg is not a unicode string under Python 2.7 + pkg = str(pkg) + pth = tuple(pkg.split('.')) + tmpl_lines = cls._nspkg_tmpl + parent, sep, child = pkg.rpartition('.') + if parent: + tmpl_lines += cls._nspkg_tmpl_multi + return ';'.join(tmpl_lines) % locals() + '\n' + + def _get_all_ns_packages(self): + """Return sorted list of all package namespaces""" + nsp = set() + for pkg in self.distribution.namespace_packages or []: + pkg = pkg.split('.') + while pkg: + nsp.add('.'.join(pkg)) + pkg.pop() + return sorted(nsp) From c50d4e37edb96b7e4d63101139591a007e5e7241 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:29:16 -0400 Subject: [PATCH 6264/8469] Extract variable --- setuptools/namespaces.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 13829521bc..4248d1fc2c 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -55,7 +55,8 @@ def _gen_nspkg_line(cls, pkg): def _get_all_ns_packages(self): """Return sorted list of all package namespaces""" nsp = set() - for pkg in self.distribution.namespace_packages or []: + pkgs = self.distribution.namespace_packages or [] + for pkg in pkgs: pkg = pkg.split('.') while pkg: nsp.add('.'.join(pkg)) From 11a55e9c6849f9215ddc714d2ae41d47c34d4f46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:36:11 -0400 Subject: [PATCH 6265/8469] Extract _pkg_names function and add test. --- setuptools/namespaces.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 4248d1fc2c..6a766eda77 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -1,9 +1,13 @@ import os from distutils import log +import itertools from setuptools.extern.six.moves import map +flatten = itertools.chain.from_iterable + + class Installer: def install_namespaces(self): @@ -54,11 +58,20 @@ def _gen_nspkg_line(cls, pkg): def _get_all_ns_packages(self): """Return sorted list of all package namespaces""" - nsp = set() pkgs = self.distribution.namespace_packages or [] - for pkg in pkgs: - pkg = pkg.split('.') - while pkg: - nsp.add('.'.join(pkg)) - pkg.pop() - return sorted(nsp) + return sorted(flatten(map(self._pkg_names, pkgs))) + + @staticmethod + def _pkg_names(pkg): + """ + Given a namespace package, yield the components of that + package. + + >>> names = Installer._pkg_names('a.b.c') + >>> set(names) == set(['a', 'a.b', 'a.b.c']) + True + """ + parts = pkg.split('.') + while parts: + yield '.'.join(parts) + parts.pop() From 3617c2b2626d6d02df40436e788becb088e6b0e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:42:00 -0400 Subject: [PATCH 6266/8469] Allow the extension to be overridden. --- setuptools/namespaces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 6a766eda77..40938d60ad 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -10,12 +10,14 @@ class Installer: + nspkg_ext = '-nspkg.pth' + def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: return filename, ext = os.path.splitext(self.target) - filename += '-nspkg.pth' + filename += self.nspkg_ext self.outputs.append(filename) log.info("Installing %s", filename) lines = map(self._gen_nspkg_line, nsp) From 3d71f8b9ce3f8d48a9f63a095a54088828d39950 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:49:13 -0400 Subject: [PATCH 6267/8469] Allow the root to be overridden --- setuptools/namespaces.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 40938d60ad..9389dc69d3 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -33,7 +33,7 @@ def install_namespaces(self): _nspkg_tmpl = ( "import sys, types, os", "pep420 = sys.version_info > (3, 3)", - "p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)", + "p = os.path.join(%(root)s, *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", "m = not ie and not pep420 and " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", @@ -47,15 +47,18 @@ def install_namespaces(self): ) "additional line(s) when a parent package is indicated" - @classmethod - def _gen_nspkg_line(cls, pkg): + def _get_root(self): + return "sys._getframe(1).f_locals['sitedir']" + + def _gen_nspkg_line(self, pkg): # ensure pkg is not a unicode string under Python 2.7 pkg = str(pkg) pth = tuple(pkg.split('.')) - tmpl_lines = cls._nspkg_tmpl + root = self._get_root() + tmpl_lines = self._nspkg_tmpl parent, sep, child = pkg.rpartition('.') if parent: - tmpl_lines += cls._nspkg_tmpl_multi + tmpl_lines += self._nspkg_tmpl_multi return ';'.join(tmpl_lines) % locals() + '\n' def _get_all_ns_packages(self): From 5951f62664b85b4bd751e955c16ea06ff6931701 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:49:49 -0400 Subject: [PATCH 6268/8469] Also allow the target to be overridden. --- setuptools/namespaces.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 9389dc69d3..8451a06c4c 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -16,7 +16,7 @@ def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: return - filename, ext = os.path.splitext(self.target) + filename, ext = os.path.splitext(self._get_target()) filename += self.nspkg_ext self.outputs.append(filename) log.info("Installing %s", filename) @@ -30,6 +30,9 @@ def install_namespaces(self): with open(filename, 'wt') as f: f.writelines(lines) + def _get_target(self): + return self.target + _nspkg_tmpl = ( "import sys, types, os", "pep420 = sys.version_info > (3, 3)", From 12eba181398860ae741eda4affadcd4d75f11ae3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:53:45 -0400 Subject: [PATCH 6269/8469] Create DevelopInstaller, inspired by the code in #789. --- setuptools/namespaces.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 8451a06c4c..cc934b7ee5 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -83,3 +83,11 @@ def _pkg_names(pkg): while parts: yield '.'.join(parts) parts.pop() + + +class DevelopInstaller(Installer): + def _get_root(self): + return repr(str(self.egg_path)) + + def _get_target(self): + return self.egg_link From 2e8ebcb618abb60af83a7155f6a0aad4ecfc10a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Oct 2016 09:58:06 -0400 Subject: [PATCH 6270/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 47164e095d..9dba9db657 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.7.0 +------- + +* Moved much of the namespace package handling functionality + into a separate module for re-use in something like #789. + v28.6.1 ------- From 2a8668d01cd6c522ce9b7af402bbd7e32a926cc3 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 23 Oct 2016 22:56:14 +0300 Subject: [PATCH 6271/8469] Some distutils tests require zlib for creating tar.gz source distribution. --- tests/test_bdist_rpm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index 25c14abd32..e9795ee4b2 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -3,9 +3,7 @@ import unittest import sys import os -import tempfile -import shutil -from test.support import run_unittest +from test.support import run_unittest, requires_zlib from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm @@ -48,6 +46,7 @@ def tearDown(self): # spurious sdtout/stderr output under Mac OS X @unittest.skipUnless(sys.platform.startswith('linux'), 'spurious sdtout/stderr output under Mac OS X') + @requires_zlib @unittest.skipIf(find_executable('rpm') is None, 'the rpm command is not found') @unittest.skipIf(find_executable('rpmbuild') is None, @@ -90,6 +89,7 @@ def test_quiet(self): # spurious sdtout/stderr output under Mac OS X @unittest.skipUnless(sys.platform.startswith('linux'), 'spurious sdtout/stderr output under Mac OS X') + @requires_zlib # http://bugs.python.org/issue1533164 @unittest.skipIf(find_executable('rpm') is None, 'the rpm command is not found') From dd25d1f858cd02211f4d105ab19d6c3ce90d4048 Mon Sep 17 00:00:00 2001 From: stepshal Date: Tue, 25 Oct 2016 08:37:18 +0700 Subject: [PATCH 6272/8469] Fix spacing after comment hash. --- setuptools/command/build_ext.py | 2 +- setuptools/package_index.py | 6 +++--- setuptools/site-patch.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 12dc88cdbf..a66e0bf369 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -62,7 +62,7 @@ def _customize_compiler_for_shlib(compiler): def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): - if '.abi3' in suffix: # Unix + if '.abi3' in suffix: # Unix return suffix elif suffix == '.pyd': # Windows return suffix diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e5249b27f0..024fab98cc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -515,10 +515,10 @@ def add_find_links(self, urls): """Add `urls` to the list that will be prescanned for searches""" for url in urls: if ( - self.to_scan is None # if we have already "gone online" - or not URL_SCHEME(url) # or it's a local file/directory + self.to_scan is None # if we have already "gone online" + or not URL_SCHEME(url) # or it's a local file/directory or url.startswith('file:') - or list(distros_for_url(url)) # or a direct package link + or list(distros_for_url(url)) # or a direct package link ): # then go ahead and process it now self.scan_url(url) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 92194abda4..0d2d2ff8da 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -13,7 +13,7 @@ def __boot(): for item in stdpath: if item == mydir or not item: - continue # skip if current dir. on Windows, or my own directory + continue # skip if current dir. on Windows, or my own directory importer = pic.get(item) if importer is not None: loader = importer.find_module('site') From e12256c4d32ebf59791d56576ec328131f58357a Mon Sep 17 00:00:00 2001 From: Thiebaud Weksteen Date: Wed, 26 Oct 2016 16:36:54 +1100 Subject: [PATCH 6273/8469] Remove _add_defaults_data_files override --- setuptools/command/sdist.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 9975753d9f..d4ac9efa97 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -141,11 +141,6 @@ def _add_defaults_python(self): self.filelist.extend([os.path.join(src_dir, filename) for filename in filenames]) - def _add_defaults_data_files(self): - """ - Don't add any data files, but why? - """ - def check_readme(self): for f in self.READMES: if os.path.exists(f): From 5ff345e1fe7639d5add42d60044fd10f7a85bd48 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Oct 2016 13:47:10 -0400 Subject: [PATCH 6274/8469] Update changelog --- CHANGES.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9dba9db657..abfbaede8e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,8 +5,12 @@ CHANGES v28.7.0 ------- -* Moved much of the namespace package handling functionality - into a separate module for re-use in something like #789. +* #832: Moved much of the namespace package handling + functionality into a separate module for re-use in something + like #789. +* #830: ``sdist`` command no longer suppresses the inclusion + of data files, re-aligning with the expectation of distutils + and addressing #274 and #521. v28.6.1 ------- From 6d05b8dce90985455dce0649e04955985f336b04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 28 Oct 2016 13:47:38 -0400 Subject: [PATCH 6275/8469] =?UTF-8?q?Bump=20version:=2028.6.1=20=E2=86=92?= =?UTF-8?q?=2028.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d27005858f..8e1b66dd16 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.6.1 +current_version = 28.7.0 commit = True tag = True diff --git a/setup.py b/setup.py index ef007d931c..265cdb3054 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.6.1", + version="28.7.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b18391c74e190b99cc358997f30907a5c4d78b00 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Oct 2016 22:28:17 -0400 Subject: [PATCH 6276/8469] Backed out changeset e12256c4d32e. Fixes #833. Reopens #274 and reopens #521. --- CHANGES.rst | 6 ++++++ setuptools/command/sdist.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index abfbaede8e..2011b3cacd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v28.7.1 +------- + +* #833: Backed out changes from #830 as the implementation + seems to have problems in some cases. + v28.7.0 ------- diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index d4ac9efa97..9975753d9f 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -141,6 +141,11 @@ def _add_defaults_python(self): self.filelist.extend([os.path.join(src_dir, filename) for filename in filenames]) + def _add_defaults_data_files(self): + """ + Don't add any data files, but why? + """ + def check_readme(self): for f in self.READMES: if os.path.exists(f): From 107a253e31134f1c824cf82680ab69d83e3ddbd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Oct 2016 22:35:17 -0400 Subject: [PATCH 6277/8469] Update PyPI root for dependency links. Fixes #827. --- CHANGES.rst | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2011b3cacd..3ef933e5f7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ CHANGES v28.7.1 ------- +* #827: Update PyPI root for dependency links. + * #833: Backed out changes from #830 as the implementation seems to have problems in some cases. diff --git a/setup.py b/setup.py index 265cdb3054..12cbbe8c89 100755 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ def pypi_link(pkg_filename): Given the filename, including md5 fragment, construct the dependency link for PyPI. """ - root = 'https://pypi.python.org/packages/source' + root = 'https://files.pythonhosted.org/packages/source' name, sep, rest = pkg_filename.partition('-') parts = root, name[0], name, pkg_filename return '/'.join(parts) From 721dc0b80fa56b0032f99b56f5bc63a65f828f4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Oct 2016 22:36:13 -0400 Subject: [PATCH 6278/8469] =?UTF-8?q?Bump=20version:=2028.7.0=20=E2=86=92?= =?UTF-8?q?=2028.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8e1b66dd16..6745cf1415 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.7.0 +current_version = 28.7.1 commit = True tag = True diff --git a/setup.py b/setup.py index 12cbbe8c89..ca802e7457 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.7.0", + version="28.7.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 4027f8fd1f0382586f26fb864f660b5e13f092f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Oct 2016 09:15:43 -0400 Subject: [PATCH 6279/8469] Move test requirements into another file so they might be referenced manually. --- tests/requirements.txt | 4 ++++ tox.ini | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 tests/requirements.txt diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000000..d07e9cdeb7 --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,4 @@ +pytest-flake8 +pytest>=3.0.2 +setuptools[ssl] +backports.unittest_mock>=1.2 diff --git a/tox.ini b/tox.ini index 7e2c804992..6e03aef21c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,4 @@ [testenv] -deps= - pytest-flake8 - pytest>=3.0.2 - setuptools[ssl] - backports.unittest_mock>=1.2 - +deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir commands=python -m pytest {posargs:-rsx} From 0f9232cdd78d0e8dc1ed155541d6c732a1b026e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Oct 2016 13:14:40 -0400 Subject: [PATCH 6280/8469] Acknowledge that tests now fail on Python 3.6. Ref #836. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 006316d16d..7268aca824 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,11 @@ python: - nightly - pypy - pypy3 +matrix: + allow_failures: + # pypa/setuptools#836 + - "3.6-dev" + - nightly env: - "" - LC_ALL=C LC_CTYPE=C From 1bbacb74a51c30cdf3effecbef01c533995e0f7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Oct 2016 13:15:51 -0400 Subject: [PATCH 6281/8469] Correct syntax --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7268aca824..6b9b29244d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ python: matrix: allow_failures: # pypa/setuptools#836 - - "3.6-dev" - - nightly + - python: "3.6-dev" + - python: nightly env: - "" - LC_ALL=C LC_CTYPE=C From 74da9afb4dae6ad548895da2169a4f2cd76617dd Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 3 Nov 2016 09:10:25 +0800 Subject: [PATCH 6282/8469] Support Python 3.3.0 for extension suffix In setuptools 27.0+ extension building fails on Python 3.3.0 because the extension suffix is obtained using `SO` and not `EXT_SUFFIX` (which is used in 3.3.1 and above). See: https://hg.python.org/cpython/file/v3.3.0/Lib/distutils/command/build_ext.py#l673 This patch tries `EXT_SUFFIX` and falls back to `SO` if `EXT_SUFFIX` is falsey. --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index a66e0bf369..aae02b0a31 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -109,7 +109,7 @@ def get_ext_filename(self, fullname): and get_abi3_suffix() ) if use_abi3: - so_ext = get_config_var('EXT_SUFFIX') + so_ext = get_config_var("EXT_SUFFIX") or get_config_var("SO") filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): From a811607a23f9e2ab05c071b03d59f55951860b6c Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 3 Nov 2016 09:12:07 +0800 Subject: [PATCH 6283/8469] use consistent quotes --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index aae02b0a31..66ed285e9d 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -109,7 +109,7 @@ def get_ext_filename(self, fullname): and get_abi3_suffix() ) if use_abi3: - so_ext = get_config_var("EXT_SUFFIX") or get_config_var("SO") + so_ext = get_config_var('EXT_SUFFIX') or get_config_var('SO') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): From cbd6a5bedbabb4d5dfa93e1b5fa297fe3df4528d Mon Sep 17 00:00:00 2001 From: Thiebaud Weksteen Date: Fri, 4 Nov 2016 09:43:26 +1100 Subject: [PATCH 6284/8469] Add test to verify the install of Pypi top packages --- conftest.py | 7 ++++ pytest.ini | 2 +- tests/test_pypi.py | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 tests/test_pypi.py diff --git a/conftest.py b/conftest.py index a513bb9e2b..47a5d888c9 100644 --- a/conftest.py +++ b/conftest.py @@ -1 +1,8 @@ +import pytest + pytest_plugins = 'setuptools.tests.fixtures' + +def pytest_addoption(parser): + parser.addoption("--package_name", action="append", default=[], + help="list of package_name to pass to test functions") + diff --git a/pytest.ini b/pytest.ini index b35abfa908..c814b316cf 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 diff --git a/tests/test_pypi.py b/tests/test_pypi.py new file mode 100644 index 0000000000..b3425e53bc --- /dev/null +++ b/tests/test_pypi.py @@ -0,0 +1,82 @@ +import os +import subprocess + +import virtualenv +from setuptools.extern.six.moves import http_client +from setuptools.extern.six.moves import xmlrpc_client + +TOP = 200 +PYPI_HOSTNAME = 'pypi.python.org' + + +def rpc_pypi(method, *args): + """Call an XML-RPC method on the Pypi server.""" + conn = http_client.HTTPSConnection(PYPI_HOSTNAME) + headers = {'Content-Type': 'text/xml'} + payload = xmlrpc_client.dumps(args, method) + + conn.request("POST", "/pypi", payload, headers) + response = conn.getresponse() + if response.status == 200: + result = xmlrpc_client.loads(response.read())[0][0] + return result + else: + raise RuntimeError("Unable to download the list of top " + "packages from Pypi.") + + +def get_top_packages(limit): + """Collect the name of the top packages on Pypi.""" + packages = rpc_pypi('top_packages') + return packages[:limit] + + +def _package_install(package_name, tmp_dir=None, local_setuptools=True): + """Try to install a package and return the exit status. + + This function creates a virtual environment, install setuptools using pip + and then install the required package. If local_setuptools is True, it + will install the local version of setuptools. + """ + package_dir = os.path.join(tmp_dir, "test_%s" % package_name) + if not local_setuptools: + package_dir = package_dir + "_baseline" + + virtualenv.create_environment(package_dir) + + pip_path = os.path.join(package_dir, "bin", "pip") + if local_setuptools: + subprocess.check_call([pip_path, "install", "."]) + returncode = subprocess.call([pip_path, "install", package_name]) + return returncode + + +def test_package_install(package_name, tmpdir): + """Test to verify the outcome of installing a package. + + This test compare that the return code when installing a package is the + same as with the current stable version of setuptools. + """ + new_exit_status = _package_install(package_name, tmp_dir=str(tmpdir)) + if new_exit_status: + print("Installation failed, testing against stable setuptools", + package_name) + old_exit_status = _package_install(package_name, tmp_dir=str(tmpdir), + local_setuptools=False) + assert new_exit_status == old_exit_status + + +def pytest_generate_tests(metafunc): + """Generator function for test_package_install. + + This function will generate calls to test_package_install. If a package + list has been specified on the command line, it will be used. Otherwise, + Pypi will be queried to get the current list of top packages. + """ + if "package_name" in metafunc.fixturenames: + if not metafunc.config.option.package_name: + packages = get_top_packages(TOP) + packages = [name for name, downloads in packages] + else: + packages = metafunc.config.option.package_name + metafunc.parametrize("package_name", packages) From 51b10c39c0f55aaa34697b16d4b6b04805a4c8ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 14:28:02 -0400 Subject: [PATCH 6285/8469] Tests pass again. Fixes #836. --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b9b29244d..006316d16d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,6 @@ python: - nightly - pypy - pypy3 -matrix: - allow_failures: - # pypa/setuptools#836 - - python: "3.6-dev" - - python: nightly env: - "" - LC_ALL=C LC_CTYPE=C From b163acc7a885419dbdcaf12623abd2d7065d4621 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 15:11:53 -0400 Subject: [PATCH 6286/8469] Use packaging.version.Version to sort filenames by the version of the package they represent. Alternate implementation of that proposed in #829. Also ref #629. --- CHANGES.rst | 8 ++++++++ pkg_resources/__init__.py | 33 ++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3ef933e5f7..8caa21383f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ CHANGES ======= +v28.8.0 +------- + +* #629: Per the discussion, refine the sorting to use version + value order for more accurate detection of the latest + available version when scanning for packages. See also + #829. + v28.7.1 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 12226d4bd1..a323857cc9 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -36,6 +36,7 @@ import email.parser import tempfile import textwrap +import itertools from pkgutil import get_importer try: @@ -1966,6 +1967,32 @@ def find_nothing(importer, path_item, only=False): register_finder(object, find_nothing) +def _by_version_descending(names): + """ + Given a list of filenames, return them in descending order + by version number. + + >>> names = 'bar', 'foo', 'Python-2.7.10.egg', 'Python-2.7.2.egg' + >>> _by_version_descending(names) + ['Python-2.7.10.egg', 'Python-2.7.2.egg', 'foo', 'bar'] + >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.egg' + >>> _by_version_descending(names) + ['Setuptools-1.2.3.egg', 'Setuptools-1.2.3b1.egg'] + >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.post1.egg' + >>> _by_version_descending(names) + ['Setuptools-1.2.3.post1.egg', 'Setuptools-1.2.3b1.egg'] + """ + def _by_version(name): + """ + Parse each component of the filename + """ + name, ext = os.path.splitext(name) + parts = itertools.chain(name.split('-'), [ext]) + return [packaging.version.parse(part) for part in parts] + + return sorted(names, key=_by_version, reverse=True) + + def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" path_item = _normalize_cached(path_item) @@ -1979,11 +2006,7 @@ def find_on_path(importer, path_item, only=False): ) else: # scan for .egg and .egg-info in directory - - path_item_entries = os.listdir(path_item) - # Reverse so we find the newest version of a distribution, - path_item_entries.sort() - path_item_entries.reverse() + path_item_entries = _by_version_descending(os.listdir(path_item)) for entry in path_item_entries: lower = entry.lower() if lower.endswith('.egg-info') or lower.endswith('.dist-info'): From 9fe9bb2536967161cebf3b4a71e34cd0699f37c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 15:23:59 -0400 Subject: [PATCH 6287/8469] Update changelog. Ref #837. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8caa21383f..2dc68e712a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,9 @@ v28.8.0 available version when scanning for packages. See also #829. +* #837: Rely on the config var "SO" for Python 3.3.0 only + when determining the ext filename. + v28.7.1 ------- From 9e50e2e2e8920e31bab36855b5ddc48d4c474e95 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 15:30:27 -0400 Subject: [PATCH 6288/8469] Extract a helper to capture the temporary workaround. Ref #837. --- setuptools/command/build_ext.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 66ed285e9d..36f53f0dd4 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -109,7 +109,7 @@ def get_ext_filename(self, fullname): and get_abi3_suffix() ) if use_abi3: - so_ext = get_config_var('EXT_SUFFIX') or get_config_var('SO') + so_ext = _get_config_var_837('EXT_SUFFIX') filename = filename[:-len(so_ext)] filename = filename + get_abi3_suffix() if isinstance(ext, Library): @@ -316,3 +316,13 @@ def link_shared_object( 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) From a64fcd4860742158669474a9107921345bbc65c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Nov 2016 15:35:49 -0400 Subject: [PATCH 6289/8469] =?UTF-8?q?Bump=20version:=2028.7.1=20=E2=86=92?= =?UTF-8?q?=2028.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6745cf1415..34c1884c1b 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.7.1 +current_version = 28.8.0 commit = True tag = True diff --git a/setup.py b/setup.py index ca802e7457..fc51401aeb 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.7.1", + version="28.8.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 14827711f669a830190313951ab5aef7b71ab2c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Nov 2016 15:54:07 -0500 Subject: [PATCH 6290/8469] Install -nspkg.pth under develop command. Fixes namespace package support as long as __init__.py is omitted. --- setuptools/command/develop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 3eb8612054..8de24fd7cc 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -9,10 +9,11 @@ from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install +from setuptools import namespaces import setuptools -class develop(easy_install): +class develop(namespaces.DevelopInstaller, easy_install): """Set up package for development""" description = "install package in 'development mode'" @@ -123,6 +124,8 @@ def install_for_development(self): self.easy_install(setuptools.bootstrap_install_from) setuptools.bootstrap_install_from = None + self.install_namespaces() + # 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: From 355603259aa37e424cf7466c3de6518375a935e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Nov 2016 16:41:23 -0500 Subject: [PATCH 6291/8469] Add uninstall support for namespace packages --- setuptools/command/develop.py | 1 + setuptools/namespaces.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 8de24fd7cc..aa82f95920 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -31,6 +31,7 @@ def run(self): if self.uninstall: self.multi_version = True self.uninstall_link() + self.uninstall_namespaces() else: self.install_for_development() self.warn_deprecated_options() diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index cc934b7ee5..a6371c99ed 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -30,6 +30,14 @@ def install_namespaces(self): with open(filename, 'wt') as f: f.writelines(lines) + def uninstall_namespaces(self): + filename, ext = os.path.splitext(self._get_target()) + filename += self.nspkg_ext + if not os.path.exists(filename): + return + log.info("Removing %s", filename) + os.remove(filename) + def _get_target(self): return self.target From bcddc3dd9aa2b436a4260d4345d4ab1c6d4363ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 03:53:32 -0500 Subject: [PATCH 6292/8469] Add test capturing expectation for #250. --- setuptools/tests/test_develop.py | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 4cf483f281..bf162d8d7a 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -114,3 +114,76 @@ def test_console_scripts(self, tmpdir): cmd.install_dir = tmpdir cmd.run() # assert '0.0' not in foocmd_text + + +import textwrap +import subprocess + + +class TestNamespaces: + @staticmethod + def build_namespace_package(tmpdir, name): + src_dir = tmpdir / name + src_dir.mkdir() + setup_py = src_dir / 'setup.py' + namespace, sep, rest = name.partition('.') + script = textwrap.dedent(""" + import setuptools + setuptools.setup( + name={name!r}, + version="1.0", + namespace_packages=[{namespace!r}], + packages=[{namespace!r}], + ) + """).format(**locals()) + setup_py.write_text(script, encoding='utf-8') + ns_pkg_dir = src_dir / namespace + ns_pkg_dir.mkdir() + pkg_init = ns_pkg_dir / '__init__.py' + tmpl = '__import__("pkg_resources").declare_namespace({namespace!r})' + decl = tmpl.format(**locals()) + pkg_init.write_text(decl, encoding='utf-8') + pkg_mod = ns_pkg_dir / (rest + '.py') + some_functionality = 'name = {rest!r}'.format(**locals()) + pkg_mod.write_text(some_functionality, encoding='utf-8') + return src_dir + + @staticmethod + def make_site_dir(target): + """ + Add a sitecustomize.py module in target to cause + target to be added to site dirs such that .pth files + are processed there. + """ + sc = target / 'sitecustomize.py' + target_str = str(target) + tmpl = '__import__("site").addsitedir({target_str!r})' + sc.write_text(tmpl.format(**locals()), encoding='utf-8') + + def test_namespace_package_importable(self, tmpdir): + """ + Installing two packages sharing the same namespace, one installed + naturally using pip or `--single-version-externally-managed` + and the other installed using `develop` should leave the namespace + in tact and both packages reachable by import. + """ + pkg_A = self.build_namespace_package(tmpdir, 'myns.pkgA') + pkg_B = self.build_namespace_package(tmpdir, 'myns.pkgB') + target = tmpdir / 'packages' + # use pip to install to the target directory + install_cmd = [ + 'pip', + 'install', + '-e', str(pkg_B), + str(pkg_A), + '-t', str(target), + ] + subprocess.check_call(install_cmd) + self.make_site_dir(target) + try_import = [ + sys.executable, + '-c', 'import myns.pkgA; import myns.pkgB', + ] + env = dict(PYTHONPATH=str(target)) + subprocess.check_call(try_import, env=env) + From fd623755cad7ee9fc1492029f4ebdde8ae6b1c1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:03:42 -0500 Subject: [PATCH 6293/8469] pip can't accept -e and -t --- setuptools/tests/test_develop.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index bf162d8d7a..8e905357a0 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -160,6 +160,19 @@ def make_site_dir(target): tmpl = '__import__("site").addsitedir({target_str!r})' sc.write_text(tmpl.format(**locals()), encoding='utf-8') + @staticmethod + def install_develop(src_dir, target): + + develop_cmd = [ + sys.executable, + 'setup.py', + 'develop', + '--install-dir', str(target), + ] + env = dict(PYTHONPATH=str(target)) + with src_dir.as_cwd(): + subprocess.check_call(develop_cmd, env=env) + def test_namespace_package_importable(self, tmpdir): """ Installing two packages sharing the same namespace, one installed @@ -174,11 +187,11 @@ def test_namespace_package_importable(self, tmpdir): install_cmd = [ 'pip', 'install', - '-e', str(pkg_B), str(pkg_A), '-t', str(target), ] subprocess.check_call(install_cmd) + self.install_develop(pkg_B, target) self.make_site_dir(target) try_import = [ sys.executable, From 3caf0231808268654570492a0623e72b22988243 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:08:04 -0500 Subject: [PATCH 6294/8469] Move imports to top and use absolute_import for Python 2.7 compatibility --- setuptools/tests/test_develop.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 8e905357a0..d6c242191a 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -1,9 +1,14 @@ """develop tests """ + +from __future__ import absolute_import + import os import site import sys import io +import textwrap +import subprocess from setuptools.extern import six @@ -116,10 +121,6 @@ def test_console_scripts(self, tmpdir): # assert '0.0' not in foocmd_text -import textwrap -import subprocess - - class TestNamespaces: @staticmethod def build_namespace_package(tmpdir, name): From d580f089b95b58a9a414faa8ed35419e71c995e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:08:49 -0500 Subject: [PATCH 6295/8469] Use unicode literals for Python 2.7 compatibility --- setuptools/tests/test_develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index d6c242191a..fb8e0e3f09 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -1,7 +1,7 @@ """develop tests """ -from __future__ import absolute_import +from __future__ import absolute_import, unicode_literals import os import site From 712a6d85e47979ac50a1fb32d2cc76dc61acade8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:18:56 -0500 Subject: [PATCH 6296/8469] In -nspkg.pth, always add the path to the namespace package, even if a __init__ exists, allowing for better cooperation between PEP 420 packages and older, __init__ namespace packages. --- setuptools/namespaces.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index a6371c99ed..93d358a292 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -45,8 +45,7 @@ def _get_target(self): "import sys, types, os", "pep420 = sys.version_info > (3, 3)", "p = os.path.join(%(root)s, *%(pth)r)", - "ie = os.path.exists(os.path.join(p,'__init__.py'))", - "m = not ie and not pep420 and " + "m = not pep420 and " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From ed5f934e0a49253d645b66dad65fd5b616133d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles=20Bouchard-L=C3=A9gar=C3=A9?= Date: Mon, 7 Nov 2016 22:07:29 -0500 Subject: [PATCH 6297/8469] Also suppress warning for a single file missing --- setuptools/command/egg_info.py | 11 +++++++++-- setuptools/tests/test_egg_info.py | 11 ++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6cc8f4c45e..6f8fd87449 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -554,10 +554,17 @@ def write_manifest(self): msg = "writing manifest file '%s'" % self.manifest self.execute(write_file, (self.manifest, files), msg) - def warn(self, msg): # suppress missing-file warnings from sdist - if not msg.startswith("standard file not found:"): + def warn(self, msg): + if not self._should_suppress_warning(msg): sdist.warn(self, msg) + @staticmethod + def _should_suppress_warning(msg): + """ + suppress missing-file warnings from sdist + """ + return re.match(r"standard file .*not found", msg) + def add_defaults(self): sdist.add_defaults(self) self.filelist.append(self.template) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 12c104972e..dc41bc1f2e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -4,7 +4,7 @@ import stat import sys -from setuptools.command.egg_info import egg_info +from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution from setuptools.extern.six.moves import map @@ -237,6 +237,15 @@ def test_python_requires_install(self, tmpdir_cwd, env): pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') + def test_manifest_maker_warning_suppresion(self): + fixtures = [ + "standard file not found: should have one of foo.py, bar.py", + "standard file 'setup.py' not found" + ] + + for msg in fixtures: + assert manifest_maker._should_suppress_warning(msg) + def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], From 2268fb9887cfea2e28e156bd2c8314132261402f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Nov 2016 09:21:40 -0500 Subject: [PATCH 6298/8469] Provisionally revert the -nspkg.pth suppression on PEP 420 Pythons. Ref #250. --- setuptools/namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 93d358a292..9c1f02439b 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -45,7 +45,7 @@ def _get_target(self): "import sys, types, os", "pep420 = sys.version_info > (3, 3)", "p = os.path.join(%(root)s, *%(pth)r)", - "m = not pep420 and " + "m = " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From cb75964e09d2441e0d00ee3b5861f8412a3a672d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Nov 2016 10:53:34 -0500 Subject: [PATCH 6299/8469] Add test capturing (failing) expectation. Ref #805. --- setuptools/tests/test_namespaces.py | 83 +++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 setuptools/tests/test_namespaces.py diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py new file mode 100644 index 0000000000..f90c25cfd4 --- /dev/null +++ b/setuptools/tests/test_namespaces.py @@ -0,0 +1,83 @@ +from __future__ import absolute_import + +import os +import textwrap +import sys +import subprocess + + +class TestNamespaces: + @staticmethod + def build_namespace_package(tmpdir, name): + src_dir = tmpdir / name + src_dir.mkdir() + setup_py = src_dir / 'setup.py' + namespace, sep, rest = name.partition('.') + script = textwrap.dedent(""" + import setuptools + setuptools.setup( + name={name!r}, + version="1.0", + namespace_packages=[{namespace!r}], + packages=[{namespace!r}], + ) + """).format(**locals()) + setup_py.write_text(script, encoding='utf-8') + ns_pkg_dir = src_dir / namespace + ns_pkg_dir.mkdir() + pkg_init = ns_pkg_dir / '__init__.py' + tmpl = '__import__("pkg_resources").declare_namespace({namespace!r})' + decl = tmpl.format(**locals()) + pkg_init.write_text(decl, encoding='utf-8') + pkg_mod = ns_pkg_dir / (rest + '.py') + some_functionality = 'name = {rest!r}'.format(**locals()) + pkg_mod.write_text(some_functionality, encoding='utf-8') + return src_dir + + @staticmethod + def make_site_dir(target): + """ + Add a sitecustomize.py module in target to cause + target to be added to site dirs such that .pth files + are processed there. + """ + sc = target / 'sitecustomize.py' + target_str = str(target) + tmpl = '__import__("site").addsitedir({target_str!r})' + sc.write_text(tmpl.format(**locals()), encoding='utf-8') + + def test_mixed_site_and_non_site(self, tmpdir): + """ + Installing two packages sharing the same namespace, one installed + to a site dir and the other installed just to a path on PYTHONPATH + should leave the namespace in tact and both packages reachable by + import. + """ + pkg_A = self.build_namespace_package(tmpdir, 'myns.pkgA') + pkg_B = self.build_namespace_package(tmpdir, 'myns.pkgB') + site_packages = tmpdir / 'site-packages' + path_packages = tmpdir / 'path-packages' + targets = site_packages, path_packages + python_path = os.pathsep.join(map(str, targets)) + # use pip to install to the target directory + install_cmd = [ + 'pip', + 'install', + str(pkg_A), + '-t', str(site_packages), + ] + subprocess.check_call(install_cmd) + self.make_site_dir(site_packages) + install_cmd = [ + 'pip', + 'install', + str(pkg_B), + '-t', str(path_packages), + ] + subprocess.check_call(install_cmd) + try_import = [ + sys.executable, + '-c', 'import myns.pkgA; import myns.pkgB', + ] + env = dict(PYTHONPATH=python_path) + subprocess.check_call(try_import, env=env) From 5d78aeb98a5d2b1c366421e68162d9d46de45502 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Nov 2016 11:33:00 -0500 Subject: [PATCH 6300/8469] Fix test failures on Python 2 and suppress test failures when PEP 420 is not available. Ref #805. --- setuptools/tests/test_namespaces.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index f90c25cfd4..ad3c78b880 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -1,10 +1,12 @@ -from __future__ import absolute_import +from __future__ import absolute_import, unicode_literals import os import textwrap import sys import subprocess +import pytest + class TestNamespaces: @staticmethod @@ -46,6 +48,8 @@ def make_site_dir(target): tmpl = '__import__("site").addsitedir({target_str!r})' sc.write_text(tmpl.format(**locals()), encoding='utf-8') + @pytest.mark.xfail(sys.version_info < (3, 3), + reason="Requires PEP 420") def test_mixed_site_and_non_site(self, tmpdir): """ Installing two packages sharing the same namespace, one installed From ed765324e72e7e6be1f84778eaa7496df0e7a381 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Nov 2016 11:39:11 -0500 Subject: [PATCH 6301/8469] Extract namespace support functionality into a separate module. --- setuptools/tests/namespaces.py | 42 ++++++++++++++++++++++++++ setuptools/tests/test_namespaces.py | 47 +++-------------------------- 2 files changed, 47 insertions(+), 42 deletions(-) create mode 100644 setuptools/tests/namespaces.py diff --git a/setuptools/tests/namespaces.py b/setuptools/tests/namespaces.py new file mode 100644 index 0000000000..ef5ecdadac --- /dev/null +++ b/setuptools/tests/namespaces.py @@ -0,0 +1,42 @@ +from __future__ import absolute_import, unicode_literals + +import textwrap + + +def build_namespace_package(tmpdir, name): + src_dir = tmpdir / name + src_dir.mkdir() + setup_py = src_dir / 'setup.py' + namespace, sep, rest = name.partition('.') + script = textwrap.dedent(""" + import setuptools + setuptools.setup( + name={name!r}, + version="1.0", + namespace_packages=[{namespace!r}], + packages=[{namespace!r}], + ) + """).format(**locals()) + setup_py.write_text(script, encoding='utf-8') + ns_pkg_dir = src_dir / namespace + ns_pkg_dir.mkdir() + pkg_init = ns_pkg_dir / '__init__.py' + tmpl = '__import__("pkg_resources").declare_namespace({namespace!r})' + decl = tmpl.format(**locals()) + pkg_init.write_text(decl, encoding='utf-8') + pkg_mod = ns_pkg_dir / (rest + '.py') + some_functionality = 'name = {rest!r}'.format(**locals()) + pkg_mod.write_text(some_functionality, encoding='utf-8') + return src_dir + + +def make_site_dir(target): + """ + Add a sitecustomize.py module in target to cause + target to be added to site dirs such that .pth files + are processed there. + """ + sc = target / 'sitecustomize.py' + target_str = str(target) + tmpl = '__import__("site").addsitedir({target_str!r})' + sc.write_text(tmpl.format(**locals()), encoding='utf-8') diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index ad3c78b880..c148577dfd 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -1,52 +1,15 @@ from __future__ import absolute_import, unicode_literals import os -import textwrap import sys import subprocess import pytest +from . import namespaces -class TestNamespaces: - @staticmethod - def build_namespace_package(tmpdir, name): - src_dir = tmpdir / name - src_dir.mkdir() - setup_py = src_dir / 'setup.py' - namespace, sep, rest = name.partition('.') - script = textwrap.dedent(""" - import setuptools - setuptools.setup( - name={name!r}, - version="1.0", - namespace_packages=[{namespace!r}], - packages=[{namespace!r}], - ) - """).format(**locals()) - setup_py.write_text(script, encoding='utf-8') - ns_pkg_dir = src_dir / namespace - ns_pkg_dir.mkdir() - pkg_init = ns_pkg_dir / '__init__.py' - tmpl = '__import__("pkg_resources").declare_namespace({namespace!r})' - decl = tmpl.format(**locals()) - pkg_init.write_text(decl, encoding='utf-8') - pkg_mod = ns_pkg_dir / (rest + '.py') - some_functionality = 'name = {rest!r}'.format(**locals()) - pkg_mod.write_text(some_functionality, encoding='utf-8') - return src_dir - @staticmethod - def make_site_dir(target): - """ - Add a sitecustomize.py module in target to cause - target to be added to site dirs such that .pth files - are processed there. - """ - sc = target / 'sitecustomize.py' - target_str = str(target) - tmpl = '__import__("site").addsitedir({target_str!r})' - sc.write_text(tmpl.format(**locals()), encoding='utf-8') +class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 3), reason="Requires PEP 420") @@ -57,8 +20,8 @@ def test_mixed_site_and_non_site(self, tmpdir): should leave the namespace in tact and both packages reachable by import. """ - pkg_A = self.build_namespace_package(tmpdir, 'myns.pkgA') - pkg_B = self.build_namespace_package(tmpdir, 'myns.pkgB') + pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') + pkg_B = namespaces.build_namespace_package(tmpdir, 'myns.pkgB') site_packages = tmpdir / 'site-packages' path_packages = tmpdir / 'path-packages' targets = site_packages, path_packages @@ -71,7 +34,7 @@ def test_mixed_site_and_non_site(self, tmpdir): '-t', str(site_packages), ] subprocess.check_call(install_cmd) - self.make_site_dir(site_packages) + namespaces.make_site_dir(site_packages) install_cmd = [ 'pip', 'install', From 161c0a5072f6049f6e4790969a387e9aae41ad52 Mon Sep 17 00:00:00 2001 From: Julien Muchembled Date: Mon, 14 Nov 2016 00:25:57 +0100 Subject: [PATCH 6302/8469] package_index: fix bug not catching some network timeouts There are already so many exceptions catched, like socket errors (e.g. failure in name resolution) or HTTP errors. Depending on when a timeout occurs, it is either catched (URLError during the SSL handshake) or not (socket.error while getting a HTTP response). When used by buildout, this fixes random failures when running in newest mode (which is the default case), or when the requested version is available in the download-cache. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 024fab98cc..d80d43bc79 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -768,7 +768,7 @@ def open_url(self, url, warning=None): 'down, %s' % (url, v.line) ) - except http_client.HTTPException as v: + except (http_client.HTTPException, socket.error) as v: if warning: self.warn(warning, v) else: From 874f6ddbb74da00b9b323721cd79509fc1d5487b Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Thu, 17 Nov 2016 09:00:19 +0100 Subject: [PATCH 6303/8469] Issue 26931: Skip the test_distutils tests using a compiler executable that is not found --- tests/test_build_clib.py | 20 ++++++-------------- tests/test_build_ext.py | 6 ++++++ tests/test_config_cmd.py | 5 ++++- tests/test_install.py | 4 ++++ tests/test_sysconfig.py | 9 --------- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index acc99e78c1..85d09906f2 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -3,7 +3,7 @@ import os import sys -from test.support import run_unittest +from test.support import run_unittest, missing_compiler_executable from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError @@ -116,19 +116,11 @@ def test_run(self): cmd.build_temp = build_temp cmd.build_clib = build_temp - # before we run the command, we want to make sure - # all commands are present on the system - # by creating a compiler and checking its executables - from distutils.ccompiler import new_compiler - from distutils.sysconfig import customize_compiler - - compiler = new_compiler() - customize_compiler(compiler) - for ccmd in compiler.executables.values(): - if ccmd is None: - continue - if find_executable(ccmd[0]) is None: - self.skipTest('The %r command is not found' % ccmd[0]) + # Before we run the command, we want to make sure + # all commands are present on the system. + ccmd = missing_compiler_executable() + if ccmd is not None: + self.skipTest('The %r command is not found' % ccmd) # this should work cmd.run() diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 6be0ca233b..be7f5f38aa 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -41,6 +41,9 @@ def build_ext(self, *args, **kwargs): return build_ext(*args, **kwargs) def test_build_ext(self): + cmd = support.missing_compiler_executable() + if cmd is not None: + self.skipTest('The %r command is not found' % cmd) global ALREADY_TESTED copy_xxmodule_c(self.tmp_dir) xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') @@ -295,6 +298,9 @@ def test_compiler_option(self): self.assertEqual(cmd.compiler, 'unix') def test_get_outputs(self): + cmd = support.missing_compiler_executable() + if cmd is not None: + self.skipTest('The %r command is not found' % cmd) tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') self.write_file(c_file, 'void PyInit_foo(void) {}\n') diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 0c8dbd8269..6e566e7915 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -2,7 +2,7 @@ import unittest import os import sys -from test.support import run_unittest +from test.support import run_unittest, missing_compiler_executable from distutils.command.config import dump_file, config from distutils.tests import support @@ -39,6 +39,9 @@ def test_dump_file(self): @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_search_cpp(self): + cmd = missing_compiler_executable(['preprocessor']) + if cmd is not None: + self.skipTest('The %r command is not found' % cmd) pkg_dir, dist = self.create_dist() cmd = config(dist) diff --git a/tests/test_install.py b/tests/test_install.py index 9313330e2b..287ab1989e 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -17,6 +17,7 @@ from distutils.extension import Extension from distutils.tests import support +from test import support as test_support def _make_ext_name(modname): @@ -196,6 +197,9 @@ def test_record(self): self.assertEqual(found, expected) def test_record_extensions(self): + cmd = test_support.missing_compiler_executable() + if cmd is not None: + self.skipTest('The %r command is not found' % cmd) install_dir = self.mkdtemp() project_dir, dist = self.create_dist(ext_modules=[ Extension('xx', ['xxmodule.c'])]) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index fc4d1de185..fe4a2994e3 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -39,15 +39,6 @@ def test_get_python_lib(self): self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) - def test_get_python_inc(self): - inc_dir = sysconfig.get_python_inc() - # This is not much of a test. We make sure Python.h exists - # in the directory returned by get_python_inc() but we don't know - # it is the correct file. - self.assertTrue(os.path.isdir(inc_dir), inc_dir) - python_h = os.path.join(inc_dir, "Python.h") - self.assertTrue(os.path.isfile(python_h), python_h) - def test_get_config_vars(self): cvars = sysconfig.get_config_vars() self.assertIsInstance(cvars, dict) From 7daf18ff0aaa6e9c9f5078ed1880512dbf8e497a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Nov 2016 15:19:12 -0500 Subject: [PATCH 6304/8469] Drop exception support for packages triggering win32com cache generation during build/install. Fixes #841 --- CHANGES.rst | 7 +++++++ setuptools/sandbox.py | 8 -------- setuptools/tests/test_sandbox.py | 16 ---------------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2dc68e712a..3b9f0894b0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,13 @@ CHANGES ======= +v29.0.0 +------- + +* #841: Drop special exception for packages invoking + win32com during the build/install process. See + Distribute #118 for history. + v28.8.0 ------- diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 39afd57ed6..d882d71539 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -373,14 +373,6 @@ def _remap_pair(self, operation, src, dst, *args, **kw): else: _EXCEPTIONS = [] -try: - from win32com.client.gencache import GetGeneratePath - _EXCEPTIONS.append(GetGeneratePath()) - del GetGeneratePath -except ImportError: - # it appears pywin32 is not installed, so no need to exclude. - pass - class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index b92a477a2f..929f0a5be8 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -23,22 +23,6 @@ def do_write(): return do_write - def test_win32com(self, tmpdir): - """ - win32com should not be prevented from caching COM interfaces - in gen_py. - """ - win32com = pytest.importorskip('win32com') - gen_py = win32com.__gen_path__ - target = os.path.join(gen_py, 'test_write') - sandbox = DirectorySandbox(str(tmpdir)) - try: - # attempt to create gen_py file - sandbox.run(self._file_writer(target)) - finally: - if os.path.exists(target): - os.remove(target) - def test_setup_py_with_BOM(self): """ It should be possible to execute a setup.py with a Byte Order Mark From b4d77154138d7fb7042153491e9b5c1af534eb4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Nov 2016 15:57:01 -0500 Subject: [PATCH 6305/8469] Add environment variable to detect APPVEYOR. Ref #851. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 299c35b7c2..9313a48207 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,7 @@ environment: + APPVEYOR: true + matrix: - PYTHON: "C:\\Python35-x64" - PYTHON: "C:\\Python27-x64" From e8d53c0b830744a3cec9c0080293c39dfbf5ac72 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Nov 2016 16:07:10 -0500 Subject: [PATCH 6306/8469] Skip failing test on appveyor until the cause can be uncovered. Ref #851. --- setuptools/tests/test_namespaces.py | 2 ++ tox.ini | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index c148577dfd..21fd69e702 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -13,6 +13,8 @@ class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 3), reason="Requires PEP 420") + @pytest.mark.skipif('os.environ.get("APPVEYOR")', + reason="https://github.com/pypa/setuptools/issues/851") def test_mixed_site_and_non_site(self, tmpdir): """ Installing two packages sharing the same namespace, one installed diff --git a/tox.ini b/tox.ini index 6e03aef21c..cfb682ee37 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ [testenv] deps=-rtests/requirements.txt -passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir +passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR commands=python -m pytest {posargs:-rsx} From 23aba916e1070d3cf9723af85a6ce07c89053931 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 21 Nov 2016 01:44:22 +0200 Subject: [PATCH 6307/8469] Fix #849 global-exclude globbing After #764, `global-exclude .pyc` no longer excluded `.pyc` files. This fixes that regression, and adds a test for this behaviour. --- setuptools/command/egg_info.py | 4 ++-- setuptools/tests/test_manifest.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6cc8f4c45e..c4555b3e51 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -457,7 +457,7 @@ def global_include(self, pattern): """ if self.allfiles is None: self.findall() - match = translate_pattern(os.path.join('**', pattern)) + match = translate_pattern(os.path.join('**', '*' + pattern)) found = [f for f in self.allfiles if match.match(f)] self.extend(found) return bool(found) @@ -466,7 +466,7 @@ def global_exclude(self, pattern): """ Exclude all files anywhere that match the pattern. """ - match = translate_pattern(os.path.join('**', pattern)) + match = translate_pattern(os.path.join('**', '*' + pattern)) return self._remove_files(match.match) def append(self, item): diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 602c43a274..62b6d708c1 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -449,6 +449,11 @@ def test_global_include(self): assert file_list.files == ['a.py', l('d/c.py')] self.assertWarnings() + file_list.process_template_line('global-include .txt') + file_list.sort() + assert file_list.files == ['a.py', 'b.txt', l('d/c.py')] + self.assertNoWarnings() + def test_global_exclude(self): l = make_local_path # global-exclude @@ -465,6 +470,13 @@ def test_global_exclude(self): assert file_list.files == ['b.txt'] self.assertWarnings() + file_list = FileList() + file_list.files = ['a.py', 'b.txt', l('d/c.pyc'), 'e.pyo'] + file_list.process_template_line('global-exclude .py[co]') + file_list.sort() + assert file_list.files == ['a.py', 'b.txt'] + self.assertNoWarnings() + def test_recursive_include(self): l = make_local_path # recursive-include From 11b921f2e17586e394639e7ddbcaeae727ece4d0 Mon Sep 17 00:00:00 2001 From: Thiebaud Weksteen Date: Tue, 1 Nov 2016 15:54:23 +1100 Subject: [PATCH 6308/8469] Change _add_defaults_data_files override and add unittest --- setuptools/command/sdist.py | 7 ++++--- setuptools/tests/test_sdist.py | 9 +++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 9975753d9f..ba980622af 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -142,9 +142,10 @@ def _add_defaults_python(self): for filename in filenames]) def _add_defaults_data_files(self): - """ - Don't add any data files, but why? - """ + try: + sdist_add_defaults._add_defaults_data_files(self) + except TypeError: + log.warn("data_files contains unexpected objects") def check_readme(self): for f in self.READMES: diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 609c7830f2..f34068dcd3 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -26,7 +26,8 @@ 'name': 'sdist_test', 'version': '0.0', 'packages': ['sdist_test'], - 'package_data': {'sdist_test': ['*.txt']} + 'package_data': {'sdist_test': ['*.txt']}, + 'data_files': [("data", [os.path.join("d", "e.dat")])], } SETUP_PY = """\ @@ -95,9 +96,12 @@ def setup_method(self, method): # Set up the rest of the test package test_pkg = os.path.join(self.temp_dir, 'sdist_test') os.mkdir(test_pkg) + data_folder = os.path.join(self.temp_dir, "d") + os.mkdir(data_folder) # *.rst was not included in package_data, so c.rst should not be # automatically added to the manifest when not under version control - for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: + for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst', + os.path.join(data_folder, "e.dat")]: # Just touch the files; their contents are irrelevant open(os.path.join(test_pkg, fname), 'w').close() @@ -126,6 +130,7 @@ def test_package_data_in_sdist(self): assert os.path.join('sdist_test', 'a.txt') in manifest assert os.path.join('sdist_test', 'b.txt') in manifest assert os.path.join('sdist_test', 'c.rst') not in manifest + assert os.path.join('d', 'e.dat') in manifest def test_defaults_case_sensitivity(self): """ From 959e12ca13a0a006100c2fe5284f69ee0d5b6fbb Mon Sep 17 00:00:00 2001 From: Liao Penghui Date: Fri, 25 Nov 2016 12:41:53 +0800 Subject: [PATCH 6309/8469] Make Entrypoint methods docs up to date. Entrypoint.load() is deprecated and it's recommend to use `require` and `resolve` separately. --- docs/pkg_resources.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 7b979ec303..9a45b9e317 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -835,6 +835,8 @@ addition, the following methods are provided: Load the entry point, returning the advertised Python object, or raise ``ImportError`` if it cannot be obtained. If `require` is a true value, then ``require(env, installer)`` is called before attempting the import. + Parameters to load are deprecated. Call ``require`` and ``resolve`` + separately. ``require(env=None, installer=None)`` Ensure that any "extras" needed by the entry point are available on @@ -846,6 +848,10 @@ addition, the following methods are provided: taking a ``Requirement`` instance and returning a matching importable ``Distribution`` instance or None. +``resolve()`` + Resolve the entry point from its module and attrs, returning the advertised + Python object. + ``__str__()`` The string form of an ``EntryPoint`` is a string that could be passed to ``EntryPoint.parse()`` to produce an equivalent ``EntryPoint``. From 175171116dc40af5274c88ec461dd2e94c1dabc5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Nov 2016 22:36:44 -0600 Subject: [PATCH 6310/8469] =?UTF-8?q?Bump=20version:=2028.8.0=20=E2=86=92?= =?UTF-8?q?=2029.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 34c1884c1b..589df541d3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 28.8.0 +current_version = 29.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index fc51401aeb..6286af632d 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="28.8.0", + version="29.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 7df349d07e6441a33427ad5c371f12bf6bedc529 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 26 Nov 2016 21:36:35 +0700 Subject: [PATCH 6311/8469] Added config module. --- setuptools/config.py | 367 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 367 insertions(+) create mode 100644 setuptools/config.py diff --git a/setuptools/config.py b/setuptools/config.py new file mode 100644 index 0000000000..94b2ab17a5 --- /dev/null +++ b/setuptools/config.py @@ -0,0 +1,367 @@ +import io +import os +import sys +from functools import partial + +from distutils.errors import DistutilsOptionError +from setuptools.py26compat import import_module +from setuptools.extern.six import string_types + + +class ConfigHandler(object): + """Handles metadata supplied in configuration files.""" + + section_prefix = None + + def __init__(self, target_obj, options): + sections = {} + + section_prefix = self.section_prefix + for section_name, section_options in options.items(): + if not section_name.startswith(section_prefix): + continue + + section_name = section_name.replace(section_prefix, '').strip(':') + sections[section_name] = section_options + + self.target_obj = target_obj + self.sections = sections + + @property + def parsers(self): + """Metadata item name to parser function mapping.""" + raise NotImplementedError( + '%s must provide .parsers property' % self.__class__.__name__) + + def __setitem__(self, option_name, value): + unknown = tuple() + target_obj = self.target_obj + + current_value = getattr(target_obj, option_name, unknown) + + if current_value is unknown: + raise KeyError(option_name) + + if current_value: + # Already inhabited. Skipping. + return + + parser = self.parsers.get(option_name) + if parser: + value = parser(value) + + setter = getattr(target_obj, 'set_%s' % option_name, None) + if setter is None: + setattr(target_obj, option_name, value) + else: + setter(value) + + @classmethod + def _parse_list(cls, value, separator=','): + """Represents value as a list. + + Value is split either by comma or by lines. + + :param value: + :param separator: List items separator character. + :rtype: list + """ + if isinstance(value, list): # _parse_complex case + return value + + if '\n' in value: + value = value.splitlines() + else: + value = value.split(separator) + + return [chunk.strip() for chunk in value] + + @classmethod + def _parse_dict(cls, value): + """Represents value as a dict. + + :param value: + :rtype: dict + """ + separator = '=' + result = {} + for line in cls._parse_list(value): + key, sep, val = line.partition(separator) + if sep != separator: + raise DistutilsOptionError( + 'Unable to parse option value to dict: %s' % value) + result[key.strip()] = val.strip() + + return result + + @classmethod + def _parse_bool(cls, value): + """Represents value as boolean. + + :param value: + :rtype: bool + """ + value = value.lower() + return value in ('1', 'true', 'yes') + + @classmethod + def _parse_file(cls, value): + """Represents value as a string, allowing including text + from nearest files using include(). + + Examples: + include: LICENSE + include: src/file.txt + + :param str value: + :rtype: str + """ + if not isinstance(value, string_types): + return value + + include_directive = 'file:' + if not value.startswith(include_directive): + return value + + filepath = value.replace(include_directive, '').strip() + + if os.path.isfile(filepath): + with io.open(filepath, encoding='utf-8') as f: + value = f.read() + + return value + + @classmethod + def _get_parser_compound(cls, *parse_methods): + """Returns parser function to represents value as a list. + + Parses a value applying given methods one after another. + + :param parse_methods: + :rtype: callable + """ + def parse(value): + parsed = value + + for method in parse_methods: + parsed = method(parsed) + + return parsed + + return parse + + @classmethod + def _parse_section_to_dict(cls, section_options, values_parser=None): + """Parses section options into a dictionary. + + Optionally applies a given parser to values. + + :param dict section_options: + :param callable values_parser: + :rtype: dict + """ + value = {} + values_parser = values_parser or (lambda val: val) + for key, (_, val) in section_options.items(): + value[key] = values_parser(val) + return value + + def parse_section(self, section_options): + """Parses configuration file section. + + :param dict section_options: + """ + for (name, (_, value)) in section_options.items(): + try: + self[name] = value + except KeyError: + raise DistutilsOptionError( + 'Unknown distribution option: %s' % name) + + def parse(self): + """Parses configuration file items from one + or more related sections. + + """ + for section_name, section_options in self.sections.items(): + + method_postfix = '' + if section_name: # [section:option] variant + method_postfix = '_%s' % section_name + + section_parser_method = getattr( + self, 'parse_section%s' % method_postfix, None) + + if section_parser_method is None: + raise DistutilsOptionError( + 'Unsupported distribution option section: [%s:%s]' % ( + self.section_prefix, section_name)) + + section_parser_method(section_options) + + +class ConfigMetadataHandler(ConfigHandler): + + section_prefix = 'metadata' + + @property + def parsers(self): + """Metadata item name to parser function mapping.""" + parse_list = self._parse_list + parse_file = self._parse_file + + return { + 'platforms': parse_list, + 'keywords': parse_list, + 'provides': parse_list, + 'requires': parse_list, + 'obsoletes': parse_list, + 'classifiers': self._get_parser_compound(parse_file, parse_list), + 'license': parse_file, + 'description': parse_file, + 'long_description': parse_file, + 'version': self._parse_version, + } + + def parse_section_classifiers(self, section_options): + """Parses configuration file section. + + :param dict section_options: + """ + classifiers = [] + for begin, (_, rest) in section_options.items(): + classifiers.append('%s :%s' % (begin.title(), rest)) + + self['classifiers'] = classifiers + + def _parse_version(self, value): + """Parses `version` option value. + + :param value: + :rtype: str + + """ + attr_directive = 'attr:' + if not value.startswith(attr_directive): + return value + + attrs_path = value.replace(attr_directive, '').strip().split('.') + attr_name = attrs_path.pop() + + module_name = '.'.join(attrs_path) + module_name = module_name or '__init__' + + sys.path.insert(0, os.getcwd()) + try: + module = import_module(module_name) + version = getattr(module, attr_name) + + if callable(version): + version = version() + + if not isinstance(version, string_types): + if hasattr(version, '__iter__'): + version = '.'.join(map(str, version)) + else: + version = '%s' % version + + finally: + sys.path = sys.path[1:] + + return version + + +class ConfigOptionsHandler(ConfigHandler): + + section_prefix = 'options' + + @property + def parsers(self): + """Metadata item name to parser function mapping.""" + parse_list = self._parse_list + parse_list_semicolon = partial(self._parse_list, separator=';') + parse_bool = self._parse_bool + parse_dict = self._parse_dict + + return { + 'zip_safe': parse_bool, + 'use_2to3': parse_bool, + 'include_package_data': parse_bool, + 'package_dir': parse_dict, + 'use_2to3_fixers': parse_list, + 'use_2to3_exclude_fixers': parse_list, + 'convert_2to3_doctests': parse_list, + 'scripts': parse_list, + 'eager_resources': parse_list, + 'dependency_links': parse_list, + 'namespace_packages': parse_list, + 'install_requires': parse_list_semicolon, + 'setup_requires': parse_list_semicolon, + 'tests_require': parse_list_semicolon, + 'packages': self._parse_packages, + 'entry_points': self._parse_file, + } + + def _parse_packages(self, value): + """Parses `packages` option value. + + :param value: + :rtype: list + """ + find_directive = 'find:' + + if not value.startswith(find_directive): + return self._parse_list(value) + + from setuptools import find_packages + return find_packages() + + def parse_section_dependency_links(self, section_options): + """Parses `dependency_links` configuration file section. + + :param dict section_options: + """ + parsed = self._parse_section_to_dict(section_options) + self['dependency_links'] = list(parsed.values()) + + def parse_section_entry_points(self, section_options): + """Parses `entry_points` configuration file section. + + :param dict section_options: + """ + parsed = self._parse_section_to_dict(section_options, self._parse_list) + self['entry_points'] = parsed + + def _parse_package_data(self, section_options): + parsed = self._parse_section_to_dict(section_options, self._parse_list) + + root = parsed.get('*') + if root: + parsed[''] = root + del parsed['*'] + + return parsed + + def parse_section_package_data(self, section_options): + """Parses `package_data` configuration file section. + + :param dict section_options: + """ + self['package_data'] = self._parse_package_data(section_options) + + def parse_section_exclude_package_data(self, section_options): + """Parses `exclude_package_data` configuration file section. + + :param dict section_options: + """ + self['exclude_package_data'] = self._parse_package_data( + section_options) + + def parse_section_extras_require(self, section_options): + """Parses `extras_require` configuration file section. + + :param dict section_options: + """ + parse_list = partial(self._parse_list, separator=';') + self['extras_require'] = self._parse_section_to_dict( + section_options, parse_list) From 69130241500d78735375e36eca1b3dc6a7048dd6 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 26 Nov 2016 21:42:08 +0700 Subject: [PATCH 6312/8469] Metadata and options are now could be set in setup.cfg (see #394). --- setuptools/dist.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 612040c855..c975abe00b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -19,6 +19,7 @@ from setuptools.depends import Require from setuptools import windows_support from setuptools.monkey import get_unpatched +from setuptools.config import ConfigMetadataHandler, ConfigOptionsHandler import pkg_resources @@ -342,6 +343,16 @@ def __init__(self, attrs=None): if getattr(self, 'python_requires', None): self.metadata.python_requires = self.python_requires + def parse_config_files(self, filenames=None): + """Parses configuration files from various levels + and loads configuration. + + """ + _Distribution.parse_config_files(self, filenames=filenames) + + ConfigMetadataHandler(self.metadata, self.command_options).parse() + ConfigOptionsHandler(self, self.command_options).parse() + def parse_command_line(self): """Process features after parsing command line options""" result = _Distribution.parse_command_line(self) From 58a5c4ff662a19d07b81da4c7b08e851dc2f65c8 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 26 Nov 2016 21:42:27 +0700 Subject: [PATCH 6313/8469] Added tests for config module. --- setuptools/tests/test_config.py | 339 ++++++++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 setuptools/tests/test_config.py diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py new file mode 100644 index 0000000000..0ef7a9946a --- /dev/null +++ b/setuptools/tests/test_config.py @@ -0,0 +1,339 @@ +import contextlib +import pytest +from distutils.errors import DistutilsOptionError +from setuptools.dist import Distribution +from setuptools.config import ConfigHandler + + +class ErrConfigHandler(ConfigHandler): + """Erroneous handler. Fails to implement required methods.""" + + +def fake_env(tmpdir, setup_cfg, setup_py=None): + + if setup_py is None: + setup_py = ( + 'from setuptools import setup\n' + 'setup()\n' + ) + + tmpdir.join('setup.py').write(setup_py) + tmpdir.join('setup.cfg').write(setup_cfg) + + package_name = 'fake_package' + dir_package = tmpdir.mkdir(package_name) + dir_package.join('__init__.py').write( + 'VERSION = (1, 2, 3)\n' + '\n' + 'VERSION_MAJOR = 1' + '\n' + 'def get_version():\n' + ' return [3, 4, 5, "dev"]\n' + '\n' + ) + + +@contextlib.contextmanager +def get_dist(tmpdir, kwargs_initial=None, parse=True): + kwargs_initial = kwargs_initial or {} + + with tmpdir.as_cwd(): + dist = Distribution(kwargs_initial) + dist.script_name = 'setup.py' + parse and dist.parse_config_files() + + yield dist + + +def test_parsers_implemented(): + + with pytest.raises(NotImplementedError): + handler = ErrConfigHandler(None, {}) + handler.parsers + + +class TestMetadata: + + def test_basic(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'version = 10.1.1\n' + 'description = Some description\n' + 'long_description = file: README\n' + 'name = fake_name\n' + 'keywords = one, two\n' + 'provides = package, package.sub\n' + 'license = otherlic\n' + ) + + tmpdir.join('README').write('readme contents\nline2') + + meta_initial = { + # This will be used so `otherlic` won't replace it. + 'license': 'BSD 3-Clause License', + } + + with get_dist(tmpdir, meta_initial) as dist: + metadata = dist.metadata + + assert metadata.version == '10.1.1' + assert metadata.description == 'Some description' + assert metadata.long_description == 'readme contents\nline2' + assert metadata.provides == ['package', 'package.sub'] + assert metadata.license == 'BSD 3-Clause License' + assert metadata.name == 'fake_name' + assert metadata.keywords == ['one', 'two'] + + def test_version(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'version = attr: fake_package.VERSION\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + + tmpdir.join('setup.cfg').write( + '[metadata]\n' + 'version = attr: fake_package.get_version\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '3.4.5.dev' + + tmpdir.join('setup.cfg').write( + '[metadata]\n' + 'version = attr: fake_package.VERSION_MAJOR\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1' + + subpack = tmpdir.join('fake_package').mkdir('subpackage') + subpack.join('__init__.py').write('') + subpack.join('submodule.py').write('VERSION = (2016, 11, 26)') + + tmpdir.join('setup.cfg').write( + '[metadata]\n' + 'version = attr: fake_package.subpackage.submodule.VERSION\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '2016.11.26' + + def test_unknown_meta_item(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'name = fake_name\n' + 'unknown = some\n' + ) + with get_dist(tmpdir, parse=False) as dist: + with pytest.raises(DistutilsOptionError): + dist.parse_config_files() + + def test_usupported_section(self, tmpdir): + + fake_env( + tmpdir, + '[metadata:some]\n' + 'key = val\n' + ) + with get_dist(tmpdir, parse=False) as dist: + with pytest.raises(DistutilsOptionError): + dist.parse_config_files() + + def test_classifiers(self, tmpdir): + expected = { + 'Framework :: Django', + 'Programming Language :: Python :: 3.5', + } + + # From file. + fake_env( + tmpdir, + '[metadata]\n' + 'classifiers = file: classifiers\n' + ) + + tmpdir.join('classifiers').write( + 'Framework :: Django\n' + 'Programming Language :: Python :: 3.5\n' + ) + + with get_dist(tmpdir) as dist: + assert set(dist.metadata.classifiers) == expected + + # From section. + tmpdir.join('setup.cfg').write( + '[metadata:classifiers]\n' + 'Framework :: Django\n' + 'Programming Language :: Python :: 3.5\n' + ) + + with get_dist(tmpdir) as dist: + assert set(dist.metadata.classifiers) == expected + + +class TestOptions: + + def test_basic(self, tmpdir): + + fake_env( + tmpdir, + '[options]\n' + 'zip_safe = True\n' + 'use_2to3 = 1\n' + 'include_package_data = yes\n' + 'package_dir = b=c, =src\n' + 'packages = pack_a, pack_b.subpack\n' + 'namespace_packages = pack1, pack2\n' + 'use_2to3_fixers = your.fixers, or.here\n' + 'use_2to3_exclude_fixers = one.here, two.there\n' + 'convert_2to3_doctests = src/tests/one.txt, src/two.txt\n' + 'scripts = bin/one.py, bin/two.py\n' + 'eager_resources = bin/one.py, bin/two.py\n' + 'install_requires = docutils>=0.3; pack ==1.1, ==1.3; hey\n' + 'tests_require = mock==0.7.2; pytest\n' + 'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n' + 'dependency_links = http://some.com/here/1, ' + 'http://some.com/there/2\n' + ) + with get_dist(tmpdir) as dist: + assert dist.zip_safe + assert dist.use_2to3 + assert dist.include_package_data + assert dist.package_dir == {'': 'src', 'b': 'c'} + assert set(dist.packages) == {'pack_a', 'pack_b.subpack'} + assert set(dist.namespace_packages) == {'pack1', 'pack2'} + assert set(dist.use_2to3_fixers) == {'your.fixers', 'or.here'} + assert set(dist.use_2to3_exclude_fixers) == { + 'one.here', 'two.there'} + assert set(dist.convert_2to3_doctests) == { + 'src/tests/one.txt', 'src/two.txt'} + assert set(dist.scripts) == {'bin/one.py', 'bin/two.py'} + assert set(dist.dependency_links) == { + 'http://some.com/here/1', + 'http://some.com/there/2' + } + assert set(dist.install_requires) == { + 'docutils>=0.3', + 'pack ==1.1, ==1.3', + 'hey' + } + assert set(dist.setup_requires) == { + 'docutils>=0.3', + 'spack ==1.1, ==1.3', + 'there' + } + assert set(dist.tests_require) == { + 'mock==0.7.2', + 'pytest' + } + + def test_package_dir_fail(self, tmpdir): + fake_env( + tmpdir, + '[options]\n' + 'package_dir = a b\n' + ) + with get_dist(tmpdir, parse=False) as dist: + with pytest.raises(DistutilsOptionError): + dist.parse_config_files() + + def test_package_data(self, tmpdir): + fake_env( + tmpdir, + '[options:package_data]\n' + '* = *.txt, *.rst\n' + 'hello = *.msg\n' + '\n' + '[options:exclude_package_data]\n' + '* = fake1.txt, fake2.txt\n' + 'hello = *.dat\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.package_data == { + '': ['*.txt', '*.rst'], + 'hello': ['*.msg'], + } + assert dist.exclude_package_data == { + '': ['fake1.txt', 'fake2.txt'], + 'hello': ['*.dat'], + } + + def test_packages(self, tmpdir): + fake_env( + tmpdir, + '[options]\n' + 'packages = find:\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.packages == ['fake_package'] + + def test_extras_require(self, tmpdir): + fake_env( + tmpdir, + '[options:extras_require]\n' + 'pdf = ReportLab>=1.2; RXP\n' + 'rest = docutils>=0.3; pack ==1.1, ==1.3\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.extras_require == { + 'pdf': ['ReportLab>=1.2', 'RXP'], + 'rest': ['docutils>=0.3', 'pack ==1.1, ==1.3'] + } + + def test_entry_points(self, tmpdir): + fake_env( + tmpdir, + '[options:entry_points]\n' + 'group1 = point1 = pack.module:func, ' + '.point2 = pack.module2:func_rest [rest]\n' + 'group2 = point3 = pack.module:func2\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.entry_points == { + 'group1': [ + 'point1 = pack.module:func', + '.point2 = pack.module2:func_rest [rest]', + ], + 'group2': ['point3 = pack.module:func2'] + } + + expected = ( + '[blogtool.parsers]\n' + '.rst = some.nested.module:SomeClass.some_classmethod[reST]\n' + ) + + tmpdir.join('entry_points').write(expected) + + # From file. + tmpdir.join('setup.cfg').write( + '[options]\n' + 'entry_points = file: entry_points\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.entry_points == expected + + def test_dependency_links(self, tmpdir): + expected = { + 'http://some.com/here/1', + 'http://some.com/there/2' + } + # From section. + fake_env( + tmpdir, + '[options:dependency_links]\n' + '1 = http://some.com/here/1\n' + '2 = http://some.com/there/2\n' + ) + + with get_dist(tmpdir) as dist: + assert set(dist.dependency_links) == expected From 280d8e98ba0c3c4e37e38dff79aaf6e9efaf4175 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 26 Nov 2016 22:21:38 +0700 Subject: [PATCH 6314/8469] Tests for config module 2.6 compatible. --- setuptools/tests/test_config.py | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 0ef7a9946a..d044cbac82 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -145,10 +145,10 @@ def test_usupported_section(self, tmpdir): dist.parse_config_files() def test_classifiers(self, tmpdir): - expected = { + expected = set([ 'Framework :: Django', 'Programming Language :: Python :: 3.5', - } + ]) # From file. fake_env( @@ -205,32 +205,32 @@ def test_basic(self, tmpdir): assert dist.use_2to3 assert dist.include_package_data assert dist.package_dir == {'': 'src', 'b': 'c'} - assert set(dist.packages) == {'pack_a', 'pack_b.subpack'} - assert set(dist.namespace_packages) == {'pack1', 'pack2'} - assert set(dist.use_2to3_fixers) == {'your.fixers', 'or.here'} - assert set(dist.use_2to3_exclude_fixers) == { - 'one.here', 'two.there'} - assert set(dist.convert_2to3_doctests) == { - 'src/tests/one.txt', 'src/two.txt'} - assert set(dist.scripts) == {'bin/one.py', 'bin/two.py'} - assert set(dist.dependency_links) == { + assert set(dist.packages) == set(['pack_a', 'pack_b.subpack']) + assert set(dist.namespace_packages) == set(['pack1', 'pack2']) + assert set(dist.use_2to3_fixers) == set(['your.fixers', 'or.here']) + assert set(dist.use_2to3_exclude_fixers) == set([ + 'one.here', 'two.there']) + assert set(dist.convert_2to3_doctests) == set([ + 'src/tests/one.txt', 'src/two.txt']) + assert set(dist.scripts) == set(['bin/one.py', 'bin/two.py']) + assert set(dist.dependency_links) == set([ 'http://some.com/here/1', 'http://some.com/there/2' - } - assert set(dist.install_requires) == { + ]) + assert set(dist.install_requires) == set([ 'docutils>=0.3', 'pack ==1.1, ==1.3', 'hey' - } - assert set(dist.setup_requires) == { + ]) + assert set(dist.setup_requires) == set([ 'docutils>=0.3', 'spack ==1.1, ==1.3', 'there' - } - assert set(dist.tests_require) == { + ]) + assert set(dist.tests_require) == set([ 'mock==0.7.2', 'pytest' - } + ]) def test_package_dir_fail(self, tmpdir): fake_env( @@ -323,10 +323,10 @@ def test_entry_points(self, tmpdir): assert dist.entry_points == expected def test_dependency_links(self, tmpdir): - expected = { + expected = set([ 'http://some.com/here/1', 'http://some.com/there/2' - } + ]) # From section. fake_env( tmpdir, From de11b125f7a94a13aff478482e3a83a30176f7b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Nov 2016 21:24:11 -0600 Subject: [PATCH 6315/8469] Now by default include the windows script launchers. Fixes #861 by addressing the underlying cause. --- .travis.yml | 2 -- CHANGES.rst | 10 ++++++++++ setup.py | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 006316d16d..30b69a69fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,6 @@ script: #- python -m tox - tox -before_deploy: - - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 deploy: provider: pypi # Also update server in setup.cfg diff --git a/CHANGES.rst b/CHANGES.rst index 3b9f0894b0..99041cde6b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,16 @@ CHANGES ======= +v29.0.1 +------- + +* #861: Re-release of v29.0.1 with the executable script + launchers bundled. Now, launchers are included by default + and users that want to disable this behavior must set the + environment variable + 'SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES' to + a false value like "false" or "0". + v29.0.0 ------- diff --git a/setup.py b/setup.py index 6286af632d..30c19d6638 100755 --- a/setup.py +++ b/setup.py @@ -54,8 +54,8 @@ def _gen_console_scripts(): ) force_windows_specific_files = ( - os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES") - not in (None, "", "0") + os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES", "1").lower() + not in ("", "0", "false", "no") ) include_windows_files = ( From 0be2dfcfd85044932127ee47ad5d16e5069d3b3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Nov 2016 21:28:45 -0600 Subject: [PATCH 6316/8469] =?UTF-8?q?Bump=20version:=2029.0.0=20=E2=86=92?= =?UTF-8?q?=2029.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 589df541d3..4e59c74efb 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 29.0.0 +current_version = 29.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 30c19d6638..79d303088a 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="29.0.0", + version="29.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a83ae992278916ade263379f2d7adc56a4539ff4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Nov 2016 18:20:05 -0600 Subject: [PATCH 6317/8469] Evaluate the expression directly. Workaround for #860. --- setuptools/tests/test_namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 21fd69e702..2d44ad863a 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -13,7 +13,7 @@ class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 3), reason="Requires PEP 420") - @pytest.mark.skipif('os.environ.get("APPVEYOR")', + @pytest.mark.skipif(os.environ.get("APPVEYOR"), reason="https://github.com/pypa/setuptools/issues/851") def test_mixed_site_and_non_site(self, tmpdir): """ From b890d3d27602b6c18985c735a0ba0933232deb82 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 09:54:40 -0500 Subject: [PATCH 6318/8469] Clean up conftest.py --- conftest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/conftest.py b/conftest.py index 47a5d888c9..ec8ddd8b4e 100644 --- a/conftest.py +++ b/conftest.py @@ -1,8 +1,7 @@ -import pytest - pytest_plugins = 'setuptools.tests.fixtures' def pytest_addoption(parser): - parser.addoption("--package_name", action="append", default=[], - help="list of package_name to pass to test functions") - + parser.addoption( + "--package_name", action="append", default=[], + help="list of package_name to pass to test functions", + ) From 413c234459de94766c8c57f10d11ef1599ae6ac0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 09:59:21 -0500 Subject: [PATCH 6319/8469] Monkeypatch the 'setuptools.__file__' attribute in test setup to be absolute. Workaround for #852. --- conftest.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/conftest.py b/conftest.py index ec8ddd8b4e..0da92be9ad 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,25 @@ +import os + + pytest_plugins = 'setuptools.tests.fixtures' + def pytest_addoption(parser): parser.addoption( "--package_name", action="append", default=[], help="list of package_name to pass to test functions", ) + + +def pytest_configure(): + _issue_852_workaround() + + +def _issue_852_workaround(): + """ + Patch 'setuptools.__file__' with an absolute path + for forward compatibility with Python 3. + Workaround for https://github.com/pypa/setuptools/issues/852 + """ + setuptools = __import__('setuptools') + setuptools.__file__ = os.path.abspath(setuptools.__file__) From 2c1ea18266b558cb208c070eed7de60e922aa91a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 10:55:55 -0500 Subject: [PATCH 6320/8469] Stop testing on pypy3 until Travis gets pypy 5.5 or later. Ref #864. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 30b69a69fe..2f9b6a7a06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ python: - "3.6-dev" - nightly - pypy - - pypy3 env: - "" - LC_ALL=C LC_CTYPE=C From b47fe15b9039a165589353a1a43f6dfe3bbe3a8e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 10:56:39 -0500 Subject: [PATCH 6321/8469] Hard fail on Python 3 prior to 3.3. Fixes #864. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 99041cde6b..e6fa0d66ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGES ======= +v30.0.0 +------- + +* #864: Drop support for Python 3.2. Systems requiring + Python 3.2 support must use 'setuptools < 30'. + v29.0.1 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a323857cc9..dd561d2bef 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -75,11 +75,7 @@ __import__('pkg_resources.extern.packaging.markers') if (3, 0) < sys.version_info < (3, 3): - msg = ( - "Support for Python 3.0-3.2 has been dropped. Future versions " - "will fail here." - ) - warnings.warn(msg) + raise RuntimeError("Python 3.3 or later is required") # declare some globals that will be defined later to # satisfy the linters. From d2287000895d403fd50c8c5777e9c67f22268d8b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:06:39 -0500 Subject: [PATCH 6322/8469] Update changelog. Ref #840. --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index e6fa0d66ef..16cc06be18 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ v30.0.0 * #864: Drop support for Python 3.2. Systems requiring Python 3.2 support must use 'setuptools < 30'. +* #825: Suppress warnings for single files. v29.0.1 ------- From 7924b1ff5eb7b11299cb8fa469e1b74c13d86f3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:15:23 -0500 Subject: [PATCH 6323/8469] Update changelog. Ref #843. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 16cc06be18..2d48c7dab1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,8 +7,13 @@ v30.0.0 * #864: Drop support for Python 3.2. Systems requiring Python 3.2 support must use 'setuptools < 30'. + * #825: Suppress warnings for single files. +* #830 via #843: Once again restored inclusion of data + files to sdists, but now trap TypeError caused by + techniques employed rjsmin and similar. + v29.0.1 ------- From 5cfce47ddb304fc95660c1086f3230fc8fdead61 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:23:45 -0500 Subject: [PATCH 6324/8469] Use super to resolve the superclass, but fall back to direct access on Python 2 where old style classes are used. Ref #843. --- setuptools/command/sdist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index ba980622af..84e29a1b7d 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -143,7 +143,10 @@ def _add_defaults_python(self): def _add_defaults_data_files(self): try: - sdist_add_defaults._add_defaults_data_files(self) + if six.PY2: + sdist_add_defaults._add_defaults_data_files(self) + else: + super()._add_defaults_data_files() except TypeError: log.warn("data_files contains unexpected objects") From d42c2ace9c89dccf0076c17d33f7202e05f97bc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:30:26 -0500 Subject: [PATCH 6325/8469] cast the value to a bool so pytest doesn't try to eval it --- setuptools/tests/test_namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 2d44ad863a..28c5e9de99 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -13,7 +13,7 @@ class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 3), reason="Requires PEP 420") - @pytest.mark.skipif(os.environ.get("APPVEYOR"), + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") def test_mixed_site_and_non_site(self, tmpdir): """ From d64cca85dc48306a7745de4ae5224d29f5e58003 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:35:47 -0500 Subject: [PATCH 6326/8469] =?UTF-8?q?Bump=20version:=2029.0.1=20=E2=86=92?= =?UTF-8?q?=2030.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4e59c74efb..55c86a3cef 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 29.0.1 +current_version = 30.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 79d303088a..26aaec6b4f 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="29.0.1", + version="30.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 5ff82539955b291be7b638a38ed4775960417681 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Dec 2016 11:38:36 -0500 Subject: [PATCH 6327/8469] Remove superfluous heading in changelog --- CHANGES.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2d48c7dab1..7daf81b236 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,3 @@ -======= -CHANGES -======= - v30.0.0 ------- From bce931606700438765f63d7b0784122506619061 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Fri, 2 Dec 2016 11:20:18 +0100 Subject: [PATCH 6328/8469] Add python_requires to setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 26aaec6b4f..eda59c8ce3 100755 --- a/setup.py +++ b/setup.py @@ -156,6 +156,7 @@ def pypi_link(pkg_filename): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), + python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*', extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2016.9.26", From 2e0b4d41da9042cf658499c95ec506a3b38734d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Dec 2016 09:11:01 -0500 Subject: [PATCH 6329/8469] Update changelog. Ref #846. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7daf81b236..494c84892f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v30.1.0 +------- + +* #846: Also trap 'socket.error' when opening URLs in + package_index. + v30.0.0 ------- From 03083d6f1596aaee9c7c46e58e57e8127b17dd2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Dec 2016 09:22:53 -0500 Subject: [PATCH 6330/8469] Update changelog. Ref #853. --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 494c84892f..096d77bf82 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ v30.1.0 * #846: Also trap 'socket.error' when opening URLs in package_index. +* #849: Manifest processing now matches the filename + pattern anywhere in the filename and not just at the + start. Restores behavior found prior to 28.5.0. + v30.0.0 ------- From aac9f9f31c0fdb97c52e343be6b8a641b2341232 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Dec 2016 09:38:25 -0500 Subject: [PATCH 6331/8469] Update docs to reflect supported interface. Ref #859. --- docs/pkg_resources.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 9a45b9e317..e8412b3371 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -831,12 +831,9 @@ correspond exactly to the constructor argument names: ``name``, ``module_name``, ``attrs``, ``extras``, and ``dist`` are all available. In addition, the following methods are provided: -``load(require=True, env=None, installer=None)`` - Load the entry point, returning the advertised Python object, or raise - ``ImportError`` if it cannot be obtained. If `require` is a true value, - then ``require(env, installer)`` is called before attempting the import. - Parameters to load are deprecated. Call ``require`` and ``resolve`` - separately. +``load()`` + Load the entry point, returning the advertised Python object. Effectively + calls ``self.require()`` then returns ``self.resolve()``. ``require(env=None, installer=None)`` Ensure that any "extras" needed by the entry point are available on @@ -850,7 +847,7 @@ addition, the following methods are provided: ``resolve()`` Resolve the entry point from its module and attrs, returning the advertised - Python object. + Python object. Raises ``ImportError`` if it cannot be obtained. ``__str__()`` The string form of an ``EntryPoint`` is a string that could be passed to From 6608d8f7e0522b75445a984693da65005155895c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Dec 2016 10:14:19 -0500 Subject: [PATCH 6332/8469] =?UTF-8?q?Bump=20version:=2030.0.0=20=E2=86=92?= =?UTF-8?q?=2030.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 55c86a3cef..666881387c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.0.0 +current_version = 30.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 26aaec6b4f..103c87e8a2 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.0.0", + version="30.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 03b00c2b81142b9b329d23fe3d055a14c8698daf Mon Sep 17 00:00:00 2001 From: stepshal Date: Mon, 21 Nov 2016 23:02:21 +0700 Subject: [PATCH 6333/8469] Upgrade packaging to 16.8 --- pkg_resources/_vendor/packaging/__about__.py | 2 +- pkg_resources/_vendor/packaging/markers.py | 24 ++++++++++++++++---- pkg_resources/_vendor/vendored.txt | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index c21a758b82..95d330ef82 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -12,7 +12,7 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.7" +__version__ = "16.8" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index c5d29cd99a..892e578edd 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -52,13 +52,26 @@ def __str__(self): def __repr__(self): return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) + def serialize(self): + raise NotImplementedError + class Variable(Node): - pass + + def serialize(self): + return str(self) class Value(Node): - pass + + def serialize(self): + return '"{0}"'.format(self) + + +class Op(Node): + + def serialize(self): + return str(self) VARIABLE = ( @@ -103,6 +116,7 @@ class Value(Node): ) MARKER_OP = VERSION_CMP | L("not in") | L("in") +MARKER_OP.setParseAction(lambda s, l, t: Op(t[0])) MARKER_VALUE = QuotedString("'") | QuotedString('"') MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0])) @@ -149,7 +163,7 @@ def _format_marker(marker, first=True): else: return "(" + " ".join(inner) + ")" elif isinstance(marker, tuple): - return '{0} {1} "{2}"'.format(*marker) + return " ".join([m.serialize() for m in marker]) else: return marker @@ -168,13 +182,13 @@ def _format_marker(marker, first=True): def _eval_op(lhs, op, rhs): try: - spec = Specifier("".join([op, rhs])) + spec = Specifier("".join([op.serialize(), rhs])) except InvalidSpecifier: pass else: return spec.contains(lhs) - oper = _operators.get(op) + oper = _operators.get(op.serialize()) if oper is None: raise UndefinedComparison( "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 6b5eb450ff..9a94c5bcc2 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ -packaging==16.7 +packaging==16.8 pyparsing==2.1.10 six==1.10.0 appdirs==1.4.0 From 810eb439a629e1b2bc2d078f138126356e95a9bc Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 10:41:54 +0700 Subject: [PATCH 6334/8469] Added ConfigHandler.strict_mode. --- setuptools/config.py | 21 +++++++++++++++++++-- setuptools/tests/test_config.py | 15 +++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 94b2ab17a5..3546ace997 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -12,6 +12,16 @@ class ConfigHandler(object): """Handles metadata supplied in configuration files.""" section_prefix = None + """Prefix for config sections handled by this handler. + Must be provided by class heirs. + + """ + + strict_mode = True + """Flag. Whether unknown options in config should + raise DistutilsOptionError exception, or pass silently. + + """ def __init__(self, target_obj, options): sections = {} @@ -174,9 +184,11 @@ def parse_section(self, section_options): for (name, (_, value)) in section_options.items(): try: self[name] = value + except KeyError: - raise DistutilsOptionError( - 'Unknown distribution option: %s' % name) + if self.strict_mode: + raise DistutilsOptionError( + 'Unknown distribution option: %s' % name) def parse(self): """Parses configuration file items from one @@ -203,6 +215,11 @@ def parse(self): class ConfigMetadataHandler(ConfigHandler): section_prefix = 'metadata' + strict_mode = False + """We need to keep it loose, to be compatible with `pbr` package + which also uses `metadata` section. + + """ @property def parsers(self): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index d044cbac82..f1b1aa3f42 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -130,8 +130,7 @@ def test_unknown_meta_item(self, tmpdir): 'unknown = some\n' ) with get_dist(tmpdir, parse=False) as dist: - with pytest.raises(DistutilsOptionError): - dist.parse_config_files() + dist.parse_config_files() # Skip unknown. def test_usupported_section(self, tmpdir): @@ -274,6 +273,18 @@ def test_packages(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.packages == ['fake_package'] + def test_unknown_options_item(self, tmpdir): + + fake_env( + tmpdir, + '[options]\n' + 'zip_safe = True\n' + 'usr_2to3 = 1\n' + ) + with get_dist(tmpdir, parse=False) as dist: + with pytest.raises(DistutilsOptionError): + dist.parse_config_files() + def test_extras_require(self, tmpdir): fake_env( tmpdir, From a5567b762cfe48a8e5a4aada5a997e5fd8072420 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 11:05:11 +0700 Subject: [PATCH 6335/8469] Implemented proper dangling option values support. --- setuptools/config.py | 4 +- setuptools/tests/test_config.py | 111 ++++++++++++++++++++++++++++---- 2 files changed, 100 insertions(+), 15 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 3546ace997..ef4169955d 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -70,7 +70,7 @@ def __setitem__(self, option_name, value): def _parse_list(cls, value, separator=','): """Represents value as a list. - Value is split either by comma or by lines. + Value is split either by separator (defaults to comma) or by lines. :param value: :param separator: List items separator character. @@ -84,7 +84,7 @@ def _parse_list(cls, value, separator=','): else: value = value.split(separator) - return [chunk.strip() for chunk in value] + return [chunk.strip() for chunk in value if chunk.strip()] @classmethod def _parse_dict(cls, value): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index f1b1aa3f42..b4bd089c52 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -86,6 +86,27 @@ def test_basic(self, tmpdir): assert metadata.name == 'fake_name' assert metadata.keywords == ['one', 'two'] + def test_multiline(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'name = fake_name\n' + 'keywords =\n' + ' one\n' + ' two\n' + 'classifiers =\n' + ' Framework :: Django\n' + ' Programming Language :: Python :: 3.5\n' + ) + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.keywords == ['one', 'two'] + assert metadata.classifiers == [ + 'Framework :: Django', + 'Programming Language :: Python :: 3.5', + ] + def test_version(self, tmpdir): fake_env( @@ -204,32 +225,96 @@ def test_basic(self, tmpdir): assert dist.use_2to3 assert dist.include_package_data assert dist.package_dir == {'': 'src', 'b': 'c'} - assert set(dist.packages) == set(['pack_a', 'pack_b.subpack']) - assert set(dist.namespace_packages) == set(['pack1', 'pack2']) - assert set(dist.use_2to3_fixers) == set(['your.fixers', 'or.here']) - assert set(dist.use_2to3_exclude_fixers) == set([ - 'one.here', 'two.there']) - assert set(dist.convert_2to3_doctests) == set([ + assert dist.packages == ['pack_a', 'pack_b.subpack'] + assert dist.namespace_packages == ['pack1', 'pack2'] + assert dist.use_2to3_fixers == ['your.fixers', 'or.here'] + assert dist.use_2to3_exclude_fixers == ['one.here', 'two.there'] + assert dist.convert_2to3_doctests == ([ 'src/tests/one.txt', 'src/two.txt']) - assert set(dist.scripts) == set(['bin/one.py', 'bin/two.py']) - assert set(dist.dependency_links) == set([ + assert dist.scripts == ['bin/one.py', 'bin/two.py'] + assert dist.dependency_links == ([ 'http://some.com/here/1', 'http://some.com/there/2' ]) - assert set(dist.install_requires) == set([ + assert dist.install_requires == ([ 'docutils>=0.3', 'pack ==1.1, ==1.3', 'hey' ]) - assert set(dist.setup_requires) == set([ + assert dist.setup_requires == ([ 'docutils>=0.3', 'spack ==1.1, ==1.3', 'there' ]) - assert set(dist.tests_require) == set([ - 'mock==0.7.2', - 'pytest' + assert dist.tests_require == ['mock==0.7.2', 'pytest'] + + def test_multiline(self, tmpdir): + fake_env( + tmpdir, + '[options]\n' + 'package_dir = \n' + ' b=c\n' + ' =src\n' + 'packages = \n' + ' pack_a\n' + ' pack_b.subpack\n' + 'namespace_packages = \n' + ' pack1\n' + ' pack2\n' + 'use_2to3_fixers = \n' + ' your.fixers\n' + ' or.here\n' + 'use_2to3_exclude_fixers = \n' + ' one.here\n' + ' two.there\n' + 'convert_2to3_doctests = \n' + ' src/tests/one.txt\n' + ' src/two.txt\n' + 'scripts = \n' + ' bin/one.py\n' + ' bin/two.py\n' + 'eager_resources = \n' + ' bin/one.py\n' + ' bin/two.py\n' + 'install_requires = \n' + ' docutils>=0.3\n' + ' pack ==1.1, ==1.3\n' + ' hey\n' + 'tests_require = \n' + ' mock==0.7.2\n' + ' pytest\n' + 'setup_requires = \n' + ' docutils>=0.3\n' + ' spack ==1.1, ==1.3\n' + ' there\n' + 'dependency_links = \n' + ' http://some.com/here/1\n' + ' http://some.com/there/2\n' + ) + with get_dist(tmpdir) as dist: + assert dist.package_dir == {'': 'src', 'b': 'c'} + assert dist.packages == ['pack_a', 'pack_b.subpack'] + assert dist.namespace_packages == ['pack1', 'pack2'] + assert dist.use_2to3_fixers == ['your.fixers', 'or.here'] + assert dist.use_2to3_exclude_fixers == ['one.here', 'two.there'] + assert dist.convert_2to3_doctests == ( + ['src/tests/one.txt', 'src/two.txt']) + assert dist.scripts == ['bin/one.py', 'bin/two.py'] + assert dist.dependency_links == ([ + 'http://some.com/here/1', + 'http://some.com/there/2' + ]) + assert dist.install_requires == ([ + 'docutils>=0.3', + 'pack ==1.1, ==1.3', + 'hey' + ]) + assert dist.setup_requires == ([ + 'docutils>=0.3', + 'spack ==1.1, ==1.3', + 'there' ]) + assert dist.tests_require == ['mock==0.7.2', 'pytest'] def test_package_dir_fail(self, tmpdir): fake_env( From 49fc619dd4bc059ae823054f586753ebf35edeee Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 11:25:48 +0700 Subject: [PATCH 6336/8469] `dependency_links` as section not supported. --- setuptools/config.py | 8 -------- setuptools/tests/test_config.py | 16 ---------------- 2 files changed, 24 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index ef4169955d..9319f78f27 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -333,14 +333,6 @@ def _parse_packages(self, value): from setuptools import find_packages return find_packages() - def parse_section_dependency_links(self, section_options): - """Parses `dependency_links` configuration file section. - - :param dict section_options: - """ - parsed = self._parse_section_to_dict(section_options) - self['dependency_links'] = list(parsed.values()) - def parse_section_entry_points(self, section_options): """Parses `entry_points` configuration file section. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index b4bd089c52..bfc863ec68 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -417,19 +417,3 @@ def test_entry_points(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.entry_points == expected - - def test_dependency_links(self, tmpdir): - expected = set([ - 'http://some.com/here/1', - 'http://some.com/there/2' - ]) - # From section. - fake_env( - tmpdir, - '[options:dependency_links]\n' - '1 = http://some.com/here/1\n' - '2 = http://some.com/there/2\n' - ) - - with get_dist(tmpdir) as dist: - assert set(dist.dependency_links) == expected From 566e9aee17dbe2cec92b9d793f2466681f2b1a7f Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 11:27:42 +0700 Subject: [PATCH 6337/8469] Future package imported. --- setuptools/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/config.py b/setuptools/config.py index 9319f78f27..5c73ca62c6 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import, unicode_literals import io import os import sys From 68c03bee07c55a9c337f1cb98fc102a3710add4b Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 16:22:07 +0700 Subject: [PATCH 6338/8469] Section names now dot-separated to mimic .toml table names. --- setuptools/config.py | 2 +- setuptools/tests/test_config.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 5c73ca62c6..a04c3ce830 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -32,7 +32,7 @@ def __init__(self, target_obj, options): if not section_name.startswith(section_prefix): continue - section_name = section_name.replace(section_prefix, '').strip(':') + section_name = section_name.replace(section_prefix, '').strip('.') sections[section_name] = section_options self.target_obj = target_obj diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index bfc863ec68..e53b5ffd02 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -157,7 +157,7 @@ def test_usupported_section(self, tmpdir): fake_env( tmpdir, - '[metadata:some]\n' + '[metadata.some]\n' 'key = val\n' ) with get_dist(tmpdir, parse=False) as dist: @@ -187,7 +187,7 @@ def test_classifiers(self, tmpdir): # From section. tmpdir.join('setup.cfg').write( - '[metadata:classifiers]\n' + '[metadata.classifiers]\n' 'Framework :: Django\n' 'Programming Language :: Python :: 3.5\n' ) @@ -329,11 +329,11 @@ def test_package_dir_fail(self, tmpdir): def test_package_data(self, tmpdir): fake_env( tmpdir, - '[options:package_data]\n' + '[options.package_data]\n' '* = *.txt, *.rst\n' 'hello = *.msg\n' '\n' - '[options:exclude_package_data]\n' + '[options.exclude_package_data]\n' '* = fake1.txt, fake2.txt\n' 'hello = *.dat\n' ) @@ -373,9 +373,11 @@ def test_unknown_options_item(self, tmpdir): def test_extras_require(self, tmpdir): fake_env( tmpdir, - '[options:extras_require]\n' + '[options.extras_require]\n' 'pdf = ReportLab>=1.2; RXP\n' - 'rest = docutils>=0.3; pack ==1.1, ==1.3\n' + 'rest = \n' + ' docutils>=0.3\n' + ' pack ==1.1, ==1.3\n' ) with get_dist(tmpdir) as dist: @@ -387,7 +389,7 @@ def test_extras_require(self, tmpdir): def test_entry_points(self, tmpdir): fake_env( tmpdir, - '[options:entry_points]\n' + '[options.entry_points]\n' 'group1 = point1 = pack.module:func, ' '.point2 = pack.module2:func_rest [rest]\n' 'group2 = point3 = pack.module:func2\n' From 21333fe86db1888dbee134043ea8a2f85b69d439 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 17:11:37 +0700 Subject: [PATCH 6339/8469] Added `metadata` section aliases. --- setuptools/config.py | 22 ++++++++++++++++++++-- setuptools/tests/test_config.py | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index a04c3ce830..0c88df798f 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -18,6 +18,12 @@ class ConfigHandler(object): """ + aliases = {} + """Options aliases. + For compatibility with various packages. E.g.: d2to1 and pbr. + + """ + strict_mode = True """Flag. Whether unknown options in config should raise DistutilsOptionError exception, or pass silently. @@ -48,6 +54,9 @@ def __setitem__(self, option_name, value): unknown = tuple() target_obj = self.target_obj + # Translate alias into real name. + option_name = self.aliases.get(option_name, option_name) + current_value = getattr(target_obj, option_name, unknown) if current_value is unknown: @@ -216,9 +225,18 @@ def parse(self): class ConfigMetadataHandler(ConfigHandler): section_prefix = 'metadata' + + aliases = { + 'author-email': 'author_email', + 'home_page': 'url', + 'summary': 'description', + 'classifier': 'classifiers', + 'platform': 'platforms', + } + strict_mode = False - """We need to keep it loose, to be compatible with `pbr` package - which also uses `metadata` section. + """We need to keep it loose, to be partially compatible with + `pbr` and `d2to1` packages which also uses `metadata` section. """ diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index e53b5ffd02..3fabfb9490 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -86,6 +86,31 @@ def test_basic(self, tmpdir): assert metadata.name == 'fake_name' assert metadata.keywords == ['one', 'two'] + def test_aliases(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'author-email = test@test.com\n' + 'home_page = http://test.test.com/test/\n' + 'summary = Short summary\n' + 'platform = a, b\n' + 'classifier =\n' + ' Framework :: Django\n' + ' Programming Language :: Python :: 3.5\n' + ) + + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.author_email == 'test@test.com' + assert metadata.url == 'http://test.test.com/test/' + assert metadata.description == 'Short summary' + assert metadata.platforms == ['a', 'b'] + assert metadata.classifiers == [ + 'Framework :: Django', + 'Programming Language :: Python :: 3.5', + ] + def test_multiline(self, tmpdir): fake_env( From 8998172299cd562c937e83383e9fb666e6209b30 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 17:24:05 +0700 Subject: [PATCH 6340/8469] `metadata` aliases update. --- setuptools/config.py | 2 +- setuptools/tests/test_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 0c88df798f..c6b93c4eab 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -21,6 +21,7 @@ class ConfigHandler(object): aliases = {} """Options aliases. For compatibility with various packages. E.g.: d2to1 and pbr. + Note: `-` in keys is replaced with `_` by config parser. """ @@ -227,7 +228,6 @@ class ConfigMetadataHandler(ConfigHandler): section_prefix = 'metadata' aliases = { - 'author-email': 'author_email', 'home_page': 'url', 'summary': 'description', 'classifier': 'classifiers', diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 3fabfb9490..08c5bd19f6 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -92,7 +92,7 @@ def test_aliases(self, tmpdir): tmpdir, '[metadata]\n' 'author-email = test@test.com\n' - 'home_page = http://test.test.com/test/\n' + 'home-page = http://test.test.com/test/\n' 'summary = Short summary\n' 'platform = a, b\n' 'classifier =\n' From a5dadcf0eea5bda6991a77546787d1e657ae0411 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sun, 4 Dec 2016 17:35:44 +0700 Subject: [PATCH 6341/8469] _parse_attr() factored out. --- setuptools/config.py | 63 +++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index c6b93c4eab..d8513a72db 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -152,6 +152,37 @@ def _parse_file(cls, value): return value + @classmethod + def _parse_attr(cls, value): + """Represents value as a module attribute. + + Examples: + attr: package.attr + attr: package.module.attr + + :param str value: + :rtype: str + """ + attr_directive = 'attr:' + if not value.startswith(attr_directive): + return value + + attrs_path = value.replace(attr_directive, '').strip().split('.') + attr_name = attrs_path.pop() + + module_name = '.'.join(attrs_path) + module_name = module_name or '__init__' + + sys.path.insert(0, os.getcwd()) + try: + module = import_module(module_name) + value = getattr(module, attr_name) + + finally: + sys.path = sys.path[1:] + + return value + @classmethod def _get_parser_compound(cls, *parse_methods): """Returns parser function to represents value as a list. @@ -277,32 +308,16 @@ def _parse_version(self, value): :rtype: str """ - attr_directive = 'attr:' - if not value.startswith(attr_directive): - return value + version = self._parse_attr(value) - attrs_path = value.replace(attr_directive, '').strip().split('.') - attr_name = attrs_path.pop() + if callable(version): + version = version() - module_name = '.'.join(attrs_path) - module_name = module_name or '__init__' - - sys.path.insert(0, os.getcwd()) - try: - module = import_module(module_name) - version = getattr(module, attr_name) - - if callable(version): - version = version() - - if not isinstance(version, string_types): - if hasattr(version, '__iter__'): - version = '.'.join(map(str, version)) - else: - version = '%s' % version - - finally: - sys.path = sys.path[1:] + if not isinstance(version, string_types): + if hasattr(version, '__iter__'): + version = '.'.join(map(str, version)) + else: + version = '%s' % version return version From 2cdc411bf1bab8635da22e15850a93023977cf53 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Dec 2016 10:44:07 -0500 Subject: [PATCH 6342/8469] Update changelog. Ref #854. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 096d77bf82..d100bdcfa5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v30.2.0 +------- + +* #854: Bump to vendored Packaging 16.8. + v30.1.0 ------- From c4df6d7197a0e56ead10a1b1c0dbc81ea4a36615 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Dec 2016 10:49:17 -0500 Subject: [PATCH 6343/8469] =?UTF-8?q?Bump=20version:=2030.1.0=20=E2=86=92?= =?UTF-8?q?=2030.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 666881387c..b234d0bd4a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.1.0 +current_version = 30.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 83d85e6053..e088928cdf 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.1.0", + version="30.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 24e0c48846956d55af3a191bed02e3ac84595fb2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Dec 2016 10:59:11 -0500 Subject: [PATCH 6344/8469] Prefer update and generator expression to for/if loop --- pkg_resources/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index dd561d2bef..3be4175286 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3005,9 +3005,11 @@ def _initialize(g=globals()): "Set up global resource manager (deliberately not state-saved)" manager = ResourceManager() g['_manager'] = manager - for name in dir(manager): - if not name.startswith('_'): - g[name] = getattr(manager, name) + g.update( + (name, getattr(manager, name)) + for name in dir(manager) + if not name.startswith('_') + ) @_call_aside From f783aa36971d78b293fb5d627d1aacd6dbd49afc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Dec 2016 11:04:10 -0500 Subject: [PATCH 6345/8469] Use generator expression to manage the scope of 'dist' --- pkg_resources/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3be4175286..92503288e7 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3038,10 +3038,10 @@ def _initialize_master_working_set(): # ensure that all distributions added to the working set in the future # (e.g. by calling ``require()``) will get activated as well, # with higher priority (replace=True). - dist = None # ensure dist is defined for del dist below - for dist in working_set: + tuple( dist.activate(replace=False) - del dist + for dist in working_set + ) add_activation_listener(lambda dist: dist.activate(replace=True), existing=False) working_set.entries = [] # match order From 1474cf0f7e2b973eb102aef311939228b83e31b6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Dec 2016 11:37:49 -0500 Subject: [PATCH 6346/8469] Use get_distribution to resolve version. Ref testing-cabal/mock#385. --- setuptools/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/version.py b/setuptools/version.py index f2b407228e..95e1869658 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1,6 +1,6 @@ import pkg_resources try: - __version__ = pkg_resources.require('setuptools')[0].version + __version__ = pkg_resources.get_distribution('setuptools').version except Exception: __version__ = 'unknown' From be09553790c866134411ce504d9bdaf4a924bf5a Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 5 Dec 2016 08:11:32 +0000 Subject: [PATCH 6347/8469] docs: update stray links to Bitbucket repo --- README.rst | 4 ++-- docs/_templates/indexsidebar.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 2cf762d7d6..50774ff767 100755 --- a/README.rst +++ b/README.rst @@ -139,10 +139,10 @@ Package Index`_. Scroll to the very bottom of the page to find the links. .. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `Bitbucket repo`_, and in-development versions of the +is available from the `GitHub repo`_, and in-development versions of the `0.6 branch`_ are available as well. -.. _Bitbucket repo: https://bitbucket.org/pypa/setuptools/get/default.tar.gz#egg=setuptools-dev +.. _GitHub repo: https://github.com/pypa/setuptools/archive/master.tar.gz#egg=setuptools-dev .. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 Uninstalling diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index a27c85fefd..3b127602ec 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -5,4 +5,4 @@

    Download

    Questions? Suggestions? Contributions?

    -

    Visit the Setuptools project page

    +

    Visit the Setuptools project page

    From 7ab3af3cf7f8ffa512ff74cd24f1b833decdef6f Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 5 Dec 2016 08:13:43 +0000 Subject: [PATCH 6348/8469] docs: reorder table of contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “Building and Distributing Packages with Setuptools†is a better entry point to the documentation than the changelog. --- docs/index.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 6ac3725269..74aabb5e68 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -16,10 +16,10 @@ Documentation content: .. toctree:: :maxdepth: 2 - history - roadmap - python3 setuptools easy_install pkg_resources + python3 development + roadmap + history From af321fc6ad82c54a78e7c1a74601e0a6b34997da Mon Sep 17 00:00:00 2001 From: idle sign Date: Mon, 5 Dec 2016 21:55:48 +0700 Subject: [PATCH 6349/8469] `file:` directive sandboxed. --- setuptools/config.py | 12 +++++++++++- setuptools/tests/test_config.py | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index d8513a72db..c2319ed593 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -128,7 +128,10 @@ def _parse_bool(cls, value): @classmethod def _parse_file(cls, value): """Represents value as a string, allowing including text - from nearest files using include(). + from nearest files using `file:` directive. + + Directive is sandboxed and won't reach anything outside + directory with setup.py. Examples: include: LICENSE @@ -144,7 +147,14 @@ def _parse_file(cls, value): if not value.startswith(include_directive): return value + current_directory = os.getcwd() + filepath = value.replace(include_directive, '').strip() + filepath = os.path.abspath(filepath) + + if not filepath.startswith(current_directory): + raise DistutilsOptionError( + '`file:` directive can not access %s' % filepath) if os.path.isfile(filepath): with io.open(filepath, encoding='utf-8') as f: diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 08c5bd19f6..9fb55b060f 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -86,6 +86,18 @@ def test_basic(self, tmpdir): assert metadata.name == 'fake_name' assert metadata.keywords == ['one', 'two'] + def test_file_sandboxed(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'long_description = file: ../../README\n' + ) + + with get_dist(tmpdir, parse=False) as dist: + with pytest.raises(DistutilsOptionError): + dist.parse_config_files() # file: out of sandbox + def test_aliases(self, tmpdir): fake_env( From acaece809ee3592c0d135a9a0a8e556db0a9e587 Mon Sep 17 00:00:00 2001 From: idle sign Date: Mon, 5 Dec 2016 22:07:16 +0700 Subject: [PATCH 6350/8469] Tests and docstrings update. --- setuptools/config.py | 6 +++--- setuptools/tests/test_config.py | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index c2319ed593..2dd42893ba 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -87,7 +87,7 @@ def _parse_list(cls, value, separator=','): :param separator: List items separator character. :rtype: list """ - if isinstance(value, list): # _parse_complex case + if isinstance(value, list): # _get_parser_compound case return value if '\n' in value: @@ -250,7 +250,7 @@ def parse(self): for section_name, section_options in self.sections.items(): method_postfix = '' - if section_name: # [section:option] variant + if section_name: # [section.option] variant method_postfix = '_%s' % section_name section_parser_method = getattr( @@ -258,7 +258,7 @@ def parse(self): if section_parser_method is None: raise DistutilsOptionError( - 'Unsupported distribution option section: [%s:%s]' % ( + 'Unsupported distribution option section: [%s.%s]' % ( self.section_prefix, section_name)) section_parser_method(section_options) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 9fb55b060f..259a396a0a 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -66,6 +66,8 @@ def test_basic(self, tmpdir): 'keywords = one, two\n' 'provides = package, package.sub\n' 'license = otherlic\n' + 'download_url = http://test.test.com/test/\n' + 'maintainer_email = test@test.com\n' ) tmpdir.join('README').write('readme contents\nline2') @@ -85,6 +87,8 @@ def test_basic(self, tmpdir): assert metadata.license == 'BSD 3-Clause License' assert metadata.name == 'fake_name' assert metadata.keywords == ['one', 'two'] + assert metadata.download_url == 'http://test.test.com/test/' + assert metadata.maintainer_email == 'test@test.com' def test_file_sandboxed(self, tmpdir): From 163f36449c2b8c19c272414bff0bf80c9f3f2c7d Mon Sep 17 00:00:00 2001 From: idle sign Date: Mon, 5 Dec 2016 23:13:35 +0700 Subject: [PATCH 6351/8469] Added API functions. --- setuptools/config.py | 78 +++++++++++++++++++++++++++++++++ setuptools/dist.py | 5 +-- setuptools/tests/test_config.py | 20 ++++++++- 3 files changed, 99 insertions(+), 4 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 2dd42893ba..6459e1de06 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -2,6 +2,7 @@ import io import os import sys +from collections import defaultdict from functools import partial from distutils.errors import DistutilsOptionError @@ -9,6 +10,80 @@ from setuptools.extern.six import string_types +def read_configuration(filepath, find_others=False): + """Read given configuration file and returns options from it as a dict. + + :param str|unicode filepath: Path to configuration file + to get options from. + + :param bool find_others: Whether to search for other configuration files + which could be on in various places. + + :rtype: dict + """ + from setuptools.dist import Distribution, _Distribution + + dist = Distribution() + + filenames = dist.find_config_files() if find_others else [] + if filepath not in filenames: + filenames.append(filepath) + + _Distribution.parse_config_files(dist, filenames=filenames) + + handlers = parse_configuration(dist, dist.command_options) + + return configuration_to_dict(handlers) + + +def configuration_to_dict(handlers): + """Returns configuration data gathered by given handlers as a dict. + + :param list[ConfigHandler] handlers: Handlers list, + usually from parse_configuration() + + :rtype: dict + """ + config_dict = defaultdict(dict) + + for handler in handlers: + + obj_alias = handler.section_prefix + target_obj = handler.target_obj + + for option in handler.set_options: + getter = getattr(target_obj, 'get_%s' % option, None) + + if getter is None: + value = getattr(target_obj, option) + + else: + value = getter() + + config_dict[obj_alias][option] = value + + return config_dict + + +def parse_configuration(distribution, command_options): + """Performs additional parsing of configuration options + for a distribution. + + Returns a list of used option handlers. + + :param Distribution distribution: + :param dict command_options: + :rtype: list + """ + meta = ConfigMetadataHandler(distribution.metadata, command_options) + meta.parse() + + options = ConfigOptionsHandler(distribution, command_options) + options.parse() + + return [meta, options] + + class ConfigHandler(object): """Handles metadata supplied in configuration files.""" @@ -44,6 +119,7 @@ def __init__(self, target_obj, options): self.target_obj = target_obj self.sections = sections + self.set_options = [] @property def parsers(self): @@ -77,6 +153,8 @@ def __setitem__(self, option_name, value): else: setter(value) + self.set_options.append(option_name) + @classmethod def _parse_list(cls, value, separator=','): """Represents value as a list. diff --git a/setuptools/dist.py b/setuptools/dist.py index c975abe00b..c04e64268b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -19,7 +19,7 @@ from setuptools.depends import Require from setuptools import windows_support from setuptools.monkey import get_unpatched -from setuptools.config import ConfigMetadataHandler, ConfigOptionsHandler +from setuptools.config import parse_configuration import pkg_resources @@ -350,8 +350,7 @@ def parse_config_files(self, filenames=None): """ _Distribution.parse_config_files(self, filenames=filenames) - ConfigMetadataHandler(self.metadata, self.command_options).parse() - ConfigOptionsHandler(self, self.command_options).parse() + parse_configuration(self, self.command_options) def parse_command_line(self): """Process features after parsing command line options""" diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 259a396a0a..cd646dbaaf 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -2,7 +2,7 @@ import pytest from distutils.errors import DistutilsOptionError from setuptools.dist import Distribution -from setuptools.config import ConfigHandler +from setuptools.config import ConfigHandler, read_configuration class ErrConfigHandler(ConfigHandler): @@ -52,6 +52,24 @@ def test_parsers_implemented(): handler.parsers +class TestConfigurationReader: + + def test_basic(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'version = 10.1.1\n' + 'keywords = one, two\n' + '\n' + '[options]\n' + 'scripts = bin/a.py, bin/b.py\n' + ) + config_dict = read_configuration('%s' % tmpdir.join('setup.cfg')) + assert config_dict['metadata']['version'] == '10.1.1' + assert config_dict['metadata']['keywords'] == ['one', 'two'] + assert config_dict['options']['scripts'] == ['bin/a.py', 'bin/b.py'] + + class TestMetadata: def test_basic(self, tmpdir): From 6aae9fb3f2bf222466fc2fd0db5e22760c6239c6 Mon Sep 17 00:00:00 2001 From: idle sign Date: Mon, 5 Dec 2016 23:15:36 +0700 Subject: [PATCH 6352/8469] `strict_mode` removed to improve forward compatibility. --- setuptools/config.py | 10 +--------- setuptools/tests/test_config.py | 12 ------------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 6459e1de06..b2c0cea325 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -100,12 +100,6 @@ class ConfigHandler(object): """ - strict_mode = True - """Flag. Whether unknown options in config should - raise DistutilsOptionError exception, or pass silently. - - """ - def __init__(self, target_obj, options): sections = {} @@ -316,9 +310,7 @@ def parse_section(self, section_options): self[name] = value except KeyError: - if self.strict_mode: - raise DistutilsOptionError( - 'Unknown distribution option: %s' % name) + pass # Keep silent for a new option may appear anytime. def parse(self): """Parses configuration file items from one diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cd646dbaaf..2e8510be51 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -417,18 +417,6 @@ def test_packages(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.packages == ['fake_package'] - def test_unknown_options_item(self, tmpdir): - - fake_env( - tmpdir, - '[options]\n' - 'zip_safe = True\n' - 'usr_2to3 = 1\n' - ) - with get_dist(tmpdir, parse=False) as dist: - with pytest.raises(DistutilsOptionError): - dist.parse_config_files() - def test_extras_require(self, tmpdir): fake_env( tmpdir, From 43af23dcff02695ef77b862d2266d10019b7c67c Mon Sep 17 00:00:00 2001 From: idle sign Date: Mon, 5 Dec 2016 23:25:33 +0700 Subject: [PATCH 6353/8469] Docs update. --- docs/setuptools.txt | 185 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5ce2c7b1ea..77de255b90 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2398,6 +2398,191 @@ The ``upload_docs`` command has the following options: https://pypi.python.org/pypi (i.e., the main PyPI installation). +----------------------------------------- +Configuring setup() using setup.cfg files +----------------------------------------- + +``Setuptools`` allows using configuration files (usually `setup.cfg`) +to define package’s metadata and other options which are normally supplied +to ``setup()`` function. + +This approach not only allows automation scenarios, but also reduces +boilerplate code in some cases. + +.. note:: + Implementation presents limited compatibility with distutils2-like + ``setup.cfg`` sections (used by ``pbr`` and ``d2to1`` packages). + + Namely: only metadata related keys from ``metadata`` section are supported + (except for ``description-file``); keys from ``files``, ``entry_points`` + and ``backwards_compat`` are not supported. + + +.. code-block:: ini + + [metadata] + name = my_package + version = attr: src.VERSION + description = My package description + long_description = file: README.rst + keywords = one, two + license = BSD 3-Clause License + + [metadata.classifiers] + Framework :: Django + Programming Language :: Python :: 3.5 + + [options] + zip_safe = False + include_package_data = True + packages = find: + scripts = + bin/first.py + bin/second.py + + [options.package_data] + * = *.txt, *.rst + hello = *.msg + + [options.extras_require] + pdf = ReportLab>=1.2; RXP + rest = docutils>=0.3; pack ==1.1, ==1.3 + + +Metadata and options could be set in sections with the same names. + +* Keys are the same as keyword arguments one provides to ``setup()`` function. + +* Complex values could be placed comma-separated or one per line + in *dangling* sections. The following are the same: + + .. code-block:: ini + + [metadata] + keywords = one, two + + [metadata] + keywords = + one + two + +* In some cases complex values could be provided in subsections for clarity. + +* Some keys allow ``file:``, ``attr:`` and ``find:`` directives to cover + common usecases. + +* Unknown keys are ignored. + + +Specifying values +================= + +Some values are treated as simple strings, some allow more logic. + +Type names used below: + +* ``str`` - simple string +* ``list-comma`` - dangling list or comma-separated values string +* ``list-semi`` - dangling list or semicolon-separated values string +* ``bool`` - ``True`` is 1, yes, true +* ``dict`` - list-comma where keys from values are separated by = + + +Special directives: + +* ``attr:`` - value could be read from module attribute +* ``file:`` - value could be read from a file +* ``section:`` - values could be read from a dedicated (sub)section + + +.. note:: + ``file:`` directive is sandboxed and won't reach anything outside + directory with ``setup.py``. + + +Metadata +-------- + +.. note:: + Aliases given below are supported for compatibility reasons, + but not advised. + +================= ================= ===== +Key Aliases Accepted value type +================= ================= ===== +name str +version attr:, str +url home-page str +download_url download-url str +author str +author_email author-email str +maintainer str +maintainer_email maintainer-email str +classifiers classifier file:, section, list-comma +license file:, str +description summary file:, str +long_description long-description file:, str +keywords list-comma +platforms platform list-comma +provides list-comma +requires list-comma +obsoletes list-comma +================= ================= ===== + +**version** - ``attr:`` supports callables; supports iterables; +unsupported types are casted using ``str()``. + + +Options +------- + +======================= ===== +Key Accepted value type +======================= ===== +zip_safe bool +setup_requires list-semi +install_requires list-semi +extras_require section +entry_points file, section +use_2to3 bool +use_2to3_fixers list-comma +use_2to3_exclude_fixers list-comma +convert_2to3_doctests list-comma +scripts list-comma +eager_resources list-comma +dependency_links list-comma +tests_require list-semi +include_package_data bool +packages find:, list-comma +package_dir dict +package_data section +exclude_package_data section +namespace_packages list-comma +======================= ===== + + +Configuration API +================= + +Some automation tools may wish to access data from a configuration file. + +``Setuptools`` exposes ``read_configuration()`` function allowing +parsing ``metadata`` and ``options`` sections into a dictionary. + + +.. code-block:: python + + from setuptools.config import read_configuration + + conf_dict = read_configuration('/home/user/dev/package/setup.cfg') + + +By default ``read_configuration()`` will read only file provided +in the first argument. To include values from other configuration files +which could be in various places set `find_others` function argument +to ``True``. + + -------------------------------- Extending and Reusing Setuptools -------------------------------- From 1ca6f3bf272d8ba2c0d4161cc56a74c63c8afb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 7 Dec 2016 14:59:34 +0200 Subject: [PATCH 6354/8469] Spelling fixes --- setuptools/command/build_py.py | 2 +- setuptools/tests/environment.py | 2 +- setuptools/tests/test_egg_info.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 289e6fb81b..b0314fd413 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -219,7 +219,7 @@ def exclude_data_files(self, package, src_dir, files): @staticmethod def _get_platform_patterns(spec, package, src_dir): """ - yield platfrom-specific path patterns (suitable for glob + yield platform-specific path patterns (suitable for glob or fn_match) from a glob-based spec (such as self.package_data or self.exclude_package_data) matching package in src_dir. diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index b0e3bd36a8..c67898ca79 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -56,5 +56,5 @@ def run_setup_py(cmd, pypath=None, path=None, data = data.decode() data = unicodedata.normalize('NFC', data) - # communciate calls wait() + # communicate calls wait() return proc.returncode, data diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index dc41bc1f2e..75ae18dffd 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -237,7 +237,7 @@ def test_python_requires_install(self, tmpdir_cwd, env): pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') - def test_manifest_maker_warning_suppresion(self): + def test_manifest_maker_warning_suppression(self): fixtures = [ "standard file not found: should have one of foo.py, bar.py", "standard file 'setup.py' not found" From a9350f32d3eeef3a1c53b243e763e60e211b72f6 Mon Sep 17 00:00:00 2001 From: idle sign Date: Wed, 7 Dec 2016 20:21:31 +0700 Subject: [PATCH 6355/8469] `read_configuration` now chdirs and tests for file. --- setuptools/config.py | 13 ++++++++++++- setuptools/tests/test_config.py | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index b2c0cea325..889dc683d3 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -5,7 +5,7 @@ from collections import defaultdict from functools import partial -from distutils.errors import DistutilsOptionError +from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.py26compat import import_module from setuptools.extern.six import string_types @@ -23,6 +23,15 @@ def read_configuration(filepath, find_others=False): """ from setuptools.dist import Distribution, _Distribution + filepath = os.path.abspath(filepath) + + if not os.path.isfile(filepath): + raise DistutilsFileError( + 'Configuration file %s does not exist.' % filepath) + + current_directory = os.getcwd() + os.chdir(os.path.dirname(filepath)) + dist = Distribution() filenames = dist.find_config_files() if find_others else [] @@ -33,6 +42,8 @@ def read_configuration(filepath, find_others=False): handlers = parse_configuration(dist, dist.command_options) + os.chdir(current_directory) + return configuration_to_dict(handlers) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 2e8510be51..2148772095 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,6 +1,6 @@ import contextlib import pytest -from distutils.errors import DistutilsOptionError +from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.dist import Distribution from setuptools.config import ConfigHandler, read_configuration @@ -69,6 +69,10 @@ def test_basic(self, tmpdir): assert config_dict['metadata']['keywords'] == ['one', 'two'] assert config_dict['options']['scripts'] == ['bin/a.py', 'bin/b.py'] + def test_no_config(self, tmpdir): + with pytest.raises(DistutilsFileError): + read_configuration('%s' % tmpdir.join('setup.cfg')) + class TestMetadata: From 53b47e1dfa9dfb1e8b94172a4650409fc03d4048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 7 Dec 2016 15:00:43 +0200 Subject: [PATCH 6356/8469] Tell unittest.main not to exit, fixes #850. --- setuptools/command/test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 270674e21e..9a5117be00 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -225,10 +225,12 @@ def run_tests(self): del_modules.append(name) list(map(sys.modules.__delitem__, del_modules)) + exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False} unittest_main( None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), + **exit_kwarg ) @property From 7e25fd910d1ff5259c0768d3b54a9bf03bce4279 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Dec 2016 20:51:36 -0500 Subject: [PATCH 6357/8469] Consider using module_from_spec to create the module. --- setuptools/namespaces.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index cc934b7ee5..b6720609e1 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -34,12 +34,15 @@ def _get_target(self): return self.target _nspkg_tmpl = ( - "import sys, types, os", + "import sys, types, os, importlib.util, importlib.machinery", "pep420 = sys.version_info > (3, 3)", "p = os.path.join(%(root)s, *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", "m = not ie and not pep420 and " - "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "sys.modules.setdefault(%(pkg)r, " + "importlib.util.module_from_spec(" + "importlib.machinery.PathFinder.find_spec(%(pkg)r, " + "[os.path.dirname(p)])))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", ) From 41a9da1833b1f55b4a3da0d427e9b569075f0cc7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Dec 2016 20:57:11 -0500 Subject: [PATCH 6358/8469] module_from_spec is only available on Python 3.5 --- setuptools/namespaces.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index b6720609e1..9266860fc6 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -1,4 +1,5 @@ import os +import sys from distutils import log import itertools @@ -42,7 +43,10 @@ def _get_target(self): "sys.modules.setdefault(%(pkg)r, " "importlib.util.module_from_spec(" "importlib.machinery.PathFinder.find_spec(%(pkg)r, " - "[os.path.dirname(p)])))", + "[os.path.dirname(p)])))" + if sys.version_info >= (3, 5) else + "m = not ie and not pep420 and " + "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", ) From 17f72f5bc7031accc037b377ced5a0b411520bfb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Dec 2016 21:24:21 -0500 Subject: [PATCH 6359/8469] Always check at run time as some builds share files across Python versions. --- setuptools/namespaces.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 9266860fc6..2399dae556 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -37,15 +37,15 @@ def _get_target(self): _nspkg_tmpl = ( "import sys, types, os, importlib.util, importlib.machinery", "pep420 = sys.version_info > (3, 3)", + "has_mfs = sys.version_info > (3, 5)", "p = os.path.join(%(root)s, *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", - "m = not ie and not pep420 and " + "m = not ie and not pep420 and has_mfs and " "sys.modules.setdefault(%(pkg)r, " "importlib.util.module_from_spec(" "importlib.machinery.PathFinder.find_spec(%(pkg)r, " - "[os.path.dirname(p)])))" - if sys.version_info >= (3, 5) else - "m = not ie and not pep420 and " + "[os.path.dirname(p)])))", + "m = not ie and not pep420 and not has_mfs and " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From 27b7d4e47a4d80f5f377cefb87f91aa0e0110246 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 7 Dec 2016 21:38:16 -0500 Subject: [PATCH 6360/8469] Only rely on pep420 for Python 3.3 and 3.4 where method_from_spec isn't available. --- setuptools/namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 2399dae556..ce16286faf 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -36,7 +36,7 @@ def _get_target(self): _nspkg_tmpl = ( "import sys, types, os, importlib.util, importlib.machinery", - "pep420 = sys.version_info > (3, 3)", + "pep420 = (3, 3) < sys.version_info < (3, 5)", "has_mfs = sys.version_info > (3, 5)", "p = os.path.join(%(root)s, *%(pth)r)", "ie = os.path.exists(os.path.join(p,'__init__.py'))", From e1c0fa4e8358ce25ff9c3678c4f8261339f1896f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Dec 2016 09:53:50 -0500 Subject: [PATCH 6361/8469] Update changelog. Ref #873. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d100bdcfa5..e442e286cb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v30.2.1 +------- + +* #850: In test command, invoke unittest.main with + indication not to exit the process. + v30.2.0 ------- From 17f752d3be0b2f89b405976364653f081f522fb3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Dec 2016 09:54:03 -0500 Subject: [PATCH 6362/8469] =?UTF-8?q?Bump=20version:=2030.2.0=20=E2=86=92?= =?UTF-8?q?=2030.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b234d0bd4a..f101a990a4 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.2.0 +current_version = 30.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index e088928cdf..a12d898486 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.2.0", + version="30.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9c81a2f62b8d160d2a6c3b2d6595b849fdf60c52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Dec 2016 10:02:50 -0500 Subject: [PATCH 6363/8469] Update changelog; ref #862. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e442e286cb..248a52c6ac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v30.3.0 +------- + +* #394 via #862: Added support for `declarative package + config in a setup.cfg file + `_. + v30.2.1 ------- From ac9997648d89131412eacbb198e2d3a7c97f69e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Dec 2016 10:05:07 -0500 Subject: [PATCH 6364/8469] =?UTF-8?q?Bump=20version:=2030.2.1=20=E2=86=92?= =?UTF-8?q?=2030.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f101a990a4..950924b179 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.2.1 +current_version = 30.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index a12d898486..da2c6473b6 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.2.1", + version="30.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f14930e66601b462699c44384c482cd966f53b8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 9 Dec 2016 08:16:33 -0500 Subject: [PATCH 6365/8469] Drop support for Python 2.6, removing lots of compatibility code for a leaner, cleaner codebase. Fixes #878. --- .travis.yml | 1 - CHANGES.rst | 6 ++++++ README.rst | 4 +--- docs/easy_install.txt | 12 +++++------ docs/formats.txt | 2 +- docs/pkg_resources.txt | 18 +++------------- docs/setuptools.txt | 2 +- pkg_resources/__init__.py | 24 ++------------------- pkg_resources/api_tests.txt | 4 ++-- pkg_resources/tests/test_resources.py | 28 +++++++++--------------- setup.py | 3 +-- setuptools/archive_util.py | 4 ++-- setuptools/command/egg_info.py | 4 +--- setuptools/command/sdist.py | 7 ------ setuptools/command/test.py | 7 +++--- setuptools/config.py | 2 +- setuptools/monkey.py | 2 +- setuptools/package_index.py | 3 +-- setuptools/py26compat.py | 31 --------------------------- setuptools/py31compat.py | 15 ------------- setuptools/sandbox.py | 4 ---- setuptools/tests/py26compat.py | 16 -------------- setuptools/tests/test_easy_install.py | 7 +++--- setuptools/tests/test_egg_info.py | 8 ------- 24 files changed, 44 insertions(+), 170 deletions(-) delete mode 100644 setuptools/py26compat.py delete mode 100644 setuptools/tests/py26compat.py diff --git a/.travis.yml b/.travis.yml index 2f9b6a7a06..9277af80d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 2.6 - 2.7 - 3.3 - 3.4 diff --git a/CHANGES.rst b/CHANGES.rst index 248a52c6ac..50bdd3ab18 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v31.0.0 +------- + +* #878: Drop support for Python 2.6. Python 2.6 users should + rely on 'setuptools < 31dev'. + v30.3.0 ------- diff --git a/README.rst b/README.rst index 2cf762d7d6..85b1a9932b 100755 --- a/README.rst +++ b/README.rst @@ -17,9 +17,7 @@ The recommended way to bootstrap setuptools on any system is to download operating systems have different recommended techniques to accomplish this basic routine, so below are some examples to get you started. -Setuptools requires Python 2.6 or later. To install setuptools -on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x -`_. +Setuptools requires Python 3.3 or later (or Python 2.7). The link provided to ez_setup.py is a bookmark to bootstrap script for the latest known stable release. diff --git a/docs/easy_install.txt b/docs/easy_install.txt index bd9f0e863d..56b1667226 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -35,7 +35,7 @@ Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. -You will need at least Python 2.6. An ``easy_install`` script will be +You will need at least Python 3.3 or 2.7. An ``easy_install`` script will be installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are @@ -305,8 +305,7 @@ Regardless of the technique used, the script(s) will be installed to a Scripts directory (by default in the Python installation directory). It is recommended for EasyInstall that you ensure this directory is in the PATH environment variable. The easiest way to ensure the Scripts directory is in the PATH is -to run ``Tools\Scripts\win_add2path.py`` from the Python directory (requires -Python 2.6 or later). +to run ``Tools\Scripts\win_add2path.py`` from the Python directory. Note that instead of changing your ``PATH`` to include the Python scripts directory, you can also retarget the installation location for scripts so they @@ -987,21 +986,20 @@ The following section lists only the easiest and most relevant approaches [1]_. `Use "virtualenv"`_ -.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_ in Python 2.6. +.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_. .. _PEP-370: http://www.python.org/dev/peps/pep-0370/ Use the "--user" option ~~~~~~~~~~~~~~~~~~~~~~~ -With Python 2.6 came the User scheme for installation, which means that all -python distributions support an alternative install location that is specific to a user [2]_ [3]_. +Python provides a User scheme for installation, which means that all +python distributions support an alternative install location that is specific to a user [3]_. The Default location for each OS is explained in the python documentation for the ``site.USER_BASE`` variable. This mode of installation can be turned on by specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. This approach serves the need to have a user-specific stash of packages. -.. [2] Prior to Python2.6, Mac OS X offered a form of the User scheme. That is now subsumed into the User scheme introduced in Python 2.6. .. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. Use the "--user" option and customize "PYTHONUSERBASE" diff --git a/docs/formats.txt b/docs/formats.txt index 9e6fe72787..a182eb99fc 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -110,7 +110,7 @@ the need to create a directory just to store one file. This option is other metadata. (In fact, setuptools itself never generates ``.egg-info`` files, either; the support for using files was added so that the requirement could easily be satisfied by other tools, such -as the distutils in Python 2.5). +as distutils). In addition to the ``PKG-INFO`` file, an egg's metadata directory may also include files and directories representing various forms of diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index e8412b3371..c504412d8b 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -622,8 +622,8 @@ Requirements Parsing The "markers" in a requirement are used to specify when a requirement should be installed -- the requirement will be installed if the marker evaluates as true in the current environment. For example, specifying - ``argparse;python_version<"2.7"`` will not install in an Python 2.7 or 3.3 - environment, but will in a Python 2.6 environment. + ``argparse;python_version<"3.0"`` will not install in an Python 3 + environment, but will in a Python 2 environment. ``Requirement`` Methods and Attributes -------------------------------------- @@ -1660,19 +1660,7 @@ PEP 302 Utilities ----------------- ``get_importer(path_item)`` - Retrieve a PEP 302 "importer" for the given path item (which need not - actually be on ``sys.path``). This routine simulates the PEP 302 protocol - for obtaining an "importer" object. It first checks for an importer for - the path item in ``sys.path_importer_cache``, and if not found it calls - each of the ``sys.path_hooks`` and caches the result if a good importer is - found. If no importer is found, this routine returns an ``ImpWrapper`` - instance that wraps the builtin import machinery as a PEP 302-compliant - "importer" object. This ``ImpWrapper`` is *not* cached; instead a new - instance is returned each time. - - (Note: When run under Python 2.5, this function is simply an alias for - ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper`` - instances, it may return ``pkgutil.ImpImporter`` instances.) + A deprecated alias for ``pkgutil.get_importer()`` File/Path Utilities diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 77de255b90..1b0be77d8e 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -3,7 +3,7 @@ Building and Distributing Packages with Setuptools ================================================== ``Setuptools`` is a collection of enhancements to the Python ``distutils`` -(for Python 2.6 and up) that allow developers to more easily build and +that allow developers to more easily build and distribute Python packages, especially ones that have dependencies on other packages. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 92503288e7..d8000b001a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1611,7 +1611,7 @@ def build(cls, path): Use a platform-specific path separator (os.sep) for the path keys for compatibility with pypy on Windows. """ - with ContextualZipFile(path) as zfile: + with zipfile.ZipFile(path) as zfile: items = ( ( name.replace('/', os.sep), @@ -1644,26 +1644,6 @@ def load(self, path): return self[path].manifest -class ContextualZipFile(zipfile.ZipFile): - """ - Supplement ZipFile class to support context manager for Python 2.6 - """ - - def __enter__(self): - return self - - def __exit__(self, type, value, traceback): - self.close() - - def __new__(cls, *args, **kwargs): - """ - Construct a ZipFile or ContextualZipFile as appropriate - """ - if hasattr(zipfile.ZipFile, '__exit__'): - return zipfile.ZipFile(*args, **kwargs) - return super(ContextualZipFile, cls).__new__(cls) - - class ZipProvider(EggProvider): """Resource support for zips and eggs""" @@ -1861,7 +1841,7 @@ def get_metadata(self, name): return metadata def _warn_on_replacement(self, metadata): - # Python 2.6 and 3.2 compat for: replacement_char = '�' + # Python 2.7 compat for: replacement_char = '�' replacement_char = b'\xef\xbf\xbd'.decode('utf-8') if replacement_char in metadata: tmpl = "{self.path} could not be properly decoded in UTF-8" diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 4fbd3d235d..0a75170e4f 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -385,10 +385,10 @@ Environment Markers >>> em("sys_platform=='win32'") == (sys.platform=='win32') True - >>> em("python_version >= '2.6'") + >>> em("python_version >= '2.7'") True - >>> em("python_version > '2.5'") + >>> em("python_version > '2.6'") True >>> im("implementation_name=='cpython'") diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 00ca74262a..8223963ced 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -206,12 +206,10 @@ def test_marker_evaluation_with_extras(self): """Extras are also evaluated as markers at resolution time.""" ad = pkg_resources.Environment([]) ws = WorkingSet([]) - # Metadata needs to be native strings due to cStringIO behaviour in - # 2.6, so use str(). Foo = Distribution.from_filename( "/foo_dir/Foo-1.2.dist-info", - metadata=Metadata(("METADATA", str("Provides-Extra: baz\n" - "Requires-Dist: quux; extra=='baz'"))) + metadata=Metadata(("METADATA", "Provides-Extra: baz\n" + "Requires-Dist: quux; extra=='baz'")) ) ad.add(Foo) assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo] @@ -224,12 +222,10 @@ def test_marker_evaluation_with_extras_normlized(self): """Extras are also evaluated as markers at resolution time.""" ad = pkg_resources.Environment([]) ws = WorkingSet([]) - # Metadata needs to be native strings due to cStringIO behaviour in - # 2.6, so use str(). Foo = Distribution.from_filename( "/foo_dir/Foo-1.2.dist-info", - metadata=Metadata(("METADATA", str("Provides-Extra: baz-lightyear\n" - "Requires-Dist: quux; extra=='baz-lightyear'"))) + metadata=Metadata(("METADATA", "Provides-Extra: baz-lightyear\n" + "Requires-Dist: quux; extra=='baz-lightyear'")) ) ad.add(Foo) assert list(ws.resolve(parse_requirements("Foo"), ad)) == [Foo] @@ -241,14 +237,12 @@ def test_marker_evaluation_with_extras_normlized(self): def test_marker_evaluation_with_multiple_extras(self): ad = pkg_resources.Environment([]) ws = WorkingSet([]) - # Metadata needs to be native strings due to cStringIO behaviour in - # 2.6, so use str(). Foo = Distribution.from_filename( "/foo_dir/Foo-1.2.dist-info", - metadata=Metadata(("METADATA", str("Provides-Extra: baz\n" + metadata=Metadata(("METADATA", "Provides-Extra: baz\n" "Requires-Dist: quux; extra=='baz'\n" "Provides-Extra: bar\n" - "Requires-Dist: fred; extra=='bar'\n"))) + "Requires-Dist: fred; extra=='bar'\n")) ) ad.add(Foo) quux = Distribution.from_filename("/foo_dir/quux-1.0.dist-info") @@ -261,22 +255,20 @@ def test_marker_evaluation_with_multiple_extras(self): def test_marker_evaluation_with_extras_loop(self): ad = pkg_resources.Environment([]) ws = WorkingSet([]) - # Metadata needs to be native strings due to cStringIO behaviour in - # 2.6, so use str(). a = Distribution.from_filename( "/foo_dir/a-0.2.dist-info", - metadata=Metadata(("METADATA", str("Requires-Dist: c[a]"))) + metadata=Metadata(("METADATA", "Requires-Dist: c[a]")) ) b = Distribution.from_filename( "/foo_dir/b-0.3.dist-info", - metadata=Metadata(("METADATA", str("Requires-Dist: c[b]"))) + metadata=Metadata(("METADATA", "Requires-Dist: c[b]")) ) c = Distribution.from_filename( "/foo_dir/c-1.0.dist-info", - metadata=Metadata(("METADATA", str("Provides-Extra: a\n" + metadata=Metadata(("METADATA", "Provides-Extra: a\n" "Requires-Dist: b;extra=='a'\n" "Provides-Extra: b\n" - "Requires-Dist: foo;extra=='b'"))) + "Requires-Dist: foo;extra=='b'")) ) foo = Distribution.from_filename("/foo_dir/foo-0.1.dist-info") for dist in (a, b, c, foo): diff --git a/setup.py b/setup.py index da2c6473b6..5b2e8a5b3e 100755 --- a/setup.py +++ b/setup.py @@ -145,7 +145,6 @@ def pypi_link(pkg_filename): Intended Audience :: Developers License :: OSI Approved :: MIT License Operating System :: OS Independent - Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 @@ -156,7 +155,7 @@ def pypi_link(pkg_filename): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), - python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*', + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*', extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2016.9.26", diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index cc82b3da36..81436044d9 100755 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -8,7 +8,7 @@ import contextlib from distutils.errors import DistutilsError -from pkg_resources import ensure_directory, ContextualZipFile +from pkg_resources import ensure_directory __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter", @@ -98,7 +98,7 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): if not zipfile.is_zipfile(filename): raise UnrecognizedFormat("%s is not a zip file" % (filename,)) - with ContextualZipFile(filename) as z: + with zipfile.ZipFile(filename) as z: for info in z.infolist(): name = info.filename diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8a06e496d7..40cea9bf44 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -158,9 +158,7 @@ def save_version_info(self, filename): build tag. Install these keys in a deterministic order to avoid arbitrary reordering on subsequent builds. """ - # python 2.6 compatibility - odict = getattr(collections, 'OrderedDict', dict) - egg_info = odict() + egg_info = collections.OrderedDict() # follow the order these keys would have been added # when PYTHONHASHSEED=0 egg_info['tag_build'] = self.tags() diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 84e29a1b7d..39e29d7316 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -50,13 +50,6 @@ def run(self): for cmd_name in self.get_sub_commands(): self.run_command(cmd_name) - # Call check_metadata only if no 'check' command - # (distutils <= 2.6) - import distutils.command - - if 'check' not in distutils.command.__all__: - self.check_metadata() - self.make_distribution() dist_files = getattr(self.distribution, 'dist_files', []) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 9a5117be00..9931565be6 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -3,6 +3,7 @@ import sys import contextlib import itertools +import unittest from distutils.errors import DistutilsOptionError from unittest import TestLoader @@ -13,7 +14,6 @@ working_set, _namespace_packages, add_activation_listener, require, EntryPoint) from setuptools import Command -from setuptools.py31compat import unittest_main class ScanningLoader(TestLoader): @@ -225,12 +225,11 @@ def run_tests(self): del_modules.append(name) list(map(sys.modules.__delitem__, del_modules)) - exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False} - unittest_main( + unittest.main( None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), - **exit_kwarg + exit=False, ) @property diff --git a/setuptools/config.py b/setuptools/config.py index 889dc683d3..eb19c895a7 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -4,9 +4,9 @@ import sys from collections import defaultdict from functools import partial +from importlib import import_module from distutils.errors import DistutilsOptionError, DistutilsFileError -from setuptools.py26compat import import_module from setuptools.extern.six import string_types diff --git a/setuptools/monkey.py b/setuptools/monkey.py index aabc280f6b..09f208b189 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -7,8 +7,8 @@ import platform import types import functools +from importlib import import_module -from .py26compat import import_module from setuptools.extern import six import setuptools diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d80d43bc79..d2f27ca6a0 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -27,7 +27,6 @@ from distutils import log from distutils.errors import DistutilsError from fnmatch import translate -from setuptools.py26compat import strip_fragment from setuptools.py27compat import get_all_headers EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$') @@ -707,7 +706,7 @@ def _download_to(self, url, filename): fp, info = None, None try: checker = HashChecker.from_url(url) - fp = self.open_url(strip_fragment(url)) + fp = self.open_url(url) if isinstance(fp, urllib.error.HTTPError): raise DistutilsError( "Can't download %s: %s %s" % (url, fp.code, fp.msg) diff --git a/setuptools/py26compat.py b/setuptools/py26compat.py deleted file mode 100644 index 4d3add8ca8..0000000000 --- a/setuptools/py26compat.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Compatibility Support for Python 2.6 and earlier -""" - -import sys - -try: - from urllib.parse import splittag -except ImportError: - from urllib import splittag - - -def strip_fragment(url): - """ - In `Python 8280 `_, Python 2.7 and - later was patched to disregard the fragment when making URL requests. - Do the same for Python 2.6 and earlier. - """ - url, fragment = splittag(url) - return url - - -if sys.version_info >= (2, 7): - strip_fragment = lambda x: x - -try: - from importlib import import_module -except ImportError: - - def import_module(module_name): - return __import__(module_name, fromlist=['__name__']) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 44b025d4b2..4ea953201f 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -1,6 +1,3 @@ -import sys -import unittest - __all__ = ['get_config_vars', 'get_path'] try: @@ -42,15 +39,3 @@ def __exit__(self, exctype, excvalue, exctrace): except OSError: # removal errors are not the only possible pass self.name = None - - -unittest_main = unittest.main - -_PY31 = (3, 1) <= sys.version_info[:2] < (3, 2) -if _PY31: - # on Python 3.1, translate testRunner==None to TextTestRunner - # for compatibility with Python 2.6, 2.7, and 3.2+ - def unittest_main(*args, **kwargs): - if 'testRunner' in kwargs and kwargs['testRunner'] is None: - kwargs['testRunner'] = unittest.TextTestRunner - return unittest.main(*args, **kwargs) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index d882d71539..640691d853 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -37,10 +37,6 @@ def _execfile(filename, globals, locals=None): mode = 'rb' with open(filename, mode) as stream: script = stream.read() - # compile() function in Python 2.6 and 3.1 requires LF line endings. - if sys.version_info[:2] < (2, 7) or sys.version_info[:2] >= (3, 0) and sys.version_info[:2] < (3, 2): - script = script.replace(b'\r\n', b'\n') - script = script.replace(b'\r', b'\n') if locals is None: locals = globals code = compile(script, filename, 'exec') diff --git a/setuptools/tests/py26compat.py b/setuptools/tests/py26compat.py deleted file mode 100644 index 18cece051c..0000000000 --- a/setuptools/tests/py26compat.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys -import tarfile -import contextlib - - -def _tarfile_open_ex(*args, **kwargs): - """ - Extend result as a context manager. - """ - return contextlib.closing(tarfile.open(*args, **kwargs)) - - -if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2): - tarfile_open = _tarfile_open_ex -else: - tarfile_open = tarfile.open diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 209e6b78ff..6f9bc8e103 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -35,7 +35,6 @@ import setuptools.tests.server import pkg_resources -from .py26compat import tarfile_open from . import contexts from .textwrap import DALS @@ -428,7 +427,7 @@ def test_setup_requires_override_nspkg(self): # extracted path to sys.path so foo.bar v0.1 is importable foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1') os.mkdir(foobar_1_dir) - with tarfile_open(foobar_1_archive) as tf: + with tarfile.open(foobar_1_archive) as tf: tf.extractall(foobar_1_dir) sys.path.insert(1, foobar_1_dir) @@ -526,7 +525,7 @@ def make_sdist(dist_path, files): listed in ``files`` as ``(filename, content)`` tuples. """ - with tarfile_open(dist_path, 'w:gz') as dist: + with tarfile.open(dist_path, 'w:gz') as dist: for filename, content in files: file_bytes = io.BytesIO(content.encode('utf-8')) file_info = tarfile.TarInfo(name=filename) @@ -580,7 +579,7 @@ def make_trivial_sdist(dist_path, setup_py): setup_py_file = tarfile.TarInfo(name='setup.py') setup_py_bytes = io.BytesIO(setup_py.encode('utf-8')) setup_py_file.size = len(setup_py_bytes.getvalue()) - with tarfile_open(dist_path, 'w:gz') as dist: + with tarfile.open(dist_path, 'w:gz') as dist: dist.addfile(setup_py_file, fileobj=setup_py_bytes) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 75ae18dffd..7bf6b68a93 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -2,7 +2,6 @@ import glob import re import stat -import sys from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution @@ -63,12 +62,6 @@ def env(self): }) yield env - dict_order_fails = pytest.mark.skipif( - sys.version_info < (2,7), - reason="Intermittent failures on Python 2.6", - ) - - @dict_order_fails def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): """ When the egg_info section is empty or not present, running @@ -104,7 +97,6 @@ def _validate_content_order(content, expected): flags = re.MULTILINE | re.DOTALL assert re.search(pattern, content, flags) - @dict_order_fails def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): """ When running save_version_info on an existing setup.cfg From 56dea7f0334f60603d4ca6a884ca523fe3389ef3 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 12:06:26 +0700 Subject: [PATCH 6366/8469] `read_configuration()` now accepts `ignore_option_errors`. --- docs/setuptools.txt | 8 ++++++- setuptools/config.py | 40 +++++++++++++++++++++++++++------ setuptools/tests/test_config.py | 16 +++++++++++++ 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 77de255b90..1721edaf36 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2543,7 +2543,7 @@ zip_safe bool setup_requires list-semi install_requires list-semi extras_require section -entry_points file, section +entry_points file:, section use_2to3 bool use_2to3_fixers list-comma use_2to3_exclude_fixers list-comma @@ -2582,6 +2582,12 @@ in the first argument. To include values from other configuration files which could be in various places set `find_others` function argument to ``True``. +If you have only a configuration file but not the whole package you can still +try to get data out of it with the help of `ignore_option_errors` function +argument. When it is set to ``True`` all options with errors possibly produced +by directives, such as ``attr:`` and others will be silently ignored. +As a consequence the resulting dictionary will include no such options. + -------------------------------- Extending and Reusing Setuptools diff --git a/setuptools/config.py b/setuptools/config.py index 889dc683d3..007d24e284 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -10,7 +10,8 @@ from setuptools.extern.six import string_types -def read_configuration(filepath, find_others=False): +def read_configuration( + filepath, find_others=False, ignore_option_errors=False): """Read given configuration file and returns options from it as a dict. :param str|unicode filepath: Path to configuration file @@ -19,6 +20,11 @@ def read_configuration(filepath, find_others=False): :param bool find_others: Whether to search for other configuration files which could be on in various places. + :param bool ignore_option_errors: Whether to silently ignore + options, values of which could not be resolved (e.g. due to exceptions + in directives such as file:, attr:, etc.). + If False exceptions are propagated as expected. + :rtype: dict """ from setuptools.dist import Distribution, _Distribution @@ -40,7 +46,9 @@ def read_configuration(filepath, find_others=False): _Distribution.parse_config_files(dist, filenames=filenames) - handlers = parse_configuration(dist, dist.command_options) + handlers = parse_configuration( + dist, dist.command_options, + ignore_option_errors=ignore_option_errors) os.chdir(current_directory) @@ -76,7 +84,8 @@ def configuration_to_dict(handlers): return config_dict -def parse_configuration(distribution, command_options): +def parse_configuration( + distribution, command_options, ignore_option_errors=False): """Performs additional parsing of configuration options for a distribution. @@ -84,12 +93,18 @@ def parse_configuration(distribution, command_options): :param Distribution distribution: :param dict command_options: + :param bool ignore_option_errors: Whether to silently ignore + options, values of which could not be resolved (e.g. due to exceptions + in directives such as file:, attr:, etc.). + If False exceptions are propagated as expected. :rtype: list """ - meta = ConfigMetadataHandler(distribution.metadata, command_options) + meta = ConfigMetadataHandler( + distribution.metadata, command_options, ignore_option_errors) meta.parse() - options = ConfigOptionsHandler(distribution, command_options) + options = ConfigOptionsHandler( + distribution, command_options, ignore_option_errors) options.parse() return [meta, options] @@ -111,7 +126,7 @@ class ConfigHandler(object): """ - def __init__(self, target_obj, options): + def __init__(self, target_obj, options, ignore_option_errors=False): sections = {} section_prefix = self.section_prefix @@ -122,6 +137,7 @@ def __init__(self, target_obj, options): section_name = section_name.replace(section_prefix, '').strip('.') sections[section_name] = section_options + self.ignore_option_errors = ignore_option_errors self.target_obj = target_obj self.sections = sections self.set_options = [] @@ -148,9 +164,19 @@ def __setitem__(self, option_name, value): # Already inhabited. Skipping. return + skip_option = False parser = self.parsers.get(option_name) if parser: - value = parser(value) + try: + value = parser(value) + + except Exception: + skip_option = True + if not self.ignore_option_errors: + raise + + if skip_option: + return setter = getattr(target_obj, 'set_%s' % option_name, None) if setter is None: diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 2148772095..aaf78aefed 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -73,6 +73,22 @@ def test_no_config(self, tmpdir): with pytest.raises(DistutilsFileError): read_configuration('%s' % tmpdir.join('setup.cfg')) + def test_ignore_errors(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'version = attr: none.VERSION\n' + 'keywords = one, two\n' + ) + with pytest.raises(ImportError): + read_configuration('%s' % tmpdir.join('setup.cfg')) + + config_dict = read_configuration( + '%s' % tmpdir.join('setup.cfg'), ignore_option_errors=True) + + assert config_dict['metadata']['keywords'] == ['one', 'two'] + assert 'version' not in config_dict['metadata'] + class TestMetadata: From b73891f82d5f1a353a2ad0090b1f5edece921508 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 12:30:24 +0700 Subject: [PATCH 6367/8469] config tests refactored. --- setuptools/tests/test_config.py | 43 ++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index aaf78aefed..35bdbad108 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -9,6 +9,13 @@ class ErrConfigHandler(ConfigHandler): """Erroneous handler. Fails to implement required methods.""" +def make_package_dir(name, base_dir): + dir_package = base_dir.mkdir(name) + init_file = dir_package.join('__init__.py') + init_file.write('') + return dir_package, init_file + + def fake_env(tmpdir, setup_cfg, setup_py=None): if setup_py is None: @@ -18,11 +25,12 @@ def fake_env(tmpdir, setup_cfg, setup_py=None): ) tmpdir.join('setup.py').write(setup_py) - tmpdir.join('setup.cfg').write(setup_cfg) + config = tmpdir.join('setup.cfg') + config.write(setup_cfg) + + package_dir, init_file = make_package_dir('fake_package', tmpdir) - package_name = 'fake_package' - dir_package = tmpdir.mkdir(package_name) - dir_package.join('__init__.py').write( + init_file.write( 'VERSION = (1, 2, 3)\n' '\n' 'VERSION_MAJOR = 1' @@ -31,6 +39,7 @@ def fake_env(tmpdir, setup_cfg, setup_py=None): ' return [3, 4, 5, "dev"]\n' '\n' ) + return package_dir, config @contextlib.contextmanager @@ -55,7 +64,7 @@ def test_parsers_implemented(): class TestConfigurationReader: def test_basic(self, tmpdir): - fake_env( + _, config = fake_env( tmpdir, '[metadata]\n' 'version = 10.1.1\n' @@ -64,7 +73,7 @@ def test_basic(self, tmpdir): '[options]\n' 'scripts = bin/a.py, bin/b.py\n' ) - config_dict = read_configuration('%s' % tmpdir.join('setup.cfg')) + config_dict = read_configuration('%s' % config) assert config_dict['metadata']['version'] == '10.1.1' assert config_dict['metadata']['keywords'] == ['one', 'two'] assert config_dict['options']['scripts'] == ['bin/a.py', 'bin/b.py'] @@ -74,17 +83,17 @@ def test_no_config(self, tmpdir): read_configuration('%s' % tmpdir.join('setup.cfg')) def test_ignore_errors(self, tmpdir): - fake_env( + _, config = fake_env( tmpdir, '[metadata]\n' 'version = attr: none.VERSION\n' 'keywords = one, two\n' ) with pytest.raises(ImportError): - read_configuration('%s' % tmpdir.join('setup.cfg')) + read_configuration('%s' % config) config_dict = read_configuration( - '%s' % tmpdir.join('setup.cfg'), ignore_option_errors=True) + '%s' % config, ignore_option_errors=True) assert config_dict['metadata']['keywords'] == ['one', 'two'] assert 'version' not in config_dict['metadata'] @@ -188,7 +197,7 @@ def test_multiline(self, tmpdir): def test_version(self, tmpdir): - fake_env( + _, config = fake_env( tmpdir, '[metadata]\n' 'version = attr: fake_package.VERSION\n' @@ -196,14 +205,14 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' - tmpdir.join('setup.cfg').write( + config.write( '[metadata]\n' 'version = attr: fake_package.get_version\n' ) with get_dist(tmpdir) as dist: assert dist.metadata.version == '3.4.5.dev' - tmpdir.join('setup.cfg').write( + config.write( '[metadata]\n' 'version = attr: fake_package.VERSION_MAJOR\n' ) @@ -214,7 +223,7 @@ def test_version(self, tmpdir): subpack.join('__init__.py').write('') subpack.join('submodule.py').write('VERSION = (2016, 11, 26)') - tmpdir.join('setup.cfg').write( + config.write( '[metadata]\n' 'version = attr: fake_package.subpackage.submodule.VERSION\n' ) @@ -250,7 +259,7 @@ def test_classifiers(self, tmpdir): ]) # From file. - fake_env( + _, config = fake_env( tmpdir, '[metadata]\n' 'classifiers = file: classifiers\n' @@ -265,7 +274,7 @@ def test_classifiers(self, tmpdir): assert set(dist.metadata.classifiers) == expected # From section. - tmpdir.join('setup.cfg').write( + config.write( '[metadata.classifiers]\n' 'Framework :: Django\n' 'Programming Language :: Python :: 3.5\n' @@ -454,7 +463,7 @@ def test_extras_require(self, tmpdir): } def test_entry_points(self, tmpdir): - fake_env( + _, config = fake_env( tmpdir, '[options.entry_points]\n' 'group1 = point1 = pack.module:func, ' @@ -479,7 +488,7 @@ def test_entry_points(self, tmpdir): tmpdir.join('entry_points').write(expected) # From file. - tmpdir.join('setup.cfg').write( + config.write( '[options]\n' 'entry_points = file: entry_points\n' ) From a262947e39e6125ee15d3752a2124acf0c62bda6 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 13:33:57 +0700 Subject: [PATCH 6368/8469] Implemented find() configuration support for `packages`. --- docs/setuptools.txt | 20 ++++++++++++++--- setuptools/config.py | 33 ++++++++++++++++++++++++++-- setuptools/tests/test_config.py | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 5 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 1721edaf36..2f78b133de 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2448,6 +2448,11 @@ boilerplate code in some cases. pdf = ReportLab>=1.2; RXP rest = docutils>=0.3; pack ==1.1, ==1.3 + [options.packages.find] + exclude = + src.subpackage1 + src.subpackage2 + Metadata and options could be set in sections with the same names. @@ -2486,13 +2491,13 @@ Type names used below: * ``list-semi`` - dangling list or semicolon-separated values string * ``bool`` - ``True`` is 1, yes, true * ``dict`` - list-comma where keys from values are separated by = +* ``section`` - values could be read from a dedicated (sub)section Special directives: * ``attr:`` - value could be read from module attribute * ``file:`` - value could be read from a file -* ``section:`` - values could be read from a dedicated (sub)section .. note:: @@ -2529,8 +2534,10 @@ requires list-comma obsoletes list-comma ================= ================= ===== -**version** - ``attr:`` supports callables; supports iterables; -unsupported types are casted using ``str()``. +.. note:: + + **version** - ``attr:`` supports callables; supports iterables; + unsupported types are casted using ``str()``. Options @@ -2560,6 +2567,13 @@ exclude_package_data section namespace_packages list-comma ======================= ===== +.. note:: + + **packages** - ``find:`` directive can be further configured + in a dedicated subsection `options.packages.find`. This subsection + accepts the same keys as `setuptools.find` function: + `where`, `include`, `exclude`. + Configuration API ================= diff --git a/setuptools/config.py b/setuptools/config.py index 007d24e284..743575f049 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -361,7 +361,10 @@ def parse(self): method_postfix = '_%s' % section_name section_parser_method = getattr( - self, 'parse_section%s' % method_postfix, None) + self, + # Dots in section names are tranlsated into dunderscores. + ('parse_section%s' % method_postfix).replace('.', '__'), + None) if section_parser_method is None: raise DistutilsOptionError( @@ -481,8 +484,34 @@ def _parse_packages(self, value): if not value.startswith(find_directive): return self._parse_list(value) + # Read function arguments from a dedicated section. + find_kwargs = self.parse_section_packages__find( + self.sections.get('packages.find', {})) + from setuptools import find_packages - return find_packages() + + return find_packages(**find_kwargs) + + def parse_section_packages__find(self, section_options): + """Parses `packages.find` configuration file section. + + To be used in conjunction with _parse_packages(). + + :param dict section_options: + """ + section_data = self._parse_section_to_dict( + section_options, self._parse_list) + + valid_keys = ['where', 'include', 'exclude'] + + find_kwargs = dict( + [(k, v) for k, v in section_data.items() if k in valid_keys and v]) + + where = find_kwargs.get('where') + if where is not None: + find_kwargs['where'] = where[0] # cast list to single val + + return find_kwargs def parse_section_entry_points(self, section_options): """Parses `entry_points` configuration file section. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 35bdbad108..08e398b3de 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -446,6 +446,44 @@ def test_packages(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.packages == ['fake_package'] + def test_find_directive(self, tmpdir): + dir_package, config = fake_env( + tmpdir, + '[options]\n' + 'packages = find:\n' + ) + + dir_sub_one, _ = make_package_dir('sub_one', dir_package) + dir_sub_two, _ = make_package_dir('sub_two', dir_package) + + with get_dist(tmpdir) as dist: + assert dist.packages == [ + 'fake_package', 'fake_package.sub_two', 'fake_package.sub_one'] + + config.write( + '[options]\n' + 'packages = find:\n' + '\n' + '[options.packages.find]\n' + 'where = .\n' + 'include =\n' + ' fake_package.sub_one\n' + ' two\n' + ) + with get_dist(tmpdir) as dist: + assert dist.packages == ['fake_package.sub_one'] + + config.write( + '[options]\n' + 'packages = find:\n' + '\n' + '[options.packages.find]\n' + 'exclude =\n' + ' fake_package.sub_one\n' + ) + with get_dist(tmpdir) as dist: + assert dist.packages == ['fake_package', 'fake_package.sub_two'] + def test_extras_require(self, tmpdir): fake_env( tmpdir, From f85a821b039a03eb0231e6bd0fc925a4e37f3911 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 13:48:03 +0700 Subject: [PATCH 6369/8469] Fixed test for `find()` results. --- setuptools/tests/test_config.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 08e398b3de..677ccf2c03 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -457,8 +457,9 @@ def test_find_directive(self, tmpdir): dir_sub_two, _ = make_package_dir('sub_two', dir_package) with get_dist(tmpdir) as dist: - assert dist.packages == [ - 'fake_package', 'fake_package.sub_two', 'fake_package.sub_one'] + assert set(dist.packages) == set([ + 'fake_package', 'fake_package.sub_two', 'fake_package.sub_one' + ]) config.write( '[options]\n' @@ -482,7 +483,8 @@ def test_find_directive(self, tmpdir): ' fake_package.sub_one\n' ) with get_dist(tmpdir) as dist: - assert dist.packages == ['fake_package', 'fake_package.sub_two'] + assert set(dist.packages) == set( + ['fake_package', 'fake_package.sub_two']) def test_extras_require(self, tmpdir): fake_env( From 35f3d1f37fdb137d5f5316058d49c96b9f28ca2d Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 15:23:49 +0700 Subject: [PATCH 6370/8469] `test_ignore_errors` side effect mitigated. --- setuptools/tests/test_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 677ccf2c03..fa8d523b47 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -98,6 +98,8 @@ def test_ignore_errors(self, tmpdir): assert config_dict['metadata']['keywords'] == ['one', 'two'] assert 'version' not in config_dict['metadata'] + config.remove() + class TestMetadata: From c471788dbccf4fcf669d141e6f1325c1b43b8b94 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 10 Dec 2016 22:24:01 +0700 Subject: [PATCH 6371/8469] Proper finalization for `read_configuration()`. --- setuptools/config.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 743575f049..d71ff028da 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -38,19 +38,21 @@ def read_configuration( current_directory = os.getcwd() os.chdir(os.path.dirname(filepath)) - dist = Distribution() + try: + dist = Distribution() - filenames = dist.find_config_files() if find_others else [] - if filepath not in filenames: - filenames.append(filepath) + filenames = dist.find_config_files() if find_others else [] + if filepath not in filenames: + filenames.append(filepath) - _Distribution.parse_config_files(dist, filenames=filenames) + _Distribution.parse_config_files(dist, filenames=filenames) - handlers = parse_configuration( - dist, dist.command_options, - ignore_option_errors=ignore_option_errors) + handlers = parse_configuration( + dist, dist.command_options, + ignore_option_errors=ignore_option_errors) - os.chdir(current_directory) + finally: + os.chdir(current_directory) return configuration_to_dict(handlers) From e9f06d225b9a58807e4fc6c9f3219a6c7b460d17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Dec 2016 11:34:19 -0500 Subject: [PATCH 6372/8469] Update changelog. Ref #879. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 248a52c6ac..a61ea855aa 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v30.4.0 +------- + +* #879: For declarative config: + - read_configuration() now accepts ignore_option_errors argument. This allows scraping tools to read metadata without a need to download entire packages. E.g. we can gather some stats right from GitHub repos just by downloading setup.cfg. + - packages find: directive now supports fine tuning from a subsection. The same arguments as for find() are accepted. + v30.3.0 ------- From e48430161fd59169cbe38c372d79a9c16e041d39 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Dec 2016 11:34:29 -0500 Subject: [PATCH 6373/8469] =?UTF-8?q?Bump=20version:=2030.3.0=20=E2=86=92?= =?UTF-8?q?=2030.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 950924b179..08e51b5b22 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.3.0 +current_version = 30.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index da2c6473b6..d6dc048f8f 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.3.0", + version="30.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 1a273f3d9d3a110361a6db6db1afaf704a031acb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Dec 2016 11:40:04 -0500 Subject: [PATCH 6374/8469] Reformat changelog for better RST formatting --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index a61ea855aa..1efdb4982f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,7 +2,9 @@ v30.4.0 ------- * #879: For declarative config: + - read_configuration() now accepts ignore_option_errors argument. This allows scraping tools to read metadata without a need to download entire packages. E.g. we can gather some stats right from GitHub repos just by downloading setup.cfg. + - packages find: directive now supports fine tuning from a subsection. The same arguments as for find() are accepted. v30.3.0 From 5c9406987aacf17d9c004aa1456797e0044306e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Dec 2016 14:20:23 -0500 Subject: [PATCH 6375/8469] Use py.test to launch pytest, rather than python -m test, preventing the empty path from being added to sys.path per pytest-dev/pytest#2104. Fixes #852. Also use 'usedevelop' as the setuptools.tests.fixtures aren't available in a standard install. --- conftest.py | 17 ----------------- tox.ini | 3 ++- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/conftest.py b/conftest.py index 0da92be9ad..3cccfe1abd 100644 --- a/conftest.py +++ b/conftest.py @@ -1,6 +1,3 @@ -import os - - pytest_plugins = 'setuptools.tests.fixtures' @@ -9,17 +6,3 @@ def pytest_addoption(parser): "--package_name", action="append", default=[], help="list of package_name to pass to test functions", ) - - -def pytest_configure(): - _issue_852_workaround() - - -def _issue_852_workaround(): - """ - Patch 'setuptools.__file__' with an absolute path - for forward compatibility with Python 3. - Workaround for https://github.com/pypa/setuptools/issues/852 - """ - setuptools = __import__('setuptools') - setuptools.__file__ = os.path.abspath(setuptools.__file__) diff --git a/tox.ini b/tox.ini index cfb682ee37..cae9c745c2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [testenv] deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR -commands=python -m pytest {posargs:-rsx} +commands=py.test {posargs:-rsx} +usedevelop=True From 6070cc15ed234a71777747c4cdd55f228f3d7b90 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 15:58:49 -0500 Subject: [PATCH 6376/8469] Don't nullify module when has_mfs --- setuptools/namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 96aa20e773..69debe4beb 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -51,7 +51,7 @@ def _get_target(self): "importlib.util.module_from_spec(" "importlib.machinery.PathFinder.find_spec(%(pkg)r, " "[os.path.dirname(p)])))", - "m = not has_mfs and " + "m = m or not has_mfs and " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From 8fa9a8640eb85e7250b8e3ca15124e74ce6014e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 16:02:14 -0500 Subject: [PATCH 6377/8469] Only import modules when they're expected to be present --- setuptools/namespaces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 69debe4beb..0a889f224a 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -43,9 +43,11 @@ def _get_target(self): return self.target _nspkg_tmpl = ( - "import sys, types, os, importlib.util, importlib.machinery", + "import sys, types, os", "has_mfs = sys.version_info > (3, 5)", "p = os.path.join(%(root)s, *%(pth)r)", + "importlib = has_mfs and __import__('importlib.util')", + "has_mfs and __import__('importlib.machinery')", "m = has_mfs and " "sys.modules.setdefault(%(pkg)r, " "importlib.util.module_from_spec(" From 230ffaafd061b42f8674b6b6b75ed8133e8d6934 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 16:18:29 -0500 Subject: [PATCH 6378/8469] Expect failure on Python 3.4 and earlier as module_from_spec isn't available. Ref #250. --- setuptools/tests/test_namespaces.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 28c5e9de99..e7fa4ee629 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -11,8 +11,8 @@ class TestNamespaces: - @pytest.mark.xfail(sys.version_info < (3, 3), - reason="Requires PEP 420") + @pytest.mark.xfail(sys.version_info < (3, 5), + reason="Requires importlib.util.module_from_spec") @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") def test_mixed_site_and_non_site(self, tmpdir): From 6f5dc38012824dc3d104356d023ec3c959bbb586 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 16:41:11 -0500 Subject: [PATCH 6379/8469] Update changelog. Fixes #250. Fixes #870. Ref #805. Ref pypa/pip#1924. Ref #845. --- CHANGES.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1efdb4982f..cbb913fb79 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +v31.0.0 +------- + +* #250: Install '-nspkg.pth' files for packages installed + with 'setup.py develop'. These .pth files allow + namespace packages installed by pip or develop to + co-mingle. This change required the removal of the + change for #805, introduced in 28.3.0 and implicated + in #870, but means that namespace packages not in a + site packages directory will no longer work on Python + earlier than 3.5, whereas before they would work on + Python not earlier than 3.3. + v30.4.0 ------- From fe695061d3509bf7396d5c691342e6c6d4b6c3b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 18:31:09 -0500 Subject: [PATCH 6380/8469] =?UTF-8?q?Bump=20version:=2030.4.0=20=E2=86=92?= =?UTF-8?q?=2031.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 08e51b5b22..486ee0d13b 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 30.4.0 +current_version = 31.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index d6dc048f8f..dc846acf14 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="30.4.0", + version="31.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a5b81d8ea0b6aeba1a59e77d4d3783db4b9e23c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 18:42:28 -0500 Subject: [PATCH 6381/8469] Add final intended changes for changelog entry. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index cbb913fb79..1638c40704 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ v31.0.0 with 'setup.py develop'. These .pth files allow namespace packages installed by pip or develop to co-mingle. This change required the removal of the - change for #805, introduced in 28.3.0 and implicated + change for #805 and pip #1924, introduced in 28.3.0 and implicated in #870, but means that namespace packages not in a site packages directory will no longer work on Python earlier than 3.5, whereas before they would work on From 8c055ff64792c23e80f85f4c127d003fd2ae4b7d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Dec 2016 20:48:07 -0500 Subject: [PATCH 6382/8469] Mark another test to fail. Ref #851 --- setuptools/tests/test_develop.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index e0227453be..d1e40929e5 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -136,6 +136,8 @@ def install_develop(src_dir, target): with src_dir.as_cwd(): subprocess.check_call(develop_cmd, env=env) + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), + reason="https://github.com/pypa/setuptools/issues/851") def test_namespace_package_importable(self, tmpdir): """ Installing two packages sharing the same namespace, one installed From 357b7c659b6893dec4145d492084217b9317bca1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 12 Dec 2016 19:45:51 -0500 Subject: [PATCH 6383/8469] Add test attempting to capture failure, but it passes. Ref #885. --- setuptools/tests/test_namespaces.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index e7fa4ee629..2aefb4876a 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -50,3 +50,26 @@ def test_mixed_site_and_non_site(self, tmpdir): ] env = dict(PYTHONPATH=python_path) subprocess.check_call(try_import, env=env) + + def test_pkg_resources_import(self, tmpdir): + """ + Ensure that a namespace package doesn't break on import + of pkg_resources. + """ + pkg = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') + target = tmpdir / 'packages' + target.mkdir() + env = dict(PYTHONPATH=str(target)) + install_cmd = [ + sys.executable, + '-m', 'easy_install', + '-d', str(target), + str(pkg), + ] + subprocess.check_call(install_cmd, env=env) + namespaces.make_site_dir(target) + try_import = [ + sys.executable, + '-c', 'import pkg_resources', + ] + subprocess.check_call(try_import, env=env) From d9c9284e19ce475c2366b279dd4db82a2751a571 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 12 Dec 2016 21:14:34 -0500 Subject: [PATCH 6384/8469] Additionally, in test_develop, ensure that pkg_resources is importable. Ref #885. --- setuptools/tests/test_develop.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index d1e40929e5..430a07e6c2 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -165,3 +165,9 @@ def test_namespace_package_importable(self, tmpdir): env = dict(PYTHONPATH=str(target)) subprocess.check_call(try_import, env=env) + # additionally ensure that pkg_resources import works + pkg_resources_imp = [ + sys.executable, + '-c', 'import pkg_resources', + ] + subprocess.check_call(pkg_resources_imp, env=env) From f63a2b9c7a165de24a4a5b4b8c88a298d45dddad Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 13 Dec 2016 09:06:24 -0800 Subject: [PATCH 6385/8469] Issue #26071: Fixes preprocessor definition and rebuilds wininst-14.0[-amd64].exe --- command/wininst-14.0-amd64.exe | Bin 589824 -> 587776 bytes command/wininst-14.0.exe | Bin 460288 -> 458240 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/command/wininst-14.0-amd64.exe b/command/wininst-14.0-amd64.exe index 22299543a97ffc1525a3b1c778cb158d6c6430ad..253c2e2eccefa79393827f44f85680536906574a 100644 GIT binary patch delta 117970 zcmbq+30PCd*LM;Kpb~@2MGz3ss3MaE*-6Q zv$b}yyH%?|TV+u}alxf^t)jKeBb*#pU=b1%$YN1&YU@O z=FFM7*PI+f&Yf24`lw^prwp*Kexvoiikcy}e1A)(7u_mGe#!KLTiN`#@YW&xjvTf6 z)(QOn^{M5i^83uqGd%z7&5QUIg7R-2;lFR+I?R7_Zk6M=qGs@|DfpfE>42L=cg&}| zdHKXo({2K<-mPKNCQYTr*T;sn&orx4FTNJ2ifNxYTIKzBN7Yi*K+{mADh^Po=4d#y zViW7FZmXWdUQqYz@M4haeS)UeQ;lwn->M+h?lA=L{>!eXnh~T@?eGMuMy!vG6mABp zHu%cuw<?-bh+Fd}*M>nfE+JZH%-w$8VR#}BDg zvJhDspb{lVt!(R@cnUySxBzkH7u!ND`LeZ9x_HRq5?*?X^$Uz?^q-Od)f3PjZ?QRn zD}?R@74KL;L!bXH8kB{uB`i3|py^P;x(20aekf*hgPLfP-ej)@nJ1@#e7Y;$kc!6A zT_*gxMi^3MVJ_eRne*@4f@C2PInO5+$BTwIl{xWn;wh8UYKSqrjQ+BqS1>K2Bnu5F zoqx+FSn@CG^XAF240g9{W(oBoTNPlmEaEZnCJRR?4blo;HwACOW;VOtz{cN!XY?IB z#h6_EM@!{zu=09Q_NJQyRUBw>E-@rHO@<_sYse_q@H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xO#N;)aselbE_9tM{8nhGS_6U$z7AT#*3-TqETpA)3l~# z&G4GhHREe0*5vl&^%V3J^_28f^i=iK^wjk<^fdLf^tAPK^mO&~_YC$7_l)+8_e}Im z_006l^(^#6y|LcZ-t^wg-t6Ao-n`y|-lE=kNpD$iMQ>GaO>bRqLvK@WOK)3mM{iee zfA3)LaPMgEc<)5-RPRjhT<=1!pReyr?Mv^=?91-U?aS*c=qu_g=_~82=&S0h>8tB& z=xge0>1*rj=YM4C>s#oHGM8=s%ykdNqo|{#W7XnEv2X4&_&+V2S~C+`pSvt-g6y>gYs=QQth)Wf*sc{N>nhgOtgBns zu&!xc%euC89qYQ*4XztrH@a?o-Nd@7bu;Vc*2TKhyED79yK}qqx~IBly63tVx}%<0 zPijwkPi9Yc&;NE{+5dE*XQglcZ0}VQAH|N`=KrqB+^T)%Vn=^Hvn#tRw=1u!psT2> zq^qn;)k>B{>BfFl%UrBz)$B*H)Y$miiM3N}XV$KonTuVqs(aq&5}x;WA8|R!+-U!2 zJXdx6J@)IQnq^Vy`m;WcB`!&gb)`FbUY94cM-5K6{?dQME?Z(TZdn$UuloCZ?1a>c z`)lrRxZgGVmqkUe>iAD$-;S?cSQ~pNeO=}{CBw_26iDs!*W9wrlPg*qTbsHzeQoC2 z?6tXT^K@j<+OF>5?$K`hwD_7F@;d4|y6#JTpzMLV2ihJOd|={%SZ8Kuc4uy9RcB3S zLuXTG>gx2>RSz~i)bvoxLv0UrJk<42|3iZh4L>yc(5iPnjBWShigi{0pD`IV8Z+w_ yHjhQNaVY98+dLLw9KskBn7|dLZ-c4Z@&7YzBa^kj{A@BG$9vbGI2&tP^8WxwV?jCq diff --git a/command/wininst-14.0.exe b/command/wininst-14.0.exe index 0dac1103d98db0af1e9027c41fe921136c5f6396..46f5f356676c800f99742deb6bf4c0a96aa166c0 100644 GIT binary patch delta 106589 zcmc${e?XK~_CNm2Fd!f}s354QAdo2j9w|_;AszgY*dRJc30i6UG}(`>nX*tZSRuU*pX`s(^g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to*&%ie?(iA*Ga9d#*;PQ#Erjts_5c$P&p}I@S)Txa zCR?)IA1OQxs~-oRbrEZi6tCSPd`WgNum&qQujKuY2~(1kA)zFU_=~~ zI9;0X;^ty4FcIpfg9uG~_UmplRZKC^a-nsr{deQA z0twHM;Nwrg=gBt;jiIb%fATvKOMC02wIeR=q?pgpIHVy zvnW%7(ujqJ9&Zjr8*d6K$_j|r9cDHhg4|Egtto<=Tatx=0XD?&SThy}pQk??29`4$ z?Wk1PXj!dDc6^BU zqJiYRXCaEa110bXZZ;mq2!56j;#I9sI}CYP4FfY#=(9IOE~=o6_<2f*7u8`b0xOEa zdOE^Hh-afPP%xXVz&JrF#tDviTV22kv8Jai6f25CF{OazW?0ieE8)LhUXqpO!duOP z<(q?r(7&VUk76_+TfvkQ`xh!tdG4f$9_Nn~pT&XW?3 z0k2rkCJi+s5oyt8LqwZuQbb$~MyBErb)C)bh`heInSrnsvvH6oaFjW)O>%+!`3S#a zgkKOeZy2T*qdbno5pp}ctng< Date: Tue, 13 Dec 2016 21:06:00 -0500 Subject: [PATCH 6386/8469] Add test capturing expectation when a package is both installed and in the current working directory. Ref #885. --- setuptools/tests/test_namespaces.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 2aefb4876a..5199129e31 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -73,3 +73,30 @@ def test_pkg_resources_import(self, tmpdir): '-c', 'import pkg_resources', ] subprocess.check_call(try_import, env=env) + + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), + reason="https://github.com/pypa/setuptools/issues/851") + def test_namespace_package_installed_and_cwd(self, tmpdir): + """ + Installing a namespace packages but also having it in the current + working directory, only one version should take precedence. + """ + pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') + target = tmpdir / 'packages' + # use pip to install to the target directory + install_cmd = [ + 'pip', + 'install', + str(pkg_A), + '-t', str(target), + ] + subprocess.check_call(install_cmd) + namespaces.make_site_dir(target) + + # ensure that package imports and pkg_resources imports + pkg_resources_imp = [ + sys.executable, + '-c', 'import pkg_resources; import myns.pkgA', + ] + env = dict(PYTHONPATH=str(target)) + subprocess.check_call(pkg_resources_imp, env=env, cwd=str(pkg_A)) From d9125bcb60fa2e1a5270259dad6b6a94c8f61cde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Dec 2016 21:09:49 -0500 Subject: [PATCH 6387/8469] As sometimes orig_path may be something other than a list (i.e. _NamespacePath), use iterator tools to sort the items in place. Fixes #885. --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 92503288e7..d0f66274fd 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2113,7 +2113,7 @@ def position_in_sys_path(path): parts = path_parts[:-module_parts] return safe_sys_path_index(_normalize_cached(os.sep.join(parts))) - orig_path.sort(key=position_in_sys_path) + orig_path[:] = sorted(orig_path, key=position_in_sys_path) module.__path__[:] = [_normalize_cached(p) for p in orig_path] From 3943cf41ef2477fa85189e4bf8341fb618cac7c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Dec 2016 21:11:50 -0500 Subject: [PATCH 6388/8469] Update changelog following fix for #885. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1638c40704..7d6386c2f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v31.0.1 +------- + +* #885: Fix regression where 'pkg_resources._rebuild_mod_path' + would fail when a namespace package's '__path__' was not + a list with a sort attribute. + v31.0.0 ------- From 3e05a9630ff0e0596a539d4b6d24f97d3fb987f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Dec 2016 21:17:10 -0500 Subject: [PATCH 6389/8469] Skip again on appveyor --- setuptools/tests/test_namespaces.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 5199129e31..451df3c489 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -51,6 +51,8 @@ def test_mixed_site_and_non_site(self, tmpdir): env = dict(PYTHONPATH=python_path) subprocess.check_call(try_import, env=env) + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), + reason="https://github.com/pypa/setuptools/issues/851") def test_pkg_resources_import(self, tmpdir): """ Ensure that a namespace package doesn't break on import From 7c0c39ef1f60571709e5a8e6680f2147c38cd4ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Dec 2016 21:38:48 -0500 Subject: [PATCH 6390/8469] Bypass sort behavior altogether when module.__path__ isn't a list. Fixes #885. --- pkg_resources/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d0f66274fd..4c9868c769 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2113,7 +2113,11 @@ def position_in_sys_path(path): parts = path_parts[:-module_parts] return safe_sys_path_index(_normalize_cached(os.sep.join(parts))) - orig_path[:] = sorted(orig_path, key=position_in_sys_path) + if not isinstance(orig_path, list): + # Is this behavior useful when module.__path__ is not a list? + return + + orig_path.sort(key=position_in_sys_path) module.__path__[:] = [_normalize_cached(p) for p in orig_path] From 5c5d40c367a1d32fdb0379e5961abd659f67a01f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 08:35:13 -0500 Subject: [PATCH 6391/8469] =?UTF-8?q?Bump=20version:=2031.0.0=20=E2=86=92?= =?UTF-8?q?=2031.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 486ee0d13b..a793bf238f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 31.0.0 +current_version = 31.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index dc846acf14..d88b1048a4 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="31.0.0", + version="31.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e066c97f828ec5ab8be4dde6e340dbfdcd312ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 10:47:11 -0500 Subject: [PATCH 6392/8469] Backport config file parsing behavior from Python 3.7. Ref #889. --- setuptools/dist.py | 3 +- setuptools/py36compat.py | 82 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 setuptools/py36compat.py diff --git a/setuptools/dist.py b/setuptools/dist.py index c04e64268b..159464be23 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -21,6 +21,7 @@ from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration import pkg_resources +from .py36compat import Distribution_parse_config_files def _get_unpatched(cls): @@ -213,7 +214,7 @@ def check_packages(dist, attr, value): _Distribution = get_unpatched(distutils.core.Distribution) -class Distribution(_Distribution): +class Distribution(Distribution_parse_config_files, _Distribution): """Distribution with support for features, tests, and package data This is an enhanced version of 'distutils.dist.Distribution' that diff --git a/setuptools/py36compat.py b/setuptools/py36compat.py new file mode 100644 index 0000000000..5bad963025 --- /dev/null +++ b/setuptools/py36compat.py @@ -0,0 +1,82 @@ +import sys +from distutils.errors import DistutilsOptionError +from distutils.util import strtobool +from distutils.debug import DEBUG + + +class Distribution_parse_config_files: + """ + Mix-in providing forward-compatibility for functionality to be + included by default on Python 3.7. + + Do not edit the code in this class except to update functionality + as implemented in distutils. + """ + def parse_config_files(self, filenames=None): + from configparser import ConfigParser + + # Ignore install directory options if we have a venv + if sys.prefix != sys.base_prefix: + ignore_options = [ + 'install-base', 'install-platbase', 'install-lib', + 'install-platlib', 'install-purelib', 'install-headers', + 'install-scripts', 'install-data', 'prefix', 'exec-prefix', + 'home', 'user', 'root'] + else: + ignore_options = [] + + ignore_options = frozenset(ignore_options) + + if filenames is None: + filenames = self.find_config_files() + + if DEBUG: + self.announce("Distribution.parse_config_files():") + + parser = ConfigParser() + for filename in filenames: + if DEBUG: + self.announce(" reading %s" % filename) + parser.read(filename) + for section in parser.sections(): + options = parser.options(section) + opt_dict = self.get_option_dict(section) + + for opt in options: + if opt != '__name__' and opt not in ignore_options: + val = parser.get(section,opt) + opt = opt.replace('-', '_') + opt_dict[opt] = (filename, val) + + # Make the ConfigParser forget everything (so we retain + # the original filenames that options come from) + parser.__init__() + + # If there was a "global" section in the config file, use it + # to set Distribution options. + + if 'global' in self.command_options: + for (opt, (src, val)) in self.command_options['global'].items(): + alias = self.negative_opt.get(opt) + try: + if alias: + setattr(self, alias, not strtobool(val)) + elif opt in ('verbose', 'dry_run'): # ugh! + setattr(self, opt, strtobool(val)) + else: + setattr(self, opt, val) + except ValueError as msg: + raise DistutilsOptionError(msg) + + +if sys.version_info < (3,): + # Python 2 behavior is sufficient + class Distribution_parse_config_files: + pass + + +if False: + # When updated behavior is available upstream, + # disable override here. + class Distribution_parse_config_files: + pass From 1802d1322ccffcd0b79c63aa7ce9d22e0106015c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 11:00:45 -0500 Subject: [PATCH 6393/8469] Apply patch, disabling interpolation. Fixes #889. --- setuptools/py36compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py36compat.py b/setuptools/py36compat.py index 5bad963025..f527969645 100644 --- a/setuptools/py36compat.py +++ b/setuptools/py36compat.py @@ -33,7 +33,7 @@ def parse_config_files(self, filenames=None): if DEBUG: self.announce("Distribution.parse_config_files():") - parser = ConfigParser() + parser = ConfigParser(interpolation=None) for filename in filenames: if DEBUG: self.announce(" reading %s" % filename) From e2acd39745b32fb34ca4832377839448bcaa260b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 11:03:06 -0500 Subject: [PATCH 6394/8469] Update changelog. Ref #889. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7d6386c2f2..852947fd71 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v31.1.0 +------- + +* #889: Backport proposed fix for disabling interpolation in + distutils.Distribution.parse_config_files. + v31.0.1 ------- From 980c2c5afd20fb9f7e50cb8ec0c42abc664da352 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 15 Dec 2016 10:11:37 +1100 Subject: [PATCH 6395/8469] Revert "Fix #849 global-exclude globbing" This reverts commit 23aba916e1070d3cf9723af85a6ce07c89053931. --- setuptools/command/egg_info.py | 4 ++-- setuptools/tests/test_manifest.py | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8a06e496d7..6f8fd87449 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -457,7 +457,7 @@ def global_include(self, pattern): """ if self.allfiles is None: self.findall() - match = translate_pattern(os.path.join('**', '*' + pattern)) + match = translate_pattern(os.path.join('**', pattern)) found = [f for f in self.allfiles if match.match(f)] self.extend(found) return bool(found) @@ -466,7 +466,7 @@ def global_exclude(self, pattern): """ Exclude all files anywhere that match the pattern. """ - match = translate_pattern(os.path.join('**', '*' + pattern)) + match = translate_pattern(os.path.join('**', pattern)) return self._remove_files(match.match) def append(self, item): diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 62b6d708c1..602c43a274 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -449,11 +449,6 @@ def test_global_include(self): assert file_list.files == ['a.py', l('d/c.py')] self.assertWarnings() - file_list.process_template_line('global-include .txt') - file_list.sort() - assert file_list.files == ['a.py', 'b.txt', l('d/c.py')] - self.assertNoWarnings() - def test_global_exclude(self): l = make_local_path # global-exclude @@ -470,13 +465,6 @@ def test_global_exclude(self): assert file_list.files == ['b.txt'] self.assertWarnings() - file_list = FileList() - file_list.files = ['a.py', 'b.txt', l('d/c.pyc'), 'e.pyo'] - file_list.process_template_line('global-exclude .py[co]') - file_list.sort() - assert file_list.files == ['a.py', 'b.txt'] - self.assertNoWarnings() - def test_recursive_include(self): l = make_local_path # recursive-include From b92763bc598c489ea4e5c04dd9713bf7583fd546 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 15 Dec 2016 10:24:12 +1100 Subject: [PATCH 6396/8469] Update changelog, ref #890 --- CHANGES.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7d6386c2f2..50c505a8dc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +In development +-------------- + +* #890: Revert #849. ``global-exclude .foo`` will not match all + ``*.foo`` files any more. Package authors must add an explicit + wildcard, such as ``global-exclude *.foo``, to match all + ``.foo`` files. See #886, #849. + v31.0.1 ------- @@ -132,7 +140,11 @@ v28.5.0 * #810: Tests are now invoked with tox and not setup.py test. * #249 and #450 via #764: Avoid scanning the whole tree - when building the manifest. + when building the manifest. Also fixes a long-standing bug + where patterns in ``MANIFEST.in`` had implicit wildcard + matching. This caused ``global-exclude .foo`` to exclude + all ``*.foo`` files, but also ``global-exclude bar.py`` to + exclude ``foo_bar.py``. v28.4.0 ------- From 8d6a16a454fc6c35bd8ef57ec86a6ff6d0e8d25a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 20:48:39 -0500 Subject: [PATCH 6397/8469] Update changelog. Ref #890. --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 50c505a8dc..1d6ac12389 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,5 @@ -In development --------------- +v32.0.0 +------- * #890: Revert #849. ``global-exclude .foo`` will not match all ``*.foo`` files any more. Package authors must add an explicit From 083929cf87fe74e21a1a37afcb300ae73652b136 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Dec 2016 20:48:51 -0500 Subject: [PATCH 6398/8469] =?UTF-8?q?Bump=20version:=2031.0.1=20=E2=86=92?= =?UTF-8?q?=2032.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a793bf238f..fa6b4deb01 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 31.0.1 +current_version = 32.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index d88b1048a4..a6a062f52b 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="31.0.1", + version="32.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9f37eb817df5d9453e49edbcf2760832f333af68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 16 Dec 2016 15:32:16 +0100 Subject: [PATCH 6399/8469] Exit on test failure When test fails, it should not continue to run other commands. Fixes #891 --- setuptools/command/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 9a5117be00..60ba2354a5 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -226,12 +226,14 @@ def run_tests(self): list(map(sys.modules.__delitem__, del_modules)) exit_kwarg = {} if sys.version_info < (2, 7) else {"exit": False} - unittest_main( + test = unittest_main( None, None, self._argv, testLoader=self._resolve_as_ep(self.test_loader), testRunner=self._resolve_as_ep(self.test_runner), **exit_kwarg ) + if not test.result.wasSuccessful(): + sys.exit(1) @property def _argv(self): From 2c4fd43277fc477d85b50e15c37b176136676270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 16 Dec 2016 16:15:04 +0100 Subject: [PATCH 6400/8469] Raise DistutilsError and log result --- setuptools/command/test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 60ba2354a5..ef0af12f12 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -3,7 +3,8 @@ import sys import contextlib import itertools -from distutils.errors import DistutilsOptionError +from distutils.errors import DistutilsError, DistutilsOptionError +from distutils import log from unittest import TestLoader from setuptools.extern import six @@ -233,7 +234,9 @@ def run_tests(self): **exit_kwarg ) if not test.result.wasSuccessful(): - sys.exit(1) + msg = 'Test failed: %s' % test.result + self.announce(msg, log.ERROR) + raise DistutilsError(msg) @property def _argv(self): From f4801b43459a2e4b38e78ccf946a39642a72803c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Dec 2016 10:25:11 -0500 Subject: [PATCH 6401/8469] Update changelog. Ref #892. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1d6ac12389..c3fff5236b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v32.1.0 +------- + +* #891: In 'test' command on test failure, raise DistutilsError, + suppression invocation of subsequent commands. + v32.0.0 ------- From bf665ffb84aa72010240d735b5f45db32d60bdde Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Dec 2016 10:25:24 -0500 Subject: [PATCH 6402/8469] =?UTF-8?q?Bump=20version:=2032.0.0=20=E2=86=92?= =?UTF-8?q?=2032.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index fa6b4deb01..fe2e678c17 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.0.0 +current_version = 32.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index a6a062f52b..683a852697 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.0.0", + version="32.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 127dcab577c72c85dc27dfb29701b67aaa41dd68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 16 Dec 2016 13:14:57 -0500 Subject: [PATCH 6403/8469] Disable upload docs --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2f9b6a7a06..b402cf6d9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,3 +36,4 @@ deploy: password: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release + skip_upload_docs: true From 5b38d9b863e3a86202da4816f7ef9b67b871a3a3 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Sun, 18 Dec 2016 01:23:09 +0000 Subject: [PATCH 6404/8469] Fix spelling and grammar in code comments and documentation --- tests/test_bdist_rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_bdist_rpm.py b/tests/test_bdist_rpm.py index e9795ee4b2..c5962dddd2 100644 --- a/tests/test_bdist_rpm.py +++ b/tests/test_bdist_rpm.py @@ -96,7 +96,7 @@ def test_quiet(self): @unittest.skipIf(find_executable('rpmbuild') is None, 'the rpmbuild command is not found') def test_no_optimize_flag(self): - # let's create a package that brakes bdist_rpm + # let's create a package that breaks bdist_rpm tmp_dir = self.mkdtemp() os.environ['HOME'] = tmp_dir # to confine dir '.rpmdb' creation pkg_dir = os.path.join(tmp_dir, 'foo') From 53e5575e11a35aaf761da56aa6728cdcd7c04ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 08:38:56 -0500 Subject: [PATCH 6405/8469] When invoking rmtree, ensure the parameter is unicode to avoid errors when the tree contains Unicode filenames. Fixes #704. --- setuptools/command/easy_install.py | 3 +++ setuptools/tests/test_easy_install.py | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 03dd6768d5..7d982d898f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -666,6 +666,9 @@ def easy_install(self, spec, deps=False): finally: if os.path.exists(tmpdir): + # workaround for http://bugs.python.org/issue24672 + if six.PY2: + tmpdir = six.u(tmpdir) rmtree(tmpdir) def install_item(self, spec, download, tmpdir, deps, install_needed=False): diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 209e6b78ff..08138efc66 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -169,10 +169,8 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) - @pytest.mark.xfail(reason="#709 and #710") - # also - #@pytest.mark.xfail(setuptools.tests.is_ascii, - # reason="https://github.com/pypa/setuptools/issues/706") + @pytest.mark.xfail(setuptools.tests.is_ascii, + reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 7f89e790d228aeece7df1fda8eb6c762d772c450 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 09:30:21 -0500 Subject: [PATCH 6406/8469] Can't use six.u as 'c:\users' triggers unicode_escape and fails. Ref #704. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 7d982d898f..e3b7161a9d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -668,7 +668,7 @@ def easy_install(self, spec, deps=False): if os.path.exists(tmpdir): # workaround for http://bugs.python.org/issue24672 if six.PY2: - tmpdir = six.u(tmpdir) + tmpdir = tmpdir.decode('ascii') rmtree(tmpdir) def install_item(self, spec, download, tmpdir, deps, install_needed=False): From 674d5ecb1695de056226d1ad65c5d8b48ca99f3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 09:45:13 -0500 Subject: [PATCH 6407/8469] Extract tmpdir as a context manager --- setuptools/command/easy_install.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e3b7161a9d..b9d41cb027 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -627,12 +627,24 @@ def check_editable(self, spec): (spec.key, self.build_directory) ) - def easy_install(self, spec, deps=False): + @contextlib.contextmanager + def _tmpdir(self): tmpdir = tempfile.mkdtemp(prefix="easy_install-") + try: + yield tmpdir + finally: + if not os.path.exists(tmpdir): + return + # workaround for http://bugs.python.org/issue24672 + if six.PY2: + tmpdir = tmpdir.decode('ascii') + rmtree(tmpdir) + + def easy_install(self, spec, deps=False): if not self.editable: self.install_site_py() - try: + with self._tmpdir() as tmpdir: if not isinstance(spec, Requirement): if URL_SCHEME(spec): # It's a url, download it to tmpdir and process @@ -664,13 +676,6 @@ def easy_install(self, spec, deps=False): else: return self.install_item(spec, dist.location, tmpdir, deps) - finally: - if os.path.exists(tmpdir): - # workaround for http://bugs.python.org/issue24672 - if six.PY2: - tmpdir = tmpdir.decode('ascii') - rmtree(tmpdir) - def install_item(self, spec, download, tmpdir, deps, install_needed=False): # Installation is also needed if file in tmpdir or is not an egg From 6c6f4caa4bacce4b719b1e03fb02fdb857b1a135 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 10:07:11 -0500 Subject: [PATCH 6408/8469] Move toward future compatibility using unicode strings, but cast to native str as workaround for #709, #710, and #712. --- setuptools/command/easy_install.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b9d41cb027..14ad25c228 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -629,16 +629,12 @@ def check_editable(self, spec): @contextlib.contextmanager def _tmpdir(self): - tmpdir = tempfile.mkdtemp(prefix="easy_install-") + tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) try: - yield tmpdir + # cast to str as workaround for #709 and #710 and #712 + yield str(tmpdir) finally: - if not os.path.exists(tmpdir): - return - # workaround for http://bugs.python.org/issue24672 - if six.PY2: - tmpdir = tmpdir.decode('ascii') - rmtree(tmpdir) + os.path.exists(tmpdir) and rmtree(tmpdir) def easy_install(self, spec, deps=False): if not self.editable: From cd2a519c6592d90e8658a5e90d8b0342d08b9ae9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 11:51:19 -0500 Subject: [PATCH 6409/8469] In sandbox.run_setup, always ensure that __file__ is str. Fixes #712. --- setuptools/sandbox.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index d882d71539..817a3afaae 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -241,8 +241,15 @@ def run_setup(setup_script, args): working_set.__init__() working_set.callbacks.append(lambda dist: dist.activate()) + # __file__ should be a byte string on Python 2 (#712) + dunder_file = ( + setup_script + if isinstance(setup_script, str) else + setup_script.encode(sys.getfilesystemencoding()) + ) + def runner(): - ns = dict(__file__=setup_script, __name__='__main__') + ns = dict(__file__=dunder_file, __name__='__main__') _execfile(setup_script, ns) DirectorySandbox(setup_dir).run(runner) From daead4eef50198b1aae7f4ca856608eb9f112792 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 11:55:40 -0500 Subject: [PATCH 6410/8469] Update changelog --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index c3fff5236b..3dbd49aed4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v32.1.1 +------- + +* #704: More selectively ensure that 'rmtree' is not invoked with + a byte string, enabling it to remove files that are non-ascii, + even on Python 2. + +* #712: In 'sandbox.run_setup', ensure that ``__file__`` is + always a ``str``, modeling the behavior observed by the + interpreter when invoking scripts and modules. + v32.1.0 ------- From 25c339402f908200c939ffdec9987bf7598a3328 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 11:55:47 -0500 Subject: [PATCH 6411/8469] =?UTF-8?q?Bump=20version:=2032.1.0=20=E2=86=92?= =?UTF-8?q?=2032.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index fe2e678c17..f327fa302a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.1.0 +current_version = 32.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 683a852697..2ffeb89722 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.1.0", + version="32.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From d5ed18ef5f7c2472578a2b5015a09df1fd05e8bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 17:01:14 -0500 Subject: [PATCH 6412/8469] No longer release tarballs due to new restrictions on Warehouse. Fixes #893. --- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3dbd49aed4..410825fa76 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v32.1.2 +------- + +* #893: Only release sdist in zip format as warehouse now + disallows releasing two different formats. + v32.1.1 ------- diff --git a/setup.cfg b/setup.cfg index f327fa302a..46540b202a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,7 @@ test = pytest repository = https://upload.pypi.org/legacy/ [sdist] -formats = gztar zip +formats = zip [wheel] universal = 1 From a17fa50d2675d89077be09d668a073c751b76e0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 17:02:10 -0500 Subject: [PATCH 6413/8469] =?UTF-8?q?Bump=20version:=2032.1.1=20=E2=86=92?= =?UTF-8?q?=2032.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 46540b202a..e9f778a643 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.1.1 +current_version = 32.1.2 commit = True tag = True diff --git a/setup.py b/setup.py index 2ffeb89722..a44a4de431 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.1.1", + version="32.1.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 5ad13718686bee04a93b4e86929c1bb170f14a52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Dec 2016 14:15:37 -0500 Subject: [PATCH 6414/8469] Cast the value to rmtree to bytes on Linux and Python 2 when the filesystemencoding is ascii, and let posixpath work its voodoo. Fixes #706. --- setuptools/command/easy_install.py | 3 ++- setuptools/py27compat.py | 11 +++++++++++ setuptools/tests/test_easy_install.py | 2 -- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 14ad25c228..36e7f3598f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -46,6 +46,7 @@ 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 from setuptools.package_index import ( @@ -634,7 +635,7 @@ def _tmpdir(self): # cast to str as workaround for #709 and #710 and #712 yield str(tmpdir) finally: - os.path.exists(tmpdir) and rmtree(tmpdir) + os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir)) def easy_install(self, spec, deps=False): if not self.editable: diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 4e3e4ab34f..a71a936e10 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -3,6 +3,7 @@ """ import sys +import platform def get_all_headers(message, key): @@ -16,3 +17,13 @@ def get_all_headers(message, key): def get_all_headers(message, key): return message.getheaders(key) + + +linux_py2_ascii = ( + platform.system() == 'Linux' and + sys.getfilesystemencoding() == 'ascii' and + sys.version_info < (3,) +) + +rmtree_safe = str if linux_py2_ascii else lambda x: x +"""Workaround for http://bugs.python.org/issue24672""" diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 08138efc66..1ea33b0890 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -169,8 +169,6 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) - @pytest.mark.xfail(setuptools.tests.is_ascii, - reason="https://github.com/pypa/setuptools/issues/706") def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From adf6cc7f043355444e0da30d26da78042d06ade9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Dec 2016 14:47:19 -0500 Subject: [PATCH 6415/8469] Update changelog. Ref #706. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 410825fa76..1a57ad5524 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v32.1.3 +------- + +* #706: Add rmtree compatibility shim for environments where + rmtree fails when passed a unicode string. + v32.1.2 ------- From 5d4b2b691fea992ec47132ba2b01ebd396fe7216 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Dec 2016 14:47:24 -0500 Subject: [PATCH 6416/8469] =?UTF-8?q?Bump=20version:=2032.1.2=20=E2=86=92?= =?UTF-8?q?=2032.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e9f778a643..2b6d2736f0 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.1.2 +current_version = 32.1.3 commit = True tag = True diff --git a/setup.py b/setup.py index a44a4de431..c2dcf336c0 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.1.2", + version="32.1.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 7a1c700e16523ad07532bea2ed87718fe29d3595 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Dec 2016 09:31:40 -0500 Subject: [PATCH 6417/8469] Re-use test.paths_on_pythonpath to extend the PYTHONPATH variable rather than erasing it. When tests are run under pytest-runner (or other setup.py test invocations), the PYTHONPATH is carefully curated to include dependencies and the project under test. Overwriting PYTHONPATH will break tests in those environments. Fixes #884. --- CHANGES.rst | 8 ++++++++ setuptools/tests/test_develop.py | 12 +++++++----- setuptools/tests/test_namespaces.py | 17 +++++++++-------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1a57ad5524..793c4c333c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v32.1.4 +------- + +* #884: Restore support for running the tests under + `pytest-runner `_ + by ensuring that PYTHONPATH is honored in tests invoking + a subprocess. + v32.1.3 ------- diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 430a07e6c2..5dd72aaee8 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -10,6 +10,7 @@ import subprocess from setuptools.extern import six +from setuptools.command import test import pytest @@ -132,9 +133,9 @@ def install_develop(src_dir, target): 'develop', '--install-dir', str(target), ] - env = dict(PYTHONPATH=str(target)) with src_dir.as_cwd(): - subprocess.check_call(develop_cmd, env=env) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(develop_cmd) @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") @@ -162,12 +163,13 @@ def test_namespace_package_importable(self, tmpdir): sys.executable, '-c', 'import myns.pkgA; import myns.pkgB', ] - env = dict(PYTHONPATH=str(target)) - subprocess.check_call(try_import, env=env) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(try_import) # additionally ensure that pkg_resources import works pkg_resources_imp = [ sys.executable, '-c', 'import pkg_resources', ] - subprocess.check_call(pkg_resources_imp, env=env) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(pkg_resources_imp) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 451df3c489..721cad1e63 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -7,6 +7,7 @@ import pytest from . import namespaces +from setuptools.command import test class TestNamespaces: @@ -27,7 +28,6 @@ def test_mixed_site_and_non_site(self, tmpdir): site_packages = tmpdir / 'site-packages' path_packages = tmpdir / 'path-packages' targets = site_packages, path_packages - python_path = os.pathsep.join(map(str, targets)) # use pip to install to the target directory install_cmd = [ 'pip', @@ -48,8 +48,8 @@ def test_mixed_site_and_non_site(self, tmpdir): sys.executable, '-c', 'import myns.pkgA; import myns.pkgB', ] - env = dict(PYTHONPATH=python_path) - subprocess.check_call(try_import, env=env) + with test.test.paths_on_pythonpath(map(str, targets)): + subprocess.check_call(try_import) @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") @@ -61,20 +61,21 @@ def test_pkg_resources_import(self, tmpdir): pkg = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') target = tmpdir / 'packages' target.mkdir() - env = dict(PYTHONPATH=str(target)) install_cmd = [ sys.executable, '-m', 'easy_install', '-d', str(target), str(pkg), ] - subprocess.check_call(install_cmd, env=env) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(install_cmd) namespaces.make_site_dir(target) try_import = [ sys.executable, '-c', 'import pkg_resources', ] - subprocess.check_call(try_import, env=env) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(try_import) @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") @@ -100,5 +101,5 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): sys.executable, '-c', 'import pkg_resources; import myns.pkgA', ] - env = dict(PYTHONPATH=str(target)) - subprocess.check_call(pkg_resources_imp, env=env, cwd=str(pkg_A)) + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) From 32fcec8584ee643105854358a15953f8e9c5df17 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Dec 2016 09:33:00 -0500 Subject: [PATCH 6418/8469] =?UTF-8?q?Bump=20version:=2032.1.3=20=E2=86=92?= =?UTF-8?q?=2032.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2b6d2736f0..6f18445ecc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.1.3 +current_version = 32.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index c2dcf336c0..a1440a26e4 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.1.3", + version="32.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 3bc56c2c4374b1ef6edcfcc2ae6fa1280ffe151c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Dec 2016 09:50:27 -0500 Subject: [PATCH 6419/8469] Intended for release to be 32.1.4, but I typed 'bumpversion minor --no-tags' instead of 'bumpversion patch --no-tags' by mistake, then tagged with what I thought I'd just bumped to. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 793c4c333c..489d971efa 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -v32.1.4 +v32.2.0 ------- * #884: Restore support for running the tests under From f1f9200d18fff71c5ec53e0269150da6858e51d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Dec 2016 13:59:31 -0500 Subject: [PATCH 6420/8469] =?UTF-8?q?Bump=20version:=2032.2.0=20=E2=86=92?= =?UTF-8?q?=2032.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6f18445ecc..2dde1d4d8f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.2.0 +current_version = 32.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index a1440a26e4..9eea915c1a 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.2.0", + version="32.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 07a7b06dd8c6dc08c789505f263986e5f084f802 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 24 Dec 2016 14:21:02 -0500 Subject: [PATCH 6421/8469] Traverse the class hierarchy when searching for the unpatched class. Ref #889. --- setuptools/monkey.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index aabc280f6b..dbe9a6176d 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -7,6 +7,7 @@ import platform import types import functools +import inspect from .py26compat import import_module from setuptools.extern import six @@ -35,12 +36,16 @@ def get_unpatched_class(cls): Also ensures that no other distutils extension monkeypatched the distutils first. """ - while cls.__module__.startswith('setuptools'): - cls, = cls.__bases__ - if not cls.__module__.startswith('distutils'): + external_bases = ( + cls + for cls in inspect.getmro(cls) + if not cls.__module__.startswith('setuptools') + ) + base = next(external_bases) + if not base.__module__.startswith('distutils'): msg = "distutils has already been patched by %r" % cls raise AssertionError(msg) - return cls + return base def patch_all(): From 6d69dd73b900cff84ee142ad82967dd025a75b72 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Tue, 27 Dec 2016 13:11:42 +1100 Subject: [PATCH 6422/8469] Fix image URL for readthedocs link --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 50774ff767..9cb8758fb5 100755 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ Installing and Using Setuptools .. contents:: **Table of Contents** -.. image:: https://setuptools.readthedocs.io/en/latest/?badge=latest +.. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest :target: https://setuptools.readthedocs.io ------------------------- From 1bd827efdf08b77f8a0a29c58dfc805368466964 Mon Sep 17 00:00:00 2001 From: Preston Landers Date: Wed, 28 Dec 2016 13:14:53 -0600 Subject: [PATCH 6423/8469] Attempt to fix issue #866 by iterating over code with `dis.Bytecode` instead of the internal `_iter_code`. The `dis` module was already used in `_iter_code` so I figured it was safe to use `Bytecode` from it. Not sure how this assumption holds up across all supported Python releases. I can only assume `Bytecode` wasn't there before when `_iter_code` was originally written? Note that `_iter_code` doesn't appear to be called anywhere in light of this change so I removed it. I should also note that `get_module_constant` has never worked with `setuptools.__version__` (returns -1) because it's not a string literal; it gets that attribute from another module. But this change does work in cases where a string literal is requested. https://github.com/pypa/setuptools/issues/866 --- setuptools/depends.py | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index 89d39a50a1..d8496ef8ee 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -4,7 +4,6 @@ from distutils.version import StrictVersion from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN -from setuptools.extern import six __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' @@ -78,39 +77,6 @@ def is_current(self, paths=None): return self.version_ok(version) -def _iter_code(code): - """Yield '(op,arg)' pair for each operation in code object 'code'""" - - from array import array - from dis import HAVE_ARGUMENT, EXTENDED_ARG - - bytes = array('b', code.co_code) - eof = len(code.co_code) - - ptr = 0 - extended_arg = 0 - - while ptr < eof: - - op = bytes[ptr] - - if op >= HAVE_ARGUMENT: - - arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg - ptr += 3 - - if op == EXTENDED_ARG: - long_type = six.integer_types[-1] - extended_arg = arg * long_type(65536) - continue - - else: - arg = None - ptr += 1 - - yield op, arg - - def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" @@ -176,11 +142,12 @@ def extract_constant(code, symbol, default=-1): only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol' must be present in 'code.co_names'. """ - if symbol not in code.co_names: - # name's not there, can't possibly be an assigment + # name's not there, can't possibly be an assignment return None + from dis import Bytecode + name_idx = list(code.co_names).index(symbol) STORE_NAME = 90 @@ -189,7 +156,9 @@ def extract_constant(code, symbol, default=-1): const = default - for op, arg in _iter_code(code): + for byte_code in Bytecode(code): + op = byte_code.opcode + arg = byte_code.arg if op == LOAD_CONST: const = code.co_consts[arg] From 6a960cb9e8cf17385e3b8a52d46cf71a9747e19d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 17:03:33 -0500 Subject: [PATCH 6424/8469] Add tests capturing failure of depends.get_module_constant on Python 3.6. Ref #866. --- pytest.ini | 2 +- setuptools/tests/mod_with_constant.py | 1 + setuptools/tests/test_depends.py | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 setuptools/tests/mod_with_constant.py create mode 100644 setuptools/tests/test_depends.py diff --git a/pytest.ini b/pytest.ini index c814b316cf..11a213db2b 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 diff --git a/setuptools/tests/mod_with_constant.py b/setuptools/tests/mod_with_constant.py new file mode 100644 index 0000000000..ef755dd1c7 --- /dev/null +++ b/setuptools/tests/mod_with_constant.py @@ -0,0 +1 @@ +value = 'three, sir!' diff --git a/setuptools/tests/test_depends.py b/setuptools/tests/test_depends.py new file mode 100644 index 0000000000..e0cfa88049 --- /dev/null +++ b/setuptools/tests/test_depends.py @@ -0,0 +1,16 @@ +import sys + +from setuptools import depends + + +class TestGetModuleConstant: + + def test_basic(self): + """ + Invoke get_module_constant on a module in + the test package. + """ + mod_name = 'setuptools.tests.mod_with_constant' + val = depends.get_module_constant(mod_name, 'value') + assert val == 'three, sir!' + assert 'setuptools.tests.mod_with_constant' not in sys.modules From b911a237e03a3892f423f3d5e2ec0caad1986b8d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 17:19:50 -0500 Subject: [PATCH 6425/8469] Add two more tests for _iter_code per #866, capturing the apparent expectation in the byte-code processing that's now failing on Python 3.6. --- setuptools/tests/test_depends.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_depends.py b/setuptools/tests/test_depends.py index e0cfa88049..fcf2a636a4 100644 --- a/setuptools/tests/test_depends.py +++ b/setuptools/tests/test_depends.py @@ -14,3 +14,15 @@ def test_basic(self): val = depends.get_module_constant(mod_name, 'value') assert val == 'three, sir!' assert 'setuptools.tests.mod_with_constant' not in sys.modules + + +class TestIterCode: + def test_empty(self): + code = compile('', '', mode='exec') + expected = (100, 0), (83, None) + assert tuple(depends._iter_code(code)) == expected + + def test_constant(self): + code = compile('value = "three, sir!"', '', mode='exec') + expected = (100, 0), (90, 0), (100, 1), (83, None) + assert tuple(depends._iter_code(code)) == expected From a29c9a4de0c8cf75b89582a0bf718056d58b0c10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 20:10:39 -0500 Subject: [PATCH 6426/8469] Use dis module rather than manually disassembling the bytecode. Fixes #866. --- setuptools/depends.py | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index 89d39a50a1..c150c52b81 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,11 +1,10 @@ import sys import imp import marshal +import dis from distutils.version import StrictVersion from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN -from setuptools.extern import six - __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] @@ -80,35 +79,10 @@ def is_current(self, paths=None): def _iter_code(code): """Yield '(op,arg)' pair for each operation in code object 'code'""" - - from array import array - from dis import HAVE_ARGUMENT, EXTENDED_ARG - - bytes = array('b', code.co_code) - eof = len(code.co_code) - - ptr = 0 - extended_arg = 0 - - while ptr < eof: - - op = bytes[ptr] - - if op >= HAVE_ARGUMENT: - - arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg - ptr += 3 - - if op == EXTENDED_ARG: - long_type = six.integer_types[-1] - extended_arg = arg * long_type(65536) - continue - - else: - arg = None - ptr += 1 - - yield op, arg + return ( + (op.opcode, op.arg) + for op in dis.Bytecode(code) + ) def find_module(module, paths=None): From 3000d975dbb11430be5c79498a461d33a5522a40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 20:52:09 -0500 Subject: [PATCH 6427/8469] Re-introduce _iter_code functionality as a Bytecode backport. Fixes failing tests. Ref #866. --- setuptools/depends.py | 5 +++-- setuptools/py33compat.py | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 setuptools/py33compat.py diff --git a/setuptools/depends.py b/setuptools/depends.py index d417fa32ea..45e7052d8d 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,10 +1,11 @@ import sys import imp import marshal -import dis from distutils.version import StrictVersion from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN +from .py33compat import Bytecode + __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' @@ -155,7 +156,7 @@ def extract_constant(code, symbol, default=-1): const = default - for byte_code in dis.Bytecode(code): + for byte_code in Bytecode(code): op = byte_code.opcode arg = byte_code.arg diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py new file mode 100644 index 0000000000..2588d680cd --- /dev/null +++ b/setuptools/py33compat.py @@ -0,0 +1,46 @@ +import dis +import code +import array +import collections + +from setuptools.extern import six + + +OpArg = collections.namedtuple('OpArg', 'opcode arg') + + +class Bytecode_compat(object): + def __init__(self, code): + self.code = code + + def __iter__(self): + """Yield '(op,arg)' pair for each operation in code object 'code'""" + + bytes = array.array('b', self.code.co_code) + eof = len(self.code.co_code) + + ptr = 0 + extended_arg = 0 + + while ptr < eof: + + op = bytes[ptr] + + if op >= dis.HAVE_ARGUMENT: + + arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg + ptr += 3 + + if op == dis.EXTENDED_ARG: + long_type = six.integer_types[-1] + extended_arg = arg * long_type(65536) + continue + + else: + arg = None + ptr += 1 + + yield OpArg(op, arg) + + +Bytecode = getattr(dis, 'Bytecode', Bytecode_compat) From 15576a166203b81cd5fcda68a4cdb11e76194986 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 20:57:40 -0500 Subject: [PATCH 6428/8469] Update changelog. Ref #866. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 80b243c841..149d270f7b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v32.3.1 +------- + +* #866: Use ``dis.Bytecode`` on Python 3.4 and later in + ``setuptools.depends``. + v32.3.0 ------- From ca8f8ca70d8f335f70ffe4023369523c8b61adca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 28 Dec 2016 20:59:46 -0500 Subject: [PATCH 6429/8469] =?UTF-8?q?Bump=20version:=2032.3.0=20=E2=86=92?= =?UTF-8?q?=2032.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2dde1d4d8f..20370e9e65 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.3.0 +current_version = 32.3.1 commit = True tag = True diff --git a/setup.py b/setup.py index 9eea915c1a..3c4faa321f 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.3.0", + version="32.3.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 8c1f489f09434f42080397367b6491e75f64d838 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 11 Dec 2016 18:59:34 -0600 Subject: [PATCH 6430/8469] Fix usage of extras when installing via Wheels; resolves #882 When resolving requirements, we now pass the list of extras we're using along to Marker.evaluate, since we want to include the extra's requirements in our list of required packages. This is sort of papering over the underlying issue; namely, that the dependency map for dist-info distributions looks like: { None : ['common_dep'], 'my_extra': ['extra_dep; extra = "my_extra"'] } If we eliminated 'extra = "my_extra"' when creating this map, the problem would go away because the WorkingSet would no longer treat `extra_dep` as a purely optional dependency. However, this would require copying and manipulating Requirement objects, which is somewhat more complicated than the current solution. --- pkg_resources/__init__.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 92503288e7..ebc6268d44 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -786,7 +786,7 @@ def add(self, dist, entry=None, insert=True, replace=False): self._added_new(dist) def resolve(self, requirements, env=None, installer=None, - replace_conflicting=False): + replace_conflicting=False, extras=None): """List all distributions needed to (recursively) meet `requirements` `requirements` must be a sequence of ``Requirement`` objects. `env`, @@ -802,6 +802,12 @@ def resolve(self, requirements, env=None, installer=None, the wrong version. Otherwise, if an `installer` is supplied it will be invoked to obtain the correct version of the requirement and activate it. + + `extras` is a list of the extras to be used with these requirements. + This is important because extra requirements may look like `my_req; + extra = "my_extra"`, which would otherwise be interpreted as a purely + optional requirement. Instead, we want to be able to assert that these + requirements are truly required. """ # set up the stack @@ -825,7 +831,7 @@ def resolve(self, requirements, env=None, installer=None, # Ignore cyclic or redundant dependencies continue - if not req_extras.markers_pass(req): + if not req_extras.markers_pass(req, extras): continue dist = best.get(req.key) @@ -1004,7 +1010,7 @@ class _ReqExtras(dict): Map each requirement to the extras that demanded it. """ - def markers_pass(self, req): + def markers_pass(self, req, extras=None): """ Evaluate markers for req against each extra that demanded it. @@ -1014,7 +1020,7 @@ def markers_pass(self, req): """ extra_evals = ( req.marker.evaluate({'extra': extra}) - for extra in self.get(req, ()) + (None,) + for extra in self.get(req, ()) + (extras or (None,)) ) return not req.marker or any(extra_evals) @@ -2299,8 +2305,14 @@ def resolve(self): def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) + + # Get the requirements for this entry point with all its extras and + # then resolve them. We have to pass `extras` along when resolving so + # that the working set knows what extras we want. Otherwise, for + # dist-info distributions, the working set will assume that the + # requirements for that extra are purely optional and skip over them. reqs = self.dist.requires(self.extras) - items = working_set.resolve(reqs, env, installer) + items = working_set.resolve(reqs, env, installer, extras=self.extras) list(map(working_set.add, items)) pattern = re.compile( From 249f870f2c6fb60734e9db34e44f7e44cd35c914 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 10:08:00 -0500 Subject: [PATCH 6431/8469] Drop support for 'tag_svn_version' distribution option. Fixes #619. --- CHANGES.rst | 8 ++++++++ docs/conf.py | 4 ++++ setuptools/command/egg_info.py | 19 ------------------- setuptools/tests/test_egg_info.py | 7 ++----- 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 149d270f7b..264b939ad8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v33.0.0 +------- + +* #619: Removed support for the ``tag_svn_revision`` + distribution option. If Subversion tagging support is + still desired, consider adding the functionality to + setuptools_svn in setuptools_svn #2. + v32.3.1 ------- diff --git a/docs/conf.py b/docs/conf.py index fae8e63255..c1854ed8a2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -156,6 +156,10 @@ pattern=r"PEP[- ](?P\d+)", url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), + dict( + pattern=r"setuptools_svn #(?P\d+)", + url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}', + ), dict( pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6f8fd87449..98a8730008 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -32,11 +32,6 @@ from pkg_resources.extern import packaging -try: - from setuptools_svn import svn_utils -except ImportError: - pass - def translate_pattern(glob): """ @@ -147,7 +142,6 @@ def initialize_options(self): self.egg_base = None self.egg_info = None self.tag_build = None - self.tag_svn_revision = 0 self.tag_date = 0 self.broken_egg_info = False self.vtags = None @@ -165,7 +159,6 @@ def save_version_info(self, filename): # when PYTHONHASHSEED=0 egg_info['tag_build'] = self.tags() egg_info['tag_date'] = 0 - egg_info['tag_svn_revision'] = 0 edit_config(filename, dict(egg_info=egg_info)) def finalize_options(self): @@ -282,22 +275,10 @@ def tags(self): version = '' if self.tag_build: version += self.tag_build - if self.tag_svn_revision: - warnings.warn( - "tag_svn_revision is deprecated and will not be honored " - "in a future release" - ) - version += '-r%s' % self.get_svn_revision() if self.tag_date: version += time.strftime("-%Y%m%d") return version - @staticmethod - def get_svn_revision(): - if 'svn_utils' not in globals(): - return "0" - return str(svn_utils.SvnInfo.load(os.curdir).get_revision()) - def find_sources(self): """Generate SOURCES.txt manifest file""" manifest_filename = os.path.join(self.egg_info, "SOURCES.txt") diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 75ae18dffd..a32b981d67 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -88,9 +88,8 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): assert '[egg_info]' in content assert 'tag_build =' in content assert 'tag_date = 0' in content - assert 'tag_svn_revision = 0' in content - expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' + expected_order = 'tag_build', 'tag_date', self._validate_content_order(content, expected_order) @@ -117,7 +116,6 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): [egg_info] tag_build = tag_date = 0 - tag_svn_revision = 0 """), }) dist = Distribution() @@ -131,9 +129,8 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): assert '[egg_info]' in content assert 'tag_build =' in content assert 'tag_date = 0' in content - assert 'tag_svn_revision = 0' in content - expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' + expected_order = 'tag_build', 'tag_date', self._validate_content_order(content, expected_order) From 1397064fe7bf88947d00b91a8441234152ba195c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 13:14:06 -0500 Subject: [PATCH 6432/8469] =?UTF-8?q?Bump=20version:=2032.3.1=20=E2=86=92?= =?UTF-8?q?=2033.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 20370e9e65..e46be52a14 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 32.3.1 +current_version = 33.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 3c4faa321f..8e125fc18e 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="32.3.1", + version="33.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 4c2dc87f5c63333a6f83be217c86f387f9ecd02a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 22:24:22 -0500 Subject: [PATCH 6433/8469] Use the 'extras' feature of tox --- tests/requirements.txt | 1 - tox.ini | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index d07e9cdeb7..88a36c635c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,3 @@ pytest-flake8 pytest>=3.0.2 -setuptools[ssl] backports.unittest_mock>=1.2 diff --git a/tox.ini b/tox.ini index cae9c745c2..3c222bf7fd 100644 --- a/tox.ini +++ b/tox.ini @@ -3,3 +3,4 @@ deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR commands=py.test {posargs:-rsx} usedevelop=True +extras=ssl From ff371f18f0076bc63da05334f7e551c1cc29e10d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 22:34:28 -0500 Subject: [PATCH 6434/8469] Strip out vendored packages and require them instead. Ref #581. --- .travis.yml | 6 +- bootstrap.py | 2 + pavement.py | 32 - pkg_resources/__init__.py | 15 +- pkg_resources/_vendor/__init__.py | 0 pkg_resources/_vendor/appdirs.py | 552 -- pkg_resources/_vendor/packaging/__about__.py | 21 - pkg_resources/_vendor/packaging/__init__.py | 14 - pkg_resources/_vendor/packaging/_compat.py | 30 - .../_vendor/packaging/_structures.py | 68 - pkg_resources/_vendor/packaging/markers.py | 301 - .../_vendor/packaging/requirements.py | 127 - pkg_resources/_vendor/packaging/specifiers.py | 774 --- pkg_resources/_vendor/packaging/utils.py | 14 - pkg_resources/_vendor/packaging/version.py | 393 -- pkg_resources/_vendor/pyparsing.py | 5696 ----------------- pkg_resources/_vendor/six.py | 868 --- pkg_resources/_vendor/vendored.txt | 4 - pkg_resources/extern/__init__.py | 73 - pkg_resources/tests/test_pkg_resources.py | 2 +- pkg_resources/tests/test_resources.py | 4 +- setup.py | 10 +- setuptools/__init__.py | 2 +- setuptools/command/alias.py | 2 +- setuptools/command/bdist_egg.py | 2 +- setuptools/command/build_ext.py | 2 +- setuptools/command/build_py.py | 4 +- setuptools/command/develop.py | 2 +- setuptools/command/easy_install.py | 4 +- setuptools/command/egg_info.py | 6 +- setuptools/command/py36compat.py | 2 +- setuptools/command/rotate.py | 2 +- setuptools/command/sdist.py | 2 +- setuptools/command/setopt.py | 2 +- setuptools/command/test.py | 4 +- setuptools/command/upload_docs.py | 4 +- setuptools/config.py | 2 +- setuptools/dist.py | 6 +- setuptools/extension.py | 2 +- setuptools/extern/__init__.py | 4 - setuptools/glob.py | 2 +- setuptools/monkey.py | 2 +- setuptools/msvc.py | 6 +- setuptools/namespaces.py | 2 +- setuptools/package_index.py | 4 +- setuptools/py33compat.py | 2 +- setuptools/sandbox.py | 4 +- setuptools/ssl_support.py | 2 +- setuptools/tests/__init__.py | 2 +- setuptools/tests/contexts.py | 2 +- setuptools/tests/server.py | 2 +- setuptools/tests/test_archive_util.py | 2 +- setuptools/tests/test_build_ext.py | 2 +- setuptools/tests/test_develop.py | 2 +- setuptools/tests/test_dist_info.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_egg_info.py | 2 +- setuptools/tests/test_integration.py | 2 +- setuptools/tests/test_manifest.py | 2 +- setuptools/tests/test_packageindex.py | 4 +- setuptools/tests/test_sdist.py | 4 +- setuptools/unicode_utils.py | 2 +- tests/test_pypi.py | 4 +- tox.ini | 6 +- 64 files changed, 84 insertions(+), 9042 deletions(-) delete mode 100644 pavement.py delete mode 100644 pkg_resources/_vendor/__init__.py delete mode 100644 pkg_resources/_vendor/appdirs.py delete mode 100644 pkg_resources/_vendor/packaging/__about__.py delete mode 100644 pkg_resources/_vendor/packaging/__init__.py delete mode 100644 pkg_resources/_vendor/packaging/_compat.py delete mode 100644 pkg_resources/_vendor/packaging/_structures.py delete mode 100644 pkg_resources/_vendor/packaging/markers.py delete mode 100644 pkg_resources/_vendor/packaging/requirements.py delete mode 100644 pkg_resources/_vendor/packaging/specifiers.py delete mode 100644 pkg_resources/_vendor/packaging/utils.py delete mode 100644 pkg_resources/_vendor/packaging/version.py delete mode 100644 pkg_resources/_vendor/pyparsing.py delete mode 100644 pkg_resources/_vendor/six.py delete mode 100644 pkg_resources/_vendor/vendored.txt delete mode 100644 pkg_resources/extern/__init__.py delete mode 100644 setuptools/extern/__init__.py diff --git a/.travis.yml b/.travis.yml index b402cf6d9f..cb8cae908d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,15 +12,15 @@ env: - "" - LC_ALL=C LC_CTYPE=C script: - - pip install tox + # need tox and rwt to get started + - pip install tox rwt # Output the env, to verify behavior - env # update egg_info based on setup.py in checkout - - python bootstrap.py + - rwt -- bootstrap.py - #- python -m tox - tox deploy: diff --git a/bootstrap.py b/bootstrap.py index c5f470a4fa..761b8dfcd2 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,6 +5,8 @@ egg-info command to flesh out the egg-info directory. """ +__requires__ = ['packaging', 'six', 'appdirs'] + import os import sys import textwrap diff --git a/pavement.py b/pavement.py deleted file mode 100644 index f85617d4fe..0000000000 --- a/pavement.py +++ /dev/null @@ -1,32 +0,0 @@ -import re - -from paver.easy import task, path as Path -import pip - - -def remove_all(paths): - for path in paths: - path.rmtree() if path.isdir() else path.remove() - - -@task -def update_vendored(): - vendor = Path('pkg_resources/_vendor') - # pip uninstall doesn't support -t, so do it manually - remove_all(vendor.glob('packaging*')) - remove_all(vendor.glob('six*')) - remove_all(vendor.glob('pyparsing*')) - remove_all(vendor.glob('appdirs*')) - install_args = [ - 'install', - '-r', str(vendor / 'vendored.txt'), - '-t', str(vendor), - ] - pip.main(install_args) - packaging = vendor / 'packaging' - for file in packaging.glob('*.py'): - text = file.text() - text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) - file.write_text(text) - remove_all(vendor.glob('*.dist-info')) - remove_all(vendor.glob('*.egg-info')) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4c9868c769..55c91595d4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -45,8 +45,8 @@ # Python 3.2 compatibility import imp as _imp -from pkg_resources.extern import six -from pkg_resources.extern.six.moves import urllib, map, filter +import six +from six.moves import urllib, map, filter # capture these to bypass sandboxing from os import utime @@ -67,12 +67,11 @@ except ImportError: importlib_machinery = None -from pkg_resources.extern import appdirs -from pkg_resources.extern import packaging -__import__('pkg_resources.extern.packaging.version') -__import__('pkg_resources.extern.packaging.specifiers') -__import__('pkg_resources.extern.packaging.requirements') -__import__('pkg_resources.extern.packaging.markers') +import packaging.version +import packaging.specifiers +import packaging.requirements +import packaging.markers +import appdirs if (3, 0) < sys.version_info < (3, 3): raise RuntimeError("Python 3.3 or later is required") diff --git a/pkg_resources/_vendor/__init__.py b/pkg_resources/_vendor/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py deleted file mode 100644 index f4dba0953c..0000000000 --- a/pkg_resources/_vendor/appdirs.py +++ /dev/null @@ -1,552 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (c) 2005-2010 ActiveState Software Inc. -# Copyright (c) 2013 Eddy PetriÈ™or - -"""Utilities for determining application-specific dirs. - -See for details and usage. -""" -# Dev Notes: -# - MSDN on where to store app data files: -# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 -# - 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__ = '.'.join(map(str, __version_info__)) - - -import sys -import os - -PY3 = sys.version_info[0] == 3 - -if PY3: - unicode = str - -if sys.platform.startswith('java'): - import platform - os_name = platform.java_ver()[3][0] - if os_name.startswith('Windows'): # "Windows XP", "Windows 7", etc. - system = 'win32' - elif os_name.startswith('Mac'): # "Mac OS X", etc. - system = 'darwin' - else: # "Linux", "SunOS", "FreeBSD", etc. - # Setting this to "linux2" is not ideal, but only Windows or Mac - # are actually checked for and the rest of the module expects - # *sys.platform* style strings. - system = 'linux2' -else: - system = sys.platform - - - -def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): - r"""Return full path to the user-specific data 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 ".". - 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 - - for a discussion of issues. - - Typical user data directories are: - Mac OS X: ~/Library/Application Support/ - Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined - Win XP (not roaming): C:\Documents and Settings\\Application Data\\ - Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ - Win 7 (not roaming): C:\Users\\AppData\Local\\ - Win 7 (roaming): C:\Users\\AppData\Roaming\\ - - For Unix, we follow the XDG spec and support $XDG_DATA_HOME. - That means, by default "~/.local/share/". - """ - if system == "win32": - if appauthor is None: - appauthor = appname - const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA" - path = os.path.normpath(_get_win_folder(const)) - if appname: - if appauthor is not False: - path = os.path.join(path, appauthor, appname) - else: - path = os.path.join(path, appname) - elif system == 'darwin': - path = os.path.expanduser('~/Library/Application Support/') - if appname: - path = os.path.join(path, appname) - else: - path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share")) - if appname: - path = os.path.join(path, appname) - if appname and version: - path = os.path.join(path, version) - return path - - -def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): - """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. - "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 ".". - Only applied when appname is present. - "multipath" is an optional parameter only applicable to *nix - which indicates that the entire list of data dirs should be - returned. By default, the first item from XDG_DATA_DIRS is - returned, or '/usr/local/share/', - if XDG_DATA_DIRS is not set - - Typical user data directories are: - Mac OS X: /Library/Application Support/ - Unix: /usr/local/share/ or /usr/share/ - Win XP: C:\Documents and Settings\All Users\Application Data\\ - Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) - Win 7: C:\ProgramData\\ # Hidden, but writeable on Win 7. - - For Unix, this is using the $XDG_DATA_DIRS[0] default. - - WARNING: Do not use this on Windows. See the Vista-Fail note above for why. - """ - if system == "win32": - if appauthor is None: - appauthor = appname - path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA")) - if appname: - if appauthor is not False: - path = os.path.join(path, appauthor, appname) - else: - path = os.path.join(path, appname) - elif system == 'darwin': - path = os.path.expanduser('/Library/Application Support') - if appname: - path = os.path.join(path, appname) - else: - # XDG default for $XDG_DATA_DIRS - # only first, if multipath is False - path = os.getenv('XDG_DATA_DIRS', - os.pathsep.join(['/usr/local/share', '/usr/share'])) - pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] - if appname: - if version: - appname = os.path.join(appname, version) - pathlist = [os.sep.join([x, appname]) for x in pathlist] - - if multipath: - path = os.pathsep.join(pathlist) - else: - path = pathlist[0] - return path - - if appname and version: - path = os.path.join(path, version) - return path - - -def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): - r"""Return full path to the user-specific config 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 ".". - 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 - - for a discussion of issues. - - Typical user data directories are: - Mac OS X: same as user_data_dir - Unix: ~/.config/ # 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/". - """ - if system in ["win32", "darwin"]: - path = user_data_dir(appname, appauthor, None, roaming) - else: - path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser("~/.config")) - if appname: - path = os.path.join(path, appname) - if appname and version: - path = os.path.join(path, version) - return path - - -def site_config_dir(appname=None, appauthor=None, version=None, multipath=False): - """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. - "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 ".". - Only applied when appname is present. - "multipath" is an optional parameter only applicable to *nix - which indicates that the entire list of config dirs should be - returned. By default, the first item from XDG_CONFIG_DIRS is - returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set - - Typical user data directories are: - Mac OS X: same as site_data_dir - Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in - $XDG_CONFIG_DIRS - Win *: same as site_data_dir - Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) - - For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False - - WARNING: Do not use this on Windows. See the Vista-Fail note above for why. - """ - if system in ["win32", "darwin"]: - path = site_data_dir(appname, appauthor) - if appname and version: - path = os.path.join(path, version) - else: - # XDG default for $XDG_CONFIG_DIRS - # only first, if multipath is False - path = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg') - pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] - if appname: - if version: - appname = os.path.join(appname, version) - pathlist = [os.sep.join([x, appname]) for x in pathlist] - - if multipath: - path = os.pathsep.join(pathlist) - else: - path = pathlist[0] - return path - - -def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): - r"""Return full path to the user-specific cache 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 ".". - Only applied when appname is present. - "opinion" (boolean) can be False to disable the appending of - "Cache" to the base app data dir for Windows. See - discussion below. - - Typical user cache directories are: - Mac OS X: ~/Library/Caches/ - Unix: ~/.cache/ (XDG default) - Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache - Vista: C:\Users\\AppData\Local\\\Cache - - On Windows the only suggestion in the MSDN docs is that local settings go in - the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming - app data dir (the default returned by `user_data_dir` above). Apps typically - put cache data somewhere *under* the given dir here. Some examples: - ...\Mozilla\Firefox\Profiles\\Cache - ...\Acme\SuperApp\Cache\1.0 - OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. - This can be disabled with the `opinion=False` option. - """ - if system == "win32": - if appauthor is None: - appauthor = appname - path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA")) - if appname: - if appauthor is not False: - path = os.path.join(path, appauthor, appname) - else: - path = os.path.join(path, appname) - if opinion: - path = os.path.join(path, "Cache") - elif system == 'darwin': - path = os.path.expanduser('~/Library/Caches') - if appname: - path = os.path.join(path, appname) - else: - path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) - 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. - - "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 ".". - Only applied when appname is present. - "opinion" (boolean) can be False to disable the appending of - "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: - Mac OS X: ~/Library/Logs/ - Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined - Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs - Vista: C:\Users\\AppData\Local\\\Logs - - On Windows the only suggestion in the MSDN docs is that local settings - go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in - examples of what some windows apps use for a logs dir.) - - OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA` - value for Windows and appends "log" to the user cache dir for Unix. - This can be disabled with the `opinion=False` option. - """ - if system == "darwin": - path = os.path.join( - os.path.expanduser('~/Library/Logs'), - appname) - elif system == "win32": - path = user_data_dir(appname, appauthor, version) - version = False - if opinion: - path = os.path.join(path, "Logs") - else: - path = user_cache_dir(appname, appauthor, version) - version = False - if opinion: - path = os.path.join(path, "log") - if appname and version: - path = os.path.join(path, version) - return path - - -class AppDirs(object): - """Convenience wrapper for getting application dirs.""" - def __init__(self, appname, appauthor=None, version=None, roaming=False, - multipath=False): - self.appname = appname - self.appauthor = appauthor - self.version = version - self.roaming = roaming - self.multipath = multipath - - @property - def user_data_dir(self): - return user_data_dir(self.appname, self.appauthor, - version=self.version, roaming=self.roaming) - - @property - def site_data_dir(self): - return site_data_dir(self.appname, self.appauthor, - version=self.version, multipath=self.multipath) - - @property - def user_config_dir(self): - return user_config_dir(self.appname, self.appauthor, - version=self.version, roaming=self.roaming) - - @property - def site_config_dir(self): - return site_config_dir(self.appname, self.appauthor, - version=self.version, multipath=self.multipath) - - @property - def user_cache_dir(self): - return user_cache_dir(self.appname, self.appauthor, - version=self.version) - - @property - def user_log_dir(self): - return user_log_dir(self.appname, self.appauthor, - version=self.version) - - -#---- internal support stuff - -def _get_win_folder_from_registry(csidl_name): - """This is a fallback technique at best. I'm not sure if using the - registry for this guarantees us the correct answer for all CSIDL_* - names. - """ - import _winreg - - shell_folder_name = { - "CSIDL_APPDATA": "AppData", - "CSIDL_COMMON_APPDATA": "Common AppData", - "CSIDL_LOCAL_APPDATA": "Local AppData", - }[csidl_name] - - key = _winreg.OpenKey( - _winreg.HKEY_CURRENT_USER, - r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" - ) - dir, type = _winreg.QueryValueEx(key, shell_folder_name) - return dir - - -def _get_win_folder_with_pywin32(csidl_name): - from win32com.shell import shellcon, shell - dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0) - # Try to make this a unicode path because SHGetFolderPath does - # not return unicode strings when there is unicode data in the - # path. - try: - dir = unicode(dir) - - # Downgrade to short path name if have highbit chars. See - # . - has_high_char = False - for c in dir: - if ord(c) > 255: - has_high_char = True - break - if has_high_char: - try: - import win32api - dir = win32api.GetShortPathName(dir) - except ImportError: - pass - except UnicodeError: - pass - return dir - - -def _get_win_folder_with_ctypes(csidl_name): - import ctypes - - csidl_const = { - "CSIDL_APPDATA": 26, - "CSIDL_COMMON_APPDATA": 35, - "CSIDL_LOCAL_APPDATA": 28, - }[csidl_name] - - buf = ctypes.create_unicode_buffer(1024) - ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf) - - # Downgrade to short path name if have highbit chars. See - # . - has_high_char = False - for c in buf: - if ord(c) > 255: - has_high_char = True - break - if has_high_char: - buf2 = ctypes.create_unicode_buffer(1024) - if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024): - buf = buf2 - - return buf.value - -def _get_win_folder_with_jna(csidl_name): - import array - from com.sun import jna - from com.sun.jna.platform import win32 - - buf_size = win32.WinDef.MAX_PATH * 2 - buf = array.zeros('c', buf_size) - shell = win32.Shell32.INSTANCE - shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf) - dir = jna.Native.toString(buf.tostring()).rstrip("\0") - - # Downgrade to short path name if have highbit chars. See - # . - has_high_char = False - for c in dir: - if ord(c) > 255: - has_high_char = True - break - if has_high_char: - buf = array.zeros('c', buf_size) - kernel = win32.Kernel32.INSTANCE - if kernal.GetShortPathName(dir, buf, buf_size): - dir = jna.Native.toString(buf.tostring()).rstrip("\0") - - return dir - -if system == "win32": - try: - import win32com.shell - _get_win_folder = _get_win_folder_with_pywin32 - except ImportError: - try: - from ctypes import windll - _get_win_folder = _get_win_folder_with_ctypes - except ImportError: - try: - import com.sun.jna - _get_win_folder = _get_win_folder_with_jna - except ImportError: - _get_win_folder = _get_win_folder_from_registry - - -#---- self test code - -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") - - print("-- app dirs (with optional 'version')") - dirs = AppDirs(appname, appauthor, version="1.0") - for prop in props: - print("%s: %s" % (prop, getattr(dirs, prop))) - - print("\n-- app dirs (without optional 'version')") - dirs = AppDirs(appname, appauthor) - for prop in props: - print("%s: %s" % (prop, getattr(dirs, prop))) - - print("\n-- app dirs (without optional 'appauthor')") - dirs = AppDirs(appname) - for prop in props: - print("%s: %s" % (prop, getattr(dirs, prop))) - - print("\n-- app dirs (with disabled 'appauthor')") - dirs = AppDirs(appname, appauthor=False) - for prop in props: - print("%s: %s" % (prop, getattr(dirs, prop))) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py deleted file mode 100644 index 95d330ef82..0000000000 --- a/pkg_resources/_vendor/packaging/__about__.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -__all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", -] - -__title__ = "packaging" -__summary__ = "Core utilities for Python packages" -__uri__ = "https://github.com/pypa/packaging" - -__version__ = "16.8" - -__author__ = "Donald Stufft and individual contributors" -__email__ = "donald@stufft.io" - -__license__ = "BSD or Apache License, Version 2.0" -__copyright__ = "Copyright 2014-2016 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/__init__.py b/pkg_resources/_vendor/packaging/__init__.py deleted file mode 100644 index 5ee6220203..0000000000 --- a/pkg_resources/_vendor/packaging/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -from .__about__ import ( - __author__, __copyright__, __email__, __license__, __summary__, __title__, - __uri__, __version__ -) - -__all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", -] diff --git a/pkg_resources/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py deleted file mode 100644 index 210bb80b7e..0000000000 --- a/pkg_resources/_vendor/packaging/_compat.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import sys - - -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 - -# flake8: noqa - -if PY3: - string_types = str, -else: - string_types = basestring, - - -def with_metaclass(meta, *bases): - """ - Create a base class with a metaclass. - """ - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(meta): - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py deleted file mode 100644 index ccc27861c3..0000000000 --- a/pkg_resources/_vendor/packaging/_structures.py +++ /dev/null @@ -1,68 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - - -class Infinity(object): - - def __repr__(self): - return "Infinity" - - def __hash__(self): - return hash(repr(self)) - - def __lt__(self, other): - return False - - def __le__(self, other): - return False - - def __eq__(self, other): - return isinstance(other, self.__class__) - - def __ne__(self, other): - return not isinstance(other, self.__class__) - - def __gt__(self, other): - return True - - def __ge__(self, other): - return True - - def __neg__(self): - return NegativeInfinity - -Infinity = Infinity() - - -class NegativeInfinity(object): - - def __repr__(self): - return "-Infinity" - - def __hash__(self): - return hash(repr(self)) - - def __lt__(self, other): - return True - - def __le__(self, other): - return True - - def __eq__(self, other): - return isinstance(other, self.__class__) - - def __ne__(self, other): - return not isinstance(other, self.__class__) - - def __gt__(self, other): - return False - - def __ge__(self, other): - return False - - def __neg__(self): - return Infinity - -NegativeInfinity = NegativeInfinity() diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py deleted file mode 100644 index 892e578edd..0000000000 --- a/pkg_resources/_vendor/packaging/markers.py +++ /dev/null @@ -1,301 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import operator -import os -import platform -import sys - -from pkg_resources.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd -from pkg_resources.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString -from pkg_resources.extern.pyparsing import Literal as L # noqa - -from ._compat import string_types -from .specifiers import Specifier, InvalidSpecifier - - -__all__ = [ - "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", - "Marker", "default_environment", -] - - -class InvalidMarker(ValueError): - """ - An invalid marker was found, users should refer to PEP 508. - """ - - -class UndefinedComparison(ValueError): - """ - An invalid operation was attempted on a value that doesn't support it. - """ - - -class UndefinedEnvironmentName(ValueError): - """ - A name was attempted to be used that does not exist inside of the - environment. - """ - - -class Node(object): - - def __init__(self, value): - self.value = value - - def __str__(self): - return str(self.value) - - def __repr__(self): - return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) - - def serialize(self): - raise NotImplementedError - - -class Variable(Node): - - def serialize(self): - return str(self) - - -class Value(Node): - - def serialize(self): - return '"{0}"'.format(self) - - -class Op(Node): - - def serialize(self): - return str(self) - - -VARIABLE = ( - L("implementation_version") | - L("platform_python_implementation") | - L("implementation_name") | - L("python_full_version") | - L("platform_release") | - L("platform_version") | - L("platform_machine") | - L("platform_system") | - L("python_version") | - L("sys_platform") | - L("os_name") | - L("os.name") | # PEP-345 - L("sys.platform") | # PEP-345 - L("platform.version") | # PEP-345 - L("platform.machine") | # PEP-345 - L("platform.python_implementation") | # PEP-345 - L("python_implementation") | # undocumented setuptools legacy - L("extra") -) -ALIASES = { - 'os.name': 'os_name', - 'sys.platform': 'sys_platform', - 'platform.version': 'platform_version', - 'platform.machine': 'platform_machine', - 'platform.python_implementation': 'platform_python_implementation', - 'python_implementation': 'platform_python_implementation' -} -VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) - -VERSION_CMP = ( - L("===") | - L("==") | - L(">=") | - L("<=") | - L("!=") | - L("~=") | - L(">") | - L("<") -) - -MARKER_OP = VERSION_CMP | L("not in") | L("in") -MARKER_OP.setParseAction(lambda s, l, t: Op(t[0])) - -MARKER_VALUE = QuotedString("'") | QuotedString('"') -MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0])) - -BOOLOP = L("and") | L("or") - -MARKER_VAR = VARIABLE | MARKER_VALUE - -MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR) -MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0])) - -LPAREN = L("(").suppress() -RPAREN = L(")").suppress() - -MARKER_EXPR = Forward() -MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN) -MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR) - -MARKER = stringStart + MARKER_EXPR + stringEnd - - -def _coerce_parse_result(results): - if isinstance(results, ParseResults): - return [_coerce_parse_result(i) for i in results] - else: - return results - - -def _format_marker(marker, first=True): - assert isinstance(marker, (list, tuple, string_types)) - - # Sometimes we have a structure like [[...]] which is a single item list - # where the single item is itself it's own list. In that case we want skip - # the rest of this function so that we don't get extraneous () on the - # outside. - if (isinstance(marker, list) and len(marker) == 1 and - isinstance(marker[0], (list, tuple))): - return _format_marker(marker[0]) - - if isinstance(marker, list): - inner = (_format_marker(m, first=False) for m in marker) - if first: - return " ".join(inner) - else: - return "(" + " ".join(inner) + ")" - elif isinstance(marker, tuple): - return " ".join([m.serialize() for m in marker]) - else: - return marker - - -_operators = { - "in": lambda lhs, rhs: lhs in rhs, - "not in": lambda lhs, rhs: lhs not in rhs, - "<": operator.lt, - "<=": operator.le, - "==": operator.eq, - "!=": operator.ne, - ">=": operator.ge, - ">": operator.gt, -} - - -def _eval_op(lhs, op, rhs): - try: - spec = Specifier("".join([op.serialize(), rhs])) - except InvalidSpecifier: - pass - else: - return spec.contains(lhs) - - oper = _operators.get(op.serialize()) - if oper is None: - raise UndefinedComparison( - "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) - ) - - return oper(lhs, rhs) - - -_undefined = object() - - -def _get_env(environment, name): - value = environment.get(name, _undefined) - - if value is _undefined: - raise UndefinedEnvironmentName( - "{0!r} does not exist in evaluation environment.".format(name) - ) - - return value - - -def _evaluate_markers(markers, environment): - groups = [[]] - - for marker in markers: - assert isinstance(marker, (list, tuple, string_types)) - - if isinstance(marker, list): - groups[-1].append(_evaluate_markers(marker, environment)) - elif isinstance(marker, tuple): - lhs, op, rhs = marker - - if isinstance(lhs, Variable): - lhs_value = _get_env(environment, lhs.value) - rhs_value = rhs.value - else: - lhs_value = lhs.value - rhs_value = _get_env(environment, rhs.value) - - groups[-1].append(_eval_op(lhs_value, op, rhs_value)) - else: - assert marker in ["and", "or"] - if marker == "or": - groups.append([]) - - return any(all(item) for item in groups) - - -def format_full_version(info): - version = '{0.major}.{0.minor}.{0.micro}'.format(info) - kind = info.releaselevel - if kind != 'final': - version += kind[0] + str(info.serial) - return version - - -def default_environment(): - if hasattr(sys, 'implementation'): - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name - else: - iver = '0' - implementation_name = '' - - return { - "implementation_name": implementation_name, - "implementation_version": iver, - "os_name": os.name, - "platform_machine": platform.machine(), - "platform_release": platform.release(), - "platform_system": platform.system(), - "platform_version": platform.version(), - "python_full_version": platform.python_version(), - "platform_python_implementation": platform.python_implementation(), - "python_version": platform.python_version()[:3], - "sys_platform": sys.platform, - } - - -class Marker(object): - - def __init__(self, marker): - try: - self._markers = _coerce_parse_result(MARKER.parseString(marker)) - except ParseException as e: - err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( - marker, marker[e.loc:e.loc + 8]) - raise InvalidMarker(err_str) - - def __str__(self): - return _format_marker(self._markers) - - def __repr__(self): - return "".format(str(self)) - - def evaluate(self, environment=None): - """Evaluate a marker. - - Return the boolean from evaluating the given marker against the - environment. environment is an optional argument to override all or - part of the determined environment. - - The environment is determined from the current Python process. - """ - current_environment = default_environment() - if environment is not None: - current_environment.update(environment) - - return _evaluate_markers(self._markers, current_environment) diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py deleted file mode 100644 index 0c8c4a3852..0000000000 --- a/pkg_resources/_vendor/packaging/requirements.py +++ /dev/null @@ -1,127 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import string -import re - -from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException -from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine -from pkg_resources.extern.pyparsing import Literal as L # noqa -from pkg_resources.extern.six.moves.urllib import parse as urlparse - -from .markers import MARKER_EXPR, Marker -from .specifiers import LegacySpecifier, Specifier, SpecifierSet - - -class InvalidRequirement(ValueError): - """ - An invalid requirement was found, users should refer to PEP 508. - """ - - -ALPHANUM = Word(string.ascii_letters + string.digits) - -LBRACKET = L("[").suppress() -RBRACKET = L("]").suppress() -LPAREN = L("(").suppress() -RPAREN = L(")").suppress() -COMMA = L(",").suppress() -SEMICOLON = L(";").suppress() -AT = L("@").suppress() - -PUNCTUATION = Word("-_.") -IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM) -IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END)) - -NAME = IDENTIFIER("name") -EXTRA = IDENTIFIER - -URI = Regex(r'[^ ]+')("url") -URL = (AT + URI) - -EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) -EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") - -VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE) -VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) - -VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY -VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), - joinString=",", adjacent=False)("_raw_spec") -_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) -_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') - -VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") -VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) - -MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") -MARKER_EXPR.setParseAction( - lambda s, l, t: Marker(s[t._original_start:t._original_end]) -) -MARKER_SEPERATOR = SEMICOLON -MARKER = MARKER_SEPERATOR + MARKER_EXPR - -VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) -URL_AND_MARKER = URL + Optional(MARKER) - -NAMED_REQUIREMENT = \ - NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) - -REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd - - -class Requirement(object): - """Parse a requirement. - - Parse a given requirement string into its parts, such as name, specifier, - URL, and extras. Raises InvalidRequirement on a badly-formed requirement - string. - """ - - # TODO: Can we test whether something is contained within a requirement? - # If so how do we do that? Do we need to test against the _name_ of - # the thing as well as the version? What about the markers? - # TODO: Can we normalize the name and extra name? - - def __init__(self, requirement_string): - try: - req = REQUIREMENT.parseString(requirement_string) - except ParseException as e: - raise InvalidRequirement( - "Invalid requirement, parse error at \"{0!r}\"".format( - requirement_string[e.loc:e.loc + 8])) - - self.name = req.name - if req.url: - parsed_url = urlparse.urlparse(req.url) - if not (parsed_url.scheme and parsed_url.netloc) or ( - not parsed_url.scheme and not parsed_url.netloc): - raise InvalidRequirement("Invalid URL given") - self.url = req.url - else: - self.url = None - self.extras = set(req.extras.asList() if req.extras else []) - self.specifier = SpecifierSet(req.specifier) - self.marker = req.marker if req.marker else None - - def __str__(self): - parts = [self.name] - - if self.extras: - parts.append("[{0}]".format(",".join(sorted(self.extras)))) - - if self.specifier: - parts.append(str(self.specifier)) - - if self.url: - parts.append("@ {0}".format(self.url)) - - if self.marker: - parts.append("; {0}".format(self.marker)) - - return "".join(parts) - - def __repr__(self): - return "".format(str(self)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py deleted file mode 100644 index 7f5a76cfd6..0000000000 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ /dev/null @@ -1,774 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import abc -import functools -import itertools -import re - -from ._compat import string_types, with_metaclass -from .version import Version, LegacyVersion, parse - - -class InvalidSpecifier(ValueError): - """ - An invalid specifier was found, users should refer to PEP 440. - """ - - -class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): - - @abc.abstractmethod - def __str__(self): - """ - Returns the str representation of this Specifier like object. This - should be representative of the Specifier itself. - """ - - @abc.abstractmethod - def __hash__(self): - """ - Returns a hash value for this Specifier like object. - """ - - @abc.abstractmethod - def __eq__(self, other): - """ - Returns a boolean representing whether or not the two Specifier like - objects are equal. - """ - - @abc.abstractmethod - def __ne__(self, other): - """ - Returns a boolean representing whether or not the two Specifier like - objects are not equal. - """ - - @abc.abstractproperty - def prereleases(self): - """ - Returns whether or not pre-releases as a whole are allowed by this - specifier. - """ - - @prereleases.setter - def prereleases(self, value): - """ - Sets whether or not pre-releases as a whole are allowed by this - specifier. - """ - - @abc.abstractmethod - def contains(self, item, prereleases=None): - """ - Determines if the given item is contained within this specifier. - """ - - @abc.abstractmethod - def filter(self, iterable, prereleases=None): - """ - Takes an iterable of items and filters them so that only items which - are contained within this specifier are allowed in it. - """ - - -class _IndividualSpecifier(BaseSpecifier): - - _operators = {} - - def __init__(self, spec="", prereleases=None): - match = self._regex.search(spec) - if not match: - raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) - - self._spec = ( - match.group("operator").strip(), - match.group("version").strip(), - ) - - # Store whether or not this Specifier should accept prereleases - self._prereleases = prereleases - - def __repr__(self): - pre = ( - ", prereleases={0!r}".format(self.prereleases) - if self._prereleases is not None - else "" - ) - - return "<{0}({1!r}{2})>".format( - self.__class__.__name__, - str(self), - pre, - ) - - def __str__(self): - return "{0}{1}".format(*self._spec) - - def __hash__(self): - return hash(self._spec) - - def __eq__(self, other): - if isinstance(other, string_types): - try: - other = self.__class__(other) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._spec == other._spec - - def __ne__(self, other): - if isinstance(other, string_types): - try: - other = self.__class__(other) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._spec != other._spec - - def _get_operator(self, op): - return getattr(self, "_compare_{0}".format(self._operators[op])) - - def _coerce_version(self, version): - if not isinstance(version, (LegacyVersion, Version)): - version = parse(version) - return version - - @property - def operator(self): - return self._spec[0] - - @property - def version(self): - return self._spec[1] - - @property - def prereleases(self): - return self._prereleases - - @prereleases.setter - def prereleases(self, value): - self._prereleases = value - - def __contains__(self, item): - return self.contains(item) - - def contains(self, item, prereleases=None): - # Determine if prereleases are to be allowed or not. - if prereleases is None: - prereleases = self.prereleases - - # Normalize item to a Version or LegacyVersion, this allows us to have - # a shortcut for ``"2.0" in Specifier(">=2") - item = self._coerce_version(item) - - # Determine if we should be supporting prereleases in this specifier - # or not, if we do not support prereleases than we can short circuit - # logic if this version is a prereleases. - if item.is_prerelease and not prereleases: - return False - - # Actually do the comparison to determine if this item is contained - # within this Specifier or not. - return self._get_operator(self.operator)(item, self.version) - - def filter(self, iterable, prereleases=None): - yielded = False - found_prereleases = [] - - kw = {"prereleases": prereleases if prereleases is not None else True} - - # Attempt to iterate over all the values in the iterable and if any of - # them match, yield them. - for version in iterable: - parsed_version = self._coerce_version(version) - - if self.contains(parsed_version, **kw): - # If our version is a prerelease, and we were not set to allow - # prereleases, then we'll store it for later incase nothing - # else matches this specifier. - if (parsed_version.is_prerelease and not - (prereleases or self.prereleases)): - found_prereleases.append(version) - # Either this is not a prerelease, or we should have been - # accepting prereleases from the begining. - else: - yielded = True - yield version - - # Now that we've iterated over everything, determine if we've yielded - # any values, and if we have not and we have any prereleases stored up - # then we will go ahead and yield the prereleases. - if not yielded and found_prereleases: - for version in found_prereleases: - yield version - - -class LegacySpecifier(_IndividualSpecifier): - - _regex_str = ( - r""" - (?P(==|!=|<=|>=|<|>)) - \s* - (?P - [^,;\s)]* # Since this is a "legacy" specifier, and the version - # string can be just about anything, we match everything - # except for whitespace, a semi-colon for marker support, - # a closing paren since versions can be enclosed in - # them, and a comma since it's a version separator. - ) - """ - ) - - _regex = re.compile( - r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) - - _operators = { - "==": "equal", - "!=": "not_equal", - "<=": "less_than_equal", - ">=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - } - - def _coerce_version(self, version): - if not isinstance(version, LegacyVersion): - version = LegacyVersion(str(version)) - return version - - def _compare_equal(self, prospective, spec): - return prospective == self._coerce_version(spec) - - def _compare_not_equal(self, prospective, spec): - return prospective != self._coerce_version(spec) - - def _compare_less_than_equal(self, prospective, spec): - return prospective <= self._coerce_version(spec) - - def _compare_greater_than_equal(self, prospective, spec): - return prospective >= self._coerce_version(spec) - - def _compare_less_than(self, prospective, spec): - return prospective < self._coerce_version(spec) - - def _compare_greater_than(self, prospective, spec): - return prospective > self._coerce_version(spec) - - -def _require_version_compare(fn): - @functools.wraps(fn) - def wrapped(self, prospective, spec): - if not isinstance(prospective, Version): - return False - return fn(self, prospective, spec) - return wrapped - - -class Specifier(_IndividualSpecifier): - - _regex_str = ( - r""" - (?P(~=|==|!=|<=|>=|<|>|===)) - (?P - (?: - # The identity operators allow for an escape hatch that will - # do an exact string match of the version you wish to install. - # This will not be parsed by PEP 440 and we cannot determine - # any semantic meaning from it. This operator is discouraged - # but included entirely as an escape hatch. - (?<====) # Only match for the identity operator - \s* - [^\s]* # We just match everything, except for whitespace - # since we are only testing for strict identity. - ) - | - (?: - # The (non)equality operators allow for wild card and local - # versions to be specified so we have to define these two - # operators separately to enable that. - (?<===|!=) # Only match for equals and not equals - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)* # release - (?: # pre release - [-_\.]? - (a|b|c|rc|alpha|beta|pre|preview) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - - # You cannot use a wild card and a dev or local version - # together so group them with a | and make them optional. - (?: - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local - | - \.\* # Wild card syntax of .* - )? - ) - | - (?: - # The compatible operator requires at least two digits in the - # release segment. - (?<=~=) # Only match for the compatible operator - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) - (?: # pre release - [-_\.]? - (a|b|c|rc|alpha|beta|pre|preview) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - ) - | - (?: - # All other operators only allow a sub set of what the - # (non)equality operators do. Specifically they do not allow - # local versions to be specified nor do they allow the prefix - # matching wild cards. - (?=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - "===": "arbitrary", - } - - @_require_version_compare - def _compare_compatible(self, prospective, spec): - # Compatible releases have an equivalent combination of >= and ==. That - # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to - # implement this in terms of the other specifiers instead of - # implementing it ourselves. The only thing we need to do is construct - # the other specifiers. - - # We want everything but the last item in the version, but we want to - # ignore post and dev releases and we want to treat the pre-release as - # it's own separate segment. - prefix = ".".join( - list( - itertools.takewhile( - lambda x: (not x.startswith("post") and not - x.startswith("dev")), - _version_split(spec), - ) - )[:-1] - ) - - # Add the prefix notation to the end of our string - prefix += ".*" - - return (self._get_operator(">=")(prospective, spec) and - self._get_operator("==")(prospective, prefix)) - - @_require_version_compare - def _compare_equal(self, prospective, spec): - # We need special logic to handle prefix matching - if spec.endswith(".*"): - # In the case of prefix matching we want to ignore local segment. - prospective = Version(prospective.public) - # Split the spec out by dots, and pretend that there is an implicit - # dot in between a release segment and a pre-release segment. - spec = _version_split(spec[:-2]) # Remove the trailing .* - - # Split the prospective version out by dots, and pretend that there - # is an implicit dot in between a release segment and a pre-release - # segment. - prospective = _version_split(str(prospective)) - - # Shorten the prospective version to be the same length as the spec - # so that we can determine if the specifier is a prefix of the - # prospective version or not. - prospective = prospective[:len(spec)] - - # Pad out our two sides with zeros so that they both equal the same - # length. - spec, prospective = _pad_version(spec, prospective) - else: - # Convert our spec string into a Version - spec = Version(spec) - - # If the specifier does not have a local segment, then we want to - # act as if the prospective version also does not have a local - # segment. - if not spec.local: - prospective = Version(prospective.public) - - return prospective == spec - - @_require_version_compare - def _compare_not_equal(self, prospective, spec): - return not self._compare_equal(prospective, spec) - - @_require_version_compare - def _compare_less_than_equal(self, prospective, spec): - return prospective <= Version(spec) - - @_require_version_compare - def _compare_greater_than_equal(self, prospective, spec): - return prospective >= Version(spec) - - @_require_version_compare - def _compare_less_than(self, prospective, spec): - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = Version(spec) - - # Check to see if the prospective version is less than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective < spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a pre-release version, that we do not accept pre-release - # versions for the version mentioned in the specifier (e.g. <3.1 should - # not match 3.1.dev0, but should match 3.0.dev0). - if not spec.is_prerelease and prospective.is_prerelease: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # If we've gotten to here, it means that prospective version is both - # less than the spec version *and* it's not a pre-release of the same - # version in the spec. - return True - - @_require_version_compare - def _compare_greater_than(self, prospective, spec): - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = Version(spec) - - # Check to see if the prospective version is greater than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective > spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a post-release version, that we do not accept - # post-release versions for the version mentioned in the specifier - # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). - if not spec.is_postrelease and prospective.is_postrelease: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is techincally greater than, to match. - if prospective.local is not None: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # If we've gotten to here, it means that prospective version is both - # greater than the spec version *and* it's not a pre-release of the - # same version in the spec. - return True - - def _compare_arbitrary(self, prospective, spec): - return str(prospective).lower() == str(spec).lower() - - @property - def prereleases(self): - # If there is an explicit prereleases set for this, then we'll just - # blindly use that. - if self._prereleases is not None: - return self._prereleases - - # Look at all of our specifiers and determine if they are inclusive - # operators, and if they are if they are including an explicit - # prerelease. - operator, version = self._spec - if operator in ["==", ">=", "<=", "~=", "==="]: - # The == specifier can include a trailing .*, if it does we - # want to remove before parsing. - if operator == "==" and version.endswith(".*"): - version = version[:-2] - - # Parse the version, and if it is a pre-release than this - # specifier allows pre-releases. - if parse(version).is_prerelease: - return True - - return False - - @prereleases.setter - def prereleases(self, value): - self._prereleases = value - - -_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$") - - -def _version_split(version): - result = [] - for item in version.split("."): - match = _prefix_regex.search(item) - if match: - result.extend(match.groups()) - else: - result.append(item) - return result - - -def _pad_version(left, right): - left_split, right_split = [], [] - - # Get the release segment of our versions - left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) - right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) - - # Get the rest of our versions - left_split.append(left[len(left_split[0]):]) - right_split.append(right[len(right_split[0]):]) - - # Insert our padding - left_split.insert( - 1, - ["0"] * max(0, len(right_split[0]) - len(left_split[0])), - ) - right_split.insert( - 1, - ["0"] * max(0, len(left_split[0]) - len(right_split[0])), - ) - - return ( - list(itertools.chain(*left_split)), - list(itertools.chain(*right_split)), - ) - - -class SpecifierSet(BaseSpecifier): - - def __init__(self, specifiers="", prereleases=None): - # Split on , to break each indidivual specifier into it's own item, and - # strip each item to remove leading/trailing whitespace. - specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] - - # Parsed each individual specifier, attempting first to make it a - # Specifier and falling back to a LegacySpecifier. - parsed = set() - for specifier in specifiers: - try: - parsed.add(Specifier(specifier)) - except InvalidSpecifier: - parsed.add(LegacySpecifier(specifier)) - - # Turn our parsed specifiers into a frozen set and save them for later. - self._specs = frozenset(parsed) - - # Store our prereleases value so we can use it later to determine if - # we accept prereleases or not. - self._prereleases = prereleases - - def __repr__(self): - pre = ( - ", prereleases={0!r}".format(self.prereleases) - if self._prereleases is not None - else "" - ) - - return "".format(str(self), pre) - - def __str__(self): - return ",".join(sorted(str(s) for s in self._specs)) - - def __hash__(self): - return hash(self._specs) - - def __and__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - specifier = SpecifierSet() - specifier._specs = frozenset(self._specs | other._specs) - - if self._prereleases is None and other._prereleases is not None: - specifier._prereleases = other._prereleases - elif self._prereleases is not None and other._prereleases is None: - specifier._prereleases = self._prereleases - elif self._prereleases == other._prereleases: - specifier._prereleases = self._prereleases - else: - raise ValueError( - "Cannot combine SpecifierSets with True and False prerelease " - "overrides." - ) - - return specifier - - def __eq__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs == other._specs - - def __ne__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs != other._specs - - def __len__(self): - return len(self._specs) - - def __iter__(self): - return iter(self._specs) - - @property - def prereleases(self): - # If we have been given an explicit prerelease modifier, then we'll - # pass that through here. - if self._prereleases is not None: - return self._prereleases - - # If we don't have any specifiers, and we don't have a forced value, - # then we'll just return None since we don't know if this should have - # pre-releases or not. - if not self._specs: - return None - - # Otherwise we'll see if any of the given specifiers accept - # prereleases, if any of them do we'll return True, otherwise False. - return any(s.prereleases for s in self._specs) - - @prereleases.setter - def prereleases(self, value): - self._prereleases = value - - def __contains__(self, item): - return self.contains(item) - - def contains(self, item, prereleases=None): - # Ensure that our item is a Version or LegacyVersion instance. - if not isinstance(item, (LegacyVersion, Version)): - item = parse(item) - - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None: - prereleases = self.prereleases - - # We can determine if we're going to allow pre-releases by looking to - # see if any of the underlying items supports them. If none of them do - # and this item is a pre-release then we do not allow it and we can - # short circuit that here. - # Note: This means that 1.0.dev1 would not be contained in something - # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 - if not prereleases and item.is_prerelease: - return False - - # We simply dispatch to the underlying specs here to make sure that the - # given version is contained within all of them. - # Note: This use of all() here means that an empty set of specifiers - # will always return True, this is an explicit design decision. - return all( - s.contains(item, prereleases=prereleases) - for s in self._specs - ) - - def filter(self, iterable, prereleases=None): - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None: - prereleases = self.prereleases - - # If we have any specifiers, then we want to wrap our iterable in the - # filter method for each one, this will act as a logical AND amongst - # each specifier. - if self._specs: - for spec in self._specs: - iterable = spec.filter(iterable, prereleases=bool(prereleases)) - return iterable - # If we do not have any specifiers, then we need to have a rough filter - # which will filter out any pre-releases, unless there are no final - # releases, and which will filter out LegacyVersion in general. - else: - filtered = [] - found_prereleases = [] - - for item in iterable: - # Ensure that we some kind of Version class for this item. - if not isinstance(item, (LegacyVersion, Version)): - parsed_version = parse(item) - else: - parsed_version = item - - # Filter out any item which is parsed as a LegacyVersion - if isinstance(parsed_version, LegacyVersion): - continue - - # Store any item which is a pre-release for later unless we've - # already found a final version or we are accepting prereleases - if parsed_version.is_prerelease and not prereleases: - if not filtered: - found_prereleases.append(item) - else: - filtered.append(item) - - # If we've found no items except for pre-releases, then we'll go - # ahead and use the pre-releases - if not filtered and found_prereleases and prereleases is None: - return found_prereleases - - return filtered diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py deleted file mode 100644 index 942387cef5..0000000000 --- a/pkg_resources/_vendor/packaging/utils.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import re - - -_canonicalize_regex = re.compile(r"[-_.]+") - - -def canonicalize_name(name): - # This is taken from PEP 503. - return _canonicalize_regex.sub("-", name).lower() diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py deleted file mode 100644 index 83b5ee8c5e..0000000000 --- a/pkg_resources/_vendor/packaging/version.py +++ /dev/null @@ -1,393 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -from __future__ import absolute_import, division, print_function - -import collections -import itertools -import re - -from ._structures import Infinity - - -__all__ = [ - "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" -] - - -_Version = collections.namedtuple( - "_Version", - ["epoch", "release", "dev", "pre", "post", "local"], -) - - -def parse(version): - """ - Parse the given version string and return either a :class:`Version` object - or a :class:`LegacyVersion` object depending on if the given version is - a valid PEP 440 version or a legacy version. - """ - try: - return Version(version) - except InvalidVersion: - return LegacyVersion(version) - - -class InvalidVersion(ValueError): - """ - An invalid version was found, users should refer to PEP 440. - """ - - -class _BaseVersion(object): - - def __hash__(self): - return hash(self._key) - - def __lt__(self, other): - return self._compare(other, lambda s, o: s < o) - - def __le__(self, other): - return self._compare(other, lambda s, o: s <= o) - - def __eq__(self, other): - return self._compare(other, lambda s, o: s == o) - - def __ge__(self, other): - return self._compare(other, lambda s, o: s >= o) - - def __gt__(self, other): - return self._compare(other, lambda s, o: s > o) - - def __ne__(self, other): - return self._compare(other, lambda s, o: s != o) - - def _compare(self, other, method): - if not isinstance(other, _BaseVersion): - return NotImplemented - - return method(self._key, other._key) - - -class LegacyVersion(_BaseVersion): - - def __init__(self, version): - self._version = str(version) - self._key = _legacy_cmpkey(self._version) - - def __str__(self): - return self._version - - def __repr__(self): - return "".format(repr(str(self))) - - @property - def public(self): - return self._version - - @property - def base_version(self): - return self._version - - @property - def local(self): - return None - - @property - def is_prerelease(self): - return False - - @property - def is_postrelease(self): - return False - - -_legacy_version_component_re = re.compile( - r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, -) - -_legacy_version_replacement_map = { - "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", -} - - -def _parse_version_parts(s): - for part in _legacy_version_component_re.split(s): - part = _legacy_version_replacement_map.get(part, part) - - if not part or part == ".": - continue - - if part[:1] in "0123456789": - # pad for numeric comparison - yield part.zfill(8) - else: - yield "*" + part - - # ensure that alpha/beta/candidate are before final - yield "*final" - - -def _legacy_cmpkey(version): - # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch - # greater than or equal to 0. This will effectively put the LegacyVersion, - # which uses the defacto standard originally implemented by setuptools, - # as before all PEP 440 versions. - epoch = -1 - - # This scheme is taken from pkg_resources.parse_version setuptools prior to - # it's adoption of the packaging library. - parts = [] - for part in _parse_version_parts(version.lower()): - if part.startswith("*"): - # remove "-" before a prerelease tag - if part < "*final": - while parts and parts[-1] == "*final-": - parts.pop() - - # remove trailing zeros from each series of numeric parts - while parts and parts[-1] == "00000000": - parts.pop() - - parts.append(part) - parts = tuple(parts) - - return epoch, parts - -# Deliberately not anchored to the start and end of the string, to make it -# easier for 3rd party code to reuse -VERSION_PATTERN = r""" - v? - (?: - (?:(?P[0-9]+)!)? # epoch - (?P[0-9]+(?:\.[0-9]+)*) # release segment - (?P

                                              # pre-release
    -            [-_\.]?
    -            (?P(a|b|c|rc|alpha|beta|pre|preview))
    -            [-_\.]?
    -            (?P[0-9]+)?
    -        )?
    -        (?P                                         # post release
    -            (?:-(?P[0-9]+))
    -            |
    -            (?:
    -                [-_\.]?
    -                (?Ppost|rev|r)
    -                [-_\.]?
    -                (?P[0-9]+)?
    -            )
    -        )?
    -        (?P                                          # dev release
    -            [-_\.]?
    -            (?Pdev)
    -            [-_\.]?
    -            (?P[0-9]+)?
    -        )?
    -    )
    -    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    -"""
    -
    -
    -class Version(_BaseVersion):
    -
    -    _regex = re.compile(
    -        r"^\s*" + VERSION_PATTERN + r"\s*$",
    -        re.VERBOSE | re.IGNORECASE,
    -    )
    -
    -    def __init__(self, version):
    -        # Validate the version and parse it into pieces
    -        match = self._regex.search(version)
    -        if not match:
    -            raise InvalidVersion("Invalid version: '{0}'".format(version))
    -
    -        # Store the parsed out pieces of the version
    -        self._version = _Version(
    -            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
    -            release=tuple(int(i) for i in match.group("release").split(".")),
    -            pre=_parse_letter_version(
    -                match.group("pre_l"),
    -                match.group("pre_n"),
    -            ),
    -            post=_parse_letter_version(
    -                match.group("post_l"),
    -                match.group("post_n1") or match.group("post_n2"),
    -            ),
    -            dev=_parse_letter_version(
    -                match.group("dev_l"),
    -                match.group("dev_n"),
    -            ),
    -            local=_parse_local_version(match.group("local")),
    -        )
    -
    -        # Generate a key which will be used for sorting
    -        self._key = _cmpkey(
    -            self._version.epoch,
    -            self._version.release,
    -            self._version.pre,
    -            self._version.post,
    -            self._version.dev,
    -            self._version.local,
    -        )
    -
    -    def __repr__(self):
    -        return "".format(repr(str(self)))
    -
    -    def __str__(self):
    -        parts = []
    -
    -        # Epoch
    -        if self._version.epoch != 0:
    -            parts.append("{0}!".format(self._version.epoch))
    -
    -        # Release segment
    -        parts.append(".".join(str(x) for x in self._version.release))
    -
    -        # Pre-release
    -        if self._version.pre is not None:
    -            parts.append("".join(str(x) for x in self._version.pre))
    -
    -        # Post-release
    -        if self._version.post is not None:
    -            parts.append(".post{0}".format(self._version.post[1]))
    -
    -        # Development release
    -        if self._version.dev is not None:
    -            parts.append(".dev{0}".format(self._version.dev[1]))
    -
    -        # Local version segment
    -        if self._version.local is not None:
    -            parts.append(
    -                "+{0}".format(".".join(str(x) for x in self._version.local))
    -            )
    -
    -        return "".join(parts)
    -
    -    @property
    -    def public(self):
    -        return str(self).split("+", 1)[0]
    -
    -    @property
    -    def base_version(self):
    -        parts = []
    -
    -        # Epoch
    -        if self._version.epoch != 0:
    -            parts.append("{0}!".format(self._version.epoch))
    -
    -        # Release segment
    -        parts.append(".".join(str(x) for x in self._version.release))
    -
    -        return "".join(parts)
    -
    -    @property
    -    def local(self):
    -        version_string = str(self)
    -        if "+" in version_string:
    -            return version_string.split("+", 1)[1]
    -
    -    @property
    -    def is_prerelease(self):
    -        return bool(self._version.dev or self._version.pre)
    -
    -    @property
    -    def is_postrelease(self):
    -        return bool(self._version.post)
    -
    -
    -def _parse_letter_version(letter, number):
    -    if letter:
    -        # We consider there to be an implicit 0 in a pre-release if there is
    -        # not a numeral associated with it.
    -        if number is None:
    -            number = 0
    -
    -        # We normalize any letters to their lower case form
    -        letter = letter.lower()
    -
    -        # We consider some words to be alternate spellings of other words and
    -        # in those cases we want to normalize the spellings to our preferred
    -        # spelling.
    -        if letter == "alpha":
    -            letter = "a"
    -        elif letter == "beta":
    -            letter = "b"
    -        elif letter in ["c", "pre", "preview"]:
    -            letter = "rc"
    -        elif letter in ["rev", "r"]:
    -            letter = "post"
    -
    -        return letter, int(number)
    -    if not letter and number:
    -        # We assume if we are given a number, but we are not given a letter
    -        # then this is using the implicit post release syntax (e.g. 1.0-1)
    -        letter = "post"
    -
    -        return letter, int(number)
    -
    -
    -_local_version_seperators = re.compile(r"[\._-]")
    -
    -
    -def _parse_local_version(local):
    -    """
    -    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    -    """
    -    if local is not None:
    -        return tuple(
    -            part.lower() if not part.isdigit() else int(part)
    -            for part in _local_version_seperators.split(local)
    -        )
    -
    -
    -def _cmpkey(epoch, release, pre, post, dev, local):
    -    # When we compare a release version, we want to compare it with all of the
    -    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    -    # leading zeros until we come to something non zero, then take the rest
    -    # re-reverse it back into the correct order and make it a tuple and use
    -    # that for our sorting key.
    -    release = tuple(
    -        reversed(list(
    -            itertools.dropwhile(
    -                lambda x: x == 0,
    -                reversed(release),
    -            )
    -        ))
    -    )
    -
    -    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    -    # We'll do this by abusing the pre segment, but we _only_ want to do this
    -    # if there is not a pre or a post segment. If we have one of those then
    -    # the normal sorting rules will handle this case correctly.
    -    if pre is None and post is None and dev is not None:
    -        pre = -Infinity
    -    # Versions without a pre-release (except as noted above) should sort after
    -    # those with one.
    -    elif pre is None:
    -        pre = Infinity
    -
    -    # Versions without a post segment should sort before those with one.
    -    if post is None:
    -        post = -Infinity
    -
    -    # Versions without a development segment should sort after those with one.
    -    if dev is None:
    -        dev = Infinity
    -
    -    if local is None:
    -        # Versions without a local segment should sort before those with one.
    -        local = -Infinity
    -    else:
    -        # Versions with a local segment need that segment parsed to implement
    -        # the sorting rules in PEP440.
    -        # - Alpha numeric segments sort before numeric segments
    -        # - Alpha numeric segments sort lexicographically
    -        # - Numeric segments sort numerically
    -        # - Shorter versions sort before longer versions when the prefixes
    -        #   match exactly
    -        local = tuple(
    -            (i, "") if isinstance(i, int) else (-Infinity, i)
    -            for i in local
    -        )
    -
    -    return epoch, release, pre, post, dev, local
    diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py
    deleted file mode 100644
    index a21224359e..0000000000
    --- a/pkg_resources/_vendor/pyparsing.py
    +++ /dev/null
    @@ -1,5696 +0,0 @@
    -# module pyparsing.py
    -#
    -# Copyright (c) 2003-2016  Paul T. McGuire
    -#
    -# 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.
    -#
    -
    -__doc__ = \
    -"""
    -pyparsing module - Classes and methods to define and execute parsing grammars
    -
    -The pyparsing module is an alternative approach to creating and executing simple grammars,
    -vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you
    -don't need to learn a new syntax for defining grammars or matching expressions - the parsing module
    -provides a library of classes that you use to construct the grammar directly in Python.
    -
    -Here is a program to parse "Hello, World!" (or any greeting of the form 
    -C{", !"}), built up using L{Word}, L{Literal}, and L{And} elements 
    -(L{'+'} operator gives L{And} expressions, strings are auto-converted to
    -L{Literal} expressions)::
    -
    -    from pyparsing import Word, alphas
    -
    -    # define grammar of a greeting
    -    greet = Word(alphas) + "," + Word(alphas) + "!"
    -
    -    hello = "Hello, World!"
    -    print (hello, "->", greet.parseString(hello))
    -
    -The program outputs the following::
    -
    -    Hello, World! -> ['Hello', ',', 'World', '!']
    -
    -The Python representation of the grammar is quite readable, owing to the self-explanatory
    -class names, and the use of '+', '|' and '^' operators.
    -
    -The L{ParseResults} object returned from L{ParserElement.parseString} can be accessed as a nested list, a dictionary, or an
    -object with named attributes.
    -
    -The pyparsing module handles some of the problems that are typically vexing when writing text parsers:
    - - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)
    - - quoted strings
    - - embedded comments
    -"""
    -
    -__version__ = "2.1.10"
    -__versionTime__ = "07 Oct 2016 01:31 UTC"
    -__author__ = "Paul McGuire "
    -
    -import string
    -from weakref import ref as wkref
    -import copy
    -import sys
    -import warnings
    -import re
    -import sre_constants
    -import collections
    -import pprint
    -import traceback
    -import types
    -from datetime import datetime
    -
    -try:
    -    from _thread import RLock
    -except ImportError:
    -    from threading import RLock
    -
    -try:
    -    from collections import OrderedDict as _OrderedDict
    -except ImportError:
    -    try:
    -        from ordereddict import OrderedDict as _OrderedDict
    -    except ImportError:
    -        _OrderedDict = None
    -
    -#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
    -
    -__all__ = [
    -'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty',
    -'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal',
    -'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
    -'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException',
    -'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException',
    -'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 
    -'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore',
    -'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col',
    -'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString',
    -'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums',
    -'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno',
    -'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral',
    -'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables',
    -'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity', 
    -'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd',
    -'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute',
    -'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass',
    -'CloseMatch', 'tokenMap', 'pyparsing_common',
    -]
    -
    -system_version = tuple(sys.version_info)[:3]
    -PY_3 = system_version[0] == 3
    -if PY_3:
    -    _MAX_INT = sys.maxsize
    -    basestring = str
    -    unichr = chr
    -    _ustr = str
    -
    -    # build list of single arg builtins, that can be used as parse actions
    -    singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max]
    -
    -else:
    -    _MAX_INT = sys.maxint
    -    range = xrange
    -
    -    def _ustr(obj):
    -        """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries
    -           str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It
    -           then < returns the unicode object | encodes it with the default encoding | ... >.
    -        """
    -        if isinstance(obj,unicode):
    -            return obj
    -
    -        try:
    -            # If this works, then _ustr(obj) has the same behaviour as str(obj), so
    -            # it won't break any existing code.
    -            return str(obj)
    -
    -        except UnicodeEncodeError:
    -            # Else encode it
    -            ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace')
    -            xmlcharref = Regex('&#\d+;')
    -            xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:])
    -            return xmlcharref.transformString(ret)
    -
    -    # build list of single arg builtins, tolerant of Python version, that can be used as parse actions
    -    singleArgBuiltins = []
    -    import __builtin__
    -    for fname in "sum len sorted reversed list tuple set any all min max".split():
    -        try:
    -            singleArgBuiltins.append(getattr(__builtin__,fname))
    -        except AttributeError:
    -            continue
    -            
    -_generatorType = type((y for y in range(1)))
    - 
    -def _xml_escape(data):
    -    """Escape &, <, >, ", ', etc. in a string of data."""
    -
    -    # ampersand must be replaced first
    -    from_symbols = '&><"\''
    -    to_symbols = ('&'+s+';' for s in "amp gt lt quot apos".split())
    -    for from_,to_ in zip(from_symbols, to_symbols):
    -        data = data.replace(from_, to_)
    -    return data
    -
    -class _Constants(object):
    -    pass
    -
    -alphas     = string.ascii_uppercase + string.ascii_lowercase
    -nums       = "0123456789"
    -hexnums    = nums + "ABCDEFabcdef"
    -alphanums  = alphas + nums
    -_bslash    = chr(92)
    -printables = "".join(c for c in string.printable if c not in string.whitespace)
    -
    -class ParseBaseException(Exception):
    -    """base exception class for all parsing runtime exceptions"""
    -    # Performance tuning: we construct a *lot* of these, so keep this
    -    # constructor as small and fast as possible
    -    def __init__( self, pstr, loc=0, msg=None, elem=None ):
    -        self.loc = loc
    -        if msg is None:
    -            self.msg = pstr
    -            self.pstr = ""
    -        else:
    -            self.msg = msg
    -            self.pstr = pstr
    -        self.parserElement = elem
    -        self.args = (pstr, loc, msg)
    -
    -    @classmethod
    -    def _from_exception(cls, pe):
    -        """
    -        internal factory method to simplify creating one type of ParseException 
    -        from another - avoids having __init__ signature conflicts among subclasses
    -        """
    -        return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement)
    -
    -    def __getattr__( self, aname ):
    -        """supported attributes by name are:
    -            - lineno - returns the line number of the exception text
    -            - col - returns the column number of the exception text
    -            - line - returns the line containing the exception text
    -        """
    -        if( aname == "lineno" ):
    -            return lineno( self.loc, self.pstr )
    -        elif( aname in ("col", "column") ):
    -            return col( self.loc, self.pstr )
    -        elif( aname == "line" ):
    -            return line( self.loc, self.pstr )
    -        else:
    -            raise AttributeError(aname)
    -
    -    def __str__( self ):
    -        return "%s (at char %d), (line:%d, col:%d)" % \
    -                ( self.msg, self.loc, self.lineno, self.column )
    -    def __repr__( self ):
    -        return _ustr(self)
    -    def markInputline( self, markerString = ">!<" ):
    -        """Extracts the exception line from the input string, and marks
    -           the location of the exception with a special symbol.
    -        """
    -        line_str = self.line
    -        line_column = self.column - 1
    -        if markerString:
    -            line_str = "".join((line_str[:line_column],
    -                                markerString, line_str[line_column:]))
    -        return line_str.strip()
    -    def __dir__(self):
    -        return "lineno col line".split() + dir(type(self))
    -
    -class ParseException(ParseBaseException):
    -    """
    -    Exception thrown when parse expressions don't match class;
    -    supported attributes by name are:
    -     - lineno - returns the line number of the exception text
    -     - col - returns the column number of the exception text
    -     - line - returns the line containing the exception text
    -        
    -    Example::
    -        try:
    -            Word(nums).setName("integer").parseString("ABC")
    -        except ParseException as pe:
    -            print(pe)
    -            print("column: {}".format(pe.col))
    -            
    -    prints::
    -       Expected integer (at char 0), (line:1, col:1)
    -        column: 1
    -    """
    -    pass
    -
    -class ParseFatalException(ParseBaseException):
    -    """user-throwable exception thrown when inconsistent parse content
    -       is found; stops all parsing immediately"""
    -    pass
    -
    -class ParseSyntaxException(ParseFatalException):
    -    """just like L{ParseFatalException}, but thrown internally when an
    -       L{ErrorStop} ('-' operator) indicates that parsing is to stop 
    -       immediately because an unbacktrackable syntax error has been found"""
    -    pass
    -
    -#~ class ReparseException(ParseBaseException):
    -    #~ """Experimental class - parse actions can raise this exception to cause
    -       #~ pyparsing to reparse the input string:
    -        #~ - with a modified input string, and/or
    -        #~ - with a modified start location
    -       #~ Set the values of the ReparseException in the constructor, and raise the
    -       #~ exception in a parse action to cause pyparsing to use the new string/location.
    -       #~ Setting the values as None causes no change to be made.
    -       #~ """
    -    #~ def __init_( self, newstring, restartLoc ):
    -        #~ self.newParseText = newstring
    -        #~ self.reparseLoc = restartLoc
    -
    -class RecursiveGrammarException(Exception):
    -    """exception thrown by L{ParserElement.validate} if the grammar could be improperly recursive"""
    -    def __init__( self, parseElementList ):
    -        self.parseElementTrace = parseElementList
    -
    -    def __str__( self ):
    -        return "RecursiveGrammarException: %s" % self.parseElementTrace
    -
    -class _ParseResultsWithOffset(object):
    -    def __init__(self,p1,p2):
    -        self.tup = (p1,p2)
    -    def __getitem__(self,i):
    -        return self.tup[i]
    -    def __repr__(self):
    -        return repr(self.tup[0])
    -    def setOffset(self,i):
    -        self.tup = (self.tup[0],i)
    -
    -class ParseResults(object):
    -    """
    -    Structured parse results, to provide multiple means of access to the parsed data:
    -       - as a list (C{len(results)})
    -       - by list index (C{results[0], results[1]}, etc.)
    -       - by attribute (C{results.} - see L{ParserElement.setResultsName})
    -
    -    Example::
    -        integer = Word(nums)
    -        date_str = (integer.setResultsName("year") + '/' 
    -                        + integer.setResultsName("month") + '/' 
    -                        + integer.setResultsName("day"))
    -        # equivalent form:
    -        # date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    -
    -        # parseString returns a ParseResults object
    -        result = date_str.parseString("1999/12/31")
    -
    -        def test(s, fn=repr):
    -            print("%s -> %s" % (s, fn(eval(s))))
    -        test("list(result)")
    -        test("result[0]")
    -        test("result['month']")
    -        test("result.day")
    -        test("'month' in result")
    -        test("'minutes' in result")
    -        test("result.dump()", str)
    -    prints::
    -        list(result) -> ['1999', '/', '12', '/', '31']
    -        result[0] -> '1999'
    -        result['month'] -> '12'
    -        result.day -> '31'
    -        'month' in result -> True
    -        'minutes' in result -> False
    -        result.dump() -> ['1999', '/', '12', '/', '31']
    -        - day: 31
    -        - month: 12
    -        - year: 1999
    -    """
    -    def __new__(cls, toklist=None, name=None, asList=True, modal=True ):
    -        if isinstance(toklist, cls):
    -            return toklist
    -        retobj = object.__new__(cls)
    -        retobj.__doinit = True
    -        return retobj
    -
    -    # Performance tuning: we construct a *lot* of these, so keep this
    -    # constructor as small and fast as possible
    -    def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ):
    -        if self.__doinit:
    -            self.__doinit = False
    -            self.__name = None
    -            self.__parent = None
    -            self.__accumNames = {}
    -            self.__asList = asList
    -            self.__modal = modal
    -            if toklist is None:
    -                toklist = []
    -            if isinstance(toklist, list):
    -                self.__toklist = toklist[:]
    -            elif isinstance(toklist, _generatorType):
    -                self.__toklist = list(toklist)
    -            else:
    -                self.__toklist = [toklist]
    -            self.__tokdict = dict()
    -
    -        if name is not None and name:
    -            if not modal:
    -                self.__accumNames[name] = 0
    -            if isinstance(name,int):
    -                name = _ustr(name) # will always return a str, but use _ustr for consistency
    -            self.__name = name
    -            if not (isinstance(toklist, (type(None), basestring, list)) and toklist in (None,'',[])):
    -                if isinstance(toklist,basestring):
    -                    toklist = [ toklist ]
    -                if asList:
    -                    if isinstance(toklist,ParseResults):
    -                        self[name] = _ParseResultsWithOffset(toklist.copy(),0)
    -                    else:
    -                        self[name] = _ParseResultsWithOffset(ParseResults(toklist[0]),0)
    -                    self[name].__name = name
    -                else:
    -                    try:
    -                        self[name] = toklist[0]
    -                    except (KeyError,TypeError,IndexError):
    -                        self[name] = toklist
    -
    -    def __getitem__( self, i ):
    -        if isinstance( i, (int,slice) ):
    -            return self.__toklist[i]
    -        else:
    -            if i not in self.__accumNames:
    -                return self.__tokdict[i][-1][0]
    -            else:
    -                return ParseResults([ v[0] for v in self.__tokdict[i] ])
    -
    -    def __setitem__( self, k, v, isinstance=isinstance ):
    -        if isinstance(v,_ParseResultsWithOffset):
    -            self.__tokdict[k] = self.__tokdict.get(k,list()) + [v]
    -            sub = v[0]
    -        elif isinstance(k,(int,slice)):
    -            self.__toklist[k] = v
    -            sub = v
    -        else:
    -            self.__tokdict[k] = self.__tokdict.get(k,list()) + [_ParseResultsWithOffset(v,0)]
    -            sub = v
    -        if isinstance(sub,ParseResults):
    -            sub.__parent = wkref(self)
    -
    -    def __delitem__( self, i ):
    -        if isinstance(i,(int,slice)):
    -            mylen = len( self.__toklist )
    -            del self.__toklist[i]
    -
    -            # convert int to slice
    -            if isinstance(i, int):
    -                if i < 0:
    -                    i += mylen
    -                i = slice(i, i+1)
    -            # get removed indices
    -            removed = list(range(*i.indices(mylen)))
    -            removed.reverse()
    -            # fixup indices in token dictionary
    -            for name,occurrences in self.__tokdict.items():
    -                for j in removed:
    -                    for k, (value, position) in enumerate(occurrences):
    -                        occurrences[k] = _ParseResultsWithOffset(value, position - (position > j))
    -        else:
    -            del self.__tokdict[i]
    -
    -    def __contains__( self, k ):
    -        return k in self.__tokdict
    -
    -    def __len__( self ): return len( self.__toklist )
    -    def __bool__(self): return ( not not self.__toklist )
    -    __nonzero__ = __bool__
    -    def __iter__( self ): return iter( self.__toklist )
    -    def __reversed__( self ): return iter( self.__toklist[::-1] )
    -    def _iterkeys( self ):
    -        if hasattr(self.__tokdict, "iterkeys"):
    -            return self.__tokdict.iterkeys()
    -        else:
    -            return iter(self.__tokdict)
    -
    -    def _itervalues( self ):
    -        return (self[k] for k in self._iterkeys())
    -            
    -    def _iteritems( self ):
    -        return ((k, self[k]) for k in self._iterkeys())
    -
    -    if PY_3:
    -        keys = _iterkeys       
    -        """Returns an iterator of all named result keys (Python 3.x only)."""
    -
    -        values = _itervalues
    -        """Returns an iterator of all named result values (Python 3.x only)."""
    -
    -        items = _iteritems
    -        """Returns an iterator of all named result key-value tuples (Python 3.x only)."""
    -
    -    else:
    -        iterkeys = _iterkeys
    -        """Returns an iterator of all named result keys (Python 2.x only)."""
    -
    -        itervalues = _itervalues
    -        """Returns an iterator of all named result values (Python 2.x only)."""
    -
    -        iteritems = _iteritems
    -        """Returns an iterator of all named result key-value tuples (Python 2.x only)."""
    -
    -        def keys( self ):
    -            """Returns all named result keys (as a list in Python 2.x, as an iterator in Python 3.x)."""
    -            return list(self.iterkeys())
    -
    -        def values( self ):
    -            """Returns all named result values (as a list in Python 2.x, as an iterator in Python 3.x)."""
    -            return list(self.itervalues())
    -                
    -        def items( self ):
    -            """Returns all named result key-values (as a list of tuples in Python 2.x, as an iterator in Python 3.x)."""
    -            return list(self.iteritems())
    -
    -    def haskeys( self ):
    -        """Since keys() returns an iterator, this method is helpful in bypassing
    -           code that looks for the existence of any defined results names."""
    -        return bool(self.__tokdict)
    -        
    -    def pop( self, *args, **kwargs):
    -        """
    -        Removes and returns item at specified index (default=C{last}).
    -        Supports both C{list} and C{dict} semantics for C{pop()}. If passed no
    -        argument or an integer argument, it will use C{list} semantics
    -        and pop tokens from the list of parsed tokens. If passed a 
    -        non-integer argument (most likely a string), it will use C{dict}
    -        semantics and pop the corresponding value from any defined 
    -        results names. A second default return value argument is 
    -        supported, just as in C{dict.pop()}.
    -
    -        Example::
    -            def remove_first(tokens):
    -                tokens.pop(0)
    -            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    -            print(OneOrMore(Word(nums)).addParseAction(remove_first).parseString("0 123 321")) # -> ['123', '321']
    -
    -            label = Word(alphas)
    -            patt = label("LABEL") + OneOrMore(Word(nums))
    -            print(patt.parseString("AAB 123 321").dump())
    -
    -            # Use pop() in a parse action to remove named result (note that corresponding value is not
    -            # removed from list form of results)
    -            def remove_LABEL(tokens):
    -                tokens.pop("LABEL")
    -                return tokens
    -            patt.addParseAction(remove_LABEL)
    -            print(patt.parseString("AAB 123 321").dump())
    -        prints::
    -            ['AAB', '123', '321']
    -            - LABEL: AAB
    -
    -            ['AAB', '123', '321']
    -        """
    -        if not args:
    -            args = [-1]
    -        for k,v in kwargs.items():
    -            if k == 'default':
    -                args = (args[0], v)
    -            else:
    -                raise TypeError("pop() got an unexpected keyword argument '%s'" % k)
    -        if (isinstance(args[0], int) or 
    -                        len(args) == 1 or 
    -                        args[0] in self):
    -            index = args[0]
    -            ret = self[index]
    -            del self[index]
    -            return ret
    -        else:
    -            defaultvalue = args[1]
    -            return defaultvalue
    -
    -    def get(self, key, defaultValue=None):
    -        """
    -        Returns named result matching the given key, or if there is no
    -        such name, then returns the given C{defaultValue} or C{None} if no
    -        C{defaultValue} is specified.
    -
    -        Similar to C{dict.get()}.
    -        
    -        Example::
    -            integer = Word(nums)
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    -
    -            result = date_str.parseString("1999/12/31")
    -            print(result.get("year")) # -> '1999'
    -            print(result.get("hour", "not specified")) # -> 'not specified'
    -            print(result.get("hour")) # -> None
    -        """
    -        if key in self:
    -            return self[key]
    -        else:
    -            return defaultValue
    -
    -    def insert( self, index, insStr ):
    -        """
    -        Inserts new element at location index in the list of parsed tokens.
    -        
    -        Similar to C{list.insert()}.
    -
    -        Example::
    -            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    -
    -            # use a parse action to insert the parse location in the front of the parsed results
    -            def insert_locn(locn, tokens):
    -                tokens.insert(0, locn)
    -            print(OneOrMore(Word(nums)).addParseAction(insert_locn).parseString("0 123 321")) # -> [0, '0', '123', '321']
    -        """
    -        self.__toklist.insert(index, insStr)
    -        # fixup indices in token dictionary
    -        for name,occurrences in self.__tokdict.items():
    -            for k, (value, position) in enumerate(occurrences):
    -                occurrences[k] = _ParseResultsWithOffset(value, position + (position > index))
    -
    -    def append( self, item ):
    -        """
    -        Add single element to end of ParseResults list of elements.
    -
    -        Example::
    -            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    -            
    -            # use a parse action to compute the sum of the parsed integers, and add it to the end
    -            def append_sum(tokens):
    -                tokens.append(sum(map(int, tokens)))
    -            print(OneOrMore(Word(nums)).addParseAction(append_sum).parseString("0 123 321")) # -> ['0', '123', '321', 444]
    -        """
    -        self.__toklist.append(item)
    -
    -    def extend( self, itemseq ):
    -        """
    -        Add sequence of elements to end of ParseResults list of elements.
    -
    -        Example::
    -            patt = OneOrMore(Word(alphas))
    -            
    -            # use a parse action to append the reverse of the matched strings, to make a palindrome
    -            def make_palindrome(tokens):
    -                tokens.extend(reversed([t[::-1] for t in tokens]))
    -                return ''.join(tokens)
    -            print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
    -        """
    -        if isinstance(itemseq, ParseResults):
    -            self += itemseq
    -        else:
    -            self.__toklist.extend(itemseq)
    -
    -    def clear( self ):
    -        """
    -        Clear all elements and results names.
    -        """
    -        del self.__toklist[:]
    -        self.__tokdict.clear()
    -
    -    def __getattr__( self, name ):
    -        try:
    -            return self[name]
    -        except KeyError:
    -            return ""
    -            
    -        if name in self.__tokdict:
    -            if name not in self.__accumNames:
    -                return self.__tokdict[name][-1][0]
    -            else:
    -                return ParseResults([ v[0] for v in self.__tokdict[name] ])
    -        else:
    -            return ""
    -
    -    def __add__( self, other ):
    -        ret = self.copy()
    -        ret += other
    -        return ret
    -
    -    def __iadd__( self, other ):
    -        if other.__tokdict:
    -            offset = len(self.__toklist)
    -            addoffset = lambda a: offset if a<0 else a+offset
    -            otheritems = other.__tokdict.items()
    -            otherdictitems = [(k, _ParseResultsWithOffset(v[0],addoffset(v[1])) )
    -                                for (k,vlist) in otheritems for v in vlist]
    -            for k,v in otherdictitems:
    -                self[k] = v
    -                if isinstance(v[0],ParseResults):
    -                    v[0].__parent = wkref(self)
    -            
    -        self.__toklist += other.__toklist
    -        self.__accumNames.update( other.__accumNames )
    -        return self
    -
    -    def __radd__(self, other):
    -        if isinstance(other,int) and other == 0:
    -            # useful for merging many ParseResults using sum() builtin
    -            return self.copy()
    -        else:
    -            # this may raise a TypeError - so be it
    -            return other + self
    -        
    -    def __repr__( self ):
    -        return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )
    -
    -    def __str__( self ):
    -        return '[' + ', '.join(_ustr(i) if isinstance(i, ParseResults) else repr(i) for i in self.__toklist) + ']'
    -
    -    def _asStringList( self, sep='' ):
    -        out = []
    -        for item in self.__toklist:
    -            if out and sep:
    -                out.append(sep)
    -            if isinstance( item, ParseResults ):
    -                out += item._asStringList()
    -            else:
    -                out.append( _ustr(item) )
    -        return out
    -
    -    def asList( self ):
    -        """
    -        Returns the parse results as a nested list of matching tokens, all converted to strings.
    -
    -        Example::
    -            patt = OneOrMore(Word(alphas))
    -            result = patt.parseString("sldkj lsdkj sldkj")
    -            # even though the result prints in string-like form, it is actually a pyparsing ParseResults
    -            print(type(result), result) # ->  ['sldkj', 'lsdkj', 'sldkj']
    -            
    -            # Use asList() to create an actual list
    -            result_list = result.asList()
    -            print(type(result_list), result_list) # ->  ['sldkj', 'lsdkj', 'sldkj']
    -        """
    -        return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist]
    -
    -    def asDict( self ):
    -        """
    -        Returns the named parse results as a nested dictionary.
    -
    -        Example::
    -            integer = Word(nums)
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    -            
    -            result = date_str.parseString('12/31/1999')
    -            print(type(result), repr(result)) # ->  (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})
    -            
    -            result_dict = result.asDict()
    -            print(type(result_dict), repr(result_dict)) # ->  {'day': '1999', 'year': '12', 'month': '31'}
    -
    -            # even though a ParseResults supports dict-like access, sometime you just need to have a dict
    -            import json
    -            print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
    -            print(json.dumps(result.asDict())) # -> {"month": "31", "day": "1999", "year": "12"}
    -        """
    -        if PY_3:
    -            item_fn = self.items
    -        else:
    -            item_fn = self.iteritems
    -            
    -        def toItem(obj):
    -            if isinstance(obj, ParseResults):
    -                if obj.haskeys():
    -                    return obj.asDict()
    -                else:
    -                    return [toItem(v) for v in obj]
    -            else:
    -                return obj
    -                
    -        return dict((k,toItem(v)) for k,v in item_fn())
    -
    -    def copy( self ):
    -        """
    -        Returns a new copy of a C{ParseResults} object.
    -        """
    -        ret = ParseResults( self.__toklist )
    -        ret.__tokdict = self.__tokdict.copy()
    -        ret.__parent = self.__parent
    -        ret.__accumNames.update( self.__accumNames )
    -        ret.__name = self.__name
    -        return ret
    -
    -    def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ):
    -        """
    -        (Deprecated) Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.
    -        """
    -        nl = "\n"
    -        out = []
    -        namedItems = dict((v[1],k) for (k,vlist) in self.__tokdict.items()
    -                                                            for v in vlist)
    -        nextLevelIndent = indent + "  "
    -
    -        # collapse out indents if formatting is not desired
    -        if not formatted:
    -            indent = ""
    -            nextLevelIndent = ""
    -            nl = ""
    -
    -        selfTag = None
    -        if doctag is not None:
    -            selfTag = doctag
    -        else:
    -            if self.__name:
    -                selfTag = self.__name
    -
    -        if not selfTag:
    -            if namedItemsOnly:
    -                return ""
    -            else:
    -                selfTag = "ITEM"
    -
    -        out += [ nl, indent, "<", selfTag, ">" ]
    -
    -        for i,res in enumerate(self.__toklist):
    -            if isinstance(res,ParseResults):
    -                if i in namedItems:
    -                    out += [ res.asXML(namedItems[i],
    -                                        namedItemsOnly and doctag is None,
    -                                        nextLevelIndent,
    -                                        formatted)]
    -                else:
    -                    out += [ res.asXML(None,
    -                                        namedItemsOnly and doctag is None,
    -                                        nextLevelIndent,
    -                                        formatted)]
    -            else:
    -                # individual token, see if there is a name for it
    -                resTag = None
    -                if i in namedItems:
    -                    resTag = namedItems[i]
    -                if not resTag:
    -                    if namedItemsOnly:
    -                        continue
    -                    else:
    -                        resTag = "ITEM"
    -                xmlBodyText = _xml_escape(_ustr(res))
    -                out += [ nl, nextLevelIndent, "<", resTag, ">",
    -                                                xmlBodyText,
    -                                                "" ]
    -
    -        out += [ nl, indent, "" ]
    -        return "".join(out)
    -
    -    def __lookup(self,sub):
    -        for k,vlist in self.__tokdict.items():
    -            for v,loc in vlist:
    -                if sub is v:
    -                    return k
    -        return None
    -
    -    def getName(self):
    -        """
    -        Returns the results name for this token expression. Useful when several 
    -        different expressions might match at a particular location.
    -
    -        Example::
    -            integer = Word(nums)
    -            ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
    -            house_number_expr = Suppress('#') + Word(nums, alphanums)
    -            user_data = (Group(house_number_expr)("house_number") 
    -                        | Group(ssn_expr)("ssn")
    -                        | Group(integer)("age"))
    -            user_info = OneOrMore(user_data)
    -            
    -            result = user_info.parseString("22 111-22-3333 #221B")
    -            for item in result:
    -                print(item.getName(), ':', item[0])
    -        prints::
    -            age : 22
    -            ssn : 111-22-3333
    -            house_number : 221B
    -        """
    -        if self.__name:
    -            return self.__name
    -        elif self.__parent:
    -            par = self.__parent()
    -            if par:
    -                return par.__lookup(self)
    -            else:
    -                return None
    -        elif (len(self) == 1 and
    -               len(self.__tokdict) == 1 and
    -               next(iter(self.__tokdict.values()))[0][1] in (0,-1)):
    -            return next(iter(self.__tokdict.keys()))
    -        else:
    -            return None
    -
    -    def dump(self, indent='', depth=0, full=True):
    -        """
    -        Diagnostic method for listing out the contents of a C{ParseResults}.
    -        Accepts an optional C{indent} argument so that this string can be embedded
    -        in a nested display of other data.
    -
    -        Example::
    -            integer = Word(nums)
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    -            
    -            result = date_str.parseString('12/31/1999')
    -            print(result.dump())
    -        prints::
    -            ['12', '/', '31', '/', '1999']
    -            - day: 1999
    -            - month: 31
    -            - year: 12
    -        """
    -        out = []
    -        NL = '\n'
    -        out.append( indent+_ustr(self.asList()) )
    -        if full:
    -            if self.haskeys():
    -                items = sorted((str(k), v) for k,v in self.items())
    -                for k,v in items:
    -                    if out:
    -                        out.append(NL)
    -                    out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
    -                    if isinstance(v,ParseResults):
    -                        if v:
    -                            out.append( v.dump(indent,depth+1) )
    -                        else:
    -                            out.append(_ustr(v))
    -                    else:
    -                        out.append(repr(v))
    -            elif any(isinstance(vv,ParseResults) for vv in self):
    -                v = self
    -                for i,vv in enumerate(v):
    -                    if isinstance(vv,ParseResults):
    -                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),vv.dump(indent,depth+1) ))
    -                    else:
    -                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),_ustr(vv)))
    -            
    -        return "".join(out)
    -
    -    def pprint(self, *args, **kwargs):
    -        """
    -        Pretty-printer for parsed results as a list, using the C{pprint} module.
    -        Accepts additional positional or keyword args as defined for the 
    -        C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})
    -
    -        Example::
    -            ident = Word(alphas, alphanums)
    -            num = Word(nums)
    -            func = Forward()
    -            term = ident | num | Group('(' + func + ')')
    -            func <<= ident + Group(Optional(delimitedList(term)))
    -            result = func.parseString("fna a,b,(fnb c,d,200),100")
    -            result.pprint(width=40)
    -        prints::
    -            ['fna',
    -             ['a',
    -              'b',
    -              ['(', 'fnb', ['c', 'd', '200'], ')'],
    -              '100']]
    -        """
    -        pprint.pprint(self.asList(), *args, **kwargs)
    -
    -    # add support for pickle protocol
    -    def __getstate__(self):
    -        return ( self.__toklist,
    -                 ( self.__tokdict.copy(),
    -                   self.__parent is not None and self.__parent() or None,
    -                   self.__accumNames,
    -                   self.__name ) )
    -
    -    def __setstate__(self,state):
    -        self.__toklist = state[0]
    -        (self.__tokdict,
    -         par,
    -         inAccumNames,
    -         self.__name) = state[1]
    -        self.__accumNames = {}
    -        self.__accumNames.update(inAccumNames)
    -        if par is not None:
    -            self.__parent = wkref(par)
    -        else:
    -            self.__parent = None
    -
    -    def __getnewargs__(self):
    -        return self.__toklist, self.__name, self.__asList, self.__modal
    -
    -    def __dir__(self):
    -        return (dir(type(self)) + list(self.keys()))
    -
    -collections.MutableMapping.register(ParseResults)
    -
    -def col (loc,strg):
    -    """Returns current column within a string, counting newlines as line separators.
    -   The first column is number 1.
    -
    -   Note: the default parsing behavior is to expand tabs in the input string
    -   before starting the parsing process.  See L{I{ParserElement.parseString}} for more information
    -   on parsing strings containing C{}s, and suggested methods to maintain a
    -   consistent view of the parsed string, the parse location, and line and column
    -   positions within the parsed string.
    -   """
    -    s = strg
    -    return 1 if 0} for more information
    -   on parsing strings containing C{}s, and suggested methods to maintain a
    -   consistent view of the parsed string, the parse location, and line and column
    -   positions within the parsed string.
    -   """
    -    return strg.count("\n",0,loc) + 1
    -
    -def line( loc, strg ):
    -    """Returns the line of text containing loc within a string, counting newlines as line separators.
    -       """
    -    lastCR = strg.rfind("\n", 0, loc)
    -    nextCR = strg.find("\n", loc)
    -    if nextCR >= 0:
    -        return strg[lastCR+1:nextCR]
    -    else:
    -        return strg[lastCR+1:]
    -
    -def _defaultStartDebugAction( instring, loc, expr ):
    -    print (("Match " + _ustr(expr) + " at loc " + _ustr(loc) + "(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )))
    -
    -def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ):
    -    print ("Matched " + _ustr(expr) + " -> " + str(toks.asList()))
    -
    -def _defaultExceptionDebugAction( instring, loc, expr, exc ):
    -    print ("Exception raised:" + _ustr(exc))
    -
    -def nullDebugAction(*args):
    -    """'Do-nothing' debug action, to suppress debugging output during parsing."""
    -    pass
    -
    -# Only works on Python 3.x - nonlocal is toxic to Python 2 installs
    -#~ 'decorator to trim function calls to match the arity of the target'
    -#~ def _trim_arity(func, maxargs=3):
    -    #~ if func in singleArgBuiltins:
    -        #~ return lambda s,l,t: func(t)
    -    #~ limit = 0
    -    #~ foundArity = False
    -    #~ def wrapper(*args):
    -        #~ nonlocal limit,foundArity
    -        #~ while 1:
    -            #~ try:
    -                #~ ret = func(*args[limit:])
    -                #~ foundArity = True
    -                #~ return ret
    -            #~ except TypeError:
    -                #~ if limit == maxargs or foundArity:
    -                    #~ raise
    -                #~ limit += 1
    -                #~ continue
    -    #~ return wrapper
    -
    -# this version is Python 2.x-3.x cross-compatible
    -'decorator to trim function calls to match the arity of the target'
    -def _trim_arity(func, maxargs=2):
    -    if func in singleArgBuiltins:
    -        return lambda s,l,t: func(t)
    -    limit = [0]
    -    foundArity = [False]
    -    
    -    # traceback return data structure changed in Py3.5 - normalize back to plain tuples
    -    if system_version[:2] >= (3,5):
    -        def extract_stack(limit=0):
    -            # special handling for Python 3.5.0 - extra deep call stack by 1
    -            offset = -3 if system_version == (3,5,0) else -2
    -            frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset]
    -            return [(frame_summary.filename, frame_summary.lineno)]
    -        def extract_tb(tb, limit=0):
    -            frames = traceback.extract_tb(tb, limit=limit)
    -            frame_summary = frames[-1]
    -            return [(frame_summary.filename, frame_summary.lineno)]
    -    else:
    -        extract_stack = traceback.extract_stack
    -        extract_tb = traceback.extract_tb
    -    
    -    # synthesize what would be returned by traceback.extract_stack at the call to 
    -    # user's parse action 'func', so that we don't incur call penalty at parse time
    -    
    -    LINE_DIFF = 6
    -    # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND 
    -    # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!!
    -    this_line = extract_stack(limit=2)[-1]
    -    pa_call_line_synth = (this_line[0], this_line[1]+LINE_DIFF)
    -
    -    def wrapper(*args):
    -        while 1:
    -            try:
    -                ret = func(*args[limit[0]:])
    -                foundArity[0] = True
    -                return ret
    -            except TypeError:
    -                # re-raise TypeErrors if they did not come from our arity testing
    -                if foundArity[0]:
    -                    raise
    -                else:
    -                    try:
    -                        tb = sys.exc_info()[-1]
    -                        if not extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth:
    -                            raise
    -                    finally:
    -                        del tb
    -
    -                if limit[0] <= maxargs:
    -                    limit[0] += 1
    -                    continue
    -                raise
    -
    -    # copy func name to wrapper for sensible debug output
    -    func_name = ""
    -    try:
    -        func_name = getattr(func, '__name__', 
    -                            getattr(func, '__class__').__name__)
    -    except Exception:
    -        func_name = str(func)
    -    wrapper.__name__ = func_name
    -
    -    return wrapper
    -
    -class ParserElement(object):
    -    """Abstract base level parser element class."""
    -    DEFAULT_WHITE_CHARS = " \n\t\r"
    -    verbose_stacktrace = False
    -
    -    @staticmethod
    -    def setDefaultWhitespaceChars( chars ):
    -        r"""
    -        Overrides the default whitespace chars
    -
    -        Example::
    -            # default whitespace chars are space,  and newline
    -            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']
    -            
    -            # change to just treat newline as significant
    -            ParserElement.setDefaultWhitespaceChars(" \t")
    -            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def']
    -        """
    -        ParserElement.DEFAULT_WHITE_CHARS = chars
    -
    -    @staticmethod
    -    def inlineLiteralsUsing(cls):
    -        """
    -        Set class to be used for inclusion of string literals into a parser.
    -        
    -        Example::
    -            # default literal class used is Literal
    -            integer = Word(nums)
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    -
    -            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    -
    -
    -            # change to Suppress
    -            ParserElement.inlineLiteralsUsing(Suppress)
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    -
    -            date_str.parseString("1999/12/31")  # -> ['1999', '12', '31']
    -        """
    -        ParserElement._literalStringClass = cls
    -
    -    def __init__( self, savelist=False ):
    -        self.parseAction = list()
    -        self.failAction = None
    -        #~ self.name = ""  # don't define self.name, let subclasses try/except upcall
    -        self.strRepr = None
    -        self.resultsName = None
    -        self.saveAsList = savelist
    -        self.skipWhitespace = True
    -        self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    -        self.copyDefaultWhiteChars = True
    -        self.mayReturnEmpty = False # used when checking for left-recursion
    -        self.keepTabs = False
    -        self.ignoreExprs = list()
    -        self.debug = False
    -        self.streamlined = False
    -        self.mayIndexError = True # used to optimize exception handling for subclasses that don't advance parse index
    -        self.errmsg = ""
    -        self.modalResults = True # used to mark results names as modal (report only last) or cumulative (list all)
    -        self.debugActions = ( None, None, None ) #custom debug actions
    -        self.re = None
    -        self.callPreparse = True # used to avoid redundant calls to preParse
    -        self.callDuringTry = False
    -
    -    def copy( self ):
    -        """
    -        Make a copy of this C{ParserElement}.  Useful for defining different parse actions
    -        for the same parsing pattern, using copies of the original parse element.
    -        
    -        Example::
    -            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    -            integerK = integer.copy().addParseAction(lambda toks: toks[0]*1024) + Suppress("K")
    -            integerM = integer.copy().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    -            
    -            print(OneOrMore(integerK | integerM | integer).parseString("5K 100 640K 256M"))
    -        prints::
    -            [5120, 100, 655360, 268435456]
    -        Equivalent form of C{expr.copy()} is just C{expr()}::
    -            integerM = integer().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    -        """
    -        cpy = copy.copy( self )
    -        cpy.parseAction = self.parseAction[:]
    -        cpy.ignoreExprs = self.ignoreExprs[:]
    -        if self.copyDefaultWhiteChars:
    -            cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    -        return cpy
    -
    -    def setName( self, name ):
    -        """
    -        Define name for this expression, makes debugging and exception messages clearer.
    -        
    -        Example::
    -            Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
    -            Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
    -        """
    -        self.name = name
    -        self.errmsg = "Expected " + self.name
    -        if hasattr(self,"exception"):
    -            self.exception.msg = self.errmsg
    -        return self
    -
    -    def setResultsName( self, name, listAllMatches=False ):
    -        """
    -        Define name for referencing matching tokens as a nested attribute
    -        of the returned parse results.
    -        NOTE: this returns a *copy* of the original C{ParserElement} object;
    -        this is so that the client can define a basic element, such as an
    -        integer, and reference it in multiple places with different names.
    -
    -        You can also set results names using the abbreviated syntax,
    -        C{expr("name")} in place of C{expr.setResultsName("name")} - 
    -        see L{I{__call__}<__call__>}.
    -
    -        Example::
    -            date_str = (integer.setResultsName("year") + '/' 
    -                        + integer.setResultsName("month") + '/' 
    -                        + integer.setResultsName("day"))
    -
    -            # equivalent form:
    -            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    -        """
    -        newself = self.copy()
    -        if name.endswith("*"):
    -            name = name[:-1]
    -            listAllMatches=True
    -        newself.resultsName = name
    -        newself.modalResults = not listAllMatches
    -        return newself
    -
    -    def setBreak(self,breakFlag = True):
    -        """Method to invoke the Python pdb debugger when this element is
    -           about to be parsed. Set C{breakFlag} to True to enable, False to
    -           disable.
    -        """
    -        if breakFlag:
    -            _parseMethod = self._parse
    -            def breaker(instring, loc, doActions=True, callPreParse=True):
    -                import pdb
    -                pdb.set_trace()
    -                return _parseMethod( instring, loc, doActions, callPreParse )
    -            breaker._originalParseMethod = _parseMethod
    -            self._parse = breaker
    -        else:
    -            if hasattr(self._parse,"_originalParseMethod"):
    -                self._parse = self._parse._originalParseMethod
    -        return self
    -
    -    def setParseAction( self, *fns, **kwargs ):
    -        """
    -        Define action 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)
    -         - loc = the location of the matching substring
    -         - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object
    -        If the functions in fns modify the tokens, they can return them as the return
    -        value from fn, and the modified list of tokens will replace the original.
    -        Otherwise, fn does not need to return any value.
    -
    -        Optional keyword arguments:
    -         - callDuringTry = (default=C{False}) indicate if parse action should be run during lookaheads and alternate testing
    -
    -        Note: the default parsing behavior is to expand tabs in the input string
    -        before starting the parsing process.  See L{I{parseString}} for more information
    -        on parsing strings containing C{}s, and suggested methods to maintain a
    -        consistent view of the parsed string, the parse location, and line and column
    -        positions within the parsed string.
    -        
    -        Example::
    -            integer = Word(nums)
    -            date_str = integer + '/' + integer + '/' + integer
    -
    -            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    -
    -            # use parse action to convert to ints at parse time
    -            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    -            date_str = integer + '/' + integer + '/' + integer
    -
    -            # note that integer fields are now ints, not strings
    -            date_str.parseString("1999/12/31")  # -> [1999, '/', 12, '/', 31]
    -        """
    -        self.parseAction = list(map(_trim_arity, list(fns)))
    -        self.callDuringTry = kwargs.get("callDuringTry", False)
    -        return self
    -
    -    def addParseAction( self, *fns, **kwargs ):
    -        """
    -        Add parse action to expression's list of parse actions. See L{I{setParseAction}}.
    -        
    -        See examples in L{I{copy}}.
    -        """
    -        self.parseAction += list(map(_trim_arity, list(fns)))
    -        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    -        return self
    -
    -    def addCondition(self, *fns, **kwargs):
    -        """Add a boolean predicate function to expression's list of parse actions. See 
    -        L{I{setParseAction}} for function call signatures. Unlike C{setParseAction}, 
    -        functions passed to C{addCondition} need to return boolean success/fail of the condition.
    -
    -        Optional keyword arguments:
    -         - message = define a custom message to be used in the raised exception
    -         - fatal   = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException
    -         
    -        Example::
    -            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    -            year_int = integer.copy()
    -            year_int.addCondition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
    -            date_str = year_int + '/' + integer + '/' + integer
    -
    -            result = date_str.parseString("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1)
    -        """
    -        msg = kwargs.get("message", "failed user-defined condition")
    -        exc_type = ParseFatalException if kwargs.get("fatal", False) else ParseException
    -        for fn in fns:
    -            def pa(s,l,t):
    -                if not bool(_trim_arity(fn)(s,l,t)):
    -                    raise exc_type(s,l,msg)
    -            self.parseAction.append(pa)
    -        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    -        return self
    -
    -    def setFailAction( self, fn ):
    -        """Define action to perform if parsing fails at this expression.
    -           Fail acton fn is a callable function that takes the arguments
    -           C{fn(s,loc,expr,err)} where:
    -            - s = string being parsed
    -            - loc = location where expression match was attempted and failed
    -            - expr = the parse expression that failed
    -            - err = the exception thrown
    -           The function returns no value.  It may throw C{L{ParseFatalException}}
    -           if it is desired to stop parsing immediately."""
    -        self.failAction = fn
    -        return self
    -
    -    def _skipIgnorables( self, instring, loc ):
    -        exprsFound = True
    -        while exprsFound:
    -            exprsFound = False
    -            for e in self.ignoreExprs:
    -                try:
    -                    while 1:
    -                        loc,dummy = e._parse( instring, loc )
    -                        exprsFound = True
    -                except ParseException:
    -                    pass
    -        return loc
    -
    -    def preParse( self, instring, loc ):
    -        if self.ignoreExprs:
    -            loc = self._skipIgnorables( instring, loc )
    -
    -        if self.skipWhitespace:
    -            wt = self.whiteChars
    -            instrlen = len(instring)
    -            while loc < instrlen and instring[loc] in wt:
    -                loc += 1
    -
    -        return loc
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        return loc, []
    -
    -    def postParse( self, instring, loc, tokenlist ):
    -        return tokenlist
    -
    -    #~ @profile
    -    def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ):
    -        debugging = ( self.debug ) #and doActions )
    -
    -        if debugging or self.failAction:
    -            #~ print ("Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) ))
    -            if (self.debugActions[0] ):
    -                self.debugActions[0]( instring, loc, self )
    -            if callPreParse and self.callPreparse:
    -                preloc = self.preParse( instring, loc )
    -            else:
    -                preloc = loc
    -            tokensStart = preloc
    -            try:
    -                try:
    -                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    -                except IndexError:
    -                    raise ParseException( instring, len(instring), self.errmsg, self )
    -            except ParseBaseException as err:
    -                #~ print ("Exception raised:", err)
    -                if self.debugActions[2]:
    -                    self.debugActions[2]( instring, tokensStart, self, err )
    -                if self.failAction:
    -                    self.failAction( instring, tokensStart, self, err )
    -                raise
    -        else:
    -            if callPreParse and self.callPreparse:
    -                preloc = self.preParse( instring, loc )
    -            else:
    -                preloc = loc
    -            tokensStart = preloc
    -            if self.mayIndexError or loc >= len(instring):
    -                try:
    -                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    -                except IndexError:
    -                    raise ParseException( instring, len(instring), self.errmsg, self )
    -            else:
    -                loc,tokens = self.parseImpl( instring, preloc, doActions )
    -
    -        tokens = self.postParse( instring, loc, tokens )
    -
    -        retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults )
    -        if self.parseAction and (doActions or self.callDuringTry):
    -            if debugging:
    -                try:
    -                    for fn in self.parseAction:
    -                        tokens = fn( instring, tokensStart, retTokens )
    -                        if tokens is not None:
    -                            retTokens = ParseResults( tokens,
    -                                                      self.resultsName,
    -                                                      asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    -                                                      modal=self.modalResults )
    -                except ParseBaseException as err:
    -                    #~ print "Exception raised in user parse action:", err
    -                    if (self.debugActions[2] ):
    -                        self.debugActions[2]( instring, tokensStart, self, err )
    -                    raise
    -            else:
    -                for fn in self.parseAction:
    -                    tokens = fn( instring, tokensStart, retTokens )
    -                    if tokens is not None:
    -                        retTokens = ParseResults( tokens,
    -                                                  self.resultsName,
    -                                                  asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    -                                                  modal=self.modalResults )
    -
    -        if debugging:
    -            #~ print ("Matched",self,"->",retTokens.asList())
    -            if (self.debugActions[1] ):
    -                self.debugActions[1]( instring, tokensStart, loc, self, retTokens )
    -
    -        return loc, retTokens
    -
    -    def tryParse( self, instring, loc ):
    -        try:
    -            return self._parse( instring, loc, doActions=False )[0]
    -        except ParseFatalException:
    -            raise ParseException( instring, loc, self.errmsg, self)
    -    
    -    def canParseNext(self, instring, loc):
    -        try:
    -            self.tryParse(instring, loc)
    -        except (ParseException, IndexError):
    -            return False
    -        else:
    -            return True
    -
    -    class _UnboundedCache(object):
    -        def __init__(self):
    -            cache = {}
    -            self.not_in_cache = not_in_cache = object()
    -
    -            def get(self, key):
    -                return cache.get(key, not_in_cache)
    -
    -            def set(self, key, value):
    -                cache[key] = value
    -
    -            def clear(self):
    -                cache.clear()
    -
    -            self.get = types.MethodType(get, self)
    -            self.set = types.MethodType(set, self)
    -            self.clear = types.MethodType(clear, self)
    -
    -    if _OrderedDict is not None:
    -        class _FifoCache(object):
    -            def __init__(self, size):
    -                self.not_in_cache = not_in_cache = object()
    -
    -                cache = _OrderedDict()
    -
    -                def get(self, key):
    -                    return cache.get(key, not_in_cache)
    -
    -                def set(self, key, value):
    -                    cache[key] = value
    -                    if len(cache) > size:
    -                        cache.popitem(False)
    -
    -                def clear(self):
    -                    cache.clear()
    -
    -                self.get = types.MethodType(get, self)
    -                self.set = types.MethodType(set, self)
    -                self.clear = types.MethodType(clear, self)
    -
    -    else:
    -        class _FifoCache(object):
    -            def __init__(self, size):
    -                self.not_in_cache = not_in_cache = object()
    -
    -                cache = {}
    -                key_fifo = collections.deque([], size)
    -
    -                def get(self, key):
    -                    return cache.get(key, not_in_cache)
    -
    -                def set(self, key, value):
    -                    cache[key] = value
    -                    if len(cache) > size:
    -                        cache.pop(key_fifo.popleft(), None)
    -                    key_fifo.append(key)
    -
    -                def clear(self):
    -                    cache.clear()
    -                    key_fifo.clear()
    -
    -                self.get = types.MethodType(get, self)
    -                self.set = types.MethodType(set, self)
    -                self.clear = types.MethodType(clear, 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
    -    packrat_cache_lock = RLock()
    -    packrat_cache_stats = [0, 0]
    -
    -    # this method gets repeatedly called during backtracking with the same arguments -
    -    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
    -    def _parseCache( self, instring, loc, doActions=True, callPreParse=True ):
    -        HIT, MISS = 0, 1
    -        lookup = (self, instring, loc, callPreParse, doActions)
    -        with ParserElement.packrat_cache_lock:
    -            cache = ParserElement.packrat_cache
    -            value = cache.get(lookup)
    -            if value is cache.not_in_cache:
    -                ParserElement.packrat_cache_stats[MISS] += 1
    -                try:
    -                    value = self._parseNoCache(instring, loc, doActions, callPreParse)
    -                except ParseBaseException as pe:
    -                    # cache a copy of the exception, without the traceback
    -                    cache.set(lookup, pe.__class__(*pe.args))
    -                    raise
    -                else:
    -                    cache.set(lookup, (value[0], value[1].copy()))
    -                    return value
    -            else:
    -                ParserElement.packrat_cache_stats[HIT] += 1
    -                if isinstance(value, Exception):
    -                    raise value
    -                return (value[0], value[1].copy())
    -
    -    _parse = _parseNoCache
    -
    -    @staticmethod
    -    def resetCache():
    -        ParserElement.packrat_cache.clear()
    -        ParserElement.packrat_cache_stats[:] = [0] * len(ParserElement.packrat_cache_stats)
    -
    -    _packratEnabled = False
    -    @staticmethod
    -    def enablePackrat(cache_size_limit=128):
    -        """Enables "packrat" parsing, which adds memoizing to the parsing logic.
    -           Repeated parse attempts at the same string location (which happens
    -           often in many complex grammars) can immediately return a cached value,
    -           instead of re-executing parsing/validating code.  Memoizing is done of
    -           both valid results and parsing exceptions.
    -           
    -           Parameters:
    -            - cache_size_limit - (default=C{128}) - if an integer value is provided
    -              will limit the size of the packrat cache; if None is passed, then
    -              the cache size will be unbounded; if 0 is passed, the cache will
    -              be effectively disabled.
    -            
    -           This speedup may break existing programs that use parse actions that
    -           have side-effects.  For this reason, packrat parsing is disabled when
    -           you first import pyparsing.  To activate the packrat feature, your
    -           program must call the class method C{ParserElement.enablePackrat()}.  If
    -           your program uses C{psyco} to "compile as you go", you must call
    -           C{enablePackrat} before calling C{psyco.full()}.  If you do not do this,
    -           Python will crash.  For best results, call C{enablePackrat()} immediately
    -           after importing pyparsing.
    -           
    -           Example::
    -               import pyparsing
    -               pyparsing.ParserElement.enablePackrat()
    -        """
    -        if not ParserElement._packratEnabled:
    -            ParserElement._packratEnabled = True
    -            if cache_size_limit is None:
    -                ParserElement.packrat_cache = ParserElement._UnboundedCache()
    -            else:
    -                ParserElement.packrat_cache = ParserElement._FifoCache(cache_size_limit)
    -            ParserElement._parse = ParserElement._parseCache
    -
    -    def parseString( self, instring, parseAll=False ):
    -        """
    -        Execute the parse expression with the given string.
    -        This is the main interface to the client code, once the complete
    -        expression has been built.
    -
    -        If you want the grammar to require that the entire input string be
    -        successfully parsed, then set C{parseAll} to True (equivalent to ending
    -        the grammar with C{L{StringEnd()}}).
    -
    -        Note: C{parseString} implicitly calls C{expandtabs()} on the input string,
    -        in order to report proper column numbers in parse actions.
    -        If the input string contains tabs and
    -        the grammar uses parse actions that use the C{loc} argument to index into the
    -        string being parsed, you can ensure you have a consistent view of the input
    -        string by:
    -         - calling C{parseWithTabs} on your grammar before calling C{parseString}
    -           (see L{I{parseWithTabs}})
    -         - define your parse action using the full C{(s,loc,toks)} signature, and
    -           reference the input string using the parse action's C{s} argument
    -         - explictly expand the tabs in your input string before calling
    -           C{parseString}
    -        
    -        Example::
    -            Word('a').parseString('aaaaabaaa')  # -> ['aaaaa']
    -            Word('a').parseString('aaaaabaaa', parseAll=True)  # -> Exception: Expected end of text
    -        """
    -        ParserElement.resetCache()
    -        if not self.streamlined:
    -            self.streamline()
    -            #~ self.saveAsList = True
    -        for e in self.ignoreExprs:
    -            e.streamline()
    -        if not self.keepTabs:
    -            instring = instring.expandtabs()
    -        try:
    -            loc, tokens = self._parse( instring, 0 )
    -            if parseAll:
    -                loc = self.preParse( instring, loc )
    -                se = Empty() + StringEnd()
    -                se._parse( instring, loc )
    -        except ParseBaseException as exc:
    -            if ParserElement.verbose_stacktrace:
    -                raise
    -            else:
    -                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    -                raise exc
    -        else:
    -            return tokens
    -
    -    def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ):
    -        """
    -        Scan the input string for expression matches.  Each match will return the
    -        matching tokens, start location, and end location.  May be called with optional
    -        C{maxMatches} argument, to clip scanning after 'n' matches are found.  If
    -        C{overlap} is specified, then overlapping matches will be reported.
    -
    -        Note that the start and end locations are reported relative to the string
    -        being parsed.  See L{I{parseString}} for more information on parsing
    -        strings with embedded tabs.
    -
    -        Example::
    -            source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
    -            print(source)
    -            for tokens,start,end in Word(alphas).scanString(source):
    -                print(' '*start + '^'*(end-start))
    -                print(' '*start + tokens[0])
    -        
    -        prints::
    -        
    -            sldjf123lsdjjkf345sldkjf879lkjsfd987
    -            ^^^^^
    -            sldjf
    -                    ^^^^^^^
    -                    lsdjjkf
    -                              ^^^^^^
    -                              sldkjf
    -                                       ^^^^^^
    -                                       lkjsfd
    -        """
    -        if not self.streamlined:
    -            self.streamline()
    -        for e in self.ignoreExprs:
    -            e.streamline()
    -
    -        if not self.keepTabs:
    -            instring = _ustr(instring).expandtabs()
    -        instrlen = len(instring)
    -        loc = 0
    -        preparseFn = self.preParse
    -        parseFn = self._parse
    -        ParserElement.resetCache()
    -        matches = 0
    -        try:
    -            while loc <= instrlen and matches < maxMatches:
    -                try:
    -                    preloc = preparseFn( instring, loc )
    -                    nextLoc,tokens = parseFn( instring, preloc, callPreParse=False )
    -                except ParseException:
    -                    loc = preloc+1
    -                else:
    -                    if nextLoc > loc:
    -                        matches += 1
    -                        yield tokens, preloc, nextLoc
    -                        if overlap:
    -                            nextloc = preparseFn( instring, loc )
    -                            if nextloc > loc:
    -                                loc = nextLoc
    -                            else:
    -                                loc += 1
    -                        else:
    -                            loc = nextLoc
    -                    else:
    -                        loc = preloc+1
    -        except ParseBaseException as exc:
    -            if ParserElement.verbose_stacktrace:
    -                raise
    -            else:
    -                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    -                raise exc
    -
    -    def transformString( self, instring ):
    -        """
    -        Extension to C{L{scanString}}, to modify matching text with modified tokens that may
    -        be returned from a parse action.  To use C{transformString}, define a grammar and
    -        attach a parse action to it that modifies the returned token list.
    -        Invoking C{transformString()} on a target string will then scan for matches,
    -        and replace the matched text patterns according to the logic in the parse
    -        action.  C{transformString()} returns the resulting transformed string.
    -        
    -        Example::
    -            wd = Word(alphas)
    -            wd.setParseAction(lambda toks: toks[0].title())
    -            
    -            print(wd.transformString("now is the winter of our discontent made glorious summer by this sun of york."))
    -        Prints::
    -            Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.
    -        """
    -        out = []
    -        lastE = 0
    -        # force preservation of s, to minimize unwanted transformation of string, and to
    -        # keep string locs straight between transformString and scanString
    -        self.keepTabs = True
    -        try:
    -            for t,s,e in self.scanString( instring ):
    -                out.append( instring[lastE:s] )
    -                if t:
    -                    if isinstance(t,ParseResults):
    -                        out += t.asList()
    -                    elif isinstance(t,list):
    -                        out += t
    -                    else:
    -                        out.append(t)
    -                lastE = e
    -            out.append(instring[lastE:])
    -            out = [o for o in out if o]
    -            return "".join(map(_ustr,_flatten(out)))
    -        except ParseBaseException as exc:
    -            if ParserElement.verbose_stacktrace:
    -                raise
    -            else:
    -                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    -                raise exc
    -
    -    def searchString( self, instring, maxMatches=_MAX_INT ):
    -        """
    -        Another extension to C{L{scanString}}, simplifying the access to the tokens found
    -        to match the given parse expression.  May be called with optional
    -        C{maxMatches} argument, to clip searching after 'n' matches are found.
    -        
    -        Example::
    -            # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
    -            cap_word = Word(alphas.upper(), alphas.lower())
    -            
    -            print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity"))
    -        prints::
    -            ['More', 'Iron', 'Lead', 'Gold', 'I']
    -        """
    -        try:
    -            return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
    -        except ParseBaseException as exc:
    -            if ParserElement.verbose_stacktrace:
    -                raise
    -            else:
    -                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    -                raise exc
    -
    -    def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False):
    -        """
    -        Generator method to split a string using the given expression as a separator.
    -        May be called with optional C{maxsplit} argument, to limit the number of splits;
    -        and the optional C{includeSeparators} argument (default=C{False}), if the separating
    -        matching text should be included in the split results.
    -        
    -        Example::        
    -            punc = oneOf(list(".,;:/-!?"))
    -            print(list(punc.split("This, this?, this sentence, is badly punctuated!")))
    -        prints::
    -            ['This', ' this', '', ' this sentence', ' is badly punctuated', '']
    -        """
    -        splits = 0
    -        last = 0
    -        for t,s,e in self.scanString(instring, maxMatches=maxsplit):
    -            yield instring[last:s]
    -            if includeSeparators:
    -                yield t[0]
    -            last = e
    -        yield instring[last:]
    -
    -    def __add__(self, other ):
    -        """
    -        Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
    -        converts them to L{Literal}s by default.
    -        
    -        Example::
    -            greet = Word(alphas) + "," + Word(alphas) + "!"
    -            hello = "Hello, World!"
    -            print (hello, "->", greet.parseString(hello))
    -        Prints::
    -            Hello, World! -> ['Hello', ',', 'World', '!']
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return And( [ self, other ] )
    -
    -    def __radd__(self, other ):
    -        """
    -        Implementation of + operator when left operand is not a C{L{ParserElement}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return other + self
    -
    -    def __sub__(self, other):
    -        """
    -        Implementation of - operator, returns C{L{And}} with error stop
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return And( [ self, And._ErrorStop(), other ] )
    -
    -    def __rsub__(self, other ):
    -        """
    -        Implementation of - operator when left operand is not a C{L{ParserElement}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return other - self
    -
    -    def __mul__(self,other):
    -        """
    -        Implementation of * operator, allows use of C{expr * 3} in place of
    -        C{expr + expr + expr}.  Expressions may also me multiplied by a 2-integer
    -        tuple, similar to C{{min,max}} multipliers in regular expressions.  Tuples
    -        may also include C{None} as in:
    -         - C{expr*(n,None)} or C{expr*(n,)} is equivalent
    -              to C{expr*n + L{ZeroOrMore}(expr)}
    -              (read as "at least n instances of C{expr}")
    -         - C{expr*(None,n)} is equivalent to C{expr*(0,n)}
    -              (read as "0 to n instances of C{expr}")
    -         - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)}
    -         - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)}
    -
    -        Note that C{expr*(None,n)} does not raise an exception if
    -        more than n exprs exist in the input stream; that is,
    -        C{expr*(None,n)} does not enforce a maximum number of expr
    -        occurrences.  If this behavior is desired, then write
    -        C{expr*(None,n) + ~expr}
    -        """
    -        if isinstance(other,int):
    -            minElements, optElements = other,0
    -        elif isinstance(other,tuple):
    -            other = (other + (None, None))[:2]
    -            if other[0] is None:
    -                other = (0, other[1])
    -            if isinstance(other[0],int) and other[1] is None:
    -                if other[0] == 0:
    -                    return ZeroOrMore(self)
    -                if other[0] == 1:
    -                    return OneOrMore(self)
    -                else:
    -                    return self*other[0] + ZeroOrMore(self)
    -            elif isinstance(other[0],int) and isinstance(other[1],int):
    -                minElements, optElements = other
    -                optElements -= minElements
    -            else:
    -                raise TypeError("cannot multiply 'ParserElement' and ('%s','%s') objects", type(other[0]),type(other[1]))
    -        else:
    -            raise TypeError("cannot multiply 'ParserElement' and '%s' objects", type(other))
    -
    -        if minElements < 0:
    -            raise ValueError("cannot multiply ParserElement by negative value")
    -        if optElements < 0:
    -            raise ValueError("second tuple value must be greater or equal to first tuple value")
    -        if minElements == optElements == 0:
    -            raise ValueError("cannot multiply ParserElement by 0 or (0,0)")
    -
    -        if (optElements):
    -            def makeOptionalList(n):
    -                if n>1:
    -                    return Optional(self + makeOptionalList(n-1))
    -                else:
    -                    return Optional(self)
    -            if minElements:
    -                if minElements == 1:
    -                    ret = self + makeOptionalList(optElements)
    -                else:
    -                    ret = And([self]*minElements) + makeOptionalList(optElements)
    -            else:
    -                ret = makeOptionalList(optElements)
    -        else:
    -            if minElements == 1:
    -                ret = self
    -            else:
    -                ret = And([self]*minElements)
    -        return ret
    -
    -    def __rmul__(self, other):
    -        return self.__mul__(other)
    -
    -    def __or__(self, other ):
    -        """
    -        Implementation of | operator - returns C{L{MatchFirst}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return MatchFirst( [ self, other ] )
    -
    -    def __ror__(self, other ):
    -        """
    -        Implementation of | operator when left operand is not a C{L{ParserElement}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return other | self
    -
    -    def __xor__(self, other ):
    -        """
    -        Implementation of ^ operator - returns C{L{Or}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return Or( [ self, other ] )
    -
    -    def __rxor__(self, other ):
    -        """
    -        Implementation of ^ operator when left operand is not a C{L{ParserElement}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return other ^ self
    -
    -    def __and__(self, other ):
    -        """
    -        Implementation of & operator - returns C{L{Each}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return Each( [ self, other ] )
    -
    -    def __rand__(self, other ):
    -        """
    -        Implementation of & operator when left operand is not a C{L{ParserElement}}
    -        """
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        if not isinstance( other, ParserElement ):
    -            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    -                    SyntaxWarning, stacklevel=2)
    -            return None
    -        return other & self
    -
    -    def __invert__( self ):
    -        """
    -        Implementation of ~ operator - returns C{L{NotAny}}
    -        """
    -        return NotAny( self )
    -
    -    def __call__(self, name=None):
    -        """
    -        Shortcut for C{L{setResultsName}}, with C{listAllMatches=False}.
    -        
    -        If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be
    -        passed as C{True}.
    -           
    -        If C{name} is omitted, same as calling C{L{copy}}.
    -
    -        Example::
    -            # these are equivalent
    -            userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno")
    -            userdata = Word(alphas)("name") + Word(nums+"-")("socsecno")             
    -        """
    -        if name is not None:
    -            return self.setResultsName(name)
    -        else:
    -            return self.copy()
    -
    -    def suppress( self ):
    -        """
    -        Suppresses the output of this C{ParserElement}; useful to keep punctuation from
    -        cluttering up returned output.
    -        """
    -        return Suppress( self )
    -
    -    def leaveWhitespace( self ):
    -        """
    -        Disables the skipping of whitespace before matching the characters in the
    -        C{ParserElement}'s defined pattern.  This is normally only used internally by
    -        the pyparsing module, but may be needed in some whitespace-sensitive grammars.
    -        """
    -        self.skipWhitespace = False
    -        return self
    -
    -    def setWhitespaceChars( self, chars ):
    -        """
    -        Overrides the default whitespace chars
    -        """
    -        self.skipWhitespace = True
    -        self.whiteChars = chars
    -        self.copyDefaultWhiteChars = False
    -        return self
    -
    -    def parseWithTabs( self ):
    -        """
    -        Overrides default behavior to expand C{}s to spaces before parsing the input string.
    -        Must be called before C{parseString} when the input grammar contains elements that
    -        match C{} characters.
    -        """
    -        self.keepTabs = True
    -        return self
    -
    -    def ignore( self, other ):
    -        """
    -        Define expression to be ignored (e.g., comments) while doing pattern
    -        matching; may be called repeatedly, to define multiple comment or other
    -        ignorable patterns.
    -        
    -        Example::
    -            patt = OneOrMore(Word(alphas))
    -            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj']
    -            
    -            patt.ignore(cStyleComment)
    -            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd']
    -        """
    -        if isinstance(other, basestring):
    -            other = Suppress(other)
    -
    -        if isinstance( other, Suppress ):
    -            if other not in self.ignoreExprs:
    -                self.ignoreExprs.append(other)
    -        else:
    -            self.ignoreExprs.append( Suppress( other.copy() ) )
    -        return self
    -
    -    def setDebugActions( self, startAction, successAction, exceptionAction ):
    -        """
    -        Enable display of debugging messages while doing pattern matching.
    -        """
    -        self.debugActions = (startAction or _defaultStartDebugAction,
    -                             successAction or _defaultSuccessDebugAction,
    -                             exceptionAction or _defaultExceptionDebugAction)
    -        self.debug = True
    -        return self
    -
    -    def setDebug( self, flag=True ):
    -        """
    -        Enable display of debugging messages while doing pattern matching.
    -        Set C{flag} to True to enable, False to disable.
    -
    -        Example::
    -            wd = Word(alphas).setName("alphaword")
    -            integer = Word(nums).setName("numword")
    -            term = wd | integer
    -            
    -            # turn on debugging for wd
    -            wd.setDebug()
    -
    -            OneOrMore(term).parseString("abc 123 xyz 890")
    -        
    -        prints::
    -            Match alphaword at loc 0(1,1)
    -            Matched alphaword -> ['abc']
    -            Match alphaword at loc 3(1,4)
    -            Exception raised:Expected alphaword (at char 4), (line:1, col:5)
    -            Match alphaword at loc 7(1,8)
    -            Matched alphaword -> ['xyz']
    -            Match alphaword at loc 11(1,12)
    -            Exception raised:Expected alphaword (at char 12), (line:1, col:13)
    -            Match alphaword at loc 15(1,16)
    -            Exception raised:Expected alphaword (at char 15), (line:1, col:16)
    -
    -        The output shown is that produced by the default debug actions - custom debug actions can be
    -        specified using L{setDebugActions}. Prior to attempting
    -        to match the C{wd} expression, the debugging message C{"Match  at loc (,)"}
    -        is shown. Then if the parse succeeds, a C{"Matched"} message is shown, or an C{"Exception raised"}
    -        message is shown. Also note the use of L{setName} to assign a human-readable name to the expression,
    -        which makes debugging and exception messages easier to understand - for instance, the default
    -        name created for the C{Word} expression without calling C{setName} is C{"W:(ABCD...)"}.
    -        """
    -        if flag:
    -            self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction )
    -        else:
    -            self.debug = False
    -        return self
    -
    -    def __str__( self ):
    -        return self.name
    -
    -    def __repr__( self ):
    -        return _ustr(self)
    -
    -    def streamline( self ):
    -        self.streamlined = True
    -        self.strRepr = None
    -        return self
    -
    -    def checkRecursion( self, parseElementList ):
    -        pass
    -
    -    def validate( self, validateTrace=[] ):
    -        """
    -        Check defined expressions for valid structure, check for infinite recursive definitions.
    -        """
    -        self.checkRecursion( [] )
    -
    -    def parseFile( self, file_or_filename, parseAll=False ):
    -        """
    -        Execute the parse expression on the given file or filename.
    -        If a filename is specified (instead of a file object),
    -        the entire file is opened, read, and closed before parsing.
    -        """
    -        try:
    -            file_contents = file_or_filename.read()
    -        except AttributeError:
    -            with open(file_or_filename, "r") as f:
    -                file_contents = f.read()
    -        try:
    -            return self.parseString(file_contents, parseAll)
    -        except ParseBaseException as exc:
    -            if ParserElement.verbose_stacktrace:
    -                raise
    -            else:
    -                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    -                raise exc
    -
    -    def __eq__(self,other):
    -        if isinstance(other, ParserElement):
    -            return self is other or vars(self) == vars(other)
    -        elif isinstance(other, basestring):
    -            return self.matches(other)
    -        else:
    -            return super(ParserElement,self)==other
    -
    -    def __ne__(self,other):
    -        return not (self == other)
    -
    -    def __hash__(self):
    -        return hash(id(self))
    -
    -    def __req__(self,other):
    -        return self == other
    -
    -    def __rne__(self,other):
    -        return not (self == other)
    -
    -    def matches(self, testString, parseAll=True):
    -        """
    -        Method for quick testing of a parser against a test string. Good for simple 
    -        inline microtests of sub expressions while building up larger parser.
    -           
    -        Parameters:
    -         - testString - to test against this expression for a match
    -         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests
    -            
    -        Example::
    -            expr = Word(nums)
    -            assert expr.matches("100")
    -        """
    -        try:
    -            self.parseString(_ustr(testString), parseAll=parseAll)
    -            return True
    -        except ParseBaseException:
    -            return False
    -                
    -    def runTests(self, tests, parseAll=True, comment='#', fullDump=True, printResults=True, failureTests=False):
    -        """
    -        Execute the parse expression on a series of test strings, showing each
    -        test, the parsed results or where the parse failed. Quick and easy way to
    -        run a parse expression against a list of sample strings.
    -           
    -        Parameters:
    -         - tests - a list of separate test strings, or a multiline string of test strings
    -         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests           
    -         - comment - (default=C{'#'}) - expression for indicating embedded comments in the test 
    -              string; pass None to disable comment filtering
    -         - fullDump - (default=C{True}) - dump results as list followed by results names in nested outline;
    -              if False, only dump nested list
    -         - printResults - (default=C{True}) prints test output to stdout
    -         - failureTests - (default=C{False}) indicates if these tests are expected to fail parsing
    -
    -        Returns: a (success, results) tuple, where success indicates that all tests succeeded
    -        (or failed if C{failureTests} is True), and the results contain a list of lines of each 
    -        test's output
    -        
    -        Example::
    -            number_expr = pyparsing_common.number.copy()
    -
    -            result = number_expr.runTests('''
    -                # unsigned integer
    -                100
    -                # negative integer
    -                -100
    -                # float with scientific notation
    -                6.02e23
    -                # integer with scientific notation
    -                1e-12
    -                ''')
    -            print("Success" if result[0] else "Failed!")
    -
    -            result = number_expr.runTests('''
    -                # stray character
    -                100Z
    -                # missing leading digit before '.'
    -                -.100
    -                # too many '.'
    -                3.14.159
    -                ''', failureTests=True)
    -            print("Success" if result[0] else "Failed!")
    -        prints::
    -            # unsigned integer
    -            100
    -            [100]
    -
    -            # negative integer
    -            -100
    -            [-100]
    -
    -            # float with scientific notation
    -            6.02e23
    -            [6.02e+23]
    -
    -            # integer with scientific notation
    -            1e-12
    -            [1e-12]
    -
    -            Success
    -            
    -            # stray character
    -            100Z
    -               ^
    -            FAIL: Expected end of text (at char 3), (line:1, col:4)
    -
    -            # missing leading digit before '.'
    -            -.100
    -            ^
    -            FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)
    -
    -            # too many '.'
    -            3.14.159
    -                ^
    -            FAIL: Expected end of text (at char 4), (line:1, col:5)
    -
    -            Success
    -
    -        Each test string must be on a single line. If you want to test a string that spans multiple
    -        lines, create a test like this::
    -
    -            expr.runTest(r"this is a test\\n of strings that spans \\n 3 lines")
    -        
    -        (Note that this is a raw string literal, you must include the leading 'r'.)
    -        """
    -        if isinstance(tests, basestring):
    -            tests = list(map(str.strip, tests.rstrip().splitlines()))
    -        if isinstance(comment, basestring):
    -            comment = Literal(comment)
    -        allResults = []
    -        comments = []
    -        success = True
    -        for t in tests:
    -            if comment is not None and comment.matches(t, False) or comments and not t:
    -                comments.append(t)
    -                continue
    -            if not t:
    -                continue
    -            out = ['\n'.join(comments), t]
    -            comments = []
    -            try:
    -                t = t.replace(r'\n','\n')
    -                result = self.parseString(t, parseAll=parseAll)
    -                out.append(result.dump(full=fullDump))
    -                success = success and not failureTests
    -            except ParseBaseException as pe:
    -                fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else ""
    -                if '\n' in t:
    -                    out.append(line(pe.loc, t))
    -                    out.append(' '*(col(pe.loc,t)-1) + '^' + fatal)
    -                else:
    -                    out.append(' '*pe.loc + '^' + fatal)
    -                out.append("FAIL: " + str(pe))
    -                success = success and failureTests
    -                result = pe
    -            except Exception as exc:
    -                out.append("FAIL-EXCEPTION: " + str(exc))
    -                success = success and failureTests
    -                result = exc
    -
    -            if printResults:
    -                if fullDump:
    -                    out.append('')
    -                print('\n'.join(out))
    -
    -            allResults.append((t, result))
    -        
    -        return success, allResults
    -
    -        
    -class Token(ParserElement):
    -    """
    -    Abstract C{ParserElement} subclass, for defining atomic matching patterns.
    -    """
    -    def __init__( self ):
    -        super(Token,self).__init__( savelist=False )
    -
    -
    -class Empty(Token):
    -    """
    -    An empty token, will always match.
    -    """
    -    def __init__( self ):
    -        super(Empty,self).__init__()
    -        self.name = "Empty"
    -        self.mayReturnEmpty = True
    -        self.mayIndexError = False
    -
    -
    -class NoMatch(Token):
    -    """
    -    A token that will never match.
    -    """
    -    def __init__( self ):
    -        super(NoMatch,self).__init__()
    -        self.name = "NoMatch"
    -        self.mayReturnEmpty = True
    -        self.mayIndexError = False
    -        self.errmsg = "Unmatchable token"
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -
    -class Literal(Token):
    -    """
    -    Token to exactly match a specified string.
    -    
    -    Example::
    -        Literal('blah').parseString('blah')  # -> ['blah']
    -        Literal('blah').parseString('blahfooblah')  # -> ['blah']
    -        Literal('blah').parseString('bla')  # -> Exception: Expected "blah"
    -    
    -    For case-insensitive matching, use L{CaselessLiteral}.
    -    
    -    For keyword matching (force word break before and after the matched string),
    -    use L{Keyword} or L{CaselessKeyword}.
    -    """
    -    def __init__( self, matchString ):
    -        super(Literal,self).__init__()
    -        self.match = matchString
    -        self.matchLen = len(matchString)
    -        try:
    -            self.firstMatchChar = matchString[0]
    -        except IndexError:
    -            warnings.warn("null string passed to Literal; use Empty() instead",
    -                            SyntaxWarning, stacklevel=2)
    -            self.__class__ = Empty
    -        self.name = '"%s"' % _ustr(self.match)
    -        self.errmsg = "Expected " + self.name
    -        self.mayReturnEmpty = False
    -        self.mayIndexError = False
    -
    -    # Performance tuning: this routine gets called a *lot*
    -    # if this is a single character match string  and the first character matches,
    -    # short-circuit as quickly as possible, and avoid calling startswith
    -    #~ @profile
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if (instring[loc] == self.firstMatchChar and
    -            (self.matchLen==1 or instring.startswith(self.match,loc)) ):
    -            return loc+self.matchLen, self.match
    -        raise ParseException(instring, loc, self.errmsg, self)
    -_L = Literal
    -ParserElement._literalStringClass = Literal
    -
    -class Keyword(Token):
    -    """
    -    Token to exactly match a specified string as a keyword, that is, it must be
    -    immediately followed by a non-keyword character.  Compare with C{L{Literal}}:
    -     - C{Literal("if")} will match the leading C{'if'} in C{'ifAndOnlyIf'}.
    -     - C{Keyword("if")} will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'}
    -    Accepts two optional constructor arguments in addition to the keyword string:
    -     - C{identChars} is a string of characters that would be valid identifier characters,
    -          defaulting to all alphanumerics + "_" and "$"
    -     - C{caseless} allows case-insensitive matching, default is C{False}.
    -       
    -    Example::
    -        Keyword("start").parseString("start")  # -> ['start']
    -        Keyword("start").parseString("starting")  # -> Exception
    -
    -    For case-insensitive matching, use L{CaselessKeyword}.
    -    """
    -    DEFAULT_KEYWORD_CHARS = alphanums+"_$"
    -
    -    def __init__( self, matchString, identChars=None, caseless=False ):
    -        super(Keyword,self).__init__()
    -        if identChars is None:
    -            identChars = Keyword.DEFAULT_KEYWORD_CHARS
    -        self.match = matchString
    -        self.matchLen = len(matchString)
    -        try:
    -            self.firstMatchChar = matchString[0]
    -        except IndexError:
    -            warnings.warn("null string passed to Keyword; use Empty() instead",
    -                            SyntaxWarning, stacklevel=2)
    -        self.name = '"%s"' % self.match
    -        self.errmsg = "Expected " + self.name
    -        self.mayReturnEmpty = False
    -        self.mayIndexError = False
    -        self.caseless = caseless
    -        if caseless:
    -            self.caselessmatch = matchString.upper()
    -            identChars = identChars.upper()
    -        self.identChars = set(identChars)
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if self.caseless:
    -            if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    -                 (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and
    -                 (loc == 0 or instring[loc-1].upper() not in self.identChars) ):
    -                return loc+self.matchLen, self.match
    -        else:
    -            if (instring[loc] == self.firstMatchChar and
    -                (self.matchLen==1 or instring.startswith(self.match,loc)) and
    -                (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and
    -                (loc == 0 or instring[loc-1] not in self.identChars) ):
    -                return loc+self.matchLen, self.match
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -    def copy(self):
    -        c = super(Keyword,self).copy()
    -        c.identChars = Keyword.DEFAULT_KEYWORD_CHARS
    -        return c
    -
    -    @staticmethod
    -    def setDefaultKeywordChars( chars ):
    -        """Overrides the default Keyword chars
    -        """
    -        Keyword.DEFAULT_KEYWORD_CHARS = chars
    -
    -class CaselessLiteral(Literal):
    -    """
    -    Token to match a specified string, ignoring case of letters.
    -    Note: the matched results will always be in the case of the given
    -    match string, NOT the case of the input text.
    -
    -    Example::
    -        OneOrMore(CaselessLiteral("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD']
    -        
    -    (Contrast with example for L{CaselessKeyword}.)
    -    """
    -    def __init__( self, matchString ):
    -        super(CaselessLiteral,self).__init__( matchString.upper() )
    -        # Preserve the defining literal.
    -        self.returnString = matchString
    -        self.name = "'%s'" % self.returnString
    -        self.errmsg = "Expected " + self.name
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if instring[ loc:loc+self.matchLen ].upper() == self.match:
    -            return loc+self.matchLen, self.returnString
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -class CaselessKeyword(Keyword):
    -    """
    -    Caseless version of L{Keyword}.
    -
    -    Example::
    -        OneOrMore(CaselessKeyword("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD']
    -        
    -    (Contrast with example for L{CaselessLiteral}.)
    -    """
    -    def __init__( self, matchString, identChars=None ):
    -        super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True )
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    -             (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ):
    -            return loc+self.matchLen, self.match
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -class CloseMatch(Token):
    -    """
    -    A variation on L{Literal} which matches "close" matches, that is, 
    -    strings with at most 'n' mismatching characters. C{CloseMatch} takes parameters:
    -     - C{match_string} - string to be matched
    -     - C{maxMismatches} - (C{default=1}) maximum number of mismatches allowed to count as a match
    -    
    -    The results from a successful parse will contain the matched text from the input string and the following named results:
    -     - C{mismatches} - a list of the positions within the match_string where mismatches were found
    -     - C{original} - the original match_string used to compare against the input string
    -    
    -    If C{mismatches} is an empty list, then the match was an exact match.
    -    
    -    Example::
    -        patt = CloseMatch("ATCATCGAATGGA")
    -        patt.parseString("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
    -        patt.parseString("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)
    -
    -        # exact match
    -        patt.parseString("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})
    -
    -        # close match allowing up to 2 mismatches
    -        patt = CloseMatch("ATCATCGAATGGA", maxMismatches=2)
    -        patt.parseString("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})
    -    """
    -    def __init__(self, match_string, maxMismatches=1):
    -        super(CloseMatch,self).__init__()
    -        self.name = match_string
    -        self.match_string = match_string
    -        self.maxMismatches = maxMismatches
    -        self.errmsg = "Expected %r (with up to %d mismatches)" % (self.match_string, self.maxMismatches)
    -        self.mayIndexError = False
    -        self.mayReturnEmpty = False
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        start = loc
    -        instrlen = len(instring)
    -        maxloc = start + len(self.match_string)
    -
    -        if maxloc <= instrlen:
    -            match_string = self.match_string
    -            match_stringloc = 0
    -            mismatches = []
    -            maxMismatches = self.maxMismatches
    -
    -            for match_stringloc,s_m in enumerate(zip(instring[loc:maxloc], self.match_string)):
    -                src,mat = s_m
    -                if src != mat:
    -                    mismatches.append(match_stringloc)
    -                    if len(mismatches) > maxMismatches:
    -                        break
    -            else:
    -                loc = match_stringloc + 1
    -                results = ParseResults([instring[start:loc]])
    -                results['original'] = self.match_string
    -                results['mismatches'] = mismatches
    -                return loc, results
    -
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -
    -class Word(Token):
    -    """
    -    Token for matching words composed of allowed character sets.
    -    Defined with string containing all allowed initial characters,
    -    an optional string containing allowed body characters (if omitted,
    -    defaults to the initial character set), and an optional minimum,
    -    maximum, and/or exact length.  The default value for C{min} is 1 (a
    -    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    -    are 0, meaning no maximum or exact length restriction. An optional
    -    C{excludeChars} parameter can list characters that might be found in 
    -    the input C{bodyChars} string; useful to define a word of all printables
    -    except for one or two characters, for instance.
    -    
    -    L{srange} is useful for defining custom character set strings for defining 
    -    C{Word} expressions, using range notation from regular expression character sets.
    -    
    -    A common mistake is to use C{Word} to match a specific literal string, as in 
    -    C{Word("Address")}. Remember that C{Word} uses the string argument to define
    -    I{sets} of matchable characters. This expression would match "Add", "AAA",
    -    "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'.
    -    To match an exact literal string, use L{Literal} or L{Keyword}.
    -
    -    pyparsing includes helper strings for building Words:
    -     - L{alphas}
    -     - L{nums}
    -     - L{alphanums}
    -     - L{hexnums}
    -     - L{alphas8bit} (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.)
    -     - L{punc8bit} (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.)
    -     - L{printables} (any non-whitespace character)
    -
    -    Example::
    -        # a word composed of digits
    -        integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))
    -        
    -        # a word with a leading capital, and zero or more lowercase
    -        capital_word = Word(alphas.upper(), alphas.lower())
    -
    -        # hostnames are alphanumeric, with leading alpha, and '-'
    -        hostname = Word(alphas, alphanums+'-')
    -        
    -        # roman numeral (not a strict parser, accepts invalid mix of characters)
    -        roman = Word("IVXLCDM")
    -        
    -        # any string of non-whitespace characters, except for ','
    -        csv_value = Word(printables, excludeChars=",")
    -    """
    -    def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ):
    -        super(Word,self).__init__()
    -        if excludeChars:
    -            initChars = ''.join(c for c in initChars if c not in excludeChars)
    -            if bodyChars:
    -                bodyChars = ''.join(c for c in bodyChars if c not in excludeChars)
    -        self.initCharsOrig = initChars
    -        self.initChars = set(initChars)
    -        if bodyChars :
    -            self.bodyCharsOrig = bodyChars
    -            self.bodyChars = set(bodyChars)
    -        else:
    -            self.bodyCharsOrig = initChars
    -            self.bodyChars = set(initChars)
    -
    -        self.maxSpecified = max > 0
    -
    -        if min < 1:
    -            raise ValueError("cannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitted")
    -
    -        self.minLen = min
    -
    -        if max > 0:
    -            self.maxLen = max
    -        else:
    -            self.maxLen = _MAX_INT
    -
    -        if exact > 0:
    -            self.maxLen = exact
    -            self.minLen = exact
    -
    -        self.name = _ustr(self)
    -        self.errmsg = "Expected " + self.name
    -        self.mayIndexError = False
    -        self.asKeyword = asKeyword
    -
    -        if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0):
    -            if self.bodyCharsOrig == self.initCharsOrig:
    -                self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig)
    -            elif len(self.initCharsOrig) == 1:
    -                self.reString = "%s[%s]*" % \
    -                                      (re.escape(self.initCharsOrig),
    -                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    -            else:
    -                self.reString = "[%s][%s]*" % \
    -                                      (_escapeRegexRangeChars(self.initCharsOrig),
    -                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    -            if self.asKeyword:
    -                self.reString = r"\b"+self.reString+r"\b"
    -            try:
    -                self.re = re.compile( self.reString )
    -            except Exception:
    -                self.re = None
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if self.re:
    -            result = self.re.match(instring,loc)
    -            if not result:
    -                raise ParseException(instring, loc, self.errmsg, self)
    -
    -            loc = result.end()
    -            return loc, result.group()
    -
    -        if not(instring[ loc ] in self.initChars):
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        start = loc
    -        loc += 1
    -        instrlen = len(instring)
    -        bodychars = self.bodyChars
    -        maxloc = start + self.maxLen
    -        maxloc = min( maxloc, instrlen )
    -        while loc < maxloc and instring[loc] in bodychars:
    -            loc += 1
    -
    -        throwException = False
    -        if loc - start < self.minLen:
    -            throwException = True
    -        if self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
    -            throwException = True
    -        if self.asKeyword:
    -            if (start>0 and instring[start-1] in bodychars) or (loc4:
    -                    return s[:4]+"..."
    -                else:
    -                    return s
    -
    -            if ( self.initCharsOrig != self.bodyCharsOrig ):
    -                self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) )
    -            else:
    -                self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig)
    -
    -        return self.strRepr
    -
    -
    -class Regex(Token):
    -    """
    -    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...)}), these will be preserved as 
    -    named parse results.
    -
    -    Example::
    -        realnum = Regex(r"[+-]?\d+\.\d*")
    -        date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)')
    -        # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
    -        roman = Regex(r"M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")
    -    """
    -    compiledREtype = type(re.compile("[A-Z]"))
    -    def __init__( self, pattern, flags=0):
    -        """The parameters C{pattern} and C{flags} are passed to the C{re.compile()} function as-is. See the Python C{re} module for an explanation of the acceptable patterns and flags."""
    -        super(Regex,self).__init__()
    -
    -        if isinstance(pattern, basestring):
    -            if not pattern:
    -                warnings.warn("null string passed to Regex; use Empty() instead",
    -                        SyntaxWarning, stacklevel=2)
    -
    -            self.pattern = pattern
    -            self.flags = flags
    -
    -            try:
    -                self.re = re.compile(self.pattern, self.flags)
    -                self.reString = self.pattern
    -            except sre_constants.error:
    -                warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
    -                    SyntaxWarning, stacklevel=2)
    -                raise
    -
    -        elif isinstance(pattern, Regex.compiledREtype):
    -            self.re = pattern
    -            self.pattern = \
    -            self.reString = str(pattern)
    -            self.flags = flags
    -            
    -        else:
    -            raise ValueError("Regex may only be constructed with a string or a compiled RE object")
    -
    -        self.name = _ustr(self)
    -        self.errmsg = "Expected " + self.name
    -        self.mayIndexError = False
    -        self.mayReturnEmpty = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        result = self.re.match(instring,loc)
    -        if not result:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        loc = result.end()
    -        d = result.groupdict()
    -        ret = ParseResults(result.group())
    -        if d:
    -            for k in d:
    -                ret[k] = d[k]
    -        return loc,ret
    -
    -    def __str__( self ):
    -        try:
    -            return super(Regex,self).__str__()
    -        except Exception:
    -            pass
    -
    -        if self.strRepr is None:
    -            self.strRepr = "Re:(%s)" % repr(self.pattern)
    -
    -        return self.strRepr
    -
    -
    -class QuotedString(Token):
    -    r"""
    -    Token for matching strings that are delimited by quoting characters.
    -    
    -    Defined with the following parameters:
    -        - quoteChar - string of one or more characters defining the quote delimiting string
    -        - escChar - character to escape quotes, typically backslash (default=C{None})
    -        - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=C{None})
    -        - multiline - boolean indicating whether quotes can span multiple lines (default=C{False})
    -        - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True})
    -        - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar)
    -        - convertWhitespaceEscapes - convert escaped whitespace (C{'\t'}, C{'\n'}, etc.) to actual whitespace (default=C{True})
    -
    -    Example::
    -        qs = QuotedString('"')
    -        print(qs.searchString('lsjdf "This is the quote" sldjf'))
    -        complex_qs = QuotedString('{{', endQuoteChar='}}')
    -        print(complex_qs.searchString('lsjdf {{This is the "quote"}} sldjf'))
    -        sql_qs = QuotedString('"', escQuote='""')
    -        print(sql_qs.searchString('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))
    -    prints::
    -        [['This is the quote']]
    -        [['This is the "quote"']]
    -        [['This is the quote with "embedded" quotes']]
    -    """
    -    def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None, convertWhitespaceEscapes=True):
    -        super(QuotedString,self).__init__()
    -
    -        # remove white space from quote chars - wont work anyway
    -        quoteChar = quoteChar.strip()
    -        if not quoteChar:
    -            warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    -            raise SyntaxError()
    -
    -        if endQuoteChar is None:
    -            endQuoteChar = quoteChar
    -        else:
    -            endQuoteChar = endQuoteChar.strip()
    -            if not endQuoteChar:
    -                warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    -                raise SyntaxError()
    -
    -        self.quoteChar = quoteChar
    -        self.quoteCharLen = len(quoteChar)
    -        self.firstQuoteChar = quoteChar[0]
    -        self.endQuoteChar = endQuoteChar
    -        self.endQuoteCharLen = len(endQuoteChar)
    -        self.escChar = escChar
    -        self.escQuote = escQuote
    -        self.unquoteResults = unquoteResults
    -        self.convertWhitespaceEscapes = convertWhitespaceEscapes
    -
    -        if multiline:
    -            self.flags = re.MULTILINE | re.DOTALL
    -            self.pattern = r'%s(?:[^%s%s]' % \
    -                ( re.escape(self.quoteChar),
    -                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    -                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    -        else:
    -            self.flags = 0
    -            self.pattern = r'%s(?:[^%s\n\r%s]' % \
    -                ( re.escape(self.quoteChar),
    -                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    -                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    -        if len(self.endQuoteChar) > 1:
    -            self.pattern += (
    -                '|(?:' + ')|(?:'.join("%s[^%s]" % (re.escape(self.endQuoteChar[:i]),
    -                                               _escapeRegexRangeChars(self.endQuoteChar[i]))
    -                                    for i in range(len(self.endQuoteChar)-1,0,-1)) + ')'
    -                )
    -        if escQuote:
    -            self.pattern += (r'|(?:%s)' % re.escape(escQuote))
    -        if escChar:
    -            self.pattern += (r'|(?:%s.)' % re.escape(escChar))
    -            self.escCharReplacePattern = re.escape(self.escChar)+"(.)"
    -        self.pattern += (r')*%s' % re.escape(self.endQuoteChar))
    -
    -        try:
    -            self.re = re.compile(self.pattern, self.flags)
    -            self.reString = self.pattern
    -        except sre_constants.error:
    -            warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
    -                SyntaxWarning, stacklevel=2)
    -            raise
    -
    -        self.name = _ustr(self)
    -        self.errmsg = "Expected " + self.name
    -        self.mayIndexError = False
    -        self.mayReturnEmpty = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None
    -        if not result:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        loc = result.end()
    -        ret = result.group()
    -
    -        if self.unquoteResults:
    -
    -            # strip off quotes
    -            ret = ret[self.quoteCharLen:-self.endQuoteCharLen]
    -
    -            if isinstance(ret,basestring):
    -                # replace escaped whitespace
    -                if '\\' in ret and self.convertWhitespaceEscapes:
    -                    ws_map = {
    -                        r'\t' : '\t',
    -                        r'\n' : '\n',
    -                        r'\f' : '\f',
    -                        r'\r' : '\r',
    -                    }
    -                    for wslit,wschar in ws_map.items():
    -                        ret = ret.replace(wslit, wschar)
    -
    -                # replace escaped characters
    -                if self.escChar:
    -                    ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
    -
    -                # replace escaped quotes
    -                if self.escQuote:
    -                    ret = ret.replace(self.escQuote, self.endQuoteChar)
    -
    -        return loc, ret
    -
    -    def __str__( self ):
    -        try:
    -            return super(QuotedString,self).__str__()
    -        except Exception:
    -            pass
    -
    -        if self.strRepr is None:
    -            self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar)
    -
    -        return self.strRepr
    -
    -
    -class CharsNotIn(Token):
    -    """
    -    Token for matching words composed of characters I{not} in a given set (will
    -    include whitespace in matched characters if not listed in the provided exclusion set - see example).
    -    Defined with string containing all disallowed characters, and an optional
    -    minimum, maximum, and/or exact length.  The default value for C{min} is 1 (a
    -    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    -    are 0, meaning no maximum or exact length restriction.
    -
    -    Example::
    -        # define a comma-separated-value as anything that is not a ','
    -        csv_value = CharsNotIn(',')
    -        print(delimitedList(csv_value).parseString("dkls,lsdkjf,s12 34,@!#,213"))
    -    prints::
    -        ['dkls', 'lsdkjf', 's12 34', '@!#', '213']
    -    """
    -    def __init__( self, notChars, min=1, max=0, exact=0 ):
    -        super(CharsNotIn,self).__init__()
    -        self.skipWhitespace = False
    -        self.notChars = notChars
    -
    -        if min < 1:
    -            raise ValueError("cannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permitted")
    -
    -        self.minLen = min
    -
    -        if max > 0:
    -            self.maxLen = max
    -        else:
    -            self.maxLen = _MAX_INT
    -
    -        if exact > 0:
    -            self.maxLen = exact
    -            self.minLen = exact
    -
    -        self.name = _ustr(self)
    -        self.errmsg = "Expected " + self.name
    -        self.mayReturnEmpty = ( self.minLen == 0 )
    -        self.mayIndexError = False
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if instring[loc] in self.notChars:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        start = loc
    -        loc += 1
    -        notchars = self.notChars
    -        maxlen = min( start+self.maxLen, len(instring) )
    -        while loc < maxlen and \
    -              (instring[loc] not in notchars):
    -            loc += 1
    -
    -        if loc - start < self.minLen:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        return loc, instring[start:loc]
    -
    -    def __str__( self ):
    -        try:
    -            return super(CharsNotIn, self).__str__()
    -        except Exception:
    -            pass
    -
    -        if self.strRepr is None:
    -            if len(self.notChars) > 4:
    -                self.strRepr = "!W:(%s...)" % self.notChars[:4]
    -            else:
    -                self.strRepr = "!W:(%s)" % self.notChars
    -
    -        return self.strRepr
    -
    -class White(Token):
    -    """
    -    Special matching class for matching whitespace.  Normally, whitespace is ignored
    -    by pyparsing grammars.  This class is included when some whitespace structures
    -    are significant.  Define with a string containing the whitespace characters to be
    -    matched; default is C{" \\t\\r\\n"}.  Also takes optional C{min}, C{max}, and C{exact} arguments,
    -    as defined for the C{L{Word}} class.
    -    """
    -    whiteStrs = {
    -        " " : "",
    -        "\t": "",
    -        "\n": "",
    -        "\r": "",
    -        "\f": "",
    -        }
    -    def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0):
    -        super(White,self).__init__()
    -        self.matchWhite = ws
    -        self.setWhitespaceChars( "".join(c for c in self.whiteChars if c not in self.matchWhite) )
    -        #~ self.leaveWhitespace()
    -        self.name = ("".join(White.whiteStrs[c] for c in self.matchWhite))
    -        self.mayReturnEmpty = True
    -        self.errmsg = "Expected " + self.name
    -
    -        self.minLen = min
    -
    -        if max > 0:
    -            self.maxLen = max
    -        else:
    -            self.maxLen = _MAX_INT
    -
    -        if exact > 0:
    -            self.maxLen = exact
    -            self.minLen = exact
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if not(instring[ loc ] in self.matchWhite):
    -            raise ParseException(instring, loc, self.errmsg, self)
    -        start = loc
    -        loc += 1
    -        maxloc = start + self.maxLen
    -        maxloc = min( maxloc, len(instring) )
    -        while loc < maxloc and instring[loc] in self.matchWhite:
    -            loc += 1
    -
    -        if loc - start < self.minLen:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        return loc, instring[start:loc]
    -
    -
    -class _PositionToken(Token):
    -    def __init__( self ):
    -        super(_PositionToken,self).__init__()
    -        self.name=self.__class__.__name__
    -        self.mayReturnEmpty = True
    -        self.mayIndexError = False
    -
    -class GoToColumn(_PositionToken):
    -    """
    -    Token to advance to a specific column of input text; useful for tabular report scraping.
    -    """
    -    def __init__( self, colno ):
    -        super(GoToColumn,self).__init__()
    -        self.col = colno
    -
    -    def preParse( self, instring, loc ):
    -        if col(loc,instring) != self.col:
    -            instrlen = len(instring)
    -            if self.ignoreExprs:
    -                loc = self._skipIgnorables( instring, loc )
    -            while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col :
    -                loc += 1
    -        return loc
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        thiscol = col( loc, instring )
    -        if thiscol > self.col:
    -            raise ParseException( instring, loc, "Text not in expected column", self )
    -        newloc = loc + self.col - thiscol
    -        ret = instring[ loc: newloc ]
    -        return newloc, ret
    -
    -
    -class LineStart(_PositionToken):
    -    """
    -    Matches if current position is at the beginning of a line within the parse string
    -    
    -    Example::
    -    
    -        test = '''\
    -        AAA this line
    -        AAA and this line
    -          AAA but not this one
    -        B AAA and definitely not this one
    -        '''
    -
    -        for t in (LineStart() + 'AAA' + restOfLine).searchString(test):
    -            print(t)
    -    
    -    Prints::
    -        ['AAA', ' this line']
    -        ['AAA', ' and this line']    
    -
    -    """
    -    def __init__( self ):
    -        super(LineStart,self).__init__()
    -        self.errmsg = "Expected start of line"
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if col(loc, instring) == 1:
    -            return loc, []
    -        raise ParseException(instring, loc, self.errmsg, self)
    -
    -class LineEnd(_PositionToken):
    -    """
    -    Matches if current position is at the end of a line within the parse string
    -    """
    -    def __init__( self ):
    -        super(LineEnd,self).__init__()
    -        self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") )
    -        self.errmsg = "Expected end of line"
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if loc len(instring):
    -            return loc, []
    -        else:
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -class WordStart(_PositionToken):
    -    """
    -    Matches if the current position is at the beginning of a Word, and
    -    is not preceded by any character in a given set of C{wordChars}
    -    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    -    use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of
    -    the string being parsed, or at the beginning of a line.
    -    """
    -    def __init__(self, wordChars = printables):
    -        super(WordStart,self).__init__()
    -        self.wordChars = set(wordChars)
    -        self.errmsg = "Not at the start of a word"
    -
    -    def parseImpl(self, instring, loc, doActions=True ):
    -        if loc != 0:
    -            if (instring[loc-1] in self.wordChars or
    -                instring[loc] not in self.wordChars):
    -                raise ParseException(instring, loc, self.errmsg, self)
    -        return loc, []
    -
    -class WordEnd(_PositionToken):
    -    """
    -    Matches if the current position is at the end of a Word, and
    -    is not followed by any character in a given set of C{wordChars}
    -    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    -    use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of
    -    the string being parsed, or at the end of a line.
    -    """
    -    def __init__(self, wordChars = printables):
    -        super(WordEnd,self).__init__()
    -        self.wordChars = set(wordChars)
    -        self.skipWhitespace = False
    -        self.errmsg = "Not at the end of a word"
    -
    -    def parseImpl(self, instring, loc, doActions=True ):
    -        instrlen = len(instring)
    -        if instrlen>0 and loc maxExcLoc:
    -                    maxException = err
    -                    maxExcLoc = err.loc
    -            except IndexError:
    -                if len(instring) > maxExcLoc:
    -                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    -                    maxExcLoc = len(instring)
    -            else:
    -                # save match among all matches, to retry longest to shortest
    -                matches.append((loc2, e))
    -
    -        if matches:
    -            matches.sort(key=lambda x: -x[0])
    -            for _,e in matches:
    -                try:
    -                    return e._parse( instring, loc, doActions )
    -                except ParseException as err:
    -                    err.__traceback__ = None
    -                    if err.loc > maxExcLoc:
    -                        maxException = err
    -                        maxExcLoc = err.loc
    -
    -        if maxException is not None:
    -            maxException.msg = self.errmsg
    -            raise maxException
    -        else:
    -            raise ParseException(instring, loc, "no defined alternatives to match", self)
    -
    -
    -    def __ixor__(self, other ):
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        return self.append( other ) #Or( [ self, other ] )
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "{" + " ^ ".join(_ustr(e) for e in self.exprs) + "}"
    -
    -        return self.strRepr
    -
    -    def checkRecursion( self, parseElementList ):
    -        subRecCheckList = parseElementList[:] + [ self ]
    -        for e in self.exprs:
    -            e.checkRecursion( subRecCheckList )
    -
    -
    -class MatchFirst(ParseExpression):
    -    """
    -    Requires that at least one C{ParseExpression} is found.
    -    If two expressions match, the first one listed is the one that will match.
    -    May be constructed using the C{'|'} operator.
    -
    -    Example::
    -        # construct MatchFirst using '|' operator
    -        
    -        # watch the order of expressions to match
    -        number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
    -        print(number.searchString("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]
    -
    -        # put more selective expression first
    -        number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
    -        print(number.searchString("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]
    -    """
    -    def __init__( self, exprs, savelist = False ):
    -        super(MatchFirst,self).__init__(exprs, savelist)
    -        if self.exprs:
    -            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
    -        else:
    -            self.mayReturnEmpty = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        maxExcLoc = -1
    -        maxException = None
    -        for e in self.exprs:
    -            try:
    -                ret = e._parse( instring, loc, doActions )
    -                return ret
    -            except ParseException as err:
    -                if err.loc > maxExcLoc:
    -                    maxException = err
    -                    maxExcLoc = err.loc
    -            except IndexError:
    -                if len(instring) > maxExcLoc:
    -                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    -                    maxExcLoc = len(instring)
    -
    -        # only got here if no expression matched, raise exception for match that made it the furthest
    -        else:
    -            if maxException is not None:
    -                maxException.msg = self.errmsg
    -                raise maxException
    -            else:
    -                raise ParseException(instring, loc, "no defined alternatives to match", self)
    -
    -    def __ior__(self, other ):
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass( other )
    -        return self.append( other ) #MatchFirst( [ self, other ] )
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "{" + " | ".join(_ustr(e) for e in self.exprs) + "}"
    -
    -        return self.strRepr
    -
    -    def checkRecursion( self, parseElementList ):
    -        subRecCheckList = parseElementList[:] + [ self ]
    -        for e in self.exprs:
    -            e.checkRecursion( subRecCheckList )
    -
    -
    -class Each(ParseExpression):
    -    """
    -    Requires all given C{ParseExpression}s to be found, but in any order.
    -    Expressions may be separated by whitespace.
    -    May be constructed using the C{'&'} operator.
    -
    -    Example::
    -        color = oneOf("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
    -        shape_type = oneOf("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
    -        integer = Word(nums)
    -        shape_attr = "shape:" + shape_type("shape")
    -        posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
    -        color_attr = "color:" + color("color")
    -        size_attr = "size:" + integer("size")
    -
    -        # use Each (using operator '&') to accept attributes in any order 
    -        # (shape and posn are required, color and size are optional)
    -        shape_spec = shape_attr & posn_attr & Optional(color_attr) & Optional(size_attr)
    -
    -        shape_spec.runTests('''
    -            shape: SQUARE color: BLACK posn: 100, 120
    -            shape: CIRCLE size: 50 color: BLUE posn: 50,80
    -            color:GREEN size:20 shape:TRIANGLE posn:20,40
    -            '''
    -            )
    -    prints::
    -        shape: SQUARE color: BLACK posn: 100, 120
    -        ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
    -        - color: BLACK
    -        - posn: ['100', ',', '120']
    -          - x: 100
    -          - y: 120
    -        - shape: SQUARE
    -
    -
    -        shape: CIRCLE size: 50 color: BLUE posn: 50,80
    -        ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
    -        - color: BLUE
    -        - posn: ['50', ',', '80']
    -          - x: 50
    -          - y: 80
    -        - shape: CIRCLE
    -        - size: 50
    -
    -
    -        color: GREEN size: 20 shape: TRIANGLE posn: 20,40
    -        ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
    -        - color: GREEN
    -        - posn: ['20', ',', '40']
    -          - x: 20
    -          - y: 40
    -        - shape: TRIANGLE
    -        - size: 20
    -    """
    -    def __init__( self, exprs, savelist = True ):
    -        super(Each,self).__init__(exprs, savelist)
    -        self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
    -        self.skipWhitespace = True
    -        self.initExprGroups = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if self.initExprGroups:
    -            self.opt1map = dict((id(e.expr),e) for e in self.exprs if isinstance(e,Optional))
    -            opt1 = [ e.expr for e in self.exprs if isinstance(e,Optional) ]
    -            opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e,Optional)]
    -            self.optionals = opt1 + opt2
    -            self.multioptionals = [ e.expr for e in self.exprs if isinstance(e,ZeroOrMore) ]
    -            self.multirequired = [ e.expr for e in self.exprs if isinstance(e,OneOrMore) ]
    -            self.required = [ e for e in self.exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ]
    -            self.required += self.multirequired
    -            self.initExprGroups = False
    -        tmpLoc = loc
    -        tmpReqd = self.required[:]
    -        tmpOpt  = self.optionals[:]
    -        matchOrder = []
    -
    -        keepMatching = True
    -        while keepMatching:
    -            tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired
    -            failed = []
    -            for e in tmpExprs:
    -                try:
    -                    tmpLoc = e.tryParse( instring, tmpLoc )
    -                except ParseException:
    -                    failed.append(e)
    -                else:
    -                    matchOrder.append(self.opt1map.get(id(e),e))
    -                    if e in tmpReqd:
    -                        tmpReqd.remove(e)
    -                    elif e in tmpOpt:
    -                        tmpOpt.remove(e)
    -            if len(failed) == len(tmpExprs):
    -                keepMatching = False
    -
    -        if tmpReqd:
    -            missing = ", ".join(_ustr(e) for e in tmpReqd)
    -            raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing )
    -
    -        # add any unmatched Optionals, in case they have default values defined
    -        matchOrder += [e for e in self.exprs if isinstance(e,Optional) and e.expr in tmpOpt]
    -
    -        resultlist = []
    -        for e in matchOrder:
    -            loc,results = e._parse(instring,loc,doActions)
    -            resultlist.append(results)
    -
    -        finalResults = sum(resultlist, ParseResults([]))
    -        return loc, finalResults
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "{" + " & ".join(_ustr(e) for e in self.exprs) + "}"
    -
    -        return self.strRepr
    -
    -    def checkRecursion( self, parseElementList ):
    -        subRecCheckList = parseElementList[:] + [ self ]
    -        for e in self.exprs:
    -            e.checkRecursion( subRecCheckList )
    -
    -
    -class ParseElementEnhance(ParserElement):
    -    """
    -    Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.
    -    """
    -    def __init__( self, expr, savelist=False ):
    -        super(ParseElementEnhance,self).__init__(savelist)
    -        if isinstance( expr, basestring ):
    -            if issubclass(ParserElement._literalStringClass, Token):
    -                expr = ParserElement._literalStringClass(expr)
    -            else:
    -                expr = ParserElement._literalStringClass(Literal(expr))
    -        self.expr = expr
    -        self.strRepr = None
    -        if expr is not None:
    -            self.mayIndexError = expr.mayIndexError
    -            self.mayReturnEmpty = expr.mayReturnEmpty
    -            self.setWhitespaceChars( expr.whiteChars )
    -            self.skipWhitespace = expr.skipWhitespace
    -            self.saveAsList = expr.saveAsList
    -            self.callPreparse = expr.callPreparse
    -            self.ignoreExprs.extend(expr.ignoreExprs)
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if self.expr is not None:
    -            return self.expr._parse( instring, loc, doActions, callPreParse=False )
    -        else:
    -            raise ParseException("",loc,self.errmsg,self)
    -
    -    def leaveWhitespace( self ):
    -        self.skipWhitespace = False
    -        self.expr = self.expr.copy()
    -        if self.expr is not None:
    -            self.expr.leaveWhitespace()
    -        return self
    -
    -    def ignore( self, other ):
    -        if isinstance( other, Suppress ):
    -            if other not in self.ignoreExprs:
    -                super( ParseElementEnhance, self).ignore( other )
    -                if self.expr is not None:
    -                    self.expr.ignore( self.ignoreExprs[-1] )
    -        else:
    -            super( ParseElementEnhance, self).ignore( other )
    -            if self.expr is not None:
    -                self.expr.ignore( self.ignoreExprs[-1] )
    -        return self
    -
    -    def streamline( self ):
    -        super(ParseElementEnhance,self).streamline()
    -        if self.expr is not None:
    -            self.expr.streamline()
    -        return self
    -
    -    def checkRecursion( self, parseElementList ):
    -        if self in parseElementList:
    -            raise RecursiveGrammarException( parseElementList+[self] )
    -        subRecCheckList = parseElementList[:] + [ self ]
    -        if self.expr is not None:
    -            self.expr.checkRecursion( subRecCheckList )
    -
    -    def validate( self, validateTrace=[] ):
    -        tmp = validateTrace[:]+[self]
    -        if self.expr is not None:
    -            self.expr.validate(tmp)
    -        self.checkRecursion( [] )
    -
    -    def __str__( self ):
    -        try:
    -            return super(ParseElementEnhance,self).__str__()
    -        except Exception:
    -            pass
    -
    -        if self.strRepr is None and self.expr is not None:
    -            self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )
    -        return self.strRepr
    -
    -
    -class FollowedBy(ParseElementEnhance):
    -    """
    -    Lookahead matching of the given parse expression.  C{FollowedBy}
    -    does I{not} advance the parsing position within the input string, it only
    -    verifies that the specified parse expression matches at the current
    -    position.  C{FollowedBy} always returns a null token list.
    -
    -    Example::
    -        # use FollowedBy to match a label only if it is followed by a ':'
    -        data_word = Word(alphas)
    -        label = data_word + FollowedBy(':')
    -        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    -        
    -        OneOrMore(attr_expr).parseString("shape: SQUARE color: BLACK posn: upper left").pprint()
    -    prints::
    -        [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]
    -    """
    -    def __init__( self, expr ):
    -        super(FollowedBy,self).__init__(expr)
    -        self.mayReturnEmpty = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        self.expr.tryParse( instring, loc )
    -        return loc, []
    -
    -
    -class NotAny(ParseElementEnhance):
    -    """
    -    Lookahead to disallow matching with the given parse expression.  C{NotAny}
    -    does I{not} advance the parsing position within the input string, it only
    -    verifies that the specified parse expression does I{not} match at the current
    -    position.  Also, C{NotAny} does I{not} skip over leading whitespace. C{NotAny}
    -    always returns a null token list.  May be constructed using the '~' operator.
    -
    -    Example::
    -        
    -    """
    -    def __init__( self, expr ):
    -        super(NotAny,self).__init__(expr)
    -        #~ self.leaveWhitespace()
    -        self.skipWhitespace = False  # do NOT use self.leaveWhitespace(), don't want to propagate to exprs
    -        self.mayReturnEmpty = True
    -        self.errmsg = "Found unwanted token, "+_ustr(self.expr)
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        if self.expr.canParseNext(instring, loc):
    -            raise ParseException(instring, loc, self.errmsg, self)
    -        return loc, []
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "~{" + _ustr(self.expr) + "}"
    -
    -        return self.strRepr
    -
    -class _MultipleMatch(ParseElementEnhance):
    -    def __init__( self, expr, stopOn=None):
    -        super(_MultipleMatch, self).__init__(expr)
    -        self.saveAsList = True
    -        ender = stopOn
    -        if isinstance(ender, basestring):
    -            ender = ParserElement._literalStringClass(ender)
    -        self.not_ender = ~ender if ender is not None else None
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        self_expr_parse = self.expr._parse
    -        self_skip_ignorables = self._skipIgnorables
    -        check_ender = self.not_ender is not None
    -        if check_ender:
    -            try_not_ender = self.not_ender.tryParse
    -        
    -        # must be at least one (but first see if we are the stopOn sentinel;
    -        # if so, fail)
    -        if check_ender:
    -            try_not_ender(instring, loc)
    -        loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False )
    -        try:
    -            hasIgnoreExprs = (not not self.ignoreExprs)
    -            while 1:
    -                if check_ender:
    -                    try_not_ender(instring, loc)
    -                if hasIgnoreExprs:
    -                    preloc = self_skip_ignorables( instring, loc )
    -                else:
    -                    preloc = loc
    -                loc, tmptokens = self_expr_parse( instring, preloc, doActions )
    -                if tmptokens or tmptokens.haskeys():
    -                    tokens += tmptokens
    -        except (ParseException,IndexError):
    -            pass
    -
    -        return loc, tokens
    -        
    -class OneOrMore(_MultipleMatch):
    -    """
    -    Repetition of one or more of the given expression.
    -    
    -    Parameters:
    -     - expr - expression that must match one or more times
    -     - stopOn - (default=C{None}) - expression for a terminating sentinel
    -          (only required if the sentinel would ordinarily match the repetition 
    -          expression)          
    -
    -    Example::
    -        data_word = Word(alphas)
    -        label = data_word + FollowedBy(':')
    -        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    -
    -        text = "shape: SQUARE posn: upper left color: BLACK"
    -        OneOrMore(attr_expr).parseString(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]
    -
    -        # use stopOn attribute for OneOrMore to avoid reading label string as part of the data
    -        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    -        OneOrMore(attr_expr).parseString(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]
    -        
    -        # could also be written as
    -        (attr_expr * (1,)).parseString(text).pprint()
    -    """
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "{" + _ustr(self.expr) + "}..."
    -
    -        return self.strRepr
    -
    -class ZeroOrMore(_MultipleMatch):
    -    """
    -    Optional repetition of zero or more of the given expression.
    -    
    -    Parameters:
    -     - expr - expression that must match zero or more times
    -     - stopOn - (default=C{None}) - expression for a terminating sentinel
    -          (only required if the sentinel would ordinarily match the repetition 
    -          expression)          
    -
    -    Example: similar to L{OneOrMore}
    -    """
    -    def __init__( self, expr, stopOn=None):
    -        super(ZeroOrMore,self).__init__(expr, stopOn=stopOn)
    -        self.mayReturnEmpty = True
    -        
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        try:
    -            return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
    -        except (ParseException,IndexError):
    -            return loc, []
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "[" + _ustr(self.expr) + "]..."
    -
    -        return self.strRepr
    -
    -class _NullToken(object):
    -    def __bool__(self):
    -        return False
    -    __nonzero__ = __bool__
    -    def __str__(self):
    -        return ""
    -
    -_optionalNotMatched = _NullToken()
    -class Optional(ParseElementEnhance):
    -    """
    -    Optional matching of the given expression.
    -
    -    Parameters:
    -     - expr - expression that must match zero or more times
    -     - default (optional) - value to be returned if the optional expression is not found.
    -
    -    Example::
    -        # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
    -        zip = Combine(Word(nums, exact=5) + Optional('-' + Word(nums, exact=4)))
    -        zip.runTests('''
    -            # traditional ZIP code
    -            12345
    -            
    -            # ZIP+4 form
    -            12101-0001
    -            
    -            # invalid ZIP
    -            98765-
    -            ''')
    -    prints::
    -        # traditional ZIP code
    -        12345
    -        ['12345']
    -
    -        # ZIP+4 form
    -        12101-0001
    -        ['12101-0001']
    -
    -        # invalid ZIP
    -        98765-
    -             ^
    -        FAIL: Expected end of text (at char 5), (line:1, col:6)
    -    """
    -    def __init__( self, expr, default=_optionalNotMatched ):
    -        super(Optional,self).__init__( expr, savelist=False )
    -        self.saveAsList = self.expr.saveAsList
    -        self.defaultValue = default
    -        self.mayReturnEmpty = True
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        try:
    -            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
    -        except (ParseException,IndexError):
    -            if self.defaultValue is not _optionalNotMatched:
    -                if self.expr.resultsName:
    -                    tokens = ParseResults([ self.defaultValue ])
    -                    tokens[self.expr.resultsName] = self.defaultValue
    -                else:
    -                    tokens = [ self.defaultValue ]
    -            else:
    -                tokens = []
    -        return loc, tokens
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -
    -        if self.strRepr is None:
    -            self.strRepr = "[" + _ustr(self.expr) + "]"
    -
    -        return self.strRepr
    -
    -class SkipTo(ParseElementEnhance):
    -    """
    -    Token for skipping over all undefined text until the matched expression is found.
    -
    -    Parameters:
    -     - expr - target expression marking the end of the data to be skipped
    -     - include - (default=C{False}) if True, the target expression is also parsed 
    -          (the skipped text and target expression are returned as a 2-element list).
    -     - ignore - (default=C{None}) used to define grammars (typically quoted strings and 
    -          comments) that might contain false matches to the target expression
    -     - failOn - (default=C{None}) define expressions that are not allowed to be 
    -          included in the skipped test; if found before the target expression is found, 
    -          the SkipTo is not a match
    -
    -    Example::
    -        report = '''
    -            Outstanding Issues Report - 1 Jan 2000
    -
    -               # | Severity | Description                               |  Days Open
    -            -----+----------+-------------------------------------------+-----------
    -             101 | Critical | Intermittent system crash                 |          6
    -              94 | Cosmetic | Spelling error on Login ('log|n')         |         14
    -              79 | Minor    | System slow when running too many reports |         47
    -            '''
    -        integer = Word(nums)
    -        SEP = Suppress('|')
    -        # use SkipTo to simply match everything up until the next SEP
    -        # - ignore quoted strings, so that a '|' character inside a quoted string does not match
    -        # - parse action will call token.strip() for each matched token, i.e., the description body
    -        string_data = SkipTo(SEP, ignore=quotedString)
    -        string_data.setParseAction(tokenMap(str.strip))
    -        ticket_expr = (integer("issue_num") + SEP 
    -                      + string_data("sev") + SEP 
    -                      + string_data("desc") + SEP 
    -                      + integer("days_open"))
    -        
    -        for tkt in ticket_expr.searchString(report):
    -            print tkt.dump()
    -    prints::
    -        ['101', 'Critical', 'Intermittent system crash', '6']
    -        - days_open: 6
    -        - desc: Intermittent system crash
    -        - issue_num: 101
    -        - sev: Critical
    -        ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
    -        - days_open: 14
    -        - desc: Spelling error on Login ('log|n')
    -        - issue_num: 94
    -        - sev: Cosmetic
    -        ['79', 'Minor', 'System slow when running too many reports', '47']
    -        - days_open: 47
    -        - desc: System slow when running too many reports
    -        - issue_num: 79
    -        - sev: Minor
    -    """
    -    def __init__( self, other, include=False, ignore=None, failOn=None ):
    -        super( SkipTo, self ).__init__( other )
    -        self.ignoreExpr = ignore
    -        self.mayReturnEmpty = True
    -        self.mayIndexError = False
    -        self.includeMatch = include
    -        self.asList = False
    -        if isinstance(failOn, basestring):
    -            self.failOn = ParserElement._literalStringClass(failOn)
    -        else:
    -            self.failOn = failOn
    -        self.errmsg = "No match found for "+_ustr(self.expr)
    -
    -    def parseImpl( self, instring, loc, doActions=True ):
    -        startloc = loc
    -        instrlen = len(instring)
    -        expr = self.expr
    -        expr_parse = self.expr._parse
    -        self_failOn_canParseNext = self.failOn.canParseNext if self.failOn is not None else None
    -        self_ignoreExpr_tryParse = self.ignoreExpr.tryParse if self.ignoreExpr is not None else None
    -        
    -        tmploc = loc
    -        while tmploc <= instrlen:
    -            if self_failOn_canParseNext is not None:
    -                # break if failOn expression matches
    -                if self_failOn_canParseNext(instring, tmploc):
    -                    break
    -                    
    -            if self_ignoreExpr_tryParse is not None:
    -                # advance past ignore expressions
    -                while 1:
    -                    try:
    -                        tmploc = self_ignoreExpr_tryParse(instring, tmploc)
    -                    except ParseBaseException:
    -                        break
    -            
    -            try:
    -                expr_parse(instring, tmploc, doActions=False, callPreParse=False)
    -            except (ParseException, IndexError):
    -                # no match, advance loc in string
    -                tmploc += 1
    -            else:
    -                # matched skipto expr, done
    -                break
    -
    -        else:
    -            # ran off the end of the input string without matching skipto expr, fail
    -            raise ParseException(instring, loc, self.errmsg, self)
    -
    -        # build up return values
    -        loc = tmploc
    -        skiptext = instring[startloc:loc]
    -        skipresult = ParseResults(skiptext)
    -        
    -        if self.includeMatch:
    -            loc, mat = expr_parse(instring,loc,doActions,callPreParse=False)
    -            skipresult += mat
    -
    -        return loc, skipresult
    -
    -class Forward(ParseElementEnhance):
    -    """
    -    Forward declaration of an expression to be defined later -
    -    used for recursive grammars, such as algebraic infix notation.
    -    When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator.
    -
    -    Note: take care when assigning to C{Forward} not to overlook precedence of operators.
    -    Specifically, '|' has a lower precedence than '<<', so that::
    -        fwdExpr << a | b | c
    -    will actually be evaluated as::
    -        (fwdExpr << a) | b | c
    -    thereby leaving b and c out as parseable alternatives.  It is recommended that you
    -    explicitly group the values inserted into the C{Forward}::
    -        fwdExpr << (a | b | c)
    -    Converting to use the '<<=' operator instead will avoid this problem.
    -
    -    See L{ParseResults.pprint} for an example of a recursive parser created using
    -    C{Forward}.
    -    """
    -    def __init__( self, other=None ):
    -        super(Forward,self).__init__( other, savelist=False )
    -
    -    def __lshift__( self, other ):
    -        if isinstance( other, basestring ):
    -            other = ParserElement._literalStringClass(other)
    -        self.expr = other
    -        self.strRepr = None
    -        self.mayIndexError = self.expr.mayIndexError
    -        self.mayReturnEmpty = self.expr.mayReturnEmpty
    -        self.setWhitespaceChars( self.expr.whiteChars )
    -        self.skipWhitespace = self.expr.skipWhitespace
    -        self.saveAsList = self.expr.saveAsList
    -        self.ignoreExprs.extend(self.expr.ignoreExprs)
    -        return self
    -        
    -    def __ilshift__(self, other):
    -        return self << other
    -    
    -    def leaveWhitespace( self ):
    -        self.skipWhitespace = False
    -        return self
    -
    -    def streamline( self ):
    -        if not self.streamlined:
    -            self.streamlined = True
    -            if self.expr is not None:
    -                self.expr.streamline()
    -        return self
    -
    -    def validate( self, validateTrace=[] ):
    -        if self not in validateTrace:
    -            tmp = validateTrace[:]+[self]
    -            if self.expr is not None:
    -                self.expr.validate(tmp)
    -        self.checkRecursion([])
    -
    -    def __str__( self ):
    -        if hasattr(self,"name"):
    -            return self.name
    -        return self.__class__.__name__ + ": ..."
    -
    -        # stubbed out for now - creates awful memory and perf issues
    -        self._revertClass = self.__class__
    -        self.__class__ = _ForwardNoRecurse
    -        try:
    -            if self.expr is not None:
    -                retString = _ustr(self.expr)
    -            else:
    -                retString = "None"
    -        finally:
    -            self.__class__ = self._revertClass
    -        return self.__class__.__name__ + ": " + retString
    -
    -    def copy(self):
    -        if self.expr is not None:
    -            return super(Forward,self).copy()
    -        else:
    -            ret = Forward()
    -            ret <<= self
    -            return ret
    -
    -class _ForwardNoRecurse(Forward):
    -    def __str__( self ):
    -        return "..."
    -
    -class TokenConverter(ParseElementEnhance):
    -    """
    -    Abstract subclass of C{ParseExpression}, for converting parsed results.
    -    """
    -    def __init__( self, expr, savelist=False ):
    -        super(TokenConverter,self).__init__( expr )#, savelist )
    -        self.saveAsList = False
    -
    -class Combine(TokenConverter):
    -    """
    -    Converter to concatenate all matching tokens to a single string.
    -    By default, the matching patterns must also be contiguous in the input string;
    -    this can be disabled by specifying C{'adjacent=False'} in the constructor.
    -
    -    Example::
    -        real = Word(nums) + '.' + Word(nums)
    -        print(real.parseString('3.1416')) # -> ['3', '.', '1416']
    -        # will also erroneously match the following
    -        print(real.parseString('3. 1416')) # -> ['3', '.', '1416']
    -
    -        real = Combine(Word(nums) + '.' + Word(nums))
    -        print(real.parseString('3.1416')) # -> ['3.1416']
    -        # no match when there are internal spaces
    -        print(real.parseString('3. 1416')) # -> Exception: Expected W:(0123...)
    -    """
    -    def __init__( self, expr, joinString="", adjacent=True ):
    -        super(Combine,self).__init__( expr )
    -        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself
    -        if adjacent:
    -            self.leaveWhitespace()
    -        self.adjacent = adjacent
    -        self.skipWhitespace = True
    -        self.joinString = joinString
    -        self.callPreparse = True
    -
    -    def ignore( self, other ):
    -        if self.adjacent:
    -            ParserElement.ignore(self, other)
    -        else:
    -            super( Combine, self).ignore( other )
    -        return self
    -
    -    def postParse( self, instring, loc, tokenlist ):
    -        retToks = tokenlist.copy()
    -        del retToks[:]
    -        retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults)
    -
    -        if self.resultsName and retToks.haskeys():
    -            return [ retToks ]
    -        else:
    -            return retToks
    -
    -class Group(TokenConverter):
    -    """
    -    Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.
    -
    -    Example::
    -        ident = Word(alphas)
    -        num = Word(nums)
    -        term = ident | num
    -        func = ident + Optional(delimitedList(term))
    -        print(func.parseString("fn a,b,100"))  # -> ['fn', 'a', 'b', '100']
    -
    -        func = ident + Group(Optional(delimitedList(term)))
    -        print(func.parseString("fn a,b,100"))  # -> ['fn', ['a', 'b', '100']]
    -    """
    -    def __init__( self, expr ):
    -        super(Group,self).__init__( expr )
    -        self.saveAsList = True
    -
    -    def postParse( self, instring, loc, tokenlist ):
    -        return [ tokenlist ]
    -
    -class Dict(TokenConverter):
    -    """
    -    Converter to return a repetitive expression as a list, but also as a dictionary.
    -    Each element can also be referenced using the first token in the expression as its key.
    -    Useful for tabular report scraping when the first column can be used as a item key.
    -
    -    Example::
    -        data_word = Word(alphas)
    -        label = data_word + FollowedBy(':')
    -        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    -
    -        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    -        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    -        
    -        # print attributes as plain groups
    -        print(OneOrMore(attr_expr).parseString(text).dump())
    -        
    -        # instead of OneOrMore(expr), parse using Dict(OneOrMore(Group(expr))) - Dict will auto-assign names
    -        result = Dict(OneOrMore(Group(attr_expr))).parseString(text)
    -        print(result.dump())
    -        
    -        # access named fields as dict entries, or output as dict
    -        print(result['shape'])        
    -        print(result.asDict())
    -    prints::
    -        ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap']
    -
    -        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    -        - color: light blue
    -        - posn: upper left
    -        - shape: SQUARE
    -        - texture: burlap
    -        SQUARE
    -        {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'}
    -    See more examples at L{ParseResults} of accessing fields by results name.
    -    """
    -    def __init__( self, expr ):
    -        super(Dict,self).__init__( expr )
    -        self.saveAsList = True
    -
    -    def postParse( self, instring, loc, tokenlist ):
    -        for i,tok in enumerate(tokenlist):
    -            if len(tok) == 0:
    -                continue
    -            ikey = tok[0]
    -            if isinstance(ikey,int):
    -                ikey = _ustr(tok[0]).strip()
    -            if len(tok)==1:
    -                tokenlist[ikey] = _ParseResultsWithOffset("",i)
    -            elif len(tok)==2 and not isinstance(tok[1],ParseResults):
    -                tokenlist[ikey] = _ParseResultsWithOffset(tok[1],i)
    -            else:
    -                dictvalue = tok.copy() #ParseResults(i)
    -                del dictvalue[0]
    -                if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.haskeys()):
    -                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue,i)
    -                else:
    -                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0],i)
    -
    -        if self.resultsName:
    -            return [ tokenlist ]
    -        else:
    -            return tokenlist
    -
    -
    -class Suppress(TokenConverter):
    -    """
    -    Converter for ignoring the results of a parsed expression.
    -
    -    Example::
    -        source = "a, b, c,d"
    -        wd = Word(alphas)
    -        wd_list1 = wd + ZeroOrMore(',' + wd)
    -        print(wd_list1.parseString(source))
    -
    -        # often, delimiters that are useful during parsing are just in the
    -        # way afterward - use Suppress to keep them out of the parsed output
    -        wd_list2 = wd + ZeroOrMore(Suppress(',') + wd)
    -        print(wd_list2.parseString(source))
    -    prints::
    -        ['a', ',', 'b', ',', 'c', ',', 'd']
    -        ['a', 'b', 'c', 'd']
    -    (See also L{delimitedList}.)
    -    """
    -    def postParse( self, instring, loc, tokenlist ):
    -        return []
    -
    -    def suppress( self ):
    -        return self
    -
    -
    -class OnlyOnce(object):
    -    """
    -    Wrapper for parse actions, to ensure they are only called once.
    -    """
    -    def __init__(self, methodCall):
    -        self.callable = _trim_arity(methodCall)
    -        self.called = False
    -    def __call__(self,s,l,t):
    -        if not self.called:
    -            results = self.callable(s,l,t)
    -            self.called = True
    -            return results
    -        raise ParseException(s,l,"")
    -    def reset(self):
    -        self.called = False
    -
    -def traceParseAction(f):
    -    """
    -    Decorator for debugging parse actions. 
    -    
    -    When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
    -    When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
    -
    -    Example::
    -        wd = Word(alphas)
    -
    -        @traceParseAction
    -        def remove_duplicate_chars(tokens):
    -            return ''.join(sorted(set(''.join(tokens)))
    -
    -        wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)
    -        print(wds.parseString("slkdjs sld sldd sdlf sdljf"))
    -    prints::
    -        >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
    -        <3:
    -            thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc
    -        sys.stderr.write( ">>entering %s(line: '%s', %d, %r)\n" % (thisFunc,line(l,s),l,t) )
    -        try:
    -            ret = f(*paArgs)
    -        except Exception as exc:
    -            sys.stderr.write( "< ['aa', 'bb', 'cc']
    -        delimitedList(Word(hexnums), delim=':', combine=True).parseString("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
    -    """
    -    dlName = _ustr(expr)+" ["+_ustr(delim)+" "+_ustr(expr)+"]..."
    -    if combine:
    -        return Combine( expr + ZeroOrMore( delim + expr ) ).setName(dlName)
    -    else:
    -        return ( expr + ZeroOrMore( Suppress( delim ) + expr ) ).setName(dlName)
    -
    -def countedArray( expr, intExpr=None ):
    -    """
    -    Helper to define a counted list of expressions.
    -    This helper defines a pattern of the form::
    -        integer expr expr expr...
    -    where the leading integer tells how many expr expressions follow.
    -    The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed.
    -    
    -    If C{intExpr} is specified, it should be a pyparsing expression that produces an integer value.
    -
    -    Example::
    -        countedArray(Word(alphas)).parseString('2 ab cd ef')  # -> ['ab', 'cd']
    -
    -        # in this parser, the leading integer value is given in binary,
    -        # '10' indicating that 2 values are in the array
    -        binaryConstant = Word('01').setParseAction(lambda t: int(t[0], 2))
    -        countedArray(Word(alphas), intExpr=binaryConstant).parseString('10 ab cd ef')  # -> ['ab', 'cd']
    -    """
    -    arrayExpr = Forward()
    -    def countFieldParseAction(s,l,t):
    -        n = t[0]
    -        arrayExpr << (n and Group(And([expr]*n)) or Group(empty))
    -        return []
    -    if intExpr is None:
    -        intExpr = Word(nums).setParseAction(lambda t:int(t[0]))
    -    else:
    -        intExpr = intExpr.copy()
    -    intExpr.setName("arrayLen")
    -    intExpr.addParseAction(countFieldParseAction, callDuringTry=True)
    -    return ( intExpr + arrayExpr ).setName('(len) ' + _ustr(expr) + '...')
    -
    -def _flatten(L):
    -    ret = []
    -    for i in L:
    -        if isinstance(i,list):
    -            ret.extend(_flatten(i))
    -        else:
    -            ret.append(i)
    -    return ret
    -
    -def matchPreviousLiteral(expr):
    -    """
    -    Helper to define an expression that is indirectly defined from
    -    the tokens matched in a previous expression, that is, it looks
    -    for a 'repeat' of a previous expression.  For example::
    -        first = Word(nums)
    -        second = matchPreviousLiteral(first)
    -        matchExpr = first + ":" + second
    -    will match C{"1:1"}, but not C{"1:2"}.  Because this matches a
    -    previous literal, will also match the leading C{"1:1"} in C{"1:10"}.
    -    If this is not desired, use C{matchPreviousExpr}.
    -    Do I{not} use with packrat parsing enabled.
    -    """
    -    rep = Forward()
    -    def copyTokenToRepeater(s,l,t):
    -        if t:
    -            if len(t) == 1:
    -                rep << t[0]
    -            else:
    -                # flatten t tokens
    -                tflat = _flatten(t.asList())
    -                rep << And(Literal(tt) for tt in tflat)
    -        else:
    -            rep << Empty()
    -    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    -    rep.setName('(prev) ' + _ustr(expr))
    -    return rep
    -
    -def matchPreviousExpr(expr):
    -    """
    -    Helper to define an expression that is indirectly defined from
    -    the tokens matched in a previous expression, that is, it looks
    -    for a 'repeat' of a previous expression.  For example::
    -        first = Word(nums)
    -        second = matchPreviousExpr(first)
    -        matchExpr = first + ":" + second
    -    will match C{"1:1"}, but not C{"1:2"}.  Because this matches by
    -    expressions, will I{not} match the leading C{"1:1"} in C{"1:10"};
    -    the expressions are evaluated first, and then compared, so
    -    C{"1"} is compared with C{"10"}.
    -    Do I{not} use with packrat parsing enabled.
    -    """
    -    rep = Forward()
    -    e2 = expr.copy()
    -    rep <<= e2
    -    def copyTokenToRepeater(s,l,t):
    -        matchTokens = _flatten(t.asList())
    -        def mustMatchTheseTokens(s,l,t):
    -            theseTokens = _flatten(t.asList())
    -            if  theseTokens != matchTokens:
    -                raise ParseException("",0,"")
    -        rep.setParseAction( mustMatchTheseTokens, callDuringTry=True )
    -    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    -    rep.setName('(prev) ' + _ustr(expr))
    -    return rep
    -
    -def _escapeRegexRangeChars(s):
    -    #~  escape these chars: ^-]
    -    for c in r"\^-]":
    -        s = s.replace(c,_bslash+c)
    -    s = s.replace("\n",r"\n")
    -    s = s.replace("\t",r"\t")
    -    return _ustr(s)
    -
    -def oneOf( strs, caseless=False, useRegex=True ):
    -    """
    -    Helper to quickly define a set of alternative Literals, and makes sure to do
    -    longest-first testing when there is a conflict, regardless of the input order,
    -    but returns a C{L{MatchFirst}} for best performance.
    -
    -    Parameters:
    -     - strs - a string of space-delimited literals, or a collection of string literals
    -     - caseless - (default=C{False}) - treat all literals as caseless
    -     - useRegex - (default=C{True}) - as an optimization, will generate a Regex
    -          object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or
    -          if creating a C{Regex} raises an exception)
    -
    -    Example::
    -        comp_oper = oneOf("< = > <= >= !=")
    -        var = Word(alphas)
    -        number = Word(nums)
    -        term = var | number
    -        comparison_expr = term + comp_oper + term
    -        print(comparison_expr.searchString("B = 12  AA=23 B<=AA AA>12"))
    -    prints::
    -        [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
    -    """
    -    if caseless:
    -        isequal = ( lambda a,b: a.upper() == b.upper() )
    -        masks = ( lambda a,b: b.upper().startswith(a.upper()) )
    -        parseElementClass = CaselessLiteral
    -    else:
    -        isequal = ( lambda a,b: a == b )
    -        masks = ( lambda a,b: b.startswith(a) )
    -        parseElementClass = Literal
    -
    -    symbols = []
    -    if isinstance(strs,basestring):
    -        symbols = strs.split()
    -    elif isinstance(strs, collections.Iterable):
    -        symbols = list(strs)
    -    else:
    -        warnings.warn("Invalid argument to oneOf, expected string or iterable",
    -                SyntaxWarning, stacklevel=2)
    -    if not symbols:
    -        return NoMatch()
    -
    -    i = 0
    -    while i < len(symbols)-1:
    -        cur = symbols[i]
    -        for j,other in enumerate(symbols[i+1:]):
    -            if ( isequal(other, cur) ):
    -                del symbols[i+j+1]
    -                break
    -            elif ( masks(cur, other) ):
    -                del symbols[i+j+1]
    -                symbols.insert(i,other)
    -                cur = other
    -                break
    -        else:
    -            i += 1
    -
    -    if not caseless and useRegex:
    -        #~ print (strs,"->", "|".join( [ _escapeRegexChars(sym) for sym in symbols] ))
    -        try:
    -            if len(symbols)==len("".join(symbols)):
    -                return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ).setName(' | '.join(symbols))
    -            else:
    -                return Regex( "|".join(re.escape(sym) for sym in symbols) ).setName(' | '.join(symbols))
    -        except Exception:
    -            warnings.warn("Exception creating Regex for oneOf, building MatchFirst",
    -                    SyntaxWarning, stacklevel=2)
    -
    -
    -    # last resort, just use MatchFirst
    -    return MatchFirst(parseElementClass(sym) for sym in symbols).setName(' | '.join(symbols))
    -
    -def dictOf( key, value ):
    -    """
    -    Helper to easily and clearly define a dictionary by specifying the respective patterns
    -    for the key and value.  Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens
    -    in the proper order.  The key pattern can include delimiting markers or punctuation,
    -    as long as they are suppressed, thereby leaving the significant key text.  The value
    -    pattern can include named results, so that the C{Dict} results can include named token
    -    fields.
    -
    -    Example::
    -        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    -        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    -        print(OneOrMore(attr_expr).parseString(text).dump())
    -        
    -        attr_label = label
    -        attr_value = Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)
    -
    -        # similar to Dict, but simpler call format
    -        result = dictOf(attr_label, attr_value).parseString(text)
    -        print(result.dump())
    -        print(result['shape'])
    -        print(result.shape)  # object attribute access works too
    -        print(result.asDict())
    -    prints::
    -        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    -        - color: light blue
    -        - posn: upper left
    -        - shape: SQUARE
    -        - texture: burlap
    -        SQUARE
    -        SQUARE
    -        {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
    -    """
    -    return Dict( ZeroOrMore( Group ( key + value ) ) )
    -
    -def originalTextFor(expr, asString=True):
    -    """
    -    Helper to return the original, untokenized text for a given expression.  Useful to
    -    restore the parsed fields of an HTML start tag into the raw tag text itself, or to
    -    revert separate tokens with intervening whitespace back to the original matching
    -    input text. By default, returns astring containing the original parsed text.  
    -       
    -    If the optional C{asString} argument is passed as C{False}, then the return value is a 
    -    C{L{ParseResults}} containing any results names that were originally matched, and a 
    -    single token containing the original matched text from the input string.  So if 
    -    the expression passed to C{L{originalTextFor}} contains expressions with defined
    -    results names, you must set C{asString} to C{False} if you want to preserve those
    -    results name values.
    -
    -    Example::
    -        src = "this is test  bold text  normal text "
    -        for tag in ("b","i"):
    -            opener,closer = makeHTMLTags(tag)
    -            patt = originalTextFor(opener + SkipTo(closer) + closer)
    -            print(patt.searchString(src)[0])
    -    prints::
    -        [' bold text ']
    -        ['text']
    -    """
    -    locMarker = Empty().setParseAction(lambda s,loc,t: loc)
    -    endlocMarker = locMarker.copy()
    -    endlocMarker.callPreparse = False
    -    matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end")
    -    if asString:
    -        extractText = lambda s,l,t: s[t._original_start:t._original_end]
    -    else:
    -        def extractText(s,l,t):
    -            t[:] = [s[t.pop('_original_start'):t.pop('_original_end')]]
    -    matchExpr.setParseAction(extractText)
    -    matchExpr.ignoreExprs = expr.ignoreExprs
    -    return matchExpr
    -
    -def ungroup(expr): 
    -    """
    -    Helper to undo pyparsing's default grouping of And expressions, even
    -    if all but one are non-empty.
    -    """
    -    return TokenConverter(expr).setParseAction(lambda t:t[0])
    -
    -def locatedExpr(expr):
    -    """
    -    Helper to decorate a returned token with its starting and ending locations in the input string.
    -    This helper adds the following results names:
    -     - locn_start = location where matched expression begins
    -     - locn_end = location where matched expression ends
    -     - value = the actual parsed results
    -
    -    Be careful if the input text contains C{} characters, you may want to call
    -    C{L{ParserElement.parseWithTabs}}
    -
    -    Example::
    -        wd = Word(alphas)
    -        for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"):
    -            print(match)
    -    prints::
    -        [[0, 'ljsdf', 5]]
    -        [[8, 'lksdjjf', 15]]
    -        [[18, 'lkkjj', 23]]
    -    """
    -    locator = Empty().setParseAction(lambda s,l,t: l)
    -    return Group(locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end"))
    -
    -
    -# convenience constants for positional expressions
    -empty       = Empty().setName("empty")
    -lineStart   = LineStart().setName("lineStart")
    -lineEnd     = LineEnd().setName("lineEnd")
    -stringStart = StringStart().setName("stringStart")
    -stringEnd   = StringEnd().setName("stringEnd")
    -
    -_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
    -_escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))
    -_escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))
    -_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)
    -_charRange = Group(_singleChar + Suppress("-") + _singleChar)
    -_reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
    -
    -def srange(s):
    -    r"""
    -    Helper to easily define string ranges for use in Word construction.  Borrows
    -    syntax from regexp '[]' string range definitions::
    -        srange("[0-9]")   -> "0123456789"
    -        srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
    -        srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
    -    The input string must be enclosed in []'s, and the returned string is the expanded
    -    character set joined into a single string.
    -    The values enclosed in the []'s may be:
    -     - a single character
    -     - an escaped character with a leading backslash (such as C{\-} or C{\]})
    -     - an escaped hex character with a leading C{'\x'} (C{\x21}, which is a C{'!'} character) 
    -         (C{\0x##} is also supported for backwards compatibility) 
    -     - an escaped octal character with a leading C{'\0'} (C{\041}, which is a C{'!'} character)
    -     - a range of any of the above, separated by a dash (C{'a-z'}, etc.)
    -     - any combination of the above (C{'aeiouy'}, C{'a-zA-Z0-9_$'}, etc.)
    -    """
    -    _expanded = lambda p: p if not isinstance(p,ParseResults) else ''.join(unichr(c) for c in range(ord(p[0]),ord(p[1])+1))
    -    try:
    -        return "".join(_expanded(part) for part in _reBracketExpr.parseString(s).body)
    -    except Exception:
    -        return ""
    -
    -def matchOnlyAtCol(n):
    -    """
    -    Helper method for defining parse actions that require matching at a specific
    -    column in the input text.
    -    """
    -    def verifyCol(strg,locn,toks):
    -        if col(locn,strg) != n:
    -            raise ParseException(strg,locn,"matched token not at column %d" % n)
    -    return verifyCol
    -
    -def replaceWith(replStr):
    -    """
    -    Helper method for common parse actions that simply return a literal value.  Especially
    -    useful when used with C{L{transformString}()}.
    -
    -    Example::
    -        num = Word(nums).setParseAction(lambda toks: int(toks[0]))
    -        na = oneOf("N/A NA").setParseAction(replaceWith(math.nan))
    -        term = na | num
    -        
    -        OneOrMore(term).parseString("324 234 N/A 234") # -> [324, 234, nan, 234]
    -    """
    -    return lambda s,l,t: [replStr]
    -
    -def removeQuotes(s,l,t):
    -    """
    -    Helper parse action for removing quotation marks from parsed quoted strings.
    -
    -    Example::
    -        # by default, quotation marks are included in parsed results
    -        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]
    -
    -        # use removeQuotes to strip quotation marks from parsed results
    -        quotedString.setParseAction(removeQuotes)
    -        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
    -    """
    -    return t[0][1:-1]
    -
    -def tokenMap(func, *args):
    -    """
    -    Helper to define a parse action by mapping a function to all elements of a ParseResults list.If any additional 
    -    args are passed, they are forwarded to the given function as additional arguments after
    -    the token, as in C{hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))}, which will convert the
    -    parsed data to an integer using base 16.
    -
    -    Example (compare the last to example in L{ParserElement.transformString}::
    -        hex_ints = OneOrMore(Word(hexnums)).setParseAction(tokenMap(int, 16))
    -        hex_ints.runTests('''
    -            00 11 22 aa FF 0a 0d 1a
    -            ''')
    -        
    -        upperword = Word(alphas).setParseAction(tokenMap(str.upper))
    -        OneOrMore(upperword).runTests('''
    -            my kingdom for a horse
    -            ''')
    -
    -        wd = Word(alphas).setParseAction(tokenMap(str.title))
    -        OneOrMore(wd).setParseAction(' '.join).runTests('''
    -            now is the winter of our discontent made glorious summer by this sun of york
    -            ''')
    -    prints::
    -        00 11 22 aa FF 0a 0d 1a
    -        [0, 17, 34, 170, 255, 10, 13, 26]
    -
    -        my kingdom for a horse
    -        ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']
    -
    -        now is the winter of our discontent made glorious summer by this sun of york
    -        ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']
    -    """
    -    def pa(s,l,t):
    -        return [func(tokn, *args) for tokn in t]
    -
    -    try:
    -        func_name = getattr(func, '__name__', 
    -                            getattr(func, '__class__').__name__)
    -    except Exception:
    -        func_name = str(func)
    -    pa.__name__ = func_name
    -
    -    return pa
    -
    -upcaseTokens = tokenMap(lambda t: _ustr(t).upper())
    -"""(Deprecated) Helper parse action to convert tokens to upper case. Deprecated in favor of L{pyparsing_common.upcaseTokens}"""
    -
    -downcaseTokens = tokenMap(lambda t: _ustr(t).lower())
    -"""(Deprecated) Helper parse action to convert tokens to lower case. Deprecated in favor of L{pyparsing_common.downcaseTokens}"""
    -    
    -def _makeTags(tagStr, xml):
    -    """Internal helper to construct opening and closing tag expressions, given a tag name"""
    -    if isinstance(tagStr,basestring):
    -        resname = tagStr
    -        tagStr = Keyword(tagStr, caseless=not xml)
    -    else:
    -        resname = tagStr.name
    -
    -    tagAttrName = Word(alphas,alphanums+"_-:")
    -    if (xml):
    -        tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )
    -        openTag = Suppress("<") + tagStr("tag") + \
    -                Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \
    -                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    -    else:
    -        printablesLessRAbrack = "".join(c for c in printables if c not in ">")
    -        tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack)
    -        openTag = Suppress("<") + tagStr("tag") + \
    -                Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \
    -                Optional( Suppress("=") + tagAttrValue ) ))) + \
    -                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    -    closeTag = Combine(_L("")
    -
    -    openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % resname)
    -    closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % resname)
    -    openTag.tag = resname
    -    closeTag.tag = resname
    -    return openTag, closeTag
    -
    -def makeHTMLTags(tagStr):
    -    """
    -    Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches
    -    tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values.
    -
    -    Example::
    -        text = 'More info at the pyparsing wiki page'
    -        # makeHTMLTags returns pyparsing expressions for the opening and closing tags as a 2-tuple
    -        a,a_end = makeHTMLTags("A")
    -        link_expr = a + SkipTo(a_end)("link_text") + a_end
    -        
    -        for link in link_expr.searchString(text):
    -            # attributes in the  tag (like "href" shown here) are also accessible as named results
    -            print(link.link_text, '->', link.href)
    -    prints::
    -        pyparsing -> http://pyparsing.wikispaces.com
    -    """
    -    return _makeTags( tagStr, False )
    -
    -def makeXMLTags(tagStr):
    -    """
    -    Helper to construct opening and closing tag expressions for XML, given a tag name. Matches
    -    tags only in the given upper/lower case.
    -
    -    Example: similar to L{makeHTMLTags}
    -    """
    -    return _makeTags( tagStr, True )
    -
    -def withAttribute(*args,**attrDict):
    -    """
    -    Helper to create a validating parse action to be used with start tags created
    -    with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag
    -    with a required attribute value, to avoid false matches on common tags such as
    -    C{} or C{
    }. - - Call C{withAttribute} with a series of attribute names and values. Specify the list - of filter attributes names and values as: - - keyword arguments, as in C{(align="right")}, or - - as an explicit dict with C{**} operator, when an attribute name is also a Python - reserved word, as in C{**{"class":"Customer", "align":"right"}} - - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) - For attribute names with a namespace prefix, you must use the second form. Attribute - names are matched insensitive to upper/lower case. - - If just testing for C{class} (with or without a namespace), use C{L{withClass}}. - - To verify that the attribute exists, but without specifying a value, pass - C{withAttribute.ANY_VALUE} as the value. - - Example:: - html = ''' -
    - Some text -
    1 4 0 1 0
    -
    1,3 2,3 1,1
    -
    this has no type
    -
    - - ''' - div,div_end = makeHTMLTags("div") - - # only match div tag having a type attribute with value "grid" - div_grid = div().setParseAction(withAttribute(type="grid")) - grid_expr = div_grid + SkipTo(div | div_end)("body") - for grid_header in grid_expr.searchString(html): - print(grid_header.body) - - # construct a match with any div tag having a type attribute, regardless of the value - div_any_type = div().setParseAction(withAttribute(type=withAttribute.ANY_VALUE)) - div_expr = div_any_type + SkipTo(div | div_end)("body") - for div_header in div_expr.searchString(html): - print(div_header.body) - prints:: - 1 4 0 1 0 - - 1 4 0 1 0 - 1,3 2,3 1,1 - """ - if args: - attrs = args[:] - else: - attrs = attrDict.items() - attrs = [(k,v) for k,v in attrs] - def pa(s,l,tokens): - for attrName,attrValue in attrs: - if attrName not in tokens: - raise ParseException(s,l,"no matching attribute " + attrName) - if attrValue != withAttribute.ANY_VALUE and tokens[attrName] != attrValue: - raise ParseException(s,l,"attribute '%s' has value '%s', must be '%s'" % - (attrName, tokens[attrName], attrValue)) - return pa -withAttribute.ANY_VALUE = object() - -def withClass(classname, namespace=''): - """ - Simplified version of C{L{withAttribute}} when matching on a div class - made - difficult because C{class} is a reserved word in Python. - - Example:: - html = ''' -
    - Some text -
    1 4 0 1 0
    -
    1,3 2,3 1,1
    -
    this <div> has no class
    -
    - - ''' - div,div_end = makeHTMLTags("div") - div_grid = div().setParseAction(withClass("grid")) - - grid_expr = div_grid + SkipTo(div | div_end)("body") - for grid_header in grid_expr.searchString(html): - print(grid_header.body) - - div_any_type = div().setParseAction(withClass(withAttribute.ANY_VALUE)) - div_expr = div_any_type + SkipTo(div | div_end)("body") - for div_header in div_expr.searchString(html): - print(div_header.body) - prints:: - 1 4 0 1 0 - - 1 4 0 1 0 - 1,3 2,3 1,1 - """ - classattr = "%s:class" % namespace if namespace else "class" - return withAttribute(**{classattr : classname}) - -opAssoc = _Constants() -opAssoc.LEFT = object() -opAssoc.RIGHT = object() - -def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): - """ - Helper method for constructing grammars of expressions made up of - operators working in a precedence hierarchy. Operators may be unary or - binary, left- or right-associative. Parse actions can also be attached - to operator expressions. The generated parser will also recognize the use - of parentheses to override operator precedences (see example below). - - Note: if you define a deep operator list, you may see performance issues - when using infixNotation. See L{ParserElement.enablePackrat} for a - mechanism to potentially improve your parser performance. - - Parameters: - - baseExpr - expression representing the most basic element for the nested - - opList - list of tuples, one for each operator precedence level in the - expression grammar; each tuple is of the form - (opExpr, numTerms, rightLeftAssoc, parseAction), where: - - opExpr is the pyparsing expression for the operator; - may also be a string, which will be converted to a Literal; - if numTerms is 3, opExpr is a tuple of two expressions, for the - two operators separating the 3 terms - - numTerms is the number of terms for this operator (must - be 1, 2, or 3) - - rightLeftAssoc is the indicator whether the operator is - right or left associative, using the pyparsing-defined - 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) - - lpar - expression for matching left-parentheses (default=C{Suppress('(')}) - - rpar - expression for matching right-parentheses (default=C{Suppress(')')}) - - Example:: - # simple example of four-function arithmetic with ints and variable names - integer = pyparsing_common.signed_integer - varname = pyparsing_common.identifier - - arith_expr = infixNotation(integer | varname, - [ - ('-', 1, opAssoc.RIGHT), - (oneOf('* /'), 2, opAssoc.LEFT), - (oneOf('+ -'), 2, opAssoc.LEFT), - ]) - - arith_expr.runTests(''' - 5+3*6 - (5+3)*6 - -2--11 - ''', fullDump=False) - prints:: - 5+3*6 - [[5, '+', [3, '*', 6]]] - - (5+3)*6 - [[[5, '+', 3], '*', 6]] - - -2--11 - [[['-', 2], '-', ['-', 11]]] - """ - ret = Forward() - lastExpr = baseExpr | ( lpar + ret + rpar ) - for i,operDef in enumerate(opList): - opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] - termName = "%s term" % opExpr if arity < 3 else "%s%s term" % opExpr - if arity == 3: - if opExpr is None or len(opExpr) != 2: - raise ValueError("if numterms=3, opExpr must be a tuple or list of two expressions") - opExpr1, opExpr2 = opExpr - thisExpr = Forward().setName(termName) - if rightLeftAssoc == opAssoc.LEFT: - if arity == 1: - matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) - elif arity == 2: - if opExpr is not None: - matchExpr = FollowedBy(lastExpr + opExpr + lastExpr) + Group( lastExpr + OneOrMore( opExpr + lastExpr ) ) - else: - matchExpr = FollowedBy(lastExpr+lastExpr) + Group( lastExpr + OneOrMore(lastExpr) ) - elif arity == 3: - matchExpr = FollowedBy(lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr) + \ - Group( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) - else: - raise ValueError("operator must be unary (1), binary (2), or ternary (3)") - elif rightLeftAssoc == opAssoc.RIGHT: - if arity == 1: - # try to avoid LR with this extra test - if not isinstance(opExpr, Optional): - opExpr = Optional(opExpr) - matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) - elif arity == 2: - if opExpr is not None: - matchExpr = FollowedBy(lastExpr + opExpr + thisExpr) + Group( lastExpr + OneOrMore( opExpr + thisExpr ) ) - else: - matchExpr = FollowedBy(lastExpr + thisExpr) + Group( lastExpr + OneOrMore( thisExpr ) ) - elif arity == 3: - matchExpr = FollowedBy(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) + \ - Group( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) - else: - raise ValueError("operator must be unary (1), binary (2), or ternary (3)") - else: - raise ValueError("operator must indicate right or left associativity") - if pa: - matchExpr.setParseAction( pa ) - thisExpr <<= ( matchExpr.setName(termName) | lastExpr ) - lastExpr = thisExpr - ret <<= lastExpr - return ret - -operatorPrecedence = infixNotation -"""(Deprecated) Former name of C{L{infixNotation}}, will be dropped in a future release.""" - -dblQuotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"').setName("string enclosed in double quotes") -sglQuotedString = Combine(Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("string enclosed in single quotes") -quotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"'| - Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("quotedString using single or double quotes") -unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal") - -def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()): - """ - Helper method for defining nested lists enclosed in opening and closing - delimiters ("(" and ")" are the default). - - Parameters: - - opener - opening character for a nested list (default=C{"("}); can also be a pyparsing expression - - closer - closing character for a nested list (default=C{")"}); can also be a pyparsing expression - - content - expression for items within the nested lists (default=C{None}) - - ignoreExpr - expression for ignoring opening and closing delimiters (default=C{quotedString}) - - If an expression is not provided for the content argument, the nested - expression will capture all whitespace-delimited content between delimiters - as a list of separate values. - - Use the C{ignoreExpr} argument to define expressions that may contain - opening or closing characters that should not be treated as opening - or closing characters for nesting, such as quotedString or a comment - expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. - The default is L{quotedString}, but if no expressions are to be ignored, - then pass C{None} for this argument. - - Example:: - data_type = oneOf("void int short long char float double") - decl_data_type = Combine(data_type + Optional(Word('*'))) - ident = Word(alphas+'_', alphanums+'_') - number = pyparsing_common.number - arg = Group(decl_data_type + ident) - LPAR,RPAR = map(Suppress, "()") - - code_body = nestedExpr('{', '}', ignoreExpr=(quotedString | cStyleComment)) - - c_function = (decl_data_type("type") - + ident("name") - + LPAR + Optional(delimitedList(arg), [])("args") + RPAR - + code_body("body")) - c_function.ignore(cStyleComment) - - source_code = ''' - int is_odd(int x) { - return (x%2); - } - - int dec_to_hex(char hchar) { - if (hchar >= '0' && hchar <= '9') { - return (ord(hchar)-ord('0')); - } else { - return (10+ord(hchar)-ord('A')); - } - } - ''' - for func in c_function.searchString(source_code): - print("%(name)s (%(type)s) args: %(args)s" % func) - - prints:: - is_odd (int) args: [['int', 'x']] - dec_to_hex (int) args: [['char', 'hchar']] - """ - if opener == closer: - raise ValueError("opening and closing strings cannot be the same") - if content is None: - if isinstance(opener,basestring) and isinstance(closer,basestring): - if len(opener) == 1 and len(closer)==1: - if ignoreExpr is not None: - content = (Combine(OneOrMore(~ignoreExpr + - CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) - ).setParseAction(lambda t:t[0].strip())) - else: - content = (empty.copy()+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS - ).setParseAction(lambda t:t[0].strip())) - else: - if ignoreExpr is not None: - content = (Combine(OneOrMore(~ignoreExpr + - ~Literal(opener) + ~Literal(closer) + - CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) - ).setParseAction(lambda t:t[0].strip())) - else: - content = (Combine(OneOrMore(~Literal(opener) + ~Literal(closer) + - CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) - ).setParseAction(lambda t:t[0].strip())) - else: - raise ValueError("opening and closing arguments must be strings if no content expression is given") - ret = Forward() - if ignoreExpr is not None: - ret <<= Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) - else: - ret <<= Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) - ret.setName('nested %s%s expression' % (opener,closer)) - return ret - -def indentedBlock(blockStatementExpr, indentStack, indent=True): - """ - Helper method for defining space-delimited indentation blocks, such as - those used to define block statements in Python source code. - - Parameters: - - blockStatementExpr - expression defining syntax of statement that - is repeated within the indented block - - indentStack - list created by caller to manage indentation stack - (multiple statementWithIndentedBlock expressions within a single grammar - should share a common indentStack) - - indent - boolean indicating whether block must be indented beyond the - the current level; set to False for block of left-most statements - (default=C{True}) - - A valid block must contain at least one C{blockStatement}. - - Example:: - data = ''' - def A(z): - A1 - B = 100 - G = A2 - A2 - A3 - B - def BB(a,b,c): - BB1 - def BBA(): - bba1 - bba2 - bba3 - C - D - def spam(x,y): - def eggs(z): - pass - ''' - - - indentStack = [1] - stmt = Forward() - - identifier = Word(alphas, alphanums) - funcDecl = ("def" + identifier + Group( "(" + Optional( delimitedList(identifier) ) + ")" ) + ":") - func_body = indentedBlock(stmt, indentStack) - funcDef = Group( funcDecl + func_body ) - - rvalue = Forward() - funcCall = Group(identifier + "(" + Optional(delimitedList(rvalue)) + ")") - rvalue << (funcCall | identifier | Word(nums)) - assignment = Group(identifier + "=" + rvalue) - stmt << ( funcDef | assignment | identifier ) - - module_body = OneOrMore(stmt) - - parseTree = module_body.parseString(data) - parseTree.pprint() - prints:: - [['def', - 'A', - ['(', 'z', ')'], - ':', - [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], - 'B', - ['def', - 'BB', - ['(', 'a', 'b', 'c', ')'], - ':', - [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], - 'C', - 'D', - ['def', - 'spam', - ['(', 'x', 'y', ')'], - ':', - [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] - """ - def checkPeerIndent(s,l,t): - if l >= len(s): return - curCol = col(l,s) - if curCol != indentStack[-1]: - if curCol > indentStack[-1]: - raise ParseFatalException(s,l,"illegal nesting") - raise ParseException(s,l,"not a peer entry") - - def checkSubIndent(s,l,t): - curCol = col(l,s) - if curCol > indentStack[-1]: - indentStack.append( curCol ) - else: - raise ParseException(s,l,"not a subentry") - - def checkUnindent(s,l,t): - if l >= len(s): return - curCol = col(l,s) - if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): - raise ParseException(s,l,"not an unindent") - indentStack.pop() - - NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) - INDENT = (Empty() + Empty().setParseAction(checkSubIndent)).setName('INDENT') - PEER = Empty().setParseAction(checkPeerIndent).setName('') - UNDENT = Empty().setParseAction(checkUnindent).setName('UNINDENT') - if indent: - smExpr = Group( Optional(NL) + - #~ FollowedBy(blockStatementExpr) + - INDENT + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) + UNDENT) - else: - smExpr = Group( Optional(NL) + - (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) - blockStatementExpr.ignore(_bslash + LineEnd()) - return smExpr.setName('indented block') - -alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") -punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") - -anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:").setName('any tag')) -_htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\'')) -commonHTMLEntity = Regex('&(?P' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity") -def replaceHTMLEntity(t): - """Helper parser action to replace common HTML entities with their special characters""" - return _htmlEntityMap.get(t.entity) - -# it's easy to get these comment structures wrong - they're very common, so may as well make them available -cStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/').setName("C style comment") -"Comment of the form C{/* ... */}" - -htmlComment = Regex(r"").setName("HTML comment") -"Comment of the form C{}" - -restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line") -dblSlashComment = Regex(r"//(?:\\\n|[^\n])*").setName("// comment") -"Comment of the form C{// ... (to end of line)}" - -cppStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/'| dblSlashComment).setName("C++ style comment") -"Comment of either form C{L{cStyleComment}} or C{L{dblSlashComment}}" - -javaStyleComment = cppStyleComment -"Same as C{L{cppStyleComment}}" - -pythonStyleComment = Regex(r"#.*").setName("Python style comment") -"Comment of the form C{# ... (to end of line)}" - -_commasepitem = Combine(OneOrMore(Word(printables, excludeChars=',') + - Optional( Word(" \t") + - ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem") -commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") -"""(Deprecated) Predefined expression of 1 or more printable words or quoted strings, separated by commas. - This expression is deprecated in favor of L{pyparsing_common.comma_separated_list}.""" - -# some other useful expressions - using lower-case class name since we are really using this as a namespace -class pyparsing_common: - """ - Here are some common low-level expressions that may be useful in jump-starting parser development: - - numeric forms (L{integers}, L{reals}, L{scientific notation}) - - common L{programming identifiers} - - network addresses (L{MAC}, L{IPv4}, L{IPv6}) - - ISO8601 L{dates} and L{datetime} - - L{UUID} - - L{comma-separated list} - Parse actions: - - C{L{convertToInteger}} - - C{L{convertToFloat}} - - C{L{convertToDate}} - - C{L{convertToDatetime}} - - C{L{stripHTMLTags}} - - C{L{upcaseTokens}} - - C{L{downcaseTokens}} - - Example:: - pyparsing_common.number.runTests(''' - # any int or real number, returned as the appropriate type - 100 - -100 - +100 - 3.14159 - 6.02e23 - 1e-12 - ''') - - pyparsing_common.fnumber.runTests(''' - # any int or real number, returned as float - 100 - -100 - +100 - 3.14159 - 6.02e23 - 1e-12 - ''') - - pyparsing_common.hex_integer.runTests(''' - # hex numbers - 100 - FF - ''') - - pyparsing_common.fraction.runTests(''' - # fractions - 1/2 - -3/4 - ''') - - pyparsing_common.mixed_integer.runTests(''' - # mixed fractions - 1 - 1/2 - -3/4 - 1-3/4 - ''') - - import uuid - pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) - pyparsing_common.uuid.runTests(''' - # uuid - 12345678-1234-5678-1234-567812345678 - ''') - prints:: - # any int or real number, returned as the appropriate type - 100 - [100] - - -100 - [-100] - - +100 - [100] - - 3.14159 - [3.14159] - - 6.02e23 - [6.02e+23] - - 1e-12 - [1e-12] - - # any int or real number, returned as float - 100 - [100.0] - - -100 - [-100.0] - - +100 - [100.0] - - 3.14159 - [3.14159] - - 6.02e23 - [6.02e+23] - - 1e-12 - [1e-12] - - # hex numbers - 100 - [256] - - FF - [255] - - # fractions - 1/2 - [0.5] - - -3/4 - [-0.75] - - # mixed fractions - 1 - [1] - - 1/2 - [0.5] - - -3/4 - [-0.75] - - 1-3/4 - [1.75] - - # uuid - 12345678-1234-5678-1234-567812345678 - [UUID('12345678-1234-5678-1234-567812345678')] - """ - - convertToInteger = tokenMap(int) - """ - Parse action for converting parsed integers to Python int - """ - - convertToFloat = tokenMap(float) - """ - Parse action for converting parsed numbers to Python float - """ - - integer = Word(nums).setName("integer").setParseAction(convertToInteger) - """expression that parses an unsigned integer, returns an int""" - - hex_integer = Word(hexnums).setName("hex integer").setParseAction(tokenMap(int,16)) - """expression that parses a hexadecimal integer, returns an int""" - - signed_integer = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) - """expression that parses an integer with optional leading sign, returns an int""" - - fraction = (signed_integer().setParseAction(convertToFloat) + '/' + signed_integer().setParseAction(convertToFloat)).setName("fraction") - """fractional expression of an integer divided by an integer, returns a float""" - fraction.addParseAction(lambda t: t[0]/t[-1]) - - mixed_integer = (fraction | signed_integer + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") - """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" - mixed_integer.addParseAction(sum) - - real = Regex(r'[+-]?\d+\.\d*').setName("real number").setParseAction(convertToFloat) - """expression that parses a floating point number and returns a float""" - - sci_real = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) - """expression that parses a floating point number with optional scientific notation and returns a float""" - - # streamlining this expression makes the docs nicer-looking - number = (sci_real | real | signed_integer).streamline() - """any numeric expression, returns the corresponding Python type""" - - fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat) - """any int or real number, returned as float""" - - identifier = Word(alphas+'_', alphanums+'_').setName("identifier") - """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" - - ipv4_address = Regex(r'(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}').setName("IPv4 address") - "IPv4 address (C{0.0.0.0 - 255.255.255.255})" - - _ipv6_part = Regex(r'[0-9a-fA-F]{1,4}').setName("hex_integer") - _full_ipv6_address = (_ipv6_part + (':' + _ipv6_part)*7).setName("full IPv6 address") - _short_ipv6_address = (Optional(_ipv6_part + (':' + _ipv6_part)*(0,6)) + "::" + Optional(_ipv6_part + (':' + _ipv6_part)*(0,6))).setName("short IPv6 address") - _short_ipv6_address.addCondition(lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8) - _mixed_ipv6_address = ("::ffff:" + ipv4_address).setName("mixed IPv6 address") - ipv6_address = Combine((_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).setName("IPv6 address")).setName("IPv6 address") - "IPv6 address (long, short, or mixed form)" - - mac_address = Regex(r'[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}').setName("MAC address") - "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" - - @staticmethod - def convertToDate(fmt="%Y-%m-%d"): - """ - Helper to create a parse action for converting parsed date string to Python datetime.date - - Params - - - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%d"}) - - Example:: - date_expr = pyparsing_common.iso8601_date.copy() - date_expr.setParseAction(pyparsing_common.convertToDate()) - print(date_expr.parseString("1999-12-31")) - prints:: - [datetime.date(1999, 12, 31)] - """ - def cvt_fn(s,l,t): - try: - return datetime.strptime(t[0], fmt).date() - except ValueError as ve: - raise ParseException(s, l, str(ve)) - return cvt_fn - - @staticmethod - def convertToDatetime(fmt="%Y-%m-%dT%H:%M:%S.%f"): - """ - Helper to create a parse action for converting parsed datetime string to Python datetime.datetime - - Params - - - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%dT%H:%M:%S.%f"}) - - Example:: - dt_expr = pyparsing_common.iso8601_datetime.copy() - dt_expr.setParseAction(pyparsing_common.convertToDatetime()) - print(dt_expr.parseString("1999-12-31T23:59:59.999")) - prints:: - [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] - """ - def cvt_fn(s,l,t): - try: - return datetime.strptime(t[0], fmt) - except ValueError as ve: - raise ParseException(s, l, str(ve)) - return cvt_fn - - iso8601_date = Regex(r'(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?').setName("ISO8601 date") - "ISO8601 date (C{yyyy-mm-dd})" - - iso8601_datetime = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?').setName("ISO8601 datetime") - "ISO8601 datetime (C{yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)}) - trailing seconds, milliseconds, and timezone optional; accepts separating C{'T'} or C{' '}" - - uuid = Regex(r'[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}').setName("UUID") - "UUID (C{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})" - - _html_stripper = anyOpenTag.suppress() | anyCloseTag.suppress() - @staticmethod - def stripHTMLTags(s, l, tokens): - """ - Parse action to remove HTML tags from web page HTML source - - Example:: - # strip HTML links from normal text - text = 'More info at the
    pyparsing wiki page' - td,td_end = makeHTMLTags("TD") - table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end - - print(table_text.parseString(text).body) # -> 'More info at the pyparsing wiki page' - """ - return pyparsing_common._html_stripper.transformString(tokens[0]) - - _commasepitem = Combine(OneOrMore(~Literal(",") + ~LineEnd() + Word(printables, excludeChars=',') - + Optional( White(" \t") ) ) ).streamline().setName("commaItem") - comma_separated_list = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("comma separated list") - """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" - - upcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).upper())) - """Parse action to convert tokens to upper case.""" - - downcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).lower())) - """Parse action to convert tokens to lower case.""" - - -if __name__ == "__main__": - - selectToken = CaselessLiteral("select") - fromToken = CaselessLiteral("from") - - ident = Word(alphas, alphanums + "_$") - - columnName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) - columnNameList = Group(delimitedList(columnName)).setName("columns") - columnSpec = ('*' | columnNameList) - - tableName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) - tableNameList = Group(delimitedList(tableName)).setName("tables") - - simpleSQL = selectToken("command") + columnSpec("columns") + fromToken + tableNameList("tables") - - # demo runTests method, including embedded comments in test string - simpleSQL.runTests(""" - # '*' as column list and dotted table name - select * from SYS.XYZZY - - # caseless match on "SELECT", and casts back to "select" - SELECT * from XYZZY, ABC - - # list of column names, and mixed case SELECT keyword - Select AA,BB,CC from Sys.dual - - # multiple tables - Select A, B, C from Sys.dual, Table2 - - # invalid SELECT keyword - should fail - Xelect A, B, C from Sys.dual - - # incomplete command - should fail - Select - - # invalid column name - should fail - Select ^^^ frox Sys.dual - - """) - - pyparsing_common.number.runTests(""" - 100 - -100 - +100 - 3.14159 - 6.02e23 - 1e-12 - """) - - # any int or real number, returned as float - pyparsing_common.fnumber.runTests(""" - 100 - -100 - +100 - 3.14159 - 6.02e23 - 1e-12 - """) - - pyparsing_common.hex_integer.runTests(""" - 100 - FF - """) - - import uuid - pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) - pyparsing_common.uuid.runTests(""" - 12345678-1234-5678-1234-567812345678 - """) diff --git a/pkg_resources/_vendor/six.py b/pkg_resources/_vendor/six.py deleted file mode 100644 index 190c0239cd..0000000000 --- a/pkg_resources/_vendor/six.py +++ /dev/null @@ -1,868 +0,0 @@ -"""Utilities for writing code that runs on Python 2 and 3""" - -# Copyright (c) 2010-2015 Benjamin Peterson -# -# 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. - -from __future__ import absolute_import - -import functools -import itertools -import operator -import sys -import types - -__author__ = "Benjamin Peterson " -__version__ = "1.10.0" - - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 -PY34 = sys.version_info[0:2] >= (3, 4) - -if PY3: - string_types = str, - integer_types = int, - class_types = type, - text_type = str - binary_type = bytes - - MAXSIZE = sys.maxsize -else: - string_types = basestring, - integer_types = (int, long) - class_types = (type, types.ClassType) - text_type = unicode - binary_type = str - - if sys.platform.startswith("java"): - # Jython always uses 32 bits. - MAXSIZE = int((1 << 31) - 1) - else: - # It's possible to have sizeof(long) != sizeof(Py_ssize_t). - class X(object): - - def __len__(self): - return 1 << 31 - try: - len(X()) - except OverflowError: - # 32-bit - MAXSIZE = int((1 << 31) - 1) - else: - # 64-bit - MAXSIZE = int((1 << 63) - 1) - del X - - -def _add_doc(func, doc): - """Add documentation to a function.""" - func.__doc__ = doc - - -def _import_module(name): - """Import module, returning the module after the last dot.""" - __import__(name) - return sys.modules[name] - - -class _LazyDescr(object): - - def __init__(self, name): - self.name = name - - def __get__(self, obj, tp): - result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. - try: - # This is a bit ugly, but it avoids running this again by - # removing this descriptor. - delattr(obj.__class__, self.name) - except AttributeError: - pass - return result - - -class MovedModule(_LazyDescr): - - def __init__(self, name, old, new=None): - super(MovedModule, self).__init__(name) - if PY3: - if new is None: - new = name - self.mod = new - else: - self.mod = old - - def _resolve(self): - return _import_module(self.mod) - - def __getattr__(self, attr): - _module = self._resolve() - value = getattr(_module, attr) - setattr(self, attr, value) - return value - - -class _LazyModule(types.ModuleType): - - def __init__(self, name): - super(_LazyModule, self).__init__(name) - self.__doc__ = self.__class__.__doc__ - - def __dir__(self): - attrs = ["__doc__", "__name__"] - attrs += [attr.name for attr in self._moved_attributes] - return attrs - - # Subclasses should override this - _moved_attributes = [] - - -class MovedAttribute(_LazyDescr): - - def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): - super(MovedAttribute, self).__init__(name) - if PY3: - if new_mod is None: - new_mod = name - self.mod = new_mod - if new_attr is None: - if old_attr is None: - new_attr = name - else: - new_attr = old_attr - self.attr = new_attr - else: - self.mod = old_mod - if old_attr is None: - old_attr = name - self.attr = old_attr - - def _resolve(self): - module = _import_module(self.mod) - return getattr(module, self.attr) - - -class _SixMetaPathImporter(object): - - """ - A meta path importer to import six.moves and its submodules. - - This class implements a PEP302 finder and loader. It should be compatible - with Python 2.5 and all existing versions of Python3 - """ - - def __init__(self, six_module_name): - self.name = six_module_name - self.known_modules = {} - - def _add_module(self, mod, *fullnames): - for fullname in fullnames: - self.known_modules[self.name + "." + fullname] = mod - - def _get_module(self, fullname): - return self.known_modules[self.name + "." + fullname] - - def find_module(self, fullname, path=None): - if fullname in self.known_modules: - return self - return None - - def __get_module(self, fullname): - try: - return self.known_modules[fullname] - except KeyError: - raise ImportError("This loader does not know module " + fullname) - - def load_module(self, fullname): - try: - # in case of a reload - return sys.modules[fullname] - except KeyError: - pass - mod = self.__get_module(fullname) - if isinstance(mod, MovedModule): - mod = mod._resolve() - else: - mod.__loader__ = self - sys.modules[fullname] = mod - return mod - - def is_package(self, fullname): - """ - Return true, if the named module is a package. - - We need this method to get correct spec objects with - Python 3.4 (see PEP451) - """ - return hasattr(self.__get_module(fullname), "__path__") - - def get_code(self, fullname): - """Return None - - Required, if is_package is implemented""" - self.__get_module(fullname) # eventually raises ImportError - return None - get_source = get_code # same as get_code - -_importer = _SixMetaPathImporter(__name__) - - -class _MovedItems(_LazyModule): - - """Lazy loading of moved objects""" - __path__ = [] # mark as package - - -_moved_attributes = [ - MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), - MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), - MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), - MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), - MovedAttribute("intern", "__builtin__", "sys"), - MovedAttribute("map", "itertools", "builtins", "imap", "map"), - MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), - MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), - MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), - MovedAttribute("reduce", "__builtin__", "functools"), - MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), - MovedAttribute("StringIO", "StringIO", "io"), - MovedAttribute("UserDict", "UserDict", "collections"), - MovedAttribute("UserList", "UserList", "collections"), - MovedAttribute("UserString", "UserString", "collections"), - MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), - MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), - MovedModule("html_parser", "HTMLParser", "html.parser"), - MovedModule("http_client", "httplib", "http.client"), - MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), - MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), - MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), - MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), - MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), - MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), - MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), - MovedModule("cPickle", "cPickle", "pickle"), - MovedModule("queue", "Queue"), - MovedModule("reprlib", "repr"), - MovedModule("socketserver", "SocketServer"), - MovedModule("_thread", "thread", "_thread"), - MovedModule("tkinter", "Tkinter"), - MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), - MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), - MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), - MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), - MovedModule("tkinter_tix", "Tix", "tkinter.tix"), - MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), - MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), - MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), - MovedModule("tkinter_colorchooser", "tkColorChooser", - "tkinter.colorchooser"), - MovedModule("tkinter_commondialog", "tkCommonDialog", - "tkinter.commondialog"), - MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), - MovedModule("tkinter_font", "tkFont", "tkinter.font"), - MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), - MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", - "tkinter.simpledialog"), - MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), - MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), - MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), - MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), - MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), -] -# Add windows specific modules. -if sys.platform == "win32": - _moved_attributes += [ - MovedModule("winreg", "_winreg"), - ] - -for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) - if isinstance(attr, MovedModule): - _importer._add_module(attr, "moves." + attr.name) -del attr - -_MovedItems._moved_attributes = _moved_attributes - -moves = _MovedItems(__name__ + ".moves") -_importer._add_module(moves, "moves") - - -class Module_six_moves_urllib_parse(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_parse""" - - -_urllib_parse_moved_attributes = [ - MovedAttribute("ParseResult", "urlparse", "urllib.parse"), - MovedAttribute("SplitResult", "urlparse", "urllib.parse"), - MovedAttribute("parse_qs", "urlparse", "urllib.parse"), - MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), - MovedAttribute("urldefrag", "urlparse", "urllib.parse"), - MovedAttribute("urljoin", "urlparse", "urllib.parse"), - MovedAttribute("urlparse", "urlparse", "urllib.parse"), - MovedAttribute("urlsplit", "urlparse", "urllib.parse"), - MovedAttribute("urlunparse", "urlparse", "urllib.parse"), - MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), - MovedAttribute("quote", "urllib", "urllib.parse"), - MovedAttribute("quote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote", "urllib", "urllib.parse"), - MovedAttribute("unquote_plus", "urllib", "urllib.parse"), - MovedAttribute("urlencode", "urllib", "urllib.parse"), - MovedAttribute("splitquery", "urllib", "urllib.parse"), - MovedAttribute("splittag", "urllib", "urllib.parse"), - MovedAttribute("splituser", "urllib", "urllib.parse"), - MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), - MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), - MovedAttribute("uses_params", "urlparse", "urllib.parse"), - MovedAttribute("uses_query", "urlparse", "urllib.parse"), - MovedAttribute("uses_relative", "urlparse", "urllib.parse"), -] -for attr in _urllib_parse_moved_attributes: - setattr(Module_six_moves_urllib_parse, attr.name, attr) -del attr - -Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes - -_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), - "moves.urllib_parse", "moves.urllib.parse") - - -class Module_six_moves_urllib_error(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_error""" - - -_urllib_error_moved_attributes = [ - MovedAttribute("URLError", "urllib2", "urllib.error"), - MovedAttribute("HTTPError", "urllib2", "urllib.error"), - MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), -] -for attr in _urllib_error_moved_attributes: - setattr(Module_six_moves_urllib_error, attr.name, attr) -del attr - -Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes - -_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), - "moves.urllib_error", "moves.urllib.error") - - -class Module_six_moves_urllib_request(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_request""" - - -_urllib_request_moved_attributes = [ - MovedAttribute("urlopen", "urllib2", "urllib.request"), - MovedAttribute("install_opener", "urllib2", "urllib.request"), - MovedAttribute("build_opener", "urllib2", "urllib.request"), - MovedAttribute("pathname2url", "urllib", "urllib.request"), - MovedAttribute("url2pathname", "urllib", "urllib.request"), - MovedAttribute("getproxies", "urllib", "urllib.request"), - MovedAttribute("Request", "urllib2", "urllib.request"), - MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), - MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), - MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), - MovedAttribute("BaseHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), - MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), - MovedAttribute("FileHandler", "urllib2", "urllib.request"), - MovedAttribute("FTPHandler", "urllib2", "urllib.request"), - MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), - MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), - MovedAttribute("urlretrieve", "urllib", "urllib.request"), - MovedAttribute("urlcleanup", "urllib", "urllib.request"), - MovedAttribute("URLopener", "urllib", "urllib.request"), - MovedAttribute("FancyURLopener", "urllib", "urllib.request"), - MovedAttribute("proxy_bypass", "urllib", "urllib.request"), -] -for attr in _urllib_request_moved_attributes: - setattr(Module_six_moves_urllib_request, attr.name, attr) -del attr - -Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes - -_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), - "moves.urllib_request", "moves.urllib.request") - - -class Module_six_moves_urllib_response(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_response""" - - -_urllib_response_moved_attributes = [ - MovedAttribute("addbase", "urllib", "urllib.response"), - MovedAttribute("addclosehook", "urllib", "urllib.response"), - MovedAttribute("addinfo", "urllib", "urllib.response"), - MovedAttribute("addinfourl", "urllib", "urllib.response"), -] -for attr in _urllib_response_moved_attributes: - setattr(Module_six_moves_urllib_response, attr.name, attr) -del attr - -Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes - -_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), - "moves.urllib_response", "moves.urllib.response") - - -class Module_six_moves_urllib_robotparser(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_robotparser""" - - -_urllib_robotparser_moved_attributes = [ - MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), -] -for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -del attr - -Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes - -_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), - "moves.urllib_robotparser", "moves.urllib.robotparser") - - -class Module_six_moves_urllib(types.ModuleType): - - """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" - __path__ = [] # mark as package - parse = _importer._get_module("moves.urllib_parse") - error = _importer._get_module("moves.urllib_error") - request = _importer._get_module("moves.urllib_request") - response = _importer._get_module("moves.urllib_response") - robotparser = _importer._get_module("moves.urllib_robotparser") - - def __dir__(self): - return ['parse', 'error', 'request', 'response', 'robotparser'] - -_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), - "moves.urllib") - - -def add_move(move): - """Add an item to six.moves.""" - setattr(_MovedItems, move.name, move) - - -def remove_move(name): - """Remove item from six.moves.""" - try: - delattr(_MovedItems, name) - except AttributeError: - try: - del moves.__dict__[name] - except KeyError: - raise AttributeError("no such move, %r" % (name,)) - - -if PY3: - _meth_func = "__func__" - _meth_self = "__self__" - - _func_closure = "__closure__" - _func_code = "__code__" - _func_defaults = "__defaults__" - _func_globals = "__globals__" -else: - _meth_func = "im_func" - _meth_self = "im_self" - - _func_closure = "func_closure" - _func_code = "func_code" - _func_defaults = "func_defaults" - _func_globals = "func_globals" - - -try: - advance_iterator = next -except NameError: - def advance_iterator(it): - return it.next() -next = advance_iterator - - -try: - callable = callable -except NameError: - def callable(obj): - return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) - - -if PY3: - def get_unbound_function(unbound): - return unbound - - create_bound_method = types.MethodType - - def create_unbound_method(func, cls): - return func - - Iterator = object -else: - def get_unbound_function(unbound): - return unbound.im_func - - def create_bound_method(func, obj): - return types.MethodType(func, obj, obj.__class__) - - def create_unbound_method(func, cls): - return types.MethodType(func, None, cls) - - class Iterator(object): - - def next(self): - return type(self).__next__(self) - - callable = callable -_add_doc(get_unbound_function, - """Get the function out of a possibly unbound function""") - - -get_method_function = operator.attrgetter(_meth_func) -get_method_self = operator.attrgetter(_meth_self) -get_function_closure = operator.attrgetter(_func_closure) -get_function_code = operator.attrgetter(_func_code) -get_function_defaults = operator.attrgetter(_func_defaults) -get_function_globals = operator.attrgetter(_func_globals) - - -if PY3: - def iterkeys(d, **kw): - return iter(d.keys(**kw)) - - def itervalues(d, **kw): - return iter(d.values(**kw)) - - def iteritems(d, **kw): - return iter(d.items(**kw)) - - def iterlists(d, **kw): - return iter(d.lists(**kw)) - - viewkeys = operator.methodcaller("keys") - - viewvalues = operator.methodcaller("values") - - viewitems = operator.methodcaller("items") -else: - def iterkeys(d, **kw): - return d.iterkeys(**kw) - - def itervalues(d, **kw): - return d.itervalues(**kw) - - def iteritems(d, **kw): - return d.iteritems(**kw) - - def iterlists(d, **kw): - return d.iterlists(**kw) - - viewkeys = operator.methodcaller("viewkeys") - - viewvalues = operator.methodcaller("viewvalues") - - viewitems = operator.methodcaller("viewitems") - -_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") -_add_doc(itervalues, "Return an iterator over the values of a dictionary.") -_add_doc(iteritems, - "Return an iterator over the (key, value) pairs of a dictionary.") -_add_doc(iterlists, - "Return an iterator over the (key, [values]) pairs of a dictionary.") - - -if PY3: - def b(s): - return s.encode("latin-1") - - def u(s): - return s - unichr = chr - import struct - int2byte = struct.Struct(">B").pack - del struct - byte2int = operator.itemgetter(0) - indexbytes = operator.getitem - iterbytes = iter - import io - StringIO = io.StringIO - BytesIO = io.BytesIO - _assertCountEqual = "assertCountEqual" - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" -else: - def b(s): - return s - # Workaround for standalone backslash - - def u(s): - return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") - unichr = unichr - int2byte = chr - - def byte2int(bs): - return ord(bs[0]) - - def indexbytes(buf, i): - return ord(buf[i]) - iterbytes = functools.partial(itertools.imap, ord) - import StringIO - StringIO = BytesIO = StringIO.StringIO - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -_add_doc(b, """Byte literal""") -_add_doc(u, """Text literal""") - - -def assertCountEqual(self, *args, **kwargs): - return getattr(self, _assertCountEqual)(*args, **kwargs) - - -def assertRaisesRegex(self, *args, **kwargs): - return getattr(self, _assertRaisesRegex)(*args, **kwargs) - - -def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -if PY3: - exec_ = getattr(moves.builtins, "exec") - - def reraise(tp, value, tb=None): - if value is None: - value = tp() - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - -else: - def exec_(_code_, _globs_=None, _locs_=None): - """Execute code in a namespace.""" - if _globs_ is None: - frame = sys._getframe(1) - _globs_ = frame.f_globals - if _locs_ is None: - _locs_ = frame.f_locals - del frame - elif _locs_ is None: - _locs_ = _globs_ - exec("""exec _code_ in _globs_, _locs_""") - - exec_("""def reraise(tp, value, tb=None): - raise tp, value, tb -""") - - -if sys.version_info[:2] == (3, 2): - exec_("""def raise_from(value, from_value): - if from_value is None: - raise value - raise value from from_value -""") -elif sys.version_info[:2] > (3, 2): - exec_("""def raise_from(value, from_value): - raise value from from_value -""") -else: - def raise_from(value, from_value): - raise value - - -print_ = getattr(moves.builtins, "print", None) -if print_ is None: - def print_(*args, **kwargs): - """The new-style print function for Python 2.4 and 2.5.""" - fp = kwargs.pop("file", sys.stdout) - if fp is None: - return - - def write(data): - if not isinstance(data, basestring): - data = str(data) - # If the file has an encoding, encode unicode with it. - if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): - errors = getattr(fp, "errors", None) - if errors is None: - errors = "strict" - data = data.encode(fp.encoding, errors) - fp.write(data) - want_unicode = False - sep = kwargs.pop("sep", None) - if sep is not None: - if isinstance(sep, unicode): - want_unicode = True - elif not isinstance(sep, str): - raise TypeError("sep must be None or a string") - end = kwargs.pop("end", None) - if end is not None: - if isinstance(end, unicode): - want_unicode = True - elif not isinstance(end, str): - raise TypeError("end must be None or a string") - if kwargs: - raise TypeError("invalid keyword arguments to print()") - if not want_unicode: - for arg in args: - if isinstance(arg, unicode): - want_unicode = True - break - if want_unicode: - newline = unicode("\n") - space = unicode(" ") - else: - newline = "\n" - space = " " - if sep is None: - sep = space - if end is None: - end = newline - for i, arg in enumerate(args): - if i: - write(sep) - write(arg) - write(end) -if sys.version_info[:2] < (3, 3): - _print = print_ - - def print_(*args, **kwargs): - fp = kwargs.get("file", sys.stdout) - flush = kwargs.pop("flush", False) - _print(*args, **kwargs) - if flush and fp is not None: - fp.flush() - -_add_doc(reraise, """Reraise an exception.""") - -if sys.version_info[0:2] < (3, 4): - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): - def wrapper(f): - f = functools.wraps(wrapped, assigned, updated)(f) - f.__wrapped__ = wrapped - return f - return wrapper -else: - wraps = functools.wraps - - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(meta): - - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - - -def python_2_unicode_compatible(klass): - """ - A decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method - returning text and apply this decorator to the class. - """ - if PY2: - if '__str__' not in klass.__dict__: - raise ValueError("@python_2_unicode_compatible cannot be applied " - "to %s because it doesn't define __str__()." % - klass.__name__) - klass.__unicode__ = klass.__str__ - klass.__str__ = lambda self: self.__unicode__().encode('utf-8') - return klass - - -# Complete the moves implementation. -# This code is at the end of this module to speed up module loading. -# Turn this module into a package. -__path__ = [] # required for PEP 302 and PEP 451 -__package__ = __name__ # see PEP 366 @ReservedAssignment -if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable -# Remove other six meta path importers, since they cause problems. This can -# happen if six is removed from sys.modules and then reloaded. (Setuptools does -# this for some reason.) -if sys.meta_path: - for i, importer in enumerate(sys.meta_path): - # Here's some real nastiness: Another "instance" of the six module might - # be floating around. Therefore, we can't use isinstance() to check for - # the six meta path importer, since the other six instance will have - # inserted an importer with different class. - if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): - del sys.meta_path[i] - break - del i, importer -# Finally, add the importer to the meta path import hook. -sys.meta_path.append(_importer) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt deleted file mode 100644 index 9a94c5bcc2..0000000000 --- a/pkg_resources/_vendor/vendored.txt +++ /dev/null @@ -1,4 +0,0 @@ -packaging==16.8 -pyparsing==2.1.10 -six==1.10.0 -appdirs==1.4.0 diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py deleted file mode 100644 index b4156fec20..0000000000 --- a/pkg_resources/extern/__init__.py +++ /dev/null @@ -1,73 +0,0 @@ -import sys - - -class VendorImporter: - """ - A PEP 302 meta path importer for finding optionally-vendored - or otherwise naturally-installed packages from root_name. - """ - - def __init__(self, root_name, vendored_names=(), vendor_pkg=None): - self.root_name = root_name - self.vendored_names = set(vendored_names) - self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') - - @property - def search_path(self): - """ - Search first the vendor package then as a natural package. - """ - yield self.vendor_pkg + '.' - yield '' - - def find_module(self, fullname, path=None): - """ - Return self when fullname starts with root_name and the - target module is one vendored through this importer. - """ - root, base, target = fullname.partition(self.root_name + '.') - if root: - return - if not any(map(target.startswith, self.vendored_names)): - return - return self - - def load_module(self, fullname): - """ - Iterate over the search path to locate and load fullname. - """ - root, base, target = fullname.partition(self.root_name + '.') - for prefix in self.search_path: - try: - extant = prefix + target - __import__(extant) - mod = sys.modules[extant] - sys.modules[fullname] = mod - # mysterious hack: - # Remove the reference to the extant package/module - # 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): - del sys.modules[extant] - return mod - except ImportError: - pass - else: - raise ImportError( - "The '{target}' package is required; " - "normally this is bundled with this package so if you get " - "this warning, consult the packager of your " - "distribution.".format(**locals()) - ) - - def install(self): - """ - Install this importer into sys.meta_path if not already present. - """ - if self not in sys.meta_path: - sys.meta_path.append(self) - - -names = 'packaging', 'pyparsing', 'six', 'appdirs' -VendorImporter(__name__, names).install() diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 49bf7a04b8..bef914a22a 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -12,7 +12,7 @@ import distutils.dist import distutils.command.install_egg_info -from pkg_resources.extern.six.moves import map +from six.moves import map import pytest diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 00ca74262a..f28378b9c6 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -5,10 +5,10 @@ import string import platform -from pkg_resources.extern.six.moves import map +from six.moves import map import pytest -from pkg_resources.extern import packaging +import packaging import pkg_resources from pkg_resources import (parse_requirements, VersionConflict, parse_version, diff --git a/setup.py b/setup.py index 8e125fc18e..bd58504225 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,10 @@ def require_metadata(): "Prevent improper installs without necessary metadata. See #659" if not os.path.exists('setuptools.egg-info'): - msg = "Cannot build setuptools without metadata. Run bootstrap.py" + msg = ( + "Cannot build setuptools without metadata. " + "Install rwt and run `rwt -- bootstrap.py`." + ) raise RuntimeError(msg) @@ -157,6 +160,11 @@ def pypi_link(pkg_filename): Topic :: Utilities """).strip().splitlines(), python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*', + install_requires=[ + 'packaging>=16.8', + 'six>=1.10.0', + 'appdirs>=1.4.0', + ], extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2016.9.26", diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 54577ceded..c60e1eaba6 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from setuptools.extern.six.moves import filter, filterfalse, map +from six.moves import filter, filterfalse, map import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 4532b1cc0d..35ece78d76 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,6 +1,6 @@ from distutils.errors import DistutilsOptionError -from setuptools.extern.six.moves import map +from six.moves import map from setuptools.command.setopt import edit_config, option_base, config_file diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 8cd9dfefe2..ae344cd051 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -11,7 +11,7 @@ import textwrap import marshal -from setuptools.extern import six +import six from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 36f53f0dd4..c2fd8704e0 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -10,7 +10,7 @@ from distutils import log from setuptools.extension import Library -from setuptools.extern import six +import six try: # Attempt to use Cython for building extensions, if available diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b0314fd413..56daa2bd32 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,8 +8,8 @@ import distutils.errors import itertools -from setuptools.extern import six -from setuptools.extern.six.moves import map, filter, filterfalse +import six +from six.moves import map, filter, filterfalse try: from setuptools.lib2to3_ex import Mixin2to3 diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index aa82f95920..1489de9e34 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,7 +5,7 @@ import glob import io -from setuptools.extern import six +import six from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 36e7f3598f..d3eabfc3ba 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,8 +40,8 @@ import shlex import io -from setuptools.extern import six -from setuptools.extern.six.moves import configparser, map +import six +from six.moves import configparser, map from setuptools import Command from setuptools.sandbox import run_setup diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 98a8730008..2bc57b18c2 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -16,8 +16,8 @@ import time import collections -from setuptools.extern import six -from setuptools.extern.six.moves import map +import six +from six.moves import map from setuptools import Command from setuptools.command.sdist import sdist @@ -30,7 +30,7 @@ import setuptools.unicode_utils as unicode_utils from setuptools.glob import glob -from pkg_resources.extern import packaging +import packaging def translate_pattern(glob): diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 61063e7542..a2c74b2d76 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -3,7 +3,7 @@ from distutils.util import convert_path from distutils.command import sdist -from setuptools.extern.six.moves import filter +from six.moves import filter class sdist_add_defaults: diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index b89353f529..7ea36e968e 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -4,7 +4,7 @@ import os import shutil -from setuptools.extern import six +import six from setuptools import Command diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 84e29a1b7d..2c2d88afa5 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,7 +5,7 @@ import io import contextlib -from setuptools.extern import six +import six from .py36compat import sdist_add_defaults diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 7e57cc0262..6f6298c46f 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,7 +4,7 @@ import distutils import os -from setuptools.extern.six.moves import configparser +from six.moves import configparser from setuptools import Command diff --git a/setuptools/command/test.py b/setuptools/command/test.py index ef0af12f12..e7a386d19d 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -7,8 +7,8 @@ from distutils import log from unittest import TestLoader -from setuptools.extern import six -from setuptools.extern.six.moves import map, filter +import six +from six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 269dc2d503..eeb0718b67 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,8 +16,8 @@ import itertools import functools -from setuptools.extern import six -from setuptools.extern.six.moves import http_client, urllib +import six +from six.moves import http_client, urllib from pkg_resources import iter_entry_points from .upload import upload diff --git a/setuptools/config.py b/setuptools/config.py index d71ff028da..19b39629c7 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -7,7 +7,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.py26compat import import_module -from setuptools.extern.six import string_types +from six import string_types def read_configuration( diff --git a/setuptools/dist.py b/setuptools/dist.py index 159464be23..be55dc4e65 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -12,9 +12,9 @@ DistutilsSetupError) from distutils.util import rfc822_escape -from setuptools.extern import six -from setuptools.extern.six.moves import map -from pkg_resources.extern import packaging +import six +from six.moves import map +import packaging from setuptools.depends import Require from setuptools import windows_support diff --git a/setuptools/extension.py b/setuptools/extension.py index 29468894f8..34a36dfbb3 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -4,7 +4,7 @@ import distutils.errors import distutils.extension -from setuptools.extern.six.moves import map +from six.moves import map from .monkey import get_unpatched diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py deleted file mode 100644 index 2cd08b7ed9..0000000000 --- a/setuptools/extern/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from pkg_resources.extern import VendorImporter - -names = 'six', -VendorImporter(__name__, names, 'pkg_resources._vendor').install() diff --git a/setuptools/glob.py b/setuptools/glob.py index 6c781de349..f264402671 100644 --- a/setuptools/glob.py +++ b/setuptools/glob.py @@ -10,7 +10,7 @@ import os import re import fnmatch -from setuptools.extern.six import binary_type +from six import binary_type __all__ = ["glob", "iglob", "escape"] diff --git a/setuptools/monkey.py b/setuptools/monkey.py index dbe9a6176d..5843c46bbc 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -10,7 +10,7 @@ import inspect from .py26compat import import_module -from setuptools.extern import six +import six import setuptools diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 447ddb3822..97e27303f8 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -20,14 +20,14 @@ import platform import itertools import distutils.errors -from pkg_resources.extern.packaging.version import LegacyVersion +from packaging.version import LegacyVersion -from setuptools.extern.six.moves import filterfalse +from six.moves import filterfalse from .monkey import get_unpatched if platform.system() == 'Windows': - from setuptools.extern.six.moves import winreg + from six.moves import winreg safe_env = os.environ else: """ diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 0a889f224a..ba90743964 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -3,7 +3,7 @@ from distutils import log import itertools -from setuptools.extern.six.moves import map +from six.moves import map flatten = itertools.chain.from_iterable diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d80d43bc79..65c3c433a1 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -14,8 +14,8 @@ except ImportError: from urllib2 import splituser -from setuptools.extern import six -from setuptools.extern.six.moves import urllib, http_client, configparser, map +import six +from six.moves import urllib, http_client, configparser, map import setuptools from pkg_resources import ( diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index 2588d680cd..ad91d73eae 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -3,7 +3,7 @@ import array import collections -from setuptools.extern import six +import six OpArg = collections.namedtuple('OpArg', 'opcode arg') diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 817a3afaae..0ddd233242 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,8 +8,8 @@ import contextlib import pickle -from setuptools.extern import six -from setuptools.extern.six.moves import builtins, map +import six +from six.moves import builtins, map import pkg_resources diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 82f8870ab8..efeef71dcb 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,7 +3,7 @@ import atexit import re -from setuptools.extern.six.moves import urllib, http_client, map +from six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index dbf1620108..f54c478e1a 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -8,7 +8,7 @@ from distutils.core import Extension from distutils.version import LooseVersion -from setuptools.extern import six +import six import pytest import setuptools.dist diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 535ae10766..77ebecf92f 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -5,7 +5,7 @@ import contextlib import site -from setuptools.extern import six +import six import pkg_resources diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 35312120bb..5cdde21722 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -4,7 +4,7 @@ import time import threading -from setuptools.extern.six.moves import BaseHTTPServer, SimpleHTTPServer +from six.moves import BaseHTTPServer, SimpleHTTPServer class IndexServer(BaseHTTPServer.HTTPServer): diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index b789e9acef..5cdf63f2bb 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -3,7 +3,7 @@ import tarfile import io -from setuptools.extern import six +import six import pytest diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 602571540f..59a896d81f 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -2,7 +2,7 @@ import distutils.command.build_ext as orig from distutils.sysconfig import get_config_var -from setuptools.extern import six +import six from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 5dd72aaee8..3b1b1e2d54 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -9,7 +9,7 @@ import io import subprocess -from setuptools.extern import six +import six from setuptools.command import test import pytest diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index f7e7d2bf0a..24c5149af2 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals -from setuptools.extern.six.moves import map +from six.moves import map import pytest diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1ea33b0890..f5c932dac1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,7 +16,7 @@ import zipfile import time -from setuptools.extern.six.moves import urllib +from six.moves import urllib import pytest try: diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a32b981d67..c9a4425af7 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,7 +6,7 @@ from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution -from setuptools.extern.six.moves import map +from six.moves import map import pytest diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 78fb0627b0..a83d4fe867 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -7,7 +7,7 @@ import os import sys -from setuptools.extern.six.moves import urllib +from six.moves import urllib import pytest from setuptools.command.easy_install import easy_install diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 602c43a274..cf39346a18 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -11,7 +11,7 @@ from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution -from setuptools.extern import six +import six from setuptools.tests.textwrap import DALS import pytest diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index f09dd78c31..d68867c227 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -4,8 +4,8 @@ import os import distutils.errors -from setuptools.extern import six -from setuptools.extern.six.moves import urllib, http_client +import six +from six.moves import urllib, http_client import pkg_resources import setuptools.package_index diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f34068dcd3..38fdda248e 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,8 +9,8 @@ import contextlib import io -from setuptools.extern import six -from setuptools.extern.six.moves import map +import six +from six.moves import map import pytest diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 7c63efd20b..6a84f9bead 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,7 +1,7 @@ import unicodedata import sys -from setuptools.extern import six +import six # HFS Plus uses decomposed UTF-8 diff --git a/tests/test_pypi.py b/tests/test_pypi.py index b3425e53bc..173b2c876b 100644 --- a/tests/test_pypi.py +++ b/tests/test_pypi.py @@ -2,8 +2,8 @@ import subprocess import virtualenv -from setuptools.extern.six.moves import http_client -from setuptools.extern.six.moves import xmlrpc_client +from six.moves import http_client +from six.moves import xmlrpc_client TOP = 200 PYPI_HOSTNAME = 'pypi.python.org' diff --git a/tox.ini b/tox.ini index 3c222bf7fd..5fcad763b4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,9 @@ [testenv] -deps=-rtests/requirements.txt +deps= + -rtests/requirements.txt + packaging + appdirs + six passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR commands=py.test {posargs:-rsx} usedevelop=True From a36dbf75bd6b1283fd3da28c25fd583f20025c36 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 23:12:23 -0500 Subject: [PATCH 6435/8469] In the bootstrap script, generate a requirements.txt file and use it to install the dependencies just in time to make them available long enough to generate the egg info. --- .gitignore | 1 + .travis.yml | 2 +- bootstrap.py | 40 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4d77520f68..ec3d0e3522 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ setuptools.egg-info *.swp *~ .hg* +requirements.txt diff --git a/.travis.yml b/.travis.yml index cb8cae908d..210926df37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ script: - env # update egg_info based on setup.py in checkout - - rwt -- bootstrap.py + - python bootstrap.py - tox diff --git a/bootstrap.py b/bootstrap.py index 761b8dfcd2..705a87201b 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,13 +5,18 @@ egg-info command to flesh out the egg-info directory. """ -__requires__ = ['packaging', 'six', 'appdirs'] - import os +import io +import re +import contextlib +import tempfile +import shutil import sys import textwrap import subprocess +import pip + minimal_egg_info = textwrap.dedent(""" [distutils.commands] egg_info = setuptools.command.egg_info:egg_info @@ -54,6 +59,35 @@ def run_egg_info(): subprocess.check_call(cmd) +def gen_deps(): + with io.open('setup.py', encoding='utf-8') as strm: + text = strm.read() + pattern = r'install_requires=\[(.*?)\]' + match = re.search(pattern, text, flags=re.M|re.DOTALL) + reqs = eval(match.group(1).replace('\n', '')) + with io.open('requirements.txt', 'w', encoding='utf-8') as reqs_file: + reqs_file.write('\n'.join(reqs)) + + +@contextlib.contextmanager +def install_deps(): + "Just in time make the deps available" + gen_deps() + tmpdir = tempfile.mkdtemp() + args = [ + 'install', + '-t', tmpdir, + '-r', 'requirements.txt', + ] + pip.main(args) + os.environ['PYTHONPATH'] = tmpdir + try: + yield tmpdir + finally: + shutil.rmtree(tmpdir) + + if __name__ == '__main__': ensure_egg_info() - run_egg_info() + with install_deps(): + run_egg_info() From 377e4b4f6a8a1a4b2f07f6d45f9641e733c61452 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 23:13:29 -0500 Subject: [PATCH 6436/8469] Also have tox reference the generated requirements.txt --- tox.ini | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 5fcad763b4..6b43dcd80b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,7 @@ [testenv] deps= -rtests/requirements.txt - packaging - appdirs - six + -rrequirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR commands=py.test {posargs:-rsx} usedevelop=True From 767dcea007cf19b016c33f036f750c87b5876d1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Jan 2017 23:15:38 -0500 Subject: [PATCH 6437/8469] Use unicode literals --- bootstrap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index 705a87201b..f7644f12aa 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,6 +5,8 @@ egg-info command to flesh out the egg-info directory. """ +from __future__ import unicode_literals + import os import io import re @@ -47,7 +49,8 @@ def build_egg_info(): """ os.mkdir('setuptools.egg-info') - with open('setuptools.egg-info/entry_points.txt', 'w') as ep: + filename = 'setuptools.egg-info/entry_points.txt' + with io.open(filename, 'w', encoding='utf-8') as ep: ep.write(minimal_egg_info) From 80d29ed93d0ee3ea95ea921ae38e59bb86d4f627 Mon Sep 17 00:00:00 2001 From: Patrick Lannigan Date: Mon, 2 Jan 2017 08:15:40 -0500 Subject: [PATCH 6438/8469] Document use of environment markers in extras_require --- docs/setuptools.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2f78b133de..94ee09ad1a 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -769,6 +769,38 @@ so that Package B doesn't have to remove the ``[PDF]`` from its requirement specifier. +.. _Platform Specific Dependencies: + + +Declaring platform specific dependencies +---------------------------------------- + +Sometimes a project might require a dependency to run on a specific platform. +This could to a package that back ports a module so that it can be used in +older python versions. Or it could be a package that is required to run on a +specific operating system. This will allow a project to work on multiple +different platforms without installing dependencies that are not required for +a platform that is installing the project. + +For example, here is a project that uses the ``enum`` module and ``pywin32``:: + + setup( + name="Project", + ... + extras_require={ + ':python_version < "3.4"': ["enum34"], + ':sys_platform == "win32"': ["pywin32 >= 1.0"] + } + ) + +Since the ``enum`` module was added in python 3.4, it should only be installed +if the python version is earlier. Since ``pywin32`` will only be used on +windows, it should only be installed when the operating system is Windows. +Specifying version requirements for the dependencies is supported as normal. + +The environmental markers that may be used for testing platform types are +detailed in PEP 496. + Including Data Files ==================== From dc8683bd8e8600680a7581fd3a2d34ba8f1fa0ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jan 2017 09:29:42 -0500 Subject: [PATCH 6439/8469] More aggressively remove references to 'tag_svn_revision' option in egg_info. Ref #619. --- setup.cfg | 2 +- setuptools/command/egg_info.py | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/setup.cfg b/setup.cfg index e46be52a14..406aa4f91f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ tag_build = .post tag_date = 1 [aliases] -clean_egg_info = egg_info -RDb '' +clean_egg_info = egg_info -Db '' release = clean_egg_info sdist bdist_wheel source = register sdist binary binary = bdist_egg upload --show-response diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 98a8730008..e3578074d0 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -121,18 +121,13 @@ class egg_info(Command): user_options = [ ('egg-base=', 'e', "directory containing .egg-info directories" " (default: top of the source tree)"), - ('tag-svn-revision', 'r', - "Add subversion revision ID to version number"), ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"), ('tag-build=', 'b', "Specify explicit tag to add to version number"), - ('no-svn-revision', 'R', - "Don't add subversion revision ID [default]"), ('no-date', 'D', "Don't include date stamp [default]"), ] - boolean_options = ['tag-date', 'tag-svn-revision'] + boolean_options = ['tag-date'] negative_opt = { - 'no-svn-revision': 'tag-svn-revision', 'no-date': 'tag-date', } @@ -148,8 +143,8 @@ def initialize_options(self): def save_version_info(self, filename): """ - Materialize the values of svn_revision and date into the - build tag. Install these keys in a deterministic order + Materialize the value of date into the + build tag. Install build keys in a deterministic order to avoid arbitrary reordering on subsequent builds. """ # python 2.6 compatibility From b848627d17328cab9bdce4fabd314c76d5f7d96e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jan 2017 09:56:47 -0500 Subject: [PATCH 6440/8469] Add a no-op property for 'tag_svn_revision' to suppress errors when distutils attempts to detect and set these values based on settings in setup.cfg as found in sdists built by earlier versions of setuptools. Ref #619. --- setuptools/command/egg_info.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e3578074d0..ca6a4348af 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -141,6 +141,18 @@ def initialize_options(self): self.broken_egg_info = False self.vtags = None + #################################### + # allow the 'tag_svn_revision' to be detected and + # set, supporting sdists built on older Setuptools. + @property + def tag_svn_revision(self): + pass + + @tag_svn_revision.setter + def tag_svn_revision(self, value): + pass + #################################### + def save_version_info(self, filename): """ Materialize the value of date into the From 76e888d72b178880d62a731da52b9a3a51832a4f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jan 2017 10:16:27 -0500 Subject: [PATCH 6441/8469] Remove references to SVN sandbox. --- docs/setuptools.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2f78b133de..7dcbb6f2c9 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -59,14 +59,6 @@ Feature Highlights: * Create extensible applications and frameworks that automatically discover extensions, using simple "entry points" declared in a project's setup script. -In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `Python SVN sandbox`_, and in-development versions of the -`0.6 branch`_ are available as well. - -.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - -.. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev - .. contents:: **Table of Contents** .. _ez_setup.py: `bootstrap module`_ From 8db1d2d4f72f347f3fd5a9d8cf4a225173251318 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Jan 2017 10:22:37 -0500 Subject: [PATCH 6442/8469] Remove documentation about tag-svn-revision. Ref #619. --- docs/setuptools.txt | 102 +++----------------------------------------- 1 file changed, 7 insertions(+), 95 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7dcbb6f2c9..458ad59b6b 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1414,10 +1414,6 @@ egg distributions by adding one or more of the following to the project's manually-specified post-release tag, such as a build or revision number (``--tag-build=STRING, -bSTRING``) -* A "last-modified revision number" string generated automatically from - Subversion's metadata (assuming your project is being built from a Subversion - "working copy") (``--tag-svn-revision, -r``) - * An 8-character representation of the build date (``--tag-date, -d``), as a postrelease tag @@ -1549,68 +1545,6 @@ this:: in order to check out the in-development version of ``projectname``. -Managing "Continuous Releases" Using Subversion ------------------------------------------------ - -If you expect your users to track in-development versions of your project via -Subversion, there are a few additional steps you should take to ensure that -things work smoothly with EasyInstall. First, you should add the following -to your project's ``setup.cfg`` file: - -.. code-block:: ini - - [egg_info] - tag_build = .dev - tag_svn_revision = 1 - -This will tell ``setuptools`` to generate package version numbers like -``1.0a1.dev-r1263``, which will be considered to be an *older* release than -``1.0a1``. Thus, when you actually release ``1.0a1``, the entire egg -infrastructure (including ``setuptools``, ``pkg_resources`` and EasyInstall) -will know that ``1.0a1`` supersedes any interim snapshots from Subversion, and -handle upgrades accordingly. - -(Note: the project version number you specify in ``setup.py`` should always be -the *next* version of your software, not the last released version. -Alternately, you can leave out the ``tag_build=.dev``, and always use the -*last* release as a version number, so that your post-1.0 builds are labelled -``1.0-r1263``, indicating a post-1.0 patchlevel. Most projects so far, -however, seem to prefer to think of their project as being a future version -still under development, rather than a past version being patched. It is of -course possible for a single project to have both situations, using -post-release numbering on release branches, and pre-release numbering on the -trunk. But you don't have to make things this complex if you don't want to.) - -Commonly, projects releasing code from Subversion will include a PyPI link to -their checkout URL (as described in the previous section) with an -``#egg=projectname-dev`` suffix. This allows users to request EasyInstall -to download ``projectname==dev`` in order to get the latest in-development -code. Note that if your project depends on such in-progress code, you may wish -to specify your ``install_requires`` (or other requirements) to include -``==dev``, e.g.: - -.. code-block:: python - - install_requires=["OtherProject>=0.2a1.dev-r143,==dev"] - -The above example says, "I really want at least this particular development -revision number, but feel free to follow and use an ``#egg=OtherProject-dev`` -link if you find one". This avoids the need to have actual source or binary -distribution snapshots of in-development code available, just to be able to -depend on the latest and greatest a project has to offer. - -A final note for Subversion development: if you are using SVN revision tags -as described in this section, it's a good idea to run ``setup.py develop`` -after each Subversion checkin or update, because your project's version number -will be changing, and your script wrappers need to be updated accordingly. - -Also, if the project's requirements have changed, the ``develop`` command will -take care of fetching the updated dependencies, building changed extensions, -etc. Be sure to also remind any of your users who check out your project -from Subversion that they need to run ``setup.py develop`` after every update -in order to keep their checkout completely in sync. - - Making "Official" (Non-Snapshot) Releases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1624,18 +1558,18 @@ tagging the release, so the trunk will still produce development snapshots. Alternately, if you are not branching for releases, you can override the default version options on the command line, using something like:: - python setup.py egg_info -RDb "" sdist bdist_egg register upload + python setup.py egg_info -Db "" sdist bdist_egg register upload -The first part of this command (``egg_info -RDb ""``) will override the +The first part of this command (``egg_info -Db ""``) will override the configured tag information, before creating source and binary eggs, registering the project with PyPI, and uploading the files. Thus, these commands will use -the plain version from your ``setup.py``, without adding the Subversion -revision number or build designation string. +the plain version from your ``setup.py``, without adding the build designation +string. Of course, if you will be doing this a lot, you may wish to create a personal alias for this operation, e.g.:: - python setup.py alias -u release egg_info -RDb "" + python setup.py alias -u release egg_info -Db "" You can then use it like this:: @@ -1695,8 +1629,7 @@ the command line supplies its expansion. For example, this command defines a sitewide alias called "daily", that sets various ``egg_info`` tagging options:: - setup.py alias --global-config daily egg_info --tag-svn-revision \ - --tag-build=development + setup.py alias --global-config daily egg_info --tag-build=development Once the alias is defined, it can then be used with other setup commands, e.g.:: @@ -1706,7 +1639,7 @@ e.g.:: setup.py daily sdist bdist_egg # generate both The above commands are interpreted as if the word ``daily`` were replaced with -``egg_info --tag-svn-revision --tag-build=development``. +``egg_info --tag-build=development``. Note that setuptools will expand each alias *at most once* in a given command line. This serves two purposes. First, if you accidentally create an alias @@ -1993,27 +1926,6 @@ added in the following order: it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument to the ``egg_info`` command. -``--tag-svn-revision, -r`` - If the current directory is a Subversion checkout (i.e. has a ``.svn`` - subdirectory, this appends a string of the form "-rNNNN" to the project's - version string, where NNNN is the revision number of the most recent - modification to the current directory, as obtained from the ``svn info`` - command. - - If the current directory is not a Subversion checkout, the command will - look for a ``PKG-INFO`` file instead, and try to find the revision number - from that, by looking for a "-rNNNN" string at the end of the version - number. (This is so that building a package from a source distribution of - a Subversion snapshot will produce a binary with the correct version - number.) - - If there is no ``PKG-INFO`` file, or the version number contained therein - does not end with ``-r`` and a number, then ``-r0`` is used. - -``--no-svn-revision, -R`` - Don't include the Subversion revision in the version number. This option - is included so you can override a default setting put in ``setup.cfg``. - ``--tag-date, -d`` Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the project's version number. From 78339bc0d77649f47be496879e4a5f768657d229 Mon Sep 17 00:00:00 2001 From: Patrick Lannigan Date: Mon, 2 Jan 2017 16:40:22 -0500 Subject: [PATCH 6443/8469] Have documentation link to referenced PEP. --- docs/setuptools.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 94ee09ad1a..5dd30b13fe 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -799,7 +799,9 @@ windows, it should only be installed when the operating system is Windows. Specifying version requirements for the dependencies is supported as normal. The environmental markers that may be used for testing platform types are -detailed in PEP 496. +detailed in `PEP 496`_. + +.. _PEP 496: https://www.python.org/dev/peps/pep-0496/ Including Data Files ==================== From 37a48e9a7a5ae5ac770b05b8f1ff52bdceda3cae Mon Sep 17 00:00:00 2001 From: Patrick Lannigan Date: Mon, 2 Jan 2017 21:21:01 -0500 Subject: [PATCH 6444/8469] Document use of install_requires with corrected PEP PEP 496 is a draft that was never accepted, so it does not have the correct information. --- docs/setuptools.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5dd30b13fe..601628b4c8 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -787,21 +787,21 @@ For example, here is a project that uses the ``enum`` module and ``pywin32``:: setup( name="Project", ... - extras_require={ - ':python_version < "3.4"': ["enum34"], - ':sys_platform == "win32"': ["pywin32 >= 1.0"] - } + install_requires=[ + 'enum34;python_version<"3.4"', + 'pywin32 >= 1.0;platform_system=="Windows"' + ] ) -Since the ``enum`` module was added in python 3.4, it should only be installed +Since the ``enum`` module was added in Python 3.4, it should only be installed if the python version is earlier. Since ``pywin32`` will only be used on windows, it should only be installed when the operating system is Windows. Specifying version requirements for the dependencies is supported as normal. The environmental markers that may be used for testing platform types are -detailed in `PEP 496`_. +detailed in `PEP 508`_. -.. _PEP 496: https://www.python.org/dev/peps/pep-0496/ +.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ Including Data Files ==================== From e9f0e6f16b46d084bdf92606cd0217b3f12ed25a Mon Sep 17 00:00:00 2001 From: David Szotten Date: Thu, 5 Jan 2017 11:47:09 +0000 Subject: [PATCH 6445/8469] strip trailing slash from package_dir before counting slashes --- setuptools/command/develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index aa82f95920..ca05d1e30b 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -79,7 +79,7 @@ def finalize_options(self): project_name=ei.egg_name ) - p = self.egg_base.replace(os.sep, '/') + p = self.egg_base.replace(os.sep, '/').rstrip('/') if p != os.curdir: p = '../' * (p.count('/') + 1) self.setup_path = p From bb2251bae83b072cd972f6865198d70272e7a824 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Jan 2017 13:08:56 -0500 Subject: [PATCH 6446/8469] Include tox.ini in the sdist. Ref #904. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index e25a5ea577..325bbed82e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,3 +11,4 @@ include LICENSE include launcher.c include msvc-build-launcher.cmd include pytest.ini +include tox.ini From 93d8715bff84449b62c2439dfa5845a9d12006e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Jan 2017 13:10:31 -0500 Subject: [PATCH 6447/8469] Remove pytest alias. Use tox to run tests. Ref #904. --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 406aa4f91f..74d7e085ca 100755 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,6 @@ clean_egg_info = egg_info -Db '' release = clean_egg_info sdist bdist_wheel source = register sdist binary binary = bdist_egg upload --show-response -test = pytest [upload] repository = https://upload.pypi.org/legacy/ From 9c4d84f53e96b023c79ef54b8092a8c1440212ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Jan 2017 13:19:31 -0500 Subject: [PATCH 6448/8469] Update documentation references from removed pythonhosted docs to RTD. Fixes #903. --- CHANGES.rst | 10 +++++----- README.rst | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 264b939ad8..8c214db3a1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -97,7 +97,7 @@ v30.3.0 * #394 via #862: Added support for `declarative package config in a setup.cfg file - `_. + `_. v30.2.1 ------- @@ -708,7 +708,7 @@ v20.6.0 `semver `_ precisely. The 'v' prefix on version numbers now also allows version numbers to be referenced in the changelog, - e.g. https://pythonhosted.org/setuptools/history.html#v20-6-0. + e.g. http://setuptools.readthedocs.io/en/latest/history.html#v20-6-0. 20.5 ---- @@ -788,7 +788,7 @@ v20.6.0 * Added support for using passwords from keyring in the upload command. See `the upload docs - `_ + `_ for details. 20.0 @@ -1542,7 +1542,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. --- * Added a `Developer Guide - `_ to the official + `_ to the official documentation. * Some code refactoring and cleanup was done with no intended behavioral changes. @@ -2962,7 +2962,7 @@ easy_install * ``setuptools`` now finds its commands, ``setup()`` argument validators, and metadata writers using entry points, so that they can be extended by third-party packages. See `Creating distutils Extensions - `_ + `_ for more details. * The vestigial ``depends`` command has been removed. It was never finished diff --git a/README.rst b/README.rst index 9cb8758fb5..accaac3c3e 100755 --- a/README.rst +++ b/README.rst @@ -126,8 +126,8 @@ Use ``--help`` to get a full options list, but we recommend consulting the `EasyInstall manual`_ for detailed instructions, especially `the section on custom installation locations`_. -.. _EasyInstall manual: https://pythonhosted.org/setuptools/EasyInstall -.. _the section on custom installation locations: https://pythonhosted.org/setuptools/EasyInstall#custom-installation-locations +.. _EasyInstall manual: https://setuptools.readthedocs.io/en/latest/easy_install.html +.. _the section on custom installation locations: https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations Downloads From 3c182f9f1eea89040fbfc88d1ccbed31ece6a00b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Jan 2017 13:23:43 -0500 Subject: [PATCH 6449/8469] Remove documentation for upload_docs command, deprecated in v27. --- docs/setuptools.txt | 62 --------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5c72445b25..2a494fca2d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2273,68 +2273,6 @@ password from the keyring. New in 20.1: Added keyring support. -.. _upload_docs: - -``upload_docs`` - Upload package documentation to PyPI -====================================================== - -PyPI now supports uploading project documentation to the dedicated URL -https://pythonhosted.org//. - -The ``upload_docs`` command will create the necessary zip file out of a -documentation directory and will post to the repository. - -Note that to upload the documentation of a project, the corresponding version -must already be registered with PyPI, using the distutils ``register`` -command -- just like the ``upload`` command. - -Assuming there is an ``Example`` project with documentation in the -subdirectory ``docs``, e.g.:: - - Example/ - |-- example.py - |-- setup.cfg - |-- setup.py - |-- docs - | |-- build - | | `-- html - | | | |-- index.html - | | | `-- tips_tricks.html - | |-- conf.py - | |-- index.txt - | `-- tips_tricks.txt - -You can simply pass the documentation directory path to the ``upload_docs`` -command:: - - python setup.py upload_docs --upload-dir=docs/build/html - -If no ``--upload-dir`` is given, ``upload_docs`` will attempt to run the -``build_sphinx`` command to generate uploadable documentation. -For the command to become available, `Sphinx `_ -must be installed in the same environment as distribute. - -As with other ``setuptools``-based commands, you can define useful -defaults in the ``setup.cfg`` of your Python project, e.g.: - -.. code-block:: ini - - [upload_docs] - upload-dir = docs/build/html - -The ``upload_docs`` command has the following options: - -``--upload-dir`` - The directory to be uploaded to the repository. - -``--show-response`` - Display the full response text from server; this is useful for debugging - PyPI problems. - -``--repository=URL, -r URL`` - The URL of the repository to upload to. Defaults to - https://pypi.python.org/pypi (i.e., the main PyPI installation). - ----------------------------------------- Configuring setup() using setup.cfg files From c999a93ca02b2b933384d1d0345505c4ed72f80b Mon Sep 17 00:00:00 2001 From: Elvis Stansvik Date: Sun, 8 Jan 2017 18:24:24 +0100 Subject: [PATCH 6450/8469] Fix broken link in docs/developer-guide.txt --- docs/developer-guide.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index c8f51b0208..8a1363808e 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -13,11 +13,11 @@ Recommended Reading ------------------- Please read `How to write the perfect pull request -`_ -for some tips on contributing to open source projects. Although the article -is not authoritative, it was authored by the maintainer of Setuptools, so -reflects his opinions and will improve the likelihood of acceptance and -quality of contribution. +`_ for some tips +on contributing to open source projects. Although the article is not +authoritative, it was authored by the maintainer of Setuptools, so reflects +his opinions and will improve the likelihood of acceptance and quality of +contribution. ------------------ Project Management From bad51fc70140efc0d9fdf5de632ca4798b995752 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Fri, 13 Jan 2017 18:20:28 -0800 Subject: [PATCH 6451/8469] Fix certifi fallback is not used on Windows. --- setuptools/ssl_support.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 82f8870ab8..661b6b5238 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -237,14 +237,21 @@ def close(self): def find_ca_bundle(): """Return an existing CA bundle path, or None""" + ca_bundle_path = None + if os.name == 'nt': - return get_win_certfile() + ca_bundle_path = get_win_certfile() else: for cert_path in cert_paths: if os.path.isfile(cert_path): - return cert_path - try: - import certifi - return certifi.where() - except (ImportError, ResolutionError, ExtractionError): - return None + ca_bundle_path = cert_path + break + + if ca_bundle_path is None: + try: + import certifi + ca_bundle_path = certifi.where() + except (ImportError, ResolutionError, ExtractionError): + pass + + return ca_bundle_path From 59d325c236500eb5cd8e88e9f13094253d689de7 Mon Sep 17 00:00:00 2001 From: Daniel Nunes Date: Sat, 14 Jan 2017 22:05:18 +0000 Subject: [PATCH 6452/8469] Added newer_pairwise_group() convenience function. --- setuptools/dep_util.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 setuptools/dep_util.py diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py new file mode 100644 index 0000000000..2931c13ec3 --- /dev/null +++ b/setuptools/dep_util.py @@ -0,0 +1,23 @@ +from distutils.dep_util import newer_group + +# yes, this is was almost entirely copy-pasted from +# 'newer_pairwise()', this is just another convenience +# function. +def newer_pairwise_group(sources_groups, targets): + """Walk both arguments in parallel, testing if each source group is newer + than its corresponding target. Returns a pair of lists (sources_groups, + targets) where sources is newer than target, according to the semantics + of 'newer_group()'. + """ + if len(sources_groups) != len(targets): + raise ValueError("'sources_group' and 'targets' must be the same length") + + # build a pair of lists (sources_groups, targets) where source is newer + n_sources = [] + n_targets = [] + for i in range(len(sources_groups)): + if newer_group(sources_groups[i], targets[i]): + n_sources.append(sources_groups[i]) + n_targets.append(targets[i]) + + return n_sources, n_targets From a40114a442e18cd29271bd3c37dbfcaf6a2ec817 Mon Sep 17 00:00:00 2001 From: Daniel Nunes Date: Sun, 15 Jan 2017 01:36:02 +0000 Subject: [PATCH 6453/8469] Added tests for newer_pairwise_group(). --- setuptools/tests/test_dep_util.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 setuptools/tests/test_dep_util.py diff --git a/setuptools/tests/test_dep_util.py b/setuptools/tests/test_dep_util.py new file mode 100644 index 0000000000..e5027c1020 --- /dev/null +++ b/setuptools/tests/test_dep_util.py @@ -0,0 +1,30 @@ +from setuptools.dep_util import newer_pairwise_group +import os +import pytest + + +@pytest.fixture +def groups_target(tmpdir): + """Sets up some older sources, a target and newer sources. + Returns a 3-tuple in this order. + """ + creation_order = ['older.c', 'older.h', 'target.o', 'newer.c', 'newer.h'] + mtime = 0 + + for i in range(len(creation_order)): + creation_order[i] = os.path.join(str(tmpdir), creation_order[i]) + with open(creation_order[i], 'w'): + pass + + # make sure modification times are sequential + os.utime(creation_order[i], (mtime, mtime)) + mtime += 1 + + return creation_order[:2], creation_order[2], creation_order[3:] + + +def test_newer_pairwise_group(groups_target): + older = newer_pairwise_group([groups_target[0]], [groups_target[1]]) + newer = newer_pairwise_group([groups_target[2]], [groups_target[1]]) + assert older == ([], []) + assert newer == ([groups_target[2]], [groups_target[1]]) From f383c6d24fdb2faf8cbe070ce0983c6480630730 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jan 2017 10:40:37 -0500 Subject: [PATCH 6454/8469] Remove installation instructions from the README and instead refer to the Python Packaging User's Guide, which indicates to use pip for installing setuptools. Moved Credits to the history section of the documentation. Cleaned up hyperlinks. --- README.rst | 240 +++-------------------------------------------- docs/history.txt | 38 ++++++++ 2 files changed, 49 insertions(+), 229 deletions(-) diff --git a/README.rst b/README.rst index accaac3c3e..d8de81896e 100755 --- a/README.rst +++ b/README.rst @@ -1,241 +1,23 @@ -=============================== -Installing and Using Setuptools -=============================== - -.. contents:: **Table of Contents** - - .. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest :target: https://setuptools.readthedocs.io -------------------------- -Installation Instructions -------------------------- - -The recommended way to bootstrap setuptools on any system is to download -`ez_setup.py`_ and run it using the target Python environment. Different -operating systems have different recommended techniques to accomplish this -basic routine, so below are some examples to get you started. - -Setuptools requires Python 2.6 or later. To install setuptools -on Python 2.4 or Python 2.5, use the `bootstrap script for Setuptools 1.x -`_. - -The link provided to ez_setup.py is a bookmark to bootstrap script for the -latest known stable release. - -.. _ez_setup.py: https://bootstrap.pypa.io/ez_setup.py - -Windows (Powershell 3 or later) -=============================== - -For best results, uninstall previous versions FIRST (see `Uninstalling`_). - -Using Windows 8 (which includes PowerShell 3) or earlier versions of Windows -with PowerShell 3 installed, it's possible to install with one simple -Powershell command. Start up Powershell and paste this command:: - - > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - - -.. image:: https://badges.gitter.im/pypa/setuptools.svg - :alt: Join the chat at https://gitter.im/pypa/setuptools - :target: https://gitter.im/pypa/setuptools?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge - -You must start the Powershell with Administrative privileges or you may choose -to install a user-local installation:: - - > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - --user - -If you have Python 3.3 or later, you can use the ``py`` command to install to -different Python versions. For example, to install to Python 3.3 if you have -Python 2.7 installed:: - - > (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | py -3 - - -The recommended way to install setuptools on Windows is to download -`ez_setup.py`_ and run it. The script will download the appropriate -distribution file and install it for you. - -Once installation is complete, you will find an ``easy_install`` program in -your Python ``Scripts`` subdirectory. For simple invocation and best results, -add this directory to your ``PATH`` environment variable, if it is not already -present. If you did a user-local install, the ``Scripts`` subdirectory is -``$env:APPDATA\Python\Scripts``. - - -Windows (simplified) -==================== - -For Windows without PowerShell 3 or for installation without a command-line, -download `ez_setup.py`_ using your preferred web browser or other technique -and "run" that file. - - -Unix (wget) -=========== - -Most Linux distributions come with wget. - -Download `ez_setup.py`_ and run it using the target Python version. The script -will download the appropriate version and install it for you:: - - > wget https://bootstrap.pypa.io/ez_setup.py -O - | python - -Note that you will may need to invoke the command with superuser privileges to -install to the system Python:: - - > wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python - -Alternatively, Setuptools may be installed to a user-local path:: - - > wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user - -Note that on some older systems (noted on Debian 6 and CentOS 5 installations), -`wget` may refuse to download `ez_setup.py`, complaining that the certificate common name `*.c.ssl.fastly.net` -does not match the host name `bootstrap.pypa.io`. In addition, the `ez_setup.py` script may then encounter similar problems using -`wget` internally to download `setuptools-x.y.zip`, complaining that the certificate common name of `www.python.org` does not match the -host name `pypi.python.org`. Those are known issues, related to a bug in the older versions of `wget` -(see `Issue 59 `_). If you happen to encounter them, -install Setuptools as follows:: - - > wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py - > python ez_setup.py --insecure - - -Unix including Mac OS X (curl) -============================== +See the `Installation Instructions +`_ in the Python Packaging +User's Guide for instructions on installing, upgrading, and uninstalling +Setuptools. -If your system has curl installed, follow the ``wget`` instructions but -replace ``wget`` with ``curl`` and ``-O`` with ``-o``. For example:: +The project is `maintained at Github `_. - > curl https://bootstrap.pypa.io/ez_setup.py -o - | python +Questions and comments should be directed to the `distutils-sig +mailing list `_. +Bug reports and especially tested patches may be +submitted directly to the `bug tracker +`_. -Advanced Installation -===================== - -For more advanced installation options, such as installing to custom -locations or prefixes, download and extract the source -tarball from `Setuptools on PyPI `_ -and run setup.py with any supported distutils and Setuptools options. -For example:: - - setuptools-x.x$ python setup.py install --prefix=/opt/setuptools - -Use ``--help`` to get a full options list, but we recommend consulting -the `EasyInstall manual`_ for detailed instructions, especially `the section -on custom installation locations`_. - -.. _EasyInstall manual: https://setuptools.readthedocs.io/en/latest/easy_install.html -.. _the section on custom installation locations: https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations - - -Downloads -========= - -All setuptools downloads can be found at `the project's home page in the Python -Package Index`_. Scroll to the very bottom of the page to find the links. - -.. _the project's home page in the Python Package Index: https://pypi.python.org/pypi/setuptools - -In addition to the PyPI downloads, the development version of ``setuptools`` -is available from the `GitHub repo`_, and in-development versions of the -`0.6 branch`_ are available as well. - -.. _GitHub repo: https://github.com/pypa/setuptools/archive/master.tar.gz#egg=setuptools-dev -.. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - -Uninstalling -============ - -On Windows, if Setuptools was installed using an ``.exe`` or ``.msi`` -installer, simply use the uninstall feature of "Add/Remove Programs" in the -Control Panel. - -Otherwise, to uninstall Setuptools or Distribute, regardless of the Python -version, delete all ``setuptools*`` and ``distribute*`` files and -directories from your system's ``site-packages`` directory -(and any other ``sys.path`` directories) FIRST. - -If you are upgrading or otherwise plan to re-install Setuptools or Distribute, -nothing further needs to be done. If you want to completely remove Setuptools, -you may also want to remove the 'easy_install' and 'easy_install-x.x' scripts -and associated executables installed to the Python scripts directory. - --------------------------------- -Using Setuptools and EasyInstall --------------------------------- - -Here are some of the available manuals, tutorials, and other resources for -learning about Setuptools, Python Eggs, and EasyInstall: - -* `The EasyInstall user's guide and reference manual`_ -* `The setuptools Developer's Guide`_ -* `The pkg_resources API reference`_ -* `The Internal Structure of Python Eggs`_ - -Questions, comments, and bug reports should be directed to the `distutils-sig -mailing list`_. If you have written (or know of) any tutorials, documentation, -plug-ins, or other resources for setuptools users, please let us know about -them there, so this reference list can be updated. If you have working, -*tested* patches to correct problems or add features, you may submit them to -the `setuptools bug tracker`_. - -.. _setuptools bug tracker: https://github.com/pypa/setuptools/issues -.. _The Internal Structure of Python Eggs: https://setuptools.readthedocs.io/en/latest/formats.html -.. _The setuptools Developer's Guide: https://setuptools.readthedocs.io/en/latest/developer-guide.html -.. _The pkg_resources API reference: https://setuptools.readthedocs.io/en/latest/pkg_resources.html -.. _The EasyInstall user's guide and reference manual: https://setuptools.readthedocs.io/en/latest/easy_install.html -.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ - - -------- -Credits -------- - -* The original design for the ``.egg`` format and the ``pkg_resources`` API was - co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first - version of ``pkg_resources``, and supplied the OS X operating system version - compatibility algorithm. - -* Ian Bicking implemented many early "creature comfort" features of - easy_install, including support for downloading via Sourceforge and - Subversion repositories. Ian's comments on the Web-SIG about WSGI - application deployment also inspired the concept of "entry points" in eggs, - and he has given talks at PyCon and elsewhere to inform and educate the - community about eggs and setuptools. - -* Jim Fulton contributed time and effort to build automated tests of various - aspects of ``easy_install``, and supplied the doctests for the command-line - ``.exe`` wrappers on Windows. - -* Phillip J. Eby is the seminal author of setuptools, and - first proposed the idea of an importable binary distribution format for - Python application plug-ins. - -* Significant parts of the implementation of setuptools were funded by the Open - Source Applications Foundation, to provide a plug-in infrastructure for the - Chandler PIM application. In addition, many OSAF staffers (such as Mike - "Code Bear" Taylor) contributed their time and stress as guinea pigs for the - use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) - -* Tarek Ziadé is the principal author of the Distribute fork, which - re-invigorated the community on the project, encouraged renewed innovation, - and addressed many defects. - -* Since the merge with Distribute, Jason R. Coombs is the - maintainer of setuptools. The project is maintained in coordination with - the Python Packaging Authority (PyPA) and the larger Python community. - -.. _files: - - ---------------- 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`_. - -.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/ +`PyPA Code of Conduct `_. diff --git a/docs/history.txt b/docs/history.txt index 8e217503ba..8fd1dc6538 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -6,3 +6,41 @@ History ******* .. include:: ../CHANGES (links).rst + +Credits +******* + +* The original design for the ``.egg`` format and the ``pkg_resources`` API was + co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first + version of ``pkg_resources``, and supplied the OS X operating system version + compatibility algorithm. + +* Ian Bicking implemented many early "creature comfort" features of + easy_install, including support for downloading via Sourceforge and + Subversion repositories. Ian's comments on the Web-SIG about WSGI + application deployment also inspired the concept of "entry points" in eggs, + and he has given talks at PyCon and elsewhere to inform and educate the + community about eggs and setuptools. + +* Jim Fulton contributed time and effort to build automated tests of various + aspects of ``easy_install``, and supplied the doctests for the command-line + ``.exe`` wrappers on Windows. + +* Phillip J. Eby is the seminal author of setuptools, and + first proposed the idea of an importable binary distribution format for + Python application plug-ins. + +* Significant parts of the implementation of setuptools were funded by the Open + Source Applications Foundation, to provide a plug-in infrastructure for the + Chandler PIM application. In addition, many OSAF staffers (such as Mike + "Code Bear" Taylor) contributed their time and stress as guinea pigs for the + use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) + +* Tarek Ziadé is the principal author of the Distribute fork, which + re-invigorated the community on the project, encouraged renewed innovation, + and addressed many defects. + +* Since the merge with Distribute, Jason R. Coombs is the + maintainer of setuptools. The project is maintained in coordination with + the Python Packaging Authority (PyPA) and the larger Python community. + From ded221d756dca6cc1371db698005926cbd13fd05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jan 2017 10:44:50 -0500 Subject: [PATCH 6455/8469] Update changelog --- CHANGES.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8c214db3a1..749184e829 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,15 @@ +v33.1.0 +------- + +Installation via pip, as indicated in the `Python Packaging +User's Guide `_, +is the officially-supported mechanism for installing +Setuptools, and this recommendation is now explicit in the +much more concise README. + +Other edits and tweaks were made to the documentation. The +codebase is unchanged. + v33.0.0 ------- From 7aa463d16c2500652bce12f41cdcd7d1a87eb3a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Jan 2017 10:44:55 -0500 Subject: [PATCH 6456/8469] =?UTF-8?q?Bump=20version:=2033.0.0=20=E2=86=92?= =?UTF-8?q?=2033.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 74d7e085ca..4c97dc8a76 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 33.0.0 +current_version = 33.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 8e125fc18e..bfe6e07329 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="33.0.0", + version="33.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 118f32deccfd792fde1c856b226406656795de21 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 16 Jan 2017 17:17:51 +0200 Subject: [PATCH 6457/8469] Fix GitHub typo [CI skip] --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d8de81896e..2f55bce106 100755 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ See the `Installation Instructions User's Guide for instructions on installing, upgrading, and uninstalling Setuptools. -The project is `maintained at Github `_. +The project is `maintained at GitHub `_. Questions and comments should be directed to the `distutils-sig mailing list `_. From 71327bd97840e1d1f6d30e6d926767f4a8b1e1ec Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 16 Jan 2017 17:19:00 +0200 Subject: [PATCH 6458/8469] Python 3.6 is out --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index b402cf6d9f..047551b98b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ python: - 3.3 - 3.4 - 3.5 + - 3.6 - "3.6-dev" - nightly - pypy From 0084a32c3c16323e159c3f8929de43ab1942203b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 13:57:02 -0500 Subject: [PATCH 6459/8469] Use 3.7-dev as the future candidate. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 047551b98b..ea6c501637 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ python: - 3.4 - 3.5 - 3.6 - - "3.6-dev" + - "3.7-dev" - nightly - pypy env: From 7f0ff1c9bffbde1b7d5ce760e4f10799c1920f9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 13:58:19 -0500 Subject: [PATCH 6460/8469] Only test ASCII on Python 2.7 and 3.current --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea6c501637..7009cd9d64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,12 @@ python: - "3.7-dev" - nightly - pypy -env: - - "" - - LC_ALL=C LC_CTYPE=C +matrix: + include: + - python: 3.6 + env: LC_ALL=C LC_CTYPE=C + - python: 2.7 + env: LC_ALL=C LC_CTYPE=C script: - pip install tox From 22f49d83f060b6f3a15c7e1a8dd2c6c373b3ba20 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:00:39 -0500 Subject: [PATCH 6461/8469] I doubt there's any need to test on 3.7-dev if we're testing nightly. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7009cd9d64..0683a619e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ python: - 3.4 - 3.5 - 3.6 - - "3.7-dev" - nightly - pypy matrix: From f64c8f72952192655584994da11cdc9d40c54d32 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:04:27 -0500 Subject: [PATCH 6462/8469] Update changelog. Ref #921. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 749184e829..339a0e6dc8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v33.1.1 +------- + +* #921: Correct issue where certifi fallback not being + reached on Windows. + v33.1.0 ------- From 827c4c365fccad37907688b3518e7d351d3bfc5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:20:39 -0500 Subject: [PATCH 6463/8469] Refactor find_ca_bundle to simplify branching logic. --- setuptools/ssl_support.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 661b6b5238..2313651f89 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,7 +3,7 @@ import atexit import re -from setuptools.extern.six.moves import urllib, http_client, map +from setuptools.extern.six.moves import urllib, http_client, map, filter import pkg_resources from pkg_resources import ResolutionError, ExtractionError @@ -237,21 +237,16 @@ def close(self): def find_ca_bundle(): """Return an existing CA bundle path, or None""" - ca_bundle_path = None + extant_cert_paths = filter(os.path.isfile, cert_paths) + return ( + get_win_certfile() + or next(extant_cert_paths, None) + or _certifi_where() + ) - if os.name == 'nt': - ca_bundle_path = get_win_certfile() - else: - for cert_path in cert_paths: - if os.path.isfile(cert_path): - ca_bundle_path = cert_path - break - if ca_bundle_path is None: - try: - import certifi - ca_bundle_path = certifi.where() - except (ImportError, ResolutionError, ExtractionError): - pass - - return ca_bundle_path +def _certifi_where(): + try: + return __import__('certifi').where() + except (ImportError, ResolutionError, ExtractionError): + pass From 88c77110867997d171cdee17e4b52e4011e00911 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:25:32 -0500 Subject: [PATCH 6464/8469] Replace global variable serving as an implicit cache with an explicit 'once' decorator. --- setuptools/ssl_support.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 2313651f89..0635c43d29 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -2,6 +2,7 @@ import socket import atexit import re +import functools from setuptools.extern.six.moves import urllib, http_client, map, filter @@ -204,14 +205,18 @@ def opener_for(ca_bundle=None): ).open -_wincerts = None +# from jaraco.functools +def once(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + if not hasattr(func, 'always_returns'): + func.always_returns = func(*args, **kwargs) + return func.always_returns + return wrapper +@once def get_win_certfile(): - global _wincerts - if _wincerts is not None: - return _wincerts.name - try: from wincertstore import CertFile except ImportError: From f024bd4e0ade92953f5dff85364bd12dd06e1e8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:25:46 -0500 Subject: [PATCH 6465/8469] Remove unused import --- setuptools/ssl_support.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 0635c43d29..d827d11bfa 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -6,7 +6,6 @@ from setuptools.extern.six.moves import urllib, http_client, map, filter -import pkg_resources from pkg_resources import ResolutionError, ExtractionError try: From 89cbd6c2c6355f0fa99e86394a6d86e1b624950d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:29:59 -0500 Subject: [PATCH 6466/8469] Remove unused parameter --- setuptools/ssl_support.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index d827d11bfa..efd22d5fcb 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -222,11 +222,10 @@ def get_win_certfile(): return None class MyCertFile(CertFile): - def __init__(self, stores=(), certs=()): + def __init__(self, stores=()): CertFile.__init__(self) for store in stores: self.addstore(store) - self.addcerts(certs) atexit.register(self.close) def close(self): From 7b322451271218e3e8f5a207958928268c34e916 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:31:41 -0500 Subject: [PATCH 6467/8469] Rely on namespacing to discriminate between novel class and parent. --- setuptools/ssl_support.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index efd22d5fcb..af28ca2f6b 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -217,24 +217,24 @@ def wrapper(*args, **kwargs): @once def get_win_certfile(): try: - from wincertstore import CertFile + import wincertstore except ImportError: return None - class MyCertFile(CertFile): + class CertFile(wincertstore.CertFile): def __init__(self, stores=()): - CertFile.__init__(self) + super(CertFile, self).__init__() for store in stores: self.addstore(store) atexit.register(self.close) def close(self): try: - super(MyCertFile, self).close() + super(CertFile, self).close() except OSError: pass - _wincerts = MyCertFile(stores=['CA', 'ROOT']) + _wincerts = CertFile(stores=['CA', 'ROOT']) return _wincerts.name From e316a702071feecc059102e032439e8ca0551c1a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:35:33 -0500 Subject: [PATCH 6468/8469] Simply invoke addstore twice, rather than looping. --- setuptools/ssl_support.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index af28ca2f6b..72b18ef266 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -222,10 +222,8 @@ def get_win_certfile(): return None class CertFile(wincertstore.CertFile): - def __init__(self, stores=()): + def __init__(self): super(CertFile, self).__init__() - for store in stores: - self.addstore(store) atexit.register(self.close) def close(self): @@ -234,7 +232,9 @@ def close(self): except OSError: pass - _wincerts = CertFile(stores=['CA', 'ROOT']) + _wincerts = CertFile() + _wincerts.addstore('CA') + _wincerts.addstore('ROOT') return _wincerts.name From b9ca305f48b5da7cfe0f831fdc32dc0aa3890035 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:37:02 -0500 Subject: [PATCH 6469/8469] Remove unused imports --- setuptools/__init__.py | 2 +- setuptools/namespaces.py | 1 - setuptools/package_index.py | 3 +-- setuptools/py33compat.py | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 54577ceded..04f7674082 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from setuptools.extern.six.moves import filter, filterfalse, map +from setuptools.extern.six.moves import filter, map import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 0a889f224a..bd17d9e7c6 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -1,5 +1,4 @@ import os -import sys from distutils import log import itertools diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d80d43bc79..5c25c9d641 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -17,10 +17,9 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map -import setuptools from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, - require, Environment, find_distributions, safe_name, safe_version, + Environment, find_distributions, safe_name, safe_version, to_filename, Requirement, DEVELOP_DIST, ) from setuptools import ssl_support diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index 2588d680cd..af64d5d1e2 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -1,5 +1,4 @@ import dis -import code import array import collections From 552ea0d4a08ad24e06c2aa5b1746e669be1c48f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:50:30 -0500 Subject: [PATCH 6470/8469] Restore setuptools import, falsely identified as an unused import by linter. --- setuptools/package_index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5c25c9d641..45fac01a44 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -17,6 +17,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map +import setuptools from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, Environment, find_distributions, safe_name, safe_version, @@ -47,7 +48,7 @@ _SOCKET_TIMEOUT = 15 _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" -user_agent = _tmpl.format(py_major=sys.version[:3], **globals()) +user_agent = _tmpl.format(py_major=sys.version[:3], setuptools=setuptools) def parse_requirement_arg(spec): From 730834b5c286b5ba2091394339d0759035804eba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 16 Jan 2017 14:53:37 -0500 Subject: [PATCH 6471/8469] =?UTF-8?q?Bump=20version:=2033.1.0=20=E2=86=92?= =?UTF-8?q?=2033.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4c97dc8a76..1d45057beb 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 33.1.0 +current_version = 33.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index bfe6e07329..d75cdb3d18 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="33.1.0", + version="33.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 336a065df01a4b409f57809a668208d666010a62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Jan 2017 09:44:26 -0500 Subject: [PATCH 6472/8469] Add pyproject.toml per PEP 518 for use by a future pip release. Ref #581. --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..0aa2e1c865 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +# for Setuptools, its own requirements are build requirements, +# so keep this in sync with install_requires in setup.py. +requires = [ + "wheel", + "packaging>=16.8", + "six>=1.10.0", + "appdirs>=1.4.0", +] From 79919e21fd1947749959c977d2bb05645e7829e0 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 17 Jan 2017 22:28:20 +0200 Subject: [PATCH 6473/8469] Update Python versions --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index d75cdb3d18..060c26c2fa 100755 --- a/setup.py +++ b/setup.py @@ -145,12 +145,14 @@ def pypi_link(pkg_filename): Intended Audience :: Developers License :: OSI Approved :: MIT License Operating System :: OS Independent + Programming Language :: Python :: 2 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 + Programming Language :: Python :: 3.6 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From 9f440c3f7461e5c097705ca0823b316c0c11e2f9 Mon Sep 17 00:00:00 2001 From: Daniel Nunes Date: Thu, 19 Jan 2017 22:01:33 +0000 Subject: [PATCH 6474/8469] Added build_clib module and unit tests. Added rudimentary dependency system for build_libraries. Added obj_deps and cflags keys to build_info dictionary. --- setuptools/command/__init__.py | 2 +- setuptools/command/build_clib.py | 98 +++++++++++++++++++++++++++++ setuptools/tests/test_build_clib.py | 59 +++++++++++++++++ 3 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 setuptools/command/build_clib.py create mode 100644 setuptools/tests/test_build_clib.py diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index efbe9411c1..c96d33c23d 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', 'upload_docs', 'upload', + 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', ] from distutils.command.bdist import bdist diff --git a/setuptools/command/build_clib.py b/setuptools/command/build_clib.py new file mode 100644 index 0000000000..09caff6ffd --- /dev/null +++ b/setuptools/command/build_clib.py @@ -0,0 +1,98 @@ +import distutils.command.build_clib as orig +from distutils.errors import DistutilsSetupError +from distutils import log +from setuptools.dep_util import newer_pairwise_group + + +class build_clib(orig.build_clib): + """ + Override the default build_clib behaviour to do the following: + + 1. Implement a rudimentary timestamp-based dependency system + so 'compile()' doesn't run every time. + 2. Add more keys to the 'build_info' dictionary: + * obj_deps - specify dependencies for each object compiled. + this should be a dictionary mapping a key + with the source filename to a list of + dependencies. Use an empty string for global + dependencies. + * cflags - specify a list of additional flags to pass to + the compiler. + """ + + def build_libraries(self, libraries): + for (lib_name, build_info) in libraries: + sources = build_info.get('sources') + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames" % lib_name) + sources = list(sources) + + log.info("building '%s' library", lib_name) + + # Make sure everything is the correct type. + # obj_deps should be a dictionary of keys as sources + # and a list/tuple of files that are its dependencies. + obj_deps = build_info.get('obj_deps', dict()) + if not isinstance(obj_deps, dict): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) + dependencies = [] + + # Get the global dependencies that are specified by the '' key. + # These will go into every source's dependency list. + global_deps = obj_deps.get('', list()) + if not isinstance(global_deps, (list, tuple)): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) + + # Build the list to be used by newer_pairwise_group + # each source will be auto-added to its dependencies. + for source in sources: + src_deps = [source] + src_deps.extend(global_deps) + extra_deps = obj_deps.get(source, list()) + if not isinstance(extra_deps, (list, tuple)): + raise DistutilsSetupError( + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) + src_deps.extend(extra_deps) + dependencies.append(src_deps) + + expected_objects = self.compiler.object_filenames( + sources, + output_dir=self.build_temp + ) + + if newer_pairwise_group(dependencies, expected_objects) != ([], []): + # First, compile the source code to object files in the library + # directory. (This should probably change to putting object + # files in a temporary build directory.) + macros = build_info.get('macros') + include_dirs = build_info.get('include_dirs') + cflags = build_info.get('cflags') + objects = self.compiler.compile( + sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=include_dirs, + extra_postargs=cflags, + debug=self.debug + ) + + # Now "link" the object files together into a static library. + # (On Unix at least, this isn't really linking -- it just + # builds an archive. Whatever.) + self.compiler.create_static_lib( + expected_objects, + lib_name, + output_dir=self.build_clib, + debug=self.debug + ) diff --git a/setuptools/tests/test_build_clib.py b/setuptools/tests/test_build_clib.py new file mode 100644 index 0000000000..7e3d1de9d4 --- /dev/null +++ b/setuptools/tests/test_build_clib.py @@ -0,0 +1,59 @@ +import pytest +import os +import shutil + +from unittest import mock +from distutils.errors import DistutilsSetupError +from setuptools.command.build_clib import build_clib +from setuptools.dist import Distribution + + +class TestBuildCLib: + @mock.patch( + 'setuptools.command.build_clib.newer_pairwise_group' + ) + def test_build_libraries(self, mock_newer): + dist = Distribution() + cmd = build_clib(dist) + + # this will be a long section, just making sure all + # exceptions are properly raised + libs = [('example', {'sources': 'broken.c'})] + with pytest.raises(DistutilsSetupError): + cmd.build_libraries(libs) + + obj_deps = 'some_string' + libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] + with pytest.raises(DistutilsSetupError): + cmd.build_libraries(libs) + + obj_deps = {'': ''} + libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] + with pytest.raises(DistutilsSetupError): + cmd.build_libraries(libs) + + obj_deps = {'source.c': ''} + libs = [('example', {'sources': ['source.c'], 'obj_deps': obj_deps})] + with pytest.raises(DistutilsSetupError): + cmd.build_libraries(libs) + + # with that out of the way, let's see if the crude dependency + # system works + cmd.compiler = mock.MagicMock(spec=cmd.compiler) + mock_newer.return_value = ([],[]) + + obj_deps = {'': ('global.h',), 'example.c': ('example.h',)} + libs = [('example', {'sources': ['example.c'] ,'obj_deps': obj_deps})] + + cmd.build_libraries(libs) + assert [['example.c', 'global.h', 'example.h']] in mock_newer.call_args[0] + assert not cmd.compiler.compile.called + assert cmd.compiler.create_static_lib.call_count == 1 + + # reset the call numbers so we can test again + cmd.compiler.reset_mock() + + mock_newer.return_value = '' # anything as long as it's not ([],[]) + cmd.build_libraries(libs) + assert cmd.compiler.compile.call_count == 1 + assert cmd.compiler.create_static_lib.call_count == 1 From 11676d39c405672270a543bdc32de395b935b869 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 10:08:09 -0500 Subject: [PATCH 6475/8469] Update changelog --- CHANGES.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 339a0e6dc8..e7e64fce20 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,25 @@ +v34.0.0 +------- + +* #581: Instead of vendoring the growing list of + dependencies that Setuptools requires to function, + Setuptools now requires these dependencies just like + any other project. Unlike other projects, however, + Setuptools cannot rely on ``setup_requires`` to + demand the dependencies it needs to install because + its own machinery would be necessary to pull those + dependencies if not present (a bootstrapping problem). + As a result, Setuptools no longer supports self upgrade or + installation in the general case. Instead, users are + directed to use pip to install and upgrade using the + ``wheel`` distributions of setuptools. + + Users are welcome to contrive other means to install + or upgrade Setuptools using other means, such as + pre-installing the Setuptools dependencies with pip + or a bespoke bootstrap tool, but such usage is not + recommended and is not supported. + v33.1.1 ------- From 97372c1341b79f6d78d823868a1bad9170eb13c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 10:33:33 -0500 Subject: [PATCH 6476/8469] =?UTF-8?q?Bump=20version:=2033.1.1=20=E2=86=92?= =?UTF-8?q?=2034.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1d45057beb..3ea4ae7b64 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 33.1.1 +current_version = 34.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 7ad17ac0df..78b9ff329f 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="33.1.1", + version="34.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 094862cd6c1683b6a861e8824a96ef74dfd1a8d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 12:01:44 -0500 Subject: [PATCH 6477/8469] Try installing requirements before deploying (because the requirements that tox installed aren't available to the Python that Travis PyPI uses for deployment). Ref #934. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c30878cd77..7affc0a659 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ script: - tox +before_deploy: + - pip install -r requirements.txt deploy: provider: pypi # Also update server in setup.cfg From 56274b32724933cd2016488c4e667e86d30572ef Mon Sep 17 00:00:00 2001 From: Hatem Nassrat Date: Mon, 23 Jan 2017 18:07:21 +0000 Subject: [PATCH 6478/8469] fixes #935 - allows for glob syntax in graft --- setuptools/command/egg_info.py | 4 +++- setuptools/tests/test_manifest.py | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5ab54dc70f..62bf00aaa9 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -429,7 +429,9 @@ def recursive_exclude(self, dir, pattern): def graft(self, dir): """Include all files from 'dir/'.""" - found = distutils.filelist.findall(dir) + found = [] + for match_dir in glob(dir): + found += distutils.filelist.findall(match_dir) self.extend(found) return bool(found) diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index cf39346a18..3b34c88813 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -206,6 +206,15 @@ def test_graft(self): l('app/static/app.css'), l('app/static/app.css.map')]) assert files == self.get_files() + def test_graft_glob_syntax(self): + """Include the whole app/static/ directory.""" + l = make_local_path + self.make_manifest("graft */static") + files = default_files | set([ + l('app/static/app.js'), l('app/static/app.js.map'), + l('app/static/app.css'), l('app/static/app.css.map')]) + assert files == self.get_files() + def test_graft_global_exclude(self): """Exclude all *.map files in the project.""" l = make_local_path From 8c272f081afc0fb290310eca108a9fa8cab9b44b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 16:58:41 -0500 Subject: [PATCH 6479/8469] Update changelog. Ref #936. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e7e64fce20..0fc87ea759 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v34.0.1 +------- + +* #935: Fix glob syntax in graft. + v34.0.0 ------- From 9cb83c3711d737fa3bff56f55e4def8267bae83c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 17:01:33 -0500 Subject: [PATCH 6480/8469] Prefer list comprehension to init/append loop. Ref #936. --- setuptools/command/egg_info.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 62bf00aaa9..1a6ea9cb57 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -429,9 +429,11 @@ def recursive_exclude(self, dir, pattern): def graft(self, dir): """Include all files from 'dir/'.""" - found = [] - for match_dir in glob(dir): - found += distutils.filelist.findall(match_dir) + found = [ + item + for match_dir in glob(dir) + for item in distutils.filelist.findall(match_dir) + ] self.extend(found) return bool(found) From 6d89f362c9657e12fe2500c061e77747305b76e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 23 Jan 2017 17:01:46 -0500 Subject: [PATCH 6481/8469] =?UTF-8?q?Bump=20version:=2034.0.0=20=E2=86=92?= =?UTF-8?q?=2034.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3ea4ae7b64..9553081a5d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.0.0 +current_version = 34.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 78b9ff329f..b9d32742a5 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.0.0", + version="34.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 992807c6797e5125d2bb9f20aa0f8fe0cc84fdcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 09:38:37 -0500 Subject: [PATCH 6482/8469] Update changelog to give some direction when pip is too old. Fixes #940. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 0fc87ea759..407995d2bd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -25,6 +25,13 @@ v34.0.0 or a bespoke bootstrap tool, but such usage is not recommended and is not supported. + As discovered in #940, not all versions of pip will + successfully install Setuptools from its pre-built + wheel. If you encounter issues with "No module named + six" or "No module named packaging", especially + following a line "Running setup.py egg_info for package + setuptools", then your pip is not new enough. + v33.1.1 ------- From 997b4351f8459622c203eb1b274fee7a73980ce6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 09:54:19 -0500 Subject: [PATCH 6483/8469] Update changelog. Ref #883. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 407995d2bd..05a4175aa8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.0.2 +------- + +* #882: Ensure extras are honored when building the + working set. + v34.0.1 ------- From 322472e4ffdc03901be1f584a548b00f1372037d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 10:13:24 -0500 Subject: [PATCH 6484/8469] Extract staticmethod for resolving setup path --- setuptools/command/develop.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 1489de9e34..97708ba33f 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -79,15 +79,28 @@ def finalize_options(self): project_name=ei.egg_name ) - p = self.egg_base.replace(os.sep, '/') - if p != os.curdir: - p = '../' * (p.count('/') + 1) - self.setup_path = p - p = normalize_path(os.path.join(self.install_dir, self.egg_path, p)) - if p != normalize_path(os.curdir): + self.setup_path = self._resolve_setup_path( + self.egg_base, + self.install_dir, + self.egg_path, + ) + + @staticmethod + def _resolve_setup_path(egg_base, install_dir, egg_path): + """ + Generate a path from egg_base back to '.' where the + setup script resides and ensure that path points to the + setup path from $install_dir/$egg_path. + """ + path_to_setup = egg_base.replace(os.sep, '/') + if path_to_setup != os.curdir: + path_to_setup = '../' * (path_to_setup.count('/') + 1) + resolved = normalize_path(os.path.join(install_dir, egg_path, path_to_setup)) + if resolved != normalize_path(os.curdir): raise DistutilsOptionError( "Can't get a consistent path to setup script from" - " installation directory", p, normalize_path(os.curdir)) + " installation directory", resolved, normalize_path(os.curdir)) + return path_to_setup def install_for_development(self): if six.PY3 and getattr(self.distribution, 'use_2to3', False): From ba15c9294488451900766898865c024dad2bf2be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 10:23:51 -0500 Subject: [PATCH 6485/8469] Add tests for _resolve_setup_path, including one that elicits the error reported in #913. --- setuptools/tests/test_develop.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 3b1b1e2d54..54e199c34e 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -122,6 +122,22 @@ def test_console_scripts(self, tmpdir): # assert '0.0' not in foocmd_text +class TestResolver: + """ + TODO: These tests were written with a minimal understanding + of what _resolve_setup_path is intending to do. Come up with + more meaningful cases that look like real-world scenarios. + """ + def test_resolve_setup_path_cwd(self): + assert develop._resolve_setup_path('.', '.', '.') == '.' + + def test_resolve_setup_path_one_dir(self): + assert develop._resolve_setup_path('pkgs', '.', 'pkgs') == '../' + + def test_resolve_setup_path_one_dir_trailing_slash(self): + assert develop._resolve_setup_path('pkgs/', '.', 'pkgs') == '../' + + class TestNamespaces: @staticmethod From 3469f8bcbcde1085baa4c9cde9aad9020acee3f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 24 Jan 2017 10:28:46 -0500 Subject: [PATCH 6486/8469] =?UTF-8?q?Bump=20version:=2034.0.1=20=E2=86=92?= =?UTF-8?q?=2034.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9553081a5d..928c37b5bf 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.0.1 +current_version = 34.0.2 commit = True tag = True diff --git a/setup.py b/setup.py index b9d32742a5..41a8df3bcc 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.0.1", + version="34.0.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 5a028a7061f37868133d2951ca284d34e253484d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Jan 2017 10:32:59 -0500 Subject: [PATCH 6487/8469] Update changelog to reflect additional issue revealed in pypa/pip#4253. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 601aefbaf1..3fa2b76b1b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -40,6 +40,12 @@ v34.0.0 following a line "Running setup.py egg_info for package setuptools", then your pip is not new enough. + There's an additional issue in pip where setuptools + is upgraded concurrently with other source packages, + described in pip #4253. The proposed workaround is to + always upgrade Setuptools first prior to upgrading + other packages that would upgrade Setuptools. + v33.1.1 ------- From edfa86809c0010caaa24b65c0e84c8467ba43b2b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jan 2017 09:41:09 -0500 Subject: [PATCH 6488/8469] Loosen restriction on the version of six required. Fixes #947. --- CHANGES.rst | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3fa2b76b1b..3dfcfc58af 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v34.0.3 +------- + +* #947: Loosen restriction on the version of six required, + restoring compatibility with environments relying on + six 1.6.0 and later. + v34.0.2 ------- diff --git a/setup.py b/setup.py index 41a8df3bcc..d89adfea96 100755 --- a/setup.py +++ b/setup.py @@ -164,7 +164,7 @@ def pypi_link(pkg_filename): python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*', install_requires=[ 'packaging>=16.8', - 'six>=1.10.0', + 'six>=1.6.0', 'appdirs>=1.4.0', ], extras_require={ From 1e7fe0df079ec9a508442fd08c94c60ea8a87126 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jan 2017 09:41:14 -0500 Subject: [PATCH 6489/8469] =?UTF-8?q?Bump=20version:=2034.0.2=20=E2=86=92?= =?UTF-8?q?=2034.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 928c37b5bf..b37857b79a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.0.2 +current_version = 34.0.3 commit = True tag = True diff --git a/setup.py b/setup.py index d89adfea96..8ccaeaec9b 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.0.2", + version="34.0.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From ab76ea7987af0a196147195eb6adfa8347baf59c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jan 2017 20:21:03 -0500 Subject: [PATCH 6490/8469] Update changelog. Ref #930. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3dfcfc58af..4058e23be3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.1.0 +------- + +* #930: ``build_info`` now accepts two new parameters + to optimize and customize the building of C libraries. + v34.0.3 ------- From c0b93651405c1e79f3f49decfc97bc072641b2b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 28 Jan 2017 21:05:09 -0500 Subject: [PATCH 6491/8469] =?UTF-8?q?Bump=20version:=2034.0.3=20=E2=86=92?= =?UTF-8?q?=2034.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b37857b79a..be162bbf29 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.0.3 +current_version = 34.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 8ccaeaec9b..88795a2313 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.0.3", + version="34.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 90e95f2367a2325dbf29e5a7a92ef483806ae7b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 30 Jan 2017 14:30:55 -0500 Subject: [PATCH 6492/8469] Rely on backports.unittest_mock plugin to make mock available on old Python versions. Ref #949. --- pkg_resources/tests/test_markers.py | 5 +---- setuptools/tests/test_easy_install.py | 5 +---- setuptools/tests/test_msvc.py | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index 78810b6ef6..9306d5b348 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -1,7 +1,4 @@ -try: - import unittest.mock as mock -except ImportError: - import mock +from unittest import mock from pkg_resources import evaluate_marker diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f5c932dac1..b75e6ff2e1 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,15 +14,12 @@ import distutils.errors import io import zipfile +from unittest import mock import time from six.moves import urllib import pytest -try: - from unittest import mock -except ImportError: - import mock from setuptools import sandbox from setuptools.sandbox import run_setup diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index a0c76ea0da..fbeed1d5c5 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -5,12 +5,9 @@ import os import contextlib import distutils.errors +from unittest import mock import pytest -try: - from unittest import mock -except ImportError: - import mock from . import contexts From 4499210cb8c3c947708479e4bd9d10370aabaf83 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Wed, 1 Feb 2017 04:42:48 +0300 Subject: [PATCH 6493/8469] Issue #29218: Remove unused install_misc command It has been documented as unused since 6c6844a2fa30 (2000-05-25) Patch by Eric N. Vander Weele. --- cmd.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/cmd.py b/cmd.py index 939f795945..dba3191e58 100644 --- a/cmd.py +++ b/cmd.py @@ -401,34 +401,3 @@ def make_file(self, infiles, outfile, func, args, # Otherwise, print the "skip" message else: log.debug(skip_msg) - -# XXX 'install_misc' class not currently used -- it was the base class for -# both 'install_scripts' and 'install_data', but they outgrew it. It might -# still be useful for 'install_headers', though, so I'm keeping it around -# for the time being. - -class install_misc(Command): - """Common base class for installing some files in a subdirectory. - Currently used by install_data and install_scripts. - """ - - user_options = [('install-dir=', 'd', "directory to install the files to")] - - def initialize_options (self): - self.install_dir = None - self.outfiles = [] - - def _install_dir_from(self, dirname): - self.set_undefined_options('install', (dirname, 'install_dir')) - - def _copy_files(self, filelist): - self.outfiles = [] - if not filelist: - return - self.mkpath(self.install_dir) - for f in filelist: - self.copy_file(f, self.install_dir) - self.outfiles.append(os.path.join(self.install_dir, f)) - - def get_outputs(self): - return self.outfiles From e83845ac9b23d3e6e397263aa933372148fc5fee Mon Sep 17 00:00:00 2001 From: smheidrich Date: Thu, 2 Feb 2017 12:32:27 +0100 Subject: [PATCH 6494/8469] Added autosectionlabel Sphinx extension and replaced some obsolete links. --- docs/conf.py | 2 +- docs/pkg_resources.txt | 10 ++++------ docs/setuptools.txt | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c1854ed8a2..fe684271ef 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['rst.linker'] +extensions = ['rst.linker', 'sphinx.ext.autosectionlabel'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index e8412b3371..487320ce89 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -143,10 +143,10 @@ namespace package for Zope Corporation packages, and the ``peak`` namespace package for the Python Enterprise Application Kit. To create a namespace package, you list it in the ``namespace_packages`` -argument to ``setup()``, in your project's ``setup.py``. (See the `setuptools -documentation on namespace packages`_ for more information on this.) Also, -you must add a ``declare_namespace()`` call in the package's ``__init__.py`` -file(s): +argument to ``setup()``, in your project's ``setup.py``. (See the +:ref:`setuptools documentation on namespace packages ` for +more information on this.) Also, you must add a ``declare_namespace()`` call +in the package's ``__init__.py`` file(s): ``declare_namespace(name)`` Declare that the dotted package name `name` is a "namespace package" whose @@ -175,8 +175,6 @@ filesystem and zip importers, you can extend its support to other "importers" compatible with PEP 302 using the ``register_namespace_handler()`` function. See the section below on `Supporting Custom Importers`_ for details. -.. _setuptools documentation on namespace packages: http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages - ``WorkingSet`` Objects ====================== diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2a494fca2d..2c197d9835 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -940,14 +940,13 @@ Typically, existing programs manipulate a package's ``__file__`` attribute in order to find the location of data files. However, this manipulation isn't compatible with PEP 302-based import hooks, including importing from zip files and Python Eggs. It is strongly recommended that, if you are using data files, -you should use the `Resource Management API`_ of ``pkg_resources`` to access +you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access them. The ``pkg_resources`` module is distributed as part of setuptools, so if you're using setuptools to distribute your package, there is no reason not to use its resource management API. See also `Accessing Package Resources`_ for a quick example of converting code that uses ``__file__`` to use ``pkg_resources`` instead. -.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PkgResources#resourcemanager-api .. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources @@ -959,8 +958,8 @@ location (e.g. ``/usr/share``). This feature intended to be used for things like documentation, example configuration files, and the like. ``setuptools`` does not install these data files in a separate location, however. They are bundled inside the egg file or directory, alongside the Python modules and -packages. The data files can also be accessed using the `Resource Management -API`_, by specifying a ``Requirement`` instead of a package name:: +packages. The data files can also be accessed using the :ref:`ResourceManager +API`, by specifying a ``Requirement`` instead of a package name:: from pkg_resources import Requirement, resource_filename filename = resource_filename(Requirement.parse("MyProject"),"sample.conf") From ed360af83a547d565aea8c20d3086486c4c9491c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 09:00:35 -0500 Subject: [PATCH 6495/8469] Infer the username using getpass.getuser() if no username is resolved from .pypirc. --- setuptools/command/upload.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 484baa5a53..a44173a99a 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -10,6 +10,10 @@ class upload(orig.upload): def finalize_options(self): orig.upload.finalize_options(self) + self.username = ( + self.username or + getpass.getuser() + ) # Attempt to obtain password. Short circuit evaluation at the first # sign of success. self.password = ( From 4481a64e2c905f40afa478ebd5418614f322b9b0 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Thu, 2 Feb 2017 08:54:37 -0600 Subject: [PATCH 6496/8469] Add --skip-dep-install to boostrap.py script The --skip-dep-install flag skips installation of setuptools dependencies using pip, delegating this responsibility to other tools. This can be used to install setuptools without the need for pip. closes #950 --- bootstrap.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index f7644f12aa..1a78931122 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -7,6 +7,7 @@ from __future__ import unicode_literals +import argparse import os import io import re @@ -17,7 +18,6 @@ import textwrap import subprocess -import pip minimal_egg_info = textwrap.dedent(""" [distutils.commands] @@ -75,6 +75,7 @@ def gen_deps(): @contextlib.contextmanager def install_deps(): "Just in time make the deps available" + import pip gen_deps() tmpdir = tempfile.mkdtemp() args = [ @@ -91,6 +92,15 @@ def install_deps(): if __name__ == '__main__': + parser = argparse.ArgumentParser(description='bootstrap setuptools') + parser.add_argument( + '--skip-dep-install', action='store_true', + help=("Do not attempt to install setuptools dependencies. These " + "should be provided in the environment in another manner.")) + args = parser.parse_args() ensure_egg_info() - with install_deps(): + if args.skip_dep_install: run_egg_info() + else: + with install_deps(): + run_egg_info() From c182abae2af4cb5e12bb8200995a0026de07f146 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 10:50:47 -0500 Subject: [PATCH 6497/8469] Extract main function --- bootstrap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index 1a78931122..2ca678ff59 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -91,7 +91,7 @@ def install_deps(): shutil.rmtree(tmpdir) -if __name__ == '__main__': +def main(): parser = argparse.ArgumentParser(description='bootstrap setuptools') parser.add_argument( '--skip-dep-install', action='store_true', @@ -104,3 +104,6 @@ def install_deps(): else: with install_deps(): run_egg_info() + + +__name__ == '__main__' and main() From 174e84e0ce297c38aa11f6618c7d0dad7f1a5acf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 11:01:37 -0500 Subject: [PATCH 6498/8469] In bootstrap, defer installation of dependencies if unneeded. Ref #958. --- bootstrap.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 2ca678ff59..ad9b067eca 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -7,7 +7,6 @@ from __future__ import unicode_literals -import argparse import os import io import re @@ -92,16 +91,12 @@ def install_deps(): def main(): - parser = argparse.ArgumentParser(description='bootstrap setuptools') - parser.add_argument( - '--skip-dep-install', action='store_true', - help=("Do not attempt to install setuptools dependencies. These " - "should be provided in the environment in another manner.")) - args = parser.parse_args() ensure_egg_info() - if args.skip_dep_install: + try: + # first assume dependencies are present run_egg_info() - else: + except Exception: + # but if that fails, try again with dependencies just in time with install_deps(): run_egg_info() From e65c45538fab94008b8066edd134725be8f9c400 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 11:21:38 -0500 Subject: [PATCH 6499/8469] Always generate the dependencies. --- bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index ad9b067eca..ee3b53c841 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -75,7 +75,6 @@ def gen_deps(): def install_deps(): "Just in time make the deps available" import pip - gen_deps() tmpdir = tempfile.mkdtemp() args = [ 'install', @@ -92,6 +91,7 @@ def install_deps(): def main(): ensure_egg_info() + gen_deps() try: # first assume dependencies are present run_egg_info() From 7b87e5c5efb0e6f824f4c46a12342a46fe358f14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Feb 2017 13:11:25 -0500 Subject: [PATCH 6500/8469] Require sphinx 1.4 for autosectionlabel plugin. Ref #957. --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0871ed76ae..4be418877c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,2 @@ rst.linker>=1.6.1 +sphinx>=1.4 From 43ba6abb0257dc0a51c9799bd1dea83f0fdc04e0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Feb 2017 15:13:26 -0500 Subject: [PATCH 6501/8469] Always cast to str on Linux and Python 2, let rmtree handle the rest. Fixes #953. --- CHANGES.rst | 6 ++++++ setuptools/py27compat.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4058e23be3..bef385bc58 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.1.1 +------- + +* #953: More aggressively employ the compatibility issue + originally added in #706. + v34.1.0 ------- diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index a71a936e10..f0a80a8eda 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -21,7 +21,6 @@ def get_all_headers(message, key): linux_py2_ascii = ( platform.system() == 'Linux' and - sys.getfilesystemencoding() == 'ascii' and sys.version_info < (3,) ) From 3ddf493a251e92f46d5516713f37ac206c735b4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Feb 2017 15:13:45 -0500 Subject: [PATCH 6502/8469] =?UTF-8?q?Bump=20version:=2034.1.0=20=E2=86=92?= =?UTF-8?q?=2034.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index be162bbf29..211e5601e8 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.1.0 +current_version = 34.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 88795a2313..85ded0c221 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.1.0", + version="34.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 50830de19302234b6741e2d1b853fbf07fbedf95 Mon Sep 17 00:00:00 2001 From: idle sign Date: Sat, 4 Feb 2017 15:21:12 +0700 Subject: [PATCH 6503/8469] Dropped support for classifiers subsection handling in setup.cfg (see #952). --- docs/setuptools.txt | 10 +++++----- setuptools/config.py | 11 ----------- setuptools/tests/test_config.py | 13 ++++++++----- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2c197d9835..f0da6e1d96 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2302,10 +2302,10 @@ boilerplate code in some cases. long_description = file: README.rst keywords = one, two license = BSD 3-Clause License - - [metadata.classifiers] - Framework :: Django - Programming Language :: Python :: 3.5 + classifiers = + Framework :: Django + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 [options] zip_safe = False @@ -2398,7 +2398,7 @@ author str author_email author-email str maintainer str maintainer_email maintainer-email str -classifiers classifier file:, section, list-comma +classifiers classifier file:, list-comma license file:, str description summary file:, str long_description long-description file:, str diff --git a/setuptools/config.py b/setuptools/config.py index 19b39629c7..39a01f88b7 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -412,17 +412,6 @@ def parsers(self): 'version': self._parse_version, } - def parse_section_classifiers(self, section_options): - """Parses configuration file section. - - :param dict section_options: - """ - classifiers = [] - for begin, (_, rest) in section_options.items(): - classifiers.append('%s :%s' % (begin.title(), rest)) - - self['classifiers'] = classifiers - def _parse_version(self, value): """Parses `version` option value. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index fa8d523b47..799fb165c2 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -257,6 +257,7 @@ def test_usupported_section(self, tmpdir): def test_classifiers(self, tmpdir): expected = set([ 'Framework :: Django', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ]) @@ -269,19 +270,21 @@ def test_classifiers(self, tmpdir): tmpdir.join('classifiers').write( 'Framework :: Django\n' + 'Programming Language :: Python :: 3\n' 'Programming Language :: Python :: 3.5\n' ) with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected - # From section. + # From list notation config.write( - '[metadata.classifiers]\n' - 'Framework :: Django\n' - 'Programming Language :: Python :: 3.5\n' + '[metadata]\n' + 'classifiers =\n' + ' Framework :: Django\n' + ' Programming Language :: Python :: 3\n' + ' Programming Language :: Python :: 3.5\n' ) - with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected From d6ffbbd869548f855e7550cf28686e88b48a1495 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 10 Feb 2017 19:16:37 +0300 Subject: [PATCH 6504/8469] support dist-info distributions inside zip files --- pkg_resources/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index e33de0e704..220a7ccc2e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1956,6 +1956,12 @@ def find_eggs_in_zip(importer, path_item, only=False): subpath = os.path.join(path_item, subitem) for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath): yield dist + elif subitem.lower().endswith('.dist-info'): + subpath = os.path.join(path_item, subitem) + submeta = EggMetadata(zipimport.zipimporter(subpath)) + submeta.egg_info = subpath + yield Distribution.from_location(path_item, subitem, submeta) + register_finder(zipimport.zipimporter, find_eggs_in_zip) From 5470fb8fdf3a65cd18541980bf38e4984b5b1775 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Feb 2017 14:33:49 -0500 Subject: [PATCH 6505/8469] Update changelog. Ref #966. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index bef385bc58..8db3c6881b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.2.0 +------- + +* #966: Add support for reading dist-info metadata and + thus locating Distributions from zip files. + v34.1.1 ------- From 5f235ac251a88a1704166f2e2c12903bafad8adb Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sat, 11 Feb 2017 12:14:09 +0900 Subject: [PATCH 6506/8469] A local version label starts with '+' sign, as per https://www.python.org/dev/peps/pep-0440/#id23 --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4236105806..b19893e84e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -30,7 +30,7 @@ from setuptools.py26compat import strip_fragment from setuptools.py27compat import get_all_headers -EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$') +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 PYPI_MD5 = re.compile( From f1ca29cc9332a1bb59e250aa280ddc5239b5457e Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 13 Feb 2017 01:44:17 +0900 Subject: [PATCH 6507/8469] An epoch starts with a number followed by '!'. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b19893e84e..3544dd5460 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -30,7 +30,7 @@ from setuptools.py26compat import strip_fragment from setuptools.py27compat import get_all_headers -EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+]+)$') +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 PYPI_MD5 = re.compile( From 57fa89ac2d7461995b7191aeab8a027a86d73120 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 13 Feb 2017 04:35:30 +0900 Subject: [PATCH 6508/8469] Add a test. --- setuptools/tests/test_packageindex.py | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index d68867c227..1a66394f15 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -181,6 +181,48 @@ def test_local_index(self, tmpdir): res = setuptools.package_index.local_open(url) assert 'content' in res.read() + def test_egg_fragment(self): + """ + EGG fragments must comply to PEP 440 + """ + epoch = [ + '', + '1!', + ] + releases = [ + '0', + '0.0', + '0.0.0', + ] + pre = [ + 'a0', + 'b0', + 'rc0', + ] + post = [ + '.post0' + ] + dev = [ + '.dev0', + ] + local = [ + ('', ''), + ('+ubuntu.0', '+ubuntu.0'), + ('+ubuntu-0', '+ubuntu.0'), + ('+ubuntu_0', '+ubuntu.0'), + ] + versions = [ + [''.join([e, r, p, l]) for l in ll] + for e in epoch + for r in releases + for p in sum([pre, post, dev], ['']) + for ll in local] + for v, vc in versions: + dists = list(setuptools.package_index.distros_for_url( + 'http://example.com/example.zip#egg=example-' + v)) + assert dists[0].version == '' + assert dists[1].version == vc + class TestContentCheckers: def test_md5(self): From f33cfac393676065088bf7b704207bdcda0fdd4f Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Mon, 13 Feb 2017 04:42:08 +0900 Subject: [PATCH 6509/8469] Description for the change. --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8db3c6881b..16fcbcc789 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ v34.2.0 * #966: Add support for reading dist-info metadata and thus locating Distributions from zip files. +* #968: Allow '+' and '!' in egg fragments + so that it can take package names that contain + PEP 440 conforming version specifiers. + v34.1.1 ------- From 92c5667e23e0c3a242182f3f869b86bad6d5a0ae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Feb 2017 21:31:50 -0500 Subject: [PATCH 6510/8469] =?UTF-8?q?Bump=20version:=2034.1.1=20=E2=86=92?= =?UTF-8?q?=2034.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 211e5601e8..78c3153f14 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.1.1 +current_version = 34.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 85ded0c221..250d7f3925 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.1.1", + version="34.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9406d8fe002605af0f76f2de6c1e2fa1f44522fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Feb 2017 09:53:05 -0500 Subject: [PATCH 6511/8469] Remove redundant test from -nspkg.pth. If m is non-true, then has_mfs must have been False. --- setuptools/namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 556b5dd20a..7c24a566c3 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -52,7 +52,7 @@ def _get_target(self): "importlib.util.module_from_spec(" "importlib.machinery.PathFinder.find_spec(%(pkg)r, " "[os.path.dirname(p)])))", - "m = m or not has_mfs and " + "m = m or " "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", From 5c80844b0291ef2b326bcf8cf79e9a69dbd01a6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 23 Feb 2017 11:51:23 -0500 Subject: [PATCH 6512/8469] Release on Python 3.6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7affc0a659..adb2f948d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ deploy: on: tags: true all_branches: true - python: 3.5 + python: 3.6 condition: $LC_ALL != "C" user: jaraco password: From 05d47d9fc7a5d1509734a2205fd2c976d22996b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 23 Feb 2017 16:36:16 -0500 Subject: [PATCH 6513/8469] Update changelog. Ref #961. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 4058e23be3..efe4488e12 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.3.0 +------- + +* #941: In the upload command, if the username is blank, + default to ``getpass.getuser()``. + v34.1.0 ------- From 31cbff363a92d872f2daaaf1a24e1f9c0e47ca1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 23 Feb 2017 16:53:15 -0500 Subject: [PATCH 6514/8469] Update version match for issue12885. Ref #971. --- CHANGES.rst | 3 +++ setuptools/monkey.py | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0e47fe06ae..c6d5556fc0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ v34.3.0 * #941: In the upload command, if the username is blank, default to ``getpass.getuser()``. +* #971: Correct distutils findall monkeypatch to match + appropriate versions (namely Python 3.4.6). + v34.2.0 ------- diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 5843c46bbc..da6ecfe78d 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -52,13 +52,7 @@ def patch_all(): # we can't patch distutils.cmd, alas distutils.core.Command = setuptools.Command - has_issue_12885 = ( - sys.version_info < (3, 4, 6) - or - (3, 5) < sys.version_info <= (3, 5, 3) - or - (3, 6) < sys.version_info - ) + has_issue_12885 = sys.version_info <= (3, 5, 3) if has_issue_12885: # fix findall bug in distutils (http://bugs.python.org/issue12885) From bb4906b775ac64e0ac4184df4f1b4900be5ddae8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 23 Feb 2017 16:55:20 -0500 Subject: [PATCH 6515/8469] Remove incorrect open bound on 3.6 or later for warehouse patch. --- setuptools/monkey.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index da6ecfe78d..68fad9dd08 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -66,8 +66,6 @@ def patch_all(): (3, 4) < sys.version_info < (3, 4, 6) or (3, 5) < sys.version_info <= (3, 5, 3) - or - (3, 6) < sys.version_info ) if needs_warehouse: From 4c560effc96a75f337193bc164ad4117b0e333ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 23 Feb 2017 17:00:20 -0500 Subject: [PATCH 6516/8469] =?UTF-8?q?Bump=20version:=2034.2.0=20=E2=86=92?= =?UTF-8?q?=2034.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 78c3153f14..9fbe41eeef 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.2.0 +current_version = 34.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index 250d7f3925..5d436acec5 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.2.0", + version="34.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 3d0cc355fb5e8012cb8c72f0e25042a5a44f31d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Feb 2017 11:49:51 -0500 Subject: [PATCH 6517/8469] Revert "Merge pull request #933 from pypa/feature/581-depend-not-bundle" This reverts commit 089cdeb489a0fa94d11b7307b54210ef9aa40511, reversing changes made to aaec654d804cb78dbb6391afff721a63f26a71cd. --- .gitignore | 1 - .travis.yml | 4 +- bootstrap.py | 47 +- pavement.py | 32 + pkg_resources/__init__.py | 15 +- pkg_resources/_vendor/__init__.py | 0 pkg_resources/_vendor/appdirs.py | 552 ++ pkg_resources/_vendor/packaging/__about__.py | 21 + pkg_resources/_vendor/packaging/__init__.py | 14 + pkg_resources/_vendor/packaging/_compat.py | 30 + .../_vendor/packaging/_structures.py | 68 + pkg_resources/_vendor/packaging/markers.py | 301 + .../_vendor/packaging/requirements.py | 127 + pkg_resources/_vendor/packaging/specifiers.py | 774 +++ pkg_resources/_vendor/packaging/utils.py | 14 + pkg_resources/_vendor/packaging/version.py | 393 ++ pkg_resources/_vendor/pyparsing.py | 5696 +++++++++++++++++ pkg_resources/_vendor/six.py | 868 +++ pkg_resources/_vendor/vendored.txt | 4 + pkg_resources/extern/__init__.py | 73 + pkg_resources/tests/test_pkg_resources.py | 2 +- pkg_resources/tests/test_resources.py | 4 +- pyproject.toml | 9 - setup.py | 10 +- setuptools/__init__.py | 2 +- setuptools/command/alias.py | 2 +- setuptools/command/bdist_egg.py | 2 +- setuptools/command/build_ext.py | 2 +- setuptools/command/build_py.py | 4 +- setuptools/command/develop.py | 2 +- setuptools/command/easy_install.py | 4 +- setuptools/command/egg_info.py | 6 +- setuptools/command/py36compat.py | 2 +- setuptools/command/rotate.py | 2 +- setuptools/command/sdist.py | 2 +- setuptools/command/setopt.py | 2 +- setuptools/command/test.py | 4 +- setuptools/command/upload_docs.py | 4 +- setuptools/config.py | 2 +- setuptools/dist.py | 6 +- setuptools/extension.py | 2 +- setuptools/extern/__init__.py | 4 + setuptools/glob.py | 2 +- setuptools/monkey.py | 2 +- setuptools/msvc.py | 6 +- setuptools/namespaces.py | 2 +- setuptools/package_index.py | 4 +- setuptools/py33compat.py | 2 +- setuptools/sandbox.py | 4 +- setuptools/ssl_support.py | 2 +- setuptools/tests/__init__.py | 2 +- setuptools/tests/contexts.py | 2 +- setuptools/tests/server.py | 2 +- setuptools/tests/test_archive_util.py | 2 +- setuptools/tests/test_build_ext.py | 2 +- setuptools/tests/test_develop.py | 2 +- setuptools/tests/test_dist_info.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_egg_info.py | 2 +- setuptools/tests/test_integration.py | 2 +- setuptools/tests/test_manifest.py | 2 +- setuptools/tests/test_packageindex.py | 4 +- setuptools/tests/test_sdist.py | 4 +- setuptools/unicode_utils.py | 2 +- tests/requirements.txt | 1 + tests/test_pypi.py | 4 +- tox.ini | 5 +- 67 files changed, 9044 insertions(+), 135 deletions(-) create mode 100644 pavement.py create mode 100644 pkg_resources/_vendor/__init__.py create mode 100644 pkg_resources/_vendor/appdirs.py create mode 100644 pkg_resources/_vendor/packaging/__about__.py create mode 100644 pkg_resources/_vendor/packaging/__init__.py create mode 100644 pkg_resources/_vendor/packaging/_compat.py create mode 100644 pkg_resources/_vendor/packaging/_structures.py create mode 100644 pkg_resources/_vendor/packaging/markers.py create mode 100644 pkg_resources/_vendor/packaging/requirements.py create mode 100644 pkg_resources/_vendor/packaging/specifiers.py create mode 100644 pkg_resources/_vendor/packaging/utils.py create mode 100644 pkg_resources/_vendor/packaging/version.py create mode 100644 pkg_resources/_vendor/pyparsing.py create mode 100644 pkg_resources/_vendor/six.py create mode 100644 pkg_resources/_vendor/vendored.txt create mode 100644 pkg_resources/extern/__init__.py delete mode 100644 pyproject.toml create mode 100644 setuptools/extern/__init__.py diff --git a/.gitignore b/.gitignore index ec3d0e3522..4d77520f68 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ setuptools.egg-info *.swp *~ .hg* -requirements.txt diff --git a/.travis.yml b/.travis.yml index adb2f948d7..56d1c4ef84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,7 @@ matrix: - python: 2.7 env: LC_ALL=C LC_CTYPE=C script: - # need tox and rwt to get started - - pip install tox rwt + - pip install tox # Output the env, to verify behavior - env @@ -24,6 +23,7 @@ script: # update egg_info based on setup.py in checkout - python bootstrap.py + #- python -m tox - tox before_deploy: diff --git a/bootstrap.py b/bootstrap.py index ee3b53c841..24d7093c00 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,14 +5,7 @@ egg-info command to flesh out the egg-info directory. """ -from __future__ import unicode_literals - import os -import io -import re -import contextlib -import tempfile -import shutil import sys import textwrap import subprocess @@ -48,8 +41,7 @@ def build_egg_info(): """ os.mkdir('setuptools.egg-info') - filename = 'setuptools.egg-info/entry_points.txt' - with io.open(filename, 'w', encoding='utf-8') as ep: + with open('setuptools.egg-info/entry_points.txt', 'w') as ep: ep.write(minimal_egg_info) @@ -61,44 +53,9 @@ def run_egg_info(): subprocess.check_call(cmd) -def gen_deps(): - with io.open('setup.py', encoding='utf-8') as strm: - text = strm.read() - pattern = r'install_requires=\[(.*?)\]' - match = re.search(pattern, text, flags=re.M|re.DOTALL) - reqs = eval(match.group(1).replace('\n', '')) - with io.open('requirements.txt', 'w', encoding='utf-8') as reqs_file: - reqs_file.write('\n'.join(reqs)) - - -@contextlib.contextmanager -def install_deps(): - "Just in time make the deps available" - import pip - tmpdir = tempfile.mkdtemp() - args = [ - 'install', - '-t', tmpdir, - '-r', 'requirements.txt', - ] - pip.main(args) - os.environ['PYTHONPATH'] = tmpdir - try: - yield tmpdir - finally: - shutil.rmtree(tmpdir) - - def main(): ensure_egg_info() - gen_deps() - try: - # first assume dependencies are present - run_egg_info() - except Exception: - # but if that fails, try again with dependencies just in time - with install_deps(): - run_egg_info() + run_egg_info() __name__ == '__main__' and main() diff --git a/pavement.py b/pavement.py new file mode 100644 index 0000000000..f85617d4fe --- /dev/null +++ b/pavement.py @@ -0,0 +1,32 @@ +import re + +from paver.easy import task, path as Path +import pip + + +def remove_all(paths): + for path in paths: + path.rmtree() if path.isdir() else path.remove() + + +@task +def update_vendored(): + vendor = Path('pkg_resources/_vendor') + # pip uninstall doesn't support -t, so do it manually + remove_all(vendor.glob('packaging*')) + remove_all(vendor.glob('six*')) + remove_all(vendor.glob('pyparsing*')) + remove_all(vendor.glob('appdirs*')) + install_args = [ + 'install', + '-r', str(vendor / 'vendored.txt'), + '-t', str(vendor), + ] + pip.main(install_args) + packaging = vendor / 'packaging' + for file in packaging.glob('*.py'): + text = file.text() + text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) + file.write_text(text) + remove_all(vendor.glob('*.dist-info')) + remove_all(vendor.glob('*.egg-info')) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 220a7ccc2e..2ed07c3dfe 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -45,8 +45,8 @@ # Python 3.2 compatibility import imp as _imp -import six -from six.moves import urllib, map, filter +from pkg_resources.extern import six +from pkg_resources.extern.six.moves import urllib, map, filter # capture these to bypass sandboxing from os import utime @@ -67,11 +67,12 @@ except ImportError: importlib_machinery = None -import packaging.version -import packaging.specifiers -import packaging.requirements -import packaging.markers -import appdirs +from pkg_resources.extern import appdirs +from pkg_resources.extern import packaging +__import__('pkg_resources.extern.packaging.version') +__import__('pkg_resources.extern.packaging.specifiers') +__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") diff --git a/pkg_resources/_vendor/__init__.py b/pkg_resources/_vendor/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py new file mode 100644 index 0000000000..f4dba0953c --- /dev/null +++ b/pkg_resources/_vendor/appdirs.py @@ -0,0 +1,552 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2005-2010 ActiveState Software Inc. +# Copyright (c) 2013 Eddy Petrișor + +"""Utilities for determining application-specific dirs. + +See for details and usage. +""" +# Dev Notes: +# - MSDN on where to store app data files: +# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 +# - 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__ = '.'.join(map(str, __version_info__)) + + +import sys +import os + +PY3 = sys.version_info[0] == 3 + +if PY3: + unicode = str + +if sys.platform.startswith('java'): + import platform + os_name = platform.java_ver()[3][0] + if os_name.startswith('Windows'): # "Windows XP", "Windows 7", etc. + system = 'win32' + elif os_name.startswith('Mac'): # "Mac OS X", etc. + system = 'darwin' + else: # "Linux", "SunOS", "FreeBSD", etc. + # Setting this to "linux2" is not ideal, but only Windows or Mac + # are actually checked for and the rest of the module expects + # *sys.platform* style strings. + system = 'linux2' +else: + system = sys.platform + + + +def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): + r"""Return full path to the user-specific data 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 ".". + 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 + + for a discussion of issues. + + Typical user data directories are: + Mac OS X: ~/Library/Application Support/ + Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined + Win XP (not roaming): C:\Documents and Settings\\Application Data\\ + Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ + Win 7 (not roaming): C:\Users\\AppData\Local\\ + Win 7 (roaming): C:\Users\\AppData\Roaming\\ + + For Unix, we follow the XDG spec and support $XDG_DATA_HOME. + That means, by default "~/.local/share/". + """ + if system == "win32": + if appauthor is None: + appauthor = appname + const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA" + path = os.path.normpath(_get_win_folder(const)) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + elif system == 'darwin': + path = os.path.expanduser('~/Library/Application Support/') + if appname: + path = os.path.join(path, appname) + else: + path = os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share")) + if appname: + path = os.path.join(path, appname) + if appname and version: + path = os.path.join(path, version) + return path + + +def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): + """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. + "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 ".". + Only applied when appname is present. + "multipath" is an optional parameter only applicable to *nix + which indicates that the entire list of data dirs should be + returned. By default, the first item from XDG_DATA_DIRS is + returned, or '/usr/local/share/', + if XDG_DATA_DIRS is not set + + Typical user data directories are: + Mac OS X: /Library/Application Support/ + Unix: /usr/local/share/ or /usr/share/ + Win XP: C:\Documents and Settings\All Users\Application Data\\ + Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) + Win 7: C:\ProgramData\\ # Hidden, but writeable on Win 7. + + For Unix, this is using the $XDG_DATA_DIRS[0] default. + + WARNING: Do not use this on Windows. See the Vista-Fail note above for why. + """ + if system == "win32": + if appauthor is None: + appauthor = appname + path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA")) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + elif system == 'darwin': + path = os.path.expanduser('/Library/Application Support') + if appname: + path = os.path.join(path, appname) + else: + # XDG default for $XDG_DATA_DIRS + # only first, if multipath is False + path = os.getenv('XDG_DATA_DIRS', + os.pathsep.join(['/usr/local/share', '/usr/share'])) + pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] + if appname: + if version: + appname = os.path.join(appname, version) + pathlist = [os.sep.join([x, appname]) for x in pathlist] + + if multipath: + path = os.pathsep.join(pathlist) + else: + path = pathlist[0] + return path + + if appname and version: + path = os.path.join(path, version) + return path + + +def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): + r"""Return full path to the user-specific config 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 ".". + 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 + + for a discussion of issues. + + Typical user data directories are: + Mac OS X: same as user_data_dir + Unix: ~/.config/ # 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/". + """ + if system in ["win32", "darwin"]: + path = user_data_dir(appname, appauthor, None, roaming) + else: + path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser("~/.config")) + if appname: + path = os.path.join(path, appname) + if appname and version: + path = os.path.join(path, version) + return path + + +def site_config_dir(appname=None, appauthor=None, version=None, multipath=False): + """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. + "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 ".". + Only applied when appname is present. + "multipath" is an optional parameter only applicable to *nix + which indicates that the entire list of config dirs should be + returned. By default, the first item from XDG_CONFIG_DIRS is + returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set + + Typical user data directories are: + Mac OS X: same as site_data_dir + Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in + $XDG_CONFIG_DIRS + Win *: same as site_data_dir + Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) + + For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False + + WARNING: Do not use this on Windows. See the Vista-Fail note above for why. + """ + if system in ["win32", "darwin"]: + path = site_data_dir(appname, appauthor) + if appname and version: + path = os.path.join(path, version) + else: + # XDG default for $XDG_CONFIG_DIRS + # only first, if multipath is False + path = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg') + pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)] + if appname: + if version: + appname = os.path.join(appname, version) + pathlist = [os.sep.join([x, appname]) for x in pathlist] + + if multipath: + path = os.pathsep.join(pathlist) + else: + path = pathlist[0] + return path + + +def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): + r"""Return full path to the user-specific cache 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 ".". + Only applied when appname is present. + "opinion" (boolean) can be False to disable the appending of + "Cache" to the base app data dir for Windows. See + discussion below. + + Typical user cache directories are: + Mac OS X: ~/Library/Caches/ + Unix: ~/.cache/ (XDG default) + Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache + Vista: C:\Users\\AppData\Local\\\Cache + + On Windows the only suggestion in the MSDN docs is that local settings go in + the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming + app data dir (the default returned by `user_data_dir` above). Apps typically + put cache data somewhere *under* the given dir here. Some examples: + ...\Mozilla\Firefox\Profiles\\Cache + ...\Acme\SuperApp\Cache\1.0 + OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. + This can be disabled with the `opinion=False` option. + """ + if system == "win32": + if appauthor is None: + appauthor = appname + path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA")) + if appname: + if appauthor is not False: + path = os.path.join(path, appauthor, appname) + else: + path = os.path.join(path, appname) + if opinion: + path = os.path.join(path, "Cache") + elif system == 'darwin': + path = os.path.expanduser('~/Library/Caches') + if appname: + path = os.path.join(path, appname) + else: + path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache')) + 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. + + "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 ".". + Only applied when appname is present. + "opinion" (boolean) can be False to disable the appending of + "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: + Mac OS X: ~/Library/Logs/ + Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined + Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs + Vista: C:\Users\\AppData\Local\\\Logs + + On Windows the only suggestion in the MSDN docs is that local settings + go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in + examples of what some windows apps use for a logs dir.) + + OPINION: This function appends "Logs" to the `CSIDL_LOCAL_APPDATA` + value for Windows and appends "log" to the user cache dir for Unix. + This can be disabled with the `opinion=False` option. + """ + if system == "darwin": + path = os.path.join( + os.path.expanduser('~/Library/Logs'), + appname) + elif system == "win32": + path = user_data_dir(appname, appauthor, version) + version = False + if opinion: + path = os.path.join(path, "Logs") + else: + path = user_cache_dir(appname, appauthor, version) + version = False + if opinion: + path = os.path.join(path, "log") + if appname and version: + path = os.path.join(path, version) + return path + + +class AppDirs(object): + """Convenience wrapper for getting application dirs.""" + def __init__(self, appname, appauthor=None, version=None, roaming=False, + multipath=False): + self.appname = appname + self.appauthor = appauthor + self.version = version + self.roaming = roaming + self.multipath = multipath + + @property + def user_data_dir(self): + return user_data_dir(self.appname, self.appauthor, + version=self.version, roaming=self.roaming) + + @property + def site_data_dir(self): + return site_data_dir(self.appname, self.appauthor, + version=self.version, multipath=self.multipath) + + @property + def user_config_dir(self): + return user_config_dir(self.appname, self.appauthor, + version=self.version, roaming=self.roaming) + + @property + def site_config_dir(self): + return site_config_dir(self.appname, self.appauthor, + version=self.version, multipath=self.multipath) + + @property + def user_cache_dir(self): + return user_cache_dir(self.appname, self.appauthor, + version=self.version) + + @property + def user_log_dir(self): + return user_log_dir(self.appname, self.appauthor, + version=self.version) + + +#---- internal support stuff + +def _get_win_folder_from_registry(csidl_name): + """This is a fallback technique at best. I'm not sure if using the + registry for this guarantees us the correct answer for all CSIDL_* + names. + """ + import _winreg + + shell_folder_name = { + "CSIDL_APPDATA": "AppData", + "CSIDL_COMMON_APPDATA": "Common AppData", + "CSIDL_LOCAL_APPDATA": "Local AppData", + }[csidl_name] + + key = _winreg.OpenKey( + _winreg.HKEY_CURRENT_USER, + r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" + ) + dir, type = _winreg.QueryValueEx(key, shell_folder_name) + return dir + + +def _get_win_folder_with_pywin32(csidl_name): + from win32com.shell import shellcon, shell + dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0) + # Try to make this a unicode path because SHGetFolderPath does + # not return unicode strings when there is unicode data in the + # path. + try: + dir = unicode(dir) + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in dir: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + try: + import win32api + dir = win32api.GetShortPathName(dir) + except ImportError: + pass + except UnicodeError: + pass + return dir + + +def _get_win_folder_with_ctypes(csidl_name): + import ctypes + + csidl_const = { + "CSIDL_APPDATA": 26, + "CSIDL_COMMON_APPDATA": 35, + "CSIDL_LOCAL_APPDATA": 28, + }[csidl_name] + + buf = ctypes.create_unicode_buffer(1024) + ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf) + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in buf: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + buf2 = ctypes.create_unicode_buffer(1024) + if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024): + buf = buf2 + + return buf.value + +def _get_win_folder_with_jna(csidl_name): + import array + from com.sun import jna + from com.sun.jna.platform import win32 + + buf_size = win32.WinDef.MAX_PATH * 2 + buf = array.zeros('c', buf_size) + shell = win32.Shell32.INSTANCE + shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf) + dir = jna.Native.toString(buf.tostring()).rstrip("\0") + + # Downgrade to short path name if have highbit chars. See + # . + has_high_char = False + for c in dir: + if ord(c) > 255: + has_high_char = True + break + if has_high_char: + buf = array.zeros('c', buf_size) + kernel = win32.Kernel32.INSTANCE + if kernal.GetShortPathName(dir, buf, buf_size): + dir = jna.Native.toString(buf.tostring()).rstrip("\0") + + return dir + +if system == "win32": + try: + import win32com.shell + _get_win_folder = _get_win_folder_with_pywin32 + except ImportError: + try: + from ctypes import windll + _get_win_folder = _get_win_folder_with_ctypes + except ImportError: + try: + import com.sun.jna + _get_win_folder = _get_win_folder_with_jna + except ImportError: + _get_win_folder = _get_win_folder_from_registry + + +#---- self test code + +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") + + print("-- app dirs (with optional 'version')") + dirs = AppDirs(appname, appauthor, version="1.0") + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (without optional 'version')") + dirs = AppDirs(appname, appauthor) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (without optional 'appauthor')") + dirs = AppDirs(appname) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) + + print("\n-- app dirs (with disabled 'appauthor')") + dirs = AppDirs(appname, appauthor=False) + for prop in props: + print("%s: %s" % (prop, getattr(dirs, prop))) diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py new file mode 100644 index 0000000000..95d330ef82 --- /dev/null +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -0,0 +1,21 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] + +__title__ = "packaging" +__summary__ = "Core utilities for Python packages" +__uri__ = "https://github.com/pypa/packaging" + +__version__ = "16.8" + +__author__ = "Donald Stufft and individual contributors" +__email__ = "donald@stufft.io" + +__license__ = "BSD or Apache License, Version 2.0" +__copyright__ = "Copyright 2014-2016 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/__init__.py b/pkg_resources/_vendor/packaging/__init__.py new file mode 100644 index 0000000000..5ee6220203 --- /dev/null +++ b/pkg_resources/_vendor/packaging/__init__.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +from .__about__ import ( + __author__, __copyright__, __email__, __license__, __summary__, __title__, + __uri__, __version__ +) + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] diff --git a/pkg_resources/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py new file mode 100644 index 0000000000..210bb80b7e --- /dev/null +++ b/pkg_resources/_vendor/packaging/_compat.py @@ -0,0 +1,30 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import sys + + +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 + +# flake8: noqa + +if PY3: + string_types = str, +else: + string_types = basestring, + + +def with_metaclass(meta, *bases): + """ + Create a base class with a metaclass. + """ + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py new file mode 100644 index 0000000000..ccc27861c3 --- /dev/null +++ b/pkg_resources/_vendor/packaging/_structures.py @@ -0,0 +1,68 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + + +class Infinity(object): + + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + +Infinity = Infinity() + + +class NegativeInfinity(object): + + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + +NegativeInfinity = NegativeInfinity() diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py new file mode 100644 index 0000000000..892e578edd --- /dev/null +++ b/pkg_resources/_vendor/packaging/markers.py @@ -0,0 +1,301 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import operator +import os +import platform +import sys + +from pkg_resources.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd +from pkg_resources.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString +from pkg_resources.extern.pyparsing import Literal as L # noqa + +from ._compat import string_types +from .specifiers import Specifier, InvalidSpecifier + + +__all__ = [ + "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", + "Marker", "default_environment", +] + + +class InvalidMarker(ValueError): + """ + An invalid marker was found, users should refer to PEP 508. + """ + + +class UndefinedComparison(ValueError): + """ + An invalid operation was attempted on a value that doesn't support it. + """ + + +class UndefinedEnvironmentName(ValueError): + """ + A name was attempted to be used that does not exist inside of the + environment. + """ + + +class Node(object): + + def __init__(self, value): + self.value = value + + def __str__(self): + return str(self.value) + + def __repr__(self): + return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) + + def serialize(self): + raise NotImplementedError + + +class Variable(Node): + + def serialize(self): + return str(self) + + +class Value(Node): + + def serialize(self): + return '"{0}"'.format(self) + + +class Op(Node): + + def serialize(self): + return str(self) + + +VARIABLE = ( + L("implementation_version") | + L("platform_python_implementation") | + L("implementation_name") | + L("python_full_version") | + L("platform_release") | + L("platform_version") | + L("platform_machine") | + L("platform_system") | + L("python_version") | + L("sys_platform") | + L("os_name") | + L("os.name") | # PEP-345 + L("sys.platform") | # PEP-345 + L("platform.version") | # PEP-345 + L("platform.machine") | # PEP-345 + L("platform.python_implementation") | # PEP-345 + L("python_implementation") | # undocumented setuptools legacy + L("extra") +) +ALIASES = { + 'os.name': 'os_name', + 'sys.platform': 'sys_platform', + 'platform.version': 'platform_version', + 'platform.machine': 'platform_machine', + 'platform.python_implementation': 'platform_python_implementation', + 'python_implementation': 'platform_python_implementation' +} +VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) + +VERSION_CMP = ( + L("===") | + L("==") | + L(">=") | + L("<=") | + L("!=") | + L("~=") | + L(">") | + L("<") +) + +MARKER_OP = VERSION_CMP | L("not in") | L("in") +MARKER_OP.setParseAction(lambda s, l, t: Op(t[0])) + +MARKER_VALUE = QuotedString("'") | QuotedString('"') +MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0])) + +BOOLOP = L("and") | L("or") + +MARKER_VAR = VARIABLE | MARKER_VALUE + +MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR) +MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0])) + +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() + +MARKER_EXPR = Forward() +MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN) +MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR) + +MARKER = stringStart + MARKER_EXPR + stringEnd + + +def _coerce_parse_result(results): + if isinstance(results, ParseResults): + return [_coerce_parse_result(i) for i in results] + else: + return results + + +def _format_marker(marker, first=True): + assert isinstance(marker, (list, tuple, string_types)) + + # Sometimes we have a structure like [[...]] which is a single item list + # where the single item is itself it's own list. In that case we want skip + # the rest of this function so that we don't get extraneous () on the + # outside. + if (isinstance(marker, list) and len(marker) == 1 and + isinstance(marker[0], (list, tuple))): + return _format_marker(marker[0]) + + if isinstance(marker, list): + inner = (_format_marker(m, first=False) for m in marker) + if first: + return " ".join(inner) + else: + return "(" + " ".join(inner) + ")" + elif isinstance(marker, tuple): + return " ".join([m.serialize() for m in marker]) + else: + return marker + + +_operators = { + "in": lambda lhs, rhs: lhs in rhs, + "not in": lambda lhs, rhs: lhs not in rhs, + "<": operator.lt, + "<=": operator.le, + "==": operator.eq, + "!=": operator.ne, + ">=": operator.ge, + ">": operator.gt, +} + + +def _eval_op(lhs, op, rhs): + try: + spec = Specifier("".join([op.serialize(), rhs])) + except InvalidSpecifier: + pass + else: + return spec.contains(lhs) + + oper = _operators.get(op.serialize()) + if oper is None: + raise UndefinedComparison( + "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) + ) + + return oper(lhs, rhs) + + +_undefined = object() + + +def _get_env(environment, name): + value = environment.get(name, _undefined) + + if value is _undefined: + raise UndefinedEnvironmentName( + "{0!r} does not exist in evaluation environment.".format(name) + ) + + return value + + +def _evaluate_markers(markers, environment): + groups = [[]] + + for marker in markers: + assert isinstance(marker, (list, tuple, string_types)) + + if isinstance(marker, list): + groups[-1].append(_evaluate_markers(marker, environment)) + elif isinstance(marker, tuple): + lhs, op, rhs = marker + + if isinstance(lhs, Variable): + lhs_value = _get_env(environment, lhs.value) + rhs_value = rhs.value + else: + lhs_value = lhs.value + rhs_value = _get_env(environment, rhs.value) + + groups[-1].append(_eval_op(lhs_value, op, rhs_value)) + else: + assert marker in ["and", "or"] + if marker == "or": + groups.append([]) + + return any(all(item) for item in groups) + + +def format_full_version(info): + version = '{0.major}.{0.minor}.{0.micro}'.format(info) + kind = info.releaselevel + if kind != 'final': + version += kind[0] + str(info.serial) + return version + + +def default_environment(): + if hasattr(sys, 'implementation'): + iver = format_full_version(sys.implementation.version) + implementation_name = sys.implementation.name + else: + iver = '0' + implementation_name = '' + + return { + "implementation_name": implementation_name, + "implementation_version": iver, + "os_name": os.name, + "platform_machine": platform.machine(), + "platform_release": platform.release(), + "platform_system": platform.system(), + "platform_version": platform.version(), + "python_full_version": platform.python_version(), + "platform_python_implementation": platform.python_implementation(), + "python_version": platform.python_version()[:3], + "sys_platform": sys.platform, + } + + +class Marker(object): + + def __init__(self, marker): + try: + self._markers = _coerce_parse_result(MARKER.parseString(marker)) + except ParseException as e: + err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( + marker, marker[e.loc:e.loc + 8]) + raise InvalidMarker(err_str) + + def __str__(self): + return _format_marker(self._markers) + + def __repr__(self): + return "".format(str(self)) + + def evaluate(self, environment=None): + """Evaluate a marker. + + Return the boolean from evaluating the given marker against the + environment. environment is an optional argument to override all or + part of the determined environment. + + The environment is determined from the current Python process. + """ + current_environment = default_environment() + if environment is not None: + current_environment.update(environment) + + return _evaluate_markers(self._markers, current_environment) diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py new file mode 100644 index 0000000000..0c8c4a3852 --- /dev/null +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -0,0 +1,127 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import string +import re + +from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from pkg_resources.extern.pyparsing import Literal as L # noqa +from pkg_resources.extern.six.moves.urllib import parse as urlparse + +from .markers import MARKER_EXPR, Marker +from .specifiers import LegacySpecifier, Specifier, SpecifierSet + + +class InvalidRequirement(ValueError): + """ + An invalid requirement was found, users should refer to PEP 508. + """ + + +ALPHANUM = Word(string.ascii_letters + string.digits) + +LBRACKET = L("[").suppress() +RBRACKET = L("]").suppress() +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() +COMMA = L(",").suppress() +SEMICOLON = L(";").suppress() +AT = L("@").suppress() + +PUNCTUATION = Word("-_.") +IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM) +IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END)) + +NAME = IDENTIFIER("name") +EXTRA = IDENTIFIER + +URI = Regex(r'[^ ]+')("url") +URL = (AT + URI) + +EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) +EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") + +VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE) +VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) + +VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY +VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), + joinString=",", adjacent=False)("_raw_spec") +_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) +_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') + +VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") +VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) + +MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") +MARKER_EXPR.setParseAction( + lambda s, l, t: Marker(s[t._original_start:t._original_end]) +) +MARKER_SEPERATOR = SEMICOLON +MARKER = MARKER_SEPERATOR + MARKER_EXPR + +VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) +URL_AND_MARKER = URL + Optional(MARKER) + +NAMED_REQUIREMENT = \ + NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) + +REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd + + +class Requirement(object): + """Parse a requirement. + + Parse a given requirement string into its parts, such as name, specifier, + URL, and extras. Raises InvalidRequirement on a badly-formed requirement + string. + """ + + # TODO: Can we test whether something is contained within a requirement? + # If so how do we do that? Do we need to test against the _name_ of + # the thing as well as the version? What about the markers? + # TODO: Can we normalize the name and extra name? + + def __init__(self, requirement_string): + try: + req = REQUIREMENT.parseString(requirement_string) + except ParseException as e: + raise InvalidRequirement( + "Invalid requirement, parse error at \"{0!r}\"".format( + requirement_string[e.loc:e.loc + 8])) + + self.name = req.name + if req.url: + parsed_url = urlparse.urlparse(req.url) + if not (parsed_url.scheme and parsed_url.netloc) or ( + not parsed_url.scheme and not parsed_url.netloc): + raise InvalidRequirement("Invalid URL given") + self.url = req.url + else: + self.url = None + self.extras = set(req.extras.asList() if req.extras else []) + self.specifier = SpecifierSet(req.specifier) + self.marker = req.marker if req.marker else None + + def __str__(self): + parts = [self.name] + + if self.extras: + parts.append("[{0}]".format(",".join(sorted(self.extras)))) + + if self.specifier: + parts.append(str(self.specifier)) + + if self.url: + parts.append("@ {0}".format(self.url)) + + if self.marker: + parts.append("; {0}".format(self.marker)) + + return "".join(parts) + + def __repr__(self): + return "".format(str(self)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py new file mode 100644 index 0000000000..7f5a76cfd6 --- /dev/null +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -0,0 +1,774 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import abc +import functools +import itertools +import re + +from ._compat import string_types, with_metaclass +from .version import Version, LegacyVersion, parse + + +class InvalidSpecifier(ValueError): + """ + An invalid specifier was found, users should refer to PEP 440. + """ + + +class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): + + @abc.abstractmethod + def __str__(self): + """ + Returns the str representation of this Specifier like object. This + should be representative of the Specifier itself. + """ + + @abc.abstractmethod + def __hash__(self): + """ + Returns a hash value for this Specifier like object. + """ + + @abc.abstractmethod + def __eq__(self, other): + """ + Returns a boolean representing whether or not the two Specifier like + objects are equal. + """ + + @abc.abstractmethod + def __ne__(self, other): + """ + Returns a boolean representing whether or not the two Specifier like + objects are not equal. + """ + + @abc.abstractproperty + def prereleases(self): + """ + Returns whether or not pre-releases as a whole are allowed by this + specifier. + """ + + @prereleases.setter + def prereleases(self, value): + """ + Sets whether or not pre-releases as a whole are allowed by this + specifier. + """ + + @abc.abstractmethod + def contains(self, item, prereleases=None): + """ + Determines if the given item is contained within this specifier. + """ + + @abc.abstractmethod + def filter(self, iterable, prereleases=None): + """ + Takes an iterable of items and filters them so that only items which + are contained within this specifier are allowed in it. + """ + + +class _IndividualSpecifier(BaseSpecifier): + + _operators = {} + + def __init__(self, spec="", prereleases=None): + match = self._regex.search(spec) + if not match: + raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) + + self._spec = ( + match.group("operator").strip(), + match.group("version").strip(), + ) + + # Store whether or not this Specifier should accept prereleases + self._prereleases = prereleases + + def __repr__(self): + pre = ( + ", prereleases={0!r}".format(self.prereleases) + if self._prereleases is not None + else "" + ) + + return "<{0}({1!r}{2})>".format( + self.__class__.__name__, + str(self), + pre, + ) + + def __str__(self): + return "{0}{1}".format(*self._spec) + + def __hash__(self): + return hash(self._spec) + + def __eq__(self, other): + if isinstance(other, string_types): + try: + other = self.__class__(other) + except InvalidSpecifier: + return NotImplemented + elif not isinstance(other, self.__class__): + return NotImplemented + + return self._spec == other._spec + + def __ne__(self, other): + if isinstance(other, string_types): + try: + other = self.__class__(other) + except InvalidSpecifier: + return NotImplemented + elif not isinstance(other, self.__class__): + return NotImplemented + + return self._spec != other._spec + + def _get_operator(self, op): + return getattr(self, "_compare_{0}".format(self._operators[op])) + + def _coerce_version(self, version): + if not isinstance(version, (LegacyVersion, Version)): + version = parse(version) + return version + + @property + def operator(self): + return self._spec[0] + + @property + def version(self): + return self._spec[1] + + @property + def prereleases(self): + return self._prereleases + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + def __contains__(self, item): + return self.contains(item) + + def contains(self, item, prereleases=None): + # Determine if prereleases are to be allowed or not. + if prereleases is None: + prereleases = self.prereleases + + # Normalize item to a Version or LegacyVersion, this allows us to have + # a shortcut for ``"2.0" in Specifier(">=2") + item = self._coerce_version(item) + + # Determine if we should be supporting prereleases in this specifier + # or not, if we do not support prereleases than we can short circuit + # logic if this version is a prereleases. + if item.is_prerelease and not prereleases: + return False + + # Actually do the comparison to determine if this item is contained + # within this Specifier or not. + return self._get_operator(self.operator)(item, self.version) + + def filter(self, iterable, prereleases=None): + yielded = False + found_prereleases = [] + + kw = {"prereleases": prereleases if prereleases is not None else True} + + # Attempt to iterate over all the values in the iterable and if any of + # them match, yield them. + for version in iterable: + parsed_version = self._coerce_version(version) + + if self.contains(parsed_version, **kw): + # If our version is a prerelease, and we were not set to allow + # prereleases, then we'll store it for later incase nothing + # else matches this specifier. + if (parsed_version.is_prerelease and not + (prereleases or self.prereleases)): + found_prereleases.append(version) + # Either this is not a prerelease, or we should have been + # accepting prereleases from the begining. + else: + yielded = True + yield version + + # Now that we've iterated over everything, determine if we've yielded + # any values, and if we have not and we have any prereleases stored up + # then we will go ahead and yield the prereleases. + if not yielded and found_prereleases: + for version in found_prereleases: + yield version + + +class LegacySpecifier(_IndividualSpecifier): + + _regex_str = ( + r""" + (?P(==|!=|<=|>=|<|>)) + \s* + (?P + [^,;\s)]* # Since this is a "legacy" specifier, and the version + # string can be just about anything, we match everything + # except for whitespace, a semi-colon for marker support, + # a closing paren since versions can be enclosed in + # them, and a comma since it's a version separator. + ) + """ + ) + + _regex = re.compile( + r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + + _operators = { + "==": "equal", + "!=": "not_equal", + "<=": "less_than_equal", + ">=": "greater_than_equal", + "<": "less_than", + ">": "greater_than", + } + + def _coerce_version(self, version): + if not isinstance(version, LegacyVersion): + version = LegacyVersion(str(version)) + return version + + def _compare_equal(self, prospective, spec): + return prospective == self._coerce_version(spec) + + def _compare_not_equal(self, prospective, spec): + return prospective != self._coerce_version(spec) + + def _compare_less_than_equal(self, prospective, spec): + return prospective <= self._coerce_version(spec) + + def _compare_greater_than_equal(self, prospective, spec): + return prospective >= self._coerce_version(spec) + + def _compare_less_than(self, prospective, spec): + return prospective < self._coerce_version(spec) + + def _compare_greater_than(self, prospective, spec): + return prospective > self._coerce_version(spec) + + +def _require_version_compare(fn): + @functools.wraps(fn) + def wrapped(self, prospective, spec): + if not isinstance(prospective, Version): + return False + return fn(self, prospective, spec) + return wrapped + + +class Specifier(_IndividualSpecifier): + + _regex_str = ( + r""" + (?P(~=|==|!=|<=|>=|<|>|===)) + (?P + (?: + # The identity operators allow for an escape hatch that will + # do an exact string match of the version you wish to install. + # This will not be parsed by PEP 440 and we cannot determine + # any semantic meaning from it. This operator is discouraged + # but included entirely as an escape hatch. + (?<====) # Only match for the identity operator + \s* + [^\s]* # We just match everything, except for whitespace + # since we are only testing for strict identity. + ) + | + (?: + # The (non)equality operators allow for wild card and local + # versions to be specified so we have to define these two + # operators separately to enable that. + (?<===|!=) # Only match for equals and not equals + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)* # release + (?: # pre release + [-_\.]? + (a|b|c|rc|alpha|beta|pre|preview) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + + # You cannot use a wild card and a dev or local version + # together so group them with a | and make them optional. + (?: + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local + | + \.\* # Wild card syntax of .* + )? + ) + | + (?: + # The compatible operator requires at least two digits in the + # release segment. + (?<=~=) # Only match for the compatible operator + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) + (?: # pre release + [-_\.]? + (a|b|c|rc|alpha|beta|pre|preview) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + ) + | + (?: + # All other operators only allow a sub set of what the + # (non)equality operators do. Specifically they do not allow + # local versions to be specified nor do they allow the prefix + # matching wild cards. + (?=": "greater_than_equal", + "<": "less_than", + ">": "greater_than", + "===": "arbitrary", + } + + @_require_version_compare + def _compare_compatible(self, prospective, spec): + # Compatible releases have an equivalent combination of >= and ==. That + # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to + # implement this in terms of the other specifiers instead of + # implementing it ourselves. The only thing we need to do is construct + # the other specifiers. + + # We want everything but the last item in the version, but we want to + # ignore post and dev releases and we want to treat the pre-release as + # it's own separate segment. + prefix = ".".join( + list( + itertools.takewhile( + lambda x: (not x.startswith("post") and not + x.startswith("dev")), + _version_split(spec), + ) + )[:-1] + ) + + # Add the prefix notation to the end of our string + prefix += ".*" + + return (self._get_operator(">=")(prospective, spec) and + self._get_operator("==")(prospective, prefix)) + + @_require_version_compare + def _compare_equal(self, prospective, spec): + # We need special logic to handle prefix matching + if spec.endswith(".*"): + # In the case of prefix matching we want to ignore local segment. + prospective = Version(prospective.public) + # Split the spec out by dots, and pretend that there is an implicit + # dot in between a release segment and a pre-release segment. + spec = _version_split(spec[:-2]) # Remove the trailing .* + + # Split the prospective version out by dots, and pretend that there + # is an implicit dot in between a release segment and a pre-release + # segment. + prospective = _version_split(str(prospective)) + + # Shorten the prospective version to be the same length as the spec + # so that we can determine if the specifier is a prefix of the + # prospective version or not. + prospective = prospective[:len(spec)] + + # Pad out our two sides with zeros so that they both equal the same + # length. + spec, prospective = _pad_version(spec, prospective) + else: + # Convert our spec string into a Version + spec = Version(spec) + + # If the specifier does not have a local segment, then we want to + # act as if the prospective version also does not have a local + # segment. + if not spec.local: + prospective = Version(prospective.public) + + return prospective == spec + + @_require_version_compare + def _compare_not_equal(self, prospective, spec): + return not self._compare_equal(prospective, spec) + + @_require_version_compare + def _compare_less_than_equal(self, prospective, spec): + return prospective <= Version(spec) + + @_require_version_compare + def _compare_greater_than_equal(self, prospective, spec): + return prospective >= Version(spec) + + @_require_version_compare + def _compare_less_than(self, prospective, spec): + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec) + + # Check to see if the prospective version is less than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective < spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a pre-release version, that we do not accept pre-release + # versions for the version mentioned in the specifier (e.g. <3.1 should + # not match 3.1.dev0, but should match 3.0.dev0). + if not spec.is_prerelease and prospective.is_prerelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # less than the spec version *and* it's not a pre-release of the same + # version in the spec. + return True + + @_require_version_compare + def _compare_greater_than(self, prospective, spec): + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec) + + # Check to see if the prospective version is greater than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective > spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a post-release version, that we do not accept + # post-release versions for the version mentioned in the specifier + # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). + if not spec.is_postrelease and prospective.is_postrelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # Ensure that we do not allow a local version of the version mentioned + # in the specifier, which is techincally greater than, to match. + if prospective.local is not None: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # greater than the spec version *and* it's not a pre-release of the + # same version in the spec. + return True + + def _compare_arbitrary(self, prospective, spec): + return str(prospective).lower() == str(spec).lower() + + @property + def prereleases(self): + # If there is an explicit prereleases set for this, then we'll just + # blindly use that. + if self._prereleases is not None: + return self._prereleases + + # Look at all of our specifiers and determine if they are inclusive + # operators, and if they are if they are including an explicit + # prerelease. + operator, version = self._spec + if operator in ["==", ">=", "<=", "~=", "==="]: + # The == specifier can include a trailing .*, if it does we + # want to remove before parsing. + if operator == "==" and version.endswith(".*"): + version = version[:-2] + + # Parse the version, and if it is a pre-release than this + # specifier allows pre-releases. + if parse(version).is_prerelease: + return True + + return False + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + +_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$") + + +def _version_split(version): + result = [] + for item in version.split("."): + match = _prefix_regex.search(item) + if match: + result.extend(match.groups()) + else: + result.append(item) + return result + + +def _pad_version(left, right): + left_split, right_split = [], [] + + # Get the release segment of our versions + left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) + right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) + + # Get the rest of our versions + left_split.append(left[len(left_split[0]):]) + right_split.append(right[len(right_split[0]):]) + + # Insert our padding + left_split.insert( + 1, + ["0"] * max(0, len(right_split[0]) - len(left_split[0])), + ) + right_split.insert( + 1, + ["0"] * max(0, len(left_split[0]) - len(right_split[0])), + ) + + return ( + list(itertools.chain(*left_split)), + list(itertools.chain(*right_split)), + ) + + +class SpecifierSet(BaseSpecifier): + + def __init__(self, specifiers="", prereleases=None): + # Split on , to break each indidivual specifier into it's own item, and + # strip each item to remove leading/trailing whitespace. + specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] + + # Parsed each individual specifier, attempting first to make it a + # Specifier and falling back to a LegacySpecifier. + parsed = set() + for specifier in specifiers: + try: + parsed.add(Specifier(specifier)) + except InvalidSpecifier: + parsed.add(LegacySpecifier(specifier)) + + # Turn our parsed specifiers into a frozen set and save them for later. + self._specs = frozenset(parsed) + + # Store our prereleases value so we can use it later to determine if + # we accept prereleases or not. + self._prereleases = prereleases + + def __repr__(self): + pre = ( + ", prereleases={0!r}".format(self.prereleases) + if self._prereleases is not None + else "" + ) + + return "".format(str(self), pre) + + def __str__(self): + return ",".join(sorted(str(s) for s in self._specs)) + + def __hash__(self): + return hash(self._specs) + + def __and__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + specifier = SpecifierSet() + specifier._specs = frozenset(self._specs | other._specs) + + if self._prereleases is None and other._prereleases is not None: + specifier._prereleases = other._prereleases + elif self._prereleases is not None and other._prereleases is None: + specifier._prereleases = self._prereleases + elif self._prereleases == other._prereleases: + specifier._prereleases = self._prereleases + else: + raise ValueError( + "Cannot combine SpecifierSets with True and False prerelease " + "overrides." + ) + + return specifier + + def __eq__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif isinstance(other, _IndividualSpecifier): + other = SpecifierSet(str(other)) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + return self._specs == other._specs + + def __ne__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif isinstance(other, _IndividualSpecifier): + other = SpecifierSet(str(other)) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + return self._specs != other._specs + + def __len__(self): + return len(self._specs) + + def __iter__(self): + return iter(self._specs) + + @property + def prereleases(self): + # If we have been given an explicit prerelease modifier, then we'll + # pass that through here. + if self._prereleases is not None: + return self._prereleases + + # If we don't have any specifiers, and we don't have a forced value, + # then we'll just return None since we don't know if this should have + # pre-releases or not. + if not self._specs: + return None + + # Otherwise we'll see if any of the given specifiers accept + # prereleases, if any of them do we'll return True, otherwise False. + return any(s.prereleases for s in self._specs) + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + def __contains__(self, item): + return self.contains(item) + + def contains(self, item, prereleases=None): + # Ensure that our item is a Version or LegacyVersion instance. + if not isinstance(item, (LegacyVersion, Version)): + item = parse(item) + + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # We can determine if we're going to allow pre-releases by looking to + # see if any of the underlying items supports them. If none of them do + # and this item is a pre-release then we do not allow it and we can + # short circuit that here. + # Note: This means that 1.0.dev1 would not be contained in something + # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 + if not prereleases and item.is_prerelease: + return False + + # We simply dispatch to the underlying specs here to make sure that the + # given version is contained within all of them. + # Note: This use of all() here means that an empty set of specifiers + # will always return True, this is an explicit design decision. + return all( + s.contains(item, prereleases=prereleases) + for s in self._specs + ) + + def filter(self, iterable, prereleases=None): + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # If we have any specifiers, then we want to wrap our iterable in the + # filter method for each one, this will act as a logical AND amongst + # each specifier. + if self._specs: + for spec in self._specs: + iterable = spec.filter(iterable, prereleases=bool(prereleases)) + return iterable + # If we do not have any specifiers, then we need to have a rough filter + # which will filter out any pre-releases, unless there are no final + # releases, and which will filter out LegacyVersion in general. + else: + filtered = [] + found_prereleases = [] + + for item in iterable: + # Ensure that we some kind of Version class for this item. + if not isinstance(item, (LegacyVersion, Version)): + parsed_version = parse(item) + else: + parsed_version = item + + # Filter out any item which is parsed as a LegacyVersion + if isinstance(parsed_version, LegacyVersion): + continue + + # Store any item which is a pre-release for later unless we've + # already found a final version or we are accepting prereleases + if parsed_version.is_prerelease and not prereleases: + if not filtered: + found_prereleases.append(item) + else: + filtered.append(item) + + # If we've found no items except for pre-releases, then we'll go + # ahead and use the pre-releases + if not filtered and found_prereleases and prereleases is None: + return found_prereleases + + return filtered diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py new file mode 100644 index 0000000000..942387cef5 --- /dev/null +++ b/pkg_resources/_vendor/packaging/utils.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import re + + +_canonicalize_regex = re.compile(r"[-_.]+") + + +def canonicalize_name(name): + # This is taken from PEP 503. + return _canonicalize_regex.sub("-", name).lower() diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py new file mode 100644 index 0000000000..83b5ee8c5e --- /dev/null +++ b/pkg_resources/_vendor/packaging/version.py @@ -0,0 +1,393 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import collections +import itertools +import re + +from ._structures import Infinity + + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" +] + + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +def parse(version): + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion(object): + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return "".format(repr(str(self))) + + @property + def public(self): + return self._version + + @property + def base_version(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + @property + def is_postrelease(self): + return False + + +_legacy_version_component_re = re.compile( + r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, +) + +_legacy_version_replacement_map = { + "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", +} + + +def _parse_version_parts(s): + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version): + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # it's adoption of the packaging library. + parts = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + parts = tuple(parts) + + return epoch, parts + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                              # pre-release
    +            [-_\.]?
    +            (?P(a|b|c|rc|alpha|beta|pre|preview))
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +        (?P                                         # post release
    +            (?:-(?P[0-9]+))
    +            |
    +            (?:
    +                [-_\.]?
    +                (?Ppost|rev|r)
    +                [-_\.]?
    +                (?P[0-9]+)?
    +            )
    +        )?
    +        (?P                                          # dev release
    +            [-_\.]?
    +            (?Pdev)
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +    )
    +    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    +"""
    +
    +
    +class Version(_BaseVersion):
    +
    +    _regex = re.compile(
    +        r"^\s*" + VERSION_PATTERN + r"\s*$",
    +        re.VERBOSE | re.IGNORECASE,
    +    )
    +
    +    def __init__(self, version):
    +        # Validate the version and parse it into pieces
    +        match = self._regex.search(version)
    +        if not match:
    +            raise InvalidVersion("Invalid version: '{0}'".format(version))
    +
    +        # Store the parsed out pieces of the version
    +        self._version = _Version(
    +            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
    +            release=tuple(int(i) for i in match.group("release").split(".")),
    +            pre=_parse_letter_version(
    +                match.group("pre_l"),
    +                match.group("pre_n"),
    +            ),
    +            post=_parse_letter_version(
    +                match.group("post_l"),
    +                match.group("post_n1") or match.group("post_n2"),
    +            ),
    +            dev=_parse_letter_version(
    +                match.group("dev_l"),
    +                match.group("dev_n"),
    +            ),
    +            local=_parse_local_version(match.group("local")),
    +        )
    +
    +        # Generate a key which will be used for sorting
    +        self._key = _cmpkey(
    +            self._version.epoch,
    +            self._version.release,
    +            self._version.pre,
    +            self._version.post,
    +            self._version.dev,
    +            self._version.local,
    +        )
    +
    +    def __repr__(self):
    +        return "".format(repr(str(self)))
    +
    +    def __str__(self):
    +        parts = []
    +
    +        # Epoch
    +        if self._version.epoch != 0:
    +            parts.append("{0}!".format(self._version.epoch))
    +
    +        # Release segment
    +        parts.append(".".join(str(x) for x in self._version.release))
    +
    +        # Pre-release
    +        if self._version.pre is not None:
    +            parts.append("".join(str(x) for x in self._version.pre))
    +
    +        # Post-release
    +        if self._version.post is not None:
    +            parts.append(".post{0}".format(self._version.post[1]))
    +
    +        # Development release
    +        if self._version.dev is not None:
    +            parts.append(".dev{0}".format(self._version.dev[1]))
    +
    +        # Local version segment
    +        if self._version.local is not None:
    +            parts.append(
    +                "+{0}".format(".".join(str(x) for x in self._version.local))
    +            )
    +
    +        return "".join(parts)
    +
    +    @property
    +    def public(self):
    +        return str(self).split("+", 1)[0]
    +
    +    @property
    +    def base_version(self):
    +        parts = []
    +
    +        # Epoch
    +        if self._version.epoch != 0:
    +            parts.append("{0}!".format(self._version.epoch))
    +
    +        # Release segment
    +        parts.append(".".join(str(x) for x in self._version.release))
    +
    +        return "".join(parts)
    +
    +    @property
    +    def local(self):
    +        version_string = str(self)
    +        if "+" in version_string:
    +            return version_string.split("+", 1)[1]
    +
    +    @property
    +    def is_prerelease(self):
    +        return bool(self._version.dev or self._version.pre)
    +
    +    @property
    +    def is_postrelease(self):
    +        return bool(self._version.post)
    +
    +
    +def _parse_letter_version(letter, number):
    +    if letter:
    +        # We consider there to be an implicit 0 in a pre-release if there is
    +        # not a numeral associated with it.
    +        if number is None:
    +            number = 0
    +
    +        # We normalize any letters to their lower case form
    +        letter = letter.lower()
    +
    +        # We consider some words to be alternate spellings of other words and
    +        # in those cases we want to normalize the spellings to our preferred
    +        # spelling.
    +        if letter == "alpha":
    +            letter = "a"
    +        elif letter == "beta":
    +            letter = "b"
    +        elif letter in ["c", "pre", "preview"]:
    +            letter = "rc"
    +        elif letter in ["rev", "r"]:
    +            letter = "post"
    +
    +        return letter, int(number)
    +    if not letter and number:
    +        # We assume if we are given a number, but we are not given a letter
    +        # then this is using the implicit post release syntax (e.g. 1.0-1)
    +        letter = "post"
    +
    +        return letter, int(number)
    +
    +
    +_local_version_seperators = re.compile(r"[\._-]")
    +
    +
    +def _parse_local_version(local):
    +    """
    +    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    +    """
    +    if local is not None:
    +        return tuple(
    +            part.lower() if not part.isdigit() else int(part)
    +            for part in _local_version_seperators.split(local)
    +        )
    +
    +
    +def _cmpkey(epoch, release, pre, post, dev, local):
    +    # When we compare a release version, we want to compare it with all of the
    +    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    +    # leading zeros until we come to something non zero, then take the rest
    +    # re-reverse it back into the correct order and make it a tuple and use
    +    # that for our sorting key.
    +    release = tuple(
    +        reversed(list(
    +            itertools.dropwhile(
    +                lambda x: x == 0,
    +                reversed(release),
    +            )
    +        ))
    +    )
    +
    +    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    +    # We'll do this by abusing the pre segment, but we _only_ want to do this
    +    # if there is not a pre or a post segment. If we have one of those then
    +    # the normal sorting rules will handle this case correctly.
    +    if pre is None and post is None and dev is not None:
    +        pre = -Infinity
    +    # Versions without a pre-release (except as noted above) should sort after
    +    # those with one.
    +    elif pre is None:
    +        pre = Infinity
    +
    +    # Versions without a post segment should sort before those with one.
    +    if post is None:
    +        post = -Infinity
    +
    +    # Versions without a development segment should sort after those with one.
    +    if dev is None:
    +        dev = Infinity
    +
    +    if local is None:
    +        # Versions without a local segment should sort before those with one.
    +        local = -Infinity
    +    else:
    +        # Versions with a local segment need that segment parsed to implement
    +        # the sorting rules in PEP440.
    +        # - Alpha numeric segments sort before numeric segments
    +        # - Alpha numeric segments sort lexicographically
    +        # - Numeric segments sort numerically
    +        # - Shorter versions sort before longer versions when the prefixes
    +        #   match exactly
    +        local = tuple(
    +            (i, "") if isinstance(i, int) else (-Infinity, i)
    +            for i in local
    +        )
    +
    +    return epoch, release, pre, post, dev, local
    diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py
    new file mode 100644
    index 0000000000..a21224359e
    --- /dev/null
    +++ b/pkg_resources/_vendor/pyparsing.py
    @@ -0,0 +1,5696 @@
    +# module pyparsing.py
    +#
    +# Copyright (c) 2003-2016  Paul T. McGuire
    +#
    +# 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.
    +#
    +
    +__doc__ = \
    +"""
    +pyparsing module - Classes and methods to define and execute parsing grammars
    +
    +The pyparsing module is an alternative approach to creating and executing simple grammars,
    +vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you
    +don't need to learn a new syntax for defining grammars or matching expressions - the parsing module
    +provides a library of classes that you use to construct the grammar directly in Python.
    +
    +Here is a program to parse "Hello, World!" (or any greeting of the form 
    +C{", !"}), built up using L{Word}, L{Literal}, and L{And} elements 
    +(L{'+'} operator gives L{And} expressions, strings are auto-converted to
    +L{Literal} expressions)::
    +
    +    from pyparsing import Word, alphas
    +
    +    # define grammar of a greeting
    +    greet = Word(alphas) + "," + Word(alphas) + "!"
    +
    +    hello = "Hello, World!"
    +    print (hello, "->", greet.parseString(hello))
    +
    +The program outputs the following::
    +
    +    Hello, World! -> ['Hello', ',', 'World', '!']
    +
    +The Python representation of the grammar is quite readable, owing to the self-explanatory
    +class names, and the use of '+', '|' and '^' operators.
    +
    +The L{ParseResults} object returned from L{ParserElement.parseString} can be accessed as a nested list, a dictionary, or an
    +object with named attributes.
    +
    +The pyparsing module handles some of the problems that are typically vexing when writing text parsers:
    + - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)
    + - quoted strings
    + - embedded comments
    +"""
    +
    +__version__ = "2.1.10"
    +__versionTime__ = "07 Oct 2016 01:31 UTC"
    +__author__ = "Paul McGuire "
    +
    +import string
    +from weakref import ref as wkref
    +import copy
    +import sys
    +import warnings
    +import re
    +import sre_constants
    +import collections
    +import pprint
    +import traceback
    +import types
    +from datetime import datetime
    +
    +try:
    +    from _thread import RLock
    +except ImportError:
    +    from threading import RLock
    +
    +try:
    +    from collections import OrderedDict as _OrderedDict
    +except ImportError:
    +    try:
    +        from ordereddict import OrderedDict as _OrderedDict
    +    except ImportError:
    +        _OrderedDict = None
    +
    +#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
    +
    +__all__ = [
    +'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty',
    +'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal',
    +'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
    +'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException',
    +'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException',
    +'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 
    +'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore',
    +'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col',
    +'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString',
    +'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums',
    +'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno',
    +'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral',
    +'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables',
    +'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity', 
    +'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd',
    +'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute',
    +'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass',
    +'CloseMatch', 'tokenMap', 'pyparsing_common',
    +]
    +
    +system_version = tuple(sys.version_info)[:3]
    +PY_3 = system_version[0] == 3
    +if PY_3:
    +    _MAX_INT = sys.maxsize
    +    basestring = str
    +    unichr = chr
    +    _ustr = str
    +
    +    # build list of single arg builtins, that can be used as parse actions
    +    singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max]
    +
    +else:
    +    _MAX_INT = sys.maxint
    +    range = xrange
    +
    +    def _ustr(obj):
    +        """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries
    +           str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It
    +           then < returns the unicode object | encodes it with the default encoding | ... >.
    +        """
    +        if isinstance(obj,unicode):
    +            return obj
    +
    +        try:
    +            # If this works, then _ustr(obj) has the same behaviour as str(obj), so
    +            # it won't break any existing code.
    +            return str(obj)
    +
    +        except UnicodeEncodeError:
    +            # Else encode it
    +            ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace')
    +            xmlcharref = Regex('&#\d+;')
    +            xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:])
    +            return xmlcharref.transformString(ret)
    +
    +    # build list of single arg builtins, tolerant of Python version, that can be used as parse actions
    +    singleArgBuiltins = []
    +    import __builtin__
    +    for fname in "sum len sorted reversed list tuple set any all min max".split():
    +        try:
    +            singleArgBuiltins.append(getattr(__builtin__,fname))
    +        except AttributeError:
    +            continue
    +            
    +_generatorType = type((y for y in range(1)))
    + 
    +def _xml_escape(data):
    +    """Escape &, <, >, ", ', etc. in a string of data."""
    +
    +    # ampersand must be replaced first
    +    from_symbols = '&><"\''
    +    to_symbols = ('&'+s+';' for s in "amp gt lt quot apos".split())
    +    for from_,to_ in zip(from_symbols, to_symbols):
    +        data = data.replace(from_, to_)
    +    return data
    +
    +class _Constants(object):
    +    pass
    +
    +alphas     = string.ascii_uppercase + string.ascii_lowercase
    +nums       = "0123456789"
    +hexnums    = nums + "ABCDEFabcdef"
    +alphanums  = alphas + nums
    +_bslash    = chr(92)
    +printables = "".join(c for c in string.printable if c not in string.whitespace)
    +
    +class ParseBaseException(Exception):
    +    """base exception class for all parsing runtime exceptions"""
    +    # Performance tuning: we construct a *lot* of these, so keep this
    +    # constructor as small and fast as possible
    +    def __init__( self, pstr, loc=0, msg=None, elem=None ):
    +        self.loc = loc
    +        if msg is None:
    +            self.msg = pstr
    +            self.pstr = ""
    +        else:
    +            self.msg = msg
    +            self.pstr = pstr
    +        self.parserElement = elem
    +        self.args = (pstr, loc, msg)
    +
    +    @classmethod
    +    def _from_exception(cls, pe):
    +        """
    +        internal factory method to simplify creating one type of ParseException 
    +        from another - avoids having __init__ signature conflicts among subclasses
    +        """
    +        return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement)
    +
    +    def __getattr__( self, aname ):
    +        """supported attributes by name are:
    +            - lineno - returns the line number of the exception text
    +            - col - returns the column number of the exception text
    +            - line - returns the line containing the exception text
    +        """
    +        if( aname == "lineno" ):
    +            return lineno( self.loc, self.pstr )
    +        elif( aname in ("col", "column") ):
    +            return col( self.loc, self.pstr )
    +        elif( aname == "line" ):
    +            return line( self.loc, self.pstr )
    +        else:
    +            raise AttributeError(aname)
    +
    +    def __str__( self ):
    +        return "%s (at char %d), (line:%d, col:%d)" % \
    +                ( self.msg, self.loc, self.lineno, self.column )
    +    def __repr__( self ):
    +        return _ustr(self)
    +    def markInputline( self, markerString = ">!<" ):
    +        """Extracts the exception line from the input string, and marks
    +           the location of the exception with a special symbol.
    +        """
    +        line_str = self.line
    +        line_column = self.column - 1
    +        if markerString:
    +            line_str = "".join((line_str[:line_column],
    +                                markerString, line_str[line_column:]))
    +        return line_str.strip()
    +    def __dir__(self):
    +        return "lineno col line".split() + dir(type(self))
    +
    +class ParseException(ParseBaseException):
    +    """
    +    Exception thrown when parse expressions don't match class;
    +    supported attributes by name are:
    +     - lineno - returns the line number of the exception text
    +     - col - returns the column number of the exception text
    +     - line - returns the line containing the exception text
    +        
    +    Example::
    +        try:
    +            Word(nums).setName("integer").parseString("ABC")
    +        except ParseException as pe:
    +            print(pe)
    +            print("column: {}".format(pe.col))
    +            
    +    prints::
    +       Expected integer (at char 0), (line:1, col:1)
    +        column: 1
    +    """
    +    pass
    +
    +class ParseFatalException(ParseBaseException):
    +    """user-throwable exception thrown when inconsistent parse content
    +       is found; stops all parsing immediately"""
    +    pass
    +
    +class ParseSyntaxException(ParseFatalException):
    +    """just like L{ParseFatalException}, but thrown internally when an
    +       L{ErrorStop} ('-' operator) indicates that parsing is to stop 
    +       immediately because an unbacktrackable syntax error has been found"""
    +    pass
    +
    +#~ class ReparseException(ParseBaseException):
    +    #~ """Experimental class - parse actions can raise this exception to cause
    +       #~ pyparsing to reparse the input string:
    +        #~ - with a modified input string, and/or
    +        #~ - with a modified start location
    +       #~ Set the values of the ReparseException in the constructor, and raise the
    +       #~ exception in a parse action to cause pyparsing to use the new string/location.
    +       #~ Setting the values as None causes no change to be made.
    +       #~ """
    +    #~ def __init_( self, newstring, restartLoc ):
    +        #~ self.newParseText = newstring
    +        #~ self.reparseLoc = restartLoc
    +
    +class RecursiveGrammarException(Exception):
    +    """exception thrown by L{ParserElement.validate} if the grammar could be improperly recursive"""
    +    def __init__( self, parseElementList ):
    +        self.parseElementTrace = parseElementList
    +
    +    def __str__( self ):
    +        return "RecursiveGrammarException: %s" % self.parseElementTrace
    +
    +class _ParseResultsWithOffset(object):
    +    def __init__(self,p1,p2):
    +        self.tup = (p1,p2)
    +    def __getitem__(self,i):
    +        return self.tup[i]
    +    def __repr__(self):
    +        return repr(self.tup[0])
    +    def setOffset(self,i):
    +        self.tup = (self.tup[0],i)
    +
    +class ParseResults(object):
    +    """
    +    Structured parse results, to provide multiple means of access to the parsed data:
    +       - as a list (C{len(results)})
    +       - by list index (C{results[0], results[1]}, etc.)
    +       - by attribute (C{results.} - see L{ParserElement.setResultsName})
    +
    +    Example::
    +        integer = Word(nums)
    +        date_str = (integer.setResultsName("year") + '/' 
    +                        + integer.setResultsName("month") + '/' 
    +                        + integer.setResultsName("day"))
    +        # equivalent form:
    +        # date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +
    +        # parseString returns a ParseResults object
    +        result = date_str.parseString("1999/12/31")
    +
    +        def test(s, fn=repr):
    +            print("%s -> %s" % (s, fn(eval(s))))
    +        test("list(result)")
    +        test("result[0]")
    +        test("result['month']")
    +        test("result.day")
    +        test("'month' in result")
    +        test("'minutes' in result")
    +        test("result.dump()", str)
    +    prints::
    +        list(result) -> ['1999', '/', '12', '/', '31']
    +        result[0] -> '1999'
    +        result['month'] -> '12'
    +        result.day -> '31'
    +        'month' in result -> True
    +        'minutes' in result -> False
    +        result.dump() -> ['1999', '/', '12', '/', '31']
    +        - day: 31
    +        - month: 12
    +        - year: 1999
    +    """
    +    def __new__(cls, toklist=None, name=None, asList=True, modal=True ):
    +        if isinstance(toklist, cls):
    +            return toklist
    +        retobj = object.__new__(cls)
    +        retobj.__doinit = True
    +        return retobj
    +
    +    # Performance tuning: we construct a *lot* of these, so keep this
    +    # constructor as small and fast as possible
    +    def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ):
    +        if self.__doinit:
    +            self.__doinit = False
    +            self.__name = None
    +            self.__parent = None
    +            self.__accumNames = {}
    +            self.__asList = asList
    +            self.__modal = modal
    +            if toklist is None:
    +                toklist = []
    +            if isinstance(toklist, list):
    +                self.__toklist = toklist[:]
    +            elif isinstance(toklist, _generatorType):
    +                self.__toklist = list(toklist)
    +            else:
    +                self.__toklist = [toklist]
    +            self.__tokdict = dict()
    +
    +        if name is not None and name:
    +            if not modal:
    +                self.__accumNames[name] = 0
    +            if isinstance(name,int):
    +                name = _ustr(name) # will always return a str, but use _ustr for consistency
    +            self.__name = name
    +            if not (isinstance(toklist, (type(None), basestring, list)) and toklist in (None,'',[])):
    +                if isinstance(toklist,basestring):
    +                    toklist = [ toklist ]
    +                if asList:
    +                    if isinstance(toklist,ParseResults):
    +                        self[name] = _ParseResultsWithOffset(toklist.copy(),0)
    +                    else:
    +                        self[name] = _ParseResultsWithOffset(ParseResults(toklist[0]),0)
    +                    self[name].__name = name
    +                else:
    +                    try:
    +                        self[name] = toklist[0]
    +                    except (KeyError,TypeError,IndexError):
    +                        self[name] = toklist
    +
    +    def __getitem__( self, i ):
    +        if isinstance( i, (int,slice) ):
    +            return self.__toklist[i]
    +        else:
    +            if i not in self.__accumNames:
    +                return self.__tokdict[i][-1][0]
    +            else:
    +                return ParseResults([ v[0] for v in self.__tokdict[i] ])
    +
    +    def __setitem__( self, k, v, isinstance=isinstance ):
    +        if isinstance(v,_ParseResultsWithOffset):
    +            self.__tokdict[k] = self.__tokdict.get(k,list()) + [v]
    +            sub = v[0]
    +        elif isinstance(k,(int,slice)):
    +            self.__toklist[k] = v
    +            sub = v
    +        else:
    +            self.__tokdict[k] = self.__tokdict.get(k,list()) + [_ParseResultsWithOffset(v,0)]
    +            sub = v
    +        if isinstance(sub,ParseResults):
    +            sub.__parent = wkref(self)
    +
    +    def __delitem__( self, i ):
    +        if isinstance(i,(int,slice)):
    +            mylen = len( self.__toklist )
    +            del self.__toklist[i]
    +
    +            # convert int to slice
    +            if isinstance(i, int):
    +                if i < 0:
    +                    i += mylen
    +                i = slice(i, i+1)
    +            # get removed indices
    +            removed = list(range(*i.indices(mylen)))
    +            removed.reverse()
    +            # fixup indices in token dictionary
    +            for name,occurrences in self.__tokdict.items():
    +                for j in removed:
    +                    for k, (value, position) in enumerate(occurrences):
    +                        occurrences[k] = _ParseResultsWithOffset(value, position - (position > j))
    +        else:
    +            del self.__tokdict[i]
    +
    +    def __contains__( self, k ):
    +        return k in self.__tokdict
    +
    +    def __len__( self ): return len( self.__toklist )
    +    def __bool__(self): return ( not not self.__toklist )
    +    __nonzero__ = __bool__
    +    def __iter__( self ): return iter( self.__toklist )
    +    def __reversed__( self ): return iter( self.__toklist[::-1] )
    +    def _iterkeys( self ):
    +        if hasattr(self.__tokdict, "iterkeys"):
    +            return self.__tokdict.iterkeys()
    +        else:
    +            return iter(self.__tokdict)
    +
    +    def _itervalues( self ):
    +        return (self[k] for k in self._iterkeys())
    +            
    +    def _iteritems( self ):
    +        return ((k, self[k]) for k in self._iterkeys())
    +
    +    if PY_3:
    +        keys = _iterkeys       
    +        """Returns an iterator of all named result keys (Python 3.x only)."""
    +
    +        values = _itervalues
    +        """Returns an iterator of all named result values (Python 3.x only)."""
    +
    +        items = _iteritems
    +        """Returns an iterator of all named result key-value tuples (Python 3.x only)."""
    +
    +    else:
    +        iterkeys = _iterkeys
    +        """Returns an iterator of all named result keys (Python 2.x only)."""
    +
    +        itervalues = _itervalues
    +        """Returns an iterator of all named result values (Python 2.x only)."""
    +
    +        iteritems = _iteritems
    +        """Returns an iterator of all named result key-value tuples (Python 2.x only)."""
    +
    +        def keys( self ):
    +            """Returns all named result keys (as a list in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.iterkeys())
    +
    +        def values( self ):
    +            """Returns all named result values (as a list in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.itervalues())
    +                
    +        def items( self ):
    +            """Returns all named result key-values (as a list of tuples in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.iteritems())
    +
    +    def haskeys( self ):
    +        """Since keys() returns an iterator, this method is helpful in bypassing
    +           code that looks for the existence of any defined results names."""
    +        return bool(self.__tokdict)
    +        
    +    def pop( self, *args, **kwargs):
    +        """
    +        Removes and returns item at specified index (default=C{last}).
    +        Supports both C{list} and C{dict} semantics for C{pop()}. If passed no
    +        argument or an integer argument, it will use C{list} semantics
    +        and pop tokens from the list of parsed tokens. If passed a 
    +        non-integer argument (most likely a string), it will use C{dict}
    +        semantics and pop the corresponding value from any defined 
    +        results names. A second default return value argument is 
    +        supported, just as in C{dict.pop()}.
    +
    +        Example::
    +            def remove_first(tokens):
    +                tokens.pop(0)
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +            print(OneOrMore(Word(nums)).addParseAction(remove_first).parseString("0 123 321")) # -> ['123', '321']
    +
    +            label = Word(alphas)
    +            patt = label("LABEL") + OneOrMore(Word(nums))
    +            print(patt.parseString("AAB 123 321").dump())
    +
    +            # Use pop() in a parse action to remove named result (note that corresponding value is not
    +            # removed from list form of results)
    +            def remove_LABEL(tokens):
    +                tokens.pop("LABEL")
    +                return tokens
    +            patt.addParseAction(remove_LABEL)
    +            print(patt.parseString("AAB 123 321").dump())
    +        prints::
    +            ['AAB', '123', '321']
    +            - LABEL: AAB
    +
    +            ['AAB', '123', '321']
    +        """
    +        if not args:
    +            args = [-1]
    +        for k,v in kwargs.items():
    +            if k == 'default':
    +                args = (args[0], v)
    +            else:
    +                raise TypeError("pop() got an unexpected keyword argument '%s'" % k)
    +        if (isinstance(args[0], int) or 
    +                        len(args) == 1 or 
    +                        args[0] in self):
    +            index = args[0]
    +            ret = self[index]
    +            del self[index]
    +            return ret
    +        else:
    +            defaultvalue = args[1]
    +            return defaultvalue
    +
    +    def get(self, key, defaultValue=None):
    +        """
    +        Returns named result matching the given key, or if there is no
    +        such name, then returns the given C{defaultValue} or C{None} if no
    +        C{defaultValue} is specified.
    +
    +        Similar to C{dict.get()}.
    +        
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            result = date_str.parseString("1999/12/31")
    +            print(result.get("year")) # -> '1999'
    +            print(result.get("hour", "not specified")) # -> 'not specified'
    +            print(result.get("hour")) # -> None
    +        """
    +        if key in self:
    +            return self[key]
    +        else:
    +            return defaultValue
    +
    +    def insert( self, index, insStr ):
    +        """
    +        Inserts new element at location index in the list of parsed tokens.
    +        
    +        Similar to C{list.insert()}.
    +
    +        Example::
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +
    +            # use a parse action to insert the parse location in the front of the parsed results
    +            def insert_locn(locn, tokens):
    +                tokens.insert(0, locn)
    +            print(OneOrMore(Word(nums)).addParseAction(insert_locn).parseString("0 123 321")) # -> [0, '0', '123', '321']
    +        """
    +        self.__toklist.insert(index, insStr)
    +        # fixup indices in token dictionary
    +        for name,occurrences in self.__tokdict.items():
    +            for k, (value, position) in enumerate(occurrences):
    +                occurrences[k] = _ParseResultsWithOffset(value, position + (position > index))
    +
    +    def append( self, item ):
    +        """
    +        Add single element to end of ParseResults list of elements.
    +
    +        Example::
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +            
    +            # use a parse action to compute the sum of the parsed integers, and add it to the end
    +            def append_sum(tokens):
    +                tokens.append(sum(map(int, tokens)))
    +            print(OneOrMore(Word(nums)).addParseAction(append_sum).parseString("0 123 321")) # -> ['0', '123', '321', 444]
    +        """
    +        self.__toklist.append(item)
    +
    +    def extend( self, itemseq ):
    +        """
    +        Add sequence of elements to end of ParseResults list of elements.
    +
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            
    +            # use a parse action to append the reverse of the matched strings, to make a palindrome
    +            def make_palindrome(tokens):
    +                tokens.extend(reversed([t[::-1] for t in tokens]))
    +                return ''.join(tokens)
    +            print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
    +        """
    +        if isinstance(itemseq, ParseResults):
    +            self += itemseq
    +        else:
    +            self.__toklist.extend(itemseq)
    +
    +    def clear( self ):
    +        """
    +        Clear all elements and results names.
    +        """
    +        del self.__toklist[:]
    +        self.__tokdict.clear()
    +
    +    def __getattr__( self, name ):
    +        try:
    +            return self[name]
    +        except KeyError:
    +            return ""
    +            
    +        if name in self.__tokdict:
    +            if name not in self.__accumNames:
    +                return self.__tokdict[name][-1][0]
    +            else:
    +                return ParseResults([ v[0] for v in self.__tokdict[name] ])
    +        else:
    +            return ""
    +
    +    def __add__( self, other ):
    +        ret = self.copy()
    +        ret += other
    +        return ret
    +
    +    def __iadd__( self, other ):
    +        if other.__tokdict:
    +            offset = len(self.__toklist)
    +            addoffset = lambda a: offset if a<0 else a+offset
    +            otheritems = other.__tokdict.items()
    +            otherdictitems = [(k, _ParseResultsWithOffset(v[0],addoffset(v[1])) )
    +                                for (k,vlist) in otheritems for v in vlist]
    +            for k,v in otherdictitems:
    +                self[k] = v
    +                if isinstance(v[0],ParseResults):
    +                    v[0].__parent = wkref(self)
    +            
    +        self.__toklist += other.__toklist
    +        self.__accumNames.update( other.__accumNames )
    +        return self
    +
    +    def __radd__(self, other):
    +        if isinstance(other,int) and other == 0:
    +            # useful for merging many ParseResults using sum() builtin
    +            return self.copy()
    +        else:
    +            # this may raise a TypeError - so be it
    +            return other + self
    +        
    +    def __repr__( self ):
    +        return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )
    +
    +    def __str__( self ):
    +        return '[' + ', '.join(_ustr(i) if isinstance(i, ParseResults) else repr(i) for i in self.__toklist) + ']'
    +
    +    def _asStringList( self, sep='' ):
    +        out = []
    +        for item in self.__toklist:
    +            if out and sep:
    +                out.append(sep)
    +            if isinstance( item, ParseResults ):
    +                out += item._asStringList()
    +            else:
    +                out.append( _ustr(item) )
    +        return out
    +
    +    def asList( self ):
    +        """
    +        Returns the parse results as a nested list of matching tokens, all converted to strings.
    +
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            result = patt.parseString("sldkj lsdkj sldkj")
    +            # even though the result prints in string-like form, it is actually a pyparsing ParseResults
    +            print(type(result), result) # ->  ['sldkj', 'lsdkj', 'sldkj']
    +            
    +            # Use asList() to create an actual list
    +            result_list = result.asList()
    +            print(type(result_list), result_list) # ->  ['sldkj', 'lsdkj', 'sldkj']
    +        """
    +        return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist]
    +
    +    def asDict( self ):
    +        """
    +        Returns the named parse results as a nested dictionary.
    +
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +            
    +            result = date_str.parseString('12/31/1999')
    +            print(type(result), repr(result)) # ->  (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})
    +            
    +            result_dict = result.asDict()
    +            print(type(result_dict), repr(result_dict)) # ->  {'day': '1999', 'year': '12', 'month': '31'}
    +
    +            # even though a ParseResults supports dict-like access, sometime you just need to have a dict
    +            import json
    +            print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
    +            print(json.dumps(result.asDict())) # -> {"month": "31", "day": "1999", "year": "12"}
    +        """
    +        if PY_3:
    +            item_fn = self.items
    +        else:
    +            item_fn = self.iteritems
    +            
    +        def toItem(obj):
    +            if isinstance(obj, ParseResults):
    +                if obj.haskeys():
    +                    return obj.asDict()
    +                else:
    +                    return [toItem(v) for v in obj]
    +            else:
    +                return obj
    +                
    +        return dict((k,toItem(v)) for k,v in item_fn())
    +
    +    def copy( self ):
    +        """
    +        Returns a new copy of a C{ParseResults} object.
    +        """
    +        ret = ParseResults( self.__toklist )
    +        ret.__tokdict = self.__tokdict.copy()
    +        ret.__parent = self.__parent
    +        ret.__accumNames.update( self.__accumNames )
    +        ret.__name = self.__name
    +        return ret
    +
    +    def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ):
    +        """
    +        (Deprecated) Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.
    +        """
    +        nl = "\n"
    +        out = []
    +        namedItems = dict((v[1],k) for (k,vlist) in self.__tokdict.items()
    +                                                            for v in vlist)
    +        nextLevelIndent = indent + "  "
    +
    +        # collapse out indents if formatting is not desired
    +        if not formatted:
    +            indent = ""
    +            nextLevelIndent = ""
    +            nl = ""
    +
    +        selfTag = None
    +        if doctag is not None:
    +            selfTag = doctag
    +        else:
    +            if self.__name:
    +                selfTag = self.__name
    +
    +        if not selfTag:
    +            if namedItemsOnly:
    +                return ""
    +            else:
    +                selfTag = "ITEM"
    +
    +        out += [ nl, indent, "<", selfTag, ">" ]
    +
    +        for i,res in enumerate(self.__toklist):
    +            if isinstance(res,ParseResults):
    +                if i in namedItems:
    +                    out += [ res.asXML(namedItems[i],
    +                                        namedItemsOnly and doctag is None,
    +                                        nextLevelIndent,
    +                                        formatted)]
    +                else:
    +                    out += [ res.asXML(None,
    +                                        namedItemsOnly and doctag is None,
    +                                        nextLevelIndent,
    +                                        formatted)]
    +            else:
    +                # individual token, see if there is a name for it
    +                resTag = None
    +                if i in namedItems:
    +                    resTag = namedItems[i]
    +                if not resTag:
    +                    if namedItemsOnly:
    +                        continue
    +                    else:
    +                        resTag = "ITEM"
    +                xmlBodyText = _xml_escape(_ustr(res))
    +                out += [ nl, nextLevelIndent, "<", resTag, ">",
    +                                                xmlBodyText,
    +                                                "" ]
    +
    +        out += [ nl, indent, "" ]
    +        return "".join(out)
    +
    +    def __lookup(self,sub):
    +        for k,vlist in self.__tokdict.items():
    +            for v,loc in vlist:
    +                if sub is v:
    +                    return k
    +        return None
    +
    +    def getName(self):
    +        """
    +        Returns the results name for this token expression. Useful when several 
    +        different expressions might match at a particular location.
    +
    +        Example::
    +            integer = Word(nums)
    +            ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
    +            house_number_expr = Suppress('#') + Word(nums, alphanums)
    +            user_data = (Group(house_number_expr)("house_number") 
    +                        | Group(ssn_expr)("ssn")
    +                        | Group(integer)("age"))
    +            user_info = OneOrMore(user_data)
    +            
    +            result = user_info.parseString("22 111-22-3333 #221B")
    +            for item in result:
    +                print(item.getName(), ':', item[0])
    +        prints::
    +            age : 22
    +            ssn : 111-22-3333
    +            house_number : 221B
    +        """
    +        if self.__name:
    +            return self.__name
    +        elif self.__parent:
    +            par = self.__parent()
    +            if par:
    +                return par.__lookup(self)
    +            else:
    +                return None
    +        elif (len(self) == 1 and
    +               len(self.__tokdict) == 1 and
    +               next(iter(self.__tokdict.values()))[0][1] in (0,-1)):
    +            return next(iter(self.__tokdict.keys()))
    +        else:
    +            return None
    +
    +    def dump(self, indent='', depth=0, full=True):
    +        """
    +        Diagnostic method for listing out the contents of a C{ParseResults}.
    +        Accepts an optional C{indent} argument so that this string can be embedded
    +        in a nested display of other data.
    +
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +            
    +            result = date_str.parseString('12/31/1999')
    +            print(result.dump())
    +        prints::
    +            ['12', '/', '31', '/', '1999']
    +            - day: 1999
    +            - month: 31
    +            - year: 12
    +        """
    +        out = []
    +        NL = '\n'
    +        out.append( indent+_ustr(self.asList()) )
    +        if full:
    +            if self.haskeys():
    +                items = sorted((str(k), v) for k,v in self.items())
    +                for k,v in items:
    +                    if out:
    +                        out.append(NL)
    +                    out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
    +                    if isinstance(v,ParseResults):
    +                        if v:
    +                            out.append( v.dump(indent,depth+1) )
    +                        else:
    +                            out.append(_ustr(v))
    +                    else:
    +                        out.append(repr(v))
    +            elif any(isinstance(vv,ParseResults) for vv in self):
    +                v = self
    +                for i,vv in enumerate(v):
    +                    if isinstance(vv,ParseResults):
    +                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),vv.dump(indent,depth+1) ))
    +                    else:
    +                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),_ustr(vv)))
    +            
    +        return "".join(out)
    +
    +    def pprint(self, *args, **kwargs):
    +        """
    +        Pretty-printer for parsed results as a list, using the C{pprint} module.
    +        Accepts additional positional or keyword args as defined for the 
    +        C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})
    +
    +        Example::
    +            ident = Word(alphas, alphanums)
    +            num = Word(nums)
    +            func = Forward()
    +            term = ident | num | Group('(' + func + ')')
    +            func <<= ident + Group(Optional(delimitedList(term)))
    +            result = func.parseString("fna a,b,(fnb c,d,200),100")
    +            result.pprint(width=40)
    +        prints::
    +            ['fna',
    +             ['a',
    +              'b',
    +              ['(', 'fnb', ['c', 'd', '200'], ')'],
    +              '100']]
    +        """
    +        pprint.pprint(self.asList(), *args, **kwargs)
    +
    +    # add support for pickle protocol
    +    def __getstate__(self):
    +        return ( self.__toklist,
    +                 ( self.__tokdict.copy(),
    +                   self.__parent is not None and self.__parent() or None,
    +                   self.__accumNames,
    +                   self.__name ) )
    +
    +    def __setstate__(self,state):
    +        self.__toklist = state[0]
    +        (self.__tokdict,
    +         par,
    +         inAccumNames,
    +         self.__name) = state[1]
    +        self.__accumNames = {}
    +        self.__accumNames.update(inAccumNames)
    +        if par is not None:
    +            self.__parent = wkref(par)
    +        else:
    +            self.__parent = None
    +
    +    def __getnewargs__(self):
    +        return self.__toklist, self.__name, self.__asList, self.__modal
    +
    +    def __dir__(self):
    +        return (dir(type(self)) + list(self.keys()))
    +
    +collections.MutableMapping.register(ParseResults)
    +
    +def col (loc,strg):
    +    """Returns current column within a string, counting newlines as line separators.
    +   The first column is number 1.
    +
    +   Note: the default parsing behavior is to expand tabs in the input string
    +   before starting the parsing process.  See L{I{ParserElement.parseString}} for more information
    +   on parsing strings containing C{}s, and suggested methods to maintain a
    +   consistent view of the parsed string, the parse location, and line and column
    +   positions within the parsed string.
    +   """
    +    s = strg
    +    return 1 if 0} for more information
    +   on parsing strings containing C{}s, and suggested methods to maintain a
    +   consistent view of the parsed string, the parse location, and line and column
    +   positions within the parsed string.
    +   """
    +    return strg.count("\n",0,loc) + 1
    +
    +def line( loc, strg ):
    +    """Returns the line of text containing loc within a string, counting newlines as line separators.
    +       """
    +    lastCR = strg.rfind("\n", 0, loc)
    +    nextCR = strg.find("\n", loc)
    +    if nextCR >= 0:
    +        return strg[lastCR+1:nextCR]
    +    else:
    +        return strg[lastCR+1:]
    +
    +def _defaultStartDebugAction( instring, loc, expr ):
    +    print (("Match " + _ustr(expr) + " at loc " + _ustr(loc) + "(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )))
    +
    +def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ):
    +    print ("Matched " + _ustr(expr) + " -> " + str(toks.asList()))
    +
    +def _defaultExceptionDebugAction( instring, loc, expr, exc ):
    +    print ("Exception raised:" + _ustr(exc))
    +
    +def nullDebugAction(*args):
    +    """'Do-nothing' debug action, to suppress debugging output during parsing."""
    +    pass
    +
    +# Only works on Python 3.x - nonlocal is toxic to Python 2 installs
    +#~ 'decorator to trim function calls to match the arity of the target'
    +#~ def _trim_arity(func, maxargs=3):
    +    #~ if func in singleArgBuiltins:
    +        #~ return lambda s,l,t: func(t)
    +    #~ limit = 0
    +    #~ foundArity = False
    +    #~ def wrapper(*args):
    +        #~ nonlocal limit,foundArity
    +        #~ while 1:
    +            #~ try:
    +                #~ ret = func(*args[limit:])
    +                #~ foundArity = True
    +                #~ return ret
    +            #~ except TypeError:
    +                #~ if limit == maxargs or foundArity:
    +                    #~ raise
    +                #~ limit += 1
    +                #~ continue
    +    #~ return wrapper
    +
    +# this version is Python 2.x-3.x cross-compatible
    +'decorator to trim function calls to match the arity of the target'
    +def _trim_arity(func, maxargs=2):
    +    if func in singleArgBuiltins:
    +        return lambda s,l,t: func(t)
    +    limit = [0]
    +    foundArity = [False]
    +    
    +    # traceback return data structure changed in Py3.5 - normalize back to plain tuples
    +    if system_version[:2] >= (3,5):
    +        def extract_stack(limit=0):
    +            # special handling for Python 3.5.0 - extra deep call stack by 1
    +            offset = -3 if system_version == (3,5,0) else -2
    +            frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset]
    +            return [(frame_summary.filename, frame_summary.lineno)]
    +        def extract_tb(tb, limit=0):
    +            frames = traceback.extract_tb(tb, limit=limit)
    +            frame_summary = frames[-1]
    +            return [(frame_summary.filename, frame_summary.lineno)]
    +    else:
    +        extract_stack = traceback.extract_stack
    +        extract_tb = traceback.extract_tb
    +    
    +    # synthesize what would be returned by traceback.extract_stack at the call to 
    +    # user's parse action 'func', so that we don't incur call penalty at parse time
    +    
    +    LINE_DIFF = 6
    +    # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND 
    +    # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!!
    +    this_line = extract_stack(limit=2)[-1]
    +    pa_call_line_synth = (this_line[0], this_line[1]+LINE_DIFF)
    +
    +    def wrapper(*args):
    +        while 1:
    +            try:
    +                ret = func(*args[limit[0]:])
    +                foundArity[0] = True
    +                return ret
    +            except TypeError:
    +                # re-raise TypeErrors if they did not come from our arity testing
    +                if foundArity[0]:
    +                    raise
    +                else:
    +                    try:
    +                        tb = sys.exc_info()[-1]
    +                        if not extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth:
    +                            raise
    +                    finally:
    +                        del tb
    +
    +                if limit[0] <= maxargs:
    +                    limit[0] += 1
    +                    continue
    +                raise
    +
    +    # copy func name to wrapper for sensible debug output
    +    func_name = ""
    +    try:
    +        func_name = getattr(func, '__name__', 
    +                            getattr(func, '__class__').__name__)
    +    except Exception:
    +        func_name = str(func)
    +    wrapper.__name__ = func_name
    +
    +    return wrapper
    +
    +class ParserElement(object):
    +    """Abstract base level parser element class."""
    +    DEFAULT_WHITE_CHARS = " \n\t\r"
    +    verbose_stacktrace = False
    +
    +    @staticmethod
    +    def setDefaultWhitespaceChars( chars ):
    +        r"""
    +        Overrides the default whitespace chars
    +
    +        Example::
    +            # default whitespace chars are space,  and newline
    +            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']
    +            
    +            # change to just treat newline as significant
    +            ParserElement.setDefaultWhitespaceChars(" \t")
    +            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def']
    +        """
    +        ParserElement.DEFAULT_WHITE_CHARS = chars
    +
    +    @staticmethod
    +    def inlineLiteralsUsing(cls):
    +        """
    +        Set class to be used for inclusion of string literals into a parser.
    +        
    +        Example::
    +            # default literal class used is Literal
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    +
    +
    +            # change to Suppress
    +            ParserElement.inlineLiteralsUsing(Suppress)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '12', '31']
    +        """
    +        ParserElement._literalStringClass = cls
    +
    +    def __init__( self, savelist=False ):
    +        self.parseAction = list()
    +        self.failAction = None
    +        #~ self.name = ""  # don't define self.name, let subclasses try/except upcall
    +        self.strRepr = None
    +        self.resultsName = None
    +        self.saveAsList = savelist
    +        self.skipWhitespace = True
    +        self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    +        self.copyDefaultWhiteChars = True
    +        self.mayReturnEmpty = False # used when checking for left-recursion
    +        self.keepTabs = False
    +        self.ignoreExprs = list()
    +        self.debug = False
    +        self.streamlined = False
    +        self.mayIndexError = True # used to optimize exception handling for subclasses that don't advance parse index
    +        self.errmsg = ""
    +        self.modalResults = True # used to mark results names as modal (report only last) or cumulative (list all)
    +        self.debugActions = ( None, None, None ) #custom debug actions
    +        self.re = None
    +        self.callPreparse = True # used to avoid redundant calls to preParse
    +        self.callDuringTry = False
    +
    +    def copy( self ):
    +        """
    +        Make a copy of this C{ParserElement}.  Useful for defining different parse actions
    +        for the same parsing pattern, using copies of the original parse element.
    +        
    +        Example::
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            integerK = integer.copy().addParseAction(lambda toks: toks[0]*1024) + Suppress("K")
    +            integerM = integer.copy().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    +            
    +            print(OneOrMore(integerK | integerM | integer).parseString("5K 100 640K 256M"))
    +        prints::
    +            [5120, 100, 655360, 268435456]
    +        Equivalent form of C{expr.copy()} is just C{expr()}::
    +            integerM = integer().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    +        """
    +        cpy = copy.copy( self )
    +        cpy.parseAction = self.parseAction[:]
    +        cpy.ignoreExprs = self.ignoreExprs[:]
    +        if self.copyDefaultWhiteChars:
    +            cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    +        return cpy
    +
    +    def setName( self, name ):
    +        """
    +        Define name for this expression, makes debugging and exception messages clearer.
    +        
    +        Example::
    +            Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
    +            Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
    +        """
    +        self.name = name
    +        self.errmsg = "Expected " + self.name
    +        if hasattr(self,"exception"):
    +            self.exception.msg = self.errmsg
    +        return self
    +
    +    def setResultsName( self, name, listAllMatches=False ):
    +        """
    +        Define name for referencing matching tokens as a nested attribute
    +        of the returned parse results.
    +        NOTE: this returns a *copy* of the original C{ParserElement} object;
    +        this is so that the client can define a basic element, such as an
    +        integer, and reference it in multiple places with different names.
    +
    +        You can also set results names using the abbreviated syntax,
    +        C{expr("name")} in place of C{expr.setResultsName("name")} - 
    +        see L{I{__call__}<__call__>}.
    +
    +        Example::
    +            date_str = (integer.setResultsName("year") + '/' 
    +                        + integer.setResultsName("month") + '/' 
    +                        + integer.setResultsName("day"))
    +
    +            # equivalent form:
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +        """
    +        newself = self.copy()
    +        if name.endswith("*"):
    +            name = name[:-1]
    +            listAllMatches=True
    +        newself.resultsName = name
    +        newself.modalResults = not listAllMatches
    +        return newself
    +
    +    def setBreak(self,breakFlag = True):
    +        """Method to invoke the Python pdb debugger when this element is
    +           about to be parsed. Set C{breakFlag} to True to enable, False to
    +           disable.
    +        """
    +        if breakFlag:
    +            _parseMethod = self._parse
    +            def breaker(instring, loc, doActions=True, callPreParse=True):
    +                import pdb
    +                pdb.set_trace()
    +                return _parseMethod( instring, loc, doActions, callPreParse )
    +            breaker._originalParseMethod = _parseMethod
    +            self._parse = breaker
    +        else:
    +            if hasattr(self._parse,"_originalParseMethod"):
    +                self._parse = self._parse._originalParseMethod
    +        return self
    +
    +    def setParseAction( self, *fns, **kwargs ):
    +        """
    +        Define action 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)
    +         - loc = the location of the matching substring
    +         - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object
    +        If the functions in fns modify the tokens, they can return them as the return
    +        value from fn, and the modified list of tokens will replace the original.
    +        Otherwise, fn does not need to return any value.
    +
    +        Optional keyword arguments:
    +         - callDuringTry = (default=C{False}) indicate if parse action should be run during lookaheads and alternate testing
    +
    +        Note: the default parsing behavior is to expand tabs in the input string
    +        before starting the parsing process.  See L{I{parseString}} for more information
    +        on parsing strings containing C{}s, and suggested methods to maintain a
    +        consistent view of the parsed string, the parse location, and line and column
    +        positions within the parsed string.
    +        
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer + '/' + integer + '/' + integer
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    +
    +            # use parse action to convert to ints at parse time
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            date_str = integer + '/' + integer + '/' + integer
    +
    +            # note that integer fields are now ints, not strings
    +            date_str.parseString("1999/12/31")  # -> [1999, '/', 12, '/', 31]
    +        """
    +        self.parseAction = list(map(_trim_arity, list(fns)))
    +        self.callDuringTry = kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def addParseAction( self, *fns, **kwargs ):
    +        """
    +        Add parse action to expression's list of parse actions. See L{I{setParseAction}}.
    +        
    +        See examples in L{I{copy}}.
    +        """
    +        self.parseAction += list(map(_trim_arity, list(fns)))
    +        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def addCondition(self, *fns, **kwargs):
    +        """Add a boolean predicate function to expression's list of parse actions. See 
    +        L{I{setParseAction}} for function call signatures. Unlike C{setParseAction}, 
    +        functions passed to C{addCondition} need to return boolean success/fail of the condition.
    +
    +        Optional keyword arguments:
    +         - message = define a custom message to be used in the raised exception
    +         - fatal   = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException
    +         
    +        Example::
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            year_int = integer.copy()
    +            year_int.addCondition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
    +            date_str = year_int + '/' + integer + '/' + integer
    +
    +            result = date_str.parseString("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1)
    +        """
    +        msg = kwargs.get("message", "failed user-defined condition")
    +        exc_type = ParseFatalException if kwargs.get("fatal", False) else ParseException
    +        for fn in fns:
    +            def pa(s,l,t):
    +                if not bool(_trim_arity(fn)(s,l,t)):
    +                    raise exc_type(s,l,msg)
    +            self.parseAction.append(pa)
    +        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def setFailAction( self, fn ):
    +        """Define action to perform if parsing fails at this expression.
    +           Fail acton fn is a callable function that takes the arguments
    +           C{fn(s,loc,expr,err)} where:
    +            - s = string being parsed
    +            - loc = location where expression match was attempted and failed
    +            - expr = the parse expression that failed
    +            - err = the exception thrown
    +           The function returns no value.  It may throw C{L{ParseFatalException}}
    +           if it is desired to stop parsing immediately."""
    +        self.failAction = fn
    +        return self
    +
    +    def _skipIgnorables( self, instring, loc ):
    +        exprsFound = True
    +        while exprsFound:
    +            exprsFound = False
    +            for e in self.ignoreExprs:
    +                try:
    +                    while 1:
    +                        loc,dummy = e._parse( instring, loc )
    +                        exprsFound = True
    +                except ParseException:
    +                    pass
    +        return loc
    +
    +    def preParse( self, instring, loc ):
    +        if self.ignoreExprs:
    +            loc = self._skipIgnorables( instring, loc )
    +
    +        if self.skipWhitespace:
    +            wt = self.whiteChars
    +            instrlen = len(instring)
    +            while loc < instrlen and instring[loc] in wt:
    +                loc += 1
    +
    +        return loc
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        return loc, []
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        return tokenlist
    +
    +    #~ @profile
    +    def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ):
    +        debugging = ( self.debug ) #and doActions )
    +
    +        if debugging or self.failAction:
    +            #~ print ("Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) ))
    +            if (self.debugActions[0] ):
    +                self.debugActions[0]( instring, loc, self )
    +            if callPreParse and self.callPreparse:
    +                preloc = self.preParse( instring, loc )
    +            else:
    +                preloc = loc
    +            tokensStart = preloc
    +            try:
    +                try:
    +                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    +                except IndexError:
    +                    raise ParseException( instring, len(instring), self.errmsg, self )
    +            except ParseBaseException as err:
    +                #~ print ("Exception raised:", err)
    +                if self.debugActions[2]:
    +                    self.debugActions[2]( instring, tokensStart, self, err )
    +                if self.failAction:
    +                    self.failAction( instring, tokensStart, self, err )
    +                raise
    +        else:
    +            if callPreParse and self.callPreparse:
    +                preloc = self.preParse( instring, loc )
    +            else:
    +                preloc = loc
    +            tokensStart = preloc
    +            if self.mayIndexError or loc >= len(instring):
    +                try:
    +                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    +                except IndexError:
    +                    raise ParseException( instring, len(instring), self.errmsg, self )
    +            else:
    +                loc,tokens = self.parseImpl( instring, preloc, doActions )
    +
    +        tokens = self.postParse( instring, loc, tokens )
    +
    +        retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults )
    +        if self.parseAction and (doActions or self.callDuringTry):
    +            if debugging:
    +                try:
    +                    for fn in self.parseAction:
    +                        tokens = fn( instring, tokensStart, retTokens )
    +                        if tokens is not None:
    +                            retTokens = ParseResults( tokens,
    +                                                      self.resultsName,
    +                                                      asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    +                                                      modal=self.modalResults )
    +                except ParseBaseException as err:
    +                    #~ print "Exception raised in user parse action:", err
    +                    if (self.debugActions[2] ):
    +                        self.debugActions[2]( instring, tokensStart, self, err )
    +                    raise
    +            else:
    +                for fn in self.parseAction:
    +                    tokens = fn( instring, tokensStart, retTokens )
    +                    if tokens is not None:
    +                        retTokens = ParseResults( tokens,
    +                                                  self.resultsName,
    +                                                  asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    +                                                  modal=self.modalResults )
    +
    +        if debugging:
    +            #~ print ("Matched",self,"->",retTokens.asList())
    +            if (self.debugActions[1] ):
    +                self.debugActions[1]( instring, tokensStart, loc, self, retTokens )
    +
    +        return loc, retTokens
    +
    +    def tryParse( self, instring, loc ):
    +        try:
    +            return self._parse( instring, loc, doActions=False )[0]
    +        except ParseFatalException:
    +            raise ParseException( instring, loc, self.errmsg, self)
    +    
    +    def canParseNext(self, instring, loc):
    +        try:
    +            self.tryParse(instring, loc)
    +        except (ParseException, IndexError):
    +            return False
    +        else:
    +            return True
    +
    +    class _UnboundedCache(object):
    +        def __init__(self):
    +            cache = {}
    +            self.not_in_cache = not_in_cache = object()
    +
    +            def get(self, key):
    +                return cache.get(key, not_in_cache)
    +
    +            def set(self, key, value):
    +                cache[key] = value
    +
    +            def clear(self):
    +                cache.clear()
    +
    +            self.get = types.MethodType(get, self)
    +            self.set = types.MethodType(set, self)
    +            self.clear = types.MethodType(clear, self)
    +
    +    if _OrderedDict is not None:
    +        class _FifoCache(object):
    +            def __init__(self, size):
    +                self.not_in_cache = not_in_cache = object()
    +
    +                cache = _OrderedDict()
    +
    +                def get(self, key):
    +                    return cache.get(key, not_in_cache)
    +
    +                def set(self, key, value):
    +                    cache[key] = value
    +                    if len(cache) > size:
    +                        cache.popitem(False)
    +
    +                def clear(self):
    +                    cache.clear()
    +
    +                self.get = types.MethodType(get, self)
    +                self.set = types.MethodType(set, self)
    +                self.clear = types.MethodType(clear, self)
    +
    +    else:
    +        class _FifoCache(object):
    +            def __init__(self, size):
    +                self.not_in_cache = not_in_cache = object()
    +
    +                cache = {}
    +                key_fifo = collections.deque([], size)
    +
    +                def get(self, key):
    +                    return cache.get(key, not_in_cache)
    +
    +                def set(self, key, value):
    +                    cache[key] = value
    +                    if len(cache) > size:
    +                        cache.pop(key_fifo.popleft(), None)
    +                    key_fifo.append(key)
    +
    +                def clear(self):
    +                    cache.clear()
    +                    key_fifo.clear()
    +
    +                self.get = types.MethodType(get, self)
    +                self.set = types.MethodType(set, self)
    +                self.clear = types.MethodType(clear, 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
    +    packrat_cache_lock = RLock()
    +    packrat_cache_stats = [0, 0]
    +
    +    # this method gets repeatedly called during backtracking with the same arguments -
    +    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
    +    def _parseCache( self, instring, loc, doActions=True, callPreParse=True ):
    +        HIT, MISS = 0, 1
    +        lookup = (self, instring, loc, callPreParse, doActions)
    +        with ParserElement.packrat_cache_lock:
    +            cache = ParserElement.packrat_cache
    +            value = cache.get(lookup)
    +            if value is cache.not_in_cache:
    +                ParserElement.packrat_cache_stats[MISS] += 1
    +                try:
    +                    value = self._parseNoCache(instring, loc, doActions, callPreParse)
    +                except ParseBaseException as pe:
    +                    # cache a copy of the exception, without the traceback
    +                    cache.set(lookup, pe.__class__(*pe.args))
    +                    raise
    +                else:
    +                    cache.set(lookup, (value[0], value[1].copy()))
    +                    return value
    +            else:
    +                ParserElement.packrat_cache_stats[HIT] += 1
    +                if isinstance(value, Exception):
    +                    raise value
    +                return (value[0], value[1].copy())
    +
    +    _parse = _parseNoCache
    +
    +    @staticmethod
    +    def resetCache():
    +        ParserElement.packrat_cache.clear()
    +        ParserElement.packrat_cache_stats[:] = [0] * len(ParserElement.packrat_cache_stats)
    +
    +    _packratEnabled = False
    +    @staticmethod
    +    def enablePackrat(cache_size_limit=128):
    +        """Enables "packrat" parsing, which adds memoizing to the parsing logic.
    +           Repeated parse attempts at the same string location (which happens
    +           often in many complex grammars) can immediately return a cached value,
    +           instead of re-executing parsing/validating code.  Memoizing is done of
    +           both valid results and parsing exceptions.
    +           
    +           Parameters:
    +            - cache_size_limit - (default=C{128}) - if an integer value is provided
    +              will limit the size of the packrat cache; if None is passed, then
    +              the cache size will be unbounded; if 0 is passed, the cache will
    +              be effectively disabled.
    +            
    +           This speedup may break existing programs that use parse actions that
    +           have side-effects.  For this reason, packrat parsing is disabled when
    +           you first import pyparsing.  To activate the packrat feature, your
    +           program must call the class method C{ParserElement.enablePackrat()}.  If
    +           your program uses C{psyco} to "compile as you go", you must call
    +           C{enablePackrat} before calling C{psyco.full()}.  If you do not do this,
    +           Python will crash.  For best results, call C{enablePackrat()} immediately
    +           after importing pyparsing.
    +           
    +           Example::
    +               import pyparsing
    +               pyparsing.ParserElement.enablePackrat()
    +        """
    +        if not ParserElement._packratEnabled:
    +            ParserElement._packratEnabled = True
    +            if cache_size_limit is None:
    +                ParserElement.packrat_cache = ParserElement._UnboundedCache()
    +            else:
    +                ParserElement.packrat_cache = ParserElement._FifoCache(cache_size_limit)
    +            ParserElement._parse = ParserElement._parseCache
    +
    +    def parseString( self, instring, parseAll=False ):
    +        """
    +        Execute the parse expression with the given string.
    +        This is the main interface to the client code, once the complete
    +        expression has been built.
    +
    +        If you want the grammar to require that the entire input string be
    +        successfully parsed, then set C{parseAll} to True (equivalent to ending
    +        the grammar with C{L{StringEnd()}}).
    +
    +        Note: C{parseString} implicitly calls C{expandtabs()} on the input string,
    +        in order to report proper column numbers in parse actions.
    +        If the input string contains tabs and
    +        the grammar uses parse actions that use the C{loc} argument to index into the
    +        string being parsed, you can ensure you have a consistent view of the input
    +        string by:
    +         - calling C{parseWithTabs} on your grammar before calling C{parseString}
    +           (see L{I{parseWithTabs}})
    +         - define your parse action using the full C{(s,loc,toks)} signature, and
    +           reference the input string using the parse action's C{s} argument
    +         - explictly expand the tabs in your input string before calling
    +           C{parseString}
    +        
    +        Example::
    +            Word('a').parseString('aaaaabaaa')  # -> ['aaaaa']
    +            Word('a').parseString('aaaaabaaa', parseAll=True)  # -> Exception: Expected end of text
    +        """
    +        ParserElement.resetCache()
    +        if not self.streamlined:
    +            self.streamline()
    +            #~ self.saveAsList = True
    +        for e in self.ignoreExprs:
    +            e.streamline()
    +        if not self.keepTabs:
    +            instring = instring.expandtabs()
    +        try:
    +            loc, tokens = self._parse( instring, 0 )
    +            if parseAll:
    +                loc = self.preParse( instring, loc )
    +                se = Empty() + StringEnd()
    +                se._parse( instring, loc )
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +        else:
    +            return tokens
    +
    +    def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ):
    +        """
    +        Scan the input string for expression matches.  Each match will return the
    +        matching tokens, start location, and end location.  May be called with optional
    +        C{maxMatches} argument, to clip scanning after 'n' matches are found.  If
    +        C{overlap} is specified, then overlapping matches will be reported.
    +
    +        Note that the start and end locations are reported relative to the string
    +        being parsed.  See L{I{parseString}} for more information on parsing
    +        strings with embedded tabs.
    +
    +        Example::
    +            source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
    +            print(source)
    +            for tokens,start,end in Word(alphas).scanString(source):
    +                print(' '*start + '^'*(end-start))
    +                print(' '*start + tokens[0])
    +        
    +        prints::
    +        
    +            sldjf123lsdjjkf345sldkjf879lkjsfd987
    +            ^^^^^
    +            sldjf
    +                    ^^^^^^^
    +                    lsdjjkf
    +                              ^^^^^^
    +                              sldkjf
    +                                       ^^^^^^
    +                                       lkjsfd
    +        """
    +        if not self.streamlined:
    +            self.streamline()
    +        for e in self.ignoreExprs:
    +            e.streamline()
    +
    +        if not self.keepTabs:
    +            instring = _ustr(instring).expandtabs()
    +        instrlen = len(instring)
    +        loc = 0
    +        preparseFn = self.preParse
    +        parseFn = self._parse
    +        ParserElement.resetCache()
    +        matches = 0
    +        try:
    +            while loc <= instrlen and matches < maxMatches:
    +                try:
    +                    preloc = preparseFn( instring, loc )
    +                    nextLoc,tokens = parseFn( instring, preloc, callPreParse=False )
    +                except ParseException:
    +                    loc = preloc+1
    +                else:
    +                    if nextLoc > loc:
    +                        matches += 1
    +                        yield tokens, preloc, nextLoc
    +                        if overlap:
    +                            nextloc = preparseFn( instring, loc )
    +                            if nextloc > loc:
    +                                loc = nextLoc
    +                            else:
    +                                loc += 1
    +                        else:
    +                            loc = nextLoc
    +                    else:
    +                        loc = preloc+1
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def transformString( self, instring ):
    +        """
    +        Extension to C{L{scanString}}, to modify matching text with modified tokens that may
    +        be returned from a parse action.  To use C{transformString}, define a grammar and
    +        attach a parse action to it that modifies the returned token list.
    +        Invoking C{transformString()} on a target string will then scan for matches,
    +        and replace the matched text patterns according to the logic in the parse
    +        action.  C{transformString()} returns the resulting transformed string.
    +        
    +        Example::
    +            wd = Word(alphas)
    +            wd.setParseAction(lambda toks: toks[0].title())
    +            
    +            print(wd.transformString("now is the winter of our discontent made glorious summer by this sun of york."))
    +        Prints::
    +            Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.
    +        """
    +        out = []
    +        lastE = 0
    +        # force preservation of s, to minimize unwanted transformation of string, and to
    +        # keep string locs straight between transformString and scanString
    +        self.keepTabs = True
    +        try:
    +            for t,s,e in self.scanString( instring ):
    +                out.append( instring[lastE:s] )
    +                if t:
    +                    if isinstance(t,ParseResults):
    +                        out += t.asList()
    +                    elif isinstance(t,list):
    +                        out += t
    +                    else:
    +                        out.append(t)
    +                lastE = e
    +            out.append(instring[lastE:])
    +            out = [o for o in out if o]
    +            return "".join(map(_ustr,_flatten(out)))
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def searchString( self, instring, maxMatches=_MAX_INT ):
    +        """
    +        Another extension to C{L{scanString}}, simplifying the access to the tokens found
    +        to match the given parse expression.  May be called with optional
    +        C{maxMatches} argument, to clip searching after 'n' matches are found.
    +        
    +        Example::
    +            # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
    +            cap_word = Word(alphas.upper(), alphas.lower())
    +            
    +            print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity"))
    +        prints::
    +            ['More', 'Iron', 'Lead', 'Gold', 'I']
    +        """
    +        try:
    +            return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False):
    +        """
    +        Generator method to split a string using the given expression as a separator.
    +        May be called with optional C{maxsplit} argument, to limit the number of splits;
    +        and the optional C{includeSeparators} argument (default=C{False}), if the separating
    +        matching text should be included in the split results.
    +        
    +        Example::        
    +            punc = oneOf(list(".,;:/-!?"))
    +            print(list(punc.split("This, this?, this sentence, is badly punctuated!")))
    +        prints::
    +            ['This', ' this', '', ' this sentence', ' is badly punctuated', '']
    +        """
    +        splits = 0
    +        last = 0
    +        for t,s,e in self.scanString(instring, maxMatches=maxsplit):
    +            yield instring[last:s]
    +            if includeSeparators:
    +                yield t[0]
    +            last = e
    +        yield instring[last:]
    +
    +    def __add__(self, other ):
    +        """
    +        Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
    +        converts them to L{Literal}s by default.
    +        
    +        Example::
    +            greet = Word(alphas) + "," + Word(alphas) + "!"
    +            hello = "Hello, World!"
    +            print (hello, "->", greet.parseString(hello))
    +        Prints::
    +            Hello, World! -> ['Hello', ',', 'World', '!']
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return And( [ self, other ] )
    +
    +    def __radd__(self, other ):
    +        """
    +        Implementation of + operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other + self
    +
    +    def __sub__(self, other):
    +        """
    +        Implementation of - operator, returns C{L{And}} with error stop
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return And( [ self, And._ErrorStop(), other ] )
    +
    +    def __rsub__(self, other ):
    +        """
    +        Implementation of - operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other - self
    +
    +    def __mul__(self,other):
    +        """
    +        Implementation of * operator, allows use of C{expr * 3} in place of
    +        C{expr + expr + expr}.  Expressions may also me multiplied by a 2-integer
    +        tuple, similar to C{{min,max}} multipliers in regular expressions.  Tuples
    +        may also include C{None} as in:
    +         - C{expr*(n,None)} or C{expr*(n,)} is equivalent
    +              to C{expr*n + L{ZeroOrMore}(expr)}
    +              (read as "at least n instances of C{expr}")
    +         - C{expr*(None,n)} is equivalent to C{expr*(0,n)}
    +              (read as "0 to n instances of C{expr}")
    +         - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)}
    +         - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)}
    +
    +        Note that C{expr*(None,n)} does not raise an exception if
    +        more than n exprs exist in the input stream; that is,
    +        C{expr*(None,n)} does not enforce a maximum number of expr
    +        occurrences.  If this behavior is desired, then write
    +        C{expr*(None,n) + ~expr}
    +        """
    +        if isinstance(other,int):
    +            minElements, optElements = other,0
    +        elif isinstance(other,tuple):
    +            other = (other + (None, None))[:2]
    +            if other[0] is None:
    +                other = (0, other[1])
    +            if isinstance(other[0],int) and other[1] is None:
    +                if other[0] == 0:
    +                    return ZeroOrMore(self)
    +                if other[0] == 1:
    +                    return OneOrMore(self)
    +                else:
    +                    return self*other[0] + ZeroOrMore(self)
    +            elif isinstance(other[0],int) and isinstance(other[1],int):
    +                minElements, optElements = other
    +                optElements -= minElements
    +            else:
    +                raise TypeError("cannot multiply 'ParserElement' and ('%s','%s') objects", type(other[0]),type(other[1]))
    +        else:
    +            raise TypeError("cannot multiply 'ParserElement' and '%s' objects", type(other))
    +
    +        if minElements < 0:
    +            raise ValueError("cannot multiply ParserElement by negative value")
    +        if optElements < 0:
    +            raise ValueError("second tuple value must be greater or equal to first tuple value")
    +        if minElements == optElements == 0:
    +            raise ValueError("cannot multiply ParserElement by 0 or (0,0)")
    +
    +        if (optElements):
    +            def makeOptionalList(n):
    +                if n>1:
    +                    return Optional(self + makeOptionalList(n-1))
    +                else:
    +                    return Optional(self)
    +            if minElements:
    +                if minElements == 1:
    +                    ret = self + makeOptionalList(optElements)
    +                else:
    +                    ret = And([self]*minElements) + makeOptionalList(optElements)
    +            else:
    +                ret = makeOptionalList(optElements)
    +        else:
    +            if minElements == 1:
    +                ret = self
    +            else:
    +                ret = And([self]*minElements)
    +        return ret
    +
    +    def __rmul__(self, other):
    +        return self.__mul__(other)
    +
    +    def __or__(self, other ):
    +        """
    +        Implementation of | operator - returns C{L{MatchFirst}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return MatchFirst( [ self, other ] )
    +
    +    def __ror__(self, other ):
    +        """
    +        Implementation of | operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other | self
    +
    +    def __xor__(self, other ):
    +        """
    +        Implementation of ^ operator - returns C{L{Or}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return Or( [ self, other ] )
    +
    +    def __rxor__(self, other ):
    +        """
    +        Implementation of ^ operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other ^ self
    +
    +    def __and__(self, other ):
    +        """
    +        Implementation of & operator - returns C{L{Each}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return Each( [ self, other ] )
    +
    +    def __rand__(self, other ):
    +        """
    +        Implementation of & operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other & self
    +
    +    def __invert__( self ):
    +        """
    +        Implementation of ~ operator - returns C{L{NotAny}}
    +        """
    +        return NotAny( self )
    +
    +    def __call__(self, name=None):
    +        """
    +        Shortcut for C{L{setResultsName}}, with C{listAllMatches=False}.
    +        
    +        If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be
    +        passed as C{True}.
    +           
    +        If C{name} is omitted, same as calling C{L{copy}}.
    +
    +        Example::
    +            # these are equivalent
    +            userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno")
    +            userdata = Word(alphas)("name") + Word(nums+"-")("socsecno")             
    +        """
    +        if name is not None:
    +            return self.setResultsName(name)
    +        else:
    +            return self.copy()
    +
    +    def suppress( self ):
    +        """
    +        Suppresses the output of this C{ParserElement}; useful to keep punctuation from
    +        cluttering up returned output.
    +        """
    +        return Suppress( self )
    +
    +    def leaveWhitespace( self ):
    +        """
    +        Disables the skipping of whitespace before matching the characters in the
    +        C{ParserElement}'s defined pattern.  This is normally only used internally by
    +        the pyparsing module, but may be needed in some whitespace-sensitive grammars.
    +        """
    +        self.skipWhitespace = False
    +        return self
    +
    +    def setWhitespaceChars( self, chars ):
    +        """
    +        Overrides the default whitespace chars
    +        """
    +        self.skipWhitespace = True
    +        self.whiteChars = chars
    +        self.copyDefaultWhiteChars = False
    +        return self
    +
    +    def parseWithTabs( self ):
    +        """
    +        Overrides default behavior to expand C{}s to spaces before parsing the input string.
    +        Must be called before C{parseString} when the input grammar contains elements that
    +        match C{} characters.
    +        """
    +        self.keepTabs = True
    +        return self
    +
    +    def ignore( self, other ):
    +        """
    +        Define expression to be ignored (e.g., comments) while doing pattern
    +        matching; may be called repeatedly, to define multiple comment or other
    +        ignorable patterns.
    +        
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj']
    +            
    +            patt.ignore(cStyleComment)
    +            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd']
    +        """
    +        if isinstance(other, basestring):
    +            other = Suppress(other)
    +
    +        if isinstance( other, Suppress ):
    +            if other not in self.ignoreExprs:
    +                self.ignoreExprs.append(other)
    +        else:
    +            self.ignoreExprs.append( Suppress( other.copy() ) )
    +        return self
    +
    +    def setDebugActions( self, startAction, successAction, exceptionAction ):
    +        """
    +        Enable display of debugging messages while doing pattern matching.
    +        """
    +        self.debugActions = (startAction or _defaultStartDebugAction,
    +                             successAction or _defaultSuccessDebugAction,
    +                             exceptionAction or _defaultExceptionDebugAction)
    +        self.debug = True
    +        return self
    +
    +    def setDebug( self, flag=True ):
    +        """
    +        Enable display of debugging messages while doing pattern matching.
    +        Set C{flag} to True to enable, False to disable.
    +
    +        Example::
    +            wd = Word(alphas).setName("alphaword")
    +            integer = Word(nums).setName("numword")
    +            term = wd | integer
    +            
    +            # turn on debugging for wd
    +            wd.setDebug()
    +
    +            OneOrMore(term).parseString("abc 123 xyz 890")
    +        
    +        prints::
    +            Match alphaword at loc 0(1,1)
    +            Matched alphaword -> ['abc']
    +            Match alphaword at loc 3(1,4)
    +            Exception raised:Expected alphaword (at char 4), (line:1, col:5)
    +            Match alphaword at loc 7(1,8)
    +            Matched alphaword -> ['xyz']
    +            Match alphaword at loc 11(1,12)
    +            Exception raised:Expected alphaword (at char 12), (line:1, col:13)
    +            Match alphaword at loc 15(1,16)
    +            Exception raised:Expected alphaword (at char 15), (line:1, col:16)
    +
    +        The output shown is that produced by the default debug actions - custom debug actions can be
    +        specified using L{setDebugActions}. Prior to attempting
    +        to match the C{wd} expression, the debugging message C{"Match  at loc (,)"}
    +        is shown. Then if the parse succeeds, a C{"Matched"} message is shown, or an C{"Exception raised"}
    +        message is shown. Also note the use of L{setName} to assign a human-readable name to the expression,
    +        which makes debugging and exception messages easier to understand - for instance, the default
    +        name created for the C{Word} expression without calling C{setName} is C{"W:(ABCD...)"}.
    +        """
    +        if flag:
    +            self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction )
    +        else:
    +            self.debug = False
    +        return self
    +
    +    def __str__( self ):
    +        return self.name
    +
    +    def __repr__( self ):
    +        return _ustr(self)
    +
    +    def streamline( self ):
    +        self.streamlined = True
    +        self.strRepr = None
    +        return self
    +
    +    def checkRecursion( self, parseElementList ):
    +        pass
    +
    +    def validate( self, validateTrace=[] ):
    +        """
    +        Check defined expressions for valid structure, check for infinite recursive definitions.
    +        """
    +        self.checkRecursion( [] )
    +
    +    def parseFile( self, file_or_filename, parseAll=False ):
    +        """
    +        Execute the parse expression on the given file or filename.
    +        If a filename is specified (instead of a file object),
    +        the entire file is opened, read, and closed before parsing.
    +        """
    +        try:
    +            file_contents = file_or_filename.read()
    +        except AttributeError:
    +            with open(file_or_filename, "r") as f:
    +                file_contents = f.read()
    +        try:
    +            return self.parseString(file_contents, parseAll)
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def __eq__(self,other):
    +        if isinstance(other, ParserElement):
    +            return self is other or vars(self) == vars(other)
    +        elif isinstance(other, basestring):
    +            return self.matches(other)
    +        else:
    +            return super(ParserElement,self)==other
    +
    +    def __ne__(self,other):
    +        return not (self == other)
    +
    +    def __hash__(self):
    +        return hash(id(self))
    +
    +    def __req__(self,other):
    +        return self == other
    +
    +    def __rne__(self,other):
    +        return not (self == other)
    +
    +    def matches(self, testString, parseAll=True):
    +        """
    +        Method for quick testing of a parser against a test string. Good for simple 
    +        inline microtests of sub expressions while building up larger parser.
    +           
    +        Parameters:
    +         - testString - to test against this expression for a match
    +         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests
    +            
    +        Example::
    +            expr = Word(nums)
    +            assert expr.matches("100")
    +        """
    +        try:
    +            self.parseString(_ustr(testString), parseAll=parseAll)
    +            return True
    +        except ParseBaseException:
    +            return False
    +                
    +    def runTests(self, tests, parseAll=True, comment='#', fullDump=True, printResults=True, failureTests=False):
    +        """
    +        Execute the parse expression on a series of test strings, showing each
    +        test, the parsed results or where the parse failed. Quick and easy way to
    +        run a parse expression against a list of sample strings.
    +           
    +        Parameters:
    +         - tests - a list of separate test strings, or a multiline string of test strings
    +         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests           
    +         - comment - (default=C{'#'}) - expression for indicating embedded comments in the test 
    +              string; pass None to disable comment filtering
    +         - fullDump - (default=C{True}) - dump results as list followed by results names in nested outline;
    +              if False, only dump nested list
    +         - printResults - (default=C{True}) prints test output to stdout
    +         - failureTests - (default=C{False}) indicates if these tests are expected to fail parsing
    +
    +        Returns: a (success, results) tuple, where success indicates that all tests succeeded
    +        (or failed if C{failureTests} is True), and the results contain a list of lines of each 
    +        test's output
    +        
    +        Example::
    +            number_expr = pyparsing_common.number.copy()
    +
    +            result = number_expr.runTests('''
    +                # unsigned integer
    +                100
    +                # negative integer
    +                -100
    +                # float with scientific notation
    +                6.02e23
    +                # integer with scientific notation
    +                1e-12
    +                ''')
    +            print("Success" if result[0] else "Failed!")
    +
    +            result = number_expr.runTests('''
    +                # stray character
    +                100Z
    +                # missing leading digit before '.'
    +                -.100
    +                # too many '.'
    +                3.14.159
    +                ''', failureTests=True)
    +            print("Success" if result[0] else "Failed!")
    +        prints::
    +            # unsigned integer
    +            100
    +            [100]
    +
    +            # negative integer
    +            -100
    +            [-100]
    +
    +            # float with scientific notation
    +            6.02e23
    +            [6.02e+23]
    +
    +            # integer with scientific notation
    +            1e-12
    +            [1e-12]
    +
    +            Success
    +            
    +            # stray character
    +            100Z
    +               ^
    +            FAIL: Expected end of text (at char 3), (line:1, col:4)
    +
    +            # missing leading digit before '.'
    +            -.100
    +            ^
    +            FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)
    +
    +            # too many '.'
    +            3.14.159
    +                ^
    +            FAIL: Expected end of text (at char 4), (line:1, col:5)
    +
    +            Success
    +
    +        Each test string must be on a single line. If you want to test a string that spans multiple
    +        lines, create a test like this::
    +
    +            expr.runTest(r"this is a test\\n of strings that spans \\n 3 lines")
    +        
    +        (Note that this is a raw string literal, you must include the leading 'r'.)
    +        """
    +        if isinstance(tests, basestring):
    +            tests = list(map(str.strip, tests.rstrip().splitlines()))
    +        if isinstance(comment, basestring):
    +            comment = Literal(comment)
    +        allResults = []
    +        comments = []
    +        success = True
    +        for t in tests:
    +            if comment is not None and comment.matches(t, False) or comments and not t:
    +                comments.append(t)
    +                continue
    +            if not t:
    +                continue
    +            out = ['\n'.join(comments), t]
    +            comments = []
    +            try:
    +                t = t.replace(r'\n','\n')
    +                result = self.parseString(t, parseAll=parseAll)
    +                out.append(result.dump(full=fullDump))
    +                success = success and not failureTests
    +            except ParseBaseException as pe:
    +                fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else ""
    +                if '\n' in t:
    +                    out.append(line(pe.loc, t))
    +                    out.append(' '*(col(pe.loc,t)-1) + '^' + fatal)
    +                else:
    +                    out.append(' '*pe.loc + '^' + fatal)
    +                out.append("FAIL: " + str(pe))
    +                success = success and failureTests
    +                result = pe
    +            except Exception as exc:
    +                out.append("FAIL-EXCEPTION: " + str(exc))
    +                success = success and failureTests
    +                result = exc
    +
    +            if printResults:
    +                if fullDump:
    +                    out.append('')
    +                print('\n'.join(out))
    +
    +            allResults.append((t, result))
    +        
    +        return success, allResults
    +
    +        
    +class Token(ParserElement):
    +    """
    +    Abstract C{ParserElement} subclass, for defining atomic matching patterns.
    +    """
    +    def __init__( self ):
    +        super(Token,self).__init__( savelist=False )
    +
    +
    +class Empty(Token):
    +    """
    +    An empty token, will always match.
    +    """
    +    def __init__( self ):
    +        super(Empty,self).__init__()
    +        self.name = "Empty"
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +
    +
    +class NoMatch(Token):
    +    """
    +    A token that will never match.
    +    """
    +    def __init__( self ):
    +        super(NoMatch,self).__init__()
    +        self.name = "NoMatch"
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +        self.errmsg = "Unmatchable token"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +
    +class Literal(Token):
    +    """
    +    Token to exactly match a specified string.
    +    
    +    Example::
    +        Literal('blah').parseString('blah')  # -> ['blah']
    +        Literal('blah').parseString('blahfooblah')  # -> ['blah']
    +        Literal('blah').parseString('bla')  # -> Exception: Expected "blah"
    +    
    +    For case-insensitive matching, use L{CaselessLiteral}.
    +    
    +    For keyword matching (force word break before and after the matched string),
    +    use L{Keyword} or L{CaselessKeyword}.
    +    """
    +    def __init__( self, matchString ):
    +        super(Literal,self).__init__()
    +        self.match = matchString
    +        self.matchLen = len(matchString)
    +        try:
    +            self.firstMatchChar = matchString[0]
    +        except IndexError:
    +            warnings.warn("null string passed to Literal; use Empty() instead",
    +                            SyntaxWarning, stacklevel=2)
    +            self.__class__ = Empty
    +        self.name = '"%s"' % _ustr(self.match)
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = False
    +        self.mayIndexError = False
    +
    +    # Performance tuning: this routine gets called a *lot*
    +    # if this is a single character match string  and the first character matches,
    +    # short-circuit as quickly as possible, and avoid calling startswith
    +    #~ @profile
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if (instring[loc] == self.firstMatchChar and
    +            (self.matchLen==1 or instring.startswith(self.match,loc)) ):
    +            return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +_L = Literal
    +ParserElement._literalStringClass = Literal
    +
    +class Keyword(Token):
    +    """
    +    Token to exactly match a specified string as a keyword, that is, it must be
    +    immediately followed by a non-keyword character.  Compare with C{L{Literal}}:
    +     - C{Literal("if")} will match the leading C{'if'} in C{'ifAndOnlyIf'}.
    +     - C{Keyword("if")} will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'}
    +    Accepts two optional constructor arguments in addition to the keyword string:
    +     - C{identChars} is a string of characters that would be valid identifier characters,
    +          defaulting to all alphanumerics + "_" and "$"
    +     - C{caseless} allows case-insensitive matching, default is C{False}.
    +       
    +    Example::
    +        Keyword("start").parseString("start")  # -> ['start']
    +        Keyword("start").parseString("starting")  # -> Exception
    +
    +    For case-insensitive matching, use L{CaselessKeyword}.
    +    """
    +    DEFAULT_KEYWORD_CHARS = alphanums+"_$"
    +
    +    def __init__( self, matchString, identChars=None, caseless=False ):
    +        super(Keyword,self).__init__()
    +        if identChars is None:
    +            identChars = Keyword.DEFAULT_KEYWORD_CHARS
    +        self.match = matchString
    +        self.matchLen = len(matchString)
    +        try:
    +            self.firstMatchChar = matchString[0]
    +        except IndexError:
    +            warnings.warn("null string passed to Keyword; use Empty() instead",
    +                            SyntaxWarning, stacklevel=2)
    +        self.name = '"%s"' % self.match
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = False
    +        self.mayIndexError = False
    +        self.caseless = caseless
    +        if caseless:
    +            self.caselessmatch = matchString.upper()
    +            identChars = identChars.upper()
    +        self.identChars = set(identChars)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.caseless:
    +            if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    +                 (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and
    +                 (loc == 0 or instring[loc-1].upper() not in self.identChars) ):
    +                return loc+self.matchLen, self.match
    +        else:
    +            if (instring[loc] == self.firstMatchChar and
    +                (self.matchLen==1 or instring.startswith(self.match,loc)) and
    +                (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and
    +                (loc == 0 or instring[loc-1] not in self.identChars) ):
    +                return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +    def copy(self):
    +        c = super(Keyword,self).copy()
    +        c.identChars = Keyword.DEFAULT_KEYWORD_CHARS
    +        return c
    +
    +    @staticmethod
    +    def setDefaultKeywordChars( chars ):
    +        """Overrides the default Keyword chars
    +        """
    +        Keyword.DEFAULT_KEYWORD_CHARS = chars
    +
    +class CaselessLiteral(Literal):
    +    """
    +    Token to match a specified string, ignoring case of letters.
    +    Note: the matched results will always be in the case of the given
    +    match string, NOT the case of the input text.
    +
    +    Example::
    +        OneOrMore(CaselessLiteral("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD']
    +        
    +    (Contrast with example for L{CaselessKeyword}.)
    +    """
    +    def __init__( self, matchString ):
    +        super(CaselessLiteral,self).__init__( matchString.upper() )
    +        # Preserve the defining literal.
    +        self.returnString = matchString
    +        self.name = "'%s'" % self.returnString
    +        self.errmsg = "Expected " + self.name
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if instring[ loc:loc+self.matchLen ].upper() == self.match:
    +            return loc+self.matchLen, self.returnString
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class CaselessKeyword(Keyword):
    +    """
    +    Caseless version of L{Keyword}.
    +
    +    Example::
    +        OneOrMore(CaselessKeyword("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD']
    +        
    +    (Contrast with example for L{CaselessLiteral}.)
    +    """
    +    def __init__( self, matchString, identChars=None ):
    +        super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True )
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    +             (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ):
    +            return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class CloseMatch(Token):
    +    """
    +    A variation on L{Literal} which matches "close" matches, that is, 
    +    strings with at most 'n' mismatching characters. C{CloseMatch} takes parameters:
    +     - C{match_string} - string to be matched
    +     - C{maxMismatches} - (C{default=1}) maximum number of mismatches allowed to count as a match
    +    
    +    The results from a successful parse will contain the matched text from the input string and the following named results:
    +     - C{mismatches} - a list of the positions within the match_string where mismatches were found
    +     - C{original} - the original match_string used to compare against the input string
    +    
    +    If C{mismatches} is an empty list, then the match was an exact match.
    +    
    +    Example::
    +        patt = CloseMatch("ATCATCGAATGGA")
    +        patt.parseString("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
    +        patt.parseString("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)
    +
    +        # exact match
    +        patt.parseString("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})
    +
    +        # close match allowing up to 2 mismatches
    +        patt = CloseMatch("ATCATCGAATGGA", maxMismatches=2)
    +        patt.parseString("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})
    +    """
    +    def __init__(self, match_string, maxMismatches=1):
    +        super(CloseMatch,self).__init__()
    +        self.name = match_string
    +        self.match_string = match_string
    +        self.maxMismatches = maxMismatches
    +        self.errmsg = "Expected %r (with up to %d mismatches)" % (self.match_string, self.maxMismatches)
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = False
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        start = loc
    +        instrlen = len(instring)
    +        maxloc = start + len(self.match_string)
    +
    +        if maxloc <= instrlen:
    +            match_string = self.match_string
    +            match_stringloc = 0
    +            mismatches = []
    +            maxMismatches = self.maxMismatches
    +
    +            for match_stringloc,s_m in enumerate(zip(instring[loc:maxloc], self.match_string)):
    +                src,mat = s_m
    +                if src != mat:
    +                    mismatches.append(match_stringloc)
    +                    if len(mismatches) > maxMismatches:
    +                        break
    +            else:
    +                loc = match_stringloc + 1
    +                results = ParseResults([instring[start:loc]])
    +                results['original'] = self.match_string
    +                results['mismatches'] = mismatches
    +                return loc, results
    +
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +
    +class Word(Token):
    +    """
    +    Token for matching words composed of allowed character sets.
    +    Defined with string containing all allowed initial characters,
    +    an optional string containing allowed body characters (if omitted,
    +    defaults to the initial character set), and an optional minimum,
    +    maximum, and/or exact length.  The default value for C{min} is 1 (a
    +    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    +    are 0, meaning no maximum or exact length restriction. An optional
    +    C{excludeChars} parameter can list characters that might be found in 
    +    the input C{bodyChars} string; useful to define a word of all printables
    +    except for one or two characters, for instance.
    +    
    +    L{srange} is useful for defining custom character set strings for defining 
    +    C{Word} expressions, using range notation from regular expression character sets.
    +    
    +    A common mistake is to use C{Word} to match a specific literal string, as in 
    +    C{Word("Address")}. Remember that C{Word} uses the string argument to define
    +    I{sets} of matchable characters. This expression would match "Add", "AAA",
    +    "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'.
    +    To match an exact literal string, use L{Literal} or L{Keyword}.
    +
    +    pyparsing includes helper strings for building Words:
    +     - L{alphas}
    +     - L{nums}
    +     - L{alphanums}
    +     - L{hexnums}
    +     - L{alphas8bit} (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.)
    +     - L{punc8bit} (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.)
    +     - L{printables} (any non-whitespace character)
    +
    +    Example::
    +        # a word composed of digits
    +        integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))
    +        
    +        # a word with a leading capital, and zero or more lowercase
    +        capital_word = Word(alphas.upper(), alphas.lower())
    +
    +        # hostnames are alphanumeric, with leading alpha, and '-'
    +        hostname = Word(alphas, alphanums+'-')
    +        
    +        # roman numeral (not a strict parser, accepts invalid mix of characters)
    +        roman = Word("IVXLCDM")
    +        
    +        # any string of non-whitespace characters, except for ','
    +        csv_value = Word(printables, excludeChars=",")
    +    """
    +    def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ):
    +        super(Word,self).__init__()
    +        if excludeChars:
    +            initChars = ''.join(c for c in initChars if c not in excludeChars)
    +            if bodyChars:
    +                bodyChars = ''.join(c for c in bodyChars if c not in excludeChars)
    +        self.initCharsOrig = initChars
    +        self.initChars = set(initChars)
    +        if bodyChars :
    +            self.bodyCharsOrig = bodyChars
    +            self.bodyChars = set(bodyChars)
    +        else:
    +            self.bodyCharsOrig = initChars
    +            self.bodyChars = set(initChars)
    +
    +        self.maxSpecified = max > 0
    +
    +        if min < 1:
    +            raise ValueError("cannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitted")
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.asKeyword = asKeyword
    +
    +        if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0):
    +            if self.bodyCharsOrig == self.initCharsOrig:
    +                self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig)
    +            elif len(self.initCharsOrig) == 1:
    +                self.reString = "%s[%s]*" % \
    +                                      (re.escape(self.initCharsOrig),
    +                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    +            else:
    +                self.reString = "[%s][%s]*" % \
    +                                      (_escapeRegexRangeChars(self.initCharsOrig),
    +                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    +            if self.asKeyword:
    +                self.reString = r"\b"+self.reString+r"\b"
    +            try:
    +                self.re = re.compile( self.reString )
    +            except Exception:
    +                self.re = None
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.re:
    +            result = self.re.match(instring,loc)
    +            if not result:
    +                raise ParseException(instring, loc, self.errmsg, self)
    +
    +            loc = result.end()
    +            return loc, result.group()
    +
    +        if not(instring[ loc ] in self.initChars):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        start = loc
    +        loc += 1
    +        instrlen = len(instring)
    +        bodychars = self.bodyChars
    +        maxloc = start + self.maxLen
    +        maxloc = min( maxloc, instrlen )
    +        while loc < maxloc and instring[loc] in bodychars:
    +            loc += 1
    +
    +        throwException = False
    +        if loc - start < self.minLen:
    +            throwException = True
    +        if self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
    +            throwException = True
    +        if self.asKeyword:
    +            if (start>0 and instring[start-1] in bodychars) or (loc4:
    +                    return s[:4]+"..."
    +                else:
    +                    return s
    +
    +            if ( self.initCharsOrig != self.bodyCharsOrig ):
    +                self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) )
    +            else:
    +                self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig)
    +
    +        return self.strRepr
    +
    +
    +class Regex(Token):
    +    """
    +    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...)}), these will be preserved as 
    +    named parse results.
    +
    +    Example::
    +        realnum = Regex(r"[+-]?\d+\.\d*")
    +        date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)')
    +        # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
    +        roman = Regex(r"M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")
    +    """
    +    compiledREtype = type(re.compile("[A-Z]"))
    +    def __init__( self, pattern, flags=0):
    +        """The parameters C{pattern} and C{flags} are passed to the C{re.compile()} function as-is. See the Python C{re} module for an explanation of the acceptable patterns and flags."""
    +        super(Regex,self).__init__()
    +
    +        if isinstance(pattern, basestring):
    +            if not pattern:
    +                warnings.warn("null string passed to Regex; use Empty() instead",
    +                        SyntaxWarning, stacklevel=2)
    +
    +            self.pattern = pattern
    +            self.flags = flags
    +
    +            try:
    +                self.re = re.compile(self.pattern, self.flags)
    +                self.reString = self.pattern
    +            except sre_constants.error:
    +                warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
    +                    SyntaxWarning, stacklevel=2)
    +                raise
    +
    +        elif isinstance(pattern, Regex.compiledREtype):
    +            self.re = pattern
    +            self.pattern = \
    +            self.reString = str(pattern)
    +            self.flags = flags
    +            
    +        else:
    +            raise ValueError("Regex may only be constructed with a string or a compiled RE object")
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        result = self.re.match(instring,loc)
    +        if not result:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        loc = result.end()
    +        d = result.groupdict()
    +        ret = ParseResults(result.group())
    +        if d:
    +            for k in d:
    +                ret[k] = d[k]
    +        return loc,ret
    +
    +    def __str__( self ):
    +        try:
    +            return super(Regex,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            self.strRepr = "Re:(%s)" % repr(self.pattern)
    +
    +        return self.strRepr
    +
    +
    +class QuotedString(Token):
    +    r"""
    +    Token for matching strings that are delimited by quoting characters.
    +    
    +    Defined with the following parameters:
    +        - quoteChar - string of one or more characters defining the quote delimiting string
    +        - escChar - character to escape quotes, typically backslash (default=C{None})
    +        - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=C{None})
    +        - multiline - boolean indicating whether quotes can span multiple lines (default=C{False})
    +        - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True})
    +        - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar)
    +        - convertWhitespaceEscapes - convert escaped whitespace (C{'\t'}, C{'\n'}, etc.) to actual whitespace (default=C{True})
    +
    +    Example::
    +        qs = QuotedString('"')
    +        print(qs.searchString('lsjdf "This is the quote" sldjf'))
    +        complex_qs = QuotedString('{{', endQuoteChar='}}')
    +        print(complex_qs.searchString('lsjdf {{This is the "quote"}} sldjf'))
    +        sql_qs = QuotedString('"', escQuote='""')
    +        print(sql_qs.searchString('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))
    +    prints::
    +        [['This is the quote']]
    +        [['This is the "quote"']]
    +        [['This is the quote with "embedded" quotes']]
    +    """
    +    def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None, convertWhitespaceEscapes=True):
    +        super(QuotedString,self).__init__()
    +
    +        # remove white space from quote chars - wont work anyway
    +        quoteChar = quoteChar.strip()
    +        if not quoteChar:
    +            warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    +            raise SyntaxError()
    +
    +        if endQuoteChar is None:
    +            endQuoteChar = quoteChar
    +        else:
    +            endQuoteChar = endQuoteChar.strip()
    +            if not endQuoteChar:
    +                warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    +                raise SyntaxError()
    +
    +        self.quoteChar = quoteChar
    +        self.quoteCharLen = len(quoteChar)
    +        self.firstQuoteChar = quoteChar[0]
    +        self.endQuoteChar = endQuoteChar
    +        self.endQuoteCharLen = len(endQuoteChar)
    +        self.escChar = escChar
    +        self.escQuote = escQuote
    +        self.unquoteResults = unquoteResults
    +        self.convertWhitespaceEscapes = convertWhitespaceEscapes
    +
    +        if multiline:
    +            self.flags = re.MULTILINE | re.DOTALL
    +            self.pattern = r'%s(?:[^%s%s]' % \
    +                ( re.escape(self.quoteChar),
    +                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    +                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    +        else:
    +            self.flags = 0
    +            self.pattern = r'%s(?:[^%s\n\r%s]' % \
    +                ( re.escape(self.quoteChar),
    +                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    +                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    +        if len(self.endQuoteChar) > 1:
    +            self.pattern += (
    +                '|(?:' + ')|(?:'.join("%s[^%s]" % (re.escape(self.endQuoteChar[:i]),
    +                                               _escapeRegexRangeChars(self.endQuoteChar[i]))
    +                                    for i in range(len(self.endQuoteChar)-1,0,-1)) + ')'
    +                )
    +        if escQuote:
    +            self.pattern += (r'|(?:%s)' % re.escape(escQuote))
    +        if escChar:
    +            self.pattern += (r'|(?:%s.)' % re.escape(escChar))
    +            self.escCharReplacePattern = re.escape(self.escChar)+"(.)"
    +        self.pattern += (r')*%s' % re.escape(self.endQuoteChar))
    +
    +        try:
    +            self.re = re.compile(self.pattern, self.flags)
    +            self.reString = self.pattern
    +        except sre_constants.error:
    +            warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
    +                SyntaxWarning, stacklevel=2)
    +            raise
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None
    +        if not result:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        loc = result.end()
    +        ret = result.group()
    +
    +        if self.unquoteResults:
    +
    +            # strip off quotes
    +            ret = ret[self.quoteCharLen:-self.endQuoteCharLen]
    +
    +            if isinstance(ret,basestring):
    +                # replace escaped whitespace
    +                if '\\' in ret and self.convertWhitespaceEscapes:
    +                    ws_map = {
    +                        r'\t' : '\t',
    +                        r'\n' : '\n',
    +                        r'\f' : '\f',
    +                        r'\r' : '\r',
    +                    }
    +                    for wslit,wschar in ws_map.items():
    +                        ret = ret.replace(wslit, wschar)
    +
    +                # replace escaped characters
    +                if self.escChar:
    +                    ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
    +
    +                # replace escaped quotes
    +                if self.escQuote:
    +                    ret = ret.replace(self.escQuote, self.endQuoteChar)
    +
    +        return loc, ret
    +
    +    def __str__( self ):
    +        try:
    +            return super(QuotedString,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar)
    +
    +        return self.strRepr
    +
    +
    +class CharsNotIn(Token):
    +    """
    +    Token for matching words composed of characters I{not} in a given set (will
    +    include whitespace in matched characters if not listed in the provided exclusion set - see example).
    +    Defined with string containing all disallowed characters, and an optional
    +    minimum, maximum, and/or exact length.  The default value for C{min} is 1 (a
    +    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    +    are 0, meaning no maximum or exact length restriction.
    +
    +    Example::
    +        # define a comma-separated-value as anything that is not a ','
    +        csv_value = CharsNotIn(',')
    +        print(delimitedList(csv_value).parseString("dkls,lsdkjf,s12 34,@!#,213"))
    +    prints::
    +        ['dkls', 'lsdkjf', 's12 34', '@!#', '213']
    +    """
    +    def __init__( self, notChars, min=1, max=0, exact=0 ):
    +        super(CharsNotIn,self).__init__()
    +        self.skipWhitespace = False
    +        self.notChars = notChars
    +
    +        if min < 1:
    +            raise ValueError("cannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permitted")
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = ( self.minLen == 0 )
    +        self.mayIndexError = False
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if instring[loc] in self.notChars:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        start = loc
    +        loc += 1
    +        notchars = self.notChars
    +        maxlen = min( start+self.maxLen, len(instring) )
    +        while loc < maxlen and \
    +              (instring[loc] not in notchars):
    +            loc += 1
    +
    +        if loc - start < self.minLen:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        return loc, instring[start:loc]
    +
    +    def __str__( self ):
    +        try:
    +            return super(CharsNotIn, self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            if len(self.notChars) > 4:
    +                self.strRepr = "!W:(%s...)" % self.notChars[:4]
    +            else:
    +                self.strRepr = "!W:(%s)" % self.notChars
    +
    +        return self.strRepr
    +
    +class White(Token):
    +    """
    +    Special matching class for matching whitespace.  Normally, whitespace is ignored
    +    by pyparsing grammars.  This class is included when some whitespace structures
    +    are significant.  Define with a string containing the whitespace characters to be
    +    matched; default is C{" \\t\\r\\n"}.  Also takes optional C{min}, C{max}, and C{exact} arguments,
    +    as defined for the C{L{Word}} class.
    +    """
    +    whiteStrs = {
    +        " " : "",
    +        "\t": "",
    +        "\n": "",
    +        "\r": "",
    +        "\f": "",
    +        }
    +    def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0):
    +        super(White,self).__init__()
    +        self.matchWhite = ws
    +        self.setWhitespaceChars( "".join(c for c in self.whiteChars if c not in self.matchWhite) )
    +        #~ self.leaveWhitespace()
    +        self.name = ("".join(White.whiteStrs[c] for c in self.matchWhite))
    +        self.mayReturnEmpty = True
    +        self.errmsg = "Expected " + self.name
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if not(instring[ loc ] in self.matchWhite):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +        start = loc
    +        loc += 1
    +        maxloc = start + self.maxLen
    +        maxloc = min( maxloc, len(instring) )
    +        while loc < maxloc and instring[loc] in self.matchWhite:
    +            loc += 1
    +
    +        if loc - start < self.minLen:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        return loc, instring[start:loc]
    +
    +
    +class _PositionToken(Token):
    +    def __init__( self ):
    +        super(_PositionToken,self).__init__()
    +        self.name=self.__class__.__name__
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +
    +class GoToColumn(_PositionToken):
    +    """
    +    Token to advance to a specific column of input text; useful for tabular report scraping.
    +    """
    +    def __init__( self, colno ):
    +        super(GoToColumn,self).__init__()
    +        self.col = colno
    +
    +    def preParse( self, instring, loc ):
    +        if col(loc,instring) != self.col:
    +            instrlen = len(instring)
    +            if self.ignoreExprs:
    +                loc = self._skipIgnorables( instring, loc )
    +            while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col :
    +                loc += 1
    +        return loc
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        thiscol = col( loc, instring )
    +        if thiscol > self.col:
    +            raise ParseException( instring, loc, "Text not in expected column", self )
    +        newloc = loc + self.col - thiscol
    +        ret = instring[ loc: newloc ]
    +        return newloc, ret
    +
    +
    +class LineStart(_PositionToken):
    +    """
    +    Matches if current position is at the beginning of a line within the parse string
    +    
    +    Example::
    +    
    +        test = '''\
    +        AAA this line
    +        AAA and this line
    +          AAA but not this one
    +        B AAA and definitely not this one
    +        '''
    +
    +        for t in (LineStart() + 'AAA' + restOfLine).searchString(test):
    +            print(t)
    +    
    +    Prints::
    +        ['AAA', ' this line']
    +        ['AAA', ' and this line']    
    +
    +    """
    +    def __init__( self ):
    +        super(LineStart,self).__init__()
    +        self.errmsg = "Expected start of line"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if col(loc, instring) == 1:
    +            return loc, []
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class LineEnd(_PositionToken):
    +    """
    +    Matches if current position is at the end of a line within the parse string
    +    """
    +    def __init__( self ):
    +        super(LineEnd,self).__init__()
    +        self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") )
    +        self.errmsg = "Expected end of line"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if loc len(instring):
    +            return loc, []
    +        else:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +class WordStart(_PositionToken):
    +    """
    +    Matches if the current position is at the beginning of a Word, and
    +    is not preceded by any character in a given set of C{wordChars}
    +    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    +    use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of
    +    the string being parsed, or at the beginning of a line.
    +    """
    +    def __init__(self, wordChars = printables):
    +        super(WordStart,self).__init__()
    +        self.wordChars = set(wordChars)
    +        self.errmsg = "Not at the start of a word"
    +
    +    def parseImpl(self, instring, loc, doActions=True ):
    +        if loc != 0:
    +            if (instring[loc-1] in self.wordChars or
    +                instring[loc] not in self.wordChars):
    +                raise ParseException(instring, loc, self.errmsg, self)
    +        return loc, []
    +
    +class WordEnd(_PositionToken):
    +    """
    +    Matches if the current position is at the end of a Word, and
    +    is not followed by any character in a given set of C{wordChars}
    +    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    +    use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of
    +    the string being parsed, or at the end of a line.
    +    """
    +    def __init__(self, wordChars = printables):
    +        super(WordEnd,self).__init__()
    +        self.wordChars = set(wordChars)
    +        self.skipWhitespace = False
    +        self.errmsg = "Not at the end of a word"
    +
    +    def parseImpl(self, instring, loc, doActions=True ):
    +        instrlen = len(instring)
    +        if instrlen>0 and loc maxExcLoc:
    +                    maxException = err
    +                    maxExcLoc = err.loc
    +            except IndexError:
    +                if len(instring) > maxExcLoc:
    +                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    +                    maxExcLoc = len(instring)
    +            else:
    +                # save match among all matches, to retry longest to shortest
    +                matches.append((loc2, e))
    +
    +        if matches:
    +            matches.sort(key=lambda x: -x[0])
    +            for _,e in matches:
    +                try:
    +                    return e._parse( instring, loc, doActions )
    +                except ParseException as err:
    +                    err.__traceback__ = None
    +                    if err.loc > maxExcLoc:
    +                        maxException = err
    +                        maxExcLoc = err.loc
    +
    +        if maxException is not None:
    +            maxException.msg = self.errmsg
    +            raise maxException
    +        else:
    +            raise ParseException(instring, loc, "no defined alternatives to match", self)
    +
    +
    +    def __ixor__(self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        return self.append( other ) #Or( [ self, other ] )
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " ^ ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class MatchFirst(ParseExpression):
    +    """
    +    Requires that at least one C{ParseExpression} is found.
    +    If two expressions match, the first one listed is the one that will match.
    +    May be constructed using the C{'|'} operator.
    +
    +    Example::
    +        # construct MatchFirst using '|' operator
    +        
    +        # watch the order of expressions to match
    +        number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
    +        print(number.searchString("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]
    +
    +        # put more selective expression first
    +        number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
    +        print(number.searchString("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]
    +    """
    +    def __init__( self, exprs, savelist = False ):
    +        super(MatchFirst,self).__init__(exprs, savelist)
    +        if self.exprs:
    +            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
    +        else:
    +            self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        maxExcLoc = -1
    +        maxException = None
    +        for e in self.exprs:
    +            try:
    +                ret = e._parse( instring, loc, doActions )
    +                return ret
    +            except ParseException as err:
    +                if err.loc > maxExcLoc:
    +                    maxException = err
    +                    maxExcLoc = err.loc
    +            except IndexError:
    +                if len(instring) > maxExcLoc:
    +                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    +                    maxExcLoc = len(instring)
    +
    +        # only got here if no expression matched, raise exception for match that made it the furthest
    +        else:
    +            if maxException is not None:
    +                maxException.msg = self.errmsg
    +                raise maxException
    +            else:
    +                raise ParseException(instring, loc, "no defined alternatives to match", self)
    +
    +    def __ior__(self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        return self.append( other ) #MatchFirst( [ self, other ] )
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " | ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class Each(ParseExpression):
    +    """
    +    Requires all given C{ParseExpression}s to be found, but in any order.
    +    Expressions may be separated by whitespace.
    +    May be constructed using the C{'&'} operator.
    +
    +    Example::
    +        color = oneOf("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
    +        shape_type = oneOf("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
    +        integer = Word(nums)
    +        shape_attr = "shape:" + shape_type("shape")
    +        posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
    +        color_attr = "color:" + color("color")
    +        size_attr = "size:" + integer("size")
    +
    +        # use Each (using operator '&') to accept attributes in any order 
    +        # (shape and posn are required, color and size are optional)
    +        shape_spec = shape_attr & posn_attr & Optional(color_attr) & Optional(size_attr)
    +
    +        shape_spec.runTests('''
    +            shape: SQUARE color: BLACK posn: 100, 120
    +            shape: CIRCLE size: 50 color: BLUE posn: 50,80
    +            color:GREEN size:20 shape:TRIANGLE posn:20,40
    +            '''
    +            )
    +    prints::
    +        shape: SQUARE color: BLACK posn: 100, 120
    +        ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
    +        - color: BLACK
    +        - posn: ['100', ',', '120']
    +          - x: 100
    +          - y: 120
    +        - shape: SQUARE
    +
    +
    +        shape: CIRCLE size: 50 color: BLUE posn: 50,80
    +        ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
    +        - color: BLUE
    +        - posn: ['50', ',', '80']
    +          - x: 50
    +          - y: 80
    +        - shape: CIRCLE
    +        - size: 50
    +
    +
    +        color: GREEN size: 20 shape: TRIANGLE posn: 20,40
    +        ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
    +        - color: GREEN
    +        - posn: ['20', ',', '40']
    +          - x: 20
    +          - y: 40
    +        - shape: TRIANGLE
    +        - size: 20
    +    """
    +    def __init__( self, exprs, savelist = True ):
    +        super(Each,self).__init__(exprs, savelist)
    +        self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
    +        self.skipWhitespace = True
    +        self.initExprGroups = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.initExprGroups:
    +            self.opt1map = dict((id(e.expr),e) for e in self.exprs if isinstance(e,Optional))
    +            opt1 = [ e.expr for e in self.exprs if isinstance(e,Optional) ]
    +            opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e,Optional)]
    +            self.optionals = opt1 + opt2
    +            self.multioptionals = [ e.expr for e in self.exprs if isinstance(e,ZeroOrMore) ]
    +            self.multirequired = [ e.expr for e in self.exprs if isinstance(e,OneOrMore) ]
    +            self.required = [ e for e in self.exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ]
    +            self.required += self.multirequired
    +            self.initExprGroups = False
    +        tmpLoc = loc
    +        tmpReqd = self.required[:]
    +        tmpOpt  = self.optionals[:]
    +        matchOrder = []
    +
    +        keepMatching = True
    +        while keepMatching:
    +            tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired
    +            failed = []
    +            for e in tmpExprs:
    +                try:
    +                    tmpLoc = e.tryParse( instring, tmpLoc )
    +                except ParseException:
    +                    failed.append(e)
    +                else:
    +                    matchOrder.append(self.opt1map.get(id(e),e))
    +                    if e in tmpReqd:
    +                        tmpReqd.remove(e)
    +                    elif e in tmpOpt:
    +                        tmpOpt.remove(e)
    +            if len(failed) == len(tmpExprs):
    +                keepMatching = False
    +
    +        if tmpReqd:
    +            missing = ", ".join(_ustr(e) for e in tmpReqd)
    +            raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing )
    +
    +        # add any unmatched Optionals, in case they have default values defined
    +        matchOrder += [e for e in self.exprs if isinstance(e,Optional) and e.expr in tmpOpt]
    +
    +        resultlist = []
    +        for e in matchOrder:
    +            loc,results = e._parse(instring,loc,doActions)
    +            resultlist.append(results)
    +
    +        finalResults = sum(resultlist, ParseResults([]))
    +        return loc, finalResults
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " & ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class ParseElementEnhance(ParserElement):
    +    """
    +    Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.
    +    """
    +    def __init__( self, expr, savelist=False ):
    +        super(ParseElementEnhance,self).__init__(savelist)
    +        if isinstance( expr, basestring ):
    +            if issubclass(ParserElement._literalStringClass, Token):
    +                expr = ParserElement._literalStringClass(expr)
    +            else:
    +                expr = ParserElement._literalStringClass(Literal(expr))
    +        self.expr = expr
    +        self.strRepr = None
    +        if expr is not None:
    +            self.mayIndexError = expr.mayIndexError
    +            self.mayReturnEmpty = expr.mayReturnEmpty
    +            self.setWhitespaceChars( expr.whiteChars )
    +            self.skipWhitespace = expr.skipWhitespace
    +            self.saveAsList = expr.saveAsList
    +            self.callPreparse = expr.callPreparse
    +            self.ignoreExprs.extend(expr.ignoreExprs)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.expr is not None:
    +            return self.expr._parse( instring, loc, doActions, callPreParse=False )
    +        else:
    +            raise ParseException("",loc,self.errmsg,self)
    +
    +    def leaveWhitespace( self ):
    +        self.skipWhitespace = False
    +        self.expr = self.expr.copy()
    +        if self.expr is not None:
    +            self.expr.leaveWhitespace()
    +        return self
    +
    +    def ignore( self, other ):
    +        if isinstance( other, Suppress ):
    +            if other not in self.ignoreExprs:
    +                super( ParseElementEnhance, self).ignore( other )
    +                if self.expr is not None:
    +                    self.expr.ignore( self.ignoreExprs[-1] )
    +        else:
    +            super( ParseElementEnhance, self).ignore( other )
    +            if self.expr is not None:
    +                self.expr.ignore( self.ignoreExprs[-1] )
    +        return self
    +
    +    def streamline( self ):
    +        super(ParseElementEnhance,self).streamline()
    +        if self.expr is not None:
    +            self.expr.streamline()
    +        return self
    +
    +    def checkRecursion( self, parseElementList ):
    +        if self in parseElementList:
    +            raise RecursiveGrammarException( parseElementList+[self] )
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        if self.expr is not None:
    +            self.expr.checkRecursion( subRecCheckList )
    +
    +    def validate( self, validateTrace=[] ):
    +        tmp = validateTrace[:]+[self]
    +        if self.expr is not None:
    +            self.expr.validate(tmp)
    +        self.checkRecursion( [] )
    +
    +    def __str__( self ):
    +        try:
    +            return super(ParseElementEnhance,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None and self.expr is not None:
    +            self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )
    +        return self.strRepr
    +
    +
    +class FollowedBy(ParseElementEnhance):
    +    """
    +    Lookahead matching of the given parse expression.  C{FollowedBy}
    +    does I{not} advance the parsing position within the input string, it only
    +    verifies that the specified parse expression matches at the current
    +    position.  C{FollowedBy} always returns a null token list.
    +
    +    Example::
    +        # use FollowedBy to match a label only if it is followed by a ':'
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        
    +        OneOrMore(attr_expr).parseString("shape: SQUARE color: BLACK posn: upper left").pprint()
    +    prints::
    +        [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]
    +    """
    +    def __init__( self, expr ):
    +        super(FollowedBy,self).__init__(expr)
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        self.expr.tryParse( instring, loc )
    +        return loc, []
    +
    +
    +class NotAny(ParseElementEnhance):
    +    """
    +    Lookahead to disallow matching with the given parse expression.  C{NotAny}
    +    does I{not} advance the parsing position within the input string, it only
    +    verifies that the specified parse expression does I{not} match at the current
    +    position.  Also, C{NotAny} does I{not} skip over leading whitespace. C{NotAny}
    +    always returns a null token list.  May be constructed using the '~' operator.
    +
    +    Example::
    +        
    +    """
    +    def __init__( self, expr ):
    +        super(NotAny,self).__init__(expr)
    +        #~ self.leaveWhitespace()
    +        self.skipWhitespace = False  # do NOT use self.leaveWhitespace(), don't want to propagate to exprs
    +        self.mayReturnEmpty = True
    +        self.errmsg = "Found unwanted token, "+_ustr(self.expr)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.expr.canParseNext(instring, loc):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +        return loc, []
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "~{" + _ustr(self.expr) + "}"
    +
    +        return self.strRepr
    +
    +class _MultipleMatch(ParseElementEnhance):
    +    def __init__( self, expr, stopOn=None):
    +        super(_MultipleMatch, self).__init__(expr)
    +        self.saveAsList = True
    +        ender = stopOn
    +        if isinstance(ender, basestring):
    +            ender = ParserElement._literalStringClass(ender)
    +        self.not_ender = ~ender if ender is not None else None
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        self_expr_parse = self.expr._parse
    +        self_skip_ignorables = self._skipIgnorables
    +        check_ender = self.not_ender is not None
    +        if check_ender:
    +            try_not_ender = self.not_ender.tryParse
    +        
    +        # must be at least one (but first see if we are the stopOn sentinel;
    +        # if so, fail)
    +        if check_ender:
    +            try_not_ender(instring, loc)
    +        loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False )
    +        try:
    +            hasIgnoreExprs = (not not self.ignoreExprs)
    +            while 1:
    +                if check_ender:
    +                    try_not_ender(instring, loc)
    +                if hasIgnoreExprs:
    +                    preloc = self_skip_ignorables( instring, loc )
    +                else:
    +                    preloc = loc
    +                loc, tmptokens = self_expr_parse( instring, preloc, doActions )
    +                if tmptokens or tmptokens.haskeys():
    +                    tokens += tmptokens
    +        except (ParseException,IndexError):
    +            pass
    +
    +        return loc, tokens
    +        
    +class OneOrMore(_MultipleMatch):
    +    """
    +    Repetition of one or more of the given expression.
    +    
    +    Parameters:
    +     - expr - expression that must match one or more times
    +     - stopOn - (default=C{None}) - expression for a terminating sentinel
    +          (only required if the sentinel would ordinarily match the repetition 
    +          expression)          
    +
    +    Example::
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    +
    +        text = "shape: SQUARE posn: upper left color: BLACK"
    +        OneOrMore(attr_expr).parseString(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]
    +
    +        # use stopOn attribute for OneOrMore to avoid reading label string as part of the data
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        OneOrMore(attr_expr).parseString(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]
    +        
    +        # could also be written as
    +        (attr_expr * (1,)).parseString(text).pprint()
    +    """
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + _ustr(self.expr) + "}..."
    +
    +        return self.strRepr
    +
    +class ZeroOrMore(_MultipleMatch):
    +    """
    +    Optional repetition of zero or more of the given expression.
    +    
    +    Parameters:
    +     - expr - expression that must match zero or more times
    +     - stopOn - (default=C{None}) - expression for a terminating sentinel
    +          (only required if the sentinel would ordinarily match the repetition 
    +          expression)          
    +
    +    Example: similar to L{OneOrMore}
    +    """
    +    def __init__( self, expr, stopOn=None):
    +        super(ZeroOrMore,self).__init__(expr, stopOn=stopOn)
    +        self.mayReturnEmpty = True
    +        
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        try:
    +            return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
    +        except (ParseException,IndexError):
    +            return loc, []
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "[" + _ustr(self.expr) + "]..."
    +
    +        return self.strRepr
    +
    +class _NullToken(object):
    +    def __bool__(self):
    +        return False
    +    __nonzero__ = __bool__
    +    def __str__(self):
    +        return ""
    +
    +_optionalNotMatched = _NullToken()
    +class Optional(ParseElementEnhance):
    +    """
    +    Optional matching of the given expression.
    +
    +    Parameters:
    +     - expr - expression that must match zero or more times
    +     - default (optional) - value to be returned if the optional expression is not found.
    +
    +    Example::
    +        # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
    +        zip = Combine(Word(nums, exact=5) + Optional('-' + Word(nums, exact=4)))
    +        zip.runTests('''
    +            # traditional ZIP code
    +            12345
    +            
    +            # ZIP+4 form
    +            12101-0001
    +            
    +            # invalid ZIP
    +            98765-
    +            ''')
    +    prints::
    +        # traditional ZIP code
    +        12345
    +        ['12345']
    +
    +        # ZIP+4 form
    +        12101-0001
    +        ['12101-0001']
    +
    +        # invalid ZIP
    +        98765-
    +             ^
    +        FAIL: Expected end of text (at char 5), (line:1, col:6)
    +    """
    +    def __init__( self, expr, default=_optionalNotMatched ):
    +        super(Optional,self).__init__( expr, savelist=False )
    +        self.saveAsList = self.expr.saveAsList
    +        self.defaultValue = default
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        try:
    +            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
    +        except (ParseException,IndexError):
    +            if self.defaultValue is not _optionalNotMatched:
    +                if self.expr.resultsName:
    +                    tokens = ParseResults([ self.defaultValue ])
    +                    tokens[self.expr.resultsName] = self.defaultValue
    +                else:
    +                    tokens = [ self.defaultValue ]
    +            else:
    +                tokens = []
    +        return loc, tokens
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "[" + _ustr(self.expr) + "]"
    +
    +        return self.strRepr
    +
    +class SkipTo(ParseElementEnhance):
    +    """
    +    Token for skipping over all undefined text until the matched expression is found.
    +
    +    Parameters:
    +     - expr - target expression marking the end of the data to be skipped
    +     - include - (default=C{False}) if True, the target expression is also parsed 
    +          (the skipped text and target expression are returned as a 2-element list).
    +     - ignore - (default=C{None}) used to define grammars (typically quoted strings and 
    +          comments) that might contain false matches to the target expression
    +     - failOn - (default=C{None}) define expressions that are not allowed to be 
    +          included in the skipped test; if found before the target expression is found, 
    +          the SkipTo is not a match
    +
    +    Example::
    +        report = '''
    +            Outstanding Issues Report - 1 Jan 2000
    +
    +               # | Severity | Description                               |  Days Open
    +            -----+----------+-------------------------------------------+-----------
    +             101 | Critical | Intermittent system crash                 |          6
    +              94 | Cosmetic | Spelling error on Login ('log|n')         |         14
    +              79 | Minor    | System slow when running too many reports |         47
    +            '''
    +        integer = Word(nums)
    +        SEP = Suppress('|')
    +        # use SkipTo to simply match everything up until the next SEP
    +        # - ignore quoted strings, so that a '|' character inside a quoted string does not match
    +        # - parse action will call token.strip() for each matched token, i.e., the description body
    +        string_data = SkipTo(SEP, ignore=quotedString)
    +        string_data.setParseAction(tokenMap(str.strip))
    +        ticket_expr = (integer("issue_num") + SEP 
    +                      + string_data("sev") + SEP 
    +                      + string_data("desc") + SEP 
    +                      + integer("days_open"))
    +        
    +        for tkt in ticket_expr.searchString(report):
    +            print tkt.dump()
    +    prints::
    +        ['101', 'Critical', 'Intermittent system crash', '6']
    +        - days_open: 6
    +        - desc: Intermittent system crash
    +        - issue_num: 101
    +        - sev: Critical
    +        ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
    +        - days_open: 14
    +        - desc: Spelling error on Login ('log|n')
    +        - issue_num: 94
    +        - sev: Cosmetic
    +        ['79', 'Minor', 'System slow when running too many reports', '47']
    +        - days_open: 47
    +        - desc: System slow when running too many reports
    +        - issue_num: 79
    +        - sev: Minor
    +    """
    +    def __init__( self, other, include=False, ignore=None, failOn=None ):
    +        super( SkipTo, self ).__init__( other )
    +        self.ignoreExpr = ignore
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +        self.includeMatch = include
    +        self.asList = False
    +        if isinstance(failOn, basestring):
    +            self.failOn = ParserElement._literalStringClass(failOn)
    +        else:
    +            self.failOn = failOn
    +        self.errmsg = "No match found for "+_ustr(self.expr)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        startloc = loc
    +        instrlen = len(instring)
    +        expr = self.expr
    +        expr_parse = self.expr._parse
    +        self_failOn_canParseNext = self.failOn.canParseNext if self.failOn is not None else None
    +        self_ignoreExpr_tryParse = self.ignoreExpr.tryParse if self.ignoreExpr is not None else None
    +        
    +        tmploc = loc
    +        while tmploc <= instrlen:
    +            if self_failOn_canParseNext is not None:
    +                # break if failOn expression matches
    +                if self_failOn_canParseNext(instring, tmploc):
    +                    break
    +                    
    +            if self_ignoreExpr_tryParse is not None:
    +                # advance past ignore expressions
    +                while 1:
    +                    try:
    +                        tmploc = self_ignoreExpr_tryParse(instring, tmploc)
    +                    except ParseBaseException:
    +                        break
    +            
    +            try:
    +                expr_parse(instring, tmploc, doActions=False, callPreParse=False)
    +            except (ParseException, IndexError):
    +                # no match, advance loc in string
    +                tmploc += 1
    +            else:
    +                # matched skipto expr, done
    +                break
    +
    +        else:
    +            # ran off the end of the input string without matching skipto expr, fail
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        # build up return values
    +        loc = tmploc
    +        skiptext = instring[startloc:loc]
    +        skipresult = ParseResults(skiptext)
    +        
    +        if self.includeMatch:
    +            loc, mat = expr_parse(instring,loc,doActions,callPreParse=False)
    +            skipresult += mat
    +
    +        return loc, skipresult
    +
    +class Forward(ParseElementEnhance):
    +    """
    +    Forward declaration of an expression to be defined later -
    +    used for recursive grammars, such as algebraic infix notation.
    +    When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator.
    +
    +    Note: take care when assigning to C{Forward} not to overlook precedence of operators.
    +    Specifically, '|' has a lower precedence than '<<', so that::
    +        fwdExpr << a | b | c
    +    will actually be evaluated as::
    +        (fwdExpr << a) | b | c
    +    thereby leaving b and c out as parseable alternatives.  It is recommended that you
    +    explicitly group the values inserted into the C{Forward}::
    +        fwdExpr << (a | b | c)
    +    Converting to use the '<<=' operator instead will avoid this problem.
    +
    +    See L{ParseResults.pprint} for an example of a recursive parser created using
    +    C{Forward}.
    +    """
    +    def __init__( self, other=None ):
    +        super(Forward,self).__init__( other, savelist=False )
    +
    +    def __lshift__( self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass(other)
    +        self.expr = other
    +        self.strRepr = None
    +        self.mayIndexError = self.expr.mayIndexError
    +        self.mayReturnEmpty = self.expr.mayReturnEmpty
    +        self.setWhitespaceChars( self.expr.whiteChars )
    +        self.skipWhitespace = self.expr.skipWhitespace
    +        self.saveAsList = self.expr.saveAsList
    +        self.ignoreExprs.extend(self.expr.ignoreExprs)
    +        return self
    +        
    +    def __ilshift__(self, other):
    +        return self << other
    +    
    +    def leaveWhitespace( self ):
    +        self.skipWhitespace = False
    +        return self
    +
    +    def streamline( self ):
    +        if not self.streamlined:
    +            self.streamlined = True
    +            if self.expr is not None:
    +                self.expr.streamline()
    +        return self
    +
    +    def validate( self, validateTrace=[] ):
    +        if self not in validateTrace:
    +            tmp = validateTrace[:]+[self]
    +            if self.expr is not None:
    +                self.expr.validate(tmp)
    +        self.checkRecursion([])
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +        return self.__class__.__name__ + ": ..."
    +
    +        # stubbed out for now - creates awful memory and perf issues
    +        self._revertClass = self.__class__
    +        self.__class__ = _ForwardNoRecurse
    +        try:
    +            if self.expr is not None:
    +                retString = _ustr(self.expr)
    +            else:
    +                retString = "None"
    +        finally:
    +            self.__class__ = self._revertClass
    +        return self.__class__.__name__ + ": " + retString
    +
    +    def copy(self):
    +        if self.expr is not None:
    +            return super(Forward,self).copy()
    +        else:
    +            ret = Forward()
    +            ret <<= self
    +            return ret
    +
    +class _ForwardNoRecurse(Forward):
    +    def __str__( self ):
    +        return "..."
    +
    +class TokenConverter(ParseElementEnhance):
    +    """
    +    Abstract subclass of C{ParseExpression}, for converting parsed results.
    +    """
    +    def __init__( self, expr, savelist=False ):
    +        super(TokenConverter,self).__init__( expr )#, savelist )
    +        self.saveAsList = False
    +
    +class Combine(TokenConverter):
    +    """
    +    Converter to concatenate all matching tokens to a single string.
    +    By default, the matching patterns must also be contiguous in the input string;
    +    this can be disabled by specifying C{'adjacent=False'} in the constructor.
    +
    +    Example::
    +        real = Word(nums) + '.' + Word(nums)
    +        print(real.parseString('3.1416')) # -> ['3', '.', '1416']
    +        # will also erroneously match the following
    +        print(real.parseString('3. 1416')) # -> ['3', '.', '1416']
    +
    +        real = Combine(Word(nums) + '.' + Word(nums))
    +        print(real.parseString('3.1416')) # -> ['3.1416']
    +        # no match when there are internal spaces
    +        print(real.parseString('3. 1416')) # -> Exception: Expected W:(0123...)
    +    """
    +    def __init__( self, expr, joinString="", adjacent=True ):
    +        super(Combine,self).__init__( expr )
    +        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself
    +        if adjacent:
    +            self.leaveWhitespace()
    +        self.adjacent = adjacent
    +        self.skipWhitespace = True
    +        self.joinString = joinString
    +        self.callPreparse = True
    +
    +    def ignore( self, other ):
    +        if self.adjacent:
    +            ParserElement.ignore(self, other)
    +        else:
    +            super( Combine, self).ignore( other )
    +        return self
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        retToks = tokenlist.copy()
    +        del retToks[:]
    +        retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults)
    +
    +        if self.resultsName and retToks.haskeys():
    +            return [ retToks ]
    +        else:
    +            return retToks
    +
    +class Group(TokenConverter):
    +    """
    +    Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.
    +
    +    Example::
    +        ident = Word(alphas)
    +        num = Word(nums)
    +        term = ident | num
    +        func = ident + Optional(delimitedList(term))
    +        print(func.parseString("fn a,b,100"))  # -> ['fn', 'a', 'b', '100']
    +
    +        func = ident + Group(Optional(delimitedList(term)))
    +        print(func.parseString("fn a,b,100"))  # -> ['fn', ['a', 'b', '100']]
    +    """
    +    def __init__( self, expr ):
    +        super(Group,self).__init__( expr )
    +        self.saveAsList = True
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        return [ tokenlist ]
    +
    +class Dict(TokenConverter):
    +    """
    +    Converter to return a repetitive expression as a list, but also as a dictionary.
    +    Each element can also be referenced using the first token in the expression as its key.
    +    Useful for tabular report scraping when the first column can be used as a item key.
    +
    +    Example::
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    +
    +        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    +        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        
    +        # print attributes as plain groups
    +        print(OneOrMore(attr_expr).parseString(text).dump())
    +        
    +        # instead of OneOrMore(expr), parse using Dict(OneOrMore(Group(expr))) - Dict will auto-assign names
    +        result = Dict(OneOrMore(Group(attr_expr))).parseString(text)
    +        print(result.dump())
    +        
    +        # access named fields as dict entries, or output as dict
    +        print(result['shape'])        
    +        print(result.asDict())
    +    prints::
    +        ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap']
    +
    +        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    +        - color: light blue
    +        - posn: upper left
    +        - shape: SQUARE
    +        - texture: burlap
    +        SQUARE
    +        {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'}
    +    See more examples at L{ParseResults} of accessing fields by results name.
    +    """
    +    def __init__( self, expr ):
    +        super(Dict,self).__init__( expr )
    +        self.saveAsList = True
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        for i,tok in enumerate(tokenlist):
    +            if len(tok) == 0:
    +                continue
    +            ikey = tok[0]
    +            if isinstance(ikey,int):
    +                ikey = _ustr(tok[0]).strip()
    +            if len(tok)==1:
    +                tokenlist[ikey] = _ParseResultsWithOffset("",i)
    +            elif len(tok)==2 and not isinstance(tok[1],ParseResults):
    +                tokenlist[ikey] = _ParseResultsWithOffset(tok[1],i)
    +            else:
    +                dictvalue = tok.copy() #ParseResults(i)
    +                del dictvalue[0]
    +                if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.haskeys()):
    +                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue,i)
    +                else:
    +                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0],i)
    +
    +        if self.resultsName:
    +            return [ tokenlist ]
    +        else:
    +            return tokenlist
    +
    +
    +class Suppress(TokenConverter):
    +    """
    +    Converter for ignoring the results of a parsed expression.
    +
    +    Example::
    +        source = "a, b, c,d"
    +        wd = Word(alphas)
    +        wd_list1 = wd + ZeroOrMore(',' + wd)
    +        print(wd_list1.parseString(source))
    +
    +        # often, delimiters that are useful during parsing are just in the
    +        # way afterward - use Suppress to keep them out of the parsed output
    +        wd_list2 = wd + ZeroOrMore(Suppress(',') + wd)
    +        print(wd_list2.parseString(source))
    +    prints::
    +        ['a', ',', 'b', ',', 'c', ',', 'd']
    +        ['a', 'b', 'c', 'd']
    +    (See also L{delimitedList}.)
    +    """
    +    def postParse( self, instring, loc, tokenlist ):
    +        return []
    +
    +    def suppress( self ):
    +        return self
    +
    +
    +class OnlyOnce(object):
    +    """
    +    Wrapper for parse actions, to ensure they are only called once.
    +    """
    +    def __init__(self, methodCall):
    +        self.callable = _trim_arity(methodCall)
    +        self.called = False
    +    def __call__(self,s,l,t):
    +        if not self.called:
    +            results = self.callable(s,l,t)
    +            self.called = True
    +            return results
    +        raise ParseException(s,l,"")
    +    def reset(self):
    +        self.called = False
    +
    +def traceParseAction(f):
    +    """
    +    Decorator for debugging parse actions. 
    +    
    +    When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
    +    When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
    +
    +    Example::
    +        wd = Word(alphas)
    +
    +        @traceParseAction
    +        def remove_duplicate_chars(tokens):
    +            return ''.join(sorted(set(''.join(tokens)))
    +
    +        wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)
    +        print(wds.parseString("slkdjs sld sldd sdlf sdljf"))
    +    prints::
    +        >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
    +        <3:
    +            thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc
    +        sys.stderr.write( ">>entering %s(line: '%s', %d, %r)\n" % (thisFunc,line(l,s),l,t) )
    +        try:
    +            ret = f(*paArgs)
    +        except Exception as exc:
    +            sys.stderr.write( "< ['aa', 'bb', 'cc']
    +        delimitedList(Word(hexnums), delim=':', combine=True).parseString("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
    +    """
    +    dlName = _ustr(expr)+" ["+_ustr(delim)+" "+_ustr(expr)+"]..."
    +    if combine:
    +        return Combine( expr + ZeroOrMore( delim + expr ) ).setName(dlName)
    +    else:
    +        return ( expr + ZeroOrMore( Suppress( delim ) + expr ) ).setName(dlName)
    +
    +def countedArray( expr, intExpr=None ):
    +    """
    +    Helper to define a counted list of expressions.
    +    This helper defines a pattern of the form::
    +        integer expr expr expr...
    +    where the leading integer tells how many expr expressions follow.
    +    The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed.
    +    
    +    If C{intExpr} is specified, it should be a pyparsing expression that produces an integer value.
    +
    +    Example::
    +        countedArray(Word(alphas)).parseString('2 ab cd ef')  # -> ['ab', 'cd']
    +
    +        # in this parser, the leading integer value is given in binary,
    +        # '10' indicating that 2 values are in the array
    +        binaryConstant = Word('01').setParseAction(lambda t: int(t[0], 2))
    +        countedArray(Word(alphas), intExpr=binaryConstant).parseString('10 ab cd ef')  # -> ['ab', 'cd']
    +    """
    +    arrayExpr = Forward()
    +    def countFieldParseAction(s,l,t):
    +        n = t[0]
    +        arrayExpr << (n and Group(And([expr]*n)) or Group(empty))
    +        return []
    +    if intExpr is None:
    +        intExpr = Word(nums).setParseAction(lambda t:int(t[0]))
    +    else:
    +        intExpr = intExpr.copy()
    +    intExpr.setName("arrayLen")
    +    intExpr.addParseAction(countFieldParseAction, callDuringTry=True)
    +    return ( intExpr + arrayExpr ).setName('(len) ' + _ustr(expr) + '...')
    +
    +def _flatten(L):
    +    ret = []
    +    for i in L:
    +        if isinstance(i,list):
    +            ret.extend(_flatten(i))
    +        else:
    +            ret.append(i)
    +    return ret
    +
    +def matchPreviousLiteral(expr):
    +    """
    +    Helper to define an expression that is indirectly defined from
    +    the tokens matched in a previous expression, that is, it looks
    +    for a 'repeat' of a previous expression.  For example::
    +        first = Word(nums)
    +        second = matchPreviousLiteral(first)
    +        matchExpr = first + ":" + second
    +    will match C{"1:1"}, but not C{"1:2"}.  Because this matches a
    +    previous literal, will also match the leading C{"1:1"} in C{"1:10"}.
    +    If this is not desired, use C{matchPreviousExpr}.
    +    Do I{not} use with packrat parsing enabled.
    +    """
    +    rep = Forward()
    +    def copyTokenToRepeater(s,l,t):
    +        if t:
    +            if len(t) == 1:
    +                rep << t[0]
    +            else:
    +                # flatten t tokens
    +                tflat = _flatten(t.asList())
    +                rep << And(Literal(tt) for tt in tflat)
    +        else:
    +            rep << Empty()
    +    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    +    rep.setName('(prev) ' + _ustr(expr))
    +    return rep
    +
    +def matchPreviousExpr(expr):
    +    """
    +    Helper to define an expression that is indirectly defined from
    +    the tokens matched in a previous expression, that is, it looks
    +    for a 'repeat' of a previous expression.  For example::
    +        first = Word(nums)
    +        second = matchPreviousExpr(first)
    +        matchExpr = first + ":" + second
    +    will match C{"1:1"}, but not C{"1:2"}.  Because this matches by
    +    expressions, will I{not} match the leading C{"1:1"} in C{"1:10"};
    +    the expressions are evaluated first, and then compared, so
    +    C{"1"} is compared with C{"10"}.
    +    Do I{not} use with packrat parsing enabled.
    +    """
    +    rep = Forward()
    +    e2 = expr.copy()
    +    rep <<= e2
    +    def copyTokenToRepeater(s,l,t):
    +        matchTokens = _flatten(t.asList())
    +        def mustMatchTheseTokens(s,l,t):
    +            theseTokens = _flatten(t.asList())
    +            if  theseTokens != matchTokens:
    +                raise ParseException("",0,"")
    +        rep.setParseAction( mustMatchTheseTokens, callDuringTry=True )
    +    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    +    rep.setName('(prev) ' + _ustr(expr))
    +    return rep
    +
    +def _escapeRegexRangeChars(s):
    +    #~  escape these chars: ^-]
    +    for c in r"\^-]":
    +        s = s.replace(c,_bslash+c)
    +    s = s.replace("\n",r"\n")
    +    s = s.replace("\t",r"\t")
    +    return _ustr(s)
    +
    +def oneOf( strs, caseless=False, useRegex=True ):
    +    """
    +    Helper to quickly define a set of alternative Literals, and makes sure to do
    +    longest-first testing when there is a conflict, regardless of the input order,
    +    but returns a C{L{MatchFirst}} for best performance.
    +
    +    Parameters:
    +     - strs - a string of space-delimited literals, or a collection of string literals
    +     - caseless - (default=C{False}) - treat all literals as caseless
    +     - useRegex - (default=C{True}) - as an optimization, will generate a Regex
    +          object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or
    +          if creating a C{Regex} raises an exception)
    +
    +    Example::
    +        comp_oper = oneOf("< = > <= >= !=")
    +        var = Word(alphas)
    +        number = Word(nums)
    +        term = var | number
    +        comparison_expr = term + comp_oper + term
    +        print(comparison_expr.searchString("B = 12  AA=23 B<=AA AA>12"))
    +    prints::
    +        [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
    +    """
    +    if caseless:
    +        isequal = ( lambda a,b: a.upper() == b.upper() )
    +        masks = ( lambda a,b: b.upper().startswith(a.upper()) )
    +        parseElementClass = CaselessLiteral
    +    else:
    +        isequal = ( lambda a,b: a == b )
    +        masks = ( lambda a,b: b.startswith(a) )
    +        parseElementClass = Literal
    +
    +    symbols = []
    +    if isinstance(strs,basestring):
    +        symbols = strs.split()
    +    elif isinstance(strs, collections.Iterable):
    +        symbols = list(strs)
    +    else:
    +        warnings.warn("Invalid argument to oneOf, expected string or iterable",
    +                SyntaxWarning, stacklevel=2)
    +    if not symbols:
    +        return NoMatch()
    +
    +    i = 0
    +    while i < len(symbols)-1:
    +        cur = symbols[i]
    +        for j,other in enumerate(symbols[i+1:]):
    +            if ( isequal(other, cur) ):
    +                del symbols[i+j+1]
    +                break
    +            elif ( masks(cur, other) ):
    +                del symbols[i+j+1]
    +                symbols.insert(i,other)
    +                cur = other
    +                break
    +        else:
    +            i += 1
    +
    +    if not caseless and useRegex:
    +        #~ print (strs,"->", "|".join( [ _escapeRegexChars(sym) for sym in symbols] ))
    +        try:
    +            if len(symbols)==len("".join(symbols)):
    +                return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ).setName(' | '.join(symbols))
    +            else:
    +                return Regex( "|".join(re.escape(sym) for sym in symbols) ).setName(' | '.join(symbols))
    +        except Exception:
    +            warnings.warn("Exception creating Regex for oneOf, building MatchFirst",
    +                    SyntaxWarning, stacklevel=2)
    +
    +
    +    # last resort, just use MatchFirst
    +    return MatchFirst(parseElementClass(sym) for sym in symbols).setName(' | '.join(symbols))
    +
    +def dictOf( key, value ):
    +    """
    +    Helper to easily and clearly define a dictionary by specifying the respective patterns
    +    for the key and value.  Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens
    +    in the proper order.  The key pattern can include delimiting markers or punctuation,
    +    as long as they are suppressed, thereby leaving the significant key text.  The value
    +    pattern can include named results, so that the C{Dict} results can include named token
    +    fields.
    +
    +    Example::
    +        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    +        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        print(OneOrMore(attr_expr).parseString(text).dump())
    +        
    +        attr_label = label
    +        attr_value = Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)
    +
    +        # similar to Dict, but simpler call format
    +        result = dictOf(attr_label, attr_value).parseString(text)
    +        print(result.dump())
    +        print(result['shape'])
    +        print(result.shape)  # object attribute access works too
    +        print(result.asDict())
    +    prints::
    +        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    +        - color: light blue
    +        - posn: upper left
    +        - shape: SQUARE
    +        - texture: burlap
    +        SQUARE
    +        SQUARE
    +        {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
    +    """
    +    return Dict( ZeroOrMore( Group ( key + value ) ) )
    +
    +def originalTextFor(expr, asString=True):
    +    """
    +    Helper to return the original, untokenized text for a given expression.  Useful to
    +    restore the parsed fields of an HTML start tag into the raw tag text itself, or to
    +    revert separate tokens with intervening whitespace back to the original matching
    +    input text. By default, returns astring containing the original parsed text.  
    +       
    +    If the optional C{asString} argument is passed as C{False}, then the return value is a 
    +    C{L{ParseResults}} containing any results names that were originally matched, and a 
    +    single token containing the original matched text from the input string.  So if 
    +    the expression passed to C{L{originalTextFor}} contains expressions with defined
    +    results names, you must set C{asString} to C{False} if you want to preserve those
    +    results name values.
    +
    +    Example::
    +        src = "this is test  bold text  normal text "
    +        for tag in ("b","i"):
    +            opener,closer = makeHTMLTags(tag)
    +            patt = originalTextFor(opener + SkipTo(closer) + closer)
    +            print(patt.searchString(src)[0])
    +    prints::
    +        [' bold text ']
    +        ['text']
    +    """
    +    locMarker = Empty().setParseAction(lambda s,loc,t: loc)
    +    endlocMarker = locMarker.copy()
    +    endlocMarker.callPreparse = False
    +    matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end")
    +    if asString:
    +        extractText = lambda s,l,t: s[t._original_start:t._original_end]
    +    else:
    +        def extractText(s,l,t):
    +            t[:] = [s[t.pop('_original_start'):t.pop('_original_end')]]
    +    matchExpr.setParseAction(extractText)
    +    matchExpr.ignoreExprs = expr.ignoreExprs
    +    return matchExpr
    +
    +def ungroup(expr): 
    +    """
    +    Helper to undo pyparsing's default grouping of And expressions, even
    +    if all but one are non-empty.
    +    """
    +    return TokenConverter(expr).setParseAction(lambda t:t[0])
    +
    +def locatedExpr(expr):
    +    """
    +    Helper to decorate a returned token with its starting and ending locations in the input string.
    +    This helper adds the following results names:
    +     - locn_start = location where matched expression begins
    +     - locn_end = location where matched expression ends
    +     - value = the actual parsed results
    +
    +    Be careful if the input text contains C{} characters, you may want to call
    +    C{L{ParserElement.parseWithTabs}}
    +
    +    Example::
    +        wd = Word(alphas)
    +        for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"):
    +            print(match)
    +    prints::
    +        [[0, 'ljsdf', 5]]
    +        [[8, 'lksdjjf', 15]]
    +        [[18, 'lkkjj', 23]]
    +    """
    +    locator = Empty().setParseAction(lambda s,l,t: l)
    +    return Group(locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end"))
    +
    +
    +# convenience constants for positional expressions
    +empty       = Empty().setName("empty")
    +lineStart   = LineStart().setName("lineStart")
    +lineEnd     = LineEnd().setName("lineEnd")
    +stringStart = StringStart().setName("stringStart")
    +stringEnd   = StringEnd().setName("stringEnd")
    +
    +_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
    +_escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))
    +_escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))
    +_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)
    +_charRange = Group(_singleChar + Suppress("-") + _singleChar)
    +_reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
    +
    +def srange(s):
    +    r"""
    +    Helper to easily define string ranges for use in Word construction.  Borrows
    +    syntax from regexp '[]' string range definitions::
    +        srange("[0-9]")   -> "0123456789"
    +        srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
    +        srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
    +    The input string must be enclosed in []'s, and the returned string is the expanded
    +    character set joined into a single string.
    +    The values enclosed in the []'s may be:
    +     - a single character
    +     - an escaped character with a leading backslash (such as C{\-} or C{\]})
    +     - an escaped hex character with a leading C{'\x'} (C{\x21}, which is a C{'!'} character) 
    +         (C{\0x##} is also supported for backwards compatibility) 
    +     - an escaped octal character with a leading C{'\0'} (C{\041}, which is a C{'!'} character)
    +     - a range of any of the above, separated by a dash (C{'a-z'}, etc.)
    +     - any combination of the above (C{'aeiouy'}, C{'a-zA-Z0-9_$'}, etc.)
    +    """
    +    _expanded = lambda p: p if not isinstance(p,ParseResults) else ''.join(unichr(c) for c in range(ord(p[0]),ord(p[1])+1))
    +    try:
    +        return "".join(_expanded(part) for part in _reBracketExpr.parseString(s).body)
    +    except Exception:
    +        return ""
    +
    +def matchOnlyAtCol(n):
    +    """
    +    Helper method for defining parse actions that require matching at a specific
    +    column in the input text.
    +    """
    +    def verifyCol(strg,locn,toks):
    +        if col(locn,strg) != n:
    +            raise ParseException(strg,locn,"matched token not at column %d" % n)
    +    return verifyCol
    +
    +def replaceWith(replStr):
    +    """
    +    Helper method for common parse actions that simply return a literal value.  Especially
    +    useful when used with C{L{transformString}()}.
    +
    +    Example::
    +        num = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +        na = oneOf("N/A NA").setParseAction(replaceWith(math.nan))
    +        term = na | num
    +        
    +        OneOrMore(term).parseString("324 234 N/A 234") # -> [324, 234, nan, 234]
    +    """
    +    return lambda s,l,t: [replStr]
    +
    +def removeQuotes(s,l,t):
    +    """
    +    Helper parse action for removing quotation marks from parsed quoted strings.
    +
    +    Example::
    +        # by default, quotation marks are included in parsed results
    +        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]
    +
    +        # use removeQuotes to strip quotation marks from parsed results
    +        quotedString.setParseAction(removeQuotes)
    +        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
    +    """
    +    return t[0][1:-1]
    +
    +def tokenMap(func, *args):
    +    """
    +    Helper to define a parse action by mapping a function to all elements of a ParseResults list.If any additional 
    +    args are passed, they are forwarded to the given function as additional arguments after
    +    the token, as in C{hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))}, which will convert the
    +    parsed data to an integer using base 16.
    +
    +    Example (compare the last to example in L{ParserElement.transformString}::
    +        hex_ints = OneOrMore(Word(hexnums)).setParseAction(tokenMap(int, 16))
    +        hex_ints.runTests('''
    +            00 11 22 aa FF 0a 0d 1a
    +            ''')
    +        
    +        upperword = Word(alphas).setParseAction(tokenMap(str.upper))
    +        OneOrMore(upperword).runTests('''
    +            my kingdom for a horse
    +            ''')
    +
    +        wd = Word(alphas).setParseAction(tokenMap(str.title))
    +        OneOrMore(wd).setParseAction(' '.join).runTests('''
    +            now is the winter of our discontent made glorious summer by this sun of york
    +            ''')
    +    prints::
    +        00 11 22 aa FF 0a 0d 1a
    +        [0, 17, 34, 170, 255, 10, 13, 26]
    +
    +        my kingdom for a horse
    +        ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']
    +
    +        now is the winter of our discontent made glorious summer by this sun of york
    +        ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']
    +    """
    +    def pa(s,l,t):
    +        return [func(tokn, *args) for tokn in t]
    +
    +    try:
    +        func_name = getattr(func, '__name__', 
    +                            getattr(func, '__class__').__name__)
    +    except Exception:
    +        func_name = str(func)
    +    pa.__name__ = func_name
    +
    +    return pa
    +
    +upcaseTokens = tokenMap(lambda t: _ustr(t).upper())
    +"""(Deprecated) Helper parse action to convert tokens to upper case. Deprecated in favor of L{pyparsing_common.upcaseTokens}"""
    +
    +downcaseTokens = tokenMap(lambda t: _ustr(t).lower())
    +"""(Deprecated) Helper parse action to convert tokens to lower case. Deprecated in favor of L{pyparsing_common.downcaseTokens}"""
    +    
    +def _makeTags(tagStr, xml):
    +    """Internal helper to construct opening and closing tag expressions, given a tag name"""
    +    if isinstance(tagStr,basestring):
    +        resname = tagStr
    +        tagStr = Keyword(tagStr, caseless=not xml)
    +    else:
    +        resname = tagStr.name
    +
    +    tagAttrName = Word(alphas,alphanums+"_-:")
    +    if (xml):
    +        tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )
    +        openTag = Suppress("<") + tagStr("tag") + \
    +                Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \
    +                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    +    else:
    +        printablesLessRAbrack = "".join(c for c in printables if c not in ">")
    +        tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack)
    +        openTag = Suppress("<") + tagStr("tag") + \
    +                Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \
    +                Optional( Suppress("=") + tagAttrValue ) ))) + \
    +                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    +    closeTag = Combine(_L("")
    +
    +    openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % resname)
    +    closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % resname)
    +    openTag.tag = resname
    +    closeTag.tag = resname
    +    return openTag, closeTag
    +
    +def makeHTMLTags(tagStr):
    +    """
    +    Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches
    +    tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values.
    +
    +    Example::
    +        text = 'More info at the pyparsing wiki page'
    +        # makeHTMLTags returns pyparsing expressions for the opening and closing tags as a 2-tuple
    +        a,a_end = makeHTMLTags("A")
    +        link_expr = a + SkipTo(a_end)("link_text") + a_end
    +        
    +        for link in link_expr.searchString(text):
    +            # attributes in the  tag (like "href" shown here) are also accessible as named results
    +            print(link.link_text, '->', link.href)
    +    prints::
    +        pyparsing -> http://pyparsing.wikispaces.com
    +    """
    +    return _makeTags( tagStr, False )
    +
    +def makeXMLTags(tagStr):
    +    """
    +    Helper to construct opening and closing tag expressions for XML, given a tag name. Matches
    +    tags only in the given upper/lower case.
    +
    +    Example: similar to L{makeHTMLTags}
    +    """
    +    return _makeTags( tagStr, True )
    +
    +def withAttribute(*args,**attrDict):
    +    """
    +    Helper to create a validating parse action to be used with start tags created
    +    with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag
    +    with a required attribute value, to avoid false matches on common tags such as
    +    C{} or C{
    }. + + Call C{withAttribute} with a series of attribute names and values. Specify the list + of filter attributes names and values as: + - keyword arguments, as in C{(align="right")}, or + - as an explicit dict with C{**} operator, when an attribute name is also a Python + reserved word, as in C{**{"class":"Customer", "align":"right"}} + - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) + For attribute names with a namespace prefix, you must use the second form. Attribute + names are matched insensitive to upper/lower case. + + If just testing for C{class} (with or without a namespace), use C{L{withClass}}. + + To verify that the attribute exists, but without specifying a value, pass + C{withAttribute.ANY_VALUE} as the value. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this has no type
    +
    + + ''' + div,div_end = makeHTMLTags("div") + + # only match div tag having a type attribute with value "grid" + div_grid = div().setParseAction(withAttribute(type="grid")) + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + # construct a match with any div tag having a type attribute, regardless of the value + div_any_type = div().setParseAction(withAttribute(type=withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ + if args: + attrs = args[:] + else: + attrs = attrDict.items() + attrs = [(k,v) for k,v in attrs] + def pa(s,l,tokens): + for attrName,attrValue in attrs: + if attrName not in tokens: + raise ParseException(s,l,"no matching attribute " + attrName) + if attrValue != withAttribute.ANY_VALUE and tokens[attrName] != attrValue: + raise ParseException(s,l,"attribute '%s' has value '%s', must be '%s'" % + (attrName, tokens[attrName], attrValue)) + return pa +withAttribute.ANY_VALUE = object() + +def withClass(classname, namespace=''): + """ + Simplified version of C{L{withAttribute}} when matching on a div class - made + difficult because C{class} is a reserved word in Python. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this <div> has no class
    +
    + + ''' + div,div_end = makeHTMLTags("div") + div_grid = div().setParseAction(withClass("grid")) + + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + div_any_type = div().setParseAction(withClass(withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ + classattr = "%s:class" % namespace if namespace else "class" + return withAttribute(**{classattr : classname}) + +opAssoc = _Constants() +opAssoc.LEFT = object() +opAssoc.RIGHT = object() + +def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): + """ + Helper method for constructing grammars of expressions made up of + operators working in a precedence hierarchy. Operators may be unary or + binary, left- or right-associative. Parse actions can also be attached + to operator expressions. The generated parser will also recognize the use + of parentheses to override operator precedences (see example below). + + Note: if you define a deep operator list, you may see performance issues + when using infixNotation. See L{ParserElement.enablePackrat} for a + mechanism to potentially improve your parser performance. + + Parameters: + - baseExpr - expression representing the most basic element for the nested + - opList - list of tuples, one for each operator precedence level in the + expression grammar; each tuple is of the form + (opExpr, numTerms, rightLeftAssoc, parseAction), where: + - opExpr is the pyparsing expression for the operator; + may also be a string, which will be converted to a Literal; + if numTerms is 3, opExpr is a tuple of two expressions, for the + two operators separating the 3 terms + - numTerms is the number of terms for this operator (must + be 1, 2, or 3) + - rightLeftAssoc is the indicator whether the operator is + right or left associative, using the pyparsing-defined + 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) + - lpar - expression for matching left-parentheses (default=C{Suppress('(')}) + - rpar - expression for matching right-parentheses (default=C{Suppress(')')}) + + Example:: + # simple example of four-function arithmetic with ints and variable names + integer = pyparsing_common.signed_integer + varname = pyparsing_common.identifier + + arith_expr = infixNotation(integer | varname, + [ + ('-', 1, opAssoc.RIGHT), + (oneOf('* /'), 2, opAssoc.LEFT), + (oneOf('+ -'), 2, opAssoc.LEFT), + ]) + + arith_expr.runTests(''' + 5+3*6 + (5+3)*6 + -2--11 + ''', fullDump=False) + prints:: + 5+3*6 + [[5, '+', [3, '*', 6]]] + + (5+3)*6 + [[[5, '+', 3], '*', 6]] + + -2--11 + [[['-', 2], '-', ['-', 11]]] + """ + ret = Forward() + lastExpr = baseExpr | ( lpar + ret + rpar ) + for i,operDef in enumerate(opList): + opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] + termName = "%s term" % opExpr if arity < 3 else "%s%s term" % opExpr + if arity == 3: + if opExpr is None or len(opExpr) != 2: + raise ValueError("if numterms=3, opExpr must be a tuple or list of two expressions") + opExpr1, opExpr2 = opExpr + thisExpr = Forward().setName(termName) + if rightLeftAssoc == opAssoc.LEFT: + if arity == 1: + matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + lastExpr) + Group( lastExpr + OneOrMore( opExpr + lastExpr ) ) + else: + matchExpr = FollowedBy(lastExpr+lastExpr) + Group( lastExpr + OneOrMore(lastExpr) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr) + \ + Group( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + elif rightLeftAssoc == opAssoc.RIGHT: + if arity == 1: + # try to avoid LR with this extra test + if not isinstance(opExpr, Optional): + opExpr = Optional(opExpr) + matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + thisExpr) + Group( lastExpr + OneOrMore( opExpr + thisExpr ) ) + else: + matchExpr = FollowedBy(lastExpr + thisExpr) + Group( lastExpr + OneOrMore( thisExpr ) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) + \ + Group( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + else: + raise ValueError("operator must indicate right or left associativity") + if pa: + matchExpr.setParseAction( pa ) + thisExpr <<= ( matchExpr.setName(termName) | lastExpr ) + lastExpr = thisExpr + ret <<= lastExpr + return ret + +operatorPrecedence = infixNotation +"""(Deprecated) Former name of C{L{infixNotation}}, will be dropped in a future release.""" + +dblQuotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"').setName("string enclosed in double quotes") +sglQuotedString = Combine(Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("string enclosed in single quotes") +quotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"'| + Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("quotedString using single or double quotes") +unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal") + +def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()): + """ + Helper method for defining nested lists enclosed in opening and closing + delimiters ("(" and ")" are the default). + + Parameters: + - opener - opening character for a nested list (default=C{"("}); can also be a pyparsing expression + - closer - closing character for a nested list (default=C{")"}); can also be a pyparsing expression + - content - expression for items within the nested lists (default=C{None}) + - ignoreExpr - expression for ignoring opening and closing delimiters (default=C{quotedString}) + + If an expression is not provided for the content argument, the nested + expression will capture all whitespace-delimited content between delimiters + as a list of separate values. + + Use the C{ignoreExpr} argument to define expressions that may contain + opening or closing characters that should not be treated as opening + or closing characters for nesting, such as quotedString or a comment + expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. + The default is L{quotedString}, but if no expressions are to be ignored, + then pass C{None} for this argument. + + Example:: + data_type = oneOf("void int short long char float double") + decl_data_type = Combine(data_type + Optional(Word('*'))) + ident = Word(alphas+'_', alphanums+'_') + number = pyparsing_common.number + arg = Group(decl_data_type + ident) + LPAR,RPAR = map(Suppress, "()") + + code_body = nestedExpr('{', '}', ignoreExpr=(quotedString | cStyleComment)) + + c_function = (decl_data_type("type") + + ident("name") + + LPAR + Optional(delimitedList(arg), [])("args") + RPAR + + code_body("body")) + c_function.ignore(cStyleComment) + + source_code = ''' + int is_odd(int x) { + return (x%2); + } + + int dec_to_hex(char hchar) { + if (hchar >= '0' && hchar <= '9') { + return (ord(hchar)-ord('0')); + } else { + return (10+ord(hchar)-ord('A')); + } + } + ''' + for func in c_function.searchString(source_code): + print("%(name)s (%(type)s) args: %(args)s" % func) + + prints:: + is_odd (int) args: [['int', 'x']] + dec_to_hex (int) args: [['char', 'hchar']] + """ + if opener == closer: + raise ValueError("opening and closing strings cannot be the same") + if content is None: + if isinstance(opener,basestring) and isinstance(closer,basestring): + if len(opener) == 1 and len(closer)==1: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (empty.copy()+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS + ).setParseAction(lambda t:t[0].strip())) + else: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + ~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (Combine(OneOrMore(~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + raise ValueError("opening and closing arguments must be strings if no content expression is given") + ret = Forward() + if ignoreExpr is not None: + ret <<= Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) + else: + ret <<= Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) + ret.setName('nested %s%s expression' % (opener,closer)) + return ret + +def indentedBlock(blockStatementExpr, indentStack, indent=True): + """ + Helper method for defining space-delimited indentation blocks, such as + those used to define block statements in Python source code. + + Parameters: + - blockStatementExpr - expression defining syntax of statement that + is repeated within the indented block + - indentStack - list created by caller to manage indentation stack + (multiple statementWithIndentedBlock expressions within a single grammar + should share a common indentStack) + - indent - boolean indicating whether block must be indented beyond the + the current level; set to False for block of left-most statements + (default=C{True}) + + A valid block must contain at least one C{blockStatement}. + + Example:: + data = ''' + def A(z): + A1 + B = 100 + G = A2 + A2 + A3 + B + def BB(a,b,c): + BB1 + def BBA(): + bba1 + bba2 + bba3 + C + D + def spam(x,y): + def eggs(z): + pass + ''' + + + indentStack = [1] + stmt = Forward() + + identifier = Word(alphas, alphanums) + funcDecl = ("def" + identifier + Group( "(" + Optional( delimitedList(identifier) ) + ")" ) + ":") + func_body = indentedBlock(stmt, indentStack) + funcDef = Group( funcDecl + func_body ) + + rvalue = Forward() + funcCall = Group(identifier + "(" + Optional(delimitedList(rvalue)) + ")") + rvalue << (funcCall | identifier | Word(nums)) + assignment = Group(identifier + "=" + rvalue) + stmt << ( funcDef | assignment | identifier ) + + module_body = OneOrMore(stmt) + + parseTree = module_body.parseString(data) + parseTree.pprint() + prints:: + [['def', + 'A', + ['(', 'z', ')'], + ':', + [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], + 'B', + ['def', + 'BB', + ['(', 'a', 'b', 'c', ')'], + ':', + [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], + 'C', + 'D', + ['def', + 'spam', + ['(', 'x', 'y', ')'], + ':', + [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] + """ + def checkPeerIndent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if curCol != indentStack[-1]: + if curCol > indentStack[-1]: + raise ParseFatalException(s,l,"illegal nesting") + raise ParseException(s,l,"not a peer entry") + + def checkSubIndent(s,l,t): + curCol = col(l,s) + if curCol > indentStack[-1]: + indentStack.append( curCol ) + else: + raise ParseException(s,l,"not a subentry") + + def checkUnindent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): + raise ParseException(s,l,"not an unindent") + indentStack.pop() + + NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) + INDENT = (Empty() + Empty().setParseAction(checkSubIndent)).setName('INDENT') + PEER = Empty().setParseAction(checkPeerIndent).setName('') + UNDENT = Empty().setParseAction(checkUnindent).setName('UNINDENT') + if indent: + smExpr = Group( Optional(NL) + + #~ FollowedBy(blockStatementExpr) + + INDENT + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) + UNDENT) + else: + smExpr = Group( Optional(NL) + + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) + blockStatementExpr.ignore(_bslash + LineEnd()) + return smExpr.setName('indented block') + +alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") +punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") + +anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:").setName('any tag')) +_htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\'')) +commonHTMLEntity = Regex('&(?P' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity") +def replaceHTMLEntity(t): + """Helper parser action to replace common HTML entities with their special characters""" + return _htmlEntityMap.get(t.entity) + +# it's easy to get these comment structures wrong - they're very common, so may as well make them available +cStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/').setName("C style comment") +"Comment of the form C{/* ... */}" + +htmlComment = Regex(r"").setName("HTML comment") +"Comment of the form C{}" + +restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line") +dblSlashComment = Regex(r"//(?:\\\n|[^\n])*").setName("// comment") +"Comment of the form C{// ... (to end of line)}" + +cppStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/'| dblSlashComment).setName("C++ style comment") +"Comment of either form C{L{cStyleComment}} or C{L{dblSlashComment}}" + +javaStyleComment = cppStyleComment +"Same as C{L{cppStyleComment}}" + +pythonStyleComment = Regex(r"#.*").setName("Python style comment") +"Comment of the form C{# ... (to end of line)}" + +_commasepitem = Combine(OneOrMore(Word(printables, excludeChars=',') + + Optional( Word(" \t") + + ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem") +commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") +"""(Deprecated) Predefined expression of 1 or more printable words or quoted strings, separated by commas. + This expression is deprecated in favor of L{pyparsing_common.comma_separated_list}.""" + +# some other useful expressions - using lower-case class name since we are really using this as a namespace +class pyparsing_common: + """ + Here are some common low-level expressions that may be useful in jump-starting parser development: + - numeric forms (L{integers}, L{reals}, L{scientific notation}) + - common L{programming identifiers} + - network addresses (L{MAC}, L{IPv4}, L{IPv6}) + - ISO8601 L{dates} and L{datetime} + - L{UUID} + - L{comma-separated list} + Parse actions: + - C{L{convertToInteger}} + - C{L{convertToFloat}} + - C{L{convertToDate}} + - C{L{convertToDatetime}} + - C{L{stripHTMLTags}} + - C{L{upcaseTokens}} + - C{L{downcaseTokens}} + + Example:: + pyparsing_common.number.runTests(''' + # any int or real number, returned as the appropriate type + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.fnumber.runTests(''' + # any int or real number, returned as float + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.hex_integer.runTests(''' + # hex numbers + 100 + FF + ''') + + pyparsing_common.fraction.runTests(''' + # fractions + 1/2 + -3/4 + ''') + + pyparsing_common.mixed_integer.runTests(''' + # mixed fractions + 1 + 1/2 + -3/4 + 1-3/4 + ''') + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(''' + # uuid + 12345678-1234-5678-1234-567812345678 + ''') + prints:: + # any int or real number, returned as the appropriate type + 100 + [100] + + -100 + [-100] + + +100 + [100] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # any int or real number, returned as float + 100 + [100.0] + + -100 + [-100.0] + + +100 + [100.0] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # hex numbers + 100 + [256] + + FF + [255] + + # fractions + 1/2 + [0.5] + + -3/4 + [-0.75] + + # mixed fractions + 1 + [1] + + 1/2 + [0.5] + + -3/4 + [-0.75] + + 1-3/4 + [1.75] + + # uuid + 12345678-1234-5678-1234-567812345678 + [UUID('12345678-1234-5678-1234-567812345678')] + """ + + convertToInteger = tokenMap(int) + """ + Parse action for converting parsed integers to Python int + """ + + convertToFloat = tokenMap(float) + """ + Parse action for converting parsed numbers to Python float + """ + + integer = Word(nums).setName("integer").setParseAction(convertToInteger) + """expression that parses an unsigned integer, returns an int""" + + hex_integer = Word(hexnums).setName("hex integer").setParseAction(tokenMap(int,16)) + """expression that parses a hexadecimal integer, returns an int""" + + signed_integer = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) + """expression that parses an integer with optional leading sign, returns an int""" + + fraction = (signed_integer().setParseAction(convertToFloat) + '/' + signed_integer().setParseAction(convertToFloat)).setName("fraction") + """fractional expression of an integer divided by an integer, returns a float""" + fraction.addParseAction(lambda t: t[0]/t[-1]) + + mixed_integer = (fraction | signed_integer + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") + """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" + mixed_integer.addParseAction(sum) + + real = Regex(r'[+-]?\d+\.\d*').setName("real number").setParseAction(convertToFloat) + """expression that parses a floating point number and returns a float""" + + sci_real = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) + """expression that parses a floating point number with optional scientific notation and returns a float""" + + # streamlining this expression makes the docs nicer-looking + number = (sci_real | real | signed_integer).streamline() + """any numeric expression, returns the corresponding Python type""" + + fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat) + """any int or real number, returned as float""" + + identifier = Word(alphas+'_', alphanums+'_').setName("identifier") + """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" + + ipv4_address = Regex(r'(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}').setName("IPv4 address") + "IPv4 address (C{0.0.0.0 - 255.255.255.255})" + + _ipv6_part = Regex(r'[0-9a-fA-F]{1,4}').setName("hex_integer") + _full_ipv6_address = (_ipv6_part + (':' + _ipv6_part)*7).setName("full IPv6 address") + _short_ipv6_address = (Optional(_ipv6_part + (':' + _ipv6_part)*(0,6)) + "::" + Optional(_ipv6_part + (':' + _ipv6_part)*(0,6))).setName("short IPv6 address") + _short_ipv6_address.addCondition(lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8) + _mixed_ipv6_address = ("::ffff:" + ipv4_address).setName("mixed IPv6 address") + ipv6_address = Combine((_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).setName("IPv6 address")).setName("IPv6 address") + "IPv6 address (long, short, or mixed form)" + + mac_address = Regex(r'[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}').setName("MAC address") + "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" + + @staticmethod + def convertToDate(fmt="%Y-%m-%d"): + """ + Helper to create a parse action for converting parsed date string to Python datetime.date + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%d"}) + + Example:: + date_expr = pyparsing_common.iso8601_date.copy() + date_expr.setParseAction(pyparsing_common.convertToDate()) + print(date_expr.parseString("1999-12-31")) + prints:: + [datetime.date(1999, 12, 31)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt).date() + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + @staticmethod + def convertToDatetime(fmt="%Y-%m-%dT%H:%M:%S.%f"): + """ + Helper to create a parse action for converting parsed datetime string to Python datetime.datetime + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%dT%H:%M:%S.%f"}) + + Example:: + dt_expr = pyparsing_common.iso8601_datetime.copy() + dt_expr.setParseAction(pyparsing_common.convertToDatetime()) + print(dt_expr.parseString("1999-12-31T23:59:59.999")) + prints:: + [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt) + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + iso8601_date = Regex(r'(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?').setName("ISO8601 date") + "ISO8601 date (C{yyyy-mm-dd})" + + iso8601_datetime = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?').setName("ISO8601 datetime") + "ISO8601 datetime (C{yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)}) - trailing seconds, milliseconds, and timezone optional; accepts separating C{'T'} or C{' '}" + + uuid = Regex(r'[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}').setName("UUID") + "UUID (C{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})" + + _html_stripper = anyOpenTag.suppress() | anyCloseTag.suppress() + @staticmethod + def stripHTMLTags(s, l, tokens): + """ + Parse action to remove HTML tags from web page HTML source + + Example:: + # strip HTML links from normal text + text = 'More info at the
    pyparsing wiki page' + td,td_end = makeHTMLTags("TD") + table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end + + print(table_text.parseString(text).body) # -> 'More info at the pyparsing wiki page' + """ + return pyparsing_common._html_stripper.transformString(tokens[0]) + + _commasepitem = Combine(OneOrMore(~Literal(",") + ~LineEnd() + Word(printables, excludeChars=',') + + Optional( White(" \t") ) ) ).streamline().setName("commaItem") + comma_separated_list = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("comma separated list") + """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" + + upcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).upper())) + """Parse action to convert tokens to upper case.""" + + downcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).lower())) + """Parse action to convert tokens to lower case.""" + + +if __name__ == "__main__": + + selectToken = CaselessLiteral("select") + fromToken = CaselessLiteral("from") + + ident = Word(alphas, alphanums + "_$") + + columnName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + columnNameList = Group(delimitedList(columnName)).setName("columns") + columnSpec = ('*' | columnNameList) + + tableName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + tableNameList = Group(delimitedList(tableName)).setName("tables") + + simpleSQL = selectToken("command") + columnSpec("columns") + fromToken + tableNameList("tables") + + # demo runTests method, including embedded comments in test string + simpleSQL.runTests(""" + # '*' as column list and dotted table name + select * from SYS.XYZZY + + # caseless match on "SELECT", and casts back to "select" + SELECT * from XYZZY, ABC + + # list of column names, and mixed case SELECT keyword + Select AA,BB,CC from Sys.dual + + # multiple tables + Select A, B, C from Sys.dual, Table2 + + # invalid SELECT keyword - should fail + Xelect A, B, C from Sys.dual + + # incomplete command - should fail + Select + + # invalid column name - should fail + Select ^^^ frox Sys.dual + + """) + + pyparsing_common.number.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + # any int or real number, returned as float + pyparsing_common.fnumber.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + pyparsing_common.hex_integer.runTests(""" + 100 + FF + """) + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(""" + 12345678-1234-5678-1234-567812345678 + """) diff --git a/pkg_resources/_vendor/six.py b/pkg_resources/_vendor/six.py new file mode 100644 index 0000000000..190c0239cd --- /dev/null +++ b/pkg_resources/_vendor/six.py @@ -0,0 +1,868 @@ +"""Utilities for writing code that runs on Python 2 and 3""" + +# Copyright (c) 2010-2015 Benjamin Peterson +# +# 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. + +from __future__ import absolute_import + +import functools +import itertools +import operator +import sys +import types + +__author__ = "Benjamin Peterson " +__version__ = "1.10.0" + + +# Useful for very coarse version differentiation. +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 +PY34 = sys.version_info[0:2] >= (3, 4) + +if PY3: + string_types = str, + integer_types = int, + class_types = type, + text_type = str + binary_type = bytes + + MAXSIZE = sys.maxsize +else: + string_types = basestring, + integer_types = (int, long) + class_types = (type, types.ClassType) + text_type = unicode + binary_type = str + + if sys.platform.startswith("java"): + # Jython always uses 32 bits. + MAXSIZE = int((1 << 31) - 1) + else: + # It's possible to have sizeof(long) != sizeof(Py_ssize_t). + class X(object): + + def __len__(self): + return 1 << 31 + try: + len(X()) + except OverflowError: + # 32-bit + MAXSIZE = int((1 << 31) - 1) + else: + # 64-bit + MAXSIZE = int((1 << 63) - 1) + del X + + +def _add_doc(func, doc): + """Add documentation to a function.""" + func.__doc__ = doc + + +def _import_module(name): + """Import module, returning the module after the last dot.""" + __import__(name) + return sys.modules[name] + + +class _LazyDescr(object): + + def __init__(self, name): + self.name = name + + def __get__(self, obj, tp): + result = self._resolve() + setattr(obj, self.name, result) # Invokes __set__. + try: + # This is a bit ugly, but it avoids running this again by + # removing this descriptor. + delattr(obj.__class__, self.name) + except AttributeError: + pass + return result + + +class MovedModule(_LazyDescr): + + def __init__(self, name, old, new=None): + super(MovedModule, self).__init__(name) + if PY3: + if new is None: + new = name + self.mod = new + else: + self.mod = old + + def _resolve(self): + return _import_module(self.mod) + + def __getattr__(self, attr): + _module = self._resolve() + value = getattr(_module, attr) + setattr(self, attr, value) + return value + + +class _LazyModule(types.ModuleType): + + def __init__(self, name): + super(_LazyModule, self).__init__(name) + self.__doc__ = self.__class__.__doc__ + + def __dir__(self): + attrs = ["__doc__", "__name__"] + attrs += [attr.name for attr in self._moved_attributes] + return attrs + + # Subclasses should override this + _moved_attributes = [] + + +class MovedAttribute(_LazyDescr): + + def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): + super(MovedAttribute, self).__init__(name) + if PY3: + if new_mod is None: + new_mod = name + self.mod = new_mod + if new_attr is None: + if old_attr is None: + new_attr = name + else: + new_attr = old_attr + self.attr = new_attr + else: + self.mod = old_mod + if old_attr is None: + old_attr = name + self.attr = old_attr + + def _resolve(self): + module = _import_module(self.mod) + return getattr(module, self.attr) + + +class _SixMetaPathImporter(object): + + """ + A meta path importer to import six.moves and its submodules. + + This class implements a PEP302 finder and loader. It should be compatible + with Python 2.5 and all existing versions of Python3 + """ + + def __init__(self, six_module_name): + self.name = six_module_name + self.known_modules = {} + + def _add_module(self, mod, *fullnames): + for fullname in fullnames: + self.known_modules[self.name + "." + fullname] = mod + + def _get_module(self, fullname): + return self.known_modules[self.name + "." + fullname] + + def find_module(self, fullname, path=None): + if fullname in self.known_modules: + return self + return None + + def __get_module(self, fullname): + try: + return self.known_modules[fullname] + except KeyError: + raise ImportError("This loader does not know module " + fullname) + + def load_module(self, fullname): + try: + # in case of a reload + return sys.modules[fullname] + except KeyError: + pass + mod = self.__get_module(fullname) + if isinstance(mod, MovedModule): + mod = mod._resolve() + else: + mod.__loader__ = self + sys.modules[fullname] = mod + return mod + + def is_package(self, fullname): + """ + Return true, if the named module is a package. + + We need this method to get correct spec objects with + Python 3.4 (see PEP451) + """ + return hasattr(self.__get_module(fullname), "__path__") + + def get_code(self, fullname): + """Return None + + Required, if is_package is implemented""" + self.__get_module(fullname) # eventually raises ImportError + return None + get_source = get_code # same as get_code + +_importer = _SixMetaPathImporter(__name__) + + +class _MovedItems(_LazyModule): + + """Lazy loading of moved objects""" + __path__ = [] # mark as package + + +_moved_attributes = [ + MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), + MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), + MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), + MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), + MovedAttribute("intern", "__builtin__", "sys"), + MovedAttribute("map", "itertools", "builtins", "imap", "map"), + MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), + MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), + MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), + MovedAttribute("reduce", "__builtin__", "functools"), + MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), + MovedAttribute("StringIO", "StringIO", "io"), + MovedAttribute("UserDict", "UserDict", "collections"), + MovedAttribute("UserList", "UserList", "collections"), + MovedAttribute("UserString", "UserString", "collections"), + MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), + MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), + MovedModule("builtins", "__builtin__"), + MovedModule("configparser", "ConfigParser"), + MovedModule("copyreg", "copy_reg"), + MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), + MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), + MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), + MovedModule("http_cookies", "Cookie", "http.cookies"), + MovedModule("html_entities", "htmlentitydefs", "html.entities"), + MovedModule("html_parser", "HTMLParser", "html.parser"), + MovedModule("http_client", "httplib", "http.client"), + MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), + MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), + MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), + MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), + MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), + MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), + MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), + MovedModule("cPickle", "cPickle", "pickle"), + MovedModule("queue", "Queue"), + MovedModule("reprlib", "repr"), + MovedModule("socketserver", "SocketServer"), + MovedModule("_thread", "thread", "_thread"), + MovedModule("tkinter", "Tkinter"), + MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), + MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), + MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), + MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), + MovedModule("tkinter_tix", "Tix", "tkinter.tix"), + MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), + MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), + MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), + MovedModule("tkinter_colorchooser", "tkColorChooser", + "tkinter.colorchooser"), + MovedModule("tkinter_commondialog", "tkCommonDialog", + "tkinter.commondialog"), + MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), + MovedModule("tkinter_font", "tkFont", "tkinter.font"), + MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), + MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", + "tkinter.simpledialog"), + MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), + MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), + MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), + MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), + MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), + MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), +] +# Add windows specific modules. +if sys.platform == "win32": + _moved_attributes += [ + MovedModule("winreg", "_winreg"), + ] + +for attr in _moved_attributes: + setattr(_MovedItems, attr.name, attr) + if isinstance(attr, MovedModule): + _importer._add_module(attr, "moves." + attr.name) +del attr + +_MovedItems._moved_attributes = _moved_attributes + +moves = _MovedItems(__name__ + ".moves") +_importer._add_module(moves, "moves") + + +class Module_six_moves_urllib_parse(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_parse""" + + +_urllib_parse_moved_attributes = [ + MovedAttribute("ParseResult", "urlparse", "urllib.parse"), + MovedAttribute("SplitResult", "urlparse", "urllib.parse"), + MovedAttribute("parse_qs", "urlparse", "urllib.parse"), + MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), + MovedAttribute("urldefrag", "urlparse", "urllib.parse"), + MovedAttribute("urljoin", "urlparse", "urllib.parse"), + MovedAttribute("urlparse", "urlparse", "urllib.parse"), + MovedAttribute("urlsplit", "urlparse", "urllib.parse"), + MovedAttribute("urlunparse", "urlparse", "urllib.parse"), + MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), + MovedAttribute("quote", "urllib", "urllib.parse"), + MovedAttribute("quote_plus", "urllib", "urllib.parse"), + MovedAttribute("unquote", "urllib", "urllib.parse"), + MovedAttribute("unquote_plus", "urllib", "urllib.parse"), + MovedAttribute("urlencode", "urllib", "urllib.parse"), + MovedAttribute("splitquery", "urllib", "urllib.parse"), + MovedAttribute("splittag", "urllib", "urllib.parse"), + MovedAttribute("splituser", "urllib", "urllib.parse"), + MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), + MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), + MovedAttribute("uses_params", "urlparse", "urllib.parse"), + MovedAttribute("uses_query", "urlparse", "urllib.parse"), + MovedAttribute("uses_relative", "urlparse", "urllib.parse"), +] +for attr in _urllib_parse_moved_attributes: + setattr(Module_six_moves_urllib_parse, attr.name, attr) +del attr + +Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes + +_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), + "moves.urllib_parse", "moves.urllib.parse") + + +class Module_six_moves_urllib_error(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_error""" + + +_urllib_error_moved_attributes = [ + MovedAttribute("URLError", "urllib2", "urllib.error"), + MovedAttribute("HTTPError", "urllib2", "urllib.error"), + MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), +] +for attr in _urllib_error_moved_attributes: + setattr(Module_six_moves_urllib_error, attr.name, attr) +del attr + +Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes + +_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), + "moves.urllib_error", "moves.urllib.error") + + +class Module_six_moves_urllib_request(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_request""" + + +_urllib_request_moved_attributes = [ + MovedAttribute("urlopen", "urllib2", "urllib.request"), + MovedAttribute("install_opener", "urllib2", "urllib.request"), + MovedAttribute("build_opener", "urllib2", "urllib.request"), + MovedAttribute("pathname2url", "urllib", "urllib.request"), + MovedAttribute("url2pathname", "urllib", "urllib.request"), + MovedAttribute("getproxies", "urllib", "urllib.request"), + MovedAttribute("Request", "urllib2", "urllib.request"), + MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), + MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), + MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), + MovedAttribute("BaseHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), + MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), + MovedAttribute("FileHandler", "urllib2", "urllib.request"), + MovedAttribute("FTPHandler", "urllib2", "urllib.request"), + MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), + MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), + MovedAttribute("urlretrieve", "urllib", "urllib.request"), + MovedAttribute("urlcleanup", "urllib", "urllib.request"), + MovedAttribute("URLopener", "urllib", "urllib.request"), + MovedAttribute("FancyURLopener", "urllib", "urllib.request"), + MovedAttribute("proxy_bypass", "urllib", "urllib.request"), +] +for attr in _urllib_request_moved_attributes: + setattr(Module_six_moves_urllib_request, attr.name, attr) +del attr + +Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes + +_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), + "moves.urllib_request", "moves.urllib.request") + + +class Module_six_moves_urllib_response(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_response""" + + +_urllib_response_moved_attributes = [ + MovedAttribute("addbase", "urllib", "urllib.response"), + MovedAttribute("addclosehook", "urllib", "urllib.response"), + MovedAttribute("addinfo", "urllib", "urllib.response"), + MovedAttribute("addinfourl", "urllib", "urllib.response"), +] +for attr in _urllib_response_moved_attributes: + setattr(Module_six_moves_urllib_response, attr.name, attr) +del attr + +Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes + +_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), + "moves.urllib_response", "moves.urllib.response") + + +class Module_six_moves_urllib_robotparser(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_robotparser""" + + +_urllib_robotparser_moved_attributes = [ + MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), +] +for attr in _urllib_robotparser_moved_attributes: + setattr(Module_six_moves_urllib_robotparser, attr.name, attr) +del attr + +Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes + +_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), + "moves.urllib_robotparser", "moves.urllib.robotparser") + + +class Module_six_moves_urllib(types.ModuleType): + + """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" + __path__ = [] # mark as package + parse = _importer._get_module("moves.urllib_parse") + error = _importer._get_module("moves.urllib_error") + request = _importer._get_module("moves.urllib_request") + response = _importer._get_module("moves.urllib_response") + robotparser = _importer._get_module("moves.urllib_robotparser") + + def __dir__(self): + return ['parse', 'error', 'request', 'response', 'robotparser'] + +_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), + "moves.urllib") + + +def add_move(move): + """Add an item to six.moves.""" + setattr(_MovedItems, move.name, move) + + +def remove_move(name): + """Remove item from six.moves.""" + try: + delattr(_MovedItems, name) + except AttributeError: + try: + del moves.__dict__[name] + except KeyError: + raise AttributeError("no such move, %r" % (name,)) + + +if PY3: + _meth_func = "__func__" + _meth_self = "__self__" + + _func_closure = "__closure__" + _func_code = "__code__" + _func_defaults = "__defaults__" + _func_globals = "__globals__" +else: + _meth_func = "im_func" + _meth_self = "im_self" + + _func_closure = "func_closure" + _func_code = "func_code" + _func_defaults = "func_defaults" + _func_globals = "func_globals" + + +try: + advance_iterator = next +except NameError: + def advance_iterator(it): + return it.next() +next = advance_iterator + + +try: + callable = callable +except NameError: + def callable(obj): + return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) + + +if PY3: + def get_unbound_function(unbound): + return unbound + + create_bound_method = types.MethodType + + def create_unbound_method(func, cls): + return func + + Iterator = object +else: + def get_unbound_function(unbound): + return unbound.im_func + + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + + def create_unbound_method(func, cls): + return types.MethodType(func, None, cls) + + class Iterator(object): + + def next(self): + return type(self).__next__(self) + + callable = callable +_add_doc(get_unbound_function, + """Get the function out of a possibly unbound function""") + + +get_method_function = operator.attrgetter(_meth_func) +get_method_self = operator.attrgetter(_meth_self) +get_function_closure = operator.attrgetter(_func_closure) +get_function_code = operator.attrgetter(_func_code) +get_function_defaults = operator.attrgetter(_func_defaults) +get_function_globals = operator.attrgetter(_func_globals) + + +if PY3: + def iterkeys(d, **kw): + return iter(d.keys(**kw)) + + def itervalues(d, **kw): + return iter(d.values(**kw)) + + def iteritems(d, **kw): + return iter(d.items(**kw)) + + def iterlists(d, **kw): + return iter(d.lists(**kw)) + + viewkeys = operator.methodcaller("keys") + + viewvalues = operator.methodcaller("values") + + viewitems = operator.methodcaller("items") +else: + def iterkeys(d, **kw): + return d.iterkeys(**kw) + + def itervalues(d, **kw): + return d.itervalues(**kw) + + def iteritems(d, **kw): + return d.iteritems(**kw) + + def iterlists(d, **kw): + return d.iterlists(**kw) + + viewkeys = operator.methodcaller("viewkeys") + + viewvalues = operator.methodcaller("viewvalues") + + viewitems = operator.methodcaller("viewitems") + +_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") +_add_doc(itervalues, "Return an iterator over the values of a dictionary.") +_add_doc(iteritems, + "Return an iterator over the (key, value) pairs of a dictionary.") +_add_doc(iterlists, + "Return an iterator over the (key, [values]) pairs of a dictionary.") + + +if PY3: + def b(s): + return s.encode("latin-1") + + def u(s): + return s + unichr = chr + import struct + int2byte = struct.Struct(">B").pack + del struct + byte2int = operator.itemgetter(0) + indexbytes = operator.getitem + iterbytes = iter + import io + StringIO = io.StringIO + BytesIO = io.BytesIO + _assertCountEqual = "assertCountEqual" + if sys.version_info[1] <= 1: + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" + else: + _assertRaisesRegex = "assertRaisesRegex" + _assertRegex = "assertRegex" +else: + def b(s): + return s + # Workaround for standalone backslash + + def u(s): + return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") + unichr = unichr + int2byte = chr + + def byte2int(bs): + return ord(bs[0]) + + def indexbytes(buf, i): + return ord(buf[i]) + iterbytes = functools.partial(itertools.imap, ord) + import StringIO + StringIO = BytesIO = StringIO.StringIO + _assertCountEqual = "assertItemsEqual" + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" +_add_doc(b, """Byte literal""") +_add_doc(u, """Text literal""") + + +def assertCountEqual(self, *args, **kwargs): + return getattr(self, _assertCountEqual)(*args, **kwargs) + + +def assertRaisesRegex(self, *args, **kwargs): + return getattr(self, _assertRaisesRegex)(*args, **kwargs) + + +def assertRegex(self, *args, **kwargs): + return getattr(self, _assertRegex)(*args, **kwargs) + + +if PY3: + exec_ = getattr(moves.builtins, "exec") + + def reraise(tp, value, tb=None): + if value is None: + value = tp() + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + +else: + def exec_(_code_, _globs_=None, _locs_=None): + """Execute code in a namespace.""" + if _globs_ is None: + frame = sys._getframe(1) + _globs_ = frame.f_globals + if _locs_ is None: + _locs_ = frame.f_locals + del frame + elif _locs_ is None: + _locs_ = _globs_ + exec("""exec _code_ in _globs_, _locs_""") + + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb +""") + + +if sys.version_info[:2] == (3, 2): + exec_("""def raise_from(value, from_value): + if from_value is None: + raise value + raise value from from_value +""") +elif sys.version_info[:2] > (3, 2): + exec_("""def raise_from(value, from_value): + raise value from from_value +""") +else: + def raise_from(value, from_value): + raise value + + +print_ = getattr(moves.builtins, "print", None) +if print_ is None: + def print_(*args, **kwargs): + """The new-style print function for Python 2.4 and 2.5.""" + fp = kwargs.pop("file", sys.stdout) + if fp is None: + return + + def write(data): + if not isinstance(data, basestring): + data = str(data) + # If the file has an encoding, encode unicode with it. + if (isinstance(fp, file) and + isinstance(data, unicode) and + fp.encoding is not None): + errors = getattr(fp, "errors", None) + if errors is None: + errors = "strict" + data = data.encode(fp.encoding, errors) + fp.write(data) + want_unicode = False + sep = kwargs.pop("sep", None) + if sep is not None: + if isinstance(sep, unicode): + want_unicode = True + elif not isinstance(sep, str): + raise TypeError("sep must be None or a string") + end = kwargs.pop("end", None) + if end is not None: + if isinstance(end, unicode): + want_unicode = True + elif not isinstance(end, str): + raise TypeError("end must be None or a string") + if kwargs: + raise TypeError("invalid keyword arguments to print()") + if not want_unicode: + for arg in args: + if isinstance(arg, unicode): + want_unicode = True + break + if want_unicode: + newline = unicode("\n") + space = unicode(" ") + else: + newline = "\n" + space = " " + if sep is None: + sep = space + if end is None: + end = newline + for i, arg in enumerate(args): + if i: + write(sep) + write(arg) + write(end) +if sys.version_info[:2] < (3, 3): + _print = print_ + + def print_(*args, **kwargs): + fp = kwargs.get("file", sys.stdout) + flush = kwargs.pop("flush", False) + _print(*args, **kwargs) + if flush and fp is not None: + fp.flush() + +_add_doc(reraise, """Reraise an exception.""") + +if sys.version_info[0:2] < (3, 4): + def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, + updated=functools.WRAPPER_UPDATES): + def wrapper(f): + f = functools.wraps(wrapped, assigned, updated)(f) + f.__wrapped__ = wrapped + return f + return wrapper +else: + wraps = functools.wraps + + +def with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) + + +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper + + +def python_2_unicode_compatible(klass): + """ + A decorator that defines __unicode__ and __str__ methods under Python 2. + Under Python 3 it does nothing. + + To support Python 2 and 3 with a single code base, define a __str__ method + returning text and apply this decorator to the class. + """ + if PY2: + if '__str__' not in klass.__dict__: + raise ValueError("@python_2_unicode_compatible cannot be applied " + "to %s because it doesn't define __str__()." % + klass.__name__) + klass.__unicode__ = klass.__str__ + klass.__str__ = lambda self: self.__unicode__().encode('utf-8') + return klass + + +# Complete the moves implementation. +# This code is at the end of this module to speed up module loading. +# Turn this module into a package. +__path__ = [] # required for PEP 302 and PEP 451 +__package__ = __name__ # see PEP 366 @ReservedAssignment +if globals().get("__spec__") is not None: + __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable +# Remove other six meta path importers, since they cause problems. This can +# happen if six is removed from sys.modules and then reloaded. (Setuptools does +# this for some reason.) +if sys.meta_path: + for i, importer in enumerate(sys.meta_path): + # Here's some real nastiness: Another "instance" of the six module might + # be floating around. Therefore, we can't use isinstance() to check for + # the six meta path importer, since the other six instance will have + # inserted an importer with different class. + if (type(importer).__name__ == "_SixMetaPathImporter" and + importer.name == __name__): + del sys.meta_path[i] + break + del i, importer +# Finally, add the importer to the meta path import hook. +sys.meta_path.append(_importer) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt new file mode 100644 index 0000000000..9a94c5bcc2 --- /dev/null +++ b/pkg_resources/_vendor/vendored.txt @@ -0,0 +1,4 @@ +packaging==16.8 +pyparsing==2.1.10 +six==1.10.0 +appdirs==1.4.0 diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py new file mode 100644 index 0000000000..b4156fec20 --- /dev/null +++ b/pkg_resources/extern/__init__.py @@ -0,0 +1,73 @@ +import sys + + +class VendorImporter: + """ + A PEP 302 meta path importer for finding optionally-vendored + or otherwise naturally-installed packages from root_name. + """ + + def __init__(self, root_name, vendored_names=(), vendor_pkg=None): + self.root_name = root_name + self.vendored_names = set(vendored_names) + self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') + + @property + def search_path(self): + """ + Search first the vendor package then as a natural package. + """ + yield self.vendor_pkg + '.' + yield '' + + def find_module(self, fullname, path=None): + """ + Return self when fullname starts with root_name and the + target module is one vendored through this importer. + """ + root, base, target = fullname.partition(self.root_name + '.') + if root: + return + if not any(map(target.startswith, self.vendored_names)): + return + return self + + def load_module(self, fullname): + """ + Iterate over the search path to locate and load fullname. + """ + root, base, target = fullname.partition(self.root_name + '.') + for prefix in self.search_path: + try: + extant = prefix + target + __import__(extant) + mod = sys.modules[extant] + sys.modules[fullname] = mod + # mysterious hack: + # Remove the reference to the extant package/module + # 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): + del sys.modules[extant] + return mod + except ImportError: + pass + else: + raise ImportError( + "The '{target}' package is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.".format(**locals()) + ) + + def install(self): + """ + Install this importer into sys.meta_path if not already present. + """ + if self not in sys.meta_path: + sys.meta_path.append(self) + + +names = 'packaging', 'pyparsing', 'six', 'appdirs' +VendorImporter(__name__, names).install() diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index bef914a22a..49bf7a04b8 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -12,7 +12,7 @@ import distutils.dist import distutils.command.install_egg_info -from six.moves import map +from pkg_resources.extern.six.moves import map import pytest diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index f28378b9c6..00ca74262a 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -5,10 +5,10 @@ import string import platform -from six.moves import map +from pkg_resources.extern.six.moves import map import pytest -import packaging +from pkg_resources.extern import packaging import pkg_resources from pkg_resources import (parse_requirements, VersionConflict, parse_version, diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 0aa2e1c865..0000000000 --- a/pyproject.toml +++ /dev/null @@ -1,9 +0,0 @@ -[build-system] -# for Setuptools, its own requirements are build requirements, -# so keep this in sync with install_requires in setup.py. -requires = [ - "wheel", - "packaging>=16.8", - "six>=1.10.0", - "appdirs>=1.4.0", -] diff --git a/setup.py b/setup.py index 5d436acec5..02cafd55c9 100755 --- a/setup.py +++ b/setup.py @@ -16,10 +16,7 @@ def require_metadata(): "Prevent improper installs without necessary metadata. See #659" if not os.path.exists('setuptools.egg-info'): - msg = ( - "Cannot build setuptools without metadata. " - "Install rwt and run `rwt -- bootstrap.py`." - ) + msg = "Cannot build setuptools without metadata. Run bootstrap.py" raise RuntimeError(msg) @@ -162,11 +159,6 @@ def pypi_link(pkg_filename): Topic :: Utilities """).strip().splitlines(), python_requires='>=2.6,!=3.0.*,!=3.1.*,!=3.2.*', - install_requires=[ - 'packaging>=16.8', - 'six>=1.6.0', - 'appdirs>=1.4.0', - ], extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2016.9.26", diff --git a/setuptools/__init__.py b/setuptools/__init__.py index d01918ed59..04f7674082 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -7,7 +7,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase -from six.moves import filter, map +from setuptools.extern.six.moves import filter, map import setuptools.version from setuptools.extension import Extension diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 35ece78d76..4532b1cc0d 100755 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,6 +1,6 @@ from distutils.errors import DistutilsOptionError -from six.moves import map +from setuptools.extern.six.moves import map from setuptools.command.setopt import edit_config, option_base, config_file diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index ae344cd051..8cd9dfefe2 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -11,7 +11,7 @@ import textwrap import marshal -import six +from setuptools.extern import six from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index c2fd8704e0..36f53f0dd4 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -10,7 +10,7 @@ from distutils import log from setuptools.extension import Library -import six +from setuptools.extern import six try: # Attempt to use Cython for building extensions, if available diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 56daa2bd32..b0314fd413 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,8 +8,8 @@ import distutils.errors import itertools -import six -from six.moves import map, filter, filterfalse +from setuptools.extern import six +from setuptools.extern.six.moves import map, filter, filterfalse try: from setuptools.lib2to3_ex import Mixin2to3 diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index ddfdc662ad..85b23c6080 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,7 +5,7 @@ import glob import io -import six +from setuptools.extern import six from pkg_resources import Distribution, PathMetadata, normalize_path from setuptools.command.easy_install import easy_install diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d3eabfc3ba..36e7f3598f 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,8 +40,8 @@ import shlex import io -import six -from six.moves import configparser, map +from setuptools.extern import six +from setuptools.extern.six.moves import configparser, map from setuptools import Command from setuptools.sandbox import run_setup diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1a6ea9cb57..a32c42f82c 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -16,8 +16,8 @@ import time import collections -import six -from six.moves import map +from setuptools.extern import six +from setuptools.extern.six.moves import map from setuptools import Command from setuptools.command.sdist import sdist @@ -30,7 +30,7 @@ import setuptools.unicode_utils as unicode_utils from setuptools.glob import glob -import packaging +from pkg_resources.extern import packaging def translate_pattern(glob): diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index a2c74b2d76..61063e7542 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -3,7 +3,7 @@ from distutils.util import convert_path from distutils.command import sdist -from six.moves import filter +from setuptools.extern.six.moves import filter class sdist_add_defaults: diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index 7ea36e968e..b89353f529 100755 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -4,7 +4,7 @@ import os import shutil -import six +from setuptools.extern import six from setuptools import Command diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2c2d88afa5..84e29a1b7d 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,7 +5,7 @@ import io import contextlib -import six +from setuptools.extern import six from .py36compat import sdist_add_defaults diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 6f6298c46f..7e57cc0262 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -4,7 +4,7 @@ import distutils import os -from six.moves import configparser +from setuptools.extern.six.moves import configparser from setuptools import Command diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e7a386d19d..ef0af12f12 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -7,8 +7,8 @@ from distutils import log from unittest import TestLoader -import six -from six.moves import map, filter +from setuptools.extern import six +from setuptools.extern.six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index eeb0718b67..269dc2d503 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,8 +16,8 @@ import itertools import functools -import six -from six.moves import http_client, urllib +from setuptools.extern import six +from setuptools.extern.six.moves import http_client, urllib from pkg_resources import iter_entry_points from .upload import upload diff --git a/setuptools/config.py b/setuptools/config.py index 39a01f88b7..0149316cb1 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -7,7 +7,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.py26compat import import_module -from six import string_types +from setuptools.extern.six import string_types def read_configuration( diff --git a/setuptools/dist.py b/setuptools/dist.py index be55dc4e65..159464be23 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -12,9 +12,9 @@ DistutilsSetupError) from distutils.util import rfc822_escape -import six -from six.moves import map -import packaging +from setuptools.extern import six +from setuptools.extern.six.moves import map +from pkg_resources.extern import packaging from setuptools.depends import Require from setuptools import windows_support diff --git a/setuptools/extension.py b/setuptools/extension.py index 34a36dfbb3..29468894f8 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -4,7 +4,7 @@ import distutils.errors import distutils.extension -from six.moves import map +from setuptools.extern.six.moves import map from .monkey import get_unpatched diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py new file mode 100644 index 0000000000..2cd08b7ed9 --- /dev/null +++ b/setuptools/extern/__init__.py @@ -0,0 +1,4 @@ +from pkg_resources.extern import VendorImporter + +names = 'six', +VendorImporter(__name__, names, 'pkg_resources._vendor').install() diff --git a/setuptools/glob.py b/setuptools/glob.py index f264402671..6c781de349 100644 --- a/setuptools/glob.py +++ b/setuptools/glob.py @@ -10,7 +10,7 @@ import os import re import fnmatch -from six import binary_type +from setuptools.extern.six import binary_type __all__ = ["glob", "iglob", "escape"] diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 68fad9dd08..94f22a56d0 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -10,7 +10,7 @@ import inspect from .py26compat import import_module -import six +from setuptools.extern import six import setuptools diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 97e27303f8..447ddb3822 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -20,14 +20,14 @@ import platform import itertools import distutils.errors -from packaging.version import LegacyVersion +from pkg_resources.extern.packaging.version import LegacyVersion -from six.moves import filterfalse +from setuptools.extern.six.moves import filterfalse from .monkey import get_unpatched if platform.system() == 'Windows': - from six.moves import winreg + from setuptools.extern.six.moves import winreg safe_env = os.environ else: """ diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 7c24a566c3..dc16106d3d 100755 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -2,7 +2,7 @@ from distutils import log import itertools -from six.moves import map +from setuptools.extern.six.moves import map flatten = itertools.chain.from_iterable diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3544dd5460..faef537707 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -14,8 +14,8 @@ except ImportError: from urllib2 import splituser -import six -from six.moves import urllib, http_client, configparser, map +from setuptools.extern import six +from setuptools.extern.six.moves import urllib, http_client, configparser, map import setuptools from pkg_resources import ( diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index 0caa2003d8..af64d5d1e2 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -2,7 +2,7 @@ import array import collections -import six +from setuptools.extern import six OpArg = collections.namedtuple('OpArg', 'opcode arg') diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 0ddd233242..817a3afaae 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,8 +8,8 @@ import contextlib import pickle -import six -from six.moves import builtins, map +from setuptools.extern import six +from setuptools.extern.six.moves import builtins, map import pkg_resources diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index fa5e4421c8..72b18ef266 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -4,7 +4,7 @@ import re import functools -from six.moves import urllib, http_client, map, filter +from setuptools.extern.six.moves import urllib, http_client, map, filter from pkg_resources import ResolutionError, ExtractionError diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index f54c478e1a..dbf1620108 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -8,7 +8,7 @@ from distutils.core import Extension from distutils.version import LooseVersion -import six +from setuptools.extern import six import pytest import setuptools.dist diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 77ebecf92f..535ae10766 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -5,7 +5,7 @@ import contextlib import site -import six +from setuptools.extern import six import pkg_resources diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 5cdde21722..35312120bb 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -4,7 +4,7 @@ import time import threading -from six.moves import BaseHTTPServer, SimpleHTTPServer +from setuptools.extern.six.moves import BaseHTTPServer, SimpleHTTPServer class IndexServer(BaseHTTPServer.HTTPServer): diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index 5cdf63f2bb..b789e9acef 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -3,7 +3,7 @@ import tarfile import io -import six +from setuptools.extern import six import pytest diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 59a896d81f..602571540f 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -2,7 +2,7 @@ import distutils.command.build_ext as orig from distutils.sysconfig import get_config_var -import six +from setuptools.extern import six from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 54e199c34e..ad7cfa05c3 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -9,7 +9,7 @@ import io import subprocess -import six +from setuptools.extern import six from setuptools.command import test import pytest diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index 24c5149af2..f7e7d2bf0a 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals -from six.moves import map +from setuptools.extern.six.moves import map import pytest diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b75e6ff2e1..52db16f6a8 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -17,7 +17,7 @@ from unittest import mock import time -from six.moves import urllib +from setuptools.extern.six.moves import urllib import pytest diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index c9a4425af7..a32b981d67 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,7 +6,7 @@ from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution -from six.moves import map +from setuptools.extern.six.moves import map import pytest diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index a83d4fe867..78fb0627b0 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -7,7 +7,7 @@ import os import sys -from six.moves import urllib +from setuptools.extern.six.moves import urllib import pytest from setuptools.command.easy_install import easy_install diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 3b34c88813..f17cf6a6a9 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -11,7 +11,7 @@ from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution -import six +from setuptools.extern import six from setuptools.tests.textwrap import DALS import pytest diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 1a66394f15..53e20d44c8 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -4,8 +4,8 @@ import os import distutils.errors -import six -from six.moves import urllib, http_client +from setuptools.extern import six +from setuptools.extern.six.moves import urllib, http_client import pkg_resources import setuptools.package_index diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 38fdda248e..f34068dcd3 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,8 +9,8 @@ import contextlib import io -import six -from six.moves import map +from setuptools.extern import six +from setuptools.extern.six.moves import map import pytest diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 6a84f9bead..7c63efd20b 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,7 +1,7 @@ import unicodedata import sys -import six +from setuptools.extern import six # HFS Plus uses decomposed UTF-8 diff --git a/tests/requirements.txt b/tests/requirements.txt index 88a36c635c..d07e9cdeb7 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,4 @@ pytest-flake8 pytest>=3.0.2 +setuptools[ssl] backports.unittest_mock>=1.2 diff --git a/tests/test_pypi.py b/tests/test_pypi.py index 173b2c876b..b3425e53bc 100644 --- a/tests/test_pypi.py +++ b/tests/test_pypi.py @@ -2,8 +2,8 @@ import subprocess import virtualenv -from six.moves import http_client -from six.moves import xmlrpc_client +from setuptools.extern.six.moves import http_client +from setuptools.extern.six.moves import xmlrpc_client TOP = 200 PYPI_HOSTNAME = 'pypi.python.org' diff --git a/tox.ini b/tox.ini index 6b43dcd80b..cae9c745c2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,5 @@ [testenv] -deps= - -rtests/requirements.txt - -rrequirements.txt +deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR commands=py.test {posargs:-rsx} usedevelop=True -extras=ssl From e753cb42481783ac858ceb518aaac1472075063c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 24 Feb 2017 10:55:44 +0200 Subject: [PATCH 6518/8469] Python 3.6 invalid escape sequence deprecation fixes --- CHANGES.rst | 6 ++++++ pkg_resources/tests/test_resources.py | 2 +- setuptools/command/easy_install.py | 2 +- setuptools/msvc.py | 4 ++-- setuptools/package_index.py | 8 ++++---- setuptools/sandbox.py | 4 ++-- setuptools/tests/test_bdist_egg.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- 8 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c6d5556fc0..000705b710 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.3.1 +------- + +* #983: Fixes to invalid escape sequence deprecations on + Python 3.6. + v34.3.0 ------- diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index f28378b9c6..b997aaa345 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -593,7 +593,7 @@ def testSimpleRequirements(self): [Requirement('Twis-Ted>=1.2-1')] ) assert ( - list(parse_requirements('Twisted >=1.2, \ # more\n<2.0')) + list(parse_requirements('Twisted >=1.2, \\ # more\n<2.0')) == [Requirement('Twisted>=1.2,<2.0')] ) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d3eabfc3ba..f5ca075452 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2013,7 +2013,7 @@ class ScriptWriter(object): gui apps. """ - template = textwrap.dedent(""" + template = textwrap.dedent(r""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r import re diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 97e27303f8..d41daec4a0 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -272,7 +272,7 @@ def current_dir(self, hidex86=False, x64=False): ) def target_dir(self, hidex86=False, x64=False): - """ + r""" Target platform specific subfolder. Parameters @@ -294,7 +294,7 @@ def target_dir(self, hidex86=False, x64=False): ) def cross_dir(self, forcex86=False): - """ + r""" Cross platform specific subfolder. Parameters diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3544dd5460..5d397b67c5 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -34,8 +34,8 @@ HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I) # this is here to fix emacs' cruddy broken syntax highlighting PYPI_MD5 = re.compile( - '([^<]+)\n\s+\\(md5\\)' + '([^<]+)\n\\s+\\(md5\\)' ) URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() @@ -161,7 +161,7 @@ def interpret_distro_name( # versions in distribution archive names (sdist and bdist). parts = basename.split('-') - if not py_version and any(re.match('py\d\.\d$', p) for p in parts[2:]): + if not py_version and any(re.match(r'py\d\.\d$', p) for p in parts[2:]): # it is a bdist_dumb, not an sdist -- bail out return @@ -205,7 +205,7 @@ def wrapper(*args, **kwargs): return wrapper -REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) +REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) # this line is here to fix emacs' cruddy broken syntax highlighting diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 0ddd233242..41c1c3b19d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -215,7 +215,7 @@ def _needs_hiding(mod_name): >>> _needs_hiding('Cython') True """ - pattern = re.compile('(setuptools|pkg_resources|distutils|Cython)(\.|$)') + pattern = re.compile(r'(setuptools|pkg_resources|distutils|Cython)(\.|$)') return bool(pattern.match(mod_name)) @@ -391,7 +391,7 @@ class DirectorySandbox(AbstractSandbox): _exception_patterns = [ # Allow lib2to3 to attempt to save a pickled grammar object (#121) - '.*lib2to3.*\.pickle$', + r'.*lib2to3.*\.pickle$', ] "exempt writing to paths that match the pattern" diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 5aabf404fd..d24aa366d4 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -41,4 +41,4 @@ def test_bdist_egg(self, setup_context, user_override): # let's see if we got our egg link at the right place [content] = os.listdir('dist') - assert re.match('foo-0.0.0-py[23].\d.egg$', content) + assert re.match(r'foo-0.0.0-py[23].\d.egg$', content) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b75e6ff2e1..fd8300a02e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -65,7 +65,7 @@ def test_install_site_py(self, tmpdir): def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() - expected = header + DALS(""" + expected = header + DALS(r""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' import re From d4c215a7c61fb1f94b88bd2aa0b332ebaff18193 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Feb 2017 21:16:34 -0600 Subject: [PATCH 6519/8469] Add a test capturing new proposed expectation that Setuptools' build dependencies should not require setuptools to build in order to avoid inevitable conflicts when bootstrapping from source. Packaging fails this test. Ref #980 --- setuptools/tests/test_integration.py | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index a83d4fe867..cb62eb2957 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -98,3 +98,53 @@ def test_pbr(install_context): def test_python_novaclient(install_context): _install_one('python-novaclient', install_context, 'novaclient', 'base.py') + +import re +import subprocess +import functools +import tarfile, zipfile + + +build_deps = ['appdirs', 'packaging', 'pyparsing', 'six'] +@pytest.mark.parametrize("build_dep", build_deps) +@pytest.mark.skipif(sys.version_info < (3, 6), reason='run only on late versions') +def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): + """ + All setuptools build dependencies must build without + setuptools. + """ + if 'pyparsing' in build_dep: + pytest.xfail(reason="Project imports setuptools unconditionally") + build_target = tmpdir_factory.mktemp('source') + build_dir = download_and_extract(request, build_dep, build_target) + install_target = tmpdir_factory.mktemp('target') + output = install(build_dir, install_target) + for line in output.splitlines(): + match = re.search('Unknown distribution option: (.*)', line) + allowed_unknowns = [ + 'test_suite', + 'tests_require', + 'install_requires', + ] + assert not match or match.group(1).strip('"\'') in allowed_unknowns + + +def install(pkg_dir, install_dir): + with open(os.path.join(pkg_dir, 'setuptools.py'), 'w') as breaker: + breaker.write('raise ImportError()') + cmd = [sys.executable, 'setup.py', 'install', '--prefix', install_dir] + env = dict(os.environ, PYTHONPATH=pkg_dir) + output = subprocess.check_output(cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) + return output.decode('utf-8') + + +def download_and_extract(request, req, target): + cmd = [sys.executable, '-m', 'pip', 'download', '--no-deps', + '--no-binary', ':all:', req] + output = subprocess.check_output(cmd, encoding='utf-8') + filename = re.search('Saved (.*)', output).group(1) + request.addfinalizer(functools.partial(os.remove, filename)) + opener = zipfile.ZipFile if filename.endswith('.zip') else tarfile.open + with opener(filename) as archive: + archive.extractall(target) + return os.path.join(target, os.listdir(target)[0]) From 20aca0e37e2003a364098a27189c732197ccbec2 Mon Sep 17 00:00:00 2001 From: Emil Styrke Date: Mon, 27 Feb 2017 14:15:39 +0100 Subject: [PATCH 6520/8469] Fix for auto_chmod behavior Apparently, in (at least) python 3.5.2, the function that is called on Windows to remove files is os.unlink and not os.remove. This results in permission errors when trying to clean up after easy_install has been used to install a package from a Git repository. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f5ca075452..ef83f7aed2 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1675,7 +1675,7 @@ def _first_line_re(): def auto_chmod(func, arg, exc): - if func is os.remove and os.name == 'nt': + if func in [os.unlink, os.remove] and os.name == 'nt': chmod(arg, stat.S_IWRITE) return func(arg) et, ev, _ = sys.exc_info() From 76e1b4957060319545f5a1abd1494cd77a017fa8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Mar 2017 19:08:58 -0500 Subject: [PATCH 6521/8469] Update changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 000705b710..66af4bde04 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,9 @@ v34.3.1 ------- +* #988: Trap ``os.unlink`` same as ``os.remove`` in + ``auto_chmod`` error handler. + * #983: Fixes to invalid escape sequence deprecations on Python 3.6. From c4ff7cc6551097d513d310fac6d0c099b1afa32e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Mar 2017 19:18:40 -0500 Subject: [PATCH 6522/8469] =?UTF-8?q?Bump=20version:=2034.3.0=20=E2=86=92?= =?UTF-8?q?=2034.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9fbe41eeef..cf36f54fc7 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.3.0 +current_version = 34.3.1 commit = True tag = True diff --git a/setup.py b/setup.py index 5d436acec5..6bd0cce84c 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.3.0", + version="34.3.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 62fc6681509f04ba7ee12e87d6ac5d6056214fa8 Mon Sep 17 00:00:00 2001 From: Florian Schulze Date: Sat, 11 Mar 2017 14:45:15 +0100 Subject: [PATCH 6523/8469] Fix documentation upload by fixing content_type in _build_multipart on Python 3.x. --- setuptools/command/upload_docs.py | 2 +- setuptools/tests/test_upload_docs.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index eeb0718b67..910d5ea7c8 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -138,7 +138,7 @@ def _build_multipart(cls, data): part_groups = map(builder, data.items()) parts = itertools.chain.from_iterable(part_groups) body_items = itertools.chain(parts, end_items) - content_type = 'multipart/form-data; boundary=%s' % boundary + content_type = 'multipart/form-data; boundary=%s' % boundary.decode('ascii') return b''.join(body_items), content_type def upload_file(self, filename): diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 5d50bb0b2f..a26e32a61d 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -64,6 +64,8 @@ def test_build_multipart(self): ) body, content_type = upload_docs._build_multipart(data) assert 'form-data' in content_type + assert "b'" not in content_type + assert 'b"' not in content_type assert isinstance(body, bytes) assert b'foo' in body assert b'content' in body From da1dcf42236810c76c763ee9be8ba71bf213c297 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Mar 2017 09:12:07 -0500 Subject: [PATCH 6524/8469] Extract variables to remove hanging indents. --- setuptools/command/upload_docs.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 910d5ea7c8..468cb377d5 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -77,9 +77,8 @@ def create_zipfile(self, filename): self.mkpath(self.target_dir) # just in case for root, dirs, files in os.walk(self.target_dir): if root == self.target_dir and not files: - raise DistutilsOptionError( - "no files found in upload directory '%s'" - % self.target_dir) + tmpl = "no files found in upload directory '%s'" + raise DistutilsOptionError(tmpl % self.target_dir) for name in files: full = os.path.join(root, name) relative = root[len(self.target_dir):].lstrip(os.path.sep) @@ -159,8 +158,8 @@ def upload_file(self, filename): body, ct = self._build_multipart(data) - self.announce("Submitting documentation to %s" % (self.repository), - log.INFO) + msg = "Submitting documentation to %s" % (self.repository) + self.announce(msg, log.INFO) # build the Request # We can't use urllib2 since we need to send the Basic @@ -191,16 +190,16 @@ def upload_file(self, filename): r = conn.getresponse() if r.status == 200: - self.announce('Server response (%s): %s' % (r.status, r.reason), - log.INFO) + msg = 'Server response (%s): %s' % (r.status, r.reason) + self.announce(msg, log.INFO) elif r.status == 301: location = r.getheader('Location') if location is None: location = 'https://pythonhosted.org/%s/' % meta.get_name() - self.announce('Upload successful. Visit %s' % location, - log.INFO) + msg = 'Upload successful. Visit %s' % location + self.announce(msg, log.INFO) else: - self.announce('Upload failed (%s): %s' % (r.status, r.reason), - log.ERROR) + msg = 'Upload failed (%s): %s' % (r.status, r.reason) + self.announce(msg, log.ERROR) if self.show_response: print('-' * 75, r.read(), '-' * 75) From 94ad54108b1584e19c79521aa487b20b1fd18f69 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Mar 2017 09:14:55 -0500 Subject: [PATCH 6525/8469] Update changelog. Ref #993. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 66af4bde04..cef2ddb1c4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v34.3.2 +------- + +* #993: Fix documentation upload by correcting + rendering of content-type in _build_multipart + on Python 3. + v34.3.1 ------- From 907fc81e098e6e173501d63b4541b404d8feed2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Mar 2017 09:16:43 -0500 Subject: [PATCH 6526/8469] =?UTF-8?q?Bump=20version:=2034.3.1=20=E2=86=92?= =?UTF-8?q?=2034.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index cf36f54fc7..8a7aeabd66 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.3.1 +current_version = 34.3.2 commit = True tag = True diff --git a/setup.py b/setup.py index 6bd0cce84c..825b2f94b9 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.3.1", + version="34.3.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 20b3b3eaa74935d4854b63f75d893def27a4248e Mon Sep 17 00:00:00 2001 From: JGoutin Date: Mon, 20 Mar 2017 17:45:57 +0100 Subject: [PATCH 6527/8469] Update for MS BuildTools 2017 --- setuptools/msvc.py | 96 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 81 insertions(+), 15 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index d41daec4a0..71fe24cd31 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -13,6 +13,7 @@ Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) """ import os @@ -150,6 +151,7 @@ def msvc14_get_vc_env(plat_spec): ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Parameters ---------- @@ -411,7 +413,7 @@ def microsoft(self, key, x86=False): ------ str: value """ - node64 = '' if self.pi.current_is_x86() or x86 else r'\Wow6432Node' + node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node' return os.path.join('Software', node64, 'Microsoft', key) def lookup(self, key, name): @@ -483,12 +485,13 @@ def find_available_vc_vers(self): """ Find all available Microsoft Visual C++ versions. """ - vckeys = (self.ri.vc, self.ri.vc_for_python) + ms = self.ri.microsoft + vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vc_vers = [] for hkey in self.ri.HKEYS: for key in vckeys: try: - bkey = winreg.OpenKey(hkey, key, 0, winreg.KEY_READ) + bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) except (OSError, IOError): continue subkeys, values, _ = winreg.QueryInfoKey(bkey) @@ -525,9 +528,24 @@ def VCInstallDir(self): """ Microsoft Visual C++ directory. """ - # Default path - default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver - guess_vc = os.path.join(self.ProgramFilesx86, default) + self.VSInstallDir + + # Default path starting VS2017 + guess_vc = '' + if self.vc_ver > 14.0: + default = r'VC\Tools\MSVC' + guess_vc = os.path.join(self.VSInstallDir, default) + # Subdir with VC exact version as name + try: + vc_exact_ver = os.listdir(guess_vc)[-1] + guess_vc = os.path.join(guess_vc, vc_exact_ver) + except (OSError, IOError, IndexError): + guess_vc = '' + + # Legacy default path + if not guess_vc: + default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver + guess_vc = os.path.join(self.ProgramFilesx86, default) # Try to get "VC++ for Python" path from registry as default path reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) @@ -725,9 +743,19 @@ def _find_dot_net_versions(self, bits=32): bits: int Platform number of bits: 32 or 64. """ - # Find actual .NET version + # Find actual .NET version in registry ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' + # If nothing in registry, look in Framework folder + if not ver: + dot_net_dir = (self.FrameworkDir32 if bits == 32 else + self.FrameworkDir64) + for dir_name in reversed(os.listdir(dot_net_dir)): + if (os.path.isdir(os.path.join(dot_net_dir, dir_name)) and + dir_name.startswith('v')): + ver = dir_name + break + # Set .NET versions for specified MSVC++ version if self.vc_ver >= 12.0: frameworkver = (ver, 'v4.0') @@ -810,7 +838,10 @@ def VCLibraries(self): """ Microsoft Visual C++ & Microsoft Foundation Class Libraries """ - arch_subdir = self.pi.target_dir(hidex86=True) + if self.vc_ver >= 15.0: + arch_subdir = self.pi.target_dir(x64=True) + else: + arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] if self.vc_ver >= 14.0: @@ -840,10 +871,20 @@ def VCTools(self): if arch_subdir: tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.vc_ver >= 14.0: + if self.vc_ver == 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) tools += [os.path.join(si.VCInstallDir, path)] + elif self.vc_ver >= 15.0: + host_dir = (r'bin\HostX86%s' if self.pi.current_is_x86() else + r'bin\HostX64%s') + tools += [os.path.join( + si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))] + + if self.pi.current_cpu != self.pi.target_cpu: + tools += [os.path.join( + si.VCInstallDir, host_dir % self.pi.current_dir(x64=True))] + else: tools += [os.path.join(si.VCInstallDir, 'Bin')] @@ -933,8 +974,11 @@ def SdkTools(self): """ Microsoft Windows SDK Tools """ - bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' - tools = [os.path.join(self.si.WindowsSdkDir, bin_dir)] + if self.vc_ver < 15.0: + bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' + tools = [os.path.join(self.si.WindowsSdkDir, bin_dir)] + else: + tools = [] if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) @@ -949,6 +993,12 @@ def SdkTools(self): path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir tools += [os.path.join(self.si.WindowsSdkDir, path)] + elif self.vc_ver >= 15.0: + path = os.path.join(self.si.WindowsSdkDir, 'Bin') + arch_subdir = self.pi.current_dir(x64=True) + sdkver = self._get_content_dirname(path, slash=False) + tools += [os.path.join(path, r'%s%s' % (sdkver, arch_subdir))] + if self.si.WindowsSDKExecutablePath: tools += [self.si.WindowsSDKExecutablePath] @@ -1023,10 +1073,21 @@ def MSBuild(self): """ if self.vc_ver < 12.0: return [] + elif self.vc_ver < 15.0: + base_path = self.si.ProgramFilesx86 + arch_subdir = self.pi.current_dir(hidex86=True) + else: + base_path = self.si.VSInstallDir + arch_subdir = '' - arch_subdir = self.pi.current_dir(hidex86=True) path = r'MSBuild\%0.1f\bin%s' % (self.vc_ver, arch_subdir) - return [os.path.join(self.si.ProgramFilesx86, path)] + build = [os.path.join(base_path, path)] + + if self.vc_ver >= 15.0: + # Add Roslyn C# & Visual Basic Compiler + build += [os.path.join(base_path, path, 'Roslyn')] + + return build @property def HTMLHelpWorkshop(self): @@ -1170,7 +1231,7 @@ def _unique_everseen(self, iterable, key=None): seen_add(k) yield element - def _get_content_dirname(self, path): + def _get_content_dirname(self, path, slash=True): """ Return name of the first dir in path or '' if no dir found. @@ -1178,6 +1239,8 @@ def _get_content_dirname(self, path): ---------- path: str Path where search dir. + slash: bool + If not True, only return "name" not "name\" Return ------ @@ -1187,7 +1250,10 @@ def _get_content_dirname(self, path): try: name = os.listdir(path) if name: - return '%s\\' % name[0] + name = name[0] + if slash: + return '%s\\' % name + return name return '' except (OSError, IOError): return '' From 282d7d354900dbae5724feb9af1ad7bbf617220e Mon Sep 17 00:00:00 2001 From: Jim Fulton Date: Fri, 24 Mar 2017 12:55:03 -0400 Subject: [PATCH 6528/8469] fixed incomplete import of packaging.specifiers and packaging.version This fixes: #997 --- setuptools/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index be55dc4e65..71c6c28864 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -14,7 +14,8 @@ import six from six.moves import map -import packaging +import packaging.specifiers +import packaging.version from setuptools.depends import Require from setuptools import windows_support From b4d9046f6d0f9edc1afaba9a91c919026532ca43 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Mar 2017 11:44:09 -0400 Subject: [PATCH 6529/8469] Update changelog. Ref #998. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index cef2ddb1c4..54eba03623 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v34.3.3 +------- + +* #967 (and #997): Explicitly import submodules of + packaging to account for environments where the imports + of those submodules is not implied by other behavior. + v34.3.2 ------- From e05b6ae26868626d84ac8eb13955fbed0894e160 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Mar 2017 11:44:25 -0400 Subject: [PATCH 6530/8469] =?UTF-8?q?Bump=20version:=2034.3.2=20=E2=86=92?= =?UTF-8?q?=2034.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8a7aeabd66..7fcd65be09 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.3.2 +current_version = 34.3.3 commit = True tag = True diff --git a/setup.py b/setup.py index 825b2f94b9..100acfaa3b 100755 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.3.2", + version="34.3.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 943833d493a95061c4c432337e7133aa311ccdba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 21:32:37 -0400 Subject: [PATCH 6531/8469] Update docs to use jaraco.packaging.sphinx to grab metadata from the package. --- docs/conf.py | 64 ++++++++++++------------------------------- docs/requirements.txt | 5 ++-- 2 files changed, 20 insertions(+), 49 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index fe684271ef..1b1bb5fbe6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,18 +18,11 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# Allow Sphinx to find the setup command that is imported below, as referenced above. -import os -import sys -sys.path.append(os.path.abspath('..')) - -import setup as setup_script - # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['rst.linker', 'sphinx.ext.autosectionlabel'] +extensions = ['rst.linker', 'sphinx.ext.autosectionlabel', 'jaraco.packaging.sphinx'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -40,19 +33,6 @@ # The master toctree document. master_doc = 'index' -# General information about the project. -project = 'Setuptools' -copyright = '2009-2014, The fellowship of the packaging' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = setup_script.setup_params['version'] -# The full version, including alpha/beta/rc tags. -release = setup_script.setup_params['version'] - # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] @@ -69,13 +49,6 @@ # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_theme'] -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = "Setuptools documentation" - -# A shorter title for the navigation bar. Default is the same as html_title. -html_short_title = "Setuptools" - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. html_use_smartypants = True @@ -89,9 +62,6 @@ # If false, no index is generated. html_use_index = False -# Output file base name for HTML help builder. -htmlhelp_basename = 'Setuptoolsdoc' - # -- Options for LaTeX output -------------------------------------------------- # Grouping the document tree into LaTeX files. List of tuples @@ -109,60 +79,60 @@ ), replace=[ dict( - pattern=r"(Issue )?#(?P\d+)", - url='{GH}/pypa/setuptools/issues/{issue}', + pattern=r'(Issue )?#(?P\d+)', + url='{package_url}/issues/{issue}', ), dict( - pattern=r"BB Pull Request ?#(?P\d+)", + pattern=r'BB Pull Request ?#(?P\d+)', url='{BB}/pypa/setuptools/pull-request/{bb_pull_request}', ), dict( - pattern=r"Distribute #(?P\d+)", + pattern=r'Distribute #(?P\d+)', url='{BB}/tarek/distribute/issue/{distribute}', ), dict( - pattern=r"Buildout #(?P\d+)", + pattern=r'Buildout #(?P\d+)', url='{GH}/buildout/buildout/issues/{buildout}', ), dict( - pattern=r"Old Setuptools #(?P\d+)", + pattern=r'Old Setuptools #(?P\d+)', url='http://bugs.python.org/setuptools/issue{old_setuptools}', ), dict( - pattern=r"Jython #(?P\d+)", + pattern=r'Jython #(?P\d+)', url='http://bugs.jython.org/issue{jython}', ), dict( - pattern=r"Python #(?P\d+)", + pattern=r'Python #(?P\d+)', url='http://bugs.python.org/issue{python}', ), dict( - pattern=r"Interop #(?P\d+)", + pattern=r'Interop #(?P\d+)', url='{GH}/pypa/interoperability-peps/issues/{interop}', ), dict( - pattern=r"Pip #(?P\d+)", + pattern=r'Pip #(?P\d+)', url='{GH}/pypa/pip/issues/{pip}', ), dict( - pattern=r"Packaging #(?P\d+)", + pattern=r'Packaging #(?P\d+)', url='{GH}/pypa/packaging/issues/{packaging}', ), dict( - pattern=r"[Pp]ackaging (?P\d+(\.\d+)+)", + pattern=r'[Pp]ackaging (?P\d+(\.\d+)+)', url='{GH}/pypa/packaging/blob/{packaging_ver}/CHANGELOG.rst', ), dict( - pattern=r"PEP[- ](?P\d+)", + pattern=r'PEP[- ](?P\d+)', url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', ), dict( - pattern=r"setuptools_svn #(?P\d+)", + pattern=r'setuptools_svn #(?P\d+)', url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}', ), dict( - pattern=r"^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n", - with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", + pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', + with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', ), ], ), diff --git a/docs/requirements.txt b/docs/requirements.txt index 4be418877c..7333deddab 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ -rst.linker>=1.6.1 -sphinx>=1.4 +sphinx +rst.linker>=1.9 +jaraco.packaging>=3.2 From 23d74941204535bd08aec7699566865d810b52f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 21:45:19 -0400 Subject: [PATCH 6532/8469] Require a late version of setuptools to allow the docs to invoke setup.py --- docs/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7333deddab..2138c88492 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,5 @@ sphinx rst.linker>=1.9 jaraco.packaging>=3.2 + +setuptools>=34 From 52c58bedd49552359993b533fcd86da4ff58b0c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 22:06:23 -0400 Subject: [PATCH 6533/8469] Add hack to invoke bootstrap script so that setup.py --version can be invoked. --- docs/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 1b1bb5fbe6..36d3f24c06 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,6 +18,11 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. + +# hack to run the bootstrap script so that jaraco.packaging.sphinx +# can invoke setup.py +exec(open('../bootstrap.py').read()) + # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions From b6bf75575644f8cb5457618a5a2c8e35e152052b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 22:15:03 -0400 Subject: [PATCH 6534/8469] Check for egg info dir relative to setup.py --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 100acfaa3b..77abf59395 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,8 @@ def require_metadata(): "Prevent improper installs without necessary metadata. See #659" - if not os.path.exists('setuptools.egg-info'): + egg_info_dir = os.path.join(here, 'setuptools.egg-info') + if not os.path.exists(egg_info_dir): msg = ( "Cannot build setuptools without metadata. " "Install rwt and run `rwt -- bootstrap.py`." From c9587fe384a2eab6e9d81408abb58936d15286ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 22:18:49 -0400 Subject: [PATCH 6535/8469] Try running bootstrap in subprocess in order to be in the project root. --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 36d3f24c06..6119ad1206 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,6 +21,9 @@ # hack to run the bootstrap script so that jaraco.packaging.sphinx # can invoke setup.py +import subprocess +import sys +subprocess.Popen([sys.executable, 'bootstrap.py'], cwd='..') exec(open('../bootstrap.py').read()) # -- General configuration ----------------------------------------------------- From 74329a7fa2a482309e4eb244b3920e28a76cfcbf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 22:23:04 -0400 Subject: [PATCH 6536/8469] Remove excess hack --- docs/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 6119ad1206..15061ecfea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,6 @@ import subprocess import sys subprocess.Popen([sys.executable, 'bootstrap.py'], cwd='..') -exec(open('../bootstrap.py').read()) # -- General configuration ----------------------------------------------------- From b10187e1fa7f602d7f5cc75821d14b494625aef9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 30 Mar 2017 22:38:03 -0400 Subject: [PATCH 6537/8469] Make sure bootstrap finishes before continuing, and ensure that jaraco.packaging.sphinx is run before rst.linker. --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 15061ecfea..7f781fef60 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,13 +23,13 @@ # can invoke setup.py import subprocess import sys -subprocess.Popen([sys.executable, 'bootstrap.py'], cwd='..') +subprocess.check_call([sys.executable, 'bootstrap.py'], cwd='..') # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['rst.linker', 'sphinx.ext.autosectionlabel', 'jaraco.packaging.sphinx'] +extensions = ['jaraco.packaging.sphinx', 'rst.linker', 'sphinx.ext.autosectionlabel'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 332b586b7c65dee7e9a2dbbcbc1c896f4a862a3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 31 Mar 2017 08:22:38 -0400 Subject: [PATCH 6538/8469] Hack must genuflect to the arbitrory invocation location --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 7f781fef60..28f86da432 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,9 @@ # can invoke setup.py import subprocess import sys -subprocess.check_call([sys.executable, 'bootstrap.py'], cwd='..') +import os +proj_root = os.path.join(os.path.dirname(__file__), os.path.pardir) +subprocess.check_call([sys.executable, 'bootstrap.py'], cwd=proj_root) # -- General configuration ----------------------------------------------------- From e8ca95c2e12f46e203715194e4729f8b33de2c23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 31 Mar 2017 08:27:33 -0400 Subject: [PATCH 6539/8469] Constrain hack to the RTD environment. Rely on bootstrap routine to make dependencies available. --- docs/conf.py | 13 ++++++++----- docs/requirements.txt | 2 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 28f86da432..f7d02303cc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,14 +18,17 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. - -# hack to run the bootstrap script so that jaraco.packaging.sphinx -# can invoke setup.py import subprocess import sys import os -proj_root = os.path.join(os.path.dirname(__file__), os.path.pardir) -subprocess.check_call([sys.executable, 'bootstrap.py'], cwd=proj_root) + + +# hack to run the bootstrap script so that jaraco.packaging.sphinx +# can invoke setup.py +'READTHEDOCS' in os.environ and subprocess.check_call( + [sys.executable, 'bootstrap.py'], + cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), +) # -- General configuration ----------------------------------------------------- diff --git a/docs/requirements.txt b/docs/requirements.txt index 2138c88492..7333deddab 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,3 @@ sphinx rst.linker>=1.9 jaraco.packaging>=3.2 - -setuptools>=34 From bdbe0776c19646e703bd0b89ad3f33e6797256a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 31 Mar 2017 08:35:09 -0400 Subject: [PATCH 6540/8469] Although bootstrap.py is installing the deps, it removes them as well, so doc builds still require build deps. --- docs/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7333deddab..2138c88492 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,5 @@ sphinx rst.linker>=1.9 jaraco.packaging>=3.2 + +setuptools>=34 From abaf7c4dd76c56eb509f6a5f6caa2f8e886801b6 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Fri, 7 Apr 2017 13:42:51 +0200 Subject: [PATCH 6541/8469] Fixes #999: support python_requires, py_modules in configuration files --- docs/setuptools.txt | 2 ++ setuptools/config.py | 1 + setuptools/dist.py | 4 +++- setuptools/tests/test_config.py | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f0da6e1d96..bf5bb8cecc 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2425,6 +2425,7 @@ zip_safe bool setup_requires list-semi install_requires list-semi extras_require section +python_requires str entry_points file:, section use_2to3 bool use_2to3_fixers list-comma @@ -2440,6 +2441,7 @@ package_dir dict package_data section exclude_package_data section namespace_packages list-comma +py_modules list-comma ======================= ===== .. note:: diff --git a/setuptools/config.py b/setuptools/config.py index 39a01f88b7..252f2deb34 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -462,6 +462,7 @@ def parsers(self): 'tests_require': parse_list_semicolon, 'packages': self._parse_packages, 'entry_points': self._parse_file, + 'py_modules': parse_list, } def _parse_packages(self, value): diff --git a/setuptools/dist.py b/setuptools/dist.py index 71c6c28864..fd1d28c226 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -166,7 +166,7 @@ def check_specifier(dist, attr, value): packaging.specifiers.SpecifierSet(value) except packaging.specifiers.InvalidSpecifier as error: tmpl = ( - "{attr!r} must be a string or list of strings " + "{attr!r} must be a string " "containing valid version specifiers; {error}" ) raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) @@ -353,6 +353,8 @@ def parse_config_files(self, filenames=None): _Distribution.parse_config_files(self, filenames=filenames) parse_configuration(self, self.command_options) + if getattr(self, 'python_requires', None): + self.metadata.python_requires = self.python_requires def parse_command_line(self): """Process features after parsing command line options""" diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 799fb165c2..8bd2a49428 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -312,6 +312,8 @@ def test_basic(self, tmpdir): 'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n' 'dependency_links = http://some.com/here/1, ' 'http://some.com/there/2\n' + 'python_requires = >=1.0, !=2.8\n' + 'py_modules = module1, module2\n' ) with get_dist(tmpdir) as dist: assert dist.zip_safe @@ -340,6 +342,8 @@ def test_basic(self, tmpdir): 'there' ]) assert dist.tests_require == ['mock==0.7.2', 'pytest'] + assert dist.python_requires == '>=1.0, !=2.8' + assert dist.py_modules == ['module1', 'module2'] def test_multiline(self, tmpdir): fake_env( From b504713684e8adeff8bcaeafec5196ec7806c558 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Fri, 7 Apr 2017 16:33:40 +0200 Subject: [PATCH 6542/8469] Update changelog. Ref #1007. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 54eba03623..12d4cc58ec 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v34.4.0 +------- + +* #999 via #1007: Extend support for declarative package + config in a setup.cfg file to include the options + ``python_requires`` and ``py_modules``. + v34.3.3 ------- From ac59ef12d16c13533ead6401bdb4727016be77e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 21:52:18 -0400 Subject: [PATCH 6543/8469] extract two functions for guessing the VC version; ref #995 --- setuptools/msvc.py | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 71fe24cd31..cf556ad3be 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -530,22 +530,7 @@ def VCInstallDir(self): """ self.VSInstallDir - # Default path starting VS2017 - guess_vc = '' - if self.vc_ver > 14.0: - default = r'VC\Tools\MSVC' - guess_vc = os.path.join(self.VSInstallDir, default) - # Subdir with VC exact version as name - try: - vc_exact_ver = os.listdir(guess_vc)[-1] - guess_vc = os.path.join(guess_vc, vc_exact_ver) - except (OSError, IOError, IndexError): - guess_vc = '' - - # Legacy default path - if not guess_vc: - default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver - guess_vc = os.path.join(self.ProgramFilesx86, default) + guess_vc = self._guess_vc() or self._guess_vc_legacy() # Try to get "VC++ for Python" path from registry as default path reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) @@ -561,6 +546,30 @@ def VCInstallDir(self): return path + def _guess_vc(self): + """ + Locate Visual C for 2017 + """ + + if self.vc_ver <= 14.0: + return + + default = r'VC\Tools\MSVC' + guess_vc = os.path.join(self.VSInstallDir, default) + # Subdir with VC exact version as name + try: + vc_exact_ver = os.listdir(guess_vc)[-1] + return os.path.join(guess_vc, vc_exact_ver) + except (OSError, IOError, IndexError): + pass + + def _guess_vc_legacy(self): + """ + Locate Visual C for versions prior to 2017 + """ + default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver + return os.path.join(self.ProgramFilesx86, default) + @property def WindowsSdkVersion(self): """ From 934d6707b1d8c55c930d458e39b11038e9276a4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:07:30 -0400 Subject: [PATCH 6544/8469] Extract method for finding .Net in the framework folder. Ref #995. --- setuptools/msvc.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index cf556ad3be..1588cd2ec1 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -753,17 +753,9 @@ def _find_dot_net_versions(self, bits=32): Platform number of bits: 32 or 64. """ # Find actual .NET version in registry - ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) or '' - - # If nothing in registry, look in Framework folder - if not ver: - dot_net_dir = (self.FrameworkDir32 if bits == 32 else - self.FrameworkDir64) - for dir_name in reversed(os.listdir(dot_net_dir)): - if (os.path.isdir(os.path.join(dot_net_dir, dir_name)) and - dir_name.startswith('v')): - ver = dir_name - break + reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) + dot_net_dir = getattr(self, 'FrameworkDir%d' % bits) + ver = reg_ver or self._find_dot_net_in(dot_net_dir) or '' # Set .NET versions for specified MSVC++ version if self.vc_ver >= 12.0: @@ -777,6 +769,18 @@ def _find_dot_net_versions(self, bits=32): frameworkver = ('v3.0', 'v2.0.50727') return frameworkver + def _find_dot_net_in(self, dot_net_dir): + """ + Find .Net in the Framework folder + """ + matching_dirs = ( + dir_name + for dir_name in reversed(os.listdir(dot_net_dir)) + if os.path.isdir(os.path.join(dot_net_dir, dir_name)) + and dir_name.startswith('v') + ) + return next(matching_dirs, None) + class EnvironmentInfo: """ From 9430e92f888a7c41f295373bd8a6ef8af967e2e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:19:06 -0400 Subject: [PATCH 6545/8469] Move initialization into a single location. Ref #995. --- setuptools/msvc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 1588cd2ec1..baf2021e13 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -987,11 +987,11 @@ def SdkTools(self): """ Microsoft Windows SDK Tools """ + tools = [] + if self.vc_ver < 15.0: bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' - tools = [os.path.join(self.si.WindowsSdkDir, bin_dir)] - else: - tools = [] + tools += [os.path.join(self.si.WindowsSdkDir, bin_dir)] if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) From 3fa9efcbb390b87304ddc64551e9fca823694773 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:23:18 -0400 Subject: [PATCH 6546/8469] Extract generator for simpler syntax. Ref #995. --- setuptools/msvc.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index baf2021e13..c5a8aea00d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -987,16 +987,17 @@ def SdkTools(self): """ Microsoft Windows SDK Tools """ - tools = [] + return list(self._sdk_tools()) + def _sdk_tools(self): if self.vc_ver < 15.0: bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' - tools += [os.path.join(self.si.WindowsSdkDir, bin_dir)] + yield os.path.join(self.si.WindowsSdkDir, bin_dir) if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir - tools += [os.path.join(self.si.WindowsSdkDir, path)] + yield os.path.join(self.si.WindowsSdkDir, path) if self.vc_ver == 10.0 or self.vc_ver == 11.0: if self.pi.target_is_x86(): @@ -1004,18 +1005,16 @@ def SdkTools(self): else: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir - tools += [os.path.join(self.si.WindowsSdkDir, path)] + yield os.path.join(self.si.WindowsSdkDir, path) elif self.vc_ver >= 15.0: path = os.path.join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) sdkver = self._get_content_dirname(path, slash=False) - tools += [os.path.join(path, r'%s%s' % (sdkver, arch_subdir))] + yield os.path.join(path, r'%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: - tools += [self.si.WindowsSDKExecutablePath] - - return tools + yield self.si.WindowsSDKExecutablePath @property def SdkSetup(self): From f357a32fdc9ce8e6a862efcbb9a0229f6f0a685c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:30:49 -0400 Subject: [PATCH 6547/8469] Simplify _get_content_dirname by simply removing the trailing backslash. Ref #995. --- setuptools/msvc.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index c5a8aea00d..9a9118346a 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1010,7 +1010,7 @@ def _sdk_tools(self): elif self.vc_ver >= 15.0: path = os.path.join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) - sdkver = self._get_content_dirname(path, slash=False) + sdkver = self._get_content_dirname(path).rstrip('\\') yield os.path.join(path, r'%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: @@ -1243,7 +1243,7 @@ def _unique_everseen(self, iterable, key=None): seen_add(k) yield element - def _get_content_dirname(self, path, slash=True): + def _get_content_dirname(self, path): """ Return name of the first dir in path or '' if no dir found. @@ -1251,8 +1251,6 @@ def _get_content_dirname(self, path, slash=True): ---------- path: str Path where search dir. - slash: bool - If not True, only return "name" not "name\" Return ------ @@ -1262,10 +1260,7 @@ def _get_content_dirname(self, path, slash=True): try: name = os.listdir(path) if name: - name = name[0] - if slash: - return '%s\\' % name - return name + return '%s\\' % name[0] return '' except (OSError, IOError): return '' From cd13a8c0c4ee765a8bd083863338dec4ba618d08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:33:28 -0400 Subject: [PATCH 6548/8469] Remove unnecessary raw string. Ref #995. --- setuptools/msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 9a9118346a..35c02129e6 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1011,7 +1011,7 @@ def _sdk_tools(self): path = os.path.join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) sdkver = self._get_content_dirname(path).rstrip('\\') - yield os.path.join(path, r'%s%s' % (sdkver, arch_subdir)) + yield os.path.join(path, '%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: yield self.si.WindowsSDKExecutablePath From 76ac9dcbc17a4d04c201667f47c8ee040ef5c8ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:36:51 -0400 Subject: [PATCH 6549/8469] Update changelog. Ref #995. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index cef2ddb1c4..37098e8c22 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v34.4.0 +------- + +* #995: In MSVC support, add support for Microsoft + Build Tools 2017. + v34.3.2 ------- From 315e8ffaa3886e7988ff29238e5240bc33317eea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 7 Apr 2017 22:40:46 -0400 Subject: [PATCH 6550/8469] =?UTF-8?q?Bump=20version:=2034.3.3=20=E2=86=92?= =?UTF-8?q?=2034.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7fcd65be09..fcade157dc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.3.3 +current_version = 34.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index 77abf59395..0ccc663117 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.3.3", + version="34.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f420bb2093f85d3aa34e732c42133b0e2e06ecd9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 10:18:31 -0400 Subject: [PATCH 6551/8469] Let the default vc_min_ver represent the most lenient, degenerate limit. --- setuptools/msvc.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 35c02129e6..75745e67b6 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -806,15 +806,14 @@ class EnvironmentInfo: # Variables and properties in this class use originals CamelCase variables # names from Microsoft source files for more easy comparaison. - def __init__(self, arch, vc_ver=None, vc_min_ver=None): + def __init__(self, arch, vc_ver=None, vc_min_ver=0): self.pi = PlatformInfo(arch) self.ri = RegistryInfo(self.pi) self.si = SystemInfo(self.ri, vc_ver) - if vc_min_ver: - if self.vc_ver < vc_min_ver: - err = 'No suitable Microsoft Visual C++ version found' - raise distutils.errors.DistutilsPlatformError(err) + if self.vc_ver < vc_min_ver: + err = 'No suitable Microsoft Visual C++ version found' + raise distutils.errors.DistutilsPlatformError(err) @property def vc_ver(self): From 66177c944536aab86994f6df7172c0d9d6acb5cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 10:20:47 -0400 Subject: [PATCH 6552/8469] Extract private method for locating latest available vc ver. --- setuptools/msvc.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 75745e67b6..d739178b1d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -472,14 +472,14 @@ class SystemInfo: def __init__(self, registry_info, vc_ver=None): self.ri = registry_info self.pi = self.ri.pi - if vc_ver: - self.vc_ver = vc_ver - else: - try: - self.vc_ver = self.find_available_vc_vers()[-1] - except IndexError: - err = 'No Microsoft Visual C++ version found' - raise distutils.errors.DistutilsPlatformError(err) + self.vc_ver = vc_ver or self._find_latest_available_vc_ver() + + def _find_latest_available_vc_ver(self): + try: + return self.find_available_vc_vers()[-1] + except IndexError: + err = 'No Microsoft Visual C++ version found' + raise distutils.errors.DistutilsPlatformError(err) def find_available_vc_vers(self): """ From c86965048dee300bc4d985afc72e5de7267658b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 10:29:23 -0400 Subject: [PATCH 6553/8469] spaces for consistency --- setuptools/py27compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index f0a80a8eda..4b6fae912f 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -20,8 +20,8 @@ def get_all_headers(message, key): linux_py2_ascii = ( - platform.system() == 'Linux' and - sys.version_info < (3,) + platform.system() == 'Linux' and + sys.version_info < (3,) ) rmtree_safe = str if linux_py2_ascii else lambda x: x From 1d928cbc7b2cfcf1ffd2ec27f83ee33f0af39dfe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 10:35:00 -0400 Subject: [PATCH 6554/8469] Use six to detect Python 2 --- setuptools/py27compat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 4b6fae912f..701283c8c1 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -2,9 +2,10 @@ Compatibility Support for Python 2.7 and earlier """ -import sys import platform +import six + def get_all_headers(message, key): """ @@ -13,15 +14,14 @@ def get_all_headers(message, key): return message.get_all(key) -if sys.version_info < (3,): - +if six.PY2: def get_all_headers(message, key): return message.getheaders(key) linux_py2_ascii = ( platform.system() == 'Linux' and - sys.version_info < (3,) + six.PY2 ) rmtree_safe = str if linux_py2_ascii else lambda x: x From b50fdf497d6970002a2f7156650d7da21e2e39f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 10:44:34 -0400 Subject: [PATCH 6555/8469] In msvc9_query_vcvarsall, ensure dict values are not unicode. Fixes #992. --- CHANGES.rst | 7 +++++++ setuptools/msvc.py | 5 ++++- setuptools/py27compat.py | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 081e2cfed0..85ba8cbffb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v34.4.1 +------- + +* #992: In msvc.msvc9_query_vcvarsall, ensure the + returned dicts have str values and not Unicode for + compatibilty with os.environ. + v34.4.0 ------- diff --git a/setuptools/msvc.py b/setuptools/msvc.py index d739178b1d..1e7a32774d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -26,6 +26,7 @@ from six.moves import filterfalse from .monkey import get_unpatched +from . import py27compat if platform.system() == 'Windows': from six.moves import winreg @@ -134,11 +135,13 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): # If error, try to set environment directly try: - return EnvironmentInfo(arch, ver).return_env() + env = EnvironmentInfo(arch, ver).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, ver, arch) raise + return py27compat.make_dict_values_strings(env) + def msvc14_get_vc_env(plat_spec): """ diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 701283c8c1..0f92488945 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -26,3 +26,17 @@ def get_all_headers(message, key): rmtree_safe = str if linux_py2_ascii else lambda x: x """Workaround for http://bugs.python.org/issue24672""" + + +def dict_values_strings(dict_): + """ + Given a dict, make sure the text values are str. + """ + if six.PY3: + return dict_ + + # When dropping Python 2.6 support, use a dict constructor + return dict( + (key, str(value)) + for key, value in dict_.iteritems() + ) From 6ab912d1f676604d71e8e2090d262002f78929d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Apr 2017 11:23:32 -0400 Subject: [PATCH 6556/8469] Correct typo. Ref #992. --- setuptools/msvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 1e7a32774d..3970bfaf8c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -140,7 +140,7 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): _augment_exception(exc, ver, arch) raise - return py27compat.make_dict_values_strings(env) + return py27compat.dict_values_strings(env) def msvc14_get_vc_env(plat_spec): From fe3deeeebd6d5f01e803ea6bbfcf001834ca45b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Apr 2017 11:13:51 -0400 Subject: [PATCH 6557/8469] Nicer syntax for processing PYTHONPATH --- setuptools/command/easy_install.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ef83f7aed2..55d2656011 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1349,9 +1349,16 @@ def _expand(self, *attrs): def get_site_dirs(): - # return a list of 'site' dirs - sitedirs = [_f for _f in os.environ.get('PYTHONPATH', - '').split(os.pathsep) if _f] + """ + Return a list of 'site' dirs + """ + + sitedirs = [] + + # start with PYTHONPATH + pythonpath_items = os.environ.get('PYTHONPATH', '').split(os.pathsep) + sitedirs.extend(filter(None, pythonpath_items)) + prefixes = [sys.prefix] if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) From 3b18e07289d1cd4cdd046d46c244d77938732e5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Apr 2017 11:24:25 -0400 Subject: [PATCH 6558/8469] Consolidate technique for reading PYTHONPATH. --- setuptools/command/easy_install.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 55d2656011..e30ca3ac16 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -474,8 +474,7 @@ def check_site_dir(self): else: self.pth_file = None - PYTHONPATH = os.environ.get('PYTHONPATH', '').split(os.pathsep) - if instdir not in map(normalize_path, filter(None, PYTHONPATH)): + if instdir not in map(normalize_path, _pythonpath()): # only PYTHONPATH dirs need a site.py, so pretend it's there self.sitepy_installed = True elif self.multi_version and not os.path.exists(pth_file): @@ -1348,6 +1347,11 @@ def _expand(self, *attrs): setattr(self, attr, val) +def _pythonpath(): + items = os.environ.get('PYTHONPATH', '').split(os.pathsep) + return filter(None, items) + + def get_site_dirs(): """ Return a list of 'site' dirs @@ -1356,8 +1360,7 @@ def get_site_dirs(): sitedirs = [] # start with PYTHONPATH - pythonpath_items = os.environ.get('PYTHONPATH', '').split(os.pathsep) - sitedirs.extend(filter(None, pythonpath_items)) + sitedirs.extend(_pythonpath()) prefixes = [sys.prefix] if sys.exec_prefix != sys.prefix: From a1aa1be06bdef8824c8954bb74dc9a57f324f826 Mon Sep 17 00:00:00 2001 From: JGoutin Date: Mon, 10 Apr 2017 17:56:48 +0200 Subject: [PATCH 6559/8469] Fixes for Visual Studio 2017 - VCRuntimeRedist new path since VS2017. - Use always last Windows SDK and UCRT SDK when more than one version are available. - Minors docstrings changes. Tested with "Visual Studio 2017 Community" and "Visual Studio Build Tools 2017". --- setuptools/msvc.py | 130 +++++++++++++++++++++++++++------------------ 1 file changed, 79 insertions(+), 51 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 3970bfaf8c..3110eaffe3 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -4,15 +4,16 @@ Known supported compilers: -------------------------- Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); - Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Microsoft Windows SDK 6.1 (x86, x64, ia64) + Microsoft Windows SDK 7.0 (x86, x64, ia64) Microsoft Visual C++ 10.0: Microsoft Windows SDK 7.1 (x86, x64, ia64) Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) """ @@ -96,7 +97,7 @@ def msvc9_find_vcvarsall(version): def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ - Patched "distutils.msvc9compiler.query_vcvarsall" for support standalones + Patched "distutils.msvc9compiler.query_vcvarsall" for support extra compilers. Set environment without use of "vcvarsall.bat". @@ -104,9 +105,9 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): Known supported compilers ------------------------- Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); - Microsoft Windows SDK 7.0 (x86, x64, ia64); + Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Microsoft Windows SDK 6.1 (x86, x64, ia64) + Microsoft Windows SDK 7.0 (x86, x64, ia64) Microsoft Visual C++ 10.0: Microsoft Windows SDK 7.1 (x86, x64, ia64) @@ -145,7 +146,7 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): def msvc14_get_vc_env(plat_spec): """ - Patched "distutils._msvccompiler._get_vc_env" for support standalones + Patched "distutils._msvccompiler._get_vc_env" for support extra compilers. Set environment without use of "vcvarsall.bat". @@ -154,6 +155,7 @@ def msvc14_get_vc_env(plat_spec): ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) + Microsoft Visual Studio 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) Parameters @@ -553,7 +555,6 @@ def _guess_vc(self): """ Locate Visual C for 2017 """ - if self.vc_ver <= 14.0: return @@ -576,9 +577,8 @@ def _guess_vc_legacy(self): @property def WindowsSdkVersion(self): """ - Microsoft Windows SDK versions. + Microsoft Windows SDK versions for specified MSVC++ version. """ - # Set Windows SDK versions for specified MSVC++ version if self.vc_ver <= 9.0: return ('7.0', '6.1', '6.0a') elif self.vc_ver == 10.0: @@ -590,6 +590,14 @@ def WindowsSdkVersion(self): elif self.vc_ver >= 14.0: return ('10.0', '8.1') + @property + def WindowsSdkLastVersion(self): + """ + Microsoft Windows SDK last version + """ + return self._use_last_dir_name(os.path.join( + self.WindowsSdkDir, 'lib')) + @property def WindowsSdkDir(self): """ @@ -687,6 +695,14 @@ def UniversalCRTSdkDir(self): break return sdkdir or '' + @property + def UniversalCRTSdkLastVersion(self): + """ + Microsoft Universal C Runtime SDK last version + """ + return self._use_last_dir_name(os.path.join( + self.UniversalCRTSdkDir, 'lib')) + @property def NetFxSdkVersion(self): """ @@ -746,7 +762,7 @@ def FrameworkVersion64(self): """ return self._find_dot_net_versions(64) - def _find_dot_net_versions(self, bits=32): + def _find_dot_net_versions(self, bits): """ Find Microsoft .NET Framework versions. @@ -758,7 +774,7 @@ def _find_dot_net_versions(self, bits=32): # Find actual .NET version in registry reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) dot_net_dir = getattr(self, 'FrameworkDir%d' % bits) - ver = reg_ver or self._find_dot_net_in(dot_net_dir) or '' + ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or '' # Set .NET versions for specified MSVC++ version if self.vc_ver >= 12.0: @@ -772,17 +788,24 @@ def _find_dot_net_versions(self, bits=32): frameworkver = ('v3.0', 'v2.0.50727') return frameworkver - def _find_dot_net_in(self, dot_net_dir): + def _use_last_dir_name(self, path, prefix=''): """ - Find .Net in the Framework folder + Return name of the last dir in path or '' if no dir found. + + Parameters + ---------- + path: str + Use dirs in this path + prefix: str + Use only dirs startings by this prefix """ matching_dirs = ( dir_name - for dir_name in reversed(os.listdir(dot_net_dir)) - if os.path.isdir(os.path.join(dot_net_dir, dir_name)) - and dir_name.startswith('v') + for dir_name in reversed(os.listdir(path)) + if os.path.isdir(os.path.join(path, dir_name)) and + dir_name.startswith(prefix) ) - return next(matching_dirs, None) + return next(matching_dirs, None) or '' class EnvironmentInfo: @@ -917,8 +940,8 @@ def OSLibraries(self): else: arch_subdir = self.pi.target_dir(x64=True) lib = os.path.join(self.si.WindowsSdkDir, 'lib') - libver = self._get_content_dirname(lib) - return [os.path.join(lib, '%sum%s' % (libver, arch_subdir))] + libver = self._sdk_subdir + return [os.path.join(lib, '%sum%s' % (libver , arch_subdir))] @property def OSIncludes(self): @@ -932,7 +955,7 @@ def OSIncludes(self): else: if self.vc_ver >= 14.0: - sdkver = self._get_content_dirname(include) + sdkver = self._sdk_subdir else: sdkver = '' return [os.path.join(include, '%sshared' % sdkver), @@ -992,6 +1015,9 @@ def SdkTools(self): return list(self._sdk_tools()) def _sdk_tools(self): + """ + Microsoft Windows SDK Tools paths generator + """ if self.vc_ver < 15.0: bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' yield os.path.join(self.si.WindowsSdkDir, bin_dir) @@ -1012,12 +1038,20 @@ def _sdk_tools(self): elif self.vc_ver >= 15.0: path = os.path.join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) - sdkver = self._get_content_dirname(path).rstrip('\\') + sdkver = self.si.WindowsSdkLastVersion yield os.path.join(path, '%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: yield self.si.WindowsSDKExecutablePath + @property + def _sdk_subdir(self): + """ + Microsoft Windows SDK version subdir + """ + ucrtver = self.si.WindowsSdkLastVersion + return ('%s\\' % ucrtver) if ucrtver else '' + @property def SdkSetup(self): """ @@ -1116,27 +1150,34 @@ def HTMLHelpWorkshop(self): @property def UCRTLibraries(self): """ - Microsoft Universal CRT Libraries + Microsoft Universal C Runtime SDK Libraries """ if self.vc_ver < 14.0: return [] arch_subdir = self.pi.target_dir(x64=True) lib = os.path.join(self.si.UniversalCRTSdkDir, 'lib') - ucrtver = self._get_content_dirname(lib) + ucrtver = self._ucrt_subdir return [os.path.join(lib, '%sucrt%s' % (ucrtver, arch_subdir))] @property def UCRTIncludes(self): """ - Microsoft Universal CRT Include + Microsoft Universal C Runtime SDK Include """ if self.vc_ver < 14.0: return [] include = os.path.join(self.si.UniversalCRTSdkDir, 'include') - ucrtver = self._get_content_dirname(include) - return [os.path.join(include, '%sucrt' % ucrtver)] + return [os.path.join(include, '%sucrt' % self._ucrt_subdir)] + + @property + def _ucrt_subdir(self): + """ + Microsoft Universal C Runtime SDK version subdir + """ + ucrtver = self.si.UniversalCRTSdkLastVersion + return ('%s\\' % ucrtver) if ucrtver else '' @property def FSharp(self): @@ -1154,9 +1195,18 @@ def VCRuntimeRedist(self): Microsoft Visual C++ runtime redistribuable dll """ arch_subdir = self.pi.target_dir(x64=True) - vcruntime = 'redist%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' - vcruntime = vcruntime % (arch_subdir, self.vc_ver, self.vc_ver) - return os.path.join(self.si.VCInstallDir, vcruntime) + if self.vc_ver < 15: + redist_path = self.si.VCInstallDir + vcruntime = 'redist%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' + else: + redist_path = self.si.VCInstallDir.replace('\\Tools', '\\Redist') + vcruntime = 'onecore%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' + + # Visual Studio 2017 is still Visual C++ 14.0 + dll_ver = 14.0 if self.vc_ver == 15 else self.vc_ver + + vcruntime = vcruntime % (arch_subdir, self.vc_ver, dll_ver) + return os.path.join(redist_path, vcruntime) def return_env(self, exists=True): """ @@ -1244,25 +1294,3 @@ def _unique_everseen(self, iterable, key=None): if k not in seen: seen_add(k) yield element - - def _get_content_dirname(self, path): - """ - Return name of the first dir in path or '' if no dir found. - - Parameters - ---------- - path: str - Path where search dir. - - Return - ------ - foldername: str - "name\" or "" - """ - try: - name = os.listdir(path) - if name: - return '%s\\' % name[0] - return '' - except (OSError, IOError): - return '' From e7b62cfe6df1239f6ec5c00f9223799008a80502 Mon Sep 17 00:00:00 2001 From: JGoutin Date: Mon, 10 Apr 2017 18:02:02 +0200 Subject: [PATCH 6560/8469] Add #1008 changes --- CHANGES.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 85ba8cbffb..bf4daf760f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v34.4.2 +------- +* #1008: In MSVC support, use always the last version available for Windows SDK and UCRT SDK. +* #1008: In MSVC support, fix "vcruntime140.dll" returned path with Visual Studio 2017. + v34.4.1 ------- @@ -8,8 +13,7 @@ v34.4.1 v34.4.0 ------- -* #995: In MSVC support, add support for Microsoft - Build Tools 2017. +* #995: In MSVC support, add support for "Microsoft Visual Studio 2017" and "Microsoft Visual Studio Build Tools 2017". * #999 via #1007: Extend support for declarative package config in a setup.cfg file to include the options From 4489bc183b74a554356d9504816a15ad122726b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Apr 2017 12:03:47 -0400 Subject: [PATCH 6561/8469] Update whitespace for consistency and better rendering --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index bf4daf760f..f06a0c8537 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,6 @@ v34.4.2 ------- + * #1008: In MSVC support, use always the last version available for Windows SDK and UCRT SDK. * #1008: In MSVC support, fix "vcruntime140.dll" returned path with Visual Studio 2017. From 38ab8c0009f10e72c71cbdb1df56915e99459510 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Apr 2017 12:04:23 -0400 Subject: [PATCH 6562/8469] =?UTF-8?q?Bump=20version:=2034.4.0=20=E2=86=92?= =?UTF-8?q?=2034.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index fcade157dc..686da2f63b 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.4.0 +current_version = 34.4.1 commit = True tag = True diff --git a/setup.py b/setup.py index 0ccc663117..798cf845f1 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.4.0", + version="34.4.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 6f05117f5c66e1c77c3a55ac90f91779b72e1d5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Apr 2017 12:05:49 -0400 Subject: [PATCH 6563/8469] Update changelog to combine 34.4.1 and 34.4.2 as the former was never released. Ref #1008. --- CHANGES.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f06a0c8537..18583f0b89 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,11 +1,9 @@ -v34.4.2 +v34.4.1 ------- * #1008: In MSVC support, use always the last version available for Windows SDK and UCRT SDK. -* #1008: In MSVC support, fix "vcruntime140.dll" returned path with Visual Studio 2017. -v34.4.1 -------- +* #1008: In MSVC support, fix "vcruntime140.dll" returned path with Visual Studio 2017. * #992: In msvc.msvc9_query_vcvarsall, ensure the returned dicts have str values and not Unicode for From a9d403889def99bdb1a1d02b47b8247b3af0817a Mon Sep 17 00:00:00 2001 From: Igor Starikov Date: Wed, 12 Apr 2017 12:06:37 +0700 Subject: [PATCH 6564/8469] Docs: notes on setup.cfg and ez_setup (see # 1006) --- docs/setuptools.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index bf5bb8cecc..eb9fdbd3c4 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1176,6 +1176,8 @@ Distributing a ``setuptools``-based project Using ``setuptools``... Without bundling it! --------------------------------------------- +.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. + Your users might not have ``setuptools`` installed on their machines, or even if they do, it might not be the right version. Fixing this is easy; just download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` @@ -2277,6 +2279,11 @@ New in 20.1: Added keyring support. Configuring setup() using setup.cfg files ----------------------------------------- +.. note:: New in 30.3.0 (8 Dec 2016). + +.. important:: ``setup.py`` with ``setup()`` function call is still required even + if your configuration resides in ``setup.cfg``. + ``Setuptools`` allows using configuration files (usually `setup.cfg`) to define package’s metadata and other options which are normally supplied to ``setup()`` function. From 1955e5b0df67cc1aa389b8c655199958a6fcc6a0 Mon Sep 17 00:00:00 2001 From: Stefano Miccoli Date: Thu, 13 Apr 2017 22:57:56 +0200 Subject: [PATCH 6565/8469] addresses #436 --- setuptools/command/egg_info.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1a6ea9cb57..21bbfb72de 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -564,8 +564,6 @@ def add_defaults(self): rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) - elif os.path.exists(self.manifest): - self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info) From 7bb68f652d75c6a8585c95a75757ef6ca0b7d151 Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Fri, 14 Apr 2017 04:00:25 -0500 Subject: [PATCH 6566/8469] bpo-11913: Add README.rst to the distutils standard READMEs list (#563) --- command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sdist.py b/command/sdist.py index 180e28626d..52eaa15d47 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -96,7 +96,7 @@ def checking_metadata(self): sub_commands = [('check', checking_metadata)] - READMES = 'README', 'README.txt' + READMES = ('README', 'README.txt', 'README.rst') def initialize_options(self): # 'template' and 'manifest' are, respectively, the names of From 17720e7ce95523f013bca29ff5913e3317eb5ac1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Apr 2017 09:54:47 -0500 Subject: [PATCH 6567/8469] Update changelog. Ref #1014. --- CHANGES.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 18583f0b89..e6691486b2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +v35.0.0 +------- + +* #436: In egg_info.manifest_maker, no longer read + the file list from the manifest file, and instead + re-build it on each build. In this way, files removed + from the specification will not linger in the manifest. + As a result, any files manually added to the manifest + will be removed on subsequent egg_info invocations. + No projects should be manually adding files to the + manifest and should instead use MANIFEST.in or SCM + file finders to force inclusion of files in the manifest. + v34.4.1 ------- From 9869424e3e74a41e39563e9b4b507c760660673c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Apr 2017 09:55:06 -0500 Subject: [PATCH 6568/8469] =?UTF-8?q?Bump=20version:=2034.4.1=20=E2=86=92?= =?UTF-8?q?=2035.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 686da2f63b..57ca3d501f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 34.4.1 +current_version = 35.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 798cf845f1..328941c13d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="34.4.1", + version="35.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 862da01619666f94a56724180a31753bf98fd29d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Apr 2017 10:06:46 -0500 Subject: [PATCH 6569/8469] Mark failures as allowed. Ref #1015. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index adb2f948d7..fd18a33a0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,9 @@ matrix: env: LC_ALL=C LC_CTYPE=C - python: 2.7 env: LC_ALL=C LC_CTYPE=C + allow_failures: + # https://github.com/pypa/setuptools/issues/1015 + - python: nightly script: # need tox and rwt to get started - pip install tox rwt From 74b46ceaf9affd65da0ba0d2d56e58a85955a652 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Apr 2017 09:00:53 -0500 Subject: [PATCH 6570/8469] Revert "In msvc9_query_vcvarsall, ensure dict values are not unicode. Fixes #992." This reverts commit b50fdf497d6970002a2f7156650d7da21e2e39f5. --- setuptools/msvc.py | 5 +---- setuptools/py27compat.py | 14 -------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 3110eaffe3..84dcb2a78a 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -27,7 +27,6 @@ from six.moves import filterfalse from .monkey import get_unpatched -from . import py27compat if platform.system() == 'Windows': from six.moves import winreg @@ -136,13 +135,11 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): # If error, try to set environment directly try: - env = EnvironmentInfo(arch, ver).return_env() + return EnvironmentInfo(arch, ver).return_env() except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, ver, arch) raise - return py27compat.dict_values_strings(env) - def msvc14_get_vc_env(plat_spec): """ diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 0f92488945..701283c8c1 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -26,17 +26,3 @@ def get_all_headers(message, key): rmtree_safe = str if linux_py2_ascii else lambda x: x """Workaround for http://bugs.python.org/issue24672""" - - -def dict_values_strings(dict_): - """ - Given a dict, make sure the text values are str. - """ - if six.PY3: - return dict_ - - # When dropping Python 2.6 support, use a dict constructor - return dict( - (key, str(value)) - for key, value in dict_.iteritems() - ) From 0a32f2290aed6db34a142de0d5c0d607b60c6a05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Apr 2017 09:01:55 -0500 Subject: [PATCH 6571/8469] Update changelog. Ref #992. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e6691486b2..426622a1eb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v35.0.1 +------- + +* #992: Revert change introduced in v34.4.1, now + considered invalid. + v35.0.0 ------- From 58fa3b44e5130b0cf79523c876f46a07734db7ba Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Tue, 18 Apr 2017 17:10:47 +0200 Subject: [PATCH 6572/8469] Add an integration test to install pyuri This test is also a regression test for issue #1016. --- setuptools/tests/test_integration.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index cb62eb2957..2acec91b98 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -99,6 +99,21 @@ def test_python_novaclient(install_context): _install_one('python-novaclient', install_context, 'novaclient', 'base.py') + +def test_pyuri(install_context): + """ + Install the pyuri package (version 0.3.1 at the time of writing). + + This is also a regression test for issue #1016. + """ + _install_one('pyuri', install_context, 'pyuri', 'uri.py') + + pyuri = install_context.installed_projects['pyuri'] + + # The package data should be installed. + assert os.path.exists(os.path.join(pyuri.location, 'pyuri', 'uri.regex')) + + import re import subprocess import functools From 1163c86b3b62258f28964c2aee8483631a85c892 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Apr 2017 17:52:44 -0500 Subject: [PATCH 6573/8469] Revert "addresses #436". Fixes #1016. This reverts commit 1955e5b0df67cc1aa389b8c655199958a6fcc6a0. --- setuptools/command/egg_info.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 21bbfb72de..1a6ea9cb57 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -564,6 +564,8 @@ def add_defaults(self): rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) + elif os.path.exists(self.manifest): + self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info) From 07ca50a90f78bb8ffd499dd67a64cd2d021c1747 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Apr 2017 18:10:13 -0500 Subject: [PATCH 6574/8469] Update changelog. Ref #1016. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 426622a1eb..ebd183606a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,11 @@ v35.0.1 * #992: Revert change introduced in v34.4.1, now considered invalid. +* #1016: Revert change introduced in v35.0.0 per #1014, + referencing #436. The approach had unintended + consequences, causing sdist installs to be missing + files. + v35.0.0 ------- From 413d1e9a9585a5fe170c72b46fdd3ed4c094f848 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Apr 2017 18:10:23 -0500 Subject: [PATCH 6575/8469] =?UTF-8?q?Bump=20version:=2035.0.0=20=E2=86=92?= =?UTF-8?q?=2035.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 57ca3d501f..da62ac4fcf 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 35.0.0 +current_version = 35.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 328941c13d..df73251175 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="35.0.0", + version="35.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f1a9711815acab7e2d9c77b86b43117f72c5c78f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Apr 2017 18:32:40 -0500 Subject: [PATCH 6576/8469] Pass flags programmatically, avoiding deprecating trailing pattern flags syntax revealed in #1015. --- setuptools/command/egg_info.py | 3 ++- setuptools/tests/test_manifest.py | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 1a6ea9cb57..151e495be3 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -112,7 +112,8 @@ def translate_pattern(glob): if not last_chunk: pat += sep - return re.compile(pat + r'\Z(?ms)') + pat += r'\Z' + return re.compile(pat, flags=re.MULTILINE|re.DOTALL) class egg_info(Command): diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 3b34c88813..57347b5322 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -71,26 +71,26 @@ def get_pattern(glob): def test_translated_pattern_test(): l = make_local_path - assert get_pattern('foo') == r'foo\Z(?ms)' - assert get_pattern(l('foo/bar')) == l(r'foo\/bar\Z(?ms)') + assert get_pattern('foo') == r'foo\Z' + assert get_pattern(l('foo/bar')) == l(r'foo\/bar\Z') # Glob matching - assert get_pattern('*.txt') == l(r'[^\/]*\.txt\Z(?ms)') - assert get_pattern('dir/*.txt') == l(r'dir\/[^\/]*\.txt\Z(?ms)') - assert get_pattern('*/*.py') == l(r'[^\/]*\/[^\/]*\.py\Z(?ms)') + assert get_pattern('*.txt') == l(r'[^\/]*\.txt\Z') + assert get_pattern('dir/*.txt') == l(r'dir\/[^\/]*\.txt\Z') + assert get_pattern('*/*.py') == l(r'[^\/]*\/[^\/]*\.py\Z') assert get_pattern('docs/page-?.txt') \ - == l(r'docs\/page\-[^\/]\.txt\Z(?ms)') + == l(r'docs\/page\-[^\/]\.txt\Z') # Globstars change what they mean depending upon where they are - assert get_pattern(l('foo/**/bar')) == l(r'foo\/(?:[^\/]+\/)*bar\Z(?ms)') - assert get_pattern(l('foo/**')) == l(r'foo\/.*\Z(?ms)') - assert get_pattern(l('**')) == r'.*\Z(?ms)' + assert get_pattern(l('foo/**/bar')) == l(r'foo\/(?:[^\/]+\/)*bar\Z') + assert get_pattern(l('foo/**')) == l(r'foo\/.*\Z') + assert get_pattern(l('**')) == r'.*\Z' # Character classes - assert get_pattern('pre[one]post') == r'pre[one]post\Z(?ms)' - assert get_pattern('hello[!one]world') == r'hello[^one]world\Z(?ms)' - assert get_pattern('[]one].txt') == r'[\]one]\.txt\Z(?ms)' - assert get_pattern('foo[!]one]bar') == r'foo[^\]one]bar\Z(?ms)' + assert get_pattern('pre[one]post') == r'pre[one]post\Z' + assert get_pattern('hello[!one]world') == r'hello[^one]world\Z' + assert get_pattern('[]one].txt') == r'[\]one]\.txt\Z' + assert get_pattern('foo[!]one]bar') == r'foo[^\]one]bar\Z' class TempDirTestCase(object): From d8e1ed570126dfc99ed7f9126df3bfc890e7005d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Apr 2017 21:00:50 -0500 Subject: [PATCH 6577/8469] Rewrite tests to test the actual matching rather than making assertions about the regular expressions. Fixes #1015. --- .travis.yml | 3 - setuptools/tests/test_manifest.py | 103 ++++++++++++++++++++++++------ 2 files changed, 83 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd18a33a0d..adb2f948d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,6 @@ matrix: env: LC_ALL=C LC_CTYPE=C - python: 2.7 env: LC_ALL=C LC_CTYPE=C - allow_failures: - # https://github.com/pypa/setuptools/issues/1015 - - python: nightly script: # need tox and rwt to get started - pip install tox rwt diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 57347b5322..28cbca1a2d 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -6,6 +6,7 @@ import shutil import sys import tempfile +import itertools from distutils import log from distutils.errors import DistutilsTemplateError @@ -65,32 +66,94 @@ def touch(filename): ])) -def get_pattern(glob): - return translate_pattern(make_local_path(glob)).pattern - - -def test_translated_pattern_test(): - l = make_local_path - assert get_pattern('foo') == r'foo\Z' - assert get_pattern(l('foo/bar')) == l(r'foo\/bar\Z') +translate_specs = [ + ('foo', ['foo'], ['bar', 'foobar']), + ('foo/bar', ['foo/bar'], ['foo/bar/baz', './foo/bar', 'foo']), # Glob matching - assert get_pattern('*.txt') == l(r'[^\/]*\.txt\Z') - assert get_pattern('dir/*.txt') == l(r'dir\/[^\/]*\.txt\Z') - assert get_pattern('*/*.py') == l(r'[^\/]*\/[^\/]*\.py\Z') - assert get_pattern('docs/page-?.txt') \ - == l(r'docs\/page\-[^\/]\.txt\Z') + ('*.txt', ['foo.txt', 'bar.txt'], ['foo/foo.txt']), + ('dir/*.txt', ['dir/foo.txt', 'dir/bar.txt', 'dir/.txt'], ['notdir/foo.txt']), + ('*/*.py', ['bin/start.py'], []), + ('docs/page-?.txt', ['docs/page-9.txt'], ['docs/page-10.txt']), # Globstars change what they mean depending upon where they are - assert get_pattern(l('foo/**/bar')) == l(r'foo\/(?:[^\/]+\/)*bar\Z') - assert get_pattern(l('foo/**')) == l(r'foo\/.*\Z') - assert get_pattern(l('**')) == r'.*\Z' + ( + 'foo/**/bar', + ['foo/bing/bar', 'foo/bing/bang/bar', 'foo/bar'], + ['foo/abar'], + ), + ( + 'foo/**', + ['foo/bar/bing.py', 'foo/x'], + ['/foo/x'], + ), + ( + '**', + ['x', 'abc/xyz', '@nything'], + [], + ), # Character classes - assert get_pattern('pre[one]post') == r'pre[one]post\Z' - assert get_pattern('hello[!one]world') == r'hello[^one]world\Z' - assert get_pattern('[]one].txt') == r'[\]one]\.txt\Z' - assert get_pattern('foo[!]one]bar') == r'foo[^\]one]bar\Z' + ( + 'pre[one]post', + ['preopost', 'prenpost', 'preepost'], + ['prepost', 'preonepost'], + ), + + ( + 'hello[!one]world', + ['helloxworld', 'helloyworld'], + ['hellooworld', 'helloworld', 'hellooneworld'], + ), + + ( + '[]one].txt', + ['o.txt', '].txt', 'e.txt'], + ['one].txt'], + ), + + ( + 'foo[!]one]bar', + ['fooybar'], + ['foo]bar', 'fooobar', 'fooebar'], + ), + +] +""" +A spec of inputs for 'translate_pattern' and matches and mismatches +for that input. +""" + +match_params = itertools.chain.from_iterable( + zip(itertools.repeat(pattern), matches) + for pattern, matches, mismatches in translate_specs +) + + +@pytest.fixture(params=match_params) +def pattern_match(request): + return map(make_local_path, request.param) + + +mismatch_params = itertools.chain.from_iterable( + zip(itertools.repeat(pattern), mismatches) + for pattern, matches, mismatches in translate_specs +) + + +@pytest.fixture(params=mismatch_params) +def pattern_mismatch(request): + return map(make_local_path, request.param) + + +def test_translated_pattern_match(pattern_match): + pattern, target = pattern_match + assert translate_pattern(pattern).match(target) + + +def test_translated_pattern_mismatch(pattern_mismatch): + pattern, target = pattern_mismatch + assert not translate_pattern(pattern).match(target) class TempDirTestCase(object): From 9381f65a8ab5cd89e262e60bdac83834e1eafd22 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 25 Apr 2017 02:11:09 +0200 Subject: [PATCH 6578/8469] bpo-30132: distutils test_build_ext() uses temp_cwd() (#1278) test_build_ext() of test_distutils now uses support.temp_cwd() to prevent the creation of a pdb file in the current working directory on Windows. --- tests/test_build_ext.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index be7f5f38aa..96e5f03095 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -41,6 +41,13 @@ def build_ext(self, *args, **kwargs): return build_ext(*args, **kwargs) def test_build_ext(self): + # bpo-30132: On Windows, a .pdb file may be created in the current + # working directory. Create a temporary working directory to cleanup + # everything at the end of the test. + with support.temp_cwd(): + self._test_build_ext() + + def _test_build_ext(self): cmd = support.missing_compiler_executable() if cmd is not None: self.skipTest('The %r command is not found' % cmd) From b1cb67c743de2581f9393315b23777011c22ecf7 Mon Sep 17 00:00:00 2001 From: Nick Douma Date: Thu, 27 Apr 2017 11:44:56 +0200 Subject: [PATCH 6579/8469] Use a different method to lookup base classes on Jython Jython seems to implement inspect.getmro differently, which causes any classes with the same name as a class lower in the MRO not to be returned. This patch offloads the MRO lookup to a separate function, which implements different logic for Jython only. Ref #1024 --- setuptools/monkey.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 68fad9dd08..97ba159d03 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -21,6 +21,19 @@ """ +def get_mro(cls): + """Returns the bases classes for cls sorted by the MRO. + + Works around an issue on Jython where inspect.getmro will not return all + base classes if multiple classes share the same name. Instead, this + function will return a tuple containing the class itself, and the contents + of cls.__bases__ . + """ + if platform.python_implementation() != "Jython": + return inspect.getmro(cls) + return (cls,) + cls.__bases__ + + def get_unpatched(item): lookup = ( get_unpatched_class if isinstance(item, six.class_types) else @@ -38,7 +51,7 @@ def get_unpatched_class(cls): """ external_bases = ( cls - for cls in inspect.getmro(cls) + for cls in get_mro(cls) if not cls.__module__.startswith('setuptools') ) base = next(external_bases) From 8219fe5211aebbc8de8da9c988cc2a2b85b92829 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 27 Apr 2017 15:28:54 -0400 Subject: [PATCH 6580/8469] Make _get_mro private; Swap logic to put preferred behavior at top level; Update docstring to reference issue. --- setuptools/monkey.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 97ba159d03..acd0a4f41c 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -21,17 +21,18 @@ """ -def get_mro(cls): - """Returns the bases classes for cls sorted by the MRO. +def _get_mro(cls): + """ + Returns the bases classes for cls sorted by the MRO. Works around an issue on Jython where inspect.getmro will not return all base classes if multiple classes share the same name. Instead, this function will return a tuple containing the class itself, and the contents - of cls.__bases__ . + of cls.__bases__. See https://github.com/pypa/setuptools/issues/1024. """ - if platform.python_implementation() != "Jython": - return inspect.getmro(cls) - return (cls,) + cls.__bases__ + if platform.python_implementation() == "Jython": + return (cls,) + cls.__bases__ + return inspect.getmro(cls) def get_unpatched(item): @@ -51,7 +52,7 @@ def get_unpatched_class(cls): """ external_bases = ( cls - for cls in get_mro(cls) + for cls in _get_mro(cls) if not cls.__module__.startswith('setuptools') ) base = next(external_bases) From 81c15b5010c3005ec8d77e89a3f974e54be8d10f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 27 Apr 2017 15:31:43 -0400 Subject: [PATCH 6581/8469] Update changelog. Ref #1025. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index ebd183606a..d83eb9d8ee 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v35.0.2 +------- + +* #1024: Add workaround for Jython #2581 in monkey module. + v35.0.1 ------- From d2dfacad71021417cf2cf082d0687774c3188142 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 27 Apr 2017 15:36:34 -0400 Subject: [PATCH 6582/8469] Update changelog. Ref #1015. --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d83eb9d8ee..1ac719dfee 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,8 @@ v35.0.2 ------- +* #1015: Fix test failures on Python 3.7. + * #1024: Add workaround for Jython #2581 in monkey module. v35.0.1 From 44d2c01914baff076853f6402655589dde070703 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 27 Apr 2017 15:36:45 -0400 Subject: [PATCH 6583/8469] =?UTF-8?q?Bump=20version:=2035.0.1=20=E2=86=92?= =?UTF-8?q?=2035.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index da62ac4fcf..cb247aaf40 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 35.0.1 +current_version = 35.0.2 commit = True tag = True diff --git a/setup.py b/setup.py index df73251175..0d465cc888 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="35.0.1", + version="35.0.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 28091832dcb224724ef4d89eaa042ff6fea00746 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 2 May 2017 13:11:50 +0200 Subject: [PATCH 6584/8469] bpo-30132: distutils BuildExtTestCase use temp_cwd (#1380) BuildExtTestCase of test_distutils now uses support.temp_cwd() in setUp() to remove files created in the current working in all BuildExtTestCase unit tests, not only test_build_ext(). Move also tearDown() just after setUp(). --- tests/test_build_ext.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 96e5f03095..a72218274c 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -37,17 +37,28 @@ def setUp(self): from distutils.command import build_ext build_ext.USER_BASE = site.USER_BASE - def build_ext(self, *args, **kwargs): - return build_ext(*args, **kwargs) - - def test_build_ext(self): # bpo-30132: On Windows, a .pdb file may be created in the current # working directory. Create a temporary working directory to cleanup # everything at the end of the test. - with support.temp_cwd(): - self._test_build_ext() + self.temp_cwd = support.temp_cwd() + self.temp_cwd.__enter__() + self.addCleanup(self.temp_cwd.__exit__, None, None, None) + + def tearDown(self): + # Get everything back to normal + support.unload('xx') + sys.path = self.sys_path[0] + sys.path[:] = self.sys_path[1] + import site + site.USER_BASE = self.old_user_base + from distutils.command import build_ext + build_ext.USER_BASE = self.old_user_base + super(BuildExtTestCase, self).tearDown() - def _test_build_ext(self): + def build_ext(self, *args, **kwargs): + return build_ext(*args, **kwargs) + + def test_build_ext(self): cmd = support.missing_compiler_executable() if cmd is not None: self.skipTest('The %r command is not found' % cmd) @@ -91,17 +102,6 @@ def _test_build_ext(self): self.assertIsInstance(xx.Null(), xx.Null) self.assertIsInstance(xx.Str(), xx.Str) - def tearDown(self): - # Get everything back to normal - support.unload('xx') - sys.path = self.sys_path[0] - sys.path[:] = self.sys_path[1] - import site - site.USER_BASE = self.old_user_base - from distutils.command import build_ext - build_ext.USER_BASE = self.old_user_base - super(BuildExtTestCase, self).tearDown() - def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) cmd = self.build_ext(dist) From 37a5021a1e623c5edf1a6a01ba71d967c4b1a4d2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 4 May 2017 23:29:09 +0200 Subject: [PATCH 6585/8469] bpo-30273: Update sysconfig (#1464) The AST_H_DIR variable was removed from Makefile.pre.in by the commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b (bpo-23404). AST_H_DIR was hardcoded to "Include", so replace the removed variable by its content. Remove also ASDLGEN variable from sysconfig example since this variable was also removed. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 8bf1a7016b..90004acea8 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -97,7 +97,7 @@ def get_python_inc(plat_specific=0, prefix=None): if plat_specific: return base if _sys_home: - incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR')) + incdir = os.path.join(_sys_home, 'Include') else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) From b19c8614bc78fef2b48148e4ec4ea46274320416 Mon Sep 17 00:00:00 2001 From: Jeremy Kloth Date: Tue, 9 May 2017 09:24:13 -0600 Subject: [PATCH 6586/8469] bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) compiled out-of-tree (builddir != srcdir). (see also bpo-15366) --- sysconfig.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 90004acea8..2bcd1dd288 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -93,14 +93,11 @@ def get_python_inc(plat_specific=0, prefix=None): # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. - base = _sys_home or project_base if plat_specific: - return base - if _sys_home: - incdir = os.path.join(_sys_home, 'Include') + return _sys_home or project_base else: incdir = os.path.join(get_config_var('srcdir'), 'Include') - return os.path.normpath(incdir) + return os.path.normpath(incdir) python_dir = 'python' + get_python_version() + build_flags return os.path.join(prefix, "include", python_dir) elif os.name == "nt": From ddeea9fac9629e183c74a2a92199240a95714211 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 May 2017 14:26:16 -0400 Subject: [PATCH 6587/8469] Remove stale references to rwt. Ref #1018. --- .travis.yml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index adb2f948d7..a49822f804 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,8 @@ matrix: - python: 2.7 env: LC_ALL=C LC_CTYPE=C script: - # need tox and rwt to get started - - pip install tox rwt + # need tox to get started + - pip install tox # Output the env, to verify behavior - env diff --git a/setup.py b/setup.py index 0d465cc888..e222ba9350 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def require_metadata(): if not os.path.exists(egg_info_dir): msg = ( "Cannot build setuptools without metadata. " - "Install rwt and run `rwt -- bootstrap.py`." + "Install rwt and run `bootstrap.py`." ) raise RuntimeError(msg) From 6a645af13ac4ef4dd2c4012c47f8d21d529358a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 11 May 2017 14:32:38 -0400 Subject: [PATCH 6588/8469] Remove another reference to rwt. Ref #1018. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e222ba9350..6b9da273a6 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def require_metadata(): if not os.path.exists(egg_info_dir): msg = ( "Cannot build setuptools without metadata. " - "Install rwt and run `bootstrap.py`." + "Run `bootstrap.py`." ) raise RuntimeError(msg) From 094a8909470795a0a5c18a616a0cd2f4d10a19e2 Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Wed, 19 Apr 2017 10:26:11 +0200 Subject: [PATCH 6589/8469] Add bootstrap instructions to tox.ini This will help get new contributors started, if they're just used to running "tox". --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 6b43dcd80b..342b034e62 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,5 @@ +# Note: Run "python bootstrap.py" before running Tox, to generate metadata. + [testenv] deps= -rtests/requirements.txt From f60c81e570ec3187eeeb92c4ad4f0a788fdeaec6 Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Wed, 19 Apr 2017 13:41:34 +0200 Subject: [PATCH 6590/8469] Add snippet for running Tox against all supported Pythons --- tox.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tox.ini b/tox.ini index 342b034e62..c81a3391a2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,8 @@ # Note: Run "python bootstrap.py" before running Tox, to generate metadata. +# +# To run Tox against all supported Python interpreters, you can set: +# +# export TOXENV='py2{6,7},py3{3,4,5,6},pypy' [testenv] deps= From efcc426349bef47ff8698245af99e34e3489988d Mon Sep 17 00:00:00 2001 From: Pi Delport Date: Wed, 19 Apr 2017 13:43:54 +0200 Subject: [PATCH 6591/8469] Add the pytest cache directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ec3d0e3522..e8d18b31f5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ setuptools.egg-info *~ .hg* requirements.txt +.cache From d919999bf8c37b2efad7d6eb57ec2f5ff340799e Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Tue, 16 May 2017 11:13:30 +0300 Subject: [PATCH 6592/8469] Document -s to run single test Fixes https://github.com/pypa/setuptools/issues/1032 --- setuptools/command/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index e7a386d19d..29227d79ea 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -67,7 +67,7 @@ class test(Command): user_options = [ ('test-module=', 'm', "Run 'test_suite' in specified module"), ('test-suite=', 's', - "Test suite to run (e.g. 'some_module.test_suite')"), + "Run single test, case or suite (e.g. 'module.test_suite')"), ('test-runner=', 'r', "Test runner to use"), ] From 252748ea7dc284747562b5de212aba51d79a2479 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 18 May 2017 07:35:54 -0700 Subject: [PATCH 6593/8469] bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) * Replaced list() with list comprehension * Replaced dict() with dict comprehension * Replaced set() with set literal * Replaced builtin func() with func() when supported (e.g. any(), all(), tuple(), min(), & max()) --- msvc9compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvc9compiler.py b/msvc9compiler.py index 2119127622..c401ddc86e 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -255,7 +255,7 @@ def query_vcvarsall(version, arch="x86"): """Launch vcvarsall.bat and read the settings from its environment """ vcvarsall = find_vcvarsall(version) - interesting = set(("include", "lib", "libpath", "path")) + interesting = {"include", "lib", "libpath", "path"} result = {} if vcvarsall is None: From 7474f891cd5f62b0ef2af286096b47f8497e5d0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:08:53 -0400 Subject: [PATCH 6594/8469] Remove extraneous whitespace and empty comment --- setuptools/sandbox.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 41c1c3b19d..9c4ff33688 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -486,6 +486,3 @@ def __str__(self): support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available.""" % self.args - - -# From d6959fca54137c47abb9c3f7a0cbd1d0fd3704d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:12:01 -0400 Subject: [PATCH 6595/8469] Use dedent and left strip to store the template inside the class. --- setuptools/sandbox.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 9c4ff33688..4711fec216 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -7,6 +7,7 @@ import re import contextlib import pickle +import textwrap import six from six.moves import builtins, map @@ -476,13 +477,17 @@ def open(self, file, flags, mode=0o777, *args, **kw): class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" - def __str__(self): - return """SandboxViolation: %s%r %s + tmpl = textwrap.dedent(""" + SandboxViolation: %s%r %s + + The package setup script has attempted to modify files on your system + that are not within the EasyInstall build area, and has been aborted. -The package setup script has attempted to modify files on your system -that are not within the EasyInstall build area, and has been aborted. + This package cannot be safely installed by EasyInstall, and may not + support alternate installation locations even if you run its setup + script by hand. Please inform the package's author and the EasyInstall + maintainers to find out if a fix or workaround is available. + """).lstrip() -This package cannot be safely installed by EasyInstall, and may not -support alternate installation locations even if you run its setup -script by hand. Please inform the package's author and the EasyInstall -maintainers to find out if a fix or workaround is available.""" % self.args + def __str__(self): + return self.tmpl % self.args From c96c3ffba9f8a6ab43e6f3d57349a46e3076c374 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:30:58 -0400 Subject: [PATCH 6596/8469] Expand test to cover string rendering of SandboxViolation --- setuptools/tests/test_sandbox.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 929f0a5be8..2b3d859e80 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -126,3 +126,7 @@ def write_file(): assert cmd == 'open' assert args == ('/etc/foo', 'w') assert kwargs == {} + + msg = str(caught.value) + assert 'open' in msg + assert "('/etc/foo', 'w')" in msg From d48cb39b4666477da1d954d3604023095c233869 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:31:55 -0400 Subject: [PATCH 6597/8469] Use new style format strings and expand args to variables for better clarity of purpose. --- setuptools/sandbox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 4711fec216..53964f4b2b 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -478,7 +478,7 @@ class SandboxViolation(DistutilsError): """A setup script attempted to modify the filesystem outside the sandbox""" tmpl = textwrap.dedent(""" - SandboxViolation: %s%r %s + SandboxViolation: {cmd}{args!r} {kwargs} The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted. @@ -490,4 +490,5 @@ class SandboxViolation(DistutilsError): """).lstrip() def __str__(self): - return self.tmpl % self.args + cmd, args, kwargs = self.args + return self.tmpl.format(**locals()) From 20567bef2a36b259d2209cc76fd11a61ad288853 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:42:04 -0400 Subject: [PATCH 6598/8469] Implement AbstractSandbox as a context manager. --- setuptools/sandbox.py | 31 ++++++++++++++++--------------- setuptools/tests/test_sandbox.py | 4 ++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 53964f4b2b..14f18d74af 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -249,11 +249,9 @@ def run_setup(setup_script, args): setup_script.encode(sys.getfilesystemencoding()) ) - def runner(): + with DirectorySandbox(setup_dir): ns = dict(__file__=dunder_file, __name__='__main__') _execfile(setup_script, ns) - - DirectorySandbox(setup_dir).run(runner) except SystemExit as v: if v.args and v.args[0]: raise @@ -275,21 +273,24 @@ def _copy(self, source): for name in self._attrs: setattr(os, name, getattr(source, name)) + def __enter__(self): + self._copy(self) + if _file: + builtins.file = self._file + builtins.open = self._open + self._active = True + + def __exit__(self, exc_type, exc_value, traceback): + self._active = False + if _file: + builtins.file = _file + builtins.open = _open + self._copy(_os) + def run(self, func): """Run 'func' under os sandboxing""" - try: - self._copy(self) - if _file: - builtins.file = self._file - builtins.open = self._open - self._active = True + with self: return func() - finally: - self._active = False - if _file: - builtins.file = _file - builtins.open = _open - self._copy(_os) def _mk_dual_path_wrapper(name): original = getattr(_os, name) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 2b3d859e80..6b0400f374 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -12,8 +12,8 @@ class TestSandbox: def test_devnull(self, tmpdir): - sandbox = DirectorySandbox(str(tmpdir)) - sandbox.run(self._file_writer(os.devnull)) + with DirectorySandbox(str(tmpdir)): + self._file_writer(os.devnull) @staticmethod def _file_writer(path): From 8d3ed39696c5932a48b5f4a3768caa9f9e8c54b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:47:44 -0400 Subject: [PATCH 6599/8469] Just use class in its namespace --- setuptools/tests/test_sandbox.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 6b0400f374..a3f1206d5b 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -7,12 +7,11 @@ import pkg_resources import setuptools.sandbox -from setuptools.sandbox import DirectorySandbox class TestSandbox: def test_devnull(self, tmpdir): - with DirectorySandbox(str(tmpdir)): + with setuptools.sandbox.DirectorySandbox(str(tmpdir)): self._file_writer(os.devnull) @staticmethod @@ -116,11 +115,11 @@ def write_file(): with open('/etc/foo', 'w'): pass - sandbox = DirectorySandbox(str(tmpdir)) with pytest.raises(setuptools.sandbox.SandboxViolation) as caught: with setuptools.sandbox.save_modules(): setuptools.sandbox.hide_setuptools() - sandbox.run(write_file) + with setuptools.sandbox.DirectorySandbox(str(tmpdir)): + write_file() cmd, args, kwargs = caught.value.args assert cmd == 'open' From 4dc2c76b62a5071dfacf434555dfa8ec2be0b433 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 12:10:24 -0400 Subject: [PATCH 6600/8469] Temporarily pin backports.unittest_mock to 1.2 to bypass the issue reported in #1038. --- tests/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 88a36c635c..6e2e78e2a7 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,4 @@ pytest-flake8 pytest>=3.0.2 -backports.unittest_mock>=1.2 +# pinned to 1.2 as temporary workaround for #1038 +backports.unittest_mock>=1.2,<1.3 From daaeffc5ab0218a63c804ba873ce5d019aef4839 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 May 2017 19:55:50 -0400 Subject: [PATCH 6601/8469] Update changelog --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1ac719dfee..bc13fd8c6b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v36.0.0 +------- + +* #980 and others: Once again, Setuptools vendors all + of its dependencies. It seems to be the case that in + the Python ecosystem, all build tools must run without + any dependencies (build, runtime, or otherwise). At + such a point that a mechanism exists that allows + build tools to have dependencies, Setuptools will adopt + it. + v35.0.2 ------- From a9d902519680132493176106fe46aa9d77eafd10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 May 2017 19:57:57 -0400 Subject: [PATCH 6602/8469] =?UTF-8?q?Bump=20version:=2035.0.2=20=E2=86=92?= =?UTF-8?q?=2036.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index cb247aaf40..e39b524d21 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 35.0.2 +current_version = 36.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index ea9b7e741e..9250e073d4 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="35.0.2", + version="36.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 09902adaf5a3a279e991a23a8c25cdedea15a7e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 31 May 2017 11:54:50 -0400 Subject: [PATCH 6603/8469] Remove now unnecessary before_deploy step --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa26015f2f..6d6333f871 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,8 +27,6 @@ script: #- python -m tox - tox -before_deploy: - - pip install -r requirements.txt deploy: provider: pypi # Also update server in setup.cfg From 1cebea7e885c357d8f64a021bec4316b7993c50c Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 31 May 2017 21:29:05 -0400 Subject: [PATCH 6604/8469] fixed #1042 -- corrected an import --- setuptools/py27compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 701283c8c1..2985011b92 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -4,7 +4,7 @@ import platform -import six +from setuptools.extern import six def get_all_headers(message, key): From b00739278d9a82bfc032a523595662a7aac09fa7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jun 2017 09:00:23 -0400 Subject: [PATCH 6605/8469] Update changelog. Ref #1043. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index bc13fd8c6b..b2d1ed9a90 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.0.1 +------- + +* #1042: Fix import in py27compat module that still + referenced six directly, rather than through the externs + module (vendored packages hook). + v36.0.0 ------- From bf558e8d1f402c3ac9be74b96bb2002875e72581 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jun 2017 09:00:31 -0400 Subject: [PATCH 6606/8469] =?UTF-8?q?Bump=20version:=2036.0.0=20=E2=86=92?= =?UTF-8?q?=2036.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e39b524d21..b5199a625f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.0.0 +current_version = 36.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 9250e073d4..6eaac16ad5 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.0.0", + version="36.0.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f69469b16da3ab755ca9719a5e800b27aea80f62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jun 2017 09:15:12 -0400 Subject: [PATCH 6607/8469] Remove section on bootstrap branch, no longer relevant. --- docs/releases.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/releases.txt b/docs/releases.txt index c84ddd75e4..5a0d0b0141 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -12,21 +12,6 @@ is major, minor, or patch based on the scope of the changes in the release. Then, push the commits to the master branch. If tests pass, the release will be uploaded to PyPI (from the Python 3.5 tests). -Bootstrap Branch ----------------- - -Setuptools has a bootstrap script (ez_setup.py), which is hosted in the -repository in the ``bootstrap`` branch. - -Therefore, the latest bootstrap script can be retrieved by checking out -that branch. - -The officially-published location of the bootstrap script is hosted on Python -infrastructure (#python-infra on freenode) at https://bootstrap.pypa.io and -is updated every fifteen minutes from the bootstrap branch. Sometimes, -especially when the bootstrap script is rolled back, this -process doesn't work as expected and requires manual intervention. - Release Frequency ----------------- From f8cb9c6547de40234c67ba1caf56a7b63d11f07b Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Thu, 1 Jun 2017 14:48:46 +0100 Subject: [PATCH 6608/8469] Add a test that setuptools can be installed in a clean environment --- .travis.yml | 3 +++ clean_install.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 clean_install.sh diff --git a/.travis.yml b/.travis.yml index 6d6333f871..6c72e7311a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,9 @@ script: #- python -m tox - tox + # Check that setuptools can be installed in a clean environment + - ./clean_install.sh + deploy: provider: pypi # Also update server in setup.cfg diff --git a/clean_install.sh b/clean_install.sh new file mode 100755 index 0000000000..40bdd7d362 --- /dev/null +++ b/clean_install.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -o errexit +set -o xtrace + +# Create a temporary directory to install the virtualenv in +VENV_DIR="$(mktemp -d)" +function cleanup { rm -rf "$VENV_DIR" } +trap cleanup EXIT + +# Create a virtualenv that doesn't have pip or setuptools installed +wget https://raw.githubusercontent.com/pypa/virtualenv/master/virtualenv.py +python virtualenv.py --no-wheel --no-pip --no-setuptools "$VENV_DIR" +source "$VENV_DIR/bin/activate" + +# Now try to install setuptools +python bootstrap.py +python setup.py install From 1b6d0c8088123a5bb8adaeda567fd58834f58e24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jun 2017 11:09:08 -0400 Subject: [PATCH 6609/8469] Update release process to give guidance on updating the changelog prior to release. --- docs/releases.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/releases.txt b/docs/releases.txt index 5a0d0b0141..da0e31f5ed 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -7,10 +7,20 @@ mechanical technique for releases, enacted by Travis following a successful build of a tagged release per `PyPI deployment `_. +Prior to cutting a release, please check that the CHANGES.rst reflects +the summary of changes since the last release. +Ideally, these changelog entries would have been added +along with the changes, but it's always good to check. +Think about it from the +perspective of a user not involved with the development--what would +that person want to know about what has changed--or from the +perspective of your future self wanting to know when a particular +change landed. + To cut a release, install and run ``bumpversion {part}`` where ``part`` is major, minor, or patch based on the scope of the changes in the release. Then, push the commits to the master branch. If tests pass, -the release will be uploaded to PyPI (from the Python 3.5 tests). +the release will be uploaded to PyPI (from the Python 3.6 tests). Release Frequency ----------------- From 1b2a92e97875b66d2c6244a249f5ecd711b5a717 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jun 2017 11:19:13 -0400 Subject: [PATCH 6610/8469] Use bump2version for releases so that annotated tags are employed. --- docs/releases.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releases.txt b/docs/releases.txt index da0e31f5ed..30ea084fec 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -17,7 +17,7 @@ that person want to know about what has changed--or from the perspective of your future self wanting to know when a particular change landed. -To cut a release, install and run ``bumpversion {part}`` where ``part`` +To cut a release, install and run ``bump2version {part}`` where ``part`` is major, minor, or patch based on the scope of the changes in the release. Then, push the commits to the master branch. If tests pass, the release will be uploaded to PyPI (from the Python 3.6 tests). From 7a1aaef09c6964e8842f28b17da890d3da71d3e2 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Thu, 1 Jun 2017 18:06:14 +0100 Subject: [PATCH 6611/8469] Fix bash syntax error --- clean_install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clean_install.sh b/clean_install.sh index 40bdd7d362..28860f472e 100755 --- a/clean_install.sh +++ b/clean_install.sh @@ -5,7 +5,9 @@ set -o xtrace # Create a temporary directory to install the virtualenv in VENV_DIR="$(mktemp -d)" -function cleanup { rm -rf "$VENV_DIR" } +function cleanup() { + rm -rf "$VENV_DIR" +} trap cleanup EXIT # Create a virtualenv that doesn't have pip or setuptools installed From 3b443bc9ca9d7159f57fc232c97a4635ecb4086f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jun 2017 15:33:40 -0400 Subject: [PATCH 6612/8469] Use io.open when saving entry_points. --- bootstrap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index 24d7093c00..f3a12c0729 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -9,6 +9,7 @@ import sys import textwrap import subprocess +import io minimal_egg_info = textwrap.dedent(""" @@ -41,7 +42,7 @@ def build_egg_info(): """ os.mkdir('setuptools.egg-info') - with open('setuptools.egg-info/entry_points.txt', 'w') as ep: + with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep: ep.write(minimal_egg_info) From 6d739f2460f794cbf58eeaab2b9f86a3051e4e82 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 6 Jun 2017 01:47:35 +0800 Subject: [PATCH 6613/8469] Fix a typo: compatibilty -> compatibility --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b2d1ed9a90..2942c48fb5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -56,7 +56,7 @@ v34.4.1 * #992: In msvc.msvc9_query_vcvarsall, ensure the returned dicts have str values and not Unicode for - compatibilty with os.environ. + compatibility with os.environ. v34.4.0 ------- From 995d309317c6895a123c03df28bc8f51f6ead5f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Jun 2017 17:04:45 -0400 Subject: [PATCH 6614/8469] Limit the scope of deprecation of the upload_docs command. --- CHANGES.rst | 11 +++++++++++ setuptools/command/upload_docs.py | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b2d1ed9a90..35ee477658 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v36.1.0 +------- + +* Removed deprecation of and restored support for + ``upload_docs`` command for sites other than PyPI. + Only warehouse is dropping support, but services like + `devpi `_ continue to + support docs built by setuptools' plugins. See + `this comment `_ + for more context on the motivation for this change. + v36.0.1 ------- diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 24a017cfec..07aa564af4 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -57,7 +57,6 @@ def initialize_options(self): self.target_dir = None def finalize_options(self): - log.warn("Upload_docs command is deprecated. Use RTD instead.") upload.finalize_options(self) if self.upload_dir is None: if self.has_sphinx(): @@ -69,6 +68,8 @@ def finalize_options(self): else: self.ensure_dirname('upload_dir') self.target_dir = self.upload_dir + if 'pypi.python.org' in self.repository: + log.warn("Upload_docs command is deprecated. Use RTD instead.") self.announce('Using upload directory %s' % self.target_dir) def create_zipfile(self, filename): From 10a3ceecfca9bea3155e6be6eada811192e0fa16 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 10 Jun 2017 14:49:09 -0700 Subject: [PATCH 6615/8469] Rename [wheel] section to [bdist_wheel] as the former is legacy See: https://bitbucket.org/pypa/wheel/src/54ddbcc9cec25e1f4d111a142b8bfaa163130a61/wheel/bdist_wheel.py?fileviewer=file-view-default#bdist_wheel.py-119:125 http://pythonwheels.com/ --- setup.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b5199a625f..9facb308e9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -19,8 +19,7 @@ repository = https://upload.pypi.org/legacy/ [sdist] formats = zip -[wheel] +[bdist_wheel] universal = 1 [bumpversion:file:setup.py] - From 925dd35ec77d4cfd79c899f34255e3a753f33ca5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:03:23 -0400 Subject: [PATCH 6616/8469] Avoid race condition in ensure_directory. Ref #1083. --- CHANGES.rst | 3 +++ pkg_resources/__init__.py | 5 +++-- pkg_resources/py31compat.py | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 pkg_resources/py31compat.py diff --git a/CHANGES.rst b/CHANGES.rst index 35ee477658..1bae3f2587 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,9 @@ v36.1.0 ------- +* #1083: Avoid race condition on directory creation in + ``pkg_resources.ensure_directory``. + * Removed deprecation of and restored support for ``upload_docs`` command for sites other than PyPI. Only warehouse is dropping support, but services like diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2ed07c3dfe..51b4749261 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -67,6 +67,7 @@ except ImportError: importlib_machinery = None +from . import py31compat from pkg_resources.extern import appdirs from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') @@ -74,6 +75,7 @@ __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") @@ -2958,8 +2960,7 @@ def _find_adapter(registry, ob): def ensure_directory(path): """Ensure that the parent directory of `path` exists""" dirname = os.path.dirname(path) - if not os.path.isdir(dirname): - os.makedirs(dirname) + py31compat.makedirs(dirname, exist_ok=True) def _bypass_ensure_directory(path): diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py new file mode 100644 index 0000000000..28120cac74 --- /dev/null +++ b/pkg_resources/py31compat.py @@ -0,0 +1,17 @@ +import os +import errno +import sys + + +PY32 = sys.version_info >= (3, 2) + + +def _makedirs_31(path, exist_ok=False): + try: + os.makedirs(path) + except OSError as exc: + if exc.errno != errno.EEXIST: + raise + + +makedirs = os.makedirs if PY32 else _makedirs_31 From 902edffbbab6203a9b3d765485159208fa6e68c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:03:30 -0400 Subject: [PATCH 6617/8469] =?UTF-8?q?Bump=20version:=2036.0.1=20=E2=86=92?= =?UTF-8?q?=2036.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b5199a625f..10eed8456f 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.0.1 +current_version = 36.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 6eaac16ad5..c051fc1d22 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.0.1", + version="36.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 04a306fa080e8a71f94ea5198b507c501c621cb6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:13:54 -0400 Subject: [PATCH 6618/8469] Use makedirs with future compatibility throughout setuptools. Ref #1083. --- setuptools/command/easy_install.py | 5 ++--- setuptools/sandbox.py | 6 +++--- setuptools/tests/files.py | 6 ++++-- setuptools/tests/test_manifest.py | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e319f77cab..8fba7b4115 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -59,7 +59,7 @@ Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, VersionConflict, DEVELOP_DIST, ) -import pkg_resources +import pkg_resources.py31compat # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) @@ -544,8 +544,7 @@ def check_pth_processing(self): if ok_exists: os.unlink(ok_file) dirname = os.path.dirname(ok_file) - if not os.path.exists(dirname): - os.makedirs(dirname) + pkg_resources.py31compat.makedirs(dirname, exist_ok=True) f = open(pth_file, 'w') except (OSError, IOError): self.cant_write_to_target() diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index f99c13c400..1d981f497f 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -12,7 +12,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import builtins, map -import pkg_resources +import pkg_resources.py31compat if sys.platform.startswith('java'): import org.python.modules.posix.PosixModule as _os @@ -26,6 +26,7 @@ from distutils.errors import DistutilsError from pkg_resources import working_set + __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] @@ -73,8 +74,7 @@ def override_temp(replacement): """ Monkey-patch tempfile.tempdir with replacement, ensuring it exists """ - if not os.path.isdir(replacement): - os.makedirs(replacement) + pkg_resources.py31compat.makedirs(replacement, exist_ok=True) saved = tempfile.tempdir diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index 4364241baa..98de9fc341 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,6 +1,9 @@ import os +import pkg_resources.py31compat + + def build_files(file_defs, prefix=""): """ Build a set of files/directories, as described by the file_defs dictionary. @@ -24,8 +27,7 @@ def build_files(file_defs, prefix=""): for name, contents in file_defs.items(): full_name = os.path.join(prefix, name) if isinstance(contents, dict): - if not os.path.exists(full_name): - os.makedirs(full_name) + pkg_resources.py31compat.makedirs(full_name, exist_ok=True) build_files(contents, prefix=full_name) else: with open(full_name, 'w') as f: diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index ab9b3469ab..65eec7d93f 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -10,6 +10,7 @@ from distutils import log from distutils.errors import DistutilsTemplateError +import pkg_resources.py31compat from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution from setuptools.extern import six @@ -361,8 +362,7 @@ def make_files(self, files): for file in files: file = os.path.join(self.temp_dir, file) dirname, basename = os.path.split(file) - if not os.path.exists(dirname): - os.makedirs(dirname) + pkg_resources.py31compat.makedirs(dirname, exist_ok=True) open(file, 'w').close() def test_process_template_line(self): From 2cd7f22eb62b413d65fe4208d66f7e2738f71a56 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:16:51 -0400 Subject: [PATCH 6619/8469] Correctly honor exist_ok. Ref #1083. --- CHANGES.rst | 7 +++++++ pkg_resources/py31compat.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1bae3f2587..487accd918 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.1.1 +------- + +* #1083: Correct ``py31compat.makedirs`` to correctly honor + ``exist_ok`` parameter. +* #1083: Also use makedirs compatibility throughout setuptools. + v36.1.0 ------- diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index 28120cac74..c6217af75a 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -10,7 +10,7 @@ def _makedirs_31(path, exist_ok=False): try: os.makedirs(path) except OSError as exc: - if exc.errno != errno.EEXIST: + if not exist_ok or exc.errno != errno.EEXIST: raise From dd622e26da86651bf1f0506452c2c55eb1eb8f4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:23:07 -0400 Subject: [PATCH 6620/8469] Use unicode_literals in bootstrap script --- bootstrap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.py b/bootstrap.py index f3a12c0729..8c7d7fc3e6 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,6 +5,8 @@ egg-info command to flesh out the egg-info directory. """ +from __future__ import unicode_literals + import os import sys import textwrap From 387d0e532272855d19aaed536ad0d3096eebfb87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 14:59:22 -0400 Subject: [PATCH 6621/8469] Restrict use of os.makedirs to those with the security patch introduced in Python 3.2.6, 3.3.5, and 3.4.1 per https://bugs.python.org/issue21082. Ref #1082. --- pkg_resources/py31compat.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index c6217af75a..f8875aaa65 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -3,9 +3,6 @@ import sys -PY32 = sys.version_info >= (3, 2) - - def _makedirs_31(path, exist_ok=False): try: os.makedirs(path) @@ -14,4 +11,12 @@ def _makedirs_31(path, exist_ok=False): raise -makedirs = os.makedirs if PY32 else _makedirs_31 +# rely on compatibility behavior until mode considerations +# and exists_ok considerations are disentangled. +# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663 +needs_makedirs = ( + sys.version_info <= (3, 2, 6) or + (3, 3) <= sys.version_info <= (3, 3, 5) or + (3, 4) <= sys.version_info <= (3, 4, 1) +) +makedirs = os.makedirs if needs_makedirs else _makedirs_31 From b39dcbd12164cdd682aea2d39e298fe968dcf38e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 15:03:23 -0400 Subject: [PATCH 6622/8469] Correct bounds and boolean selector. --- pkg_resources/py31compat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index f8875aaa65..1e73ee3eb7 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -15,8 +15,8 @@ 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, 6) or - (3, 3) <= sys.version_info <= (3, 3, 5) or - (3, 4) <= sys.version_info <= (3, 4, 1) + sys.version_info < (3, 2, 6) or + (3, 3) <= sys.version_info < (3, 3, 5) or + (3, 4) <= sys.version_info < (3, 4, 1) ) -makedirs = os.makedirs if needs_makedirs else _makedirs_31 +makedirs = _makedirs_31 if needs_makedirs else os.makedirs From 7ef1a45b7eea578022a509a3ddca0c6ea8b97b27 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 15:09:41 -0400 Subject: [PATCH 6623/8469] Confusingly, the issue was fixed in a larger point release on Python 3.3 than on Python 3.2. --- pkg_resources/py31compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index 1e73ee3eb7..331a51bb0f 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -15,8 +15,8 @@ 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, 6) or - (3, 3) <= sys.version_info < (3, 3, 5) or + sys.version_info < (3, 2, 5) or + (3, 3) <= sys.version_info < (3, 3, 6) or (3, 4) <= sys.version_info < (3, 4, 1) ) makedirs = _makedirs_31 if needs_makedirs else os.makedirs From f8899569a5433f5d9027c294686a8b62215975c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 15:12:58 -0400 Subject: [PATCH 6624/8469] =?UTF-8?q?Bump=20version:=2036.1.0=20=E2=86=92?= =?UTF-8?q?=2036.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 10eed8456f..9046b41b0d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.1.0 +current_version = 36.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index c051fc1d22..42a4c069c2 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.1.0", + version="36.1.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 443e48d824c0dfd114dd6e92dc827159b2d5da52 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 08:23:57 +0200 Subject: [PATCH 6625/8469] tox: add xpassed tests to the report --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c3ea462b89..98005fa2a4 100644 --- a/tox.ini +++ b/tox.ini @@ -7,5 +7,5 @@ [testenv] deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR -commands=py.test {posargs:-rsx} +commands=py.test {posargs:-rsxX} usedevelop=True From aa43b11bff2450296da9c41e705d03b5c28bf5bf Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 08:49:55 +0200 Subject: [PATCH 6626/8469] tests: move py.test report arguments to pytest.ini So it's possible to run tox with something like: `py.test -k test_unicode_filename_in_sdist`, and not loose the default report arguments. --- pytest.ini | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 11a213db2b..16fdc5af87 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py +addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py -rsxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 diff --git a/tox.ini b/tox.ini index 98005fa2a4..4b4b4fd8ba 100644 --- a/tox.ini +++ b/tox.ini @@ -7,5 +7,5 @@ [testenv] deps=-rtests/requirements.txt passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR -commands=py.test {posargs:-rsxX} +commands=py.test {posargs} usedevelop=True From e992c1ae2eba0638f5d463da78acf476ec2c04f8 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 09:45:36 +0200 Subject: [PATCH 6627/8469] tests: fix `fail_on_ascii` fixture In my environment, with: - LANGUAGE=en_US:en_GB:en:C - LC_ALL=en_US.UTF-8 Running the testsuite with: - python3.6 -m pytest: is successful - tox -e py36: fails The later because LC_ALL is unset by tox, and LANGUAGE is not passed through, so `locale.getpreferredencoding()` returns 'ANSI_X3.4-1968'. --- setuptools/tests/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index dbf1620108..8ae4402dde 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -1,4 +1,5 @@ """Tests for the 'setuptools' package""" +import locale import sys import os import distutils.core @@ -16,8 +17,7 @@ from setuptools import Feature from setuptools.depends import Require -c_type = os.environ.get("LC_CTYPE", os.environ.get("LC_ALL")) -is_ascii = c_type in ("C", "POSIX") +is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968' fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") From 462610859692843e3bb6162befe978f14244eada Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 10:03:16 +0200 Subject: [PATCH 6628/8469] tests: mark test_unicode_filename_in_sdist with fail_on_ascii --- setuptools/tests/test_easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2d9682a965..1b7178a11a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -30,6 +30,7 @@ from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution import setuptools.tests.server +from setuptools.tests import fail_on_ascii import pkg_resources from .py26compat import tarfile_open @@ -166,6 +167,7 @@ def sdist_unicode(self, tmpdir): sdist_zip.close() return str(sdist) + @fail_on_ascii def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if From 100b73452e6e5e3b60ce8d0887e39f9af1d10899 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 15 Jun 2017 12:09:27 +0200 Subject: [PATCH 6629/8469] travis: fix ASCII builds Setting LC_ALL/LC_CTYPE=C does not work since LANG=en_US.UTF-8. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d6333f871..330e25a85d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,9 @@ python: matrix: include: - python: 3.6 - env: LC_ALL=C LC_CTYPE=C + env: LANG=C - python: 2.7 - env: LC_ALL=C LC_CTYPE=C + env: LANG=C script: # need tox to get started - pip install tox From 410317331922f1450322db993a1bc86de6ffbee1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 15:21:59 -0400 Subject: [PATCH 6630/8469] Add comment explaining additional needs for this test. --- clean_install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clean_install.sh b/clean_install.sh index 28860f472e..f8f80dc7c1 100755 --- a/clean_install.sh +++ b/clean_install.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +# This test was created in +# https://github.com/pypa/setuptools/pull/1050 +# but it really should be incorporated into the test suite +# such that it runs on Windows and doesn't depend on +# virtualenv. Moving to test_integration will likely address +# those concerns. + set -o errexit set -o xtrace From cf3e1b296a8d7cea519ef07b041c30ec891f9f18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 15:22:37 -0400 Subject: [PATCH 6631/8469] Move clean install test to tests dir. --- .travis.yml | 2 +- clean_install.sh => tests/clean_install.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename clean_install.sh => tests/clean_install.sh (100%) diff --git a/.travis.yml b/.travis.yml index 6c72e7311a..4a9a861f39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ script: - tox # Check that setuptools can be installed in a clean environment - - ./clean_install.sh + - tests/clean_install.sh deploy: provider: pypi diff --git a/clean_install.sh b/tests/clean_install.sh similarity index 100% rename from clean_install.sh rename to tests/clean_install.sh From 050808db513e54c12190d64d5ba0a1f6e8ad9590 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 10 Jul 2017 02:54:29 +0200 Subject: [PATCH 6632/8469] fix handling of environment markers in `install_requires` --- setuptools/dist.py | 34 ++++++++++++++++++++++++++++++- setuptools/tests/test_egg_info.py | 15 +++++++++----- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 6b97ed33c5..cb887ea612 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -8,6 +8,7 @@ import distutils.core import distutils.cmd import distutils.dist +from collections import defaultdict from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from distutils.util import rfc822_escape @@ -134,7 +135,13 @@ def check_extras(dist, attr, value): k, m = k.split(':', 1) if pkg_resources.invalid_marker(m): raise DistutilsSetupError("Invalid environment marker: " + m) - list(pkg_resources.parse_requirements(v)) + for r in pkg_resources.parse_requirements(v): + if r.marker: + tmpl = ( + "'extras_require' requirements cannot include " + "environment markers, in {section!r}: '{req!s}'" + ) + raise DistutilsSetupError(tmpl.format(section=k, req=r)) except (TypeError, ValueError, AttributeError): raise DistutilsSetupError( "'extras_require' must be a dictionary whose values are " @@ -346,6 +353,31 @@ def __init__(self, attrs=None): ) if getattr(self, 'python_requires', None): self.metadata.python_requires = self.python_requires + self._finalize_requires() + + def _finalize_requires(self): + """Move requirements in `install_requires` that + are using environment markers to `extras_require`. + """ + if not self.install_requires: + return + extras_require = defaultdict(list, ( + (k, list(pkg_resources.parse_requirements(v))) + for k, v in (self.extras_require or {}).items() + )) + install_requires = [] + for r in pkg_resources.parse_requirements(self.install_requires): + marker = r.marker + if not marker: + install_requires.append(r) + continue + r.marker = None + extras_require[':'+str(marker)].append(r) + self.extras_require = dict( + (k, [str(r) for r in v]) + for k, v in extras_require.items() + ) + self.install_requires = [str(r) for r in install_requires] def parse_config_files(self, filenames=None): """Parses configuration files from various levels diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a32b981d67..55df448974 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -185,8 +185,12 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base requires_txt = os.path.join(egg_info_dir, 'requires.txt') - assert "barbazquux;python_version<'2'" in open( - requires_txt).read().split('\n') + with open(requires_txt) as fp: + install_requires = fp.read() + assert install_requires.lstrip() == DALS(''' + [:python_version < "2"] + barbazquux + ''') assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_setup_requires_with_markers(self, tmpdir_cwd, env): @@ -202,10 +206,11 @@ def test_tests_require_with_markers(self, tmpdir_cwd, env): tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - def test_extra_requires_with_markers(self, tmpdir_cwd, env): + def test_extras_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( - """extra_requires={":python_version<'2'": ["barbazquux"]},""") - self._run_install_command(tmpdir_cwd, env) + """extras_require={"extra": ["barbazquux; python_version<'2'"]},""") + with pytest.raises(AssertionError): + self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_python_requires_egg_info(self, tmpdir_cwd, env): From 01d7c86c402253c306131e4891f47ff1266c9563 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 4 Jun 2017 00:59:33 +0300 Subject: [PATCH 6633/8469] Run build stages (pipelines) in Travis CI config Also: * enable pip cache * split script into install+script steps --- .travis.yml | 73 ++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 448d63125d..b3fccb9085 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,45 @@ language: python -python: - - 2.6 - - 2.7 - - 3.3 - - 3.4 - - 3.5 - - 3.6 - - nightly - - pypy -matrix: +jobs: + fast_finish: true include: - - python: 3.6 + - python: 2.6 + - python: &latest_py2 2.7 + - python: 3.3 + - python: 3.4 + - python: 3.5 + - python: &latest_py3 3.6 + - python: nightly + - python: pypy + - python: *latest_py3 env: LANG=C - - python: 2.7 + - python: *latest_py2 env: LANG=C -script: - # need tox to get started - - pip install tox + - stage: deploy (does actual deploy to PYPI only for tagged commits) + python: *latest_py3 + deploy: + provider: pypi + on: + tags: true + all_branches: true + user: jaraco + password: + secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= + distributions: release + skip_upload_docs: true - # Output the env, to verify behavior - - env +cache: pip - # update egg_info based on setup.py in checkout - - python bootstrap.py +install: +# need tox to get started +- pip install tox - #- python -m tox - - tox +# Output the env, to verify behavior +- env - # Check that setuptools can be installed in a clean environment - - tests/clean_install.sh +# update egg_info based on setup.py in checkout +- python bootstrap.py -deploy: - provider: pypi - # Also update server in setup.cfg - server: https://upload.pypi.org/legacy/ - on: - tags: true - all_branches: true - python: 3.6 - condition: $LC_ALL != "C" - user: jaraco - password: - secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= - distributions: release - skip_upload_docs: true +# Check that setuptools can be installed in a clean environment +- tests/clean_install.sh + +script: tox From ef5295f2e80c506c3355a7247047139e8f7b7365 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 4 Jun 2017 11:20:32 +0300 Subject: [PATCH 6634/8469] Don't run tests in deploy-only job --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b3fccb9085..bb09ad8e2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ jobs: env: LANG=C - stage: deploy (does actual deploy to PYPI only for tagged commits) python: *latest_py3 + install: skip + script: skip deploy: provider: pypi on: From 45d662b916b515d9c88db7a6cd53f3186530d56a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 14 Jul 2017 02:40:09 +0300 Subject: [PATCH 6635/8469] Explicitly ask Travis to use containers for jobs --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index bb09ad8e2f..08834232d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: python jobs: fast_finish: true From e82eadd1ff76b9aa3d5a8e472f48c054a296d8fe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 20:58:19 -0400 Subject: [PATCH 6636/8469] Restore test that includes an environment marker. --- setuptools/tests/test_egg_info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 55df448974..51648fff6d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -207,6 +207,12 @@ def test_tests_require_with_markers(self, tmpdir_cwd, env): assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_markers(self, tmpdir_cwd, env): + self._setup_script_with_requires( + """extras_require={":python_version<'2'": ["barbazquux"]},""") + self._run_install_command(tmpdir_cwd, env) + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_extras_require_with_markers_in_req(self, tmpdir_cwd, env): self._setup_script_with_requires( """extras_require={"extra": ["barbazquux; python_version<'2'"]},""") with pytest.raises(AssertionError): From 44233b1b8cecc77001dec43a2d86e6955d529f82 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:17:58 -0400 Subject: [PATCH 6637/8469] Extract the creation of the mismatch marker. --- setuptools/tests/test_egg_info.py | 34 +++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 51648fff6d..1376075c95 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -179,45 +179,53 @@ def _setup_script_with_requires(self, requires_line): 'setup.py': setup_script, }) + mismatch_marker = "python_version<'{this_ver}'".format( + this_ver=sys.version_info[0], + ) + def test_install_requires_with_markers(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """install_requires=["barbazquux;python_version<'2'"],""") + tmpl = 'install_requires=["barbazquux;{marker}"],' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base requires_txt = os.path.join(egg_info_dir, 'requires.txt') with open(requires_txt) as fp: install_requires = fp.read() assert install_requires.lstrip() == DALS(''' - [:python_version < "2"] + [:python_version < "{sys.version_info[0]}"] barbazquux - ''') + ''').format(sys=sys) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_setup_requires_with_markers(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """setup_requires=["barbazquux;python_version<'2'"],""") + tmpl = 'setup_requires=["barbazquux;{marker}"],' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_tests_require_with_markers(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """tests_require=["barbazquux;python_version<'2'"],""") + tmpl = 'tests_require=["barbazquux;{marker}"],' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) self._run_install_command( tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_markers(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """extras_require={":python_version<'2'": ["barbazquux"]},""") + tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_markers_in_req(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """extras_require={"extra": ["barbazquux; python_version<'2'"]},""") + tmpl = 'extras_require={{"extra": ["barbazquux; {marker}"]}},' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) with pytest.raises(AssertionError): self._run_install_command(tmpdir_cwd, env) - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( From 295dbf3043da95165683991d71c187c875daa600 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:20:02 -0400 Subject: [PATCH 6638/8469] extract variable for expected_requires. --- setuptools/tests/test_egg_info.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1376075c95..6358abf050 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -192,10 +192,11 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): requires_txt = os.path.join(egg_info_dir, 'requires.txt') with open(requires_txt) as fp: install_requires = fp.read() - assert install_requires.lstrip() == DALS(''' - [:python_version < "{sys.version_info[0]}"] - barbazquux - ''').format(sys=sys) + expected_requires = DALS(''' + [:python_version < "{sys.version_info[0]}"] + barbazquux + ''').format(sys=sys) + assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_setup_requires_with_markers(self, tmpdir_cwd, env): From 3cf29ecb38271ae0512273d561adebd03df023b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:27:43 -0400 Subject: [PATCH 6639/8469] Extract _check_extra function --- setuptools/dist.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index cb887ea612..c7f6d37134 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -8,6 +8,7 @@ import distutils.core import distutils.cmd import distutils.dist +import itertools from collections import defaultdict from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) @@ -130,7 +131,16 @@ def check_nsp(dist, attr, value): def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: - for k, v in value.items(): + list(itertools.starmap(_check_extra, value.items())) + except (TypeError, ValueError, AttributeError): + raise DistutilsSetupError( + "'extras_require' must be a dictionary whose values are " + "strings or lists of strings containing valid project/version " + "requirement specifiers." + ) + + +def _check_extra(k, v): if ':' in k: k, m = k.split(':', 1) if pkg_resources.invalid_marker(m): @@ -142,12 +152,6 @@ def check_extras(dist, attr, value): "environment markers, in {section!r}: '{req!s}'" ) raise DistutilsSetupError(tmpl.format(section=k, req=r)) - except (TypeError, ValueError, AttributeError): - raise DistutilsSetupError( - "'extras_require' must be a dictionary whose values are " - "strings or lists of strings containing valid project/version " - "requirement specifiers." - ) def assert_bool(dist, attr, value): From 8c00a37662c6f2ff3814d75d5569c02f83e411a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:28:13 -0400 Subject: [PATCH 6640/8469] Reindent --- setuptools/dist.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index c7f6d37134..1a475ed0d3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -141,17 +141,18 @@ def check_extras(dist, attr, value): def _check_extra(k, v): - if ':' in k: - k, m = k.split(':', 1) - if pkg_resources.invalid_marker(m): - raise DistutilsSetupError("Invalid environment marker: " + m) - for r in pkg_resources.parse_requirements(v): - if r.marker: - tmpl = ( - "'extras_require' requirements cannot include " - "environment markers, in {section!r}: '{req!s}'" - ) - raise DistutilsSetupError(tmpl.format(section=k, req=r)) + if ':' in k: + k, m = k.split(':', 1) + if pkg_resources.invalid_marker(m): + raise DistutilsSetupError("Invalid environment marker: " + m) + + for r in pkg_resources.parse_requirements(v): + if r.marker: + tmpl = ( + "'extras_require' requirements cannot include " + "environment markers, in {section!r}: '{req!s}'" + ) + raise DistutilsSetupError(tmpl.format(section=k, req=r)) def assert_bool(dist, attr, value): From dfe339ec3b1c2d0f463ed39f86c34c01ff8faedc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:31:31 -0400 Subject: [PATCH 6641/8469] Use better variable names and the partition method for simplicity. --- setuptools/dist.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 1a475ed0d3..5adbfd4e0f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -140,19 +140,18 @@ def check_extras(dist, attr, value): ) -def _check_extra(k, v): - if ':' in k: - k, m = k.split(':', 1) - if pkg_resources.invalid_marker(m): - raise DistutilsSetupError("Invalid environment marker: " + m) +def _check_extra(extra, reqs): + name, sep, marker = extra.partition(':') + if marker and pkg_resources.invalid_marker(marker): + raise DistutilsSetupError("Invalid environment marker: " + marker) - for r in pkg_resources.parse_requirements(v): + for r in pkg_resources.parse_requirements(reqs): if r.marker: tmpl = ( "'extras_require' requirements cannot include " "environment markers, in {section!r}: '{req!s}'" ) - raise DistutilsSetupError(tmpl.format(section=k, req=r)) + raise DistutilsSetupError(tmpl.format(section=name, req=r)) def assert_bool(dist, attr, value): From 1bbb027f369fb7dbf58a939bca57a9c8e9ecf8c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:43:49 -0400 Subject: [PATCH 6642/8469] Use filter and next to directly extract a single failure. --- setuptools/dist.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 5adbfd4e0f..619318f39c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -9,13 +9,14 @@ import distutils.cmd import distutils.dist import itertools +import operator from collections import defaultdict from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from distutils.util import rfc822_escape from setuptools.extern import six -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.specifiers') @@ -145,13 +146,16 @@ def _check_extra(extra, reqs): if marker and pkg_resources.invalid_marker(marker): raise DistutilsSetupError("Invalid environment marker: " + marker) - for r in pkg_resources.parse_requirements(reqs): - if r.marker: - tmpl = ( - "'extras_require' requirements cannot include " - "environment markers, in {section!r}: '{req!s}'" - ) - raise DistutilsSetupError(tmpl.format(section=name, req=r)) + # extras requirements cannot themselves have markers + parsed = pkg_resources.parse_requirements(reqs) + marked_reqs = filter(operator.attrgetter('marker'), parsed) + bad_req = next(marked_reqs, None) + if bad_req: + tmpl = ( + "'extras_require' requirements cannot include " + "environment markers, in {name!r}: '{bad_req!s}'" + ) + raise DistutilsSetupError(tmpl.format(**locals())) def assert_bool(dist, attr, value): From 986a8bce395c1a5b9e41a547d02eb09dd432e93e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:51:56 -0400 Subject: [PATCH 6643/8469] Delint --- setuptools/dist.py | 51 ++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 619318f39c..68c8747a76 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -11,17 +11,15 @@ import itertools import operator from collections import defaultdict -from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, - DistutilsSetupError) +from distutils.errors import ( + DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, +) from distutils.util import rfc822_escape from setuptools.extern import six from setuptools.extern.six.moves import map, filter from pkg_resources.extern import packaging -__import__('pkg_resources.extern.packaging.specifiers') -__import__('pkg_resources.extern.packaging.version') - from setuptools.depends import Require from setuptools import windows_support from setuptools.monkey import get_unpatched @@ -29,6 +27,9 @@ import pkg_resources from .py36compat import Distribution_parse_config_files +__import__('pkg_resources.extern.packaging.specifiers') +__import__('pkg_resources.extern.packaging.version') + def _get_unpatched(cls): warnings.warn("Do not call this function", DeprecationWarning) @@ -364,7 +365,8 @@ def __init__(self, attrs=None): self._finalize_requires() def _finalize_requires(self): - """Move requirements in `install_requires` that + """ + Move requirements in `install_requires` that are using environment markers to `extras_require`. """ if not self.install_requires: @@ -380,7 +382,7 @@ def _finalize_requires(self): install_requires.append(r) continue r.marker = None - extras_require[':'+str(marker)].append(r) + extras_require[':' + str(marker)].append(r) self.extras_require = dict( (k, [str(r) for r in v]) for k, v in extras_require.items() @@ -432,7 +434,10 @@ def finalize_options(self): ep.load()(self, ep.name, value) if getattr(self, 'convert_2to3_doctests', None): # XXX may convert to set here when we can rely on set being builtin - self.convert_2to3_doctests = [os.path.abspath(p) for p in self.convert_2to3_doctests] + self.convert_2to3_doctests = [ + os.path.abspath(p) + for p in self.convert_2to3_doctests + ] else: self.convert_2to3_doctests = [] @@ -476,7 +481,8 @@ def fetch_build_egg(self, req): opts['find_links'] = ('setup', links) install_dir = self.get_egg_cache_dir() cmd = easy_install( - dist, args=["x"], install_dir=install_dir, exclude_scripts=True, + dist, args=["x"], install_dir=install_dir, + exclude_scripts=True, always_copy=False, build_directory=None, editable=False, upgrade=False, multi_version=True, no_report=True, user=False ) @@ -501,8 +507,11 @@ def _set_global_opts_from_features(self): if not feature.include_by_default(): excdef, incdef = incdef, excdef - go.append(('with-' + name, None, 'include ' + descr + incdef)) - go.append(('without-' + name, None, 'exclude ' + descr + excdef)) + new = ( + ('with-' + name, None, 'include ' + descr + incdef), + ('without-' + name, None, 'exclude ' + descr + excdef), + ) + go.extend(new) no['without-' + name] = 'with-' + name self.global_options = self.feature_options = go + self.global_options @@ -530,7 +539,8 @@ def get_command_class(self, command): if command in self.cmdclass: return self.cmdclass[command] - for ep in pkg_resources.iter_entry_points('distutils.commands', command): + eps = pkg_resources.iter_entry_points('distutils.commands', command) + for ep in eps: ep.require(installer=self.fetch_build_egg) self.cmdclass[command] = cmdclass = ep.load() return cmdclass @@ -664,7 +674,8 @@ def _include_misc(self, name, value): name + ": this setting cannot be changed via include/exclude" ) else: - setattr(self, name, old + [item for item in value if item not in old]) + new = [item for item in value if item not in old] + setattr(self, name, old + new) def exclude(self, **attrs): """Remove items from distribution that are named in keyword arguments @@ -875,14 +886,14 @@ class Feature: @staticmethod def warn_deprecated(): - warnings.warn( + msg = ( "Features are deprecated and will be removed in a future " - "version. See https://github.com/pypa/setuptools/issues/65.", - DeprecationWarning, - stacklevel=3, + "version. See https://github.com/pypa/setuptools/issues/65." ) + warnings.warn(msg, DeprecationWarning, stacklevel=3) - def __init__(self, description, standard=False, available=True, + def __init__( + self, description, standard=False, available=True, optional=True, require_features=(), remove=(), **extras): self.warn_deprecated() @@ -907,8 +918,8 @@ def __init__(self, description, standard=False, available=True, if not remove and not require_features and not extras: raise DistutilsSetupError( - "Feature %s: must define 'require_features', 'remove', or at least one" - " of 'packages', 'py_modules', etc." + "Feature %s: must define 'require_features', 'remove', or " + "at least one of 'packages', 'py_modules', etc." ) def include_by_default(self): From 8318b01c30c254da014099bba145db90fd7e42f1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 21:53:40 -0400 Subject: [PATCH 6644/8469] Update changelog. Ref #1081. --- CHANGES.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 08af86a610..0a5b748110 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v36.2.0 +------- + +* #1081: Environment markers indicated in ``install_requires`` + are now processed and treated as nameless ``extras_require`` + with markers, allowing their metadata in requires.txt to be + correctly generated. + v36.1.1 ------- From 92b33a5d27858e1a3b2752707b0a9fea28424efc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 22:09:44 -0400 Subject: [PATCH 6645/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 0a5b748110..02ec2f74b2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,11 @@ v36.2.0 with markers, allowing their metadata in requires.txt to be correctly generated. +* #1053: Tagged commits are now released using Travis-CI + build stages, meaning releases depend on passing tests on + all supported Python versions (Linux) and not just the latest + Python version. + v36.1.1 ------- From 7257263ba6568ae2868a0eb96f4e36917fb607b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 22:10:08 -0400 Subject: [PATCH 6646/8469] Delint --- setuptools/tests/test_egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 6358abf050..07bd88181e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -64,7 +64,7 @@ def env(self): yield env dict_order_fails = pytest.mark.skipif( - sys.version_info < (2,7), + sys.version_info < (2, 7), reason="Intermittent failures on Python 2.6", ) From 9f001330499f93bc847fce9281abb9425491d538 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 22:12:02 -0400 Subject: [PATCH 6647/8469] =?UTF-8?q?Bump=20version:=2036.1.1=20=E2=86=92?= =?UTF-8?q?=2036.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9046b41b0d..416f654366 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.1.1 +current_version = 36.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 42a4c069c2..b3f5a7d9b3 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.1.1", + version="36.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 1eec02038d28506a42bc45d14ef2d54b136cc8bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Jul 2017 23:02:26 -0400 Subject: [PATCH 6648/8469] Invoke bootstrap prior to cutting release. Fixes #1084. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 08834232d5..cbf49da658 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ jobs: python: *latest_py3 install: skip script: skip + before_deploy: python bootstrap.py deploy: provider: pypi on: From bf20d881df662da30d94687efb2ff3d3ba32f55a Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 14 Jul 2017 08:49:23 +0200 Subject: [PATCH 6649/8469] tests: switch back to mock instead of backports.unittest_mock --- pkg_resources/tests/test_markers.py | 2 +- setuptools/tests/test_build_clib.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_msvc.py | 2 +- tests/requirements.txt | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py index 9306d5b348..15a3b499a6 100644 --- a/pkg_resources/tests/test_markers.py +++ b/pkg_resources/tests/test_markers.py @@ -1,4 +1,4 @@ -from unittest import mock +import mock from pkg_resources import evaluate_marker diff --git a/setuptools/tests/test_build_clib.py b/setuptools/tests/test_build_clib.py index 7e3d1de9d4..aebcc350ec 100644 --- a/setuptools/tests/test_build_clib.py +++ b/setuptools/tests/test_build_clib.py @@ -2,7 +2,7 @@ import os import shutil -from unittest import mock +import mock from distutils.errors import DistutilsSetupError from setuptools.command.build_clib import build_clib from setuptools.dist import Distribution diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1b7178a11a..26cdd90d5d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -14,7 +14,7 @@ import distutils.errors import io import zipfile -from unittest import mock +import mock import time from setuptools.extern.six.moves import urllib diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index fbeed1d5c5..32d7a907cf 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -5,7 +5,7 @@ import os import contextlib import distutils.errors -from unittest import mock +import mock import pytest diff --git a/tests/requirements.txt b/tests/requirements.txt index 6e2e78e2a7..ddba6cc874 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,3 @@ +mock pytest-flake8 pytest>=3.0.2 -# pinned to 1.2 as temporary workaround for #1038 -backports.unittest_mock>=1.2,<1.3 From 95386da92ec1725a09c5cd8e457be5ff3dc15a3e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 14 Jul 2017 08:58:14 +0200 Subject: [PATCH 6650/8469] tests: rework clean install test Use pytest-virtualenv so the test can be run no Windows too. --- .travis.yml | 3 --- setuptools/tests/test_virtualenv.py | 31 +++++++++++++++++++++++++++++ tests/clean_install.sh | 27 ------------------------- tests/requirements.txt | 3 +++ 4 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 setuptools/tests/test_virtualenv.py delete mode 100755 tests/clean_install.sh diff --git a/.travis.yml b/.travis.yml index cbf49da658..b207a8d2f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,4 @@ install: # update egg_info based on setup.py in checkout - python bootstrap.py -# Check that setuptools can be installed in a clean environment -- tests/clean_install.sh - script: tox diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py new file mode 100644 index 0000000000..eb8db7a66b --- /dev/null +++ b/setuptools/tests/test_virtualenv.py @@ -0,0 +1,31 @@ +import os + +from pytest import yield_fixture +from pytest_fixture_config import yield_requires_config + +import pytest_virtualenv + + +@yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable']) +@yield_fixture(scope='function') +def bare_virtualenv(): + """ Bare virtualenv (no pip/setuptools/wheel). + """ + with pytest_virtualenv.VirtualEnv(args=( + '--no-wheel', + '--no-pip', + '--no-setuptools', + )) as venv: + yield venv + + +SOURCE_DIR = os.path.join(os.path.dirname(__file__), '../..') + +def test_clean_env_install(bare_virtualenv): + """ + Check setuptools can be installed in a clean environment. + """ + bare_virtualenv.run(' && '.join(( + 'cd {source}', + 'python setup.py install', + )).format(source=SOURCE_DIR)) diff --git a/tests/clean_install.sh b/tests/clean_install.sh deleted file mode 100755 index f8f80dc7c1..0000000000 --- a/tests/clean_install.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# This test was created in -# https://github.com/pypa/setuptools/pull/1050 -# but it really should be incorporated into the test suite -# such that it runs on Windows and doesn't depend on -# virtualenv. Moving to test_integration will likely address -# those concerns. - -set -o errexit -set -o xtrace - -# Create a temporary directory to install the virtualenv in -VENV_DIR="$(mktemp -d)" -function cleanup() { - rm -rf "$VENV_DIR" -} -trap cleanup EXIT - -# Create a virtualenv that doesn't have pip or setuptools installed -wget https://raw.githubusercontent.com/pypa/virtualenv/master/virtualenv.py -python virtualenv.py --no-wheel --no-pip --no-setuptools "$VENV_DIR" -source "$VENV_DIR/bin/activate" - -# Now try to install setuptools -python bootstrap.py -python setup.py install diff --git a/tests/requirements.txt b/tests/requirements.txt index ddba6cc874..0c4df8ef8f 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,6 @@ +importlib; python_version<"2.7" mock pytest-flake8 +pytest-virtualenv>=1.2.7 pytest>=3.0.2 +virtualenv From 7c2df64c8558ac71c20d86d3cb2a05daad99cc87 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 14 Jul 2017 05:44:35 +0200 Subject: [PATCH 6651/8469] fix possible error when finalizing `install_requires` --- setuptools/dist.py | 5 +++-- setuptools/tests/test_virtualenv.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 68c8747a76..1bd89ddd51 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -369,11 +369,12 @@ def _finalize_requires(self): Move requirements in `install_requires` that are using environment markers to `extras_require`. """ - if not self.install_requires: + if not getattr(self, 'install_requires', None): return + extras_require = getattr(self, 'extras_require', None) extras_require = defaultdict(list, ( (k, list(pkg_resources.parse_requirements(v))) - for k, v in (self.extras_require or {}).items() + for k, v in (extras_require or {}).items() )) install_requires = [] for r in pkg_resources.parse_requirements(self.install_requires): diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index eb8db7a66b..a7f485a49f 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,3 +1,4 @@ +import glob import os from pytest import yield_fixture @@ -29,3 +30,21 @@ def test_clean_env_install(bare_virtualenv): 'cd {source}', 'python setup.py install', )).format(source=SOURCE_DIR)) + +def test_pip_upgrade_from_source(virtualenv): + """ + Check pip can upgrade setuptools from source. + """ + dist_dir = virtualenv.workspace + # Generate source distribution / wheel. + virtualenv.run(' && '.join(( + 'cd {source}', + 'python setup.py -q sdist -d {dist}', + 'python setup.py -q bdist_wheel -d {dist}', + )).format(source=SOURCE_DIR, dist=dist_dir)) + sdist = glob.glob(os.path.join(dist_dir, '*.zip'))[0] + wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] + # Then update from wheel. + virtualenv.run('pip install ' + wheel) + # And finally try to upgrade from source. + virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) From 2328be3cc556076b91c8ec74da7b85b178dbc574 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 15 Jul 2017 03:32:57 +0200 Subject: [PATCH 6652/8469] fix `extras_require` handling Allow requirements of the form `"extra": ["barbazquux; {marker}"]` by internally converting them to `"extra:{marker}": ["barbazquux"]`. --- setuptools/dist.py | 46 +++++++++++++++--------------- setuptools/tests/test_egg_info.py | 47 ++++++++++++++++++++++++++++--- 2 files changed, 66 insertions(+), 27 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 1bd89ddd51..d77d56b12d 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -9,7 +9,6 @@ import distutils.cmd import distutils.dist import itertools -import operator from collections import defaultdict from distutils.errors import ( DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, @@ -17,7 +16,7 @@ from distutils.util import rfc822_escape from setuptools.extern import six -from setuptools.extern.six.moves import map, filter +from setuptools.extern.six.moves import map from pkg_resources.extern import packaging from setuptools.depends import Require @@ -146,17 +145,7 @@ def _check_extra(extra, reqs): name, sep, marker = extra.partition(':') if marker and pkg_resources.invalid_marker(marker): raise DistutilsSetupError("Invalid environment marker: " + marker) - - # extras requirements cannot themselves have markers - parsed = pkg_resources.parse_requirements(reqs) - marked_reqs = filter(operator.attrgetter('marker'), parsed) - bad_req = next(marked_reqs, None) - if bad_req: - tmpl = ( - "'extras_require' requirements cannot include " - "environment markers, in {name!r}: '{bad_req!s}'" - ) - raise DistutilsSetupError(tmpl.format(**locals())) + list(pkg_resources.parse_requirements(reqs)) def assert_bool(dist, attr, value): @@ -366,18 +355,29 @@ def __init__(self, attrs=None): def _finalize_requires(self): """ - Move requirements in `install_requires` that - are using environment markers to `extras_require`. + Fix environment markers in `install_requires` and `extras_require`. + + - move requirements in `install_requires` that are using environment + markers to `extras_require`. + - convert requirements in `extras_require` of the form + `"extra": ["barbazquux; {marker}"]` to + `"extra:{marker}": ["barbazquux"]`. """ - if not getattr(self, 'install_requires', None): - return - extras_require = getattr(self, 'extras_require', None) - extras_require = defaultdict(list, ( - (k, list(pkg_resources.parse_requirements(v))) - for k, v in (extras_require or {}).items() - )) + extras_require = defaultdict(list) + for k, v in ( + getattr(self, 'extras_require', None) or {} + ).items(): + for r in pkg_resources.parse_requirements(v): + marker = r.marker + if marker: + r.marker = None + extras_require[k + ':' + str(marker)].append(r) + else: + extras_require[k].append(r) install_requires = [] - for r in pkg_resources.parse_requirements(self.install_requires): + for r in pkg_resources.parse_requirements( + getattr(self, 'install_requires', None) or () + ): marker = r.marker if not marker: install_requires.append(r) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 07bd88181e..0b6f06b2b8 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -182,6 +182,11 @@ def _setup_script_with_requires(self, requires_line): mismatch_marker = "python_version<'{this_ver}'".format( this_ver=sys.version_info[0], ) + # Alternate equivalent syntax. + mismatch_marker_alternate = 'python_version < "{this_ver}"'.format( + this_ver=sys.version_info[0], + ) + invalid_marker = "<=>++" def test_install_requires_with_markers(self, tmpdir_cwd, env): tmpl = 'install_requires=["barbazquux;{marker}"],' @@ -193,9 +198,9 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): with open(requires_txt) as fp: install_requires = fp.read() expected_requires = DALS(''' - [:python_version < "{sys.version_info[0]}"] + [:{marker}] barbazquux - ''').format(sys=sys) + ''').format(marker=self.mismatch_marker_alternate) assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -214,19 +219,53 @@ def test_tests_require_with_markers(self, tmpdir_cwd, env): tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - def test_extras_require_with_markers(self, tmpdir_cwd, env): + def test_extras_require_with_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.mismatch_marker) self._setup_script_with_requires(req) self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [:{marker}] + barbazquux + ''').format(marker=self.mismatch_marker) + assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - def test_extras_require_with_markers_in_req(self, tmpdir_cwd, env): + def test_extras_require_with_marker_in_req(self, tmpdir_cwd, env): tmpl = 'extras_require={{"extra": ["barbazquux; {marker}"]}},' req = tmpl.format(marker=self.mismatch_marker) self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [extra:{marker}] + barbazquux + ''').format(marker=self.mismatch_marker_alternate) + assert install_requires.lstrip() == expected_requires + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): + tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' + req = tmpl.format(marker=self.invalid_marker) + self._setup_script_with_requires(req) with pytest.raises(AssertionError): self._run_install_command(tmpdir_cwd, env) + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): + tmpl = 'extras_require={{"extra": ["barbazquux; {marker}"]}},' + req = tmpl.format(marker=self.invalid_marker) + self._setup_script_with_requires(req) + with pytest.raises(AssertionError): + self._run_install_command(tmpdir_cwd, env) + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( From a3ec721ec1e70f1f7aec6c3349ad85b446410809 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 14 Jul 2017 23:56:05 +0200 Subject: [PATCH 6653/8469] fix `install_requires` handling of extras Internally move requirements in `install_requires` that are using extras to `extras_require` so those extras don't get stripped when building wheels. --- setuptools/dist.py | 12 ++++++++--- setuptools/tests/test_egg_info.py | 33 ++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d77d56b12d..9a034db553 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -358,7 +358,7 @@ def _finalize_requires(self): Fix environment markers in `install_requires` and `extras_require`. - move requirements in `install_requires` that are using environment - markers to `extras_require`. + markers or extras to `extras_require`. - convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. @@ -379,11 +379,17 @@ def _finalize_requires(self): getattr(self, 'install_requires', None) or () ): marker = r.marker - if not marker: + extras = r.extras + if not marker and not extras: install_requires.append(r) continue + r.extras = () r.marker = None - extras_require[':' + str(marker)].append(r) + for e in extras or ('',): + section = e + if marker: + section += ':' + str(marker) + extras_require[section].append(r) self.extras_require = dict( (k, [str(r) for r in v]) for k, v in extras_require.items() diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 0b6f06b2b8..5ea55d6188 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -188,7 +188,7 @@ def _setup_script_with_requires(self, requires_line): ) invalid_marker = "<=>++" - def test_install_requires_with_markers(self, tmpdir_cwd, env): + def test_install_requires_with_marker(self, tmpdir_cwd, env): tmpl = 'install_requires=["barbazquux;{marker}"],' req = tmpl.format(marker=self.mismatch_marker) self._setup_script_with_requires(req) @@ -204,6 +204,37 @@ def test_install_requires_with_markers(self, tmpdir_cwd, env): assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_install_requires_with_extra(self, tmpdir_cwd, env): + req = 'install_requires=["barbazquux [test]"],' + self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [test] + barbazquux + ''') + assert install_requires.lstrip() == expected_requires + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_install_requires_with_extra_and_marker(self, tmpdir_cwd, env): + tmpl = 'install_requires=["barbazquux [test]; {marker}"],' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [test:{marker}] + barbazquux + ''').format(marker=self.mismatch_marker_alternate) + assert install_requires.lstrip() == expected_requires + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_setup_requires_with_markers(self, tmpdir_cwd, env): tmpl = 'setup_requires=["barbazquux;{marker}"],' req = tmpl.format(marker=self.mismatch_marker) From 7c9b1e6b044b31316c19ce8c94cb452b990a489f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:13:40 -0400 Subject: [PATCH 6654/8469] Update changelog. Ref #1089. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 02ec2f74b2..36b2fca542 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.2.1 +------- + +* fix #1086 +* fix #1087 +* support extras specifiers in install_requires requirements + v36.2.0 ------- From ac7a33c84d74afd3b7453bd880943be9cb4c5787 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:13:53 -0400 Subject: [PATCH 6655/8469] =?UTF-8?q?Bump=20version:=2036.2.0=20=E2=86=92?= =?UTF-8?q?=2036.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 416f654366..203b9312e3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.0 +current_version = 36.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index b3f5a7d9b3..854aee3878 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.0", + version="36.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e1b4250bceedcc44ae9c3dc7d960bbca885bb27c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:23:27 -0400 Subject: [PATCH 6656/8469] More concise explanation --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b207a8d2f3..dbbe3ea91b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ jobs: env: LANG=C - python: *latest_py2 env: LANG=C - - stage: deploy (does actual deploy to PYPI only for tagged commits) + - stage: deploy (to PyPI for tagged commits) python: *latest_py3 install: skip script: skip From dce380e100840575d0477f7e6afb136701599055 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:32:29 -0400 Subject: [PATCH 6657/8469] Remove dependency on virtualenv. Setuptools' tests don't require it except pytest-virtualenv, which declares it. --- tests/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 0c4df8ef8f..44e76edba4 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,4 +3,3 @@ mock pytest-flake8 pytest-virtualenv>=1.2.7 pytest>=3.0.2 -virtualenv From 4d0b492a7958292ed7df0a28b07198a79033e77e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:34:04 -0400 Subject: [PATCH 6658/8469] Extract variable for nicer indentation --- setuptools/dist.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 9a034db553..602ba50052 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -364,9 +364,8 @@ def _finalize_requires(self): `"extra:{marker}": ["barbazquux"]`. """ extras_require = defaultdict(list) - for k, v in ( - getattr(self, 'extras_require', None) or {} - ).items(): + spec_ext_reqs = getattr(self, 'extras_require', None) or {} + for k, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): marker = r.marker if marker: @@ -375,9 +374,8 @@ def _finalize_requires(self): else: extras_require[k].append(r) install_requires = [] - for r in pkg_resources.parse_requirements( - getattr(self, 'install_requires', None) or () - ): + spec_inst_reqs = getattr(self, 'install_requires', None) or () + for r in pkg_resources.parse_requirements(spec_inst_reqs): marker = r.marker extras = r.extras if not marker and not extras: From 3e6409381946eba193533c9a9a968af9be1231f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 13:51:49 -0400 Subject: [PATCH 6659/8469] Consolidate assignment of extras to the key in extras requirements. --- setuptools/dist.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 602ba50052..2b720b5318 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -367,12 +367,10 @@ def _finalize_requires(self): spec_ext_reqs = getattr(self, 'extras_require', None) or {} for k, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): - marker = r.marker - if marker: + if r.marker: + k += ':' + str(r.marker) r.marker = None - extras_require[k + ':' + str(marker)].append(r) - else: - extras_require[k].append(r) + extras_require[k].append(r) install_requires = [] spec_inst_reqs = getattr(self, 'install_requires', None) or () for r in pkg_resources.parse_requirements(spec_inst_reqs): From 171fc767992f55f10186b6ded6ea2875328d0827 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 14:10:33 -0400 Subject: [PATCH 6660/8469] Extract two methods (still interdependent) for fixing requires --- setuptools/dist.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 2b720b5318..ad50a8efee 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -356,21 +356,31 @@ def __init__(self, attrs=None): def _finalize_requires(self): """ Fix environment markers in `install_requires` and `extras_require`. + """ + self._convert_extras_requirements() + self._move_install_requirements_markers() - - move requirements in `install_requires` that are using environment - markers or extras to `extras_require`. - - convert requirements in `extras_require` of the form - `"extra": ["barbazquux; {marker}"]` to - `"extra:{marker}": ["barbazquux"]`. + def _convert_extras_requirements(self): + """ + Convert requirements in `extras_require` of the form + `"extra": ["barbazquux; {marker}"]` to + `"extra:{marker}": ["barbazquux"]`. """ - extras_require = defaultdict(list) spec_ext_reqs = getattr(self, 'extras_require', None) or {} + self._tmp_extras_require = defaultdict(list) for k, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): if r.marker: k += ':' + str(r.marker) r.marker = None - extras_require[k].append(r) + self._tmp_extras_require[k].append(r) + + def _move_install_requirements_markers(self): + """ + Move requirements in `install_requires` that are using environment + markers or extras to `extras_require`. + """ + install_requires = [] spec_inst_reqs = getattr(self, 'install_requires', None) or () for r in pkg_resources.parse_requirements(spec_inst_reqs): @@ -385,10 +395,10 @@ def _finalize_requires(self): section = e if marker: section += ':' + str(marker) - extras_require[section].append(r) + self._tmp_extras_require[section].append(r) self.extras_require = dict( (k, [str(r) for r in v]) - for k, v in extras_require.items() + for k, v in self._tmp_extras_require.items() ) self.install_requires = [str(r) for r in install_requires] From 81ffba7099ea754a970c2d857bcca2ac88358557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 14:50:07 -0400 Subject: [PATCH 6661/8469] Use term 'section' consistently --- setuptools/dist.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ad50a8efee..ffa972f3e3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -368,12 +368,12 @@ def _convert_extras_requirements(self): """ spec_ext_reqs = getattr(self, 'extras_require', None) or {} self._tmp_extras_require = defaultdict(list) - for k, v in spec_ext_reqs.items(): + for section, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): if r.marker: - k += ':' + str(r.marker) + section += ':' + str(r.marker) r.marker = None - self._tmp_extras_require[k].append(r) + self._tmp_extras_require[section].append(r) def _move_install_requirements_markers(self): """ @@ -391,8 +391,7 @@ def _move_install_requirements_markers(self): continue r.extras = () r.marker = None - for e in extras or ('',): - section = e + for section in extras or ('',): if marker: section += ':' + str(marker) self._tmp_extras_require[section].append(r) From 00a738d4d0d4e84c240e32cebfb54fdc653de00a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:07:33 -0400 Subject: [PATCH 6662/8469] Handle rebuild of install_requires separate from building extras" --- setuptools/dist.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ffa972f3e3..febb1b0cd3 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -380,15 +380,21 @@ def _move_install_requirements_markers(self): Move requirements in `install_requires` that are using environment markers or extras to `extras_require`. """ - - install_requires = [] spec_inst_reqs = getattr(self, 'install_requires', None) or () - for r in pkg_resources.parse_requirements(spec_inst_reqs): + self.install_requires = list( + str(req) + for req in pkg_resources.parse_requirements(spec_inst_reqs) + if not req.marker and not req.extras + ) + + markers_or_extras_reqs = ( + req + for req in pkg_resources.parse_requirements(spec_inst_reqs) + if req.marker or req.extras + ) + for r in markers_or_extras_reqs: marker = r.marker extras = r.extras - if not marker and not extras: - install_requires.append(r) - continue r.extras = () r.marker = None for section in extras or ('',): @@ -399,7 +405,6 @@ def _move_install_requirements_markers(self): (k, [str(r) for r in v]) for k, v in self._tmp_extras_require.items() ) - self.install_requires = [str(r) for r in install_requires] def parse_config_files(self, filenames=None): """Parses configuration files from various levels From f464c4b808e74f0c23ff36e4a83722011718ddc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:26:50 -0400 Subject: [PATCH 6663/8469] Extract a function for removing extras and marker from a requirement. --- setuptools/dist.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index febb1b0cd3..d335d92a18 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -372,7 +372,6 @@ def _convert_extras_requirements(self): for r in pkg_resources.parse_requirements(v): if r.marker: section += ':' + str(r.marker) - r.marker = None self._tmp_extras_require[section].append(r) def _move_install_requirements_markers(self): @@ -393,19 +392,26 @@ def _move_install_requirements_markers(self): if req.marker or req.extras ) for r in markers_or_extras_reqs: - marker = r.marker - extras = r.extras - r.extras = () - r.marker = None - for section in extras or ('',): - if marker: - section += ':' + str(marker) + suffix = ':' + str(r.marker) if r.marker else '' + sections = [ + section + suffix + for section in r.extras or ('',) + ] + for section in sections: self._tmp_extras_require[section].append(r) self.extras_require = dict( - (k, [str(r) for r in v]) + (k, [str(r) for r in map(self._clean_req, v)]) for k, v in self._tmp_extras_require.items() ) + def _clean_req(self, req): + """ + Given a Requirement, remove extras and markers and return it. + """ + req.extras = () + req.marker = None + return req + def parse_config_files(self, filenames=None): """Parses configuration files from various levels and loads configuration. From b812935899dec7e7afea3ea0ae0f5a9b3169f741 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:45:07 -0400 Subject: [PATCH 6664/8469] Consolidate logic around a 'simple' requirement --- setuptools/dist.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d335d92a18..cf25c64d0b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -16,7 +16,7 @@ from distutils.util import rfc822_escape from setuptools.extern import six -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter, filterfalse from pkg_resources.extern import packaging from setuptools.depends import Require @@ -379,17 +379,21 @@ def _move_install_requirements_markers(self): Move requirements in `install_requires` that are using environment markers or extras to `extras_require`. """ + def is_simple_req(req): + return not req.marker and not req.extras + spec_inst_reqs = getattr(self, 'install_requires', None) or () self.install_requires = list( str(req) - for req in pkg_resources.parse_requirements(spec_inst_reqs) - if not req.marker and not req.extras + for req in filter( + is_simple_req, + pkg_resources.parse_requirements(spec_inst_reqs), + ) ) - markers_or_extras_reqs = ( - req - for req in pkg_resources.parse_requirements(spec_inst_reqs) - if req.marker or req.extras + markers_or_extras_reqs = filterfalse( + is_simple_req, + pkg_resources.parse_requirements(spec_inst_reqs), ) for r in markers_or_extras_reqs: suffix = ':' + str(r.marker) if r.marker else '' From 77044955def37aa95310224d6b8436a8f8e0c6d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:49:26 -0400 Subject: [PATCH 6665/8469] Refactor a bit for clarity --- setuptools/dist.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index cf25c64d0b..88bdf5aae9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -379,23 +379,26 @@ def _move_install_requirements_markers(self): Move requirements in `install_requires` that are using environment markers or extras to `extras_require`. """ + + # divide the install_requires into two sets, simple ones still + # handled by install_requires and more complex ones handled + # by extras_require. + def is_simple_req(req): return not req.marker and not req.extras spec_inst_reqs = getattr(self, 'install_requires', None) or () - self.install_requires = list( - str(req) - for req in filter( - is_simple_req, - pkg_resources.parse_requirements(spec_inst_reqs), - ) + simple_reqs = filter( + is_simple_req, + pkg_resources.parse_requirements(spec_inst_reqs), ) - - markers_or_extras_reqs = filterfalse( + complex_reqs = filterfalse( is_simple_req, pkg_resources.parse_requirements(spec_inst_reqs), ) - for r in markers_or_extras_reqs: + self.install_requires = list(map(str, simple_reqs)) + + for r in complex_reqs: suffix = ':' + str(r.marker) if r.marker else '' sections = [ section + suffix From f26bf186bad984b8649a723d795f66c4f8e415f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:52:38 -0400 Subject: [PATCH 6666/8469] Align suffix calculation for extras sections --- setuptools/dist.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 88bdf5aae9..50f5c18f16 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -370,9 +370,8 @@ def _convert_extras_requirements(self): self._tmp_extras_require = defaultdict(list) for section, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): - if r.marker: - section += ':' + str(r.marker) - self._tmp_extras_require[section].append(r) + suffix = ':' + str(r.marker) if r.marker else '' + self._tmp_extras_require[section + suffix].append(r) def _move_install_requirements_markers(self): """ @@ -400,12 +399,8 @@ def is_simple_req(req): for r in complex_reqs: suffix = ':' + str(r.marker) if r.marker else '' - sections = [ - section + suffix - for section in r.extras or ('',) - ] - for section in sections: - self._tmp_extras_require[section].append(r) + for section in r.extras or ('',): + self._tmp_extras_require[section + suffix].append(r) self.extras_require = dict( (k, [str(r) for r in map(self._clean_req, v)]) for k, v in self._tmp_extras_require.items() From e144d98e8b38ee3440ad4fbf28c085e057858806 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 15:59:11 -0400 Subject: [PATCH 6667/8469] Parse the requirements just once for simplicity and clarity --- setuptools/dist.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 50f5c18f16..c4a42183bc 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -387,14 +387,9 @@ def is_simple_req(req): return not req.marker and not req.extras spec_inst_reqs = getattr(self, 'install_requires', None) or () - simple_reqs = filter( - is_simple_req, - pkg_resources.parse_requirements(spec_inst_reqs), - ) - complex_reqs = filterfalse( - is_simple_req, - pkg_resources.parse_requirements(spec_inst_reqs), - ) + inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs)) + simple_reqs = filter(is_simple_req, inst_reqs) + complex_reqs = filterfalse(is_simple_req, inst_reqs) self.install_requires = list(map(str, simple_reqs)) for r in complex_reqs: From 880774ac34e43c832f52d64923c670f59b54f07e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 23 Jul 2017 22:14:47 +0200 Subject: [PATCH 6668/8469] Revert "fix `install_requires` handling of extras" This reverts commit a3ec721ec1e70f1f7aec6c3349ad85b446410809. --- setuptools/dist.py | 11 +++----- setuptools/tests/test_egg_info.py | 42 ++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 50f5c18f16..f6bf2601da 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -376,7 +376,7 @@ def _convert_extras_requirements(self): def _move_install_requirements_markers(self): """ Move requirements in `install_requires` that are using environment - markers or extras to `extras_require`. + markers `extras_require`. """ # divide the install_requires into two sets, simple ones still @@ -384,7 +384,7 @@ def _move_install_requirements_markers(self): # by extras_require. def is_simple_req(req): - return not req.marker and not req.extras + return not req.marker spec_inst_reqs = getattr(self, 'install_requires', None) or () simple_reqs = filter( @@ -398,9 +398,7 @@ def is_simple_req(req): self.install_requires = list(map(str, simple_reqs)) for r in complex_reqs: - suffix = ':' + str(r.marker) if r.marker else '' - for section in r.extras or ('',): - self._tmp_extras_require[section + suffix].append(r) + self._tmp_extras_require[':' + str(r.marker)].append(r) self.extras_require = dict( (k, [str(r) for r in map(self._clean_req, v)]) for k, v in self._tmp_extras_require.items() @@ -408,9 +406,8 @@ def is_simple_req(req): def _clean_req(self, req): """ - Given a Requirement, remove extras and markers and return it. + Given a Requirement, remove environment markers and return it. """ - req.extras = () req.marker = None return req diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 5ea55d6188..d9d4ec3b3a 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -207,14 +207,13 @@ def test_install_requires_with_marker(self, tmpdir_cwd, env): def test_install_requires_with_extra(self, tmpdir_cwd, env): req = 'install_requires=["barbazquux [test]"],' self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + self._run_install_command(tmpdir_cwd, env, cmd=['egg_info']) + egg_info_dir = os.path.join('.', 'foo.egg-info') requires_txt = os.path.join(egg_info_dir, 'requires.txt') with open(requires_txt) as fp: install_requires = fp.read() expected_requires = DALS(''' - [test] - barbazquux + barbazquux[test] ''') assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -229,8 +228,8 @@ def test_install_requires_with_extra_and_marker(self, tmpdir_cwd, env): with open(requires_txt) as fp: install_requires = fp.read() expected_requires = DALS(''' - [test:{marker}] - barbazquux + [:{marker}] + barbazquux[test] ''').format(marker=self.mismatch_marker_alternate) assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -250,6 +249,37 @@ def test_tests_require_with_markers(self, tmpdir_cwd, env): tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_extras_require_with_extra(self, tmpdir_cwd, env): + req = 'extras_require={"extra": ["barbazquux [test]"]},' + self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env, cmd=['egg_info']) + egg_info_dir = os.path.join('.', 'foo.egg-info') + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [extra] + barbazquux[test] + ''') + assert install_requires.lstrip() == expected_requires + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + + def test_extras_require_with_extra_and_marker_in_req(self, tmpdir_cwd, env): + tmpl = 'extras_require={{"extra": ["barbazquux [test]; {marker}"]}},' + req = tmpl.format(marker=self.mismatch_marker) + self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [extra:{marker}] + barbazquux[test] + ''').format(marker=self.mismatch_marker_alternate) + assert install_requires.lstrip() == expected_requires + assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_extras_require_with_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.mismatch_marker) From a440f728c0066f284e0d2246026264c7166a8bf5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Jul 2017 16:14:55 -0400 Subject: [PATCH 6669/8469] Extract method capturing the 'suffix' for a marker. --- setuptools/dist.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index c4a42183bc..d1472a3477 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -370,9 +370,17 @@ def _convert_extras_requirements(self): self._tmp_extras_require = defaultdict(list) for section, v in spec_ext_reqs.items(): for r in pkg_resources.parse_requirements(v): - suffix = ':' + str(r.marker) if r.marker else '' + suffix = self._suffix_for(r) self._tmp_extras_require[section + suffix].append(r) + @staticmethod + def _suffix_for(req): + """ + For a requirement, return the 'extras_require' suffix for + that requirement. + """ + return ':' + str(req.marker) if req.marker else '' + def _move_install_requirements_markers(self): """ Move requirements in `install_requires` that are using environment @@ -393,9 +401,13 @@ def is_simple_req(req): self.install_requires = list(map(str, simple_reqs)) for r in complex_reqs: - suffix = ':' + str(r.marker) if r.marker else '' - for section in r.extras or ('',): - self._tmp_extras_require[section + suffix].append(r) + sections = ( + section + self._suffix_for(r) + for section in r.extras or ('',) + ) + for section in sections: + self._tmp_extras_require[section].append(r) + self.extras_require = dict( (k, [str(r) for r in map(self._clean_req, v)]) for k, v in self._tmp_extras_require.items() From c464fbad5c7a84697cbfdea9df61e32c5c9fe3c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Jul 2017 09:47:26 -0400 Subject: [PATCH 6670/8469] Update changelog. Ref #1100. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 36b2fca542..9a16816c3c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.2.2 +------- + +* #1099: Revert commit a3ec721, restoring intended purpose of + extras as part of a requirement declaration. + v36.2.1 ------- From da396e49582197fc28c46b1b0605c7f2ecf8298c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Jul 2017 09:47:37 -0400 Subject: [PATCH 6671/8469] =?UTF-8?q?Bump=20version:=2036.2.1=20=E2=86=92?= =?UTF-8?q?=2036.2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 203b9312e3..33024f5141 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.1 +current_version = 36.2.2 commit = True tag = True diff --git a/setup.py b/setup.py index 854aee3878..5c48f7407d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.1", + version="36.2.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From a82fd99f671e6bbcfd753196862d891c0d32d82c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 25 Jul 2017 20:59:48 +0200 Subject: [PATCH 6672/8469] do not strip empty sections in `extras_require` --- setuptools/dist.py | 2 ++ setuptools/tests/test_egg_info.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 0787261e44..dfe700bdbc 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -369,6 +369,8 @@ def _convert_extras_requirements(self): spec_ext_reqs = getattr(self, 'extras_require', None) or {} self._tmp_extras_require = defaultdict(list) for section, v in spec_ext_reqs.items(): + # Do not strip empty sections. + self._tmp_extras_require[section] for r in pkg_resources.parse_requirements(v): suffix = self._suffix_for(r) self._tmp_extras_require[section + suffix].append(r) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index d9d4ec3b3a..9ea7cdcefa 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -274,6 +274,8 @@ def test_extras_require_with_extra_and_marker_in_req(self, tmpdir_cwd, env): with open(requires_txt) as fp: install_requires = fp.read() expected_requires = DALS(''' + [extra] + [extra:{marker}] barbazquux[test] ''').format(marker=self.mismatch_marker_alternate) @@ -306,6 +308,8 @@ def test_extras_require_with_marker_in_req(self, tmpdir_cwd, env): with open(requires_txt) as fp: install_requires = fp.read() expected_requires = DALS(''' + [extra] + [extra:{marker}] barbazquux ''').format(marker=self.mismatch_marker_alternate) @@ -328,6 +332,20 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_extras_require_with_empty_section(self, tmpdir_cwd, env): + tmpl = 'extras_require={{"empty": []}},' + req = tmpl.format(marker=self.invalid_marker) + self._setup_script_with_requires(req) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + requires_txt = os.path.join(egg_info_dir, 'requires.txt') + with open(requires_txt) as fp: + install_requires = fp.read() + expected_requires = DALS(''' + [empty] + ''').format(marker=self.mismatch_marker_alternate) + assert install_requires.lstrip() == expected_requires + def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( """python_requires='>=2.7.12',""") From f46a630f13fcf97c56d7f38e55aa1833f2063dee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 25 Jul 2017 21:13:04 -0400 Subject: [PATCH 6673/8469] Update changelog. Ref #1103. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9a16816c3c..9af6001baa 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.2.3 +------- + +* #1102: Restore behavior for empty extras. + v36.2.2 ------- From c452f9fdd87d990fb81f7e48d6cb0fe1fcd4b92e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 25 Jul 2017 21:13:17 -0400 Subject: [PATCH 6674/8469] =?UTF-8?q?Bump=20version:=2036.2.2=20=E2=86=92?= =?UTF-8?q?=2036.2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 33024f5141..5633027e48 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.2 +current_version = 36.2.3 commit = True tag = True diff --git a/setup.py b/setup.py index 5c48f7407d..8c21a37222 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.2", + version="36.2.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 35fa31fa6705d6b6866b5f5361b833e19339713b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 26 Jul 2017 13:07:38 -0400 Subject: [PATCH 6675/8469] Use inspect.getmro to inspect the mro. Alternate implementation to that proposed in #1092. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 21 +++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9af6001baa..8412557b09 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.2.4 +------- + +* #1092: ``pkg_resources`` now uses ``inspect.getmro`` to + resolve classes in method resolution order. + v36.2.3 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 51b4749261..f6666968b4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -37,6 +37,7 @@ import tempfile import textwrap import itertools +import inspect from pkgutil import get_importer try: @@ -2939,20 +2940,20 @@ def parse(s): return req -def _get_mro(cls): - """Get an mro for a type or classic class""" - if not isinstance(cls, type): - - class cls(cls, object): - pass - - return cls.__mro__[1:] - return cls.__mro__ +def _always_object(classes): + """ + Ensure object appears in the mro even + for old-style classes. + """ + if object not in classes: + return classes + (object,) + return classes def _find_adapter(registry, ob): """Return an adapter factory for `ob` from `registry`""" - for t in _get_mro(getattr(ob, '__class__', type(ob))): + types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob)))) + for t in types: if t in registry: return registry[t] From de05e931c35cef1d5888231fe3f4b47526bca8f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 26 Jul 2017 13:07:42 -0400 Subject: [PATCH 6676/8469] =?UTF-8?q?Bump=20version:=2036.2.3=20=E2=86=92?= =?UTF-8?q?=2036.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5633027e48..ae2f2d2537 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.3 +current_version = 36.2.4 commit = True tag = True diff --git a/setup.py b/setup.py index 8c21a37222..bb465f2db5 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.3", + version="36.2.4", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 0c86c6a290c6ddce7732228820482a600f7520ca Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 26 Jul 2017 19:51:24 +0200 Subject: [PATCH 6677/8469] tests: minor cleanup; remove dead code --- setuptools/tests/test_easy_install.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 26cdd90d5d..c9d396f4e3 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -567,18 +567,6 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', return test_pkg -def make_trivial_sdist(dist_path, setup_py): - """Create a simple sdist tarball at dist_path, containing just a - setup.py, the contents of which are provided by the setup_py string. - """ - - setup_py_file = tarfile.TarInfo(name='setup.py') - setup_py_bytes = io.BytesIO(setup_py.encode('utf-8')) - setup_py_file.size = len(setup_py_bytes.getvalue()) - with tarfile_open(dist_path, 'w:gz') as dist: - dist.addfile(setup_py_file, fileobj=setup_py_bytes) - - @pytest.mark.skipif( sys.platform.startswith('java') and ei.is_sh(sys.executable), reason="Test cannot run under java when executable is sh" From 75e88f63cc0308f7933e936b171f9cba2d04e7ad Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 21 Jul 2017 16:39:15 +0200 Subject: [PATCH 6678/8469] fix `test` command handling of `extras_require` Also install platform specific requirements in `extras_require`. --- setuptools/command/test.py | 10 +++-- setuptools/tests/test_virtualenv.py | 66 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index b8863fdcfb..638d0c56e4 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -11,7 +11,7 @@ from setuptools.extern.six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path, - working_set, _namespace_packages, + working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command from setuptools.py31compat import unittest_main @@ -191,9 +191,13 @@ def install_dists(dist): Install the requirements indicated by self.distribution and return an iterable of the dists that were built. """ - ir_d = dist.fetch_build_eggs(dist.install_requires or []) + ir_d = dist.fetch_build_eggs(dist.install_requires) tr_d = dist.fetch_build_eggs(dist.tests_require or []) - return itertools.chain(ir_d, tr_d) + er_d = dist.fetch_build_eggs( + v for k, v in dist.extras_require.items() + if k.startswith(':') and evaluate_marker(k[1:]) + ) + return itertools.chain(ir_d, tr_d, er_d) def run(self): installed_dists = self.install_dists(self.distribution) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index a7f485a49f..17b8793cf6 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -6,6 +6,9 @@ import pytest_virtualenv +from .textwrap import DALS +from .test_easy_install import make_nspkg_sdist + @yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable']) @yield_fixture(scope='function') @@ -48,3 +51,66 @@ def test_pip_upgrade_from_source(virtualenv): virtualenv.run('pip install ' + wheel) # And finally try to upgrade from source. virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) + +def test_test_command_install_requirements(bare_virtualenv, tmpdir): + """ + Check the test command will install all required dependencies. + """ + bare_virtualenv.run(' && '.join(( + 'cd {source}', + 'python setup.py develop', + )).format(source=SOURCE_DIR)) + def sdist(distname, version): + dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version)) + make_nspkg_sdist(str(dist_path), distname, version) + return dist_path + dependency_links = [ + str(dist_path) + for dist_path in ( + sdist('foobar', '2.4'), + sdist('bits', '4.2'), + sdist('bobs', '6.0'), + sdist('pieces', '0.6'), + ) + ] + with tmpdir.join('setup.py').open('w') as fp: + fp.write(DALS( + ''' + from setuptools import setup + + setup( + dependency_links={dependency_links!r}, + install_requires=[ + 'barbazquux1; sys_platform in ""', + 'foobar==2.4', + ], + setup_requires='bits==4.2', + tests_require=""" + bobs==6.0 + """, + extras_require={{ + 'test': ['barbazquux2'], + ':"" in sys_platform': 'pieces==0.6', + ':python_version > "1"': """ + pieces + foobar + """, + }} + ) + '''.format(dependency_links=dependency_links))) + with tmpdir.join('test.py').open('w') as fp: + fp.write(DALS( + ''' + import foobar + import bits + import bobs + import pieces + + open('success', 'w').close() + ''')) + # Run test command for test package. + bare_virtualenv.run(' && '.join(( + 'cd {tmpdir}', + 'python setup.py test -s test', + )).format(tmpdir=tmpdir)) + assert tmpdir.join('success').check() From d607a330bb821d77470a3f029f9db38fa08e85ad Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 17 Jul 2017 20:31:02 +0200 Subject: [PATCH 6679/8469] travis: update image Update to the future defaults: `dist: trusty`. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cbf49da658..1bb78cfb2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty sudo: false language: python jobs: From 01ad2ba2e4b57ad44b365e49dda2071bec8bbf70 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 28 Jul 2017 20:44:37 +0200 Subject: [PATCH 6680/8469] travis: add `pypy3` job --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1bb78cfb2e..20975f8606 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ jobs: - python: &latest_py3 3.6 - python: nightly - python: pypy + - python: pypy3 - python: *latest_py3 env: LANG=C - python: *latest_py2 From 7c169ce99f999b775541d39bf0b1b1c1d34d4ea0 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 29 Jul 2017 22:06:48 +0200 Subject: [PATCH 6681/8469] tests: disable pytest-flake8 on Python 2.6 Python 2.6 support has been official dropped from flake8 for some time, and broken since 3.4.0. --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 44e76edba4..c9413b86db 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,5 @@ importlib; python_version<"2.7" mock -pytest-flake8 +pytest-flake8; python_version>="2.7" pytest-virtualenv>=1.2.7 pytest>=3.0.2 From 92616dbfb2682bee04d5fe662a5951a6b629b846 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Jul 2017 20:55:44 -0400 Subject: [PATCH 6682/8469] Update changelog. Ref #1106. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8412557b09..e006d287a5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.2.5 +------- + +* #1093: Fix test command handler with extras_require. + v36.2.4 ------- From 4915efda9e1ee003826c9b95cfa1b7d47767994c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Jul 2017 20:55:52 -0400 Subject: [PATCH 6683/8469] =?UTF-8?q?Bump=20version:=2036.2.4=20=E2=86=92?= =?UTF-8?q?=2036.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ae2f2d2537..4bf7b13bf6 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.4 +current_version = 36.2.5 commit = True tag = True diff --git a/setup.py b/setup.py index bb465f2db5..9571cfa97d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.4", + version="36.2.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 7961c8b4d8cd57164508f4f82f59b5906cae5c3e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 31 Jul 2017 03:40:09 +0200 Subject: [PATCH 6684/8469] travis: fix deployment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cf904c099f..a5e08a2efc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ jobs: password: secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release + skip_cleanup: true skip_upload_docs: true cache: pip From 49df713e676436e062bacde706b5084b958f0322 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Jul 2017 21:41:56 -0400 Subject: [PATCH 6685/8469] Update changelog --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e006d287a5..75f39d4828 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,8 @@ v36.2.5 ------- * #1093: Fix test command handler with extras_require. +* #1112, #1091, #1115: Now using Trusty containers in + Travis for CI and CD. v36.2.4 ------- From d59415c6921bcb1282feffcf104d18949040b404 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida Date: Mon, 31 Jul 2017 16:08:28 -0300 Subject: [PATCH 6686/8469] Ignore .eggs Directory used by setuptools to auto-install dependencies --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b23ade08c5..2e2f71b8f2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ lib distribute.egg-info setuptools.egg-info .coverage +.eggs .tox *.egg *.py[cod] From 80848f95f295464639bfd349e62d40d2e279fa76 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida Date: Mon, 31 Jul 2017 16:07:52 -0300 Subject: [PATCH 6687/8469] pytest-virtualenv does not require virtualenv But our tests do, one that provides `--no-wheel`. --- tests/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/requirements.txt b/tests/requirements.txt index c9413b86db..4761505fc9 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,6 @@ importlib; python_version<"2.7" mock pytest-flake8; python_version>="2.7" +virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 From e265e4560965878531fea7856fb165a182908b8d Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida Date: Mon, 31 Jul 2017 16:29:32 -0300 Subject: [PATCH 6688/8469] Better detect unpacked eggs Do not assume a directory named in `.egg` is an egg, unless it has an actual egg metadata directory. Closes #462 --- CHANGES.rst | 6 ++ pkg_resources/__init__.py | 18 +++-- .../tests/test_find_distributions.py | 65 +++++++++++++++++++ setup.py | 2 +- 4 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 pkg_resources/tests/test_find_distributions.py diff --git a/CHANGES.rst b/CHANGES.rst index 75f39d4828..7baca6565d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.2.6 +------- + +* #462: Don't assume a directory is an egg by the ``.egg`` + extension alone. + v36.2.5 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f6666968b4..f13a69b302 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1553,7 +1553,7 @@ def _setup_prefix(self): path = self.module_path old = None while path != old: - if _is_unpacked_egg(path): + if _is_egg_path(path): self.egg_name = os.path.basename(path) self.egg_info = os.path.join(path, 'EGG-INFO') self.egg_root = path @@ -1956,7 +1956,7 @@ def find_eggs_in_zip(importer, path_item, only=False): # don't yield nested distros return for subitem in metadata.resource_listdir('/'): - if _is_unpacked_egg(subitem): + if _is_egg_path(subitem): subpath = os.path.join(path_item, subitem) for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath): yield dist @@ -2033,7 +2033,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 _is_unpacked_egg(entry): + elif not only and _is_egg_path(entry): dists = find_distributions(os.path.join(path_item, entry)) for dist in dists: yield dist @@ -2221,12 +2221,22 @@ def _normalize_cached(filename, _cache={}): return result +def _is_egg_path(path): + """ + Determine if given path appears to be an egg. + """ + return ( + path.lower().endswith('.egg') + ) + + def _is_unpacked_egg(path): """ Determine if given path appears to be an unpacked egg. """ return ( - path.lower().endswith('.egg') + _is_egg_path(path) and + os.path.isfile(os.path.join(path, 'EGG-INFO', 'PKG-INFO')) ) diff --git a/pkg_resources/tests/test_find_distributions.py b/pkg_resources/tests/test_find_distributions.py new file mode 100644 index 0000000000..97999b3354 --- /dev/null +++ b/pkg_resources/tests/test_find_distributions.py @@ -0,0 +1,65 @@ +import subprocess +import sys + +import pytest +import pkg_resources + +SETUP_TEMPLATE = """ +import setuptools +setuptools.setup( + name="my-test-package", + version="1.0", + zip_safe=True, +) +""".lstrip() + +class TestFindDistributions: + + @pytest.fixture + def target_dir(self, tmpdir): + target_dir = tmpdir.mkdir('target') + # place a .egg named directory in the target that is not an egg: + target_dir.mkdir('not.an.egg') + return str(target_dir) + + @pytest.fixture + def project_dir(self, tmpdir): + project_dir = tmpdir.mkdir('my-test-package') + (project_dir / "setup.py").write(SETUP_TEMPLATE) + return str(project_dir) + + def test_non_egg_dir_named_egg(self, target_dir): + dists = pkg_resources.find_distributions(target_dir) + assert not list(dists) + + def test_standalone_egg_directory(self, project_dir, target_dir): + # install this distro as an unpacked egg: + args = [ + sys.executable, + '-c', 'from setuptools.command.easy_install import main; main()', + '-mNx', + '-d', target_dir, + '--always-unzip', + project_dir, + ] + subprocess.check_call(args) + dists = pkg_resources.find_distributions(target_dir) + assert [dist.project_name for dist in dists] == ['my-test-package'] + dists = pkg_resources.find_distributions(target_dir, only=True) + assert not list(dists) + + def test_zipped_egg(self, project_dir, target_dir): + # install this distro as an unpacked egg: + args = [ + sys.executable, + '-c', 'from setuptools.command.easy_install import main; main()', + '-mNx', + '-d', target_dir, + '--zip-ok', + project_dir, + ] + subprocess.check_call(args) + dists = pkg_resources.find_distributions(target_dir) + assert [dist.project_name for dist in dists] == ['my-test-package'] + dists = pkg_resources.find_distributions(target_dir, only=True) + assert not list(dists) diff --git a/setup.py b/setup.py index 9571cfa97d..7b29c53ee2 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.5", + version="36.2.6", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 28e2625c12f7115c8bcb8c101327328e5007592f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Aug 2017 16:29:47 -0400 Subject: [PATCH 6689/8469] Last bump was manual. Resync. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4bf7b13bf6..1c2b3b16bb 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.5 +current_version = 36.2.6 commit = True tag = True From 096f3287314549ac423f1c1c443f8aefa0b64b4f Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 27 Jul 2017 01:45:54 +0200 Subject: [PATCH 6690/8469] fix requires handling when using setup.cfg --- setuptools/dist.py | 10 +- setuptools/tests/test_config.py | 6 +- setuptools/tests/test_egg_info.py | 334 +++++++++++++++++------------- 3 files changed, 201 insertions(+), 149 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index dfe700bdbc..21730f22ba 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -349,14 +349,15 @@ def __init__(self, attrs=None): "setuptools, pip, and PyPI. Please see PEP 440 for more " "details." % self.metadata.version ) - if getattr(self, 'python_requires', None): - self.metadata.python_requires = self.python_requires self._finalize_requires() def _finalize_requires(self): """ - Fix environment markers in `install_requires` and `extras_require`. + Set `metadata.python_requires` and fix environment markers + in `install_requires` and `extras_require`. """ + if getattr(self, 'python_requires', None): + self.metadata.python_requires = self.python_requires self._convert_extras_requirements() self._move_install_requirements_markers() @@ -424,8 +425,7 @@ def parse_config_files(self, filenames=None): _Distribution.parse_config_files(self, filenames=filenames) parse_configuration(self, self.command_options) - if getattr(self, 'python_requires', None): - self.metadata.python_requires = self.python_requires + self._finalize_requires() def parse_command_line(self): """Process features after parsing command line options""" diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 8bd2a49428..dbabd69e6d 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -333,7 +333,7 @@ def test_basic(self, tmpdir): ]) assert dist.install_requires == ([ 'docutils>=0.3', - 'pack ==1.1, ==1.3', + 'pack==1.1,==1.3', 'hey' ]) assert dist.setup_requires == ([ @@ -403,7 +403,7 @@ def test_multiline(self, tmpdir): ]) assert dist.install_requires == ([ 'docutils>=0.3', - 'pack ==1.1, ==1.3', + 'pack==1.1,==1.3', 'hey' ]) assert dist.setup_requires == ([ @@ -508,7 +508,7 @@ def test_extras_require(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.extras_require == { 'pdf': ['ReportLab>=1.2', 'RXP'], - 'rest': ['docutils>=0.3', 'pack ==1.1, ==1.3'] + 'rest': ['docutils>=0.3', 'pack==1.1,==1.3'] } def test_entry_points(self, tmpdir): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 9ea7cdcefa..33d6cc5268 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,3 +1,4 @@ +import ast import os import glob import re @@ -165,19 +166,17 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') assert 'docs/usage.rst' in open(sources_txt).read().split('\n') - def _setup_script_with_requires(self, requires_line): - setup_script = DALS(""" + def _setup_script_with_requires(self, requires, use_setup_cfg=False): + setup_script = DALS( + ''' from setuptools import setup - setup( - name='foo', - %s - zip_safe=False, - ) - """ % requires_line) - build_files({ - 'setup.py': setup_script, - }) + setup(name='foo', zip_safe=False, %s) + ''' + ) % ('' if use_setup_cfg else requires) + setup_config = requires if use_setup_cfg else '' + build_files({'setup.py': setup_script, + 'setup.cfg': setup_config}) mismatch_marker = "python_version<'{this_ver}'".format( this_ver=sys.version_info[0], @@ -188,131 +187,198 @@ def _setup_script_with_requires(self, requires_line): ) invalid_marker = "<=>++" - def test_install_requires_with_marker(self, tmpdir_cwd, env): - tmpl = 'install_requires=["barbazquux;{marker}"],' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [:{marker}] - barbazquux - ''').format(marker=self.mismatch_marker_alternate) - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + class RequiresTestHelper(object): + + @staticmethod + def parametrize(*test_list, **format_dict): + idlist = [] + argvalues = [] + for test in test_list: + test_params = test.lstrip().split('\n\n', 3) + name_kwargs = test_params.pop(0).split('\n') + if len(name_kwargs) > 1: + install_cmd_kwargs = ast.literal_eval(name_kwargs[1].strip()) + else: + install_cmd_kwargs = {} + name = name_kwargs[0].strip() + setup_py_requires, setup_cfg_requires, expected_requires = ( + DALS(a).format(**format_dict) for a in test_params + ) + for id_, requires, use_cfg in ( + (name, setup_py_requires, False), + (name + '_in_setup_cfg', setup_cfg_requires, True), + ): + idlist.append(id_) + marks = () + if requires.startswith('@xfail\n'): + requires = requires[7:] + marks = pytest.mark.xfail + argvalues.append(pytest.param(requires, use_cfg, + expected_requires, + install_cmd_kwargs, + marks=marks)) + return pytest.mark.parametrize('requires,use_setup_cfg,' + 'expected_requires,install_cmd_kwargs', + argvalues, ids=idlist) + + @RequiresTestHelper.parametrize( + # Format of a test: + # + # id + # install_cmd_kwargs [optional] + # + # requires block (when used in setup.py) + # + # requires block (when used in setup.cfg) + # + # expected contents of requires.txt - def test_install_requires_with_extra(self, tmpdir_cwd, env): - req = 'install_requires=["barbazquux [test]"],' - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env, cmd=['egg_info']) - egg_info_dir = os.path.join('.', 'foo.egg-info') - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - barbazquux[test] - ''') - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + ''' + install_requires_with_marker + + install_requires=["barbazquux;{mismatch_marker}"], + + [options] + install_requires = + barbazquux; {mismatch_marker} - def test_install_requires_with_extra_and_marker(self, tmpdir_cwd, env): - tmpl = 'install_requires=["barbazquux [test]; {marker}"],' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [:{marker}] - barbazquux[test] - ''').format(marker=self.mismatch_marker_alternate) - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + [:{mismatch_marker_alternate}] + barbazquux + ''', - def test_setup_requires_with_markers(self, tmpdir_cwd, env): - tmpl = 'setup_requires=["barbazquux;{marker}"],' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + ''' + install_requires_with_extra + {'cmd': ['egg_info']} - def test_tests_require_with_markers(self, tmpdir_cwd, env): - tmpl = 'tests_require=["barbazquux;{marker}"],' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command( - tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + install_requires=["barbazquux [test]"], - def test_extras_require_with_extra(self, tmpdir_cwd, env): - req = 'extras_require={"extra": ["barbazquux [test]"]},' - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env, cmd=['egg_info']) - egg_info_dir = os.path.join('.', 'foo.egg-info') - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [extra] - barbazquux[test] - ''') - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + [options] + install_requires = + barbazquux [test] - def test_extras_require_with_extra_and_marker_in_req(self, tmpdir_cwd, env): - tmpl = 'extras_require={{"extra": ["barbazquux [test]; {marker}"]}},' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [extra] - - [extra:{marker}] - barbazquux[test] - ''').format(marker=self.mismatch_marker_alternate) - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + barbazquux[test] + ''', - def test_extras_require_with_marker(self, tmpdir_cwd, env): - tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [:{marker}] - barbazquux - ''').format(marker=self.mismatch_marker) - assert install_requires.lstrip() == expected_requires - assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + ''' + install_requires_with_extra_and_marker - def test_extras_require_with_marker_in_req(self, tmpdir_cwd, env): - tmpl = 'extras_require={{"extra": ["barbazquux; {marker}"]}},' - req = tmpl.format(marker=self.mismatch_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + install_requires=["barbazquux [test]; {mismatch_marker}"], + + [options] + install_requires = + barbazquux [test]; {mismatch_marker} + + [:{mismatch_marker_alternate}] + barbazquux[test] + ''', + + ''' + setup_requires_with_markers + + setup_requires=["barbazquux;{mismatch_marker}"], + + [options] + setup_requires = + barbazquux; {mismatch_marker} + + ''', + + ''' + tests_require_with_markers + {'cmd': ['test'], 'output': "Ran 0 tests in"} + + tests_require=["barbazquux;{mismatch_marker}"], + + [options] + tests_require = + barbazquux; {mismatch_marker} + + ''', + + ''' + extras_require_with_extra + {'cmd': ['egg_info']} + + extras_require={{"extra": ["barbazquux [test]"]}}, + + [options.extras_require] + extra = barbazquux [test] + + [extra] + barbazquux[test] + ''', + + ''' + extras_require_with_extra_and_marker_in_req + + extras_require={{"extra": ["barbazquux [test]; {mismatch_marker}"]}}, + + [options.extras_require] + extra = + barbazquux [test]; {mismatch_marker} + + [extra] + + [extra:{mismatch_marker_alternate}] + barbazquux[test] + ''', + + # FIXME: ConfigParser does not allow : in key names! + ''' + extras_require_with_marker + + extras_require={{":{mismatch_marker}": ["barbazquux"]}}, + + @xfail + [options.extras_require] + :{mismatch_marker} = barbazquux + + [:{mismatch_marker}] + barbazquux + ''', + + ''' + extras_require_with_marker_in_req + + extras_require={{"extra": ["barbazquux; {mismatch_marker}"]}}, + + [options.extras_require] + extra = + barbazquux; {mismatch_marker} + + [extra] + + [extra:{mismatch_marker_alternate}] + barbazquux + ''', + + ''' + extras_require_with_empty_section + + extras_require={{"empty": []}}, + + [options.extras_require] + empty = + + [empty] + ''', + # Format arguments. + invalid_marker=invalid_marker, + mismatch_marker=mismatch_marker, + mismatch_marker_alternate=mismatch_marker_alternate, + ) + def test_requires(self, tmpdir_cwd, env, + requires, use_setup_cfg, + expected_requires, install_cmd_kwargs): + self._setup_script_with_requires(requires, use_setup_cfg) + self._run_install_command(tmpdir_cwd, env, **install_cmd_kwargs) + egg_info_dir = os.path.join('.', 'foo.egg-info') requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [extra] - - [extra:{marker}] - barbazquux - ''').format(marker=self.mismatch_marker_alternate) + if os.path.exists(requires_txt): + with open(requires_txt) as fp: + install_requires = fp.read() + else: + install_requires = '' assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -332,20 +398,6 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] - def test_extras_require_with_empty_section(self, tmpdir_cwd, env): - tmpl = 'extras_require={{"empty": []}},' - req = tmpl.format(marker=self.invalid_marker) - self._setup_script_with_requires(req) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - requires_txt = os.path.join(egg_info_dir, 'requires.txt') - with open(requires_txt) as fp: - install_requires = fp.read() - expected_requires = DALS(''' - [empty] - ''').format(marker=self.mismatch_marker_alternate) - assert install_requires.lstrip() == expected_requires - def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( """python_requires='>=2.7.12',""") From a95062c01b93ee87c5ee4a68204fd17c52109c2a Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 2 Aug 2017 00:30:14 +0200 Subject: [PATCH 6691/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7baca6565d..19afc8cb11 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.2.7 +------- + +* fix #1105: Fix handling of requirements with environment + markers when declared in ``setup.cfg`` (same treatment as + for #1081). + v36.2.6 ------- From d548901f9911e784892e99e933d6c60016521e34 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 2 Aug 2017 00:32:54 +0200 Subject: [PATCH 6692/8469] =?UTF-8?q?Bump=20version:=2036.2.6=20=E2=86=92?= =?UTF-8?q?=2036.2.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1c2b3b16bb..42531f2832 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.6 +current_version = 36.2.7 commit = True tag = True diff --git a/setup.py b/setup.py index 7b29c53ee2..3c6d4027cb 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.6", + version="36.2.7", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 54e6a1cd8565c0130024fd68fd628d36fa0ec1c9 Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Wed, 2 Aug 2017 21:44:53 +0300 Subject: [PATCH 6693/8469] Fix exception on mingw built Python 2 The exception is caused by the VCForPython27 monkey patch. It's not needed on mingw built Python. Disable it and avoid the import by using the same function that `distutils` uses to decide it's running on a mingw built Python. Fixes #1118 --- setuptools/monkey.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 6d3711ec1f..62194595fe 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -4,6 +4,7 @@ import sys import distutils.filelist +from distutils.util import get_platform import platform import types import functools @@ -152,13 +153,13 @@ def patch_for_msvc_specialized_compiler(): Patch functions in distutils to use standalone Microsoft Visual C++ compilers. """ - # import late to avoid circular imports on Python < 3.5 - msvc = import_module('setuptools.msvc') - - if platform.system() != 'Windows': + if not get_platform().startswith('win'): # Compilers only availables on Microsoft Windows return + # import late to avoid circular imports on Python < 3.5 + msvc = import_module('setuptools.msvc') + def patch_params(mod_name, func_name): """ Prepare the parameters for patch_func to patch indicated function. From 300c8802ef4d13d9433af3bce9d22936ff3c610f Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Thu, 3 Aug 2017 21:39:59 +0300 Subject: [PATCH 6694/8469] Fix exception on mingw built Python 2 msvc9compiler doesn't like being imported on mingw built Python. It throws DistutilsPlatformError, so catch it. Fixes #1118 --- setuptools/monkey.py | 9 ++++----- setuptools/msvc.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 62194595fe..6d3711ec1f 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -4,7 +4,6 @@ import sys import distutils.filelist -from distutils.util import get_platform import platform import types import functools @@ -153,13 +152,13 @@ def patch_for_msvc_specialized_compiler(): Patch functions in distutils to use standalone Microsoft Visual C++ compilers. """ - if not get_platform().startswith('win'): - # Compilers only availables on Microsoft Windows - return - # import late to avoid circular imports on Python < 3.5 msvc = import_module('setuptools.msvc') + if platform.system() != 'Windows': + # Compilers only availables on Microsoft Windows + return + def patch_params(mod_name, func_name): """ Prepare the parameters for patch_func to patch indicated function. diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 729021aca7..f391781543 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -47,7 +47,7 @@ class winreg: try: from distutils.msvc9compiler import Reg -except ImportError: +except (ImportError, distutils.errors.DistutilsPlatformError): pass From 20d6c6c22d88260669a1aec573d62aabc4052abf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 3 Aug 2017 14:52:36 -0400 Subject: [PATCH 6695/8469] Extract variable for exceptions to provide explanation --- setuptools/msvc.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index f391781543..8e3b638fee 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -45,9 +45,18 @@ class winreg: safe_env = dict() +_msvc9_suppress_errors = ( + # msvc9compiler isn't available on some platforms + ImportError, + + # msvc9compiler raises DistutilsPlatformError in some + # environments. See #1118. + distutils.errors.DistutilsPlatformError, +) + try: from distutils.msvc9compiler import Reg -except (ImportError, distutils.errors.DistutilsPlatformError): +except _msvc9_suppress_errors: pass From e5461b6ccc57596c7e9cf7837084f8a20eeec9b7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 5 Aug 2017 18:31:53 +0200 Subject: [PATCH 6696/8469] workaround easy_install bug Don't reuse `easy_install` command in `Distribution.fetch_build_egg` implementation. Fix #196. --- setuptools/dist.py | 54 ++++++++++++++++------------------- setuptools/tests/test_dist.py | 46 +++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 30 deletions(-) create mode 100644 setuptools/tests/test_dist.py diff --git a/setuptools/dist.py b/setuptools/dist.py index 21730f22ba..e1510b6f38 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -485,36 +485,30 @@ def get_egg_cache_dir(self): def fetch_build_egg(self, req): """Fetch an egg needed for building""" - - try: - cmd = self._egg_fetcher - cmd.package_index.to_scan = [] - except AttributeError: - from setuptools.command.easy_install import easy_install - dist = self.__class__({'script_args': ['easy_install']}) - dist.parse_config_files() - opts = dist.get_option_dict('easy_install') - keep = ( - 'find_links', 'site_dirs', 'index_url', 'optimize', - 'site_dirs', 'allow_hosts' - ) - for key in list(opts): - if key not in keep: - del opts[key] # don't use any other settings - if self.dependency_links: - links = self.dependency_links[:] - if 'find_links' in opts: - links = opts['find_links'][1].split() + links - opts['find_links'] = ('setup', links) - install_dir = self.get_egg_cache_dir() - cmd = easy_install( - dist, args=["x"], install_dir=install_dir, - exclude_scripts=True, - always_copy=False, build_directory=None, editable=False, - upgrade=False, multi_version=True, no_report=True, user=False - ) - cmd.ensure_finalized() - self._egg_fetcher = cmd + from setuptools.command.easy_install import easy_install + dist = self.__class__({'script_args': ['easy_install']}) + dist.parse_config_files() + opts = dist.get_option_dict('easy_install') + keep = ( + 'find_links', 'site_dirs', 'index_url', 'optimize', + 'site_dirs', 'allow_hosts' + ) + for key in list(opts): + if key not in keep: + del opts[key] # don't use any other settings + if self.dependency_links: + links = self.dependency_links[:] + if 'find_links' in opts: + links = opts['find_links'][1].split() + links + opts['find_links'] = ('setup', links) + install_dir = self.get_egg_cache_dir() + cmd = easy_install( + dist, args=["x"], install_dir=install_dir, + exclude_scripts=True, + always_copy=False, build_directory=None, editable=False, + upgrade=False, multi_version=True, no_report=True, user=False + ) + cmd.ensure_finalized() return cmd.easy_install(req) def _set_global_opts_from_features(self): diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py new file mode 100644 index 0000000000..435ffec0fb --- /dev/null +++ b/setuptools/tests/test_dist.py @@ -0,0 +1,46 @@ +from setuptools import Distribution +from setuptools.extern.six.moves.urllib.request import pathname2url +from setuptools.extern.six.moves.urllib_parse import urljoin + +from .textwrap import DALS +from .test_easy_install import make_nspkg_sdist + + +def test_dist_fetch_build_egg(tmpdir): + """ + Check multiple calls to `Distribution.fetch_build_egg` work as expected. + """ + index = tmpdir.mkdir('index') + index_url = urljoin('file://', pathname2url(str(index))) + def sdist_with_index(distname, version): + dist_dir = index.mkdir(distname) + dist_sdist = '%s-%s.tar.gz' % (distname, version) + make_nspkg_sdist(str(dist_dir.join(dist_sdist)), distname, version) + with dist_dir.join('index.html').open('w') as fp: + fp.write(DALS( + ''' + + {dist_sdist}
    + + ''' + ).format(dist_sdist=dist_sdist)) + sdist_with_index('barbazquux', '3.2.0') + sdist_with_index('barbazquux-runner', '2.11.1') + with tmpdir.join('setup.cfg').open('w') as fp: + fp.write(DALS( + ''' + [easy_install] + index_url = {index_url} + ''' + ).format(index_url=index_url)) + reqs = ''' + barbazquux-runner + barbazquux + '''.split() + with tmpdir.as_cwd(): + dist = Distribution() + resolved_dists = [ + dist.fetch_build_egg(r) + for r in reqs + ] + assert [dist.key for dist in resolved_dists if dist] == reqs From 986ff42f117e8ac3cc952bfc2c043f7de8ba7084 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 9 Aug 2017 23:16:13 +0300 Subject: [PATCH 6697/8469] Allow adding few files @ metadata.long_description --- setuptools/config.py | 6 +++--- setuptools/tests/test_config.py | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 06a61d160c..4d3eff93a7 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -245,8 +245,8 @@ def _parse_file(cls, value): directory with setup.py. Examples: - include: LICENSE - include: src/file.txt + file: LICENSE + file: src/file.txt :param str value: :rtype: str @@ -408,7 +408,7 @@ def parsers(self): 'classifiers': self._get_parser_compound(parse_file, parse_list), 'license': parse_file, 'description': parse_file, - 'long_description': parse_file, + 'long_description': self._get_parser_compound(parse_list, lambda l: '\n'.join(map(parse_file, l))), 'version': self._parse_version, } diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index dbabd69e6d..95ae60b285 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -139,6 +139,30 @@ def test_basic(self, tmpdir): assert metadata.download_url == 'http://test.test.com/test/' assert metadata.maintainer_email == 'test@test.com' + def test_file_mixed(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'long_description =\n' + ' Some normal line\n' + ' file: README.rst\n' + ' Another line\n' + ' file: CHANGES.rst\n' + '\n' + ) + + tmpdir.join('README.rst').write('readme contents\nline2') + tmpdir.join('CHANGES.rst').write('changelog contents\nand stuff') + + with get_dist(tmpdir) as dist: + assert dist.metadata.long_description == ( + 'Some normal line\n' + 'readme contents\nline2\n' + 'Another line\n' + 'changelog contents\nand stuff' + ) + def test_file_sandboxed(self, tmpdir): fake_env( From 30bf0a41e410d17d118fd9bdf9385f035871951e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 9 Aug 2017 23:34:38 +0300 Subject: [PATCH 6698/8469] Add info about few `file:`'s to changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 19afc8cb11..a48b8f132d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.3.0 +------- + +* #1131: Make possible using several ``file:`` directives + within metadata.long_description in ``setup.cfg``. + v36.2.7 ------- From b699f94728c82691bed9b67a48b170951535fa38 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 28 Aug 2017 10:22:21 +0300 Subject: [PATCH 6699/8469] Support list of files passed to `file:` directive * `file:` not accepts comma-separated list of filenames * files' contents are glues with an LF separator --- setuptools/config.py | 30 +++++++++++++++++++----------- setuptools/tests/test_config.py | 10 ++-------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 4d3eff93a7..b6627c808e 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -246,30 +246,38 @@ def _parse_file(cls, value): Examples: file: LICENSE - file: src/file.txt + file: README.rst, CHANGELOG.md, src/file.txt :param str value: :rtype: str """ + include_directive = 'file:' + file_contents = [] + if not isinstance(value, string_types): return value - include_directive = 'file:' if not value.startswith(include_directive): return value + filepaths = value[len(include_directive):] + filepaths = filepaths.split(',') + filepaths = map(str.strip, filepaths) + filepaths = map(os.path.abspath, filepaths) + current_directory = os.getcwd() - filepath = value.replace(include_directive, '').strip() - filepath = os.path.abspath(filepath) + for filepath in filepaths: + if not filepath.startswith(current_directory): + raise DistutilsOptionError( + '`file:` directive can not access %s' % filepath) - if not filepath.startswith(current_directory): - raise DistutilsOptionError( - '`file:` directive can not access %s' % filepath) + if os.path.isfile(filepath): + with io.open(filepath, encoding='utf-8') as f: + file_contents.append(f.read()) - if os.path.isfile(filepath): - with io.open(filepath, encoding='utf-8') as f: - value = f.read() + if file_contents: + value = '\n'.join(file_contents) return value @@ -408,7 +416,7 @@ def parsers(self): 'classifiers': self._get_parser_compound(parse_file, parse_list), 'license': parse_file, 'description': parse_file, - 'long_description': self._get_parser_compound(parse_list, lambda l: '\n'.join(map(parse_file, l))), + 'long_description': parse_file, 'version': self._parse_version, } diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 95ae60b285..d81d428825 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -144,11 +144,7 @@ def test_file_mixed(self, tmpdir): fake_env( tmpdir, '[metadata]\n' - 'long_description =\n' - ' Some normal line\n' - ' file: README.rst\n' - ' Another line\n' - ' file: CHANGES.rst\n' + 'long_description = file: README.rst, CHANGES.rst\n' '\n' ) @@ -157,9 +153,7 @@ def test_file_mixed(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.long_description == ( - 'Some normal line\n' 'readme contents\nline2\n' - 'Another line\n' 'changelog contents\nand stuff' ) @@ -168,7 +162,7 @@ def test_file_sandboxed(self, tmpdir): fake_env( tmpdir, '[metadata]\n' - 'long_description = file: ../../README\n' + 'long_description = file: CHANGES.rst, ../../README\n' ) with get_dist(tmpdir, parse=False) as dist: From a9ad5e3fc1e5d5eaa54182129e4245e947c02065 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 28 Aug 2017 10:27:39 +0300 Subject: [PATCH 6700/8469] Update changelog to reflect after-review changes --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a48b8f132d..1392e2a688 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,8 +1,8 @@ v36.3.0 ------- -* #1131: Make possible using several ``file:`` directives - within metadata.long_description in ``setup.cfg``. +* #1131: Make possible using several files within ``file:`` directive + in metadata.long_description in ``setup.cfg``. v36.2.7 ------- From c5c4304d8c60b6f985c8c7607f6950d31d1b2e33 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 28 Aug 2017 10:39:29 +0300 Subject: [PATCH 6701/8469] Convert path to str, which is needed under Py 2 --- setuptools/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/config.py b/setuptools/config.py index b6627c808e..6fa50d204b 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -262,6 +262,7 @@ def _parse_file(cls, value): filepaths = value[len(include_directive):] filepaths = filepaths.split(',') + filepaths = map(str, filepaths) # Needed for Python 2 filepaths = map(str.strip, filepaths) filepaths = map(os.path.abspath, filepaths) From 675f5aad0f675ce3d7f3e0125d2ab69843babcbb Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 28 Aug 2017 10:42:52 +0300 Subject: [PATCH 6702/8469] Update docs with a file list usage example Now it's possible to use it like this: * long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index eb9fdbd3c4..45d746d26c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2306,7 +2306,7 @@ boilerplate code in some cases. name = my_package version = attr: src.VERSION description = My package description - long_description = file: README.rst + long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst keywords = one, two license = BSD 3-Clause License classifiers = @@ -2379,7 +2379,7 @@ Type names used below: Special directives: * ``attr:`` - value could be read from module attribute -* ``file:`` - value could be read from a file +* ``file:`` - value could be read from a list of files and then concatenated .. note:: From 29688821b381268a0d59c0d26317d88ad518f966 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 21 Jun 2017 14:08:35 +0200 Subject: [PATCH 6703/8469] Sort file lists to generate reproducible zip files that do not differ depending on (random) filesystem order See https://reproducible-builds.org/ for why this matters. --- setuptools/command/bdist_egg.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 8cd9dfefe2..51755d52c9 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -38,6 +38,14 @@ def strip_module(filename): filename = filename[:-6] return filename +def sorted_walk(dir): + """Do os.walk in a reproducible way, + independent of indeterministic filesystem readdir order + """ + for base, dirs, files in os.walk(dir): + dirs.sort() + files.sort() + yield base, dirs, files def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" @@ -302,7 +310,7 @@ def get_ext_outputs(self): ext_outputs = [] paths = {self.bdist_dir: ''} - for base, dirs, files in os.walk(self.bdist_dir): + for base, dirs, files in sorted_walk(self.bdist_dir): for filename in files: if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS: all_outputs.append(paths[base] + filename) @@ -329,7 +337,7 @@ def get_ext_outputs(self): def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" - walker = os.walk(egg_dir) + walker = sorted_walk(egg_dir) base, dirs, files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') @@ -463,10 +471,10 @@ def visit(z, dirname, names): compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: z = zipfile.ZipFile(zip_filename, mode, compression=compression) - for dirname, dirs, files in os.walk(base_dir): + for dirname, dirs, files in sorted_walk(base_dir): visit(z, dirname, files) z.close() else: - for dirname, dirs, files in os.walk(base_dir): + for dirname, dirs, files in sorted_walk(base_dir): visit(None, dirname, files) return zip_filename From df23966ac5bae1028a37af53c644b9e0839ac93b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 25 Aug 2017 11:32:36 +0200 Subject: [PATCH 6704/8469] pkg_resources: do not call stat() and access() The current code in find_on_path is doing a lot of stat() calls which are actually useless and prone to race conditions. As described in Python documentation (https://docs.python.org/3/library/os.html#os.access), os.access must not be used before opening a file. Same goes for a directory. This patch removes those checks by handling exceptions correctly when using os.listdir() instead, which improves pkg_resources import time. --- pkg_resources/__init__.py | 95 +++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f13a69b302..277ee93804 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -34,6 +34,7 @@ import collections import plistlib import email.parser +import errno import tempfile import textwrap import itertools @@ -80,6 +81,11 @@ if (3, 0) < sys.version_info < (3, 3): raise RuntimeError("Python 3.3 or later is required") +if six.PY2: + # Those builtin exceptions are only defined in Python 3 + PermissionError = None + NotADirectoryError = None + # declare some globals that will be defined later to # satisfy the linters. require = None @@ -2008,46 +2014,57 @@ def find_on_path(importer, path_item, only=False): """Yield distributions accessible on a sys.path directory""" path_item = _normalize_cached(path_item) - if os.path.isdir(path_item) and os.access(path_item, os.R_OK): - if _is_unpacked_egg(path_item): - yield Distribution.from_filename( - path_item, metadata=PathMetadata( - path_item, os.path.join(path_item, 'EGG-INFO') - ) + if _is_unpacked_egg(path_item): + yield Distribution.from_filename( + path_item, metadata=PathMetadata( + path_item, os.path.join(path_item, 'EGG-INFO') ) - else: - # scan for .egg and .egg-info in directory - path_item_entries = _by_version_descending(os.listdir(path_item)) - for entry in path_item_entries: - lower = entry.lower() - if lower.endswith('.egg-info') or lower.endswith('.dist-info'): - fullpath = os.path.join(path_item, entry) - if os.path.isdir(fullpath): - # egg-info directory, allow getting metadata - if len(os.listdir(fullpath)) == 0: - # Empty egg directory, skip. - continue - metadata = PathMetadata(path_item, fullpath) - else: - metadata = FileMetadata(fullpath) - yield Distribution.from_location( - path_item, entry, metadata, precedence=DEVELOP_DIST - ) - elif not only and _is_egg_path(entry): - dists = find_distributions(os.path.join(path_item, entry)) - for dist in dists: - yield dist - elif not only and lower.endswith('.egg-link'): - with open(os.path.join(path_item, entry)) as entry_file: - entry_lines = entry_file.readlines() - for line in entry_lines: - if not line.strip(): - continue - path = os.path.join(path_item, line.rstrip()) - dists = find_distributions(path) - for item in dists: - yield item - break + ) + else: + try: + entries = os.listdir(path_item) + except (PermissionError, NotADirectoryError): + return + except OSError as e: + # Ignore the directory if does not exist, not a directory or we + # don't have permissions + if (e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) + # Python 2 on Windows needs to be handled this way :( + or hasattr(e, "winerror") and e.winerror == 267): + return + raise + # scan for .egg and .egg-info in directory + path_item_entries = _by_version_descending(entries) + for entry in path_item_entries: + lower = entry.lower() + if lower.endswith('.egg-info') or lower.endswith('.dist-info'): + fullpath = os.path.join(path_item, entry) + if os.path.isdir(fullpath): + # egg-info directory, allow getting metadata + if len(os.listdir(fullpath)) == 0: + # Empty egg directory, skip. + continue + metadata = PathMetadata(path_item, fullpath) + else: + metadata = FileMetadata(fullpath) + yield Distribution.from_location( + path_item, entry, metadata, precedence=DEVELOP_DIST + ) + elif not only and _is_egg_path(entry): + dists = find_distributions(os.path.join(path_item, entry)) + for dist in dists: + yield dist + elif not only and lower.endswith('.egg-link'): + with open(os.path.join(path_item, entry)) as entry_file: + entry_lines = entry_file.readlines() + for line in entry_lines: + if not line.strip(): + continue + path = os.path.join(path_item, line.rstrip()) + dists = find_distributions(path) + for item in dists: + yield item + break register_finder(pkgutil.ImpImporter, find_on_path) From 5da6479d917d77c8091d8b4c32724054ae5adf65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 08:50:44 -0400 Subject: [PATCH 6705/8469] Avoid interaction of multiple factors in test. If one wishes to test both 'mixed' and 'sandboxed', let's create a separate test for that, but it's probably unnecessary. --- setuptools/tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index d81d428825..cdfa5af43b 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -162,7 +162,7 @@ def test_file_sandboxed(self, tmpdir): fake_env( tmpdir, '[metadata]\n' - 'long_description = file: CHANGES.rst, ../../README\n' + 'long_description = file: ../../README\n' ) with get_dist(tmpdir, parse=False) as dist: From fc59fe8ea080f7d469c6c388fa878c4ede3e6557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 08:54:02 -0400 Subject: [PATCH 6706/8469] Using generator comprehension, avoid casting filepath to bytes on Python 2 --- setuptools/config.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 6fa50d204b..23fc25eae6 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -260,11 +260,8 @@ def _parse_file(cls, value): if not value.startswith(include_directive): return value - filepaths = value[len(include_directive):] - filepaths = filepaths.split(',') - filepaths = map(str, filepaths) # Needed for Python 2 - filepaths = map(str.strip, filepaths) - filepaths = map(os.path.abspath, filepaths) + spec = value[len(include_directive):] + filepaths = (os.path.abspath(path.strip()) for path in spec.split(',')) current_directory = os.getcwd() From 3af152a26ee2ef889b8d7ab4428c975ba0c8e85b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 09:05:42 -0400 Subject: [PATCH 6707/8469] Extract method for reading local file. Now return results directly instead of for/append loop. --- setuptools/config.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 23fc25eae6..2b1562693e 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -252,7 +252,6 @@ def _parse_file(cls, value): :rtype: str """ include_directive = 'file:' - file_contents = [] if not isinstance(value, string_types): return value @@ -262,22 +261,24 @@ def _parse_file(cls, value): spec = value[len(include_directive):] filepaths = (os.path.abspath(path.strip()) for path in spec.split(',')) + return '\n'.join( + self._read_local_file(path) + for path in filepath + if os.path.isfile(path) + ) + + @staticmethod + def _read_local_file(filepath): + """ + Read contents of filepath. Raise error if the file + isn't in the current directory. + """ + if not filepath.startswith(os.getcwd()): + raise DistutilsOptionError( + '`file:` directive can not access %s' % filepath) - current_directory = os.getcwd() - - for filepath in filepaths: - if not filepath.startswith(current_directory): - raise DistutilsOptionError( - '`file:` directive can not access %s' % filepath) - - if os.path.isfile(filepath): - with io.open(filepath, encoding='utf-8') as f: - file_contents.append(f.read()) - - if file_contents: - value = '\n'.join(file_contents) - - return value + with io.open(filepath, encoding='utf-8') as f: + return f.read() @classmethod def _parse_attr(cls, value): From 7e549f6eb72e37f50a1183e018ad2f3b2c952285 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 09:09:41 -0400 Subject: [PATCH 6708/8469] Correct typo --- setuptools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index 2b1562693e..7ba02184cb 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -263,7 +263,7 @@ def _parse_file(cls, value): filepaths = (os.path.abspath(path.strip()) for path in spec.split(',')) return '\n'.join( self._read_local_file(path) - for path in filepath + for path in filepaths if os.path.isfile(path) ) From 3c25384fce3f6134a342ab32b7afc54cc6066fa3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 09:13:37 -0400 Subject: [PATCH 6709/8469] Use proper reference. --- setuptools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index 7ba02184cb..75f829fb88 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -262,7 +262,7 @@ def _parse_file(cls, value): spec = value[len(include_directive):] filepaths = (os.path.abspath(path.strip()) for path in spec.split(',')) return '\n'.join( - self._read_local_file(path) + cls._read_local_file(path) for path in filepaths if os.path.isfile(path) ) From 9e708961e7fa64e56c9469ca52163d7e2df31477 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 09:32:25 -0400 Subject: [PATCH 6710/8469] Need to perform the local assertion before checking for existence. --- setuptools/config.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 75f829fb88..9a62e2ec55 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -262,21 +262,20 @@ def _parse_file(cls, value): spec = value[len(include_directive):] filepaths = (os.path.abspath(path.strip()) for path in spec.split(',')) return '\n'.join( - cls._read_local_file(path) + cls._read_file(path) for path in filepaths - if os.path.isfile(path) + if (cls._assert_local(path) or True) + and os.path.isfile(path) ) @staticmethod - def _read_local_file(filepath): - """ - Read contents of filepath. Raise error if the file - isn't in the current directory. - """ + def _assert_local(filepath): if not filepath.startswith(os.getcwd()): raise DistutilsOptionError( '`file:` directive can not access %s' % filepath) + @staticmethod + def _read_file(filepath): with io.open(filepath, encoding='utf-8') as f: return f.read() From b4d58d4929dd4e19870b5eafa48046a0a0c2bf07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Aug 2017 09:45:10 -0400 Subject: [PATCH 6711/8469] =?UTF-8?q?Bump=20version:=2036.2.7=20=E2=86=92?= =?UTF-8?q?=2036.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2a6529faae..ddc2a7229d 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.2.7 +current_version = 36.3.0 commit = True tag = True @@ -23,3 +23,4 @@ formats = zip universal = 1 [bumpversion:file:setup.py] + diff --git a/setup.py b/setup.py index 3c6d4027cb..d7a13445bd 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.2.7", + version="36.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 4fc60ed1e47f725a833dd63656ceec981a58e1a0 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sat, 30 Jul 2016 08:15:53 -0700 Subject: [PATCH 6712/8469] Add new long_description_content_type kwarg This is used to populate the new `Description-Content-Type` field. `Description-Content-Type` is described at https://github.com/pypa/python-packaging-user-guide/pull/258 --- setup.py | 1 + setuptools/command/egg_info.py | 4 ++++ setuptools/dist.py | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/setup.py b/setup.py index d7a13445bd..a02e41aa2e 100755 --- a/setup.py +++ b/setup.py @@ -95,6 +95,7 @@ def pypi_link(pkg_filename): author="Python Packaging Authority", author_email="distutils-sig@python.org", long_description=long_description, + long_description_content_type='text/x-rst; charset=UTF-8', keywords="CPAN PyPI distutils eggs package management", url="https://github.com/pypa/setuptools", src_root=None, diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6c00b0b7c2..a183d15db7 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -599,6 +599,10 @@ def write_pkg_info(cmd, basename, filename): metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name + metadata.long_description_content_type = getattr( + cmd.distribution, + 'long_description_content_type' + ) try: # write unescaped data to PKG-INFO, so older pkg_resources # can still parse it diff --git a/setuptools/dist.py b/setuptools/dist.py index 21730f22ba..084641a8be 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -58,6 +58,13 @@ def write_pkg_file(self, file): if self.download_url: file.write('Download-URL: %s\n' % self.download_url) + long_desc_content_type = getattr( + self, + 'long_description_content_type', + None + ) or 'UNKNOWN' + file.write('Description-Content-Type: %s\n' % long_desc_content_type) + long_desc = rfc822_escape(self.get_long_description()) file.write('Description: %s\n' % long_desc) @@ -317,6 +324,9 @@ def __init__(self, attrs=None): self.dist_files = [] self.src_root = attrs and attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) + self.long_description_content_type = _attrs_dict.get( + 'long_description_content_type' + ) # Make sure we have any eggs needed to interpret 'attrs' if attrs is not None: self.dependency_links = attrs.pop('dependency_links', []) From ffc5f66bf730106854bd2bf41da494d5a17dcc46 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 31 Jul 2016 15:17:12 -0700 Subject: [PATCH 6713/8469] Add test_long_description_content_type Test that specifying a `long_description_content_type` keyword arg to the `setup` function results in writing a `Description-Content-Type` line to the `PKG-INFO` file in the `.egg-info` directory. `Description-Content-Type` is described at https://github.com/pypa/python-packaging-user-guide/pull/258 --- setuptools/tests/test_egg_info.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 33d6cc5268..e454694d11 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -398,6 +398,31 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_long_description_content_type(self, tmpdir_cwd, env): + # Test that specifying a `long_description_content_type` keyword arg to + # the `setup` function results in writing a `Description-Content-Type` + # line to the `PKG-INFO` file in the `.egg-info` + # directory. + # `Description-Content-Type` is described at + # https://github.com/pypa/python-packaging-user-guide/pull/258 + + self._setup_script_with_requires( + """long_description_content_type='text/markdown',""") + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + code, data = environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + expected_line = 'Description-Content-Type: text/markdown' + assert expected_line in pkg_info_lines + def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( """python_requires='>=2.7.12',""") From 6b65f6b0a4e116dc56217ad8bc92e2a57d8c15a3 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Mon, 28 Aug 2017 12:31:48 -0500 Subject: [PATCH 6714/8469] Add long_description_content_type to metadata table --- docs/setuptools.txt | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 45d746d26c..531d727c10 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2394,27 +2394,28 @@ Metadata Aliases given below are supported for compatibility reasons, but not advised. -================= ================= ===== -Key Aliases Accepted value type -================= ================= ===== -name str -version attr:, str -url home-page str -download_url download-url str -author str -author_email author-email str -maintainer str -maintainer_email maintainer-email str -classifiers classifier file:, list-comma -license file:, str -description summary file:, str -long_description long-description file:, str -keywords list-comma -platforms platform list-comma -provides list-comma -requires list-comma -obsoletes list-comma -================= ================= ===== +============================== ================= ===== +Key Aliases Accepted value type +============================== ================= ===== +name str +version attr:, str +url home-page str +download_url download-url str +author str +author_email author-email str +maintainer str +maintainer_email maintainer-email str +classifiers classifier file:, list-comma +license file:, str +description summary file:, str +long_description long-description file:, str +long_description_content_type str +keywords list-comma +platforms platform list-comma +provides list-comma +requires list-comma +obsoletes list-comma +============================== ================= ===== .. note:: From bf1f96484714dab6ab79462085d5716cd7b175b1 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Mon, 28 Aug 2017 13:11:19 -0500 Subject: [PATCH 6715/8469] Update CHANGES.rst --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1392e2a688..f512cb78f5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.4.0 +------- + +* #1075: Add new ``Description-Content-Type`` metadata field. `See here for + documentation on how to use this field. + `_ + v36.3.0 ------- From ff554f49af775663bc37e1005cf1b613804b2f51 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 7 Aug 2017 23:28:19 +0200 Subject: [PATCH 6716/8469] pkg_resources: improve WorkingSet.resolve(replace_conflicting=True) Correctly replace conflicting distributions in sub-requirements if possible (instead of only for top-level requirements passed as arguments). Fix #1124. --- pkg_resources/__init__.py | 14 +- pkg_resources/tests/test_working_set.py | 478 ++++++++++++++++++++++++ 2 files changed, 489 insertions(+), 3 deletions(-) create mode 100644 pkg_resources/tests/test_working_set.py diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index f13a69b302..9eb2a37000 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -852,7 +852,10 @@ def resolve(self, requirements, env=None, installer=None, # distribution env = Environment([]) ws = WorkingSet([]) - dist = best[req.key] = env.best_match(req, ws, installer) + dist = best[req.key] = env.best_match( + req, ws, installer, + replace_conflicting=replace_conflicting + ) if dist is None: requirers = required_by.get(req, None) raise DistributionNotFound(req, requirers) @@ -1104,7 +1107,7 @@ def add(self, dist): dists.append(dist) dists.sort(key=operator.attrgetter('hashcmp'), reverse=True) - def best_match(self, req, working_set, installer=None): + def best_match(self, req, working_set, installer=None, replace_conflicting=False): """Find distribution best matching `req` and usable on `working_set` This calls the ``find(req)`` method of the `working_set` to see if a @@ -1117,7 +1120,12 @@ def best_match(self, req, working_set, installer=None): calling the environment's ``obtain(req, installer)`` method will be returned. """ - dist = working_set.find(req) + try: + dist = working_set.find(req) + except VersionConflict: + if not replace_conflicting: + raise + dist = None if dist is not None: return dist for dist in self[req.key]: diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py new file mode 100644 index 0000000000..422a7283e9 --- /dev/null +++ b/pkg_resources/tests/test_working_set.py @@ -0,0 +1,478 @@ +import inspect +import re +import textwrap + +import pytest + +import pkg_resources + +from .test_resources import Metadata + + +def strip_comments(s): + return '\n'.join( + l for l in s.split('\n') + if l.strip() and not l.strip().startswith('#') + ) + +def parse_distributions(s): + ''' + Parse a series of distribution specs of the form: + {project_name}-{version} + [optional, indented requirements specification] + + Example: + + foo-0.2 + bar-1.0 + foo>=3.0 + [feature] + baz + + yield 2 distributions: + - project_name=foo, version=0.2 + - project_name=bar, version=1.0, requires=['foo>=3.0', 'baz; extra=="feature"'] + ''' + s = s.strip() + for spec in re.split('\n(?=[^\s])', s): + if not spec: + continue + fields = spec.split('\n', 1) + assert 1 <= len(fields) <= 2 + name, version = fields.pop(0).split('-') + if fields: + requires = textwrap.dedent(fields.pop(0)) + metadata=Metadata(('requires.txt', requires)) + else: + metadata = None + dist = pkg_resources.Distribution(project_name=name, + version=version, + metadata=metadata) + yield dist + + +class FakeInstaller(object): + + def __init__(self, installable_dists): + self._installable_dists = installable_dists + + def __call__(self, req): + return next(iter(filter(lambda dist: dist in req, + self._installable_dists)), None) + + +def parametrize_test_working_set_resolve(*test_list): + idlist = [] + argvalues = [] + for test in test_list: + ( + name, + installed_dists, + installable_dists, + requirements, + expected1, expected2 + ) = [ + strip_comments(s.lstrip()) for s in + textwrap.dedent(test).lstrip().split('\n\n', 5) + ] + installed_dists = list(parse_distributions(installed_dists)) + installable_dists = list(parse_distributions(installable_dists)) + requirements = list(pkg_resources.parse_requirements(requirements)) + for id_, replace_conflicting, expected in ( + (name, False, expected1), + (name + '_replace_conflicting', True, expected2), + ): + idlist.append(id_) + expected = strip_comments(expected.strip()) + if re.match('\w+$', expected): + expected = getattr(pkg_resources, expected) + assert issubclass(expected, Exception) + else: + expected = list(parse_distributions(expected)) + argvalues.append(pytest.param(installed_dists, installable_dists, + requirements, replace_conflicting, + expected)) + return pytest.mark.parametrize('installed_dists,installable_dists,' + 'requirements,replace_conflicting,' + 'resolved_dists_or_exception', + argvalues, ids=idlist) + + +@parametrize_test_working_set_resolve( + ''' + # id + noop + + # installed + + # installable + + # wanted + + # resolved + + # resolved [replace conflicting] + ''', + + ''' + # id + already_installed + + # installed + foo-3.0 + + # installable + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + foo-3.0 + + # resolved [replace conflicting] + foo-3.0 + ''', + + ''' + # id + installable_not_installed + + # installed + + # installable + foo-3.0 + foo-4.0 + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + foo-3.0 + + # resolved [replace conflicting] + foo-3.0 + ''', + + ''' + # id + not_installable + + # installed + + # installable + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + DistributionNotFound + + # resolved [replace conflicting] + DistributionNotFound + ''', + + ''' + # id + no_matching_version + + # installed + + # installable + foo-3.1 + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + DistributionNotFound + + # resolved [replace conflicting] + DistributionNotFound + ''', + + ''' + # id + installable_with_installed_conflict + + # installed + foo-3.1 + + # installable + foo-3.5 + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + VersionConflict + + # resolved [replace conflicting] + foo-3.5 + ''', + + ''' + # id + not_installable_with_installed_conflict + + # installed + foo-3.1 + + # installable + + # wanted + foo>=2.1,!=3.1,<4 + + # resolved + VersionConflict + + # resolved [replace conflicting] + DistributionNotFound + ''', + + ''' + # id + installed_with_installed_require + + # installed + foo-3.9 + baz-0.1 + foo>=2.1,!=3.1,<4 + + # installable + + # wanted + baz + + # resolved + foo-3.9 + baz-0.1 + + # resolved [replace conflicting] + foo-3.9 + baz-0.1 + ''', + + ''' + # id + installed_with_conflicting_installed_require + + # installed + foo-5 + baz-0.1 + foo>=2.1,!=3.1,<4 + + # installable + + # wanted + baz + + # resolved + VersionConflict + + # resolved [replace conflicting] + DistributionNotFound + ''', + + ''' + # id + installed_with_installable_conflicting_require + + # installed + foo-5 + baz-0.1 + foo>=2.1,!=3.1,<4 + + # installable + foo-2.9 + + # wanted + baz + + # resolved + VersionConflict + + # resolved [replace conflicting] + baz-0.1 + foo-2.9 + ''', + + ''' + # id + installed_with_installable_require + + # installed + baz-0.1 + foo>=2.1,!=3.1,<4 + + # installable + foo-3.9 + + # wanted + baz + + # resolved + foo-3.9 + baz-0.1 + + # resolved [replace conflicting] + foo-3.9 + baz-0.1 + ''', + + ''' + # id + installable_with_installed_require + + # installed + foo-3.9 + + # installable + baz-0.1 + foo>=2.1,!=3.1,<4 + + # wanted + baz + + # resolved + foo-3.9 + baz-0.1 + + # resolved [replace conflicting] + foo-3.9 + baz-0.1 + ''', + + ''' + # id + installable_with_installable_require + + # installed + + # installable + foo-3.9 + baz-0.1 + foo>=2.1,!=3.1,<4 + + # wanted + baz + + # resolved + foo-3.9 + baz-0.1 + + # resolved [replace conflicting] + foo-3.9 + baz-0.1 + ''', + + ''' + # id + installable_with_conflicting_installable_require + + # installed + foo-5 + + # installable + foo-2.9 + baz-0.1 + foo>=2.1,!=3.1,<4 + + # wanted + baz + + # resolved + VersionConflict + + # resolved [replace conflicting] + baz-0.1 + foo-2.9 + ''', + + ''' + # id + conflicting_installables + + # installed + + # installable + foo-2.9 + foo-5.0 + + # wanted + foo>=2.1,!=3.1,<4 + foo>=4 + + # resolved + VersionConflict + + # resolved [replace conflicting] + VersionConflict + ''', + + ''' + # id + installables_with_conflicting_requires + + # installed + + # installable + foo-2.9 + dep==1.0 + baz-5.0 + dep==2.0 + dep-1.0 + dep-2.0 + + # wanted + foo + baz + + # resolved + VersionConflict + + # resolved [replace conflicting] + VersionConflict + ''', + + ''' + # id + installables_with_conflicting_nested_requires + + # installed + + # installable + foo-2.9 + dep1 + dep1-1.0 + subdep<1.0 + baz-5.0 + dep2 + dep2-1.0 + subdep>1.0 + subdep-0.9 + subdep-1.1 + + # wanted + foo + baz + + # resolved + VersionConflict + + # resolved [replace conflicting] + VersionConflict + ''', +) +def test_working_set_resolve(installed_dists, installable_dists, requirements, + replace_conflicting, resolved_dists_or_exception): + ws = pkg_resources.WorkingSet([]) + list(map(ws.add, installed_dists)) + resolve_call = lambda: ws.resolve( + requirements, installer=FakeInstaller(installable_dists), + replace_conflicting=replace_conflicting, + ) + if inspect.isclass(resolved_dists_or_exception): + with pytest.raises(resolved_dists_or_exception): + resolve_call() + else: + assert sorted(resolve_call()) == sorted(resolved_dists_or_exception) From 3dc206647c09bbdd5d9dc838911e3a9f79702200 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 29 Aug 2017 14:43:53 +0200 Subject: [PATCH 6717/8469] Update changelog --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1392e2a688..1ac9b5fbca 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +In development +-------------- + +* #1129: Fix working set dependencies handling when replacing conflicting + distributions (e.g. when using ``setup_requires`` with a conflicting + transitive dependency, fix #1124). + v36.3.0 ------- From 500bb9a161e810523c48825491b853c5fbe595cc Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Tue, 22 Aug 2017 00:22:54 +0200 Subject: [PATCH 6718/8469] Improve README file list handling and add Markdown to the current list Markdown is a widely used format to write README files and documentation. This patch aims to simplify adding new formats and at the same time adds that one to the list. --- CHANGES.rst | 5 +++++ setuptools/command/sdist.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1392e2a688..a488341f9d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.3.1 + +* Improved handling of README files extensions and added + Markdown to the list of searched READMES. + v36.3.0 ------- diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 84e29a1b7d..7b4d197d48 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -37,7 +37,8 @@ class sdist(sdist_add_defaults, orig.sdist): negative_opt = {} - READMES = 'README', 'README.rst', 'README.txt' + README_EXTENSIONS = ['', '.rst', '.txt', '.md'] + READMES = tuple('README{}'.format(ext) for ext in README_EXTENSIONS) def run(self): self.run_command('egg_info') From d12975cabfe905c299541a2292dcd52c26eadce2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Sep 2017 11:02:07 -0400 Subject: [PATCH 6719/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 19afc8cb11..9451ff3a71 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.4.0 +------- + +* #1068: Sort files and directories when building eggs for + deterministic order. + v36.2.7 ------- From 37eceeb0a4aab75c54f8e6afb66fd236562ca9f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Sep 2017 13:35:22 -0400 Subject: [PATCH 6720/8469] Update changelog --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 24a3e4d0ac..9b9d5fe16d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,10 @@ v36.4.0 * #1068: Sort files and directories when building eggs for deterministic order. +* #196: Remove caching of easy_install command in fetch_build_egg. + Fixes issue where ``pytest-runner-N.N`` would satisfy the installation + of ``pytest``. + v36.3.0 ------- From 679ead9cc14287a1ba6cb8c0facdf42e20aef035 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Sep 2017 14:05:07 -0400 Subject: [PATCH 6721/8469] Update changelog --- CHANGES.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ced6630c5a..8130511e37 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,8 +16,11 @@ v36.4.0 distributions (e.g. when using ``setup_requires`` with a conflicting transitive dependency, fix #1124). -* #1133: Improved handling of README files extensions and added - Markdown to the list of searched READMES. +* #1133: Improved handling of README files extensions and added + Markdown to the list of searched READMES. + +* #1135: Improve performance of pkg_resources import by not invoking + ``access`` or ``stat`` and using ``os.listdir`` instead. v36.3.0 ------- From a4980242d8b449e1ab08adaac073deff9efc9cc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Sep 2017 14:07:09 -0400 Subject: [PATCH 6722/8469] =?UTF-8?q?Bump=20version:=2036.3.0=20=E2=86=92?= =?UTF-8?q?=2036.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ddc2a7229d..ea649893f1 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.3.0 +current_version = 36.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index a02e41aa2e..eb939ff370 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.3.0", + version="36.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e909e1cb7aff16a02a965fe3ebaa16a65d749d63 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 3 Sep 2017 20:10:22 +0200 Subject: [PATCH 6723/8469] Fix Python 2.6 support --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 7b4d197d48..508148e06d 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -38,7 +38,7 @@ class sdist(sdist_add_defaults, orig.sdist): negative_opt = {} README_EXTENSIONS = ['', '.rst', '.txt', '.md'] - READMES = tuple('README{}'.format(ext) for ext in README_EXTENSIONS) + READMES = tuple('README{0}'.format(ext) for ext in README_EXTENSIONS) def run(self): self.run_command('egg_info') From c3052243e0aa7e756645a116fef7ed9ff09bfd5e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 4 Sep 2017 16:36:05 -0700 Subject: [PATCH 6724/8469] remove IRIX support (closes bpo-31341) (#3310) See PEP 11. --- tests/test_unixccompiler.py | 8 -------- unixccompiler.py | 2 -- util.py | 19 +++++++------------ 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index efba27e1c8..eef702cf01 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -51,14 +51,6 @@ def gcv(v): sysconfig.get_config_var = old_gcv - # irix646 - sys.platform = 'irix646' - self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) - - # osf1V5 - sys.platform = 'osf1V5' - self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo']) - # GCC GNULD sys.platform = 'bar' def gcv(v): diff --git a/unixccompiler.py b/unixccompiler.py index 3f321c28dc..ab4d4de156 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -233,8 +233,6 @@ def runtime_library_dir_option(self, dir): if self._is_gcc(compiler): return ["-Wl,+s", "-L" + dir] return ["+s", "-L" + dir] - elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": - return ["-rpath", dir] else: if self._is_gcc(compiler): # gcc on non-GNU systems does not need -Wl, but can diff --git a/util.py b/util.py index fdcf6fabae..b8a69114c8 100644 --- a/util.py +++ b/util.py @@ -16,21 +16,17 @@ from distutils.errors import DistutilsByteCompileError def get_platform (): - """Return a string that identifies the current platform. This is used - mainly to distinguish platform-specific build directories and - platform-specific built distributions. Typically includes the OS name - and version and the architecture (as supplied by 'os.uname()'), - although the exact information included depends on the OS; eg. for IRIX - the architecture isn't particularly important (IRIX only runs on SGI - hardware), but for Linux the kernel version isn't particularly - important. + """Return a string that identifies the current platform. This is used mainly to + distinguish platform-specific build directories and platform-specific built + distributions. Typically includes the OS name and version and the + architecture (as supplied by 'os.uname()'), although the exact information + included depends on the OS; eg. on Linux, the kernel version isn't + particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u - irix-5.3 - irix64-6.2 Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) @@ -38,6 +34,7 @@ def get_platform (): win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. + """ if os.name == 'nt': # sniff sys.version for architecture. @@ -87,8 +84,6 @@ def get_platform (): bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} machine += ".%s" % bitness[sys.maxsize] # fall through to standard osname-release-machine representation - elif osname[:4] == "irix": # could be "irix64"! - return "%s-%s" % (osname, release) elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": From 91a97f1145f3d78667b162907af985b8d6fcc61a Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 6 Sep 2017 10:01:38 -0700 Subject: [PATCH 6725/8469] bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311) --- command/bdist_wininst.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index d3e1d3af22..6309c3e248 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -318,26 +318,30 @@ def get_exe_bytes(self): # string compares seem wrong, but are what sysconfig.py itself uses if self.target_version and self.target_version < cur_version: if self.target_version < "2.4": - bv = 6.0 + bv = '6.0' elif self.target_version == "2.4": - bv = 7.1 + bv = '7.1' elif self.target_version == "2.5": - bv = 8.0 + bv = '8.0' elif self.target_version <= "3.2": - bv = 9.0 + bv = '9.0' elif self.target_version <= "3.4": - bv = 10.0 + bv = '10.0' else: - bv = 14.0 + bv = '14.0' else: # for current version - use authoritative check. try: from msvcrt import CRT_ASSEMBLY_VERSION except ImportError: # cross-building, so assume the latest version - bv = 14.0 + bv = '14.0' else: - bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])) + bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]) + if bv == '14.11': + # v141 and v140 are binary compatible, + # so keep using the 14.0 stub. + bv = '14.0' # wininst-x.y.exe is in the same directory as this file @@ -353,7 +357,7 @@ def get_exe_bytes(self): else: sfix = '' - filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) + filename = os.path.join(directory, "wininst-%s%s.exe" % (bv, sfix)) f = open(filename, "rb") try: return f.read() From 3a5968943a1722688994990326d2009210179e9d Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Wed, 6 Sep 2017 15:45:25 -0700 Subject: [PATCH 6726/8469] Remove all mention of Windows IA-64 support (GH-3389) It was mostly removed long ago. --- command/build_ext.py | 2 +- msvc9compiler.py | 4 +--- msvccompiler.py | 2 +- tests/test_util.py | 7 ------- util.py | 12 +----------- 5 files changed, 4 insertions(+), 23 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 9155626a47..7444565562 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -208,7 +208,7 @@ def finalize_options(self): if self.plat_name == 'win32': suffix = 'win32' else: - # win-amd64 or win-ia64 + # win-amd64 suffix = self.plat_name[4:] new_lib = os.path.join(sys.exec_prefix, 'PCbuild') if suffix: diff --git a/msvc9compiler.py b/msvc9compiler.py index c401ddc86e..4c0036a0f1 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -55,7 +55,6 @@ PLAT_TO_VCVARS = { 'win32' : 'x86', 'win-amd64' : 'amd64', - 'win-ia64' : 'ia64', } class Reg: @@ -344,7 +343,7 @@ def initialize(self, plat_name=None): if plat_name is None: plat_name = get_platform() # sanity check for platforms to prevent obscure errors later. - ok_plats = 'win32', 'win-amd64', 'win-ia64' + ok_plats = 'win32', 'win-amd64' if plat_name not in ok_plats: raise DistutilsPlatformError("--plat-name must be one of %s" % (ok_plats,)) @@ -362,7 +361,6 @@ def initialize(self, plat_name=None): # to cross compile, you use 'x86_amd64'. # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) - # No idea how itanium handles this, if at all. if plat_name == get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] diff --git a/msvccompiler.py b/msvccompiler.py index 1048cd4159..d1de2fbfcb 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -172,7 +172,7 @@ def get_build_version(): def get_build_architecture(): """Return the processor architecture. - Possible results are "Intel", "Itanium", or "AMD64". + Possible results are "Intel" or "AMD64". """ prefix = " bit (" diff --git a/tests/test_util.py b/tests/test_util.py index 4e9d79b7c6..e2fc380958 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -78,13 +78,6 @@ def test_get_platform(self): sys.platform = 'win32' self.assertEqual(get_platform(), 'win-amd64') - # windows XP, itanium - os.name = 'nt' - sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) ' - '[MSC v.1310 32 bit (Itanium)]') - sys.platform = 'win32' - self.assertEqual(get_platform(), 'win-ia64') - # macbook os.name = 'posix' sys.version = ('2.5 (r25:51918, Sep 19 2006, 08:49:13) ' diff --git a/util.py b/util.py index b8a69114c8..9394c1e056 100644 --- a/util.py +++ b/util.py @@ -30,24 +30,14 @@ def get_platform (): Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) - win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name == 'nt': - # sniff sys.version for architecture. - prefix = " bit (" - i = sys.version.find(prefix) - if i == -1: - return sys.platform - j = sys.version.find(")", i) - look = sys.version[i+len(prefix):j].lower() - if look == 'amd64': + if 'amd64' in sys.version.lower(): return 'win-amd64' - if look == 'itanium': - return 'win-ia64' return sys.platform # Set for cross builds explicitly From d3c1d635ce32d35fb3b520d1ab009e401c7c1722 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 7 Sep 2017 11:49:23 -0700 Subject: [PATCH 6727/8469] bpo-30389 Adds detection of VS 2017 to distutils._msvccompiler (#1632) --- _msvccompiler.py | 95 +++++++++++++++++++++++++++----------- tests/test_msvccompiler.py | 28 ++++++++++- 2 files changed, 94 insertions(+), 29 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index b120273fe9..ef1356b97d 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -17,6 +17,7 @@ import shutil import stat import subprocess +import winreg from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -24,10 +25,9 @@ from distutils import log from distutils.util import get_platform -import winreg from itertools import count -def _find_vcvarsall(plat_spec): +def _find_vc2015(): try: key = winreg.OpenKeyEx( winreg.HKEY_LOCAL_MACHINE, @@ -38,9 +38,9 @@ def _find_vcvarsall(plat_spec): log.debug("Visual C++ is not registered") return None, None + best_version = 0 + best_dir = None with key: - best_version = 0 - best_dir = None for i in count(): try: v, vc_dir, vt = winreg.EnumValue(key, i) @@ -53,25 +53,74 @@ def _find_vcvarsall(plat_spec): continue if version >= 14 and version > best_version: best_version, best_dir = version, vc_dir - if not best_version: - log.debug("No suitable Visual C++ version found") - return None, None + return best_version, best_dir + +def _find_vc2017(): + import _findvs + import threading + + best_version = 0, # tuple for full version comparisons + best_dir = None + + # We need to call findall() on its own thread because it will + # initialize COM. + all_packages = [] + def _getall(): + all_packages.extend(_findvs.findall()) + t = threading.Thread(target=_getall) + t.start() + t.join() + + for name, version_str, path, packages in all_packages: + if 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' in packages: + vc_dir = os.path.join(path, 'VC', 'Auxiliary', 'Build') + if not os.path.isdir(vc_dir): + continue + try: + version = tuple(int(i) for i in version_str.split('.')) + except (ValueError, TypeError): + continue + if version > best_version: + best_version, best_dir = version, vc_dir + try: + best_version = best_version[0] + except IndexError: + best_version = None + return best_version, best_dir - vcvarsall = os.path.join(best_dir, "vcvarsall.bat") - if not os.path.isfile(vcvarsall): - log.debug("%s cannot be found", vcvarsall) - return None, None +def _find_vcvarsall(plat_spec): + best_version, best_dir = _find_vc2017() + vcruntime = None + vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' + if best_version: + vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", + "Microsoft.VC141.CRT", "vcruntime140.dll") + try: + import glob + vcruntime = glob.glob(vcredist, recursive=True)[-1] + except (ImportError, OSError, LookupError): + vcruntime = None + + if not best_version: + best_version, best_dir = _find_vc2015() + if best_version: + vcruntime = os.path.join(best_dir, 'redist', vcruntime_plat, + "Microsoft.VC140.CRT", "vcruntime140.dll") + + if not best_version: + log.debug("No suitable Visual C++ version found") + return None, None + vcvarsall = os.path.join(best_dir, "vcvarsall.bat") + if not os.path.isfile(vcvarsall): + log.debug("%s cannot be found", vcvarsall) + return None, None + + if not vcruntime or not os.path.isfile(vcruntime): + log.debug("%s cannot be found", vcruntime) vcruntime = None - vcruntime_spec = _VCVARS_PLAT_TO_VCRUNTIME_REDIST.get(plat_spec) - if vcruntime_spec: - vcruntime = os.path.join(best_dir, - vcruntime_spec.format(best_version)) - if not os.path.isfile(vcruntime): - log.debug("%s cannot be found", vcruntime) - vcruntime = None - return vcvarsall, vcruntime + return vcvarsall, vcruntime def _get_vc_env(plat_spec): if os.getenv("DISTUTILS_USE_SDK"): @@ -130,14 +179,6 @@ def _find_exe(exe, paths=None): 'win-amd64' : 'x86_amd64', } -# A map keyed by get_platform() return values to the file under -# the VC install directory containing the vcruntime redistributable. -_VCVARS_PLAT_TO_VCRUNTIME_REDIST = { - 'x86' : 'redist\\x86\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', - 'amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', - 'x86_amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', -} - # A set containing the DLLs that are guaranteed to be available for # all micro versions of this Python version. Known extension # dependencies that are not in this set will be copied to the output diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index 4dc24886c8..70a9c93a4e 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -76,12 +76,12 @@ def test_vcruntime_skip_copy(self): compiler = _msvccompiler.MSVCCompiler() compiler.initialize() dll = compiler._vcruntime_redist - self.assertTrue(os.path.isfile(dll)) + self.assertTrue(os.path.isfile(dll), dll or "") compiler._copy_vcruntime(tempdir) self.assertFalse(os.path.isfile(os.path.join( - tempdir, os.path.basename(dll)))) + tempdir, os.path.basename(dll))), dll or "") def test_get_vc_env_unicode(self): import distutils._msvccompiler as _msvccompiler @@ -101,6 +101,30 @@ def test_get_vc_env_unicode(self): if old_distutils_use_sdk: os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk + def test_get_vc2017(self): + import distutils._msvccompiler as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2017 + # and mark it skipped if we do not. + version, path = _msvccompiler._find_vc2017() + if version: + self.assertGreaterEqual(version, 15) + self.assertTrue(os.path.isdir(path)) + else: + raise unittest.SkipTest("VS 2017 is not installed") + + def test_get_vc2015(self): + import distutils._msvccompiler as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2015 + # and mark it skipped if we do not. + version, path = _msvccompiler._find_vc2015() + if version: + self.assertGreaterEqual(version, 14) + self.assertTrue(os.path.isdir(path)) + else: + raise unittest.SkipTest("VS 2015 is not installed") + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From b59076e9f12c295aca42927f2a544e46fd31f386 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 21 May 2017 15:12:22 -0500 Subject: [PATCH 6728/8469] pep517: add module Add a module that implements the PEP 517 specification. --- setuptools/dist.py | 13 +++++++- setuptools/pep517.py | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 setuptools/pep517.py diff --git a/setuptools/dist.py b/setuptools/dist.py index a2ca879516..42501f663b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -30,6 +30,14 @@ __import__('pkg_resources.extern.packaging.version') +skip_install_eggs = False + + +class SetupRequirementsError(BaseException): + def __init__(self, specifiers): + self.specifiers = specifiers + + def _get_unpatched(cls): warnings.warn("Do not call this function", DeprecationWarning) return get_unpatched(cls) @@ -332,7 +340,10 @@ def __init__(self, attrs=None): self.dependency_links = attrs.pop('dependency_links', []) assert_string_list(self, 'dependency_links', self.dependency_links) if attrs and 'setup_requires' in attrs: - self.fetch_build_eggs(attrs['setup_requires']) + if skip_install_eggs: + raise SetupRequirementsError(attrs['setup_requires']) + else: + self.fetch_build_eggs(attrs['setup_requires']) for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): vars(self).setdefault(ep.name, None) _Distribution.__init__(self, attrs) diff --git a/setuptools/pep517.py b/setuptools/pep517.py new file mode 100644 index 0000000000..3256030818 --- /dev/null +++ b/setuptools/pep517.py @@ -0,0 +1,70 @@ +import os +import sys +import subprocess +import tokenize +import shutil +import tempfile + +from setuptools import dist +from setuptools.dist import SetupRequirementsError + + +SETUPTOOLS_IMPLEMENTATION_REVISION = 0.1 + +def _run_setup(setup_script='setup.py'): # + # Note that we can reuse our build directory between calls + # Correctness comes first, then optimization later + __file__=setup_script + f=getattr(tokenize, 'open', open)(__file__) + code=f.read().replace('\\r\\n', '\\n') + f.close() + exec(compile(code, __file__, 'exec')) + + +def get_build_requires(config_settings): + requirements = ['setuptools', 'wheel'] + dist.skip_install_eggs = True + + sys.argv = sys.argv[:1] + ['egg_info'] + \ + config_settings["--global-option"] + try: + _run_setup() + except SetupRequirementsError as e: + requirements += e.specifiers + + dist.skip_install_eggs = False + + return requirements + + +def get_requires_for_build_wheel(config_settings=None): + return get_build_requires(config_settings) + + +def get_requires_for_build_sdist(config_settings=None): + return get_build_requires(config_settings) + + +def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): + sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', metadata_directory] + _run_setup() + +def build_wheel(wheel_directory, config_settings=None, + metadata_directory=None): + wheel_directory = os.path.abspath(wheel_directory) + sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ + config_settings["--global-option"] + _run_setup() + if wheel_directory != 'dist': + shutil.rmtree(wheel_directory) + shutil.copytree('dist', wheel_directory) + + +def build_sdist(sdist_directory, config_settings=None): + sdist_directory = os.path.abspath(sdist_directory) + sys.argv = sys.argv[:1] + ['sdist'] + \ + config_settings["--global-option"] + _run_setup() + if sdist_directory != 'dist': + shutil.rmtree(sdist_directory) + shutil.copytree('dist', sdist_directory) From 06ec6304f0fbd36f9a0d1fd1ebf717352c1f5138 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 20:51:44 -0500 Subject: [PATCH 6729/8469] tests: begin build frontend emulation --- setuptools/tests/test_pep_517.py | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 setuptools/tests/test_pep_517.py diff --git a/setuptools/tests/test_pep_517.py b/setuptools/tests/test_pep_517.py new file mode 100644 index 0000000000..fdc7c2312d --- /dev/null +++ b/setuptools/tests/test_pep_517.py @@ -0,0 +1,41 @@ +import pytest +import os + +# Only test the backend on Python 3 +# because we don't want to require +# a concurrent.futures backport for testing +pytest.importorskip('concurrent.futures') + +from importlib import import_module +from concurrent.futures import ProcessPoolExecutor + +class BuildBackend(object): + """PEP 517 Build Backend""" + def __init__(self, cwd=None, env={}, backend_name='setuptools.pep517'): + self.cwd = cwd + self.env = env + self.backend_name = backend_name + self.pool = ProcessPoolExecutor() + + def __getattr__(self, name): + """Handles aribrary function invokations on the build backend.""" + + def method(**kw): + return self.pool.submit( + BuildBackendCaller(self.cwd, self.env, self.backend_name), + (name, kw)).result() + + return method + + +class BuildBackendCaller(object): + def __init__(self, cwd, env, backend_name): + self.cwd = cwd + self.env = env + self.backend_name = backend_name + + def __getattr__(self, name): + """Handles aribrary function invokations on the build backend.""" + os.chdir(self.cwd) + os.environ.update(self.env) + return getattr(import_module(self.backend_name), name) From bfe0ee278051b5bfb17b4d716750b1f59aec4499 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 21:01:21 -0500 Subject: [PATCH 6730/8469] pep517: implement build backend fixture --- .../tests/{test_pep_517.py => test_pep517.py} | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) rename setuptools/tests/{test_pep_517.py => test_pep517.py} (69%) diff --git a/setuptools/tests/test_pep_517.py b/setuptools/tests/test_pep517.py similarity index 69% rename from setuptools/tests/test_pep_517.py rename to setuptools/tests/test_pep517.py index fdc7c2312d..7bb460dd13 100644 --- a/setuptools/tests/test_pep_517.py +++ b/setuptools/tests/test_pep517.py @@ -8,6 +8,10 @@ from importlib import import_module from concurrent.futures import ProcessPoolExecutor +from .files import build_files +from .textwrap import DALS +from . import contexts + class BuildBackend(object): """PEP 517 Build Backend""" @@ -39,3 +43,27 @@ def __getattr__(self, name): os.chdir(self.cwd) os.environ.update(self.env) return getattr(import_module(self.backend_name), name) + + +@pytest.fixture +def build_backend(): + setup_script = DALS(""" + from setuptools import setup + + setup( + name='foo', + py_modules=['hello'], + entry_points={'console_scripts': ['hi = hello.run']}, + zip_safe=False, + ) + """) + + build_files({ + 'setup.py': setup_script, + 'hello.py': DALS(""" + def run(): + print('hello') + """) + }) + + return BuildBackend(cwd='.') From 33546858db9b960be11c384f608528b127ca7923 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 21:49:53 -0500 Subject: [PATCH 6731/8469] tests: add get_requires_for_build_wheel --- setuptools/pep517.py | 10 +++++ setuptools/tests/test_pep517.py | 68 +++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 3256030818..b3535790c1 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -21,7 +21,13 @@ def _run_setup(setup_script='setup.py'): # exec(compile(code, __file__, 'exec')) +def fix_config(config_settings): + config_settings = config_settings or {} + config_settings.setdefault('--global-option', []) + return config_settings + def get_build_requires(config_settings): + config_settings = fix_config(config_settings) requirements = ['setuptools', 'wheel'] dist.skip_install_eggs = True @@ -38,10 +44,12 @@ def get_build_requires(config_settings): def get_requires_for_build_wheel(config_settings=None): + config_settings = fix_config(config_settings) return get_build_requires(config_settings) def get_requires_for_build_sdist(config_settings=None): + config_settings = fix_config(config_settings) return get_build_requires(config_settings) @@ -51,6 +59,7 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): + config_settings = fix_config(config_settings) wheel_directory = os.path.abspath(wheel_directory) sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ config_settings["--global-option"] @@ -61,6 +70,7 @@ def build_wheel(wheel_directory, config_settings=None, def build_sdist(sdist_directory, config_settings=None): + config_settings = fix_config(config_settings) sdist_directory = os.path.abspath(sdist_directory) sys.argv = sys.argv[:1] + ['sdist'] + \ config_settings["--global-option"] diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 7bb460dd13..fd0a196545 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -6,7 +6,9 @@ # a concurrent.futures backport for testing pytest.importorskip('concurrent.futures') +from contextlib import contextmanager from importlib import import_module +from tempfile import mkdtemp from concurrent.futures import ProcessPoolExecutor from .files import build_files from .textwrap import DALS @@ -24,10 +26,10 @@ def __init__(self, cwd=None, env={}, backend_name='setuptools.pep517'): def __getattr__(self, name): """Handles aribrary function invokations on the build backend.""" - def method(**kw): + def method(*args, **kw): return self.pool.submit( BuildBackendCaller(self.cwd, self.env, self.backend_name), - (name, kw)).result() + (name, args, kw)).result() return method @@ -38,32 +40,50 @@ def __init__(self, cwd, env, backend_name): self.env = env self.backend_name = backend_name - def __getattr__(self, name): + def __call__(self, info): """Handles aribrary function invokations on the build backend.""" os.chdir(self.cwd) os.environ.update(self.env) - return getattr(import_module(self.backend_name), name) + name, args, kw = info + return getattr(import_module(self.backend_name), name)(*args, **kw) + + +@contextmanager +def enter_directory(dir, val=None): + original_dir = os.getcwd() + os.chdir(dir) + yield val + os.chdir(original_dir) @pytest.fixture def build_backend(): - setup_script = DALS(""" - from setuptools import setup - - setup( - name='foo', - py_modules=['hello'], - entry_points={'console_scripts': ['hi = hello.run']}, - zip_safe=False, - ) - """) - - build_files({ - 'setup.py': setup_script, - 'hello.py': DALS(""" - def run(): - print('hello') - """) - }) - - return BuildBackend(cwd='.') + tmpdir = mkdtemp() + with enter_directory(tmpdir): + setup_script = DALS(""" + from setuptools import setup + + setup( + name='foo', + py_modules=['hello'], + setup_requires=['test-package'], + entry_points={'console_scripts': ['hi = hello.run']}, + zip_safe=False, + ) + """) + + build_files({ + 'setup.py': setup_script, + 'hello.py': DALS(""" + def run(): + print('hello') + """) + }) + + return enter_directory(tmpdir, BuildBackend(cwd='.')) + + +def test_get_requires_for_build_wheel(build_backend): + with build_backend as b: + assert list(sorted(b.get_requires_for_build_wheel())) == \ + list(sorted(['test-package', 'setuptools', 'wheel'])) From 12d4fba61cb8a8533566dafdae8874b617aaedbd Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 22:16:34 -0500 Subject: [PATCH 6732/8469] tests: add build_wheel and build_sdist --- setuptools/pep517.py | 11 +++++++++++ setuptools/tests/test_pep517.py | 24 +++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index b3535790c1..4ba23552f7 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -68,6 +68,11 @@ def build_wheel(wheel_directory, config_settings=None, shutil.rmtree(wheel_directory) shutil.copytree('dist', wheel_directory) + wheels = [f for f in os.listdir(wheel_directory) + if f.endswith('.whl')] + + assert len(wheels) == 1 + return wheels[0] def build_sdist(sdist_directory, config_settings=None): config_settings = fix_config(config_settings) @@ -78,3 +83,9 @@ def build_sdist(sdist_directory, config_settings=None): if sdist_directory != 'dist': shutil.rmtree(sdist_directory) shutil.copytree('dist', sdist_directory) + + sdists = [f for f in os.listdir(sdist_directory) + if f.endswith('.tar.gz')] + + assert len(sdists) == 1 + return sdists[0] \ No newline at end of file diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index fd0a196545..0dd38b1b19 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -28,7 +28,8 @@ def __getattr__(self, name): def method(*args, **kw): return self.pool.submit( - BuildBackendCaller(self.cwd, self.env, self.backend_name), + BuildBackendCaller(os.path.abspath(self.cwd), self.env, + self.backend_name), (name, args, kw)).result() return method @@ -66,7 +67,7 @@ def build_backend(): setup( name='foo', py_modules=['hello'], - setup_requires=['test-package'], + setup_requires=['six'], entry_points={'console_scripts': ['hi = hello.run']}, zip_safe=False, ) @@ -86,4 +87,21 @@ def run(): def test_get_requires_for_build_wheel(build_backend): with build_backend as b: assert list(sorted(b.get_requires_for_build_wheel())) == \ - list(sorted(['test-package', 'setuptools', 'wheel'])) + list(sorted(['six', 'setuptools', 'wheel'])) + +def test_build_wheel(build_backend): + with build_backend as b: + dist_dir = os.path.abspath('pip-wheel') + os.makedirs(dist_dir) + wheel_name = b.build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, wheel_name)) + + +def test_build_sdist(build_backend): + with build_backend as b: + dist_dir = os.path.abspath('pip-sdist') + os.makedirs(dist_dir) + sdist_name = b.build_sdist(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) \ No newline at end of file From 3a67d08b474385ffb8ac6ba65bddeb3ed760bd1d Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 22:25:52 -0500 Subject: [PATCH 6733/8469] dist: rename skip install eggs to be private. --- setuptools/dist.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 42501f663b..1641469ea8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -30,7 +30,7 @@ __import__('pkg_resources.extern.packaging.version') -skip_install_eggs = False +_skip_install_eggs = False class SetupRequirementsError(BaseException): @@ -340,10 +340,9 @@ def __init__(self, attrs=None): self.dependency_links = attrs.pop('dependency_links', []) assert_string_list(self, 'dependency_links', self.dependency_links) if attrs and 'setup_requires' in attrs: - if skip_install_eggs: + if _skip_install_eggs: raise SetupRequirementsError(attrs['setup_requires']) - else: - self.fetch_build_eggs(attrs['setup_requires']) + self.fetch_build_eggs(attrs['setup_requires']) for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): vars(self).setdefault(ep.name, None) _Distribution.__init__(self, attrs) From 4148e41fe666c5024efc6577dde6104a0ffa630e Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Sep 2017 22:26:33 -0500 Subject: [PATCH 6734/8469] pep517: rename skip_install_eggs --- setuptools/pep517.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 4ba23552f7..68ca88f11c 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -29,7 +29,7 @@ def fix_config(config_settings): def get_build_requires(config_settings): config_settings = fix_config(config_settings) requirements = ['setuptools', 'wheel'] - dist.skip_install_eggs = True + dist._skip_install_eggs = True sys.argv = sys.argv[:1] + ['egg_info'] + \ config_settings["--global-option"] @@ -38,7 +38,7 @@ def get_build_requires(config_settings): except SetupRequirementsError as e: requirements += e.specifiers - dist.skip_install_eggs = False + dist._skip_install_eggs = False return requirements @@ -88,4 +88,4 @@ def build_sdist(sdist_directory, config_settings=None): if f.endswith('.tar.gz')] assert len(sdists) == 1 - return sdists[0] \ No newline at end of file + return sdists[0] From b054af5817aed2be88ed6ba856a86423e18edc09 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 6 Sep 2017 15:21:36 -0500 Subject: [PATCH 6735/8469] dist_info: implement command --- setuptools/command/dist_info.py | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 setuptools/command/dist_info.py diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py new file mode 100644 index 0000000000..c8dc659b11 --- /dev/null +++ b/setuptools/command/dist_info.py @@ -0,0 +1,37 @@ +""" +Create a dist_info directory +As defined in the wheel specification +""" + +import os +import shutil + +from distutils.core import Command + + +class dist_info(Command): + + description = 'create a .dist-info directory' + + user_options = [ + ('egg-base=', 'e', "directory containing .egg-info directories" + " (default: top of the source tree)"), + ] + + def initialize_options(self): + self.egg_base = None + + def finalize_options(self): + pass + + def run(self): + egg_info = self.get_finalized_command('egg_info') + egg_info.run() + dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info' + + bdist_wheel = self.get_finalized_command('bdist_wheel') + bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir) + + if self.egg_base: + shutil.move(dist_info_dir, os.path.join( + self.egg_base, dist_info_dir)) From ddd5d0a9bc0f5b37915ee03fbdc87f1b04529458 Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 7 Sep 2017 21:51:47 -0500 Subject: [PATCH 6736/8469] tests: cleanup the backend --- setuptools/tests/test_pep517.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 0dd38b1b19..f2438b6aee 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -15,17 +15,21 @@ from . import contexts -class BuildBackend(object): - """PEP 517 Build Backend""" +class BuildBackendBase(object): def __init__(self, cwd=None, env={}, backend_name='setuptools.pep517'): self.cwd = cwd self.env = env self.backend_name = backend_name + + +class BuildBackend(object): + """PEP 517 Build Backend""" + def __init__(self, *args, **kwargs): + super(BuildBackend, self).__init__(*args, **kwargs) self.pool = ProcessPoolExecutor() def __getattr__(self, name): - """Handles aribrary function invokations on the build backend.""" - + """Handles aribrary function invocations on the build backend.""" def method(*args, **kw): return self.pool.submit( BuildBackendCaller(os.path.abspath(self.cwd), self.env, @@ -35,12 +39,7 @@ def method(*args, **kw): return method -class BuildBackendCaller(object): - def __init__(self, cwd, env, backend_name): - self.cwd = cwd - self.env = env - self.backend_name = backend_name - +class BuildBackendCaller(BuildBackendBase): def __call__(self, info): """Handles aribrary function invokations on the build backend.""" os.chdir(self.cwd) From 97ddc77ed2787e67e76d090d338e1d2a67336f16 Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 7 Sep 2017 21:58:50 -0500 Subject: [PATCH 6737/8469] tests: implement prepare_metadata --- setuptools/tests/test_pep517.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index f2438b6aee..b9a75dbd38 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -103,4 +103,13 @@ def test_build_sdist(build_backend): os.makedirs(dist_dir) sdist_name = b.build_sdist(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) \ No newline at end of file + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + +def test_prepare_metadata_for_build_wheel(build_backend): + with build_backend as b: + dist_dir = os.path.abspath('pip-dist-info') + os.makedirs(dist_dir) + + b.prepare_metadata_for_build_wheel() + + assert os.path.isfile(os.path.join(dist_dir, 'METADATA')) From 17d56d62d38b392d4abf5739eede7f9271e23310 Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 7 Sep 2017 22:02:38 -0500 Subject: [PATCH 6738/8469] tests: pep517: fix --- setuptools/tests/test_pep517.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index b9a75dbd38..263ca87045 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -22,7 +22,7 @@ def __init__(self, cwd=None, env={}, backend_name='setuptools.pep517'): self.backend_name = backend_name -class BuildBackend(object): +class BuildBackend(BuildBackendBase): """PEP 517 Build Backend""" def __init__(self, *args, **kwargs): super(BuildBackend, self).__init__(*args, **kwargs) From 19db98f416d93dadafea588a9913af6eebc89336 Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 7 Sep 2017 22:10:26 -0500 Subject: [PATCH 6739/8469] pep517: prepare_metadata: return basename --- setuptools/pep517.py | 13 +++++++++++-- setuptools/tests/test_pep517.py | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 68ca88f11c..25474b555b 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -26,6 +26,7 @@ def fix_config(config_settings): config_settings.setdefault('--global-option', []) return config_settings + def get_build_requires(config_settings): config_settings = fix_config(config_settings) requirements = ['setuptools', 'wheel'] @@ -57,6 +58,13 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', metadata_directory] _run_setup() + dist_infos = [f for f in os.listdir(metadata_directory) + if f.endswith('.dist-info')] + + assert len(dist_infos) == 1 + return dist_infos[0] + + def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): config_settings = fix_config(config_settings) @@ -69,11 +77,12 @@ def build_wheel(wheel_directory, config_settings=None, shutil.copytree('dist', wheel_directory) wheels = [f for f in os.listdir(wheel_directory) - if f.endswith('.whl')] + if f.endswith('.whl')] assert len(wheels) == 1 return wheels[0] + def build_sdist(sdist_directory, config_settings=None): config_settings = fix_config(config_settings) sdist_directory = os.path.abspath(sdist_directory) @@ -85,7 +94,7 @@ def build_sdist(sdist_directory, config_settings=None): shutil.copytree('dist', sdist_directory) sdists = [f for f in os.listdir(sdist_directory) - if f.endswith('.tar.gz')] + if f.endswith('.tar.gz')] assert len(sdists) == 1 return sdists[0] diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 263ca87045..0fbdacc4e7 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -110,6 +110,7 @@ def test_prepare_metadata_for_build_wheel(build_backend): dist_dir = os.path.abspath('pip-dist-info') os.makedirs(dist_dir) - b.prepare_metadata_for_build_wheel() + dist_info = b.prepare_metadata_for_build_wheel(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, 'METADATA')) + assert os.path.isfile(os.path.join(dist_dir, dist_info, + 'METADATA')) From 944976d869b96d6a960daf45bf8545987c6dea91 Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 7 Sep 2017 22:15:03 -0500 Subject: [PATCH 6740/8469] dist_info: register command --- setuptools/command/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index c96d33c23d..4fe3bb5684 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', + 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', 'dist_info', ] from distutils.command.bdist import bdist From 80a820fe98ad6a687828c3e129412f33417498c5 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 8 Sep 2017 10:40:52 -0500 Subject: [PATCH 6741/8469] tests: pep517: minor cleanup --- setuptools/tests/test_pep517.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 0fbdacc4e7..da22877024 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -34,17 +34,16 @@ def method(*args, **kw): return self.pool.submit( BuildBackendCaller(os.path.abspath(self.cwd), self.env, self.backend_name), - (name, args, kw)).result() + name, *args, **kw).result() return method class BuildBackendCaller(BuildBackendBase): - def __call__(self, info): + def __call__(self, name, *args, **kw): """Handles aribrary function invokations on the build backend.""" os.chdir(self.cwd) os.environ.update(self.env) - name, args, kw = info return getattr(import_module(self.backend_name), name)(*args, **kw) From 2d96236409de143b6c37c98ceeac3db969c4e247 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 09:17:38 -0400 Subject: [PATCH 6742/8469] Extract variable for ignorable errors to improve indentation. --- pkg_resources/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ce6053f170..6eca01dc70 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2036,9 +2036,12 @@ def find_on_path(importer, path_item, only=False): except OSError as e: # Ignore the directory if does not exist, not a directory or we # don't have permissions - if (e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) + ignorable = ( + e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) # Python 2 on Windows needs to be handled this way :( - or hasattr(e, "winerror") and e.winerror == 267): + or getattr(e, "winerror", None) == 267 + ) + if ignorable: return raise # scan for .egg and .egg-info in directory From 0a61412521347cf683dcb1026c3d44aeac31f94a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 09:28:44 -0400 Subject: [PATCH 6743/8469] Remove unnecessary paretheses. --- pkg_resources/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6eca01dc70..9c0f3d95dc 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2253,9 +2253,7 @@ def _is_egg_path(path): """ Determine if given path appears to be an egg. """ - return ( - path.lower().endswith('.egg') - ) + return path.lower().endswith('.egg') def _is_unpacked_egg(path): From f24868e7921d960ea4d63958e7090522ada8f2d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:18:18 -0400 Subject: [PATCH 6744/8469] Extract functions for resolving egg_link and reading non-empty lines from a file. --- pkg_resources/__init__.py | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 9c0f3d95dc..cbf0a6a5fc 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2048,8 +2048,8 @@ def find_on_path(importer, path_item, only=False): path_item_entries = _by_version_descending(entries) for entry in path_item_entries: lower = entry.lower() + fullpath = os.path.join(path_item, entry) if lower.endswith('.egg-info') or lower.endswith('.dist-info'): - fullpath = os.path.join(path_item, entry) if os.path.isdir(fullpath): # egg-info directory, allow getting metadata if len(os.listdir(fullpath)) == 0: @@ -2062,20 +2062,34 @@ def find_on_path(importer, path_item, only=False): path_item, entry, metadata, precedence=DEVELOP_DIST ) elif not only and _is_egg_path(entry): - dists = find_distributions(os.path.join(path_item, entry)) + dists = find_distributions(fullpath) for dist in dists: yield dist elif not only and lower.endswith('.egg-link'): - with open(os.path.join(path_item, entry)) as entry_file: - entry_lines = entry_file.readlines() - for line in entry_lines: - if not line.strip(): - continue - path = os.path.join(path_item, line.rstrip()) - dists = find_distributions(path) - for item in dists: - yield item - break + dists = resolve_egg_link(fullpath) + for dist in dists: + yield dist + + +def non_empty_lines(path): + """ + Yield non-empty lines from file at path + """ + return (line.rstrip() for line in open(path) if line.strip()) + + +def resolve_egg_link(path): + """ + Given a path to an .egg-link, resolve distributions + present in the referenced path. + """ + referenced_paths = non_empty_lines(path) + resolved_paths = ( + os.path.join(os.path.dirname(path), ref) + for ref in referenced_paths + ) + dist_groups = map(find_distributions, resolved_paths) + return next(dist_groups, ()) register_finder(pkgutil.ImpImporter, find_on_path) From 7e173ffb2da7cbdbf0c90b491779402aa74a6b42 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:31:50 -0400 Subject: [PATCH 6745/8469] Extract distributions_from_metadata --- pkg_resources/__init__.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index cbf0a6a5fc..7b5043dc10 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2050,17 +2050,9 @@ def find_on_path(importer, path_item, only=False): lower = entry.lower() fullpath = os.path.join(path_item, entry) if lower.endswith('.egg-info') or lower.endswith('.dist-info'): - if os.path.isdir(fullpath): - # egg-info directory, allow getting metadata - if len(os.listdir(fullpath)) == 0: - # Empty egg directory, skip. - continue - metadata = PathMetadata(path_item, fullpath) - else: - metadata = FileMetadata(fullpath) - yield Distribution.from_location( - path_item, entry, metadata, precedence=DEVELOP_DIST - ) + dists = distributions_from_metadata(fullpath) + for dist in dists: + yield dist elif not only and _is_egg_path(entry): dists = find_distributions(fullpath) for dist in dists: @@ -2071,6 +2063,21 @@ def find_on_path(importer, path_item, only=False): yield dist +def distributions_from_metadata(path): + root = os.path.dirname(path) + if os.path.isdir(path): + if len(os.listdir(path)) == 0: + # empty metadata dir; skip + return + metadata = PathMetadata(root, path) + else: + metadata = FileMetadata(path) + entry = os.path.basename(path) + yield Distribution.from_location( + root, entry, metadata, precedence=DEVELOP_DIST, + ) + + def non_empty_lines(path): """ Yield non-empty lines from file at path From a95cd91de2c314640fdd5466a67c44f1642f9803 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:41:47 -0400 Subject: [PATCH 6746/8469] Assign dists just once --- pkg_resources/__init__.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7b5043dc10..87568c2e3f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2049,18 +2049,18 @@ def find_on_path(importer, path_item, only=False): for entry in path_item_entries: lower = entry.lower() fullpath = os.path.join(path_item, entry) - if lower.endswith('.egg-info') or lower.endswith('.dist-info'): - dists = distributions_from_metadata(fullpath) - for dist in dists: - yield dist - elif not only and _is_egg_path(entry): - dists = find_distributions(fullpath) - for dist in dists: - yield dist - elif not only and lower.endswith('.egg-link'): - dists = resolve_egg_link(fullpath) - for dist in dists: - yield dist + dists = ( + distributions_from_metadata(fullpath) + if lower.endswith('.egg-info') + or lower.endswith('.dist-info') else + find_distributions(fullpath) + if not only and _is_egg_path(entry) else + resolve_egg_link(fullpath) + if not only and lower.endswith('.egg-link') else + () + ) + for dist in dists: + yield dist def distributions_from_metadata(path): From 5df09426c3cfae75257849dcc505f4258217bf62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:43:27 -0400 Subject: [PATCH 6747/8469] Extract variable for is_meta --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 87568c2e3f..d9664adc01 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2049,10 +2049,10 @@ def find_on_path(importer, path_item, only=False): for entry in path_item_entries: lower = entry.lower() fullpath = os.path.join(path_item, entry) + is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) dists = ( distributions_from_metadata(fullpath) - if lower.endswith('.egg-info') - or lower.endswith('.dist-info') else + if is_meta else find_distributions(fullpath) if not only and _is_egg_path(entry) else resolve_egg_link(fullpath) From e9e4cf8c1b55c55f16337f31bbbadd44da615557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:45:29 -0400 Subject: [PATCH 6748/8469] Short circuit and dedent large block --- pkg_resources/__init__.py | 65 ++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d9664adc01..3f7e5b6608 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2028,39 +2028,40 @@ def find_on_path(importer, path_item, only=False): path_item, os.path.join(path_item, 'EGG-INFO') ) ) - else: - try: - entries = os.listdir(path_item) - except (PermissionError, NotADirectoryError): + return + + try: + entries = os.listdir(path_item) + except (PermissionError, NotADirectoryError): + return + except OSError as e: + # Ignore the directory if does not exist, not a directory or we + # don't have permissions + ignorable = ( + e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) + # Python 2 on Windows needs to be handled this way :( + or getattr(e, "winerror", None) == 267 + ) + if ignorable: return - except OSError as e: - # Ignore the directory if does not exist, not a directory or we - # don't have permissions - ignorable = ( - e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) - # Python 2 on Windows needs to be handled this way :( - or getattr(e, "winerror", None) == 267 - ) - if ignorable: - return - raise - # scan for .egg and .egg-info in directory - path_item_entries = _by_version_descending(entries) - for entry in path_item_entries: - lower = entry.lower() - fullpath = os.path.join(path_item, entry) - is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) - dists = ( - distributions_from_metadata(fullpath) - if is_meta else - find_distributions(fullpath) - if not only and _is_egg_path(entry) else - resolve_egg_link(fullpath) - if not only and lower.endswith('.egg-link') else - () - ) - for dist in dists: - yield dist + raise + # scan for .egg and .egg-info in directory + path_item_entries = _by_version_descending(entries) + for entry in path_item_entries: + lower = entry.lower() + fullpath = os.path.join(path_item, entry) + is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) + dists = ( + distributions_from_metadata(fullpath) + if is_meta else + find_distributions(fullpath) + if not only and _is_egg_path(entry) else + resolve_egg_link(fullpath) + if not only and lower.endswith('.egg-link') else + () + ) + for dist in dists: + yield dist def distributions_from_metadata(path): From eea94d01a59f7f43dd41c271ff6849995a4d1e7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 11:58:33 -0400 Subject: [PATCH 6749/8469] Extract function for listdir --- pkg_resources/__init__.py | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3f7e5b6608..d9154e6d36 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2030,21 +2030,8 @@ def find_on_path(importer, path_item, only=False): ) return - try: - entries = os.listdir(path_item) - except (PermissionError, NotADirectoryError): - return - except OSError as e: - # Ignore the directory if does not exist, not a directory or we - # don't have permissions - ignorable = ( - e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) - # Python 2 on Windows needs to be handled this way :( - or getattr(e, "winerror", None) == 267 - ) - if ignorable: - return - raise + entries = safe_listdir(path_item) + # scan for .egg and .egg-info in directory path_item_entries = _by_version_descending(entries) for entry in path_item_entries: @@ -2064,6 +2051,27 @@ def find_on_path(importer, path_item, only=False): yield dist +def safe_listdir(path): + """ + Attempt to list contents of path, but suppress some exceptions. + """ + try: + return os.listdir(path) + except (PermissionError, NotADirectoryError): + pass + except OSError as e: + # Ignore the directory if does not exist, not a directory or + # permission denied + ignorable = ( + e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) + # Python 2 on Windows needs to be handled this way :( + or getattr(e, "winerror", None) == 267 + ) + if not ignorable: + raise + return () + + def distributions_from_metadata(path): root = os.path.dirname(path) if os.path.isdir(path): From 9ff9a0d6a79b8d4b610f8e8780586dd2114856d0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 12:04:12 -0400 Subject: [PATCH 6750/8469] Create a NoDists factory for returning no dists, whose boolean value is False. --- pkg_resources/__init__.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d9154e6d36..82b4ce51bc 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2045,12 +2045,29 @@ def find_on_path(importer, path_item, only=False): if not only and _is_egg_path(entry) else resolve_egg_link(fullpath) if not only and lower.endswith('.egg-link') else - () + NoDists()(fullpath) ) for dist in dists: yield dist +class NoDists: + """ + >>> bool(NoDists()) + False + + >>> list(NoDists()('anything')) + [] + """ + def __bool__(self): + return False + if six.PY2: + __nonzero__ = __bool__ + + def __call__(self, fullpath): + return iter(()) + + def safe_listdir(path): """ Attempt to list contents of path, but suppress some exceptions. From 6f10cff41ca441a91ddb9182c591a4a2e170633a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 12:14:46 -0400 Subject: [PATCH 6751/8469] Extract function for resolving the dist factory for a path item entry --- pkg_resources/__init__.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 82b4ce51bc..0f5dd23875 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2035,22 +2035,26 @@ def find_on_path(importer, path_item, only=False): # scan for .egg and .egg-info in directory path_item_entries = _by_version_descending(entries) for entry in path_item_entries: - lower = entry.lower() fullpath = os.path.join(path_item, entry) - is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) - dists = ( - distributions_from_metadata(fullpath) - if is_meta else - find_distributions(fullpath) - if not only and _is_egg_path(entry) else - resolve_egg_link(fullpath) - if not only and lower.endswith('.egg-link') else - NoDists()(fullpath) - ) - for dist in dists: + factory = dist_factory(path_item, entry, only) + for dist in factory(fullpath): yield dist +def dist_factory(path_item, entry, only): + lower = entry.lower() + is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) + return ( + distributions_from_metadata + if is_meta else + find_distributions + if not only and _is_egg_path(entry) else + resolve_egg_link + if not only and lower.endswith('.egg-link') else + NoDists() + ) + + class NoDists: """ >>> bool(NoDists()) From d3fc6036c7fe25ee7ffee3fc9f0b75f2b9d5a58a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 9 Sep 2017 12:26:51 -0400 Subject: [PATCH 6752/8469] Screen entries before sorting in find_on_path. Ref #1134. --- CHANGES.rst | 7 +++++++ pkg_resources/__init__.py | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8130511e37..011e19fff9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v36.5.0 +------- + +* Inspired by #1134, performed substantial refactoring of + ``pkg_resources.find_on_path`` to facilitate an optimization + for paths with many non-version entries. + v36.4.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0f5dd23875..68349df44e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2032,8 +2032,17 @@ def find_on_path(importer, path_item, only=False): entries = safe_listdir(path_item) + # for performance, before sorting by version, + # screen entries for only those that will yield + # distributions + filtered = ( + entry + for entry in entries + if dist_factory(path_item, entry, only) + ) + # scan for .egg and .egg-info in directory - path_item_entries = _by_version_descending(entries) + path_item_entries = _by_version_descending(filtered) for entry in path_item_entries: fullpath = os.path.join(path_item, entry) factory = dist_factory(path_item, entry, only) @@ -2042,6 +2051,9 @@ def find_on_path(importer, path_item, only=False): def dist_factory(path_item, entry, only): + """ + Return a dist_factory for a path_item and entry + """ lower = entry.lower() is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) return ( From 63bc0b0210a73a8a534b03210aacfadd0523e405 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 28 Aug 2017 21:31:53 +0300 Subject: [PATCH 6753/8469] Add badges to the top of README * PYPI * Travis CI * AppVeyor CI * List of currently supported Python versions --- README.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.rst b/README.rst index 2f55bce106..1c6ee60354 100755 --- a/README.rst +++ b/README.rst @@ -1,6 +1,17 @@ +.. 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: http://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 `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From 5d163b5bf846b86dfebf335548deb1398262c8b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 Sep 2017 15:41:30 -0400 Subject: [PATCH 6754/8469] Use platform-friendly syntax for Mercurial checkouts. Fixes #170. --- CHANGES.rst | 6 ++++++ setuptools/package_index.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 011e19fff9..f9de501228 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.5.1 +------- + +* #170: When working with Mercurial checkouts, use Windows-friendly + syntax for suppressing output. + v36.5.0 ------- diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 2acc817a66..a6363b1856 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -893,7 +893,7 @@ def _download_hg(self, url, filename): if rev is not None: self.info("Updating to %s", rev) - os.system("(cd %s && hg up -C -r %s >&-)" % ( + os.system("(cd %s && hg up -C -r %s -q)" % ( filename, rev, )) From 6cffeac651ba21ea52e8e85c1e652882f236660f Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 13 Sep 2017 21:56:45 +0200 Subject: [PATCH 6755/8469] fix `test_pip_upgrade_from_source` test on Python 2.6 --- setuptools/tests/test_virtualenv.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 17b8793cf6..9dbd3c86ed 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,5 +1,6 @@ import glob import os +import sys from pytest import yield_fixture from pytest_fixture_config import yield_requires_config @@ -39,6 +40,9 @@ def test_pip_upgrade_from_source(virtualenv): Check pip can upgrade setuptools from source. """ dist_dir = virtualenv.workspace + if sys.version_info < (2, 7): + # Python 2.6 support was dropped in wheel 0.30.0. + virtualenv.run('pip install -U "wheel<0.30.0"') # Generate source distribution / wheel. virtualenv.run(' && '.join(( 'cd {source}', From 871d4e30e525c102929bcdf7ff53054e99a5cd63 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 13 Sep 2017 22:49:13 +0200 Subject: [PATCH 6756/8469] travis: make deploy stage conditional --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a5e08a2efc..60f5815fd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ jobs: - python: *latest_py2 env: LANG=C - stage: deploy (to PyPI for tagged commits) + if: tag IS present python: *latest_py3 install: skip script: skip From 4a2ebc7e7f71f38925977a18fad2a8883dc86c65 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Thu, 14 Sep 2017 16:29:55 +0000 Subject: [PATCH 6757/8469] Docs proofreading --- docs/setuptools.txt | 92 ++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 531d727c10..f255cfd217 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2281,21 +2281,23 @@ Configuring setup() using setup.cfg files .. note:: New in 30.3.0 (8 Dec 2016). -.. important:: ``setup.py`` with ``setup()`` function call is still required even - if your configuration resides in ``setup.cfg``. +.. important:: + A ``setup.py`` file containing a ``setup()`` function call is still + required even if your configuration resides in ``setup.cfg``. -``Setuptools`` allows using configuration files (usually `setup.cfg`) -to define package’s metadata and other options which are normally supplied -to ``setup()`` function. +``Setuptools`` allows using configuration files (usually :file:`setup.cfg`) +to define a package’s metadata and other options that are normally supplied +to the ``setup()`` function. -This approach not only allows automation scenarios, but also reduces +This approach not only allows automation scenarios but also reduces boilerplate code in some cases. .. note:: - Implementation presents limited compatibility with distutils2-like - ``setup.cfg`` sections (used by ``pbr`` and ``d2to1`` packages). - Namely: only metadata related keys from ``metadata`` section are supported + This implementation has limited compatibility with the distutils2-like + ``setup.cfg`` sections used by the ``pbr`` and ``d2to1`` packages. + + Namely: only metadata-related keys from ``metadata`` section are supported (except for ``description-file``); keys from ``files``, ``entry_points`` and ``backwards_compat`` are not supported. @@ -2336,12 +2338,13 @@ boilerplate code in some cases. src.subpackage2 -Metadata and options could be set in sections with the same names. +Metadata and options are set in the config sections of the same name. -* Keys are the same as keyword arguments one provides to ``setup()`` function. +* Keys are the same as the keyword arguments one provides to the ``setup()`` + function. -* Complex values could be placed comma-separated or one per line - in *dangling* sections. The following are the same: +* Complex values can be written comma-separated or placed one per line + in *dangling* config values. The following are equivalent: .. code-block:: ini @@ -2353,10 +2356,11 @@ Metadata and options could be set in sections with the same names. one two -* In some cases complex values could be provided in subsections for clarity. +* In some cases, complex values can be provided in dedicated subsections for + clarity. -* Some keys allow ``file:``, ``attr:`` and ``find:`` directives to cover - common usecases. +* Some keys allow ``file:``, ``attr:``, and ``find:`` directives in order to + cover common usecases. * Unknown keys are ignored. @@ -2369,33 +2373,34 @@ Some values are treated as simple strings, some allow more logic. Type names used below: * ``str`` - simple string -* ``list-comma`` - dangling list or comma-separated values string -* ``list-semi`` - dangling list or semicolon-separated values string -* ``bool`` - ``True`` is 1, yes, true -* ``dict`` - list-comma where keys from values are separated by = -* ``section`` - values could be read from a dedicated (sub)section +* ``list-comma`` - dangling list or string of comma-separated values +* ``list-semi`` - dangling list or string of semicolon-separated values +* ``bool`` - ``True`` is 1, yes, true +* ``dict`` - list-comma where keys are separated from values by ``=`` +* ``section`` - values are read from a dedicated (sub)section Special directives: -* ``attr:`` - value could be read from module attribute -* ``file:`` - value could be read from a list of files and then concatenated +* ``attr:`` - Value is read from a module attribute. ``attr:`` supports + callables and iterables; unsupported types are cast using ``str()``. +* ``file:`` - Value is read from a list of files and then concatenated .. note:: - ``file:`` directive is sandboxed and won't reach anything outside - directory with ``setup.py``. + The ``file:`` directive is sandboxed and won't reach anything outside + the directory containing ``setup.py``. Metadata -------- .. note:: - Aliases given below are supported for compatibility reasons, - but not advised. + The aliases given below are supported for compatibility reasons, + but their use is not advised. ============================== ================= ===== -Key Aliases Accepted value type +Key Aliases Type ============================== ================= ===== name str version attr:, str @@ -2417,17 +2422,12 @@ requires list-comma obsoletes list-comma ============================== ================= ===== -.. note:: - - **version** - ``attr:`` supports callables; supports iterables; - unsupported types are casted using ``str()``. - Options ------- ======================= ===== -Key Accepted value type +Key Type ======================= ===== zip_safe bool setup_requires list-semi @@ -2454,10 +2454,10 @@ py_modules list-comma .. note:: - **packages** - ``find:`` directive can be further configured - in a dedicated subsection `options.packages.find`. This subsection - accepts the same keys as `setuptools.find` function: - `where`, `include`, `exclude`. + **packages** - The ``find:`` directive can be further configured + in a dedicated subsection ``options.packages.find``. This subsection + accepts the same keys as the `setuptools.find` function: + ``where``, ``include``, and ``exclude``. Configuration API @@ -2465,7 +2465,7 @@ Configuration API Some automation tools may wish to access data from a configuration file. -``Setuptools`` exposes ``read_configuration()`` function allowing +``Setuptools`` exposes a ``read_configuration()`` function for parsing ``metadata`` and ``options`` sections into a dictionary. @@ -2476,16 +2476,16 @@ parsing ``metadata`` and ``options`` sections into a dictionary. conf_dict = read_configuration('/home/user/dev/package/setup.cfg') -By default ``read_configuration()`` will read only file provided +By default, ``read_configuration()`` will read only the file provided in the first argument. To include values from other configuration files -which could be in various places set `find_others` function argument +which could be in various places, set the ``find_others`` keyword argument to ``True``. -If you have only a configuration file but not the whole package you can still -try to get data out of it with the help of `ignore_option_errors` function -argument. When it is set to ``True`` all options with errors possibly produced -by directives, such as ``attr:`` and others will be silently ignored. -As a consequence the resulting dictionary will include no such options. +If you have only a configuration file but not the whole package, you can still +try to get data out of it with the help of the ``ignore_option_errors`` keyword +argument. When it is set to ``True``, all options with errors possibly produced +by directives, such as ``attr:`` and others, will be silently ignored. +As a consequence, the resulting dictionary will include no such options. -------------------------------- From ee33fa23dcdb7f9a0e89e2df3a50706b75678a36 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Wed, 13 Sep 2017 11:47:12 +0800 Subject: [PATCH 6758/8469] python 3 bdist_egg --exclude-source-files __pycache__ issue --- setuptools/command/bdist_egg.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 51755d52c9..5bfc7ba221 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -8,6 +8,7 @@ from types import CodeType import sys import os +import re import textwrap import marshal @@ -238,6 +239,8 @@ def run(self): def zap_pyfiles(self): log.info("Removing .py files from temporary directory") + py3 = sys.version_info >= (3, 0) + re_pycache_file = re.compile('(.+)\.cpython-3\d(.pyc)$') for base, dirs, files in walk_egg(self.bdist_dir): for name in files: if name.endswith('.py'): @@ -245,6 +248,17 @@ def zap_pyfiles(self): log.debug("Deleting %s", path) os.unlink(path) + if py3 and base.endswith('__pycache__'): + path_old = os.path.join(base, name) + + m = re_pycache_file.match(name) + path_new = os.path.join(base, os.pardir, m.group(1) + m.group(2)) + log.info("Renaming Python 3 .pyc file from [%s] to [%s]" % (path_old, path_new)) + if os.path.exists(path_new): + os.unlink(path_new) + os.rename(path_old, path_new) + + def zip_safe(self): safe = getattr(self.distribution, 'zip_safe', None) if safe is not None: From acc77db19ed21f11c20493fd81831343212a3f01 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Sep 2017 10:19:19 -0400 Subject: [PATCH 6759/8469] Combine changelog entries --- CHANGES.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f9de501228..8217aabad4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,12 +1,9 @@ -v36.5.1 +v36.5.0 ------- * #170: When working with Mercurial checkouts, use Windows-friendly syntax for suppressing output. -v36.5.0 -------- - * Inspired by #1134, performed substantial refactoring of ``pkg_resources.find_on_path`` to facilitate an optimization for paths with many non-version entries. From 9f295a706590b1e3618978d6f2d83af0b893ec4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Sep 2017 10:19:29 -0400 Subject: [PATCH 6760/8469] =?UTF-8?q?Bump=20version:=2036.4.0=20=E2=86=92?= =?UTF-8?q?=2036.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index ea649893f1..e5ebf4b8df 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.4.0 +current_version = 36.5.0 commit = True tag = True diff --git a/setup.py b/setup.py index eb939ff370..ee968d9a89 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.4.0", + version="36.5.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b1e47b43f3d2b972057ebe4c564b0ed03d39cd3d Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 16 Sep 2017 11:23:22 -0700 Subject: [PATCH 6761/8469] Clean up resource warnings during tests When tests are invoked with the Python flag -Wall, warnings appear in the form of: ResourceWarning: unclosed file ... Close all files and resources deterministically to avoid such warnings. Most often, easiest to do using a context manager. --- pkg_resources/__init__.py | 6 +++++- pkg_resources/tests/test_pkg_resources.py | 4 ++-- setuptools/tests/test_egg_info.py | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 68349df44e..049b8a5458 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2124,7 +2124,11 @@ def non_empty_lines(path): """ Yield non-empty lines from file at path """ - return (line.rstrip() for line in open(path) if line.strip()) + with open(path) as f: + for line in f: + line = line.strip() + if line: + yield line def resolve_egg_link(path): diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 49bf7a04b8..c6a7ac97e9 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -92,8 +92,8 @@ def test_resource_filename_rewrites_on_change(self): ts = timestamp(self.ref_time) os.utime(filename, (ts, ts)) filename = zp.get_resource_filename(manager, 'data.dat') - f = open(filename) - assert f.read() == 'hello, world!' + with open(filename) as f: + assert f.read() == 'hello, world!' manager.cleanup_resources() diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index e454694d11..1411f93c0d 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -164,7 +164,8 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') - assert 'docs/usage.rst' in open(sources_txt).read().split('\n') + with open(sources_txt) as f: + assert 'docs/usage.rst' in f.read().split('\n') def _setup_script_with_requires(self, requires, use_setup_cfg=False): setup_script = DALS( @@ -447,7 +448,8 @@ def test_python_requires_install(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) egg_info_dir = self._find_egg_info_files(env.paths['lib']).base pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') - assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') + with open(pkginfo) as f: + assert 'Requires-Python: >=1.2.3' in f.read().split('\n') def test_manifest_maker_warning_suppression(self): fixtures = [ From ee40d9fffac9c13ecfe9a427872adeeaedc57778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 20 Sep 2017 14:03:27 +0200 Subject: [PATCH 6762/8469] Tests: Run `python -m pip` instead of plain `pip` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to run the testsuite on systems where `/usr/bin/pip` is a specific Python version, but the tests are run on a different one. For example in Fedora RPM, when the Python 3 tests are invoked, they should use Python 3 pip, not Python 2 `/usr/bin/pip`. Unlike other approaches, like using `pip2`/`pip3` which is currently done in Fedora RPM (downstream patch), this way it Works Everywhereâ„¢ and the downstream patch can be dropped. See https://src.fedoraproject.org/rpms/python-setuptools/blob/54eaa03a4dc97f93a5e4c92c55e580a4ab55a058/f/0001-Run-test-on-a-version-specific-pip.patch --- setuptools/tests/test_develop.py | 2 ++ setuptools/tests/test_namespaces.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ad7cfa05c3..ec67c798fd 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -167,6 +167,8 @@ def test_namespace_package_importable(self, tmpdir): target = tmpdir / 'packages' # use pip to install to the target directory install_cmd = [ + sys.executable, + '-m', 'pip', 'install', str(pkg_A), diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 721cad1e63..14759e661d 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -30,6 +30,8 @@ def test_mixed_site_and_non_site(self, tmpdir): targets = site_packages, path_packages # use pip to install to the target directory install_cmd = [ + sys.executable, + '-m', 'pip', 'install', str(pkg_A), @@ -38,6 +40,8 @@ def test_mixed_site_and_non_site(self, tmpdir): subprocess.check_call(install_cmd) namespaces.make_site_dir(site_packages) install_cmd = [ + sys.executable, + '-m', 'pip', 'install', str(pkg_B), @@ -88,6 +92,8 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): target = tmpdir / 'packages' # use pip to install to the target directory install_cmd = [ + sys.executable, + '-m', 'pip', 'install', str(pkg_A), From 7ea8086d35b6e072c8deae6de54c55f0582161e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 20 Sep 2017 14:52:48 +0200 Subject: [PATCH 6763/8469] Tests: Run `python -m pip.__main__` to support Python 2.6 See https://bugs.python.org/issue2751 --- setuptools/tests/test_develop.py | 2 +- setuptools/tests/test_namespaces.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index ec67c798fd..cb4ff4b401 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -169,7 +169,7 @@ def test_namespace_package_importable(self, tmpdir): install_cmd = [ sys.executable, '-m', - 'pip', + 'pip.__main__', 'install', str(pkg_A), '-t', str(target), diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 14759e661d..1ac1b35e8b 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -32,7 +32,7 @@ def test_mixed_site_and_non_site(self, tmpdir): install_cmd = [ sys.executable, '-m', - 'pip', + 'pip.__main__', 'install', str(pkg_A), '-t', str(site_packages), @@ -42,7 +42,7 @@ def test_mixed_site_and_non_site(self, tmpdir): install_cmd = [ sys.executable, '-m', - 'pip', + 'pip.__main__', 'install', str(pkg_B), '-t', str(path_packages), @@ -94,7 +94,7 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): install_cmd = [ sys.executable, '-m', - 'pip', + 'pip.__main__', 'install', str(pkg_A), '-t', str(target), From 65536e456ed4e721a116094b5f18093ef90eb3c4 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 20 Sep 2017 23:20:35 +0200 Subject: [PATCH 6764/8469] tests: make sure some essential tests are run --- setuptools/tests/__init__.py | 320 ---------------------------- setuptools/tests/test_setuptools.py | 320 ++++++++++++++++++++++++++++ 2 files changed, 320 insertions(+), 320 deletions(-) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 8ae4402dde..54dd7d2b20 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -1,326 +1,6 @@ -"""Tests for the 'setuptools' package""" import locale -import sys -import os -import distutils.core -import distutils.cmd -from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils.errors import DistutilsSetupError -from distutils.core import Extension -from distutils.version import LooseVersion -from setuptools.extern import six import pytest -import setuptools.dist -import setuptools.depends as dep -from setuptools import Feature -from setuptools.depends import Require - is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968' fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") - - -def makeSetup(**args): - """Return distribution from 'setup(**args)', without executing commands""" - - distutils.core._setup_stop_after = "commandline" - - # Don't let system command line leak into tests! - args.setdefault('script_args', ['install']) - - try: - return setuptools.setup(**args) - finally: - distutils.core._setup_stop_after = None - - -needs_bytecode = pytest.mark.skipif( - not hasattr(dep, 'get_module_constant'), - reason="bytecode support not available", -) - - -class TestDepends: - def testExtractConst(self): - if not hasattr(dep, 'extract_constant'): - # skip on non-bytecode platforms - return - - def f1(): - global x, y, z - x = "test" - y = z - - fc = six.get_function_code(f1) - - # unrecognized name - assert dep.extract_constant(fc, 'q', -1) is None - - # constant assigned - dep.extract_constant(fc, 'x', -1) == "test" - - # expression assigned - dep.extract_constant(fc, 'y', -1) == -1 - - # recognized name, not assigned - dep.extract_constant(fc, 'z', -1) is None - - def testFindModule(self): - with pytest.raises(ImportError): - dep.find_module('no-such.-thing') - with pytest.raises(ImportError): - dep.find_module('setuptools.non-existent') - f, p, i = dep.find_module('setuptools.tests') - f.close() - - @needs_bytecode - def testModuleExtract(self): - from email import __version__ - assert dep.get_module_constant('email', '__version__') == __version__ - assert dep.get_module_constant('sys', 'version') == sys.version - assert dep.get_module_constant('setuptools.tests', '__doc__') == __doc__ - - @needs_bytecode - def testRequire(self): - req = Require('Email', '1.0.3', 'email') - - assert req.name == 'Email' - assert req.module == 'email' - assert req.requested_version == '1.0.3' - assert req.attribute == '__version__' - assert req.full_name() == 'Email-1.0.3' - - from email import __version__ - assert req.get_version() == __version__ - assert req.version_ok('1.0.9') - assert not req.version_ok('0.9.1') - assert not req.version_ok('unknown') - - assert req.is_present() - assert req.is_current() - - req = Require('Email 3000', '03000', 'email', format=LooseVersion) - assert req.is_present() - assert not req.is_current() - assert not req.version_ok('unknown') - - req = Require('Do-what-I-mean', '1.0', 'd-w-i-m') - assert not req.is_present() - assert not req.is_current() - - req = Require('Tests', None, 'tests', homepage="http://example.com") - assert req.format is None - assert req.attribute is None - assert req.requested_version is None - assert req.full_name() == 'Tests' - assert req.homepage == 'http://example.com' - - paths = [os.path.dirname(p) for p in __path__] - assert req.is_present(paths) - assert req.is_current(paths) - - -class TestDistro: - def setup_method(self, method): - self.e1 = Extension('bar.ext', ['bar.c']) - self.e2 = Extension('c.y', ['y.c']) - - self.dist = makeSetup( - packages=['a', 'a.b', 'a.b.c', 'b', 'c'], - py_modules=['b.d', 'x'], - ext_modules=(self.e1, self.e2), - package_dir={}, - ) - - def testDistroType(self): - assert isinstance(self.dist, setuptools.dist.Distribution) - - def testExcludePackage(self): - self.dist.exclude_package('a') - assert self.dist.packages == ['b', 'c'] - - self.dist.exclude_package('b') - assert self.dist.packages == ['c'] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1, self.e2] - - self.dist.exclude_package('c') - assert self.dist.packages == [] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1] - - # test removals from unspecified options - makeSetup().exclude_package('x') - - def testIncludeExclude(self): - # remove an extension - self.dist.exclude(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2] - - # add it back in - self.dist.include(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2, self.e1] - - # should not add duplicate - self.dist.include(ext_modules=[self.e1]) - assert self.dist.ext_modules == [self.e2, self.e1] - - def testExcludePackages(self): - self.dist.exclude(packages=['c', 'b', 'a']) - assert self.dist.packages == [] - assert self.dist.py_modules == ['x'] - assert self.dist.ext_modules == [self.e1] - - def testEmpty(self): - dist = makeSetup() - dist.include(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) - dist = makeSetup() - dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) - - def testContents(self): - assert self.dist.has_contents_for('a') - self.dist.exclude_package('a') - assert not self.dist.has_contents_for('a') - - assert self.dist.has_contents_for('b') - self.dist.exclude_package('b') - assert not self.dist.has_contents_for('b') - - assert self.dist.has_contents_for('c') - self.dist.exclude_package('c') - assert not self.dist.has_contents_for('c') - - def testInvalidIncludeExclude(self): - with pytest.raises(DistutilsSetupError): - self.dist.include(nonexistent_option='x') - with pytest.raises(DistutilsSetupError): - self.dist.exclude(nonexistent_option='x') - with pytest.raises(DistutilsSetupError): - self.dist.include(packages={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(packages={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.include(ext_modules={'x': 'y'}) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(ext_modules={'x': 'y'}) - - with pytest.raises(DistutilsSetupError): - self.dist.include(package_dir=['q']) - with pytest.raises(DistutilsSetupError): - self.dist.exclude(package_dir=['q']) - - -class TestFeatures: - def setup_method(self, method): - self.req = Require('Distutils', '1.0.3', 'distutils') - self.dist = makeSetup( - features={ - 'foo': Feature("foo", standard=True, require_features=['baz', self.req]), - 'bar': Feature("bar", standard=True, packages=['pkg.bar'], - py_modules=['bar_et'], remove=['bar.ext'], - ), - 'baz': Feature( - "baz", optional=False, packages=['pkg.baz'], - scripts=['scripts/baz_it'], - libraries=[('libfoo', 'foo/foofoo.c')] - ), - 'dwim': Feature("DWIM", available=False, remove='bazish'), - }, - script_args=['--without-bar', 'install'], - packages=['pkg.bar', 'pkg.foo'], - py_modules=['bar_et', 'bazish'], - ext_modules=[Extension('bar.ext', ['bar.c'])] - ) - - def testDefaults(self): - assert not Feature( - "test", standard=True, remove='x', available=False - ).include_by_default() - assert Feature("test", standard=True, remove='x').include_by_default() - # Feature must have either kwargs, removes, or require_features - with pytest.raises(DistutilsSetupError): - Feature("test") - - def testAvailability(self): - with pytest.raises(DistutilsPlatformError): - self.dist.features['dwim'].include_in(self.dist) - - def testFeatureOptions(self): - dist = self.dist - assert ( - ('with-dwim', None, 'include DWIM') in dist.feature_options - ) - assert ( - ('without-dwim', None, 'exclude DWIM (default)') in dist.feature_options - ) - assert ( - ('with-bar', None, 'include bar (default)') in dist.feature_options - ) - assert ( - ('without-bar', None, 'exclude bar') in dist.feature_options - ) - assert dist.feature_negopt['without-foo'] == 'with-foo' - assert dist.feature_negopt['without-bar'] == 'with-bar' - assert dist.feature_negopt['without-dwim'] == 'with-dwim' - assert ('without-baz' not in dist.feature_negopt) - - def testUseFeatures(self): - dist = self.dist - assert dist.with_foo == 1 - assert dist.with_bar == 0 - assert dist.with_baz == 1 - assert ('bar_et' not in dist.py_modules) - assert ('pkg.bar' not in dist.packages) - assert ('pkg.baz' in dist.packages) - assert ('scripts/baz_it' in dist.scripts) - assert (('libfoo', 'foo/foofoo.c') in dist.libraries) - assert dist.ext_modules == [] - assert dist.require_features == [self.req] - - # If we ask for bar, it should fail because we explicitly disabled - # it on the command line - with pytest.raises(DistutilsOptionError): - dist.include_feature('bar') - - def testFeatureWithInvalidRemove(self): - with pytest.raises(SystemExit): - makeSetup(features={'x': Feature('x', remove='y')}) - - -class TestCommandTests: - def testTestIsCommand(self): - test_cmd = makeSetup().get_command_obj('test') - assert (isinstance(test_cmd, distutils.cmd.Command)) - - def testLongOptSuiteWNoDefault(self): - ts1 = makeSetup(script_args=['test', '--test-suite=foo.tests.suite']) - ts1 = ts1.get_command_obj('test') - ts1.ensure_finalized() - assert ts1.test_suite == 'foo.tests.suite' - - def testDefaultSuite(self): - ts2 = makeSetup(test_suite='bar.tests.suite').get_command_obj('test') - ts2.ensure_finalized() - assert ts2.test_suite == 'bar.tests.suite' - - def testDefaultWModuleOnCmdLine(self): - ts3 = makeSetup( - test_suite='bar.tests', - script_args=['test', '-m', 'foo.tests'] - ).get_command_obj('test') - ts3.ensure_finalized() - assert ts3.test_module == 'foo.tests' - assert ts3.test_suite == 'foo.tests.test_suite' - - def testConflictingOptions(self): - ts4 = makeSetup( - script_args=['test', '-m', 'bar.tests', '-s', 'foo.tests.suite'] - ).get_command_obj('test') - with pytest.raises(DistutilsOptionError): - ts4.ensure_finalized() - - def testNoSuite(self): - ts5 = makeSetup().get_command_obj('test') - ts5.ensure_finalized() - assert ts5.test_suite is None diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index e59800d2ec..26e37a6c14 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -1,8 +1,328 @@ +"""Tests for the 'setuptools' package""" + +import sys import os +import distutils.core +import distutils.cmd +from distutils.errors import DistutilsOptionError, DistutilsPlatformError +from distutils.errors import DistutilsSetupError +from distutils.core import Extension +from distutils.version import LooseVersion import pytest import setuptools +import setuptools.dist +import setuptools.depends as dep +from setuptools import Feature +from setuptools.depends import Require +from setuptools.extern import six + + +def makeSetup(**args): + """Return distribution from 'setup(**args)', without executing commands""" + + distutils.core._setup_stop_after = "commandline" + + # Don't let system command line leak into tests! + args.setdefault('script_args', ['install']) + + try: + return setuptools.setup(**args) + finally: + distutils.core._setup_stop_after = None + + +needs_bytecode = pytest.mark.skipif( + not hasattr(dep, 'get_module_constant'), + reason="bytecode support not available", +) + + +class TestDepends: + def testExtractConst(self): + if not hasattr(dep, 'extract_constant'): + # skip on non-bytecode platforms + return + + def f1(): + global x, y, z + x = "test" + y = z + + fc = six.get_function_code(f1) + + # unrecognized name + assert dep.extract_constant(fc, 'q', -1) is None + + # constant assigned + dep.extract_constant(fc, 'x', -1) == "test" + + # expression assigned + dep.extract_constant(fc, 'y', -1) == -1 + + # recognized name, not assigned + dep.extract_constant(fc, 'z', -1) is None + + def testFindModule(self): + with pytest.raises(ImportError): + dep.find_module('no-such.-thing') + with pytest.raises(ImportError): + dep.find_module('setuptools.non-existent') + f, p, i = dep.find_module('setuptools.tests') + f.close() + + @needs_bytecode + def testModuleExtract(self): + from json import __version__ + assert dep.get_module_constant('json', '__version__') == __version__ + assert dep.get_module_constant('sys', 'version') == sys.version + assert dep.get_module_constant('setuptools.tests.test_setuptools', '__doc__') == __doc__ + + @needs_bytecode + def testRequire(self): + req = Require('Json', '1.0.3', 'json') + + assert req.name == 'Json' + assert req.module == 'json' + assert req.requested_version == '1.0.3' + assert req.attribute == '__version__' + assert req.full_name() == 'Json-1.0.3' + + from json import __version__ + assert req.get_version() == __version__ + assert req.version_ok('1.0.9') + assert not req.version_ok('0.9.1') + assert not req.version_ok('unknown') + + assert req.is_present() + assert req.is_current() + + req = Require('Json 3000', '03000', 'json', format=LooseVersion) + assert req.is_present() + assert not req.is_current() + assert not req.version_ok('unknown') + + req = Require('Do-what-I-mean', '1.0', 'd-w-i-m') + assert not req.is_present() + assert not req.is_current() + + req = Require('Tests', None, 'tests', homepage="http://example.com") + assert req.format is None + assert req.attribute is None + assert req.requested_version is None + assert req.full_name() == 'Tests' + assert req.homepage == 'http://example.com' + + from setuptools.tests import __path__ + paths = [os.path.dirname(p) for p in __path__] + assert req.is_present(paths) + assert req.is_current(paths) + + +class TestDistro: + def setup_method(self, method): + self.e1 = Extension('bar.ext', ['bar.c']) + self.e2 = Extension('c.y', ['y.c']) + + self.dist = makeSetup( + packages=['a', 'a.b', 'a.b.c', 'b', 'c'], + py_modules=['b.d', 'x'], + ext_modules=(self.e1, self.e2), + package_dir={}, + ) + + def testDistroType(self): + assert isinstance(self.dist, setuptools.dist.Distribution) + + def testExcludePackage(self): + self.dist.exclude_package('a') + assert self.dist.packages == ['b', 'c'] + + self.dist.exclude_package('b') + assert self.dist.packages == ['c'] + assert self.dist.py_modules == ['x'] + assert self.dist.ext_modules == [self.e1, self.e2] + + self.dist.exclude_package('c') + assert self.dist.packages == [] + assert self.dist.py_modules == ['x'] + assert self.dist.ext_modules == [self.e1] + + # test removals from unspecified options + makeSetup().exclude_package('x') + + def testIncludeExclude(self): + # remove an extension + self.dist.exclude(ext_modules=[self.e1]) + assert self.dist.ext_modules == [self.e2] + + # add it back in + self.dist.include(ext_modules=[self.e1]) + assert self.dist.ext_modules == [self.e2, self.e1] + + # should not add duplicate + self.dist.include(ext_modules=[self.e1]) + assert self.dist.ext_modules == [self.e2, self.e1] + + def testExcludePackages(self): + self.dist.exclude(packages=['c', 'b', 'a']) + assert self.dist.packages == [] + assert self.dist.py_modules == ['x'] + assert self.dist.ext_modules == [self.e1] + + def testEmpty(self): + dist = makeSetup() + dist.include(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) + dist = makeSetup() + dist.exclude(packages=['a'], py_modules=['b'], ext_modules=[self.e2]) + + def testContents(self): + assert self.dist.has_contents_for('a') + self.dist.exclude_package('a') + assert not self.dist.has_contents_for('a') + + assert self.dist.has_contents_for('b') + self.dist.exclude_package('b') + assert not self.dist.has_contents_for('b') + + assert self.dist.has_contents_for('c') + self.dist.exclude_package('c') + assert not self.dist.has_contents_for('c') + + def testInvalidIncludeExclude(self): + with pytest.raises(DistutilsSetupError): + self.dist.include(nonexistent_option='x') + with pytest.raises(DistutilsSetupError): + self.dist.exclude(nonexistent_option='x') + with pytest.raises(DistutilsSetupError): + self.dist.include(packages={'x': 'y'}) + with pytest.raises(DistutilsSetupError): + self.dist.exclude(packages={'x': 'y'}) + with pytest.raises(DistutilsSetupError): + self.dist.include(ext_modules={'x': 'y'}) + with pytest.raises(DistutilsSetupError): + self.dist.exclude(ext_modules={'x': 'y'}) + + with pytest.raises(DistutilsSetupError): + self.dist.include(package_dir=['q']) + with pytest.raises(DistutilsSetupError): + self.dist.exclude(package_dir=['q']) + + +class TestFeatures: + def setup_method(self, method): + self.req = Require('Distutils', '1.0.3', 'distutils') + self.dist = makeSetup( + features={ + 'foo': Feature("foo", standard=True, require_features=['baz', self.req]), + 'bar': Feature("bar", standard=True, packages=['pkg.bar'], + py_modules=['bar_et'], remove=['bar.ext'], + ), + 'baz': Feature( + "baz", optional=False, packages=['pkg.baz'], + scripts=['scripts/baz_it'], + libraries=[('libfoo', 'foo/foofoo.c')] + ), + 'dwim': Feature("DWIM", available=False, remove='bazish'), + }, + script_args=['--without-bar', 'install'], + packages=['pkg.bar', 'pkg.foo'], + py_modules=['bar_et', 'bazish'], + ext_modules=[Extension('bar.ext', ['bar.c'])] + ) + + def testDefaults(self): + assert not Feature( + "test", standard=True, remove='x', available=False + ).include_by_default() + assert Feature("test", standard=True, remove='x').include_by_default() + # Feature must have either kwargs, removes, or require_features + with pytest.raises(DistutilsSetupError): + Feature("test") + + def testAvailability(self): + with pytest.raises(DistutilsPlatformError): + self.dist.features['dwim'].include_in(self.dist) + + def testFeatureOptions(self): + dist = self.dist + assert ( + ('with-dwim', None, 'include DWIM') in dist.feature_options + ) + assert ( + ('without-dwim', None, 'exclude DWIM (default)') in dist.feature_options + ) + assert ( + ('with-bar', None, 'include bar (default)') in dist.feature_options + ) + assert ( + ('without-bar', None, 'exclude bar') in dist.feature_options + ) + assert dist.feature_negopt['without-foo'] == 'with-foo' + assert dist.feature_negopt['without-bar'] == 'with-bar' + assert dist.feature_negopt['without-dwim'] == 'with-dwim' + assert ('without-baz' not in dist.feature_negopt) + + def testUseFeatures(self): + dist = self.dist + assert dist.with_foo == 1 + assert dist.with_bar == 0 + assert dist.with_baz == 1 + assert ('bar_et' not in dist.py_modules) + assert ('pkg.bar' not in dist.packages) + assert ('pkg.baz' in dist.packages) + assert ('scripts/baz_it' in dist.scripts) + assert (('libfoo', 'foo/foofoo.c') in dist.libraries) + assert dist.ext_modules == [] + assert dist.require_features == [self.req] + + # If we ask for bar, it should fail because we explicitly disabled + # it on the command line + with pytest.raises(DistutilsOptionError): + dist.include_feature('bar') + + def testFeatureWithInvalidRemove(self): + with pytest.raises(SystemExit): + makeSetup(features={'x': Feature('x', remove='y')}) + + +class TestCommandTests: + def testTestIsCommand(self): + test_cmd = makeSetup().get_command_obj('test') + assert (isinstance(test_cmd, distutils.cmd.Command)) + + def testLongOptSuiteWNoDefault(self): + ts1 = makeSetup(script_args=['test', '--test-suite=foo.tests.suite']) + ts1 = ts1.get_command_obj('test') + ts1.ensure_finalized() + assert ts1.test_suite == 'foo.tests.suite' + + def testDefaultSuite(self): + ts2 = makeSetup(test_suite='bar.tests.suite').get_command_obj('test') + ts2.ensure_finalized() + assert ts2.test_suite == 'bar.tests.suite' + + def testDefaultWModuleOnCmdLine(self): + ts3 = makeSetup( + test_suite='bar.tests', + script_args=['test', '-m', 'foo.tests'] + ).get_command_obj('test') + ts3.ensure_finalized() + assert ts3.test_module == 'foo.tests' + assert ts3.test_suite == 'foo.tests.test_suite' + + def testConflictingOptions(self): + ts4 = makeSetup( + script_args=['test', '-m', 'bar.tests', '-s', 'foo.tests.suite'] + ).get_command_obj('test') + with pytest.raises(DistutilsOptionError): + ts4.ensure_finalized() + + def testNoSuite(self): + ts5 = makeSetup().get_command_obj('test') + ts5.ensure_finalized() + assert ts5.test_suite is None @pytest.fixture From f7e4a57aad94d1ca2408729d9c6df7419dbac909 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 24 Sep 2017 18:51:52 -0500 Subject: [PATCH 6765/8469] nit: fix spelling error and re-use contextmanager --- setuptools/tests/test_pep517.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index da22877024..ea149f7341 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -41,7 +41,7 @@ def method(*args, **kw): class BuildBackendCaller(BuildBackendBase): def __call__(self, name, *args, **kw): - """Handles aribrary function invokations on the build backend.""" + """Handles aribrary function invocations on the build backend.""" os.chdir(self.cwd) os.environ.update(self.env) return getattr(import_module(self.backend_name), name)(*args, **kw) @@ -58,7 +58,8 @@ def enter_directory(dir, val=None): @pytest.fixture def build_backend(): tmpdir = mkdtemp() - with enter_directory(tmpdir): + ctx = enter_directory(tmpdir, BuildBackend(cwd='.')) + with ctx: setup_script = DALS(""" from setuptools import setup @@ -79,7 +80,7 @@ def run(): """) }) - return enter_directory(tmpdir, BuildBackend(cwd='.')) + return ctx def test_get_requires_for_build_wheel(build_backend): From a2d62dd2a79720c8780645cfca2ff64eea18ffcf Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 24 Sep 2017 19:10:05 -0500 Subject: [PATCH 6766/8469] pep517: add module docstring --- setuptools/pep517.py | 46 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 25474b555b..5f6b992dfa 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -1,3 +1,31 @@ +"""A PEP 517 interface to setuptools + +Previously, when a user or a command line tool (let's call it a "frontend") +needed to make a request of setuptools to take a certain action, for +example, generating a list of installation requirements, the frontend would +would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line. + +PEP 517 defines a different method of interfacing with setuptools. Rather +than calling "setup.py" directly, the frontend should: + + 1. Set the current directory to the directory with a setup.py file + 2. Import this module into a safe python interpreter (one in which + setuptools can potentially set global variables or crash hard). + 3. Call one of the functions defined in PEP 517. + +What each function does is defined in PEP 517. However, here is a "casual" +definition of the functions (this definition should not be relied on for +bug reports or API stability): + + - `build_wheel`: build a wheel in the folder and return the basename + - `get_requires_for_build_wheel`: get the `setup_requires` to build + - `prepare_metadata_for_build_wheel`: get the `install_requires` + - `build_sdist`: build an sdist in the folder and return the basename + - `get_requires_for_build_sdist`: get the `setup_requires` to build + +Again, this is not a formal definition! Just a "taste" of the module. +""" + import os import sys import subprocess @@ -21,14 +49,14 @@ def _run_setup(setup_script='setup.py'): # exec(compile(code, __file__, 'exec')) -def fix_config(config_settings): +def _fix_config(config_settings): config_settings = config_settings or {} config_settings.setdefault('--global-option', []) return config_settings -def get_build_requires(config_settings): - config_settings = fix_config(config_settings) +def _get_build_requires(config_settings): + config_settings = _fix_config(config_settings) requirements = ['setuptools', 'wheel'] dist._skip_install_eggs = True @@ -45,13 +73,13 @@ def get_build_requires(config_settings): def get_requires_for_build_wheel(config_settings=None): - config_settings = fix_config(config_settings) - return get_build_requires(config_settings) + config_settings = _fix_config(config_settings) + return _get_build_requires(config_settings) def get_requires_for_build_sdist(config_settings=None): - config_settings = fix_config(config_settings) - return get_build_requires(config_settings) + config_settings = _fix_config(config_settings) + return _get_build_requires(config_settings) def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): @@ -67,7 +95,7 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): - config_settings = fix_config(config_settings) + config_settings = _fix_config(config_settings) wheel_directory = os.path.abspath(wheel_directory) sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ config_settings["--global-option"] @@ -84,7 +112,7 @@ def build_wheel(wheel_directory, config_settings=None, def build_sdist(sdist_directory, config_settings=None): - config_settings = fix_config(config_settings) + config_settings = _fix_config(config_settings) sdist_directory = os.path.abspath(sdist_directory) sys.argv = sys.argv[:1] + ['sdist'] + \ config_settings["--global-option"] From d72a5a7c28794cabfc9481691eb89e86fc37efb6 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 24 Sep 2017 19:13:37 -0500 Subject: [PATCH 6767/8469] tests: pep517: fix enter_directory --- setuptools/tests/test_pep517.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index ea149f7341..442a064929 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -49,10 +49,11 @@ def __call__(self, name, *args, **kw): @contextmanager def enter_directory(dir, val=None): - original_dir = os.getcwd() - os.chdir(dir) - yield val - os.chdir(original_dir) + while True: + original_dir = os.getcwd() + os.chdir(dir) + yield val + os.chdir(original_dir) @pytest.fixture From 14ea4d1487ec70efe31f34169b74347f50e0654a Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 24 Sep 2017 19:21:00 -0500 Subject: [PATCH 6768/8469] tests: pep517: revert changes --- setuptools/tests/test_pep517.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 442a064929..df4414a14a 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -49,18 +49,16 @@ def __call__(self, name, *args, **kw): @contextmanager def enter_directory(dir, val=None): - while True: - original_dir = os.getcwd() - os.chdir(dir) - yield val - os.chdir(original_dir) + original_dir = os.getcwd() + os.chdir(dir) + yield val + os.chdir(original_dir) @pytest.fixture def build_backend(): tmpdir = mkdtemp() - ctx = enter_directory(tmpdir, BuildBackend(cwd='.')) - with ctx: + with enter_directory(tmpdir): setup_script = DALS(""" from setuptools import setup @@ -81,7 +79,7 @@ def run(): """) }) - return ctx + return enter_directory(tmpdir, BuildBackend(cwd='.')) def test_get_requires_for_build_wheel(build_backend): From bc85ee971b84a177d06751a7b4075debecd604a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 25 Sep 2017 18:58:10 +0200 Subject: [PATCH 6769/8469] bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 2bcd1dd288..e07a6c8b94 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -23,7 +23,7 @@ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) # Path to the base directory of the project. On Windows the binary may -# live in project/PCBuild/win32 or project/PCBuild/amd64. +# live in project/PCbuild/win32 or project/PCbuild/amd64. # set for cross builds if "_PYTHON_PROJECT_BASE" in os.environ: project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) From 6b18d32f779cf78bf0b0384277d52d8bf803d621 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 28 Sep 2017 22:44:27 -0700 Subject: [PATCH 6770/8469] remove support for BSD/OS (closes bpo-31624) (#3812) --- util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.py b/util.py index 9394c1e056..83682628ba 100644 --- a/util.py +++ b/util.py @@ -53,8 +53,8 @@ def get_platform (): (osname, host, release, version, machine) = os.uname() - # Convert the OS name to lowercase, remove '/' characters - # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") + # Convert the OS name to lowercase, remove '/' characters, and translate + # spaces (for "Power Macintosh") osname = osname.lower().replace('/', '') machine = machine.replace(' ', '_') machine = machine.replace('/', '-') From 2a7ad18393a8cc8d7ebf5d0df77de0715c964acf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 09:13:50 +0200 Subject: [PATCH 6771/8469] Remove excess whitespace --- setuptools/pep517.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 5f6b992dfa..c8d4b49357 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -12,7 +12,7 @@ 2. Import this module into a safe python interpreter (one in which setuptools can potentially set global variables or crash hard). 3. Call one of the functions defined in PEP 517. - + What each function does is defined in PEP 517. However, here is a "casual" definition of the functions (this definition should not be relied on for bug reports or API stability): @@ -41,7 +41,7 @@ def _run_setup(setup_script='setup.py'): # # Note that we can reuse our build directory between calls - # Correctness comes first, then optimization later + # Correctness comes first, then optimization later __file__=setup_script f=getattr(tokenize, 'open', open)(__file__) code=f.read().replace('\\r\\n', '\\n') From b67a4c32b19df8b4bf65eb7edc68ba71865787ae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 09:14:02 +0200 Subject: [PATCH 6772/8469] Feed the hobgoblins (delint) --- setuptools/pep517.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index c8d4b49357..4032c5bb90 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -28,10 +28,8 @@ import os import sys -import subprocess import tokenize import shutil -import tempfile from setuptools import dist from setuptools.dist import SetupRequirementsError @@ -39,12 +37,13 @@ SETUPTOOLS_IMPLEMENTATION_REVISION = 0.1 -def _run_setup(setup_script='setup.py'): # + +def _run_setup(setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later - __file__=setup_script - f=getattr(tokenize, 'open', open)(__file__) - code=f.read().replace('\\r\\n', '\\n') + __file__ = setup_script + f = getattr(tokenize, 'open', open)(__file__) + code = f.read().replace('\\r\\n', '\\n') f.close() exec(compile(code, __file__, 'exec')) From 84a97be0633f526de2f24b096d5fd1bf1cd75ac6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 09:15:58 +0200 Subject: [PATCH 6773/8469] Remove unused variable --- setuptools/pep517.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index 4032c5bb90..b3e9ea8666 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -35,9 +35,6 @@ from setuptools.dist import SetupRequirementsError -SETUPTOOLS_IMPLEMENTATION_REVISION = 0.1 - - def _run_setup(setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later From c292a995eaa090c88c2d3edab6716cdb77629e42 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 09:41:09 +0200 Subject: [PATCH 6774/8469] Remove meaningless commend --- setuptools/tests/test_sdist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f34068dcd3..f84c57dc4b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -42,7 +42,6 @@ LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' -# Cannot use context manager because of Python 2.4 @contextlib.contextmanager def quiet(): old_stdout, old_stderr = sys.stdout, sys.stderr From b8936cee54cc023ba6c6081e03e0425bce20b1f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 15:01:39 +0200 Subject: [PATCH 6775/8469] Use natural byte literals in test_sdist --- setuptools/tests/test_sdist.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f84c57dc4b..1b5422f4f6 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -41,6 +41,8 @@ else: LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' +utf_8_filename = LATIN1_FILENAME.decode('latin-1').encode('utf-8') + @contextlib.contextmanager def quiet(): @@ -52,17 +54,10 @@ def quiet(): sys.stdout, sys.stderr = old_stdout, old_stderr -# Fake byte literals for Python <= 2.5 -def b(s, encoding='utf-8'): - if six.PY3: - return s.encode(encoding) - return s - - # Convert to POSIX path def posix(path): if six.PY3 and not isinstance(path, str): - return path.replace(os.sep.encode('ascii'), b('/')) + return path.replace(os.sep.encode('ascii'), b'/') else: return path.replace(os.sep, '/') @@ -200,8 +195,7 @@ def test_write_manifest_allows_utf8_filenames(self): mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') os.mkdir('sdist_test.egg-info') - # UTF-8 filename - filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + filename = os.path.join(b'sdist_test', utf_8_filename) # Must touch the file or risk removal open(filename, "w").close() @@ -240,7 +234,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): os.mkdir('sdist_test.egg-info') # Latin-1 filename - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', LATIN1_FILENAME) # Add filename with surrogates and write manifest with quiet(): @@ -274,10 +268,10 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.run() # Add UTF-8 filename to manifest - filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + filename = os.path.join(b'sdist_test', utf_8_filename) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n') + filename) + manifest.write(b'\n' + filename) manifest.close() # The file must exist to be included in the filelist @@ -306,10 +300,10 @@ def test_read_manifest_skips_non_utf8_filenames(self): cmd.run() # Add Latin-1 filename to manifest - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', LATIN1_FILENAME) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') - manifest.write(b('\n') + filename) + manifest.write(b'\n' + filename) manifest.close() # The file must exist to be included in the filelist @@ -333,7 +327,7 @@ def test_sdist_with_utf8_encoded_filename(self): cmd.ensure_finalized() # UTF-8 filename - filename = os.path.join(b('sdist_test'), b('smörbröd.py')) + filename = os.path.join(b'sdist_test', utf_8_filename) open(filename, 'w').close() with quiet(): @@ -367,7 +361,7 @@ def test_sdist_with_latin1_encoded_filename(self): cmd.ensure_finalized() # Latin-1 filename - filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', LATIN1_FILENAME) open(filename, 'w').close() assert os.path.isfile(filename) From 1c00a900c9aba25d6369cf9312997434ad68b9b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 15:03:47 +0200 Subject: [PATCH 6776/8469] Collapse encoding detection --- setuptools/tests/test_sdist.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 1b5422f4f6..5cb63c4b5d 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -374,10 +374,9 @@ def test_sdist_with_latin1_encoded_filename(self): # Latin-1 is similar to Windows-1252 however # on mbcs filesys it is not in latin-1 encoding fs_enc = sys.getfilesystemencoding() - if fs_enc == 'mbcs': - filename = filename.decode('mbcs') - else: - filename = filename.decode('latin-1') + if fs_enc != 'mbcs': + fs_enc = 'latin-1' + filename = filename.decode(fs_enc) assert filename in cmd.filelist.files else: From 5e6d72b852229750d00023885a6ce6149060d08a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 15:04:25 +0200 Subject: [PATCH 6777/8469] Feed the hobgoblins (delint). --- setuptools/tests/test_sdist.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 5cb63c4b5d..e7fc71e3b0 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -128,8 +128,8 @@ def test_package_data_in_sdist(self): def test_defaults_case_sensitivity(self): """ - Make sure default files (README.*, etc.) are added in a case-sensitive - way to avoid problems with packages built on Windows. + Make sure default files (README.*, etc.) are added in a case-sensitive + way to avoid problems with packages built on Windows. """ open(os.path.join(self.temp_dir, 'readme.rst'), 'w').close() @@ -146,7 +146,9 @@ def test_defaults_case_sensitivity(self): with quiet(): cmd.run() - # lowercase all names so we can test in a case-insensitive way to make sure the files are not included + # lowercase all names so we can test in a + # case-insensitive way to make sure the files + # are not included. manifest = map(lambda x: x.lower(), cmd.filelist.files) assert 'readme.rst' not in manifest, manifest assert 'setup.py' not in manifest, manifest From a85c59d34bbb232fc110714dc3aeb3c823a6f3cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 15:30:09 +0200 Subject: [PATCH 6778/8469] Expect failure on macOS 10.13 and other operating systems where writing latin-1 encoded filenames is prohibited. Fixes #1169. --- setuptools/tests/test_sdist.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index e7fc71e3b0..3b9a3b945c 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -80,6 +80,21 @@ def read_all_bytes(filename): return fp.read() +def latin1_fail(): + try: + desc, filename = tempfile.mkstemp(suffix=LATIN1_FILENAME) + os.close(desc) + os.remove(filename) + except Exception: + return True + + +fail_on_latin1_encoded_filenames = pytest.mark.xfail( + latin1_fail(), + reason="System does not support latin-1 filenames", +) + + class TestSdistTest: def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() @@ -290,6 +305,7 @@ def test_manifest_is_read_with_utf8_encoding(self): assert filename in cmd.filelist.files @py3_only + @fail_on_latin1_encoded_filenames def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -321,6 +337,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): assert filename not in cmd.filelist.files @fail_on_ascii + @fail_on_latin1_encoded_filenames def test_sdist_with_utf8_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) @@ -355,6 +372,7 @@ def test_sdist_with_utf8_encoded_filename(self): else: assert filename in cmd.filelist.files + @fail_on_latin1_encoded_filenames def test_sdist_with_latin1_encoded_filename(self): # Test for #303. dist = Distribution(SETUP_ATTRS) From ba46991d7cd488d682e80bb0e69964c4ed6c3303 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Oct 2017 15:36:45 +0200 Subject: [PATCH 6779/8469] Move filename fixtures to a 'text' module so they can use unicode literals. --- setuptools/tests/test_sdist.py | 23 ++++++++--------------- setuptools/tests/text.py | 9 +++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 setuptools/tests/text.py diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 3b9a3b945c..02222da5a6 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -19,6 +19,7 @@ from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution from setuptools.tests import fail_on_ascii +from .text import Filenames py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") @@ -36,13 +37,6 @@ setup(**%r) """ % SETUP_ATTRS -if six.PY3: - LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1') -else: - LATIN1_FILENAME = 'sm\xf6rbr\xf6d.py' - -utf_8_filename = LATIN1_FILENAME.decode('latin-1').encode('utf-8') - @contextlib.contextmanager def quiet(): @@ -82,7 +76,7 @@ def read_all_bytes(filename): def latin1_fail(): try: - desc, filename = tempfile.mkstemp(suffix=LATIN1_FILENAME) + desc, filename = tempfile.mkstemp(suffix=Filenames.latin_1) os.close(desc) os.remove(filename) except Exception: @@ -212,7 +206,7 @@ def test_write_manifest_allows_utf8_filenames(self): mm.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') os.mkdir('sdist_test.egg-info') - filename = os.path.join(b'sdist_test', utf_8_filename) + filename = os.path.join(b'sdist_test', Filenames.utf_8) # Must touch the file or risk removal open(filename, "w").close() @@ -251,7 +245,7 @@ def test_write_manifest_skips_non_utf8_filenames(self): os.mkdir('sdist_test.egg-info') # Latin-1 filename - filename = os.path.join(b'sdist_test', LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', Filenames.latin_1) # Add filename with surrogates and write manifest with quiet(): @@ -285,7 +279,7 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.run() # Add UTF-8 filename to manifest - filename = os.path.join(b'sdist_test', utf_8_filename) + filename = os.path.join(b'sdist_test', Filenames.utf_8) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') manifest.write(b'\n' + filename) @@ -318,7 +312,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): cmd.run() # Add Latin-1 filename to manifest - filename = os.path.join(b'sdist_test', LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', Filenames.latin_1) cmd.manifest = os.path.join('sdist_test.egg-info', 'SOURCES.txt') manifest = open(cmd.manifest, 'ab') manifest.write(b'\n' + filename) @@ -345,8 +339,7 @@ def test_sdist_with_utf8_encoded_filename(self): cmd = sdist(dist) cmd.ensure_finalized() - # UTF-8 filename - filename = os.path.join(b'sdist_test', utf_8_filename) + filename = os.path.join(b'sdist_test', Filenames.utf_8) open(filename, 'w').close() with quiet(): @@ -381,7 +374,7 @@ def test_sdist_with_latin1_encoded_filename(self): cmd.ensure_finalized() # Latin-1 filename - filename = os.path.join(b'sdist_test', LATIN1_FILENAME) + filename = os.path.join(b'sdist_test', Filenames.latin_1) open(filename, 'w').close() assert os.path.isfile(filename) diff --git a/setuptools/tests/text.py b/setuptools/tests/text.py new file mode 100644 index 0000000000..ad2c6249b5 --- /dev/null +++ b/setuptools/tests/text.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + + +class Filenames: + unicode = 'smörbröd.py' + latin_1 = unicode.encode('latin-1') + utf_8 = unicode.encode('utf-8') From 4e5c1640ac88e227aa967b8bfe04ce26325f284f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 09:35:41 +0200 Subject: [PATCH 6780/8469] Move customized behavior for fetch_build_eggs into a specialized subclass of Distribution. --- setuptools/dist.py | 10 ---------- setuptools/pep517.py | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 1641469ea8..a2ca879516 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -30,14 +30,6 @@ __import__('pkg_resources.extern.packaging.version') -_skip_install_eggs = False - - -class SetupRequirementsError(BaseException): - def __init__(self, specifiers): - self.specifiers = specifiers - - def _get_unpatched(cls): warnings.warn("Do not call this function", DeprecationWarning) return get_unpatched(cls) @@ -340,8 +332,6 @@ def __init__(self, attrs=None): self.dependency_links = attrs.pop('dependency_links', []) assert_string_list(self, 'dependency_links', self.dependency_links) if attrs and 'setup_requires' in attrs: - if _skip_install_eggs: - raise SetupRequirementsError(attrs['setup_requires']) self.fetch_build_eggs(attrs['setup_requires']) for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): vars(self).setdefault(ep.name, None) diff --git a/setuptools/pep517.py b/setuptools/pep517.py index b3e9ea8666..54f2987bf2 100644 --- a/setuptools/pep517.py +++ b/setuptools/pep517.py @@ -30,9 +30,35 @@ import sys import tokenize import shutil +import contextlib -from setuptools import dist -from setuptools.dist import SetupRequirementsError +import setuptools +import distutils + + +class SetupRequirementsError(BaseException): + def __init__(self, specifiers): + self.specifiers = specifiers + + +class Distribution(setuptools.dist.Distribution): + def fetch_build_eggs(self, specifiers): + raise SetupRequirementsError(specifiers) + + @classmethod + @contextlib.contextmanager + def patch(cls): + """ + Replace + distutils.dist.Distribution with this class + for the duration of this context. + """ + orig = distutils.core.Distribution + distutils.core.Distribution = cls + try: + yield + finally: + distutils.core.Distribution = orig def _run_setup(setup_script='setup.py'): @@ -54,17 +80,15 @@ def _fix_config(config_settings): def _get_build_requires(config_settings): config_settings = _fix_config(config_settings) requirements = ['setuptools', 'wheel'] - dist._skip_install_eggs = True sys.argv = sys.argv[:1] + ['egg_info'] + \ config_settings["--global-option"] try: - _run_setup() + with Distribution.patch(): + _run_setup() except SetupRequirementsError as e: requirements += e.specifiers - dist._skip_install_eggs = False - return requirements From fa5f1be3b6cc13db5d6df9dfbe90542aad6bd3c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 09:43:21 +0200 Subject: [PATCH 6781/8469] Clean up imports in test_pep517 to conform to PEP 8 standards. --- setuptools/tests/test_pep517.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index df4414a14a..adc155cc03 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -1,18 +1,15 @@ -import pytest import os +import contextlib +import tempfile -# Only test the backend on Python 3 -# because we don't want to require -# a concurrent.futures backport for testing -pytest.importorskip('concurrent.futures') +import pytest -from contextlib import contextmanager -from importlib import import_module -from tempfile import mkdtemp -from concurrent.futures import ProcessPoolExecutor from .files import build_files from .textwrap import DALS -from . import contexts + + +futures = pytest.importorskip('concurrent.futures') +importlib = pytest.importorskip('importlib') class BuildBackendBase(object): @@ -26,7 +23,7 @@ class BuildBackend(BuildBackendBase): """PEP 517 Build Backend""" def __init__(self, *args, **kwargs): super(BuildBackend, self).__init__(*args, **kwargs) - self.pool = ProcessPoolExecutor() + self.pool = futures.ProcessPoolExecutor() def __getattr__(self, name): """Handles aribrary function invocations on the build backend.""" @@ -44,10 +41,11 @@ def __call__(self, name, *args, **kw): """Handles aribrary function invocations on the build backend.""" os.chdir(self.cwd) os.environ.update(self.env) - return getattr(import_module(self.backend_name), name)(*args, **kw) + mod = importlib.import_module(self.backend_name) + return getattr(mod, name)(*args, **kw) -@contextmanager +@contextlib.contextmanager def enter_directory(dir, val=None): original_dir = os.getcwd() os.chdir(dir) @@ -57,7 +55,7 @@ def enter_directory(dir, val=None): @pytest.fixture def build_backend(): - tmpdir = mkdtemp() + tmpdir = tempfile.mkdtemp() with enter_directory(tmpdir): setup_script = DALS(""" from setuptools import setup @@ -87,6 +85,7 @@ def test_get_requires_for_build_wheel(build_backend): assert list(sorted(b.get_requires_for_build_wheel())) == \ list(sorted(['six', 'setuptools', 'wheel'])) + def test_build_wheel(build_backend): with build_backend as b: dist_dir = os.path.abspath('pip-wheel') @@ -104,6 +103,7 @@ def test_build_sdist(build_backend): assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + def test_prepare_metadata_for_build_wheel(build_backend): with build_backend as b: dist_dir = os.path.abspath('pip-dist-info') From 9a42fe5cbc5fa73d528547a918586647f2122140 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 09:53:13 +0200 Subject: [PATCH 6782/8469] Use pytest tmpdir fixture for simplicity. --- setuptools/tests/test_pep517.py | 69 +++++++++++++-------------------- 1 file changed, 28 insertions(+), 41 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index adc155cc03..07b5aadab2 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -45,19 +45,9 @@ def __call__(self, name, *args, **kw): return getattr(mod, name)(*args, **kw) -@contextlib.contextmanager -def enter_directory(dir, val=None): - original_dir = os.getcwd() - os.chdir(dir) - yield val - os.chdir(original_dir) - - @pytest.fixture -def build_backend(): - tmpdir = tempfile.mkdtemp() - with enter_directory(tmpdir): - setup_script = DALS(""" +def build_backend(tmpdir): + setup_script = DALS(""" from setuptools import setup setup( @@ -68,48 +58,45 @@ def build_backend(): zip_safe=False, ) """) - - build_files({ - 'setup.py': setup_script, - 'hello.py': DALS(""" - def run(): - print('hello') - """) - }) - - return enter_directory(tmpdir, BuildBackend(cwd='.')) + defn = { + 'setup.py': setup_script, + 'hello.py': DALS(""" + def run(): + print('hello') + """) + } + build_files(defn, prefix=str(tmpdir)) + with tmpdir.as_cwd(): + yield BuildBackend(cwd='.') def test_get_requires_for_build_wheel(build_backend): - with build_backend as b: - assert list(sorted(b.get_requires_for_build_wheel())) == \ - list(sorted(['six', 'setuptools', 'wheel'])) + b = build_backend + assert list(sorted(b.get_requires_for_build_wheel())) == \ + list(sorted(['six', 'setuptools', 'wheel'])) def test_build_wheel(build_backend): - with build_backend as b: - dist_dir = os.path.abspath('pip-wheel') - os.makedirs(dist_dir) - wheel_name = b.build_wheel(dist_dir) + dist_dir = os.path.abspath('pip-wheel') + os.makedirs(dist_dir) + wheel_name = build_backend.build_wheel(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, wheel_name)) + assert os.path.isfile(os.path.join(dist_dir, wheel_name)) def test_build_sdist(build_backend): - with build_backend as b: - dist_dir = os.path.abspath('pip-sdist') - os.makedirs(dist_dir) - sdist_name = b.build_sdist(dist_dir) + dist_dir = os.path.abspath('pip-sdist') + os.makedirs(dist_dir) + sdist_name = build_backend.build_sdist(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) def test_prepare_metadata_for_build_wheel(build_backend): - with build_backend as b: - dist_dir = os.path.abspath('pip-dist-info') - os.makedirs(dist_dir) + dist_dir = os.path.abspath('pip-dist-info') + os.makedirs(dist_dir) - dist_info = b.prepare_metadata_for_build_wheel(dist_dir) + dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, dist_info, - 'METADATA')) + assert os.path.isfile(os.path.join(dist_dir, dist_info, + 'METADATA')) From f8e6e7204394dd37e0c3f16230427189f50bb4b0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 09:54:56 +0200 Subject: [PATCH 6783/8469] Extract variables in test for clarity. --- setuptools/tests/test_pep517.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 07b5aadab2..af963037b6 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -71,9 +71,9 @@ def run(): def test_get_requires_for_build_wheel(build_backend): - b = build_backend - assert list(sorted(b.get_requires_for_build_wheel())) == \ - list(sorted(['six', 'setuptools', 'wheel'])) + actual = build_backend.get_requires_for_build_wheel() + expected = ['six', 'setuptools', 'wheel'] + assert sorted(actual) == sorted(expected) def test_build_wheel(build_backend): From 9cb2bcb48ed11ba2b3f0ee21b506adebb5622f59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 09:56:14 +0200 Subject: [PATCH 6784/8469] Remove unused imports --- setuptools/tests/test_pep517.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index af963037b6..5998f1f2ff 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -1,6 +1,4 @@ import os -import contextlib -import tempfile import pytest From 720ba1011686a7dc6bfa29490a9316ba73f4e020 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:04:02 +0200 Subject: [PATCH 6785/8469] Inline setup.py for consistency. --- setuptools/tests/test_pep517.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 5998f1f2ff..71644b4aeb 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -45,23 +45,22 @@ def __call__(self, name, *args, **kw): @pytest.fixture def build_backend(tmpdir): - setup_script = DALS(""" - from setuptools import setup - - setup( - name='foo', - py_modules=['hello'], - setup_requires=['six'], - entry_points={'console_scripts': ['hi = hello.run']}, - zip_safe=False, - ) - """) defn = { - 'setup.py': setup_script, + 'setup.py': DALS(""" + from setuptools import setup + + setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + entry_points={'console_scripts': ['hi = hello.run']}, + zip_safe=False, + ) + """), 'hello.py': DALS(""" def run(): print('hello') - """) + """), } build_files(defn, prefix=str(tmpdir)) with tmpdir.as_cwd(): From 6cc792288fb7fdcb257b427c6b94b770b9149308 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:05:25 +0200 Subject: [PATCH 6786/8469] Remove apparently irrelevant details. --- setuptools/tests/test_pep517.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 71644b4aeb..12c86fa547 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -53,8 +53,6 @@ def build_backend(tmpdir): name='foo', py_modules=['hello'], setup_requires=['six'], - entry_points={'console_scripts': ['hi = hello.run']}, - zip_safe=False, ) """), 'hello.py': DALS(""" From 35d77eb73fe9a91b49f7b73d84092036680282c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:06:48 +0200 Subject: [PATCH 6787/8469] Use shorthand for conciseness. --- setuptools/tests/test_pep517.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index 12c86fa547..dd32572dbf 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -47,9 +47,7 @@ def __call__(self, name, *args, **kw): def build_backend(tmpdir): defn = { 'setup.py': DALS(""" - from setuptools import setup - - setup( + __import__('setuptools').setup( name='foo', py_modules=['hello'], setup_requires=['six'], From 3e8bb3bcc17f349a20bf70c2678a154d8ff693b6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:09:52 +0200 Subject: [PATCH 6788/8469] Reindent for nicer lines --- setuptools/tests/test_pep517.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index dd32572dbf..fa6628ec30 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -26,10 +26,9 @@ def __init__(self, *args, **kwargs): def __getattr__(self, name): """Handles aribrary function invocations on the build backend.""" def method(*args, **kw): - return self.pool.submit( - BuildBackendCaller(os.path.abspath(self.cwd), self.env, - self.backend_name), - name, *args, **kw).result() + root = os.path.abspath(self.cwd) + caller = BuildBackendCaller(root, self.env, self.backend_name) + return self.pool.submit(caller, name, *args, **kw).result() return method @@ -91,5 +90,4 @@ def test_prepare_metadata_for_build_wheel(build_backend): dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, dist_info, - 'METADATA')) + assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) From 5a0f4b9784a35e514f53ea08adb29d999f511cac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:14:43 +0200 Subject: [PATCH 6789/8469] Renamed 'pep517' to 'build_meta' --- setuptools/{pep517.py => build_meta.py} | 0 setuptools/tests/{test_pep517.py => test_build_meta.py} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename setuptools/{pep517.py => build_meta.py} (100%) rename setuptools/tests/{test_pep517.py => test_build_meta.py} (99%) diff --git a/setuptools/pep517.py b/setuptools/build_meta.py similarity index 100% rename from setuptools/pep517.py rename to setuptools/build_meta.py diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_build_meta.py similarity index 99% rename from setuptools/tests/test_pep517.py rename to setuptools/tests/test_build_meta.py index fa6628ec30..69a700c2c1 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_build_meta.py @@ -11,7 +11,7 @@ class BuildBackendBase(object): - def __init__(self, cwd=None, env={}, backend_name='setuptools.pep517'): + def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): self.cwd = cwd self.env = env self.backend_name = backend_name From 8c385a127bdffd372f266f4fd4eb4fc134e132a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 10:16:28 +0200 Subject: [PATCH 6790/8469] Update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8130511e37..9b93efb43e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.6.0 +------- + +* #1143: Added ``setuptools.build_meta`` module, an implementation + of PEP-517 for Setuptools-defined packages. + v36.4.0 ------- From aa2e8aaea3e466025230b1956f62b0839529e27f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 11:23:37 +0200 Subject: [PATCH 6791/8469] Update changelog regarding dist_info command. Ref #1143. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index aa61e1cdc4..3dbda9dc4b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ v36.6.0 * #1143: Added ``setuptools.build_meta`` module, an implementation of PEP-517 for Setuptools-defined packages. +* #1143: Added ``dist_info`` command for producing dist_info + metadata. + v36.5.0 ------- From cb9e3a35bfc07136c44d942698fc45fc3f12192b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 11:25:55 +0200 Subject: [PATCH 6792/8469] =?UTF-8?q?Bump=20version:=2036.5.0=20=E2=86=92?= =?UTF-8?q?=2036.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e5ebf4b8df..c1ee1ba495 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.5.0 +current_version = 36.6.0 commit = True tag = True diff --git a/setup.py b/setup.py index ee968d9a89..33003465a1 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.5.0", + version="36.6.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 75b870b9a6233338f24841e86df88f03697f71f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 12:40:53 +0200 Subject: [PATCH 6793/8469] Feed the hobgoblins (delint). --- pkg_resources/__init__.py | 72 +++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 049b8a5458..66d54ca8d2 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -480,8 +480,10 @@ def get_build_platform(): try: version = _macosx_vers() machine = os.uname()[4].replace(" ", "_") - return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]), - _macosx_arch(machine)) + return "macosx-%d.%d-%s" % ( + int(version[0]), int(version[1]), + _macosx_arch(machine), + ) except ValueError: # if someone is running a non-Mac darwin system, this will fall # through to the default implementation @@ -806,7 +808,8 @@ def resolve(self, requirements, env=None, installer=None, already-installed distribution; it should return a ``Distribution`` or ``None``. - Unless `replace_conflicting=True`, raises a VersionConflict exception if + Unless `replace_conflicting=True`, raises a VersionConflict exception + if any requirements are found on the path that have the correct name but the wrong version. Otherwise, if an `installer` is supplied it will be invoked to obtain the correct version of the requirement and activate @@ -885,8 +888,8 @@ def resolve(self, requirements, env=None, installer=None, # return list of distros to activate return to_activate - def find_plugins(self, plugin_env, full_env=None, installer=None, - fallback=True): + def find_plugins( + self, plugin_env, full_env=None, installer=None, fallback=True): """Find all activatable distributions in `plugin_env` Example usage:: @@ -1040,7 +1043,8 @@ def markers_pass(self, req, extras=None): class Environment(object): """Searchable snapshot of distributions on a search path""" - def __init__(self, search_path=None, platform=get_supported_platform(), + def __init__( + self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR): """Snapshot distributions available on a search path @@ -1113,7 +1117,8 @@ def add(self, dist): dists.append(dist) dists.sort(key=operator.attrgetter('hashcmp'), reverse=True) - def best_match(self, req, working_set, installer=None, replace_conflicting=False): + def best_match( + self, req, working_set, installer=None, replace_conflicting=False): """Find distribution best matching `req` and usable on `working_set` This calls the ``find(req)`` method of the `working_set` to see if a @@ -1248,8 +1253,8 @@ def extraction_error(self): tmpl = textwrap.dedent(""" Can't extract file(s) to egg cache - The following error occurred while trying to extract file(s) to the Python egg - cache: + The following error occurred while trying to extract file(s) + to the Python egg cache: {old_exc} @@ -1257,9 +1262,9 @@ def extraction_error(self): {cache_path} - Perhaps your account does not have write access to this directory? You can - change the cache directory by setting the PYTHON_EGG_CACHE environment - variable to point to an accessible directory. + Perhaps your account does not have write access to this directory? + You can change the cache directory by setting the PYTHON_EGG_CACHE + environment variable to point to an accessible directory. """).lstrip() err = ExtractionError(tmpl.format(**locals())) err.manager = self @@ -1309,11 +1314,13 @@ def _warn_unsafe_extraction_path(path): return mode = os.stat(path).st_mode if mode & stat.S_IWOTH or mode & stat.S_IWGRP: - msg = ("%s is writable by group/others and vulnerable to attack " + msg = ( + "%s is writable by group/others and vulnerable to attack " "when " "used with get_resource_filename. Consider a more secure " "location (set with .set_extraction_path or the " - "PYTHON_EGG_CACHE environment variable)." % path) + "PYTHON_EGG_CACHE environment variable)." % path + ) warnings.warn(msg, UserWarning) def postprocess(self, tempname, filename): @@ -1597,8 +1604,11 @@ def _get(self, path): @classmethod def _register(cls): - loader_cls = getattr(importlib_machinery, 'SourceFileLoader', - type(None)) + loader_cls = getattr( + importlib_machinery, + 'SourceFileLoader', + type(None), + ) register_loader_type(loader_cls, cls) @@ -1766,7 +1776,10 @@ def _extract_resource(self, manager, zip_path): if self._is_current(real_path, zip_path): return real_path - outf, tmpnam = _mkstemp(".$extract", dir=os.path.dirname(real_path)) + outf, tmpnam = _mkstemp( + ".$extract", + dir=os.path.dirname(real_path), + ) os.write(outf, self.loader.get_data(zip_path)) os.close(outf) utime(tmpnam, (timestamp, timestamp)) @@ -1972,7 +1985,8 @@ def find_eggs_in_zip(importer, path_item, only=False): for subitem in metadata.resource_listdir('/'): if _is_egg_path(subitem): subpath = os.path.join(path_item, subitem) - for dist in find_eggs_in_zip(zipimport.zipimporter(subpath), subpath): + dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) + for dist in dists: yield dist elif subitem.lower().endswith('.dist-info'): subpath = os.path.join(path_item, subitem) @@ -1981,7 +1995,6 @@ def find_eggs_in_zip(importer, path_item, only=False): yield Distribution.from_location(path_item, subitem, submeta) - register_finder(zipimport.zipimporter, find_eggs_in_zip) @@ -2527,7 +2540,8 @@ class Distribution(object): """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' - def __init__(self, location=None, metadata=None, project_name=None, + def __init__( + self, location=None, metadata=None, project_name=None, version=None, py_version=PY_MAJOR, platform=None, precedence=EGG_DIST): self.project_name = safe_name(project_name or 'Unknown') @@ -2803,7 +2817,8 @@ def insert_on(self, path, loc=None, replace=False): if replace: break else: - # don't modify path (even removing duplicates) if found and not replace + # don't modify path (even removing duplicates) if + # found and not replace return elif item == bdir and self.precedence == EGG_DIST: # if it's an .egg, give it precedence over its directory @@ -2900,7 +2915,10 @@ def _reload_version(self): class DistInfoDistribution(Distribution): - """Wrap an actual or potential sys.path entry w/metadata, .dist-info style""" + """ + Wrap an actual or potential sys.path entry + w/metadata, .dist-info style. + """ PKG_INFO = 'METADATA' EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])") @@ -2950,7 +2968,7 @@ def reqs_for_extra(extra): '.egg': Distribution, '.egg-info': EggInfoDistribution, '.dist-info': DistInfoDistribution, - } +} def issue_warning(*args, **kw): @@ -3035,7 +3053,8 @@ def __contains__(self, item): def __hash__(self): return self.__hash - def __repr__(self): return "Requirement.parse(%r)" % str(self) + def __repr__(self): + return "Requirement.parse(%r)" % str(self) @staticmethod def parse(s): @@ -3169,7 +3188,10 @@ def _initialize_master_working_set(): dist.activate(replace=False) for dist in working_set ) - add_activation_listener(lambda dist: dist.activate(replace=True), existing=False) + add_activation_listener( + lambda dist: dist.activate(replace=True), + existing=False, + ) working_set.entries = [] # match order list(map(working_set.add_entry, sys.path)) From d1f16fdd849264795bfa0a383581ac4ffefeec58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 22:08:53 +0200 Subject: [PATCH 6794/8469] Use simpler Requirement from packaging.requirements --- pkg_resources/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 66d54ca8d2..e103847376 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2392,7 +2392,9 @@ def __init__(self, name, module_name, attrs=(), extras=(), dist=None): self.name = name self.module_name = module_name self.attrs = tuple(attrs) - self.extras = Requirement.parse(("x[%s]" % ','.join(extras))).extras + ex_spec = "x[%s]" % ','.join(extras) + req = packaging.requirements.Requirement(ex_spec) + self.extras = tuple(req.extras) self.dist = dist def __str__(self): From 4ee5c6510006d384f9ddd444824367ccaf67f0c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 22:28:55 +0200 Subject: [PATCH 6795/8469] Remove unnecessary serialization/parsing of extras in EntryPoint.__init__. Fixes #1132. --- pkg_resources/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index e103847376..6f1071fb87 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2392,9 +2392,7 @@ def __init__(self, name, module_name, attrs=(), extras=(), dist=None): self.name = name self.module_name = module_name self.attrs = tuple(attrs) - ex_spec = "x[%s]" % ','.join(extras) - req = packaging.requirements.Requirement(ex_spec) - self.extras = tuple(req.extras) + self.extras = tuple(extras) self.dist = dist def __str__(self): From 4995726bbdc92ab1f4235dfc8b9ee08c9f365d3e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 12 Oct 2017 22:33:14 +0200 Subject: [PATCH 6796/8469] Update changelog. Ref #1132. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3dbda9dc4b..6b84c03f57 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.6.1 +------- + +* #1132: Removed redundant and costly serialization/parsing step + in ``EntryPoint.__init__``. + v36.6.0 ------- From 60270c2422caa7ed2b33a327c63a85395f7c23a8 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 13 Oct 2017 16:02:38 -0500 Subject: [PATCH 6797/8469] commands: dist_info: say something! The dist_info command did not say anything like other commands did. This gives some more helpful information. --- setuptools/command/dist_info.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py index c8dc659b11..c6c6dacb78 100644 --- a/setuptools/command/dist_info.py +++ b/setuptools/command/dist_info.py @@ -7,6 +7,7 @@ import shutil from distutils.core import Command +from distutils import log class dist_info(Command): @@ -28,10 +29,12 @@ def run(self): egg_info = self.get_finalized_command('egg_info') egg_info.run() dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info' + log.info("creating '{}'".format(os.path.abspath(dist_info_dir))) bdist_wheel = self.get_finalized_command('bdist_wheel') bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir) if self.egg_base: - shutil.move(dist_info_dir, os.path.join( - self.egg_base, dist_info_dir)) + destination = os.path.join(self.egg_base, dist_info_dir) + log.info("creating '{}'".format(os.path.abspath(destination))) + shutil.move(dist_info_dir, destination) From ffb2e6994a3405c2ab007ab9564bb02c9263eb6c Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 12:48:33 -0500 Subject: [PATCH 6798/8469] BUG: re-initialize the master working set In some cases (specifically when pip imports this module in a virtualenv), pkg_resources can already be imported, causing setuptools to load entry_points from an older version. Here, we re-initialize the master working set to fix the case where the entry points from an older setuptools are loaded. --- setuptools/build_meta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 54f2987bf2..365e24ee43 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -35,6 +35,8 @@ import setuptools import distutils +from pkg_resources import _initialize_master_working_set + class SetupRequirementsError(BaseException): def __init__(self, specifiers): @@ -64,6 +66,7 @@ def patch(cls): def _run_setup(setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later + _initialize_master_working_set() __file__ = setup_script f = getattr(tokenize, 'open', open)(__file__) code = f.read().replace('\\r\\n', '\\n') From e2e15d52473c52071d331b415bcf949f8e848a22 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 12:53:22 -0500 Subject: [PATCH 6799/8469] dist_info: create the egg_info in the same location This change is a small simplification that simply creates the egg_info directory in the egg_base location; it's a minor cleanup that results in some read and it helps with read-only directories (the egg_info directory is uncontrollable). --- setuptools/command/dist_info.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py index c6c6dacb78..28b88c8887 100644 --- a/setuptools/command/dist_info.py +++ b/setuptools/command/dist_info.py @@ -4,7 +4,6 @@ """ import os -import shutil from distutils.core import Command from distutils import log @@ -27,14 +26,10 @@ def finalize_options(self): def run(self): egg_info = self.get_finalized_command('egg_info') + egg_info.egg_base = self.egg_base egg_info.run() dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info' log.info("creating '{}'".format(os.path.abspath(dist_info_dir))) bdist_wheel = self.get_finalized_command('bdist_wheel') bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir) - - if self.egg_base: - destination = os.path.join(self.egg_base, dist_info_dir) - log.info("creating '{}'".format(os.path.abspath(destination))) - shutil.move(dist_info_dir, destination) From cf130d32a57eddc455b39295c09ac5758187e549 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 13:01:18 -0500 Subject: [PATCH 6800/8469] build_meta: print dist_info directories --- setuptools/build_meta.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 365e24ee43..99ca03390b 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -112,6 +112,8 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): dist_infos = [f for f in os.listdir(metadata_directory) if f.endswith('.dist-info')] + print(dist_infos) + assert len(dist_infos) == 1 return dist_infos[0] From 0e6c4aae4fac818bacefa4bcc7a378944299af86 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 13:10:49 -0500 Subject: [PATCH 6801/8469] dist_info: re-finalize the egg_info options --- setuptools/command/dist_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/command/dist_info.py b/setuptools/command/dist_info.py index 28b88c8887..c45258fa03 100644 --- a/setuptools/command/dist_info.py +++ b/setuptools/command/dist_info.py @@ -27,6 +27,7 @@ def finalize_options(self): def run(self): egg_info = self.get_finalized_command('egg_info') egg_info.egg_base = self.egg_base + egg_info.finalize_options() egg_info.run() dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info' log.info("creating '{}'".format(os.path.abspath(dist_info_dir))) From efc7b7b5fb61125b888a615d6ef4b1fca85332c0 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 13:12:47 -0500 Subject: [PATCH 6802/8469] FIX: revert changes --- setuptools/build_meta.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 99ca03390b..365e24ee43 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -112,8 +112,6 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): dist_infos = [f for f in os.listdir(metadata_directory) if f.endswith('.dist-info')] - print(dist_infos) - assert len(dist_infos) == 1 return dist_infos[0] From 1a37f5713e08a0320038ec4e5d2164f95a29abef Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 15 Oct 2017 13:28:32 -0500 Subject: [PATCH 6803/8469] FIX: setup the correct environment before loading setup.py --- setuptools/build_meta.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 365e24ee43..02ad91ccb6 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -68,10 +68,11 @@ def _run_setup(setup_script='setup.py'): # Correctness comes first, then optimization later _initialize_master_working_set() __file__ = setup_script + __name__ = '__main__' f = getattr(tokenize, 'open', open)(__file__) code = f.read().replace('\\r\\n', '\\n') f.close() - exec(compile(code, __file__, 'exec')) + exec(compile(code, __file__, 'exec'), locals()) def _fix_config(config_settings): From ca9d086aa03cc40ee9024ae933d623799ac0c841 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 15 Oct 2017 20:31:10 -0700 Subject: [PATCH 6804/8469] Include license file in the generated wheel package The wheel package format supports including the license file. This is done using the [metadata] section in the setup.cfg file. For additional information on this feature, see: https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file --- setup.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c1ee1ba495..8422a269ae 100755 --- a/setup.cfg +++ b/setup.cfg @@ -22,5 +22,7 @@ formats = zip [bdist_wheel] universal = 1 -[bumpversion:file:setup.py] +[metadata] +license_file = LICENSE +[bumpversion:file:setup.py] From 55e1b97a8a06956d60f7e441ebe46200efc775df Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 10:42:52 -0500 Subject: [PATCH 6805/8469] FIX: drop the more contraversial changes --- setuptools/build_meta.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 02ad91ccb6..f89f82d645 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -35,8 +35,6 @@ import setuptools import distutils -from pkg_resources import _initialize_master_working_set - class SetupRequirementsError(BaseException): def __init__(self, specifiers): @@ -66,7 +64,6 @@ def patch(cls): def _run_setup(setup_script='setup.py'): # Note that we can reuse our build directory between calls # Correctness comes first, then optimization later - _initialize_master_working_set() __file__ = setup_script __name__ = '__main__' f = getattr(tokenize, 'open', open)(__file__) From b05a6c5e42d85ee463e5c718ceb49f19b609beba Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 10:57:10 -0500 Subject: [PATCH 6806/8469] TST: add more for build_meta --- setuptools/tests/test_build_meta.py | 65 ++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 69a700c2c1..2516b7029a 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -42,22 +42,55 @@ def __call__(self, name, *args, **kw): return getattr(mod, name)(*args, **kw) -@pytest.fixture -def build_backend(tmpdir): - defn = { - 'setup.py': DALS(""" - __import__('setuptools').setup( - name='foo', - py_modules=['hello'], - setup_requires=['six'], - ) - """), - 'hello.py': DALS(""" - def run(): - print('hello') - """), - } - build_files(defn, prefix=str(tmpdir)) +defns = [{ + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }, + { + 'setup.py': DALS(""" + assert __name__ == '__main__' + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }, + { + 'setup.py': DALS(""" + variable = True + def function(): + return variable + assert variable + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }] + + +@pytest.fixture(scope="module", params=defns) +def build_backend(tmpdir, request): + build_files(request.param, prefix=str(tmpdir)) with tmpdir.as_cwd(): yield BuildBackend(cwd='.') From 1cceb2cb31e10826bd6bfb1cfacfe4996a99ae63 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 10:59:35 -0500 Subject: [PATCH 6807/8469] FIX: remove the --- setuptools/tests/test_build_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 2516b7029a..659c1a6587 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -88,7 +88,7 @@ def run(): }] -@pytest.fixture(scope="module", params=defns) +@pytest.fixture(params=defns) def build_backend(tmpdir, request): build_files(request.param, prefix=str(tmpdir)) with tmpdir.as_cwd(): From f2ad62e0543ea6dde2e91f08c0feed09fdd55724 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 20 Sep 2017 02:10:28 +0200 Subject: [PATCH 6808/8469] tests: fix easy_install test assertion --- setuptools/tests/test_easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c9d396f4e3..617ee48924 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -406,7 +406,7 @@ def test_setup_requires_overrides_version_conflict(self): lines = stdout.readlines() assert len(lines) > 0 - assert lines[-1].strip(), 'test_pkg' + assert lines[-1].strip() == 'test_pkg' def test_setup_requires_override_nspkg(self): """ From 472c79f95cc41a3e85d6b212347d6b006c9c3c26 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 14 Sep 2017 22:07:13 +0200 Subject: [PATCH 6809/8469] support `setup_requires` in setup.cfg --- setuptools/__init__.py | 22 ++++++- setuptools/dist.py | 40 ++++++------- setuptools/tests/test_dist.py | 1 + setuptools/tests/test_easy_install.py | 83 +++++++++++++++++++++++++-- 4 files changed, 118 insertions(+), 28 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 04f7674082..7da47fbed5 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -109,7 +109,27 @@ def _looks_like_package(path): find_packages = PackageFinder.find -setup = distutils.core.setup + +def _install_setup_requires(attrs): + # Note: do not use `setuptools.Distribution` directly, as + # our PEP 517 backend patch `distutils.core.Distribution`. + dist = distutils.core.Distribution(dict( + (k, v) for k, v in attrs.items() + if k in ('dependency_links', 'setup_requires') + )) + # Honor setup.cfg's options. + dist.parse_config_files(ignore_option_errors=True) + if dist.setup_requires: + dist.fetch_build_eggs(dist.setup_requires) + + +def setup(**attrs): + # Make sure we have any requirements needed to interpret 'attrs'. + _install_setup_requires(attrs) + return distutils.core.setup(**attrs) + +setup.__doc__ = distutils.core.setup.__doc__ + _Command = monkey.get_unpatched(distutils.core.Command) diff --git a/setuptools/dist.py b/setuptools/dist.py index a2ca879516..aa304500e8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -316,23 +316,19 @@ def __init__(self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} - _attrs_dict = attrs or {} - if 'features' in _attrs_dict or 'require_features' in _attrs_dict: + attrs = attrs or {} + if 'features' in attrs or 'require_features' in attrs: Feature.warn_deprecated() self.require_features = [] self.features = {} self.dist_files = [] - self.src_root = attrs and attrs.pop("src_root", None) + self.src_root = attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) - self.long_description_content_type = _attrs_dict.get( + self.long_description_content_type = attrs.get( 'long_description_content_type' ) - # Make sure we have any eggs needed to interpret 'attrs' - if attrs is not None: - self.dependency_links = attrs.pop('dependency_links', []) - assert_string_list(self, 'dependency_links', self.dependency_links) - if attrs and 'setup_requires' in attrs: - self.fetch_build_eggs(attrs['setup_requires']) + 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) @@ -427,14 +423,15 @@ def _clean_req(self, req): req.marker = None return req - def parse_config_files(self, filenames=None): + def parse_config_files(self, filenames=None, ignore_option_errors=False): """Parses configuration files from various levels and loads configuration. """ _Distribution.parse_config_files(self, filenames=filenames) - parse_configuration(self, self.command_options) + parse_configuration(self, self.command_options, + ignore_option_errors=ignore_option_errors) self._finalize_requires() def parse_command_line(self): @@ -497,19 +494,20 @@ def fetch_build_egg(self, req): """Fetch an egg needed for building""" from setuptools.command.easy_install import easy_install dist = self.__class__({'script_args': ['easy_install']}) - dist.parse_config_files() opts = dist.get_option_dict('easy_install') - keep = ( - 'find_links', 'site_dirs', 'index_url', 'optimize', - 'site_dirs', 'allow_hosts' - ) - for key in list(opts): - if key not in keep: - del opts[key] # don't use any other settings + opts.clear() + opts.update( + (k, v) + for k, v in self.get_option_dict('easy_install').items() + if k in ( + # don't use any other settings + 'find_links', 'site_dirs', 'index_url', + 'optimize', 'site_dirs', 'allow_hosts', + )) if self.dependency_links: links = self.dependency_links[:] if 'find_links' in opts: - links = opts['find_links'][1].split() + links + links = opts['find_links'][1] + links opts['find_links'] = ('setup', links) install_dir = self.get_egg_cache_dir() cmd = easy_install( diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 435ffec0fb..c4c9bd0388 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -39,6 +39,7 @@ def sdist_with_index(distname, version): '''.split() with tmpdir.as_cwd(): dist = Distribution() + dist.parse_config_files() resolved_dists = [ dist.fetch_build_egg(r) for r in reqs diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 617ee48924..1d3390c567 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -381,7 +381,15 @@ def create_sdist(): """))]) yield dist_path - def test_setup_requires_overrides_version_conflict(self): + use_setup_cfg = ( + (), + ('dependency_links',), + ('setup_requires',), + ('dependency_links', 'setup_requires'), + ) + + @pytest.mark.parametrize('use_setup_cfg', use_setup_cfg) + def test_setup_requires_overrides_version_conflict(self, use_setup_cfg): """ Regression test for distribution issue 323: https://bitbucket.org/tarek/distribute/issues/323 @@ -397,7 +405,7 @@ def test_setup_requires_overrides_version_conflict(self): with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: - test_pkg = create_setup_requires_package(temp_dir) + test_pkg = create_setup_requires_package(temp_dir, use_setup_cfg=use_setup_cfg) test_setup_py = os.path.join(test_pkg, 'setup.py') with contexts.quiet() as (stdout, stderr): # Don't even need to install the package, just @@ -408,7 +416,8 @@ def test_setup_requires_overrides_version_conflict(self): assert len(lines) > 0 assert lines[-1].strip() == 'test_pkg' - def test_setup_requires_override_nspkg(self): + @pytest.mark.parametrize('use_setup_cfg', use_setup_cfg) + def test_setup_requires_override_nspkg(self, use_setup_cfg): """ Like ``test_setup_requires_overrides_version_conflict`` but where the ``setup_requires`` package is part of a namespace package that has @@ -446,7 +455,8 @@ def test_setup_requires_override_nspkg(self): """) test_pkg = create_setup_requires_package( - temp_dir, 'foo.bar', '0.2', make_nspkg_sdist, template) + temp_dir, 'foo.bar', '0.2', make_nspkg_sdist, template, + use_setup_cfg=use_setup_cfg) test_setup_py = os.path.join(test_pkg, 'setup.py') @@ -464,6 +474,38 @@ def test_setup_requires_override_nspkg(self): assert len(lines) > 0 assert lines[-1].strip() == 'test_pkg' + @pytest.mark.parametrize('use_setup_cfg', use_setup_cfg) + def test_setup_requires_with_attr_version(self, use_setup_cfg): + def make_dependency_sdist(dist_path, distname, version): + make_sdist(dist_path, [ + ('setup.py', + DALS(""" + import setuptools + setuptools.setup( + name={name!r}, + version={version!r}, + py_modules=[{name!r}], + ) + """.format(name=distname, version=version))), + (distname + '.py', + DALS(""" + version = 42 + """ + ))]) + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + test_pkg = create_setup_requires_package( + temp_dir, setup_attrs=dict(version='attr: foobar.version'), + make_package=make_dependency_sdist, + use_setup_cfg=use_setup_cfg+('version',), + ) + test_setup_py = os.path.join(test_pkg, 'setup.py') + with contexts.quiet() as (stdout, stderr): + run_setup(test_setup_py, ['--version']) + lines = stdout.readlines() + assert len(lines) > 0 + assert lines[-1].strip() == '42' + def make_trivial_sdist(dist_path, distname, version): """ @@ -532,7 +574,8 @@ def make_sdist(dist_path, files): def create_setup_requires_package(path, distname='foobar', version='0.1', make_package=make_trivial_sdist, - setup_py_template=None): + setup_py_template=None, setup_attrs={}, + use_setup_cfg=()): """Creates a source tree under path for a trivial test package that has a single requirement in setup_requires--a tarball for that requirement is also created and added to the dependency_links argument. @@ -547,11 +590,39 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', 'setup_requires': ['%s==%s' % (distname, version)], 'dependency_links': [os.path.abspath(path)] } + test_setup_attrs.update(setup_attrs) test_pkg = os.path.join(path, 'test_pkg') - test_setup_py = os.path.join(test_pkg, 'setup.py') os.mkdir(test_pkg) + if use_setup_cfg: + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + options = [] + metadata = [] + for name in use_setup_cfg: + value = test_setup_attrs.pop(name) + if name in 'name version'.split(): + section = metadata + else: + section = options + if isinstance(value, (tuple, list)): + value = ';'.join(value) + section.append('%s: %s' % (name, value)) + with open(test_setup_cfg, 'w') as f: + f.write(DALS( + """ + [metadata] + {metadata} + [options] + {options} + """ + ).format( + options='\n'.join(options), + metadata='\n'.join(metadata), + )) + + test_setup_py = os.path.join(test_pkg, 'setup.py') + if setup_py_template is None: setup_py_template = DALS("""\ import setuptools From ca5a81864d5fc3b6bcb1e9186a38e3fbc0d0beff Mon Sep 17 00:00:00 2001 From: xoviat Date: Thu, 19 Oct 2017 14:35:48 -0500 Subject: [PATCH 6810/8469] BUG: look for dist-infos in subdirectories This code is a bit ugly, but it's also been tested with the pip test suite It's not the best solution long term (the best solution is to get the egg_info directory directly from egg_info), but it works for now and avoids technical risk. --- setuptools/build_meta.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index f89f82d645..609ea1e510 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -93,6 +93,11 @@ def _get_build_requires(config_settings): return requirements +def _get_immediate_subdirectories(a_dir): + return [name for name in os.listdir(a_dir) + if os.path.isdir(os.path.join(a_dir, name))] + + def get_requires_for_build_wheel(config_settings=None): config_settings = _fix_config(config_settings) return _get_build_requires(config_settings) @@ -106,11 +111,29 @@ 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] _run_setup() + + dist_info_directory = metadata_directory + while True: + dist_infos = [f for f in os.listdir(dist_info_directory) + if f.endswith('.dist-info')] + + if len(dist_infos) == 0 and \ + len(_get_immediate_subdirectories(dist_info_directory)) == 1: + dist_info_directory = os.path.join( + dist_info_directory, os.listdir(dist_info_directory)[0]) + continue + + assert len(dist_infos) == 1 + break + + # PEP 517 requires that the .dist-info directory be placed in the + # metadata_directory. To comply, we MUST copy the directory to the root + if dist_info_directory != metadata_directory: + shutil.move( + os.path.join(dist_info_directory, dist_infos[0]), + metadata_directory) + shutil.rmtree(dist_info_directory, ignore_errors=True) - dist_infos = [f for f in os.listdir(metadata_directory) - if f.endswith('.dist-info')] - - assert len(dist_infos) == 1 return dist_infos[0] From cb0d6a91d8df8b4c70b95432ad33364181e49c33 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Oct 2017 10:09:37 -0400 Subject: [PATCH 6811/8469] Feed the hobgoblins (delint). --- setuptools/command/develop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 85b23c6080..959c932a5c 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -95,7 +95,9 @@ def _resolve_setup_path(egg_base, install_dir, egg_path): path_to_setup = egg_base.replace(os.sep, '/').rstrip('/') if path_to_setup != os.curdir: path_to_setup = '../' * (path_to_setup.count('/') + 1) - resolved = normalize_path(os.path.join(install_dir, egg_path, path_to_setup)) + resolved = normalize_path( + os.path.join(install_dir, egg_path, path_to_setup) + ) if resolved != normalize_path(os.curdir): raise DistutilsOptionError( "Can't get a consistent path to setup script from" From 9da60d4ae2727a61eb11bd7c6393567e0793d128 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Oct 2017 10:14:40 -0400 Subject: [PATCH 6812/8469] Shorten link for nicer indentation --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 8fba7b4115..71991efac1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1817,7 +1817,7 @@ def _update_zipimporter_cache(normalized_path, cache, updater=None): # get/del patterns instead. For more detailed information see the # following links: # https://github.com/pypa/setuptools/issues/202#issuecomment-202913420 - # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 + # http://bit.ly/2h9itJX old_entry = cache[p] del cache[p] new_entry = updater and updater(p, old_entry) From ada14dc9f376d9c325ad2eac8a20122b8da2c15e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Oct 2017 10:23:14 -0400 Subject: [PATCH 6813/8469] Feed the hobgoblins (delint). --- setuptools/command/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 4fe3bb5684..fe619e2e67 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,8 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', 'dist_info', + 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', + 'dist_info', ] from distutils.command.bdist import bdist From 3686dedb4bfbd0e6630c10119c8fe7af9369248e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 25 Oct 2017 17:50:22 +0200 Subject: [PATCH 6814/8469] add test to ensure `setup.cfg` interpolation behavior remain unchanged --- setuptools/tests/test_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cdfa5af43b..2494a0bc20 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -3,6 +3,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.dist import Distribution from setuptools.config import ConfigHandler, read_configuration +from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError class ErrConfigHandler(ConfigHandler): @@ -306,6 +307,15 @@ def test_classifiers(self, tmpdir): with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected + def test_interpolation(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'description = %(message)s\n' + ) + with pytest.raises(InterpolationMissingOptionError): + with get_dist(tmpdir): + pass class TestOptions: From 2c897b5b877d401e13b661f2a0a14e99a1aabdc8 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 25 Oct 2017 17:55:26 +0200 Subject: [PATCH 6815/8469] improve encoding handling for `setup.cfg` Support the same mechanism as for Python sources for declaring the encoding to be used when reading `setup.cfg` (see PEP 263), and return the results of reading it as Unicode. Fix #1062 and #1136. --- setuptools/__init__.py | 34 ++++++++++++++++ setuptools/dist.py | 2 +- setuptools/py36compat.py | 37 ++++++++++++------ setuptools/tests/test_config.py | 65 ++++++++++++++++++++++++++++++- setuptools/tests/test_egg_info.py | 46 ++++++++++++++++++++++ 5 files changed, 169 insertions(+), 15 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 04f7674082..77b4a37440 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -4,9 +4,12 @@ import functools import distutils.core import distutils.filelist +import re +from distutils.errors import DistutilsOptionError from distutils.util import convert_path from fnmatch import fnmatchcase +from setuptools.extern.six import string_types from setuptools.extern.six.moves import filter, map import setuptools.version @@ -127,6 +130,37 @@ def __init__(self, dist, **kw): _Command.__init__(self, dist) vars(self).update(kw) + def _ensure_stringlike(self, option, what, default=None): + val = getattr(self, option) + if val is None: + setattr(self, option, default) + return default + elif not isinstance(val, string_types): + raise DistutilsOptionError("'%s' must be a %s (got `%s`)" + % (option, what, val)) + return val + + def ensure_string_list(self, option): + r"""Ensure that 'option' is a list of strings. If 'option' is + currently a string, we split it either on /,\s*/ or /\s+/, so + "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become + ["foo", "bar", "baz"]. + """ + val = getattr(self, option) + if val is None: + return + elif isinstance(val, string_types): + setattr(self, option, re.split(r',\s*|\s+', val)) + else: + if isinstance(val, list): + ok = all(isinstance(v, string_types) for v in val) + else: + ok = False + if not ok: + raise DistutilsOptionError( + "'%s' must be a list of strings (got %r)" + % (option, val)) + def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) vars(cmd).update(kw) diff --git a/setuptools/dist.py b/setuptools/dist.py index a2ca879516..b10bd6f7e4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -432,7 +432,7 @@ def parse_config_files(self, filenames=None): and loads configuration. """ - _Distribution.parse_config_files(self, filenames=filenames) + Distribution_parse_config_files.parse_config_files(self, filenames=filenames) parse_configuration(self, self.command_options) self._finalize_requires() diff --git a/setuptools/py36compat.py b/setuptools/py36compat.py index f527969645..3d3c34ec50 100644 --- a/setuptools/py36compat.py +++ b/setuptools/py36compat.py @@ -1,7 +1,21 @@ +import io +import re import sys from distutils.errors import DistutilsOptionError from distutils.util import strtobool from distutils.debug import DEBUG +from setuptools.extern import six + + +CODING_RE = re.compile(br'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') + +def detect_encoding(fp): + first_line = fp.readline() + fp.seek(0) + m = CODING_RE.match(first_line) + if m is None: + return None + return m.group(1).decode('ascii') class Distribution_parse_config_files: @@ -13,10 +27,10 @@ class Distribution_parse_config_files: as implemented in distutils. """ def parse_config_files(self, filenames=None): - from configparser import ConfigParser + from setuptools.extern.six.moves.configparser import ConfigParser # Ignore install directory options if we have a venv - if sys.prefix != sys.base_prefix: + if six.PY3 and sys.prefix != sys.base_prefix: ignore_options = [ 'install-base', 'install-platbase', 'install-lib', 'install-platlib', 'install-purelib', 'install-headers', @@ -33,11 +47,16 @@ def parse_config_files(self, filenames=None): if DEBUG: self.announce("Distribution.parse_config_files():") - parser = ConfigParser(interpolation=None) + parser = ConfigParser() for filename in filenames: - if DEBUG: - self.announce(" reading %s" % filename) - parser.read(filename) + with io.open(filename, 'rb') as fp: + encoding = detect_encoding(fp) + if DEBUG: + self.announce(" reading %s [%s]" % ( + filename, encoding or 'locale') + ) + reader = io.TextIOWrapper(fp, encoding=encoding) + (parser.read_file if six.PY3 else parser.readfp)(reader) for section in parser.sections(): options = parser.options(section) opt_dict = self.get_option_dict(section) @@ -69,12 +88,6 @@ def parse_config_files(self, filenames=None): raise DistutilsOptionError(msg) -if sys.version_info < (3,): - # Python 2 behavior is sufficient - class Distribution_parse_config_files: - pass - - if False: # When updated behavior is available upstream, # disable override here. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 2494a0bc20..89fde257c2 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,9 +1,13 @@ +# -*- coding: UTF-8 -*- +from __future__ import unicode_literals + import contextlib import pytest from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.dist import Distribution from setuptools.config import ConfigHandler, read_configuration from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError +from setuptools.tests import is_ascii class ErrConfigHandler(ConfigHandler): @@ -17,7 +21,7 @@ def make_package_dir(name, base_dir): return dir_package, init_file -def fake_env(tmpdir, setup_cfg, setup_py=None): +def fake_env(tmpdir, setup_cfg, setup_py=None, encoding='ascii'): if setup_py is None: setup_py = ( @@ -27,7 +31,7 @@ def fake_env(tmpdir, setup_cfg, setup_py=None): tmpdir.join('setup.py').write(setup_py) config = tmpdir.join('setup.cfg') - config.write(setup_cfg) + config.write(setup_cfg.encode(encoding), mode='wb') package_dir, init_file = make_package_dir('fake_package', tmpdir) @@ -317,6 +321,63 @@ def test_interpolation(self, tmpdir): with get_dist(tmpdir): pass + skip_if_not_ascii = pytest.mark.skipif(not is_ascii, reason='Test not supported with this locale') + + @skip_if_not_ascii + def test_non_ascii_1(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'description = éàïôñ\n', + encoding='utf-8' + ) + with pytest.raises(UnicodeDecodeError): + with get_dist(tmpdir): + pass + + def test_non_ascii_2(self, tmpdir): + fake_env( + tmpdir, + '# -*- coding: invalid\n' + ) + with pytest.raises(LookupError): + with get_dist(tmpdir): + pass + + def test_non_ascii_3(self, tmpdir): + fake_env( + tmpdir, + '\n' + '# -*- coding: invalid\n' + ) + with get_dist(tmpdir): + pass + + @skip_if_not_ascii + def test_non_ascii_4(self, tmpdir): + fake_env( + tmpdir, + '# -*- coding: utf-8\n' + '[metadata]\n' + 'description = éàïôñ\n', + encoding='utf-8' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.description == 'éàïôñ' + + @skip_if_not_ascii + def test_non_ascii_5(self, tmpdir): + fake_env( + tmpdir, + '# vim: set fileencoding=iso-8859-15 :\n' + '[metadata]\n' + 'description = éàïôñ\n', + encoding='iso-8859-15' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.description == 'éàïôñ' + + class TestOptions: def test_basic(self, tmpdir): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1411f93c0d..5196f32e29 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -497,3 +497,49 @@ def __init__(self, files, base): # expect exactly one result result, = results return result + + EGG_INFO_TESTS = ( + # Check for issue #1136: invalid string type when + # reading declarative `setup.cfg` under Python 2. + { + 'setup.py': DALS( + """ + from setuptools import setup + setup( + name="foo", + ) + """), + 'setup.cfg': DALS( + """ + [options] + package_dir = + = src + """), + 'src': {}, + }, + # Check Unicode can be used in `setup.py` under Python 2. + { + 'setup.py': DALS( + """ + # -*- coding: utf-8 -*- + from __future__ import unicode_literals + from setuptools import setup, find_packages + setup( + name="foo", + package_dir={'': 'src'}, + ) + """), + 'src': {}, + } + ) + + @pytest.mark.parametrize('package_files', EGG_INFO_TESTS) + def test_egg_info(self, tmpdir_cwd, env, package_files): + """ + """ + build_files(package_files) + code, data = environment.run_setup_py( + cmd=['egg_info'], + data_stream=1, + ) + assert not code, data From 65cf5a85b0b59d3bab1f4b4e153557c6484ae825 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 25 Oct 2017 23:55:14 -0700 Subject: [PATCH 6816/8469] fixes bpo-31866: remove code pertaining to AtheOS support (#4115) We stop support this OS in 2007 with commit 19fab761b71a1687aee3415db3a937b5ce31975d. Let's finish. --- command/build_ext.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 7444565562..8fad9cdc2b 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -215,9 +215,9 @@ def finalize_options(self): new_lib = os.path.join(new_lib, suffix) self.library_dirs.append(new_lib) - # for extensions under Cygwin and AtheOS Python's library directory must be + # For extensions under Cygwin, Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.platform[:6] == 'cygwin': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -715,22 +715,6 @@ def get_libraries(self, ext): return ext.libraries + [pythonlib] else: return ext.libraries - elif sys.platform[:6] == "atheos": - from distutils import sysconfig - - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) - # Get SHLIBS from Makefile - extra = [] - for lib in sysconfig.get_config_var('SHLIBS').split(): - if lib.startswith('-l'): - extra.append(lib[2:]) - else: - extra.append(lib) - # don't extend ext.libraries, it may be shared with other - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib, "m"] + extra elif sys.platform == 'darwin': # Don't use the default code below return ext.libraries From 84093b78ec61ad47a2a0dea9f1be8d94fa0d485e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Jun 2017 16:32:43 +0200 Subject: [PATCH 6817/8469] fix `test` command when run with Python 2 When using Python 2, `python2 -m unittest` is not equivalent to `python2 -m unittest discover`. --- setuptools/command/test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 638d0c56e4..523407fde3 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -101,6 +101,8 @@ def test_args(self): return list(self._test_args()) def _test_args(self): + if not self.test_suite: + yield 'discover' if self.verbose: yield '--verbose' if self.test_suite: From dbff2e7ed421be9ec96029366479a8627691e7f3 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Jun 2017 16:33:36 +0200 Subject: [PATCH 6818/8469] fix `test` command running tests twice --- setuptools/command/test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 523407fde3..bfa7149615 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -18,6 +18,11 @@ class ScanningLoader(TestLoader): + + def __init__(self): + TestLoader.__init__(self) + self._visited = set() + def loadTestsFromModule(self, module, pattern=None): """Return a suite of all tests cases contained in the given module @@ -25,6 +30,10 @@ def loadTestsFromModule(self, module, pattern=None): If the module has an ``additional_tests`` function, call it and add the return value to the tests. """ + if module in self._visited: + return None + self._visited.add(module) + tests = [] tests.append(TestLoader.loadTestsFromModule(self, module)) @@ -101,7 +110,7 @@ def test_args(self): return list(self._test_args()) def _test_args(self): - if not self.test_suite: + if not self.test_suite and sys.version_info >= (2, 7): yield 'discover' if self.verbose: yield '--verbose' From b5d00314293e400bc72f3699e428f168ac74d824 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Jun 2017 17:58:09 +0200 Subject: [PATCH 6819/8469] tests: improve `test` command test - cleanup test: we're not installing, so no need to override the user site, or skip the test when run with a virtual environment - use pytest support for capturing output (`context.quiet` does not work with Python 2), and check the output --- setuptools/tests/test_test.py | 51 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 7ea43c5797..02cba00d86 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -2,9 +2,8 @@ from __future__ import unicode_literals +from distutils import log import os -import site -from distutils.errors import DistutilsError import pytest @@ -66,26 +65,28 @@ def sample_test(tmpdir_cwd): f.write(TEST_PY) -@pytest.mark.skipif('hasattr(sys, "real_prefix")') -@pytest.mark.usefixtures('user_override') -@pytest.mark.usefixtures('sample_test') -class TestTestTest: - def test_test(self): - params = dict( - name='foo', - packages=['name', 'name.space', 'name.space.tests'], - namespace_packages=['name'], - test_suite='name.space.tests.test_suite', - use_2to3=True, - ) - dist = Distribution(params) - dist.script_name = 'setup.py' - cmd = test(dist) - cmd.user = 1 - cmd.ensure_finalized() - cmd.install_dir = site.USER_SITE - cmd.user = 1 - with contexts.quiet(): - # The test runner calls sys.exit - with contexts.suppress_exceptions(SystemExit): - cmd.run() +@pytest.fixture +def silent_log(): + # Running some of the other tests will automatically + # change the log level to info, messing our output. + log.set_verbosity(0) + + +@pytest.mark.usefixtures('sample_test', 'silent_log') +def test_test(capfd): + params = dict( + name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + use_2to3=True, + ) + dist = Distribution(params) + dist.script_name = 'setup.py' + cmd = test(dist) + cmd.ensure_finalized() + # The test runner calls sys.exit + with contexts.suppress_exceptions(SystemExit): + cmd.run() + out, err = capfd.readouterr() + assert out == 'Foo\n' From 803707a68f228f452703333cbf75708938c2eb9e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Jun 2017 18:28:07 +0200 Subject: [PATCH 6820/8469] tests: check `test` command run tests only once --- setuptools/tests/test_test.py | 43 +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 02cba00d86..960527bcab 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -4,6 +4,7 @@ from distutils import log import os +import sys import pytest @@ -66,13 +67,13 @@ def sample_test(tmpdir_cwd): @pytest.fixture -def silent_log(): +def quiet_log(): # Running some of the other tests will automatically # change the log level to info, messing our output. log.set_verbosity(0) -@pytest.mark.usefixtures('sample_test', 'silent_log') +@pytest.mark.usefixtures('sample_test', 'quiet_log') def test_test(capfd): params = dict( name='foo', @@ -90,3 +91,41 @@ def test_test(capfd): cmd.run() out, err = capfd.readouterr() assert out == 'Foo\n' + + +@pytest.mark.xfail( + sys.version_info < (2, 7), + reason="No discover support for unittest on Python 2.6", +) +@pytest.mark.usefixtures('tmpdir_cwd', 'quiet_log') +def test_tests_are_run_once(capfd): + params = dict( + name='foo', + packages=['dummy'], + ) + with open('setup.py', 'wt') as f: + f.write('from setuptools import setup; setup(\n') + for k, v in sorted(params.items()): + f.write(' %s=%r,\n' % (k, v)) + f.write(')\n') + os.makedirs('dummy') + with open('dummy/__init__.py', 'wt'): + pass + with open('dummy/test_dummy.py', 'wt') as f: + f.write(DALS( + """ + from __future__ import print_function + import unittest + class TestTest(unittest.TestCase): + def test_test(self): + print('Foo') + """)) + dist = Distribution(params) + dist.script_name = 'setup.py' + cmd = test(dist) + cmd.ensure_finalized() + # The test runner calls sys.exit + with contexts.suppress_exceptions(SystemExit): + cmd.run() + out, err = capfd.readouterr() + assert out == 'Foo\n' From e630dfc9d761ef9d61df4eefe16de1368ebf3a42 Mon Sep 17 00:00:00 2001 From: Gerhard Weis Date: Thu, 9 Nov 2017 07:14:51 +1000 Subject: [PATCH 6821/8469] use ssl.create_default_context and SNI if available --- setuptools/ssl_support.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 72b18ef266..6362f1f426 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -186,9 +186,14 @@ def connect(self): else: actual_host = self.host - self.sock = ssl.wrap_socket( - sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle - ) + if hasattr(ssl, 'create_default_context'): + ctx = ssl.create_default_context(cafile=self.ca_bundle) + self.sock = ctx.wrap_socket(sock, server_hostname=actual_host) + else: + # This is for python < 2.7.9 and < 3.4? + self.sock = ssl.wrap_socket( + sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_bundle + ) try: match_hostname(self.sock.getpeercert(), actual_host) except CertificateError: From 50a9c568d04fda21590254e60a27227b9a6eb650 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 8 Nov 2017 14:44:44 -0800 Subject: [PATCH 6822/8469] Replace KB unit with KiB (#4293) kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB. --- cygwinccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 1c36990347..6c5d77746b 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -234,8 +234,8 @@ def link(self, target_desc, objects, output_filename, output_dir=None, # who wants symbols and a many times larger output file # should explicitly switch the debug mode on # otherwise we let dllwrap/ld strip the output file - # (On my machine: 10KB < stripped_file < ??100KB - # unstripped_file = stripped_file + XXX KB + # (On my machine: 10KiB < stripped_file < ??100KiB + # unstripped_file = stripped_file + XXX KiB # ( XXX=254 for a typical python extension)) if not debug: extra_preargs.append("-s") From 0830232c2c700f09bbd39b8cddc2a0828399e7e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 19:23:29 -0500 Subject: [PATCH 6823/8469] Unconditionally rename __pycache__ files if they exist. --- setuptools/command/bdist_egg.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 5bfc7ba221..f52c40d150 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -239,7 +239,6 @@ def run(self): def zap_pyfiles(self): log.info("Removing .py files from temporary directory") - py3 = sys.version_info >= (3, 0) re_pycache_file = re.compile('(.+)\.cpython-3\d(.pyc)$') for base, dirs, files in walk_egg(self.bdist_dir): for name in files: @@ -248,12 +247,12 @@ def zap_pyfiles(self): log.debug("Deleting %s", path) os.unlink(path) - if py3 and base.endswith('__pycache__'): + if base.endswith('__pycache__'): path_old = os.path.join(base, name) - + m = re_pycache_file.match(name) path_new = os.path.join(base, os.pardir, m.group(1) + m.group(2)) - log.info("Renaming Python 3 .pyc file from [%s] to [%s]" % (path_old, path_new)) + log.info("Renaming file from [%s] to [%s]" % (path_old, path_new)) if os.path.exists(path_new): os.unlink(path_new) os.rename(path_old, path_new) From 9a79433af7e66ee5c1f721a1803dad4873666e62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 19:30:56 -0500 Subject: [PATCH 6824/8469] Use named groups in the pattern --- setuptools/command/bdist_egg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index f52c40d150..14dd97d381 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -239,7 +239,6 @@ def run(self): def zap_pyfiles(self): log.info("Removing .py files from temporary directory") - re_pycache_file = re.compile('(.+)\.cpython-3\d(.pyc)$') for base, dirs, files in walk_egg(self.bdist_dir): for name in files: if name.endswith('.py'): @@ -250,8 +249,9 @@ def zap_pyfiles(self): if base.endswith('__pycache__'): path_old = os.path.join(base, name) - m = re_pycache_file.match(name) - path_new = os.path.join(base, os.pardir, m.group(1) + m.group(2)) + pattern = r'(?P.+)\.(?P[^.]+)\.pyc' + m = re.match(pattern, name) + path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc') log.info("Renaming file from [%s] to [%s]" % (path_old, path_new)) if os.path.exists(path_new): os.unlink(path_new) From 2676c5a277c5e571cdaeed64e5494315d5ec4c1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 19:34:54 -0500 Subject: [PATCH 6825/8469] Avoid check/act race condition --- setuptools/command/bdist_egg.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 14dd97d381..4e36c635e7 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -253,8 +253,10 @@ def zap_pyfiles(self): m = re.match(pattern, name) path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc') log.info("Renaming file from [%s] to [%s]" % (path_old, path_new)) - if os.path.exists(path_new): - os.unlink(path_new) + try: + os.remove(path_new) + except OSError: + pass os.rename(path_old, path_new) From 7874d4e0980265937b6957ba05805e00bacc0ed8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 19:36:07 -0500 Subject: [PATCH 6826/8469] Re-use path --- setuptools/command/bdist_egg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 4e36c635e7..5fdb62d905 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -241,13 +241,14 @@ def zap_pyfiles(self): log.info("Removing .py files from temporary directory") for base, dirs, files in walk_egg(self.bdist_dir): for name in files: + path = os.path.join(base, name) + if name.endswith('.py'): - path = os.path.join(base, name) log.debug("Deleting %s", path) os.unlink(path) if base.endswith('__pycache__'): - path_old = os.path.join(base, name) + path_old = path pattern = r'(?P.+)\.(?P[^.]+)\.pyc' m = re.match(pattern, name) From 2709afcea4b09157b27acf0bc151bd4c76347ce5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 19:54:49 -0500 Subject: [PATCH 6827/8469] Add test capturing expectation. Ref #1145. --- setuptools/tests/test_bdist_egg.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index d24aa366d4..61615b385c 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -2,6 +2,7 @@ """ import os import re +import zipfile import pytest @@ -16,7 +17,7 @@ """ -@pytest.yield_fixture +@pytest.fixture(scope='function') def setup_context(tmpdir): with (tmpdir / 'setup.py').open('w') as f: f.write(SETUP_PY) @@ -32,7 +33,7 @@ def test_bdist_egg(self, setup_context, user_override): script_name='setup.py', script_args=['bdist_egg'], name='foo', - py_modules=['hi'] + py_modules=['hi'], )) os.makedirs(os.path.join('build', 'src')) with contexts.quiet(): @@ -42,3 +43,20 @@ def test_bdist_egg(self, setup_context, user_override): # let's see if we got our egg link at the right place [content] = os.listdir('dist') assert re.match(r'foo-0.0.0-py[23].\d.egg$', content) + + def test_exclude_source_files(self, setup_context, user_override): + dist = Distribution(dict( + script_name='setup.py', + script_args=['bdist_egg', '--exclude-source-files'], + name='foo', + py_modules=['hi'], + )) + with contexts.quiet(): + dist.parse_command_line() + dist.run_commands() + [dist_name] = os.listdir('dist') + dist_filename = os.path.join('dist', dist_name) + zip = zipfile.ZipFile(dist_filename) + names = list(zi.filename for zi in zip.filelist) + assert 'hi.pyc' in names + assert 'hi.py' not in names From 4216b5f3fece69e3b74c646f72b8fe757b658729 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 20:21:11 -0500 Subject: [PATCH 6828/8469] Update changelog. Ref #1145. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 6b84c03f57..bea607865c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ v36.6.1 * #1132: Removed redundant and costly serialization/parsing step in ``EntryPoint.__init__``. +* #844: ``bdist_egg --exclude-source-files`` now tested and works + on Python 3. + v36.6.0 ------- From 4f43bd2a665a8115a03eb8d073cacb8945d22462 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 20:27:39 -0500 Subject: [PATCH 6829/8469] =?UTF-8?q?Bump=20version:=2036.6.0=20=E2=86=92?= =?UTF-8?q?=2036.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8422a269ae..7f8087826e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.6.0 +current_version = 36.6.1 commit = True tag = True @@ -26,3 +26,4 @@ universal = 1 license_file = LICENSE [bumpversion:file:setup.py] + diff --git a/setup.py b/setup.py index 33003465a1..c5bc72548a 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.6.0", + version="36.6.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 42f5ec91c131b8b24a330adb28b235aa432be98a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 20:43:33 -0500 Subject: [PATCH 6830/8469] Update changelog; ref #1150 --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 6b84c03f57..e3d82cc2c2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.7.0 +------- + +* #1054: Support ``setup_requires`` in ``setup.cfg`` files. + v36.6.1 ------- From d5f914876127d8ea60bc3f90d509fd0745f909f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 9 Nov 2017 20:46:12 -0500 Subject: [PATCH 6831/8469] =?UTF-8?q?Bump=20version:=2036.6.1=20=E2=86=92?= =?UTF-8?q?=2036.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7f8087826e..94dfbd620a 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.6.1 +current_version = 36.7.0 commit = True tag = True diff --git a/setup.py b/setup.py index c5bc72548a..389a805975 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.6.1", + version="36.7.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 57a09271dcd0840fb285495fe862aa42d9f9742c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Nov 2017 00:08:04 -0500 Subject: [PATCH 6832/8469] xfail test when byte code generation is disabled. Fixes #1193. --- CHANGES.rst | 6 ++++++ setuptools/tests/test_bdist_egg.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9341c92858..f17e79c972 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.7.1 +------- + +* #1193: Avoid test failures in bdist_egg when + PYTHONDONTWRITEBYTECODE is set. + v36.7.0 ------- diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 61615b385c..54742aa646 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -44,6 +44,10 @@ def test_bdist_egg(self, setup_context, user_override): [content] = os.listdir('dist') assert re.match(r'foo-0.0.0-py[23].\d.egg$', content) + @pytest.mark.xfail( + os.environ.get('PYTHONDONTWRITEBYTECODE'), + reason="Byte code disabled", + ) def test_exclude_source_files(self, setup_context, user_override): dist = Distribution(dict( script_name='setup.py', From c218b65053915aa084c897defa2a25a11175ddc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Nov 2017 00:26:58 -0500 Subject: [PATCH 6833/8469] =?UTF-8?q?Bump=20version:=2036.7.0=20=E2=86=92?= =?UTF-8?q?=2036.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 94dfbd620a..d1d94cdda3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.7.0 +current_version = 36.7.1 commit = True tag = True diff --git a/setup.py b/setup.py index 389a805975..2c4ba8407c 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.7.0", + version="36.7.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b4f2df191e0f9de47a71b3c9fba9f44447e017b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 Nov 2017 10:01:08 -0500 Subject: [PATCH 6834/8469] Update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 6b84c03f57..fcacd8ea0c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.6.2 +------- + +* #701: Fixed duplicate test discovery on Python 3. + v36.6.1 ------- From 5b6c8d3f49366a88210cef7ee5d9629637108a2b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 Nov 2017 10:03:34 -0500 Subject: [PATCH 6835/8469] =?UTF-8?q?Bump=20version:=2036.7.1=20=E2=86=92?= =?UTF-8?q?=2036.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d1d94cdda3..f064fcf915 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.7.1 +current_version = 36.7.2 commit = True tag = True diff --git a/setup.py b/setup.py index 2c4ba8407c..7148962af4 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.7.1", + version="36.7.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From fb1c2534662259bec479aff19cf49ae8781bdf9b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 Nov 2017 20:34:50 -0500 Subject: [PATCH 6836/8469] Update changelog. Ref #1175. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9b84cdc65f..9ca450318b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v36.7.3 +------- + +* #1175: Bug fixes to ``build_meta`` module. + v36.7.2 ------- From eb91a5e2491e231dc1094000dda6401cffb4747c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 13 Nov 2017 20:34:55 -0500 Subject: [PATCH 6837/8469] =?UTF-8?q?Bump=20version:=2036.7.2=20=E2=86=92?= =?UTF-8?q?=2036.7.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f064fcf915..850f576264 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.7.2 +current_version = 36.7.3 commit = True tag = True diff --git a/setup.py b/setup.py index 7148962af4..b5e7879bf1 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.7.2", + version="36.7.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 2ef955096db1999fb9caffe5d642dc2cefd2c1ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 Nov 2017 17:40:10 -0500 Subject: [PATCH 6838/8469] Update broken link. Fixes #1197. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a6363b1856..5dbb480588 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -382,7 +382,7 @@ def url_ok(self, url, fatal=False): if is_file or self.allows(urllib.parse.urlparse(url)[1]): return True msg = ("\nNote: Bypassing %s (disallowed host; see " - "http://bit.ly/1dg9ijs for details).\n") + "http://bit.ly/2hrImnY for details).\n") if fatal: raise DistutilsError(msg % url) else: From b27fc068fe8eb409851f3f92c1834e36073759c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 Nov 2017 17:45:18 -0500 Subject: [PATCH 6839/8469] Feed the hobgoblins (delint). --- setuptools/package_index.py | 41 +++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5dbb480588..e0aeb309d7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -141,7 +141,7 @@ def distros_for_filename(filename, metadata=None): def interpret_distro_name( location, basename, metadata, py_version=None, precedence=SOURCE_DIST, platform=None - ): +): """Generate alternative interpretations of a source distro name Note: if `location` is a filesystem filename, you should call @@ -292,7 +292,7 @@ class PackageIndex(Environment): def __init__( self, index_url="https://pypi.python.org/simple", hosts=('*',), ca_bundle=None, verify_ssl=True, *args, **kw - ): + ): Environment.__init__(self, *args, **kw) self.index_url = index_url + "/" [:not index_url.endswith('/')] self.scanned_urls = {} @@ -346,7 +346,8 @@ def process_url(self, url, retrieve=False): base = f.url # handle redirects page = f.read() - if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. + if not isinstance(page, str): + # In Python 3 and got bytes but want str. if isinstance(f, urllib.error.HTTPError): # Errors have no charset, assume latin1: charset = 'latin-1' @@ -381,7 +382,8 @@ def url_ok(self, url, fatal=False): is_file = s and s.group(1).lower() == 'file' if is_file or self.allows(urllib.parse.urlparse(url)[1]): return True - msg = ("\nNote: Bypassing %s (disallowed host; see " + msg = ( + "\nNote: Bypassing %s (disallowed host; see " "http://bit.ly/2hrImnY for details).\n") if fatal: raise DistutilsError(msg % url) @@ -500,15 +502,16 @@ def check_hash(self, checker, filename, tfp): """ checker is a ContentChecker """ - checker.report(self.debug, + checker.report( + self.debug, "Validating %%s checksum for %s" % filename) if not checker.is_valid(): tfp.close() os.unlink(filename) raise DistutilsError( "%s validation failed for %s; " - "possible download problem?" % ( - checker.hash.name, os.path.basename(filename)) + "possible download problem?" + % (checker.hash.name, os.path.basename(filename)) ) def add_find_links(self, urls): @@ -536,7 +539,8 @@ def not_found_in_index(self, requirement): if self[requirement.key]: # we've seen at least one distro meth, msg = self.info, "Couldn't retrieve index page for %r" else: # no distros seen for this name, might be misspelled - meth, msg = (self.warn, + meth, msg = ( + self.warn, "Couldn't find index page for %r (maybe misspelled?)") meth(msg, requirement.unsafe_name) self.scan_all() @@ -577,8 +581,7 @@ def download(self, spec, tmpdir): def fetch_distribution( self, requirement, tmpdir, force_scan=False, source=False, - develop_ok=False, local_index=None - ): + develop_ok=False, local_index=None): """Obtain a distribution suitable for fulfilling `requirement` `requirement` must be a ``pkg_resources.Requirement`` instance. @@ -609,12 +612,19 @@ def find(req, env=None): if dist.precedence == DEVELOP_DIST and not develop_ok: if dist not in skipped: - self.warn("Skipping development or system egg: %s", dist) + self.warn( + "Skipping development or system egg: %s", dist, + ) skipped[dist] = 1 continue - if dist in req and (dist.precedence <= SOURCE_DIST or not source): - dist.download_location = self.download(dist.location, tmpdir) + test = ( + dist in req + and (dist.precedence <= SOURCE_DIST or not source) + ) + if test: + loc = self.download(dist.location, tmpdir) + dist.download_location = loc if os.path.exists(dist.download_location): return dist @@ -704,7 +714,7 @@ def gen_setup(self, filename, fragment, tmpdir): def _download_to(self, url, filename): self.info("Downloading %s", url) # Download the file - fp, info = None, None + fp = None try: checker = HashChecker.from_url(url) fp = self.open_url(strip_fragment(url)) @@ -1103,7 +1113,8 @@ def local_open(url): f += '/' files.append('{name}'.format(name=f)) else: - tmpl = ("{url}" + tmpl = ( + "{url}" "{files}") body = tmpl.format(url=url, files='\n'.join(files)) status, message = 200, "OK" From 9d391e77e247e4718d94c3f6000d34832576d356 Mon Sep 17 00:00:00 2001 From: xdegaye Date: Sat, 18 Nov 2017 18:17:16 +0100 Subject: [PATCH 6840/8469] bpo-29185: Fix `test_distutils` failures on Android (GH-4438) * Run gzip with separate command line options (Android understands '-f9' as the name of a file). * Creation of a hard link is controled by SELinux on Android. --- tests/test_archive_util.py | 2 +- tests/test_file_util.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 02fa1e27a4..14ba4ca34b 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -162,7 +162,7 @@ def test_tarfile_vs_tar(self): # now create another tarball using `tar` tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist'] - gzip_cmd = ['gzip', '-f9', 'archive2.tar'] + gzip_cmd = ['gzip', '-f', '-9', 'archive2.tar'] old_dir = os.getcwd() os.chdir(tmpdir) try: diff --git a/tests/test_file_util.py b/tests/test_file_util.py index 03040afc79..a4e2d025f9 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -8,7 +8,7 @@ from distutils import log from distutils.tests import support from distutils.errors import DistutilsFileError -from test.support import run_unittest +from test.support import run_unittest, unlink class FileUtilTestCase(support.TempdirManager, unittest.TestCase): @@ -80,6 +80,14 @@ def test_move_file_exception_unpacking_unlink(self): def test_copy_file_hard_link(self): with open(self.source, 'w') as f: f.write('some content') + # Check first that copy_file() will not fall back on copying the file + # instead of creating the hard link. + try: + os.link(self.source, self.target) + except OSError as e: + self.skipTest('os.link: %s' % e) + else: + unlink(self.target) st = os.stat(self.source) copy_file(self.source, self.target, link='hard') st2 = os.stat(self.source) From c32594450b72762c999e3f825911713d659a2088 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Nov 2017 21:21:16 -0500 Subject: [PATCH 6841/8469] Update changelog. Ref #1190. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9ca450318b..65ab85bc6e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v36.8.0 +------- + +* #1190: In SSL support for package index operations, use SNI + where available. + v36.7.3 ------- From d1cef0c5aa0ca473d4b5fef6b11e5508a37663a2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Nov 2017 21:37:14 -0500 Subject: [PATCH 6842/8469] =?UTF-8?q?Bump=20version:=2036.7.3=20=E2=86=92?= =?UTF-8?q?=2036.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 850f576264..8da91de23c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.7.3 +current_version = 36.8.0 commit = True tag = True diff --git a/setup.py b/setup.py index b5e7879bf1..c6dfc79515 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.7.3", + version="36.8.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 2ed8ca16d5bb38a72baa96fe00596d402dec9eb0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 11:52:55 -0500 Subject: [PATCH 6843/8469] Reference to __main__ is only required for Python 2.6. --- setuptools/tests/test_develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index cb4ff4b401..ec67c798fd 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -169,7 +169,7 @@ def test_namespace_package_importable(self, tmpdir): install_cmd = [ sys.executable, '-m', - 'pip.__main__', + 'pip', 'install', str(pkg_A), '-t', str(target), From 4c6f629bb9c63c2208c3b03bb1e15a0d4e4731db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 11:54:44 -0500 Subject: [PATCH 6844/8469] Extract Python versions as top-level factors. --- .travis.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60f5815fd3..33ab283bf8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,20 @@ dist: trusty sudo: false language: python +python: +- 2.6 +- &latest_py2 2.7 +- 3.3 +- 3.4 +- 3.5 +- &latest_py3 3.6 +- nightly +- pypy +- pypy3 + jobs: fast_finish: true include: - - python: 2.6 - - python: &latest_py2 2.7 - - python: 3.3 - - python: 3.4 - - python: 3.5 - - python: &latest_py3 3.6 - - python: nightly - - python: pypy - - python: pypy3 - python: *latest_py3 env: LANG=C - python: *latest_py2 From c6fe76cbc22ac6ac64709a0381a6ce48a8c9884a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 12:22:49 -0500 Subject: [PATCH 6845/8469] Remove reference to Python 2.6 as a supported interpreter. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4b4b4fd8ba..dd5a5493cc 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # # To run Tox against all supported Python interpreters, you can set: # -# export TOXENV='py2{6,7},py3{3,4,5,6},pypy' +# export TOXENV='py27,py3{3,4,5,6},pypy' [testenv] deps=-rtests/requirements.txt From d51a696eb114bfe4e077b83b750a02282d4d8b47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 12:23:13 -0500 Subject: [PATCH 6846/8469] PyPy3 is supported --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4b4b4fd8ba..e8c1aca4dd 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # # To run Tox against all supported Python interpreters, you can set: # -# export TOXENV='py2{6,7},py3{3,4,5,6},pypy' +# export TOXENV='py2{6,7},py3{3,4,5,6},pypy,pypy3' [testenv] deps=-rtests/requirements.txt From 9edbd7e80fce13b1895c6932f70361285a65b84b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 13:07:30 -0500 Subject: [PATCH 6847/8469] Disable hanging test on PyPy3. Ref #1202. --- setuptools/tests/test_develop.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index cb4ff4b401..a0aaada5f8 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -8,6 +8,7 @@ import sys import io import subprocess +import platform from setuptools.extern import six from setuptools.command import test @@ -153,8 +154,14 @@ def install_develop(src_dir, target): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(develop_cmd) - @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851") + @pytest.mark.skipif( + bool(os.environ.get("APPVEYOR")), + reason="https://github.com/pypa/setuptools/issues/851", + ) + @pytest.mark.skipif( + platform.python_implementation() == 'PyPy' and six.PY3, + reason="https://github.com/pypa/setuptools/issues/1202", + ) def test_namespace_package_importable(self, tmpdir): """ Installing two packages sharing the same namespace, one installed From 45ec75beccba6432b3ed7b80fd84b65276453e9d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 13:10:04 -0500 Subject: [PATCH 6848/8469] Feed the hobgoblins (delint). --- setuptools/tests/test_develop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index a0aaada5f8..35ea14039f 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -62,7 +62,8 @@ class TestDevelop: in_virtualenv = hasattr(sys, 'real_prefix') in_venv = hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix - @pytest.mark.skipif(in_virtualenv or in_venv, + @pytest.mark.skipif( + in_virtualenv or in_venv, reason="Cannot run when invoked in a virtualenv or venv") def test_2to3_user_mode(self, test_env): settings = dict( @@ -102,7 +103,8 @@ def test_console_scripts(self, tmpdir): Test that console scripts are installed and that they reference only the project by name and not the current version. """ - pytest.skip("TODO: needs a fixture to cause 'develop' " + pytest.skip( + "TODO: needs a fixture to cause 'develop' " "to be invoked without mutating environment.") settings = dict( name='foo', From d45be2cc4f7a1e4ddc70b363baaa613c6b068b98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Nov 2017 13:12:25 -0500 Subject: [PATCH 6849/8469] =?UTF-8?q?Bump=20version:=2036.8.0=20=E2=86=92?= =?UTF-8?q?=2037.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8da91de23c..04dcfbf885 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 36.8.0 +current_version = 37.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 492b96d8b5..25d44de39a 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="36.8.0", + version="37.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 553e21e12ca2ebe6ab0f597e69594b71271faecc Mon Sep 17 00:00:00 2001 From: Henk-Jaap Wagenaar Date: Tue, 21 Nov 2017 22:16:53 +0000 Subject: [PATCH 6850/8469] Add setup.cfg support for long_description_content_type (in line with docs). --- setuptools/command/egg_info.py | 2 +- setuptools/dist.py | 7 +++++++ setuptools/tests/test_config.py | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a1d41b27da..27e10eeb32 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -598,7 +598,7 @@ def write_pkg_info(cmd, basename, filename): metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name metadata.long_description_content_type = getattr( - cmd.distribution, + cmd.distribution.metadata, 'long_description_content_type' ) try: diff --git a/setuptools/dist.py b/setuptools/dist.py index aa304500e8..48c7a45604 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -332,6 +332,13 @@ def __init__(self, attrs=None): for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): vars(self).setdefault(ep.name, None) _Distribution.__init__(self, attrs) + + try: + self.metadata.long_description_content_type + except AttributeError: + self.metadata.long_description_content_type = \ + self.long_description_content_type + if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cdfa5af43b..15b0cee10b 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -110,6 +110,7 @@ def test_basic(self, tmpdir): '[metadata]\n' 'version = 10.1.1\n' 'description = Some description\n' + 'long_description_content_type = text/something\n' 'long_description = file: README\n' 'name = fake_name\n' 'keywords = one, two\n' @@ -131,6 +132,7 @@ def test_basic(self, tmpdir): assert metadata.version == '10.1.1' assert metadata.description == 'Some description' + assert metadata.long_description_content_type == 'text/something' assert metadata.long_description == 'readme contents\nline2' assert metadata.provides == ['package', 'package.sub'] assert metadata.license == 'BSD 3-Clause License' From df2246449c271c07586bcecc3eaa36e9b0e94e3d Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 21 Nov 2017 00:48:44 +0000 Subject: [PATCH 6851/8469] Support PEP 345 Project-URL metadata By including one or more Project-URL entries in PKG-INFO metadata, PyPI can display helpful hyperlinks in a generic manner. Add support here to be able to pass it through setup.cfg and setup.py with a project_urls dict. See the corresponding section of the Core Metadata Specifications from the Python Packaging User Guide for details: https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use --- docs/setuptools.txt | 1 + setup.py | 5 +++++ setuptools/command/egg_info.py | 1 + setuptools/config.py | 2 ++ setuptools/dist.py | 11 ++++++++++- setuptools/tests/test_config.py | 16 ++++++++++++++++ setuptools/tests/test_egg_info.py | 30 ++++++++++++++++++++++++++++++ 7 files changed, 65 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index c2822c4f9e..e3154b469b 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2406,6 +2406,7 @@ name str version attr:, str url home-page str download_url download-url str +project_urls dict author str author_email author-email str maintainer str diff --git a/setup.py b/setup.py index 25d44de39a..7a05c718a9 100755 --- a/setup.py +++ b/setup.py @@ -98,6 +98,11 @@ def pypi_link(pkg_filename): long_description_content_type='text/x-rst; charset=UTF-8', keywords="CPAN PyPI distutils eggs package management", url="https://github.com/pypa/setuptools", + project_urls={ + "Bug Tracker": "https://github.com/pypa/setuptools/issues", + "Documentation": "http://setuptools.readthedocs.io/", + "Source Code": "https://github.com/pypa/setuptools", + }, src_root=None, packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a1d41b27da..c8b2bd173e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -597,6 +597,7 @@ def write_pkg_info(cmd, basename, filename): metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name + metadata.project_urls = cmd.distribution.metadata.project_urls metadata.long_description_content_type = getattr( cmd.distribution, 'long_description_content_type' diff --git a/setuptools/config.py b/setuptools/config.py index 5382844769..a70794a42e 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -404,6 +404,7 @@ def parsers(self): """Metadata item name to parser function mapping.""" parse_list = self._parse_list parse_file = self._parse_file + parse_dict = self._parse_dict return { 'platforms': parse_list, @@ -416,6 +417,7 @@ def parsers(self): 'description': parse_file, 'long_description': parse_file, 'version': self._parse_version, + 'project_urls': parse_dict, } def _parse_version(self, value): diff --git a/setuptools/dist.py b/setuptools/dist.py index aa304500e8..fa03cd27bc 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -44,7 +44,7 @@ def write_pkg_file(self, file): self.classifiers or self.download_url): version = '1.1' # Setuptools specific for PEP 345 - if hasattr(self, 'python_requires'): + if hasattr(self, 'python_requires') or self.project_urls: version = '1.2' file.write('Metadata-Version: %s\n' % version) @@ -57,6 +57,8 @@ def write_pkg_file(self, file): file.write('License: %s\n' % self.get_license()) if self.download_url: file.write('Download-URL: %s\n' % self.download_url) + for project_url in self.project_urls.items(): + file.write('Project-URL: %s, %s\n' % project_url) long_desc_content_type = getattr( self, @@ -327,11 +329,18 @@ def __init__(self, attrs=None): self.long_description_content_type = attrs.get( 'long_description_content_type' ) + 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) + if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) self.metadata.version = str(self.metadata.version) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cdfa5af43b..a69bca467c 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -215,6 +215,22 @@ def test_multiline(self, tmpdir): 'Programming Language :: Python :: 3.5', ] + def test_dict(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'project_urls =\n' + ' Link One = https://example.com/one/\n' + ' Link Two = https://example.com/two/\n' + ) + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.project_urls == { + 'Link One': 'https://example.com/one/', + 'Link Two': 'https://example.com/two/', + } + def test_version(self, tmpdir): _, config = fake_env( diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a97d0c84b0..e05498b84a 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -417,6 +417,36 @@ def test_long_description_content_type(self, tmpdir_cwd, env): expected_line = 'Description-Content-Type: text/markdown' assert expected_line in pkg_info_lines + def test_project_urls(self, tmpdir_cwd, env): + # Test that specifying a `project_urls` dict to the `setup` + # function results in writing multiple `Project-URL` lines to + # the `PKG-INFO` file in the `.egg-info` + # directory. + # `Project-URL` is described at https://packaging.python.org + # /specifications/core-metadata/#project-url-multiple-use + + self._setup_script_with_requires( + """project_urls={ + 'Link One': 'https://example.com/one/', + 'Link Two': 'https://example.com/two/', + },""") + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + code, data = environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + expected_line = 'Project-URL: Link One, https://example.com/one/' + assert expected_line in pkg_info_lines + expected_line = 'Project-URL: Link Two, https://example.com/two/' + assert expected_line in pkg_info_lines + def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( """python_requires='>=2.7.12',""") From 87e3be861e20d10e395cef7b549cd660b3dcab26 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Wed, 22 Nov 2017 20:40:01 +0100 Subject: [PATCH 6852/8469] Improved exception message of pkg_resources.ResolutionError --- pkg_resources/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c06cf4b1d8..62b82081b1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1513,7 +1513,9 @@ def metadata_listdir(self, name): def run_script(self, script_name, namespace): script = 'scripts/' + script_name if not self.has_metadata(script): - raise ResolutionError("No script named %r" % script_name) + raise ResolutionError( + "No script named %r in 'scripts' directory of metadata " + "directory %r" % (script_name, self.egg_info)) script_text = self.get_metadata(script).replace('\r\n', '\n') script_text = script_text.replace('\r', '\n') script_filename = self._fn(self.egg_info, script) From c644f6f0fd7b432b8ff18d03c9c646273774c75b Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 23 Nov 2017 21:34:20 +0300 Subject: [PATCH 6853/8469] bpo-19610: setup() now raises TypeError for invalid types (GH-4519) The Distribution class now explicitly raises an exception when 'classifiers', 'keywords' and 'platforms' fields are not specified as a list. --- dist.py | 26 ++++++++++++++++++++++++++ tests/test_dist.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/dist.py b/dist.py index 62a24516cf..78c29ede6c 100644 --- a/dist.py +++ b/dist.py @@ -1188,12 +1188,38 @@ def get_long_description(self): def get_keywords(self): return self.keywords or [] + def set_keywords(self, value): + # If 'keywords' is a string, it will be converted to a list + # by Distribution.finalize_options(). To maintain backwards + # compatibility, do not raise an exception if 'keywords' is + # a string. + if not isinstance(value, (list, str)): + msg = "'keywords' should be a 'list', not %r" + raise TypeError(msg % type(value).__name__) + self.keywords = value + def get_platforms(self): return self.platforms or ["UNKNOWN"] + def set_platforms(self, value): + # If 'platforms' is a string, it will be converted to a list + # by Distribution.finalize_options(). To maintain backwards + # compatibility, do not raise an exception if 'platforms' is + # a string. + if not isinstance(value, (list, str)): + msg = "'platforms' should be a 'list', not %r" + raise TypeError(msg % type(value).__name__) + self.platforms = value + def get_classifiers(self): return self.classifiers or [] + def set_classifiers(self, value): + if not isinstance(value, list): + msg = "'classifiers' should be a 'list', not %r" + raise TypeError(msg % type(value).__name__) + self.classifiers = value + def get_download_url(self): return self.download_url or "UNKNOWN" diff --git a/tests/test_dist.py b/tests/test_dist.py index 1f104cef67..50b456ec94 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -195,6 +195,13 @@ def test_finalize_options(self): self.assertEqual(dist.metadata.platforms, ['one', 'two']) self.assertEqual(dist.metadata.keywords, ['one', 'two']) + attrs = {'keywords': 'foo bar', + 'platforms': 'foo bar'} + dist = Distribution(attrs=attrs) + dist.finalize_options() + self.assertEqual(dist.metadata.platforms, ['foo bar']) + self.assertEqual(dist.metadata.keywords, ['foo bar']) + def test_get_command_packages(self): dist = Distribution() self.assertEqual(dist.command_packages, None) @@ -338,9 +345,46 @@ def test_classifier(self): attrs = {'name': 'Boa', 'version': '3.0', 'classifiers': ['Programming Language :: Python :: 3']} dist = Distribution(attrs) + self.assertEqual(dist.get_classifiers(), + ['Programming Language :: Python :: 3']) meta = self.format_metadata(dist) self.assertIn('Metadata-Version: 1.1', meta) + def test_classifier_invalid_type(self): + attrs = {'name': 'Boa', 'version': '3.0', + 'classifiers': ('Programming Language :: Python :: 3',)} + msg = "'classifiers' should be a 'list', not 'tuple'" + with self.assertRaises(TypeError, msg=msg): + Distribution(attrs) + + def test_keywords(self): + attrs = {'name': 'Monty', 'version': '1.0', + 'keywords': ['spam', 'eggs', 'life of brian']} + dist = Distribution(attrs) + self.assertEqual(dist.get_keywords(), + ['spam', 'eggs', 'life of brian']) + + def test_keywords_invalid_type(self): + attrs = {'name': 'Monty', 'version': '1.0', + 'keywords': ('spam', 'eggs', 'life of brian')} + msg = "'keywords' should be a 'list', not 'tuple'" + with self.assertRaises(TypeError, msg=msg): + Distribution(attrs) + + def test_platforms(self): + attrs = {'name': 'Monty', 'version': '1.0', + 'platforms': ['GNU/Linux', 'Some Evil Platform']} + dist = Distribution(attrs) + self.assertEqual(dist.get_platforms(), + ['GNU/Linux', 'Some Evil Platform']) + + def test_platforms_invalid_types(self): + attrs = {'name': 'Monty', 'version': '1.0', + 'platforms': ('GNU/Linux', 'Some Evil Platform')} + msg = "'platforms' should be a 'list', not 'tuple'" + with self.assertRaises(TypeError, msg=msg): + Distribution(attrs) + def test_download_url(self): attrs = {'name': 'Boa', 'version': '3.0', 'download_url': 'http://example.org/boa'} From 00de710988226c3189bd6abb13cfa87c7d97de5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 08:25:09 -0500 Subject: [PATCH 6854/8469] Fix NameError --- setuptools/command/egg_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a1d41b27da..103c5f20b9 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -640,7 +640,7 @@ def write_requirements(cmd, basename, filename): def write_setup_requirements(cmd, basename, filename): - data = StringIO() + data = io.StringIO() _write_requirements(data, cmd.distribution.setup_requires) cmd.write_or_delete_file("setup-requirements", filename, data.getvalue()) From 686895b17c4ebefcaa6066f5d34db7304cf1a33f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 08:50:25 -0500 Subject: [PATCH 6855/8469] Cleanup indentation --- setuptools/tests/test_egg_info.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a97d0c84b0..d4b79d63d3 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -191,7 +191,8 @@ def parametrize(*test_list, **format_dict): test_params = test.lstrip().split('\n\n', 3) name_kwargs = test_params.pop(0).split('\n') if len(name_kwargs) > 1: - install_cmd_kwargs = ast.literal_eval(name_kwargs[1].strip()) + val = name_kwargs[1].strip() + install_cmd_kwargs = ast.literal_eval(val) else: install_cmd_kwargs = {} name = name_kwargs[0].strip() @@ -211,9 +212,11 @@ def parametrize(*test_list, **format_dict): expected_requires, install_cmd_kwargs, marks=marks)) - return pytest.mark.parametrize('requires,use_setup_cfg,' - 'expected_requires,install_cmd_kwargs', - argvalues, ids=idlist) + return pytest.mark.parametrize( + 'requires,use_setup_cfg,' + 'expected_requires,install_cmd_kwargs', + argvalues, ids=idlist, + ) @RequiresTestHelper.parametrize( # Format of a test: @@ -361,9 +364,9 @@ def parametrize(*test_list, **format_dict): mismatch_marker=mismatch_marker, mismatch_marker_alternate=mismatch_marker_alternate, ) - def test_requires(self, tmpdir_cwd, env, - requires, use_setup_cfg, - expected_requires, install_cmd_kwargs): + def test_requires( + self, tmpdir_cwd, env, requires, use_setup_cfg, + expected_requires, install_cmd_kwargs): self._setup_script_with_requires(requires, use_setup_cfg) self._run_install_command(tmpdir_cwd, env, **install_cmd_kwargs) egg_info_dir = os.path.join('.', 'foo.egg-info') From 5ecd7575c9c09d4ec2d8f993c5fb405388c3f3c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:01:29 -0500 Subject: [PATCH 6856/8469] Add two tests demonstrating that requires.txt generation is deterministic. Ref #458. --- setuptools/tests/test_egg_info.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index d4b79d63d3..0810ee3bf0 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -230,6 +230,20 @@ def parametrize(*test_list, **format_dict): # # expected contents of requires.txt + ''' + install_requires_deterministic + + install_requires=["fake-factory==0.5.2", "pytz"] + + [options] + install_requires = + fake-factory==0.5.2 + pytz + + fake-factory==0.5.2 + pytz + ''', + ''' install_requires_with_marker From c461d5134f2aa89a4f6883f15bb84929b10f7ebf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:15:22 -0500 Subject: [PATCH 6857/8469] Add another test demonstrating that if requirements are declared in a non-deterministic order, they may appear in the metadata in non-deterministic order. Ref #458. --- setuptools/tests/test_egg_info.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 0810ee3bf0..774efb8655 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -244,6 +244,20 @@ def parametrize(*test_list, **format_dict): pytz ''', + ''' + install_requires_set_deterministic + + install_requires={{"fake-factory==0.5.2", "pytz"}} + + [options] + install_requires = + fake-factory==0.5.2 + pytz + + fake-factory==0.5.2 + pytz + ''', + ''' install_requires_with_marker From 45f6ce2afb10aed556fec33c16b765728133f59a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:37:29 -0500 Subject: [PATCH 6858/8469] Add test asserting that install_requires parameters cannot be unordered. Ref #458. --- setuptools/tests/test_egg_info.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 774efb8655..66ca9164d5 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -244,20 +244,6 @@ def parametrize(*test_list, **format_dict): pytz ''', - ''' - install_requires_set_deterministic - - install_requires={{"fake-factory==0.5.2", "pytz"}} - - [options] - install_requires = - fake-factory==0.5.2 - pytz - - fake-factory==0.5.2 - pytz - ''', - ''' install_requires_with_marker @@ -407,6 +393,17 @@ def test_requires( assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): + """ + Packages that pass unordered install_requires sequences + should be rejected as they produce non-deterministic + builds. See #458. + """ + req = 'install_requires={"fake-factory==0.5.2", "pytz"}' + self._setup_script_with_requires(req) + with pytest.raises(AssertionError): + self._run_install_command(tmpdir_cwd, env) + def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.invalid_marker) From f012485e4767f3be81493c93ad534a02c6f14f14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:45:05 -0500 Subject: [PATCH 6859/8469] Disallow unordered sequences for specifying install_requires. Fixes #458. --- CHANGES.rst | 7 +++++++ setuptools/dist.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f75bb62a4f..c8a3ecc3f6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v38.0.0 +------- + +* #458: In order to support deterministic builds, Setuptools no + longer allows packages to declare ``install_requires`` as + unordered sequences (sets or dicts). + v37.0.0 ------- diff --git a/setuptools/dist.py b/setuptools/dist.py index aa304500e8..477f93ddba 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -166,6 +166,8 @@ def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: list(pkg_resources.parse_requirements(value)) + if isinstance(value, (dict, set)): + raise TypeError("Unordered types are not allowed") except (TypeError, ValueError) as error: tmpl = ( "{attr!r} must be a string or list of strings " From c90ddcb846bec53761b1622b294e846786f875bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:48:11 -0500 Subject: [PATCH 6860/8469] =?UTF-8?q?Bump=20version:=2037.0.0=20=E2=86=92?= =?UTF-8?q?=2038.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 04dcfbf885..c06810df75 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 37.0.0 +current_version = 38.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 25d44de39a..845588d466 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="37.0.0", + version="38.0.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From b2e99f6731c6ba6fe6bd60f79f2166640f3db21d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 10:10:10 -0500 Subject: [PATCH 6861/8469] Shorten message and update changelog. Ref #1209. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c8a3ecc3f6..df91d99945 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.1.0 +------- + +* #1208: Improve error message when failing to locate scripts + in egg-info metadata. + v38.0.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 62b82081b1..73334641b5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1514,8 +1514,9 @@ def run_script(self, script_name, namespace): script = 'scripts/' + script_name if not self.has_metadata(script): raise ResolutionError( - "No script named %r in 'scripts' directory of metadata " - "directory %r" % (script_name, self.egg_info)) + "Script {script!r} not found in metadata at {self.egg_info!r}" + .format(**locals()), + ) script_text = self.get_metadata(script).replace('\r\n', '\n') script_text = script_text.replace('\r', '\n') script_filename = self._fn(self.egg_info, script) From 5bcd7f0328be56f96f76622acb3e188c16450354 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 10:20:51 -0500 Subject: [PATCH 6862/8469] HTTPS everywhere --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1c6ee60354..f754d96624 100755 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ :target: https://setuptools.readthedocs.io .. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20build%20%40%20Travis%20CI - :target: http://travis-ci.org/pypa/setuptools + :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 From dce4750aed2d5b0a4ba677b0e308cd10dca2f6ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 10:36:16 -0500 Subject: [PATCH 6863/8469] =?UTF-8?q?Bump=20version:=2038.0.0=20=E2=86=92?= =?UTF-8?q?=2038.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index c06810df75..39452fdeec 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.0.0 +current_version = 38.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 845588d466..052d7a1f53 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.0.0", + version="38.1.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 780a6f161ed4ce1026f5279c53c196d3bfdcec37 Mon Sep 17 00:00:00 2001 From: Henk-Jaap Wagenaar Date: Sat, 25 Nov 2017 18:55:58 +0000 Subject: [PATCH 6864/8469] Rework how to handle long_description_content_type --- setuptools/command/egg_info.py | 5 +---- setuptools/dist.py | 18 +++++------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 27e10eeb32..d3725a2f2a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -597,10 +597,7 @@ def write_pkg_info(cmd, basename, filename): metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name - metadata.long_description_content_type = getattr( - cmd.distribution.metadata, - 'long_description_content_type' - ) + try: # write unescaped data to PKG-INFO, so older pkg_resources # can still parse it diff --git a/setuptools/dist.py b/setuptools/dist.py index 48c7a45604..8148df9548 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -58,11 +58,8 @@ def write_pkg_file(self, file): if self.download_url: file.write('Download-URL: %s\n' % self.download_url) - long_desc_content_type = getattr( - self, - 'long_description_content_type', - None - ) or 'UNKNOWN' + long_desc_content_type = \ + self.long_description_content_type or 'UNKNOWN' file.write('Description-Content-Type: %s\n' % long_desc_content_type) long_desc = rfc822_escape(self.get_long_description()) @@ -324,20 +321,15 @@ def __init__(self, attrs=None): self.dist_files = [] self.src_root = attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) - self.long_description_content_type = attrs.get( - 'long_description_content_type' - ) 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) - try: - self.metadata.long_description_content_type - except AttributeError: - self.metadata.long_description_content_type = \ - self.long_description_content_type + self.metadata.long_description_content_type = attrs.get( + 'long_description_content_type' + ) if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) From 118edbb2b715c96620b51018c1d28e81f2318053 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 2 Nov 2017 21:19:39 +0100 Subject: [PATCH 6865/8469] easy_install: add support for installing from wheels Note: wheels are installed as eggs, so each install is self-contained and multiple versions of the same package can be installed at the same time. Limitations: - headers are not supported - resulting egg metadata requirements have their markers stripped --- setuptools/command/easy_install.py | 32 +++ setuptools/glibc.py | 86 ++++++ setuptools/package_index.py | 14 +- setuptools/pep425tags.py | 316 +++++++++++++++++++++ setuptools/tests/test_wheel.py | 430 +++++++++++++++++++++++++++++ setuptools/wheel.py | 125 +++++++++ tests/requirements.txt | 1 + 7 files changed, 1003 insertions(+), 1 deletion(-) create mode 100644 setuptools/glibc.py create mode 100644 setuptools/pep425tags.py create mode 100644 setuptools/tests/test_wheel.py create mode 100644 setuptools/wheel.py diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 71991efac1..12e223106c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -53,6 +53,7 @@ PackageIndex, parse_requirement_arg, URL_SCHEME, ) from setuptools.command import bdist_egg, egg_info +from setuptools.wheel import Wheel from pkg_resources import ( yield_lines, normalize_path, resource_string, ensure_directory, get_distribution, find_distributions, Environment, Requirement, @@ -842,6 +843,8 @@ def install_eggs(self, spec, dist_filename, tmpdir): return [self.install_egg(dist_filename, tmpdir)] elif dist_filename.lower().endswith('.exe'): return [self.install_exe(dist_filename, tmpdir)] + elif dist_filename.lower().endswith('.whl'): + return [self.install_wheel(dist_filename, tmpdir)] # Anything else, try to extract and build setup_base = tmpdir @@ -1038,6 +1041,35 @@ def process(src, dst): f.write('\n'.join(locals()[name]) + '\n') f.close() + def install_wheel(self, wheel_path, tmpdir): + wheel = Wheel(wheel_path) + assert wheel.is_compatible() + destination = os.path.join(self.install_dir, wheel.egg_name()) + destination = os.path.abspath(destination) + if not self.dry_run: + ensure_directory(destination) + if os.path.isdir(destination) and not os.path.islink(destination): + dir_util.remove_tree(destination, dry_run=self.dry_run) + elif os.path.exists(destination): + self.execute( + os.unlink, + (destination,), + "Removing " + destination, + ) + try: + self.execute( + wheel.install_as_egg, + (destination,), + ("Installing %s to %s") % ( + os.path.basename(wheel_path), + os.path.dirname(destination) + ), + ) + finally: + update_dist_caches(destination, fix_zipimporter_caches=False) + self.add_output(destination) + return self.egg_distribution(destination) + __mv_warning = textwrap.dedent(""" Because this distribution was installed --multi-version, before you can import modules from this package in an application, you will need to diff --git a/setuptools/glibc.py b/setuptools/glibc.py new file mode 100644 index 0000000000..a134591c30 --- /dev/null +++ b/setuptools/glibc.py @@ -0,0 +1,86 @@ +# This file originally from pip: +# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/utils/glibc.py +from __future__ import absolute_import + +import ctypes +import re +import warnings + + +def glibc_version_string(): + "Returns glibc version string, or None if not using glibc." + + # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen + # manpage says, "If filename is NULL, then the returned handle is for the + # main program". This way we can let the linker do the work to figure out + # which libc our process is actually using. + process_namespace = ctypes.CDLL(None) + try: + gnu_get_libc_version = process_namespace.gnu_get_libc_version + except AttributeError: + # Symbol doesn't exist -> therefore, we are not linked to + # glibc. + return None + + # Call gnu_get_libc_version, which returns a string like "2.5" + gnu_get_libc_version.restype = ctypes.c_char_p + version_str = gnu_get_libc_version() + # py2 / py3 compatibility: + if not isinstance(version_str, str): + version_str = version_str.decode("ascii") + + return version_str + + +# Separated out from have_compatible_glibc for easier unit testing +def check_glibc_version(version_str, required_major, minimum_minor): + # Parse string and check against requested version. + # + # We use a regexp instead of str.split because we want to discard any + # random junk that might come after the minor version -- this might happen + # in patched/forked versions of glibc (e.g. Linaro's version of glibc + # uses version strings like "2.20-2014.11"). See gh-3588. + m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) + if not m: + warnings.warn("Expected glibc version with 2 components major.minor," + " got: %s" % version_str, RuntimeWarning) + return False + return (int(m.group("major")) == required_major and + int(m.group("minor")) >= minimum_minor) + + +def have_compatible_glibc(required_major, minimum_minor): + version_str = glibc_version_string() + if version_str is None: + return False + return check_glibc_version(version_str, required_major, minimum_minor) + + +# platform.libc_ver regularly returns completely nonsensical glibc +# versions. E.g. on my computer, platform says: +# +# ~$ python2.7 -c 'import platform; print(platform.libc_ver())' +# ('glibc', '2.7') +# ~$ python3.5 -c 'import platform; print(platform.libc_ver())' +# ('glibc', '2.9') +# +# But the truth is: +# +# ~$ ldd --version +# ldd (Debian GLIBC 2.22-11) 2.22 +# +# This is unfortunate, because it means that the linehaul data on libc +# versions that was generated by pip 8.1.2 and earlier is useless and +# misleading. Solution: instead of using platform, use our code that actually +# works. +def libc_ver(): + """Try to determine the glibc version + + Returns a tuple of strings (lib, version) which default to empty strings + in case the lookup fails. + """ + glibc_version = glibc_version_string() + if glibc_version is None: + return ("", "") + else: + return ("glibc", glibc_version) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index fe2ef50fee..ad7433078e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -21,13 +21,14 @@ from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, Environment, find_distributions, safe_name, safe_version, - to_filename, Requirement, DEVELOP_DIST, + to_filename, Requirement, DEVELOP_DIST, EGG_DIST, ) from setuptools import ssl_support from distutils import log from distutils.errors import DistutilsError from fnmatch import translate from setuptools.py27compat import get_all_headers +from setuptools.wheel import Wheel EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$') HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I) @@ -115,6 +116,17 @@ def distros_for_location(location, basename, metadata=None): if basename.endswith('.egg') and '-' in basename: # only one, unambiguous interpretation return [Distribution.from_location(location, basename, metadata)] + if basename.endswith('.whl') and '-' in basename: + wheel = Wheel(basename) + if not wheel.is_compatible(): + return [] + return [Distribution( + location=location, + project_name=wheel.project_name, + version=wheel.version, + # Increase priority over eggs. + precedence=EGG_DIST + 1, + )] if basename.endswith('.exe'): win_base, py_ver, platform = parse_bdist_wininst(basename) if win_base is not None: diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py new file mode 100644 index 0000000000..dfe55d587a --- /dev/null +++ b/setuptools/pep425tags.py @@ -0,0 +1,316 @@ +# This file originally from pip: +# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/pep425tags.py +"""Generate and work with PEP 425 Compatibility Tags.""" +from __future__ import absolute_import + +import distutils.util +import platform +import re +import sys +import sysconfig +import warnings +from collections import OrderedDict + +from . import glibc + +_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)') + + +def get_config_var(var): + try: + return sysconfig.get_config_var(var) + except IOError as e: # Issue #1074 + warnings.warn("{}".format(e), RuntimeWarning) + return None + + +def get_abbr_impl(): + """Return abbreviated implementation name.""" + if hasattr(sys, 'pypy_version_info'): + pyimpl = 'pp' + elif sys.platform.startswith('java'): + pyimpl = 'jy' + elif sys.platform == 'cli': + pyimpl = 'ip' + else: + pyimpl = 'cp' + return pyimpl + + +def get_impl_ver(): + """Return implementation version.""" + impl_ver = get_config_var("py_version_nodot") + if not impl_ver or get_abbr_impl() == 'pp': + impl_ver = ''.join(map(str, get_impl_version_info())) + return impl_ver + + +def get_impl_version_info(): + """Return sys.version_info-like tuple for use in decrementing the minor + version.""" + if get_abbr_impl() == 'pp': + # as per https://github.com/pypa/pip/issues/2882 + return (sys.version_info[0], sys.pypy_version_info.major, + sys.pypy_version_info.minor) + else: + return sys.version_info[0], sys.version_info[1] + + +def get_impl_tag(): + """ + Returns the Tag for this specific implementation. + """ + return "{}{}".format(get_abbr_impl(), get_impl_ver()) + + +def get_flag(var, fallback, expected=True, warn=True): + """Use a fallback method for determining SOABI flags if the needed config + var is unset or unavailable.""" + 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) + return fallback() + return val == expected + + +def get_abi_tag(): + """Return the ABI tag based on SOABI (if available) or emulate SOABI + (CPython 2, PyPy).""" + soabi = get_config_var('SOABI') + impl = get_abbr_impl() + if not soabi and impl in {'cp', 'pp'} and hasattr(sys, 'maxunicode'): + d = '' + m = '' + u = '' + if get_flag('Py_DEBUG', + lambda: hasattr(sys, 'gettotalrefcount'), + warn=(impl == 'cp')): + d = 'd' + if get_flag('WITH_PYMALLOC', + lambda: impl == 'cp', + warn=(impl == 'cp')): + m = 'm' + if get_flag('Py_UNICODE_SIZE', + lambda: sys.maxunicode == 0x10ffff, + expected=4, + warn=(impl == 'cp' and + sys.version_info < (3, 3))) \ + and sys.version_info < (3, 3): + u = 'u' + abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u) + elif soabi and soabi.startswith('cpython-'): + abi = 'cp' + soabi.split('-')[1] + elif soabi: + abi = soabi.replace('.', '_').replace('-', '_') + else: + abi = None + return abi + + +def _is_running_32bit(): + return sys.maxsize == 2147483647 + + +def get_platform(): + """Return our platform name 'win32', 'linux_x86_64'""" + if sys.platform == 'darwin': + # distutils.util.get_platform() returns the release based on the value + # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may + # be significantly older than the user's current machine. + release, _, machine = platform.mac_ver() + split_ver = release.split('.') + + if machine == "x86_64" and _is_running_32bit(): + machine = "i386" + elif machine == "ppc64" and _is_running_32bit(): + machine = "ppc" + + return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine) + + # XXX remove distutils dependency + result = distutils.util.get_platform().replace('.', '_').replace('-', '_') + if result == "linux_x86_64" and _is_running_32bit(): + # 32 bit Python program (running on a 64 bit Linux): pip should only + # install and run 32 bit compiled extensions in that case. + result = "linux_i686" + + return result + + +def is_manylinux1_compatible(): + # Only Linux, and only x86-64 / i686 + if get_platform() not in {"linux_x86_64", "linux_i686"}: + return False + + # Check for presence of _manylinux module + try: + import _manylinux + return bool(_manylinux.manylinux1_compatible) + except (ImportError, AttributeError): + # Fall through to heuristic check below + pass + + # Check glibc version. CentOS 5 uses glibc 2.5. + return glibc.have_compatible_glibc(2, 5) + + +def get_darwin_arches(major, minor, machine): + """Return a list of supported arches (including group arches) for + the given major, minor and machine architecture of an macOS machine. + """ + arches = [] + + def _supports_arch(major, minor, arch): + # Looking at the application support for macOS versions in the chart + # provided by https://en.wikipedia.org/wiki/OS_X#Versions it appears + # our timeline looks roughly like: + # + # 10.0 - Introduces ppc support. + # 10.4 - Introduces ppc64, i386, and x86_64 support, however the ppc64 + # and x86_64 support is CLI only, and cannot be used for GUI + # applications. + # 10.5 - Extends ppc64 and x86_64 support to cover GUI applications. + # 10.6 - Drops support for ppc64 + # 10.7 - Drops support for ppc + # + # Given that we do not know if we're installing a CLI or a GUI + # application, we must be conservative and assume it might be a GUI + # application and behave as if ppc64 and x86_64 support did not occur + # until 10.5. + # + # Note: The above information is taken from the "Application support" + # column in the chart not the "Processor support" since I believe + # that we care about what instruction sets an application can use + # not which processors the OS supports. + if arch == 'ppc': + return (major, minor) <= (10, 5) + if arch == 'ppc64': + return (major, minor) == (10, 5) + if arch == 'i386': + return (major, minor) >= (10, 4) + if arch == 'x86_64': + return (major, minor) >= (10, 5) + if arch in groups: + for garch in groups[arch]: + if _supports_arch(major, minor, garch): + return True + return False + + groups = OrderedDict([ + ("fat", ("i386", "ppc")), + ("intel", ("x86_64", "i386")), + ("fat64", ("x86_64", "ppc64")), + ("fat32", ("x86_64", "i386", "ppc")), + ]) + + if _supports_arch(major, minor, machine): + arches.append(machine) + + for garch in groups: + if machine in groups[garch] and _supports_arch(major, minor, garch): + arches.append(garch) + + arches.append('universal') + + return arches + + +def get_supported(versions=None, noarch=False, platform=None, + impl=None, abi=None): + """Return a list of supported tags for each version specified in + `versions`. + + :param versions: a list of string versions, of the form ["33", "32"], + or None. The first version will be assumed to support our ABI. + :param platform: specify the exact platform you want valid + tags for, or None. If None, use the local system platform. + :param impl: specify the exact implementation you want valid + tags for, or None. If None, use the local interpreter impl. + :param abi: specify the exact abi you want valid + tags for, or None. If None, use the local interpreter abi. + """ + supported = [] + + # Versions must be given with respect to the preference + if versions is None: + versions = [] + version_info = get_impl_version_info() + major = version_info[:-1] + # Support all previous minor Python versions. + for minor in range(version_info[-1], -1, -1): + versions.append(''.join(map(str, major + (minor,)))) + + impl = impl or get_abbr_impl() + + abis = [] + + abi = abi or get_abi_tag() + if abi: + abis[0:0] = [abi] + + abi3s = set() + import imp + for suffix in imp.get_suffixes(): + if suffix[0].startswith('.abi'): + abi3s.add(suffix[0].split('.', 2)[1]) + + abis.extend(sorted(list(abi3s))) + + abis.append('none') + + if not noarch: + arch = platform or get_platform() + if arch.startswith('macosx'): + # support macosx-10.6-intel on macosx-10.9-x86_64 + match = _osx_arch_pat.match(arch) + if match: + name, major, minor, actual_arch = match.groups() + tpl = '{}_{}_%i_%s'.format(name, major) + arches = [] + for m in reversed(range(int(minor) + 1)): + for a in get_darwin_arches(int(major), m, actual_arch): + arches.append(tpl % (m, a)) + else: + # arch pattern didn't match (?!) + arches = [arch] + elif platform is None and is_manylinux1_compatible(): + arches = [arch.replace('linux', 'manylinux1'), arch] + else: + arches = [arch] + + # Current version, current API (built specifically for our Python): + for abi in abis: + for arch in arches: + supported.append(('%s%s' % (impl, versions[0]), abi, arch)) + + # abi3 modules compatible with older version of Python + for version in versions[1:]: + # abi3 was introduced in Python 3.2 + if version in {'31', '30'}: + break + for abi in abi3s: # empty set if not Python 3 + for arch in arches: + supported.append(("%s%s" % (impl, version), abi, arch)) + + # Has binaries, does not use the Python API: + for arch in arches: + supported.append(('py%s' % (versions[0][0]), 'none', arch)) + + # No abi / arch, but requires our implementation: + supported.append(('%s%s' % (impl, versions[0]), 'none', 'any')) + # Tagged specifically as being cross-version compatible + # (with just the major version specified) + supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any')) + + # No abi / arch, generic Python + for i, version in enumerate(versions): + supported.append(('py%s' % (version,), 'none', 'any')) + if i == 0: + supported.append(('py%s' % (version[0]), 'none', 'any')) + + return supported + + +implementation_tag = get_impl_tag() diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py new file mode 100644 index 0000000000..a0c16c5391 --- /dev/null +++ b/setuptools/tests/test_wheel.py @@ -0,0 +1,430 @@ +"""wheel tests +""" + +from distutils.sysconfig import get_config_var +from distutils.util import get_platform +import contextlib +import glob +import inspect +import os +import subprocess +import sys + +import pytest + +from pkg_resources import Distribution, PathMetadata, PY_MAJOR +from setuptools.wheel import Wheel + +from .contexts import tempdir +from .files import build_files +from .textwrap import DALS + + +WHEEL_INFO_TESTS = ( + ('invalid.whl', ValueError), + ('simplewheel-2.0-1-py2.py3-none-any.whl', { + 'project_name': 'simplewheel', + 'version': '2.0', + 'build': '1', + 'py_version': 'py2.py3', + 'abi': 'none', + 'platform': 'any', + }), + ('simple.dist-0.1-py2.py3-none-any.whl', { + 'project_name': 'simple.dist', + 'version': '0.1', + 'build': None, + 'py_version': 'py2.py3', + 'abi': 'none', + 'platform': 'any', + }), + ('example_pkg_a-1-py3-none-any.whl', { + 'project_name': 'example_pkg_a', + 'version': '1', + 'build': None, + 'py_version': 'py3', + 'abi': 'none', + 'platform': 'any', + }), + ('PyQt5-5.9-5.9.1-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl', { + 'project_name': 'PyQt5', + 'version': '5.9', + 'build': '5.9.1', + 'py_version': 'cp35.cp36.cp37', + 'abi': 'abi3', + 'platform': 'manylinux1_x86_64', + }), +) + +@pytest.mark.parametrize( + ('filename', 'info'), WHEEL_INFO_TESTS, + ids=[t[0] for t in WHEEL_INFO_TESTS] +) +def test_wheel_info(filename, info): + if inspect.isclass(info): + with pytest.raises(info): + Wheel(filename) + return + w = Wheel(filename) + assert {k: getattr(w, k) for k in info.keys()} == info + + +@contextlib.contextmanager +def build_wheel(extra_file_defs=None, **kwargs): + file_defs = { + 'setup.py': DALS( + ''' + from setuptools import setup + import setuptools + setup(**%r) + ''' + ) % kwargs, + } + if extra_file_defs: + file_defs.update(extra_file_defs) + with tempdir() as source_dir: + build_files(file_defs, source_dir) + subprocess.check_call((sys.executable, 'setup.py', + '-q', 'bdist_wheel'), cwd=source_dir) + yield glob.glob(os.path.join(source_dir, 'dist', '*.whl'))[0] + + +def tree(root): + def depth(path): + return len(path.split(os.path.sep)) + def prefix(path_depth): + if not path_depth: + return '' + return '| ' * (path_depth - 1) + '|-- ' + lines = [] + root_depth = depth(root) + for dirpath, dirnames, filenames in os.walk(root): + dirnames.sort() + filenames.sort() + dir_depth = depth(dirpath) - root_depth + if dir_depth > 0: + lines.append('%s%s/' % (prefix(dir_depth - 1), + os.path.basename(dirpath))) + for f in filenames: + lines.append('%s%s' % (prefix(dir_depth), f)) + return '\n'.join(lines) + '\n' + + +def _check_wheel_install(filename, install_dir, install_tree, + project_name, version, requires_txt): + w = Wheel(filename) + egg_path = os.path.join(install_dir, w.egg_name()) + w.install_as_egg(egg_path) + if install_tree is not None: + install_tree = install_tree.format( + py_version=PY_MAJOR, + platform=get_platform(), + shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO') + ) + assert install_tree == tree(install_dir) + metadata = PathMetadata(egg_path, os.path.join(egg_path, 'EGG-INFO')) + dist = Distribution.from_filename(egg_path, metadata=metadata) + assert dist.project_name == project_name + assert dist.version == version + if requires_txt is None: + assert not dist.has_metadata('requires.txt') + else: + assert requires_txt == dist.get_metadata('requires.txt').lstrip() + + +class Record(object): + + def __init__(self, id, **kwargs): + self._id = id + self._fields = kwargs + + def __repr__(self): + return '%s(**%r)' % (self._id, self._fields) + + +WHEEL_INSTALL_TESTS = ( + + dict( + id='basic', + file_defs={ + 'foo': { + '__init__.py': '' + } + }, + setup_kwargs=dict( + packages=['foo'], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + |-- foo/ + | |-- __init__.py + ''' + ), + ), + + dict( + id='data', + file_defs={ + 'data.txt': DALS( + ''' + Some data... + ''' + ), + }, + setup_kwargs=dict( + data_files=[('data_dir', ['data.txt'])], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + |-- data_dir/ + | |-- data.txt + ''' + ), + ), + + dict( + id='extension', + file_defs={ + 'extension.c': DALS( + ''' + #include "Python.h" + + #if PY_MAJOR_VERSION >= 3 + + static struct PyModuleDef moduledef = { + PyModuleDef_HEAD_INIT, + "extension", + NULL, + 0, + NULL, + NULL, + NULL, + NULL, + NULL + }; + + #define INITERROR return NULL + + PyMODINIT_FUNC PyInit_extension(void) + + #else + + #define INITERROR return + + void initextension(void) + + #endif + { + #if PY_MAJOR_VERSION >= 3 + PyObject *module = PyModule_Create(&moduledef); + #else + PyObject *module = Py_InitModule("extension", NULL); + #endif + if (module == NULL) + INITERROR; + #if PY_MAJOR_VERSION >= 3 + return module; + #endif + } + ''' + ), + }, + setup_kwargs=dict( + ext_modules=[ + Record('setuptools.Extension', + name='extension', + sources=['extension.c']) + ], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}-{platform}.egg/ + |-- extension{shlib_ext} + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + ''' + ), + ), + + dict( + id='header', + file_defs={ + 'header.h': DALS( + ''' + ''' + ), + }, + setup_kwargs=dict( + headers=['header.h'], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- header.h + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + ''' + ), + ), + + dict( + id='script', + file_defs={ + 'script.py': DALS( + ''' + #/usr/bin/python + print('hello world!') + ''' + ), + 'script.sh': DALS( + ''' + #/bin/sh + echo 'hello world!' + ''' + ), + }, + setup_kwargs=dict( + scripts=['script.py', 'script.sh'], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + | |-- scripts/ + | | |-- script.py + | | |-- script.sh + ''' + ), + ), + + dict( + id='requires1', + install_requires='foobar==2.0', + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- requires.txt + | |-- top_level.txt + '''), + requires_txt=DALS( + ''' + foobar==2.0 + ''' + ), + ), + + dict( + id='requires2', + install_requires=''' + bar + foo<=2.0; %r in sys_platform + ''' % sys.platform, + requires_txt=DALS( + ''' + bar + foo<=2.0 + ''' + ), + ), + + dict( + id='requires3', + install_requires=''' + bar; %r != sys_platform + ''' % sys.platform, + ), + + dict( + id='requires4', + install_requires=''' + foo + ''', + extras_require={ + 'extra': 'foobar>3', + }, + requires_txt=DALS( + ''' + foo + + [extra] + foobar>3 + ''' + ), + ), + + dict( + id='requires5', + extras_require={ + 'extra': 'foobar; %r != sys_platform' % sys.platform, + }, + requires_txt=DALS( + ''' + [extra] + ''' + ), + ), + +) + +@pytest.mark.parametrize( + 'params', WHEEL_INSTALL_TESTS, + ids=list(params['id'] for params in WHEEL_INSTALL_TESTS), +) +def test_wheel_install(params): + project_name = params.get('name', 'foo') + version = params.get('version', '1.0') + install_requires = params.get('install_requires', []) + extras_require = params.get('extras_require', {}) + requires_txt = params.get('requires_txt', None) + install_tree = params.get('install_tree') + file_defs = params.get('file_defs', {}) + setup_kwargs = params.get('setup_kwargs', {}) + with build_wheel( + name=project_name, + version=version, + install_requires=install_requires, + extras_require=extras_require, + extra_file_defs=file_defs, + **setup_kwargs + ) as filename, tempdir() as install_dir: + _check_wheel_install(filename, install_dir, + install_tree, project_name, + version, requires_txt) diff --git a/setuptools/wheel.py b/setuptools/wheel.py new file mode 100644 index 0000000000..6e3df77ce4 --- /dev/null +++ b/setuptools/wheel.py @@ -0,0 +1,125 @@ +'''Wheels support.''' + +from distutils.util import get_platform +import email +import itertools +import os +import re +import zipfile + +from pkg_resources import Distribution, PathMetadata, parse_version +from setuptools import Distribution as SetuptoolsDistribution +from setuptools import pep425tags +from setuptools.command.egg_info import write_requirements + + +WHEEL_NAME = re.compile( + r"""^(?P.+?)-(?P\d.*?) + ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) + )\.whl$""", +re.VERBOSE).match + + +class Wheel(object): + + def __init__(self, filename): + match = WHEEL_NAME(os.path.basename(filename)) + if match is None: + raise ValueError('invalid wheel name: %r' % filename) + self.filename = filename + for k, v in match.groupdict().items(): + setattr(self, k, v) + + 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('.')) + + def is_compatible(self): + '''Is the wheel is compatible with the current platform?''' + supported_tags = pep425tags.get_supported() + return next((True for t in self.tags() if t in supported_tags), False) + + def egg_name(self): + return Distribution( + project_name=self.project_name, version=self.version, + platform=(None if self.platform == 'any' else get_platform()), + ).egg_name() + '.egg' + + 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') + 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) + ) + # 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( + 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') + )): + for entry in os.listdir(subdir): + os.rename(os.path.join(subdir, entry), + os.path.join(destination_eggdir, entry)) + os.rmdir(subdir) + if os.path.exists(dist_data): + os.rmdir(dist_data) diff --git a/tests/requirements.txt b/tests/requirements.txt index 4761505fc9..38b6924712 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -4,3 +4,4 @@ pytest-flake8; python_version>="2.7" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 +wheel From d4959f2c85d8b36c71249fdf81ed9c26c9f31690 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 26 Nov 2017 18:50:47 +0100 Subject: [PATCH 6866/8469] update changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index df91d99945..63d17d5db8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.2.0 +------- + +* #1200: easy_install now support installing from wheels: + they will be installed as standalone unzipped eggs. + v38.1.0 ------- From 7b3ed4f22aad1b62c537cc89b07b1691033730c3 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 26 Nov 2017 18:51:39 +0100 Subject: [PATCH 6867/8469] =?UTF-8?q?Bump=20version:=2038.1.0=20=E2=86=92?= =?UTF-8?q?=2038.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 39452fdeec..f00b544f9b 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.1.0 +current_version = 38.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 052d7a1f53..7b2c10010d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.1.0", + version="38.2.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e72afd6243713cd0d3f8a5bc5b50fb59934d7ff8 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 26 Nov 2017 23:11:14 +0100 Subject: [PATCH 6868/8469] fix encoding handling of wheels metadata --- CHANGES.rst | 6 ++++++ setuptools/tests/files.py | 9 +++++++-- setuptools/tests/test_wheel.py | 14 ++++++++++++-- setuptools/wheel.py | 3 ++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 63d17d5db8..d5fd66a376 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.2.1 +------- + +* #1212: fix encoding handling of metadata when installing + from a wheel. + v38.2.0 ------- diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index 98de9fc341..75ec740d0e 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,6 +1,7 @@ import os +from pkg_resources.extern.six import binary_type import pkg_resources.py31compat @@ -30,5 +31,9 @@ def build_files(file_defs, prefix=""): pkg_resources.py31compat.makedirs(full_name, exist_ok=True) build_files(contents, prefix=full_name) else: - with open(full_name, 'w') as f: - f.write(contents) + if isinstance(contents, binary_type): + with open(full_name, 'wb') as f: + f.write(contents) + else: + with open(full_name, 'w') as f: + f.write(contents) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index a0c16c5391..2e857253d5 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + """wheel tests """ @@ -72,13 +74,14 @@ def test_wheel_info(filename, info): @contextlib.contextmanager def build_wheel(extra_file_defs=None, **kwargs): file_defs = { - 'setup.py': DALS( + 'setup.py': (DALS( ''' + # -*- coding: utf-8 -*- from setuptools import setup import setuptools setup(**%r) ''' - ) % kwargs, + ) % kwargs).encode('utf-8'), } if extra_file_defs: file_defs.update(extra_file_defs) @@ -170,6 +173,13 @@ def __repr__(self): ), ), + dict( + id='utf-8', + setup_kwargs=dict( + description='Description accentuée', + ) + ), + dict( id='data', file_defs={ diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 6e3df77ce4..f711f38bae 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -8,6 +8,7 @@ import zipfile from pkg_resources import Distribution, PathMetadata, parse_version +from pkg_resources.extern.six import PY3 from setuptools import Distribution as SetuptoolsDistribution from setuptools import pep425tags from setuptools.command.egg_info import write_requirements @@ -55,7 +56,7 @@ def install_as_egg(self, destination_eggdir): 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') + 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') From b066b29042daf7b60c40d116f823ac28943cfbad Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 26 Nov 2017 23:17:06 +0100 Subject: [PATCH 6869/8469] =?UTF-8?q?Bump=20version:=2038.2.0=20=E2=86=92?= =?UTF-8?q?=2038.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f00b544f9b..fd93d44d94 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.0 +current_version = 38.2.1 commit = True tag = True diff --git a/setup.py b/setup.py index 7b2c10010d..8662816557 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.0", + version="38.2.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From da1c78f354fac3ce177e2869828a34b3e6df1820 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 27 Nov 2017 13:25:04 +0100 Subject: [PATCH 6870/8469] fix namespace packages handling of wheels --- CHANGES.rst | 6 ++++++ setuptools/tests/test_wheel.py | 32 ++++++++++++++++++++++++++++++++ setuptools/wheel.py | 18 ++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index d5fd66a376..3886854a1c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.2.2 +------- + +* #1214: fix handling of namespace packages when installing + from a wheel. + v38.2.1 ------- diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 2e857253d5..408c357612 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -412,6 +412,38 @@ def __repr__(self): ), ), + dict( + id='namespace_package', + file_defs={ + 'foo': { + 'bar': { + '__init__.py': '' + }, + }, + }, + setup_kwargs=dict( + namespace_packages=['foo'], + packages=['foo.bar'], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- foo-1.0-py{py_version}-nspkg.pth + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- namespace_packages.txt + | |-- top_level.txt + |-- foo/ + | |-- __init__.py + | |-- bar/ + | | |-- __init__.py + '''), + ), + ) @pytest.mark.parametrize( diff --git a/setuptools/wheel.py b/setuptools/wheel.py index f711f38bae..c23272133f 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -20,6 +20,13 @@ )\.whl$""", re.VERBOSE).match +NAMESPACE_PACKAGE_INIT = '''\ +try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + __path__ = __import__('pkgutil').extend_path(__path__, __name__) +''' + class Wheel(object): @@ -124,3 +131,14 @@ def raw_req(req): os.rmdir(subdir) 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) From 13c068c24bf0cfe9fc0070e24fdde28e2be59fc9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 27 Nov 2017 23:20:38 +0100 Subject: [PATCH 6871/8469] =?UTF-8?q?Bump=20version:=2038.2.1=20=E2=86=92?= =?UTF-8?q?=2038.2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index fd93d44d94..19b073eb76 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.1 +current_version = 38.2.2 commit = True tag = True diff --git a/setup.py b/setup.py index 8662816557..778fc5056d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.1", + version="38.2.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 54f245d390998b4815255702d54ab1e682004698 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 27 Nov 2017 23:35:25 +0100 Subject: [PATCH 6872/8469] tests: fix pytest requirement so Python 3.3 is supported --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 38b6924712..9c8bcff722 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,5 +3,5 @@ mock pytest-flake8; python_version>="2.7" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 -pytest>=3.0.2 +pytest>=3.0.2,<=3.2.5 wheel From d77377ab40b7d833835793b62201a20ed67df4f5 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 28 Nov 2017 00:30:40 +0100 Subject: [PATCH 6873/8469] =?UTF-8?q?Bump=20version:=2038.2.2=20=E2=86=92?= =?UTF-8?q?=2038.2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 19b073eb76..b2e68c6f21 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.2 +current_version = 38.2.3 commit = True tag = True diff --git a/setup.py b/setup.py index 778fc5056d..61d2ceaaa4 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.2", + version="38.2.3", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From f7194b879e22a498a573d277fbcb3b9226412f89 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 28 Nov 2017 15:30:32 +0100 Subject: [PATCH 6874/8469] bpo-32155: Bugfixes found by flake8 F841 warnings (#4608) * distutils.config: Use the PyPIRCCommand.realm attribute if set * turtledemo: wait until macOS osascript command completes to not create a zombie process * Tools/scripts/treesync.py: declare 'default_answer' and 'create_files' as globals to modify them with the command line arguments. Previously, -y, -n, -f and -a options had no effect. flake8 warning: "F841 local variable 'p' is assigned to but never used". --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index bf8d8dd2f5..e66d103f7d 100644 --- a/config.py +++ b/config.py @@ -77,7 +77,7 @@ def _read_pypirc(self): # optional params for key, default in (('repository', self.DEFAULT_REPOSITORY), - ('realm', self.DEFAULT_REALM), + ('realm', realm), ('password', None)): if config.has_option(server, key): current[key] = config.get(server, key) @@ -106,7 +106,7 @@ def _read_pypirc(self): 'password': config.get(server, 'password'), 'repository': repository, 'server': server, - 'realm': self.DEFAULT_REALM} + 'realm': realm} return {} From 3c144a62210850ec965d8ebf81c0bad9558e18b0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 28 Nov 2017 23:19:26 +0100 Subject: [PATCH 6875/8469] bpo-32155: Revert distutils.config change (#4618) Revert distutils changes of the commit 696b501cd11dc429a0f661adeb598bfaf89e4112 and remove the realm variable. --- config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index e66d103f7d..2171abd696 100644 --- a/config.py +++ b/config.py @@ -51,7 +51,6 @@ def _read_pypirc(self): if os.path.exists(rc): self.announce('Using PyPI login from %s' % rc) repository = self.repository or self.DEFAULT_REPOSITORY - realm = self.realm or self.DEFAULT_REALM config = RawConfigParser() config.read(rc) @@ -77,7 +76,7 @@ def _read_pypirc(self): # optional params for key, default in (('repository', self.DEFAULT_REPOSITORY), - ('realm', realm), + ('realm', self.DEFAULT_REALM), ('password', None)): if config.has_option(server, key): current[key] = config.get(server, key) @@ -106,7 +105,7 @@ def _read_pypirc(self): 'password': config.get(server, 'password'), 'repository': repository, 'server': server, - 'realm': realm} + 'realm': self.DEFAULT_REALM} return {} From b729553a6c6b92dfc7cfd9c577f2399bfde3000e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 30 Nov 2017 14:59:03 +0100 Subject: [PATCH 6876/8469] update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3886854a1c..0cff779e00 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.2.3 +------- + +* fix Travis' Python 3.3 job. + v38.2.2 ------- From 35c0e9c2d67cbda4033ba0e0b1c20e4df8c24ce7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 30 Nov 2017 19:46:16 +0100 Subject: [PATCH 6877/8469] fix `data_files` handling when installing from wheel --- setuptools/tests/test_wheel.py | 36 ++++++++++++++++++++++++++++++++++ setuptools/wheel.py | 27 +++++++++++++++++++++---- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 408c357612..b6be6f1f05 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -444,6 +444,42 @@ def __repr__(self): '''), ), + dict( + id='data_in_package', + file_defs={ + 'foo': { + '__init__.py': '', + 'data_dir': { + 'data.txt': DALS( + ''' + Some data... + ''' + ), + } + } + }, + setup_kwargs=dict( + packages=['foo'], + data_files=[('foo/data_dir', ['foo/data_dir/data.txt'])], + ), + install_tree=DALS( + ''' + foo-1.0-py{py_version}.egg/ + |-- EGG-INFO/ + | |-- DESCRIPTION.rst + | |-- PKG-INFO + | |-- RECORD + | |-- WHEEL + | |-- metadata.json + | |-- top_level.txt + |-- foo/ + | |-- __init__.py + | |-- data_dir/ + | | |-- data.txt + ''' + ), + ), + ) @pytest.mark.parametrize( diff --git a/setuptools/wheel.py b/setuptools/wheel.py index c23272133f..9ffe434ae3 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -28,6 +28,28 @@ ''' +def unpack(src_dir, dst_dir): + '''Move everything under `src_dir` to `dst_dir`, and delete the former.''' + for dirpath, dirnames, filenames in os.walk(src_dir): + subdir = os.path.relpath(dirpath, src_dir) + for f in filenames: + src = os.path.join(dirpath, f) + dst = os.path.join(dst_dir, subdir, f) + os.renames(src, dst) + for n, d in reversed(list(enumerate(dirnames))): + src = os.path.join(dirpath, d) + dst = os.path.join(dst_dir, subdir, d) + if not os.path.exists(dst): + # Directory does not exist in destination, + # rename it and prune it from os.walk list. + os.renames(src, dst) + del dirnames[n] + # Cleanup. + for dirpath, dirnames, filenames in os.walk(src_dir, topdown=True): + assert not filenames + os.rmdir(dirpath) + + class Wheel(object): def __init__(self, filename): @@ -125,10 +147,7 @@ def raw_req(req): os.path.join(dist_data, d) for d in ('data', 'headers', 'purelib', 'platlib') )): - for entry in os.listdir(subdir): - os.rename(os.path.join(subdir, entry), - os.path.join(destination_eggdir, entry)) - os.rmdir(subdir) + unpack(subdir, destination_eggdir) if os.path.exists(dist_data): os.rmdir(dist_data) # Fix namespace packages. From e1946bc255e891ef1f8e399a2a2d30b197e89037 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 4 Dec 2017 18:01:09 +0100 Subject: [PATCH 6878/8469] update changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 0cff779e00..3694b15272 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.2.4 +------- + +* #1220: Fix `data_files` handling when installing from wheel. + v38.2.3 ------- From e001996ab483c7c725e8894f560fb84c43150bcc Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 4 Dec 2017 18:14:16 +0100 Subject: [PATCH 6879/8469] =?UTF-8?q?Bump=20version:=2038.2.3=20=E2=86=92?= =?UTF-8?q?=2038.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b2e68c6f21..d6f1a195b5 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.3 +current_version = 38.2.4 commit = True tag = True diff --git a/setup.py b/setup.py index 61d2ceaaa4..0e3e42c536 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.3", + version="38.2.4", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From cba37f7ece298acceaa5506d24548f6ec039c9b3 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Mon, 4 Dec 2017 18:58:12 -0800 Subject: [PATCH 6880/8469] bpo-19610: Warn if distutils is provided something other than a list to some fields (#4685) * Rather than raise TypeError, warn and call list() on the value. * Fix tests, revise NEWS and whatsnew text. * Revise documentation, a string is okay as well. * Ensure 'requires' and 'obsoletes' are real lists. * Test that requires and obsoletes are turned to lists. --- dist.py | 46 +++++++++++++++++++------------------------- tests/test_dist.py | 48 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 58 insertions(+), 36 deletions(-) diff --git a/dist.py b/dist.py index 78c29ede6c..6cf0a0d663 100644 --- a/dist.py +++ b/dist.py @@ -27,6 +27,20 @@ command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$') +def _ensure_list(value, fieldname): + if isinstance(value, str): + # a string containing comma separated values is okay. It will + # be converted to a list by Distribution.finalize_options(). + pass + elif not isinstance(value, list): + # passing a tuple or an iterator perhaps, warn and convert + typename = type(value).__name__ + msg = f"Warning: '{fieldname}' should be a list, got type '{typename}'" + log.log(log.WARN, msg) + value = list(value) + return value + + class Distribution: """The core of the Distutils. Most of the work hiding behind 'setup' is really done within a Distribution instance, which farms the work out @@ -257,10 +271,7 @@ def __init__(self, attrs=None): setattr(self, key, val) else: msg = "Unknown distribution option: %s" % repr(key) - if warnings is not None: - warnings.warn(msg) - else: - sys.stderr.write(msg + "\n") + warnings.warn(msg) # no-user-cfg is handled before other command line args # because other args override the config files, and this @@ -1189,36 +1200,19 @@ def get_keywords(self): return self.keywords or [] def set_keywords(self, value): - # If 'keywords' is a string, it will be converted to a list - # by Distribution.finalize_options(). To maintain backwards - # compatibility, do not raise an exception if 'keywords' is - # a string. - if not isinstance(value, (list, str)): - msg = "'keywords' should be a 'list', not %r" - raise TypeError(msg % type(value).__name__) - self.keywords = value + self.keywords = _ensure_list(value, 'keywords') def get_platforms(self): return self.platforms or ["UNKNOWN"] def set_platforms(self, value): - # If 'platforms' is a string, it will be converted to a list - # by Distribution.finalize_options(). To maintain backwards - # compatibility, do not raise an exception if 'platforms' is - # a string. - if not isinstance(value, (list, str)): - msg = "'platforms' should be a 'list', not %r" - raise TypeError(msg % type(value).__name__) - self.platforms = value + self.platforms = _ensure_list(value, 'platforms') def get_classifiers(self): return self.classifiers or [] def set_classifiers(self, value): - if not isinstance(value, list): - msg = "'classifiers' should be a 'list', not %r" - raise TypeError(msg % type(value).__name__) - self.classifiers = value + self.classifiers = _ensure_list(value, 'classifiers') def get_download_url(self): return self.download_url or "UNKNOWN" @@ -1231,7 +1225,7 @@ def set_requires(self, value): import distutils.versionpredicate for v in value: distutils.versionpredicate.VersionPredicate(v) - self.requires = value + self.requires = list(value) def get_provides(self): return self.provides or [] @@ -1250,7 +1244,7 @@ def set_obsoletes(self, value): import distutils.versionpredicate for v in value: distutils.versionpredicate.VersionPredicate(v) - self.obsoletes = value + self.obsoletes = list(value) def fix_help_options(options): """Convert a 4-tuple 'help_options' list as found in various command diff --git a/tests/test_dist.py b/tests/test_dist.py index 50b456ec94..0a19f0fb62 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -11,7 +11,9 @@ from distutils.dist import Distribution, fix_help_options, DistributionMetadata from distutils.cmd import Command -from test.support import TESTFN, captured_stdout, run_unittest +from test.support import ( + TESTFN, captured_stdout, captured_stderr, run_unittest +) from distutils.tests import support from distutils import log @@ -319,6 +321,13 @@ def test_requires_illegal(self): "version": "1.0", "requires": ["my.pkg (splat)"]}) + def test_requires_to_list(self): + attrs = {"name": "package", + "requires": iter(["other"])} + dist = Distribution(attrs) + self.assertIsInstance(dist.metadata.requires, list) + + def test_obsoletes(self): attrs = {"name": "package", "version": "1.0", @@ -341,6 +350,12 @@ def test_obsoletes_illegal(self): "version": "1.0", "obsoletes": ["my.pkg (splat)"]}) + def test_obsoletes_to_list(self): + attrs = {"name": "package", + "obsoletes": iter(["other"])} + dist = Distribution(attrs) + self.assertIsInstance(dist.metadata.obsoletes, list) + def test_classifier(self): attrs = {'name': 'Boa', 'version': '3.0', 'classifiers': ['Programming Language :: Python :: 3']} @@ -353,9 +368,14 @@ def test_classifier(self): def test_classifier_invalid_type(self): attrs = {'name': 'Boa', 'version': '3.0', 'classifiers': ('Programming Language :: Python :: 3',)} - msg = "'classifiers' should be a 'list', not 'tuple'" - with self.assertRaises(TypeError, msg=msg): - Distribution(attrs) + with captured_stderr() as error: + d = Distribution(attrs) + # should have warning about passing a non-list + self.assertIn('should be a list', error.getvalue()) + # should be converted to a list + self.assertIsInstance(d.metadata.classifiers, list) + self.assertEqual(d.metadata.classifiers, + list(attrs['classifiers'])) def test_keywords(self): attrs = {'name': 'Monty', 'version': '1.0', @@ -367,9 +387,13 @@ def test_keywords(self): def test_keywords_invalid_type(self): attrs = {'name': 'Monty', 'version': '1.0', 'keywords': ('spam', 'eggs', 'life of brian')} - msg = "'keywords' should be a 'list', not 'tuple'" - with self.assertRaises(TypeError, msg=msg): - Distribution(attrs) + with captured_stderr() as error: + d = Distribution(attrs) + # should have warning about passing a non-list + self.assertIn('should be a list', error.getvalue()) + # should be converted to a list + self.assertIsInstance(d.metadata.keywords, list) + self.assertEqual(d.metadata.keywords, list(attrs['keywords'])) def test_platforms(self): attrs = {'name': 'Monty', 'version': '1.0', @@ -381,9 +405,13 @@ def test_platforms(self): def test_platforms_invalid_types(self): attrs = {'name': 'Monty', 'version': '1.0', 'platforms': ('GNU/Linux', 'Some Evil Platform')} - msg = "'platforms' should be a 'list', not 'tuple'" - with self.assertRaises(TypeError, msg=msg): - Distribution(attrs) + with captured_stderr() as error: + d = Distribution(attrs) + # should have warning about passing a non-list + self.assertIn('should be a list', error.getvalue()) + # should be converted to a list + self.assertIsInstance(d.metadata.platforms, list) + self.assertEqual(d.metadata.platforms, list(attrs['platforms'])) def test_download_url(self): attrs = {'name': 'Boa', 'version': '3.0', From 7af7f8a68ea4b0f7d45a739273684832fa609935 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 5 Dec 2017 17:56:10 +0000 Subject: [PATCH 6881/8469] Document project_urls setup parameter Add an entry to the Setuptools usage documentation for the project_urls dict, and include it in the "advanced" project example. While at it, adjust the dogfooding use in Setuptools' own setup.py to use HTTPS for the Documentation URL and drop redundant entries for Bug Tracker and Source Code. Also remove a no-op attribute reassignment from egg_info.py. --- docs/setuptools.txt | 10 ++++++++++ setup.py | 4 +--- setuptools/command/egg_info.py | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e3154b469b..bea8018195 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -145,6 +145,11 @@ dependencies, and perhaps some data files and scripts:: license="PSF", keywords="hello world example examples", url="http://example.com/HelloWorld/", # project home page, if any + project_urls={ + "Bug Tracker": "https://bugs.example.com/HelloWorld/", + "Documentation": "https://docs.example.com/HelloWorld/", + "Source Code": "https://code.example.com/HelloWorld/", + } # could also include long_description, download_url, classifiers, etc. ) @@ -408,6 +413,11 @@ unless you need the associated ``setuptools`` feature. A list of modules to search for additional fixers to be used during the 2to3 conversion. See :doc:`python3` for more details. +``project_urls`` + An arbitrary map of URL names to hyperlinks, allowing more extensible + documentation of where various resources can be found than the simple + ``url`` and ``download_url`` options provide. + Using ``find_packages()`` ------------------------- diff --git a/setup.py b/setup.py index 7a05c718a9..19239465b5 100755 --- a/setup.py +++ b/setup.py @@ -99,9 +99,7 @@ def pypi_link(pkg_filename): keywords="CPAN PyPI distutils eggs package management", url="https://github.com/pypa/setuptools", project_urls={ - "Bug Tracker": "https://github.com/pypa/setuptools/issues", - "Documentation": "http://setuptools.readthedocs.io/", - "Source Code": "https://github.com/pypa/setuptools", + "Documentation": "https://setuptools.readthedocs.io/", }, src_root=None, packages=setuptools.find_packages(exclude=['*.tests']), diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index c8b2bd173e..a1d41b27da 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -597,7 +597,6 @@ def write_pkg_info(cmd, basename, filename): metadata = cmd.distribution.metadata metadata.version, oldver = cmd.egg_version, metadata.version metadata.name, oldname = cmd.egg_name, metadata.name - metadata.project_urls = cmd.distribution.metadata.project_urls metadata.long_description_content_type = getattr( cmd.distribution, 'long_description_content_type' From 8fe36a5710beb556a06d05f284e5ea49b4656624 Mon Sep 17 00:00:00 2001 From: Zoran Simic Date: Sat, 9 Dec 2017 16:12:28 -0800 Subject: [PATCH 6882/8469] Removed warning when PYTHONDONTWRITEBYTECODE is enabled --- CHANGES.rst | 5 +++++ setuptools/command/easy_install.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3694b15272..f9f1ea038b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.2.5 +------- + +* Removed warning when PYTHONDONTWRITEBYTECODE is enabled + v38.2.4 ------- diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 12e223106c..b691e70268 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1248,7 +1248,6 @@ def pf(src, dst): def byte_compile(self, to_compile): if sys.dont_write_bytecode: - self.warn('byte-compiling is disabled, skipping.') return from distutils.util import byte_compile From 66729ab597c6bfddd128159fe0a6d13e7f95ce83 Mon Sep 17 00:00:00 2001 From: Doug Greiman Date: Sun, 5 Nov 2017 05:43:18 -0800 Subject: [PATCH 6883/8469] Add testcase for pkg_resources.ZipProvider.resource_listdir --- pkg_resources/tests/test_pkg_resources.py | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index c6a7ac97e9..f2c00b297b 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -62,10 +62,21 @@ def setup_class(cls): zip_info.filename = 'data.dat' zip_info.date_time = cls.ref_time.timetuple() zip_egg.writestr(zip_info, 'hello, world!') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'subdir/mod2.py' + zip_info.date_time = cls.ref_time.timetuple() + zip_egg.writestr(zip_info, 'x = 6\n') + zip_info = zipfile.ZipInfo() + zip_info.filename = 'subdir/data2.dat' + zip_info.date_time = cls.ref_time.timetuple() + zip_egg.writestr(zip_info, 'goodbye, world!') zip_egg.close() egg.close() sys.path.append(egg.name) + subdir = os.path.join(egg.name, 'subdir') + sys.path.append(subdir) + cls.finalizers.append(EggRemover(subdir)) cls.finalizers.append(EggRemover(egg.name)) @classmethod @@ -73,6 +84,30 @@ def teardown_class(cls): for finalizer in cls.finalizers: finalizer() + def test_resource_listdir(self): + import mod + zp = pkg_resources.ZipProvider(mod) + + expected_root = ['data.dat', 'mod.py', 'subdir'] + assert sorted(zp.resource_listdir('')) == expected_root + assert sorted(zp.resource_listdir('/')) == expected_root + + expected_subdir = ['data2.dat', 'mod2.py'] + assert sorted(zp.resource_listdir('subdir')) == expected_subdir + assert sorted(zp.resource_listdir('subdir/')) == expected_subdir + + assert zp.resource_listdir('nonexistent') == [] + assert zp.resource_listdir('nonexistent/') == [] + + import mod2 + zp2 = pkg_resources.ZipProvider(mod2) + + assert sorted(zp2.resource_listdir('')) == expected_subdir + assert sorted(zp2.resource_listdir('/')) == expected_subdir + + assert zp2.resource_listdir('subdir') == [] + assert zp2.resource_listdir('subdir/') == [] + def test_resource_filename_rewrites_on_change(self): """ If a previous call to get_resource_filename has saved the file, but From 7b8b56fa28fc9ee4cd6e0156074505e3fef620e3 Mon Sep 17 00:00:00 2001 From: Doug Greiman Date: Sun, 5 Nov 2017 05:43:48 -0800 Subject: [PATCH 6884/8469] Fix trailing slash handling in pkg_resources.ZipProvider Given a ZipProvider, if the underlying ZipImporter prefix is empty, then resource_listdir('') and resource_listdir('subdir/') fail, while resource_listdir('/') and resource_listdir('subdir') succeed. On the other hand, if the underlying ZipImport prefix is not empty, then resource_listdir('/') fails but resource_listdir('') succeeds. With this change, the cases listed succeed with or without trailing slashes. --- pkg_resources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 73334641b5..ffaf7acae1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1693,6 +1693,10 @@ def __init__(self, module): def _zipinfo_name(self, fspath): # Convert a virtual filename (full path to file) into a zipfile subpath # usable with the zipimport directory cache for our target archive + while fspath.endswith(os.sep): + fspath = fspath[:-1] + if fspath == self.loader.archive: + return '' if fspath.startswith(self.zip_pre): return fspath[len(self.zip_pre):] raise AssertionError( From b0138c4df9e3d287a5a2995be53746c9d0581725 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 14 Dec 2017 11:39:34 +0100 Subject: [PATCH 6885/8469] bpo-32302: Fix distutils bdist_wininst for CRT v142 (#4851) CRT v142 is binary compatible with CRT v140. --- command/bdist_wininst.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 6309c3e248..83f0073265 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -338,8 +338,8 @@ def get_exe_bytes(self): bv = '14.0' else: bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]) - if bv == '14.11': - # v141 and v140 are binary compatible, + if bv in ('14.11', '14.12'): + # v142, v141 and v140 are binary compatible, # so keep using the 14.0 stub. bv = '14.0' From 8620a70b45ad4e7222c19ba89b2232821cd4aa70 Mon Sep 17 00:00:00 2001 From: Doug Greiman Date: Fri, 22 Dec 2017 14:51:36 -0800 Subject: [PATCH 6886/8469] Slightly simplify code via rstrip() --- pkg_resources/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ffaf7acae1..08f9bbe7ef 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1693,8 +1693,7 @@ def __init__(self, module): def _zipinfo_name(self, fspath): # Convert a virtual filename (full path to file) into a zipfile subpath # usable with the zipimport directory cache for our target archive - while fspath.endswith(os.sep): - fspath = fspath[:-1] + fspath = fspath.rstrip(os.sep) if fspath == self.loader.archive: return '' if fspath.startswith(self.zip_pre): From 2bf0478092cd2768db510671b4d428d5386edb9b Mon Sep 17 00:00:00 2001 From: Doug Greiman Date: Fri, 22 Dec 2017 15:00:16 -0800 Subject: [PATCH 6887/8469] Update changelog. Ref #1232 --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3694b15272..7227b7fe7c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.2.5 +------- + +* #1232: Fix trailing slash handling in ``pkg_resources.ZipProvider``. + v38.2.4 ------- From 0d0baed8da468b2cedb9aa6caf60dc15fdeebd34 Mon Sep 17 00:00:00 2001 From: Doug Greiman Date: Fri, 22 Dec 2017 15:04:22 -0800 Subject: [PATCH 6888/8469] =?UTF-8?q?Bump=20version:=2038.2.4=20=E2=86=92?= =?UTF-8?q?=2038.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d6f1a195b5..0a33329c10 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.4 +current_version = 38.2.5 commit = True tag = True diff --git a/setup.py b/setup.py index 0e3e42c536..af799e465a 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.4", + version="38.2.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 85747b8ccc2a2da7ecb59c6aff2561c052c463d2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jan 2018 20:37:37 -0500 Subject: [PATCH 6889/8469] Update changelog. Ref #1207. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7227b7fe7c..4189169716 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.2.6 +------- + +* #1207: Add support for ``long_description_type`` to setup.cfg + declarative config as intended and documented. + v38.2.5 ------- From 82c7b798928cf2f508585b33616f454ef0b21983 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jan 2018 20:46:17 -0500 Subject: [PATCH 6890/8469] Remove extraneous attribute copy, artifact of bad merge. --- setuptools/dist.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index fc5db5d174..c2bfdbc7c6 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -325,9 +325,6 @@ def __init__(self, attrs=None): self.dist_files = [] self.src_root = attrs.pop("src_root", None) self.patch_missing_pkg_info(attrs) - self.long_description_content_type = attrs.get( - 'long_description_content_type' - ) self.project_urls = attrs.get('project_urls', {}) self.dependency_links = attrs.pop('dependency_links', []) self.setup_requires = attrs.pop('setup_requires', []) From 239d0558998793d6a7ae8152963afe6df7460c18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jan 2018 20:48:04 -0500 Subject: [PATCH 6891/8469] Update changelog. Ref #1210. --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4189169716..5ae8ff9a59 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,7 @@ -v38.2.6 +v38.3.0 ------- +* #1210: Add support for PEP 345 Project-URL metadata. * #1207: Add support for ``long_description_type`` to setup.cfg declarative config as intended and documented. From 4ae5bc9e6fd52517fe31048b6570224fb9cbb70d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jan 2018 20:58:28 -0500 Subject: [PATCH 6892/8469] =?UTF-8?q?Bump=20version:=2038.2.5=20=E2=86=92?= =?UTF-8?q?=2038.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0a33329c10..13b520a898 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.2.5 +current_version = 38.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index ea0f94a86d..e2b5dc90a2 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.2.5", + version="38.3.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 76dc0f8c3eedd585c81fed0da40cd8b698597bb2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jan 2018 08:16:44 -0500 Subject: [PATCH 6893/8469] On further consideration, behavior change is an 0.1 bump. Ref #1231 --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index df50fc8225..737cc0f866 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -v38.3.1 +v38.4.0 ------- * #1231: Removed warning when PYTHONDONTWRITEBYTECODE is enabled. From 56bf1a9c12fd881fe6f69c3693cc426acf8012c3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jan 2018 08:17:02 -0500 Subject: [PATCH 6894/8469] =?UTF-8?q?Bump=20version:=2038.3.0=20=E2=86=92?= =?UTF-8?q?=2038.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 13b520a898..8b0a754020 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.3.0 +current_version = 38.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index e2b5dc90a2..b5be0b529d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.3.0", + version="38.4.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From de000c41dbc110839c794337808ad98c1097b263 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Jan 2018 08:18:43 -0500 Subject: [PATCH 6895/8469] On Appveyor, omit the '1.0.' prefix on all builds. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 9313a48207..8ecee10bdb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,3 +18,5 @@ test_script: - "python bootstrap.py" - "python -m pip install tox" - "tox" + +version: '{build}' From 9a97c496dcd05e6b3d418903a3728daa790e29cc Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Fri, 19 Jan 2018 09:09:36 +1100 Subject: [PATCH 6896/8469] bpo-32588: Move _findvs into its own module and add missing _queue module to installer (#5227) --- _msvccompiler.py | 4 ++-- command/bdist_wininst.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index ef1356b97d..c9d3c6c671 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -56,7 +56,7 @@ def _find_vc2015(): return best_version, best_dir def _find_vc2017(): - import _findvs + import _distutils_findvs import threading best_version = 0, # tuple for full version comparisons @@ -66,7 +66,7 @@ def _find_vc2017(): # initialize COM. all_packages = [] def _getall(): - all_packages.extend(_findvs.findall()) + all_packages.extend(_distutils_findvs.findall()) t = threading.Thread(target=_getall) t.start() t.join() diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 83f0073265..0871a4f7d6 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -337,11 +337,10 @@ def get_exe_bytes(self): # cross-building, so assume the latest version bv = '14.0' else: - bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]) - if bv in ('14.11', '14.12'): - # v142, v141 and v140 are binary compatible, - # so keep using the 14.0 stub. - bv = '14.0' + # as far as we know, CRT is binary compatible based on + # the first field, so assume 'x.0' until proven otherwise + major = CRT_ASSEMBLY_VERSION.partition('.')[0] + bv = major + '.0' # wininst-x.y.exe is in the same directory as this file From 618312bec376e5c71b0938a754106973d8889417 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Jan 2018 08:41:57 -0500 Subject: [PATCH 6897/8469] Refactor to short-circuit on dry-run --- setuptools/command/easy_install.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b691e70268..b7396b85e5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -828,14 +828,16 @@ def write_script(self, script_name, contents, mode="t", blockers=()): target = os.path.join(self.script_dir, script_name) self.add_output(target) - mask = current_umask() if not self.dry_run: - ensure_directory(target) - if os.path.exists(target): - os.unlink(target) - with open(target, "w" + mode) as f: - f.write(contents) - chmod(target, 0o777 - mask) + return + + mask = current_umask() + ensure_directory(target) + if os.path.exists(target): + os.unlink(target) + with open(target, "w" + mode) as f: + f.write(contents) + chmod(target, 0o777 - mask) def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them From 5d5861adecc1b0cb57e6d0061016b4d0e68da629 Mon Sep 17 00:00:00 2001 From: Dylan Wilson Date: Tue, 23 Jan 2018 15:11:14 -0800 Subject: [PATCH 6898/8469] Reflect find_packages behavior in doc find_packages doesnt find PEP420 packages but the documentation suggests that it does. see: pypa/setuptools#97 --- docs/setuptools.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index bea8018195..cebb6268a7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -437,9 +437,9 @@ such projects also need something like ``package_dir={'':'src'}`` in their ``setup()`` arguments, but that's just a normal distutils thing.) Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python packages (any directory). On Python 3.2 and -earlier, packages are only recognized if they include an ``__init__.py`` file. -Finally, exclusion patterns are applied to remove matching packages. +patterns, and finds Python packages (any directory). Packages are only +recognized if they include an ``__init__.py`` file. Finally, exclusion +patterns are applied to remove matching packages. Inclusion and exclusion patterns are package names, optionally including wildcards. For From 4d38fb9841d25c6bd5779824a16975ed9ab421b2 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 25 Jan 2018 08:36:12 +0100 Subject: [PATCH 6899/8469] Fix dry-run handling --- setuptools/command/easy_install.py | 2 +- setuptools/tests/test_easy_install.py | 45 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b7396b85e5..a6f61436b7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -828,7 +828,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()): target = os.path.join(self.script_dir, script_name) self.add_output(target) - if not self.dry_run: + if self.dry_run: return mask = current_umask() diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 834710ef29..57339c8a12 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -183,6 +183,51 @@ def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): cmd.ensure_finalized() cmd.easy_install(sdist_unicode) + @pytest.fixture + def sdist_script(self, tmpdir): + files = [ + ( + 'setup.py', + DALS(""" + import setuptools + setuptools.setup( + name="setuptools-test-script", + version="1.0", + scripts=["mypkg_script"], + ) + """), + ), + ( + u'mypkg_script', + DALS(""" + #/usr/bin/python + print('mypkg_script') + """), + ), + ] + sdist_name = 'setuptools-test-script-1.0.zip' + sdist = str(tmpdir / sdist_name) + make_sdist(sdist, files) + return sdist + + @pytest.mark.skipif(not sys.platform.startswith('linux'), + reason="Test can only be run on Linux") + def test_script_install(self, sdist_script, tmpdir, monkeypatch): + """ + Check scripts are installed. + """ + dist = Distribution({'script_args': ['easy_install']}) + target = (tmpdir / 'target').ensure_dir() + cmd = ei.easy_install( + dist, + install_dir=str(target), + args=['x'], + ) + monkeypatch.setitem(os.environ, 'PYTHONPATH', str(target)) + cmd.ensure_finalized() + cmd.easy_install(sdist_script) + assert (target / 'mypkg_script').exists() + class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): From 7bf15cb3c8a29545cc4869a4a1c52ac678eba1da Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 25 Jan 2018 10:27:04 +0100 Subject: [PATCH 6900/8469] fix Python 3.7 support - update scanning code to handle pyc header change - handle change to `Exception.__repr__` output --- setuptools/command/bdist_egg.py | 4 +++- setuptools/tests/test_sandbox.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 5fdb62d905..d222c20863 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -409,8 +409,10 @@ def scan_module(egg_dir, base, name, stubs): module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0] if sys.version_info < (3, 3): skip = 8 # skip magic & date - else: + elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size + else: + skip = 16 # skip magic & reserved? & date & file size f = open(filename, 'rb') f.read(skip) code = marshal.load(f) diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index a3f1206d5b..d867542229 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -75,6 +75,8 @@ def test_no_exception_passes_quietly(self): def test_unpickleable_exception(self): class CantPickleThis(Exception): "This Exception is unpickleable because it's not in globals" + def __repr__(self): + return 'CantPickleThis%r' % (self.args,) with setuptools.sandbox.ExceptionSaver() as saved_exc: raise CantPickleThis('detail') From b3168e5e01e79300b17c1791eed97c4733fa7a49 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Thu, 25 Jan 2018 18:02:03 -0600 Subject: [PATCH 6901/8469] bpo-32304: Fix distutils upload for sdists ending with \x0d (GH-5264) Patch by Bo Bayles. --- command/upload.py | 2 -- tests/test_upload.py | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/command/upload.py b/command/upload.py index 1fd574a9f1..f7752f9d12 100644 --- a/command/upload.py +++ b/command/upload.py @@ -159,8 +159,6 @@ def upload_file(self, command, pyversion, filename): body.write(title.encode('utf-8')) body.write(b"\r\n\r\n") body.write(value) - if value and value[-1:] == b'\r': - body.write(b'\n') # write an extra newline (lurve Macs) body.write(end_boundary) body = body.getvalue() diff --git a/tests/test_upload.py b/tests/test_upload.py index 2cb2f6ce93..c17d8e7d54 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -143,6 +143,32 @@ def test_upload(self): results = self.get_logs(INFO) self.assertEqual(results[-1], 75 * '-' + '\nxyzzy\n' + 75 * '-') + # bpo-32304: archives whose last byte was b'\r' were corrupted due to + # normalization intended for Mac OS 9. + def test_upload_correct_cr(self): + # content that ends with \r should not be modified. + tmp = self.mkdtemp() + path = os.path.join(tmp, 'xxx') + self.write_file(path, content='yy\r') + command, pyversion, filename = 'xxx', '2.6', path + dist_files = [(command, pyversion, filename)] + self.write_file(self.rc, PYPIRC_LONG_PASSWORD) + + # other fields that ended with \r used to be modified, now are + # preserved. + pkg_dir, dist = self.create_dist( + dist_files=dist_files, + description='long description\r' + ) + cmd = upload(dist) + cmd.show_response = 1 + cmd.ensure_finalized() + cmd.run() + + headers = dict(self.last_open.req.headers) + self.assertEqual(headers['Content-length'], '2172') + self.assertIn(b'long description\r', self.last_open.req.data) + def test_upload_fails(self): self.next_msg = "Not Found" self.next_code = 404 From aa09100cbf3e0fef9606bc5f2afdd5cb2840427d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Feb 2018 09:25:37 -0500 Subject: [PATCH 6902/8469] Update changelog. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 737cc0f866..e784c2d39a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.4.1 +------- + +* #1257: In bdist_egg.scan_module, fix ValueError on Python 3.7. + v38.4.0 ------- From 676fbed14e74ea4578997b7b27aa5ca9ba2607f5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Feb 2018 09:31:10 -0500 Subject: [PATCH 6903/8469] =?UTF-8?q?Bump=20version:=2038.4.0=20=E2=86=92?= =?UTF-8?q?=2038.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8b0a754020..b40abfae78 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.4.0 +current_version = 38.4.1 commit = True tag = True diff --git a/setup.py b/setup.py index b5be0b529d..94db5a3774 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.4.0", + version="38.4.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From ca71bc26f65f1eac9f26b5e5b0d7b4109186fe59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Feb 2018 16:36:23 -0500 Subject: [PATCH 6904/8469] Import Cython.Compiler.Main as recommended by Cython project to improve Cython detection. Fixes #1229. --- CHANGES.rst | 6 ++++++ setuptools/command/build_ext.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e784c2d39a..5a526e8a75 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.5.0 +------- + +* #1229: Expand imports in ``build_ext`` to refine detection of + Cython availability. + v38.4.1 ------- diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 36f53f0dd4..ea97b37b2c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -15,6 +15,9 @@ try: # Attempt to use Cython for building extensions, if available from Cython.Distutils.build_ext import build_ext as _build_ext + # Additionally, assert that the compiler module will load + # also. Ref #1229. + __import__('Cython.Compiler.Main') except ImportError: _build_ext = _du_build_ext From 038baa16016503708cf3bddcaf2f9b8d541c17bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Feb 2018 16:38:33 -0500 Subject: [PATCH 6905/8469] Prefer new_build_ext for Cython builds as recommended by Cython project. Fixes #1270. --- CHANGES.rst | 3 +++ setuptools/command/build_ext.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5a526e8a75..ef0a8a8760 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ v38.5.0 * #1229: Expand imports in ``build_ext`` to refine detection of Cython availability. +* #1270: When Cython is available, ``build_ext`` now uses the + new_build_ext. + v38.4.1 ------- diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index ea97b37b2c..01d65f5904 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -14,7 +14,7 @@ try: # Attempt to use Cython for building extensions, if available - from Cython.Distutils.build_ext import build_ext as _build_ext + from Cython.Distutils.build_ext import new_build_ext as _build_ext # Additionally, assert that the compiler module will load # also. Ref #1229. __import__('Cython.Compiler.Main') From 39459cfd652bf6c0073f52645607ffbc1c2aad89 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Feb 2018 17:37:30 -0500 Subject: [PATCH 6906/8469] Unpin pytest - not sure why it was pinned. --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 9c8bcff722..38b6924712 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,5 +3,5 @@ mock pytest-flake8; python_version>="2.7" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 -pytest>=3.0.2,<=3.2.5 +pytest>=3.0.2 wheel From 317a6ba8f2a4de338f83eacab1bc2085b8ae0e0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Feb 2018 17:54:43 -0500 Subject: [PATCH 6907/8469] =?UTF-8?q?Bump=20version:=2038.4.1=20=E2=86=92?= =?UTF-8?q?=2038.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b40abfae78..69585181dc 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.4.1 +current_version = 38.5.0 commit = True tag = True diff --git a/setup.py b/setup.py index 94db5a3774..090cf00e23 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.4.1", + version="38.5.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From cfb0d71afd7d6cb026e35930b80b98e779f52c24 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Feb 2018 17:55:15 -0500 Subject: [PATCH 6908/8469] Feed the hobgoblins (delint). --- setuptools/tests/test_virtualenv.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 9dbd3c86ed..eea11652a6 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -26,6 +26,7 @@ def bare_virtualenv(): SOURCE_DIR = os.path.join(os.path.dirname(__file__), '../..') + def test_clean_env_install(bare_virtualenv): """ Check setuptools can be installed in a clean environment. @@ -35,6 +36,7 @@ def test_clean_env_install(bare_virtualenv): 'python setup.py install', )).format(source=SOURCE_DIR)) + def test_pip_upgrade_from_source(virtualenv): """ Check pip can upgrade setuptools from source. @@ -56,6 +58,7 @@ def test_pip_upgrade_from_source(virtualenv): # And finally try to upgrade from source. virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) + def test_test_command_install_requirements(bare_virtualenv, tmpdir): """ Check the test command will install all required dependencies. @@ -64,6 +67,7 @@ def test_test_command_install_requirements(bare_virtualenv, tmpdir): 'cd {source}', 'python setup.py develop', )).format(source=SOURCE_DIR)) + def sdist(distname, version): dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version)) make_nspkg_sdist(str(dist_path), distname, version) From d916fa24c1eafb839ab18cc09c4c4350e183ab83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Feb 2018 10:29:14 -0500 Subject: [PATCH 6909/8469] Feed the hobgoblins (delint). --- setuptools/command/bdist_egg.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index d222c20863..423b818765 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -39,6 +39,7 @@ def strip_module(filename): filename = filename[:-6] return filename + def sorted_walk(dir): """Do os.walk in a reproducible way, independent of indeterministic filesystem readdir order @@ -48,6 +49,7 @@ def sorted_walk(dir): files.sort() yield base, dirs, files + def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): @@ -252,15 +254,17 @@ def zap_pyfiles(self): pattern = r'(?P.+)\.(?P[^.]+)\.pyc' m = re.match(pattern, name) - path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc') - log.info("Renaming file from [%s] to [%s]" % (path_old, path_new)) + path_new = os.path.join( + base, os.pardir, m.group('name') + '.pyc') + log.info( + "Renaming file from [%s] to [%s]" + % (path_old, path_new)) try: os.remove(path_new) except OSError: pass os.rename(path_old, path_new) - def zip_safe(self): safe = getattr(self.distribution, 'zip_safe', None) if safe is not None: @@ -412,7 +416,7 @@ def scan_module(egg_dir, base, name, stubs): elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size else: - skip = 16 # skip magic & reserved? & date & file size + skip = 16 # skip magic & reserved? & date & file size f = open(filename, 'rb') f.read(skip) code = marshal.load(f) From 211b194bee365b19aad10a487b20b48b17eb5c19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Feb 2018 05:46:57 -0500 Subject: [PATCH 6910/8469] Revert "Prefer new_build_ext for Cython builds as recommended by Cython project. Fixes #1270." Reopens #1270. Fixes #1271. This reverts commit 038baa16016503708cf3bddcaf2f9b8d541c17bc. --- setuptools/command/build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 01d65f5904..ea97b37b2c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -14,7 +14,7 @@ try: # Attempt to use Cython for building extensions, if available - from Cython.Distutils.build_ext import new_build_ext as _build_ext + from Cython.Distutils.build_ext import build_ext as _build_ext # Additionally, assert that the compiler module will load # also. Ref #1229. __import__('Cython.Compiler.Main') From 611ee7aab1df726030d18d6e22366877f29525ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Feb 2018 05:52:59 -0500 Subject: [PATCH 6911/8469] Update changelog. Ref #1271. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index ef0a8a8760..1b515f5533 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.5.1 +------- + +* #1271: Revert to Cython legacy ``build_ext`` behavior for + compatibility. + v38.5.0 ------- From b1c13f660d92fa5d707d2e1ec7acafe7d665d753 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Feb 2018 05:53:06 -0500 Subject: [PATCH 6912/8469] =?UTF-8?q?Bump=20version:=2038.5.0=20=E2=86=92?= =?UTF-8?q?=2038.5.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 69585181dc..2ad462d875 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.5.0 +current_version = 38.5.1 commit = True tag = True diff --git a/setup.py b/setup.py index 090cf00e23..a3123b57d5 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.5.0", + version="38.5.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9a66194a12e486bbff7aabca67f59afa3a960768 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 13:33:53 -0500 Subject: [PATCH 6913/8469] Prefer implied tuple. --- setuptools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index a70794a42e..8eddcae88a 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -109,7 +109,7 @@ def parse_configuration( distribution, command_options, ignore_option_errors) options.parse() - return [meta, options] + return meta, options class ConfigHandler(object): From 2efa19d215f2a7698c266363894c3184eb72129a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 21:39:12 -0500 Subject: [PATCH 6914/8469] Delint --- pkg_resources/__init__.py | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 08f9bbe7ef..d60f08bb65 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -90,6 +90,21 @@ # satisfy the linters. require = None working_set = None +add_activation_listener = None +resources_stream = None +cleanup_resources = None +resource_dir = None +resource_stream = None +set_extraction_path = None +resource_isdir = None +resource_string = None +iter_entry_points = None +resource_listdir = None +resource_filename = None +resource_exists = None +_distribution_finders = None +_namespace_handlers = None +_namespace_packages = None class PEP440Warning(RuntimeWarning): @@ -1074,9 +1089,12 @@ def can_add(self, dist): requirements specified when this environment was created, or False is returned. """ - return (self.python is None or dist.py_version is None - or dist.py_version == self.python) \ - and compatible_platforms(dist.platform, self.platform) + py_compat = ( + self.python is None + or dist.py_version is None + or dist.py_version == self.python + ) + return py_compat and compatible_platforms(dist.platform, self.platform) def remove(self, dist): """Remove `dist` from the environment""" @@ -1621,11 +1639,16 @@ def _register(cls): class EmptyProvider(NullProvider): """Provider that returns nothing for all requests""" - _isdir = _has = lambda self, path: False - _get = lambda self, path: '' - _listdir = lambda self, path: [] module_path = None + _isdir = _has = lambda self, path: False + + def _get(self, path): + return '' + + def _listdir(self, path): + return [] + def __init__(self): pass @@ -2515,7 +2538,8 @@ 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:') + def is_version_line(line): + return line.lower().startswith('version:') version_lines = filter(is_version_line, lines) line = next(iter(version_lines), '') _, _, value = line.partition(':') From dc071a330c51804e9749e6d08370b048b785eadc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 22:42:16 -0500 Subject: [PATCH 6915/8469] Add a comment --- pkg_resources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d60f08bb65..0854756041 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2676,6 +2676,10 @@ def version(self): @property def _dep_map(self): + """ + A map of extra to its list of (direct) requirements + for this distribution, including the null extra. + """ try: return self.__dep_map except AttributeError: From 872cab1085f7dd763daed76124d5bcb4457d733e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 22:46:44 -0500 Subject: [PATCH 6916/8469] Extract method for _build_dep_map --- pkg_resources/__init__.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0854756041..cecf769123 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2683,20 +2683,24 @@ def _dep_map(self): try: return self.__dep_map except AttributeError: - dm = self.__dep_map = {None: []} - for name in 'requires.txt', 'depends.txt': - for extra, reqs in split_sections(self._get_metadata(name)): - if extra: - if ':' in extra: - extra, marker = extra.split(':', 1) - if invalid_marker(marker): - # XXX warn - reqs = [] - elif not evaluate_marker(marker): - reqs = [] - extra = safe_extra(extra) or None - dm.setdefault(extra, []).extend(parse_requirements(reqs)) - return dm + self.__dep_map = self._build_dep_map() + return self.__dep_map + + def _build_dep_map(self): + dm = {None: []} + for name in 'requires.txt', 'depends.txt': + for extra, reqs in split_sections(self._get_metadata(name)): + if extra: + if ':' in extra: + extra, marker = extra.split(':', 1) + if invalid_marker(marker): + # XXX warn + reqs = [] + elif not evaluate_marker(marker): + reqs = [] + extra = safe_extra(extra) or None + dm.setdefault(extra, []).extend(parse_requirements(reqs)) + return dm def requires(self, extras=()): """List of Requirements needed for this distro if `extras` are used""" From 1bbafd871d1ea4419636ef0066af8afebf6f5d52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 22:51:34 -0500 Subject: [PATCH 6917/8469] Remove redundant initialization --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index cecf769123..af65c24997 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2687,7 +2687,7 @@ def _dep_map(self): return self.__dep_map def _build_dep_map(self): - dm = {None: []} + dm = {} for name in 'requires.txt', 'depends.txt': for extra, reqs in split_sections(self._get_metadata(name)): if extra: From 7d34b2d75fa19fa689fd3033a28fc53562ee6a98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 23:16:43 -0500 Subject: [PATCH 6918/8469] Extract method for filtering extras --- pkg_resources/__init__.py | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index af65c24997..7635a90168 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2683,22 +2683,36 @@ def _dep_map(self): try: return self.__dep_map except AttributeError: - self.__dep_map = self._build_dep_map() + self.__dep_map = self._filter_extras(self._build_dep_map()) return self.__dep_map + @staticmethod + def _filter_extras(dm): + """ + Given a mapping of extras to dependencies, strip off + environment markers and filter out any dependencies + not matching the markers. + """ + for extra in list(dm): + if extra: + new_extra = extra + reqs = dm.pop(extra) + if ':' in extra: + new_extra, marker = extra.split(':', 1) + if invalid_marker(marker): + # XXX warn + reqs = [] + elif not evaluate_marker(marker): + reqs = [] + new_extra = safe_extra(new_extra) or None + + dm.setdefault(new_extra, []).extend(reqs) + return dm + def _build_dep_map(self): dm = {} for name in 'requires.txt', 'depends.txt': for extra, reqs in split_sections(self._get_metadata(name)): - if extra: - if ':' in extra: - extra, marker = extra.split(':', 1) - if invalid_marker(marker): - # XXX warn - reqs = [] - elif not evaluate_marker(marker): - reqs = [] - extra = safe_extra(extra) or None dm.setdefault(extra, []).extend(parse_requirements(reqs)) return dm From ae9709b31450cdff1c5d00aefcb2ad0d11999f12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 23:40:27 -0500 Subject: [PATCH 6919/8469] Use filter --- pkg_resources/__init__.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7635a90168..c32de48908 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2693,20 +2693,19 @@ def _filter_extras(dm): environment markers and filter out any dependencies not matching the markers. """ - for extra in list(dm): - if extra: - new_extra = extra - reqs = dm.pop(extra) - if ':' in extra: - new_extra, marker = extra.split(':', 1) - if invalid_marker(marker): - # XXX warn - reqs = [] - elif not evaluate_marker(marker): - reqs = [] - new_extra = safe_extra(new_extra) or None - - dm.setdefault(new_extra, []).extend(reqs) + for extra in list(filter(None, dm)): + new_extra = extra + reqs = dm.pop(extra) + if ':' in extra: + new_extra, marker = extra.split(':', 1) + if invalid_marker(marker): + # XXX warn + reqs = [] + elif not evaluate_marker(marker): + reqs = [] + new_extra = safe_extra(new_extra) or None + + dm.setdefault(new_extra, []).extend(reqs) return dm def _build_dep_map(self): From cdf2cc4a521d05ad76aa96cb37504cdb9f824c2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 23:41:05 -0500 Subject: [PATCH 6920/8469] Use partition --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c32de48908..1d8d88c8ab 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2696,8 +2696,8 @@ def _filter_extras(dm): for extra in list(filter(None, dm)): new_extra = extra reqs = dm.pop(extra) - if ':' in extra: - new_extra, marker = extra.split(':', 1) + new_extra, _, marker = extra.partition(':') + if marker: if invalid_marker(marker): # XXX warn reqs = [] From 271dee89e1ec9740c008f1938aa896616e164ede Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 10 Feb 2018 23:51:45 -0500 Subject: [PATCH 6921/8469] Perform marker calculation in one step --- pkg_resources/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 1d8d88c8ab..062b82c639 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2697,12 +2697,12 @@ def _filter_extras(dm): new_extra = extra reqs = dm.pop(extra) new_extra, _, marker = extra.partition(':') - if marker: - if invalid_marker(marker): - # XXX warn - reqs = [] - elif not evaluate_marker(marker): - reqs = [] + fails_marker = marker and ( + invalid_marker(marker) + or not evaluate_marker(marker) + ) + if fails_marker: + reqs = [] new_extra = safe_extra(new_extra) or None dm.setdefault(new_extra, []).extend(reqs) From f59e08fa002c62b8a9a36eed4e068d471585e565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sun, 18 Feb 2018 18:14:54 -0500 Subject: [PATCH 6922/8469] Improve error message for "setup.py upload" without dist files (#21060) --- command/upload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index f7752f9d12..32dda359ba 100644 --- a/command/upload.py +++ b/command/upload.py @@ -57,7 +57,8 @@ def finalize_options(self): def run(self): if not self.distribution.dist_files: - msg = "No dist file created in earlier command" + msg = ("Must create and upload files in one command " + "(e.g. setup.py sdist upload)") raise DistutilsOptionError(msg) for command, pyversion, filename in self.distribution.dist_files: self.upload_file(command, pyversion, filename) From 885402d3ffb3d77dca661487038aa88aaaa483cc Mon Sep 17 00:00:00 2001 From: Vincent Philippon Date: Mon, 19 Feb 2018 18:28:00 -0500 Subject: [PATCH 6923/8469] Fix documentation inconsistency on version specifier The `,` is the equivalent of an "and". Also, the pkg_resources section documents and behave like this too: ``` >>> pkg_resources.Requirement('requests>1,>2').specifier.contains('1.2.3') False >>> pkg_resources.Requirement('requests>1,>2').specifier.contains('2.3.4') True ``` --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index cebb6268a7..2425e100ee 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -571,7 +571,7 @@ project name or version identifier must be replaced with ``-``. Version specifiers for a given project are internally sorted into ascending version order, and used to establish what ranges of versions are acceptable. Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes -``">1"``, and ``"<2,<3"`` becomes ``"<3"``). ``"!="`` versions are excised from +``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from the ranges they fall within. A project's version is then checked for membership in the resulting ranges. (Note that providing conflicting conditions for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may From 0d99729166cc722bc86a1284141f45ab34bca793 Mon Sep 17 00:00:00 2001 From: Vincent Philippon Date: Mon, 19 Feb 2018 18:37:19 -0500 Subject: [PATCH 6924/8469] Fix documentation spacing error causing wrong formatting. --- docs/pkg_resources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 8d337cb297..b40a209fe4 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -638,7 +638,7 @@ Requirements Parsing sorted into ascending version order, and used to establish what ranges of versions are acceptable. Adjacent redundant conditions are effectively consolidated (e.g. ``">1, >2"`` produces the same results as ``">2"``, and - ``"<2,<3"`` produces the same results as``"<2"``). ``"!="`` versions are + ``"<2,<3"`` produces the same results as ``"<2"``). ``"!="`` versions are excised from the ranges they fall within. The version being tested for acceptability is then checked for membership in the resulting ranges. From d2d76256e1b19fe58d23d14891208d076873f07b Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Tue, 20 Feb 2018 03:46:39 +0100 Subject: [PATCH 6925/8469] enable pip cache in appveyor build --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 8ecee10bdb..7c61455ce6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,9 @@ install: build: off +cache: + - '%LOCALAPPDATA%\pip\Cache' + test_script: - "python bootstrap.py" - "python -m pip install tox" From 5da3a845683ded446cad8af009d3ab9f264a944f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 20 Feb 2018 20:45:22 -0500 Subject: [PATCH 6926/8469] Remove reference to bitbucket mirror. Fixes #1280. --- docs/developer-guide.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 8a1363808e..b2c1a0cefd 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -82,9 +82,6 @@ branches or multiple forks to maintain separate efforts. The Continuous Integration tests that validate every release are run from this repository. -For posterity, the old `Bitbucket mirror -`_ is available. - ------- Testing ------- From 0a6264dc11a7c692f2444825da2bf91078dcb118 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Mar 2018 15:59:28 -0500 Subject: [PATCH 6927/8469] Prevent StopIteration from bubbling up in parse_requirements. Fixes #1285. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 1b515f5533..e518b19949 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.5.2 +------- + +* #1285: Fixed RuntimeError in pkg_resources.parse_requirements + on Python 3.7 (stemming from PEP 479). + v38.5.1 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 062b82c639..c9b2d251d9 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3035,7 +3035,10 @@ def parse_requirements(strs): # If there is a line continuation, drop it, and append the next line. if line.endswith('\\'): line = line[:-2].strip() - line += next(lines) + try: + line += next(lines) + except StopIteration: + return yield Requirement(line) From e4da2275b57335c5ea2574b728c926eeefe6875c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Mar 2018 17:01:48 -0500 Subject: [PATCH 6928/8469] Skip tests in test_virtualenv if the prefix is broken on that virtualenv. Ref #1284. --- setuptools/tests/test_virtualenv.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index eea11652a6..b66a311d73 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,6 +2,7 @@ import os import sys +import pytest from pytest import yield_fixture from pytest_fixture_config import yield_requires_config @@ -11,6 +12,20 @@ from .test_easy_install import make_nspkg_sdist +@pytest.fixture(autouse=True) +def pytest_virtualenv_works(virtualenv): + """ + pytest_virtualenv may not work. if it doesn't, skip these + tests. See #1284. + """ + venv_prefix = virtualenv.run( + 'python -c "import sys; print(sys.prefix)"', + capture=True, + ).strip() + if venv_prefix == sys.prefix: + pytest.skip("virtualenv is broken (see pypa/setuptools#1284)") + + @yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable']) @yield_fixture(scope='function') def bare_virtualenv(): From 39f29d6e0efd6a1e688cd057fb29877648061893 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Mar 2018 17:03:28 -0500 Subject: [PATCH 6929/8469] Include tox-venv to bring venv from the future. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1fd73aa51e..a8494c03a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ cache: pip install: # need tox to get started -- pip install tox +- pip install tox tox-venv # Output the env, to verify behavior - env From 5ff527aa357195997a4fbe6d04661a2f187b165f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 5 Mar 2018 17:12:27 -0500 Subject: [PATCH 6930/8469] Exclude tox-venv on Python 3.3, where it fails. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8494c03a9..ffbd72a3d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ cache: pip install: # need tox to get started -- pip install tox tox-venv +- pip install tox 'tox-venv; python_version!="3.3"' # Output the env, to verify behavior - env From c9ecd46f7b8a2a70a2fdf0535caf582602341042 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Mar 2018 12:08:46 -0500 Subject: [PATCH 6931/8469] =?UTF-8?q?Bump=20version:=2038.5.1=20=E2=86=92?= =?UTF-8?q?=2038.5.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2ad462d875..37dbe5ec97 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.5.1 +current_version = 38.5.2 commit = True tag = True diff --git a/setup.py b/setup.py index a3123b57d5..0e438d9a0e 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.5.1", + version="38.5.2", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e065e9012612f3e0b8713fd61d298126f7fcfa21 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Mar 2018 12:24:12 -0500 Subject: [PATCH 6932/8469] Feed the hobgoblins (delint). --- pkg_resources/__init__.py | 2 +- .../tests/test_find_distributions.py | 1 + pkg_resources/tests/test_pkg_resources.py | 6 ++- pkg_resources/tests/test_resources.py | 41 +++++++++++++------ pkg_resources/tests/test_working_set.py | 10 +++-- 5 files changed, 42 insertions(+), 18 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c9b2d251d9..92272f20c6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1307,7 +1307,7 @@ def get_cache_path(self, archive_name, names=()): target_path = os.path.join(extract_path, archive_name + '-tmp', *names) try: _bypass_ensure_directory(target_path) - except: + except Exception: self.extraction_error() self._warn_unsafe_extraction_path(extract_path) diff --git a/pkg_resources/tests/test_find_distributions.py b/pkg_resources/tests/test_find_distributions.py index 97999b3354..d735c5902f 100644 --- a/pkg_resources/tests/test_find_distributions.py +++ b/pkg_resources/tests/test_find_distributions.py @@ -13,6 +13,7 @@ ) """.lstrip() + class TestFindDistributions: @pytest.fixture diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index f2c00b297b..7442b79f74 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -154,8 +154,10 @@ def test_setuptools_not_imported(self): lines = ( 'import pkg_resources', 'import sys', - 'assert "setuptools" not in sys.modules, ' - '"setuptools was imported"', + ( + 'assert "setuptools" not in sys.modules, ' + '"setuptools was imported"' + ), ) cmd = [sys.executable, '-c', '; '.join(lines)] subprocess.check_call(cmd) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index dcd2f42c17..05438219bf 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -11,7 +11,8 @@ from pkg_resources.extern import packaging import pkg_resources -from pkg_resources import (parse_requirements, VersionConflict, parse_version, +from pkg_resources import ( + parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, WorkingSet) @@ -51,7 +52,8 @@ def testCollection(self): assert list(ad) == ['foopkg'] # Distributions sort by version - assert [dist.version for dist in ad['FooPkg']] == ['1.4', '1.3-1', '1.2'] + expected = ['1.4', '1.3-1', '1.2'] + assert [dist.version for dist in ad['FooPkg']] == expected # Removing a distribution leaves sequence alone ad.remove(ad['FooPkg'][1]) @@ -97,7 +99,10 @@ def checkFooPkg(self, d): def testDistroBasics(self): d = Distribution( "/some/path", - project_name="FooPkg", version="1.3-1", py_version="2.4", platform="win32" + project_name="FooPkg", + version="1.3-1", + py_version="2.4", + platform="win32", ) self.checkFooPkg(d) @@ -113,10 +118,11 @@ def testDistroParse(self): def testDistroMetadata(self): d = Distribution( - "/some/path", project_name="FooPkg", py_version="2.4", platform="win32", + "/some/path", project_name="FooPkg", + py_version="2.4", platform="win32", metadata=Metadata( ('PKG-INFO', "Metadata-Version: 1.0\nVersion: 1.3-1\n") - ) + ), ) self.checkFooPkg(d) @@ -164,7 +170,10 @@ def testResolve(self): ad.add(Baz) # Activation list now includes resolved dependency - assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) == [Foo, Baz] + assert ( + list(ws.resolve(parse_requirements("Foo[bar]"), ad)) + == [Foo, Baz] + ) # Requests for conflicting versions produce VersionConflict with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) @@ -415,7 +424,8 @@ def checkSubMap(self, m): submap_expect = dict( feature1=EntryPoint('feature1', 'somemodule', ['somefunction']), - feature2=EntryPoint('feature2', 'another.module', ['SomeClass'], ['extra1', 'extra2']), + feature2=EntryPoint( + 'feature2', 'another.module', ['SomeClass'], ['extra1', 'extra2']), feature3=EntryPoint('feature3', 'this.module', extras=['something']) ) submap_str = """ @@ -518,11 +528,17 @@ def testSetuptoolsProjectName(self): Requirement.parse('setuptools').project_name == 'setuptools') # setuptools 0.7 and higher means setuptools. assert ( - Requirement.parse('setuptools == 0.7').project_name == 'setuptools') + Requirement.parse('setuptools == 0.7').project_name + == 'setuptools' + ) assert ( - Requirement.parse('setuptools == 0.7a1').project_name == 'setuptools') + Requirement.parse('setuptools == 0.7a1').project_name + == 'setuptools' + ) assert ( - Requirement.parse('setuptools >= 0.7').project_name == 'setuptools') + Requirement.parse('setuptools >= 0.7').project_name + == 'setuptools' + ) class TestParsing: @@ -552,7 +568,7 @@ def testSplitting(self): """ assert ( list(pkg_resources.split_sections(sample)) - == + == [ (None, ["x"]), ("Y", ["z", "a"]), @@ -838,7 +854,8 @@ def test_path_order(self, symlinked_tmpdir): subpkg = nspkg / 'subpkg' subpkg.ensure_dir() (nspkg / '__init__.py').write_text(self.ns_str, encoding='utf-8') - (subpkg / '__init__.py').write_text(vers_str % number, encoding='utf-8') + (subpkg / '__init__.py').write_text( + vers_str % number, encoding='utf-8') import nspkg.subpkg import nspkg diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index 422a7283e9..42ddcc86f2 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -1,6 +1,7 @@ import inspect import re import textwrap +import functools import pytest @@ -15,6 +16,7 @@ def strip_comments(s): if l.strip() and not l.strip().startswith('#') ) + def parse_distributions(s): ''' Parse a series of distribution specs of the form: @@ -31,7 +33,8 @@ def parse_distributions(s): yield 2 distributions: - project_name=foo, version=0.2 - - project_name=bar, version=1.0, requires=['foo>=3.0', 'baz; extra=="feature"'] + - project_name=bar, version=1.0, + requires=['foo>=3.0', 'baz; extra=="feature"'] ''' s = s.strip() for spec in re.split('\n(?=[^\s])', s): @@ -42,7 +45,7 @@ def parse_distributions(s): name, version = fields.pop(0).split('-') if fields: requires = textwrap.dedent(fields.pop(0)) - metadata=Metadata(('requires.txt', requires)) + metadata = Metadata(('requires.txt', requires)) else: metadata = None dist = pkg_resources.Distribution(project_name=name, @@ -467,7 +470,8 @@ def test_working_set_resolve(installed_dists, installable_dists, requirements, replace_conflicting, resolved_dists_or_exception): ws = pkg_resources.WorkingSet([]) list(map(ws.add, installed_dists)) - resolve_call = lambda: ws.resolve( + resolve_call = functools.partial( + ws.resolve, requirements, installer=FakeInstaller(installable_dists), replace_conflicting=replace_conflicting, ) From f4464151c2fbd3f684ce00fadfc0e0c27097e2df Mon Sep 17 00:00:00 2001 From: David Pugh Date: Thu, 8 Mar 2018 13:36:11 +0000 Subject: [PATCH 6933/8469] Updated package_data documentation --- docs/setuptools.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2425e100ee..ce20c548fe 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -885,6 +885,14 @@ Also notice that if you use paths, you *must* use a forward slash (``/``) as the path separator, even if you are on Windows. Setuptools automatically converts slashes to appropriate platform-specific separators at build time. +If datafiles are contained in a subdirectory of a package that isn't a package +itself (no ``__init__.py``) then the subdirectory names (or ``*``) are required +in the ``package_data`` argument (as shown above with ``'data/*.dat'``). + +When building an ``sdist`` the datafiles are also drawn from the +``package_name.egg-info/SOURCES.txt`` file so make sure that this is removed if +the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. + (Note: although the ``package_data`` argument was previously only available in ``setuptools``, it was also added to the Python ``distutils`` package as of Python 2.4; there is `some documentation for the feature`__ available on the @@ -926,7 +934,7 @@ In summary, the three options allow you to: Accept all data files and directories matched by ``MANIFEST.in``. ``package_data`` - Specify additional patterns to match files and directories that may or may + Specify additional patterns to match files that may or may not be matched by ``MANIFEST.in`` or found in source control. ``exclude_package_data`` From cb39b3f2e4eed76a2cae7ae8f68489067be5f978 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Mar 2018 16:34:08 -0500 Subject: [PATCH 6934/8469] Add some commas. --- docs/setuptools.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index ce20c548fe..65080a0b21 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -886,11 +886,11 @@ the path separator, even if you are on Windows. Setuptools automatically converts slashes to appropriate platform-specific separators at build time. If datafiles are contained in a subdirectory of a package that isn't a package -itself (no ``__init__.py``) then the subdirectory names (or ``*``) are required +itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required in the ``package_data`` argument (as shown above with ``'data/*.dat'``). -When building an ``sdist`` the datafiles are also drawn from the -``package_name.egg-info/SOURCES.txt`` file so make sure that this is removed if +When building an ``sdist``, the datafiles are also drawn from the +``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. (Note: although the ``package_data`` argument was previously only available in From b2ea3c4a20d008622caec445f5b6916ddd420d16 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Mon, 5 Mar 2018 21:57:06 -0600 Subject: [PATCH 6935/8469] Updates for PEP 566 (Metadata 2.1) --- setuptools/dist.py | 27 +++++++++++++++++++++++---- setuptools/tests/test_config.py | 1 + setuptools/tests/test_egg_info.py | 19 +++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index c2bfdbc7c6..33ceb40426 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -46,6 +46,8 @@ def write_pkg_file(self, file): # Setuptools specific for PEP 345 if hasattr(self, 'python_requires') or self.project_urls: version = '1.2' + if self.long_description_content_type or self.provides_extras: + version = '2.1' file.write('Metadata-Version: %s\n' % version) file.write('Name: %s\n' % self.get_name()) @@ -60,10 +62,6 @@ def write_pkg_file(self, file): for project_url in self.project_urls.items(): file.write('Project-URL: %s, %s\n' % project_url) - long_desc_content_type = \ - self.long_description_content_type or 'UNKNOWN' - file.write('Description-Content-Type: %s\n' % long_desc_content_type) - long_desc = rfc822_escape(self.get_long_description()) file.write('Description: %s\n' % long_desc) @@ -83,6 +81,16 @@ def write_pkg_file(self, file): if hasattr(self, 'python_requires'): file.write('Requires-Python: %s\n' % self.python_requires) + # PEP 566 + if self.long_description_content_type: + file.write( + 'Description-Content-Type: %s\n' % + self.long_description_content_type + ) + if self.provides_extras: + for extra in self.provides_extras: + file.write('Provides-Extra: %s\n' % extra) + # from Python 3.4 def write_pkg_info(self, base_dir): @@ -339,6 +347,9 @@ def __init__(self, attrs=None): self.metadata.long_description_content_type = attrs.get( 'long_description_content_type' ) + self.metadata.provides_extras = getattr( + self.metadata, 'provides_extras', set() + ) if isinstance(self.metadata.version, numbers.Number): # Some people apparently take "version number" too literally :) @@ -372,6 +383,14 @@ def _finalize_requires(self): """ if getattr(self, 'python_requires', None): self.metadata.python_requires = self.python_requires + + if getattr(self, 'extras_require', None): + for extra in self.extras_require.keys(): + # Since this gets called multiple times at points where the + # keys have become 'converted' extras, ensure that we are only + # truly adding extras we haven't seen before here. + self.metadata.provides_extras.add(extra.split(':')[0]) + self._convert_extras_requirements() self._move_install_requirements_markers() diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 383e0d3071..abb953a8fa 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -546,6 +546,7 @@ def test_extras_require(self, tmpdir): 'pdf': ['ReportLab>=1.2', 'RXP'], 'rest': ['docutils>=0.3', 'pack==1.1,==1.3'] } + assert dist.metadata.provides_extras == set(['pdf', 'rest']) def test_entry_points(self, tmpdir): _, config = fake_env( diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7d12434e1f..ff5fa0a30b 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -420,6 +420,24 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_provides_extra(self, tmpdir_cwd, env): + self._setup_script_with_requires( + 'extras_require={"foobar": ["barbazquux"]},') + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + code, data = environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + assert 'Provides-Extra: foobar' in pkg_info_lines + assert 'Metadata-Version: 2.1' in pkg_info_lines + def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to # the `setup` function results in writing a `Description-Content-Type` @@ -444,6 +462,7 @@ def test_long_description_content_type(self, tmpdir_cwd, env): pkg_info_lines = pkginfo_file.read().split('\n') expected_line = 'Description-Content-Type: text/markdown' assert expected_line in pkg_info_lines + assert 'Metadata-Version: 2.1' in pkg_info_lines def test_project_urls(self, tmpdir_cwd, env): # Test that specifying a `project_urls` dict to the `setup` From bb85f40858438be88d22fe1fc35aa6c62cabe80a Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Thu, 15 Mar 2018 15:55:23 -0500 Subject: [PATCH 6936/8469] Add changelog entry --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e518b19949..ccac3d35ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.5.3 +------- + +* Support Metadata 2.1 (`PEP 566 `_) + v38.5.2 ------- From fe97cb5453c22e63784dd1e24baaac902cc950fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Mar 2018 18:39:54 -0400 Subject: [PATCH 6937/8469] Update CHANGES.rst --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ccac3d35ef..7c3a46c675 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ -v38.5.3 +v38.6.0 ------- -* Support Metadata 2.1 (`PEP 566 `_) +* #1286: Add support for Metadata 2.1 (PEP 566). v38.5.2 ------- From 16187afb3f532199f4951801d4e39939c560facc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Mar 2018 18:40:35 -0400 Subject: [PATCH 6938/8469] =?UTF-8?q?Bump=20version:=2038.5.2=20=E2=86=92?= =?UTF-8?q?=2038.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 37dbe5ec97..560b724ba0 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.5.2 +current_version = 38.6.0 commit = True tag = True diff --git a/setup.py b/setup.py index 0e438d9a0e..ff064e3381 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.5.2", + version="38.6.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From 9e554095b4e987371f7929902d12278b4e2ad91e Mon Sep 17 00:00:00 2001 From: wim glenn Date: Fri, 16 Mar 2018 01:14:19 -0500 Subject: [PATCH 6939/8469] provide a failing test case for regression introduced in b2ea3c4a - spurious "Provides-Extra:" generated in metadata --- setuptools/tests/test_egg_info.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index ff5fa0a30b..d221167152 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -438,6 +438,23 @@ def test_provides_extra(self, tmpdir_cwd, env): assert 'Provides-Extra: foobar' in pkg_info_lines assert 'Metadata-Version: 2.1' in pkg_info_lines + def test_doesnt_provides_extra(self, tmpdir_cwd, env): + self._setup_script_with_requires( + '''install_requires=["spam ; python_version<'3.3'"]''') + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_text = pkginfo_file.read() + assert 'Provides-Extra:' not in pkg_info_text + def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to # the `setup` function results in writing a `Description-Content-Type` From 696afcad2d750f55c66ffc2a504fa2ebed1b6a59 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Fri, 16 Mar 2018 01:17:06 -0500 Subject: [PATCH 6940/8469] fix for regression - spurious "Provides-Extra:" generated in metadata --- setuptools/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 33ceb40426..38ab4044b0 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -89,7 +89,8 @@ def write_pkg_file(self, file): ) if self.provides_extras: for extra in self.provides_extras: - file.write('Provides-Extra: %s\n' % extra) + if extra: + file.write('Provides-Extra: %s\n' % extra) # from Python 3.4 From 1fffc0eff9892c7c9bc3b177dd3483a41e85e40e Mon Sep 17 00:00:00 2001 From: wim glenn Date: Fri, 16 Mar 2018 14:27:42 -0500 Subject: [PATCH 6941/8469] address review comments and squash the empty string extra earlier --- setuptools/dist.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 38ab4044b0..d24958daae 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -89,8 +89,7 @@ def write_pkg_file(self, file): ) if self.provides_extras: for extra in self.provides_extras: - if extra: - file.write('Provides-Extra: %s\n' % extra) + file.write('Provides-Extra: %s\n' % extra) # from Python 3.4 @@ -390,7 +389,9 @@ def _finalize_requires(self): # Since this gets called multiple times at points where the # keys have become 'converted' extras, ensure that we are only # truly adding extras we haven't seen before here. - self.metadata.provides_extras.add(extra.split(':')[0]) + extra = extra.split(':')[0] + if extra: + self.metadata.provides_extras.add(extra) self._convert_extras_requirements() self._move_install_requirements_markers() From d8170d79a1059b6c58e1b54d94c6600f85354bf6 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 16 Mar 2018 18:23:24 -0400 Subject: [PATCH 6942/8469] Add support for maintainer in PKG-INFO Per PEP 345, metadata Version 1.2 should support the Author, Maintainer, Author-Email and Maintainer-Email fields. --- setuptools/dist.py | 48 +++++++++++++++------ setuptools/tests/test_dist.py | 78 +++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 12 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 33ceb40426..a6928c4984 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -14,6 +14,7 @@ DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, ) from distutils.util import rfc822_escape +from distutils.version import StrictVersion from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse @@ -34,28 +35,46 @@ def _get_unpatched(cls): warnings.warn("Do not call this function", DeprecationWarning) return get_unpatched(cls) +def get_metadata_version(dist_md): + if dist_md.long_description_content_type or dist_md.provides_extras: + return StrictVersion('2.1') + elif getattr(dist_md, 'python_requires', None) is not None: + return StrictVersion('1.2') + elif (dist_md.provides or dist_md.requires or dist_md.obsoletes or + dist_md.classifiers or dist_md.download_url): + return StrictVersion('1.1') + + return StrictVersion('1.0') + # Based on Python 3.5 version def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ - version = '1.0' - if (self.provides or self.requires or self.obsoletes or - self.classifiers or self.download_url): - version = '1.1' - # Setuptools specific for PEP 345 - if hasattr(self, 'python_requires') or self.project_urls: - version = '1.2' - if self.long_description_content_type or self.provides_extras: - version = '2.1' + version = get_metadata_version(self) file.write('Metadata-Version: %s\n' % version) file.write('Name: %s\n' % self.get_name()) file.write('Version: %s\n' % self.get_version()) file.write('Summary: %s\n' % self.get_description()) file.write('Home-page: %s\n' % self.get_url()) - file.write('Author: %s\n' % self.get_contact()) - file.write('Author-email: %s\n' % self.get_contact_email()) + + if version == '1.2': + file.write('Author: %s\n' % self.get_contact()) + file.write('Author-email: %s\n' % self.get_contact_email()) + else: + optional_fields = ( + ('Author', 'author'), + ('Author-email', 'author_email'), + ('Maintainer', 'maintainer'), + ('Maintainer-email', 'maintainer_email'), + ) + + for field, attr in optional_fields: + attr_val = getattr(self, attr) + if attr_val is not None: + file.write('%s: %s\n' % (field, attr_val)) + file.write('License: %s\n' % self.get_license()) if self.download_url: file.write('Download-URL: %s\n' % self.download_url) @@ -69,7 +88,12 @@ def write_pkg_file(self, file): if keywords: file.write('Keywords: %s\n' % keywords) - self._write_list(file, 'Platform', self.get_platforms()) + if version == '1.2': + for platform in self.get_platforms(): + file.write('Platform: %s\n' % platform) + else: + self._write_list(file, 'Platform', self.get_platforms()) + self._write_list(file, 'Classifier', self.get_classifiers()) # PEP 314 diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index c4c9bd0388..0c10f05bc1 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -1,10 +1,13 @@ +# -*- coding: utf-8 -*- from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin +from setuptools.extern.six import StringIO from .textwrap import DALS from .test_easy_install import make_nspkg_sdist +import pytest def test_dist_fetch_build_egg(tmpdir): """ @@ -45,3 +48,78 @@ def sdist_with_index(distname, version): for r in reqs ] assert [dist.key for dist in resolved_dists if dist] == reqs + + +def __maintainer_test_cases(): + attrs = {"name": "package", + "version": "1.0", + "description": "xxx"} + + def merge_dicts(d1, d2): + d1 = d1.copy() + d1.update(d2) + + return d1 + + test_cases = [ + ('No author, no maintainer', attrs.copy()), + ('Author (no e-mail), no maintainer', merge_dicts(attrs, + {'author': 'Author Name'})), + ('Author (e-mail), no maintainer', merge_dicts(attrs, + {'author': 'Author Name', + 'author_email': 'author@name.com'})), + ('No author, maintainer (no e-mail)', merge_dicts(attrs, + {'maintainer': 'Maintainer Name'})), + ('No author, maintainer (e-mail)', merge_dicts(attrs, + {'maintainer': 'Maintainer Name', + 'maintainer_email': 'maintainer@name.com'})), + ('Author (no e-mail), Maintainer (no-email)', merge_dicts(attrs, + {'author': 'Author Name', + 'maintainer': 'Maintainer Name'})), + ('Author (e-mail), Maintainer (e-mail)', merge_dicts(attrs, + {'author': 'Author Name', + 'author_email': 'author@name.com', + 'maintainer': 'Maintainer Name', + 'maintainer_email': 'maintainer@name.com'})), + ('No author (e-mail), no maintainer (e-mail)', merge_dicts(attrs, + {'author_email': 'author@name.com', + 'maintainer_email': 'maintainer@name.com'})), + ('Author unicode', merge_dicts(attrs, + {'author': '鉄沢寛'})), + ('Maintainer unicode', merge_dicts(attrs, + {'maintainer': 'Jan Åukasiewicz'})), + ] + + return test_cases + +@pytest.mark.parametrize('name,attrs', __maintainer_test_cases()) +def test_maintainer_author(name, attrs): + tested_keys = { + 'author': 'Author', + 'author_email': 'Author-email', + 'maintainer': 'Maintainer', + 'maintainer_email': 'Maintainer-email', + } + + # Generate a PKG-INFO file + dist = Distribution(attrs) + PKG_INFO = StringIO() + dist.metadata.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) + + pkg_lines = PKG_INFO.readlines() + pkg_lines = [_ for _ in pkg_lines if _] # Drop blank lines + pkg_lines_set = set(pkg_lines) + + # Duplicate lines should not be generated + assert len(pkg_lines) == len(pkg_lines_set) + + for fkey, dkey in tested_keys.items(): + val = attrs.get(dkey, None) + if val is None: + for line in pkg_lines: + assert not line.startswith(fkey + ':') + else: + line = '%s: %s' % (fkey, val) + assert line in pkg_lines_set + From 604e0852c6020904419f9be37b2bec2c3c3b3779 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 10:27:41 -0400 Subject: [PATCH 6943/8469] Update changelog. Ref #1293. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 7c3a46c675..01fb448ccf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.6.1 +------- + +* #1292: Avoid generating ``Provides-Extra`` in metadata when + no extra is present (but environment markers are). + v38.6.0 ------- From 025690980c3540dc170abec3a3b18fd11f8b15bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 10:27:46 -0400 Subject: [PATCH 6944/8469] =?UTF-8?q?Bump=20version:=2038.6.0=20=E2=86=92?= =?UTF-8?q?=2038.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 560b724ba0..5a9a875ced 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.6.0 +current_version = 38.6.1 commit = True tag = True diff --git a/setup.py b/setup.py index ff064e3381..a59ba44b91 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.6.0", + version="38.6.1", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e2de3b60da1408bd9dd19910e67a9660f3dbbf1b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 10:31:16 -0400 Subject: [PATCH 6945/8469] Update changelog. --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 01fb448ccf..cabddaf661 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +v38.7.0 +------- + +* #1288: Add support for maintainer in PKG-INFO. + v38.6.1 ------- From fc45e788f6c470ec983e3e1cbeb6054ffbb9fd56 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 10:32:30 -0400 Subject: [PATCH 6946/8469] =?UTF-8?q?Bump=20version:=2038.6.1=20=E2=86=92?= =?UTF-8?q?=2038.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5a9a875ced..1d8dd5ad4e 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.6.1 +current_version = 38.7.0 commit = True tag = True diff --git a/setup.py b/setup.py index a59ba44b91..c25ade00c2 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.6.1", + version="38.7.0", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", From e141c08edc47834b04eb0fd7c1510ee04b682921 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 11:38:32 -0400 Subject: [PATCH 6947/8469] Use six for splituser --- setuptools/package_index.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ad7433078e..64a11c9b0a 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -9,11 +9,6 @@ import itertools from functools import wraps -try: - from urllib.parse import splituser -except ImportError: - from urllib2 import splituser - from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map @@ -857,7 +852,7 @@ def _download_svn(self, url, filename): scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/', 1) - auth, host = splituser(netloc) + auth, host = urllib.parse.splituser(netloc) if auth: if ':' in auth: user, pw = auth.split(':', 1) @@ -1064,7 +1059,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): raise http_client.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): - auth, host = splituser(netloc) + auth, host = urllib.parse.splituser(netloc) else: auth = None From 6fba91c17b264beec674bb25019e3888fe5ba305 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 11:53:22 -0400 Subject: [PATCH 6948/8469] Rely on stdlib to decode entities. --- setuptools/package_index.py | 17 ++--------------- setuptools/py33compat.py | 9 +++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 64a11c9b0a..914b5e6159 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -23,6 +23,7 @@ from distutils.errors import DistutilsError from fnmatch import translate from setuptools.py27compat import get_all_headers +from setuptools.py33compat import unescape from setuptools.wheel import Wheel EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$') @@ -931,23 +932,9 @@ def warn(self, msg, *args): entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub -def uchr(c): - if not isinstance(c, int): - return c - if c > 255: - return six.unichr(c) - return chr(c) - - def decode_entity(match): what = match.group(1) - if what.startswith('#x'): - what = int(what[2:], 16) - elif what.startswith('#'): - what = int(what[1:]) - else: - what = six.moves.html_entities.name2codepoint.get(what, match.group(0)) - return uchr(what) + return unescape(what) def htmldecode(text): diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index af64d5d1e2..2a73ebb3c7 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -2,7 +2,13 @@ import array import collections +try: + import html +except ImportError: + html = None + from setuptools.extern import six +from setuptools.extern.six.moves import html_parser OpArg = collections.namedtuple('OpArg', 'opcode arg') @@ -43,3 +49,6 @@ def __iter__(self): Bytecode = getattr(dis, 'Bytecode', Bytecode_compat) + + +unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape) From d97e55a10ecc0d9934de275722b8664827a21f5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 12:43:57 -0400 Subject: [PATCH 6949/8469] Extract version comparisons as pytest parameters. --- pkg_resources/tests/test_resources.py | 135 ++++++++++---------------- 1 file changed, 51 insertions(+), 84 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 05438219bf..05f35adef2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -4,6 +4,7 @@ import sys import string import platform +import itertools from pkg_resources.extern.six.moves import map @@ -17,6 +18,14 @@ WorkingSet) +# from Python 3.6 docs. +def pairwise(iterable): + "s -> (s0,s1), (s1,s2), (s2, s3), ..." + a, b = itertools.tee(iterable) + next(b, None) + return zip(a, b) + + class Metadata(pkg_resources.EmptyProvider): """Mock object to return metadata as if from an on-disk distribution""" @@ -650,95 +659,53 @@ def test_spaces_between_multiple_versions(self): req, = parse_requirements('foo>=1.0, <3') req, = parse_requirements('foo >= 1.0, < 3') - def testVersionEquality(self): - def c(s1, s2): - p1, p2 = parse_version(s1), parse_version(s2) - assert p1 == p2, (s1, s2, p1, p2) - - c('1.2-rc1', '1.2rc1') - c('0.4', '0.4.0') - c('0.4.0.0', '0.4.0') - c('0.4.0-0', '0.4-0') - c('0post1', '0.0post1') - c('0pre1', '0.0c1') - c('0.0.0preview1', '0c1') - c('0.0c1', '0-rc1') - c('1.2a1', '1.2.a.1') - c('1.2.a', '1.2a') - - def testVersionOrdering(self): - def c(s1, s2): - p1, p2 = parse_version(s1), parse_version(s2) - assert p1 < p2, (s1, s2, p1, p2) - - c('2.1', '2.1.1') - c('2a1', '2b0') - c('2a1', '2.1') - c('2.3a1', '2.3') - c('2.1-1', '2.1-2') - c('2.1-1', '2.1.1') - c('2.1', '2.1post4') - c('2.1a0-20040501', '2.1') - c('1.1', '02.1') - c('3.2', '3.2.post0') - c('3.2post1', '3.2post2') - c('0.4', '4.0') - c('0.0.4', '0.4.0') - c('0post1', '0.4post1') - c('2.1.0-rc1', '2.1.0') - c('2.1dev', '2.1a0') - - torture = """ + @pytest.mark.parametrize( + ['lower', 'upper'], + [ + ('1.2-rc1', '1.2rc1'), + ('0.4', '0.4.0'), + ('0.4.0.0', '0.4.0'), + ('0.4.0-0', '0.4-0'), + ('0post1', '0.0post1'), + ('0pre1', '0.0c1'), + ('0.0.0preview1', '0c1'), + ('0.0c1', '0-rc1'), + ('1.2a1', '1.2.a.1'), + ('1.2.a', '1.2a'), + ], + ) + def testVersionEquality(self, lower, upper): + assert parse_version(lower) == parse_version(upper) + + torture = """ 0.80.1-3 0.80.1-2 0.80.1-1 0.79.9999+0.80.0pre4-1 0.79.9999+0.80.0pre2-3 0.79.9999+0.80.0pre2-2 0.77.2-1 0.77.1-1 0.77.0-1 - """.split() - - for p, v1 in enumerate(torture): - for v2 in torture[p + 1:]: - c(v2, v1) - - def testVersionBuildout(self): - """ - Buildout has a function in it's bootstrap.py that inspected the return - value of parse_version. The new parse_version returns a Version class - which needs to support this behavior, at least for now. - """ - - def buildout(parsed_version): - _final_parts = '*final-', '*final' - - def _final_version(parsed_version): - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True - - return _final_version(parsed_version) - - assert buildout(parse_version("1.0")) - assert not buildout(parse_version("1.0a1")) - - def testVersionIndexable(self): """ - Some projects were doing things like parse_version("v")[0], so we'll - support indexing the same as we support iterating. - """ - assert parse_version("1.0")[0] == "00000001" - def testVersionTupleSort(self): - """ - Some projects expected to be able to sort tuples against the return - value of parse_version. So again we'll add a warning enabled shim to - make this possible. - """ - assert parse_version("1.0") < tuple(parse_version("2.0")) - assert parse_version("1.0") <= tuple(parse_version("2.0")) - assert parse_version("1.0") == tuple(parse_version("1.0")) - assert parse_version("3.0") > tuple(parse_version("2.0")) - assert parse_version("3.0") >= tuple(parse_version("2.0")) - assert parse_version("3.0") != tuple(parse_version("2.0")) - assert not (parse_version("3.0") != tuple(parse_version("3.0"))) + @pytest.mark.parametrize( + ['lower', 'upper'], + [ + ('2.1', '2.1.1'), + ('2a1', '2b0'), + ('2a1', '2.1'), + ('2.3a1', '2.3'), + ('2.1-1', '2.1-2'), + ('2.1-1', '2.1.1'), + ('2.1', '2.1post4'), + ('2.1a0-20040501', '2.1'), + ('1.1', '02.1'), + ('3.2', '3.2.post0'), + ('3.2post1', '3.2post2'), + ('0.4', '4.0'), + ('0.0.4', '0.4.0'), + ('0post1', '0.4post1'), + ('2.1.0-rc1', '2.1.0'), + ('2.1dev', '2.1a0'), + ] + list(pairwise(reversed(torture.split()))), + ) + def testVersionOrdering(self, lower, upper): + assert parse_version(lower) < parse_version(upper) def testVersionHashable(self): """ From eeeb9b27fa48fccf2b5d52919eff1c75c4ad1718 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 13:16:11 -0400 Subject: [PATCH 6950/8469] Remove SetuptoolsVersion and SetuptoolsLegacyVersion. Ref #296. --- CHANGES.rst | 10 ++++ pkg_resources/__init__.py | 111 +------------------------------------- 2 files changed, 12 insertions(+), 109 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cabddaf661..93eca56d8f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v39.0.0 +------- + +* #296: Removed long-deprecated support for iteration on + Version objects as returned by ``pkg_resources.parse_version``. + Removed the ``SetuptoolsVersion`` and + ``SetuptoolsLegacyVersion`` names as well. They should not + have been used, but if they were, replace with + ``Version`` and ``LegacyVersion`` from ``packaging.version``. + v38.7.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 92272f20c6..8d95bd2912 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -114,118 +114,11 @@ class PEP440Warning(RuntimeWarning): """ -class _SetuptoolsVersionMixin(object): - def __hash__(self): - return super(_SetuptoolsVersionMixin, self).__hash__() - - def __lt__(self, other): - if isinstance(other, tuple): - return tuple(self) < other - else: - return super(_SetuptoolsVersionMixin, self).__lt__(other) - - def __le__(self, other): - if isinstance(other, tuple): - return tuple(self) <= other - else: - return super(_SetuptoolsVersionMixin, self).__le__(other) - - def __eq__(self, other): - if isinstance(other, tuple): - return tuple(self) == other - else: - return super(_SetuptoolsVersionMixin, self).__eq__(other) - - def __ge__(self, other): - if isinstance(other, tuple): - return tuple(self) >= other - else: - return super(_SetuptoolsVersionMixin, self).__ge__(other) - - def __gt__(self, other): - if isinstance(other, tuple): - return tuple(self) > other - else: - return super(_SetuptoolsVersionMixin, self).__gt__(other) - - def __ne__(self, other): - if isinstance(other, tuple): - return tuple(self) != other - else: - return super(_SetuptoolsVersionMixin, self).__ne__(other) - - def __getitem__(self, key): - return tuple(self)[key] - - def __iter__(self): - component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) - replace = { - 'pre': 'c', - 'preview': 'c', - '-': 'final-', - 'rc': 'c', - 'dev': '@', - }.get - - def _parse_version_parts(s): - for part in component_re.split(s): - part = replace(part, part) - if not part or part == '.': - continue - if part[:1] in '0123456789': - # pad for numeric comparison - yield part.zfill(8) - else: - yield '*' + part - - # ensure that alpha/beta/candidate are before final - yield '*final' - - def old_parse_version(s): - parts = [] - for part in _parse_version_parts(s.lower()): - if part.startswith('*'): - # remove '-' before a prerelease tag - if part < '*final': - while parts and parts[-1] == '*final-': - parts.pop() - # remove trailing zeros from each series of numeric parts - while parts and parts[-1] == '00000000': - parts.pop() - parts.append(part) - return tuple(parts) - - # Warn for use of this function - warnings.warn( - "You have iterated over the result of " - "pkg_resources.parse_version. This is a legacy behavior which is " - "inconsistent with the new version class introduced in setuptools " - "8.0. In most cases, conversion to a tuple is unnecessary. For " - "comparison of versions, sort the Version instances directly. If " - "you have another use case requiring the tuple, please file a " - "bug with the setuptools project describing that need.", - RuntimeWarning, - stacklevel=1, - ) - - for part in old_parse_version(str(self)): - yield part - - -class SetuptoolsVersion(_SetuptoolsVersionMixin, packaging.version.Version): - pass - - -class SetuptoolsLegacyVersion(_SetuptoolsVersionMixin, - packaging.version.LegacyVersion): - pass - - def parse_version(v): try: - return SetuptoolsVersion(v) + return packaging.version.Version(v) except packaging.version.InvalidVersion: - return SetuptoolsLegacyVersion(v) + return packaging.version.LegacyVersion(v) _state_vars = {} From 6d45fa032f81210ef40358185981b7b01f27c22a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 13:20:54 -0400 Subject: [PATCH 6951/8469] Delint --- setup.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index c25ade00c2..2712f89964 100755 --- a/setup.py +++ b/setup.py @@ -45,8 +45,8 @@ def _gen_console_scripts(): ) if any(os.environ.get(var) not in (None, "", "0") for var in var_names): return - yield ("easy_install-{shortver} = setuptools.command.easy_install:main" - .format(shortver=sys.version[:3])) + tmpl = "easy_install-{shortver} = setuptools.command.easy_install:main" + yield tmpl.format(shortver=sys.version[:3]) readme_path = os.path.join(here, 'README.rst') @@ -90,8 +90,10 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", version="38.7.0", - description="Easily download, build, install, upgrade, and uninstall " - "Python packages", + description=( + "Easily download, build, install, upgrade, and uninstall " + "Python packages" + ), author="Python Packaging Authority", author_email="distutils-sig@python.org", long_description=long_description, @@ -139,7 +141,10 @@ def pypi_link(pkg_filename): "requires.txt = setuptools.command.egg_info:write_requirements", "entry_points.txt = setuptools.command.egg_info:write_entries", "eager_resources.txt = setuptools.command.egg_info:overwrite_arg", - "namespace_packages.txt = setuptools.command.egg_info:overwrite_arg", + ( + "namespace_packages.txt = " + "setuptools.command.egg_info:overwrite_arg" + ), "top_level.txt = setuptools.command.egg_info:write_toplevel_names", "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", From d0f7a33daba39f60aa402c094cd4276b8b6ce462 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 13:36:16 -0400 Subject: [PATCH 6952/8469] Copy VendorImporter. Ref #1296. --- setuptools/extern/__init__.py | 71 ++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 2cd08b7ed9..70ac180c6f 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,4 +1,73 @@ -from pkg_resources.extern import VendorImporter +import sys + + +class VendorImporter: + """ + A PEP 302 meta path importer for finding optionally-vendored + or otherwise naturally-installed packages from root_name. + """ + + def __init__(self, root_name, vendored_names=(), vendor_pkg=None): + self.root_name = root_name + self.vendored_names = set(vendored_names) + self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') + + @property + def search_path(self): + """ + Search first the vendor package then as a natural package. + """ + yield self.vendor_pkg + '.' + yield '' + + def find_module(self, fullname, path=None): + """ + Return self when fullname starts with root_name and the + target module is one vendored through this importer. + """ + root, base, target = fullname.partition(self.root_name + '.') + if root: + return + if not any(map(target.startswith, self.vendored_names)): + return + return self + + def load_module(self, fullname): + """ + Iterate over the search path to locate and load fullname. + """ + root, base, target = fullname.partition(self.root_name + '.') + for prefix in self.search_path: + try: + extant = prefix + target + __import__(extant) + mod = sys.modules[extant] + sys.modules[fullname] = mod + # mysterious hack: + # Remove the reference to the extant package/module + # 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): + del sys.modules[extant] + return mod + except ImportError: + pass + else: + raise ImportError( + "The '{target}' package is required; " + "normally this is bundled with this package so if you get " + "this warning, consult the packager of your " + "distribution.".format(**locals()) + ) + + def install(self): + """ + Install this importer into sys.meta_path if not already present. + """ + if self not in sys.meta_path: + sys.meta_path.append(self) + names = 'six', VendorImporter(__name__, names, 'pkg_resources._vendor').install() From 929acc4e551448a68411968fb50336ad51ed4d3c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 14:10:32 -0400 Subject: [PATCH 6953/8469] Setuptools now vendors its own direct dependencies (packaging, six, pyparsing). Ref #1296. --- pavement.py | 49 +- pkg_resources/_vendor/packaging/markers.py | 6 +- .../_vendor/packaging/requirements.py | 8 +- setuptools/_vendor/__init__.py | 0 setuptools/_vendor/packaging/__about__.py | 21 + setuptools/_vendor/packaging/__init__.py | 14 + setuptools/_vendor/packaging/_compat.py | 30 + setuptools/_vendor/packaging/_structures.py | 68 + setuptools/_vendor/packaging/markers.py | 301 + setuptools/_vendor/packaging/requirements.py | 127 + setuptools/_vendor/packaging/specifiers.py | 774 +++ setuptools/_vendor/packaging/utils.py | 14 + setuptools/_vendor/packaging/version.py | 393 ++ setuptools/_vendor/pyparsing.py | 5696 +++++++++++++++++ setuptools/_vendor/six.py | 868 +++ setuptools/_vendor/vendored.txt | 3 + setuptools/command/egg_info.py | 2 +- setuptools/dist.py | 6 +- setuptools/extern/__init__.py | 4 +- setuptools/msvc.py | 4 +- setuptools/tests/files.py | 2 +- setuptools/wheel.py | 2 +- 22 files changed, 8370 insertions(+), 22 deletions(-) create mode 100644 setuptools/_vendor/__init__.py create mode 100644 setuptools/_vendor/packaging/__about__.py create mode 100644 setuptools/_vendor/packaging/__init__.py create mode 100644 setuptools/_vendor/packaging/_compat.py create mode 100644 setuptools/_vendor/packaging/_structures.py create mode 100644 setuptools/_vendor/packaging/markers.py create mode 100644 setuptools/_vendor/packaging/requirements.py create mode 100644 setuptools/_vendor/packaging/specifiers.py create mode 100644 setuptools/_vendor/packaging/utils.py create mode 100644 setuptools/_vendor/packaging/version.py create mode 100644 setuptools/_vendor/pyparsing.py create mode 100644 setuptools/_vendor/six.py create mode 100644 setuptools/_vendor/vendored.txt diff --git a/pavement.py b/pavement.py index f85617d4fe..ca54e61f4c 100644 --- a/pavement.py +++ b/pavement.py @@ -11,6 +11,32 @@ def remove_all(paths): @task def update_vendored(): + update_pkg_resources() + update_setuptools() + + +def rewrite_packaging(pkg_files, new_root): + """ + Rewrite imports in packaging to redirect to vendored copies. + """ + for file in pkg_files.glob('*.py'): + text = file.text() + text = re.sub(r' (pyparsing|six)', rf' {new_root}.\1', text) + file.write_text(text) + + +def install(vendor): + clean(vendor) + install_args = [ + 'install', + '-r', str(vendor / 'vendored.txt'), + '-t', str(vendor), + ] + pip.main(install_args) + remove_all(vendor.glob('*.dist-info')) + remove_all(vendor.glob('*.egg-info')) + +def update_pkg_resources(): vendor = Path('pkg_resources/_vendor') # pip uninstall doesn't support -t, so do it manually remove_all(vendor.glob('packaging*')) @@ -23,10 +49,23 @@ def update_vendored(): '-t', str(vendor), ] pip.main(install_args) - packaging = vendor / 'packaging' - for file in packaging.glob('*.py'): - text = file.text() - text = re.sub(r' (pyparsing|six)', r' pkg_resources.extern.\1', text) - file.write_text(text) + rewrite_packaging(vendor / 'packaging', 'pkg_resources.extern.') + remove_all(vendor.glob('*.dist-info')) + remove_all(vendor.glob('*.egg-info')) + + +def update_setuptools(): + vendor = Path('setuptools/_vendor') + # pip uninstall doesn't support -t, so do it manually + remove_all(vendor.glob('packaging*')) + remove_all(vendor.glob('six*')) + remove_all(vendor.glob('pyparsing*')) + install_args = [ + 'install', + '-r', str(vendor / 'vendored.txt'), + '-t', str(vendor), + ] + pip.main(install_args) + rewrite_packaging(vendor / 'packaging', 'setuptools.extern') remove_all(vendor.glob('*.dist-info')) remove_all(vendor.glob('*.egg-info')) diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index 892e578edd..a4805648dd 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -8,9 +8,9 @@ import platform import sys -from pkg_resources.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd -from pkg_resources.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString -from pkg_resources.extern.pyparsing import Literal as L # noqa +from pkg_resources.extern..pyparsing import ParseException, ParseResults, stringStart, stringEnd +from pkg_resources.extern..pyparsing import ZeroOrMore, Group, Forward, QuotedString +from pkg_resources.extern..pyparsing import Literal as L # noqa from ._compat import string_types from .specifiers import Specifier, InvalidSpecifier diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 0c8c4a3852..ccaed95b13 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -6,10 +6,10 @@ import string import re -from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException -from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine -from pkg_resources.extern.pyparsing import Literal as L # noqa -from pkg_resources.extern.six.moves.urllib import parse as urlparse +from pkg_resources.extern..pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from pkg_resources.extern..pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from pkg_resources.extern..pyparsing import Literal as L # noqa +from pkg_resources.extern..six.moves.urllib import parse as urlparse from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet diff --git a/setuptools/_vendor/__init__.py b/setuptools/_vendor/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py new file mode 100644 index 0000000000..95d330ef82 --- /dev/null +++ b/setuptools/_vendor/packaging/__about__.py @@ -0,0 +1,21 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] + +__title__ = "packaging" +__summary__ = "Core utilities for Python packages" +__uri__ = "https://github.com/pypa/packaging" + +__version__ = "16.8" + +__author__ = "Donald Stufft and individual contributors" +__email__ = "donald@stufft.io" + +__license__ = "BSD or Apache License, Version 2.0" +__copyright__ = "Copyright 2014-2016 %s" % __author__ diff --git a/setuptools/_vendor/packaging/__init__.py b/setuptools/_vendor/packaging/__init__.py new file mode 100644 index 0000000000..5ee6220203 --- /dev/null +++ b/setuptools/_vendor/packaging/__init__.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +from .__about__ import ( + __author__, __copyright__, __email__, __license__, __summary__, __title__, + __uri__, __version__ +) + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] diff --git a/setuptools/_vendor/packaging/_compat.py b/setuptools/_vendor/packaging/_compat.py new file mode 100644 index 0000000000..210bb80b7e --- /dev/null +++ b/setuptools/_vendor/packaging/_compat.py @@ -0,0 +1,30 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import sys + + +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 + +# flake8: noqa + +if PY3: + string_types = str, +else: + string_types = basestring, + + +def with_metaclass(meta, *bases): + """ + Create a base class with a metaclass. + """ + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) diff --git a/setuptools/_vendor/packaging/_structures.py b/setuptools/_vendor/packaging/_structures.py new file mode 100644 index 0000000000..ccc27861c3 --- /dev/null +++ b/setuptools/_vendor/packaging/_structures.py @@ -0,0 +1,68 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + + +class Infinity(object): + + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + +Infinity = Infinity() + + +class NegativeInfinity(object): + + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + +NegativeInfinity = NegativeInfinity() diff --git a/setuptools/_vendor/packaging/markers.py b/setuptools/_vendor/packaging/markers.py new file mode 100644 index 0000000000..031332a305 --- /dev/null +++ b/setuptools/_vendor/packaging/markers.py @@ -0,0 +1,301 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import operator +import os +import platform +import sys + +from setuptools.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd +from setuptools.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString +from setuptools.extern.pyparsing import Literal as L # noqa + +from ._compat import string_types +from .specifiers import Specifier, InvalidSpecifier + + +__all__ = [ + "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", + "Marker", "default_environment", +] + + +class InvalidMarker(ValueError): + """ + An invalid marker was found, users should refer to PEP 508. + """ + + +class UndefinedComparison(ValueError): + """ + An invalid operation was attempted on a value that doesn't support it. + """ + + +class UndefinedEnvironmentName(ValueError): + """ + A name was attempted to be used that does not exist inside of the + environment. + """ + + +class Node(object): + + def __init__(self, value): + self.value = value + + def __str__(self): + return str(self.value) + + def __repr__(self): + return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) + + def serialize(self): + raise NotImplementedError + + +class Variable(Node): + + def serialize(self): + return str(self) + + +class Value(Node): + + def serialize(self): + return '"{0}"'.format(self) + + +class Op(Node): + + def serialize(self): + return str(self) + + +VARIABLE = ( + L("implementation_version") | + L("platform_python_implementation") | + L("implementation_name") | + L("python_full_version") | + L("platform_release") | + L("platform_version") | + L("platform_machine") | + L("platform_system") | + L("python_version") | + L("sys_platform") | + L("os_name") | + L("os.name") | # PEP-345 + L("sys.platform") | # PEP-345 + L("platform.version") | # PEP-345 + L("platform.machine") | # PEP-345 + L("platform.python_implementation") | # PEP-345 + L("python_implementation") | # undocumented setuptools legacy + L("extra") +) +ALIASES = { + 'os.name': 'os_name', + 'sys.platform': 'sys_platform', + 'platform.version': 'platform_version', + 'platform.machine': 'platform_machine', + 'platform.python_implementation': 'platform_python_implementation', + 'python_implementation': 'platform_python_implementation' +} +VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) + +VERSION_CMP = ( + L("===") | + L("==") | + L(">=") | + L("<=") | + L("!=") | + L("~=") | + L(">") | + L("<") +) + +MARKER_OP = VERSION_CMP | L("not in") | L("in") +MARKER_OP.setParseAction(lambda s, l, t: Op(t[0])) + +MARKER_VALUE = QuotedString("'") | QuotedString('"') +MARKER_VALUE.setParseAction(lambda s, l, t: Value(t[0])) + +BOOLOP = L("and") | L("or") + +MARKER_VAR = VARIABLE | MARKER_VALUE + +MARKER_ITEM = Group(MARKER_VAR + MARKER_OP + MARKER_VAR) +MARKER_ITEM.setParseAction(lambda s, l, t: tuple(t[0])) + +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() + +MARKER_EXPR = Forward() +MARKER_ATOM = MARKER_ITEM | Group(LPAREN + MARKER_EXPR + RPAREN) +MARKER_EXPR << MARKER_ATOM + ZeroOrMore(BOOLOP + MARKER_EXPR) + +MARKER = stringStart + MARKER_EXPR + stringEnd + + +def _coerce_parse_result(results): + if isinstance(results, ParseResults): + return [_coerce_parse_result(i) for i in results] + else: + return results + + +def _format_marker(marker, first=True): + assert isinstance(marker, (list, tuple, string_types)) + + # Sometimes we have a structure like [[...]] which is a single item list + # where the single item is itself it's own list. In that case we want skip + # the rest of this function so that we don't get extraneous () on the + # outside. + if (isinstance(marker, list) and len(marker) == 1 and + isinstance(marker[0], (list, tuple))): + return _format_marker(marker[0]) + + if isinstance(marker, list): + inner = (_format_marker(m, first=False) for m in marker) + if first: + return " ".join(inner) + else: + return "(" + " ".join(inner) + ")" + elif isinstance(marker, tuple): + return " ".join([m.serialize() for m in marker]) + else: + return marker + + +_operators = { + "in": lambda lhs, rhs: lhs in rhs, + "not in": lambda lhs, rhs: lhs not in rhs, + "<": operator.lt, + "<=": operator.le, + "==": operator.eq, + "!=": operator.ne, + ">=": operator.ge, + ">": operator.gt, +} + + +def _eval_op(lhs, op, rhs): + try: + spec = Specifier("".join([op.serialize(), rhs])) + except InvalidSpecifier: + pass + else: + return spec.contains(lhs) + + oper = _operators.get(op.serialize()) + if oper is None: + raise UndefinedComparison( + "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) + ) + + return oper(lhs, rhs) + + +_undefined = object() + + +def _get_env(environment, name): + value = environment.get(name, _undefined) + + if value is _undefined: + raise UndefinedEnvironmentName( + "{0!r} does not exist in evaluation environment.".format(name) + ) + + return value + + +def _evaluate_markers(markers, environment): + groups = [[]] + + for marker in markers: + assert isinstance(marker, (list, tuple, string_types)) + + if isinstance(marker, list): + groups[-1].append(_evaluate_markers(marker, environment)) + elif isinstance(marker, tuple): + lhs, op, rhs = marker + + if isinstance(lhs, Variable): + lhs_value = _get_env(environment, lhs.value) + rhs_value = rhs.value + else: + lhs_value = lhs.value + rhs_value = _get_env(environment, rhs.value) + + groups[-1].append(_eval_op(lhs_value, op, rhs_value)) + else: + assert marker in ["and", "or"] + if marker == "or": + groups.append([]) + + return any(all(item) for item in groups) + + +def format_full_version(info): + version = '{0.major}.{0.minor}.{0.micro}'.format(info) + kind = info.releaselevel + if kind != 'final': + version += kind[0] + str(info.serial) + return version + + +def default_environment(): + if hasattr(sys, 'implementation'): + iver = format_full_version(sys.implementation.version) + implementation_name = sys.implementation.name + else: + iver = '0' + implementation_name = '' + + return { + "implementation_name": implementation_name, + "implementation_version": iver, + "os_name": os.name, + "platform_machine": platform.machine(), + "platform_release": platform.release(), + "platform_system": platform.system(), + "platform_version": platform.version(), + "python_full_version": platform.python_version(), + "platform_python_implementation": platform.python_implementation(), + "python_version": platform.python_version()[:3], + "sys_platform": sys.platform, + } + + +class Marker(object): + + def __init__(self, marker): + try: + self._markers = _coerce_parse_result(MARKER.parseString(marker)) + except ParseException as e: + err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( + marker, marker[e.loc:e.loc + 8]) + raise InvalidMarker(err_str) + + def __str__(self): + return _format_marker(self._markers) + + def __repr__(self): + return "".format(str(self)) + + def evaluate(self, environment=None): + """Evaluate a marker. + + Return the boolean from evaluating the given marker against the + environment. environment is an optional argument to override all or + part of the determined environment. + + The environment is determined from the current Python process. + """ + current_environment = default_environment() + if environment is not None: + current_environment.update(environment) + + return _evaluate_markers(self._markers, current_environment) diff --git a/setuptools/_vendor/packaging/requirements.py b/setuptools/_vendor/packaging/requirements.py new file mode 100644 index 0000000000..5b493416f2 --- /dev/null +++ b/setuptools/_vendor/packaging/requirements.py @@ -0,0 +1,127 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import string +import re + +from setuptools.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from setuptools.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from setuptools.extern.pyparsing import Literal as L # noqa +from setuptools.extern.six.moves.urllib import parse as urlparse + +from .markers import MARKER_EXPR, Marker +from .specifiers import LegacySpecifier, Specifier, SpecifierSet + + +class InvalidRequirement(ValueError): + """ + An invalid requirement was found, users should refer to PEP 508. + """ + + +ALPHANUM = Word(string.ascii_letters + string.digits) + +LBRACKET = L("[").suppress() +RBRACKET = L("]").suppress() +LPAREN = L("(").suppress() +RPAREN = L(")").suppress() +COMMA = L(",").suppress() +SEMICOLON = L(";").suppress() +AT = L("@").suppress() + +PUNCTUATION = Word("-_.") +IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM) +IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END)) + +NAME = IDENTIFIER("name") +EXTRA = IDENTIFIER + +URI = Regex(r'[^ ]+')("url") +URL = (AT + URI) + +EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) +EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") + +VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE) +VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) + +VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY +VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), + joinString=",", adjacent=False)("_raw_spec") +_VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) +_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') + +VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") +VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) + +MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") +MARKER_EXPR.setParseAction( + lambda s, l, t: Marker(s[t._original_start:t._original_end]) +) +MARKER_SEPERATOR = SEMICOLON +MARKER = MARKER_SEPERATOR + MARKER_EXPR + +VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) +URL_AND_MARKER = URL + Optional(MARKER) + +NAMED_REQUIREMENT = \ + NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) + +REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd + + +class Requirement(object): + """Parse a requirement. + + Parse a given requirement string into its parts, such as name, specifier, + URL, and extras. Raises InvalidRequirement on a badly-formed requirement + string. + """ + + # TODO: Can we test whether something is contained within a requirement? + # If so how do we do that? Do we need to test against the _name_ of + # the thing as well as the version? What about the markers? + # TODO: Can we normalize the name and extra name? + + def __init__(self, requirement_string): + try: + req = REQUIREMENT.parseString(requirement_string) + except ParseException as e: + raise InvalidRequirement( + "Invalid requirement, parse error at \"{0!r}\"".format( + requirement_string[e.loc:e.loc + 8])) + + self.name = req.name + if req.url: + parsed_url = urlparse.urlparse(req.url) + if not (parsed_url.scheme and parsed_url.netloc) or ( + not parsed_url.scheme and not parsed_url.netloc): + raise InvalidRequirement("Invalid URL given") + self.url = req.url + else: + self.url = None + self.extras = set(req.extras.asList() if req.extras else []) + self.specifier = SpecifierSet(req.specifier) + self.marker = req.marker if req.marker else None + + def __str__(self): + parts = [self.name] + + if self.extras: + parts.append("[{0}]".format(",".join(sorted(self.extras)))) + + if self.specifier: + parts.append(str(self.specifier)) + + if self.url: + parts.append("@ {0}".format(self.url)) + + if self.marker: + parts.append("; {0}".format(self.marker)) + + return "".join(parts) + + def __repr__(self): + return "".format(str(self)) diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py new file mode 100644 index 0000000000..7f5a76cfd6 --- /dev/null +++ b/setuptools/_vendor/packaging/specifiers.py @@ -0,0 +1,774 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import abc +import functools +import itertools +import re + +from ._compat import string_types, with_metaclass +from .version import Version, LegacyVersion, parse + + +class InvalidSpecifier(ValueError): + """ + An invalid specifier was found, users should refer to PEP 440. + """ + + +class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): + + @abc.abstractmethod + def __str__(self): + """ + Returns the str representation of this Specifier like object. This + should be representative of the Specifier itself. + """ + + @abc.abstractmethod + def __hash__(self): + """ + Returns a hash value for this Specifier like object. + """ + + @abc.abstractmethod + def __eq__(self, other): + """ + Returns a boolean representing whether or not the two Specifier like + objects are equal. + """ + + @abc.abstractmethod + def __ne__(self, other): + """ + Returns a boolean representing whether or not the two Specifier like + objects are not equal. + """ + + @abc.abstractproperty + def prereleases(self): + """ + Returns whether or not pre-releases as a whole are allowed by this + specifier. + """ + + @prereleases.setter + def prereleases(self, value): + """ + Sets whether or not pre-releases as a whole are allowed by this + specifier. + """ + + @abc.abstractmethod + def contains(self, item, prereleases=None): + """ + Determines if the given item is contained within this specifier. + """ + + @abc.abstractmethod + def filter(self, iterable, prereleases=None): + """ + Takes an iterable of items and filters them so that only items which + are contained within this specifier are allowed in it. + """ + + +class _IndividualSpecifier(BaseSpecifier): + + _operators = {} + + def __init__(self, spec="", prereleases=None): + match = self._regex.search(spec) + if not match: + raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) + + self._spec = ( + match.group("operator").strip(), + match.group("version").strip(), + ) + + # Store whether or not this Specifier should accept prereleases + self._prereleases = prereleases + + def __repr__(self): + pre = ( + ", prereleases={0!r}".format(self.prereleases) + if self._prereleases is not None + else "" + ) + + return "<{0}({1!r}{2})>".format( + self.__class__.__name__, + str(self), + pre, + ) + + def __str__(self): + return "{0}{1}".format(*self._spec) + + def __hash__(self): + return hash(self._spec) + + def __eq__(self, other): + if isinstance(other, string_types): + try: + other = self.__class__(other) + except InvalidSpecifier: + return NotImplemented + elif not isinstance(other, self.__class__): + return NotImplemented + + return self._spec == other._spec + + def __ne__(self, other): + if isinstance(other, string_types): + try: + other = self.__class__(other) + except InvalidSpecifier: + return NotImplemented + elif not isinstance(other, self.__class__): + return NotImplemented + + return self._spec != other._spec + + def _get_operator(self, op): + return getattr(self, "_compare_{0}".format(self._operators[op])) + + def _coerce_version(self, version): + if not isinstance(version, (LegacyVersion, Version)): + version = parse(version) + return version + + @property + def operator(self): + return self._spec[0] + + @property + def version(self): + return self._spec[1] + + @property + def prereleases(self): + return self._prereleases + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + def __contains__(self, item): + return self.contains(item) + + def contains(self, item, prereleases=None): + # Determine if prereleases are to be allowed or not. + if prereleases is None: + prereleases = self.prereleases + + # Normalize item to a Version or LegacyVersion, this allows us to have + # a shortcut for ``"2.0" in Specifier(">=2") + item = self._coerce_version(item) + + # Determine if we should be supporting prereleases in this specifier + # or not, if we do not support prereleases than we can short circuit + # logic if this version is a prereleases. + if item.is_prerelease and not prereleases: + return False + + # Actually do the comparison to determine if this item is contained + # within this Specifier or not. + return self._get_operator(self.operator)(item, self.version) + + def filter(self, iterable, prereleases=None): + yielded = False + found_prereleases = [] + + kw = {"prereleases": prereleases if prereleases is not None else True} + + # Attempt to iterate over all the values in the iterable and if any of + # them match, yield them. + for version in iterable: + parsed_version = self._coerce_version(version) + + if self.contains(parsed_version, **kw): + # If our version is a prerelease, and we were not set to allow + # prereleases, then we'll store it for later incase nothing + # else matches this specifier. + if (parsed_version.is_prerelease and not + (prereleases or self.prereleases)): + found_prereleases.append(version) + # Either this is not a prerelease, or we should have been + # accepting prereleases from the begining. + else: + yielded = True + yield version + + # Now that we've iterated over everything, determine if we've yielded + # any values, and if we have not and we have any prereleases stored up + # then we will go ahead and yield the prereleases. + if not yielded and found_prereleases: + for version in found_prereleases: + yield version + + +class LegacySpecifier(_IndividualSpecifier): + + _regex_str = ( + r""" + (?P(==|!=|<=|>=|<|>)) + \s* + (?P + [^,;\s)]* # Since this is a "legacy" specifier, and the version + # string can be just about anything, we match everything + # except for whitespace, a semi-colon for marker support, + # a closing paren since versions can be enclosed in + # them, and a comma since it's a version separator. + ) + """ + ) + + _regex = re.compile( + r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + + _operators = { + "==": "equal", + "!=": "not_equal", + "<=": "less_than_equal", + ">=": "greater_than_equal", + "<": "less_than", + ">": "greater_than", + } + + def _coerce_version(self, version): + if not isinstance(version, LegacyVersion): + version = LegacyVersion(str(version)) + return version + + def _compare_equal(self, prospective, spec): + return prospective == self._coerce_version(spec) + + def _compare_not_equal(self, prospective, spec): + return prospective != self._coerce_version(spec) + + def _compare_less_than_equal(self, prospective, spec): + return prospective <= self._coerce_version(spec) + + def _compare_greater_than_equal(self, prospective, spec): + return prospective >= self._coerce_version(spec) + + def _compare_less_than(self, prospective, spec): + return prospective < self._coerce_version(spec) + + def _compare_greater_than(self, prospective, spec): + return prospective > self._coerce_version(spec) + + +def _require_version_compare(fn): + @functools.wraps(fn) + def wrapped(self, prospective, spec): + if not isinstance(prospective, Version): + return False + return fn(self, prospective, spec) + return wrapped + + +class Specifier(_IndividualSpecifier): + + _regex_str = ( + r""" + (?P(~=|==|!=|<=|>=|<|>|===)) + (?P + (?: + # The identity operators allow for an escape hatch that will + # do an exact string match of the version you wish to install. + # This will not be parsed by PEP 440 and we cannot determine + # any semantic meaning from it. This operator is discouraged + # but included entirely as an escape hatch. + (?<====) # Only match for the identity operator + \s* + [^\s]* # We just match everything, except for whitespace + # since we are only testing for strict identity. + ) + | + (?: + # The (non)equality operators allow for wild card and local + # versions to be specified so we have to define these two + # operators separately to enable that. + (?<===|!=) # Only match for equals and not equals + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)* # release + (?: # pre release + [-_\.]? + (a|b|c|rc|alpha|beta|pre|preview) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + + # You cannot use a wild card and a dev or local version + # together so group them with a | and make them optional. + (?: + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local + | + \.\* # Wild card syntax of .* + )? + ) + | + (?: + # The compatible operator requires at least two digits in the + # release segment. + (?<=~=) # Only match for the compatible operator + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) + (?: # pre release + [-_\.]? + (a|b|c|rc|alpha|beta|pre|preview) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + ) + | + (?: + # All other operators only allow a sub set of what the + # (non)equality operators do. Specifically they do not allow + # local versions to be specified nor do they allow the prefix + # matching wild cards. + (?=": "greater_than_equal", + "<": "less_than", + ">": "greater_than", + "===": "arbitrary", + } + + @_require_version_compare + def _compare_compatible(self, prospective, spec): + # Compatible releases have an equivalent combination of >= and ==. That + # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to + # implement this in terms of the other specifiers instead of + # implementing it ourselves. The only thing we need to do is construct + # the other specifiers. + + # We want everything but the last item in the version, but we want to + # ignore post and dev releases and we want to treat the pre-release as + # it's own separate segment. + prefix = ".".join( + list( + itertools.takewhile( + lambda x: (not x.startswith("post") and not + x.startswith("dev")), + _version_split(spec), + ) + )[:-1] + ) + + # Add the prefix notation to the end of our string + prefix += ".*" + + return (self._get_operator(">=")(prospective, spec) and + self._get_operator("==")(prospective, prefix)) + + @_require_version_compare + def _compare_equal(self, prospective, spec): + # We need special logic to handle prefix matching + if spec.endswith(".*"): + # In the case of prefix matching we want to ignore local segment. + prospective = Version(prospective.public) + # Split the spec out by dots, and pretend that there is an implicit + # dot in between a release segment and a pre-release segment. + spec = _version_split(spec[:-2]) # Remove the trailing .* + + # Split the prospective version out by dots, and pretend that there + # is an implicit dot in between a release segment and a pre-release + # segment. + prospective = _version_split(str(prospective)) + + # Shorten the prospective version to be the same length as the spec + # so that we can determine if the specifier is a prefix of the + # prospective version or not. + prospective = prospective[:len(spec)] + + # Pad out our two sides with zeros so that they both equal the same + # length. + spec, prospective = _pad_version(spec, prospective) + else: + # Convert our spec string into a Version + spec = Version(spec) + + # If the specifier does not have a local segment, then we want to + # act as if the prospective version also does not have a local + # segment. + if not spec.local: + prospective = Version(prospective.public) + + return prospective == spec + + @_require_version_compare + def _compare_not_equal(self, prospective, spec): + return not self._compare_equal(prospective, spec) + + @_require_version_compare + def _compare_less_than_equal(self, prospective, spec): + return prospective <= Version(spec) + + @_require_version_compare + def _compare_greater_than_equal(self, prospective, spec): + return prospective >= Version(spec) + + @_require_version_compare + def _compare_less_than(self, prospective, spec): + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec) + + # Check to see if the prospective version is less than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective < spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a pre-release version, that we do not accept pre-release + # versions for the version mentioned in the specifier (e.g. <3.1 should + # not match 3.1.dev0, but should match 3.0.dev0). + if not spec.is_prerelease and prospective.is_prerelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # less than the spec version *and* it's not a pre-release of the same + # version in the spec. + return True + + @_require_version_compare + def _compare_greater_than(self, prospective, spec): + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec) + + # Check to see if the prospective version is greater than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective > spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a post-release version, that we do not accept + # post-release versions for the version mentioned in the specifier + # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). + if not spec.is_postrelease and prospective.is_postrelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # Ensure that we do not allow a local version of the version mentioned + # in the specifier, which is techincally greater than, to match. + if prospective.local is not None: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # greater than the spec version *and* it's not a pre-release of the + # same version in the spec. + return True + + def _compare_arbitrary(self, prospective, spec): + return str(prospective).lower() == str(spec).lower() + + @property + def prereleases(self): + # If there is an explicit prereleases set for this, then we'll just + # blindly use that. + if self._prereleases is not None: + return self._prereleases + + # Look at all of our specifiers and determine if they are inclusive + # operators, and if they are if they are including an explicit + # prerelease. + operator, version = self._spec + if operator in ["==", ">=", "<=", "~=", "==="]: + # The == specifier can include a trailing .*, if it does we + # want to remove before parsing. + if operator == "==" and version.endswith(".*"): + version = version[:-2] + + # Parse the version, and if it is a pre-release than this + # specifier allows pre-releases. + if parse(version).is_prerelease: + return True + + return False + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + +_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$") + + +def _version_split(version): + result = [] + for item in version.split("."): + match = _prefix_regex.search(item) + if match: + result.extend(match.groups()) + else: + result.append(item) + return result + + +def _pad_version(left, right): + left_split, right_split = [], [] + + # Get the release segment of our versions + left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) + right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) + + # Get the rest of our versions + left_split.append(left[len(left_split[0]):]) + right_split.append(right[len(right_split[0]):]) + + # Insert our padding + left_split.insert( + 1, + ["0"] * max(0, len(right_split[0]) - len(left_split[0])), + ) + right_split.insert( + 1, + ["0"] * max(0, len(left_split[0]) - len(right_split[0])), + ) + + return ( + list(itertools.chain(*left_split)), + list(itertools.chain(*right_split)), + ) + + +class SpecifierSet(BaseSpecifier): + + def __init__(self, specifiers="", prereleases=None): + # Split on , to break each indidivual specifier into it's own item, and + # strip each item to remove leading/trailing whitespace. + specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] + + # Parsed each individual specifier, attempting first to make it a + # Specifier and falling back to a LegacySpecifier. + parsed = set() + for specifier in specifiers: + try: + parsed.add(Specifier(specifier)) + except InvalidSpecifier: + parsed.add(LegacySpecifier(specifier)) + + # Turn our parsed specifiers into a frozen set and save them for later. + self._specs = frozenset(parsed) + + # Store our prereleases value so we can use it later to determine if + # we accept prereleases or not. + self._prereleases = prereleases + + def __repr__(self): + pre = ( + ", prereleases={0!r}".format(self.prereleases) + if self._prereleases is not None + else "" + ) + + return "".format(str(self), pre) + + def __str__(self): + return ",".join(sorted(str(s) for s in self._specs)) + + def __hash__(self): + return hash(self._specs) + + def __and__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + specifier = SpecifierSet() + specifier._specs = frozenset(self._specs | other._specs) + + if self._prereleases is None and other._prereleases is not None: + specifier._prereleases = other._prereleases + elif self._prereleases is not None and other._prereleases is None: + specifier._prereleases = self._prereleases + elif self._prereleases == other._prereleases: + specifier._prereleases = self._prereleases + else: + raise ValueError( + "Cannot combine SpecifierSets with True and False prerelease " + "overrides." + ) + + return specifier + + def __eq__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif isinstance(other, _IndividualSpecifier): + other = SpecifierSet(str(other)) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + return self._specs == other._specs + + def __ne__(self, other): + if isinstance(other, string_types): + other = SpecifierSet(other) + elif isinstance(other, _IndividualSpecifier): + other = SpecifierSet(str(other)) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + return self._specs != other._specs + + def __len__(self): + return len(self._specs) + + def __iter__(self): + return iter(self._specs) + + @property + def prereleases(self): + # If we have been given an explicit prerelease modifier, then we'll + # pass that through here. + if self._prereleases is not None: + return self._prereleases + + # If we don't have any specifiers, and we don't have a forced value, + # then we'll just return None since we don't know if this should have + # pre-releases or not. + if not self._specs: + return None + + # Otherwise we'll see if any of the given specifiers accept + # prereleases, if any of them do we'll return True, otherwise False. + return any(s.prereleases for s in self._specs) + + @prereleases.setter + def prereleases(self, value): + self._prereleases = value + + def __contains__(self, item): + return self.contains(item) + + def contains(self, item, prereleases=None): + # Ensure that our item is a Version or LegacyVersion instance. + if not isinstance(item, (LegacyVersion, Version)): + item = parse(item) + + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # We can determine if we're going to allow pre-releases by looking to + # see if any of the underlying items supports them. If none of them do + # and this item is a pre-release then we do not allow it and we can + # short circuit that here. + # Note: This means that 1.0.dev1 would not be contained in something + # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 + if not prereleases and item.is_prerelease: + return False + + # We simply dispatch to the underlying specs here to make sure that the + # given version is contained within all of them. + # Note: This use of all() here means that an empty set of specifiers + # will always return True, this is an explicit design decision. + return all( + s.contains(item, prereleases=prereleases) + for s in self._specs + ) + + def filter(self, iterable, prereleases=None): + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # If we have any specifiers, then we want to wrap our iterable in the + # filter method for each one, this will act as a logical AND amongst + # each specifier. + if self._specs: + for spec in self._specs: + iterable = spec.filter(iterable, prereleases=bool(prereleases)) + return iterable + # If we do not have any specifiers, then we need to have a rough filter + # which will filter out any pre-releases, unless there are no final + # releases, and which will filter out LegacyVersion in general. + else: + filtered = [] + found_prereleases = [] + + for item in iterable: + # Ensure that we some kind of Version class for this item. + if not isinstance(item, (LegacyVersion, Version)): + parsed_version = parse(item) + else: + parsed_version = item + + # Filter out any item which is parsed as a LegacyVersion + if isinstance(parsed_version, LegacyVersion): + continue + + # Store any item which is a pre-release for later unless we've + # already found a final version or we are accepting prereleases + if parsed_version.is_prerelease and not prereleases: + if not filtered: + found_prereleases.append(item) + else: + filtered.append(item) + + # If we've found no items except for pre-releases, then we'll go + # ahead and use the pre-releases + if not filtered and found_prereleases and prereleases is None: + return found_prereleases + + return filtered diff --git a/setuptools/_vendor/packaging/utils.py b/setuptools/_vendor/packaging/utils.py new file mode 100644 index 0000000000..942387cef5 --- /dev/null +++ b/setuptools/_vendor/packaging/utils.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import re + + +_canonicalize_regex = re.compile(r"[-_.]+") + + +def canonicalize_name(name): + # This is taken from PEP 503. + return _canonicalize_regex.sub("-", name).lower() diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py new file mode 100644 index 0000000000..83b5ee8c5e --- /dev/null +++ b/setuptools/_vendor/packaging/version.py @@ -0,0 +1,393 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import collections +import itertools +import re + +from ._structures import Infinity + + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" +] + + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +def parse(version): + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion(object): + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return "".format(repr(str(self))) + + @property + def public(self): + return self._version + + @property + def base_version(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + @property + def is_postrelease(self): + return False + + +_legacy_version_component_re = re.compile( + r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, +) + +_legacy_version_replacement_map = { + "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", +} + + +def _parse_version_parts(s): + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version): + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # it's adoption of the packaging library. + parts = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + parts = tuple(parts) + + return epoch, parts + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                              # pre-release
    +            [-_\.]?
    +            (?P(a|b|c|rc|alpha|beta|pre|preview))
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +        (?P                                         # post release
    +            (?:-(?P[0-9]+))
    +            |
    +            (?:
    +                [-_\.]?
    +                (?Ppost|rev|r)
    +                [-_\.]?
    +                (?P[0-9]+)?
    +            )
    +        )?
    +        (?P                                          # dev release
    +            [-_\.]?
    +            (?Pdev)
    +            [-_\.]?
    +            (?P[0-9]+)?
    +        )?
    +    )
    +    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
    +"""
    +
    +
    +class Version(_BaseVersion):
    +
    +    _regex = re.compile(
    +        r"^\s*" + VERSION_PATTERN + r"\s*$",
    +        re.VERBOSE | re.IGNORECASE,
    +    )
    +
    +    def __init__(self, version):
    +        # Validate the version and parse it into pieces
    +        match = self._regex.search(version)
    +        if not match:
    +            raise InvalidVersion("Invalid version: '{0}'".format(version))
    +
    +        # Store the parsed out pieces of the version
    +        self._version = _Version(
    +            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
    +            release=tuple(int(i) for i in match.group("release").split(".")),
    +            pre=_parse_letter_version(
    +                match.group("pre_l"),
    +                match.group("pre_n"),
    +            ),
    +            post=_parse_letter_version(
    +                match.group("post_l"),
    +                match.group("post_n1") or match.group("post_n2"),
    +            ),
    +            dev=_parse_letter_version(
    +                match.group("dev_l"),
    +                match.group("dev_n"),
    +            ),
    +            local=_parse_local_version(match.group("local")),
    +        )
    +
    +        # Generate a key which will be used for sorting
    +        self._key = _cmpkey(
    +            self._version.epoch,
    +            self._version.release,
    +            self._version.pre,
    +            self._version.post,
    +            self._version.dev,
    +            self._version.local,
    +        )
    +
    +    def __repr__(self):
    +        return "".format(repr(str(self)))
    +
    +    def __str__(self):
    +        parts = []
    +
    +        # Epoch
    +        if self._version.epoch != 0:
    +            parts.append("{0}!".format(self._version.epoch))
    +
    +        # Release segment
    +        parts.append(".".join(str(x) for x in self._version.release))
    +
    +        # Pre-release
    +        if self._version.pre is not None:
    +            parts.append("".join(str(x) for x in self._version.pre))
    +
    +        # Post-release
    +        if self._version.post is not None:
    +            parts.append(".post{0}".format(self._version.post[1]))
    +
    +        # Development release
    +        if self._version.dev is not None:
    +            parts.append(".dev{0}".format(self._version.dev[1]))
    +
    +        # Local version segment
    +        if self._version.local is not None:
    +            parts.append(
    +                "+{0}".format(".".join(str(x) for x in self._version.local))
    +            )
    +
    +        return "".join(parts)
    +
    +    @property
    +    def public(self):
    +        return str(self).split("+", 1)[0]
    +
    +    @property
    +    def base_version(self):
    +        parts = []
    +
    +        # Epoch
    +        if self._version.epoch != 0:
    +            parts.append("{0}!".format(self._version.epoch))
    +
    +        # Release segment
    +        parts.append(".".join(str(x) for x in self._version.release))
    +
    +        return "".join(parts)
    +
    +    @property
    +    def local(self):
    +        version_string = str(self)
    +        if "+" in version_string:
    +            return version_string.split("+", 1)[1]
    +
    +    @property
    +    def is_prerelease(self):
    +        return bool(self._version.dev or self._version.pre)
    +
    +    @property
    +    def is_postrelease(self):
    +        return bool(self._version.post)
    +
    +
    +def _parse_letter_version(letter, number):
    +    if letter:
    +        # We consider there to be an implicit 0 in a pre-release if there is
    +        # not a numeral associated with it.
    +        if number is None:
    +            number = 0
    +
    +        # We normalize any letters to their lower case form
    +        letter = letter.lower()
    +
    +        # We consider some words to be alternate spellings of other words and
    +        # in those cases we want to normalize the spellings to our preferred
    +        # spelling.
    +        if letter == "alpha":
    +            letter = "a"
    +        elif letter == "beta":
    +            letter = "b"
    +        elif letter in ["c", "pre", "preview"]:
    +            letter = "rc"
    +        elif letter in ["rev", "r"]:
    +            letter = "post"
    +
    +        return letter, int(number)
    +    if not letter and number:
    +        # We assume if we are given a number, but we are not given a letter
    +        # then this is using the implicit post release syntax (e.g. 1.0-1)
    +        letter = "post"
    +
    +        return letter, int(number)
    +
    +
    +_local_version_seperators = re.compile(r"[\._-]")
    +
    +
    +def _parse_local_version(local):
    +    """
    +    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
    +    """
    +    if local is not None:
    +        return tuple(
    +            part.lower() if not part.isdigit() else int(part)
    +            for part in _local_version_seperators.split(local)
    +        )
    +
    +
    +def _cmpkey(epoch, release, pre, post, dev, local):
    +    # When we compare a release version, we want to compare it with all of the
    +    # trailing zeros removed. So we'll use a reverse the list, drop all the now
    +    # leading zeros until we come to something non zero, then take the rest
    +    # re-reverse it back into the correct order and make it a tuple and use
    +    # that for our sorting key.
    +    release = tuple(
    +        reversed(list(
    +            itertools.dropwhile(
    +                lambda x: x == 0,
    +                reversed(release),
    +            )
    +        ))
    +    )
    +
    +    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
    +    # We'll do this by abusing the pre segment, but we _only_ want to do this
    +    # if there is not a pre or a post segment. If we have one of those then
    +    # the normal sorting rules will handle this case correctly.
    +    if pre is None and post is None and dev is not None:
    +        pre = -Infinity
    +    # Versions without a pre-release (except as noted above) should sort after
    +    # those with one.
    +    elif pre is None:
    +        pre = Infinity
    +
    +    # Versions without a post segment should sort before those with one.
    +    if post is None:
    +        post = -Infinity
    +
    +    # Versions without a development segment should sort after those with one.
    +    if dev is None:
    +        dev = Infinity
    +
    +    if local is None:
    +        # Versions without a local segment should sort before those with one.
    +        local = -Infinity
    +    else:
    +        # Versions with a local segment need that segment parsed to implement
    +        # the sorting rules in PEP440.
    +        # - Alpha numeric segments sort before numeric segments
    +        # - Alpha numeric segments sort lexicographically
    +        # - Numeric segments sort numerically
    +        # - Shorter versions sort before longer versions when the prefixes
    +        #   match exactly
    +        local = tuple(
    +            (i, "") if isinstance(i, int) else (-Infinity, i)
    +            for i in local
    +        )
    +
    +    return epoch, release, pre, post, dev, local
    diff --git a/setuptools/_vendor/pyparsing.py b/setuptools/_vendor/pyparsing.py
    new file mode 100644
    index 0000000000..a21224359e
    --- /dev/null
    +++ b/setuptools/_vendor/pyparsing.py
    @@ -0,0 +1,5696 @@
    +# module pyparsing.py
    +#
    +# Copyright (c) 2003-2016  Paul T. McGuire
    +#
    +# 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.
    +#
    +
    +__doc__ = \
    +"""
    +pyparsing module - Classes and methods to define and execute parsing grammars
    +
    +The pyparsing module is an alternative approach to creating and executing simple grammars,
    +vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you
    +don't need to learn a new syntax for defining grammars or matching expressions - the parsing module
    +provides a library of classes that you use to construct the grammar directly in Python.
    +
    +Here is a program to parse "Hello, World!" (or any greeting of the form 
    +C{", !"}), built up using L{Word}, L{Literal}, and L{And} elements 
    +(L{'+'} operator gives L{And} expressions, strings are auto-converted to
    +L{Literal} expressions)::
    +
    +    from pyparsing import Word, alphas
    +
    +    # define grammar of a greeting
    +    greet = Word(alphas) + "," + Word(alphas) + "!"
    +
    +    hello = "Hello, World!"
    +    print (hello, "->", greet.parseString(hello))
    +
    +The program outputs the following::
    +
    +    Hello, World! -> ['Hello', ',', 'World', '!']
    +
    +The Python representation of the grammar is quite readable, owing to the self-explanatory
    +class names, and the use of '+', '|' and '^' operators.
    +
    +The L{ParseResults} object returned from L{ParserElement.parseString} can be accessed as a nested list, a dictionary, or an
    +object with named attributes.
    +
    +The pyparsing module handles some of the problems that are typically vexing when writing text parsers:
    + - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)
    + - quoted strings
    + - embedded comments
    +"""
    +
    +__version__ = "2.1.10"
    +__versionTime__ = "07 Oct 2016 01:31 UTC"
    +__author__ = "Paul McGuire "
    +
    +import string
    +from weakref import ref as wkref
    +import copy
    +import sys
    +import warnings
    +import re
    +import sre_constants
    +import collections
    +import pprint
    +import traceback
    +import types
    +from datetime import datetime
    +
    +try:
    +    from _thread import RLock
    +except ImportError:
    +    from threading import RLock
    +
    +try:
    +    from collections import OrderedDict as _OrderedDict
    +except ImportError:
    +    try:
    +        from ordereddict import OrderedDict as _OrderedDict
    +    except ImportError:
    +        _OrderedDict = None
    +
    +#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
    +
    +__all__ = [
    +'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty',
    +'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal',
    +'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
    +'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException',
    +'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException',
    +'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter', 
    +'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore',
    +'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col',
    +'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString',
    +'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums',
    +'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno',
    +'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral',
    +'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables',
    +'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity', 
    +'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd',
    +'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute',
    +'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass',
    +'CloseMatch', 'tokenMap', 'pyparsing_common',
    +]
    +
    +system_version = tuple(sys.version_info)[:3]
    +PY_3 = system_version[0] == 3
    +if PY_3:
    +    _MAX_INT = sys.maxsize
    +    basestring = str
    +    unichr = chr
    +    _ustr = str
    +
    +    # build list of single arg builtins, that can be used as parse actions
    +    singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max]
    +
    +else:
    +    _MAX_INT = sys.maxint
    +    range = xrange
    +
    +    def _ustr(obj):
    +        """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries
    +           str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It
    +           then < returns the unicode object | encodes it with the default encoding | ... >.
    +        """
    +        if isinstance(obj,unicode):
    +            return obj
    +
    +        try:
    +            # If this works, then _ustr(obj) has the same behaviour as str(obj), so
    +            # it won't break any existing code.
    +            return str(obj)
    +
    +        except UnicodeEncodeError:
    +            # Else encode it
    +            ret = unicode(obj).encode(sys.getdefaultencoding(), 'xmlcharrefreplace')
    +            xmlcharref = Regex('&#\d+;')
    +            xmlcharref.setParseAction(lambda t: '\\u' + hex(int(t[0][2:-1]))[2:])
    +            return xmlcharref.transformString(ret)
    +
    +    # build list of single arg builtins, tolerant of Python version, that can be used as parse actions
    +    singleArgBuiltins = []
    +    import __builtin__
    +    for fname in "sum len sorted reversed list tuple set any all min max".split():
    +        try:
    +            singleArgBuiltins.append(getattr(__builtin__,fname))
    +        except AttributeError:
    +            continue
    +            
    +_generatorType = type((y for y in range(1)))
    + 
    +def _xml_escape(data):
    +    """Escape &, <, >, ", ', etc. in a string of data."""
    +
    +    # ampersand must be replaced first
    +    from_symbols = '&><"\''
    +    to_symbols = ('&'+s+';' for s in "amp gt lt quot apos".split())
    +    for from_,to_ in zip(from_symbols, to_symbols):
    +        data = data.replace(from_, to_)
    +    return data
    +
    +class _Constants(object):
    +    pass
    +
    +alphas     = string.ascii_uppercase + string.ascii_lowercase
    +nums       = "0123456789"
    +hexnums    = nums + "ABCDEFabcdef"
    +alphanums  = alphas + nums
    +_bslash    = chr(92)
    +printables = "".join(c for c in string.printable if c not in string.whitespace)
    +
    +class ParseBaseException(Exception):
    +    """base exception class for all parsing runtime exceptions"""
    +    # Performance tuning: we construct a *lot* of these, so keep this
    +    # constructor as small and fast as possible
    +    def __init__( self, pstr, loc=0, msg=None, elem=None ):
    +        self.loc = loc
    +        if msg is None:
    +            self.msg = pstr
    +            self.pstr = ""
    +        else:
    +            self.msg = msg
    +            self.pstr = pstr
    +        self.parserElement = elem
    +        self.args = (pstr, loc, msg)
    +
    +    @classmethod
    +    def _from_exception(cls, pe):
    +        """
    +        internal factory method to simplify creating one type of ParseException 
    +        from another - avoids having __init__ signature conflicts among subclasses
    +        """
    +        return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement)
    +
    +    def __getattr__( self, aname ):
    +        """supported attributes by name are:
    +            - lineno - returns the line number of the exception text
    +            - col - returns the column number of the exception text
    +            - line - returns the line containing the exception text
    +        """
    +        if( aname == "lineno" ):
    +            return lineno( self.loc, self.pstr )
    +        elif( aname in ("col", "column") ):
    +            return col( self.loc, self.pstr )
    +        elif( aname == "line" ):
    +            return line( self.loc, self.pstr )
    +        else:
    +            raise AttributeError(aname)
    +
    +    def __str__( self ):
    +        return "%s (at char %d), (line:%d, col:%d)" % \
    +                ( self.msg, self.loc, self.lineno, self.column )
    +    def __repr__( self ):
    +        return _ustr(self)
    +    def markInputline( self, markerString = ">!<" ):
    +        """Extracts the exception line from the input string, and marks
    +           the location of the exception with a special symbol.
    +        """
    +        line_str = self.line
    +        line_column = self.column - 1
    +        if markerString:
    +            line_str = "".join((line_str[:line_column],
    +                                markerString, line_str[line_column:]))
    +        return line_str.strip()
    +    def __dir__(self):
    +        return "lineno col line".split() + dir(type(self))
    +
    +class ParseException(ParseBaseException):
    +    """
    +    Exception thrown when parse expressions don't match class;
    +    supported attributes by name are:
    +     - lineno - returns the line number of the exception text
    +     - col - returns the column number of the exception text
    +     - line - returns the line containing the exception text
    +        
    +    Example::
    +        try:
    +            Word(nums).setName("integer").parseString("ABC")
    +        except ParseException as pe:
    +            print(pe)
    +            print("column: {}".format(pe.col))
    +            
    +    prints::
    +       Expected integer (at char 0), (line:1, col:1)
    +        column: 1
    +    """
    +    pass
    +
    +class ParseFatalException(ParseBaseException):
    +    """user-throwable exception thrown when inconsistent parse content
    +       is found; stops all parsing immediately"""
    +    pass
    +
    +class ParseSyntaxException(ParseFatalException):
    +    """just like L{ParseFatalException}, but thrown internally when an
    +       L{ErrorStop} ('-' operator) indicates that parsing is to stop 
    +       immediately because an unbacktrackable syntax error has been found"""
    +    pass
    +
    +#~ class ReparseException(ParseBaseException):
    +    #~ """Experimental class - parse actions can raise this exception to cause
    +       #~ pyparsing to reparse the input string:
    +        #~ - with a modified input string, and/or
    +        #~ - with a modified start location
    +       #~ Set the values of the ReparseException in the constructor, and raise the
    +       #~ exception in a parse action to cause pyparsing to use the new string/location.
    +       #~ Setting the values as None causes no change to be made.
    +       #~ """
    +    #~ def __init_( self, newstring, restartLoc ):
    +        #~ self.newParseText = newstring
    +        #~ self.reparseLoc = restartLoc
    +
    +class RecursiveGrammarException(Exception):
    +    """exception thrown by L{ParserElement.validate} if the grammar could be improperly recursive"""
    +    def __init__( self, parseElementList ):
    +        self.parseElementTrace = parseElementList
    +
    +    def __str__( self ):
    +        return "RecursiveGrammarException: %s" % self.parseElementTrace
    +
    +class _ParseResultsWithOffset(object):
    +    def __init__(self,p1,p2):
    +        self.tup = (p1,p2)
    +    def __getitem__(self,i):
    +        return self.tup[i]
    +    def __repr__(self):
    +        return repr(self.tup[0])
    +    def setOffset(self,i):
    +        self.tup = (self.tup[0],i)
    +
    +class ParseResults(object):
    +    """
    +    Structured parse results, to provide multiple means of access to the parsed data:
    +       - as a list (C{len(results)})
    +       - by list index (C{results[0], results[1]}, etc.)
    +       - by attribute (C{results.} - see L{ParserElement.setResultsName})
    +
    +    Example::
    +        integer = Word(nums)
    +        date_str = (integer.setResultsName("year") + '/' 
    +                        + integer.setResultsName("month") + '/' 
    +                        + integer.setResultsName("day"))
    +        # equivalent form:
    +        # date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +
    +        # parseString returns a ParseResults object
    +        result = date_str.parseString("1999/12/31")
    +
    +        def test(s, fn=repr):
    +            print("%s -> %s" % (s, fn(eval(s))))
    +        test("list(result)")
    +        test("result[0]")
    +        test("result['month']")
    +        test("result.day")
    +        test("'month' in result")
    +        test("'minutes' in result")
    +        test("result.dump()", str)
    +    prints::
    +        list(result) -> ['1999', '/', '12', '/', '31']
    +        result[0] -> '1999'
    +        result['month'] -> '12'
    +        result.day -> '31'
    +        'month' in result -> True
    +        'minutes' in result -> False
    +        result.dump() -> ['1999', '/', '12', '/', '31']
    +        - day: 31
    +        - month: 12
    +        - year: 1999
    +    """
    +    def __new__(cls, toklist=None, name=None, asList=True, modal=True ):
    +        if isinstance(toklist, cls):
    +            return toklist
    +        retobj = object.__new__(cls)
    +        retobj.__doinit = True
    +        return retobj
    +
    +    # Performance tuning: we construct a *lot* of these, so keep this
    +    # constructor as small and fast as possible
    +    def __init__( self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance ):
    +        if self.__doinit:
    +            self.__doinit = False
    +            self.__name = None
    +            self.__parent = None
    +            self.__accumNames = {}
    +            self.__asList = asList
    +            self.__modal = modal
    +            if toklist is None:
    +                toklist = []
    +            if isinstance(toklist, list):
    +                self.__toklist = toklist[:]
    +            elif isinstance(toklist, _generatorType):
    +                self.__toklist = list(toklist)
    +            else:
    +                self.__toklist = [toklist]
    +            self.__tokdict = dict()
    +
    +        if name is not None and name:
    +            if not modal:
    +                self.__accumNames[name] = 0
    +            if isinstance(name,int):
    +                name = _ustr(name) # will always return a str, but use _ustr for consistency
    +            self.__name = name
    +            if not (isinstance(toklist, (type(None), basestring, list)) and toklist in (None,'',[])):
    +                if isinstance(toklist,basestring):
    +                    toklist = [ toklist ]
    +                if asList:
    +                    if isinstance(toklist,ParseResults):
    +                        self[name] = _ParseResultsWithOffset(toklist.copy(),0)
    +                    else:
    +                        self[name] = _ParseResultsWithOffset(ParseResults(toklist[0]),0)
    +                    self[name].__name = name
    +                else:
    +                    try:
    +                        self[name] = toklist[0]
    +                    except (KeyError,TypeError,IndexError):
    +                        self[name] = toklist
    +
    +    def __getitem__( self, i ):
    +        if isinstance( i, (int,slice) ):
    +            return self.__toklist[i]
    +        else:
    +            if i not in self.__accumNames:
    +                return self.__tokdict[i][-1][0]
    +            else:
    +                return ParseResults([ v[0] for v in self.__tokdict[i] ])
    +
    +    def __setitem__( self, k, v, isinstance=isinstance ):
    +        if isinstance(v,_ParseResultsWithOffset):
    +            self.__tokdict[k] = self.__tokdict.get(k,list()) + [v]
    +            sub = v[0]
    +        elif isinstance(k,(int,slice)):
    +            self.__toklist[k] = v
    +            sub = v
    +        else:
    +            self.__tokdict[k] = self.__tokdict.get(k,list()) + [_ParseResultsWithOffset(v,0)]
    +            sub = v
    +        if isinstance(sub,ParseResults):
    +            sub.__parent = wkref(self)
    +
    +    def __delitem__( self, i ):
    +        if isinstance(i,(int,slice)):
    +            mylen = len( self.__toklist )
    +            del self.__toklist[i]
    +
    +            # convert int to slice
    +            if isinstance(i, int):
    +                if i < 0:
    +                    i += mylen
    +                i = slice(i, i+1)
    +            # get removed indices
    +            removed = list(range(*i.indices(mylen)))
    +            removed.reverse()
    +            # fixup indices in token dictionary
    +            for name,occurrences in self.__tokdict.items():
    +                for j in removed:
    +                    for k, (value, position) in enumerate(occurrences):
    +                        occurrences[k] = _ParseResultsWithOffset(value, position - (position > j))
    +        else:
    +            del self.__tokdict[i]
    +
    +    def __contains__( self, k ):
    +        return k in self.__tokdict
    +
    +    def __len__( self ): return len( self.__toklist )
    +    def __bool__(self): return ( not not self.__toklist )
    +    __nonzero__ = __bool__
    +    def __iter__( self ): return iter( self.__toklist )
    +    def __reversed__( self ): return iter( self.__toklist[::-1] )
    +    def _iterkeys( self ):
    +        if hasattr(self.__tokdict, "iterkeys"):
    +            return self.__tokdict.iterkeys()
    +        else:
    +            return iter(self.__tokdict)
    +
    +    def _itervalues( self ):
    +        return (self[k] for k in self._iterkeys())
    +            
    +    def _iteritems( self ):
    +        return ((k, self[k]) for k in self._iterkeys())
    +
    +    if PY_3:
    +        keys = _iterkeys       
    +        """Returns an iterator of all named result keys (Python 3.x only)."""
    +
    +        values = _itervalues
    +        """Returns an iterator of all named result values (Python 3.x only)."""
    +
    +        items = _iteritems
    +        """Returns an iterator of all named result key-value tuples (Python 3.x only)."""
    +
    +    else:
    +        iterkeys = _iterkeys
    +        """Returns an iterator of all named result keys (Python 2.x only)."""
    +
    +        itervalues = _itervalues
    +        """Returns an iterator of all named result values (Python 2.x only)."""
    +
    +        iteritems = _iteritems
    +        """Returns an iterator of all named result key-value tuples (Python 2.x only)."""
    +
    +        def keys( self ):
    +            """Returns all named result keys (as a list in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.iterkeys())
    +
    +        def values( self ):
    +            """Returns all named result values (as a list in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.itervalues())
    +                
    +        def items( self ):
    +            """Returns all named result key-values (as a list of tuples in Python 2.x, as an iterator in Python 3.x)."""
    +            return list(self.iteritems())
    +
    +    def haskeys( self ):
    +        """Since keys() returns an iterator, this method is helpful in bypassing
    +           code that looks for the existence of any defined results names."""
    +        return bool(self.__tokdict)
    +        
    +    def pop( self, *args, **kwargs):
    +        """
    +        Removes and returns item at specified index (default=C{last}).
    +        Supports both C{list} and C{dict} semantics for C{pop()}. If passed no
    +        argument or an integer argument, it will use C{list} semantics
    +        and pop tokens from the list of parsed tokens. If passed a 
    +        non-integer argument (most likely a string), it will use C{dict}
    +        semantics and pop the corresponding value from any defined 
    +        results names. A second default return value argument is 
    +        supported, just as in C{dict.pop()}.
    +
    +        Example::
    +            def remove_first(tokens):
    +                tokens.pop(0)
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +            print(OneOrMore(Word(nums)).addParseAction(remove_first).parseString("0 123 321")) # -> ['123', '321']
    +
    +            label = Word(alphas)
    +            patt = label("LABEL") + OneOrMore(Word(nums))
    +            print(patt.parseString("AAB 123 321").dump())
    +
    +            # Use pop() in a parse action to remove named result (note that corresponding value is not
    +            # removed from list form of results)
    +            def remove_LABEL(tokens):
    +                tokens.pop("LABEL")
    +                return tokens
    +            patt.addParseAction(remove_LABEL)
    +            print(patt.parseString("AAB 123 321").dump())
    +        prints::
    +            ['AAB', '123', '321']
    +            - LABEL: AAB
    +
    +            ['AAB', '123', '321']
    +        """
    +        if not args:
    +            args = [-1]
    +        for k,v in kwargs.items():
    +            if k == 'default':
    +                args = (args[0], v)
    +            else:
    +                raise TypeError("pop() got an unexpected keyword argument '%s'" % k)
    +        if (isinstance(args[0], int) or 
    +                        len(args) == 1 or 
    +                        args[0] in self):
    +            index = args[0]
    +            ret = self[index]
    +            del self[index]
    +            return ret
    +        else:
    +            defaultvalue = args[1]
    +            return defaultvalue
    +
    +    def get(self, key, defaultValue=None):
    +        """
    +        Returns named result matching the given key, or if there is no
    +        such name, then returns the given C{defaultValue} or C{None} if no
    +        C{defaultValue} is specified.
    +
    +        Similar to C{dict.get()}.
    +        
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            result = date_str.parseString("1999/12/31")
    +            print(result.get("year")) # -> '1999'
    +            print(result.get("hour", "not specified")) # -> 'not specified'
    +            print(result.get("hour")) # -> None
    +        """
    +        if key in self:
    +            return self[key]
    +        else:
    +            return defaultValue
    +
    +    def insert( self, index, insStr ):
    +        """
    +        Inserts new element at location index in the list of parsed tokens.
    +        
    +        Similar to C{list.insert()}.
    +
    +        Example::
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +
    +            # use a parse action to insert the parse location in the front of the parsed results
    +            def insert_locn(locn, tokens):
    +                tokens.insert(0, locn)
    +            print(OneOrMore(Word(nums)).addParseAction(insert_locn).parseString("0 123 321")) # -> [0, '0', '123', '321']
    +        """
    +        self.__toklist.insert(index, insStr)
    +        # fixup indices in token dictionary
    +        for name,occurrences in self.__tokdict.items():
    +            for k, (value, position) in enumerate(occurrences):
    +                occurrences[k] = _ParseResultsWithOffset(value, position + (position > index))
    +
    +    def append( self, item ):
    +        """
    +        Add single element to end of ParseResults list of elements.
    +
    +        Example::
    +            print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321']
    +            
    +            # use a parse action to compute the sum of the parsed integers, and add it to the end
    +            def append_sum(tokens):
    +                tokens.append(sum(map(int, tokens)))
    +            print(OneOrMore(Word(nums)).addParseAction(append_sum).parseString("0 123 321")) # -> ['0', '123', '321', 444]
    +        """
    +        self.__toklist.append(item)
    +
    +    def extend( self, itemseq ):
    +        """
    +        Add sequence of elements to end of ParseResults list of elements.
    +
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            
    +            # use a parse action to append the reverse of the matched strings, to make a palindrome
    +            def make_palindrome(tokens):
    +                tokens.extend(reversed([t[::-1] for t in tokens]))
    +                return ''.join(tokens)
    +            print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
    +        """
    +        if isinstance(itemseq, ParseResults):
    +            self += itemseq
    +        else:
    +            self.__toklist.extend(itemseq)
    +
    +    def clear( self ):
    +        """
    +        Clear all elements and results names.
    +        """
    +        del self.__toklist[:]
    +        self.__tokdict.clear()
    +
    +    def __getattr__( self, name ):
    +        try:
    +            return self[name]
    +        except KeyError:
    +            return ""
    +            
    +        if name in self.__tokdict:
    +            if name not in self.__accumNames:
    +                return self.__tokdict[name][-1][0]
    +            else:
    +                return ParseResults([ v[0] for v in self.__tokdict[name] ])
    +        else:
    +            return ""
    +
    +    def __add__( self, other ):
    +        ret = self.copy()
    +        ret += other
    +        return ret
    +
    +    def __iadd__( self, other ):
    +        if other.__tokdict:
    +            offset = len(self.__toklist)
    +            addoffset = lambda a: offset if a<0 else a+offset
    +            otheritems = other.__tokdict.items()
    +            otherdictitems = [(k, _ParseResultsWithOffset(v[0],addoffset(v[1])) )
    +                                for (k,vlist) in otheritems for v in vlist]
    +            for k,v in otherdictitems:
    +                self[k] = v
    +                if isinstance(v[0],ParseResults):
    +                    v[0].__parent = wkref(self)
    +            
    +        self.__toklist += other.__toklist
    +        self.__accumNames.update( other.__accumNames )
    +        return self
    +
    +    def __radd__(self, other):
    +        if isinstance(other,int) and other == 0:
    +            # useful for merging many ParseResults using sum() builtin
    +            return self.copy()
    +        else:
    +            # this may raise a TypeError - so be it
    +            return other + self
    +        
    +    def __repr__( self ):
    +        return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )
    +
    +    def __str__( self ):
    +        return '[' + ', '.join(_ustr(i) if isinstance(i, ParseResults) else repr(i) for i in self.__toklist) + ']'
    +
    +    def _asStringList( self, sep='' ):
    +        out = []
    +        for item in self.__toklist:
    +            if out and sep:
    +                out.append(sep)
    +            if isinstance( item, ParseResults ):
    +                out += item._asStringList()
    +            else:
    +                out.append( _ustr(item) )
    +        return out
    +
    +    def asList( self ):
    +        """
    +        Returns the parse results as a nested list of matching tokens, all converted to strings.
    +
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            result = patt.parseString("sldkj lsdkj sldkj")
    +            # even though the result prints in string-like form, it is actually a pyparsing ParseResults
    +            print(type(result), result) # ->  ['sldkj', 'lsdkj', 'sldkj']
    +            
    +            # Use asList() to create an actual list
    +            result_list = result.asList()
    +            print(type(result_list), result_list) # ->  ['sldkj', 'lsdkj', 'sldkj']
    +        """
    +        return [res.asList() if isinstance(res,ParseResults) else res for res in self.__toklist]
    +
    +    def asDict( self ):
    +        """
    +        Returns the named parse results as a nested dictionary.
    +
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +            
    +            result = date_str.parseString('12/31/1999')
    +            print(type(result), repr(result)) # ->  (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})
    +            
    +            result_dict = result.asDict()
    +            print(type(result_dict), repr(result_dict)) # ->  {'day': '1999', 'year': '12', 'month': '31'}
    +
    +            # even though a ParseResults supports dict-like access, sometime you just need to have a dict
    +            import json
    +            print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
    +            print(json.dumps(result.asDict())) # -> {"month": "31", "day": "1999", "year": "12"}
    +        """
    +        if PY_3:
    +            item_fn = self.items
    +        else:
    +            item_fn = self.iteritems
    +            
    +        def toItem(obj):
    +            if isinstance(obj, ParseResults):
    +                if obj.haskeys():
    +                    return obj.asDict()
    +                else:
    +                    return [toItem(v) for v in obj]
    +            else:
    +                return obj
    +                
    +        return dict((k,toItem(v)) for k,v in item_fn())
    +
    +    def copy( self ):
    +        """
    +        Returns a new copy of a C{ParseResults} object.
    +        """
    +        ret = ParseResults( self.__toklist )
    +        ret.__tokdict = self.__tokdict.copy()
    +        ret.__parent = self.__parent
    +        ret.__accumNames.update( self.__accumNames )
    +        ret.__name = self.__name
    +        return ret
    +
    +    def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ):
    +        """
    +        (Deprecated) Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.
    +        """
    +        nl = "\n"
    +        out = []
    +        namedItems = dict((v[1],k) for (k,vlist) in self.__tokdict.items()
    +                                                            for v in vlist)
    +        nextLevelIndent = indent + "  "
    +
    +        # collapse out indents if formatting is not desired
    +        if not formatted:
    +            indent = ""
    +            nextLevelIndent = ""
    +            nl = ""
    +
    +        selfTag = None
    +        if doctag is not None:
    +            selfTag = doctag
    +        else:
    +            if self.__name:
    +                selfTag = self.__name
    +
    +        if not selfTag:
    +            if namedItemsOnly:
    +                return ""
    +            else:
    +                selfTag = "ITEM"
    +
    +        out += [ nl, indent, "<", selfTag, ">" ]
    +
    +        for i,res in enumerate(self.__toklist):
    +            if isinstance(res,ParseResults):
    +                if i in namedItems:
    +                    out += [ res.asXML(namedItems[i],
    +                                        namedItemsOnly and doctag is None,
    +                                        nextLevelIndent,
    +                                        formatted)]
    +                else:
    +                    out += [ res.asXML(None,
    +                                        namedItemsOnly and doctag is None,
    +                                        nextLevelIndent,
    +                                        formatted)]
    +            else:
    +                # individual token, see if there is a name for it
    +                resTag = None
    +                if i in namedItems:
    +                    resTag = namedItems[i]
    +                if not resTag:
    +                    if namedItemsOnly:
    +                        continue
    +                    else:
    +                        resTag = "ITEM"
    +                xmlBodyText = _xml_escape(_ustr(res))
    +                out += [ nl, nextLevelIndent, "<", resTag, ">",
    +                                                xmlBodyText,
    +                                                "" ]
    +
    +        out += [ nl, indent, "" ]
    +        return "".join(out)
    +
    +    def __lookup(self,sub):
    +        for k,vlist in self.__tokdict.items():
    +            for v,loc in vlist:
    +                if sub is v:
    +                    return k
    +        return None
    +
    +    def getName(self):
    +        """
    +        Returns the results name for this token expression. Useful when several 
    +        different expressions might match at a particular location.
    +
    +        Example::
    +            integer = Word(nums)
    +            ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
    +            house_number_expr = Suppress('#') + Word(nums, alphanums)
    +            user_data = (Group(house_number_expr)("house_number") 
    +                        | Group(ssn_expr)("ssn")
    +                        | Group(integer)("age"))
    +            user_info = OneOrMore(user_data)
    +            
    +            result = user_info.parseString("22 111-22-3333 #221B")
    +            for item in result:
    +                print(item.getName(), ':', item[0])
    +        prints::
    +            age : 22
    +            ssn : 111-22-3333
    +            house_number : 221B
    +        """
    +        if self.__name:
    +            return self.__name
    +        elif self.__parent:
    +            par = self.__parent()
    +            if par:
    +                return par.__lookup(self)
    +            else:
    +                return None
    +        elif (len(self) == 1 and
    +               len(self.__tokdict) == 1 and
    +               next(iter(self.__tokdict.values()))[0][1] in (0,-1)):
    +            return next(iter(self.__tokdict.keys()))
    +        else:
    +            return None
    +
    +    def dump(self, indent='', depth=0, full=True):
    +        """
    +        Diagnostic method for listing out the contents of a C{ParseResults}.
    +        Accepts an optional C{indent} argument so that this string can be embedded
    +        in a nested display of other data.
    +
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +            
    +            result = date_str.parseString('12/31/1999')
    +            print(result.dump())
    +        prints::
    +            ['12', '/', '31', '/', '1999']
    +            - day: 1999
    +            - month: 31
    +            - year: 12
    +        """
    +        out = []
    +        NL = '\n'
    +        out.append( indent+_ustr(self.asList()) )
    +        if full:
    +            if self.haskeys():
    +                items = sorted((str(k), v) for k,v in self.items())
    +                for k,v in items:
    +                    if out:
    +                        out.append(NL)
    +                    out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
    +                    if isinstance(v,ParseResults):
    +                        if v:
    +                            out.append( v.dump(indent,depth+1) )
    +                        else:
    +                            out.append(_ustr(v))
    +                    else:
    +                        out.append(repr(v))
    +            elif any(isinstance(vv,ParseResults) for vv in self):
    +                v = self
    +                for i,vv in enumerate(v):
    +                    if isinstance(vv,ParseResults):
    +                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),vv.dump(indent,depth+1) ))
    +                    else:
    +                        out.append("\n%s%s[%d]:\n%s%s%s" % (indent,('  '*(depth)),i,indent,('  '*(depth+1)),_ustr(vv)))
    +            
    +        return "".join(out)
    +
    +    def pprint(self, *args, **kwargs):
    +        """
    +        Pretty-printer for parsed results as a list, using the C{pprint} module.
    +        Accepts additional positional or keyword args as defined for the 
    +        C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})
    +
    +        Example::
    +            ident = Word(alphas, alphanums)
    +            num = Word(nums)
    +            func = Forward()
    +            term = ident | num | Group('(' + func + ')')
    +            func <<= ident + Group(Optional(delimitedList(term)))
    +            result = func.parseString("fna a,b,(fnb c,d,200),100")
    +            result.pprint(width=40)
    +        prints::
    +            ['fna',
    +             ['a',
    +              'b',
    +              ['(', 'fnb', ['c', 'd', '200'], ')'],
    +              '100']]
    +        """
    +        pprint.pprint(self.asList(), *args, **kwargs)
    +
    +    # add support for pickle protocol
    +    def __getstate__(self):
    +        return ( self.__toklist,
    +                 ( self.__tokdict.copy(),
    +                   self.__parent is not None and self.__parent() or None,
    +                   self.__accumNames,
    +                   self.__name ) )
    +
    +    def __setstate__(self,state):
    +        self.__toklist = state[0]
    +        (self.__tokdict,
    +         par,
    +         inAccumNames,
    +         self.__name) = state[1]
    +        self.__accumNames = {}
    +        self.__accumNames.update(inAccumNames)
    +        if par is not None:
    +            self.__parent = wkref(par)
    +        else:
    +            self.__parent = None
    +
    +    def __getnewargs__(self):
    +        return self.__toklist, self.__name, self.__asList, self.__modal
    +
    +    def __dir__(self):
    +        return (dir(type(self)) + list(self.keys()))
    +
    +collections.MutableMapping.register(ParseResults)
    +
    +def col (loc,strg):
    +    """Returns current column within a string, counting newlines as line separators.
    +   The first column is number 1.
    +
    +   Note: the default parsing behavior is to expand tabs in the input string
    +   before starting the parsing process.  See L{I{ParserElement.parseString}} for more information
    +   on parsing strings containing C{}s, and suggested methods to maintain a
    +   consistent view of the parsed string, the parse location, and line and column
    +   positions within the parsed string.
    +   """
    +    s = strg
    +    return 1 if 0} for more information
    +   on parsing strings containing C{}s, and suggested methods to maintain a
    +   consistent view of the parsed string, the parse location, and line and column
    +   positions within the parsed string.
    +   """
    +    return strg.count("\n",0,loc) + 1
    +
    +def line( loc, strg ):
    +    """Returns the line of text containing loc within a string, counting newlines as line separators.
    +       """
    +    lastCR = strg.rfind("\n", 0, loc)
    +    nextCR = strg.find("\n", loc)
    +    if nextCR >= 0:
    +        return strg[lastCR+1:nextCR]
    +    else:
    +        return strg[lastCR+1:]
    +
    +def _defaultStartDebugAction( instring, loc, expr ):
    +    print (("Match " + _ustr(expr) + " at loc " + _ustr(loc) + "(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )))
    +
    +def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ):
    +    print ("Matched " + _ustr(expr) + " -> " + str(toks.asList()))
    +
    +def _defaultExceptionDebugAction( instring, loc, expr, exc ):
    +    print ("Exception raised:" + _ustr(exc))
    +
    +def nullDebugAction(*args):
    +    """'Do-nothing' debug action, to suppress debugging output during parsing."""
    +    pass
    +
    +# Only works on Python 3.x - nonlocal is toxic to Python 2 installs
    +#~ 'decorator to trim function calls to match the arity of the target'
    +#~ def _trim_arity(func, maxargs=3):
    +    #~ if func in singleArgBuiltins:
    +        #~ return lambda s,l,t: func(t)
    +    #~ limit = 0
    +    #~ foundArity = False
    +    #~ def wrapper(*args):
    +        #~ nonlocal limit,foundArity
    +        #~ while 1:
    +            #~ try:
    +                #~ ret = func(*args[limit:])
    +                #~ foundArity = True
    +                #~ return ret
    +            #~ except TypeError:
    +                #~ if limit == maxargs or foundArity:
    +                    #~ raise
    +                #~ limit += 1
    +                #~ continue
    +    #~ return wrapper
    +
    +# this version is Python 2.x-3.x cross-compatible
    +'decorator to trim function calls to match the arity of the target'
    +def _trim_arity(func, maxargs=2):
    +    if func in singleArgBuiltins:
    +        return lambda s,l,t: func(t)
    +    limit = [0]
    +    foundArity = [False]
    +    
    +    # traceback return data structure changed in Py3.5 - normalize back to plain tuples
    +    if system_version[:2] >= (3,5):
    +        def extract_stack(limit=0):
    +            # special handling for Python 3.5.0 - extra deep call stack by 1
    +            offset = -3 if system_version == (3,5,0) else -2
    +            frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset]
    +            return [(frame_summary.filename, frame_summary.lineno)]
    +        def extract_tb(tb, limit=0):
    +            frames = traceback.extract_tb(tb, limit=limit)
    +            frame_summary = frames[-1]
    +            return [(frame_summary.filename, frame_summary.lineno)]
    +    else:
    +        extract_stack = traceback.extract_stack
    +        extract_tb = traceback.extract_tb
    +    
    +    # synthesize what would be returned by traceback.extract_stack at the call to 
    +    # user's parse action 'func', so that we don't incur call penalty at parse time
    +    
    +    LINE_DIFF = 6
    +    # IF ANY CODE CHANGES, EVEN JUST COMMENTS OR BLANK LINES, BETWEEN THE NEXT LINE AND 
    +    # THE CALL TO FUNC INSIDE WRAPPER, LINE_DIFF MUST BE MODIFIED!!!!
    +    this_line = extract_stack(limit=2)[-1]
    +    pa_call_line_synth = (this_line[0], this_line[1]+LINE_DIFF)
    +
    +    def wrapper(*args):
    +        while 1:
    +            try:
    +                ret = func(*args[limit[0]:])
    +                foundArity[0] = True
    +                return ret
    +            except TypeError:
    +                # re-raise TypeErrors if they did not come from our arity testing
    +                if foundArity[0]:
    +                    raise
    +                else:
    +                    try:
    +                        tb = sys.exc_info()[-1]
    +                        if not extract_tb(tb, limit=2)[-1][:2] == pa_call_line_synth:
    +                            raise
    +                    finally:
    +                        del tb
    +
    +                if limit[0] <= maxargs:
    +                    limit[0] += 1
    +                    continue
    +                raise
    +
    +    # copy func name to wrapper for sensible debug output
    +    func_name = ""
    +    try:
    +        func_name = getattr(func, '__name__', 
    +                            getattr(func, '__class__').__name__)
    +    except Exception:
    +        func_name = str(func)
    +    wrapper.__name__ = func_name
    +
    +    return wrapper
    +
    +class ParserElement(object):
    +    """Abstract base level parser element class."""
    +    DEFAULT_WHITE_CHARS = " \n\t\r"
    +    verbose_stacktrace = False
    +
    +    @staticmethod
    +    def setDefaultWhitespaceChars( chars ):
    +        r"""
    +        Overrides the default whitespace chars
    +
    +        Example::
    +            # default whitespace chars are space,  and newline
    +            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']
    +            
    +            # change to just treat newline as significant
    +            ParserElement.setDefaultWhitespaceChars(" \t")
    +            OneOrMore(Word(alphas)).parseString("abc def\nghi jkl")  # -> ['abc', 'def']
    +        """
    +        ParserElement.DEFAULT_WHITE_CHARS = chars
    +
    +    @staticmethod
    +    def inlineLiteralsUsing(cls):
    +        """
    +        Set class to be used for inclusion of string literals into a parser.
    +        
    +        Example::
    +            # default literal class used is Literal
    +            integer = Word(nums)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    +
    +
    +            # change to Suppress
    +            ParserElement.inlineLiteralsUsing(Suppress)
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")           
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '12', '31']
    +        """
    +        ParserElement._literalStringClass = cls
    +
    +    def __init__( self, savelist=False ):
    +        self.parseAction = list()
    +        self.failAction = None
    +        #~ self.name = ""  # don't define self.name, let subclasses try/except upcall
    +        self.strRepr = None
    +        self.resultsName = None
    +        self.saveAsList = savelist
    +        self.skipWhitespace = True
    +        self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    +        self.copyDefaultWhiteChars = True
    +        self.mayReturnEmpty = False # used when checking for left-recursion
    +        self.keepTabs = False
    +        self.ignoreExprs = list()
    +        self.debug = False
    +        self.streamlined = False
    +        self.mayIndexError = True # used to optimize exception handling for subclasses that don't advance parse index
    +        self.errmsg = ""
    +        self.modalResults = True # used to mark results names as modal (report only last) or cumulative (list all)
    +        self.debugActions = ( None, None, None ) #custom debug actions
    +        self.re = None
    +        self.callPreparse = True # used to avoid redundant calls to preParse
    +        self.callDuringTry = False
    +
    +    def copy( self ):
    +        """
    +        Make a copy of this C{ParserElement}.  Useful for defining different parse actions
    +        for the same parsing pattern, using copies of the original parse element.
    +        
    +        Example::
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            integerK = integer.copy().addParseAction(lambda toks: toks[0]*1024) + Suppress("K")
    +            integerM = integer.copy().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    +            
    +            print(OneOrMore(integerK | integerM | integer).parseString("5K 100 640K 256M"))
    +        prints::
    +            [5120, 100, 655360, 268435456]
    +        Equivalent form of C{expr.copy()} is just C{expr()}::
    +            integerM = integer().addParseAction(lambda toks: toks[0]*1024*1024) + Suppress("M")
    +        """
    +        cpy = copy.copy( self )
    +        cpy.parseAction = self.parseAction[:]
    +        cpy.ignoreExprs = self.ignoreExprs[:]
    +        if self.copyDefaultWhiteChars:
    +            cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
    +        return cpy
    +
    +    def setName( self, name ):
    +        """
    +        Define name for this expression, makes debugging and exception messages clearer.
    +        
    +        Example::
    +            Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
    +            Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
    +        """
    +        self.name = name
    +        self.errmsg = "Expected " + self.name
    +        if hasattr(self,"exception"):
    +            self.exception.msg = self.errmsg
    +        return self
    +
    +    def setResultsName( self, name, listAllMatches=False ):
    +        """
    +        Define name for referencing matching tokens as a nested attribute
    +        of the returned parse results.
    +        NOTE: this returns a *copy* of the original C{ParserElement} object;
    +        this is so that the client can define a basic element, such as an
    +        integer, and reference it in multiple places with different names.
    +
    +        You can also set results names using the abbreviated syntax,
    +        C{expr("name")} in place of C{expr.setResultsName("name")} - 
    +        see L{I{__call__}<__call__>}.
    +
    +        Example::
    +            date_str = (integer.setResultsName("year") + '/' 
    +                        + integer.setResultsName("month") + '/' 
    +                        + integer.setResultsName("day"))
    +
    +            # equivalent form:
    +            date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
    +        """
    +        newself = self.copy()
    +        if name.endswith("*"):
    +            name = name[:-1]
    +            listAllMatches=True
    +        newself.resultsName = name
    +        newself.modalResults = not listAllMatches
    +        return newself
    +
    +    def setBreak(self,breakFlag = True):
    +        """Method to invoke the Python pdb debugger when this element is
    +           about to be parsed. Set C{breakFlag} to True to enable, False to
    +           disable.
    +        """
    +        if breakFlag:
    +            _parseMethod = self._parse
    +            def breaker(instring, loc, doActions=True, callPreParse=True):
    +                import pdb
    +                pdb.set_trace()
    +                return _parseMethod( instring, loc, doActions, callPreParse )
    +            breaker._originalParseMethod = _parseMethod
    +            self._parse = breaker
    +        else:
    +            if hasattr(self._parse,"_originalParseMethod"):
    +                self._parse = self._parse._originalParseMethod
    +        return self
    +
    +    def setParseAction( self, *fns, **kwargs ):
    +        """
    +        Define action 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)
    +         - loc = the location of the matching substring
    +         - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object
    +        If the functions in fns modify the tokens, they can return them as the return
    +        value from fn, and the modified list of tokens will replace the original.
    +        Otherwise, fn does not need to return any value.
    +
    +        Optional keyword arguments:
    +         - callDuringTry = (default=C{False}) indicate if parse action should be run during lookaheads and alternate testing
    +
    +        Note: the default parsing behavior is to expand tabs in the input string
    +        before starting the parsing process.  See L{I{parseString}} for more information
    +        on parsing strings containing C{}s, and suggested methods to maintain a
    +        consistent view of the parsed string, the parse location, and line and column
    +        positions within the parsed string.
    +        
    +        Example::
    +            integer = Word(nums)
    +            date_str = integer + '/' + integer + '/' + integer
    +
    +            date_str.parseString("1999/12/31")  # -> ['1999', '/', '12', '/', '31']
    +
    +            # use parse action to convert to ints at parse time
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            date_str = integer + '/' + integer + '/' + integer
    +
    +            # note that integer fields are now ints, not strings
    +            date_str.parseString("1999/12/31")  # -> [1999, '/', 12, '/', 31]
    +        """
    +        self.parseAction = list(map(_trim_arity, list(fns)))
    +        self.callDuringTry = kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def addParseAction( self, *fns, **kwargs ):
    +        """
    +        Add parse action to expression's list of parse actions. See L{I{setParseAction}}.
    +        
    +        See examples in L{I{copy}}.
    +        """
    +        self.parseAction += list(map(_trim_arity, list(fns)))
    +        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def addCondition(self, *fns, **kwargs):
    +        """Add a boolean predicate function to expression's list of parse actions. See 
    +        L{I{setParseAction}} for function call signatures. Unlike C{setParseAction}, 
    +        functions passed to C{addCondition} need to return boolean success/fail of the condition.
    +
    +        Optional keyword arguments:
    +         - message = define a custom message to be used in the raised exception
    +         - fatal   = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise ParseException
    +         
    +        Example::
    +            integer = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +            year_int = integer.copy()
    +            year_int.addCondition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
    +            date_str = year_int + '/' + integer + '/' + integer
    +
    +            result = date_str.parseString("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0), (line:1, col:1)
    +        """
    +        msg = kwargs.get("message", "failed user-defined condition")
    +        exc_type = ParseFatalException if kwargs.get("fatal", False) else ParseException
    +        for fn in fns:
    +            def pa(s,l,t):
    +                if not bool(_trim_arity(fn)(s,l,t)):
    +                    raise exc_type(s,l,msg)
    +            self.parseAction.append(pa)
    +        self.callDuringTry = self.callDuringTry or kwargs.get("callDuringTry", False)
    +        return self
    +
    +    def setFailAction( self, fn ):
    +        """Define action to perform if parsing fails at this expression.
    +           Fail acton fn is a callable function that takes the arguments
    +           C{fn(s,loc,expr,err)} where:
    +            - s = string being parsed
    +            - loc = location where expression match was attempted and failed
    +            - expr = the parse expression that failed
    +            - err = the exception thrown
    +           The function returns no value.  It may throw C{L{ParseFatalException}}
    +           if it is desired to stop parsing immediately."""
    +        self.failAction = fn
    +        return self
    +
    +    def _skipIgnorables( self, instring, loc ):
    +        exprsFound = True
    +        while exprsFound:
    +            exprsFound = False
    +            for e in self.ignoreExprs:
    +                try:
    +                    while 1:
    +                        loc,dummy = e._parse( instring, loc )
    +                        exprsFound = True
    +                except ParseException:
    +                    pass
    +        return loc
    +
    +    def preParse( self, instring, loc ):
    +        if self.ignoreExprs:
    +            loc = self._skipIgnorables( instring, loc )
    +
    +        if self.skipWhitespace:
    +            wt = self.whiteChars
    +            instrlen = len(instring)
    +            while loc < instrlen and instring[loc] in wt:
    +                loc += 1
    +
    +        return loc
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        return loc, []
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        return tokenlist
    +
    +    #~ @profile
    +    def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ):
    +        debugging = ( self.debug ) #and doActions )
    +
    +        if debugging or self.failAction:
    +            #~ print ("Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) ))
    +            if (self.debugActions[0] ):
    +                self.debugActions[0]( instring, loc, self )
    +            if callPreParse and self.callPreparse:
    +                preloc = self.preParse( instring, loc )
    +            else:
    +                preloc = loc
    +            tokensStart = preloc
    +            try:
    +                try:
    +                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    +                except IndexError:
    +                    raise ParseException( instring, len(instring), self.errmsg, self )
    +            except ParseBaseException as err:
    +                #~ print ("Exception raised:", err)
    +                if self.debugActions[2]:
    +                    self.debugActions[2]( instring, tokensStart, self, err )
    +                if self.failAction:
    +                    self.failAction( instring, tokensStart, self, err )
    +                raise
    +        else:
    +            if callPreParse and self.callPreparse:
    +                preloc = self.preParse( instring, loc )
    +            else:
    +                preloc = loc
    +            tokensStart = preloc
    +            if self.mayIndexError or loc >= len(instring):
    +                try:
    +                    loc,tokens = self.parseImpl( instring, preloc, doActions )
    +                except IndexError:
    +                    raise ParseException( instring, len(instring), self.errmsg, self )
    +            else:
    +                loc,tokens = self.parseImpl( instring, preloc, doActions )
    +
    +        tokens = self.postParse( instring, loc, tokens )
    +
    +        retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults )
    +        if self.parseAction and (doActions or self.callDuringTry):
    +            if debugging:
    +                try:
    +                    for fn in self.parseAction:
    +                        tokens = fn( instring, tokensStart, retTokens )
    +                        if tokens is not None:
    +                            retTokens = ParseResults( tokens,
    +                                                      self.resultsName,
    +                                                      asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    +                                                      modal=self.modalResults )
    +                except ParseBaseException as err:
    +                    #~ print "Exception raised in user parse action:", err
    +                    if (self.debugActions[2] ):
    +                        self.debugActions[2]( instring, tokensStart, self, err )
    +                    raise
    +            else:
    +                for fn in self.parseAction:
    +                    tokens = fn( instring, tokensStart, retTokens )
    +                    if tokens is not None:
    +                        retTokens = ParseResults( tokens,
    +                                                  self.resultsName,
    +                                                  asList=self.saveAsList and isinstance(tokens,(ParseResults,list)),
    +                                                  modal=self.modalResults )
    +
    +        if debugging:
    +            #~ print ("Matched",self,"->",retTokens.asList())
    +            if (self.debugActions[1] ):
    +                self.debugActions[1]( instring, tokensStart, loc, self, retTokens )
    +
    +        return loc, retTokens
    +
    +    def tryParse( self, instring, loc ):
    +        try:
    +            return self._parse( instring, loc, doActions=False )[0]
    +        except ParseFatalException:
    +            raise ParseException( instring, loc, self.errmsg, self)
    +    
    +    def canParseNext(self, instring, loc):
    +        try:
    +            self.tryParse(instring, loc)
    +        except (ParseException, IndexError):
    +            return False
    +        else:
    +            return True
    +
    +    class _UnboundedCache(object):
    +        def __init__(self):
    +            cache = {}
    +            self.not_in_cache = not_in_cache = object()
    +
    +            def get(self, key):
    +                return cache.get(key, not_in_cache)
    +
    +            def set(self, key, value):
    +                cache[key] = value
    +
    +            def clear(self):
    +                cache.clear()
    +
    +            self.get = types.MethodType(get, self)
    +            self.set = types.MethodType(set, self)
    +            self.clear = types.MethodType(clear, self)
    +
    +    if _OrderedDict is not None:
    +        class _FifoCache(object):
    +            def __init__(self, size):
    +                self.not_in_cache = not_in_cache = object()
    +
    +                cache = _OrderedDict()
    +
    +                def get(self, key):
    +                    return cache.get(key, not_in_cache)
    +
    +                def set(self, key, value):
    +                    cache[key] = value
    +                    if len(cache) > size:
    +                        cache.popitem(False)
    +
    +                def clear(self):
    +                    cache.clear()
    +
    +                self.get = types.MethodType(get, self)
    +                self.set = types.MethodType(set, self)
    +                self.clear = types.MethodType(clear, self)
    +
    +    else:
    +        class _FifoCache(object):
    +            def __init__(self, size):
    +                self.not_in_cache = not_in_cache = object()
    +
    +                cache = {}
    +                key_fifo = collections.deque([], size)
    +
    +                def get(self, key):
    +                    return cache.get(key, not_in_cache)
    +
    +                def set(self, key, value):
    +                    cache[key] = value
    +                    if len(cache) > size:
    +                        cache.pop(key_fifo.popleft(), None)
    +                    key_fifo.append(key)
    +
    +                def clear(self):
    +                    cache.clear()
    +                    key_fifo.clear()
    +
    +                self.get = types.MethodType(get, self)
    +                self.set = types.MethodType(set, self)
    +                self.clear = types.MethodType(clear, 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
    +    packrat_cache_lock = RLock()
    +    packrat_cache_stats = [0, 0]
    +
    +    # this method gets repeatedly called during backtracking with the same arguments -
    +    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
    +    def _parseCache( self, instring, loc, doActions=True, callPreParse=True ):
    +        HIT, MISS = 0, 1
    +        lookup = (self, instring, loc, callPreParse, doActions)
    +        with ParserElement.packrat_cache_lock:
    +            cache = ParserElement.packrat_cache
    +            value = cache.get(lookup)
    +            if value is cache.not_in_cache:
    +                ParserElement.packrat_cache_stats[MISS] += 1
    +                try:
    +                    value = self._parseNoCache(instring, loc, doActions, callPreParse)
    +                except ParseBaseException as pe:
    +                    # cache a copy of the exception, without the traceback
    +                    cache.set(lookup, pe.__class__(*pe.args))
    +                    raise
    +                else:
    +                    cache.set(lookup, (value[0], value[1].copy()))
    +                    return value
    +            else:
    +                ParserElement.packrat_cache_stats[HIT] += 1
    +                if isinstance(value, Exception):
    +                    raise value
    +                return (value[0], value[1].copy())
    +
    +    _parse = _parseNoCache
    +
    +    @staticmethod
    +    def resetCache():
    +        ParserElement.packrat_cache.clear()
    +        ParserElement.packrat_cache_stats[:] = [0] * len(ParserElement.packrat_cache_stats)
    +
    +    _packratEnabled = False
    +    @staticmethod
    +    def enablePackrat(cache_size_limit=128):
    +        """Enables "packrat" parsing, which adds memoizing to the parsing logic.
    +           Repeated parse attempts at the same string location (which happens
    +           often in many complex grammars) can immediately return a cached value,
    +           instead of re-executing parsing/validating code.  Memoizing is done of
    +           both valid results and parsing exceptions.
    +           
    +           Parameters:
    +            - cache_size_limit - (default=C{128}) - if an integer value is provided
    +              will limit the size of the packrat cache; if None is passed, then
    +              the cache size will be unbounded; if 0 is passed, the cache will
    +              be effectively disabled.
    +            
    +           This speedup may break existing programs that use parse actions that
    +           have side-effects.  For this reason, packrat parsing is disabled when
    +           you first import pyparsing.  To activate the packrat feature, your
    +           program must call the class method C{ParserElement.enablePackrat()}.  If
    +           your program uses C{psyco} to "compile as you go", you must call
    +           C{enablePackrat} before calling C{psyco.full()}.  If you do not do this,
    +           Python will crash.  For best results, call C{enablePackrat()} immediately
    +           after importing pyparsing.
    +           
    +           Example::
    +               import pyparsing
    +               pyparsing.ParserElement.enablePackrat()
    +        """
    +        if not ParserElement._packratEnabled:
    +            ParserElement._packratEnabled = True
    +            if cache_size_limit is None:
    +                ParserElement.packrat_cache = ParserElement._UnboundedCache()
    +            else:
    +                ParserElement.packrat_cache = ParserElement._FifoCache(cache_size_limit)
    +            ParserElement._parse = ParserElement._parseCache
    +
    +    def parseString( self, instring, parseAll=False ):
    +        """
    +        Execute the parse expression with the given string.
    +        This is the main interface to the client code, once the complete
    +        expression has been built.
    +
    +        If you want the grammar to require that the entire input string be
    +        successfully parsed, then set C{parseAll} to True (equivalent to ending
    +        the grammar with C{L{StringEnd()}}).
    +
    +        Note: C{parseString} implicitly calls C{expandtabs()} on the input string,
    +        in order to report proper column numbers in parse actions.
    +        If the input string contains tabs and
    +        the grammar uses parse actions that use the C{loc} argument to index into the
    +        string being parsed, you can ensure you have a consistent view of the input
    +        string by:
    +         - calling C{parseWithTabs} on your grammar before calling C{parseString}
    +           (see L{I{parseWithTabs}})
    +         - define your parse action using the full C{(s,loc,toks)} signature, and
    +           reference the input string using the parse action's C{s} argument
    +         - explictly expand the tabs in your input string before calling
    +           C{parseString}
    +        
    +        Example::
    +            Word('a').parseString('aaaaabaaa')  # -> ['aaaaa']
    +            Word('a').parseString('aaaaabaaa', parseAll=True)  # -> Exception: Expected end of text
    +        """
    +        ParserElement.resetCache()
    +        if not self.streamlined:
    +            self.streamline()
    +            #~ self.saveAsList = True
    +        for e in self.ignoreExprs:
    +            e.streamline()
    +        if not self.keepTabs:
    +            instring = instring.expandtabs()
    +        try:
    +            loc, tokens = self._parse( instring, 0 )
    +            if parseAll:
    +                loc = self.preParse( instring, loc )
    +                se = Empty() + StringEnd()
    +                se._parse( instring, loc )
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +        else:
    +            return tokens
    +
    +    def scanString( self, instring, maxMatches=_MAX_INT, overlap=False ):
    +        """
    +        Scan the input string for expression matches.  Each match will return the
    +        matching tokens, start location, and end location.  May be called with optional
    +        C{maxMatches} argument, to clip scanning after 'n' matches are found.  If
    +        C{overlap} is specified, then overlapping matches will be reported.
    +
    +        Note that the start and end locations are reported relative to the string
    +        being parsed.  See L{I{parseString}} for more information on parsing
    +        strings with embedded tabs.
    +
    +        Example::
    +            source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
    +            print(source)
    +            for tokens,start,end in Word(alphas).scanString(source):
    +                print(' '*start + '^'*(end-start))
    +                print(' '*start + tokens[0])
    +        
    +        prints::
    +        
    +            sldjf123lsdjjkf345sldkjf879lkjsfd987
    +            ^^^^^
    +            sldjf
    +                    ^^^^^^^
    +                    lsdjjkf
    +                              ^^^^^^
    +                              sldkjf
    +                                       ^^^^^^
    +                                       lkjsfd
    +        """
    +        if not self.streamlined:
    +            self.streamline()
    +        for e in self.ignoreExprs:
    +            e.streamline()
    +
    +        if not self.keepTabs:
    +            instring = _ustr(instring).expandtabs()
    +        instrlen = len(instring)
    +        loc = 0
    +        preparseFn = self.preParse
    +        parseFn = self._parse
    +        ParserElement.resetCache()
    +        matches = 0
    +        try:
    +            while loc <= instrlen and matches < maxMatches:
    +                try:
    +                    preloc = preparseFn( instring, loc )
    +                    nextLoc,tokens = parseFn( instring, preloc, callPreParse=False )
    +                except ParseException:
    +                    loc = preloc+1
    +                else:
    +                    if nextLoc > loc:
    +                        matches += 1
    +                        yield tokens, preloc, nextLoc
    +                        if overlap:
    +                            nextloc = preparseFn( instring, loc )
    +                            if nextloc > loc:
    +                                loc = nextLoc
    +                            else:
    +                                loc += 1
    +                        else:
    +                            loc = nextLoc
    +                    else:
    +                        loc = preloc+1
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def transformString( self, instring ):
    +        """
    +        Extension to C{L{scanString}}, to modify matching text with modified tokens that may
    +        be returned from a parse action.  To use C{transformString}, define a grammar and
    +        attach a parse action to it that modifies the returned token list.
    +        Invoking C{transformString()} on a target string will then scan for matches,
    +        and replace the matched text patterns according to the logic in the parse
    +        action.  C{transformString()} returns the resulting transformed string.
    +        
    +        Example::
    +            wd = Word(alphas)
    +            wd.setParseAction(lambda toks: toks[0].title())
    +            
    +            print(wd.transformString("now is the winter of our discontent made glorious summer by this sun of york."))
    +        Prints::
    +            Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.
    +        """
    +        out = []
    +        lastE = 0
    +        # force preservation of s, to minimize unwanted transformation of string, and to
    +        # keep string locs straight between transformString and scanString
    +        self.keepTabs = True
    +        try:
    +            for t,s,e in self.scanString( instring ):
    +                out.append( instring[lastE:s] )
    +                if t:
    +                    if isinstance(t,ParseResults):
    +                        out += t.asList()
    +                    elif isinstance(t,list):
    +                        out += t
    +                    else:
    +                        out.append(t)
    +                lastE = e
    +            out.append(instring[lastE:])
    +            out = [o for o in out if o]
    +            return "".join(map(_ustr,_flatten(out)))
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def searchString( self, instring, maxMatches=_MAX_INT ):
    +        """
    +        Another extension to C{L{scanString}}, simplifying the access to the tokens found
    +        to match the given parse expression.  May be called with optional
    +        C{maxMatches} argument, to clip searching after 'n' matches are found.
    +        
    +        Example::
    +            # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
    +            cap_word = Word(alphas.upper(), alphas.lower())
    +            
    +            print(cap_word.searchString("More than Iron, more than Lead, more than Gold I need Electricity"))
    +        prints::
    +            ['More', 'Iron', 'Lead', 'Gold', 'I']
    +        """
    +        try:
    +            return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False):
    +        """
    +        Generator method to split a string using the given expression as a separator.
    +        May be called with optional C{maxsplit} argument, to limit the number of splits;
    +        and the optional C{includeSeparators} argument (default=C{False}), if the separating
    +        matching text should be included in the split results.
    +        
    +        Example::        
    +            punc = oneOf(list(".,;:/-!?"))
    +            print(list(punc.split("This, this?, this sentence, is badly punctuated!")))
    +        prints::
    +            ['This', ' this', '', ' this sentence', ' is badly punctuated', '']
    +        """
    +        splits = 0
    +        last = 0
    +        for t,s,e in self.scanString(instring, maxMatches=maxsplit):
    +            yield instring[last:s]
    +            if includeSeparators:
    +                yield t[0]
    +            last = e
    +        yield instring[last:]
    +
    +    def __add__(self, other ):
    +        """
    +        Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
    +        converts them to L{Literal}s by default.
    +        
    +        Example::
    +            greet = Word(alphas) + "," + Word(alphas) + "!"
    +            hello = "Hello, World!"
    +            print (hello, "->", greet.parseString(hello))
    +        Prints::
    +            Hello, World! -> ['Hello', ',', 'World', '!']
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return And( [ self, other ] )
    +
    +    def __radd__(self, other ):
    +        """
    +        Implementation of + operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other + self
    +
    +    def __sub__(self, other):
    +        """
    +        Implementation of - operator, returns C{L{And}} with error stop
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return And( [ self, And._ErrorStop(), other ] )
    +
    +    def __rsub__(self, other ):
    +        """
    +        Implementation of - operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other - self
    +
    +    def __mul__(self,other):
    +        """
    +        Implementation of * operator, allows use of C{expr * 3} in place of
    +        C{expr + expr + expr}.  Expressions may also me multiplied by a 2-integer
    +        tuple, similar to C{{min,max}} multipliers in regular expressions.  Tuples
    +        may also include C{None} as in:
    +         - C{expr*(n,None)} or C{expr*(n,)} is equivalent
    +              to C{expr*n + L{ZeroOrMore}(expr)}
    +              (read as "at least n instances of C{expr}")
    +         - C{expr*(None,n)} is equivalent to C{expr*(0,n)}
    +              (read as "0 to n instances of C{expr}")
    +         - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)}
    +         - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)}
    +
    +        Note that C{expr*(None,n)} does not raise an exception if
    +        more than n exprs exist in the input stream; that is,
    +        C{expr*(None,n)} does not enforce a maximum number of expr
    +        occurrences.  If this behavior is desired, then write
    +        C{expr*(None,n) + ~expr}
    +        """
    +        if isinstance(other,int):
    +            minElements, optElements = other,0
    +        elif isinstance(other,tuple):
    +            other = (other + (None, None))[:2]
    +            if other[0] is None:
    +                other = (0, other[1])
    +            if isinstance(other[0],int) and other[1] is None:
    +                if other[0] == 0:
    +                    return ZeroOrMore(self)
    +                if other[0] == 1:
    +                    return OneOrMore(self)
    +                else:
    +                    return self*other[0] + ZeroOrMore(self)
    +            elif isinstance(other[0],int) and isinstance(other[1],int):
    +                minElements, optElements = other
    +                optElements -= minElements
    +            else:
    +                raise TypeError("cannot multiply 'ParserElement' and ('%s','%s') objects", type(other[0]),type(other[1]))
    +        else:
    +            raise TypeError("cannot multiply 'ParserElement' and '%s' objects", type(other))
    +
    +        if minElements < 0:
    +            raise ValueError("cannot multiply ParserElement by negative value")
    +        if optElements < 0:
    +            raise ValueError("second tuple value must be greater or equal to first tuple value")
    +        if minElements == optElements == 0:
    +            raise ValueError("cannot multiply ParserElement by 0 or (0,0)")
    +
    +        if (optElements):
    +            def makeOptionalList(n):
    +                if n>1:
    +                    return Optional(self + makeOptionalList(n-1))
    +                else:
    +                    return Optional(self)
    +            if minElements:
    +                if minElements == 1:
    +                    ret = self + makeOptionalList(optElements)
    +                else:
    +                    ret = And([self]*minElements) + makeOptionalList(optElements)
    +            else:
    +                ret = makeOptionalList(optElements)
    +        else:
    +            if minElements == 1:
    +                ret = self
    +            else:
    +                ret = And([self]*minElements)
    +        return ret
    +
    +    def __rmul__(self, other):
    +        return self.__mul__(other)
    +
    +    def __or__(self, other ):
    +        """
    +        Implementation of | operator - returns C{L{MatchFirst}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return MatchFirst( [ self, other ] )
    +
    +    def __ror__(self, other ):
    +        """
    +        Implementation of | operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other | self
    +
    +    def __xor__(self, other ):
    +        """
    +        Implementation of ^ operator - returns C{L{Or}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return Or( [ self, other ] )
    +
    +    def __rxor__(self, other ):
    +        """
    +        Implementation of ^ operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other ^ self
    +
    +    def __and__(self, other ):
    +        """
    +        Implementation of & operator - returns C{L{Each}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return Each( [ self, other ] )
    +
    +    def __rand__(self, other ):
    +        """
    +        Implementation of & operator when left operand is not a C{L{ParserElement}}
    +        """
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        if not isinstance( other, ParserElement ):
    +            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
    +                    SyntaxWarning, stacklevel=2)
    +            return None
    +        return other & self
    +
    +    def __invert__( self ):
    +        """
    +        Implementation of ~ operator - returns C{L{NotAny}}
    +        """
    +        return NotAny( self )
    +
    +    def __call__(self, name=None):
    +        """
    +        Shortcut for C{L{setResultsName}}, with C{listAllMatches=False}.
    +        
    +        If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be
    +        passed as C{True}.
    +           
    +        If C{name} is omitted, same as calling C{L{copy}}.
    +
    +        Example::
    +            # these are equivalent
    +            userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno")
    +            userdata = Word(alphas)("name") + Word(nums+"-")("socsecno")             
    +        """
    +        if name is not None:
    +            return self.setResultsName(name)
    +        else:
    +            return self.copy()
    +
    +    def suppress( self ):
    +        """
    +        Suppresses the output of this C{ParserElement}; useful to keep punctuation from
    +        cluttering up returned output.
    +        """
    +        return Suppress( self )
    +
    +    def leaveWhitespace( self ):
    +        """
    +        Disables the skipping of whitespace before matching the characters in the
    +        C{ParserElement}'s defined pattern.  This is normally only used internally by
    +        the pyparsing module, but may be needed in some whitespace-sensitive grammars.
    +        """
    +        self.skipWhitespace = False
    +        return self
    +
    +    def setWhitespaceChars( self, chars ):
    +        """
    +        Overrides the default whitespace chars
    +        """
    +        self.skipWhitespace = True
    +        self.whiteChars = chars
    +        self.copyDefaultWhiteChars = False
    +        return self
    +
    +    def parseWithTabs( self ):
    +        """
    +        Overrides default behavior to expand C{}s to spaces before parsing the input string.
    +        Must be called before C{parseString} when the input grammar contains elements that
    +        match C{} characters.
    +        """
    +        self.keepTabs = True
    +        return self
    +
    +    def ignore( self, other ):
    +        """
    +        Define expression to be ignored (e.g., comments) while doing pattern
    +        matching; may be called repeatedly, to define multiple comment or other
    +        ignorable patterns.
    +        
    +        Example::
    +            patt = OneOrMore(Word(alphas))
    +            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj']
    +            
    +            patt.ignore(cStyleComment)
    +            patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd']
    +        """
    +        if isinstance(other, basestring):
    +            other = Suppress(other)
    +
    +        if isinstance( other, Suppress ):
    +            if other not in self.ignoreExprs:
    +                self.ignoreExprs.append(other)
    +        else:
    +            self.ignoreExprs.append( Suppress( other.copy() ) )
    +        return self
    +
    +    def setDebugActions( self, startAction, successAction, exceptionAction ):
    +        """
    +        Enable display of debugging messages while doing pattern matching.
    +        """
    +        self.debugActions = (startAction or _defaultStartDebugAction,
    +                             successAction or _defaultSuccessDebugAction,
    +                             exceptionAction or _defaultExceptionDebugAction)
    +        self.debug = True
    +        return self
    +
    +    def setDebug( self, flag=True ):
    +        """
    +        Enable display of debugging messages while doing pattern matching.
    +        Set C{flag} to True to enable, False to disable.
    +
    +        Example::
    +            wd = Word(alphas).setName("alphaword")
    +            integer = Word(nums).setName("numword")
    +            term = wd | integer
    +            
    +            # turn on debugging for wd
    +            wd.setDebug()
    +
    +            OneOrMore(term).parseString("abc 123 xyz 890")
    +        
    +        prints::
    +            Match alphaword at loc 0(1,1)
    +            Matched alphaword -> ['abc']
    +            Match alphaword at loc 3(1,4)
    +            Exception raised:Expected alphaword (at char 4), (line:1, col:5)
    +            Match alphaword at loc 7(1,8)
    +            Matched alphaword -> ['xyz']
    +            Match alphaword at loc 11(1,12)
    +            Exception raised:Expected alphaword (at char 12), (line:1, col:13)
    +            Match alphaword at loc 15(1,16)
    +            Exception raised:Expected alphaword (at char 15), (line:1, col:16)
    +
    +        The output shown is that produced by the default debug actions - custom debug actions can be
    +        specified using L{setDebugActions}. Prior to attempting
    +        to match the C{wd} expression, the debugging message C{"Match  at loc (,)"}
    +        is shown. Then if the parse succeeds, a C{"Matched"} message is shown, or an C{"Exception raised"}
    +        message is shown. Also note the use of L{setName} to assign a human-readable name to the expression,
    +        which makes debugging and exception messages easier to understand - for instance, the default
    +        name created for the C{Word} expression without calling C{setName} is C{"W:(ABCD...)"}.
    +        """
    +        if flag:
    +            self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction )
    +        else:
    +            self.debug = False
    +        return self
    +
    +    def __str__( self ):
    +        return self.name
    +
    +    def __repr__( self ):
    +        return _ustr(self)
    +
    +    def streamline( self ):
    +        self.streamlined = True
    +        self.strRepr = None
    +        return self
    +
    +    def checkRecursion( self, parseElementList ):
    +        pass
    +
    +    def validate( self, validateTrace=[] ):
    +        """
    +        Check defined expressions for valid structure, check for infinite recursive definitions.
    +        """
    +        self.checkRecursion( [] )
    +
    +    def parseFile( self, file_or_filename, parseAll=False ):
    +        """
    +        Execute the parse expression on the given file or filename.
    +        If a filename is specified (instead of a file object),
    +        the entire file is opened, read, and closed before parsing.
    +        """
    +        try:
    +            file_contents = file_or_filename.read()
    +        except AttributeError:
    +            with open(file_or_filename, "r") as f:
    +                file_contents = f.read()
    +        try:
    +            return self.parseString(file_contents, parseAll)
    +        except ParseBaseException as exc:
    +            if ParserElement.verbose_stacktrace:
    +                raise
    +            else:
    +                # catch and re-raise exception from here, clears out pyparsing internal stack trace
    +                raise exc
    +
    +    def __eq__(self,other):
    +        if isinstance(other, ParserElement):
    +            return self is other or vars(self) == vars(other)
    +        elif isinstance(other, basestring):
    +            return self.matches(other)
    +        else:
    +            return super(ParserElement,self)==other
    +
    +    def __ne__(self,other):
    +        return not (self == other)
    +
    +    def __hash__(self):
    +        return hash(id(self))
    +
    +    def __req__(self,other):
    +        return self == other
    +
    +    def __rne__(self,other):
    +        return not (self == other)
    +
    +    def matches(self, testString, parseAll=True):
    +        """
    +        Method for quick testing of a parser against a test string. Good for simple 
    +        inline microtests of sub expressions while building up larger parser.
    +           
    +        Parameters:
    +         - testString - to test against this expression for a match
    +         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests
    +            
    +        Example::
    +            expr = Word(nums)
    +            assert expr.matches("100")
    +        """
    +        try:
    +            self.parseString(_ustr(testString), parseAll=parseAll)
    +            return True
    +        except ParseBaseException:
    +            return False
    +                
    +    def runTests(self, tests, parseAll=True, comment='#', fullDump=True, printResults=True, failureTests=False):
    +        """
    +        Execute the parse expression on a series of test strings, showing each
    +        test, the parsed results or where the parse failed. Quick and easy way to
    +        run a parse expression against a list of sample strings.
    +           
    +        Parameters:
    +         - tests - a list of separate test strings, or a multiline string of test strings
    +         - parseAll - (default=C{True}) - flag to pass to C{L{parseString}} when running tests           
    +         - comment - (default=C{'#'}) - expression for indicating embedded comments in the test 
    +              string; pass None to disable comment filtering
    +         - fullDump - (default=C{True}) - dump results as list followed by results names in nested outline;
    +              if False, only dump nested list
    +         - printResults - (default=C{True}) prints test output to stdout
    +         - failureTests - (default=C{False}) indicates if these tests are expected to fail parsing
    +
    +        Returns: a (success, results) tuple, where success indicates that all tests succeeded
    +        (or failed if C{failureTests} is True), and the results contain a list of lines of each 
    +        test's output
    +        
    +        Example::
    +            number_expr = pyparsing_common.number.copy()
    +
    +            result = number_expr.runTests('''
    +                # unsigned integer
    +                100
    +                # negative integer
    +                -100
    +                # float with scientific notation
    +                6.02e23
    +                # integer with scientific notation
    +                1e-12
    +                ''')
    +            print("Success" if result[0] else "Failed!")
    +
    +            result = number_expr.runTests('''
    +                # stray character
    +                100Z
    +                # missing leading digit before '.'
    +                -.100
    +                # too many '.'
    +                3.14.159
    +                ''', failureTests=True)
    +            print("Success" if result[0] else "Failed!")
    +        prints::
    +            # unsigned integer
    +            100
    +            [100]
    +
    +            # negative integer
    +            -100
    +            [-100]
    +
    +            # float with scientific notation
    +            6.02e23
    +            [6.02e+23]
    +
    +            # integer with scientific notation
    +            1e-12
    +            [1e-12]
    +
    +            Success
    +            
    +            # stray character
    +            100Z
    +               ^
    +            FAIL: Expected end of text (at char 3), (line:1, col:4)
    +
    +            # missing leading digit before '.'
    +            -.100
    +            ^
    +            FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)
    +
    +            # too many '.'
    +            3.14.159
    +                ^
    +            FAIL: Expected end of text (at char 4), (line:1, col:5)
    +
    +            Success
    +
    +        Each test string must be on a single line. If you want to test a string that spans multiple
    +        lines, create a test like this::
    +
    +            expr.runTest(r"this is a test\\n of strings that spans \\n 3 lines")
    +        
    +        (Note that this is a raw string literal, you must include the leading 'r'.)
    +        """
    +        if isinstance(tests, basestring):
    +            tests = list(map(str.strip, tests.rstrip().splitlines()))
    +        if isinstance(comment, basestring):
    +            comment = Literal(comment)
    +        allResults = []
    +        comments = []
    +        success = True
    +        for t in tests:
    +            if comment is not None and comment.matches(t, False) or comments and not t:
    +                comments.append(t)
    +                continue
    +            if not t:
    +                continue
    +            out = ['\n'.join(comments), t]
    +            comments = []
    +            try:
    +                t = t.replace(r'\n','\n')
    +                result = self.parseString(t, parseAll=parseAll)
    +                out.append(result.dump(full=fullDump))
    +                success = success and not failureTests
    +            except ParseBaseException as pe:
    +                fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else ""
    +                if '\n' in t:
    +                    out.append(line(pe.loc, t))
    +                    out.append(' '*(col(pe.loc,t)-1) + '^' + fatal)
    +                else:
    +                    out.append(' '*pe.loc + '^' + fatal)
    +                out.append("FAIL: " + str(pe))
    +                success = success and failureTests
    +                result = pe
    +            except Exception as exc:
    +                out.append("FAIL-EXCEPTION: " + str(exc))
    +                success = success and failureTests
    +                result = exc
    +
    +            if printResults:
    +                if fullDump:
    +                    out.append('')
    +                print('\n'.join(out))
    +
    +            allResults.append((t, result))
    +        
    +        return success, allResults
    +
    +        
    +class Token(ParserElement):
    +    """
    +    Abstract C{ParserElement} subclass, for defining atomic matching patterns.
    +    """
    +    def __init__( self ):
    +        super(Token,self).__init__( savelist=False )
    +
    +
    +class Empty(Token):
    +    """
    +    An empty token, will always match.
    +    """
    +    def __init__( self ):
    +        super(Empty,self).__init__()
    +        self.name = "Empty"
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +
    +
    +class NoMatch(Token):
    +    """
    +    A token that will never match.
    +    """
    +    def __init__( self ):
    +        super(NoMatch,self).__init__()
    +        self.name = "NoMatch"
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +        self.errmsg = "Unmatchable token"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +
    +class Literal(Token):
    +    """
    +    Token to exactly match a specified string.
    +    
    +    Example::
    +        Literal('blah').parseString('blah')  # -> ['blah']
    +        Literal('blah').parseString('blahfooblah')  # -> ['blah']
    +        Literal('blah').parseString('bla')  # -> Exception: Expected "blah"
    +    
    +    For case-insensitive matching, use L{CaselessLiteral}.
    +    
    +    For keyword matching (force word break before and after the matched string),
    +    use L{Keyword} or L{CaselessKeyword}.
    +    """
    +    def __init__( self, matchString ):
    +        super(Literal,self).__init__()
    +        self.match = matchString
    +        self.matchLen = len(matchString)
    +        try:
    +            self.firstMatchChar = matchString[0]
    +        except IndexError:
    +            warnings.warn("null string passed to Literal; use Empty() instead",
    +                            SyntaxWarning, stacklevel=2)
    +            self.__class__ = Empty
    +        self.name = '"%s"' % _ustr(self.match)
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = False
    +        self.mayIndexError = False
    +
    +    # Performance tuning: this routine gets called a *lot*
    +    # if this is a single character match string  and the first character matches,
    +    # short-circuit as quickly as possible, and avoid calling startswith
    +    #~ @profile
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if (instring[loc] == self.firstMatchChar and
    +            (self.matchLen==1 or instring.startswith(self.match,loc)) ):
    +            return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +_L = Literal
    +ParserElement._literalStringClass = Literal
    +
    +class Keyword(Token):
    +    """
    +    Token to exactly match a specified string as a keyword, that is, it must be
    +    immediately followed by a non-keyword character.  Compare with C{L{Literal}}:
    +     - C{Literal("if")} will match the leading C{'if'} in C{'ifAndOnlyIf'}.
    +     - C{Keyword("if")} will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'}
    +    Accepts two optional constructor arguments in addition to the keyword string:
    +     - C{identChars} is a string of characters that would be valid identifier characters,
    +          defaulting to all alphanumerics + "_" and "$"
    +     - C{caseless} allows case-insensitive matching, default is C{False}.
    +       
    +    Example::
    +        Keyword("start").parseString("start")  # -> ['start']
    +        Keyword("start").parseString("starting")  # -> Exception
    +
    +    For case-insensitive matching, use L{CaselessKeyword}.
    +    """
    +    DEFAULT_KEYWORD_CHARS = alphanums+"_$"
    +
    +    def __init__( self, matchString, identChars=None, caseless=False ):
    +        super(Keyword,self).__init__()
    +        if identChars is None:
    +            identChars = Keyword.DEFAULT_KEYWORD_CHARS
    +        self.match = matchString
    +        self.matchLen = len(matchString)
    +        try:
    +            self.firstMatchChar = matchString[0]
    +        except IndexError:
    +            warnings.warn("null string passed to Keyword; use Empty() instead",
    +                            SyntaxWarning, stacklevel=2)
    +        self.name = '"%s"' % self.match
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = False
    +        self.mayIndexError = False
    +        self.caseless = caseless
    +        if caseless:
    +            self.caselessmatch = matchString.upper()
    +            identChars = identChars.upper()
    +        self.identChars = set(identChars)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.caseless:
    +            if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    +                 (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and
    +                 (loc == 0 or instring[loc-1].upper() not in self.identChars) ):
    +                return loc+self.matchLen, self.match
    +        else:
    +            if (instring[loc] == self.firstMatchChar and
    +                (self.matchLen==1 or instring.startswith(self.match,loc)) and
    +                (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and
    +                (loc == 0 or instring[loc-1] not in self.identChars) ):
    +                return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +    def copy(self):
    +        c = super(Keyword,self).copy()
    +        c.identChars = Keyword.DEFAULT_KEYWORD_CHARS
    +        return c
    +
    +    @staticmethod
    +    def setDefaultKeywordChars( chars ):
    +        """Overrides the default Keyword chars
    +        """
    +        Keyword.DEFAULT_KEYWORD_CHARS = chars
    +
    +class CaselessLiteral(Literal):
    +    """
    +    Token to match a specified string, ignoring case of letters.
    +    Note: the matched results will always be in the case of the given
    +    match string, NOT the case of the input text.
    +
    +    Example::
    +        OneOrMore(CaselessLiteral("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD', 'CMD']
    +        
    +    (Contrast with example for L{CaselessKeyword}.)
    +    """
    +    def __init__( self, matchString ):
    +        super(CaselessLiteral,self).__init__( matchString.upper() )
    +        # Preserve the defining literal.
    +        self.returnString = matchString
    +        self.name = "'%s'" % self.returnString
    +        self.errmsg = "Expected " + self.name
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if instring[ loc:loc+self.matchLen ].upper() == self.match:
    +            return loc+self.matchLen, self.returnString
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class CaselessKeyword(Keyword):
    +    """
    +    Caseless version of L{Keyword}.
    +
    +    Example::
    +        OneOrMore(CaselessKeyword("CMD")).parseString("cmd CMD Cmd10") # -> ['CMD', 'CMD']
    +        
    +    (Contrast with example for L{CaselessLiteral}.)
    +    """
    +    def __init__( self, matchString, identChars=None ):
    +        super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True )
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
    +             (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ):
    +            return loc+self.matchLen, self.match
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class CloseMatch(Token):
    +    """
    +    A variation on L{Literal} which matches "close" matches, that is, 
    +    strings with at most 'n' mismatching characters. C{CloseMatch} takes parameters:
    +     - C{match_string} - string to be matched
    +     - C{maxMismatches} - (C{default=1}) maximum number of mismatches allowed to count as a match
    +    
    +    The results from a successful parse will contain the matched text from the input string and the following named results:
    +     - C{mismatches} - a list of the positions within the match_string where mismatches were found
    +     - C{original} - the original match_string used to compare against the input string
    +    
    +    If C{mismatches} is an empty list, then the match was an exact match.
    +    
    +    Example::
    +        patt = CloseMatch("ATCATCGAATGGA")
    +        patt.parseString("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
    +        patt.parseString("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)
    +
    +        # exact match
    +        patt.parseString("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})
    +
    +        # close match allowing up to 2 mismatches
    +        patt = CloseMatch("ATCATCGAATGGA", maxMismatches=2)
    +        patt.parseString("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})
    +    """
    +    def __init__(self, match_string, maxMismatches=1):
    +        super(CloseMatch,self).__init__()
    +        self.name = match_string
    +        self.match_string = match_string
    +        self.maxMismatches = maxMismatches
    +        self.errmsg = "Expected %r (with up to %d mismatches)" % (self.match_string, self.maxMismatches)
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = False
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        start = loc
    +        instrlen = len(instring)
    +        maxloc = start + len(self.match_string)
    +
    +        if maxloc <= instrlen:
    +            match_string = self.match_string
    +            match_stringloc = 0
    +            mismatches = []
    +            maxMismatches = self.maxMismatches
    +
    +            for match_stringloc,s_m in enumerate(zip(instring[loc:maxloc], self.match_string)):
    +                src,mat = s_m
    +                if src != mat:
    +                    mismatches.append(match_stringloc)
    +                    if len(mismatches) > maxMismatches:
    +                        break
    +            else:
    +                loc = match_stringloc + 1
    +                results = ParseResults([instring[start:loc]])
    +                results['original'] = self.match_string
    +                results['mismatches'] = mismatches
    +                return loc, results
    +
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +
    +class Word(Token):
    +    """
    +    Token for matching words composed of allowed character sets.
    +    Defined with string containing all allowed initial characters,
    +    an optional string containing allowed body characters (if omitted,
    +    defaults to the initial character set), and an optional minimum,
    +    maximum, and/or exact length.  The default value for C{min} is 1 (a
    +    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    +    are 0, meaning no maximum or exact length restriction. An optional
    +    C{excludeChars} parameter can list characters that might be found in 
    +    the input C{bodyChars} string; useful to define a word of all printables
    +    except for one or two characters, for instance.
    +    
    +    L{srange} is useful for defining custom character set strings for defining 
    +    C{Word} expressions, using range notation from regular expression character sets.
    +    
    +    A common mistake is to use C{Word} to match a specific literal string, as in 
    +    C{Word("Address")}. Remember that C{Word} uses the string argument to define
    +    I{sets} of matchable characters. This expression would match "Add", "AAA",
    +    "dAred", or any other word made up of the characters 'A', 'd', 'r', 'e', and 's'.
    +    To match an exact literal string, use L{Literal} or L{Keyword}.
    +
    +    pyparsing includes helper strings for building Words:
    +     - L{alphas}
    +     - L{nums}
    +     - L{alphanums}
    +     - L{hexnums}
    +     - L{alphas8bit} (alphabetic characters in ASCII range 128-255 - accented, tilded, umlauted, etc.)
    +     - L{punc8bit} (non-alphabetic characters in ASCII range 128-255 - currency, symbols, superscripts, diacriticals, etc.)
    +     - L{printables} (any non-whitespace character)
    +
    +    Example::
    +        # a word composed of digits
    +        integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))
    +        
    +        # a word with a leading capital, and zero or more lowercase
    +        capital_word = Word(alphas.upper(), alphas.lower())
    +
    +        # hostnames are alphanumeric, with leading alpha, and '-'
    +        hostname = Word(alphas, alphanums+'-')
    +        
    +        # roman numeral (not a strict parser, accepts invalid mix of characters)
    +        roman = Word("IVXLCDM")
    +        
    +        # any string of non-whitespace characters, except for ','
    +        csv_value = Word(printables, excludeChars=",")
    +    """
    +    def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0, asKeyword=False, excludeChars=None ):
    +        super(Word,self).__init__()
    +        if excludeChars:
    +            initChars = ''.join(c for c in initChars if c not in excludeChars)
    +            if bodyChars:
    +                bodyChars = ''.join(c for c in bodyChars if c not in excludeChars)
    +        self.initCharsOrig = initChars
    +        self.initChars = set(initChars)
    +        if bodyChars :
    +            self.bodyCharsOrig = bodyChars
    +            self.bodyChars = set(bodyChars)
    +        else:
    +            self.bodyCharsOrig = initChars
    +            self.bodyChars = set(initChars)
    +
    +        self.maxSpecified = max > 0
    +
    +        if min < 1:
    +            raise ValueError("cannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitted")
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.asKeyword = asKeyword
    +
    +        if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0):
    +            if self.bodyCharsOrig == self.initCharsOrig:
    +                self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig)
    +            elif len(self.initCharsOrig) == 1:
    +                self.reString = "%s[%s]*" % \
    +                                      (re.escape(self.initCharsOrig),
    +                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    +            else:
    +                self.reString = "[%s][%s]*" % \
    +                                      (_escapeRegexRangeChars(self.initCharsOrig),
    +                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
    +            if self.asKeyword:
    +                self.reString = r"\b"+self.reString+r"\b"
    +            try:
    +                self.re = re.compile( self.reString )
    +            except Exception:
    +                self.re = None
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.re:
    +            result = self.re.match(instring,loc)
    +            if not result:
    +                raise ParseException(instring, loc, self.errmsg, self)
    +
    +            loc = result.end()
    +            return loc, result.group()
    +
    +        if not(instring[ loc ] in self.initChars):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        start = loc
    +        loc += 1
    +        instrlen = len(instring)
    +        bodychars = self.bodyChars
    +        maxloc = start + self.maxLen
    +        maxloc = min( maxloc, instrlen )
    +        while loc < maxloc and instring[loc] in bodychars:
    +            loc += 1
    +
    +        throwException = False
    +        if loc - start < self.minLen:
    +            throwException = True
    +        if self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
    +            throwException = True
    +        if self.asKeyword:
    +            if (start>0 and instring[start-1] in bodychars) or (loc4:
    +                    return s[:4]+"..."
    +                else:
    +                    return s
    +
    +            if ( self.initCharsOrig != self.bodyCharsOrig ):
    +                self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) )
    +            else:
    +                self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig)
    +
    +        return self.strRepr
    +
    +
    +class Regex(Token):
    +    """
    +    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...)}), these will be preserved as 
    +    named parse results.
    +
    +    Example::
    +        realnum = Regex(r"[+-]?\d+\.\d*")
    +        date = Regex(r'(?P\d{4})-(?P\d\d?)-(?P\d\d?)')
    +        # ref: http://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
    +        roman = Regex(r"M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")
    +    """
    +    compiledREtype = type(re.compile("[A-Z]"))
    +    def __init__( self, pattern, flags=0):
    +        """The parameters C{pattern} and C{flags} are passed to the C{re.compile()} function as-is. See the Python C{re} module for an explanation of the acceptable patterns and flags."""
    +        super(Regex,self).__init__()
    +
    +        if isinstance(pattern, basestring):
    +            if not pattern:
    +                warnings.warn("null string passed to Regex; use Empty() instead",
    +                        SyntaxWarning, stacklevel=2)
    +
    +            self.pattern = pattern
    +            self.flags = flags
    +
    +            try:
    +                self.re = re.compile(self.pattern, self.flags)
    +                self.reString = self.pattern
    +            except sre_constants.error:
    +                warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
    +                    SyntaxWarning, stacklevel=2)
    +                raise
    +
    +        elif isinstance(pattern, Regex.compiledREtype):
    +            self.re = pattern
    +            self.pattern = \
    +            self.reString = str(pattern)
    +            self.flags = flags
    +            
    +        else:
    +            raise ValueError("Regex may only be constructed with a string or a compiled RE object")
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        result = self.re.match(instring,loc)
    +        if not result:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        loc = result.end()
    +        d = result.groupdict()
    +        ret = ParseResults(result.group())
    +        if d:
    +            for k in d:
    +                ret[k] = d[k]
    +        return loc,ret
    +
    +    def __str__( self ):
    +        try:
    +            return super(Regex,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            self.strRepr = "Re:(%s)" % repr(self.pattern)
    +
    +        return self.strRepr
    +
    +
    +class QuotedString(Token):
    +    r"""
    +    Token for matching strings that are delimited by quoting characters.
    +    
    +    Defined with the following parameters:
    +        - quoteChar - string of one or more characters defining the quote delimiting string
    +        - escChar - character to escape quotes, typically backslash (default=C{None})
    +        - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=C{None})
    +        - multiline - boolean indicating whether quotes can span multiple lines (default=C{False})
    +        - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True})
    +        - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar)
    +        - convertWhitespaceEscapes - convert escaped whitespace (C{'\t'}, C{'\n'}, etc.) to actual whitespace (default=C{True})
    +
    +    Example::
    +        qs = QuotedString('"')
    +        print(qs.searchString('lsjdf "This is the quote" sldjf'))
    +        complex_qs = QuotedString('{{', endQuoteChar='}}')
    +        print(complex_qs.searchString('lsjdf {{This is the "quote"}} sldjf'))
    +        sql_qs = QuotedString('"', escQuote='""')
    +        print(sql_qs.searchString('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))
    +    prints::
    +        [['This is the quote']]
    +        [['This is the "quote"']]
    +        [['This is the quote with "embedded" quotes']]
    +    """
    +    def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None, convertWhitespaceEscapes=True):
    +        super(QuotedString,self).__init__()
    +
    +        # remove white space from quote chars - wont work anyway
    +        quoteChar = quoteChar.strip()
    +        if not quoteChar:
    +            warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    +            raise SyntaxError()
    +
    +        if endQuoteChar is None:
    +            endQuoteChar = quoteChar
    +        else:
    +            endQuoteChar = endQuoteChar.strip()
    +            if not endQuoteChar:
    +                warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
    +                raise SyntaxError()
    +
    +        self.quoteChar = quoteChar
    +        self.quoteCharLen = len(quoteChar)
    +        self.firstQuoteChar = quoteChar[0]
    +        self.endQuoteChar = endQuoteChar
    +        self.endQuoteCharLen = len(endQuoteChar)
    +        self.escChar = escChar
    +        self.escQuote = escQuote
    +        self.unquoteResults = unquoteResults
    +        self.convertWhitespaceEscapes = convertWhitespaceEscapes
    +
    +        if multiline:
    +            self.flags = re.MULTILINE | re.DOTALL
    +            self.pattern = r'%s(?:[^%s%s]' % \
    +                ( re.escape(self.quoteChar),
    +                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    +                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    +        else:
    +            self.flags = 0
    +            self.pattern = r'%s(?:[^%s\n\r%s]' % \
    +                ( re.escape(self.quoteChar),
    +                  _escapeRegexRangeChars(self.endQuoteChar[0]),
    +                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
    +        if len(self.endQuoteChar) > 1:
    +            self.pattern += (
    +                '|(?:' + ')|(?:'.join("%s[^%s]" % (re.escape(self.endQuoteChar[:i]),
    +                                               _escapeRegexRangeChars(self.endQuoteChar[i]))
    +                                    for i in range(len(self.endQuoteChar)-1,0,-1)) + ')'
    +                )
    +        if escQuote:
    +            self.pattern += (r'|(?:%s)' % re.escape(escQuote))
    +        if escChar:
    +            self.pattern += (r'|(?:%s.)' % re.escape(escChar))
    +            self.escCharReplacePattern = re.escape(self.escChar)+"(.)"
    +        self.pattern += (r')*%s' % re.escape(self.endQuoteChar))
    +
    +        try:
    +            self.re = re.compile(self.pattern, self.flags)
    +            self.reString = self.pattern
    +        except sre_constants.error:
    +            warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
    +                SyntaxWarning, stacklevel=2)
    +            raise
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayIndexError = False
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None
    +        if not result:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        loc = result.end()
    +        ret = result.group()
    +
    +        if self.unquoteResults:
    +
    +            # strip off quotes
    +            ret = ret[self.quoteCharLen:-self.endQuoteCharLen]
    +
    +            if isinstance(ret,basestring):
    +                # replace escaped whitespace
    +                if '\\' in ret and self.convertWhitespaceEscapes:
    +                    ws_map = {
    +                        r'\t' : '\t',
    +                        r'\n' : '\n',
    +                        r'\f' : '\f',
    +                        r'\r' : '\r',
    +                    }
    +                    for wslit,wschar in ws_map.items():
    +                        ret = ret.replace(wslit, wschar)
    +
    +                # replace escaped characters
    +                if self.escChar:
    +                    ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
    +
    +                # replace escaped quotes
    +                if self.escQuote:
    +                    ret = ret.replace(self.escQuote, self.endQuoteChar)
    +
    +        return loc, ret
    +
    +    def __str__( self ):
    +        try:
    +            return super(QuotedString,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar)
    +
    +        return self.strRepr
    +
    +
    +class CharsNotIn(Token):
    +    """
    +    Token for matching words composed of characters I{not} in a given set (will
    +    include whitespace in matched characters if not listed in the provided exclusion set - see example).
    +    Defined with string containing all disallowed characters, and an optional
    +    minimum, maximum, and/or exact length.  The default value for C{min} is 1 (a
    +    minimum value < 1 is not valid); the default values for C{max} and C{exact}
    +    are 0, meaning no maximum or exact length restriction.
    +
    +    Example::
    +        # define a comma-separated-value as anything that is not a ','
    +        csv_value = CharsNotIn(',')
    +        print(delimitedList(csv_value).parseString("dkls,lsdkjf,s12 34,@!#,213"))
    +    prints::
    +        ['dkls', 'lsdkjf', 's12 34', '@!#', '213']
    +    """
    +    def __init__( self, notChars, min=1, max=0, exact=0 ):
    +        super(CharsNotIn,self).__init__()
    +        self.skipWhitespace = False
    +        self.notChars = notChars
    +
    +        if min < 1:
    +            raise ValueError("cannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permitted")
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +        self.name = _ustr(self)
    +        self.errmsg = "Expected " + self.name
    +        self.mayReturnEmpty = ( self.minLen == 0 )
    +        self.mayIndexError = False
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if instring[loc] in self.notChars:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        start = loc
    +        loc += 1
    +        notchars = self.notChars
    +        maxlen = min( start+self.maxLen, len(instring) )
    +        while loc < maxlen and \
    +              (instring[loc] not in notchars):
    +            loc += 1
    +
    +        if loc - start < self.minLen:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        return loc, instring[start:loc]
    +
    +    def __str__( self ):
    +        try:
    +            return super(CharsNotIn, self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None:
    +            if len(self.notChars) > 4:
    +                self.strRepr = "!W:(%s...)" % self.notChars[:4]
    +            else:
    +                self.strRepr = "!W:(%s)" % self.notChars
    +
    +        return self.strRepr
    +
    +class White(Token):
    +    """
    +    Special matching class for matching whitespace.  Normally, whitespace is ignored
    +    by pyparsing grammars.  This class is included when some whitespace structures
    +    are significant.  Define with a string containing the whitespace characters to be
    +    matched; default is C{" \\t\\r\\n"}.  Also takes optional C{min}, C{max}, and C{exact} arguments,
    +    as defined for the C{L{Word}} class.
    +    """
    +    whiteStrs = {
    +        " " : "",
    +        "\t": "",
    +        "\n": "",
    +        "\r": "",
    +        "\f": "",
    +        }
    +    def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0):
    +        super(White,self).__init__()
    +        self.matchWhite = ws
    +        self.setWhitespaceChars( "".join(c for c in self.whiteChars if c not in self.matchWhite) )
    +        #~ self.leaveWhitespace()
    +        self.name = ("".join(White.whiteStrs[c] for c in self.matchWhite))
    +        self.mayReturnEmpty = True
    +        self.errmsg = "Expected " + self.name
    +
    +        self.minLen = min
    +
    +        if max > 0:
    +            self.maxLen = max
    +        else:
    +            self.maxLen = _MAX_INT
    +
    +        if exact > 0:
    +            self.maxLen = exact
    +            self.minLen = exact
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if not(instring[ loc ] in self.matchWhite):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +        start = loc
    +        loc += 1
    +        maxloc = start + self.maxLen
    +        maxloc = min( maxloc, len(instring) )
    +        while loc < maxloc and instring[loc] in self.matchWhite:
    +            loc += 1
    +
    +        if loc - start < self.minLen:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        return loc, instring[start:loc]
    +
    +
    +class _PositionToken(Token):
    +    def __init__( self ):
    +        super(_PositionToken,self).__init__()
    +        self.name=self.__class__.__name__
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +
    +class GoToColumn(_PositionToken):
    +    """
    +    Token to advance to a specific column of input text; useful for tabular report scraping.
    +    """
    +    def __init__( self, colno ):
    +        super(GoToColumn,self).__init__()
    +        self.col = colno
    +
    +    def preParse( self, instring, loc ):
    +        if col(loc,instring) != self.col:
    +            instrlen = len(instring)
    +            if self.ignoreExprs:
    +                loc = self._skipIgnorables( instring, loc )
    +            while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col :
    +                loc += 1
    +        return loc
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        thiscol = col( loc, instring )
    +        if thiscol > self.col:
    +            raise ParseException( instring, loc, "Text not in expected column", self )
    +        newloc = loc + self.col - thiscol
    +        ret = instring[ loc: newloc ]
    +        return newloc, ret
    +
    +
    +class LineStart(_PositionToken):
    +    """
    +    Matches if current position is at the beginning of a line within the parse string
    +    
    +    Example::
    +    
    +        test = '''\
    +        AAA this line
    +        AAA and this line
    +          AAA but not this one
    +        B AAA and definitely not this one
    +        '''
    +
    +        for t in (LineStart() + 'AAA' + restOfLine).searchString(test):
    +            print(t)
    +    
    +    Prints::
    +        ['AAA', ' this line']
    +        ['AAA', ' and this line']    
    +
    +    """
    +    def __init__( self ):
    +        super(LineStart,self).__init__()
    +        self.errmsg = "Expected start of line"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if col(loc, instring) == 1:
    +            return loc, []
    +        raise ParseException(instring, loc, self.errmsg, self)
    +
    +class LineEnd(_PositionToken):
    +    """
    +    Matches if current position is at the end of a line within the parse string
    +    """
    +    def __init__( self ):
    +        super(LineEnd,self).__init__()
    +        self.setWhitespaceChars( ParserElement.DEFAULT_WHITE_CHARS.replace("\n","") )
    +        self.errmsg = "Expected end of line"
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if loc len(instring):
    +            return loc, []
    +        else:
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +class WordStart(_PositionToken):
    +    """
    +    Matches if the current position is at the beginning of a Word, and
    +    is not preceded by any character in a given set of C{wordChars}
    +    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    +    use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of
    +    the string being parsed, or at the beginning of a line.
    +    """
    +    def __init__(self, wordChars = printables):
    +        super(WordStart,self).__init__()
    +        self.wordChars = set(wordChars)
    +        self.errmsg = "Not at the start of a word"
    +
    +    def parseImpl(self, instring, loc, doActions=True ):
    +        if loc != 0:
    +            if (instring[loc-1] in self.wordChars or
    +                instring[loc] not in self.wordChars):
    +                raise ParseException(instring, loc, self.errmsg, self)
    +        return loc, []
    +
    +class WordEnd(_PositionToken):
    +    """
    +    Matches if the current position is at the end of a Word, and
    +    is not followed by any character in a given set of C{wordChars}
    +    (default=C{printables}). To emulate the C{\b} behavior of regular expressions,
    +    use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of
    +    the string being parsed, or at the end of a line.
    +    """
    +    def __init__(self, wordChars = printables):
    +        super(WordEnd,self).__init__()
    +        self.wordChars = set(wordChars)
    +        self.skipWhitespace = False
    +        self.errmsg = "Not at the end of a word"
    +
    +    def parseImpl(self, instring, loc, doActions=True ):
    +        instrlen = len(instring)
    +        if instrlen>0 and loc maxExcLoc:
    +                    maxException = err
    +                    maxExcLoc = err.loc
    +            except IndexError:
    +                if len(instring) > maxExcLoc:
    +                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    +                    maxExcLoc = len(instring)
    +            else:
    +                # save match among all matches, to retry longest to shortest
    +                matches.append((loc2, e))
    +
    +        if matches:
    +            matches.sort(key=lambda x: -x[0])
    +            for _,e in matches:
    +                try:
    +                    return e._parse( instring, loc, doActions )
    +                except ParseException as err:
    +                    err.__traceback__ = None
    +                    if err.loc > maxExcLoc:
    +                        maxException = err
    +                        maxExcLoc = err.loc
    +
    +        if maxException is not None:
    +            maxException.msg = self.errmsg
    +            raise maxException
    +        else:
    +            raise ParseException(instring, loc, "no defined alternatives to match", self)
    +
    +
    +    def __ixor__(self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        return self.append( other ) #Or( [ self, other ] )
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " ^ ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class MatchFirst(ParseExpression):
    +    """
    +    Requires that at least one C{ParseExpression} is found.
    +    If two expressions match, the first one listed is the one that will match.
    +    May be constructed using the C{'|'} operator.
    +
    +    Example::
    +        # construct MatchFirst using '|' operator
    +        
    +        # watch the order of expressions to match
    +        number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
    +        print(number.searchString("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]
    +
    +        # put more selective expression first
    +        number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
    +        print(number.searchString("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]
    +    """
    +    def __init__( self, exprs, savelist = False ):
    +        super(MatchFirst,self).__init__(exprs, savelist)
    +        if self.exprs:
    +            self.mayReturnEmpty = any(e.mayReturnEmpty for e in self.exprs)
    +        else:
    +            self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        maxExcLoc = -1
    +        maxException = None
    +        for e in self.exprs:
    +            try:
    +                ret = e._parse( instring, loc, doActions )
    +                return ret
    +            except ParseException as err:
    +                if err.loc > maxExcLoc:
    +                    maxException = err
    +                    maxExcLoc = err.loc
    +            except IndexError:
    +                if len(instring) > maxExcLoc:
    +                    maxException = ParseException(instring,len(instring),e.errmsg,self)
    +                    maxExcLoc = len(instring)
    +
    +        # only got here if no expression matched, raise exception for match that made it the furthest
    +        else:
    +            if maxException is not None:
    +                maxException.msg = self.errmsg
    +                raise maxException
    +            else:
    +                raise ParseException(instring, loc, "no defined alternatives to match", self)
    +
    +    def __ior__(self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass( other )
    +        return self.append( other ) #MatchFirst( [ self, other ] )
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " | ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class Each(ParseExpression):
    +    """
    +    Requires all given C{ParseExpression}s to be found, but in any order.
    +    Expressions may be separated by whitespace.
    +    May be constructed using the C{'&'} operator.
    +
    +    Example::
    +        color = oneOf("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
    +        shape_type = oneOf("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
    +        integer = Word(nums)
    +        shape_attr = "shape:" + shape_type("shape")
    +        posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
    +        color_attr = "color:" + color("color")
    +        size_attr = "size:" + integer("size")
    +
    +        # use Each (using operator '&') to accept attributes in any order 
    +        # (shape and posn are required, color and size are optional)
    +        shape_spec = shape_attr & posn_attr & Optional(color_attr) & Optional(size_attr)
    +
    +        shape_spec.runTests('''
    +            shape: SQUARE color: BLACK posn: 100, 120
    +            shape: CIRCLE size: 50 color: BLUE posn: 50,80
    +            color:GREEN size:20 shape:TRIANGLE posn:20,40
    +            '''
    +            )
    +    prints::
    +        shape: SQUARE color: BLACK posn: 100, 120
    +        ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
    +        - color: BLACK
    +        - posn: ['100', ',', '120']
    +          - x: 100
    +          - y: 120
    +        - shape: SQUARE
    +
    +
    +        shape: CIRCLE size: 50 color: BLUE posn: 50,80
    +        ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
    +        - color: BLUE
    +        - posn: ['50', ',', '80']
    +          - x: 50
    +          - y: 80
    +        - shape: CIRCLE
    +        - size: 50
    +
    +
    +        color: GREEN size: 20 shape: TRIANGLE posn: 20,40
    +        ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
    +        - color: GREEN
    +        - posn: ['20', ',', '40']
    +          - x: 20
    +          - y: 40
    +        - shape: TRIANGLE
    +        - size: 20
    +    """
    +    def __init__( self, exprs, savelist = True ):
    +        super(Each,self).__init__(exprs, savelist)
    +        self.mayReturnEmpty = all(e.mayReturnEmpty for e in self.exprs)
    +        self.skipWhitespace = True
    +        self.initExprGroups = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.initExprGroups:
    +            self.opt1map = dict((id(e.expr),e) for e in self.exprs if isinstance(e,Optional))
    +            opt1 = [ e.expr for e in self.exprs if isinstance(e,Optional) ]
    +            opt2 = [ e for e in self.exprs if e.mayReturnEmpty and not isinstance(e,Optional)]
    +            self.optionals = opt1 + opt2
    +            self.multioptionals = [ e.expr for e in self.exprs if isinstance(e,ZeroOrMore) ]
    +            self.multirequired = [ e.expr for e in self.exprs if isinstance(e,OneOrMore) ]
    +            self.required = [ e for e in self.exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ]
    +            self.required += self.multirequired
    +            self.initExprGroups = False
    +        tmpLoc = loc
    +        tmpReqd = self.required[:]
    +        tmpOpt  = self.optionals[:]
    +        matchOrder = []
    +
    +        keepMatching = True
    +        while keepMatching:
    +            tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired
    +            failed = []
    +            for e in tmpExprs:
    +                try:
    +                    tmpLoc = e.tryParse( instring, tmpLoc )
    +                except ParseException:
    +                    failed.append(e)
    +                else:
    +                    matchOrder.append(self.opt1map.get(id(e),e))
    +                    if e in tmpReqd:
    +                        tmpReqd.remove(e)
    +                    elif e in tmpOpt:
    +                        tmpOpt.remove(e)
    +            if len(failed) == len(tmpExprs):
    +                keepMatching = False
    +
    +        if tmpReqd:
    +            missing = ", ".join(_ustr(e) for e in tmpReqd)
    +            raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing )
    +
    +        # add any unmatched Optionals, in case they have default values defined
    +        matchOrder += [e for e in self.exprs if isinstance(e,Optional) and e.expr in tmpOpt]
    +
    +        resultlist = []
    +        for e in matchOrder:
    +            loc,results = e._parse(instring,loc,doActions)
    +            resultlist.append(results)
    +
    +        finalResults = sum(resultlist, ParseResults([]))
    +        return loc, finalResults
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + " & ".join(_ustr(e) for e in self.exprs) + "}"
    +
    +        return self.strRepr
    +
    +    def checkRecursion( self, parseElementList ):
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        for e in self.exprs:
    +            e.checkRecursion( subRecCheckList )
    +
    +
    +class ParseElementEnhance(ParserElement):
    +    """
    +    Abstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.
    +    """
    +    def __init__( self, expr, savelist=False ):
    +        super(ParseElementEnhance,self).__init__(savelist)
    +        if isinstance( expr, basestring ):
    +            if issubclass(ParserElement._literalStringClass, Token):
    +                expr = ParserElement._literalStringClass(expr)
    +            else:
    +                expr = ParserElement._literalStringClass(Literal(expr))
    +        self.expr = expr
    +        self.strRepr = None
    +        if expr is not None:
    +            self.mayIndexError = expr.mayIndexError
    +            self.mayReturnEmpty = expr.mayReturnEmpty
    +            self.setWhitespaceChars( expr.whiteChars )
    +            self.skipWhitespace = expr.skipWhitespace
    +            self.saveAsList = expr.saveAsList
    +            self.callPreparse = expr.callPreparse
    +            self.ignoreExprs.extend(expr.ignoreExprs)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.expr is not None:
    +            return self.expr._parse( instring, loc, doActions, callPreParse=False )
    +        else:
    +            raise ParseException("",loc,self.errmsg,self)
    +
    +    def leaveWhitespace( self ):
    +        self.skipWhitespace = False
    +        self.expr = self.expr.copy()
    +        if self.expr is not None:
    +            self.expr.leaveWhitespace()
    +        return self
    +
    +    def ignore( self, other ):
    +        if isinstance( other, Suppress ):
    +            if other not in self.ignoreExprs:
    +                super( ParseElementEnhance, self).ignore( other )
    +                if self.expr is not None:
    +                    self.expr.ignore( self.ignoreExprs[-1] )
    +        else:
    +            super( ParseElementEnhance, self).ignore( other )
    +            if self.expr is not None:
    +                self.expr.ignore( self.ignoreExprs[-1] )
    +        return self
    +
    +    def streamline( self ):
    +        super(ParseElementEnhance,self).streamline()
    +        if self.expr is not None:
    +            self.expr.streamline()
    +        return self
    +
    +    def checkRecursion( self, parseElementList ):
    +        if self in parseElementList:
    +            raise RecursiveGrammarException( parseElementList+[self] )
    +        subRecCheckList = parseElementList[:] + [ self ]
    +        if self.expr is not None:
    +            self.expr.checkRecursion( subRecCheckList )
    +
    +    def validate( self, validateTrace=[] ):
    +        tmp = validateTrace[:]+[self]
    +        if self.expr is not None:
    +            self.expr.validate(tmp)
    +        self.checkRecursion( [] )
    +
    +    def __str__( self ):
    +        try:
    +            return super(ParseElementEnhance,self).__str__()
    +        except Exception:
    +            pass
    +
    +        if self.strRepr is None and self.expr is not None:
    +            self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )
    +        return self.strRepr
    +
    +
    +class FollowedBy(ParseElementEnhance):
    +    """
    +    Lookahead matching of the given parse expression.  C{FollowedBy}
    +    does I{not} advance the parsing position within the input string, it only
    +    verifies that the specified parse expression matches at the current
    +    position.  C{FollowedBy} always returns a null token list.
    +
    +    Example::
    +        # use FollowedBy to match a label only if it is followed by a ':'
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        
    +        OneOrMore(attr_expr).parseString("shape: SQUARE color: BLACK posn: upper left").pprint()
    +    prints::
    +        [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]
    +    """
    +    def __init__( self, expr ):
    +        super(FollowedBy,self).__init__(expr)
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        self.expr.tryParse( instring, loc )
    +        return loc, []
    +
    +
    +class NotAny(ParseElementEnhance):
    +    """
    +    Lookahead to disallow matching with the given parse expression.  C{NotAny}
    +    does I{not} advance the parsing position within the input string, it only
    +    verifies that the specified parse expression does I{not} match at the current
    +    position.  Also, C{NotAny} does I{not} skip over leading whitespace. C{NotAny}
    +    always returns a null token list.  May be constructed using the '~' operator.
    +
    +    Example::
    +        
    +    """
    +    def __init__( self, expr ):
    +        super(NotAny,self).__init__(expr)
    +        #~ self.leaveWhitespace()
    +        self.skipWhitespace = False  # do NOT use self.leaveWhitespace(), don't want to propagate to exprs
    +        self.mayReturnEmpty = True
    +        self.errmsg = "Found unwanted token, "+_ustr(self.expr)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        if self.expr.canParseNext(instring, loc):
    +            raise ParseException(instring, loc, self.errmsg, self)
    +        return loc, []
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "~{" + _ustr(self.expr) + "}"
    +
    +        return self.strRepr
    +
    +class _MultipleMatch(ParseElementEnhance):
    +    def __init__( self, expr, stopOn=None):
    +        super(_MultipleMatch, self).__init__(expr)
    +        self.saveAsList = True
    +        ender = stopOn
    +        if isinstance(ender, basestring):
    +            ender = ParserElement._literalStringClass(ender)
    +        self.not_ender = ~ender if ender is not None else None
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        self_expr_parse = self.expr._parse
    +        self_skip_ignorables = self._skipIgnorables
    +        check_ender = self.not_ender is not None
    +        if check_ender:
    +            try_not_ender = self.not_ender.tryParse
    +        
    +        # must be at least one (but first see if we are the stopOn sentinel;
    +        # if so, fail)
    +        if check_ender:
    +            try_not_ender(instring, loc)
    +        loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False )
    +        try:
    +            hasIgnoreExprs = (not not self.ignoreExprs)
    +            while 1:
    +                if check_ender:
    +                    try_not_ender(instring, loc)
    +                if hasIgnoreExprs:
    +                    preloc = self_skip_ignorables( instring, loc )
    +                else:
    +                    preloc = loc
    +                loc, tmptokens = self_expr_parse( instring, preloc, doActions )
    +                if tmptokens or tmptokens.haskeys():
    +                    tokens += tmptokens
    +        except (ParseException,IndexError):
    +            pass
    +
    +        return loc, tokens
    +        
    +class OneOrMore(_MultipleMatch):
    +    """
    +    Repetition of one or more of the given expression.
    +    
    +    Parameters:
    +     - expr - expression that must match one or more times
    +     - stopOn - (default=C{None}) - expression for a terminating sentinel
    +          (only required if the sentinel would ordinarily match the repetition 
    +          expression)          
    +
    +    Example::
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    +
    +        text = "shape: SQUARE posn: upper left color: BLACK"
    +        OneOrMore(attr_expr).parseString(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]
    +
    +        # use stopOn attribute for OneOrMore to avoid reading label string as part of the data
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        OneOrMore(attr_expr).parseString(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]
    +        
    +        # could also be written as
    +        (attr_expr * (1,)).parseString(text).pprint()
    +    """
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "{" + _ustr(self.expr) + "}..."
    +
    +        return self.strRepr
    +
    +class ZeroOrMore(_MultipleMatch):
    +    """
    +    Optional repetition of zero or more of the given expression.
    +    
    +    Parameters:
    +     - expr - expression that must match zero or more times
    +     - stopOn - (default=C{None}) - expression for a terminating sentinel
    +          (only required if the sentinel would ordinarily match the repetition 
    +          expression)          
    +
    +    Example: similar to L{OneOrMore}
    +    """
    +    def __init__( self, expr, stopOn=None):
    +        super(ZeroOrMore,self).__init__(expr, stopOn=stopOn)
    +        self.mayReturnEmpty = True
    +        
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        try:
    +            return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
    +        except (ParseException,IndexError):
    +            return loc, []
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "[" + _ustr(self.expr) + "]..."
    +
    +        return self.strRepr
    +
    +class _NullToken(object):
    +    def __bool__(self):
    +        return False
    +    __nonzero__ = __bool__
    +    def __str__(self):
    +        return ""
    +
    +_optionalNotMatched = _NullToken()
    +class Optional(ParseElementEnhance):
    +    """
    +    Optional matching of the given expression.
    +
    +    Parameters:
    +     - expr - expression that must match zero or more times
    +     - default (optional) - value to be returned if the optional expression is not found.
    +
    +    Example::
    +        # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
    +        zip = Combine(Word(nums, exact=5) + Optional('-' + Word(nums, exact=4)))
    +        zip.runTests('''
    +            # traditional ZIP code
    +            12345
    +            
    +            # ZIP+4 form
    +            12101-0001
    +            
    +            # invalid ZIP
    +            98765-
    +            ''')
    +    prints::
    +        # traditional ZIP code
    +        12345
    +        ['12345']
    +
    +        # ZIP+4 form
    +        12101-0001
    +        ['12101-0001']
    +
    +        # invalid ZIP
    +        98765-
    +             ^
    +        FAIL: Expected end of text (at char 5), (line:1, col:6)
    +    """
    +    def __init__( self, expr, default=_optionalNotMatched ):
    +        super(Optional,self).__init__( expr, savelist=False )
    +        self.saveAsList = self.expr.saveAsList
    +        self.defaultValue = default
    +        self.mayReturnEmpty = True
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        try:
    +            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
    +        except (ParseException,IndexError):
    +            if self.defaultValue is not _optionalNotMatched:
    +                if self.expr.resultsName:
    +                    tokens = ParseResults([ self.defaultValue ])
    +                    tokens[self.expr.resultsName] = self.defaultValue
    +                else:
    +                    tokens = [ self.defaultValue ]
    +            else:
    +                tokens = []
    +        return loc, tokens
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +
    +        if self.strRepr is None:
    +            self.strRepr = "[" + _ustr(self.expr) + "]"
    +
    +        return self.strRepr
    +
    +class SkipTo(ParseElementEnhance):
    +    """
    +    Token for skipping over all undefined text until the matched expression is found.
    +
    +    Parameters:
    +     - expr - target expression marking the end of the data to be skipped
    +     - include - (default=C{False}) if True, the target expression is also parsed 
    +          (the skipped text and target expression are returned as a 2-element list).
    +     - ignore - (default=C{None}) used to define grammars (typically quoted strings and 
    +          comments) that might contain false matches to the target expression
    +     - failOn - (default=C{None}) define expressions that are not allowed to be 
    +          included in the skipped test; if found before the target expression is found, 
    +          the SkipTo is not a match
    +
    +    Example::
    +        report = '''
    +            Outstanding Issues Report - 1 Jan 2000
    +
    +               # | Severity | Description                               |  Days Open
    +            -----+----------+-------------------------------------------+-----------
    +             101 | Critical | Intermittent system crash                 |          6
    +              94 | Cosmetic | Spelling error on Login ('log|n')         |         14
    +              79 | Minor    | System slow when running too many reports |         47
    +            '''
    +        integer = Word(nums)
    +        SEP = Suppress('|')
    +        # use SkipTo to simply match everything up until the next SEP
    +        # - ignore quoted strings, so that a '|' character inside a quoted string does not match
    +        # - parse action will call token.strip() for each matched token, i.e., the description body
    +        string_data = SkipTo(SEP, ignore=quotedString)
    +        string_data.setParseAction(tokenMap(str.strip))
    +        ticket_expr = (integer("issue_num") + SEP 
    +                      + string_data("sev") + SEP 
    +                      + string_data("desc") + SEP 
    +                      + integer("days_open"))
    +        
    +        for tkt in ticket_expr.searchString(report):
    +            print tkt.dump()
    +    prints::
    +        ['101', 'Critical', 'Intermittent system crash', '6']
    +        - days_open: 6
    +        - desc: Intermittent system crash
    +        - issue_num: 101
    +        - sev: Critical
    +        ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
    +        - days_open: 14
    +        - desc: Spelling error on Login ('log|n')
    +        - issue_num: 94
    +        - sev: Cosmetic
    +        ['79', 'Minor', 'System slow when running too many reports', '47']
    +        - days_open: 47
    +        - desc: System slow when running too many reports
    +        - issue_num: 79
    +        - sev: Minor
    +    """
    +    def __init__( self, other, include=False, ignore=None, failOn=None ):
    +        super( SkipTo, self ).__init__( other )
    +        self.ignoreExpr = ignore
    +        self.mayReturnEmpty = True
    +        self.mayIndexError = False
    +        self.includeMatch = include
    +        self.asList = False
    +        if isinstance(failOn, basestring):
    +            self.failOn = ParserElement._literalStringClass(failOn)
    +        else:
    +            self.failOn = failOn
    +        self.errmsg = "No match found for "+_ustr(self.expr)
    +
    +    def parseImpl( self, instring, loc, doActions=True ):
    +        startloc = loc
    +        instrlen = len(instring)
    +        expr = self.expr
    +        expr_parse = self.expr._parse
    +        self_failOn_canParseNext = self.failOn.canParseNext if self.failOn is not None else None
    +        self_ignoreExpr_tryParse = self.ignoreExpr.tryParse if self.ignoreExpr is not None else None
    +        
    +        tmploc = loc
    +        while tmploc <= instrlen:
    +            if self_failOn_canParseNext is not None:
    +                # break if failOn expression matches
    +                if self_failOn_canParseNext(instring, tmploc):
    +                    break
    +                    
    +            if self_ignoreExpr_tryParse is not None:
    +                # advance past ignore expressions
    +                while 1:
    +                    try:
    +                        tmploc = self_ignoreExpr_tryParse(instring, tmploc)
    +                    except ParseBaseException:
    +                        break
    +            
    +            try:
    +                expr_parse(instring, tmploc, doActions=False, callPreParse=False)
    +            except (ParseException, IndexError):
    +                # no match, advance loc in string
    +                tmploc += 1
    +            else:
    +                # matched skipto expr, done
    +                break
    +
    +        else:
    +            # ran off the end of the input string without matching skipto expr, fail
    +            raise ParseException(instring, loc, self.errmsg, self)
    +
    +        # build up return values
    +        loc = tmploc
    +        skiptext = instring[startloc:loc]
    +        skipresult = ParseResults(skiptext)
    +        
    +        if self.includeMatch:
    +            loc, mat = expr_parse(instring,loc,doActions,callPreParse=False)
    +            skipresult += mat
    +
    +        return loc, skipresult
    +
    +class Forward(ParseElementEnhance):
    +    """
    +    Forward declaration of an expression to be defined later -
    +    used for recursive grammars, such as algebraic infix notation.
    +    When the expression is known, it is assigned to the C{Forward} variable using the '<<' operator.
    +
    +    Note: take care when assigning to C{Forward} not to overlook precedence of operators.
    +    Specifically, '|' has a lower precedence than '<<', so that::
    +        fwdExpr << a | b | c
    +    will actually be evaluated as::
    +        (fwdExpr << a) | b | c
    +    thereby leaving b and c out as parseable alternatives.  It is recommended that you
    +    explicitly group the values inserted into the C{Forward}::
    +        fwdExpr << (a | b | c)
    +    Converting to use the '<<=' operator instead will avoid this problem.
    +
    +    See L{ParseResults.pprint} for an example of a recursive parser created using
    +    C{Forward}.
    +    """
    +    def __init__( self, other=None ):
    +        super(Forward,self).__init__( other, savelist=False )
    +
    +    def __lshift__( self, other ):
    +        if isinstance( other, basestring ):
    +            other = ParserElement._literalStringClass(other)
    +        self.expr = other
    +        self.strRepr = None
    +        self.mayIndexError = self.expr.mayIndexError
    +        self.mayReturnEmpty = self.expr.mayReturnEmpty
    +        self.setWhitespaceChars( self.expr.whiteChars )
    +        self.skipWhitespace = self.expr.skipWhitespace
    +        self.saveAsList = self.expr.saveAsList
    +        self.ignoreExprs.extend(self.expr.ignoreExprs)
    +        return self
    +        
    +    def __ilshift__(self, other):
    +        return self << other
    +    
    +    def leaveWhitespace( self ):
    +        self.skipWhitespace = False
    +        return self
    +
    +    def streamline( self ):
    +        if not self.streamlined:
    +            self.streamlined = True
    +            if self.expr is not None:
    +                self.expr.streamline()
    +        return self
    +
    +    def validate( self, validateTrace=[] ):
    +        if self not in validateTrace:
    +            tmp = validateTrace[:]+[self]
    +            if self.expr is not None:
    +                self.expr.validate(tmp)
    +        self.checkRecursion([])
    +
    +    def __str__( self ):
    +        if hasattr(self,"name"):
    +            return self.name
    +        return self.__class__.__name__ + ": ..."
    +
    +        # stubbed out for now - creates awful memory and perf issues
    +        self._revertClass = self.__class__
    +        self.__class__ = _ForwardNoRecurse
    +        try:
    +            if self.expr is not None:
    +                retString = _ustr(self.expr)
    +            else:
    +                retString = "None"
    +        finally:
    +            self.__class__ = self._revertClass
    +        return self.__class__.__name__ + ": " + retString
    +
    +    def copy(self):
    +        if self.expr is not None:
    +            return super(Forward,self).copy()
    +        else:
    +            ret = Forward()
    +            ret <<= self
    +            return ret
    +
    +class _ForwardNoRecurse(Forward):
    +    def __str__( self ):
    +        return "..."
    +
    +class TokenConverter(ParseElementEnhance):
    +    """
    +    Abstract subclass of C{ParseExpression}, for converting parsed results.
    +    """
    +    def __init__( self, expr, savelist=False ):
    +        super(TokenConverter,self).__init__( expr )#, savelist )
    +        self.saveAsList = False
    +
    +class Combine(TokenConverter):
    +    """
    +    Converter to concatenate all matching tokens to a single string.
    +    By default, the matching patterns must also be contiguous in the input string;
    +    this can be disabled by specifying C{'adjacent=False'} in the constructor.
    +
    +    Example::
    +        real = Word(nums) + '.' + Word(nums)
    +        print(real.parseString('3.1416')) # -> ['3', '.', '1416']
    +        # will also erroneously match the following
    +        print(real.parseString('3. 1416')) # -> ['3', '.', '1416']
    +
    +        real = Combine(Word(nums) + '.' + Word(nums))
    +        print(real.parseString('3.1416')) # -> ['3.1416']
    +        # no match when there are internal spaces
    +        print(real.parseString('3. 1416')) # -> Exception: Expected W:(0123...)
    +    """
    +    def __init__( self, expr, joinString="", adjacent=True ):
    +        super(Combine,self).__init__( expr )
    +        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself
    +        if adjacent:
    +            self.leaveWhitespace()
    +        self.adjacent = adjacent
    +        self.skipWhitespace = True
    +        self.joinString = joinString
    +        self.callPreparse = True
    +
    +    def ignore( self, other ):
    +        if self.adjacent:
    +            ParserElement.ignore(self, other)
    +        else:
    +            super( Combine, self).ignore( other )
    +        return self
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        retToks = tokenlist.copy()
    +        del retToks[:]
    +        retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults)
    +
    +        if self.resultsName and retToks.haskeys():
    +            return [ retToks ]
    +        else:
    +            return retToks
    +
    +class Group(TokenConverter):
    +    """
    +    Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.
    +
    +    Example::
    +        ident = Word(alphas)
    +        num = Word(nums)
    +        term = ident | num
    +        func = ident + Optional(delimitedList(term))
    +        print(func.parseString("fn a,b,100"))  # -> ['fn', 'a', 'b', '100']
    +
    +        func = ident + Group(Optional(delimitedList(term)))
    +        print(func.parseString("fn a,b,100"))  # -> ['fn', ['a', 'b', '100']]
    +    """
    +    def __init__( self, expr ):
    +        super(Group,self).__init__( expr )
    +        self.saveAsList = True
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        return [ tokenlist ]
    +
    +class Dict(TokenConverter):
    +    """
    +    Converter to return a repetitive expression as a list, but also as a dictionary.
    +    Each element can also be referenced using the first token in the expression as its key.
    +    Useful for tabular report scraping when the first column can be used as a item key.
    +
    +    Example::
    +        data_word = Word(alphas)
    +        label = data_word + FollowedBy(':')
    +        attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).setParseAction(' '.join))
    +
    +        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    +        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        
    +        # print attributes as plain groups
    +        print(OneOrMore(attr_expr).parseString(text).dump())
    +        
    +        # instead of OneOrMore(expr), parse using Dict(OneOrMore(Group(expr))) - Dict will auto-assign names
    +        result = Dict(OneOrMore(Group(attr_expr))).parseString(text)
    +        print(result.dump())
    +        
    +        # access named fields as dict entries, or output as dict
    +        print(result['shape'])        
    +        print(result.asDict())
    +    prints::
    +        ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap']
    +
    +        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    +        - color: light blue
    +        - posn: upper left
    +        - shape: SQUARE
    +        - texture: burlap
    +        SQUARE
    +        {'color': 'light blue', 'posn': 'upper left', 'texture': 'burlap', 'shape': 'SQUARE'}
    +    See more examples at L{ParseResults} of accessing fields by results name.
    +    """
    +    def __init__( self, expr ):
    +        super(Dict,self).__init__( expr )
    +        self.saveAsList = True
    +
    +    def postParse( self, instring, loc, tokenlist ):
    +        for i,tok in enumerate(tokenlist):
    +            if len(tok) == 0:
    +                continue
    +            ikey = tok[0]
    +            if isinstance(ikey,int):
    +                ikey = _ustr(tok[0]).strip()
    +            if len(tok)==1:
    +                tokenlist[ikey] = _ParseResultsWithOffset("",i)
    +            elif len(tok)==2 and not isinstance(tok[1],ParseResults):
    +                tokenlist[ikey] = _ParseResultsWithOffset(tok[1],i)
    +            else:
    +                dictvalue = tok.copy() #ParseResults(i)
    +                del dictvalue[0]
    +                if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.haskeys()):
    +                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue,i)
    +                else:
    +                    tokenlist[ikey] = _ParseResultsWithOffset(dictvalue[0],i)
    +
    +        if self.resultsName:
    +            return [ tokenlist ]
    +        else:
    +            return tokenlist
    +
    +
    +class Suppress(TokenConverter):
    +    """
    +    Converter for ignoring the results of a parsed expression.
    +
    +    Example::
    +        source = "a, b, c,d"
    +        wd = Word(alphas)
    +        wd_list1 = wd + ZeroOrMore(',' + wd)
    +        print(wd_list1.parseString(source))
    +
    +        # often, delimiters that are useful during parsing are just in the
    +        # way afterward - use Suppress to keep them out of the parsed output
    +        wd_list2 = wd + ZeroOrMore(Suppress(',') + wd)
    +        print(wd_list2.parseString(source))
    +    prints::
    +        ['a', ',', 'b', ',', 'c', ',', 'd']
    +        ['a', 'b', 'c', 'd']
    +    (See also L{delimitedList}.)
    +    """
    +    def postParse( self, instring, loc, tokenlist ):
    +        return []
    +
    +    def suppress( self ):
    +        return self
    +
    +
    +class OnlyOnce(object):
    +    """
    +    Wrapper for parse actions, to ensure they are only called once.
    +    """
    +    def __init__(self, methodCall):
    +        self.callable = _trim_arity(methodCall)
    +        self.called = False
    +    def __call__(self,s,l,t):
    +        if not self.called:
    +            results = self.callable(s,l,t)
    +            self.called = True
    +            return results
    +        raise ParseException(s,l,"")
    +    def reset(self):
    +        self.called = False
    +
    +def traceParseAction(f):
    +    """
    +    Decorator for debugging parse actions. 
    +    
    +    When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
    +    When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
    +
    +    Example::
    +        wd = Word(alphas)
    +
    +        @traceParseAction
    +        def remove_duplicate_chars(tokens):
    +            return ''.join(sorted(set(''.join(tokens)))
    +
    +        wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)
    +        print(wds.parseString("slkdjs sld sldd sdlf sdljf"))
    +    prints::
    +        >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
    +        <3:
    +            thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc
    +        sys.stderr.write( ">>entering %s(line: '%s', %d, %r)\n" % (thisFunc,line(l,s),l,t) )
    +        try:
    +            ret = f(*paArgs)
    +        except Exception as exc:
    +            sys.stderr.write( "< ['aa', 'bb', 'cc']
    +        delimitedList(Word(hexnums), delim=':', combine=True).parseString("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
    +    """
    +    dlName = _ustr(expr)+" ["+_ustr(delim)+" "+_ustr(expr)+"]..."
    +    if combine:
    +        return Combine( expr + ZeroOrMore( delim + expr ) ).setName(dlName)
    +    else:
    +        return ( expr + ZeroOrMore( Suppress( delim ) + expr ) ).setName(dlName)
    +
    +def countedArray( expr, intExpr=None ):
    +    """
    +    Helper to define a counted list of expressions.
    +    This helper defines a pattern of the form::
    +        integer expr expr expr...
    +    where the leading integer tells how many expr expressions follow.
    +    The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed.
    +    
    +    If C{intExpr} is specified, it should be a pyparsing expression that produces an integer value.
    +
    +    Example::
    +        countedArray(Word(alphas)).parseString('2 ab cd ef')  # -> ['ab', 'cd']
    +
    +        # in this parser, the leading integer value is given in binary,
    +        # '10' indicating that 2 values are in the array
    +        binaryConstant = Word('01').setParseAction(lambda t: int(t[0], 2))
    +        countedArray(Word(alphas), intExpr=binaryConstant).parseString('10 ab cd ef')  # -> ['ab', 'cd']
    +    """
    +    arrayExpr = Forward()
    +    def countFieldParseAction(s,l,t):
    +        n = t[0]
    +        arrayExpr << (n and Group(And([expr]*n)) or Group(empty))
    +        return []
    +    if intExpr is None:
    +        intExpr = Word(nums).setParseAction(lambda t:int(t[0]))
    +    else:
    +        intExpr = intExpr.copy()
    +    intExpr.setName("arrayLen")
    +    intExpr.addParseAction(countFieldParseAction, callDuringTry=True)
    +    return ( intExpr + arrayExpr ).setName('(len) ' + _ustr(expr) + '...')
    +
    +def _flatten(L):
    +    ret = []
    +    for i in L:
    +        if isinstance(i,list):
    +            ret.extend(_flatten(i))
    +        else:
    +            ret.append(i)
    +    return ret
    +
    +def matchPreviousLiteral(expr):
    +    """
    +    Helper to define an expression that is indirectly defined from
    +    the tokens matched in a previous expression, that is, it looks
    +    for a 'repeat' of a previous expression.  For example::
    +        first = Word(nums)
    +        second = matchPreviousLiteral(first)
    +        matchExpr = first + ":" + second
    +    will match C{"1:1"}, but not C{"1:2"}.  Because this matches a
    +    previous literal, will also match the leading C{"1:1"} in C{"1:10"}.
    +    If this is not desired, use C{matchPreviousExpr}.
    +    Do I{not} use with packrat parsing enabled.
    +    """
    +    rep = Forward()
    +    def copyTokenToRepeater(s,l,t):
    +        if t:
    +            if len(t) == 1:
    +                rep << t[0]
    +            else:
    +                # flatten t tokens
    +                tflat = _flatten(t.asList())
    +                rep << And(Literal(tt) for tt in tflat)
    +        else:
    +            rep << Empty()
    +    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    +    rep.setName('(prev) ' + _ustr(expr))
    +    return rep
    +
    +def matchPreviousExpr(expr):
    +    """
    +    Helper to define an expression that is indirectly defined from
    +    the tokens matched in a previous expression, that is, it looks
    +    for a 'repeat' of a previous expression.  For example::
    +        first = Word(nums)
    +        second = matchPreviousExpr(first)
    +        matchExpr = first + ":" + second
    +    will match C{"1:1"}, but not C{"1:2"}.  Because this matches by
    +    expressions, will I{not} match the leading C{"1:1"} in C{"1:10"};
    +    the expressions are evaluated first, and then compared, so
    +    C{"1"} is compared with C{"10"}.
    +    Do I{not} use with packrat parsing enabled.
    +    """
    +    rep = Forward()
    +    e2 = expr.copy()
    +    rep <<= e2
    +    def copyTokenToRepeater(s,l,t):
    +        matchTokens = _flatten(t.asList())
    +        def mustMatchTheseTokens(s,l,t):
    +            theseTokens = _flatten(t.asList())
    +            if  theseTokens != matchTokens:
    +                raise ParseException("",0,"")
    +        rep.setParseAction( mustMatchTheseTokens, callDuringTry=True )
    +    expr.addParseAction(copyTokenToRepeater, callDuringTry=True)
    +    rep.setName('(prev) ' + _ustr(expr))
    +    return rep
    +
    +def _escapeRegexRangeChars(s):
    +    #~  escape these chars: ^-]
    +    for c in r"\^-]":
    +        s = s.replace(c,_bslash+c)
    +    s = s.replace("\n",r"\n")
    +    s = s.replace("\t",r"\t")
    +    return _ustr(s)
    +
    +def oneOf( strs, caseless=False, useRegex=True ):
    +    """
    +    Helper to quickly define a set of alternative Literals, and makes sure to do
    +    longest-first testing when there is a conflict, regardless of the input order,
    +    but returns a C{L{MatchFirst}} for best performance.
    +
    +    Parameters:
    +     - strs - a string of space-delimited literals, or a collection of string literals
    +     - caseless - (default=C{False}) - treat all literals as caseless
    +     - useRegex - (default=C{True}) - as an optimization, will generate a Regex
    +          object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or
    +          if creating a C{Regex} raises an exception)
    +
    +    Example::
    +        comp_oper = oneOf("< = > <= >= !=")
    +        var = Word(alphas)
    +        number = Word(nums)
    +        term = var | number
    +        comparison_expr = term + comp_oper + term
    +        print(comparison_expr.searchString("B = 12  AA=23 B<=AA AA>12"))
    +    prints::
    +        [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
    +    """
    +    if caseless:
    +        isequal = ( lambda a,b: a.upper() == b.upper() )
    +        masks = ( lambda a,b: b.upper().startswith(a.upper()) )
    +        parseElementClass = CaselessLiteral
    +    else:
    +        isequal = ( lambda a,b: a == b )
    +        masks = ( lambda a,b: b.startswith(a) )
    +        parseElementClass = Literal
    +
    +    symbols = []
    +    if isinstance(strs,basestring):
    +        symbols = strs.split()
    +    elif isinstance(strs, collections.Iterable):
    +        symbols = list(strs)
    +    else:
    +        warnings.warn("Invalid argument to oneOf, expected string or iterable",
    +                SyntaxWarning, stacklevel=2)
    +    if not symbols:
    +        return NoMatch()
    +
    +    i = 0
    +    while i < len(symbols)-1:
    +        cur = symbols[i]
    +        for j,other in enumerate(symbols[i+1:]):
    +            if ( isequal(other, cur) ):
    +                del symbols[i+j+1]
    +                break
    +            elif ( masks(cur, other) ):
    +                del symbols[i+j+1]
    +                symbols.insert(i,other)
    +                cur = other
    +                break
    +        else:
    +            i += 1
    +
    +    if not caseless and useRegex:
    +        #~ print (strs,"->", "|".join( [ _escapeRegexChars(sym) for sym in symbols] ))
    +        try:
    +            if len(symbols)==len("".join(symbols)):
    +                return Regex( "[%s]" % "".join(_escapeRegexRangeChars(sym) for sym in symbols) ).setName(' | '.join(symbols))
    +            else:
    +                return Regex( "|".join(re.escape(sym) for sym in symbols) ).setName(' | '.join(symbols))
    +        except Exception:
    +            warnings.warn("Exception creating Regex for oneOf, building MatchFirst",
    +                    SyntaxWarning, stacklevel=2)
    +
    +
    +    # last resort, just use MatchFirst
    +    return MatchFirst(parseElementClass(sym) for sym in symbols).setName(' | '.join(symbols))
    +
    +def dictOf( key, value ):
    +    """
    +    Helper to easily and clearly define a dictionary by specifying the respective patterns
    +    for the key and value.  Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens
    +    in the proper order.  The key pattern can include delimiting markers or punctuation,
    +    as long as they are suppressed, thereby leaving the significant key text.  The value
    +    pattern can include named results, so that the C{Dict} results can include named token
    +    fields.
    +
    +    Example::
    +        text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    +        attr_expr = (label + Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join))
    +        print(OneOrMore(attr_expr).parseString(text).dump())
    +        
    +        attr_label = label
    +        attr_value = Suppress(':') + OneOrMore(data_word, stopOn=label).setParseAction(' '.join)
    +
    +        # similar to Dict, but simpler call format
    +        result = dictOf(attr_label, attr_value).parseString(text)
    +        print(result.dump())
    +        print(result['shape'])
    +        print(result.shape)  # object attribute access works too
    +        print(result.asDict())
    +    prints::
    +        [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    +        - color: light blue
    +        - posn: upper left
    +        - shape: SQUARE
    +        - texture: burlap
    +        SQUARE
    +        SQUARE
    +        {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
    +    """
    +    return Dict( ZeroOrMore( Group ( key + value ) ) )
    +
    +def originalTextFor(expr, asString=True):
    +    """
    +    Helper to return the original, untokenized text for a given expression.  Useful to
    +    restore the parsed fields of an HTML start tag into the raw tag text itself, or to
    +    revert separate tokens with intervening whitespace back to the original matching
    +    input text. By default, returns astring containing the original parsed text.  
    +       
    +    If the optional C{asString} argument is passed as C{False}, then the return value is a 
    +    C{L{ParseResults}} containing any results names that were originally matched, and a 
    +    single token containing the original matched text from the input string.  So if 
    +    the expression passed to C{L{originalTextFor}} contains expressions with defined
    +    results names, you must set C{asString} to C{False} if you want to preserve those
    +    results name values.
    +
    +    Example::
    +        src = "this is test  bold text  normal text "
    +        for tag in ("b","i"):
    +            opener,closer = makeHTMLTags(tag)
    +            patt = originalTextFor(opener + SkipTo(closer) + closer)
    +            print(patt.searchString(src)[0])
    +    prints::
    +        [' bold text ']
    +        ['text']
    +    """
    +    locMarker = Empty().setParseAction(lambda s,loc,t: loc)
    +    endlocMarker = locMarker.copy()
    +    endlocMarker.callPreparse = False
    +    matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end")
    +    if asString:
    +        extractText = lambda s,l,t: s[t._original_start:t._original_end]
    +    else:
    +        def extractText(s,l,t):
    +            t[:] = [s[t.pop('_original_start'):t.pop('_original_end')]]
    +    matchExpr.setParseAction(extractText)
    +    matchExpr.ignoreExprs = expr.ignoreExprs
    +    return matchExpr
    +
    +def ungroup(expr): 
    +    """
    +    Helper to undo pyparsing's default grouping of And expressions, even
    +    if all but one are non-empty.
    +    """
    +    return TokenConverter(expr).setParseAction(lambda t:t[0])
    +
    +def locatedExpr(expr):
    +    """
    +    Helper to decorate a returned token with its starting and ending locations in the input string.
    +    This helper adds the following results names:
    +     - locn_start = location where matched expression begins
    +     - locn_end = location where matched expression ends
    +     - value = the actual parsed results
    +
    +    Be careful if the input text contains C{} characters, you may want to call
    +    C{L{ParserElement.parseWithTabs}}
    +
    +    Example::
    +        wd = Word(alphas)
    +        for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"):
    +            print(match)
    +    prints::
    +        [[0, 'ljsdf', 5]]
    +        [[8, 'lksdjjf', 15]]
    +        [[18, 'lkkjj', 23]]
    +    """
    +    locator = Empty().setParseAction(lambda s,l,t: l)
    +    return Group(locator("locn_start") + expr("value") + locator.copy().leaveWhitespace()("locn_end"))
    +
    +
    +# convenience constants for positional expressions
    +empty       = Empty().setName("empty")
    +lineStart   = LineStart().setName("lineStart")
    +lineEnd     = LineEnd().setName("lineEnd")
    +stringStart = StringStart().setName("stringStart")
    +stringEnd   = StringEnd().setName("stringEnd")
    +
    +_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
    +_escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))
    +_escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))
    +_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)
    +_charRange = Group(_singleChar + Suppress("-") + _singleChar)
    +_reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
    +
    +def srange(s):
    +    r"""
    +    Helper to easily define string ranges for use in Word construction.  Borrows
    +    syntax from regexp '[]' string range definitions::
    +        srange("[0-9]")   -> "0123456789"
    +        srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
    +        srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
    +    The input string must be enclosed in []'s, and the returned string is the expanded
    +    character set joined into a single string.
    +    The values enclosed in the []'s may be:
    +     - a single character
    +     - an escaped character with a leading backslash (such as C{\-} or C{\]})
    +     - an escaped hex character with a leading C{'\x'} (C{\x21}, which is a C{'!'} character) 
    +         (C{\0x##} is also supported for backwards compatibility) 
    +     - an escaped octal character with a leading C{'\0'} (C{\041}, which is a C{'!'} character)
    +     - a range of any of the above, separated by a dash (C{'a-z'}, etc.)
    +     - any combination of the above (C{'aeiouy'}, C{'a-zA-Z0-9_$'}, etc.)
    +    """
    +    _expanded = lambda p: p if not isinstance(p,ParseResults) else ''.join(unichr(c) for c in range(ord(p[0]),ord(p[1])+1))
    +    try:
    +        return "".join(_expanded(part) for part in _reBracketExpr.parseString(s).body)
    +    except Exception:
    +        return ""
    +
    +def matchOnlyAtCol(n):
    +    """
    +    Helper method for defining parse actions that require matching at a specific
    +    column in the input text.
    +    """
    +    def verifyCol(strg,locn,toks):
    +        if col(locn,strg) != n:
    +            raise ParseException(strg,locn,"matched token not at column %d" % n)
    +    return verifyCol
    +
    +def replaceWith(replStr):
    +    """
    +    Helper method for common parse actions that simply return a literal value.  Especially
    +    useful when used with C{L{transformString}()}.
    +
    +    Example::
    +        num = Word(nums).setParseAction(lambda toks: int(toks[0]))
    +        na = oneOf("N/A NA").setParseAction(replaceWith(math.nan))
    +        term = na | num
    +        
    +        OneOrMore(term).parseString("324 234 N/A 234") # -> [324, 234, nan, 234]
    +    """
    +    return lambda s,l,t: [replStr]
    +
    +def removeQuotes(s,l,t):
    +    """
    +    Helper parse action for removing quotation marks from parsed quoted strings.
    +
    +    Example::
    +        # by default, quotation marks are included in parsed results
    +        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]
    +
    +        # use removeQuotes to strip quotation marks from parsed results
    +        quotedString.setParseAction(removeQuotes)
    +        quotedString.parseString("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
    +    """
    +    return t[0][1:-1]
    +
    +def tokenMap(func, *args):
    +    """
    +    Helper to define a parse action by mapping a function to all elements of a ParseResults list.If any additional 
    +    args are passed, they are forwarded to the given function as additional arguments after
    +    the token, as in C{hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))}, which will convert the
    +    parsed data to an integer using base 16.
    +
    +    Example (compare the last to example in L{ParserElement.transformString}::
    +        hex_ints = OneOrMore(Word(hexnums)).setParseAction(tokenMap(int, 16))
    +        hex_ints.runTests('''
    +            00 11 22 aa FF 0a 0d 1a
    +            ''')
    +        
    +        upperword = Word(alphas).setParseAction(tokenMap(str.upper))
    +        OneOrMore(upperword).runTests('''
    +            my kingdom for a horse
    +            ''')
    +
    +        wd = Word(alphas).setParseAction(tokenMap(str.title))
    +        OneOrMore(wd).setParseAction(' '.join).runTests('''
    +            now is the winter of our discontent made glorious summer by this sun of york
    +            ''')
    +    prints::
    +        00 11 22 aa FF 0a 0d 1a
    +        [0, 17, 34, 170, 255, 10, 13, 26]
    +
    +        my kingdom for a horse
    +        ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']
    +
    +        now is the winter of our discontent made glorious summer by this sun of york
    +        ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']
    +    """
    +    def pa(s,l,t):
    +        return [func(tokn, *args) for tokn in t]
    +
    +    try:
    +        func_name = getattr(func, '__name__', 
    +                            getattr(func, '__class__').__name__)
    +    except Exception:
    +        func_name = str(func)
    +    pa.__name__ = func_name
    +
    +    return pa
    +
    +upcaseTokens = tokenMap(lambda t: _ustr(t).upper())
    +"""(Deprecated) Helper parse action to convert tokens to upper case. Deprecated in favor of L{pyparsing_common.upcaseTokens}"""
    +
    +downcaseTokens = tokenMap(lambda t: _ustr(t).lower())
    +"""(Deprecated) Helper parse action to convert tokens to lower case. Deprecated in favor of L{pyparsing_common.downcaseTokens}"""
    +    
    +def _makeTags(tagStr, xml):
    +    """Internal helper to construct opening and closing tag expressions, given a tag name"""
    +    if isinstance(tagStr,basestring):
    +        resname = tagStr
    +        tagStr = Keyword(tagStr, caseless=not xml)
    +    else:
    +        resname = tagStr.name
    +
    +    tagAttrName = Word(alphas,alphanums+"_-:")
    +    if (xml):
    +        tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )
    +        openTag = Suppress("<") + tagStr("tag") + \
    +                Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \
    +                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    +    else:
    +        printablesLessRAbrack = "".join(c for c in printables if c not in ">")
    +        tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack)
    +        openTag = Suppress("<") + tagStr("tag") + \
    +                Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \
    +                Optional( Suppress("=") + tagAttrValue ) ))) + \
    +                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
    +    closeTag = Combine(_L("")
    +
    +    openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % resname)
    +    closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % resname)
    +    openTag.tag = resname
    +    closeTag.tag = resname
    +    return openTag, closeTag
    +
    +def makeHTMLTags(tagStr):
    +    """
    +    Helper to construct opening and closing tag expressions for HTML, given a tag name. Matches
    +    tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values.
    +
    +    Example::
    +        text = 'More info at the pyparsing wiki page'
    +        # makeHTMLTags returns pyparsing expressions for the opening and closing tags as a 2-tuple
    +        a,a_end = makeHTMLTags("A")
    +        link_expr = a + SkipTo(a_end)("link_text") + a_end
    +        
    +        for link in link_expr.searchString(text):
    +            # attributes in the  tag (like "href" shown here) are also accessible as named results
    +            print(link.link_text, '->', link.href)
    +    prints::
    +        pyparsing -> http://pyparsing.wikispaces.com
    +    """
    +    return _makeTags( tagStr, False )
    +
    +def makeXMLTags(tagStr):
    +    """
    +    Helper to construct opening and closing tag expressions for XML, given a tag name. Matches
    +    tags only in the given upper/lower case.
    +
    +    Example: similar to L{makeHTMLTags}
    +    """
    +    return _makeTags( tagStr, True )
    +
    +def withAttribute(*args,**attrDict):
    +    """
    +    Helper to create a validating parse action to be used with start tags created
    +    with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag
    +    with a required attribute value, to avoid false matches on common tags such as
    +    C{} or C{
    }. + + Call C{withAttribute} with a series of attribute names and values. Specify the list + of filter attributes names and values as: + - keyword arguments, as in C{(align="right")}, or + - as an explicit dict with C{**} operator, when an attribute name is also a Python + reserved word, as in C{**{"class":"Customer", "align":"right"}} + - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) + For attribute names with a namespace prefix, you must use the second form. Attribute + names are matched insensitive to upper/lower case. + + If just testing for C{class} (with or without a namespace), use C{L{withClass}}. + + To verify that the attribute exists, but without specifying a value, pass + C{withAttribute.ANY_VALUE} as the value. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this has no type
    +
    + + ''' + div,div_end = makeHTMLTags("div") + + # only match div tag having a type attribute with value "grid" + div_grid = div().setParseAction(withAttribute(type="grid")) + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + # construct a match with any div tag having a type attribute, regardless of the value + div_any_type = div().setParseAction(withAttribute(type=withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ + if args: + attrs = args[:] + else: + attrs = attrDict.items() + attrs = [(k,v) for k,v in attrs] + def pa(s,l,tokens): + for attrName,attrValue in attrs: + if attrName not in tokens: + raise ParseException(s,l,"no matching attribute " + attrName) + if attrValue != withAttribute.ANY_VALUE and tokens[attrName] != attrValue: + raise ParseException(s,l,"attribute '%s' has value '%s', must be '%s'" % + (attrName, tokens[attrName], attrValue)) + return pa +withAttribute.ANY_VALUE = object() + +def withClass(classname, namespace=''): + """ + Simplified version of C{L{withAttribute}} when matching on a div class - made + difficult because C{class} is a reserved word in Python. + + Example:: + html = ''' +
    + Some text +
    1 4 0 1 0
    +
    1,3 2,3 1,1
    +
    this <div> has no class
    +
    + + ''' + div,div_end = makeHTMLTags("div") + div_grid = div().setParseAction(withClass("grid")) + + grid_expr = div_grid + SkipTo(div | div_end)("body") + for grid_header in grid_expr.searchString(html): + print(grid_header.body) + + div_any_type = div().setParseAction(withClass(withAttribute.ANY_VALUE)) + div_expr = div_any_type + SkipTo(div | div_end)("body") + for div_header in div_expr.searchString(html): + print(div_header.body) + prints:: + 1 4 0 1 0 + + 1 4 0 1 0 + 1,3 2,3 1,1 + """ + classattr = "%s:class" % namespace if namespace else "class" + return withAttribute(**{classattr : classname}) + +opAssoc = _Constants() +opAssoc.LEFT = object() +opAssoc.RIGHT = object() + +def infixNotation( baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')') ): + """ + Helper method for constructing grammars of expressions made up of + operators working in a precedence hierarchy. Operators may be unary or + binary, left- or right-associative. Parse actions can also be attached + to operator expressions. The generated parser will also recognize the use + of parentheses to override operator precedences (see example below). + + Note: if you define a deep operator list, you may see performance issues + when using infixNotation. See L{ParserElement.enablePackrat} for a + mechanism to potentially improve your parser performance. + + Parameters: + - baseExpr - expression representing the most basic element for the nested + - opList - list of tuples, one for each operator precedence level in the + expression grammar; each tuple is of the form + (opExpr, numTerms, rightLeftAssoc, parseAction), where: + - opExpr is the pyparsing expression for the operator; + may also be a string, which will be converted to a Literal; + if numTerms is 3, opExpr is a tuple of two expressions, for the + two operators separating the 3 terms + - numTerms is the number of terms for this operator (must + be 1, 2, or 3) + - rightLeftAssoc is the indicator whether the operator is + right or left associative, using the pyparsing-defined + 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) + - lpar - expression for matching left-parentheses (default=C{Suppress('(')}) + - rpar - expression for matching right-parentheses (default=C{Suppress(')')}) + + Example:: + # simple example of four-function arithmetic with ints and variable names + integer = pyparsing_common.signed_integer + varname = pyparsing_common.identifier + + arith_expr = infixNotation(integer | varname, + [ + ('-', 1, opAssoc.RIGHT), + (oneOf('* /'), 2, opAssoc.LEFT), + (oneOf('+ -'), 2, opAssoc.LEFT), + ]) + + arith_expr.runTests(''' + 5+3*6 + (5+3)*6 + -2--11 + ''', fullDump=False) + prints:: + 5+3*6 + [[5, '+', [3, '*', 6]]] + + (5+3)*6 + [[[5, '+', 3], '*', 6]] + + -2--11 + [[['-', 2], '-', ['-', 11]]] + """ + ret = Forward() + lastExpr = baseExpr | ( lpar + ret + rpar ) + for i,operDef in enumerate(opList): + opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] + termName = "%s term" % opExpr if arity < 3 else "%s%s term" % opExpr + if arity == 3: + if opExpr is None or len(opExpr) != 2: + raise ValueError("if numterms=3, opExpr must be a tuple or list of two expressions") + opExpr1, opExpr2 = opExpr + thisExpr = Forward().setName(termName) + if rightLeftAssoc == opAssoc.LEFT: + if arity == 1: + matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + lastExpr) + Group( lastExpr + OneOrMore( opExpr + lastExpr ) ) + else: + matchExpr = FollowedBy(lastExpr+lastExpr) + Group( lastExpr + OneOrMore(lastExpr) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr) + \ + Group( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + elif rightLeftAssoc == opAssoc.RIGHT: + if arity == 1: + # try to avoid LR with this extra test + if not isinstance(opExpr, Optional): + opExpr = Optional(opExpr) + matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) + elif arity == 2: + if opExpr is not None: + matchExpr = FollowedBy(lastExpr + opExpr + thisExpr) + Group( lastExpr + OneOrMore( opExpr + thisExpr ) ) + else: + matchExpr = FollowedBy(lastExpr + thisExpr) + Group( lastExpr + OneOrMore( thisExpr ) ) + elif arity == 3: + matchExpr = FollowedBy(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr) + \ + Group( lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr ) + else: + raise ValueError("operator must be unary (1), binary (2), or ternary (3)") + else: + raise ValueError("operator must indicate right or left associativity") + if pa: + matchExpr.setParseAction( pa ) + thisExpr <<= ( matchExpr.setName(termName) | lastExpr ) + lastExpr = thisExpr + ret <<= lastExpr + return ret + +operatorPrecedence = infixNotation +"""(Deprecated) Former name of C{L{infixNotation}}, will be dropped in a future release.""" + +dblQuotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"').setName("string enclosed in double quotes") +sglQuotedString = Combine(Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("string enclosed in single quotes") +quotedString = Combine(Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*')+'"'| + Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\(?:[^x]|x[0-9a-fA-F]+)))*")+"'").setName("quotedString using single or double quotes") +unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal") + +def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()): + """ + Helper method for defining nested lists enclosed in opening and closing + delimiters ("(" and ")" are the default). + + Parameters: + - opener - opening character for a nested list (default=C{"("}); can also be a pyparsing expression + - closer - closing character for a nested list (default=C{")"}); can also be a pyparsing expression + - content - expression for items within the nested lists (default=C{None}) + - ignoreExpr - expression for ignoring opening and closing delimiters (default=C{quotedString}) + + If an expression is not provided for the content argument, the nested + expression will capture all whitespace-delimited content between delimiters + as a list of separate values. + + Use the C{ignoreExpr} argument to define expressions that may contain + opening or closing characters that should not be treated as opening + or closing characters for nesting, such as quotedString or a comment + expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. + The default is L{quotedString}, but if no expressions are to be ignored, + then pass C{None} for this argument. + + Example:: + data_type = oneOf("void int short long char float double") + decl_data_type = Combine(data_type + Optional(Word('*'))) + ident = Word(alphas+'_', alphanums+'_') + number = pyparsing_common.number + arg = Group(decl_data_type + ident) + LPAR,RPAR = map(Suppress, "()") + + code_body = nestedExpr('{', '}', ignoreExpr=(quotedString | cStyleComment)) + + c_function = (decl_data_type("type") + + ident("name") + + LPAR + Optional(delimitedList(arg), [])("args") + RPAR + + code_body("body")) + c_function.ignore(cStyleComment) + + source_code = ''' + int is_odd(int x) { + return (x%2); + } + + int dec_to_hex(char hchar) { + if (hchar >= '0' && hchar <= '9') { + return (ord(hchar)-ord('0')); + } else { + return (10+ord(hchar)-ord('A')); + } + } + ''' + for func in c_function.searchString(source_code): + print("%(name)s (%(type)s) args: %(args)s" % func) + + prints:: + is_odd (int) args: [['int', 'x']] + dec_to_hex (int) args: [['char', 'hchar']] + """ + if opener == closer: + raise ValueError("opening and closing strings cannot be the same") + if content is None: + if isinstance(opener,basestring) and isinstance(closer,basestring): + if len(opener) == 1 and len(closer)==1: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (empty.copy()+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS + ).setParseAction(lambda t:t[0].strip())) + else: + if ignoreExpr is not None: + content = (Combine(OneOrMore(~ignoreExpr + + ~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + content = (Combine(OneOrMore(~Literal(opener) + ~Literal(closer) + + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) + ).setParseAction(lambda t:t[0].strip())) + else: + raise ValueError("opening and closing arguments must be strings if no content expression is given") + ret = Forward() + if ignoreExpr is not None: + ret <<= Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) + else: + ret <<= Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) + ret.setName('nested %s%s expression' % (opener,closer)) + return ret + +def indentedBlock(blockStatementExpr, indentStack, indent=True): + """ + Helper method for defining space-delimited indentation blocks, such as + those used to define block statements in Python source code. + + Parameters: + - blockStatementExpr - expression defining syntax of statement that + is repeated within the indented block + - indentStack - list created by caller to manage indentation stack + (multiple statementWithIndentedBlock expressions within a single grammar + should share a common indentStack) + - indent - boolean indicating whether block must be indented beyond the + the current level; set to False for block of left-most statements + (default=C{True}) + + A valid block must contain at least one C{blockStatement}. + + Example:: + data = ''' + def A(z): + A1 + B = 100 + G = A2 + A2 + A3 + B + def BB(a,b,c): + BB1 + def BBA(): + bba1 + bba2 + bba3 + C + D + def spam(x,y): + def eggs(z): + pass + ''' + + + indentStack = [1] + stmt = Forward() + + identifier = Word(alphas, alphanums) + funcDecl = ("def" + identifier + Group( "(" + Optional( delimitedList(identifier) ) + ")" ) + ":") + func_body = indentedBlock(stmt, indentStack) + funcDef = Group( funcDecl + func_body ) + + rvalue = Forward() + funcCall = Group(identifier + "(" + Optional(delimitedList(rvalue)) + ")") + rvalue << (funcCall | identifier | Word(nums)) + assignment = Group(identifier + "=" + rvalue) + stmt << ( funcDef | assignment | identifier ) + + module_body = OneOrMore(stmt) + + parseTree = module_body.parseString(data) + parseTree.pprint() + prints:: + [['def', + 'A', + ['(', 'z', ')'], + ':', + [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], + 'B', + ['def', + 'BB', + ['(', 'a', 'b', 'c', ')'], + ':', + [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], + 'C', + 'D', + ['def', + 'spam', + ['(', 'x', 'y', ')'], + ':', + [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] + """ + def checkPeerIndent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if curCol != indentStack[-1]: + if curCol > indentStack[-1]: + raise ParseFatalException(s,l,"illegal nesting") + raise ParseException(s,l,"not a peer entry") + + def checkSubIndent(s,l,t): + curCol = col(l,s) + if curCol > indentStack[-1]: + indentStack.append( curCol ) + else: + raise ParseException(s,l,"not a subentry") + + def checkUnindent(s,l,t): + if l >= len(s): return + curCol = col(l,s) + if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): + raise ParseException(s,l,"not an unindent") + indentStack.pop() + + NL = OneOrMore(LineEnd().setWhitespaceChars("\t ").suppress()) + INDENT = (Empty() + Empty().setParseAction(checkSubIndent)).setName('INDENT') + PEER = Empty().setParseAction(checkPeerIndent).setName('') + UNDENT = Empty().setParseAction(checkUnindent).setName('UNINDENT') + if indent: + smExpr = Group( Optional(NL) + + #~ FollowedBy(blockStatementExpr) + + INDENT + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) + UNDENT) + else: + smExpr = Group( Optional(NL) + + (OneOrMore( PEER + Group(blockStatementExpr) + Optional(NL) )) ) + blockStatementExpr.ignore(_bslash + LineEnd()) + return smExpr.setName('indented block') + +alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]") +punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]") + +anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_:").setName('any tag')) +_htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\'')) +commonHTMLEntity = Regex('&(?P' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity") +def replaceHTMLEntity(t): + """Helper parser action to replace common HTML entities with their special characters""" + return _htmlEntityMap.get(t.entity) + +# it's easy to get these comment structures wrong - they're very common, so may as well make them available +cStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/').setName("C style comment") +"Comment of the form C{/* ... */}" + +htmlComment = Regex(r"").setName("HTML comment") +"Comment of the form C{}" + +restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line") +dblSlashComment = Regex(r"//(?:\\\n|[^\n])*").setName("// comment") +"Comment of the form C{// ... (to end of line)}" + +cppStyleComment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + '*/'| dblSlashComment).setName("C++ style comment") +"Comment of either form C{L{cStyleComment}} or C{L{dblSlashComment}}" + +javaStyleComment = cppStyleComment +"Same as C{L{cppStyleComment}}" + +pythonStyleComment = Regex(r"#.*").setName("Python style comment") +"Comment of the form C{# ... (to end of line)}" + +_commasepitem = Combine(OneOrMore(Word(printables, excludeChars=',') + + Optional( Word(" \t") + + ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem") +commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList") +"""(Deprecated) Predefined expression of 1 or more printable words or quoted strings, separated by commas. + This expression is deprecated in favor of L{pyparsing_common.comma_separated_list}.""" + +# some other useful expressions - using lower-case class name since we are really using this as a namespace +class pyparsing_common: + """ + Here are some common low-level expressions that may be useful in jump-starting parser development: + - numeric forms (L{integers}, L{reals}, L{scientific notation}) + - common L{programming identifiers} + - network addresses (L{MAC}, L{IPv4}, L{IPv6}) + - ISO8601 L{dates} and L{datetime} + - L{UUID} + - L{comma-separated list} + Parse actions: + - C{L{convertToInteger}} + - C{L{convertToFloat}} + - C{L{convertToDate}} + - C{L{convertToDatetime}} + - C{L{stripHTMLTags}} + - C{L{upcaseTokens}} + - C{L{downcaseTokens}} + + Example:: + pyparsing_common.number.runTests(''' + # any int or real number, returned as the appropriate type + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.fnumber.runTests(''' + # any int or real number, returned as float + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + ''') + + pyparsing_common.hex_integer.runTests(''' + # hex numbers + 100 + FF + ''') + + pyparsing_common.fraction.runTests(''' + # fractions + 1/2 + -3/4 + ''') + + pyparsing_common.mixed_integer.runTests(''' + # mixed fractions + 1 + 1/2 + -3/4 + 1-3/4 + ''') + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(''' + # uuid + 12345678-1234-5678-1234-567812345678 + ''') + prints:: + # any int or real number, returned as the appropriate type + 100 + [100] + + -100 + [-100] + + +100 + [100] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # any int or real number, returned as float + 100 + [100.0] + + -100 + [-100.0] + + +100 + [100.0] + + 3.14159 + [3.14159] + + 6.02e23 + [6.02e+23] + + 1e-12 + [1e-12] + + # hex numbers + 100 + [256] + + FF + [255] + + # fractions + 1/2 + [0.5] + + -3/4 + [-0.75] + + # mixed fractions + 1 + [1] + + 1/2 + [0.5] + + -3/4 + [-0.75] + + 1-3/4 + [1.75] + + # uuid + 12345678-1234-5678-1234-567812345678 + [UUID('12345678-1234-5678-1234-567812345678')] + """ + + convertToInteger = tokenMap(int) + """ + Parse action for converting parsed integers to Python int + """ + + convertToFloat = tokenMap(float) + """ + Parse action for converting parsed numbers to Python float + """ + + integer = Word(nums).setName("integer").setParseAction(convertToInteger) + """expression that parses an unsigned integer, returns an int""" + + hex_integer = Word(hexnums).setName("hex integer").setParseAction(tokenMap(int,16)) + """expression that parses a hexadecimal integer, returns an int""" + + signed_integer = Regex(r'[+-]?\d+').setName("signed integer").setParseAction(convertToInteger) + """expression that parses an integer with optional leading sign, returns an int""" + + fraction = (signed_integer().setParseAction(convertToFloat) + '/' + signed_integer().setParseAction(convertToFloat)).setName("fraction") + """fractional expression of an integer divided by an integer, returns a float""" + fraction.addParseAction(lambda t: t[0]/t[-1]) + + mixed_integer = (fraction | signed_integer + Optional(Optional('-').suppress() + fraction)).setName("fraction or mixed integer-fraction") + """mixed integer of the form 'integer - fraction', with optional leading integer, returns float""" + mixed_integer.addParseAction(sum) + + real = Regex(r'[+-]?\d+\.\d*').setName("real number").setParseAction(convertToFloat) + """expression that parses a floating point number and returns a float""" + + sci_real = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) + """expression that parses a floating point number with optional scientific notation and returns a float""" + + # streamlining this expression makes the docs nicer-looking + number = (sci_real | real | signed_integer).streamline() + """any numeric expression, returns the corresponding Python type""" + + fnumber = Regex(r'[+-]?\d+\.?\d*([eE][+-]?\d+)?').setName("fnumber").setParseAction(convertToFloat) + """any int or real number, returned as float""" + + identifier = Word(alphas+'_', alphanums+'_').setName("identifier") + """typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')""" + + ipv4_address = Regex(r'(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}').setName("IPv4 address") + "IPv4 address (C{0.0.0.0 - 255.255.255.255})" + + _ipv6_part = Regex(r'[0-9a-fA-F]{1,4}').setName("hex_integer") + _full_ipv6_address = (_ipv6_part + (':' + _ipv6_part)*7).setName("full IPv6 address") + _short_ipv6_address = (Optional(_ipv6_part + (':' + _ipv6_part)*(0,6)) + "::" + Optional(_ipv6_part + (':' + _ipv6_part)*(0,6))).setName("short IPv6 address") + _short_ipv6_address.addCondition(lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8) + _mixed_ipv6_address = ("::ffff:" + ipv4_address).setName("mixed IPv6 address") + ipv6_address = Combine((_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).setName("IPv6 address")).setName("IPv6 address") + "IPv6 address (long, short, or mixed form)" + + mac_address = Regex(r'[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}').setName("MAC address") + "MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)" + + @staticmethod + def convertToDate(fmt="%Y-%m-%d"): + """ + Helper to create a parse action for converting parsed date string to Python datetime.date + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%d"}) + + Example:: + date_expr = pyparsing_common.iso8601_date.copy() + date_expr.setParseAction(pyparsing_common.convertToDate()) + print(date_expr.parseString("1999-12-31")) + prints:: + [datetime.date(1999, 12, 31)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt).date() + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + @staticmethod + def convertToDatetime(fmt="%Y-%m-%dT%H:%M:%S.%f"): + """ + Helper to create a parse action for converting parsed datetime string to Python datetime.datetime + + Params - + - fmt - format to be passed to datetime.strptime (default=C{"%Y-%m-%dT%H:%M:%S.%f"}) + + Example:: + dt_expr = pyparsing_common.iso8601_datetime.copy() + dt_expr.setParseAction(pyparsing_common.convertToDatetime()) + print(dt_expr.parseString("1999-12-31T23:59:59.999")) + prints:: + [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)] + """ + def cvt_fn(s,l,t): + try: + return datetime.strptime(t[0], fmt) + except ValueError as ve: + raise ParseException(s, l, str(ve)) + return cvt_fn + + iso8601_date = Regex(r'(?P\d{4})(?:-(?P\d\d)(?:-(?P\d\d))?)?').setName("ISO8601 date") + "ISO8601 date (C{yyyy-mm-dd})" + + iso8601_datetime = Regex(r'(?P\d{4})-(?P\d\d)-(?P\d\d)[T ](?P\d\d):(?P\d\d)(:(?P\d\d(\.\d*)?)?)?(?PZ|[+-]\d\d:?\d\d)?').setName("ISO8601 datetime") + "ISO8601 datetime (C{yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)}) - trailing seconds, milliseconds, and timezone optional; accepts separating C{'T'} or C{' '}" + + uuid = Regex(r'[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}').setName("UUID") + "UUID (C{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})" + + _html_stripper = anyOpenTag.suppress() | anyCloseTag.suppress() + @staticmethod + def stripHTMLTags(s, l, tokens): + """ + Parse action to remove HTML tags from web page HTML source + + Example:: + # strip HTML links from normal text + text = 'More info at the
    pyparsing wiki page' + td,td_end = makeHTMLTags("TD") + table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end + + print(table_text.parseString(text).body) # -> 'More info at the pyparsing wiki page' + """ + return pyparsing_common._html_stripper.transformString(tokens[0]) + + _commasepitem = Combine(OneOrMore(~Literal(",") + ~LineEnd() + Word(printables, excludeChars=',') + + Optional( White(" \t") ) ) ).streamline().setName("commaItem") + comma_separated_list = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("comma separated list") + """Predefined expression of 1 or more printable words or quoted strings, separated by commas.""" + + upcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).upper())) + """Parse action to convert tokens to upper case.""" + + downcaseTokens = staticmethod(tokenMap(lambda t: _ustr(t).lower())) + """Parse action to convert tokens to lower case.""" + + +if __name__ == "__main__": + + selectToken = CaselessLiteral("select") + fromToken = CaselessLiteral("from") + + ident = Word(alphas, alphanums + "_$") + + columnName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + columnNameList = Group(delimitedList(columnName)).setName("columns") + columnSpec = ('*' | columnNameList) + + tableName = delimitedList(ident, ".", combine=True).setParseAction(upcaseTokens) + tableNameList = Group(delimitedList(tableName)).setName("tables") + + simpleSQL = selectToken("command") + columnSpec("columns") + fromToken + tableNameList("tables") + + # demo runTests method, including embedded comments in test string + simpleSQL.runTests(""" + # '*' as column list and dotted table name + select * from SYS.XYZZY + + # caseless match on "SELECT", and casts back to "select" + SELECT * from XYZZY, ABC + + # list of column names, and mixed case SELECT keyword + Select AA,BB,CC from Sys.dual + + # multiple tables + Select A, B, C from Sys.dual, Table2 + + # invalid SELECT keyword - should fail + Xelect A, B, C from Sys.dual + + # incomplete command - should fail + Select + + # invalid column name - should fail + Select ^^^ frox Sys.dual + + """) + + pyparsing_common.number.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + # any int or real number, returned as float + pyparsing_common.fnumber.runTests(""" + 100 + -100 + +100 + 3.14159 + 6.02e23 + 1e-12 + """) + + pyparsing_common.hex_integer.runTests(""" + 100 + FF + """) + + import uuid + pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID)) + pyparsing_common.uuid.runTests(""" + 12345678-1234-5678-1234-567812345678 + """) diff --git a/setuptools/_vendor/six.py b/setuptools/_vendor/six.py new file mode 100644 index 0000000000..190c0239cd --- /dev/null +++ b/setuptools/_vendor/six.py @@ -0,0 +1,868 @@ +"""Utilities for writing code that runs on Python 2 and 3""" + +# Copyright (c) 2010-2015 Benjamin Peterson +# +# 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. + +from __future__ import absolute_import + +import functools +import itertools +import operator +import sys +import types + +__author__ = "Benjamin Peterson " +__version__ = "1.10.0" + + +# Useful for very coarse version differentiation. +PY2 = sys.version_info[0] == 2 +PY3 = sys.version_info[0] == 3 +PY34 = sys.version_info[0:2] >= (3, 4) + +if PY3: + string_types = str, + integer_types = int, + class_types = type, + text_type = str + binary_type = bytes + + MAXSIZE = sys.maxsize +else: + string_types = basestring, + integer_types = (int, long) + class_types = (type, types.ClassType) + text_type = unicode + binary_type = str + + if sys.platform.startswith("java"): + # Jython always uses 32 bits. + MAXSIZE = int((1 << 31) - 1) + else: + # It's possible to have sizeof(long) != sizeof(Py_ssize_t). + class X(object): + + def __len__(self): + return 1 << 31 + try: + len(X()) + except OverflowError: + # 32-bit + MAXSIZE = int((1 << 31) - 1) + else: + # 64-bit + MAXSIZE = int((1 << 63) - 1) + del X + + +def _add_doc(func, doc): + """Add documentation to a function.""" + func.__doc__ = doc + + +def _import_module(name): + """Import module, returning the module after the last dot.""" + __import__(name) + return sys.modules[name] + + +class _LazyDescr(object): + + def __init__(self, name): + self.name = name + + def __get__(self, obj, tp): + result = self._resolve() + setattr(obj, self.name, result) # Invokes __set__. + try: + # This is a bit ugly, but it avoids running this again by + # removing this descriptor. + delattr(obj.__class__, self.name) + except AttributeError: + pass + return result + + +class MovedModule(_LazyDescr): + + def __init__(self, name, old, new=None): + super(MovedModule, self).__init__(name) + if PY3: + if new is None: + new = name + self.mod = new + else: + self.mod = old + + def _resolve(self): + return _import_module(self.mod) + + def __getattr__(self, attr): + _module = self._resolve() + value = getattr(_module, attr) + setattr(self, attr, value) + return value + + +class _LazyModule(types.ModuleType): + + def __init__(self, name): + super(_LazyModule, self).__init__(name) + self.__doc__ = self.__class__.__doc__ + + def __dir__(self): + attrs = ["__doc__", "__name__"] + attrs += [attr.name for attr in self._moved_attributes] + return attrs + + # Subclasses should override this + _moved_attributes = [] + + +class MovedAttribute(_LazyDescr): + + def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): + super(MovedAttribute, self).__init__(name) + if PY3: + if new_mod is None: + new_mod = name + self.mod = new_mod + if new_attr is None: + if old_attr is None: + new_attr = name + else: + new_attr = old_attr + self.attr = new_attr + else: + self.mod = old_mod + if old_attr is None: + old_attr = name + self.attr = old_attr + + def _resolve(self): + module = _import_module(self.mod) + return getattr(module, self.attr) + + +class _SixMetaPathImporter(object): + + """ + A meta path importer to import six.moves and its submodules. + + This class implements a PEP302 finder and loader. It should be compatible + with Python 2.5 and all existing versions of Python3 + """ + + def __init__(self, six_module_name): + self.name = six_module_name + self.known_modules = {} + + def _add_module(self, mod, *fullnames): + for fullname in fullnames: + self.known_modules[self.name + "." + fullname] = mod + + def _get_module(self, fullname): + return self.known_modules[self.name + "." + fullname] + + def find_module(self, fullname, path=None): + if fullname in self.known_modules: + return self + return None + + def __get_module(self, fullname): + try: + return self.known_modules[fullname] + except KeyError: + raise ImportError("This loader does not know module " + fullname) + + def load_module(self, fullname): + try: + # in case of a reload + return sys.modules[fullname] + except KeyError: + pass + mod = self.__get_module(fullname) + if isinstance(mod, MovedModule): + mod = mod._resolve() + else: + mod.__loader__ = self + sys.modules[fullname] = mod + return mod + + def is_package(self, fullname): + """ + Return true, if the named module is a package. + + We need this method to get correct spec objects with + Python 3.4 (see PEP451) + """ + return hasattr(self.__get_module(fullname), "__path__") + + def get_code(self, fullname): + """Return None + + Required, if is_package is implemented""" + self.__get_module(fullname) # eventually raises ImportError + return None + get_source = get_code # same as get_code + +_importer = _SixMetaPathImporter(__name__) + + +class _MovedItems(_LazyModule): + + """Lazy loading of moved objects""" + __path__ = [] # mark as package + + +_moved_attributes = [ + MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), + MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), + MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), + MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), + MovedAttribute("intern", "__builtin__", "sys"), + MovedAttribute("map", "itertools", "builtins", "imap", "map"), + MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), + MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), + MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), + MovedAttribute("reduce", "__builtin__", "functools"), + MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), + MovedAttribute("StringIO", "StringIO", "io"), + MovedAttribute("UserDict", "UserDict", "collections"), + MovedAttribute("UserList", "UserList", "collections"), + MovedAttribute("UserString", "UserString", "collections"), + MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), + MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), + MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), + MovedModule("builtins", "__builtin__"), + MovedModule("configparser", "ConfigParser"), + MovedModule("copyreg", "copy_reg"), + MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), + MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), + MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), + MovedModule("http_cookies", "Cookie", "http.cookies"), + MovedModule("html_entities", "htmlentitydefs", "html.entities"), + MovedModule("html_parser", "HTMLParser", "html.parser"), + MovedModule("http_client", "httplib", "http.client"), + MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), + MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), + MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), + MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), + MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), + MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), + MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), + MovedModule("cPickle", "cPickle", "pickle"), + MovedModule("queue", "Queue"), + MovedModule("reprlib", "repr"), + MovedModule("socketserver", "SocketServer"), + MovedModule("_thread", "thread", "_thread"), + MovedModule("tkinter", "Tkinter"), + MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), + MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), + MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), + MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), + MovedModule("tkinter_tix", "Tix", "tkinter.tix"), + MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), + MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), + MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), + MovedModule("tkinter_colorchooser", "tkColorChooser", + "tkinter.colorchooser"), + MovedModule("tkinter_commondialog", "tkCommonDialog", + "tkinter.commondialog"), + MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), + MovedModule("tkinter_font", "tkFont", "tkinter.font"), + MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), + MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", + "tkinter.simpledialog"), + MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), + MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), + MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), + MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), + MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), + MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), +] +# Add windows specific modules. +if sys.platform == "win32": + _moved_attributes += [ + MovedModule("winreg", "_winreg"), + ] + +for attr in _moved_attributes: + setattr(_MovedItems, attr.name, attr) + if isinstance(attr, MovedModule): + _importer._add_module(attr, "moves." + attr.name) +del attr + +_MovedItems._moved_attributes = _moved_attributes + +moves = _MovedItems(__name__ + ".moves") +_importer._add_module(moves, "moves") + + +class Module_six_moves_urllib_parse(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_parse""" + + +_urllib_parse_moved_attributes = [ + MovedAttribute("ParseResult", "urlparse", "urllib.parse"), + MovedAttribute("SplitResult", "urlparse", "urllib.parse"), + MovedAttribute("parse_qs", "urlparse", "urllib.parse"), + MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), + MovedAttribute("urldefrag", "urlparse", "urllib.parse"), + MovedAttribute("urljoin", "urlparse", "urllib.parse"), + MovedAttribute("urlparse", "urlparse", "urllib.parse"), + MovedAttribute("urlsplit", "urlparse", "urllib.parse"), + MovedAttribute("urlunparse", "urlparse", "urllib.parse"), + MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), + MovedAttribute("quote", "urllib", "urllib.parse"), + MovedAttribute("quote_plus", "urllib", "urllib.parse"), + MovedAttribute("unquote", "urllib", "urllib.parse"), + MovedAttribute("unquote_plus", "urllib", "urllib.parse"), + MovedAttribute("urlencode", "urllib", "urllib.parse"), + MovedAttribute("splitquery", "urllib", "urllib.parse"), + MovedAttribute("splittag", "urllib", "urllib.parse"), + MovedAttribute("splituser", "urllib", "urllib.parse"), + MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), + MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), + MovedAttribute("uses_params", "urlparse", "urllib.parse"), + MovedAttribute("uses_query", "urlparse", "urllib.parse"), + MovedAttribute("uses_relative", "urlparse", "urllib.parse"), +] +for attr in _urllib_parse_moved_attributes: + setattr(Module_six_moves_urllib_parse, attr.name, attr) +del attr + +Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes + +_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), + "moves.urllib_parse", "moves.urllib.parse") + + +class Module_six_moves_urllib_error(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_error""" + + +_urllib_error_moved_attributes = [ + MovedAttribute("URLError", "urllib2", "urllib.error"), + MovedAttribute("HTTPError", "urllib2", "urllib.error"), + MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), +] +for attr in _urllib_error_moved_attributes: + setattr(Module_six_moves_urllib_error, attr.name, attr) +del attr + +Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes + +_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), + "moves.urllib_error", "moves.urllib.error") + + +class Module_six_moves_urllib_request(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_request""" + + +_urllib_request_moved_attributes = [ + MovedAttribute("urlopen", "urllib2", "urllib.request"), + MovedAttribute("install_opener", "urllib2", "urllib.request"), + MovedAttribute("build_opener", "urllib2", "urllib.request"), + MovedAttribute("pathname2url", "urllib", "urllib.request"), + MovedAttribute("url2pathname", "urllib", "urllib.request"), + MovedAttribute("getproxies", "urllib", "urllib.request"), + MovedAttribute("Request", "urllib2", "urllib.request"), + MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), + MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), + MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), + MovedAttribute("BaseHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), + MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), + MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), + MovedAttribute("FileHandler", "urllib2", "urllib.request"), + MovedAttribute("FTPHandler", "urllib2", "urllib.request"), + MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), + MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), + MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), + MovedAttribute("urlretrieve", "urllib", "urllib.request"), + MovedAttribute("urlcleanup", "urllib", "urllib.request"), + MovedAttribute("URLopener", "urllib", "urllib.request"), + MovedAttribute("FancyURLopener", "urllib", "urllib.request"), + MovedAttribute("proxy_bypass", "urllib", "urllib.request"), +] +for attr in _urllib_request_moved_attributes: + setattr(Module_six_moves_urllib_request, attr.name, attr) +del attr + +Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes + +_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), + "moves.urllib_request", "moves.urllib.request") + + +class Module_six_moves_urllib_response(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_response""" + + +_urllib_response_moved_attributes = [ + MovedAttribute("addbase", "urllib", "urllib.response"), + MovedAttribute("addclosehook", "urllib", "urllib.response"), + MovedAttribute("addinfo", "urllib", "urllib.response"), + MovedAttribute("addinfourl", "urllib", "urllib.response"), +] +for attr in _urllib_response_moved_attributes: + setattr(Module_six_moves_urllib_response, attr.name, attr) +del attr + +Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes + +_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), + "moves.urllib_response", "moves.urllib.response") + + +class Module_six_moves_urllib_robotparser(_LazyModule): + + """Lazy loading of moved objects in six.moves.urllib_robotparser""" + + +_urllib_robotparser_moved_attributes = [ + MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), +] +for attr in _urllib_robotparser_moved_attributes: + setattr(Module_six_moves_urllib_robotparser, attr.name, attr) +del attr + +Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes + +_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), + "moves.urllib_robotparser", "moves.urllib.robotparser") + + +class Module_six_moves_urllib(types.ModuleType): + + """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" + __path__ = [] # mark as package + parse = _importer._get_module("moves.urllib_parse") + error = _importer._get_module("moves.urllib_error") + request = _importer._get_module("moves.urllib_request") + response = _importer._get_module("moves.urllib_response") + robotparser = _importer._get_module("moves.urllib_robotparser") + + def __dir__(self): + return ['parse', 'error', 'request', 'response', 'robotparser'] + +_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), + "moves.urllib") + + +def add_move(move): + """Add an item to six.moves.""" + setattr(_MovedItems, move.name, move) + + +def remove_move(name): + """Remove item from six.moves.""" + try: + delattr(_MovedItems, name) + except AttributeError: + try: + del moves.__dict__[name] + except KeyError: + raise AttributeError("no such move, %r" % (name,)) + + +if PY3: + _meth_func = "__func__" + _meth_self = "__self__" + + _func_closure = "__closure__" + _func_code = "__code__" + _func_defaults = "__defaults__" + _func_globals = "__globals__" +else: + _meth_func = "im_func" + _meth_self = "im_self" + + _func_closure = "func_closure" + _func_code = "func_code" + _func_defaults = "func_defaults" + _func_globals = "func_globals" + + +try: + advance_iterator = next +except NameError: + def advance_iterator(it): + return it.next() +next = advance_iterator + + +try: + callable = callable +except NameError: + def callable(obj): + return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) + + +if PY3: + def get_unbound_function(unbound): + return unbound + + create_bound_method = types.MethodType + + def create_unbound_method(func, cls): + return func + + Iterator = object +else: + def get_unbound_function(unbound): + return unbound.im_func + + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + + def create_unbound_method(func, cls): + return types.MethodType(func, None, cls) + + class Iterator(object): + + def next(self): + return type(self).__next__(self) + + callable = callable +_add_doc(get_unbound_function, + """Get the function out of a possibly unbound function""") + + +get_method_function = operator.attrgetter(_meth_func) +get_method_self = operator.attrgetter(_meth_self) +get_function_closure = operator.attrgetter(_func_closure) +get_function_code = operator.attrgetter(_func_code) +get_function_defaults = operator.attrgetter(_func_defaults) +get_function_globals = operator.attrgetter(_func_globals) + + +if PY3: + def iterkeys(d, **kw): + return iter(d.keys(**kw)) + + def itervalues(d, **kw): + return iter(d.values(**kw)) + + def iteritems(d, **kw): + return iter(d.items(**kw)) + + def iterlists(d, **kw): + return iter(d.lists(**kw)) + + viewkeys = operator.methodcaller("keys") + + viewvalues = operator.methodcaller("values") + + viewitems = operator.methodcaller("items") +else: + def iterkeys(d, **kw): + return d.iterkeys(**kw) + + def itervalues(d, **kw): + return d.itervalues(**kw) + + def iteritems(d, **kw): + return d.iteritems(**kw) + + def iterlists(d, **kw): + return d.iterlists(**kw) + + viewkeys = operator.methodcaller("viewkeys") + + viewvalues = operator.methodcaller("viewvalues") + + viewitems = operator.methodcaller("viewitems") + +_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") +_add_doc(itervalues, "Return an iterator over the values of a dictionary.") +_add_doc(iteritems, + "Return an iterator over the (key, value) pairs of a dictionary.") +_add_doc(iterlists, + "Return an iterator over the (key, [values]) pairs of a dictionary.") + + +if PY3: + def b(s): + return s.encode("latin-1") + + def u(s): + return s + unichr = chr + import struct + int2byte = struct.Struct(">B").pack + del struct + byte2int = operator.itemgetter(0) + indexbytes = operator.getitem + iterbytes = iter + import io + StringIO = io.StringIO + BytesIO = io.BytesIO + _assertCountEqual = "assertCountEqual" + if sys.version_info[1] <= 1: + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" + else: + _assertRaisesRegex = "assertRaisesRegex" + _assertRegex = "assertRegex" +else: + def b(s): + return s + # Workaround for standalone backslash + + def u(s): + return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") + unichr = unichr + int2byte = chr + + def byte2int(bs): + return ord(bs[0]) + + def indexbytes(buf, i): + return ord(buf[i]) + iterbytes = functools.partial(itertools.imap, ord) + import StringIO + StringIO = BytesIO = StringIO.StringIO + _assertCountEqual = "assertItemsEqual" + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" +_add_doc(b, """Byte literal""") +_add_doc(u, """Text literal""") + + +def assertCountEqual(self, *args, **kwargs): + return getattr(self, _assertCountEqual)(*args, **kwargs) + + +def assertRaisesRegex(self, *args, **kwargs): + return getattr(self, _assertRaisesRegex)(*args, **kwargs) + + +def assertRegex(self, *args, **kwargs): + return getattr(self, _assertRegex)(*args, **kwargs) + + +if PY3: + exec_ = getattr(moves.builtins, "exec") + + def reraise(tp, value, tb=None): + if value is None: + value = tp() + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + +else: + def exec_(_code_, _globs_=None, _locs_=None): + """Execute code in a namespace.""" + if _globs_ is None: + frame = sys._getframe(1) + _globs_ = frame.f_globals + if _locs_ is None: + _locs_ = frame.f_locals + del frame + elif _locs_ is None: + _locs_ = _globs_ + exec("""exec _code_ in _globs_, _locs_""") + + exec_("""def reraise(tp, value, tb=None): + raise tp, value, tb +""") + + +if sys.version_info[:2] == (3, 2): + exec_("""def raise_from(value, from_value): + if from_value is None: + raise value + raise value from from_value +""") +elif sys.version_info[:2] > (3, 2): + exec_("""def raise_from(value, from_value): + raise value from from_value +""") +else: + def raise_from(value, from_value): + raise value + + +print_ = getattr(moves.builtins, "print", None) +if print_ is None: + def print_(*args, **kwargs): + """The new-style print function for Python 2.4 and 2.5.""" + fp = kwargs.pop("file", sys.stdout) + if fp is None: + return + + def write(data): + if not isinstance(data, basestring): + data = str(data) + # If the file has an encoding, encode unicode with it. + if (isinstance(fp, file) and + isinstance(data, unicode) and + fp.encoding is not None): + errors = getattr(fp, "errors", None) + if errors is None: + errors = "strict" + data = data.encode(fp.encoding, errors) + fp.write(data) + want_unicode = False + sep = kwargs.pop("sep", None) + if sep is not None: + if isinstance(sep, unicode): + want_unicode = True + elif not isinstance(sep, str): + raise TypeError("sep must be None or a string") + end = kwargs.pop("end", None) + if end is not None: + if isinstance(end, unicode): + want_unicode = True + elif not isinstance(end, str): + raise TypeError("end must be None or a string") + if kwargs: + raise TypeError("invalid keyword arguments to print()") + if not want_unicode: + for arg in args: + if isinstance(arg, unicode): + want_unicode = True + break + if want_unicode: + newline = unicode("\n") + space = unicode(" ") + else: + newline = "\n" + space = " " + if sep is None: + sep = space + if end is None: + end = newline + for i, arg in enumerate(args): + if i: + write(sep) + write(arg) + write(end) +if sys.version_info[:2] < (3, 3): + _print = print_ + + def print_(*args, **kwargs): + fp = kwargs.get("file", sys.stdout) + flush = kwargs.pop("flush", False) + _print(*args, **kwargs) + if flush and fp is not None: + fp.flush() + +_add_doc(reraise, """Reraise an exception.""") + +if sys.version_info[0:2] < (3, 4): + def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, + updated=functools.WRAPPER_UPDATES): + def wrapper(f): + f = functools.wraps(wrapped, assigned, updated)(f) + f.__wrapped__ = wrapped + return f + return wrapper +else: + wraps = functools.wraps + + +def with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + # This requires a bit of explanation: the basic idea is to make a dummy + # metaclass for one level of class instantiation that replaces itself with + # the actual metaclass. + class metaclass(meta): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + return type.__new__(metaclass, 'temporary_class', (), {}) + + +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper + + +def python_2_unicode_compatible(klass): + """ + A decorator that defines __unicode__ and __str__ methods under Python 2. + Under Python 3 it does nothing. + + To support Python 2 and 3 with a single code base, define a __str__ method + returning text and apply this decorator to the class. + """ + if PY2: + if '__str__' not in klass.__dict__: + raise ValueError("@python_2_unicode_compatible cannot be applied " + "to %s because it doesn't define __str__()." % + klass.__name__) + klass.__unicode__ = klass.__str__ + klass.__str__ = lambda self: self.__unicode__().encode('utf-8') + return klass + + +# Complete the moves implementation. +# This code is at the end of this module to speed up module loading. +# Turn this module into a package. +__path__ = [] # required for PEP 302 and PEP 451 +__package__ = __name__ # see PEP 366 @ReservedAssignment +if globals().get("__spec__") is not None: + __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable +# Remove other six meta path importers, since they cause problems. This can +# happen if six is removed from sys.modules and then reloaded. (Setuptools does +# this for some reason.) +if sys.meta_path: + for i, importer in enumerate(sys.meta_path): + # Here's some real nastiness: Another "instance" of the six module might + # be floating around. Therefore, we can't use isinstance() to check for + # the six meta path importer, since the other six instance will have + # inserted an importer with different class. + if (type(importer).__name__ == "_SixMetaPathImporter" and + importer.name == __name__): + del sys.meta_path[i] + break + del i, importer +# Finally, add the importer to the meta path import hook. +sys.meta_path.append(_importer) diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt new file mode 100644 index 0000000000..be3e72eb30 --- /dev/null +++ b/setuptools/_vendor/vendored.txt @@ -0,0 +1,3 @@ +packaging==16.8 +pyparsing==2.1.10 +six==1.10.0 diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index befa09043a..f3e604d3f0 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -30,7 +30,7 @@ import setuptools.unicode_utils as unicode_utils from setuptools.glob import glob -from pkg_resources.extern import packaging +from setuptools.extern import packaging def translate_pattern(glob): diff --git a/setuptools/dist.py b/setuptools/dist.py index b74dd0f51a..cd34eef639 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -17,8 +17,8 @@ from distutils.version import StrictVersion from setuptools.extern import six +from setuptools.extern import packaging from setuptools.extern.six.moves import map, filter, filterfalse -from pkg_resources.extern import packaging from setuptools.depends import Require from setuptools import windows_support @@ -27,8 +27,8 @@ import pkg_resources from .py36compat import Distribution_parse_config_files -__import__('pkg_resources.extern.packaging.specifiers') -__import__('pkg_resources.extern.packaging.version') +__import__('setuptools.extern.packaging.specifiers') +__import__('setuptools.extern.packaging.version') def _get_unpatched(cls): diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 70ac180c6f..da3d668d99 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -69,5 +69,5 @@ def install(self): sys.meta_path.append(self) -names = 'six', -VendorImporter(__name__, names, 'pkg_resources._vendor').install() +names = 'six', 'packaging', 'pyparsing', +VendorImporter(__name__, names, 'setuptools._vendor').install() diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 8e3b638fee..5e20b3f1dd 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -22,7 +22,7 @@ import platform import itertools import distutils.errors -from pkg_resources.extern.packaging.version import LegacyVersion +from setuptools.extern.packaging.version import LegacyVersion from setuptools.extern.six.moves import filterfalse @@ -48,7 +48,7 @@ class winreg: _msvc9_suppress_errors = ( # msvc9compiler isn't available on some platforms ImportError, - + # msvc9compiler raises DistutilsPlatformError in some # environments. See #1118. distutils.errors.DistutilsPlatformError, diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index 75ec740d0e..f5f0e6bbc8 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,7 +1,7 @@ import os -from pkg_resources.extern.six import binary_type +from setuptools.extern.six import binary_type import pkg_resources.py31compat diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 9ffe434ae3..37dfa53103 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -8,7 +8,7 @@ import zipfile from pkg_resources import Distribution, PathMetadata, parse_version -from pkg_resources.extern.six import PY3 +from setuptools.extern.six import PY3 from setuptools import Distribution as SetuptoolsDistribution from setuptools import pep425tags from setuptools.command.egg_info import write_requirements From 7dd1e4e68899f7f5543dabe81363b95ad907446c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 14:23:38 -0400 Subject: [PATCH 6954/8469] Extract common functionality into reusable functions --- pavement.py | 43 ++++++++----------- pkg_resources/_vendor/packaging/markers.py | 6 +-- .../_vendor/packaging/requirements.py | 8 ++-- 3 files changed, 24 insertions(+), 33 deletions(-) diff --git a/pavement.py b/pavement.py index ca54e61f4c..84e5825d8b 100644 --- a/pavement.py +++ b/pavement.py @@ -25,6 +25,18 @@ def rewrite_packaging(pkg_files, new_root): file.write_text(text) +def clean(vendor): + """ + Remove all files out of the vendor directory except the meta + data (as pip uninstall doesn't support -t). + """ + remove_all( + path + for path in vendor.glob('*') + if path.basename() != 'vendored.txt' + ) + + def install(vendor): clean(vendor) install_args = [ @@ -35,37 +47,16 @@ def install(vendor): pip.main(install_args) remove_all(vendor.glob('*.dist-info')) remove_all(vendor.glob('*.egg-info')) + (vendor / '__init__.py').write_text('') + def update_pkg_resources(): vendor = Path('pkg_resources/_vendor') - # pip uninstall doesn't support -t, so do it manually - remove_all(vendor.glob('packaging*')) - remove_all(vendor.glob('six*')) - remove_all(vendor.glob('pyparsing*')) - remove_all(vendor.glob('appdirs*')) - install_args = [ - 'install', - '-r', str(vendor / 'vendored.txt'), - '-t', str(vendor), - ] - pip.main(install_args) - rewrite_packaging(vendor / 'packaging', 'pkg_resources.extern.') - remove_all(vendor.glob('*.dist-info')) - remove_all(vendor.glob('*.egg-info')) + install(vendor) + rewrite_packaging(vendor / 'packaging', 'pkg_resources.extern') def update_setuptools(): vendor = Path('setuptools/_vendor') - # pip uninstall doesn't support -t, so do it manually - remove_all(vendor.glob('packaging*')) - remove_all(vendor.glob('six*')) - remove_all(vendor.glob('pyparsing*')) - install_args = [ - 'install', - '-r', str(vendor / 'vendored.txt'), - '-t', str(vendor), - ] - pip.main(install_args) + install(vendor) rewrite_packaging(vendor / 'packaging', 'setuptools.extern') - remove_all(vendor.glob('*.dist-info')) - remove_all(vendor.glob('*.egg-info')) diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index a4805648dd..892e578edd 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -8,9 +8,9 @@ import platform import sys -from pkg_resources.extern..pyparsing import ParseException, ParseResults, stringStart, stringEnd -from pkg_resources.extern..pyparsing import ZeroOrMore, Group, Forward, QuotedString -from pkg_resources.extern..pyparsing import Literal as L # noqa +from pkg_resources.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd +from pkg_resources.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString +from pkg_resources.extern.pyparsing import Literal as L # noqa from ._compat import string_types from .specifiers import Specifier, InvalidSpecifier diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index ccaed95b13..0c8c4a3852 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -6,10 +6,10 @@ import string import re -from pkg_resources.extern..pyparsing import stringStart, stringEnd, originalTextFor, ParseException -from pkg_resources.extern..pyparsing import ZeroOrMore, Word, Optional, Regex, Combine -from pkg_resources.extern..pyparsing import Literal as L # noqa -from pkg_resources.extern..six.moves.urllib import parse as urlparse +from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException +from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine +from pkg_resources.extern.pyparsing import Literal as L # noqa +from pkg_resources.extern.six.moves.urllib import parse as urlparse from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet From 6c2bccf360b7587cccbd59dd0b0b6081604f77c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 14:27:55 -0400 Subject: [PATCH 6955/8469] Update changelog. Fixes #1296. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 93eca56d8f..8fae9816d5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,9 @@ v39.0.0 ------- +* #1296: Setuptools now vendors its own direct dependencies, no + longer relying on the dependencies as vendored by pkg_resources. + * #296: Removed long-deprecated support for iteration on Version objects as returned by ``pkg_resources.parse_version``. Removed the ``SetuptoolsVersion`` and From a6e5aa4eacfc978d2b00be06733698feeab87ce6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Mar 2018 14:48:40 -0400 Subject: [PATCH 6956/8469] =?UTF-8?q?Bump=20version:=2038.7.0=20=E2=86=92?= =?UTF-8?q?=2039.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 1d8dd5ad4e..4b5a26ab62 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 38.7.0 +current_version = 39.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 2712f89964..b2cff53bf2 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="38.7.0", + version="39.0.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 2005e53e887c4ce6ca6da27241e43e3686e8f298 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 17 Mar 2018 19:59:08 -0400 Subject: [PATCH 6957/8469] Make dist test fail under unicode --- setuptools/tests/test_dist.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 0c10f05bc1..ed75b54636 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -2,7 +2,6 @@ from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin -from setuptools.extern.six import StringIO from .textwrap import DALS from .test_easy_install import make_nspkg_sdist @@ -85,15 +84,15 @@ def merge_dicts(d1, d2): {'author_email': 'author@name.com', 'maintainer_email': 'maintainer@name.com'})), ('Author unicode', merge_dicts(attrs, - {'author': '鉄沢寛'})), + {'author': u'鉄沢寛'})), ('Maintainer unicode', merge_dicts(attrs, - {'maintainer': 'Jan Åukasiewicz'})), + {'maintainer': u'Jan Åukasiewicz'})), ] return test_cases @pytest.mark.parametrize('name,attrs', __maintainer_test_cases()) -def test_maintainer_author(name, attrs): +def test_maintainer_author(name, attrs, tmpdir): tested_keys = { 'author': 'Author', 'author_email': 'Author-email', @@ -103,11 +102,14 @@ def test_maintainer_author(name, attrs): # Generate a PKG-INFO file dist = Distribution(attrs) - PKG_INFO = StringIO() - dist.metadata.write_pkg_file(PKG_INFO) - PKG_INFO.seek(0) + fn = tmpdir.mkdir('pkg_info') + fn_s = str(fn) + + dist.metadata.write_pkg_info(fn_s) + + with open(str(fn.join('PKG-INFO')), 'r') as f: + pkg_lines = f.readlines() - pkg_lines = PKG_INFO.readlines() pkg_lines = [_ for _ in pkg_lines if _] # Drop blank lines pkg_lines_set = set(pkg_lines) From f78c489384f9a87ec73b515cf94949f3427d6210 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 17 Mar 2018 19:59:45 -0400 Subject: [PATCH 6958/8469] Fix issue with unicode author/maintainer on PY2 --- setuptools/dist.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index cd34eef639..0fb3d29ce1 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- __all__ = ['Distribution'] import re @@ -38,7 +39,9 @@ def _get_unpatched(cls): def get_metadata_version(dist_md): if dist_md.long_description_content_type or dist_md.provides_extras: return StrictVersion('2.1') - elif getattr(dist_md, 'python_requires', None) is not None: + elif (dist_md.maintainer is not None or + dist_md.maintainer_email is not None or + getattr(dist_md, 'python_requires', None) is not None): return StrictVersion('1.2') elif (dist_md.provides or dist_md.requires or dist_md.obsoletes or dist_md.classifiers or dist_md.download_url): @@ -48,7 +51,7 @@ def get_metadata_version(dist_md): # Based on Python 3.5 version -def write_pkg_file(self, file): +def write_pkg_file(self, file, is_test=False): """Write the PKG-INFO format data to a file object. """ version = get_metadata_version(self) @@ -59,7 +62,7 @@ def write_pkg_file(self, file): file.write('Summary: %s\n' % self.get_description()) file.write('Home-page: %s\n' % self.get_url()) - if version == '1.2': + if version < StrictVersion('1.2'): file.write('Author: %s\n' % self.get_contact()) file.write('Author-email: %s\n' % self.get_contact_email()) else: @@ -72,6 +75,9 @@ def write_pkg_file(self, file): for field, attr in optional_fields: attr_val = getattr(self, attr) + if six.PY2: + attr_val = self._encode_field(attr_val) + if attr_val is not None: file.write('%s: %s\n' % (field, attr_val)) @@ -88,7 +94,7 @@ def write_pkg_file(self, file): if keywords: file.write('Keywords: %s\n' % keywords) - if version == '1.2': + if version >= StrictVersion('1.2'): for platform in self.get_platforms(): file.write('Platform: %s\n' % platform) else: From c14a674e89fa5fc6661a35ca4eb468afa886c775 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 09:41:28 -0400 Subject: [PATCH 6959/8469] When possible, avoid test-specific interfaces in production code. --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 0fb3d29ce1..61cf580706 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -51,7 +51,7 @@ def get_metadata_version(dist_md): # Based on Python 3.5 version -def write_pkg_file(self, file, is_test=False): +def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ version = get_metadata_version(self) From ad2d7e483ef5531962f6ca0c463704505afeb471 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 09:54:37 -0400 Subject: [PATCH 6960/8469] Use unicode literals --- setuptools/tests/test_dist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index ed75b54636..74bd8cc83a 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import unicode_literals + from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin @@ -84,9 +87,9 @@ def merge_dicts(d1, d2): {'author_email': 'author@name.com', 'maintainer_email': 'maintainer@name.com'})), ('Author unicode', merge_dicts(attrs, - {'author': u'鉄沢寛'})), + {'author': '鉄沢寛'})), ('Maintainer unicode', merge_dicts(attrs, - {'maintainer': u'Jan Åukasiewicz'})), + {'maintainer': 'Jan Åukasiewicz'})), ] return test_cases From d92bc63ddd88729ad0bd892eacce29439b821fd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 09:55:59 -0400 Subject: [PATCH 6961/8469] Delint --- setuptools/dist.py | 5 +++-- setuptools/tests/test_dist.py | 31 +++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 61cf580706..284d922df5 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -36,6 +36,7 @@ def _get_unpatched(cls): warnings.warn("Do not call this function", DeprecationWarning) return get_unpatched(cls) + def get_metadata_version(dist_md): if dist_md.long_description_content_type or dist_md.provides_extras: return StrictVersion('2.1') @@ -76,7 +77,7 @@ def write_pkg_file(self, file): for field, attr in optional_fields: attr_val = getattr(self, attr) if six.PY2: - attr_val = self._encode_field(attr_val) + attr_val = self._encode_field(attr_val) if attr_val is not None: file.write('%s: %s\n' % (field, attr_val)) @@ -562,7 +563,7 @@ def fetch_build_egg(self, req): # don't use any other settings 'find_links', 'site_dirs', 'index_url', 'optimize', 'site_dirs', 'allow_hosts', - )) + )) if self.dependency_links: links = self.dependency_links[:] if 'find_links' in opts: diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 74bd8cc83a..28b46fd380 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -11,12 +11,14 @@ import pytest + def test_dist_fetch_build_egg(tmpdir): """ Check multiple calls to `Distribution.fetch_build_egg` work as expected. """ index = tmpdir.mkdir('index') index_url = urljoin('file://', pathname2url(str(index))) + def sdist_with_index(distname, version): dist_dir = index.mkdir(distname) dist_sdist = '%s-%s.tar.gz' % (distname, version) @@ -65,35 +67,45 @@ def merge_dicts(d1, d2): test_cases = [ ('No author, no maintainer', attrs.copy()), - ('Author (no e-mail), no maintainer', merge_dicts(attrs, + ('Author (no e-mail), no maintainer', merge_dicts( + attrs, {'author': 'Author Name'})), - ('Author (e-mail), no maintainer', merge_dicts(attrs, + ('Author (e-mail), no maintainer', merge_dicts( + attrs, {'author': 'Author Name', 'author_email': 'author@name.com'})), - ('No author, maintainer (no e-mail)', merge_dicts(attrs, + ('No author, maintainer (no e-mail)', merge_dicts( + attrs, {'maintainer': 'Maintainer Name'})), - ('No author, maintainer (e-mail)', merge_dicts(attrs, + ('No author, maintainer (e-mail)', merge_dicts( + attrs, {'maintainer': 'Maintainer Name', 'maintainer_email': 'maintainer@name.com'})), - ('Author (no e-mail), Maintainer (no-email)', merge_dicts(attrs, + ('Author (no e-mail), Maintainer (no-email)', merge_dicts( + attrs, {'author': 'Author Name', 'maintainer': 'Maintainer Name'})), - ('Author (e-mail), Maintainer (e-mail)', merge_dicts(attrs, + ('Author (e-mail), Maintainer (e-mail)', merge_dicts( + attrs, {'author': 'Author Name', 'author_email': 'author@name.com', 'maintainer': 'Maintainer Name', 'maintainer_email': 'maintainer@name.com'})), - ('No author (e-mail), no maintainer (e-mail)', merge_dicts(attrs, + ('No author (e-mail), no maintainer (e-mail)', merge_dicts( + attrs, {'author_email': 'author@name.com', 'maintainer_email': 'maintainer@name.com'})), - ('Author unicode', merge_dicts(attrs, + ('Author unicode', merge_dicts( + attrs, {'author': '鉄沢寛'})), - ('Maintainer unicode', merge_dicts(attrs, + ('Maintainer unicode', merge_dicts( + attrs, {'maintainer': 'Jan Åukasiewicz'})), ] return test_cases + @pytest.mark.parametrize('name,attrs', __maintainer_test_cases()) def test_maintainer_author(name, attrs, tmpdir): tested_keys = { @@ -127,4 +139,3 @@ def test_maintainer_author(name, attrs, tmpdir): else: line = '%s: %s' % (fkey, val) assert line in pkg_lines_set - From b38d71f2935ce069f5f1f6b2ccaa7b99c838db67 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 09:59:32 -0400 Subject: [PATCH 6962/8469] Open metadata file with UTF-8 decoding. --- setuptools/tests/test_dist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 28b46fd380..8d5c9e387e 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -2,6 +2,8 @@ from __future__ import unicode_literals +import io + from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin @@ -122,7 +124,7 @@ def test_maintainer_author(name, attrs, tmpdir): dist.metadata.write_pkg_info(fn_s) - with open(str(fn.join('PKG-INFO')), 'r') as f: + with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: pkg_lines = f.readlines() pkg_lines = [_ for _ in pkg_lines if _] # Drop blank lines From b1b837df6846cc64bdfec94408fc2276fbfe93ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 10:00:57 -0400 Subject: [PATCH 6963/8469] Use filter to filter blank lines --- setuptools/tests/test_dist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 8d5c9e387e..0279318b1c 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -127,7 +127,9 @@ def test_maintainer_author(name, attrs, tmpdir): with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: pkg_lines = f.readlines() - pkg_lines = [_ for _ in pkg_lines if _] # Drop blank lines + # Drop blank lines + pkg_lines = list(filter(None, pkg_lines)) + pkg_lines_set = set(pkg_lines) # Duplicate lines should not be generated From eb6502d70552df1fa1272497c05d8c5893f6befe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 10:01:39 -0400 Subject: [PATCH 6964/8469] Use another variable name to avoid masking prior value. --- setuptools/tests/test_dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 0279318b1c..5162e1c985 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -125,10 +125,10 @@ def test_maintainer_author(name, attrs, tmpdir): dist.metadata.write_pkg_info(fn_s) with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: - pkg_lines = f.readlines() + raw_pkg_lines = f.readlines() # Drop blank lines - pkg_lines = list(filter(None, pkg_lines)) + pkg_lines = list(filter(None, raw_pkg_lines)) pkg_lines_set = set(pkg_lines) From f96f0db5ab8e90a0c3757e7951da26f0a948e9cf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 10:34:42 -0400 Subject: [PATCH 6965/8469] Update changelog. Ref #1300. --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 8fae9816d5..05de76e50a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v39.0.1 +------- + +* #1297: Restore Unicode handling for Maintainer fields in + metadata. + v39.0.0 ------- From 76f1da96edb2a9252c4aa7f4eacdac4312209d1c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Mar 2018 10:34:48 -0400 Subject: [PATCH 6966/8469] =?UTF-8?q?Bump=20version:=2039.0.0=20=E2=86=92?= =?UTF-8?q?=2039.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4b5a26ab62..daec5c99f3 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 39.0.0 +current_version = 39.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index b2cff53bf2..9ac05104d4 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="39.0.0", + version="39.0.1", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From a0723a66bf7950ee470971ac9931d751a7dd76f3 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 18 Mar 2018 11:43:00 -0400 Subject: [PATCH 6967/8469] Stop patching write_pkg_info --- setuptools/dist.py | 9 --------- setuptools/monkey.py | 16 ---------------- 2 files changed, 25 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 284d922df5..321ab6b7d7 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -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 diff --git a/setuptools/monkey.py b/setuptools/monkey.py index d9eb7d7b29..08ed50d9ec 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -87,7 +87,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 +110,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 From 0a2c83252613aaaddb8f995d86df370af7003cbb Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 10:22:22 -0400 Subject: [PATCH 6968/8469] Add coverage generation to tox --- tests/requirements.txt | 2 ++ tox.ini | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 38b6924712..d3995f745a 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,3 +5,5 @@ virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 wheel +coverage +pytest-cov diff --git a/tox.ini b/tox.ini index 2f7d4dc818..dab48816e6 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,28 @@ [testenv] deps=-rtests/requirements.txt +setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR -commands=py.test {posargs} +# These are separate so xfail tests don't count towards code coverage +commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools} + pytest -m "xfail" {posargs: "{toxinidir}"} usedevelop=True + + +[testenv:coverage] +description=Combine coverage data and create reports +deps=coverage +skip_install=True +changedir={toxworkdir} +setenv=COVERAGE_FILE=.coverage +commands=coverage erase + coverage combine + coverage report --rcfile={toxinidir}/tox.ini + coverage xml + +[coverage:run] +source=setuptools + +[coverage:report] +skip_covered=True +show_missing=True From 65c5ae1ae8ebc83df2224f31e24fcb9f87a36aed Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 10:28:51 -0400 Subject: [PATCH 6969/8469] Add coverage to travis --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffbd72a3d4..a0d90925eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,19 @@ python: - nightly - pypy - pypy3 +env: + TOXENV=py jobs: fast_finish: true include: - python: *latest_py3 - env: LANG=C + env: &cenv + global: + - LANG=C + - TOXENV=py - python: *latest_py2 - env: LANG=C + env: *cenv - stage: deploy (to PyPI for tagged commits) if: tag IS present python: *latest_py3 @@ -49,3 +54,6 @@ install: - python bootstrap.py script: tox + +after_success: + - if [[ $TOXENV == "py" ]]; then tox -e coverage; fi From 49b65d25db9b85b0d34bfc713d6ca4ca5c1096c0 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 10:43:00 -0400 Subject: [PATCH 6970/8469] Add codecov to tox and travis --- .travis.yml | 3 ++- tox.ini | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a0d90925eb..731a067bad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,4 +56,5 @@ install: script: tox after_success: - - if [[ $TOXENV == "py" ]]; then tox -e coverage; fi + - if [[ $TOXENV == "py" ]]; then tox -e coverage,codecov; fi + diff --git a/tox.ini b/tox.ini index dab48816e6..2201768dc9 100644 --- a/tox.ini +++ b/tox.ini @@ -25,6 +25,12 @@ commands=coverage erase coverage report --rcfile={toxinidir}/tox.ini coverage xml +[testenv:codecov] +description=[Only run on CI]: Upload coverage data to codecov +deps=codecov +skip_install=True +commands=codecov --file {toxworkdir}/coverage.xml + [coverage:run] source=setuptools From a2b444f1375d8c56275e50bd2a9bbe111003a76b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 10:54:34 -0400 Subject: [PATCH 6971/8469] Add coverage to appveyor build --- appveyor.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7c61455ce6..2b6594599e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: - APPVEYOR: true + APPVEYOR: True matrix: - PYTHON: "C:\\Python35-x64" @@ -20,6 +20,10 @@ cache: test_script: - "python bootstrap.py" - "python -m pip install tox" - - "tox" + - "tox -e py" + +after_test: + - tox -e coverage,codecov version: '{build}' + From aeb6c9435b50715f91f4ad06e387172be9742beb Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 11:16:18 -0400 Subject: [PATCH 6972/8469] Add travis, appveyor and codecov passenvs Some of these environment variables are necessary codecov to detect that it is on travis/appveyor and thus doesn't need an upload token. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2201768dc9..2c3de95e50 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ [testenv] deps=-rtests/requirements.txt setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} -passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR +passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* # These are separate so xfail tests don't count towards code coverage commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools} pytest -m "xfail" {posargs: "{toxinidir}"} From 4bca77392b8da2f1de80c944d221a9874b72cf6b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 11:28:01 -0400 Subject: [PATCH 6973/8469] Add codecov settings --- .codecov.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000..69cb76019a --- /dev/null +++ b/.codecov.yml @@ -0,0 +1 @@ +comment: false From 20e424c2dfa0d290580e4e355eca765632dc90a4 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 21 Mar 2018 11:37:42 -0400 Subject: [PATCH 6974/8469] Omit vendored code from coverage --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 2c3de95e50..5a7044d41c 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,7 @@ commands=codecov --file {toxworkdir}/coverage.xml [coverage:run] source=setuptools +omit=setuptools/_vendor/* [coverage:report] skip_covered=True From b987fe1c2fa61040cc07a07d93b5284b66b03288 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 22 Mar 2018 11:09:28 -0400 Subject: [PATCH 6975/8469] Add lower bound to coverage packages --- tests/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index d3995f745a..fd826d0974 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,5 +5,5 @@ virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 wheel -coverage -pytest-cov +coverage>=4.5.1 +pytest-cov>=2.5.1 From 18ea99486520e3f7cf1668436ae800695ae1fb9c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 22 Mar 2018 11:12:28 -0400 Subject: [PATCH 6976/8469] Update tox passenv --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5a7044d41c..6f76058520 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,9 @@ [testenv] deps=-rtests/requirements.txt setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} -passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* +# TODO: The passed environment variables came from copying other tox.ini files +# These should probably be individually annotated to explain what needs them. +passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* # These are separate so xfail tests don't count towards code coverage commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools} pytest -m "xfail" {posargs: "{toxinidir}"} From 9d9aa90c912fa363a5dcb263b709ca776c911661 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 22 Mar 2018 14:54:28 -0400 Subject: [PATCH 6977/8469] Start omitting */_vendor/* --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6f76058520..42d01a2b3a 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands=codecov --file {toxworkdir}/coverage.xml [coverage:run] source=setuptools -omit=setuptools/_vendor/* +omit=*/_vendor/* [coverage:report] skip_covered=True From 685987d6275f8d9f5815c0f80bf581fb3d6d02fd Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 23 Mar 2018 13:11:28 -0400 Subject: [PATCH 6978/8469] Skip coverage on pypy3 on travis On pypy3 on Travis (version 5.8.0), running with coverage enabled causes significant slowdown and test_build_meta ends up timing out or otherwise failing. Until that is fixed, skip coverage on pypy3 on Travis. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 731a067bad..fb659f1310 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ python: - &latest_py3 3.6 - nightly - pypy -- pypy3 env: TOXENV=py @@ -23,6 +22,10 @@ jobs: - TOXENV=py - python: *latest_py2 env: *cenv + - python: pypy3 + # Running coverage breaks the pypy3 build on Travis only. + # Until that's fixed the pypy3 build needs to be run without coverage + script: tox -e py -- $TRAVIS_BUILD_DIR - stage: deploy (to PyPI for tagged commits) if: tag IS present python: *latest_py3 From e6b7f8d868b2f3fd5ac2015055e5414f489d418b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 26 Mar 2018 12:03:08 +0100 Subject: [PATCH 6979/8469] tests: Add regression test for #1081 This ensures we don't unknowingly change the behavior of this again. Signed-off-by: Stephen Finucane Fixes: #1307 --- setuptools/tests/test_egg_info.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index d221167152..2a070debe0 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -244,6 +244,18 @@ def parametrize(*test_list, **format_dict): pytz ''', + ''' + install_requires_ordered + + install_requires=["fake-factory>=1.12.3,!=2.0"] + + [options] + install_requires = + fake-factory>=1.12.3,!=2.0 + + fake-factory!=2.0,>=1.12.3 + ''', + ''' install_requires_with_marker From 58d299de99612f76f2ff5cfe7fb142d95e5e8738 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Mar 2018 18:34:40 +0200 Subject: [PATCH 6980/8469] Improve speed and clarity of code coverage Rationale: - tox should work the same as before - coverage is too slow and disabled by default locally - disable coverage on pypy and pypy3 (way too slow) - add coverage info for pkg_resources - make sure tests are ignored in coverage - make sure all CI jobs are identifiable - include coverage for xfail (too complicated otherwise) - disable report on terminal --- .travis.yml | 28 ++++++++++++---------------- appveyor.yml | 10 ++++++---- tox.ini | 23 +++++++++++------------ 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb659f1310..544b8df305 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,29 +8,20 @@ python: - 3.5 - &latest_py3 3.6 - nightly -- pypy -env: - TOXENV=py jobs: fast_finish: true include: - python: *latest_py3 - env: &cenv - global: - - LANG=C - - TOXENV=py + env: LANG=C - python: *latest_py2 - env: *cenv - - python: pypy3 - # Running coverage breaks the pypy3 build on Travis only. - # Until that's fixed the pypy3 build needs to be run without coverage - script: tox -e py -- $TRAVIS_BUILD_DIR + env: LANG=C - stage: deploy (to PyPI for tagged commits) if: tag IS present python: *latest_py3 install: skip script: skip + after_success: skip before_deploy: python bootstrap.py deploy: provider: pypi @@ -43,6 +34,13 @@ jobs: distributions: release skip_cleanup: true skip_upload_docs: true + # Don't run coverage on pypy. + - python: pypy + script: tox + after_success: skip + - python: pypy3 + script: tox + after_success: skip cache: pip @@ -56,8 +54,6 @@ install: # update egg_info based on setup.py in checkout - python bootstrap.py -script: tox - -after_success: - - if [[ $TOXENV == "py" ]]; then tox -e coverage,codecov; fi +script: tox -- --cov +after_success: env TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME tox -e coverage,codecov diff --git a/appveyor.yml b/appveyor.yml index 2b6594599e..ff7122b41f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,13 @@ environment: APPVEYOR: True + CODECOV_ENV: APPVEYOR_JOB_NAME matrix: - - PYTHON: "C:\\Python35-x64" - - PYTHON: "C:\\Python27-x64" + - APPVEYOR_JOB_NAME: "python35-x64" + PYTHON: "C:\\Python35-x64" + - APPVEYOR_JOB_NAME: "python27-x64" + PYTHON: "C:\\Python27-x64" install: # symlink python from a directory with a space @@ -20,10 +23,9 @@ cache: test_script: - "python bootstrap.py" - "python -m pip install tox" - - "tox -e py" + - "tox -- --cov" after_test: - tox -e coverage,codecov version: '{build}' - diff --git a/tox.ini b/tox.ini index 42d01a2b3a..a0c4cdf300 100644 --- a/tox.ini +++ b/tox.ini @@ -4,28 +4,28 @@ # # export TOXENV='py27,py3{3,4,5,6},pypy,pypy3' +[tox] +envlist=python + [testenv] deps=-rtests/requirements.txt setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* -# These are separate so xfail tests don't count towards code coverage -commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools} - pytest -m "xfail" {posargs: "{toxinidir}"} +commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} usedevelop=True [testenv:coverage] -description=Combine coverage data and create reports +description=Combine coverage data and create report deps=coverage skip_install=True changedir={toxworkdir} setenv=COVERAGE_FILE=.coverage commands=coverage erase coverage combine - coverage report --rcfile={toxinidir}/tox.ini - coverage xml + coverage {posargs:xml} [testenv:codecov] description=[Only run on CI]: Upload coverage data to codecov @@ -34,9 +34,8 @@ skip_install=True commands=codecov --file {toxworkdir}/coverage.xml [coverage:run] -source=setuptools -omit=*/_vendor/* - -[coverage:report] -skip_covered=True -show_missing=True +source= + pkg_resources + setuptools +omit= + */_vendor/* From 41882016dbd6b334e6e10e2c3ac5afb9f5793ede Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 6 Apr 2018 17:07:44 -0400 Subject: [PATCH 6981/8469] Update wheel tests to reflect latest version --- setuptools/tests/test_wheel.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index b6be6f1f05..d8d5ddb23c 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -161,11 +161,9 @@ def __repr__(self): ''' foo-1.0-py{py_version}.egg/ |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt |-- foo/ | |-- __init__.py @@ -196,11 +194,9 @@ def __repr__(self): ''' foo-1.0-py{py_version}.egg/ |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt |-- data_dir/ | |-- data.txt @@ -267,11 +263,9 @@ def __repr__(self): foo-1.0-py{py_version}-{platform}.egg/ |-- extension{shlib_ext} |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt ''' ), @@ -293,11 +287,9 @@ def __repr__(self): foo-1.0-py{py_version}.egg/ |-- header.h |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt ''' ), @@ -326,11 +318,9 @@ def __repr__(self): ''' foo-1.0-py{py_version}.egg/ |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt | |-- scripts/ | | |-- script.py @@ -346,11 +336,9 @@ def __repr__(self): ''' foo-1.0-py{py_version}.egg/ |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- requires.txt | |-- top_level.txt '''), @@ -430,11 +418,9 @@ def __repr__(self): foo-1.0-py{py_version}.egg/ |-- foo-1.0-py{py_version}-nspkg.pth |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- namespace_packages.txt | |-- top_level.txt |-- foo/ @@ -466,11 +452,9 @@ def __repr__(self): ''' foo-1.0-py{py_version}.egg/ |-- EGG-INFO/ - | |-- DESCRIPTION.rst | |-- PKG-INFO | |-- RECORD | |-- WHEEL - | |-- metadata.json | |-- top_level.txt |-- foo/ | |-- __init__.py From ed3762fc7d16174a54b2fa83af1996decafd756f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 7 Apr 2018 13:38:31 -0400 Subject: [PATCH 6982/8469] Switch test_wheel over to subset-based test This is both compatible with the old version of wheel (last one supported under Python 3.3) and is more in line with our commitment, which is that the wheel install provides at least these files. --- setuptools/tests/test_wheel.py | 268 +++++++++++++++++---------------- 1 file changed, 142 insertions(+), 126 deletions(-) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index d8d5ddb23c..150ac4c1b5 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -92,39 +92,49 @@ def build_wheel(extra_file_defs=None, **kwargs): yield glob.glob(os.path.join(source_dir, 'dist', '*.whl'))[0] -def tree(root): - def depth(path): - return len(path.split(os.path.sep)) - def prefix(path_depth): - if not path_depth: - return '' - return '| ' * (path_depth - 1) + '|-- ' - lines = [] - root_depth = depth(root) +def tree_set(root): + contents = set() for dirpath, dirnames, filenames in os.walk(root): - dirnames.sort() - filenames.sort() - dir_depth = depth(dirpath) - root_depth - if dir_depth > 0: - lines.append('%s%s/' % (prefix(dir_depth - 1), - os.path.basename(dirpath))) - for f in filenames: - lines.append('%s%s' % (prefix(dir_depth), f)) - return '\n'.join(lines) + '\n' - - -def _check_wheel_install(filename, install_dir, install_tree, + for filename in filenames: + contents.add(os.path.join(os.path.relpath(dirpath, root), + filename)) + return contents + + +def flatten_tree(tree): + """Flatten nested dicts and lists into a full list of paths""" + output = set() + for node, contents in tree.items(): + if isinstance(contents, dict): + contents = flatten_tree(contents) + + for elem in contents: + if isinstance(elem, dict): + output |= {os.path.join(node, val) + for val in flatten_tree(elem)} + else: + output.add(os.path.join(node, elem)) + return output + + +def format_install_tree(tree): + return {x.format( + py_version=PY_MAJOR, + platform=get_platform(), + shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO')) + for x in tree} + + +def _check_wheel_install(filename, install_dir, install_tree_includes, project_name, version, requires_txt): w = Wheel(filename) egg_path = os.path.join(install_dir, w.egg_name()) w.install_as_egg(egg_path) - if install_tree is not None: - install_tree = install_tree.format( - py_version=PY_MAJOR, - platform=get_platform(), - shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO') - ) - assert install_tree == tree(install_dir) + if install_tree_includes is not None: + install_tree = format_install_tree(install_tree_includes) + exp = tree_set(install_dir) + assert install_tree.issubset(exp), (install_tree - exp) + metadata = PathMetadata(egg_path, os.path.join(egg_path, 'EGG-INFO')) dist = Distribution.from_filename(egg_path, metadata=metadata) assert dist.project_name == project_name @@ -157,18 +167,17 @@ def __repr__(self): setup_kwargs=dict( packages=['foo'], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - |-- foo/ - | |-- __init__.py - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': { + 'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt' + ], + 'foo': ['__init__.py'] + } + }), ), dict( @@ -190,18 +199,19 @@ def __repr__(self): setup_kwargs=dict( data_files=[('data_dir', ['data.txt'])], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - |-- data_dir/ - | |-- data.txt - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': { + 'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt' + ], + 'data_dir': [ + 'data.txt' + ] + } + }), ), dict( @@ -258,17 +268,17 @@ def __repr__(self): sources=['extension.c']) ], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}-{platform}.egg/ - |-- extension{shlib_ext} - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}-{platform}.egg': [ + 'extension{shlib_ext}', + {'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt', + ]}, + ] + }), ), dict( @@ -282,17 +292,17 @@ def __repr__(self): setup_kwargs=dict( headers=['header.h'], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- header.h - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': [ + 'header.h', + {'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt', + ]}, + ] + }), ), dict( @@ -314,34 +324,37 @@ def __repr__(self): setup_kwargs=dict( scripts=['script.py', 'script.sh'], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - | |-- scripts/ - | | |-- script.py - | | |-- script.sh - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': { + 'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt', + {'scripts': [ + 'script.py', + 'script.sh' + ]} + + ] + } + }) ), dict( id='requires1', install_requires='foobar==2.0', - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- requires.txt - | |-- top_level.txt - '''), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': { + 'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'requires.txt', + 'top_level.txt', + ] + } + }), requires_txt=DALS( ''' foobar==2.0 @@ -413,21 +426,22 @@ def __repr__(self): namespace_packages=['foo'], packages=['foo.bar'], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- foo-1.0-py{py_version}-nspkg.pth - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- namespace_packages.txt - | |-- top_level.txt - |-- foo/ - | |-- __init__.py - | |-- bar/ - | | |-- __init__.py - '''), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': [ + 'foo-1.0-py{py_version}-nspkg.pth', + {'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'namespace_packages.txt', + 'top_level.txt', + ]}, + {'foo': [ + '__init__.py', + {'bar': ['__init__.py']}, + ]}, + ] + }), ), dict( @@ -448,20 +462,22 @@ def __repr__(self): packages=['foo'], data_files=[('foo/data_dir', ['foo/data_dir/data.txt'])], ), - install_tree=DALS( - ''' - foo-1.0-py{py_version}.egg/ - |-- EGG-INFO/ - | |-- PKG-INFO - | |-- RECORD - | |-- WHEEL - | |-- top_level.txt - |-- foo/ - | |-- __init__.py - | |-- data_dir/ - | | |-- data.txt - ''' - ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': { + 'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'top_level.txt', + ], + 'foo': [ + '__init__.py', + {'data_dir': [ + 'data.txt', + ]} + ] + } + }), ), ) From 4377d517a95a0df2d4e0941438bebdb9f804a527 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Thu, 12 Apr 2018 14:55:06 +0200 Subject: [PATCH 6983/8469] Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2 According to PEP 503, a "normalized" project name has all runs of the characters ., - and _ replaced with a single - character. [0] Similarly, since version 8.1.2, that is the behaviour of pip as well. [1] However, Setuptools still allows a . in the normalized name, which is causing trouble down the line. [0] https://www.python.org/dev/peps/pep-0503/#normalized-names [1] https://github.com/pypa/pip/issues/3666 --- pkg_resources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 8d95bd2912..19a7eba8a1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1309,9 +1309,9 @@ def get_default_cache(): def safe_name(name): """Convert an arbitrary string to a standard distribution name - Any runs of non-alphanumeric/. characters are replaced with a single '-'. + Any runs of non-alphanumeric characters are replaced with a single '-'. """ - return re.sub('[^A-Za-z0-9.]+', '-', name) + return re.sub('[^A-Za-z0-9]+', '-', name) def safe_version(version): From 2ae4ab8915833e1a719199011b923bc87931949c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 12 Apr 2018 14:06:34 -0400 Subject: [PATCH 6984/8469] Add .pytest_cache/ to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2e2f71b8f2..f5661164f7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ setuptools.egg-info *~ .hg* .cache +.pytest_cache/ From 542e5069e27bad1f72e0b37211f4d4c82d38267c Mon Sep 17 00:00:00 2001 From: Thomas Khyn Date: Wed, 18 Apr 2018 15:26:11 +1200 Subject: [PATCH 6985/8469] pep425tags: turn warning into a debug log entry fixes #1314 --- setuptools/pep425tags.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py index dfe55d587a..3bdd3285a5 100644 --- a/setuptools/pep425tags.py +++ b/setuptools/pep425tags.py @@ -4,6 +4,7 @@ from __future__ import absolute_import import distutils.util +from distutils import log import platform import re import sys @@ -69,8 +70,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 From 9af3f4208386064dbe5c7f5c9b6724a8bb1e760c Mon Sep 17 00:00:00 2001 From: Michael Wild Date: Sun, 22 Apr 2018 13:07:52 +0200 Subject: [PATCH 6986/8469] Adds call to os.path.abspath() in pkg_resources.normalize_path() on Cygwin This works around problems that stem from getcwd(3) on Cygwin returning paths containing symlinks. I am not sure at all whether this is a good place to fix it, but that's where I got hit by the issue when doing a `python setup.py develop` (or `pip install -e .`). --- pkg_resources/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 8d95bd2912..3cbb5d199d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2220,7 +2220,15 @@ def null_ns_handler(importer, path_item, packageName, module): def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" - return os.path.normcase(os.path.realpath(filename)) + if sys.platform == 'cygwin': + # This results in a call to getcwd() if `filename` is relative. Contrary + # to POSIX 2008 on Cygwin getcwd (3) contains symlink components. Using + # os.path.abspath() works around this limitation. A fix in os.getcwd() + # would probably better, in Cygwin even more so except that this seems + # to be by design... + return os.path.normcase(os.path.realpath(os.path.abspath(filename))) + else: + return os.path.normcase(os.path.realpath(filename)) def _normalize_cached(filename, _cache={}): From afa410dcce836b0dea503a68eae7467911201bc5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Apr 2018 15:29:48 -0400 Subject: [PATCH 6987/8469] Refactor to support multiple loader names. Ref #1337. --- pkg_resources/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 8d95bd2912..2ccf85adda 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1518,12 +1518,10 @@ def _get(self, path): @classmethod def _register(cls): - loader_cls = getattr( - importlib_machinery, - 'SourceFileLoader', - type(None), - ) - register_loader_type(loader_cls, cls) + loader_names = 'SourceFileLoader', + for name in loader_names: + loader_cls = getattr(importlib_machinery, name, type(None)) + register_loader_type(loader_cls, cls) DefaultProvider._register() From d0800d78a78809020b1681574061490019096657 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Apr 2018 15:31:17 -0400 Subject: [PATCH 6988/8469] Honor SourcelessFileLoader in DefaultProvider. Fixes #1337. --- CHANGES.rst | 6 ++++++ pkg_resources/__init__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 05de76e50a..906da6bda8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v39.1.0 +------- + +* #1337: In ``pkg_resources``, now support loading resources + for modules loaded by the ``SourcelessFileLoader``. + v39.0.1 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2ccf85adda..d5b0fe9828 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1518,7 +1518,7 @@ def _get(self, path): @classmethod def _register(cls): - loader_names = 'SourceFileLoader', + loader_names = 'SourceFileLoader', 'SourcelessFileLoader', for name in loader_names: loader_cls = getattr(importlib_machinery, name, type(None)) register_loader_type(loader_cls, cls) From 06736eec5894df69dc267876cf78381804df3ada Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 26 Apr 2018 06:27:19 -0700 Subject: [PATCH 6989/8469] Update all pypi.python.org URLs to pypi.org For details on the new PyPI, see the blog post: https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html --- CHANGES.rst | 4 ++-- docs/_templates/indexsidebar.html | 2 +- docs/easy_install.txt | 7 +++---- docs/python3.txt | 4 ++-- docs/setuptools.txt | 6 +++--- setuptools/command/easy_install.py | 2 +- setuptools/package_index.py | 2 +- setuptools/tests/test_packageindex.py | 4 ++-- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 906da6bda8..3ad475f379 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1808,7 +1808,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Issue #313: Removed built-in support for subversion. Projects wishing to retain support for subversion will need to use a third party library. The extant implementation is being ported to `setuptools_svn - `_. + `_. * Issue #315: Updated setuptools to hide its own loaded modules during installation of another package. This change will enable setuptools to upgrade (or downgrade) itself even when its own metadata and implementation @@ -2313,7 +2313,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. * Address security vulnerability in SSL match_hostname check as reported in Python #17997. * Prefer `backports.ssl_match_hostname - `_ for backport + `_ for backport implementation if present. * Correct NameError in ``ssl_support`` module (``socket.error``). diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 3b127602ec..80002d0871 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -1,7 +1,7 @@

    Download

    Current version: {{ version }}

    -

    Get Setuptools from the Python Package Index +

    Get Setuptools from the Python Package Index

    Questions? Suggestions? Contributions?

    diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 56b1667226..5c99234361 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -31,7 +31,7 @@ Using "Easy Install" Installing "Easy Install" ------------------------- -Please see the `setuptools PyPI page `_ +Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. @@ -831,7 +831,7 @@ Command-Line Options ``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) Specifies the base URL of the Python Package Index. The default is - https://pypi.python.org/simple if not specified. When a package is requested + https://pypi.org/simple/ if not specified. When a package is requested that is not locally available or linked from a ``--find-links`` download page, the package index will be searched for download pages for the needed package, and those download pages will be searched for links to download @@ -1019,7 +1019,7 @@ that the User installation scheme alone does not provide, e.g. the ability to hi Please refer to the `virtualenv`_ documentation for more details. -.. _virtualenv: https://pypi.python.org/pypi/virtualenv +.. _virtualenv: https://pypi.org/project/virtualenv/ @@ -1620,4 +1620,3 @@ Future Plans * Signature checking? SSL? Ability to suppress PyPI search? * Display byte progress meter when downloading distributions and long pages? * Redirect stdout/stderr to log during run_setup? - diff --git a/docs/python3.txt b/docs/python3.txt index d550cb68c1..c528fc3ced 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -10,8 +10,8 @@ code. Setuptools provides a facility to invoke 2to3 on the code as a part of the build process, by setting the keyword parameter ``use_2to3`` to True, but the Setuptools strongly recommends instead developing a unified codebase -using `six `_, -`future `_, or another compatibility +using `six `_, +`future `_, or another compatibility library. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 65080a0b21..e14d208881 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2277,7 +2277,7 @@ The ``upload`` command is implemented and `documented in distutils. Setuptools augments the ``upload`` command with support -for `keyring `_, +for `keyring `_, allowing the password to be stored in a secure location and not in plaintext in the .pypirc file. To use keyring, first install keyring and set the password for @@ -2671,8 +2671,8 @@ Adding Support for Revision Control Systems If the files you want to include in the source distribution are tracked using Git, Mercurial or SVN, you can use the following packages to achieve that: -- Git and Mercurial: `setuptools_scm `_ -- SVN: `setuptools_svn `_ +- Git and Mercurial: `setuptools_scm `_ +- SVN: `setuptools_svn `_ If you would like to create a plugin for ``setuptools`` to find files tracked by another revision control system, you can do so by adding an entry point to diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a6f61436b7..85ee40f1d5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -319,7 +319,7 @@ def finalize_options(self): 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: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 914b5e6159..b6407be304 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -297,7 +297,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) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 53e20d44c8..63b9294610 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -265,11 +265,11 @@ def test_percent_in_password(self, tmpdir, monkeypatch): with pypirc.open('w') as strm: strm.write(DALS(""" [pypi] - repository=https://pypi.python.org + repository=https://pypi.org username=jaraco password=pity% """)) cfg = setuptools.package_index.PyPIConfig() - cred = cfg.creds_by_repository['https://pypi.python.org'] + cred = cfg.creds_by_repository['https://pypi.org'] assert cred.username == 'jaraco' assert cred.password == 'pity%' From afff74eeeab445c994c7df3d7152e6d0b87523cf Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 28 Apr 2018 10:42:52 +0200 Subject: [PATCH 6990/8469] Update changelog. --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3ad475f379..d8b5b49147 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,8 +1,11 @@ v39.1.0 ------- +* #1340: Update all PyPI URLs to reflect the switch to the + new Warehouse codebase. * #1337: In ``pkg_resources``, now support loading resources for modules loaded by the ``SourcelessFileLoader``. +* #1332: Silence spurious wheel related warnings on Windows. v39.0.1 ------- From 511193af87e252d687e7e82936b4abc5db404910 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 28 Apr 2018 10:43:40 +0200 Subject: [PATCH 6991/8469] =?UTF-8?q?Bump=20version:=2039.0.1=20=E2=86=92?= =?UTF-8?q?=2039.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index daec5c99f3..2c84f0b763 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 39.0.1 +current_version = 39.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 9ac05104d4..b08552d437 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="39.0.1", + version="39.1.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From b5d72640a7a5be77e14548f41b69357e44187579 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 28 Apr 2018 12:44:04 +0200 Subject: [PATCH 6992/8469] travis: fix deployment stage --- .travis.yml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 544b8df305..ced8fa6bcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ python: - 3.5 - &latest_py3 3.6 - nightly +- pypy +- pypy3 jobs: fast_finish: true @@ -21,7 +23,7 @@ jobs: python: *latest_py3 install: skip script: skip - after_success: skip + after_success: true before_deploy: python bootstrap.py deploy: provider: pypi @@ -34,13 +36,6 @@ jobs: distributions: release skip_cleanup: true skip_upload_docs: true - # Don't run coverage on pypy. - - python: pypy - script: tox - after_success: skip - - python: pypy3 - script: tox - after_success: skip cache: pip @@ -54,6 +49,31 @@ install: # update egg_info based on setup.py in checkout - python bootstrap.py -script: tox -- --cov +script: + - | + ( # Run testsuite. + set -ex + case $TRAVIS_PYTHON_VERSION in + pypy*) + # Don't run coverage on pypy (too slow). + tox + ;; + *) + tox -- --cov + ;; + esac + ) -after_success: env TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME tox -e coverage,codecov +after_success: + - | + ( # Upload coverage data. + set -ex + case $TRAVIS_PYTHON_VERSION in + pypy*) + ;; + *) + export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME + tox -e coverage,codecov + ;; + esac + ) From 14f75bcb5f3fe9734a6eb0d151ee748b12390fa7 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 1 May 2018 16:22:44 +1000 Subject: [PATCH 6993/8469] Pin pytest-flake8 to 1.0.0 pytest-flake8 1.0.1 has a hard dependency on pytest>=3.5 [1], which does not support python3.3 [2]. Avoid it for python3.3 and below until python3.3 is removed [3]. Additionally, ensure we have a recent enough pip in travis ci to handle multiple requirements entries. [1] https://github.com/tholo/pytest-flake8/commit/25bbd3b42d3aa0962fb736202115dae9e5d2cd7c [2] https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23 [3] https://github.com/pypa/setuptools/pull/1342 --- .travis.yml | 2 ++ tests/requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ced8fa6bcc..9f09c0faa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,8 @@ jobs: cache: pip install: +# ensure we have recent pip/setuptools +- pip install --upgrade pip setuptools # need tox to get started - pip install tox 'tox-venv; python_version!="3.3"' diff --git a/tests/requirements.txt b/tests/requirements.txt index fd826d0974..aff32c10ea 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,7 @@ importlib; python_version<"2.7" mock -pytest-flake8; python_version>="2.7" +pytest-flake8<=1.0.0; python_version>="3.3" and python_version<"3.5" +pytest-flake8; python_version>="2.7" and python_version!="3.3" and python_version!="3.4" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 From d564851059813836454f275e9b735f9068cf32c6 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Mon, 14 May 2018 09:42:59 -0400 Subject: [PATCH 6994/8469] Add tox environment for docs --- .gitignore | 1 + docs/developer-guide.txt | 12 +++++++----- tox.ini | 8 ++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f5661164f7..b850622f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ bin build dist +docs/build include lib distribute.egg-info diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index b2c1a0cefd..8521005518 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -106,10 +106,12 @@ Setuptools follows ``semver``. Building Documentation ---------------------- -Setuptools relies on the Sphinx system for building documentation. -To accommodate RTD, docs must be built from the docs/ directory. +Setuptools relies on the `Sphinx`_ system for building documentation. +The `published documentation`_ is hosted on Read the Docs. -To build them, you need to have installed the requirements specified -in docs/requirements.txt. One way to do this is to use rwt: +To build the docs locally, use tox:: - setuptools/docs$ python -m rwt -r requirements.txt -- -m sphinx . html + $ tox -e docs + +.. _Sphinx: http://www.sphinx-doc.org/en/master/ +.. _published documentation: https://setuptools.readthedocs.io/en/latest/ diff --git a/tox.ini b/tox.ini index a0c4cdf300..962cb9e1be 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,14 @@ deps=codecov skip_install=True commands=codecov --file {toxworkdir}/coverage.xml +[testenv:docs] +deps = -r{toxinidir}/docs/requirements.txt +skip_install=True +commands = + python {toxinidir}/bootstrap.py + sphinx-build -b html -d {envtmpdir}/doctrees docs docs/build/html + sphinx-build -b man -d {envtmpdir}/doctrees docs docs/build/man + [coverage:run] source= pkg_resources From 37e7df7af707f7022bf50656f27470ccbbf66e9c Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Mon, 14 May 2018 10:17:59 -0400 Subject: [PATCH 6995/8469] Add coverage badge to README This shows the coverage of the master branch as measured by Codecov. --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index f754d96624..8dbc08278a 100755 --- a/README.rst +++ b/README.rst @@ -10,6 +10,9 @@ .. 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/codecov/c/github/pypa/setuptools/master.svg + :target: https://codecov.io/gh/pypa/setuptools + .. image:: https://img.shields.io/pypi/pyversions/setuptools.svg See the `Installation Instructions From be00aaed0c0a34e0c4e5b98a8708ee480397b003 Mon Sep 17 00:00:00 2001 From: Miriam Sexton Date: Mon, 14 May 2018 11:36:37 -0400 Subject: [PATCH 6996/8469] Change Developer Guide instruction on how to checkout from github --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 8521005518..dda34bf771 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -63,7 +63,7 @@ Source Code Grab the code at Github:: - $ git checkout https://github.com/pypa/setuptools + $ git clone https://github.com/pypa/setuptools If you want to contribute changes, we recommend you fork the repository on Github, commit the changes to your repository, and then make a pull request From 9bdf2f7dde7eb6a6767663a3d5dfa1624f59559c Mon Sep 17 00:00:00 2001 From: Miriam Sexton Date: Mon, 14 May 2018 11:43:03 -0400 Subject: [PATCH 6997/8469] Change Developer Guide instruction on how to run tests --- docs/developer-guide.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index dda34bf771..25aaeaabb6 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -86,8 +86,12 @@ from this repository. Testing ------- -The primary tests are run using tox. To run the tests, first make -sure you have tox installed, then invoke it:: +The primary tests are run using tox. To run the tests, first create the metadata +needed to run the tests:: + + $ python bootstrap.py + +Then make sure you have tox installed, and invoke it:: $ tox From 5c90644b2d81207869cd21c052b223d984f30340 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 14 May 2018 10:30:16 -0400 Subject: [PATCH 6998/8469] Add configuration for towncrier --- pyproject.toml | 34 ++++++++++++++++++++++++++++++++++ towncrier_template.rst | 27 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 pyproject.toml create mode 100644 towncrier_template.rst diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..cffd0e9afd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[tool.towncrier] + package = "setuptools" + package_dir = "setuptools" + filename = "CHANGES.rst" + directory = "changelog.d" + title_format = "v{version}" + issue_format = "#{issue}" + template = "towncrier_template.rst" + underlines = ["-"] + + [[tool.towncrier.type]] + directory = "deprecation" + name = "Deprecations" + showcontent = true + + [[tool.towncrier.type]] + directory = "breaking" + name = "Breaking Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "change" + name = "Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Documentation changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "misc" + name = "Misc" + showcontent = true diff --git a/towncrier_template.rst b/towncrier_template.rst new file mode 100644 index 0000000000..02b2882bb1 --- /dev/null +++ b/towncrier_template.rst @@ -0,0 +1,27 @@ +{% for section, _ in sections.items() %} +{% set underline = underlines[0] %}{% if section %}{{section}} +{{ underline * section|length }} +{% endif %} +{% if sections[section] %} +{% for category, val in definitions.items() if category in sections[section]%} +{% if definitions[category]['showcontent'] %} +{% for text, values in sections[section][category].items() %} +* {{ values|join(', ') }}: {{ text }} +{% endfor %} + +{% else %} +* {{ sections[section][category]['']|join(', ') }} + +{% endif %} +{% if sections[section][category]|length == 0 %} +No significant changes. +{% else %} +{% endif %} +{% endfor %} + +{% else %} +No significant changes. + + +{% endif %} +{% endfor %} From 007c8a00253778b421cd7c6b9b67d40c317b188a Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 14 May 2018 11:01:29 -0400 Subject: [PATCH 6999/8469] Add documentation on how to create a changelog entry --- docs/developer-guide.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 25aaeaabb6..ea1034ab04 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -57,6 +57,38 @@ Setuptools makes extensive use of hyperlinks to tickets in the changelog so that system integrators and other users can get a quick summary, but then jump to the in-depth discussion about any subject referenced. +--------------------- +Making a pull request +--------------------- + +When making a pull request, please include a short summary of the changes +and a reference to any issue tickets that the PR is intended to solve. All +PRs with code changes should include tests. All changes should include a +changelog entry. + +``setuptools`` uses `towncrier `_ +for changelog managment, so when making a PR, please add a news fragment in the +``changelog.d/`` folder. Changelog files are written in Restructured Text and +should be a 1 or 2 sentence description of the substantive changes in the PR. +They should be named ``..rst``, where the categories are: + +- ``change``: Any backwards compatible code change +- ``breaking``: Any backwards-compatibility breaking change +- ``doc``: A change to the documentation +- ``misc``: Changes internal to the repo like CI, test and build changes +- ``deprecation``: For deprecations of an existing feature of behavior + +A pull request may have more than one of these components, for example a code +change may introduce a new feature that deprecates an old feature, in which +case two fragments should be added. It is not necessary to make a separate +documentation fragment for documentation changes accompanying the relevant +code changes. See the following for an example news fragment: + +.. code-block:: bash + + $ cat changelog.d/1288.change.rst + Add support for maintainer in PKG-INFO + ----------- Source Code ----------- From 51e3fabf063399ef5cf3bad9ef3b506108b5bb70 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 14 May 2018 10:39:37 -0400 Subject: [PATCH 7000/8469] Add changelog entry for towncrier addition --- changelog.d/1354.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1354.misc.rst diff --git a/changelog.d/1354.misc.rst b/changelog.d/1354.misc.rst new file mode 100644 index 0000000000..7f9b80c95b --- /dev/null +++ b/changelog.d/1354.misc.rst @@ -0,0 +1 @@ +Added ``towncrier`` for changelog managment. From 2f2f21ad470a93dff15db81f450d02a238d87424 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Mon, 14 May 2018 14:48:39 -0400 Subject: [PATCH 7001/8469] Fix doc build warnings --- docs/conf.py | 5 ++++- docs/pkg_resources.txt | 1 + docs/setuptools.txt | 2 +- tox.ini | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f7d02303cc..c7eb6d3f3c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['jaraco.packaging.sphinx', 'rst.linker', 'sphinx.ext.autosectionlabel'] +extensions = ['jaraco.packaging.sphinx', 'rst.linker'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -45,6 +45,9 @@ # The master toctree document. master_doc = 'index' +# A list of glob-style patterns that should be excluded when looking for source files. +exclude_patterns = ['requirements.txt'] + # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index b40a209fe4..18545f4ba0 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1087,6 +1087,7 @@ so that supporting custom importers or new distribution formats can be done simply by creating an appropriate `IResourceProvider`_ implementation; see the section below on `Supporting Custom Importers`_ for more details. +.. _ResourceManager API: ``ResourceManager`` API ======================= diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e14d208881..5ee967abc1 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -242,7 +242,6 @@ have setuptools automatically tag your in-development releases with various pre- or post-release tags. See the following sections for more details: * `Tagging and "Daily Build" or "Snapshot" Releases`_ -* `Managing "Continuous Releases" Using Subversion`_ * The `egg_info`_ command @@ -1366,6 +1365,7 @@ then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` flag, so that it will not be necessary for ``bdist_egg`` or ``EasyInstall`` to try to guess whether your project can work as a zipfile. +.. _Namespace Packages: Namespace Packages ------------------ diff --git a/tox.ini b/tox.ini index 962cb9e1be..a16e89faa7 100644 --- a/tox.ini +++ b/tox.ini @@ -38,8 +38,8 @@ deps = -r{toxinidir}/docs/requirements.txt skip_install=True commands = python {toxinidir}/bootstrap.py - sphinx-build -b html -d {envtmpdir}/doctrees docs docs/build/html - sphinx-build -b man -d {envtmpdir}/doctrees docs docs/build/man + sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html + sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man [coverage:run] source= From 78e887ff5b3d87f052b7195181eeb1f3d251f760 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 14 May 2018 15:12:01 -0400 Subject: [PATCH 7002/8469] Add changelog for #1357 --- changelog.d/1357.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1357.doc.rst diff --git a/changelog.d/1357.doc.rst b/changelog.d/1357.doc.rst new file mode 100644 index 0000000000..11d97cc707 --- /dev/null +++ b/changelog.d/1357.doc.rst @@ -0,0 +1 @@ +Fixed warnings in documentation builds and started enforcing that the docs build without warnings in tox. From d85c11bcd1fc177405a6fe36eaddf92fbcb1b1db Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 12 Apr 2018 14:04:53 -0400 Subject: [PATCH 7003/8469] Bump appveyor Python 3 to 3.6 --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ff7122b41f..f50f8386ac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,8 +4,8 @@ environment: CODECOV_ENV: APPVEYOR_JOB_NAME matrix: - - APPVEYOR_JOB_NAME: "python35-x64" - PYTHON: "C:\\Python35-x64" + - APPVEYOR_JOB_NAME: "python36-x64" + PYTHON: "C:\\Python36-x64" - APPVEYOR_JOB_NAME: "python27-x64" PYTHON: "C:\\Python27-x64" From a960ee1c3f1d1d1067ec1e3c88dc345060bd33a4 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Mon, 14 May 2018 17:53:42 -0400 Subject: [PATCH 7004/8469] Support loading version from a file --- changelog.d/1359.change.rst | 2 ++ docs/setuptools.txt | 6 +++++- setuptools/config.py | 13 +++++++++++++ setuptools/tests/test_config.py | 17 +++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1359.change.rst diff --git a/changelog.d/1359.change.rst b/changelog.d/1359.change.rst new file mode 100644 index 0000000000..05746e737f --- /dev/null +++ b/changelog.d/1359.change.rst @@ -0,0 +1,2 @@ +Support using "file:" to load a PEP 440-compliant package version +from a text file. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5ee967abc1..6b3bbdedf0 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2421,7 +2421,7 @@ Metadata Key Aliases Type ============================== ================= ===== name str -version attr:, str +version attr:, file:, str url home-page str download_url download-url str project_urls dict @@ -2441,6 +2441,10 @@ requires list-comma obsoletes list-comma ============================== ================= ===== +.. note:: + A version loaded using the ``file:`` directive must comply with PEP 440. + It is easy to accidentally put something other than a valid version + string in such a file, so validation is stricter in this case. Options ------- diff --git a/setuptools/config.py b/setuptools/config.py index 8eddcae88a..6343840e26 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -7,6 +7,7 @@ from importlib import import_module from distutils.errors import DistutilsOptionError, DistutilsFileError +from setuptools.extern.packaging.version import LegacyVersion, parse from setuptools.extern.six import string_types @@ -427,6 +428,18 @@ def _parse_version(self, value): :rtype: str """ + 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) if callable(version): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index abb953a8fa..17ac09c8f1 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -268,6 +268,23 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + def test_version_file(self, tmpdir): + + _, config = fake_env( + tmpdir, + '[metadata]\n' + 'version = file: fake_package/version.txt\n' + ) + tmpdir.join('fake_package', 'version.txt').write('1.2.3\n') + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + + tmpdir.join('fake_package', 'version.txt').write('1.2.3\n4.5.6\n') + with pytest.raises(DistutilsOptionError): + with get_dist(tmpdir) as dist: + _ = dist.metadata.version + def test_unknown_meta_item(self, tmpdir): fake_env( From d0a809b53721a3554c28e1480e22626791a0e660 Mon Sep 17 00:00:00 2001 From: Mason Egger Date: Tue, 15 May 2018 10:20:32 -0400 Subject: [PATCH 7005/8469] Add github pull request template --- .github/pull_request_template.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..aa5508076e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ + + + +## Summary of changes + + + +Closes + +### Pull Request Checklist +- [ ] Changes have tests +- [ ] News fragment added in changelog.d. See [documentation](http://setuptools.readthedocs.io/en/latest/developer-guide.html#making-a-pull-request) for details From a72e9970d4ebf279e8bc29f3083ef2f991530d68 Mon Sep 17 00:00:00 2001 From: Mason Egger Date: Tue, 15 May 2018 10:38:56 -0400 Subject: [PATCH 7006/8469] Update developer guide documentation Add changelog for PR #1363 (issue #1355) --- changelog.d/1355.misc.rst | 1 + docs/developer-guide.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1355.misc.rst diff --git a/changelog.d/1355.misc.rst b/changelog.d/1355.misc.rst new file mode 100644 index 0000000000..af1e3f3f1c --- /dev/null +++ b/changelog.d/1355.misc.rst @@ -0,0 +1 @@ +Add PR template. diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index ea1034ab04..6b04603b16 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -62,8 +62,8 @@ Making a pull request --------------------- When making a pull request, please include a short summary of the changes -and a reference to any issue tickets that the PR is intended to solve. All -PRs with code changes should include tests. All changes should include a +and a reference to any issue tickets that the PR is intended to solve. +All PRs with code changes should include tests. All changes should include a changelog entry. ``setuptools`` uses `towncrier `_ From 0088027f2798fe35d0101451ccbdcf62ccee282c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 May 2018 11:29:00 -0400 Subject: [PATCH 7007/8469] Add the phrase declarative config for easier searching --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5ee967abc1..5af76c3e20 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -437,7 +437,7 @@ such projects also need something like ``package_dir={'':'src'}`` in their Anyway, ``find_packages()`` walks the target directory, filtering by inclusion patterns, and finds Python packages (any directory). Packages are only -recognized if they include an ``__init__.py`` file. Finally, exclusion +recognized if they include an ``__init__.py`` file. Finally, exclusion patterns are applied to remove matching packages. Inclusion and exclusion patterns are package names, optionally including @@ -2305,7 +2305,7 @@ Configuring setup() using setup.cfg files ``Setuptools`` allows using configuration files (usually :file:`setup.cfg`) to define a package’s metadata and other options that are normally supplied -to the ``setup()`` function. +to the ``setup()`` function (declarative config). This approach not only allows automation scenarios but also reduces boilerplate code in some cases. From 4e43bc474b3013cf6ba37c00ed78d3343fde6a4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 May 2018 11:46:15 -0400 Subject: [PATCH 7008/8469] Add install_requires to example --- docs/setuptools.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 5af76c3e20..76830e4134 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2341,6 +2341,9 @@ boilerplate code in some cases. scripts = bin/first.py bin/second.py + install_requires = + requests + importlib; python_version == "2.6" [options.package_data] * = *.txt, *.rst From 5668d1513a9d793e03a3df8db470314724656cc4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 May 2018 11:59:22 -0400 Subject: [PATCH 7009/8469] Moved AppVeyor to pypa org --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8dbc08278a..2c008cc6e3 100755 --- a/README.rst +++ b/README.rst @@ -7,8 +7,8 @@ .. 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/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20build%20%40%20Appveyor + :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master .. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg :target: https://codecov.io/gh/pypa/setuptools From 3159321c932202f352f6878d833b8d52463d8858 Mon Sep 17 00:00:00 2001 From: jeffrey k eliasen Date: Tue, 15 May 2018 14:10:16 -0400 Subject: [PATCH 7010/8469] tests --- pkg_resources/tests/test_resources.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 05f35adef2..3b14d7c0c1 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -145,6 +145,24 @@ def testDistroDependsSimple(self): for v in "Twisted>=1.5", "Twisted>=1.5\nZConfig>=2.0": self.checkRequires(self.distRequires(v), v) + def test_distribution_dir_includes_provider_dir(self): + d = pkg_resources.Distribution() + before = d.__dir__() + assert 'test_attr' not in before + d._provider.test_attr = None + after = d.__dir__() + assert len(after) == len(before) + 1 + assert 'test_attr' in after + + def test_distribution_dir_ignores_provider_dir_leading_underscore(self): + d = pkg_resources.Distribution() + before = d.__dir__() + assert '_test_attr' not in before + d._provider._test_attr = None + after = d.__dir__() + assert len(after) == len(before) + assert '_test_attr' not in after + def testResolve(self): ad = pkg_resources.Environment([]) ws = WorkingSet([]) From 8806d73c0b03b3304dc0edd83582c085d0b71299 Mon Sep 17 00:00:00 2001 From: jeffrey k eliasen Date: Tue, 15 May 2018 14:13:04 -0400 Subject: [PATCH 7011/8469] implementation --- pkg_resources/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d5b0fe9828..09c3546aa6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2667,6 +2667,15 @@ def __getattr__(self, attr): 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('_') + ) + ) + @classmethod def from_filename(cls, filename, metadata=None, **kw): return cls.from_location( From 1a90187c407eacbd6bdad05d8bd6e1d94587faa8 Mon Sep 17 00:00:00 2001 From: jeffrey k eliasen Date: Tue, 15 May 2018 14:21:33 -0400 Subject: [PATCH 7012/8469] changelog info --- changelog.d/1364.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1364.rst diff --git a/changelog.d/1364.rst b/changelog.d/1364.rst new file mode 100644 index 0000000000..f7b4c01296 --- /dev/null +++ b/changelog.d/1364.rst @@ -0,0 +1 @@ +Add `__dir__()` implementation to `pkg_resources.Distribution()` that includes the attributes in the `_provider` instance variable. \ No newline at end of file From 58ad1e140703a9214b63e120113a17d48142dc8a Mon Sep 17 00:00:00 2001 From: jeffrey k eliasen Date: Tue, 15 May 2018 15:06:47 -0400 Subject: [PATCH 7013/8469] python 2.7 does not implement object.__dir__() --- pkg_resources/__init__.py | 4 ++++ pkg_resources/tests/test_resources.py | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 09c3546aa6..394930ca1a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2676,6 +2676,10 @@ def __dir__(self): ) ) + 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( diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 3b14d7c0c1..04d02c1f61 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -145,6 +145,16 @@ def testDistroDependsSimple(self): for v in "Twisted>=1.5", "Twisted>=1.5\nZConfig>=2.0": self.checkRequires(self.distRequires(v), v) + needs_object_dir = pytest.mark.skipif( + not hasattr(object, '__dir__'), + reason='object.__dir__ necessary for self.__dir__ implementation', + ) + + def test_distribution_dir(self): + d = pkg_resources.Distribution() + dir(d) + + @needs_object_dir def test_distribution_dir_includes_provider_dir(self): d = pkg_resources.Distribution() before = d.__dir__() @@ -154,6 +164,7 @@ def test_distribution_dir_includes_provider_dir(self): assert len(after) == len(before) + 1 assert 'test_attr' in after + @needs_object_dir def test_distribution_dir_ignores_provider_dir_leading_underscore(self): d = pkg_resources.Distribution() before = d.__dir__() From 5dddf7f26295af7ab9cd5dbf1e2b4472d7739187 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 May 2018 15:11:03 -0400 Subject: [PATCH 7014/8469] Remove compatibility branch for Python 3.0-3.1. --- pkg_resources/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index d5b0fe9828..dbdc9b04dc 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -377,11 +377,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-'): From 0c2e5c9db4c7dd26ba49ffc4a75657715be587b0 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Tue, 15 May 2018 16:26:04 -0400 Subject: [PATCH 7015/8469] Fix attr: with package_dirs --- changelog.d/1365.change.rst | 2 ++ setuptools/config.py | 34 ++++++++++++++++----- setuptools/tests/test_config.py | 53 +++++++++++++++++++++++++++++++-- 3 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 changelog.d/1365.change.rst diff --git a/changelog.d/1365.change.rst b/changelog.d/1365.change.rst new file mode 100644 index 0000000000..63eb008b80 --- /dev/null +++ b/changelog.d/1365.change.rst @@ -0,0 +1,2 @@ +Take the package_dir option into account when loading the version from a +module attribute. diff --git a/setuptools/config.py b/setuptools/config.py index 6343840e26..d3f0b123d5 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -102,14 +102,14 @@ 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 @@ -281,7 +281,7 @@ def _read_file(filepath): return f.read() @classmethod - def _parse_attr(cls, value): + def _parse_attr(cls, value, package_dir=None): """Represents value as a module attribute. Examples: @@ -301,7 +301,21 @@ def _parse_attr(cls, value): 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) @@ -400,6 +414,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.""" @@ -440,7 +460,7 @@ def _parse_version(self, value): )) return version - version = self._parse_attr(value) + version = self._parse_attr(value, self.package_dir) if callable(version): version = version() diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 17ac09c8f1..de7c8b4daf 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -10,13 +10,15 @@ class ErrConfigHandler(ConfigHandler): def make_package_dir(name, base_dir): - dir_package = base_dir.mkdir(name) + dir_package = base_dir + for dir_name in name.split('/'): + dir_package = dir_package.mkdir(dir_name) init_file = dir_package.join('__init__.py') init_file.write('') return dir_package, init_file -def fake_env(tmpdir, setup_cfg, setup_py=None): +def fake_env(tmpdir, setup_cfg, setup_py=None, package_path='fake_package'): if setup_py is None: setup_py = ( @@ -28,7 +30,7 @@ def fake_env(tmpdir, setup_cfg, setup_py=None): config = tmpdir.join('setup.cfg') config.write(setup_cfg) - package_dir, init_file = make_package_dir('fake_package', tmpdir) + package_dir, init_file = make_package_dir(package_path, tmpdir) init_file.write( 'VERSION = (1, 2, 3)\n' @@ -285,6 +287,51 @@ def test_version_file(self, tmpdir): with get_dist(tmpdir) as dist: _ = dist.metadata.version + def test_version_with_package_dir_simple(self, tmpdir): + + _, config = fake_env( + tmpdir, + '[metadata]\n' + 'version = attr: fake_package_simple.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' = src\n', + package_path='src/fake_package_simple' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + + def test_version_with_package_dir_rename(self, tmpdir): + + _, config = fake_env( + tmpdir, + '[metadata]\n' + 'version = attr: fake_package_rename.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' fake_package_rename = fake_dir\n', + package_path='fake_dir' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + + def test_version_with_package_dir_complex(self, tmpdir): + + _, config = fake_env( + tmpdir, + '[metadata]\n' + 'version = attr: fake_package_complex.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' fake_package_complex = src/fake_dir\n', + package_path='src/fake_dir' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + def test_unknown_meta_item(self, tmpdir): fake_env( From 593b409fb66efcabe046e240a868b7dbcf1fc01b Mon Sep 17 00:00:00 2001 From: Arnon Yaari Date: Mon, 14 May 2018 17:10:29 +0300 Subject: [PATCH 7016/8469] Use canonicalize_name to look for .dist-info in wheel files Fixes issue #1350 --- setuptools/tests/test_wheel.py | 33 +++++++++++++++++++++++++++++++++ setuptools/wheel.py | 16 ++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 150ac4c1b5..cf6508686d 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -9,12 +9,15 @@ import glob import inspect import os +import shutil import subprocess import sys +import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MAJOR +from setuptools.extern.packaging.utils import canonicalize_name from setuptools.wheel import Wheel from .contexts import tempdir @@ -506,3 +509,33 @@ def test_wheel_install(params): _check_wheel_install(filename, install_dir, install_tree, project_name, version, requires_txt) + + +def test_wheel_install_pep_503(): + project_name = 'Foo_Bar' # PEP 503 canonicalized name is "foo-bar" + version = '1.0' + with build_wheel( + name=project_name, + version=version, + ) as filename, tempdir() as install_dir: + new_filename = filename.replace(project_name, + canonicalize_name(project_name)) + shutil.move(filename, new_filename) + _check_wheel_install(new_filename, install_dir, None, + canonicalize_name(project_name), + version, None) + + +def test_wheel_no_dist_dir(): + project_name = 'nodistinfo' + version = '1.0' + wheel_name = '{0}-{1}-py2.py3-none-any.whl'.format(project_name, version) + with tempdir() as source_dir: + wheel_path = os.path.join(source_dir, wheel_name) + # create an empty zip file + zipfile.ZipFile(wheel_path, 'w').close() + with tempdir() as install_dir: + with pytest.raises(ValueError): + _check_wheel_install(wheel_path, install_dir, None, + project_name, + version, None) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 37dfa53103..4a33b20324 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -4,10 +4,12 @@ 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 @@ -77,14 +79,24 @@ def egg_name(self): 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_info = self.get_dist_info(zf) dist_data = '%s.data' % dist_basename def get_metadata(name): - with zf.open('%s/%s' % (dist_info, name)) as fp: + 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') From 70c786bb62973a1b8284bceef1321ece79ceb7ee Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 15 May 2018 13:04:44 -0400 Subject: [PATCH 7017/8469] Add changelog for #1360 --- changelog.d/1360.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1360.change.rst diff --git a/changelog.d/1360.change.rst b/changelog.d/1360.change.rst new file mode 100644 index 0000000000..36f40483b3 --- /dev/null +++ b/changelog.d/1360.change.rst @@ -0,0 +1 @@ +Fixed issue with a mismatch between the name of the package and the name of the .dist-info file in wheel files From 7326ff2a919a1b98262c10e618bfa524d0a14d5f Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Wed, 16 May 2018 10:19:28 -0400 Subject: [PATCH 7018/8469] Generate doc previews for pull requests --- netlify.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000..ec21e7be93 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,5 @@ +# Configuration for pull request documentation previews via Netlify + +[build] + publish = "docs/build/html" + command = "pip install tox && tox -e docs" From af30e013a27c310b423331314fdbee1f93d2172f Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Wed, 16 May 2018 16:23:39 -0400 Subject: [PATCH 7019/8469] Don't require network in tests --- changelog.d/1368.misc.rst | 1 + setuptools/tests/test_egg_info.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 changelog.d/1368.misc.rst diff --git a/changelog.d/1368.misc.rst b/changelog.d/1368.misc.rst new file mode 100644 index 0000000000..289e6a6875 --- /dev/null +++ b/changelog.d/1368.misc.rst @@ -0,0 +1 @@ +Fixed tests which failed without network connectivity. diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 2a070debe0..4397d06451 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -233,27 +233,27 @@ def parametrize(*test_list, **format_dict): ''' install_requires_deterministic - install_requires=["fake-factory==0.5.2", "pytz"] + install_requires=["wheel>=0.5", "pytest"] [options] install_requires = - fake-factory==0.5.2 - pytz + wheel>=0.5 + pytest - fake-factory==0.5.2 - pytz + wheel>=0.5 + pytest ''', ''' install_requires_ordered - install_requires=["fake-factory>=1.12.3,!=2.0"] + install_requires=["pytest>=3.0.2,!=10.9999"] [options] install_requires = - fake-factory>=1.12.3,!=2.0 + pytest>=3.0.2,!=10.9999 - fake-factory!=2.0,>=1.12.3 + pytest!=10.9999,>=3.0.2 ''', ''' From 07cd2e4e716264fd51aededcb77cefe37aafb25a Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 30 Apr 2018 19:08:58 +1000 Subject: [PATCH 7020/8469] Allow setting long_description_content_type externally Some tools, such as PBR, might want to set long_description_content_type during the parent object's Distribution.__init__() call (during distutils setup_keywords entry points). However, that field is currently unconditionally overwritten after these calls, erasing the value. We would rather not duplicate the existing method of copying into dist.metadata as done with project_urls. This preserves the fields within Distribution.metadata described by self._DISTUTIULS_UNUPPORTED_METADATA, or otherwise takes it from arguments. A test case that simulates setting the long description and overriding the arguments is added. --- changelog.d/1343.misc.rst | 4 +++ setuptools/dist.py | 36 +++++++++++++++++---------- setuptools/tests/test_config.py | 43 ++++++++++++++++++++++++++++++++- 3 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 changelog.d/1343.misc.rst diff --git a/changelog.d/1343.misc.rst b/changelog.d/1343.misc.rst new file mode 100644 index 0000000000..644320f4f0 --- /dev/null +++ b/changelog.d/1343.misc.rst @@ -0,0 +1,4 @@ +The ``setuptools`` specific ``long_description_content_type``, +``project_urls`` and ``provides_extras`` fields are now set +consistently after any ``distutils`` ``setup_keywords`` calls, +allowing them to override values. diff --git a/setuptools/dist.py b/setuptools/dist.py index 321ab6b7d7..6ee4a97f3e 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -328,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): @@ -353,25 +359,29 @@ def __init__(self, attrs=None): 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 :) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 17ac09c8f1..91471306e3 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,8 @@ import contextlib import pytest from distutils.errors import DistutilsOptionError, DistutilsFileError -from setuptools.dist import Distribution +from mock import patch +from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration @@ -598,3 +599,43 @@ def test_entry_points(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.entry_points == expected + +saved_dist_init = _Distribution.__init__ +class TestExternalSetters: + # During creation of the setuptools Distribution() object, we call + # the init of the parent distutils Distribution object via + # _Distribution.__init__ (). + # + # It's possible distutils calls out to various keyword + # implementations (i.e. distutils.setup_keywords entry points) + # that may set a range of variables. + # + # This wraps distutil's Distribution.__init__ and simulates + # pbr or something else setting these values. + def _fake_distribution_init(self, dist, attrs): + saved_dist_init(dist, attrs) + # see self._DISTUTUILS_UNSUPPORTED_METADATA + setattr(dist.metadata, 'long_description_content_type', + 'text/something') + # Test overwrite setup() args + setattr(dist.metadata, 'project_urls', { + 'Link One': 'https://example.com/one/', + 'Link Two': 'https://example.com/two/', + }) + return None + + @patch.object(_Distribution, '__init__', autospec=True) + def test_external_setters(self, mock_parent_init, tmpdir): + mock_parent_init.side_effect = self._fake_distribution_init + + dist = Distribution(attrs={ + 'project_urls': { + 'will_be': 'ignored' + } + }) + + assert dist.metadata.long_description_content_type == 'text/something' + assert dist.metadata.project_urls == { + 'Link One': 'https://example.com/one/', + 'Link Two': 'https://example.com/two/', + } From c608faf8336bcb94624545e6c07a702afcb92b2d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 May 2018 18:00:50 -0400 Subject: [PATCH 7021/8469] Tests in test_egg_info no longer invoke 'setup.py install', but instead focus on the behavior in egg_info as the namesake suggests. --- setuptools/tests/test_egg_info.py | 50 +++++++------------------------ 1 file changed, 11 insertions(+), 39 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4397d06451..8b3b90f77f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -128,11 +128,11 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): self._validate_content_order(content, expected_order) - def test_egg_base_installed_egg_info(self, tmpdir_cwd, env): + def test_expected_files_produced(self, tmpdir_cwd, env): self._create_project() - self._run_install_command(tmpdir_cwd, env) - actual = self._find_egg_info_files(env.paths['lib']) + self._run_egg_info_command(tmpdir_cwd, env) + actual = os.listdir('foo.egg-info') expected = [ 'PKG-INFO', @@ -154,8 +154,8 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): 'usage.rst': "Run 'hi'", } }) - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base + self._run_egg_info_command(tmpdir_cwd, env) + egg_info_dir = os.path.join('.', 'foo.egg-info') sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') with open(sources_txt) as f: assert 'docs/usage.rst' in f.read().split('\n') @@ -394,7 +394,7 @@ def test_requires( self, tmpdir_cwd, env, requires, use_setup_cfg, expected_requires, install_cmd_kwargs): self._setup_script_with_requires(requires, use_setup_cfg) - self._run_install_command(tmpdir_cwd, env, **install_cmd_kwargs) + self._run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) egg_info_dir = os.path.join('.', 'foo.egg-info') requires_txt = os.path.join(egg_info_dir, 'requires.txt') if os.path.exists(requires_txt): @@ -414,14 +414,14 @@ def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): req = 'install_requires={"fake-factory==0.5.2", "pytz"}' self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_install_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_install_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): @@ -429,7 +429,7 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_install_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_provides_extra(self, tmpdir_cwd, env): @@ -541,15 +541,6 @@ def test_python_requires_egg_info(self, tmpdir_cwd, env): assert 'Requires-Python: >=2.7.12' in pkg_info_lines assert 'Metadata-Version: 1.2' in pkg_info_lines - def test_python_requires_install(self, tmpdir_cwd, env): - self._setup_script_with_requires( - """python_requires='>=1.2.3',""") - self._run_install_command(tmpdir_cwd, env) - egg_info_dir = self._find_egg_info_files(env.paths['lib']).base - pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') - with open(pkginfo) as f: - assert 'Requires-Python: >=1.2.3' in f.read().split('\n') - def test_manifest_maker_warning_suppression(self): fixtures = [ "standard file not found: should have one of foo.py, bar.py", @@ -559,17 +550,13 @@ def test_manifest_maker_warning_suppression(self): for msg in fixtures: assert manifest_maker._should_suppress_warning(msg) - def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): + def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], ) if cmd is None: cmd = [ - 'install', - '--home', env.paths['home'], - '--install-lib', env.paths['lib'], - '--install-scripts', env.paths['scripts'], - '--install-data', env.paths['data'], + 'egg_info', ] code, data = environment.run_setup_py( cmd=cmd, @@ -581,18 +568,3 @@ def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): raise AssertionError(data) if output: assert output in data - - def _find_egg_info_files(self, root): - class DirList(list): - def __init__(self, files, base): - super(DirList, self).__init__(files) - self.base = base - - results = ( - DirList(filenames, dirpath) - for dirpath, dirnames, filenames in os.walk(root) - if os.path.basename(dirpath) == 'EGG-INFO' - ) - # expect exactly one result - result, = results - return result From 736ed24e9dbf4528f7b3aa531d8d418b648f98a6 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Wed, 16 May 2018 18:00:44 -0400 Subject: [PATCH 7022/8469] Add tests for PEP 425 support --- changelog.d/1369.misc.rst | 1 + setuptools/tests/test_glibc.py | 37 +++++++ setuptools/tests/test_pep425tags.py | 164 ++++++++++++++++++++++++++++ 3 files changed, 202 insertions(+) create mode 100644 changelog.d/1369.misc.rst create mode 100644 setuptools/tests/test_glibc.py create mode 100644 setuptools/tests/test_pep425tags.py diff --git a/changelog.d/1369.misc.rst b/changelog.d/1369.misc.rst new file mode 100644 index 0000000000..d1803f23de --- /dev/null +++ b/changelog.d/1369.misc.rst @@ -0,0 +1 @@ +Added unit tests for PEP 425 compatibility tags support. diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py new file mode 100644 index 0000000000..9cb9796482 --- /dev/null +++ b/setuptools/tests/test_glibc.py @@ -0,0 +1,37 @@ +import warnings + +from setuptools.glibc import check_glibc_version + + +class TestGlibc(object): + def test_manylinux1_check_glibc_version(self): + """ + Test that the check_glibc_version function is robust against weird + glibc version strings. + """ + for two_twenty in ["2.20", + # used by "linaro glibc", see gh-3588 + "2.20-2014.11", + # weird possibilities that I just made up + "2.20+dev", + "2.20-custom", + "2.20.1", + ]: + assert check_glibc_version(two_twenty, 2, 15) + assert check_glibc_version(two_twenty, 2, 20) + assert not check_glibc_version(two_twenty, 2, 21) + assert not check_glibc_version(two_twenty, 3, 15) + assert not check_glibc_version(two_twenty, 1, 15) + + # For strings that we just can't parse at all, we should warn and + # return false + for bad_string in ["asdf", "", "foo.bar"]: + with warnings.catch_warnings(record=True) as ws: + warnings.filterwarnings("always") + assert not check_glibc_version(bad_string, 2, 5) + for w in ws: + if "Expected glibc version with" in str(w.message): + break + else: + # Didn't find the warning we were expecting + assert False diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py new file mode 100644 index 0000000000..0f60e0ede4 --- /dev/null +++ b/setuptools/tests/test_pep425tags.py @@ -0,0 +1,164 @@ +import sys + +from mock import patch + +from setuptools import pep425tags + + +class TestPEP425Tags(object): + + def mock_get_config_var(self, **kwd): + """ + Patch sysconfig.get_config_var for arbitrary keys. + """ + get_config_var = pep425tags.sysconfig.get_config_var + + def _mock_get_config_var(var): + if var in kwd: + return kwd[var] + return get_config_var(var) + return _mock_get_config_var + + def abi_tag_unicode(self, flags, config_vars): + """ + Used to test ABI tags, verify correct use of the `u` flag + """ + config_vars.update({'SOABI': None}) + base = pep425tags.get_abbr_impl() + pep425tags.get_impl_ver() + + if sys.version_info < (3, 3): + config_vars.update({'Py_UNICODE_SIZE': 2}) + mock_gcf = self.mock_get_config_var(**config_vars) + with patch('setuptools.pep425tags.sysconfig.get_config_var', mock_gcf): + abi_tag = pep425tags.get_abi_tag() + assert abi_tag == base + flags + + config_vars.update({'Py_UNICODE_SIZE': 4}) + mock_gcf = self.mock_get_config_var(**config_vars) + with patch('setuptools.pep425tags.sysconfig.get_config_var', + mock_gcf): + abi_tag = pep425tags.get_abi_tag() + assert abi_tag == base + flags + 'u' + + else: + # On Python >= 3.3, UCS-4 is essentially permanently enabled, and + # Py_UNICODE_SIZE is None. SOABI on these builds does not include + # the 'u' so manual SOABI detection should not do so either. + config_vars.update({'Py_UNICODE_SIZE': None}) + mock_gcf = self.mock_get_config_var(**config_vars) + with patch('setuptools.pep425tags.sysconfig.get_config_var', + mock_gcf): + abi_tag = pep425tags.get_abi_tag() + assert abi_tag == base + flags + + def test_broken_sysconfig(self): + """ + Test that pep425tags still works when sysconfig is broken. + Can be a problem on Python 2.7 + Issue #1074. + """ + def raises_ioerror(var): + raise IOError("I have the wrong path!") + + with patch('setuptools.pep425tags.sysconfig.get_config_var', + raises_ioerror): + assert len(pep425tags.get_supported()) + + def test_no_hyphen_tag(self): + """ + Test that no tag contains a hyphen. + """ + mock_gcf = self.mock_get_config_var(SOABI='cpython-35m-darwin') + + with patch('setuptools.pep425tags.sysconfig.get_config_var', + mock_gcf): + supported = pep425tags.get_supported() + + for (py, abi, plat) in supported: + assert '-' not in py + assert '-' not in abi + assert '-' not in plat + + def test_manual_abi_noflags(self): + """ + Test that no flags are set on a non-PyDebug, non-Pymalloc ABI tag. + """ + self.abi_tag_unicode('', {'Py_DEBUG': False, 'WITH_PYMALLOC': False}) + + def test_manual_abi_d_flag(self): + """ + Test that the `d` flag is set on a PyDebug, non-Pymalloc ABI tag. + """ + self.abi_tag_unicode('d', {'Py_DEBUG': True, 'WITH_PYMALLOC': False}) + + def test_manual_abi_m_flag(self): + """ + Test that the `m` flag is set on a non-PyDebug, Pymalloc ABI tag. + """ + self.abi_tag_unicode('m', {'Py_DEBUG': False, 'WITH_PYMALLOC': True}) + + def test_manual_abi_dm_flags(self): + """ + Test that the `dm` flags are set on a PyDebug, Pymalloc ABI tag. + """ + self.abi_tag_unicode('dm', {'Py_DEBUG': True, 'WITH_PYMALLOC': True}) + + +class TestManylinux1Tags(object): + + @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') + @patch('setuptools.glibc.have_compatible_glibc', + lambda major, minor: True) + def test_manylinux1_compatible_on_linux_x86_64(self): + """ + Test that manylinux1 is enabled on linux_x86_64 + """ + assert pep425tags.is_manylinux1_compatible() + + @patch('setuptools.pep425tags.get_platform', lambda: 'linux_i686') + @patch('setuptools.glibc.have_compatible_glibc', + lambda major, minor: True) + def test_manylinux1_compatible_on_linux_i686(self): + """ + Test that manylinux1 is enabled on linux_i686 + """ + assert pep425tags.is_manylinux1_compatible() + + @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') + @patch('setuptools.glibc.have_compatible_glibc', + lambda major, minor: False) + def test_manylinux1_2(self): + """ + Test that manylinux1 is disabled with incompatible glibc + """ + assert not pep425tags.is_manylinux1_compatible() + + @patch('setuptools.pep425tags.get_platform', lambda: 'arm6vl') + @patch('setuptools.glibc.have_compatible_glibc', + lambda major, minor: True) + def test_manylinux1_3(self): + """ + Test that manylinux1 is disabled on arm6vl + """ + assert not pep425tags.is_manylinux1_compatible() + + @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') + @patch('setuptools.glibc.have_compatible_glibc', + lambda major, minor: True) + @patch('sys.platform', 'linux2') + def test_manylinux1_tag_is_first(self): + """ + Test that the more specific tag manylinux1 comes first. + """ + groups = {} + for pyimpl, abi, arch in pep425tags.get_supported(): + groups.setdefault((pyimpl, abi), []).append(arch) + + for arches in groups.values(): + if arches == ['any']: + continue + # Expect the most specific arch first: + if len(arches) == 3: + assert arches == ['manylinux1_x86_64', 'linux_x86_64', 'any'] + else: + assert arches == ['manylinux1_x86_64', 'linux_x86_64'] From 114bb58167d4f6462e0b7d69a46233b796840ba8 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Thu, 17 May 2018 10:42:53 -0400 Subject: [PATCH 7023/8469] Stop testing Python 3.3 in Travis --- .travis.yml | 3 +-- changelog.d/1372.misc.rst | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1372.misc.rst diff --git a/.travis.yml b/.travis.yml index 9f09c0faa7..63d0333ae6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ sudo: false language: python python: - &latest_py2 2.7 -- 3.3 - 3.4 - 3.5 - &latest_py3 3.6 @@ -43,7 +42,7 @@ install: # ensure we have recent pip/setuptools - pip install --upgrade pip setuptools # need tox to get started -- pip install tox 'tox-venv; python_version!="3.3"' +- pip install tox tox-venv # Output the env, to verify behavior - env diff --git a/changelog.d/1372.misc.rst b/changelog.d/1372.misc.rst new file mode 100644 index 0000000000..d1bc789bb1 --- /dev/null +++ b/changelog.d/1372.misc.rst @@ -0,0 +1,2 @@ +Stop testing Python 3.3 in Travis CI, now that the latest version of +``wheel`` no longer installs on it. From 37978a703cf4d306a3e0426d9dabfa1fb04e36d1 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Thu, 17 May 2018 14:18:03 -0400 Subject: [PATCH 7024/8469] Update release process docs --- changelog.d/1352.misc.rst | 1 + changelog.d/1353.doc.rst | 1 + changelog.d/1356.doc.rst | 1 + changelog.d/1376.doc.rst | 1 + docs/releases.txt | 37 ++++++++++++++++++++++++------------- towncrier_template.rst | 1 - 6 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 changelog.d/1352.misc.rst create mode 100644 changelog.d/1353.doc.rst create mode 100644 changelog.d/1356.doc.rst create mode 100644 changelog.d/1376.doc.rst diff --git a/changelog.d/1352.misc.rst b/changelog.d/1352.misc.rst new file mode 100644 index 0000000000..331ce47b2b --- /dev/null +++ b/changelog.d/1352.misc.rst @@ -0,0 +1 @@ +Added ``tox`` environment for documentation builds. diff --git a/changelog.d/1353.doc.rst b/changelog.d/1353.doc.rst new file mode 100644 index 0000000000..f23fec8f9c --- /dev/null +++ b/changelog.d/1353.doc.rst @@ -0,0 +1 @@ +Added coverage badge to README. diff --git a/changelog.d/1356.doc.rst b/changelog.d/1356.doc.rst new file mode 100644 index 0000000000..7ea0e8303e --- /dev/null +++ b/changelog.d/1356.doc.rst @@ -0,0 +1 @@ +Made small fixes to the developer guide documentation. diff --git a/changelog.d/1376.doc.rst b/changelog.d/1376.doc.rst new file mode 100644 index 0000000000..c2dcacdaab --- /dev/null +++ b/changelog.d/1376.doc.rst @@ -0,0 +1 @@ +Updated release process docs. diff --git a/docs/releases.txt b/docs/releases.txt index 30ea084fec..234f69eeb9 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -7,20 +7,31 @@ mechanical technique for releases, enacted by Travis following a successful build of a tagged release per `PyPI deployment `_. -Prior to cutting a release, please check that the CHANGES.rst reflects -the summary of changes since the last release. -Ideally, these changelog entries would have been added -along with the changes, but it's always good to check. -Think about it from the -perspective of a user not involved with the development--what would -that person want to know about what has changed--or from the -perspective of your future self wanting to know when a particular -change landed. - -To cut a release, install and run ``bump2version {part}`` where ``part`` +Prior to cutting a release, please use `towncrier`_ to update +``CHANGES.rst`` to summarize the changes since the last release. +To update the changelog: + +1. Install towncrier via ``pip install towncrier`` if not already installed. +2. Preview the new ``CHANGES.rst`` entry by running + ``towncrier --draft --version {new.version.number}`` (enter the desired + version number for the next release). If any changes are needed, make + them and generate a new preview until the output is acceptable. Run + ``git add`` for any modified files. +3. Run ``towncrier --version {new.version.number}`` to stage the changelog + updates in git. + +Once the changelog edits are staged and ready to commit, cut a release by +installing and running ``bump2version {part}`` where ``part`` is major, minor, or patch based on the scope of the changes in the -release. Then, push the commits to the master branch. If tests pass, -the release will be uploaded to PyPI (from the Python 3.6 tests). +release. Then, push the commits to the master branch:: + + $ git push origin master + $ git push --tags + +If tests pass, the release will be uploaded to PyPI (from the Python 3.6 +tests). + +.. _towncrier: https://pypi.org/project/towncrier/ Release Frequency ----------------- diff --git a/towncrier_template.rst b/towncrier_template.rst index 02b2882bb1..9c23b9775f 100644 --- a/towncrier_template.rst +++ b/towncrier_template.rst @@ -8,7 +8,6 @@ {% for text, values in sections[section][category].items() %} * {{ values|join(', ') }}: {{ text }} {% endfor %} - {% else %} * {{ sections[section][category]['']|join(', ') }} From 6d07df7536d3799fafa2877f1b02ccfc0378658c Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Sat, 19 May 2018 15:06:49 -0400 Subject: [PATCH 7025/8469] =?UTF-8?q?Bump=20version:=2039.1.0=20=E2=86=92?= =?UTF-8?q?=2039.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 26 ++++++++++++++++++++++++++ changelog.d/1343.misc.rst | 4 ---- changelog.d/1352.misc.rst | 1 - changelog.d/1353.doc.rst | 1 - changelog.d/1354.misc.rst | 1 - changelog.d/1355.misc.rst | 1 - changelog.d/1356.doc.rst | 1 - changelog.d/1357.doc.rst | 1 - changelog.d/1359.change.rst | 2 -- changelog.d/1360.change.rst | 1 - changelog.d/1365.change.rst | 2 -- changelog.d/1368.misc.rst | 1 - changelog.d/1369.misc.rst | 1 - changelog.d/1372.misc.rst | 2 -- changelog.d/1376.doc.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 17 files changed, 28 insertions(+), 22 deletions(-) delete mode 100644 changelog.d/1343.misc.rst delete mode 100644 changelog.d/1352.misc.rst delete mode 100644 changelog.d/1353.doc.rst delete mode 100644 changelog.d/1354.misc.rst delete mode 100644 changelog.d/1355.misc.rst delete mode 100644 changelog.d/1356.doc.rst delete mode 100644 changelog.d/1357.doc.rst delete mode 100644 changelog.d/1359.change.rst delete mode 100644 changelog.d/1360.change.rst delete mode 100644 changelog.d/1365.change.rst delete mode 100644 changelog.d/1368.misc.rst delete mode 100644 changelog.d/1369.misc.rst delete mode 100644 changelog.d/1372.misc.rst delete mode 100644 changelog.d/1376.doc.rst diff --git a/CHANGES.rst b/CHANGES.rst index d8b5b49147..d3d661cc3e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,29 @@ +v39.2.0 +------- + +* #1359: Support using "file:" to load a PEP 440-compliant package version from + a text file. +* #1360: Fixed issue with a mismatch between the name of the package and the + name of the .dist-info file in wheel files +* #1365: Take the package_dir option into account when loading the version from + a module attribute. +* #1353: Added coverage badge to README. +* #1356: Made small fixes to the developer guide documentation. +* #1357: Fixed warnings in documentation builds and started enforcing that the + docs build without warnings in tox. +* #1376: Updated release process docs. +* #1343: The ``setuptools`` specific ``long_description_content_type``, + ``project_urls`` and ``provides_extras`` fields are now set consistently + after any ``distutils`` ``setup_keywords`` calls, allowing them to override + values. +* #1352: Added ``tox`` environment for documentation builds. +* #1354: Added ``towncrier`` for changelog managment. +* #1355: Add PR template. +* #1368: Fixed tests which failed without network connectivity. +* #1369: Added unit tests for PEP 425 compatibility tags support. +* #1372: Stop testing Python 3.3 in Travis CI, now that the latest version of + ``wheel`` no longer installs on it. + v39.1.0 ------- diff --git a/changelog.d/1343.misc.rst b/changelog.d/1343.misc.rst deleted file mode 100644 index 644320f4f0..0000000000 --- a/changelog.d/1343.misc.rst +++ /dev/null @@ -1,4 +0,0 @@ -The ``setuptools`` specific ``long_description_content_type``, -``project_urls`` and ``provides_extras`` fields are now set -consistently after any ``distutils`` ``setup_keywords`` calls, -allowing them to override values. diff --git a/changelog.d/1352.misc.rst b/changelog.d/1352.misc.rst deleted file mode 100644 index 331ce47b2b..0000000000 --- a/changelog.d/1352.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added ``tox`` environment for documentation builds. diff --git a/changelog.d/1353.doc.rst b/changelog.d/1353.doc.rst deleted file mode 100644 index f23fec8f9c..0000000000 --- a/changelog.d/1353.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added coverage badge to README. diff --git a/changelog.d/1354.misc.rst b/changelog.d/1354.misc.rst deleted file mode 100644 index 7f9b80c95b..0000000000 --- a/changelog.d/1354.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added ``towncrier`` for changelog managment. diff --git a/changelog.d/1355.misc.rst b/changelog.d/1355.misc.rst deleted file mode 100644 index af1e3f3f1c..0000000000 --- a/changelog.d/1355.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Add PR template. diff --git a/changelog.d/1356.doc.rst b/changelog.d/1356.doc.rst deleted file mode 100644 index 7ea0e8303e..0000000000 --- a/changelog.d/1356.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Made small fixes to the developer guide documentation. diff --git a/changelog.d/1357.doc.rst b/changelog.d/1357.doc.rst deleted file mode 100644 index 11d97cc707..0000000000 --- a/changelog.d/1357.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed warnings in documentation builds and started enforcing that the docs build without warnings in tox. diff --git a/changelog.d/1359.change.rst b/changelog.d/1359.change.rst deleted file mode 100644 index 05746e737f..0000000000 --- a/changelog.d/1359.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Support using "file:" to load a PEP 440-compliant package version -from a text file. diff --git a/changelog.d/1360.change.rst b/changelog.d/1360.change.rst deleted file mode 100644 index 36f40483b3..0000000000 --- a/changelog.d/1360.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed issue with a mismatch between the name of the package and the name of the .dist-info file in wheel files diff --git a/changelog.d/1365.change.rst b/changelog.d/1365.change.rst deleted file mode 100644 index 63eb008b80..0000000000 --- a/changelog.d/1365.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Take the package_dir option into account when loading the version from a -module attribute. diff --git a/changelog.d/1368.misc.rst b/changelog.d/1368.misc.rst deleted file mode 100644 index 289e6a6875..0000000000 --- a/changelog.d/1368.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed tests which failed without network connectivity. diff --git a/changelog.d/1369.misc.rst b/changelog.d/1369.misc.rst deleted file mode 100644 index d1803f23de..0000000000 --- a/changelog.d/1369.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added unit tests for PEP 425 compatibility tags support. diff --git a/changelog.d/1372.misc.rst b/changelog.d/1372.misc.rst deleted file mode 100644 index d1bc789bb1..0000000000 --- a/changelog.d/1372.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Stop testing Python 3.3 in Travis CI, now that the latest version of -``wheel`` no longer installs on it. diff --git a/changelog.d/1376.doc.rst b/changelog.d/1376.doc.rst deleted file mode 100644 index c2dcacdaab..0000000000 --- a/changelog.d/1376.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Updated release process docs. diff --git a/setup.cfg b/setup.cfg index 2c84f0b763..e23ee6f041 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 39.1.0 +current_version = 39.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index b08552d437..b122df82f3 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="39.1.0", + version="39.2.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 341bbf4d0a8a6674255517a5145aecf7e3957c15 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Sat, 19 May 2018 15:37:39 -0400 Subject: [PATCH 7026/8469] Make minor fixes to release docs --- CHANGES.rst | 2 ++ changelog.d/1364.rst | 1 - changelog.d/1379.doc.rst | 1 + docs/releases.txt | 6 +++++- 4 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/1364.rst create mode 100644 changelog.d/1379.doc.rst diff --git a/CHANGES.rst b/CHANGES.rst index d3d661cc3e..156ba47d51 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ v39.2.0 a text file. * #1360: Fixed issue with a mismatch between the name of the package and the name of the .dist-info file in wheel files +* #1364: Add `__dir__()` implementation to `pkg_resources.Distribution()` that + includes the attributes in the `_provider` instance variable. * #1365: Take the package_dir option into account when loading the version from a module attribute. * #1353: Added coverage badge to README. diff --git a/changelog.d/1364.rst b/changelog.d/1364.rst deleted file mode 100644 index f7b4c01296..0000000000 --- a/changelog.d/1364.rst +++ /dev/null @@ -1 +0,0 @@ -Add `__dir__()` implementation to `pkg_resources.Distribution()` that includes the attributes in the `_provider` instance variable. \ No newline at end of file diff --git a/changelog.d/1379.doc.rst b/changelog.d/1379.doc.rst new file mode 100644 index 0000000000..ca017719e5 --- /dev/null +++ b/changelog.d/1379.doc.rst @@ -0,0 +1 @@ +Minor doc fixes after actually using the new release process. diff --git a/docs/releases.txt b/docs/releases.txt index 234f69eeb9..98ba39e88d 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -19,9 +19,13 @@ To update the changelog: ``git add`` for any modified files. 3. Run ``towncrier --version {new.version.number}`` to stage the changelog updates in git. +4. Verify that there are no remaining ``changelog.d/*.rst`` files. If a + file was named incorrectly, it may be ignored by towncrier. +5. Review the updated ``CHANGES.rst`` file. If any changes are needed, + make the edits and stage them via ``git add CHANGES.rst``. Once the changelog edits are staged and ready to commit, cut a release by -installing and running ``bump2version {part}`` where ``part`` +installing and running ``bump2version --allow-dirty {part}`` where ``part`` is major, minor, or patch based on the scope of the changes in the release. Then, push the commits to the master branch:: From e078d78a439591fd7028cf80ca0b7c12ae013d4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 May 2018 09:31:11 -0400 Subject: [PATCH 7027/8469] Add reference to Setuptools Developers team for clarity of maintenance and removed reference to Jason as maintainer. --- README.rst | 4 +++- docs/history.txt | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 2c008cc6e3..8505c5517f 100755 --- a/README.rst +++ b/README.rst @@ -20,7 +20,9 @@ See the `Installation Instructions User's Guide for instructions on installing, upgrading, and uninstalling Setuptools. -The project is `maintained at GitHub `_. +The project is `maintained at GitHub `_ +by the `Setuptools Developers +`_. Questions and comments should be directed to the `distutils-sig mailing list `_. diff --git a/docs/history.txt b/docs/history.txt index 8fd1dc6538..385cfa7eda 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -40,7 +40,6 @@ Credits re-invigorated the community on the project, encouraged renewed innovation, and addressed many defects. -* Since the merge with Distribute, Jason R. Coombs is the - maintainer of setuptools. The project is maintained in coordination with - the Python Packaging Authority (PyPA) and the larger Python community. - +* Jason R. Coombs performed the merge with Distribute, maintaining the + project for several years in coordination with the Python Packaging + Authority (PyPA). From 7392f01ffced3acfdef25b0b2d55cefdc6ee468a Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 26 Apr 2018 18:06:09 +0300 Subject: [PATCH 7028/8469] Drop support for EOL Python 3.3 --- docs/easy_install.txt | 2 +- pkg_resources/__init__.py | 6 +++--- pkg_resources/extern/__init__.py | 2 +- pkg_resources/py31compat.py | 3 +-- pkg_resources/tests/test_resources.py | 6 +++--- setup.py | 3 +-- setuptools/command/bdist_egg.py | 2 +- setuptools/command/build_ext.py | 12 +----------- setuptools/extern/__init__.py | 2 +- setuptools/monkey.py | 2 -- setuptools/pep425tags.py | 4 ++-- setuptools/site-patch.py | 2 +- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_egg_info.py | 2 +- setuptools/tests/test_install_scripts.py | 2 +- tox.ini | 2 +- 16 files changed, 20 insertions(+), 34 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 5c99234361..f426b6ffd5 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -35,7 +35,7 @@ Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. -You will need at least Python 3.3 or 2.7. An ``easy_install`` script will be +You will need at least Python 3.4 or 2.7. An ``easy_install`` script will be installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4e4409b32b..91d00483b1 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -78,8 +78,8 @@ __import__('pkg_resources.extern.packaging.markers') -if (3, 0) < sys.version_info < (3, 3): - raise RuntimeError("Python 3.3 or later is required") +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 @@ -959,7 +959,7 @@ def __init__( `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 diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index b4156fec20..dfde433dc2 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -48,7 +48,7 @@ def load_module(self, fullname): # 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.major >= 3: del sys.modules[extant] return mod except ImportError: diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index 331a51bb0f..fd4b6fd088 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -15,8 +15,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 + sys.version_info.major == 2 or (3, 4) <= sys.version_info < (3, 4, 1) ) makedirs = _makedirs_31 if needs_makedirs else os.makedirs diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 04d02c1f61..171ba2f96f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -668,7 +668,7 @@ def test_requirements_with_markers(self): assert ( Requirement.parse("name==1.1;python_version=='2.7'") != - Requirement.parse("name==1.1;python_version=='3.3'") + Requirement.parse("name==1.1;python_version=='3.6'") ) assert ( Requirement.parse("name==1.0;python_version=='2.7'") @@ -676,9 +676,9 @@ def test_requirements_with_markers(self): Requirement.parse("name==1.2;python_version=='2.7'") ) assert ( - Requirement.parse("name[foo]==1.0;python_version=='3.3'") + Requirement.parse("name[foo]==1.0;python_version=='3.6'") != - Requirement.parse("name[foo,bar]==1.0;python_version=='3.3'") + Requirement.parse("name[foo,bar]==1.0;python_version=='3.6'") ) def test_local_version(self): diff --git a/setup.py b/setup.py index b122df82f3..22c26dd2d8 100755 --- a/setup.py +++ b/setup.py @@ -161,7 +161,6 @@ def pypi_link(pkg_filename): 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 @@ -170,7 +169,7 @@ def pypi_link(pkg_filename): Topic :: System :: Systems Administration Topic :: Utilities """).strip().splitlines(), - python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*', + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', extras_require={ "ssl:sys_platform=='win32'": "wincertstore==0.2", "certs": "certifi==2016.9.26", diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 423b818765..14530729b9 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -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 sys.version_info.major == 2: skip = 8 # skip magic & date elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index ea97b37b2c..60a8a32f08 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -112,7 +112,7 @@ def get_ext_filename(self, fullname): 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 @@ def link_shared_object( 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) diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index da3d668d99..52785a0328 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -48,7 +48,7 @@ def load_module(self, fullname): # 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.major >= 3: del sys.modules[extant] return mod except ImportError: diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 08ed50d9ec..05a738b055 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -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) diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py index 3bdd3285a5..a86a0d183e 100644 --- a/setuptools/pep425tags.py +++ b/setuptools/pep425tags.py @@ -97,8 +97,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): + sys.version_info.major == 2)) \ + and sys.version_info.major == 2: u = 'u' abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u) elif soabi and soabi.startswith('cpython-'): diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 0d2d2ff8da..40b00de0a7 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -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 diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 57339c8a12..3fc7fdaf30 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -688,7 +688,7 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', ) class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' - exe_with_spaces = r'C:\Program Files\Python33\python.exe' + exe_with_spaces = r'C:\Program Files\Python36\python.exe' def test_get_script_header(self): expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable)) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 8b3b90f77f..a70a93a8a7 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -452,7 +452,7 @@ def test_provides_extra(self, tmpdir_cwd, env): def test_doesnt_provides_extra(self, tmpdir_cwd, env): self._setup_script_with_requires( - '''install_requires=["spam ; python_version<'3.3'"]''') + '''install_requires=["spam ; python_version<'3.6'"]''') environ = os.environ.copy().update( HOME=env.paths['home'], ) diff --git a/setuptools/tests/test_install_scripts.py b/setuptools/tests/test_install_scripts.py index 7393241f84..727ad65b13 100644 --- a/setuptools/tests/test_install_scripts.py +++ b/setuptools/tests/test_install_scripts.py @@ -19,7 +19,7 @@ class TestInstallScripts: ) unix_exe = '/usr/dummy-test-path/local/bin/python' unix_spaces_exe = '/usr/bin/env dummy-test-python' - win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.3\\python.exe' + win32_exe = 'C:\\Dummy Test Path\\Program Files\\Python 3.6\\python.exe' def _run_install_scripts(self, install_dir, executable=None): dist = Distribution(self.settings) diff --git a/tox.ini b/tox.ini index a16e89faa7..1a369653fc 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # # To run Tox against all supported Python interpreters, you can set: # -# export TOXENV='py27,py3{3,4,5,6},pypy,pypy3' +# export TOXENV='py27,py3{4,5,6},pypy,pypy3' [tox] envlist=python From ca7aa27ceb9370dabbca21b55d6410bb1101f8f0 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 26 Apr 2018 18:14:38 +0300 Subject: [PATCH 7029/8469] Remove redundant Python 3.1 code --- setuptools/command/easy_install.py | 3 ++- setuptools/py31compat.py | 14 -------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 85ee40f1d5..a059a0bdd1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,12 +40,13 @@ 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 diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 4ea953201f..12895cd868 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -1,17 +1,3 @@ -__all__ = ['get_config_vars', 'get_path'] - -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') - - try: # Python >=3.2 from tempfile import TemporaryDirectory From 88ae237911346d74c1c8a51a11dd47b486f3b4c5 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 26 Apr 2018 21:20:42 +0300 Subject: [PATCH 7030/8469] Make it clear this compat module provides no public members --- setuptools/py31compat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 12895cd868..3aecf74e93 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -1,3 +1,5 @@ +__all__ = [] + try: # Python >=3.2 from tempfile import TemporaryDirectory From a23faf97bbe7f58e3fd8d9cf290170b58bda9565 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 17 May 2018 11:33:29 -0400 Subject: [PATCH 7031/8469] Add changelog entry for dropping 3.3 support --- changelog.d/1342.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1342.breaking.rst diff --git a/changelog.d/1342.breaking.rst b/changelog.d/1342.breaking.rst new file mode 100644 index 0000000000..9756e313dd --- /dev/null +++ b/changelog.d/1342.breaking.rst @@ -0,0 +1 @@ +Drop support for Python 3.3. From c9f21d7698ea2c3510ae99f27574b660445d95f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jun 2018 15:51:41 -0400 Subject: [PATCH 7032/8469] Remove documentation about non-package data files that's no longer relevant without eggs. Fixes #1385. --- docs/setuptools.txt | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f7b9351b78..4d9278e318 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -970,35 +970,14 @@ a quick example of converting code that uses ``__file__`` to use Non-Package Data Files ---------------------- -The ``distutils`` normally install general "data files" to a platform-specific -location (e.g. ``/usr/share``). This feature intended to be used for things -like documentation, example configuration files, and the like. ``setuptools`` -does not install these data files in a separate location, however. They are -bundled inside the egg file or directory, alongside the Python modules and -packages. The data files can also be accessed using the :ref:`ResourceManager -API`, by specifying a ``Requirement`` instead of a package name:: - - from pkg_resources import Requirement, resource_filename - filename = resource_filename(Requirement.parse("MyProject"),"sample.conf") - -The above code will obtain the filename of the "sample.conf" file in the data -root of the "MyProject" distribution. - -Note, by the way, that this encapsulation of data files means that you can't -actually install data files to some arbitrary location on a user's machine; -this is a feature, not a bug. You can always include a script in your -distribution that extracts and copies your the documentation or data files to -a user-specified location, at their discretion. If you put related data files -in a single directory, you can use ``resource_filename()`` with the directory -name to get a filesystem directory that then can be copied with the ``shutil`` -module. (Even if your package is installed as a zipfile, calling -``resource_filename()`` on a directory will return an actual filesystem -directory, whose contents will be that entire subtree of your distribution.) - -(Of course, if you're writing a new package, you can just as easily place your -data files or directories inside one of your packages, rather than using the -distutils' approach. However, if you're updating an existing application, it -may be simpler not to change the way it currently specifies these data files.) +Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data +files from the distribution into the egg (see `this reference +`_). As eggs are deprecated and pip-based installs +fall back to the platform-specific location for installing data files, there is +no supported facility to reliably retrieve these resources. + +Instead, the PyPA recommends that any data files you wish to be accessible at +run time be included in the package. Automatic Resource Extraction From 097e031561aecc7af929768e63719a359fdd450b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Jun 2018 15:53:59 -0400 Subject: [PATCH 7033/8469] Add changelog entry and include the final unsaved edit to setuptools.txt. Ref #1385. --- changelog.d/1385.doc.rst | 1 + docs/setuptools.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1385.doc.rst diff --git a/changelog.d/1385.doc.rst b/changelog.d/1385.doc.rst new file mode 100644 index 0000000000..7bd88e8f21 --- /dev/null +++ b/changelog.d/1385.doc.rst @@ -0,0 +1 @@ +Removed section on non-package data files. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 4d9278e318..c82dc51133 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -971,7 +971,7 @@ Non-Package Data Files ---------------------- Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data -files from the distribution into the egg (see `this reference +files from the distribution into the egg (see `the old docs `_). As eggs are deprecated and pip-based installs fall back to the platform-specific location for installing data files, there is no supported facility to reliably retrieve these resources. From 885f0b174621be1c040848d141bae732ed06e030 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 08:54:07 -0400 Subject: [PATCH 7034/8469] Feed the hobgoblins (delint). --- setuptools/wheel.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 4a33b20324..e171a97924 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -20,7 +20,7 @@ r"""^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) )\.whl$""", -re.VERBOSE).match + re.VERBOSE).match NAMESPACE_PACKAGE_INIT = '''\ try: @@ -95,16 +95,21 @@ def install_as_egg(self, destination_eggdir): dist_basename = '%s-%s' % (self.project_name, self.version) dist_info = self.get_dist_info(zf) dist_data = '%s.data' % dist_basename + 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') - 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) + 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) @@ -114,8 +119,9 @@ def get_metadata(name): destination_eggdir, dist_info, metadata=PathMetadata(destination_eggdir, dist_info) ) - # Note: we need to evaluate and strip markers now, - # as we can't easily convert back from the syntax: + + # 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 @@ -163,13 +169,16 @@ def raw_req(req): if os.path.exists(dist_data): os.rmdir(dist_data) # Fix namespace packages. - namespace_packages = os.path.join(egg_info, 'namespace_packages.txt') + 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): + 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) From c2460c75c3e0aac25387c04d7601959d2b6a3449 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:09:38 -0400 Subject: [PATCH 7035/8469] Extract method to save indentation --- setuptools/wheel.py | 181 ++++++++++++++++++++++---------------------- 1 file changed, 92 insertions(+), 89 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index e171a97924..3065f2a139 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -92,93 +92,96 @@ def get_dist_info(self, zf): 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 = self.get_dist_info(zf) - dist_data = '%s.data' % dist_basename - - 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: 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( - install_requires=install_requires, - extras_require=extras_require, + 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 + + 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: list(sorted( + req + for req in map(raw_req, dist.requires((extra,))) + if req not in install_requires )) - 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) + 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( + 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) From ac3e41e61a72f34a46799f63531465495e3465a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:11:14 -0400 Subject: [PATCH 7036/8469] Use the new breathing room to consolidate lines --- setuptools/wheel.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 3065f2a139..d7ce56bf89 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -107,8 +107,7 @@ def get_metadata(name): # 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') + parse_version('1.0') <= wheel_version < parse_version('2.0dev0') ) if not wheel_v1: raise ValueError( @@ -120,7 +119,7 @@ def get_metadata(name): dist_info = os.path.join(destination_eggdir, dist_info) dist = Distribution.from_location( destination_eggdir, dist_info, - metadata=PathMetadata(destination_eggdir, dist_info) + metadata=PathMetadata(destination_eggdir, dist_info), ) # Note: Evaluate and strip markers now, @@ -180,8 +179,6 @@ def raw_req(req): 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)): + 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) From 169639bd253b55bbc4ef021a666c57b6029d3c5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:12:06 -0400 Subject: [PATCH 7037/8469] Remove redundant 'list' --- setuptools/wheel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index d7ce56bf89..193edafd4c 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -130,11 +130,11 @@ def raw_req(req): return str(req) install_requires = list(sorted(map(raw_req, dist.requires()))) extras_require = { - extra: list(sorted( + extra: 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') From f8d08c3929e7645ba134598793076d2a7d55344c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:15:11 -0400 Subject: [PATCH 7038/8469] Avoid hanging indents --- setuptools/wheel.py | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 193edafd4c..920bb6f0e3 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -64,9 +64,11 @@ def __init__(self, filename): 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?''' @@ -139,20 +141,27 @@ def raw_req(req): } 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( - 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')) + 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') + 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 @@ -160,8 +169,10 @@ def raw_req(req): 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.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) From 19d79d2f9fef6b9e024a1352ed51f9b7d829b768 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:16:44 -0400 Subject: [PATCH 7039/8469] Extract method for fixing namespace packages --- setuptools/wheel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 920bb6f0e3..a64aa5bf4a 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -1,4 +1,4 @@ -'''Wheels support.''' +"""Wheels support.""" from distutils.util import get_platform import email @@ -181,7 +181,10 @@ def raw_req(req): unpack(subdir, destination_eggdir) if os.path.exists(dist_data): os.rmdir(dist_data) - # Fix namespace packages. + self._fix_namespace_packages(egg_info, destination_eggdir) + + @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): From ad676fe418b22c894385f8d1316f2a60d8d1a291 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:18:48 -0400 Subject: [PATCH 7040/8469] Extract method for _move_data_entries --- setuptools/wheel.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index a64aa5bf4a..e3d807c1e5 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -156,7 +156,12 @@ def raw_req(req): None, os.path.join(egg_info, 'requires.txt'), ) - # Move data entries to their correct location. + self._move_data_entries(destination_eggdir, dist_data) + self._fix_namespace_packages(egg_info, destination_eggdir) + + @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): @@ -181,7 +186,6 @@ def raw_req(req): unpack(subdir, destination_eggdir) if os.path.exists(dist_data): os.rmdir(dist_data) - self._fix_namespace_packages(egg_info, destination_eggdir) @staticmethod def _fix_namespace_packages(egg_info, destination_eggdir): From 68f2ffd0bec368c31201a19b326d41dba5b81495 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:28:50 -0400 Subject: [PATCH 7041/8469] Extract _convert_metadata. install_as_egg is almost comprehensible now. --- setuptools/wheel.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index e3d807c1e5..dc03bbc8b4 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -100,11 +100,19 @@ 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')) @@ -139,7 +147,6 @@ def raw_req(req): ) 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'), @@ -156,8 +163,6 @@ def raw_req(req): None, os.path.join(egg_info, 'requires.txt'), ) - self._move_data_entries(destination_eggdir, dist_data) - self._fix_namespace_packages(egg_info, destination_eggdir) @staticmethod def _move_data_entries(destination_eggdir, dist_data): From 7068f1d4c86e6d8e705a2b77da6c5dcf6a8d7bcd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:45:14 -0400 Subject: [PATCH 7042/8469] Split test into two and parameterize --- setuptools/tests/test_glibc.py | 67 ++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py index 9cb9796482..0a7cac0e64 100644 --- a/setuptools/tests/test_glibc.py +++ b/setuptools/tests/test_glibc.py @@ -1,37 +1,50 @@ import warnings +import pytest + from setuptools.glibc import check_glibc_version +@pytest.fixture(params=[ + "2.20", + # used by "linaro glibc", see gh-3588 + "2.20-2014.11", + # weird possibilities that I just made up + "2.20+dev", + "2.20-custom", + "2.20.1", + ]) +def two_twenty(request): + return request.param + + +@pytest.fixture(params=["asdf", "", "foo.bar"]) +def bad_string(request): + return request.param + + class TestGlibc(object): - def test_manylinux1_check_glibc_version(self): + def test_manylinux1_check_glibc_version(self, two_twenty): """ Test that the check_glibc_version function is robust against weird glibc version strings. """ - for two_twenty in ["2.20", - # used by "linaro glibc", see gh-3588 - "2.20-2014.11", - # weird possibilities that I just made up - "2.20+dev", - "2.20-custom", - "2.20.1", - ]: - assert check_glibc_version(two_twenty, 2, 15) - assert check_glibc_version(two_twenty, 2, 20) - assert not check_glibc_version(two_twenty, 2, 21) - assert not check_glibc_version(two_twenty, 3, 15) - assert not check_glibc_version(two_twenty, 1, 15) - - # For strings that we just can't parse at all, we should warn and - # return false - for bad_string in ["asdf", "", "foo.bar"]: - with warnings.catch_warnings(record=True) as ws: - warnings.filterwarnings("always") - assert not check_glibc_version(bad_string, 2, 5) - for w in ws: - if "Expected glibc version with" in str(w.message): - break - else: - # Didn't find the warning we were expecting - assert False + assert check_glibc_version(two_twenty, 2, 15) + assert check_glibc_version(two_twenty, 2, 20) + assert not check_glibc_version(two_twenty, 2, 21) + assert not check_glibc_version(two_twenty, 3, 15) + assert not check_glibc_version(two_twenty, 1, 15) + + def test_bad_versions(self, bad_string): + """ + For unparseable strings, warn and return False + """ + with warnings.catch_warnings(record=True) as ws: + warnings.filterwarnings("always") + assert not check_glibc_version(bad_string, 2, 5) + for w in ws: + if "Expected glibc version with" in str(w.message): + break + else: + # Didn't find the warning we were expecting + assert False From cca86c7f1d4040834c3265ccecdd9e21b4036df5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:50:25 -0400 Subject: [PATCH 7043/8469] Use Python 3 syntax for new-style clasess --- pkg_resources/__init__.py | 11 +++++++---- pkg_resources/tests/test_pkg_resources.py | 8 +++++--- pkg_resources/tests/test_working_set.py | 4 +++- setuptools/__init__.py | 4 +++- setuptools/command/develop.py | 4 +++- setuptools/command/easy_install.py | 4 +++- setuptools/command/test.py | 4 +++- setuptools/config.py | 5 ++++- setuptools/package_index.py | 6 ++++-- setuptools/py31compat.py | 5 ++++- setuptools/py33compat.py | 3 ++- setuptools/tests/test_build_meta.py | 4 +++- setuptools/tests/test_easy_install.py | 4 +++- setuptools/tests/test_egg_info.py | 6 ++++-- setuptools/tests/test_glibc.py | 4 +++- setuptools/tests/test_manifest.py | 4 +++- setuptools/tests/test_pep425tags.py | 6 ++++-- setuptools/tests/test_wheel.py | 4 +++- setuptools/wheel.py | 5 ++++- 19 files changed, 68 insertions(+), 27 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 91d00483b1..6701540819 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -78,6 +78,9 @@ __import__('pkg_resources.extern.packaging.markers') +__metaclass__ = type + + if (3, 0) < sys.version_info < (3, 4): raise RuntimeError("Python 3.4 or later is required") @@ -537,7 +540,7 @@ def resource_listdir(resource_name): """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): @@ -944,7 +947,7 @@ def markers_pass(self, req, extras=None): return not req.marker or any(extra_evals) -class Environment(object): +class Environment: """Searchable snapshot of distributions on a search path""" def __init__( @@ -2279,7 +2282,7 @@ def yield_lines(strs): ).match -class EntryPoint(object): +class EntryPoint: """Object representing an advertised importable object""" def __init__(self, name, module_name, attrs=(), extras=(), dist=None): @@ -2433,7 +2436,7 @@ def is_version_line(line): 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' diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 7442b79f74..079e83f840 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -23,6 +23,8 @@ except NameError: unicode = str +__metaclass__ = type + def timestamp(dt): """ @@ -43,7 +45,7 @@ def __call__(self): os.remove(self) -class TestZipProvider(object): +class TestZipProvider: finalizers = [] ref_time = datetime.datetime(2013, 5, 12, 13, 25, 0) @@ -132,7 +134,7 @@ def test_resource_filename_rewrites_on_change(self): manager.cleanup_resources() -class TestResourceManager(object): +class TestResourceManager: def test_get_cache_path(self): mgr = pkg_resources.ResourceManager() path = mgr.get_cache_path('foo') @@ -163,7 +165,7 @@ def test_setuptools_not_imported(self): subprocess.check_call(cmd) -class TestDeepVersionLookupDistutils(object): +class TestDeepVersionLookupDistutils: @pytest.fixture def env(self, tmpdir): """ diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index 42ddcc86f2..217edd8be7 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -9,6 +9,8 @@ from .test_resources import Metadata +__metaclass__ = type + def strip_comments(s): return '\n'.join( @@ -54,7 +56,7 @@ def parse_distributions(s): yield dist -class FakeInstaller(object): +class FakeInstaller: def __init__(self, installable_dists): self._installable_dists = installable_dists diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 7da47fbed5..ce55ec351d 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -15,6 +15,8 @@ from setuptools.depends import Require from . import monkey +__metaclass__ = type + __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages', @@ -31,7 +33,7 @@ lib2to3_fixer_packages = ['lib2to3.fixes'] -class PackageFinder(object): +class PackageFinder: """ Generate a list of all Python packages found within a directory """ diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 959c932a5c..fdc9fc432b 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -12,6 +12,8 @@ from setuptools import namespaces import setuptools +__metaclass__ = type + class develop(namespaces.DevelopInstaller, easy_install): """Set up package for development""" @@ -192,7 +194,7 @@ def install_wrapper_scripts(self, dist): 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 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a059a0bdd1..05508cebe1 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -63,6 +63,8 @@ ) import pkg_resources.py31compat +__metaclass__ = type + # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) @@ -2050,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. diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 51aee1f7b1..dde0118c90 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -16,6 +16,8 @@ add_activation_listener, require, EntryPoint) from setuptools import Command +__metaclass__ = type + class ScanningLoader(TestLoader): @@ -58,7 +60,7 @@ def loadTestsFromModule(self, module, pattern=None): # adapted from jaraco.classes.properties:NonDataProperty -class NonDataProperty(object): +class NonDataProperty: def __init__(self, fget): self.fget = fget diff --git a/setuptools/config.py b/setuptools/config.py index d3f0b123d5..5f908cf129 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -11,6 +11,9 @@ from setuptools.extern.six import string_types +__metaclass__ = type + + def read_configuration( filepath, find_others=False, ignore_option_errors=False): """Read given configuration file and returns options from it as a dict. @@ -113,7 +116,7 @@ def parse_configuration( return meta, options -class ConfigHandler(object): +class ConfigHandler: """Handles metadata supplied in configuration files.""" section_prefix = None diff --git a/setuptools/package_index.py b/setuptools/package_index.py index b6407be304..ed4162cd40 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -26,6 +26,8 @@ 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 @@ -235,7 +237,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 """ @@ -980,7 +982,7 @@ def _encode_auth(auth): return encoded.replace('\n', '') -class Credential(object): +class Credential: """ A username/password pair. Use like a namedtuple. """ diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 3aecf74e93..1a0705ece3 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -1,5 +1,8 @@ __all__ = [] +__metaclass__ = type + + try: # Python >=3.2 from tempfile import TemporaryDirectory @@ -7,7 +10,7 @@ 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 diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index 2a73ebb3c7..87cf53983c 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -10,11 +10,12 @@ 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 diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 659c1a6587..b39b7b8f90 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -5,12 +5,14 @@ from .files import build_files from .textwrap import DALS +__metaclass__ = type + futures = pytest.importorskip('concurrent.futures') importlib = pytest.importorskip('importlib') -class BuildBackendBase(object): +class BuildBackendBase: def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): self.cwd = cwd self.env = env diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3fc7fdaf30..345d283c31 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -36,8 +36,10 @@ from . import contexts from .textwrap import DALS +__metaclass__ = type -class FakeDist(object): + +class FakeDist: def get_entry_map(self, group): if group != 'console_scripts': return {} diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index a70a93a8a7..1a100266ea 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -16,12 +16,14 @@ from .textwrap import DALS from . import contexts +__metaclass__ = type + class Environment(str): pass -class TestEggInfo(object): +class TestEggInfo: setup_script = DALS(""" from setuptools import setup @@ -181,7 +183,7 @@ def _setup_script_with_requires(self, requires, use_setup_cfg=False): ) invalid_marker = "<=>++" - class RequiresTestHelper(object): + class RequiresTestHelper: @staticmethod def parametrize(*test_list, **format_dict): diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py index 0a7cac0e64..795fdc5665 100644 --- a/setuptools/tests/test_glibc.py +++ b/setuptools/tests/test_glibc.py @@ -4,6 +4,8 @@ from setuptools.glibc import check_glibc_version +__metaclass__ = type + @pytest.fixture(params=[ "2.20", @@ -23,7 +25,7 @@ def bad_string(request): return request.param -class TestGlibc(object): +class TestGlibc: def test_manylinux1_check_glibc_version(self, two_twenty): """ Test that the check_glibc_version function is robust against weird diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 65eec7d93f..c9533dda9f 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -18,6 +18,8 @@ import pytest +__metaclass__ = type + py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") @@ -157,7 +159,7 @@ def test_translated_pattern_mismatch(pattern_mismatch): assert not translate_pattern(pattern).match(target) -class TempDirTestCase(object): +class TempDirTestCase: def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() self.old_cwd = os.getcwd() diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py index 0f60e0ede4..658784ac95 100644 --- a/setuptools/tests/test_pep425tags.py +++ b/setuptools/tests/test_pep425tags.py @@ -4,8 +4,10 @@ from setuptools import pep425tags +__metaclass__ = type -class TestPEP425Tags(object): + +class TestPEP425Tags: def mock_get_config_var(self, **kwd): """ @@ -104,7 +106,7 @@ def test_manual_abi_dm_flags(self): self.abi_tag_unicode('dm', {'Py_DEBUG': True, 'WITH_PYMALLOC': True}) -class TestManylinux1Tags(object): +class TestManylinux1Tags: @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') @patch('setuptools.glibc.have_compatible_glibc', diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index cf6508686d..6db5fa117e 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -24,6 +24,8 @@ from .files import build_files from .textwrap import DALS +__metaclass__ = type + WHEEL_INFO_TESTS = ( ('invalid.whl', ValueError), @@ -148,7 +150,7 @@ def _check_wheel_install(filename, install_dir, install_tree_includes, assert requires_txt == dist.get_metadata('requires.txt').lstrip() -class Record(object): +class Record: def __init__(self, id, **kwargs): self._id = id diff --git a/setuptools/wheel.py b/setuptools/wheel.py index dc03bbc8b4..95a794a853 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -16,6 +16,9 @@ from setuptools.command.egg_info import write_requirements +__metaclass__ = type + + WHEEL_NAME = re.compile( r"""^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) @@ -52,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)) From 08d20c8d43dcda7a79efca0434185102fe6dc9bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 09:52:49 -0400 Subject: [PATCH 7044/8469] Use raw strings for regular expressions --- pkg_resources/tests/test_working_set.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index 217edd8be7..b3ca4ea8e4 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -39,7 +39,7 @@ def parse_distributions(s): requires=['foo>=3.0', 'baz; extra=="feature"'] ''' s = s.strip() - for spec in re.split('\n(?=[^\s])', s): + for spec in re.split(r'\n(?=[^\s])', s): if not spec: continue fields = spec.split('\n', 1) @@ -89,7 +89,7 @@ def parametrize_test_working_set_resolve(*test_list): ): idlist.append(id_) expected = strip_comments(expected.strip()) - if re.match('\w+$', expected): + if re.match(r'\w+$', expected): expected = getattr(pkg_resources, expected) assert issubclass(expected, Exception) else: From 3174f82b943f53e04ad7a5a6b2aa67ca2b2d44c5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 10:05:20 -0400 Subject: [PATCH 7045/8469] Use raw strings for regexes --- setuptools/package_index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ed4162cd40..9bf0421fa7 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -29,11 +29,11 @@ __metaclass__ = type EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$') -HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I) +HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I) # this is here to fix emacs' cruddy broken syntax highlighting PYPI_MD5 = re.compile( - '([^<]+)\n\\s+\\(md5\\)' + r'([^<]+)\n\s+\(md5\)' ) URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() From 9f379bbf78fcc1af1714c4a6c6f2afe172e0ed05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 10:06:10 -0400 Subject: [PATCH 7046/8469] Remove stale comment, added in 8cc0d5c2 and made meaningless in 26eee297. --- setuptools/package_index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9bf0421fa7..619649b909 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -30,7 +30,6 @@ EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$') HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I) -# this is here to fix emacs' cruddy broken syntax highlighting PYPI_MD5 = re.compile( r'([^<]+)\n\s+\(md5\)' From c2262d9fe4eaac507ff128ae60b6682e8d132e4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jun 2018 10:20:34 -0400 Subject: [PATCH 7047/8469] Use text_type and string_types from six --- pkg_resources/tests/test_pkg_resources.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 079e83f840..4e2cac9459 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -13,16 +13,12 @@ import distutils.command.install_egg_info from pkg_resources.extern.six.moves import map +from pkg_resources.extern.six import text_type, string_types import pytest import pkg_resources -try: - unicode -except NameError: - unicode = str - __metaclass__ = type @@ -37,7 +33,7 @@ def timestamp(dt): return time.mktime(dt.timetuple()) -class EggRemover(unicode): +class EggRemover(text_type): def __call__(self): if self in sys.path: sys.path.remove(self) @@ -140,7 +136,7 @@ def test_get_cache_path(self): path = mgr.get_cache_path('foo') type_ = str(type(path)) message = "Unexpected type from get_cache_path: " + type_ - assert isinstance(path, (unicode, str)), message + assert isinstance(path, string_types), message class TestIndependence: From 95880b3ebbd61367d2c4b3409e7789e1893c2d79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 4 Jun 2018 21:16:43 -0400 Subject: [PATCH 7048/8469] Add test and adjust match. Fixes #1366. --- setuptools/package_index.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 619649b909..cda54b7171 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -934,12 +934,19 @@ def warn(self, msg, *args): 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&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) From 20e50f6365c54cee1b7c558106e7ee0ed048825f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:26:08 -0400 Subject: [PATCH 7049/8469] Update changelog. Ref #1366. --- changelog.d/1366.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1366.change.rst diff --git a/changelog.d/1366.change.rst b/changelog.d/1366.change.rst new file mode 100644 index 0000000000..f70e2a2e8a --- /dev/null +++ b/changelog.d/1366.change.rst @@ -0,0 +1 @@ +In package_index, fixed handling of encoded entities in URLs. From 5ceaa6d1ee1f21aed3d08e0026590174778de2b5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:32:21 -0400 Subject: [PATCH 7050/8469] Configure doctests to match Python 2 unicode literal syntax. --- pytest.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/pytest.ini b/pytest.ini index 16fdc5af87..20c952fa8a 100755 --- a/pytest.ini +++ b/pytest.ini @@ -4,3 +4,4 @@ norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 +doctest_optionflags=ALLOW_UNICODE From 65699525394a9cd70bbdcf292f59a557f86e65ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:37:40 -0400 Subject: [PATCH 7051/8469] Apparently when specifying any doctest_optionflags, it's necessary to also indicate the defaults. Add ELLIPSIS to fix other failing tests. --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 20c952fa8a..6ec3be8838 100755 --- a/pytest.ini +++ b/pytest.ini @@ -4,4 +4,4 @@ norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 -doctest_optionflags=ALLOW_UNICODE +doctest_optionflags=ELLIPSIS ALLOW_UNICODE From 445d38472d3dc2fd004b02d645e7eadcf26fbc30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:38:07 -0400 Subject: [PATCH 7052/8469] Move ignores into conftest.py --- conftest.py | 12 ++++++++++++ pytest.ini | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 3cccfe1abd..13dc709a11 100644 --- a/conftest.py +++ b/conftest.py @@ -6,3 +6,15 @@ def pytest_addoption(parser): "--package_name", action="append", default=[], help="list of package_name to pass to test functions", ) + + +collect_ignore = [ + 'release.py', + 'setuptools/lib2to3_ex.py', + 'tests/manual_test.py', + 'tests/test_pypi.py', + 'tests/shlib_test', + 'scripts/upload-old-releases-as-zip.py', + 'pavement.py', + 'setuptools/tests/mod_with_constant.py', +] diff --git a/pytest.ini b/pytest.ini index 6ec3be8838..1c5b6b0934 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --ignore release.py --ignore setuptools/lib2to3_ex.py --ignore tests/manual_test.py --ignore tests/test_pypi.py --ignore tests/shlib_test --doctest-glob=pkg_resources/api_tests.txt --ignore scripts/upload-old-releases-as-zip.py --ignore pavement.py --ignore setuptools/tests/mod_with_constant.py -rsxX +addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -rsxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 From 992293d1aa03ad3e7258f51bdbb385ace4035737 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:41:36 -0400 Subject: [PATCH 7053/8469] Remove crufty ignores --- conftest.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/conftest.py b/conftest.py index 13dc709a11..abb79f1b4a 100644 --- a/conftest.py +++ b/conftest.py @@ -9,12 +9,9 @@ def pytest_addoption(parser): collect_ignore = [ - 'release.py', 'setuptools/lib2to3_ex.py', 'tests/manual_test.py', 'tests/test_pypi.py', - 'tests/shlib_test', - 'scripts/upload-old-releases-as-zip.py', 'pavement.py', 'setuptools/tests/mod_with_constant.py', ] From 0a39f8e47944ef416fdd276ec91a3be464fa8a2e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:45:42 -0400 Subject: [PATCH 7054/8469] Only ignore collection on older Pythons --- conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index abb79f1b4a..5bebe21aa0 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,6 @@ +import sys + + pytest_plugins = 'setuptools.tests.fixtures' @@ -9,9 +12,12 @@ def pytest_addoption(parser): collect_ignore = [ - 'setuptools/lib2to3_ex.py', 'tests/manual_test.py', 'tests/test_pypi.py', 'pavement.py', 'setuptools/tests/mod_with_constant.py', ] + + +if sys.version_info < (3,): + collect_ignore.append('setuptools/lib2to3_ex.py') From 042aab8230fe156e6d28d448aa669184e34342d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:46:15 -0400 Subject: [PATCH 7055/8469] Feed the hobgoblins (delint). --- tests/manual_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/manual_test.py b/tests/manual_test.py index e5aaf179c6..52295f9a56 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -89,8 +89,10 @@ def test_full(): assert len(eggs) == 3 assert eggs[1].startswith('setuptools') del eggs[1] - assert eggs == ['extensions-0.3-py2.6.egg', - 'zc.recipe.egg-1.2.2-py2.6.egg'] + assert eggs == [ + 'extensions-0.3-py2.6.egg', + 'zc.recipe.egg-1.2.2-py2.6.egg', + ] if __name__ == '__main__': From 9832db367961e9215a1c55703dcbe47b339ca409 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:53:57 -0400 Subject: [PATCH 7056/8469] Remove crufty, ignored test. --- conftest.py | 1 - tests/test_pypi.py | 82 ---------------------------------------------- 2 files changed, 83 deletions(-) delete mode 100644 tests/test_pypi.py diff --git a/conftest.py b/conftest.py index 5bebe21aa0..d966d68dff 100644 --- a/conftest.py +++ b/conftest.py @@ -13,7 +13,6 @@ def pytest_addoption(parser): collect_ignore = [ 'tests/manual_test.py', - 'tests/test_pypi.py', 'pavement.py', 'setuptools/tests/mod_with_constant.py', ] diff --git a/tests/test_pypi.py b/tests/test_pypi.py deleted file mode 100644 index b3425e53bc..0000000000 --- a/tests/test_pypi.py +++ /dev/null @@ -1,82 +0,0 @@ -import os -import subprocess - -import virtualenv -from setuptools.extern.six.moves import http_client -from setuptools.extern.six.moves import xmlrpc_client - -TOP = 200 -PYPI_HOSTNAME = 'pypi.python.org' - - -def rpc_pypi(method, *args): - """Call an XML-RPC method on the Pypi server.""" - conn = http_client.HTTPSConnection(PYPI_HOSTNAME) - headers = {'Content-Type': 'text/xml'} - payload = xmlrpc_client.dumps(args, method) - - conn.request("POST", "/pypi", payload, headers) - response = conn.getresponse() - if response.status == 200: - result = xmlrpc_client.loads(response.read())[0][0] - return result - else: - raise RuntimeError("Unable to download the list of top " - "packages from Pypi.") - - -def get_top_packages(limit): - """Collect the name of the top packages on Pypi.""" - packages = rpc_pypi('top_packages') - return packages[:limit] - - -def _package_install(package_name, tmp_dir=None, local_setuptools=True): - """Try to install a package and return the exit status. - - This function creates a virtual environment, install setuptools using pip - and then install the required package. If local_setuptools is True, it - will install the local version of setuptools. - """ - package_dir = os.path.join(tmp_dir, "test_%s" % package_name) - if not local_setuptools: - package_dir = package_dir + "_baseline" - - virtualenv.create_environment(package_dir) - - pip_path = os.path.join(package_dir, "bin", "pip") - if local_setuptools: - subprocess.check_call([pip_path, "install", "."]) - returncode = subprocess.call([pip_path, "install", package_name]) - return returncode - - -def test_package_install(package_name, tmpdir): - """Test to verify the outcome of installing a package. - - This test compare that the return code when installing a package is the - same as with the current stable version of setuptools. - """ - new_exit_status = _package_install(package_name, tmp_dir=str(tmpdir)) - if new_exit_status: - print("Installation failed, testing against stable setuptools", - package_name) - old_exit_status = _package_install(package_name, tmp_dir=str(tmpdir), - local_setuptools=False) - assert new_exit_status == old_exit_status - - -def pytest_generate_tests(metafunc): - """Generator function for test_package_install. - - This function will generate calls to test_package_install. If a package - list has been specified on the command line, it will be used. Otherwise, - Pypi will be queried to get the current list of top packages. - """ - if "package_name" in metafunc.fixturenames: - if not metafunc.config.option.package_name: - packages = get_top_packages(TOP) - packages = [name for name, downloads in packages] - else: - packages = metafunc.config.option.package_name - metafunc.parametrize("package_name", packages) From 3e3b9f7968fbe47b8e7038d1b1767676daecfaca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 08:57:21 -0400 Subject: [PATCH 7057/8469] Include pavement.py in tests (where applicable). --- conftest.py | 5 ++++- tests/requirements.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index d966d68dff..0d7b274c07 100644 --- a/conftest.py +++ b/conftest.py @@ -13,10 +13,13 @@ def pytest_addoption(parser): collect_ignore = [ 'tests/manual_test.py', - 'pavement.py', 'setuptools/tests/mod_with_constant.py', ] if sys.version_info < (3,): collect_ignore.append('setuptools/lib2to3_ex.py') + + +if sys.version_info < (3, 6): + collect_ignore.append('pavement.py') diff --git a/tests/requirements.txt b/tests/requirements.txt index aff32c10ea..a8cde39547 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,3 +8,4 @@ pytest>=3.0.2 wheel coverage>=4.5.1 pytest-cov>=2.5.1 +paver; python_version>="3.6" From 30d376e84c5c13df4e83b66343a7bda6a8022aa2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 09:06:52 -0400 Subject: [PATCH 7058/8469] Remove references to Python 3.3 and 2.6. --- tests/requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index a8cde39547..af16fc477c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,7 +1,6 @@ -importlib; python_version<"2.7" mock -pytest-flake8<=1.0.0; python_version>="3.3" and python_version<"3.5" -pytest-flake8; python_version>="2.7" and python_version!="3.3" and python_version!="3.4" +pytest-flake8<=1.0.0; python_version>="3.4" and python_version<"3.5" +pytest-flake8; python_version>="2.7" and python_version!="3.4" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 From 6894478f878b4b579ae8a40e81fa002ad31f63b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 6 Jun 2018 09:07:36 -0400 Subject: [PATCH 7059/8469] More directly address the Python 3.4 compatibility. --- tests/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index af16fc477c..b38fcbf06e 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,6 @@ mock -pytest-flake8<=1.0.0; python_version>="3.4" and python_version<"3.5" -pytest-flake8; python_version>="2.7" and python_version!="3.4" +pytest-flake8; python_version!="3.4" +pytest-flake8<=1.0.0; python_version=="3.4" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.0.2 From c13fcfd43f5ce16a2fb4930622293395a494004f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 14 Jun 2018 08:30:15 -0400 Subject: [PATCH 7060/8469] Update roadmap --- docs/roadmap.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 8f175b9f75..9bde49360a 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -2,5 +2,9 @@ Roadmap ======= -Setuptools is primarily in maintenance mode. The project attempts to address -user issues, concerns, and feature requests in a timely fashion. +Setuptools has the following large-scale goals on the roadmap: + +- Harmonize declarative config with pyproject.toml syntax. +- Deprecate and remove setup_requires and easy_install in + favor of PEP 518 build requirements and pip install. +- Adopt the Distutils package and stop monkeypatching stdlib. From 313d0da028a2f47b3ac2fac62e12d4103bcdccf0 Mon Sep 17 00:00:00 2001 From: "Michael A. Smith" Date: Thu, 21 Jun 2018 14:54:38 -0400 Subject: [PATCH 7061/8469] Fix Town Crier Link --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 6b04603b16..8a967f6cfb 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -66,7 +66,7 @@ and a reference to any issue tickets that the PR is intended to solve. All PRs with code changes should include tests. All changes should include a changelog entry. -``setuptools`` uses `towncrier `_ +``setuptools`` uses `towncrier `_ for changelog managment, so when making a PR, please add a news fragment in the ``changelog.d/`` folder. Changelog files are written in Restructured Text and should be a 1 or 2 sentence description of the substantive changes in the PR. From d8bd6dde9378c58daf71bf88d805ae0d4b5e03dc Mon Sep 17 00:00:00 2001 From: wim glenn Date: Mon, 25 Jun 2018 12:42:00 -0500 Subject: [PATCH 7062/8469] Avoid resource warning from dev scripts installed editable Avoid ` ResourceWarning: unclosed file <_io.TextIOWrapper name='whatever' mode='r' encoding='UTF-8'>` on dev scripts installed editable --- setuptools/script (dev).tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/script (dev).tmpl b/setuptools/script (dev).tmpl index d58b1bb5bf..39a24b0488 100644 --- a/setuptools/script (dev).tmpl +++ b/setuptools/script (dev).tmpl @@ -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')) From 776096522af8d8320b879571ded2b1c43242c0da Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Wed, 27 Jun 2018 21:32:11 +0300 Subject: [PATCH 7063/8469] always process module.__path__ for namespace packages, fixes #1321 --- pkg_resources/__init__.py | 11 +++++----- setuptools/tests/test_namespaces.py | 31 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6701540819..d642a405f4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2135,12 +2135,13 @@ def position_in_sys_path(path): parts = path_parts[:-module_parts] return safe_sys_path_index(_normalize_cached(os.sep.join(parts))) - if not isinstance(orig_path, list): - # Is this behavior useful when module.__path__ is not a list? - return + new_path = sorted(orig_path, key=position_in_sys_path) + new_path = [_normalize_cached(p) for p in new_path] - orig_path.sort(key=position_in_sys_path) - module.__path__[:] = [_normalize_cached(p) for p in orig_path] + if isinstance(module.__path__, list): + module.__path__[:] = new_path + else: + module.__path__ = new_path def declare_namespace(packageName): diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 1ac1b35e8b..00ec75b45d 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -109,3 +109,34 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) + + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), + reason="https://github.com/pypa/setuptools/issues/851") + def test_packages_in_the_sampe_namespace_installed_and_cwd(self, tmpdir): + """ + Installing one namespace package and also have another in the same + namespace in the current working directory, both of them must be + importable. + """ + pkg_A = namespaces.build_namespace_package(tmpdir, 'myns.pkgA') + pkg_B = namespaces.build_namespace_package(tmpdir, 'myns.pkgB') + target = tmpdir / 'packages' + # use pip to install to the target directory + install_cmd = [ + sys.executable, + '-m', + 'pip.__main__', + 'install', + str(pkg_A), + '-t', str(target), + ] + subprocess.check_call(install_cmd) + namespaces.make_site_dir(target) + + # ensure that all packages import and pkg_resources imports + pkg_resources_imp = [ + sys.executable, + '-c', 'import pkg_resources; import myns.pkgA; import myns.pkgB', + ] + with test.test.paths_on_pythonpath([str(target)]): + subprocess.check_call(pkg_resources_imp, cwd=str(pkg_B)) From ecae51daeff22edcbbab38016d118778add14d33 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Wed, 27 Jun 2018 21:44:13 +0300 Subject: [PATCH 7064/8469] added changelog.d entry --- changelog.d/1402.change.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/1402.change.rst diff --git a/changelog.d/1402.change.rst b/changelog.d/1402.change.rst new file mode 100644 index 0000000000..5a68ac9ddf --- /dev/null +++ b/changelog.d/1402.change.rst @@ -0,0 +1,2 @@ +Fixed a bug with namespace packages under python-3.6 when one package in +current directory hides another which is installed. From eda87a7558908bafb38268e3e08a737beff1fa8f Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 20 Jun 2018 14:25:16 +0200 Subject: [PATCH 7065/8469] docs: fix developer guide Drop `Source Code` section, as it contains an outdated guideline with respect to documenting changes and its contents are already covered by other sections. --- changelog.d/1403.doc.rst | 1 + docs/developer-guide.txt | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-) create mode 100644 changelog.d/1403.doc.rst diff --git a/changelog.d/1403.doc.rst b/changelog.d/1403.doc.rst new file mode 100644 index 0000000000..1a636085a1 --- /dev/null +++ b/changelog.d/1403.doc.rst @@ -0,0 +1 @@ +Fix developer's guide. diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 8a967f6cfb..c011491a30 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -89,31 +89,6 @@ code changes. See the following for an example news fragment: $ cat changelog.d/1288.change.rst Add support for maintainer in PKG-INFO ------------ -Source Code ------------ - -Grab the code at Github:: - - $ git clone https://github.com/pypa/setuptools - -If you want to contribute changes, we recommend you fork the repository on -Github, commit the changes to your repository, and then make a pull request -on Github. If you make some changes, don't forget to: - -- add a note in CHANGES.rst - -Please commit all changes in the 'master' branch against the latest available -commit or for bug-fixes, against an earlier commit or release in which the -bug occurred. - -If you find yourself working on more than one issue at a time, Setuptools -generally prefers Git-style branches, so use Mercurial bookmarks or Git -branches or multiple forks to maintain separate efforts. - -The Continuous Integration tests that validate every release are run -from this repository. - ------- Testing ------- From b32fcfa56d22c68350edbae25fb31fd17efd06a3 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 28 Jun 2018 13:10:15 +0200 Subject: [PATCH 7066/8469] changes: fix typo --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 156ba47d51..d52ed48fca 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,7 +19,7 @@ v39.2.0 after any ``distutils`` ``setup_keywords`` calls, allowing them to override values. * #1352: Added ``tox`` environment for documentation builds. -* #1354: Added ``towncrier`` for changelog managment. +* #1354: Added ``towncrier`` for changelog management. * #1355: Add PR template. * #1368: Fixed tests which failed without network connectivity. * #1369: Added unit tests for PEP 425 compatibility tags support. From 601f82e57247edf8505696304fbc7a3da4013cfc Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 28 Jun 2018 13:19:38 +0200 Subject: [PATCH 7067/8469] fix PEP 518 configuration Add `build-system.requires` key to `pyproject.toml`: - this is necessary with pip 10.0.1, as otherwise the defaults will be to require both `setuptools` and `wheel` (and we only need the later) - a `pyproject.toml` with no `build-system.requires` key will be invalid and rejected by a future version of pip (see https://github.com/pypa/pip/issues/5416#issuecomment-399638608) --- changelog.d/1404.misc.rst | 1 + pyproject.toml | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/1404.misc.rst diff --git a/changelog.d/1404.misc.rst b/changelog.d/1404.misc.rst new file mode 100644 index 0000000000..2d4bd629fb --- /dev/null +++ b/changelog.d/1404.misc.rst @@ -0,0 +1 @@ +Fix PEP 518 configuration: set build requirements in ``pyproject.toml`` to ``["wheel"]``. diff --git a/pyproject.toml b/pyproject.toml index cffd0e9afd..07c23bb5f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ +[build-system] +requires = ["wheel"] + [tool.towncrier] package = "setuptools" package_dir = "setuptools" From d8f8de7f46979736e0e1aab3343d4f7a29e2e0c2 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Wed, 4 Jul 2018 10:03:37 -0400 Subject: [PATCH 7068/8469] Add tests for find_packages_ns() --- setuptools/tests/test_find_packages.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index a6023de9d5..02ae5a946d 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -7,14 +7,15 @@ import pytest -import setuptools +from setuptools.extern.six import PY3 from setuptools import find_packages -find_420_packages = setuptools.PEP420PackageFinder.find +py3_only = pytest.mark.xfail(not PY3, reason="Test runs on Python 3 only") +if PY3: + from setuptools import find_packages_ns # modeled after CPython's test.support.can_symlink - def can_symlink(): TESTFN = tempfile.mktemp() symlink_path = TESTFN + "can_symlink" @@ -153,30 +154,35 @@ def test_symlinked_packages_are_included(self): def _assert_packages(self, actual, expected): assert set(actual) == set(expected) + @py3_only def test_pep420_ns_package(self): - packages = find_420_packages( + packages = find_packages_ns( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + @py3_only def test_pep420_ns_package_no_includes(self): - packages = find_420_packages( + packages = find_packages_ns( self.dist_dir, exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + @py3_only def test_pep420_ns_package_no_includes_or_excludes(self): - packages = find_420_packages(self.dist_dir) - expected = [ - 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] + packages = find_packages_ns(self.dist_dir) + expected = ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self._assert_packages(packages, expected) + @py3_only def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) - packages = find_420_packages( + packages = find_packages_ns( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + @py3_only def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) - packages = find_420_packages(self.dist_dir) + packages = find_packages_ns(self.dist_dir) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + From 2b7a2dd7bfd7d742c8816d45150b9e495f5970f8 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Wed, 4 Jul 2018 10:04:01 -0400 Subject: [PATCH 7069/8469] Add find_packages_ns() This fixes GH #97 by introducing an alternate version of find_packages that works with PEP 420 namespace packages. --- setuptools/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index ce55ec351d..e705f0d1af 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -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 @@ -17,11 +19,15 @@ __metaclass__ = type + __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', - 'find_packages', + 'find_packages' ] +if PY3: + __all__.append('find_packages_ns') + __version__ = setuptools.version.__version__ bootstrap_install_from = None @@ -111,6 +117,9 @@ def _looks_like_package(path): find_packages = PackageFinder.find +if PY3: + find_packages_ns = PEP420PackageFinder.find + def _install_setup_requires(attrs): # Note: do not use `setuptools.Distribution` directly, as From b0a89a1c00ded4fe98f2e161066bc7b1ff933fc4 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Wed, 4 Jul 2018 10:04:49 -0400 Subject: [PATCH 7070/8469] Add documentation for find_packages_ns() --- docs/setuptools.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index c82dc51133..1d509a73c0 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -59,6 +59,9 @@ Feature Highlights: * Create extensible applications and frameworks that automatically discover extensions, using simple "entry points" declared in a project's setup script. +* Full support for PEP 420 via ``find_packages_ns()``, which is also backwards + compatible to the existing ``find_packages()`` for Python >= 3.3. + .. contents:: **Table of Contents** .. _ez_setup.py: `bootstrap module`_ @@ -107,6 +110,21 @@ As you can see, it doesn't take much to use setuptools in a project. Run that script in your project folder, alongside the Python packages you have developed. +For Python 3.3+, and whenever you are using PEP 420 compliant implicit +namespace packages, you can use ``find_packages_ns()`` instead. +But keep in mind that if you do, you might have to either define a few +exclusions or reorganize your codebase a little bit so that the new function +does not find for example your test fixtures and treat them as implicit +namespace packages. And here is a minimal setup script using +``find_packages_ns()``:: + + from setuptools import setup, find_packages_ns as find_packages + setup( + name="HelloWorld", + version="0.1", + packages=find_packages(), + ) + Invoke that script to produce eggs, upload to PyPI, and automatically include all packages in the directory where the setup.py lives. See the `Command Reference`_ section below to see what From 26fce7125849d090dd65dd7c046515a347357f01 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Wed, 4 Jul 2018 10:06:25 -0400 Subject: [PATCH 7071/8469] Add changelog for PR #1312 --- changelog.d/1312.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1312.change.rst diff --git a/changelog.d/1312.change.rst b/changelog.d/1312.change.rst new file mode 100644 index 0000000000..9314f9e142 --- /dev/null +++ b/changelog.d/1312.change.rst @@ -0,0 +1 @@ +Introduce find_packages_ns() to find PEP 420 namespace packages. From a5797d2c468c1d7005ea36b77ce00941e7c8b251 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 4 Jul 2018 10:52:04 -0400 Subject: [PATCH 7072/8469] Expand documentation for find_packages_ns This moves the documentation out of "Basic Usage" and expands on some of the caveats of this approach. --- docs/setuptools.txt | 76 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 1d509a73c0..9a088254cc 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -110,21 +110,6 @@ As you can see, it doesn't take much to use setuptools in a project. Run that script in your project folder, alongside the Python packages you have developed. -For Python 3.3+, and whenever you are using PEP 420 compliant implicit -namespace packages, you can use ``find_packages_ns()`` instead. -But keep in mind that if you do, you might have to either define a few -exclusions or reorganize your codebase a little bit so that the new function -does not find for example your test fixtures and treat them as implicit -namespace packages. And here is a minimal setup script using -``find_packages_ns()``:: - - from setuptools import setup, find_packages_ns as find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - ) - Invoke that script to produce eggs, upload to PyPI, and automatically include all packages in the directory where the setup.py lives. See the `Command Reference`_ section below to see what @@ -480,6 +465,67 @@ argument in your setup script. Especially since it frees you from having to remember to modify your setup script whenever your project grows additional top-level packages or subpackages. +``find_packages_ns()`` +---------------------- +In Python 3.3+, ``setuptools`` also provides the ``find_packages_ns`` variant +of ``find_packages``, which has the same function signature as +``find_packages``, but works with `PEP 420`_ compliant implicit namespace +packages. Here is a minimal setup script using ``find_packages_ns``:: + + from setuptools import setup, find_packages_ns + setup( + name="HelloWorld", + version="0.1", + packages=find_packages_ns(), + ) + + +Keep in mind that according to PEP 420, you may have to either re-organize your +codebase a bit or define a few exclusions, as the definition of an implicit +namespace package is quite lenient, so for a project organized like so:: + + + ├── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + ├── setup.py + └── tests + └── test_mod1.py + +A naive ``find_packages_ns()`` would install both ``namespace.mypackage`` and a +top-level package called ``tests``! One way to avoid this problem is to use the +``include`` keyword to whitelist the packages to include, like so:: + + from setuptools import setup, find_packages_ns + + setup( + name="namespace.mypackage", + version="0.1", + packages=find_packages_ns(include=['namespace.*']) + ) + +Another option is to use the "src" layout, where all package code is placed in +the ``src`` directory, like so:: + + + ├── setup.py + ├── src + │   └── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + └── tests + └── test_mod1.py + +With this layout, the package directory is specified as ``src``, as such:: + + setup(name="namespace.mypackage", + version="0.1", + package_dir={'': 'src'}, + packages=find_packages_ns(where='src')) + +.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ Automatic Script Creation ========================= From a91c571942baf303ac8cbd2cc2676252bed7d4bc Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Sun, 8 Jul 2018 13:26:08 -0500 Subject: [PATCH 7073/8469] Deprecate upload and register commands --- changelog.d/1410.change.rst | 1 + docs/setuptools.txt | 88 +++++++++++----------------------- setuptools/command/register.py | 14 ++++-- setuptools/command/upload.py | 11 +++++ 4 files changed, 50 insertions(+), 64 deletions(-) create mode 100644 changelog.d/1410.change.rst diff --git a/changelog.d/1410.change.rst b/changelog.d/1410.change.rst new file mode 100644 index 0000000000..ab6162ce79 --- /dev/null +++ b/changelog.d/1410.change.rst @@ -0,0 +1 @@ +Deprecate ``upload`` and ``register`` commands. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index c82dc51133..511a9898ae 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -48,8 +48,6 @@ Feature Highlights: * Command aliases - create project-specific, per-user, or site-wide shortcut names for commonly used commands and options -* PyPI upload support - upload your source distributions and eggs to PyPI - * Deploy your project in "development mode", such that it's available on ``sys.path``, yet can still be edited directly from its source checkout. @@ -107,11 +105,10 @@ As you can see, it doesn't take much to use setuptools in a project. Run that script in your project folder, alongside the Python packages you have developed. -Invoke that script to produce eggs, upload to -PyPI, and automatically include all packages in the directory where the -setup.py lives. See the `Command Reference`_ section below to see what -commands you can give to this setup script. For example, -to produce a source distribution, simply invoke:: +Invoke that script to produce distributions and automatically include all +packages in the directory where the setup.py lives. See the `Command +Reference`_ section below to see what commands you can give to this setup +script. For example, to produce a source distribution, simply invoke:: python setup.py sdist @@ -138,7 +135,7 @@ dependencies, and perhaps some data files and scripts:: 'hello': ['*.msg'], }, - # metadata for upload to PyPI + # metadata to display on PyPI author="Me", author_email="me@example.com", description="This is an Example Package", @@ -618,9 +615,8 @@ using ``setup.py develop``.) Dependencies that aren't in PyPI -------------------------------- -If your project depends on packages that aren't registered in PyPI, you may -still be able to depend on them, as long as they are available for download -as: +If your project depends on packages that don't exist on PyPI, you may still be +able to depend on them, as long as they are available for download as: - an egg, in the standard distutils ``sdist`` format, - a single ``.py`` file, or @@ -1192,15 +1188,6 @@ Whenever you install an updated version of setuptools, you should also update your projects' ``ez_setup.py`` files, so that a matching version gets installed on the target machine(s). -By the way, setuptools supports the new PyPI "upload" command, so you can use -``setup.py sdist upload`` or ``setup.py bdist_egg upload`` to upload your -source or egg distributions respectively. Your project's current version must -be registered with PyPI first, of course; you can use ``setup.py register`` to -do that. Or you can do it all in one step, e.g. ``setup.py register sdist -bdist_egg upload`` will register the package, build source and egg -distributions, and then upload them both to PyPI, where they'll be easily -found by other projects that depend on them. - (By the way, if you need to distribute a specific version of ``setuptools``, you can specify the exact version and base download URL as parameters to the ``use_setuptools()`` function. See the function's docstring for details.) @@ -1517,22 +1504,11 @@ you use any option at all. Making your package available for EasyInstall --------------------------------------------- -If you use the ``register`` command (``setup.py register``) to register your -package with PyPI, that's most of the battle right there. (See the -`docs for the register command`_ for more details.) - -.. _docs for the register command: http://docs.python.org/dist/package-index.html - -If you also use the `upload`_ command to upload actual distributions of your -package, that's even better, because EasyInstall will be able to find and -download them directly from your project's PyPI page. - -However, there may be reasons why you don't want to upload distributions to +There may be reasons why you don't want to upload distributions to PyPI, and just want your existing distributions (or perhaps a Subversion checkout) to be used instead. -So here's what you need to do before running the ``register`` command. There -are three ``setup()`` arguments that affect EasyInstall: +There are three ``setup()`` arguments that affect EasyInstall: ``url`` and ``download_url`` These become links on your project's PyPI page. EasyInstall will examine @@ -1590,13 +1566,12 @@ tagging the release, so the trunk will still produce development snapshots. Alternately, if you are not branching for releases, you can override the default version options on the command line, using something like:: - python setup.py egg_info -Db "" sdist bdist_egg register upload + python setup.py egg_info -Db "" sdist bdist_egg The first part of this command (``egg_info -Db ""``) will override the -configured tag information, before creating source and binary eggs, registering -the project with PyPI, and uploading the files. Thus, these commands will use -the plain version from your ``setup.py``, without adding the build designation -string. +configured tag information, before creating source and binary eggs. Thus, these +commands will use the plain version from your ``setup.py``, without adding the +build designation string. Of course, if you will be doing this a lot, you may wish to create a personal alias for this operation, e.g.:: @@ -1605,7 +1580,7 @@ alias for this operation, e.g.:: You can then use it like this:: - python setup.py release sdist bdist_egg register upload + python setup.py release sdist bdist_egg Or of course you can create more elaborate aliases that do all of the above. See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. @@ -1921,11 +1896,11 @@ This command performs two operations: it updates a project's ``.egg-info`` metadata directory (used by the ``bdist_egg``, ``develop``, and ``test`` commands), and it allows you to temporarily change a project's version string, to support "daily builds" or "snapshot" releases. It is run automatically by -the ``sdist``, ``bdist_egg``, ``develop``, ``register``, and ``test`` commands -in order to update the project's metadata, but you can also specify it -explicitly in order to temporarily change the project's version string while -executing other commands. (It also generates the``.egg-info/SOURCES.txt`` -manifest file, which is used when you are building source distributions.) +the ``sdist``, ``bdist_egg``, ``develop``, and ``test`` commands in order to +update the project's metadata, but you can also specify it explicitly in order +to temporarily change the project's version string while executing other +commands. (It also generates the``.egg-info/SOURCES.txt`` manifest file, which +is used when you are building source distributions.) In addition to writing the core egg metadata defined by ``setuptools`` and required by ``pkg_resources``, this command can be extended to write other @@ -1999,10 +1974,10 @@ Creating a dated "nightly build" snapshot egg:: python setup.py egg_info --tag-date --tag-build=DEV bdist_egg -Creating and uploading a release with no version tags, even if some default -tags are specified in ``setup.cfg``:: +Creating a release with no version tags, even if some default tags are +specified in ``setup.cfg``:: - python setup.py egg_info -RDb "" sdist bdist_egg register upload + python setup.py egg_info -RDb "" sdist bdist_egg (Notice that ``egg_info`` must always appear on the command line *before* any commands that you want the version changes to apply to.) @@ -2251,25 +2226,16 @@ available: ``upload`` - Upload source and/or egg distributions to PyPI =========================================================== +.. warning:: + **upload** is deprecated in favor of using `twine + `_ + The ``upload`` command is implemented and `documented `_ in distutils. -Setuptools augments the ``upload`` command with support -for `keyring `_, -allowing the password to be stored in a secure -location and not in plaintext in the .pypirc file. To use -keyring, first install keyring and set the password for -the relevant repository, e.g.:: - - python -m keyring set - Password for '' in '': ******** - -Then, in .pypirc, set the repository configuration as normal, -but omit the password. Thereafter, uploads will use the -password from the keyring. - New in 20.1: Added keyring support. +New in 40.0: Deprecated the upload command. ----------------------------------------- diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 8d6336a14d..98bc01566f 100755 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -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 + ) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index a44173a99a..72f24d8f48 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -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 = ( From 7edce73432363808834c001bbda05944eff5caa0 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Sun, 8 Jul 2018 19:48:32 -0500 Subject: [PATCH 7074/8469] Tests for deprecation warnings --- setuptools/tests/test_register.py | 43 +++++++++++++++++++++++++++++++ setuptools/tests/test_upload.py | 43 +++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 setuptools/tests/test_register.py create mode 100644 setuptools/tests/test_upload.py diff --git a/setuptools/tests/test_register.py b/setuptools/tests/test_register.py new file mode 100644 index 0000000000..92d576dbe1 --- /dev/null +++ b/setuptools/tests/test_register.py @@ -0,0 +1,43 @@ +import mock +from distutils import log + +import pytest + +from setuptools.command.register import register +from setuptools.dist import Distribution + + +class TestRegisterTest: + def test_warns_deprecation(self): + dist = Distribution() + + cmd = register(dist) + cmd.run_command = mock.Mock() + cmd.send_metadata = mock.Mock() + cmd.announce = mock.Mock() + + cmd.run() + + cmd.announce.assert_called_once_with( + "WARNING: Registering is deprecated, use twine to upload instead " + "(https://pypi.org/p/twine/)", + log.WARN + ) + + def test_warns_deprecation_when_raising(self): + dist = Distribution() + + cmd = register(dist) + cmd.run_command = mock.Mock() + cmd.send_metadata = mock.Mock() + cmd.send_metadata.side_effect = Exception + cmd.announce = mock.Mock() + + with pytest.raises(Exception): + cmd.run() + + cmd.announce.assert_called_once_with( + "WARNING: Registering is deprecated, use twine to upload instead " + "(https://pypi.org/p/twine/)", + log.WARN + ) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py new file mode 100644 index 0000000000..95a8d16b11 --- /dev/null +++ b/setuptools/tests/test_upload.py @@ -0,0 +1,43 @@ +import mock +from distutils import log + +import pytest + +from setuptools.command.upload import upload +from setuptools.dist import Distribution + + +class TestUploadTest: + def test_warns_deprecation(self): + dist = Distribution() + dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] + + cmd = upload(dist) + cmd.upload_file = mock.Mock() + cmd.announce = mock.Mock() + + cmd.run() + + cmd.announce.assert_called_once_with( + "WARNING: Uploading via this command is deprecated, use twine to " + "upload instead (https://pypi.org/p/twine/)", + log.WARN + ) + + def test_warns_deprecation_when_raising(self): + dist = Distribution() + dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] + + cmd = upload(dist) + cmd.upload_file = mock.Mock() + cmd.upload_file.side_effect = Exception + cmd.announce = mock.Mock() + + with pytest.raises(Exception): + cmd.run() + + cmd.announce.assert_called_once_with( + "WARNING: Uploading via this command is deprecated, use twine to " + "upload instead (https://pypi.org/p/twine/)", + log.WARN + ) From e1fb17476770620546d0bd244b35591b99ba6ea7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Jul 2018 00:01:40 -0400 Subject: [PATCH 7075/8469] Revert 7392f01f for pkg_resources/extern. 3.3 is the right signal there. --- pkg_resources/extern/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index dfde433dc2..b4156fec20 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -48,7 +48,7 @@ def load_module(self, fullname): # 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.major >= 3: + if sys.version_info > (3, 3): del sys.modules[extant] return mod except ImportError: From 949bd166692af0694631542b02e3a2f26a48b455 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Jul 2018 00:07:40 -0400 Subject: [PATCH 7076/8469] Avoid removing packages imported from the root. Fixes #1383. --- changelog.d/1383.change | 1 + pkg_resources/extern/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1383.change diff --git a/changelog.d/1383.change b/changelog.d/1383.change new file mode 100644 index 0000000000..dc8b839bff --- /dev/null +++ b/changelog.d/1383.change @@ -0,0 +1 @@ +In pkg_resources VendorImporter, avoid removing packages imported from the root. diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index b4156fec20..c1eb9e998f 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -48,7 +48,7 @@ def load_module(self, fullname): # 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: From 510c3c64bd32e7c3870001e5e7a56ca5e387e797 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Jul 2018 00:13:58 -0400 Subject: [PATCH 7077/8469] =?UTF-8?q?Bump=20version:=2039.2.0=20=E2=86=92?= =?UTF-8?q?=2040.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 11 +++++++++++ changelog.d/1342.breaking.rst | 1 - changelog.d/1366.change.rst | 1 - changelog.d/1379.doc.rst | 1 - changelog.d/1383.change | 1 - changelog.d/1385.doc.rst | 1 - changelog.d/1403.doc.rst | 1 - changelog.d/1404.misc.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) delete mode 100644 changelog.d/1342.breaking.rst delete mode 100644 changelog.d/1366.change.rst delete mode 100644 changelog.d/1379.doc.rst delete mode 100644 changelog.d/1383.change delete mode 100644 changelog.d/1385.doc.rst delete mode 100644 changelog.d/1403.doc.rst delete mode 100644 changelog.d/1404.misc.rst diff --git a/CHANGES.rst b/CHANGES.rst index d52ed48fca..2f96af99c5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v40.0.0 +------- +* #1342: Drop support for Python 3.3. +* #1366: In package_index, fixed handling of encoded entities in URLs. +* #1383: In pkg_resources VendorImporter, avoid removing packages imported from the root. +* #1379: Minor doc fixes after actually using the new release process. +* #1385: Removed section on non-package data files. +* #1403: Fix developer's guide. +* #1404: Fix PEP 518 configuration: set build requirements in ``pyproject.toml`` to ``["wheel"]``. + + v39.2.0 ------- diff --git a/changelog.d/1342.breaking.rst b/changelog.d/1342.breaking.rst deleted file mode 100644 index 9756e313dd..0000000000 --- a/changelog.d/1342.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Drop support for Python 3.3. diff --git a/changelog.d/1366.change.rst b/changelog.d/1366.change.rst deleted file mode 100644 index f70e2a2e8a..0000000000 --- a/changelog.d/1366.change.rst +++ /dev/null @@ -1 +0,0 @@ -In package_index, fixed handling of encoded entities in URLs. diff --git a/changelog.d/1379.doc.rst b/changelog.d/1379.doc.rst deleted file mode 100644 index ca017719e5..0000000000 --- a/changelog.d/1379.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Minor doc fixes after actually using the new release process. diff --git a/changelog.d/1383.change b/changelog.d/1383.change deleted file mode 100644 index dc8b839bff..0000000000 --- a/changelog.d/1383.change +++ /dev/null @@ -1 +0,0 @@ -In pkg_resources VendorImporter, avoid removing packages imported from the root. diff --git a/changelog.d/1385.doc.rst b/changelog.d/1385.doc.rst deleted file mode 100644 index 7bd88e8f21..0000000000 --- a/changelog.d/1385.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed section on non-package data files. diff --git a/changelog.d/1403.doc.rst b/changelog.d/1403.doc.rst deleted file mode 100644 index 1a636085a1..0000000000 --- a/changelog.d/1403.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix developer's guide. diff --git a/changelog.d/1404.misc.rst b/changelog.d/1404.misc.rst deleted file mode 100644 index 2d4bd629fb..0000000000 --- a/changelog.d/1404.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix PEP 518 configuration: set build requirements in ``pyproject.toml`` to ``["wheel"]``. diff --git a/setup.cfg b/setup.cfg index e23ee6f041..2caeca9b76 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 39.2.0 +current_version = 40.0.0 commit = True tag = True diff --git a/setup.py b/setup.py index 22c26dd2d8..27a0e30e02 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="39.2.0", + version="40.0.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From dc9fcbd5ef343321cf29ce1e34f454dadeb59dd2 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 10 Jul 2018 11:16:04 -0400 Subject: [PATCH 7078/8469] Switch over to using six.PY{2,3} when possible --- pkg_resources/py31compat.py | 4 +++- setuptools/command/bdist_egg.py | 2 +- setuptools/extern/__init__.py | 2 +- setuptools/pep425tags.py | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index fd4b6fd088..a381c424f9 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -2,6 +2,8 @@ import errno import sys +from .extern import six + def _makedirs_31(path, exist_ok=False): try: @@ -15,7 +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.major == 2 or + six.PY2 or (3, 4) <= sys.version_info < (3, 4, 1) ) makedirs = _makedirs_31 if needs_makedirs else os.makedirs diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 14530729b9..9f8df917e6 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -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.major == 2: + if six.PY2: skip = 8 # skip magic & date elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 52785a0328..cb2fa32927 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -48,7 +48,7 @@ def load_module(self, fullname): # 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.major >= 3: + if sys.version_info >= (3, ): del sys.modules[extant] return mod except ImportError: diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py index a86a0d183e..8bf4277dbd 100644 --- a/setuptools/pep425tags.py +++ b/setuptools/pep425tags.py @@ -12,6 +12,8 @@ import warnings from collections import OrderedDict +from .extern import six + from . import glibc _osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)') @@ -97,8 +99,8 @@ def get_abi_tag(): lambda: sys.maxunicode == 0x10ffff, expected=4, warn=(impl == 'cp' and - sys.version_info.major == 2)) \ - and sys.version_info.major == 2: + 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-'): From 6e9ea31599c05df83501669def725b9e92b5b033 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 10 Jul 2018 11:54:15 -0400 Subject: [PATCH 7079/8469] Add changelog for PR #1416 --- changelog.d/1416.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1416.change.rst diff --git a/changelog.d/1416.change.rst b/changelog.d/1416.change.rst new file mode 100644 index 0000000000..e4138a8fb6 --- /dev/null +++ b/changelog.d/1416.change.rst @@ -0,0 +1 @@ +Moved several Python version checks over to using ``six.PY2`` and ``six.PY3``. From 209e3ac20fa69c7352e28b2aeeb2898fbbbf87d4 Mon Sep 17 00:00:00 2001 From: JGoutin Date: Tue, 12 Jun 2018 20:39:32 +0200 Subject: [PATCH 7080/8469] Fix "Microsoft Visual C++ Build Tools" link --- setuptools/msvc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 5e20b3f1dd..b9c472f14f 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -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, ) From baa9aea1de4351b96e6e677a8cd95bc5f122087e Mon Sep 17 00:00:00 2001 From: JGoutin Date: Tue, 12 Jun 2018 20:49:08 +0200 Subject: [PATCH 7081/8469] Create 1388.change.rst --- changelog.d/1388.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1388.change.rst diff --git a/changelog.d/1388.change.rst b/changelog.d/1388.change.rst new file mode 100644 index 0000000000..b98dc966df --- /dev/null +++ b/changelog.d/1388.change.rst @@ -0,0 +1 @@ +Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found. From bb36b41818b99079372dbb55b272465820d58de3 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 11 Jul 2018 09:51:44 -0400 Subject: [PATCH 7082/8469] Add test for cache_path race condition This mocks out the isdir call so that the directory is created immediately after you determine whether or not it exists, thus simulating a race condition between two threads or processes creating the same directory. --- pkg_resources/tests/test_pkg_resources.py | 33 ++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 4e2cac9459..62a39b8fa8 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -12,6 +12,11 @@ import distutils.dist import distutils.command.install_egg_info +try: + from unittest import mock +except ImportError: + import mock + from pkg_resources.extern.six.moves import map from pkg_resources.extern.six import text_type, string_types @@ -138,8 +143,34 @@ def test_get_cache_path(self): message = "Unexpected type from get_cache_path: " + type_ assert isinstance(path, string_types), message + def test_get_cache_path_race(self, tmpdir): + # Patch to os.path.isdir to create a race condition + def patched_isdir(dirname, unpatched_isdir=pkg_resources.isdir): + patched_isdir.dirnames.append(dirname) + + was_dir = unpatched_isdir(dirname) + if not was_dir: + os.makedirs(dirname) + return was_dir + + patched_isdir.dirnames = [] + + # Get a cache path with a "race condition" + mgr = pkg_resources.ResourceManager() + mgr.set_extraction_path(str(tmpdir)) + + archive_name = os.sep.join(('foo', 'bar', 'baz')) + with mock.patch.object(pkg_resources, 'isdir', new=patched_isdir): + mgr.get_cache_path(archive_name) + + # Because this test relies on the implementation details of this + # function, these assertions are a sentinel to ensure that the + # test suite will not fail silently if the implementation changes. + called_dirnames = patched_isdir.dirnames + assert len(called_dirnames) == 2 + assert called_dirnames[0].split(os.sep)[-2:] == ['foo', 'bar'] + assert called_dirnames[1].split(os.sep)[-1:] == ['foo'] -class TestIndependence: """ Tests to ensure that pkg_resources runs independently from setuptools. """ From 342443f5034851bbd55823f2c900d7ebabe1b306 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 11 Jul 2018 10:23:55 -0400 Subject: [PATCH 7083/8469] Fix race condition in _bypass_ensure_directory This fixes a race condition in _bypass_ensure_directory where two threads or processes may erroneously fail because they are both creating the same directory. A more robust implementation of this may involve exposing the un-wrapped os.makedirs. Originally reported with proposed patch by @JonKohler in github PR #1412. This patch came out of discussions on that thread. --- pkg_resources/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6701540819..4f42156d0c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -47,6 +47,11 @@ # 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 @@ -3030,7 +3035,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): From 67f190adf28d433f0d43ad5014a3fe66f43eb551 Mon Sep 17 00:00:00 2001 From: Jon Kohler Date: Mon, 9 Jul 2018 13:14:33 -0400 Subject: [PATCH 7084/8469] Changelog for github PR #1418 --- changelog.d/1418.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1418.change.rst diff --git a/changelog.d/1418.change.rst b/changelog.d/1418.change.rst new file mode 100644 index 0000000000..d7656f574b --- /dev/null +++ b/changelog.d/1418.change.rst @@ -0,0 +1 @@ +Solved race in when creating egg cache directories. From e9bdeda02a1be80d295aa8e4b068e4844141512b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 13 Jul 2018 00:02:14 -0400 Subject: [PATCH 7085/8469] Extract name/version functionality from egg_info to be re-used by a dist-info command. Ref #1386. --- setuptools/command/egg_info.py | 61 +++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index f3e604d3f0..5fd6c88803 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -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,9 @@ class egg_info(Command): } def initialize_options(self): - self.egg_name = None - self.egg_version = None self.egg_base = None self.egg_info = None - self.tag_build = None - self.tag_date = 0 self.broken_egg_info = False - self.vtags = None #################################### # allow the 'tag_svn_revision' to be detected and @@ -167,11 +188,15 @@ def save_version_info(self, filename): egg_info['tag_date'] = 0 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() - self.egg_version = self.tagged_version() + @property + def egg_name(self): + return self.name + + @property + def egg_version(self): + return self.tagged_version() + def finalize_options(self): parsed_version = parse_version(self.egg_version) try: @@ -254,14 +279,6 @@ def delete_file(self, filename): 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 @@ def run(self): 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") From f90944775adb861d8de98026be4864e488be9c15 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 13 Jul 2018 00:20:14 -0400 Subject: [PATCH 7086/8469] Relax overfitted test. Fixes #1425. --- setuptools/tests/test_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_register.py b/setuptools/tests/test_register.py index 92d576dbe1..96114595db 100644 --- a/setuptools/tests/test_register.py +++ b/setuptools/tests/test_register.py @@ -18,7 +18,7 @@ def test_warns_deprecation(self): cmd.run() - cmd.announce.assert_called_once_with( + cmd.announce.assert_called_with( "WARNING: Registering is deprecated, use twine to upload instead " "(https://pypi.org/p/twine/)", log.WARN @@ -36,7 +36,7 @@ def test_warns_deprecation_when_raising(self): with pytest.raises(Exception): cmd.run() - cmd.announce.assert_called_once_with( + cmd.announce.assert_called_with( "WARNING: Registering is deprecated, use twine to upload instead " "(https://pypi.org/p/twine/)", log.WARN From b48d4900233169c1143adfdd64aa00230ae13f26 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 14 Jul 2018 19:56:33 -0700 Subject: [PATCH 7087/8469] Add a space after header, so reST rendering isn't mangled. (#1429) * Add a space after header, so reST rendering isn't mangled. * Add newline in template, too. --- CHANGES.rst | 1 + towncrier_template.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 2f96af99c5..05de4cfc84 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,6 @@ v40.0.0 ------- + * #1342: Drop support for Python 3.3. * #1366: In package_index, fixed handling of encoded entities in URLs. * #1383: In pkg_resources VendorImporter, avoid removing packages imported from the root. diff --git a/towncrier_template.rst b/towncrier_template.rst index 9c23b9775f..fbc5ef03b0 100644 --- a/towncrier_template.rst +++ b/towncrier_template.rst @@ -2,6 +2,7 @@ {% set underline = underlines[0] %}{% if section %}{{section}} {{ underline * section|length }} {% endif %} + {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} {% if definitions[category]['showcontent'] %} From 74d0f1dc010170301dafe46faacee84bf246c880 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 16 Jul 2018 19:03:03 +0200 Subject: [PATCH 7088/8469] bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229) bpo-32430: Rename Modules/Setup.dist to Modules/Setup Remove the necessity to copy the former manually to the latter when updating the local source tree. --- sysconfig.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index e07a6c8b94..b433fc86ff 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -36,10 +36,8 @@ # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. -# Setup.local is available for Makefile builds including VPATH builds, -# Setup.dist is available on Windows def _is_python_source_dir(d): - for fn in ("Setup.dist", "Setup.local"): + for fn in ("Setup", "Setup.local"): if os.path.isfile(os.path.join(d, "Modules", fn)): return True return False From b90515f8041352a33c6ca7099be38dee0d5a5cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 20 Jul 2018 16:48:06 +0200 Subject: [PATCH 7089/8469] Make install directory if it doesn't exist yet Problem: In Fedora, `sudo python3 setup.py install` installs to /usr/local/lib/pythonX.Y/site-packages. However that directory is not always there as it is not installed together with the python3 package (Fedora packages should not install stuff to /usr/local). When the directory does not exist an installation attempt fails with: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/site-packages/test-easy-install-11875.write-test' Solution: Make the directory if it doesn't exists yet. If user has no permissions, the above error is preserved, yet with root (sudo) it works now. --- changelog.d/1431.chnage.rst | 3 +++ setuptools/command/easy_install.py | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 changelog.d/1431.chnage.rst diff --git a/changelog.d/1431.chnage.rst b/changelog.d/1431.chnage.rst new file mode 100644 index 0000000000..a5cb324e3c --- /dev/null +++ b/changelog.d/1431.chnage.rst @@ -0,0 +1,3 @@ +Make install directory if it doesn't exist yet to prevent Fedora's +specific setup to blow up if ``/usr/local/lib/pythonX.Y/site-packages`` +doesn't exist yet. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 05508cebe1..5b65b95d8e 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -450,6 +450,12 @@ def check_site_dir(self): instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir, 'easy-install.pth') + if not os.path.exists(instdir): + try: + os.makedirs(instdir) + except (OSError, IOError): + self.cant_write_to_target() + # Is it a configured, PYTHONPATH, implicit, or explicit site dir? is_site_dir = instdir in self.all_site_dirs From 8be16112e6817cc23ee4f317bc58db5f1c7eb108 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 26 Jul 2018 04:23:10 -0700 Subject: [PATCH 7090/8469] bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) --- _msvccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index c9d3c6c671..30b3b47398 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -252,11 +252,11 @@ def initialize(self, plat_name=None): for dir in vc_env.get('include', '').split(os.pathsep): if dir: - self.add_include_dir(dir) + self.add_include_dir(dir.rstrip(os.sep)) for dir in vc_env.get('lib', '').split(os.pathsep): if dir: - self.add_library_dir(dir) + self.add_library_dir(dir.rstrip(os.sep)) self.preprocess_options = None # If vcruntime_redist is available, link against it dynamically. Otherwise, From 760e2e1df9c9c9d1fc072e7b6ad9df4c32bfc835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 27 Jul 2018 14:36:34 +0200 Subject: [PATCH 7091/8469] Remove spurious executable permissions --- README.rst | 0 changelog.d/1441.misc.rst | 1 + easy_install.py | 0 launcher.c | 0 pytest.ini | 0 setup.cfg | 0 setuptools/archive_util.py | 0 setuptools/command/alias.py | 0 setuptools/command/bdist_rpm.py | 0 setuptools/command/bdist_wininst.py | 0 setuptools/command/develop.py | 0 setuptools/command/egg_info.py | 0 setuptools/command/install_egg_info.py | 0 setuptools/command/install_scripts.py | 0 setuptools/command/register.py | 0 setuptools/command/rotate.py | 0 setuptools/command/saveopts.py | 0 setuptools/command/sdist.py | 0 setuptools/command/setopt.py | 0 setuptools/namespaces.py | 0 setuptools/package_index.py | 0 setuptools/sandbox.py | 0 22 files changed, 1 insertion(+) mode change 100755 => 100644 README.rst create mode 100644 changelog.d/1441.misc.rst mode change 100755 => 100644 easy_install.py mode change 100755 => 100644 launcher.c mode change 100755 => 100644 pytest.ini mode change 100755 => 100644 setup.cfg mode change 100755 => 100644 setuptools/archive_util.py mode change 100755 => 100644 setuptools/command/alias.py mode change 100755 => 100644 setuptools/command/bdist_rpm.py mode change 100755 => 100644 setuptools/command/bdist_wininst.py mode change 100755 => 100644 setuptools/command/develop.py mode change 100755 => 100644 setuptools/command/egg_info.py mode change 100755 => 100644 setuptools/command/install_egg_info.py mode change 100755 => 100644 setuptools/command/install_scripts.py mode change 100755 => 100644 setuptools/command/register.py mode change 100755 => 100644 setuptools/command/rotate.py mode change 100755 => 100644 setuptools/command/saveopts.py mode change 100755 => 100644 setuptools/command/sdist.py mode change 100755 => 100644 setuptools/command/setopt.py mode change 100755 => 100644 setuptools/namespaces.py mode change 100755 => 100644 setuptools/package_index.py mode change 100755 => 100644 setuptools/sandbox.py diff --git a/README.rst b/README.rst old mode 100755 new mode 100644 diff --git a/changelog.d/1441.misc.rst b/changelog.d/1441.misc.rst new file mode 100644 index 0000000000..470d4b569a --- /dev/null +++ b/changelog.d/1441.misc.rst @@ -0,0 +1 @@ +Remove spurious executable permissions from files that don't need them. diff --git a/easy_install.py b/easy_install.py old mode 100755 new mode 100644 diff --git a/launcher.c b/launcher.c old mode 100755 new mode 100644 diff --git a/pytest.ini b/pytest.ini old mode 100755 new mode 100644 diff --git a/setup.cfg b/setup.cfg old mode 100755 new mode 100644 diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py old mode 100755 new mode 100644 diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py old mode 100755 new mode 100644 diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py old mode 100755 new mode 100644 diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py old mode 100755 new mode 100644 diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py old mode 100755 new mode 100644 diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py old mode 100755 new mode 100644 diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py old mode 100755 new mode 100644 diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py old mode 100755 new mode 100644 diff --git a/setuptools/command/register.py b/setuptools/command/register.py old mode 100755 new mode 100644 diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py old mode 100755 new mode 100644 diff --git a/setuptools/command/saveopts.py b/setuptools/command/saveopts.py old mode 100755 new mode 100644 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py old mode 100755 new mode 100644 diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py old mode 100755 new mode 100644 diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py old mode 100755 new mode 100644 diff --git a/setuptools/package_index.py b/setuptools/package_index.py old mode 100755 new mode 100644 diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py old mode 100755 new mode 100644 From ea8652e12058fa2b4c6a9a5427d58fff5de8977e Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 9 Aug 2018 15:57:22 +0300 Subject: [PATCH 7092/8469] Upgrade vendored pyparsing from 2.1.10 to 2.2.0 --- pkg_resources/_vendor/pyparsing.py | 54 +++++++++++++++++++++--------- setuptools/_vendor/pyparsing.py | 54 +++++++++++++++++++++--------- 2 files changed, 78 insertions(+), 30 deletions(-) diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py index a21224359e..e8aefc8ca1 100644 --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -60,8 +60,8 @@ class names, and the use of '+', '|' and '^' operators. - 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 " import string @@ -144,7 +144,7 @@ def _ustr(obj): 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 @@ def __lookup(self,sub): 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 @@ def breaker(instring, loc, doActions=True, callPreParse=True): 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 @@ def setParseAction( self, *fns, **kwargs ): def addParseAction( self, *fns, **kwargs ): """ - Add parse action to expression's list of parse actions. See L{I{setParseAction}}. + Add one or more parse actions to expression's list of parse actions. See L{I{setParseAction}}. See examples in L{I{copy}}. """ @@ -1443,10 +1443,14 @@ def set(self, key, value): 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 @@ def get(self, key): 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 @@ def get(self, key): 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 @@ def clear(self): 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 @@ def searchString( self, instring, maxMatches=_MAX_INT ): 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 @@ def __sub__(self, other): 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 @@ def charsAsStr(s): 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...)}), these will be preserved as @@ -2911,7 +2930,7 @@ def parseImpl( self, instring, loc, doActions=True ): # 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 diff --git a/setuptools/_vendor/pyparsing.py b/setuptools/_vendor/pyparsing.py index a21224359e..e8aefc8ca1 100644 --- a/setuptools/_vendor/pyparsing.py +++ b/setuptools/_vendor/pyparsing.py @@ -60,8 +60,8 @@ class names, and the use of '+', '|' and '^' operators. - 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 " import string @@ -144,7 +144,7 @@ def _ustr(obj): 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 @@ def __lookup(self,sub): 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 @@ def breaker(instring, loc, doActions=True, callPreParse=True): 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 @@ def setParseAction( self, *fns, **kwargs ): def addParseAction( self, *fns, **kwargs ): """ - Add parse action to expression's list of parse actions. See L{I{setParseAction}}. + Add one or more parse actions to expression's list of parse actions. See L{I{setParseAction}}. See examples in L{I{copy}}. """ @@ -1443,10 +1443,14 @@ def set(self, key, value): 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 @@ def get(self, key): 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 @@ def get(self, key): 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 @@ def clear(self): 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 @@ def searchString( self, instring, maxMatches=_MAX_INT ): 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 @@ def __sub__(self, other): 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 @@ def charsAsStr(s): 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...)}), these will be preserved as @@ -2911,7 +2930,7 @@ def parseImpl( self, instring, loc, doActions=True ): # 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 From 306d77a044a20e58f2a786da31b6061fabd1f44a Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 9 Aug 2018 17:43:54 +0300 Subject: [PATCH 7093/8469] Add changelog --- changelog.d/1450.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1450.change.rst diff --git a/changelog.d/1450.change.rst b/changelog.d/1450.change.rst new file mode 100644 index 0000000000..38f906e303 --- /dev/null +++ b/changelog.d/1450.change.rst @@ -0,0 +1 @@ +Upgrade vendored PyParsing from 2.1.10 to 2.2.0. From 9755c3bc2bf1fe50bf67dccb583ffad9d57f7bab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Aug 2018 11:58:08 -0400 Subject: [PATCH 7094/8469] Rewrite loop as single generator expression. --- pkg_resources/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4f42156d0c..86ec3411bd 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -645,13 +645,12 @@ def iter_entry_points(self, group, name=None): 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""" From 79d2a47528a35c3c955e117b3912fe0ac7dc36e2 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 11 Aug 2018 19:06:46 +0200 Subject: [PATCH 7095/8469] tox: fix configuration so newer tox versions are supported Starting with tox 3.2.0, the commands for installing/listing dependencies changed from pip to python -m pip, which is problematic as this will leave bits of the previous (from the virtualenv creation) older version of setuptools installed in the site-packages directory because from pip's point of view, the active setuptools version is the one in the current directory (which cannot be uninstalled). Fix #1453. --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 1a369653fc..3b03b7db17 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,12 @@ envlist=python [testenv] deps=-rtests/requirements.txt +# Changed from default (`python -m pip ...`) +# to prevent the current working directory +# from being added to `sys.path`. +install_command={envbindir}/pip install {opts} {packages} +# Same as above. +list_dependencies_command={envbindir}/pip freeze setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. From 0254a2fda8e8bd4f289d01e2179191e936517f04 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Fri, 17 Aug 2018 14:58:35 +0200 Subject: [PATCH 7096/8469] Rename find_namepaces_ns to find_namespace_packages (#1423) * fix #1419 PEP420: add find_namespace: directive * fix #1419 PEP420: add find_namespace: directive to documentation * fix #1419 PEP420: add tests * fix #1419 PEP420: clean up code * fix #1419 PEP420: fix typo in documentation * fix #1419 PEP420: fix typo in documentation * fix #1419 PEP420: clean up code * fix #1419 PEP420: add changelog entry * fixup! fix #1419 PEP420: add tests * fix #1419 PEP420: cleanup code refactor markers * #1420: Rename find_namespace_ns to find_namespace_packages * #1420: update changelog entry --- changelog.d/1312.change.rst | 2 +- changelog.d/1420.change.rst | 1 + docs/setuptools.txt | 35 +++++++------- setuptools/__init__.py | 4 +- setuptools/config.py | 16 +++++-- setuptools/tests/__init__.py | 12 +++++ setuptools/tests/test_config.py | 64 ++++++++++++++++++++++++-- setuptools/tests/test_find_packages.py | 16 +++---- 8 files changed, 115 insertions(+), 35 deletions(-) create mode 100644 changelog.d/1420.change.rst diff --git a/changelog.d/1312.change.rst b/changelog.d/1312.change.rst index 9314f9e142..e2542f98fd 100644 --- a/changelog.d/1312.change.rst +++ b/changelog.d/1312.change.rst @@ -1 +1 @@ -Introduce find_packages_ns() to find PEP 420 namespace packages. +Introduce find_namespace_packages() to find PEP 420 namespace packages. diff --git a/changelog.d/1420.change.rst b/changelog.d/1420.change.rst new file mode 100644 index 0000000000..6967adccb0 --- /dev/null +++ b/changelog.d/1420.change.rst @@ -0,0 +1 @@ +Add find_namespace: directive to config parser diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 0660e14d5d..89f45bd857 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -57,7 +57,7 @@ Feature Highlights: * Create extensible applications and frameworks that automatically discover extensions, using simple "entry points" declared in a project's setup script. -* Full support for PEP 420 via ``find_packages_ns()``, which is also backwards +* Full support for PEP 420 via ``find_namespace_packages()``, which is also backwards compatible to the existing ``find_packages()`` for Python >= 3.3. .. contents:: **Table of Contents** @@ -462,18 +462,18 @@ argument in your setup script. Especially since it frees you from having to remember to modify your setup script whenever your project grows additional top-level packages or subpackages. -``find_packages_ns()`` ----------------------- -In Python 3.3+, ``setuptools`` also provides the ``find_packages_ns`` variant +``find_namespace_packages()`` +----------------------------- +In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant of ``find_packages``, which has the same function signature as ``find_packages``, but works with `PEP 420`_ compliant implicit namespace -packages. Here is a minimal setup script using ``find_packages_ns``:: +packages. Here is a minimal setup script using ``find_namespace_packages``:: - from setuptools import setup, find_packages_ns + from setuptools import setup, find_namespace_packages setup( name="HelloWorld", version="0.1", - packages=find_packages_ns(), + packages=find_namespace_packages(), ) @@ -490,16 +490,16 @@ namespace package is quite lenient, so for a project organized like so:: └── tests └── test_mod1.py -A naive ``find_packages_ns()`` would install both ``namespace.mypackage`` and a +A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a top-level package called ``tests``! One way to avoid this problem is to use the ``include`` keyword to whitelist the packages to include, like so:: - from setuptools import setup, find_packages_ns + from setuptools import setup, find_namespace_packages setup( name="namespace.mypackage", version="0.1", - packages=find_packages_ns(include=['namespace.*']) + packages=find_namespace_packages(include=['namespace.*']) ) Another option is to use the "src" layout, where all package code is placed in @@ -520,7 +520,7 @@ With this layout, the package directory is specified as ``src``, as such:: setup(name="namespace.mypackage", version="0.1", package_dir={'': 'src'}, - packages=find_packages_ns(where='src')) + packages=find_namespace_packages(where='src')) .. _PEP 420: https://www.python.org/dev/peps/pep-0420/ @@ -2389,8 +2389,8 @@ Metadata and options are set in the config sections of the same name. * In some cases, complex values can be provided in dedicated subsections for clarity. -* Some keys allow ``file:``, ``attr:``, and ``find:`` directives in order to - cover common usecases. +* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in + order to cover common usecases. * Unknown keys are ignored. @@ -2479,7 +2479,7 @@ eager_resources list-comma dependency_links list-comma tests_require list-semi include_package_data bool -packages find:, list-comma +packages find:, find_namespace:, list-comma package_dir dict package_data section exclude_package_data section @@ -2489,10 +2489,13 @@ py_modules list-comma .. note:: - **packages** - The ``find:`` directive can be further configured + **packages** - The ``find:`` and ``find_namespace:`` directive can be further configured in a dedicated subsection ``options.packages.find``. This subsection - accepts the same keys as the `setuptools.find` function: + accepts the same keys as the `setuptools.find_packages` and the + `setuptools.find_namespace_packages` function: ``where``, ``include``, and ``exclude``. + + **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. Configuration API diff --git a/setuptools/__init__.py b/setuptools/__init__.py index e705f0d1af..54309b57fe 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -26,7 +26,7 @@ ] if PY3: - __all__.append('find_packages_ns') + __all__.append('find_namespace_packages') __version__ = setuptools.version.__version__ @@ -118,7 +118,7 @@ def _looks_like_package(path): find_packages = PackageFinder.find if PY3: - find_packages_ns = PEP420PackageFinder.find + find_namespace_packages = PEP420PackageFinder.find def _install_setup_requires(attrs): diff --git a/setuptools/config.py b/setuptools/config.py index 5f908cf129..0da3dbc9cf 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -8,7 +8,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.extern.packaging.version import LegacyVersion, parse -from setuptools.extern.six import string_types +from setuptools.extern.six import string_types, PY3 __metaclass__ = type @@ -515,16 +515,24 @@ def _parse_packages(self, value): :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) diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 54dd7d2b20..5f4a1c2958 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -2,5 +2,17 @@ import pytest +from setuptools.extern.six import PY2, PY3 + + +__all__ = [ + 'fail_on_ascii', 'py2_only', 'py3_only' +] + + is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968' fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") + + +py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only") +py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only") diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 19b3763363..acf221549b 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -4,18 +4,20 @@ from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration - +from . import py2_only, py3_only class ErrConfigHandler(ConfigHandler): """Erroneous handler. Fails to implement required methods.""" -def make_package_dir(name, base_dir): +def make_package_dir(name, base_dir, ns=False): dir_package = base_dir for dir_name in name.split('/'): dir_package = dir_package.mkdir(dir_name) - init_file = dir_package.join('__init__.py') - init_file.write('') + init_file = None + if not ns: + init_file = dir_package.join('__init__.py') + init_file.write('') return dir_package, init_file @@ -596,6 +598,60 @@ def test_find_directive(self, tmpdir): assert set(dist.packages) == set( ['fake_package', 'fake_package.sub_two']) + @py2_only + def test_find_namespace_directive_fails_on_py2(self, tmpdir): + dir_package, config = fake_env( + tmpdir, + '[options]\n' + 'packages = find_namespace:\n' + ) + + with pytest.raises(DistutilsOptionError): + with get_dist(tmpdir) as dist: + dist.parse_config_files() + + @py3_only + def test_find_namespace_directive(self, tmpdir): + dir_package, config = fake_env( + tmpdir, + '[options]\n' + 'packages = find_namespace:\n' + ) + + dir_sub_one, _ = make_package_dir('sub_one', dir_package) + dir_sub_two, _ = make_package_dir('sub_two', dir_package, ns=True) + + with get_dist(tmpdir) as dist: + assert set(dist.packages) == { + 'fake_package', 'fake_package.sub_two', 'fake_package.sub_one' + } + + config.write( + '[options]\n' + 'packages = find_namespace:\n' + '\n' + '[options.packages.find]\n' + 'where = .\n' + 'include =\n' + ' fake_package.sub_one\n' + ' two\n' + ) + with get_dist(tmpdir) as dist: + assert dist.packages == ['fake_package.sub_one'] + + config.write( + '[options]\n' + 'packages = find_namespace:\n' + '\n' + '[options.packages.find]\n' + 'exclude =\n' + ' fake_package.sub_one\n' + ) + with get_dist(tmpdir) as dist: + assert set(dist.packages) == { + 'fake_package', 'fake_package.sub_two' + } + def test_extras_require(self, tmpdir): fake_env( tmpdir, diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index 02ae5a946d..b08f91c7d5 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -7,12 +7,12 @@ import pytest +from . import py3_only + from setuptools.extern.six import PY3 from setuptools import find_packages - -py3_only = pytest.mark.xfail(not PY3, reason="Test runs on Python 3 only") if PY3: - from setuptools import find_packages_ns + from setuptools import find_namespace_packages # modeled after CPython's test.support.can_symlink @@ -156,26 +156,26 @@ def _assert_packages(self, actual, expected): @py3_only def test_pep420_ns_package(self): - packages = find_packages_ns( + packages = find_namespace_packages( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) @py3_only def test_pep420_ns_package_no_includes(self): - packages = find_packages_ns( + packages = find_namespace_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) @py3_only def test_pep420_ns_package_no_includes_or_excludes(self): - packages = find_packages_ns(self.dist_dir) + packages = find_namespace_packages(self.dist_dir) expected = ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self._assert_packages(packages, expected) @py3_only def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) - packages = find_packages_ns( + packages = find_namespace_packages( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) @@ -183,6 +183,6 @@ def test_regular_package_with_nested_pep420_ns_packages(self): def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) - packages = find_packages_ns(self.dist_dir) + packages = find_namespace_packages(self.dist_dir) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) From 248ba511439402fc367ec808a97b1de40fdefbdf Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 9 Aug 2018 17:31:47 +0300 Subject: [PATCH 7097/8469] Upgrade vendored appdirs from 1.4.0 to 1.4.3 --- pkg_resources/_vendor/appdirs.py | 86 ++++++++++++++++++++++++------ pkg_resources/_vendor/vendored.txt | 4 +- setuptools/_vendor/vendored.txt | 2 +- 3 files changed, 74 insertions(+), 18 deletions(-) diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py index f4dba0953c..ae67001af8 100644 --- a/pkg_resources/_vendor/appdirs.py +++ b/pkg_resources/_vendor/appdirs.py @@ -13,7 +13,7 @@ # - 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/', if XDG_DATA_DIRS is not set - Typical user data directories are: + Typical site data directories are: Mac OS X: /Library/Application Support/ Unix: /usr/local/share/ or /usr/share/ Win XP: C:\Documents and Settings\All Users\Application Data\\ @@ -184,13 +184,13 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): 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/ # 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/". + That means, by default "~/.config/". """ 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/', 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/ or $XDG_CONFIG_DIRS[i]/ 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 ".". + 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 + + for a discussion of issues. + + Typical user state directories are: + Mac OS X: same as user_data_dir + Unix: ~/.local/state/ # or in $XDG_STATE_HOME, if defined + Win *: same as user_data_dir + + For Unix, we follow this Debian proposal + to extend the XDG spec and support $XDG_STATE_HOME. + + That means, by default "~/.local/state/". + """ + 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/ Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\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 @@ def user_cache_dir(self): 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 @@ def _get_win_folder_with_jna(csidl_name): 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") diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 9a94c5bcc2..e3d564f163 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ packaging==16.8 -pyparsing==2.1.10 +pyparsing==2.2.0 six==1.10.0 -appdirs==1.4.0 +appdirs==1.4.3 diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index be3e72eb30..ca0d5ce38e 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,3 +1,3 @@ packaging==16.8 -pyparsing==2.1.10 +pyparsing==2.2.0 six==1.10.0 From 993f6d870f1420d38ad0745d034a5e9cb90d7c32 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 9 Aug 2018 17:42:56 +0300 Subject: [PATCH 7098/8469] Add changelog --- changelog.d/1451.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1451.change.rst diff --git a/changelog.d/1451.change.rst b/changelog.d/1451.change.rst new file mode 100644 index 0000000000..236efd8508 --- /dev/null +++ b/changelog.d/1451.change.rst @@ -0,0 +1 @@ +Upgrade vendored appdirs from 1.4.0 to 1.4.3. From 8d887526f34f8955d7df257a24e8e8cf9f3f16de Mon Sep 17 00:00:00 2001 From: Daniele Esposti Date: Sat, 16 Jun 2018 16:05:49 +0200 Subject: [PATCH 7099/8469] Support scripts with unicode content This also renames the _to_ascii function to better reflect its purpose. --- setuptools/command/easy_install.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 05508cebe1..dd17cc13f5 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -96,7 +96,7 @@ def samefile(p1, p2): if six.PY2: - def _to_ascii(s): + def _to_bytes(s): return s def isascii(s): @@ -107,8 +107,8 @@ def isascii(s): return False else: - def _to_ascii(s): - return s.encode('ascii') + def _to_bytes(s): + return s.encode('utf8') def isascii(s): try: @@ -805,7 +805,7 @@ def install_script(self, dist, script_name, script_text, dev_path=None): 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): From 961387fb4112d631e4ddc1f48467205bc77d7fe6 Mon Sep 17 00:00:00 2001 From: Daniele Esposti Date: Wed, 11 Jul 2018 08:53:13 +0100 Subject: [PATCH 7100/8469] Added test for scripts with unicode --- setuptools/tests/test_easy_install.py | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 345d283c31..80a6549734 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -185,6 +185,58 @@ def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): cmd.ensure_finalized() cmd.easy_install(sdist_unicode) + @pytest.fixture + def sdist_unicode_in_script(self, tmpdir): + files = [ + ( + "setup.py", + DALS(""" + import setuptools + setuptools.setup( + name="setuptools-test-unicode", + version="1.0", + packages=["mypkg"], + include_package_data=True, + scripts=['mypkg/unicode_in_script'], + ) + """), + ), + ("mypkg/__init__.py", ""), + ( + "mypkg/unicode_in_script", + DALS( + """ + #!/bin/sh + # \xc3\xa1 + + non_python_fn() { + } + """), + ), + ] + sdist_name = "setuptools-test-unicode-script-1.0.zip" + sdist = tmpdir / sdist_name + # can't use make_sdist, because the issue only occurs + # with zip sdists. + sdist_zip = zipfile.ZipFile(str(sdist), "w") + for filename, content in files: + sdist_zip.writestr(filename, content) + sdist_zip.close() + return str(sdist) + + @fail_on_ascii + def test_unicode_content_in_sdist(self, sdist_unicode_in_script, tmpdir, monkeypatch): + """ + The install command should execute correctly even if + the package has unicode in scripts. + """ + dist = Distribution({"script_args": ["easy_install"]}) + target = (tmpdir / "target").ensure_dir() + cmd = ei.easy_install(dist, install_dir=str(target), args=["x"]) + monkeypatch.setitem(os.environ, "PYTHONPATH", str(target)) + cmd.ensure_finalized() + cmd.easy_install(sdist_unicode_in_script) + @pytest.fixture def sdist_script(self, tmpdir): files = [ From c43d0f6fbbdf7386cb65b6a4c74adaadea76793d Mon Sep 17 00:00:00 2001 From: Daniele Esposti Date: Sat, 16 Jun 2018 02:07:27 +0200 Subject: [PATCH 7101/8469] Add changelog for PR #1389 --- changelog.d/1389.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1389.change.rst diff --git a/changelog.d/1389.change.rst b/changelog.d/1389.change.rst new file mode 100644 index 0000000000..1177b92498 --- /dev/null +++ b/changelog.d/1389.change.rst @@ -0,0 +1 @@ +Scripts which have unicode content are now supported From 96a81b6d70de9748af8135a6f3a888c0959f3ac2 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 17 Aug 2018 09:06:57 -0400 Subject: [PATCH 7102/8469] Add .gitignore to changelog.d Add an empty .gitignore to changelog.d to prevent the directory from being deleted when it is emptied out during a release. --- changelog.d/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog.d/.gitignore diff --git a/changelog.d/.gitignore b/changelog.d/.gitignore new file mode 100644 index 0000000000..e69de29bb2 From 115fab8b601de84c9841c1172ebe43a8610144cb Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 17 Aug 2018 10:23:27 -0400 Subject: [PATCH 7103/8469] Prepare 40.1.0 release --- CHANGES.rst | 15 +++++++++++++++ changelog.d/1312.change.rst | 1 - changelog.d/1388.change.rst | 1 - changelog.d/1389.change.rst | 1 - changelog.d/1410.change.rst | 1 - changelog.d/1416.change.rst | 1 - changelog.d/1418.change.rst | 1 - changelog.d/1420.change.rst | 1 - changelog.d/1441.misc.rst | 1 - changelog.d/1450.change.rst | 1 - changelog.d/1451.change.rst | 1 - 11 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 changelog.d/1312.change.rst delete mode 100644 changelog.d/1388.change.rst delete mode 100644 changelog.d/1389.change.rst delete mode 100644 changelog.d/1410.change.rst delete mode 100644 changelog.d/1416.change.rst delete mode 100644 changelog.d/1418.change.rst delete mode 100644 changelog.d/1420.change.rst delete mode 100644 changelog.d/1441.misc.rst delete mode 100644 changelog.d/1450.change.rst delete mode 100644 changelog.d/1451.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 05de4cfc84..cc43156f97 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,18 @@ +v40.1.0 +------- + +* #1410: Deprecated ``upload`` and ``register`` commands. +* #1312: Introduced find_namespace_packages() to find PEP 420 namespace packages. +* #1420: Added find_namespace: directive to config parser. +* #1418: Solved race in when creating egg cache directories. +* #1450: Upgraded vendored PyParsing from 2.1.10 to 2.2.0. +* #1451: Upgraded vendored appdirs from 1.4.0 to 1.4.3. +* #1388: Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found. +* #1389: Added support for scripts which have unicode content. +* #1416: Moved several Python version checks over to using ``six.PY2`` and ``six.PY3``. +* #1441: Removed spurious executable permissions from files that don't need them. + + v40.0.0 ------- diff --git a/changelog.d/1312.change.rst b/changelog.d/1312.change.rst deleted file mode 100644 index e2542f98fd..0000000000 --- a/changelog.d/1312.change.rst +++ /dev/null @@ -1 +0,0 @@ -Introduce find_namespace_packages() to find PEP 420 namespace packages. diff --git a/changelog.d/1388.change.rst b/changelog.d/1388.change.rst deleted file mode 100644 index b98dc966df..0000000000 --- a/changelog.d/1388.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found. diff --git a/changelog.d/1389.change.rst b/changelog.d/1389.change.rst deleted file mode 100644 index 1177b92498..0000000000 --- a/changelog.d/1389.change.rst +++ /dev/null @@ -1 +0,0 @@ -Scripts which have unicode content are now supported diff --git a/changelog.d/1410.change.rst b/changelog.d/1410.change.rst deleted file mode 100644 index ab6162ce79..0000000000 --- a/changelog.d/1410.change.rst +++ /dev/null @@ -1 +0,0 @@ -Deprecate ``upload`` and ``register`` commands. diff --git a/changelog.d/1416.change.rst b/changelog.d/1416.change.rst deleted file mode 100644 index e4138a8fb6..0000000000 --- a/changelog.d/1416.change.rst +++ /dev/null @@ -1 +0,0 @@ -Moved several Python version checks over to using ``six.PY2`` and ``six.PY3``. diff --git a/changelog.d/1418.change.rst b/changelog.d/1418.change.rst deleted file mode 100644 index d7656f574b..0000000000 --- a/changelog.d/1418.change.rst +++ /dev/null @@ -1 +0,0 @@ -Solved race in when creating egg cache directories. diff --git a/changelog.d/1420.change.rst b/changelog.d/1420.change.rst deleted file mode 100644 index 6967adccb0..0000000000 --- a/changelog.d/1420.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add find_namespace: directive to config parser diff --git a/changelog.d/1441.misc.rst b/changelog.d/1441.misc.rst deleted file mode 100644 index 470d4b569a..0000000000 --- a/changelog.d/1441.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Remove spurious executable permissions from files that don't need them. diff --git a/changelog.d/1450.change.rst b/changelog.d/1450.change.rst deleted file mode 100644 index 38f906e303..0000000000 --- a/changelog.d/1450.change.rst +++ /dev/null @@ -1 +0,0 @@ -Upgrade vendored PyParsing from 2.1.10 to 2.2.0. diff --git a/changelog.d/1451.change.rst b/changelog.d/1451.change.rst deleted file mode 100644 index 236efd8508..0000000000 --- a/changelog.d/1451.change.rst +++ /dev/null @@ -1 +0,0 @@ -Upgrade vendored appdirs from 1.4.0 to 1.4.3. From d2346c91804333b29fe63b8e1414cd764eb1ef5f Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 17 Aug 2018 17:36:20 +0300 Subject: [PATCH 7104/8469] xfail namespace packages tests on appveyor instead of skipping them --- setuptools/tests/test_namespaces.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 00ec75b45d..52ac6a68ab 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -14,8 +14,10 @@ class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 5), reason="Requires importlib.util.module_from_spec") - @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851") + @pytest.mark.xfail( + os.environ.get("APPVEYOR"), + reason="https://github.com/pypa/setuptools/issues/851", + ) def test_mixed_site_and_non_site(self, tmpdir): """ Installing two packages sharing the same namespace, one installed @@ -55,8 +57,10 @@ def test_mixed_site_and_non_site(self, tmpdir): with test.test.paths_on_pythonpath(map(str, targets)): subprocess.check_call(try_import) - @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851") + @pytest.mark.xfail( + os.environ.get("APPVEYOR"), + reason="https://github.com/pypa/setuptools/issues/851", + ) def test_pkg_resources_import(self, tmpdir): """ Ensure that a namespace package doesn't break on import @@ -81,8 +85,10 @@ def test_pkg_resources_import(self, tmpdir): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(try_import) - @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851") + @pytest.mark.xfail( + os.environ.get("APPVEYOR"), + reason="https://github.com/pypa/setuptools/issues/851", + ) def test_namespace_package_installed_and_cwd(self, tmpdir): """ Installing a namespace packages but also having it in the current @@ -110,8 +116,10 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) - @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), - reason="https://github.com/pypa/setuptools/issues/851") + @pytest.mark.xfail( + os.environ.get("APPVEYOR"), + reason="https://github.com/pypa/setuptools/issues/851", + ) def test_packages_in_the_sampe_namespace_installed_and_cwd(self, tmpdir): """ Installing one namespace package and also have another in the same From 1fc75056079f49d980dd664222bae47a713906ca Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 17 Aug 2018 17:38:22 +0300 Subject: [PATCH 7105/8469] change formatting to fix flake8 warning --- setuptools/tests/test_namespaces.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 52ac6a68ab..839f565163 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -12,8 +12,10 @@ class TestNamespaces: - @pytest.mark.xfail(sys.version_info < (3, 5), - reason="Requires importlib.util.module_from_spec") + @pytest.mark.xfail( + sys.version_info < (3, 5), + reason="Requires importlib.util.module_from_spec", + ) @pytest.mark.xfail( os.environ.get("APPVEYOR"), reason="https://github.com/pypa/setuptools/issues/851", From d63b6b5b9fb63c0bfb83fb91edee10114c932e54 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 17 Aug 2018 14:49:56 -0400 Subject: [PATCH 7106/8469] =?UTF-8?q?Bump=20version:=2040.0.0=20=E2=86=92?= =?UTF-8?q?=2040.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 2caeca9b76..870d629962 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.0.0 +current_version = 40.1.0 commit = True tag = True diff --git a/setup.py b/setup.py index 27a0e30e02..526a7ba6d3 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.0.0", + version="40.1.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 6f58adff3ffef015de299e24720dca3997878a71 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 13 Jul 2018 15:17:49 +0100 Subject: [PATCH 7107/8469] gitignore: Ignore .venv directory These are commonly used for testing purposes. Signed-off-by: Stephen Finucane --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b850622f3f..1f58eb319c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ setuptools.egg-info .coverage .eggs .tox +.venv *.egg *.py[cod] *.swp From cf50418d36c80b35e0f791a96f0a828705ebf25f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 13 Jul 2018 15:20:46 +0100 Subject: [PATCH 7108/8469] trivial: Fix file permissions There's no reason these should be executable. Signed-off-by: Stephen Finucane --- setuptools/command/easy_install.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 setuptools/command/easy_install.py diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py old mode 100755 new mode 100644 From 47874756915a9a757f81d87f32ef5bfa2a333a26 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 13 Jul 2018 15:59:55 +0100 Subject: [PATCH 7109/8469] egg_info: Touch 'egg-info' directory 'tox' determines whether a package should be rebuilt by comparing the timestamp of the package's 'egg-info' directory and its 'setup.py' or 'setup.cfg' files [1][2]. Unfortunately this checks the 'egg-info' directory itself, which is not updated, unlike the contents of that directory. This means that 'tox' will always rebuild the package once one of the two setup files has been updated. While this is clearly a bug in 'tox' that should be fixed separately, there is merit in using this as a heuristic so enable it. [1] https://github.com/tox-dev/tox/blob/3.1.0/src/tox/venv.py#L253-L257 [2] https://github.com/tox-dev/tox/blob/3.1.0/src/tox/venv.py#L221-L244 Signed-off-by: Stephen Finucane --- changelog.d/1427.change.rst | 1 + setuptools/command/egg_info.py | 1 + setuptools/tests/test_egg_info.py | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 changelog.d/1427.change.rst diff --git a/changelog.d/1427.change.rst b/changelog.d/1427.change.rst new file mode 100644 index 0000000000..86260235a4 --- /dev/null +++ b/changelog.d/1427.change.rst @@ -0,0 +1 @@ +Set timestamp of ``.egg-info`` directory whenever ``egg_info`` command is run. diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5fd6c88803..a3cd35dc15 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -281,6 +281,7 @@ def delete_file(self, filename): def run(self): self.mkpath(self.egg_info) + os.utime(self.egg_info, None) installer = self.distribution.fetch_build_egg for ep in iter_entry_points('egg_info.writers'): ep.require(installer=installer) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1a100266ea..c7a082953a 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,9 +1,11 @@ +import datetime import sys import ast import os import glob import re import stat +import time from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution @@ -146,6 +148,21 @@ def test_expected_files_produced(self, tmpdir_cwd, env): ] assert sorted(actual) == expected + def test_rebuilt(self, tmpdir_cwd, env): + """Ensure timestamps are updated when the command is re-run.""" + self._create_project() + + self._run_egg_info_command(tmpdir_cwd, env) + timestamp_a = os.path.getmtime('foo.egg-info') + + # arbitrary sleep just to handle *really* fast systems + time.sleep(.001) + + self._run_egg_info_command(tmpdir_cwd, env) + timestamp_b = os.path.getmtime('foo.egg-info') + + assert timestamp_a != timestamp_b + def test_manifest_template_is_read(self, tmpdir_cwd, env): self._create_project() build_files({ From 83c7d77abdaf4f802cd651fb59de77c72dc94cfe Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Mon, 20 Aug 2018 15:25:14 +0100 Subject: [PATCH 7110/8469] PEP 517 hook arguments are unicode, not str (and distutils objects to that) --- setuptools/build_meta.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 609ea1e510..fb657a5462 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -61,6 +61,19 @@ def patch(cls): 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 From 337c008c33ab5799911cc7a8f4e8ff93e715a73b Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 21 Aug 2018 01:54:51 +0200 Subject: [PATCH 7111/8469] setuptools: fix regression with `egg_info` command Ensure version is tagged only once. --- changelog.d/1465.change.rst | 1 + setuptools/command/egg_info.py | 16 ++++++++-------- setuptools/tests/test_egg_info.py | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 changelog.d/1465.change.rst diff --git a/changelog.d/1465.change.rst b/changelog.d/1465.change.rst new file mode 100644 index 0000000000..93e3e2e244 --- /dev/null +++ b/changelog.d/1465.change.rst @@ -0,0 +1 @@ +Fix regression with `egg_info` command when tagging is used. diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5fd6c88803..74350cbd1a 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -160,7 +160,9 @@ class egg_info(InfoCommon, Command): def initialize_options(self): self.egg_base = None + self.egg_name = None self.egg_info = None + self.egg_version = None self.broken_egg_info = False #################################### @@ -188,15 +190,13 @@ def save_version_info(self, filename): egg_info['tag_date'] = 0 edit_config(filename, dict(egg_info=egg_info)) - @property - def egg_name(self): - return self.name - - @property - def egg_version(self): - return self.tagged_version() - def finalize_options(self): + # 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: diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1a100266ea..17d40fb894 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -570,3 +570,19 @@ def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): raise AssertionError(data) if output: assert output in data + + def test_egg_info_tag_only_once(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'setup.cfg': DALS(""" + [egg_info] + tag_build = dev + tag_date = 0 + tag_svn_revision = 0 + """), + }) + self._run_egg_info_command(tmpdir_cwd, env) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + assert 'Version: 0.0.0.dev0' in pkg_info_lines From 785feaf7981fac8731a750f6ed1f6a19561c50ed Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Tue, 21 Aug 2018 09:51:03 +0100 Subject: [PATCH 7112/8469] Add a test for a Unicode metadata directory --- setuptools/tests/test_build_meta.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index b39b7b8f90..c1be3eda92 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -126,3 +126,12 @@ def test_prepare_metadata_for_build_wheel(build_backend): dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) + + +def test_prepare_metadata_for_build_wheel_with_unicode(build_backend): + dist_dir = os.path.abspath(u'pip-dist-info') + os.makedirs(dist_dir) + + dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) From 687cfab49529e530af4091ddf126a476681b7fd3 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Tue, 21 Aug 2018 09:59:58 +0100 Subject: [PATCH 7113/8469] Add a changelog entry --- changelog.d/1466.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1466.change.rst diff --git a/changelog.d/1466.change.rst b/changelog.d/1466.change.rst new file mode 100644 index 0000000000..7818bfc10d --- /dev/null +++ b/changelog.d/1466.change.rst @@ -0,0 +1 @@ +Fix handling of Unicode arguments in PEP 517 backend From 0553c91f1c08d0426574bc996e377706a6df3e1a Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Tue, 21 Aug 2018 14:01:26 +0300 Subject: [PATCH 7114/8469] remove xfail for namespace tests that actually pass in AppVeyor --- setuptools/tests/test_namespaces.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 839f565163..f2acff84f3 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -59,10 +59,6 @@ def test_mixed_site_and_non_site(self, tmpdir): with test.test.paths_on_pythonpath(map(str, targets)): subprocess.check_call(try_import) - @pytest.mark.xfail( - os.environ.get("APPVEYOR"), - reason="https://github.com/pypa/setuptools/issues/851", - ) def test_pkg_resources_import(self, tmpdir): """ Ensure that a namespace package doesn't break on import @@ -87,10 +83,6 @@ def test_pkg_resources_import(self, tmpdir): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(try_import) - @pytest.mark.xfail( - os.environ.get("APPVEYOR"), - reason="https://github.com/pypa/setuptools/issues/851", - ) def test_namespace_package_installed_and_cwd(self, tmpdir): """ Installing a namespace packages but also having it in the current @@ -118,11 +110,7 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) - @pytest.mark.xfail( - os.environ.get("APPVEYOR"), - reason="https://github.com/pypa/setuptools/issues/851", - ) - def test_packages_in_the_sampe_namespace_installed_and_cwd(self, tmpdir): + def test_packages_in_the_same_namespace_installed_and_cwd(self, tmpdir): """ Installing one namespace package and also have another in the same namespace in the current working directory, both of them must be From 172a572840cb19ec65d4541a557cd79d3865297a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 08:33:26 -0400 Subject: [PATCH 7115/8469] =?UTF-8?q?Bump=20version:=2040.1.0=20=E2=86=92?= =?UTF-8?q?=2040.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1465.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1465.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index cc43156f97..5c52e9405f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +vv40.1.1 +-------- + +* #1465: Fix regression with `egg_info` command when tagging is used. + + v40.1.0 ------- diff --git a/changelog.d/1465.change.rst b/changelog.d/1465.change.rst deleted file mode 100644 index 93e3e2e244..0000000000 --- a/changelog.d/1465.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix regression with `egg_info` command when tagging is used. diff --git a/setup.cfg b/setup.cfg index 870d629962..df021971e5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.1.0 +current_version = 40.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index 526a7ba6d3..96dbbbbc6e 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.1.0", + version="40.2.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 167e90277b3b5d7366372c087eeba9c9a211d22f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 08:38:01 -0400 Subject: [PATCH 7116/8469] =?UTF-8?q?Correct=20wrong=20bumpversion=20?= =?UTF-8?q?=E2=86=92=2040.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index df021971e5..0304f6ffb0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.2.0 +current_version = 40.1.1 commit = True tag = True diff --git a/setup.py b/setup.py index 96dbbbbc6e..e01043aadb 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.2.0", + version="40.1.1", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From ea8eab864c96a56a6e6a408c3f1864dcd7d31d07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 08:51:17 -0400 Subject: [PATCH 7117/8469] Use unicode literals throughout. --- setuptools/tests/test_build_meta.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index c1be3eda92..fe52fd4de5 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import os import pytest @@ -129,7 +131,7 @@ def test_prepare_metadata_for_build_wheel(build_backend): def test_prepare_metadata_for_build_wheel_with_unicode(build_backend): - dist_dir = os.path.abspath(u'pip-dist-info') + dist_dir = os.path.abspath('pip-dist-info') os.makedirs(dist_dir) dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) From 45d02681438f22943315c793f7fd72d668d93a3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 08:56:44 -0400 Subject: [PATCH 7118/8469] Adapt test to only run on Python 2, as it's redundant on Python 3. --- setuptools/tests/test_build_meta.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index fe52fd4de5..a7d1af6606 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -130,8 +130,9 @@ def test_prepare_metadata_for_build_wheel(build_backend): assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) -def test_prepare_metadata_for_build_wheel_with_unicode(build_backend): - dist_dir = os.path.abspath('pip-dist-info') +@pytest.mark.skipif('sys.version_info > (3,)') +def test_prepare_metadata_for_build_wheel_with_str(build_backend): + dist_dir = os.path.abspath(str('pip-dist-info')) os.makedirs(dist_dir) dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) From cb938be8439b69dc5f9b5c319466b2dce4cdf93f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 08:57:48 -0400 Subject: [PATCH 7119/8469] =?UTF-8?q?Bump=20version:=2040.1.1=20=E2=86=92?= =?UTF-8?q?=2040.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1466.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1466.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 5c52e9405f..3169e9142e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.2.0 +------- + +* #1466: Fix handling of Unicode arguments in PEP 517 backend + + vv40.1.1 -------- diff --git a/changelog.d/1466.change.rst b/changelog.d/1466.change.rst deleted file mode 100644 index 7818bfc10d..0000000000 --- a/changelog.d/1466.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix handling of Unicode arguments in PEP 517 backend diff --git a/setup.cfg b/setup.cfg index 0304f6ffb0..df021971e5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.1.1 +current_version = 40.2.0 commit = True tag = True diff --git a/setup.py b/setup.py index e01043aadb..96dbbbbc6e 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.1.1", + version="40.2.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 6498a7e3544e25183854b1b44d77c2e650d83dbb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 09:00:41 -0400 Subject: [PATCH 7120/8469] Reindent to avoid hanging indent. --- setuptools/tests/test_build_meta.py | 90 +++++++++++++++-------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a7d1af6606..a5aa75a35e 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -46,50 +46,52 @@ def __call__(self, name, *args, **kw): return getattr(mod, name)(*args, **kw) -defns = [{ - 'setup.py': DALS(""" - __import__('setuptools').setup( - name='foo', - py_modules=['hello'], - setup_requires=['six'], - ) - """), - 'hello.py': DALS(""" - def run(): - print('hello') - """), - }, - { - 'setup.py': DALS(""" - assert __name__ == '__main__' - __import__('setuptools').setup( - name='foo', - py_modules=['hello'], - setup_requires=['six'], - ) - """), - 'hello.py': DALS(""" - def run(): - print('hello') - """), - }, - { - 'setup.py': DALS(""" - variable = True - def function(): - return variable - assert variable - __import__('setuptools').setup( - name='foo', - py_modules=['hello'], - setup_requires=['six'], - ) - """), - 'hello.py': DALS(""" - def run(): - print('hello') - """), - }] +defns = [ + { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }, + { + 'setup.py': DALS(""" + assert __name__ == '__main__' + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }, + { + 'setup.py': DALS(""" + variable = True + def function(): + return variable + assert variable + __import__('setuptools').setup( + name='foo', + py_modules=['hello'], + setup_requires=['six'], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + }, +] @pytest.fixture(params=defns) From 5c84682f385fc326b2fe4285041f0aa666e3da01 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 09:11:05 -0400 Subject: [PATCH 7121/8469] Delint --- setuptools/tests/test_easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 80a6549734..872f97c29a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -126,7 +126,9 @@ def test_all_site_dirs(self, monkeypatch): site.getsitepackages. """ path = normalize_path('/setuptools/test/site-packages') - mock_gsp = lambda: [path] + + def mock_gsp(): + return [path] monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False) assert path in ei.get_site_dirs() From 9aa447ee4b7c49c62085560caefbd6c7868ccea9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 10:51:12 -0400 Subject: [PATCH 7122/8469] Use unicode literals in test_easy_install. --- setuptools/tests/test_easy_install.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 872f97c29a..7e0293c37d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Easy install Tests """ -from __future__ import absolute_import +from __future__ import absolute_import, unicode_literals import sys import os @@ -17,6 +17,7 @@ import mock import time +from setuptools.extern import six from setuptools.extern.six.moves import urllib import pytest @@ -43,7 +44,7 @@ class FakeDist: def get_entry_map(self, group): if group != 'console_scripts': return {} - return {'name': 'ep'} + return {str('name'): 'ep'} def as_requirement(self): return 'spec' @@ -156,7 +157,7 @@ def sdist_unicode(self, tmpdir): "", ), ( - u'mypkg/\u2603.txt', + 'mypkg/☃.txt', "", ), ] @@ -209,7 +210,7 @@ def sdist_unicode_in_script(self, tmpdir): DALS( """ #!/bin/sh - # \xc3\xa1 + # á non_python_fn() { } @@ -222,7 +223,7 @@ def sdist_unicode_in_script(self, tmpdir): # with zip sdists. sdist_zip = zipfile.ZipFile(str(sdist), "w") for filename, content in files: - sdist_zip.writestr(filename, content) + sdist_zip.writestr(filename, content.encode('utf-8')) sdist_zip.close() return str(sdist) @@ -254,7 +255,7 @@ def sdist_script(self, tmpdir): """), ), ( - u'mypkg_script', + 'mypkg_script', DALS(""" #/usr/bin/python print('mypkg_script') @@ -510,7 +511,7 @@ def test_setup_requires_overrides_version_conflict(self, use_setup_cfg): with contexts.quiet() as (stdout, stderr): # Don't even need to install the package, just # running the setup.py at all is sufficient - run_setup(test_setup_py, ['--name']) + run_setup(test_setup_py, [str('--name')]) lines = stdout.readlines() assert len(lines) > 0 @@ -564,7 +565,7 @@ def test_setup_requires_override_nspkg(self, use_setup_cfg): try: # Don't even need to install the package, just # running the setup.py at all is sufficient - run_setup(test_setup_py, ['--name']) + run_setup(test_setup_py, [str('--name')]) except pkg_resources.VersionConflict: self.fail('Installing setup.py requirements ' 'caused a VersionConflict') @@ -601,7 +602,7 @@ def make_dependency_sdist(dist_path, distname, version): ) test_setup_py = os.path.join(test_pkg, 'setup.py') with contexts.quiet() as (stdout, stderr): - run_setup(test_setup_py, ['--version']) + run_setup(test_setup_py, [str('--version')]) lines = stdout.readlines() assert len(lines) > 0 assert lines[-1].strip() == '42' @@ -728,7 +729,6 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', import setuptools setuptools.setup(**%r) """) - with open(test_setup_py, 'w') as f: f.write(setup_py_template % test_setup_attrs) @@ -744,6 +744,8 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', ) class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' + if six.PY2: + non_ascii_exe = non_ascii_exe.encode('utf-8') exe_with_spaces = r'C:\Program Files\Python36\python.exe' def test_get_script_header(self): @@ -760,7 +762,7 @@ def test_get_script_header_args(self): def test_get_script_header_non_ascii_exe(self): actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe) - expected = '#!%s -x\n' % self.non_ascii_exe + expected = str('#!%s -x\n') % self.non_ascii_exe assert actual == expected def test_get_script_header_exe_with_spaces(self): From 01fd232d95ad51f784de53c0993a7b91868d269d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Aug 2018 11:02:22 -0400 Subject: [PATCH 7123/8469] Delint --- setuptools/tests/test_easy_install.py | 60 +++++++++++++++------------ 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 7e0293c37d..955c2ae94e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -80,7 +80,7 @@ def test_get_script_args(self): sys.exit( load_entry_point('spec', 'console_scripts', 'name')() ) - """) + """) # noqa: E501 dist = FakeDist() args = next(ei.ScriptWriter.get_args(dist)) @@ -172,7 +172,8 @@ def sdist_unicode(self, tmpdir): return str(sdist) @fail_on_ascii - def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch): + def test_unicode_filename_in_sdist( + self, sdist_unicode, tmpdir, monkeypatch): """ The install command should execute correctly even if the package has unicode filenames. @@ -228,7 +229,8 @@ def sdist_unicode_in_script(self, tmpdir): return str(sdist) @fail_on_ascii - def test_unicode_content_in_sdist(self, sdist_unicode_in_script, tmpdir, monkeypatch): + def test_unicode_content_in_sdist( + self, sdist_unicode_in_script, tmpdir, monkeypatch): """ The install command should execute correctly even if the package has unicode in scripts. @@ -453,8 +455,8 @@ def test_setup_requires_honors_fetch_params(self): dist_file, ] with sandbox.save_argv(['easy_install']): - # attempt to install the dist. It should fail because - # it doesn't exist. + # attempt to install the dist. It should + # fail because it doesn't exist. with pytest.raises(SystemExit): easy_install_pkg.main(ei_params) # there should have been two or three requests to the server @@ -506,7 +508,8 @@ def test_setup_requires_overrides_version_conflict(self, use_setup_cfg): with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: - test_pkg = create_setup_requires_package(temp_dir, use_setup_cfg=use_setup_cfg) + test_pkg = create_setup_requires_package( + temp_dir, use_setup_cfg=use_setup_cfg) test_setup_py = os.path.join(test_pkg, 'setup.py') with contexts.quiet() as (stdout, stderr): # Don't even need to install the package, just @@ -567,7 +570,8 @@ def test_setup_requires_override_nspkg(self, use_setup_cfg): # running the setup.py at all is sufficient run_setup(test_setup_py, [str('--name')]) except pkg_resources.VersionConflict: - self.fail('Installing setup.py requirements ' + self.fail( + 'Installing setup.py requirements ' 'caused a VersionConflict') assert 'FAIL' not in stdout.getvalue() @@ -578,21 +582,23 @@ def test_setup_requires_override_nspkg(self, use_setup_cfg): @pytest.mark.parametrize('use_setup_cfg', use_setup_cfg) def test_setup_requires_with_attr_version(self, use_setup_cfg): def make_dependency_sdist(dist_path, distname, version): - make_sdist(dist_path, [ - ('setup.py', - DALS(""" - import setuptools - setuptools.setup( - name={name!r}, - version={version!r}, - py_modules=[{name!r}], - ) - """.format(name=distname, version=version))), - (distname + '.py', - DALS(""" - version = 42 - """ - ))]) + files = [( + 'setup.py', + DALS(""" + import setuptools + setuptools.setup( + name={name!r}, + version={version!r}, + py_modules=[{name!r}], + ) + """.format(name=distname, version=version)), + ), ( + distname + '.py', + DALS(""" + version = 42 + """), + )] + make_sdist(dist_path, files) with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: test_pkg = create_setup_requires_package( @@ -754,19 +760,21 @@ def test_get_script_header(self): assert actual == expected def test_get_script_header_args(self): - expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath - (sys.executable)) + expected = '#!%s -x\n' % ei.nt_quote_arg( + os.path.normpath(sys.executable)) actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x') assert actual == expected def test_get_script_header_non_ascii_exe(self): - actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', + actual = ei.ScriptWriter.get_script_header( + '#!/usr/bin/python', executable=self.non_ascii_exe) expected = str('#!%s -x\n') % self.non_ascii_exe assert actual == expected def test_get_script_header_exe_with_spaces(self): - actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python', + actual = ei.ScriptWriter.get_script_header( + '#!/usr/bin/python', executable='"' + self.exe_with_spaces + '"') expected = '#!"%s"\n' % self.exe_with_spaces assert actual == expected From ec1a8f60134fb409c9b747cb15e0b5efbd519874 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Tue, 21 Aug 2018 19:48:22 +0300 Subject: [PATCH 7124/8469] remove xfail for AppVeyor from namespace tests entirely --- setuptools/tests/test_namespaces.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index f2acff84f3..da19bd79b8 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -16,10 +16,6 @@ class TestNamespaces: sys.version_info < (3, 5), reason="Requires importlib.util.module_from_spec", ) - @pytest.mark.xfail( - os.environ.get("APPVEYOR"), - reason="https://github.com/pypa/setuptools/issues/851", - ) def test_mixed_site_and_non_site(self, tmpdir): """ Installing two packages sharing the same namespace, one installed From 0e48f661aab7b40bbe9c8e033594f61e7e712b4a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 4 Sep 2018 11:01:09 +0200 Subject: [PATCH 7125/8469] bpo-34530: Fix distutils find_executable() (GH-9049) distutils.spawn.find_executable() now falls back on os.defpath if the PATH environment variable is not set. --- spawn.py | 2 +- tests/test_spawn.py | 49 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/spawn.py b/spawn.py index 5dd415a283..5387688093 100644 --- a/spawn.py +++ b/spawn.py @@ -173,7 +173,7 @@ def find_executable(executable, path=None): os.environ['PATH']. Returns the complete filename or None if not found. """ if path is None: - path = os.environ['PATH'] + path = os.environ.get('PATH', os.defpath) paths = path.split(os.pathsep) base, ext = os.path.splitext(executable) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 5edc24a3a1..0d455385d8 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -1,9 +1,13 @@ """Tests for distutils.spawn.""" -import unittest -import sys import os +import stat +import sys +import unittest +from unittest import mock from test.support import run_unittest, unix_shell +from test import support as test_support +from distutils.spawn import find_executable from distutils.spawn import _nt_quote_args from distutils.spawn import spawn from distutils.errors import DistutilsExecError @@ -51,6 +55,47 @@ def test_spawn(self): os.chmod(exe, 0o777) spawn([exe]) # should work without any error + def test_find_executable(self): + with test_support.temp_dir() as tmp_dir: + # use TESTFN to get a pseudo-unique filename + program_noeext = test_support.TESTFN + # Give the temporary program an ".exe" suffix for all. + # It's needed on Windows and not harmful on other platforms. + program = program_noeext + ".exe" + + filename = os.path.join(tmp_dir, program) + with open(filename, "wb"): + pass + os.chmod(filename, stat.S_IXUSR) + + # test path parameter + rv = find_executable(program, path=tmp_dir) + self.assertEqual(rv, filename) + + if sys.platform == 'win32': + # test without ".exe" extension + rv = find_executable(program_noeext, path=tmp_dir) + self.assertEqual(rv, filename) + + # test find in the current directory + with test_support.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # test non-existent program + dont_exist_program = "dontexist_" + program + rv = find_executable(dont_exist_program , path=tmp_dir) + self.assertIsNone(rv) + + # test os.defpath: missing PATH environment variable + with test_support.EnvironmentVarGuard() as env: + with mock.patch('distutils.spawn.os.defpath', tmp_dir): + env.pop('PATH') + + rv = find_executable(program) + self.assertEqual(rv, filename) + + def test_suite(): return unittest.makeSuite(SpawnTestCase) From d2eb595732e54ff8e785483b2a47fd3d20431057 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 7 Sep 2018 17:30:33 +0200 Subject: [PATCH 7126/8469] bpo-34605: Avoid master/slave terms (GH-9101) * Replace "master process" with "parent process" * Replace "master option mappings" with "main option mappings" * Replace "master pattern object" with "main pattern object" * ssl: replace "master" with "server" * And some other similar changes --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 0258d3deae..41bf4bb9fb 100644 --- a/command/install.py +++ b/command/install.py @@ -223,7 +223,7 @@ def initialize_options(self): def finalize_options(self): """Finalizes options.""" - # This method (and its pliant slaves, like 'finalize_unix()', + # This method (and its pliant childs, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and # anything else we care to install from a Python module From 4a6183a2492528b3072f91cd221c86bee8853b09 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 7 Sep 2018 18:13:10 +0200 Subject: [PATCH 7127/8469] bpo-34605: childs => children (GH-9102) --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index 41bf4bb9fb..a1d1a1ea37 100644 --- a/command/install.py +++ b/command/install.py @@ -223,7 +223,7 @@ def initialize_options(self): def finalize_options(self): """Finalizes options.""" - # This method (and its pliant childs, like 'finalize_unix()', + # This method (and its pliant children, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and # anything else we care to install from a Python module From 64f5d63b221c89c3ef543f4ef10a99ff0027a63c Mon Sep 17 00:00:00 2001 From: Julien Malard Date: Sun, 9 Sep 2018 02:01:26 +0530 Subject: [PATCH 7128/8469] bpo-34421 avoid unicode error in distutils logging (GH-8799) This caused installation errors in some cases on Windows. Patch by Julien Malard. --- log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/log.py b/log.py index b301a8338c..3a6602bc8b 100644 --- a/log.py +++ b/log.py @@ -31,7 +31,10 @@ def _log(self, level, msg, args): # emulate backslashreplace error handler encoding = stream.encoding msg = msg.encode(encoding, "backslashreplace").decode(encoding) - stream.write('%s\n' % msg) + try: + stream.write('%s\n' % msg) + except UnicodeEncodeError: + stream.write('%s\n' % msg.encode('unicode-escape').decode('ascii')) stream.flush() def log(self, level, msg, *args): From 1d8e96874138f1451199aba5a2f55a6e05e67c25 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Sep 2018 09:27:06 -0400 Subject: [PATCH 7129/8469] Remove extraneous v --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3169e9142e..d1667ebfe8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ v40.2.0 * #1466: Fix handling of Unicode arguments in PEP 517 backend -vv40.1.1 +v40.1.1 -------- * #1465: Fix regression with `egg_info` command when tagging is used. From b277efb9be14751c874aff02f72237bad8600df3 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 12 Sep 2018 01:40:06 +0200 Subject: [PATCH 7130/8469] bpo-34605: Replace "pliant children" with "helpers" (GH-9195) In distutils.command.install, replace "pliant children" (previously, it was "pliant slaves") with "helpers". https://bugs.python.org/issue34605 --- command/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/install.py b/command/install.py index a1d1a1ea37..c625c95bf7 100644 --- a/command/install.py +++ b/command/install.py @@ -223,7 +223,7 @@ def initialize_options(self): def finalize_options(self): """Finalizes options.""" - # This method (and its pliant children, like 'finalize_unix()', + # This method (and its helpers, like 'finalize_unix()', # 'finalize_other()', and 'select_scheme()') is where the default # installation directories for modules, extension modules, and # anything else we care to install from a Python module From 2fabfd3a66e6984bd6fccf07b46356f956af0297 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Thu, 13 Sep 2018 10:03:06 +0100 Subject: [PATCH 7131/8469] build_meta.get_requires_for_build_sdist does not include wheel the wheel package is not required to build a source distribution Resolves #1474. --- changelog.d/1474.change.rst | 1 + setuptools/build_meta.py | 11 +++++------ setuptools/tests/test_build_meta.py | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 changelog.d/1474.change.rst diff --git a/changelog.d/1474.change.rst b/changelog.d/1474.change.rst new file mode 100644 index 0000000000..9d40e785a8 --- /dev/null +++ b/changelog.d/1474.change.rst @@ -0,0 +1 @@ +``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index fb657a5462..f7f9bda241 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -91,9 +91,8 @@ def _fix_config(config_settings): return config_settings -def _get_build_requires(config_settings): +def _get_build_requires(config_settings, requirements): config_settings = _fix_config(config_settings) - requirements = ['setuptools', 'wheel'] sys.argv = sys.argv[:1] + ['egg_info'] + \ config_settings["--global-option"] @@ -113,20 +112,20 @@ def _get_immediate_subdirectories(a_dir): def get_requires_for_build_wheel(config_settings=None): config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings) + return _get_build_requires(config_settings, requirements=['setuptools', 'wheel']) def get_requires_for_build_sdist(config_settings=None): config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings) + return _get_build_requires(config_settings, requirements=['setuptools']) def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)] _run_setup() - + dist_info_directory = metadata_directory - while True: + while True: dist_infos = [f for f in os.listdir(dist_info_directory) if f.endswith('.dist-info')] diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a5aa75a35e..f1d517bb08 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -107,6 +107,12 @@ def test_get_requires_for_build_wheel(build_backend): assert sorted(actual) == sorted(expected) +def test_get_requires_for_build_sdist(build_backend): + actual = build_backend.get_requires_for_build_sdist() + expected = ['six', 'setuptools'] + assert sorted(actual) == sorted(expected) + + def test_build_wheel(build_backend): dist_dir = os.path.abspath('pip-wheel') os.makedirs(dist_dir) From 12b9f825c347e842f581de89539d1bf0c582e108 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Sep 2018 13:30:58 -0400 Subject: [PATCH 7132/8469] Assign on separate lines --- pkg_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 86ec3411bd..3f776e46ed 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2155,7 +2155,8 @@ def declare_namespace(packageName): if packageName in _namespace_packages: return - path, parent = sys.path, None + path = sys.path + parent = None if '.' in packageName: parent = '.'.join(packageName.split('.')[:-1]) declare_namespace(parent) From 948b3f41f9079a1c3afd3a409389d90346ec3bff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Sep 2018 13:35:26 -0400 Subject: [PATCH 7133/8469] Rely on rpartition. --- pkg_resources/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3f776e46ed..33f86987ee 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2156,9 +2156,9 @@ def declare_namespace(packageName): return path = sys.path - parent = None - if '.' in packageName: - parent = '.'.join(packageName.split('.')[:-1]) + parent, _, _ = packageName.rpartition('.') + + if parent: declare_namespace(parent) if parent not in _namespace_packages: __import__(parent) @@ -2169,7 +2169,7 @@ def declare_namespace(packageName): # Track what packages are namespaces, so when new path items are added, # they can be updated - _namespace_packages.setdefault(parent, []).append(packageName) + _namespace_packages.setdefault(parent or None, []).append(packageName) _namespace_packages.setdefault(packageName, []) for path_item in path: From 6e122a15f84db69af984e464a46358a594a6ba47 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Sep 2018 15:14:48 -0400 Subject: [PATCH 7134/8469] Suppress warnings in importer.find_module. Fixes #1111. --- changelog.d/1486.change.rst | 1 + pkg_resources/__init__.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1486.change.rst diff --git a/changelog.d/1486.change.rst b/changelog.d/1486.change.rst new file mode 100644 index 0000000000..561784fb0f --- /dev/null +++ b/changelog.d/1486.change.rst @@ -0,0 +1 @@ +Suppress warnings in pkg_resources.handle_ns. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 33f86987ee..fa1cba86f0 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2094,7 +2094,12 @@ def _handle_ns(packageName, path_item): importer = get_importer(path_item) if importer is None: return None - loader = importer.find_module(packageName) + + # capture warnings due to #1111 + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + loader = importer.find_module(packageName) + if loader is None: return None module = sys.modules.get(packageName) From 9a2cb89a1c733343c7040073a799d0cd782e435e Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 14 Sep 2018 15:03:29 -0700 Subject: [PATCH 7135/8469] Add tests for setuptools.glob --- setuptools/tests/test_glob.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 setuptools/tests/test_glob.py diff --git a/setuptools/tests/test_glob.py b/setuptools/tests/test_glob.py new file mode 100644 index 0000000000..a0728c5d12 --- /dev/null +++ b/setuptools/tests/test_glob.py @@ -0,0 +1,35 @@ +import pytest + +from setuptools.glob import glob + +from .files import build_files + + +@pytest.mark.parametrize('tree, pattern, matches', ( + ('', b'', []), + ('', '', []), + (''' + appveyor.yml + CHANGES.rst + LICENSE + MANIFEST.in + pyproject.toml + README.rst + setup.cfg + setup.py + ''', '*.rst', ('CHANGES.rst', 'README.rst')), + (''' + appveyor.yml + CHANGES.rst + LICENSE + MANIFEST.in + pyproject.toml + README.rst + setup.cfg + setup.py + ''', b'*.rst', (b'CHANGES.rst', b'README.rst')), +)) +def test_glob(monkeypatch, tmpdir, tree, pattern, matches): + monkeypatch.chdir(tmpdir) + build_files({name: '' for name in tree.split()}) + assert list(sorted(glob(pattern))) == list(sorted(matches)) From 4f165ed9d35ea7e37823bec25ed822338387c0be Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 14 Sep 2018 05:56:37 -0700 Subject: [PATCH 7136/8469] Remove use of compatibility shim six.binary_type The type bytes is available on all supported Pythons. Makes the code more forward compatible with Python 3. --- changelog.d/1479.misc.rst | 1 + setuptools/glob.py | 14 ++++++-------- setuptools/tests/files.py | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 changelog.d/1479.misc.rst diff --git a/changelog.d/1479.misc.rst b/changelog.d/1479.misc.rst new file mode 100644 index 0000000000..b04b0ce15f --- /dev/null +++ b/changelog.d/1479.misc.rst @@ -0,0 +1 @@ +Remove internal use of six.binary_type diff --git a/setuptools/glob.py b/setuptools/glob.py index 6c781de349..9d7cbc5da6 100644 --- a/setuptools/glob.py +++ b/setuptools/glob.py @@ -3,14 +3,12 @@ Changes include: * `yield from` and PEP3102 `*` removed. - * `bytes` changed to `six.binary_type`. * Hidden files are not ignored. """ import os import re import fnmatch -from setuptools.extern.six import binary_type __all__ = ["glob", "iglob", "escape"] @@ -92,7 +90,7 @@ def _iglob(pathname, recursive): def glob1(dirname, pattern): if not dirname: - if isinstance(pattern, binary_type): + if isinstance(pattern, bytes): dirname = os.curdir.encode('ASCII') else: dirname = os.curdir @@ -129,8 +127,8 @@ def glob2(dirname, pattern): # Recursively yields relative pathnames inside a literal directory. def _rlistdir(dirname): if not dirname: - if isinstance(dirname, binary_type): - dirname = binary_type(os.curdir, 'ASCII') + if isinstance(dirname, bytes): + dirname = os.curdir.encode('ASCII') else: dirname = os.curdir try: @@ -149,7 +147,7 @@ def _rlistdir(dirname): def has_magic(s): - if isinstance(s, binary_type): + if isinstance(s, bytes): match = magic_check_bytes.search(s) else: match = magic_check.search(s) @@ -157,7 +155,7 @@ def has_magic(s): def _isrecursive(pattern): - if isinstance(pattern, binary_type): + if isinstance(pattern, bytes): return pattern == b'**' else: return pattern == '**' @@ -169,7 +167,7 @@ def escape(pathname): # Escaping is done by wrapping any of "*?[" between square brackets. # Metacharacters do not work in the drive part and shouldn't be escaped. drive, pathname = os.path.splitdrive(pathname) - if isinstance(pathname, binary_type): + if isinstance(pathname, bytes): pathname = magic_check_bytes.sub(br'[\1]', pathname) else: pathname = magic_check.sub(r'[\1]', pathname) diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index f5f0e6bbc8..465a6b41e6 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,7 +1,6 @@ import os -from setuptools.extern.six import binary_type import pkg_resources.py31compat @@ -31,7 +30,7 @@ def build_files(file_defs, prefix=""): pkg_resources.py31compat.makedirs(full_name, exist_ok=True) build_files(contents, prefix=full_name) else: - if isinstance(contents, binary_type): + if isinstance(contents, bytes): with open(full_name, 'wb') as f: f.write(contents) else: From 6a70dbd61b343647847447114fa798a1dab95f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Sat, 15 Sep 2018 16:24:03 +0200 Subject: [PATCH 7137/8469] link to setuptools doc --- docs/pkg_resources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 18545f4ba0..0c9fb5f260 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -703,7 +703,7 @@ entry point group and look for entry points named "pre_process" and To advertise an entry point, a project needs to use ``setuptools`` and provide an ``entry_points`` argument to ``setup()`` in its setup script, so that the entry points will be included in the distribution's metadata. For more -details, see the ``setuptools`` documentation. (XXX link here to setuptools) +details, see the [``setuptools`` documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins). Each project distribution can advertise at most one entry point of a given name within the same entry point group. For example, a distutils extension From 6b222623ae5a817c27ba612e776bc45641ae41c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 10:19:45 -0400 Subject: [PATCH 7138/8469] Add Tidelift badge to readme --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 8505c5517f..a9bed52113 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,9 @@ .. image:: https://img.shields.io/pypi/pyversions/setuptools.svg +.. image:: https://tidelift.com/badges/github/pypa/setuptools + :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme + See the `Installation Instructions `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From 5a58c69518337e8f0d309cb0c9a9027840cd676e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 10:33:39 -0400 Subject: [PATCH 7139/8469] Configure readthedocs with a .yml file --- .readthedocs.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000000..3aef6b6be4 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,4 @@ +python: + version: 3 + requirements_file: docs/requirements.txt + pip_install: false From 6aa7964fd23de681d6b74cbc01f3d552191e998b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 10:51:13 -0400 Subject: [PATCH 7140/8469] Merge ancient easy_install history into changelog --- CHANGES.rst | 477 ++++++++++++++++++++++++++++++++++++++++ docs/easy_install.txt | 498 ------------------------------------------ 2 files changed, 477 insertions(+), 498 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d1667ebfe8..fd42a6b519 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3210,6 +3210,37 @@ easy_install gracefully under Google App Engine (with an ``ImportError`` loading the C-based module, instead of getting a ``NameError``). + * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting + is flattened out in the resulting egg. (There was a case-sensitivity + problem that affected some distributions, notably ``pywin32``.) + + * Prevent ``--help-commands`` and other junk from showing under Python 2.5 + when running ``easy_install --help``. + + * Fixed GUI scripts sometimes not executing on Windows + + * Fixed not picking up dependency links from recursive dependencies. + + * Only make ``.py``, ``.dll`` and ``.so`` files executable when unpacking eggs + + * Changes for Jython compatibility + + * Improved error message when a requirement is also a directory name, but the + specified directory is not a source package. + + * Fixed ``--allow-hosts`` option blocking ``file:`` URLs + + * Fixed HTTP SVN detection failing when the page title included a project + name (e.g. on SourceForge-hosted SVN) + + * Fix Jython script installation to handle ``#!`` lines better when + ``sys.executable`` is a script. + + * Removed use of deprecated ``md5`` module if ``hashlib`` is available + + * Keep site directories (e.g. ``site-packages``) from being included in + ``.pth`` files. + 0.6c7 ----- @@ -3220,6 +3251,11 @@ easy_install ``--root`` or ``--single-version-externally-managed``, due to the parent package not having the child package as an attribute. + * ``ftp:`` download URLs now work correctly. + + * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use + the Python Package Index's new simpler (and faster!) REST API. + 0.6c6 ----- @@ -3243,6 +3279,18 @@ easy_install * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in their names as packages. + * EasyInstall no longer aborts the installation process if a URL it wants to + retrieve can't be downloaded, unless the URL is an actual package download. + Instead, it issues a warning and tries to keep going. + + * Fixed distutils-style scripts originally built on Windows having their line + endings doubled when installed on any platform. + + * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects + installed using ``setup.py develop``. + + * Fixed not HTML-decoding URLs scraped from web pages + 0.6c5 ----- @@ -3252,6 +3300,9 @@ easy_install * Fix uploaded ``bdist_wininst`` packages being described as suitable for "any" version by Python 2.5, even if a ``--target-version`` was specified. + * Fixed ``.dll`` files on Cygwin not having executable permissions when an egg + is installed unzipped. + 0.6c4 ----- @@ -3281,11 +3332,34 @@ easy_install listed a namespace package ``foo.bar`` without explicitly listing ``foo`` as a namespace package. + * Added support for HTTP "Basic" authentication using ``http://user:pass@host`` + URLs. If a password-protected page contains links to the same host (and + protocol), those links will inherit the credentials used to access the + original page. + + * Removed all special support for Sourceforge mirrors, as Sourceforge's + mirror system now works well for non-browser downloads. + + * Fixed not recognizing ``win32.exe`` installers that included a custom + bitmap. + + * Fixed not allowing ``os.open()`` of paths outside the sandbox, even if they + are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as + is done by ``os.urandom()`` on some platforms). + + * Fixed a problem with ``.pth`` testing on Windows when ``sys.executable`` + has a space in it (e.g., the user installed Python to a ``Program Files`` + directory). + 0.6c3 ----- * Fixed breakages caused by Subversion 1.4's new "working copy" format + * You can once again use "python -m easy_install" with Python 2.4 and above. + + * Python 2.5 compatibility fixes added. + 0.6c2 ----- @@ -3296,6 +3370,19 @@ easy_install * Running ``setup.py develop`` on a setuptools-using project will now install setuptools if needed, instead of only downloading the egg. + * Windows script wrappers now support quoted arguments and arguments + containing spaces. (Patch contributed by Jim Fulton.) + + * The ``ez_setup.py`` script now actually works when you put a setuptools + ``.egg`` alongside it for bootstrapping an offline machine. + + * A writable installation directory on ``sys.path`` is no longer required to + download and extract a source distribution using ``--editable``. + + * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable`` + contains non-ASCII characters, to prevent deprecation warnings about an + unspecified encoding when the script is run. + 0.6c1 ----- @@ -3319,6 +3406,9 @@ easy_install the version was overridden on the command line that built the source distribution.) + * EasyInstall now includes setuptools version information in the + ``User-Agent`` string sent to websites it visits. + 0.6b4 ----- @@ -3331,6 +3421,27 @@ easy_install * Fixed redundant warnings about missing ``README`` file(s); it should now appear only if you are actually a source distribution. + * Fix creating Python wrappers for non-Python scripts + + * Fix ``ftp://`` directory listing URLs from causing a crash when used in the + "Home page" or "Download URL" slots on PyPI. + + * Fix ``sys.path_importer_cache`` not being updated when an existing zipfile + or directory is deleted/overwritten. + + * Fix not recognizing HTML 404 pages from package indexes. + + * Allow ``file://`` URLs to be used as a package index. URLs that refer to + directories will use an internally-generated directory listing if there is + no ``index.html`` file in the directory. + + * Allow external links in a package index to be specified using + ``rel="homepage"`` or ``rel="download"``, without needing the old + PyPI-specific visible markup. + + * Suppressed warning message about possibly-misspelled project name, if an egg + or link for that project name has already been seen. + 0.6b3 ----- @@ -3341,6 +3452,28 @@ easy_install ``include_package_data`` and ``package_data`` are used to refer to the same files. + * Fix local ``--find-links`` eggs not being copied except with + ``--always-copy``. + + * Fix sometimes not detecting local packages installed outside of "site" + directories. + + * Fix mysterious errors during initial ``setuptools`` install, caused by + ``ez_setup`` trying to run ``easy_install`` twice, due to a code fallthru + after deleting the egg from which it's running. + +0.6b2 +----- + + * Don't install or update a ``site.py`` patch when installing to a + ``PYTHONPATH`` directory with ``--multi-version``, unless an + ``easy-install.pth`` file is already in use there. + + * Construct ``.pth`` file paths in such a way that installing an egg whose + name begins with ``import`` doesn't cause a syntax error. + + * Fixed a bogus warning message that wasn't updated since the 0.5 versions. + 0.6b1 ----- @@ -3348,6 +3481,21 @@ easy_install the name of a ``.py`` loader/wrapper. (Python's import machinery ignores this suffix when searching for an extension module.) + * Better ambiguity management: accept ``#egg`` name/version even if processing + what appears to be a correctly-named distutils file, and ignore ``.egg`` + files with no ``-``, since valid Python ``.egg`` files always have a version + number (but Scheme eggs often don't). + + * Support ``file://`` links to directories in ``--find-links``, so that + easy_install can build packages from local source checkouts. + + * Added automatic retry for Sourceforge mirrors. The new download process is + to first just try dl.sourceforge.net, then randomly select mirror IPs and + remove ones that fail, until something works. The removed IPs stay removed + for the remainder of the run. + + * Ignore bdist_dumb distributions when looking at download URLs. + 0.6a11 ------ @@ -3381,11 +3529,75 @@ easy_install it. Previously, the file could be left open and the actual error would be masked by problems trying to remove the open file on Windows systems. + * Process ``dependency_links.txt`` if found in a distribution, by adding the + URLs to the list for scanning. + + * Use relative paths in ``.pth`` files when eggs are being installed to the + same directory as the ``.pth`` file. This maximizes portability of the + target directory when building applications that contain eggs. + + * Added ``easy_install-N.N`` script(s) for convenience when using multiple + Python versions. + + * Added automatic handling of installation conflicts. Eggs are now shifted to + the front of sys.path, in an order consistent with where they came from, + making EasyInstall seamlessly co-operate with system package managers. + + The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options + are now no longer necessary, and will generate warnings at the end of a + run if you use them. + + * Don't recursively traverse subdirectories given to ``--find-links``. + 0.6a10 ------ * Fixed the ``develop`` command ignoring ``--find-links``. + * Added exhaustive testing of the install directory, including a spawn test + for ``.pth`` file support, and directory writability/existence checks. This + should virtually eliminate the need to set or configure ``--site-dirs``. + + * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of + RTFM-ing. :) + + * Enhanced ``PYTHONPATH`` support so that you don't have to put any eggs on it + manually to make it work. ``--multi-version`` is no longer a silent + default; you must explicitly use it if installing to a non-PYTHONPATH, + non-"site" directory. + + * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``, + ``--install-dir``, and ``--script-dir`` options, whether on the command line + or in configuration files. + + * Improved SourceForge mirror processing to work faster and be less affected + by transient HTML changes made by SourceForge. + + * PyPI searches now use the exact spelling of requirements specified on the + command line or in a project's ``install_requires``. Previously, a + normalized form of the name was used, which could lead to unnecessary + full-index searches when a project's name had an underscore (``_``) in it. + + * EasyInstall can now download bare ``.py`` files and wrap them in an egg, + as long as you include an ``#egg=name-version`` suffix on the URL, or if + the ``.py`` file is listed as the "Download URL" on the project's PyPI page. + This allows third parties to "package" trivial Python modules just by + linking to them (e.g. from within their own PyPI page or download links + page). + + * The ``--always-copy`` option now skips "system" and "development" eggs since + they can't be reliably copied. Note that this may cause EasyInstall to + choose an older version of a package than what you expected, or it may cause + downloading and installation of a fresh version of what's already installed. + + * The ``--find-links`` option previously scanned all supplied URLs and + directories as early as possible, but now only directories and direct + archive links are scanned immediately. URLs are not retrieved unless a + package search was already going to go online due to a package not being + available locally, or due to the use of the ``--update`` or ``-U`` option. + + * Fixed the annoying ``--help-commands`` wart. + 0.6a9 ----- @@ -3436,6 +3648,22 @@ easy_install and entry-point wrapper scripts), and ``easy_install`` can turn the .exe back into an ``.egg`` file or directory and install it as such. + * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside + "baskets") when they weren't explicitly listed in the ``.pth`` file. + + * If more than one URL appears to describe the exact same distribution, prefer + the shortest one. This helps to avoid "table of contents" CGI URLs like the + ones on effbot.org. + + * Quote arguments to python.exe (including python's path) to avoid problems + when Python (or a script) is installed in a directory whose name contains + spaces on Windows. + + * Support full roundtrip translation of eggs to and from ``bdist_wininst`` + format. Running ``bdist_wininst`` on a setuptools-based package wraps the + egg in an .exe that will safely install it as an egg (i.e., with metadata + and entry-point wrapper scripts), and ``easy_install`` can turn the .exe + back into an ``.egg`` file or directory and install it as such. 0.6a8 ----- @@ -3464,6 +3692,45 @@ easy_install metadata cache to pretend that the egg has valid version information, until it has a chance to make it actually be so (via the ``egg_info`` command). + * Update for changed SourceForge mirror format + + * Fixed not installing dependencies for some packages fetched via Subversion + + * Fixed dependency installation with ``--always-copy`` not using the same + dependency resolution procedure as other operations. + + * Fixed not fully removing temporary directories on Windows, if a Subversion + checkout left read-only files behind + + * Fixed some problems building extensions when Pyrex was installed, especially + with Python 2.4 and/or packages using SWIG. + +0.6a7 +----- + + * Fixed not being able to install Windows script wrappers using Python 2.3 + +0.6a6 +----- + + * Added support for "traditional" PYTHONPATH-based non-root installation, and + also the convenient ``virtual-python.py`` script, based on a contribution + by Ian Bicking. The setuptools egg now contains a hacked ``site`` module + that makes the PYTHONPATH-based approach work with .pth files, so that you + can get the full EasyInstall feature set on such installations. + + * Added ``--no-deps`` and ``--allow-hosts`` options. + + * Improved Windows ``.exe`` script wrappers so that the script can have the + same name as a module without confusing Python. + + * Changed dependency processing so that it's breadth-first, allowing a + depender's preferences to override those of a dependee, to prevent conflicts + when a lower version is acceptable to the dependee, but not the depender. + Also, ensure that currently installed/selected packages aren't given + precedence over ones desired by a package being installed, which could + cause conflict errors. + 0.6a5 ----- @@ -3476,6 +3743,17 @@ easy_install on Windows and other platforms. (The special handling is only for Windows; other platforms are treated the same as for ``console_scripts``.) + * Improved error message when trying to use old ways of running + ``easy_install``. Removed the ability to run via ``python -m`` or by + running ``easy_install.py``; ``easy_install`` is the command to run on all + supported platforms. + + * Improved wrapper script generation and runtime initialization so that a + VersionConflict doesn't occur if you later install a competing version of a + needed package as the default version of that package. + + * Fixed a problem parsing version numbers in ``#egg=`` links. + 0.6a2 ----- @@ -3484,6 +3762,15 @@ easy_install scripts get an ``.exe`` wrapper so you can just type their name. On other platforms, the scripts are written without a file extension. + * EasyInstall can now install "console_scripts" defined by packages that use + ``setuptools`` and define appropriate entry points. On Windows, console + scripts get an ``.exe`` wrapper so you can just type their name. On other + platforms, the scripts are installed without a file extension. + + * Using ``python -m easy_install`` or running ``easy_install.py`` is now + DEPRECATED, since an ``easy_install`` wrapper is now available on all + platforms. + 0.6a1 ----- @@ -3529,6 +3816,55 @@ easy_install or documented, and never would have worked without EasyInstall - which it pre-dated and was never compatible with. + * EasyInstall now does MD5 validation of downloads from PyPI, or from any link + that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest. + + * EasyInstall now handles symlinks in target directories by removing the link, + rather than attempting to overwrite the link's destination. This makes it + easier to set up an alternate Python "home" directory (as described above in + the `Non-Root Installation`_ section). + + * Added support for handling MacOS platform information in ``.egg`` filenames, + based on a contribution by Kevin Dangoor. You may wish to delete and + reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", + because the format for this platform information has changed so that minor + OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a + previous OS version to become obsolete. + + * easy_install's dependency processing algorithms have changed. When using + ``--always-copy``, it now ensures that dependencies are copied too. When + not using ``--always-copy``, it tries to use a single resolution loop, + rather than recursing. + + * Fixed installing extra ``.pyc`` or ``.pyo`` files for scripts with ``.py`` + extensions. + + * Added ``--site-dirs`` option to allow adding custom "site" directories. + Made ``easy-install.pth`` work in platform-specific alternate site + directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). + + * If you manually delete the current version of a package, the next run of + EasyInstall against the target directory will now remove the stray entry + from the ``easy-install.pth`` file. + + * EasyInstall now recognizes URLs with a ``#egg=project_name`` fragment ID + as pointing to the named project's source checkout. Such URLs have a lower + match precedence than any other kind of distribution, so they'll only be + used if they have a higher version number than any other available + distribution, or if you use the ``--editable`` option. The ``#egg`` + fragment can contain a version if it's formatted as ``#egg=proj-ver``, + where ``proj`` is the project name, and ``ver`` is the version number. You + *must* use the format for these values that the ``bdist_egg`` command uses; + i.e., all non-alphanumeric runs must be condensed to single underscore + characters. + + * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_ + above for more info. Also, slightly changed the behavior of the + ``--build-directory`` option. + + * Fixed the setup script sandbox facility not recognizing certain paths as + valid on case-insensitive platforms. + 0.5a12 ------ @@ -3536,12 +3872,28 @@ easy_install ``python -m``, and marks them as unsafe for zipping, since Python 2.4 can't handle ``-m`` on zipped modules. + * Fix ``python -m easy_install`` not working due to setuptools being installed + as a zipfile. Update safety scanner to check for modules that might be used + as ``python -m`` scripts. + + * Misc. fixes for win32.exe support, including changes to support Python 2.4's + changed ``bdist_wininst`` format. + 0.5a11 ------ * Fix breakage of the "develop" command that was caused by the addition of ``--always-unzip`` to the ``easy_install`` command. +0.5a10 +------ + + * Put the ``easy_install`` module back in as a module, as it's needed for + ``python -m`` to run it! + + * Allow ``--find-links/-f`` to accept local directories or filenames as well + as URLs. + 0.5a9 ----- @@ -3576,6 +3928,31 @@ easy_install * Fixed the swapped ``-d`` and ``-b`` options of ``bdist_egg``. + * EasyInstall now automatically detects when an "unmanaged" package or + module is going to be on ``sys.path`` ahead of a package you're installing, + thereby preventing the newer version from being imported. By default, it + will abort installation to alert you of the problem, but there are also + new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``) + available to change the default behavior. (Note: this new feature doesn't + take effect for egg files that were built with older ``setuptools`` + versions, because they lack the new metadata file required to implement it.) + + * The ``easy_install`` distutils command now uses ``DistutilsError`` as its + base error type for errors that should just issue a message to stderr and + exit the program without a traceback. + + * EasyInstall can now be given a path to a directory containing a setup + script, and it will attempt to build and install the package there. + + * EasyInstall now performs a safety analysis on module contents to determine + whether a package is likely to run in zipped form, and displays + information about what modules may be doing introspection that would break + when running as a zipfile. + + * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that + would ordinarily be considered safe to unzip, and changed the meaning of + ``--zip-ok/-z`` to "always leave everything zipped". + 0.5a8 ----- @@ -3603,6 +3980,9 @@ easy_install * Added a "setopt" command that sets a single option in a specified distutils configuration file. + * There is now a separate documentation page for setuptools; revision + history that's not specific to EasyInstall has been moved to that page. + 0.5a7 ----- @@ -3670,6 +4050,39 @@ easy_install * Setup scripts using setuptools now always install using ``easy_install`` internally, for ease of uninstallation and upgrading. + * Added ``--always-copy/-a`` option to always copy needed packages to the + installation directory, even if they're already present elsewhere on + sys.path. (In previous versions, this was the default behavior, but now + you must request it.) + + * Added ``--upgrade/-U`` option to force checking PyPI for latest available + version(s) of all packages requested by name and version, even if a matching + version is available locally. + + * Added automatic installation of dependencies declared by a distribution + being installed. These dependencies must be listed in the distribution's + ``EGG-INFO`` directory, so the distribution has to have declared its + dependencies by using setuptools. If a package has requirements it didn't + declare, you'll still have to deal with them yourself. (E.g., by asking + EasyInstall to find and install them.) + + * Added the ``--record`` option to ``easy_install`` for the benefit of tools + that run ``setup.py install --record=filename`` on behalf of another + packaging system.) + +0.5a3 +----- + + * Fixed not setting script permissions to allow execution. + + * Improved sandboxing so that setup scripts that want a temporary directory + (e.g. pychecker) can still run in the sandbox. + +0.5a2 +----- + + * Fix stupid stupid refactoring-at-the-last-minute typos. :( + 0.5a1 ----- @@ -3684,6 +4097,29 @@ easy_install from setuptools import setup # etc... + * Added support for converting ``.win32.exe`` installers to eggs on the fly. + EasyInstall will now recognize such files by name and install them. + + * Fixed a problem with picking the "best" version to install (versions were + being sorted as strings, rather than as parsed values) + +0.4a4 +----- + + * Added support for the distutils "verbose/quiet" and "dry-run" options, as + well as the "optimize" flag. + + * Support downloading packages that were uploaded to PyPI (by scanning all + links on package pages, not just the homepage/download links). + +0.4a3 +----- + + * Add progress messages to the search/download process so that you can tell + what URLs it's reading to find download links. (Hopefully, this will help + people report out-of-date and broken links to package authors, and to tell + when they've asked for a package that doesn't exist.) + 0.4a2 ----- @@ -3711,6 +4147,44 @@ easy_install their ``command_consumes_arguments`` attribute to ``True`` in order to receive an ``args`` option containing the rest of the command line. + * Added support for installing scripts + + * Added support for setting options via distutils configuration files, and + using distutils' default options as a basis for EasyInstall's defaults. + + * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the + script installation directory option. + + * Use ``urllib2`` instead of ``urllib``, to allow use of ``https:`` URLs if + Python includes SSL support. + +0.4a1 +----- + + * Added ``--scan-url`` and ``--index-url`` options, to scan download pages + and search PyPI for needed packages. + +0.3a4 +----- + + * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single + URL installs, to avoid running the wrong setup.py. + +0.3a3 +----- + + * Added ``--build-directory=DIR/-b DIR`` option. + + * Added "installation report" that explains how to use 'require()' when doing + a multiversion install or alternate installation directory. + + * Added SourceForge mirror auto-select (Contributed by Ian Bicking) + + * Added "sandboxing" that stops a setup script from running if it attempts to + write to the filesystem outside of the build area + + * Added more workarounds for packages with quirky ``install_data`` hacks + 0.3a2 ----- @@ -3718,6 +4192,9 @@ easy_install with a subversion revision number, the current date, or an explicit tag value. Run ``setup.py bdist_egg --help`` to get more information. + * Added subversion download support for ``svn:`` and ``svn+`` URLs, as well as + automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking) + * Misc. bug fixes 0.3a1 diff --git a/docs/easy_install.txt b/docs/easy_install.txt index f426b6ffd5..56c1a394f3 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -1114,504 +1114,6 @@ displayed MD5 info (broken onto two lines for readability):: ([^<]+)\n\s+\(md5\) -History -======= - -0.6c9 - * Fixed ``win32.exe`` support for .pth files, so unnecessary directory nesting - is flattened out in the resulting egg. (There was a case-sensitivity - problem that affected some distributions, notably ``pywin32``.) - - * Prevent ``--help-commands`` and other junk from showing under Python 2.5 - when running ``easy_install --help``. - - * Fixed GUI scripts sometimes not executing on Windows - - * Fixed not picking up dependency links from recursive dependencies. - - * Only make ``.py``, ``.dll`` and ``.so`` files executable when unpacking eggs - - * Changes for Jython compatibility - - * Improved error message when a requirement is also a directory name, but the - specified directory is not a source package. - - * Fixed ``--allow-hosts`` option blocking ``file:`` URLs - - * Fixed HTTP SVN detection failing when the page title included a project - name (e.g. on SourceForge-hosted SVN) - - * Fix Jython script installation to handle ``#!`` lines better when - ``sys.executable`` is a script. - - * Removed use of deprecated ``md5`` module if ``hashlib`` is available - - * Keep site directories (e.g. ``site-packages``) from being included in - ``.pth`` files. - -0.6c7 - * ``ftp:`` download URLs now work correctly. - - * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use - the Python Package Index's new simpler (and faster!) REST API. - -0.6c6 - * EasyInstall no longer aborts the installation process if a URL it wants to - retrieve can't be downloaded, unless the URL is an actual package download. - Instead, it issues a warning and tries to keep going. - - * Fixed distutils-style scripts originally built on Windows having their line - endings doubled when installed on any platform. - - * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects - installed using ``setup.py develop``. - - * Fixed not HTML-decoding URLs scraped from web pages - -0.6c5 - * Fixed ``.dll`` files on Cygwin not having executable permissions when an egg - is installed unzipped. - -0.6c4 - * Added support for HTTP "Basic" authentication using ``http://user:pass@host`` - URLs. If a password-protected page contains links to the same host (and - protocol), those links will inherit the credentials used to access the - original page. - - * Removed all special support for Sourceforge mirrors, as Sourceforge's - mirror system now works well for non-browser downloads. - - * Fixed not recognizing ``win32.exe`` installers that included a custom - bitmap. - - * Fixed not allowing ``os.open()`` of paths outside the sandbox, even if they - are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as - is done by ``os.urandom()`` on some platforms). - - * Fixed a problem with ``.pth`` testing on Windows when ``sys.executable`` - has a space in it (e.g., the user installed Python to a ``Program Files`` - directory). - -0.6c3 - * You can once again use "python -m easy_install" with Python 2.4 and above. - - * Python 2.5 compatibility fixes added. - -0.6c2 - * Windows script wrappers now support quoted arguments and arguments - containing spaces. (Patch contributed by Jim Fulton.) - - * The ``ez_setup.py`` script now actually works when you put a setuptools - ``.egg`` alongside it for bootstrapping an offline machine. - - * A writable installation directory on ``sys.path`` is no longer required to - download and extract a source distribution using ``--editable``. - - * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable`` - contains non-ASCII characters, to prevent deprecation warnings about an - unspecified encoding when the script is run. - -0.6c1 - * EasyInstall now includes setuptools version information in the - ``User-Agent`` string sent to websites it visits. - -0.6b4 - * Fix creating Python wrappers for non-Python scripts - - * Fix ``ftp://`` directory listing URLs from causing a crash when used in the - "Home page" or "Download URL" slots on PyPI. - - * Fix ``sys.path_importer_cache`` not being updated when an existing zipfile - or directory is deleted/overwritten. - - * Fix not recognizing HTML 404 pages from package indexes. - - * Allow ``file://`` URLs to be used as a package index. URLs that refer to - directories will use an internally-generated directory listing if there is - no ``index.html`` file in the directory. - - * Allow external links in a package index to be specified using - ``rel="homepage"`` or ``rel="download"``, without needing the old - PyPI-specific visible markup. - - * Suppressed warning message about possibly-misspelled project name, if an egg - or link for that project name has already been seen. - -0.6b3 - * Fix local ``--find-links`` eggs not being copied except with - ``--always-copy``. - - * Fix sometimes not detecting local packages installed outside of "site" - directories. - - * Fix mysterious errors during initial ``setuptools`` install, caused by - ``ez_setup`` trying to run ``easy_install`` twice, due to a code fallthru - after deleting the egg from which it's running. - -0.6b2 - * Don't install or update a ``site.py`` patch when installing to a - ``PYTHONPATH`` directory with ``--multi-version``, unless an - ``easy-install.pth`` file is already in use there. - - * Construct ``.pth`` file paths in such a way that installing an egg whose - name begins with ``import`` doesn't cause a syntax error. - - * Fixed a bogus warning message that wasn't updated since the 0.5 versions. - -0.6b1 - * Better ambiguity management: accept ``#egg`` name/version even if processing - what appears to be a correctly-named distutils file, and ignore ``.egg`` - files with no ``-``, since valid Python ``.egg`` files always have a version - number (but Scheme eggs often don't). - - * Support ``file://`` links to directories in ``--find-links``, so that - easy_install can build packages from local source checkouts. - - * Added automatic retry for Sourceforge mirrors. The new download process is - to first just try dl.sourceforge.net, then randomly select mirror IPs and - remove ones that fail, until something works. The removed IPs stay removed - for the remainder of the run. - - * Ignore bdist_dumb distributions when looking at download URLs. - -0.6a11 - * Process ``dependency_links.txt`` if found in a distribution, by adding the - URLs to the list for scanning. - - * Use relative paths in ``.pth`` files when eggs are being installed to the - same directory as the ``.pth`` file. This maximizes portability of the - target directory when building applications that contain eggs. - - * Added ``easy_install-N.N`` script(s) for convenience when using multiple - Python versions. - - * Added automatic handling of installation conflicts. Eggs are now shifted to - the front of sys.path, in an order consistent with where they came from, - making EasyInstall seamlessly co-operate with system package managers. - - The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options - are now no longer necessary, and will generate warnings at the end of a - run if you use them. - - * Don't recursively traverse subdirectories given to ``--find-links``. - -0.6a10 - * Added exhaustive testing of the install directory, including a spawn test - for ``.pth`` file support, and directory writability/existence checks. This - should virtually eliminate the need to set or configure ``--site-dirs``. - - * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of - RTFM-ing. :) - - * Enhanced ``PYTHONPATH`` support so that you don't have to put any eggs on it - manually to make it work. ``--multi-version`` is no longer a silent - default; you must explicitly use it if installing to a non-PYTHONPATH, - non-"site" directory. - - * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``, - ``--install-dir``, and ``--script-dir`` options, whether on the command line - or in configuration files. - - * Improved SourceForge mirror processing to work faster and be less affected - by transient HTML changes made by SourceForge. - - * PyPI searches now use the exact spelling of requirements specified on the - command line or in a project's ``install_requires``. Previously, a - normalized form of the name was used, which could lead to unnecessary - full-index searches when a project's name had an underscore (``_``) in it. - - * EasyInstall can now download bare ``.py`` files and wrap them in an egg, - as long as you include an ``#egg=name-version`` suffix on the URL, or if - the ``.py`` file is listed as the "Download URL" on the project's PyPI page. - This allows third parties to "package" trivial Python modules just by - linking to them (e.g. from within their own PyPI page or download links - page). - - * The ``--always-copy`` option now skips "system" and "development" eggs since - they can't be reliably copied. Note that this may cause EasyInstall to - choose an older version of a package than what you expected, or it may cause - downloading and installation of a fresh version of what's already installed. - - * The ``--find-links`` option previously scanned all supplied URLs and - directories as early as possible, but now only directories and direct - archive links are scanned immediately. URLs are not retrieved unless a - package search was already going to go online due to a package not being - available locally, or due to the use of the ``--update`` or ``-U`` option. - - * Fixed the annoying ``--help-commands`` wart. - -0.6a9 - * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside - "baskets") when they weren't explicitly listed in the ``.pth`` file. - - * If more than one URL appears to describe the exact same distribution, prefer - the shortest one. This helps to avoid "table of contents" CGI URLs like the - ones on effbot.org. - - * Quote arguments to python.exe (including python's path) to avoid problems - when Python (or a script) is installed in a directory whose name contains - spaces on Windows. - - * Support full roundtrip translation of eggs to and from ``bdist_wininst`` - format. Running ``bdist_wininst`` on a setuptools-based package wraps the - egg in an .exe that will safely install it as an egg (i.e., with metadata - and entry-point wrapper scripts), and ``easy_install`` can turn the .exe - back into an ``.egg`` file or directory and install it as such. - -0.6a8 - * Update for changed SourceForge mirror format - - * Fixed not installing dependencies for some packages fetched via Subversion - - * Fixed dependency installation with ``--always-copy`` not using the same - dependency resolution procedure as other operations. - - * Fixed not fully removing temporary directories on Windows, if a Subversion - checkout left read-only files behind - - * Fixed some problems building extensions when Pyrex was installed, especially - with Python 2.4 and/or packages using SWIG. - -0.6a7 - * Fixed not being able to install Windows script wrappers using Python 2.3 - -0.6a6 - * Added support for "traditional" PYTHONPATH-based non-root installation, and - also the convenient ``virtual-python.py`` script, based on a contribution - by Ian Bicking. The setuptools egg now contains a hacked ``site`` module - that makes the PYTHONPATH-based approach work with .pth files, so that you - can get the full EasyInstall feature set on such installations. - - * Added ``--no-deps`` and ``--allow-hosts`` options. - - * Improved Windows ``.exe`` script wrappers so that the script can have the - same name as a module without confusing Python. - - * Changed dependency processing so that it's breadth-first, allowing a - depender's preferences to override those of a dependee, to prevent conflicts - when a lower version is acceptable to the dependee, but not the depender. - Also, ensure that currently installed/selected packages aren't given - precedence over ones desired by a package being installed, which could - cause conflict errors. - -0.6a3 - * Improved error message when trying to use old ways of running - ``easy_install``. Removed the ability to run via ``python -m`` or by - running ``easy_install.py``; ``easy_install`` is the command to run on all - supported platforms. - - * Improved wrapper script generation and runtime initialization so that a - VersionConflict doesn't occur if you later install a competing version of a - needed package as the default version of that package. - - * Fixed a problem parsing version numbers in ``#egg=`` links. - -0.6a2 - * EasyInstall can now install "console_scripts" defined by packages that use - ``setuptools`` and define appropriate entry points. On Windows, console - scripts get an ``.exe`` wrapper so you can just type their name. On other - platforms, the scripts are installed without a file extension. - - * Using ``python -m easy_install`` or running ``easy_install.py`` is now - DEPRECATED, since an ``easy_install`` wrapper is now available on all - platforms. - -0.6a1 - * EasyInstall now does MD5 validation of downloads from PyPI, or from any link - that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest. - - * EasyInstall now handles symlinks in target directories by removing the link, - rather than attempting to overwrite the link's destination. This makes it - easier to set up an alternate Python "home" directory (as described above in - the `Non-Root Installation`_ section). - - * Added support for handling MacOS platform information in ``.egg`` filenames, - based on a contribution by Kevin Dangoor. You may wish to delete and - reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", - because the format for this platform information has changed so that minor - OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a - previous OS version to become obsolete. - - * easy_install's dependency processing algorithms have changed. When using - ``--always-copy``, it now ensures that dependencies are copied too. When - not using ``--always-copy``, it tries to use a single resolution loop, - rather than recursing. - - * Fixed installing extra ``.pyc`` or ``.pyo`` files for scripts with ``.py`` - extensions. - - * Added ``--site-dirs`` option to allow adding custom "site" directories. - Made ``easy-install.pth`` work in platform-specific alternate site - directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). - - * If you manually delete the current version of a package, the next run of - EasyInstall against the target directory will now remove the stray entry - from the ``easy-install.pth`` file. - - * EasyInstall now recognizes URLs with a ``#egg=project_name`` fragment ID - as pointing to the named project's source checkout. Such URLs have a lower - match precedence than any other kind of distribution, so they'll only be - used if they have a higher version number than any other available - distribution, or if you use the ``--editable`` option. The ``#egg`` - fragment can contain a version if it's formatted as ``#egg=proj-ver``, - where ``proj`` is the project name, and ``ver`` is the version number. You - *must* use the format for these values that the ``bdist_egg`` command uses; - i.e., all non-alphanumeric runs must be condensed to single underscore - characters. - - * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_ - above for more info. Also, slightly changed the behavior of the - ``--build-directory`` option. - - * Fixed the setup script sandbox facility not recognizing certain paths as - valid on case-insensitive platforms. - -0.5a12 - * Fix ``python -m easy_install`` not working due to setuptools being installed - as a zipfile. Update safety scanner to check for modules that might be used - as ``python -m`` scripts. - - * Misc. fixes for win32.exe support, including changes to support Python 2.4's - changed ``bdist_wininst`` format. - -0.5a10 - * Put the ``easy_install`` module back in as a module, as it's needed for - ``python -m`` to run it! - - * Allow ``--find-links/-f`` to accept local directories or filenames as well - as URLs. - -0.5a9 - * EasyInstall now automatically detects when an "unmanaged" package or - module is going to be on ``sys.path`` ahead of a package you're installing, - thereby preventing the newer version from being imported. By default, it - will abort installation to alert you of the problem, but there are also - new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``) - available to change the default behavior. (Note: this new feature doesn't - take effect for egg files that were built with older ``setuptools`` - versions, because they lack the new metadata file required to implement it.) - - * The ``easy_install`` distutils command now uses ``DistutilsError`` as its - base error type for errors that should just issue a message to stderr and - exit the program without a traceback. - - * EasyInstall can now be given a path to a directory containing a setup - script, and it will attempt to build and install the package there. - - * EasyInstall now performs a safety analysis on module contents to determine - whether a package is likely to run in zipped form, and displays - information about what modules may be doing introspection that would break - when running as a zipfile. - - * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that - would ordinarily be considered safe to unzip, and changed the meaning of - ``--zip-ok/-z`` to "always leave everything zipped". - -0.5a8 - * There is now a separate documentation page for `setuptools`_; revision - history that's not specific to EasyInstall has been moved to that page. - - .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools - -0.5a5 - * Made ``easy_install`` a standard ``setuptools`` command, moving it from - the ``easy_install`` module to ``setuptools.command.easy_install``. Note - that if you were importing or extending it, you must now change your imports - accordingly. ``easy_install.py`` is still installed as a script, but not as - a module. - -0.5a4 - * Added ``--always-copy/-a`` option to always copy needed packages to the - installation directory, even if they're already present elsewhere on - sys.path. (In previous versions, this was the default behavior, but now - you must request it.) - - * Added ``--upgrade/-U`` option to force checking PyPI for latest available - version(s) of all packages requested by name and version, even if a matching - version is available locally. - - * Added automatic installation of dependencies declared by a distribution - being installed. These dependencies must be listed in the distribution's - ``EGG-INFO`` directory, so the distribution has to have declared its - dependencies by using setuptools. If a package has requirements it didn't - declare, you'll still have to deal with them yourself. (E.g., by asking - EasyInstall to find and install them.) - - * Added the ``--record`` option to ``easy_install`` for the benefit of tools - that run ``setup.py install --record=filename`` on behalf of another - packaging system.) - -0.5a3 - * Fixed not setting script permissions to allow execution. - - * Improved sandboxing so that setup scripts that want a temporary directory - (e.g. pychecker) can still run in the sandbox. - -0.5a2 - * Fix stupid stupid refactoring-at-the-last-minute typos. :( - -0.5a1 - * Added support for converting ``.win32.exe`` installers to eggs on the fly. - EasyInstall will now recognize such files by name and install them. - - * Fixed a problem with picking the "best" version to install (versions were - being sorted as strings, rather than as parsed values) - -0.4a4 - * Added support for the distutils "verbose/quiet" and "dry-run" options, as - well as the "optimize" flag. - - * Support downloading packages that were uploaded to PyPI (by scanning all - links on package pages, not just the homepage/download links). - -0.4a3 - * Add progress messages to the search/download process so that you can tell - what URLs it's reading to find download links. (Hopefully, this will help - people report out-of-date and broken links to package authors, and to tell - when they've asked for a package that doesn't exist.) - -0.4a2 - * Added support for installing scripts - - * Added support for setting options via distutils configuration files, and - using distutils' default options as a basis for EasyInstall's defaults. - - * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the - script installation directory option. - - * Use ``urllib2`` instead of ``urllib``, to allow use of ``https:`` URLs if - Python includes SSL support. - -0.4a1 - * Added ``--scan-url`` and ``--index-url`` options, to scan download pages - and search PyPI for needed packages. - -0.3a4 - * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single - URL installs, to avoid running the wrong setup.py. - -0.3a3 - * Added ``--build-directory=DIR/-b DIR`` option. - - * Added "installation report" that explains how to use 'require()' when doing - a multiversion install or alternate installation directory. - - * Added SourceForge mirror auto-select (Contributed by Ian Bicking) - - * Added "sandboxing" that stops a setup script from running if it attempts to - write to the filesystem outside of the build area - - * Added more workarounds for packages with quirky ``install_data`` hacks - -0.3a2 - * Added subversion download support for ``svn:`` and ``svn+`` URLs, as well as - automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking) - - * Misc. bug fixes - -0.3a1 - * Initial release. - Future Plans ============ From e919dab687d281fe0242b17ba1727e91046eb26b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 10:53:09 -0400 Subject: [PATCH 7141/8469] Remove backwards compatibility notes and future plans from Easy Install docs --- docs/easy_install.txt | 45 ------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 56c1a394f3..d28141f18b 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -1077,48 +1077,3 @@ EasyInstall to be able to look up and download packages: 8. If a package index is accessed via a ``file://`` URL, then EasyInstall will automatically use ``index.html`` files, if present, when trying to read a directory with a trailing ``/`` on the URL. - - -Backward Compatibility -~~~~~~~~~~~~~~~~~~~~~~ - -Package indexes that wish to support setuptools versions prior to 0.6b4 should -also follow these rules: - -* Homepage and download links must be preceded with ``"Home Page"`` or - ``"Download URL"``, in addition to (or instead of) the ``rel=""`` - attributes on the actual links. These marker strings do not need to be - visible, or uncommented, however! For example, the following is a valid - homepage link that will work with any version of setuptools:: - -
  • - Home Page: - - http://sqlobject.org -
  • - - Even though the marker string is in an HTML comment, older versions of - EasyInstall will still "see" it and know that the link that follows is the - project's home page URL. - -* The pages described by paragraph 3(b) of the preceding section *must* - contain the string ``"Index of Packages"`` somewhere in their text. - This can be inside of an HTML comment, if desired, and it can be anywhere - in the page. (Note: this string MUST NOT appear on normal project pages, as - described in paragraphs 2 and 3(a)!) - -In addition, for compatibility with PyPI versions that do not use ``#md5=`` -fragment IDs, EasyInstall uses the following regular expression to match PyPI's -displayed MD5 info (broken onto two lines for readability):: - - ([^<]+)\n\s+\(md5\) - - -Future Plans -============ - -* Additional utilities to list/remove/verify packages -* Signature checking? SSL? Ability to suppress PyPI search? -* Display byte progress meter when downloading distributions and long pages? -* Redirect stdout/stderr to log during run_setup? From f4b320e5e3ec9c7e1ef4b90017050e029029d449 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 10:55:41 -0400 Subject: [PATCH 7142/8469] Update Easy Install docs reflecting the deprecation. --- docs/easy_install.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index d28141f18b..9b98a6e05b 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -2,6 +2,12 @@ Easy Install ============ +..warning:: + Easy Install is deprecated. Do not use it. Instead use pip. If + you think you need Easy Install, please reach out to the PyPA + team (a ticket to pip or setuptools is fine), describing your + use-case. + Easy Install is a python module (``easy_install``) bundled with ``setuptools`` that lets you automatically download, build, install, and manage Python packages. From 533d9592c64c8996bf642339cbd6d63f958c1d3b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:01:06 -0400 Subject: [PATCH 7143/8469] Pin against sphinx 1.8.0 due to sphinx-doc/sphinx#5417. --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 2138c88492..c6d594e8d5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -sphinx +sphinx!=1.8.0 rst.linker>=1.9 jaraco.packaging>=3.2 From 73503dfd7476752d0a0ebffc9a7205ef1b22f751 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:03:25 -0400 Subject: [PATCH 7144/8469] Fix broken reference to setuptools docs --- docs/easy_install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 9b98a6e05b..41d182e041 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -23,7 +23,7 @@ bug -- and then do so via list discussion first.) (Also, if you'd like to learn about how you can use ``setuptools`` to make your own packages work better with EasyInstall, or provide EasyInstall-like features without requiring your users to use EasyInstall directly, you'll probably want -to check out the full `setuptools`_ documentation as well.) +to check out the full documentation as well.) .. contents:: **Table of Contents** From 91b6f64cf48efc9ad55e6036ebcf6e8554c7968f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:06:05 -0400 Subject: [PATCH 7145/8469] Fix other broken references due to moving changelog --- CHANGES.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index fd42a6b519..5c673a74f8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3821,8 +3821,8 @@ easy_install * EasyInstall now handles symlinks in target directories by removing the link, rather than attempting to overwrite the link's destination. This makes it - easier to set up an alternate Python "home" directory (as described above in - the `Non-Root Installation`_ section). + easier to set up an alternate Python "home" directory (as described in + the Non-Root Installation section of the docs). * Added support for handling MacOS platform information in ``.egg`` filenames, based on a contribution by Kevin Dangoor. You may wish to delete and @@ -3858,8 +3858,8 @@ easy_install i.e., all non-alphanumeric runs must be condensed to single underscore characters. - * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_ - above for more info. Also, slightly changed the behavior of the + * Added the ``--editable`` option; see Editing and Viewing Source Packages + in the docs. Also, slightly changed the behavior of the ``--build-directory`` option. * Fixed the setup script sandbox facility not recognizing certain paths as From 5f2cb7661d989e79b82c0df195e0c371fab3949f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:13:40 -0400 Subject: [PATCH 7146/8469] Update changelog --- changelog.d/1324.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1324.change.rst diff --git a/changelog.d/1324.change.rst b/changelog.d/1324.change.rst new file mode 100644 index 0000000000..5c97dd2a30 --- /dev/null +++ b/changelog.d/1324.change.rst @@ -0,0 +1 @@ +Make safe_name compliant with PEP 503. From 4af86b5ac3caf2e3b79b3227c9d11ae01210c1ee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:49:35 -0400 Subject: [PATCH 7147/8469] Minor reword --- changelog.d/1402.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1402.change.rst b/changelog.d/1402.change.rst index 5a68ac9ddf..52852f055e 100644 --- a/changelog.d/1402.change.rst +++ b/changelog.d/1402.change.rst @@ -1,2 +1,2 @@ -Fixed a bug with namespace packages under python-3.6 when one package in +Fixed a bug with namespace packages under Python 3.6 when one package in current directory hides another which is installed. From c2018ee09b7f442b33b441eed02eb5d8f68fd278 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:50:03 -0400 Subject: [PATCH 7148/8469] Add periods to changelog entries --- changelog.d/1474.change.rst | 2 +- changelog.d/1479.misc.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.d/1474.change.rst b/changelog.d/1474.change.rst index 9d40e785a8..c02f059bdf 100644 --- a/changelog.d/1474.change.rst +++ b/changelog.d/1474.change.rst @@ -1 +1 @@ -``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore +``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore. diff --git a/changelog.d/1479.misc.rst b/changelog.d/1479.misc.rst index b04b0ce15f..604827c1fc 100644 --- a/changelog.d/1479.misc.rst +++ b/changelog.d/1479.misc.rst @@ -1 +1 @@ -Remove internal use of six.binary_type +Remove internal use of six.binary_type. From cdcc7e5f1ecb6e485a71676a071d1b37adac3d51 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 11:59:31 -0400 Subject: [PATCH 7149/8469] Revert "Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2" --- changelog.d/1324.change.rst | 1 - pkg_resources/__init__.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1324.change.rst diff --git a/changelog.d/1324.change.rst b/changelog.d/1324.change.rst deleted file mode 100644 index 5c97dd2a30..0000000000 --- a/changelog.d/1324.change.rst +++ /dev/null @@ -1 +0,0 @@ -Make safe_name compliant with PEP 503. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 84a4b34bf6..3ae2c5cdb7 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1312,9 +1312,9 @@ def get_default_cache(): def safe_name(name): """Convert an arbitrary string to a standard distribution name - Any runs of non-alphanumeric characters are replaced with a single '-'. + Any runs of non-alphanumeric/. characters are replaced with a single '-'. """ - return re.sub('[^A-Za-z0-9]+', '-', name) + return re.sub('[^A-Za-z0-9.]+', '-', name) def safe_version(version): From b711d1b53b2556b47273c28dae3345a664c54972 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Sep 2018 12:19:10 -0400 Subject: [PATCH 7150/8469] =?UTF-8?q?Bump=20version:=2040.2.0=20=E2=86=92?= =?UTF-8?q?=2040.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 11 +++++++++++ changelog.d/1402.change.rst | 2 -- changelog.d/1427.change.rst | 1 - changelog.d/1474.change.rst | 1 - changelog.d/1479.misc.rst | 1 - changelog.d/1486.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/1402.change.rst delete mode 100644 changelog.d/1427.change.rst delete mode 100644 changelog.d/1474.change.rst delete mode 100644 changelog.d/1479.misc.rst delete mode 100644 changelog.d/1486.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 5c673a74f8..5da4acfa4f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v40.3.0 +------- + +* #1402: Fixed a bug with namespace packages under Python 3.6 when one package in + current directory hides another which is installed. +* #1427: Set timestamp of ``.egg-info`` directory whenever ``egg_info`` command is run. +* #1474: ``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore. +* #1486: Suppress warnings in pkg_resources.handle_ns. +* #1479: Remove internal use of six.binary_type. + + v40.2.0 ------- diff --git a/changelog.d/1402.change.rst b/changelog.d/1402.change.rst deleted file mode 100644 index 52852f055e..0000000000 --- a/changelog.d/1402.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed a bug with namespace packages under Python 3.6 when one package in -current directory hides another which is installed. diff --git a/changelog.d/1427.change.rst b/changelog.d/1427.change.rst deleted file mode 100644 index 86260235a4..0000000000 --- a/changelog.d/1427.change.rst +++ /dev/null @@ -1 +0,0 @@ -Set timestamp of ``.egg-info`` directory whenever ``egg_info`` command is run. diff --git a/changelog.d/1474.change.rst b/changelog.d/1474.change.rst deleted file mode 100644 index c02f059bdf..0000000000 --- a/changelog.d/1474.change.rst +++ /dev/null @@ -1 +0,0 @@ -``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore. diff --git a/changelog.d/1479.misc.rst b/changelog.d/1479.misc.rst deleted file mode 100644 index 604827c1fc..0000000000 --- a/changelog.d/1479.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Remove internal use of six.binary_type. diff --git a/changelog.d/1486.change.rst b/changelog.d/1486.change.rst deleted file mode 100644 index 561784fb0f..0000000000 --- a/changelog.d/1486.change.rst +++ /dev/null @@ -1 +0,0 @@ -Suppress warnings in pkg_resources.handle_ns. diff --git a/setup.cfg b/setup.cfg index df021971e5..f013124cd7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.2.0 +current_version = 40.3.0 commit = True tag = True diff --git a/setup.py b/setup.py index 96dbbbbc6e..38057fd82f 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.2.0", + version="40.3.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From d39791489ce78d16e0238f60c429f0be08f4a994 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Fri, 14 Sep 2018 15:01:41 +0100 Subject: [PATCH 7151/8469] build_meta sdist directory delegate to --dist-dir --- setuptools/build_meta.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index f7f9bda241..0067a7ac35 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -171,11 +171,9 @@ def build_sdist(sdist_directory, config_settings=None): config_settings = _fix_config(config_settings) sdist_directory = os.path.abspath(sdist_directory) sys.argv = sys.argv[:1] + ['sdist'] + \ - config_settings["--global-option"] + config_settings["--global-option"] + \ + ["--dist-dir", sdist_directory] _run_setup() - if sdist_directory != 'dist': - shutil.rmtree(sdist_directory) - shutil.copytree('dist', sdist_directory) sdists = [f for f in os.listdir(sdist_directory) if f.endswith('.tar.gz')] From cd0278debfbd8d99d28f132d6c1fa67843d84170 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Fri, 14 Sep 2018 18:09:24 +0100 Subject: [PATCH 7152/8469] Add tests exposing the issues with sdist_directory not being --dist-dir --- setuptools/tests/test_build_meta.py | 36 ++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index f1d517bb08..7b195e2c38 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals import os +import shutil import pytest @@ -9,7 +10,6 @@ __metaclass__ = type - futures = pytest.importorskip('concurrent.futures') importlib = pytest.importorskip('importlib') @@ -23,12 +23,14 @@ def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): class BuildBackend(BuildBackendBase): """PEP 517 Build Backend""" + def __init__(self, *args, **kwargs): super(BuildBackend, self).__init__(*args, **kwargs) self.pool = futures.ProcessPoolExecutor() def __getattr__(self, name): """Handles aribrary function invocations on the build backend.""" + def method(*args, **kw): root = os.path.abspath(self.cwd) caller = BuildBackendCaller(root, self.env, self.backend_name) @@ -51,6 +53,7 @@ def __call__(self, name, *args, **kw): 'setup.py': DALS(""" __import__('setuptools').setup( name='foo', + version='0.0.0', py_modules=['hello'], setup_requires=['six'], ) @@ -65,6 +68,7 @@ def run(): assert __name__ == '__main__' __import__('setuptools').setup( name='foo', + version='0.0.0', py_modules=['hello'], setup_requires=['six'], ) @@ -82,6 +86,7 @@ def function(): assert variable __import__('setuptools').setup( name='foo', + version='0.0.0', py_modules=['hello'], setup_requires=['six'], ) @@ -146,3 +151,32 @@ def test_prepare_metadata_for_build_wheel_with_str(build_backend): dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) + + +def test_build_sdist_explicit_dist(build_backend): + # explicitly specifying the dist folder should work + # the folder sdist_directory and the ``--dist-dir`` can be the same + dist_dir = os.path.abspath('dist') + sdist_name = build_backend.build_sdist(dist_dir) + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + + +def test_build_sdist_version_change(build_backend): + sdist_into_directory = os.path.abspath("out_sdist") + os.makedirs(sdist_into_directory) + + sdist_name = build_backend.build_sdist(sdist_into_directory) + assert os.path.isfile(os.path.join(sdist_into_directory, sdist_name)) + + # if the setup.py changes subsequent call of the build meta should still succeed, given the + # sdist_directory the frontend specifies is empty + with open(os.path.abspath("setup.py"), 'rt') as file_handler: + content = file_handler.read() + with open(os.path.abspath("setup.py"), 'wt') as file_handler: + file_handler.write(content.replace("version='0.0.0'", "version='0.0.1'")) + + shutil.rmtree(sdist_into_directory) + os.makedirs(sdist_into_directory) + + sdist_name = build_backend.build_sdist("out_sdist") + assert os.path.isfile(os.path.join(os.path.abspath("out_sdist"), sdist_name)) From bcbc52840b4dc28daa9cc5d729ff646b911b77b7 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Sun, 16 Sep 2018 22:15:37 +0100 Subject: [PATCH 7153/8469] add changelog for #1481 --- changelog.d/1481.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1481.change.rst diff --git a/changelog.d/1481.change.rst b/changelog.d/1481.change.rst new file mode 100644 index 0000000000..ee0663a834 --- /dev/null +++ b/changelog.d/1481.change.rst @@ -0,0 +1 @@ +join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same (this means the build frontend no longer needs to clean manually the dist dir - to avoid multiple sdist presence, and we no longer need to handle conflicts between these two flags) From da5f8619e1cd3e08c8a7d9df1d3753b8f176485b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Sep 2018 09:05:53 -0400 Subject: [PATCH 7154/8469] wordsmith changelog --- changelog.d/1481.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1481.change.rst b/changelog.d/1481.change.rst index ee0663a834..463ba6d92e 100644 --- a/changelog.d/1481.change.rst +++ b/changelog.d/1481.change.rst @@ -1 +1 @@ -join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same (this means the build frontend no longer needs to clean manually the dist dir - to avoid multiple sdist presence, and we no longer need to handle conflicts between these two flags) +Join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two). From b40d2de57b61a28cb79f25eb99a2c2e6f9426343 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Sep 2018 09:08:44 -0400 Subject: [PATCH 7155/8469] =?UTF-8?q?Bump=20version:=2040.3.0=20=E2=86=92?= =?UTF-8?q?=2040.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1481.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1481.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 5da4acfa4f..189ea809b7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.4.0 +------- + +* #1481: Join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two). + + v40.3.0 ------- diff --git a/changelog.d/1481.change.rst b/changelog.d/1481.change.rst deleted file mode 100644 index 463ba6d92e..0000000000 --- a/changelog.d/1481.change.rst +++ /dev/null @@ -1 +0,0 @@ -Join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two). diff --git a/setup.cfg b/setup.cfg index f013124cd7..7c87806490 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.3.0 +current_version = 40.4.0 commit = True tag = True diff --git a/setup.py b/setup.py index 38057fd82f..3ecf1d2e5b 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.3.0", + version="40.4.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From a170865f29bce8389ffcf5bfda8091fc6c120a45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Sep 2018 11:12:43 -0400 Subject: [PATCH 7156/8469] Update pavement not to import pip --- pavement.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pavement.py b/pavement.py index 84e5825d8b..b5220d102b 100644 --- a/pavement.py +++ b/pavement.py @@ -1,7 +1,8 @@ import re +import sys +import subprocess from paver.easy import task, path as Path -import pip def remove_all(paths): @@ -40,11 +41,13 @@ def clean(vendor): def install(vendor): clean(vendor) install_args = [ + sys.executable, + '-m', 'pip', 'install', '-r', str(vendor / 'vendored.txt'), '-t', str(vendor), ] - pip.main(install_args) + subprocess.check_call(install_args) remove_all(vendor.glob('*.dist-info')) remove_all(vendor.glob('*.egg-info')) (vendor / '__init__.py').write_text('') From d4b5eb62d4a848c5cf6e2a0c3c5f39151b31897d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Sep 2018 11:15:31 -0400 Subject: [PATCH 7157/8469] Bump to pyparsing 2.2.1 and re-run paver update_vendored. Fixes #1480. --- changelog.d/1480.change.rst | 1 + setuptools/_vendor/pyparsing.py | 46 ++++++++++++++++++++++++--------- setuptools/_vendor/vendored.txt | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 changelog.d/1480.change.rst diff --git a/changelog.d/1480.change.rst b/changelog.d/1480.change.rst new file mode 100644 index 0000000000..9d855bdf31 --- /dev/null +++ b/changelog.d/1480.change.rst @@ -0,0 +1 @@ +Bump vendored pyparsing to 2.2.1. diff --git a/setuptools/_vendor/pyparsing.py b/setuptools/_vendor/pyparsing.py index e8aefc8ca1..cf75e1e5fc 100644 --- a/setuptools/_vendor/pyparsing.py +++ b/setuptools/_vendor/pyparsing.py @@ -1,6 +1,6 @@ # module pyparsing.py # -# Copyright (c) 2003-2016 Paul T. McGuire +# Copyright (c) 2003-2018 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,6 +25,7 @@ __doc__ = \ """ pyparsing module - Classes and methods to define and execute parsing grammars +============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you @@ -58,10 +59,23 @@ class names, and the use of '+', '|' and '^' operators. - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments + + +Getting Started - +----------------- +Visit the classes L{ParserElement} and L{ParseResults} to see the base classes that most other pyparsing +classes inherit from. Use the docstrings for examples of how to: + - construct literal match expressions from L{Literal} and L{CaselessLiteral} classes + - construct character word-group expressions using the L{Word} class + - see how to create repetitive expressions using L{ZeroOrMore} and L{OneOrMore} classes + - use L{'+'}, L{'|'}, L{'^'}, and L{'&'} operators to combine simple expressions into more complex ones + - associate names with your parsed results using L{ParserElement.setResultsName} + - find some helpful expression short-cuts like L{delimitedList} and L{oneOf} + - find more useful common expressions in the L{pyparsing_common} namespace class """ -__version__ = "2.2.0" -__versionTime__ = "06 Mar 2017 02:06 UTC" +__version__ = "2.2.1" +__versionTime__ = "18 Sep 2018 00:49 UTC" __author__ = "Paul McGuire " import string @@ -82,6 +96,15 @@ class names, and the use of '+', '|' and '^' operators. except ImportError: from threading import RLock +try: + # Python 3 + from collections.abc import Iterable + from collections.abc import MutableMapping +except ImportError: + # Python 2.7 + from collections import Iterable + from collections import MutableMapping + try: from collections import OrderedDict as _OrderedDict except ImportError: @@ -940,7 +963,7 @@ def __getnewargs__(self): def __dir__(self): return (dir(type(self)) + list(self.keys())) -collections.MutableMapping.register(ParseResults) +MutableMapping.register(ParseResults) def col (loc,strg): """Returns current column within a string, counting newlines as line separators. @@ -1025,11 +1048,11 @@ def extract_stack(limit=0): # special handling for Python 3.5.0 - extra deep call stack by 1 offset = -3 if system_version == (3,5,0) else -2 frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset] - return [(frame_summary.filename, frame_summary.lineno)] + return [frame_summary[:2]] def extract_tb(tb, limit=0): frames = traceback.extract_tb(tb, limit=limit) frame_summary = frames[-1] - return [(frame_summary.filename, frame_summary.lineno)] + return [frame_summary[:2]] else: extract_stack = traceback.extract_stack extract_tb = traceback.extract_tb @@ -1374,7 +1397,7 @@ def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ): else: preloc = loc tokensStart = preloc - if self.mayIndexError or loc >= len(instring): + if self.mayIndexError or preloc >= len(instring): try: loc,tokens = self.parseImpl( instring, preloc, doActions ) except IndexError: @@ -1408,7 +1431,6 @@ def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ): self.resultsName, asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), modal=self.modalResults ) - if debugging: #~ print ("Matched",self,"->",retTokens.asList()) if (self.debugActions[1] ): @@ -3242,7 +3264,7 @@ def __init__( self, exprs, savelist = False ): if isinstance( exprs, basestring ): self.exprs = [ ParserElement._literalStringClass( exprs ) ] - elif isinstance( exprs, collections.Iterable ): + elif isinstance( exprs, Iterable ): exprs = list(exprs) # if sequence of strings provided, wrap with Literal if all(isinstance(expr, basestring) for expr in exprs): @@ -4393,7 +4415,7 @@ def traceParseAction(f): @traceParseAction def remove_duplicate_chars(tokens): - return ''.join(sorted(set(''.join(tokens))) + return ''.join(sorted(set(''.join(tokens)))) wds = OneOrMore(wd).setParseAction(remove_duplicate_chars) print(wds.parseString("slkdjs sld sldd sdlf sdljf")) @@ -4583,7 +4605,7 @@ def oneOf( strs, caseless=False, useRegex=True ): symbols = [] if isinstance(strs,basestring): symbols = strs.split() - elif isinstance(strs, collections.Iterable): + elif isinstance(strs, Iterable): symbols = list(strs) else: warnings.warn("Invalid argument to oneOf, expected string or iterable", @@ -4734,7 +4756,7 @@ def locatedExpr(expr): _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1]) _escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16))) _escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8))) -_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE) +_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | CharsNotIn(r'\]', exact=1) _charRange = Group(_singleChar + Suppress("-") + _singleChar) _reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]" diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index ca0d5ce38e..7d77863d57 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,3 +1,3 @@ packaging==16.8 -pyparsing==2.2.0 +pyparsing==2.2.1 six==1.10.0 From 4f86e36471749397aeb30b6c29edffa7b3bdefc6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Sep 2018 11:16:24 -0400 Subject: [PATCH 7158/8469] =?UTF-8?q?Bump=20version:=2040.4.0=20=E2=86=92?= =?UTF-8?q?=2040.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1480.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1480.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 189ea809b7..816a4d274c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.4.1 +------- + +* #1480: Bump vendored pyparsing to 2.2.1. + + v40.4.0 ------- diff --git a/changelog.d/1480.change.rst b/changelog.d/1480.change.rst deleted file mode 100644 index 9d855bdf31..0000000000 --- a/changelog.d/1480.change.rst +++ /dev/null @@ -1 +0,0 @@ -Bump vendored pyparsing to 2.2.1. diff --git a/setup.cfg b/setup.cfg index 7c87806490..26a14bdecc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.4.0 +current_version = 40.4.1 commit = True tag = True diff --git a/setup.py b/setup.py index 3ecf1d2e5b..5b08b18d01 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.4.0", + version="40.4.1", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 1eadacc8da624e5883d91040a7058b58557b400e Mon Sep 17 00:00:00 2001 From: joeflack4 Date: Wed, 19 Sep 2018 12:42:05 -0400 Subject: [PATCH 7159/8469] Added .idea/ to gitignore, to cover cases where people are using a Jetbrains text editor. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1f58eb319c..0c272d1c74 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ setuptools.egg-info *~ .hg* .cache +.idea/ .pytest_cache/ From e5fede1f013671465e4023d5048d2fbab33a8932 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 20 Sep 2018 13:38:34 -0700 Subject: [PATCH 7160/8469] bpo-34011: Fixes missing venv files and other tests (GH-9458) --- tests/test_bdist.py | 3 +++ tests/test_bdist_wininst.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index f762f5d987..c80b3edc02 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -39,6 +39,9 @@ def test_skip_build(self): for name in names: subcmd = cmd.get_finalized_command(name) + if getattr(subcmd, '_unsupported', False): + # command is not supported on this build + continue self.assertTrue(subcmd.skip_build, '%s should take --skip-build from bdist' % name) diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 5d17ab19a9..4c19bbab21 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -5,6 +5,8 @@ from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support +@unittest.skipIf(getattr(bdist_wininst, '_unsupported', False), + 'bdist_wininst is not supported in this install') class BuildWinInstTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): From 8cb8bb58e38f26c9abdc4904a30c55a006d73730 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Sep 2018 13:14:26 -0400 Subject: [PATCH 7161/8469] Update changelog for example release. --- changelog.d/1497.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1497.misc.rst diff --git a/changelog.d/1497.misc.rst b/changelog.d/1497.misc.rst new file mode 100644 index 0000000000..637a9d2d91 --- /dev/null +++ b/changelog.d/1497.misc.rst @@ -0,0 +1 @@ +Updated gitignore in repo. From 5ba6a4246793d5ad3c9ec105792c1d16aa13a205 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Sep 2018 13:16:06 -0400 Subject: [PATCH 7162/8469] =?UTF-8?q?Bump=20version:=2040.4.1=20=E2=86=92?= =?UTF-8?q?=2040.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1497.misc.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1497.misc.rst diff --git a/CHANGES.rst b/CHANGES.rst index 816a4d274c..01a91b5322 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.4.2 +------- + +* #1497: Updated gitignore in repo. + + v40.4.1 ------- diff --git a/changelog.d/1497.misc.rst b/changelog.d/1497.misc.rst deleted file mode 100644 index 637a9d2d91..0000000000 --- a/changelog.d/1497.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Updated gitignore in repo. diff --git a/setup.cfg b/setup.cfg index 26a14bdecc..b5659e19d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.4.1 +current_version = 40.4.2 commit = True tag = True diff --git a/setup.py b/setup.py index 5b08b18d01..ad5f52847c 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.4.1", + version="40.4.2", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 323ff835845c6b4e7e8a8e004f5ad4eaf878e4d8 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 23 Sep 2018 09:12:59 +0300 Subject: [PATCH 7163/8469] bpo-34421: Improve distutils logging for non-ASCII strings. (GH-9126) Use "backslashreplace" instead of "unicode-escape". It is not implementation depended and escapes only non-encodable characters. Also simplify the code. --- log.py | 7 +++---- tests/test_log.py | 46 ++++++++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/log.py b/log.py index 3a6602bc8b..8ef6b28ea2 100644 --- a/log.py +++ b/log.py @@ -27,14 +27,13 @@ def _log(self, level, msg, args): stream = sys.stderr else: stream = sys.stdout - if stream.errors == 'strict': + try: + stream.write('%s\n' % msg) + except UnicodeEncodeError: # emulate backslashreplace error handler encoding = stream.encoding msg = msg.encode(encoding, "backslashreplace").decode(encoding) - try: stream.write('%s\n' % msg) - except UnicodeEncodeError: - stream.write('%s\n' % msg.encode('unicode-escape').decode('ascii')) stream.flush() def log(self, level, msg, *args): diff --git a/tests/test_log.py b/tests/test_log.py index 0c2ad7a426..22c26246ca 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -3,33 +3,39 @@ import sys import unittest from tempfile import NamedTemporaryFile -from test.support import run_unittest +from test.support import swap_attr, run_unittest from distutils import log class TestLog(unittest.TestCase): def test_non_ascii(self): - # Issue #8663: test that non-ASCII text is escaped with - # backslashreplace error handler (stream use ASCII encoding and strict - # error handler) - old_stdout = sys.stdout - old_stderr = sys.stderr - old_threshold = log.set_threshold(log.DEBUG) - try: - with NamedTemporaryFile(mode="w+", encoding='ascii') as stdout, \ - NamedTemporaryFile(mode="w+", encoding='ascii') as stderr: - sys.stdout = stdout - sys.stderr = stderr - log.debug("debug:\xe9") - log.fatal("fatal:\xe9") + # Issues #8663, #34421: test that non-encodable text is escaped with + # backslashreplace error handler and encodable non-ASCII text is + # output as is. + for errors in ('strict', 'backslashreplace', 'surrogateescape', + 'replace', 'ignore'): + with self.subTest(errors=errors), \ + NamedTemporaryFile("w+", encoding='cp437', errors=errors) as stdout, \ + NamedTemporaryFile("w+", encoding='cp437', errors=errors) as stderr: + old_threshold = log.set_threshold(log.DEBUG) + try: + with swap_attr(sys, 'stdout', stdout), \ + swap_attr(sys, 'stderr', stderr): + log.debug('Dεbug\tMÄ—ssãge') + log.fatal('Fαtal\tÈrrÅr') + finally: + log.set_threshold(old_threshold) + stdout.seek(0) - self.assertEqual(stdout.read().rstrip(), "debug:\\xe9") + self.assertEqual(stdout.read().rstrip(), + 'Dεbug\tM?ss?ge' if errors == 'replace' else + 'Dεbug\tMssge' if errors == 'ignore' else + 'Dεbug\tM\\u0117ss\\xe3ge') stderr.seek(0) - self.assertEqual(stderr.read().rstrip(), "fatal:\\xe9") - finally: - log.set_threshold(old_threshold) - sys.stdout = old_stdout - sys.stderr = old_stderr + self.assertEqual(stderr.read().rstrip(), + 'Fαtal\t?rr?r' if errors == 'replace' else + 'Fαtal\trrr' if errors == 'ignore' else + 'Fαtal\t\\xc8rr\\u014dr') def test_suite(): return unittest.makeSuite(TestLog) From a23e74ec65eaca077c3e8f21d592823c821e98f6 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 23 Sep 2018 14:10:07 +0300 Subject: [PATCH 7164/8469] Use in-memory streams instead of NamedTemporaryFile. (GH-9508) --- tests/test_log.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_log.py b/tests/test_log.py index 22c26246ca..75cf900617 100644 --- a/tests/test_log.py +++ b/tests/test_log.py @@ -1,8 +1,8 @@ """Tests for distutils.log""" +import io import sys import unittest -from tempfile import NamedTemporaryFile from test.support import swap_attr, run_unittest from distutils import log @@ -14,9 +14,11 @@ def test_non_ascii(self): # output as is. for errors in ('strict', 'backslashreplace', 'surrogateescape', 'replace', 'ignore'): - with self.subTest(errors=errors), \ - NamedTemporaryFile("w+", encoding='cp437', errors=errors) as stdout, \ - NamedTemporaryFile("w+", encoding='cp437', errors=errors) as stderr: + with self.subTest(errors=errors): + stdout = io.TextIOWrapper(io.BytesIO(), + encoding='cp437', errors=errors) + stderr = io.TextIOWrapper(io.BytesIO(), + encoding='cp437', errors=errors) old_threshold = log.set_threshold(log.DEBUG) try: with swap_attr(sys, 'stdout', stdout), \ From 2862b90422c63afc8864952878594e4194c517d9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 10:21:47 -0400 Subject: [PATCH 7165/8469] Bump to pyparsing 2.2.1 and re-run paver update_vendored. Fixes #1480. --- changelog.d/1480.change.rst | 1 + pkg_resources/_vendor/pyparsing.py | 46 ++++++++++++++++++++++-------- pkg_resources/_vendor/vendored.txt | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 changelog.d/1480.change.rst diff --git a/changelog.d/1480.change.rst b/changelog.d/1480.change.rst new file mode 100644 index 0000000000..a15ceabd8b --- /dev/null +++ b/changelog.d/1480.change.rst @@ -0,0 +1 @@ +Bump vendored pyparsing in pkg_resources to 2.2.1. diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py index e8aefc8ca1..cf75e1e5fc 100644 --- a/pkg_resources/_vendor/pyparsing.py +++ b/pkg_resources/_vendor/pyparsing.py @@ -1,6 +1,6 @@ # module pyparsing.py # -# Copyright (c) 2003-2016 Paul T. McGuire +# Copyright (c) 2003-2018 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,6 +25,7 @@ __doc__ = \ """ pyparsing module - Classes and methods to define and execute parsing grammars +============================================================================= The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you @@ -58,10 +59,23 @@ class names, and the use of '+', '|' and '^' operators. - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello , World !", etc.) - quoted strings - embedded comments + + +Getting Started - +----------------- +Visit the classes L{ParserElement} and L{ParseResults} to see the base classes that most other pyparsing +classes inherit from. Use the docstrings for examples of how to: + - construct literal match expressions from L{Literal} and L{CaselessLiteral} classes + - construct character word-group expressions using the L{Word} class + - see how to create repetitive expressions using L{ZeroOrMore} and L{OneOrMore} classes + - use L{'+'}, L{'|'}, L{'^'}, and L{'&'} operators to combine simple expressions into more complex ones + - associate names with your parsed results using L{ParserElement.setResultsName} + - find some helpful expression short-cuts like L{delimitedList} and L{oneOf} + - find more useful common expressions in the L{pyparsing_common} namespace class """ -__version__ = "2.2.0" -__versionTime__ = "06 Mar 2017 02:06 UTC" +__version__ = "2.2.1" +__versionTime__ = "18 Sep 2018 00:49 UTC" __author__ = "Paul McGuire " import string @@ -82,6 +96,15 @@ class names, and the use of '+', '|' and '^' operators. except ImportError: from threading import RLock +try: + # Python 3 + from collections.abc import Iterable + from collections.abc import MutableMapping +except ImportError: + # Python 2.7 + from collections import Iterable + from collections import MutableMapping + try: from collections import OrderedDict as _OrderedDict except ImportError: @@ -940,7 +963,7 @@ def __getnewargs__(self): def __dir__(self): return (dir(type(self)) + list(self.keys())) -collections.MutableMapping.register(ParseResults) +MutableMapping.register(ParseResults) def col (loc,strg): """Returns current column within a string, counting newlines as line separators. @@ -1025,11 +1048,11 @@ def extract_stack(limit=0): # special handling for Python 3.5.0 - extra deep call stack by 1 offset = -3 if system_version == (3,5,0) else -2 frame_summary = traceback.extract_stack(limit=-offset+limit-1)[offset] - return [(frame_summary.filename, frame_summary.lineno)] + return [frame_summary[:2]] def extract_tb(tb, limit=0): frames = traceback.extract_tb(tb, limit=limit) frame_summary = frames[-1] - return [(frame_summary.filename, frame_summary.lineno)] + return [frame_summary[:2]] else: extract_stack = traceback.extract_stack extract_tb = traceback.extract_tb @@ -1374,7 +1397,7 @@ def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ): else: preloc = loc tokensStart = preloc - if self.mayIndexError or loc >= len(instring): + if self.mayIndexError or preloc >= len(instring): try: loc,tokens = self.parseImpl( instring, preloc, doActions ) except IndexError: @@ -1408,7 +1431,6 @@ def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ): self.resultsName, asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), modal=self.modalResults ) - if debugging: #~ print ("Matched",self,"->",retTokens.asList()) if (self.debugActions[1] ): @@ -3242,7 +3264,7 @@ def __init__( self, exprs, savelist = False ): if isinstance( exprs, basestring ): self.exprs = [ ParserElement._literalStringClass( exprs ) ] - elif isinstance( exprs, collections.Iterable ): + elif isinstance( exprs, Iterable ): exprs = list(exprs) # if sequence of strings provided, wrap with Literal if all(isinstance(expr, basestring) for expr in exprs): @@ -4393,7 +4415,7 @@ def traceParseAction(f): @traceParseAction def remove_duplicate_chars(tokens): - return ''.join(sorted(set(''.join(tokens))) + return ''.join(sorted(set(''.join(tokens)))) wds = OneOrMore(wd).setParseAction(remove_duplicate_chars) print(wds.parseString("slkdjs sld sldd sdlf sdljf")) @@ -4583,7 +4605,7 @@ def oneOf( strs, caseless=False, useRegex=True ): symbols = [] if isinstance(strs,basestring): symbols = strs.split() - elif isinstance(strs, collections.Iterable): + elif isinstance(strs, Iterable): symbols = list(strs) else: warnings.warn("Invalid argument to oneOf, expected string or iterable", @@ -4734,7 +4756,7 @@ def locatedExpr(expr): _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1]) _escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16))) _escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8))) -_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE) +_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | CharsNotIn(r'\]', exact=1) _charRange = Group(_singleChar + Suppress("-") + _singleChar) _reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]" diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index e3d564f163..7f4f40879b 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ packaging==16.8 -pyparsing==2.2.0 +pyparsing==2.2.1 six==1.10.0 appdirs==1.4.3 From 898c252e4c1d0521a106fb608993aef099dca16e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 10:23:52 -0400 Subject: [PATCH 7166/8469] =?UTF-8?q?Bump=20version:=2040.4.2=20=E2=86=92?= =?UTF-8?q?=2040.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1480.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1480.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 01a91b5322..263a19aa1c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.4.3 +------- + +* #1480: Bump vendored pyparsing in pkg_resources to 2.2.1. + + v40.4.2 ------- diff --git a/changelog.d/1480.change.rst b/changelog.d/1480.change.rst deleted file mode 100644 index a15ceabd8b..0000000000 --- a/changelog.d/1480.change.rst +++ /dev/null @@ -1 +0,0 @@ -Bump vendored pyparsing in pkg_resources to 2.2.1. diff --git a/setup.cfg b/setup.cfg index b5659e19d8..55347d619e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.4.2 +current_version = 40.4.3 commit = True tag = True diff --git a/setup.py b/setup.py index ad5f52847c..b37082c4ba 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.4.2", + version="40.4.3", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From e3ce4c508fe2b0c56c6bd22ee0eb15fb3a7fb279 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 10:32:55 -0400 Subject: [PATCH 7167/8469] Capture expected warning --- setuptools/tests/test_pep425tags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py index 658784ac95..f558a0d87c 100644 --- a/setuptools/tests/test_pep425tags.py +++ b/setuptools/tests/test_pep425tags.py @@ -1,5 +1,6 @@ import sys +import pytest from mock import patch from setuptools import pep425tags @@ -64,7 +65,8 @@ def raises_ioerror(var): with patch('setuptools.pep425tags.sysconfig.get_config_var', raises_ioerror): - assert len(pep425tags.get_supported()) + with pytest.warns(RuntimeWarning): + assert len(pep425tags.get_supported()) def test_no_hyphen_tag(self): """ From b3d098a3f7eb41c9554fdafe3d5aeb68d51f81f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 10:41:42 -0400 Subject: [PATCH 7168/8469] Ignore warnings about deprecated features. --- setuptools/tests/test_setuptools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 26e37a6c14..7aae3a163a 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -210,6 +210,7 @@ def testInvalidIncludeExclude(self): self.dist.exclude(package_dir=['q']) +@pytest.mark.filterwarnings('ignore:Features are deprecated') class TestFeatures: def setup_method(self, method): self.req = Require('Distutils', '1.0.3', 'distutils') From f325331100dc82916cba35b7310030fe6f337767 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 11:35:24 -0400 Subject: [PATCH 7169/8469] Use preferred interface, fixing DeprecationWarning on later Pythons. --- setuptools/package_index.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index cda54b7171..e650ac6f49 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -980,8 +980,7 @@ def _encode_auth(auth): auth_s = urllib.parse.unquote(auth) # convert to bytes auth_bytes = auth_s.encode() - # use the legacy interface for Python 2.3 support - encoded_bytes = base64.encodestring(auth_bytes) + encoded_bytes = base64.b64encode(auth_bytes) # convert back to a string encoded = encoded_bytes.decode() # strip the trailing carriage return From 8c355d7c2f20feaf85c2ee5a96e993826e62bbd4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 11:48:44 -0400 Subject: [PATCH 7170/8469] Use stacklevel=2 to better reveal usage of deprecated calls. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dd17cc13f5..a1470f6ddb 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2085,7 +2085,7 @@ def get_script_args(cls, dist, executable=None, wininst=False): @classmethod def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility - warnings.warn("Use get_header", DeprecationWarning) + warnings.warn("Use get_header", DeprecationWarning, stacklevel=2) if wininst: executable = "python.exe" cmd = cls.command_spec_class.best().from_param(executable) From da3d5f36862b916941da87d86e13cb74c874ccec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 11:52:50 -0400 Subject: [PATCH 7171/8469] Replace redundant code with call of that code. --- setuptools/command/easy_install.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a1470f6ddb..3da601b741 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2088,9 +2088,7 @@ def get_script_header(cls, script_text, executable=None, wininst=False): warnings.warn("Use get_header", DeprecationWarning, stacklevel=2) if wininst: executable = "python.exe" - cmd = cls.command_spec_class.best().from_param(executable) - cmd.install_options(script_text) - return cmd.as_header() + return cls.get_header(script_text, executable) @classmethod def get_args(cls, dist, header=None): From a48e96b5352f6bc6755202f35324e0dcfde2283b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 11:56:02 -0400 Subject: [PATCH 7172/8469] Update tests to remove use of deprecated get_script_header --- setuptools/tests/test_easy_install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 955c2ae94e..1e3688068a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -756,24 +756,24 @@ class TestScriptHeader: def test_get_script_header(self): expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable)) - actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python') + actual = ei.ScriptWriter.get_header('#!/usr/local/bin/python') assert actual == expected def test_get_script_header_args(self): expected = '#!%s -x\n' % ei.nt_quote_arg( os.path.normpath(sys.executable)) - actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x') + actual = ei.ScriptWriter.get_header('#!/usr/bin/python -x') assert actual == expected def test_get_script_header_non_ascii_exe(self): - actual = ei.ScriptWriter.get_script_header( + actual = ei.ScriptWriter.get_header( '#!/usr/bin/python', executable=self.non_ascii_exe) expected = str('#!%s -x\n') % self.non_ascii_exe assert actual == expected def test_get_script_header_exe_with_spaces(self): - actual = ei.ScriptWriter.get_script_header( + actual = ei.ScriptWriter.get_header( '#!/usr/bin/python', executable='"' + self.exe_with_spaces + '"') expected = '#!"%s"\n' % self.exe_with_spaces @@ -817,7 +817,7 @@ def test_from_simple_string_uses_shlex(self): class TestWindowsScriptWriter: def test_header(self): - hdr = ei.WindowsScriptWriter.get_script_header('') + hdr = ei.WindowsScriptWriter.get_header('') assert hdr.startswith('#!') assert hdr.endswith('\n') hdr = hdr.lstrip('#!') From 5b869d5c19ffea9b149b214e3638de83cc4c5d98 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 12:04:11 -0400 Subject: [PATCH 7173/8469] Suppress Unbuild egg warnings in TestPTHFileWriter --- setuptools/tests/test_easy_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 1e3688068a..b0cc4c9fbc 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -288,6 +288,7 @@ def test_script_install(self, sdist_script, tmpdir, monkeypatch): assert (target / 'mypkg_script').exists() +@pytest.mark.filterwarnings('ignore:Unbuilt egg') class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): '''a pth file manager should set dirty From c2f72efd261bf89372dfa27b1c115012e74bd525 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 12:44:23 -0400 Subject: [PATCH 7174/8469] Deprecate Subversion download functionality. Ref #1502. Used UserWarning instead of DeprecationWarning so it's visible to users who might be relying on this functionality. --- changelog.d/1502.change.rst | 1 + setuptools/package_index.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/1502.change.rst diff --git a/changelog.d/1502.change.rst b/changelog.d/1502.change.rst new file mode 100644 index 0000000000..8ddf5d43e9 --- /dev/null +++ b/changelog.d/1502.change.rst @@ -0,0 +1 @@ +Deprecated support for downloads from Subversion in package_index/easy_install. diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e650ac6f49..1608b91ace 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -7,6 +7,7 @@ import base64 import hashlib import itertools +import warnings from functools import wraps from setuptools.extern import six @@ -848,6 +849,7 @@ def _download_html(self, url, headers, filename): raise DistutilsError("Unexpected HTML page found at " + url) def _download_svn(self, url, filename): + warnings.warn("SVN download support is deprecated", UserWarning) url = url.split('#', 1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: From 18708e4ad51e32ef0aa09e15aaa5bfa7240cf2c9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Oct 2018 18:09:33 +0200 Subject: [PATCH 7175/8469] travis: preemptively switch to VM-based jobs Rational: https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63d0333ae6..fba548e929 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ dist: trusty -sudo: false language: python python: - &latest_py2 2.7 From 544f4b939943c80bdaf468e72c4cbeddd6cfe585 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Oct 2018 18:17:51 +0200 Subject: [PATCH 7176/8469] travis: fix support for Python 3.7 and add support for 3.8 --- .travis.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index fba548e929..627c1f6332 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,29 @@ dist: trusty language: python -python: -- &latest_py2 2.7 -- 3.4 -- 3.5 -- &latest_py3 3.6 -- nightly -- pypy -- pypy3 jobs: fast_finish: true include: - - python: *latest_py3 + - &latest_py2 + python: 2.7 + - <<: *latest_py2 env: LANG=C - - python: *latest_py2 + - python: pypy + - python: pypy3 + - python: 3.4 + - python: 3.5 + - &default_py + python: 3.6 + - &latest_py3 + python: 3.7 + dist: xenial + - <<: *latest_py3 env: LANG=C - - stage: deploy (to PyPI for tagged commits) + - python: 3.8-dev + dist: xenial + - <<: *default_py + stage: deploy (to PyPI for tagged commits) if: tag IS present - python: *latest_py3 install: skip script: skip after_success: true From d6c05b4b63c337b6280496cd6a9e63b6a99ce53f Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Oct 2018 18:24:18 +0200 Subject: [PATCH 7177/8469] travis: ensure test requirements are installed and up-to-date Particularly: update pip so PEP 518 support is available. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 627c1f6332..7e61d8a483 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,12 +43,14 @@ jobs: cache: pip install: -# ensure we have recent pip/setuptools -- pip install --upgrade pip setuptools + +# ensure we have recent pip/setuptools/wheel +- pip install --disable-pip-version-check --upgrade pip setuptools wheel # need tox to get started -- pip install tox tox-venv +- pip install --upgrade tox tox-venv # Output the env, to verify behavior +- pip freeze --all - env # update egg_info based on setup.py in checkout From 5a9fd0f4110e2ff3e914b186fd4d9dcd46c4da92 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Oct 2018 19:33:16 +0200 Subject: [PATCH 7178/8469] appveyor: ensure test requirements are installed and up-to-date --- appveyor.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f50f8386ac..b90de892af 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,9 +21,12 @@ cache: - '%LOCALAPPDATA%\pip\Cache' test_script: - - "python bootstrap.py" - - "python -m pip install tox" - - "tox -- --cov" + - python --version + - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel + - pip install --upgrade tox tox-venv + - pip freeze --all + - python bootstrap.py + - tox -- --cov after_test: - tox -e coverage,codecov From c562f10429782b23b62df038b78350efeb54291c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 19 Oct 2018 19:45:23 +0200 Subject: [PATCH 7179/8469] appveyor: only clone the first 50 commits --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index b90de892af..ef4a9f7e35 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,5 @@ +clone_depth: 50 + environment: APPVEYOR: True From 32bbe849d9427f1c3ef7c7d93ced324c4d90a2ad Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 21 Oct 2018 16:28:04 +0200 Subject: [PATCH 7180/8469] coverage: disable gcov processing We don't need it and it generates a couple of error messages on AppVeyor: FIND: Parameter format not correct [...] Error running `find 'C:\projects\setuptools' -not - [...] --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3b03b7db17..a2f850dff5 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ commands=coverage erase description=[Only run on CI]: Upload coverage data to codecov deps=codecov skip_install=True -commands=codecov --file {toxworkdir}/coverage.xml +commands=codecov -X gcov --file {toxworkdir}/coverage.xml [testenv:docs] deps = -r{toxinidir}/docs/requirements.txt From 604fc1ec955db2ce6e0c021073462cb3f4fac667 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 21 Oct 2018 17:16:31 +0200 Subject: [PATCH 7181/8469] coverage: ignore invalid Python 3.8 coverage data --- .travis.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e61d8a483..0e53bd29da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,9 @@ jobs: - <<: *latest_py2 env: LANG=C - python: pypy + env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: pypy3 + env: DISABLE_COVERAGE=1 - python: 3.4 - python: 3.5 - &default_py @@ -21,6 +23,7 @@ jobs: env: LANG=C - python: 3.8-dev dist: xenial + env: DISABLE_COVERAGE=1 # Ignore invalid coverage data. - <<: *default_py stage: deploy (to PyPI for tagged commits) if: tag IS present @@ -59,28 +62,20 @@ install: script: - | ( # Run testsuite. - set -ex - case $TRAVIS_PYTHON_VERSION in - pypy*) - # Don't run coverage on pypy (too slow). - tox - ;; - *) + if [ -z "$DISABLE_COVERAGE" ] + then tox -- --cov - ;; - esac + else + tox + fi ) after_success: - | ( # Upload coverage data. - set -ex - case $TRAVIS_PYTHON_VERSION in - pypy*) - ;; - *) + if [ -z "$DISABLE_COVERAGE" ] + then export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME tox -e coverage,codecov - ;; - esac + fi ) From 8c22c3b5ac0a5a293b03b79686e53f885d71cba4 Mon Sep 17 00:00:00 2001 From: Thirumal Venkat Date: Wed, 24 Oct 2018 01:05:52 +0530 Subject: [PATCH 7182/8469] Drop use of six.u (#1517) --- changelog.d/1517.change.rst | 1 + setuptools/command/easy_install.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1517.change.rst diff --git a/changelog.d/1517.change.rst b/changelog.d/1517.change.rst new file mode 100644 index 0000000000..18a77a8ba4 --- /dev/null +++ b/changelog.d/1517.change.rst @@ -0,0 +1 @@ +Dropped use of six.u in favor of `u""` literals. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 3da601b741..c670a16e61 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -632,7 +632,7 @@ def check_editable(self, spec): @contextlib.contextmanager def _tmpdir(self): - tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-")) + tmpdir = tempfile.mkdtemp(prefix=u"easy_install-") try: # cast to str as workaround for #709 and #710 and #712 yield str(tmpdir) From 74afc688fc4084390c9e9169984b5f7d8339b8e4 Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Wed, 24 Oct 2018 03:42:01 +0900 Subject: [PATCH 7183/8469] Add data_files support in setup.cfg with test case In the test case, dist.data_files needs to be sorted because the current implementation loads the configuration files as a dictionary with arbitrary order on Python < 3.6. --- setuptools/config.py | 8 ++++++++ setuptools/tests/test_config.py | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/setuptools/config.py b/setuptools/config.py index 0da3dbc9cf..73a3bf7031 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -598,3 +598,11 @@ def parse_section_extras_require(self, section_options): parse_list = partial(self._parse_list, separator=';') self['extras_require'] = self._parse_section_to_dict( section_options, parse_list) + + def parse_section_data_files(self, section_options): + """Parses `data_files` configuration file section. + + :param dict section_options: + """ + parsed = self._parse_section_to_dict(section_options, self._parse_list) + self['data_files'] = [(k, v) for k, v in parsed.items()] diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index acf221549b..76759ec57c 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -703,6 +703,23 @@ def test_entry_points(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.entry_points == expected + def test_data_files(self, tmpdir): + fake_env( + tmpdir, + '[options.data_files]\n' + 'cfg =\n' + ' a/b.conf\n' + ' c/d.conf\n' + 'data = e/f.dat, g/h.dat\n' + ) + + with get_dist(tmpdir) as dist: + expected = [ + ('cfg', ['a/b.conf', 'c/d.conf']), + ('data', ['e/f.dat', 'g/h.dat']), + ] + assert sorted(dist.data_files) == sorted(expected) + saved_dist_init = _Distribution.__init__ class TestExternalSetters: # During creation of the setuptools Distribution() object, we call From 8d6a2d2031108e11df5823211e500af3d5daad5f Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Wed, 24 Oct 2018 03:49:56 +0900 Subject: [PATCH 7184/8469] Add docs on how to use data_files in setup.cfg This adds the `[options.data_files]` section to the existing setup.cfg example. --- docs/setuptools.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 89f45bd857..da9b0132e1 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2367,6 +2367,11 @@ boilerplate code in some cases. src.subpackage1 src.subpackage2 + [options.data_files] + /etc/my_package = + site.d/00_default.conf + host.d/00_default.conf + data = data/img/logo.png, data/svg/icon.svg Metadata and options are set in the config sections of the same name. From b77ea8cbc705c1ae4c84870da895eafe2aac94a2 Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Wed, 24 Oct 2018 11:34:22 +0900 Subject: [PATCH 7185/8469] Add a news fragment for PR #1520 --- changelog.d/1520.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1520.change.rst diff --git a/changelog.d/1520.change.rst b/changelog.d/1520.change.rst new file mode 100644 index 0000000000..00569c6ff0 --- /dev/null +++ b/changelog.d/1520.change.rst @@ -0,0 +1 @@ +Added support for ``data_files`` in ``setup.cfg``. From 84f1abafd3a707b464f039892ef48b9e282d0d4a Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Wed, 24 Oct 2018 09:52:56 +0800 Subject: [PATCH 7186/8469] Call os.path.normpath to normalize paths for comp --- changelog.d/1519.change.rst | 1 + pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_pkg_resources.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1519.change.rst diff --git a/changelog.d/1519.change.rst b/changelog.d/1519.change.rst new file mode 100644 index 0000000000..d6da88be78 --- /dev/null +++ b/changelog.d/1519.change.rst @@ -0,0 +1 @@ +Perform additional path normalization to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3ae2c5cdb7..2b2442f51b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2228,7 +2228,7 @@ def null_ns_handler(importer, path_item, packageName, module): def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" - return os.path.normcase(os.path.realpath(filename)) + return os.path.normcase(os.path.normpath(os.path.realpath(filename))) def _normalize_cached(filename, _cache={}): diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 62a39b8fa8..81b67a31a9 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -236,3 +236,8 @@ def test_version_resolved_from_egg_info(self, env): req = pkg_resources.Requirement.parse('foo>=1.9') dist = pkg_resources.WorkingSet([env.paths['lib']]).find(req) assert dist.version == version + + def test_normalize_path(self, tmpdir): + path = str(tmpdir) + expected = os.path.normcase(os.path.normpath(os.path.realpath(path))) + assert pkg_resources.normalize_path(path) == expected From d765ecb15daa2145bb87de5fcc6ed45d371e2330 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 25 Oct 2018 23:29:48 +0800 Subject: [PATCH 7187/8469] Describe where the behavior change is made Co-Authored-By: uranusjr --- changelog.d/1519.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1519.change.rst b/changelog.d/1519.change.rst index d6da88be78..a0e8a6f14a 100644 --- a/changelog.d/1519.change.rst +++ b/changelog.d/1519.change.rst @@ -1 +1 @@ -Perform additional path normalization to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. +In ``pkg_resources.normalize_path``, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. From 6966c75947609b5e2dd85aa4cb1725e3e4897e04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Oct 2018 11:34:08 -0400 Subject: [PATCH 7188/8469] Extract patch and its purpose into a specialized function which can be excluded from coverage. --- pkg_resources/__init__.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3cbb5d199d..5423af6f4c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2220,15 +2220,18 @@ def null_ns_handler(importer, path_item, packageName, module): def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" - if sys.platform == 'cygwin': - # This results in a call to getcwd() if `filename` is relative. Contrary - # to POSIX 2008 on Cygwin getcwd (3) contains symlink components. Using - # os.path.abspath() works around this limitation. A fix in os.getcwd() - # would probably better, in Cygwin even more so except that this seems - # to be by design... - return os.path.normcase(os.path.realpath(os.path.abspath(filename))) - else: - return os.path.normcase(os.path.realpath(filename)) + return os.path.normcase(os.path.realpath(_cygwin_patch(filename))) + + +def _cygwin_patch(filename): # pragma: nocover + """ + Contrary to POSIX 2008, on Cygwin, getcwd (3) contains + symlink components. Using + os.path.abspath() works around this limitation. A fix in os.getcwd() + would probably better, in Cygwin even more so, except + that this seems to be by design... + """ + return os.path.abspath(filename) if sys.platform == 'cygwin' else filename def _normalize_cached(filename, _cache={}): From c14b6f35659ca0a13968632f58e18ba40cd11dca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Oct 2018 11:36:40 -0400 Subject: [PATCH 7189/8469] Update changelog --- changelog.d/1335.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1335.change.rst diff --git a/changelog.d/1335.change.rst b/changelog.d/1335.change.rst new file mode 100644 index 0000000000..a6ced1bb1a --- /dev/null +++ b/changelog.d/1335.change.rst @@ -0,0 +1 @@ +In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks. From 72b5c330318a624832402c5445f1213ce82f5642 Mon Sep 17 00:00:00 2001 From: Jesus Laime Date: Thu, 25 Oct 2018 20:35:16 -0300 Subject: [PATCH 7190/8469] Fix deprecation warning in easy_install docs --- docs/easy_install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 41d182e041..aa11f89083 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -2,7 +2,7 @@ Easy Install ============ -..warning:: +.. warning:: Easy Install is deprecated. Do not use it. Instead use pip. If you think you need Easy Install, please reach out to the PyPA team (a ticket to pip or setuptools is fine), describing your From bda99a0f512505368219afa75634811b72f2f892 Mon Sep 17 00:00:00 2001 From: Jesus Laime Date: Thu, 25 Oct 2018 20:49:20 -0300 Subject: [PATCH 7191/8469] Add changelog for PR #1526 (issue #1525) --- changelog.d/1525.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1525.doc.rst diff --git a/changelog.d/1525.doc.rst b/changelog.d/1525.doc.rst new file mode 100644 index 0000000000..402ea260ae --- /dev/null +++ b/changelog.d/1525.doc.rst @@ -0,0 +1 @@ +Fixed rendering of the deprecation warning in easy_install doc. From 8cdb68448e70d019ccaf25b2d66b1ecbf82494e5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Oct 2018 11:41:29 -0400 Subject: [PATCH 7192/8469] =?UTF-8?q?Bump=20version:=2040.4.3=20=E2=86=92?= =?UTF-8?q?=2040.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 10 ++++++++++ changelog.d/1335.change.rst | 1 - changelog.d/1502.change.rst | 1 - changelog.d/1517.change.rst | 1 - changelog.d/1520.change.rst | 1 - changelog.d/1525.doc.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 changelog.d/1335.change.rst delete mode 100644 changelog.d/1502.change.rst delete mode 100644 changelog.d/1517.change.rst delete mode 100644 changelog.d/1520.change.rst delete mode 100644 changelog.d/1525.doc.rst diff --git a/CHANGES.rst b/CHANGES.rst index 263a19aa1c..ca07119d95 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v40.5.0 +------- + +* #1335: In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks. +* #1502: Deprecated support for downloads from Subversion in package_index/easy_install. +* #1517: Dropped use of six.u in favor of `u""` literals. +* #1520: Added support for ``data_files`` in ``setup.cfg``. +* #1525: Fixed rendering of the deprecation warning in easy_install doc. + + v40.4.3 ------- diff --git a/changelog.d/1335.change.rst b/changelog.d/1335.change.rst deleted file mode 100644 index a6ced1bb1a..0000000000 --- a/changelog.d/1335.change.rst +++ /dev/null @@ -1 +0,0 @@ -In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks. diff --git a/changelog.d/1502.change.rst b/changelog.d/1502.change.rst deleted file mode 100644 index 8ddf5d43e9..0000000000 --- a/changelog.d/1502.change.rst +++ /dev/null @@ -1 +0,0 @@ -Deprecated support for downloads from Subversion in package_index/easy_install. diff --git a/changelog.d/1517.change.rst b/changelog.d/1517.change.rst deleted file mode 100644 index 18a77a8ba4..0000000000 --- a/changelog.d/1517.change.rst +++ /dev/null @@ -1 +0,0 @@ -Dropped use of six.u in favor of `u""` literals. diff --git a/changelog.d/1520.change.rst b/changelog.d/1520.change.rst deleted file mode 100644 index 00569c6ff0..0000000000 --- a/changelog.d/1520.change.rst +++ /dev/null @@ -1 +0,0 @@ -Added support for ``data_files`` in ``setup.cfg``. diff --git a/changelog.d/1525.doc.rst b/changelog.d/1525.doc.rst deleted file mode 100644 index 402ea260ae..0000000000 --- a/changelog.d/1525.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed rendering of the deprecation warning in easy_install doc. diff --git a/setup.cfg b/setup.cfg index 55347d619e..5f7abd3940 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.4.3 +current_version = 40.5.0 commit = True tag = True diff --git a/setup.py b/setup.py index b37082c4ba..2cac67a2b0 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.4.3", + version="40.5.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 1fb56a315f92e09d930ab7c2c787adbaead64d76 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Oct 2018 12:18:44 -0400 Subject: [PATCH 7193/8469] Update roadmap to expand scope of declarative config goals. --- docs/roadmap.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 9bde49360a..d5a127e890 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -4,7 +4,9 @@ Roadmap Setuptools has the following large-scale goals on the roadmap: -- Harmonize declarative config with pyproject.toml syntax. +- Mature declarative config to supersede imperative config in + all supported use-cases and harmonize with pyproject.toml + syntax. - Deprecate and remove setup_requires and easy_install in favor of PEP 518 build requirements and pip install. - Adopt the Distutils package and stop monkeypatching stdlib. From d3215c10b6f9ccd8940f9345642ee0718f158585 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 11:25:51 +0100 Subject: [PATCH 7194/8469] Mark Py 2/3-only tests as skip instead of xfail Also reuse pre-defined py2_only and py3_only decorators where appropriate. --- setuptools/tests/test_build_meta.py | 3 ++- setuptools/tests/test_manifest.py | 3 +-- setuptools/tests/test_namespaces.py | 2 +- setuptools/tests/test_sdist.py | 2 +- setuptools/tests/test_test.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 7b195e2c38..c5f4dcaa9b 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -7,6 +7,7 @@ from .files import build_files from .textwrap import DALS +from . import py2_only __metaclass__ = type @@ -143,7 +144,7 @@ def test_prepare_metadata_for_build_wheel(build_backend): assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) -@pytest.mark.skipif('sys.version_info > (3,)') +@py2_only def test_prepare_metadata_for_build_wheel_with_str(build_backend): dist_dir = os.path.abspath(str('pip-dist-info')) os.makedirs(dist_dir) diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index c9533dda9f..5edfbea003 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -15,13 +15,12 @@ from setuptools.dist import Distribution from setuptools.extern import six from setuptools.tests.textwrap import DALS +from . import py3_only import pytest __metaclass__ = type -py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") - def make_local_path(s): """Converts '/' in a string to os.sep""" diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index da19bd79b8..670ccee915 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -12,7 +12,7 @@ class TestNamespaces: - @pytest.mark.xfail( + @pytest.mark.skipif( sys.version_info < (3, 5), reason="Requires importlib.util.module_from_spec", ) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 02222da5a6..3a203890c8 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -20,8 +20,8 @@ from setuptools.dist import Distribution from setuptools.tests import fail_on_ascii from .text import Filenames +from . import py3_only -py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only") SETUP_ATTRS = { 'name': 'sdist_test', diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 960527bcab..4ba70484fc 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -93,7 +93,7 @@ def test_test(capfd): assert out == 'Foo\n' -@pytest.mark.xfail( +@pytest.mark.skipif( sys.version_info < (2, 7), reason="No discover support for unittest on Python 2.6", ) From dc9b2b6bdb2e53582ed7d090f40a1aec5983fd3a Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 10:27:56 +0100 Subject: [PATCH 7195/8469] Add Python 3.7 to the classifiers Fixes https://github.com/pypa/setuptools/issues/1528. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 2cac67a2b0..cdb4ec7999 100755 --- a/setup.py +++ b/setup.py @@ -164,6 +164,7 @@ def pypi_link(pkg_filename): Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From 98056a680fde6bede9ce4c159b72d1ac01bf9067 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 11:39:30 +0100 Subject: [PATCH 7196/8469] Remove pytest marker and code for Python < 2.7 --- setuptools/tests/test_test.py | 4 ---- setuptools/tests/test_virtualenv.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 4ba70484fc..8d1425e187 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -93,10 +93,6 @@ def test_test(capfd): assert out == 'Foo\n' -@pytest.mark.skipif( - sys.version_info < (2, 7), - reason="No discover support for unittest on Python 2.6", -) @pytest.mark.usefixtures('tmpdir_cwd', 'quiet_log') def test_tests_are_run_once(capfd): params = dict( diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index b66a311d73..e511c91816 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -57,9 +57,6 @@ def test_pip_upgrade_from_source(virtualenv): Check pip can upgrade setuptools from source. """ dist_dir = virtualenv.workspace - if sys.version_info < (2, 7): - # Python 2.6 support was dropped in wheel 0.30.0. - virtualenv.run('pip install -U "wheel<0.30.0"') # Generate source distribution / wheel. virtualenv.run(' && '.join(( 'cd {source}', From ef1442b187c04d8cd06ecd6adcb2c63a06637e73 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 11:37:01 +0100 Subject: [PATCH 7197/8469] Add changelog entry for PR #1531 --- changelog.d/1531.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1531.misc.rst diff --git a/changelog.d/1531.misc.rst b/changelog.d/1531.misc.rst new file mode 100644 index 0000000000..cc51940d2e --- /dev/null +++ b/changelog.d/1531.misc.rst @@ -0,0 +1 @@ +Converted Python version-specific tests to use ``skipif`` instead of ``xfail``, and removed Python 2.6-specific code from the tests. From f25c12c2f60fe524a92282337c999b64d2c8ba91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Nurlu?= Date: Sat, 27 Oct 2018 13:09:34 +0100 Subject: [PATCH 7198/8469] Exclude .pyc in _vendor folder from sdist output Fixes #1414 --- MANIFEST.in | 2 +- changelog.d/1533.misc.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1533.misc.rst diff --git a/MANIFEST.in b/MANIFEST.in index 325bbed82e..9cce3c90e4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,7 @@ recursive-include setuptools *.py *.exe *.xml recursive-include tests *.py recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html -recursive-include setuptools/_vendor * +recursive-include setuptools/_vendor *.py *.txt recursive-include pkg_resources *.py *.txt include *.py include *.rst diff --git a/changelog.d/1533.misc.rst b/changelog.d/1533.misc.rst new file mode 100644 index 0000000000..934df49484 --- /dev/null +++ b/changelog.d/1533.misc.rst @@ -0,0 +1 @@ +Restrict the `recursive-include setuptools/_vendor` to contain only .py and .txt files From ab4e5b9b3c3404f897e12a9fd882fddc9a36cc77 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sat, 27 Oct 2018 15:09:08 +0200 Subject: [PATCH 7199/8469] Document building Cython projects instead of Pyrex Refs #1395 --- changelog.d/1395.doc.rst | 1 + docs/setuptools.txt | 39 ++++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 changelog.d/1395.doc.rst diff --git a/changelog.d/1395.doc.rst b/changelog.d/1395.doc.rst new file mode 100644 index 0000000000..346041ce41 --- /dev/null +++ b/changelog.d/1395.doc.rst @@ -0,0 +1 @@ +Document building Cython projects instead of Pyrex diff --git a/docs/setuptools.txt b/docs/setuptools.txt index da9b0132e1..e3bcad59ae 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -41,9 +41,9 @@ Feature Highlights: files for any number of "main" functions in your project. (Note: this is not a py2exe replacement; the .exe files rely on the local Python installation.) -* Transparent Pyrex support, so that your setup.py can list ``.pyx`` files and - still work even when the end-user doesn't have Pyrex installed (as long as - you include the Pyrex-generated C in your source distribution) +* Transparent Cython support, so that your setup.py can list ``.pyx`` files and + still work even when the end-user doesn't have Cython installed (as long as + you include the Cython-generated C in your source distribution) * Command aliases - create project-specific, per-user, or site-wide shortcut names for commonly used commands and options @@ -1651,29 +1651,34 @@ See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. -Distributing Extensions compiled with Pyrex -------------------------------------------- +Distributing Extensions compiled with Cython +-------------------------------------------- -``setuptools`` includes transparent support for building Pyrex extensions, as -long as you define your extensions using ``setuptools.Extension``, *not* -``distutils.Extension``. You must also not import anything from Pyrex in -your setup script. +``setuptools`` will detect at build time whether Cython is installed or not. +If Cython is not found ``setputools`` will ignore pyx files. In case it's +available you are supposed it will work with just a couple of adjustments. +``setuptools`` includes transparent support for building Cython extensions, as +long as you define your extensions using ``setuptools.Extension``. +Then you should use Cython own ``build_ext`` in ``cmdclass``, e.g.:: + + from Cython.Distutils import build_ext + + setup(... + cmdclass={"build_ext": build_ext} + ...) If you follow these rules, you can safely list ``.pyx`` files as the source -of your ``Extension`` objects in the setup script. ``setuptools`` will detect -at build time whether Pyrex is installed or not. If it is, then ``setuptools`` -will use it. If not, then ``setuptools`` will silently change the -``Extension`` objects to refer to the ``.c`` counterparts of the ``.pyx`` -files, so that the normal distutils C compilation process will occur. +of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` +will use it. Of course, for this to work, your source distributions must include the C -code generated by Pyrex, as well as your original ``.pyx`` files. This means +code generated by Cython, as well as your original ``.pyx`` files. This means that you will probably want to include current ``.c`` files in your revision control system, rebuilding them whenever you check changes in for the ``.pyx`` source files. This will ensure that people tracking your project in a revision -control system will be able to build it even if they don't have Pyrex +control system will be able to build it even if they don't have Cython installed, and that your source releases will be similarly usable with or -without Pyrex. +without Cython. ----------------- From d059e4273d71a012acdbbe1acf4c552e6f5c0793 Mon Sep 17 00:00:00 2001 From: DanGolding Date: Sat, 27 Oct 2018 14:31:31 +0100 Subject: [PATCH 7200/8469] Update setup.cfg documentation to include data_files (#1532) * Update setup.cfg documentation to include data_files --- docs/setuptools.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index da9b0132e1..46103b258d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2466,9 +2466,9 @@ obsoletes list-comma Options ------- -======================= ===== -Key Type -======================= ===== +======================= =================================== ===== +Key Type Minimum Version +======================= =================================== ===== zip_safe bool setup_requires list-semi install_requires list-semi @@ -2490,7 +2490,8 @@ package_data section exclude_package_data section namespace_packages list-comma py_modules list-comma -======================= ===== +data_files dict 40.5.0 +======================= =================================== ===== .. note:: From ca0760af2071c333cda28d18279db95455ffa2de Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sat, 27 Oct 2018 13:19:22 +0100 Subject: [PATCH 7201/8469] Setuptools will install licenses if included in setup.cfg Addressing #357 `python setup.py sdist` now includes the license file if `license_file` is included in `setup.cfg` unless it is explicitly excluded in `MANIFEST.in`. Co-Authored-By: Poyzan Nur Taneli <31743851+ptaneli@users.noreply.github.com> --- setuptools/command/egg_info.py | 1 + setuptools/command/sdist.py | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index bd116e1f6c..93100ab946 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -568,6 +568,7 @@ def _should_suppress_warning(msg): def add_defaults(self): sdist.add_defaults(self) + self.check_license() self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index bcfae4d82f..a1b20733c3 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -6,6 +6,7 @@ import contextlib from setuptools.extern import six +from setuptools.extern.six.moves import configparser from .py36compat import sdist_add_defaults @@ -198,3 +199,27 @@ def read_manifest(self): continue self.filelist.append(line) manifest.close() + + def check_license(self): + """Read the setup configuration file ('setup.cfg') and use it to find + if a license is defined with the 'license_file' attribute. + If the license is declared and exists, it will be added to + 'self.filelist'. + """ + + cfg_file = 'setup.cfg' + log.debug("Reading configuration from %s", cfg_file) + parser = configparser.RawConfigParser() + parser.read(cfg_file) + try: + license_file = parser.get('metadata', 'license_file') + + if not os.path.exists(license_file): + log.warn("warning: Failed to find license file '%s' in setup.cfg", + license_file) + return + + self.filelist.append(license_file) + except configparser.Error: + log.debug("license_file attribute is not defined in setup.cfg") + return From d011cd989c1d3d5906f2bffb8d68a9da88cab120 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 15:40:30 +0100 Subject: [PATCH 7202/8469] Document using setup.cfg for src-layouts --- docs/setuptools.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 46103b258d..3cde56ea98 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2400,6 +2400,34 @@ Metadata and options are set in the config sections of the same name. * Unknown keys are ignored. +Using a ``src/`` layout (storing packages in a subdirectory) +============================================================ + +If you use a `src` layout, as in, you package structure looks like this:: + + ├── src + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + ├── setup.py + └── setup.cfg + +You can set up your ``setup.cfg`` to automatically look up all your packages in +the subdirectory like this: + +.. code-block:: ini + + # This example contains just the necessary options for a src-layout, set up + # the rest of the file as described above. + + [options] + package_dir= + =src + packages=find: + + [options.packages.find] + where=src + Specifying values ================= From a31921034d64b59431ba2da0004f35785e3da422 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 15:43:06 +0100 Subject: [PATCH 7203/8469] Add changelog entry --- changelog.d/1537.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1537.doc.rst diff --git a/changelog.d/1537.doc.rst b/changelog.d/1537.doc.rst new file mode 100644 index 0000000000..02d15eae17 --- /dev/null +++ b/changelog.d/1537.doc.rst @@ -0,0 +1 @@ +Document how to use setup.cfg for src/ layouts. \ No newline at end of file From 7d129e6ba46ee01c25d6e6b463ec7df29e624670 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sat, 27 Oct 2018 15:44:24 +0100 Subject: [PATCH 7204/8469] Correct typo --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 3cde56ea98..f3a5f4ffb9 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2403,7 +2403,7 @@ Metadata and options are set in the config sections of the same name. Using a ``src/`` layout (storing packages in a subdirectory) ============================================================ -If you use a `src` layout, as in, you package structure looks like this:: +If you use a ``src/`` layout, as in, you package structure looks like this:: ├── src │   └── mypackage From 00b172d6b4a4f3fb1546dd0c2fc53ec2d4087b00 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sat, 27 Oct 2018 16:32:24 +0100 Subject: [PATCH 7205/8469] Unit tests for installing licenses from setup.cfg (#357) Co-Authored-By: Poyzan Nur Taneli <31743851+ptaneli@users.noreply.github.com> --- setuptools/tests/test_egg_info.py | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 59ffb16d1d..2ca91e85d0 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -486,6 +486,98 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): pkg_info_text = pkginfo_file.read() assert 'Provides-Extra:' not in pkg_info_text + def test_setup_cfg_with_license(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE + """), + 'LICENSE': DALS("Test license") + }) + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_text = sources_file.read() + assert 'LICENSE' in sources_text + + def test_setup_cfg_with_invalid_license(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'setup.cfg': DALS(""" + [metadata] + license_file = INVALID_LICENSE + """), + 'LICENSE': DALS("Test license") + }) + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_text = sources_file.read() + assert 'LICENSE' not in sources_text + assert 'INVALID_LICENSE' not in sources_text + + def test_setup_cfg_with_no_license(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'setup.cfg': DALS(""" + """), + 'LICENSE': DALS("Test license") + }) + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_text = sources_file.read() + assert 'LICENSE' not in sources_text + + def test_setup_cfg_with_license_excluded(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE + """), + 'MANIFEST.in': DALS("exclude LICENSE"), + 'LICENSE': DALS("Test license") + }) + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_text = sources_file.read() + assert 'LICENSE' not in sources_text + def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to # the `setup` function results in writing a `Description-Content-Type` From 525e5ede9119a5cbc4b35a1606068a212fea3c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Nurlu?= Date: Sat, 27 Oct 2018 16:30:19 +0100 Subject: [PATCH 7206/8469] Add before_deploy checks for pyc files in TravisCI This should stop the PyPI release stage if a `.pyc` exists in the generated SOURCES.txt. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e53bd29da..442e3ec29f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,9 @@ jobs: install: skip script: skip after_success: true - before_deploy: python bootstrap.py + before_deploy: + - python bootstrap.py + - ! grep pyc setuptools.egg-info/SOURCES.txt deploy: provider: pypi on: From 856c4c9a44b6deec6ea9c7126fdeef39f6e1e488 Mon Sep 17 00:00:00 2001 From: Vito Date: Sat, 27 Oct 2018 11:39:34 -0400 Subject: [PATCH 7207/8469] Added minimum version info to setup.cfg metadata This also documents that the long_description_content_type keyword was added in version 38.6.0. Co-authored-by: Gene Matusovsky --- docs/setuptools.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 46103b258d..f2774b65c7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2434,9 +2434,9 @@ Metadata The aliases given below are supported for compatibility reasons, but their use is not advised. -============================== ================= ===== -Key Aliases Type -============================== ================= ===== +============================== ================= ================= =============== +Key Aliases Type Minumum Version +============================== ================= ================= =============== name str version attr:, file:, str url home-page str @@ -2450,13 +2450,13 @@ classifiers classifier file:, list-comma license file:, str description summary file:, str long_description long-description file:, str -long_description_content_type str +long_description_content_type str 38.6.0 keywords list-comma platforms platform list-comma provides list-comma requires list-comma obsoletes list-comma -============================== ================= ===== +============================== ================= ================= =============== .. note:: A version loaded using the ``file:`` directive must comply with PEP 440. From e97921f0b885d07f21276c9e416418f8bc16aaaa Mon Sep 17 00:00:00 2001 From: Vito Date: Sat, 27 Oct 2018 11:47:54 -0400 Subject: [PATCH 7208/8469] Added news fragment for PR #1539 --- changelog.d/1539.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1539.doc.rst diff --git a/changelog.d/1539.doc.rst b/changelog.d/1539.doc.rst new file mode 100644 index 0000000000..220f65197d --- /dev/null +++ b/changelog.d/1539.doc.rst @@ -0,0 +1 @@ +Added minumum version column in ``setup.cfg`` metadata table. From 9fad9937977e96cb984a0d30ae5ec3ee237a0ce7 Mon Sep 17 00:00:00 2001 From: Kanika Sabharwal Date: Sat, 27 Oct 2018 15:58:50 -0400 Subject: [PATCH 7209/8469] added unittest for _download_git --- setuptools/tests/test_packageindex.py | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 63b9294610..7c2f2c84d6 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -6,6 +6,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client +import mock import pkg_resources import setuptools.package_index @@ -224,6 +225,41 @@ def test_egg_fragment(self): assert dists[1].version == vc + def test_download_git(self): + index = setuptools.package_index.PackageIndex( + hosts=('www.example.com',) + ) + + index._vcs_split_rev_from_url = mock.Mock() + url = 'https://example.com/bar' + rev = '2995' + + index._vcs_split_rev_from_url.return_value = (url, rev) + + filename = "somefile.py" + + with mock.patch("os.system") as os_system_mock: + + result = index._download_git(url, filename) + + os_system_mock.assert_called() + + assert os_system_mock.call_args_list[0][0] \ + == ("git clone --quiet %s %s" % (url, filename), ) + + assert os_system_mock.call_args_list[1][0] \ + == ("(cd %s && git checkout --quiet %s)" % (filename, rev), ) + assert result == filename + + index._vcs_split_rev_from_url.return_value = (url, None) + + with mock.patch("os.system") as os_system_mock: + + index._download_git(url, filename) + + os_system_mock.assert_called_once_with("git clone --quiet %s %s" % (url, filename)) + + class TestContentCheckers: def test_md5(self): checker = setuptools.package_index.HashChecker.from_url( From f45153a292dc749defaa9c6c1ce9c4062f083b6d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 27 Oct 2018 16:48:33 -0400 Subject: [PATCH 7210/8469] bpo-35067: Remove _distutils_findvs and use vswhere.exe instead. (GH-10095) --- _msvccompiler.py | 64 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 30b3b47398..84b4ef5959 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -56,43 +56,43 @@ def _find_vc2015(): return best_version, best_dir def _find_vc2017(): - import _distutils_findvs - import threading + """Returns "15, path" based on the result of invoking vswhere.exe + If no install is found, returns "None, None" - best_version = 0, # tuple for full version comparisons - best_dir = None + The version is returned to avoid unnecessarily changing the function + result. It may be ignored when the path is not None. + + If vswhere.exe is not available, by definition, VS 2017 is not + installed. + """ + import json + + root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") + if not root: + return None, None - # We need to call findall() on its own thread because it will - # initialize COM. - all_packages = [] - def _getall(): - all_packages.extend(_distutils_findvs.findall()) - t = threading.Thread(target=_getall) - t.start() - t.join() - - for name, version_str, path, packages in all_packages: - if 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' in packages: - vc_dir = os.path.join(path, 'VC', 'Auxiliary', 'Build') - if not os.path.isdir(vc_dir): - continue - try: - version = tuple(int(i) for i in version_str.split('.')) - except (ValueError, TypeError): - continue - if version > best_version: - best_version, best_dir = version, vc_dir try: - best_version = best_version[0] - except IndexError: - best_version = None - return best_version, best_dir + path = subprocess.check_output([ + os.path.join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"), + "-latest", + "-prerelease", + "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "-property", "installationPath", + ], encoding="mbcs", errors="strict").strip() + except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): + return None, None + + path = os.path.join(path, "VC", "Auxiliary", "Build") + if os.path.isdir(path): + return 15, path + + return None, None def _find_vcvarsall(plat_spec): - best_version, best_dir = _find_vc2017() + _, best_dir = _find_vc2017() vcruntime = None vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' - if best_version: + if best_dir: vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", "Microsoft.VC141.CRT", "vcruntime140.dll") try: @@ -101,13 +101,13 @@ def _find_vcvarsall(plat_spec): except (ImportError, OSError, LookupError): vcruntime = None - if not best_version: + if not best_dir: best_version, best_dir = _find_vc2015() if best_version: vcruntime = os.path.join(best_dir, 'redist', vcruntime_plat, "Microsoft.VC140.CRT", "vcruntime140.dll") - if not best_version: + if not best_dir: log.debug("No suitable Visual C++ version found") return None, None From a6a5040ae14b74bfaaaf835d57129ee7618e5cfd Mon Sep 17 00:00:00 2001 From: Sreejith Menon Date: Sat, 27 Oct 2018 10:29:08 -0700 Subject: [PATCH 7211/8469] Deprecate the requires keyword For runtime dependencies, install_requires should be used. For build dependencies, a PEP 518-compliant `pyproject.toml` should be used. Other dependencies can use extra requirements. --- setuptools/config.py | 21 ++++++++++++++++++++- setuptools/tests/test_config.py | 17 +++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index 73a3bf7031..1f9c50f9ee 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -2,8 +2,10 @@ import io import os import sys +import warnings from collections import defaultdict from functools import partial +from functools import wraps from importlib import import_module from distutils.errors import DistutilsOptionError, DistutilsFileError @@ -399,6 +401,20 @@ def parse(self): section_parser_method(section_options) + def _deprecated_config_handler(self, func, msg, warning_class): + """ this function will wrap around parameters that are deprecated + + :param msg: deprecation message + :param warning_class: class of warning exception to be raised + :param func: function to be wrapped around + """ + @wraps(func) + def config_handler(*args, **kwargs): + warnings.warn(msg, warning_class) + return func(*args, **kwargs) + + return config_handler + class ConfigMetadataHandler(ConfigHandler): @@ -434,7 +450,10 @@ def parsers(self): 'platforms': parse_list, 'keywords': parse_list, 'provides': parse_list, - 'requires': parse_list, + 'requires': self._deprecated_config_handler(parse_list, + "The requires parameter is deprecated, please use " + + "install_requires for runtime dependencies.", + DeprecationWarning), 'obsoletes': parse_list, 'classifiers': self._get_parser_compound(parse_file, parse_list), 'license': parse_file, diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 76759ec57c..736c184dca 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -391,6 +391,23 @@ def test_classifiers(self, tmpdir): with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected + def test_deprecated_config_handlers(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'version = 10.1.1\n' + 'description = Some description\n' + 'requires = some, requirement\n' + ) + + with pytest.deprecated_call(): + with get_dist(tmpdir) as dist: + metadata = dist.metadata + + assert metadata.version == '10.1.1' + assert metadata.description == 'Some description' + assert metadata.requires == ['some', 'requirement'] + class TestOptions: From 717de8391f5ddfc507fcf2d36a49274f37ef5a16 Mon Sep 17 00:00:00 2001 From: Sreejith Menon Date: Sat, 27 Oct 2018 10:29:08 -0700 Subject: [PATCH 7212/8469] Add changelog for PR #1541 --- changelog.d/1541.deprecation.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1541.deprecation.rst diff --git a/changelog.d/1541.deprecation.rst b/changelog.d/1541.deprecation.rst new file mode 100644 index 0000000000..cc07aaa78b --- /dev/null +++ b/changelog.d/1541.deprecation.rst @@ -0,0 +1 @@ +Officially deprecated the ``requires`` parameter in ``setup()``. From 009e0a92b463d444e48c17a3a636fc7c477dec71 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler Date: Sun, 28 Oct 2018 11:02:13 +0000 Subject: [PATCH 7213/8469] Edit wording --- docs/setuptools.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f3a5f4ffb9..ae8a2eb736 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2400,10 +2400,11 @@ Metadata and options are set in the config sections of the same name. * Unknown keys are ignored. -Using a ``src/`` layout (storing packages in a subdirectory) -============================================================ +Using a ``src/`` layout +======================= -If you use a ``src/`` layout, as in, you package structure looks like this:: +One commonly used package configuration has all the module source code in a +subdirectory (often called the ``src/`` layout), like this:: ├── src │   └── mypackage @@ -2412,7 +2413,7 @@ If you use a ``src/`` layout, as in, you package structure looks like this:: ├── setup.py └── setup.cfg -You can set up your ``setup.cfg`` to automatically look up all your packages in +You can set up your ``setup.cfg`` to automatically find all your packages in the subdirectory like this: .. code-block:: ini From 08bff86fe64cfb05d9ecd6dbf436fa706ecc8440 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sun, 28 Oct 2018 11:25:18 +0000 Subject: [PATCH 7214/8469] Make the new tests parametrized --- setuptools/tests/test_egg_info.py | 79 ++++++++----------------------- 1 file changed, 19 insertions(+), 60 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 2ca91e85d0..76c31adadf 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -486,84 +486,39 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): pkg_info_text = pkginfo_file.read() assert 'Provides-Extra:' not in pkg_info_text - def test_setup_cfg_with_license(self, tmpdir_cwd, env): - self._create_project() - build_files({ + @pytest.mark.parametrize("files, license_in_sources", [ + ({ 'setup.cfg': DALS(""" [metadata] license_file = LICENSE """), 'LICENSE': DALS("Test license") - }) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: - sources_text = sources_file.read() - assert 'LICENSE' in sources_text - - def test_setup_cfg_with_invalid_license(self, tmpdir_cwd, env): - self._create_project() - build_files({ + }, True), # with license + ({ 'setup.cfg': DALS(""" [metadata] license_file = INVALID_LICENSE """), 'LICENSE': DALS("Test license") - }) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: - sources_text = sources_file.read() - assert 'LICENSE' not in sources_text - assert 'INVALID_LICENSE' not in sources_text - - def test_setup_cfg_with_no_license(self, tmpdir_cwd, env): - self._create_project() - build_files({ + }, False), # with an invalid license + ({ 'setup.cfg': DALS(""" """), 'LICENSE': DALS("Test license") - }) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - environment.run_setup_py( - cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: - sources_text = sources_file.read() - assert 'LICENSE' not in sources_text - - def test_setup_cfg_with_license_excluded(self, tmpdir_cwd, env): - self._create_project() - build_files({ + }, False), # no license_file attribute + ({ 'setup.cfg': DALS(""" [metadata] license_file = LICENSE """), 'MANIFEST.in': DALS("exclude LICENSE"), 'LICENSE': DALS("Test license") - }) + }, False) # license file is manually excluded + ]) + def test_setup_cfg_license_file( + self, tmpdir_cwd, env, files, license_in_sources): + self._create_project() + build_files(files) environ = os.environ.copy().update( HOME=env.paths['home'], ) @@ -576,7 +531,11 @@ def test_setup_cfg_with_license_excluded(self, tmpdir_cwd, env): egg_info_dir = os.path.join('.', 'foo.egg-info') with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: sources_text = sources_file.read() - assert 'LICENSE' not in sources_text + if license_in_sources: + assert 'LICENSE' in sources_text + else: + assert 'LICENSE' not in sources_text + assert 'INVALID_LICENSE' not in sources_text # for invalid license test def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to From 742457284db958bdf5efacde6e2b885c81247b27 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sun, 28 Oct 2018 11:41:46 +0000 Subject: [PATCH 7215/8469] Document the new `license_file` behaviour --- changelog.d/1536.change.rst | 3 +++ docs/setuptools.txt | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelog.d/1536.change.rst diff --git a/changelog.d/1536.change.rst b/changelog.d/1536.change.rst new file mode 100644 index 0000000000..8a69959cbd --- /dev/null +++ b/changelog.d/1536.change.rst @@ -0,0 +1,3 @@ +``setuptools`` will now automatically include licenses if ``setup.cfg`` +contains a ``license_file`` attribute, unless this file is manually excluded +inside ``MANIFEST.in``. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index da9b0132e1..436f207d92 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2448,6 +2448,7 @@ maintainer str maintainer_email maintainer-email str classifiers classifier file:, list-comma license file:, str +license_file str description summary file:, str long_description long-description file:, str long_description_content_type str From 912f772c61ce432561423e91a8ace70b0ec86a08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Oct 2018 10:20:01 -0400 Subject: [PATCH 7216/8469] Update recommendation. Fixes #1549. --- docs/setuptools.txt | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index ec40548a74..3cad38b146 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1655,17 +1655,26 @@ Distributing Extensions compiled with Cython -------------------------------------------- ``setuptools`` will detect at build time whether Cython is installed or not. -If Cython is not found ``setputools`` will ignore pyx files. In case it's -available you are supposed it will work with just a couple of adjustments. -``setuptools`` includes transparent support for building Cython extensions, as -long as you define your extensions using ``setuptools.Extension``. -Then you should use Cython own ``build_ext`` in ``cmdclass``, e.g.:: +If Cython is not found ``setputools`` will ignore pyx files. - from Cython.Distutils import build_ext +To ensure Cython is available, include Cython in the build-requires section +of your pyproject.toml:: - setup(... - cmdclass={"build_ext": build_ext} - ...) + [build-system] + requires=[..., 'cython'] + +Built with pip 10 or later, that declaration is sufficient to include Cython +in the build. For broader compatibility, declare the dependency in your +setup-requires of setup.cfg:: + + [options] + setup_requires = + ... + cython + +As long as Cython is present in the build environment, ``setuptools`` includes +transparent support for building Cython extensions, as +long as extensions are defined using ``setuptools.Extension``. If you follow these rules, you can safely list ``.pyx`` files as the source of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` @@ -2505,7 +2514,7 @@ data_files dict 40.5.0 accepts the same keys as the `setuptools.find_packages` and the `setuptools.find_namespace_packages` function: ``where``, ``include``, and ``exclude``. - + **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. From 0fd21d1e737bd5a031c09b87e58aa9d505b51121 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 28 Oct 2018 11:12:06 -0400 Subject: [PATCH 7217/8469] fix typo Co-Authored-By: jaraco --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 3cad38b146..9a0ee0c18b 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1655,7 +1655,7 @@ Distributing Extensions compiled with Cython -------------------------------------------- ``setuptools`` will detect at build time whether Cython is installed or not. -If Cython is not found ``setputools`` will ignore pyx files. +If Cython is not found ``setuptools`` will ignore pyx files. To ensure Cython is available, include Cython in the build-requires section of your pyproject.toml:: From 4e4efa77722cc2e99171a2396252a4ddc98450e3 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sun, 28 Oct 2018 15:36:02 +0000 Subject: [PATCH 7218/8469] `check_license` no longer needs to parse `setup.cfg` --- setuptools/command/sdist.py | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a1b20733c3..347f88170f 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -201,25 +201,21 @@ def read_manifest(self): manifest.close() def check_license(self): - """Read the setup configuration file ('setup.cfg') and use it to find - if a license is defined with the 'license_file' attribute. - If the license is declared and exists, it will be added to - 'self.filelist'. + """Checks if license_file' is configured and adds it to + 'self.filelist' if the value contains a valid path. """ - cfg_file = 'setup.cfg' - log.debug("Reading configuration from %s", cfg_file) - parser = configparser.RawConfigParser() - parser.read(cfg_file) + opts = self.distribution.get_option_dict('metadata') try: - license_file = parser.get('metadata', 'license_file') - - if not os.path.exists(license_file): - log.warn("warning: Failed to find license file '%s' in setup.cfg", - license_file) - return + # ignore the source of the value + _, license_file = opts.get('license_file') + except TypeError: + log.debug("'license_file' attribute is not defined") + return - self.filelist.append(license_file) - except configparser.Error: - log.debug("license_file attribute is not defined in setup.cfg") + if not os.path.exists(license_file): + log.warn("warning: Failed to find the configured license file '%s'", + license_file) return + + self.filelist.append(license_file) From ad043d61d3bfff3ca69f477f44a718597a34e779 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Oct 2018 14:05:57 -0400 Subject: [PATCH 7219/8469] Feed the hobgoblins (delint). --- setuptools/config.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 73a3bf7031..4cc1cb387c 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -110,7 +110,8 @@ def parse_configuration( options.parse() meta = ConfigMetadataHandler( - distribution.metadata, command_options, ignore_option_errors, distribution.package_dir) + distribution.metadata, command_options, ignore_option_errors, + distribution.package_dir) meta.parse() return meta, options @@ -458,9 +459,12 @@ def _parse_version(self, value): # 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 - )) + tmpl = ( + 'Version loaded from {value} does not ' + 'comply with PEP 440: {version}' + ) + raise DistutilsOptionError(tmpl.format(**locals())) + return version version = self._parse_attr(value, self.package_dir) @@ -518,12 +522,13 @@ def _parse_packages(self, value): find_directives = ['find:', 'find_namespace:'] trimmed_value = value.strip() - if not trimmed_value in find_directives: + if trimmed_value not 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') + 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( From 9ad8e0dd09dc7f8c22f7cf51a5c83b7c788b50d7 Mon Sep 17 00:00:00 2001 From: Varun Kamath Date: Sun, 28 Oct 2018 14:12:34 -0400 Subject: [PATCH 7220/8469] Remove ez_setup from documentation (#1553) Remove ez_setup from setuptools installation docs This removes ez_setup.py from the setuptools development instructions and updates some links into EasyInstall that were skipping over the deprecation warning. --- changelog.d/1553.doc.rst | 1 + docs/setuptools.txt | 18 ++++++------------ 2 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 changelog.d/1553.doc.rst diff --git a/changelog.d/1553.doc.rst b/changelog.d/1553.doc.rst new file mode 100644 index 0000000000..2f68b95e3c --- /dev/null +++ b/changelog.d/1553.doc.rst @@ -0,0 +1 @@ +Update installation instructions to point to ``pip install`` instead of ``ez_setup.py``. \ No newline at end of file diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 9398f8e9b9..9eec82f376 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -73,23 +73,17 @@ Developer's Guide Installing ``setuptools`` ========================= -Please follow the `EasyInstall Installation Instructions`_ to install the -current stable version of setuptools. In particular, be sure to read the -section on `Custom Installation Locations`_ if you are installing anywhere -other than Python's ``site-packages`` directory. +.. _EasyInstall Installation Instructions: easy_install.html -.. _EasyInstall Installation Instructions: easy_install.html#installation-instructions +.. _Custom Installation Locations: easy_install.html -.. _Custom Installation Locations: easy_install.html#custom-installation-locations +.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ -If you want the current in-development version of setuptools, you should first -install a stable version, and then run:: +To install the latest version of setuptools, use:: - ez_setup.py setuptools==dev - -This will download and install the latest development (i.e. unstable) version -of setuptools from the Python Subversion sandbox. + pip install -U setuptools +Refer to `Installing Packages`_ guide for more information. Basic Use ========= From 42fe2eb166a3a1b2d31f0be93ad034ec48ea9b38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Oct 2018 14:16:19 -0400 Subject: [PATCH 7221/8469] Extract _get_option function for getting an option from getter or attribute. --- setuptools/config.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 4cc1cb387c..302d633f35 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -2,6 +2,7 @@ import io import os import sys +import functools from collections import defaultdict from functools import partial from importlib import import_module @@ -61,6 +62,18 @@ def read_configuration( return configuration_to_dict(handlers) +def _get_option(target_obj, key): + """ + Given a target object and option key, get that option from + the target object, either through a get_{key} method or + from an attribute directly. + """ + getter_name = 'get_{key}'.format(**locals()) + by_attribute = functools.partial(getattr, target_obj, key) + getter = getattr(target_obj, getter_name, by_attribute) + return getter() + + def configuration_to_dict(handlers): """Returns configuration data gathered by given handlers as a dict. @@ -74,17 +87,9 @@ def configuration_to_dict(handlers): for handler in handlers: obj_alias = handler.section_prefix - target_obj = handler.target_obj for option in handler.set_options: - getter = getattr(target_obj, 'get_%s' % option, None) - - if getter is None: - value = getattr(target_obj, option) - - else: - value = getter() - + value = _get_option(handler.target_obj, option) config_dict[obj_alias][option] = value return config_dict From 9543875b93ab646e6c1f5ded7164d108de498852 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Oct 2018 14:17:27 -0400 Subject: [PATCH 7222/8469] Inline variable --- setuptools/config.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 302d633f35..15d18672ed 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -85,12 +85,9 @@ def configuration_to_dict(handlers): config_dict = defaultdict(dict) for handler in handlers: - - obj_alias = handler.section_prefix - for option in handler.set_options: value = _get_option(handler.target_obj, option) - config_dict[obj_alias][option] = value + config_dict[handler.section_prefix][option] = value return config_dict From 8d83d328224315aa76a142fd714bcafd7d3f2c21 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sun, 28 Oct 2018 16:18:18 -0400 Subject: [PATCH 7223/8469] remove private and redundant link --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index a9bed52113..0454f2eddd 100644 --- a/README.rst +++ b/README.rst @@ -23,10 +23,6 @@ See the `Installation Instructions User's Guide for instructions on installing, upgrading, and uninstalling Setuptools. -The project is `maintained at GitHub `_ -by the `Setuptools Developers -`_. - Questions and comments should be directed to the `distutils-sig mailing list `_. Bug reports and especially tested patches may be From 5854b0eba03dd257e30efff68f1632bdec5f0416 Mon Sep 17 00:00:00 2001 From: Junhan Huang Date: Sat, 27 Oct 2018 16:26:51 -0400 Subject: [PATCH 7224/8469] Add custom deprecation warning classes `DeprecationWarning` is not visible by default in the latest versions of CPython, so this switches the deprecation warnings in setuptools and pkg_resources over to custom classes derived from `Warning` instead. Fixes issue github issue #159 Co-authored-by: Junhan Huang Co-authored-by: Marton Pono --- pkg_resources/__init__.py | 13 ++++++++++++- setuptools/__init__.py | 4 ++++ setuptools/_deprecation_warning.py | 7 +++++++ setuptools/command/easy_install.py | 15 +++++++++++---- setuptools/command/egg_info.py | 8 ++++++-- setuptools/dist.py | 10 ++++++++-- 6 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 setuptools/_deprecation_warning.py diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7413470137..d8e4c26b4d 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -238,6 +238,9 @@ def get_supported_platform(): 'register_finder', 'register_namespace_handler', 'register_loader_type', 'fixup_namespace_packages', 'get_importer', + # Warnings + 'PkgResourcesDeprecationWarning', + # Deprecated/backward compatibility only 'run_main', 'AvailableDistributions', ] @@ -2335,7 +2338,7 @@ def load(self, require=True, *args, **kwargs): warnings.warn( "Parameters to load are deprecated. Call .resolve and " ".require separately.", - DeprecationWarning, + PkgResourcesDeprecationWarning, stacklevel=2, ) if require: @@ -3158,3 +3161,11 @@ def _initialize_master_working_set(): # match order list(map(working_set.add_entry, sys.path)) globals().update(locals()) + +class PkgResourcesDeprecationWarning(Warning): + """ + Base class for warning about deprecations in ``pkg_resources`` + + This class is not derived from ``DeprecationWarning``, and as such is + visible by default. + """ diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 54309b57fe..e438036a8c 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,6 +8,8 @@ from distutils.util import convert_path from fnmatch import fnmatchcase +from ._deprecation_warning import SetuptoolsDeprecationWarning + from setuptools.extern.six import PY3 from setuptools.extern.six.moves import filter, map @@ -22,6 +24,7 @@ __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', + 'SetuptoolsDeprecationWarning', 'find_packages' ] @@ -188,4 +191,5 @@ def findall(dir=os.curdir): return list(files) +# Apply monkey patches monkey.patch_all() diff --git a/setuptools/_deprecation_warning.py b/setuptools/_deprecation_warning.py new file mode 100644 index 0000000000..086b64dd38 --- /dev/null +++ b/setuptools/_deprecation_warning.py @@ -0,0 +1,7 @@ +class SetuptoolsDeprecationWarning(Warning): + """ + Base class for warning deprecations in ``setuptools`` + + This class is not derived from ``DeprecationWarning``, and as such is + visible by default. + """ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c670a16e61..06c98271ba 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -40,8 +40,11 @@ import shlex import io + from sysconfig import get_config_vars, get_path +from setuptools import SetuptoolsDeprecationWarning + from setuptools.extern import six from setuptools.extern.six.moves import configparser, map @@ -2077,7 +2080,7 @@ class ScriptWriter: @classmethod def get_script_args(cls, dist, executable=None, wininst=False): # for backward compatibility - warnings.warn("Use get_args", DeprecationWarning) + warnings.warn("Use get_args", EasyInstallDeprecationWarning) writer = (WindowsScriptWriter if wininst else ScriptWriter).best() header = cls.get_script_header("", executable, wininst) return writer.get_args(dist, header) @@ -2085,7 +2088,7 @@ def get_script_args(cls, dist, executable=None, wininst=False): @classmethod def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility - warnings.warn("Use get_header", DeprecationWarning, stacklevel=2) + warnings.warn("Use get_header", EasyInstallDeprecationWarning, stacklevel=2) if wininst: executable = "python.exe" return cls.get_header(script_text, executable) @@ -2120,7 +2123,7 @@ def _ensure_safe_name(name): @classmethod def get_writer(cls, force_windows): # for backward compatibility - warnings.warn("Use best", DeprecationWarning) + warnings.warn("Use best", EasyInstallDeprecationWarning) return WindowsScriptWriter.best() if force_windows else cls.best() @classmethod @@ -2152,7 +2155,7 @@ class WindowsScriptWriter(ScriptWriter): @classmethod def get_writer(cls): # for backward compatibility - warnings.warn("Use best", DeprecationWarning) + warnings.warn("Use best", EasyInstallDeprecationWarning) return cls.best() @classmethod @@ -2333,3 +2336,7 @@ def gen_usage(script_name): yield finally: distutils.core.gen_usage = saved + +class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): + """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning.""" + diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index bd116e1f6c..e1022d31fa 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -31,7 +31,7 @@ from setuptools.glob import glob from setuptools.extern import packaging - +from setuptools import SetuptoolsDeprecationWarning def translate_pattern(glob): """ @@ -696,7 +696,7 @@ def get_pkg_info_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) + warnings.warn("get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: @@ -704,3 +704,7 @@ def get_pkg_info_revision(): if match: return int(match.group(1)) return 0 + + +class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning): + """Class for warning about deprecations in eggInfo in setupTools. Not ignored by default, unlike DeprecationWarning.""" diff --git a/setuptools/dist.py b/setuptools/dist.py index 6ee4a97f3e..f6078dbe0a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -21,6 +21,8 @@ from setuptools.extern import packaging from setuptools.extern.six.moves import map, filter, filterfalse +from . import SetuptoolsDeprecationWarning + from setuptools.depends import Require from setuptools import windows_support from setuptools.monkey import get_unpatched @@ -33,7 +35,7 @@ def _get_unpatched(cls): - warnings.warn("Do not call this function", DeprecationWarning) + warnings.warn("Do not call this function", DistDeprecationWarning) return get_unpatched(cls) @@ -980,7 +982,7 @@ def warn_deprecated(): "Features are deprecated and will be removed in a future " "version. See https://github.com/pypa/setuptools/issues/65." ) - warnings.warn(msg, DeprecationWarning, stacklevel=3) + warnings.warn(msg, DistDeprecationWarning, stacklevel=3) def __init__( self, description, standard=False, available=True, @@ -1069,3 +1071,7 @@ def validate(self, dist): " doesn't contain any packages or modules under %s" % (self.description, item, item) ) + + +class DistDeprecationWarning(SetuptoolsDeprecationWarning): + """Class for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.""" From bf1673504ed9705d18ae178b96f57c5784ab4ad7 Mon Sep 17 00:00:00 2001 From: robinjhuang Date: Sat, 27 Oct 2018 16:39:27 -0400 Subject: [PATCH 7225/8469] Add a changelog for PR #1545 --- changelog.d/1545.feature.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1545.feature.rst diff --git a/changelog.d/1545.feature.rst b/changelog.d/1545.feature.rst new file mode 100644 index 0000000000..70591d56d9 --- /dev/null +++ b/changelog.d/1545.feature.rst @@ -0,0 +1 @@ +Changed the warning class of all deprecation warnings; deprecation warning classes are no longer derived from ``DeprecationWarning`` and are thus visible by default. From 9d63059f112c80d0419bac71596c79cd4660398d Mon Sep 17 00:00:00 2001 From: robinjhuang Date: Sat, 27 Oct 2018 18:06:46 -0400 Subject: [PATCH 7226/8469] Add unit tests for PkgResourcesDeprecationWarning --- pkg_resources/tests/test_resources.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 171ba2f96f..86afcf7411 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -15,7 +15,7 @@ from pkg_resources import ( parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, - WorkingSet) + WorkingSet, PkgResourcesDeprecationWarning) # from Python 3.6 docs. @@ -492,6 +492,15 @@ def testParseMap(self): with pytest.raises(ValueError): EntryPoint.parse_map(self.submap_str) + def testDeprecationWarnings(self): + ep = EntryPoint( + "foo", "pkg_resources.tests.test_resources", ["TestEntryPoints"], + ["x"] + ) + with pytest.warns(pkg_resources.PkgResourcesDeprecationWarning): + ep.load(require=False) + + class TestRequirements: def testBasics(self): From 3a9dc2b03ef313ee7729606fb56ae9b41066dfd1 Mon Sep 17 00:00:00 2001 From: robinjhuang Date: Sat, 27 Oct 2018 18:46:55 -0400 Subject: [PATCH 7227/8469] Add unit tests for setuptools deprecation warnings These are tests to ensure that the specified deprecation warnings are raised when the functions are called. Co-authored-by: Junhan Huang Co-authored-by: Marton Pono --- setuptools/tests/test_dist.py | 5 ++++- setuptools/tests/test_easy_install.py | 18 +++++++++++++++++- setuptools/tests/test_egg_info.py | 5 ++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 5162e1c985..223ad90c95 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import io - +from setuptools.dist import DistDeprecationWarning, _get_unpatched from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin @@ -56,6 +56,9 @@ def sdist_with_index(distname, version): assert [dist.key for dist in resolved_dists if dist] == reqs +def test_dist__get_unpatched_deprecated(): + pytest.warns(DistDeprecationWarning, _get_unpatched, [""]) + def __maintainer_test_cases(): attrs = {"name": "package", "version": "1.0", diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index b0cc4c9fbc..2cf65ae7e5 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,7 +15,7 @@ import io import zipfile import mock - +from setuptools.command.easy_install import EasyInstallDeprecationWarning, ScriptWriter, WindowsScriptWriter import time from setuptools.extern import six from setuptools.extern.six.moves import urllib @@ -288,6 +288,22 @@ def test_script_install(self, sdist_script, tmpdir, monkeypatch): assert (target / 'mypkg_script').exists() + def test_dist_get_script_args_deprecated(self): + with pytest.warns(EasyInstallDeprecationWarning): + ScriptWriter.get_script_args(None, None) + + def test_dist_get_script_header_deprecated(self): + with pytest.warns(EasyInstallDeprecationWarning): + ScriptWriter.get_script_header("") + + def test_dist_get_writer_deprecated(self): + with pytest.warns(EasyInstallDeprecationWarning): + ScriptWriter.get_writer(None) + + def test_dist_WindowsScriptWriter_get_writer_deprecated(self): + with pytest.warns(EasyInstallDeprecationWarning): + WindowsScriptWriter.get_writer() + @pytest.mark.filterwarnings('ignore:Unbuilt egg') class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 59ffb16d1d..46fb884f23 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -7,7 +7,7 @@ import stat import time -from setuptools.command.egg_info import egg_info, manifest_maker +from setuptools.command.egg_info import egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision from setuptools.dist import Distribution from setuptools.extern.six.moves import map @@ -603,3 +603,6 @@ def test_egg_info_tag_only_once(self, tmpdir_cwd, env): with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: pkg_info_lines = pkginfo_file.read().split('\n') assert 'Version: 0.0.0.dev0' in pkg_info_lines + + def test_get_pkg_info_revision_deprecated(self): + pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) \ No newline at end of file From 76ef30913dce00de4bca773f2dda9dd25ff66ad8 Mon Sep 17 00:00:00 2001 From: Alex Hirzel Date: Sun, 28 Oct 2018 21:44:14 -0400 Subject: [PATCH 7228/8469] change find_module to find_spec for py37 compat --- pkg_resources/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 7413470137..9b5bd1026c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2098,10 +2098,11 @@ def _handle_ns(packageName, path_item): # capture warnings due to #1111 with warnings.catch_warnings(): warnings.simplefilter("ignore") - loader = importer.find_module(packageName) - - if loader is None: - return None + spec = importer.find_spec(packageName) + if spec is not None: + loader = spec.loader + else: + return None module = sys.modules.get(packageName) if module is None: module = sys.modules[packageName] = types.ModuleType(packageName) From eb123bbf0cdb25d855aa9a1794646d4abd309c9a Mon Sep 17 00:00:00 2001 From: Alex Hirzel Date: Sun, 28 Oct 2018 22:00:13 -0400 Subject: [PATCH 7229/8469] default to find_module, fall-back to find_spec, fail gracefully after --- pkg_resources/__init__.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 9b5bd1026c..2b8c44301f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2098,11 +2098,15 @@ def _handle_ns(packageName, path_item): # capture warnings due to #1111 with warnings.catch_warnings(): warnings.simplefilter("ignore") - spec = importer.find_spec(packageName) - if spec is not None: - loader = spec.loader - else: - return None + try: + loader = importer.find_module(packageName) + except AttributeError: + try: + loader = importer.find_spec(packageName).loader + except: + loader = None + if loader is None: + return None module = sys.modules.get(packageName) if module is None: module = sys.modules[packageName] = types.ModuleType(packageName) From 63185e91406d6ba02fe42c6b7e188111054f1b14 Mon Sep 17 00:00:00 2001 From: Alex Hirzel Date: Sun, 28 Oct 2018 22:03:28 -0400 Subject: [PATCH 7230/8469] add changelog entry --- changelog.d/1563.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1563.change.rst diff --git a/changelog.d/1563.change.rst b/changelog.d/1563.change.rst new file mode 100644 index 0000000000..a2452cd824 --- /dev/null +++ b/changelog.d/1563.change.rst @@ -0,0 +1 @@ +If find_module fails or does not exist, attempt to use find_spec(...).loader From d5ea41a2a3d08f9e203252f1de5853f94870aab3 Mon Sep 17 00:00:00 2001 From: Andrew Zhou <30874884+0az@users.noreply.github.com> Date: Sun, 28 Oct 2018 22:33:35 -0700 Subject: [PATCH 7231/8469] Improve setup.cfg minimum version documentation - version: a960ee1c3f1d1d1067ec1e3c88dc345060bd33a4 - project_urls: df2246449c271c07586bcecc3eaa36e9b0e94e3d --- docs/setuptools.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 9eec82f376..fe2a06f972 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2475,10 +2475,10 @@ Metadata Key Aliases Type Minumum Version ============================== ================= ================= =============== name str -version attr:, file:, str +version attr:, file:, str 39.2.0 url home-page str download_url download-url str -project_urls dict +project_urls dict 38.3.0 author str author_email author-email str maintainer str @@ -2503,9 +2503,9 @@ obsoletes list-comma Options ------- -======================= =================================== ===== +======================= =================================== =============== Key Type Minimum Version -======================= =================================== ===== +======================= =================================== =============== zip_safe bool setup_requires list-semi install_requires list-semi @@ -2528,7 +2528,7 @@ exclude_package_data section namespace_packages list-comma py_modules list-comma data_files dict 40.5.0 -======================= =================================== ===== +======================= =================================== =============== .. note:: From cdfeb2bdaa0d30889d53425c9bea6de7273b40cc Mon Sep 17 00:00:00 2001 From: Andrew Zhou <30874884+0az@users.noreply.github.com> Date: Sun, 28 Oct 2018 22:40:19 -0700 Subject: [PATCH 7232/8469] Add news fragment --- changelog.d/1564.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1564.doc.rst diff --git a/changelog.d/1564.doc.rst b/changelog.d/1564.doc.rst new file mode 100644 index 0000000000..37494a2650 --- /dev/null +++ b/changelog.d/1564.doc.rst @@ -0,0 +1 @@ +Document setup.cfg minimum version for version and project_urls From 90325195b5bf35afa12b699a7e9fddc0571e1551 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 26 Oct 2018 10:13:15 +0800 Subject: [PATCH 7233/8469] Test normalize_path on various inputs --- pkg_resources/tests/test_pkg_resources.py | 56 +++++++++++++++++++++-- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 81b67a31a9..416f9aff2f 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -237,7 +237,55 @@ def test_version_resolved_from_egg_info(self, env): dist = pkg_resources.WorkingSet([env.paths['lib']]).find(req) assert dist.version == version - def test_normalize_path(self, tmpdir): - path = str(tmpdir) - expected = os.path.normcase(os.path.normpath(os.path.realpath(path))) - assert pkg_resources.normalize_path(path) == expected + @pytest.mark.parametrize( + 'unnormalized, normalized', + [ + ('foo', 'foo'), + ('foo/', 'foo'), + ('foo/bar', 'foo/bar'), + ('foo/bar/', 'foo/bar'), + ], + ) + def test_normalize_path_trailing_sep(self, unnormalized, normalized): + """Ensure the trailing slash is cleaned for path comparison. + + See pypa/setuptools#1519. + """ + result_from_unnormalized = pkg_resources.normalize_path(unnormalized) + result_from_normalized = pkg_resources.normalize_path(normalized) + assert result_from_unnormalized == result_from_normalized + + @pytest.mark.skipif( + os.path.normcase('A') != os.path.normcase('a'), + reason='Testing case-insensitive filesystems.', + ) + @pytest.mark.parametrize( + 'unnormalized, normalized', + [ + ('MiXeD/CasE', 'mixed/case'), + ], + ) + def test_normalize_path_normcase(self, unnormalized, normalized): + """Ensure mixed case is normalized on case-insensitive filesystems. + """ + result_from_unnormalized = pkg_resources.normalize_path(unnormalized) + result_from_normalized = pkg_resources.normalize_path(normalized) + assert result_from_unnormalized == result_from_normalized + + @pytest.mark.skipif( + os.path.sep != '\\', + reason='Testing systems using backslashes as path separators.', + ) + @pytest.mark.parametrize( + 'unnormalized, expected', + [ + ('forward/slash', 'forward\\slash'), + ('forward/slash/', 'forward\\slash'), + ('backward\\slash\\', 'backward\\slash'), + ], + ) + def test_normalize_path_backslash_sep(self, unnormalized, expected): + """Ensure path seps are cleaned on backslash path sep systems. + """ + result = pkg_resources.normalize_path(unnormalized) + assert result.endswith(expected) From 22bb74122729f7f7735db420ef32b7c578ca0d13 Mon Sep 17 00:00:00 2001 From: Andrew Zhou <30874884+0az@users.noreply.github.com> Date: Tue, 30 Oct 2018 09:26:10 -0700 Subject: [PATCH 7234/8469] Add version footnote --- docs/setuptools.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index fe2a06f972..4e548066fa 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2471,11 +2471,11 @@ Metadata The aliases given below are supported for compatibility reasons, but their use is not advised. -============================== ================= ================= =============== -Key Aliases Type Minumum Version -============================== ================= ================= =============== +============================== ================= ================= =============== ===== +Key Aliases Type Minumum Version Notes +============================== ================= ================= =============== ===== name str -version attr:, file:, str 39.2.0 +version attr:, file:, str 39.2.0 (1) url home-page str download_url download-url str project_urls dict 38.3.0 @@ -2493,19 +2493,22 @@ platforms platform list-comma provides list-comma requires list-comma obsoletes list-comma -============================== ================= ================= =============== +============================== ================= ================= =============== ===== .. note:: A version loaded using the ``file:`` directive must comply with PEP 440. It is easy to accidentally put something other than a valid version string in such a file, so validation is stricter in this case. +Notes: +1. The `version` file attribute has only been supported since 39.2.0. + Options ------- -======================= =================================== =============== -Key Type Minimum Version -======================= =================================== =============== +======================= =================================== =============== ===== +Key Type Minimum Version Notes +======================= =================================== =============== ===== zip_safe bool setup_requires list-semi install_requires list-semi @@ -2528,7 +2531,7 @@ exclude_package_data section namespace_packages list-comma py_modules list-comma data_files dict 40.5.0 -======================= =================================== =============== +======================= =================================== =============== ===== .. note:: From f0cd0ad9f29da6c6991ba0e02fc41b7e46459fb1 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 30 Oct 2018 22:54:15 +0100 Subject: [PATCH 7235/8469] Document that rpmbuild is required for bdist_rpm (#1547) Document that rpmbuild is required for bdist_rpm Refs #1456 --- changelog.d/1456.doc.rst | 1 + docs/setuptools.txt | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog.d/1456.doc.rst diff --git a/changelog.d/1456.doc.rst b/changelog.d/1456.doc.rst new file mode 100644 index 0000000000..b01d533800 --- /dev/null +++ b/changelog.d/1456.doc.rst @@ -0,0 +1 @@ +Documented that the ``rpmbuild`` packages is required for the ``bdist_rpm`` command. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 9eec82f376..2912a43ca7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1333,6 +1333,10 @@ Creating System Packages ``bdist_deb`` command is an example of a command that currently requires this kind of patching to work with setuptools. + Please note that building system packages may require you to install + some system software, for example ``bdist_rpm`` requires the ``rpmbuild`` + command installed. + If you or your users have a problem building a usable system package for your project, please report the problem via the mailing list so that either the "bdist" tool in question or setuptools can be modified to From f9bb94ae5ecef14d0168e820fe4aeae6ca341f4e Mon Sep 17 00:00:00 2001 From: Varun Kamath Date: Sun, 28 Oct 2018 16:02:11 -0400 Subject: [PATCH 7236/8469] Update distribution guide and archive ez_setup doc This adds a simple introductory guide to the modern way to distribute `setuptools`-based projects with a link to the Python packaging tutorial. Rather than delete the old `ez_setup` information, it has been moved to a separate archive for people who want to use it as a historical reference. --- docs/ez_setup.txt | 195 ++++++++++++++++++++++++++++++++++++++++++++ docs/index.txt | 3 +- docs/setuptools.txt | 192 +++++++++---------------------------------- 3 files changed, 234 insertions(+), 156 deletions(-) create mode 100644 docs/ez_setup.txt diff --git a/docs/ez_setup.txt b/docs/ez_setup.txt new file mode 100644 index 0000000000..0126fee307 --- /dev/null +++ b/docs/ez_setup.txt @@ -0,0 +1,195 @@ +:orphan: + +``ez_setup`` distribution guide +=============================== + +Using ``setuptools``... Without bundling it! +--------------------------------------------- + +.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. + +.. _ez_setup.py: https://bootstrap.pypa.io/ez_setup.py + +.. _EasyInstall Installation Instructions: easy_install.html + +.. _Custom Installation Locations: easy_install.html + +Your users might not have ``setuptools`` installed on their machines, or even +if they do, it might not be the right version. Fixing this is easy; just +download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` +script. (Be sure to add it to your revision control system, too.) Then add +these two lines to the very top of your setup script, before the script imports +anything from setuptools: + +.. code-block:: python + + import ez_setup + ez_setup.use_setuptools() + +That's it. The ``ez_setup`` module will automatically download a matching +version of ``setuptools`` from PyPI, if it isn't present on the target system. +Whenever you install an updated version of setuptools, you should also update +your projects' ``ez_setup.py`` files, so that a matching version gets installed +on the target machine(s). + +(By the way, if you need to distribute a specific version of ``setuptools``, +you can specify the exact version and base download URL as parameters to the +``use_setuptools()`` function. See the function's docstring for details.) + + +What Your Users Should Know +--------------------------- + +In general, a setuptools-based project looks just like any distutils-based +project -- as long as your users have an internet connection and are installing +to ``site-packages``, that is. But for some users, these conditions don't +apply, and they may become frustrated if this is their first encounter with +a setuptools-based project. To keep these users happy, you should review the +following topics in your project's installation instructions, if they are +relevant to your project and your target audience isn't already familiar with +setuptools and ``easy_install``. + +Network Access + If your project is using ``ez_setup``, you should inform users of the + need to either have network access, or to preinstall the correct version of + setuptools using the `EasyInstall installation instructions`_. Those + instructions also have tips for dealing with firewalls as well as how to + manually download and install setuptools. + +Custom Installation Locations + You should inform your users that if they are installing your project to + somewhere other than the main ``site-packages`` directory, they should + first install setuptools using the instructions for `Custom Installation + Locations`_, before installing your project. + +Your Project's Dependencies + If your project depends on other projects that may need to be downloaded + from PyPI or elsewhere, you should list them in your installation + instructions, or tell users how to find out what they are. While most + users will not need this information, any users who don't have unrestricted + internet access may have to find, download, and install the other projects + manually. (Note, however, that they must still install those projects + using ``easy_install``, or your project will not know they are installed, + and your setup script will try to download them again.) + + If you want to be especially friendly to users with limited network access, + you may wish to build eggs for your project and its dependencies, making + them all available for download from your site, or at least create a page + with links to all of the needed eggs. In this way, users with limited + network access can manually download all the eggs to a single directory, + then use the ``-f`` option of ``easy_install`` to specify the directory + to find eggs in. Users who have full network access can just use ``-f`` + with the URL of your download page, and ``easy_install`` will find all the + needed eggs using your links directly. This is also useful when your + target audience isn't able to compile packages (e.g. most Windows users) + and your package or some of its dependencies include C code. + +Revision Control System Users and Co-Developers + Users and co-developers who are tracking your in-development code using + a revision control system should probably read this manual's sections + regarding such development. Alternately, you may wish to create a + quick-reference guide containing the tips from this manual that apply to + your particular situation. For example, if you recommend that people use + ``setup.py develop`` when tracking your in-development code, you should let + them know that this needs to be run after every update or commit. + + Similarly, if you remove modules or data files from your project, you + should remind them to run ``setup.py clean --all`` and delete any obsolete + ``.pyc`` or ``.pyo``. (This tip applies to the distutils in general, not + just setuptools, but not everybody knows about them; be kind to your users + by spelling out your project's best practices rather than leaving them + guessing.) + +Creating System Packages + Some users want to manage all Python packages using a single package + manager, and sometimes that package manager isn't ``easy_install``! + Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and + ``bdist_dumb`` formats for system packaging. If a user has a locally- + installed "bdist" packaging tool that internally uses the distutils + ``install`` command, it should be able to work with ``setuptools``. Some + examples of "bdist" formats that this should work with include the + ``bdist_nsi`` and ``bdist_msi`` formats for Windows. + + However, packaging tools that build binary distributions by running + ``setup.py install`` on the command line or as a subprocess will require + modification to work with setuptools. They should use the + ``--single-version-externally-managed`` option to the ``install`` command, + combined with the standard ``--root`` or ``--record`` options. + See the `install command`_ documentation below for more details. The + ``bdist_deb`` command is an example of a command that currently requires + this kind of patching to work with setuptools. + + Please note that building system packages may require you to install + some system software, for example ``bdist_rpm`` requires the ``rpmbuild`` + command to be installed. + + If you or your users have a problem building a usable system package for + your project, please report the problem via the mailing list so that + either the "bdist" tool in question or setuptools can be modified to + resolve the issue. + +Your users might not have ``setuptools`` installed on their machines, or even +if they do, it might not be the right version. Fixing this is easy; just +download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` +script. (Be sure to add it to your revision control system, too.) Then add +these two lines to the very top of your setup script, before the script imports +anything from setuptools: + +.. code-block:: python + + import ez_setup + ez_setup.use_setuptools() + +That's it. The ``ez_setup`` module will automatically download a matching +version of ``setuptools`` from PyPI, if it isn't present on the target system. +Whenever you install an updated version of setuptools, you should also update +your projects' ``ez_setup.py`` files, so that a matching version gets installed +on the target machine(s). + +(By the way, if you need to distribute a specific version of ``setuptools``, +you can specify the exact version and base download URL as parameters to the +``use_setuptools()`` function. See the function's docstring for details.) + +.. _install command: + +``install`` - Run ``easy_install`` or old-style installation +============================================================ + +The setuptools ``install`` command is basically a shortcut to run the +``easy_install`` command on the current project. However, for convenience +in creating "system packages" of setuptools-based projects, you can also +use this option: + +``--single-version-externally-managed`` + This boolean option tells the ``install`` command to perform an "old style" + installation, with the addition of an ``.egg-info`` directory so that the + installed project will still have its metadata available and operate + normally. If you use this option, you *must* also specify the ``--root`` + or ``--record`` options (or both), because otherwise you will have no way + to identify and remove the installed files. + +This option is automatically in effect when ``install`` is invoked by another +distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm`` +will create system packages of eggs. It is also automatically in effect if +you specify the ``--root`` option. + + +``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages`` +============================================================================== + +Setuptools runs this command as part of ``install`` operations that use the +``--single-version-externally-managed`` options. You should not invoke it +directly; it is documented here for completeness and so that distutils +extensions such as system package builders can make use of it. This command +has only one option: + +``--install-dir=DIR, -d DIR`` + The parent directory where the ``.egg-info`` directory will be placed. + Defaults to the same as the ``--install-dir`` option specified for the + ``install_lib`` command, which is usually the system ``site-packages`` + directory. + +This command assumes that the ``egg_info`` command has been given valid options +via the command line or ``setup.cfg``, as it will invoke the ``egg_info`` +command and use its options to locate the project's source ``.egg-info`` +directory. diff --git a/docs/index.txt b/docs/index.txt index 74aabb5e68..3515e0e68c 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -17,9 +17,10 @@ Documentation content: :maxdepth: 2 setuptools - easy_install pkg_resources python3 development roadmap + easy_install + ez_setup history diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2912a43ca7..a1cdce1bd6 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1223,125 +1223,53 @@ the quoted part. Distributing a ``setuptools``-based project =========================================== -Using ``setuptools``... Without bundling it! ---------------------------------------------- +Detailed instructions to distribute a setuptools project can be found at +`Packaging project tutorials`_. -.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. +.. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives -Your users might not have ``setuptools`` installed on their machines, or even -if they do, it might not be the right version. Fixing this is easy; just -download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` -script. (Be sure to add it to your revision control system, too.) Then add -these two lines to the very top of your setup script, before the script imports -anything from setuptools: +Before you begin, make sure you have the latest versions of setuptools and wheel:: -.. code-block:: python + python3 -m pip install --user --upgrade setuptools wheel - import ez_setup - ez_setup.use_setuptools() +To build a setuptools project, run this command from the same directory where +setup.py is located:: -That's it. The ``ez_setup`` module will automatically download a matching -version of ``setuptools`` from PyPI, if it isn't present on the target system. -Whenever you install an updated version of setuptools, you should also update -your projects' ``ez_setup.py`` files, so that a matching version gets installed -on the target machine(s). + python3 setup.py sdist bdist_wheel -(By the way, if you need to distribute a specific version of ``setuptools``, -you can specify the exact version and base download URL as parameters to the -``use_setuptools()`` function. See the function's docstring for details.) +This will generate distribution archives in the `dist` directory. +Before you upload the generated archives make sure you're registered on +https://test.pypi.org/account/register/. You will also need to verify your email +to be able to upload any packages. +You should install twine to be able to upload packages:: -What Your Users Should Know ---------------------------- + python3 -m pip install --user --upgrade setuptools wheel + +Now, to upload these archives, run:: + + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +To install your newly uploaded package ``example_pkg``, you can use pip:: -In general, a setuptools-based project looks just like any distutils-based -project -- as long as your users have an internet connection and are installing -to ``site-packages``, that is. But for some users, these conditions don't -apply, and they may become frustrated if this is their first encounter with -a setuptools-based project. To keep these users happy, you should review the -following topics in your project's installation instructions, if they are -relevant to your project and your target audience isn't already familiar with -setuptools and ``easy_install``. - -Network Access - If your project is using ``ez_setup``, you should inform users of the - need to either have network access, or to preinstall the correct version of - setuptools using the `EasyInstall installation instructions`_. Those - instructions also have tips for dealing with firewalls as well as how to - manually download and install setuptools. - -Custom Installation Locations - You should inform your users that if they are installing your project to - somewhere other than the main ``site-packages`` directory, they should - first install setuptools using the instructions for `Custom Installation - Locations`_, before installing your project. - -Your Project's Dependencies - If your project depends on other projects that may need to be downloaded - from PyPI or elsewhere, you should list them in your installation - instructions, or tell users how to find out what they are. While most - users will not need this information, any users who don't have unrestricted - internet access may have to find, download, and install the other projects - manually. (Note, however, that they must still install those projects - using ``easy_install``, or your project will not know they are installed, - and your setup script will try to download them again.) - - If you want to be especially friendly to users with limited network access, - you may wish to build eggs for your project and its dependencies, making - them all available for download from your site, or at least create a page - with links to all of the needed eggs. In this way, users with limited - network access can manually download all the eggs to a single directory, - then use the ``-f`` option of ``easy_install`` to specify the directory - to find eggs in. Users who have full network access can just use ``-f`` - with the URL of your download page, and ``easy_install`` will find all the - needed eggs using your links directly. This is also useful when your - target audience isn't able to compile packages (e.g. most Windows users) - and your package or some of its dependencies include C code. - -Revision Control System Users and Co-Developers - Users and co-developers who are tracking your in-development code using - a revision control system should probably read this manual's sections - regarding such development. Alternately, you may wish to create a - quick-reference guide containing the tips from this manual that apply to - your particular situation. For example, if you recommend that people use - ``setup.py develop`` when tracking your in-development code, you should let - them know that this needs to be run after every update or commit. - - Similarly, if you remove modules or data files from your project, you - should remind them to run ``setup.py clean --all`` and delete any obsolete - ``.pyc`` or ``.pyo``. (This tip applies to the distutils in general, not - just setuptools, but not everybody knows about them; be kind to your users - by spelling out your project's best practices rather than leaving them - guessing.) - -Creating System Packages - Some users want to manage all Python packages using a single package - manager, and sometimes that package manager isn't ``easy_install``! - Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and - ``bdist_dumb`` formats for system packaging. If a user has a locally- - installed "bdist" packaging tool that internally uses the distutils - ``install`` command, it should be able to work with ``setuptools``. Some - examples of "bdist" formats that this should work with include the - ``bdist_nsi`` and ``bdist_msi`` formats for Windows. - - However, packaging tools that build binary distributions by running - ``setup.py install`` on the command line or as a subprocess will require - modification to work with setuptools. They should use the - ``--single-version-externally-managed`` option to the ``install`` command, - combined with the standard ``--root`` or ``--record`` options. - See the `install command`_ documentation below for more details. The - ``bdist_deb`` command is an example of a command that currently requires - this kind of patching to work with setuptools. - - Please note that building system packages may require you to install - some system software, for example ``bdist_rpm`` requires the ``rpmbuild`` - command installed. - - If you or your users have a problem building a usable system package for - your project, please report the problem via the mailing list so that - either the "bdist" tool in question or setuptools can be modified to - resolve the issue. + python3 -m pip install --index-url https://test.pypi.org/simple/ example_pkg +If you have issues at any point, please refer to `Packaging project tutorials`_ +for clarification. + +Distributing legacy ``setuptools`` projects using ez_setup.py +------------------------------------------------------------- + +.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. + +Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is +deprecated in favor of PIP. Please consider migrating to using pip and twine based +distribution. + +However, if you still have any ``ez_setup`` based packages, documentation for +ez_setup based distributions can be found at `ez_setup distribution guide`_. + +.. _ez_setup distribution guide: ez_setup.html Setting the ``zip_safe`` flag ----------------------------- @@ -2058,52 +1986,6 @@ specified in ``setup.cfg``:: (Notice that ``egg_info`` must always appear on the command line *before* any commands that you want the version changes to apply to.) - -.. _install command: - -``install`` - Run ``easy_install`` or old-style installation -============================================================ - -The setuptools ``install`` command is basically a shortcut to run the -``easy_install`` command on the current project. However, for convenience -in creating "system packages" of setuptools-based projects, you can also -use this option: - -``--single-version-externally-managed`` - This boolean option tells the ``install`` command to perform an "old style" - installation, with the addition of an ``.egg-info`` directory so that the - installed project will still have its metadata available and operate - normally. If you use this option, you *must* also specify the ``--root`` - or ``--record`` options (or both), because otherwise you will have no way - to identify and remove the installed files. - -This option is automatically in effect when ``install`` is invoked by another -distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm`` -will create system packages of eggs. It is also automatically in effect if -you specify the ``--root`` option. - - -``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages`` -============================================================================== - -Setuptools runs this command as part of ``install`` operations that use the -``--single-version-externally-managed`` options. You should not invoke it -directly; it is documented here for completeness and so that distutils -extensions such as system package builders can make use of it. This command -has only one option: - -``--install-dir=DIR, -d DIR`` - The parent directory where the ``.egg-info`` directory will be placed. - Defaults to the same as the ``--install-dir`` option specified for the - ``install_lib`` command, which is usually the system ``site-packages`` - directory. - -This command assumes that the ``egg_info`` command has been given valid options -via the command line or ``setup.cfg``, as it will invoke the ``egg_info`` -command and use its options to locate the project's source ``.egg-info`` -directory. - - .. _rotate: ``rotate`` - Delete outdated distribution files From f666e2a70d24cae554b0800df512b884fdca25c3 Mon Sep 17 00:00:00 2001 From: Varun Kamath Date: Sun, 28 Oct 2018 16:06:55 -0400 Subject: [PATCH 7237/8469] Add news fragment for PR #1560 --- changelog.d/1560.doc.rst | 1 + docs/index.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 changelog.d/1560.doc.rst diff --git a/changelog.d/1560.doc.rst b/changelog.d/1560.doc.rst new file mode 100644 index 0000000000..8288aa4e95 --- /dev/null +++ b/changelog.d/1560.doc.rst @@ -0,0 +1 @@ +update ``setuptools`` distribution documentation to mimic packaging.python.org tutorial. \ No newline at end of file diff --git a/docs/index.txt b/docs/index.txt index 3515e0e68c..ba4be25fbf 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -22,5 +22,4 @@ Documentation content: development roadmap easy_install - ez_setup history From 4e21a2f34f5ac23c9884a553639d76de2e2bcdc8 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 29 Oct 2018 10:16:41 -0400 Subject: [PATCH 7238/8469] Change index header for Easy Install --- docs/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index ba4be25fbf..13a46e74ef 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -21,5 +21,5 @@ Documentation content: python3 development roadmap - easy_install + Deprecated: Easy Install history From af4f0bae84750a299d8396e7da27f8d5220d19b2 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 1 Nov 2018 11:52:54 -0700 Subject: [PATCH 7239/8469] Add missing word to sentence in docs (#1552) Add missing word to sentence in python 3 docs --- changelog.d/1552.doc.rst | 1 + docs/python3.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1552.doc.rst diff --git a/changelog.d/1552.doc.rst b/changelog.d/1552.doc.rst new file mode 100644 index 0000000000..43e0e62d10 --- /dev/null +++ b/changelog.d/1552.doc.rst @@ -0,0 +1 @@ +Fixed a minor typo in the python 2/3 compatibility documentation. diff --git a/docs/python3.txt b/docs/python3.txt index c528fc3ced..6b55fe785e 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -9,7 +9,7 @@ code. Setuptools provides a facility to invoke 2to3 on the code as a part of the build process, by setting the keyword parameter ``use_2to3`` to True, but -the Setuptools strongly recommends instead developing a unified codebase +the Setuptools project strongly recommends instead developing a unified codebase using `six `_, `future `_, or another compatibility library. From d3e08a321065f9c84ac923417f9d80ae510adaaf Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sun, 28 Oct 2018 12:47:00 -0400 Subject: [PATCH 7240/8469] Add tests for setup.py inclusion This tests that `setup.py` is included by default in the distribution with the egg_info command and when an sdist is built with build_meta.build_sdist --- setuptools/tests/test_build_meta.py | 12 ++++++++ setuptools/tests/test_egg_info.py | 16 +++++++++- setuptools/tests/test_sdist.py | 46 +++++++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index c5f4dcaa9b..82a5511c48 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -2,9 +2,11 @@ import os import shutil +import tarfile import pytest +from setuptools.build_meta import build_sdist from .files import build_files from .textwrap import DALS from . import py2_only @@ -181,3 +183,13 @@ def test_build_sdist_version_change(build_backend): sdist_name = build_backend.build_sdist("out_sdist") assert os.path.isfile(os.path.join(os.path.abspath("out_sdist"), sdist_name)) + + +def test_build_sdist_setup_py_exists(tmpdir_cwd): + # If build_sdist is called from a script other than setup.py, + # ensure setup.py is include + build_files(defns[0]) + targz_path = build_sdist("temp") + with tarfile.open(os.path.join("temp", targz_path)) as tar: + assert any('setup.py' in name for name in tar.getnames()) + diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 46fb884f23..f97b3f1d81 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -569,6 +569,20 @@ def test_manifest_maker_warning_suppression(self): for msg in fixtures: assert manifest_maker._should_suppress_warning(msg) + def test_egg_info_includes_setup_py(self, tmpdir_cwd): + self._create_project() + dist = Distribution({"name": "foo", "version": "0.0.1"}) + dist.script_name = "non_setup.py" + egg_info_instance = egg_info(dist) + egg_info_instance.finalize_options() + egg_info_instance.run() + + assert 'setup.py' in egg_info_instance.filelist.files + + with open(egg_info_instance.egg_info + "/SOURCES.txt") as f: + sources = f.read().split('\n') + assert 'setup.py' in sources + def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], @@ -605,4 +619,4 @@ def test_egg_info_tag_only_once(self, tmpdir_cwd, env): assert 'Version: 0.0.0.dev0' in pkg_info_lines def test_get_pkg_info_revision_deprecated(self): - pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) \ No newline at end of file + pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 3a203890c8..d2c4e0cf95 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -92,9 +92,8 @@ def latin1_fail(): class TestSdistTest: def setup_method(self, method): self.temp_dir = tempfile.mkdtemp() - f = open(os.path.join(self.temp_dir, 'setup.py'), 'w') - f.write(SETUP_PY) - f.close() + with open(os.path.join(self.temp_dir, 'setup.py'), 'w') as f: + f.write(SETUP_PY) # Set up the rest of the test package test_pkg = os.path.join(self.temp_dir, 'sdist_test') @@ -135,6 +134,47 @@ def test_package_data_in_sdist(self): assert os.path.join('sdist_test', 'c.rst') not in manifest assert os.path.join('d', 'e.dat') in manifest + def test_setup_py_exists(self): + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'foo.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + with quiet(): + cmd.run() + + manifest = cmd.filelist.files + assert 'setup.py' in manifest + + def test_setup_py_missing(self): + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'foo.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + if os.path.exists("setup.py"): + os.remove("setup.py") + with quiet(): + cmd.run() + + manifest = cmd.filelist.files + assert 'setup.py' not in manifest + + def test_setup_py_excluded(self): + with open("MANIFEST.in", "w") as manifest_file: + manifest_file.write("exclude setup.py") + + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'foo.py' + cmd = sdist(dist) + cmd.ensure_finalized() + + with quiet(): + cmd.run() + + manifest = cmd.filelist.files + assert 'setup.py' not in manifest + def test_defaults_case_sensitivity(self): """ Make sure default files (README.*, etc.) are added in a case-sensitive From fcfe6ef3b7a49f68a9d732558ad80a7afe98aaa9 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sun, 28 Oct 2018 12:47:43 -0400 Subject: [PATCH 7241/8469] Add setup.py to egg-info by default Fixes GH issue #1506 --- setuptools/command/egg_info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e1022d31fa..d9fe3da319 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -575,6 +575,12 @@ def add_defaults(self): self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() + + if os.path.exists("setup.py"): + # setup.py should be included by default, even if it's not + # the script called to create the sdist + self.filelist.append("setup.py") + ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info) From 7a3e4b4169d5f65714f1302aff6c420237ff9295 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 2 Nov 2018 20:38:43 -0400 Subject: [PATCH 7242/8469] Add futures backport to test reqs `setuptools.tests.test_build_meta` relies on the Python 3 feature `concurrent.futures` to run, and as a result has been silently skipped in Python 2.7. This adds the `futures` backport to the 2.7 test requirements and turns the `pytest.importorskip` invocations in test_build_meta into standard import statements. --- setuptools/tests/test_build_meta.py | 5 +++-- tests/requirements.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index c5f4dcaa9b..2dc45bc42d 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -11,8 +11,9 @@ __metaclass__ = type -futures = pytest.importorskip('concurrent.futures') -importlib = pytest.importorskip('importlib') +# Backports on Python 2.7 +import importlib +from concurrent import futures class BuildBackendBase: diff --git a/tests/requirements.txt b/tests/requirements.txt index b38fcbf06e..0c6c3e597c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,3 +8,4 @@ wheel coverage>=4.5.1 pytest-cov>=2.5.1 paver; python_version>="3.6" +futures; python_version=="2.7" From b2cbe8606a12913c12b9a1fe3f5f8c0f8082c296 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 2 Nov 2018 20:46:29 -0400 Subject: [PATCH 7243/8469] Add changelog for PR #1572 --- changelog.d/1572.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1572.misc.rst diff --git a/changelog.d/1572.misc.rst b/changelog.d/1572.misc.rst new file mode 100644 index 0000000000..aa3ab7ae9e --- /dev/null +++ b/changelog.d/1572.misc.rst @@ -0,0 +1 @@ +Added the ``concurrent.futures`` backport ``futures`` to the Python 2.7 test suite requirements. From 6d8a4ebcd6a9e61ac92146d2e41deeb92a7a5ec1 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sun, 28 Oct 2018 15:10:28 -0400 Subject: [PATCH 7244/8469] Add changelog for PR #1554 --- changelog.d/1554.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1554.change.rst diff --git a/changelog.d/1554.change.rst b/changelog.d/1554.change.rst new file mode 100644 index 0000000000..d55c042ce4 --- /dev/null +++ b/changelog.d/1554.change.rst @@ -0,0 +1 @@ +``build_meta.build_sdist`` now includes ``setup.py`` in source distributions by default From bff67db79c5c1f65cde5fea9919f121dacbc0e7b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 2 Nov 2018 20:29:40 -0400 Subject: [PATCH 7245/8469] Test that manifest can exclude setup.py --- setuptools/tests/test_build_meta.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 82a5511c48..940780cf5c 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -193,3 +193,24 @@ def test_build_sdist_setup_py_exists(tmpdir_cwd): with tarfile.open(os.path.join("temp", targz_path)) as tar: assert any('setup.py' in name for name in tar.getnames()) + +def test_build_sdist_setup_py_manifest_excluded(tmpdir_cwd): + # Ensure that MANIFEST.in can exclude setup.py + files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'] + )"""), + 'hello.py': '', + 'MANIFEST.in': DALS(""" + exclude setup.py + """) + } + + build_files(files) + targz_path = build_sdist("temp") + with tarfile.open(os.path.join("temp", targz_path)) as tar: + assert not any('setup.py' in name for name in tar.getnames()) + From b841e0aececb0e28ff3fabe29bf22c4b86fae9d8 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 5 Nov 2018 16:20:25 +0200 Subject: [PATCH 7246/8469] bpo-35133: Fix mistakes when concatenate string literals on different lines. (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings. --- command/bdist_dumb.py | 2 +- command/bdist_msi.py | 4 ++-- command/bdist_rpm.py | 2 +- command/bdist_wininst.py | 4 ++-- command/build_ext.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/command/bdist_dumb.py b/command/bdist_dumb.py index e9274d925a..f0d6b5b8cd 100644 --- a/command/bdist_dumb.py +++ b/command/bdist_dumb.py @@ -32,7 +32,7 @@ class bdist_dumb(Command): ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ('relative', None, - "build the archive using relative paths" + "build the archive using relative paths " "(default: false)"), ('owner=', 'u', "Owner name used when creating a tar file" diff --git a/command/bdist_msi.py b/command/bdist_msi.py index a4bd5a589d..80104c372d 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -98,14 +98,14 @@ class bdist_msi(Command): ('no-target-compile', 'c', "do not compile .py to .pyc on the target system"), ('no-target-optimize', 'o', - "do not compile .py to .pyo (optimized)" + "do not compile .py to .pyo (optimized) " "on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ('install-script=', None, - "basename of installation script to be run after" + "basename of installation script to be run after " "installation or before deinstallation"), ('pre-install-script=', None, "Fully qualified filename of a script to be run before " diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index ac4621791d..02f10dd89d 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -58,7 +58,7 @@ class bdist_rpm(Command): "RPM \"vendor\" (eg. \"Joe Blow \") " "[default: maintainer or author from setup script]"), ('packager=', None, - "RPM packager (eg. \"Jane Doe \")" + "RPM packager (eg. \"Jane Doe \") " "[default: vendor]"), ('doc-files=', None, "list of documentation files (space or comma-separated)"), diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 0871a4f7d6..fde56754e8 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -29,7 +29,7 @@ class bdist_wininst(Command): ('no-target-compile', 'c', "do not compile .py to .pyc on the target system"), ('no-target-optimize', 'o', - "do not compile .py to .pyo (optimized)" + "do not compile .py to .pyo (optimized) " "on the target system"), ('dist-dir=', 'd', "directory to put final built distributions in"), @@ -40,7 +40,7 @@ class bdist_wininst(Command): ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ('install-script=', None, - "basename of installation script to be run after" + "basename of installation script to be run after " "installation or before deinstallation"), ('pre-install-script=', None, "Fully qualified filename of a script to be run before " diff --git a/command/build_ext.py b/command/build_ext.py index 8fad9cdc2b..158465d233 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -365,7 +365,7 @@ def check_extensions_list(self, extensions): ext_name, build_info = ext log.warn("old-style (ext_name, build_info) tuple found in " - "ext_modules for extension '%s'" + "ext_modules for extension '%s' " "-- please convert to Extension instance", ext_name) if not (isinstance(ext_name, str) and From cbef2949856f5e0957be1cbdfdc92325f9ae9f1e Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 27 Oct 2018 17:21:11 -0400 Subject: [PATCH 7247/8469] Add upload_file to setuptools.command.upload --- setuptools/command/upload.py | 147 ++++++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 1 deletion(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 72f24d8f48..dae7d74dfb 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -1,14 +1,24 @@ +import io +import os +import hashlib import getpass + +from base64 import standard_b64encode + from distutils import log from distutils.command import upload as orig +from distutils.errors import DistutilsError + +from six.moves.urllib.request import urlopen, Request +from six.moves.urllib.error import HTTPError +from six.moves.urllib.parse import urlparse class upload(orig.upload): """ Override default upload behavior to obtain password in a variety of different ways. """ - def run(self): try: orig.upload.run(self) @@ -33,6 +43,141 @@ def finalize_options(self): self._prompt_for_password() ) + def upload_file(self, command, pyversion, filename): + # Makes sure the repository URL is compliant + schema, netloc, url, params, query, fragments = \ + urlparse(self.repository) + if params or query or fragments: + raise AssertionError("Incompatible url %s" % self.repository) + + if schema not in ('http', 'https'): + raise AssertionError("unsupported schema " + schema) + + # Sign if requested + if self.sign: + gpg_args = ["gpg", "--detach-sign", "-a", filename] + if self.identity: + gpg_args[2:2] = ["--local-user", self.identity] + spawn(gpg_args, + dry_run=self.dry_run) + + # Fill in the data - send all the meta-data in case we need to + # register a new release + with open(filename, 'rb') as f: + content = f.read() + + meta = self.distribution.metadata + + data = { + # action + ':action': 'file_upload', + 'protocol_version': '1', + + # identify release + 'name': meta.get_name(), + 'version': meta.get_version(), + + # file content + 'content': (os.path.basename(filename),content), + 'filetype': command, + 'pyversion': pyversion, + 'md5_digest': hashlib.md5(content).hexdigest(), + + # additional meta-data + 'metadata_version': '1.0', + 'summary': meta.get_description(), + 'home_page': meta.get_url(), + 'author': meta.get_contact(), + 'author_email': meta.get_contact_email(), + 'license': meta.get_licence(), + 'description': meta.get_long_description(), + 'keywords': meta.get_keywords(), + 'platform': meta.get_platforms(), + 'classifiers': meta.get_classifiers(), + 'download_url': meta.get_download_url(), + # PEP 314 + 'provides': meta.get_provides(), + 'requires': meta.get_requires(), + 'obsoletes': meta.get_obsoletes(), + } + comment = '' + if command == 'bdist_rpm': + dist, version, id = platform.dist() + if dist: + comment = 'built for %s %s' % (dist, version) + elif command == 'bdist_dumb': + comment = 'built for %s' % platform.platform(terse=1) + data['comment'] = comment + + if self.sign: + data['gpg_signature'] = (os.path.basename(filename) + ".asc", + open(filename+".asc", "rb").read()) + + # set up the authentication + user_pass = (self.username + ":" + self.password).encode('ascii') + # The exact encoding of the authentication string is debated. + # Anyway PyPI only accepts ascii for both username or password. + auth = "Basic " + standard_b64encode(user_pass).decode('ascii') + + # Build up the MIME payload for the POST data + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = b'\r\n--' + boundary.encode('ascii') + end_boundary = sep_boundary + b'--\r\n' + body = io.BytesIO() + for key, value in data.items(): + title = '\r\nContent-Disposition: form-data; name="%s"' % key + # handle multiple entries for the same name + if not isinstance(value, list): + value = [value] + for value in value: + if type(value) is tuple: + title += '; filename="%s"' % value[0] + value = value[1] + else: + value = str(value).encode('utf-8') + body.write(sep_boundary) + body.write(title.encode('utf-8')) + body.write(b"\r\n\r\n") + body.write(value) + body.write(end_boundary) + body = body.getvalue() + + msg = "Submitting %s to %s" % (filename, self.repository) + self.announce(msg, log.INFO) + + # build the Request + headers = { + 'Content-type': 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth, + } + + request = Request(self.repository, data=body, + headers=headers) + # send the data + try: + result = urlopen(request) + status = result.getcode() + reason = result.msg + except HTTPError as e: + status = e.code + reason = e.msg + except OSError as e: + self.announce(str(e), log.ERROR) + raise + + if status == 200: + self.announce('Server response (%s): %s' % (status, reason), + log.INFO) + if self.show_response: + text = self._read_pypi_response(result) + msg = '\n'.join(('-' * 75, text, '-' * 75)) + self.announce(msg, log.INFO) + else: + msg = 'Upload failed (%s): %s' % (status, reason) + self.announce(msg, log.ERROR) + raise DistutilsError(msg) + def _load_password_from_keyring(self): """ Attempt to load password from keyring. Suppress Exceptions. From 83fb2385518f7cf7885144f12db80b9364e67c7f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 6 Nov 2018 09:18:05 -0500 Subject: [PATCH 7248/8469] Add DistributionMetadata.read_pkg_file This is the baseline, unchanged from the version in distutils.dist, to be modified before patching. --- setuptools/dist.py | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index f6078dbe0a..44e9aa89b6 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -53,6 +53,59 @@ def get_metadata_version(dist_md): return StrictVersion('1.0') +def read_pkg_file(self, file): + """Reads the metadata values from a file object.""" + msg = message_from_file(file) + + def _read_field(name): + value = msg[name] + if value == 'UNKNOWN': + return None + return value + + def _read_list(name): + values = msg.get_all(name, None) + if values == []: + return None + return values + + metadata_version = msg['metadata-version'] + self.name = _read_field('name') + self.version = _read_field('version') + self.description = _read_field('summary') + # we are filling author only. + self.author = _read_field('author') + self.maintainer = None + self.author_email = _read_field('author-email') + self.maintainer_email = None + self.url = _read_field('home-page') + self.license = _read_field('license') + + if 'download-url' in msg: + self.download_url = _read_field('download-url') + else: + self.download_url = None + + self.long_description = _read_field('description') + self.description = _read_field('summary') + + if 'keywords' in msg: + self.keywords = _read_field('keywords').split(',') + + self.platforms = _read_list('platform') + self.classifiers = _read_list('classifier') + + # PEP 314 - these fields only exist in 1.1 + if metadata_version == '1.1': + self.requires = _read_list('requires') + self.provides = _read_list('provides') + self.obsoletes = _read_list('obsoletes') + else: + self.requires = None + self.provides = None + self.obsoletes = None + + # Based on Python 3.5 version def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. From b7a6d8ad1b20e94de0b0bdebd1a6e9c8fd51695a Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 28 Oct 2018 14:19:04 -0400 Subject: [PATCH 7249/8469] Add failing test for issue #1381 --- setuptools/tests/test_upload.py | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 95a8d16b11..5b8e267c76 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -1,13 +1,72 @@ import mock +import os +import re + from distutils import log +from distutils.version import StrictVersion import pytest +import six from setuptools.command.upload import upload from setuptools.dist import Distribution +def _parse_upload_body(body): + boundary = u'\r\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + entries = [] + name_re = re.compile(u'^Content-Disposition: form-data; name="([^\"]+)"') + + for entry in body.split(boundary): + pair = entry.split(u'\r\n\r\n') + if not len(pair) == 2: + continue + + key, value = map(six.text_type.strip, pair) + m = name_re.match(key) + if m is not None: + key = m.group(1) + + entries.append((key, value)) + + return entries + + class TestUploadTest: + @pytest.mark.xfail(reason='Issue #1381') + @mock.patch('setuptools.command.upload.urlopen') + def test_upload_metadata(self, patch, tmpdir): + dist = Distribution() + dist.metadata.metadata_version = StrictVersion('2.1') + + content = os.path.join(str(tmpdir), "test_upload_metadata_content") + + with open(content, 'w') as f: + f.write("Some content") + + dist.dist_files = [('xxx', '3.7', content)] + + patch.return_value = mock.Mock() + patch.return_value.getcode.return_value = 200 + + cmd = upload(dist) + cmd.announce = mock.Mock() + cmd.username = 'user' + cmd.password = 'hunter2' + cmd.ensure_finalized() + cmd.run() + + # Make sure we did the upload + patch.assert_called_once() + + # Make sure the metadata version is correct in the headers + request = patch.call_args_list[0][0][0] + body = request.data.decode('utf-8') + + entries = dict(_parse_upload_body(body)) + assert entries['metadata_version'] == '2.1' + + def test_warns_deprecation(self): dist = Distribution() dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] From e5d362d3736bc5972835a55bcb165d8c55913547 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 6 Nov 2018 09:30:24 -0500 Subject: [PATCH 7250/8469] Store metadata version on metadata object --- setuptools/dist.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 44e9aa89b6..5b750b624b 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -10,7 +10,11 @@ import distutils.cmd import distutils.dist import itertools + + from collections import defaultdict +from email import message_from_file + from distutils.errors import ( DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, ) @@ -69,7 +73,7 @@ def _read_list(name): return None return values - metadata_version = msg['metadata-version'] + self.metadata_version = StrictVersion(msg['metadata-version']) self.name = _read_field('name') self.version = _read_field('version') self.description = _read_field('summary') @@ -96,7 +100,7 @@ def _read_list(name): self.classifiers = _read_list('classifier') # PEP 314 - these fields only exist in 1.1 - if metadata_version == '1.1': + if metadata_version == StrictVersion('1.1'): self.requires = _read_list('requires') self.provides = _read_list('provides') self.obsoletes = _read_list('obsoletes') From 386fcdbe02c4170a560d67742f2ac1319430ff43 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 5 Nov 2018 10:23:15 -0500 Subject: [PATCH 7251/8469] Start patching DistributionMetadata.read_pkg_file This turns get_metadata_version into a method on DistributionMetadata, populated either by inferrence (in the case of package metadata specified in `setup`) or from the data in a specified PKG-INFO file. To populate metadata_version from PKG-INFO, we need to monkey patch read_pkg_file in addition to write_pkg_file. --- setuptools/dist.py | 33 ++++++++++++++++++++------------- setuptools/monkey.py | 12 ++++++------ 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 5b750b624b..ae9816fd47 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -43,18 +43,25 @@ def _get_unpatched(cls): return get_unpatched(cls) -def get_metadata_version(dist_md): - if dist_md.long_description_content_type or dist_md.provides_extras: - return StrictVersion('2.1') - elif (dist_md.maintainer is not None or - dist_md.maintainer_email is not None or - getattr(dist_md, 'python_requires', None) is not None): - return StrictVersion('1.2') - elif (dist_md.provides or dist_md.requires or dist_md.obsoletes or - dist_md.classifiers or dist_md.download_url): - return StrictVersion('1.1') +def get_metadata_version(self): + mv = getattr(self, 'metadata_version', None) + + if mv is None: + if self.long_description_content_type or self.provides_extras: + mv = StrictVersion('2.1') + elif (self.maintainer is not None or + self.maintainer_email is not None or + getattr(self, 'python_requires', None) is not None): + mv = StrictVersion('1.2') + elif (self.provides or self.requires or self.obsoletes or + self.classifiers or self.download_url): + mv = StrictVersion('1.1') + else: + mv = StrictVersion('1.0') + + self.metadata_version = mv - return StrictVersion('1.0') + return mv def read_pkg_file(self, file): @@ -100,7 +107,7 @@ def _read_list(name): self.classifiers = _read_list('classifier') # PEP 314 - these fields only exist in 1.1 - if metadata_version == StrictVersion('1.1'): + if self.metadata_version == StrictVersion('1.1'): self.requires = _read_list('requires') self.provides = _read_list('provides') self.obsoletes = _read_list('obsoletes') @@ -114,7 +121,7 @@ def _read_list(name): def write_pkg_file(self, file): """Write the PKG-INFO format data to a file object. """ - version = get_metadata_version(self) + version = self.get_metadata_version() file.write('Metadata-Version: %s\n' % version) file.write('Name: %s\n' % self.get_name()) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 05a738b055..3c77f8cf27 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -84,7 +84,7 @@ def patch_all(): warehouse = 'https://upload.pypi.org/legacy/' distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse - _patch_distribution_metadata_write_pkg_file() + _patch_distribution_metadata() # Install Distribution throughout the distutils for module in distutils.dist, distutils.core, distutils.cmd: @@ -101,11 +101,11 @@ def patch_all(): patch_for_msvc_specialized_compiler() -def _patch_distribution_metadata_write_pkg_file(): - """Patch write_pkg_file to also write Requires-Python/Requires-External""" - distutils.dist.DistributionMetadata.write_pkg_file = ( - setuptools.dist.write_pkg_file - ) +def _patch_distribution_metadata(): + """Patch write_pkg_file and read_pkg_file for higher metadata standards""" + for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'): + new_val = getattr(setuptools.dist, attr) + setattr(distutils.dist.DistributionMetadata, attr, new_val) def patch_func(replacement, target_mod, func_name): From 33185837dbc1f75f7894b9cbc3e56c1c6a868c4c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 5 Nov 2018 10:26:50 -0500 Subject: [PATCH 7252/8469] Use get_metadata_version in upload_file Previously this value was hard-coded to '1.0', which was inaccurate for many packages. Fixes #1381 --- setuptools/command/upload.py | 2 +- setuptools/tests/test_upload.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index dae7d74dfb..01fa026c2e 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -84,7 +84,7 @@ def upload_file(self, command, pyversion, filename): 'md5_digest': hashlib.md5(content).hexdigest(), # additional meta-data - 'metadata_version': '1.0', + 'metadata_version': str(meta.get_metadata_version()), 'summary': meta.get_description(), 'home_page': meta.get_url(), 'author': meta.get_contact(), diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 5b8e267c76..b18f83c8d0 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -33,7 +33,6 @@ def _parse_upload_body(body): class TestUploadTest: - @pytest.mark.xfail(reason='Issue #1381') @mock.patch('setuptools.command.upload.urlopen') def test_upload_metadata(self, patch, tmpdir): dist = Distribution() From 54466884a9458bc77ecfe3a30ac0f1b21126006b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 5 Nov 2018 10:35:45 -0500 Subject: [PATCH 7253/8469] Add changelog for PR #1576 --- changelog.d/1576.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1576.change.rst diff --git a/changelog.d/1576.change.rst b/changelog.d/1576.change.rst new file mode 100644 index 0000000000..85c578ed4f --- /dev/null +++ b/changelog.d/1576.change.rst @@ -0,0 +1 @@ +Started monkey-patching ``get_metadata_version`` and ``read_pkg_file`` onto ``distutils.DistributionMetadata`` to retain the correct version on the ``PKG-INFO`` file in the (deprecated) ``upload`` command. From 9ffb099b1154662bf1fa8da2a9e0cbef22a2a809 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 6 Nov 2018 09:10:00 -0500 Subject: [PATCH 7254/8469] Add test for read_pkg_file --- setuptools/tests/test_dist.py | 96 +++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 223ad90c95..36605ceabd 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -59,6 +59,102 @@ def sdist_with_index(distname, version): def test_dist__get_unpatched_deprecated(): pytest.warns(DistDeprecationWarning, _get_unpatched, [""]) + +def __read_test_cases(): + # Metadata version 1.0 + base_attrs = { + "name": "package", + "version": "0.0.1", + "author": "Foo Bar", + "author_email": "foo@bar.net", + "long_description": "Long\ndescription", + "description": "Short description", + "keywords": ["one", "two"] + } + + def merge_dicts(d1, d2): + d1 = d1.copy() + d1.update(d2) + + return d1 + + test_cases = [ + ('Metadata version 1.0', base_attrs.copy()), + ('Metadata version 1.1: Provides', merge_dicts(base_attrs, { + 'provides': ['package'] + })), + ('Metadata version 1.1: Obsoletes', merge_dicts(base_attrs, { + 'obsoletes': ['foo'] + })), + ('Metadata version 1.1: Classifiers', merge_dicts(base_attrs, { + 'classifiers': [ + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License' + ]})), + ('Metadata version 1.1: Download URL', merge_dicts(base_attrs, { + 'download_url': 'https://example.com' + })), + ('Metadata Version 1.2: Requires-Python', merge_dicts(base_attrs, { + 'python_requires': '>=3.7' + })), + pytest.param('Metadata Version 1.2: Project-Url', + merge_dicts(base_attrs, { + 'project_urls': { + 'Foo': 'https://example.bar' + } + }), marks=pytest.mark.xfail( + reason="Issue #1578: project_urls not read" + )), + ('Metadata Version 2.1: Long Description Content Type', + merge_dicts(base_attrs, { + 'long_description_content_type': 'text/x-rst; charset=UTF-8' + })), + pytest.param('Metadata Version 2.1: Provides Extra', + merge_dicts(base_attrs, { + 'provides_extras': ['foo', 'bar'] + }), marks=pytest.mark.xfail(reason="provides_extras not read")), + ] + + return test_cases + + +@pytest.mark.parametrize('name,attrs', __read_test_cases()) +def test_read_metadata(name, attrs, tmpdir): + dist = Distribution(attrs) + metadata_out = dist.metadata + dist_class = metadata_out.__class__ + + # Write to PKG_INFO and then load into a new metadata object + fn = tmpdir.mkdir('pkg_info') + fn_s = str(fn) + + metadata_out.write_pkg_info(fn_s) + + metadata_in = dist_class() + with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: + metadata_in.read_pkg_file(f) + + tested_attrs = [ + ('name', dist_class.get_name), + ('version', dist_class.get_version), + ('metadata_version', dist_class.get_metadata_version), + ('provides', dist_class.get_provides), + ('description', dist_class.get_description), + ('download_url', dist_class.get_download_url), + ('keywords', dist_class.get_keywords), + ('platforms', dist_class.get_platforms), + ('obsoletes', dist_class.get_obsoletes), + ('requires', dist_class.get_requires), + ('classifiers', dist_class.get_classifiers), + ('project_urls', lambda s: getattr(s, 'project_urls', {})), + ('provides_extras', lambda s: getattr(s, 'provides_extras', set())), + ] + + for attr, getter in tested_attrs: + assert getter(metadata_in) == getter(metadata_out) + + def __maintainer_test_cases(): attrs = {"name": "package", "version": "1.0", From c34962d08168e0149a71485f1f71ddfd22146140 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 6 Nov 2018 11:48:47 -0500 Subject: [PATCH 7255/8469] Use write_field in write_pkg_file This creates a wrapper function for writing fields in the PKG-INFO file, both to simplify the syntax and to add a point where we can inject an encoding function in order to support Python 2.7 compatibility. --- setuptools/dist.py | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ae9816fd47..b741c64880 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -123,15 +123,23 @@ def write_pkg_file(self, file): """ version = self.get_metadata_version() - file.write('Metadata-Version: %s\n' % version) - file.write('Name: %s\n' % self.get_name()) - file.write('Version: %s\n' % self.get_version()) - file.write('Summary: %s\n' % self.get_description()) - file.write('Home-page: %s\n' % self.get_url()) + if six.PY2: + def write_field(key, value): + file.write("%s: %s\n" % (key, self._encode_field(value))) + else: + def write_field(key, value): + file.write("%s: %s\n" % (key, value)) + + + write_field('Metadata-Version', str(version)) + write_field('Name', self.get_name()) + write_field('Version', self.get_version()) + write_field('Summary', self.get_description()) + write_field('Home-page', self.get_url()) if version < StrictVersion('1.2'): - file.write('Author: %s\n' % self.get_contact()) - file.write('Author-email: %s\n' % self.get_contact_email()) + write_field('Author:', self.get_contact()) + write_field('Author-email:', self.get_contact_email()) else: optional_fields = ( ('Author', 'author'), @@ -142,28 +150,26 @@ def write_pkg_file(self, file): for field, attr in optional_fields: attr_val = getattr(self, attr) - if six.PY2: - attr_val = self._encode_field(attr_val) if attr_val is not None: - file.write('%s: %s\n' % (field, attr_val)) + write_field(field, attr_val) - file.write('License: %s\n' % self.get_license()) + write_field('License', self.get_license()) if self.download_url: - file.write('Download-URL: %s\n' % self.download_url) + write_field('Download-URL', self.download_url) for project_url in self.project_urls.items(): - file.write('Project-URL: %s, %s\n' % project_url) + write_field('Project-URL', '%s, %s' % project_url) long_desc = rfc822_escape(self.get_long_description()) - file.write('Description: %s\n' % long_desc) + write_field('Description', long_desc) keywords = ','.join(self.get_keywords()) if keywords: - file.write('Keywords: %s\n' % keywords) + write_field('Keywords', keywords) if version >= StrictVersion('1.2'): for platform in self.get_platforms(): - file.write('Platform: %s\n' % platform) + write_field('Platform', platform) else: self._write_list(file, 'Platform', self.get_platforms()) @@ -176,17 +182,17 @@ def write_pkg_file(self, file): # Setuptools specific for PEP 345 if hasattr(self, 'python_requires'): - file.write('Requires-Python: %s\n' % self.python_requires) + write_field('Requires-Python', self.python_requires) # PEP 566 if self.long_description_content_type: - file.write( - 'Description-Content-Type: %s\n' % + write_field( + 'Description-Content-Type', self.long_description_content_type ) if self.provides_extras: for extra in self.provides_extras: - file.write('Provides-Extra: %s\n' % extra) + write_field('Provides-Extra', extra) sequence = tuple, list From bef22678626f4e201ef1bb6c5bc753dd01e6bf5a Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 6 Nov 2018 11:51:42 -0500 Subject: [PATCH 7256/8469] Use an in-memory IO object instead of a temp file Rather than writing to a file in a temporary directory, we can write to and read from an in-memory buffer, now that the encoding functionality in write_pkg_file is fixed. --- setuptools/tests/test_dist.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 36605ceabd..a7f4452b1a 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -12,6 +12,7 @@ from .test_easy_install import make_nspkg_sdist import pytest +import six def test_dist_fetch_build_egg(tmpdir): @@ -120,20 +121,22 @@ def merge_dicts(d1, d2): @pytest.mark.parametrize('name,attrs', __read_test_cases()) -def test_read_metadata(name, attrs, tmpdir): +def test_read_metadata(name, attrs): dist = Distribution(attrs) metadata_out = dist.metadata dist_class = metadata_out.__class__ # Write to PKG_INFO and then load into a new metadata object - fn = tmpdir.mkdir('pkg_info') - fn_s = str(fn) + if six.PY2: + PKG_INFO = io.BytesIO() + else: + PKG_INFO = io.StringIO() - metadata_out.write_pkg_info(fn_s) + metadata_out.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) metadata_in = dist_class() - with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f: - metadata_in.read_pkg_file(f) + metadata_in.read_pkg_file(PKG_INFO) tested_attrs = [ ('name', dist_class.get_name), From dfe1b3afb433c7e1d0679c005407ac12104e6141 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 17:15:22 -0500 Subject: [PATCH 7257/8469] Add upload fixture This is a fixture to create an upload command with a patched version of urlopen so that no HTTP queries are sent. --- setuptools/tests/test_upload.py | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index b18f83c8d0..1b70301b5a 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -32,6 +32,51 @@ def _parse_upload_body(body): return entries +@pytest.fixture +def patched_upload(tmpdir): + class Fix: + def __init__(self, cmd, urlopen): + self.cmd = cmd + self.urlopen = urlopen + + def __iter__(self): + return iter((self.cmd, self.urlopen)) + + def get_uploaded_metadata(self): + request = self.urlopen.call_args_list[0][0][0] + body = request.data.decode('utf-8') + entries = dict(_parse_upload_body(body)) + + return entries + + class ResponseMock(mock.Mock): + def getheader(self, name, default=None): + """Mocked getheader method for response object""" + return { + 'content-type': 'text/plain; charset=utf-8', + }.get(name.lower(), default) + + with mock.patch('setuptools.command.upload.urlopen') as urlopen: + urlopen.return_value = ResponseMock() + urlopen.return_value.getcode.return_value = 200 + urlopen.return_value.read.return_value = b'' + + content = os.path.join(str(tmpdir), "content_data") + + with open(content, 'w') as f: + f.write("Some content") + + dist = Distribution() + dist.dist_files = [('sdist', '3.7.0', content)] + + cmd = upload(dist) + cmd.announce = mock.Mock() + cmd.username = 'user' + cmd.password = 'hunter2' + + yield Fix(cmd, urlopen) + + class TestUploadTest: @mock.patch('setuptools.command.upload.urlopen') def test_upload_metadata(self, patch, tmpdir): From f4458afd8c83a233ae637af1d77e77404d2da1e5 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 17:21:05 -0500 Subject: [PATCH 7258/8469] Use the patched_upload fixture in upload_metadata `test_upload_metadata` was written before the fixture, so this updates the test to use the fixture. --- setuptools/tests/test_upload.py | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 1b70301b5a..caabb8866c 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -78,25 +78,13 @@ def getheader(self, name, default=None): class TestUploadTest: - @mock.patch('setuptools.command.upload.urlopen') - def test_upload_metadata(self, patch, tmpdir): - dist = Distribution() - dist.metadata.metadata_version = StrictVersion('2.1') - - content = os.path.join(str(tmpdir), "test_upload_metadata_content") - - with open(content, 'w') as f: - f.write("Some content") - - dist.dist_files = [('xxx', '3.7', content)] + def test_upload_metadata(self, patched_upload): + cmd, patch = patched_upload - patch.return_value = mock.Mock() - patch.return_value.getcode.return_value = 200 + # Set the metadata version to 2.1 + cmd.distribution.metadata.metadata_version = '2.1' - cmd = upload(dist) - cmd.announce = mock.Mock() - cmd.username = 'user' - cmd.password = 'hunter2' + # Run the command cmd.ensure_finalized() cmd.run() @@ -104,10 +92,7 @@ def test_upload_metadata(self, patch, tmpdir): patch.assert_called_once() # Make sure the metadata version is correct in the headers - request = patch.call_args_list[0][0][0] - body = request.data.decode('utf-8') - - entries = dict(_parse_upload_body(body)) + entries = patched_upload.get_uploaded_metadata() assert entries['metadata_version'] == '2.1' From 7417740076af72f49705088009d0b21afea7dd98 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 11:43:21 -0500 Subject: [PATCH 7259/8469] Add test for invalid URLs in upload_file --- setuptools/tests/test_upload.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index caabb8866c..6f497f086c 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -95,7 +95,6 @@ def test_upload_metadata(self, patched_upload): entries = patched_upload.get_uploaded_metadata() assert entries['metadata_version'] == '2.1' - def test_warns_deprecation(self): dist = Distribution() dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] @@ -129,3 +128,21 @@ def test_warns_deprecation_when_raising(self): "upload instead (https://pypi.org/p/twine/)", log.WARN ) + + @pytest.mark.parametrize('url', [ + 'https://example.com/a;parameter', # Has parameters + 'https://example.com/a?query', # Has query + 'https://example.com/a#fragment', # Has fragment + 'ftp://example.com', # Invalid scheme + + ]) + def test_upload_file_invalid_url(self, url, patched_upload): + patched_upload.urlopen.side_effect = Exception("Should not be reached") + + cmd = patched_upload.cmd + cmd.repository = url + + cmd.ensure_finalized() + with pytest.raises(AssertionError): + cmd.run() + From 77b661a9599225721ac416cc342d56d1afb105a1 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 15:43:08 -0500 Subject: [PATCH 7260/8469] Add test for HTTPError in upload_file --- setuptools/tests/test_upload.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 6f497f086c..129159a7b8 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -3,6 +3,7 @@ import re from distutils import log +from distutils.errors import DistutilsError from distutils.version import StrictVersion import pytest @@ -146,3 +147,22 @@ def test_upload_file_invalid_url(self, url, patched_upload): with pytest.raises(AssertionError): cmd.run() + def test_upload_file_http_error(self, patched_upload): + patched_upload.urlopen.side_effect = six.moves.urllib.error.HTTPError( + 'https://example.com', + 404, + 'File not found', + None, + None + ) + + cmd = patched_upload.cmd + cmd.ensure_finalized() + + with pytest.raises(DistutilsError): + cmd.run() + + cmd.announce.assert_any_call( + 'Upload failed (404): File not found', + log.ERROR) + From 1bca7ffdea25ee7ae7d335d676b0804a2f467d52 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 16:22:41 -0500 Subject: [PATCH 7261/8469] Add test for OSError in upload_file --- setuptools/tests/test_upload.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 129159a7b8..6aaac0753b 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -166,3 +166,13 @@ def test_upload_file_http_error(self, patched_upload): 'Upload failed (404): File not found', log.ERROR) + def test_upload_file_os_error(self, patched_upload): + patched_upload.urlopen.side_effect = OSError("Invalid") + + cmd = patched_upload.cmd + cmd.ensure_finalized() + + with pytest.raises(OSError): + cmd.run() + + cmd.announce.assert_any_call('Invalid', log.ERROR) From b5c9c5f42db36a07dc27d39c1be2a311cc567d99 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 16:23:13 -0500 Subject: [PATCH 7262/8469] Fix gpg signature code in upload_file This fixes an issue where `distutils.spawn.spawn` was not available in the ported upload_file, which is only used when signing the data. This also adds a test that the gpg signature command is invoked and included in the uploaded data. --- setuptools/command/upload.py | 1 + setuptools/tests/test_upload.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 01fa026c2e..1851ed28b3 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -7,6 +7,7 @@ from distutils import log from distutils.command import upload as orig +from distutils.spawn import spawn from distutils.errors import DistutilsError diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 6aaac0753b..3a1bbba9b6 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -176,3 +176,29 @@ def test_upload_file_os_error(self, patched_upload): cmd.run() cmd.announce.assert_any_call('Invalid', log.ERROR) + + @mock.patch('setuptools.command.upload.spawn') + def test_upload_file_gpg(self, spawn, patched_upload): + cmd, urlopen = patched_upload + + cmd.sign = True + cmd.identity = "Alice" + cmd.dry_run = True + content_fname = cmd.distribution.dist_files[0][2] + signed_file = content_fname + '.asc' + + with open(signed_file, 'wb') as f: + f.write("signed-data".encode('utf-8')) + + cmd.ensure_finalized() + cmd.run() + + # Make sure that GPG was called + spawn.assert_called_once_with([ + "gpg", "--detach-sign", "--local-user", "Alice", "-a", + content_fname + ], dry_run=True) + + # Read the 'signed' data that was transmitted + entries = patched_upload.get_uploaded_metadata() + assert entries['gpg_signature'] == 'signed-data' From 727dd60f6a11f38d165250c543ba135687fa2e61 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 16:41:19 -0500 Subject: [PATCH 7263/8469] Fix bdist_rpm and bdist_dumb in upload_file This fixes uploads when bdist_rpm or bdist_dumb are the command, both of which insert a comment about what platform they are built for. --- setuptools/command/upload.py | 1 + setuptools/tests/test_upload.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 1851ed28b3..99d86011b7 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -2,6 +2,7 @@ import os import hashlib import getpass +import platform from base64 import standard_b64encode diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 3a1bbba9b6..7bf8e31268 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -202,3 +202,24 @@ def test_upload_file_gpg(self, spawn, patched_upload): # Read the 'signed' data that was transmitted entries = patched_upload.get_uploaded_metadata() assert entries['gpg_signature'] == 'signed-data' + + @pytest.mark.parametrize('bdist', ['bdist_rpm', 'bdist_dumb']) + @mock.patch('setuptools.command.upload.platform') + def test_bdist_rpm_upload(self, platform, bdist, patched_upload): + # Set the upload command to include bdist_rpm + cmd = patched_upload.cmd + dist_files = cmd.distribution.dist_files + dist_files = [(bdist,) + dist_files[0][1:]] + cmd.distribution.dist_files = dist_files + + # Mock out the platform commands to make this platform-independent + platform.dist.return_value = ('redhat', '', '') + + cmd.ensure_finalized() + cmd.run() + + entries = patched_upload.get_uploaded_metadata() + + assert entries['comment'].startswith(u'built for') + assert len(entries['comment']) > len(u'built for') + From fe2c9e4292699635c91174bc049aefe81bf6116c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 7 Nov 2018 17:07:58 -0500 Subject: [PATCH 7264/8469] Fix show_response behavior on Python 2 The `upload.show_response` feature was not added until Python 3. Rather than backport it, it is now enabled only if supported. This also adds a "smoke test" for the feature. --- setuptools/command/upload.py | 8 +++++--- setuptools/tests/test_upload.py | 9 +++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 99d86011b7..f57fe796be 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -172,9 +172,11 @@ def upload_file(self, command, pyversion, filename): self.announce('Server response (%s): %s' % (status, reason), log.INFO) if self.show_response: - text = self._read_pypi_response(result) - msg = '\n'.join(('-' * 75, text, '-' * 75)) - self.announce(msg, log.INFO) + text = getattr(self, '_read_pypi_response', + lambda x: None)(result) + if text is not None: + msg = '\n'.join(('-' * 75, text, '-' * 75)) + self.announce(msg, log.INFO) else: msg = 'Upload failed (%s): %s' % (status, reason) self.announce(msg, log.ERROR) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 7bf8e31268..319ed7a220 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -223,3 +223,12 @@ def test_bdist_rpm_upload(self, platform, bdist, patched_upload): assert entries['comment'].startswith(u'built for') assert len(entries['comment']) > len(u'built for') + def test_show_response_no_error(self, patched_upload): + # This test is just that show_response doesn't throw an error + # It is not really important what the printed response looks like + # in a deprecated command, but we don't want to introduce new + # errors when importing this function from distutils + + patched_upload.cmd.show_response = True + patched_upload.cmd.ensure_finalized() + patched_upload.cmd.run() From 08cac8609e2340ea09057640cd1d728f79488b99 Mon Sep 17 00:00:00 2001 From: Alex Hirzel Date: Fri, 9 Nov 2018 21:04:00 -0500 Subject: [PATCH 7265/8469] updated per comments from @pganssle in #1563 --- pkg_resources/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index e6487be0a8..deea96b9ba 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2098,16 +2098,19 @@ def _handle_ns(packageName, path_item): if importer is None: return None - # capture warnings due to #1111 - with warnings.catch_warnings(): - warnings.simplefilter("ignore") + # use find_spec (PEP 451) and fall-back to find_module (PEP 302) + try: + loader = importer.find_spec(packageName).loader + except AttributeError: try: - loader = importer.find_module(packageName) + # capture warnings due to #1111 + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + loader = importer.find_module(packageName) except AttributeError: - try: - loader = importer.find_spec(packageName).loader - except: - loader = None + # not a system module + loader = None + if loader is None: return None module = sys.modules.get(packageName) From 1047052e341d69c799e26ff889359e101c5e0499 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sat, 10 Nov 2018 19:55:12 +0000 Subject: [PATCH 7266/8469] Address review comments --- setuptools/command/sdist.py | 12 ++++++------ setuptools/tests/test_egg_info.py | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 347f88170f..dc25398147 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -6,7 +6,6 @@ import contextlib from setuptools.extern import six -from setuptools.extern.six.moves import configparser from .py36compat import sdist_add_defaults @@ -206,11 +205,12 @@ def check_license(self): """ opts = self.distribution.get_option_dict('metadata') - try: - # ignore the source of the value - _, license_file = opts.get('license_file') - except TypeError: - log.debug("'license_file' attribute is not defined") + + # ignore the source of the value + _, license_file = opts.get('license_file', (None, None)) + + if license_file is None: + log.debug("'license_file' option was not specified") return if not os.path.exists(license_file): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 76c31adadf..04a17308c8 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -529,8 +529,10 @@ def test_setup_cfg_license_file( env=environ, ) egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: sources_text = sources_file.read() + if license_in_sources: assert 'LICENSE' in sources_text else: From 28872fc9e7d15a1acf3bc557795c76c5e64dbad3 Mon Sep 17 00:00:00 2001 From: Deniz Taneli <7292227+dtaneli@users.noreply.github.com> Date: Sat, 10 Nov 2018 20:00:45 +0000 Subject: [PATCH 7267/8469] Remove unnecessary parameters from the test --- setuptools/tests/test_egg_info.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 04a17308c8..7c862e6120 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -519,14 +519,10 @@ def test_setup_cfg_license_file( self, tmpdir_cwd, env, files, license_in_sources): self._create_project() build_files(files) - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) + environment.run_setup_py( cmd=['egg_info'], - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]) ) egg_info_dir = os.path.join('.', 'foo.egg-info') From 641183c8277136a8d82e0b50b059b4d65bba7f7d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Nov 2018 12:40:03 -0500 Subject: [PATCH 7268/8469] Update roadmap --- docs/roadmap.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index d5a127e890..62689283f0 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -10,3 +10,6 @@ Setuptools has the following large-scale goals on the roadmap: - Deprecate and remove setup_requires and easy_install in favor of PEP 518 build requirements and pip install. - Adopt the Distutils package and stop monkeypatching stdlib. +- Provide essential interfaces for installers such as pip to + support creation of "editable" installs without invoking + easy_install or creating egg-info. From 73fcf86334a7f72e823d7f89672e99486eed28d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Nov 2018 12:43:19 -0500 Subject: [PATCH 7269/8469] Add another roadmap item about pkg_resources. --- docs/roadmap.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 62689283f0..8dc3862ee8 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -13,3 +13,5 @@ Setuptools has the following large-scale goals on the roadmap: - Provide essential interfaces for installers such as pip to support creation of "editable" installs without invoking easy_install or creating egg-info. +- Deprecate pkg_resources in favor of other third-party and + stdlib libraries. From 38f1e490b230da4bff3e2db9857faf7f7223c760 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 11 Nov 2018 13:13:33 -0500 Subject: [PATCH 7270/8469] Replace Roadmap with milestones. --- docs/roadmap.txt | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/roadmap.txt b/docs/roadmap.txt index 8dc3862ee8..147288f303 100644 --- a/docs/roadmap.txt +++ b/docs/roadmap.txt @@ -2,16 +2,6 @@ Roadmap ======= -Setuptools has the following large-scale goals on the roadmap: - -- Mature declarative config to supersede imperative config in - all supported use-cases and harmonize with pyproject.toml - syntax. -- Deprecate and remove setup_requires and easy_install in - favor of PEP 518 build requirements and pip install. -- Adopt the Distutils package and stop monkeypatching stdlib. -- Provide essential interfaces for installers such as pip to - support creation of "editable" installs without invoking - easy_install or creating egg-info. -- Deprecate pkg_resources in favor of other third-party and - stdlib libraries. +Setuptools maintains a series of `milestones +`_ to track +a roadmap of large-scale goals. From 2b5b91332a01c665cab77ad7962e87525850d7f5 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 10:08:55 -0500 Subject: [PATCH 7271/8469] Remove bdist_rpm and bdist_dumb comment This comment is not used anywhere and `platform.dist()` is deprecated. See CPython PR #10414: https://github.com/python/cpython/pull/10414 and bpo-35186: https://bugs.python.org/issue35186 --- setuptools/command/upload.py | 10 ++-------- setuptools/tests/test_upload.py | 20 -------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index f57fe796be..3b8cab5e06 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -102,14 +102,8 @@ def upload_file(self, command, pyversion, filename): 'requires': meta.get_requires(), 'obsoletes': meta.get_obsoletes(), } - comment = '' - if command == 'bdist_rpm': - dist, version, id = platform.dist() - if dist: - comment = 'built for %s %s' % (dist, version) - elif command == 'bdist_dumb': - comment = 'built for %s' % platform.platform(terse=1) - data['comment'] = comment + + data['comment'] = '' if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 319ed7a220..9229bba172 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -203,26 +203,6 @@ def test_upload_file_gpg(self, spawn, patched_upload): entries = patched_upload.get_uploaded_metadata() assert entries['gpg_signature'] == 'signed-data' - @pytest.mark.parametrize('bdist', ['bdist_rpm', 'bdist_dumb']) - @mock.patch('setuptools.command.upload.platform') - def test_bdist_rpm_upload(self, platform, bdist, patched_upload): - # Set the upload command to include bdist_rpm - cmd = patched_upload.cmd - dist_files = cmd.distribution.dist_files - dist_files = [(bdist,) + dist_files[0][1:]] - cmd.distribution.dist_files = dist_files - - # Mock out the platform commands to make this platform-independent - platform.dist.return_value = ('redhat', '', '') - - cmd.ensure_finalized() - cmd.run() - - entries = patched_upload.get_uploaded_metadata() - - assert entries['comment'].startswith(u'built for') - assert len(entries['comment']) > len(u'built for') - def test_show_response_no_error(self, patched_upload): # This test is just that show_response doesn't throw an error # It is not really important what the printed response looks like From 6f50e58948b50edf7d02d4effa44a47fefc9f6b9 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 12:04:48 -0500 Subject: [PATCH 7272/8469] Fix minimum version for data_files --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 0edd68fabd..bca211bdc3 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2416,7 +2416,7 @@ package_data section exclude_package_data section namespace_packages list-comma py_modules list-comma -data_files dict 40.5.0 +data_files dict 40.6.0 ======================= =================================== =============== ===== .. note:: From daa5968f43163651011604a793615d850aafb2eb Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 12:32:24 -0500 Subject: [PATCH 7273/8469] Prepare changelog entry for version 40.6.0 --- CHANGES.rst | 20 ++++++++++++++++++++ changelog.d/1395.doc.rst | 1 - changelog.d/1456.doc.rst | 1 - changelog.d/1519.change.rst | 1 - changelog.d/1531.misc.rst | 1 - changelog.d/1533.misc.rst | 1 - changelog.d/1537.doc.rst | 1 - changelog.d/1539.doc.rst | 1 - changelog.d/1541.deprecation.rst | 1 - changelog.d/1545.feature.rst | 1 - changelog.d/1552.doc.rst | 1 - changelog.d/1553.doc.rst | 1 - changelog.d/1554.change.rst | 1 - changelog.d/1560.doc.rst | 1 - changelog.d/1564.doc.rst | 1 - changelog.d/1572.misc.rst | 1 - changelog.d/1576.change.rst | 1 - 17 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 changelog.d/1395.doc.rst delete mode 100644 changelog.d/1456.doc.rst delete mode 100644 changelog.d/1519.change.rst delete mode 100644 changelog.d/1531.misc.rst delete mode 100644 changelog.d/1533.misc.rst delete mode 100644 changelog.d/1537.doc.rst delete mode 100644 changelog.d/1539.doc.rst delete mode 100644 changelog.d/1541.deprecation.rst delete mode 100644 changelog.d/1545.feature.rst delete mode 100644 changelog.d/1552.doc.rst delete mode 100644 changelog.d/1553.doc.rst delete mode 100644 changelog.d/1554.change.rst delete mode 100644 changelog.d/1560.doc.rst delete mode 100644 changelog.d/1564.doc.rst delete mode 100644 changelog.d/1572.misc.rst delete mode 100644 changelog.d/1576.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index ca07119d95..3929703679 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,23 @@ +v40.6.0 +------- + +* #1541: Officially deprecated the ``requires`` parameter in ``setup()``. +* #1519: In ``pkg_resources.normalize_path``, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. +* #1545: Changed the warning class of all deprecation warnings; deprecation warning classes are no longer derived from ``DeprecationWarning`` and are thus visible by default. +* #1554: ``build_meta.build_sdist`` now includes ``setup.py`` in source distributions by default. +* #1576: Started monkey-patching ``get_metadata_version`` and ``read_pkg_file`` onto ``distutils.DistributionMetadata`` to retain the correct version on the ``PKG-INFO`` file in the (deprecated) ``upload`` command. +* #1533: Restricted the ``recursive-include setuptools/_vendor`` to contain only .py and .txt files. +* #1395: Changed Pyrex references to Cython in the documentation. +* #1456: Documented that the ``rpmbuild`` packages is required for the ``bdist_rpm`` command. +* #1537: Documented how to use ``setup.cfg`` for ``src/ layouts`` +* #1539: Added minimum version column in ``setup.cfg`` metadata table. +* #1552: Fixed a minor typo in the python 2/3 compatibility documentation. +* #1553: Updated installation instructions to point to ``pip install`` instead of ``ez_setup.py``. +* #1560: Updated ``setuptools`` distribution documentation to remove some outdated information. +* #1564: Documented ``setup.cfg`` minimum version for version and project_urls. +* #1572: Added the ``concurrent.futures`` backport ``futures`` to the Python 2.7 test suite requirements. + + v40.5.0 ------- diff --git a/changelog.d/1395.doc.rst b/changelog.d/1395.doc.rst deleted file mode 100644 index 346041ce41..0000000000 --- a/changelog.d/1395.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Document building Cython projects instead of Pyrex diff --git a/changelog.d/1456.doc.rst b/changelog.d/1456.doc.rst deleted file mode 100644 index b01d533800..0000000000 --- a/changelog.d/1456.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Documented that the ``rpmbuild`` packages is required for the ``bdist_rpm`` command. diff --git a/changelog.d/1519.change.rst b/changelog.d/1519.change.rst deleted file mode 100644 index a0e8a6f14a..0000000000 --- a/changelog.d/1519.change.rst +++ /dev/null @@ -1 +0,0 @@ -In ``pkg_resources.normalize_path``, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. diff --git a/changelog.d/1531.misc.rst b/changelog.d/1531.misc.rst deleted file mode 100644 index cc51940d2e..0000000000 --- a/changelog.d/1531.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Converted Python version-specific tests to use ``skipif`` instead of ``xfail``, and removed Python 2.6-specific code from the tests. diff --git a/changelog.d/1533.misc.rst b/changelog.d/1533.misc.rst deleted file mode 100644 index 934df49484..0000000000 --- a/changelog.d/1533.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restrict the `recursive-include setuptools/_vendor` to contain only .py and .txt files diff --git a/changelog.d/1537.doc.rst b/changelog.d/1537.doc.rst deleted file mode 100644 index 02d15eae17..0000000000 --- a/changelog.d/1537.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Document how to use setup.cfg for src/ layouts. \ No newline at end of file diff --git a/changelog.d/1539.doc.rst b/changelog.d/1539.doc.rst deleted file mode 100644 index 220f65197d..0000000000 --- a/changelog.d/1539.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added minumum version column in ``setup.cfg`` metadata table. diff --git a/changelog.d/1541.deprecation.rst b/changelog.d/1541.deprecation.rst deleted file mode 100644 index cc07aaa78b..0000000000 --- a/changelog.d/1541.deprecation.rst +++ /dev/null @@ -1 +0,0 @@ -Officially deprecated the ``requires`` parameter in ``setup()``. diff --git a/changelog.d/1545.feature.rst b/changelog.d/1545.feature.rst deleted file mode 100644 index 70591d56d9..0000000000 --- a/changelog.d/1545.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Changed the warning class of all deprecation warnings; deprecation warning classes are no longer derived from ``DeprecationWarning`` and are thus visible by default. diff --git a/changelog.d/1552.doc.rst b/changelog.d/1552.doc.rst deleted file mode 100644 index 43e0e62d10..0000000000 --- a/changelog.d/1552.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a minor typo in the python 2/3 compatibility documentation. diff --git a/changelog.d/1553.doc.rst b/changelog.d/1553.doc.rst deleted file mode 100644 index 2f68b95e3c..0000000000 --- a/changelog.d/1553.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Update installation instructions to point to ``pip install`` instead of ``ez_setup.py``. \ No newline at end of file diff --git a/changelog.d/1554.change.rst b/changelog.d/1554.change.rst deleted file mode 100644 index d55c042ce4..0000000000 --- a/changelog.d/1554.change.rst +++ /dev/null @@ -1 +0,0 @@ -``build_meta.build_sdist`` now includes ``setup.py`` in source distributions by default diff --git a/changelog.d/1560.doc.rst b/changelog.d/1560.doc.rst deleted file mode 100644 index 8288aa4e95..0000000000 --- a/changelog.d/1560.doc.rst +++ /dev/null @@ -1 +0,0 @@ -update ``setuptools`` distribution documentation to mimic packaging.python.org tutorial. \ No newline at end of file diff --git a/changelog.d/1564.doc.rst b/changelog.d/1564.doc.rst deleted file mode 100644 index 37494a2650..0000000000 --- a/changelog.d/1564.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Document setup.cfg minimum version for version and project_urls diff --git a/changelog.d/1572.misc.rst b/changelog.d/1572.misc.rst deleted file mode 100644 index aa3ab7ae9e..0000000000 --- a/changelog.d/1572.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added the ``concurrent.futures`` backport ``futures`` to the Python 2.7 test suite requirements. diff --git a/changelog.d/1576.change.rst b/changelog.d/1576.change.rst deleted file mode 100644 index 85c578ed4f..0000000000 --- a/changelog.d/1576.change.rst +++ /dev/null @@ -1 +0,0 @@ -Started monkey-patching ``get_metadata_version`` and ``read_pkg_file`` onto ``distutils.DistributionMetadata`` to retain the correct version on the ``PKG-INFO`` file in the (deprecated) ``upload`` command. From 283ebe24799a4e2dfbc38085ef6a85e05de1dac0 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 15:09:59 -0500 Subject: [PATCH 7274/8469] =?UTF-8?q?Bump=20version:=2040.5.0=20=E2=86=92?= =?UTF-8?q?=2040.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5f7abd3940..fd7e8cc987 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.5.0 +current_version = 40.6.0 commit = True tag = True diff --git a/setup.py b/setup.py index cdb4ec7999..569730d3cb 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.5.0", + version="40.6.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 4f167f0fe532764fd3b19b0386c621b8f35ebf9e Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 15:57:45 -0500 Subject: [PATCH 7275/8469] Fix Travis test for pyc files in egg-info `!` is a special character in YAML syntax, so this was being interpreted as `grep pyc ...`, not `! grep pyc ...` I've also added the same `pyc` test to the normal tests. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 442e3ec29f..d1febccbdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ jobs: after_success: true before_deploy: - python bootstrap.py - - ! grep pyc setuptools.egg-info/SOURCES.txt + - "! grep pyc setuptools.egg-info/SOURCES.txt" deploy: provider: pypi on: @@ -60,6 +60,7 @@ install: # update egg_info based on setup.py in checkout - python bootstrap.py +- "! grep pyc setuptools.egg-info/SOURCES.txt" script: - | From ac3cee396ff93f66afa86bc6e3aa3da3a2667514 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 22:32:51 -0500 Subject: [PATCH 7276/8469] Fix issue with missing author metadata Prior to this patch, if the author or author_email were omitted from `setup`, a malformed `PKG-INFO` would be created. --- changelog.d/1590.change.rst | 1 + setuptools/dist.py | 4 ++-- setuptools/tests/test_dist.py | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1590.change.rst diff --git a/changelog.d/1590.change.rst b/changelog.d/1590.change.rst new file mode 100644 index 0000000000..6d2a9140fd --- /dev/null +++ b/changelog.d/1590.change.rst @@ -0,0 +1 @@ +Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata. diff --git a/setuptools/dist.py b/setuptools/dist.py index b741c64880..7062ae8d8c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -138,8 +138,8 @@ def write_field(key, value): write_field('Home-page', self.get_url()) if version < StrictVersion('1.2'): - write_field('Author:', self.get_contact()) - write_field('Author-email:', self.get_contact_email()) + write_field('Author', self.get_contact()) + write_field('Author-email', self.get_contact_email()) else: optional_fields = ( ('Author', 'author'), diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index a7f4452b1a..170d27ed08 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -115,6 +115,20 @@ def merge_dicts(d1, d2): merge_dicts(base_attrs, { 'provides_extras': ['foo', 'bar'] }), marks=pytest.mark.xfail(reason="provides_extras not read")), + ('Missing author, missing author e-mail', + {'name': 'foo', 'version': '1.0.0'}), + ('Missing author', + {'name': 'foo', + 'version': '1.0.0', + 'author_email': 'snorri@sturluson.name'}), + ('Missing author e-mail', + {'name': 'foo', + 'version': '1.0.0', + 'author': 'Snorri Sturluson'}), + ('Missing author', + {'name': 'foo', + 'version': '1.0.0', + 'author': 'Snorri Sturluson'}), ] return test_cases @@ -141,6 +155,8 @@ def test_read_metadata(name, attrs): tested_attrs = [ ('name', dist_class.get_name), ('version', dist_class.get_version), + ('author', dist_class.get_contact), + ('author_email', dist_class.get_contact_email), ('metadata_version', dist_class.get_metadata_version), ('provides', dist_class.get_provides), ('description', dist_class.get_description), From 1935a9df8ad4f01520431691a50b365057cbdfb7 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 22:54:31 -0500 Subject: [PATCH 7277/8469] Update changelog for version 40.6.1 --- CHANGES.rst | 6 ++++++ changelog.d/1590.change.rst | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100644 changelog.d/1590.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 3929703679..7a3e8743f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.6.1 +------- + +* #1590: Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata. + + v40.6.0 ------- diff --git a/changelog.d/1590.change.rst b/changelog.d/1590.change.rst deleted file mode 100644 index 6d2a9140fd..0000000000 --- a/changelog.d/1590.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata. From ad80b390b1a01be5db1c97c4b86dce1e90d25f21 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 12 Nov 2018 22:55:06 -0500 Subject: [PATCH 7278/8469] =?UTF-8?q?Bump=20version:=2040.6.0=20=E2=86=92?= =?UTF-8?q?=2040.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index fd7e8cc987..9e12b655d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.6.0 +current_version = 40.6.1 commit = True tag = True diff --git a/setup.py b/setup.py index 569730d3cb..f24b8e746d 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.6.0", + version="40.6.1", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From ba7698287094f7274ae7cbabaf6baedc175ac213 Mon Sep 17 00:00:00 2001 From: Oleg Sharov Date: Tue, 13 Nov 2018 12:52:43 +0400 Subject: [PATCH 7279/8469] import internal version of six --- setuptools/command/upload.py | 6 +++--- setuptools/tests/test_dist.py | 3 +-- setuptools/tests/test_upload.py | 2 +- tests/manual_test.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 3b8cab5e06..dd17f7a925 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -12,9 +12,9 @@ from distutils.errors import DistutilsError -from six.moves.urllib.request import urlopen, Request -from six.moves.urllib.error import HTTPError -from six.moves.urllib.parse import urlparse +from setuptools.extern.six.moves.urllib.request import urlopen, Request +from setuptools.extern.six.moves.urllib.error import HTTPError +from setuptools.extern.six.moves.urllib.parse import urlparse class upload(orig.upload): """ diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 170d27ed08..cf830b437d 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -7,13 +7,12 @@ from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin +from setuptools.extern import six from .textwrap import DALS from .test_easy_install import make_nspkg_sdist import pytest -import six - def test_dist_fetch_build_egg(tmpdir): """ diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 9229bba172..cc0e8a0d94 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -7,10 +7,10 @@ from distutils.version import StrictVersion import pytest -import six from setuptools.command.upload import upload from setuptools.dist import Distribution +from setuptools.extern import six def _parse_upload_body(body): diff --git a/tests/manual_test.py b/tests/manual_test.py index 52295f9a56..99db4b0143 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -8,7 +8,7 @@ from distutils.command.install import INSTALL_SCHEMES from string import Template -from six.moves import urllib +from setuptools.extern.six.moves import urllib def _system_call(*args): From 9f547fe6a30d544f52f8201ba89cff36f79d792d Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 13 Nov 2018 10:33:35 +0100 Subject: [PATCH 7280/8469] add a test to catch unvendored dependencies --- setuptools/tests/test_virtualenv.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index e511c91816..7b5fea1738 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,3 +1,4 @@ +import distutils.command import glob import os import sys @@ -134,3 +135,14 @@ def sdist(distname, version): 'python setup.py test -s test', )).format(tmpdir=tmpdir)) assert tmpdir.join('success').check() + + +def test_no_missing_dependencies(bare_virtualenv): + """ + Quick and dirty test to ensure all external dependencies are vendored. + """ + for command in ('upload',):#sorted(distutils.command.__all__): + bare_virtualenv.run(' && '.join(( + 'cd {source}', + 'python setup.py {command} -h', + )).format(command=command, source=SOURCE_DIR)) From 7d96d92ab588a245abc8e1f0d67f8a42112fb983 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 13 Nov 2018 10:36:20 +0100 Subject: [PATCH 7281/8469] add news entry --- changelog.d/1592.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1592.change.rst diff --git a/changelog.d/1592.change.rst b/changelog.d/1592.change.rst new file mode 100644 index 0000000000..028f31e0f5 --- /dev/null +++ b/changelog.d/1592.change.rst @@ -0,0 +1 @@ +Fix invalid dependency on external six module (instead of vendored version). From b62705a84ab599a2feff059ececd33800f364555 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 13 Nov 2018 10:38:41 +0100 Subject: [PATCH 7282/8469] =?UTF-8?q?Bump=20version:=2040.6.1=20=E2=86=92?= =?UTF-8?q?=2040.6.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1592.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1592.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 7a3e8743f2..dc26cb4d48 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.6.2 +------- + +* #1592: Fix invalid dependency on external six module (instead of vendored version). + + v40.6.1 ------- diff --git a/changelog.d/1592.change.rst b/changelog.d/1592.change.rst deleted file mode 100644 index 028f31e0f5..0000000000 --- a/changelog.d/1592.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix invalid dependency on external six module (instead of vendored version). diff --git a/setup.cfg b/setup.cfg index 9e12b655d5..ace8038854 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.6.1 +current_version = 40.6.2 commit = True tag = True diff --git a/setup.py b/setup.py index f24b8e746d..44b7edf53f 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.6.1", + version="40.6.2", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From ed22402b7b41f608eaacebaae67c805503904f7d Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 14 Nov 2018 18:07:37 +0000 Subject: [PATCH 7283/8469] Backend should not say that setuptools is needed to build --- setuptools/build_meta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 0067a7ac35..463d3757a3 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -112,12 +112,12 @@ def _get_immediate_subdirectories(a_dir): def get_requires_for_build_wheel(config_settings=None): config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings, requirements=['setuptools', 'wheel']) + return _get_build_requires(config_settings, requirements=['wheel']) def get_requires_for_build_sdist(config_settings=None): config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings, requirements=['setuptools']) + return _get_build_requires(config_settings, requirements=[]) def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): From f524f83eac216a046041122793fdd0ba74495cb0 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 14 Nov 2018 18:30:18 +0000 Subject: [PATCH 7284/8469] Fix the tests --- setuptools/tests/test_build_meta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 712e11498e..2a07944696 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -112,13 +112,13 @@ def build_backend(tmpdir, request): def test_get_requires_for_build_wheel(build_backend): actual = build_backend.get_requires_for_build_wheel() - expected = ['six', 'setuptools', 'wheel'] + expected = ['six', 'wheel'] assert sorted(actual) == sorted(expected) def test_get_requires_for_build_sdist(build_backend): actual = build_backend.get_requires_for_build_sdist() - expected = ['six', 'setuptools'] + expected = ['six'] assert sorted(actual) == sorted(expected) From 4de8dc801004440310db8fffa3da0f76b05a2a1e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 3 Dec 2018 18:41:48 -0500 Subject: [PATCH 7285/8469] Add link to Tidelift Professional support in docs --- docs/_templates/indexsidebar.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 80002d0871..b8c6148e1f 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -6,3 +6,10 @@

    Download

    Questions? Suggestions? Contributions?

    Visit the Setuptools project page

    + +

    Professional support

    + +

    +Professionally-supported {{ project }} is available with the +Tidelift Subscription. +

    From 15789c14939f1c441c95963419e1b3f941a2831d Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 5 Dec 2018 21:46:25 +0200 Subject: [PATCH 7286/8469] bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) --- archive_util.py | 8 ++++++++ tests/test_archive_util.py | 13 ++++++------- tests/test_bdist_dumb.py | 2 +- tests/test_sdist.py | 12 ++++++++++-- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/archive_util.py b/archive_util.py index 78ae5757c3..b002dc3b84 100644 --- a/archive_util.py +++ b/archive_util.py @@ -166,7 +166,15 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_STORED) + if base_dir != os.curdir: + path = os.path.normpath(os.path.join(base_dir, '')) + zip.write(path, path) + log.info("adding '%s'", path) for dirpath, dirnames, filenames in os.walk(base_dir): + for name in dirnames: + path = os.path.normpath(os.path.join(dirpath, name, '')) + zip.write(path, path) + log.info("adding '%s'", path) for name in filenames: path = os.path.normpath(os.path.join(dirpath, name)) if os.path.isfile(path): diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index 14ba4ca34b..e9aad0e40f 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -122,12 +122,13 @@ def _tarinfo(self, path): try: names = tar.getnames() names.sort() - return tuple(names) + return names finally: tar.close() - _created_files = ('dist', 'dist/file1', 'dist/file2', - 'dist/sub', 'dist/sub/file3', 'dist/sub2') + _zip_created_files = ['dist/', 'dist/file1', 'dist/file2', + 'dist/sub/', 'dist/sub/file3', 'dist/sub2/'] + _created_files = [p.rstrip('/') for p in _zip_created_files] def _create_files(self): # creating something to tar @@ -244,8 +245,7 @@ def test_make_zipfile(self): tarball = base_name + '.zip' self.assertTrue(os.path.exists(tarball)) with zipfile.ZipFile(tarball) as zf: - self.assertEqual(sorted(zf.namelist()), - ['dist/file1', 'dist/file2', 'dist/sub/file3']) + self.assertEqual(sorted(zf.namelist()), self._zip_created_files) @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile_no_zlib(self): @@ -271,8 +271,7 @@ def fake_zipfile(*a, **kw): [((tarball, "w"), {'compression': zipfile.ZIP_STORED})]) self.assertTrue(os.path.exists(tarball)) with zipfile.ZipFile(tarball) as zf: - self.assertEqual(sorted(zf.namelist()), - ['dist/file1', 'dist/file2', 'dist/sub/file3']) + self.assertEqual(sorted(zf.namelist()), self._zip_created_files) def test_check_archive_formats(self): self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']), diff --git a/tests/test_bdist_dumb.py b/tests/test_bdist_dumb.py index c8ccdc2383..01a233bce3 100644 --- a/tests/test_bdist_dumb.py +++ b/tests/test_bdist_dumb.py @@ -84,7 +84,7 @@ def test_simple_built(self): finally: fp.close() - contents = sorted(os.path.basename(fn) for fn in contents) + contents = sorted(filter(None, map(os.path.basename, contents))) wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] if not sys.dont_write_bytecode: wanted.append('foo.%s.pyc' % sys.implementation.cache_tag) diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 5444b815a8..23db126959 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -128,7 +128,9 @@ def test_prune_file_list(self): zip_file.close() # making sure everything has been pruned correctly - self.assertEqual(len(content), 4) + expected = ['', 'PKG-INFO', 'README', 'setup.py', + 'somecode/', 'somecode/__init__.py'] + self.assertEqual(sorted(content), ['fake-1.0/' + x for x in expected]) @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') @unittest.skipIf(find_executable('tar') is None, @@ -226,7 +228,13 @@ def test_add_defaults(self): zip_file.close() # making sure everything was added - self.assertEqual(len(content), 12) + expected = ['', 'PKG-INFO', 'README', 'buildout.cfg', + 'data/', 'data/data.dt', 'inroot.txt', + 'scripts/', 'scripts/script.py', 'setup.py', + 'some/', 'some/file.txt', 'some/other_file.txt', + 'somecode/', 'somecode/__init__.py', 'somecode/doc.dat', + 'somecode/doc.txt'] + self.assertEqual(sorted(content), ['fake-1.0/' + x for x in expected]) # checking the MANIFEST f = open(join(self.tmp_dir, 'MANIFEST')) From 758eab35155b97c364d8bf40654367fcb8785379 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Dec 2018 14:43:20 -0500 Subject: [PATCH 7287/8469] Add changelog entry. Ref #1594. --- changelog.d/1594.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1594.change.rst diff --git a/changelog.d/1594.change.rst b/changelog.d/1594.change.rst new file mode 100644 index 0000000000..91a0c28c56 --- /dev/null +++ b/changelog.d/1594.change.rst @@ -0,0 +1 @@ +PEP 517 backend no longer declares setuptools as a dependency as it can be assumed. From 1c1c9152abcb8b1b6a13f1cfb4744f8d73016876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Dec 2018 14:45:14 -0500 Subject: [PATCH 7288/8469] =?UTF-8?q?Bump=20version:=2040.6.2=20=E2=86=92?= =?UTF-8?q?=2040.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1594.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1594.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index dc26cb4d48..48a176a815 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.6.3 +------- + +* #1594: PEP 517 backend no longer declares setuptools as a dependency as it can be assumed. + + v40.6.2 ------- diff --git a/changelog.d/1594.change.rst b/changelog.d/1594.change.rst deleted file mode 100644 index 91a0c28c56..0000000000 --- a/changelog.d/1594.change.rst +++ /dev/null @@ -1 +0,0 @@ -PEP 517 backend no longer declares setuptools as a dependency as it can be assumed. diff --git a/setup.cfg b/setup.cfg index ace8038854..57ab623435 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.6.2 +current_version = 40.6.3 commit = True tag = True diff --git a/setup.py b/setup.py index 44b7edf53f..67d5691d3b 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.6.2", + version="40.6.3", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 7843688bc33dd4e13e10130bc49da4c290fe7d7f Mon Sep 17 00:00:00 2001 From: Dmitry Kuznetsov Date: Tue, 11 Dec 2018 20:35:24 -0800 Subject: [PATCH 7289/8469] Don't keep file modes for package data. --- changelog.d/1424.change.rst | 1 + setuptools/command/build_py.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1424.change.rst diff --git a/changelog.d/1424.change.rst b/changelog.d/1424.change.rst new file mode 100644 index 0000000000..361997ddd6 --- /dev/null +++ b/changelog.d/1424.change.rst @@ -0,0 +1 @@ +Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag. \ No newline at end of file diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b0314fd413..6fc0a4e46d 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -120,7 +120,7 @@ def build_package_data(self): target = os.path.join(build_dir, filename) self.mkpath(os.path.dirname(target)) srcfile = os.path.join(src_dir, filename) - outf, copied = self.copy_file(srcfile, target) + outf, copied = self.copy_file(srcfile, target, preserve_mode=False) srcfile = os.path.abspath(srcfile) if (copied and srcfile in self.distribution.convert_2to3_doctests): From 08cdccef121eae198d719d39fbeb43b19180d99a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Dec 2018 15:10:56 -0500 Subject: [PATCH 7290/8469] Call index.download, covering more code. Split test into two. --- setuptools/tests/test_packageindex.py | 53 ++++++++++++++------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 7c2f2c84d6..1f6bc7979a 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -224,40 +224,43 @@ def test_egg_fragment(self): assert dists[0].version == '' assert dists[1].version == vc - - def test_download_git(self): - index = setuptools.package_index.PackageIndex( - hosts=('www.example.com',) - ) - - index._vcs_split_rev_from_url = mock.Mock() - url = 'https://example.com/bar' - rev = '2995' - - index._vcs_split_rev_from_url.return_value = (url, rev) - - filename = "somefile.py" + def test_download_git_with_rev(self, tmpdir): + url = 'git+https://github.example/group/project@master#egg=foo' + index = setuptools.package_index.PackageIndex() with mock.patch("os.system") as os_system_mock: - - result = index._download_git(url, filename) + result = index.download(url, str(tmpdir)) os_system_mock.assert_called() - assert os_system_mock.call_args_list[0][0] \ - == ("git clone --quiet %s %s" % (url, filename), ) - - assert os_system_mock.call_args_list[1][0] \ - == ("(cd %s && git checkout --quiet %s)" % (filename, rev), ) - assert result == filename - - index._vcs_split_rev_from_url.return_value = (url, None) + expected_dir = str(tmpdir / 'project@master') + expected = ( + 'git clone --quiet ' + 'https://github.example/group/project {expected_dir}' + ).format(**locals()) + first_call_args = os_system_mock.call_args_list[0][0] + assert first_call_args == (expected,) + + tmpl = '(cd {expected_dir} && git checkout --quiet master)' + expected = tmpl.format(**locals()) + assert os_system_mock.call_args_list[1][0] == (expected,) + assert result == expected_dir + + def test_download_git_no_rev(self, tmpdir): + url = 'git+https://github.example/group/project#egg=foo' + index = setuptools.package_index.PackageIndex() with mock.patch("os.system") as os_system_mock: + result = index.download(url, str(tmpdir)) - index._download_git(url, filename) + os_system_mock.assert_called() - os_system_mock.assert_called_once_with("git clone --quiet %s %s" % (url, filename)) + expected_dir = str(tmpdir / 'project') + expected = ( + 'git clone --quiet ' + 'https://github.example/group/project {expected_dir}' + ).format(**locals()) + os_system_mock.assert_called_once_with(expected) class TestContentCheckers: From b431aef3a682a5e22d37568446b9cca1b14a2bf5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Dec 2018 15:14:09 -0500 Subject: [PATCH 7291/8469] Update changelog. Ref #1544. --- changelog.d/1544.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1544.change.rst diff --git a/changelog.d/1544.change.rst b/changelog.d/1544.change.rst new file mode 100644 index 0000000000..748b64e1c2 --- /dev/null +++ b/changelog.d/1544.change.rst @@ -0,0 +1 @@ +Added tests for PackageIndex.download (for git URLs). From 3a351aa00e2110c3b3df0302b1ed6bcf66a1f8d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 23 Sep 2018 12:32:40 -0400 Subject: [PATCH 7292/8469] Remove use of splituser in packag_index.py. Fixes #1499. --- setuptools/package_index.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1608b91ace..7e9517cefa 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -850,13 +850,16 @@ def _download_html(self, url, headers, filename): def _download_svn(self, url, filename): warnings.warn("SVN download support is deprecated", UserWarning) + def splituser(host): + user, delim, host = host.rpartition('@') + return user, host url = url.split('#', 1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/', 1) - auth, host = urllib.parse.splituser(netloc) + auth, host = splituser(netloc) if auth: if ':' in auth: user, pw = auth.split(':', 1) @@ -1047,15 +1050,16 @@ def find_credential(self, url): def open_with_auth(url, opener=urllib.request.urlopen): """Open a urllib2 request, handling HTTP authentication""" - scheme, netloc, path, params, query, frag = urllib.parse.urlparse(url) + parsed = urllib.parse.urlparse(url) + scheme, netloc, path, params, query, frag = parsed # Double scheme does not raise on Mac OS X as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. if netloc.endswith(':'): raise http_client.InvalidURL("nonnumeric port: ''") - if scheme in ('http', 'https'): - auth, host = urllib.parse.splituser(netloc) + if scheme in ('http', 'https') and parsed.username: + auth = ':'.join((parsed.username, parsed.password)) else: auth = None @@ -1068,7 +1072,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): if auth: auth = "Basic " + _encode_auth(auth) - parts = scheme, host, path, params, query, frag + parts = scheme, parsed.hostname, path, params, query, frag new_url = urllib.parse.urlunparse(parts) request = urllib.request.Request(new_url) request.add_header("Authorization", auth) @@ -1082,7 +1086,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): # Put authentication info back into request URL if same host, # so that links found on the page will work s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url) - if s2 == scheme and h2 == host: + if s2 == scheme and h2 == parsed.hostname: parts = s2, netloc, path2, param2, query2, frag2 fp.url = urllib.parse.urlunparse(parts) From cafe49ae0c7c4914c469d8bd368185aebc29b4ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Oct 2018 10:55:04 -0400 Subject: [PATCH 7293/8469] Add changelog --- changelog.d/1499.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1499.change.rst diff --git a/changelog.d/1499.change.rst b/changelog.d/1499.change.rst new file mode 100644 index 0000000000..10e4db6824 --- /dev/null +++ b/changelog.d/1499.change.rst @@ -0,0 +1 @@ +``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485. From 42a792c3a4047d79027f7078a72238d5fb60294b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Dec 2018 20:24:46 -0500 Subject: [PATCH 7294/8469] Add test for download_svn, improving coverage on patch --- setuptools/tests/test_packageindex.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 1f6bc7979a..b727668287 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -262,6 +262,22 @@ def test_download_git_no_rev(self, tmpdir): ).format(**locals()) os_system_mock.assert_called_once_with(expected) + def test_download_svn(self, tmpdir): + url = 'svn+https://svn.example/project#egg=foo' + index = setuptools.package_index.PackageIndex() + + with mock.patch("os.system") as os_system_mock: + result = index.download(url, str(tmpdir)) + + os_system_mock.assert_called() + + expected_dir = str(tmpdir / 'project') + expected = ( + 'svn checkout -q ' + 'svn+https://svn.example/project {expected_dir}' + ).format(**locals()) + os_system_mock.assert_called_once_with(expected) + class TestContentCheckers: def test_md5(self): From 95c0e2810d32cfe69d84f5af41f7874fb57facca Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 17 Dec 2018 02:59:02 -0500 Subject: [PATCH 7295/8469] bpo-35186: Remove "built with" comment in setup.py upload (GH-10414) platform.dist() is deprecated and slated for removal in Python 3.8. The upload command itself should also not be used to upload to PyPI, but while it continues to exist it should not use deprecated functions. --- command/upload.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/command/upload.py b/command/upload.py index 32dda359ba..613ea71129 100644 --- a/command/upload.py +++ b/command/upload.py @@ -121,14 +121,8 @@ def upload_file(self, command, pyversion, filename): 'requires': meta.get_requires(), 'obsoletes': meta.get_obsoletes(), } - comment = '' - if command == 'bdist_rpm': - dist, version, id = platform.dist() - if dist: - comment = 'built for %s %s' % (dist, version) - elif command == 'bdist_dumb': - comment = 'built for %s' % platform.platform(terse=1) - data['comment'] = comment + + data['comment'] = '' if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", From f7d1e8f497ec20e55a7757e34d0a6229642ba59a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 18 Dec 2018 16:17:56 +0100 Subject: [PATCH 7296/8469] bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) check_environ() of distutils.utils now catchs KeyError on calling pwd.getpwuid(): don't create the HOME environment variable in this case. --- tests/test_util.py | 34 +++++++++++++++++++++++++--------- util.py | 9 +++++++-- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index e2fc380958..bf0d4333f9 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -4,6 +4,7 @@ import unittest from copy import copy from test.support import run_unittest +from unittest import mock from distutils.errors import DistutilsPlatformError, DistutilsByteCompileError from distutils.util import (get_platform, convert_path, change_root, @@ -234,20 +235,35 @@ def _join(*path): def test_check_environ(self): util._environ_checked = 0 - if 'HOME' in os.environ: - del os.environ['HOME'] + os.environ.pop('HOME', None) - # posix without HOME - if os.name == 'posix': # this test won't run on windows - check_environ() - import pwd - self.assertEqual(os.environ['HOME'], pwd.getpwuid(os.getuid())[5]) - else: - check_environ() + check_environ() self.assertEqual(os.environ['PLAT'], get_platform()) self.assertEqual(util._environ_checked, 1) + @unittest.skipUnless(os.name == 'posix', 'specific to posix') + def test_check_environ_getpwuid(self): + util._environ_checked = 0 + os.environ.pop('HOME', None) + + import pwd + + # only set pw_dir field, other fields are not used + result = pwd.struct_passwd((None, None, None, None, None, + '/home/distutils', None)) + with mock.patch.object(pwd, 'getpwuid', return_value=result): + check_environ() + self.assertEqual(os.environ['HOME'], '/home/distutils') + + util._environ_checked = 0 + os.environ.pop('HOME', None) + + # bpo-10496: Catch pwd.getpwuid() error + with mock.patch.object(pwd, 'getpwuid', side_effect=KeyError): + check_environ() + self.assertNotIn('HOME', os.environ) + def test_split_quoted(self): self.assertEqual(split_quoted('""one"" "two" \'three\' \\four'), ['one', 'two', 'three', 'four']) diff --git a/util.py b/util.py index 83682628ba..30a21e4afa 100644 --- a/util.py +++ b/util.py @@ -157,8 +157,13 @@ def check_environ (): return if os.name == 'posix' and 'HOME' not in os.environ: - import pwd - os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] + try: + import pwd + os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] + except (ImportError, KeyError): + # bpo-10496: if the current user identifier doesn't exist in the + # password database, do nothing + pass if 'PLAT' not in os.environ: os.environ['PLAT'] = get_platform() From 8fa927e2b2fc81adb420285e470439fc3a28fcee Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 20 Dec 2018 19:00:14 +0200 Subject: [PATCH 7297/8469] bpo-22831: Use "with" to avoid possible fd leaks in distutils. (GH-10921) --- archive_util.py | 22 +++++++++++----------- command/bdist_msi.py | 24 ++++++++++++------------ command/config.py | 36 +++++++++++++++++------------------- command/sdist.py | 15 +++++++-------- util.py | 37 ++++++++++++++++++------------------- 5 files changed, 65 insertions(+), 69 deletions(-) diff --git a/archive_util.py b/archive_util.py index b002dc3b84..565a3117b4 100644 --- a/archive_util.py +++ b/archive_util.py @@ -166,21 +166,21 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0): zip = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_STORED) - if base_dir != os.curdir: - path = os.path.normpath(os.path.join(base_dir, '')) - zip.write(path, path) - log.info("adding '%s'", path) - for dirpath, dirnames, filenames in os.walk(base_dir): - for name in dirnames: - path = os.path.normpath(os.path.join(dirpath, name, '')) + with zip: + if base_dir != os.curdir: + path = os.path.normpath(os.path.join(base_dir, '')) zip.write(path, path) log.info("adding '%s'", path) - for name in filenames: - path = os.path.normpath(os.path.join(dirpath, name)) - if os.path.isfile(path): + for dirpath, dirnames, filenames in os.walk(base_dir): + for name in dirnames: + path = os.path.normpath(os.path.join(dirpath, name, '')) zip.write(path, path) log.info("adding '%s'", path) - zip.close() + for name in filenames: + path = os.path.normpath(os.path.join(dirpath, name)) + if os.path.isfile(path): + zip.write(path, path) + log.info("adding '%s'", path) return zip_filename diff --git a/command/bdist_msi.py b/command/bdist_msi.py index 80104c372d..f335a34898 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -390,18 +390,18 @@ def add_scripts(self): # entries for each version as the above code does if self.pre_install_script: scriptfn = os.path.join(self.bdist_dir, "preinstall.bat") - f = open(scriptfn, "w") - # The batch file will be executed with [PYTHON], so that %1 - # is the path to the Python interpreter; %0 will be the path - # of the batch file. - # rem =""" - # %1 %0 - # exit - # """ - # - f.write('rem ="""\n%1 %0\nexit\n"""\n') - f.write(open(self.pre_install_script).read()) - f.close() + with open(scriptfn, "w") as f: + # The batch file will be executed with [PYTHON], so that %1 + # is the path to the Python interpreter; %0 will be the path + # of the batch file. + # rem =""" + # %1 %0 + # exit + # """ + # + f.write('rem ="""\n%1 %0\nexit\n"""\n') + with open(self.pre_install_script) as fin: + f.write(fin.read()) add_data(self.db, "Binary", [("PreInstall", msilib.Binary(scriptfn)) ]) diff --git a/command/config.py b/command/config.py index 4ae153d194..f511b88857 100644 --- a/command/config.py +++ b/command/config.py @@ -106,15 +106,14 @@ def _check_compiler(self): def _gen_temp_sourcefile(self, body, headers, lang): filename = "_configtest" + LANG_EXT[lang] - file = open(filename, "w") - if headers: - for header in headers: - file.write("#include <%s>\n" % header) - file.write("\n") - file.write(body) - if body[-1] != "\n": - file.write("\n") - file.close() + with open(filename, "w") as file: + if headers: + for header in headers: + file.write("#include <%s>\n" % header) + file.write("\n") + file.write(body) + if body[-1] != "\n": + file.write("\n") return filename def _preprocess(self, body, headers, include_dirs, lang): @@ -203,17 +202,16 @@ def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, if isinstance(pattern, str): pattern = re.compile(pattern) - file = open(out) - match = False - while True: - line = file.readline() - if line == '': - break - if pattern.search(line): - match = True - break + with open(out) as file: + match = False + while True: + line = file.readline() + if line == '': + break + if pattern.search(line): + match = True + break - file.close() self._clean() return match diff --git a/command/sdist.py b/command/sdist.py index 52eaa15d47..b4996fcb1d 100644 --- a/command/sdist.py +++ b/command/sdist.py @@ -407,14 +407,13 @@ def read_manifest(self): distribution. """ log.info("reading manifest file '%s'", self.manifest) - manifest = open(self.manifest) - for line in manifest: - # ignore comments and blank lines - line = line.strip() - if line.startswith('#') or not line: - continue - self.filelist.append(line) - manifest.close() + with open(self.manifest) as manifest: + for line in manifest: + # ignore comments and blank lines + line = line.strip() + if line.startswith('#') or not line: + continue + self.filelist.append(line) def make_release_tree(self, base_dir, files): """Create the directory tree that will become the source diff --git a/util.py b/util.py index 30a21e4afa..15cd2ad9a9 100644 --- a/util.py +++ b/util.py @@ -378,35 +378,34 @@ def byte_compile (py_files, else: script = open(script_name, "w") - script.write("""\ + with script: + script.write("""\ from distutils.util import byte_compile files = [ """) - # XXX would be nice to write absolute filenames, just for - # safety's sake (script should be more robust in the face of - # chdir'ing before running it). But this requires abspath'ing - # 'prefix' as well, and that breaks the hack in build_lib's - # 'byte_compile()' method that carefully tacks on a trailing - # slash (os.sep really) to make sure the prefix here is "just - # right". This whole prefix business is rather delicate -- the - # problem is that it's really a directory, but I'm treating it - # as a dumb string, so trailing slashes and so forth matter. - - #py_files = map(os.path.abspath, py_files) - #if prefix: - # prefix = os.path.abspath(prefix) - - script.write(",\n".join(map(repr, py_files)) + "]\n") - script.write(""" + # XXX would be nice to write absolute filenames, just for + # safety's sake (script should be more robust in the face of + # chdir'ing before running it). But this requires abspath'ing + # 'prefix' as well, and that breaks the hack in build_lib's + # 'byte_compile()' method that carefully tacks on a trailing + # slash (os.sep really) to make sure the prefix here is "just + # right". This whole prefix business is rather delicate -- the + # problem is that it's really a directory, but I'm treating it + # as a dumb string, so trailing slashes and so forth matter. + + #py_files = map(os.path.abspath, py_files) + #if prefix: + # prefix = os.path.abspath(prefix) + + script.write(",\n".join(map(repr, py_files)) + "]\n") + script.write(""" byte_compile(files, optimize=%r, force=%r, prefix=%r, base_dir=%r, verbose=%r, dry_run=0, direct=1) """ % (optimize, force, prefix, base_dir, verbose)) - script.close() - cmd = [sys.executable] cmd.extend(subprocess._optim_args_from_interpreter_flags()) cmd.append(script_name) From 3b8307541e6d24c5eeb4e4998cf9ee46b6e6506f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Dec 2018 12:01:01 -0500 Subject: [PATCH 7298/8469] Rely on package names to namespace the package contents. --- setuptools/wheel.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 95a794a853..e11f0a1d91 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -8,10 +8,11 @@ import re import zipfile -from pkg_resources import Distribution, PathMetadata, parse_version +import pkg_resources +import setuptools +from pkg_resources import 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 @@ -79,7 +80,7 @@ def is_compatible(self): return next((True for t in self.tags() if t in supported_tags), False) def egg_name(self): - return Distribution( + return pkg_resources.Distribution( project_name=self.project_name, version=self.version, platform=(None if self.platform == 'any' else get_platform()), ).egg_name() + '.egg' @@ -130,9 +131,9 @@ def get_metadata(name): zf.extractall(destination_eggdir) # Convert metadata. dist_info = os.path.join(destination_eggdir, dist_info) - dist = Distribution.from_location( + dist = pkg_resources.Distribution.from_location( destination_eggdir, dist_info, - metadata=PathMetadata(destination_eggdir, dist_info), + metadata=pkg_resources.PathMetadata(destination_eggdir, dist_info), ) # Note: Evaluate and strip markers now, @@ -155,7 +156,7 @@ def raw_req(req): os.path.join(egg_info, 'METADATA'), os.path.join(egg_info, 'PKG-INFO'), ) - setup_dist = SetuptoolsDistribution( + setup_dist = setuptools.Distribution( attrs=dict( install_requires=install_requires, extras_require=extras_require, From 0902f02d9d68f18e906e727cbafa4a05fe5c9c91 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 24 Dec 2018 13:03:58 -0500 Subject: [PATCH 7299/8469] Access pkg_resources objects through its namespace --- setuptools/command/develop.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index fdc9fc432b..707494eb63 100644 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -7,7 +7,7 @@ from setuptools.extern import six -from pkg_resources import Distribution, PathMetadata, normalize_path +import pkg_resources from setuptools.command.easy_install import easy_install from setuptools import namespaces import setuptools @@ -65,9 +65,9 @@ def finalize_options(self): if self.egg_path is None: self.egg_path = os.path.abspath(ei.egg_base) - target = normalize_path(self.egg_base) - egg_path = normalize_path(os.path.join(self.install_dir, - self.egg_path)) + target = pkg_resources.normalize_path(self.egg_base) + egg_path = pkg_resources.normalize_path( + os.path.join(self.install_dir, self.egg_path)) if egg_path != target: raise DistutilsOptionError( "--egg-path must be a relative path from the install" @@ -75,9 +75,9 @@ def finalize_options(self): ) # Make a distribution for the package's source - self.dist = Distribution( + self.dist = pkg_resources.Distribution( target, - PathMetadata(target, os.path.abspath(ei.egg_info)), + pkg_resources.PathMetadata(target, os.path.abspath(ei.egg_info)), project_name=ei.egg_name ) @@ -97,13 +97,14 @@ def _resolve_setup_path(egg_base, install_dir, egg_path): path_to_setup = egg_base.replace(os.sep, '/').rstrip('/') if path_to_setup != os.curdir: path_to_setup = '../' * (path_to_setup.count('/') + 1) - resolved = normalize_path( + resolved = pkg_resources.normalize_path( os.path.join(install_dir, egg_path, path_to_setup) ) - if resolved != normalize_path(os.curdir): + if resolved != pkg_resources.normalize_path(os.curdir): raise DistutilsOptionError( "Can't get a consistent path to setup script from" - " installation directory", resolved, normalize_path(os.curdir)) + " installation directory", resolved, + pkg_resources.normalize_path(os.curdir)) return path_to_setup def install_for_development(self): @@ -114,7 +115,7 @@ def install_for_development(self): self.reinitialize_command('build_py', inplace=0) self.run_command('build_py') bpy_cmd = self.get_finalized_command("build_py") - build_path = normalize_path(bpy_cmd.build_lib) + build_path = pkg_resources.normalize_path(bpy_cmd.build_lib) # Build extensions self.reinitialize_command('egg_info', egg_base=build_path) @@ -128,7 +129,8 @@ def install_for_development(self): self.egg_path = build_path self.dist.location = build_path # XXX - self.dist._provider = PathMetadata(build_path, ei_cmd.egg_info) + self.dist._provider = pkg_resources.PathMetadata( + build_path, ei_cmd.egg_info) else: # Without 2to3 inplace works fine: self.run_command('egg_info') From 1db80e46af67c5aa0ffebe3fc61dd5e0787a42c5 Mon Sep 17 00:00:00 2001 From: Michael Felt Date: Fri, 28 Dec 2018 15:03:17 +0100 Subject: [PATCH 7300/8469] bpo-11191: skip unsupported test_distutils case for AIX with xlc (GH-8709) Command line options for the xlc compiler behave differently from gcc and clang, so skip this test case for now when xlc is the compiler. Patch by aixtools (Michael Felt) --- command/config.py | 1 - tests/test_config_cmd.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/command/config.py b/command/config.py index f511b88857..aeda408e73 100644 --- a/command/config.py +++ b/command/config.py @@ -328,7 +328,6 @@ def check_header(self, header, include_dirs=None, library_dirs=None, return self.try_cpp(body="/* No body */", headers=[header], include_dirs=include_dirs) - def dump_file(filename, head=None): """Dumps a file content into log.info. diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 6e566e7915..b735fd334d 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -39,11 +39,17 @@ def test_dump_file(self): @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_search_cpp(self): + import shutil cmd = missing_compiler_executable(['preprocessor']) if cmd is not None: self.skipTest('The %r command is not found' % cmd) pkg_dir, dist = self.create_dist() cmd = config(dist) + cmd._check_compiler() + compiler = cmd.compiler + is_xlc = shutil.which(compiler.preprocessor[0]).startswith("/usr/vac") + if is_xlc: + self.skipTest('xlc: The -E option overrides the -P, -o, and -qsyntaxonly options') # simple pattern searches match = cmd.search_cpp(pattern='xxx', body='/* xxx */') From b78994aa19ae0705f60e3b4b1e4087ecbe4ff0f5 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 28 Dec 2018 09:37:55 -0500 Subject: [PATCH 7301/8469] Import distribution in doctest Fixes GH issue #1612, bug introduced in commit 0902f02d9d68f18 --- setuptools/command/develop.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 707494eb63..009e4f9368 100644 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -202,6 +202,7 @@ class VersionlessRequirement: name as the 'requirement' so that scripts will work across multiple versions. + >>> from pkg_resources import Distribution >>> dist = Distribution(project_name='foo', version='1.0') >>> str(dist.as_requirement()) 'foo==1.0' From a0735f223b82695cc45eb127e072496aa1dbe8f0 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 28 Dec 2018 09:52:02 -0500 Subject: [PATCH 7302/8469] Assert that warning is raised with svn downloads This both prevents the warning from surfacing during the tests and ensures that no regressions occur. --- setuptools/tests/test_packageindex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index b727668287..13cffb7ebc 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -7,6 +7,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client import mock +import pytest import pkg_resources import setuptools.package_index @@ -266,8 +267,9 @@ def test_download_svn(self, tmpdir): url = 'svn+https://svn.example/project#egg=foo' index = setuptools.package_index.PackageIndex() - with mock.patch("os.system") as os_system_mock: - result = index.download(url, str(tmpdir)) + with pytest.warns(UserWarning): + with mock.patch("os.system") as os_system_mock: + result = index.download(url, str(tmpdir)) os_system_mock.assert_called() From d5f601406f99690cd6fd4cdbe9d492ae82db6a08 Mon Sep 17 00:00:00 2001 From: Reece D Date: Thu, 27 Dec 2018 11:16:38 -0600 Subject: [PATCH 7303/8469] Use HTTPS in link to RFC #6125 --- setuptools/ssl_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 6362f1f426..226db694bb 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -59,7 +59,7 @@ class CertificateError(ValueError): def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 - http://tools.ietf.org/html/rfc6125#section-6.4.3 + https://tools.ietf.org/html/rfc6125#section-6.4.3 """ pats = [] if not dn: From 8e25ed93913d34687de9a701e112a8ea5804d1cb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 03:57:52 -0500 Subject: [PATCH 7304/8469] Add mergify configuration for automatic merges. Ref #1612. --- .mergify.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000000..7ce5d41430 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,7 @@ +pull_request_rules: +- name: auto-merge + conditions: + - label=auto-merge + actions: + merge: + method: merge From b6b5c710b9f4b1b3aa21256a2065f4e917201b0e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 03:15:02 -0500 Subject: [PATCH 7305/8469] Add declaration indicating the PEP 517 build backend needed for building setuptools. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 07c23bb5f5..4ef804ecdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] requires = ["wheel"] +build-backend = "setuptools.build_meta" [tool.towncrier] package = "setuptools" From 82c1c14ff0e472165dbe7d476f30cef5f55c7b77 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 04:14:32 -0500 Subject: [PATCH 7306/8469] Only auto-merge to master and only when tests pass --- .mergify.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 7ce5d41430..5631e68336 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,7 +1,13 @@ pull_request_rules: - name: auto-merge conditions: + - base=master - label=auto-merge + - status-success=continuous-integration/appveyor/branch + - status-success=continuous-integration/appveyor/pr + - status-success=continuous-integration/travis-ci/pr + - status-success=continuous-integration/travis-ci/push + - status-success=deploy/netlify actions: merge: method: merge From 5e9718d2417b7b75d8f8c8f9705cd0bb877fec57 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 04:21:58 -0500 Subject: [PATCH 7307/8469] Only allow auto-merge PRs submitted by jaraco. --- .mergify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.mergify.yml b/.mergify.yml index 5631e68336..2559a25245 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,6 +8,7 @@ pull_request_rules: - status-success=continuous-integration/travis-ci/pr - status-success=continuous-integration/travis-ci/push - status-success=deploy/netlify + - author=jaraco actions: merge: method: merge From 6689d21735e02a5db52f25f978366cb072091af2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 04:45:12 -0500 Subject: [PATCH 7308/8469] Remove restriction for jaraco - only members with access can create labels, so it's secure enough to restrict based on the label. --- .mergify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 2559a25245..5631e68336 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,7 +8,6 @@ pull_request_rules: - status-success=continuous-integration/travis-ci/pr - status-success=continuous-integration/travis-ci/push - status-success=deploy/netlify - - author=jaraco actions: merge: method: merge From cdd47ac62b837e2a59642e12cfbd53431e77883b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 04:45:42 -0500 Subject: [PATCH 7309/8469] Add documents on auto-merge --- docs/developer-guide.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index c011491a30..39bf4717c0 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -89,6 +89,17 @@ code changes. See the following for an example news fragment: $ cat changelog.d/1288.change.rst Add support for maintainer in PKG-INFO +------------------- +Auto-Merge Requests +------------------- + +To support running all code through CI, even lightweight contributions, +the project employs Mergify to auto-merge pull requests tagged as +auto-merge. + +Use ``hub pull-request -l auto-merge`` to create such a pull request +from the command line after pushing a new branch. + ------- Testing ------- From 8f00d60d623fdc1b8614c5e454edebf8cec504b8 Mon Sep 17 00:00:00 2001 From: rajdeep Date: Sun, 28 Oct 2018 15:38:18 -0400 Subject: [PATCH 7310/8469] Disallow files for license inputs The ability to handle files was originally added and documented based on a misunderstanding of what the `license` field should include. The field should be the name of the license, not the full text. It is likely that anyone actually using this was outputing malformed PKG-INFO files, because most license files contain newlines. See GH issue #1551 --- setup.cfg | 1 - setuptools/config.py | 22 ++++++++++++++++++++-- setuptools/tests/test_egg_info.py | 25 ++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 57ab623435..dd404469fe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,4 +26,3 @@ universal = 1 license_file = LICENSE [bumpversion:file:setup.py] - diff --git a/setuptools/config.py b/setuptools/config.py index d1ac6734dc..3a6da20f34 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -246,6 +246,24 @@ def _parse_bool(cls, value): value = value.lower() return value in ('1', 'true', 'yes') + @classmethod + def _exclude_files_parser(cls, key): + """Returns a parser function to make sure field inputs + are not files. + + Parses a value after getting the key so error messages are + more informative. + + :param key: + :rtype: callable + """ + def parser(value): + exclude_directive = 'file:' + if value.startswith(exclude_directive): + raise ValueError('Only strings are accepted for the {0} field, files are not accepted'.format(key)) + return value + return parser + @classmethod def _parse_file(cls, value): """Represents value as a string, allowing including text @@ -255,7 +273,6 @@ def _parse_file(cls, value): directory with setup.py. Examples: - file: LICENSE file: README.rst, CHANGELOG.md, src/file.txt :param str value: @@ -449,6 +466,7 @@ def parsers(self): parse_list = self._parse_list parse_file = self._parse_file parse_dict = self._parse_dict + exclude_files_parser = self._exclude_files_parser return { 'platforms': parse_list, @@ -460,7 +478,7 @@ def parsers(self): DeprecationWarning), 'obsoletes': parse_list, 'classifiers': self._get_parser_compound(parse_file, parse_list), - 'license': parse_file, + 'license': exclude_files_parser('license'), 'description': parse_file, 'long_description': parse_file, 'version': self._parse_version, diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index f97b3f1d81..e1105044d3 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -148,6 +148,26 @@ def test_expected_files_produced(self, tmpdir_cwd, env): ] assert sorted(actual) == expected + def test_license_is_a_string(self, tmpdir_cwd, env): + setup_config = DALS(""" + [metadata] + name=foo + version=0.0.1 + license=file:MIT + """) + + setup_script = DALS(""" + from setuptools import setup + + setup() + """) + + build_files({'setup.py': setup_script, + 'setup.cfg': setup_config}) + + with pytest.raises(ValueError): + self._run_egg_info_command(tmpdir_cwd, env) + def test_rebuilt(self, tmpdir_cwd, env): """Ensure timestamps are updated when the command is re-run.""" self._create_project() @@ -598,7 +618,10 @@ def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): env=environ, ) if code: - raise AssertionError(data) + if 'ValueError' in data: + raise ValueError(data) + else: + raise AssertionError(data) if output: assert output in data From 2b038993e835d5a0d328910bc855b53a7c21bc6e Mon Sep 17 00:00:00 2001 From: rajdeep Date: Sun, 28 Oct 2018 15:53:47 -0400 Subject: [PATCH 7311/8469] Add changelog file --- changelog.d/1551.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1551.breaking.rst diff --git a/changelog.d/1551.breaking.rst b/changelog.d/1551.breaking.rst new file mode 100644 index 0000000000..c0e477ce81 --- /dev/null +++ b/changelog.d/1551.breaking.rst @@ -0,0 +1 @@ +File inputs for the `license` field in `setup.cfg` files now explicitly raise an error. From 8b8e2c8b3b83151dad1719a8cb676e919766c1c9 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 29 Dec 2018 10:53:13 -0500 Subject: [PATCH 7312/8469] Change how license field ValueError is tested Both the old and new approaches are deeply unsatisfying to me, but without reworking how these test commands are run, I think this is about as close as we can get to enforcing that this specific call raises ValueError. --- setuptools/tests/test_egg_info.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index e1105044d3..979ff18e4e 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -165,9 +165,20 @@ def test_license_is_a_string(self, tmpdir_cwd, env): build_files({'setup.py': setup_script, 'setup.cfg': setup_config}) - with pytest.raises(ValueError): + # This command should fail with a ValueError, but because it's + # currently configured to use a subprocess, the actual traceback + # object is lost and we need to parse it from stderr + with pytest.raises(AssertionError) as exc: self._run_egg_info_command(tmpdir_cwd, env) + # Hopefully this is not too fragile: the only argument to the + # assertion error should be a traceback, ending with: + # ValueError: .... + # + # assert not 1 + tb = exc.value.args[0].split('\n') + assert tb[-3].lstrip().startswith('ValueError') + def test_rebuilt(self, tmpdir_cwd, env): """Ensure timestamps are updated when the command is re-run.""" self._create_project() @@ -617,11 +628,8 @@ def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): data_stream=1, env=environ, ) - if code: - if 'ValueError' in data: - raise ValueError(data) - else: - raise AssertionError(data) + assert not code, data + if output: assert output in data From 4a8dedf068f165f2e44cf3f3fab3e43a102aafe9 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 29 Dec 2018 11:12:41 -0500 Subject: [PATCH 7313/8469] Remove file: from documentation for license field --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index bca211bdc3..f68edf0ccd 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2370,7 +2370,7 @@ author_email author-email str maintainer str maintainer_email maintainer-email str classifiers classifier file:, list-comma -license file:, str +license str description summary file:, str long_description long-description file:, str long_description_content_type str 38.6.0 From 3db95bcc3dcc72dbb47d7dfc987ae646b249addd Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 29 Dec 2018 11:13:43 -0500 Subject: [PATCH 7314/8469] Add explicit test for license in setup.cfg --- setuptools/tests/test_config.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 736c184dca..53b8a956c4 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,10 +1,12 @@ import contextlib import pytest + from distutils.errors import DistutilsOptionError, DistutilsFileError from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration from . import py2_only, py3_only +from .textwrap import DALS class ErrConfigHandler(ConfigHandler): """Erroneous handler. Fails to implement required methods.""" @@ -146,6 +148,24 @@ def test_basic(self, tmpdir): assert metadata.download_url == 'http://test.test.com/test/' assert metadata.maintainer_email == 'test@test.com' + def test_license_cfg(self, tmpdir): + fake_env( + tmpdir, + DALS(""" + [metadata] + name=foo + version=0.0.1 + license=Apache 2.0 + """) + ) + + with get_dist(tmpdir) as dist: + metadata = dist.metadata + + assert metadata.name == "foo" + assert metadata.version == "0.0.1" + assert metadata.license == "Apache 2.0" + def test_file_mixed(self, tmpdir): fake_env( From 9bf0fbe2af7c859aa4ac5bc0be4639c1621570d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 13:42:19 -0500 Subject: [PATCH 7315/8469] Remove unused import --- setuptools/tests/test_upload.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index cc0e8a0d94..320c6959da 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -4,7 +4,6 @@ from distutils import log from distutils.errors import DistutilsError -from distutils.version import StrictVersion import pytest From 0c9624fd5ee5abe3fb0d1e3dfa68a9cbaf261aed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 29 Dec 2018 13:47:21 -0500 Subject: [PATCH 7316/8469] Feed the hobgoblins (delint). --- setuptools/command/upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index dd17f7a925..6db8888bb2 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -2,7 +2,6 @@ import os import hashlib import getpass -import platform from base64 import standard_b64encode @@ -16,6 +15,7 @@ from setuptools.extern.six.moves.urllib.error import HTTPError from setuptools.extern.six.moves.urllib.parse import urlparse + class upload(orig.upload): """ Override default upload behavior to obtain password @@ -80,7 +80,7 @@ def upload_file(self, command, pyversion, filename): 'version': meta.get_version(), # file content - 'content': (os.path.basename(filename),content), + 'content': (os.path.basename(filename), content), 'filetype': command, 'pyversion': pyversion, 'md5_digest': hashlib.md5(content).hexdigest(), From 5f48a74119c6866bcbc4f142318ac392ad2cb03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 29 Dec 2018 21:00:08 +0200 Subject: [PATCH 7317/8469] Spelling fixes --- docs/developer-guide.txt | 2 +- docs/setuptools.txt | 2 +- setuptools/config.py | 2 +- setuptools/pep425tags.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 39bf4717c0..f82df39760 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -67,7 +67,7 @@ All PRs with code changes should include tests. All changes should include a changelog entry. ``setuptools`` uses `towncrier `_ -for changelog managment, so when making a PR, please add a news fragment in the +for changelog management, so when making a PR, please add a news fragment in the ``changelog.d/`` folder. Changelog files are written in Restructured Text and should be a 1 or 2 sentence description of the substantive changes in the PR. They should be named ``..rst``, where the categories are: diff --git a/docs/setuptools.txt b/docs/setuptools.txt index bca211bdc3..81b850c313 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2358,7 +2358,7 @@ Metadata but their use is not advised. ============================== ================= ================= =============== ===== -Key Aliases Type Minumum Version Notes +Key Aliases Type Minimum Version Notes ============================== ================= ================= =============== ===== name str version attr:, file:, str 39.2.0 (1) diff --git a/setuptools/config.py b/setuptools/config.py index d1ac6734dc..9af72f2516 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -394,7 +394,7 @@ def parse(self): section_parser_method = getattr( self, - # Dots in section names are tranlsated into dunderscores. + # Dots in section names are translated into dunderscores. ('parse_section%s' % method_postfix).replace('.', '__'), None) diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py index 8bf4277dbd..48745a2902 100644 --- a/setuptools/pep425tags.py +++ b/setuptools/pep425tags.py @@ -161,7 +161,7 @@ def is_manylinux1_compatible(): def get_darwin_arches(major, minor, machine): """Return a list of supported arches (including group arches) for - the given major, minor and machine architecture of an macOS machine. + the given major, minor and machine architecture of a macOS machine. """ arches = [] From 135a1566832cb75d37a9fbe1fe01005c0e05b4c3 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 1 Jan 2019 12:12:09 -0500 Subject: [PATCH 7318/8469] Tweak "making a pull request" documentation reStructuredText is how the name is commonly stylized (see Wikipedia), also fixed a typo in the "deprecation" description. --- docs/developer-guide.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index f82df39760..a5942c8b0f 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -68,7 +68,7 @@ changelog entry. ``setuptools`` uses `towncrier `_ for changelog management, so when making a PR, please add a news fragment in the -``changelog.d/`` folder. Changelog files are written in Restructured Text and +``changelog.d/`` folder. Changelog files are written in reStructuredText and should be a 1 or 2 sentence description of the substantive changes in the PR. They should be named ``..rst``, where the categories are: @@ -76,7 +76,7 @@ They should be named ``..rst``, where the categories are: - ``breaking``: Any backwards-compatibility breaking change - ``doc``: A change to the documentation - ``misc``: Changes internal to the repo like CI, test and build changes -- ``deprecation``: For deprecations of an existing feature of behavior +- ``deprecation``: For deprecations of an existing feature or behavior A pull request may have more than one of these components, for example a code change may introduce a new feature that deprecates an old feature, in which From b82c731a66415225f111872cc26e7da596189a87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Jan 2019 13:27:41 -0500 Subject: [PATCH 7319/8469] Allow PRs from other forks to auto-merge. --- .mergify.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 5631e68336..7f0df535ff 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -3,10 +3,8 @@ pull_request_rules: conditions: - base=master - label=auto-merge - - status-success=continuous-integration/appveyor/branch - status-success=continuous-integration/appveyor/pr - status-success=continuous-integration/travis-ci/pr - - status-success=continuous-integration/travis-ci/push - status-success=deploy/netlify actions: merge: From 2db2a8f37d64d8abd281660d48009003cc8805ca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:23:14 -0500 Subject: [PATCH 7320/8469] Feed the hobgoblins (delint). --- setuptools/tests/test_build_meta.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 2a07944696..a472d3ebcc 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -172,18 +172,21 @@ def test_build_sdist_version_change(build_backend): sdist_name = build_backend.build_sdist(sdist_into_directory) assert os.path.isfile(os.path.join(sdist_into_directory, sdist_name)) - # if the setup.py changes subsequent call of the build meta should still succeed, given the + # if the setup.py changes subsequent call of the build meta + # should still succeed, given the # sdist_directory the frontend specifies is empty with open(os.path.abspath("setup.py"), 'rt') as file_handler: content = file_handler.read() with open(os.path.abspath("setup.py"), 'wt') as file_handler: - file_handler.write(content.replace("version='0.0.0'", "version='0.0.1'")) + file_handler.write( + content.replace("version='0.0.0'", "version='0.0.1'")) shutil.rmtree(sdist_into_directory) os.makedirs(sdist_into_directory) sdist_name = build_backend.build_sdist("out_sdist") - assert os.path.isfile(os.path.join(os.path.abspath("out_sdist"), sdist_name)) + assert os.path.isfile( + os.path.join(os.path.abspath("out_sdist"), sdist_name)) def test_build_sdist_setup_py_exists(tmpdir_cwd): @@ -214,4 +217,3 @@ def test_build_sdist_setup_py_manifest_excluded(tmpdir_cwd): targz_path = build_sdist("temp") with tarfile.open(os.path.join("temp", targz_path)) as tar: assert not any('setup.py' in name for name in tar.getnames()) - From 38bbfded981e14bacf937a0a9a944b7766c39806 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:27:07 -0500 Subject: [PATCH 7321/8469] Add test capturing failure. Ref #1623. --- setuptools/tests/test_build_meta.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a472d3ebcc..82b44c8944 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -217,3 +217,22 @@ def test_build_sdist_setup_py_manifest_excluded(tmpdir_cwd): targz_path = build_sdist("temp") with tarfile.open(os.path.join("temp", targz_path)) as tar: assert not any('setup.py' in name for name in tar.getnames()) + + +def test_build_sdist_builds_targz_even_if_zip_indicated(tmpdir_cwd): + files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'] + )"""), + 'hello.py': '', + 'setup.cfg': DALS(""" + [sdist] + formats=zip + """) + } + + build_files(files) + build_sdist("temp") From 731df905fb0282c7255e4e0d4acf339a98e3db7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:28:33 -0500 Subject: [PATCH 7322/8469] Always specify formats=gztar, overriding the project's legacy expectation that a zip sdist should be generated. Fixes #1623. --- setuptools/build_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 463d3757a3..75178a7a3c 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -170,7 +170,7 @@ def build_wheel(wheel_directory, config_settings=None, def build_sdist(sdist_directory, config_settings=None): config_settings = _fix_config(config_settings) sdist_directory = os.path.abspath(sdist_directory) - sys.argv = sys.argv[:1] + ['sdist'] + \ + sys.argv = sys.argv[:1] + ['sdist', '--formats', 'gztar'] + \ config_settings["--global-option"] + \ ["--dist-dir", sdist_directory] _run_setup() From d56ed68dcdb321df635a2c3a698c5026b7feadcc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:31:44 -0500 Subject: [PATCH 7323/8469] Add changelog --- changelog.d/1625.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1625.change.rst diff --git a/changelog.d/1625.change.rst b/changelog.d/1625.change.rst new file mode 100644 index 0000000000..9125ac0ced --- /dev/null +++ b/changelog.d/1625.change.rst @@ -0,0 +1 @@ +In PEP 517 build_meta builder, ensure that sdists are built as gztar per the spec. From cc9305b9106eaf409c01e8a399a00137583e2a04 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:37:45 -0500 Subject: [PATCH 7324/8469] Rely on iterable unpacking to extract one element from generator expression. --- setuptools/build_meta.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 463d3757a3..7f2786c4cf 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -160,11 +160,11 @@ def build_wheel(wheel_directory, config_settings=None, shutil.rmtree(wheel_directory) shutil.copytree('dist', wheel_directory) - wheels = [f for f in os.listdir(wheel_directory) - if f.endswith('.whl')] + wheels = (f for f in os.listdir(wheel_directory) + if f.endswith('.whl')) - assert len(wheels) == 1 - return wheels[0] + wheel, = wheels + return wheel def build_sdist(sdist_directory, config_settings=None): @@ -175,8 +175,8 @@ def build_sdist(sdist_directory, config_settings=None): ["--dist-dir", sdist_directory] _run_setup() - sdists = [f for f in os.listdir(sdist_directory) - if f.endswith('.tar.gz')] + sdists = (f for f in os.listdir(sdist_directory) + if f.endswith('.tar.gz')) - assert len(sdists) == 1 - return sdists[0] + sdist, = sdists + return sdist From 7378e6be2f8f8a0d96b748e256dfa6b53821c3f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:39:37 -0500 Subject: [PATCH 7325/8469] Avoid hanging indent --- setuptools/build_meta.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 7f2786c4cf..5a69d284b5 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -160,8 +160,10 @@ def build_wheel(wheel_directory, config_settings=None, shutil.rmtree(wheel_directory) shutil.copytree('dist', wheel_directory) - wheels = (f for f in os.listdir(wheel_directory) - if f.endswith('.whl')) + wheels = ( + f for f in os.listdir(wheel_directory) + if f.endswith('.whl') + ) wheel, = wheels return wheel @@ -175,8 +177,10 @@ def build_sdist(sdist_directory, config_settings=None): ["--dist-dir", sdist_directory] _run_setup() - sdists = (f for f in os.listdir(sdist_directory) - if f.endswith('.tar.gz')) + sdists = ( + f for f in os.listdir(sdist_directory) + if f.endswith('.tar.gz') + ) sdist, = sdists return sdist From 2bb8225a6efa6f429d4522f47308b779a48cd07f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Jan 2019 14:42:23 -0500 Subject: [PATCH 7326/8469] Extract common behavior into a function --- setuptools/build_meta.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 5a69d284b5..02de44279c 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -149,6 +149,15 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): return dist_infos[0] +def _file_with_extension(directory, extension): + matching = ( + f for f in os.listdir(directory) + if f.endswith(extension) + ) + file, = matching + return file + + def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): config_settings = _fix_config(config_settings) @@ -160,13 +169,7 @@ def build_wheel(wheel_directory, config_settings=None, shutil.rmtree(wheel_directory) shutil.copytree('dist', wheel_directory) - wheels = ( - f for f in os.listdir(wheel_directory) - if f.endswith('.whl') - ) - - wheel, = wheels - return wheel + return _file_with_extension(wheel_directory, '.whl') def build_sdist(sdist_directory, config_settings=None): @@ -177,10 +180,4 @@ def build_sdist(sdist_directory, config_settings=None): ["--dist-dir", sdist_directory] _run_setup() - sdists = ( - f for f in os.listdir(sdist_directory) - if f.endswith('.tar.gz') - ) - - sdist, = sdists - return sdist + return _file_with_extension(sdist_directory, '.tar.gz') From c688982505753013fa21a79be4a61ec9a3b8bc3c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Jan 2019 14:41:02 -0500 Subject: [PATCH 7327/8469] Feed the hobgoblins (delint). --- setuptools/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 59bb770864..0f7b5955d3 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -424,8 +424,8 @@ def parse(self): def _deprecated_config_handler(self, func, msg, warning_class): """ this function will wrap around parameters that are deprecated - - :param msg: deprecation message + + :param msg: deprecation message :param warning_class: class of warning exception to be raised :param func: function to be wrapped around """ @@ -433,7 +433,7 @@ def _deprecated_config_handler(self, func, msg, warning_class): def config_handler(*args, **kwargs): warnings.warn(msg, warning_class) return func(*args, **kwargs) - + return config_handler @@ -472,8 +472,9 @@ def parsers(self): 'platforms': parse_list, 'keywords': parse_list, 'provides': parse_list, - 'requires': self._deprecated_config_handler(parse_list, - "The requires parameter is deprecated, please use " + + 'requires': self._deprecated_config_handler( + parse_list, + "The requires parameter is deprecated, please use " "install_requires for runtime dependencies.", DeprecationWarning), 'obsoletes': parse_list, From f8ff0d0d4657d5f6a638fb90f0d518bd2768aa7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Jan 2019 14:42:27 -0500 Subject: [PATCH 7328/8469] Feed the hobgoblins (delint). --- setuptools/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index 0f7b5955d3..b6626043fc 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -260,7 +260,9 @@ def _exclude_files_parser(cls, key): def parser(value): exclude_directive = 'file:' if value.startswith(exclude_directive): - raise ValueError('Only strings are accepted for the {0} field, files are not accepted'.format(key)) + raise ValueError( + 'Only strings are accepted for the {0} field, ' + 'files are not accepted'.format(key)) return value return parser From 18e2218e6220614cd5c9737cac10be598c3bf8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 10 Jan 2019 00:55:03 +0100 Subject: [PATCH 7329/8469] Distutils no longer needs to remain compatible with 2.3 (GH-11423) --- README | 2 -- 1 file changed, 2 deletions(-) diff --git a/README b/README index 408a203b85..23f488506f 100644 --- a/README +++ b/README @@ -8,6 +8,4 @@ The Distutils-SIG web page is also a good starting point: http://www.python.org/sigs/distutils-sig/ -WARNING : Distutils must remain compatible with 2.3 - $Id$ From 0c79e4d09cf429a2aabbcb6d4cf1455ec45a0137 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 11 Jan 2019 15:29:40 +0300 Subject: [PATCH 7330/8469] include pyproject.toml in sdist (#1632) --- setuptools/command/py36compat.py | 2 +- setuptools/tests/test_sdist.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 61063e7542..c256bfb855 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -76,7 +76,7 @@ def _add_defaults_standards(self): self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): - optional = ['test/test*.py', 'setup.cfg'] + optional = ['test/test*.py', 'setup.cfg', 'pyproject.toml'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index d2c4e0cf95..06813a003b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -449,6 +449,20 @@ def test_sdist_with_latin1_encoded_filename(self): except UnicodeDecodeError: filename not in cmd.filelist.files + def test_pyproject_toml_in_sdist(self): + """ + Check if pyproject.toml is included in source distribution if present + """ + open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close() + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + with quiet(): + cmd.run() + manifest = cmd.filelist.files + assert 'pyproject.toml' in manifest + def test_default_revctrl(): """ From bc976ed7b9a2e0594c5822316ae63e64723a7ed6 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 11 Jan 2019 15:33:18 +0300 Subject: [PATCH 7331/8469] add changelog fragment --- changelog.d/1634.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1634.change.rst diff --git a/changelog.d/1634.change.rst b/changelog.d/1634.change.rst new file mode 100644 index 0000000000..ab544239d6 --- /dev/null +++ b/changelog.d/1634.change.rst @@ -0,0 +1 @@ +Include ``pyproject.toml`` in source distribution by default From 1d6bcf1730a8490a2a16fe2eac73a5437f743dd2 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 11 Jan 2019 15:34:32 +0300 Subject: [PATCH 7332/8469] add trailing dot in changelog fragment --- changelog.d/1634.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1634.change.rst b/changelog.d/1634.change.rst index ab544239d6..27d0a64afe 100644 --- a/changelog.d/1634.change.rst +++ b/changelog.d/1634.change.rst @@ -1 +1 @@ -Include ``pyproject.toml`` in source distribution by default +Include ``pyproject.toml`` in source distribution by default. From d53e024af2f5d8f3a4a36588c3dc004d156bc830 Mon Sep 17 00:00:00 2001 From: Alexander Duryagin Date: Fri, 11 Jan 2019 15:57:54 +0300 Subject: [PATCH 7333/8469] do not change py36compat, put changes into sdist command --- setuptools/command/py36compat.py | 2 +- setuptools/command/sdist.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index c256bfb855..61063e7542 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -76,7 +76,7 @@ def _add_defaults_standards(self): self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): - optional = ['test/test*.py', 'setup.cfg', 'pyproject.toml'] + optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index bcfae4d82f..40965a678c 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -121,6 +121,14 @@ def __read_template_hack(self): if has_leaky_handle: read_template = __read_template_hack + def _add_defaults_optional(self): + if six.PY2: + sdist_add_defaults._add_defaults_optional(self) + else: + super()._add_defaults_optional() + if os.path.isfile('pyproject.toml'): + self.filelist.append('pyproject.toml') + def _add_defaults_python(self): """getting python files""" if self.distribution.has_pure_modules(): From 748b307354e3c29252e31c029196002b2bbd6995 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 17 Jan 2019 17:57:45 -0500 Subject: [PATCH 7334/8469] Pin pytest to <4 for now. Ref #1638. --- tests/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 0c6c3e597c..d301168a29 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,7 +3,8 @@ pytest-flake8; python_version!="3.4" pytest-flake8<=1.0.0; python_version=="3.4" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 -pytest>=3.0.2 +# pytest pinned to <4 due to #1638 +pytest>=3.7,<4 wheel coverage>=4.5.1 pytest-cov>=2.5.1 From cb20330b1f00ca7864338c7518a8f0883b3844a1 Mon Sep 17 00:00:00 2001 From: Marc Schlaich Date: Sun, 20 Jan 2019 19:47:42 +0100 Subject: [PATCH 7335/8469] bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495) --- _msvccompiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/_msvccompiler.py b/_msvccompiler.py index 84b4ef5959..58b20a2102 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -78,6 +78,7 @@ def _find_vc2017(): "-prerelease", "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "-property", "installationPath", + "-products", "*", ], encoding="mbcs", errors="strict").strip() except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): return None, None From bfe286c3a95615a1d927c46cbe3d8ce890bab2b0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 17 Jan 2019 16:24:15 -0500 Subject: [PATCH 7336/8469] Add validation of a resource path according to the docs. Only warn for now. Ref #1635. --- pkg_resources/__init__.py | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6ca68daa01..a5bed9a625 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1466,10 +1466,55 @@ def _listdir(self, path): ) def _fn(self, base, resource_name): + self._validate_resource_path(resource_name) if resource_name: return os.path.join(base, *resource_name.split('/')) return base + @staticmethod + def _validate_resource_path(path): + """ + Validate the resource paths according to the docs. + https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access + + >>> warned = getfixture('recwarn') + >>> warnings.simplefilter('always') + >>> vrp = NullProvider._validate_resource_path + >>> vrp('foo/bar.txt') + >>> bool(warned) + False + >>> vrp('../foo/bar.txt') + >>> bool(warned) + True + >>> warned.clear() + >>> vrp('/foo/bar.txt') + >>> bool(warned) + True + >>> warned.clear() + >>> vrp('foo/../../bar.txt') + >>> bool(warned) + True + >>> warned.clear() + >>> vrp('foo/f../bar.txt') + >>> bool(warned) + False + """ + invalid = ( + path.startswith('/') or + re.search(r'\B\.\.\B', path) + ) + if not invalid: + return + + msg = "Use of .. or leading / in a resource path is not allowed." + # for compatibility, warn; in future + # raise ValueError(msg) + warnings.warn( + msg[:-1] + " and will raise exceptions in a future release.", + DeprecationWarning, + stacklevel=4, + ) + def _get(self, path): if hasattr(self.loader, 'get_data'): return self.loader.get_data(path) From 20f38687bbcf0e668902d37d51023f1fddc55273 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 17 Jan 2019 16:49:49 -0500 Subject: [PATCH 7337/8469] Update docs to match implementation that resource names are rooted at the package. Ref #1635. --- changelog.d/1635.change.rst | 1 + docs/pkg_resources.txt | 4 ++-- pkg_resources/__init__.py | 10 +++------- 3 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 changelog.d/1635.change.rst diff --git a/changelog.d/1635.change.rst b/changelog.d/1635.change.rst new file mode 100644 index 0000000000..7227ce0d5e --- /dev/null +++ b/changelog.d/1635.change.rst @@ -0,0 +1 @@ +Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents. Violations of this expectation raise DeprecationWarnings and will become errors. diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 0c9fb5f260..21aac814a6 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1132,8 +1132,8 @@ relative to the root of the identified distribution; i.e. its first path segment will be treated as a peer of the top-level modules or packages in the distribution. -Note that resource names must be ``/``-separated paths and cannot be absolute -(i.e. no leading ``/``) or contain relative names like ``".."``. Do *not* use +Note that resource names must be ``/``-separated paths rooted at the package +and cannot contain relative names like ``".."``. Do *not* use ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a5bed9a625..a3f1c56fbc 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1489,8 +1489,7 @@ def _validate_resource_path(path): >>> warned.clear() >>> vrp('/foo/bar.txt') >>> bool(warned) - True - >>> warned.clear() + False >>> vrp('foo/../../bar.txt') >>> bool(warned) True @@ -1499,14 +1498,11 @@ def _validate_resource_path(path): >>> bool(warned) False """ - invalid = ( - path.startswith('/') or - re.search(r'\B\.\.\B', path) - ) + invalid = '..' in path.split('/') if not invalid: return - msg = "Use of .. or leading / in a resource path is not allowed." + msg = "Use of .. in a resource path is not allowed." # for compatibility, warn; in future # raise ValueError(msg) warnings.warn( From 1b935caf64fc8f3eb72c7ee8c05a221f7ca9d9b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Jan 2019 21:31:39 -0500 Subject: [PATCH 7338/8469] Also disallow leading '/' in resource paths. Ref #1635. --- changelog.d/1635.change.rst | 2 +- docs/pkg_resources.txt | 5 +++-- pkg_resources/__init__.py | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/changelog.d/1635.change.rst b/changelog.d/1635.change.rst index 7227ce0d5e..7c35dfd196 100644 --- a/changelog.d/1635.change.rst +++ b/changelog.d/1635.change.rst @@ -1 +1 @@ -Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents. Violations of this expectation raise DeprecationWarnings and will become errors. +Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents or begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 21aac814a6..cdc1a5a505 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1132,8 +1132,9 @@ relative to the root of the identified distribution; i.e. its first path segment will be treated as a peer of the top-level modules or packages in the distribution. -Note that resource names must be ``/``-separated paths rooted at the package -and cannot contain relative names like ``".."``. Do *not* use +Note that resource names must be ``/``-separated paths rooted at the package, +cannot contain relative names like ``".."``, and cannot begin with a +leading ``/``. Do *not* use ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a3f1c56fbc..3722272028 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1489,7 +1489,7 @@ def _validate_resource_path(path): >>> warned.clear() >>> vrp('/foo/bar.txt') >>> bool(warned) - False + True >>> vrp('foo/../../bar.txt') >>> bool(warned) True @@ -1498,11 +1498,14 @@ def _validate_resource_path(path): >>> bool(warned) False """ - invalid = '..' in path.split('/') + invalid = ( + '..' in path.split('/') or + path.startswith('/') + ) if not invalid: return - msg = "Use of .. in a resource path is not allowed." + msg = "Use of .. or leading '/' in a resource path is not allowed." # for compatibility, warn; in future # raise ValueError(msg) warnings.warn( From 36a6a8bcf4b803f16891a766e87aabca3ace09e9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Jan 2019 21:34:25 -0500 Subject: [PATCH 7339/8469] Remove usage relying on deprecated and ambiguous leading slash. Ref #1635 --- pkg_resources/__init__.py | 2 +- pkg_resources/tests/test_pkg_resources.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3722272028..b30392facb 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1932,7 +1932,7 @@ def find_eggs_in_zip(importer, path_item, only=False): if only: # don't yield nested distros return - for subitem in metadata.resource_listdir('/'): + for subitem in metadata.resource_listdir(''): if _is_egg_path(subitem): subpath = os.path.join(path_item, subitem) dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 416f9aff2f..2c2c9c7f97 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -93,7 +93,6 @@ def test_resource_listdir(self): expected_root = ['data.dat', 'mod.py', 'subdir'] assert sorted(zp.resource_listdir('')) == expected_root - assert sorted(zp.resource_listdir('/')) == expected_root expected_subdir = ['data2.dat', 'mod2.py'] assert sorted(zp.resource_listdir('subdir')) == expected_subdir @@ -106,7 +105,6 @@ def test_resource_listdir(self): zp2 = pkg_resources.ZipProvider(mod2) assert sorted(zp2.resource_listdir('')) == expected_subdir - assert sorted(zp2.resource_listdir('/')) == expected_subdir assert zp2.resource_listdir('subdir') == [] assert zp2.resource_listdir('subdir/') == [] From 24be5abd4cbd9d84537c457456f841522d626e14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Jan 2019 16:11:07 -0500 Subject: [PATCH 7340/8469] Given that the config file parsing functionality is unlikely to change upstream, just incorporate the functionality directly. --- setuptools/dist.py | 78 ++++++++++++++++++++++++++++-- setuptools/py36compat.py | 95 ------------------------------------- setuptools/unicode_utils.py | 13 +++++ 3 files changed, 87 insertions(+), 99 deletions(-) delete mode 100644 setuptools/py36compat.py diff --git a/setuptools/dist.py b/setuptools/dist.py index a2600711e3..4cc3bdfe7a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- __all__ = ['Distribution'] +import io +import sys import re import os import warnings @@ -9,9 +11,11 @@ import distutils.core import distutils.cmd import distutils.dist +from distutils.errors import DistutilsOptionError +from distutils.util import strtobool +from distutils.debug import DEBUG import itertools - from collections import defaultdict from email import message_from_file @@ -31,8 +35,8 @@ from setuptools import windows_support from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration +from .unicode_utils import detect_encoding import pkg_resources -from .py36compat import Distribution_parse_config_files __import__('setuptools.extern.packaging.specifiers') __import__('setuptools.extern.packaging.version') @@ -332,7 +336,7 @@ def check_packages(dist, attr, value): _Distribution = get_unpatched(distutils.core.Distribution) -class Distribution(Distribution_parse_config_files, _Distribution): +class Distribution(_Distribution): """Distribution with support for features, tests, and package data This is an enhanced version of 'distutils.dist.Distribution' that @@ -556,12 +560,78 @@ def _clean_req(self, req): req.marker = None return req + def _parse_config_files(self, filenames=None): + """ + Adapted from distutils.dist.Distribution.parse_config_files, + this method provides the same functionality in subtly-improved + ways. + """ + from setuptools.extern.six.moves.configparser import ConfigParser + + # Ignore install directory options if we have a venv + if six.PY3 and sys.prefix != sys.base_prefix: + ignore_options = [ + 'install-base', 'install-platbase', 'install-lib', + 'install-platlib', 'install-purelib', 'install-headers', + 'install-scripts', 'install-data', 'prefix', 'exec-prefix', + 'home', 'user', 'root'] + else: + ignore_options = [] + + ignore_options = frozenset(ignore_options) + + if filenames is None: + filenames = self.find_config_files() + + if DEBUG: + self.announce("Distribution.parse_config_files():") + + parser = ConfigParser() + for filename in filenames: + with io.open(filename, 'rb') as fp: + encoding = detect_encoding(fp) + if DEBUG: + self.announce(" reading %s [%s]" % ( + filename, encoding or 'locale') + ) + reader = io.TextIOWrapper(fp, encoding=encoding) + (parser.read_file if six.PY3 else parser.readfp)(reader) + for section in parser.sections(): + options = parser.options(section) + opt_dict = self.get_option_dict(section) + + for opt in options: + if opt != '__name__' and opt not in ignore_options: + val = parser.get(section, opt) + opt = opt.replace('-', '_') + opt_dict[opt] = (filename, val) + + # Make the ConfigParser forget everything (so we retain + # the original filenames that options come from) + parser.__init__() + + # If there was a "global" section in the config file, use it + # to set Distribution options. + + if 'global' in self.command_options: + for (opt, (src, val)) in self.command_options['global'].items(): + alias = self.negative_opt.get(opt) + try: + if alias: + setattr(self, alias, not strtobool(val)) + elif opt in ('verbose', 'dry_run'): # ugh! + setattr(self, opt, strtobool(val)) + else: + setattr(self, opt, val) + except ValueError as msg: + raise DistutilsOptionError(msg) + def parse_config_files(self, filenames=None, ignore_option_errors=False): """Parses configuration files from various levels and loads configuration. """ - Distribution_parse_config_files.parse_config_files(self, filenames=filenames) + self._parse_config_files(filenames=filenames) parse_configuration(self, self.command_options, ignore_option_errors=ignore_option_errors) diff --git a/setuptools/py36compat.py b/setuptools/py36compat.py deleted file mode 100644 index 3d3c34ec50..0000000000 --- a/setuptools/py36compat.py +++ /dev/null @@ -1,95 +0,0 @@ -import io -import re -import sys -from distutils.errors import DistutilsOptionError -from distutils.util import strtobool -from distutils.debug import DEBUG -from setuptools.extern import six - - -CODING_RE = re.compile(br'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') - -def detect_encoding(fp): - first_line = fp.readline() - fp.seek(0) - m = CODING_RE.match(first_line) - if m is None: - return None - return m.group(1).decode('ascii') - - -class Distribution_parse_config_files: - """ - Mix-in providing forward-compatibility for functionality to be - included by default on Python 3.7. - - Do not edit the code in this class except to update functionality - as implemented in distutils. - """ - def parse_config_files(self, filenames=None): - from setuptools.extern.six.moves.configparser import ConfigParser - - # Ignore install directory options if we have a venv - if six.PY3 and sys.prefix != sys.base_prefix: - ignore_options = [ - 'install-base', 'install-platbase', 'install-lib', - 'install-platlib', 'install-purelib', 'install-headers', - 'install-scripts', 'install-data', 'prefix', 'exec-prefix', - 'home', 'user', 'root'] - else: - ignore_options = [] - - ignore_options = frozenset(ignore_options) - - if filenames is None: - filenames = self.find_config_files() - - if DEBUG: - self.announce("Distribution.parse_config_files():") - - parser = ConfigParser() - for filename in filenames: - with io.open(filename, 'rb') as fp: - encoding = detect_encoding(fp) - if DEBUG: - self.announce(" reading %s [%s]" % ( - filename, encoding or 'locale') - ) - reader = io.TextIOWrapper(fp, encoding=encoding) - (parser.read_file if six.PY3 else parser.readfp)(reader) - for section in parser.sections(): - options = parser.options(section) - opt_dict = self.get_option_dict(section) - - for opt in options: - if opt != '__name__' and opt not in ignore_options: - val = parser.get(section,opt) - opt = opt.replace('-', '_') - opt_dict[opt] = (filename, val) - - # Make the ConfigParser forget everything (so we retain - # the original filenames that options come from) - parser.__init__() - - # If there was a "global" section in the config file, use it - # to set Distribution options. - - if 'global' in self.command_options: - for (opt, (src, val)) in self.command_options['global'].items(): - alias = self.negative_opt.get(opt) - try: - if alias: - setattr(self, alias, not strtobool(val)) - elif opt in ('verbose', 'dry_run'): # ugh! - setattr(self, opt, strtobool(val)) - else: - setattr(self, opt, val) - except ValueError as msg: - raise DistutilsOptionError(msg) - - -if False: - # When updated behavior is available upstream, - # disable override here. - class Distribution_parse_config_files: - pass diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 7c63efd20b..3b8179a870 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,5 +1,6 @@ import unicodedata import sys +import re from setuptools.extern import six @@ -42,3 +43,15 @@ def try_encode(string, enc): return string.encode(enc) except UnicodeEncodeError: return None + + +CODING_RE = re.compile(br'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') + + +def detect_encoding(fp): + first_line = fp.readline() + fp.seek(0) + m = CODING_RE.match(first_line) + if m is None: + return None + return m.group(1).decode('ascii') From 9ef3ce697dd0ca38b420ceeb9388bc2a8f318524 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Jan 2019 16:19:26 -0500 Subject: [PATCH 7341/8469] Update changelog --- changelog.d/1180.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1180.change.rst diff --git a/changelog.d/1180.change.rst b/changelog.d/1180.change.rst new file mode 100644 index 0000000000..2e0f78bf7a --- /dev/null +++ b/changelog.d/1180.change.rst @@ -0,0 +1 @@ +Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136). From 590919d07a3036db09a3918b73ce3c8f91b84a7c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 11:35:08 -0500 Subject: [PATCH 7342/8469] Inject the project name in the referral also --- docs/_templates/indexsidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index b8c6148e1f..687cd2c986 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -11,5 +11,5 @@

    Professional support

    Professionally-supported {{ project }} is available with the -Tidelift Subscription. +Tidelift Subscription.

    From f3ff0541b6967ee91be3f572c5afe4f559436aa1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 12:12:55 -0500 Subject: [PATCH 7343/8469] Add Tidelift template --- README.rst | 11 +++++++++++ docs/_templates/tidelift-sidebar.html | 6 ++++++ docs/conf.py | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 README.rst create mode 100644 docs/_templates/tidelift-sidebar.html create mode 100644 docs/conf.py diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000..5d77d8d3a8 --- /dev/null +++ b/README.rst @@ -0,0 +1,11 @@ +.. image:: https://tidelift.com/badges/github/GROUP/PROJECT + :target: https://tidelift.com/subscription/pkg/pypi-PROJECT?utm_source=pypi-PROJECT&utm_medium=readme + + +Security Contact +================ + +If you wish to report a security vulnerability, the public disclosure +of which may exacerbate the risk, please +`Contact Tidelift security `_, +which will coordinate the fix and disclosure privately. diff --git a/docs/_templates/tidelift-sidebar.html b/docs/_templates/tidelift-sidebar.html new file mode 100644 index 0000000000..c89c0f09d0 --- /dev/null +++ b/docs/_templates/tidelift-sidebar.html @@ -0,0 +1,6 @@ +

    Professional support

    + +

    +Professionally-supported {{ project }} is available with the +Tidelift Subscription. +

    diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000..d028733210 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,4 @@ + +# Custom sidebar templates, maps document names to template names. +templates_path = ['_templates'] +html_sidebars = {'index': 'tidelift-sidebar.html'} From f8b9c426b4b3bd074ecfac71026af23a8a41b0dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 12:47:05 -0500 Subject: [PATCH 7344/8469] Make the project page link generic --- docs/_templates/indexsidebar.html | 2 +- docs/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 687cd2c986..504de6b069 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -5,7 +5,7 @@

    Download

    Questions? Suggestions? Contributions?

    -

    Visit the Setuptools project page

    +

    Visit the Project page

    Professional support

    diff --git a/docs/requirements.txt b/docs/requirements.txt index c6d594e8d5..bc27165b22 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ sphinx!=1.8.0 rst.linker>=1.9 -jaraco.packaging>=3.2 +jaraco.packaging>=6.1 setuptools>=34 From c6655951aa8292127f01d53c337da1da642efe74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 13:18:15 -0500 Subject: [PATCH 7345/8469] Rely on alabaster theme to support sidebar rendering. --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index d028733210..3d109305b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ # Custom sidebar templates, maps document names to template names. +html_theme = 'alabaster' templates_path = ['_templates'] html_sidebars = {'index': 'tidelift-sidebar.html'} From 3fc1e22cc2bf43d0266b9193e024c2e9e722a600 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 26 Jan 2019 23:03:59 +0100 Subject: [PATCH 7346/8469] tests: temporary pin pip to fix the Python 2.7 job --- tests/requirements.txt | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index d301168a29..f944df2740 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -10,3 +10,4 @@ coverage>=4.5.1 pytest-cov>=2.5.1 paver; python_version>="3.6" futures; python_version=="2.7" +pip==18.1 # Temporary workaround for #1644. diff --git a/tox.ini b/tox.ini index a2f850dff5..a31cb1c535 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps=-rtests/requirements.txt # Changed from default (`python -m pip ...`) # to prevent the current working directory # from being added to `sys.path`. -install_command={envbindir}/pip install {opts} {packages} +install_command=python -c 'import sys; sys.path.remove(""); from pkg_resources import load_entry_point; load_entry_point("pip", "console_scripts", "pip")()' install {opts} {packages} # Same as above. list_dependencies_command={envbindir}/pip freeze setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} From 5cd86987530892bfb01f68ad5f1a2b997a3d01e7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 20:20:12 -0500 Subject: [PATCH 7347/8469] Feed the hobgoblins (delint). --- setuptools/tests/files.py | 9 +- setuptools/tests/server.py | 14 ++- setuptools/tests/test_build_clib.py | 9 +- setuptools/tests/test_config.py | 16 ++- setuptools/tests/test_depends.py | 18 +-- setuptools/tests/test_dist.py | 15 ++- setuptools/tests/test_easy_install.py | 6 +- setuptools/tests/test_egg_info.py | 5 +- setuptools/tests/test_find_packages.py | 11 +- setuptools/tests/test_install_scripts.py | 6 +- setuptools/tests/test_integration.py | 23 ++-- setuptools/tests/test_manifest.py | 133 +++++++++++----------- setuptools/tests/test_msvc.py | 5 +- setuptools/tests/test_namespaces.py | 1 - setuptools/tests/test_packageindex.py | 17 ++- setuptools/tests/test_pep425tags.py | 4 +- setuptools/tests/test_sandbox.py | 3 +- setuptools/tests/test_setuptools.py | 9 +- setuptools/tests/test_test.py | 1 - setuptools/tests/test_virtualenv.py | 3 +- setuptools/tests/test_wheel.py | 2 + setuptools/tests/test_windows_wrappers.py | 13 ++- 22 files changed, 183 insertions(+), 140 deletions(-) diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index 465a6b41e6..bad2189d45 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -6,10 +6,13 @@ def build_files(file_defs, prefix=""): """ - Build a set of files/directories, as described by the file_defs dictionary. + Build a set of files/directories, as described by the + file_defs dictionary. - Each key/value pair in the dictionary is interpreted as a filename/contents - pair. If the contents value is a dictionary, a directory is created, and the + Each key/value pair in the dictionary is interpreted as + a filename/contents + pair. If the contents value is a dictionary, a directory + is created, and the dictionary interpreted as the files within it, recursively. For example: diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 35312120bb..fc3a5975ef 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -19,10 +19,11 @@ class IndexServer(BaseHTTPServer.HTTPServer): s.stop() """ - def __init__(self, server_address=('', 0), + def __init__( + self, server_address=('', 0), RequestHandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler): - BaseHTTPServer.HTTPServer.__init__(self, server_address, - RequestHandlerClass) + BaseHTTPServer.HTTPServer.__init__( + self, server_address, RequestHandlerClass) self._run = True def start(self): @@ -56,10 +57,11 @@ class MockServer(BaseHTTPServer.HTTPServer, threading.Thread): A simple HTTP Server that records the requests made to it. """ - def __init__(self, server_address=('', 0), + def __init__( + self, server_address=('', 0), RequestHandlerClass=RequestRecorder): - BaseHTTPServer.HTTPServer.__init__(self, server_address, - RequestHandlerClass) + BaseHTTPServer.HTTPServer.__init__( + self, server_address, RequestHandlerClass) threading.Thread.__init__(self) self.setDaemon(True) self.requests = [] diff --git a/setuptools/tests/test_build_clib.py b/setuptools/tests/test_build_clib.py index aebcc350ec..3779e679ea 100644 --- a/setuptools/tests/test_build_clib.py +++ b/setuptools/tests/test_build_clib.py @@ -1,6 +1,4 @@ import pytest -import os -import shutil import mock from distutils.errors import DistutilsSetupError @@ -40,13 +38,14 @@ def test_build_libraries(self, mock_newer): # with that out of the way, let's see if the crude dependency # system works cmd.compiler = mock.MagicMock(spec=cmd.compiler) - mock_newer.return_value = ([],[]) + mock_newer.return_value = ([], []) obj_deps = {'': ('global.h',), 'example.c': ('example.h',)} - libs = [('example', {'sources': ['example.c'] ,'obj_deps': obj_deps})] + libs = [('example', {'sources': ['example.c'], 'obj_deps': obj_deps})] cmd.build_libraries(libs) - assert [['example.c', 'global.h', 'example.h']] in mock_newer.call_args[0] + assert [['example.c', 'global.h', 'example.h']] in \ + mock_newer.call_args[0] assert not cmd.compiler.compile.called assert cmd.compiler.create_static_lib.call_count == 1 diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 53b8a956c4..a6b44b9f2c 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -8,6 +8,7 @@ from . import py2_only, py3_only from .textwrap import DALS + class ErrConfigHandler(ConfigHandler): """Erroneous handler. Fails to implement required methods.""" @@ -18,8 +19,8 @@ def make_package_dir(name, base_dir, ns=False): dir_package = dir_package.mkdir(dir_name) init_file = None if not ns: - init_file = dir_package.join('__init__.py') - init_file.write('') + init_file = dir_package.join('__init__.py') + init_file.write('') return dir_package, init_file @@ -308,7 +309,7 @@ def test_version_file(self, tmpdir): tmpdir.join('fake_package', 'version.txt').write('1.2.3\n4.5.6\n') with pytest.raises(DistutilsOptionError): with get_dist(tmpdir) as dist: - _ = dist.metadata.version + dist.metadata.version def test_version_with_package_dir_simple(self, tmpdir): @@ -451,7 +452,7 @@ def test_basic(self, tmpdir): 'tests_require = mock==0.7.2; pytest\n' 'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n' 'dependency_links = http://some.com/here/1, ' - 'http://some.com/there/2\n' + 'http://some.com/there/2\n' 'python_requires = >=1.0, !=2.8\n' 'py_modules = module1, module2\n' ) @@ -659,7 +660,7 @@ def test_find_namespace_directive(self, tmpdir): dir_sub_two, _ = make_package_dir('sub_two', dir_package, ns=True) with get_dist(tmpdir) as dist: - assert set(dist.packages) == { + assert set(dist.packages) == { 'fake_package', 'fake_package.sub_two', 'fake_package.sub_one' } @@ -711,7 +712,7 @@ def test_entry_points(self, tmpdir): tmpdir, '[options.entry_points]\n' 'group1 = point1 = pack.module:func, ' - '.point2 = pack.module2:func_rest [rest]\n' + '.point2 = pack.module2:func_rest [rest]\n' 'group2 = point3 = pack.module:func2\n' ) @@ -757,7 +758,10 @@ def test_data_files(self, tmpdir): ] assert sorted(dist.data_files) == sorted(expected) + saved_dist_init = _Distribution.__init__ + + class TestExternalSetters: # During creation of the setuptools Distribution() object, we call # the init of the parent distutils Distribution object via diff --git a/setuptools/tests/test_depends.py b/setuptools/tests/test_depends.py index e0cfa88049..bff1dfb199 100644 --- a/setuptools/tests/test_depends.py +++ b/setuptools/tests/test_depends.py @@ -5,12 +5,12 @@ class TestGetModuleConstant: - def test_basic(self): - """ - Invoke get_module_constant on a module in - the test package. - """ - mod_name = 'setuptools.tests.mod_with_constant' - val = depends.get_module_constant(mod_name, 'value') - assert val == 'three, sir!' - assert 'setuptools.tests.mod_with_constant' not in sys.modules + def test_basic(self): + """ + Invoke get_module_constant on a module in + the test package. + """ + mod_name = 'setuptools.tests.mod_with_constant' + val = depends.get_module_constant(mod_name, 'value') + assert val == 'three, sir!' + assert 'setuptools.tests.mod_with_constant' not in sys.modules diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index cf830b437d..390c3dfcf0 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -14,6 +14,7 @@ import pytest + def test_dist_fetch_build_egg(tmpdir): """ Check multiple calls to `Distribution.fetch_build_egg` work as expected. @@ -90,30 +91,32 @@ def merge_dicts(d1, d2): 'classifiers': [ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', - 'License :: OSI Approved :: MIT License' - ]})), + 'License :: OSI Approved :: MIT License', + ]})), ('Metadata version 1.1: Download URL', merge_dicts(base_attrs, { 'download_url': 'https://example.com' })), ('Metadata Version 1.2: Requires-Python', merge_dicts(base_attrs, { 'python_requires': '>=3.7' })), - pytest.param('Metadata Version 1.2: Project-Url', + pytest.param( + 'Metadata Version 1.2: Project-Url', merge_dicts(base_attrs, { 'project_urls': { 'Foo': 'https://example.bar' } }), marks=pytest.mark.xfail( reason="Issue #1578: project_urls not read" - )), + )), ('Metadata Version 2.1: Long Description Content Type', merge_dicts(base_attrs, { 'long_description_content_type': 'text/x-rst; charset=UTF-8' })), - pytest.param('Metadata Version 2.1: Provides Extra', + pytest.param( + 'Metadata Version 2.1: Provides Extra', merge_dicts(base_attrs, { 'provides_extras': ['foo', 'bar'] - }), marks=pytest.mark.xfail(reason="provides_extras not read")), + }), marks=pytest.mark.xfail(reason="provides_extras not read")), ('Missing author, missing author e-mail', {'name': 'foo', 'version': '1.0.0'}), ('Missing author', diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2cf65ae7e5..c3fd1c6ef4 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,7 +15,9 @@ import io import zipfile import mock -from setuptools.command.easy_install import EasyInstallDeprecationWarning, ScriptWriter, WindowsScriptWriter +from setuptools.command.easy_install import ( + EasyInstallDeprecationWarning, ScriptWriter, WindowsScriptWriter, +) import time from setuptools.extern import six from setuptools.extern.six.moves import urllib @@ -287,7 +289,6 @@ def test_script_install(self, sdist_script, tmpdir, monkeypatch): cmd.easy_install(sdist_script) assert (target / 'mypkg_script').exists() - def test_dist_get_script_args_deprecated(self): with pytest.warns(EasyInstallDeprecationWarning): ScriptWriter.get_script_args(None, None) @@ -304,6 +305,7 @@ def test_dist_WindowsScriptWriter_get_writer_deprecated(self): with pytest.warns(EasyInstallDeprecationWarning): WindowsScriptWriter.get_writer() + @pytest.mark.filterwarnings('ignore:Unbuilt egg') class TestPTHFileWriter: def test_add_from_cwd_site_sets_dirty(self): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 979ff18e4e..571e605404 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -1,4 +1,3 @@ -import datetime import sys import ast import os @@ -7,7 +6,9 @@ import stat import time -from setuptools.command.egg_info import egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision +from setuptools.command.egg_info import ( + egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision, +) from setuptools.dist import Distribution from setuptools.extern.six.moves import map diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index b08f91c7d5..ab26b4f128 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -12,10 +12,10 @@ from setuptools.extern.six import PY3 from setuptools import find_packages if PY3: - from setuptools import find_namespace_packages + from setuptools import find_namespace_packages -# modeled after CPython's test.support.can_symlink +# modeled after CPython's test.support.can_symlink def can_symlink(): TESTFN = tempfile.mktemp() symlink_path = TESTFN + "can_symlink" @@ -164,12 +164,14 @@ def test_pep420_ns_package(self): def test_pep420_ns_package_no_includes(self): packages = find_namespace_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) - self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + self._assert_packages( + packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) @py3_only def test_pep420_ns_package_no_includes_or_excludes(self): packages = find_namespace_packages(self.dist_dir) - expected = ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] + expected = [ + 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self._assert_packages(packages, expected) @py3_only @@ -185,4 +187,3 @@ def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) packages = find_namespace_packages(self.dist_dir) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - diff --git a/setuptools/tests/test_install_scripts.py b/setuptools/tests/test_install_scripts.py index 727ad65b13..4338c792f1 100644 --- a/setuptools/tests/test_install_scripts.py +++ b/setuptools/tests/test_install_scripts.py @@ -64,7 +64,8 @@ def test_sys_executable_escaping_win32(self, tmpdir, monkeypatch): @pytest.mark.skipif(sys.platform == 'win32', reason='non-Windows only') def test_executable_with_spaces_escaping_unix(self, tmpdir): """ - Ensure that shebang on Unix is not quoted, even when a value with spaces + Ensure that shebang on Unix is not quoted, even when + a value with spaces is specified using --executable. """ expected = '#!%s\n' % self.unix_spaces_exe @@ -77,7 +78,8 @@ def test_executable_with_spaces_escaping_unix(self, tmpdir): @pytest.mark.skipif(sys.platform != 'win32', reason='Windows only') def test_executable_arg_escaping_win32(self, tmpdir): """ - Ensure that shebang on Windows is quoted when getting a path with spaces + Ensure that shebang on Windows is quoted when + getting a path with spaces from --executable, that is itself properly quoted. """ expected = '#!"%s"\n' % self.win32_exe diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 3a9a6c50a1..e54f3209aa 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -6,6 +6,11 @@ import glob import os import sys +import re +import subprocess +import functools +import tarfile +import zipfile from setuptools.extern.six.moves import urllib import pytest @@ -114,15 +119,12 @@ def test_pyuri(install_context): assert os.path.exists(os.path.join(pyuri.location, 'pyuri', 'uri.regex')) -import re -import subprocess -import functools -import tarfile, zipfile +build_deps = ['appdirs', 'packaging', 'pyparsing', 'six'] -build_deps = ['appdirs', 'packaging', 'pyparsing', 'six'] @pytest.mark.parametrize("build_dep", build_deps) -@pytest.mark.skipif(sys.version_info < (3, 6), reason='run only on late versions') +@pytest.mark.skipif( + sys.version_info < (3, 6), reason='run only on late versions') def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): """ All setuptools build dependencies must build without @@ -149,13 +151,16 @@ def install(pkg_dir, install_dir): breaker.write('raise ImportError()') cmd = [sys.executable, 'setup.py', 'install', '--prefix', install_dir] env = dict(os.environ, PYTHONPATH=pkg_dir) - output = subprocess.check_output(cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) + output = subprocess.check_output( + cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) return output.decode('utf-8') def download_and_extract(request, req, target): - cmd = [sys.executable, '-m', 'pip', 'download', '--no-deps', - '--no-binary', ':all:', req] + cmd = [ + sys.executable, '-m', 'pip', 'download', '--no-deps', + '--no-binary', ':all:', req, + ] output = subprocess.check_output(cmd, encoding='utf-8') filename = re.search('Saved (.*)', output).group(1) request.addfinalizer(functools.partial(os.remove, filename)) diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 5edfbea003..2a0e9c8625 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -15,7 +15,6 @@ from setuptools.dist import Distribution from setuptools.extern import six from setuptools.tests.textwrap import DALS -from . import py3_only import pytest @@ -74,7 +73,9 @@ def touch(filename): # Glob matching ('*.txt', ['foo.txt', 'bar.txt'], ['foo/foo.txt']), - ('dir/*.txt', ['dir/foo.txt', 'dir/bar.txt', 'dir/.txt'], ['notdir/foo.txt']), + ( + 'dir/*.txt', + ['dir/foo.txt', 'dir/bar.txt', 'dir/.txt'], ['notdir/foo.txt']), ('*/*.py', ['bin/start.py'], []), ('docs/page-?.txt', ['docs/page-9.txt'], ['docs/page-10.txt']), @@ -243,77 +244,77 @@ def test_include(self): def test_exclude(self): """Include everything in app/ except the text files""" - l = make_local_path + ml = make_local_path self.make_manifest( """ include app/* exclude app/*.txt """) - files = default_files | set([l('app/c.rst')]) + files = default_files | set([ml('app/c.rst')]) assert files == self.get_files() def test_include_multiple(self): """Include with multiple patterns.""" - l = make_local_path + ml = make_local_path self.make_manifest("include app/*.txt app/static/*") files = default_files | set([ - l('app/a.txt'), l('app/b.txt'), - l('app/static/app.js'), l('app/static/app.js.map'), - l('app/static/app.css'), l('app/static/app.css.map')]) + ml('app/a.txt'), ml('app/b.txt'), + ml('app/static/app.js'), ml('app/static/app.js.map'), + ml('app/static/app.css'), ml('app/static/app.css.map')]) assert files == self.get_files() def test_graft(self): """Include the whole app/static/ directory.""" - l = make_local_path + ml = make_local_path self.make_manifest("graft app/static") files = default_files | set([ - l('app/static/app.js'), l('app/static/app.js.map'), - l('app/static/app.css'), l('app/static/app.css.map')]) + ml('app/static/app.js'), ml('app/static/app.js.map'), + ml('app/static/app.css'), ml('app/static/app.css.map')]) assert files == self.get_files() def test_graft_glob_syntax(self): """Include the whole app/static/ directory.""" - l = make_local_path + ml = make_local_path self.make_manifest("graft */static") files = default_files | set([ - l('app/static/app.js'), l('app/static/app.js.map'), - l('app/static/app.css'), l('app/static/app.css.map')]) + ml('app/static/app.js'), ml('app/static/app.js.map'), + ml('app/static/app.css'), ml('app/static/app.css.map')]) assert files == self.get_files() def test_graft_global_exclude(self): """Exclude all *.map files in the project.""" - l = make_local_path + ml = make_local_path self.make_manifest( """ graft app/static global-exclude *.map """) files = default_files | set([ - l('app/static/app.js'), l('app/static/app.css')]) + ml('app/static/app.js'), ml('app/static/app.css')]) assert files == self.get_files() def test_global_include(self): """Include all *.rst, *.js, and *.css files in the whole tree.""" - l = make_local_path + ml = make_local_path self.make_manifest( """ global-include *.rst *.js *.css """) files = default_files | set([ - '.hidden.rst', 'testing.rst', l('app/c.rst'), - l('app/static/app.js'), l('app/static/app.css')]) + '.hidden.rst', 'testing.rst', ml('app/c.rst'), + ml('app/static/app.js'), ml('app/static/app.css')]) assert files == self.get_files() def test_graft_prune(self): """Include all files in app/, except for the whole app/static/ dir.""" - l = make_local_path + ml = make_local_path self.make_manifest( """ graft app prune app/static """) files = default_files | set([ - l('app/a.txt'), l('app/b.txt'), l('app/c.rst')]) + ml('app/a.txt'), ml('app/b.txt'), ml('app/c.rst')]) assert files == self.get_files() @@ -369,7 +370,7 @@ def make_files(self, files): def test_process_template_line(self): # testing all MANIFEST.in template patterns file_list = FileList() - l = make_local_path + ml = make_local_path # simulated file list self.make_files([ @@ -377,16 +378,16 @@ def test_process_template_line(self): 'buildout.cfg', # filelist does not filter out VCS directories, # it's sdist that does - l('.hg/last-message.txt'), - l('global/one.txt'), - l('global/two.txt'), - l('global/files.x'), - l('global/here.tmp'), - l('f/o/f.oo'), - l('dir/graft-one'), - l('dir/dir2/graft2'), - l('dir3/ok'), - l('dir3/sub/ok.txt'), + ml('.hg/last-message.txt'), + ml('global/one.txt'), + ml('global/two.txt'), + ml('global/files.x'), + ml('global/here.tmp'), + ml('f/o/f.oo'), + ml('dir/graft-one'), + ml('dir/dir2/graft2'), + ml('dir3/ok'), + ml('dir3/sub/ok.txt'), ]) MANIFEST_IN = DALS("""\ @@ -413,12 +414,12 @@ def test_process_template_line(self): 'buildout.cfg', 'four.txt', 'ok', - l('.hg/last-message.txt'), - l('dir/graft-one'), - l('dir/dir2/graft2'), - l('f/o/f.oo'), - l('global/one.txt'), - l('global/two.txt'), + ml('.hg/last-message.txt'), + ml('dir/graft-one'), + ml('dir/dir2/graft2'), + ml('f/o/f.oo'), + ml('global/one.txt'), + ml('global/two.txt'), ] file_list.sort() @@ -475,10 +476,10 @@ def test_process_template_line_invalid(self): assert False, "Should have thrown an error" def test_include(self): - l = make_local_path + ml = make_local_path # include file_list = FileList() - self.make_files(['a.py', 'b.txt', l('d/c.py')]) + self.make_files(['a.py', 'b.txt', ml('d/c.py')]) file_list.process_template_line('include *.py') file_list.sort() @@ -491,42 +492,42 @@ def test_include(self): self.assertWarnings() def test_exclude(self): - l = make_local_path + ml = make_local_path # exclude file_list = FileList() - file_list.files = ['a.py', 'b.txt', l('d/c.py')] + file_list.files = ['a.py', 'b.txt', ml('d/c.py')] file_list.process_template_line('exclude *.py') file_list.sort() - assert file_list.files == ['b.txt', l('d/c.py')] + assert file_list.files == ['b.txt', ml('d/c.py')] self.assertNoWarnings() file_list.process_template_line('exclude *.rb') file_list.sort() - assert file_list.files == ['b.txt', l('d/c.py')] + assert file_list.files == ['b.txt', ml('d/c.py')] self.assertWarnings() def test_global_include(self): - l = make_local_path + ml = make_local_path # global-include file_list = FileList() - self.make_files(['a.py', 'b.txt', l('d/c.py')]) + self.make_files(['a.py', 'b.txt', ml('d/c.py')]) file_list.process_template_line('global-include *.py') file_list.sort() - assert file_list.files == ['a.py', l('d/c.py')] + assert file_list.files == ['a.py', ml('d/c.py')] self.assertNoWarnings() file_list.process_template_line('global-include *.rb') file_list.sort() - assert file_list.files == ['a.py', l('d/c.py')] + assert file_list.files == ['a.py', ml('d/c.py')] self.assertWarnings() def test_global_exclude(self): - l = make_local_path + ml = make_local_path # global-exclude file_list = FileList() - file_list.files = ['a.py', 'b.txt', l('d/c.py')] + file_list.files = ['a.py', 'b.txt', ml('d/c.py')] file_list.process_template_line('global-exclude *.py') file_list.sort() @@ -539,65 +540,65 @@ def test_global_exclude(self): self.assertWarnings() def test_recursive_include(self): - l = make_local_path + ml = make_local_path # recursive-include file_list = FileList() - self.make_files(['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')]) + self.make_files(['a.py', ml('d/b.py'), ml('d/c.txt'), ml('d/d/e.py')]) file_list.process_template_line('recursive-include d *.py') file_list.sort() - assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] self.assertNoWarnings() file_list.process_template_line('recursive-include e *.py') file_list.sort() - assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] self.assertWarnings() def test_recursive_exclude(self): - l = make_local_path + ml = make_local_path # recursive-exclude file_list = FileList() - file_list.files = ['a.py', l('d/b.py'), l('d/c.txt'), l('d/d/e.py')] + file_list.files = ['a.py', ml('d/b.py'), ml('d/c.txt'), ml('d/d/e.py')] file_list.process_template_line('recursive-exclude d *.py') file_list.sort() - assert file_list.files == ['a.py', l('d/c.txt')] + assert file_list.files == ['a.py', ml('d/c.txt')] self.assertNoWarnings() file_list.process_template_line('recursive-exclude e *.py') file_list.sort() - assert file_list.files == ['a.py', l('d/c.txt')] + assert file_list.files == ['a.py', ml('d/c.txt')] self.assertWarnings() def test_graft(self): - l = make_local_path + ml = make_local_path # graft file_list = FileList() - self.make_files(['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')]) + self.make_files(['a.py', ml('d/b.py'), ml('d/d/e.py'), ml('f/f.py')]) file_list.process_template_line('graft d') file_list.sort() - assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] self.assertNoWarnings() file_list.process_template_line('graft e') file_list.sort() - assert file_list.files == [l('d/b.py'), l('d/d/e.py')] + assert file_list.files == [ml('d/b.py'), ml('d/d/e.py')] self.assertWarnings() def test_prune(self): - l = make_local_path + ml = make_local_path # prune file_list = FileList() - file_list.files = ['a.py', l('d/b.py'), l('d/d/e.py'), l('f/f.py')] + file_list.files = ['a.py', ml('d/b.py'), ml('d/d/e.py'), ml('f/f.py')] file_list.process_template_line('prune d') file_list.sort() - assert file_list.files == ['a.py', l('f/f.py')] + assert file_list.files == ['a.py', ml('f/f.py')] self.assertNoWarnings() file_list.process_template_line('prune e') file_list.sort() - assert file_list.files == ['a.py', l('f/f.py')] + assert file_list.files == ['a.py', ml('f/f.py')] self.assertWarnings() diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 32d7a907cf..24e38ea880 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -49,7 +49,8 @@ def read_values(cls, base, key): for k in hive if k.startswith(key.lower()) ) - return mock.patch.multiple(distutils.msvc9compiler.Reg, + return mock.patch.multiple( + distutils.msvc9compiler.Reg, read_keys=read_keys, read_values=read_values) @@ -61,7 +62,7 @@ class TestModulePatch: """ key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' - key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir' + key_64 = key_32.replace(r'\microsoft', r'\wow6432node\microsoft') def test_patched(self): "Test the module is actually patched" diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 670ccee915..f937d98189 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -1,6 +1,5 @@ from __future__ import absolute_import, unicode_literals -import os import sys import subprocess diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 13cffb7ebc..ab371884d9 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -44,7 +44,10 @@ def test_bad_url_typo(self): hosts=('www.example.com',) ) - url = 'url:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunk' + url = ( + 'url:%20https://svn.plone.org/svn' + '/collective/inquant.contentmirror.plone/trunk' + ) try: v = index.open_url(url) except Exception as v: @@ -63,9 +66,9 @@ def _urlopen(*args): index.opener = _urlopen url = 'http://example.com' try: - v = index.open_url(url) - except Exception as v: - assert 'line' in str(v) + index.open_url(url) + except Exception as exc: + assert 'line' in str(exc) else: raise AssertionError('Should have raise here!') @@ -83,7 +86,11 @@ def test_bad_url_double_scheme(self): index.open_url(url) except distutils.errors.DistutilsError as error: msg = six.text_type(error) - assert 'nonnumeric port' in msg or 'getaddrinfo failed' in msg or 'Name or service not known' in msg + assert ( + 'nonnumeric port' in msg + or 'getaddrinfo failed' in msg + or 'Name or service not known' in msg + ) return raise RuntimeError("Did not raise") diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py index f558a0d87c..30afdec7d4 100644 --- a/setuptools/tests/test_pep425tags.py +++ b/setuptools/tests/test_pep425tags.py @@ -32,7 +32,9 @@ def abi_tag_unicode(self, flags, config_vars): if sys.version_info < (3, 3): config_vars.update({'Py_UNICODE_SIZE': 2}) mock_gcf = self.mock_get_config_var(**config_vars) - with patch('setuptools.pep425tags.sysconfig.get_config_var', mock_gcf): + with patch( + 'setuptools.pep425tags.sysconfig.get_config_var', + mock_gcf): abi_tag = pep425tags.get_abi_tag() assert abi_tag == base + flags diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index d867542229..99398cdb93 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -26,7 +26,8 @@ def test_setup_py_with_BOM(self): """ It should be possible to execute a setup.py with a Byte Order Mark """ - target = pkg_resources.resource_filename(__name__, + target = pkg_resources.resource_filename( + __name__, 'script-with-bom.py') namespace = types.ModuleType('namespace') setuptools.sandbox._execfile(target, vars(namespace)) diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 7aae3a163a..5896a69ae6 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -77,7 +77,8 @@ def testModuleExtract(self): from json import __version__ assert dep.get_module_constant('json', '__version__') == __version__ assert dep.get_module_constant('sys', 'version') == sys.version - assert dep.get_module_constant('setuptools.tests.test_setuptools', '__doc__') == __doc__ + assert dep.get_module_constant( + 'setuptools.tests.test_setuptools', '__doc__') == __doc__ @needs_bytecode def testRequire(self): @@ -216,7 +217,8 @@ def setup_method(self, method): self.req = Require('Distutils', '1.0.3', 'distutils') self.dist = makeSetup( features={ - 'foo': Feature("foo", standard=True, require_features=['baz', self.req]), + 'foo': Feature( + "foo", standard=True, require_features=['baz', self.req]), 'bar': Feature("bar", standard=True, packages=['pkg.bar'], py_modules=['bar_et'], remove=['bar.ext'], ), @@ -252,7 +254,8 @@ def testFeatureOptions(self): ('with-dwim', None, 'include DWIM') in dist.feature_options ) assert ( - ('without-dwim', None, 'exclude DWIM (default)') in dist.feature_options + ('without-dwim', None, 'exclude DWIM (default)') + in dist.feature_options ) assert ( ('with-bar', None, 'include bar (default)') in dist.feature_options diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 8d1425e187..faaa6ba90a 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -4,7 +4,6 @@ from distutils import log import os -import sys import pytest diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 7b5fea1738..3d5c84b067 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,4 +1,3 @@ -import distutils.command import glob import os import sys @@ -141,7 +140,7 @@ def test_no_missing_dependencies(bare_virtualenv): """ Quick and dirty test to ensure all external dependencies are vendored. """ - for command in ('upload',):#sorted(distutils.command.__all__): + for command in ('upload',): # sorted(distutils.command.__all__): bare_virtualenv.run(' && '.join(( 'cd {source}', 'python setup.py {command} -h', diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 6db5fa117e..e85a4a7e8d 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -63,6 +63,7 @@ }), ) + @pytest.mark.parametrize( ('filename', 'info'), WHEEL_INFO_TESTS, ids=[t[0] for t in WHEEL_INFO_TESTS] @@ -487,6 +488,7 @@ def __repr__(self): ) + @pytest.mark.parametrize( 'params', WHEEL_INSTALL_TESTS, ids=list(params['id'] for params in WHEEL_INSTALL_TESTS), diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py index d2871c0f40..2553394a26 100644 --- a/setuptools/tests/test_windows_wrappers.py +++ b/setuptools/tests/test_windows_wrappers.py @@ -97,7 +97,8 @@ def test_basic(self, tmpdir): 'arg 4\\', 'arg5 a\\\\b', ] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE) + proc = subprocess.Popen( + cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE) stdout, stderr = proc.communicate('hello\nworld\n'.encode('ascii')) actual = stdout.decode('ascii').replace('\r\n', '\n') expected = textwrap.dedent(r""" @@ -134,7 +135,11 @@ def test_with_options(self, tmpdir): with (tmpdir / 'foo-script.py').open('w') as f: f.write(self.prep_script(tmpl)) cmd = [str(tmpdir / 'foo.exe')] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) + proc = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.STDOUT) stdout, stderr = proc.communicate() actual = stdout.decode('ascii').replace('\r\n', '\n') expected = textwrap.dedent(r""" @@ -172,7 +177,9 @@ def test_basic(self, tmpdir): str(tmpdir / 'test_output.txt'), 'Test Argument', ] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) + proc = subprocess.Popen( + cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, + stderr=subprocess.STDOUT) stdout, stderr = proc.communicate() assert not stdout assert not stderr From b1615d12435289c21853be2f4f40e523317998da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 21:45:33 -0500 Subject: [PATCH 7348/8469] Adopt distutils.dist.Distribution._set_command_options to support better string detection. --- setuptools/dist.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 4cc3bdfe7a..a7ebe73bca 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -14,6 +14,7 @@ from distutils.errors import DistutilsOptionError from distutils.util import strtobool from distutils.debug import DEBUG +from distutils.fancy_getopt import translate_longopt import itertools from collections import defaultdict @@ -626,6 +627,53 @@ def _parse_config_files(self, filenames=None): except ValueError as msg: raise DistutilsOptionError(msg) + def _set_command_options(self, command_obj, option_dict=None): + """ + Set the options for 'command_obj' from 'option_dict'. Basically + this means copying elements of a dictionary ('option_dict') to + attributes of an instance ('command'). + + 'command_obj' must be a Command instance. If 'option_dict' is not + supplied, uses the standard option dictionary for this command + (from 'self.command_options'). + + (Adopted from distutils.dist.Distribution._set_command_options) + """ + command_name = command_obj.get_command_name() + if option_dict is None: + option_dict = self.get_option_dict(command_name) + + if DEBUG: + self.announce(" setting options for '%s' command:" % command_name) + for (option, (source, value)) in option_dict.items(): + if DEBUG: + self.announce(" %s = %s (from %s)" % (option, value, + source)) + try: + bool_opts = [translate_longopt(o) + for o in command_obj.boolean_options] + except AttributeError: + bool_opts = [] + try: + neg_opt = command_obj.negative_opt + except AttributeError: + neg_opt = {} + + try: + is_string = isinstance(value, str) + if option in neg_opt and is_string: + setattr(command_obj, neg_opt[option], not strtobool(value)) + elif option in bool_opts and is_string: + setattr(command_obj, option, strtobool(value)) + elif hasattr(command_obj, option): + setattr(command_obj, option, value) + else: + raise DistutilsOptionError( + "error in %s: command '%s' has no such option '%s'" + % (source, command_name, option)) + except ValueError as msg: + raise DistutilsOptionError(msg) + def parse_config_files(self, filenames=None, ignore_option_errors=False): """Parses configuration files from various levels and loads configuration. From 249f24a1f04ce390a9e48a4d8a5bff7982714c86 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 26 Jan 2019 21:48:38 -0500 Subject: [PATCH 7349/8469] Fix test failure by better detecting string options from an updated ConfigParser. --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index a7ebe73bca..b8551228eb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -660,7 +660,7 @@ def _set_command_options(self, command_obj, option_dict=None): neg_opt = {} try: - is_string = isinstance(value, str) + is_string = isinstance(value, six.string_types) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: From 78fd73026ad7284819936b651f7cfbe8a1ec98c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Jan 2019 09:16:47 -0500 Subject: [PATCH 7350/8469] =?UTF-8?q?Bump=20version:=2040.6.3=20=E2=86=92?= =?UTF-8?q?=2040.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 10 ++++++++++ changelog.d/1180.change.rst | 1 - changelog.d/1499.change.rst | 1 - changelog.d/1544.change.rst | 1 - changelog.d/1551.breaking.rst | 1 - changelog.d/1625.change.rst | 1 - setup.cfg | 3 ++- setup.py | 2 +- 8 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 changelog.d/1180.change.rst delete mode 100644 changelog.d/1499.change.rst delete mode 100644 changelog.d/1544.change.rst delete mode 100644 changelog.d/1551.breaking.rst delete mode 100644 changelog.d/1625.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 48a176a815..ca7122e993 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v40.7.0 +------- + +* #1551: File inputs for the `license` field in `setup.cfg` files now explicitly raise an error. +* #1180: Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136). +* #1499: ``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485. +* #1544: Added tests for PackageIndex.download (for git URLs). +* #1625: In PEP 517 build_meta builder, ensure that sdists are built as gztar per the spec. + + v40.6.3 ------- diff --git a/changelog.d/1180.change.rst b/changelog.d/1180.change.rst deleted file mode 100644 index 2e0f78bf7a..0000000000 --- a/changelog.d/1180.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136). diff --git a/changelog.d/1499.change.rst b/changelog.d/1499.change.rst deleted file mode 100644 index 10e4db6824..0000000000 --- a/changelog.d/1499.change.rst +++ /dev/null @@ -1 +0,0 @@ -``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485. diff --git a/changelog.d/1544.change.rst b/changelog.d/1544.change.rst deleted file mode 100644 index 748b64e1c2..0000000000 --- a/changelog.d/1544.change.rst +++ /dev/null @@ -1 +0,0 @@ -Added tests for PackageIndex.download (for git URLs). diff --git a/changelog.d/1551.breaking.rst b/changelog.d/1551.breaking.rst deleted file mode 100644 index c0e477ce81..0000000000 --- a/changelog.d/1551.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -File inputs for the `license` field in `setup.cfg` files now explicitly raise an error. diff --git a/changelog.d/1625.change.rst b/changelog.d/1625.change.rst deleted file mode 100644 index 9125ac0ced..0000000000 --- a/changelog.d/1625.change.rst +++ /dev/null @@ -1 +0,0 @@ -In PEP 517 build_meta builder, ensure that sdists are built as gztar per the spec. diff --git a/setup.cfg b/setup.cfg index dd404469fe..78eb7596fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.6.3 +current_version = 40.7.0 commit = True tag = True @@ -26,3 +26,4 @@ universal = 1 license_file = LICENSE [bumpversion:file:setup.py] + diff --git a/setup.py b/setup.py index 67d5691d3b..00db0f0a33 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.6.3", + version="40.7.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 91d769e88f0ae9e5dfce1fb9448864201407b579 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Jan 2019 11:07:40 -0500 Subject: [PATCH 7351/8469] Disallow Windows absolute paths unconditionally with no deprecation period. --- pkg_resources/__init__.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b30392facb..dcfa1d0843 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -39,6 +39,8 @@ import textwrap import itertools import inspect +import ntpath +import posixpath from pkgutil import get_importer try: @@ -1497,15 +1499,34 @@ def _validate_resource_path(path): >>> vrp('foo/f../bar.txt') >>> bool(warned) False + + Windows path separators are straight-up disallowed. + >>> vrp(r'\\foo/bar.txt') + Traceback (most recent call last): + ... + ValueError: Use of .. or absolute path in a resource path \ +is not allowed. + + >>> vrp(r'C:\\foo/bar.txt') + Traceback (most recent call last): + ... + ValueError: Use of .. or absolute path in a resource path \ +is not allowed. """ invalid = ( - '..' in path.split('/') or - path.startswith('/') + os.path.pardir in path.split(posixpath.sep) or + posixpath.isabs(path) or + ntpath.isabs(path) ) if not invalid: return - msg = "Use of .. or leading '/' in a resource path is not allowed." + msg = "Use of .. or absolute path in a resource path is not allowed." + + # Aggressively disallow Windows absolute paths + if ntpath.isabs(path) and not posixpath.isabs(path): + raise ValueError(msg) + # for compatibility, warn; in future # raise ValueError(msg) warnings.warn( From 6636302f735d94fe91b83469f1610e4112a91838 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Jan 2019 13:01:20 -0500 Subject: [PATCH 7352/8469] Update documentation to match more aggressive absolute path exclusion in resources. --- changelog.d/1635.change.rst | 2 +- docs/pkg_resources.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/changelog.d/1635.change.rst b/changelog.d/1635.change.rst index 7c35dfd196..d23f3fe30c 100644 --- a/changelog.d/1635.change.rst +++ b/changelog.d/1635.change.rst @@ -1 +1 @@ -Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents or begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. +Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors. diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index cdc1a5a505..806f1b1468 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1133,8 +1133,7 @@ segment will be treated as a peer of the top-level modules or packages in the distribution. Note that resource names must be ``/``-separated paths rooted at the package, -cannot contain relative names like ``".."``, and cannot begin with a -leading ``/``. Do *not* use +cannot contain relative names like ``".."``, and cannot be absolute. Do *not* use ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. From 900aad5a597a43ab4c8ea0efa8bf3041a195bf56 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Jan 2019 21:51:03 +0100 Subject: [PATCH 7353/8469] tweak #1644 workaround to fix `test_pip_upgrade_from_source` Explicitly exclude `pyproject.toml` so it's never added (e.g. because `setuptools_scm` is used). --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 9cce3c90e4..16d60e5ffc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,3 +12,4 @@ include launcher.c include msvc-build-launcher.cmd include pytest.ini include tox.ini +exclude pyproject.toml # Temporary workaround for #1644. From 3ac3b67e2c8a776f410eae49472a0f8266e29612 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Jan 2019 23:04:09 +0100 Subject: [PATCH 7354/8469] tests: minor cleanup --- setuptools/tests/test_build_py.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index cc701ae67f..b3a99f5660 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -1,17 +1,9 @@ import os -import pytest - from setuptools.dist import Distribution -@pytest.yield_fixture -def tmpdir_as_cwd(tmpdir): - with tmpdir.as_cwd(): - yield tmpdir - - -def test_directories_in_package_data_glob(tmpdir_as_cwd): +def test_directories_in_package_data_glob(tmpdir_cwd): """ Directories matching the glob in package_data should not be included in the package data. From f7447817b65c12dfe508249cea019c41ce0dc23f Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Jan 2019 22:57:20 +0100 Subject: [PATCH 7355/8469] test: add a simple regression test for `build_ext` --- setuptools/tests/environment.py | 2 + setuptools/tests/test_build_ext.py | 70 ++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index c67898ca79..bd3119efca 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -46,6 +46,8 @@ def run_setup_py(cmd, pypath=None, path=None, cmd, stdout=_PIPE, stderr=_PIPE, shell=shell, env=env, ) + if isinstance(data_stream, tuple): + data_stream = slice(*data_stream) data = proc.communicate()[data_stream] except OSError: return 1, '' diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 602571540f..3dc87ca363 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -8,6 +8,10 @@ from setuptools.dist import Distribution from setuptools.extension import Extension +from . import environment +from .files import build_files +from .textwrap import DALS + class TestBuildExt: def test_get_ext_filename(self): @@ -43,3 +47,69 @@ def test_abi3_filename(self): assert res.endswith('eggs.pyd') else: assert 'abi3' in res + + +def test_build_ext_config_handling(tmpdir_cwd): + files = { + 'setup.py': DALS( + """ + from setuptools import Extension, setup + setup( + name='foo', + version='0.0.0', + ext_modules=[Extension('foo', ['foo.c'])], + ) + """), + 'foo.c': DALS( + """ + #include "Python.h" + + #if PY_MAJOR_VERSION >= 3 + + static struct PyModuleDef moduledef = { + PyModuleDef_HEAD_INIT, + "foo", + NULL, + 0, + NULL, + NULL, + NULL, + NULL, + NULL + }; + + #define INITERROR return NULL + + PyMODINIT_FUNC PyInit_foo(void) + + #else + + #define INITERROR return + + void initfoo(void) + + #endif + { + #if PY_MAJOR_VERSION >= 3 + PyObject *module = PyModule_Create(&moduledef); + #else + PyObject *module = Py_InitModule("extension", NULL); + #endif + if (module == NULL) + INITERROR; + #if PY_MAJOR_VERSION >= 3 + return module; + #endif + } + """), + 'setup.cfg': DALS( + """ + [build] + build-base = foo_build + """), + } + build_files(files) + code, output = environment.run_setup_py( + cmd=['build'], data_stream=(0, 2), + ) + assert code == 0, '\nSTDOUT:\n%s\nSTDERR:\n%s' % output From 9150b6b7272130f11a71190905e6bd3db31afd81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Jan 2019 17:10:37 -0500 Subject: [PATCH 7356/8469] Prefer native strings on Python 2 when reading config files. Fixes #1653. --- setuptools/dist.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index b8551228eb..ddb1787ad0 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -603,7 +603,7 @@ def _parse_config_files(self, filenames=None): for opt in options: if opt != '__name__' and opt not in ignore_options: - val = parser.get(section, opt) + val = self._try_str(parser.get(section, opt)) opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) @@ -627,6 +627,26 @@ def _parse_config_files(self, filenames=None): except ValueError as msg: raise DistutilsOptionError(msg) + @staticmethod + def _try_str(val): + """ + On Python 2, much of distutils relies on string values being of + type 'str' (bytes) and not unicode text. If the value can be safely + encoded to bytes using the default encoding, prefer that. + + Why the default encoding? Because that value can be implicitly + decoded back to text if needed. + + Ref #1653 + """ + if six.PY3: + return val + try: + return val.encode() + except UnicodeEncodeError: + pass + return val + def _set_command_options(self, command_obj, option_dict=None): """ Set the options for 'command_obj' from 'option_dict'. Basically From 32c2ec8bab51ca5b4609cefc3dc4eb9c4b0d5b87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Jan 2019 17:57:35 -0500 Subject: [PATCH 7357/8469] Add changelog --- changelog.d/1660.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1660.change.rst diff --git a/changelog.d/1660.change.rst b/changelog.d/1660.change.rst new file mode 100644 index 0000000000..52f6239786 --- /dev/null +++ b/changelog.d/1660.change.rst @@ -0,0 +1 @@ +On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations. From 5133d86c3e71709f59fbb9c5b60577bcdb8a7698 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Jan 2019 19:08:28 -0500 Subject: [PATCH 7358/8469] =?UTF-8?q?Bump=20version:=2040.7.0=20=E2=86=92?= =?UTF-8?q?=2040.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1660.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1660.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index ca7122e993..79ebe16533 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.7.1 +------- + +* #1660: On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations. + + v40.7.0 ------- diff --git a/changelog.d/1660.change.rst b/changelog.d/1660.change.rst deleted file mode 100644 index 52f6239786..0000000000 --- a/changelog.d/1660.change.rst +++ /dev/null @@ -1 +0,0 @@ -On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations. diff --git a/setup.cfg b/setup.cfg index 78eb7596fd..c934e2f484 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.7.0 +current_version = 40.7.1 commit = True tag = True diff --git a/setup.py b/setup.py index 00db0f0a33..9e50513b47 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.7.0", + version="40.7.1", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 260bbe545e15ea75782c540c421da6c0a67abfd5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Jan 2019 20:46:48 -0500 Subject: [PATCH 7359/8469] Ensure a specified port in package_index isn't lost in the parse/unparse of the URL when auth is present. Fixes #1663. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 7e9517cefa..ea76c00502 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1072,7 +1072,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): if auth: auth = "Basic " + _encode_auth(auth) - parts = scheme, parsed.hostname, path, params, query, frag + parts = scheme, netloc, path, params, query, frag new_url = urllib.parse.urlunparse(parts) request = urllib.request.Request(new_url) request.add_header("Authorization", auth) From d3afa2f5c5521412188bd7698526378353455820 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Jan 2019 20:54:02 -0500 Subject: [PATCH 7360/8469] Add changelog --- changelog.d/1665.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1665.change.rst diff --git a/changelog.d/1665.change.rst b/changelog.d/1665.change.rst new file mode 100644 index 0000000000..55a1c0f1db --- /dev/null +++ b/changelog.d/1665.change.rst @@ -0,0 +1 @@ +Restore port in URL handling in package_index. From 39130a855560e2838ce3cd899d8e7406fcdb4006 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Jan 2019 20:56:25 -0500 Subject: [PATCH 7361/8469] Rename changelog to reflect new PR --- changelog.d/{1665.change.rst => 1666.change.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{1665.change.rst => 1666.change.rst} (100%) diff --git a/changelog.d/1665.change.rst b/changelog.d/1666.change.rst similarity index 100% rename from changelog.d/1665.change.rst rename to changelog.d/1666.change.rst From 28605704049b638d9a71c010b7cbe8dc6a8d37fc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Jan 2019 20:57:40 -0500 Subject: [PATCH 7362/8469] =?UTF-8?q?Bump=20version:=2040.7.1=20=E2=86=92?= =?UTF-8?q?=2040.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1666.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1666.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 79ebe16533..7d1353b4d1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.7.2 +------- + +* #1666: Restore port in URL handling in package_index. + + v40.7.1 ------- diff --git a/changelog.d/1666.change.rst b/changelog.d/1666.change.rst deleted file mode 100644 index 55a1c0f1db..0000000000 --- a/changelog.d/1666.change.rst +++ /dev/null @@ -1 +0,0 @@ -Restore port in URL handling in package_index. diff --git a/setup.cfg b/setup.cfg index c934e2f484..16db122160 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.7.1 +current_version = 40.7.2 commit = True tag = True diff --git a/setup.py b/setup.py index 9e50513b47..a009f17918 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.7.1", + version="40.7.2", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From d012529dbc6576dd5cfe31cafea3d8061ec5ef4f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Fri, 1 Feb 2019 13:56:25 -0500 Subject: [PATCH 7363/8469] Drop build-backend from pyproject.toml Because we do not include setuptools in our build requirements and there is no mechanism for a PEP 517 backend to bootstrap itself, setuptools cannot use setuptools.build_meta as its backend, and cannot use PEP 517 to build itself. Additionally, if you specify build-backend, it is impossible to disable PEP 517 builds with pip's --no-use-pep517 flag. --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4ef804ecdc..07c23bb5f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] requires = ["wheel"] -build-backend = "setuptools.build_meta" [tool.towncrier] package = "setuptools" From 0830a69efde3d561c2025bdfa1fae10dcbbcc8ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Feb 2019 09:22:19 -0500 Subject: [PATCH 7364/8469] Revert to using a copy of splituser from Python 3.8. Using urllib.parse.urlparse is clumsy and causes problems as reported in #1663 and #1668. Alternative to #1499 and fixes #1668. --- setuptools/package_index.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ea76c00502..05c9e34125 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -850,16 +850,13 @@ def _download_html(self, url, headers, filename): def _download_svn(self, url, filename): warnings.warn("SVN download support is deprecated", UserWarning) - def splituser(host): - user, delim, host = host.rpartition('@') - return user, host url = url.split('#', 1)[0] # remove any fragment for svn's sake creds = '' if url.lower().startswith('svn:') and '@' in url: scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/', 1) - auth, host = splituser(netloc) + auth, host = _splituser(netloc) if auth: if ':' in auth: user, pw = auth.split(':', 1) @@ -1058,8 +1055,8 @@ def open_with_auth(url, opener=urllib.request.urlopen): if netloc.endswith(':'): raise http_client.InvalidURL("nonnumeric port: ''") - if scheme in ('http', 'https') and parsed.username: - auth = ':'.join((parsed.username, parsed.password)) + if scheme in ('http', 'https'): + auth, address = _splituser(netloc) else: auth = None @@ -1072,7 +1069,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): if auth: auth = "Basic " + _encode_auth(auth) - parts = scheme, netloc, path, params, query, frag + parts = scheme, address, path, params, query, frag new_url = urllib.parse.urlunparse(parts) request = urllib.request.Request(new_url) request.add_header("Authorization", auth) @@ -1093,6 +1090,13 @@ def open_with_auth(url, opener=urllib.request.urlopen): return fp +# copy of urllib.parse._splituser from Python 3.8 +def _splituser(host): + """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" + user, delim, host = host.rpartition('@') + return (user if delim else None), host + + # adding a timeout to avoid freezing package_index open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth) From c65337e4b58523ff0db5d57d004cada74178bf74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Feb 2019 09:32:29 -0500 Subject: [PATCH 7365/8469] Add change description --- changelog.d/1670.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1670.change.rst diff --git a/changelog.d/1670.change.rst b/changelog.d/1670.change.rst new file mode 100644 index 0000000000..abad7950a7 --- /dev/null +++ b/changelog.d/1670.change.rst @@ -0,0 +1 @@ +In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use ``urllib.parse.urlparse`` led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668. From be840c2fe49766e3311475441b123a4eb3ba473a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Feb 2019 10:17:02 -0500 Subject: [PATCH 7366/8469] Also restore port consideration when re-injecting credentials for found links. --- setuptools/package_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 05c9e34125..705a47cf80 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1083,7 +1083,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): # Put authentication info back into request URL if same host, # so that links found on the page will work s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url) - if s2 == scheme and h2 == parsed.hostname: + if s2 == scheme and h2 == address: parts = s2, netloc, path2, param2, query2, frag2 fp.url = urllib.parse.urlunparse(parts) From a08cf8bc0d4d06b9f185b62518f173ebd1d4c9f1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Feb 2019 10:25:50 -0500 Subject: [PATCH 7367/8469] =?UTF-8?q?Bump=20version:=2040.7.2=20=E2=86=92?= =?UTF-8?q?=2040.7.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 6 ++++++ changelog.d/1670.change.rst | 1 - setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1670.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 7d1353b4d1..62896220d2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v40.7.3 +------- + +* #1670: In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use ``urllib.parse.urlparse`` led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668. + + v40.7.2 ------- diff --git a/changelog.d/1670.change.rst b/changelog.d/1670.change.rst deleted file mode 100644 index abad7950a7..0000000000 --- a/changelog.d/1670.change.rst +++ /dev/null @@ -1 +0,0 @@ -In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use ``urllib.parse.urlparse`` led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668. diff --git a/setup.cfg b/setup.cfg index 16db122160..4261f9b619 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.7.2 +current_version = 40.7.3 commit = True tag = True diff --git a/setup.py b/setup.py index a009f17918..b3e1cc7ef3 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.7.2", + version="40.7.3", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 74c323d1658f554b879ef6ac2867faf77776a2ac Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 11:45:10 -0500 Subject: [PATCH 7368/8469] Wrap build_meta backend in a class In order to support both the `build_meta` and `build_meta_legacy` backends, the core functionality is wrapped in a class with methods to be overridden in build_meta_legacy. The class is an implementation detail and should remain private. --- setuptools/build_meta.py | 187 ++++++++++++++++++++------------------- 1 file changed, 97 insertions(+), 90 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index c883d92f14..f40549e709 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -74,81 +74,11 @@ def _to_str(s): 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 - __file__ = setup_script - __name__ = '__main__' - f = getattr(tokenize, 'open', open)(__file__) - code = f.read().replace('\\r\\n', '\\n') - f.close() - exec(compile(code, __file__, 'exec'), locals()) - - -def _fix_config(config_settings): - config_settings = config_settings or {} - config_settings.setdefault('--global-option', []) - return config_settings - - -def _get_build_requires(config_settings, requirements): - config_settings = _fix_config(config_settings) - - sys.argv = sys.argv[:1] + ['egg_info'] + \ - config_settings["--global-option"] - try: - with Distribution.patch(): - _run_setup() - except SetupRequirementsError as e: - requirements += e.specifiers - - return requirements - - def _get_immediate_subdirectories(a_dir): return [name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))] -def get_requires_for_build_wheel(config_settings=None): - config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings, requirements=['wheel']) - - -def get_requires_for_build_sdist(config_settings=None): - config_settings = _fix_config(config_settings) - return _get_build_requires(config_settings, requirements=[]) - - -def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): - sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)] - _run_setup() - - dist_info_directory = metadata_directory - while True: - dist_infos = [f for f in os.listdir(dist_info_directory) - if f.endswith('.dist-info')] - - if len(dist_infos) == 0 and \ - len(_get_immediate_subdirectories(dist_info_directory)) == 1: - dist_info_directory = os.path.join( - dist_info_directory, os.listdir(dist_info_directory)[0]) - continue - - assert len(dist_infos) == 1 - break - - # PEP 517 requires that the .dist-info directory be placed in the - # metadata_directory. To comply, we MUST copy the directory to the root - if dist_info_directory != metadata_directory: - shutil.move( - os.path.join(dist_info_directory, dist_infos[0]), - metadata_directory) - shutil.rmtree(dist_info_directory, ignore_errors=True) - - return dist_infos[0] - - def _file_with_extension(directory, extension): matching = ( f for f in os.listdir(directory) @@ -158,26 +88,103 @@ def _file_with_extension(directory, extension): return file -def build_wheel(wheel_directory, config_settings=None, - metadata_directory=None): - config_settings = _fix_config(config_settings) - wheel_directory = os.path.abspath(wheel_directory) - sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ - config_settings["--global-option"] - _run_setup() - if wheel_directory != 'dist': - shutil.rmtree(wheel_directory) - shutil.copytree('dist', wheel_directory) +class _BuildMetaBackend(object): - return _file_with_extension(wheel_directory, '.whl') + def _fix_config(self, config_settings): + config_settings = config_settings or {} + config_settings.setdefault('--global-option', []) + return config_settings + def _get_build_requires(self, config_settings, requirements): + config_settings = self._fix_config(config_settings) -def build_sdist(sdist_directory, config_settings=None): - config_settings = _fix_config(config_settings) - sdist_directory = os.path.abspath(sdist_directory) - sys.argv = sys.argv[:1] + ['sdist', '--formats', 'gztar'] + \ - config_settings["--global-option"] + \ - ["--dist-dir", sdist_directory] - _run_setup() - - return _file_with_extension(sdist_directory, '.tar.gz') + sys.argv = sys.argv[:1] + ['egg_info'] + \ + config_settings["--global-option"] + try: + with Distribution.patch(): + self.run_setup() + except SetupRequirementsError as e: + requirements += e.specifiers + + return requirements + + def run_setup(self, setup_script='setup.py'): + # Note that we can reuse our build directory between calls + # Correctness comes first, then optimization later + __file__ = setup_script + __name__ = '__main__' + f = getattr(tokenize, 'open', open)(__file__) + code = f.read().replace('\\r\\n', '\\n') + f.close() + exec(compile(code, __file__, 'exec'), locals()) + + def get_requires_for_build_wheel(self, config_settings=None): + config_settings = self._fix_config(config_settings) + return self._get_build_requires(config_settings, requirements=['wheel']) + + def get_requires_for_build_sdist(self, config_settings=None): + config_settings = self._fix_config(config_settings) + return self._get_build_requires(config_settings, requirements=[]) + + def prepare_metadata_for_build_wheel(self, metadata_directory, + config_settings=None): + sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', + _to_str(metadata_directory)] + self.run_setup() + + dist_info_directory = metadata_directory + while True: + dist_infos = [f for f in os.listdir(dist_info_directory) + if f.endswith('.dist-info')] + + if (len(dist_infos) == 0 and + len(_get_immediate_subdirectories(dist_info_directory)) == 1): + + dist_info_directory = os.path.join( + dist_info_directory, os.listdir(dist_info_directory)[0]) + continue + + assert len(dist_infos) == 1 + break + + # PEP 517 requires that the .dist-info directory be placed in the + # metadata_directory. To comply, we MUST copy the directory to the root + if dist_info_directory != metadata_directory: + shutil.move( + os.path.join(dist_info_directory, dist_infos[0]), + metadata_directory) + shutil.rmtree(dist_info_directory, ignore_errors=True) + + return dist_infos[0] + + def build_wheel(self, wheel_directory, config_settings=None, + metadata_directory=None): + config_settings = self._fix_config(config_settings) + wheel_directory = os.path.abspath(wheel_directory) + sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ + config_settings["--global-option"] + self.run_setup() + if wheel_directory != 'dist': + shutil.rmtree(wheel_directory) + shutil.copytree('dist', wheel_directory) + + return _file_with_extension(wheel_directory, '.whl') + + def build_sdist(self, sdist_directory, config_settings=None): + config_settings = self._fix_config(config_settings) + sdist_directory = os.path.abspath(sdist_directory) + sys.argv = sys.argv[:1] + ['sdist', '--formats', 'gztar'] + \ + config_settings["--global-option"] + \ + ["--dist-dir", sdist_directory] + self.run_setup() + + return _file_with_extension(sdist_directory, '.tar.gz') + + +_BACKEND = _BuildMetaBackend() + +get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel +get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist +prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel +build_wheel = _BACKEND.build_wheel +build_sdist = _BACKEND.build_sdist From f40a47a776904b09747502a1f210af9fc92ec542 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 11:46:21 -0500 Subject: [PATCH 7369/8469] Add __all__ to setuptools.build_meta --- setuptools/build_meta.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index f40549e709..8e31a04d45 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -35,6 +35,12 @@ import setuptools import distutils +__all__ = ['get_requires_for_build_sdist', + 'get_requires_for_build_wheel', + 'prepare_metadata_for_build_wheel', + 'build_wheel', + 'build_sdist', + 'SetupRequirementsError'] class SetupRequirementsError(BaseException): def __init__(self, specifiers): From 6d0daf14277223da4e32093c00157ae5b26d1ece Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 12:11:21 -0500 Subject: [PATCH 7370/8469] Wrap build_meta tests in a reusable test class --- setuptools/tests/test_build_meta.py | 268 ++++++++++++++-------------- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 82b44c8944..a9865382eb 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -6,7 +6,6 @@ import pytest -from setuptools.build_meta import build_sdist from .files import build_files from .textwrap import DALS from . import py2_only @@ -103,136 +102,137 @@ def run(): ] -@pytest.fixture(params=defns) -def build_backend(tmpdir, request): - build_files(request.param, prefix=str(tmpdir)) - with tmpdir.as_cwd(): - yield BuildBackend(cwd='.') - - -def test_get_requires_for_build_wheel(build_backend): - actual = build_backend.get_requires_for_build_wheel() - expected = ['six', 'wheel'] - assert sorted(actual) == sorted(expected) - - -def test_get_requires_for_build_sdist(build_backend): - actual = build_backend.get_requires_for_build_sdist() - expected = ['six'] - assert sorted(actual) == sorted(expected) - - -def test_build_wheel(build_backend): - dist_dir = os.path.abspath('pip-wheel') - os.makedirs(dist_dir) - wheel_name = build_backend.build_wheel(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, wheel_name)) - - -def test_build_sdist(build_backend): - dist_dir = os.path.abspath('pip-sdist') - os.makedirs(dist_dir) - sdist_name = build_backend.build_sdist(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) - - -def test_prepare_metadata_for_build_wheel(build_backend): - dist_dir = os.path.abspath('pip-dist-info') - os.makedirs(dist_dir) - - dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) - - -@py2_only -def test_prepare_metadata_for_build_wheel_with_str(build_backend): - dist_dir = os.path.abspath(str('pip-dist-info')) - os.makedirs(dist_dir) - - dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) - - -def test_build_sdist_explicit_dist(build_backend): - # explicitly specifying the dist folder should work - # the folder sdist_directory and the ``--dist-dir`` can be the same - dist_dir = os.path.abspath('dist') - sdist_name = build_backend.build_sdist(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, sdist_name)) - - -def test_build_sdist_version_change(build_backend): - sdist_into_directory = os.path.abspath("out_sdist") - os.makedirs(sdist_into_directory) - - sdist_name = build_backend.build_sdist(sdist_into_directory) - assert os.path.isfile(os.path.join(sdist_into_directory, sdist_name)) - - # if the setup.py changes subsequent call of the build meta - # should still succeed, given the - # sdist_directory the frontend specifies is empty - with open(os.path.abspath("setup.py"), 'rt') as file_handler: - content = file_handler.read() - with open(os.path.abspath("setup.py"), 'wt') as file_handler: - file_handler.write( - content.replace("version='0.0.0'", "version='0.0.1'")) - - shutil.rmtree(sdist_into_directory) - os.makedirs(sdist_into_directory) - - sdist_name = build_backend.build_sdist("out_sdist") - assert os.path.isfile( - os.path.join(os.path.abspath("out_sdist"), sdist_name)) - - -def test_build_sdist_setup_py_exists(tmpdir_cwd): - # If build_sdist is called from a script other than setup.py, - # ensure setup.py is include - build_files(defns[0]) - targz_path = build_sdist("temp") - with tarfile.open(os.path.join("temp", targz_path)) as tar: - assert any('setup.py' in name for name in tar.getnames()) - - -def test_build_sdist_setup_py_manifest_excluded(tmpdir_cwd): - # Ensure that MANIFEST.in can exclude setup.py - files = { - 'setup.py': DALS(""" - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'] - )"""), - 'hello.py': '', - 'MANIFEST.in': DALS(""" - exclude setup.py - """) - } - - build_files(files) - targz_path = build_sdist("temp") - with tarfile.open(os.path.join("temp", targz_path)) as tar: - assert not any('setup.py' in name for name in tar.getnames()) - - -def test_build_sdist_builds_targz_even_if_zip_indicated(tmpdir_cwd): - files = { - 'setup.py': DALS(""" - __import__('setuptools').setup( - name='foo', - version='0.0.0', - py_modules=['hello'] - )"""), - 'hello.py': '', - 'setup.cfg': DALS(""" - [sdist] - formats=zip - """) - } - - build_files(files) - build_sdist("temp") +class TestBuildMetaBackend: + backend_name = 'setuptools.build_meta' + + def get_build_backend(self): + return BuildBackend(cwd='.', backend_name=self.backend_name) + + @pytest.fixture(params=defns) + def build_backend(self, tmpdir, request): + build_files(request.param, prefix=str(tmpdir)) + with tmpdir.as_cwd(): + yield self.get_build_backend() + + def test_get_requires_for_build_wheel(self, build_backend): + actual = build_backend.get_requires_for_build_wheel() + expected = ['six', 'wheel'] + assert sorted(actual) == sorted(expected) + + def test_get_requires_for_build_sdist(self, build_backend): + actual = build_backend.get_requires_for_build_sdist() + expected = ['six'] + assert sorted(actual) == sorted(expected) + + def test_build_wheel(self, build_backend): + dist_dir = os.path.abspath('pip-wheel') + os.makedirs(dist_dir) + wheel_name = build_backend.build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, wheel_name)) + + def test_build_sdist(self, build_backend): + dist_dir = os.path.abspath('pip-sdist') + os.makedirs(dist_dir) + sdist_name = build_backend.build_sdist(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + + def test_prepare_metadata_for_build_wheel(self, build_backend): + dist_dir = os.path.abspath('pip-dist-info') + os.makedirs(dist_dir) + + dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) + + @py2_only + def test_prepare_metadata_for_build_wheel_with_str(self, build_backend): + dist_dir = os.path.abspath(str('pip-dist-info')) + os.makedirs(dist_dir) + + dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) + + def test_build_sdist_explicit_dist(self, build_backend): + # explicitly specifying the dist folder should work + # the folder sdist_directory and the ``--dist-dir`` can be the same + dist_dir = os.path.abspath('dist') + sdist_name = build_backend.build_sdist(dist_dir) + assert os.path.isfile(os.path.join(dist_dir, sdist_name)) + + def test_build_sdist_version_change(self, build_backend): + sdist_into_directory = os.path.abspath("out_sdist") + os.makedirs(sdist_into_directory) + + sdist_name = build_backend.build_sdist(sdist_into_directory) + assert os.path.isfile(os.path.join(sdist_into_directory, sdist_name)) + + # if the setup.py changes subsequent call of the build meta + # should still succeed, given the + # sdist_directory the frontend specifies is empty + with open(os.path.abspath("setup.py"), 'rt') as file_handler: + content = file_handler.read() + with open(os.path.abspath("setup.py"), 'wt') as file_handler: + file_handler.write( + content.replace("version='0.0.0'", "version='0.0.1'")) + + shutil.rmtree(sdist_into_directory) + os.makedirs(sdist_into_directory) + + sdist_name = build_backend.build_sdist("out_sdist") + assert os.path.isfile( + os.path.join(os.path.abspath("out_sdist"), sdist_name)) + + def test_build_sdist_setup_py_exists(self, tmpdir_cwd): + # If build_sdist is called from a script other than setup.py, + # ensure setup.py is included + build_files(defns[0]) + + build_backend = self.get_build_backend() + targz_path = build_backend.build_sdist("temp") + with tarfile.open(os.path.join("temp", targz_path)) as tar: + assert any('setup.py' in name for name in tar.getnames()) + + def test_build_sdist_setup_py_manifest_excluded(self, tmpdir_cwd): + # Ensure that MANIFEST.in can exclude setup.py + files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'] + )"""), + 'hello.py': '', + 'MANIFEST.in': DALS(""" + exclude setup.py + """) + } + + build_files(files) + + build_backend = self.get_build_backend() + targz_path = build_backend.build_sdist("temp") + with tarfile.open(os.path.join("temp", targz_path)) as tar: + assert not any('setup.py' in name for name in tar.getnames()) + + def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): + files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'] + )"""), + 'hello.py': '', + 'setup.cfg': DALS(""" + [sdist] + formats=zip + """) + } + + build_files(files) + + build_backend = self.get_build_backend() + build_backend.build_sdist("temp") From bd800f4c793fdcff2347a263c39c4256107b417f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 12:24:15 -0500 Subject: [PATCH 7371/8469] Add test for relative path imports in build_meta Failing test adapted from PR #1643 Co-authored-by: Tzu-ping Chung --- setuptools/tests/test_build_meta.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a9865382eb..8222b8a2ea 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -236,3 +236,23 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): build_backend = self.get_build_backend() build_backend.build_sdist("temp") + + _relative_path_import_files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version=__import__('hello').__version__, + py_modules=['hello'] + )"""), + 'hello.py': '__version__ = "0.0.0"', + 'setup.cfg': DALS(""" + [sdist] + formats=zip + """) + } + + def test_build_sdist_relative_path_import(self, tmpdir_cwd): + build_files(self._relative_path_import_files) + build_backend = self.get_build_backend() + with pytest.raises(ImportError): + build_backend.build_sdist("temp") From a114112ea5e6df87a826e0fa2927cffd2472aec1 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 12:16:14 -0500 Subject: [PATCH 7372/8469] Add failing test suite for build_meta_legacy This runs all build_meta tests, plus a test that it is possible to import from the directory containing `setup.py` when using the build_meta_legacy backend. --- setuptools/tests/test_build_meta.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 8222b8a2ea..5d97ebcec2 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -256,3 +256,16 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_backend = self.get_build_backend() with pytest.raises(ImportError): build_backend.build_sdist("temp") + + +@pytest.mark.xfail +class TestBuildMetaLegacyBackend(TestBuildMetaBackend): + backend_name = 'setuptools.build_meta_legacy' + + # build_meta_legacy-specific tests + def test_build_sdist_relative_path_import(self, tmpdir_cwd): + # This must fail in build_meta, but must pass in build_meta_legacy + build_files(self._relative_path_import_files) + + build_backend = self.get_build_backend() + build_backend.build_sdist("temp") From fd3b06dae1a33b3131cf96ddb9d7938430b9d8b5 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 12:31:28 -0500 Subject: [PATCH 7373/8469] Add build_meta_legacy backend This is part of the solution to GH #1642, it is a backwards-compatibility backend that can be used as a default PEP 517 backend for projects that use setuptools but haven't opted in to build_meta. --- setuptools/build_meta_legacy.py | 44 +++++++++++++++++++++++++++++ setuptools/tests/test_build_meta.py | 1 - 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 setuptools/build_meta_legacy.py diff --git a/setuptools/build_meta_legacy.py b/setuptools/build_meta_legacy.py new file mode 100644 index 0000000000..7eed41f111 --- /dev/null +++ b/setuptools/build_meta_legacy.py @@ -0,0 +1,44 @@ +"""Compatibility backend for setuptools + +This is a version of setuptools.build_meta that endeavors to maintain backwards +compatibility with pre-PEP 517 modes of invocation. It exists as a temporary +bridge between the old packaging mechanism and the new packaging mechanism, +and will eventually be removed. +""" + +import sys + +from setuptools.build_meta import _BuildMetaBackend +from setuptools.build_meta import SetupRequirementsError + + +__all__ = ['get_requires_for_build_sdist', + 'get_requires_for_build_wheel', + 'prepare_metadata_for_build_wheel', + 'build_wheel', + 'build_sdist', + 'SetupRequirementsError'] + + +class _BuildMetaLegacyBackend(_BuildMetaBackend): + def run_setup(self, setup_script='setup.py'): + # In order to maintain compatibility with scripts assuming that + # the setup.py script is in a directory on the PYTHONPATH, inject + # '' into sys.path. (pypa/setuptools#1642) + sys_path = list(sys.path) # Save the old path + if '' not in sys.path: + sys.path.insert(0, '') + + super(_BuildMetaLegacyBackend, + self).run_setup(setup_script=setup_script) + + sys.path = sys_path # Restore the old path + + +_BACKEND = _BuildMetaLegacyBackend() + +get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel +get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist +prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel +build_wheel = _BACKEND.build_wheel +build_sdist = _BACKEND.build_sdist diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 5d97ebcec2..b29d6f29e5 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -258,7 +258,6 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_backend.build_sdist("temp") -@pytest.mark.xfail class TestBuildMetaLegacyBackend(TestBuildMetaBackend): backend_name = 'setuptools.build_meta_legacy' From 90a8701ae4088db2092a574c39c9ee56efc7eb6b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 27 Jan 2019 12:51:05 -0500 Subject: [PATCH 7374/8469] Add news fragment for PR #1652 --- changelog.d/1652.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1652.change.rst diff --git a/changelog.d/1652.change.rst b/changelog.d/1652.change.rst new file mode 100644 index 0000000000..f535769942 --- /dev/null +++ b/changelog.d/1652.change.rst @@ -0,0 +1 @@ +Added the ``build_meta_legacy`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. From 49d17725a0ad02552babbdc79c737cfb27430f4f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 28 Jan 2019 09:22:49 -0500 Subject: [PATCH 7375/8469] Set sys.path in try/finally block with comment Per Nick Coghlan's suggestion on PR #1652, a try/finally block ensures that the path is restored even in the event of an error. --- setuptools/build_meta_legacy.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/setuptools/build_meta_legacy.py b/setuptools/build_meta_legacy.py index 7eed41f111..03492da9b5 100644 --- a/setuptools/build_meta_legacy.py +++ b/setuptools/build_meta_legacy.py @@ -6,6 +6,7 @@ and will eventually be removed. """ +import os import sys from setuptools.build_meta import _BuildMetaBackend @@ -25,14 +26,21 @@ def run_setup(self, setup_script='setup.py'): # In order to maintain compatibility with scripts assuming that # the setup.py script is in a directory on the PYTHONPATH, inject # '' into sys.path. (pypa/setuptools#1642) - sys_path = list(sys.path) # Save the old path - if '' not in sys.path: - sys.path.insert(0, '') - - super(_BuildMetaLegacyBackend, - self).run_setup(setup_script=setup_script) - - sys.path = sys_path # Restore the old path + sys_path = list(sys.path) # Save the original path + + try: + if '' not in sys.path: + sys.path.insert(0, '') + + super(_BuildMetaLegacyBackend, + self).run_setup(setup_script=setup_script) + finally: + # While PEP 517 frontends should be calling each hook in a fresh + # subprocess according to the standard (and thus it should not be + # strictly necessary to restore the old sys.path), we'll restore + # the original path so that the path manipulation does not persist + # within the hook after run_setup is called. + sys.path[:] = sys_path _BACKEND = _BuildMetaLegacyBackend() From db590baf81ebcb23605da54118905437412228ce Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 28 Jan 2019 09:25:03 -0500 Subject: [PATCH 7376/8469] Use absolute path in build_meta_legacy Using the absolute path to the directory of the setup script better mimics the semantics of a direct invocation of python setup.py. --- setuptools/build_meta_legacy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/build_meta_legacy.py b/setuptools/build_meta_legacy.py index 03492da9b5..3d209711fe 100644 --- a/setuptools/build_meta_legacy.py +++ b/setuptools/build_meta_legacy.py @@ -28,10 +28,11 @@ def run_setup(self, setup_script='setup.py'): # '' into sys.path. (pypa/setuptools#1642) sys_path = list(sys.path) # Save the original path - try: - if '' not in sys.path: - sys.path.insert(0, '') + script_dir = os.path.dirname(os.path.abspath(setup_script)) + if script_dir not in sys.path: + sys.path.insert(0, script_dir) + try: super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) finally: From 11fb3f38d23ff1e0d81e64ba3b68b3de2d2b990a Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sun, 3 Feb 2019 12:17:46 -0500 Subject: [PATCH 7377/8469] Move build_meta_legacy to build_meta:legacy Rather than exposing a top-level module for the legacy backend, we will move the legacy backend into the `setuptools.build_meta` module and specify it using the module:object syntax. --- changelog.d/1652.change.rst | 2 +- setuptools/build_meta.py | 35 +++++++++++++++++++ setuptools/build_meta_legacy.py | 53 ----------------------------- setuptools/tests/test_build_meta.py | 17 +++++++-- 4 files changed, 50 insertions(+), 57 deletions(-) delete mode 100644 setuptools/build_meta_legacy.py diff --git a/changelog.d/1652.change.rst b/changelog.d/1652.change.rst index f535769942..545365ac83 100644 --- a/changelog.d/1652.change.rst +++ b/changelog.d/1652.change.rst @@ -1 +1 @@ -Added the ``build_meta_legacy`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. +Added the ``build_meta:legacy`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 8e31a04d45..e16f319e3c 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -40,6 +40,7 @@ 'prepare_metadata_for_build_wheel', 'build_wheel', 'build_sdist', + 'legacy', 'SetupRequirementsError'] class SetupRequirementsError(BaseException): @@ -187,6 +188,36 @@ def build_sdist(self, sdist_directory, config_settings=None): return _file_with_extension(sdist_directory, '.tar.gz') +class _BuildMetaLegacyBackend(_BuildMetaBackend): + """Compatibility backend for setuptools + + This is a version of setuptools.build_meta that endeavors to maintain backwards + compatibility with pre-PEP 517 modes of invocation. It exists as a temporary + bridge between the old packaging mechanism and the new packaging mechanism, + and will eventually be removed. + """ + def run_setup(self, setup_script='setup.py'): + # In order to maintain compatibility with scripts assuming that + # the setup.py script is in a directory on the PYTHONPATH, inject + # '' into sys.path. (pypa/setuptools#1642) + sys_path = list(sys.path) # Save the original path + + script_dir = os.path.dirname(os.path.abspath(setup_script)) + if script_dir not in sys.path: + sys.path.insert(0, script_dir) + + try: + super(_BuildMetaLegacyBackend, + self).run_setup(setup_script=setup_script) + finally: + # While PEP 517 frontends should be calling each hook in a fresh + # subprocess according to the standard (and thus it should not be + # strictly necessary to restore the old sys.path), we'll restore + # the original path so that the path manipulation does not persist + # within the hook after run_setup is called. + sys.path[:] = sys_path + +# The primary backend _BACKEND = _BuildMetaBackend() get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel @@ -194,3 +225,7 @@ def build_sdist(self, sdist_directory, config_settings=None): prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel build_wheel = _BACKEND.build_wheel build_sdist = _BACKEND.build_sdist + + +# The legacy backend +legacy = _BuildMetaLegacyBackend() diff --git a/setuptools/build_meta_legacy.py b/setuptools/build_meta_legacy.py deleted file mode 100644 index 3d209711fe..0000000000 --- a/setuptools/build_meta_legacy.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Compatibility backend for setuptools - -This is a version of setuptools.build_meta that endeavors to maintain backwards -compatibility with pre-PEP 517 modes of invocation. It exists as a temporary -bridge between the old packaging mechanism and the new packaging mechanism, -and will eventually be removed. -""" - -import os -import sys - -from setuptools.build_meta import _BuildMetaBackend -from setuptools.build_meta import SetupRequirementsError - - -__all__ = ['get_requires_for_build_sdist', - 'get_requires_for_build_wheel', - 'prepare_metadata_for_build_wheel', - 'build_wheel', - 'build_sdist', - 'SetupRequirementsError'] - - -class _BuildMetaLegacyBackend(_BuildMetaBackend): - def run_setup(self, setup_script='setup.py'): - # In order to maintain compatibility with scripts assuming that - # the setup.py script is in a directory on the PYTHONPATH, inject - # '' into sys.path. (pypa/setuptools#1642) - sys_path = list(sys.path) # Save the original path - - script_dir = os.path.dirname(os.path.abspath(setup_script)) - if script_dir not in sys.path: - sys.path.insert(0, script_dir) - - try: - super(_BuildMetaLegacyBackend, - self).run_setup(setup_script=setup_script) - finally: - # While PEP 517 frontends should be calling each hook in a fresh - # subprocess according to the standard (and thus it should not be - # strictly necessary to restore the old sys.path), we'll restore - # the original path so that the path manipulation does not persist - # within the hook after run_setup is called. - sys.path[:] = sys_path - - -_BACKEND = _BuildMetaLegacyBackend() - -get_requires_for_build_wheel = _BACKEND.get_requires_for_build_wheel -get_requires_for_build_sdist = _BACKEND.get_requires_for_build_sdist -prepare_metadata_for_build_wheel = _BACKEND.prepare_metadata_for_build_wheel -build_wheel = _BACKEND.build_wheel -build_sdist = _BACKEND.build_sdist diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index b29d6f29e5..42e3098ae1 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -23,7 +23,6 @@ def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): self.env = env self.backend_name = backend_name - class BuildBackend(BuildBackendBase): """PEP 517 Build Backend""" @@ -43,12 +42,24 @@ def method(*args, **kw): class BuildBackendCaller(BuildBackendBase): + def __init__(self, *args, **kwargs): + super(BuildBackendCaller, self).__init__(*args, **kwargs) + + (self.backend_name, _, + self.backend_obj) = self.backend_name.partition(':') + def __call__(self, name, *args, **kw): """Handles aribrary function invocations on the build backend.""" os.chdir(self.cwd) os.environ.update(self.env) mod = importlib.import_module(self.backend_name) - return getattr(mod, name)(*args, **kw) + + if self.backend_obj: + backend = getattr(mod, self.backend_obj) + else: + backend = mod + + return getattr(backend, name)(*args, **kw) defns = [ @@ -259,7 +270,7 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): class TestBuildMetaLegacyBackend(TestBuildMetaBackend): - backend_name = 'setuptools.build_meta_legacy' + backend_name = 'setuptools.build_meta:legacy' # build_meta_legacy-specific tests def test_build_sdist_relative_path_import(self, tmpdir_cwd): From 95d86241efd33f8db71e72352b31185389f4d68d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 4 Feb 2019 17:15:13 -0800 Subject: [PATCH 7378/8469] bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744) --- command/build_ext.py | 5 +++-- sysconfig.py | 25 +++++++++++++++++++------ tests/test_build_ext.py | 6 ++++-- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 158465d233..0428466b00 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -161,9 +161,10 @@ def finalize_options(self): # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. - self.include_dirs.append(py_include) + self.include_dirs.extend(py_include.split(os.path.pathsep)) if plat_py_include != py_include: - self.include_dirs.append(plat_py_include) + self.include_dirs.extend( + plat_py_include.split(os.path.pathsep)) self.ensure_string_list('libraries') self.ensure_string_list('link_objects') diff --git a/sysconfig.py b/sysconfig.py index b433fc86ff..40af493cdf 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -29,9 +29,7 @@ project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) else: project_base = os.path.dirname(os.path.abspath(sys.executable)) -if (os.name == 'nt' and - project_base.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): - project_base = os.path.dirname(os.path.dirname(project_base)) + # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use @@ -41,16 +39,26 @@ def _is_python_source_dir(d): if os.path.isfile(os.path.join(d, "Modules", fn)): return True return False + _sys_home = getattr(sys, '_home', None) -if (_sys_home and os.name == 'nt' and - _sys_home.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))): - _sys_home = os.path.dirname(os.path.dirname(_sys_home)) + +if os.name == 'nt': + def _fix_pcbuild(d): + if d and os.path.normcase(d).startswith( + os.path.normcase(os.path.join(PREFIX, "PCbuild"))): + return PREFIX + return d + project_base = _fix_pcbuild(project_base) + _sys_home = _fix_pcbuild(_sys_home) + def _python_build(): if _sys_home: return _is_python_source_dir(_sys_home) return _is_python_source_dir(project_base) + python_build = _python_build() + # Calculate the build qualifier flags if they are defined. Adding the flags # to the include and lib directories only makes sense for an installation, not # an in-source build. @@ -99,6 +107,11 @@ def get_python_inc(plat_specific=0, prefix=None): python_dir = 'python' + get_python_version() + build_flags return os.path.join(prefix, "include", python_dir) elif os.name == "nt": + if python_build: + # Include both the include and PC dir to ensure we can find + # pyconfig.h + return (os.path.join(prefix, "include") + os.path.pathsep + + os.path.join(prefix, "PC")) return os.path.join(prefix, "include") else: raise DistutilsPlatformError( diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index a72218274c..88847f9e9a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -177,10 +177,12 @@ def test_finalize_options(self): cmd.finalize_options() py_include = sysconfig.get_python_inc() - self.assertIn(py_include, cmd.include_dirs) + for p in py_include.split(os.path.pathsep): + self.assertIn(p, cmd.include_dirs) plat_py_include = sysconfig.get_python_inc(plat_specific=1) - self.assertIn(plat_py_include, cmd.include_dirs) + for p in plat_py_include.split(os.path.pathsep): + self.assertIn(p, cmd.include_dirs) # make sure cmd.libraries is turned into a list # if it's a string From e04a41e3129fa9945e15b16fd6d65cc212c1d946 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 5 Feb 2019 08:42:36 -0500 Subject: [PATCH 7379/8469] Rename build_meta:legacy to build_meta:__legacy__ --- changelog.d/1652.change.rst | 2 +- setuptools/build_meta.py | 4 ++-- setuptools/tests/test_build_meta.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/changelog.d/1652.change.rst b/changelog.d/1652.change.rst index 545365ac83..387d212ced 100644 --- a/changelog.d/1652.change.rst +++ b/changelog.d/1652.change.rst @@ -1 +1 @@ -Added the ``build_meta:legacy`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. +Added the ``build_meta:__legacy__`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index e16f319e3c..70b7ab230e 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -40,7 +40,7 @@ 'prepare_metadata_for_build_wheel', 'build_wheel', 'build_sdist', - 'legacy', + '__legacy__', 'SetupRequirementsError'] class SetupRequirementsError(BaseException): @@ -228,4 +228,4 @@ def run_setup(self, setup_script='setup.py'): # The legacy backend -legacy = _BuildMetaLegacyBackend() +__legacy__ = _BuildMetaLegacyBackend() diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 42e3098ae1..6236b9f42b 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -270,7 +270,7 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): class TestBuildMetaLegacyBackend(TestBuildMetaBackend): - backend_name = 'setuptools.build_meta:legacy' + backend_name = 'setuptools.build_meta:__legacy__' # build_meta_legacy-specific tests def test_build_sdist_relative_path_import(self, tmpdir_cwd): From 794219ba05b20b83bae0b50e9b5058f7c8bc9508 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 5 Feb 2019 12:54:38 -0500 Subject: [PATCH 7380/8469] Update changelog for version 40.8.0 --- CHANGES.rst | 8 ++++++++ changelog.d/1536.change.rst | 3 --- changelog.d/1635.change.rst | 1 - changelog.d/1652.change.rst | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1536.change.rst delete mode 100644 changelog.d/1635.change.rst delete mode 100644 changelog.d/1652.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index 62896220d2..b043e449ab 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v40.8.0 +------- + +* #1652: Added the ``build_meta:__legacy__`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. +* #1635: Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors. +* #1536: ``setuptools`` will now automatically include licenses if ``setup.cfg`` contains a ``license_file`` attribute, unless this file is manually excluded inside ``MANIFEST.in``. + + v40.7.3 ------- diff --git a/changelog.d/1536.change.rst b/changelog.d/1536.change.rst deleted file mode 100644 index 8a69959cbd..0000000000 --- a/changelog.d/1536.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -``setuptools`` will now automatically include licenses if ``setup.cfg`` -contains a ``license_file`` attribute, unless this file is manually excluded -inside ``MANIFEST.in``. diff --git a/changelog.d/1635.change.rst b/changelog.d/1635.change.rst deleted file mode 100644 index d23f3fe30c..0000000000 --- a/changelog.d/1635.change.rst +++ /dev/null @@ -1 +0,0 @@ -Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors. diff --git a/changelog.d/1652.change.rst b/changelog.d/1652.change.rst deleted file mode 100644 index 387d212ced..0000000000 --- a/changelog.d/1652.change.rst +++ /dev/null @@ -1 +0,0 @@ -Added the ``build_meta:__legacy__`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. From c1243e96f05d3b13392a792144c97d9471581550 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 5 Feb 2019 13:13:51 -0500 Subject: [PATCH 7381/8469] =?UTF-8?q?Bump=20version:=2040.7.3=20=E2=86=92?= =?UTF-8?q?=2040.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4261f9b619..f0932e1c86 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.7.3 +current_version = 40.8.0 commit = True tag = True diff --git a/setup.py b/setup.py index b3e1cc7ef3..8ec7ce06e5 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.7.3", + version="40.8.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From 179115b198387a21202433ea61cc53f2efd383fc Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 31 Jan 2019 08:29:36 -0500 Subject: [PATCH 7382/8469] Add support for setup.cfg-only projects Many projects can get away with an empty `setup.py` and use *only* the declarative `setup.cfg`. With the new PEP 517 backend, we can supply a default empty `setup.py` if one is not provided. --- setuptools/build_meta.py | 16 +++++++++++++--- setuptools/tests/test_build_meta.py | 23 +++++++++++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 70b7ab230e..047cc07b69 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -26,6 +26,7 @@ Again, this is not a formal definition! Just a "taste" of the module. """ +import io import os import sys import tokenize @@ -95,6 +96,14 @@ def _file_with_extension(directory, extension): return file +def _open_setup_script(setup_script): + if not os.path.exists(setup_script): + # Supply a default setup.py + return io.StringIO(u"from setuptools import setup; setup()") + + return getattr(tokenize, 'open', open)(setup_script) + + class _BuildMetaBackend(object): def _fix_config(self, config_settings): @@ -120,9 +129,10 @@ def run_setup(self, setup_script='setup.py'): # Correctness comes first, then optimization later __file__ = setup_script __name__ = '__main__' - f = getattr(tokenize, 'open', open)(__file__) - code = f.read().replace('\\r\\n', '\\n') - f.close() + + with _open_setup_script(__file__) as f: + code = f.read().replace(r'\r\n', r'\n') + exec(compile(code, __file__, 'exec'), locals()) def get_requires_for_build_wheel(self, config_settings=None): diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 6236b9f42b..74969322c1 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -110,6 +110,21 @@ def run(): print('hello') """), }, + { + 'setup.cfg': DALS(""" + [metadata] + name = foo + version='0.0.0' + + [options] + py_modules=hello + setup_requires=six + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """) + }, ] @@ -183,9 +198,13 @@ def test_build_sdist_version_change(self, build_backend): # if the setup.py changes subsequent call of the build meta # should still succeed, given the # sdist_directory the frontend specifies is empty - with open(os.path.abspath("setup.py"), 'rt') as file_handler: + setup_loc = os.path.abspath("setup.py") + if not os.path.exists(setup_loc): + setup_loc = os.path.abspath("setup.cfg") + + with open(setup_loc, 'rt') as file_handler: content = file_handler.read() - with open(os.path.abspath("setup.py"), 'wt') as file_handler: + with open(setup_loc, 'wt') as file_handler: file_handler.write( content.replace("version='0.0.0'", "version='0.0.1'")) From 6bda3d5f1814b28a5a493363ca16228a4e37cd26 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 7 Feb 2019 08:12:48 -0500 Subject: [PATCH 7383/8469] Add changelog for PR #1675 --- changelog.d/1675.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1675.change.rst diff --git a/changelog.d/1675.change.rst b/changelog.d/1675.change.rst new file mode 100644 index 0000000000..e90676283f --- /dev/null +++ b/changelog.d/1675.change.rst @@ -0,0 +1 @@ +Added support for ``setup.cfg``-only projects when using the ``setuptools.build_meta`` backend. Projects that have enabled PEP 517 no longer need to have a ``setup.py`` and can use the purely declarative ``setup.cfg`` configuration file instead. From 3963268b5a22798e01b0deac0553be206b2a3837 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Tue, 12 Feb 2019 12:52:08 +0530 Subject: [PATCH 7384/8469] Update badges in README * Consistent Styling * Add Logos of CI services * Shorten CI badge labels * Reorder for better wrapping --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 0454f2eddd..bfbaaad82c 100644 --- a/README.rst +++ b/README.rst @@ -1,23 +1,23 @@ .. image:: https://img.shields.io/pypi/v/setuptools.svg :target: https://pypi.org/project/setuptools -.. image:: https://readthedocs.org/projects/setuptools/badge/?version=latest +.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg :target: https://setuptools.readthedocs.io -.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20build%20%40%20Travis%20CI +.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white :target: https://travis-ci.org/pypa/setuptools -.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20build%20%40%20Appveyor +.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master -.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg +.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white :target: https://codecov.io/gh/pypa/setuptools -.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg - -.. image:: https://tidelift.com/badges/github/pypa/setuptools +.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme +.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg + See the `Installation Instructions `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From ad98fcb350fa3ce63389520a391e23274de11064 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 Feb 2019 15:16:21 -0500 Subject: [PATCH 7385/8469] Add two tests capturing expectation for '' and None to _validate_resource_path. Ref #1686. --- pkg_resources/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index dcfa1d0843..5d66f6e034 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1512,6 +1512,19 @@ def _validate_resource_path(path): ... ValueError: Use of .. or absolute path in a resource path \ is not allowed. + + Blank values are allowed + + >>> vrp('') + >>> bool(warned) + False + + Non-string values are not. + + >>> vrp(None) + Traceback (most recent call last): + ... + AttributeError: ... """ invalid = ( os.path.pardir in path.split(posixpath.sep) or From f423812ac13d67c2bda112bda6fab7dc7a3dab92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 09:25:10 -0500 Subject: [PATCH 7386/8469] Move version to setup.cfg --- setup.cfg | 3 ++- setup.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index f0932e1c86..14245edda8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,7 @@ universal = 1 [metadata] license_file = LICENSE +version = 40.8.0 -[bumpversion:file:setup.py] +[bumpversion:file:setup.cfg] diff --git a/setup.py b/setup.py index 8ec7ce06e5..78d7018c98 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,6 @@ def pypi_link(pkg_filename): setup_params = dict( name="setuptools", - version="40.8.0", description=( "Easily download, build, install, upgrade, and uninstall " "Python packages" From fc61c27c1a96b371d9ffbafc2903aa045b4fab4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 10:06:20 -0500 Subject: [PATCH 7387/8469] Move bumpversion config to .bumpversion.cfg as it seems not to be possible to handle setup.cfg. Ref c4urself/bump2version#62. --- .bumpversion.cfg | 6 ++++++ setup.cfg | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000000..f4e8b40b94 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,6 @@ +[bumpversion] +current_version = 40.8.0 +commit = True +tag = True + +[bumpversion:file:setup.cfg] diff --git a/setup.cfg b/setup.cfg index 14245edda8..7a0fac154d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,3 @@ -[bumpversion] -current_version = 40.8.0 -commit = True -tag = True - [egg_info] tag_build = .post tag_date = 1 @@ -25,6 +20,3 @@ universal = 1 [metadata] license_file = LICENSE version = 40.8.0 - -[bumpversion:file:setup.cfg] - From 4a6b8ba7ced6bb841000a59bdef7f9879fb6578d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 15:42:23 -0500 Subject: [PATCH 7388/8469] Add test capturing expectation that provides_extras are ordered. --- setuptools/tests/test_dist.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 390c3dfcf0..e349d068f5 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -263,3 +263,16 @@ def test_maintainer_author(name, attrs, tmpdir): else: line = '%s: %s' % (fkey, val) assert line in pkg_lines_set + + +def test_provides_extras_deterministic_order(): + attrs = dict(extras_require=dict( + a=['foo'], + b=['bar'], + )) + dist = Distribution(attrs) + assert dist.metadata.provides_extras == ['a', 'b'] + attrs['extras_require'] = dict( + reversed(list(attrs['extras_require'].items()))) + dist = Distribution(attrs) + assert dist.metadata.provides_extras == ['b', 'a'] From 3d289a7015b9ba4f8dd29594309e472fd880841e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 17:01:57 -0500 Subject: [PATCH 7389/8469] Add 'ordered_set' as a vendored package --- setuptools/_vendor/ordered_set.py | 488 ++++++++++++++++++++++++++++++ setuptools/_vendor/vendored.txt | 1 + setuptools/extern/__init__.py | 2 +- 3 files changed, 490 insertions(+), 1 deletion(-) create mode 100644 setuptools/_vendor/ordered_set.py diff --git a/setuptools/_vendor/ordered_set.py b/setuptools/_vendor/ordered_set.py new file mode 100644 index 0000000000..d257470b8a --- /dev/null +++ b/setuptools/_vendor/ordered_set.py @@ -0,0 +1,488 @@ +""" +An OrderedSet is a custom MutableSet that remembers its order, so that every +entry has an index that can be looked up. + +Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger, +and released under the MIT license. +""" +import itertools as it +from collections import deque + +try: + # Python 3 + from collections.abc import MutableSet, Sequence +except ImportError: + # Python 2.7 + from collections import MutableSet, Sequence + +SLICE_ALL = slice(None) +__version__ = "3.1" + + +def is_iterable(obj): + """ + Are we being asked to look up a list of things, instead of a single thing? + We check for the `__iter__` attribute so that this can cover types that + don't have to be known by this module, such as NumPy arrays. + + Strings, however, should be considered as atomic values to look up, not + iterables. The same goes for tuples, since they are immutable and therefore + valid entries. + + We don't need to check for the Python 2 `unicode` type, because it doesn't + have an `__iter__` attribute anyway. + """ + return ( + hasattr(obj, "__iter__") + and not isinstance(obj, str) + and not isinstance(obj, tuple) + ) + + +class OrderedSet(MutableSet, Sequence): + """ + An OrderedSet is a custom MutableSet that remembers its order, so that + every entry has an index that can be looked up. + + Example: + >>> OrderedSet([1, 1, 2, 3, 2]) + OrderedSet([1, 2, 3]) + """ + + def __init__(self, iterable=None): + self.items = [] + self.map = {} + if iterable is not None: + self |= iterable + + def __len__(self): + """ + Returns the number of unique elements in the ordered set + + Example: + >>> len(OrderedSet([])) + 0 + >>> len(OrderedSet([1, 2])) + 2 + """ + return len(self.items) + + def __getitem__(self, index): + """ + Get the item at a given index. + + If `index` is a slice, you will get back that slice of items, as a + new OrderedSet. + + If `index` is a list or a similar iterable, you'll get a list of + items corresponding to those indices. This is similar to NumPy's + "fancy indexing". The result is not an OrderedSet because you may ask + for duplicate indices, and the number of elements returned should be + the number of elements asked for. + + Example: + >>> oset = OrderedSet([1, 2, 3]) + >>> oset[1] + 2 + """ + if isinstance(index, slice) and index == SLICE_ALL: + return self.copy() + elif hasattr(index, "__index__") or isinstance(index, slice): + result = self.items[index] + if isinstance(result, list): + return self.__class__(result) + else: + return result + elif is_iterable(index): + return [self.items[i] for i in index] + else: + raise TypeError("Don't know how to index an OrderedSet by %r" % index) + + def copy(self): + """ + Return a shallow copy of this object. + + Example: + >>> this = OrderedSet([1, 2, 3]) + >>> other = this.copy() + >>> this == other + True + >>> this is other + False + """ + return self.__class__(self) + + def __getstate__(self): + if len(self) == 0: + # The state can't be an empty list. + # We need to return a truthy value, or else __setstate__ won't be run. + # + # This could have been done more gracefully by always putting the state + # in a tuple, but this way is backwards- and forwards- compatible with + # previous versions of OrderedSet. + return (None,) + else: + return list(self) + + def __setstate__(self, state): + if state == (None,): + self.__init__([]) + else: + self.__init__(state) + + def __contains__(self, key): + """ + Test if the item is in this ordered set + + Example: + >>> 1 in OrderedSet([1, 3, 2]) + True + >>> 5 in OrderedSet([1, 3, 2]) + False + """ + return key in self.map + + def add(self, key): + """ + Add `key` as an item to this OrderedSet, then return its index. + + If `key` is already in the OrderedSet, return the index it already + had. + + Example: + >>> oset = OrderedSet() + >>> oset.append(3) + 0 + >>> print(oset) + OrderedSet([3]) + """ + if key not in self.map: + self.map[key] = len(self.items) + self.items.append(key) + return self.map[key] + + append = add + + def update(self, sequence): + """ + Update the set with the given iterable sequence, then return the index + of the last element inserted. + + Example: + >>> oset = OrderedSet([1, 2, 3]) + >>> oset.update([3, 1, 5, 1, 4]) + 4 + >>> print(oset) + OrderedSet([1, 2, 3, 5, 4]) + """ + item_index = None + try: + for item in sequence: + item_index = self.add(item) + except TypeError: + raise ValueError( + "Argument needs to be an iterable, got %s" % type(sequence) + ) + return item_index + + def index(self, key): + """ + Get the index of a given entry, raising an IndexError if it's not + present. + + `key` can be an iterable of entries that is not a string, in which case + this returns a list of indices. + + Example: + >>> oset = OrderedSet([1, 2, 3]) + >>> oset.index(2) + 1 + """ + if is_iterable(key): + return [self.index(subkey) for subkey in key] + return self.map[key] + + # Provide some compatibility with pd.Index + get_loc = index + get_indexer = index + + def pop(self): + """ + Remove and return the last element from the set. + + Raises KeyError if the set is empty. + + Example: + >>> oset = OrderedSet([1, 2, 3]) + >>> oset.pop() + 3 + """ + if not self.items: + raise KeyError("Set is empty") + + elem = self.items[-1] + del self.items[-1] + del self.map[elem] + return elem + + def discard(self, key): + """ + Remove an element. Do not raise an exception if absent. + + The MutableSet mixin uses this to implement the .remove() method, which + *does* raise an error when asked to remove a non-existent item. + + Example: + >>> oset = OrderedSet([1, 2, 3]) + >>> oset.discard(2) + >>> print(oset) + OrderedSet([1, 3]) + >>> oset.discard(2) + >>> print(oset) + OrderedSet([1, 3]) + """ + if key in self: + i = self.map[key] + del self.items[i] + del self.map[key] + for k, v in self.map.items(): + if v >= i: + self.map[k] = v - 1 + + def clear(self): + """ + Remove all items from this OrderedSet. + """ + del self.items[:] + self.map.clear() + + def __iter__(self): + """ + Example: + >>> list(iter(OrderedSet([1, 2, 3]))) + [1, 2, 3] + """ + return iter(self.items) + + def __reversed__(self): + """ + Example: + >>> list(reversed(OrderedSet([1, 2, 3]))) + [3, 2, 1] + """ + return reversed(self.items) + + def __repr__(self): + if not self: + return "%s()" % (self.__class__.__name__,) + return "%s(%r)" % (self.__class__.__name__, list(self)) + + def __eq__(self, other): + """ + Returns true if the containers have the same items. If `other` is a + Sequence, then order is checked, otherwise it is ignored. + + Example: + >>> oset = OrderedSet([1, 3, 2]) + >>> oset == [1, 3, 2] + True + >>> oset == [1, 2, 3] + False + >>> oset == [2, 3] + False + >>> oset == OrderedSet([3, 2, 1]) + False + """ + # In Python 2 deque is not a Sequence, so treat it as one for + # consistent behavior with Python 3. + if isinstance(other, (Sequence, deque)): + # Check that this OrderedSet contains the same elements, in the + # same order, as the other object. + return list(self) == list(other) + try: + other_as_set = set(other) + except TypeError: + # If `other` can't be converted into a set, it's not equal. + return False + else: + return set(self) == other_as_set + + def union(self, *sets): + """ + Combines all unique items. + Each items order is defined by its first appearance. + + Example: + >>> oset = OrderedSet.union(OrderedSet([3, 1, 4, 1, 5]), [1, 3], [2, 0]) + >>> print(oset) + OrderedSet([3, 1, 4, 5, 2, 0]) + >>> oset.union([8, 9]) + OrderedSet([3, 1, 4, 5, 2, 0, 8, 9]) + >>> oset | {10} + OrderedSet([3, 1, 4, 5, 2, 0, 10]) + """ + cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet + containers = map(list, it.chain([self], sets)) + items = it.chain.from_iterable(containers) + return cls(items) + + def __and__(self, other): + # the parent implementation of this is backwards + return self.intersection(other) + + def intersection(self, *sets): + """ + Returns elements in common between all sets. Order is defined only + by the first set. + + Example: + >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) + >>> print(oset) + OrderedSet([1, 2, 3]) + >>> oset.intersection([2, 4, 5], [1, 2, 3, 4]) + OrderedSet([2]) + >>> oset.intersection() + OrderedSet([1, 2, 3]) + """ + cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet + if sets: + common = set.intersection(*map(set, sets)) + items = (item for item in self if item in common) + else: + items = self + return cls(items) + + def difference(self, *sets): + """ + Returns all elements that are in this set but not the others. + + Example: + >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2])) + OrderedSet([1, 3]) + >>> OrderedSet([1, 2, 3]).difference(OrderedSet([2]), OrderedSet([3])) + OrderedSet([1]) + >>> OrderedSet([1, 2, 3]) - OrderedSet([2]) + OrderedSet([1, 3]) + >>> OrderedSet([1, 2, 3]).difference() + OrderedSet([1, 2, 3]) + """ + cls = self.__class__ + if sets: + other = set.union(*map(set, sets)) + items = (item for item in self if item not in other) + else: + items = self + return cls(items) + + def issubset(self, other): + """ + Report whether another set contains this set. + + Example: + >>> OrderedSet([1, 2, 3]).issubset({1, 2}) + False + >>> OrderedSet([1, 2, 3]).issubset({1, 2, 3, 4}) + True + >>> OrderedSet([1, 2, 3]).issubset({1, 4, 3, 5}) + False + """ + if len(self) > len(other): # Fast check for obvious cases + return False + return all(item in other for item in self) + + def issuperset(self, other): + """ + Report whether this set contains another set. + + Example: + >>> OrderedSet([1, 2]).issuperset([1, 2, 3]) + False + >>> OrderedSet([1, 2, 3, 4]).issuperset({1, 2, 3}) + True + >>> OrderedSet([1, 4, 3, 5]).issuperset({1, 2, 3}) + False + """ + if len(self) < len(other): # Fast check for obvious cases + return False + return all(item in self for item in other) + + def symmetric_difference(self, other): + """ + Return the symmetric difference of two OrderedSets as a new set. + That is, the new set will contain all elements that are in exactly + one of the sets. + + Their order will be preserved, with elements from `self` preceding + elements from `other`. + + Example: + >>> this = OrderedSet([1, 4, 3, 5, 7]) + >>> other = OrderedSet([9, 7, 1, 3, 2]) + >>> this.symmetric_difference(other) + OrderedSet([4, 5, 9, 2]) + """ + cls = self.__class__ if isinstance(self, OrderedSet) else OrderedSet + diff1 = cls(self).difference(other) + diff2 = cls(other).difference(self) + return diff1.union(diff2) + + def _update_items(self, items): + """ + Replace the 'items' list of this OrderedSet with a new one, updating + self.map accordingly. + """ + self.items = items + self.map = {item: idx for (idx, item) in enumerate(items)} + + def difference_update(self, *sets): + """ + Update this OrderedSet to remove items from one or more other sets. + + Example: + >>> this = OrderedSet([1, 2, 3]) + >>> this.difference_update(OrderedSet([2, 4])) + >>> print(this) + OrderedSet([1, 3]) + + >>> this = OrderedSet([1, 2, 3, 4, 5]) + >>> this.difference_update(OrderedSet([2, 4]), OrderedSet([1, 4, 6])) + >>> print(this) + OrderedSet([3, 5]) + """ + items_to_remove = set() + for other in sets: + items_to_remove |= set(other) + self._update_items([item for item in self.items if item not in items_to_remove]) + + def intersection_update(self, other): + """ + Update this OrderedSet to keep only items in another set, preserving + their order in this set. + + Example: + >>> this = OrderedSet([1, 4, 3, 5, 7]) + >>> other = OrderedSet([9, 7, 1, 3, 2]) + >>> this.intersection_update(other) + >>> print(this) + OrderedSet([1, 3, 7]) + """ + other = set(other) + self._update_items([item for item in self.items if item in other]) + + def symmetric_difference_update(self, other): + """ + Update this OrderedSet to remove items from another set, then + add items from the other set that were not present in this set. + + Example: + >>> this = OrderedSet([1, 4, 3, 5, 7]) + >>> other = OrderedSet([9, 7, 1, 3, 2]) + >>> this.symmetric_difference_update(other) + >>> print(this) + OrderedSet([4, 5, 9, 2]) + """ + items_to_add = [item for item in other if item not in self] + items_to_remove = set(other) + self._update_items( + [item for item in self.items if item not in items_to_remove] + items_to_add + ) diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index 7d77863d57..379aae56ed 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,3 +1,4 @@ packaging==16.8 pyparsing==2.2.1 six==1.10.0 +ordered-set diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index cb2fa32927..e8c616f910 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -69,5 +69,5 @@ def install(self): sys.meta_path.append(self) -names = 'six', 'packaging', 'pyparsing', +names = 'six', 'packaging', 'pyparsing', 'ordered_set', VendorImporter(__name__, names, 'setuptools._vendor').install() From 636070d9922f1443ae98b0fdd45b6c74c3c9af11 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 17:09:26 -0500 Subject: [PATCH 7390/8469] Use an ordered set when constructing 'extras provided'. Ref #1305. --- setuptools/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ddb1787ad0..ce37761e3a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -28,6 +28,7 @@ from setuptools.extern import six from setuptools.extern import packaging +from setuptools.extern import ordered_set from setuptools.extern.six.moves import map, filter, filterfalse from . import SetuptoolsDeprecationWarning @@ -408,7 +409,7 @@ class Distribution(_Distribution): _DISTUTILS_UNSUPPORTED_METADATA = { 'long_description_content_type': None, 'project_urls': dict, - 'provides_extras': set, + 'provides_extras': ordered_set.OrderedSet, } _patched_dist = None From 7f7780e5b572d6fcacd63bf99389dd9f48c5345c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Feb 2019 17:37:01 -0500 Subject: [PATCH 7391/8469] In tests, force deterministic ordering on extras_require so tests pass. --- setuptools/tests/test_dist.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index e349d068f5..0c0b9d6663 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -3,6 +3,8 @@ from __future__ import unicode_literals import io +import collections + from setuptools.dist import DistDeprecationWarning, _get_unpatched from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url @@ -266,13 +268,13 @@ def test_maintainer_author(name, attrs, tmpdir): def test_provides_extras_deterministic_order(): - attrs = dict(extras_require=dict( - a=['foo'], - b=['bar'], - )) + extras = collections.OrderedDict() + extras['a'] = ['foo'] + extras['b'] = ['bar'] + attrs = dict(extras_require=extras) dist = Distribution(attrs) assert dist.metadata.provides_extras == ['a', 'b'] - attrs['extras_require'] = dict( + attrs['extras_require'] = collections.OrderedDict( reversed(list(attrs['extras_require'].items()))) dist = Distribution(attrs) assert dist.metadata.provides_extras == ['b', 'a'] From 82db4c621974659513effae337d47a05e31fe7a5 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Jan 2019 23:07:59 +0100 Subject: [PATCH 7392/8469] tests: improve `test_pip_upgrade_from_source` Parametrize the test to check different versions of pip (including master) are correctly supported. --- setuptools/tests/test_virtualenv.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 3d5c84b067..bd89fd6470 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -52,10 +52,24 @@ def test_clean_env_install(bare_virtualenv): )).format(source=SOURCE_DIR)) -def test_pip_upgrade_from_source(virtualenv): +@pytest.mark.parametrize('pip_version', ( + 'pip==9.0.3', + 'pip==10.0.1', + 'pip==18.1', + 'pip==19.0.1', + 'https://github.com/pypa/pip/archive/master.zip', +)) +def test_pip_upgrade_from_source(virtualenv, pip_version): """ Check pip can upgrade setuptools from source. """ + # Install pip/wheel, and remove setuptools (as it + # should not be needed for bootstraping from source) + virtualenv.run(' && '.join(( + 'pip uninstall -y setuptools', + 'pip install -U wheel', + 'python -m pip install {pip_version}', + )).format(pip_version=pip_version)) dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( From b224605a8c16b2a713120bf0d484fa12ce781f02 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 7 Feb 2019 09:28:29 -0500 Subject: [PATCH 7393/8469] Automatically skip tests that require network --- setuptools/tests/test_virtualenv.py | 51 +++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index bd89fd6470..d7b98c7741 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -52,24 +52,55 @@ def test_clean_env_install(bare_virtualenv): )).format(source=SOURCE_DIR)) -@pytest.mark.parametrize('pip_version', ( - 'pip==9.0.3', - 'pip==10.0.1', - 'pip==18.1', - 'pip==19.0.1', - 'https://github.com/pypa/pip/archive/master.zip', -)) -def test_pip_upgrade_from_source(virtualenv, pip_version): +def _get_pip_versions(): + # This fixture will attempt to detect if tests are being run without + # network connectivity and if so skip some tests + + network = True + if not os.environ.get('NETWORK_REQUIRED', False): # pragma: nocover + try: + from urllib.request import urlopen + from urllib.error import URLError + except ImportError: + from urllib2 import urlopen, URLError # Python 2.7 compat + + try: + urlopen('https://pypi.org', timeout=1) + except URLError: + # No network, disable most of these tests + network = False + + network_versions = [ + 'pip==9.0.3', + 'pip==10.0.1', + 'pip==18.1', + 'pip==19.0.1', + 'https://github.com/pypa/pip/archive/master.zip', + ] + + versions = [None] + [ + pytest.param(v, **({} if network else {'marks': pytest.mark.skip})) + for v in network_versions + ] + + return versions + + +@pytest.mark.parametrize('pip_version', _get_pip_versions()) +def test_pip_upgrade_from_source(pip_version, virtualenv): """ Check pip can upgrade setuptools from source. """ # Install pip/wheel, and remove setuptools (as it # should not be needed for bootstraping from source) + if pip_version is None: + upgrade_pip = () + else: + upgrade_pip = ('python -m pip install -U {pip_version} --retries=1',) virtualenv.run(' && '.join(( 'pip uninstall -y setuptools', 'pip install -U wheel', - 'python -m pip install {pip_version}', - )).format(pip_version=pip_version)) + ) + upgrade_pip).format(pip_version=pip_version)) dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( From 675c690b4d8e55cd3c94a177d31b3a7937b2dd16 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 7 Feb 2019 09:28:29 -0500 Subject: [PATCH 7394/8469] Require network in CI builds --- .travis.yml | 1 + appveyor.yml | 1 + tox.ini | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d1febccbdd..09c3817ee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,7 @@ install: - "! grep pyc setuptools.egg-info/SOURCES.txt" script: + - export NETWORK_REQUIRED=1 - | ( # Run testsuite. if [ -z "$DISABLE_COVERAGE" ] diff --git a/appveyor.yml b/appveyor.yml index ef4a9f7e35..7a3d174da8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,7 @@ clone_depth: 50 environment: APPVEYOR: True + NETWORK_REQUIRED: True CODECOV_ENV: APPVEYOR_JOB_NAME matrix: diff --git a/tox.ini b/tox.ini index a31cb1c535..bb940ac072 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ list_dependencies_command={envbindir}/pip freeze setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. -passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* +passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} usedevelop=True From 0483cca44855280d25e7798680bb520da8923e16 Mon Sep 17 00:00:00 2001 From: Ratin_Kumar Date: Tue, 26 Feb 2019 20:55:00 +0530 Subject: [PATCH 7395/8469] Remove unwritten sections of the documentation (#1705) These sections of the documentation were never written, and refer to deprecated functionality anyway, so they can be removed. --- changelog.d/1705.doc.rst | 1 + docs/setuptools.txt | 36 ------------------------------------ 2 files changed, 1 insertion(+), 36 deletions(-) create mode 100644 changelog.d/1705.doc.rst diff --git a/changelog.d/1705.doc.rst b/changelog.d/1705.doc.rst new file mode 100644 index 0000000000..a2ce9c2b96 --- /dev/null +++ b/changelog.d/1705.doc.rst @@ -0,0 +1 @@ +Removed some placeholder documentation sections referring to deprecated features. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index a4e05d75d1..64b385cb1d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2679,42 +2679,6 @@ A few important points for writing revision control file finders: inform the user of the missing program(s). -Subclassing ``Command`` ------------------------ - -Sorry, this section isn't written yet, and neither is a lot of what's below -this point. - -XXX - - -Reusing ``setuptools`` Code -=========================== - -``ez_setup`` ------------- - -XXX - - -``setuptools.archive_util`` ---------------------------- - -XXX - - -``setuptools.sandbox`` ----------------------- - -XXX - - -``setuptools.package_index`` ----------------------------- - -XXX - - Mailing List and Bug Tracker ============================ From 5b2175ebd9f4a669097e8309a53e3b843dcbb218 Mon Sep 17 00:00:00 2001 From: robnagler Date: Tue, 26 Feb 2019 17:10:49 +0000 Subject: [PATCH 7396/8469] uniquify paths in PYTHONPATH When running in a complex environment with lots of installed packages, PYTHONPATH gets way too long. Instead, just make sure that paths_on_pythonpath doesn't contain duplicates --- setuptools/command/test.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index dde0118c90..997fd8b056 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -186,11 +186,12 @@ def paths_on_pythonpath(paths): orig_pythonpath = os.environ.get('PYTHONPATH', nothing) current_pythonpath = os.environ.get('PYTHONPATH', '') try: - prefix = os.pathsep.join(paths) - to_join = filter(None, [prefix, current_pythonpath]) - new_path = os.pathsep.join(to_join) - if new_path: - os.environ['PYTHONPATH'] = new_path + to_join = [] + for x in list(paths) + current_pythonpath.split(os.pathsep): + if x not in to_join: + to_join.append(x) + if to_join: + os.environ['PYTHONPATH'] = os.pathsep.join(to_join) yield finally: if orig_pythonpath is nothing: From 9d329c1bbe7e35a3a4b5810f90ff292d51d7a66d Mon Sep 17 00:00:00 2001 From: Kevin Adler Date: Mon, 4 Mar 2019 08:48:40 -0600 Subject: [PATCH 7397/8469] bpo-35198 Fix C++ extension compilation on AIX (GH-10437) For C++ extensions, distutils tries to replace the C compiler with the C++ compiler, but it assumes that C compiler is the first element after any environment variables set. On AIX, linking goes through ld_so_aix, so it is the first element and the compiler is the next element. Thus the replacement is faulty: ld_so_aix gcc ... -> g++ gcc ... Also, it assumed that self.compiler_cxx had only 1 element or that there were the same number of elements as the linker has and in the same order. This might not be the case, so instead concatenate everything together. --- unixccompiler.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index ab4d4de156..d10a78da31 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -188,7 +188,15 @@ def link(self, target_desc, objects, i = 1 while '=' in linker[i]: i += 1 - linker[i] = self.compiler_cxx[i] + + if os.path.basename(linker[i]) == 'ld_so_aix': + # AIX platforms prefix the compiler with the ld_so_aix + # script, so we need to adjust our linker index + offset = 1 + else: + offset = 0 + + linker[i+offset] = self.compiler_cxx[i] if sys.platform == 'darwin': linker = _osx_support.compiler_fixup(linker, ld_args) From 16e452a42a3dbbb0ab3d3146ffa3b743cdca2539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Wed, 6 Mar 2019 15:22:28 +0100 Subject: [PATCH 7398/8469] Remove duplicate import io (#1713) Found by lgtm --- setuptools/dist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ddb1787ad0..6233d5dc2c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1103,7 +1103,6 @@ def handle_display_options(self, option_order): return _Distribution.handle_display_options(self, option_order) # Stdout may be StringIO (e.g. in tests) - import io if not isinstance(sys.stdout, io.TextIOWrapper): return _Distribution.handle_display_options(self, option_order) From f3e20900c492253924944707f390a9c12d7a30fd Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 12 Mar 2019 08:39:57 -0700 Subject: [PATCH 7399/8469] bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282) --- tests/test_config.py | 1 + tests/test_dist.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 77ef788e24..344084afb7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -60,6 +60,7 @@ def setUp(self): super(BasePyPIRCCommandTestCase, self).setUp() self.tmp_dir = self.mkdtemp() os.environ['HOME'] = self.tmp_dir + os.environ['USERPROFILE'] = self.tmp_dir self.rc = os.path.join(self.tmp_dir, '.pypirc') self.dist = Distribution() diff --git a/tests/test_dist.py b/tests/test_dist.py index 0a19f0fb62..cc34725a99 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -463,7 +463,7 @@ def test_custom_pydistutils(self): # win32-style if sys.platform == 'win32': # home drive should be found - os.environ['HOME'] = temp_dir + os.environ['USERPROFILE'] = temp_dir files = dist.find_config_files() self.assertIn(user_filename, files, '%r not found in %r' % (user_filename, files)) From 1078515edfad6bf60085a2611fe24ffd497474ca Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Mar 2019 14:57:52 +0100 Subject: [PATCH 7400/8469] bpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236) Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the CFLAGS environment variable is defined, don't override CFLAGS variable with the OPT variable anymore. Initial patch written by David Malcolm. Co-Authored-By: David Malcolm --- sysconfig.py | 6 +++--- tests/test_sysconfig.py | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 40af493cdf..a3494670db 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -181,8 +181,8 @@ def customize_compiler(compiler): _osx_support.customize_compiler(_config_vars) _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', + (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ + get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') if 'CC' in os.environ: @@ -205,7 +205,7 @@ def customize_compiler(compiler): if 'LDFLAGS' in os.environ: ldshared = ldshared + ' ' + os.environ['LDFLAGS'] if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] + cflags = cflags + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] if 'CPPFLAGS' in os.environ: cpp = cpp + ' ' + os.environ['CPPFLAGS'] diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index fe4a2994e3..4bf6a067d4 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -9,7 +9,7 @@ from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support -from test.support import TESTFN, run_unittest, check_warnings +from test.support import TESTFN, run_unittest, check_warnings, swap_item class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): @@ -78,7 +78,9 @@ def test_srcdir_independent_of_cwd(self): 'not testing if default compiler is not unix') def test_customize_compiler(self): os.environ['AR'] = 'my_ar' - os.environ['ARFLAGS'] = '-arflags' + os.environ['CC'] = 'my_cc' + os.environ['ARFLAGS'] = '--myarflags' + os.environ['CFLAGS'] = '--mycflags' # make sure AR gets caught class compiler: @@ -87,9 +89,14 @@ class compiler: def set_executables(self, **kw): self.exes = kw + # Make sure that sysconfig._config_vars is initialized + sysconfig.get_config_vars() + comp = compiler() - sysconfig.customize_compiler(comp) - self.assertEqual(comp.exes['archiver'], 'my_ar -arflags') + with swap_item(sysconfig._config_vars, 'CFLAGS', '--sysconfig-cflags'): + sysconfig.customize_compiler(comp) + self.assertEqual(comp.exes['archiver'], 'my_ar --myarflags') + self.assertEqual(comp.exes['compiler'], 'my_cc --sysconfig-cflags --mycflags') def test_parse_makefile_base(self): self.makefile = TESTFN From 1aa781cd8ee638e7b403ebbd1caa82f8c7d4e6cd Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 16 Mar 2019 12:28:17 -0400 Subject: [PATCH 7401/8469] Add failing test for setup_requires Per GH #1682, with setuptools.build_meta we are not properly handling the situation where setup_requires is actually a newline-delimited string rather than a list, which is supported by setup.py interface. This adds several failing (and some passing) tests for how setup_requires is handled by setuptools.build_meta. --- setuptools/tests/test_build_meta.py | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 74969322c1..d9df8b2cc0 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -287,6 +287,52 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): with pytest.raises(ImportError): build_backend.build_sdist("temp") + @pytest.mark.parametrize('setup_literal, requirements', [ + pytest.param("'foo'", ['foo'], marks=pytest.mark.xfail), + ("['foo']", ['foo']), + pytest.param(r"'foo\n'", ['foo'], marks=pytest.mark.xfail), + pytest.param(r"'foo\n\n'", ['foo'], marks=pytest.mark.xfail), + ("['foo', 'bar']", ['foo', 'bar']), + pytest.param(r"'# Has a comment line\nfoo'", + ['foo'], marks=pytest.mark.xfail), + pytest.param(r"'foo # Has an inline comment'", + ['foo'], marks=pytest.mark.xfail), + pytest.param(r"'foo \\\n >=3.0'", + ['foo>=3.0'], marks=pytest.mark.xfail), + pytest.param(r"'foo\nbar'", ['foo', 'bar'], marks=pytest.mark.xfail), + pytest.param(r"'foo\nbar\n'", ['foo', 'bar'], marks=pytest.mark.xfail), + pytest.param(r"['foo\n', 'bar\n']", + ['foo', 'bar'], marks=pytest.mark.xfail), + ]) + def test_setup_requires(self, setup_literal, requirements, tmpdir_cwd): + + files = { + 'setup.py': DALS(""" + from setuptools import setup + + setup( + name="qux", + version="0.0.0", + py_modules=["hello.py"], + setup_requires={setup_literal}, + ) + """).format(setup_literal=setup_literal), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + } + + build_files(files) + + build_backend = self.get_build_backend() + + # Ensure that the build requirements are properly parsed + expected = sorted(['wheel'] + requirements) + actual = build_backend.get_requires_for_build_wheel() + + assert expected == sorted(actual) + class TestBuildMetaLegacyBackend(TestBuildMetaBackend): backend_name = 'setuptools.build_meta:__legacy__' From 318f739d14a810042e6803fa3eb4c4e140f0ef88 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 16 Mar 2019 12:53:05 -0400 Subject: [PATCH 7402/8469] Add requirement parsing in setuptools.build_meta This fixes GH #1682 by porting the pkg_resources requirement parsing logic into setuptools.build_meta, so that all valid requirement specifiers passed to setup_requires will be added to the get_requires_for_build_* function outputs. Fixes GH #1682 --- setuptools/build_meta.py | 45 ++++++++++++++++++++++++++++- setuptools/tests/test_build_meta.py | 22 ++++++-------- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 047cc07b69..fb37c02a1d 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -36,6 +36,8 @@ import setuptools import distutils +from setuptools._vendor import six + __all__ = ['get_requires_for_build_sdist', 'get_requires_for_build_wheel', 'prepare_metadata_for_build_wheel', @@ -51,7 +53,9 @@ def __init__(self, specifiers): class Distribution(setuptools.dist.Distribution): def fetch_build_eggs(self, specifiers): - raise SetupRequirementsError(specifiers) + specifier_list = self._parse_requirements(specifiers) + + raise SetupRequirementsError(specifier_list) @classmethod @contextlib.contextmanager @@ -68,6 +72,45 @@ def patch(cls): finally: distutils.core.Distribution = orig + def _yield_lines(self, strs): + """Yield non-empty/non-comment lines of a string or sequence""" + if isinstance(strs, six.string_types): + for s in strs.splitlines(): + s = s.strip() + # skip blank lines/comments + if s and not s.startswith('#'): + yield s + else: + for ss in strs: + for s in self._yield_lines(ss): + yield s + + def _parse_requirements(self, strs): + """Parse requirement specifiers into a list of requirement strings + + This is forked from pkg_resources.parse_requirements. + + `strs` must be a string, or a (possibly-nested) iterable thereof. + """ + # create a steppable iterator, so we can handle \-continuations + lines = iter(self._yield_lines(strs)) + + requirements = [] + + for line in lines: + # Drop comments -- a hash without a space may be in a URL. + if ' #' in line: + line = line[:line.find(' #')] + # If there is a line continuation, drop it, and append the next line. + if line.endswith('\\'): + line = line[:-2].strip() + try: + line += next(lines) + except StopIteration: + return + requirements.append(line) + + return requirements def _to_str(s): """ diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index d9df8b2cc0..a14a3c7a7c 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -288,21 +288,17 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_backend.build_sdist("temp") @pytest.mark.parametrize('setup_literal, requirements', [ - pytest.param("'foo'", ['foo'], marks=pytest.mark.xfail), + ("'foo'", ['foo']), ("['foo']", ['foo']), - pytest.param(r"'foo\n'", ['foo'], marks=pytest.mark.xfail), - pytest.param(r"'foo\n\n'", ['foo'], marks=pytest.mark.xfail), + (r"'foo\n'", ['foo']), + (r"'foo\n\n'", ['foo']), ("['foo', 'bar']", ['foo', 'bar']), - pytest.param(r"'# Has a comment line\nfoo'", - ['foo'], marks=pytest.mark.xfail), - pytest.param(r"'foo # Has an inline comment'", - ['foo'], marks=pytest.mark.xfail), - pytest.param(r"'foo \\\n >=3.0'", - ['foo>=3.0'], marks=pytest.mark.xfail), - pytest.param(r"'foo\nbar'", ['foo', 'bar'], marks=pytest.mark.xfail), - pytest.param(r"'foo\nbar\n'", ['foo', 'bar'], marks=pytest.mark.xfail), - pytest.param(r"['foo\n', 'bar\n']", - ['foo', 'bar'], marks=pytest.mark.xfail), + (r"'# Has a comment line\nfoo'", ['foo']), + (r"'foo # Has an inline comment'", ['foo']), + (r"'foo \\\n >=3.0'", ['foo>=3.0']), + (r"'foo\nbar'", ['foo', 'bar']), + (r"'foo\nbar\n'", ['foo', 'bar']), + (r"['foo\n', 'bar\n']", ['foo', 'bar']), ]) def test_setup_requires(self, setup_literal, requirements, tmpdir_cwd): From b54d4c699fc4e1692dadd19bdd7cbcde1c844976 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 16 Mar 2019 12:57:57 -0400 Subject: [PATCH 7403/8469] Extend requirement parsing tests to sdists --- setuptools/tests/test_build_meta.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a14a3c7a7c..0bdea2d613 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -300,7 +300,9 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): (r"'foo\nbar\n'", ['foo', 'bar']), (r"['foo\n', 'bar\n']", ['foo', 'bar']), ]) - def test_setup_requires(self, setup_literal, requirements, tmpdir_cwd): + @pytest.mark.parametrize('use_wheel', [True, False]) + def test_setup_requires(self, setup_literal, requirements, use_wheel, + tmpdir_cwd): files = { 'setup.py': DALS(""" @@ -323,9 +325,16 @@ def run(): build_backend = self.get_build_backend() + if use_wheel: + base_requirements = ['wheel'] + get_requires = build_backend.get_requires_for_build_wheel + else: + base_requirements = [] + get_requires = build_backend.get_requires_for_build_sdist + # Ensure that the build requirements are properly parsed - expected = sorted(['wheel'] + requirements) - actual = build_backend.get_requires_for_build_wheel() + expected = sorted(base_requirements + requirements) + actual = get_requires() assert expected == sorted(actual) From e33a714f9a9342e7aa035b22eaf29433fd58ba86 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 16 Mar 2019 13:05:29 -0400 Subject: [PATCH 7404/8469] Add changelog for PR #1720 --- changelog.d/1720.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1720.change.rst diff --git a/changelog.d/1720.change.rst b/changelog.d/1720.change.rst new file mode 100644 index 0000000000..a0d8fb35aa --- /dev/null +++ b/changelog.d/1720.change.rst @@ -0,0 +1 @@ +Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``setuptools.build_meta`` build backend. From c27c705f6a326e4820f1a34d6ce1db101dad3a30 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Sat, 16 Mar 2019 10:06:53 -0700 Subject: [PATCH 7405/8469] Fix typo in docstring (#1718) --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 6233d5dc2c..e6d08b9203 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -885,7 +885,7 @@ def include_feature(self, name): def include(self, **attrs): """Add items to distribution that are named in keyword arguments - For example, 'dist.exclude(py_modules=["x"])' would add 'x' to + For example, 'dist.include(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. From 5efdf816fddcd8fbc9c3d1e6867a25848b1f9a06 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 16 Mar 2019 13:24:36 -0400 Subject: [PATCH 7406/8469] Use pkg_resources.parse_requirements in build_meta Since pkg_resources is imported elsewhere anyway, we don't get much value out of porting the requirement parser locally. --- setuptools/build_meta.py | 43 ++-------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index fb37c02a1d..47cbcbf684 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -36,7 +36,7 @@ import setuptools import distutils -from setuptools._vendor import six +from pkg_resources import parse_requirements __all__ = ['get_requires_for_build_sdist', 'get_requires_for_build_wheel', @@ -53,7 +53,7 @@ def __init__(self, specifiers): class Distribution(setuptools.dist.Distribution): def fetch_build_eggs(self, specifiers): - specifier_list = self._parse_requirements(specifiers) + specifier_list = list(map(str, parse_requirements(specifiers))) raise SetupRequirementsError(specifier_list) @@ -72,45 +72,6 @@ def patch(cls): finally: distutils.core.Distribution = orig - def _yield_lines(self, strs): - """Yield non-empty/non-comment lines of a string or sequence""" - if isinstance(strs, six.string_types): - for s in strs.splitlines(): - s = s.strip() - # skip blank lines/comments - if s and not s.startswith('#'): - yield s - else: - for ss in strs: - for s in self._yield_lines(ss): - yield s - - def _parse_requirements(self, strs): - """Parse requirement specifiers into a list of requirement strings - - This is forked from pkg_resources.parse_requirements. - - `strs` must be a string, or a (possibly-nested) iterable thereof. - """ - # create a steppable iterator, so we can handle \-continuations - lines = iter(self._yield_lines(strs)) - - requirements = [] - - for line in lines: - # Drop comments -- a hash without a space may be in a URL. - if ' #' in line: - line = line[:line.find(' #')] - # If there is a line continuation, drop it, and append the next line. - if line.endswith('\\'): - line = line[:-2].strip() - try: - line += next(lines) - except StopIteration: - return - requirements.append(line) - - return requirements def _to_str(s): """ From 4c6000461394d2a969c17b98ff7b64e7d6f6eee4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 18 Mar 2019 17:19:02 +0100 Subject: [PATCH 7407/8469] bpo-36235: Enhance distutils test_customize_compiler() (GH-12403) The test test_customize_compiler() now mocks all sysconfig variables and all environment variables used by customize_compiler(). --- tests/test_sysconfig.py | 92 +++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 13 deletions(-) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 4bf6a067d4..245a6c86b1 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -1,4 +1,5 @@ """Tests for distutils.sysconfig.""" +import contextlib import os import shutil import subprocess @@ -74,14 +75,7 @@ def test_srcdir_independent_of_cwd(self): os.chdir(cwd) self.assertEqual(srcdir, srcdir2) - @unittest.skipUnless(get_default_compiler() == 'unix', - 'not testing if default compiler is not unix') - def test_customize_compiler(self): - os.environ['AR'] = 'my_ar' - os.environ['CC'] = 'my_cc' - os.environ['ARFLAGS'] = '--myarflags' - os.environ['CFLAGS'] = '--mycflags' - + def customize_compiler(self): # make sure AR gets caught class compiler: compiler_type = 'unix' @@ -89,14 +83,86 @@ class compiler: def set_executables(self, **kw): self.exes = kw - # Make sure that sysconfig._config_vars is initialized - sysconfig.get_config_vars() + sysconfig_vars = { + 'AR': 'sc_ar', + 'CC': 'sc_cc', + 'CXX': 'sc_cxx', + 'ARFLAGS': '--sc-arflags', + 'CFLAGS': '--sc-cflags', + 'CCSHARED': '--sc-ccshared', + 'LDSHARED': 'sc_ldshared', + 'SHLIB_SUFFIX': 'sc_shutil_suffix', + } comp = compiler() - with swap_item(sysconfig._config_vars, 'CFLAGS', '--sysconfig-cflags'): + with contextlib.ExitStack() as cm: + for key, value in sysconfig_vars.items(): + cm.enter_context(swap_item(sysconfig._config_vars, key, value)) sysconfig.customize_compiler(comp) - self.assertEqual(comp.exes['archiver'], 'my_ar --myarflags') - self.assertEqual(comp.exes['compiler'], 'my_cc --sysconfig-cflags --mycflags') + + return comp + + @unittest.skipUnless(get_default_compiler() == 'unix', + 'not testing if default compiler is not unix') + def test_customize_compiler(self): + # Make sure that sysconfig._config_vars is initialized + sysconfig.get_config_vars() + + os.environ['AR'] = 'env_ar' + os.environ['CC'] = 'env_cc' + os.environ['CPP'] = 'env_cpp' + os.environ['CXX'] = 'env_cxx --env-cxx-flags' + os.environ['LDSHARED'] = 'env_ldshared' + os.environ['LDFLAGS'] = '--env-ldflags' + os.environ['ARFLAGS'] = '--env-arflags' + os.environ['CFLAGS'] = '--env-cflags' + os.environ['CPPFLAGS'] = '--env-cppflags' + + comp = self.customize_compiler() + self.assertEqual(comp.exes['archiver'], + 'env_ar --env-arflags') + self.assertEqual(comp.exes['preprocessor'], + 'env_cpp --env-cppflags') + self.assertEqual(comp.exes['compiler'], + 'env_cc --sc-cflags --env-cflags --env-cppflags') + self.assertEqual(comp.exes['compiler_so'], + ('env_cc --sc-cflags ' + '--env-cflags ''--env-cppflags --sc-ccshared')) + self.assertEqual(comp.exes['compiler_cxx'], + 'env_cxx --env-cxx-flags') + self.assertEqual(comp.exes['linker_exe'], + 'env_cc') + self.assertEqual(comp.exes['linker_so'], + ('env_ldshared --env-ldflags --env-cflags' + ' --env-cppflags')) + self.assertEqual(comp.shared_lib_extension, 'sc_shutil_suffix') + + del os.environ['AR'] + del os.environ['CC'] + del os.environ['CPP'] + del os.environ['CXX'] + del os.environ['LDSHARED'] + del os.environ['LDFLAGS'] + del os.environ['ARFLAGS'] + del os.environ['CFLAGS'] + del os.environ['CPPFLAGS'] + + comp = self.customize_compiler() + self.assertEqual(comp.exes['archiver'], + 'sc_ar --sc-arflags') + self.assertEqual(comp.exes['preprocessor'], + 'sc_cc -E') + self.assertEqual(comp.exes['compiler'], + 'sc_cc --sc-cflags') + self.assertEqual(comp.exes['compiler_so'], + 'sc_cc --sc-cflags --sc-ccshared') + self.assertEqual(comp.exes['compiler_cxx'], + 'sc_cxx') + self.assertEqual(comp.exes['linker_exe'], + 'sc_cc') + self.assertEqual(comp.exes['linker_so'], + 'sc_ldshared') + self.assertEqual(comp.shared_lib_extension, 'sc_shutil_suffix') def test_parse_makefile_base(self): self.makefile = TESTFN From d8b901bc15e2e365c7994cd65758f4181f3d9175 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Mar 2019 08:52:44 -0400 Subject: [PATCH 7408/8469] Add section on reporting security vulnerabilities through Tidelift. --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index bfbaaad82c..dac8a46873 100644 --- a/README.rst +++ b/README.rst @@ -29,6 +29,10 @@ Bug reports and especially tested patches may be submitted directly to the `bug tracker `_. +To report a security vulnerability, please use the +`Tidelift security contact `_. +Tidelift will coordinate the fix and disclosure. + Code of Conduct --------------- From 9edd5b701549833ebbfb354c072962c58e5394ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Mar 2019 19:54:23 -0400 Subject: [PATCH 7409/8469] Use nicer, simpler phrasing --- README.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 5d77d8d3a8..357626220b 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,9 @@ .. image:: https://tidelift.com/badges/github/GROUP/PROJECT :target: https://tidelift.com/subscription/pkg/pypi-PROJECT?utm_source=pypi-PROJECT&utm_medium=readme - Security Contact ================ -If you wish to report a security vulnerability, the public disclosure -of which may exacerbate the risk, please -`Contact Tidelift security `_, -which will coordinate the fix and disclosure privately. +To report a security vulnerability, please use the +`Tidelift security contact `_. +Tidelift will coordinate the fix and disclosure. From 868d8498bbccf63c274056959055800d02cac0d5 Mon Sep 17 00:00:00 2001 From: Philipp A Date: Wed, 27 Mar 2019 22:34:19 +0100 Subject: [PATCH 7410/8469] bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605) --- command/check.py | 3 ++- tests/includetest.rst | 1 + tests/test_check.py | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/includetest.rst diff --git a/command/check.py b/command/check.py index 7ebe707cff..04c2f9642d 100644 --- a/command/check.py +++ b/command/check.py @@ -120,7 +120,8 @@ def check_restructuredtext(self): def _check_rst_data(self, data): """Returns warnings when the provided data doesn't compile.""" - source_path = StringIO() + # the include and csv_table directives need this to be a path + source_path = self.distribution.script_name or 'setup.py' parser = Parser() settings = frontend.OptionParser(components=(Parser,)).get_default_values() settings.tab_width = 4 diff --git a/tests/includetest.rst b/tests/includetest.rst new file mode 100644 index 0000000000..d7b4ae38b0 --- /dev/null +++ b/tests/includetest.rst @@ -0,0 +1 @@ +This should be included. diff --git a/tests/test_check.py b/tests/test_check.py index 3d22868e31..e534aca1d4 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -1,4 +1,5 @@ """Tests for distutils.command.check.""" +import os import textwrap import unittest from test.support import run_unittest @@ -13,13 +14,19 @@ pygments = None +HERE = os.path.dirname(__file__) + + class CheckTestCase(support.LoggingSilencer, support.TempdirManager, unittest.TestCase): - def _run(self, metadata=None, **options): + def _run(self, metadata=None, cwd=None, **options): if metadata is None: metadata = {} + if cwd is not None: + old_dir = os.getcwd() + os.chdir(cwd) pkg_info, dist = self.create_dist(**metadata) cmd = check(dist) cmd.initialize_options() @@ -27,6 +34,8 @@ def _run(self, metadata=None, **options): setattr(cmd, name, value) cmd.ensure_finalized() cmd.run() + if cwd is not None: + os.chdir(old_dir) return cmd def test_check_metadata(self): @@ -99,6 +108,11 @@ def test_check_restructuredtext(self): cmd = self._run(metadata, strict=1, restructuredtext=1) self.assertEqual(cmd._warnings, 0) + # check that includes work to test #31292 + metadata['long_description'] = 'title\n=====\n\n.. include:: includetest.rst' + cmd = self._run(metadata, cwd=HERE, strict=1, restructuredtext=1) + self.assertEqual(cmd._warnings, 0) + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") def test_check_restructuredtext_with_syntax_highlight(self): # Don't fail if there is a `code` or `code-block` directive From e01330a5f42e850e0ce6ec3710b8a08669ea4219 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 2 Apr 2019 16:52:38 -0400 Subject: [PATCH 7411/8469] Pin pypy2.7 version in Travis There is some issue with pypy2.7-5.8.0 in Travis. This probably does not solve the *root* issue, but updating the pypy version does seem to fix the build, so in the interest of unblocking the project, we will merge this change. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 09c3817ee0..a5b670e4b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,8 @@ jobs: python: 2.7 - <<: *latest_py2 env: LANG=C - - python: pypy + - python: pypy2.7-6.0.0 + dist: xenial env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: pypy3 env: DISABLE_COVERAGE=1 From 52939bcc8f549f6c8fef4bf76e09a20d0bf62e44 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Thu, 21 Feb 2019 15:58:59 -0800 Subject: [PATCH 7412/8469] Add Distribution._get_version() for DRY --- pkg_resources/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 5d66f6e034..e8921f95bb 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2661,7 +2661,7 @@ def version(self): try: return self._version except AttributeError: - version = _version_from_file(self._get_metadata(self.PKG_INFO)) + version = self._get_version() if version is None: tmpl = "Missing 'Version:' header and/or %s file" raise ValueError(tmpl % self.PKG_INFO, self) @@ -2727,6 +2727,12 @@ def _get_metadata(self, name): for line in self.get_metadata_lines(name): yield line + def _get_version(self): + lines = self._get_metadata(self.PKG_INFO) + version = _version_from_file(lines) + + return version + def activate(self, path=None, replace=False): """Ensure distribution is importable on `path` (default=sys.path)""" if path is None: @@ -2945,7 +2951,7 @@ def _reload_version(self): 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)) + md_version = self._get_version() if md_version: self._version = md_version return self From 80ec85c55b1470df6541473f674f41bdc6bc5268 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Fri, 22 Feb 2019 04:15:07 -0800 Subject: [PATCH 7413/8469] Include file path when Version: missing Related to pip's github issue pypa/pip#6194. This has come up in pip's issue tracker (github) multiple times: - pypa/pip#6177 - pypa/pip#6283 - pypa/pip#6194 --- changelog.d/1664.change.rst | 2 + pkg_resources/__init__.py | 37 +++++++++- pkg_resources/tests/test_pkg_resources.py | 84 +++++++++++++++++++++++ 3 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 changelog.d/1664.change.rst diff --git a/changelog.d/1664.change.rst b/changelog.d/1664.change.rst new file mode 100644 index 0000000000..85e40a39db --- /dev/null +++ b/changelog.d/1664.change.rst @@ -0,0 +1,2 @@ +Added the path to the ``PKG-INFO`` or ``METADATA`` file in the exception +text when the ``Version:`` header can't be found. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index e8921f95bb..97e08d6827 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1403,8 +1403,15 @@ def get_resource_string(self, manager, resource_name): def has_resource(self, resource_name): return self._has(self._fn(self.module_path, resource_name)) + def _get_metadata_path(self, name): + return self._fn(self.egg_info, name) + def has_metadata(self, name): - return self.egg_info and self._has(self._fn(self.egg_info, name)) + if not self.egg_info: + return self.egg_info + + path = self._get_metadata_path(name) + return self._has(path) def get_metadata(self, name): if not self.egg_info: @@ -1868,6 +1875,9 @@ class FileMetadata(EmptyProvider): def __init__(self, path): self.path = path + def _get_metadata_path(self, name): + return self.path + def has_metadata(self, name): return name == 'PKG-INFO' and os.path.isfile(self.path) @@ -2663,8 +2673,12 @@ def version(self): except AttributeError: version = self._get_version() if version is None: - tmpl = "Missing 'Version:' header and/or %s file" - raise ValueError(tmpl % self.PKG_INFO, self) + path = self._get_metadata_path_for_display(self.PKG_INFO) + msg = ( + "Missing 'Version:' header and/or {} file at path: {}" + ).format(self.PKG_INFO, path) + raise ValueError(msg, self) + return version @property @@ -2722,6 +2736,23 @@ def requires(self, extras=()): ) return deps + def _get_metadata_path_for_display(self, name): + """ + Return the path to the given metadata file, if available. + """ + try: + # We need to access _get_metadata_path() on the provider object + # directly rather than through this class's __getattr__() + # since _get_metadata_path() is marked private. + path = self._provider._get_metadata_path(name) + + # Handle exceptions e.g. in case the distribution's metadata + # provider doesn't support _get_metadata_path(). + except Exception: + return '[could not detect]' + + return path + def _get_metadata(self, name): if self.has_metadata(name): for line in self.get_metadata_lines(name): diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 2c2c9c7f97..fb77c68587 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -17,6 +17,7 @@ except ImportError: import mock +from pkg_resources import DistInfoDistribution, Distribution, EggInfoDistribution from pkg_resources.extern.six.moves import map from pkg_resources.extern.six import text_type, string_types @@ -190,6 +191,89 @@ def test_setuptools_not_imported(self): subprocess.check_call(cmd) +# TODO: remove this in favor of Path.touch() when Python 2 is dropped. +def touch_file(path): + """ + Create an empty file. + """ + with open(path, 'w'): + pass + + +def make_distribution_no_version(tmpdir, basename): + """ + Create a distribution directory with no file containing the version. + """ + # Convert the LocalPath object to a string before joining. + dist_dir = os.path.join(str(tmpdir), basename) + os.mkdir(dist_dir) + # Make the directory non-empty so distributions_from_metadata() + # will detect it and yield it. + touch_file(os.path.join(dist_dir, 'temp.txt')) + + dists = list(pkg_resources.distributions_from_metadata(dist_dir)) + assert len(dists) == 1 + dist, = dists + + return dist, dist_dir + + +@pytest.mark.parametrize( + 'suffix, expected_filename, expected_dist_type', + [ + ('egg-info', 'PKG-INFO', EggInfoDistribution), + ('dist-info', 'METADATA', DistInfoDistribution), + ], +) +def test_distribution_version_missing(tmpdir, suffix, expected_filename, + expected_dist_type): + """ + Test Distribution.version when the "Version" header is missing. + """ + basename = 'foo.{}'.format(suffix) + dist, dist_dir = make_distribution_no_version(tmpdir, basename) + + expected_text = ( + "Missing 'Version:' header and/or {} file at path: " + ).format(expected_filename) + metadata_path = os.path.join(dist_dir, expected_filename) + + # Now check the exception raised when the "version" attribute is accessed. + with pytest.raises(ValueError) as excinfo: + dist.version + + err = str(excinfo) + # Include a string expression after the assert so the full strings + # will be visible for inspection on failure. + assert expected_text in err, str((expected_text, err)) + + # Also check the args passed to the ValueError. + msg, dist = excinfo.value.args + assert expected_text in msg + # Check that the message portion contains the path. + assert metadata_path in msg, str((metadata_path, msg)) + assert type(dist) == expected_dist_type + + +def test_distribution_version_missing_undetected_path(): + """ + Test Distribution.version when the "Version" header is missing and + the path can't be detected. + """ + # Create a Distribution object with no metadata argument, which results + # in an empty metadata provider. + dist = Distribution('/foo') + with pytest.raises(ValueError) as excinfo: + dist.version + + msg, dist = excinfo.value.args + expected = ( + "Missing 'Version:' header and/or PKG-INFO file at path: " + '[could not detect]' + ) + assert msg == expected + + class TestDeepVersionLookupDistutils: @pytest.fixture def env(self, tmpdir): From d24a1adb6a3b8a702eb5033bb1728cde428e5a6f Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 3 Apr 2019 14:25:01 -0400 Subject: [PATCH 7414/8469] Update changelog for version 40.9.0 --- CHANGES.rst | 10 ++++++++++ changelog.d/1664.change.rst | 2 -- changelog.d/1675.change.rst | 1 - changelog.d/1705.doc.rst | 1 - changelog.d/1720.change.rst | 1 - 5 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1664.change.rst delete mode 100644 changelog.d/1675.change.rst delete mode 100644 changelog.d/1705.doc.rst delete mode 100644 changelog.d/1720.change.rst diff --git a/CHANGES.rst b/CHANGES.rst index b043e449ab..2a8d432a8c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v40.9.0 +------- + +* #1675: Added support for ``setup.cfg``-only projects when using the ``setuptools.build_meta`` backend. Projects that have enabled PEP 517 no longer need to have a ``setup.py`` and can use the purely declarative ``setup.cfg`` configuration file instead. +* #1720: Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``setuptools.build_meta`` build backend. +* #1664: Added the path to the ``PKG-INFO`` or ``METADATA`` file in the exception + text when the ``Version:`` header can't be found. +* #1705: Removed some placeholder documentation sections referring to deprecated features. + + v40.8.0 ------- diff --git a/changelog.d/1664.change.rst b/changelog.d/1664.change.rst deleted file mode 100644 index 85e40a39db..0000000000 --- a/changelog.d/1664.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added the path to the ``PKG-INFO`` or ``METADATA`` file in the exception -text when the ``Version:`` header can't be found. diff --git a/changelog.d/1675.change.rst b/changelog.d/1675.change.rst deleted file mode 100644 index e90676283f..0000000000 --- a/changelog.d/1675.change.rst +++ /dev/null @@ -1 +0,0 @@ -Added support for ``setup.cfg``-only projects when using the ``setuptools.build_meta`` backend. Projects that have enabled PEP 517 no longer need to have a ``setup.py`` and can use the purely declarative ``setup.cfg`` configuration file instead. diff --git a/changelog.d/1705.doc.rst b/changelog.d/1705.doc.rst deleted file mode 100644 index a2ce9c2b96..0000000000 --- a/changelog.d/1705.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed some placeholder documentation sections referring to deprecated features. diff --git a/changelog.d/1720.change.rst b/changelog.d/1720.change.rst deleted file mode 100644 index a0d8fb35aa..0000000000 --- a/changelog.d/1720.change.rst +++ /dev/null @@ -1 +0,0 @@ -Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``setuptools.build_meta`` build backend. From dd522e601426ad35644022278ca2a09a7cc542ad Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Wed, 3 Apr 2019 14:43:31 -0400 Subject: [PATCH 7415/8469] =?UTF-8?q?Bump=20version:=2040.8.0=20=E2=86=92?= =?UTF-8?q?=2040.9.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 3 ++- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f4e8b40b94..9840c0864e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,6 +1,7 @@ [bumpversion] -current_version = 40.8.0 +current_version = 40.9.0 commit = True tag = True [bumpversion:file:setup.cfg] + diff --git a/setup.cfg b/setup.cfg index 7a0fac154d..01fe6ae934 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,4 +19,4 @@ universal = 1 [metadata] license_file = LICENSE -version = 40.8.0 +version = 40.9.0 From 393809a02ed4d0f07faec5c1f23384233e6cd68e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 09:27:23 -0400 Subject: [PATCH 7416/8469] Feed the hobgoblins (delint). --- setuptools/dist.py | 5 ++--- setuptools/tests/test_config.py | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index e6d08b9203..ae38029050 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -11,7 +11,6 @@ import distutils.core import distutils.cmd import distutils.dist -from distutils.errors import DistutilsOptionError from distutils.util import strtobool from distutils.debug import DEBUG from distutils.fancy_getopt import translate_longopt @@ -135,7 +134,6 @@ def write_field(key, value): def write_field(key, value): file.write("%s: %s\n" % (key, value)) - write_field('Metadata-Version', str(version)) write_field('Name', self.get_name()) write_field('Version', self.get_version()) @@ -1281,4 +1279,5 @@ def validate(self, dist): class DistDeprecationWarning(SetuptoolsDeprecationWarning): - """Class for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.""" + """Class for warning about deprecations in dist in + setuptools. Not ignored by default, unlike DeprecationWarning.""" diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 6b17770969..4daf1df17b 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -8,7 +8,7 @@ from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration -from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError +from setuptools.extern.six.moves import configparser from setuptools.tests import is_ascii from . import py2_only, py3_only from .textwrap import DALS @@ -29,7 +29,9 @@ def make_package_dir(name, base_dir, ns=False): return dir_package, init_file -def fake_env(tmpdir, setup_cfg, setup_py=None, encoding='ascii', package_path='fake_package'): +def fake_env( + tmpdir, setup_cfg, setup_py=None, + encoding='ascii', package_path='fake_package'): if setup_py is None: setup_py = ( @@ -440,11 +442,12 @@ def test_interpolation(self, tmpdir): '[metadata]\n' 'description = %(message)s\n' ) - with pytest.raises(InterpolationMissingOptionError): + with pytest.raises(configparser.InterpolationMissingOptionError): with get_dist(tmpdir): pass - skip_if_not_ascii = pytest.mark.skipif(not is_ascii, reason='Test not supported with this locale') + skip_if_not_ascii = pytest.mark.skipif( + not is_ascii, reason='Test not supported with this locale') @skip_if_not_ascii def test_non_ascii_1(self, tmpdir): From 85fa4a6bc506be12fdbd0f4cff139e7c4e3bc6a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 10:04:50 -0400 Subject: [PATCH 7417/8469] When reading config files, require them to be encoded with UTF-8. Fixes #1702. --- setuptools/dist.py | 9 ++------- setuptools/tests/test_config.py | 31 +++++++++---------------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ae38029050..9a165de0dd 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -35,7 +35,6 @@ from setuptools import windows_support from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration -from .unicode_utils import detect_encoding import pkg_resources __import__('setuptools.extern.packaging.specifiers') @@ -587,13 +586,9 @@ def _parse_config_files(self, filenames=None): parser = ConfigParser() for filename in filenames: - with io.open(filename, 'rb') as fp: - encoding = detect_encoding(fp) + with io.open(filename, encoding='utf-8') as reader: if DEBUG: - self.announce(" reading %s [%s]" % ( - filename, encoding or 'locale') - ) - reader = io.TextIOWrapper(fp, encoding=encoding) + self.announce(" reading {filename}".format(**locals())) (parser.read_file if six.PY3 else parser.readfp)(reader) for section in parser.sections(): options = parser.options(section) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 4daf1df17b..bc97664d4d 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -9,7 +9,6 @@ from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration from setuptools.extern.six.moves import configparser -from setuptools.tests import is_ascii from . import py2_only, py3_only from .textwrap import DALS @@ -446,10 +445,6 @@ def test_interpolation(self, tmpdir): with get_dist(tmpdir): pass - skip_if_not_ascii = pytest.mark.skipif( - not is_ascii, reason='Test not supported with this locale') - - @skip_if_not_ascii def test_non_ascii_1(self, tmpdir): fake_env( tmpdir, @@ -457,18 +452,8 @@ def test_non_ascii_1(self, tmpdir): 'description = éàïôñ\n', encoding='utf-8' ) - with pytest.raises(UnicodeDecodeError): - with get_dist(tmpdir): - pass - - def test_non_ascii_2(self, tmpdir): - fake_env( - tmpdir, - '# -*- coding: invalid\n' - ) - with pytest.raises(LookupError): - with get_dist(tmpdir): - pass + with get_dist(tmpdir): + pass def test_non_ascii_3(self, tmpdir): fake_env( @@ -479,7 +464,6 @@ def test_non_ascii_3(self, tmpdir): with get_dist(tmpdir): pass - @skip_if_not_ascii def test_non_ascii_4(self, tmpdir): fake_env( tmpdir, @@ -491,8 +475,10 @@ def test_non_ascii_4(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.description == 'éàïôñ' - @skip_if_not_ascii - def test_non_ascii_5(self, tmpdir): + def test_not_utf8(self, tmpdir): + """ + Config files encoded not in UTF-8 will fail + """ fake_env( tmpdir, '# vim: set fileencoding=iso-8859-15 :\n' @@ -500,8 +486,9 @@ def test_non_ascii_5(self, tmpdir): 'description = éàïôñ\n', encoding='iso-8859-15' ) - with get_dist(tmpdir) as dist: - assert dist.metadata.description == 'éàïôñ' + with pytest.raises(UnicodeDecodeError): + with get_dist(tmpdir): + pass class TestOptions: From e89509f7de02d116b97715d4d8637ea24faa9419 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 10:23:51 -0400 Subject: [PATCH 7418/8469] Add changelog entry. Ref #1702. --- changelog.d/1735.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1735.breaking.rst diff --git a/changelog.d/1735.breaking.rst b/changelog.d/1735.breaking.rst new file mode 100644 index 0000000000..448730c42c --- /dev/null +++ b/changelog.d/1735.breaking.rst @@ -0,0 +1 @@ +When parsing setup.cfg files, setuptools now requires the files to be encoded as UTF-8. Any other encoding will lead to a UnicodeDecodeError. This change removes support for specifying an encoding using a 'coding: ' directive in the header of the file, a feature that was introduces in 40.7. Given the recent release of the aforementioned feature, it is assumed that few if any projects are utilizing the feature to specify an encoding other than UTF-8. From 7b09ba64c0327ecea04cc95057ffa7d5c8d939c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 10:46:00 -0400 Subject: [PATCH 7419/8469] Add test for setopt to demonstrate that edit_config retains non-ASCII characters. --- setuptools/tests/test_setopt.py | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 setuptools/tests/test_setopt.py diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py new file mode 100644 index 0000000000..2241ef73a4 --- /dev/null +++ b/setuptools/tests/test_setopt.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +from __future__ import unicode_literals + +import io + +import six + +from setuptools.command import setopt +from setuptools.extern.six.moves import configparser + + +class TestEdit: + @staticmethod + def parse_config(filename): + parser = configparser.ConfigParser() + with io.open(filename, encoding='utf-8') as reader: + (parser.read_file if six.PY3 else parser.readfp)(reader) + return parser + + @staticmethod + def write_text(file, content): + with io.open(file, 'wb') as strm: + strm.write(content.encode('utf-8')) + + def test_utf8_encoding_retained(self, tmpdir): + """ + When editing a file, non-ASCII characters encoded in + UTF-8 should be retained. + """ + config = tmpdir.join('setup.cfg') + self.write_text(config, '[names]\njaraco=йарацо') + setopt.edit_config(str(config), dict(names=dict(other='yes'))) + parser = self.parse_config(str(config)) + assert parser['names']['jaraco'] == 'йарацо' + assert parser['names']['other'] == 'yes' From b336e83a63722b3a3e4d3f1779686149d5cef8d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 10:49:23 -0400 Subject: [PATCH 7420/8469] Add compatibility for Python 2 --- setuptools/tests/test_setopt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py index 2241ef73a4..7c803500b9 100644 --- a/setuptools/tests/test_setopt.py +++ b/setuptools/tests/test_setopt.py @@ -29,8 +29,8 @@ def test_utf8_encoding_retained(self, tmpdir): UTF-8 should be retained. """ config = tmpdir.join('setup.cfg') - self.write_text(config, '[names]\njaraco=йарацо') + self.write_text(str(config), '[names]\njaraco=йарацо') setopt.edit_config(str(config), dict(names=dict(other='yes'))) parser = self.parse_config(str(config)) - assert parser['names']['jaraco'] == 'йарацо' - assert parser['names']['other'] == 'yes' + assert parser.get('names', 'jaraco') == 'йарацо' + assert parser.get('names', 'other') == 'yes' From 7ed188bcaf38a25fb63fbb1ed3b070428ff95759 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 11:07:02 -0400 Subject: [PATCH 7421/8469] Correct cyrillic to match preferred pronunciation. --- setuptools/tests/test_setopt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py index 7c803500b9..3fb04fb455 100644 --- a/setuptools/tests/test_setopt.py +++ b/setuptools/tests/test_setopt.py @@ -29,8 +29,8 @@ def test_utf8_encoding_retained(self, tmpdir): UTF-8 should be retained. """ config = tmpdir.join('setup.cfg') - self.write_text(str(config), '[names]\njaraco=йарацо') + self.write_text(str(config), '[names]\njaraco=джарако') setopt.edit_config(str(config), dict(names=dict(other='yes'))) parser = self.parse_config(str(config)) - assert parser.get('names', 'jaraco') == 'йарацо' + assert parser.get('names', 'jaraco') == 'джарако' assert parser.get('names', 'other') == 'yes' From f36781084f8f870ea747d477bd742057ea022421 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 12:25:03 -0400 Subject: [PATCH 7422/8469] Remove detect_encoding, no longer used. --- setuptools/unicode_utils.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 3b8179a870..7c63efd20b 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,6 +1,5 @@ import unicodedata import sys -import re from setuptools.extern import six @@ -43,15 +42,3 @@ def try_encode(string, enc): return string.encode(enc) except UnicodeEncodeError: return None - - -CODING_RE = re.compile(br'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') - - -def detect_encoding(fp): - first_line = fp.readline() - fp.seek(0) - m = CODING_RE.match(first_line) - if m is None: - return None - return m.group(1).decode('ascii') From 7a80e29b31f255a3fff5147e50d0135271b7c101 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 13:23:32 -0400 Subject: [PATCH 7423/8469] =?UTF-8?q?Bump=20version:=2040.9.0=20=E2=86=92?= =?UTF-8?q?=2041.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1735.breaking.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1735.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9840c0864e..a8fd179a80 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 40.9.0 +current_version = 41.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2a8d432a8c..8785d3d269 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v41.0.0 +------- + +* #1735: When parsing setup.cfg files, setuptools now requires the files to be encoded as UTF-8. Any other encoding will lead to a UnicodeDecodeError. This change removes support for specifying an encoding using a 'coding: ' directive in the header of the file, a feature that was introduces in 40.7. Given the recent release of the aforementioned feature, it is assumed that few if any projects are utilizing the feature to specify an encoding other than UTF-8. + + v40.9.0 ------- diff --git a/changelog.d/1735.breaking.rst b/changelog.d/1735.breaking.rst deleted file mode 100644 index 448730c42c..0000000000 --- a/changelog.d/1735.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -When parsing setup.cfg files, setuptools now requires the files to be encoded as UTF-8. Any other encoding will lead to a UnicodeDecodeError. This change removes support for specifying an encoding using a 'coding: ' directive in the header of the file, a feature that was introduces in 40.7. Given the recent release of the aforementioned feature, it is assumed that few if any projects are utilizing the feature to specify an encoding other than UTF-8. diff --git a/setup.cfg b/setup.cfg index 01fe6ae934..561e7b248e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,4 +19,4 @@ universal = 1 [metadata] license_file = LICENSE -version = 40.9.0 +version = 41.0.0 From 8db41e478db4ded53b9836f62211f8c9371ec7c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 15:12:21 -0400 Subject: [PATCH 7424/8469] Rely on unique_everseen to avoid unnecessarily polluting the PYTHONPATH with duplicate entries. --- setuptools/command/test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 997fd8b056..973e4eb214 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -15,6 +15,7 @@ working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command +from .build_py import _unique_everseen __metaclass__ = type @@ -186,12 +187,11 @@ def paths_on_pythonpath(paths): orig_pythonpath = os.environ.get('PYTHONPATH', nothing) current_pythonpath = os.environ.get('PYTHONPATH', '') try: - to_join = [] - for x in list(paths) + current_pythonpath.split(os.pathsep): - if x not in to_join: - to_join.append(x) - if to_join: - os.environ['PYTHONPATH'] = os.pathsep.join(to_join) + prefix = os.pathsep.join(_unique_everseen(paths)) + to_join = filter(None, [prefix, current_pythonpath]) + new_path = os.pathsep.join(to_join) + if new_path: + os.environ['PYTHONPATH'] = new_path yield finally: if orig_pythonpath is nothing: From 1b4ef9635452958482a121f41e65d0b6cca1a9d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 15:16:31 -0400 Subject: [PATCH 7425/8469] Add changelog entry. --- changelog.d/1709.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1709.bugfix.rst diff --git a/changelog.d/1709.bugfix.rst b/changelog.d/1709.bugfix.rst new file mode 100644 index 0000000000..c6670ae9c6 --- /dev/null +++ b/changelog.d/1709.bugfix.rst @@ -0,0 +1 @@ +In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH. From 7db010201783ae4b795908161e2027565e70a12f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Apr 2019 15:25:33 -0400 Subject: [PATCH 7426/8469] Rename changelog entry to use correct category. --- changelog.d/{1709.bugfix.rst => 1709.change.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{1709.bugfix.rst => 1709.change.rst} (100%) diff --git a/changelog.d/1709.bugfix.rst b/changelog.d/1709.change.rst similarity index 100% rename from changelog.d/1709.bugfix.rst rename to changelog.d/1709.change.rst From 817e0bd71433db065c3c74b0b04de7c734ba9ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Mon, 8 Apr 2019 13:08:48 +0000 Subject: [PATCH 7427/8469] bpo-35416: fix potential resource warnings in distutils (GH-10918) --- command/bdist_rpm.py | 3 +- command/bdist_wininst.py | 74 +++++++++++++++++++++------------------- command/upload.py | 5 +-- 3 files changed, 43 insertions(+), 39 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 02f10dd89d..20ca7ac6dc 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -537,7 +537,8 @@ def _make_spec_file(self): '', '%' + rpm_opt,]) if val: - spec_file.extend(open(val, 'r').read().split('\n')) + with open(val) as f: + spec_file.extend(f.read().split('\n')) else: spec_file.append(default) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index fde56754e8..1cf2e963e0 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -247,47 +247,49 @@ def create_exe(self, arcname, fullname, bitmap=None): self.announce("creating %s" % installer_name) if bitmap: - bitmapdata = open(bitmap, "rb").read() + with open(bitmap, "rb") as f: + bitmapdata = f.read() bitmaplen = len(bitmapdata) else: bitmaplen = 0 - file = open(installer_name, "wb") - file.write(self.get_exe_bytes()) - if bitmap: - file.write(bitmapdata) - - # Convert cfgdata from unicode to ascii, mbcs encoded - if isinstance(cfgdata, str): - cfgdata = cfgdata.encode("mbcs") - - # Append the pre-install script - cfgdata = cfgdata + b"\0" - if self.pre_install_script: - # We need to normalize newlines, so we open in text mode and - # convert back to bytes. "latin-1" simply avoids any possible - # failures. - with open(self.pre_install_script, "r", - encoding="latin-1") as script: - script_data = script.read().encode("latin-1") - cfgdata = cfgdata + script_data + b"\n\0" - else: - # empty pre-install script + with open(installer_name, "wb") as file: + file.write(self.get_exe_bytes()) + if bitmap: + file.write(bitmapdata) + + # Convert cfgdata from unicode to ascii, mbcs encoded + if isinstance(cfgdata, str): + cfgdata = cfgdata.encode("mbcs") + + # Append the pre-install script cfgdata = cfgdata + b"\0" - file.write(cfgdata) - - # The 'magic number' 0x1234567B is used to make sure that the - # binary layout of 'cfgdata' is what the wininst.exe binary - # expects. If the layout changes, increment that number, make - # the corresponding changes to the wininst.exe sources, and - # recompile them. - header = struct.pack(" Date: Tue, 9 Apr 2019 14:54:30 +0900 Subject: [PATCH 7428/8469] fix code styling (GH-12737) --- command/bdist_wininst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 1cf2e963e0..3a616883be 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -269,7 +269,7 @@ def create_exe(self, arcname, fullname, bitmap=None): # convert back to bytes. "latin-1" simply avoids any possible # failures. with open(self.pre_install_script, "r", - encoding="latin-1") as script: + encoding="latin-1") as script: script_data = script.read().encode("latin-1") cfgdata = cfgdata + script_data + b"\n\0" else: From ef2792fe08aabeb870e8f489d2bbfe2898ce1766 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 11 Apr 2019 01:38:48 +0200 Subject: [PATCH 7429/8469] bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764) Set CUSTOMIZED_OSX_COMPILER to True to disable _osx_support.customize_compiler(). --- tests/test_sysconfig.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 245a6c86b1..236755d095 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -92,6 +92,9 @@ def set_executables(self, **kw): 'CCSHARED': '--sc-ccshared', 'LDSHARED': 'sc_ldshared', 'SHLIB_SUFFIX': 'sc_shutil_suffix', + + # On macOS, disable _osx_support.customize_compiler() + 'CUSTOMIZED_OSX_COMPILER': 'True', } comp = compiler() From 59aeb62614ab07acb4b9520d81179d6e647dfbb7 Mon Sep 17 00:00:00 2001 From: 2xB <31772910+2xB@users.noreply.github.com> Date: Fri, 12 Apr 2019 00:32:12 +0200 Subject: [PATCH 7430/8469] FIX: git and hg revision checkout under Windows Windows does not change the working directory for a process via `cd .. && ` (see e.g. this question: https://stackoverflow.com/q/55641332/8575607 ). This commit replaces the use of `cd .. &&` with arguments provided by `git` and `hg` respectively. --- setuptools/package_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 705a47cf80..6b06f2ca28 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -897,7 +897,7 @@ def _download_git(self, url, filename): if rev is not None: self.info("Checking out %s", rev) - os.system("(cd %s && git checkout --quiet %s)" % ( + os.system("git -C %s checkout --quiet %s" % ( filename, rev, )) @@ -913,7 +913,7 @@ def _download_hg(self, url, filename): if rev is not None: self.info("Updating to %s", rev) - os.system("(cd %s && hg up -C -r %s -q)" % ( + os.system("hg --cwd %s up -C -r %s -q" % ( filename, rev, )) From 01376621f092f9d448e1bf0e1e669bda15b73809 Mon Sep 17 00:00:00 2001 From: 2xB <31772910+2xB@users.noreply.github.com> Date: Fri, 12 Apr 2019 00:58:48 +0200 Subject: [PATCH 7431/8469] Added description in changelog.d --- changelog.d/1741.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1741.change.rst diff --git a/changelog.d/1741.change.rst b/changelog.d/1741.change.rst new file mode 100644 index 0000000000..b465958a81 --- /dev/null +++ b/changelog.d/1741.change.rst @@ -0,0 +1 @@ +Fixed revision checkout routine of git and hg repositories under Windows From 0259db3b7aaaff9d0dfdde48e9dbc0361d3ab47f Mon Sep 17 00:00:00 2001 From: 2xB <31772910+2xB@users.noreply.github.com> Date: Fri, 12 Apr 2019 01:10:33 +0200 Subject: [PATCH 7432/8469] Updated test to check for changed git rev checkout Checking for new implementation solving issue #1740 --- setuptools/tests/test_packageindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index ab371884d9..60d968fdfa 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -249,7 +249,7 @@ def test_download_git_with_rev(self, tmpdir): first_call_args = os_system_mock.call_args_list[0][0] assert first_call_args == (expected,) - tmpl = '(cd {expected_dir} && git checkout --quiet master)' + tmpl = 'git -C {expected_dir} checkout --quiet master' expected = tmpl.format(**locals()) assert os_system_mock.call_args_list[1][0] == (expected,) assert result == expected_dir From eaa19fd89c2e61f52c677c958041013422df133f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 12 Apr 2019 13:50:25 -0400 Subject: [PATCH 7433/8469] More directly describe the change. --- changelog.d/1741.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1741.change.rst b/changelog.d/1741.change.rst index b465958a81..03b2478007 100644 --- a/changelog.d/1741.change.rst +++ b/changelog.d/1741.change.rst @@ -1 +1 @@ -Fixed revision checkout routine of git and hg repositories under Windows +In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows From 80f67626467684fffb9702eb523fc7c3efa8c510 Mon Sep 17 00:00:00 2001 From: gpotter2 Date: Sun, 14 Apr 2019 16:00:24 +0200 Subject: [PATCH 7434/8469] Update super old CHANGES.rst dead links --- CHANGES.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8785d3d269..08c5ee0bdb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1496,8 +1496,8 @@ v20.6.0 19.7 ---- -* `Off-project PR `_: - For FreeBSD, also honor root certificates from ca_root_nss. +* Off-project PR: `0dcee79 `_ and `f9bd9b9 `_ + For FreeBSD, also `honor root certificates from ca_root_nss `_. 19.6.2 ------ @@ -1661,9 +1661,9 @@ v20.6.0 now logged when pkg_resources is imported on Python 3.2 or earlier Python 3 versions. * `Add support for python_platform_implementation environment marker - `_. + `_. * `Fix dictionary mutation during iteration - `_. + `_. 18.4 ---- @@ -2023,7 +2023,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. --- * Prefer vendored packaging library `as recommended - `_. + `_. 9.0.1 ----- From 1d1c462903645fa567508a1272ed28c5f334c24c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 17 Apr 2019 16:26:36 +0200 Subject: [PATCH 7435/8469] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858) shutil.which() and distutils.spawn.find_executable() now use os.confstr("CS_PATH") if available instead of os.defpath, if the PATH environment variable is not set. Don't use os.confstr("CS_PATH") nor os.defpath if the PATH environment variable is set to an empty string to mimick Unix 'which' command behavior. Changes: * find_executable() now starts by checking for the executable in the current working directly case. Add an explicit "if not path: return None". * Add tests for PATH='' (empty string), PATH=':' and for PATHEXT. --- spawn.py | 39 +++++++++++++++++++++++-------------- tests/test_spawn.py | 47 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 17 deletions(-) diff --git a/spawn.py b/spawn.py index 5387688093..888327270e 100644 --- a/spawn.py +++ b/spawn.py @@ -172,21 +172,32 @@ def find_executable(executable, path=None): A string listing directories separated by 'os.pathsep'; defaults to os.environ['PATH']. Returns the complete filename or None if not found. """ - if path is None: - path = os.environ.get('PATH', os.defpath) - - paths = path.split(os.pathsep) - base, ext = os.path.splitext(executable) - + _, ext = os.path.splitext(executable) if (sys.platform == 'win32') and (ext != '.exe'): executable = executable + '.exe' - if not os.path.isfile(executable): - for p in paths: - f = os.path.join(p, executable) - if os.path.isfile(f): - # the file exists, we have a shot at spawn working - return f - return None - else: + if os.path.isfile(executable): return executable + + if path is None: + path = os.environ.get('PATH', None) + if path is None: + try: + path = os.confstr("CS_PATH") + except (AttributeError, ValueError): + # os.confstr() or CS_PATH is not available + path = os.defpath + # bpo-35755: Don't use os.defpath if the PATH environment variable is + # set to an empty string to mimick Unix which command behavior + + # PATH='' doesn't match, whereas PATH=':' looks in the current directory + if not path: + return None + + paths = path.split(os.pathsep) + for p in paths: + f = os.path.join(p, executable) + if os.path.isfile(f): + # the file exists, we have a shot at spawn working + return f + return None diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 0d455385d8..f9ae69ef86 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -87,11 +87,52 @@ def test_find_executable(self): rv = find_executable(dont_exist_program , path=tmp_dir) self.assertIsNone(rv) - # test os.defpath: missing PATH environment variable + # PATH='': no match, except in the current directory with test_support.EnvironmentVarGuard() as env: - with mock.patch('distutils.spawn.os.defpath', tmp_dir): - env.pop('PATH') + env['PATH'] = '' + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value=tmp_dir, create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', + tmp_dir): + rv = find_executable(program) + self.assertIsNone(rv) + + # look in current directory + with test_support.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # PATH=':': explicitly looks in the current directory + with test_support.EnvironmentVarGuard() as env: + env['PATH'] = os.pathsep + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value='', create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', ''): + rv = find_executable(program) + self.assertIsNone(rv) + + # look in current directory + with test_support.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # missing PATH: test os.confstr("CS_PATH") and os.defpath + with test_support.EnvironmentVarGuard() as env: + env.pop('PATH', None) + + # without confstr + with unittest.mock.patch('distutils.spawn.os.confstr', + side_effect=ValueError, + create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', + tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, filename) + # with confstr + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value=tmp_dir, create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', ''): rv = find_executable(program) self.assertEqual(rv, filename) From 3dd8d681a9db9ca36372f3a6a8fe6457076ea8b0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 17 Apr 2019 17:44:06 +0200 Subject: [PATCH 7436/8469] bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861) --- spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spawn.py b/spawn.py index 888327270e..d3a12c2833 100644 --- a/spawn.py +++ b/spawn.py @@ -188,7 +188,7 @@ def find_executable(executable, path=None): # os.confstr() or CS_PATH is not available path = os.defpath # bpo-35755: Don't use os.defpath if the PATH environment variable is - # set to an empty string to mimick Unix which command behavior + # set to an empty string # PATH='' doesn't match, whereas PATH=':' looks in the current directory if not path: From 869c634880f24b918ca074588b625b9dce2038b2 Mon Sep 17 00:00:00 2001 From: Floris Lambrechts Date: Tue, 26 Mar 2019 09:08:33 +0100 Subject: [PATCH 7437/8469] Add test for pre-existing wheels in build_meta Currently, this will fail because setuptools.build_meta.build_wheel assumes that no wheels already exist in the `dist/` directory. See GH #1671 --- setuptools/tests/test_build_meta.py | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 0bdea2d613..90400afc50 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -157,6 +157,44 @@ def test_build_wheel(self, build_backend): assert os.path.isfile(os.path.join(dist_dir, wheel_name)) + @pytest.mark.xfail(reason="Known error, see GH #1671") + def test_build_wheel_with_existing_wheel_file_present(self, tmpdir_cwd): + # Building a wheel should still succeed if there's already a wheel + # in the wheel directory + files = { + 'setup.py': "from setuptools import setup\nsetup()", + 'VERSION': "0.0.1", + 'setup.cfg': DALS(""" + [metadata] + name = foo + version = file: VERSION + """), + 'pyproject.toml': DALS(""" + [build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta + """), + } + + build_files(files) + + dist_dir = os.path.abspath('pip-wheel-preexisting') + os.makedirs(dist_dir) + + # make first wheel + build_backend = self.get_build_backend() + wheel_one = build_backend.build_wheel(dist_dir) + + # change version + with open("VERSION", "wt") as version_file: + version_file.write("0.0.2") + + # make *second* wheel + wheel_two = self.get_build_backend().build_wheel(dist_dir) + + assert os.path.isfile(os.path.join(dist_dir, wheel_one)) + assert wheel_one != wheel_two + def test_build_sdist(self, build_backend): dist_dir = os.path.abspath('pip-sdist') os.makedirs(dist_dir) From 901f7cc2a036bfeb93bfbe480608e04c76c2c5ec Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sat, 20 Apr 2019 23:24:41 -0400 Subject: [PATCH 7438/8469] Fix error when wheels already exist in dist/ `build_meta.build_wheel` assumes that the only wheel in its output directory is the one it builds, but prior to this, it also used the `dist/` folder as its working output directory. This commit uses a temporary directory instead, preventing an error that was triggered when previously-generated wheel files were still sitting in `dist/`. Fixes GH #1671 --- setuptools/build_meta.py | 23 ++++++++++++++++------- setuptools/py31compat.py | 4 ++-- setuptools/tests/test_build_meta.py | 7 ++++++- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 47cbcbf684..e40904a5df 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -35,6 +35,7 @@ import setuptools import distutils +from setuptools.py31compat import TemporaryDirectory from pkg_resources import parse_requirements @@ -182,14 +183,22 @@ def build_wheel(self, wheel_directory, config_settings=None, metadata_directory=None): config_settings = self._fix_config(config_settings) wheel_directory = os.path.abspath(wheel_directory) - sys.argv = sys.argv[:1] + ['bdist_wheel'] + \ - config_settings["--global-option"] - self.run_setup() - if wheel_directory != 'dist': - shutil.rmtree(wheel_directory) - shutil.copytree('dist', wheel_directory) - return _file_with_extension(wheel_directory, '.whl') + # Build the wheel in a temporary directory, then copy to the target + with TemporaryDirectory(dir=wheel_directory) as tmp_dist_dir: + sys.argv = (sys.argv[:1] + + ['bdist_wheel', '--dist-dir', tmp_dist_dir] + + config_settings["--global-option"]) + self.run_setup() + + wheel_basename = _file_with_extension(tmp_dist_dir, '.whl') + wheel_path = os.path.join(wheel_directory, wheel_basename) + if os.path.exists(wheel_path): + # os.rename will fail overwriting on non-unix env + os.remove(wheel_path) + os.rename(os.path.join(tmp_dist_dir, wheel_basename), wheel_path) + + return wheel_basename def build_sdist(self, sdist_directory, config_settings=None): config_settings = self._fix_config(config_settings) diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py index 1a0705ece3..e1da7ee2a2 100644 --- a/setuptools/py31compat.py +++ b/setuptools/py31compat.py @@ -17,9 +17,9 @@ class TemporaryDirectory: errors on deletion. """ - def __init__(self): + def __init__(self, **kwargs): self.name = None # Handle mkdtemp raising an exception - self.name = tempfile.mkdtemp() + self.name = tempfile.mkdtemp(**kwargs) def __enter__(self): return self.name diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 90400afc50..88e29ffe1a 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -157,7 +157,6 @@ def test_build_wheel(self, build_backend): assert os.path.isfile(os.path.join(dist_dir, wheel_name)) - @pytest.mark.xfail(reason="Known error, see GH #1671") def test_build_wheel_with_existing_wheel_file_present(self, tmpdir_cwd): # Building a wheel should still succeed if there's already a wheel # in the wheel directory @@ -195,6 +194,12 @@ def test_build_wheel_with_existing_wheel_file_present(self, tmpdir_cwd): assert os.path.isfile(os.path.join(dist_dir, wheel_one)) assert wheel_one != wheel_two + # and if rebuilding the same wheel? + open(os.path.join(dist_dir, wheel_two), 'w').close() + wheel_three = self.get_build_backend().build_wheel(dist_dir) + assert wheel_three == wheel_two + assert os.path.getsize(os.path.join(dist_dir, wheel_three)) > 0 + def test_build_sdist(self, build_backend): dist_dir = os.path.abspath('pip-sdist') os.makedirs(dist_dir) From e4f987b141104e709367cbe629f3cd6ef5153216 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sat, 20 Apr 2019 23:25:59 -0400 Subject: [PATCH 7439/8469] Add changelog for PR #1745 --- changelog.d/1671.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1671.change.rst diff --git a/changelog.d/1671.change.rst b/changelog.d/1671.change.rst new file mode 100644 index 0000000000..95ae49da64 --- /dev/null +++ b/changelog.d/1671.change.rst @@ -0,0 +1 @@ +Fixed issue with the PEP 517 backend that prevented building a wheel when the ``dist/`` directory contained existing ``.whl`` files. From bd3d72b030eeae19ebc2eb3a0a325f87b41a09f1 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 16:49:46 +0200 Subject: [PATCH 7440/8469] travis: preemptively switch to xenial As it will soon become the default: https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5b670e4b9..d99656e026 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: xenial language: python jobs: @@ -9,7 +9,6 @@ jobs: - <<: *latest_py2 env: LANG=C - python: pypy2.7-6.0.0 - dist: xenial env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: pypy3 env: DISABLE_COVERAGE=1 @@ -19,11 +18,9 @@ jobs: python: 3.6 - &latest_py3 python: 3.7 - dist: xenial - <<: *latest_py3 env: LANG=C - python: 3.8-dev - dist: xenial env: DISABLE_COVERAGE=1 # Ignore invalid coverage data. - <<: *default_py stage: deploy (to PyPI for tagged commits) From 3a797435ccdc5a115b681572d5ba0cfd484ae810 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 16:53:37 +0200 Subject: [PATCH 7441/8469] travis: update PyPy 3 job to latest supported version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d99656e026..9429dc6ca4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ jobs: env: LANG=C - python: pypy2.7-6.0.0 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - - python: pypy3 + - python: pypy3.5-6.0.0 env: DISABLE_COVERAGE=1 - python: 3.4 - python: 3.5 From 127c8c74dead715b67a66eed86c420fe7b31ea3b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 22 Apr 2019 11:05:29 -0400 Subject: [PATCH 7442/8469] Limit workers in ProcessPoolExecutor As a mitigation for #1730, this commit limits the number of workers in the ProcessPoolExecutor to 1 (default is the number of CPUs). On PyPy, having a higher number of available workers dramatically increases the number of concurrent processes, leading to some resource exhaustion issues. This does not address the root issue, but should improve the situation until the root issue is addressed. --- setuptools/tests/test_build_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 90400afc50..e32cfb92b8 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -28,7 +28,7 @@ class BuildBackend(BuildBackendBase): def __init__(self, *args, **kwargs): super(BuildBackend, self).__init__(*args, **kwargs) - self.pool = futures.ProcessPoolExecutor() + self.pool = futures.ProcessPoolExecutor(max_workers=1) def __getattr__(self, name): """Handles aribrary function invocations on the build backend.""" From e66857af348a823b15701c39a88add28cfaab3bd Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 16:00:24 +0000 Subject: [PATCH 7443/8469] travis: re-enable coverage for Python 3.8 job (#1748) Now that the issue with invalid coverage data has been fixed. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9429dc6ca4..ffcad99864 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,6 @@ jobs: - <<: *latest_py3 env: LANG=C - python: 3.8-dev - env: DISABLE_COVERAGE=1 # Ignore invalid coverage data. - <<: *default_py stage: deploy (to PyPI for tagged commits) if: tag IS present From 97d7563915b6e2ad8a638e988361357709a83bda Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 22:07:03 +0200 Subject: [PATCH 7444/8469] =?UTF-8?q?Bump=20version:=2041.0.0=20=E2=86=92?= =?UTF-8?q?=2041.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 8 ++++++++ changelog.d/1671.change.rst | 1 - changelog.d/1709.change.rst | 1 - changelog.d/1741.change.rst | 1 - setup.cfg | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1671.change.rst delete mode 100644 changelog.d/1709.change.rst delete mode 100644 changelog.d/1741.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a8fd179a80..87acb5ef8d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.0.0 +current_version = 41.0.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 08c5ee0bdb..9da2253792 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v41.0.1 +------- + +* #1671: Fixed issue with the PEP 517 backend that prevented building a wheel when the ``dist/`` directory contained existing ``.whl`` files. +* #1709: In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH. +* #1741: In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows + + v41.0.0 ------- diff --git a/changelog.d/1671.change.rst b/changelog.d/1671.change.rst deleted file mode 100644 index 95ae49da64..0000000000 --- a/changelog.d/1671.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed issue with the PEP 517 backend that prevented building a wheel when the ``dist/`` directory contained existing ``.whl`` files. diff --git a/changelog.d/1709.change.rst b/changelog.d/1709.change.rst deleted file mode 100644 index c6670ae9c6..0000000000 --- a/changelog.d/1709.change.rst +++ /dev/null @@ -1 +0,0 @@ -In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH. diff --git a/changelog.d/1741.change.rst b/changelog.d/1741.change.rst deleted file mode 100644 index 03b2478007..0000000000 --- a/changelog.d/1741.change.rst +++ /dev/null @@ -1 +0,0 @@ -In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows diff --git a/setup.cfg b/setup.cfg index 561e7b248e..3945408162 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,4 +19,4 @@ universal = 1 [metadata] license_file = LICENSE -version = 41.0.0 +version = 41.0.1 From 5f88c42f3b4529956e4d02453ae571e32bc4692a Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 22:18:50 +0200 Subject: [PATCH 7445/8469] build_meta: fix 2 issues with `build_wheel` / `build_sdist` Fix the following cases: * `build_sdist` is called with another sdist already present in the destination directory * `build_wheel` is called with the destination directory not already created --- setuptools/build_meta.py | 47 +++++++++++++++-------------- setuptools/tests/test_build_meta.py | 38 ++++++++++++----------- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index e40904a5df..10c4b528d9 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -38,6 +38,7 @@ from setuptools.py31compat import TemporaryDirectory from pkg_resources import parse_requirements +from pkg_resources.py31compat import makedirs __all__ = ['get_requires_for_build_sdist', 'get_requires_for_build_wheel', @@ -179,36 +180,38 @@ def prepare_metadata_for_build_wheel(self, metadata_directory, return dist_infos[0] - def build_wheel(self, wheel_directory, config_settings=None, - metadata_directory=None): + def _build_with_temp_dir(self, setup_command, result_extension, + result_directory, config_settings): config_settings = self._fix_config(config_settings) - wheel_directory = os.path.abspath(wheel_directory) + result_directory = os.path.abspath(result_directory) - # Build the wheel in a temporary directory, then copy to the target - with TemporaryDirectory(dir=wheel_directory) as tmp_dist_dir: - sys.argv = (sys.argv[:1] + - ['bdist_wheel', '--dist-dir', tmp_dist_dir] + + # Build in a temporary directory, then copy to the target. + makedirs(result_directory, exist_ok=True) + with TemporaryDirectory(dir=result_directory) as tmp_dist_dir: + sys.argv = (sys.argv[:1] + setup_command + + ['--dist-dir', tmp_dist_dir] + config_settings["--global-option"]) self.run_setup() - wheel_basename = _file_with_extension(tmp_dist_dir, '.whl') - wheel_path = os.path.join(wheel_directory, wheel_basename) - if os.path.exists(wheel_path): - # os.rename will fail overwriting on non-unix env - os.remove(wheel_path) - os.rename(os.path.join(tmp_dist_dir, wheel_basename), wheel_path) + result_basename = _file_with_extension(tmp_dist_dir, result_extension) + result_path = os.path.join(result_directory, result_basename) + if os.path.exists(result_path): + # os.rename will fail overwriting on non-Unix. + os.remove(result_path) + os.rename(os.path.join(tmp_dist_dir, result_basename), result_path) - return wheel_basename + return result_basename - def build_sdist(self, sdist_directory, config_settings=None): - config_settings = self._fix_config(config_settings) - sdist_directory = os.path.abspath(sdist_directory) - sys.argv = sys.argv[:1] + ['sdist', '--formats', 'gztar'] + \ - config_settings["--global-option"] + \ - ["--dist-dir", sdist_directory] - self.run_setup() - return _file_with_extension(sdist_directory, '.tar.gz') + def build_wheel(self, wheel_directory, config_settings=None, + metadata_directory=None): + return self._build_with_temp_dir(['bdist_wheel'], '.whl', + wheel_directory, config_settings) + + def build_sdist(self, sdist_directory, config_settings=None): + return self._build_with_temp_dir(['sdist', '--formats', 'gztar'], + '.tar.gz', sdist_directory, + config_settings) class _BuildMetaLegacyBackend(_BuildMetaBackend): diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 7612ebd7fc..e1efe5617c 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -157,9 +157,10 @@ def test_build_wheel(self, build_backend): assert os.path.isfile(os.path.join(dist_dir, wheel_name)) - def test_build_wheel_with_existing_wheel_file_present(self, tmpdir_cwd): - # Building a wheel should still succeed if there's already a wheel - # in the wheel directory + @pytest.mark.parametrize('build_type', ('wheel', 'sdist')) + def test_build_with_existing_file_present(self, build_type, tmpdir_cwd): + # Building a sdist/wheel should still succeed if there's + # already a sdist/wheel in the destination directory. files = { 'setup.py': "from setuptools import setup\nsetup()", 'VERSION': "0.0.1", @@ -177,28 +178,31 @@ def test_build_wheel_with_existing_wheel_file_present(self, tmpdir_cwd): build_files(files) - dist_dir = os.path.abspath('pip-wheel-preexisting') - os.makedirs(dist_dir) + dist_dir = os.path.abspath('preexisting-' + build_type) - # make first wheel build_backend = self.get_build_backend() - wheel_one = build_backend.build_wheel(dist_dir) + build_method = getattr(build_backend, 'build_' + build_type) + + # Build a first sdist/wheel. + # Note: this also check the destination directory is + # successfully created if it does not exist already. + first_result = build_method(dist_dir) - # change version + # Change version. with open("VERSION", "wt") as version_file: version_file.write("0.0.2") - # make *second* wheel - wheel_two = self.get_build_backend().build_wheel(dist_dir) + # Build a *second* sdist/wheel. + second_result = build_method(dist_dir) - assert os.path.isfile(os.path.join(dist_dir, wheel_one)) - assert wheel_one != wheel_two + assert os.path.isfile(os.path.join(dist_dir, first_result)) + assert first_result != second_result - # and if rebuilding the same wheel? - open(os.path.join(dist_dir, wheel_two), 'w').close() - wheel_three = self.get_build_backend().build_wheel(dist_dir) - assert wheel_three == wheel_two - assert os.path.getsize(os.path.join(dist_dir, wheel_three)) > 0 + # And if rebuilding the exact same sdist/wheel? + open(os.path.join(dist_dir, second_result), 'w').close() + third_result = build_method(dist_dir) + assert third_result == second_result + assert os.path.getsize(os.path.join(dist_dir, third_result)) > 0 def test_build_sdist(self, build_backend): dist_dir = os.path.abspath('pip-sdist') From 812a97c2a90f67a551b6b158e08fe466748d7902 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 22 Apr 2019 23:25:17 +0200 Subject: [PATCH 7446/8469] changelog: add entry for PR #1750 --- changelog.d/1749.change.rst | 1 + changelog.d/1750.change.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1749.change.rst create mode 100644 changelog.d/1750.change.rst diff --git a/changelog.d/1749.change.rst b/changelog.d/1749.change.rst new file mode 100644 index 0000000000..de67807234 --- /dev/null +++ b/changelog.d/1749.change.rst @@ -0,0 +1 @@ +Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory. diff --git a/changelog.d/1750.change.rst b/changelog.d/1750.change.rst new file mode 100644 index 0000000000..7a22229ef3 --- /dev/null +++ b/changelog.d/1750.change.rst @@ -0,0 +1 @@ +Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist. From 89a5c175e47d95d33a700eedecf402e78d2a964a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 25 Apr 2019 11:59:34 +0200 Subject: [PATCH 7447/8469] bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) bpo-28552, bpo-7774: Fix distutils.sysconfig if sys.executable is None or an empty string: use os.getcwd() to initialize project_base. Fix also the distutils build command: don't use sys.executable if it's evaluated as false (None or empty string). --- command/build.py | 2 +- sysconfig.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/command/build.py b/command/build.py index c6f52e61e1..a86df0bc7f 100644 --- a/command/build.py +++ b/command/build.py @@ -116,7 +116,7 @@ def finalize_options(self): self.build_scripts = os.path.join(self.build_base, 'scripts-%d.%d' % sys.version_info[:2]) - if self.executable is None: + if self.executable is None and sys.executable: self.executable = os.path.normpath(sys.executable) if isinstance(self.parallel, str): diff --git a/sysconfig.py b/sysconfig.py index a3494670db..570a612d1b 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -28,7 +28,12 @@ if "_PYTHON_PROJECT_BASE" in os.environ: project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"]) else: - project_base = os.path.dirname(os.path.abspath(sys.executable)) + if sys.executable: + project_base = os.path.dirname(os.path.abspath(sys.executable)) + else: + # sys.executable can be empty if argv[0] has been changed and Python is + # unable to retrieve the real program name + project_base = os.getcwd() # python_build: (Boolean) if true, we're either building Python or From eb3478f2cdccd5489b64f7bb8cec4988fba985c7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 25 Apr 2019 20:13:10 +0200 Subject: [PATCH 7448/8469] bpo-21536: C extensions are no longer linked to libpython (GH-12946) On Unix, C extensions are no longer linked to libpython. It is now possible to load a C extension built using a shared library Python with a statically linked Python. When Python is embedded, libpython must not be loaded with RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it was already not possible to load C extensions which were not linked to libpython, like C extensions of the standard library built by the "*shared*" section of Modules/Setup. distutils, python-config and python-config.py have been modified. --- command/build_ext.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index 0428466b00..1672d02acf 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -714,20 +714,5 @@ def get_libraries(self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] - else: - return ext.libraries - elif sys.platform == 'darwin': - # Don't use the default code below - return ext.libraries - elif sys.platform[:3] == 'aix': - # Don't use the default code below - return ext.libraries - else: - from distutils import sysconfig - if sysconfig.get_config_var('Py_ENABLE_SHARED'): - pythonlib = 'python{}.{}{}'.format( - sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, - sysconfig.get_config_var('ABIFLAGS')) - return ext.libraries + [pythonlib] - else: - return ext.libraries + + return ext.libraries From 03ae9d8b1618be1a9dc5c9a3349fb01b4c7c7d14 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Thu, 25 Apr 2019 11:36:45 -0700 Subject: [PATCH 7449/8469] bpo-35920: Windows 10 ARM32 platform support (GH-11774) --- _msvccompiler.py | 16 ++++++++++++++-- spawn.py | 2 +- sysconfig.py | 1 + util.py | 16 +++++++++++++--- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 58b20a2102..c7ac3f049e 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -89,13 +89,24 @@ def _find_vc2017(): return None, None +PLAT_SPEC_TO_RUNTIME = { + 'x86' : 'x86', + 'x86_amd64' : 'x64', + 'x86_arm' : 'arm', +} + def _find_vcvarsall(plat_spec): _, best_dir = _find_vc2017() vcruntime = None - vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' + + if plat_spec in PLAT_SPEC_TO_RUNTIME: + vcruntime_plat = PLAT_SPEC_TO_RUNTIME[plat_spec] + else: + vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' + if best_dir: vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", - "Microsoft.VC141.CRT", "vcruntime140.dll") + vcruntime_plat, "Microsoft.VC141.CRT", "vcruntime140.dll") try: import glob vcruntime = glob.glob(vcredist, recursive=True)[-1] @@ -178,6 +189,7 @@ def _find_exe(exe, paths=None): PLAT_TO_VCVARS = { 'win32' : 'x86', 'win-amd64' : 'x86_amd64', + 'win-arm32' : 'x86_arm', } # A set containing the DLLs that are guaranteed to be available for diff --git a/spawn.py b/spawn.py index d3a12c2833..ceb94945dc 100644 --- a/spawn.py +++ b/spawn.py @@ -81,7 +81,6 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): "command %r failed with exit status %d" % (cmd, rc)) if sys.platform == 'darwin': - from distutils import sysconfig _cfg_target = None _cfg_target_split = None @@ -95,6 +94,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): if sys.platform == 'darwin': global _cfg_target, _cfg_target_split if _cfg_target is None: + from distutils import sysconfig _cfg_target = sysconfig.get_config_var( 'MACOSX_DEPLOYMENT_TARGET') or '' if _cfg_target: diff --git a/sysconfig.py b/sysconfig.py index 570a612d1b..b51629eb94 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -15,6 +15,7 @@ import sys from .errors import DistutilsPlatformError +from .util import get_platform, get_host_platform # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) diff --git a/util.py b/util.py index 15cd2ad9a9..50550e1893 100644 --- a/util.py +++ b/util.py @@ -15,7 +15,7 @@ from distutils import log from distutils.errors import DistutilsByteCompileError -def get_platform (): +def get_host_platform(): """Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the @@ -38,6 +38,8 @@ def get_platform (): if os.name == 'nt': if 'amd64' in sys.version.lower(): return 'win-amd64' + if '(arm)' in sys.version.lower(): + return 'win-arm32' return sys.platform # Set for cross builds explicitly @@ -90,8 +92,16 @@ def get_platform (): return "%s-%s-%s" % (osname, release, machine) -# get_platform () - +def get_platform(): + if os.name == 'nt': + TARGET_TO_PLAT = { + 'x86' : 'win32', + 'x64' : 'win-amd64', + 'arm' : 'win-arm32', + } + return TARGET_TO_PLAT.get(os.environ.get('VSCMD_ARG_TGT_ARCH')) or get_host_platform() + else: + return get_host_platform() def convert_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, From 736a36a6342656cf7fda44eb3060ce2d3d092ef0 Mon Sep 17 00:00:00 2001 From: xdegaye Date: Mon, 29 Apr 2019 09:27:40 +0200 Subject: [PATCH 7450/8469] bpo-21536: On Android, C extensions are linked to libpython (GH-12989) --- command/build_ext.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index 1672d02acf..c3b9602461 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -714,5 +714,20 @@ def get_libraries(self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] + # On Android only the main executable and LD_PRELOADs are considered + # to be RTLD_GLOBAL, all the dependencies of the main executable + # remain RTLD_LOCAL and so the shared libraries must be linked with + # libpython when python is built with a shared python library (issue + # bpo-21536). + else: + from distutils.sysconfig import get_config_var + if get_config_var('Py_ENABLE_SHARED'): + # Either a native build on an Android device or the + # cross-compilation of Python. + if (hasattr(sys, 'getandroidapilevel') or + ('_PYTHON_HOST_PLATFORM' in os.environ and + get_config_var('ANDROID_API_LEVEL') != 0)): + ldversion = get_config_var('LDVERSION') + return ext.libraries + ['python' + ldversion] return ext.libraries From f58549ab38eb6f5d1146510cbf15965aeb75c6fb Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 14 May 2019 15:31:27 +0200 Subject: [PATCH 7451/8469] tests: fix_test_build_deps_on_distutils * ignore distutils' warning (`Unknown distribution option: 'python_requires'`) * fix test on Windows --- setuptools/tests/test_integration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index e54f3209aa..1e13218899 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -141,6 +141,7 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): allowed_unknowns = [ 'test_suite', 'tests_require', + 'python_requires', 'install_requires', ] assert not match or match.group(1).strip('"\'') in allowed_unknowns @@ -149,8 +150,8 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): def install(pkg_dir, install_dir): with open(os.path.join(pkg_dir, 'setuptools.py'), 'w') as breaker: breaker.write('raise ImportError()') - cmd = [sys.executable, 'setup.py', 'install', '--prefix', install_dir] - env = dict(os.environ, PYTHONPATH=pkg_dir) + cmd = [sys.executable, 'setup.py', 'install', '--prefix', str(install_dir)] + env = dict(os.environ, PYTHONPATH=str(pkg_dir)) output = subprocess.check_output( cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) return output.decode('utf-8') From 9146e8808d3912c5a193f6f9b0cc32c13bc4a4fc Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 14 May 2019 16:58:09 +0200 Subject: [PATCH 7452/8469] appveyor: fix Python 2 job Update virtualenv so the tox environment use a more recent version of pip (and probably setuptools/wheel too). --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7a3d174da8..0881806968 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,7 @@ cache: test_script: - python --version - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel - - pip install --upgrade tox tox-venv + - pip install --upgrade tox tox-venv virtualenv - pip freeze --all - python bootstrap.py - tox -- --cov From 835580ae8926fc6ca7560ab7421387e3ba47242c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 14 May 2019 17:01:08 +0200 Subject: [PATCH 7453/8469] tox: tweak configuration Fix the `list_dependencies_command` so arguably the most important packages are not hidden (pip, setuptools, and wheel). --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index bb940ac072..e0eef95a45 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ deps=-rtests/requirements.txt # from being added to `sys.path`. install_command=python -c 'import sys; sys.path.remove(""); from pkg_resources import load_entry_point; load_entry_point("pip", "console_scripts", "pip")()' install {opts} {packages} # Same as above. -list_dependencies_command={envbindir}/pip freeze +list_dependencies_command={envbindir}/pip freeze --all setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. From 314386fd5d4d0e925960f3e9982102095b9579c9 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Wed, 15 May 2019 12:20:25 +0200 Subject: [PATCH 7454/8469] Deprecated Eggsecutable Scripts Closes: #1557 --- changelog.d/1557.change | 1 + docs/setuptools.txt | 37 --------------------------------- setuptools/command/bdist_egg.py | 9 +++++++- 3 files changed, 9 insertions(+), 38 deletions(-) create mode 100644 changelog.d/1557.change diff --git a/changelog.d/1557.change b/changelog.d/1557.change new file mode 100644 index 0000000000..77d2e3b4f4 --- /dev/null +++ b/changelog.d/1557.change @@ -0,0 +1 @@ +Deprecated eggsecutable scripts and removed related docs. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 64b385cb1d..f44813d17c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -569,43 +569,6 @@ on "entry points" in general, see the section below on `Dynamic Discovery of Services and Plugins`_. -"Eggsecutable" Scripts ----------------------- - -Occasionally, there are situations where it's desirable to make an ``.egg`` -file directly executable. You can do this by including an entry point such -as the following:: - - setup( - # other arguments here... - entry_points={ - 'setuptools.installation': [ - 'eggsecutable = my_package.some_module:main_func', - ] - } - ) - -Any eggs built from the above setup script will include a short executable -prelude that imports and calls ``main_func()`` from ``my_package.some_module``. -The prelude can be run on Unix-like platforms (including Mac and Linux) by -invoking the egg with ``/bin/sh``, or by enabling execute permissions on the -``.egg`` file. For the executable prelude to run, the appropriate version of -Python must be available via the ``PATH`` environment variable, under its -"long" name. That is, if the egg is built for Python 2.3, there must be a -``python2.3`` executable present in a directory on ``PATH``. - -This feature is primarily intended to support ez_setup the installation of -setuptools itself on non-Windows platforms, but may also be useful for other -projects as well. - -IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or -invoked via symlinks. They *must* be invoked using their original filename, in -order to ensure that, once running, ``pkg_resources`` will know what project -and version is in use. The header script will check this and exit with an -error if the ``.egg`` file has been renamed or is invoked via a symlink that -changes its base name. - - Declaring Dependencies ====================== diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9f8df917e6..ae44eaa2bc 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -11,13 +11,14 @@ import re import textwrap import marshal +import warnings from setuptools.extern import six from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint from setuptools.extension import Library -from setuptools import Command +from setuptools import Command, SetuptoolsDeprecationWarning try: # Python 2.7 or >=3.2 @@ -278,6 +279,12 @@ def gen_header(self): if ep is None: return 'w' # not an eggsecutable, do it the usual way. + warnings.warn( + "Eggsecutables are deprecated and will be removed in a future " + "version.", + SetuptoolsDeprecationWarning + ) + if not ep.attrs or ep.extras: raise DistutilsSetupError( "eggsecutable entry point (%r) cannot have 'extras' " From a775582b44ca39096640c36550a9dcec7f965ec1 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Tue, 14 May 2019 12:35:35 +0200 Subject: [PATCH 7455/8469] Migrate constants from setup.py to setup.cfg This also makes wheel an unconditional setup_requires dependency. Closes: #1697 --- setup.cfg | 43 ++++++++++++++++++++++++++++++++++++++++++- setup.py | 46 ---------------------------------------------- 2 files changed, 42 insertions(+), 47 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3945408162..ff87464bf4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,5 +18,46 @@ formats = zip universal = 1 [metadata] -license_file = LICENSE +name = setuptools version = 41.0.1 +description = Easily download, build, install, upgrade, and uninstall Python packages +author = Python Packaging Authority +author_email = distutils-sig@python.org +long_description = file: README.rst +long_description_content_type = text/x-rst; charset=UTF-8 +license_file = LICENSE +keywords = CPAN PyPI distutils eggs package management +url = https://github.com/pypa/setuptools +project_urls = + Documentation = https://setuptools.readthedocs.io/ +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.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Topic :: Software Development :: Libraries :: Python Modules + Topic :: System :: Archiving :: Packaging + Topic :: System :: Systems Administration + Topic :: Utilities + +[options] +zip_safe = True +python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* +py_modules = easy_install +packages = find: + +[options.packages.find] +exclude = *.tests + +[options.extras_require] +ssl = + wincertstore==0.2; sys_platform=='win32' +certs = + certifi==2016.9.26 diff --git a/setup.py b/setup.py index 78d7018c98..f5030dd670 100755 --- a/setup.py +++ b/setup.py @@ -3,10 +3,8 @@ Distutils setup file, used to install or test 'setuptools' """ -import io import os import sys -import textwrap import setuptools @@ -49,10 +47,6 @@ def _gen_console_scripts(): yield tmpl.format(shortver=sys.version[:3]) -readme_path = os.path.join(here, 'README.rst') -with io.open(readme_path, encoding='utf-8') as readme_file: - long_description = readme_file.read() - package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], ) @@ -88,25 +82,8 @@ def pypi_link(pkg_filename): setup_params = dict( - name="setuptools", - description=( - "Easily download, build, install, upgrade, and uninstall " - "Python packages" - ), - author="Python Packaging Authority", - author_email="distutils-sig@python.org", - long_description=long_description, - long_description_content_type='text/x-rst; charset=UTF-8', - keywords="CPAN PyPI distutils eggs package management", - url="https://github.com/pypa/setuptools", - project_urls={ - "Documentation": "https://setuptools.readthedocs.io/", - }, src_root=None, - packages=setuptools.find_packages(exclude=['*.tests']), package_data=package_data, - py_modules=['easy_install'], - zip_safe=True, entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() @@ -152,28 +129,6 @@ def pypi_link(pkg_filename): "setuptools.installation": ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, - classifiers=textwrap.dedent(""" - 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.4 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Topic :: Software Development :: Libraries :: Python Modules - Topic :: System :: Archiving :: Packaging - Topic :: System :: Systems Administration - Topic :: Utilities - """).strip().splitlines(), - python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', - extras_require={ - "ssl:sys_platform=='win32'": "wincertstore==0.2", - "certs": "certifi==2016.9.26", - }, dependency_links=[ pypi_link( 'certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d', @@ -182,7 +137,6 @@ def pypi_link(pkg_filename): 'wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2', ), ], - scripts=[], setup_requires=[ ] + wheel, ) From 17eb6b93f482385c5c4c9d2ab92fbc00fa49674e Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Tue, 14 May 2019 12:39:34 +0200 Subject: [PATCH 7456/8469] Added changelog fragment --- changelog.d/1697.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1697.change.rst diff --git a/changelog.d/1697.change.rst b/changelog.d/1697.change.rst new file mode 100644 index 0000000000..44818b3c14 --- /dev/null +++ b/changelog.d/1697.change.rst @@ -0,0 +1 @@ +Moved most of the constants from setup.py to setup.cfg From 8f227af516c8c6b991c8e6c76f5bf4672f36c41e Mon Sep 17 00:00:00 2001 From: Emiel Wiedijk Date: Sat, 23 Feb 2019 20:51:09 +0100 Subject: [PATCH 7457/8469] Set sys.argv[0] in build scripts run by build_meta Some setup.py scripts, use sys.argv[0] to locate the source directory of a project. I added this to build_meta.__legacy__ since that is focused on backwards compatibility with old scripts. However, @pganssle said this behaviour should not be added to setuptools.build_meta. Fixes #1628 --- setuptools/build_meta.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 10c4b528d9..eb9e815ef8 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -232,6 +232,12 @@ def run_setup(self, setup_script='setup.py'): if script_dir not in sys.path: sys.path.insert(0, script_dir) + # Some setup.py scripts (e.g. in pygame and numpy) use sys.argv[0] to + # get the directory of the source code. They expect it to refer to the + # setup.py script. + sys_argv_0 = sys.argv[0] + sys.argv[0] = setup_script + try: super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) @@ -242,6 +248,7 @@ def run_setup(self, setup_script='setup.py'): # the original path so that the path manipulation does not persist # within the hook after run_setup is called. sys.path[:] = sys_path + sys.argv[0] = sys_argv_0 # The primary backend _BACKEND = _BuildMetaBackend() From 0eff214d94ced853ded99c036c6d792c889e47ab Mon Sep 17 00:00:00 2001 From: Emiel Wiedijk Date: Sat, 23 Feb 2019 21:06:45 +0100 Subject: [PATCH 7458/8469] Add changelog entry --- changelog.d/1704.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1704.change.rst diff --git a/changelog.d/1704.change.rst b/changelog.d/1704.change.rst new file mode 100644 index 0000000000..62450835b9 --- /dev/null +++ b/changelog.d/1704.change.rst @@ -0,0 +1 @@ +Set sys.argv[0] in setup script run by build_meta.__legacy__ From b2701fb39252fc68b4f0b22c3a3b79039f4cc58e Mon Sep 17 00:00:00 2001 From: Emiel Wiedijk Date: Sat, 23 Feb 2019 22:19:43 +0100 Subject: [PATCH 7459/8469] Add tests --- setuptools/tests/test_build_meta.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index e1efe5617c..41a4078975 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -385,6 +385,28 @@ def run(): assert expected == sorted(actual) + _sys_argv_0_passthrough = { + 'setup.py': DALS(""" + import os + import sys + + __import__('setuptools').setup( + name='foo', + version='0.0.0', + ) + + sys_argv = os.path.abspath(sys.argv[0]) + file_path = os.path.abspath('setup.py') + assert sys_argv == file_path + """) + } + + def test_sys_argv_passthrough(self, tmpdir_cwd): + build_files(self._sys_argv_0_passthrough) + build_backend = self.get_build_backend() + with pytest.raises(AssertionError): + build_backend.build_sdist("temp") + class TestBuildMetaLegacyBackend(TestBuildMetaBackend): backend_name = 'setuptools.build_meta:__legacy__' @@ -396,3 +418,9 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_backend = self.get_build_backend() build_backend.build_sdist("temp") + + def test_sys_argv_passthrough(self, tmpdir_cwd): + build_files(self._sys_argv_0_passthrough) + + build_backend = self.get_build_backend() + build_backend.build_sdist("temp") From d307b46c898fa5ee902344dab7ecc6e8ed595987 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 09:23:51 +0200 Subject: [PATCH 7460/8469] Moved keywords section into separate document, added link in index --- docs/index.txt | 1 + docs/keywords.txt | 172 +++++++++++++++++++++++++++++++++++++++++++ docs/setuptools.txt | 173 -------------------------------------------- 3 files changed, 173 insertions(+), 173 deletions(-) create mode 100644 docs/keywords.txt diff --git a/docs/index.txt b/docs/index.txt index 13a46e74ef..60c4f331d4 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -17,6 +17,7 @@ Documentation content: :maxdepth: 2 setuptools + keywords pkg_resources python3 development diff --git a/docs/keywords.txt b/docs/keywords.txt new file mode 100644 index 0000000000..a1097aca3b --- /dev/null +++ b/docs/keywords.txt @@ -0,0 +1,172 @@ +============================== +Supported ``setup()`` Keywords +============================== + +The following keyword arguments to ``setup()`` are supported by ``setuptools``. +All of them are optional; you do not have to supply them unless you need the +associated ``setuptools`` feature. + +``include_package_data`` + If set to ``True``, this tells ``setuptools`` to automatically include any + data files it finds inside your package directories that are specified by + your ``MANIFEST.in`` file. For more information, see the section below on + `Including Data Files`_. + +``exclude_package_data`` + A dictionary mapping package names to lists of glob patterns that should + be *excluded* from your package directories. You can use this to trim back + any excess files included by ``include_package_data``. For a complete + description and examples, see the section below on `Including Data Files`_. + +``package_data`` + A dictionary mapping package names to lists of glob patterns. For a + complete description and examples, see the section below on `Including + Data Files`_. You do not need to use this option if you are using + ``include_package_data``, unless you need to add e.g. files that are + generated by your setup script and build process. (And are therefore not + in source control or are files that you don't want to include in your + source distribution.) + +``zip_safe`` + A boolean (True or False) flag specifying whether the project can be + safely installed and run from a zip file. If this argument is not + supplied, the ``bdist_egg`` command will have to analyze all of your + project's contents for possible problems each time it builds an egg. + +``install_requires`` + A string or list of strings specifying what other distributions need to + be installed when this one is. See the section below on `Declaring + Dependencies`_ for details and examples of the format of this argument. + +``entry_points`` + A dictionary mapping entry point group names to strings or lists of strings + defining the entry points. Entry points are used to support dynamic + discovery of services or plugins provided by a project. See `Dynamic + Discovery of Services and Plugins`_ for details and examples of the format + of this argument. In addition, this keyword is used to support `Automatic + Script Creation`_. + +``extras_require`` + A dictionary mapping names of "extras" (optional features of your project) + to strings or lists of strings specifying what other distributions must be + installed to support those features. See the section below on `Declaring + Dependencies`_ for details and examples of the format of this argument. + +``python_requires`` + A string corresponding to a version specifier (as defined in PEP 440) for + the Python version, used to specify the Requires-Python defined in PEP 345. + +``setup_requires`` + A string or list of strings specifying what other distributions need to + be present in order for the *setup script* to run. ``setuptools`` will + attempt to obtain these (even going so far as to download them using + ``EasyInstall``) before processing the rest of the setup script or commands. + This argument is needed if you are using distutils extensions as part of + your build process; for example, extensions that process setup() arguments + and turn them into EGG-INFO metadata files. + + (Note: projects listed in ``setup_requires`` will NOT be automatically + installed on the system where the setup script is being run. They are + simply downloaded to the ./.eggs directory if they're not locally available + already. If you want them to be installed, as well as being available + when the setup script is run, you should add them to ``install_requires`` + **and** ``setup_requires``.) + +``dependency_links`` + A list of strings naming URLs to be searched when satisfying dependencies. + These links will be used if needed to install packages specified by + ``setup_requires`` or ``tests_require``. They will also be written into + the egg's metadata for use by tools like EasyInstall to use when installing + an ``.egg`` file. + +``namespace_packages`` + A list of strings naming the project's "namespace packages". A namespace + package is a package that may be split across multiple project + distributions. For example, Zope 3's ``zope`` package is a namespace + package, because subpackages like ``zope.interface`` and ``zope.publisher`` + may be distributed separately. The egg runtime system can automatically + merge such subpackages into a single parent package at runtime, as long + as you declare them in each project that contains any subpackages of the + namespace package, and as long as the namespace package's ``__init__.py`` + does not contain any code other than a namespace declaration. See the + section below on `Namespace Packages`_ for more information. + +``test_suite`` + A string naming a ``unittest.TestCase`` subclass (or a package or module + containing one or more of them, or a method of such a subclass), or naming + a function that can be called with no arguments and returns a + ``unittest.TestSuite``. If the named suite is a module, and the module + has an ``additional_tests()`` function, it is called and the results are + added to the tests to be run. If the named suite is a package, any + submodules and subpackages are recursively added to the overall test suite. + + Specifying this argument enables use of the `test`_ command to run the + specified test suite, e.g. via ``setup.py test``. See the section on the + `test`_ command below for more details. + +``tests_require`` + If your project's tests need one or more additional packages besides those + needed to install it, you can use this option to specify them. It should + be a string or list of strings specifying what other distributions need to + be present for the package's tests to run. When you run the ``test`` + command, ``setuptools`` will attempt to obtain these (even going + so far as to download them using ``EasyInstall``). Note that these + required projects will *not* be installed on the system where the tests + are run, but only downloaded to the project's setup directory if they're + not already installed locally. + +.. _test_loader: + +``test_loader`` + If you would like to use a different way of finding tests to run than what + setuptools normally uses, you can specify a module name and class name in + this argument. The named class must be instantiable with no arguments, and + its instances must support the ``loadTestsFromNames()`` method as defined + in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will + pass only one test "name" in the `names` argument: the value supplied for + the ``test_suite`` argument. The loader you specify may interpret this + string in any way it likes, as there are no restrictions on what may be + contained in a ``test_suite`` string. + + The module name and class name must be separated by a ``:``. The default + value of this argument is ``"setuptools.command.test:ScanningLoader"``. If + you want to use the default ``unittest`` behavior, you can specify + ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This + will prevent automatic scanning of submodules and subpackages. + + The module and class you specify here may be contained in another package, + as long as you use the ``tests_require`` option to ensure that the package + containing the loader class is available when the ``test`` command is run. + +``eager_resources`` + A list of strings naming resources that should be extracted together, if + any of them is needed, or if any C extensions included in the project are + imported. This argument is only useful if the project will be installed as + a zipfile, and there is a need to have all of the listed resources be + extracted to the filesystem *as a unit*. Resources listed here + should be '/'-separated paths, relative to the source root, so to list a + resource ``foo.png`` in package ``bar.baz``, you would include the string + ``bar/baz/foo.png`` in this argument. + + If you only need to obtain resources one at a time, or you don't have any C + extensions that access other files in the project (such as data files or + shared libraries), you probably do NOT need this argument and shouldn't + mess with it. For more details on how this argument works, see the section + below on `Automatic Resource Extraction`_. + +``use_2to3`` + Convert the source code from Python 2 to Python 3 with 2to3 during the + build process. See :doc:`python3` for more details. + +``convert_2to3_doctests`` + List of doctest source files that need to be converted with 2to3. + See :doc:`python3` for more details. + +``use_2to3_fixers`` + A list of modules to search for additional fixers to be used during + the 2to3 conversion. See :doc:`python3` for more details. + +``project_urls`` + An arbitrary map of URL names to hyperlinks, allowing more extensible + documentation of where various resources can be found than the simple + ``url`` and ``download_url`` options provide. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 64b385cb1d..7c0535d036 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -239,179 +239,6 @@ pre- or post-release tags. See the following sections for more details: * The `egg_info`_ command -New and Changed ``setup()`` Keywords -==================================== - -The following keyword arguments to ``setup()`` are added or changed by -``setuptools``. All of them are optional; you do not have to supply them -unless you need the associated ``setuptools`` feature. - -``include_package_data`` - If set to ``True``, this tells ``setuptools`` to automatically include any - data files it finds inside your package directories that are specified by - your ``MANIFEST.in`` file. For more information, see the section below on - `Including Data Files`_. - -``exclude_package_data`` - A dictionary mapping package names to lists of glob patterns that should - be *excluded* from your package directories. You can use this to trim back - any excess files included by ``include_package_data``. For a complete - description and examples, see the section below on `Including Data Files`_. - -``package_data`` - A dictionary mapping package names to lists of glob patterns. For a - complete description and examples, see the section below on `Including - Data Files`_. You do not need to use this option if you are using - ``include_package_data``, unless you need to add e.g. files that are - generated by your setup script and build process. (And are therefore not - in source control or are files that you don't want to include in your - source distribution.) - -``zip_safe`` - A boolean (True or False) flag specifying whether the project can be - safely installed and run from a zip file. If this argument is not - supplied, the ``bdist_egg`` command will have to analyze all of your - project's contents for possible problems each time it builds an egg. - -``install_requires`` - A string or list of strings specifying what other distributions need to - be installed when this one is. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``entry_points`` - A dictionary mapping entry point group names to strings or lists of strings - defining the entry points. Entry points are used to support dynamic - discovery of services or plugins provided by a project. See `Dynamic - Discovery of Services and Plugins`_ for details and examples of the format - of this argument. In addition, this keyword is used to support `Automatic - Script Creation`_. - -``extras_require`` - A dictionary mapping names of "extras" (optional features of your project) - to strings or lists of strings specifying what other distributions must be - installed to support those features. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``python_requires`` - A string corresponding to a version specifier (as defined in PEP 440) for - the Python version, used to specify the Requires-Python defined in PEP 345. - -``setup_requires`` - A string or list of strings specifying what other distributions need to - be present in order for the *setup script* to run. ``setuptools`` will - attempt to obtain these (even going so far as to download them using - ``EasyInstall``) before processing the rest of the setup script or commands. - This argument is needed if you are using distutils extensions as part of - your build process; for example, extensions that process setup() arguments - and turn them into EGG-INFO metadata files. - - (Note: projects listed in ``setup_requires`` will NOT be automatically - installed on the system where the setup script is being run. They are - simply downloaded to the ./.eggs directory if they're not locally available - already. If you want them to be installed, as well as being available - when the setup script is run, you should add them to ``install_requires`` - **and** ``setup_requires``.) - -``dependency_links`` - A list of strings naming URLs to be searched when satisfying dependencies. - These links will be used if needed to install packages specified by - ``setup_requires`` or ``tests_require``. They will also be written into - the egg's metadata for use by tools like EasyInstall to use when installing - an ``.egg`` file. - -``namespace_packages`` - A list of strings naming the project's "namespace packages". A namespace - package is a package that may be split across multiple project - distributions. For example, Zope 3's ``zope`` package is a namespace - package, because subpackages like ``zope.interface`` and ``zope.publisher`` - may be distributed separately. The egg runtime system can automatically - merge such subpackages into a single parent package at runtime, as long - as you declare them in each project that contains any subpackages of the - namespace package, and as long as the namespace package's ``__init__.py`` - does not contain any code other than a namespace declaration. See the - section below on `Namespace Packages`_ for more information. - -``test_suite`` - A string naming a ``unittest.TestCase`` subclass (or a package or module - containing one or more of them, or a method of such a subclass), or naming - a function that can be called with no arguments and returns a - ``unittest.TestSuite``. If the named suite is a module, and the module - has an ``additional_tests()`` function, it is called and the results are - added to the tests to be run. If the named suite is a package, any - submodules and subpackages are recursively added to the overall test suite. - - Specifying this argument enables use of the `test`_ command to run the - specified test suite, e.g. via ``setup.py test``. See the section on the - `test`_ command below for more details. - -``tests_require`` - If your project's tests need one or more additional packages besides those - needed to install it, you can use this option to specify them. It should - be a string or list of strings specifying what other distributions need to - be present for the package's tests to run. When you run the ``test`` - command, ``setuptools`` will attempt to obtain these (even going - so far as to download them using ``EasyInstall``). Note that these - required projects will *not* be installed on the system where the tests - are run, but only downloaded to the project's setup directory if they're - not already installed locally. - -.. _test_loader: - -``test_loader`` - If you would like to use a different way of finding tests to run than what - setuptools normally uses, you can specify a module name and class name in - this argument. The named class must be instantiable with no arguments, and - its instances must support the ``loadTestsFromNames()`` method as defined - in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will - pass only one test "name" in the `names` argument: the value supplied for - the ``test_suite`` argument. The loader you specify may interpret this - string in any way it likes, as there are no restrictions on what may be - contained in a ``test_suite`` string. - - The module name and class name must be separated by a ``:``. The default - value of this argument is ``"setuptools.command.test:ScanningLoader"``. If - you want to use the default ``unittest`` behavior, you can specify - ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This - will prevent automatic scanning of submodules and subpackages. - - The module and class you specify here may be contained in another package, - as long as you use the ``tests_require`` option to ensure that the package - containing the loader class is available when the ``test`` command is run. - -``eager_resources`` - A list of strings naming resources that should be extracted together, if - any of them is needed, or if any C extensions included in the project are - imported. This argument is only useful if the project will be installed as - a zipfile, and there is a need to have all of the listed resources be - extracted to the filesystem *as a unit*. Resources listed here - should be '/'-separated paths, relative to the source root, so to list a - resource ``foo.png`` in package ``bar.baz``, you would include the string - ``bar/baz/foo.png`` in this argument. - - If you only need to obtain resources one at a time, or you don't have any C - extensions that access other files in the project (such as data files or - shared libraries), you probably do NOT need this argument and shouldn't - mess with it. For more details on how this argument works, see the section - below on `Automatic Resource Extraction`_. - -``use_2to3`` - Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. See :doc:`python3` for more details. - -``convert_2to3_doctests`` - List of doctest source files that need to be converted with 2to3. - See :doc:`python3` for more details. - -``use_2to3_fixers`` - A list of modules to search for additional fixers to be used during - the 2to3 conversion. See :doc:`python3` for more details. - -``project_urls`` - An arbitrary map of URL names to hyperlinks, allowing more extensible - documentation of where various resources can be found than the simple - ``url`` and ``download_url`` options provide. - - Using ``find_packages()`` ------------------------- From 46a73d96faedee345834f29a7ac218de64519da2 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 10:29:11 +0200 Subject: [PATCH 7461/8469] Fixed broken implicit links --- docs/keywords.txt | 34 +++++++++++++++++----------------- docs/setuptools.txt | 10 +++++++++- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/docs/keywords.txt b/docs/keywords.txt index a1097aca3b..6a8fc2f2f8 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -9,19 +9,19 @@ associated ``setuptools`` feature. ``include_package_data`` If set to ``True``, this tells ``setuptools`` to automatically include any data files it finds inside your package directories that are specified by - your ``MANIFEST.in`` file. For more information, see the section below on - `Including Data Files`_. + your ``MANIFEST.in`` file. For more information, see the section on + :ref:`Including Data Files`. ``exclude_package_data`` A dictionary mapping package names to lists of glob patterns that should be *excluded* from your package directories. You can use this to trim back any excess files included by ``include_package_data``. For a complete - description and examples, see the section below on `Including Data Files`_. + description and examples, see the section on :ref:`Including Data Files`. ``package_data`` A dictionary mapping package names to lists of glob patterns. For a - complete description and examples, see the section below on `Including - Data Files`_. You do not need to use this option if you are using + complete description and examples, see the section on :ref:`Including Data + Files`. You do not need to use this option if you are using ``include_package_data``, unless you need to add e.g. files that are generated by your setup script and build process. (And are therefore not in source control or are files that you don't want to include in your @@ -35,22 +35,22 @@ associated ``setuptools`` feature. ``install_requires`` A string or list of strings specifying what other distributions need to - be installed when this one is. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. + be installed when this one is. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. ``entry_points`` A dictionary mapping entry point group names to strings or lists of strings defining the entry points. Entry points are used to support dynamic - discovery of services or plugins provided by a project. See `Dynamic - Discovery of Services and Plugins`_ for details and examples of the format - of this argument. In addition, this keyword is used to support `Automatic - Script Creation`_. + discovery of services or plugins provided by a project. See :ref:`Dynamic + Discovery of Services and Plugins` for details and examples of the format + of this argument. In addition, this keyword is used to support + :ref:`Automatic Script Creation`. ``extras_require`` A dictionary mapping names of "extras" (optional features of your project) to strings or lists of strings specifying what other distributions must be - installed to support those features. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. + installed to support those features. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. ``python_requires`` A string corresponding to a version specifier (as defined in PEP 440) for @@ -89,7 +89,7 @@ associated ``setuptools`` feature. as you declare them in each project that contains any subpackages of the namespace package, and as long as the namespace package's ``__init__.py`` does not contain any code other than a namespace declaration. See the - section below on `Namespace Packages`_ for more information. + section on :ref:`Namespace Packages` for more information. ``test_suite`` A string naming a ``unittest.TestCase`` subclass (or a package or module @@ -100,9 +100,9 @@ associated ``setuptools`` feature. added to the tests to be run. If the named suite is a package, any submodules and subpackages are recursively added to the overall test suite. - Specifying this argument enables use of the `test`_ command to run the + Specifying this argument enables use of the :ref:`test` command to run the specified test suite, e.g. via ``setup.py test``. See the section on the - `test`_ command below for more details. + :ref:`test` command below for more details. ``tests_require`` If your project's tests need one or more additional packages besides those @@ -152,7 +152,7 @@ associated ``setuptools`` feature. extensions that access other files in the project (such as data files or shared libraries), you probably do NOT need this argument and shouldn't mess with it. For more details on how this argument works, see the section - below on `Automatic Resource Extraction`_. + below on :ref:`Automatic Resource Extraction`. ``use_2to3`` Convert the source code from Python 2 to Python 3 with 2to3 during the diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7c0535d036..e07ac29682 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -345,6 +345,8 @@ With this layout, the package directory is specified as ``src``, as such:: .. _PEP 420: https://www.python.org/dev/peps/pep-0420/ +.. _Automatic Script Creation: + Automatic Script Creation ========================= @@ -432,6 +434,7 @@ and version is in use. The header script will check this and exit with an error if the ``.egg`` file has been renamed or is invoked via a symlink that changes its base name. +.. _Declaring Dependencies: Declaring Dependencies ====================== @@ -685,6 +688,8 @@ detailed in `PEP 508`_. .. _PEP 508: https://www.python.org/dev/peps/pep-0508/ +.. _Including Data Files: + Including Data Files ==================== @@ -860,6 +865,7 @@ no supported facility to reliably retrieve these resources. Instead, the PyPA recommends that any data files you wish to be accessible at run time be included in the package. +.. _Automatic Resource Extraction: Automatic Resource Extraction ----------------------------- @@ -905,6 +911,8 @@ Extensible Applications and Frameworks .. _Entry Points: +.. _Dynamic Discovery of Services and Plugins: + Dynamic Discovery of Services and Plugins ----------------------------------------- @@ -1977,7 +1985,7 @@ result (which must be a ``unittest.TestSuite``) is added to the tests to be run. If the named suite is a package, any submodules and subpackages are recursively added to the overall test suite. (Note: if your project specifies a ``test_loader``, the rules for processing the chosen ``test_suite`` may -differ; see the `test_loader`_ documentation for more details.) +differ; see the :ref:`test_loader ` documentation for more details.) Note that many test systems including ``doctest`` support wrapping their non-``unittest`` tests in ``TestSuite`` objects. So, if you are using a test From d2de0b92773c4304d6264258228a008499ccfd21 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 11:03:51 +0200 Subject: [PATCH 7462/8469] Transcibed all keywords from https://docs.python.org/3/distutils/apiref.html#distutils.core.setup --- docs/keywords.txt | 89 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/docs/keywords.txt b/docs/keywords.txt index 6a8fc2f2f8..877a4caffe 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -3,9 +3,96 @@ Supported ``setup()`` Keywords ============================== The following keyword arguments to ``setup()`` are supported by ``setuptools``. -All of them are optional; you do not have to supply them unless you need the +Some of them are optional; you do not have to supply them unless you need the associated ``setuptools`` feature. +``name`` + A string specifying the name of the package. + +``version`` + A string specifying the version number of the package. + +``description`` + A string describing the package in a single line. + +``long_description`` + A string providing a longer description of the package. + +``author`` + A string specifying the author of the package. + +``author_email`` + A string specifying the email address of the package author. + +``maintainer`` + A string specifying the name of the current maintainer, if different from + the author. Note that if the maintainer is provided, setuptools will use it + as the author in ``PKG-INFO``. + +``maintainer_email`` + A string specifying the email address of the current maintainer, if + different from the author. + +``url`` + A string specifying the URL for the package homepage. + +``download_url`` + A string specifying the URL to download the package. + +``packages`` + A list of strings specifying the packages that setuptools will manipulate. + +``py_modules`` + A list of strings specifying the modules that setuptools will manipulate. + +``scripts`` + A list of strings specifying the standalone script files to be built and + installed. + +``ext_modules`` + A list of instances of ``setuptools.Extension`` providing the list of + Python extensions to be built. + +``classifiers`` + A list of strings describing the categories for the package. + +``distclass`` + A subclass of ``Distribution`` to use. + +``script_name`` + A string specifying the name of the setup.py script -- defaults to + ``sys.argv[0]`` + +``script_args`` + A list of strings defining the arguments to supply to the setup script. + +``options`` + A dictionary providing the default options for the setup script. + +``license`` + A string specifying the license of the package. + +``keywords`` + A list of strings or a comma-separated string providing descriptive + meta-data. See: `PEP 0314`_. + +.. _PEP 0314: https://www.python.org/dev/peps/pep-0314/ + +``platforms`` + A list of strings or comma-separated string. + +``cmdclass`` + A dictionary providing a mapping of command names to ``Command`` + subclasses. + +``data_files`` + A list of strings specifying the data files to install. + +``package_dir`` + A dictionary providing a mapping of package to directory names. + +.. Below are setuptools keywords, above are distutils + ``include_package_data`` If set to ``True``, this tells ``setuptools`` to automatically include any data files it finds inside your package directories that are specified by From 734e5106be681eec7f1717f9feb4836b025dbe97 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 11:07:58 +0200 Subject: [PATCH 7463/8469] Added changelog fragment --- changelog.d/1700.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1700.change.rst diff --git a/changelog.d/1700.change.rst b/changelog.d/1700.change.rst new file mode 100644 index 0000000000..f66046a2ca --- /dev/null +++ b/changelog.d/1700.change.rst @@ -0,0 +1 @@ +Document all supported keywords by migrating the ones from distutils. From 880ff4a3579bac7839f8f038085381ae14155f31 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 12:46:50 +0200 Subject: [PATCH 7464/8469] Force metadata-version = 1.2 when project urls are present. Closes: #1756 --- setuptools/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 9a165de0dd..ea6411b178 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -54,7 +54,8 @@ def get_metadata_version(self): mv = StrictVersion('2.1') elif (self.maintainer is not None or self.maintainer_email is not None or - getattr(self, 'python_requires', None) is not None): + getattr(self, 'python_requires', None) is not None or + self.project_urls): mv = StrictVersion('1.2') elif (self.provides or self.requires or self.obsoletes or self.classifiers or self.download_url): From a64ddf0d2f2bcd6e9843fb55c94fba922f315722 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 13:48:15 +0200 Subject: [PATCH 7465/8469] Added test for metadata-version 1.2 --- setuptools/tests/test_egg_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index db9c387335..316eb2edde 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -622,6 +622,7 @@ def test_project_urls(self, tmpdir_cwd, env): assert expected_line in pkg_info_lines expected_line = 'Project-URL: Link Two, https://example.com/two/' assert expected_line in pkg_info_lines + assert 'Metadata-Version: 1.2' in pkg_info_lines def test_python_requires_egg_info(self, tmpdir_cwd, env): self._setup_script_with_requires( From a7fcfcdf8e224f42aa83c32363df3a39100ca69c Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 14:18:59 +0200 Subject: [PATCH 7466/8469] Added warnings for data_files, setup_requires and dependency_links --- docs/keywords.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index 877a4caffe..81b8034476 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -86,6 +86,11 @@ associated ``setuptools`` feature. subclasses. ``data_files`` + + .. warning:: + ``data_files`` is deprecated. It does not work with wheels, so it + should be avoided. + A list of strings specifying the data files to install. ``package_dir`` @@ -144,6 +149,10 @@ associated ``setuptools`` feature. the Python version, used to specify the Requires-Python defined in PEP 345. ``setup_requires`` + + .. warning:: + Using ``setup_requires`` is discouraged in favour for `PEP-518`_ + A string or list of strings specifying what other distributions need to be present in order for the *setup script* to run. ``setuptools`` will attempt to obtain these (even going so far as to download them using @@ -159,7 +168,13 @@ associated ``setuptools`` feature. when the setup script is run, you should add them to ``install_requires`` **and** ``setup_requires``.) +.. _PEP-518: http://www.python.org/dev/peps/pep-0518/ + ``dependency_links`` + + .. warning:: + ``dependency_links`` is deprecated. It is not supported anymore by pip. + A list of strings naming URLs to be searched when satisfying dependencies. These links will be used if needed to install packages specified by ``setup_requires`` or ``tests_require``. They will also be written into From 13c1825df412b6ed63ff05594af0e4dde5ef0455 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 14:19:25 +0200 Subject: [PATCH 7467/8469] Maintain old header and link to new keywords document --- docs/keywords.txt | 2 ++ docs/setuptools.txt | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index 81b8034476..2666ba8590 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -1,3 +1,5 @@ +.. _Supported setup() Keywords: + ============================== Supported ``setup()`` Keywords ============================== diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e07ac29682..4ddc2b7abe 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -239,6 +239,13 @@ pre- or post-release tags. See the following sections for more details: * The `egg_info`_ command +New and Changed ``setup()`` Keywords +==================================== + +The keywords supported by setuptools can be found in :ref:`Supported setup() +Keywords` + + Using ``find_packages()`` ------------------------- From b62d07c2b2ca80256b94e0df32ecdb93e98ac258 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Thu, 16 May 2019 14:27:30 +0200 Subject: [PATCH 7468/8469] Put deprecation in section rather then removing it (updated changelog as well) --- changelog.d/1557.change | 2 +- docs/setuptools.txt | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/changelog.d/1557.change b/changelog.d/1557.change index 77d2e3b4f4..9f8af4a6cc 100644 --- a/changelog.d/1557.change +++ b/changelog.d/1557.change @@ -1 +1 @@ -Deprecated eggsecutable scripts and removed related docs. +Deprecated eggsecutable scripts and updated docs. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f44813d17c..e4e56fb023 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -569,6 +569,45 @@ on "entry points" in general, see the section below on `Dynamic Discovery of Services and Plugins`_. +"Eggsecutable" Scripts +---------------------- + +.. warning:: Eggsecutable Scripts are deprecated. + +Occasionally, there are situations where it's desirable to make an ``.egg`` +file directly executable. You can do this by including an entry point such +as the following:: + + setup( + # other arguments here... + entry_points={ + 'setuptools.installation': [ + 'eggsecutable = my_package.some_module:main_func', + ] + } + ) + +Any eggs built from the above setup script will include a short executable +prelude that imports and calls ``main_func()`` from ``my_package.some_module``. +The prelude can be run on Unix-like platforms (including Mac and Linux) by +invoking the egg with ``/bin/sh``, or by enabling execute permissions on the +``.egg`` file. For the executable prelude to run, the appropriate version of +Python must be available via the ``PATH`` environment variable, under its +"long" name. That is, if the egg is built for Python 2.3, there must be a +``python2.3`` executable present in a directory on ``PATH``. + +This feature is primarily intended to support ez_setup the installation of +setuptools itself on non-Windows platforms, but may also be useful for other +projects as well. + +IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or +invoked via symlinks. They *must* be invoked using their original filename, in +order to ensure that, once running, ``pkg_resources`` will know what project +and version is in use. The header script will check this and exit with an +error if the ``.egg`` file has been renamed or is invoked via a symlink that +changes its base name. + + Declaring Dependencies ====================== From 5e8927a17f4e1a5b7e97cbe42639dbcba21acb69 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Fri, 17 May 2019 08:22:55 +0200 Subject: [PATCH 7469/8469] Added changelog entry. --- changelog.d/1756.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1756.change.rst diff --git a/changelog.d/1756.change.rst b/changelog.d/1756.change.rst new file mode 100644 index 0000000000..5c908d3529 --- /dev/null +++ b/changelog.d/1756.change.rst @@ -0,0 +1 @@ +Forse metadata-version >= 1.2. when project urls are present. From e8db26a129378279833620da952a1ecc6cef937b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 17 May 2019 16:17:33 -0400 Subject: [PATCH 7470/8469] Add support for automatic publishing of release notes --- .travis.yml | 6 ++++++ tox.ini | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 .travis.yml create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..13f58071af --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +jobs: + include: + - stage: deploy + env: + # TIDELIFT_TOKEN + - secure: ... diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..8f419798dc --- /dev/null +++ b/tox.ini @@ -0,0 +1,7 @@ +[testenv:release] +passenv = + TIDELIFT_TOKEN +deps = + jaraco.tidelift +commands = + python -m jaraco.tidelift.publish-release-notes From 534678f19edd76e6f93ad31900d9a92d00ef25fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 17 May 2019 16:37:45 -0400 Subject: [PATCH 7471/8469] Use technique for environment passing matching that found in jaraco/skeleton --- .travis.yml | 1 + tox.ini | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13f58071af..a9afa23f5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,4 @@ jobs: env: # TIDELIFT_TOKEN - secure: ... + TOX_TESTENV_PASSENV="TIDELIFT_TOKEN" diff --git a/tox.ini b/tox.ini index 8f419798dc..7f9b6c1eb4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,4 @@ [testenv:release] -passenv = - TIDELIFT_TOKEN deps = jaraco.tidelift commands = From cc9e041823a6a06cabeaa27949abc4e2ff08aee0 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 12:37:06 +0200 Subject: [PATCH 7472/8469] Added unused requires, obsolete and requires for completenes --- docs/keywords.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index 2666ba8590..ff757231ee 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -98,6 +98,23 @@ associated ``setuptools`` feature. ``package_dir`` A dictionary providing a mapping of package to directory names. +``requires`` + + .. warning:: + ``requires`` is superseded by ``install_requires`` and should not be used + anymore. + +``obsoletes`` + + .. warning:: + ``obsoletes`` is not supported by ``pip`` and should not be used. + +``requires`` + + .. warning:: + ``requires`` is not supported by ``pip`` and should not be used. + + .. Below are setuptools keywords, above are distutils ``include_package_data`` From 0b323b5e158bfd284cdd6c99b130cfc05eb05187 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 12:37:48 +0200 Subject: [PATCH 7473/8469] Added ext_package --- docs/keywords.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index ff757231ee..4d7efd3823 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -51,6 +51,10 @@ associated ``setuptools`` feature. A list of strings specifying the standalone script files to be built and installed. +``ext_package`` + A string specifying the base package name for the extensions provided by + this package. + ``ext_modules`` A list of instances of ``setuptools.Extension`` providing the list of Python extensions to be built. From e21b663802f7ca97c1cd4c2866338c0129e9a502 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 12:37:58 +0200 Subject: [PATCH 7474/8469] added use_2to3_exclude_fixers --- docs/keywords.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index 4d7efd3823..7881e28543 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -291,6 +291,9 @@ associated ``setuptools`` feature. A list of modules to search for additional fixers to be used during the 2to3 conversion. See :doc:`python3` for more details. +``use_2to3_exclude_fixers`` + List of fixer names to be skipped. + ``project_urls`` An arbitrary map of URL names to hyperlinks, allowing more extensible documentation of where various resources can be found than the simple From 4521d88caac6a68a1baf55c401589f8ce7b04243 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 12:38:09 +0200 Subject: [PATCH 7475/8469] added long_description_content_type --- docs/keywords.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/keywords.txt b/docs/keywords.txt index 7881e28543..5086bcf14d 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -20,6 +20,10 @@ associated ``setuptools`` feature. ``long_description`` A string providing a longer description of the package. +``long_description_content_type`` + A string specifying the content type is used for the ``long_description`` + (e.g. ``text/markdown``) + ``author`` A string specifying the author of the package. From 4786eb4053e1eac5cbf869b290a90436a9cfe347 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 12:59:56 +0200 Subject: [PATCH 7476/8469] Made keywords a subpage (via include directive) maintaining the old structure --- docs/index.txt | 1 - docs/keywords.txt | 10 ---------- docs/setuptools.txt | 7 +++++-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 60c4f331d4..13a46e74ef 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -17,7 +17,6 @@ Documentation content: :maxdepth: 2 setuptools - keywords pkg_resources python3 development diff --git a/docs/keywords.txt b/docs/keywords.txt index 5086bcf14d..cbaf7ae908 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -1,13 +1,3 @@ -.. _Supported setup() Keywords: - -============================== -Supported ``setup()`` Keywords -============================== - -The following keyword arguments to ``setup()`` are supported by ``setuptools``. -Some of them are optional; you do not have to supply them unless you need the -associated ``setuptools`` feature. - ``name`` A string specifying the name of the package. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 4ddc2b7abe..ae85b8f57d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -242,8 +242,11 @@ pre- or post-release tags. See the following sections for more details: New and Changed ``setup()`` Keywords ==================================== -The keywords supported by setuptools can be found in :ref:`Supported setup() -Keywords` +The following keyword arguments to ``setup()`` are supported by ``setuptools``. +Some of them are optional; you do not have to supply them unless you need the +associated ``setuptools`` feature. + +.. include:: keywords.txt Using ``find_packages()`` From 345f7e6fbc3118f3fd6c97a307dbbd9cda30a84c Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 13:05:39 +0200 Subject: [PATCH 7477/8469] s/requires/provides/ --- docs/keywords.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/keywords.txt b/docs/keywords.txt index cbaf7ae908..488ed20bfb 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -107,10 +107,10 @@ .. warning:: ``obsoletes`` is not supported by ``pip`` and should not be used. -``requires`` +``provides`` .. warning:: - ``requires`` is not supported by ``pip`` and should not be used. + ``provides`` is not supported by ``pip`` and should not be used. .. Below are setuptools keywords, above are distutils From 73dbe0ec07e3738bc592e92def65209b45a14dfb Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 13:06:53 +0200 Subject: [PATCH 7478/8469] s/favour/favor/ Co-Authored-By: Benoit Pierre --- docs/keywords.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keywords.txt b/docs/keywords.txt index 488ed20bfb..db50163a9b 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -168,7 +168,7 @@ ``setup_requires`` .. warning:: - Using ``setup_requires`` is discouraged in favour for `PEP-518`_ + Using ``setup_requires`` is discouraged in favor of `PEP-518`_ A string or list of strings specifying what other distributions need to be present in order for the *setup script* to run. ``setuptools`` will From 6a3674a18d22dbea4d6b513b8e8a7ac28ada5eba Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sat, 18 May 2019 22:37:49 +0200 Subject: [PATCH 7479/8469] Added meat to obsoletes and provides, removed that they should not be used. --- docs/keywords.txt | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/keywords.txt b/docs/keywords.txt index db50163a9b..d56014e01f 100644 --- a/docs/keywords.txt +++ b/docs/keywords.txt @@ -105,13 +105,49 @@ ``obsoletes`` .. warning:: - ``obsoletes`` is not supported by ``pip`` and should not be used. + ``obsoletes`` is currently ignored by ``pip``. + + List of strings describing packages which this package renders obsolete, + meaning that the two projects should not be installed at the same time. + + Version declarations can be supplied. Version numbers must be in the format + specified in Version specifiers (e.g. ``foo (<3.0)``). + + This field may be followed by an environment marker after a semicolon (e.g. + ``foo; os_name == "posix"``) + + The most common use of this field will be in case a project name changes, + e.g. Gorgon 2.3 gets subsumed into Torqued Python 1.0. When you install + Torqued Python, the Gorgon distribution should be removed. ``provides`` .. warning:: - ``provides`` is not supported by ``pip`` and should not be used. - + ``provides`` is currently ignored by ``pip``. + + List of strings describing package- and virtual package names contained + within this package. + + A package may provide additional names, e.g. to indicate that multiple + projects have been bundled together. For instance, source distributions of + the ZODB project have historically included the transaction project, which + is now available as a separate distribution. Installing such a source + distribution satisfies requirements for both ZODB and transaction. + + A package may also provide a “virtual†project name, which does not + correspond to any separately-distributed project: such a name might be used + to indicate an abstract capability which could be supplied by one of + multiple projects. E.g., multiple projects might supply RDBMS bindings for + use by a given ORM: each project might declare that it provides + ORM-bindings, allowing other projects to depend only on having at most one + of them installed. + + A version declaration may be supplied and must follow the rules described in + Version specifiers. The distribution’s version number will be implied if + none is specified (e.g. ``foo (<3.0)``). + + Each package may be followed by an environment marker after a semicolon + (e.g. ``foo; os_name == "posix"``). .. Below are setuptools keywords, above are distutils From 9d9a6d30b814bfdd7265e67ae9eea2f6e2db1657 Mon Sep 17 00:00:00 2001 From: "E. M. Bray" Date: Fri, 24 May 2019 17:33:47 +0200 Subject: [PATCH 7480/8469] bpo-21536: On Cygwin, C extensions must be linked with libpython (GH-13549) It is also possible to link against a library or executable with a statically linked libpython, but not both with the same DLL. In fact building a statically linked python is currently broken on Cygwin for other (related) reasons. The same problem applies to other POSIX-like layers over Windows (MinGW, MSYS) but Python's build system does not seem to attempt to support those platforms at the moment. --- command/build_ext.py | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/command/build_ext.py b/command/build_ext.py index c3b9602461..2d7cdf063f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -714,20 +714,32 @@ def get_libraries(self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] - # On Android only the main executable and LD_PRELOADs are considered - # to be RTLD_GLOBAL, all the dependencies of the main executable - # remain RTLD_LOCAL and so the shared libraries must be linked with - # libpython when python is built with a shared python library (issue - # bpo-21536). else: + # On Android only the main executable and LD_PRELOADs are considered + # to be RTLD_GLOBAL, all the dependencies of the main executable + # remain RTLD_LOCAL and so the shared libraries must be linked with + # libpython when python is built with a shared python library (issue + # bpo-21536). + # On Cygwin (and if required, other POSIX-like platforms based on + # Windows like MinGW) it is simply necessary that all symbols in + # shared libraries are resolved at link time. from distutils.sysconfig import get_config_var + link_libpython = False if get_config_var('Py_ENABLE_SHARED'): - # Either a native build on an Android device or the - # cross-compilation of Python. - if (hasattr(sys, 'getandroidapilevel') or - ('_PYTHON_HOST_PLATFORM' in os.environ and - get_config_var('ANDROID_API_LEVEL') != 0)): - ldversion = get_config_var('LDVERSION') - return ext.libraries + ['python' + ldversion] + # A native build on an Android device or on Cygwin + if hasattr(sys, 'getandroidapilevel'): + link_libpython = True + elif sys.platform == 'cygwin': + link_libpython = True + elif '_PYTHON_HOST_PLATFORM' in os.environ: + # We are cross-compiling for one of the relevant platforms + if get_config_var('ANDROID_API_LEVEL') != 0: + link_libpython = True + elif get_config_var('MACHDEP') == 'cygwin': + link_libpython = True + + if link_libpython: + ldversion = get_config_var('LDVERSION') + return ext.libraries + ['python' + ldversion] return ext.libraries From ca1f766ee16c3a504082a95f2afd5a58fcae7d47 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 28 May 2019 21:38:56 +0200 Subject: [PATCH 7481/8469] tests: unpin pytest The new releases for pytest-fixture-config and pytest-shutil are compatible with pytest>=4.0. --- tests/requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index f944df2740..cb3e672696 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,8 +3,7 @@ pytest-flake8; python_version!="3.4" pytest-flake8<=1.0.0; python_version=="3.4" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 -# pytest pinned to <4 due to #1638 -pytest>=3.7,<4 +pytest>=3.7 wheel coverage>=4.5.1 pytest-cov>=2.5.1 From 59dd72d9df7a88d692637a8c488aa884c182e557 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Sat, 1 Jun 2019 20:33:32 +0200 Subject: [PATCH 7482/8469] Use license classifiers rather than the license field. The license field has a 'free' format, while the classifiers are unique identifiers, similar to SPDX identifiers. In the documentation, we should therefore showcase the use of classifiers. --- changelog.d/1776.doc.rst | 1 + docs/setuptools.txt | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelog.d/1776.doc.rst diff --git a/changelog.d/1776.doc.rst b/changelog.d/1776.doc.rst new file mode 100644 index 0000000000..d4f1dbca56 --- /dev/null +++ b/changelog.d/1776.doc.rst @@ -0,0 +1 @@ +Use license classifiers rather than the license field. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 64b385cb1d..2e7fe3bd93 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -136,16 +136,18 @@ dependencies, and perhaps some data files and scripts:: author="Me", author_email="me@example.com", description="This is an Example Package", - license="PSF", keywords="hello world example examples", url="http://example.com/HelloWorld/", # project home page, if any project_urls={ "Bug Tracker": "https://bugs.example.com/HelloWorld/", "Documentation": "https://docs.example.com/HelloWorld/", "Source Code": "https://code.example.com/HelloWorld/", - } + }, + classifiers=[ + 'License :: OSI Approved :: Python Software Foundation License' + ] - # could also include long_description, download_url, classifiers, etc. + # could also include long_description, download_url, etc. ) In the sections that follow, we'll explain what most of these ``setup()`` @@ -2234,6 +2236,7 @@ boilerplate code in some cases. license = BSD 3-Clause License classifiers = Framework :: Django + License :: OSI Approved :: BSD License Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 From b30cb4676572d51a26f3b74a40035df97f8a41c7 Mon Sep 17 00:00:00 2001 From: Xtreak Date: Mon, 3 Jun 2019 04:42:33 +0530 Subject: [PATCH 7483/8469] Fix typos in docs and docstrings (GH-13745) --- ccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index b71d1d39bc..1a411ed111 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -545,7 +545,7 @@ def compile(self, sources, output_dir=None, macros=None, 'extra_preargs' and 'extra_postargs' are implementation- dependent. On platforms that have the notion of a command-line (e.g. Unix, DOS/Windows), they are most likely lists of strings: extra - command-line arguments to prepand/append to the compiler command + command-line arguments to prepend/append to the compiler command line. On other platforms, consult the implementation class documentation. In any event, they are intended as an escape hatch for those occasions when the abstract compiler framework doesn't From d048c412f43c2b9eaa1e282fa2d3bacec2a2d82e Mon Sep 17 00:00:00 2001 From: Marcin Niemira Date: Sun, 9 Jun 2019 07:05:06 +1000 Subject: [PATCH 7484/8469] bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594) --- command/bdist_rpm.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 20ca7ac6dc..74381cc69a 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -309,10 +309,7 @@ def run(self): # build package log.info("building RPMs") - rpm_cmd = ['rpm'] - if os.path.exists('/usr/bin/rpmbuild') or \ - os.path.exists('/bin/rpmbuild'): - rpm_cmd = ['rpmbuild'] + rpm_cmd = ['rpmbuild'] if self.source_only: # what kind of RPMs? rpm_cmd.append('-bs') From 8aeff6b2c9a64e47ad2a22533d7e65c08cd4103f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 10 Jun 2019 13:03:33 -0400 Subject: [PATCH 7485/8469] Update developer docs to describe motivation behind vendored dependencies. Ref #1781. --- docs/developer-guide.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index a5942c8b0f..d145fba140 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -137,3 +137,17 @@ To build the docs locally, use tox:: .. _Sphinx: http://www.sphinx-doc.org/en/master/ .. _published documentation: https://setuptools.readthedocs.io/en/latest/ + +--------------------- +Vendored Dependencies +--------------------- + +Setuptools has some dependencies, but due to `bootstrapping issues +`, those dependencies +cannot be declared as they won't be resolved soon enough to build +setuptools from source. Eventually, this limitation may be lifted as +PEP 517/518 reach ubiquitous adoption, but for now, Setuptools +cannot declare dependencies other than through +``setuptools/_vendor/vendored.txt`` and +``pkg_reosurces/_vendor/vendored.txt`` and refreshed by way of +``paver update_vendored`` (pavement.py). From 69b935025661716ac64b3e2b049ed9b703dfe96a Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Wed, 12 Jun 2019 10:16:49 -0700 Subject: [PATCH 7486/8469] bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902) --- _msvccompiler.py | 2 ++ tests/test_bdist_wininst.py | 4 ++++ util.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/_msvccompiler.py b/_msvccompiler.py index c7ac3f049e..6e14f330d7 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -93,6 +93,7 @@ def _find_vc2017(): 'x86' : 'x86', 'x86_amd64' : 'x64', 'x86_arm' : 'arm', + 'x86_arm64' : 'arm64' } def _find_vcvarsall(plat_spec): @@ -190,6 +191,7 @@ def _find_exe(exe, paths=None): 'win32' : 'x86', 'win-amd64' : 'x86_amd64', 'win-arm32' : 'x86_arm', + 'win-arm64' : 'x86_arm64' } # A set containing the DLLs that are guaranteed to be available for diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 4c19bbab21..163f1cc97b 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -1,10 +1,14 @@ """Tests for distutils.command.bdist_wininst.""" +import sys +import platform import unittest from test.support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support +@unittest.skipIf(sys.platform == 'win32' and platform.machine() == 'ARM64', + 'bdist_wininst is not supported in this install') @unittest.skipIf(getattr(bdist_wininst, '_unsupported', False), 'bdist_wininst is not supported in this install') class BuildWinInstTestCase(support.TempdirManager, diff --git a/util.py b/util.py index 50550e1893..17a94bc428 100644 --- a/util.py +++ b/util.py @@ -40,6 +40,8 @@ def get_host_platform(): return 'win-amd64' if '(arm)' in sys.version.lower(): return 'win-arm32' + if '(arm64)' in sys.version.lower(): + return 'win-arm64' return sys.platform # Set for cross builds explicitly From fa22b42d9f2f8a15568dd3a3d290e33c9be86796 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 13 Jun 2019 18:31:57 +0200 Subject: [PATCH 7487/8469] launcher: Fix build with mingw-w64 execv() requires process.h to be included according to the MSVC documentation but for some reason it also works without it. mingw-w64 on the other hand fails to build the launcher if the include isn't there, so add it. --- launcher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/launcher.c b/launcher.c index be69f0c6e9..23ef3ac206 100644 --- a/launcher.c +++ b/launcher.c @@ -37,6 +37,7 @@ #include #include #include +#include int child_pid=0; From 53b8db359378f436bfd88f90a90aaf01b650d3a6 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 18 Jun 2019 16:15:25 +0900 Subject: [PATCH 7488/8469] Stop using deprecated HTMLParser.unescape HTMLParser.unescape is accessed even when unused - this will cause an exception when `HTMLParser.unescape` is removed in Python 3.9. --- changelog.d/1788.change.rst | 1 + setuptools/py33compat.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1788.change.rst diff --git a/changelog.d/1788.change.rst b/changelog.d/1788.change.rst new file mode 100644 index 0000000000..d8a49fd41d --- /dev/null +++ b/changelog.d/1788.change.rst @@ -0,0 +1 @@ +Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9. diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py index 87cf53983c..cb69443638 100644 --- a/setuptools/py33compat.py +++ b/setuptools/py33compat.py @@ -52,4 +52,8 @@ def __iter__(self): Bytecode = getattr(dis, 'Bytecode', Bytecode_compat) -unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape) +unescape = getattr(html, 'unescape', None) +if unescape is None: + # HTMLParser.unescape is deprecated since Python 3.4, and will be removed + # from 3.9. + unescape = html_parser.HTMLParser().unescape From 10fe6be3d61414bd6cd9ed723e961d7ea8f5fd61 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 30 Jun 2019 14:24:41 +0200 Subject: [PATCH 7489/8469] tests: fix `test_distribution_version_missing` to work with pytest>=5.0 --- pkg_resources/tests/test_pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index fb77c68587..a0f2c4526c 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -242,7 +242,7 @@ def test_distribution_version_missing(tmpdir, suffix, expected_filename, with pytest.raises(ValueError) as excinfo: dist.version - err = str(excinfo) + err = str(excinfo.value) # Include a string expression after the assert so the full strings # will be visible for inspection on failure. assert expected_text in err, str((expected_text, err)) From 4598c1a2a918f2f74e7242df775308841e477038 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 30 Jun 2019 14:25:12 +0200 Subject: [PATCH 7490/8469] tests: tweak default pytest arguments to fix Python 3.8 support --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 1c5b6b0934..612fb91f63 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -rsxX +addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* flake8-ignore = setuptools/site-patch.py F821 From eb834d03cc5a681a43ad8b76d0761e718199e5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 1 Jul 2019 14:12:40 +0200 Subject: [PATCH 7491/8469] bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506) bdist_wininst depends on MBCS codec, unavailable on non-Windows, and bdist_wininst have not worked since at least Python 3.2, possibly never on Python 3. Here we document that bdist_wininst is only supported on Windows, and we mark it unsupported otherwise to skip tests. Distributors of Python 3 can now safely drop the bdist_wininst .exe files without the need to skip bdist_wininst related tests. --- command/bdist_wininst.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index 3a616883be..acaa184b5f 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -55,6 +55,9 @@ class bdist_wininst(Command): boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', 'skip-build'] + # bpo-10945: bdist_wininst requires mbcs encoding only available on Windows + _unsupported = (sys.platform != "win32") + def initialize_options(self): self.bdist_dir = None self.plat_name = None From 6b9a31e6602723d98fce4c37f7151fdbab17367b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 3 Jul 2019 11:12:27 +0200 Subject: [PATCH 7492/8469] bpo-37421: Fix test_distutils.test_build_ext() (GH-14564) test_distutils.test_build_ext() is now able to remove the temporary directory on Windows: don't import the newly built C extension ("xx") in the current process, but test it in a separated process. --- tests/support.py | 5 ++-- tests/test_build_ext.py | 51 ++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/tests/support.py b/tests/support.py index 7385c6bbf6..041309851d 100644 --- a/tests/support.py +++ b/tests/support.py @@ -6,6 +6,7 @@ import unittest import sysconfig from copy import deepcopy +import test.support from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL @@ -64,8 +65,8 @@ def tearDown(self): os.chdir(self.old_cwd) super().tearDown() while self.tempdirs: - d = self.tempdirs.pop() - shutil.rmtree(d, os.name in ('nt', 'cygwin')) + tmpdir = self.tempdirs.pop() + test.support.rmtree(tmpdir) def mkdtemp(self): """Create a temporary directory that will be cleaned up. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 88847f9e9a..52d36b2484 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -15,6 +15,7 @@ import unittest from test import support +from test.support.script_helper import assert_python_ok # http://bugs.python.org/issue4373 # Don't load the xx module more than once. @@ -26,11 +27,8 @@ class BuildExtTestCase(TempdirManager, unittest.TestCase): def setUp(self): # Create a simple test environment - # Note that we're making changes to sys.path super(BuildExtTestCase, self).setUp() self.tmp_dir = self.mkdtemp() - self.sys_path = sys.path, sys.path[:] - sys.path.append(self.tmp_dir) import site self.old_user_base = site.USER_BASE site.USER_BASE = self.mkdtemp() @@ -40,15 +38,11 @@ def setUp(self): # bpo-30132: On Windows, a .pdb file may be created in the current # working directory. Create a temporary working directory to cleanup # everything at the end of the test. - self.temp_cwd = support.temp_cwd() - self.temp_cwd.__enter__() - self.addCleanup(self.temp_cwd.__exit__, None, None, None) + change_cwd = support.change_cwd(self.tmp_dir) + change_cwd.__enter__() + self.addCleanup(change_cwd.__exit__, None, None, None) def tearDown(self): - # Get everything back to normal - support.unload('xx') - sys.path = self.sys_path[0] - sys.path[:] = self.sys_path[1] import site site.USER_BASE = self.old_user_base from distutils.command import build_ext @@ -88,19 +82,34 @@ def test_build_ext(self): else: ALREADY_TESTED = type(self).__name__ - import xx + code = textwrap.dedent(f""" + tmp_dir = {self.tmp_dir!r} - for attr in ('error', 'foo', 'new', 'roj'): - self.assertTrue(hasattr(xx, attr)) + import sys + import unittest + from test import support - self.assertEqual(xx.foo(2, 5), 7) - self.assertEqual(xx.foo(13,15), 28) - self.assertEqual(xx.new().demo(), None) - if support.HAVE_DOCSTRINGS: - doc = 'This is a template module just for instruction.' - self.assertEqual(xx.__doc__, doc) - self.assertIsInstance(xx.Null(), xx.Null) - self.assertIsInstance(xx.Str(), xx.Str) + sys.path.insert(0, tmp_dir) + import xx + + class Tests(unittest.TestCase): + def test_xx(self): + for attr in ('error', 'foo', 'new', 'roj'): + self.assertTrue(hasattr(xx, attr)) + + self.assertEqual(xx.foo(2, 5), 7) + self.assertEqual(xx.foo(13,15), 28) + self.assertEqual(xx.new().demo(), None) + if support.HAVE_DOCSTRINGS: + doc = 'This is a template module just for instruction.' + self.assertEqual(xx.__doc__, doc) + self.assertIsInstance(xx.Null(), xx.Null) + self.assertIsInstance(xx.Str(), xx.Str) + + + unittest.main() + """) + assert_python_ok('-c', code) def test_solaris_enable_shared(self): dist = Distribution({'name': 'xx'}) From 850d4faed59006e8dbfcee2bbec13d1985d6538a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 5 Jul 2019 10:44:12 +0200 Subject: [PATCH 7493/8469] bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) The distutils bdist_wininst command is now deprecated, use bdist_wheel (wheel packages) instead. --- command/bdist_wininst.py | 10 +++++++++- tests/test_bdist_wininst.py | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index acaa184b5f..b5ed6f041e 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -3,7 +3,9 @@ Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" -import sys, os +import os +import sys +import warnings from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree @@ -58,6 +60,12 @@ class bdist_wininst(Command): # bpo-10945: bdist_wininst requires mbcs encoding only available on Windows _unsupported = (sys.platform != "win32") + def __init__(self, *args, **kw): + super().__init__(*args, **kw) + warnings.warn("bdist_wininst command is deprecated since Python 3.8, " + "use bdist_wheel (wheel packages) instead", + DeprecationWarning, 2) + def initialize_options(self): self.bdist_dir = None self.plat_name = None diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 163f1cc97b..5c3d025d33 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -2,7 +2,7 @@ import sys import platform import unittest -from test.support import run_unittest +from test.support import run_unittest, check_warnings from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support @@ -21,7 +21,8 @@ def test_get_exe_bytes(self): # this test makes sure it works now for every platform # let's create a command pkg_pth, dist = self.create_dist() - cmd = bdist_wininst(dist) + with check_warnings(("", DeprecationWarning)): + cmd = bdist_wininst(dist) cmd.ensure_finalized() # let's run the code that finds the right wininst*.exe file From 67344c95b9402b4720d3c9e61d01096a6453efa6 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sat, 13 Jul 2019 03:19:50 -0700 Subject: [PATCH 7494/8469] Fix #1790 : Include the file path in get_metadata() UnicodeDecodeErrors (#1791) Include the file path in get_metadata() UnicodeDecodeErrors. --- changelog.d/1790.change.rst | 2 + pkg_resources/__init__.py | 13 +++++- pkg_resources/tests/test_pkg_resources.py | 54 +++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1790.change.rst diff --git a/changelog.d/1790.change.rst b/changelog.d/1790.change.rst new file mode 100644 index 0000000000..e4a7998d8f --- /dev/null +++ b/changelog.d/1790.change.rst @@ -0,0 +1,2 @@ +Added the file path to the error message when a ``UnicodeDecodeError`` occurs +while reading a metadata file. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 97e08d6827..1f170cfda5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1416,8 +1416,17 @@ def has_metadata(self, name): def get_metadata(self, name): if not self.egg_info: return "" - value = self._get(self._fn(self.egg_info, name)) - return value.decode('utf-8') if six.PY3 else value + path = self._get_metadata_path(name) + value = self._get(path) + if six.PY2: + return value + try: + return value.decode('utf-8') + except UnicodeDecodeError as exc: + # Include the path in the error message to simplify + # troubleshooting, and without changing the exception type. + exc.reason += ' in {} file at path: {}'.format(name, path) + raise def get_metadata_lines(self, name): return yield_lines(self.get_metadata(name)) diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index a0f2c4526c..5960868a52 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -18,6 +18,7 @@ import mock from pkg_resources import DistInfoDistribution, Distribution, EggInfoDistribution +from setuptools.extern import six from pkg_resources.extern.six.moves import map from pkg_resources.extern.six import text_type, string_types @@ -191,6 +192,59 @@ def test_setuptools_not_imported(self): subprocess.check_call(cmd) +def make_test_distribution(metadata_path, metadata): + """ + Make a test Distribution object, and return it. + + :param metadata_path: the path to the metadata file that should be + created. This should be inside a distribution directory that should + also be created. For example, an argument value might end with + ".dist-info/METADATA". + :param metadata: the desired contents of the metadata file, as bytes. + """ + dist_dir = os.path.dirname(metadata_path) + os.mkdir(dist_dir) + with open(metadata_path, 'wb') as f: + f.write(metadata) + dists = list(pkg_resources.distributions_from_metadata(dist_dir)) + dist, = dists + + return dist + + +def test_get_metadata__bad_utf8(tmpdir): + """ + Test a metadata file with bytes that can't be decoded as utf-8. + """ + filename = 'METADATA' + # Convert the tmpdir LocalPath object to a string before joining. + metadata_path = os.path.join(str(tmpdir), 'foo.dist-info', filename) + # Encode a non-ascii string with the wrong encoding (not utf-8). + metadata = 'née'.encode('iso-8859-1') + dist = make_test_distribution(metadata_path, metadata=metadata) + + if six.PY2: + # In Python 2, get_metadata() doesn't do any decoding. + actual = dist.get_metadata(filename) + assert actual == metadata + return + + # Otherwise, we are in the Python 3 case. + with pytest.raises(UnicodeDecodeError) as excinfo: + dist.get_metadata(filename) + + exc = excinfo.value + actual = str(exc) + expected = ( + # The error message starts with "'utf-8' codec ..." However, the + # spelling of "utf-8" can vary (e.g. "utf8") so we don't include it + "codec can't decode byte 0xe9 in position 1: " + 'invalid continuation byte in METADATA file at path: ' + ) + assert expected in actual, 'actual: {}'.format(actual) + assert actual.endswith(metadata_path), 'actual: {}'.format(actual) + + # TODO: remove this in favor of Path.touch() when Python 2 is dropped. def touch_file(path): """ From 305bb1cefc3251c67b55149139a768ddf474f7b6 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Thu, 23 May 2019 14:15:19 -0400 Subject: [PATCH 7495/8469] fix assert_string_list docstring value=None raises TypeError DistutilsSetupError: 2 must be a list of strings (got None) --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index ea6411b178..1e1b83beb1 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -213,7 +213,7 @@ def check_importable(dist, attr, value): def assert_string_list(dist, attr, value): - """Verify that value is a string list or None""" + """Verify that value is a string list""" try: assert ''.join(value) != value except (TypeError, ValueError, AttributeError, AssertionError): From 8f848bd777278fc8dcb42dc45751cd8b95ec2a02 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Wed, 22 May 2019 17:45:44 -0400 Subject: [PATCH 7496/8469] improve `package_data` check Ensure the dictionary values are lists/tuples of strings. Fix #1459. --- changelog.d/1769.change.rst | 1 + setuptools/dist.py | 29 ++++++++++--------- setuptools/tests/test_dist.py | 53 ++++++++++++++++++++++++++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-) create mode 100644 changelog.d/1769.change.rst diff --git a/changelog.d/1769.change.rst b/changelog.d/1769.change.rst new file mode 100644 index 0000000000..d48a23b632 --- /dev/null +++ b/changelog.d/1769.change.rst @@ -0,0 +1 @@ +Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings. diff --git a/setuptools/dist.py b/setuptools/dist.py index 1e1b83beb1..f0f030b550 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -215,6 +215,10 @@ def check_importable(dist, attr, value): def assert_string_list(dist, attr, value): """Verify that value is a string list""" try: + # verify that value is a list or tuple to exclude unordered + # or single-use iterables + assert isinstance(value, (list, tuple)) + # verify that elements of value are strings assert ''.join(value) != value except (TypeError, ValueError, AttributeError, AssertionError): raise DistutilsSetupError( @@ -307,20 +311,17 @@ def check_test_suite(dist, attr, value): def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" - if isinstance(value, dict): - for k, v in value.items(): - if not isinstance(k, str): - break - try: - iter(v) - except TypeError: - break - else: - return - raise DistutilsSetupError( - attr + " must be a dictionary mapping package names to lists of " - "wildcard patterns" - ) + if not isinstance(value, dict): + raise DistutilsSetupError( + "{!r} must be a dictionary mapping package names to lists of " + "string wildcard patterns".format(attr)) + for k, v in value.items(): + if not isinstance(k, six.string_types): + raise DistutilsSetupError( + "keys of {!r} dict must be strings (got {!r})" + .format(attr, k) + ) + assert_string_list(dist, 'values of {!r} dict'.format(attr), v) def check_packages(dist, attr, value): diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 390c3dfcf0..c771a19a19 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -3,7 +3,13 @@ from __future__ import unicode_literals import io -from setuptools.dist import DistDeprecationWarning, _get_unpatched +import re +from distutils.errors import DistutilsSetupError +from setuptools.dist import ( + _get_unpatched, + check_package_data, + DistDeprecationWarning, +) from setuptools import Distribution from setuptools.extern.six.moves.urllib.request import pathname2url from setuptools.extern.six.moves.urllib_parse import urljoin @@ -263,3 +269,48 @@ def test_maintainer_author(name, attrs, tmpdir): else: line = '%s: %s' % (fkey, val) assert line in pkg_lines_set + + +CHECK_PACKAGE_DATA_TESTS = ( + # Valid. + ({ + '': ['*.txt', '*.rst'], + 'hello': ['*.msg'], + }, None), + # Not a dictionary. + (( + ('', ['*.txt', '*.rst']), + ('hello', ['*.msg']), + ), ( + "'package_data' must be a dictionary mapping package" + " names to lists of string wildcard patterns" + )), + # Invalid key type. + ({ + 400: ['*.txt', '*.rst'], + }, ( + "keys of 'package_data' dict must be strings (got 400)" + )), + # Invalid value type. + ({ + 'hello': str('*.msg'), + }, ( + "\"values of 'package_data' dict\" must be a list of strings (got '*.msg')" + )), + # Invalid value type (generators are single use) + ({ + 'hello': (x for x in "generator"), + }, ( + "\"values of 'package_data' dict\" must be a list of strings " + "(got Date: Mon, 22 Jul 2019 17:52:55 -0400 Subject: [PATCH 7497/8469] Run docs build as part of CI --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ffcad99864..074e86e90b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ jobs: - <<: *latest_py3 env: LANG=C - python: 3.8-dev + - <<: *latest_py3 + env: TOXENV=docs DISABLE_COVERAGE=1 - <<: *default_py stage: deploy (to PyPI for tagged commits) if: tag IS present From d694f54455d4b3884f74b72b54acbd8aeb94caed Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 23 Jul 2019 11:29:21 +0200 Subject: [PATCH 7498/8469] tests: fix `test_pip_upgrade_from_source` on Python 3.4 Do not test pip's master on 3.4, as support for it has been dropped. --- setuptools/tests/test_virtualenv.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index d7b98c7741..74a1284ce7 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -8,6 +8,8 @@ import pytest_virtualenv +from setuptools.extern import six + from .textwrap import DALS from .test_easy_install import make_nspkg_sdist @@ -75,9 +77,12 @@ def _get_pip_versions(): 'pip==10.0.1', 'pip==18.1', 'pip==19.0.1', - 'https://github.com/pypa/pip/archive/master.zip', ] + # Pip's master dropped support for 3.4. + if not six.PY34: + network_versions.append('https://github.com/pypa/pip/archive/master.zip') + versions = [None] + [ pytest.param(v, **({} if network else {'marks': pytest.mark.skip})) for v in network_versions From 3665ddcf056ef72aa6e8e92aee81684d146d5dde Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 1 Aug 2019 15:18:03 +0200 Subject: [PATCH 7499/8469] bpo-36302: Sort list of sources (GH-12341) When building packages (e.g. for openSUSE Linux) (random) filesystem order of input files influences ordering of functions in the output .so files. Thus without the patch, builds (in disposable VMs) would usually differ. Without this patch, all callers have to be patched individually https://github.com/dugsong/libdnet/pull/42 https://github.com/sass/libsass-python/pull/212 https://github.com/tahoe-lafs/pycryptopp/pull/41 https://github.com/yt-project/yt/pull/2206 https://github.com/pyproj4/pyproj/pull/142 https://github.com/pytries/datrie/pull/49 https://github.com/Roche/pyreadstat/pull/37 but that is an infinite effort. See https://reproducible-builds.org/ for why this matters. --- command/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 2d7cdf063f..38bb8fd93c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -490,7 +490,8 @@ def build_extension(self, ext): "in 'ext_modules' option (extension '%s'), " "'sources' must be present and must be " "a list of source filenames" % ext.name) - sources = list(sources) + # sort to make the resulting .so file build reproducible + sources = sorted(sources) ext_path = self.get_ext_fullpath(ext.name) depends = sources + ext.depends From 7e1b1934c7e0dcd400ff17a701601d912aa603bc Mon Sep 17 00:00:00 2001 From: jgoutin Date: Sat, 3 Aug 2019 10:41:34 +0200 Subject: [PATCH 7500/8469] Improve Visual C++ 14.X support Improve VC++14 support for VS 2017 and 2019. Separate VC from VS version (Miss match starting VS15). Improve docstrings args and returns information + fixe typos. Fix coding style and minor coding issues. Remove Microsoft "Windows SDK 7.0" dead link. --- changelog.d/1811.change.rst | 1 + setuptools/msvc.py | 1021 ++++++++++++++++++++++++----------- 2 files changed, 700 insertions(+), 322 deletions(-) create mode 100644 changelog.d/1811.change.rst diff --git a/changelog.d/1811.change.rst b/changelog.d/1811.change.rst new file mode 100644 index 0000000000..dc52c6dbbe --- /dev/null +++ b/changelog.d/1811.change.rst @@ -0,0 +1 @@ +Improve Visual C++ 14.X support, mainly for Visual Studio 2017 and 2019. \ No newline at end of file diff --git a/setuptools/msvc.py b/setuptools/msvc.py index b9c472f14f..ffa7053b64 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -11,13 +11,17 @@ Microsoft Visual C++ 10.0: Microsoft Windows SDK 7.1 (x86, x64, ia64) -Microsoft Visual C++ 14.0: +Microsoft Visual C++ 14.X: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) - Microsoft Visual Studio 2017 (x86, x64, arm, arm64) Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) + Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64) + +This may also support compilers shipped with compatible Visual Studio versions. """ -import os +import json +from os import listdir, pathsep +from os.path import join, isfile, isdir, dirname import sys import platform import itertools @@ -30,12 +34,9 @@ if platform.system() == 'Windows': from setuptools.extern.six.moves import winreg - safe_env = os.environ + from os import environ else: - """ - Mock winreg and environ so the module can be imported - on this platform. - """ + # Mock winreg and environ so the module can be imported on this platform. class winreg: HKEY_USERS = None @@ -43,7 +44,7 @@ class winreg: HKEY_LOCAL_MACHINE = None HKEY_CLASSES_ROOT = None - safe_env = dict() + environ = dict() _msvc9_suppress_errors = ( # msvc9compiler isn't available on some platforms @@ -63,15 +64,13 @@ class winreg: def msvc9_find_vcvarsall(version): """ Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone - compiler build for Python (VCForPython). Fall back to original behavior - when the standalone compiler is not available. + compiler build for Python + (VCForPython / Microsoft Visual C++ Compiler for Python 2.7). - Redirect the path of "vcvarsall.bat". + Fall back to original behavior when the standalone compiler is not + available. - Known supported compilers - ------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) + Redirect the path of "vcvarsall.bat". Parameters ---------- @@ -80,24 +79,25 @@ def msvc9_find_vcvarsall(version): Return ------ - vcvarsall.bat path: str + str + vcvarsall.bat path """ - VC_BASE = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' - key = VC_BASE % ('', version) + vc_base = r'Software\%sMicrosoft\DevDiv\VCForPython\%0.1f' + key = vc_base % ('', version) try: # Per-user installs register the compiler path here productdir = Reg.get_value(key, "installdir") except KeyError: try: # All-user installs on a 64-bit system register here - key = VC_BASE % ('Wow6432Node\\', version) + key = vc_base % ('Wow6432Node\\', version) productdir = Reg.get_value(key, "installdir") except KeyError: productdir = None if productdir: - vcvarsall = os.path.os.path.join(productdir, "vcvarsall.bat") - if os.path.isfile(vcvarsall): + vcvarsall = join(productdir, "vcvarsall.bat") + if isfile(vcvarsall): return vcvarsall return get_unpatched(msvc9_find_vcvarsall)(version) @@ -106,20 +106,10 @@ def msvc9_find_vcvarsall(version): def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ Patched "distutils.msvc9compiler.query_vcvarsall" for support extra - compilers. + Microsoft Visual C++ 9.0 and 10.0 compilers. Set environment without use of "vcvarsall.bat". - Known supported compilers - ------------------------- - Microsoft Visual C++ 9.0: - Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) - Microsoft Windows SDK 6.1 (x86, x64, ia64) - Microsoft Windows SDK 7.0 (x86, x64, ia64) - - Microsoft Visual C++ 10.0: - Microsoft Windows SDK 7.1 (x86, x64, ia64) - Parameters ---------- ver: float @@ -129,9 +119,10 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): Return ------ - environment: dict + dict + environment """ - # Try to get environement from vcvarsall.bat (Classical way) + # Try to get environment from vcvarsall.bat (Classical way) try: orig = get_unpatched(msvc9_query_vcvarsall) return orig(ver, arch, *args, **kwargs) @@ -153,17 +144,10 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): def msvc14_get_vc_env(plat_spec): """ Patched "distutils._msvccompiler._get_vc_env" for support extra - compilers. + Microsoft Visual C++ 14.X compilers. Set environment without use of "vcvarsall.bat". - Known supported compilers - ------------------------- - Microsoft Visual C++ 14.0: - Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) - Microsoft Visual Studio 2017 (x86, x64, arm, arm64) - Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64) - Parameters ---------- plat_spec: str @@ -171,7 +155,8 @@ def msvc14_get_vc_env(plat_spec): Return ------ - environment: dict + dict + environment """ # Try to get environment from vcvarsall.bat (Classical way) try: @@ -217,9 +202,9 @@ def _augment_exception(exc, version, arch=''): if version == 9.0: if arch.lower().find('ia64') > -1: # For VC++ 9.0, if IA64 support is needed, redirect user - # to Windows SDK 7.0 - message += ' Get it with "Microsoft Windows SDK 7.0": ' - message += msdownload % 3138 + # to Windows SDK 7.0. + # Note: No download link available from Microsoft. + message += ' Get it with "Microsoft Windows SDK 7.0"' else: # For VC++ 9.0 redirect user to Vc++ for Python 2.7 : # This redirection link is maintained by Microsoft. @@ -230,8 +215,8 @@ def _augment_exception(exc, version, arch=''): message += ' Get it with "Microsoft Windows SDK 7.1": ' message += msdownload % 8279 elif version >= 14.0: - # For VC++ 14.0 Redirect user to Visual C++ Build Tools - message += (' Get it with "Microsoft Visual C++ Build Tools": ' + # For VC++ 14.X Redirect user to latest Visual C++ Build Tools + message += (' Get it with "Build Tools for Visual Studio": ' r'https://visualstudio.microsoft.com/downloads/') exc.args = (message, ) @@ -239,26 +224,50 @@ def _augment_exception(exc, version, arch=''): class PlatformInfo: """ - Current and Target Architectures informations. + Current and Target Architectures information. Parameters ---------- arch: str Target architecture. """ - current_cpu = safe_env.get('processor_architecture', '').lower() + current_cpu = environ.get('processor_architecture', '').lower() def __init__(self, arch): self.arch = arch.lower().replace('x64', 'amd64') @property def target_cpu(self): + """ + Return Target CPU architecture. + + Return + ------ + str + Target CPU + """ return self.arch[self.arch.find('_') + 1:] def target_is_x86(self): + """ + Return True if target CPU is x86 32 bits.. + + Return + ------ + bool + CPU is x86 32 bits + """ return self.target_cpu == 'x86' def current_is_x86(self): + """ + Return True if current CPU is x86 32 bits.. + + Return + ------ + bool + CPU is x86 32 bits + """ return self.current_cpu == 'x86' def current_dir(self, hidex86=False, x64=False): @@ -274,8 +283,8 @@ def current_dir(self, hidex86=False, x64=False): Return ------ - subfolder: str - '\target', or '' (see hidex86 parameter) + str + subfolder: '\target', or '' (see hidex86 parameter) """ return ( '' if (self.current_cpu == 'x86' and hidex86) else @@ -296,8 +305,8 @@ def target_dir(self, hidex86=False, x64=False): Return ------ - subfolder: str - '\current', or '' (see hidex86 parameter) + str + subfolder: '\current', or '' (see hidex86 parameter) """ return ( '' if (self.target_cpu == 'x86' and hidex86) else @@ -312,13 +321,13 @@ def cross_dir(self, forcex86=False): Parameters ---------- forcex86: bool - Use 'x86' as current architecture even if current acritecture is + Use 'x86' as current architecture even if current architecture is not x86. Return ------ - subfolder: str - '' if target architecture is current architecture, + str + subfolder: '' if target architecture is current architecture, '\current_target' if not. """ current = 'x86' if forcex86 else self.current_cpu @@ -330,7 +339,7 @@ def cross_dir(self, forcex86=False): class RegistryInfo: """ - Microsoft Visual Studio related registry informations. + Microsoft Visual Studio related registry information. Parameters ---------- @@ -349,6 +358,11 @@ def __init__(self, platform_info): def visualstudio(self): """ Microsoft Visual Studio root registry key. + + Return + ------ + str + Registry key """ return 'VisualStudio' @@ -356,27 +370,47 @@ def visualstudio(self): def sxs(self): """ Microsoft Visual Studio SxS registry key. + + Return + ------ + str + Registry key """ - return os.path.join(self.visualstudio, 'SxS') + return join(self.visualstudio, 'SxS') @property def vc(self): """ Microsoft Visual C++ VC7 registry key. + + Return + ------ + str + Registry key """ - return os.path.join(self.sxs, 'VC7') + return join(self.sxs, 'VC7') @property def vs(self): """ Microsoft Visual Studio VS7 registry key. + + Return + ------ + str + Registry key """ - return os.path.join(self.sxs, 'VS7') + return join(self.sxs, 'VS7') @property def vc_for_python(self): """ Microsoft Visual C++ for Python registry key. + + Return + ------ + str + Registry key """ return r'DevDiv\VCForPython' @@ -384,6 +418,11 @@ def vc_for_python(self): def microsoft_sdk(self): """ Microsoft SDK registry key. + + Return + ------ + str + Registry key """ return 'Microsoft SDKs' @@ -391,20 +430,35 @@ def microsoft_sdk(self): def windows_sdk(self): """ Microsoft Windows/Platform SDK registry key. + + Return + ------ + str + Registry key """ - return os.path.join(self.microsoft_sdk, 'Windows') + return join(self.microsoft_sdk, 'Windows') @property def netfx_sdk(self): """ Microsoft .NET Framework SDK registry key. + + Return + ------ + str + Registry key """ - return os.path.join(self.microsoft_sdk, 'NETFXSDK') + return join(self.microsoft_sdk, 'NETFXSDK') @property def windows_kits_roots(self): """ Microsoft Windows Kits Roots registry key. + + Return + ------ + str + Registry key """ return r'Windows Kits\Installed Roots' @@ -421,10 +475,11 @@ def microsoft(self, key, x86=False): Return ------ - str: value + str + Registry key """ node64 = '' if self.pi.current_is_x86() or x86 else 'Wow6432Node' - return os.path.join('Software', node64, 'Microsoft', key) + return join('Software', node64, 'Microsoft', key) def lookup(self, key, name): """ @@ -439,18 +494,19 @@ def lookup(self, key, name): Return ------ - str: value + str + value """ - KEY_READ = winreg.KEY_READ + key_read = winreg.KEY_READ openkey = winreg.OpenKey ms = self.microsoft for hkey in self.HKEYS: try: - bkey = openkey(hkey, ms(key), 0, KEY_READ) + bkey = openkey(hkey, ms(key), 0, key_read) except (OSError, IOError): if not self.pi.current_is_x86(): try: - bkey = openkey(hkey, ms(key, True), 0, KEY_READ) + bkey = openkey(hkey, ms(key, True), 0, key_read) except (OSError, IOError): continue else: @@ -463,7 +519,7 @@ def lookup(self, key, name): class SystemInfo: """ - Microsoft Windows and Visual Studio related system inormations. + Microsoft Windows and Visual Studio related system information. Parameters ---------- @@ -474,30 +530,52 @@ class SystemInfo: """ # Variables and properties in this class use originals CamelCase variables - # names from Microsoft source files for more easy comparaison. - WinDir = safe_env.get('WinDir', '') - ProgramFiles = safe_env.get('ProgramFiles', '') - ProgramFilesx86 = safe_env.get('ProgramFiles(x86)', ProgramFiles) + # names from Microsoft source files for more easy comparison. + WinDir = environ.get('WinDir', '') + ProgramFiles = environ.get('ProgramFiles', '') + ProgramFilesx86 = environ.get('ProgramFiles(x86)', ProgramFiles) def __init__(self, registry_info, vc_ver=None): self.ri = registry_info self.pi = self.ri.pi - self.vc_ver = vc_ver or self._find_latest_available_vc_ver() - def _find_latest_available_vc_ver(self): - try: - return self.find_available_vc_vers()[-1] - except IndexError: - err = 'No Microsoft Visual C++ version found' - raise distutils.errors.DistutilsPlatformError(err) + self.known_vs_paths = self.find_programdata_vs_vers() + + # Except for VS15+, VC version is aligned with VS version + self.vs_ver = self.vc_ver = ( + vc_ver or self._find_latest_available_vs_ver()) + + def _find_latest_available_vs_ver(self): + """ + Find the latest VC version + + Return + ------ + float + version + """ + reg_vc_vers = self.find_reg_vs_vers() + + if not (reg_vc_vers or self.known_vs_paths): + raise distutils.errors.DistutilsPlatformError( + 'No Microsoft Visual C++ version found') + + vc_vers = set(reg_vc_vers) + vc_vers.update(self.known_vs_paths) + return sorted(vc_vers)[-1] - def find_available_vc_vers(self): + def find_reg_vs_vers(self): """ - Find all available Microsoft Visual C++ versions. + Find Microsoft Visual Studio versions available in registry. + + Return + ------ + list of float + Versions """ ms = self.ri.microsoft vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) - vc_vers = [] + vs_vers = [] for hkey in self.ri.HKEYS: for key in vckeys: try: @@ -508,49 +586,108 @@ def find_available_vc_vers(self): for i in range(values): try: ver = float(winreg.EnumValue(bkey, i)[0]) - if ver not in vc_vers: - vc_vers.append(ver) + if ver not in vs_vers: + vs_vers.append(ver) except ValueError: pass for i in range(subkeys): try: ver = float(winreg.EnumKey(bkey, i)) - if ver not in vc_vers: - vc_vers.append(ver) + if ver not in vs_vers: + vs_vers.append(ver) except ValueError: pass - return sorted(vc_vers) + return sorted(vs_vers) + + def find_programdata_vs_vers(self): + r""" + Find Visual studio 2017+ versions from information in + "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances". + + Return + ------ + dict + float version as key, path as value. + """ + vs_versions = {} + instances_dir = \ + r'C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances' + + try: + hashed_names = listdir(instances_dir) + + except (OSError, IOError): + # Directory not exists with all Visual Studio versions + return vs_versions + + for name in hashed_names: + try: + # Get VS installation path from "state.json" file + state_path = join(instances_dir, name, 'state.json') + with open(state_path, 'rt', encoding='utf-8') as state_file: + state = json.load(state_file) + vs_path = state['installationPath'] + + # Raises OSError if this VS installation does not contain VC + listdir(join(vs_path, r'VC\Tools\MSVC')) + + # Store version and path + vs_versions[self._as_float_version( + state['installationVersion'])] = vs_path + + except (OSError, IOError, KeyError): + # Skip if "state.json" file is missing or bad format + continue + + return vs_versions + + @staticmethod + def _as_float_version(version): + """ + Return a string version as a simplified float version (major.minor) + + Parameters + ---------- + version: str + Version. + + Return + ------ + float + version + """ + return float('.'.join(version.split('.')[:2])) @property def VSInstallDir(self): """ Microsoft Visual Studio directory. + + Return + ------ + str + path """ # Default path - name = 'Microsoft Visual Studio %0.1f' % self.vc_ver - default = os.path.join(self.ProgramFilesx86, name) + default = join(self.ProgramFilesx86, + 'Microsoft Visual Studio %0.1f' % self.vs_ver) # Try to get path from registry, if fail use default path - return self.ri.lookup(self.ri.vs, '%0.1f' % self.vc_ver) or default + return self.ri.lookup(self.ri.vs, '%0.1f' % self.vs_ver) or default @property def VCInstallDir(self): """ Microsoft Visual C++ directory. - """ - self.VSInstallDir - - guess_vc = self._guess_vc() or self._guess_vc_legacy() - - # Try to get "VC++ for Python" path from registry as default path - reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) - python_vc = self.ri.lookup(reg_path, 'installdir') - default_vc = os.path.join(python_vc, 'VC') if python_vc else guess_vc - # Try to get path from registry, if fail use default path - path = self.ri.lookup(self.ri.vc, '%0.1f' % self.vc_ver) or default_vc + Return + ------ + str + path + """ + path = self._guess_vc() or self._guess_vc_legacy() - if not os.path.isdir(path): + if not isdir(path): msg = 'Microsoft Visual C++ directory not found' raise distutils.errors.DistutilsPlatformError(msg) @@ -558,186 +695,256 @@ def VCInstallDir(self): def _guess_vc(self): """ - Locate Visual C for 2017 + Locate Visual C++ for VS2017+. + + Return + ------ + str + path """ - if self.vc_ver <= 14.0: - return + if self.vs_ver <= 14.0: + return '' + + try: + # First search in known VS paths + vs_dir = self.known_vs_paths[self.vs_ver] + except KeyError: + # Else, search with path from registry + vs_dir = self.VSInstallDir + + guess_vc = join(vs_dir, r'VC\Tools\MSVC') - default = r'VC\Tools\MSVC' - guess_vc = os.path.join(self.VSInstallDir, default) # Subdir with VC exact version as name try: - vc_exact_ver = os.listdir(guess_vc)[-1] - return os.path.join(guess_vc, vc_exact_ver) + # Update the VC version with real one instead of VS version + vc_ver = listdir(guess_vc)[-1] + self.vc_ver = self._as_float_version(vc_ver) + return join(guess_vc, vc_ver) except (OSError, IOError, IndexError): - pass + return '' def _guess_vc_legacy(self): """ - Locate Visual C for versions prior to 2017 + Locate Visual C++ for versions prior to 2017. + + Return + ------ + str + path """ - default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver - return os.path.join(self.ProgramFilesx86, default) + default = join(self.ProgramFilesx86, + r'Microsoft Visual Studio %0.1f\VC' % self.vs_ver) + + # Try to get "VC++ for Python" path from registry as default path + reg_path = join(self.ri.vc_for_python, '%0.1f' % self.vs_ver) + python_vc = self.ri.lookup(reg_path, 'installdir') + default_vc = join(python_vc, 'VC') if python_vc else default + + # Try to get path from registry, if fail use default path + return self.ri.lookup(self.ri.vc, '%0.1f' % self.vs_ver) or default_vc @property def WindowsSdkVersion(self): """ Microsoft Windows SDK versions for specified MSVC++ version. - """ - if self.vc_ver <= 9.0: - return ('7.0', '6.1', '6.0a') - elif self.vc_ver == 10.0: - return ('7.1', '7.0a') - elif self.vc_ver == 11.0: - return ('8.0', '8.0a') - elif self.vc_ver == 12.0: - return ('8.1', '8.1a') - elif self.vc_ver >= 14.0: - return ('10.0', '8.1') + + Return + ------ + tuple of str + versions + """ + if self.vs_ver <= 9.0: + return '7.0', '6.1', '6.0a' + elif self.vs_ver == 10.0: + return '7.1', '7.0a' + elif self.vs_ver == 11.0: + return '8.0', '8.0a' + elif self.vs_ver == 12.0: + return '8.1', '8.1a' + elif self.vs_ver >= 14.0: + return '10.0', '8.1' @property def WindowsSdkLastVersion(self): """ - Microsoft Windows SDK last version + Microsoft Windows SDK last version. + + Return + ------ + str + version """ - return self._use_last_dir_name(os.path.join( - self.WindowsSdkDir, 'lib')) + return self._use_last_dir_name(join(self.WindowsSdkDir, 'lib')) @property def WindowsSdkDir(self): """ Microsoft Windows SDK directory. + + Return + ------ + str + path """ sdkdir = '' for ver in self.WindowsSdkVersion: # Try to get it from registry - loc = os.path.join(self.ri.windows_sdk, 'v%s' % ver) + loc = join(self.ri.windows_sdk, 'v%s' % ver) sdkdir = self.ri.lookup(loc, 'installationfolder') if sdkdir: break - if not sdkdir or not os.path.isdir(sdkdir): + if not sdkdir or not isdir(sdkdir): # Try to get "VC++ for Python" version from registry - path = os.path.join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) + path = join(self.ri.vc_for_python, '%0.1f' % self.vc_ver) install_base = self.ri.lookup(path, 'installdir') if install_base: - sdkdir = os.path.join(install_base, 'WinSDK') - if not sdkdir or not os.path.isdir(sdkdir): + sdkdir = join(install_base, 'WinSDK') + if not sdkdir or not isdir(sdkdir): # If fail, use default new path for ver in self.WindowsSdkVersion: intver = ver[:ver.rfind('.')] - path = r'Microsoft SDKs\Windows Kits\%s' % (intver) - d = os.path.join(self.ProgramFiles, path) - if os.path.isdir(d): + path = r'Microsoft SDKs\Windows Kits\%s' % intver + d = join(self.ProgramFiles, path) + if isdir(d): sdkdir = d - if not sdkdir or not os.path.isdir(sdkdir): + if not sdkdir or not isdir(sdkdir): # If fail, use default old path for ver in self.WindowsSdkVersion: path = r'Microsoft SDKs\Windows\v%s' % ver - d = os.path.join(self.ProgramFiles, path) - if os.path.isdir(d): + d = join(self.ProgramFiles, path) + if isdir(d): sdkdir = d if not sdkdir: # If fail, use Platform SDK - sdkdir = os.path.join(self.VCInstallDir, 'PlatformSDK') + sdkdir = join(self.VCInstallDir, 'PlatformSDK') return sdkdir @property def WindowsSDKExecutablePath(self): """ Microsoft Windows SDK executable directory. + + Return + ------ + str + path """ # Find WinSDK NetFx Tools registry dir name - if self.vc_ver <= 11.0: + if self.vs_ver <= 11.0: netfxver = 35 arch = '' else: netfxver = 40 - hidex86 = True if self.vc_ver <= 12.0 else False + hidex86 = True if self.vs_ver <= 12.0 else False arch = self.pi.current_dir(x64=True, hidex86=hidex86) fx = 'WinSDK-NetFx%dTools%s' % (netfxver, arch.replace('\\', '-')) - # liste all possibles registry paths + # list all possibles registry paths regpaths = [] - if self.vc_ver >= 14.0: + if self.vs_ver >= 14.0: for ver in self.NetFxSdkVersion: - regpaths += [os.path.join(self.ri.netfx_sdk, ver, fx)] + regpaths += [join(self.ri.netfx_sdk, ver, fx)] for ver in self.WindowsSdkVersion: - regpaths += [os.path.join(self.ri.windows_sdk, 'v%sA' % ver, fx)] + regpaths += [join(self.ri.windows_sdk, 'v%sA' % ver, fx)] # Return installation folder from the more recent path for path in regpaths: execpath = self.ri.lookup(path, 'installationfolder') if execpath: - break - return execpath + return execpath @property def FSharpInstallDir(self): """ Microsoft Visual F# directory. + + Return + ------ + str + path """ - path = r'%0.1f\Setup\F#' % self.vc_ver - path = os.path.join(self.ri.visualstudio, path) + path = join(self.ri.visualstudio, r'%0.1f\Setup\F#' % self.vs_ver) return self.ri.lookup(path, 'productdir') or '' @property def UniversalCRTSdkDir(self): """ Microsoft Universal CRT SDK directory. + + Return + ------ + str + path """ # Set Kit Roots versions for specified MSVC++ version - if self.vc_ver >= 14.0: - vers = ('10', '81') - else: - vers = () + vers = ('10', '81') if self.vs_ver >= 14.0 else () # Find path of the more recent Kit for ver in vers: sdkdir = self.ri.lookup(self.ri.windows_kits_roots, 'kitsroot%s' % ver) if sdkdir: - break - return sdkdir or '' + return sdkdir or '' @property def UniversalCRTSdkLastVersion(self): """ - Microsoft Universal C Runtime SDK last version + Microsoft Universal C Runtime SDK last version. + + Return + ------ + str + version """ - return self._use_last_dir_name(os.path.join( - self.UniversalCRTSdkDir, 'lib')) + return self._use_last_dir_name(join(self.UniversalCRTSdkDir, 'lib')) @property def NetFxSdkVersion(self): """ Microsoft .NET Framework SDK versions. + + Return + ------ + tuple of str + versions """ - # Set FxSdk versions for specified MSVC++ version - if self.vc_ver >= 14.0: - return ('4.6.1', '4.6') - else: - return () + # Set FxSdk versions for specified VS version + return (('4.7.2', '4.7.1', '4.7', + '4.6.2', '4.6.1', '4.6', + '4.5.2', '4.5.1', '4.5') + if self.vs_ver >= 14.0 else ()) @property def NetFxSdkDir(self): """ Microsoft .NET Framework SDK directory. + + Return + ------ + str + path """ + sdkdir = '' for ver in self.NetFxSdkVersion: - loc = os.path.join(self.ri.netfx_sdk, ver) + loc = join(self.ri.netfx_sdk, ver) sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder') if sdkdir: break - return sdkdir or '' + return sdkdir @property def FrameworkDir32(self): """ Microsoft .NET Framework 32bit directory. + + Return + ------ + str + path """ # Default path - guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework') + guess_fw = join(self.WinDir, r'Microsoft.NET\Framework') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir32') or guess_fw @@ -746,9 +953,14 @@ def FrameworkDir32(self): def FrameworkDir64(self): """ Microsoft .NET Framework 64bit directory. + + Return + ------ + str + path """ # Default path - guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework64') + guess_fw = join(self.WinDir, r'Microsoft.NET\Framework64') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw @@ -757,6 +969,11 @@ def FrameworkDir64(self): def FrameworkVersion32(self): """ Microsoft .NET Framework 32bit versions. + + Return + ------ + tuple of str + versions """ return self._find_dot_net_versions(32) @@ -764,6 +981,11 @@ def FrameworkVersion32(self): def FrameworkVersion64(self): """ Microsoft .NET Framework 64bit versions. + + Return + ------ + tuple of str + versions """ return self._find_dot_net_versions(64) @@ -775,6 +997,11 @@ def _find_dot_net_versions(self, bits): ---------- bits: int Platform number of bits: 32 or 64. + + Return + ------ + tuple of str + versions """ # Find actual .NET version in registry reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits) @@ -782,18 +1009,17 @@ def _find_dot_net_versions(self, bits): ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or '' # Set .NET versions for specified MSVC++ version - if self.vc_ver >= 12.0: - frameworkver = (ver, 'v4.0') - elif self.vc_ver >= 10.0: - frameworkver = ('v4.0.30319' if ver.lower()[:2] != 'v4' else ver, - 'v3.5') - elif self.vc_ver == 9.0: - frameworkver = ('v3.5', 'v2.0.50727') - if self.vc_ver == 8.0: - frameworkver = ('v3.0', 'v2.0.50727') - return frameworkver - - def _use_last_dir_name(self, path, prefix=''): + if self.vs_ver >= 12.0: + return ver, 'v4.0' + elif self.vs_ver >= 10.0: + return 'v4.0.30319' if ver.lower()[:2] != 'v4' else ver, 'v3.5' + elif self.vs_ver == 9.0: + return 'v3.5', 'v2.0.50727' + elif self.vs_ver == 8.0: + return 'v3.0', 'v2.0.50727' + + @staticmethod + def _use_last_dir_name(path, prefix=''): """ Return name of the last dir in path or '' if no dir found. @@ -802,12 +1028,17 @@ def _use_last_dir_name(self, path, prefix=''): path: str Use dirs in this path prefix: str - Use only dirs startings by this prefix + Use only dirs starting by this prefix + + Return + ------ + str + name """ matching_dirs = ( dir_name - for dir_name in reversed(os.listdir(path)) - if os.path.isdir(os.path.join(path, dir_name)) and + for dir_name in reversed(listdir(path)) + if isdir(join(path, dir_name)) and dir_name.startswith(prefix) ) return next(matching_dirs, None) or '' @@ -818,7 +1049,7 @@ class EnvironmentInfo: Return environment variables for specified Microsoft Visual C++ version and platform : Lib, Include, Path and libpath. - This function is compatible with Microsoft Visual C++ 9.0 to 14.0. + This function is compatible with Microsoft Visual C++ 9.0 to 14.X. Script created by analysing Microsoft environment configuration files like "vcvars[...].bat", "SetEnv.Cmd", "vcbuildtools.bat", ... @@ -835,7 +1066,7 @@ class EnvironmentInfo: """ # Variables and properties in this class use originals CamelCase variables - # names from Microsoft source files for more easy comparaison. + # names from Microsoft source files for more easy comparison. def __init__(self, arch, vc_ver=None, vc_min_ver=0): self.pi = PlatformInfo(arch) @@ -846,205 +1077,255 @@ def __init__(self, arch, vc_ver=None, vc_min_ver=0): err = 'No suitable Microsoft Visual C++ version found' raise distutils.errors.DistutilsPlatformError(err) + @property + def vs_ver(self): + """ + Microsoft Visual Studio. + + Return + ------ + float + version + """ + return self.si.vs_ver + @property def vc_ver(self): """ Microsoft Visual C++ version. + + Return + ------ + float + version """ return self.si.vc_ver @property def VSTools(self): """ - Microsoft Visual Studio Tools + Microsoft Visual Studio Tools. + + Return + ------ + list of str + paths """ paths = [r'Common7\IDE', r'Common7\Tools'] - if self.vc_ver >= 14.0: + if self.vs_ver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] paths += [r'Team Tools\Performance Tools'] paths += [r'Team Tools\Performance Tools%s' % arch_subdir] - return [os.path.join(self.si.VSInstallDir, path) for path in paths] + return [join(self.si.VSInstallDir, path) for path in paths] @property def VCIncludes(self): """ - Microsoft Visual C++ & Microsoft Foundation Class Includes + Microsoft Visual C++ & Microsoft Foundation Class Includes. + + Return + ------ + list of str + paths """ - return [os.path.join(self.si.VCInstallDir, 'Include'), - os.path.join(self.si.VCInstallDir, r'ATLMFC\Include')] + return [join(self.si.VCInstallDir, 'Include'), + join(self.si.VCInstallDir, r'ATLMFC\Include')] @property def VCLibraries(self): """ - Microsoft Visual C++ & Microsoft Foundation Class Libraries + Microsoft Visual C++ & Microsoft Foundation Class Libraries. + + Return + ------ + list of str + paths """ - if self.vc_ver >= 15.0: + if self.vs_ver >= 15.0: arch_subdir = self.pi.target_dir(x64=True) else: arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATLMFC\Lib%s' % arch_subdir] - if self.vc_ver >= 14.0: + if self.vs_ver >= 14.0: paths += [r'Lib\store%s' % arch_subdir] - return [os.path.join(self.si.VCInstallDir, path) for path in paths] + return [join(self.si.VCInstallDir, path) for path in paths] @property def VCStoreRefs(self): """ - Microsoft Visual C++ store references Libraries + Microsoft Visual C++ store references Libraries. + + Return + ------ + list of str + paths """ - if self.vc_ver < 14.0: + if self.vs_ver < 14.0: return [] - return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')] + return [join(self.si.VCInstallDir, r'Lib\store\references')] @property def VCTools(self): """ - Microsoft Visual C++ Tools + Microsoft Visual C++ Tools. + + Return + ------ + list of str + paths """ si = self.si - tools = [os.path.join(si.VCInstallDir, 'VCPackages')] + tools = [join(si.VCInstallDir, 'VCPackages')] - forcex86 = True if self.vc_ver <= 10.0 else False + forcex86 = True if self.vs_ver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) if arch_subdir: - tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] + tools += [join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.vc_ver == 14.0: + if self.vs_ver == 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) - tools += [os.path.join(si.VCInstallDir, path)] + tools += [join(si.VCInstallDir, path)] - elif self.vc_ver >= 15.0: + elif self.vs_ver >= 15.0: host_dir = (r'bin\HostX86%s' if self.pi.current_is_x86() else r'bin\HostX64%s') - tools += [os.path.join( + tools += [join( si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))] if self.pi.current_cpu != self.pi.target_cpu: - tools += [os.path.join( + tools += [join( si.VCInstallDir, host_dir % self.pi.current_dir(x64=True))] else: - tools += [os.path.join(si.VCInstallDir, 'Bin')] + tools += [join(si.VCInstallDir, 'Bin')] return tools @property def OSLibraries(self): """ - Microsoft Windows SDK Libraries + Microsoft Windows SDK Libraries. + + Return + ------ + list of str + paths """ - if self.vc_ver <= 10.0: + if self.vs_ver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) - return [os.path.join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] + return [join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] else: arch_subdir = self.pi.target_dir(x64=True) - lib = os.path.join(self.si.WindowsSdkDir, 'lib') + lib = join(self.si.WindowsSdkDir, 'lib') libver = self._sdk_subdir - return [os.path.join(lib, '%sum%s' % (libver , arch_subdir))] + return [join(lib, '%sum%s' % (libver , arch_subdir))] @property def OSIncludes(self): """ - Microsoft Windows SDK Include + Microsoft Windows SDK Include. + + Return + ------ + list of str + paths """ - include = os.path.join(self.si.WindowsSdkDir, 'include') + include = join(self.si.WindowsSdkDir, 'include') - if self.vc_ver <= 10.0: - return [include, os.path.join(include, 'gl')] + if self.vs_ver <= 10.0: + return [include, join(include, 'gl')] else: - if self.vc_ver >= 14.0: + if self.vs_ver >= 14.0: sdkver = self._sdk_subdir else: sdkver = '' - return [os.path.join(include, '%sshared' % sdkver), - os.path.join(include, '%sum' % sdkver), - os.path.join(include, '%swinrt' % sdkver)] + return [join(include, '%sshared' % sdkver), + join(include, '%sum' % sdkver), + join(include, '%swinrt' % sdkver)] @property def OSLibpath(self): """ - Microsoft Windows SDK Libraries Paths + Microsoft Windows SDK Libraries Paths. + + Return + ------ + list of str + paths """ - ref = os.path.join(self.si.WindowsSdkDir, 'References') + ref = join(self.si.WindowsSdkDir, 'References') libpath = [] - if self.vc_ver <= 9.0: + if self.vs_ver <= 9.0: libpath += self.OSLibraries - if self.vc_ver >= 11.0: - libpath += [os.path.join(ref, r'CommonConfiguration\Neutral')] + if self.vs_ver >= 11.0: + libpath += [join(ref, r'CommonConfiguration\Neutral')] - if self.vc_ver >= 14.0: + if self.vs_ver >= 14.0: libpath += [ ref, - os.path.join(self.si.WindowsSdkDir, 'UnionMetadata'), - os.path.join( - ref, - 'Windows.Foundation.UniversalApiContract', - '1.0.0.0', - ), - os.path.join( - ref, - 'Windows.Foundation.FoundationContract', - '1.0.0.0', - ), - os.path.join( - ref, - 'Windows.Networking.Connectivity.WwanContract', - '1.0.0.0', - ), - os.path.join( - self.si.WindowsSdkDir, - 'ExtensionSDKs', - 'Microsoft.VCLibs', - '%0.1f' % self.vc_ver, - 'References', - 'CommonConfiguration', - 'neutral', - ), + join(self.si.WindowsSdkDir, 'UnionMetadata'), + join(ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'), + join(ref, 'Windows.Foundation.FoundationContract', '1.0.0.0'), + join(ref,'Windows.Networking.Connectivity.WwanContract', + '1.0.0.0'), + join(self.si.WindowsSdkDir, 'ExtensionSDKs', 'Microsoft.VCLibs', + '%0.1f' % self.vs_ver, 'References', 'CommonConfiguration', + 'neutral'), ] return libpath @property def SdkTools(self): """ - Microsoft Windows SDK Tools + Microsoft Windows SDK Tools. + + Return + ------ + list of str + paths """ return list(self._sdk_tools()) def _sdk_tools(self): """ - Microsoft Windows SDK Tools paths generator + Microsoft Windows SDK Tools paths generator. + + Return + ------ + generator of str + paths """ - if self.vc_ver < 15.0: - bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' - yield os.path.join(self.si.WindowsSdkDir, bin_dir) + if self.vs_ver < 15.0: + bin_dir = 'Bin' if self.vs_ver <= 11.0 else r'Bin\x86' + yield join(self.si.WindowsSdkDir, bin_dir) if not self.pi.current_is_x86(): arch_subdir = self.pi.current_dir(x64=True) path = 'Bin%s' % arch_subdir - yield os.path.join(self.si.WindowsSdkDir, path) + yield join(self.si.WindowsSdkDir, path) - if self.vc_ver == 10.0 or self.vc_ver == 11.0: + if self.vs_ver in (10.0, 11.0): if self.pi.target_is_x86(): arch_subdir = '' else: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) path = r'Bin\NETFX 4.0 Tools%s' % arch_subdir - yield os.path.join(self.si.WindowsSdkDir, path) + yield join(self.si.WindowsSdkDir, path) - elif self.vc_ver >= 15.0: - path = os.path.join(self.si.WindowsSdkDir, 'Bin') + elif self.vs_ver >= 15.0: + path = join(self.si.WindowsSdkDir, 'Bin') arch_subdir = self.pi.current_dir(x64=True) sdkver = self.si.WindowsSdkLastVersion - yield os.path.join(path, '%s%s' % (sdkver, arch_subdir)) + yield join(path, '%s%s' % (sdkver, arch_subdir)) if self.si.WindowsSDKExecutablePath: yield self.si.WindowsSDKExecutablePath @@ -1052,7 +1333,12 @@ def _sdk_tools(self): @property def _sdk_subdir(self): """ - Microsoft Windows SDK version subdir + Microsoft Windows SDK version subdir. + + Return + ------ + str + subdir """ ucrtver = self.si.WindowsSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else '' @@ -1060,22 +1346,32 @@ def _sdk_subdir(self): @property def SdkSetup(self): """ - Microsoft Windows SDK Setup + Microsoft Windows SDK Setup. + + Return + ------ + list of str + paths """ - if self.vc_ver > 9.0: + if self.vs_ver > 9.0: return [] - return [os.path.join(self.si.WindowsSdkDir, 'Setup')] + return [join(self.si.WindowsSdkDir, 'Setup')] @property def FxTools(self): """ - Microsoft .NET Framework Tools + Microsoft .NET Framework Tools. + + Return + ------ + list of str + paths """ pi = self.pi si = self.si - if self.vc_ver <= 10.0: + if self.vs_ver <= 10.0: include32 = True include64 = not pi.target_is_x86() and not pi.current_is_x86() else: @@ -1084,102 +1380,142 @@ def FxTools(self): tools = [] if include32: - tools += [os.path.join(si.FrameworkDir32, ver) + tools += [join(si.FrameworkDir32, ver) for ver in si.FrameworkVersion32] if include64: - tools += [os.path.join(si.FrameworkDir64, ver) + tools += [join(si.FrameworkDir64, ver) for ver in si.FrameworkVersion64] return tools @property def NetFxSDKLibraries(self): """ - Microsoft .Net Framework SDK Libraries + Microsoft .Net Framework SDK Libraries. + + Return + ------ + list of str + paths """ - if self.vc_ver < 14.0 or not self.si.NetFxSdkDir: + if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] arch_subdir = self.pi.target_dir(x64=True) - return [os.path.join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)] + return [join(self.si.NetFxSdkDir, r'lib\um%s' % arch_subdir)] @property def NetFxSDKIncludes(self): """ - Microsoft .Net Framework SDK Includes + Microsoft .Net Framework SDK Includes. + + Return + ------ + list of str + paths """ - if self.vc_ver < 14.0 or not self.si.NetFxSdkDir: + if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] - return [os.path.join(self.si.NetFxSdkDir, r'include\um')] + return [join(self.si.NetFxSdkDir, r'include\um')] @property def VsTDb(self): """ - Microsoft Visual Studio Team System Database + Microsoft Visual Studio Team System Database. + + Return + ------ + list of str + paths """ - return [os.path.join(self.si.VSInstallDir, r'VSTSDB\Deploy')] + return [join(self.si.VSInstallDir, r'VSTSDB\Deploy')] @property def MSBuild(self): """ - Microsoft Build Engine + Microsoft Build Engine. + + Return + ------ + list of str + paths """ - if self.vc_ver < 12.0: + if self.vs_ver < 12.0: return [] - elif self.vc_ver < 15.0: + elif self.vs_ver < 15.0: base_path = self.si.ProgramFilesx86 arch_subdir = self.pi.current_dir(hidex86=True) else: base_path = self.si.VSInstallDir arch_subdir = '' - path = r'MSBuild\%0.1f\bin%s' % (self.vc_ver, arch_subdir) - build = [os.path.join(base_path, path)] + path = r'MSBuild\%0.1f\bin%s' % (self.vs_ver, arch_subdir) + build = [join(base_path, path)] - if self.vc_ver >= 15.0: + if self.vs_ver >= 15.0: # Add Roslyn C# & Visual Basic Compiler - build += [os.path.join(base_path, path, 'Roslyn')] + build += [join(base_path, path, 'Roslyn')] return build @property def HTMLHelpWorkshop(self): """ - Microsoft HTML Help Workshop + Microsoft HTML Help Workshop. + + Return + ------ + list of str + paths """ - if self.vc_ver < 11.0: + if self.vs_ver < 11.0: return [] - return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')] + return [join(self.si.ProgramFilesx86, 'HTML Help Workshop')] @property def UCRTLibraries(self): """ - Microsoft Universal C Runtime SDK Libraries + Microsoft Universal C Runtime SDK Libraries. + + Return + ------ + list of str + paths """ - if self.vc_ver < 14.0: + if self.vs_ver < 14.0: return [] arch_subdir = self.pi.target_dir(x64=True) - lib = os.path.join(self.si.UniversalCRTSdkDir, 'lib') + lib = join(self.si.UniversalCRTSdkDir, 'lib') ucrtver = self._ucrt_subdir - return [os.path.join(lib, '%sucrt%s' % (ucrtver, arch_subdir))] + return [join(lib, '%sucrt%s' % (ucrtver, arch_subdir))] @property def UCRTIncludes(self): """ - Microsoft Universal C Runtime SDK Include + Microsoft Universal C Runtime SDK Include. + + Return + ------ + list of str + paths """ - if self.vc_ver < 14.0: + if self.vs_ver < 14.0: return [] - include = os.path.join(self.si.UniversalCRTSdkDir, 'include') - return [os.path.join(include, '%sucrt' % self._ucrt_subdir)] + include = join(self.si.UniversalCRTSdkDir, 'include') + return [join(include, '%sucrt' % self._ucrt_subdir)] @property def _ucrt_subdir(self): """ - Microsoft Universal C Runtime SDK version subdir + Microsoft Universal C Runtime SDK version subdir. + + Return + ------ + str + subdir """ ucrtver = self.si.UniversalCRTSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else '' @@ -1187,31 +1523,52 @@ def _ucrt_subdir(self): @property def FSharp(self): """ - Microsoft Visual F# + Microsoft Visual F#. + + Return + ------ + list of str + paths """ - if self.vc_ver < 11.0 and self.vc_ver > 12.0: + if 11.0 > self.vs_ver > 12.0: return [] - return self.si.FSharpInstallDir + return [self.si.FSharpInstallDir] @property def VCRuntimeRedist(self): """ - Microsoft Visual C++ runtime redistribuable dll - """ - arch_subdir = self.pi.target_dir(x64=True) - if self.vc_ver < 15: - redist_path = self.si.VCInstallDir - vcruntime = 'redist%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' - else: - redist_path = self.si.VCInstallDir.replace('\\Tools', '\\Redist') - vcruntime = 'onecore%s\\Microsoft.VC%d0.CRT\\vcruntime%d0.dll' - - # Visual Studio 2017 is still Visual C++ 14.0 - dll_ver = 14.0 if self.vc_ver == 15 else self.vc_ver + Microsoft Visual C++ runtime redistributable dll. - vcruntime = vcruntime % (arch_subdir, self.vc_ver, dll_ver) - return os.path.join(redist_path, vcruntime) + Return + ------ + str + path + """ + vcruntime = 'vcruntime%d0.dll' % self.vc_ver + arch_subdir = self.pi.target_dir(x64=True).strip('\\') + + # Installation prefixes candidates + prefixes = [] + tools_path = self.si.VCInstallDir + redist_path = dirname(tools_path.replace(r'\Tools', r'\Redist')) + if isdir(redist_path): + # Redist version may not be exactly the same as tools + redist_path = join(redist_path, listdir(redist_path)[-1]) + prefixes += [redist_path, join(redist_path, 'onecore')] + + prefixes += [join(tools_path, 'redist')] # VS14 legacy path + + # CRT directory + crt_dirs = ('Microsoft.VC%d.CRT' % (self.vc_ver * 10), + # Sometime store in directory with VS version instead of VC + 'Microsoft.VC%d.CRT' % (int(self.vs_ver) * 10)) + + # vcruntime path + for prefix, crt_dir in itertools.product(prefixes, crt_dirs): + path = join(prefix, arch_subdir, crt_dir, vcruntime) + if isfile(path): + return path def return_env(self, exists=True): """ @@ -1221,6 +1578,11 @@ def return_env(self, exists=True): ---------- exists: bool It True, only return existing paths. + + Return + ------ + dict + environment """ env = dict( include=self._build_paths('include', @@ -1254,7 +1616,7 @@ def return_env(self, exists=True): self.FSharp], exists), ) - if self.vc_ver >= 14 and os.path.isfile(self.VCRuntimeRedist): + if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist): env['py_vcruntime_redist'] = self.VCRuntimeRedist return env @@ -1265,20 +1627,35 @@ def _build_paths(self, name, spec_path_lists, exists): unique, extant, directories from those paths and from the environment variable. Raise an error if no paths are resolved. + + Parameters + ---------- + name: str + Environment variable name + spec_path_lists: list of str + Paths + exists: bool + It True, only return existing paths. + + Return + ------ + str + Pathsep-separated paths """ # flatten spec_path_lists spec_paths = itertools.chain.from_iterable(spec_path_lists) - env_paths = safe_env.get(name, '').split(os.pathsep) + env_paths = environ.get(name, '').split(pathsep) paths = itertools.chain(spec_paths, env_paths) - extant_paths = list(filter(os.path.isdir, paths)) if exists else paths + extant_paths = list(filter(isdir, paths)) if exists else paths if not extant_paths: msg = "%s environment variable is empty" % name.upper() raise distutils.errors.DistutilsPlatformError(msg) unique_paths = self._unique_everseen(extant_paths) - return os.pathsep.join(unique_paths) + return pathsep.join(unique_paths) # from Python docs - def _unique_everseen(self, iterable, key=None): + @staticmethod + def _unique_everseen(iterable, key=None): """ List unique elements, preserving order. Remember all elements ever seen. From cab8dd1a30b14542fcfe7ab63f8cd8b5358222da Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 8 Aug 2019 08:42:54 +0300 Subject: [PATCH 7501/8469] bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952) They now return NotImplemented for unsupported type of the other operand. --- tests/test_version.py | 16 ++++++++++++++++ version.py | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/tests/test_version.py b/tests/test_version.py index 15f14c7de3..8671cd2fc5 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -45,6 +45,14 @@ def test_cmp_strict(self): self.assertEqual(res, wanted, 'cmp(%s, %s) should be %s, got %s' % (v1, v2, wanted, res)) + res = StrictVersion(v1)._cmp(v2) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + res = StrictVersion(v1)._cmp(object()) + self.assertIs(res, NotImplemented, + 'cmp(%s, %s) should be NotImplemented, got %s' % + (v1, v2, res)) def test_cmp(self): @@ -63,6 +71,14 @@ def test_cmp(self): self.assertEqual(res, wanted, 'cmp(%s, %s) should be %s, got %s' % (v1, v2, wanted, res)) + res = LooseVersion(v1)._cmp(v2) + self.assertEqual(res, wanted, + 'cmp(%s, %s) should be %s, got %s' % + (v1, v2, wanted, res)) + res = LooseVersion(v1)._cmp(object()) + self.assertIs(res, NotImplemented, + 'cmp(%s, %s) should be NotImplemented, got %s' % + (v1, v2, res)) def test_suite(): return unittest.makeSuite(VersionTestCase) diff --git a/version.py b/version.py index af14cc1348..c33bebaed2 100644 --- a/version.py +++ b/version.py @@ -166,6 +166,8 @@ def __str__ (self): def _cmp (self, other): if isinstance(other, str): other = StrictVersion(other) + elif not isinstance(other, StrictVersion): + return NotImplemented if self.version != other.version: # numeric versions don't match @@ -331,6 +333,8 @@ def __repr__ (self): def _cmp (self, other): if isinstance(other, str): other = LooseVersion(other) + elif not isinstance(other, LooseVersion): + return NotImplemented if self.version == other.version: return 0 From a85a63840b076c7a9d165db731ca6d1be28287e8 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Thu, 8 Aug 2019 23:25:46 +0100 Subject: [PATCH 7502/8469] bpo-37795: Capture DeprecationWarnings in the test suite (GH-15184) --- tests/test_bdist.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_bdist.py b/tests/test_bdist.py index c80b3edc02..130d8bf155 100644 --- a/tests/test_bdist.py +++ b/tests/test_bdist.py @@ -2,6 +2,7 @@ import os import unittest from test.support import run_unittest +import warnings from distutils.command.bdist import bdist from distutils.tests import support @@ -38,7 +39,10 @@ def test_skip_build(self): names.append('bdist_msi') for name in names: - subcmd = cmd.get_finalized_command(name) + with warnings.catch_warnings(): + warnings.filterwarnings('ignore', 'bdist_wininst command is deprecated', + DeprecationWarning) + subcmd = cmd.get_finalized_command(name) if getattr(subcmd, '_unsupported', False): # command is not supported on this build continue From 5405d1e2770e798ed755e8cc821f6b95cb480d52 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 12 Aug 2019 06:18:19 +0200 Subject: [PATCH 7503/8469] travis: update PyPy jobs to use more recent versions --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffcad99864..64d0544c27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ jobs: python: 2.7 - <<: *latest_py2 env: LANG=C - - python: pypy2.7-6.0.0 + - python: pypy env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - - python: pypy3.5-6.0.0 + - python: pypy3 env: DISABLE_COVERAGE=1 - python: 3.4 - python: 3.5 From b03652f642a8ea04644eb7d5b38223148dea5611 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 13 Aug 2019 01:10:05 +0200 Subject: [PATCH 7504/8469] pkg_resources: fix ``Requirement`` hash/equality implementation Take PEP 508 direct URL into account. --- changelog.d/1814.change.rst | 1 + pkg_resources/__init__.py | 1 + pkg_resources/tests/test_resources.py | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 changelog.d/1814.change.rst diff --git a/changelog.d/1814.change.rst b/changelog.d/1814.change.rst new file mode 100644 index 0000000000..c936699dd8 --- /dev/null +++ b/changelog.d/1814.change.rst @@ -0,0 +1 @@ +Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 1f170cfda5..e75769d720 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3109,6 +3109,7 @@ def __init__(self, requirement_string): self.extras = tuple(map(safe_extra, self.extras)) self.hashCmp = ( self.key, + self.url, self.specifier, frozenset(self.extras), str(self.marker) if self.marker else None, diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 86afcf7411..42c801a746 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -520,6 +520,11 @@ def testOrdering(self): assert r1 == r2 assert str(r1) == str(r2) assert str(r2) == "Twisted==1.2c1,>=1.2" + assert ( + Requirement("Twisted") + != + Requirement("Twisted @ https://localhost/twisted.zip") + ) def testBasicContains(self): r = Requirement("Twisted>=1.2") @@ -546,11 +551,23 @@ def testOptionsAndHashing(self): == hash(( "twisted", + None, packaging.specifiers.SpecifierSet(">=1.2"), frozenset(["foo", "bar"]), None )) ) + assert ( + hash(Requirement.parse("Twisted @ https://localhost/twisted.zip")) + == + hash(( + "twisted", + "https://localhost/twisted.zip", + packaging.specifiers.SpecifierSet(), + frozenset(), + None + )) + ) def testVersionEquality(self): r1 = Requirement.parse("foo==0.3a2") From cd92d8a98f388b33fd7d5f24d096408408426b0c Mon Sep 17 00:00:00 2001 From: Christopher Head Date: Mon, 12 Aug 2019 21:37:34 -0700 Subject: [PATCH 7505/8469] Document using asterisk in package_data section --- docs/setuptools.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2e7fe3bd93..3509a301d0 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2416,7 +2416,7 @@ tests_require list-semi include_package_data bool packages find:, find_namespace:, list-comma package_dir dict -package_data section +package_data section (1) exclude_package_data section namespace_packages list-comma py_modules list-comma @@ -2433,6 +2433,10 @@ data_files dict 40.6.0 **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. +Notes: +1. In the `package_data` section, a key named with a single asterisk (`*`) +refers to all packages, in lieu of the empty string used in `setup.py`. + Configuration API ================= From 95d72cc558c7dddef164eb09a880b95e2f484bee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2019 09:42:47 -0400 Subject: [PATCH 7506/8469] =?UTF-8?q?Bump=20version:=2041.0.1=20=E2=86=92?= =?UTF-8?q?=2041.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 13 +++++++++++++ changelog.d/1697.change.rst | 1 - changelog.d/1749.change.rst | 1 - changelog.d/1750.change.rst | 1 - changelog.d/1756.change.rst | 1 - changelog.d/1769.change.rst | 1 - changelog.d/1776.doc.rst | 1 - changelog.d/1788.change.rst | 1 - changelog.d/1790.change.rst | 2 -- setup.cfg | 2 +- 11 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 changelog.d/1697.change.rst delete mode 100644 changelog.d/1749.change.rst delete mode 100644 changelog.d/1750.change.rst delete mode 100644 changelog.d/1756.change.rst delete mode 100644 changelog.d/1769.change.rst delete mode 100644 changelog.d/1776.doc.rst delete mode 100644 changelog.d/1788.change.rst delete mode 100644 changelog.d/1790.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 87acb5ef8d..5a4536605c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.0.1 +current_version = 41.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 9da2253792..9f9603c043 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +v41.1.0 +------- + +* #1697: Moved most of the constants from setup.py to setup.cfg +* #1749: Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory. +* #1750: Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist. +* #1756: Forse metadata-version >= 1.2. when project urls are present. +* #1769: Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings. +* #1788: Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9. +* #1790: Added the file path to the error message when a ``UnicodeDecodeError`` occurs while reading a metadata file. +* #1776: Use license classifiers rather than the license field. + + v41.0.1 ------- diff --git a/changelog.d/1697.change.rst b/changelog.d/1697.change.rst deleted file mode 100644 index 44818b3c14..0000000000 --- a/changelog.d/1697.change.rst +++ /dev/null @@ -1 +0,0 @@ -Moved most of the constants from setup.py to setup.cfg diff --git a/changelog.d/1749.change.rst b/changelog.d/1749.change.rst deleted file mode 100644 index de67807234..0000000000 --- a/changelog.d/1749.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory. diff --git a/changelog.d/1750.change.rst b/changelog.d/1750.change.rst deleted file mode 100644 index 7a22229ef3..0000000000 --- a/changelog.d/1750.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist. diff --git a/changelog.d/1756.change.rst b/changelog.d/1756.change.rst deleted file mode 100644 index 5c908d3529..0000000000 --- a/changelog.d/1756.change.rst +++ /dev/null @@ -1 +0,0 @@ -Forse metadata-version >= 1.2. when project urls are present. diff --git a/changelog.d/1769.change.rst b/changelog.d/1769.change.rst deleted file mode 100644 index d48a23b632..0000000000 --- a/changelog.d/1769.change.rst +++ /dev/null @@ -1 +0,0 @@ -Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings. diff --git a/changelog.d/1776.doc.rst b/changelog.d/1776.doc.rst deleted file mode 100644 index d4f1dbca56..0000000000 --- a/changelog.d/1776.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Use license classifiers rather than the license field. diff --git a/changelog.d/1788.change.rst b/changelog.d/1788.change.rst deleted file mode 100644 index d8a49fd41d..0000000000 --- a/changelog.d/1788.change.rst +++ /dev/null @@ -1 +0,0 @@ -Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9. diff --git a/changelog.d/1790.change.rst b/changelog.d/1790.change.rst deleted file mode 100644 index e4a7998d8f..0000000000 --- a/changelog.d/1790.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added the file path to the error message when a ``UnicodeDecodeError`` occurs -while reading a metadata file. diff --git a/setup.cfg b/setup.cfg index ff87464bf4..3bcf442987 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.0.1 +version = 41.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 42bd00ada0e0f47c2446d6d1b750eb97eba45640 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2019 09:47:19 -0400 Subject: [PATCH 7507/8469] Prefer token for automated releases --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 64d0544c27..13815fd4b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,9 +35,9 @@ jobs: on: tags: true all_branches: true - user: jaraco + user: __token__ password: - secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= + secure: lBgpqft5tKMPRGefCPScPLWNKKGPF89kYrGt3RogqZrb9xB9+52bNrHgt0M5H2EQIRW9IC7/RFRXpT/dF4N8CT1hsljSVQxTQxiGazEYPSdEfOJ2CJxqs0smiL5Ck1T8EQeiuqRSM+/RFEDNaTjp+fe4HhSoPhea6TojAXRSzKdmcDLCwSJOujDccz0yMOagibnqfhO6ZsIv1LUUHWBeeUVrmx+3lz6uAqmNIOQ6hn6YTP4HLoEXTN+IIeQGIzXEZwY2Z/OXakiugxeNZOgRlkikT32KXyZ01hOhOdPOWrtv+q9tAAdqUeQmtdfFb3zy2vBr6bJkvplI5Obh/qHTphWA3iOTOoCICFYPhXY/npztwwqG7jFBRsZbWo1zuP92zUji6OoxK0ezkqEQcIhu+qsUERmsuowriNyFJZK8zVRdGc7JGaZvYe1h9k4l44J+VEIXUurKWji8BpL7dxq/ZPZRf2r5P2JqhU1VkGXrNgfze/N7U1Z1oUkHo1g/5InOl8nDN4Ul0oRXm9tezk5vYO/RMs9hphTdzda4iETikVjnXyHScSLWwI0UqF5MQdKBYsOCJM9deirWG2gXXspkW4HPkYUUe1pTCkaqoQ9+fWHcKTeDVT/52iuCsaSOJccOItyQqH/4nS3i3LaEf11DPMKKL58pbkoMD56p9iSrCCs= distributions: release skip_cleanup: true skip_upload_docs: true From e40a6035d9e688d5a34077132b49c48dc74932f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 13 Aug 2019 13:39:28 -0400 Subject: [PATCH 7508/8469] Revert "Prefer token for automated releases" This reverts commit 42bd00ada0e0f47c2446d6d1b750eb97eba45640. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13815fd4b6..64d0544c27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,9 +35,9 @@ jobs: on: tags: true all_branches: true - user: __token__ + user: jaraco password: - secure: lBgpqft5tKMPRGefCPScPLWNKKGPF89kYrGt3RogqZrb9xB9+52bNrHgt0M5H2EQIRW9IC7/RFRXpT/dF4N8CT1hsljSVQxTQxiGazEYPSdEfOJ2CJxqs0smiL5Ck1T8EQeiuqRSM+/RFEDNaTjp+fe4HhSoPhea6TojAXRSzKdmcDLCwSJOujDccz0yMOagibnqfhO6ZsIv1LUUHWBeeUVrmx+3lz6uAqmNIOQ6hn6YTP4HLoEXTN+IIeQGIzXEZwY2Z/OXakiugxeNZOgRlkikT32KXyZ01hOhOdPOWrtv+q9tAAdqUeQmtdfFb3zy2vBr6bJkvplI5Obh/qHTphWA3iOTOoCICFYPhXY/npztwwqG7jFBRsZbWo1zuP92zUji6OoxK0ezkqEQcIhu+qsUERmsuowriNyFJZK8zVRdGc7JGaZvYe1h9k4l44J+VEIXUurKWji8BpL7dxq/ZPZRf2r5P2JqhU1VkGXrNgfze/N7U1Z1oUkHo1g/5InOl8nDN4Ul0oRXm9tezk5vYO/RMs9hphTdzda4iETikVjnXyHScSLWwI0UqF5MQdKBYsOCJM9deirWG2gXXspkW4HPkYUUe1pTCkaqoQ9+fWHcKTeDVT/52iuCsaSOJccOItyQqH/4nS3i3LaEf11DPMKKL58pbkoMD56p9iSrCCs= + secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= distributions: release skip_cleanup: true skip_upload_docs: true From 05f42a2c14275937250c99478c94b20171d14aeb Mon Sep 17 00:00:00 2001 From: A_Rog Date: Wed, 14 Aug 2019 00:40:12 +0100 Subject: [PATCH 7509/8469] Fixed html sidebars to supported version in Sphinx (#1804) --- .travis.yml | 2 ++ changelog.d/1565.misc.rst | 2 ++ docs/conf.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1565.misc.rst diff --git a/.travis.yml b/.travis.yml index 64d0544c27..8441261de9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ jobs: - <<: *latest_py3 env: LANG=C - python: 3.8-dev + - <<: *latest_py3 + env: TOXENV=docs DISABLE_COVERAGE=1 - <<: *default_py stage: deploy (to PyPI for tagged commits) if: tag IS present diff --git a/changelog.d/1565.misc.rst b/changelog.d/1565.misc.rst new file mode 100644 index 0000000000..ca15573a1b --- /dev/null +++ b/changelog.d/1565.misc.rst @@ -0,0 +1,2 @@ +Changed html_sidebars from string to list of string as per +https://www.sphinx-doc.org/en/master/changes.html#id58 diff --git a/docs/conf.py b/docs/conf.py index c7eb6d3f3c..cbd19fb470 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,7 +69,7 @@ html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {'index': 'indexsidebar.html'} +html_sidebars = {'index': ['relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']} # If false, no module index is generated. html_use_modindex = False From eb7436b36f9967d1becd2b822da548bd59b35d05 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 8 Jul 2019 09:32:21 -0700 Subject: [PATCH 7510/8469] Fix some usage of deprecated `imp` module --- changelog.d/479.change.rst | 1 + setuptools/command/build_ext.py | 10 ++++++++-- setuptools/command/install_lib.py | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelog.d/479.change.rst diff --git a/changelog.d/479.change.rst b/changelog.d/479.change.rst new file mode 100644 index 0000000000..d494c0fc7c --- /dev/null +++ b/changelog.d/479.change.rst @@ -0,0 +1 @@ +Remove some usage of the deprecated ``imp`` module. diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 60a8a32f08..daa8e4fe81 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,7 +1,6 @@ import os import sys import itertools -import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler @@ -12,6 +11,13 @@ from setuptools.extension import Library from setuptools.extern import six +if six.PY2: + import imp + + EXTENSION_SUFFIXES = [s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] +else: + from importlib.machinery import EXTENSION_SUFFIXES + try: # Attempt to use Cython for building extensions, if available from Cython.Distutils.build_ext import build_ext as _build_ext @@ -64,7 +70,7 @@ def _customize_compiler_for_shlib(compiler): def get_abi3_suffix(): """Return the file extension for an abi3-compliant Extension()""" - for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION): + for suffix in EXTENSION_SUFFIXES: if '.abi3' in suffix: # Unix return suffix elif suffix == '.pyd': # Windows diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 2b31c3e38b..07d6593309 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,5 +1,5 @@ import os -import imp +import sys from itertools import product, starmap import distutils.command.install_lib as orig @@ -74,10 +74,10 @@ def _gen_exclusion_paths(): yield '__init__.pyc' yield '__init__.pyo' - if not hasattr(imp, 'get_tag'): + if not hasattr(sys, 'implementation'): return - base = os.path.join('__pycache__', '__init__.' + imp.get_tag()) + base = os.path.join('__pycache__', '__init__.' + sys.implementation.cache_tag) yield base + '.pyc' yield base + '.pyo' yield base + '.opt-1.pyc' From 43add1d3f5138e38adc4940647cc6eae94fb6123 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 17 Aug 2019 19:14:48 -0700 Subject: [PATCH 7511/8469] Fixes for python3.10 --- changelog.d/1824.change.rst | 1 + pkg_resources/__init__.py | 2 +- pkg_resources/api_tests.txt | 2 +- pkg_resources/tests/test_resources.py | 2 +- setup.py | 2 +- setuptools/command/bdist_egg.py | 2 +- setuptools/command/easy_install.py | 6 +++--- setuptools/package_index.py | 2 +- setuptools/tests/test_bdist_egg.py | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 changelog.d/1824.change.rst diff --git a/changelog.d/1824.change.rst b/changelog.d/1824.change.rst new file mode 100644 index 0000000000..5f60903687 --- /dev/null +++ b/changelog.d/1824.change.rst @@ -0,0 +1 @@ +Fix tests when running under ``python3.10``. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 1f170cfda5..fb68813e0c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -333,7 +333,7 @@ class UnknownExtra(ResolutionError): _provider_factories = {} -PY_MAJOR = sys.version[:3] +PY_MAJOR = '{}.{}'.format(*sys.version_info) EGG_DIST = 3 BINARY_DIST = 2 SOURCE_DIST = 1 diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 0a75170e4f..7ae5a038d2 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -36,7 +36,7 @@ Distributions have various introspectable attributes:: >>> dist.version '0.9' - >>> dist.py_version == sys.version[:3] + >>> dist.py_version == '{}.{}'.format(*sys.version_info) True >>> print(dist.platform) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 86afcf7411..7063ed3db2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -116,7 +116,7 @@ def testDistroBasics(self): self.checkFooPkg(d) d = Distribution("/some/path") - assert d.py_version == sys.version[:3] + assert d.py_version == '{}.{}'.format(*sys.version_info) assert d.platform is None def testDistroParse(self): diff --git a/setup.py b/setup.py index f5030dd670..d97895fcc0 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def _gen_console_scripts(): if any(os.environ.get(var) not in (None, "", "0") for var in var_names): return tmpl = "easy_install-{shortver} = setuptools.command.easy_install:main" - yield tmpl.format(shortver=sys.version[:3]) + yield tmpl.format(shortver='{}.{}'.format(*sys.version_info)) package_data = dict( diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 9f8df917e6..98470f1715 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -284,7 +284,7 @@ def gen_header(self): "or refer to a module" % (ep,) ) - pyver = sys.version[:3] + pyver = '{}.{}'.format(*sys.version_info) pkg = ep.module_name full = '.'.join(ep.attrs) base = ep.attrs[0] diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 06c98271ba..593ed7776c 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -241,7 +241,7 @@ def _render_version(): """ Render the Setuptools version and installation details, then exit. """ - ver = sys.version[:3] + ver = '{}.{}'.format(*sys.version_info) dist = get_distribution('setuptools') tmpl = 'setuptools {dist.version} from {dist.location} (Python {ver})' print(tmpl.format(**locals())) @@ -1412,7 +1412,7 @@ def get_site_dirs(): os.path.join( prefix, "lib", - "python" + sys.version[:3], + "python{}.{}".format(*sys.version_info), "site-packages", ), os.path.join(prefix, "lib", "site-python"), @@ -1433,7 +1433,7 @@ def get_site_dirs(): home, 'Library', 'Python', - sys.version[:3], + '{}.{}'.format(*sys.version_info), 'site-packages', ) sitedirs.append(home_sp) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 6b06f2ca28..f419d47167 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -46,7 +46,7 @@ _SOCKET_TIMEOUT = 15 _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" -user_agent = _tmpl.format(py_major=sys.version[:3], setuptools=setuptools) +user_agent = _tmpl.format(py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools) def parse_requirement_arg(spec): diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 54742aa646..fb5b90b1a3 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -42,7 +42,7 @@ def test_bdist_egg(self, setup_context, user_override): # let's see if we got our egg link at the right place [content] = os.listdir('dist') - assert re.match(r'foo-0.0.0-py[23].\d.egg$', content) + assert re.match(r'foo-0.0.0-py[23].\d+.egg$', content) @pytest.mark.xfail( os.environ.get('PYTHONDONTWRITEBYTECODE'), From 1e6eb1a5f81f6332d1d58dd5690421d5cbb8a00b Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Tue, 20 Aug 2019 09:06:24 +0200 Subject: [PATCH 7512/8469] Added test for DeprecationWarning --- setuptools/tests/test_bdist_egg.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 54742aa646..a1860bf336 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -7,6 +7,7 @@ import pytest from setuptools.dist import Distribution +from setuptools import SetuptoolsDeprecationWarning from . import contexts @@ -64,3 +65,18 @@ def test_exclude_source_files(self, setup_context, user_override): names = list(zi.filename for zi in zip.filelist) assert 'hi.pyc' in names assert 'hi.py' not in names + + def test_eggsecutable_warning(self, setup_context, user_override): + dist = Distribution(dict( + script_name='setup.py', + script_args=['bdist_egg'], + name='foo', + py_modules=['hi'], + entry_points={ + 'setuptools.installation': + ['eggsecutable = my_package.some_module:main_func']}, + )) + with contexts.quiet(): + dist.parse_command_line() + with pytest.warns(SetuptoolsDeprecationWarning): + dist.run_commands() From 35233197be40eafa1e81d71aedeb82af1a761f54 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Aug 2019 04:49:30 -0400 Subject: [PATCH 7513/8469] Once again, use token for cutting releases. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8441261de9..8b7cece8b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,9 @@ jobs: on: tags: true all_branches: true - user: jaraco + user: __token__ password: - secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g= + secure: FSp9KU+pdvWPxBOaxe6BNmcJ9y8259G3/NdTJ00r0qx/xMLpSneGjpuLqoD6BL2JoM6gRwurwakWoH/9Ah+Di7afETjMnL6WJKtDZ+Uu3YLx3ss7/FlhVz6zmVTaDJUzuo9dGr//qLBQTIxVjGYfQelRJyfMAXtrYWdeT/4489E45lMw+86Z/vnSBOxs4lWekeQW5Gem0cDViWu67RRiGkAEvrYVwuImMr2Dyhpv+l/mQGQIS/ezXuAEFToE6+q8VUVe/aK498Qovdc+O4M7OYk1JouFpffZ3tVZ6iWHQFcR11480UdI6VCIcFpPvGC/J8MWUWLjq7YOm0X9jPXgdYMUQLAP4clFgUr2qNoRSKWfuQlNdVVuS2htYcjJ3eEl90FhcIZKp+WVMrypRPOQJ8CBielZEs0dhytRrZSaJC1BNq25O/BPzws8dL8hYtoXsM6I3Zv5cZgdyqyq/eOEMCX7Cetv6do0U41VGEV5UohvyyuwH5l9GCuPREpY3sXayPg8fw7XcPjvvzSVyjcUT/ePW8sfnAyWZnngjweAn6dK8IFGPuSPQdlos78uxeUOvCVUW0xv/0m4lX73yoHdVVdLbu1MJTyibFGec86Bew9JqIcDlhHaIJ9ihZ9Z9tOtvp1cuNyKYE4kvmOtumDDicEw4DseYn2z5sZDTYTBsKY= distributions: release skip_cleanup: true skip_upload_docs: true From a3e6e68365079642d8949b26ecb810751cc15ef1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 21 Aug 2019 04:50:43 -0400 Subject: [PATCH 7514/8469] =?UTF-8?q?Bump=20version:=2041.1.0=20=E2=86=92?= =?UTF-8?q?=2041.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 8 ++++++++ changelog.d/1565.misc.rst | 2 -- changelog.d/479.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1565.misc.rst delete mode 100644 changelog.d/479.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5a4536605c..5e7e8ee4a0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.1.0 +current_version = 41.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 9f9603c043..84007b3160 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v41.2.0 +------- + +* #479: Remove some usage of the deprecated ``imp`` module. +* #1565: Changed html_sidebars from string to list of string as per + https://www.sphinx-doc.org/en/master/changes.html#id58 + + v41.1.0 ------- diff --git a/changelog.d/1565.misc.rst b/changelog.d/1565.misc.rst deleted file mode 100644 index ca15573a1b..0000000000 --- a/changelog.d/1565.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Changed html_sidebars from string to list of string as per -https://www.sphinx-doc.org/en/master/changes.html#id58 diff --git a/changelog.d/479.change.rst b/changelog.d/479.change.rst deleted file mode 100644 index d494c0fc7c..0000000000 --- a/changelog.d/479.change.rst +++ /dev/null @@ -1 +0,0 @@ -Remove some usage of the deprecated ``imp`` module. diff --git a/setup.cfg b/setup.cfg index 3bcf442987..96792dd36c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.1.0 +version = 41.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From fd540b6535f56647581df61333bac7eadc1309f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Aug 2019 20:01:38 -0400 Subject: [PATCH 7515/8469] Move Tidelift token into Travis configuration --- .travis.yml | 7 ------- tox.ini | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a9afa23f5b..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: - include: - - stage: deploy - env: - # TIDELIFT_TOKEN - - secure: ... - TOX_TESTENV_PASSENV="TIDELIFT_TOKEN" diff --git a/tox.ini b/tox.ini index 7f9b6c1eb4..35053514de 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,7 @@ [testenv:release] deps = jaraco.tidelift +passenv = + TIDELIFT_TOKEN commands = python -m jaraco.tidelift.publish-release-notes From 976abeeaaacef8019329b7dfea5dcc8f47f4d70a Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sun, 25 Aug 2019 12:35:22 +0200 Subject: [PATCH 7516/8469] warning -> deprecated Co-Authored-By: Paul Ganssle --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e4e56fb023..51e46743db 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -572,7 +572,7 @@ Services and Plugins`_. "Eggsecutable" Scripts ---------------------- -.. warning:: Eggsecutable Scripts are deprecated. +.. deprecated:: 41.3.0 Occasionally, there are situations where it's desirable to make an ``.egg`` file directly executable. You can do this by including an entry point such From 9dd100fa6c77745c61d20baca965c13d63f7d901 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Sun, 25 Aug 2019 12:43:10 +0200 Subject: [PATCH 7517/8469] Removed unused context.quiet --- setuptools/tests/test_bdist_egg.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index a1860bf336..e28f87de81 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -76,7 +76,6 @@ def test_eggsecutable_warning(self, setup_context, user_override): 'setuptools.installation': ['eggsecutable = my_package.some_module:main_func']}, )) - with contexts.quiet(): - dist.parse_command_line() - with pytest.warns(SetuptoolsDeprecationWarning): - dist.run_commands() + dist.parse_command_line() + with pytest.warns(SetuptoolsDeprecationWarning): + dist.run_commands() From cd848cbc425ba0735e0987040f201de0b13f0486 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 28 Aug 2019 19:11:03 +0200 Subject: [PATCH 7518/8469] closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560) https://bugs.python.org/issue37965 https://bugs.python.org/issue37965 Automerge-Triggered-By: @benjaminp --- ccompiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccompiler.py b/ccompiler.py index 1a411ed111..4cfc6c7065 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -781,8 +781,9 @@ def has_function(self, funcname, includes=None, include_dirs=None, for incl in includes: f.write("""#include "%s"\n""" % incl) f.write("""\ -main (int argc, char **argv) { +int main (int argc, char **argv) { %s(); + return 0; } """ % funcname) finally: From 7fa2fcf95430ba41959e16c19bd77795b2b4fc4a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 2 Sep 2019 00:30:36 +0200 Subject: [PATCH 7519/8469] Add GitHub Actions CI/CD test suite workflow --- .github/workflows/python-tests.yml | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000000..00250ff1bc --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,75 @@ +name: Test suite + +on: + push: + pull_request: + schedule: + - cron: 1 0 * * * # Run daily at 0:01 UTC + +jobs: + tests: + name: 👷 + runs-on: ${{ matrix.os }} + strategy: + # max-parallel: 5 + matrix: + python-version: + - 3.7 + - 3.6 + - 3.5 + - 2.7 + os: + - ubuntu-18.04 + - ubuntu-16.04 + - macOS-10.14 + - windows-2019 + - windows-2016 + env: + - TOXENV: python + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + version: ${{ matrix.python-version }} + - name: Upgrade pip/setuptools/wheel + run: >- + python + -m pip install + --disable-pip-version-check + --upgrade + pip setuptools wheel + - name: Install tox + run: >- + python -m pip install --upgrade tox tox-venv + - name: Log installed dists + run: >- + python -m pip freeze --all + - name: Log env vars + run: >- + env + env: ${{ matrix.env }} + + - name: Update egg_info based on setup.py in checkout + run: >- + python -m bootstrap + env: ${{ matrix.env }} + - name: Verify that there's no cached Python modules in sources + if: >- + ! startsWith(matrix.os, 'windows-') + run: >- + ! grep pyc setuptools.egg-info/SOURCES.txt + + - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' + run: | + python -m tox --parallel auto --notest + env: ${{ matrix.env }} + - name: Test with tox + run: | + ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 + python -m tox \ + --parallel 0 \ + -- \ + --cov + env: ${{ matrix.env }} From 67dd74ad0fd84714c6710168c7e747630276230a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 2 Sep 2019 00:59:00 +0200 Subject: [PATCH 7520/8469] Temporary comment out win jobs --- .github/workflows/python-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 00250ff1bc..c5ab4dd5cc 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -22,8 +22,8 @@ jobs: - ubuntu-18.04 - ubuntu-16.04 - macOS-10.14 - - windows-2019 - - windows-2016 + # - windows-2019 + # - windows-2016 env: - TOXENV: python From 440238ebb54ba4b05d8656e0bdf333d53627c198 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 2 Sep 2019 16:14:01 +0200 Subject: [PATCH 7521/8469] Don't skip missing interpreters in tox --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c5ab4dd5cc..eb750a45ab 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -63,7 +63,7 @@ jobs: - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' run: | - python -m tox --parallel auto --notest + python -m tox --parallel auto --notest --skip-missing-interpreters false env: ${{ matrix.env }} - name: Test with tox run: | From 04940b6e09bb5054666442196383c2fe9e5a09a2 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Tue, 3 Sep 2019 21:36:49 +0300 Subject: [PATCH 7522/8469] Fix typo in CHANGES.rst --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 84007b3160..dd47cb4353 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,7 +12,7 @@ v41.1.0 * #1697: Moved most of the constants from setup.py to setup.cfg * #1749: Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory. * #1750: Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist. -* #1756: Forse metadata-version >= 1.2. when project urls are present. +* #1756: Force metadata-version >= 1.2. when project urls are present. * #1769: Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings. * #1788: Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9. * #1790: Added the file path to the error message when a ``UnicodeDecodeError`` occurs while reading a metadata file. From 211ff140a4bd82fcb4f01a5569cdc86e4badea8b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Sep 2019 16:36:40 +0100 Subject: [PATCH 7523/8469] Update badge URL --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 357626220b..420bfb4f04 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. image:: https://tidelift.com/badges/github/GROUP/PROJECT +.. image:: https://tidelift.com/badges/package/pypi/PROJECT :target: https://tidelift.com/subscription/pkg/pypi-PROJECT?utm_source=pypi-PROJECT&utm_medium=readme Security Contact From 8f99a0c1b8ee2cb28a8bdb1811ef96da68636d1b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Sep 2019 17:30:03 +0100 Subject: [PATCH 7524/8469] Add funding reference to project --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..230b556cbd --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: pypi/PROJECT From 1c187ad0cf50fbc14626f63cb669a9ec5949012f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 9 Sep 2019 17:45:58 +0100 Subject: [PATCH 7525/8469] List sidebars to avoid errors looking for template 't' --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 3d109305b4..dbf962ddc4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,4 +2,4 @@ # Custom sidebar templates, maps document names to template names. html_theme = 'alabaster' templates_path = ['_templates'] -html_sidebars = {'index': 'tidelift-sidebar.html'} +html_sidebars = {'index': ['tidelift-sidebar.html']} From 5ffd6d26a7806d8b8cc0aad93e50cc63bae294a1 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 10 Sep 2019 14:52:23 +0100 Subject: [PATCH 7526/8469] bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849) --- _msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 6e14f330d7..e8e4b717b9 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -107,7 +107,7 @@ def _find_vcvarsall(plat_spec): if best_dir: vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", - vcruntime_plat, "Microsoft.VC141.CRT", "vcruntime140.dll") + vcruntime_plat, "Microsoft.VC14*.CRT", "vcruntime140.dll") try: import glob vcruntime = glob.glob(vcredist, recursive=True)[-1] From ca0ee009f81a460b483c7e451e58dfdcd7787045 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 16:39:57 +0100 Subject: [PATCH 7527/8469] Add test capturing failure. Ref #1787. --- setuptools/tests/test_config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index bc97664d4d..4218713815 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -819,6 +819,18 @@ def test_data_files(self, tmpdir): ] assert sorted(dist.data_files) == sorted(expected) + def test_python_requires_invalid(self, tmpdir): + fake_env( + tmpdir, + DALS(""" + [options] + python_requires=invalid + """), + ) + with pytest.raises(DistutilsOptionError): + with get_dist(tmpdir) as dist: + dist.parse_config_files() + saved_dist_init = _Distribution.__init__ From b31777cd50c7cb59b4ef6c22bd014f0229ef32fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 16:52:58 +0100 Subject: [PATCH 7528/8469] Add more tests for valid behavior. Expand exception, any should do. --- setuptools/tests/test_config.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 4218713815..1b94a58689 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -819,6 +819,28 @@ def test_data_files(self, tmpdir): ] assert sorted(dist.data_files) == sorted(expected) + def test_python_requires_simple(self, tmpdir): + fake_env( + tmpdir, + DALS(""" + [options] + python_requires=>=2.7 + """), + ) + with get_dist(tmpdir) as dist: + dist.parse_config_files() + + def test_python_requires_compound(self, tmpdir): + fake_env( + tmpdir, + DALS(""" + [options] + python_requires=>=2.7,!=3.0.* + """), + ) + with get_dist(tmpdir) as dist: + dist.parse_config_files() + def test_python_requires_invalid(self, tmpdir): fake_env( tmpdir, @@ -827,7 +849,7 @@ def test_python_requires_invalid(self, tmpdir): python_requires=invalid """), ) - with pytest.raises(DistutilsOptionError): + with pytest.raises(Exception): with get_dist(tmpdir) as dist: dist.parse_config_files() From c3df086ed3570e7065e6935a52d95c8cdef2b071 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 16:54:07 +0100 Subject: [PATCH 7529/8469] Ensure that python_requires is checked during option processing. Fixes #1787. --- setuptools/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/config.py b/setuptools/config.py index b6626043fc..2d50e25e89 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -12,6 +12,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.extern.packaging.version import LegacyVersion, parse +from setuptools.extern.packaging.specifiers import SpecifierSet from setuptools.extern.six import string_types, PY3 @@ -554,6 +555,7 @@ def parsers(self): 'packages': self._parse_packages, 'entry_points': self._parse_file, 'py_modules': parse_list, + 'python_requires': SpecifierSet, } def _parse_packages(self, value): From 895d18c17d15f443c6d8953a176aa6c4df354c7d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 16:55:09 +0100 Subject: [PATCH 7530/8469] Update changelog. Ref #1787. --- changelog.d/1847.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1847.change.rst diff --git a/changelog.d/1847.change.rst b/changelog.d/1847.change.rst new file mode 100644 index 0000000000..2a6b9c77a9 --- /dev/null +++ b/changelog.d/1847.change.rst @@ -0,0 +1 @@ +Now traps errors when invalid ``python_requires`` values are supplied. From 45b83cd189db31a0315a4297053feab77d8618b4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 11 Sep 2019 18:14:53 +0100 Subject: [PATCH 7531/8469] Update changelog. Ref #1690. --- changelog.d/1690.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1690.change.rst diff --git a/changelog.d/1690.change.rst b/changelog.d/1690.change.rst new file mode 100644 index 0000000000..ecc51c55ae --- /dev/null +++ b/changelog.d/1690.change.rst @@ -0,0 +1 @@ +When storing extras, rely on OrderedSet to retain order of extras as indicated by the packager, which will also be deterministic on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+. From 6f962a07f586162d05e087a90ea8f44461772070 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Oct 2019 20:42:14 -0400 Subject: [PATCH 7532/8469] Refresh vendored packages (ordereddict 3.1.1) --- setuptools/_vendor/ordered_set.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/_vendor/ordered_set.py b/setuptools/_vendor/ordered_set.py index d257470b8a..14876000de 100644 --- a/setuptools/_vendor/ordered_set.py +++ b/setuptools/_vendor/ordered_set.py @@ -87,14 +87,14 @@ def __getitem__(self, index): """ if isinstance(index, slice) and index == SLICE_ALL: return self.copy() + elif is_iterable(index): + return [self.items[i] for i in index] elif hasattr(index, "__index__") or isinstance(index, slice): result = self.items[index] if isinstance(result, list): return self.__class__(result) else: return result - elif is_iterable(index): - return [self.items[i] for i in index] else: raise TypeError("Don't know how to index an OrderedSet by %r" % index) From 53d662a9de0b8d449d167bf1c5cf291a2fecb094 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Oct 2019 21:17:53 -0400 Subject: [PATCH 7533/8469] Allow 'long_description_content_type' warnings for new versions of packaging. Fixes #1858. --- changelog.d/1858.misc.rst | 1 + setuptools/tests/test_integration.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1858.misc.rst diff --git a/changelog.d/1858.misc.rst b/changelog.d/1858.misc.rst new file mode 100644 index 0000000000..b16ac1dd0b --- /dev/null +++ b/changelog.d/1858.misc.rst @@ -0,0 +1 @@ +Fixed failing integration test triggered by 'long_description_content_type' in packaging. diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 1e13218899..1c0b2b18bb 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -143,6 +143,7 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): 'tests_require', 'python_requires', 'install_requires', + 'long_description_content_type', ] assert not match or match.group(1).strip('"\'') in allowed_unknowns From da3ccf5f648a5836ce5e9b0747a263860ae1dfaa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Oct 2019 21:22:05 -0400 Subject: [PATCH 7534/8469] =?UTF-8?q?Bump=20version:=2041.2.0=20=E2=86=92?= =?UTF-8?q?=2041.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1690.change.rst | 1 - changelog.d/1858.misc.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1690.change.rst delete mode 100644 changelog.d/1858.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5e7e8ee4a0..37b224466f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.2.0 +current_version = 41.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index dd47cb4353..883f4f2beb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v41.3.0 +------- + +* #1690: When storing extras, rely on OrderedSet to retain order of extras as indicated by the packager, which will also be deterministic on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+. +* #1858: Fixed failing integration test triggered by 'long_description_content_type' in packaging. + + v41.2.0 ------- diff --git a/changelog.d/1690.change.rst b/changelog.d/1690.change.rst deleted file mode 100644 index ecc51c55ae..0000000000 --- a/changelog.d/1690.change.rst +++ /dev/null @@ -1 +0,0 @@ -When storing extras, rely on OrderedSet to retain order of extras as indicated by the packager, which will also be deterministic on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+. diff --git a/changelog.d/1858.misc.rst b/changelog.d/1858.misc.rst deleted file mode 100644 index b16ac1dd0b..0000000000 --- a/changelog.d/1858.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed failing integration test triggered by 'long_description_content_type' in packaging. diff --git a/setup.cfg b/setup.cfg index 96792dd36c..77a35de06b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.2.0 +version = 41.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 2e3c34f669c5272d036ef7edc58871c96663d587 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Oct 2019 21:29:32 -0400 Subject: [PATCH 7535/8469] Clarify the scope of the change. --- changelog.d/1847.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1847.change.rst b/changelog.d/1847.change.rst index 2a6b9c77a9..d3f7724e20 100644 --- a/changelog.d/1847.change.rst +++ b/changelog.d/1847.change.rst @@ -1 +1 @@ -Now traps errors when invalid ``python_requires`` values are supplied. +In declarative config, now traps errors when invalid ``python_requires`` values are supplied. From 5eee6b4b523a6d2ae16ef913c01302f951b4f614 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Oct 2019 21:30:46 -0400 Subject: [PATCH 7536/8469] =?UTF-8?q?Bump=20version:=2041.3.0=20=E2=86=92?= =?UTF-8?q?=2041.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1847.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1847.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 37b224466f..d6768cb8a8 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.3.0 +current_version = 41.4.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 883f4f2beb..ecde25a571 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v41.4.0 +------- + +* #1847: In declarative config, now traps errors when invalid ``python_requires`` values are supplied. + + v41.3.0 ------- diff --git a/changelog.d/1847.change.rst b/changelog.d/1847.change.rst deleted file mode 100644 index d3f7724e20..0000000000 --- a/changelog.d/1847.change.rst +++ /dev/null @@ -1 +0,0 @@ -In declarative config, now traps errors when invalid ``python_requires`` values are supplied. diff --git a/setup.cfg b/setup.cfg index 77a35de06b..a55106a5a4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.3.0 +version = 41.4.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 026f9b75544c53636fd692af386730553740a511 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 14 Aug 2019 02:43:53 +0200 Subject: [PATCH 7537/8469] docs: mention dependency links support was dropped in pip 19.0 --- docs/setuptools.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2e7fe3bd93..8cfb5f13a4 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -675,6 +675,10 @@ using ``setup.py develop``.) Dependencies that aren't in PyPI -------------------------------- +.. warning:: + Dependency links support has been dropped by pip starting with version + 19.0 (released 2019-01-22). + If your project depends on packages that don't exist on PyPI, you may still be able to depend on them, as long as they are available for download as: From d2db805b008346ba9aa34d8fb36faf2d019eed64 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 14 Aug 2019 02:44:20 +0200 Subject: [PATCH 7538/8469] docs: mention eggs are deprecated and not supported by pip --- docs/setuptools.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 8cfb5f13a4..26a3044e82 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1693,6 +1693,9 @@ file locations. ``bdist_egg`` - Create a Python Egg for the project =================================================== +.. warning:: + **eggs** are deprecated in favor of wheels, and not supported by pip. + This command generates a Python Egg (``.egg`` file) for the project. Python Eggs are the preferred binary distribution format for EasyInstall, because they are cross-platform (for "pure" packages), directly importable, and contain From 8b3a8d08da9780d16dce7d62433f35dbb4cc55ad Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 7 Oct 2019 18:58:40 +0200 Subject: [PATCH 7539/8469] add news entry --- changelog.d/1860.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1860.doc.rst diff --git a/changelog.d/1860.doc.rst b/changelog.d/1860.doc.rst new file mode 100644 index 0000000000..f3554643fa --- /dev/null +++ b/changelog.d/1860.doc.rst @@ -0,0 +1 @@ +Update documentation to mention the egg format is not supported by pip and dependency links support was dropped starting with pip 19.0. From 734d09c5a3f48338b6a3d7687c5f9d0ed02ab479 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Oct 2019 16:36:54 -0400 Subject: [PATCH 7540/8469] Pin ordered-set to current version for consistency. --- setuptools/_vendor/vendored.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index 379aae56ed..5731b4244b 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,4 +1,4 @@ packaging==16.8 pyparsing==2.2.1 six==1.10.0 -ordered-set +ordered-set==3.1.1 From d7810a901382b827146874704f33bce896e1fb21 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 10 Aug 2019 02:18:34 +0200 Subject: [PATCH 7541/8469] wheel: silence info trace when writing `requires.txt` --- setuptools/wheel.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index e11f0a1d91..2982926ae8 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -1,6 +1,7 @@ """Wheels support.""" from distutils.util import get_platform +from distutils import log import email import itertools import os @@ -162,11 +163,17 @@ def raw_req(req): extras_require=extras_require, ), ) - write_requirements( - setup_dist.get_command_obj('egg_info'), - None, - os.path.join(egg_info, 'requires.txt'), - ) + # Temporarily disable info traces. + log_threshold = log._global_log.threshold + log.set_threshold(log.WARN) + try: + write_requirements( + setup_dist.get_command_obj('egg_info'), + None, + os.path.join(egg_info, 'requires.txt'), + ) + finally: + log.set_threshold(log_threshold) @staticmethod def _move_data_entries(destination_eggdir, dist_data): From 16a3ef93fc66373f6c5f4da12303dd111403fcb1 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 17 Sep 2018 23:40:12 +0200 Subject: [PATCH 7542/8469] wheel: fix installation of empty namespace package --- changelog.d/1861.change.rst | 1 + setuptools/tests/test_wheel.py | 28 ++++++++++++++++++++++++++++ setuptools/wheel.py | 4 +++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1861.change.rst diff --git a/changelog.d/1861.change.rst b/changelog.d/1861.change.rst new file mode 100644 index 0000000000..5a4e0a56a9 --- /dev/null +++ b/changelog.d/1861.change.rst @@ -0,0 +1 @@ +Fix empty namespace package installation from wheel. diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index e85a4a7e8d..d50816c22a 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -450,6 +450,34 @@ def __repr__(self): }), ), + dict( + id='empty_namespace_package', + file_defs={ + 'foobar': { + '__init__.py': "__import__('pkg_resources').declare_namespace(__name__)", + }, + }, + setup_kwargs=dict( + namespace_packages=['foobar'], + packages=['foobar'], + ), + install_tree=flatten_tree({ + 'foo-1.0-py{py_version}.egg': [ + 'foo-1.0-py{py_version}-nspkg.pth', + {'EGG-INFO': [ + 'PKG-INFO', + 'RECORD', + 'WHEEL', + 'namespace_packages.txt', + 'top_level.txt', + ]}, + {'foobar': [ + '__init__.py', + ]}, + ] + }), + ), + dict( id='data_in_package', file_defs={ diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 2982926ae8..22eec05ecd 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -213,6 +213,8 @@ def _fix_namespace_packages(egg_info, destination_eggdir): 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): + if not os.path.exists(mod_dir): + os.mkdir(mod_dir) + if not os.path.exists(mod_init): with open(mod_init, 'w') as fp: fp.write(NAMESPACE_PACKAGE_INIT) From cb8769d7d1a694d37194c44b98c543b2d5d38fc5 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 26 Jun 2019 22:25:03 +0200 Subject: [PATCH 7543/8469] minor cleanup --- setuptools/command/easy_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 06c98271ba..d7b7566c0d 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1180,8 +1180,7 @@ def _set_fetcher_options(self, base): # to the setup.cfg file. ei_opts = self.distribution.get_option_dict('easy_install').copy() fetch_directives = ( - 'find_links', 'site_dirs', 'index_url', 'optimize', - 'site_dirs', 'allow_hosts', + 'find_links', 'site_dirs', 'index_url', 'optimize', 'allow_hosts', ) fetch_options = {} for key, val in ei_opts.items(): From 0d831c90e345ba6e7d0f82954f0cec5bdaa8501b Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 10 Aug 2019 03:57:58 +0200 Subject: [PATCH 7544/8469] improve workaround for #1644 Make it possible to use a more recent version of pip for tests. --- pytest.ini | 2 +- tests/requirements.txt | 1 - tools/tox_pip.py | 29 +++++++++++++++++++++++++++++ tox.ini | 14 ++++++++------ 4 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 tools/tox_pip.py diff --git a/pytest.ini b/pytest.ini index 612fb91f63..764a55dd1f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern .* +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern tools .* flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 diff --git a/tests/requirements.txt b/tests/requirements.txt index cb3e672696..1f70adee0a 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -9,4 +9,3 @@ coverage>=4.5.1 pytest-cov>=2.5.1 paver; python_version>="3.6" futures; python_version=="2.7" -pip==18.1 # Temporary workaround for #1644. diff --git a/tools/tox_pip.py b/tools/tox_pip.py new file mode 100644 index 0000000000..1117f99653 --- /dev/null +++ b/tools/tox_pip.py @@ -0,0 +1,29 @@ +import os +import shutil +import subprocess +import sys +from glob import glob + +VIRTUAL_ENV = os.environ['VIRTUAL_ENV'] +TOX_PIP_DIR = os.path.join(VIRTUAL_ENV, 'pip') + + +def pip(args): + # First things first, get a recent (stable) version of pip. + if not os.path.exists(TOX_PIP_DIR): + subprocess.check_call([sys.executable, '-m', 'pip', + '--disable-pip-version-check', + 'install', '-t', TOX_PIP_DIR, + 'pip']) + shutil.rmtree(glob(os.path.join(TOX_PIP_DIR, 'pip-*.dist-info'))[0]) + # And use that version. + for n, a in enumerate(args): + if not a.startswith('-'): + if a in 'install' and '-e' in args[n:]: + args.insert(n + 1, '--no-use-pep517') + break + subprocess.check_call([sys.executable, os.path.join(TOX_PIP_DIR, 'pip')] + args) + + +if __name__ == '__main__': + pip(sys.argv[1:]) diff --git a/tox.ini b/tox.ini index e0eef95a45..8b34c235c9 100644 --- a/tox.ini +++ b/tox.ini @@ -7,14 +7,16 @@ [tox] envlist=python +[helpers] +# Wrapper for calls to pip that make sure the version being used is a +# up-to-date, and to prevent the current working directory from being +# added to `sys.path`. +pip = python {toxinidir}/tools/tox_pip.py + [testenv] deps=-rtests/requirements.txt -# Changed from default (`python -m pip ...`) -# to prevent the current working directory -# from being added to `sys.path`. -install_command=python -c 'import sys; sys.path.remove(""); from pkg_resources import load_entry_point; load_entry_point("pip", "console_scripts", "pip")()' install {opts} {packages} -# Same as above. -list_dependencies_command={envbindir}/pip freeze --all +install_command = {[helpers]pip} install {opts} {packages} +list_dependencies_command = {[helpers]pip} freeze --all setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. From bf069fe9ddcadaa2c029067601d06a07d037d4f7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 23 Aug 2019 23:07:52 +0200 Subject: [PATCH 7545/8469] setuptools: update vendored packaging --- setuptools/_vendor/packaging/__about__.py | 14 +- setuptools/_vendor/packaging/__init__.py | 20 +- setuptools/_vendor/packaging/_compat.py | 7 +- setuptools/_vendor/packaging/_structures.py | 4 +- setuptools/_vendor/packaging/markers.py | 91 ++--- setuptools/_vendor/packaging/requirements.py | 41 +- setuptools/_vendor/packaging/specifiers.py | 71 ++-- setuptools/_vendor/packaging/tags.py | 404 +++++++++++++++++++ setuptools/_vendor/packaging/utils.py | 43 ++ setuptools/_vendor/packaging/version.py | 149 ++++--- setuptools/_vendor/vendored.txt | 2 +- 11 files changed, 660 insertions(+), 186 deletions(-) create mode 100644 setuptools/_vendor/packaging/tags.py diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py index 95d330ef82..dc95138d04 100644 --- a/setuptools/_vendor/packaging/__about__.py +++ b/setuptools/_vendor/packaging/__about__.py @@ -4,18 +4,24 @@ from __future__ import absolute_import, division, print_function __all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", + "__title__", + "__summary__", + "__uri__", + "__version__", + "__author__", + "__email__", + "__license__", + "__copyright__", ] __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.8" +__version__ = "19.2" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" __license__ = "BSD or Apache License, Version 2.0" -__copyright__ = "Copyright 2014-2016 %s" % __author__ +__copyright__ = "Copyright 2014-2019 %s" % __author__ diff --git a/setuptools/_vendor/packaging/__init__.py b/setuptools/_vendor/packaging/__init__.py index 5ee6220203..a0cf67df52 100644 --- a/setuptools/_vendor/packaging/__init__.py +++ b/setuptools/_vendor/packaging/__init__.py @@ -4,11 +4,23 @@ from __future__ import absolute_import, division, print_function from .__about__ import ( - __author__, __copyright__, __email__, __license__, __summary__, __title__, - __uri__, __version__ + __author__, + __copyright__, + __email__, + __license__, + __summary__, + __title__, + __uri__, + __version__, ) __all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", + "__title__", + "__summary__", + "__uri__", + "__version__", + "__author__", + "__email__", + "__license__", + "__copyright__", ] diff --git a/setuptools/_vendor/packaging/_compat.py b/setuptools/_vendor/packaging/_compat.py index 210bb80b7e..25da473c19 100644 --- a/setuptools/_vendor/packaging/_compat.py +++ b/setuptools/_vendor/packaging/_compat.py @@ -12,9 +12,9 @@ # flake8: noqa if PY3: - string_types = str, + string_types = (str,) else: - string_types = basestring, + string_types = (basestring,) def with_metaclass(meta, *bases): @@ -27,4 +27,5 @@ def with_metaclass(meta, *bases): class metaclass(meta): def __new__(cls, name, this_bases, d): return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) + + return type.__new__(metaclass, "temporary_class", (), {}) diff --git a/setuptools/_vendor/packaging/_structures.py b/setuptools/_vendor/packaging/_structures.py index ccc27861c3..68dcca634d 100644 --- a/setuptools/_vendor/packaging/_structures.py +++ b/setuptools/_vendor/packaging/_structures.py @@ -5,7 +5,6 @@ class Infinity(object): - def __repr__(self): return "Infinity" @@ -33,11 +32,11 @@ def __ge__(self, other): def __neg__(self): return NegativeInfinity + Infinity = Infinity() class NegativeInfinity(object): - def __repr__(self): return "-Infinity" @@ -65,4 +64,5 @@ def __ge__(self, other): def __neg__(self): return Infinity + NegativeInfinity = NegativeInfinity() diff --git a/setuptools/_vendor/packaging/markers.py b/setuptools/_vendor/packaging/markers.py index 031332a305..4bdfdb24f2 100644 --- a/setuptools/_vendor/packaging/markers.py +++ b/setuptools/_vendor/packaging/markers.py @@ -17,8 +17,11 @@ __all__ = [ - "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", - "Marker", "default_environment", + "InvalidMarker", + "UndefinedComparison", + "UndefinedEnvironmentName", + "Marker", + "default_environment", ] @@ -42,7 +45,6 @@ class UndefinedEnvironmentName(ValueError): class Node(object): - def __init__(self, value): self.value = value @@ -57,62 +59,52 @@ def serialize(self): class Variable(Node): - def serialize(self): return str(self) class Value(Node): - def serialize(self): return '"{0}"'.format(self) class Op(Node): - def serialize(self): return str(self) VARIABLE = ( - L("implementation_version") | - L("platform_python_implementation") | - L("implementation_name") | - L("python_full_version") | - L("platform_release") | - L("platform_version") | - L("platform_machine") | - L("platform_system") | - L("python_version") | - L("sys_platform") | - L("os_name") | - L("os.name") | # PEP-345 - L("sys.platform") | # PEP-345 - L("platform.version") | # PEP-345 - L("platform.machine") | # PEP-345 - L("platform.python_implementation") | # PEP-345 - L("python_implementation") | # undocumented setuptools legacy - L("extra") + L("implementation_version") + | L("platform_python_implementation") + | L("implementation_name") + | L("python_full_version") + | L("platform_release") + | L("platform_version") + | L("platform_machine") + | L("platform_system") + | L("python_version") + | L("sys_platform") + | L("os_name") + | L("os.name") + | L("sys.platform") # PEP-345 + | L("platform.version") # PEP-345 + | L("platform.machine") # PEP-345 + | L("platform.python_implementation") # PEP-345 + | L("python_implementation") # PEP-345 + | L("extra") # undocumented setuptools legacy ) ALIASES = { - 'os.name': 'os_name', - 'sys.platform': 'sys_platform', - 'platform.version': 'platform_version', - 'platform.machine': 'platform_machine', - 'platform.python_implementation': 'platform_python_implementation', - 'python_implementation': 'platform_python_implementation' + "os.name": "os_name", + "sys.platform": "sys_platform", + "platform.version": "platform_version", + "platform.machine": "platform_machine", + "platform.python_implementation": "platform_python_implementation", + "python_implementation": "platform_python_implementation", } VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) VERSION_CMP = ( - L("===") | - L("==") | - L(">=") | - L("<=") | - L("!=") | - L("~=") | - L(">") | - L("<") + L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<") ) MARKER_OP = VERSION_CMP | L("not in") | L("in") @@ -152,8 +144,11 @@ def _format_marker(marker, first=True): # where the single item is itself it's own list. In that case we want skip # the rest of this function so that we don't get extraneous () on the # outside. - if (isinstance(marker, list) and len(marker) == 1 and - isinstance(marker[0], (list, tuple))): + if ( + isinstance(marker, list) + and len(marker) == 1 + and isinstance(marker[0], (list, tuple)) + ): return _format_marker(marker[0]) if isinstance(marker, list): @@ -239,20 +234,20 @@ def _evaluate_markers(markers, environment): def format_full_version(info): - version = '{0.major}.{0.minor}.{0.micro}'.format(info) + version = "{0.major}.{0.minor}.{0.micro}".format(info) kind = info.releaselevel - if kind != 'final': + if kind != "final": version += kind[0] + str(info.serial) return version def default_environment(): - if hasattr(sys, 'implementation'): + if hasattr(sys, "implementation"): iver = format_full_version(sys.implementation.version) implementation_name = sys.implementation.name else: - iver = '0' - implementation_name = '' + iver = "0" + implementation_name = "" return { "implementation_name": implementation_name, @@ -264,19 +259,19 @@ def default_environment(): "platform_version": platform.version(), "python_full_version": platform.python_version(), "platform_python_implementation": platform.python_implementation(), - "python_version": platform.python_version()[:3], + "python_version": ".".join(platform.python_version_tuple()[:2]), "sys_platform": sys.platform, } class Marker(object): - def __init__(self, marker): try: self._markers = _coerce_parse_result(MARKER.parseString(marker)) except ParseException as e: err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( - marker, marker[e.loc:e.loc + 8]) + marker, marker[e.loc : e.loc + 8] + ) raise InvalidMarker(err_str) def __str__(self): diff --git a/setuptools/_vendor/packaging/requirements.py b/setuptools/_vendor/packaging/requirements.py index 5b493416f2..8a0c2cb9be 100644 --- a/setuptools/_vendor/packaging/requirements.py +++ b/setuptools/_vendor/packaging/requirements.py @@ -38,8 +38,8 @@ class InvalidRequirement(ValueError): NAME = IDENTIFIER("name") EXTRA = IDENTIFIER -URI = Regex(r'[^ ]+')("url") -URL = (AT + URI) +URI = Regex(r"[^ ]+")("url") +URL = AT + URI EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") @@ -48,28 +48,31 @@ class InvalidRequirement(ValueError): VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY -VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), - joinString=",", adjacent=False)("_raw_spec") +VERSION_MANY = Combine( + VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False +)("_raw_spec") _VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) -_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') +_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "") VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") MARKER_EXPR.setParseAction( - lambda s, l, t: Marker(s[t._original_start:t._original_end]) + lambda s, l, t: Marker(s[t._original_start : t._original_end]) ) -MARKER_SEPERATOR = SEMICOLON -MARKER = MARKER_SEPERATOR + MARKER_EXPR +MARKER_SEPARATOR = SEMICOLON +MARKER = MARKER_SEPARATOR + MARKER_EXPR VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) URL_AND_MARKER = URL + Optional(MARKER) -NAMED_REQUIREMENT = \ - NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) +NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd +# setuptools.extern.pyparsing isn't thread safe during initialization, so we do it eagerly, see +# issue #104 +REQUIREMENT.parseString("x[]") class Requirement(object): @@ -90,15 +93,21 @@ def __init__(self, requirement_string): req = REQUIREMENT.parseString(requirement_string) except ParseException as e: raise InvalidRequirement( - "Invalid requirement, parse error at \"{0!r}\"".format( - requirement_string[e.loc:e.loc + 8])) + 'Parse error at "{0!r}": {1}'.format( + requirement_string[e.loc : e.loc + 8], e.msg + ) + ) self.name = req.name if req.url: parsed_url = urlparse.urlparse(req.url) - if not (parsed_url.scheme and parsed_url.netloc) or ( - not parsed_url.scheme and not parsed_url.netloc): - raise InvalidRequirement("Invalid URL given") + if parsed_url.scheme == "file": + if urlparse.urlunparse(parsed_url) != req.url: + raise InvalidRequirement("Invalid URL given") + elif not (parsed_url.scheme and parsed_url.netloc) or ( + not parsed_url.scheme and not parsed_url.netloc + ): + raise InvalidRequirement("Invalid URL: {0}".format(req.url)) self.url = req.url else: self.url = None @@ -117,6 +126,8 @@ def __str__(self): if self.url: parts.append("@ {0}".format(self.url)) + if self.marker: + parts.append(" ") if self.marker: parts.append("; {0}".format(self.marker)) diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py index 7f5a76cfd6..743576a080 100644 --- a/setuptools/_vendor/packaging/specifiers.py +++ b/setuptools/_vendor/packaging/specifiers.py @@ -19,7 +19,6 @@ class InvalidSpecifier(ValueError): class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): - @abc.abstractmethod def __str__(self): """ @@ -84,10 +83,7 @@ def __init__(self, spec="", prereleases=None): if not match: raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) - self._spec = ( - match.group("operator").strip(), - match.group("version").strip(), - ) + self._spec = (match.group("operator").strip(), match.group("version").strip()) # Store whether or not this Specifier should accept prereleases self._prereleases = prereleases @@ -99,11 +95,7 @@ def __repr__(self): else "" ) - return "<{0}({1!r}{2})>".format( - self.__class__.__name__, - str(self), - pre, - ) + return "<{0}({1!r}{2})>".format(self.__class__.__name__, str(self), pre) def __str__(self): return "{0}{1}".format(*self._spec) @@ -194,11 +186,12 @@ def filter(self, iterable, prereleases=None): # If our version is a prerelease, and we were not set to allow # prereleases, then we'll store it for later incase nothing # else matches this specifier. - if (parsed_version.is_prerelease and not - (prereleases or self.prereleases)): + if parsed_version.is_prerelease and not ( + prereleases or self.prereleases + ): found_prereleases.append(version) # Either this is not a prerelease, or we should have been - # accepting prereleases from the begining. + # accepting prereleases from the beginning. else: yielded = True yield version @@ -213,8 +206,7 @@ def filter(self, iterable, prereleases=None): class LegacySpecifier(_IndividualSpecifier): - _regex_str = ( - r""" + _regex_str = r""" (?P(==|!=|<=|>=|<|>)) \s* (?P @@ -225,10 +217,8 @@ class LegacySpecifier(_IndividualSpecifier): # them, and a comma since it's a version separator. ) """ - ) - _regex = re.compile( - r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "==": "equal", @@ -269,13 +259,13 @@ def wrapped(self, prospective, spec): if not isinstance(prospective, Version): return False return fn(self, prospective, spec) + return wrapped class Specifier(_IndividualSpecifier): - _regex_str = ( - r""" + _regex_str = r""" (?P(~=|==|!=|<=|>=|<|>|===)) (?P (?: @@ -367,10 +357,8 @@ class Specifier(_IndividualSpecifier): ) ) """ - ) - _regex = re.compile( - r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "~=": "compatible", @@ -397,8 +385,7 @@ def _compare_compatible(self, prospective, spec): prefix = ".".join( list( itertools.takewhile( - lambda x: (not x.startswith("post") and not - x.startswith("dev")), + lambda x: (not x.startswith("post") and not x.startswith("dev")), _version_split(spec), ) )[:-1] @@ -407,8 +394,9 @@ def _compare_compatible(self, prospective, spec): # Add the prefix notation to the end of our string prefix += ".*" - return (self._get_operator(">=")(prospective, spec) and - self._get_operator("==")(prospective, prefix)) + return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( + prospective, prefix + ) @_require_version_compare def _compare_equal(self, prospective, spec): @@ -428,7 +416,7 @@ def _compare_equal(self, prospective, spec): # Shorten the prospective version to be the same length as the spec # so that we can determine if the specifier is a prefix of the # prospective version or not. - prospective = prospective[:len(spec)] + prospective = prospective[: len(spec)] # Pad out our two sides with zeros so that they both equal the same # length. @@ -503,7 +491,7 @@ def _compare_greater_than(self, prospective, spec): return False # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is techincally greater than, to match. + # in the specifier, which is technically greater than, to match. if prospective.local is not None: if Version(prospective.base_version) == Version(spec.base_version): return False @@ -567,27 +555,17 @@ def _pad_version(left, right): right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) # Get the rest of our versions - left_split.append(left[len(left_split[0]):]) - right_split.append(right[len(right_split[0]):]) + left_split.append(left[len(left_split[0]) :]) + right_split.append(right[len(right_split[0]) :]) # Insert our padding - left_split.insert( - 1, - ["0"] * max(0, len(right_split[0]) - len(left_split[0])), - ) - right_split.insert( - 1, - ["0"] * max(0, len(left_split[0]) - len(right_split[0])), - ) + left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) + right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - return ( - list(itertools.chain(*left_split)), - list(itertools.chain(*right_split)), - ) + return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split))) class SpecifierSet(BaseSpecifier): - def __init__(self, specifiers="", prereleases=None): # Split on , to break each indidivual specifier into it's own item, and # strip each item to remove leading/trailing whitespace. @@ -721,10 +699,7 @@ def contains(self, item, prereleases=None): # given version is contained within all of them. # Note: This use of all() here means that an empty set of specifiers # will always return True, this is an explicit design decision. - return all( - s.contains(item, prereleases=prereleases) - for s in self._specs - ) + return all(s.contains(item, prereleases=prereleases) for s in self._specs) def filter(self, iterable, prereleases=None): # Determine if we're forcing a prerelease or not, if we're not forcing diff --git a/setuptools/_vendor/packaging/tags.py b/setuptools/_vendor/packaging/tags.py new file mode 100644 index 0000000000..ec9942f0f6 --- /dev/null +++ b/setuptools/_vendor/packaging/tags.py @@ -0,0 +1,404 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import absolute_import + +import distutils.util + +try: + from importlib.machinery import EXTENSION_SUFFIXES +except ImportError: # pragma: no cover + import imp + + EXTENSION_SUFFIXES = [x[0] for x in imp.get_suffixes()] + del imp +import platform +import re +import sys +import sysconfig +import warnings + + +INTERPRETER_SHORT_NAMES = { + "python": "py", # Generic. + "cpython": "cp", + "pypy": "pp", + "ironpython": "ip", + "jython": "jy", +} + + +_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32 + + +class Tag(object): + + __slots__ = ["_interpreter", "_abi", "_platform"] + + def __init__(self, interpreter, abi, platform): + self._interpreter = interpreter.lower() + self._abi = abi.lower() + self._platform = platform.lower() + + @property + def interpreter(self): + return self._interpreter + + @property + def abi(self): + return self._abi + + @property + def platform(self): + return self._platform + + def __eq__(self, other): + return ( + (self.platform == other.platform) + and (self.abi == other.abi) + and (self.interpreter == other.interpreter) + ) + + def __hash__(self): + return hash((self._interpreter, self._abi, self._platform)) + + def __str__(self): + return "{}-{}-{}".format(self._interpreter, self._abi, self._platform) + + def __repr__(self): + return "<{self} @ {self_id}>".format(self=self, self_id=id(self)) + + +def parse_tag(tag): + tags = set() + interpreters, abis, platforms = tag.split("-") + for interpreter in interpreters.split("."): + for abi in abis.split("."): + for platform_ in platforms.split("."): + tags.add(Tag(interpreter, abi, platform_)) + return frozenset(tags) + + +def _normalize_string(string): + return string.replace(".", "_").replace("-", "_") + + +def _cpython_interpreter(py_version): + # TODO: Is using py_version_nodot for interpreter version critical? + return "cp{major}{minor}".format(major=py_version[0], minor=py_version[1]) + + +def _cpython_abis(py_version): + abis = [] + version = "{}{}".format(*py_version[:2]) + debug = pymalloc = ucs4 = "" + with_debug = sysconfig.get_config_var("Py_DEBUG") + has_refcount = hasattr(sys, "gettotalrefcount") + # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled + # extension modules is the best option. + # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 + has_ext = "_d.pyd" in EXTENSION_SUFFIXES + if with_debug or (with_debug is None and (has_refcount or has_ext)): + debug = "d" + if py_version < (3, 8): + with_pymalloc = sysconfig.get_config_var("WITH_PYMALLOC") + if with_pymalloc or with_pymalloc is None: + pymalloc = "m" + if py_version < (3, 3): + unicode_size = sysconfig.get_config_var("Py_UNICODE_SIZE") + if unicode_size == 4 or ( + unicode_size is None and sys.maxunicode == 0x10FFFF + ): + ucs4 = "u" + elif debug: + # Debug builds can also load "normal" extension modules. + # We can also assume no UCS-4 or pymalloc requirement. + abis.append("cp{version}".format(version=version)) + abis.insert( + 0, + "cp{version}{debug}{pymalloc}{ucs4}".format( + version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4 + ), + ) + return abis + + +def _cpython_tags(py_version, interpreter, abis, platforms): + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) + for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): + yield tag + for tag in (Tag(interpreter, "none", platform_) for platform_ in platforms): + yield tag + # PEP 384 was first implemented in Python 3.2. + for minor_version in range(py_version[1] - 1, 1, -1): + for platform_ in platforms: + interpreter = "cp{major}{minor}".format( + major=py_version[0], minor=minor_version + ) + yield Tag(interpreter, "abi3", platform_) + + +def _pypy_interpreter(): + return "pp{py_major}{pypy_major}{pypy_minor}".format( + py_major=sys.version_info[0], + pypy_major=sys.pypy_version_info.major, + pypy_minor=sys.pypy_version_info.minor, + ) + + +def _generic_abi(): + abi = sysconfig.get_config_var("SOABI") + if abi: + return _normalize_string(abi) + else: + return "none" + + +def _pypy_tags(py_version, interpreter, abi, platforms): + for tag in (Tag(interpreter, abi, platform) for platform in platforms): + yield tag + for tag in (Tag(interpreter, "none", platform) for platform in platforms): + yield tag + + +def _generic_tags(interpreter, py_version, abi, platforms): + for tag in (Tag(interpreter, abi, platform) for platform in platforms): + yield tag + if abi != "none": + tags = (Tag(interpreter, "none", platform_) for platform_ in platforms) + for tag in tags: + yield tag + + +def _py_interpreter_range(py_version): + """ + Yield Python versions in descending order. + + After the latest version, the major-only version will be yielded, and then + all following versions up to 'end'. + """ + yield "py{major}{minor}".format(major=py_version[0], minor=py_version[1]) + yield "py{major}".format(major=py_version[0]) + for minor in range(py_version[1] - 1, -1, -1): + yield "py{major}{minor}".format(major=py_version[0], minor=minor) + + +def _independent_tags(interpreter, py_version, platforms): + """ + Return the sequence of tags that are consistent across implementations. + + The tags consist of: + - py*-none- + - -none-any + - py*-none-any + """ + for version in _py_interpreter_range(py_version): + for platform_ in platforms: + yield Tag(version, "none", platform_) + yield Tag(interpreter, "none", "any") + for version in _py_interpreter_range(py_version): + yield Tag(version, "none", "any") + + +def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): + if not is_32bit: + return arch + + if arch.startswith("ppc"): + return "ppc" + + return "i386" + + +def _mac_binary_formats(version, cpu_arch): + formats = [cpu_arch] + if cpu_arch == "x86_64": + if version < (10, 4): + return [] + formats.extend(["intel", "fat64", "fat32"]) + + elif cpu_arch == "i386": + if version < (10, 4): + return [] + formats.extend(["intel", "fat32", "fat"]) + + elif cpu_arch == "ppc64": + # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? + if version > (10, 5) or version < (10, 4): + return [] + formats.append("fat64") + + elif cpu_arch == "ppc": + if version > (10, 6): + return [] + formats.extend(["fat32", "fat"]) + + formats.append("universal") + return formats + + +def _mac_platforms(version=None, arch=None): + version_str, _, cpu_arch = platform.mac_ver() + if version is None: + version = tuple(map(int, version_str.split(".")[:2])) + if arch is None: + arch = _mac_arch(cpu_arch) + platforms = [] + for minor_version in range(version[1], -1, -1): + compat_version = version[0], minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + platforms.append( + "macosx_{major}_{minor}_{binary_format}".format( + major=compat_version[0], + minor=compat_version[1], + binary_format=binary_format, + ) + ) + return platforms + + +# From PEP 513. +def _is_manylinux_compatible(name, glibc_version): + # Check for presence of _manylinux module. + try: + import _manylinux + + return bool(getattr(_manylinux, name + "_compatible")) + except (ImportError, AttributeError): + # Fall through to heuristic check below. + pass + + return _have_compatible_glibc(*glibc_version) + + +def _glibc_version_string(): + # Returns glibc version string, or None if not using glibc. + import ctypes + + # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen + # manpage says, "If filename is NULL, then the returned handle is for the + # main program". This way we can let the linker do the work to figure out + # which libc our process is actually using. + process_namespace = ctypes.CDLL(None) + try: + gnu_get_libc_version = process_namespace.gnu_get_libc_version + except AttributeError: + # Symbol doesn't exist -> therefore, we are not linked to + # glibc. + return None + + # Call gnu_get_libc_version, which returns a string like "2.5" + gnu_get_libc_version.restype = ctypes.c_char_p + version_str = gnu_get_libc_version() + # py2 / py3 compatibility: + if not isinstance(version_str, str): + version_str = version_str.decode("ascii") + + return version_str + + +# Separated out from have_compatible_glibc for easier unit testing. +def _check_glibc_version(version_str, required_major, minimum_minor): + # Parse string and check against requested version. + # + # We use a regexp instead of str.split because we want to discard any + # random junk that might come after the minor version -- this might happen + # in patched/forked versions of glibc (e.g. Linaro's version of glibc + # uses version strings like "2.20-2014.11"). See gh-3588. + m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) + if not m: + warnings.warn( + "Expected glibc version with 2 components major.minor," + " got: %s" % version_str, + RuntimeWarning, + ) + return False + return ( + int(m.group("major")) == required_major + and int(m.group("minor")) >= minimum_minor + ) + + +def _have_compatible_glibc(required_major, minimum_minor): + version_str = _glibc_version_string() + if version_str is None: + return False + return _check_glibc_version(version_str, required_major, minimum_minor) + + +def _linux_platforms(is_32bit=_32_BIT_INTERPRETER): + linux = _normalize_string(distutils.util.get_platform()) + if linux == "linux_x86_64" and is_32bit: + linux = "linux_i686" + manylinux_support = ( + ("manylinux2014", (2, 17)), # CentOS 7 w/ glibc 2.17 (PEP 599) + ("manylinux2010", (2, 12)), # CentOS 6 w/ glibc 2.12 (PEP 571) + ("manylinux1", (2, 5)), # CentOS 5 w/ glibc 2.5 (PEP 513) + ) + manylinux_support_iter = iter(manylinux_support) + for name, glibc_version in manylinux_support_iter: + if _is_manylinux_compatible(name, glibc_version): + platforms = [linux.replace("linux", name)] + break + else: + platforms = [] + # Support for a later manylinux implies support for an earlier version. + platforms += [linux.replace("linux", name) for name, _ in manylinux_support_iter] + platforms.append(linux) + return platforms + + +def _generic_platforms(): + platform = _normalize_string(distutils.util.get_platform()) + return [platform] + + +def _interpreter_name(): + name = platform.python_implementation().lower() + return INTERPRETER_SHORT_NAMES.get(name) or name + + +def _generic_interpreter(name, py_version): + version = sysconfig.get_config_var("py_version_nodot") + if not version: + version = "".join(map(str, py_version[:2])) + return "{name}{version}".format(name=name, version=version) + + +def sys_tags(): + """ + Returns the sequence of tag triples for the running interpreter. + + The order of the sequence corresponds to priority order for the + interpreter, from most to least important. + """ + py_version = sys.version_info[:2] + interpreter_name = _interpreter_name() + if platform.system() == "Darwin": + platforms = _mac_platforms() + elif platform.system() == "Linux": + platforms = _linux_platforms() + else: + platforms = _generic_platforms() + + if interpreter_name == "cp": + interpreter = _cpython_interpreter(py_version) + abis = _cpython_abis(py_version) + for tag in _cpython_tags(py_version, interpreter, abis, platforms): + yield tag + elif interpreter_name == "pp": + interpreter = _pypy_interpreter() + abi = _generic_abi() + for tag in _pypy_tags(py_version, interpreter, abi, platforms): + yield tag + else: + interpreter = _generic_interpreter(interpreter_name, py_version) + abi = _generic_abi() + for tag in _generic_tags(interpreter, py_version, abi, platforms): + yield tag + for tag in _independent_tags(interpreter, py_version, platforms): + yield tag diff --git a/setuptools/_vendor/packaging/utils.py b/setuptools/_vendor/packaging/utils.py index 942387cef5..8841878693 100644 --- a/setuptools/_vendor/packaging/utils.py +++ b/setuptools/_vendor/packaging/utils.py @@ -5,6 +5,8 @@ import re +from .version import InvalidVersion, Version + _canonicalize_regex = re.compile(r"[-_.]+") @@ -12,3 +14,44 @@ def canonicalize_name(name): # This is taken from PEP 503. return _canonicalize_regex.sub("-", name).lower() + + +def canonicalize_version(version): + """ + This is very similar to Version.__str__, but has one subtle differences + with the way it handles the release segment. + """ + + try: + version = Version(version) + except InvalidVersion: + # Legacy versions cannot be normalized + return version + + parts = [] + + # Epoch + if version.epoch != 0: + parts.append("{0}!".format(version.epoch)) + + # Release segment + # NB: This strips trailing '.0's to normalize + parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in version.release))) + + # Pre-release + if version.pre is not None: + parts.append("".join(str(x) for x in version.pre)) + + # Post-release + if version.post is not None: + parts.append(".post{0}".format(version.post)) + + # Development release + if version.dev is not None: + parts.append(".dev{0}".format(version.dev)) + + # Local version segment + if version.local is not None: + parts.append("+{0}".format(version.local)) + + return "".join(parts) diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py index 83b5ee8c5e..95157a1f78 100644 --- a/setuptools/_vendor/packaging/version.py +++ b/setuptools/_vendor/packaging/version.py @@ -10,14 +10,11 @@ from ._structures import Infinity -__all__ = [ - "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" -] +__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] _Version = collections.namedtuple( - "_Version", - ["epoch", "release", "dev", "pre", "post", "local"], + "_Version", ["epoch", "release", "dev", "pre", "post", "local"] ) @@ -40,7 +37,6 @@ class InvalidVersion(ValueError): class _BaseVersion(object): - def __hash__(self): return hash(self._key) @@ -70,7 +66,6 @@ def _compare(self, other, method): class LegacyVersion(_BaseVersion): - def __init__(self, version): self._version = str(version) self._key = _legacy_cmpkey(self._version) @@ -89,6 +84,26 @@ def public(self): def base_version(self): return self._version + @property + def epoch(self): + return -1 + + @property + def release(self): + return None + + @property + def pre(self): + return None + + @property + def post(self): + return None + + @property + def dev(self): + return None + @property def local(self): return None @@ -101,13 +116,19 @@ def is_prerelease(self): def is_postrelease(self): return False + @property + def is_devrelease(self): + return False -_legacy_version_component_re = re.compile( - r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, -) + +_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE) _legacy_version_replacement_map = { - "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", + "pre": "c", + "preview": "c", + "-": "final-", + "rc": "c", + "dev": "@", } @@ -154,6 +175,7 @@ def _legacy_cmpkey(version): return epoch, parts + # Deliberately not anchored to the start and end of the string, to make it # easier for 3rd party code to reuse VERSION_PATTERN = r""" @@ -190,10 +212,7 @@ def _legacy_cmpkey(version): class Version(_BaseVersion): - _regex = re.compile( - r"^\s*" + VERSION_PATTERN + r"\s*$", - re.VERBOSE | re.IGNORECASE, - ) + _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) def __init__(self, version): # Validate the version and parse it into pieces @@ -205,18 +224,11 @@ def __init__(self, version): self._version = _Version( epoch=int(match.group("epoch")) if match.group("epoch") else 0, release=tuple(int(i) for i in match.group("release").split(".")), - pre=_parse_letter_version( - match.group("pre_l"), - match.group("pre_n"), - ), + pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")), post=_parse_letter_version( - match.group("post_l"), - match.group("post_n1") or match.group("post_n2"), - ), - dev=_parse_letter_version( - match.group("dev_l"), - match.group("dev_n"), + match.group("post_l"), match.group("post_n1") or match.group("post_n2") ), + dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")), local=_parse_local_version(match.group("local")), ) @@ -237,32 +249,57 @@ def __str__(self): parts = [] # Epoch - if self._version.epoch != 0: - parts.append("{0}!".format(self._version.epoch)) + if self.epoch != 0: + parts.append("{0}!".format(self.epoch)) # Release segment - parts.append(".".join(str(x) for x in self._version.release)) + parts.append(".".join(str(x) for x in self.release)) # Pre-release - if self._version.pre is not None: - parts.append("".join(str(x) for x in self._version.pre)) + if self.pre is not None: + parts.append("".join(str(x) for x in self.pre)) # Post-release - if self._version.post is not None: - parts.append(".post{0}".format(self._version.post[1])) + if self.post is not None: + parts.append(".post{0}".format(self.post)) # Development release - if self._version.dev is not None: - parts.append(".dev{0}".format(self._version.dev[1])) + if self.dev is not None: + parts.append(".dev{0}".format(self.dev)) # Local version segment - if self._version.local is not None: - parts.append( - "+{0}".format(".".join(str(x) for x in self._version.local)) - ) + if self.local is not None: + parts.append("+{0}".format(self.local)) return "".join(parts) + @property + def epoch(self): + return self._version.epoch + + @property + def release(self): + return self._version.release + + @property + def pre(self): + return self._version.pre + + @property + def post(self): + return self._version.post[1] if self._version.post else None + + @property + def dev(self): + return self._version.dev[1] if self._version.dev else None + + @property + def local(self): + if self._version.local: + return ".".join(str(x) for x in self._version.local) + else: + return None + @property def public(self): return str(self).split("+", 1)[0] @@ -272,27 +309,25 @@ def base_version(self): parts = [] # Epoch - if self._version.epoch != 0: - parts.append("{0}!".format(self._version.epoch)) + if self.epoch != 0: + parts.append("{0}!".format(self.epoch)) # Release segment - parts.append(".".join(str(x) for x in self._version.release)) + parts.append(".".join(str(x) for x in self.release)) return "".join(parts) - @property - def local(self): - version_string = str(self) - if "+" in version_string: - return version_string.split("+", 1)[1] - @property def is_prerelease(self): - return bool(self._version.dev or self._version.pre) + return self.dev is not None or self.pre is not None @property def is_postrelease(self): - return bool(self._version.post) + return self.post is not None + + @property + def is_devrelease(self): + return self.dev is not None def _parse_letter_version(letter, number): @@ -326,7 +361,7 @@ def _parse_letter_version(letter, number): return letter, int(number) -_local_version_seperators = re.compile(r"[\._-]") +_local_version_separators = re.compile(r"[\._-]") def _parse_local_version(local): @@ -336,7 +371,7 @@ def _parse_local_version(local): if local is not None: return tuple( part.lower() if not part.isdigit() else int(part) - for part in _local_version_seperators.split(local) + for part in _local_version_separators.split(local) ) @@ -347,12 +382,7 @@ def _cmpkey(epoch, release, pre, post, dev, local): # re-reverse it back into the correct order and make it a tuple and use # that for our sorting key. release = tuple( - reversed(list( - itertools.dropwhile( - lambda x: x == 0, - reversed(release), - ) - )) + reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release)))) ) # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0. @@ -385,9 +415,6 @@ def _cmpkey(epoch, release, pre, post, dev, local): # - Numeric segments sort numerically # - Shorter versions sort before longer versions when the prefixes # match exactly - local = tuple( - (i, "") if isinstance(i, int) else (-Infinity, i) - for i in local - ) + local = tuple((i, "") if isinstance(i, int) else (-Infinity, i) for i in local) return epoch, release, pre, post, dev, local diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index 5731b4244b..65183d9a2a 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,4 +1,4 @@ -packaging==16.8 +packaging==19.2 pyparsing==2.2.1 six==1.10.0 ordered-set==3.1.1 From 3d811b93a83d5931b821916c6ca172a69c403a97 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 23 Aug 2019 23:18:02 +0200 Subject: [PATCH 7546/8469] wheel: switch to `packaging.tags` for checking PEP 425 tags --- setuptools/glibc.py | 86 -------- setuptools/pep425tags.py | 319 ---------------------------- setuptools/tests/test_glibc.py | 52 ----- setuptools/tests/test_pep425tags.py | 170 --------------- setuptools/wheel.py | 4 +- 5 files changed, 2 insertions(+), 629 deletions(-) delete mode 100644 setuptools/glibc.py delete mode 100644 setuptools/pep425tags.py delete mode 100644 setuptools/tests/test_glibc.py delete mode 100644 setuptools/tests/test_pep425tags.py diff --git a/setuptools/glibc.py b/setuptools/glibc.py deleted file mode 100644 index a134591c30..0000000000 --- a/setuptools/glibc.py +++ /dev/null @@ -1,86 +0,0 @@ -# This file originally from pip: -# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/utils/glibc.py -from __future__ import absolute_import - -import ctypes -import re -import warnings - - -def glibc_version_string(): - "Returns glibc version string, or None if not using glibc." - - # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen - # manpage says, "If filename is NULL, then the returned handle is for the - # main program". This way we can let the linker do the work to figure out - # which libc our process is actually using. - process_namespace = ctypes.CDLL(None) - try: - gnu_get_libc_version = process_namespace.gnu_get_libc_version - except AttributeError: - # Symbol doesn't exist -> therefore, we are not linked to - # glibc. - return None - - # Call gnu_get_libc_version, which returns a string like "2.5" - gnu_get_libc_version.restype = ctypes.c_char_p - version_str = gnu_get_libc_version() - # py2 / py3 compatibility: - if not isinstance(version_str, str): - version_str = version_str.decode("ascii") - - return version_str - - -# Separated out from have_compatible_glibc for easier unit testing -def check_glibc_version(version_str, required_major, minimum_minor): - # Parse string and check against requested version. - # - # We use a regexp instead of str.split because we want to discard any - # random junk that might come after the minor version -- this might happen - # in patched/forked versions of glibc (e.g. Linaro's version of glibc - # uses version strings like "2.20-2014.11"). See gh-3588. - m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) - if not m: - warnings.warn("Expected glibc version with 2 components major.minor," - " got: %s" % version_str, RuntimeWarning) - return False - return (int(m.group("major")) == required_major and - int(m.group("minor")) >= minimum_minor) - - -def have_compatible_glibc(required_major, minimum_minor): - version_str = glibc_version_string() - if version_str is None: - return False - return check_glibc_version(version_str, required_major, minimum_minor) - - -# platform.libc_ver regularly returns completely nonsensical glibc -# versions. E.g. on my computer, platform says: -# -# ~$ python2.7 -c 'import platform; print(platform.libc_ver())' -# ('glibc', '2.7') -# ~$ python3.5 -c 'import platform; print(platform.libc_ver())' -# ('glibc', '2.9') -# -# But the truth is: -# -# ~$ ldd --version -# ldd (Debian GLIBC 2.22-11) 2.22 -# -# This is unfortunate, because it means that the linehaul data on libc -# versions that was generated by pip 8.1.2 and earlier is useless and -# misleading. Solution: instead of using platform, use our code that actually -# works. -def libc_ver(): - """Try to determine the glibc version - - Returns a tuple of strings (lib, version) which default to empty strings - in case the lookup fails. - """ - glibc_version = glibc_version_string() - if glibc_version is None: - return ("", "") - else: - return ("glibc", glibc_version) diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py deleted file mode 100644 index 48745a2902..0000000000 --- a/setuptools/pep425tags.py +++ /dev/null @@ -1,319 +0,0 @@ -# This file originally from pip: -# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/pep425tags.py -"""Generate and work with PEP 425 Compatibility Tags.""" -from __future__ import absolute_import - -import distutils.util -from distutils import log -import platform -import re -import sys -import sysconfig -import warnings -from collections import OrderedDict - -from .extern import six - -from . import glibc - -_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)') - - -def get_config_var(var): - try: - return sysconfig.get_config_var(var) - except IOError as e: # Issue #1074 - warnings.warn("{}".format(e), RuntimeWarning) - return None - - -def get_abbr_impl(): - """Return abbreviated implementation name.""" - if hasattr(sys, 'pypy_version_info'): - pyimpl = 'pp' - elif sys.platform.startswith('java'): - pyimpl = 'jy' - elif sys.platform == 'cli': - pyimpl = 'ip' - else: - pyimpl = 'cp' - return pyimpl - - -def get_impl_ver(): - """Return implementation version.""" - impl_ver = get_config_var("py_version_nodot") - if not impl_ver or get_abbr_impl() == 'pp': - impl_ver = ''.join(map(str, get_impl_version_info())) - return impl_ver - - -def get_impl_version_info(): - """Return sys.version_info-like tuple for use in decrementing the minor - version.""" - if get_abbr_impl() == 'pp': - # as per https://github.com/pypa/pip/issues/2882 - return (sys.version_info[0], sys.pypy_version_info.major, - sys.pypy_version_info.minor) - else: - return sys.version_info[0], sys.version_info[1] - - -def get_impl_tag(): - """ - Returns the Tag for this specific implementation. - """ - return "{}{}".format(get_abbr_impl(), get_impl_ver()) - - -def get_flag(var, fallback, expected=True, warn=True): - """Use a fallback method for determining SOABI flags if the needed config - var is unset or unavailable.""" - val = get_config_var(var) - if val is None: - if warn: - log.debug("Config variable '%s' is unset, Python ABI tag may " - "be incorrect", var) - return fallback() - return val == expected - - -def get_abi_tag(): - """Return the ABI tag based on SOABI (if available) or emulate SOABI - (CPython 2, PyPy).""" - soabi = get_config_var('SOABI') - impl = get_abbr_impl() - if not soabi and impl in {'cp', 'pp'} and hasattr(sys, 'maxunicode'): - d = '' - m = '' - u = '' - if get_flag('Py_DEBUG', - lambda: hasattr(sys, 'gettotalrefcount'), - warn=(impl == 'cp')): - d = 'd' - if get_flag('WITH_PYMALLOC', - lambda: impl == 'cp', - warn=(impl == 'cp')): - m = 'm' - if get_flag('Py_UNICODE_SIZE', - lambda: sys.maxunicode == 0x10ffff, - expected=4, - warn=(impl == 'cp' and - 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-'): - abi = 'cp' + soabi.split('-')[1] - elif soabi: - abi = soabi.replace('.', '_').replace('-', '_') - else: - abi = None - return abi - - -def _is_running_32bit(): - return sys.maxsize == 2147483647 - - -def get_platform(): - """Return our platform name 'win32', 'linux_x86_64'""" - if sys.platform == 'darwin': - # distutils.util.get_platform() returns the release based on the value - # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may - # be significantly older than the user's current machine. - release, _, machine = platform.mac_ver() - split_ver = release.split('.') - - if machine == "x86_64" and _is_running_32bit(): - machine = "i386" - elif machine == "ppc64" and _is_running_32bit(): - machine = "ppc" - - return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine) - - # XXX remove distutils dependency - result = distutils.util.get_platform().replace('.', '_').replace('-', '_') - if result == "linux_x86_64" and _is_running_32bit(): - # 32 bit Python program (running on a 64 bit Linux): pip should only - # install and run 32 bit compiled extensions in that case. - result = "linux_i686" - - return result - - -def is_manylinux1_compatible(): - # Only Linux, and only x86-64 / i686 - if get_platform() not in {"linux_x86_64", "linux_i686"}: - return False - - # Check for presence of _manylinux module - try: - import _manylinux - return bool(_manylinux.manylinux1_compatible) - except (ImportError, AttributeError): - # Fall through to heuristic check below - pass - - # Check glibc version. CentOS 5 uses glibc 2.5. - return glibc.have_compatible_glibc(2, 5) - - -def get_darwin_arches(major, minor, machine): - """Return a list of supported arches (including group arches) for - the given major, minor and machine architecture of a macOS machine. - """ - arches = [] - - def _supports_arch(major, minor, arch): - # Looking at the application support for macOS versions in the chart - # provided by https://en.wikipedia.org/wiki/OS_X#Versions it appears - # our timeline looks roughly like: - # - # 10.0 - Introduces ppc support. - # 10.4 - Introduces ppc64, i386, and x86_64 support, however the ppc64 - # and x86_64 support is CLI only, and cannot be used for GUI - # applications. - # 10.5 - Extends ppc64 and x86_64 support to cover GUI applications. - # 10.6 - Drops support for ppc64 - # 10.7 - Drops support for ppc - # - # Given that we do not know if we're installing a CLI or a GUI - # application, we must be conservative and assume it might be a GUI - # application and behave as if ppc64 and x86_64 support did not occur - # until 10.5. - # - # Note: The above information is taken from the "Application support" - # column in the chart not the "Processor support" since I believe - # that we care about what instruction sets an application can use - # not which processors the OS supports. - if arch == 'ppc': - return (major, minor) <= (10, 5) - if arch == 'ppc64': - return (major, minor) == (10, 5) - if arch == 'i386': - return (major, minor) >= (10, 4) - if arch == 'x86_64': - return (major, minor) >= (10, 5) - if arch in groups: - for garch in groups[arch]: - if _supports_arch(major, minor, garch): - return True - return False - - groups = OrderedDict([ - ("fat", ("i386", "ppc")), - ("intel", ("x86_64", "i386")), - ("fat64", ("x86_64", "ppc64")), - ("fat32", ("x86_64", "i386", "ppc")), - ]) - - if _supports_arch(major, minor, machine): - arches.append(machine) - - for garch in groups: - if machine in groups[garch] and _supports_arch(major, minor, garch): - arches.append(garch) - - arches.append('universal') - - return arches - - -def get_supported(versions=None, noarch=False, platform=None, - impl=None, abi=None): - """Return a list of supported tags for each version specified in - `versions`. - - :param versions: a list of string versions, of the form ["33", "32"], - or None. The first version will be assumed to support our ABI. - :param platform: specify the exact platform you want valid - tags for, or None. If None, use the local system platform. - :param impl: specify the exact implementation you want valid - tags for, or None. If None, use the local interpreter impl. - :param abi: specify the exact abi you want valid - tags for, or None. If None, use the local interpreter abi. - """ - supported = [] - - # Versions must be given with respect to the preference - if versions is None: - versions = [] - version_info = get_impl_version_info() - major = version_info[:-1] - # Support all previous minor Python versions. - for minor in range(version_info[-1], -1, -1): - versions.append(''.join(map(str, major + (minor,)))) - - impl = impl or get_abbr_impl() - - abis = [] - - abi = abi or get_abi_tag() - if abi: - abis[0:0] = [abi] - - abi3s = set() - import imp - for suffix in imp.get_suffixes(): - if suffix[0].startswith('.abi'): - abi3s.add(suffix[0].split('.', 2)[1]) - - abis.extend(sorted(list(abi3s))) - - abis.append('none') - - if not noarch: - arch = platform or get_platform() - if arch.startswith('macosx'): - # support macosx-10.6-intel on macosx-10.9-x86_64 - match = _osx_arch_pat.match(arch) - if match: - name, major, minor, actual_arch = match.groups() - tpl = '{}_{}_%i_%s'.format(name, major) - arches = [] - for m in reversed(range(int(minor) + 1)): - for a in get_darwin_arches(int(major), m, actual_arch): - arches.append(tpl % (m, a)) - else: - # arch pattern didn't match (?!) - arches = [arch] - elif platform is None and is_manylinux1_compatible(): - arches = [arch.replace('linux', 'manylinux1'), arch] - else: - arches = [arch] - - # Current version, current API (built specifically for our Python): - for abi in abis: - for arch in arches: - supported.append(('%s%s' % (impl, versions[0]), abi, arch)) - - # abi3 modules compatible with older version of Python - for version in versions[1:]: - # abi3 was introduced in Python 3.2 - if version in {'31', '30'}: - break - for abi in abi3s: # empty set if not Python 3 - for arch in arches: - supported.append(("%s%s" % (impl, version), abi, arch)) - - # Has binaries, does not use the Python API: - for arch in arches: - supported.append(('py%s' % (versions[0][0]), 'none', arch)) - - # No abi / arch, but requires our implementation: - supported.append(('%s%s' % (impl, versions[0]), 'none', 'any')) - # Tagged specifically as being cross-version compatible - # (with just the major version specified) - supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any')) - - # No abi / arch, generic Python - for i, version in enumerate(versions): - supported.append(('py%s' % (version,), 'none', 'any')) - if i == 0: - supported.append(('py%s' % (version[0]), 'none', 'any')) - - return supported - - -implementation_tag = get_impl_tag() diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py deleted file mode 100644 index 795fdc5665..0000000000 --- a/setuptools/tests/test_glibc.py +++ /dev/null @@ -1,52 +0,0 @@ -import warnings - -import pytest - -from setuptools.glibc import check_glibc_version - -__metaclass__ = type - - -@pytest.fixture(params=[ - "2.20", - # used by "linaro glibc", see gh-3588 - "2.20-2014.11", - # weird possibilities that I just made up - "2.20+dev", - "2.20-custom", - "2.20.1", - ]) -def two_twenty(request): - return request.param - - -@pytest.fixture(params=["asdf", "", "foo.bar"]) -def bad_string(request): - return request.param - - -class TestGlibc: - def test_manylinux1_check_glibc_version(self, two_twenty): - """ - Test that the check_glibc_version function is robust against weird - glibc version strings. - """ - assert check_glibc_version(two_twenty, 2, 15) - assert check_glibc_version(two_twenty, 2, 20) - assert not check_glibc_version(two_twenty, 2, 21) - assert not check_glibc_version(two_twenty, 3, 15) - assert not check_glibc_version(two_twenty, 1, 15) - - def test_bad_versions(self, bad_string): - """ - For unparseable strings, warn and return False - """ - with warnings.catch_warnings(record=True) as ws: - warnings.filterwarnings("always") - assert not check_glibc_version(bad_string, 2, 5) - for w in ws: - if "Expected glibc version with" in str(w.message): - break - else: - # Didn't find the warning we were expecting - assert False diff --git a/setuptools/tests/test_pep425tags.py b/setuptools/tests/test_pep425tags.py deleted file mode 100644 index 30afdec7d4..0000000000 --- a/setuptools/tests/test_pep425tags.py +++ /dev/null @@ -1,170 +0,0 @@ -import sys - -import pytest -from mock import patch - -from setuptools import pep425tags - -__metaclass__ = type - - -class TestPEP425Tags: - - def mock_get_config_var(self, **kwd): - """ - Patch sysconfig.get_config_var for arbitrary keys. - """ - get_config_var = pep425tags.sysconfig.get_config_var - - def _mock_get_config_var(var): - if var in kwd: - return kwd[var] - return get_config_var(var) - return _mock_get_config_var - - def abi_tag_unicode(self, flags, config_vars): - """ - Used to test ABI tags, verify correct use of the `u` flag - """ - config_vars.update({'SOABI': None}) - base = pep425tags.get_abbr_impl() + pep425tags.get_impl_ver() - - if sys.version_info < (3, 3): - config_vars.update({'Py_UNICODE_SIZE': 2}) - mock_gcf = self.mock_get_config_var(**config_vars) - with patch( - 'setuptools.pep425tags.sysconfig.get_config_var', - mock_gcf): - abi_tag = pep425tags.get_abi_tag() - assert abi_tag == base + flags - - config_vars.update({'Py_UNICODE_SIZE': 4}) - mock_gcf = self.mock_get_config_var(**config_vars) - with patch('setuptools.pep425tags.sysconfig.get_config_var', - mock_gcf): - abi_tag = pep425tags.get_abi_tag() - assert abi_tag == base + flags + 'u' - - else: - # On Python >= 3.3, UCS-4 is essentially permanently enabled, and - # Py_UNICODE_SIZE is None. SOABI on these builds does not include - # the 'u' so manual SOABI detection should not do so either. - config_vars.update({'Py_UNICODE_SIZE': None}) - mock_gcf = self.mock_get_config_var(**config_vars) - with patch('setuptools.pep425tags.sysconfig.get_config_var', - mock_gcf): - abi_tag = pep425tags.get_abi_tag() - assert abi_tag == base + flags - - def test_broken_sysconfig(self): - """ - Test that pep425tags still works when sysconfig is broken. - Can be a problem on Python 2.7 - Issue #1074. - """ - def raises_ioerror(var): - raise IOError("I have the wrong path!") - - with patch('setuptools.pep425tags.sysconfig.get_config_var', - raises_ioerror): - with pytest.warns(RuntimeWarning): - assert len(pep425tags.get_supported()) - - def test_no_hyphen_tag(self): - """ - Test that no tag contains a hyphen. - """ - mock_gcf = self.mock_get_config_var(SOABI='cpython-35m-darwin') - - with patch('setuptools.pep425tags.sysconfig.get_config_var', - mock_gcf): - supported = pep425tags.get_supported() - - for (py, abi, plat) in supported: - assert '-' not in py - assert '-' not in abi - assert '-' not in plat - - def test_manual_abi_noflags(self): - """ - Test that no flags are set on a non-PyDebug, non-Pymalloc ABI tag. - """ - self.abi_tag_unicode('', {'Py_DEBUG': False, 'WITH_PYMALLOC': False}) - - def test_manual_abi_d_flag(self): - """ - Test that the `d` flag is set on a PyDebug, non-Pymalloc ABI tag. - """ - self.abi_tag_unicode('d', {'Py_DEBUG': True, 'WITH_PYMALLOC': False}) - - def test_manual_abi_m_flag(self): - """ - Test that the `m` flag is set on a non-PyDebug, Pymalloc ABI tag. - """ - self.abi_tag_unicode('m', {'Py_DEBUG': False, 'WITH_PYMALLOC': True}) - - def test_manual_abi_dm_flags(self): - """ - Test that the `dm` flags are set on a PyDebug, Pymalloc ABI tag. - """ - self.abi_tag_unicode('dm', {'Py_DEBUG': True, 'WITH_PYMALLOC': True}) - - -class TestManylinux1Tags: - - @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') - @patch('setuptools.glibc.have_compatible_glibc', - lambda major, minor: True) - def test_manylinux1_compatible_on_linux_x86_64(self): - """ - Test that manylinux1 is enabled on linux_x86_64 - """ - assert pep425tags.is_manylinux1_compatible() - - @patch('setuptools.pep425tags.get_platform', lambda: 'linux_i686') - @patch('setuptools.glibc.have_compatible_glibc', - lambda major, minor: True) - def test_manylinux1_compatible_on_linux_i686(self): - """ - Test that manylinux1 is enabled on linux_i686 - """ - assert pep425tags.is_manylinux1_compatible() - - @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') - @patch('setuptools.glibc.have_compatible_glibc', - lambda major, minor: False) - def test_manylinux1_2(self): - """ - Test that manylinux1 is disabled with incompatible glibc - """ - assert not pep425tags.is_manylinux1_compatible() - - @patch('setuptools.pep425tags.get_platform', lambda: 'arm6vl') - @patch('setuptools.glibc.have_compatible_glibc', - lambda major, minor: True) - def test_manylinux1_3(self): - """ - Test that manylinux1 is disabled on arm6vl - """ - assert not pep425tags.is_manylinux1_compatible() - - @patch('setuptools.pep425tags.get_platform', lambda: 'linux_x86_64') - @patch('setuptools.glibc.have_compatible_glibc', - lambda major, minor: True) - @patch('sys.platform', 'linux2') - def test_manylinux1_tag_is_first(self): - """ - Test that the more specific tag manylinux1 comes first. - """ - groups = {} - for pyimpl, abi, arch in pep425tags.get_supported(): - groups.setdefault((pyimpl, abi), []).append(arch) - - for arches in groups.values(): - if arches == ['any']: - continue - # Expect the most specific arch first: - if len(arches) == 3: - assert arches == ['manylinux1_x86_64', 'linux_x86_64', 'any'] - else: - assert arches == ['manylinux1_x86_64', 'linux_x86_64'] diff --git a/setuptools/wheel.py b/setuptools/wheel.py index e11f0a1d91..502f841065 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -11,9 +11,9 @@ import pkg_resources import setuptools from pkg_resources import parse_version +from setuptools.extern.packaging.tags import sys_tags from setuptools.extern.packaging.utils import canonicalize_name from setuptools.extern.six import PY3 -from setuptools import pep425tags from setuptools.command.egg_info import write_requirements @@ -76,7 +76,7 @@ def tags(self): def is_compatible(self): '''Is the wheel is compatible with the current platform?''' - supported_tags = pep425tags.get_supported() + supported_tags = set(map(str, sys_tags())) return next((True for t in self.tags() if t in supported_tags), False) def egg_name(self): From 0744f7b410ff937cec428b7d6ca103c419d81661 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 23 Aug 2019 23:57:35 +0200 Subject: [PATCH 7547/8469] add changelog entry --- changelog.d/1829.change.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/1829.change.rst diff --git a/changelog.d/1829.change.rst b/changelog.d/1829.change.rst new file mode 100644 index 0000000000..36be832ac5 --- /dev/null +++ b/changelog.d/1829.change.rst @@ -0,0 +1,3 @@ +Update handling of wheels compatibility tags: +* add support for manylinux2010 +* fix use of removed 'm' ABI flag in Python 3.8 on Windows From b5a9209cd2a3882204e0f9c9158a4a4d1ebf5e9b Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 14 Aug 2019 02:01:37 +0200 Subject: [PATCH 7548/8469] docs: drop ez_setup documentation and related references --- changelog.d/1862.doc.rst | 1 + docs/easy_install.txt | 4 +- docs/ez_setup.txt | 195 --------------------------------------- docs/setuptools.txt | 29 +----- 4 files changed, 4 insertions(+), 225 deletions(-) create mode 100644 changelog.d/1862.doc.rst delete mode 100644 docs/ez_setup.txt diff --git a/changelog.d/1862.doc.rst b/changelog.d/1862.doc.rst new file mode 100644 index 0000000000..b71583ba37 --- /dev/null +++ b/changelog.d/1862.doc.rst @@ -0,0 +1 @@ +Drop ez_setup documentation: deprecated for some time (last updated in 2016), and still relying on easy_install (deprecated too). diff --git a/docs/easy_install.txt b/docs/easy_install.txt index aa11f89083..e247d8fd76 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -317,8 +317,8 @@ Note that instead of changing your ``PATH`` to include the Python scripts directory, you can also retarget the installation location for scripts so they go on a directory that's already on the ``PATH``. For more information see `Command-Line Options`_ and `Configuration Files`_. During installation, -pass command line options (such as ``--script-dir``) to -``ez_setup.py`` to control where ``easy_install.exe`` will be installed. +pass command line options (such as ``--script-dir``) to to control where +scripts will be installed. Windows Executable Launcher diff --git a/docs/ez_setup.txt b/docs/ez_setup.txt deleted file mode 100644 index 0126fee307..0000000000 --- a/docs/ez_setup.txt +++ /dev/null @@ -1,195 +0,0 @@ -:orphan: - -``ez_setup`` distribution guide -=============================== - -Using ``setuptools``... Without bundling it! ---------------------------------------------- - -.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. - -.. _ez_setup.py: https://bootstrap.pypa.io/ez_setup.py - -.. _EasyInstall Installation Instructions: easy_install.html - -.. _Custom Installation Locations: easy_install.html - -Your users might not have ``setuptools`` installed on their machines, or even -if they do, it might not be the right version. Fixing this is easy; just -download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` -script. (Be sure to add it to your revision control system, too.) Then add -these two lines to the very top of your setup script, before the script imports -anything from setuptools: - -.. code-block:: python - - import ez_setup - ez_setup.use_setuptools() - -That's it. The ``ez_setup`` module will automatically download a matching -version of ``setuptools`` from PyPI, if it isn't present on the target system. -Whenever you install an updated version of setuptools, you should also update -your projects' ``ez_setup.py`` files, so that a matching version gets installed -on the target machine(s). - -(By the way, if you need to distribute a specific version of ``setuptools``, -you can specify the exact version and base download URL as parameters to the -``use_setuptools()`` function. See the function's docstring for details.) - - -What Your Users Should Know ---------------------------- - -In general, a setuptools-based project looks just like any distutils-based -project -- as long as your users have an internet connection and are installing -to ``site-packages``, that is. But for some users, these conditions don't -apply, and they may become frustrated if this is their first encounter with -a setuptools-based project. To keep these users happy, you should review the -following topics in your project's installation instructions, if they are -relevant to your project and your target audience isn't already familiar with -setuptools and ``easy_install``. - -Network Access - If your project is using ``ez_setup``, you should inform users of the - need to either have network access, or to preinstall the correct version of - setuptools using the `EasyInstall installation instructions`_. Those - instructions also have tips for dealing with firewalls as well as how to - manually download and install setuptools. - -Custom Installation Locations - You should inform your users that if they are installing your project to - somewhere other than the main ``site-packages`` directory, they should - first install setuptools using the instructions for `Custom Installation - Locations`_, before installing your project. - -Your Project's Dependencies - If your project depends on other projects that may need to be downloaded - from PyPI or elsewhere, you should list them in your installation - instructions, or tell users how to find out what they are. While most - users will not need this information, any users who don't have unrestricted - internet access may have to find, download, and install the other projects - manually. (Note, however, that they must still install those projects - using ``easy_install``, or your project will not know they are installed, - and your setup script will try to download them again.) - - If you want to be especially friendly to users with limited network access, - you may wish to build eggs for your project and its dependencies, making - them all available for download from your site, or at least create a page - with links to all of the needed eggs. In this way, users with limited - network access can manually download all the eggs to a single directory, - then use the ``-f`` option of ``easy_install`` to specify the directory - to find eggs in. Users who have full network access can just use ``-f`` - with the URL of your download page, and ``easy_install`` will find all the - needed eggs using your links directly. This is also useful when your - target audience isn't able to compile packages (e.g. most Windows users) - and your package or some of its dependencies include C code. - -Revision Control System Users and Co-Developers - Users and co-developers who are tracking your in-development code using - a revision control system should probably read this manual's sections - regarding such development. Alternately, you may wish to create a - quick-reference guide containing the tips from this manual that apply to - your particular situation. For example, if you recommend that people use - ``setup.py develop`` when tracking your in-development code, you should let - them know that this needs to be run after every update or commit. - - Similarly, if you remove modules or data files from your project, you - should remind them to run ``setup.py clean --all`` and delete any obsolete - ``.pyc`` or ``.pyo``. (This tip applies to the distutils in general, not - just setuptools, but not everybody knows about them; be kind to your users - by spelling out your project's best practices rather than leaving them - guessing.) - -Creating System Packages - Some users want to manage all Python packages using a single package - manager, and sometimes that package manager isn't ``easy_install``! - Setuptools currently supports ``bdist_rpm``, ``bdist_wininst``, and - ``bdist_dumb`` formats for system packaging. If a user has a locally- - installed "bdist" packaging tool that internally uses the distutils - ``install`` command, it should be able to work with ``setuptools``. Some - examples of "bdist" formats that this should work with include the - ``bdist_nsi`` and ``bdist_msi`` formats for Windows. - - However, packaging tools that build binary distributions by running - ``setup.py install`` on the command line or as a subprocess will require - modification to work with setuptools. They should use the - ``--single-version-externally-managed`` option to the ``install`` command, - combined with the standard ``--root`` or ``--record`` options. - See the `install command`_ documentation below for more details. The - ``bdist_deb`` command is an example of a command that currently requires - this kind of patching to work with setuptools. - - Please note that building system packages may require you to install - some system software, for example ``bdist_rpm`` requires the ``rpmbuild`` - command to be installed. - - If you or your users have a problem building a usable system package for - your project, please report the problem via the mailing list so that - either the "bdist" tool in question or setuptools can be modified to - resolve the issue. - -Your users might not have ``setuptools`` installed on their machines, or even -if they do, it might not be the right version. Fixing this is easy; just -download `ez_setup.py`_, and put it in the same directory as your ``setup.py`` -script. (Be sure to add it to your revision control system, too.) Then add -these two lines to the very top of your setup script, before the script imports -anything from setuptools: - -.. code-block:: python - - import ez_setup - ez_setup.use_setuptools() - -That's it. The ``ez_setup`` module will automatically download a matching -version of ``setuptools`` from PyPI, if it isn't present on the target system. -Whenever you install an updated version of setuptools, you should also update -your projects' ``ez_setup.py`` files, so that a matching version gets installed -on the target machine(s). - -(By the way, if you need to distribute a specific version of ``setuptools``, -you can specify the exact version and base download URL as parameters to the -``use_setuptools()`` function. See the function's docstring for details.) - -.. _install command: - -``install`` - Run ``easy_install`` or old-style installation -============================================================ - -The setuptools ``install`` command is basically a shortcut to run the -``easy_install`` command on the current project. However, for convenience -in creating "system packages" of setuptools-based projects, you can also -use this option: - -``--single-version-externally-managed`` - This boolean option tells the ``install`` command to perform an "old style" - installation, with the addition of an ``.egg-info`` directory so that the - installed project will still have its metadata available and operate - normally. If you use this option, you *must* also specify the ``--root`` - or ``--record`` options (or both), because otherwise you will have no way - to identify and remove the installed files. - -This option is automatically in effect when ``install`` is invoked by another -distutils command, so that commands like ``bdist_wininst`` and ``bdist_rpm`` -will create system packages of eggs. It is also automatically in effect if -you specify the ``--root`` option. - - -``install_egg_info`` - Install an ``.egg-info`` directory in ``site-packages`` -============================================================================== - -Setuptools runs this command as part of ``install`` operations that use the -``--single-version-externally-managed`` options. You should not invoke it -directly; it is documented here for completeness and so that distutils -extensions such as system package builders can make use of it. This command -has only one option: - -``--install-dir=DIR, -d DIR`` - The parent directory where the ``.egg-info`` directory will be placed. - Defaults to the same as the ``--install-dir`` option specified for the - ``install_lib`` command, which is usually the system ``site-packages`` - directory. - -This command assumes that the ``egg_info`` command has been given valid options -via the command line or ``setup.cfg``, as it will invoke the ``egg_info`` -command and use its options to locate the project's source ``.egg-info`` -directory. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 26a3044e82..ba6b170a11 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -8,14 +8,7 @@ distribute Python packages, especially ones that have dependencies on other packages. Packages built and distributed using ``setuptools`` look to the user like -ordinary Python packages based on the ``distutils``. Your users don't need to -install or even know about setuptools in order to use them, and you don't -have to include the entire setuptools package in your distributions. By -including just a single `bootstrap module`_ (a 12K .py file), your package will -automatically download and install ``setuptools`` if the user is building your -package from source and doesn't have a suitable version already installed. - -.. _bootstrap module: https://bootstrap.pypa.io/ez_setup.py +ordinary Python packages based on the ``distutils``. Feature Highlights: @@ -62,8 +55,6 @@ Feature Highlights: .. contents:: **Table of Contents** -.. _ez_setup.py: `bootstrap module`_ - ----------------- Developer's Guide @@ -596,10 +587,6 @@ Python must be available via the ``PATH`` environment variable, under its "long" name. That is, if the egg is built for Python 2.3, there must be a ``python2.3`` executable present in a directory on ``PATH``. -This feature is primarily intended to support ez_setup the installation of -setuptools itself on non-Windows platforms, but may also be useful for other -projects as well. - IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or invoked via symlinks. They *must* be invoked using their original filename, in order to ensure that, once running, ``pkg_resources`` will know what project @@ -1263,20 +1250,6 @@ To install your newly uploaded package ``example_pkg``, you can use pip:: If you have issues at any point, please refer to `Packaging project tutorials`_ for clarification. -Distributing legacy ``setuptools`` projects using ez_setup.py -------------------------------------------------------------- - -.. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. - -Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is -deprecated in favor of PIP. Please consider migrating to using pip and twine based -distribution. - -However, if you still have any ``ez_setup`` based packages, documentation for -ez_setup based distributions can be found at `ez_setup distribution guide`_. - -.. _ez_setup distribution guide: ez_setup.html - Setting the ``zip_safe`` flag ----------------------------- From 6a73945462a7e73168be53e377e4110a5dc89fb9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 14 Aug 2019 00:49:50 +0200 Subject: [PATCH 7549/8469] tests: drop (easy_install based) manual tests --- tests/manual_test.py | 100 ------------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 tests/manual_test.py diff --git a/tests/manual_test.py b/tests/manual_test.py deleted file mode 100644 index 99db4b0143..0000000000 --- a/tests/manual_test.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env python - -import sys -import os -import shutil -import tempfile -import subprocess -from distutils.command.install import INSTALL_SCHEMES -from string import Template - -from setuptools.extern.six.moves import urllib - - -def _system_call(*args): - assert subprocess.call(args) == 0 - - -def tempdir(func): - def _tempdir(*args, **kwargs): - test_dir = tempfile.mkdtemp() - old_dir = os.getcwd() - os.chdir(test_dir) - try: - return func(*args, **kwargs) - finally: - os.chdir(old_dir) - shutil.rmtree(test_dir) - - return _tempdir - - -SIMPLE_BUILDOUT = """\ -[buildout] - -parts = eggs - -[eggs] -recipe = zc.recipe.egg - -eggs = - extensions -""" - -BOOTSTRAP = 'http://downloads.buildout.org/1/bootstrap.py' -PYVER = sys.version.split()[0][:3] - -_VARS = {'base': '.', - 'py_version_short': PYVER} - -scheme = 'nt' if sys.platform == 'win32' else 'unix_prefix' -PURELIB = INSTALL_SCHEMES[scheme]['purelib'] - - -@tempdir -def test_virtualenv(): - """virtualenv with setuptools""" - purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) - _system_call('virtualenv', '--no-site-packages', '.') - _system_call('bin/easy_install', 'setuptools==dev') - # linux specific - site_pkg = os.listdir(purelib) - site_pkg.sort() - assert 'setuptools' in site_pkg[0] - easy_install = os.path.join(purelib, 'easy-install.pth') - with open(easy_install) as f: - res = f.read() - assert 'setuptools' in res - - -@tempdir -def test_full(): - """virtualenv + pip + buildout""" - _system_call('virtualenv', '--no-site-packages', '.') - _system_call('bin/easy_install', '-q', 'setuptools==dev') - _system_call('bin/easy_install', '-qU', 'setuptools==dev') - _system_call('bin/easy_install', '-q', 'pip') - _system_call('bin/pip', 'install', '-q', 'zc.buildout') - - with open('buildout.cfg', 'w') as f: - f.write(SIMPLE_BUILDOUT) - - with open('bootstrap.py', 'w') as f: - f.write(urllib.request.urlopen(BOOTSTRAP).read()) - - _system_call('bin/python', 'bootstrap.py') - _system_call('bin/buildout', '-q') - eggs = os.listdir('eggs') - eggs.sort() - assert len(eggs) == 3 - assert eggs[1].startswith('setuptools') - del eggs[1] - assert eggs == [ - 'extensions-0.3-py2.6.egg', - 'zc.recipe.egg-1.2.2-py2.6.egg', - ] - - -if __name__ == '__main__': - test_virtualenv() - test_full() From 4c0e204413e6d2c33662a02c73a0ad13d81af9e5 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 8 Oct 2019 19:32:09 +0200 Subject: [PATCH 7550/8469] doc: drop most references to EasyInstall --- changelog.d/1868.doc.rst | 1 + docs/development.txt | 2 +- docs/formats.txt | 7 +- docs/pkg_resources.txt | 14 +-- docs/setuptools.txt | 178 ++++++++++----------------------------- 5 files changed, 54 insertions(+), 148 deletions(-) create mode 100644 changelog.d/1868.doc.rst diff --git a/changelog.d/1868.doc.rst b/changelog.d/1868.doc.rst new file mode 100644 index 0000000000..82283d7aea --- /dev/null +++ b/changelog.d/1868.doc.rst @@ -0,0 +1 @@ +Drop most documentation references to (deprecated) EasyInstall. diff --git a/docs/development.txt b/docs/development.txt index 455f038afa..28e653fea9 100644 --- a/docs/development.txt +++ b/docs/development.txt @@ -7,7 +7,7 @@ Authority (PyPA) and led by Jason R. Coombs. This document describes the process by which Setuptools is developed. This document assumes the reader has some passing familiarity with -*using* setuptools, the ``pkg_resources`` module, and EasyInstall. It +*using* setuptools, the ``pkg_resources`` module, and pip. It does not attempt to explain basic concepts like inter-project dependencies, nor does it contain detailed lexical syntax for most file formats. Neither does it explain concepts like "namespace diff --git a/docs/formats.txt b/docs/formats.txt index a182eb99fc..6c0456de29 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -299,11 +299,8 @@ specified by the ``setup_requires`` parameter to the Distribution. A list of dependency URLs, one per line, as specified using the ``dependency_links`` keyword to ``setup()``. These may be direct download URLs, or the URLs of web pages containing direct download -links, and will be used by EasyInstall to find dependencies, as though -the user had manually provided them via the ``--find-links`` command -line option. Please see the setuptools manual and EasyInstall manual -for more information on specifying this option, and for information on -how EasyInstall processes ``--find-links`` URLs. +links. Please see the setuptools manual for more information on +specifying this option. ``depends.txt`` -- Obsolete, do not create! diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 806f1b1468..b887a9239f 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -245,8 +245,8 @@ abbreviation for ``pkg_resources.working_set.require()``: interactive interpreter hacking than for production use. If you're creating an actual library or application, it's strongly recommended that you create a "setup.py" script using ``setuptools``, and declare all your requirements - there. That way, tools like EasyInstall can automatically detect what - requirements your package has, and deal with them accordingly. + there. That way, tools like pip can automatically detect what requirements + your package has, and deal with them accordingly. Note that calling ``require('SomePackage')`` will not install ``SomePackage`` if it isn't already present. If you need to do this, you @@ -611,9 +611,9 @@ Requirements Parsing or activation of both Report-O-Rama and any libraries it needs in order to provide PDF support. For example, you could use:: - easy_install.py Report-O-Rama[PDF] + pip install Report-O-Rama[PDF] - To install the necessary packages using the EasyInstall program, or call + To install the necessary packages using pip, or call ``pkg_resources.require('Report-O-Rama[PDF]')`` to add the necessary distributions to sys.path at runtime. @@ -1843,9 +1843,9 @@ History because it isn't necessarily a filesystem path (and hasn't been for some time now). The ``location`` of ``Distribution`` objects in the filesystem should always be normalized using ``pkg_resources.normalize_path()``; all - of the setuptools and EasyInstall code that generates distributions from - the filesystem (including ``Distribution.from_filename()``) ensure this - invariant, but if you use a more generic API like ``Distribution()`` or + of the setuptools' code that generates distributions from the filesystem + (including ``Distribution.from_filename()``) ensure this invariant, but if + you use a more generic API like ``Distribution()`` or ``Distribution.from_location()`` you should take care that you don't create a distribution with an un-normalized filesystem path. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 26a3044e82..8468c3ad03 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -19,12 +19,6 @@ package from source and doesn't have a suitable version already installed. Feature Highlights: -* Automatically find/download/install/upgrade dependencies at build time using - the `EasyInstall tool `_, - which supports downloading via HTTP, FTP, Subversion, and SourceForge, and - automatically scans web pages linked from PyPI to find download links. (It's - the closest thing to CPAN currently available for Python.) - * Create `Python Eggs `_ - a single-file importable distribution format @@ -73,10 +67,6 @@ Developer's Guide Installing ``setuptools`` ========================= -.. _EasyInstall Installation Instructions: easy_install.html - -.. _Custom Installation Locations: easy_install.html - .. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ To install the latest version of setuptools, use:: @@ -160,7 +150,7 @@ Specifying Your Project's Version Setuptools can work well with most versioning schemes; there are, however, a few special things to watch out for, in order to ensure that setuptools and -EasyInstall can always tell what version of your package is newer than another +other tools can always tell what version of your package is newer than another version. Knowing these things will also help you correctly specify what versions of other projects your project depends on. @@ -301,11 +291,10 @@ unless you need the associated ``setuptools`` feature. ``setup_requires`` A string or list of strings specifying what other distributions need to be present in order for the *setup script* to run. ``setuptools`` will - attempt to obtain these (even going so far as to download them using - ``EasyInstall``) before processing the rest of the setup script or commands. - This argument is needed if you are using distutils extensions as part of - your build process; for example, extensions that process setup() arguments - and turn them into EGG-INFO metadata files. + attempt to obtain these before processing the rest of the setup script or + commands. This argument is needed if you are using distutils extensions as + part of your build process; for example, extensions that process setup() + arguments and turn them into EGG-INFO metadata files. (Note: projects listed in ``setup_requires`` will NOT be automatically installed on the system where the setup script is being run. They are @@ -318,8 +307,7 @@ unless you need the associated ``setuptools`` feature. A list of strings naming URLs to be searched when satisfying dependencies. These links will be used if needed to install packages specified by ``setup_requires`` or ``tests_require``. They will also be written into - the egg's metadata for use by tools like EasyInstall to use when installing - an ``.egg`` file. + the egg's metadata for use during install by tools that support them. ``namespace_packages`` A list of strings naming the project's "namespace packages". A namespace @@ -351,8 +339,7 @@ unless you need the associated ``setuptools`` feature. needed to install it, you can use this option to specify them. It should be a string or list of strings specifying what other distributions need to be present for the package's tests to run. When you run the ``test`` - command, ``setuptools`` will attempt to obtain these (even going - so far as to download them using ``EasyInstall``). Note that these + command, ``setuptools`` will attempt to obtain these. Note that these required projects will *not* be installed on the system where the tests are run, but only downloaded to the project's setup directory if they're not already installed locally. @@ -552,11 +539,12 @@ script called ``baz``, you might do something like this:: ) When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or by using EasyInstall), a set of ``foo``, -``bar``, and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. The functions you specify are called -with no arguments, and their return value is passed to ``sys.exit()``, so you -can return an errorlevel or message to print to stderr. +install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, +and ``baz`` scripts will be installed that import ``main_func`` and +``some_func`` from the specified modules. The functions you specify are +called with no arguments, and their return value is passed to +``sys.exit()``, so you can return an errorlevel or message to print to +stderr. On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The @@ -613,7 +601,7 @@ Declaring Dependencies ``setuptools`` supports automatically installing dependencies when a package is installed, and including information about dependencies in Python Eggs (so that -package management tools like EasyInstall can use the information). +package management tools like pip can use the information). ``setuptools`` and ``pkg_resources`` use a common syntax for specifying a project's required dependencies. This syntax consists of a project's PyPI @@ -652,10 +640,9 @@ requirement in a string, each requirement must begin on a new line. This has three effects: -1. When your project is installed, either by using EasyInstall, ``setup.py - install``, or ``setup.py develop``, all of the dependencies not already - installed will be located (via PyPI), downloaded, built (if necessary), - and installed. +1. When your project is installed, either by using pip, ``setup.py install``, + or ``setup.py develop``, all of the dependencies not already installed will + be located (via PyPI), downloaded, built (if necessary), and installed. 2. Any scripts in your project will be installed with wrappers that verify the availability of the specified dependencies at runtime, and ensure that @@ -729,9 +716,8 @@ This will do a checkout (or a clone, in Git and Mercurial parlance) to a temporary folder and run ``setup.py bdist_egg``. The ``dependency_links`` option takes the form of a list of URL strings. For -example, the below will cause EasyInstall to search the specified page for -eggs or source distributions, if the package's dependencies aren't already -installed:: +example, this will cause a search of the specified page for eggs or source +distributions, if the package's dependencies aren't already installed:: setup( ... @@ -771,7 +757,7 @@ names of "extra" features, to strings or lists of strings describing those features' requirements. These requirements will *not* be automatically installed unless another package depends on them (directly or indirectly) by including the desired "extras" in square brackets after the associated project -name. (Or if the extras were listed in a requirement spec on the EasyInstall +name. (Or if the extras were listed in a requirement spec on the "pip install" command line.) Extras can be used by a project's `entry points`_ to specify dynamic @@ -1186,13 +1172,12 @@ preferred way of working (as opposed to using a common independent staging area or the site-packages directory). To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install`` or the EasyInstall tool, except that it doesn't actually -install anything. Instead, it creates a special ``.egg-link`` file in the -deployment directory, that links to your project's source code. And, if your -deployment directory is Python's ``site-packages`` directory, it will also -update the ``easy-install.pth`` file to include your project's source code, -thereby making it available on ``sys.path`` for all programs using that Python -installation. +``setup.py install``, except that it doesn't actually install anything. +Instead, it creates a special ``.egg-link`` file in the deployment directory, +that links to your project's source code. And, if your deployment directory is +Python's ``site-packages`` directory, it will also update the +``easy-install.pth`` file to include your project's source code, thereby making +it available on ``sys.path`` for all programs using that Python installation. If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` will not link directly to your source code when run under Python 3, since @@ -1312,20 +1297,14 @@ you've checked over all the warnings it issued, and you are either satisfied it doesn't work, you can always change it to ``False``, which will force ``setuptools`` to install your project as a directory rather than as a zipfile. -Of course, the end-user can still override either decision, if they are using -EasyInstall to install your package. And, if you want to override for testing -purposes, you can just run ``setup.py easy_install --zip-ok .`` or ``setup.py -easy_install --always-unzip .`` in your project directory. to install the -package as a zipfile or directory, respectively. - In the future, as we gain more experience with different packages and become more satisfied with the robustness of the ``pkg_resources`` runtime, the "zip safety" analysis may become less conservative. However, we strongly recommend that you determine for yourself whether your project functions correctly when installed as a zipfile, correct any problems if you can, and then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` -flag, so that it will not be necessary for ``bdist_egg`` or ``EasyInstall`` to -try to guess whether your project can work as a zipfile. +flag, so that it will not be necessary for ``bdist_egg`` to try to guess +whether your project can work as a zipfile. .. _Namespace Packages: @@ -1439,9 +1418,9 @@ to generate a daily build or snapshot for. See the section below on the (Also, before you release your project, be sure to see the section above on `Specifying Your Project's Version`_ for more information about how pre- and -post-release tags affect how setuptools and EasyInstall interpret version -numbers. This is important in order to make sure that dependency processing -tools will know which versions of your project are newer than others.) +post-release tags affect how version numbers are interpreted. This is +important in order to make sure that dependency processing tools will know +which versions of your project are newer than others.) Finally, if you are creating builds frequently, and either building them in a downloadable location or are copying them to a distribution server, you should @@ -1497,58 +1476,6 @@ all practical purposes, you'll probably use only the ``--formats`` option, if you use any option at all. -Making your package available for EasyInstall ---------------------------------------------- - -There may be reasons why you don't want to upload distributions to -PyPI, and just want your existing distributions (or perhaps a Subversion -checkout) to be used instead. - -There are three ``setup()`` arguments that affect EasyInstall: - -``url`` and ``download_url`` - These become links on your project's PyPI page. EasyInstall will examine - them to see if they link to a package ("primary links"), or whether they are - HTML pages. If they're HTML pages, EasyInstall scans all HREF's on the - page for primary links - -``long_description`` - EasyInstall will check any URLs contained in this argument to see if they - are primary links. - -A URL is considered a "primary link" if it is a link to a .tar.gz, .tgz, .zip, -.egg, .egg.zip, .tar.bz2, or .exe file, or if it has an ``#egg=project`` or -``#egg=project-version`` fragment identifier attached to it. EasyInstall -attempts to determine a project name and optional version number from the text -of a primary link *without* downloading it. When it has found all the primary -links, EasyInstall will select the best match based on requested version, -platform compatibility, and other criteria. - -So, if your ``url`` or ``download_url`` point either directly to a downloadable -source distribution, or to HTML page(s) that have direct links to such, then -EasyInstall will be able to locate downloads automatically. If you want to -make Subversion checkouts available, then you should create links with either -``#egg=project`` or ``#egg=project-version`` added to the URL. You should -replace ``project`` and ``version`` with the values they would have in an egg -filename. (Be sure to actually generate an egg and then use the initial part -of the filename, rather than trying to guess what the escaped form of the -project name and version number will be.) - -Note that Subversion checkout links are of lower precedence than other kinds -of distributions, so EasyInstall will not select a Subversion checkout for -downloading unless it has a version included in the ``#egg=`` suffix, and -it's a higher version than EasyInstall has seen in any other links for your -project. - -As a result, it's a common practice to use mark checkout URLs with a version of -"dev" (i.e., ``#egg=projectname-dev``), so that users can do something like -this:: - - easy_install --editable projectname==dev - -in order to check out the in-development version of ``projectname``. - - Making "Official" (Non-Snapshot) Releases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1803,9 +1730,9 @@ Here are some of the options that the ``develop`` command accepts. Note that they affect the project's dependencies as well as the project itself, so if you have dependencies that need to be installed and you use ``--exclude-scripts`` (for example), the dependencies' scripts will not be installed either! For -this reason, you may want to use EasyInstall to install the project's -dependencies before using the ``develop`` command, if you need finer control -over the installation options for dependencies. +this reason, you may want to use pip to install the project's dependencies +before using the ``develop`` command, if you need finer control over the +installation options for dependencies. ``--uninstall, -u`` Un-deploy the current project. You may use the ``--install-dir`` or ``-d`` @@ -1815,10 +1742,10 @@ over the installation options for dependencies. staging area is Python's ``site-packages`` directory. Note that this option currently does *not* uninstall script wrappers! You - must uninstall them yourself, or overwrite them by using EasyInstall to - activate a different version of the package. You can also avoid installing - script wrappers in the first place, if you use the ``--exclude-scripts`` - (aka ``-x``) option when you run ``develop`` to deploy the project. + must uninstall them yourself, or overwrite them by using pip to install a + different version of the package. You can also avoid installing script + wrappers in the first place, if you use the ``--exclude-scripts`` (aka + ``-x``) option when you run ``develop`` to deploy the project. ``--multi-version, -m`` "Multi-version" mode. Specifying this option prevents ``develop`` from @@ -1827,8 +1754,8 @@ over the installation options for dependencies. removed upon successful deployment. In multi-version mode, no specific version of the package is available for importing, unless you use ``pkg_resources.require()`` to put it on ``sys.path``, or you are running - a wrapper script generated by ``setuptools`` or EasyInstall. (In which - case the wrapper script calls ``require()`` for you.) + a wrapper script generated by ``setuptools``. (In which case the wrapper + script calls ``require()`` for you.) Note that if you install to a directory other than ``site-packages``, this option is automatically in effect, because ``.pth`` files can only be @@ -1881,25 +1808,6 @@ files), the ``develop`` command will use them as defaults, unless you override them in a ``[develop]`` section or on the command line. -``easy_install`` - Find and install packages -============================================ - -This command runs the `EasyInstall tool -`_ for you. It is exactly -equivalent to running the ``easy_install`` command. All command line arguments -following this command are consumed and not processed further by the distutils, -so this must be the last command listed on the command line. Please see -the EasyInstall documentation for the options reference and usage examples. -Normally, there is no reason to use this command via the command line, as you -can just use ``easy_install`` directly. It's only listed here so that you know -it's a distutils command, which means that you can: - -* create command aliases that use it, -* create distutils extensions that invoke it as a subcommand, and -* configure options for it in your ``setup.cfg`` or other distutils config - files. - - .. _egg_info: ``egg_info`` - Create egg metadata and set build tags @@ -1958,9 +1866,9 @@ added in the following order: (Note: Because these options modify the version number used for source and binary distributions of your project, you should first make sure that you know how the resulting version numbers will be interpreted by automated tools -like EasyInstall. See the section above on `Specifying Your Project's -Version`_ for an explanation of pre- and post-release tags, as well as tips on -how to choose and verify a versioning scheme for your your project.) +like pip. See the section above on `Specifying Your Project's Version`_ for an +explanation of pre- and post-release tags, as well as tips on how to choose and +verify a versioning scheme for your your project.) For advanced uses, there is one other option that can be set, to change the location of the project's ``.egg-info`` directory. Commands that need to find From 1410d87f8abb5bb28bf97f53219ee0db7b6340a3 Mon Sep 17 00:00:00 2001 From: isidentical Date: Fri, 4 Oct 2019 19:18:54 +0300 Subject: [PATCH 7551/8469] Upgrade setuptools.depends to importlib from depracated imp --- setuptools/depends.py | 89 +++++++++++++++++++++++----- setuptools/tests/test_integration.py | 1 + 2 files changed, 76 insertions(+), 14 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index 45e7052d8d..97f0ed9dae 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,11 +1,23 @@ import sys -import imp import marshal from distutils.version import StrictVersion -from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN +from setuptools.extern import six from .py33compat import Bytecode +if six.PY2: + import imp + from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN +else: + import os.path + from importlib.util import find_spec, spec_from_loader + from importlib.machinery import SOURCE_SUFFIXES, BYTECODE_SUFFIXES, EXTENSION_SUFFIXES, BuiltinImporter, FrozenImporter + PY_SOURCE = 1 + PY_COMPILED = 2 + C_EXTENSION = 3 + C_BUILTIN = 6 + PY_FROZEN = 7 + __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' @@ -81,21 +93,59 @@ def is_current(self, paths=None): def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" + if six.PY3: + spec = find_spec(module, paths) + if spec is None: + raise ImportError("Can't find %s" % module) + if not spec.has_location and hasattr(spec, 'submodule_search_locations'): + spec = spec_from_loader('__init__.py', spec.loader) + + kind = -1 + file = None + static = isinstance(spec.loader, type) + if spec.origin == 'frozen' or static and issubclass(spec.loader, FrozenImporter): + kind = PY_FROZEN + path = None # imp compabilty + suffix = mode = '' # imp compability + elif spec.origin == 'built-in' or static and issubclass(spec.loader, BuiltinImporter): + kind = C_BUILTIN + path = None # imp compabilty + suffix = mode = '' # imp compability + elif spec.has_location: + frozen = False + path = spec.origin + suffix = os.path.splitext(path)[1] + mode = 'r' if suffix in SOURCE_SUFFIXES else 'rb' + + if suffix in SOURCE_SUFFIXES: + kind = PY_SOURCE + elif suffix in BYTECODE_SUFFIXES: + kind = PY_COMPILED + elif suffix in EXTENSION_SUFFIXES: + kind = C_EXTENSION + + if kind in {PY_SOURCE, PY_COMPILED}: + file = open(path, mode) + else: + path = None + suffix = mode= '' - parts = module.split('.') + return file, path, (suffix, mode, kind) - while parts: - part = parts.pop(0) - f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) + else: + parts = module.split('.') + while parts: + part = parts.pop(0) + f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) - if kind == PKG_DIRECTORY: - parts = parts or ['__init__'] - paths = [path] + if kind == PKG_DIRECTORY: + parts = parts or ['__init__'] + paths = [path] - elif parts: - raise ImportError("Can't find %r in %s" % (parts, module)) + elif parts: + raise ImportError("Can't find %r in %s" % (parts, module)) - return info + return info def get_module_constant(module, symbol, default=-1, paths=None): @@ -111,18 +161,29 @@ def get_module_constant(module, symbol, default=-1, paths=None): # Module doesn't exist return None + if six.PY3: + spec = find_spec(module, paths) + if hasattr(spec, 'submodule_search_locations'): + spec = spec_from_loader('__init__.py', spec.loader) + try: if kind == PY_COMPILED: f.read(8) # skip magic & date code = marshal.load(f) elif kind == PY_FROZEN: - code = imp.get_frozen_object(module) + if six.PY2: + code = imp.get_frozen_object(module) + else: + code = spec.loader.get_code(module) elif kind == PY_SOURCE: code = compile(f.read(), path, 'exec') else: # Not something we can parse; we'll have to import it. :( if module not in sys.modules: - imp.load_module(module, f, path, (suffix, mode, kind)) + if six.PY2: + imp.load_module(module, f, path, (suffix, mode, kind)) + else: + sys.modules[module] = module_from_spec(spec) return getattr(sys.modules[module], symbol, None) finally: diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 1e13218899..1c0b2b18bb 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -143,6 +143,7 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): 'tests_require', 'python_requires', 'install_requires', + 'long_description_content_type', ] assert not match or match.group(1).strip('"\'') in allowed_unknowns From 4c22a6ca57753d3b5604a90b61a0c6c5efe53a1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 18 Oct 2019 20:37:42 -0400 Subject: [PATCH 7552/8469] Add new hook 'setuptools.finalize_distribution_options' for plugins like 'setuptools_scm' to alter distribution options. --- setuptools/dist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 2e5ad4bd68..987d684e09 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -728,6 +728,10 @@ def finalize_options(self): if self.features: self._set_global_opts_from_features() + hook_key = 'setuptools.finalize_distribution_options' + for ep in pkg_resources.iter_entry_points(hook_key): + ep.load()(self) + for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): value = getattr(self, ep.name, None) if value is not None: From d89682fcba90595d5d6aaf071d6efcc815bceba8 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 21 Oct 2019 16:49:13 -0700 Subject: [PATCH 7553/8469] Change coding cookie to use utf-8 (lowercase) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While perfectly valid, the encoding 'UTF-8' (uppercase) is not recognized by the Emacs MULE system. As such, it displays the following warning when opening a file with it used as an encoding cookie: Warning (mule): Invalid coding system ‘UTF-8’ is specified for the current buffer/file by the :coding tag. It is highly recommended to fix it before writing to a file. Some discussion of this can be found at: https://stackoverflow.com/questions/14031724/how-to-make-emacs-accept-utf-8-uppercase-encoding While the post does offer a workaround for Emacs users, rather than ask all to implement it, use the more typical utf-8 (lowercase). --- setuptools/tests/test_config.py | 2 +- setuptools/tests/test_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 1b94a58689..69d8d00db3 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,4 +1,4 @@ -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- from __future__ import unicode_literals import contextlib diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index faaa6ba90a..3415913b42 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,4 +1,4 @@ -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- from __future__ import unicode_literals From cd84510713ada48bf33d4efa749c2952e3fc1a49 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 19 Oct 2019 08:39:30 -0700 Subject: [PATCH 7554/8469] Deprecate the test command Provide a warning to users. Suggest using tox as an alternative generic entry point. Refs #1684 --- changelog.d/1878.change.rst | 1 + docs/setuptools.txt | 13 +++++++++ setuptools/command/test.py | 10 ++++++- setuptools/tests/test_test.py | 50 +++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1878.change.rst diff --git a/changelog.d/1878.change.rst b/changelog.d/1878.change.rst new file mode 100644 index 0000000000..0774b5d3e5 --- /dev/null +++ b/changelog.d/1878.change.rst @@ -0,0 +1 @@ +Formally deprecated the ``test`` command, with the recommendation that users migrate to ``tox``. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 26a3044e82..f69b75c249 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -346,6 +346,8 @@ unless you need the associated ``setuptools`` feature. specified test suite, e.g. via ``setup.py test``. See the section on the `test`_ command below for more details. + New in 41.5.0: Deprecated the test command. + ``tests_require`` If your project's tests need one or more additional packages besides those needed to install it, you can use this option to specify them. It should @@ -357,6 +359,8 @@ unless you need the associated ``setuptools`` feature. are run, but only downloaded to the project's setup directory if they're not already installed locally. + New in 41.5.0: Deprecated the test command. + .. _test_loader: ``test_loader`` @@ -380,6 +384,8 @@ unless you need the associated ``setuptools`` feature. as long as you use the ``tests_require`` option to ensure that the package containing the loader class is available when the ``test`` command is run. + New in 41.5.0: Deprecated the test command. + ``eager_resources`` A list of strings naming resources that should be extracted together, if any of them is needed, or if any C extensions included in the project are @@ -2142,6 +2148,11 @@ distutils configuration file the option will be added to (or removed from). ``test`` - Build package and run a unittest suite ================================================= +.. warning:: + ``test`` is deprecated and will be removed in a future version. Users + looking for a generic test entry point independent of test runner are + encouraged to use `tox `_. + When doing test-driven development, or running automated builds that need testing before they are deployed for downloading or use, it's often useful to be able to run a project's unit tests without actually deploying the project @@ -2187,6 +2198,8 @@ available: If you did not set a ``test_suite`` in your ``setup()`` call, and do not provide a ``--test-suite`` option, an error will occur. +New in 41.5.0: Deprecated the test command. + .. _upload: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 973e4eb214..c148b38d10 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -74,7 +74,7 @@ def __get__(self, obj, objtype=None): class test(Command): """Command to run unit tests after in-place build""" - description = "run unit tests after in-place build" + description = "run unit tests after in-place build (deprecated)" user_options = [ ('test-module=', 'm', "Run 'test_suite' in specified module"), @@ -214,6 +214,14 @@ def install_dists(dist): return itertools.chain(ir_d, tr_d, er_d) def run(self): + self.announce( + "WARNING: Testing via this command is deprecated and will be " + "removed in a future version. Users looking for a generic test " + "entry point independent of test runner are encouraged to use " + "tox.", + log.WARN, + ) + installed_dists = self.install_dists(self.distribution) cmd = ' '.join(self._argv) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index faaa6ba90a..382bd640e7 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals +import mock from distutils import log import os @@ -124,3 +125,52 @@ def test_test(self): cmd.run() out, err = capfd.readouterr() assert out == 'Foo\n' + + +@pytest.mark.usefixtures('sample_test') +def test_warns_deprecation(capfd): + params = dict( + name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + use_2to3=True + ) + dist = Distribution(params) + dist.script_name = 'setup.py' + cmd = test(dist) + cmd.ensure_finalized() + cmd.announce = mock.Mock() + cmd.run() + capfd.readouterr() + msg = ( + "WARNING: Testing via this command is deprecated and will be " + "removed in a future version. Users looking for a generic test " + "entry point independent of test runner are encouraged to use " + "tox." + ) + cmd.announce.assert_any_call(msg, log.WARN) + + +@pytest.mark.usefixtures('sample_test') +def test_deprecation_stderr(capfd): + params = dict( + name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + use_2to3=True + ) + dist = Distribution(params) + dist.script_name = 'setup.py' + cmd = test(dist) + cmd.ensure_finalized() + cmd.run() + out, err = capfd.readouterr() + msg = ( + "WARNING: Testing via this command is deprecated and will be " + "removed in a future version. Users looking for a generic test " + "entry point independent of test runner are encouraged to use " + "tox.\n" + ) + assert msg in err From 4069e0b536802a47c8c15ce839fd98a5f4c84620 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 21 Oct 2019 17:01:18 -0700 Subject: [PATCH 7555/8469] Remove outdated comment and suppressed exception from test_test.py The test command has not called sys.exit since commit 2c4fd43277fc477d85b50e15c37b176136676270. --- setuptools/tests/test_test.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 280c837bf8..6242a018c4 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -86,9 +86,7 @@ def test_test(capfd): dist.script_name = 'setup.py' cmd = test(dist) cmd.ensure_finalized() - # The test runner calls sys.exit - with contexts.suppress_exceptions(SystemExit): - cmd.run() + cmd.run() out, err = capfd.readouterr() assert out == 'Foo\n' @@ -120,9 +118,7 @@ def test_test(self): dist.script_name = 'setup.py' cmd = test(dist) cmd.ensure_finalized() - # The test runner calls sys.exit - with contexts.suppress_exceptions(SystemExit): - cmd.run() + cmd.run() out, err = capfd.readouterr() assert out == 'Foo\n' From e4ef537525c2b1d120497379da9484c33ea3d773 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 21 Oct 2019 17:51:26 -0700 Subject: [PATCH 7556/8469] Add a trove classifier to document support for Python 3.8 --- changelog.d/1884.doc.rst | 1 + setup.cfg | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1884.doc.rst diff --git a/changelog.d/1884.doc.rst b/changelog.d/1884.doc.rst new file mode 100644 index 0000000000..45615d5d88 --- /dev/null +++ b/changelog.d/1884.doc.rst @@ -0,0 +1 @@ +Added a trove classifier to document support for Python 3.8. diff --git a/setup.cfg b/setup.cfg index a55106a5a4..373ae8b535 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,6 +42,7 @@ classifiers = Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From 89f15f448679e2ebedb40ed348423596dc658d31 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 21 Oct 2019 17:51:26 -0700 Subject: [PATCH 7557/8469] Add Python 3.8 final to Travis test matrix --- .travis.yml | 3 ++- changelog.d/1886.misc.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1886.misc.rst diff --git a/.travis.yml b/.travis.yml index 8b7cece8b4..7088d16621 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,9 @@ jobs: - python: 3.5 - &default_py python: 3.6 + - python: 3.7 - &latest_py3 - python: 3.7 + python: 3.8 - <<: *latest_py3 env: LANG=C - python: 3.8-dev diff --git a/changelog.d/1886.misc.rst b/changelog.d/1886.misc.rst new file mode 100644 index 0000000000..5e3f2873a8 --- /dev/null +++ b/changelog.d/1886.misc.rst @@ -0,0 +1 @@ +Added Python 3.8 release to the Travis test matrix. From 2d25ca89318922e63b74c37e36d099173cf0da5a Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Sun, 27 Oct 2019 02:31:59 -0500 Subject: [PATCH 7558/8469] Remove sys.modules hack Fix #1888 (metadata accidentally not picklable), and removes a case where reimporting a vendored module results in a second copy of the same module. --- changelog.d/1890.change.rst | 1 + setuptools/extern/__init__.py | 7 ------- setuptools/tests/test_extern.py | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 changelog.d/1890.change.rst create mode 100644 setuptools/tests/test_extern.py diff --git a/changelog.d/1890.change.rst b/changelog.d/1890.change.rst new file mode 100644 index 0000000000..458d8117ec --- /dev/null +++ b/changelog.d/1890.change.rst @@ -0,0 +1 @@ +Fix vendored dependencies so importing ``setuptools.extern.some_module`` gives the same object as ``setuptools._vendor.some_module``. This makes Metadata picklable again. \ No newline at end of file diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index e8c616f910..4e79aa17ec 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -43,13 +43,6 @@ def load_module(self, fullname): __import__(extant) mod = sys.modules[extant] sys.modules[fullname] = mod - # mysterious hack: - # Remove the reference to the extant package/module - # 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, ): - del sys.modules[extant] return mod except ImportError: pass diff --git a/setuptools/tests/test_extern.py b/setuptools/tests/test_extern.py new file mode 100644 index 0000000000..3519a68073 --- /dev/null +++ b/setuptools/tests/test_extern.py @@ -0,0 +1,22 @@ +import importlib +import pickle + +from setuptools import Distribution +from setuptools.extern import ordered_set +from setuptools.tests import py3_only + + +def test_reimport_extern(): + ordered_set2 = importlib.import_module(ordered_set.__name__) + assert ordered_set is ordered_set2 + + +def test_orderedset_pickle_roundtrip(): + o1 = ordered_set.OrderedSet([1, 2, 5]) + o2 = pickle.loads(pickle.dumps(o1)) + assert o1 == o2 + + +@py3_only +def test_distribution_picklable(): + pickle.loads(pickle.dumps(Distribution())) From 19eb6bf8bd28f1b9b66288c797d67eb8da71508d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 18:26:59 -0400 Subject: [PATCH 7559/8469] Fix typo --- docs/easy_install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/easy_install.txt b/docs/easy_install.txt index e247d8fd76..544b9efd59 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -317,7 +317,7 @@ Note that instead of changing your ``PATH`` to include the Python scripts directory, you can also retarget the installation location for scripts so they go on a directory that's already on the ``PATH``. For more information see `Command-Line Options`_ and `Configuration Files`_. During installation, -pass command line options (such as ``--script-dir``) to to control where +pass command line options (such as ``--script-dir``) to control where scripts will be installed. From 6e8b1da1fb146186c52d8bdec5af969f26532ece Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 18:42:56 -0400 Subject: [PATCH 7560/8469] =?UTF-8?q?Bump=20version:=2041.4.0=20=E2=86=92?= =?UTF-8?q?=2041.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 14 ++++++++++++++ changelog.d/1811.change.rst | 1 - changelog.d/1814.change.rst | 1 - changelog.d/1824.change.rst | 1 - changelog.d/1860.doc.rst | 1 - changelog.d/1862.doc.rst | 1 - changelog.d/1868.doc.rst | 1 - changelog.d/1878.change.rst | 1 - changelog.d/1884.doc.rst | 1 - changelog.d/1886.misc.rst | 1 - setup.cfg | 2 +- 12 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 changelog.d/1811.change.rst delete mode 100644 changelog.d/1814.change.rst delete mode 100644 changelog.d/1824.change.rst delete mode 100644 changelog.d/1860.doc.rst delete mode 100644 changelog.d/1862.doc.rst delete mode 100644 changelog.d/1868.doc.rst delete mode 100644 changelog.d/1878.change.rst delete mode 100644 changelog.d/1884.doc.rst delete mode 100644 changelog.d/1886.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d6768cb8a8..aeefc8f2c6 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.4.0 +current_version = 41.5.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ecde25a571..7e9fc0f6e8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,17 @@ +v41.5.0 +------- + +* #1811: Improve Visual C++ 14.X support, mainly for Visual Studio 2017 and 2019. +* #1814: Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account. +* #1824: Fix tests when running under ``python3.10``. +* #1878: Formally deprecated the ``test`` command, with the recommendation that users migrate to ``tox``. +* #1860: Update documentation to mention the egg format is not supported by pip and dependency links support was dropped starting with pip 19.0. +* #1862: Drop ez_setup documentation: deprecated for some time (last updated in 2016), and still relying on easy_install (deprecated too). +* #1868: Drop most documentation references to (deprecated) EasyInstall. +* #1884: Added a trove classifier to document support for Python 3.8. +* #1886: Added Python 3.8 release to the Travis test matrix. + + v41.4.0 ------- diff --git a/changelog.d/1811.change.rst b/changelog.d/1811.change.rst deleted file mode 100644 index dc52c6dbbe..0000000000 --- a/changelog.d/1811.change.rst +++ /dev/null @@ -1 +0,0 @@ -Improve Visual C++ 14.X support, mainly for Visual Studio 2017 and 2019. \ No newline at end of file diff --git a/changelog.d/1814.change.rst b/changelog.d/1814.change.rst deleted file mode 100644 index c936699dd8..0000000000 --- a/changelog.d/1814.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account. diff --git a/changelog.d/1824.change.rst b/changelog.d/1824.change.rst deleted file mode 100644 index 5f60903687..0000000000 --- a/changelog.d/1824.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix tests when running under ``python3.10``. diff --git a/changelog.d/1860.doc.rst b/changelog.d/1860.doc.rst deleted file mode 100644 index f3554643fa..0000000000 --- a/changelog.d/1860.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Update documentation to mention the egg format is not supported by pip and dependency links support was dropped starting with pip 19.0. diff --git a/changelog.d/1862.doc.rst b/changelog.d/1862.doc.rst deleted file mode 100644 index b71583ba37..0000000000 --- a/changelog.d/1862.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Drop ez_setup documentation: deprecated for some time (last updated in 2016), and still relying on easy_install (deprecated too). diff --git a/changelog.d/1868.doc.rst b/changelog.d/1868.doc.rst deleted file mode 100644 index 82283d7aea..0000000000 --- a/changelog.d/1868.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Drop most documentation references to (deprecated) EasyInstall. diff --git a/changelog.d/1878.change.rst b/changelog.d/1878.change.rst deleted file mode 100644 index 0774b5d3e5..0000000000 --- a/changelog.d/1878.change.rst +++ /dev/null @@ -1 +0,0 @@ -Formally deprecated the ``test`` command, with the recommendation that users migrate to ``tox``. diff --git a/changelog.d/1884.doc.rst b/changelog.d/1884.doc.rst deleted file mode 100644 index 45615d5d88..0000000000 --- a/changelog.d/1884.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added a trove classifier to document support for Python 3.8. diff --git a/changelog.d/1886.misc.rst b/changelog.d/1886.misc.rst deleted file mode 100644 index 5e3f2873a8..0000000000 --- a/changelog.d/1886.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added Python 3.8 release to the Travis test matrix. diff --git a/setup.cfg b/setup.cfg index 373ae8b535..0e030cde82 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.4.0 +version = 41.5.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From f430e585d84a5c63bb3b52e17af2f1b40fec8b71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 19:16:36 -0400 Subject: [PATCH 7561/8469] Remove apparently unrelated change to test --- setuptools/tests/test_integration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 1c0b2b18bb..1e13218899 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -143,7 +143,6 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): 'tests_require', 'python_requires', 'install_requires', - 'long_description_content_type', ] assert not match or match.group(1).strip('"\'') in allowed_unknowns From 85a9ca5e75abf00e0dde55dde4e2b0a11f93c04a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 19:50:53 -0400 Subject: [PATCH 7562/8469] Extract 'imp' re-implementation to setuptools._imp and wrap it in py27compat for compatibility. --- conftest.py | 1 + setuptools/_imp.py | 72 ++++++++++++++++++++++++++++++ setuptools/depends.py | 95 ++++------------------------------------ setuptools/py27compat.py | 32 ++++++++++++++ 4 files changed, 113 insertions(+), 87 deletions(-) create mode 100644 setuptools/_imp.py diff --git a/conftest.py b/conftest.py index 0d7b274c07..1746bfb588 100644 --- a/conftest.py +++ b/conftest.py @@ -19,6 +19,7 @@ def pytest_addoption(parser): if sys.version_info < (3,): collect_ignore.append('setuptools/lib2to3_ex.py') + collect_ignore.append('setuptools/_imp.py') if sys.version_info < (3, 6): diff --git a/setuptools/_imp.py b/setuptools/_imp.py new file mode 100644 index 0000000000..6bc9024368 --- /dev/null +++ b/setuptools/_imp.py @@ -0,0 +1,72 @@ +""" +Re-implementation of find_module and get_frozen_object +from the deprecated imp module. +""" + +import os +import importlib.util +import importlib.machinery + + +PY_SOURCE = 1 +PY_COMPILED = 2 +C_EXTENSION = 3 +C_BUILTIN = 6 +PY_FROZEN = 7 + + +def find_module(module, paths=None): + """ + """ + spec = importlib.util.find_spec(module, paths) + if spec is None: + raise ImportError("Can't find %s" % module) + if not spec.has_location and hasattr(spec, 'submodule_search_locations'): + spec = importlib.util.spec_from_loader('__init__.py', spec.loader) + + kind = -1 + file = None + static = isinstance(spec.loader, type) + if spec.origin == 'frozen' or static and issubclass( + spec.loader, importlib.machinery.FrozenImporter): + kind = PY_FROZEN + path = None # imp compabilty + suffix = mode = '' # imp compability + elif spec.origin == 'built-in' or static and issubclass( + spec.loader, importlib.machinery.BuiltinImporter): + kind = C_BUILTIN + path = None # imp compabilty + suffix = mode = '' # imp compability + elif spec.has_location: + path = spec.origin + suffix = os.path.splitext(path)[1] + mode = 'r' if suffix in importlib.machinery.SOURCE_SUFFIXES else 'rb' + + if suffix in importlib.machinery.SOURCE_SUFFIXES: + kind = PY_SOURCE + elif suffix in importlib.machinery.BYTECODE_SUFFIXES: + kind = PY_COMPILED + elif suffix in importlib.machinery.EXTENSION_SUFFIXES: + kind = C_EXTENSION + + if kind in {PY_SOURCE, PY_COMPILED}: + file = open(path, mode) + else: + path = None + suffix = mode = '' + + return file, path, (suffix, mode, kind) + + +def get_frozen_object(module, paths): + spec = importlib.util.find_spec(module, paths) + if hasattr(spec, 'submodule_search_locations'): + spec = importlib.util.spec_from_loader('__init__.py', spec.loader) + return spec.loader.get_code(module) + + +def get_module(module, paths, info): + spec = importlib.util.find_spec(module, paths) + if hasattr(spec, 'submodule_search_locations'): + spec = importlib.util.spec_from_loader('__init__.py', spec.loader) + return importlib.util.module_from_spec(spec) diff --git a/setuptools/depends.py b/setuptools/depends.py index 97f0ed9dae..eed4913a6b 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,22 +1,11 @@ import sys import marshal from distutils.version import StrictVersion -from setuptools.extern import six from .py33compat import Bytecode -if six.PY2: - import imp - from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN -else: - import os.path - from importlib.util import find_spec, spec_from_loader - from importlib.machinery import SOURCE_SUFFIXES, BYTECODE_SUFFIXES, EXTENSION_SUFFIXES, BuiltinImporter, FrozenImporter - PY_SOURCE = 1 - PY_COMPILED = 2 - C_EXTENSION = 3 - C_BUILTIN = 6 - PY_FROZEN = 7 +from .py27compat import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE +from . import py27compat __all__ = [ @@ -27,7 +16,8 @@ class Require: """A prerequisite to building or installing a distribution""" - def __init__(self, name, requested_version, module, homepage='', + def __init__( + self, name, requested_version, module, homepage='', attribute=None, format=None): if format is None and requested_version is not None: @@ -91,63 +81,6 @@ def is_current(self, paths=None): return self.version_ok(version) -def find_module(module, paths=None): - """Just like 'imp.find_module()', but with package support""" - if six.PY3: - spec = find_spec(module, paths) - if spec is None: - raise ImportError("Can't find %s" % module) - if not spec.has_location and hasattr(spec, 'submodule_search_locations'): - spec = spec_from_loader('__init__.py', spec.loader) - - kind = -1 - file = None - static = isinstance(spec.loader, type) - if spec.origin == 'frozen' or static and issubclass(spec.loader, FrozenImporter): - kind = PY_FROZEN - path = None # imp compabilty - suffix = mode = '' # imp compability - elif spec.origin == 'built-in' or static and issubclass(spec.loader, BuiltinImporter): - kind = C_BUILTIN - path = None # imp compabilty - suffix = mode = '' # imp compability - elif spec.has_location: - frozen = False - path = spec.origin - suffix = os.path.splitext(path)[1] - mode = 'r' if suffix in SOURCE_SUFFIXES else 'rb' - - if suffix in SOURCE_SUFFIXES: - kind = PY_SOURCE - elif suffix in BYTECODE_SUFFIXES: - kind = PY_COMPILED - elif suffix in EXTENSION_SUFFIXES: - kind = C_EXTENSION - - if kind in {PY_SOURCE, PY_COMPILED}: - file = open(path, mode) - else: - path = None - suffix = mode= '' - - return file, path, (suffix, mode, kind) - - else: - parts = module.split('.') - while parts: - part = parts.pop(0) - f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) - - if kind == PKG_DIRECTORY: - parts = parts or ['__init__'] - paths = [path] - - elif parts: - raise ImportError("Can't find %r in %s" % (parts, module)) - - return info - - def get_module_constant(module, symbol, default=-1, paths=None): """Find 'module' by searching 'paths', and extract 'symbol' @@ -156,35 +89,23 @@ def get_module_constant(module, symbol, default=-1, paths=None): constant. Otherwise, return 'default'.""" try: - f, path, (suffix, mode, kind) = find_module(module, paths) + f, path, (suffix, mode, kind) = info = find_module(module, paths) except ImportError: # Module doesn't exist return None - if six.PY3: - spec = find_spec(module, paths) - if hasattr(spec, 'submodule_search_locations'): - spec = spec_from_loader('__init__.py', spec.loader) - try: if kind == PY_COMPILED: f.read(8) # skip magic & date code = marshal.load(f) elif kind == PY_FROZEN: - if six.PY2: - code = imp.get_frozen_object(module) - else: - code = spec.loader.get_code(module) + code = py27compat.get_frozen_object(module, paths) elif kind == PY_SOURCE: code = compile(f.read(), path, 'exec') else: # Not something we can parse; we'll have to import it. :( - if module not in sys.modules: - if six.PY2: - imp.load_module(module, f, path, (suffix, mode, kind)) - else: - sys.modules[module] = module_from_spec(spec) - return getattr(sys.modules[module], symbol, None) + imported = py27compat.get_module(module, paths, info) + return getattr(imported, symbol, None) finally: if f: diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 2985011b92..cf5fb33efe 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -2,6 +2,7 @@ Compatibility Support for Python 2.7 and earlier """ +import sys import platform from setuptools.extern import six @@ -26,3 +27,34 @@ def get_all_headers(message, key): rmtree_safe = str if linux_py2_ascii else lambda x: x """Workaround for http://bugs.python.org/issue24672""" + + +try: + from ._imp import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE + from ._imp import get_frozen_object, get_module +except ImportError: + import imp + from imp import PY_COMPILED, PY_FROZEN, PY_SOURCE # noqa + + def find_module(module, paths=None): + """Just like 'imp.find_module()', but with package support""" + parts = module.split('.') + while parts: + part = parts.pop(0) + f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) + + if kind == imp.PKG_DIRECTORY: + parts = parts or ['__init__'] + paths = [path] + + elif parts: + raise ImportError("Can't find %r in %s" % (parts, module)) + + return info + + def get_frozen_object(module, paths): + return imp.get_frozen_object(module) + + def get_module(module, paths, info): + imp.load_module(*info) + return sys.modules[module] From 773f1ec3c2622a78ee0280eb1d2b03c60871c52b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 19:54:42 -0400 Subject: [PATCH 7563/8469] Rely on contextlib.closing for brevity. --- setuptools/depends.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/setuptools/depends.py b/setuptools/depends.py index eed4913a6b..a37675cbd9 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,5 +1,6 @@ import sys import marshal +import contextlib from distutils.version import StrictVersion from .py33compat import Bytecode @@ -81,6 +82,17 @@ def is_current(self, paths=None): return self.version_ok(version) +def maybe_close(f): + @contextlib.contextmanager + def empty(): + yield + return + if not f: + return empty() + + return contextlib.closing(f) + + def get_module_constant(module, symbol, default=-1, paths=None): """Find 'module' by searching 'paths', and extract 'symbol' @@ -94,7 +106,7 @@ def get_module_constant(module, symbol, default=-1, paths=None): # Module doesn't exist return None - try: + with maybe_close(f): if kind == PY_COMPILED: f.read(8) # skip magic & date code = marshal.load(f) @@ -107,10 +119,6 @@ def get_module_constant(module, symbol, default=-1, paths=None): imported = py27compat.get_module(module, paths, info) return getattr(imported, symbol, None) - finally: - if f: - f.close() - return extract_constant(code, symbol, default) From 37d617cd983446dfe8073038d03dd31fc7f66796 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 20:40:07 -0400 Subject: [PATCH 7564/8469] Extract _resolve --- setuptools/_imp.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index 6bc9024368..c400d455c2 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -60,13 +60,17 @@ def find_module(module, paths=None): def get_frozen_object(module, paths): spec = importlib.util.find_spec(module, paths) - if hasattr(spec, 'submodule_search_locations'): - spec = importlib.util.spec_from_loader('__init__.py', spec.loader) - return spec.loader.get_code(module) + return spec.loader.get_code(_resolve(module)) + + +def _resolve(spec): + return ( + importlib.util.spec_from_loader('__init__.py', spec.loader) + if hasattr(spec, 'submodule_search_locations') + else spec + ) def get_module(module, paths, info): spec = importlib.util.find_spec(module, paths) - if hasattr(spec, 'submodule_search_locations'): - spec = importlib.util.spec_from_loader('__init__.py', spec.loader) - return importlib.util.module_from_spec(spec) + return importlib.util.module_from_spec(_resolve(spec)) From 4948b14a66f00eba749e52b77281f711413e071b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Oct 2019 20:40:58 -0400 Subject: [PATCH 7565/8469] Avoid _resolve in get_module (causes failures). --- setuptools/_imp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index c400d455c2..cee9155145 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -73,4 +73,4 @@ def _resolve(spec): def get_module(module, paths, info): spec = importlib.util.find_spec(module, paths) - return importlib.util.module_from_spec(_resolve(spec)) + return importlib.util.module_from_spec(spec) From 16051d6b2d3641dc8951e90f7f04bcd04b8954d3 Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 28 Oct 2019 10:12:53 +0300 Subject: [PATCH 7566/8469] imp load_module fix --- setuptools/py27compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index cf5fb33efe..1d57360f4e 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -56,5 +56,5 @@ def get_frozen_object(module, paths): return imp.get_frozen_object(module) def get_module(module, paths, info): - imp.load_module(*info) + imp.load_module(module, *info) return sys.modules[module] From 65fe7abeaba9e82b8f3755054759fed21c0c489b Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 28 Oct 2019 10:28:55 +0300 Subject: [PATCH 7567/8469] py34 compat --- setuptools/_imp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index cee9155145..09073d44fe 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -4,6 +4,7 @@ """ import os +import sys import importlib.util import importlib.machinery @@ -70,7 +71,12 @@ def _resolve(spec): else spec ) +def _module_from_spec(spec): + if sys.version_info >= (3, 5): + return importlib.util.module_from_spec(spec) + else: + return spec.loader.load_module(spec.name) def get_module(module, paths, info): spec = importlib.util.find_spec(module, paths) - return importlib.util.module_from_spec(spec) + return _module_from_spec(spec) From ce01c0199f93612848e664bfd920083168eaa293 Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 28 Oct 2019 10:59:21 +0300 Subject: [PATCH 7568/8469] add docstring to find_module --- setuptools/_imp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index 09073d44fe..dc4b1b2c5d 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -17,8 +17,7 @@ def find_module(module, paths=None): - """ - """ + """Just like 'imp.find_module()', but with package support""" spec = importlib.util.find_spec(module, paths) if spec is None: raise ImportError("Can't find %s" % module) From 2f4952927e41643100e6e6f58124f34331c14add Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 28 Oct 2019 11:07:27 +0300 Subject: [PATCH 7569/8469] remove _resolve --- setuptools/_imp.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index dc4b1b2c5d..49ddc852be 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -63,13 +63,6 @@ def get_frozen_object(module, paths): return spec.loader.get_code(_resolve(module)) -def _resolve(spec): - return ( - importlib.util.spec_from_loader('__init__.py', spec.loader) - if hasattr(spec, 'submodule_search_locations') - else spec - ) - def _module_from_spec(spec): if sys.version_info >= (3, 5): return importlib.util.module_from_spec(spec) From 7489ea4047661a7dbd46ff155abe45c548284676 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Oct 2019 18:47:31 +0100 Subject: [PATCH 7570/8469] msvc: fix Python 2 support --- changelog.d/1891.change.rst | 1 + setuptools/msvc.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1891.change.rst diff --git a/changelog.d/1891.change.rst b/changelog.d/1891.change.rst new file mode 100644 index 0000000000..81ccff10e4 --- /dev/null +++ b/changelog.d/1891.change.rst @@ -0,0 +1 @@ +Fix code for detecting Visual Studio's version on Windows under Python 2. diff --git a/setuptools/msvc.py b/setuptools/msvc.py index ffa7053b64..2ffe1c81ee 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -20,6 +20,7 @@ """ import json +from io import open from os import listdir, pathsep from os.path import join, isfile, isdir, dirname import sys From 7748921de342160ca2dc9c9539562bb9c924e14c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 28 Oct 2019 19:12:39 +0100 Subject: [PATCH 7571/8469] =?UTF-8?q?Bump=20version:=2041.5.0=20=E2=86=92?= =?UTF-8?q?=2041.5.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1891.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1891.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index aeefc8f2c6..0dc75e9bfd 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.5.0 +current_version = 41.5.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 7e9fc0f6e8..bac356385f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v41.5.1 +------- + +* #1891: Fix code for detecting Visual Studio's version on Windows under Python 2. + + v41.5.0 ------- diff --git a/changelog.d/1891.change.rst b/changelog.d/1891.change.rst deleted file mode 100644 index 81ccff10e4..0000000000 --- a/changelog.d/1891.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix code for detecting Visual Studio's version on Windows under Python 2. diff --git a/setup.cfg b/setup.cfg index 0e030cde82..8038b463cc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.5.0 +version = 41.5.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 823ab9d2ec4ab89f90c0a781d872c9071b4afc13 Mon Sep 17 00:00:00 2001 From: Mick Koch Date: Mon, 20 May 2019 18:25:19 -0400 Subject: [PATCH 7572/8469] Add support for `license_files` option in metadata --- changelog.d/1767.change.rst | 2 + docs/setuptools.txt | 1 + setuptools/command/sdist.py | 26 ++-- setuptools/config.py | 1 + setuptools/dist.py | 1 + setuptools/tests/test_egg_info.py | 198 ++++++++++++++++++++++++++++++ 6 files changed, 221 insertions(+), 8 deletions(-) create mode 100644 changelog.d/1767.change.rst diff --git a/changelog.d/1767.change.rst b/changelog.d/1767.change.rst new file mode 100644 index 0000000000..5d42aedc87 --- /dev/null +++ b/changelog.d/1767.change.rst @@ -0,0 +1,2 @@ +Add support for the ``license_files`` option in ``setup.cfg`` to automatically +include multiple license files in a source distribution. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 344ea5bc36..22025f61cb 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2276,6 +2276,7 @@ maintainer_email maintainer-email str classifiers classifier file:, list-comma license str license_file str +license_files list-comma description summary file:, str long_description long-description file:, str long_description_content_type str 38.6.0 diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index dc25398147..2431664007 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -200,10 +200,12 @@ def read_manifest(self): manifest.close() def check_license(self): - """Checks if license_file' is configured and adds it to - 'self.filelist' if the value contains a valid path. + """Checks if license_file' or 'license_files' is configured and adds any + valid paths to 'self.filelist'. """ + files = set() + opts = self.distribution.get_option_dict('metadata') # ignore the source of the value @@ -211,11 +213,19 @@ def check_license(self): if license_file is None: log.debug("'license_file' option was not specified") - return + else: + files.add(license_file) - if not os.path.exists(license_file): - log.warn("warning: Failed to find the configured license file '%s'", - license_file) - return + try: + files.update(self.distribution.metadata.license_files) + except TypeError: + log.warn("warning: 'license_files' option is malformed") + + for f in files: + if not os.path.exists(f): + log.warn( + "warning: Failed to find the configured license file '%s'", + f) + continue - self.filelist.append(license_file) + self.filelist.append(f) diff --git a/setuptools/config.py b/setuptools/config.py index 2d50e25e89..9b9a0c45e7 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -483,6 +483,7 @@ def parsers(self): 'obsoletes': parse_list, 'classifiers': self._get_parser_compound(parse_file, parse_list), 'license': exclude_files_parser('license'), + 'license_files': parse_list, 'description': parse_file, 'long_description': parse_file, 'version': self._parse_version, diff --git a/setuptools/dist.py b/setuptools/dist.py index 2e5ad4bd68..fb379a20c4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -409,6 +409,7 @@ class Distribution(_Distribution): 'long_description_content_type': None, 'project_urls': dict, 'provides_extras': ordered_set.OrderedSet, + 'license_files': list, } _patched_dist = None diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 316eb2edde..61da1bdaac 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -567,6 +567,204 @@ def test_setup_cfg_license_file( assert 'LICENSE' not in sources_text assert 'INVALID_LICENSE' not in sources_text # for invalid license test + @pytest.mark.parametrize("files, incl_licenses, excl_licenses", [ + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + LICENSE-ABC + LICENSE-XYZ + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with licenses + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = LICENSE-ABC, LICENSE-XYZ + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with commas + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + LICENSE-ABC + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # with one license + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # empty + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = LICENSE-XYZ + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-XYZ'], ['LICENSE-ABC']), # on same line + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + LICENSE-ABC + INVALID_LICENSE + """), + 'LICENSE-ABC': DALS("Test license") + }, ['LICENSE-ABC'], ['INVALID_LICENSE']), # with an invalid license + ({ + 'setup.cfg': DALS(""" + """), + 'LICENSE': DALS("Test license") + }, [], ['LICENSE']), # no license_files attribute + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = LICENSE + """), + 'MANIFEST.in': DALS("exclude LICENSE"), + 'LICENSE': DALS("Test license") + }, [], ['LICENSE']), # license file is manually excluded + ({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + LICENSE-ABC + LICENSE-XYZ + """), + 'MANIFEST.in': DALS("exclude LICENSE-XYZ"), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC'], ['LICENSE-XYZ']) # subset is manually excluded + ]) + def test_setup_cfg_license_files( + self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): + self._create_project() + build_files(files) + + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]) + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_lines = list(line.strip() for line in sources_file) + + for lf in incl_licenses: + assert sources_lines.count(lf) == 1 + + for lf in excl_licenses: + assert sources_lines.count(lf) == 0 + + @pytest.mark.parametrize("files, incl_licenses, excl_licenses", [ + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = + license_files = + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # both empty + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = + LICENSE-ABC + LICENSE-XYZ + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # license_file is still singular + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE-ABC + license_files = + LICENSE-XYZ + LICENSE-PQR + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-PQR': DALS("PQR license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # combined + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE-ABC + license_files = + LICENSE-ABC + LICENSE-XYZ + LICENSE-PQR + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-PQR': DALS("PQR license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # duplicate license + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE-ABC + license_files = + LICENSE-XYZ + """), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-PQR': DALS("PQR license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-ABC', 'LICENSE-XYZ'], ['LICENSE-PQR']), # combined subset + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE-ABC + license_files = + LICENSE-XYZ + LICENSE-PQR + """), + 'LICENSE-PQR': DALS("Test license") + }, ['LICENSE-PQR'], ['LICENSE-ABC', 'LICENSE-XYZ']), # with invalid licenses + ({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE-ABC + license_files = + LICENSE-PQR + LICENSE-XYZ + """), + 'MANIFEST.in': DALS("exclude LICENSE-ABC\nexclude LICENSE-PQR"), + 'LICENSE-ABC': DALS("ABC license"), + 'LICENSE-PQR': DALS("PQR license"), + 'LICENSE-XYZ': DALS("XYZ license") + }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']) # manually excluded + ]) + def test_setup_cfg_license_file_license_files( + self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): + self._create_project() + build_files(files) + + environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]) + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + + with open(os.path.join(egg_info_dir, 'SOURCES.txt')) as sources_file: + sources_lines = list(line.strip() for line in sources_file) + + for lf in incl_licenses: + assert sources_lines.count(lf) == 1 + + for lf in excl_licenses: + assert sources_lines.count(lf) == 0 + def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to # the `setup` function results in writing a `Description-Content-Type` From 648dfe5afea3bf2a690c9267131a503bcd37d289 Mon Sep 17 00:00:00 2001 From: Mick Koch Date: Mon, 28 Oct 2019 18:38:30 -0400 Subject: [PATCH 7573/8469] Remove DALS for single-line strings --- setuptools/tests/test_egg_info.py | 80 +++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 61da1bdaac..0db204baa3 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -524,27 +524,27 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): [metadata] license_file = LICENSE """), - 'LICENSE': DALS("Test license") + 'LICENSE': "Test license" }, True), # with license ({ 'setup.cfg': DALS(""" [metadata] license_file = INVALID_LICENSE """), - 'LICENSE': DALS("Test license") + 'LICENSE': "Test license" }, False), # with an invalid license ({ 'setup.cfg': DALS(""" """), - 'LICENSE': DALS("Test license") + 'LICENSE': "Test license" }, False), # no license_file attribute ({ 'setup.cfg': DALS(""" [metadata] license_file = LICENSE """), - 'MANIFEST.in': DALS("exclude LICENSE"), - 'LICENSE': DALS("Test license") + 'MANIFEST.in': "exclude LICENSE", + 'LICENSE': "Test license" }, False) # license file is manually excluded ]) def test_setup_cfg_license_file( @@ -575,16 +575,16 @@ def test_setup_cfg_license_file( LICENSE-ABC LICENSE-XYZ """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with licenses ({ 'setup.cfg': DALS(""" [metadata] license_files = LICENSE-ABC, LICENSE-XYZ """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with commas ({ 'setup.cfg': DALS(""" @@ -592,24 +592,24 @@ def test_setup_cfg_license_file( license_files = LICENSE-ABC """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # with one license ({ 'setup.cfg': DALS(""" [metadata] license_files = """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # empty ({ 'setup.cfg': DALS(""" [metadata] license_files = LICENSE-XYZ """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-XYZ'], ['LICENSE-ABC']), # on same line ({ 'setup.cfg': DALS(""" @@ -618,20 +618,20 @@ def test_setup_cfg_license_file( LICENSE-ABC INVALID_LICENSE """), - 'LICENSE-ABC': DALS("Test license") + 'LICENSE-ABC': "Test license" }, ['LICENSE-ABC'], ['INVALID_LICENSE']), # with an invalid license ({ 'setup.cfg': DALS(""" """), - 'LICENSE': DALS("Test license") + 'LICENSE': "Test license" }, [], ['LICENSE']), # no license_files attribute ({ 'setup.cfg': DALS(""" [metadata] license_files = LICENSE """), - 'MANIFEST.in': DALS("exclude LICENSE"), - 'LICENSE': DALS("Test license") + 'MANIFEST.in': "exclude LICENSE", + 'LICENSE': "Test license" }, [], ['LICENSE']), # license file is manually excluded ({ 'setup.cfg': DALS(""" @@ -640,9 +640,9 @@ def test_setup_cfg_license_file( LICENSE-ABC LICENSE-XYZ """), - 'MANIFEST.in': DALS("exclude LICENSE-XYZ"), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'MANIFEST.in': "exclude LICENSE-XYZ", + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC'], ['LICENSE-XYZ']) # subset is manually excluded ]) def test_setup_cfg_license_files( @@ -672,8 +672,8 @@ def test_setup_cfg_license_files( license_file = license_files = """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # both empty ({ 'setup.cfg': DALS(""" @@ -682,8 +682,8 @@ def test_setup_cfg_license_files( LICENSE-ABC LICENSE-XYZ """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-XYZ': "XYZ license" }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # license_file is still singular ({ 'setup.cfg': DALS(""" @@ -693,9 +693,9 @@ def test_setup_cfg_license_files( LICENSE-XYZ LICENSE-PQR """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-PQR': DALS("PQR license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-PQR': "PQR license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # combined ({ 'setup.cfg': DALS(""" @@ -706,9 +706,9 @@ def test_setup_cfg_license_files( LICENSE-XYZ LICENSE-PQR """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-PQR': DALS("PQR license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-PQR': "PQR license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # duplicate license ({ 'setup.cfg': DALS(""" @@ -717,9 +717,9 @@ def test_setup_cfg_license_files( license_files = LICENSE-XYZ """), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-PQR': DALS("PQR license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'LICENSE-ABC': "ABC license", + 'LICENSE-PQR': "PQR license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC', 'LICENSE-XYZ'], ['LICENSE-PQR']), # combined subset ({ 'setup.cfg': DALS(""" @@ -729,7 +729,7 @@ def test_setup_cfg_license_files( LICENSE-XYZ LICENSE-PQR """), - 'LICENSE-PQR': DALS("Test license") + 'LICENSE-PQR': "Test license" }, ['LICENSE-PQR'], ['LICENSE-ABC', 'LICENSE-XYZ']), # with invalid licenses ({ 'setup.cfg': DALS(""" @@ -739,10 +739,10 @@ def test_setup_cfg_license_files( LICENSE-PQR LICENSE-XYZ """), - 'MANIFEST.in': DALS("exclude LICENSE-ABC\nexclude LICENSE-PQR"), - 'LICENSE-ABC': DALS("ABC license"), - 'LICENSE-PQR': DALS("PQR license"), - 'LICENSE-XYZ': DALS("XYZ license") + 'MANIFEST.in': "exclude LICENSE-ABC\nexclude LICENSE-PQR", + 'LICENSE-ABC': "ABC license", + 'LICENSE-PQR': "PQR license", + 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']) # manually excluded ]) def test_setup_cfg_license_file_license_files( From 4a31168e517134529c229b310e89039323fdb02f Mon Sep 17 00:00:00 2001 From: Mick Koch Date: Mon, 28 Oct 2019 18:45:42 -0400 Subject: [PATCH 7574/8469] Use an OrderedSet for accumulating license files --- setuptools/command/sdist.py | 4 ++-- setuptools/dist.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2431664007..6043e0b9e8 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,7 +5,7 @@ import io import contextlib -from setuptools.extern import six +from setuptools.extern import six, ordered_set from .py36compat import sdist_add_defaults @@ -204,7 +204,7 @@ def check_license(self): valid paths to 'self.filelist'. """ - files = set() + files = ordered_set.OrderedSet() opts = self.distribution.get_option_dict('metadata') diff --git a/setuptools/dist.py b/setuptools/dist.py index fb379a20c4..0f3f7322d9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -409,7 +409,7 @@ class Distribution(_Distribution): 'long_description_content_type': None, 'project_urls': dict, 'provides_extras': ordered_set.OrderedSet, - 'license_files': list, + 'license_files': ordered_set.OrderedSet, } _patched_dist = None From e08ec2b640f6b2bf943fea70e2a7f9881bbe6e91 Mon Sep 17 00:00:00 2001 From: Mick Koch Date: Mon, 28 Oct 2019 19:16:13 -0400 Subject: [PATCH 7575/8469] Filter out missing files and use extend() --- setuptools/command/sdist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 6043e0b9e8..55ecdd978a 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -226,6 +226,6 @@ def check_license(self): log.warn( "warning: Failed to find the configured license file '%s'", f) - continue + files.remove(f) - self.filelist.append(f) + self.filelist.extend(files) From 3a0520b43dfac9f6ba507c6d09a60290219a0802 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Oct 2019 21:52:40 -0400 Subject: [PATCH 7576/8469] Extract compatibility function into compatibility module. --- setuptools/_imp.py | 10 +++------- setuptools/py34compat.py | 8 ++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 setuptools/py34compat.py diff --git a/setuptools/_imp.py b/setuptools/_imp.py index 49ddc852be..ee719c9a36 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -8,6 +8,8 @@ import importlib.util import importlib.machinery +from .py34compat import module_from_spec + PY_SOURCE = 1 PY_COMPILED = 2 @@ -63,12 +65,6 @@ def get_frozen_object(module, paths): return spec.loader.get_code(_resolve(module)) -def _module_from_spec(spec): - if sys.version_info >= (3, 5): - return importlib.util.module_from_spec(spec) - else: - return spec.loader.load_module(spec.name) - def get_module(module, paths, info): spec = importlib.util.find_spec(module, paths) - return _module_from_spec(spec) + return module_from_spec(spec) diff --git a/setuptools/py34compat.py b/setuptools/py34compat.py new file mode 100644 index 0000000000..bc7eefa99f --- /dev/null +++ b/setuptools/py34compat.py @@ -0,0 +1,8 @@ +import importlib.util + + +try: + module_from_spec = importlib.util.module_from_spec +except AttributeError: + def module_from_spec(spec): + return spec.loader.load_module(spec.name) From 2175d6bdcf4fe626e713961bb0315c91f206746b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Oct 2019 21:57:31 -0400 Subject: [PATCH 7577/8469] Add changelog entry. --- changelog.d/479.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/479.bugfix.rst diff --git a/changelog.d/479.bugfix.rst b/changelog.d/479.bugfix.rst new file mode 100644 index 0000000000..3c33964edb --- /dev/null +++ b/changelog.d/479.bugfix.rst @@ -0,0 +1 @@ +Replace usage of deprecated ``imp`` module with local re-implementation in ``setuptools._imp``. From e1f340b53f0088993b16e19999a4d6b0e86a9991 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Oct 2019 22:01:34 -0400 Subject: [PATCH 7578/8469] Avoid importerror on older Pythons --- setuptools/py34compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/py34compat.py b/setuptools/py34compat.py index bc7eefa99f..54157a6375 100644 --- a/setuptools/py34compat.py +++ b/setuptools/py34compat.py @@ -1,4 +1,4 @@ -import importlib.util +import importlib try: From 82689e1aa8e6548f26f2ce3bcd069411cb39bfcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Oct 2019 22:06:44 -0400 Subject: [PATCH 7579/8469] Ensure importlib.util is imported on Python 3.5 --- setuptools/py34compat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/py34compat.py b/setuptools/py34compat.py index 54157a6375..3ad917222a 100644 --- a/setuptools/py34compat.py +++ b/setuptools/py34compat.py @@ -1,5 +1,10 @@ import importlib +try: + import importlib.util +except ImportError: + pass + try: module_from_spec = importlib.util.module_from_spec From 20d6407aa5f68dbeba61e8967290f2fbde4f85ab Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Tue, 29 Oct 2019 10:51:54 +0300 Subject: [PATCH 7580/8469] Allow calling get_frozen_object without paths, raise ImportError when it cant find module --- setuptools/_imp.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index ee719c9a36..ab29ef2123 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -60,11 +60,15 @@ def find_module(module, paths=None): return file, path, (suffix, mode, kind) -def get_frozen_object(module, paths): +def get_frozen_object(module, paths=None): spec = importlib.util.find_spec(module, paths) - return spec.loader.get_code(_resolve(module)) + if not spec: + raise ImportError("Can't find %s" % module) + return spec.loader.get_code(module) def get_module(module, paths, info): spec = importlib.util.find_spec(module, paths) + if not spec: + raise ImportError("Can't find %s" % module) return module_from_spec(spec) From cfa9245a7dea8a35f11580c0bfd27472a3182c7e Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Tue, 29 Oct 2019 10:53:40 +0300 Subject: [PATCH 7581/8469] Remove 'sys' import --- setuptools/_imp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index ab29ef2123..a3cce9b284 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -4,7 +4,6 @@ """ import os -import sys import importlib.util import importlib.machinery From 6defe6b8fd6008f61ce5ecfae91dc1df5e123694 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Oct 2019 09:52:32 -0400 Subject: [PATCH 7582/8469] Rename changelog file --- changelog.d/{479.bugfix.rst => 479.change.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{479.bugfix.rst => 479.change.rst} (100%) diff --git a/changelog.d/479.bugfix.rst b/changelog.d/479.change.rst similarity index 100% rename from changelog.d/479.bugfix.rst rename to changelog.d/479.change.rst From a0fe403c141369defacf12dccbdc01634bbcb1da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Oct 2019 09:53:23 -0400 Subject: [PATCH 7583/8469] =?UTF-8?q?Bump=20version:=2041.5.1=20=E2=86=92?= =?UTF-8?q?=2041.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/479.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/479.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0dc75e9bfd..40db5b03f1 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.5.1 +current_version = 41.6.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index bac356385f..ba7b4647c8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v41.6.0 +------- + +* #479: Replace usage of deprecated ``imp`` module with local re-implementation in ``setuptools._imp``. + + v41.5.1 ------- diff --git a/changelog.d/479.change.rst b/changelog.d/479.change.rst deleted file mode 100644 index 3c33964edb..0000000000 --- a/changelog.d/479.change.rst +++ /dev/null @@ -1 +0,0 @@ -Replace usage of deprecated ``imp`` module with local re-implementation in ``setuptools._imp``. diff --git a/setup.cfg b/setup.cfg index 8038b463cc..42a3d86c6c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.5.1 +version = 41.6.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From b2ab6f7c90b4daf5c05f08be230f329e8cb2f8e2 Mon Sep 17 00:00:00 2001 From: Andrew Taylor Date: Tue, 29 Oct 2019 17:03:11 -0600 Subject: [PATCH 7584/8469] Add info message when authentication error encountered processing package index. --- setuptools/package_index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f419d47167..d9668e4e1c 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -348,6 +348,8 @@ def process_url(self, url, retrieve=False): f = self.open_url(url, tmpl % url) if f is None: return + if isinstance(f, urllib.error.HTTPError) and f.code == 401: + self.info("Authentication error: %s" % f.msg) self.fetched_urls[f.url] = True if 'html' not in f.headers.get('content-type', '').lower(): f.close() # not html, we can't process it From 9fd54518fcb660d9d3f92b1bb242082f20c69c1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Oct 2019 15:00:55 -0400 Subject: [PATCH 7585/8469] Suppress deprecation of bdist_wininst. Ref #1823. --- pytest.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytest.ini b/pytest.ini index 612fb91f63..549e4d68f8 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,3 +5,6 @@ flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 doctest_optionflags=ELLIPSIS ALLOW_UNICODE +filterwarnings = + # https://github.com/pypa/setuptools/issues/1823 + ignore:distutils.command.bdist_wininst::command is deprecated From 6ac7b4ee036ef8e6954198689d214e8ee9b29118 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Oct 2019 15:58:45 -0400 Subject: [PATCH 7586/8469] Suppress deprecation of bdist_wininst (redo). Ref #1823. --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 549e4d68f8..0370f7f827 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,4 +7,4 @@ flake8-ignore = doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = # https://github.com/pypa/setuptools/issues/1823 - ignore:distutils.command.bdist_wininst::command is deprecated + ignore:bdist_wininst command is deprecated From 2fffeb6513a50af996ee07dfc4a62fb0bf5dce7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Oct 2019 15:33:12 -0400 Subject: [PATCH 7587/8469] Error on warnings. Fixes #1823. --- pytest.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/pytest.ini b/pytest.ini index 0370f7f827..6786be4fbc 100644 --- a/pytest.ini +++ b/pytest.ini @@ -8,3 +8,4 @@ doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = # https://github.com/pypa/setuptools/issues/1823 ignore:bdist_wininst command is deprecated + error From 894aa5bede94d01639a5e6e95be02cb06164318f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Oct 2019 15:36:32 -0400 Subject: [PATCH 7588/8469] Move the error directive to the top, as it's more permanent. --- pytest.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 6786be4fbc..3b3d4b8b07 100644 --- a/pytest.ini +++ b/pytest.ini @@ -6,6 +6,7 @@ flake8-ignore = setuptools/py*compat.py F811 doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = + # Fail on warnings + error # https://github.com/pypa/setuptools/issues/1823 ignore:bdist_wininst command is deprecated - error From 96bc30807092c6f6a014d71510a23ab2dd07f3a7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Oct 2019 15:36:52 -0400 Subject: [PATCH 7589/8469] Add changelog entry --- changelog.d/1899.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1899.change.rst diff --git a/changelog.d/1899.change.rst b/changelog.d/1899.change.rst new file mode 100644 index 0000000000..3076843956 --- /dev/null +++ b/changelog.d/1899.change.rst @@ -0,0 +1 @@ +Test suite now fails on warnings. From f413f95e95b34b26d9ed9d9c43b3e4b3d30caecc Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 31 Oct 2019 11:25:57 -0400 Subject: [PATCH 7590/8469] Remove "upload" and "register" commands. The upload and register commands were deprecated over a year ago, in July 2018 (PR GH-1410, discussed in issue GH-1381). It is time to actively remove them in favor of twine. --- changelog.d/1898.breaking.rst | 1 + docs/setuptools.txt | 15 +-- setuptools/command/__init__.py | 3 +- setuptools/command/register.py | 22 ++-- setuptools/command/upload.py | 195 ++------------------------- setuptools/errors.py | 16 +++ setuptools/tests/test_register.py | 43 ++---- setuptools/tests/test_upload.py | 211 ++---------------------------- 8 files changed, 64 insertions(+), 442 deletions(-) create mode 100644 changelog.d/1898.breaking.rst create mode 100644 setuptools/errors.py diff --git a/changelog.d/1898.breaking.rst b/changelog.d/1898.breaking.rst new file mode 100644 index 0000000000..844a8a42fa --- /dev/null +++ b/changelog.d/1898.breaking.rst @@ -0,0 +1 @@ +Removed the "upload" and "register" commands in favor of `twine `_. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 344ea5bc36..399a56d3ca 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2087,16 +2087,13 @@ New in 41.5.0: Deprecated the test command. ``upload`` - Upload source and/or egg distributions to PyPI =========================================================== -.. warning:: - **upload** is deprecated in favor of using `twine - `_ - -The ``upload`` command is implemented and `documented -`_ -in distutils. +The ``upload`` command was deprecated in version 40.0 and removed in version +42.0. Use `twine `_ instead. -New in 20.1: Added keyring support. -New in 40.0: Deprecated the upload command. +For more information on the current best practices in uploading your packages +to PyPI, see the Python Packaging User Guide's "Packaging Python Projects" +tutorial specifically the section on `uploading the distribution archives +`_. ----------------------------------------- diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index fe619e2e67..743f5588fa 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,8 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', 'upload_docs', 'upload', 'build_clib', - 'dist_info', + 'bdist_wininst', 'upload_docs', 'build_clib', 'dist_info', ] from distutils.command.bdist import bdist diff --git a/setuptools/command/register.py b/setuptools/command/register.py index 98bc01566f..b8266b9a60 100644 --- a/setuptools/command/register.py +++ b/setuptools/command/register.py @@ -1,18 +1,18 @@ from distutils import log import distutils.command.register as orig +from setuptools.errors import RemovedCommandError + class register(orig.register): - __doc__ = orig.register.__doc__ + """Formerly used to register packages on PyPI.""" def 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 - ) + msg = ( + "The register command has been removed, use twine to upload " + + "instead (https://pypi.org/p/twine)" + ) + + self.announce("ERROR: " + msg, log.ERROR) + + raise RemovedCommandError(msg) diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 6db8888bb2..ec7f81e227 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -1,196 +1,17 @@ -import io -import os -import hashlib -import getpass - -from base64 import standard_b64encode - from distutils import log from distutils.command import upload as orig -from distutils.spawn import spawn - -from distutils.errors import DistutilsError -from setuptools.extern.six.moves.urllib.request import urlopen, Request -from setuptools.extern.six.moves.urllib.error import HTTPError -from setuptools.extern.six.moves.urllib.parse import urlparse +from setuptools.errors import RemovedCommandError class upload(orig.upload): - """ - Override default upload behavior to obtain password - 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 - ) + """Formerly used to upload packages to PyPI.""" - def finalize_options(self): - orig.upload.finalize_options(self) - self.username = ( - self.username or - getpass.getuser() - ) - # Attempt to obtain password. Short circuit evaluation at the first - # sign of success. - self.password = ( - self.password or - self._load_password_from_keyring() or - self._prompt_for_password() + def run(self): + msg = ( + "The upload command has been removed, use twine to upload " + + "instead (https://pypi.org/p/twine)" ) - def upload_file(self, command, pyversion, filename): - # Makes sure the repository URL is compliant - schema, netloc, url, params, query, fragments = \ - urlparse(self.repository) - if params or query or fragments: - raise AssertionError("Incompatible url %s" % self.repository) - - if schema not in ('http', 'https'): - raise AssertionError("unsupported schema " + schema) - - # Sign if requested - if self.sign: - gpg_args = ["gpg", "--detach-sign", "-a", filename] - if self.identity: - gpg_args[2:2] = ["--local-user", self.identity] - spawn(gpg_args, - dry_run=self.dry_run) - - # Fill in the data - send all the meta-data in case we need to - # register a new release - with open(filename, 'rb') as f: - content = f.read() - - meta = self.distribution.metadata - - data = { - # action - ':action': 'file_upload', - 'protocol_version': '1', - - # identify release - 'name': meta.get_name(), - 'version': meta.get_version(), - - # file content - 'content': (os.path.basename(filename), content), - 'filetype': command, - 'pyversion': pyversion, - 'md5_digest': hashlib.md5(content).hexdigest(), - - # additional meta-data - 'metadata_version': str(meta.get_metadata_version()), - 'summary': meta.get_description(), - 'home_page': meta.get_url(), - 'author': meta.get_contact(), - 'author_email': meta.get_contact_email(), - 'license': meta.get_licence(), - 'description': meta.get_long_description(), - 'keywords': meta.get_keywords(), - 'platform': meta.get_platforms(), - 'classifiers': meta.get_classifiers(), - 'download_url': meta.get_download_url(), - # PEP 314 - 'provides': meta.get_provides(), - 'requires': meta.get_requires(), - 'obsoletes': meta.get_obsoletes(), - } - - data['comment'] = '' - - if self.sign: - data['gpg_signature'] = (os.path.basename(filename) + ".asc", - open(filename+".asc", "rb").read()) - - # set up the authentication - user_pass = (self.username + ":" + self.password).encode('ascii') - # The exact encoding of the authentication string is debated. - # Anyway PyPI only accepts ascii for both username or password. - auth = "Basic " + standard_b64encode(user_pass).decode('ascii') - - # Build up the MIME payload for the POST data - boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = b'\r\n--' + boundary.encode('ascii') - end_boundary = sep_boundary + b'--\r\n' - body = io.BytesIO() - for key, value in data.items(): - title = '\r\nContent-Disposition: form-data; name="%s"' % key - # handle multiple entries for the same name - if not isinstance(value, list): - value = [value] - for value in value: - if type(value) is tuple: - title += '; filename="%s"' % value[0] - value = value[1] - else: - value = str(value).encode('utf-8') - body.write(sep_boundary) - body.write(title.encode('utf-8')) - body.write(b"\r\n\r\n") - body.write(value) - body.write(end_boundary) - body = body.getvalue() - - msg = "Submitting %s to %s" % (filename, self.repository) - self.announce(msg, log.INFO) - - # build the Request - headers = { - 'Content-type': 'multipart/form-data; boundary=%s' % boundary, - 'Content-length': str(len(body)), - 'Authorization': auth, - } - - request = Request(self.repository, data=body, - headers=headers) - # send the data - try: - result = urlopen(request) - status = result.getcode() - reason = result.msg - except HTTPError as e: - status = e.code - reason = e.msg - except OSError as e: - self.announce(str(e), log.ERROR) - raise - - if status == 200: - self.announce('Server response (%s): %s' % (status, reason), - log.INFO) - if self.show_response: - text = getattr(self, '_read_pypi_response', - lambda x: None)(result) - if text is not None: - msg = '\n'.join(('-' * 75, text, '-' * 75)) - self.announce(msg, log.INFO) - else: - msg = 'Upload failed (%s): %s' % (status, reason) - self.announce(msg, log.ERROR) - raise DistutilsError(msg) - - def _load_password_from_keyring(self): - """ - Attempt to load password from keyring. Suppress Exceptions. - """ - try: - keyring = __import__('keyring') - return keyring.get_password(self.repository, self.username) - except Exception: - pass - - def _prompt_for_password(self): - """ - Prompt for a password on the tty. Suppress Exceptions. - """ - try: - return getpass.getpass() - except (Exception, KeyboardInterrupt): - pass + self.announce("ERROR: " + msg, log.ERROR) + raise RemovedCommandError(msg) diff --git a/setuptools/errors.py b/setuptools/errors.py new file mode 100644 index 0000000000..2701747f56 --- /dev/null +++ b/setuptools/errors.py @@ -0,0 +1,16 @@ +"""setuptools.errors + +Provides exceptions used by setuptools modules. +""" + +from distutils.errors import DistutilsError + + +class RemovedCommandError(DistutilsError, RuntimeError): + """Error used for commands that have been removed in setuptools. + + Since ``setuptools`` is built on ``distutils``, simply removing a command + from ``setuptools`` will make the behavior fall back to ``distutils``; this + error is raised if a command exists in ``distutils`` but has been actively + removed in ``setuptools``. + """ diff --git a/setuptools/tests/test_register.py b/setuptools/tests/test_register.py index 96114595db..986058067b 100644 --- a/setuptools/tests/test_register.py +++ b/setuptools/tests/test_register.py @@ -1,43 +1,22 @@ -import mock -from distutils import log - -import pytest - from setuptools.command.register import register from setuptools.dist import Distribution +from setuptools.errors import RemovedCommandError +try: + from unittest import mock +except ImportError: + import mock -class TestRegisterTest: - def test_warns_deprecation(self): - dist = Distribution() - - cmd = register(dist) - cmd.run_command = mock.Mock() - cmd.send_metadata = mock.Mock() - cmd.announce = mock.Mock() - - cmd.run() +import pytest - cmd.announce.assert_called_with( - "WARNING: Registering is deprecated, use twine to upload instead " - "(https://pypi.org/p/twine/)", - log.WARN - ) - def test_warns_deprecation_when_raising(self): +class TestRegister: + def test_register_exception(self): + """Ensure that the register command has been properly removed.""" dist = Distribution() + dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] cmd = register(dist) - cmd.run_command = mock.Mock() - cmd.send_metadata = mock.Mock() - cmd.send_metadata.side_effect = Exception - cmd.announce = mock.Mock() - with pytest.raises(Exception): + with pytest.raises(RemovedCommandError): cmd.run() - - cmd.announce.assert_called_with( - "WARNING: Registering is deprecated, use twine to upload instead " - "(https://pypi.org/p/twine/)", - log.WARN - ) diff --git a/setuptools/tests/test_upload.py b/setuptools/tests/test_upload.py index 320c6959da..7586cb262d 100644 --- a/setuptools/tests/test_upload.py +++ b/setuptools/tests/test_upload.py @@ -1,213 +1,22 @@ -import mock -import os -import re - -from distutils import log -from distutils.errors import DistutilsError - -import pytest - from setuptools.command.upload import upload from setuptools.dist import Distribution -from setuptools.extern import six - - -def _parse_upload_body(body): - boundary = u'\r\n----------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - entries = [] - name_re = re.compile(u'^Content-Disposition: form-data; name="([^\"]+)"') - - for entry in body.split(boundary): - pair = entry.split(u'\r\n\r\n') - if not len(pair) == 2: - continue - - key, value = map(six.text_type.strip, pair) - m = name_re.match(key) - if m is not None: - key = m.group(1) - - entries.append((key, value)) - - return entries - - -@pytest.fixture -def patched_upload(tmpdir): - class Fix: - def __init__(self, cmd, urlopen): - self.cmd = cmd - self.urlopen = urlopen - - def __iter__(self): - return iter((self.cmd, self.urlopen)) - - def get_uploaded_metadata(self): - request = self.urlopen.call_args_list[0][0][0] - body = request.data.decode('utf-8') - entries = dict(_parse_upload_body(body)) - - return entries +from setuptools.errors import RemovedCommandError - class ResponseMock(mock.Mock): - def getheader(self, name, default=None): - """Mocked getheader method for response object""" - return { - 'content-type': 'text/plain; charset=utf-8', - }.get(name.lower(), default) +try: + from unittest import mock +except ImportError: + import mock - with mock.patch('setuptools.command.upload.urlopen') as urlopen: - urlopen.return_value = ResponseMock() - urlopen.return_value.getcode.return_value = 200 - urlopen.return_value.read.return_value = b'' - - content = os.path.join(str(tmpdir), "content_data") - - with open(content, 'w') as f: - f.write("Some content") - - dist = Distribution() - dist.dist_files = [('sdist', '3.7.0', content)] - - cmd = upload(dist) - cmd.announce = mock.Mock() - cmd.username = 'user' - cmd.password = 'hunter2' - - yield Fix(cmd, urlopen) - - -class TestUploadTest: - def test_upload_metadata(self, patched_upload): - cmd, patch = patched_upload - - # Set the metadata version to 2.1 - cmd.distribution.metadata.metadata_version = '2.1' - - # Run the command - cmd.ensure_finalized() - cmd.run() - - # Make sure we did the upload - patch.assert_called_once() - - # Make sure the metadata version is correct in the headers - entries = patched_upload.get_uploaded_metadata() - assert entries['metadata_version'] == '2.1' - - def test_warns_deprecation(self): - dist = Distribution() - dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] - - cmd = upload(dist) - cmd.upload_file = mock.Mock() - cmd.announce = mock.Mock() - - cmd.run() +import pytest - cmd.announce.assert_called_once_with( - "WARNING: Uploading via this command is deprecated, use twine to " - "upload instead (https://pypi.org/p/twine/)", - log.WARN - ) - def test_warns_deprecation_when_raising(self): +class TestUpload: + def test_upload_exception(self): + """Ensure that the register command has been properly removed.""" dist = Distribution() dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())] cmd = upload(dist) - cmd.upload_file = mock.Mock() - cmd.upload_file.side_effect = Exception - cmd.announce = mock.Mock() - - with pytest.raises(Exception): - cmd.run() - - cmd.announce.assert_called_once_with( - "WARNING: Uploading via this command is deprecated, use twine to " - "upload instead (https://pypi.org/p/twine/)", - log.WARN - ) - - @pytest.mark.parametrize('url', [ - 'https://example.com/a;parameter', # Has parameters - 'https://example.com/a?query', # Has query - 'https://example.com/a#fragment', # Has fragment - 'ftp://example.com', # Invalid scheme - - ]) - def test_upload_file_invalid_url(self, url, patched_upload): - patched_upload.urlopen.side_effect = Exception("Should not be reached") - - cmd = patched_upload.cmd - cmd.repository = url - - cmd.ensure_finalized() - with pytest.raises(AssertionError): - cmd.run() - - def test_upload_file_http_error(self, patched_upload): - patched_upload.urlopen.side_effect = six.moves.urllib.error.HTTPError( - 'https://example.com', - 404, - 'File not found', - None, - None - ) - - cmd = patched_upload.cmd - cmd.ensure_finalized() - with pytest.raises(DistutilsError): + with pytest.raises(RemovedCommandError): cmd.run() - - cmd.announce.assert_any_call( - 'Upload failed (404): File not found', - log.ERROR) - - def test_upload_file_os_error(self, patched_upload): - patched_upload.urlopen.side_effect = OSError("Invalid") - - cmd = patched_upload.cmd - cmd.ensure_finalized() - - with pytest.raises(OSError): - cmd.run() - - cmd.announce.assert_any_call('Invalid', log.ERROR) - - @mock.patch('setuptools.command.upload.spawn') - def test_upload_file_gpg(self, spawn, patched_upload): - cmd, urlopen = patched_upload - - cmd.sign = True - cmd.identity = "Alice" - cmd.dry_run = True - content_fname = cmd.distribution.dist_files[0][2] - signed_file = content_fname + '.asc' - - with open(signed_file, 'wb') as f: - f.write("signed-data".encode('utf-8')) - - cmd.ensure_finalized() - cmd.run() - - # Make sure that GPG was called - spawn.assert_called_once_with([ - "gpg", "--detach-sign", "--local-user", "Alice", "-a", - content_fname - ], dry_run=True) - - # Read the 'signed' data that was transmitted - entries = patched_upload.get_uploaded_metadata() - assert entries['gpg_signature'] == 'signed-data' - - def test_show_response_no_error(self, patched_upload): - # This test is just that show_response doesn't throw an error - # It is not really important what the printed response looks like - # in a deprecated command, but we don't want to introduce new - # errors when importing this function from distutils - - patched_upload.cmd.show_response = True - patched_upload.cmd.ensure_finalized() - patched_upload.cmd.run() From 14c82188dae748fb7a7dd126fb2a5553e4865c95 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 8 Oct 2019 12:18:31 +0200 Subject: [PATCH 7591/8469] test: drop pkg_resources tests dependency on easy_install --- .../data/my-test-package-source/setup.cfg | 0 .../data/my-test-package-source/setup.py | 6 ++ .../EGG-INFO/PKG-INFO | 10 +++ .../EGG-INFO/SOURCES.txt | 7 +++ .../EGG-INFO/dependency_links.txt | 1 + .../EGG-INFO/top_level.txt | 1 + .../EGG-INFO/zip-safe | 1 + .../my_test_package-1.0-py3.7.egg | Bin 0 -> 843 bytes .../tests/test_find_distributions.py | 58 ++++-------------- pytest.ini | 2 +- 10 files changed, 40 insertions(+), 46 deletions(-) create mode 100644 pkg_resources/tests/data/my-test-package-source/setup.cfg create mode 100644 pkg_resources/tests/data/my-test-package-source/setup.py create mode 100644 pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/PKG-INFO create mode 100644 pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/SOURCES.txt create mode 100644 pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/dependency_links.txt create mode 100644 pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/top_level.txt create mode 100644 pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/zip-safe create mode 100644 pkg_resources/tests/data/my-test-package_zipped-egg/my_test_package-1.0-py3.7.egg diff --git a/pkg_resources/tests/data/my-test-package-source/setup.cfg b/pkg_resources/tests/data/my-test-package-source/setup.cfg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg_resources/tests/data/my-test-package-source/setup.py b/pkg_resources/tests/data/my-test-package-source/setup.py new file mode 100644 index 0000000000..fe80d28f46 --- /dev/null +++ b/pkg_resources/tests/data/my-test-package-source/setup.py @@ -0,0 +1,6 @@ +import setuptools +setuptools.setup( + name="my-test-package", + version="1.0", + zip_safe=True, +) diff --git a/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/PKG-INFO b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/PKG-INFO new file mode 100644 index 0000000000..7328e3f7d1 --- /dev/null +++ b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: my-test-package +Version: 1.0 +Summary: UNKNOWN +Home-page: UNKNOWN +Author: UNKNOWN +Author-email: UNKNOWN +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN diff --git a/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/SOURCES.txt b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/SOURCES.txt new file mode 100644 index 0000000000..3c4ee1676d --- /dev/null +++ b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/SOURCES.txt @@ -0,0 +1,7 @@ +setup.cfg +setup.py +my_test_package.egg-info/PKG-INFO +my_test_package.egg-info/SOURCES.txt +my_test_package.egg-info/dependency_links.txt +my_test_package.egg-info/top_level.txt +my_test_package.egg-info/zip-safe \ No newline at end of file diff --git a/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/dependency_links.txt b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/dependency_links.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/top_level.txt b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/top_level.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/top_level.txt @@ -0,0 +1 @@ + diff --git a/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/zip-safe b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/zip-safe new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/zip-safe @@ -0,0 +1 @@ + diff --git a/pkg_resources/tests/data/my-test-package_zipped-egg/my_test_package-1.0-py3.7.egg b/pkg_resources/tests/data/my-test-package_zipped-egg/my_test_package-1.0-py3.7.egg new file mode 100644 index 0000000000000000000000000000000000000000..5115b8957da8213d02b718649c8702ac88bf0e72 GIT binary patch literal 843 zcmWIWW@Zs#U|`^2n5Zq`&m4DbLIsew8;Avg*wx)#*VE6*?dE<9UVG zTUYDcne&^246YbI_~d=YcWcmzwO4dKb@eXldib34^YMS`6etukYxeAjkj$k5ub#hs zF8}WM(~0wEbA`;B*CkM-qkHm%zSHy9%buyFJyUS0HJTj!xohH&~mV7-!xlG;;_T+IdotQYo{ zdscNMxpHZVUROLaU%=<_fu5xwzcf|f-Fr0ogxjs30UtHBu5OoL>{fg&CcQwgsq5zY z{)cy0Y^(lyJ^9V@^PAE-|c literal 0 HcmV?d00001 diff --git a/pkg_resources/tests/test_find_distributions.py b/pkg_resources/tests/test_find_distributions.py index d735c5902f..f9594422f2 100644 --- a/pkg_resources/tests/test_find_distributions.py +++ b/pkg_resources/tests/test_find_distributions.py @@ -1,17 +1,9 @@ -import subprocess -import sys - +import py import pytest import pkg_resources -SETUP_TEMPLATE = """ -import setuptools -setuptools.setup( - name="my-test-package", - version="1.0", - zip_safe=True, -) -""".lstrip() + +TESTS_DATA_DIR = py.path.local(__file__).dirpath('data') class TestFindDistributions: @@ -21,46 +13,22 @@ def target_dir(self, tmpdir): target_dir = tmpdir.mkdir('target') # place a .egg named directory in the target that is not an egg: target_dir.mkdir('not.an.egg') - return str(target_dir) - - @pytest.fixture - def project_dir(self, tmpdir): - project_dir = tmpdir.mkdir('my-test-package') - (project_dir / "setup.py").write(SETUP_TEMPLATE) - return str(project_dir) + return target_dir def test_non_egg_dir_named_egg(self, target_dir): - dists = pkg_resources.find_distributions(target_dir) + dists = pkg_resources.find_distributions(str(target_dir)) assert not list(dists) - def test_standalone_egg_directory(self, project_dir, target_dir): - # install this distro as an unpacked egg: - args = [ - sys.executable, - '-c', 'from setuptools.command.easy_install import main; main()', - '-mNx', - '-d', target_dir, - '--always-unzip', - project_dir, - ] - subprocess.check_call(args) - dists = pkg_resources.find_distributions(target_dir) + def test_standalone_egg_directory(self, target_dir): + (TESTS_DATA_DIR / 'my-test-package_unpacked-egg').copy(target_dir) + dists = pkg_resources.find_distributions(str(target_dir)) assert [dist.project_name for dist in dists] == ['my-test-package'] - dists = pkg_resources.find_distributions(target_dir, only=True) + dists = pkg_resources.find_distributions(str(target_dir), only=True) assert not list(dists) - def test_zipped_egg(self, project_dir, target_dir): - # install this distro as an unpacked egg: - args = [ - sys.executable, - '-c', 'from setuptools.command.easy_install import main; main()', - '-mNx', - '-d', target_dir, - '--zip-ok', - project_dir, - ] - subprocess.check_call(args) - dists = pkg_resources.find_distributions(target_dir) + def test_zipped_egg(self, target_dir): + (TESTS_DATA_DIR / 'my-test-package_zipped-egg').copy(target_dir) + dists = pkg_resources.find_distributions(str(target_dir)) assert [dist.project_name for dist in dists] == ['my-test-package'] - dists = pkg_resources.find_distributions(target_dir, only=True) + dists = pkg_resources.find_distributions(str(target_dir), only=True) assert not list(dists) diff --git a/pytest.ini b/pytest.ini index 5886973bad..0bc1ec0114 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern tools .* +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* flake8-ignore = setuptools/site-patch.py F821 setuptools/py*compat.py F811 From bbf825eee764cae0bc44077ccc957a733d53d095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Fri, 15 Nov 2019 08:52:35 +0100 Subject: [PATCH 7592/8469] Fix _imp module behaviour if is defined paths in find_spec call fixes #1896 --- setuptools/_imp.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index a3cce9b284..6ccec57993 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -19,7 +19,10 @@ def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder().find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if spec is None: raise ImportError("Can't find %s" % module) if not spec.has_location and hasattr(spec, 'submodule_search_locations'): @@ -60,14 +63,20 @@ def find_module(module, paths=None): def get_frozen_object(module, paths=None): - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder().find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return spec.loader.get_code(module) def get_module(module, paths, info): - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder().find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return module_from_spec(spec) From fed59d837495208c13cec64b5394cdd2cc3cb6de Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 14 Nov 2019 19:09:20 +0100 Subject: [PATCH 7593/8469] tests: fix some pytest warnings under Python 2 --- setuptools/tests/test_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 1c0b2b18bb..f1a27f8be8 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -64,7 +64,7 @@ def fin(): monkeypatch.setattr('site.USER_BASE', user_base.strpath) monkeypatch.setattr('site.USER_SITE', user_site.strpath) monkeypatch.setattr('sys.path', sys.path + [install_dir.strpath]) - monkeypatch.setenv('PYTHONPATH', os.path.pathsep.join(sys.path)) + monkeypatch.setenv(str('PYTHONPATH'), str(os.path.pathsep.join(sys.path))) # Set up the command for performing the installation. dist = Distribution() From 77fa2369892b7e45ede9cad18aaa3f0721c96cc3 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 15 Nov 2019 19:06:26 +0100 Subject: [PATCH 7594/8469] tweak workaround for #1644 Work around buggy pip detection code for "pip.exe install/update pip ...". --- tools/tox_pip.py | 11 ++++++++++- tox.ini | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 1117f99653..5aeca80503 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -17,12 +17,21 @@ def pip(args): 'pip']) shutil.rmtree(glob(os.path.join(TOX_PIP_DIR, 'pip-*.dist-info'))[0]) # And use that version. + pypath = os.environ.get('PYTHONPATH') + pypath = pypath.split(os.pathsep) if pypath is not None else [] + pypath.insert(0, TOX_PIP_DIR) + os.environ['PYTHONPATH'] = os.pathsep.join(pypath) + # Disable PEP 517 support when using editable installs. for n, a in enumerate(args): if not a.startswith('-'): if a in 'install' and '-e' in args[n:]: args.insert(n + 1, '--no-use-pep517') break - subprocess.check_call([sys.executable, os.path.join(TOX_PIP_DIR, 'pip')] + args) + # Fix call for setuptools editable install. + for n, a in enumerate(args): + if a == '.': + args[n] = os.getcwd() + subprocess.check_call([sys.executable, '-m', 'pip'] + args, cwd=TOX_PIP_DIR) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 8b34c235c9..5d439cb34b 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ envlist=python pip = python {toxinidir}/tools/tox_pip.py [testenv] -deps=-rtests/requirements.txt +deps=-r{toxinidir}/tests/requirements.txt install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} From d6948c636f5e657ac56911b71b7a459d326d8389 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 29 Apr 2018 19:47:42 +0200 Subject: [PATCH 7595/8469] dist: re-implement `fetch_build_egg` to use pip --- docs/setuptools.txt | 17 +-- setuptools/dist.py | 28 +--- setuptools/installer.py | 129 +++++++++++++++++ setuptools/tests/server.py | 19 ++- setuptools/tests/test_easy_install.py | 197 +++++++++++++++++++++----- setuptools/tests/test_virtualenv.py | 18 ++- tests/requirements.txt | 1 + 7 files changed, 336 insertions(+), 73 deletions(-) create mode 100644 setuptools/installer.py diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 399a56d3ca..9c8821dc81 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -282,10 +282,11 @@ unless you need the associated ``setuptools`` feature. ``setup_requires`` A string or list of strings specifying what other distributions need to be present in order for the *setup script* to run. ``setuptools`` will - attempt to obtain these before processing the rest of the setup script or - commands. This argument is needed if you are using distutils extensions as - part of your build process; for example, extensions that process setup() - arguments and turn them into EGG-INFO metadata files. + attempt to obtain these (using pip if available) before processing the + rest of the setup script or commands. This argument is needed if you + are using distutils extensions as part of your build process; for + example, extensions that process setup() arguments and turn them into + EGG-INFO metadata files. (Note: projects listed in ``setup_requires`` will NOT be automatically installed on the system where the setup script is being run. They are @@ -332,10 +333,10 @@ unless you need the associated ``setuptools`` feature. needed to install it, you can use this option to specify them. It should be a string or list of strings specifying what other distributions need to be present for the package's tests to run. When you run the ``test`` - command, ``setuptools`` will attempt to obtain these. Note that these - required projects will *not* be installed on the system where the tests - are run, but only downloaded to the project's setup directory if they're - not already installed locally. + command, ``setuptools`` will attempt to obtain these (using pip if + available). Note that these required projects will *not* be installed on + the system where the tests are run, but only downloaded to the project's setup + directory if they're not already installed locally. New in 41.5.0: Deprecated the test command. diff --git a/setuptools/dist.py b/setuptools/dist.py index 2e5ad4bd68..4a76b52beb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -759,32 +759,8 @@ def get_egg_cache_dir(self): def fetch_build_egg(self, req): """Fetch an egg needed for building""" - from setuptools.command.easy_install import easy_install - dist = self.__class__({'script_args': ['easy_install']}) - opts = dist.get_option_dict('easy_install') - opts.clear() - opts.update( - (k, v) - for k, v in self.get_option_dict('easy_install').items() - if k in ( - # don't use any other settings - 'find_links', 'site_dirs', 'index_url', - 'optimize', 'site_dirs', 'allow_hosts', - )) - if self.dependency_links: - links = self.dependency_links[:] - if 'find_links' in opts: - links = opts['find_links'][1] + links - opts['find_links'] = ('setup', links) - install_dir = self.get_egg_cache_dir() - cmd = easy_install( - dist, args=["x"], install_dir=install_dir, - exclude_scripts=True, - always_copy=False, build_directory=None, editable=False, - upgrade=False, multi_version=True, no_report=True, user=False - ) - cmd.ensure_finalized() - return cmd.easy_install(req) + from setuptools.installer import fetch_build_egg + return fetch_build_egg(self, req) def _set_global_opts_from_features(self): """Add --with-X/--without-X options based on optional features""" diff --git a/setuptools/installer.py b/setuptools/installer.py new file mode 100644 index 0000000000..35bc3cc550 --- /dev/null +++ b/setuptools/installer.py @@ -0,0 +1,129 @@ +import glob +import os +import subprocess +import sys +from distutils import log +from distutils.errors import DistutilsError + +import pkg_resources +from setuptools.command.easy_install import easy_install +from setuptools.wheel import Wheel + +from .py31compat import TemporaryDirectory + + +def _legacy_fetch_build_egg(dist, req): + """Fetch an egg needed for building. + + Legacy path using EasyInstall. + """ + tmp_dist = dist.__class__({'script_args': ['easy_install']}) + opts = tmp_dist.get_option_dict('easy_install') + opts.clear() + opts.update( + (k, v) + for k, v in dist.get_option_dict('easy_install').items() + if k in ( + # don't use any other settings + 'find_links', 'site_dirs', 'index_url', + 'optimize', 'site_dirs', 'allow_hosts', + )) + if dist.dependency_links: + links = dist.dependency_links[:] + if 'find_links' in opts: + links = opts['find_links'][1] + links + opts['find_links'] = ('setup', links) + install_dir = dist.get_egg_cache_dir() + cmd = easy_install( + tmp_dist, args=["x"], install_dir=install_dir, + exclude_scripts=True, + always_copy=False, build_directory=None, editable=False, + upgrade=False, multi_version=True, no_report=True, user=False + ) + cmd.ensure_finalized() + return cmd.easy_install(req) + + +def fetch_build_egg(dist, req): + """Fetch an egg needed for building. + + Use pip/wheel to fetch/build a wheel.""" + # Check pip is available. + try: + pkg_resources.get_distribution('pip') + except pkg_resources.DistributionNotFound: + dist.announce( + 'WARNING: The pip package is not available, falling back ' + 'to EasyInstall for handling setup_requires/test_requires; ' + 'this is deprecated and will be removed in a future version.' + , log.WARN + ) + return _legacy_fetch_build_egg(dist, req) + # Warn if wheel is not. + try: + pkg_resources.get_distribution('wheel') + except pkg_resources.DistributionNotFound: + dist.announce('WARNING: The wheel package is not available.', log.WARN) + if not isinstance(req, pkg_resources.Requirement): + req = pkg_resources.Requirement.parse(req) + # Take easy_install options into account, but do not override relevant + # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll + # take precedence. + opts = dist.get_option_dict('easy_install') + if 'allow_hosts' in opts: + raise DistutilsError('the `allow-hosts` option is not supported ' + 'when using pip to install requirements.') + if 'PIP_QUIET' in os.environ or 'PIP_VERBOSE' in os.environ: + quiet = False + else: + quiet = True + if 'PIP_INDEX_URL' in os.environ: + index_url = None + elif 'index_url' in opts: + index_url = opts['index_url'][1] + else: + index_url = None + if 'find_links' in opts: + find_links = opts['find_links'][1][:] + else: + find_links = [] + if dist.dependency_links: + find_links.extend(dist.dependency_links) + eggs_dir = os.path.realpath(dist.get_egg_cache_dir()) + environment = pkg_resources.Environment() + for egg_dist in pkg_resources.find_distributions(eggs_dir): + if egg_dist in req and environment.can_add(egg_dist): + return egg_dist + with TemporaryDirectory() as tmpdir: + cmd = [ + sys.executable, '-m', 'pip', + '--disable-pip-version-check', + 'wheel', '--no-deps', + '-w', tmpdir, + ] + if quiet: + cmd.append('--quiet') + if index_url is not None: + cmd.extend(('--index-url', index_url)) + if find_links is not None: + for link in find_links: + cmd.extend(('--find-links', link)) + # If requirement is a PEP 508 direct URL, directly pass + # the URL to pip, as `req @ url` does not work on the + # command line. + if req.url: + cmd.append(req.url) + else: + cmd.append(str(req)) + try: + subprocess.check_call(cmd) + except subprocess.CalledProcessError as e: + raise DistutilsError(str(e)) + wheel = Wheel(glob.glob(os.path.join(tmpdir, '*.whl'))[0]) + dist_location = os.path.join(eggs_dir, wheel.egg_name()) + wheel.install_as_egg(dist_location) + dist_metadata = pkg_resources.PathMetadata( + dist_location, os.path.join(dist_location, 'EGG-INFO')) + dist = pkg_resources.Distribution.from_filename( + dist_location, metadata=dist_metadata) + return dist diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index fc3a5975ef..8b17b0816e 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -1,10 +1,13 @@ """Basic http server for tests to simulate PyPI or custom indexes """ +import os import time import threading from setuptools.extern.six.moves import BaseHTTPServer, SimpleHTTPServer +from setuptools.extern.six.moves.urllib_parse import urljoin +from setuptools.extern.six.moves.urllib.request import pathname2url class IndexServer(BaseHTTPServer.HTTPServer): @@ -69,6 +72,20 @@ def __init__( def run(self): self.serve_forever() + @property + def netloc(self): + return 'localhost:%s' % self.server_port + @property def url(self): - return 'http://localhost:%(server_port)s/' % vars(self) + return 'http://%s/' % self.netloc + + +def path_to_url(path, authority=None): + """ Convert a path to a file: URL. """ + path = os.path.normpath(os.path.abspath(path)) + base = 'file:' + if authority is not None: + base += '//' + authority + url = urljoin(base, pathname2url(path)) + return url diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c3fd1c6ef4..aa75899a06 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,24 +15,24 @@ import io import zipfile import mock -from setuptools.command.easy_install import ( - EasyInstallDeprecationWarning, ScriptWriter, WindowsScriptWriter, -) import time + from setuptools.extern import six -from setuptools.extern.six.moves import urllib import pytest from setuptools import sandbox from setuptools.sandbox import run_setup import setuptools.command.easy_install as ei -from setuptools.command.easy_install import PthDistributions +from setuptools.command.easy_install import ( + EasyInstallDeprecationWarning, ScriptWriter, PthDistributions, + WindowsScriptWriter, +) from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution -import setuptools.tests.server +from setuptools.tests.server import MockServer, path_to_url from setuptools.tests import fail_on_ascii import pkg_resources @@ -440,35 +440,40 @@ def distutils_package(): yield +@pytest.fixture +def mock_index(): + # set up a server which will simulate an alternate package index. + p_index = MockServer() + if p_index.server_port == 0: + # Some platforms (Jython) don't find a port to which to bind, + # so skip test for them. + pytest.skip("could not find a valid port") + p_index.start() + return p_index + + class TestDistutilsPackage: def test_bdist_egg_available_on_distutils_pkg(self, distutils_package): run_setup('setup.py', ['bdist_egg']) class TestSetupRequires: - def test_setup_requires_honors_fetch_params(self): + + def test_setup_requires_honors_fetch_params(self, mock_index, monkeypatch): """ When easy_install installs a source distribution which specifies setup_requires, it should honor the fetch parameters (such as - allow-hosts, index-url, and find-links). + index-url, and find-links). """ - # set up a server which will simulate an alternate package index. - p_index = setuptools.tests.server.MockServer() - p_index.start() - netloc = 1 - p_index_loc = urllib.parse.urlparse(p_index.url)[netloc] - if p_index_loc.endswith(':0'): - # Some platforms (Jython) don't find a port to which to bind, - # so skip this test for them. - return + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) with contexts.quiet(): # create an sdist that has a build-time dependency. with TestSetupRequires.create_sdist() as dist_file: with contexts.tempdir() as temp_install_dir: with contexts.environment(PYTHONPATH=temp_install_dir): ei_params = [ - '--index-url', p_index.url, - '--allow-hosts', p_index_loc, + '--index-url', mock_index.url, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file, @@ -478,10 +483,8 @@ def test_setup_requires_honors_fetch_params(self): # fail because it doesn't exist. with pytest.raises(SystemExit): easy_install_pkg.main(ei_params) - # there should have been two or three requests to the server - # (three happens on Python 3.3a) - assert 2 <= len(p_index.requests) <= 3 - assert p_index.requests[0].path == '/does-not-exist/' + # there should have been one requests to the server + assert [r.path for r in mock_index.requests] == ['/does-not-exist/'] @staticmethod @contextlib.contextmanager @@ -500,7 +503,9 @@ def create_sdist(): version="1.0", setup_requires = ['does-not-exist'], ) - """))]) + """)), + ('setup.cfg', ''), + ]) yield dist_path use_setup_cfg = ( @@ -632,6 +637,113 @@ def make_dependency_sdist(dist_path, distname, version): assert len(lines) > 0 assert lines[-1].strip() == '42' + def test_setup_requires_honors_pip_env(self, mock_index, monkeypatch): + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + monkeypatch.setenv(str('PIP_INDEX_URL'), mock_index.url) + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + test_pkg = create_setup_requires_package( + temp_dir, 'python-xlib', '0.19', + setup_attrs=dict(dependency_links=[])) + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + with open(test_setup_cfg, 'w') as fp: + fp.write(DALS( + ''' + [easy_install] + index_url = https://pypi.org/legacy/ + ''')) + test_setup_py = os.path.join(test_pkg, 'setup.py') + with pytest.raises(distutils.errors.DistutilsError): + run_setup(test_setup_py, [str('--version')]) + assert len(mock_index.requests) == 1 + assert mock_index.requests[0].path == '/python-xlib/' + + def test_setup_requires_with_pep508_url(self, mock_index, monkeypatch): + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + monkeypatch.setenv(str('PIP_INDEX_URL'), mock_index.url) + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + dep_sdist = os.path.join(temp_dir, 'dep.tar.gz') + make_trivial_sdist(dep_sdist, 'dependency', '42') + dep_url = path_to_url(dep_sdist, authority='localhost') + test_pkg = create_setup_requires_package( + temp_dir, + 'python-xlib', '0.19', # Ignored (overriden by setup_attrs). + setup_attrs=dict(setup_requires='dependency @ %s' % dep_url)) + test_setup_py = os.path.join(test_pkg, 'setup.py') + run_setup(test_setup_py, [str('--version')]) + assert len(mock_index.requests) == 0 + + def test_setup_requires_with_allow_hosts(self, mock_index): + ''' The `allow-hosts` option in not supported anymore. ''' + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + test_pkg = os.path.join(temp_dir, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + with open(test_setup_py, 'w') as fp: + fp.write(DALS( + ''' + from setuptools import setup + setup(setup_requires='python-xlib') + ''')) + with open(test_setup_cfg, 'w') as fp: + fp.write(DALS( + ''' + [easy_install] + allow_hosts = * + ''')) + with pytest.raises(distutils.errors.DistutilsError): + run_setup(test_setup_py, [str('--version')]) + assert len(mock_index.requests) == 0 + + def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): + ''' Check `python_requires` is honored. ''' + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + monkeypatch.setenv(str('PIP_NO_INDEX'), str('1')) + monkeypatch.setenv(str('PIP_VERBOSE'), str('1')) + dep_1_0_sdist = 'dep-1.0.tar.gz' + dep_1_0_url = path_to_url(str(tmpdir / dep_1_0_sdist)) + dep_1_0_python_requires = '>=2.7' + make_python_requires_sdist(str(tmpdir / dep_1_0_sdist), 'dep', '1.0', dep_1_0_python_requires) + dep_2_0_sdist = 'dep-2.0.tar.gz' + dep_2_0_url = path_to_url(str(tmpdir / dep_2_0_sdist)) + dep_2_0_python_requires = '!=' + '.'.join(map(str, sys.version_info[:2])) + '.*' + make_python_requires_sdist(str(tmpdir / dep_2_0_sdist), 'dep', '2.0', dep_2_0_python_requires) + index = tmpdir / 'index.html' + index.write_text(DALS( + ''' + + Links for dep + +

    Links for dep

    + {dep_1_0_sdist}
    + {dep_2_0_sdist}
    + + + ''').format( + dep_1_0_url=dep_1_0_url, + dep_1_0_sdist=dep_1_0_sdist, + dep_1_0_python_requires=dep_1_0_python_requires, + dep_2_0_url=dep_2_0_url, + dep_2_0_sdist=dep_2_0_sdist, + dep_2_0_python_requires=dep_2_0_python_requires, + ), 'utf-8') + index_url = path_to_url(str(index)) + with contexts.save_pkg_resources_state(): + test_pkg = create_setup_requires_package( + str(tmpdir), + 'python-xlib', '0.19', # Ignored (overriden by setup_attrs). + setup_attrs=dict(setup_requires='dep', dependency_links=[index_url])) + test_setup_py = os.path.join(test_pkg, 'setup.py') + run_setup(test_setup_py, [str('--version')]) + eggs = list(map(str, pkg_resources.find_distributions(os.path.join(test_pkg, '.eggs')))) + assert eggs == ['dep 1.0'] + def make_trivial_sdist(dist_path, distname, version): """ @@ -647,7 +759,9 @@ def make_trivial_sdist(dist_path, distname, version): name=%r, version=%r ) - """ % (distname, version)))]) + """ % (distname, version))), + ('setup.cfg', ''), + ]) def make_nspkg_sdist(dist_path, distname, version): @@ -683,12 +797,29 @@ def make_nspkg_sdist(dist_path, distname, version): make_sdist(dist_path, files) +def make_python_requires_sdist(dist_path, distname, version, python_requires): + make_sdist(dist_path, [ + ('setup.py', DALS("""\ + import setuptools + setuptools.setup( + name={name!r}, + version={version!r}, + python_requires={python_requires!r}, + ) + """).format(name=distname, version=version, + python_requires=python_requires)), + ('setup.cfg', ''), + ]) + + def make_sdist(dist_path, files): """ Create a simple sdist tarball at dist_path, containing the files listed in ``files`` as ``(filename, content)`` tuples. """ + # Distributions with only one file don't play well with pip. + assert len(files) > 1 with tarfile.open(dist_path, 'w:gz') as dist: for filename, content in files: file_bytes = io.BytesIO(content.encode('utf-8')) @@ -721,8 +852,8 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', test_pkg = os.path.join(path, 'test_pkg') os.mkdir(test_pkg) + # setup.cfg if use_setup_cfg: - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') options = [] metadata = [] for name in use_setup_cfg: @@ -734,8 +865,7 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', if isinstance(value, (tuple, list)): value = ';'.join(value) section.append('%s: %s' % (name, value)) - with open(test_setup_cfg, 'w') as f: - f.write(DALS( + test_setup_cfg_contents = DALS( """ [metadata] {metadata} @@ -745,16 +875,19 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', ).format( options='\n'.join(options), metadata='\n'.join(metadata), - )) - - test_setup_py = os.path.join(test_pkg, 'setup.py') + ) + else: + test_setup_cfg_contents = '' + with open(os.path.join(test_pkg, 'setup.cfg'), 'w') as f: + f.write(test_setup_cfg_contents) + # setup.py if setup_py_template is None: setup_py_template = DALS("""\ import setuptools setuptools.setup(**%r) """) - with open(test_setup_py, 'w') as f: + with open(os.path.join(test_pkg, 'setup.py'), 'w') as f: f.write(setup_py_template % test_setup_attrs) foobar_path = os.path.join(path, '%s-%s.tar.gz' % (distname, version)) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 74a1284ce7..cd3d9313c3 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -121,14 +121,12 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) -def test_test_command_install_requirements(bare_virtualenv, tmpdir): +def _check_test_command_install_requirements(virtualenv, tmpdir): """ Check the test command will install all required dependencies. """ - bare_virtualenv.run(' && '.join(( - 'cd {source}', - 'python setup.py develop', - )).format(source=SOURCE_DIR)) + # Install setuptools. + virtualenv.run('python setup.py develop', cd=SOURCE_DIR) def sdist(distname, version): dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version)) @@ -179,12 +177,20 @@ def sdist(distname, version): open('success', 'w').close() ''')) # Run test command for test package. - bare_virtualenv.run(' && '.join(( + virtualenv.run(' && '.join(( 'cd {tmpdir}', 'python setup.py test -s test', )).format(tmpdir=tmpdir)) assert tmpdir.join('success').check() +def test_test_command_install_requirements(virtualenv, tmpdir): + # Ensure pip/wheel packages are installed. + virtualenv.run("python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") + _check_test_command_install_requirements(virtualenv, tmpdir) + +def test_test_command_install_requirements_when_using_easy_install(bare_virtualenv, tmpdir): + _check_test_command_install_requirements(bare_virtualenv, tmpdir) + def test_no_missing_dependencies(bare_virtualenv): """ diff --git a/tests/requirements.txt b/tests/requirements.txt index 1f70adee0a..1f8bd19d8c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -9,3 +9,4 @@ coverage>=4.5.1 pytest-cov>=2.5.1 paver; python_version>="3.6" futures; python_version=="2.7" +pip>=19.1 # For proper file:// URLs support. From 6e1838a9fb5feb000ba9b6a3c37c8b39d7e872b3 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 14 Nov 2019 21:51:33 +0100 Subject: [PATCH 7596/8469] drop easy_install script and associated documentation --- docs/easy_install.txt | 1085 ------------------------- docs/index.txt | 1 - easy_install.py | 5 - setup.cfg | 1 - setup.py | 19 - setuptools/command/easy_install.py | 55 +- setuptools/tests/test_easy_install.py | 34 +- setuptools/tests/test_namespaces.py | 5 +- 8 files changed, 21 insertions(+), 1184 deletions(-) delete mode 100644 docs/easy_install.txt delete mode 100644 easy_install.py diff --git a/docs/easy_install.txt b/docs/easy_install.txt deleted file mode 100644 index 544b9efd59..0000000000 --- a/docs/easy_install.txt +++ /dev/null @@ -1,1085 +0,0 @@ -============ -Easy Install -============ - -.. warning:: - Easy Install is deprecated. Do not use it. Instead use pip. If - you think you need Easy Install, please reach out to the PyPA - team (a ticket to pip or setuptools is fine), describing your - use-case. - -Easy Install is a python module (``easy_install``) bundled with ``setuptools`` -that lets you automatically download, build, install, and manage Python -packages. - -Please share your experiences with us! If you encounter difficulty installing -a package, please contact us via the `distutils mailing list -`_. (Note: please DO NOT send -private email directly to the author of setuptools; it will be discarded. The -mailing list is a searchable archive of previously-asked and answered -questions; you should begin your research there before reporting something as a -bug -- and then do so via list discussion first.) - -(Also, if you'd like to learn about how you can use ``setuptools`` to make your -own packages work better with EasyInstall, or provide EasyInstall-like features -without requiring your users to use EasyInstall directly, you'll probably want -to check out the full documentation as well.) - -.. contents:: **Table of Contents** - - -Using "Easy Install" -==================== - - -.. _installation instructions: - -Installing "Easy Install" -------------------------- - -Please see the `setuptools PyPI page `_ -for download links and basic installation instructions for each of the -supported platforms. - -You will need at least Python 3.4 or 2.7. An ``easy_install`` script will be -installed in the normal location for Python scripts on your platform. - -Note that the instructions on the setuptools PyPI page assume that you are -are installing to Python's primary ``site-packages`` directory. If this is -not the case, you should consult the section below on `Custom Installation -Locations`_ before installing. (And, on Windows, you should not use the -``.exe`` installer when installing to an alternate location.) - -Note that ``easy_install`` normally works by downloading files from the -internet. If you are behind an NTLM-based firewall that prevents Python -programs from accessing the net directly, you may wish to first install and use -the `APS proxy server `_, which lets you get past such -firewalls in the same way that your web browser(s) do. - -(Alternately, if you do not wish easy_install to actually download anything, you -can restrict it from doing so with the ``--allow-hosts`` option; see the -sections on `restricting downloads with --allow-hosts`_ and `command-line -options`_ for more details.) - - -Troubleshooting -~~~~~~~~~~~~~~~ - -If EasyInstall/setuptools appears to install correctly, and you can run the -``easy_install`` command but it fails with an ``ImportError``, the most likely -cause is that you installed to a location other than ``site-packages``, -without taking any of the steps described in the `Custom Installation -Locations`_ section below. Please see that section and follow the steps to -make sure that your custom location will work correctly. Then re-install. - -Similarly, if you can run ``easy_install``, and it appears to be installing -packages, but then you can't import them, the most likely issue is that you -installed EasyInstall correctly but are using it to install packages to a -non-standard location that hasn't been properly prepared. Again, see the -section on `Custom Installation Locations`_ for more details. - - -Windows Notes -~~~~~~~~~~~~~ - -Installing setuptools will provide an ``easy_install`` command according to -the techniques described in `Executables and Launchers`_. If the -``easy_install`` command is not available after installation, that section -provides details on how to configure Windows to make the commands available. - - -Downloading and Installing a Package ------------------------------------- - -For basic use of ``easy_install``, you need only supply the filename or URL of -a source distribution or .egg file (`Python Egg`__). - -__ http://peak.telecommunity.com/DevCenter/PythonEggs - -**Example 1**. Install a package by name, searching PyPI for the latest -version, and automatically downloading, building, and installing it:: - - easy_install SQLObject - -**Example 2**. Install or upgrade a package by name and version by finding -links on a given "download page":: - - easy_install -f http://pythonpaste.org/package_index.html SQLObject - -**Example 3**. Download a source distribution from a specified URL, -automatically building and installing it:: - - easy_install http://example.com/path/to/MyPackage-1.2.3.tgz - -**Example 4**. Install an already-downloaded .egg file:: - - easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg - -**Example 5**. Upgrade an already-installed package to the latest version -listed on PyPI:: - - easy_install --upgrade PyProtocols - -**Example 6**. Install a source distribution that's already downloaded and -extracted in the current directory (New in 0.5a9):: - - easy_install . - -**Example 7**. (New in 0.6a1) Find a source distribution or Subversion -checkout URL for a package, and extract it or check it out to -``~/projects/sqlobject`` (the name will always be in all-lowercase), where it -can be examined or edited. (The package will not be installed, but it can -easily be installed with ``easy_install ~/projects/sqlobject``. See `Editing -and Viewing Source Packages`_ below for more info.):: - - easy_install --editable --build-directory ~/projects SQLObject - -**Example 7**. (New in 0.6.11) Install a distribution within your home dir:: - - easy_install --user SQLAlchemy - -Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils`` -"distribution" names), and package+version specifiers. In each case, it will -attempt to locate the latest available version that meets your criteria. - -When downloading or processing downloaded files, Easy Install recognizes -distutils source distribution files with extensions of .tgz, .tar, .tar.gz, -.tar.bz2, or .zip. And of course it handles already-built .egg -distributions as well as ``.win32.exe`` installers built using distutils. - -By default, packages are installed to the running Python installation's -``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir`` -option to specify an alternative directory, or specify an alternate location -using distutils configuration files. (See `Configuration Files`_, below.) - -By default, any scripts included with the package are installed to the running -Python installation's standard script installation location. However, if you -specify an installation directory via the command line or a config file, then -the default directory for installing scripts will be the same as the package -installation directory, to ensure that the script will have access to the -installed package. You can override this using the ``-s`` or ``--script-dir`` -option. - -Installed packages are added to an ``easy-install.pth`` file in the install -directory, so that Python will always use the most-recently-installed version -of the package. If you would like to be able to select which version to use at -runtime, you should use the ``-m`` or ``--multi-version`` option. - - -Upgrading a Package -------------------- - -You don't need to do anything special to upgrade a package: just install the -new version, either by requesting a specific version, e.g.:: - - easy_install "SomePackage==2.0" - -a version greater than the one you have now:: - - easy_install "SomePackage>2.0" - -using the upgrade flag, to find the latest available version on PyPI:: - - easy_install --upgrade SomePackage - -or by using a download page, direct download URL, or package filename:: - - easy_install -f http://example.com/downloads ExamplePackage - - easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg - - easy_install my_downloads/ExamplePackage-2.0.tgz - -If you're using ``-m`` or ``--multi-version`` , using the ``require()`` -function at runtime automatically selects the newest installed version of a -package that meets your version criteria. So, installing a newer version is -the only step needed to upgrade such packages. - -If you're installing to a directory on PYTHONPATH, or a configured "site" -directory (and not using ``-m``), installing a package automatically replaces -any previous version in the ``easy-install.pth`` file, so that Python will -import the most-recently installed version by default. So, again, installing -the newer version is the only upgrade step needed. - -If you haven't suppressed script installation (using ``--exclude-scripts`` or -``-x``), then the upgraded version's scripts will be installed, and they will -be automatically patched to ``require()`` the corresponding version of the -package, so that you can use them even if they are installed in multi-version -mode. - -``easy_install`` never actually deletes packages (unless you're installing a -package with the same name and version number as an existing package), so if -you want to get rid of older versions of a package, please see `Uninstalling -Packages`_, below. - - -Changing the Active Version ---------------------------- - -If you've upgraded a package, but need to revert to a previously-installed -version, you can do so like this:: - - easy_install PackageName==1.2.3 - -Where ``1.2.3`` is replaced by the exact version number you wish to switch to. -If a package matching the requested name and version is not already installed -in a directory on ``sys.path``, it will be located via PyPI and installed. - -If you'd like to switch to the latest installed version of ``PackageName``, you -can do so like this:: - - easy_install PackageName - -This will activate the latest installed version. (Note: if you have set any -``find_links`` via distutils configuration files, those download pages will be -checked for the latest available version of the package, and it will be -downloaded and installed if it is newer than your current version.) - -Note that changing the active version of a package will install the newly -active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is -specified. - - -Uninstalling Packages ---------------------- - -If you have replaced a package with another version, then you can just delete -the package(s) you don't need by deleting the PackageName-versioninfo.egg file -or directory (found in the installation directory). - -If you want to delete the currently installed version of a package (or all -versions of a package), you should first run:: - - easy_install -m PackageName - -This will ensure that Python doesn't continue to search for a package you're -planning to remove. After you've done this, you can safely delete the .egg -files or directories, along with any scripts you wish to remove. - - -Managing Scripts ----------------- - -Whenever you install, upgrade, or change versions of a package, EasyInstall -automatically installs the scripts for the selected package version, unless -you tell it not to with ``-x`` or ``--exclude-scripts``. If any scripts in -the script directory have the same name, they are overwritten. - -Thus, you do not normally need to manually delete scripts for older versions of -a package, unless the newer version of the package does not include a script -of the same name. However, if you are completely uninstalling a package, you -may wish to manually delete its scripts. - -EasyInstall's default behavior means that you can normally only run scripts -from one version of a package at a time. If you want to keep multiple versions -of a script available, however, you can simply use the ``--multi-version`` or -``-m`` option, and rename the scripts that EasyInstall creates. This works -because EasyInstall installs scripts as short code stubs that ``require()`` the -matching version of the package the script came from, so renaming the script -has no effect on what it executes. - -For example, suppose you want to use two versions of the ``rst2html`` tool -provided by the `docutils `_ package. You might -first install one version:: - - easy_install -m docutils==0.3.9 - -then rename the ``rst2html.py`` to ``r2h_039``, and install another version:: - - easy_install -m docutils==0.3.10 - -This will create another ``rst2html.py`` script, this one using docutils -version 0.3.10 instead of 0.3.9. You now have two scripts, each using a -different version of the package. (Notice that we used ``-m`` for both -installations, so that Python won't lock us out of using anything but the most -recently-installed version of the package.) - - -Executables and Launchers -------------------------- - -On Unix systems, scripts are installed with as natural files with a "#!" -header and no extension and they launch under the Python version indicated in -the header. - -On Windows, there is no mechanism to "execute" files without extensions, so -EasyInstall provides two techniques to mirror the Unix behavior. The behavior -is indicated by the SETUPTOOLS_LAUNCHER environment variable, which may be -"executable" (default) or "natural". - -Regardless of the technique used, the script(s) will be installed to a Scripts -directory (by default in the Python installation directory). It is recommended -for EasyInstall that you ensure this directory is in the PATH environment -variable. The easiest way to ensure the Scripts directory is in the PATH is -to run ``Tools\Scripts\win_add2path.py`` from the Python directory. - -Note that instead of changing your ``PATH`` to include the Python scripts -directory, you can also retarget the installation location for scripts so they -go on a directory that's already on the ``PATH``. For more information see -`Command-Line Options`_ and `Configuration Files`_. During installation, -pass command line options (such as ``--script-dir``) to control where -scripts will be installed. - - -Windows Executable Launcher -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If the "executable" launcher is used, EasyInstall will create a '.exe' -launcher of the same name beside each installed script (including -``easy_install`` itself). These small .exe files launch the script of the -same name using the Python version indicated in the '#!' header. - -This behavior is currently default. To force -the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable". - -Natural Script Launcher -~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall also supports deferring to an external launcher such as -`pylauncher `_ for launching scripts. -Enable this experimental functionality by setting the -``SETUPTOOLS_LAUNCHER`` environment variable to "natural". EasyInstall will -then install scripts as simple -scripts with a .pya (or .pyw) extension appended. If these extensions are -associated with the pylauncher and listed in the PATHEXT environment variable, -these scripts can then be invoked simply and directly just like any other -executable. This behavior may become default in a future version. - -EasyInstall uses the .pya extension instead of simply -the typical '.py' extension. This distinct extension is necessary to prevent -Python -from treating the scripts as importable modules (where name conflicts exist). -Current releases of pylauncher do not yet associate with .pya files by -default, but future versions should do so. - - -Tips & Techniques ------------------ - -Multiple Python Versions -~~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall installs itself under two names: -``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version -used to install it. Thus, if you install EasyInstall for both Python 3.2 and -2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to -install packages for the respective Python version. - -Setuptools also supplies easy_install as a runnable module which may be -invoked using ``python -m easy_install`` for any Python with Setuptools -installed. - -Restricting Downloads with ``--allow-hosts`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can use the ``--allow-hosts`` (``-H``) option to restrict what domains -EasyInstall will look for links and downloads on. ``--allow-hosts=None`` -prevents downloading altogether. You can also use wildcards, for example -to restrict downloading to hosts in your own intranet. See the section below -on `Command-Line Options`_ for more details on the ``--allow-hosts`` option. - -By default, there are no host restrictions in effect, but you can change this -default by editing the appropriate `configuration files`_ and adding: - -.. code-block:: ini - - [easy_install] - allow_hosts = *.myintranet.example.com,*.python.org - -The above example would then allow downloads only from hosts in the -``python.org`` and ``myintranet.example.com`` domains, unless overridden on the -command line. - - -Installing on Un-networked Machines -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Just copy the eggs or source packages you need to a directory on the target -machine, then use the ``-f`` or ``--find-links`` option to specify that -directory's location. For example:: - - easy_install -H None -f somedir SomePackage - -will attempt to install SomePackage using only eggs and source packages found -in ``somedir`` and disallowing all remote access. You should of course make -sure you have all of SomePackage's dependencies available in somedir. - -If you have another machine of the same operating system and library versions -(or if the packages aren't platform-specific), you can create the directory of -eggs using a command like this:: - - easy_install -zmaxd somedir SomePackage - -This will tell EasyInstall to put zipped eggs or source packages for -SomePackage and all its dependencies into ``somedir``, without creating any -scripts or .pth files. You can then copy the contents of ``somedir`` to the -target machine. (``-z`` means zipped eggs, ``-m`` means multi-version, which -prevents .pth files from being used, ``-a`` means to copy all the eggs needed, -even if they're installed elsewhere on the machine, and ``-d`` indicates the -directory to place the eggs in.) - -You can also build the eggs from local development packages that were installed -with the ``setup.py develop`` command, by including the ``-l`` option, e.g.:: - - easy_install -zmaxld somedir SomePackage - -This will use locally-available source distributions to build the eggs. - - -Packaging Others' Projects As Eggs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Need to distribute a package that isn't published in egg form? You can use -EasyInstall to build eggs for a project. You'll want to use the ``--zip-ok``, -``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and -``-N``, respectively). Use ``-d`` or ``--install-dir`` to specify the location -where you'd like the eggs placed. By placing them in a directory that is -published to the web, you can then make the eggs available for download, either -in an intranet or to the internet at large. - -If someone distributes a package in the form of a single ``.py`` file, you can -wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL. -So, something like this:: - - easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo - -will install the package as an egg, and this:: - - easy_install -zmaxd. \ - -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo - -will create a ``.egg`` file in the current directory. - - -Creating your own Package Index -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In addition to local directories and the Python Package Index, EasyInstall can -find download links on most any web page whose URL is given to the ``-f`` -(``--find-links``) option. In the simplest case, you can simply have a web -page with links to eggs or Python source packages, even an automatically -generated directory listing (such as the Apache web server provides). - -If you are setting up an intranet site for package downloads, you may want to -configure the target machines to use your download site by default, adding -something like this to their `configuration files`_: - -.. code-block:: ini - - [easy_install] - find_links = http://mypackages.example.com/somedir/ - http://turbogears.org/download/ - http://peak.telecommunity.com/dist/ - -As you can see, you can list multiple URLs separated by whitespace, continuing -on multiple lines if necessary (as long as the subsequent lines are indented. - -If you are more ambitious, you can also create an entirely custom package index -or PyPI mirror. See the ``--index-url`` option under `Command-Line Options`_, -below, and also the section on `Package Index "API"`_. - - -Password-Protected Sites ------------------------- - -If a site you want to download from is password-protected using HTTP "Basic" -authentication, you can specify your credentials in the URL, like so:: - - http://some_userid:some_password@some.example.com/some_path/ - -You can do this with both index page URLs and direct download URLs. As long -as any HTML pages read by easy_install use *relative* links to point to the -downloads, the same user ID and password will be used to do the downloading. - -Using .pypirc Credentials -------------------------- - -In additional to supplying credentials in the URL, ``easy_install`` will also -honor credentials if present in the .pypirc file. Teams maintaining a private -repository of packages may already have defined access credentials for -uploading packages according to the distutils documentation. ``easy_install`` -will attempt to honor those if present. Refer to the distutils documentation -for Python 2.5 or later for details on the syntax. - -Controlling Build Options -~~~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall respects standard distutils `Configuration Files`_, so you can use -them to configure build options for packages that it installs from source. For -example, if you are on Windows using the MinGW compiler, you can configure the -default compiler by putting something like this: - -.. code-block:: ini - - [build] - compiler = mingw32 - -into the appropriate distutils configuration file. In fact, since this is just -normal distutils configuration, it will affect any builds using that config -file, not just ones done by EasyInstall. For example, if you add those lines -to ``distutils.cfg`` in the ``distutils`` package directory, it will be the -default compiler for *all* packages you build. See `Configuration Files`_ -below for a list of the standard configuration file locations, and links to -more documentation on using distutils configuration files. - - -Editing and Viewing Source Packages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Sometimes a package's source distribution contains additional documentation, -examples, configuration files, etc., that are not part of its actual code. If -you want to be able to examine these files, you can use the ``--editable`` -option to EasyInstall, and EasyInstall will look for a source distribution -or Subversion URL for the package, then download and extract it or check it out -as a subdirectory of the ``--build-directory`` you specify. If you then wish -to install the package after editing or configuring it, you can do so by -rerunning EasyInstall with that directory as the target. - -Note that using ``--editable`` stops EasyInstall from actually building or -installing the package; it just finds, obtains, and possibly unpacks it for -you. This allows you to make changes to the package if necessary, and to -either install it in development mode using ``setup.py develop`` (if the -package uses setuptools, that is), or by running ``easy_install projectdir`` -(where ``projectdir`` is the subdirectory EasyInstall created for the -downloaded package. - -In order to use ``--editable`` (``-e`` for short), you *must* also supply a -``--build-directory`` (``-b`` for short). The project will be placed in a -subdirectory of the build directory. The subdirectory will have the same -name as the project itself, but in all-lowercase. If a file or directory of -that name already exists, EasyInstall will print an error message and exit. - -Also, when using ``--editable``, you cannot use URLs or filenames as arguments. -You *must* specify project names (and optional version requirements) so that -EasyInstall knows what directory name(s) to create. If you need to force -EasyInstall to use a particular URL or filename, you should specify it as a -``--find-links`` item (``-f`` for short), and then also specify -the project name, e.g.:: - - easy_install -eb ~/projects \ - -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \ - ctypes==0.9.6 - - -Dealing with Installation Conflicts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that -people using older versions of EasyInstall can consult it. As of version -0.6a11, installation conflicts are handled automatically without deleting the -old or system-installed packages, and without ignoring the issue. Instead, -eggs are automatically shifted to the front of ``sys.path`` using special -code added to the ``easy-install.pth`` file. So, if you are using version -0.6a11 or better of setuptools, you do not need to worry about conflicts, -and the following issues do not apply to you.) - -EasyInstall installs distributions in a "managed" way, such that each -distribution can be independently activated or deactivated on ``sys.path``. -However, packages that were not installed by EasyInstall are "unmanaged", -in that they usually live all in one directory and cannot be independently -activated or deactivated. - -As a result, if you are using EasyInstall to upgrade an existing package, or -to install a package with the same name as an existing package, EasyInstall -will warn you of the conflict. (This is an improvement over ``setup.py -install``, because the ``distutils`` just install new packages on top of old -ones, possibly combining two unrelated packages or leaving behind modules that -have been deleted in the newer version of the package.) - -EasyInstall will stop the installation if it detects a conflict -between an existing, "unmanaged" package, and a module or package in any of -the distributions you're installing. It will display a list of all of the -existing files and directories that would need to be deleted for the new -package to be able to function correctly. To proceed, you must manually -delete these conflicting files and directories and re-run EasyInstall. - -Of course, once you've replaced all of your existing "unmanaged" packages with -versions managed by EasyInstall, you won't have any more conflicts to worry -about! - - -Compressed Installation -~~~~~~~~~~~~~~~~~~~~~~~ - -EasyInstall tries to install packages in zipped form, if it can. Zipping -packages can improve Python's overall import performance if you're not using -the ``--multi-version`` option, because Python processes zipfile entries on -``sys.path`` much faster than it does directories. - -As of version 0.5a9, EasyInstall analyzes packages to determine whether they -can be safely installed as a zipfile, and then acts on its analysis. (Previous -versions would not install a package as a zipfile unless you used the -``--zip-ok`` option.) - -The current analysis approach is fairly conservative; it currently looks for: - - * Any use of the ``__file__`` or ``__path__`` variables (which should be - replaced with ``pkg_resources`` API calls) - - * Possible use of ``inspect`` functions that expect to manipulate source files - (e.g. ``inspect.getsource()``) - - * Top-level modules that might be scripts used with ``python -m`` (Python 2.4) - -If any of the above are found in the package being installed, EasyInstall will -assume that the package cannot be safely run from a zipfile, and unzip it to -a directory instead. You can override this analysis with the ``-zip-ok`` flag, -which will tell EasyInstall to install the package as a zipfile anyway. Or, -you can use the ``--always-unzip`` flag, in which case EasyInstall will always -unzip, even if its analysis says the package is safe to run as a zipfile. - -Normally, however, it is simplest to let EasyInstall handle the determination -of whether to zip or unzip, and only specify overrides when needed to work -around a problem. If you find you need to override EasyInstall's guesses, you -may want to contact the package author and the EasyInstall maintainers, so that -they can make appropriate changes in future versions. - -(Note: If a package uses ``setuptools`` in its setup script, the package author -has the option to declare the package safe or unsafe for zipped usage via the -``zip_safe`` argument to ``setup()``. If the package author makes such a -declaration, EasyInstall believes the package's author and does not perform its -own analysis. However, your command-line option, if any, will still override -the package author's choice.) - - -Reference Manual -================ - -Configuration Files -------------------- - -(New in 0.4a2) - -You may specify default options for EasyInstall using the standard -distutils configuration files, under the command heading ``easy_install``. -EasyInstall will look first for a ``setup.cfg`` file in the current directory, -then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes -and Windows, respectively), and finally a ``distutils.cfg`` file in the -``distutils`` package directory. Here's a simple example: - -.. code-block:: ini - - [easy_install] - - # set the default location to install packages - install_dir = /home/me/lib/python - - # Notice that indentation can be used to continue an option - # value; this is especially useful for the "--find-links" - # option, which tells easy_install to use download links on - # these pages before consulting PyPI: - # - find_links = http://sqlobject.org/ - http://peak.telecommunity.com/dist/ - -In addition to accepting configuration for its own options under -``[easy_install]``, EasyInstall also respects defaults specified for other -distutils commands. For example, if you don't set an ``install_dir`` for -``[easy_install]``, but *have* set an ``install_lib`` for the ``[install]`` -command, this will become EasyInstall's default installation directory. Thus, -if you are already using distutils configuration files to set default install -locations, build options, etc., EasyInstall will respect your existing settings -until and unless you override them explicitly in an ``[easy_install]`` section. - -For more information, see also the current Python documentation on the `use and -location of distutils configuration files `_. - -Notice that ``easy_install`` will use the ``setup.cfg`` from the current -working directory only if it was triggered from ``setup.py`` through the -``install_requires`` option. The standalone command will not use that file. - -Command-Line Options --------------------- - -``--zip-ok, -z`` - Install all packages as zip files, even if they are marked as unsafe for - running as a zipfile. This can be useful when EasyInstall's analysis - of a non-setuptools package is too conservative, but keep in mind that - the package may not work correctly. (Changed in 0.5a9; previously this - option was required in order for zipped installation to happen at all.) - -``--always-unzip, -Z`` - Don't install any packages as zip files, even if the packages are marked - as safe for running as a zipfile. This can be useful if a package does - something unsafe, but not in a way that EasyInstall can easily detect. - EasyInstall's default analysis is currently very conservative, however, so - you should only use this option if you've had problems with a particular - package, and *after* reporting the problem to the package's maintainer and - to the EasyInstall maintainers. - - (Note: the ``-z/-Z`` options only affect the installation of newly-built - or downloaded packages that are not already installed in the target - directory; if you want to convert an existing installed version from - zipped to unzipped or vice versa, you'll need to delete the existing - version first, and re-run EasyInstall.) - -``--multi-version, -m`` - "Multi-version" mode. Specifying this option prevents ``easy_install`` from - adding an ``easy-install.pth`` entry for the package being installed, and - if an entry for any version the package already exists, it will be removed - upon successful installation. In multi-version mode, no specific version of - the package is available for importing, unless you use - ``pkg_resources.require()`` to put it on ``sys.path``. This can be as - simple as:: - - from pkg_resources import require - require("SomePackage", "OtherPackage", "MyPackage") - - which will put the latest installed version of the specified packages on - ``sys.path`` for you. (For more advanced uses, like selecting specific - versions and enabling optional dependencies, see the ``pkg_resources`` API - doc.) - - Changed in 0.6a10: this option is no longer silently enabled when - installing to a non-PYTHONPATH, non-"site" directory. You must always - explicitly use this option if you want it to be active. - -``--upgrade, -U`` (New in 0.5a4) - By default, EasyInstall only searches online if a project/version - requirement can't be met by distributions already installed - on sys.path or the installation directory. However, if you supply the - ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package - index and ``--find-links`` URLs before selecting a version to install. In - this way, you can force EasyInstall to use the latest available version of - any package it installs (subject to any version requirements that might - exclude such later versions). - -``--install-dir=DIR, -d DIR`` - Set the installation directory. It is up to you to ensure that this - directory is on ``sys.path`` at runtime, and to use - ``pkg_resources.require()`` to enable the installed package(s) that you - need. - - (New in 0.4a2) If this option is not directly specified on the command line - or in a distutils configuration file, the distutils default installation - location is used. Normally, this would be the ``site-packages`` directory, - but if you are using distutils configuration files, setting things like - ``prefix`` or ``install_lib``, then those settings are taken into - account when computing the default installation directory, as is the - ``--prefix`` option. - -``--script-dir=DIR, -s DIR`` - Set the script installation directory. If you don't supply this option - (via the command line or a configuration file), but you *have* supplied - an ``--install-dir`` (via command line or config file), then this option - defaults to the same directory, so that the scripts will be able to find - their associated package installation. Otherwise, this setting defaults - to the location where the distutils would normally install scripts, taking - any distutils configuration file settings into account. - -``--exclude-scripts, -x`` - Don't install scripts. This is useful if you need to install multiple - versions of a package, but do not want to reset the version that will be - run by scripts that are already installed. - -``--user`` (New in 0.6.11) - Use the user-site-packages as specified in :pep:`370` - instead of the global site-packages. - -``--always-copy, -a`` (New in 0.5a4) - Copy all needed distributions to the installation directory, even if they - are already present in a directory on sys.path. In older versions of - EasyInstall, this was the default behavior, but now you must explicitly - request it. By default, EasyInstall will no longer copy such distributions - from other sys.path directories to the installation directory, unless you - explicitly gave the distribution's filename on the command line. - - Note that as of 0.6a10, using this option excludes "system" and - "development" eggs from consideration because they can't be reliably - copied. This may cause EasyInstall to choose an older version of a package - than what you expected, or it may cause downloading and installation of a - fresh copy of something that's already installed. You will see warning - messages for any eggs that EasyInstall skips, before it falls back to an - older version or attempts to download a fresh copy. - -``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES`` - Scan the specified "download pages" or directories for direct links to eggs - or other distributions. Any existing file or directory names or direct - download URLs are immediately added to EasyInstall's search cache, and any - indirect URLs (ones that don't point to eggs or other recognized archive - formats) are added to a list of additional places to search for download - links. As soon as EasyInstall has to go online to find a package (either - because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was - used), the specified URLs will be downloaded and scanned for additional - direct links. - - Eggs and archives found by way of ``--find-links`` are only downloaded if - they are needed to meet a requirement specified on the command line; links - to unneeded packages are ignored. - - If all requested packages can be found using links on the specified - download pages, the Python Package Index will not be consulted unless you - also specified the ``--upgrade`` or ``-U`` option. - - (Note: if you want to refer to a local HTML file containing links, you must - use a ``file:`` URL, as filenames that do not refer to a directory, egg, or - archive are ignored.) - - You may specify multiple URLs or file/directory names with this option, - separated by whitespace. Note that on the command line, you will probably - have to surround the URL list with quotes, so that it is recognized as a - single option value. You can also specify URLs in a configuration file; - see `Configuration Files`_, above. - - Changed in 0.6a10: previously all URLs and directories passed to this - option were scanned as early as possible, but from 0.6a10 on, only - directories and direct archive links are scanned immediately; URLs are not - retrieved unless a package search was already going to go online due to a - package not being available locally, or due to the use of the ``--update`` - or ``-U`` option. - -``--no-find-links`` Blocks the addition of any link. - This parameter is useful if you want to avoid adding links defined in a - project easy_install is installing (whether it's a requested project or a - dependency). When used, ``--find-links`` is ignored. - - Added in Distribute 0.6.11 and Setuptools 0.7. - -``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) - Specifies the base URL of the Python Package Index. The default is - https://pypi.org/simple/ if not specified. When a package is requested - that is not locally available or linked from a ``--find-links`` download - page, the package index will be searched for download pages for the needed - package, and those download pages will be searched for links to download - an egg or source distribution. - -``--editable, -e`` (New in 0.6a1) - Only find and download source distributions for the specified projects, - unpacking them to subdirectories of the specified ``--build-directory``. - EasyInstall will not actually build or install the requested projects or - their dependencies; it will just find and extract them for you. See - `Editing and Viewing Source Packages`_ above for more details. - -``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1) - Set the directory used to build source packages. If a package is built - from a source distribution or checkout, it will be extracted to a - subdirectory of the specified directory. The subdirectory will have the - same name as the extracted distribution's project, but in all-lowercase. - If a file or directory of that name already exists in the given directory, - a warning will be printed to the console, and the build will take place in - a temporary directory instead. - - This option is most useful in combination with the ``--editable`` option, - which forces EasyInstall to *only* find and extract (but not build and - install) source distributions. See `Editing and Viewing Source Packages`_, - above, for more information. - -``--verbose, -v, --quiet, -q`` (New in 0.4a4) - Control the level of detail of EasyInstall's progress messages. The - default detail level is "info", which prints information only about - relatively time-consuming operations like running a setup script, unpacking - an archive, or retrieving a URL. Using ``-q`` or ``--quiet`` drops the - detail level to "warn", which will only display installation reports, - warnings, and errors. Using ``-v`` or ``--verbose`` increases the detail - level to include individual file-level operations, link analysis messages, - and distutils messages from any setup scripts that get run. If you include - the ``-v`` option more than once, the second and subsequent uses are passed - down to any setup scripts, increasing the verbosity of their reporting as - well. - -``--dry-run, -n`` (New in 0.4a4) - Don't actually install the package or scripts. This option is passed down - to any setup scripts run, so packages should not actually build either. - This does *not* skip downloading, nor does it skip extracting source - distributions to a temporary/build directory. - -``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4) - If you are installing from a source distribution, and are *not* using the - ``--zip-ok`` option, this option controls the optimization level for - compiling installed ``.py`` files to ``.pyo`` files. It does not affect - the compilation of modules contained in ``.egg`` files, only those in - ``.egg`` directories. The optimization level can be set to 0, 1, or 2; - the default is 0 (unless it's set under ``install`` or ``install_lib`` in - one of your distutils configuration files). - -``--record=FILENAME`` (New in 0.5a4) - Write a record of all installed files to FILENAME. This is basically the - same as the same option for the standard distutils "install" command, and - is included for compatibility with tools that expect to pass this option - to "setup.py install". - -``--site-dirs=DIRLIST, -S DIRLIST`` (New in 0.6a1) - Specify one or more custom "site" directories (separated by commas). - "Site" directories are directories where ``.pth`` files are processed, such - as the main Python ``site-packages`` directory. As of 0.6a10, EasyInstall - automatically detects whether a given directory processes ``.pth`` files - (or can be made to do so), so you should not normally need to use this - option. It is is now only necessary if you want to override EasyInstall's - judgment and force an installation directory to be treated as if it - supported ``.pth`` files. - -``--no-deps, -N`` (New in 0.6a6) - Don't install any dependencies. This is intended as a convenience for - tools that wrap eggs in a platform-specific packaging system. (We don't - recommend that you use it for anything else.) - -``--allow-hosts=PATTERNS, -H PATTERNS`` (New in 0.6a6) - Restrict downloading and spidering to hosts matching the specified glob - patterns. E.g. ``-H *.python.org`` restricts web access so that only - packages listed and downloadable from machines in the ``python.org`` - domain. The glob patterns must match the *entire* user/host/port section of - the target URL(s). For example, ``*.python.org`` will NOT accept a URL - like ``http://python.org/foo`` or ``http://www.python.org:8080/``. - Multiple patterns can be specified by separating them with commas. The - default pattern is ``*``, which matches anything. - - In general, this option is mainly useful for blocking EasyInstall's web - access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet - or other trusted site. EasyInstall will do the best it can to satisfy - dependencies given your host restrictions, but of course can fail if it - can't find suitable packages. EasyInstall displays all blocked URLs, so - that you can adjust your ``--allow-hosts`` setting if it is more strict - than you intended. Some sites may wish to define a restrictive default - setting for this option in their `configuration files`_, and then manually - override the setting on the command line as needed. - -``--prefix=DIR`` (New in 0.6a10) - Use the specified directory as a base for computing the default - installation and script directories. On Windows, the resulting default - directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``, - while on other platforms the defaults will be - ``prefix/lib/python2.X/site-packages`` (with the appropriate version - substituted) for libraries and ``prefix/bin`` for scripts. - - Note that the ``--prefix`` option only sets the *default* installation and - script directories, and does not override the ones set on the command line - or in a configuration file. - -``--local-snapshots-ok, -l`` (New in 0.6c6) - Normally, EasyInstall prefers to only install *released* versions of - projects, not in-development ones, because such projects may not - have a currently-valid version number. So, it usually only installs them - when their ``setup.py`` directory is explicitly passed on the command line. - - However, if this option is used, then any in-development projects that were - installed using the ``setup.py develop`` command, will be used to build - eggs, effectively upgrading the "in-development" project to a snapshot - release. Normally, this option is used only in conjunction with the - ``--always-copy`` option to create a distributable snapshot of every egg - needed to run an application. - - Note that if you use this option, you must make sure that there is a valid - version number (such as an SVN revision number tag) for any in-development - projects that may be used, as otherwise EasyInstall may not be able to tell - what version of the project is "newer" when future installations or - upgrades are attempted. - - -.. _non-root installation: - -Custom Installation Locations ------------------------------ - -By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, -and manages them using a custom ``.pth`` file in that same directory. - -Very often though, a user or developer wants ``easy_install`` to install and manage python packages -in an alternative location, usually for one of 3 reasons: - -1. They don't have access to write to the main Python site-packages directory. - -2. They want a user-specific stash of packages, that is not visible to other users. - -3. They want to isolate a set of packages to a specific python application, usually to minimize - the possibility of version conflicts. - -Historically, there have been many approaches to achieve custom installation. -The following section lists only the easiest and most relevant approaches [1]_. - -`Use the "--user" option`_ - -`Use the "--user" option and customize "PYTHONUSERBASE"`_ - -`Use "virtualenv"`_ - -.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_. - -.. _PEP-370: http://www.python.org/dev/peps/pep-0370/ - - -Use the "--user" option -~~~~~~~~~~~~~~~~~~~~~~~ -Python provides a User scheme for installation, which means that all -python distributions support an alternative install location that is specific to a user [3]_. -The Default location for each OS is explained in the python documentation -for the ``site.USER_BASE`` variable. This mode of installation can be turned on by -specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. -This approach serves the need to have a user-specific stash of packages. - -.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. - -Use the "--user" option and customize "PYTHONUSERBASE" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment -variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific -application, simply set the OS environment of that application to a specific value of -``PYTHONUSERBASE``, that contains just those packages. - -Use "virtualenv" -~~~~~~~~~~~~~~~~ -"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby -creating an isolated location to install packages. The evolution of "virtualenv" started before the existence -of the User installation scheme. "virtualenv" provides a version of ``easy_install`` that is -scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features -that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages. - -Please refer to the `virtualenv`_ documentation for more details. - -.. _virtualenv: https://pypi.org/project/virtualenv/ - - - -Package Index "API" -------------------- - -Custom package indexes (and PyPI) must follow the following rules for -EasyInstall to be able to look up and download packages: - -1. Except where stated otherwise, "pages" are HTML or XHTML, and "links" - refer to ``href`` attributes. - -2. Individual project version pages' URLs must be of the form - ``base/projectname/version``, where ``base`` is the package index's base URL. - -3. Omitting the ``/version`` part of a project page's URL (but keeping the - trailing ``/``) should result in a page that is either: - - a) The single active version of that project, as though the version had been - explicitly included, OR - - b) A page with links to all of the active version pages for that project. - -4. Individual project version pages should contain direct links to downloadable - distributions where possible. It is explicitly permitted for a project's - "long_description" to include URLs, and these should be formatted as HTML - links by the package index, as EasyInstall does no special processing to - identify what parts of a page are index-specific and which are part of the - project's supplied description. - -5. Where available, MD5 information should be added to download URLs by - appending a fragment identifier of the form ``#md5=...``, where ``...`` is - the 32-character hex MD5 digest. EasyInstall will verify that the - downloaded file's MD5 digest matches the given value. - -6. Individual project version pages should identify any "homepage" or - "download" URLs using ``rel="homepage"`` and ``rel="download"`` attributes - on the HTML elements linking to those URLs. Use of these attributes will - cause EasyInstall to always follow the provided links, unless it can be - determined by inspection that they are downloadable distributions. If the - links are not to downloadable distributions, they are retrieved, and if they - are HTML, they are scanned for download links. They are *not* scanned for - additional "homepage" or "download" links, as these are only processed for - pages that are part of a package index site. - -7. The root URL of the index, if retrieved with a trailing ``/``, must result - in a page containing links to *all* projects' active version pages. - - (Note: This requirement is a workaround for the absence of case-insensitive - ``safe_name()`` matching of project names in URL paths. If project names are - matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar - mechanism), then it is not necessary to include this all-packages listing - page.) - -8. If a package index is accessed via a ``file://`` URL, then EasyInstall will - automatically use ``index.html`` files, if present, when trying to read a - directory with a trailing ``/`` on the URL. diff --git a/docs/index.txt b/docs/index.txt index 13a46e74ef..c251260df6 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -21,5 +21,4 @@ Documentation content: python3 development roadmap - Deprecated: Easy Install history diff --git a/easy_install.py b/easy_install.py deleted file mode 100644 index d87e984034..0000000000 --- a/easy_install.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Run the EasyInstall command""" - -if __name__ == '__main__': - from setuptools.command.easy_install import main - main() diff --git a/setup.cfg b/setup.cfg index 42a3d86c6c..385ba14df4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,7 +51,6 @@ classifiers = [options] zip_safe = True python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* -py_modules = easy_install packages = find: [options.packages.find] diff --git a/setup.py b/setup.py index d97895fcc0..59efc23743 100755 --- a/setup.py +++ b/setup.py @@ -31,22 +31,6 @@ def read_commands(): return command_ns['__all__'] -def _gen_console_scripts(): - yield "easy_install = setuptools.command.easy_install:main" - - # Gentoo distributions manage the python-version-specific scripts - # themselves, so those platforms define an environment variable to - # suppress the creation of the version-specific scripts. - var_names = ( - 'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', - 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', - ) - if any(os.environ.get(var) not in (None, "", "0") for var in var_names): - return - tmpl = "easy_install-{shortver} = setuptools.command.easy_install:main" - yield tmpl.format(shortver='{}.{}'.format(*sys.version_info)) - - package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], ) @@ -125,9 +109,6 @@ def pypi_link(pkg_filename): "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": list(_gen_console_scripts()), - "setuptools.installation": - ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, dependency_links=[ pypi_link( diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 545c3c4426..9d350ac0f6 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -73,7 +73,7 @@ __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', - 'main', 'get_exe_prefixes', + 'get_exe_prefixes', ] @@ -2283,59 +2283,6 @@ def current_umask(): return tmp -def bootstrap(): - # This function is called when setuptools*.egg is run using /bin/sh - import setuptools - - argv0 = os.path.dirname(setuptools.__path__[0]) - sys.argv[0] = argv0 - sys.argv.append(argv0) - main() - - -def main(argv=None, **kw): - from setuptools import setup - from setuptools.dist import Distribution - - class DistributionWithoutHelpCommands(Distribution): - common_usage = "" - - def _show_help(self, *args, **kw): - with _patch_usage(): - Distribution._show_help(self, *args, **kw) - - if argv is None: - argv = sys.argv[1:] - - with _patch_usage(): - setup( - script_args=['-q', 'easy_install', '-v'] + argv, - script_name=sys.argv[0] or 'easy_install', - distclass=DistributionWithoutHelpCommands, - **kw - ) - - -@contextlib.contextmanager -def _patch_usage(): - import distutils.core - USAGE = textwrap.dedent(""" - usage: %(script)s [options] requirement_or_url ... - or: %(script)s --help - """).lstrip() - - def gen_usage(script_name): - return USAGE % dict( - script=os.path.basename(script_name), - ) - - saved = distutils.core.gen_usage - distutils.core.gen_usage = gen_usage - try: - yield - finally: - distutils.core.gen_usage = saved - class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning.""" diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aa75899a06..68319c2fb6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -467,22 +467,24 @@ def test_setup_requires_honors_fetch_params(self, mock_index, monkeypatch): """ monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) - with contexts.quiet(): - # create an sdist that has a build-time dependency. - with TestSetupRequires.create_sdist() as dist_file: - with contexts.tempdir() as temp_install_dir: - with contexts.environment(PYTHONPATH=temp_install_dir): - ei_params = [ - '--index-url', mock_index.url, - '--exclude-scripts', - '--install-dir', temp_install_dir, - dist_file, - ] - with sandbox.save_argv(['easy_install']): - # attempt to install the dist. It should - # fail because it doesn't exist. - with pytest.raises(SystemExit): - easy_install_pkg.main(ei_params) + monkeypatch.setenv(str('PIP_VERBOSE'), str('1')) + # create an sdist that has a build-time dependency. + with TestSetupRequires.create_sdist() as dist_file: + with contexts.tempdir() as temp_dir: + setup_py = os.path.join(temp_dir, 'setup.py') + with open(setup_py, 'w') as fp: + fp.write('__import__("setuptools").setup()') + temp_install_dir = os.path.join(temp_dir, 'target') + os.mkdir(temp_install_dir) + with contexts.environment(PYTHONPATH=temp_install_dir): + # attempt to install the dist. It should + # fail because it doesn't exist. + with pytest.raises(SystemExit): + run_setup(setup_py, ['easy_install', + '--exclude-scripts', + '--index-url', mock_index.url, + '--install-dir', temp_install_dir, + dist_file]) # there should have been one requests to the server assert [r.path for r in mock_index.requests] == ['/does-not-exist/'] diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index f937d98189..3c5df68a35 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -64,9 +64,8 @@ def test_pkg_resources_import(self, tmpdir): target.mkdir() install_cmd = [ sys.executable, - '-m', 'easy_install', - '-d', str(target), - str(pkg), + '-m', 'pip.__main__', 'install', + '-t', str(target), str(pkg), ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(install_cmd) From b8101f06532b1deab448e6e23d0a61eb125c62df Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 14 Nov 2019 22:01:09 +0100 Subject: [PATCH 7597/8469] deprecate easy_install command --- setuptools/command/easy_install.py | 8 +++++++- setuptools/command/install.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9d350ac0f6..d273bc101c 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -410,7 +410,13 @@ def expand_dirs(self): ] self._expand_attrs(dirs) - def run(self): + def run(self, show_deprecation=True): + if show_deprecation: + self.announce( + "WARNING: The easy_install command is deprecated " + "and will be removed in a future version." + , log.WARN, + ) if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 31a5ddb577..72b9a3e424 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -114,7 +114,7 @@ def do_egg_install(self): args.insert(0, setuptools.bootstrap_install_from) cmd.args = args - cmd.run() + cmd.run(show_deprecation=False) setuptools.bootstrap_install_from = None From dc868755d53520895d96ec0251a66df562a37095 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 15 Nov 2019 12:03:53 +0100 Subject: [PATCH 7598/8469] drop support for Python 3.4 --- .travis.yml | 1 - changelog.d/1908.breaking.rst | 1 + docs/easy_install.txt | 2 +- pkg_resources/__init__.py | 4 ++-- setup.cfg | 3 +-- setuptools/tests/test_virtualenv.py | 5 +---- tests/requirements.txt | 3 +-- tox.ini | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 changelog.d/1908.breaking.rst diff --git a/.travis.yml b/.travis.yml index 7088d16621..3a744f2328 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ jobs: env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: pypy3 env: DISABLE_COVERAGE=1 - - python: 3.4 - python: 3.5 - &default_py python: 3.6 diff --git a/changelog.d/1908.breaking.rst b/changelog.d/1908.breaking.rst new file mode 100644 index 0000000000..3fbb9fe70c --- /dev/null +++ b/changelog.d/1908.breaking.rst @@ -0,0 +1 @@ +Drop support for Python 3.4. diff --git a/docs/easy_install.txt b/docs/easy_install.txt index 544b9efd59..fac7b8fc2a 100644 --- a/docs/easy_install.txt +++ b/docs/easy_install.txt @@ -41,7 +41,7 @@ Please see the `setuptools PyPI page `_ for download links and basic installation instructions for each of the supported platforms. -You will need at least Python 3.4 or 2.7. An ``easy_install`` script will be +You will need at least Python 3.5 or 2.7. An ``easy_install`` script will be installed in the normal location for Python scripts on your platform. Note that the instructions on the setuptools PyPI page assume that you are diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 51fb1192fc..2f5aa64a6e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -88,8 +88,8 @@ __metaclass__ = type -if (3, 0) < sys.version_info < (3, 4): - raise RuntimeError("Python 3.4 or later is required") +if (3, 0) < sys.version_info < (3, 5): + raise RuntimeError("Python 3.5 or later is required") if six.PY2: # Those builtin exceptions are only defined in Python 3 diff --git a/setup.cfg b/setup.cfg index 42a3d86c6c..920a27190b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,7 +38,6 @@ classifiers = Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -50,7 +49,7 @@ classifiers = [options] zip_safe = True -python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* +python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* py_modules = easy_install packages = find: diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 74a1284ce7..b60df32faf 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -77,12 +77,9 @@ def _get_pip_versions(): 'pip==10.0.1', 'pip==18.1', 'pip==19.0.1', + 'https://github.com/pypa/pip/archive/master.zip', ] - # Pip's master dropped support for 3.4. - if not six.PY34: - network_versions.append('https://github.com/pypa/pip/archive/master.zip') - versions = [None] + [ pytest.param(v, **({} if network else {'marks': pytest.mark.skip})) for v in network_versions diff --git a/tests/requirements.txt b/tests/requirements.txt index 1f70adee0a..ff596773a6 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,5 @@ mock -pytest-flake8; python_version!="3.4" -pytest-flake8<=1.0.0; python_version=="3.4" +pytest-flake8 virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.7 diff --git a/tox.ini b/tox.ini index 5d439cb34b..1eae7a7a07 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # # To run Tox against all supported Python interpreters, you can set: # -# export TOXENV='py27,py3{4,5,6},pypy,pypy3' +# export TOXENV='py27,py3{5,6,7,8},pypy,pypy3' [tox] envlist=python From 6b210c65938527a4bbcea34942fe43971be3c014 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2019 12:06:47 -0500 Subject: [PATCH 7599/8469] Move all finalization of distribution options into hooks. Allow hooks to specify an index for ordering. --- setup.py | 7 +++++++ setuptools/dist.py | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index f5030dd670..ac56a1b051 100755 --- a/setup.py +++ b/setup.py @@ -89,6 +89,13 @@ def pypi_link(pkg_filename): "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() for cmd in read_commands() ], + "setuptools.finalize_distribution_options": [ + "parent_finalize = setuptools.dist:_Distribution.finalize_options", + "features = setuptools.dist:Distribution._finalize_feature_opts", + "keywords = setuptools.dist:Distribution._finalize_setup_keywords", + "2to3_doctests = " + "setuptools.dist:Distribution._finalize_2to3_doctests", + ], "distutils.setup_keywords": [ "eager_resources = setuptools.dist:assert_string_list", "namespace_packages = setuptools.dist:check_nsp", diff --git a/setuptools/dist.py b/setuptools/dist.py index 987d684e09..449904317c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -724,19 +724,28 @@ def fetch_build_eggs(self, requires): return resolved_dists def finalize_options(self): - _Distribution.finalize_options(self) - if self.features: - self._set_global_opts_from_features() - + """ + Allow plugins to apply arbitrary operations to the + distribution. Each hook may optionally define a 'order' + to influence the order of execution. Smaller numbers + go first and the default is 0. + """ hook_key = 'setuptools.finalize_distribution_options' - for ep in pkg_resources.iter_entry_points(hook_key): + + def by_order(hook): + return getattr(hook, 'order', 0) + eps = pkg_resources.iter_entry_points(hook_key) + for ep in sorted(eps, key=by_order): ep.load()(self) + def _finalize_setup_keywords(self): for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): value = getattr(self, ep.name, None) if value is not None: ep.require(installer=self.fetch_build_egg) ep.load()(self, ep.name, value) + + def _finalize_2to3_doctests(self): if getattr(self, 'convert_2to3_doctests', None): # XXX may convert to set here when we can rely on set being builtin self.convert_2to3_doctests = [ @@ -790,9 +799,12 @@ def fetch_build_egg(self, req): cmd.ensure_finalized() return cmd.easy_install(req) - def _set_global_opts_from_features(self): + def _finalize_feature_opts(self): """Add --with-X/--without-X options based on optional features""" + if not self.features: + return + go = [] no = self.negative_opt.copy() From 88951e9a5633abd4cdbfa3584647cec4247b8c30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2019 12:47:35 -0500 Subject: [PATCH 7600/8469] Add changelog entry and documentation about the feature. --- changelog.d/1877.change.rst | 1 + docs/setuptools.txt | 31 +++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 changelog.d/1877.change.rst diff --git a/changelog.d/1877.change.rst b/changelog.d/1877.change.rst new file mode 100644 index 0000000000..5a744fa3fd --- /dev/null +++ b/changelog.d/1877.change.rst @@ -0,0 +1 @@ +Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like `setuptools_scm `_ to configure options on the distribution at finalization time. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2e7fe3bd93..ccbf069be7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1225,7 +1225,7 @@ the quoted part. Distributing a ``setuptools``-based project =========================================== -Detailed instructions to distribute a setuptools project can be found at +Detailed instructions to distribute a setuptools project can be found at `Packaging project tutorials`_. .. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives @@ -1241,7 +1241,7 @@ setup.py is located:: This will generate distribution archives in the `dist` directory. -Before you upload the generated archives make sure you're registered on +Before you upload the generated archives make sure you're registered on https://test.pypi.org/account/register/. You will also need to verify your email to be able to upload any packages. You should install twine to be able to upload packages:: @@ -1264,11 +1264,11 @@ Distributing legacy ``setuptools`` projects using ez_setup.py .. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. -Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is +Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is deprecated in favor of PIP. Please consider migrating to using pip and twine based distribution. -However, if you still have any ``ez_setup`` based packages, documentation for +However, if you still have any ``ez_setup`` based packages, documentation for ez_setup based distributions can be found at `ez_setup distribution guide`_. .. _ez_setup distribution guide: ez_setup.html @@ -2515,6 +2515,10 @@ script defines entry points for them! Adding ``setup()`` Arguments ---------------------------- +.. warning:: Adding arguments to setup is discouraged as such arguments + are only supported through imperative execution and not supported through + declarative config. + Sometimes, your commands may need additional arguments to the ``setup()`` call. You can enable this by defining entry points in the ``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` @@ -2566,6 +2570,25 @@ script using your extension lists your project in its ``setup_requires`` argument. +Customizing Distribution Options +-------------------------------- + +Plugins may wish to extend or alter the options on a Distribution object to +suit the purposes of that project. For example, a tool that infers the +``Distribution.version`` from SCM-metadata may need to hook into the +option finalization. To enable this feature, Setuptools offers an entry +point "setuptools.finalize_distribution_options". That entry point must +be a callable taking one argument (the Distribution instance). + +If the callable has an ``.order`` property, that value will be used to +determine the order in which the hook is called. Lower numbers are called +first and the default is zero (0). + +Plugins may read, alter, and set properties on the distribution, but each +plugin is encouraged to load the configuration/settings for their behavior +independently. + + Adding new EGG-INFO Files ------------------------- From a00798264cf4d55db28585cfc147050a4d579b52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2019 12:49:03 -0500 Subject: [PATCH 7601/8469] Trim excess whitespace --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 399a56d3ca..b7fdf4105a 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1207,7 +1207,7 @@ the quoted part. Distributing a ``setuptools``-based project =========================================== -Detailed instructions to distribute a setuptools project can be found at +Detailed instructions to distribute a setuptools project can be found at `Packaging project tutorials`_. .. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives @@ -1223,7 +1223,7 @@ setup.py is located:: This will generate distribution archives in the `dist` directory. -Before you upload the generated archives make sure you're registered on +Before you upload the generated archives make sure you're registered on https://test.pypi.org/account/register/. You will also need to verify your email to be able to upload any packages. You should install twine to be able to upload packages:: From a1e956b20f11f2d02f5a9855bda37660080184c9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 16 Nov 2019 23:30:10 +0100 Subject: [PATCH 7602/8469] Revert "drop easy_install script and associated documentation" This reverts commit 6e1838a9fb5feb000ba9b6a3c37c8b39d7e872b3. --- docs/easy_install.txt | 1085 +++++++++++++++++++++++++ docs/index.txt | 1 + easy_install.py | 5 + setup.cfg | 1 + setup.py | 19 + setuptools/command/easy_install.py | 55 +- setuptools/tests/test_easy_install.py | 34 +- setuptools/tests/test_namespaces.py | 5 +- 8 files changed, 1184 insertions(+), 21 deletions(-) create mode 100644 docs/easy_install.txt create mode 100644 easy_install.py diff --git a/docs/easy_install.txt b/docs/easy_install.txt new file mode 100644 index 0000000000..544b9efd59 --- /dev/null +++ b/docs/easy_install.txt @@ -0,0 +1,1085 @@ +============ +Easy Install +============ + +.. warning:: + Easy Install is deprecated. Do not use it. Instead use pip. If + you think you need Easy Install, please reach out to the PyPA + team (a ticket to pip or setuptools is fine), describing your + use-case. + +Easy Install is a python module (``easy_install``) bundled with ``setuptools`` +that lets you automatically download, build, install, and manage Python +packages. + +Please share your experiences with us! If you encounter difficulty installing +a package, please contact us via the `distutils mailing list +`_. (Note: please DO NOT send +private email directly to the author of setuptools; it will be discarded. The +mailing list is a searchable archive of previously-asked and answered +questions; you should begin your research there before reporting something as a +bug -- and then do so via list discussion first.) + +(Also, if you'd like to learn about how you can use ``setuptools`` to make your +own packages work better with EasyInstall, or provide EasyInstall-like features +without requiring your users to use EasyInstall directly, you'll probably want +to check out the full documentation as well.) + +.. contents:: **Table of Contents** + + +Using "Easy Install" +==================== + + +.. _installation instructions: + +Installing "Easy Install" +------------------------- + +Please see the `setuptools PyPI page `_ +for download links and basic installation instructions for each of the +supported platforms. + +You will need at least Python 3.4 or 2.7. An ``easy_install`` script will be +installed in the normal location for Python scripts on your platform. + +Note that the instructions on the setuptools PyPI page assume that you are +are installing to Python's primary ``site-packages`` directory. If this is +not the case, you should consult the section below on `Custom Installation +Locations`_ before installing. (And, on Windows, you should not use the +``.exe`` installer when installing to an alternate location.) + +Note that ``easy_install`` normally works by downloading files from the +internet. If you are behind an NTLM-based firewall that prevents Python +programs from accessing the net directly, you may wish to first install and use +the `APS proxy server `_, which lets you get past such +firewalls in the same way that your web browser(s) do. + +(Alternately, if you do not wish easy_install to actually download anything, you +can restrict it from doing so with the ``--allow-hosts`` option; see the +sections on `restricting downloads with --allow-hosts`_ and `command-line +options`_ for more details.) + + +Troubleshooting +~~~~~~~~~~~~~~~ + +If EasyInstall/setuptools appears to install correctly, and you can run the +``easy_install`` command but it fails with an ``ImportError``, the most likely +cause is that you installed to a location other than ``site-packages``, +without taking any of the steps described in the `Custom Installation +Locations`_ section below. Please see that section and follow the steps to +make sure that your custom location will work correctly. Then re-install. + +Similarly, if you can run ``easy_install``, and it appears to be installing +packages, but then you can't import them, the most likely issue is that you +installed EasyInstall correctly but are using it to install packages to a +non-standard location that hasn't been properly prepared. Again, see the +section on `Custom Installation Locations`_ for more details. + + +Windows Notes +~~~~~~~~~~~~~ + +Installing setuptools will provide an ``easy_install`` command according to +the techniques described in `Executables and Launchers`_. If the +``easy_install`` command is not available after installation, that section +provides details on how to configure Windows to make the commands available. + + +Downloading and Installing a Package +------------------------------------ + +For basic use of ``easy_install``, you need only supply the filename or URL of +a source distribution or .egg file (`Python Egg`__). + +__ http://peak.telecommunity.com/DevCenter/PythonEggs + +**Example 1**. Install a package by name, searching PyPI for the latest +version, and automatically downloading, building, and installing it:: + + easy_install SQLObject + +**Example 2**. Install or upgrade a package by name and version by finding +links on a given "download page":: + + easy_install -f http://pythonpaste.org/package_index.html SQLObject + +**Example 3**. Download a source distribution from a specified URL, +automatically building and installing it:: + + easy_install http://example.com/path/to/MyPackage-1.2.3.tgz + +**Example 4**. Install an already-downloaded .egg file:: + + easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg + +**Example 5**. Upgrade an already-installed package to the latest version +listed on PyPI:: + + easy_install --upgrade PyProtocols + +**Example 6**. Install a source distribution that's already downloaded and +extracted in the current directory (New in 0.5a9):: + + easy_install . + +**Example 7**. (New in 0.6a1) Find a source distribution or Subversion +checkout URL for a package, and extract it or check it out to +``~/projects/sqlobject`` (the name will always be in all-lowercase), where it +can be examined or edited. (The package will not be installed, but it can +easily be installed with ``easy_install ~/projects/sqlobject``. See `Editing +and Viewing Source Packages`_ below for more info.):: + + easy_install --editable --build-directory ~/projects SQLObject + +**Example 7**. (New in 0.6.11) Install a distribution within your home dir:: + + easy_install --user SQLAlchemy + +Easy Install accepts URLs, filenames, PyPI package names (i.e., ``distutils`` +"distribution" names), and package+version specifiers. In each case, it will +attempt to locate the latest available version that meets your criteria. + +When downloading or processing downloaded files, Easy Install recognizes +distutils source distribution files with extensions of .tgz, .tar, .tar.gz, +.tar.bz2, or .zip. And of course it handles already-built .egg +distributions as well as ``.win32.exe`` installers built using distutils. + +By default, packages are installed to the running Python installation's +``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir`` +option to specify an alternative directory, or specify an alternate location +using distutils configuration files. (See `Configuration Files`_, below.) + +By default, any scripts included with the package are installed to the running +Python installation's standard script installation location. However, if you +specify an installation directory via the command line or a config file, then +the default directory for installing scripts will be the same as the package +installation directory, to ensure that the script will have access to the +installed package. You can override this using the ``-s`` or ``--script-dir`` +option. + +Installed packages are added to an ``easy-install.pth`` file in the install +directory, so that Python will always use the most-recently-installed version +of the package. If you would like to be able to select which version to use at +runtime, you should use the ``-m`` or ``--multi-version`` option. + + +Upgrading a Package +------------------- + +You don't need to do anything special to upgrade a package: just install the +new version, either by requesting a specific version, e.g.:: + + easy_install "SomePackage==2.0" + +a version greater than the one you have now:: + + easy_install "SomePackage>2.0" + +using the upgrade flag, to find the latest available version on PyPI:: + + easy_install --upgrade SomePackage + +or by using a download page, direct download URL, or package filename:: + + easy_install -f http://example.com/downloads ExamplePackage + + easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg + + easy_install my_downloads/ExamplePackage-2.0.tgz + +If you're using ``-m`` or ``--multi-version`` , using the ``require()`` +function at runtime automatically selects the newest installed version of a +package that meets your version criteria. So, installing a newer version is +the only step needed to upgrade such packages. + +If you're installing to a directory on PYTHONPATH, or a configured "site" +directory (and not using ``-m``), installing a package automatically replaces +any previous version in the ``easy-install.pth`` file, so that Python will +import the most-recently installed version by default. So, again, installing +the newer version is the only upgrade step needed. + +If you haven't suppressed script installation (using ``--exclude-scripts`` or +``-x``), then the upgraded version's scripts will be installed, and they will +be automatically patched to ``require()`` the corresponding version of the +package, so that you can use them even if they are installed in multi-version +mode. + +``easy_install`` never actually deletes packages (unless you're installing a +package with the same name and version number as an existing package), so if +you want to get rid of older versions of a package, please see `Uninstalling +Packages`_, below. + + +Changing the Active Version +--------------------------- + +If you've upgraded a package, but need to revert to a previously-installed +version, you can do so like this:: + + easy_install PackageName==1.2.3 + +Where ``1.2.3`` is replaced by the exact version number you wish to switch to. +If a package matching the requested name and version is not already installed +in a directory on ``sys.path``, it will be located via PyPI and installed. + +If you'd like to switch to the latest installed version of ``PackageName``, you +can do so like this:: + + easy_install PackageName + +This will activate the latest installed version. (Note: if you have set any +``find_links`` via distutils configuration files, those download pages will be +checked for the latest available version of the package, and it will be +downloaded and installed if it is newer than your current version.) + +Note that changing the active version of a package will install the newly +active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is +specified. + + +Uninstalling Packages +--------------------- + +If you have replaced a package with another version, then you can just delete +the package(s) you don't need by deleting the PackageName-versioninfo.egg file +or directory (found in the installation directory). + +If you want to delete the currently installed version of a package (or all +versions of a package), you should first run:: + + easy_install -m PackageName + +This will ensure that Python doesn't continue to search for a package you're +planning to remove. After you've done this, you can safely delete the .egg +files or directories, along with any scripts you wish to remove. + + +Managing Scripts +---------------- + +Whenever you install, upgrade, or change versions of a package, EasyInstall +automatically installs the scripts for the selected package version, unless +you tell it not to with ``-x`` or ``--exclude-scripts``. If any scripts in +the script directory have the same name, they are overwritten. + +Thus, you do not normally need to manually delete scripts for older versions of +a package, unless the newer version of the package does not include a script +of the same name. However, if you are completely uninstalling a package, you +may wish to manually delete its scripts. + +EasyInstall's default behavior means that you can normally only run scripts +from one version of a package at a time. If you want to keep multiple versions +of a script available, however, you can simply use the ``--multi-version`` or +``-m`` option, and rename the scripts that EasyInstall creates. This works +because EasyInstall installs scripts as short code stubs that ``require()`` the +matching version of the package the script came from, so renaming the script +has no effect on what it executes. + +For example, suppose you want to use two versions of the ``rst2html`` tool +provided by the `docutils `_ package. You might +first install one version:: + + easy_install -m docutils==0.3.9 + +then rename the ``rst2html.py`` to ``r2h_039``, and install another version:: + + easy_install -m docutils==0.3.10 + +This will create another ``rst2html.py`` script, this one using docutils +version 0.3.10 instead of 0.3.9. You now have two scripts, each using a +different version of the package. (Notice that we used ``-m`` for both +installations, so that Python won't lock us out of using anything but the most +recently-installed version of the package.) + + +Executables and Launchers +------------------------- + +On Unix systems, scripts are installed with as natural files with a "#!" +header and no extension and they launch under the Python version indicated in +the header. + +On Windows, there is no mechanism to "execute" files without extensions, so +EasyInstall provides two techniques to mirror the Unix behavior. The behavior +is indicated by the SETUPTOOLS_LAUNCHER environment variable, which may be +"executable" (default) or "natural". + +Regardless of the technique used, the script(s) will be installed to a Scripts +directory (by default in the Python installation directory). It is recommended +for EasyInstall that you ensure this directory is in the PATH environment +variable. The easiest way to ensure the Scripts directory is in the PATH is +to run ``Tools\Scripts\win_add2path.py`` from the Python directory. + +Note that instead of changing your ``PATH`` to include the Python scripts +directory, you can also retarget the installation location for scripts so they +go on a directory that's already on the ``PATH``. For more information see +`Command-Line Options`_ and `Configuration Files`_. During installation, +pass command line options (such as ``--script-dir``) to control where +scripts will be installed. + + +Windows Executable Launcher +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the "executable" launcher is used, EasyInstall will create a '.exe' +launcher of the same name beside each installed script (including +``easy_install`` itself). These small .exe files launch the script of the +same name using the Python version indicated in the '#!' header. + +This behavior is currently default. To force +the use of executable launchers, set ``SETUPTOOLS_LAUNCHER`` to "executable". + +Natural Script Launcher +~~~~~~~~~~~~~~~~~~~~~~~ + +EasyInstall also supports deferring to an external launcher such as +`pylauncher `_ for launching scripts. +Enable this experimental functionality by setting the +``SETUPTOOLS_LAUNCHER`` environment variable to "natural". EasyInstall will +then install scripts as simple +scripts with a .pya (or .pyw) extension appended. If these extensions are +associated with the pylauncher and listed in the PATHEXT environment variable, +these scripts can then be invoked simply and directly just like any other +executable. This behavior may become default in a future version. + +EasyInstall uses the .pya extension instead of simply +the typical '.py' extension. This distinct extension is necessary to prevent +Python +from treating the scripts as importable modules (where name conflicts exist). +Current releases of pylauncher do not yet associate with .pya files by +default, but future versions should do so. + + +Tips & Techniques +----------------- + +Multiple Python Versions +~~~~~~~~~~~~~~~~~~~~~~~~ + +EasyInstall installs itself under two names: +``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version +used to install it. Thus, if you install EasyInstall for both Python 3.2 and +2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to +install packages for the respective Python version. + +Setuptools also supplies easy_install as a runnable module which may be +invoked using ``python -m easy_install`` for any Python with Setuptools +installed. + +Restricting Downloads with ``--allow-hosts`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can use the ``--allow-hosts`` (``-H``) option to restrict what domains +EasyInstall will look for links and downloads on. ``--allow-hosts=None`` +prevents downloading altogether. You can also use wildcards, for example +to restrict downloading to hosts in your own intranet. See the section below +on `Command-Line Options`_ for more details on the ``--allow-hosts`` option. + +By default, there are no host restrictions in effect, but you can change this +default by editing the appropriate `configuration files`_ and adding: + +.. code-block:: ini + + [easy_install] + allow_hosts = *.myintranet.example.com,*.python.org + +The above example would then allow downloads only from hosts in the +``python.org`` and ``myintranet.example.com`` domains, unless overridden on the +command line. + + +Installing on Un-networked Machines +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Just copy the eggs or source packages you need to a directory on the target +machine, then use the ``-f`` or ``--find-links`` option to specify that +directory's location. For example:: + + easy_install -H None -f somedir SomePackage + +will attempt to install SomePackage using only eggs and source packages found +in ``somedir`` and disallowing all remote access. You should of course make +sure you have all of SomePackage's dependencies available in somedir. + +If you have another machine of the same operating system and library versions +(or if the packages aren't platform-specific), you can create the directory of +eggs using a command like this:: + + easy_install -zmaxd somedir SomePackage + +This will tell EasyInstall to put zipped eggs or source packages for +SomePackage and all its dependencies into ``somedir``, without creating any +scripts or .pth files. You can then copy the contents of ``somedir`` to the +target machine. (``-z`` means zipped eggs, ``-m`` means multi-version, which +prevents .pth files from being used, ``-a`` means to copy all the eggs needed, +even if they're installed elsewhere on the machine, and ``-d`` indicates the +directory to place the eggs in.) + +You can also build the eggs from local development packages that were installed +with the ``setup.py develop`` command, by including the ``-l`` option, e.g.:: + + easy_install -zmaxld somedir SomePackage + +This will use locally-available source distributions to build the eggs. + + +Packaging Others' Projects As Eggs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Need to distribute a package that isn't published in egg form? You can use +EasyInstall to build eggs for a project. You'll want to use the ``--zip-ok``, +``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and +``-N``, respectively). Use ``-d`` or ``--install-dir`` to specify the location +where you'd like the eggs placed. By placing them in a directory that is +published to the web, you can then make the eggs available for download, either +in an intranet or to the internet at large. + +If someone distributes a package in the form of a single ``.py`` file, you can +wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL. +So, something like this:: + + easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo + +will install the package as an egg, and this:: + + easy_install -zmaxd. \ + -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo + +will create a ``.egg`` file in the current directory. + + +Creating your own Package Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to local directories and the Python Package Index, EasyInstall can +find download links on most any web page whose URL is given to the ``-f`` +(``--find-links``) option. In the simplest case, you can simply have a web +page with links to eggs or Python source packages, even an automatically +generated directory listing (such as the Apache web server provides). + +If you are setting up an intranet site for package downloads, you may want to +configure the target machines to use your download site by default, adding +something like this to their `configuration files`_: + +.. code-block:: ini + + [easy_install] + find_links = http://mypackages.example.com/somedir/ + http://turbogears.org/download/ + http://peak.telecommunity.com/dist/ + +As you can see, you can list multiple URLs separated by whitespace, continuing +on multiple lines if necessary (as long as the subsequent lines are indented. + +If you are more ambitious, you can also create an entirely custom package index +or PyPI mirror. See the ``--index-url`` option under `Command-Line Options`_, +below, and also the section on `Package Index "API"`_. + + +Password-Protected Sites +------------------------ + +If a site you want to download from is password-protected using HTTP "Basic" +authentication, you can specify your credentials in the URL, like so:: + + http://some_userid:some_password@some.example.com/some_path/ + +You can do this with both index page URLs and direct download URLs. As long +as any HTML pages read by easy_install use *relative* links to point to the +downloads, the same user ID and password will be used to do the downloading. + +Using .pypirc Credentials +------------------------- + +In additional to supplying credentials in the URL, ``easy_install`` will also +honor credentials if present in the .pypirc file. Teams maintaining a private +repository of packages may already have defined access credentials for +uploading packages according to the distutils documentation. ``easy_install`` +will attempt to honor those if present. Refer to the distutils documentation +for Python 2.5 or later for details on the syntax. + +Controlling Build Options +~~~~~~~~~~~~~~~~~~~~~~~~~ + +EasyInstall respects standard distutils `Configuration Files`_, so you can use +them to configure build options for packages that it installs from source. For +example, if you are on Windows using the MinGW compiler, you can configure the +default compiler by putting something like this: + +.. code-block:: ini + + [build] + compiler = mingw32 + +into the appropriate distutils configuration file. In fact, since this is just +normal distutils configuration, it will affect any builds using that config +file, not just ones done by EasyInstall. For example, if you add those lines +to ``distutils.cfg`` in the ``distutils`` package directory, it will be the +default compiler for *all* packages you build. See `Configuration Files`_ +below for a list of the standard configuration file locations, and links to +more documentation on using distutils configuration files. + + +Editing and Viewing Source Packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes a package's source distribution contains additional documentation, +examples, configuration files, etc., that are not part of its actual code. If +you want to be able to examine these files, you can use the ``--editable`` +option to EasyInstall, and EasyInstall will look for a source distribution +or Subversion URL for the package, then download and extract it or check it out +as a subdirectory of the ``--build-directory`` you specify. If you then wish +to install the package after editing or configuring it, you can do so by +rerunning EasyInstall with that directory as the target. + +Note that using ``--editable`` stops EasyInstall from actually building or +installing the package; it just finds, obtains, and possibly unpacks it for +you. This allows you to make changes to the package if necessary, and to +either install it in development mode using ``setup.py develop`` (if the +package uses setuptools, that is), or by running ``easy_install projectdir`` +(where ``projectdir`` is the subdirectory EasyInstall created for the +downloaded package. + +In order to use ``--editable`` (``-e`` for short), you *must* also supply a +``--build-directory`` (``-b`` for short). The project will be placed in a +subdirectory of the build directory. The subdirectory will have the same +name as the project itself, but in all-lowercase. If a file or directory of +that name already exists, EasyInstall will print an error message and exit. + +Also, when using ``--editable``, you cannot use URLs or filenames as arguments. +You *must* specify project names (and optional version requirements) so that +EasyInstall knows what directory name(s) to create. If you need to force +EasyInstall to use a particular URL or filename, you should specify it as a +``--find-links`` item (``-f`` for short), and then also specify +the project name, e.g.:: + + easy_install -eb ~/projects \ + -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \ + ctypes==0.9.6 + + +Dealing with Installation Conflicts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that +people using older versions of EasyInstall can consult it. As of version +0.6a11, installation conflicts are handled automatically without deleting the +old or system-installed packages, and without ignoring the issue. Instead, +eggs are automatically shifted to the front of ``sys.path`` using special +code added to the ``easy-install.pth`` file. So, if you are using version +0.6a11 or better of setuptools, you do not need to worry about conflicts, +and the following issues do not apply to you.) + +EasyInstall installs distributions in a "managed" way, such that each +distribution can be independently activated or deactivated on ``sys.path``. +However, packages that were not installed by EasyInstall are "unmanaged", +in that they usually live all in one directory and cannot be independently +activated or deactivated. + +As a result, if you are using EasyInstall to upgrade an existing package, or +to install a package with the same name as an existing package, EasyInstall +will warn you of the conflict. (This is an improvement over ``setup.py +install``, because the ``distutils`` just install new packages on top of old +ones, possibly combining two unrelated packages or leaving behind modules that +have been deleted in the newer version of the package.) + +EasyInstall will stop the installation if it detects a conflict +between an existing, "unmanaged" package, and a module or package in any of +the distributions you're installing. It will display a list of all of the +existing files and directories that would need to be deleted for the new +package to be able to function correctly. To proceed, you must manually +delete these conflicting files and directories and re-run EasyInstall. + +Of course, once you've replaced all of your existing "unmanaged" packages with +versions managed by EasyInstall, you won't have any more conflicts to worry +about! + + +Compressed Installation +~~~~~~~~~~~~~~~~~~~~~~~ + +EasyInstall tries to install packages in zipped form, if it can. Zipping +packages can improve Python's overall import performance if you're not using +the ``--multi-version`` option, because Python processes zipfile entries on +``sys.path`` much faster than it does directories. + +As of version 0.5a9, EasyInstall analyzes packages to determine whether they +can be safely installed as a zipfile, and then acts on its analysis. (Previous +versions would not install a package as a zipfile unless you used the +``--zip-ok`` option.) + +The current analysis approach is fairly conservative; it currently looks for: + + * Any use of the ``__file__`` or ``__path__`` variables (which should be + replaced with ``pkg_resources`` API calls) + + * Possible use of ``inspect`` functions that expect to manipulate source files + (e.g. ``inspect.getsource()``) + + * Top-level modules that might be scripts used with ``python -m`` (Python 2.4) + +If any of the above are found in the package being installed, EasyInstall will +assume that the package cannot be safely run from a zipfile, and unzip it to +a directory instead. You can override this analysis with the ``-zip-ok`` flag, +which will tell EasyInstall to install the package as a zipfile anyway. Or, +you can use the ``--always-unzip`` flag, in which case EasyInstall will always +unzip, even if its analysis says the package is safe to run as a zipfile. + +Normally, however, it is simplest to let EasyInstall handle the determination +of whether to zip or unzip, and only specify overrides when needed to work +around a problem. If you find you need to override EasyInstall's guesses, you +may want to contact the package author and the EasyInstall maintainers, so that +they can make appropriate changes in future versions. + +(Note: If a package uses ``setuptools`` in its setup script, the package author +has the option to declare the package safe or unsafe for zipped usage via the +``zip_safe`` argument to ``setup()``. If the package author makes such a +declaration, EasyInstall believes the package's author and does not perform its +own analysis. However, your command-line option, if any, will still override +the package author's choice.) + + +Reference Manual +================ + +Configuration Files +------------------- + +(New in 0.4a2) + +You may specify default options for EasyInstall using the standard +distutils configuration files, under the command heading ``easy_install``. +EasyInstall will look first for a ``setup.cfg`` file in the current directory, +then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes +and Windows, respectively), and finally a ``distutils.cfg`` file in the +``distutils`` package directory. Here's a simple example: + +.. code-block:: ini + + [easy_install] + + # set the default location to install packages + install_dir = /home/me/lib/python + + # Notice that indentation can be used to continue an option + # value; this is especially useful for the "--find-links" + # option, which tells easy_install to use download links on + # these pages before consulting PyPI: + # + find_links = http://sqlobject.org/ + http://peak.telecommunity.com/dist/ + +In addition to accepting configuration for its own options under +``[easy_install]``, EasyInstall also respects defaults specified for other +distutils commands. For example, if you don't set an ``install_dir`` for +``[easy_install]``, but *have* set an ``install_lib`` for the ``[install]`` +command, this will become EasyInstall's default installation directory. Thus, +if you are already using distutils configuration files to set default install +locations, build options, etc., EasyInstall will respect your existing settings +until and unless you override them explicitly in an ``[easy_install]`` section. + +For more information, see also the current Python documentation on the `use and +location of distutils configuration files `_. + +Notice that ``easy_install`` will use the ``setup.cfg`` from the current +working directory only if it was triggered from ``setup.py`` through the +``install_requires`` option. The standalone command will not use that file. + +Command-Line Options +-------------------- + +``--zip-ok, -z`` + Install all packages as zip files, even if they are marked as unsafe for + running as a zipfile. This can be useful when EasyInstall's analysis + of a non-setuptools package is too conservative, but keep in mind that + the package may not work correctly. (Changed in 0.5a9; previously this + option was required in order for zipped installation to happen at all.) + +``--always-unzip, -Z`` + Don't install any packages as zip files, even if the packages are marked + as safe for running as a zipfile. This can be useful if a package does + something unsafe, but not in a way that EasyInstall can easily detect. + EasyInstall's default analysis is currently very conservative, however, so + you should only use this option if you've had problems with a particular + package, and *after* reporting the problem to the package's maintainer and + to the EasyInstall maintainers. + + (Note: the ``-z/-Z`` options only affect the installation of newly-built + or downloaded packages that are not already installed in the target + directory; if you want to convert an existing installed version from + zipped to unzipped or vice versa, you'll need to delete the existing + version first, and re-run EasyInstall.) + +``--multi-version, -m`` + "Multi-version" mode. Specifying this option prevents ``easy_install`` from + adding an ``easy-install.pth`` entry for the package being installed, and + if an entry for any version the package already exists, it will be removed + upon successful installation. In multi-version mode, no specific version of + the package is available for importing, unless you use + ``pkg_resources.require()`` to put it on ``sys.path``. This can be as + simple as:: + + from pkg_resources import require + require("SomePackage", "OtherPackage", "MyPackage") + + which will put the latest installed version of the specified packages on + ``sys.path`` for you. (For more advanced uses, like selecting specific + versions and enabling optional dependencies, see the ``pkg_resources`` API + doc.) + + Changed in 0.6a10: this option is no longer silently enabled when + installing to a non-PYTHONPATH, non-"site" directory. You must always + explicitly use this option if you want it to be active. + +``--upgrade, -U`` (New in 0.5a4) + By default, EasyInstall only searches online if a project/version + requirement can't be met by distributions already installed + on sys.path or the installation directory. However, if you supply the + ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package + index and ``--find-links`` URLs before selecting a version to install. In + this way, you can force EasyInstall to use the latest available version of + any package it installs (subject to any version requirements that might + exclude such later versions). + +``--install-dir=DIR, -d DIR`` + Set the installation directory. It is up to you to ensure that this + directory is on ``sys.path`` at runtime, and to use + ``pkg_resources.require()`` to enable the installed package(s) that you + need. + + (New in 0.4a2) If this option is not directly specified on the command line + or in a distutils configuration file, the distutils default installation + location is used. Normally, this would be the ``site-packages`` directory, + but if you are using distutils configuration files, setting things like + ``prefix`` or ``install_lib``, then those settings are taken into + account when computing the default installation directory, as is the + ``--prefix`` option. + +``--script-dir=DIR, -s DIR`` + Set the script installation directory. If you don't supply this option + (via the command line or a configuration file), but you *have* supplied + an ``--install-dir`` (via command line or config file), then this option + defaults to the same directory, so that the scripts will be able to find + their associated package installation. Otherwise, this setting defaults + to the location where the distutils would normally install scripts, taking + any distutils configuration file settings into account. + +``--exclude-scripts, -x`` + Don't install scripts. This is useful if you need to install multiple + versions of a package, but do not want to reset the version that will be + run by scripts that are already installed. + +``--user`` (New in 0.6.11) + Use the user-site-packages as specified in :pep:`370` + instead of the global site-packages. + +``--always-copy, -a`` (New in 0.5a4) + Copy all needed distributions to the installation directory, even if they + are already present in a directory on sys.path. In older versions of + EasyInstall, this was the default behavior, but now you must explicitly + request it. By default, EasyInstall will no longer copy such distributions + from other sys.path directories to the installation directory, unless you + explicitly gave the distribution's filename on the command line. + + Note that as of 0.6a10, using this option excludes "system" and + "development" eggs from consideration because they can't be reliably + copied. This may cause EasyInstall to choose an older version of a package + than what you expected, or it may cause downloading and installation of a + fresh copy of something that's already installed. You will see warning + messages for any eggs that EasyInstall skips, before it falls back to an + older version or attempts to download a fresh copy. + +``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES`` + Scan the specified "download pages" or directories for direct links to eggs + or other distributions. Any existing file or directory names or direct + download URLs are immediately added to EasyInstall's search cache, and any + indirect URLs (ones that don't point to eggs or other recognized archive + formats) are added to a list of additional places to search for download + links. As soon as EasyInstall has to go online to find a package (either + because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was + used), the specified URLs will be downloaded and scanned for additional + direct links. + + Eggs and archives found by way of ``--find-links`` are only downloaded if + they are needed to meet a requirement specified on the command line; links + to unneeded packages are ignored. + + If all requested packages can be found using links on the specified + download pages, the Python Package Index will not be consulted unless you + also specified the ``--upgrade`` or ``-U`` option. + + (Note: if you want to refer to a local HTML file containing links, you must + use a ``file:`` URL, as filenames that do not refer to a directory, egg, or + archive are ignored.) + + You may specify multiple URLs or file/directory names with this option, + separated by whitespace. Note that on the command line, you will probably + have to surround the URL list with quotes, so that it is recognized as a + single option value. You can also specify URLs in a configuration file; + see `Configuration Files`_, above. + + Changed in 0.6a10: previously all URLs and directories passed to this + option were scanned as early as possible, but from 0.6a10 on, only + directories and direct archive links are scanned immediately; URLs are not + retrieved unless a package search was already going to go online due to a + package not being available locally, or due to the use of the ``--update`` + or ``-U`` option. + +``--no-find-links`` Blocks the addition of any link. + This parameter is useful if you want to avoid adding links defined in a + project easy_install is installing (whether it's a requested project or a + dependency). When used, ``--find-links`` is ignored. + + Added in Distribute 0.6.11 and Setuptools 0.7. + +``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7) + Specifies the base URL of the Python Package Index. The default is + https://pypi.org/simple/ if not specified. When a package is requested + that is not locally available or linked from a ``--find-links`` download + page, the package index will be searched for download pages for the needed + package, and those download pages will be searched for links to download + an egg or source distribution. + +``--editable, -e`` (New in 0.6a1) + Only find and download source distributions for the specified projects, + unpacking them to subdirectories of the specified ``--build-directory``. + EasyInstall will not actually build or install the requested projects or + their dependencies; it will just find and extract them for you. See + `Editing and Viewing Source Packages`_ above for more details. + +``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1) + Set the directory used to build source packages. If a package is built + from a source distribution or checkout, it will be extracted to a + subdirectory of the specified directory. The subdirectory will have the + same name as the extracted distribution's project, but in all-lowercase. + If a file or directory of that name already exists in the given directory, + a warning will be printed to the console, and the build will take place in + a temporary directory instead. + + This option is most useful in combination with the ``--editable`` option, + which forces EasyInstall to *only* find and extract (but not build and + install) source distributions. See `Editing and Viewing Source Packages`_, + above, for more information. + +``--verbose, -v, --quiet, -q`` (New in 0.4a4) + Control the level of detail of EasyInstall's progress messages. The + default detail level is "info", which prints information only about + relatively time-consuming operations like running a setup script, unpacking + an archive, or retrieving a URL. Using ``-q`` or ``--quiet`` drops the + detail level to "warn", which will only display installation reports, + warnings, and errors. Using ``-v`` or ``--verbose`` increases the detail + level to include individual file-level operations, link analysis messages, + and distutils messages from any setup scripts that get run. If you include + the ``-v`` option more than once, the second and subsequent uses are passed + down to any setup scripts, increasing the verbosity of their reporting as + well. + +``--dry-run, -n`` (New in 0.4a4) + Don't actually install the package or scripts. This option is passed down + to any setup scripts run, so packages should not actually build either. + This does *not* skip downloading, nor does it skip extracting source + distributions to a temporary/build directory. + +``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4) + If you are installing from a source distribution, and are *not* using the + ``--zip-ok`` option, this option controls the optimization level for + compiling installed ``.py`` files to ``.pyo`` files. It does not affect + the compilation of modules contained in ``.egg`` files, only those in + ``.egg`` directories. The optimization level can be set to 0, 1, or 2; + the default is 0 (unless it's set under ``install`` or ``install_lib`` in + one of your distutils configuration files). + +``--record=FILENAME`` (New in 0.5a4) + Write a record of all installed files to FILENAME. This is basically the + same as the same option for the standard distutils "install" command, and + is included for compatibility with tools that expect to pass this option + to "setup.py install". + +``--site-dirs=DIRLIST, -S DIRLIST`` (New in 0.6a1) + Specify one or more custom "site" directories (separated by commas). + "Site" directories are directories where ``.pth`` files are processed, such + as the main Python ``site-packages`` directory. As of 0.6a10, EasyInstall + automatically detects whether a given directory processes ``.pth`` files + (or can be made to do so), so you should not normally need to use this + option. It is is now only necessary if you want to override EasyInstall's + judgment and force an installation directory to be treated as if it + supported ``.pth`` files. + +``--no-deps, -N`` (New in 0.6a6) + Don't install any dependencies. This is intended as a convenience for + tools that wrap eggs in a platform-specific packaging system. (We don't + recommend that you use it for anything else.) + +``--allow-hosts=PATTERNS, -H PATTERNS`` (New in 0.6a6) + Restrict downloading and spidering to hosts matching the specified glob + patterns. E.g. ``-H *.python.org`` restricts web access so that only + packages listed and downloadable from machines in the ``python.org`` + domain. The glob patterns must match the *entire* user/host/port section of + the target URL(s). For example, ``*.python.org`` will NOT accept a URL + like ``http://python.org/foo`` or ``http://www.python.org:8080/``. + Multiple patterns can be specified by separating them with commas. The + default pattern is ``*``, which matches anything. + + In general, this option is mainly useful for blocking EasyInstall's web + access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet + or other trusted site. EasyInstall will do the best it can to satisfy + dependencies given your host restrictions, but of course can fail if it + can't find suitable packages. EasyInstall displays all blocked URLs, so + that you can adjust your ``--allow-hosts`` setting if it is more strict + than you intended. Some sites may wish to define a restrictive default + setting for this option in their `configuration files`_, and then manually + override the setting on the command line as needed. + +``--prefix=DIR`` (New in 0.6a10) + Use the specified directory as a base for computing the default + installation and script directories. On Windows, the resulting default + directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``, + while on other platforms the defaults will be + ``prefix/lib/python2.X/site-packages`` (with the appropriate version + substituted) for libraries and ``prefix/bin`` for scripts. + + Note that the ``--prefix`` option only sets the *default* installation and + script directories, and does not override the ones set on the command line + or in a configuration file. + +``--local-snapshots-ok, -l`` (New in 0.6c6) + Normally, EasyInstall prefers to only install *released* versions of + projects, not in-development ones, because such projects may not + have a currently-valid version number. So, it usually only installs them + when their ``setup.py`` directory is explicitly passed on the command line. + + However, if this option is used, then any in-development projects that were + installed using the ``setup.py develop`` command, will be used to build + eggs, effectively upgrading the "in-development" project to a snapshot + release. Normally, this option is used only in conjunction with the + ``--always-copy`` option to create a distributable snapshot of every egg + needed to run an application. + + Note that if you use this option, you must make sure that there is a valid + version number (such as an SVN revision number tag) for any in-development + projects that may be used, as otherwise EasyInstall may not be able to tell + what version of the project is "newer" when future installations or + upgrades are attempted. + + +.. _non-root installation: + +Custom Installation Locations +----------------------------- + +By default, EasyInstall installs python packages into Python's main ``site-packages`` directory, +and manages them using a custom ``.pth`` file in that same directory. + +Very often though, a user or developer wants ``easy_install`` to install and manage python packages +in an alternative location, usually for one of 3 reasons: + +1. They don't have access to write to the main Python site-packages directory. + +2. They want a user-specific stash of packages, that is not visible to other users. + +3. They want to isolate a set of packages to a specific python application, usually to minimize + the possibility of version conflicts. + +Historically, there have been many approaches to achieve custom installation. +The following section lists only the easiest and most relevant approaches [1]_. + +`Use the "--user" option`_ + +`Use the "--user" option and customize "PYTHONUSERBASE"`_ + +`Use "virtualenv"`_ + +.. [1] There are older ways to achieve custom installation using various ``easy_install`` and ``setup.py install`` options, combined with ``PYTHONPATH`` and/or ``PYTHONUSERBASE`` alterations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_. + +.. _PEP-370: http://www.python.org/dev/peps/pep-0370/ + + +Use the "--user" option +~~~~~~~~~~~~~~~~~~~~~~~ +Python provides a User scheme for installation, which means that all +python distributions support an alternative install location that is specific to a user [3]_. +The Default location for each OS is explained in the python documentation +for the ``site.USER_BASE`` variable. This mode of installation can be turned on by +specifying the ``--user`` option to ``setup.py install`` or ``easy_install``. +This approach serves the need to have a user-specific stash of packages. + +.. [3] Prior to the User scheme, there was the Home scheme, which is still available, but requires more effort than the User scheme to get packages recognized. + +Use the "--user" option and customize "PYTHONUSERBASE" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The User scheme install location can be customized by setting the ``PYTHONUSERBASE`` environment +variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific +application, simply set the OS environment of that application to a specific value of +``PYTHONUSERBASE``, that contains just those packages. + +Use "virtualenv" +~~~~~~~~~~~~~~~~ +"virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby +creating an isolated location to install packages. The evolution of "virtualenv" started before the existence +of the User installation scheme. "virtualenv" provides a version of ``easy_install`` that is +scoped to the cloned python install and is used in the normal way. "virtualenv" does offer various features +that the User installation scheme alone does not provide, e.g. the ability to hide the main python site-packages. + +Please refer to the `virtualenv`_ documentation for more details. + +.. _virtualenv: https://pypi.org/project/virtualenv/ + + + +Package Index "API" +------------------- + +Custom package indexes (and PyPI) must follow the following rules for +EasyInstall to be able to look up and download packages: + +1. Except where stated otherwise, "pages" are HTML or XHTML, and "links" + refer to ``href`` attributes. + +2. Individual project version pages' URLs must be of the form + ``base/projectname/version``, where ``base`` is the package index's base URL. + +3. Omitting the ``/version`` part of a project page's URL (but keeping the + trailing ``/``) should result in a page that is either: + + a) The single active version of that project, as though the version had been + explicitly included, OR + + b) A page with links to all of the active version pages for that project. + +4. Individual project version pages should contain direct links to downloadable + distributions where possible. It is explicitly permitted for a project's + "long_description" to include URLs, and these should be formatted as HTML + links by the package index, as EasyInstall does no special processing to + identify what parts of a page are index-specific and which are part of the + project's supplied description. + +5. Where available, MD5 information should be added to download URLs by + appending a fragment identifier of the form ``#md5=...``, where ``...`` is + the 32-character hex MD5 digest. EasyInstall will verify that the + downloaded file's MD5 digest matches the given value. + +6. Individual project version pages should identify any "homepage" or + "download" URLs using ``rel="homepage"`` and ``rel="download"`` attributes + on the HTML elements linking to those URLs. Use of these attributes will + cause EasyInstall to always follow the provided links, unless it can be + determined by inspection that they are downloadable distributions. If the + links are not to downloadable distributions, they are retrieved, and if they + are HTML, they are scanned for download links. They are *not* scanned for + additional "homepage" or "download" links, as these are only processed for + pages that are part of a package index site. + +7. The root URL of the index, if retrieved with a trailing ``/``, must result + in a page containing links to *all* projects' active version pages. + + (Note: This requirement is a workaround for the absence of case-insensitive + ``safe_name()`` matching of project names in URL paths. If project names are + matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar + mechanism), then it is not necessary to include this all-packages listing + page.) + +8. If a package index is accessed via a ``file://`` URL, then EasyInstall will + automatically use ``index.html`` files, if present, when trying to read a + directory with a trailing ``/`` on the URL. diff --git a/docs/index.txt b/docs/index.txt index c251260df6..13a46e74ef 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -21,4 +21,5 @@ Documentation content: python3 development roadmap + Deprecated: Easy Install history diff --git a/easy_install.py b/easy_install.py new file mode 100644 index 0000000000..d87e984034 --- /dev/null +++ b/easy_install.py @@ -0,0 +1,5 @@ +"""Run the EasyInstall command""" + +if __name__ == '__main__': + from setuptools.command.easy_install import main + main() diff --git a/setup.cfg b/setup.cfg index 385ba14df4..42a3d86c6c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,6 +51,7 @@ classifiers = [options] zip_safe = True python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* +py_modules = easy_install packages = find: [options.packages.find] diff --git a/setup.py b/setup.py index 59efc23743..d97895fcc0 100755 --- a/setup.py +++ b/setup.py @@ -31,6 +31,22 @@ def read_commands(): return command_ns['__all__'] +def _gen_console_scripts(): + yield "easy_install = setuptools.command.easy_install:main" + + # Gentoo distributions manage the python-version-specific scripts + # themselves, so those platforms define an environment variable to + # suppress the creation of the version-specific scripts. + var_names = ( + 'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', + 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', + ) + if any(os.environ.get(var) not in (None, "", "0") for var in var_names): + return + tmpl = "easy_install-{shortver} = setuptools.command.easy_install:main" + yield tmpl.format(shortver='{}.{}'.format(*sys.version_info)) + + package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], ) @@ -109,6 +125,9 @@ def pypi_link(pkg_filename): "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], + "console_scripts": list(_gen_console_scripts()), + "setuptools.installation": + ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, dependency_links=[ pypi_link( diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index d273bc101c..09066f8c86 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -73,7 +73,7 @@ __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', - 'get_exe_prefixes', + 'main', 'get_exe_prefixes', ] @@ -2289,6 +2289,59 @@ def current_umask(): return tmp +def bootstrap(): + # This function is called when setuptools*.egg is run using /bin/sh + import setuptools + + argv0 = os.path.dirname(setuptools.__path__[0]) + sys.argv[0] = argv0 + sys.argv.append(argv0) + main() + + +def main(argv=None, **kw): + from setuptools import setup + from setuptools.dist import Distribution + + class DistributionWithoutHelpCommands(Distribution): + common_usage = "" + + def _show_help(self, *args, **kw): + with _patch_usage(): + Distribution._show_help(self, *args, **kw) + + if argv is None: + argv = sys.argv[1:] + + with _patch_usage(): + setup( + script_args=['-q', 'easy_install', '-v'] + argv, + script_name=sys.argv[0] or 'easy_install', + distclass=DistributionWithoutHelpCommands, + **kw + ) + + +@contextlib.contextmanager +def _patch_usage(): + import distutils.core + USAGE = textwrap.dedent(""" + usage: %(script)s [options] requirement_or_url ... + or: %(script)s --help + """).lstrip() + + def gen_usage(script_name): + return USAGE % dict( + script=os.path.basename(script_name), + ) + + saved = distutils.core.gen_usage + distutils.core.gen_usage = gen_usage + try: + yield + finally: + distutils.core.gen_usage = saved + class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning.""" diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 68319c2fb6..aa75899a06 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -467,24 +467,22 @@ def test_setup_requires_honors_fetch_params(self, mock_index, monkeypatch): """ monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) - monkeypatch.setenv(str('PIP_VERBOSE'), str('1')) - # create an sdist that has a build-time dependency. - with TestSetupRequires.create_sdist() as dist_file: - with contexts.tempdir() as temp_dir: - setup_py = os.path.join(temp_dir, 'setup.py') - with open(setup_py, 'w') as fp: - fp.write('__import__("setuptools").setup()') - temp_install_dir = os.path.join(temp_dir, 'target') - os.mkdir(temp_install_dir) - with contexts.environment(PYTHONPATH=temp_install_dir): - # attempt to install the dist. It should - # fail because it doesn't exist. - with pytest.raises(SystemExit): - run_setup(setup_py, ['easy_install', - '--exclude-scripts', - '--index-url', mock_index.url, - '--install-dir', temp_install_dir, - dist_file]) + with contexts.quiet(): + # create an sdist that has a build-time dependency. + with TestSetupRequires.create_sdist() as dist_file: + with contexts.tempdir() as temp_install_dir: + with contexts.environment(PYTHONPATH=temp_install_dir): + ei_params = [ + '--index-url', mock_index.url, + '--exclude-scripts', + '--install-dir', temp_install_dir, + dist_file, + ] + with sandbox.save_argv(['easy_install']): + # attempt to install the dist. It should + # fail because it doesn't exist. + with pytest.raises(SystemExit): + easy_install_pkg.main(ei_params) # there should have been one requests to the server assert [r.path for r in mock_index.requests] == ['/does-not-exist/'] diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 3c5df68a35..f937d98189 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -64,8 +64,9 @@ def test_pkg_resources_import(self, tmpdir): target.mkdir() install_cmd = [ sys.executable, - '-m', 'pip.__main__', 'install', - '-t', str(target), str(pkg), + '-m', 'easy_install', + '-d', str(target), + str(pkg), ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(install_cmd) From f265e4089c63bfa17d8024d0d6a574c2aaaa992d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Nov 2019 20:18:24 -0500 Subject: [PATCH 7603/8469] normalize indentation --- pytest.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pytest.ini b/pytest.ini index 3b3d4b8b07..1400d12217 100644 --- a/pytest.ini +++ b/pytest.ini @@ -6,7 +6,7 @@ flake8-ignore = setuptools/py*compat.py F811 doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = - # Fail on warnings - error - # https://github.com/pypa/setuptools/issues/1823 - ignore:bdist_wininst command is deprecated + # Fail on warnings + error + # https://github.com/pypa/setuptools/issues/1823 + ignore:bdist_wininst command is deprecated From 4188aba5265e9b7145b1c5ed10c8e0ae769f70b4 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 17 Nov 2019 22:24:05 +0100 Subject: [PATCH 7604/8469] add changelog entries --- changelog.d/1830.breaking.rst | 7 +++++++ changelog.d/1909.breaking.rst | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 changelog.d/1830.breaking.rst create mode 100644 changelog.d/1909.breaking.rst diff --git a/changelog.d/1830.breaking.rst b/changelog.d/1830.breaking.rst new file mode 100644 index 0000000000..9f2214ab77 --- /dev/null +++ b/changelog.d/1830.breaking.rst @@ -0,0 +1,7 @@ +Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: + * support for ``python_requires`` + * better support for wheels (proper handling of priority with respect to PEP 425 tags) + * PEP 517/518 support + * eggs are not supported + * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) + * pip environment variables are honored (and take precedence over easy_install options) diff --git a/changelog.d/1909.breaking.rst b/changelog.d/1909.breaking.rst new file mode 100644 index 0000000000..9f2214ab77 --- /dev/null +++ b/changelog.d/1909.breaking.rst @@ -0,0 +1,7 @@ +Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: + * support for ``python_requires`` + * better support for wheels (proper handling of priority with respect to PEP 425 tags) + * PEP 517/518 support + * eggs are not supported + * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) + * pip environment variables are honored (and take precedence over easy_install options) From b09909462acad0d0175cf2fcef76cf1e1c7adc76 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 19 Nov 2019 19:45:20 +0000 Subject: [PATCH 7605/8469] bpo-38839: Fix some unused functions in tests (GH-17189) --- tests/support.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/support.py b/tests/support.py index 041309851d..259af882ec 100644 --- a/tests/support.py +++ b/tests/support.py @@ -39,8 +39,6 @@ def _log(self, level, msg, args): self.logs.append((level, msg, args)) def get_logs(self, *levels): - def _format(msg, args): - return msg % args return [msg % args for level, msg, args in self.logs if level in levels] From d155aa0d61690b7013de968b912a001d18f5cfdd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Nov 2019 14:43:07 -0500 Subject: [PATCH 7606/8469] =?UTF-8?q?Bump=20version:=2041.6.0=20=E2=86=92?= =?UTF-8?q?=2042.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 20 ++++++++++++++++++++ changelog.d/1767.change.rst | 2 -- changelog.d/1829.change.rst | 3 --- changelog.d/1830.breaking.rst | 7 ------- changelog.d/1861.change.rst | 1 - changelog.d/1877.change.rst | 1 - changelog.d/1898.breaking.rst | 1 - changelog.d/1909.breaking.rst | 7 ------- setup.cfg | 2 +- 10 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 changelog.d/1767.change.rst delete mode 100644 changelog.d/1829.change.rst delete mode 100644 changelog.d/1830.breaking.rst delete mode 100644 changelog.d/1861.change.rst delete mode 100644 changelog.d/1877.change.rst delete mode 100644 changelog.d/1898.breaking.rst delete mode 100644 changelog.d/1909.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 40db5b03f1..0551f1b044 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 41.6.0 +current_version = 42.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ba7b4647c8..0a8696c2a8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,23 @@ +v42.0.0 +------- + +* #1830, #1909: Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: + * support for ``python_requires`` + * better support for wheels (proper handling of priority with respect to PEP 425 tags) + * PEP 517/518 support + * eggs are not supported + * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) + * pip environment variables are honored (and take precedence over easy_install options) +* #1898: Removed the "upload" and "register" commands in favor of `twine `_. +* #1767: Add support for the ``license_files`` option in ``setup.cfg`` to automatically + include multiple license files in a source distribution. +* #1829: Update handling of wheels compatibility tags: + * add support for manylinux2010 + * fix use of removed 'm' ABI flag in Python 3.8 on Windows +* #1861: Fix empty namespace package installation from wheel. +* #1877: Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like `setuptools_scm `_ to configure options on the distribution at finalization time. + + v41.6.0 ------- diff --git a/changelog.d/1767.change.rst b/changelog.d/1767.change.rst deleted file mode 100644 index 5d42aedc87..0000000000 --- a/changelog.d/1767.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add support for the ``license_files`` option in ``setup.cfg`` to automatically -include multiple license files in a source distribution. diff --git a/changelog.d/1829.change.rst b/changelog.d/1829.change.rst deleted file mode 100644 index 36be832ac5..0000000000 --- a/changelog.d/1829.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -Update handling of wheels compatibility tags: -* add support for manylinux2010 -* fix use of removed 'm' ABI flag in Python 3.8 on Windows diff --git a/changelog.d/1830.breaking.rst b/changelog.d/1830.breaking.rst deleted file mode 100644 index 9f2214ab77..0000000000 --- a/changelog.d/1830.breaking.rst +++ /dev/null @@ -1,7 +0,0 @@ -Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: - * support for ``python_requires`` - * better support for wheels (proper handling of priority with respect to PEP 425 tags) - * PEP 517/518 support - * eggs are not supported - * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) - * pip environment variables are honored (and take precedence over easy_install options) diff --git a/changelog.d/1861.change.rst b/changelog.d/1861.change.rst deleted file mode 100644 index 5a4e0a56a9..0000000000 --- a/changelog.d/1861.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix empty namespace package installation from wheel. diff --git a/changelog.d/1877.change.rst b/changelog.d/1877.change.rst deleted file mode 100644 index 5a744fa3fd..0000000000 --- a/changelog.d/1877.change.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like `setuptools_scm `_ to configure options on the distribution at finalization time. diff --git a/changelog.d/1898.breaking.rst b/changelog.d/1898.breaking.rst deleted file mode 100644 index 844a8a42fa..0000000000 --- a/changelog.d/1898.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Removed the "upload" and "register" commands in favor of `twine `_. diff --git a/changelog.d/1909.breaking.rst b/changelog.d/1909.breaking.rst deleted file mode 100644 index 9f2214ab77..0000000000 --- a/changelog.d/1909.breaking.rst +++ /dev/null @@ -1,7 +0,0 @@ -Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: - * support for ``python_requires`` - * better support for wheels (proper handling of priority with respect to PEP 425 tags) - * PEP 517/518 support - * eggs are not supported - * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) - * pip environment variables are honored (and take precedence over easy_install options) diff --git a/setup.cfg b/setup.cfg index 42a3d86c6c..c0aa35bae5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 41.6.0 +version = 42.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 926c80f5e84823f48103f3695f55f23949cc5d37 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 25 Nov 2019 11:24:10 +0100 Subject: [PATCH 7607/8469] wheel: fix `is_compatible` implementation --- changelog.d/1918.change.rst | 1 + setuptools/tests/test_wheel.py | 9 +++++++++ setuptools/wheel.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1918.change.rst diff --git a/changelog.d/1918.change.rst b/changelog.d/1918.change.rst new file mode 100644 index 0000000000..29d004566f --- /dev/null +++ b/changelog.d/1918.change.rst @@ -0,0 +1 @@ +Fix regression in handling wheels compatibility tags. diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index d50816c22a..55d346c67c 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -18,6 +18,7 @@ from pkg_resources import Distribution, PathMetadata, PY_MAJOR from setuptools.extern.packaging.utils import canonicalize_name +from setuptools.extern.packaging.tags import parse_tag from setuptools.wheel import Wheel from .contexts import tempdir @@ -571,3 +572,11 @@ def test_wheel_no_dist_dir(): _check_wheel_install(wheel_path, install_dir, None, project_name, version, None) + + +def test_wheel_is_compatible(monkeypatch): + def sys_tags(): + for t in parse_tag('cp36-cp36m-manylinux1_x86_64'): + yield t + monkeypatch.setattr('setuptools.wheel.sys_tags', sys_tags) + assert Wheel('onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible() diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 3effd79b3f..025aaa828a 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -77,7 +77,7 @@ def tags(self): def is_compatible(self): '''Is the wheel is compatible with the current platform?''' - supported_tags = set(map(str, sys_tags())) + supported_tags = set((t.interpreter, t.abi, t.platform) for t in sys_tags()) return next((True for t in self.tags() if t in supported_tags), False) def egg_name(self): From e84f616a6507ec9115fad68b221cbf5333d9d2d9 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 25 Nov 2019 12:08:38 +0100 Subject: [PATCH 7608/8469] =?UTF-8?q?Bump=20version:=2042.0.0=20=E2=86=92?= =?UTF-8?q?=2042.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1918.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1918.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0551f1b044..e37acce5f9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 42.0.0 +current_version = 42.0.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 0a8696c2a8..da657c2801 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v42.0.1 +------- + +* #1918: Fix regression in handling wheels compatibility tags. + + v42.0.0 ------- diff --git a/changelog.d/1918.change.rst b/changelog.d/1918.change.rst deleted file mode 100644 index 29d004566f..0000000000 --- a/changelog.d/1918.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix regression in handling wheels compatibility tags. diff --git a/setup.cfg b/setup.cfg index c0aa35bae5..b8e542798a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 42.0.0 +version = 42.0.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 6f46a4b703d4db225e96bb871e1bf6a7c3597329 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 26 Nov 2019 18:46:34 +0100 Subject: [PATCH 7609/8469] fix support for easy_install's find-links option in setup.cfg --- changelog.d/1921.change.txt | 1 + setuptools/installer.py | 13 +++++++-- setuptools/tests/test_easy_install.py | 38 +++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1921.change.txt diff --git a/changelog.d/1921.change.txt b/changelog.d/1921.change.txt new file mode 100644 index 0000000000..7c001eb8ef --- /dev/null +++ b/changelog.d/1921.change.txt @@ -0,0 +1 @@ +Fix support for easy_install's ``find-links`` option in ``setup.cfg``. diff --git a/setuptools/installer.py b/setuptools/installer.py index 35bc3cc550..a5816608f6 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -7,11 +7,20 @@ import pkg_resources from setuptools.command.easy_install import easy_install +from setuptools.extern import six from setuptools.wheel import Wheel from .py31compat import TemporaryDirectory +def _fixup_find_links(find_links): + """Ensure find-links option end-up being a list of strings.""" + if isinstance(find_links, six.string_types): + return find_links.split() + assert isinstance(find_links, (tuple, list)) + return find_links + + def _legacy_fetch_build_egg(dist, req): """Fetch an egg needed for building. @@ -31,7 +40,7 @@ def _legacy_fetch_build_egg(dist, req): if dist.dependency_links: links = dist.dependency_links[:] if 'find_links' in opts: - links = opts['find_links'][1] + links + links = _fixup_find_links(opts['find_links'][1]) + links opts['find_links'] = ('setup', links) install_dir = dist.get_egg_cache_dir() cmd = easy_install( @@ -84,7 +93,7 @@ def fetch_build_egg(dist, req): else: index_url = None if 'find_links' in opts: - find_links = opts['find_links'][1][:] + find_links = _fixup_find_links(opts['find_links'][1])[:] else: find_links = [] if dist.dependency_links: diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aa75899a06..a21651ec78 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -744,6 +744,44 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): eggs = list(map(str, pkg_resources.find_distributions(os.path.join(test_pkg, '.eggs')))) assert eggs == ['dep 1.0'] + @pytest.mark.parametrize('use_legacy_installer,with_dependency_links_in_setup_py', + itertools.product((False, True), (False, True))) + def test_setup_requires_with_find_links_in_setup_cfg(self, monkeypatch, + use_legacy_installer, + with_dependency_links_in_setup_py): + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + make_trivial_sdist(os.path.join(temp_dir, 'python-xlib-42.tar.gz'), 'python-xlib', '42') + test_pkg = os.path.join(temp_dir, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + with open(test_setup_py, 'w') as fp: + if with_dependency_links_in_setup_py: + dependency_links = [os.path.join(temp_dir, 'links')] + else: + dependency_links = [] + fp.write(DALS( + ''' + from setuptools import installer, setup + if {use_legacy_installer}: + installer.fetch_build_egg = installer._legacy_fetch_build_egg + setup(setup_requires='python-xlib==42', + dependency_links={dependency_links!r}) + ''').format(use_legacy_installer=use_legacy_installer, + dependency_links=dependency_links)) + with open(test_setup_cfg, 'w') as fp: + fp.write(DALS( + ''' + [easy_install] + index_url = {index_url} + find_links = {find_links} + ''').format(index_url=os.path.join(temp_dir, 'index'), + find_links=temp_dir)) + run_setup(test_setup_py, [str('--version')]) + def make_trivial_sdist(dist_path, distname, version): """ From 7502dc9ca767927db9599f93cd48851ca59f7a62 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Tue, 26 Nov 2019 20:56:57 +0100 Subject: [PATCH 7610/8469] fix possible issue with transitive build dependencies Handle the case where a missing transitive build dependency is required by an extra for an already installed build dependency. --- changelog.d/1922.change.rst | 1 + setuptools/installer.py | 7 +++-- setuptools/tests/test_easy_install.py | 44 +++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1922.change.rst diff --git a/changelog.d/1922.change.rst b/changelog.d/1922.change.rst new file mode 100644 index 0000000000..7aeb251c84 --- /dev/null +++ b/changelog.d/1922.change.rst @@ -0,0 +1 @@ +Fix possible issue with transitive build dependencies. diff --git a/setuptools/installer.py b/setuptools/installer.py index 35bc3cc550..ba9cfce9ff 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -64,8 +64,11 @@ def fetch_build_egg(dist, req): pkg_resources.get_distribution('wheel') except pkg_resources.DistributionNotFound: dist.announce('WARNING: The wheel package is not available.', log.WARN) - if not isinstance(req, pkg_resources.Requirement): - req = pkg_resources.Requirement.parse(req) + # Ignore environment markers: if we're here, it's needed. This ensure + # we don't try to ask pip for something like `babel; extra == "i18n"`, + # which would always be ignored. + req = pkg_resources.Requirement.parse(str(req)) + req.marker = None # Take easy_install options into account, but do not override relevant # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll # take precedence. diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index aa75899a06..f6da1b16cb 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -37,6 +37,7 @@ import pkg_resources from . import contexts +from .files import build_files from .textwrap import DALS __metaclass__ = type @@ -744,6 +745,49 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): eggs = list(map(str, pkg_resources.find_distributions(os.path.join(test_pkg, '.eggs')))) assert eggs == ['dep 1.0'] + def test_setup_requires_with_transitive_extra_dependency(self, monkeypatch): + # Use case: installing a package with a build dependency on + # an already installed `dep[extra]`, which in turn depends + # on `extra_dep` (whose is not already installed). + with contexts.save_pkg_resources_state(): + with contexts.tempdir() as temp_dir: + # Create source distribution for `extra_dep`. + make_trivial_sdist(os.path.join(temp_dir, 'extra_dep-1.0.tar.gz'), 'extra_dep', '1.0') + # Create source tree for `dep`. + dep_pkg = os.path.join(temp_dir, 'dep') + os.mkdir(dep_pkg) + build_files({ + 'setup.py': + DALS(""" + import setuptools + setuptools.setup( + name='dep', version='2.0', + extras_require={'extra': ['extra_dep']}, + ) + """), + 'setup.cfg': '', + }, prefix=dep_pkg) + # "Install" dep. + run_setup(os.path.join(dep_pkg, 'setup.py'), [str('dist_info')]) + working_set.add_entry(dep_pkg) + # Create source tree for test package. + test_pkg = os.path.join(temp_dir, 'test_pkg') + test_setup_py = os.path.join(test_pkg, 'setup.py') + test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') + os.mkdir(test_pkg) + with open(test_setup_py, 'w') as fp: + fp.write(DALS( + ''' + from setuptools import installer, setup + setup(setup_requires='dep[extra]') + ''')) + # Check... + monkeypatch.setenv(str('PIP_FIND_LINKS'), str(temp_dir)) + monkeypatch.setenv(str('PIP_NO_INDEX'), str('1')) + monkeypatch.setenv(str('PIP_RETRIES'), str('0')) + monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + run_setup(test_setup_py, [str('--version')]) + def make_trivial_sdist(dist_path, distname, version): """ From b10e8186a9305d1f899f0fd7d1319b7b15ed1ecd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 20:33:33 -0500 Subject: [PATCH 7611/8469] Rebrand to 'For Enterprise' --- docs/_templates/tidelift-sidebar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_templates/tidelift-sidebar.html b/docs/_templates/tidelift-sidebar.html index c89c0f09d0..ce48f46b8a 100644 --- a/docs/_templates/tidelift-sidebar.html +++ b/docs/_templates/tidelift-sidebar.html @@ -1,6 +1,6 @@ -

    Professional support

    +

    For Enterprise

    Professionally-supported {{ project }} is available with the -Tidelift Subscription. +Tidelift Subscription.

    From bb357fb88ca6df10b84235eff42bafa1461b2b75 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 20:38:21 -0500 Subject: [PATCH 7612/8469] Add a 'For Enterprise' section to the README --- README.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.rst b/README.rst index 420bfb4f04..7b317c718e 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,15 @@ .. image:: https://tidelift.com/badges/package/pypi/PROJECT :target: https://tidelift.com/subscription/pkg/pypi-PROJECT?utm_source=pypi-PROJECT&utm_medium=readme +For Enterprise +============== + +Available as part of the Tidelift Subscription. + +This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. + +`Learn more `_. + Security Contact ================ From cbd977b8252f1df53aca7f09cf6160590b3b2ed0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 20:42:33 -0500 Subject: [PATCH 7613/8469] Rename 'Professional support' to 'For Enterprise' and add section on 'For Enterprise' to the README (linking to Tidelift). --- README.rst | 11 ++++++++++- docs/_templates/indexsidebar.html | 14 +++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index dac8a46873..da0549a98a 100644 --- a/README.rst +++ b/README.rst @@ -34,8 +34,17 @@ To report a security vulnerability, please use the Tidelift will coordinate the fix and disclosure. +For Enterprise +============== + +Available as part of the Tidelift Subscription. + +Setuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. + +`Learn more `_. + Code of Conduct ---------------- +=============== Everyone interacting in the setuptools project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the diff --git a/docs/_templates/indexsidebar.html b/docs/_templates/indexsidebar.html index 504de6b069..d803b8a37a 100644 --- a/docs/_templates/indexsidebar.html +++ b/docs/_templates/indexsidebar.html @@ -1,3 +1,10 @@ +

    For Enterprise

    + +

    +Professionally-supported {{ project }} is available with the +Tidelift Subscription. +

    +

    Download

    Current version: {{ version }}

    @@ -6,10 +13,3 @@

    Download

    Questions? Suggestions? Contributions?

    Visit the Project page

    - -

    Professional support

    - -

    -Professionally-supported {{ project }} is available with the -Tidelift Subscription. -

    From 769658cc0fb73347d044de0279dc0a361c04b316 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 21:05:15 -0500 Subject: [PATCH 7614/8469] Don't pin to old Python as 'default' --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7088d16621..f37529d964 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,7 @@ jobs: env: DISABLE_COVERAGE=1 - python: 3.4 - python: 3.5 - - &default_py - python: 3.6 + - python: 3.6 - python: 3.7 - &latest_py3 python: 3.8 @@ -24,7 +23,7 @@ jobs: - python: 3.8-dev - <<: *latest_py3 env: TOXENV=docs DISABLE_COVERAGE=1 - - <<: *default_py + - <<: *latest_py3 stage: deploy (to PyPI for tagged commits) if: tag IS present install: skip From d7bdf132857be9da15a6c3b733f97e998725cdba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 21:07:53 -0500 Subject: [PATCH 7615/8469] Add 'release' tox environment from jaraco/skeleton --- tox.ini | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tox.ini b/tox.ini index 5d439cb34b..faccffdce1 100644 --- a/tox.ini +++ b/tox.ini @@ -55,3 +55,18 @@ source= setuptools omit= */_vendor/* + +[testenv:release] +skip_install = True +deps = + pep517>=0.5 + twine[keyring]>=1.13 + path +passenv = + TWINE_PASSWORD +setenv = + TWINE_USERNAME = {env:TWINE_USERNAME:__token__} +commands = + python -c "import path; path.Path('dist').rmtree_p()" + python -m pep517.build . + python -m twine upload dist/* From ef3c044ca799e8796a872170adc09796ef59f7da Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 21:17:01 -0500 Subject: [PATCH 7616/8469] Invoke bootstrap prior to cutting release. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index faccffdce1..a82b902bc9 100644 --- a/tox.ini +++ b/tox.ini @@ -67,6 +67,7 @@ passenv = setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = + python -m bootstrap python -c "import path; path.Path('dist').rmtree_p()" python -m pep517.build . python -m twine upload dist/* From 350a74162aa4b4893d2d50a4455304755e2014be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 Nov 2019 21:24:24 -0500 Subject: [PATCH 7617/8469] Simply invoke the tox 'release' environment to cut releases. --- .travis.yml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index f37529d964..bcff8ad960 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,25 +24,11 @@ jobs: - <<: *latest_py3 env: TOXENV=docs DISABLE_COVERAGE=1 - <<: *latest_py3 - stage: deploy (to PyPI for tagged commits) + stage: deploy if: tag IS present install: skip - script: skip - after_success: true - before_deploy: - - python bootstrap.py - - "! grep pyc setuptools.egg-info/SOURCES.txt" - deploy: - provider: pypi - on: - tags: true - all_branches: true - user: __token__ - password: - secure: FSp9KU+pdvWPxBOaxe6BNmcJ9y8259G3/NdTJ00r0qx/xMLpSneGjpuLqoD6BL2JoM6gRwurwakWoH/9Ah+Di7afETjMnL6WJKtDZ+Uu3YLx3ss7/FlhVz6zmVTaDJUzuo9dGr//qLBQTIxVjGYfQelRJyfMAXtrYWdeT/4489E45lMw+86Z/vnSBOxs4lWekeQW5Gem0cDViWu67RRiGkAEvrYVwuImMr2Dyhpv+l/mQGQIS/ezXuAEFToE6+q8VUVe/aK498Qovdc+O4M7OYk1JouFpffZ3tVZ6iWHQFcR11480UdI6VCIcFpPvGC/J8MWUWLjq7YOm0X9jPXgdYMUQLAP4clFgUr2qNoRSKWfuQlNdVVuS2htYcjJ3eEl90FhcIZKp+WVMrypRPOQJ8CBielZEs0dhytRrZSaJC1BNq25O/BPzws8dL8hYtoXsM6I3Zv5cZgdyqyq/eOEMCX7Cetv6do0U41VGEV5UohvyyuwH5l9GCuPREpY3sXayPg8fw7XcPjvvzSVyjcUT/ePW8sfnAyWZnngjweAn6dK8IFGPuSPQdlos78uxeUOvCVUW0xv/0m4lX73yoHdVVdLbu1MJTyibFGec86Bew9JqIcDlhHaIJ9ihZ9Z9tOtvp1cuNyKYE4kvmOtumDDicEw4DseYn2z5sZDTYTBsKY= - distributions: release - skip_cleanup: true - skip_upload_docs: true + script: tox -e release + after_success: skip cache: pip From 6429e2c54ba8d6cbb2d8d8e7108b91122cb7039a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 08:55:53 -0500 Subject: [PATCH 7618/8469] Restore 'setup.py' release step --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index a82b902bc9..21ec6cde98 100644 --- a/tox.ini +++ b/tox.ini @@ -59,7 +59,7 @@ omit= [testenv:release] skip_install = True deps = - pep517>=0.5 + wheel twine[keyring]>=1.13 path passenv = @@ -69,5 +69,5 @@ setenv = commands = python -m bootstrap python -c "import path; path.Path('dist').rmtree_p()" - python -m pep517.build . + python setup.py release python -m twine upload dist/* From 7a709b6d30dac9409707b1b9bf50cd7022e35118 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 09:14:49 -0500 Subject: [PATCH 7619/8469] Restore build-backend and remove switch to avoid pep517. Ref #1644. --- pyproject.toml | 3 ++- tools/tox_pip.py | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 07c23bb5f5..5a2d7d3b67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] -requires = ["wheel"] +requires = ["setuptools >= 40.8", "wheel"] +build-backend = "setuptools.build_meta" [tool.towncrier] package = "setuptools" diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 5aeca80503..63518f927e 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -21,12 +21,6 @@ def pip(args): pypath = pypath.split(os.pathsep) if pypath is not None else [] pypath.insert(0, TOX_PIP_DIR) os.environ['PYTHONPATH'] = os.pathsep.join(pypath) - # Disable PEP 517 support when using editable installs. - for n, a in enumerate(args): - if not a.startswith('-'): - if a in 'install' and '-e' in args[n:]: - args.insert(n + 1, '--no-use-pep517') - break # Fix call for setuptools editable install. for n, a in enumerate(args): if a == '.': From 2292718a151994efb7d364312c73d5b536988049 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 09:23:31 -0500 Subject: [PATCH 7620/8469] Reword changelog to give more context --- changelog.d/1922.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1922.change.rst b/changelog.d/1922.change.rst index 7aeb251c84..837ef9c9e8 100644 --- a/changelog.d/1922.change.rst +++ b/changelog.d/1922.change.rst @@ -1 +1 @@ -Fix possible issue with transitive build dependencies. +Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. From a2e883e1b838db529d992d4c6c8ab73c16f48591 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 09:38:13 -0500 Subject: [PATCH 7621/8469] Extract function to strip the marker for concise code in the long function. --- setuptools/installer.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/setuptools/installer.py b/setuptools/installer.py index ba9cfce9ff..527b95dedd 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -64,11 +64,8 @@ def fetch_build_egg(dist, req): pkg_resources.get_distribution('wheel') except pkg_resources.DistributionNotFound: dist.announce('WARNING: The wheel package is not available.', log.WARN) - # Ignore environment markers: if we're here, it's needed. This ensure - # we don't try to ask pip for something like `babel; extra == "i18n"`, - # which would always be ignored. - req = pkg_resources.Requirement.parse(str(req)) - req.marker = None + # Ignore environment markers; if supplied, it is required. + req = strip_marker(req) # Take easy_install options into account, but do not override relevant # pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll # take precedence. @@ -130,3 +127,15 @@ def fetch_build_egg(dist, req): dist = pkg_resources.Distribution.from_filename( dist_location, metadata=dist_metadata) return dist + + +def strip_marker(req): + """ + Return a new requirement without the environment marker to avoid + calling pip with something like `babel; extra == "i18n"`, which + would always be ignored. + """ + # create a copy to avoid mutating the input + req = pkg_resources.Requirement.parse(str(req)) + req.marker = None + return req From 53b2eb605de63b1c7589696ad55780b6ae0b7dcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 09:51:09 -0500 Subject: [PATCH 7622/8469] Publish release notes to tidelift following release. --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index 21ec6cde98..6d3b9a9bc8 100644 --- a/tox.ini +++ b/tox.ini @@ -62,8 +62,10 @@ deps = wheel twine[keyring]>=1.13 path + jaraco.tidelift passenv = TWINE_PASSWORD + TIDELIFT_TOKEN setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = @@ -71,3 +73,4 @@ commands = python -c "import path; path.Path('dist').rmtree_p()" python setup.py release python -m twine upload dist/* + python -m jaraco.tidelift.publish-release-notes From 6fa879b961c6623750a8a25325eeeda9e68fa541 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 09:52:47 -0500 Subject: [PATCH 7623/8469] =?UTF-8?q?Bump=20version:=2042.0.1=20=E2=86=92?= =?UTF-8?q?=2042.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1921.change.txt | 1 - changelog.d/1922.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1921.change.txt delete mode 100644 changelog.d/1922.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e37acce5f9..8a9f4435a0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 42.0.1 +current_version = 42.0.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index da657c2801..81abbe5976 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v42.0.2 +------- + +* #1921: Fix support for easy_install's ``find-links`` option in ``setup.cfg``. +* #1922: Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. + + v42.0.1 ------- diff --git a/changelog.d/1921.change.txt b/changelog.d/1921.change.txt deleted file mode 100644 index 7c001eb8ef..0000000000 --- a/changelog.d/1921.change.txt +++ /dev/null @@ -1 +0,0 @@ -Fix support for easy_install's ``find-links`` option in ``setup.cfg``. diff --git a/changelog.d/1922.change.rst b/changelog.d/1922.change.rst deleted file mode 100644 index 837ef9c9e8..0000000000 --- a/changelog.d/1922.change.rst +++ /dev/null @@ -1 +0,0 @@ -Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. diff --git a/setup.cfg b/setup.cfg index b8e542798a..68b49d734a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 42.0.1 +version = 42.0.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 1d03fdc94c3676a5b675ec7d818d48c6a772fb49 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 1 Dec 2019 10:04:20 -0500 Subject: [PATCH 7624/8469] Ensure tox is present for cutting release. Ref #1925. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bcff8ad960..b3a6556d66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,6 @@ jobs: - <<: *latest_py3 stage: deploy if: tag IS present - install: skip script: tox -e release after_success: skip From 0fc2a2acd6cc64b37b67e5f42e4d15d8e734c01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Thu, 12 Dec 2019 13:55:07 +0100 Subject: [PATCH 7625/8469] Update setuptools.txt --- docs/setuptools.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index c109e673df..03b57cf3e7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -62,7 +62,7 @@ Installing ``setuptools`` To install the latest version of setuptools, use:: - pip install -U setuptools + pip install --upgrade setuptools Refer to `Installing Packages`_ guide for more information. @@ -1199,7 +1199,7 @@ command; see the section on the `develop`_ command below for more details. Note that you can also apply setuptools commands to non-setuptools projects, using commands like this:: - python -c "import setuptools; execfile('setup.py')" develop + python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop That is, you can simply list the normal setup commands and options following the quoted part. @@ -1215,7 +1215,7 @@ Detailed instructions to distribute a setuptools project can be found at Before you begin, make sure you have the latest versions of setuptools and wheel:: - python3 -m pip install --user --upgrade setuptools wheel + pip install --upgrade setuptools wheel To build a setuptools project, run this command from the same directory where setup.py is located:: @@ -1229,15 +1229,15 @@ https://test.pypi.org/account/register/. You will also need to verify your email to be able to upload any packages. You should install twine to be able to upload packages:: - python3 -m pip install --user --upgrade setuptools wheel + pip install --upgrade twine Now, to upload these archives, run:: - twine upload --repository-url https://test.pypi.org/legacy/ dist/* + twine upload --repository-url https://test.pypi.org/simple/ dist/* To install your newly uploaded package ``example_pkg``, you can use pip:: - python3 -m pip install --index-url https://test.pypi.org/simple/ example_pkg + pip install --index-url https://test.pypi.org/simple/ example_pkg If you have issues at any point, please refer to `Packaging project tutorials`_ for clarification. From 2bf131d79252ce71e82c64ffbfdf1126d9602e90 Mon Sep 17 00:00:00 2001 From: Michael Felt Date: Sun, 15 Dec 2019 15:17:53 +0100 Subject: [PATCH 7626/8469] bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303) Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425 binary distribution identification. Any backports to earlier Python versions will be handled via setuptools. Patch by Michael Felt. --- util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.py b/util.py index 17a94bc428..4b002ecef1 100644 --- a/util.py +++ b/util.py @@ -79,7 +79,8 @@ def get_host_platform(): machine += ".%s" % bitness[sys.maxsize] # fall through to standard osname-release-machine representation elif osname[:3] == "aix": - return "%s-%s.%s" % (osname, version, release) + from _aix_support import aix_platform + return aix_platform() elif osname[:6] == "cygwin": osname = "cygwin" rel_re = re.compile (r'[\d.]+', re.ASCII) From 72993bc1839f6f2ee3e04539a85410d837d3bf98 Mon Sep 17 00:00:00 2001 From: Johannes Reiff Date: Thu, 19 Dec 2019 14:06:22 +0100 Subject: [PATCH 7627/8469] Make easy_install command less strict (fixes #1405) --- setuptools/command/easy_install.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 09066f8c86..e979d2aa88 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -156,19 +156,16 @@ class easy_install(Command): "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), ('no-find-links', None, - "Don't load find-links defined in packages being installed") + "Don't load find-links defined in packages being installed"), + ('user', None, "install in user site-package '%s'" % site.USER_SITE) ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', 'editable', - 'no-deps', 'local-snapshots-ok', 'version' + 'no-deps', 'local-snapshots-ok', 'version', + 'user' ] - if site.ENABLE_USER_SITE: - help_msg = "install in user site-package '%s'" % site.USER_SITE - user_options.append(('user', None, help_msg)) - boolean_options.append('user') - negative_opt = {'always-unzip': 'zip-ok'} create_index = PackageIndex @@ -272,6 +269,9 @@ def finalize_options(self): self.config_vars['userbase'] = self.install_userbase self.config_vars['usersite'] = self.install_usersite + elif self.user: + log.warn("WARNING: The user site-packages directory is disabled.") + self._fix_install_dir_for_user_site() self.expand_basedirs() @@ -478,8 +478,9 @@ def check_site_dir(self): self.cant_write_to_target() if not is_site_dir and not self.multi_version: - # Can't install non-multi to non-site dir - raise DistutilsError(self.no_default_version_msg()) + # Can't install non-multi to non-site dir with easy_install + pythonpath = os.environ.get('PYTHONPATH', '') + log.warn(self.__no_default_msg, self.install_dir, pythonpath) if is_site_dir: if self.pth_file is None: @@ -1309,10 +1310,6 @@ def byte_compile(self, to_compile): Please make the appropriate changes for your system and try again.""").lstrip() - def no_default_version_msg(self): - template = self.__no_default_msg - return template % (self.install_dir, os.environ.get('PYTHONPATH', '')) - def install_site_py(self): """Make sure there's a site.py in the target dir, if needed""" @@ -2344,4 +2341,3 @@ def gen_usage(script_name): class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning.""" - From ec270f9e13fcc32a2a861273219ebfeba17838df Mon Sep 17 00:00:00 2001 From: Johannes Reiff Date: Thu, 19 Dec 2019 14:42:00 +0100 Subject: [PATCH 7628/8469] Add changelog entry for PR #1941 --- changelog.d/1941.change.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog.d/1941.change.rst diff --git a/changelog.d/1941.change.rst b/changelog.d/1941.change.rst new file mode 100644 index 0000000000..a41cdcfe6e --- /dev/null +++ b/changelog.d/1941.change.rst @@ -0,0 +1,4 @@ +Improve editable installs with PEP 518 build isolation: + +* The ``--user`` option is now always available. A warning is issued if the user site directory is not available. +* The error shown when the install directory is not in ``PYTHONPATH`` has been turned into a warning. From 3910bbb8d57a8f811ce863e9e1d09ae631cfe353 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Dec 2019 22:04:09 -0500 Subject: [PATCH 7629/8469] Extract methods to separate _safe_data_files behavior and _add_data_files. --- setuptools/command/sdist.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 55ecdd978a..eebdfd1975 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -126,14 +126,27 @@ def _add_defaults_python(self): if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') self.filelist.extend(build_py.get_source_files()) - # This functionality is incompatible with include_package_data, and - # will in fact create an infinite recursion if include_package_data - # is True. Use of include_package_data will imply that - # distutils-style automatic handling of package_data is disabled - if not self.distribution.include_package_data: - for _, src_dir, _, filenames in build_py.data_files: - self.filelist.extend([os.path.join(src_dir, filename) - for filename in filenames]) + self._add_data_files(self._safe_data_files(build_py)) + + def _safe_data_files(self, build_py): + """ + Extracting data_files from build_py is known to cause + infinite recursion errors when `include_package_data` + is enabled, so suppress it in that case. + """ + if self.distribution.include_package_data: + return () + return build_py.data_files + + def _add_data_files(self, data_files): + """ + Add data files as found in build_py.data_files. + """ + self.filelist.extend( + os.path.join(src_dir, name) + for _, src_dir, _, filenames in data_files + for name in filenames + ) def _add_defaults_data_files(self): try: From c4419ed0099645ef3c27a617f93e9a6182962693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Gmach?= Date: Mon, 23 Dec 2019 15:53:18 +0100 Subject: [PATCH 7630/8469] bpo-38914 Do not require email field in setup.py. (GH-17388) When checking `setup.py` and when the `author` field was provided, but the `author_email` field was missing, erroneously a warning message was displayed that the `author_email` field is required. The specs do not require the `author_email`field: https://packaging.python.org/specifications/core-metadata/#author The same is valid for `maintainer` and `maintainer_email`. The warning message has been adjusted. modified: Doc/distutils/examples.rst modified: Lib/distutils/command/check.py https://bugs.python.org/issue38914 --- command/check.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/command/check.py b/command/check.py index 04c2f9642d..7ceabd3adf 100644 --- a/command/check.py +++ b/command/check.py @@ -80,8 +80,11 @@ def run(self): def check_metadata(self): """Ensures that all required elements of meta-data are supplied. - name, version, URL, (author and author_email) or - (maintainer and maintainer_email)). + Required fields: + name, version, URL + + Recommended fields: + (author and author_email) or (maintainer and maintainer_email)) Warns if any are missing. """ @@ -97,15 +100,15 @@ def check_metadata(self): if metadata.author: if not metadata.author_email: self.warn("missing meta-data: if 'author' supplied, " + - "'author_email' must be supplied too") + "'author_email' should be supplied too") elif metadata.maintainer: if not metadata.maintainer_email: self.warn("missing meta-data: if 'maintainer' supplied, " + - "'maintainer_email' must be supplied too") + "'maintainer_email' should be supplied too") else: self.warn("missing meta-data: either (author and author_email) " + "or (maintainer and maintainer_email) " + - "must be supplied") + "should be supplied") def check_restructuredtext(self): """Checks if the long string fields are reST-compliant.""" From dea5858f1ecf042a17e94a3e26a10bbc78fd2f35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2019 11:59:05 -0500 Subject: [PATCH 7631/8469] Add backend-path for future Pips Co-Authored-By: Paul Ganssle --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5a2d7d3b67..f0fd8521ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [build-system] requires = ["setuptools >= 40.8", "wheel"] build-backend = "setuptools.build_meta" +backend-path = ["."] [tool.towncrier] package = "setuptools" From 8495fb9c59cc9af3a770b7b5ea5f950790e782ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2019 12:21:15 -0500 Subject: [PATCH 7632/8469] Add changelog entry. Ref #1927. --- changelog.d/1927.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1927.change.rst diff --git a/changelog.d/1927.change.rst b/changelog.d/1927.change.rst new file mode 100644 index 0000000000..3b293d6343 --- /dev/null +++ b/changelog.d/1927.change.rst @@ -0,0 +1 @@ +Setuptools once again declares 'setuptools' in the ``build-system.requires`` and adds PEP 517 build support by declaring itself as the ``build-backend``. It additionally specifies ``build-system.backend-path`` to rely on itself for those builders that support it. From 8a7a6272942c84a0cf59169b84f7434ea4dc4bfe Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 27 Dec 2019 16:12:40 +0800 Subject: [PATCH 7633/8469] Add test ensuring pyproject.toml is included during PEP 517 build. --- setuptools/tests/test_build_meta.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index e1efe5617c..326b4f5dbd 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -262,6 +262,27 @@ def test_build_sdist_version_change(self, build_backend): assert os.path.isfile( os.path.join(os.path.abspath("out_sdist"), sdist_name)) + def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd): + files = { + 'setup.py': DALS(""" + __import__('setuptools').setup( + name='foo', + version='0.0.0', + py_modules=['hello'] + )"""), + 'hello.py': '', + 'pyproject.toml': DALS(""" + [build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta + """), + } + build_files(files) + build_backend = self.get_build_backend() + targz_path = build_backend.build_sdist("temp") + with tarfile.open(os.path.join("temp", targz_path)) as tar: + assert any('pyproject.toml' in name for name in tar.getnames()) + def test_build_sdist_setup_py_exists(self, tmpdir_cwd): # If build_sdist is called from a script other than setup.py, # ensure setup.py is included From 589a70571a890b8113c75916325230b0b832f8c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 29 Dec 2019 12:57:51 -0500 Subject: [PATCH 7634/8469] Mark the change as a breaking change. --- changelog.d/1634.breaking.rst | 1 + changelog.d/1634.change.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 changelog.d/1634.breaking.rst delete mode 100644 changelog.d/1634.change.rst diff --git a/changelog.d/1634.breaking.rst b/changelog.d/1634.breaking.rst new file mode 100644 index 0000000000..b65e5d9f40 --- /dev/null +++ b/changelog.d/1634.breaking.rst @@ -0,0 +1 @@ +Include ``pyproject.toml`` in source distribution by default. Projects relying on the previous behavior where ``pyproject.toml`` was excluded by default should stop relying on that behavior or add ``exclude pyproject.toml`` to their MANIFEST.in file. diff --git a/changelog.d/1634.change.rst b/changelog.d/1634.change.rst deleted file mode 100644 index 27d0a64afe..0000000000 --- a/changelog.d/1634.change.rst +++ /dev/null @@ -1 +0,0 @@ -Include ``pyproject.toml`` in source distribution by default. From f171cde1505fc5df438417dc5ae48d35fa60a002 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 12:47:46 -0500 Subject: [PATCH 7635/8469] Add test for exclusion expectation. Ref #1650. --- setuptools/tests/test_sdist.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 06813a003b..a413e4ede2 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -463,6 +463,22 @@ def test_pyproject_toml_in_sdist(self): manifest = cmd.filelist.files assert 'pyproject.toml' in manifest + def test_pyproject_toml_excluded(self): + """ + Check that pyproject.toml can excluded even if present + """ + open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close() + with open('MANIFEST.in', 'w') as mts: + print('exclude pyproject.toml', file=mts) + dist = Distribution(SETUP_ATTRS) + dist.script_name = 'setup.py' + cmd = sdist(dist) + cmd.ensure_finalized() + with quiet(): + cmd.run() + manifest = cmd.filelist.files + assert 'pyproject.toml' not in manifest + def test_default_revctrl(): """ From 2eb3ba19f3153f83eb8b2470deb8ec02d21fca52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 12:50:25 -0500 Subject: [PATCH 7636/8469] Restore Python 2.7 compatibility --- setuptools/tests/test_sdist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index a413e4ede2..b27c4a8336 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- """sdist tests""" +from __future__ import print_function + import os import shutil import sys From 47aab6525101bda3e2c7af1588b7abf5f6608b65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 13:14:50 -0500 Subject: [PATCH 7637/8469] =?UTF-8?q?Bump=20version:=2042.0.2=20=E2=86=92?= =?UTF-8?q?=2043.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1634.breaking.rst | 1 - changelog.d/1927.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1634.breaking.rst delete mode 100644 changelog.d/1927.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8a9f4435a0..25093b873f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 42.0.2 +current_version = 43.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 81abbe5976..817f816820 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v43.0.0 +------- + +* #1634: Include ``pyproject.toml`` in source distribution by default. Projects relying on the previous behavior where ``pyproject.toml`` was excluded by default should stop relying on that behavior or add ``exclude pyproject.toml`` to their MANIFEST.in file. +* #1927: Setuptools once again declares 'setuptools' in the ``build-system.requires`` and adds PEP 517 build support by declaring itself as the ``build-backend``. It additionally specifies ``build-system.backend-path`` to rely on itself for those builders that support it. + + v42.0.2 ------- diff --git a/changelog.d/1634.breaking.rst b/changelog.d/1634.breaking.rst deleted file mode 100644 index b65e5d9f40..0000000000 --- a/changelog.d/1634.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Include ``pyproject.toml`` in source distribution by default. Projects relying on the previous behavior where ``pyproject.toml`` was excluded by default should stop relying on that behavior or add ``exclude pyproject.toml`` to their MANIFEST.in file. diff --git a/changelog.d/1927.change.rst b/changelog.d/1927.change.rst deleted file mode 100644 index 3b293d6343..0000000000 --- a/changelog.d/1927.change.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools once again declares 'setuptools' in the ``build-system.requires`` and adds PEP 517 build support by declaring itself as the ``build-backend``. It additionally specifies ``build-system.backend-path`` to rely on itself for those builders that support it. diff --git a/setup.cfg b/setup.cfg index 68b49d734a..a9a9b504a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 42.0.2 +version = 43.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 9c40ab8861d1bbc18d1c8032f678e2ca15ada7ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 13:29:43 -0500 Subject: [PATCH 7638/8469] Rewrite TestSdistTest setup/teardown_method as pytest fixture. --- setuptools/tests/test_sdist.py | 35 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index b27c4a8336..f2e9a5ec37 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -91,30 +91,29 @@ def latin1_fail(): ) +def touch(path): + path.write_text('', encoding='utf-8') + + class TestSdistTest: - def setup_method(self, method): - self.temp_dir = tempfile.mkdtemp() - with open(os.path.join(self.temp_dir, 'setup.py'), 'w') as f: - f.write(SETUP_PY) + @pytest.fixture(autouse=True) + def source_dir(self, tmpdir): + self.temp_dir = str(tmpdir) + (tmpdir / 'setup.py').write_text(SETUP_PY, encoding='utf-8') # Set up the rest of the test package - test_pkg = os.path.join(self.temp_dir, 'sdist_test') - os.mkdir(test_pkg) - data_folder = os.path.join(self.temp_dir, "d") - os.mkdir(data_folder) + test_pkg = tmpdir / 'sdist_test' + test_pkg.mkdir() + data_folder = tmpdir / 'd' + data_folder.mkdir() # *.rst was not included in package_data, so c.rst should not be # automatically added to the manifest when not under version control - for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst', - os.path.join(data_folder, "e.dat")]: - # Just touch the files; their contents are irrelevant - open(os.path.join(test_pkg, fname), 'w').close() - - self.old_cwd = os.getcwd() - os.chdir(self.temp_dir) + for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: + touch(test_pkg / fname) + touch(data_folder / 'e.dat') - def teardown_method(self, method): - os.chdir(self.old_cwd) - shutil.rmtree(self.temp_dir) + with tmpdir.as_cwd(): + yield def test_package_data_in_sdist(self): """Regression test for pull request #4: ensures that files listed in From 9e3149802ee214ee0500ec299250bf4febc67e52 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 13:31:37 -0500 Subject: [PATCH 7639/8469] Remove instance attribute; rely on tmpdir fixture; re-use touch helper. --- setuptools/tests/test_sdist.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f2e9a5ec37..1b951a5be5 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -98,7 +98,6 @@ def touch(path): class TestSdistTest: @pytest.fixture(autouse=True) def source_dir(self, tmpdir): - self.temp_dir = str(tmpdir) (tmpdir / 'setup.py').write_text(SETUP_PY, encoding='utf-8') # Set up the rest of the test package @@ -176,14 +175,14 @@ def test_setup_py_excluded(self): manifest = cmd.filelist.files assert 'setup.py' not in manifest - def test_defaults_case_sensitivity(self): + def test_defaults_case_sensitivity(self, tmpdir): """ Make sure default files (README.*, etc.) are added in a case-sensitive way to avoid problems with packages built on Windows. """ - open(os.path.join(self.temp_dir, 'readme.rst'), 'w').close() - open(os.path.join(self.temp_dir, 'SETUP.cfg'), 'w').close() + touch(tmpdir / 'readme.rst') + touch(tmpdir / 'SETUP.cfg') dist = Distribution(SETUP_ATTRS) # the extension deliberately capitalized for this test @@ -450,11 +449,11 @@ def test_sdist_with_latin1_encoded_filename(self): except UnicodeDecodeError: filename not in cmd.filelist.files - def test_pyproject_toml_in_sdist(self): + def test_pyproject_toml_in_sdist(self, tmpdir): """ Check if pyproject.toml is included in source distribution if present """ - open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close() + touch(tmpdir / 'pyproject.toml') dist = Distribution(SETUP_ATTRS) dist.script_name = 'setup.py' cmd = sdist(dist) @@ -464,11 +463,11 @@ def test_pyproject_toml_in_sdist(self): manifest = cmd.filelist.files assert 'pyproject.toml' in manifest - def test_pyproject_toml_excluded(self): + def test_pyproject_toml_excluded(self, tmpdir): """ Check that pyproject.toml can excluded even if present """ - open(os.path.join(self.temp_dir, 'pyproject.toml'), 'w').close() + touch(tmpdir / 'pyproject.toml') with open('MANIFEST.in', 'w') as mts: print('exclude pyproject.toml', file=mts) dist = Distribution(SETUP_ATTRS) From a87f975e65507382aaecfb01fe8df4608c38f466 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 31 Dec 2019 13:32:57 -0500 Subject: [PATCH 7640/8469] Remove unused import --- setuptools/tests/test_sdist.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 1b951a5be5..dcc64cf253 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -4,7 +4,6 @@ from __future__ import print_function import os -import shutil import sys import tempfile import unicodedata From 90922a5eb9b2f002202a16c974b86750a46d21ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jan 2020 11:54:53 -0500 Subject: [PATCH 7641/8469] Restore Python 2.7 compatibility --- setuptools/tests/test_sdist.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index dcc64cf253..9ddbae8b72 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """sdist tests""" -from __future__ import print_function +from __future__ import print_function, unicode_literals import os import sys @@ -229,10 +229,6 @@ def test_manifest_is_written_with_utf8_encoding(self): u_contents = contents.decode('UTF-8') # The manifest should contain the UTF-8 filename - if six.PY2: - fs_enc = sys.getfilesystemencoding() - filename = filename.decode(fs_enc) - assert posix(filename) in u_contents @py3_only From 3d5b7775b7b7ee6c0b354a04fe1d33c1f9b0e5df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jan 2020 12:08:46 -0500 Subject: [PATCH 7642/8469] Fix latin1 and utf8 tests on Python 2 --- setuptools/tests/test_sdist.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 9ddbae8b72..8538dd246a 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -369,7 +369,7 @@ def test_read_manifest_skips_non_utf8_filenames(self): @fail_on_latin1_encoded_filenames def test_sdist_with_utf8_encoded_filename(self): # Test for #303. - dist = Distribution(SETUP_ATTRS) + dist = Distribution(self.make_strings(SETUP_ATTRS)) dist.script_name = 'setup.py' cmd = sdist(dist) cmd.ensure_finalized() @@ -400,10 +400,19 @@ def test_sdist_with_utf8_encoded_filename(self): else: assert filename in cmd.filelist.files + @classmethod + def make_strings(cls, item): + if isinstance(item, dict): + return { + key: cls.make_strings(value) for key, value in item.items()} + if isinstance(item, list): + return list(map(cls.make_strings, item)) + return str(item) + @fail_on_latin1_encoded_filenames def test_sdist_with_latin1_encoded_filename(self): # Test for #303. - dist = Distribution(SETUP_ATTRS) + dist = Distribution(self.make_strings(SETUP_ATTRS)) dist.script_name = 'setup.py' cmd = sdist(dist) cmd.ensure_finalized() From 7e97def47723303fafabe48b22168bbc11bb4821 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jan 2020 18:33:05 -0500 Subject: [PATCH 7643/8469] =?UTF-8?q?Bump=20version:=2043.0.0=20=E2=86=92?= =?UTF-8?q?=2044.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1908.breaking.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1908.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 25093b873f..e1bfa89859 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 43.0.0 +current_version = 44.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 817f816820..109a3f480f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v44.0.0 +------- + +* #1908: Drop support for Python 3.4. + + v43.0.0 ------- diff --git a/changelog.d/1908.breaking.rst b/changelog.d/1908.breaking.rst deleted file mode 100644 index 3fbb9fe70c..0000000000 --- a/changelog.d/1908.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Drop support for Python 3.4. diff --git a/setup.cfg b/setup.cfg index ed0840846f..ecef86098a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 43.0.0 +version = 44.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 98b7bab4d235e982526794bcec90827ac300f5bc Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 2 Jan 2020 01:02:21 +0100 Subject: [PATCH 7644/8469] Update setuptools.txt --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 03b57cf3e7..7741ec07dd 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1000,11 +1000,11 @@ and Python Eggs. It is strongly recommended that, if you are using data files, you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access them. The ``pkg_resources`` module is distributed as part of setuptools, so if you're using setuptools to distribute your package, there is no reason not to -use its resource management API. See also `Accessing Package Resources`_ for +use its resource management API. See also `Importlib Resources`_ for a quick example of converting code that uses ``__file__`` to use ``pkg_resources`` instead. -.. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources +.. _Importlib Resources: https://docs.python.org/3/library/importlib.html#module-importlib.resources Non-Package Data Files From a46a6bfd903ecc292fc3645c37c1b72781528095 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Jan 2020 10:53:17 -0500 Subject: [PATCH 7645/8469] Require Python 3.5 or later, dropping support for Python 2. This change does not yet remove any of the compatibility for Python 2, but only aims to declare the dropped support. --- .travis.yml | 8 +------- appveyor.yml | 4 ++-- changelog.d/1458.breaking.rst | 1 + setup.cfg | 4 +--- 4 files changed, 5 insertions(+), 12 deletions(-) create mode 100644 changelog.d/1458.breaking.rst diff --git a/.travis.yml b/.travis.yml index 501a0b69ce..d18b86c0e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,8 @@ language: python jobs: fast_finish: true include: - - &latest_py2 - python: 2.7 - - <<: *latest_py2 - env: LANG=C - - python: pypy - env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: pypy3 - env: DISABLE_COVERAGE=1 + env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 - python: 3.6 - python: 3.7 diff --git a/appveyor.yml b/appveyor.yml index 0881806968..fc65a9a70d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,8 +9,8 @@ environment: matrix: - APPVEYOR_JOB_NAME: "python36-x64" PYTHON: "C:\\Python36-x64" - - APPVEYOR_JOB_NAME: "python27-x64" - PYTHON: "C:\\Python27-x64" + - APPVEYOR_JOB_NAME: "python37-x64" + PYTHON: "C:\\Python37-x64" install: # symlink python from a directory with a space diff --git a/changelog.d/1458.breaking.rst b/changelog.d/1458.breaking.rst new file mode 100644 index 0000000000..3004722cd0 --- /dev/null +++ b/changelog.d/1458.breaking.rst @@ -0,0 +1 @@ +Drop support for Python 2. Setuptools now requires Python 3.5 or later. Install setuptools using pip >=9 or pin to Setuptools <45 to maintain 2.7 support. diff --git a/setup.cfg b/setup.cfg index ecef86098a..1e23051fdb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,8 +35,6 @@ classifiers = 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.5 Programming Language :: Python :: 3.6 @@ -49,7 +47,7 @@ classifiers = [options] zip_safe = True -python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* +python_requires = >=3.5 py_modules = easy_install packages = find: From 79f1694b05a66cc0fbbbf4e72d63d0a340cf6d84 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jan 2020 06:30:03 -0500 Subject: [PATCH 7646/8469] Add obnoxious warning about Python 2 being unsupported on this release with guidance on how to avoid the warning and what to do if that guidance was ineffective. --- pkg_resources/__init__.py | 1 + pkg_resources/py2_warn.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pkg_resources/py2_warn.py diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2f5aa64a6e..3fa883ceb4 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -83,6 +83,7 @@ __import__('pkg_resources.extern.packaging.specifiers') __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') +__import__('pkg_resources.py2_warn') __metaclass__ = type diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py new file mode 100644 index 0000000000..1f29851c35 --- /dev/null +++ b/pkg_resources/py2_warn.py @@ -0,0 +1,19 @@ +import sys +import warnings +import textwrap + + +msg = textwrap.dedent(""" + You are running Setuptools on Python 2, which is no longer + supported and + >>> SETUPTOOLS WILL STOP WORKING <<< + in a subsequent release. Please ensure you are installing + Setuptools using pip 9.x or later or pin to `setuptools<45` + in your environment. + If you have done those things and are still encountering + this message, please comment in + https://github.com/pypa/setuptools/issues/1458 + about the steps that led to this unsupported combination. + """) + +sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60) From 073ad9711dc9f750b974fa7a76c832603af2efa6 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Mon, 6 Jan 2020 11:14:03 -0600 Subject: [PATCH 7647/8469] Fix TestPyPI upload URI --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 03b57cf3e7..11faf0418c 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1233,7 +1233,7 @@ You should install twine to be able to upload packages:: Now, to upload these archives, run:: - twine upload --repository-url https://test.pypi.org/simple/ dist/* + twine upload --repository-url https://test.pypi.org/legacy/ dist/* To install your newly uploaded package ``example_pkg``, you can use pip:: From 796abd8dbec884cedf326cb5f85512a5d5648c4e Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 8 Jan 2020 19:10:11 +0200 Subject: [PATCH 7648/8469] Fix for Python 4: replace unsafe six.PY3 with PY2 --- setuptools/command/build_ext.py | 2 +- setuptools/command/develop.py | 2 +- setuptools/command/easy_install.py | 2 +- setuptools/command/egg_info.py | 2 +- setuptools/command/sdist.py | 2 +- setuptools/command/test.py | 4 ++-- setuptools/command/upload_docs.py | 4 ++-- setuptools/dist.py | 6 +++--- setuptools/tests/test_develop.py | 4 ++-- setuptools/tests/test_sdist.py | 32 +++++++++++++++--------------- setuptools/tests/test_setopt.py | 2 +- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index daa8e4fe81..1b51e040b4 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -113,7 +113,7 @@ def get_ext_filename(self, fullname): if fullname in self.ext_map: ext = self.ext_map[fullname] use_abi3 = ( - six.PY3 + not six.PY2 and getattr(ext, 'py_limited_api') and get_abi3_suffix() ) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 009e4f9368..b561924609 100644 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -108,7 +108,7 @@ def _resolve_setup_path(egg_base, install_dir, egg_path): return path_to_setup def install_for_development(self): - if six.PY3 and getattr(self.distribution, 'use_2to3', False): + if not six.PY2 and getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 09066f8c86..426301d6f3 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1567,7 +1567,7 @@ def get_exe_prefixes(exe_filename): continue if parts[0].upper() in ('PURELIB', 'PLATLIB'): contents = z.read(name) - if six.PY3: + if not six.PY2: contents = contents.decode() for pth in yield_lines(contents): pth = pth.strip().replace('\\', '/') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5d8f451ee4..a5c5a2fc19 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -266,7 +266,7 @@ def write_file(self, what, filename, data): to the file. """ log.info("writing %s to %s", what, filename) - if six.PY3: + if not six.PY2: data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a851453f9a..8c3438eaa6 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -207,7 +207,7 @@ def read_manifest(self): manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. - if six.PY3: + if not six.PY2: try: line = line.decode('UTF-8') except UnicodeDecodeError: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index c148b38d10..f6470e9c34 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -129,7 +129,7 @@ def with_project_on_sys_path(self, func): @contextlib.contextmanager def project_on_sys_path(self, include_dists=[]): - with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False) + with_2to3 = not six.PY2 and getattr(self.distribution, 'use_2to3', False) if with_2to3: # If we run 2to3 we can not do this inplace: @@ -240,7 +240,7 @@ def run_tests(self): # Purge modules under test from sys.modules. The test loader will # re-import them from the build location. Required when 2to3 is used # with namespace packages. - if six.PY3 and getattr(self.distribution, 'use_2to3', False): + if not six.PY2 and getattr(self.distribution, 'use_2to3', False): module = self.test_suite.split('.')[0] if module in _namespace_packages: del_modules = [] diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 07aa564af4..130a0cb6c9 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -24,7 +24,7 @@ def _encode(s): - errors = 'surrogateescape' if six.PY3 else 'strict' + errors = 'strict' if six.PY2 else 'surrogateescape' return s.encode('utf-8', errors) @@ -153,7 +153,7 @@ def upload_file(self, filename): # set up the authentication credentials = _encode(self.username + ':' + self.password) credentials = standard_b64encode(credentials) - if six.PY3: + if not six.PY2: credentials = credentials.decode('ascii') auth = "Basic " + credentials diff --git a/setuptools/dist.py b/setuptools/dist.py index 1ba262ec8b..fe5adf4607 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -571,7 +571,7 @@ def _parse_config_files(self, filenames=None): from setuptools.extern.six.moves.configparser import ConfigParser # Ignore install directory options if we have a venv - if six.PY3 and sys.prefix != sys.base_prefix: + if not six.PY2 and sys.prefix != sys.base_prefix: ignore_options = [ 'install-base', 'install-platbase', 'install-lib', 'install-platlib', 'install-purelib', 'install-headers', @@ -593,7 +593,7 @@ def _parse_config_files(self, filenames=None): with io.open(filename, encoding='utf-8') as reader: if DEBUG: self.announce(" reading {filename}".format(**locals())) - (parser.read_file if six.PY3 else parser.readfp)(reader) + (parser.readfp if six.PY2 else parser.read_file)(reader) for section in parser.sections(): options = parser.options(section) opt_dict = self.get_option_dict(section) @@ -636,7 +636,7 @@ def _try_str(val): Ref #1653 """ - if six.PY3: + if not six.PY2: return val try: return val.encode() diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 00d4bd9abb..792975fd14 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -95,7 +95,7 @@ def test_2to3_user_mode(self, test_env): with io.open(fn) as init_file: init = init_file.read().strip() - expected = 'print("foo")' if six.PY3 else 'print "foo"' + expected = 'print "foo"' if six.PY2 else 'print("foo")' assert init == expected def test_console_scripts(self, tmpdir): @@ -161,7 +161,7 @@ def install_develop(src_dir, target): reason="https://github.com/pypa/setuptools/issues/851", ) @pytest.mark.skipif( - platform.python_implementation() == 'PyPy' and six.PY3, + platform.python_implementation() == 'PyPy' and not six.PY2, reason="https://github.com/pypa/setuptools/issues/1202", ) def test_namespace_package_importable(self, tmpdir): diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 8538dd246a..0bea53dfd7 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -51,7 +51,7 @@ def quiet(): # Convert to POSIX path def posix(path): - if six.PY3 and not isinstance(path, str): + if not six.PY2 and not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b'/') else: return path.replace(os.sep, '/') @@ -329,7 +329,7 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.read_manifest() # The filelist should contain the UTF-8 filename - if six.PY3: + if not six.PY2: filename = filename.decode('utf-8') assert filename in cmd.filelist.files @@ -383,7 +383,7 @@ def test_sdist_with_utf8_encoded_filename(self): if sys.platform == 'darwin': filename = decompose(filename) - if six.PY3: + if not six.PY2: fs_enc = sys.getfilesystemencoding() if sys.platform == 'win32': @@ -425,7 +425,19 @@ def test_sdist_with_latin1_encoded_filename(self): with quiet(): cmd.run() - if six.PY3: + if six.PY2: + # Under Python 2 there seems to be no decoded string in the + # filelist. However, due to decode and encoding of the + # file name to get utf-8 Manifest the latin1 maybe excluded + try: + # fs_enc should match how one is expect the decoding to + # be proformed for the manifest output. + fs_enc = sys.getfilesystemencoding() + filename.decode(fs_enc) + assert filename in cmd.filelist.files + except UnicodeDecodeError: + filename not in cmd.filelist.files + else: # not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': # Latin-1 is similar to Windows-1252 however @@ -440,18 +452,6 @@ def test_sdist_with_latin1_encoded_filename(self): # The Latin-1 filename should have been skipped filename = filename.decode('latin-1') filename not in cmd.filelist.files - else: - # Under Python 2 there seems to be no decoded string in the - # filelist. However, due to decode and encoding of the - # file name to get utf-8 Manifest the latin1 maybe excluded - try: - # fs_enc should match how one is expect the decoding to - # be proformed for the manifest output. - fs_enc = sys.getfilesystemencoding() - filename.decode(fs_enc) - assert filename in cmd.filelist.files - except UnicodeDecodeError: - filename not in cmd.filelist.files def test_pyproject_toml_in_sdist(self, tmpdir): """ diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py index 3fb04fb455..1b0389545a 100644 --- a/setuptools/tests/test_setopt.py +++ b/setuptools/tests/test_setopt.py @@ -15,7 +15,7 @@ class TestEdit: def parse_config(filename): parser = configparser.ConfigParser() with io.open(filename, encoding='utf-8') as reader: - (parser.read_file if six.PY3 else parser.readfp)(reader) + (parser.readfp if six.PY2 else parser.read_file)(reader) return parser @staticmethod From b84a0997af9b5ba757d39b0631545f53d03bc741 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 8 Jan 2020 19:21:05 +0200 Subject: [PATCH 7649/8469] Add changelog --- changelog.d/1959.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1959.change.rst diff --git a/changelog.d/1959.change.rst b/changelog.d/1959.change.rst new file mode 100644 index 0000000000..c0cc8975e3 --- /dev/null +++ b/changelog.d/1959.change.rst @@ -0,0 +1 @@ +Fix for Python 4: replace unsafe six.PY3 with six.PY2 From 34d87688eae5d10970f3c8269ac01bcca4ad0229 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Jan 2020 17:23:00 -0500 Subject: [PATCH 7650/8469] Include token passthrough for azure pipelines publish stage. --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..01bfa5f56f --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,2 @@ + env: + TIDELIFT_TOKEN: $(Tidelift-token) From c30a9652fb3bcf941ba17ccda3f577e0c4d99d07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Jan 2020 23:35:41 -0500 Subject: [PATCH 7651/8469] =?UTF-8?q?Bump=20version:=2044.0.0=20=E2=86=92?= =?UTF-8?q?=2045.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1458.breaking.rst | 1 - changelog.d/1959.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1458.breaking.rst delete mode 100644 changelog.d/1959.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e1bfa89859..7714390795 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 44.0.0 +current_version = 45.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 109a3f480f..4a81e995c0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v45.0.0 +------- + +* #1458: Drop support for Python 2. Setuptools now requires Python 3.5 or later. Install setuptools using pip >=9 or pin to Setuptools <45 to maintain 2.7 support. +* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 + + v44.0.0 ------- diff --git a/changelog.d/1458.breaking.rst b/changelog.d/1458.breaking.rst deleted file mode 100644 index 3004722cd0..0000000000 --- a/changelog.d/1458.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Drop support for Python 2. Setuptools now requires Python 3.5 or later. Install setuptools using pip >=9 or pin to Setuptools <45 to maintain 2.7 support. diff --git a/changelog.d/1959.change.rst b/changelog.d/1959.change.rst deleted file mode 100644 index c0cc8975e3..0000000000 --- a/changelog.d/1959.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix for Python 4: replace unsafe six.PY3 with six.PY2 diff --git a/setup.cfg b/setup.cfg index 1e23051fdb..18c9e1df02 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 44.0.0 +version = 45.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 6cb025eadfbc6bf017ba2bfd80c192ac377be9fb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jan 2020 11:23:43 -0500 Subject: [PATCH 7652/8469] Rely on tox-pip-version to upgrade pip and minimize the hack for removing setuptools from the environment. --- tools/tox_pip.py | 37 +++++++++++++++---------------------- tox.ini | 8 +++++--- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 63518f927e..f592e41285 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -1,31 +1,24 @@ -import os -import shutil import subprocess import sys -from glob import glob -VIRTUAL_ENV = os.environ['VIRTUAL_ENV'] -TOX_PIP_DIR = os.path.join(VIRTUAL_ENV, 'pip') + +def remove_setuptools(): + """ + Remove setuptools from the current environment. + """ + print("Removing setuptools") + cmd = [sys.executable, '-m', 'pip', 'uninstall', '-y', 'setuptools'] + # set cwd to something other than '.' to avoid detecting + # '.' as the installed package. + subprocess.check_call(cmd, cwd='.tox') def pip(args): - # First things first, get a recent (stable) version of pip. - if not os.path.exists(TOX_PIP_DIR): - subprocess.check_call([sys.executable, '-m', 'pip', - '--disable-pip-version-check', - 'install', '-t', TOX_PIP_DIR, - 'pip']) - shutil.rmtree(glob(os.path.join(TOX_PIP_DIR, 'pip-*.dist-info'))[0]) - # And use that version. - pypath = os.environ.get('PYTHONPATH') - pypath = pypath.split(os.pathsep) if pypath is not None else [] - pypath.insert(0, TOX_PIP_DIR) - os.environ['PYTHONPATH'] = os.pathsep.join(pypath) - # Fix call for setuptools editable install. - for n, a in enumerate(args): - if a == '.': - args[n] = os.getcwd() - subprocess.check_call([sys.executable, '-m', 'pip'] + args, cwd=TOX_PIP_DIR) + # When installing '.', remove setuptools + '.' in args and remove_setuptools() + + cmd = [sys.executable, '-m', 'pip'] + args + subprocess.check_call(cmd) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index 6a1af56e8c..a666f0afb7 100644 --- a/tox.ini +++ b/tox.ini @@ -6,15 +6,17 @@ [tox] envlist=python +minversion = 3.2 +requires = + tox-pip-version >= 0.0.6 [helpers] -# Wrapper for calls to pip that make sure the version being used is a -# up-to-date, and to prevent the current working directory from being -# added to `sys.path`. +# Custom pip behavior pip = python {toxinidir}/tools/tox_pip.py [testenv] deps=-r{toxinidir}/tests/requirements.txt +pip_version = pip install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} From 8e6b9933e9981fc9ab19eef3dee93d0f703c4140 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jan 2020 10:13:09 -0500 Subject: [PATCH 7653/8469] Restore testing on Python 2, bypassing the requires-python check when installing setuptools. --- .travis.yml | 4 ++++ tools/tox_pip.py | 5 +++++ tox.ini | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d18b86c0e8..24b2451bea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ language: python jobs: fast_finish: true include: + - &latest_py2 + python: 2.7 + - <<: *latest_py2 + env: LANG=C - python: pypy3 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 diff --git a/tools/tox_pip.py b/tools/tox_pip.py index f592e41285..06655fe439 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -1,3 +1,4 @@ +import os import subprocess import sys @@ -14,6 +15,10 @@ def remove_setuptools(): def pip(args): + # Honor requires-python when installing test suite dependencies + if any('-r' in arg for arg in args): + os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = '0' + # When installing '.', remove setuptools '.' in args and remove_setuptools() diff --git a/tox.ini b/tox.ini index a666f0afb7..d458dc338c 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,9 @@ deps=-r{toxinidir}/tests/requirements.txt pip_version = pip install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all -setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} +setenv = + COVERAGE_FILE={toxworkdir}/.coverage.{envname} + py27: PIP_IGNORE_REQUIRES_PYTHON=true # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED From cb2138e24bc9a91e533c4596c125afa6f3eb5c6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jan 2020 12:38:15 -0500 Subject: [PATCH 7654/8469] Set toxenv for Python 2.7 so that workaround is present. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 24b2451bea..263386c8dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,9 @@ jobs: include: - &latest_py2 python: 2.7 + env: TOXENV=py27 - <<: *latest_py2 - env: LANG=C + env: LANG=C TOXENV=py27 - python: pypy3 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 From e5e5ab2c080d0e9dc99470ec9f2ba21bdf141b80 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 12 Jan 2020 19:23:14 +0100 Subject: [PATCH 7655/8469] Add Python 3.8 to the test matrix Co-Authored-By: Hugo van Kemenade --- .github/workflows/python-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index eb750a45ab..f315e6fe3e 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -14,6 +14,7 @@ jobs: # max-parallel: 5 matrix: python-version: + - 3.8 - 3.7 - 3.6 - 3.5 From 23dce8ba4931084813e90b5837db2c20135082fa Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 12 Jan 2020 19:24:38 +0100 Subject: [PATCH 7656/8469] Upgrade the macOS VMs to use a new supported version This change is necessary because macOS 10.15 is now deprecated. Ref: https://github.blog/changelog/2019-10-31-github-actions-macos-virtual-environment-is-updating-to-catalina-and-dropping-mojave-support Co-Authored-By: Hugo van Kemenade --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index f315e6fe3e..71957abaa8 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -22,7 +22,7 @@ jobs: os: - ubuntu-18.04 - ubuntu-16.04 - - macOS-10.14 + - macOS-latest # - windows-2019 # - windows-2016 env: From 0cd3dfc3abb1c638578bf9b540d930ddad6d19c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Mon, 13 Jan 2020 19:52:25 +0100 Subject: [PATCH 7657/8469] Fix typos --- docs/setuptools.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d214ca9917..a1d927d5f7 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1800,7 +1800,7 @@ to support "daily builds" or "snapshot" releases. It is run automatically by the ``sdist``, ``bdist_egg``, ``develop``, and ``test`` commands in order to update the project's metadata, but you can also specify it explicitly in order to temporarily change the project's version string while executing other -commands. (It also generates the``.egg-info/SOURCES.txt`` manifest file, which +commands. (It also generates the ``.egg-info/SOURCES.txt`` manifest file, which is used when you are building source distributions.) In addition to writing the core egg metadata defined by ``setuptools`` and @@ -1848,7 +1848,7 @@ binary distributions of your project, you should first make sure that you know how the resulting version numbers will be interpreted by automated tools like pip. See the section above on `Specifying Your Project's Version`_ for an explanation of pre- and post-release tags, as well as tips on how to choose and -verify a versioning scheme for your your project.) +verify a versioning scheme for your project.) For advanced uses, there is one other option that can be set, to change the location of the project's ``.egg-info`` directory. Commands that need to find From 18a3cae3513818d355dbc8c05ff93bbcee09a6d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 14 Jan 2020 04:14:13 -0500 Subject: [PATCH 7658/8469] Update Python 2 warning to include a minimum sunset date and add a preamble to make referencing the warning more reliable. Ref #1458. --- changelog.d/1458.change.rst | 1 + pkg_resources/py2_warn.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1458.change.rst diff --git a/changelog.d/1458.change.rst b/changelog.d/1458.change.rst new file mode 100644 index 0000000000..c953127ae0 --- /dev/null +++ b/changelog.d/1458.change.rst @@ -0,0 +1 @@ +Add minimum sunset date and preamble to Python 2 warning. diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py index 1f29851c35..1b15195626 100644 --- a/pkg_resources/py2_warn.py +++ b/pkg_resources/py2_warn.py @@ -7,7 +7,8 @@ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< - in a subsequent release. Please ensure you are installing + in a subsequent release (no sooner than 2020-04-20). + Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering @@ -16,4 +17,6 @@ about the steps that led to this unsupported combination. """) -sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60) +pre = "Setuptools will stop working on Python 2\n" + +sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60) From 5399c8597bcb86a08db4b423f914c474cd125c31 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 7 Apr 2019 23:22:46 +0200 Subject: [PATCH 7659/8469] =?UTF-8?q?=F0=9F=93=9D=20Document=20setup.cfg-o?= =?UTF-8?q?nly=20projects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/requirements.txt | 1 + docs/setuptools.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index bc27165b22..e82df49ccb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,5 @@ sphinx!=1.8.0 +pygments-github-lexers==0.0.5 rst.linker>=1.9 jaraco.packaging>=6.1 diff --git a/docs/setuptools.txt b/docs/setuptools.txt index d214ca9917..3a2028ced5 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2195,6 +2195,48 @@ Metadata and options are set in the config sections of the same name. * Unknown keys are ignored. +setup.cfg-only projects +======================= + +.. versionadded:: 40.9.0 + +If ``setup.py`` is missing from the project directory when a PEP 517 +build is invoked, ``setuptools`` emulates a dummy ``setup.py`` file containing +only a ``setuptools.setup()`` call. + +.. note:: + + PEP 517 doesn't support editable installs so this is currently + incompatible with ``pip install -e .``. + +This means that you can have a Python project with all build configuration +specified in ``setup.cfg``, without a ``setup.py`` file, if you **can rely +on** your project always being built by a PEP 517/518 compatible frontend. + +To use this feature: + +* Specify build requirements and PEP 517 build backend in + ``pyproject.toml``. + For example: + + .. code-block:: toml + + [build-system] + requires = [ + "setuptools >= 40.9.0", + "wheel", + ] + build-backend = "setuptools.build_meta" + +* Use a PEP 517 compatible build frontend, such as ``pip >= 19`` or ``pep517``. + + .. warning:: + + As PEP 517 is new, support is not universal, and frontends that + do support it may still have bugs. For compatibility, you may want to + put a ``setup.py`` file containing only a ``setuptools.setup()`` + invocation. + Using a ``src/`` layout ======================= From 9e4e2e0e4d9ea3a0f26cc1dd05c975f4cc660f11 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 25 May 2019 12:28:35 +0200 Subject: [PATCH 7660/8469] Mark PEP mentions as :pep: SphinX refs --- docs/setuptools.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 3a2028ced5..e2a7bb1cc1 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2200,22 +2200,23 @@ setup.cfg-only projects .. versionadded:: 40.9.0 -If ``setup.py`` is missing from the project directory when a PEP 517 +If ``setup.py`` is missing from the project directory when a :pep:`517` build is invoked, ``setuptools`` emulates a dummy ``setup.py`` file containing only a ``setuptools.setup()`` call. .. note:: - PEP 517 doesn't support editable installs so this is currently + :pep:`517` doesn't support editable installs so this is currently incompatible with ``pip install -e .``. This means that you can have a Python project with all build configuration specified in ``setup.cfg``, without a ``setup.py`` file, if you **can rely -on** your project always being built by a PEP 517/518 compatible frontend. +on** your project always being built by a :pep:`517`/:pep:`518` compatible +frontend. To use this feature: -* Specify build requirements and PEP 517 build backend in +* Specify build requirements and :pep:`517` build backend in ``pyproject.toml``. For example: @@ -2228,11 +2229,11 @@ To use this feature: ] build-backend = "setuptools.build_meta" -* Use a PEP 517 compatible build frontend, such as ``pip >= 19`` or ``pep517``. +* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``pep517``. .. warning:: - As PEP 517 is new, support is not universal, and frontends that + As :pep:`517` is new, support is not universal, and frontends that do support it may still have bugs. For compatibility, you may want to put a ``setup.py`` file containing only a ``setuptools.setup()`` invocation. From b0657c80db7891a9eca038199d5d4c2e2bafed03 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 26 May 2019 19:46:36 +0200 Subject: [PATCH 7661/8469] =?UTF-8?q?=F0=9F=93=9D=20Improve=20the=20note?= =?UTF-8?q?=20about=20editable=20installs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Paul Ganssle --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e2a7bb1cc1..e5663fc46f 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2207,7 +2207,7 @@ only a ``setuptools.setup()`` call. .. note:: :pep:`517` doesn't support editable installs so this is currently - incompatible with ``pip install -e .``. + incompatible with ``pip install -e .``, as :pep:`517` does not support editable installs. This means that you can have a Python project with all build configuration specified in ``setup.cfg``, without a ``setup.py`` file, if you **can rely From 9afceaf1e5caf499ac78735b4393e8e2f3e9b2d9 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 14 Jan 2020 14:16:03 +0200 Subject: [PATCH 7662/8469] Add flake8-2020 to requirements.txt --- tests/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/requirements.txt b/tests/requirements.txt index 4b5e0eeb62..19bf5aefd0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,6 @@ mock pytest-flake8 +flake8-2020; python_version>="3.6" virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.7 From 4ea498b752fc89fd47c795f46fa1ff66c314dc58 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 14 Jan 2020 14:22:50 +0200 Subject: [PATCH 7663/8469] Add changelog --- changelog.d/1968.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1968.misc.rst diff --git a/changelog.d/1968.misc.rst b/changelog.d/1968.misc.rst new file mode 100644 index 0000000000..4aa5343f4b --- /dev/null +++ b/changelog.d/1968.misc.rst @@ -0,0 +1 @@ +Add flake8-2020 to check for misuse of sys.version or sys.version_info. From 2ce065e44bfb5bd9b3d8589efdb57876b170e7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Wed, 15 Jan 2020 18:13:31 +0100 Subject: [PATCH 7664/8469] Remove the python command from setup.py calls --- docs/setuptools.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index a1d927d5f7..6798a5a515 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -88,7 +88,7 @@ packages in the directory where the setup.py lives. See the `Command Reference`_ section below to see what commands you can give to this setup script. For example, to produce a source distribution, simply invoke:: - python setup.py sdist + setup.py sdist Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your @@ -1220,7 +1220,7 @@ Before you begin, make sure you have the latest versions of setuptools and wheel To build a setuptools project, run this command from the same directory where setup.py is located:: - python3 setup.py sdist bdist_wheel + setup.py sdist bdist_wheel This will generate distribution archives in the `dist` directory. @@ -1469,7 +1469,7 @@ tagging the release, so the trunk will still produce development snapshots. Alternately, if you are not branching for releases, you can override the default version options on the command line, using something like:: - python setup.py egg_info -Db "" sdist bdist_egg + setup.py egg_info -Db "" sdist bdist_egg The first part of this command (``egg_info -Db ""``) will override the configured tag information, before creating source and binary eggs. Thus, these @@ -1479,11 +1479,11 @@ build designation string. Of course, if you will be doing this a lot, you may wish to create a personal alias for this operation, e.g.:: - python setup.py alias -u release egg_info -Db "" + setup.py alias -u release egg_info -Db "" You can then use it like this:: - python setup.py release sdist bdist_egg + setup.py release sdist bdist_egg Or of course you can create more elaborate aliases that do all of the above. See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. @@ -1873,12 +1873,12 @@ Other ``egg_info`` Options Creating a dated "nightly build" snapshot egg:: - python setup.py egg_info --tag-date --tag-build=DEV bdist_egg + setup.py egg_info --tag-date --tag-build=DEV bdist_egg Creating a release with no version tags, even if some default tags are specified in ``setup.cfg``:: - python setup.py egg_info -RDb "" sdist bdist_egg + setup.py egg_info -RDb "" sdist bdist_egg (Notice that ``egg_info`` must always appear on the command line *before* any commands that you want the version changes to apply to.) From 1e5fa9b30a3c3d65d2767d5b9928e555b8c32713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Wed, 15 Jan 2020 18:23:38 +0100 Subject: [PATCH 7665/8469] Uniformise quotation marks --- docs/setuptools.txt | 104 ++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 6798a5a515..f84837ff48 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -100,17 +100,17 @@ dependencies, and perhaps some data files and scripts:: name="HelloWorld", version="0.1", packages=find_packages(), - scripts=['say_hello.py'], + scripts=["say_hello.py"], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine - install_requires=['docutils>=0.3'], + install_requires=["docutils>=0.3"], package_data={ # If any package contains *.txt or *.rst files, include them: - '': ['*.txt', '*.rst'], - # And include any *.msg files found in the 'hello' package, too: - 'hello': ['*.msg'], + "": ["*.txt", "*.rst"], + # And include any *.msg files found in the "hello" package, too: + "hello": ["*.msg"], }, # metadata to display on PyPI @@ -125,7 +125,7 @@ dependencies, and perhaps some data files and scripts:: "Source Code": "https://code.example.com/HelloWorld/", }, classifiers=[ - 'License :: OSI Approved :: Python Software Foundation License' + "License :: OSI Approved :: Python Software Foundation License" ] # could also include long_description, download_url, etc. @@ -207,11 +207,11 @@ but here are a few tips that will keep you out of trouble in the corner cases: to compare different version numbers:: >>> from pkg_resources import parse_version - >>> parse_version('1.9.a.dev') == parse_version('1.9a0dev') + >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") True - >>> parse_version('2.1-rc2') < parse_version('2.1') + >>> parse_version("2.1-rc2") < parse_version("2.1") True - >>> parse_version('0.6a9dev-r41475') < parse_version('0.6a9') + >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") True Once you've decided on a version numbering scheme for your project, you can @@ -371,7 +371,7 @@ unless you need the associated ``setuptools`` feature. imported. This argument is only useful if the project will be installed as a zipfile, and there is a need to have all of the listed resources be extracted to the filesystem *as a unit*. Resources listed here - should be '/'-separated paths, relative to the source root, so to list a + should be "/"-separated paths, relative to the source root, so to list a resource ``foo.png`` in package ``bar.baz``, you would include the string ``bar/baz/foo.png`` in this argument. @@ -413,7 +413,7 @@ the same directory as the setup script. Some projects use a ``src`` or ``lib`` directory as the root of their source tree, and those projects would of course use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir={'':'src'}`` in their +such projects also need something like ``package_dir={"": "src"}`` in their ``setup()`` arguments, but that's just a normal distutils thing.) Anyway, ``find_packages()`` walks the target directory, filtering by inclusion @@ -480,7 +480,7 @@ top-level package called ``tests``! One way to avoid this problem is to use the setup( name="namespace.mypackage", version="0.1", - packages=find_namespace_packages(include=['namespace.*']) + packages=find_namespace_packages(include=["namespace.*"]) ) Another option is to use the "src" layout, where all package code is placed in @@ -500,8 +500,8 @@ With this layout, the package directory is specified as ``src``, as such:: setup(name="namespace.mypackage", version="0.1", - package_dir={'': 'src'}, - packages=find_namespace_packages(where='src')) + package_dir={"": "src"}, + packages=find_namespace_packages(where="src")) .. _PEP 420: https://www.python.org/dev/peps/pep-0420/ @@ -526,12 +526,12 @@ script called ``baz``, you might do something like this:: setup( # other arguments here... entry_points={ - 'console_scripts': [ - 'foo = my_package.some_module:main_func', - 'bar = other_module:some_func', + "console_scripts": [ + "foo = my_package.some_module:main_func", + "bar = other_module:some_func", ], - 'gui_scripts': [ - 'baz = my_package_gui:start_func', + "gui_scripts": [ + "baz = my_package_gui:start_func", ] } ) @@ -567,8 +567,8 @@ as the following:: setup( # other arguments here... entry_points={ - 'setuptools.installation': [ - 'eggsecutable = my_package.some_module:main_func', + "setuptools.installation": [ + "eggsecutable = my_package.some_module:main_func", ] } ) @@ -741,8 +741,8 @@ For example, let's say that Project A offers optional PDF and reST support:: name="Project-A", ... extras_require={ - 'PDF': ["ReportLab>=1.2", "RXP"], - 'reST': ["docutils>=0.3"], + "PDF": ["ReportLab>=1.2", "RXP"], + "reST": ["docutils>=0.3"], } ) @@ -763,9 +763,9 @@ declare it like this, so that the "PDF" requirements are only resolved if the name="Project-A", ... entry_points={ - 'console_scripts': [ - 'rst2pdf = project_a.tools.pdfgen [PDF]', - 'rst2html = project_a.tools.htmlgen', + "console_scripts": [ + "rst2pdf = project_a.tools.pdfgen [PDF]", + "rst2html = project_a.tools.htmlgen", # more script entry points ... ], } @@ -801,8 +801,8 @@ setup to this:: name="Project-A", ... extras_require={ - 'PDF': [], - 'reST': ["docutils>=0.3"], + "PDF": [], + "reST": ["docutils>=0.3"], } ) @@ -829,8 +829,8 @@ For example, here is a project that uses the ``enum`` module and ``pywin32``:: name="Project", ... install_requires=[ - 'enum34;python_version<"3.4"', - 'pywin32 >= 1.0;platform_system=="Windows"' + "enum34;python_version<'3.4'", + "pywin32 >= 1.0;platform_system=='Windows'" ] ) @@ -878,9 +878,9 @@ e.g.:: ... package_data={ # If any package contains *.txt or *.rst files, include them: - '': ['*.txt', '*.rst'], - # And include any *.msg files found in the 'hello' package, too: - 'hello': ['*.msg'], + "": ["*.txt", "*.rst"], + # And include any *.msg files found in the "hello" package, too: + "hello": ["*.msg"], } ) @@ -903,15 +903,15 @@ The setuptools setup file might look like this:: from setuptools import setup, find_packages setup( ... - packages=find_packages('src'), # include all packages under src - package_dir={'':'src'}, # tell distutils packages are under src + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src package_data={ # If any package contains *.txt files, include them: - '': ['*.txt'], - # And include any *.dat files found in the 'data' subdirectory - # of the 'mypkg' package, also: - 'mypkg': ['data/*.dat'], + "": ["*.txt"], + # And include any *.dat files found in the "data" subdirectory + # of the "mypkg" package, also: + "mypkg": ["data/*.dat"], } ) @@ -926,7 +926,7 @@ converts slashes to appropriate platform-specific separators at build time. If datafiles are contained in a subdirectory of a package that isn't a package itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required -in the ``package_data`` argument (as shown above with ``'data/*.dat'``). +in the ``package_data`` argument (as shown above with ``"data/*.dat"``). When building an ``sdist``, the datafiles are also drawn from the ``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if @@ -951,18 +951,18 @@ to do things like this:: from setuptools import setup, find_packages setup( ... - packages=find_packages('src'), # include all packages under src - package_dir={'':'src'}, # tell distutils packages are under src + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src include_package_data=True, # include everything in source control # ...but exclude README.txt from all packages - exclude_package_data={'': ['README.txt']}, + exclude_package_data={"": ["README.txt"]}, ) The ``exclude_package_data`` option is a dictionary mapping package names to lists of wildcard patterns, just like the ``package_data`` option. And, just -as with that option, a key of ``''`` will apply the given pattern(s) to all +as with that option, a key of ``""`` will apply the given pattern(s) to all packages. However, any files that match these patterns will be *excluded* from installation, even if they were listed in ``package_data`` or were included as a result of using ``include_package_data``. @@ -1096,12 +1096,12 @@ for our hypothetical blogging tool:: setup( # ... - entry_points={'blogtool.parsers': '.rst = some_module:SomeClass'} + entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} ) setup( # ... - entry_points={'blogtool.parsers': ['.rst = some_module:a_func']} + entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} ) setup( @@ -1309,7 +1309,7 @@ participates in. For example, the ZopeInterface project might do this:: setup( # ... - namespace_packages=['zope'] + namespace_packages=["zope"] ) because it contains a ``zope.interface`` package that lives in the ``zope`` @@ -1327,7 +1327,7 @@ packages' ``__init__.py`` files (and the ``__init__.py`` of any parent packages), in a normal Python package layout. These ``__init__.py`` files *must* contain the line:: - __import__('pkg_resources').declare_namespace(__name__) + __import__("pkg_resources").declare_namespace(__name__) This code ensures that the namespace package machinery is operating and that the current package is registered as a namespace package. @@ -1410,7 +1410,7 @@ pattern. So, you can use a command line like:: setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 -to build an egg whose version info includes 'DEV-rNNNN' (where NNNN is the +to build an egg whose version info includes "DEV-rNNNN" (where NNNN is the most recent Subversion revision that affected the source tree), and then delete any egg files from the distribution directory except for the three that were built most recently. @@ -1500,7 +1500,7 @@ To ensure Cython is available, include Cython in the build-requires section of your pyproject.toml:: [build-system] - requires=[..., 'cython'] + requires=[..., "cython"] Built with pip 10 or later, that declaration is sufficient to include Cython in the build. For broader compatibility, declare the dependency in your @@ -2351,7 +2351,7 @@ parsing ``metadata`` and ``options`` sections into a dictionary. from setuptools.config import read_configuration - conf_dict = read_configuration('/home/user/dev/package/setup.cfg') + conf_dict = read_configuration("/home/user/dev/package/setup.cfg") By default, ``read_configuration()`` will read only the file provided @@ -2531,7 +2531,7 @@ a file. Here's what the writer utility looks like:: argname = os.path.splitext(basename)[0] value = getattr(cmd.distribution, argname, None) if value is not None: - value = '\n'.join(value) + '\n' + value = "\n".join(value) + "\n" cmd.write_or_delete_file(argname, filename, value) As you can see, ``egg_info.writers`` entry points must be a function taking From 310771c2808dc18218cc30082402c784deb6d2fa Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 18 Jan 2020 07:30:32 -0800 Subject: [PATCH 7666/8469] Add 'Programming Language :: Python :: 3 :: Only' trove classifier The project has been Python 3 only since a46a6bfd903ecc292fc3645c37c1b72781528095. --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 18c9e1df02..35db335af7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,6 +36,7 @@ classifiers = License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 From 9d32a834dfea6e144b05e502fca506fc19d4fa71 Mon Sep 17 00:00:00 2001 From: Ben Nuttall Date: Sun, 19 Jan 2020 12:13:12 +0000 Subject: [PATCH 7667/8469] Ensure bdist_wheel no longer creates a universal wheel, close #1976 by removing the [bdist_wheel] section --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 18c9e1df02..f7dc4ea348 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,9 +14,6 @@ repository = https://upload.pypi.org/legacy/ [sdist] formats = zip -[bdist_wheel] -universal = 1 - [metadata] name = setuptools version = 45.0.0 From c71969013d726c5cbd06dc81770ab064f3e783ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 09:53:27 -0500 Subject: [PATCH 7668/8469] Remove the Features feature. Fixes #65. This commit reverts e4460fad043f4fa0edc7b7e1eef0b209f4588fe5. --- setup.py | 1 - setuptools/__init__.py | 7 +- setuptools/dist.py | 260 +--------------------------- setuptools/tests/test_setuptools.py | 83 +-------- 4 files changed, 7 insertions(+), 344 deletions(-) diff --git a/setup.py b/setup.py index 277b664083..1fe18bd13c 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,6 @@ def pypi_link(pkg_filename): ], "setuptools.finalize_distribution_options": [ "parent_finalize = setuptools.dist:_Distribution.finalize_options", - "features = setuptools.dist:Distribution._finalize_feature_opts", "keywords = setuptools.dist:Distribution._finalize_setup_keywords", "2to3_doctests = " "setuptools.dist:Distribution._finalize_2to3_doctests", diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a71b2bbdc6..dc0f9893da 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,7 +1,6 @@ """Extensions to the 'distutils' for large or complex distributions""" import os -import sys import functools import distutils.core import distutils.filelist @@ -17,7 +16,7 @@ import setuptools.version from setuptools.extension import Extension -from setuptools.dist import Distribution, Feature +from setuptools.dist import Distribution from setuptools.depends import Require from . import monkey @@ -25,13 +24,13 @@ __all__ = [ - 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', + 'setup', 'Distribution', 'Command', 'Extension', 'Require', 'SetuptoolsDeprecationWarning', 'find_packages' ] if PY3: - __all__.append('find_namespace_packages') + __all__.append('find_namespace_packages') __version__ = setuptools.version.__version__ diff --git a/setuptools/dist.py b/setuptools/dist.py index fe5adf4607..ff5a9ff340 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -19,9 +19,7 @@ from collections import defaultdict from email import message_from_file -from distutils.errors import ( - DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, -) +from distutils.errors import DistutilsOptionError, DistutilsSetupError from distutils.util import rfc822_escape from distutils.version import StrictVersion @@ -32,7 +30,6 @@ from . import SetuptoolsDeprecationWarning -from setuptools.depends import Require from setuptools import windows_support from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration @@ -338,7 +335,7 @@ def check_packages(dist, attr, value): class Distribution(_Distribution): - """Distribution with support for features, tests, and package data + """Distribution with support for tests and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': @@ -365,21 +362,6 @@ class Distribution(_Distribution): EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. - 'features' **deprecated** -- a dictionary mapping option names to - 'setuptools.Feature' - objects. Features are a portion of the distribution that can be - included or excluded based on user options, inter-feature dependencies, - and availability on the current system. Excluded features are omitted - from all setup commands, including source and binary distributions, so - you can create multiple distributions from the same source tree. - Feature names should be valid Python identifiers, except that they may - contain the '-' (minus) sign. Features can be included or excluded - via the command line options '--with-X' and '--without-X', where 'X' is - the name of the feature. Whether a feature is included by default, and - whether you are allowed to control this from the command line, is - determined by the Feature object. See the 'Feature' class for more - information. - 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as @@ -401,8 +383,7 @@ class Distribution(_Distribution): for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from - the distribution. They are used by the feature subsystem to configure the - distribution for the included and excluded features. + the distribution. """ _DISTUTILS_UNSUPPORTED_METADATA = { @@ -432,10 +413,6 @@ def __init__(self, attrs=None): if not have_package_data: self.package_data = {} attrs = attrs or {} - if 'features' in attrs or 'require_features' in attrs: - Feature.warn_deprecated() - self.require_features = [] - self.features = {} self.dist_files = [] # Filter-out setuptools' specific options. self.src_root = attrs.pop("src_root", None) @@ -702,17 +679,6 @@ def parse_config_files(self, filenames=None, ignore_option_errors=False): ignore_option_errors=ignore_option_errors) self._finalize_requires() - def parse_command_line(self): - """Process features after parsing command line options""" - result = _Distribution.parse_command_line(self) - if self.features: - self._finalize_features() - return result - - def _feature_attrname(self, name): - """Convert feature name to corresponding option attribute name""" - return 'with_' + name.replace('-', '_') - def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" resolved_dists = pkg_resources.working_set.resolve( @@ -776,53 +742,6 @@ def fetch_build_egg(self, req): from setuptools.installer import fetch_build_egg return fetch_build_egg(self, req) - def _finalize_feature_opts(self): - """Add --with-X/--without-X options based on optional features""" - - if not self.features: - return - - go = [] - no = self.negative_opt.copy() - - for name, feature in self.features.items(): - self._set_feature(name, None) - feature.validate(self) - - if feature.optional: - descr = feature.description - incdef = ' (default)' - excdef = '' - if not feature.include_by_default(): - excdef, incdef = incdef, excdef - - new = ( - ('with-' + name, None, 'include ' + descr + incdef), - ('without-' + name, None, 'exclude ' + descr + excdef), - ) - go.extend(new) - no['without-' + name] = 'with-' + name - - self.global_options = self.feature_options = go + self.global_options - self.negative_opt = self.feature_negopt = no - - def _finalize_features(self): - """Add/remove features and resolve dependencies between them""" - - # First, flag all the enabled items (and thus their dependencies) - for name, feature in self.features.items(): - enabled = self.feature_is_included(name) - if enabled or (enabled is None and feature.include_by_default()): - feature.include_in(self) - self._set_feature(name, 1) - - # Then disable the rest, so that off-by-default features don't - # get flagged as errors when they're required by an enabled feature - for name, feature in self.features.items(): - if not self.feature_is_included(name): - feature.exclude_from(self) - self._set_feature(name, 0) - def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: @@ -852,25 +771,6 @@ def get_command_list(self): self.cmdclass[ep.name] = cmdclass return _Distribution.get_command_list(self) - def _set_feature(self, name, status): - """Set feature's inclusion status""" - setattr(self, self._feature_attrname(name), status) - - def feature_is_included(self, name): - """Return 1 if feature is included, 0 if excluded, 'None' if unknown""" - return getattr(self, self._feature_attrname(name)) - - def include_feature(self, name): - """Request inclusion of feature named 'name'""" - - if self.feature_is_included(name) == 0: - descr = self.features[name].description - raise DistutilsOptionError( - descr + " is required, but was excluded or is not available" - ) - self.features[name].include_in(self) - self._set_feature(name, 1) - def include(self, **attrs): """Add items to distribution that are named in keyword arguments @@ -1115,160 +1015,6 @@ def handle_display_options(self, option_order): sys.stdout.detach(), encoding, errors, newline, line_buffering) -class Feature: - """ - **deprecated** -- The `Feature` facility was never completely implemented - or supported, `has reported issues - `_ and will be removed in - a future version. - - A subset of the distribution that can be excluded if unneeded/wanted - - Features are created using these keyword arguments: - - 'description' -- a short, human readable description of the feature, to - be used in error messages, and option help messages. - - 'standard' -- if true, the feature is included by default if it is - available on the current system. Otherwise, the feature is only - included if requested via a command line '--with-X' option, or if - another included feature requires it. The default setting is 'False'. - - 'available' -- if true, the feature is available for installation on the - current system. The default setting is 'True'. - - 'optional' -- if true, the feature's inclusion can be controlled from the - command line, using the '--with-X' or '--without-X' options. If - false, the feature's inclusion status is determined automatically, - based on 'availabile', 'standard', and whether any other feature - requires it. The default setting is 'True'. - - 'require_features' -- a string or sequence of strings naming features - that should also be included if this feature is included. Defaults to - empty list. May also contain 'Require' objects that should be - added/removed from the distribution. - - 'remove' -- a string or list of strings naming packages to be removed - from the distribution if this feature is *not* included. If the - feature *is* included, this argument is ignored. This argument exists - to support removing features that "crosscut" a distribution, such as - defining a 'tests' feature that removes all the 'tests' subpackages - provided by other features. The default for this argument is an empty - list. (Note: the named package(s) or modules must exist in the base - distribution when the 'setup()' function is initially called.) - - other keywords -- any other keyword arguments are saved, and passed to - the distribution's 'include()' and 'exclude()' methods when the - feature is included or excluded, respectively. So, for example, you - could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be - added or removed from the distribution as appropriate. - - A feature must include at least one 'requires', 'remove', or other - keyword argument. Otherwise, it can't affect the distribution in any way. - Note also that you can subclass 'Feature' to create your own specialized - feature types that modify the distribution in other ways when included or - excluded. See the docstrings for the various methods here for more detail. - Aside from the methods, the only feature attributes that distributions look - at are 'description' and 'optional'. - """ - - @staticmethod - def warn_deprecated(): - msg = ( - "Features are deprecated and will be removed in a future " - "version. See https://github.com/pypa/setuptools/issues/65." - ) - warnings.warn(msg, DistDeprecationWarning, stacklevel=3) - - def __init__( - self, description, standard=False, available=True, - optional=True, require_features=(), remove=(), **extras): - self.warn_deprecated() - - self.description = description - self.standard = standard - self.available = available - self.optional = optional - if isinstance(require_features, (str, Require)): - require_features = require_features, - - self.require_features = [ - r for r in require_features if isinstance(r, str) - ] - er = [r for r in require_features if not isinstance(r, str)] - if er: - extras['require_features'] = er - - if isinstance(remove, str): - remove = remove, - self.remove = remove - self.extras = extras - - if not remove and not require_features and not extras: - raise DistutilsSetupError( - "Feature %s: must define 'require_features', 'remove', or " - "at least one of 'packages', 'py_modules', etc." - ) - - def include_by_default(self): - """Should this feature be included by default?""" - return self.available and self.standard - - def include_in(self, dist): - """Ensure feature and its requirements are included in distribution - - You may override this in a subclass to perform additional operations on - the distribution. Note that this method may be called more than once - per feature, and so should be idempotent. - - """ - - if not self.available: - raise DistutilsPlatformError( - self.description + " is required, " - "but is not available on this platform" - ) - - dist.include(**self.extras) - - for f in self.require_features: - dist.include_feature(f) - - def exclude_from(self, dist): - """Ensure feature is excluded from distribution - - You may override this in a subclass to perform additional operations on - the distribution. This method will be called at most once per - feature, and only after all included features have been asked to - include themselves. - """ - - dist.exclude(**self.extras) - - if self.remove: - for item in self.remove: - dist.exclude_package(item) - - def validate(self, dist): - """Verify that feature makes sense in context of distribution - - This method is called by the distribution just before it parses its - command line. It checks to ensure that the 'remove' attribute, if any, - contains only valid package/module names that are present in the base - distribution when 'setup()' is called. You may override it in a - subclass to perform any other required validation of the feature - against a target distribution. - """ - - for item in self.remove: - if not dist.has_contents_for(item): - raise DistutilsSetupError( - "%s wants to be able to remove %s, but the distribution" - " doesn't contain any packages or modules under %s" - % (self.description, item, item) - ) - - class DistDeprecationWarning(SetuptoolsDeprecationWarning): """Class for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.""" diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 5896a69ae6..26a6ab52d1 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -4,7 +4,7 @@ import os import distutils.core import distutils.cmd -from distutils.errors import DistutilsOptionError, DistutilsPlatformError +from distutils.errors import DistutilsOptionError from distutils.errors import DistutilsSetupError from distutils.core import Extension from distutils.version import LooseVersion @@ -14,7 +14,6 @@ import setuptools import setuptools.dist import setuptools.depends as dep -from setuptools import Feature from setuptools.depends import Require from setuptools.extern import six @@ -211,86 +210,6 @@ def testInvalidIncludeExclude(self): self.dist.exclude(package_dir=['q']) -@pytest.mark.filterwarnings('ignore:Features are deprecated') -class TestFeatures: - def setup_method(self, method): - self.req = Require('Distutils', '1.0.3', 'distutils') - self.dist = makeSetup( - features={ - 'foo': Feature( - "foo", standard=True, require_features=['baz', self.req]), - 'bar': Feature("bar", standard=True, packages=['pkg.bar'], - py_modules=['bar_et'], remove=['bar.ext'], - ), - 'baz': Feature( - "baz", optional=False, packages=['pkg.baz'], - scripts=['scripts/baz_it'], - libraries=[('libfoo', 'foo/foofoo.c')] - ), - 'dwim': Feature("DWIM", available=False, remove='bazish'), - }, - script_args=['--without-bar', 'install'], - packages=['pkg.bar', 'pkg.foo'], - py_modules=['bar_et', 'bazish'], - ext_modules=[Extension('bar.ext', ['bar.c'])] - ) - - def testDefaults(self): - assert not Feature( - "test", standard=True, remove='x', available=False - ).include_by_default() - assert Feature("test", standard=True, remove='x').include_by_default() - # Feature must have either kwargs, removes, or require_features - with pytest.raises(DistutilsSetupError): - Feature("test") - - def testAvailability(self): - with pytest.raises(DistutilsPlatformError): - self.dist.features['dwim'].include_in(self.dist) - - def testFeatureOptions(self): - dist = self.dist - assert ( - ('with-dwim', None, 'include DWIM') in dist.feature_options - ) - assert ( - ('without-dwim', None, 'exclude DWIM (default)') - in dist.feature_options - ) - assert ( - ('with-bar', None, 'include bar (default)') in dist.feature_options - ) - assert ( - ('without-bar', None, 'exclude bar') in dist.feature_options - ) - assert dist.feature_negopt['without-foo'] == 'with-foo' - assert dist.feature_negopt['without-bar'] == 'with-bar' - assert dist.feature_negopt['without-dwim'] == 'with-dwim' - assert ('without-baz' not in dist.feature_negopt) - - def testUseFeatures(self): - dist = self.dist - assert dist.with_foo == 1 - assert dist.with_bar == 0 - assert dist.with_baz == 1 - assert ('bar_et' not in dist.py_modules) - assert ('pkg.bar' not in dist.packages) - assert ('pkg.baz' in dist.packages) - assert ('scripts/baz_it' in dist.scripts) - assert (('libfoo', 'foo/foofoo.c') in dist.libraries) - assert dist.ext_modules == [] - assert dist.require_features == [self.req] - - # If we ask for bar, it should fail because we explicitly disabled - # it on the command line - with pytest.raises(DistutilsOptionError): - dist.include_feature('bar') - - def testFeatureWithInvalidRemove(self): - with pytest.raises(SystemExit): - makeSetup(features={'x': Feature('x', remove='y')}) - - class TestCommandTests: def testTestIsCommand(self): test_cmd = makeSetup().get_command_obj('test') From 6980b9c8fed113f1046099924e16287662beff5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 10:06:53 -0500 Subject: [PATCH 7669/8469] Update changelog. --- changelog.d/65.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/65.breaking.rst diff --git a/changelog.d/65.breaking.rst b/changelog.d/65.breaking.rst new file mode 100644 index 0000000000..bde427402f --- /dev/null +++ b/changelog.d/65.breaking.rst @@ -0,0 +1 @@ +Once again as in 3.0, removed the Features feature. From 38af5c857fc93706cbb13de1c5e5a0b0a458fdce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 10:54:16 -0500 Subject: [PATCH 7670/8469] Update changelog. --- changelog.d/1974.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1974.change.rst diff --git a/changelog.d/1974.change.rst b/changelog.d/1974.change.rst new file mode 100644 index 0000000000..cadf1cf186 --- /dev/null +++ b/changelog.d/1974.change.rst @@ -0,0 +1 @@ +Add Python 3 Only Trove Classifier and remove universal wheel declaration for more complete transition from Python 2. From 756a7d662a076657ddf67f0cba699ca5430cb840 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 10:55:07 -0500 Subject: [PATCH 7671/8469] =?UTF-8?q?Bump=20version:=2045.0.0=20=E2=86=92?= =?UTF-8?q?=2045.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 8 ++++++++ changelog.d/1458.change.rst | 1 - changelog.d/1704.change.rst | 1 - changelog.d/1974.change.rst | 1 - setup.cfg | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1458.change.rst delete mode 100644 changelog.d/1704.change.rst delete mode 100644 changelog.d/1974.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7714390795..ef8a387751 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 45.0.0 +current_version = 45.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 4a81e995c0..198854fc24 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v45.1.0 +------- + +* #1458: Add minimum sunset date and preamble to Python 2 warning. +* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ +* #1974: Add Python 3 Only Trove Classifier and remove universal wheel declaration for more complete transition from Python 2. + + v45.0.0 ------- diff --git a/changelog.d/1458.change.rst b/changelog.d/1458.change.rst deleted file mode 100644 index c953127ae0..0000000000 --- a/changelog.d/1458.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add minimum sunset date and preamble to Python 2 warning. diff --git a/changelog.d/1704.change.rst b/changelog.d/1704.change.rst deleted file mode 100644 index 62450835b9..0000000000 --- a/changelog.d/1704.change.rst +++ /dev/null @@ -1 +0,0 @@ -Set sys.argv[0] in setup script run by build_meta.__legacy__ diff --git a/changelog.d/1974.change.rst b/changelog.d/1974.change.rst deleted file mode 100644 index cadf1cf186..0000000000 --- a/changelog.d/1974.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add Python 3 Only Trove Classifier and remove universal wheel declaration for more complete transition from Python 2. diff --git a/setup.cfg b/setup.cfg index e335ea224c..bef019eed8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 45.0.0 +version = 45.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From fcc9680fd931645d0e6928a358d726daa1ab220e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:15:42 -0500 Subject: [PATCH 7672/8469] Add azure pipelines from jaraco/skeleton --- azure-pipelines.yml | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..3e80bf443d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,71 @@ +# Create the project in Azure with: +# az devops project create --name $name --organization https://dev.azure.com/$org/ --visibility public +# then configure the pipelines (through web UI) + +trigger: + branches: + include: + - '*' + tags: + include: + - '*' + +pool: + vmimage: 'Ubuntu-18.04' + +variables: +- group: Azure secrets + +stages: +- stage: Test + jobs: + + - job: 'Test' + strategy: + matrix: + Python36: + python.version: '3.6' + Python38: + python.version: '3.8' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: python -m pip install tox + displayName: 'Install tox' + + - script: | + tox -- --junit-xml=test-results.xml + displayName: 'run tests' + + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test-results.xml' + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() + +- stage: Publish + dependsOn: Test + jobs: + - job: 'Publish' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.8' + architecture: 'x64' + + - script: python -m pip install tox + displayName: 'Install tox' + + - script: | + tox -e release + env: + TWINE_PASSWORD: $(PyPI-token) + displayName: 'publish to PyPI' + + condition: contains(variables['Build.SourceBranch'], 'tags') From d09dd5ff998887536e3e898ec7c007053d96e0aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:29:30 -0500 Subject: [PATCH 7673/8469] Include PKG-INFO in minimal egg-info so that metadata doesn't need to be generated twice during bootstrap. --- bootstrap.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 8c7d7fc3e6..077bf690a7 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -25,6 +25,7 @@ entry_points = setuptools.dist:check_entry_points [egg_info.writers] + PKG-INFO = setuptools.command.egg_info:write_pkg_info dependency_links.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries requires.txt = setuptools.command.egg_info:write_requirements @@ -52,8 +53,6 @@ def run_egg_info(): cmd = [sys.executable, 'setup.py', 'egg_info'] print("Regenerating egg_info") subprocess.check_call(cmd) - print("...and again.") - subprocess.check_call(cmd) def main(): From 7f6394863dc096b9f31e71a5843acbd836ff8d6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:43:44 -0500 Subject: [PATCH 7674/8469] Only run 'egg_info' when bootstrapping was required. --- bootstrap.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index 077bf690a7..8fa9e4b554 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -36,10 +36,11 @@ def ensure_egg_info(): if os.path.exists('setuptools.egg-info'): return print("adding minimal entry_points") - build_egg_info() + add_minimal_info() + run_egg_info() -def build_egg_info(): +def add_minimal_info(): """ Build a minimal egg-info, enough to invoke egg_info """ @@ -55,9 +56,4 @@ def run_egg_info(): subprocess.check_call(cmd) -def main(): - ensure_egg_info() - run_egg_info() - - -__name__ == '__main__' and main() +__name__ == '__main__' and ensure_egg_info() From 94f88bf48af78c4f961fe42241da556837efa3c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:54:02 -0500 Subject: [PATCH 7675/8469] Bootstrap the environment in tox, allowing simple 'tox' to run tests and simplifying all of the pipelines. --- .github/workflows/python-tests.yml | 4 ---- .travis.yml | 2 -- appveyor.yml | 1 - docs/conf.py | 2 +- docs/developer-guide.txt | 8 ++------ tools/tox_pip.py | 11 +++++++++-- tox.ini | 4 +--- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 71957abaa8..a95a5b1de6 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -52,10 +52,6 @@ jobs: env env: ${{ matrix.env }} - - name: Update egg_info based on setup.py in checkout - run: >- - python -m bootstrap - env: ${{ matrix.env }} - name: Verify that there's no cached Python modules in sources if: >- ! startsWith(matrix.os, 'windows-') diff --git a/.travis.yml b/.travis.yml index 263386c8dd..fe875ab64f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,8 +40,6 @@ install: - pip freeze --all - env -# update egg_info based on setup.py in checkout -- python bootstrap.py - "! grep pyc setuptools.egg-info/SOURCES.txt" script: diff --git a/appveyor.yml b/appveyor.yml index fc65a9a70d..f7ab22f6af 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,6 @@ test_script: - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel - pip install --upgrade tox tox-venv virtualenv - pip freeze --all - - python bootstrap.py - tox -- --cov after_test: diff --git a/docs/conf.py b/docs/conf.py index cbd19fb470..6f6ae13a60 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # hack to run the bootstrap script so that jaraco.packaging.sphinx # can invoke setup.py 'READTHEDOCS' in os.environ and subprocess.check_call( - [sys.executable, 'bootstrap.py'], + [sys.executable, '-m', 'bootstrap'], cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), ) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index d145fba140..0b4ae4d4c3 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -104,12 +104,8 @@ from the command line after pushing a new branch. Testing ------- -The primary tests are run using tox. To run the tests, first create the metadata -needed to run the tests:: - - $ python bootstrap.py - -Then make sure you have tox installed, and invoke it:: +The primary tests are run using tox. Make sure you have tox installed, +and invoke it:: $ tox diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 06655fe439..2d33e9e505 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -14,13 +14,20 @@ def remove_setuptools(): subprocess.check_call(cmd, cwd='.tox') +def bootstrap(): + print("Running bootstrap") + cmd = [sys.executable, '-m', 'bootstrap'] + subprocess.check_call(cmd) + + def pip(args): # Honor requires-python when installing test suite dependencies if any('-r' in arg for arg in args): os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = '0' - # When installing '.', remove setuptools - '.' in args and remove_setuptools() + if '.' in args: + remove_setuptools() + bootstrap() cmd = [sys.executable, '-m', 'pip'] + args subprocess.check_call(cmd) diff --git a/tox.ini b/tox.ini index d458dc338c..e71067be93 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,3 @@ -# Note: Run "python bootstrap.py" before running Tox, to generate metadata. -# # To run Tox against all supported Python interpreters, you can set: # # export TOXENV='py27,py3{5,6,7,8},pypy,pypy3' @@ -49,7 +47,7 @@ commands=codecov -X gcov --file {toxworkdir}/coverage.xml deps = -r{toxinidir}/docs/requirements.txt skip_install=True commands = - python {toxinidir}/bootstrap.py + python -m bootstrap sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man From 98bf0b5d2da335aa12517cbb01bc733eee3b216b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:55:33 -0500 Subject: [PATCH 7676/8469] Remove another reference to py27 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d458dc338c..9d27dd17d9 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # # To run Tox against all supported Python interpreters, you can set: # -# export TOXENV='py27,py3{5,6,7,8},pypy,pypy3' +# export TOXENV='py3{5,6,7,8},pypy,pypy3' [tox] envlist=python From a0e8d0568d84e29066a5b45aade5aafe28237ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:57:02 -0500 Subject: [PATCH 7677/8469] Disable Python 2 tests on Github Actions --- .github/workflows/python-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 71957abaa8..fab2169a01 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -18,7 +18,6 @@ jobs: - 3.7 - 3.6 - 3.5 - - 2.7 os: - ubuntu-18.04 - ubuntu-16.04 From 3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 12:46:30 -0500 Subject: [PATCH 7678/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 39 ++++-------- pkg_resources/__init__.py | 4 +- pkg_resources/tests/test_pkg_resources.py | 8 ++- pkg_resources/tests/test_resources.py | 3 +- setuptools/__init__.py | 6 +- setuptools/archive_util.py | 6 +- setuptools/build_meta.py | 24 ++++--- setuptools/command/build_clib.py | 31 ++++----- setuptools/command/build_ext.py | 9 ++- setuptools/command/easy_install.py | 31 +++++---- setuptools/command/egg_info.py | 12 ++-- setuptools/command/install_lib.py | 3 +- setuptools/command/py36compat.py | 2 +- setuptools/command/test.py | 3 +- setuptools/command/upload_docs.py | 6 +- setuptools/dep_util.py | 4 +- setuptools/installer.py | 4 +- setuptools/msvc.py | 17 ++--- setuptools/namespaces.py | 16 +++-- setuptools/package_index.py | 6 +- setuptools/py27compat.py | 2 +- setuptools/sandbox.py | 9 +-- setuptools/site-patch.py | 10 +-- setuptools/ssl_support.py | 23 ++++--- setuptools/tests/test_build_meta.py | 1 + setuptools/tests/test_dist.py | 11 ++-- setuptools/tests/test_easy_install.py | 77 ++++++++++++++--------- setuptools/tests/test_egg_info.py | 48 +++++++------- setuptools/tests/test_test.py | 2 +- setuptools/tests/test_virtualenv.py | 12 ++-- setuptools/tests/test_wheel.py | 6 +- setuptools/wheel.py | 3 +- 32 files changed, 251 insertions(+), 187 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cbd19fb470..7cc61bf765 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,23 +1,3 @@ -# -*- coding: utf-8 -*- -# -# Setuptools documentation build configuration file, created by -# sphinx-quickstart on Fri Jul 17 14:22:37 2009. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# The contents of this file are pickled, so don't put values in the namespace -# that aren't pickleable (module imports are okay, they're removed automatically). -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. - import subprocess import sys import os @@ -30,10 +10,8 @@ cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), ) -# -- General configuration ----------------------------------------------------- +# -- General configuration -- -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['jaraco.packaging.sphinx', 'rst.linker'] # Add any paths that contain templates here, relative to this directory. @@ -45,7 +23,8 @@ # The master toctree document. master_doc = 'index' -# A list of glob-style patterns that should be excluded when looking for source files. +# A list of glob-style patterns that should be excluded +# when looking for source files. exclude_patterns = ['requirements.txt'] # List of directories, relative to source directory, that shouldn't be searched @@ -55,7 +34,7 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' -# -- Options for HTML output --------------------------------------------------- +# -- Options for HTML output -- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. @@ -69,7 +48,10 @@ html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {'index': ['relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']} +html_sidebars = { + 'index': [ + 'relations.html', 'sourcelink.html', 'indexsidebar.html', + 'searchbox.html']} # If false, no module index is generated. html_use_modindex = False @@ -77,10 +59,11 @@ # If false, no index is generated. html_use_index = False -# -- Options for LaTeX output -------------------------------------------------- +# -- Options for LaTeX output -- # Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). +# (source start file, target name, title, author, +# documentclass [howto/manual]). latex_documents = [ ('index', 'Setuptools.tex', 'Setuptools Documentation', 'The fellowship of the packaging', 'manual'), diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3fa883ceb4..75563f95df 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2329,7 +2329,8 @@ def null_ns_handler(importer, path_item, packageName, module): def normalize_path(filename): """Normalize a file/dir name for comparison purposes""" - return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename)))) + return os.path.normcase(os.path.realpath(os.path.normpath( + _cygwin_patch(filename)))) def _cygwin_patch(filename): # pragma: nocover @@ -3288,6 +3289,7 @@ def _initialize_master_working_set(): list(map(working_set.add_entry, sys.path)) globals().update(locals()) + class PkgResourcesDeprecationWarning(Warning): """ Base class for warning about deprecations in ``pkg_resources`` diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 5960868a52..78281869a6 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -17,7 +17,9 @@ except ImportError: import mock -from pkg_resources import DistInfoDistribution, Distribution, EggInfoDistribution +from pkg_resources import ( + DistInfoDistribution, Distribution, EggInfoDistribution, +) from setuptools.extern import six from pkg_resources.extern.six.moves import map from pkg_resources.extern.six import text_type, string_types @@ -279,8 +281,8 @@ def make_distribution_no_version(tmpdir, basename): ('dist-info', 'METADATA', DistInfoDistribution), ], ) -def test_distribution_version_missing(tmpdir, suffix, expected_filename, - expected_dist_type): +def test_distribution_version_missing( + tmpdir, suffix, expected_filename, expected_dist_type): """ Test Distribution.version when the "Version" header is missing. """ diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 93fa711438..ed7cdfcc3f 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -15,7 +15,7 @@ from pkg_resources import ( parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, - WorkingSet, PkgResourcesDeprecationWarning) + WorkingSet) # from Python 3.6 docs. @@ -501,7 +501,6 @@ def testDeprecationWarnings(self): ep.load(require=False) - class TestRequirements: def testBasics(self): r = Requirement.parse("Twisted>=1.2") diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a71b2bbdc6..b08c2f626a 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,7 +1,6 @@ """Extensions to the 'distutils' for large or complex distributions""" import os -import sys import functools import distutils.core import distutils.filelist @@ -31,7 +30,7 @@ ] if PY3: - __all__.append('find_namespace_packages') + __all__.append('find_namespace_packages') __version__ = setuptools.version.__version__ @@ -123,7 +122,7 @@ def _looks_like_package(path): find_packages = PackageFinder.find if PY3: - find_namespace_packages = PEP420PackageFinder.find + find_namespace_packages = PEP420PackageFinder.find def _install_setup_requires(attrs): @@ -144,6 +143,7 @@ def setup(**attrs): _install_setup_requires(attrs) return distutils.core.setup(**attrs) + setup.__doc__ = distutils.core.setup.__doc__ diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 81436044d9..64528ca7a5 100644 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -25,7 +25,8 @@ def default_filter(src, dst): return dst -def unpack_archive(filename, extract_dir, progress_filter=default_filter, +def unpack_archive( + filename, extract_dir, progress_filter=default_filter, drivers=None): """Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat`` @@ -148,7 +149,8 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): # resolve any links and to extract the link targets as normal # files - while member is not None and (member.islnk() or member.issym()): + while member is not None and ( + member.islnk() or member.issym()): linkpath = member.linkname if member.issym(): base = posixpath.dirname(member.name) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index eb9e815ef8..a1c951cf59 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -48,6 +48,7 @@ '__legacy__', 'SetupRequirementsError'] + class SetupRequirementsError(BaseException): def __init__(self, specifiers): self.specifiers = specifiers @@ -143,7 +144,8 @@ def run_setup(self, setup_script='setup.py'): def get_requires_for_build_wheel(self, config_settings=None): config_settings = self._fix_config(config_settings) - return self._get_build_requires(config_settings, requirements=['wheel']) + return self._get_build_requires( + config_settings, requirements=['wheel']) def get_requires_for_build_sdist(self, config_settings=None): config_settings = self._fix_config(config_settings) @@ -160,8 +162,10 @@ def prepare_metadata_for_build_wheel(self, metadata_directory, dist_infos = [f for f in os.listdir(dist_info_directory) if f.endswith('.dist-info')] - if (len(dist_infos) == 0 and - len(_get_immediate_subdirectories(dist_info_directory)) == 1): + if ( + len(dist_infos) == 0 and + len(_get_immediate_subdirectories(dist_info_directory)) == 1 + ): dist_info_directory = os.path.join( dist_info_directory, os.listdir(dist_info_directory)[0]) @@ -193,7 +197,8 @@ def _build_with_temp_dir(self, setup_command, result_extension, config_settings["--global-option"]) self.run_setup() - result_basename = _file_with_extension(tmp_dist_dir, result_extension) + result_basename = _file_with_extension( + tmp_dist_dir, result_extension) result_path = os.path.join(result_directory, result_basename) if os.path.exists(result_path): # os.rename will fail overwriting on non-Unix. @@ -202,7 +207,6 @@ def _build_with_temp_dir(self, setup_command, result_extension, return result_basename - def build_wheel(self, wheel_directory, config_settings=None, metadata_directory=None): return self._build_with_temp_dir(['bdist_wheel'], '.whl', @@ -217,9 +221,12 @@ def build_sdist(self, sdist_directory, config_settings=None): class _BuildMetaLegacyBackend(_BuildMetaBackend): """Compatibility backend for setuptools - This is a version of setuptools.build_meta that endeavors to maintain backwards - compatibility with pre-PEP 517 modes of invocation. It exists as a temporary - bridge between the old packaging mechanism and the new packaging mechanism, + This is a version of setuptools.build_meta that endeavors + to maintain backwards + compatibility with pre-PEP 517 modes of invocation. It + exists as a temporary + bridge between the old packaging mechanism and the new + packaging mechanism, and will eventually be removed. """ def run_setup(self, setup_script='setup.py'): @@ -250,6 +257,7 @@ def run_setup(self, setup_script='setup.py'): sys.path[:] = sys_path sys.argv[0] = sys_argv_0 + # The primary backend _BACKEND = _BuildMetaBackend() diff --git a/setuptools/command/build_clib.py b/setuptools/command/build_clib.py index 09caff6ffd..88f0d095b8 100644 --- a/setuptools/command/build_clib.py +++ b/setuptools/command/build_clib.py @@ -71,28 +71,31 @@ def build_libraries(self, libraries): output_dir=self.build_temp ) - if newer_pairwise_group(dependencies, expected_objects) != ([], []): + if ( + newer_pairwise_group(dependencies, expected_objects) + != ([], []) + ): # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) macros = build_info.get('macros') include_dirs = build_info.get('include_dirs') cflags = build_info.get('cflags') - objects = self.compiler.compile( - sources, - output_dir=self.build_temp, - macros=macros, - include_dirs=include_dirs, - extra_postargs=cflags, - debug=self.debug - ) + self.compiler.compile( + sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=include_dirs, + extra_postargs=cflags, + debug=self.debug + ) # Now "link" the object files together into a static library. # (On Unix at least, this isn't really linking -- it just # builds an archive. Whatever.) self.compiler.create_static_lib( - expected_objects, - lib_name, - output_dir=self.build_clib, - debug=self.debug - ) + expected_objects, + lib_name, + output_dir=self.build_clib, + debug=self.debug + ) diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 1b51e040b4..03b6f3467f 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -14,7 +14,8 @@ if six.PY2: import imp - EXTENSION_SUFFIXES = [s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] + EXTENSION_SUFFIXES = [ + s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] else: from importlib.machinery import EXTENSION_SUFFIXES @@ -29,7 +30,7 @@ # make sure _config_vars is initialized get_config_var("LDSHARED") -from distutils.sysconfig import _config_vars as _CONFIG_VARS +from distutils.sysconfig import _config_vars as _CONFIG_VARS # noqa def _customize_compiler_for_shlib(compiler): @@ -65,7 +66,9 @@ def _customize_compiler_for_shlib(compiler): except ImportError: pass -if_dl = lambda s: s if have_rtld else '' + +def if_dl(s): + return s if have_rtld else '' def get_abi3_suffix(): diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 426301d6f3..b95ef1f6b0 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -121,7 +121,8 @@ def isascii(s): return False -_one_liner = lambda text: textwrap.dedent(text).strip().replace('\n', '; ') +def _one_liner(text): + return textwrap.dedent(text).strip().replace('\n', '; ') class easy_install(Command): @@ -414,8 +415,8 @@ def run(self, show_deprecation=True): if show_deprecation: self.announce( "WARNING: The easy_install command is deprecated " - "and will be removed in a future version." - , log.WARN, + "and will be removed in a future version.", + log.WARN, ) if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) @@ -507,13 +508,13 @@ def check_site_dir(self): the distutils default setting) was: %s - """).lstrip() + """).lstrip() # noqa __not_exists_id = textwrap.dedent(""" This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option). - """).lstrip() + """).lstrip() # noqa __access_msg = textwrap.dedent(""" Perhaps your account does not have write access to this directory? If the @@ -529,7 +530,7 @@ def check_site_dir(self): https://setuptools.readthedocs.io/en/latest/easy_install.html Please make the appropriate changes for your system and try again. - """).lstrip() + """).lstrip() # noqa def cant_write_to_target(self): msg = self.__cant_write_msg % (sys.exc_info()[1], self.install_dir,) @@ -1093,13 +1094,13 @@ def install_wheel(self, wheel_path, tmpdir): pkg_resources.require("%(name)s") # latest installed version pkg_resources.require("%(name)s==%(version)s") # this exact version pkg_resources.require("%(name)s>=%(version)s") # this version or higher - """).lstrip() + """).lstrip() # noqa __id_warning = textwrap.dedent(""" Note also that the installation directory must be on sys.path at runtime for this to work. (e.g. by being the application's script directory, by being on PYTHONPATH, or by being added to sys.path by your code.) - """) + """) # noqa def installation_report(self, req, dist, what="Installed"): """Helpful installation message for display to package users""" @@ -1124,7 +1125,7 @@ def installation_report(self, req, dist, what="Installed"): %(python)s setup.py develop See the setuptools documentation for the "develop" command for more info. - """).lstrip() + """).lstrip() # noqa def report_editable(self, spec, setup_script): dirname = os.path.dirname(setup_script) @@ -1307,7 +1308,8 @@ def byte_compile(self, to_compile): https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations - Please make the appropriate changes for your system and try again.""").lstrip() + Please make the appropriate changes for your system and try again. + """).strip() def no_default_version_msg(self): template = self.__no_default_msg @@ -2093,7 +2095,8 @@ def get_script_args(cls, dist, executable=None, wininst=False): @classmethod def get_script_header(cls, script_text, executable=None, wininst=False): # for backward compatibility - warnings.warn("Use get_header", EasyInstallDeprecationWarning, stacklevel=2) + warnings.warn( + "Use get_header", EasyInstallDeprecationWarning, stacklevel=2) if wininst: executable = "python.exe" return cls.get_header(script_text, executable) @@ -2342,6 +2345,8 @@ def gen_usage(script_name): finally: distutils.core.gen_usage = saved + class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): - """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning.""" - + """ + Warning for EasyInstall deprecations, bypassing suppression. + """ diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index a5c5a2fc19..7fa89541cd 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -33,6 +33,7 @@ from setuptools.extern import packaging from setuptools import SetuptoolsDeprecationWarning + def translate_pattern(glob): """ Translate a file path glob like '*.txt' in to a regular expression. @@ -113,7 +114,7 @@ def translate_pattern(glob): pat += sep pat += r'\Z' - return re.compile(pat, flags=re.MULTILINE|re.DOTALL) + return re.compile(pat, flags=re.MULTILINE | re.DOTALL) class InfoCommon: @@ -637,7 +638,9 @@ def warn_depends_obsolete(cmd, basename, filename): def _write_requirements(stream, reqs): lines = yield_lines(reqs or ()) - append_cr = lambda line: line + '\n' + + def append_cr(line): + return line + '\n' lines = map(append_cr, lines) stream.writelines(lines) @@ -703,7 +706,8 @@ def get_pkg_info_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.", EggInfoDeprecationWarning) + warnings.warn( + "get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: @@ -714,4 +718,4 @@ def get_pkg_info_revision(): class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning): - """Class for warning about deprecations in eggInfo in setupTools. Not ignored by default, unlike DeprecationWarning.""" + """Deprecated behavior warning for EggInfo, bypassing suppression.""" diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 07d6593309..2e9d8757a5 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -77,7 +77,8 @@ def _gen_exclusion_paths(): if not hasattr(sys, 'implementation'): return - base = os.path.join('__pycache__', '__init__.' + sys.implementation.cache_tag) + base = os.path.join( + '__pycache__', '__init__.' + sys.implementation.cache_tag) yield base + '.pyc' yield base + '.pyo' yield base + '.opt-1.pyc' diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 61063e7542..2886055862 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -132,5 +132,5 @@ def _add_defaults_scripts(self): if hasattr(sdist.sdist, '_add_defaults_standards'): # disable the functionality already available upstream - class sdist_add_defaults: + class sdist_add_defaults: # noqa pass diff --git a/setuptools/command/test.py b/setuptools/command/test.py index f6470e9c34..2d83967dd9 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -129,7 +129,8 @@ def with_project_on_sys_path(self, func): @contextlib.contextmanager def project_on_sys_path(self, include_dists=[]): - with_2to3 = not six.PY2 and getattr(self.distribution, 'use_2to3', False) + with_2to3 = not six.PY2 and getattr( + self.distribution, 'use_2to3', False) if with_2to3: # If we run 2to3 we can not do this inplace: diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 130a0cb6c9..0351da7773 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -127,8 +127,8 @@ def _build_multipart(cls, data): """ Build up the MIME payload for the POST data """ - boundary = b'--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' - sep_boundary = b'\n--' + boundary + boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' + sep_boundary = b'\n--' + boundary.encode('ascii') end_boundary = sep_boundary + b'--' end_items = end_boundary, b"\n", builder = functools.partial( @@ -138,7 +138,7 @@ def _build_multipart(cls, data): part_groups = map(builder, data.items()) parts = itertools.chain.from_iterable(part_groups) body_items = itertools.chain(parts, end_items) - content_type = 'multipart/form-data; boundary=%s' % boundary.decode('ascii') + content_type = 'multipart/form-data; boundary=%s' % boundary return b''.join(body_items), content_type def upload_file(self, filename): diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py index 2931c13ec3..521eb716a5 100644 --- a/setuptools/dep_util.py +++ b/setuptools/dep_util.py @@ -1,5 +1,6 @@ from distutils.dep_util import newer_group + # yes, this is was almost entirely copy-pasted from # 'newer_pairwise()', this is just another convenience # function. @@ -10,7 +11,8 @@ def newer_pairwise_group(sources_groups, targets): of 'newer_group()'. """ if len(sources_groups) != len(targets): - raise ValueError("'sources_group' and 'targets' must be the same length") + raise ValueError( + "'sources_group' and 'targets' must be the same length") # build a pair of lists (sources_groups, targets) where source is newer n_sources = [] diff --git a/setuptools/installer.py b/setuptools/installer.py index 9f8be2ef84..1f183bd9af 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -64,8 +64,8 @@ def fetch_build_egg(dist, req): dist.announce( 'WARNING: The pip package is not available, falling back ' 'to EasyInstall for handling setup_requires/test_requires; ' - 'this is deprecated and will be removed in a future version.' - , log.WARN + 'this is deprecated and will be removed in a future version.', + log.WARN ) return _legacy_fetch_build_egg(dist, req) # Warn if wheel is not. diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2ffe1c81ee..fa88c4e87d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1225,7 +1225,7 @@ def OSLibraries(self): arch_subdir = self.pi.target_dir(x64=True) lib = join(self.si.WindowsSdkDir, 'lib') libver = self._sdk_subdir - return [join(lib, '%sum%s' % (libver , arch_subdir))] + return [join(lib, '%sum%s' % (libver, arch_subdir))] @property def OSIncludes(self): @@ -1274,13 +1274,16 @@ def OSLibpath(self): libpath += [ ref, join(self.si.WindowsSdkDir, 'UnionMetadata'), - join(ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'), + join( + ref, 'Windows.Foundation.UniversalApiContract', '1.0.0.0'), join(ref, 'Windows.Foundation.FoundationContract', '1.0.0.0'), - join(ref,'Windows.Networking.Connectivity.WwanContract', - '1.0.0.0'), - join(self.si.WindowsSdkDir, 'ExtensionSDKs', 'Microsoft.VCLibs', - '%0.1f' % self.vs_ver, 'References', 'CommonConfiguration', - 'neutral'), + join( + ref, 'Windows.Networking.Connectivity.WwanContract', + '1.0.0.0'), + join( + self.si.WindowsSdkDir, 'ExtensionSDKs', 'Microsoft.VCLibs', + '%0.1f' % self.vs_ver, 'References', 'CommonConfiguration', + 'neutral'), ] return libpath diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index dc16106d3d..5f403c96d7 100644 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -47,13 +47,17 @@ def _get_target(self): "p = os.path.join(%(root)s, *%(pth)r)", "importlib = has_mfs and __import__('importlib.util')", "has_mfs and __import__('importlib.machinery')", - "m = has_mfs and " + ( + "m = has_mfs and " "sys.modules.setdefault(%(pkg)r, " - "importlib.util.module_from_spec(" - "importlib.machinery.PathFinder.find_spec(%(pkg)r, " - "[os.path.dirname(p)])))", - "m = m or " - "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))", + "importlib.util.module_from_spec(" + "importlib.machinery.PathFinder.find_spec(%(pkg)r, " + "[os.path.dirname(p)])))" + ), + ( + "m = m or " + "sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))" + ), "mp = (m or []) and m.__dict__.setdefault('__path__',[])", "(p not in mp) and mp.append(p)", ) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f419d47167..82eb45169f 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -46,7 +46,8 @@ _SOCKET_TIMEOUT = 15 _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}" -user_agent = _tmpl.format(py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools) +user_agent = _tmpl.format( + py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools) def parse_requirement_arg(spec): @@ -1092,7 +1093,8 @@ def open_with_auth(url, opener=urllib.request.urlopen): # copy of urllib.parse._splituser from Python 3.8 def _splituser(host): - """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" + """splituser('user[:passwd]@host[:port]') + --> 'user[:passwd]', 'host[:port]'.""" user, delim, host = host.rpartition('@') return (user if delim else None), host diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 1d57360f4e..ba39af52b6 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -16,7 +16,7 @@ def get_all_headers(message, key): if six.PY2: - def get_all_headers(message, key): + def get_all_headers(message, key): # noqa return message.getheaders(key) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 685f3f72e3..e46dfc8d25 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -13,6 +13,8 @@ from setuptools.extern.six.moves import builtins, map import pkg_resources.py31compat +from distutils.errors import DistutilsError +from pkg_resources import working_set if sys.platform.startswith('java'): import org.python.modules.posix.PosixModule as _os @@ -23,8 +25,6 @@ except NameError: _file = None _open = open -from distutils.errors import DistutilsError -from pkg_resources import working_set __all__ = [ @@ -374,7 +374,7 @@ def _remap_pair(self, operation, src, dst, *args, **kw): if hasattr(os, 'devnull'): - _EXCEPTIONS = [os.devnull,] + _EXCEPTIONS = [os.devnull] else: _EXCEPTIONS = [] @@ -466,7 +466,8 @@ def open(self, file, flags, mode=0o777, *args, **kw): WRITE_FLAGS = functools.reduce( - operator.or_, [getattr(_os, a, 0) for a in + operator.or_, [ + getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index 40b00de0a7..be0d43d354 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -38,22 +38,24 @@ def __boot(): else: raise ImportError("Couldn't find the real 'site' module") - known_paths = dict([(makepath(item)[1], 1) for item in sys.path]) # 2.2 comp + # 2.2 comp + known_paths = dict([( + makepath(item)[1], 1) for item in sys.path]) # noqa oldpos = getattr(sys, '__egginsert', 0) # save old insertion position sys.__egginsert = 0 # and reset the current one for item in PYTHONPATH: - addsitedir(item) + addsitedir(item) # noqa sys.__egginsert += oldpos # restore effective old position - d, nd = makepath(stdpath[0]) + d, nd = makepath(stdpath[0]) # noqa insert_at = None new_path = [] for item in sys.path: - p, np = makepath(item) + p, np = makepath(item) # noqa if np == nd and insert_at is None: # We've hit the first 'system' path entry, so added entries go here diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 226db694bb..17c14c4694 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -35,7 +35,8 @@ except AttributeError: HTTPSHandler = HTTPSConnection = object -is_available = ssl is not None and object not in (HTTPSHandler, HTTPSConnection) +is_available = ssl is not None and object not in ( + HTTPSHandler, HTTPSConnection) try: @@ -85,8 +86,10 @@ def _dnsname_match(dn, hostname, max_wildcards=1): return dn.lower() == hostname.lower() # RFC 6125, section 6.4.3, subitem 1. - # The client SHOULD NOT attempt to match a presented identifier in which - # the wildcard character comprises a label other than the left-most label. + # The client SHOULD NOT attempt to match a + # presented identifier in which the wildcard + # character comprises a label other than the + # left-most label. if leftmost == '*': # When '*' is a fragment by itself, it matches a non-empty dotless # fragment. @@ -137,15 +140,16 @@ def match_hostname(cert, hostname): return dnsnames.append(value) if len(dnsnames) > 1: - raise CertificateError("hostname %r " - "doesn't match either of %s" + raise CertificateError( + "hostname %r doesn't match either of %s" % (hostname, ', '.join(map(repr, dnsnames)))) elif len(dnsnames) == 1: - raise CertificateError("hostname %r " - "doesn't match %r" + raise CertificateError( + "hostname %r doesn't match %r" % (hostname, dnsnames[0])) else: - raise CertificateError("no appropriate commonName or " + raise CertificateError( + "no appropriate commonName or " "subjectAltName fields were found") @@ -158,7 +162,8 @@ def __init__(self, ca_bundle): def https_open(self, req): return self.do_open( - lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req + lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), + req ) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index d68444f664..8fcf3055ff 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -23,6 +23,7 @@ def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): self.env = env self.backend_name = backend_name + class BuildBackend(BuildBackendBase): """PEP 517 Build Backend""" diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 36237f24a2..b93ef148e9 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -284,7 +284,7 @@ def test_provides_extras_deterministic_order(): dist = Distribution(attrs) assert dist.metadata.provides_extras == ['b', 'a'] - + CHECK_PACKAGE_DATA_TESTS = ( # Valid. ({ @@ -309,7 +309,8 @@ def test_provides_extras_deterministic_order(): ({ 'hello': str('*.msg'), }, ( - "\"values of 'package_data' dict\" must be a list of strings (got '*.msg')" + "\"values of 'package_data' dict\" " + "must be a list of strings (got '*.msg')" )), # Invalid value type (generators are single use) ({ @@ -321,10 +322,12 @@ def test_provides_extras_deterministic_order(): ) -@pytest.mark.parametrize('package_data, expected_message', CHECK_PACKAGE_DATA_TESTS) +@pytest.mark.parametrize( + 'package_data, expected_message', CHECK_PACKAGE_DATA_TESTS) def test_check_package_data(package_data, expected_message): if expected_message is None: assert check_package_data(None, 'package_data', package_data) is None else: - with pytest.raises(DistutilsSetupError, match=re.escape(expected_message)): + with pytest.raises( + DistutilsSetupError, match=re.escape(expected_message)): check_package_data(None, str('package_data'), package_data) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 2be1be47e8..30e79fec67 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -671,8 +671,10 @@ def test_setup_requires_with_pep508_url(self, mock_index, monkeypatch): dep_url = path_to_url(dep_sdist, authority='localhost') test_pkg = create_setup_requires_package( temp_dir, - 'python-xlib', '0.19', # Ignored (overriden by setup_attrs). - setup_attrs=dict(setup_requires='dependency @ %s' % dep_url)) + # Ignored (overriden by setup_attrs) + 'python-xlib', '0.19', + setup_attrs=dict( + setup_requires='dependency @ %s' % dep_url)) test_setup_py = os.path.join(test_pkg, 'setup.py') run_setup(test_setup_py, [str('--version')]) assert len(mock_index.requests) == 0 @@ -710,11 +712,14 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): dep_1_0_sdist = 'dep-1.0.tar.gz' dep_1_0_url = path_to_url(str(tmpdir / dep_1_0_sdist)) dep_1_0_python_requires = '>=2.7' - make_python_requires_sdist(str(tmpdir / dep_1_0_sdist), 'dep', '1.0', dep_1_0_python_requires) + make_python_requires_sdist( + str(tmpdir / dep_1_0_sdist), 'dep', '1.0', dep_1_0_python_requires) dep_2_0_sdist = 'dep-2.0.tar.gz' dep_2_0_url = path_to_url(str(tmpdir / dep_2_0_sdist)) - dep_2_0_python_requires = '!=' + '.'.join(map(str, sys.version_info[:2])) + '.*' - make_python_requires_sdist(str(tmpdir / dep_2_0_sdist), 'dep', '2.0', dep_2_0_python_requires) + dep_2_0_python_requires = '!=' + '.'.join( + map(str, sys.version_info[:2])) + '.*' + make_python_requires_sdist( + str(tmpdir / dep_2_0_sdist), 'dep', '2.0', dep_2_0_python_requires) index = tmpdir / 'index.html' index.write_text(DALS( ''' @@ -726,7 +731,7 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): {dep_2_0_sdist}
    - ''').format( + ''').format( # noqa dep_1_0_url=dep_1_0_url, dep_1_0_sdist=dep_1_0_sdist, dep_1_0_python_requires=dep_1_0_python_requires, @@ -738,23 +743,29 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): with contexts.save_pkg_resources_state(): test_pkg = create_setup_requires_package( str(tmpdir), - 'python-xlib', '0.19', # Ignored (overriden by setup_attrs). - setup_attrs=dict(setup_requires='dep', dependency_links=[index_url])) + 'python-xlib', '0.19', # Ignored (overriden by setup_attrs). + setup_attrs=dict( + setup_requires='dep', dependency_links=[index_url])) test_setup_py = os.path.join(test_pkg, 'setup.py') run_setup(test_setup_py, [str('--version')]) - eggs = list(map(str, pkg_resources.find_distributions(os.path.join(test_pkg, '.eggs')))) + eggs = list(map(str, pkg_resources.find_distributions( + os.path.join(test_pkg, '.eggs')))) assert eggs == ['dep 1.0'] - @pytest.mark.parametrize('use_legacy_installer,with_dependency_links_in_setup_py', - itertools.product((False, True), (False, True))) - def test_setup_requires_with_find_links_in_setup_cfg(self, monkeypatch, - use_legacy_installer, - with_dependency_links_in_setup_py): + @pytest.mark.parametrize( + 'use_legacy_installer,with_dependency_links_in_setup_py', + itertools.product((False, True), (False, True))) + def test_setup_requires_with_find_links_in_setup_cfg( + self, monkeypatch, use_legacy_installer, + with_dependency_links_in_setup_py): monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: - make_trivial_sdist(os.path.join(temp_dir, 'python-xlib-42.tar.gz'), 'python-xlib', '42') + make_trivial_sdist( + os.path.join(temp_dir, 'python-xlib-42.tar.gz'), + 'python-xlib', + '42') test_pkg = os.path.join(temp_dir, 'test_pkg') test_setup_py = os.path.join(test_pkg, 'setup.py') test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') @@ -771,7 +782,7 @@ def test_setup_requires_with_find_links_in_setup_cfg(self, monkeypatch, installer.fetch_build_egg = installer._legacy_fetch_build_egg setup(setup_requires='python-xlib==42', dependency_links={dependency_links!r}) - ''').format(use_legacy_installer=use_legacy_installer, + ''').format(use_legacy_installer=use_legacy_installer, # noqa dependency_links=dependency_links)) with open(test_setup_cfg, 'w') as fp: fp.write(DALS( @@ -783,14 +794,17 @@ def test_setup_requires_with_find_links_in_setup_cfg(self, monkeypatch, find_links=temp_dir)) run_setup(test_setup_py, [str('--version')]) - def test_setup_requires_with_transitive_extra_dependency(self, monkeypatch): + def test_setup_requires_with_transitive_extra_dependency( + self, monkeypatch): # Use case: installing a package with a build dependency on # an already installed `dep[extra]`, which in turn depends # on `extra_dep` (whose is not already installed). with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: # Create source distribution for `extra_dep`. - make_trivial_sdist(os.path.join(temp_dir, 'extra_dep-1.0.tar.gz'), 'extra_dep', '1.0') + make_trivial_sdist( + os.path.join(temp_dir, 'extra_dep-1.0.tar.gz'), + 'extra_dep', '1.0') # Create source tree for `dep`. dep_pkg = os.path.join(temp_dir, 'dep') os.mkdir(dep_pkg) @@ -806,12 +820,12 @@ def test_setup_requires_with_transitive_extra_dependency(self, monkeypatch): 'setup.cfg': '', }, prefix=dep_pkg) # "Install" dep. - run_setup(os.path.join(dep_pkg, 'setup.py'), [str('dist_info')]) + run_setup( + os.path.join(dep_pkg, 'setup.py'), [str('dist_info')]) working_set.add_entry(dep_pkg) # Create source tree for test package. test_pkg = os.path.join(temp_dir, 'test_pkg') test_setup_py = os.path.join(test_pkg, 'setup.py') - test_setup_cfg = os.path.join(test_pkg, 'setup.cfg') os.mkdir(test_pkg) with open(test_setup_py, 'w') as fp: fp.write(DALS( @@ -881,16 +895,19 @@ def make_nspkg_sdist(dist_path, distname, version): def make_python_requires_sdist(dist_path, distname, version, python_requires): make_sdist(dist_path, [ - ('setup.py', DALS("""\ - import setuptools - setuptools.setup( - name={name!r}, - version={version!r}, - python_requires={python_requires!r}, - ) - """).format(name=distname, version=version, - python_requires=python_requires)), - ('setup.cfg', ''), + ( + 'setup.py', + DALS("""\ + import setuptools + setuptools.setup( + name={name!r}, + version={version!r}, + python_requires={python_requires!r}, + ) + """).format( + name=distname, version=version, + python_requires=python_requires)), + ('setup.cfg', ''), ]) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 0db204baa3..109f913587 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -525,19 +525,19 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): license_file = LICENSE """), 'LICENSE': "Test license" - }, True), # with license + }, True), # with license ({ 'setup.cfg': DALS(""" [metadata] license_file = INVALID_LICENSE """), 'LICENSE': "Test license" - }, False), # with an invalid license + }, False), # with an invalid license ({ 'setup.cfg': DALS(""" """), 'LICENSE': "Test license" - }, False), # no license_file attribute + }, False), # no license_file attribute ({ 'setup.cfg': DALS(""" [metadata] @@ -545,7 +545,7 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): """), 'MANIFEST.in': "exclude LICENSE", 'LICENSE': "Test license" - }, False) # license file is manually excluded + }, False) # license file is manually excluded ]) def test_setup_cfg_license_file( self, tmpdir_cwd, env, files, license_in_sources): @@ -565,7 +565,8 @@ def test_setup_cfg_license_file( assert 'LICENSE' in sources_text else: assert 'LICENSE' not in sources_text - assert 'INVALID_LICENSE' not in sources_text # for invalid license test + # for invalid license test + assert 'INVALID_LICENSE' not in sources_text @pytest.mark.parametrize("files, incl_licenses, excl_licenses", [ ({ @@ -577,7 +578,7 @@ def test_setup_cfg_license_file( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with licenses + }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with licenses ({ 'setup.cfg': DALS(""" [metadata] @@ -585,7 +586,7 @@ def test_setup_cfg_license_file( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with commas + }, ['LICENSE-ABC', 'LICENSE-XYZ'], []), # with commas ({ 'setup.cfg': DALS(""" [metadata] @@ -594,7 +595,7 @@ def test_setup_cfg_license_file( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # with one license + }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # with one license ({ 'setup.cfg': DALS(""" [metadata] @@ -602,7 +603,7 @@ def test_setup_cfg_license_file( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # empty + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # empty ({ 'setup.cfg': DALS(""" [metadata] @@ -610,7 +611,7 @@ def test_setup_cfg_license_file( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-XYZ'], ['LICENSE-ABC']), # on same line + }, ['LICENSE-XYZ'], ['LICENSE-ABC']), # on same line ({ 'setup.cfg': DALS(""" [metadata] @@ -619,12 +620,12 @@ def test_setup_cfg_license_file( INVALID_LICENSE """), 'LICENSE-ABC': "Test license" - }, ['LICENSE-ABC'], ['INVALID_LICENSE']), # with an invalid license + }, ['LICENSE-ABC'], ['INVALID_LICENSE']), # with an invalid license ({ 'setup.cfg': DALS(""" """), 'LICENSE': "Test license" - }, [], ['LICENSE']), # no license_files attribute + }, [], ['LICENSE']), # no license_files attribute ({ 'setup.cfg': DALS(""" [metadata] @@ -632,7 +633,7 @@ def test_setup_cfg_license_file( """), 'MANIFEST.in': "exclude LICENSE", 'LICENSE': "Test license" - }, [], ['LICENSE']), # license file is manually excluded + }, [], ['LICENSE']), # license file is manually excluded ({ 'setup.cfg': DALS(""" [metadata] @@ -643,7 +644,7 @@ def test_setup_cfg_license_file( 'MANIFEST.in': "exclude LICENSE-XYZ", 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC'], ['LICENSE-XYZ']) # subset is manually excluded + }, ['LICENSE-ABC'], ['LICENSE-XYZ']) # subset is manually excluded ]) def test_setup_cfg_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): @@ -674,7 +675,7 @@ def test_setup_cfg_license_files( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # both empty + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # both empty ({ 'setup.cfg': DALS(""" [metadata] @@ -684,7 +685,8 @@ def test_setup_cfg_license_files( """), 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), # license_file is still singular + # license_file is still singular + }, [], ['LICENSE-ABC', 'LICENSE-XYZ']), ({ 'setup.cfg': DALS(""" [metadata] @@ -696,7 +698,7 @@ def test_setup_cfg_license_files( 'LICENSE-ABC': "ABC license", 'LICENSE-PQR': "PQR license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # combined + }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # combined ({ 'setup.cfg': DALS(""" [metadata] @@ -709,7 +711,8 @@ def test_setup_cfg_license_files( 'LICENSE-ABC': "ABC license", 'LICENSE-PQR': "PQR license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), # duplicate license + # duplicate license + }, ['LICENSE-ABC', 'LICENSE-PQR', 'LICENSE-XYZ'], []), ({ 'setup.cfg': DALS(""" [metadata] @@ -720,7 +723,8 @@ def test_setup_cfg_license_files( 'LICENSE-ABC': "ABC license", 'LICENSE-PQR': "PQR license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC', 'LICENSE-XYZ'], ['LICENSE-PQR']), # combined subset + # combined subset + }, ['LICENSE-ABC', 'LICENSE-XYZ'], ['LICENSE-PQR']), ({ 'setup.cfg': DALS(""" [metadata] @@ -730,7 +734,8 @@ def test_setup_cfg_license_files( LICENSE-PQR """), 'LICENSE-PQR': "Test license" - }, ['LICENSE-PQR'], ['LICENSE-ABC', 'LICENSE-XYZ']), # with invalid licenses + # with invalid licenses + }, ['LICENSE-PQR'], ['LICENSE-ABC', 'LICENSE-XYZ']), ({ 'setup.cfg': DALS(""" [metadata] @@ -743,7 +748,8 @@ def test_setup_cfg_license_files( 'LICENSE-ABC': "ABC license", 'LICENSE-PQR': "PQR license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']) # manually excluded + # manually excluded + }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']) ]) def test_setup_cfg_license_file_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 6242a018c4..8ee70a7ec3 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -12,7 +12,7 @@ from setuptools.dist import Distribution from .textwrap import DALS -from . import contexts + SETUP_PY = DALS(""" from setuptools import setup diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 2c35825a6b..b009fbd6f8 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -8,8 +8,6 @@ import pytest_virtualenv -from setuptools.extern import six - from .textwrap import DALS from .test_easy_install import make_nspkg_sdist @@ -64,7 +62,7 @@ def _get_pip_versions(): from urllib.request import urlopen from urllib.error import URLError except ImportError: - from urllib2 import urlopen, URLError # Python 2.7 compat + from urllib2 import urlopen, URLError # Python 2.7 compat try: urlopen('https://pypi.org', timeout=1) @@ -180,12 +178,16 @@ def sdist(distname, version): )).format(tmpdir=tmpdir)) assert tmpdir.join('success').check() + def test_test_command_install_requirements(virtualenv, tmpdir): # Ensure pip/wheel packages are installed. - virtualenv.run("python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") + virtualenv.run( + "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") _check_test_command_install_requirements(virtualenv, tmpdir) -def test_test_command_install_requirements_when_using_easy_install(bare_virtualenv, tmpdir): + +def test_test_command_install_requirements_when_using_easy_install( + bare_virtualenv, tmpdir): _check_test_command_install_requirements(bare_virtualenv, tmpdir) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 55d346c67c..39eb06eec5 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -455,7 +455,8 @@ def __repr__(self): id='empty_namespace_package', file_defs={ 'foobar': { - '__init__.py': "__import__('pkg_resources').declare_namespace(__name__)", + '__init__.py': + "__import__('pkg_resources').declare_namespace(__name__)", }, }, setup_kwargs=dict( @@ -579,4 +580,5 @@ def sys_tags(): for t in parse_tag('cp36-cp36m-manylinux1_x86_64'): yield t monkeypatch.setattr('setuptools.wheel.sys_tags', sys_tags) - assert Wheel('onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible() + assert Wheel( + 'onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible() diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 025aaa828a..ec1106a7b2 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -77,7 +77,8 @@ def tags(self): def is_compatible(self): '''Is the wheel is compatible with the current platform?''' - supported_tags = set((t.interpreter, t.abi, t.platform) for t in sys_tags()) + supported_tags = set( + (t.interpreter, t.abi, t.platform) for t in sys_tags()) return next((True for t in self.tags() if t in supported_tags), False) def egg_name(self): From 313ac58f51c6ef92170647c4cc8626043f68a26b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 13:19:31 -0500 Subject: [PATCH 7679/8469] Run flake8 tests as part of test suite. --- .flake8 | 12 ++++++++++++ pytest.ini | 7 ++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..c65806160d --- /dev/null +++ b/.flake8 @@ -0,0 +1,12 @@ +[flake8] +exclude= + .tox + setuptools/_vendor, + pkg_resources/_vendor +ignore = + # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 + W503 + # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 + W504 + setuptools/site-patch.py F821 + setuptools/py*compat.py F811 diff --git a/pytest.ini b/pytest.ini index 0bc1ec0114..904fe3363c 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,9 +1,6 @@ [pytest] -addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* -flake8-ignore = - setuptools/site-patch.py F821 - setuptools/py*compat.py F811 +addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt -r sxX +norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = # https://github.com/pypa/setuptools/issues/1823 From 5ce9e5f343ca14f9875106f37f16ad498b294183 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 13:25:45 -0500 Subject: [PATCH 7680/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 8 +++---- setuptools/__init__.py | 4 ++-- setuptools/command/build_clib.py | 30 +++++++++++++-------------- setuptools/dist.py | 2 +- setuptools/msvc.py | 2 +- setuptools/tests/__init__.py | 2 +- setuptools/tests/test_build_clib.py | 3 +-- setuptools/tests/test_config.py | 6 +++--- setuptools/tests/test_easy_install.py | 26 +++++++++++------------ setuptools/tests/test_setuptools.py | 8 +++---- setuptools/tests/test_wheel.py | 11 +++++----- 11 files changed, 51 insertions(+), 51 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7cc61bf765..918ca03449 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,10 +64,10 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, # documentclass [howto/manual]). -latex_documents = [ - ('index', 'Setuptools.tex', 'Setuptools Documentation', - 'The fellowship of the packaging', 'manual'), -] +latex_documents = [( + 'index', 'Setuptools.tex', 'Setuptools Documentation', + 'The fellowship of the packaging', 'manual', +)] link_files = { '../CHANGES.rst': dict( diff --git a/setuptools/__init__.py b/setuptools/__init__.py index b08c2f626a..07d6b6fa3b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -191,8 +191,8 @@ def ensure_string_list(self, option): ok = False if not ok: raise DistutilsOptionError( - "'%s' must be a list of strings (got %r)" - % (option, val)) + "'%s' must be a list of strings (got %r)" + % (option, val)) def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) diff --git a/setuptools/command/build_clib.py b/setuptools/command/build_clib.py index 88f0d095b8..67ce2444ea 100644 --- a/setuptools/command/build_clib.py +++ b/setuptools/command/build_clib.py @@ -25,9 +25,9 @@ def build_libraries(self, libraries): sources = build_info.get('sources') if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError( - "in 'libraries' option (library '%s'), " - "'sources' must be present and must be " - "a list of source filenames" % lib_name) + "in 'libraries' option (library '%s'), " + "'sources' must be present and must be " + "a list of source filenames" % lib_name) sources = list(sources) log.info("building '%s' library", lib_name) @@ -38,9 +38,9 @@ def build_libraries(self, libraries): obj_deps = build_info.get('obj_deps', dict()) if not isinstance(obj_deps, dict): raise DistutilsSetupError( - "in 'libraries' option (library '%s'), " - "'obj_deps' must be a dictionary of " - "type 'source: list'" % lib_name) + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) dependencies = [] # Get the global dependencies that are specified by the '' key. @@ -48,9 +48,9 @@ def build_libraries(self, libraries): global_deps = obj_deps.get('', list()) if not isinstance(global_deps, (list, tuple)): raise DistutilsSetupError( - "in 'libraries' option (library '%s'), " - "'obj_deps' must be a dictionary of " - "type 'source: list'" % lib_name) + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) # Build the list to be used by newer_pairwise_group # each source will be auto-added to its dependencies. @@ -60,16 +60,16 @@ def build_libraries(self, libraries): extra_deps = obj_deps.get(source, list()) if not isinstance(extra_deps, (list, tuple)): raise DistutilsSetupError( - "in 'libraries' option (library '%s'), " - "'obj_deps' must be a dictionary of " - "type 'source: list'" % lib_name) + "in 'libraries' option (library '%s'), " + "'obj_deps' must be a dictionary of " + "type 'source: list'" % lib_name) src_deps.extend(extra_deps) dependencies.append(src_deps) expected_objects = self.compiler.object_filenames( - sources, - output_dir=self.build_temp - ) + sources, + output_dir=self.build_temp, + ) if ( newer_pairwise_group(dependencies, expected_objects) diff --git a/setuptools/dist.py b/setuptools/dist.py index fe5adf4607..ad54839b0f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -162,7 +162,7 @@ def write_field(key, value): if self.download_url: write_field('Download-URL', self.download_url) for project_url in self.project_urls.items(): - write_field('Project-URL', '%s, %s' % project_url) + write_field('Project-URL', '%s, %s' % project_url) long_desc = rfc822_escape(self.get_long_description()) write_field('Description', long_desc) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index fa88c4e87d..c2cbd1e543 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -544,7 +544,7 @@ def __init__(self, registry_info, vc_ver=None): # Except for VS15+, VC version is aligned with VS version self.vs_ver = self.vc_ver = ( - vc_ver or self._find_latest_available_vs_ver()) + vc_ver or self._find_latest_available_vs_ver()) def _find_latest_available_vs_ver(self): """ diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 5f4a1c2958..9c77b51f8d 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -6,7 +6,7 @@ __all__ = [ - 'fail_on_ascii', 'py2_only', 'py3_only' + 'fail_on_ascii', 'py2_only', 'py3_only' ] diff --git a/setuptools/tests/test_build_clib.py b/setuptools/tests/test_build_clib.py index 3779e679ea..48bea2b43d 100644 --- a/setuptools/tests/test_build_clib.py +++ b/setuptools/tests/test_build_clib.py @@ -8,8 +8,7 @@ class TestBuildCLib: @mock.patch( - 'setuptools.command.build_clib.newer_pairwise_group' - ) + 'setuptools.command.build_clib.newer_pairwise_group') def test_build_libraries(self, mock_newer): dist = Distribution() cmd = build_clib(dist) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 69d8d00db3..2fa0b374e2 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -695,7 +695,7 @@ def test_find_directive(self, tmpdir): ) with get_dist(tmpdir) as dist: assert set(dist.packages) == set( - ['fake_package', 'fake_package.sub_two']) + ['fake_package', 'fake_package.sub_two']) @py2_only def test_find_namespace_directive_fails_on_py2(self, tmpdir): @@ -748,7 +748,7 @@ def test_find_namespace_directive(self, tmpdir): ) with get_dist(tmpdir) as dist: assert set(dist.packages) == { - 'fake_package', 'fake_package.sub_two' + 'fake_package', 'fake_package.sub_two' } def test_extras_require(self, tmpdir): @@ -881,7 +881,7 @@ def _fake_distribution_init(self, dist, attrs): return None @patch.object(_Distribution, '__init__', autospec=True) - def test_external_setters(self, mock_parent_init, tmpdir): + def test_external_setters(self, mock_parent_init, tmpdir): mock_parent_init.side_effect = self._fake_distribution_init dist = Distribution(attrs={ diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 30e79fec67..534392b99d 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -629,7 +629,7 @@ def make_dependency_sdist(dist_path, distname, version): test_pkg = create_setup_requires_package( temp_dir, setup_attrs=dict(version='attr: foobar.version'), make_package=make_dependency_sdist, - use_setup_cfg=use_setup_cfg+('version',), + use_setup_cfg=use_setup_cfg + ('version',), ) test_setup_py = os.path.join(test_pkg, 'setup.py') with contexts.quiet() as (stdout, stderr): @@ -905,8 +905,8 @@ def make_python_requires_sdist(dist_path, distname, version, python_requires): python_requires={python_requires!r}, ) """).format( - name=distname, version=version, - python_requires=python_requires)), + name=distname, version=version, + python_requires=python_requires)), ('setup.cfg', ''), ]) @@ -965,16 +965,16 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', value = ';'.join(value) section.append('%s: %s' % (name, value)) test_setup_cfg_contents = DALS( - """ - [metadata] - {metadata} - [options] - {options} - """ - ).format( - options='\n'.join(options), - metadata='\n'.join(metadata), - ) + """ + [metadata] + {metadata} + [options] + {options} + """ + ).format( + options='\n'.join(options), + metadata='\n'.join(metadata), + ) else: test_setup_cfg_contents = '' with open(os.path.join(test_pkg, 'setup.cfg'), 'w') as f: diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 5896a69ae6..0da19b0e64 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -223,10 +223,10 @@ def setup_method(self, method): py_modules=['bar_et'], remove=['bar.ext'], ), 'baz': Feature( - "baz", optional=False, packages=['pkg.baz'], - scripts=['scripts/baz_it'], - libraries=[('libfoo', 'foo/foofoo.c')] - ), + "baz", optional=False, packages=['pkg.baz'], + scripts=['scripts/baz_it'], + libraries=[('libfoo', 'foo/foofoo.c')] + ), 'dwim': Feature("DWIM", available=False, remove='bazish'), }, script_args=['--without-bar', 'install'], diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 39eb06eec5..f72ccbbf32 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -125,11 +125,12 @@ def flatten_tree(tree): def format_install_tree(tree): - return {x.format( - py_version=PY_MAJOR, - platform=get_platform(), - shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO')) - for x in tree} + return { + x.format( + py_version=PY_MAJOR, + platform=get_platform(), + shlib_ext=get_config_var('EXT_SUFFIX') or get_config_var('SO')) + for x in tree} def _check_wheel_install(filename, install_dir, install_tree_includes, From 7cfeee80514bbdcd91b5dfbb937a9848ba4b7cf3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 14:42:56 -0500 Subject: [PATCH 7681/8469] Extract 'find_spec' function to consolidate behavior. Ref #1905. --- setuptools/_imp.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setuptools/_imp.py b/setuptools/_imp.py index 6ccec57993..451e45a831 100644 --- a/setuptools/_imp.py +++ b/setuptools/_imp.py @@ -17,12 +17,18 @@ PY_FROZEN = 7 +def find_spec(module, paths): + finder = ( + importlib.machinery.PathFinder().find_spec + if isinstance(paths, list) else + importlib.util.find_spec + ) + return finder(module, paths) + + def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" - if isinstance(paths, list): - spec = importlib.machinery.PathFinder().find_spec(module, paths) - else: - spec = importlib.util.find_spec(module, paths) + spec = find_spec(module, paths) if spec is None: raise ImportError("Can't find %s" % module) if not spec.has_location and hasattr(spec, 'submodule_search_locations'): @@ -63,20 +69,14 @@ def find_module(module, paths=None): def get_frozen_object(module, paths=None): - if isinstance(paths, list): - spec = importlib.machinery.PathFinder().find_spec(module, paths) - else: - spec = importlib.util.find_spec(module, paths) + spec = find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return spec.loader.get_code(module) def get_module(module, paths, info): - if isinstance(paths, list): - spec = importlib.machinery.PathFinder().find_spec(module, paths) - else: - spec = importlib.util.find_spec(module, paths) + spec = find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return module_from_spec(spec) From 20992988b5aec97062de8138b3c3737a38139b30 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 14:50:51 -0500 Subject: [PATCH 7682/8469] Add changelog entry. Ref #1905. --- changelog.d/1905.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1905.change.rst diff --git a/changelog.d/1905.change.rst b/changelog.d/1905.change.rst new file mode 100644 index 0000000000..7b73898cce --- /dev/null +++ b/changelog.d/1905.change.rst @@ -0,0 +1 @@ +Fixed test failure introduced in 41.6.0 when the 'tests' directory is not present. From 6b2490cd12e7e520b807ac35a084afd7bf3d912d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 14:55:21 -0500 Subject: [PATCH 7683/8469] Separate test for 'is_present' into its own test and add a TODO about this behavior being apparently unused. --- setuptools/tests/test_setuptools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 0da19b0e64..bca69c3014 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -108,6 +108,11 @@ def testRequire(self): assert not req.is_present() assert not req.is_current() + @needs_bytecode + def test_require_present(self): + # In #1896, this test was failing for months with the only + # complaint coming from test runners (not end users). + # TODO: Evaluate if this code is needed at all. req = Require('Tests', None, 'tests', homepage="http://example.com") assert req.format is None assert req.attribute is None From 7cd8b4966a6e7186ff45fe1f1c09a58f8a678113 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 15:05:08 -0500 Subject: [PATCH 7684/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setuptools/tests/test_dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index b93ef148e9..6e8c45fd30 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -61,7 +61,8 @@ def sdist_with_index(distname, version): dist.fetch_build_egg(r) for r in reqs ] - assert [dist.key for dist in resolved_dists if dist] == reqs + # noqa below because on Python 2 it causes flakes + assert [dist.key for dist in resolved_dists if dist] == reqs # noqa def test_dist__get_unpatched_deprecated(): From 6d4e23882a5b1e1f31fb452aaad9d19cf0d02604 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 14:06:35 -0500 Subject: [PATCH 7685/8469] Move test dependencies to package metadata. --- setup.cfg | 13 +++++++++++++ tests/requirements.txt | 12 ------------ tools/tox_pip.py | 20 +++++++++++++++++++- tox.ini | 3 ++- 4 files changed, 34 insertions(+), 14 deletions(-) delete mode 100644 tests/requirements.txt diff --git a/setup.cfg b/setup.cfg index bef019eed8..87c25a62e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,3 +57,16 @@ ssl = wincertstore==0.2; sys_platform=='win32' certs = certifi==2016.9.26 +tests = + mock + pytest-flake8 + flake8-2020; python_version>="3.6" + virtualenv>=13.0.0 + pytest-virtualenv>=1.2.7 + pytest>=3.7 + wheel + coverage>=4.5.1 + pytest-cov>=2.5.1 + paver; python_version>="3.6" + futures; python_version=="2.7" + pip>=19.1 # For proper file:// URLs support. diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 19bf5aefd0..0000000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -mock -pytest-flake8 -flake8-2020; python_version>="3.6" -virtualenv>=13.0.0 -pytest-virtualenv>=1.2.7 -pytest>=3.7 -wheel -coverage>=4.5.1 -pytest-cov>=2.5.1 -paver; python_version>="3.6" -futures; python_version=="2.7" -pip>=19.1 # For proper file:// URLs support. diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 2d33e9e505..1b7eeda508 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -1,6 +1,7 @@ import os import subprocess import sys +import re def remove_setuptools(): @@ -20,12 +21,29 @@ def bootstrap(): subprocess.check_call(cmd) +def is_install_self(args): + """ + Do the args represent an install of .? + """ + def strip_extras(arg): + match = re.match(r'(.*)?\[.*\]$', arg) + return match.group(1) if match else arg + + return ( + 'install' in args + and any( + arg in ['.', os.getcwd()] + for arg in map(strip_extras, args) + ) + ) + + def pip(args): # Honor requires-python when installing test suite dependencies if any('-r' in arg for arg in args): os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = '0' - if '.' in args: + if is_install_self(args): remove_setuptools() bootstrap() diff --git a/tox.ini b/tox.ini index a70dff871c..aeae13ce18 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,6 @@ requires = pip = python {toxinidir}/tools/tox_pip.py [testenv] -deps=-r{toxinidir}/tests/requirements.txt pip_version = pip install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all @@ -25,6 +24,8 @@ setenv = passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} usedevelop=True +extras = + tests [testenv:coverage] From 548adff948383937d94ca823ca6c1367ec331b62 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 12:45:18 +0100 Subject: [PATCH 7686/8469] Use `python-version` in setup-python action Before this change, a deprecated `version` arg was used. --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 8941b359e0..a1e3d95b13 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: - version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} - name: Upgrade pip/setuptools/wheel run: >- python From 5a5adf2df3ff231092a78df26cea965a41a4f47f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 12:46:15 +0100 Subject: [PATCH 7687/8469] Bump setup-python action to v1.1.1 --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index a1e3d95b13..0801767fa6 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@master - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v1.1.1 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip/setuptools/wheel From 69ef612202e8ca5996865f23d9a4c935229b652b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 12:51:20 +0100 Subject: [PATCH 7688/8469] Cache Pip dists in GH Actions CI/CD workflows --- .github/workflows/python-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 0801767fa6..64d4a0d6ee 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -33,6 +33,14 @@ jobs: uses: actions/setup-python@v1.1.1 with: python-version: ${{ matrix.python-version }} + - name: Cache pip + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}-${{ hashFiles('tests/requirements.txt') }}-${{ hashFiles('tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- - name: Upgrade pip/setuptools/wheel run: >- python From 76754734f3f9dfc0817b3829c36dd6dca61c926c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 13:10:19 +0100 Subject: [PATCH 7689/8469] Switch to using the latest Ubuntu --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 64d4a0d6ee..ebfe6b1810 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -19,7 +19,7 @@ jobs: - 3.6 - 3.5 os: - - ubuntu-18.04 + - ubuntu-latest - ubuntu-16.04 - macOS-latest # - windows-2019 From 5a30a9c44c2027331370cdf388a29d3de28790c2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 14:12:52 +0100 Subject: [PATCH 7690/8469] Disable tox's parallel spinner --- .github/workflows/python-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index ebfe6b1810..12ef645b7e 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -27,6 +27,9 @@ jobs: env: - TOXENV: python + env: + TOX_PARALLEL_NO_SPINNER: 1 + steps: - uses: actions/checkout@master - name: Set up Python ${{ matrix.python-version }} From 347f319bb642af203301cc93d4c3591bbaac635c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 14:16:37 +0100 Subject: [PATCH 7691/8469] Log Python version in CI --- .github/workflows/python-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 12ef645b7e..f5437b5e23 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -36,6 +36,9 @@ jobs: uses: actions/setup-python@v1.1.1 with: python-version: ${{ matrix.python-version }} + - name: Log Python version + run: >- + python --version - name: Cache pip uses: actions/cache@v1 with: From 1b0d1f65a956cee5cdf3236778fc051c962a678e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 14:36:09 +0100 Subject: [PATCH 7692/8469] Log Python location in CI --- .github/workflows/python-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index f5437b5e23..b1f9494678 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -39,6 +39,9 @@ jobs: - name: Log Python version run: >- python --version + - name: Log Python location + run: >- + which python - name: Cache pip uses: actions/cache@v1 with: From f4be7cfe1a897b443b998de932d1cd14e653a629 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 13:02:14 +0100 Subject: [PATCH 7693/8469] Fix running tests under Python 2 As per #1961. P.S. Using `contains(['2.7', 'pypy2'], matrix.python-version)` does not work even though https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#contains promises arrays to be supported. --- .github/workflows/python-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index b1f9494678..7b1dcac633 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -76,11 +76,13 @@ jobs: - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' run: | + ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version || 'pypy2' == matrix.python-version) && 'py27' || '$TOXENV' }} python -m tox --parallel auto --notest --skip-missing-interpreters false env: ${{ matrix.env }} - name: Test with tox run: | ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 + ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version || 'pypy2' == matrix.python-version) && 'py27' || '$TOXENV' }} python -m tox \ --parallel 0 \ -- \ From f8af062c7345e6aaf82eed9a5fdf9f04c68d275f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 12:46:34 +0100 Subject: [PATCH 7694/8469] =?UTF-8?q?Add=20PyPy=20=F0=9F=90=8D=20jobs=20to?= =?UTF-8?q?=20Actions=20CI/CD=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 7b1dcac633..286e022c87 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -15,6 +15,7 @@ jobs: matrix: python-version: - 3.8 + - pypy3 - 3.7 - 3.6 - 3.5 From 53d1343eacf565be5bf885960989c106accfb691 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 13:46:08 +0100 Subject: [PATCH 7695/8469] Support PyPy2 --- .github/workflows/python-tests.yml | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 286e022c87..4dc997e56f 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -77,13 +77,13 @@ jobs: - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' run: | - ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version || 'pypy2' == matrix.python-version) && 'py27' || '$TOXENV' }} + ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} python -m tox --parallel auto --notest --skip-missing-interpreters false env: ${{ matrix.env }} - name: Test with tox run: | ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 - ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version || 'pypy2' == matrix.python-version) && 'py27' || '$TOXENV' }} + ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} python -m tox \ --parallel 0 \ -- \ diff --git a/tox.ini b/tox.ini index a70dff871c..683b14541b 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} - py27: PIP_IGNORE_REQUIRES_PYTHON=true + py{27,py2}: PIP_IGNORE_REQUIRES_PYTHON=true # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED From d83f1b864492279ed11ddd9715b15805fc6b39d0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 14 Jan 2020 14:20:54 +0100 Subject: [PATCH 7696/8469] Set TOXENV to pypy3 on macOS @ GH Actions CI/CD --- .github/workflows/python-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 4dc997e56f..4c02a1dbc1 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -78,12 +78,16 @@ jobs: - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' run: | ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} + ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} + echo TOXENV="$TOXENV" python -m tox --parallel auto --notest --skip-missing-interpreters false env: ${{ matrix.env }} - name: Test with tox run: | ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} + ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} + echo TOXENV="$TOXENV" python -m tox \ --parallel 0 \ -- \ From 673e62b219cf6adbb2139bbec1c53f6d89d3c60f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 20 Jan 2020 03:08:08 +0100 Subject: [PATCH 7697/8469] Simplify GH Actions tests workflow --- .github/workflows/python-tests.yml | 48 +++++++++++++++++------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 4c02a1dbc1..3c2aca3463 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -1,4 +1,6 @@ -name: Test suite +name: >- + 👷 + Test suite on: push: @@ -8,7 +10,10 @@ on: jobs: tests: - name: 👷 + name: >- + ${{ matrix.python-version }} + / + ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: # max-parallel: 5 @@ -25,11 +30,10 @@ jobs: - macOS-latest # - windows-2019 # - windows-2016 - env: - - TOXENV: python env: TOX_PARALLEL_NO_SPINNER: 1 + TOXENV: python steps: - uses: actions/checkout@master @@ -43,7 +47,10 @@ jobs: - name: Log Python location run: >- which python - - name: Cache pip + - name: Log Python env + run: >- + python -m sysconfig + - name: Pip cache uses: actions/cache@v1 with: path: ~/.cache/pip @@ -64,10 +71,13 @@ jobs: - name: Log installed dists run: >- python -m pip freeze --all + - name: Adjust TOXENV for PyPy + if: startsWith(matrix.python-version, 'pypy') + run: >- + echo "::set-env name=TOXENV::${{ matrix.python-version }}" - name: Log env vars run: >- env - env: ${{ matrix.env }} - name: Verify that there's no cached Python modules in sources if: >- @@ -76,20 +86,16 @@ jobs: ! grep pyc setuptools.egg-info/SOURCES.txt - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' - run: | - ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} - ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} - echo TOXENV="$TOXENV" - python -m tox --parallel auto --notest --skip-missing-interpreters false - env: ${{ matrix.env }} + run: >- + python -m + tox + --parallel auto + --notest + --skip-missing-interpreters false - name: Test with tox - run: | - ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 - ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} - ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} - echo TOXENV="$TOXENV" - python -m tox \ - --parallel 0 \ - -- \ + run: >- + python -m + tox + --parallel auto + -- --cov - env: ${{ matrix.env }} From 8414998c9c026659144065ab0a8cb2e2956e5a46 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 20 Jan 2020 03:10:27 +0100 Subject: [PATCH 7698/8469] Add back NETWORK_REQUIRED env var --- .github/workflows/python-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 3c2aca3463..9d24a54a0d 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -32,6 +32,7 @@ jobs: # - windows-2016 env: + NETWORK_REQUIRED: 1 TOX_PARALLEL_NO_SPINNER: 1 TOXENV: python From 3a60d1de2d4b9cdf330158fd708dde3c23d6b344 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Jan 2020 09:31:59 -0500 Subject: [PATCH 7699/8469] Clarify subject of change. Ref #1905. --- changelog.d/1905.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1905.change.rst b/changelog.d/1905.change.rst index 7b73898cce..f0e07a18c1 100644 --- a/changelog.d/1905.change.rst +++ b/changelog.d/1905.change.rst @@ -1 +1 @@ -Fixed test failure introduced in 41.6.0 when the 'tests' directory is not present. +Fixed defect in _imp, introduced in 41.6.0 when the 'tests' directory is not present. From d92f778b6c88c8a36c4aecac9543d9297c425096 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Jan 2020 10:34:25 -0500 Subject: [PATCH 7700/8469] Rewrite selective PIP_IGNORE_REQUIRES_PYTHON to allow test dependencies in metadata to be installed without ignoring REQUIRES_PYTHON --- setuptools/tests/test_virtualenv.py | 11 ++++++++ tools/tox_pip.py | 39 +++++++++++++++++++++++------ tox.ini | 1 - 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index b009fbd6f8..6549a6c01a 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -12,6 +12,17 @@ from .test_easy_install import make_nspkg_sdist +@pytest.fixture(autouse=True) +def disable_requires_python(monkeypatch): + """ + Disable Requires-Python on Python 2.7 + """ + if sys.version_info > (3,): + return + + monkeypatch.setenv('PIP_IGNORE_REQUIRES_PYTHON', 'true') + + @pytest.fixture(autouse=True) def pytest_virtualenv_works(virtualenv): """ diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 1b7eeda508..6f457bb2ea 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -38,18 +38,43 @@ def strip_extras(arg): ) -def pip(args): - # Honor requires-python when installing test suite dependencies - if any('-r' in arg for arg in args): - os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = '0' +def pip(*args): + cmd = [sys.executable, '-m', 'pip'] + list(args) + return subprocess.check_call(cmd) + +def test_dependencies(): + from ConfigParser import ConfigParser + + def clean(dep): + spec, _, _ = dep.partition('#') + return spec.strip() + + parser = ConfigParser() + parser.read('setup.cfg') + raw = parser.get('options.extras_require', 'tests').split('\n') + return filter(None, map(clean, raw)) + + +def disable_python_requires(): + """ + On Python 2, install the dependencies that are selective + on Python version while honoring REQUIRES_PYTHON, then + disable REQUIRES_PYTHON so that pip can install this + checkout of setuptools. + """ + pip('install', *test_dependencies()) + os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = 'true' + + +def run(args): if is_install_self(args): remove_setuptools() bootstrap() + sys.version_info > (3,) or disable_python_requires() - cmd = [sys.executable, '-m', 'pip'] + args - subprocess.check_call(cmd) + pip(*args) if __name__ == '__main__': - pip(sys.argv[1:]) + run(sys.argv[1:]) diff --git a/tox.ini b/tox.ini index aeae13ce18..a5ce930f24 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,6 @@ install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} - py27: PIP_IGNORE_REQUIRES_PYTHON=true # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED From f9e279df7d75f2bfcba92c3393c4c64e25e6dcb7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Jan 2020 11:31:23 -0500 Subject: [PATCH 7701/8469] Move test dependencies into the package, removing 'tests' directory which masks the error reported in #1896. --- {tests => setuptools/tests}/requirements.txt | 0 tox.ini | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {tests => setuptools/tests}/requirements.txt (100%) diff --git a/tests/requirements.txt b/setuptools/tests/requirements.txt similarity index 100% rename from tests/requirements.txt rename to setuptools/tests/requirements.txt diff --git a/tox.ini b/tox.ini index e0eef95a45..048e6ea278 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ envlist=python [testenv] -deps=-rtests/requirements.txt +deps=-rsetuptools/tests/requirements.txt # Changed from default (`python -m pip ...`) # to prevent the current working directory # from being added to `sys.path`. From 461ea400887a576dba102816f72af1d6966e1768 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 20 Jan 2020 22:09:46 -0500 Subject: [PATCH 7702/8469] Opt into PEP 517 for pip installs to avoid implicit dependency on Setuptools to install test dependencies. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index a5ce930f24..3eb408cc1f 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} + PIP_USE_PEP517=1 # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED From 620bd62c00985b551dde326619a6c895d7c80e63 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Jan 2020 22:07:49 -0500 Subject: [PATCH 7703/8469] Set PIP_USE_PEP517 in installer command so as not to influence the tests with that setting. --- tools/tox_pip.py | 2 ++ tox.ini | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 6f457bb2ea..9fe4f905c7 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -68,6 +68,8 @@ def disable_python_requires(): def run(args): + os.environ['PIP_USE_PEP517'] = 'true' + if is_install_self(args): remove_setuptools() bootstrap() diff --git a/tox.ini b/tox.ini index 3eb408cc1f..a5ce930f24 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,6 @@ install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} - PIP_USE_PEP517=1 # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED From 641e088d193142f236d69c78d272cf7ece0d693c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 21 Jan 2020 22:38:03 -0500 Subject: [PATCH 7704/8469] Move docs dependencies into package metadata and use same technique as jaraco/skeleton to build docs in tox and rtd. --- .github/workflows/python-tests.yml | 2 +- .readthedocs.yml | 5 +++-- docs/requirements.txt | 5 ----- setup.cfg | 7 +++++++ tox.ini | 10 +++++----- 5 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 60765b522a..e3663cf0b8 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -55,7 +55,7 @@ jobs: uses: actions/cache@v1 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}-${{ hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} restore-keys: | ${{ runner.os }}-pip- ${{ runner.os }}- diff --git a/.readthedocs.yml b/.readthedocs.yml index 3aef6b6be4..7b994a3579 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,4 +1,5 @@ python: version: 3 - requirements_file: docs/requirements.txt - pip_install: false + extra_requirements: + - docs + pip_install: true diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index bc27165b22..0000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx!=1.8.0 -rst.linker>=1.9 -jaraco.packaging>=6.1 - -setuptools>=34 diff --git a/setup.cfg b/setup.cfg index 87c25a62e4..bc34b22c4d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,8 +55,10 @@ exclude = *.tests [options.extras_require] ssl = wincertstore==0.2; sys_platform=='win32' + certs = certifi==2016.9.26 + tests = mock pytest-flake8 @@ -70,3 +72,8 @@ tests = paver; python_version>="3.6" futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. + +docs = + sphinx + jaraco.packaging>=6.1 + rst.linker>=1.9 diff --git a/tox.ini b/tox.ini index a5ce930f24..2164599f8e 100644 --- a/tox.ini +++ b/tox.ini @@ -44,12 +44,12 @@ skip_install=True commands=codecov -X gcov --file {toxworkdir}/coverage.xml [testenv:docs] -deps = -r{toxinidir}/docs/requirements.txt -skip_install=True +extras = + docs + testing +changedir = docs commands = - python -m bootstrap - sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html - sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man + python -m sphinx . {toxinidir}/build/html [coverage:run] source= From 60da370778026872e44d44c3a0429bfc2b242504 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 3 Feb 2020 15:05:14 +0100 Subject: [PATCH 7705/8469] Fix install_scripts() if bdist_wininst is missing Closes #1985 --- setuptools/command/install_scripts.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 16234273a2..8c9a15e2bb 100644 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -32,8 +32,11 @@ def run(self): ) bs_cmd = self.get_finalized_command('build_scripts') exec_param = getattr(bs_cmd, 'executable', None) - bw_cmd = self.get_finalized_command("bdist_wininst") - is_wininst = getattr(bw_cmd, '_is_running', False) + try: + bw_cmd = self.get_finalized_command("bdist_wininst") + is_wininst = getattr(bw_cmd, '_is_running', False) + except ImportError: + is_wininst = False writer = ei.ScriptWriter if is_wininst: exec_param = "python.exe" From 91ede46d247291a5e5449403880c15a2674ebcb5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 4 Feb 2020 05:34:17 -0500 Subject: [PATCH 7706/8469] Add changelog entry. --- changelog.d/1981.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1981.change.rst diff --git a/changelog.d/1981.change.rst b/changelog.d/1981.change.rst new file mode 100644 index 0000000000..c5713d9b62 --- /dev/null +++ b/changelog.d/1981.change.rst @@ -0,0 +1 @@ +Setuptools now declares its ``tests`` and ``docs`` dependencies in metadata (extras). From daf18dd027a08dd318f348e12e75e9f4d8aaed0a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 4 Feb 2020 16:24:30 +0100 Subject: [PATCH 7707/8469] bpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit_*" symbol names in distutils (GH-18150) Make it export the correct init symbol also on Windows. https://bugs.python.org/issue39432 --- command/build_ext.py | 10 +++++++++- tests/test_build_ext.py | 13 +++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/command/build_ext.py b/command/build_ext.py index 38bb8fd93c..1a9bd1200f 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -689,7 +689,15 @@ def get_export_symbols(self, ext): provided, "PyInit_" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "PyInit_" function. """ - initfunc_name = "PyInit_" + ext.name.split('.')[-1] + suffix = '_' + ext.name.split('.')[-1] + try: + # Unicode module name support as defined in PEP-489 + # https://www.python.org/dev/peps/pep-0489/#export-hook-name + suffix.encode('ascii') + except UnicodeEncodeError: + suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii') + + initfunc_name = "PyInit" + suffix if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 52d36b2484..7e3eafa8ef 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -304,6 +304,19 @@ def test_get_source_files(self): cmd.ensure_finalized() self.assertEqual(cmd.get_source_files(), ['xxx']) + def test_unicode_module_names(self): + modules = [ + Extension('foo', ['aaa'], optional=False), + Extension('föö', ['uuu'], optional=False), + ] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + self.assertRegex(cmd.get_ext_filename(modules[0].name), r'foo\..*') + self.assertRegex(cmd.get_ext_filename(modules[1].name), r'föö\..*') + self.assertEqual(cmd.get_export_symbols(modules[0]), ['PyInit_foo']) + self.assertEqual(cmd.get_export_symbols(modules[1]), ['PyInitU_f_gkaa']) + def test_compiler_option(self): # cmd.compiler is an option and # should not be overridden by a compiler instance From b0ecd44b1011db9c562019caec7e4ba2750ce4a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Feb 2020 18:50:05 -0500 Subject: [PATCH 7708/8469] Update changelog. --- changelog.d/1985.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1985.change.rst diff --git a/changelog.d/1985.change.rst b/changelog.d/1985.change.rst new file mode 100644 index 0000000000..33698b8874 --- /dev/null +++ b/changelog.d/1985.change.rst @@ -0,0 +1 @@ +Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9). From 131482820238cb060b38e7e55bffabea4f0a3a0e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:15:42 -0500 Subject: [PATCH 7709/8469] Add azure pipelines from jaraco/skeleton --- azure-pipelines.yml | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..3e80bf443d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,71 @@ +# Create the project in Azure with: +# az devops project create --name $name --organization https://dev.azure.com/$org/ --visibility public +# then configure the pipelines (through web UI) + +trigger: + branches: + include: + - '*' + tags: + include: + - '*' + +pool: + vmimage: 'Ubuntu-18.04' + +variables: +- group: Azure secrets + +stages: +- stage: Test + jobs: + + - job: 'Test' + strategy: + matrix: + Python36: + python.version: '3.6' + Python38: + python.version: '3.8' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: python -m pip install tox + displayName: 'Install tox' + + - script: | + tox -- --junit-xml=test-results.xml + displayName: 'run tests' + + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test-results.xml' + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() + +- stage: Publish + dependsOn: Test + jobs: + - job: 'Publish' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.8' + architecture: 'x64' + + - script: python -m pip install tox + displayName: 'Install tox' + + - script: | + tox -e release + env: + TWINE_PASSWORD: $(PyPI-token) + displayName: 'publish to PyPI' + + condition: contains(variables['Build.SourceBranch'], 'tags') From d6bd6b1ea7efff2df20ca970de45fb0c2fe701e7 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 6 Feb 2020 15:48:10 +1100 Subject: [PATCH 7710/8469] bpo-39555: Fix distutils test to handle _d suffix on Windows debug build (GH-18357) --- tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 7e3eafa8ef..5e47e0773a 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -312,8 +312,8 @@ def test_unicode_module_names(self): dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = self.build_ext(dist) cmd.ensure_finalized() - self.assertRegex(cmd.get_ext_filename(modules[0].name), r'foo\..*') - self.assertRegex(cmd.get_ext_filename(modules[1].name), r'föö\..*') + self.assertRegex(cmd.get_ext_filename(modules[0].name), r'foo(_d)?\..*') + self.assertRegex(cmd.get_ext_filename(modules[1].name), r'föö(_d)?\..*') self.assertEqual(cmd.get_export_symbols(modules[0]), ['PyInit_foo']) self.assertEqual(cmd.get_export_symbols(modules[1]), ['PyInitU_f_gkaa']) From 0559f17d4588553eb428d57ecfebab9e0e988e65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:54:02 -0500 Subject: [PATCH 7711/8469] Bootstrap the environment in tox, allowing simple 'tox' to run tests and simplifying all of the pipelines. --- .travis.yml | 2 -- appveyor.yml | 1 - docs/conf.py | 2 +- docs/developer-guide.txt | 8 ++------ tools/tox_pip.py | 11 +++++++++-- tox.ini | 4 +--- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 501a0b69ce..3ad310b37f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,6 @@ install: - pip freeze --all - env -# update egg_info based on setup.py in checkout -- python bootstrap.py - "! grep pyc setuptools.egg-info/SOURCES.txt" script: diff --git a/appveyor.yml b/appveyor.yml index 0881806968..02fe1ee565 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,6 @@ test_script: - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel - pip install --upgrade tox tox-venv virtualenv - pip freeze --all - - python bootstrap.py - tox -- --cov after_test: diff --git a/docs/conf.py b/docs/conf.py index cbd19fb470..6f6ae13a60 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # hack to run the bootstrap script so that jaraco.packaging.sphinx # can invoke setup.py 'READTHEDOCS' in os.environ and subprocess.check_call( - [sys.executable, 'bootstrap.py'], + [sys.executable, '-m', 'bootstrap'], cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), ) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index d145fba140..0b4ae4d4c3 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -104,12 +104,8 @@ from the command line after pushing a new branch. Testing ------- -The primary tests are run using tox. To run the tests, first create the metadata -needed to run the tests:: - - $ python bootstrap.py - -Then make sure you have tox installed, and invoke it:: +The primary tests are run using tox. Make sure you have tox installed, +and invoke it:: $ tox diff --git a/tools/tox_pip.py b/tools/tox_pip.py index f592e41285..ba776638d6 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -13,9 +13,16 @@ def remove_setuptools(): subprocess.check_call(cmd, cwd='.tox') +def bootstrap(): + print("Running bootstrap") + cmd = [sys.executable, '-m', 'bootstrap'] + subprocess.check_call(cmd) + + def pip(args): - # When installing '.', remove setuptools - '.' in args and remove_setuptools() + if '.' in args: + remove_setuptools() + bootstrap() cmd = [sys.executable, '-m', 'pip'] + args subprocess.check_call(cmd) diff --git a/tox.ini b/tox.ini index a666f0afb7..ddfeddf96f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,3 @@ -# Note: Run "python bootstrap.py" before running Tox, to generate metadata. -# # To run Tox against all supported Python interpreters, you can set: # # export TOXENV='py27,py3{5,6,7,8},pypy,pypy3' @@ -47,7 +45,7 @@ commands=codecov -X gcov --file {toxworkdir}/coverage.xml deps = -r{toxinidir}/docs/requirements.txt skip_install=True commands = - python {toxinidir}/bootstrap.py + python -m bootstrap sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man From a5dec2f14e3414e4ee5dd146bff9c289d573de9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Feb 2020 23:18:21 -0500 Subject: [PATCH 7712/8469] =?UTF-8?q?Bump=20version:=2045.1.0=20=E2=86=92?= =?UTF-8?q?=2045.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 13 +++++++++++++ changelog.d/1905.change.rst | 1 - changelog.d/1941.change.rst | 4 ---- changelog.d/1968.misc.rst | 1 - changelog.d/1981.change.rst | 1 - changelog.d/1985.change.rst | 1 - setup.cfg | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 changelog.d/1905.change.rst delete mode 100644 changelog.d/1941.change.rst delete mode 100644 changelog.d/1968.misc.rst delete mode 100644 changelog.d/1981.change.rst delete mode 100644 changelog.d/1985.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ef8a387751..8e86f31f09 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 45.1.0 +current_version = 45.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 198854fc24..f97f514208 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +v45.2.0 +------- + +* #1905: Fixed defect in _imp, introduced in 41.6.0 when the 'tests' directory is not present. +* #1941: Improve editable installs with PEP 518 build isolation: + + * The ``--user`` option is now always available. A warning is issued if the user site directory is not available. + * The error shown when the install directory is not in ``PYTHONPATH`` has been turned into a warning. +* #1981: Setuptools now declares its ``tests`` and ``docs`` dependencies in metadata (extras). +* #1985: Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9). +* #1968: Add flake8-2020 to check for misuse of sys.version or sys.version_info. + + v45.1.0 ------- diff --git a/changelog.d/1905.change.rst b/changelog.d/1905.change.rst deleted file mode 100644 index f0e07a18c1..0000000000 --- a/changelog.d/1905.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed defect in _imp, introduced in 41.6.0 when the 'tests' directory is not present. diff --git a/changelog.d/1941.change.rst b/changelog.d/1941.change.rst deleted file mode 100644 index a41cdcfe6e..0000000000 --- a/changelog.d/1941.change.rst +++ /dev/null @@ -1,4 +0,0 @@ -Improve editable installs with PEP 518 build isolation: - -* The ``--user`` option is now always available. A warning is issued if the user site directory is not available. -* The error shown when the install directory is not in ``PYTHONPATH`` has been turned into a warning. diff --git a/changelog.d/1968.misc.rst b/changelog.d/1968.misc.rst deleted file mode 100644 index 4aa5343f4b..0000000000 --- a/changelog.d/1968.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Add flake8-2020 to check for misuse of sys.version or sys.version_info. diff --git a/changelog.d/1981.change.rst b/changelog.d/1981.change.rst deleted file mode 100644 index c5713d9b62..0000000000 --- a/changelog.d/1981.change.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools now declares its ``tests`` and ``docs`` dependencies in metadata (extras). diff --git a/changelog.d/1985.change.rst b/changelog.d/1985.change.rst deleted file mode 100644 index 33698b8874..0000000000 --- a/changelog.d/1985.change.rst +++ /dev/null @@ -1 +0,0 @@ -Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9). diff --git a/setup.cfg b/setup.cfg index bc34b22c4d..8cca64774d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 45.1.0 +version = 45.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 8e5f7c22088ad8ee03096d1e591449bed2f14e44 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 10 Feb 2020 15:26:40 +0200 Subject: [PATCH 7713/8469] bpo-39586: Deprecate distutils bdist_msi command (GH-18415) --- command/bdist_msi.py | 10 +++++++++- tests/test_bdist_msi.py | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f335a34898..0863a1883e 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -6,7 +6,9 @@ Implements the bdist_msi command. """ -import sys, os +import os +import sys +import warnings from distutils.core import Command from distutils.dir_util import remove_tree from distutils.sysconfig import get_python_version @@ -122,6 +124,12 @@ class bdist_msi(Command): '3.5', '3.6', '3.7', '3.8', '3.9'] other_version = 'X' + def __init__(self, *args, **kw): + super().__init__(*args, **kw) + warnings.warn("bdist_msi command is deprecated since Python 3.9, " + "use bdist_wheel (wheel packages) instead", + DeprecationWarning, 2) + def initialize_options(self): self.bdist_dir = None self.plat_name = None diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 15d8bdff2b..418e60ec72 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,7 +1,7 @@ """Tests for distutils.command.bdist_msi.""" import sys import unittest -from test.support import run_unittest +from test.support import run_unittest, check_warnings from distutils.tests import support @@ -14,7 +14,8 @@ def test_minimal(self): # minimal test XXX need more tests from distutils.command.bdist_msi import bdist_msi project_dir, dist = self.create_dist() - cmd = bdist_msi(dist) + with check_warnings(("", DeprecationWarning)): + cmd = bdist_msi(dist) cmd.ensure_finalized() From 0b6a065ea1415f3491d998fefee47ce800d5afe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 11 Feb 2020 16:49:23 +0100 Subject: [PATCH 7714/8469] Include pkg_resources test data in sdist This is the error otherwise: _____________ TestFindDistributions.test_standalone_egg_directory ______________ self = target_dir = local('/tmp/pytest-of-mockbuild/pytest-0/test_standalone_egg_directory0/target') def test_standalone_egg_directory(self, target_dir): (TESTS_DATA_DIR / 'my-test-package_unpacked-egg').copy(target_dir) dists = pkg_resources.find_distributions(str(target_dir)) > assert [dist.project_name for dist in dists] == ['my-test-package'] E AssertionError: assert [] == ['my-test-package'] E Right contains one more item: 'my-test-package' E Use -v to get the full diff pkg_resources/tests/test_find_distributions.py:25: AssertionError ____________________ TestFindDistributions.test_zipped_egg _____________________ self = , func = args = ('/builddir/build/BUILD/setuptools-45.2.0/pkg_resources/tests/data/my-test-package_zipped-egg',) kwargs = {}, __tracebackhide__ = False, cls = value = FileNotFoundError(2, 'No such file or directory') tb = , errno = 2 def checked_call(self, func, *args, **kwargs): """ call a function and raise an errno-exception if applicable. """ __tracebackhide__ = True try: > return func(*args, **kwargs) E FileNotFoundError: [Errno 2] No such file or directory: '/builddir/build/BUILD/setuptools-45.2.0/pkg_resources/tests/data/my-test-package_zipped-egg' /usr/lib/python3.8/site-packages/py/_error.py:66: FileNotFoundError During handling of the above exception, another exception occurred: self = target_dir = local('/tmp/pytest-of-mockbuild/pytest-0/test_zipped_egg0/target') def test_zipped_egg(self, target_dir): > (TESTS_DATA_DIR / 'my-test-package_zipped-egg').copy(target_dir) pkg_resources/tests/test_find_distributions.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/py/_path/local.py:437: in copy for x in self.visit(rec=rec): /usr/lib/python3.8/site-packages/py/_path/common.py:377: in visit for x in Visitor(fil, rec, ignore, bf, sort).gen(self): /usr/lib/python3.8/site-packages/py/_path/common.py:414: in gen entries = path.listdir() /usr/lib/python3.8/site-packages/py/_path/local.py:392: in listdir names = py.error.checked_call(os.listdir, self.strpath) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , func = args = ('/builddir/build/BUILD/setuptools-45.2.0/pkg_resources/tests/data/my-test-package_zipped-egg',) kwargs = {}, __tracebackhide__ = False, cls = value = FileNotFoundError(2, 'No such file or directory') tb = , errno = 2 def checked_call(self, func, *args, **kwargs): """ call a function and raise an errno-exception if applicable. """ __tracebackhide__ = True try: return func(*args, **kwargs) except self.Error: raise except (OSError, EnvironmentError): cls, value, tb = sys.exc_info() if not hasattr(value, 'errno'): raise __tracebackhide__ = False errno = value.errno try: if not isinstance(value, WindowsError): raise NameError except NameError: # we are not on Windows, or we got a proper OSError cls = self._geterrnoclass(errno) else: try: cls = self._geterrnoclass(_winerrnomap[errno]) except KeyError: raise value > raise cls("%s%r" % (func.__name__, args)) E py.error.ENOENT: [No such file or directory]: listdir('/builddir/build/BUILD/setuptools-45.2.0/pkg_resources/tests/data/my-test-package_zipped-egg',) /usr/lib/python3.8/site-packages/py/_error.py:86: ENOENT --- MANIFEST.in | 1 + changelog.d/1991.misc.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1991.misc.rst diff --git a/MANIFEST.in b/MANIFEST.in index 16d60e5ffc..128ae280ec 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html recursive-include setuptools/_vendor *.py *.txt recursive-include pkg_resources *.py *.txt +recursive-include pkg_resources/tests/data * include *.py include *.rst include MANIFEST.in diff --git a/changelog.d/1991.misc.rst b/changelog.d/1991.misc.rst new file mode 100644 index 0000000000..ac6904a242 --- /dev/null +++ b/changelog.d/1991.misc.rst @@ -0,0 +1 @@ +Include pkg_resources test data in sdist, so tests can be executed from it. From 53b8523fdfa19173d2e6b11d6b4d175f54b9dfea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 11 Feb 2020 22:12:37 -0500 Subject: [PATCH 7715/8469] Update deprecation version and include extension on changelog file. --- changelog.d/{1557.change => 1557.change.rst} | 0 docs/setuptools.txt | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) rename changelog.d/{1557.change => 1557.change.rst} (100%) diff --git a/changelog.d/1557.change b/changelog.d/1557.change.rst similarity index 100% rename from changelog.d/1557.change rename to changelog.d/1557.change.rst diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 51e46743db..be0f65d6ca 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -572,7 +572,7 @@ Services and Plugins`_. "Eggsecutable" Scripts ---------------------- -.. deprecated:: 41.3.0 +.. deprecated:: 45.3.0 Occasionally, there are situations where it's desirable to make an ``.egg`` file directly executable. You can do this by including an entry point such @@ -1225,7 +1225,7 @@ the quoted part. Distributing a ``setuptools``-based project =========================================== -Detailed instructions to distribute a setuptools project can be found at +Detailed instructions to distribute a setuptools project can be found at `Packaging project tutorials`_. .. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives @@ -1241,7 +1241,7 @@ setup.py is located:: This will generate distribution archives in the `dist` directory. -Before you upload the generated archives make sure you're registered on +Before you upload the generated archives make sure you're registered on https://test.pypi.org/account/register/. You will also need to verify your email to be able to upload any packages. You should install twine to be able to upload packages:: @@ -1264,11 +1264,11 @@ Distributing legacy ``setuptools`` projects using ez_setup.py .. warning:: **ez_setup** is deprecated in favor of PIP with **PEP-518** support. -Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is +Distributing packages using the legacy ``ez_setup.py`` and ``easy_install`` is deprecated in favor of PIP. Please consider migrating to using pip and twine based distribution. -However, if you still have any ``ez_setup`` based packages, documentation for +However, if you still have any ``ez_setup`` based packages, documentation for ez_setup based distributions can be found at `ez_setup distribution guide`_. .. _ez_setup distribution guide: ez_setup.html From 9732946b82f9e064603a31d3591783e867b7359c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Feb 2020 08:43:20 -0500 Subject: [PATCH 7716/8469] Avoid installing setuptools 45 on Python 2. Because Requires-Python is disabled for Python 2 to allow this declared-incompatible version to install on Python 2, the build-requirements must exclude installing setuptools 45 during the build-system setup. Because Python 2 tests are only needed for internal validation, and because the latest pip is already installed, the build-system can rely on `backend-path = ["."]`. Fixes #1996. --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0fd8521ee..cfdc2574b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,9 @@ [build-system] -requires = ["setuptools >= 40.8", "wheel"] +requires = [ + # avoid self install on Python 2; ref #1996 + "setuptools >= 40.8; python_version > '3'", + "wheel", +] build-backend = "setuptools.build_meta" backend-path = ["."] From 4835f01c41f784e1bcd24752dfecb96eb44a1a16 Mon Sep 17 00:00:00 2001 From: con-f-use Date: Fri, 14 Feb 2020 11:23:43 +0100 Subject: [PATCH 7717/8469] use finalize_distribution_options entrypoint order fixes #1993 --- setuptools/dist.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index fe5adf4607..f6453a0878 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -731,13 +731,13 @@ def finalize_options(self): to influence the order of execution. Smaller numbers go first and the default is 0. """ - hook_key = 'setuptools.finalize_distribution_options' + group = 'setuptools.finalize_distribution_options' def by_order(hook): return getattr(hook, 'order', 0) - eps = pkg_resources.iter_entry_points(hook_key) + eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group)) for ep in sorted(eps, key=by_order): - ep.load()(self) + ep(self) def _finalize_setup_keywords(self): for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): From 3f8fb00e442d110129e7d77b8104e4774a11ef92 Mon Sep 17 00:00:00 2001 From: con-f-use Date: Sat, 15 Feb 2020 11:12:32 +0100 Subject: [PATCH 7718/8469] changelog for #1994 --- changelog.d/1994.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1994.change.rst diff --git a/changelog.d/1994.change.rst b/changelog.d/1994.change.rst new file mode 100644 index 0000000000..4a6cc74298 --- /dev/null +++ b/changelog.d/1994.change.rst @@ -0,0 +1 @@ +Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook. From a99aeb82b254e27cef736a4e7eb89ece4583e100 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Feb 2020 11:51:53 -0500 Subject: [PATCH 7719/8469] Pin virtualenv to <20 as workaround for #1998. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index ddfeddf96f..2d43e76fc5 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,8 @@ envlist=python minversion = 3.2 requires = tox-pip-version >= 0.0.6 + # workaround for #1998 + virtualenv < 20 [helpers] # Custom pip behavior From fd25f0cdaa63f20effefc96f195b0e909fac8c75 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Feb 2020 14:07:11 -0500 Subject: [PATCH 7720/8469] Suppress failures due to unfortunate combination of issues. Ref #2000. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3ad310b37f..3ce1bf07dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,9 @@ jobs: if: tag IS present script: tox -e release after_success: skip + allow_failures: + # suppress failures due to pypa/setuptools#2000 + - python: pypy3 cache: pip From c1d7cc6701d33ee161d514ff61fe0e2017efee6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Feb 2020 12:30:03 -0500 Subject: [PATCH 7721/8469] Copy docs requirements to a separate file due to RTD constraints. Fixes #2001. Ref readthedocs/readthedocs.org#6662 --- .readthedocs.yml | 3 ++- docs/requirements.txt | 4 ++++ setup.cfg | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 docs/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 7b994a3579..cb10a7f991 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,4 +2,5 @@ python: version: 3 extra_requirements: - docs - pip_install: true + pip_install: false + requirements: docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000..6c35bf646e --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +# keep these in sync with setup.cfg +sphinx +jaraco.packaging>=6.1 +rst.linker>=1.9 diff --git a/setup.cfg b/setup.cfg index 8cca64774d..4ffb2f5e32 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,6 +74,7 @@ tests = pip>=19.1 # For proper file:// URLs support. docs = + # Keep these in sync with docs/requirements.txt sphinx jaraco.packaging>=6.1 rst.linker>=1.9 From b3de7989665740cd4218d7d814e719d90e75de73 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 18 Jan 2020 08:13:23 -0800 Subject: [PATCH 7722/8469] Remove pkg_resources.py31compat.makedirs() in favor of the stdlib As setuptools is now python 3.5+, this compatibility shim is no longer necessary. --- changelog.d/1973.breaking.rst | 1 + pkg_resources/__init__.py | 3 +-- pkg_resources/py31compat.py | 23 ----------------------- setuptools/build_meta.py | 3 +-- setuptools/command/easy_install.py | 4 ++-- setuptools/sandbox.py | 4 ++-- setuptools/tests/files.py | 5 +---- setuptools/tests/test_manifest.py | 3 +-- 8 files changed, 9 insertions(+), 37 deletions(-) create mode 100644 changelog.d/1973.breaking.rst delete mode 100644 pkg_resources/py31compat.py diff --git a/changelog.d/1973.breaking.rst b/changelog.d/1973.breaking.rst new file mode 100644 index 0000000000..398fdd710c --- /dev/null +++ b/changelog.d/1973.breaking.rst @@ -0,0 +1 @@ +Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 75563f95df..149ab6d272 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -76,7 +76,6 @@ except ImportError: importlib_machinery = None -from . import py31compat from pkg_resources.extern import appdirs from pkg_resources.extern import packaging __import__('pkg_resources.extern.packaging.version') @@ -3172,7 +3171,7 @@ def _find_adapter(registry, ob): def ensure_directory(path): """Ensure that the parent directory of `path` exists""" dirname = os.path.dirname(path) - py31compat.makedirs(dirname, exist_ok=True) + os.makedirs(dirname, exist_ok=True) def _bypass_ensure_directory(path): diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py deleted file mode 100644 index a381c424f9..0000000000 --- a/pkg_resources/py31compat.py +++ /dev/null @@ -1,23 +0,0 @@ -import os -import errno -import sys - -from .extern import six - - -def _makedirs_31(path, exist_ok=False): - try: - os.makedirs(path) - except OSError as exc: - if not exist_ok or exc.errno != errno.EEXIST: - raise - - -# rely on compatibility behavior until mode considerations -# and exists_ok considerations are disentangled. -# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663 -needs_makedirs = ( - six.PY2 or - (3, 4) <= sys.version_info < (3, 4, 1) -) -makedirs = _makedirs_31 if needs_makedirs else os.makedirs diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index a1c951cf59..46266814ad 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -38,7 +38,6 @@ from setuptools.py31compat import TemporaryDirectory from pkg_resources import parse_requirements -from pkg_resources.py31compat import makedirs __all__ = ['get_requires_for_build_sdist', 'get_requires_for_build_wheel', @@ -190,7 +189,7 @@ def _build_with_temp_dir(self, setup_command, result_extension, result_directory = os.path.abspath(result_directory) # Build in a temporary directory, then copy to the target. - makedirs(result_directory, exist_ok=True) + os.makedirs(result_directory, exist_ok=True) with TemporaryDirectory(dir=result_directory) as tmp_dist_dir: sys.argv = (sys.argv[:1] + setup_command + ['--dist-dir', tmp_dist_dir] + diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index abca1ae199..d224ea05e7 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -64,7 +64,7 @@ Distribution, PathMetadata, EggMetadata, WorkingSet, DistributionNotFound, VersionConflict, DEVELOP_DIST, ) -import pkg_resources.py31compat +import pkg_resources __metaclass__ = type @@ -559,7 +559,7 @@ def check_pth_processing(self): if ok_exists: os.unlink(ok_file) dirname = os.path.dirname(ok_file) - pkg_resources.py31compat.makedirs(dirname, exist_ok=True) + os.makedirs(dirname, exist_ok=True) f = open(pth_file, 'w') except (OSError, IOError): self.cant_write_to_target() diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index e46dfc8d25..93ae8eb4d9 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -12,7 +12,7 @@ from setuptools.extern import six from setuptools.extern.six.moves import builtins, map -import pkg_resources.py31compat +import pkg_resources from distutils.errors import DistutilsError from pkg_resources import working_set @@ -70,7 +70,7 @@ def override_temp(replacement): """ Monkey-patch tempfile.tempdir with replacement, ensuring it exists """ - pkg_resources.py31compat.makedirs(replacement, exist_ok=True) + os.makedirs(replacement, exist_ok=True) saved = tempfile.tempdir diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py index bad2189d45..71194b9de0 100644 --- a/setuptools/tests/files.py +++ b/setuptools/tests/files.py @@ -1,9 +1,6 @@ import os -import pkg_resources.py31compat - - def build_files(file_defs, prefix=""): """ Build a set of files/directories, as described by the @@ -30,7 +27,7 @@ def build_files(file_defs, prefix=""): for name, contents in file_defs.items(): full_name = os.path.join(prefix, name) if isinstance(contents, dict): - pkg_resources.py31compat.makedirs(full_name, exist_ok=True) + os.makedirs(full_name, exist_ok=True) build_files(contents, prefix=full_name) else: if isinstance(contents, bytes): diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 2a0e9c8625..042a8b1742 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -10,7 +10,6 @@ from distutils import log from distutils.errors import DistutilsTemplateError -import pkg_resources.py31compat from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution from setuptools.extern import six @@ -364,7 +363,7 @@ def make_files(self, files): for file in files: file = os.path.join(self.temp_dir, file) dirname, basename = os.path.split(file) - pkg_resources.py31compat.makedirs(dirname, exist_ok=True) + os.makedirs(dirname, exist_ok=True) open(file, 'w').close() def test_process_template_line(self): From abaa683c2140204b40051c80926c334ce4bba41c Mon Sep 17 00:00:00 2001 From: Ye-hyoung Kang Date: Mon, 2 Mar 2020 23:54:57 +0900 Subject: [PATCH 7723/8469] Fix broken link to Python docs The broken link used to point to Python 2 docs (which has been moved). Since Python 2 has reached its end-of-life, link to Python 3 docs instead. --- docs/setuptools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index efcd0a8671..22e3c87252 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -941,7 +941,7 @@ python.org website. If using the setuptools-specific ``include_package_data`` argument, files specified by ``package_data`` will *not* be automatically added to the manifest unless they are listed in the MANIFEST.in file.) -__ http://docs.python.org/dist/node11.html +__ https://docs.python.org/3/distutils/setupscript.html#installing-package-data Sometimes, the ``include_package_data`` or ``package_data`` options alone aren't sufficient to precisely define what files you want included. For From 6a3729676d6aef85396d6fcf593a140e56ce32c7 Mon Sep 17 00:00:00 2001 From: Ye-hyoung Kang Date: Tue, 3 Mar 2020 00:05:19 +0900 Subject: [PATCH 7724/8469] Create 2011.doc.rst Add news fragment --- changelog.d/2011.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2011.doc.rst diff --git a/changelog.d/2011.doc.rst b/changelog.d/2011.doc.rst new file mode 100644 index 0000000000..e36fb6a727 --- /dev/null +++ b/changelog.d/2011.doc.rst @@ -0,0 +1 @@ +Fix broken link to distutils docs on package_data From d8d513d728552adee0677d5814eecc06d7775749 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 3 Mar 2020 00:04:11 +0000 Subject: [PATCH 7725/8469] bpo-38597: Never statically link extension initialization code on Windows (GH-18724) --- _msvccompiler.py | 60 +++++--------------------------------- tests/test_msvccompiler.py | 51 -------------------------------- 2 files changed, 7 insertions(+), 104 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index e8e4b717b9..03a5986d98 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -97,28 +97,11 @@ def _find_vc2017(): } def _find_vcvarsall(plat_spec): + # bpo-38597: Removed vcruntime return value _, best_dir = _find_vc2017() - vcruntime = None - - if plat_spec in PLAT_SPEC_TO_RUNTIME: - vcruntime_plat = PLAT_SPEC_TO_RUNTIME[plat_spec] - else: - vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' - - if best_dir: - vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", - vcruntime_plat, "Microsoft.VC14*.CRT", "vcruntime140.dll") - try: - import glob - vcruntime = glob.glob(vcredist, recursive=True)[-1] - except (ImportError, OSError, LookupError): - vcruntime = None if not best_dir: best_version, best_dir = _find_vc2015() - if best_version: - vcruntime = os.path.join(best_dir, 'redist', vcruntime_plat, - "Microsoft.VC140.CRT", "vcruntime140.dll") if not best_dir: log.debug("No suitable Visual C++ version found") @@ -129,11 +112,7 @@ def _find_vcvarsall(plat_spec): log.debug("%s cannot be found", vcvarsall) return None, None - if not vcruntime or not os.path.isfile(vcruntime): - log.debug("%s cannot be found", vcruntime) - vcruntime = None - - return vcvarsall, vcruntime + return vcvarsall, None def _get_vc_env(plat_spec): if os.getenv("DISTUTILS_USE_SDK"): @@ -142,7 +121,7 @@ def _get_vc_env(plat_spec): for key, value in os.environ.items() } - vcvarsall, vcruntime = _find_vcvarsall(plat_spec) + vcvarsall, _ = _find_vcvarsall(plat_spec) if not vcvarsall: raise DistutilsPlatformError("Unable to find vcvarsall.bat") @@ -163,8 +142,6 @@ def _get_vc_env(plat_spec): if key and value } - if vcruntime: - env['py_vcruntime_redist'] = vcruntime return env def _find_exe(exe, paths=None): @@ -194,12 +171,6 @@ def _find_exe(exe, paths=None): 'win-arm64' : 'x86_arm64' } -# A set containing the DLLs that are guaranteed to be available for -# all micro versions of this Python version. Known extension -# dependencies that are not in this set will be copied to the output -# path. -_BUNDLED_DLLS = frozenset(['vcruntime140.dll']) - class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" @@ -263,7 +234,6 @@ def initialize(self, plat_name=None): self.rc = _find_exe("rc.exe", paths) # resource compiler self.mc = _find_exe("mc.exe", paths) # message compiler self.mt = _find_exe("mt.exe", paths) # message compiler - self._vcruntime_redist = vc_env.get('py_vcruntime_redist', '') for dir in vc_env.get('include', '').split(os.pathsep): if dir: @@ -274,13 +244,12 @@ def initialize(self, plat_name=None): self.add_library_dir(dir.rstrip(os.sep)) self.preprocess_options = None - # If vcruntime_redist is available, link against it dynamically. Otherwise, - # use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib - # later to dynamically link to ucrtbase but not vcruntime. + # bpo-38597: Always compile with dynamic linking + # Future releases of Python 3.x will include all past + # versions of vcruntime*.dll for compatibility. self.compile_options = [ - '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG' + '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG', '/MD' ] - self.compile_options.append('/MD' if self._vcruntime_redist else '/MT') self.compile_options_debug = [ '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG' @@ -289,8 +258,6 @@ def initialize(self, plat_name=None): ldflags = [ '/nologo', '/INCREMENTAL:NO', '/LTCG' ] - if not self._vcruntime_redist: - ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib')) ldflags_debug = [ '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL' @@ -532,24 +499,11 @@ def link(self, try: log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args)) self.spawn([self.linker] + ld_args) - self._copy_vcruntime(output_dir) except DistutilsExecError as msg: raise LinkError(msg) else: log.debug("skipping %s (up-to-date)", output_filename) - def _copy_vcruntime(self, output_dir): - vcruntime = self._vcruntime_redist - if not vcruntime or not os.path.isfile(vcruntime): - return - - if os.path.basename(vcruntime).lower() in _BUNDLED_DLLS: - return - - log.debug('Copying "%s"', vcruntime) - vcruntime = shutil.copy(vcruntime, output_dir) - os.chmod(vcruntime, stat.S_IWRITE) - def spawn(self, cmd): old_path = os.getenv('path') try: diff --git a/tests/test_msvccompiler.py b/tests/test_msvccompiler.py index 70a9c93a4e..b518d6a78b 100644 --- a/tests/test_msvccompiler.py +++ b/tests/test_msvccompiler.py @@ -32,57 +32,6 @@ def _find_vcvarsall(plat_spec): finally: _msvccompiler._find_vcvarsall = old_find_vcvarsall - def test_compiler_options(self): - import distutils._msvccompiler as _msvccompiler - # suppress path to vcruntime from _find_vcvarsall to - # check that /MT is added to compile options - old_find_vcvarsall = _msvccompiler._find_vcvarsall - def _find_vcvarsall(plat_spec): - return old_find_vcvarsall(plat_spec)[0], None - _msvccompiler._find_vcvarsall = _find_vcvarsall - try: - compiler = _msvccompiler.MSVCCompiler() - compiler.initialize() - - self.assertIn('/MT', compiler.compile_options) - self.assertNotIn('/MD', compiler.compile_options) - finally: - _msvccompiler._find_vcvarsall = old_find_vcvarsall - - def test_vcruntime_copy(self): - import distutils._msvccompiler as _msvccompiler - # force path to a known file - it doesn't matter - # what we copy as long as its name is not in - # _msvccompiler._BUNDLED_DLLS - old_find_vcvarsall = _msvccompiler._find_vcvarsall - def _find_vcvarsall(plat_spec): - return old_find_vcvarsall(plat_spec)[0], __file__ - _msvccompiler._find_vcvarsall = _find_vcvarsall - try: - tempdir = self.mkdtemp() - compiler = _msvccompiler.MSVCCompiler() - compiler.initialize() - compiler._copy_vcruntime(tempdir) - - self.assertTrue(os.path.isfile(os.path.join( - tempdir, os.path.basename(__file__)))) - finally: - _msvccompiler._find_vcvarsall = old_find_vcvarsall - - def test_vcruntime_skip_copy(self): - import distutils._msvccompiler as _msvccompiler - - tempdir = self.mkdtemp() - compiler = _msvccompiler.MSVCCompiler() - compiler.initialize() - dll = compiler._vcruntime_redist - self.assertTrue(os.path.isfile(dll), dll or "") - - compiler._copy_vcruntime(tempdir) - - self.assertFalse(os.path.isfile(os.path.join( - tempdir, os.path.basename(dll))), dll or "") - def test_get_vc_env_unicode(self): import distutils._msvccompiler as _msvccompiler From c6f749b2b761da2b88cac62d8c6aa29f7276e3a7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 4 Mar 2020 14:50:19 +0100 Subject: [PATCH 7726/8469] bpo-39763: distutils.spawn now uses subprocess (GH-18743) Reimplement distutils.spawn.spawn() function with the subprocess module. setup.py now uses a basic implementation of the subprocess module if the subprocess module is not available: before required C extension modules are built. --- spawn.py | 128 ++++++++------------------------------------ tests/test_spawn.py | 11 ---- 2 files changed, 22 insertions(+), 117 deletions(-) diff --git a/spawn.py b/spawn.py index ceb94945dc..aad277b0ca 100644 --- a/spawn.py +++ b/spawn.py @@ -8,11 +8,18 @@ import sys import os +import subprocess from distutils.errors import DistutilsPlatformError, DistutilsExecError from distutils.debug import DEBUG from distutils import log + +if sys.platform == 'darwin': + _cfg_target = None + _cfg_target_split = None + + def spawn(cmd, search_path=1, verbose=0, dry_run=0): """Run another program, specified as a command list 'cmd', in a new process. @@ -32,64 +39,16 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): # cmd is documented as a list, but just in case some code passes a tuple # in, protect our %-formatting code against horrible death cmd = list(cmd) - if os.name == 'posix': - _spawn_posix(cmd, search_path, dry_run=dry_run) - elif os.name == 'nt': - _spawn_nt(cmd, search_path, dry_run=dry_run) - else: - raise DistutilsPlatformError( - "don't know how to spawn programs on platform '%s'" % os.name) - -def _nt_quote_args(args): - """Quote command-line arguments for DOS/Windows conventions. - - Just wraps every argument which contains blanks in double quotes, and - returns a new argument list. - """ - # XXX this doesn't seem very robust to me -- but if the Windows guys - # say it'll work, I guess I'll have to accept it. (What if an arg - # contains quotes? What other magic characters, other than spaces, - # have to be escaped? Is there an escaping mechanism other than - # quoting?) - for i, arg in enumerate(args): - if ' ' in arg: - args[i] = '"%s"' % arg - return args - -def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): - executable = cmd[0] - cmd = _nt_quote_args(cmd) - if search_path: - # either we find one or it stays the same - executable = find_executable(executable) or executable - log.info(' '.join([executable] + cmd[1:])) - if not dry_run: - # spawn for NT requires a full path to the .exe - try: - rc = os.spawnv(os.P_WAIT, executable, cmd) - except OSError as exc: - # this seems to happen when the command isn't found - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "command %r failed: %s" % (cmd, exc.args[-1])) - if rc != 0: - # and this reflects the command running but failing - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "command %r failed with exit status %d" % (cmd, rc)) - -if sys.platform == 'darwin': - _cfg_target = None - _cfg_target_split = None -def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): log.info(' '.join(cmd)) if dry_run: return - executable = cmd[0] - exec_fn = search_path and os.execvp or os.execv + + if search_path: + executable = find_executable(cmd[0]) + if executable is not None: + cmd[0] = executable + env = None if sys.platform == 'darwin': global _cfg_target, _cfg_target_split @@ -111,60 +70,17 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0): raise DistutilsPlatformError(my_msg) env = dict(os.environ, MACOSX_DEPLOYMENT_TARGET=cur_target) - exec_fn = search_path and os.execvpe or os.execve - pid = os.fork() - if pid == 0: # in the child - try: - if env is None: - exec_fn(executable, cmd) - else: - exec_fn(executable, cmd, env) - except OSError as e: - if not DEBUG: - cmd = executable - sys.stderr.write("unable to execute %r: %s\n" - % (cmd, e.strerror)) - os._exit(1) + proc = subprocess.Popen(cmd, env=env) + proc.wait() + exitcode = proc.returncode + + if exitcode: if not DEBUG: - cmd = executable - sys.stderr.write("unable to execute %r for unknown reasons" % cmd) - os._exit(1) - else: # in the parent - # Loop until the child either exits or is terminated by a signal - # (ie. keep waiting if it's merely stopped) - while True: - try: - pid, status = os.waitpid(pid, 0) - except OSError as exc: - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "command %r failed: %s" % (cmd, exc.args[-1])) - if os.WIFSIGNALED(status): - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "command %r terminated by signal %d" - % (cmd, os.WTERMSIG(status))) - elif os.WIFEXITED(status): - exit_status = os.WEXITSTATUS(status) - if exit_status == 0: - return # hey, it succeeded! - else: - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "command %r failed with exit status %d" - % (cmd, exit_status)) - elif os.WIFSTOPPED(status): - continue - else: - if not DEBUG: - cmd = executable - raise DistutilsExecError( - "unknown error executing %r: termination status %d" - % (cmd, status)) + cmd = cmd[0] + raise DistutilsExecError( + "command %r failed with exit code %s" % (cmd, exitcode)) + def find_executable(executable, path=None): """Tries to find 'executable' in the directories listed in 'path'. diff --git a/tests/test_spawn.py b/tests/test_spawn.py index f9ae69ef86..73b0f5cb73 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -8,7 +8,6 @@ from test import support as test_support from distutils.spawn import find_executable -from distutils.spawn import _nt_quote_args from distutils.spawn import spawn from distutils.errors import DistutilsExecError from distutils.tests import support @@ -17,16 +16,6 @@ class SpawnTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): - def test_nt_quote_args(self): - - for (args, wanted) in ((['with space', 'nospace'], - ['"with space"', 'nospace']), - (['nochange', 'nospace'], - ['nochange', 'nospace'])): - res = _nt_quote_args(args) - self.assertEqual(res, wanted) - - @unittest.skipUnless(os.name in ('nt', 'posix'), 'Runs only under posix or nt') def test_spawn(self): From 65fa92095484eb14b994574650809fca7cae2d2e Mon Sep 17 00:00:00 2001 From: mayeut Date: Mon, 11 Nov 2019 12:00:16 +0100 Subject: [PATCH 7727/8469] Use CPython 3.8.0 mechanism to find msvc 14+ --- appveyor.yml | 9 ++ changelog.d/1904.change.rst | 1 + setuptools/msvc.py | 159 ++++++++++++++++++++++++++++++-- setuptools/tests/test_msvc14.py | 84 +++++++++++++++++ tox.ini | 2 +- 5 files changed, 246 insertions(+), 9 deletions(-) create mode 100644 changelog.d/1904.change.rst create mode 100644 setuptools/tests/test_msvc14.py diff --git a/appveyor.yml b/appveyor.yml index f7ab22f6af..de4e6c66c6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,15 @@ environment: CODECOV_ENV: APPVEYOR_JOB_NAME matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + APPVEYOR_JOB_NAME: "python35-x64-vs2015" + PYTHON: "C:\\Python35-x64" + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + APPVEYOR_JOB_NAME: "python35-x64-vs2017" + PYTHON: "C:\\Python35-x64" + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + APPVEYOR_JOB_NAME: "python35-x64-vs2019" + PYTHON: "C:\\Python35-x64" - APPVEYOR_JOB_NAME: "python36-x64" PYTHON: "C:\\Python36-x64" - APPVEYOR_JOB_NAME: "python37-x64" diff --git a/changelog.d/1904.change.rst b/changelog.d/1904.change.rst new file mode 100644 index 0000000000..fa4bbfd91f --- /dev/null +++ b/changelog.d/1904.change.rst @@ -0,0 +1 @@ +Update msvc.py to use CPython 3.8.0 mechanism to find msvc 14+ diff --git a/setuptools/msvc.py b/setuptools/msvc.py index c2cbd1e543..213e39c9d5 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -26,6 +26,7 @@ import sys import platform import itertools +import subprocess import distutils.errors from setuptools.extern.packaging.version import LegacyVersion @@ -142,6 +143,154 @@ def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): raise +def _msvc14_find_vc2015(): + """Python 3.8 "distutils/_msvccompiler.py" backport""" + try: + key = winreg.OpenKey( + winreg.HKEY_LOCAL_MACHINE, + r"Software\Microsoft\VisualStudio\SxS\VC7", + 0, + winreg.KEY_READ | winreg.KEY_WOW64_32KEY + ) + except OSError: + return None, None + + best_version = 0 + best_dir = None + with key: + for i in itertools.count(): + try: + v, vc_dir, vt = winreg.EnumValue(key, i) + except OSError: + break + if v and vt == winreg.REG_SZ and isdir(vc_dir): + try: + version = int(float(v)) + except (ValueError, TypeError): + continue + if version >= 14 and version > best_version: + best_version, best_dir = version, vc_dir + return best_version, best_dir + + +def _msvc14_find_vc2017(): + """Python 3.8 "distutils/_msvccompiler.py" backport + + Returns "15, path" based on the result of invoking vswhere.exe + If no install is found, returns "None, None" + + The version is returned to avoid unnecessarily changing the function + result. It may be ignored when the path is not None. + + If vswhere.exe is not available, by definition, VS 2017 is not + installed. + """ + root = environ.get("ProgramFiles(x86)") or environ.get("ProgramFiles") + if not root: + return None, None + + try: + path = subprocess.check_output([ + join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"), + "-latest", + "-prerelease", + "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "-property", "installationPath", + "-products", "*", + ]).decode(encoding="mbcs", errors="strict").strip() + except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): + return None, None + + path = join(path, "VC", "Auxiliary", "Build") + if isdir(path): + return 15, path + + return None, None + + +PLAT_SPEC_TO_RUNTIME = { + 'x86': 'x86', + 'x86_amd64': 'x64', + 'x86_arm': 'arm', + 'x86_arm64': 'arm64' +} + + +def _msvc14_find_vcvarsall(plat_spec): + """Python 3.8 "distutils/_msvccompiler.py" backport""" + _, best_dir = _msvc14_find_vc2017() + vcruntime = None + + if plat_spec in PLAT_SPEC_TO_RUNTIME: + vcruntime_plat = PLAT_SPEC_TO_RUNTIME[plat_spec] + else: + vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' + + if best_dir: + vcredist = join(best_dir, "..", "..", "redist", "MSVC", "**", + vcruntime_plat, "Microsoft.VC14*.CRT", + "vcruntime140.dll") + try: + import glob + vcruntime = glob.glob(vcredist, recursive=True)[-1] + except (ImportError, OSError, LookupError): + vcruntime = None + + if not best_dir: + best_version, best_dir = _msvc14_find_vc2015() + if best_version: + vcruntime = join(best_dir, 'redist', vcruntime_plat, + "Microsoft.VC140.CRT", "vcruntime140.dll") + + if not best_dir: + return None, None + + vcvarsall = join(best_dir, "vcvarsall.bat") + if not isfile(vcvarsall): + return None, None + + if not vcruntime or not isfile(vcruntime): + vcruntime = None + + return vcvarsall, vcruntime + + +def _msvc14_get_vc_env(plat_spec): + """Python 3.8 "distutils/_msvccompiler.py" backport""" + if "DISTUTILS_USE_SDK" in environ: + return { + key.lower(): value + for key, value in environ.items() + } + + vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec) + if not vcvarsall: + raise distutils.errors.DistutilsPlatformError( + "Unable to find vcvarsall.bat" + ) + + try: + out = subprocess.check_output( + 'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec), + stderr=subprocess.STDOUT, + ).decode('utf-16le', errors='replace') + except subprocess.CalledProcessError as exc: + raise distutils.errors.DistutilsPlatformError( + "Error executing {}".format(exc.cmd) + ) + + env = { + key.lower(): value + for key, _, value in + (line.partition('=') for line in out.splitlines()) + if key and value + } + + if vcruntime: + env['py_vcruntime_redist'] = vcruntime + return env + + def msvc14_get_vc_env(plat_spec): """ Patched "distutils._msvccompiler._get_vc_env" for support extra @@ -159,16 +308,10 @@ def msvc14_get_vc_env(plat_spec): dict environment """ - # Try to get environment from vcvarsall.bat (Classical way) - try: - return get_unpatched(msvc14_get_vc_env)(plat_spec) - except distutils.errors.DistutilsPlatformError: - # Pass error Vcvarsall.bat is missing - pass - # If error, try to set environment directly + # Always use backport from CPython 3.8 try: - return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env() + return _msvc14_get_vc_env(plat_spec) except distutils.errors.DistutilsPlatformError as exc: _augment_exception(exc, 14.0) raise diff --git a/setuptools/tests/test_msvc14.py b/setuptools/tests/test_msvc14.py new file mode 100644 index 0000000000..7833aab47b --- /dev/null +++ b/setuptools/tests/test_msvc14.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +""" +Tests for msvc support module (msvc14 unit tests). +""" + +import os +from distutils.errors import DistutilsPlatformError +import pytest +import sys + + +@pytest.mark.skipif(sys.platform != "win32", + reason="These tests are only for win32") +class TestMSVC14: + """Python 3.8 "distutils/tests/test_msvccompiler.py" backport""" + def test_no_compiler(self): + import setuptools.msvc as _msvccompiler + # makes sure query_vcvarsall raises + # a DistutilsPlatformError if the compiler + # is not found + + def _find_vcvarsall(plat_spec): + return None, None + + old_find_vcvarsall = _msvccompiler._msvc14_find_vcvarsall + _msvccompiler._msvc14_find_vcvarsall = _find_vcvarsall + try: + pytest.raises(DistutilsPlatformError, + _msvccompiler._msvc14_get_vc_env, + 'wont find this version') + finally: + _msvccompiler._msvc14_find_vcvarsall = old_find_vcvarsall + + @pytest.mark.skipif(sys.version_info[0] < 3, + reason="Unicode requires encode/decode on Python 2") + def test_get_vc_env_unicode(self): + import setuptools.msvc as _msvccompiler + + test_var = 'ṰḖṤṪ┅ṼẨṜ' + test_value = '₃â´â‚…' + + # Ensure we don't early exit from _get_vc_env + old_distutils_use_sdk = os.environ.pop('DISTUTILS_USE_SDK', None) + os.environ[test_var] = test_value + try: + env = _msvccompiler._msvc14_get_vc_env('x86') + assert test_var.lower() in env + assert test_value == env[test_var.lower()] + finally: + os.environ.pop(test_var) + if old_distutils_use_sdk: + os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk + + def test_get_vc2017(self): + import setuptools.msvc as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2017 + # and mark it skipped if we do not. + version, path = _msvccompiler._msvc14_find_vc2017() + if os.environ.get('APPVEYOR_BUILD_WORKER_IMAGE', '') in [ + 'Visual Studio 2017' + ]: + assert version + if version: + assert version >= 15 + assert os.path.isdir(path) + else: + pytest.skip("VS 2017 is not installed") + + def test_get_vc2015(self): + import setuptools.msvc as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2015 + # and mark it skipped if we do not. + version, path = _msvccompiler._msvc14_find_vc2015() + if os.environ.get('APPVEYOR_BUILD_WORKER_IMAGE', '') in [ + 'Visual Studio 2015', 'Visual Studio 2017' + ]: + assert version + if version: + assert version >= 14 + assert os.path.isdir(path) + else: + pytest.skip("VS 2015 is not installed") diff --git a/tox.ini b/tox.ini index 959d7dadb5..1ebb922b5e 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. -passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED +passenv=APPDATA HOMEDRIVE HOMEPATH windir Program* CommonProgram* VS* APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} usedevelop=True extras = From dbbc6bba1c00ff193cea59a7eadee639d6ac3a11 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Mar 2020 14:55:12 -0500 Subject: [PATCH 7728/8469] =?UTF-8?q?Bump=20version:=2045.2.0=20=E2=86=92?= =?UTF-8?q?=2045.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1557.change.rst | 1 - changelog.d/1904.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1557.change.rst delete mode 100644 changelog.d/1904.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8e86f31f09..c438b5a813 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 45.2.0 +current_version = 45.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index f97f514208..e35c447253 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v45.3.0 +------- + +* #1557: Deprecated eggsecutable scripts and updated docs. +* #1904: Update msvc.py to use CPython 3.8.0 mechanism to find msvc 14+ + + v45.2.0 ------- diff --git a/changelog.d/1557.change.rst b/changelog.d/1557.change.rst deleted file mode 100644 index 9f8af4a6cc..0000000000 --- a/changelog.d/1557.change.rst +++ /dev/null @@ -1 +0,0 @@ -Deprecated eggsecutable scripts and updated docs. diff --git a/changelog.d/1904.change.rst b/changelog.d/1904.change.rst deleted file mode 100644 index fa4bbfd91f..0000000000 --- a/changelog.d/1904.change.rst +++ /dev/null @@ -1 +0,0 @@ -Update msvc.py to use CPython 3.8.0 mechanism to find msvc 14+ diff --git a/setup.cfg b/setup.cfg index 4ffb2f5e32..2e65b7a188 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 45.2.0 +version = 45.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From c5958f26680b8bfad10d0ec03a613725c9a4c580 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Mar 2020 16:50:40 -0500 Subject: [PATCH 7729/8469] Also remove mysterious hack from pkg_resources.extern --- pkg_resources/extern/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index c1eb9e998f..bf98d8f296 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -43,13 +43,6 @@ def load_module(self, fullname): __import__(extant) mod = sys.modules[extant] sys.modules[fullname] = mod - # mysterious hack: - # Remove the reference to the extant package/module - # on later Python versions to cause relative imports - # in the vendor package to resolve the same modules - # as those going through this importer. - if prefix and sys.version_info > (3, 3): - del sys.modules[extant] return mod except ImportError: pass From a8f61a435ebc10638889b4be086254e525314bb2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Mar 2020 17:05:59 -0500 Subject: [PATCH 7730/8469] Try building docs with python3. Ref #1992. --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index ec21e7be93..aa84fe0049 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ [build] publish = "docs/build/html" - command = "pip install tox && tox -e docs" + command = "python3 -m pip install tox && tox -e docs" From 35cdda926151d52963baf32e0770f2d5f16e5dfd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Mar 2020 17:23:01 -0500 Subject: [PATCH 7731/8469] Reword UserWarning for insecure extraction path so that the message can be keyed for ignoring it. Ref #1899. --- pkg_resources/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 75563f95df..88d4bdcaed 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1235,12 +1235,13 @@ def _warn_unsafe_extraction_path(path): mode = os.stat(path).st_mode if mode & stat.S_IWOTH or mode & stat.S_IWGRP: msg = ( - "%s is writable by group/others and vulnerable to attack " - "when " - "used with get_resource_filename. Consider a more secure " + "Extraction path is writable by group/others " + "and vulnerable to attack when " + "used with get_resource_filename ({path}). " + "Consider a more secure " "location (set with .set_extraction_path or the " - "PYTHON_EGG_CACHE environment variable)." % path - ) + "PYTHON_EGG_CACHE environment variable)." + ).format(**locals()) warnings.warn(msg, UserWarning) def postprocess(self, tempname, filename): From e63e131686be6bae3249a67958bdb2ef5abd1622 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 7 Mar 2020 17:25:23 -0500 Subject: [PATCH 7732/8469] Suppress UserWarning in pkg_resources. --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 4cd94d5a73..517fe3ce89 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,3 +7,5 @@ filterwarnings = error # https://github.com/pypa/setuptools/issues/1823 ignore:bdist_wininst command is deprecated + # Suppress this error; unimportant for CI tests + ignore:Extraction path is writable by group/others:UserWarning From 8344ec66ee148ec841311f865c65b4129644e454 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 09:50:36 -0400 Subject: [PATCH 7733/8469] Try installing pip --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index aa84fe0049..5fffee445e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ [build] publish = "docs/build/html" - command = "python3 -m pip install tox && tox -e docs" + command = "(wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install tox && tox -e docs" From 098562e1fd63835d92883d02331e11165df92d13 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 10:55:09 -0400 Subject: [PATCH 7734/8469] Use pep517 to avoid bb://pypa/distlib#136. --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 5fffee445e..d08df89edc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ [build] publish = "docs/build/html" - command = "(wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install tox && tox -e docs" + command = "(wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install --use-pep517 tox && tox -e docs" From b5b3b2e8af0535361543d0307bf24b97b2699ba3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 12:03:56 -0400 Subject: [PATCH 7735/8469] Emit the Python version --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index d08df89edc..77bd5b50a5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ [build] publish = "docs/build/html" - command = "(wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install --use-pep517 tox && tox -e docs" + command = "python3 -V && (wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install --use-pep517 tox && tox -e docs" From 7aebb4624ddc29869b41ce0a21530b4398e8877e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 13:04:49 -0400 Subject: [PATCH 7736/8469] Add a file 'runtime.txt' to let Netlify know to use that env. Fixes #1992. --- netlify.toml | 2 +- runtime.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 runtime.txt diff --git a/netlify.toml b/netlify.toml index 77bd5b50a5..ec21e7be93 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,4 +2,4 @@ [build] publish = "docs/build/html" - command = "python3 -V && (wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install --use-pep517 tox && tox -e docs" + command = "pip install tox && tox -e docs" diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000000..475ba515c0 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +3.7 From 432baadc434e75f4ea5da9ff4c3546006e226c44 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 13:11:51 -0400 Subject: [PATCH 7737/8469] Docs land in build/html --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index ec21e7be93..145ab020e5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ # Configuration for pull request documentation previews via Netlify [build] - publish = "docs/build/html" + publish = "build/html" command = "pip install tox && tox -e docs" From a8942b4a29799d15b6f0feb6656118fc6b9ce43b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 13:19:37 -0400 Subject: [PATCH 7738/8469] Add a note about runtime.txt --- netlify.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netlify.toml b/netlify.toml index 145ab020e5..5828132edd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,7 @@ # Configuration for pull request documentation previews via Netlify +# Netlify relies on there being a ./runtime.txt to indicate Python 3. + [build] publish = "build/html" command = "pip install tox && tox -e docs" From dd250ca952bb3f109086eca3353b65a92fbcbf4d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 13:49:03 -0400 Subject: [PATCH 7739/8469] Suppress RuntimeWarning from sandbox module on Python 2 --- pytest.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pytest.ini b/pytest.ini index 517fe3ce89..0d1824e47b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,3 +9,7 @@ filterwarnings = ignore:bdist_wininst command is deprecated # Suppress this error; unimportant for CI tests ignore:Extraction path is writable by group/others:UserWarning + # Suppress Python 2 deprecation warning + ignore:Setuptools will stop working on Python 2:UserWarning + # Suppress weird RuntimeWarning. + ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning From 47ca64bc1138960d7f6d8f0161ed2d74a3670ee4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 13:57:19 -0400 Subject: [PATCH 7740/8469] Suppress Windows bytes API warning until it can be fixed. Ref #2016. --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 0d1824e47b..0c2c8a17a4 100644 --- a/pytest.ini +++ b/pytest.ini @@ -13,3 +13,5 @@ filterwarnings = ignore:Setuptools will stop working on Python 2:UserWarning # Suppress weird RuntimeWarning. ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning + # Suppress use of bytes for filenames on Windows until fixed #2016 + ignore:The Windows bytes API has been deprecated:DeprecationWarning From 46430d4f340da778a86d92727bbd608c16d63ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 14:08:35 -0400 Subject: [PATCH 7741/8469] Suppress another warning --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 0c2c8a17a4..a0d6dea6d2 100644 --- a/pytest.ini +++ b/pytest.ini @@ -15,3 +15,5 @@ filterwarnings = ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning # Suppress use of bytes for filenames on Windows until fixed #2016 ignore:The Windows bytes API has been deprecated:DeprecationWarning + # Suppress another Python 2 UnicodeWarning + ignore:Unicode equal comparison failed to convert:UnicodeWarning From d8e103d12af18bb8100952b4bc08eeed491b97c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 14:28:59 -0400 Subject: [PATCH 7742/8469] Get both UnicodeWarnings --- pytest.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index a0d6dea6d2..af61043fb2 100644 --- a/pytest.ini +++ b/pytest.ini @@ -15,5 +15,6 @@ filterwarnings = ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning # Suppress use of bytes for filenames on Windows until fixed #2016 ignore:The Windows bytes API has been deprecated:DeprecationWarning - # Suppress another Python 2 UnicodeWarning + # Suppress other Python 2 UnicodeWarnings ignore:Unicode equal comparison failed to convert:UnicodeWarning + ignore:Unicode unequal comparison failed to convert:UnicodeWarning From 50f3575da42ce5b7c013c28ff623ce16c231455d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 15:53:33 -0400 Subject: [PATCH 7743/8469] =?UTF-8?q?Bump=20version:=2045.3.0=20=E2=86=92?= =?UTF-8?q?=2046.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ changelog.d/1890.change.rst | 1 - changelog.d/1899.change.rst | 1 - changelog.d/1991.misc.rst | 1 - changelog.d/2011.doc.rst | 1 - changelog.d/65.breaking.rst | 1 - setup.cfg | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 changelog.d/1890.change.rst delete mode 100644 changelog.d/1899.change.rst delete mode 100644 changelog.d/1991.misc.rst delete mode 100644 changelog.d/2011.doc.rst delete mode 100644 changelog.d/65.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c438b5a813..5fabdff0eb 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 45.3.0 +current_version = 46.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index e35c447253..93c1f890ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v46.0.0 +------- + +* #65: Once again as in 3.0, removed the Features feature. +* #1890: Fix vendored dependencies so importing ``setuptools.extern.some_module`` gives the same object as ``setuptools._vendor.some_module``. This makes Metadata picklable again. +* #1899: Test suite now fails on warnings. +* #2011: Fix broken link to distutils docs on package_data +* #1991: Include pkg_resources test data in sdist, so tests can be executed from it. + + v45.3.0 ------- diff --git a/changelog.d/1890.change.rst b/changelog.d/1890.change.rst deleted file mode 100644 index 458d8117ec..0000000000 --- a/changelog.d/1890.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix vendored dependencies so importing ``setuptools.extern.some_module`` gives the same object as ``setuptools._vendor.some_module``. This makes Metadata picklable again. \ No newline at end of file diff --git a/changelog.d/1899.change.rst b/changelog.d/1899.change.rst deleted file mode 100644 index 3076843956..0000000000 --- a/changelog.d/1899.change.rst +++ /dev/null @@ -1 +0,0 @@ -Test suite now fails on warnings. diff --git a/changelog.d/1991.misc.rst b/changelog.d/1991.misc.rst deleted file mode 100644 index ac6904a242..0000000000 --- a/changelog.d/1991.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Include pkg_resources test data in sdist, so tests can be executed from it. diff --git a/changelog.d/2011.doc.rst b/changelog.d/2011.doc.rst deleted file mode 100644 index e36fb6a727..0000000000 --- a/changelog.d/2011.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix broken link to distutils docs on package_data diff --git a/changelog.d/65.breaking.rst b/changelog.d/65.breaking.rst deleted file mode 100644 index bde427402f..0000000000 --- a/changelog.d/65.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Once again as in 3.0, removed the Features feature. diff --git a/setup.cfg b/setup.cfg index 2e65b7a188..d231a3e11e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 45.3.0 +version = 46.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From b13dcdee2f2ed9affdf9f52700710789f5a04803 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 16:37:43 -0400 Subject: [PATCH 7744/8469] Replace playbook with code for finalizing a release. --- docs/releases.txt | 40 ++++++-------------------------- tools/finalize.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++ tox.ini | 7 ++++++ 3 files changed, 73 insertions(+), 33 deletions(-) create mode 100644 tools/finalize.py diff --git a/docs/releases.txt b/docs/releases.txt index 98ba39e88d..35b415c265 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -3,39 +3,13 @@ Release Process =============== In order to allow for rapid, predictable releases, Setuptools uses a -mechanical technique for releases, enacted by Travis following a -successful build of a tagged release per -`PyPI deployment `_. - -Prior to cutting a release, please use `towncrier`_ to update -``CHANGES.rst`` to summarize the changes since the last release. -To update the changelog: - -1. Install towncrier via ``pip install towncrier`` if not already installed. -2. Preview the new ``CHANGES.rst`` entry by running - ``towncrier --draft --version {new.version.number}`` (enter the desired - version number for the next release). If any changes are needed, make - them and generate a new preview until the output is acceptable. Run - ``git add`` for any modified files. -3. Run ``towncrier --version {new.version.number}`` to stage the changelog - updates in git. -4. Verify that there are no remaining ``changelog.d/*.rst`` files. If a - file was named incorrectly, it may be ignored by towncrier. -5. Review the updated ``CHANGES.rst`` file. If any changes are needed, - make the edits and stage them via ``git add CHANGES.rst``. - -Once the changelog edits are staged and ready to commit, cut a release by -installing and running ``bump2version --allow-dirty {part}`` where ``part`` -is major, minor, or patch based on the scope of the changes in the -release. Then, push the commits to the master branch:: - - $ git push origin master - $ git push --tags - -If tests pass, the release will be uploaded to PyPI (from the Python 3.6 -tests). - -.. _towncrier: https://pypi.org/project/towncrier/ +mechanical technique for releases, enacted on tagged commits by +continuous integration. + +To finalize a release, run ``tox -e finalize``, review, then push +the changes. + +If tests pass, the release will be uploaded to PyPI. Release Frequency ----------------- diff --git a/tools/finalize.py b/tools/finalize.py new file mode 100644 index 0000000000..3b66341a80 --- /dev/null +++ b/tools/finalize.py @@ -0,0 +1,59 @@ +""" +Finalize the repo for a release. Invokes towncrier and bumpversion. +""" + +__requires__ = ['bump2version', 'towncrier'] + + +import subprocess +import pathlib +import re +import sys + + +def release_kind(): + """ + Determine which release to make based on the files in the + changelog. + """ + # use min here as 'major' < 'minor' < 'patch' + return min( + 'major' if 'breaking' in file.name else + 'minor' if 'change' in file.name else + 'patch' + for file in pathlib.Path('changelog.d').iterdir() + ) + + +bump_version_command = [ + sys.executable, + '-m', 'bumpversion', + release_kind(), +] + + +def get_version(): + cmd = bump_version_command + ['--dry-run', '--verbose'] + out = subprocess.check_output(cmd, text=True) + return re.search('^new_version=(.*)', out, re.MULTILINE).group(1) + + +def update_changelog(): + cmd = [ + sys.executable, '-m', + 'towncrier', + '--version', get_version(), + '--yes', + ] + subprocess.check_call(cmd) + + +def bump_version(): + cmd = bump_version_command + ['--allow-dirty'] + subprocess.check_call(cmd) + + +if __name__ == '__main__': + print("Cutting release at", get_version()) + update_changelog() + bump_version() diff --git a/tox.ini b/tox.ini index 1ebb922b5e..17201ca2a8 100644 --- a/tox.ini +++ b/tox.ini @@ -60,6 +60,13 @@ source= omit= */_vendor/* +[testenv:finalize] +deps = + towncrier + bump2version +commands = + python tools/finalize.py + [testenv:release] skip_install = True deps = From a04ec132fedb9d180f302b302fa16cfd194667d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 16:40:07 -0400 Subject: [PATCH 7745/8469] Avoid install during finalize --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 17201ca2a8..347106ec37 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ omit= */_vendor/* [testenv:finalize] +skip_install = True deps = towncrier bump2version From 6e7341b2cb740741d77e0184db2b9028b1b93773 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 10 Mar 2020 09:53:09 +0100 Subject: [PATCH 7746/8469] bpo-1294959: Add sys.platlibdir attribute (GH-18381) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan MatÄ›jek Co-Authored-By: MatÄ›j Cepl Co-Authored-By: Charalampos Stratakis --- command/install.py | 5 +++-- sysconfig.py | 11 +++++++++-- tests/test_install.py | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/command/install.py b/command/install.py index c625c95bf7..aaa300efa9 100644 --- a/command/install.py +++ b/command/install.py @@ -30,14 +30,14 @@ INSTALL_SCHEMES = { 'unix_prefix': { 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/lib/python$py_version_short/site-packages', + 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, 'unix_home': { 'purelib': '$base/lib/python', - 'platlib': '$base/lib/python', + 'platlib': '$base/$platlibdir/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base', @@ -298,6 +298,7 @@ def finalize_options(self): 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, 'abiflags': abiflags, + 'platlibdir': sys.platlibdir, } if HAS_USER_SITE: diff --git a/sysconfig.py b/sysconfig.py index b51629eb94..01ee519792 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -146,8 +146,15 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": - libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) + if plat_specific or standard_lib: + # Platform-specific modules (any module from a non-pure-Python + # module distribution) or standard Python library modules. + libdir = sys.platlibdir + else: + # Pure Python + libdir = "lib" + libpython = os.path.join(prefix, libdir, + "python" + get_python_version()) if standard_lib: return libpython else: diff --git a/tests/test_install.py b/tests/test_install.py index 287ab1989e..51c80e0421 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -58,7 +58,8 @@ def check_path(got, expected): libdir = os.path.join(destination, "lib", "python") check_path(cmd.install_lib, libdir) - check_path(cmd.install_platlib, libdir) + platlibdir = os.path.join(destination, sys.platlibdir, "python") + check_path(cmd.install_platlib, platlibdir) check_path(cmd.install_purelib, libdir) check_path(cmd.install_headers, os.path.join(destination, "include", "python", "foopkg")) From a753df58651cb2d685dc721a40b450a7dba611ce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 15:04:22 -0400 Subject: [PATCH 7747/8469] Suppress Pytest 5.4 warnings. Closes #2025 --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index af61043fb2..b13b7f3363 100644 --- a/pytest.ini +++ b/pytest.ini @@ -18,3 +18,5 @@ filterwarnings = # Suppress other Python 2 UnicodeWarnings ignore:Unicode equal comparison failed to convert:UnicodeWarning ignore:Unicode unequal comparison failed to convert:UnicodeWarning + # https://github.com/pypa/setuptools/issues/2025 + ignore:direct construction of .*Item has been deprecated:DeprecationWarning From 24fa288a98a14e6ec57b996b151a48203322c936 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 14:57:18 -0400 Subject: [PATCH 7748/8469] Extract method for validating version. --- setuptools/dist.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 7ffe0ba1fd..0f71dd9832 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -438,30 +438,35 @@ def __init__(self, attrs=None): value = default() if default else None setattr(self.metadata, option, value) - if isinstance(self.metadata.version, numbers.Number): + self.metadata.version = self._validate_version(self.metadata.version) + self._finalize_requires() + + @staticmethod + def _validate_version(version): + if isinstance(version, numbers.Number): # Some people apparently take "version number" too literally :) - self.metadata.version = str(self.metadata.version) + version = str(version) - if self.metadata.version is not None: + if version is not None: try: - ver = packaging.version.Version(self.metadata.version) + ver = packaging.version.Version(version) normalized_version = str(ver) - if self.metadata.version != normalized_version: + if version != normalized_version: warnings.warn( "Normalizing '%s' to '%s'" % ( - self.metadata.version, + version, normalized_version, ) ) - self.metadata.version = normalized_version + version = normalized_version except (packaging.version.InvalidVersion, TypeError): warnings.warn( "The version specified (%r) is an invalid version, this " "may not work as expected with newer versions of " "setuptools, pip, and PyPI. Please see PEP 440 for more " - "details." % self.metadata.version + "details." % version ) - self._finalize_requires() + return version def _finalize_requires(self): """ From a323a4962eef39b6af7c5d07cdeb88bb0c307ce4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 15:31:09 -0400 Subject: [PATCH 7749/8469] Extract method for normalization, allowing for bypass when the version is wrapped in 'sic'. Fixes #308. --- setuptools/__init__.py | 4 ++++ setuptools/dist.py | 28 +++++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 4485852f05..811f3fd2e8 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -224,5 +224,9 @@ def findall(dir=os.curdir): return list(files) +class sic(str): + """Treat this string as-is (https://en.wikipedia.org/wiki/Sic)""" + + # Apply monkey patches monkey.patch_all() diff --git a/setuptools/dist.py b/setuptools/dist.py index 0f71dd9832..a2f8ea0d00 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -30,6 +30,7 @@ from . import SetuptoolsDeprecationWarning +import setuptools from setuptools import windows_support from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration @@ -438,9 +439,22 @@ def __init__(self, attrs=None): value = default() if default else None setattr(self.metadata, option, value) - self.metadata.version = self._validate_version(self.metadata.version) + self.metadata.version = self._normalize_version( + self._validate_version(self.metadata.version)) self._finalize_requires() + @staticmethod + def _normalize_version(version): + if isinstance(version, setuptools.sic) or version is None: + return version + + normalized = str(packaging.version.Version(version)) + if version != normalized: + tmpl = "Normalizing '{version}' to '{normalized}'" + warnings.warn(tmpl.format(**locals())) + return normalized + return version + @staticmethod def _validate_version(version): if isinstance(version, numbers.Number): @@ -449,16 +463,7 @@ def _validate_version(version): if version is not None: try: - ver = packaging.version.Version(version) - normalized_version = str(ver) - if version != normalized_version: - warnings.warn( - "Normalizing '%s' to '%s'" % ( - version, - normalized_version, - ) - ) - version = normalized_version + packaging.version.Version(version) except (packaging.version.InvalidVersion, TypeError): warnings.warn( "The version specified (%r) is an invalid version, this " @@ -466,6 +471,7 @@ def _validate_version(version): "setuptools, pip, and PyPI. Please see PEP 440 for more " "details." % version ) + return setuptools.sic(version) return version def _finalize_requires(self): From 64c742406982f000e42dca065b4a34498312fb65 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 15:32:49 -0400 Subject: [PATCH 7750/8469] Add changelog entry. --- changelog.d/308.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/308.change.rst diff --git a/changelog.d/308.change.rst b/changelog.d/308.change.rst new file mode 100644 index 0000000000..5806d80ef0 --- /dev/null +++ b/changelog.d/308.change.rst @@ -0,0 +1 @@ +Allow version number normalization to be bypassed by wrapping in a 'setuptools.sic()' call. From b6076bee61984e6e05bf0d02e1daf09f0469e526 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 21:14:59 -0400 Subject: [PATCH 7751/8469] Add test capturing use-case for normalized version. Ref #308. --- setuptools/tests/test_dist.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 6e8c45fd30..26c271b142 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -139,6 +139,13 @@ def merge_dicts(d1, d2): {'name': 'foo', 'version': '1.0.0', 'author': 'Snorri Sturluson'}), + ( + 'Normalized version', + dict( + name='foo', + version='1.0.0a', + ), + ), ] return test_cases From b43c5b81b76d687b50b05f05155838c69919c42c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 21:43:11 -0400 Subject: [PATCH 7752/8469] Remove superfluous test and re-organize tests for clarity. --- setuptools/tests/test_dist.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 6e8c45fd30..97055d9759 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -125,8 +125,6 @@ def merge_dicts(d1, d2): merge_dicts(base_attrs, { 'provides_extras': ['foo', 'bar'] }), marks=pytest.mark.xfail(reason="provides_extras not read")), - ('Missing author, missing author e-mail', - {'name': 'foo', 'version': '1.0.0'}), ('Missing author', {'name': 'foo', 'version': '1.0.0', @@ -135,10 +133,8 @@ def merge_dicts(d1, d2): {'name': 'foo', 'version': '1.0.0', 'author': 'Snorri Sturluson'}), - ('Missing author', - {'name': 'foo', - 'version': '1.0.0', - 'author': 'Snorri Sturluson'}), + ('Missing author and e-mail', + {'name': 'foo', 'version': '1.0.0'}), ] return test_cases From 0e1c968f36a5d6cf268fe3f1ffca9405bb99e20d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 22:08:36 -0400 Subject: [PATCH 7753/8469] Trim up syntax on test cases, including removing hanging indents. --- setuptools/tests/test_dist.py | 110 +++++++++++++++++----------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 97055d9759..47c2de3e93 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -70,71 +70,69 @@ def test_dist__get_unpatched_deprecated(): def __read_test_cases(): - # Metadata version 1.0 - base_attrs = { - "name": "package", - "version": "0.0.1", - "author": "Foo Bar", - "author_email": "foo@bar.net", - "long_description": "Long\ndescription", - "description": "Short description", - "keywords": ["one", "two"] - } - - def merge_dicts(d1, d2): - d1 = d1.copy() - d1.update(d2) - - return d1 + base = dict( + name="package", + version="0.0.1", + author="Foo Bar", + author_email="foo@bar.net", + long_description="Long\ndescription", + description="Short description", + keywords=["one", "two"], + ) + + def params(**update): + return dict(base, **update) test_cases = [ - ('Metadata version 1.0', base_attrs.copy()), - ('Metadata version 1.1: Provides', merge_dicts(base_attrs, { - 'provides': ['package'] - })), - ('Metadata version 1.1: Obsoletes', merge_dicts(base_attrs, { - 'obsoletes': ['foo'] - })), - ('Metadata version 1.1: Classifiers', merge_dicts(base_attrs, { - 'classifiers': [ + ('Metadata version 1.0', params()), + ('Metadata version 1.1: Provides', params( + provides=['package'], + )), + ('Metadata version 1.1: Obsoletes', params( + obsoletes=['foo'], + )), + ('Metadata version 1.1: Classifiers', params( + classifiers=[ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', - ]})), - ('Metadata version 1.1: Download URL', merge_dicts(base_attrs, { - 'download_url': 'https://example.com' - })), - ('Metadata Version 1.2: Requires-Python', merge_dicts(base_attrs, { - 'python_requires': '>=3.7' - })), + ], + )), + ('Metadata version 1.1: Download URL', params( + download_url='https://example.com', + )), + ('Metadata Version 1.2: Requires-Python', params( + python_requires='>=3.7', + )), pytest.param( 'Metadata Version 1.2: Project-Url', - merge_dicts(base_attrs, { - 'project_urls': { - 'Foo': 'https://example.bar' - } - }), marks=pytest.mark.xfail( - reason="Issue #1578: project_urls not read" - )), - ('Metadata Version 2.1: Long Description Content Type', - merge_dicts(base_attrs, { - 'long_description_content_type': 'text/x-rst; charset=UTF-8' - })), + params(project_urls=dict(Foo='https://example.bar')), + marks=pytest.mark.xfail( + reason="Issue #1578: project_urls not read", + ), + ), + ('Metadata Version 2.1: Long Description Content Type', params( + long_description_content_type='text/x-rst; charset=UTF-8', + )), pytest.param( 'Metadata Version 2.1: Provides Extra', - merge_dicts(base_attrs, { - 'provides_extras': ['foo', 'bar'] - }), marks=pytest.mark.xfail(reason="provides_extras not read")), - ('Missing author', - {'name': 'foo', - 'version': '1.0.0', - 'author_email': 'snorri@sturluson.name'}), - ('Missing author e-mail', - {'name': 'foo', - 'version': '1.0.0', - 'author': 'Snorri Sturluson'}), - ('Missing author and e-mail', - {'name': 'foo', 'version': '1.0.0'}), + params(provides_extras=['foo', 'bar']), + marks=pytest.mark.xfail(reason="provides_extras not read"), + ), + ('Missing author', dict( + name='foo', + version='1.0.0', + author_email='snorri@sturluson.name', + )), + ('Missing author e-mail', dict( + name='foo', + version='1.0.0', + author='Snorri Sturluson', + )), + ('Missing author and e-mail', dict( + name='foo', + version='1.0.0', + )), ] return test_cases From b8c2ae517db14b03dfba263aa66707ca67ecee8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 15 Mar 2020 22:22:04 -0400 Subject: [PATCH 7754/8469] Rely on partial now that pattern makes sense --- setuptools/tests/test_dist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 47c2de3e93..a9837b1657 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -5,6 +5,7 @@ import io import collections import re +import functools from distutils.errors import DistutilsSetupError from setuptools.dist import ( _get_unpatched, @@ -80,8 +81,7 @@ def __read_test_cases(): keywords=["one", "two"], ) - def params(**update): - return dict(base, **update) + params = functools.partial(dict, base) test_cases = [ ('Metadata version 1.0', params()), From 8356ff3c6816d2a075098421252e096955d1fdbd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2020 21:43:22 -0400 Subject: [PATCH 7755/8469] Trim excess whitespace --- setuptools/tests/test_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index c531b440d6..531ea1b417 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -137,7 +137,7 @@ def __read_test_cases(): ('Bypass normalized version', dict( name='foo', version=sic('1.0.0a'), - )), + )), ] return test_cases From a3e1afead418ae25119bf19a587d9696c27beb9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 05:13:37 -0400 Subject: [PATCH 7756/8469] Rename changefile and clean up changelog. --- changelog.d/1431.change.rst | 1 + changelog.d/1431.chnage.rst | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 changelog.d/1431.change.rst delete mode 100644 changelog.d/1431.chnage.rst diff --git a/changelog.d/1431.change.rst b/changelog.d/1431.change.rst new file mode 100644 index 0000000000..a3848afad7 --- /dev/null +++ b/changelog.d/1431.change.rst @@ -0,0 +1 @@ +In ``easy_install.check_site_dir``, ensure the installation directory exists. diff --git a/changelog.d/1431.chnage.rst b/changelog.d/1431.chnage.rst deleted file mode 100644 index a5cb324e3c..0000000000 --- a/changelog.d/1431.chnage.rst +++ /dev/null @@ -1,3 +0,0 @@ -Make install directory if it doesn't exist yet to prevent Fedora's -specific setup to blow up if ``/usr/local/lib/pythonX.Y/site-packages`` -doesn't exist yet. From 7db9dc2fc4b64e45979dc17ff844f997ff9fa63c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 05:38:29 -0400 Subject: [PATCH 7757/8469] Update changelog entry --- changelog.d/1563.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/1563.change.rst b/changelog.d/1563.change.rst index a2452cd824..4ae1638448 100644 --- a/changelog.d/1563.change.rst +++ b/changelog.d/1563.change.rst @@ -1 +1 @@ -If find_module fails or does not exist, attempt to use find_spec(...).loader +In ``pkg_resources`` prefer ``find_spec`` (PEP 451) to ``find_module``. From 6b5a5872503290d6c90ab18cd72e46776977064a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 05:41:02 -0400 Subject: [PATCH 7758/8469] Trap AttributeError in exactly one place. --- pkg_resources/__init__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index deea96b9ba..2f6c0cbf8a 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2102,14 +2102,10 @@ def _handle_ns(packageName, path_item): try: loader = importer.find_spec(packageName).loader except AttributeError: - try: - # capture warnings due to #1111 - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - loader = importer.find_module(packageName) - except AttributeError: - # not a system module - loader = None + # capture warnings due to #1111 + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + loader = importer.find_module(packageName) if loader is None: return None From 52e718872259617203556e4889d451167f209343 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 06:28:17 -0400 Subject: [PATCH 7759/8469] Add test capturing expectation. Ref #1451. --- setuptools/tests/test_build_py.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index b3a99f5660..92b455ddca 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -1,4 +1,6 @@ import os +import stat +import shutil from setuptools.dist import Distribution @@ -20,3 +22,28 @@ def test_directories_in_package_data_glob(tmpdir_cwd): os.makedirs('path/subpath') dist.parse_command_line() dist.run_commands() + + +def test_read_only(tmpdir_cwd): + """ + Ensure mode is not preserved in copy for package modules + and package data, as that causes problems + with deleting read-only files on Windows. + + #1451 + """ + dist = Distribution(dict( + script_name='setup.py', + script_args=['build_py'], + packages=['pkg'], + package_data={'pkg': ['data.dat']}, + name='pkg', + )) + os.makedirs('pkg') + open('pkg/__init__.py', 'w').close() + open('pkg/data.dat', 'w').close() + os.chmod('pkg/__init__.py', stat.S_IREAD) + os.chmod('pkg/data.dat', stat.S_IREAD) + dist.parse_command_line() + dist.run_commands() + shutil.rmtree('build') From b1abc23f0124de8ad99149674613ff8e2c71706a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 16:37:43 -0400 Subject: [PATCH 7760/8469] Replace playbook with code for finalizing a release. --- docs/releases.txt | 40 ++++++-------------------------- tools/finalize.py | 59 +++++++++++++++++++++++++++++++++++++++++++++++ tox.ini | 7 ++++++ 3 files changed, 73 insertions(+), 33 deletions(-) create mode 100644 tools/finalize.py diff --git a/docs/releases.txt b/docs/releases.txt index 98ba39e88d..35b415c265 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -3,39 +3,13 @@ Release Process =============== In order to allow for rapid, predictable releases, Setuptools uses a -mechanical technique for releases, enacted by Travis following a -successful build of a tagged release per -`PyPI deployment `_. - -Prior to cutting a release, please use `towncrier`_ to update -``CHANGES.rst`` to summarize the changes since the last release. -To update the changelog: - -1. Install towncrier via ``pip install towncrier`` if not already installed. -2. Preview the new ``CHANGES.rst`` entry by running - ``towncrier --draft --version {new.version.number}`` (enter the desired - version number for the next release). If any changes are needed, make - them and generate a new preview until the output is acceptable. Run - ``git add`` for any modified files. -3. Run ``towncrier --version {new.version.number}`` to stage the changelog - updates in git. -4. Verify that there are no remaining ``changelog.d/*.rst`` files. If a - file was named incorrectly, it may be ignored by towncrier. -5. Review the updated ``CHANGES.rst`` file. If any changes are needed, - make the edits and stage them via ``git add CHANGES.rst``. - -Once the changelog edits are staged and ready to commit, cut a release by -installing and running ``bump2version --allow-dirty {part}`` where ``part`` -is major, minor, or patch based on the scope of the changes in the -release. Then, push the commits to the master branch:: - - $ git push origin master - $ git push --tags - -If tests pass, the release will be uploaded to PyPI (from the Python 3.6 -tests). - -.. _towncrier: https://pypi.org/project/towncrier/ +mechanical technique for releases, enacted on tagged commits by +continuous integration. + +To finalize a release, run ``tox -e finalize``, review, then push +the changes. + +If tests pass, the release will be uploaded to PyPI. Release Frequency ----------------- diff --git a/tools/finalize.py b/tools/finalize.py new file mode 100644 index 0000000000..3b66341a80 --- /dev/null +++ b/tools/finalize.py @@ -0,0 +1,59 @@ +""" +Finalize the repo for a release. Invokes towncrier and bumpversion. +""" + +__requires__ = ['bump2version', 'towncrier'] + + +import subprocess +import pathlib +import re +import sys + + +def release_kind(): + """ + Determine which release to make based on the files in the + changelog. + """ + # use min here as 'major' < 'minor' < 'patch' + return min( + 'major' if 'breaking' in file.name else + 'minor' if 'change' in file.name else + 'patch' + for file in pathlib.Path('changelog.d').iterdir() + ) + + +bump_version_command = [ + sys.executable, + '-m', 'bumpversion', + release_kind(), +] + + +def get_version(): + cmd = bump_version_command + ['--dry-run', '--verbose'] + out = subprocess.check_output(cmd, text=True) + return re.search('^new_version=(.*)', out, re.MULTILINE).group(1) + + +def update_changelog(): + cmd = [ + sys.executable, '-m', + 'towncrier', + '--version', get_version(), + '--yes', + ] + subprocess.check_call(cmd) + + +def bump_version(): + cmd = bump_version_command + ['--allow-dirty'] + subprocess.check_call(cmd) + + +if __name__ == '__main__': + print("Cutting release at", get_version()) + update_changelog() + bump_version() diff --git a/tox.ini b/tox.ini index 2d43e76fc5..b106922096 100644 --- a/tox.ini +++ b/tox.ini @@ -58,6 +58,13 @@ source= omit= */_vendor/* +[testenv:finalize] +deps = + towncrier + bump2version +commands = + python tools/finalize.py + [testenv:release] skip_install = True deps = From c020b5f88579487350ea38a40d3ea2cab1318144 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 8 Mar 2020 16:40:07 -0400 Subject: [PATCH 7761/8469] Avoid install during finalize --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index b106922096..3fc6a56480 100644 --- a/tox.ini +++ b/tox.ini @@ -59,6 +59,7 @@ omit= */_vendor/* [testenv:finalize] +skip_install = True deps = towncrier bump2version From 1988125e800b3b64f9cf9311fea5525cc81546f9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 14:41:31 -0400 Subject: [PATCH 7762/8469] =?UTF-8?q?Bump=20version:=2044.0.0=20=E2=86=92?= =?UTF-8?q?=2044.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 3 +-- CHANGES.rst | 8 ++++++++ changelog.d/1704.change.rst | 1 - changelog.d/1959.change.rst | 1 - changelog.d/1994.change.rst | 1 - setup.cfg | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/1704.change.rst delete mode 100644 changelog.d/1959.change.rst delete mode 100644 changelog.d/1994.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e1bfa89859..c8c9f544bf 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,6 @@ [bumpversion] -current_version = 44.0.0 +current_version = 44.1.0 commit = True tag = True [bumpversion:file:setup.cfg] - diff --git a/CHANGES.rst b/CHANGES.rst index 109a3f480f..83cd8c784b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v44.1.0 +------- + +* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ +* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 +* #1994: Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook. + + v44.0.0 ------- diff --git a/changelog.d/1704.change.rst b/changelog.d/1704.change.rst deleted file mode 100644 index 62450835b9..0000000000 --- a/changelog.d/1704.change.rst +++ /dev/null @@ -1 +0,0 @@ -Set sys.argv[0] in setup script run by build_meta.__legacy__ diff --git a/changelog.d/1959.change.rst b/changelog.d/1959.change.rst deleted file mode 100644 index c0cc8975e3..0000000000 --- a/changelog.d/1959.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fix for Python 4: replace unsafe six.PY3 with six.PY2 diff --git a/changelog.d/1994.change.rst b/changelog.d/1994.change.rst deleted file mode 100644 index 4a6cc74298..0000000000 --- a/changelog.d/1994.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook. diff --git a/setup.cfg b/setup.cfg index ecef86098a..cb5ae73bc4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 44.0.0 +version = 44.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From ee4d0dd1c0bd4c3efb6d2b933c2027e88917bfd1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 14:45:16 -0400 Subject: [PATCH 7763/8469] =?UTF-8?q?Bump=20version:=2046.0.0=20=E2=86=92?= =?UTF-8?q?=2046.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 15 +++++++++++++++ changelog.d/1424.change.rst | 1 - changelog.d/1431.change.rst | 1 - changelog.d/1563.change.rst | 1 - changelog.d/308.change.rst | 1 - setup.cfg | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/1424.change.rst delete mode 100644 changelog.d/1431.change.rst delete mode 100644 changelog.d/1563.change.rst delete mode 100644 changelog.d/308.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8f2ef1d856..28a327b2f8 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.0.0 +current_version = 46.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 1e8da46ef4..12680a4d20 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,18 @@ +v46.1.0 +------- + +* #308: Allow version number normalization to be bypassed by wrapping in a 'setuptools.sic()' call. +* #1424: Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag. +* #1431: In ``easy_install.check_site_dir``, ensure the installation directory exists. +* #1563: In ``pkg_resources`` prefer ``find_spec`` (PEP 451) to ``find_module``. + +Incorporate changes from v44.1.0: + +* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ +* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 +* #1994: Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook. + + v44.1.0 ------- diff --git a/changelog.d/1424.change.rst b/changelog.d/1424.change.rst deleted file mode 100644 index 361997ddd6..0000000000 --- a/changelog.d/1424.change.rst +++ /dev/null @@ -1 +0,0 @@ -Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag. \ No newline at end of file diff --git a/changelog.d/1431.change.rst b/changelog.d/1431.change.rst deleted file mode 100644 index a3848afad7..0000000000 --- a/changelog.d/1431.change.rst +++ /dev/null @@ -1 +0,0 @@ -In ``easy_install.check_site_dir``, ensure the installation directory exists. diff --git a/changelog.d/1563.change.rst b/changelog.d/1563.change.rst deleted file mode 100644 index 4ae1638448..0000000000 --- a/changelog.d/1563.change.rst +++ /dev/null @@ -1 +0,0 @@ -In ``pkg_resources`` prefer ``find_spec`` (PEP 451) to ``find_module``. diff --git a/changelog.d/308.change.rst b/changelog.d/308.change.rst deleted file mode 100644 index 5806d80ef0..0000000000 --- a/changelog.d/308.change.rst +++ /dev/null @@ -1 +0,0 @@ -Allow version number normalization to be bypassed by wrapping in a 'setuptools.sic()' call. diff --git a/setup.cfg b/setup.cfg index d231a3e11e..0e9a05ed53 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.0.0 +version = 46.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 512565ee5090b8c1b685102c9ffb6195c99e32c2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:00:03 -0400 Subject: [PATCH 7764/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setuptools/command/build_py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 6fc0a4e46d..bac4fb1c93 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -120,7 +120,8 @@ def build_package_data(self): target = os.path.join(build_dir, filename) self.mkpath(os.path.dirname(target)) srcfile = os.path.join(src_dir, filename) - outf, copied = self.copy_file(srcfile, target, preserve_mode=False) + outf, copied = self.copy_file( + srcfile, target, preserve_mode=False) srcfile = os.path.abspath(srcfile) if (copied and srcfile in self.distribution.convert_2to3_doctests): From 936a8c68afacd56d4bcdf8412fe0c9ed6fe4dc09 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:01:02 -0400 Subject: [PATCH 7765/8469] Update changelog. Ref #1424. --- changelog.d/1424.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1424.bugfix.rst diff --git a/changelog.d/1424.bugfix.rst b/changelog.d/1424.bugfix.rst new file mode 100644 index 0000000000..2c7209f226 --- /dev/null +++ b/changelog.d/1424.bugfix.rst @@ -0,0 +1 @@ +Fixed lint error (long line) in #1424. From 87fbe76a1d544a14abea34ca0824096eb7c37b38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:01:42 -0400 Subject: [PATCH 7766/8469] =?UTF-8?q?Bump=20version:=2046.1.0=20=E2=86=92?= =?UTF-8?q?=2046.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 28a327b2f8..03fe7b43fd 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.1.0 +current_version = 46.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 12680a4d20..1edbd12acb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v46.1.1 +------- + +No significant changes. + + v46.1.0 ------- diff --git a/setup.cfg b/setup.cfg index 0e9a05ed53..1442618182 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.1.0 +version = 46.1.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 7bdef458b4b35e0a8fa7025266c7c1aa6b0f20c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:06:44 -0400 Subject: [PATCH 7767/8469] Add badge for Azure pipelines --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index da0549a98a..8a6bf91d5d 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,9 @@ .. image:: https://img.shields.io/readthedocs/setuptools/latest.svg :target: https://setuptools.readthedocs.io +.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/jaraco.setuptools?branchName=master + :target: https://dev.azure.com/jaraco/setuptools/_build/latest?definitionId=1&branchName=master + .. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white :target: https://travis-ci.org/pypa/setuptools From 5a1e4ea8a0671fc2e9d7559ae4e07ba1afe53d59 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:11:25 -0400 Subject: [PATCH 7768/8469] Solicit tidelift token from environment variables. Add Funding.yml. --- .github/FUNDING.yml | 1 + azure-pipelines.yml | 1 + 2 files changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..27de01d019 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: pypi/setuptools diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3e80bf443d..0253a770c0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,6 +66,7 @@ stages: tox -e release env: TWINE_PASSWORD: $(PyPI-token) + TIDELIFT_TOKEN: $(Tidelift-token) displayName: 'publish to PyPI' condition: contains(variables['Build.SourceBranch'], 'tags') From 487ec9bc067e823bfe8c725f15fed452b6e3adc6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:14:24 -0400 Subject: [PATCH 7769/8469] Sync badges with jaraco/skeleton --- README.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 8a6bf91d5d..6caaa75640 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,10 @@ .. image:: https://img.shields.io/pypi/v/setuptools.svg - :target: https://pypi.org/project/setuptools + :target: `PyPI link`_ -.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg - :target: https://setuptools.readthedocs.io +.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg + :target: `PyPI link`_ + +.. _PyPI link: https://pypi.org/project/setuptools .. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/jaraco.setuptools?branchName=master :target: https://dev.azure.com/jaraco/setuptools/_build/latest?definitionId=1&branchName=master @@ -13,14 +15,15 @@ .. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master +.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg + :target: https://setuptools.readthedocs.io + .. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white :target: https://codecov.io/gh/pypa/setuptools .. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme -.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg - See the `Installation Instructions `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From f63c4335178512ad1db730222d54fc0df84ae798 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:15:53 -0400 Subject: [PATCH 7770/8469] Remove deploy step from travis. Let Azure pipelines cut the release. --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 38a66f3215..3e97f353aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,11 +21,6 @@ jobs: - python: 3.8-dev - <<: *latest_py3 env: TOXENV=docs DISABLE_COVERAGE=1 - - <<: *latest_py3 - stage: deploy - if: tag IS present - script: tox -e release - after_success: skip allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 From e581a6186ffb7f00be82182543e833d7f0756510 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 21 Mar 2020 15:19:46 -0400 Subject: [PATCH 7771/8469] Remove changelog entry, intended for v46.1.1 --- changelog.d/1424.bugfix.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog.d/1424.bugfix.rst diff --git a/changelog.d/1424.bugfix.rst b/changelog.d/1424.bugfix.rst deleted file mode 100644 index 2c7209f226..0000000000 --- a/changelog.d/1424.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed lint error (long line) in #1424. From 9781208e4c78509ae0e819bf3da472190c5a7bc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 10:51:10 -0400 Subject: [PATCH 7772/8469] Add template for Python 2 incompatibility --- ...ls-warns-about-python-2-incompatibility.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md new file mode 100644 index 0000000000..4bed6c4f32 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -0,0 +1,48 @@ +--- +name: Setuptools warns about Python 2 incompatibility +about: Report the issue where setuptools 45 or later stops working on Python 2 +title: Incompatible install in (summarize your environment) +labels: Python 2 +assignees: '' + +--- + + + +## Prerequisites + + + +- [ ] Python 2 is required for this application. +- [ ] Setuptools installed with pip 9 or later. +- [ ] Pinning Setuptools to `setuptools<45` in the environment was unsuccessful. + +## Environment Details + +- Operating System and version: +- Python version: +- Python installed how: +- Virtualenv version (if using virtualenv): n/a + +Command(s) used to install setuptools (and output): + +``` +``` + +Output of `pip --version` when installing setuptools: + +``` +``` + +## Other notes From 734eec6e3fca725c6b18cad2fffbd1f3e3a56fa7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 10:57:15 -0400 Subject: [PATCH 7773/8469] Update warning message to direct users to file a template instead of commenting in #1458. --- changelog.d/1458.misc.rst | 1 + pkg_resources/py2_warn.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelog.d/1458.misc.rst diff --git a/changelog.d/1458.misc.rst b/changelog.d/1458.misc.rst new file mode 100644 index 0000000000..6a8e58a3e9 --- /dev/null +++ b/changelog.d/1458.misc.rst @@ -0,0 +1 @@ +Added template for reporting Python 2 incompatibilities. diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py index 1b15195626..bfc3523415 100644 --- a/pkg_resources/py2_warn.py +++ b/pkg_resources/py2_warn.py @@ -12,9 +12,8 @@ Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering - this message, please comment in - https://github.com/pypa/setuptools/issues/1458 - about the steps that led to this unsupported combination. + this message, please follow up at + https://bit.ly/setuptools-py2-warning. """) pre = "Setuptools will stop working on Python 2\n" From 7355cce542963d9a83c7c754dc63a0c7e68bf3aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 11:05:13 -0400 Subject: [PATCH 7774/8469] Update py2 warning template to direct users to report downstream. --- .../setuptools-warns-about-python-2-incompatibility.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md index 4bed6c4f32..14317d9367 100644 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -25,6 +25,7 @@ Your first course of action should be to reason about how you managed to get an try them first. --> - [ ] Python 2 is required for this application. +- [ ] I maintain the software that installs Setuptools (if not, please contact that project). - [ ] Setuptools installed with pip 9 or later. - [ ] Pinning Setuptools to `setuptools<45` in the environment was unsuccessful. From db08c60c303d64459dae479af84e3cd1cd02ba1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 11:05:51 -0400 Subject: [PATCH 7775/8469] =?UTF-8?q?Bump=20version:=2046.1.1=20=E2=86=92?= =?UTF-8?q?=2046.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/1458.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1458.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 03fe7b43fd..4a54253c72 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.1.1 +current_version = 46.1.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 1edbd12acb..672355af58 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v46.1.2 +------- + +* #1458: Added template for reporting Python 2 incompatibilities. + + v46.1.1 ------- diff --git a/changelog.d/1458.misc.rst b/changelog.d/1458.misc.rst deleted file mode 100644 index 6a8e58a3e9..0000000000 --- a/changelog.d/1458.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added template for reporting Python 2 incompatibilities. diff --git a/setup.cfg b/setup.cfg index 1442618182..8347dede59 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.1.1 +version = 46.1.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From a3620a45b3df9be32316bd8807ca5a83c1380c9a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 13:29:50 -0400 Subject: [PATCH 7776/8469] Add test asserting that an executable script retains its executable bit. Ref #2041. --- setuptools/tests/test_build_py.py | 33 ++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index 92b455ddca..4cb11c1d33 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -26,9 +26,10 @@ def test_directories_in_package_data_glob(tmpdir_cwd): def test_read_only(tmpdir_cwd): """ - Ensure mode is not preserved in copy for package modules - and package data, as that causes problems - with deleting read-only files on Windows. + Ensure read-only flag is not preserved in copy + for package modules and package data, as that + causes problems with deleting read-only files on + Windows. #1451 """ @@ -47,3 +48,29 @@ def test_read_only(tmpdir_cwd): dist.parse_command_line() dist.run_commands() shutil.rmtree('build') + + +def test_executable_data(tmpdir_cwd): + """ + Ensure executable bit is preserved in copy for + package data, as users rely on it for scripts. + + #2041 + """ + dist = Distribution(dict( + script_name='setup.py', + script_args=['build_py'], + packages=['pkg'], + package_data={'pkg': ['run-me']}, + name='pkg', + )) + os.makedirs('pkg') + open('pkg/__init__.py', 'w').close() + open('pkg/run-me', 'w').close() + os.chmod('pkg/run-me', 0o700) + + dist.parse_command_line() + dist.run_commands() + + assert os.stat('build/lib/pkg/run-me').st_mode & stat.S_IEXEC, \ + "Script is not executable" From 70e95ee66a17e1655f70c9dbda107cea958f583f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 13:44:58 -0400 Subject: [PATCH 7777/8469] When copying package data, make sure it's writable, but otherwise preserve the mode. Fixes #2041. --- setuptools/command/build_py.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index bac4fb1c93..9d0288a50d 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -7,6 +7,7 @@ import io import distutils.errors import itertools +import stat from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse @@ -20,6 +21,10 @@ def run_2to3(self, files, doctests=True): "do nothing" +def make_writable(target): + os.chmod(target, os.stat(target).st_mode | stat.S_IWRITE) + + class build_py(orig.build_py, Mixin2to3): """Enhanced 'build_py' command that includes data files with packages @@ -120,8 +125,8 @@ def build_package_data(self): target = os.path.join(build_dir, filename) self.mkpath(os.path.dirname(target)) srcfile = os.path.join(src_dir, filename) - outf, copied = self.copy_file( - srcfile, target, preserve_mode=False) + outf, copied = self.copy_file(srcfile, target) + make_writable(target) srcfile = os.path.abspath(srcfile) if (copied and srcfile in self.distribution.convert_2to3_doctests): From 8f8302da51016c6c98cf29417819fd0907e3993a Mon Sep 17 00:00:00 2001 From: jorikdima Date: Tue, 24 Mar 2020 20:21:35 -0700 Subject: [PATCH 7778/8469] Added description. --- changelog.d/2041.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2041.bugfix.rst diff --git a/changelog.d/2041.bugfix.rst b/changelog.d/2041.bugfix.rst new file mode 100644 index 0000000000..8db757d89d --- /dev/null +++ b/changelog.d/2041.bugfix.rst @@ -0,0 +1 @@ +Preserve file modes during pkg files copying, but clear read only flag for target afterwards. From ef3a38644ccc9f65ea20493e25de0955695b9dff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 14:00:29 -0400 Subject: [PATCH 7779/8469] Mark test_executable_data as xfail on Windows. --- setuptools/tests/test_build_py.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py index 4cb11c1d33..78a31ac49e 100644 --- a/setuptools/tests/test_build_py.py +++ b/setuptools/tests/test_build_py.py @@ -2,6 +2,8 @@ import stat import shutil +import pytest + from setuptools.dist import Distribution @@ -50,6 +52,12 @@ def test_read_only(tmpdir_cwd): shutil.rmtree('build') +@pytest.mark.xfail( + 'platform.system() == "Windows"', + reason="On Windows, files do not have executable bits", + raises=AssertionError, + strict=True, +) def test_executable_data(tmpdir_cwd): """ Ensure executable bit is preserved in copy for From 3aeec3f0e989516e9229d9a75f5a038929dee6a6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 25 Mar 2020 14:27:44 -0400 Subject: [PATCH 7780/8469] =?UTF-8?q?Bump=20version:=2046.1.2=20=E2=86=92?= =?UTF-8?q?=2046.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4a54253c72..00cbdc7a3b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.1.2 +current_version = 46.1.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 672355af58..ac61c17882 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v46.1.3 +------- + +No significant changes. + + v46.1.2 ------- diff --git a/setup.cfg b/setup.cfg index 8347dede59..60838efce3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.1.2 +version = 46.1.3 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 578d2eca7232d429225d7de55f934ab303ad6f3f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 29 Mar 2020 21:40:38 -0400 Subject: [PATCH 7781/8469] initial draft for build_meta documentation --- docs/build_meta.txt | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 docs/build_meta.txt diff --git a/docs/build_meta.txt b/docs/build_meta.txt new file mode 100644 index 0000000000..bfba118193 --- /dev/null +++ b/docs/build_meta.txt @@ -0,0 +1,88 @@ +======================================= +Documentation to setuptools.build_meta +======================================= + +What is it? +------------- + +Setuptools, or Python packaging in general, has faced many +`criticism `_ and +`PEP517 `_ attempts to fix this +issue by ``get distutils-sig out of the business of being a gatekeeper for +Python build system``. + +A quick overview on the `current state of Python packaging +`_. The ``distutils`` +package specified the de facto standard way to bundle up your packages:: + + setup.py + mypkg/__init__.py + +And then you run ``python setup.py bdist`` and compressed ``.tar.gz`` will be +available for distribution. + +Following this tradition, several other enhancements have been made: ``pip`` +was created and user can run ``pip install`` on their downloaded distribution +file and it will be installed. ``wheel`` format was created to minimize the +build process for C extension. ``PyPI`` and ``twine`` then made it easier to +upload and download the distribution and finally ``setuptools`` extends the +original ``distutils`` and emcompass everything else and become the standard +way for Python packaging. (check the timeline for accuracy) + +I'll skip the many downsides and complexity that came with the development +of setuptools. PEP517 aims to solve these issues by specifying a new +standardized way to distribute your packages which is not as compatible as +the setuptools module. + +``build_meta.py`` therefore acts as an adaptor to the PEP517 and the existing +setuptools. + +How to use it? +------------- + +Starting with a package that you want to distribute. You will need your source +scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file. + + ~/meowpkg/ + pyproject.toml + setup.cfg + src/meowpkg/__init__.py + + +The pyproject.toml file is required by PEP517 and PEP518 to specify the build +system (i.e. what is being used to package your scripts). To use it with +setuptools, the content would be:: + + [build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build-meta" + +The setup.cfg is used to specify your package information (essentially +replacing setup.py), specified on setuptools `documentation `_ :: + + [metadata] + name = meowpkg + version = 0.0.1 + description = a package that meows + + [options] + package_dir= + =src + packages = find: + + [options.packages.find] + where=src + +Now it's time to actually generate the distribution. PEP517 specifies two +mandatory functions, ``build_wheel`` and ``build_sdist``, implemented in +this module. Currently, it has to be done in the interpreter:: + + >>> import setuptools.build_meta + >>> setuptools.build_meta.build_wheel('wheel_dist') + 'meowpkg-0.0.1-py3-none-any.whl' + +And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed +and installed! + From cc7186cde4238e9269beb2b19720380990759299 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 30 Mar 2020 13:25:17 -0400 Subject: [PATCH 7782/8469] First draft for build_meta documentation --- docs/build_meta.txt | 98 ++++++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index bfba118193..47e0aa7485 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -5,37 +5,39 @@ Documentation to setuptools.build_meta What is it? ------------- -Setuptools, or Python packaging in general, has faced many -`criticism `_ and -`PEP517 `_ attempts to fix this -issue by ``get distutils-sig out of the business of being a gatekeeper for -Python build system``. - -A quick overview on the `current state of Python packaging -`_. The ``distutils`` -package specified the de facto standard way to bundle up your packages:: - - setup.py - mypkg/__init__.py - -And then you run ``python setup.py bdist`` and compressed ``.tar.gz`` will be -available for distribution. - -Following this tradition, several other enhancements have been made: ``pip`` -was created and user can run ``pip install`` on their downloaded distribution -file and it will be installed. ``wheel`` format was created to minimize the -build process for C extension. ``PyPI`` and ``twine`` then made it easier to -upload and download the distribution and finally ``setuptools`` extends the -original ``distutils`` and emcompass everything else and become the standard -way for Python packaging. (check the timeline for accuracy) - -I'll skip the many downsides and complexity that came with the development -of setuptools. PEP517 aims to solve these issues by specifying a new -standardized way to distribute your packages which is not as compatible as -the setuptools module. - -``build_meta.py`` therefore acts as an adaptor to the PEP517 and the existing -setuptools. +Python packaging has come `a long way `_. + +The traditional ``setuptools``'s way of packgaging Python modules +uses a ``setup()`` function within the ``setup.py`` script. Commands such as +``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a +distribution bundle and ``python setup.py install`` installs the distribution. +This interface makes it difficult to choose other packaging tools without an +overhaul. Additionally, the ``setup.py`` scripts hasn't been the most user +friendly tool. + +PEP517 therefore came to rescue and specified a new standard to +package and distribute Python modules. Under PEP517: + + a ``pyproject.toml`` file is used to specify what program to use + for generating distribution. + + Then, two functions provided by the program,``build_wheel(directory: str)`` + and ``build_sdist(directory: str)`` create the distribution bundle at the + specified ``directory``. The program is free to use its own configuration + script or extend the ``.toml`` file. + + Lastly, ``pip install *.whl`` or ``pip install *.tar.gz`` does the actual + installation. If ``*.whl`` is available, ``pip`` will go ahead and copy + the files into ``site-packages`` directory. If not, ``pip`` will look at + ``pyproject.toml`` and decide what program to use to 'build from source' + (the default is ``setuptools``) + +With this standard, switching between packaging tools becomes a lot easier and +in the case of ``setuptools``, ``setup.py`` becomes optional. + +``build_meta`` is ``setuptools``'s implementation of PEP517. It provides the +two functions, ``build_wheel`` and ``build_sdist``, amongst others and uses +a ``setup.cfg`` to specify the information about the package. How to use it? ------------- @@ -46,21 +48,20 @@ scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file. ~/meowpkg/ pyproject.toml setup.cfg - src/meowpkg/__init__.py + meowpkg/__init__.py -The pyproject.toml file is required by PEP517 and PEP518 to specify the build -system (i.e. what is being used to package your scripts). To use it with +The pyproject.toml file is required to specify the build system (i.e. what is +being used to package your scripts and install from source). To use it with setuptools, the content would be:: [build-system] requires = ["setuptools", "wheel"] - build-backend = "setuptools.build-meta" + build-backend = "setuptools.build_meta" -The setup.cfg is used to specify your package information (essentially -replacing setup.py), specified on setuptools `documentation `_ :: +``setup.cfg`` is used to specify your package information, specified +`here `_ :: [metadata] name = meowpkg @@ -68,13 +69,8 @@ using-setup-cfg-files>`_ :: description = a package that meows [options] - package_dir= - =src packages = find: - [options.packages.find] - where=src - Now it's time to actually generate the distribution. PEP517 specifies two mandatory functions, ``build_wheel`` and ``build_sdist``, implemented in this module. Currently, it has to be done in the interpreter:: @@ -82,7 +78,19 @@ this module. Currently, it has to be done in the interpreter:: >>> import setuptools.build_meta >>> setuptools.build_meta.build_wheel('wheel_dist') 'meowpkg-0.0.1-py3-none-any.whl' + >>> setuptools.build_meta.build_sdist('sdist') + 'meowpkg-0.0.1.tar.gz' And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed -and installed! +and installed:: + + ~/newcomputer/ + meowpkg-0.0.1.whl + meowpkg-0.0.1.tar.gz + + $ pip install meowpkg-0.0.1.whl + +or:: + + $ pip install meowpkg-0.0.1.tar.gz From b5697f4458e0a2bbdb0d5a46222bb7e7adad8071 Mon Sep 17 00:00:00 2001 From: alvyjudy <53921639+alvyjudy@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:27:31 -0400 Subject: [PATCH 7783/8469] deleted blank lines and fixed underline --- docs/build_meta.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index 47e0aa7485..8d92d80462 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -40,7 +40,7 @@ two functions, ``build_wheel`` and ``build_sdist``, amongst others and uses a ``setup.cfg`` to specify the information about the package. How to use it? -------------- +-------------- Starting with a package that you want to distribute. You will need your source scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file. @@ -49,8 +49,7 @@ scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file. pyproject.toml setup.cfg meowpkg/__init__.py - - + The pyproject.toml file is required to specify the build system (i.e. what is being used to package your scripts and install from source). To use it with setuptools, the content would be:: From 71af92d2e1f00162e46fe9c72370cad7e9bd0c5f Mon Sep 17 00:00:00 2001 From: alvyjudy <53921639+alvyjudy@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:30:30 -0400 Subject: [PATCH 7784/8469] fixed some RST syntax --- docs/build_meta.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index 8d92d80462..4467dddacb 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -21,7 +21,7 @@ package and distribute Python modules. Under PEP517: a ``pyproject.toml`` file is used to specify what program to use for generating distribution. - Then, two functions provided by the program,``build_wheel(directory: str)`` + Then, two functions provided by the program, ``build_wheel(directory: str)`` and ``build_sdist(directory: str)`` create the distribution bundle at the specified ``directory``. The program is free to use its own configuration script or extend the ``.toml`` file. @@ -43,7 +43,7 @@ How to use it? -------------- Starting with a package that you want to distribute. You will need your source -scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file. +scripts, a ``pyproject.toml`` file and a ``setup.cfg`` file:: ~/meowpkg/ pyproject.toml From 19e45c14e49fa3e6cc849b69b3a83f85f316441c Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 30 Mar 2020 13:49:29 -0400 Subject: [PATCH 7785/8469] added changelog file --- changelog.d/1698.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1698.doc.rst diff --git a/changelog.d/1698.doc.rst b/changelog.d/1698.doc.rst new file mode 100644 index 0000000000..9b61fccb4c --- /dev/null +++ b/changelog.d/1698.doc.rst @@ -0,0 +1 @@ +Added documentation for ``build_meta`` (a bare minimum, not completed) From c3ae6d416043ca528e9cf88c4789afa9df223c5b Mon Sep 17 00:00:00 2001 From: Michael Felt Date: Fri, 3 Apr 2020 16:38:28 +0200 Subject: [PATCH 7786/8469] bpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler is xlc on AIX (GH-19225) --- tests/test_config_cmd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index b735fd334d..8bd2c94237 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -47,8 +47,7 @@ def test_search_cpp(self): cmd = config(dist) cmd._check_compiler() compiler = cmd.compiler - is_xlc = shutil.which(compiler.preprocessor[0]).startswith("/usr/vac") - if is_xlc: + if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower(): self.skipTest('xlc: The -E option overrides the -P, -o, and -qsyntaxonly options') # simple pattern searches From 03b92ca154951f16851e75b01b78b9127dad742f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Apr 2020 16:33:15 -0400 Subject: [PATCH 7787/8469] Protect against situation where the Git user e-mail is not configured. Ref #2057. --- tools/finalize.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/finalize.py b/tools/finalize.py index 3b66341a80..5f284568d2 100644 --- a/tools/finalize.py +++ b/tools/finalize.py @@ -53,7 +53,15 @@ def bump_version(): subprocess.check_call(cmd) +def ensure_config(): + """ + Double-check that Git has an e-mail configured. + """ + subprocess.check_output(['git', 'config', 'user.email']) + + if __name__ == '__main__': print("Cutting release at", get_version()) + ensure_config() update_changelog() bump_version() From 53c284b325959a6fd177e9d37d8b5dd5824db2b3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 6 Apr 2020 16:35:56 -0400 Subject: [PATCH 7788/8469] Pass environment variables when running finalize. Fixes #2057. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 347106ec37..aa99e28367 100644 --- a/tox.ini +++ b/tox.ini @@ -65,6 +65,7 @@ skip_install = True deps = towncrier bump2version +passenv = * commands = python tools/finalize.py From e5f3305933e65fbebe1562a3625cf16abb10a10b Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 11 Apr 2020 18:11:31 +0000 Subject: [PATCH 7789/8469] change: Mac OS X -> macOS Signed-off-by: Reece Dunham --- .gitignore | 1 + CHANGES.rst | 10 +++++----- docs/history.txt | 2 +- docs/pkg_resources.txt | 6 +++--- pkg_resources/__init__.py | 26 +++++++++++++------------- pkg_resources/_vendor/appdirs.py | 21 ++++++++++----------- pkg_resources/api_tests.txt | 4 ++-- setuptools/package_index.py | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 0c272d1c74..90ae80505e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ setuptools.egg-info .cache .idea/ .pytest_cache/ +.mypy_cache/ diff --git a/CHANGES.rst b/CHANGES.rst index f97f514208..201ac692e4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1461,7 +1461,7 @@ v21.1.0 * #572: In build_ext, now always import ``_CONFIG_VARS`` from ``distutils`` rather than from ``sysconfig`` to allow ``distutils.sysconfig.customize_compiler`` - configure the OS X compiler for ``-dynamiclib``. + configure the macOS compiler for ``-dynamiclib``. v21.0.0 ------- @@ -1881,7 +1881,7 @@ v20.6.0 require that Cython be present before building source distributions. However, for systems with this build of setuptools, Cython will be downloaded on demand. -* Issue #396: Fixed test failure on OS X. +* Issue #396: Fixed test failure on macOS. * BB Pull Request #136: Remove excessive quoting from shebang headers for Jython. @@ -3078,7 +3078,7 @@ how it parses version numbers. * Distribute #306: Even if 2to3 is used, we build in-place under Python 2. * Distribute #307: Prints the full path when .svn/entries is broken. * Distribute #313: Support for sdist subcommands (Python 2.7) -* Distribute #314: test_local_index() would fail an OS X. +* Distribute #314: test_local_index() would fail an macOS. * Distribute #310: Non-ascii characters in a namespace __init__.py causes errors. * Distribute #218: Improved documentation on behavior of `package_data` and `include_package_data`. Files indicated by `package_data` are now included @@ -4105,7 +4105,7 @@ easy_install based on a contribution by Kevin Dangoor. You may wish to delete and reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", because the format for this platform information has changed so that minor - OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a + macOS upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a previous OS version to become obsolete. * easy_install's dependency processing algorithms have changed. When using @@ -4118,7 +4118,7 @@ easy_install * Added ``--site-dirs`` option to allow adding custom "site" directories. Made ``easy-install.pth`` work in platform-specific alternate site - directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). + directories (e.g. ``~/Library/Python/2.x/site-packages`` on macOS). * If you manually delete the current version of a package, the next run of EasyInstall against the target directory will now remove the stray entry diff --git a/docs/history.txt b/docs/history.txt index 385cfa7eda..faf7adfe2c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -12,7 +12,7 @@ Credits * The original design for the ``.egg`` format and the ``pkg_resources`` API was co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first - version of ``pkg_resources``, and supplied the OS X operating system version + version of ``pkg_resources``, and supplied the macOS operating system version compatibility algorithm. * Ian Bicking implemented many early "creature comfort" features of diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index b887a9239f..71568c1a1a 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1621,7 +1621,7 @@ Platform Utilities ``get_build_platform()`` Return this platform's identifier string. For Windows, the return value - is ``"win32"``, and for Mac OS X it is a string of the form + is ``"win32"``, and for macOS it is a string of the form ``"macosx-10.4-ppc"``. All other platforms return the same uname-based string that the ``distutils.util.get_platform()`` function returns. This string is the minimum platform version required by distributions built @@ -1641,7 +1641,7 @@ Platform Utilities considered a wildcard, and the platforms are therefore compatible. Likewise, if the platform strings are equal, they're also considered compatible, and ``True`` is returned. Currently, the only non-equal - platform strings that are considered compatible are Mac OS X platform + platform strings that are considered compatible are macOS platform strings with the same hardware type (e.g. ``ppc``) and major version (e.g. ``10``) with the `provided` platform's minor version being less than or equal to the `required` platform's minor version. @@ -1674,7 +1674,7 @@ File/Path Utilities the same filesystem location if they have equal ``normalized_path()`` values. Specifically, this is a shortcut for calling ``os.path.realpath`` and ``os.path.normcase`` on `path`. Unfortunately, on certain platforms - (notably Cygwin and Mac OS X) the ``normcase`` function does not accurately + (notably Cygwin and macOS) the ``normcase`` function does not accurately reflect the platform's case-sensitivity, so there is always the possibility of two apparently-different paths being equal on such platforms. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 75563f95df..e7f863b108 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -179,10 +179,10 @@ def get_supported_platform(): """Return this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version - of Mac OS X that would be required to *use* extensions produced by + of macOS that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the - version of Mac OS X that we are *running*. To allow usage of packages that - explicitly require a newer version of Mac OS X, we must also know the + version of macOS that we are *running*. To allow usage of packages that + explicitly require a newer version of macOS, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its @@ -192,9 +192,9 @@ def get_supported_platform(): m = macosVersionString.match(plat) if m is not None and sys.platform == "darwin": try: - plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3)) + plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3)) except ValueError: - # not Mac OS X + # not macOS pass return plat @@ -365,7 +365,7 @@ def get_provider(moduleOrReq): return _find_adapter(_provider_factories, loader)(module) -def _macosx_vers(_cache=[]): +def _macos_vers(_cache=[]): if not _cache: version = platform.mac_ver()[0] # fallback for MacPorts @@ -381,7 +381,7 @@ def _macosx_vers(_cache=[]): return _cache[0] -def _macosx_arch(machine): +def _macos_arch(machine): return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine) @@ -389,18 +389,18 @@ def get_build_platform(): """Return this platform's string for platform-specific distributions XXX Currently this is the same as ``distutils.util.get_platform()``, but it - needs some hacks for Linux and Mac OS X. + needs some hacks for Linux and macOS. """ from sysconfig import get_platform plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): try: - version = _macosx_vers() + version = _macos_vers() machine = os.uname()[4].replace(" ", "_") return "macosx-%d.%d-%s" % ( int(version[0]), int(version[1]), - _macosx_arch(machine), + _macos_arch(machine), ) except ValueError: # if someone is running a non-Mac darwin system, this will fall @@ -426,7 +426,7 @@ def compatible_platforms(provided, required): # easy case return True - # Mac OS X special cases + # macOS special cases reqMac = macosVersionString.match(required) if reqMac: provMac = macosVersionString.match(provided) @@ -435,7 +435,7 @@ def compatible_platforms(provided, required): if not provMac: # this is backwards compatibility for packages built before # setuptools 0.6. All packages built after this point will - # use the new macosx designation. + # use the new macOS designation. provDarwin = darwinVersionString.match(provided) if provDarwin: dversion = int(provDarwin.group(1)) @@ -443,7 +443,7 @@ def compatible_platforms(provided, required): if dversion == 7 and macosversion >= "10.3" or \ dversion == 8 and macosversion >= "10.4": return True - # egg isn't macosx or legacy darwin + # egg isn't macOS or legacy darwin return False # are they the same major version and machine type? diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py index ae67001af8..4552cbbf16 100644 --- a/pkg_resources/_vendor/appdirs.py +++ b/pkg_resources/_vendor/appdirs.py @@ -8,10 +8,9 @@ See for details and usage. """ # Dev Notes: -# - MSDN on where to store app data files: -# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 -# - 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 +# - MSDN on where to store app data files: (TODO: needs new link) +# - macOS: (TODO: needs new link) +# - XDG spec for Un*x: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html __version_info__ = (1, 4, 3) __version__ = '.'.join(map(str, __version_info__)) @@ -64,7 +63,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user data directories are: - Mac OS X: ~/Library/Application Support/ + macOS: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\Application Data\\ Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ @@ -118,7 +117,7 @@ def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): if XDG_DATA_DIRS is not set Typical site data directories are: - Mac OS X: /Library/Application Support/ + macOS: /Library/Application Support/ Unix: /usr/local/share/ or /usr/share/ Win XP: C:\Documents and Settings\All Users\Application Data\\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) @@ -185,7 +184,7 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user config directories are: - Mac OS X: same as user_data_dir + macOS: same as user_data_dir Unix: ~/.config/ # or in $XDG_CONFIG_HOME, if defined Win *: same as user_data_dir @@ -223,7 +222,7 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False) returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set Typical site config directories are: - Mac OS X: same as site_data_dir + macOS: same as site_data_dir Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in $XDG_CONFIG_DIRS Win *: same as site_data_dir @@ -273,7 +272,7 @@ def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): discussion below. Typical user cache directories are: - Mac OS X: ~/Library/Caches/ + macOS: ~/Library/Caches/ Unix: ~/.cache/ (XDG default) Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache Vista: C:\Users\\AppData\Local\\\Cache @@ -333,7 +332,7 @@ def user_state_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user state directories are: - Mac OS X: same as user_data_dir + macOS: same as user_data_dir Unix: ~/.local/state/ # or in $XDG_STATE_HOME, if defined Win *: same as user_data_dir @@ -372,7 +371,7 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True): base cache dir for Unix. See discussion below. Typical user log directories are: - Mac OS X: ~/Library/Logs/ + macOS: ~/Library/Logs/ Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs Vista: C:\Users\\AppData\Local\\\Logs diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 7ae5a038d2..ded18800fe 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -290,8 +290,8 @@ Platform Compatibility Rules ---------------------------- On the Mac, there are potential compatibility issues for modules compiled -on newer versions of Mac OS X than what the user is running. Additionally, -Mac OS X will soon have two platforms to contend with: Intel and PowerPC. +on newer versions of macOS than what the user is running. Additionally, +macOS will soon have two platforms to contend with: Intel and PowerPC. Basic equality works as on other platforms:: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 82eb45169f..918060917c 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1051,7 +1051,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): parsed = urllib.parse.urlparse(url) scheme, netloc, path, params, query, frag = parsed - # Double scheme does not raise on Mac OS X as revealed by a + # Double scheme does not raise on macOS as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. if netloc.endswith(':'): raise http_client.InvalidURL("nonnumeric port: ''") From bafe5abd8c715fa18a06bfd62e685802a2a74ce8 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 11 Apr 2020 18:11:31 +0000 Subject: [PATCH 7790/8469] change: Mac OS X -> macOS Signed-off-by: Reece Dunham --- .gitignore | 1 + CHANGES.rst | 10 +++++----- docs/history.txt | 2 +- docs/pkg_resources.txt | 6 +++--- pkg_resources/__init__.py | 26 +++++++++++++------------- pkg_resources/_vendor/appdirs.py | 21 ++++++++++----------- pkg_resources/api_tests.txt | 4 ++-- setuptools/package_index.py | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 0c272d1c74..90ae80505e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ setuptools.egg-info .cache .idea/ .pytest_cache/ +.mypy_cache/ diff --git a/CHANGES.rst b/CHANGES.rst index ac61c17882..c145eb3949 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1519,7 +1519,7 @@ v21.1.0 * #572: In build_ext, now always import ``_CONFIG_VARS`` from ``distutils`` rather than from ``sysconfig`` to allow ``distutils.sysconfig.customize_compiler`` - configure the OS X compiler for ``-dynamiclib``. + configure the macOS compiler for ``-dynamiclib``. v21.0.0 ------- @@ -1939,7 +1939,7 @@ v20.6.0 require that Cython be present before building source distributions. However, for systems with this build of setuptools, Cython will be downloaded on demand. -* Issue #396: Fixed test failure on OS X. +* Issue #396: Fixed test failure on macOS. * BB Pull Request #136: Remove excessive quoting from shebang headers for Jython. @@ -3136,7 +3136,7 @@ how it parses version numbers. * Distribute #306: Even if 2to3 is used, we build in-place under Python 2. * Distribute #307: Prints the full path when .svn/entries is broken. * Distribute #313: Support for sdist subcommands (Python 2.7) -* Distribute #314: test_local_index() would fail an OS X. +* Distribute #314: test_local_index() would fail an macOS. * Distribute #310: Non-ascii characters in a namespace __init__.py causes errors. * Distribute #218: Improved documentation on behavior of `package_data` and `include_package_data`. Files indicated by `package_data` are now included @@ -4163,7 +4163,7 @@ easy_install based on a contribution by Kevin Dangoor. You may wish to delete and reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", because the format for this platform information has changed so that minor - OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a + macOS upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a previous OS version to become obsolete. * easy_install's dependency processing algorithms have changed. When using @@ -4176,7 +4176,7 @@ easy_install * Added ``--site-dirs`` option to allow adding custom "site" directories. Made ``easy-install.pth`` work in platform-specific alternate site - directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). + directories (e.g. ``~/Library/Python/2.x/site-packages`` on macOS). * If you manually delete the current version of a package, the next run of EasyInstall against the target directory will now remove the stray entry diff --git a/docs/history.txt b/docs/history.txt index 385cfa7eda..faf7adfe2c 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -12,7 +12,7 @@ Credits * The original design for the ``.egg`` format and the ``pkg_resources`` API was co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first - version of ``pkg_resources``, and supplied the OS X operating system version + version of ``pkg_resources``, and supplied the macOS operating system version compatibility algorithm. * Ian Bicking implemented many early "creature comfort" features of diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index b887a9239f..71568c1a1a 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1621,7 +1621,7 @@ Platform Utilities ``get_build_platform()`` Return this platform's identifier string. For Windows, the return value - is ``"win32"``, and for Mac OS X it is a string of the form + is ``"win32"``, and for macOS it is a string of the form ``"macosx-10.4-ppc"``. All other platforms return the same uname-based string that the ``distutils.util.get_platform()`` function returns. This string is the minimum platform version required by distributions built @@ -1641,7 +1641,7 @@ Platform Utilities considered a wildcard, and the platforms are therefore compatible. Likewise, if the platform strings are equal, they're also considered compatible, and ``True`` is returned. Currently, the only non-equal - platform strings that are considered compatible are Mac OS X platform + platform strings that are considered compatible are macOS platform strings with the same hardware type (e.g. ``ppc``) and major version (e.g. ``10``) with the `provided` platform's minor version being less than or equal to the `required` platform's minor version. @@ -1674,7 +1674,7 @@ File/Path Utilities the same filesystem location if they have equal ``normalized_path()`` values. Specifically, this is a shortcut for calling ``os.path.realpath`` and ``os.path.normcase`` on `path`. Unfortunately, on certain platforms - (notably Cygwin and Mac OS X) the ``normcase`` function does not accurately + (notably Cygwin and macOS) the ``normcase`` function does not accurately reflect the platform's case-sensitivity, so there is always the possibility of two apparently-different paths being equal on such platforms. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 15a4401afe..b0a49d86c8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -179,10 +179,10 @@ def get_supported_platform(): """Return this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version - of Mac OS X that would be required to *use* extensions produced by + of macOS that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the - version of Mac OS X that we are *running*. To allow usage of packages that - explicitly require a newer version of Mac OS X, we must also know the + version of macOS that we are *running*. To allow usage of packages that + explicitly require a newer version of macOS, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its @@ -192,9 +192,9 @@ def get_supported_platform(): m = macosVersionString.match(plat) if m is not None and sys.platform == "darwin": try: - plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3)) + plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3)) except ValueError: - # not Mac OS X + # not macOS pass return plat @@ -365,7 +365,7 @@ def get_provider(moduleOrReq): return _find_adapter(_provider_factories, loader)(module) -def _macosx_vers(_cache=[]): +def _macos_vers(_cache=[]): if not _cache: version = platform.mac_ver()[0] # fallback for MacPorts @@ -381,7 +381,7 @@ def _macosx_vers(_cache=[]): return _cache[0] -def _macosx_arch(machine): +def _macos_arch(machine): return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine) @@ -389,18 +389,18 @@ def get_build_platform(): """Return this platform's string for platform-specific distributions XXX Currently this is the same as ``distutils.util.get_platform()``, but it - needs some hacks for Linux and Mac OS X. + needs some hacks for Linux and macOS. """ from sysconfig import get_platform plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): try: - version = _macosx_vers() + version = _macos_vers() machine = os.uname()[4].replace(" ", "_") return "macosx-%d.%d-%s" % ( int(version[0]), int(version[1]), - _macosx_arch(machine), + _macos_arch(machine), ) except ValueError: # if someone is running a non-Mac darwin system, this will fall @@ -426,7 +426,7 @@ def compatible_platforms(provided, required): # easy case return True - # Mac OS X special cases + # macOS special cases reqMac = macosVersionString.match(required) if reqMac: provMac = macosVersionString.match(provided) @@ -435,7 +435,7 @@ def compatible_platforms(provided, required): if not provMac: # this is backwards compatibility for packages built before # setuptools 0.6. All packages built after this point will - # use the new macosx designation. + # use the new macOS designation. provDarwin = darwinVersionString.match(provided) if provDarwin: dversion = int(provDarwin.group(1)) @@ -443,7 +443,7 @@ def compatible_platforms(provided, required): if dversion == 7 and macosversion >= "10.3" or \ dversion == 8 and macosversion >= "10.4": return True - # egg isn't macosx or legacy darwin + # egg isn't macOS or legacy darwin return False # are they the same major version and machine type? diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py index ae67001af8..4552cbbf16 100644 --- a/pkg_resources/_vendor/appdirs.py +++ b/pkg_resources/_vendor/appdirs.py @@ -8,10 +8,9 @@ See for details and usage. """ # Dev Notes: -# - MSDN on where to store app data files: -# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 -# - 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 +# - MSDN on where to store app data files: (TODO: needs new link) +# - macOS: (TODO: needs new link) +# - XDG spec for Un*x: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html __version_info__ = (1, 4, 3) __version__ = '.'.join(map(str, __version_info__)) @@ -64,7 +63,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user data directories are: - Mac OS X: ~/Library/Application Support/ + macOS: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\Application Data\\ Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ @@ -118,7 +117,7 @@ def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): if XDG_DATA_DIRS is not set Typical site data directories are: - Mac OS X: /Library/Application Support/ + macOS: /Library/Application Support/ Unix: /usr/local/share/ or /usr/share/ Win XP: C:\Documents and Settings\All Users\Application Data\\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) @@ -185,7 +184,7 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user config directories are: - Mac OS X: same as user_data_dir + macOS: same as user_data_dir Unix: ~/.config/ # or in $XDG_CONFIG_HOME, if defined Win *: same as user_data_dir @@ -223,7 +222,7 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False) returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set Typical site config directories are: - Mac OS X: same as site_data_dir + macOS: same as site_data_dir Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in $XDG_CONFIG_DIRS Win *: same as site_data_dir @@ -273,7 +272,7 @@ def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): discussion below. Typical user cache directories are: - Mac OS X: ~/Library/Caches/ + macOS: ~/Library/Caches/ Unix: ~/.cache/ (XDG default) Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache Vista: C:\Users\\AppData\Local\\\Cache @@ -333,7 +332,7 @@ def user_state_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user state directories are: - Mac OS X: same as user_data_dir + macOS: same as user_data_dir Unix: ~/.local/state/ # or in $XDG_STATE_HOME, if defined Win *: same as user_data_dir @@ -372,7 +371,7 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True): base cache dir for Unix. See discussion below. Typical user log directories are: - Mac OS X: ~/Library/Logs/ + macOS: ~/Library/Logs/ Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs Vista: C:\Users\\AppData\Local\\\Logs diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt index 7ae5a038d2..ded18800fe 100644 --- a/pkg_resources/api_tests.txt +++ b/pkg_resources/api_tests.txt @@ -290,8 +290,8 @@ Platform Compatibility Rules ---------------------------- On the Mac, there are potential compatibility issues for modules compiled -on newer versions of Mac OS X than what the user is running. Additionally, -Mac OS X will soon have two platforms to contend with: Intel and PowerPC. +on newer versions of macOS than what the user is running. Additionally, +macOS will soon have two platforms to contend with: Intel and PowerPC. Basic equality works as on other platforms:: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 7a802413cb..0744ea2ad1 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1053,7 +1053,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): parsed = urllib.parse.urlparse(url) scheme, netloc, path, params, query, frag = parsed - # Double scheme does not raise on Mac OS X as revealed by a + # Double scheme does not raise on macOS as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. if netloc.endswith(':'): raise http_client.InvalidURL("nonnumeric port: ''") From 63b03e3610303163727308152590bcf78d5dc439 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 11 Apr 2020 18:16:22 +0000 Subject: [PATCH 7791/8469] news fragment --- changelog.d/2062.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2062.change.rst diff --git a/changelog.d/2062.change.rst b/changelog.d/2062.change.rst new file mode 100644 index 0000000000..1f5fd8122e --- /dev/null +++ b/changelog.d/2062.change.rst @@ -0,0 +1 @@ +Change 'Mac OS X' to 'macOS' in code. From 9bfc5fa5fd0da9254c2e95edb42da3fb65893f75 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 16 Feb 2020 16:07:02 +0200 Subject: [PATCH 7792/8469] Deprecate bdist_wininst --- setuptools/command/bdist_wininst.py | 9 ++++++++ setuptools/tests/test_bdist_deprecations.py | 23 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 setuptools/tests/test_bdist_deprecations.py diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index 073de97b46..ff4b634592 100644 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -1,4 +1,7 @@ import distutils.command.bdist_wininst as orig +import warnings + +from setuptools import SetuptoolsDeprecationWarning class bdist_wininst(orig.bdist_wininst): @@ -14,6 +17,12 @@ def reinitialize_command(self, command, reinit_subcommands=0): return cmd def run(self): + warnings.warn( + "bdist_wininst is deprecated and will be removed in a future " + "version. Use bdist_wheel (wheel packages) instead.", + SetuptoolsDeprecationWarning + ) + self._is_running = True try: orig.bdist_wininst.run(self) diff --git a/setuptools/tests/test_bdist_deprecations.py b/setuptools/tests/test_bdist_deprecations.py new file mode 100644 index 0000000000..704164aacb --- /dev/null +++ b/setuptools/tests/test_bdist_deprecations.py @@ -0,0 +1,23 @@ +"""develop tests +""" +import mock + +import pytest + +from setuptools.dist import Distribution +from setuptools import SetuptoolsDeprecationWarning + + +@mock.patch("distutils.command.bdist_wininst.bdist_wininst") +def test_bdist_wininst_warning(distutils_cmd): + dist = Distribution(dict( + script_name='setup.py', + script_args=['bdist_wininst'], + name='foo', + py_modules=['hi'], + )) + dist.parse_command_line() + with pytest.warns(SetuptoolsDeprecationWarning): + dist.run_commands() + + distutils_cmd.run.assert_called_once() From 8487f1ae61f50578d9adb314429eb578e8e9f0c9 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 22 Mar 2020 20:53:33 +0200 Subject: [PATCH 7793/8469] Add news fragment --- changelog.d/2040.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2040.change.rst diff --git a/changelog.d/2040.change.rst b/changelog.d/2040.change.rst new file mode 100644 index 0000000000..b8f36f6fb4 --- /dev/null +++ b/changelog.d/2040.change.rst @@ -0,0 +1 @@ +Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead. From 74e9f56dc7857cee680727406517c2c086511e12 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Wed, 22 Apr 2020 17:44:10 +1000 Subject: [PATCH 7794/8469] bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480) It is possible to use either '-isysroot /some/path' (with a space) or '-isysroot/some/path' (no space in between). Support both forms in places where special handling of -isysroot is done, rather than just the first form. Co-authored-by: Ned Deily --- unixccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixccompiler.py b/unixccompiler.py index d10a78da31..4d7a6de740 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -288,7 +288,7 @@ def find_library_file(self, dirs, lib, debug=0): # vs # /usr/lib/libedit.dylib cflags = sysconfig.get_config_var('CFLAGS') - m = re.search(r'-isysroot\s+(\S+)', cflags) + m = re.search(r'-isysroot\s*(\S+)', cflags) if m is None: sysroot = '/' else: From d11428b1cc059ff6aa0ddec0bd8354a1df68d752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Fri, 24 Apr 2020 22:34:10 +0700 Subject: [PATCH 7795/8469] Stop recognizing files ending with .dist-info as dist As proposed in PEP 376, dist-info distributions must be directories. --- changelog.d/2075.breaking.rst | 1 + pkg_resources/__init__.py | 30 +++++++++++------------ pkg_resources/tests/test_pkg_resources.py | 8 ++++++ 3 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 changelog.d/2075.breaking.rst diff --git a/changelog.d/2075.breaking.rst b/changelog.d/2075.breaking.rst new file mode 100644 index 0000000000..8d88b33f21 --- /dev/null +++ b/changelog.d/2075.breaking.rst @@ -0,0 +1 @@ +Stop recognizing files ending with ``.dist-info`` as distribution metadata diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 15a4401afe..4d15086f5e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2056,33 +2056,31 @@ def find_on_path(importer, path_item, only=False): filtered = ( entry for entry in entries - if dist_factory(path_item, entry, only) + if dist_factory(entry, only) ) # scan for .egg and .egg-info in directory path_item_entries = _by_version_descending(filtered) for entry in path_item_entries: fullpath = os.path.join(path_item, entry) - factory = dist_factory(path_item, entry, only) + factory = dist_factory(entry, only) for dist in factory(fullpath): yield dist -def dist_factory(path_item, entry, only): - """ - Return a dist_factory for a path_item and entry - """ +def dist_factory(entry, only): + """Return a dist_factory for the given entry.""" lower = entry.lower() - is_meta = any(map(lower.endswith, ('.egg-info', '.dist-info'))) - return ( - distributions_from_metadata - if is_meta else - find_distributions - if not only and _is_egg_path(entry) else - resolve_egg_link - if not only and lower.endswith('.egg-link') else - NoDists() - ) + if lower.endswith('.egg-info'): + return distributions_from_metadata + elif lower.endswith('.dist-info') and os.path.isdir(entry): + return distributions_from_metadata + elif not only and _is_egg_path(entry): + return find_distributions + elif not only and lower.endswith('.egg-link'): + return resolve_egg_link + else: + return NoDists() class NoDists: diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 78281869a6..1c66dec055 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -330,6 +330,14 @@ def test_distribution_version_missing_undetected_path(): assert msg == expected +@pytest.mark.parametrize('only', [False, True]) +def test_dist_info_is_not_dir(tmp_path, only): + """Test path containing a file with dist-info extension.""" + dist_info = tmp_path / 'foobar.dist-info' + dist_info.touch() + assert not pkg_resources.dist_factory(str(dist_info), only) + + class TestDeepVersionLookupDistutils: @pytest.fixture def env(self, tmpdir): From ea19518aa139d623a4fad7d01159674ee43b9f15 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 30 Apr 2020 02:21:30 +0200 Subject: [PATCH 7796/8469] bpo-40443: Remove unused imports in tests (GH-19804) --- tests/test_build_clib.py | 1 - tests/test_config_cmd.py | 1 - tests/test_dist.py | 2 +- tests/test_spawn.py | 3 +-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py index 85d09906f2..abd8313770 100644 --- a/tests/test_build_clib.py +++ b/tests/test_build_clib.py @@ -8,7 +8,6 @@ from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support -from distutils.spawn import find_executable class BuildCLibTestCase(support.TempdirManager, support.LoggingSilencer, diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py index 8bd2c94237..9aeab07b46 100644 --- a/tests/test_config_cmd.py +++ b/tests/test_config_cmd.py @@ -39,7 +39,6 @@ def test_dump_file(self): @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_search_cpp(self): - import shutil cmd = missing_compiler_executable(['preprocessor']) if cmd is not None: self.skipTest('The %r command is not found' % cmd) diff --git a/tests/test_dist.py b/tests/test_dist.py index cc34725a99..60956dadef 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -8,7 +8,7 @@ from unittest import mock -from distutils.dist import Distribution, fix_help_options, DistributionMetadata +from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command from test.support import ( diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 73b0f5cb73..cf1faad5f4 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -2,8 +2,7 @@ import os import stat import sys -import unittest -from unittest import mock +import unittest.mock from test.support import run_unittest, unix_shell from test import support as test_support From b36de51a8f36849b126ba46846cbddd00cd2ba8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 30 Apr 2020 10:19:03 +0200 Subject: [PATCH 7797/8469] Filter lib2to3 (Pending)DeprecationWarning in testes lib2to3 is deprecated in Python 3.9: https://bugs.python.org/issue40360 Workarounds https://github.com/pypa/setuptools/issues/2081 --- changelog.d/2082.misc.rst | 2 ++ pytest.ini | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelog.d/2082.misc.rst diff --git a/changelog.d/2082.misc.rst b/changelog.d/2082.misc.rst new file mode 100644 index 0000000000..81ad5d5853 --- /dev/null +++ b/changelog.d/2082.misc.rst @@ -0,0 +1,2 @@ +Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in testes, +because ``lib2to3`` is `deprecated in Python 3.9 `_. diff --git a/pytest.ini b/pytest.ini index b13b7f3363..479a2965ea 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,3 +20,6 @@ filterwarnings = ignore:Unicode unequal comparison failed to convert:UnicodeWarning # https://github.com/pypa/setuptools/issues/2025 ignore:direct construction of .*Item has been deprecated:DeprecationWarning + # https://github.com/pypa/setuptools/issues/2081 + ignore:lib2to3 package is deprecated:PendingDeprecationWarning + ignore:lib2to3 package is deprecated:DeprecationWarning From a672328f1e2515f5b103df12d19fa3c2ffba68fc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 30 Apr 2020 11:28:09 +0200 Subject: [PATCH 7798/8469] bpo-40443: Remove unused imports in distutils (GH-19802) --- _msvccompiler.py | 4 ---- bcppcompiler.py | 4 ++-- ccompiler.py | 2 +- command/bdist_rpm.py | 1 - command/bdist_wininst.py | 2 +- command/check.py | 1 - command/upload.py | 1 - cygwinccompiler.py | 2 -- msvc9compiler.py | 3 +-- msvccompiler.py | 2 +- sysconfig.py | 1 - 11 files changed, 6 insertions(+), 17 deletions(-) diff --git a/_msvccompiler.py b/_msvccompiler.py index 03a5986d98..af8099a407 100644 --- a/_msvccompiler.py +++ b/_msvccompiler.py @@ -14,8 +14,6 @@ # ported to VS 2015 by Steve Dower import os -import shutil -import stat import subprocess import winreg @@ -65,8 +63,6 @@ def _find_vc2017(): If vswhere.exe is not available, by definition, VS 2017 is not installed. """ - import json - root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") if not root: return None, None diff --git a/bcppcompiler.py b/bcppcompiler.py index 9f4c432d90..071fea5d03 100644 --- a/bcppcompiler.py +++ b/bcppcompiler.py @@ -14,10 +14,10 @@ import os from distutils.errors import \ - DistutilsExecError, DistutilsPlatformError, \ + DistutilsExecError, \ CompileError, LibError, LinkError, UnknownFileError from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options + CCompiler, gen_preprocess_options from distutils.file_util import write_file from distutils.dep_util import newer from distutils import log diff --git a/ccompiler.py b/ccompiler.py index 4cfc6c7065..b5ef143e72 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -8,7 +8,7 @@ from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath -from distutils.dep_util import newer_pairwise, newer_group +from distutils.dep_util import newer_group from distutils.util import split_quoted, execute from distutils import log diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 74381cc69a..550cbfa1e2 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -6,7 +6,6 @@ import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG -from distutils.util import get_platform from distutils.file_util import write_file from distutils.errors import * from distutils.sysconfig import get_python_version diff --git a/command/bdist_wininst.py b/command/bdist_wininst.py index b5ed6f041e..0e9ddaa214 100644 --- a/command/bdist_wininst.py +++ b/command/bdist_wininst.py @@ -8,7 +8,7 @@ import warnings from distutils.core import Command from distutils.util import get_platform -from distutils.dir_util import create_tree, remove_tree +from distutils.dir_util import remove_tree from distutils.errors import * from distutils.sysconfig import get_python_version from distutils import log diff --git a/command/check.py b/command/check.py index 7ceabd3adf..ada2500646 100644 --- a/command/check.py +++ b/command/check.py @@ -11,7 +11,6 @@ from docutils.parsers.rst import Parser from docutils import frontend from docutils import nodes - from io import StringIO class SilentReporter(Reporter): diff --git a/command/upload.py b/command/upload.py index 11afa24b77..d822ba0133 100644 --- a/command/upload.py +++ b/command/upload.py @@ -7,7 +7,6 @@ import os import io -import platform import hashlib from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 6c5d77746b..66c12dd358 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -51,12 +51,10 @@ from subprocess import Popen, PIPE, check_output import re -from distutils.ccompiler import gen_preprocess_options, gen_lib_options from distutils.unixccompiler import UnixCCompiler from distutils.file_util import write_file from distutils.errors import (DistutilsExecError, CCompilerError, CompileError, UnknownFileError) -from distutils import log from distutils.version import LooseVersion from distutils.spawn import find_executable diff --git a/msvc9compiler.py b/msvc9compiler.py index 4c0036a0f1..6934e964ab 100644 --- a/msvc9compiler.py +++ b/msvc9compiler.py @@ -19,8 +19,7 @@ from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError -from distutils.ccompiler import CCompiler, gen_preprocess_options, \ - gen_lib_options +from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log from distutils.util import get_platform diff --git a/msvccompiler.py b/msvccompiler.py index d1de2fbfcb..d5857cb1ff 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -13,7 +13,7 @@ DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError from distutils.ccompiler import \ - CCompiler, gen_preprocess_options, gen_lib_options + CCompiler, gen_lib_options from distutils import log _can_read_reg = False diff --git a/sysconfig.py b/sysconfig.py index 01ee519792..37feae5df7 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -15,7 +15,6 @@ import sys from .errors import DistutilsPlatformError -from .util import get_platform, get_host_platform # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) From d2a64aebe4fd7b02c9d05a0cac30faac38f18977 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2020 05:51:59 -0400 Subject: [PATCH 7799/8469] Apply suggestions from code review --- changelog.d/1698.doc.rst | 2 +- docs/build_meta.txt | 42 ++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/changelog.d/1698.doc.rst b/changelog.d/1698.doc.rst index 9b61fccb4c..90dc14c1f4 100644 --- a/changelog.d/1698.doc.rst +++ b/changelog.d/1698.doc.rst @@ -1 +1 @@ -Added documentation for ``build_meta`` (a bare minimum, not completed) +Added documentation for ``build_meta`` (a bare minimum, not completed). diff --git a/docs/build_meta.txt b/docs/build_meta.txt index 4467dddacb..6749789148 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -1,5 +1,5 @@ ======================================= -Documentation to setuptools.build_meta +Build System Support ======================================= What is it? @@ -7,16 +7,18 @@ What is it? Python packaging has come `a long way `_. -The traditional ``setuptools``'s way of packgaging Python modules +The traditional ``setuptools`` way of packgaging Python modules uses a ``setup()`` function within the ``setup.py`` script. Commands such as ``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a distribution bundle and ``python setup.py install`` installs the distribution. This interface makes it difficult to choose other packaging tools without an -overhaul. Additionally, the ``setup.py`` scripts hasn't been the most user -friendly tool. +overhaul. Because ``setup.py`` scripts allowed for arbitrary execution, it +proved difficult to provide a reliable user experience across environments +and history. -PEP517 therefore came to rescue and specified a new standard to -package and distribute Python modules. Under PEP517: +`PEP 517 `_ therefore came to +rescue and specified a new standard to +package and distribute Python modules. Under PEP 517: a ``pyproject.toml`` file is used to specify what program to use for generating distribution. @@ -35,8 +37,8 @@ package and distribute Python modules. Under PEP517: With this standard, switching between packaging tools becomes a lot easier and in the case of ``setuptools``, ``setup.py`` becomes optional. -``build_meta`` is ``setuptools``'s implementation of PEP517. It provides the -two functions, ``build_wheel`` and ``build_sdist``, amongst others and uses +``build_meta`` is ``setuptools``'s implementation of PEP 517. It provides the +two functions, ``build_wheel`` and ``build_sdist`` amongst others, and uses a ``setup.cfg`` to specify the information about the package. How to use it? @@ -58,7 +60,7 @@ setuptools, the content would be:: requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" -``setup.cfg`` is used to specify your package information, specified +Use ``setup.cfg`` to specify your package information, specified `here `_ :: @@ -70,26 +72,24 @@ setuptools, the content would be:: [options] packages = find: -Now it's time to actually generate the distribution. PEP517 specifies two -mandatory functions, ``build_wheel`` and ``build_sdist``, implemented in -this module. Currently, it has to be done in the interpreter:: +Now generate the distribution. Although the PyPA is still working to +`provide a recommended tool `_ +to build packages, the `pep517 package >> import setuptools.build_meta - >>> setuptools.build_meta.build_wheel('wheel_dist') - 'meowpkg-0.0.1-py3-none-any.whl' - >>> setuptools.build_meta.build_sdist('sdist') - 'meowpkg-0.0.1.tar.gz' + $ pip install -q pep517 + $ mkdir dist + $ python -m pep517.build . And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed and installed:: - ~/newcomputer/ + dist/ meowpkg-0.0.1.whl meowpkg-0.0.1.tar.gz - $ pip install meowpkg-0.0.1.whl + $ pip install dist/meowpkg-0.0.1.whl or:: - $ pip install meowpkg-0.0.1.tar.gz - + $ pip install dist/meowpkg-0.0.1.tar.gz From cc5b5ec305100ecd897edfc7918f184ffc93c197 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2020 05:59:41 -0400 Subject: [PATCH 7800/8469] Apply suggestions from code review --- docs/build_meta.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index 6749789148..ef9fb2ac5d 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -34,12 +34,8 @@ package and distribute Python modules. Under PEP 517: ``pyproject.toml`` and decide what program to use to 'build from source' (the default is ``setuptools``) -With this standard, switching between packaging tools becomes a lot easier and -in the case of ``setuptools``, ``setup.py`` becomes optional. - -``build_meta`` is ``setuptools``'s implementation of PEP 517. It provides the -two functions, ``build_wheel`` and ``build_sdist`` amongst others, and uses -a ``setup.cfg`` to specify the information about the package. +With this standard, switching between packaging tools becomes a lot easier. ``build_meta`` +implements ``setuptools``' build system support. How to use it? -------------- @@ -60,9 +56,7 @@ setuptools, the content would be:: requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" -Use ``setup.cfg`` to specify your package information, specified -`here `_ :: +Use ``setuptools``' `declarative config`_ to specify the package information:: [metadata] name = meowpkg From 8c360dfd6361a15d1bbdfadb5fd0927a9a4a4cef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2020 06:30:31 -0400 Subject: [PATCH 7801/8469] Revert changes to historical notes and vendored packages. --- CHANGES.rst | 10 +++++----- pkg_resources/_vendor/appdirs.py | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c145eb3949..ac61c17882 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1519,7 +1519,7 @@ v21.1.0 * #572: In build_ext, now always import ``_CONFIG_VARS`` from ``distutils`` rather than from ``sysconfig`` to allow ``distutils.sysconfig.customize_compiler`` - configure the macOS compiler for ``-dynamiclib``. + configure the OS X compiler for ``-dynamiclib``. v21.0.0 ------- @@ -1939,7 +1939,7 @@ v20.6.0 require that Cython be present before building source distributions. However, for systems with this build of setuptools, Cython will be downloaded on demand. -* Issue #396: Fixed test failure on macOS. +* Issue #396: Fixed test failure on OS X. * BB Pull Request #136: Remove excessive quoting from shebang headers for Jython. @@ -3136,7 +3136,7 @@ how it parses version numbers. * Distribute #306: Even if 2to3 is used, we build in-place under Python 2. * Distribute #307: Prints the full path when .svn/entries is broken. * Distribute #313: Support for sdist subcommands (Python 2.7) -* Distribute #314: test_local_index() would fail an macOS. +* Distribute #314: test_local_index() would fail an OS X. * Distribute #310: Non-ascii characters in a namespace __init__.py causes errors. * Distribute #218: Improved documentation on behavior of `package_data` and `include_package_data`. Files indicated by `package_data` are now included @@ -4163,7 +4163,7 @@ easy_install based on a contribution by Kevin Dangoor. You may wish to delete and reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", because the format for this platform information has changed so that minor - macOS upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a + OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a previous OS version to become obsolete. * easy_install's dependency processing algorithms have changed. When using @@ -4176,7 +4176,7 @@ easy_install * Added ``--site-dirs`` option to allow adding custom "site" directories. Made ``easy-install.pth`` work in platform-specific alternate site - directories (e.g. ``~/Library/Python/2.x/site-packages`` on macOS). + directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X). * If you manually delete the current version of a package, the next run of EasyInstall against the target directory will now remove the stray entry diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py index 4552cbbf16..ae67001af8 100644 --- a/pkg_resources/_vendor/appdirs.py +++ b/pkg_resources/_vendor/appdirs.py @@ -8,9 +8,10 @@ See for details and usage. """ # Dev Notes: -# - MSDN on where to store app data files: (TODO: needs new link) -# - macOS: (TODO: needs new link) -# - XDG spec for Un*x: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html +# - MSDN on where to store app data files: +# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 +# - 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, 3) __version__ = '.'.join(map(str, __version_info__)) @@ -63,7 +64,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user data directories are: - macOS: ~/Library/Application Support/ + Mac OS X: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\Application Data\\ Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\ @@ -117,7 +118,7 @@ def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): if XDG_DATA_DIRS is not set Typical site data directories are: - macOS: /Library/Application Support/ + Mac OS X: /Library/Application Support/ Unix: /usr/local/share/ or /usr/share/ Win XP: C:\Documents and Settings\All Users\Application Data\\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) @@ -184,7 +185,7 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user config directories are: - macOS: same as user_data_dir + Mac OS X: same as user_data_dir Unix: ~/.config/ # or in $XDG_CONFIG_HOME, if defined Win *: same as user_data_dir @@ -222,7 +223,7 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False) returned, or '/etc/xdg/', if XDG_CONFIG_DIRS is not set Typical site config directories are: - macOS: same as site_data_dir + Mac OS X: same as site_data_dir Unix: /etc/xdg/ or $XDG_CONFIG_DIRS[i]/ for each value in $XDG_CONFIG_DIRS Win *: same as site_data_dir @@ -272,7 +273,7 @@ def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): discussion below. Typical user cache directories are: - macOS: ~/Library/Caches/ + Mac OS X: ~/Library/Caches/ Unix: ~/.cache/ (XDG default) Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Cache Vista: C:\Users\\AppData\Local\\\Cache @@ -332,7 +333,7 @@ def user_state_dir(appname=None, appauthor=None, version=None, roaming=False): for a discussion of issues. Typical user state directories are: - macOS: same as user_data_dir + Mac OS X: same as user_data_dir Unix: ~/.local/state/ # or in $XDG_STATE_HOME, if defined Win *: same as user_data_dir @@ -371,7 +372,7 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True): base cache dir for Unix. See discussion below. Typical user log directories are: - macOS: ~/Library/Logs/ + Mac OS X: ~/Library/Logs/ Unix: ~/.cache//log # or under $XDG_CACHE_HOME if defined Win XP: C:\Documents and Settings\\Local Settings\Application Data\\\Logs Vista: C:\Users\\AppData\Local\\\Logs From 194ae0ee00f16cf6a30202ef1f35237f730f4b21 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2020 07:33:04 -0400 Subject: [PATCH 7802/8469] Update template to give more guidance, hoping to limit the blank submissions. --- .../setuptools-warns-about-python-2-incompatibility.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md index 14317d9367..2f5fe53dd0 100644 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -9,6 +9,10 @@ assignees: '' ## Environment Details - Operating System and version: -- Python version: -- Python installed how: +- Python version: +- Python installed how: - Virtualenv version (if using virtualenv): n/a Command(s) used to install setuptools (and output): From 40f81af021b899b76b96eef52bf020c2348e1aea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 May 2020 07:40:44 -0400 Subject: [PATCH 7803/8469] Remove shebang. Fixes #2076. --- setuptools/command/easy_install.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 64ff045718..5a9576ff29 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Easy Install ------------ From 61ca49c08e71fee962b760fb90f8f89bb158738b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Thu, 7 May 2020 11:39:55 -0400 Subject: [PATCH 7804/8469] Tweak note about setup.cfg This note has gotten a bit out of date, since setup.py is no longer required. --- docs/setuptools.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 22e3c87252..30a30c2612 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2106,8 +2106,9 @@ Configuring setup() using setup.cfg files .. note:: New in 30.3.0 (8 Dec 2016). .. important:: - A ``setup.py`` file containing a ``setup()`` function call is still - required even if your configuration resides in ``setup.cfg``. + If compatibility with legacy builds (i.e. those not using the :pep:`517` + build API) is desired, a ``setup.py`` file containing a ``setup()`` function + call is still required even if your configuration resides in ``setup.cfg``. ``Setuptools`` allows using configuration files (usually :file:`setup.cfg`) to define a package’s metadata and other options that are normally supplied From 2d607a9e59aa854b387f22d79301acb8739b133a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 13:19:52 -0400 Subject: [PATCH 7805/8469] Emit deprecation warning when 2to3 is used. Ref #2086. --- setuptools/lib2to3_ex.py | 7 +++++++ setuptools/tests/test_test.py | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index 4b1a73feb2..817dce409d 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -7,6 +7,7 @@ This module raises an ImportError on Python 2. """ +import warnings from distutils.util import Mixin2to3 as _Mixin2to3 from distutils import log from lib2to3.refactor import RefactoringTool, get_fixers_from_package @@ -33,6 +34,12 @@ def run_2to3(self, files, doctests=False): return if not files: return + + warnings.warn( + "2to3 support is deprecated. Please migrate to " + "a single-codebase solution or roll your own " + "conversion process.", + DeprecationWarning) log.info("Fixing " + " ".join(files)) self.__build_fixer_names() self.__exclude_fixers() diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 8ee70a7ec3..0f77d8ff3d 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -73,7 +73,11 @@ def quiet_log(): log.set_verbosity(0) +ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated') + + @pytest.mark.usefixtures('sample_test', 'quiet_log') +@ack_2to3 def test_test(capfd): params = dict( name='foo', @@ -124,6 +128,7 @@ def test_test(self): @pytest.mark.usefixtures('sample_test') +@ack_2to3 def test_warns_deprecation(capfd): params = dict( name='foo', @@ -149,6 +154,7 @@ def test_warns_deprecation(capfd): @pytest.mark.usefixtures('sample_test') +@ack_2to3 def test_deprecation_stderr(capfd): params = dict( name='foo', From b286525862fa0a4839f37b5836a20178293d7335 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 13:27:50 -0400 Subject: [PATCH 7806/8469] Update changelog. --- changelog.d/2086.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2086.change.rst diff --git a/changelog.d/2086.change.rst b/changelog.d/2086.change.rst new file mode 100644 index 0000000000..9fa54e5ace --- /dev/null +++ b/changelog.d/2086.change.rst @@ -0,0 +1 @@ +Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools. From 0fffb84a1bc7925fbf862365787ab20e9ab89a0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 14:03:30 -0400 Subject: [PATCH 7807/8469] In the deprecation warning, acknowledge that it's only for projects that still require Python 2 support. --- setuptools/lib2to3_ex.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index 817dce409d..6d9b147c0e 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -36,9 +36,10 @@ def run_2to3(self, files, doctests=False): return warnings.warn( - "2to3 support is deprecated. Please migrate to " - "a single-codebase solution or roll your own " - "conversion process.", + "2to3 support is deprecated. If the project still " + "requires Python 2 support, please migrate to " + "a single-codebase solution or employ an " + "independent conversion process.", DeprecationWarning) log.info("Fixing " + " ".join(files)) self.__build_fixer_names() From 6068b81e604c7c7c655420ffec3476a045a751c8 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:10:33 -0400 Subject: [PATCH 7808/8469] docs: reduced top index to three entries The top index now points to three files: setuptools.txt (user guide), development.txt (development guide) and a WIP index file that is to summarized deprecated practice that remains relevant for backward compatibility. --- docs/index.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 13a46e74ef..2f988a1809 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -16,10 +16,6 @@ Documentation content: .. toctree:: :maxdepth: 2 - setuptools - pkg_resources - python3 - development - roadmap - Deprecated: Easy Install - history + User guide + Development guide + Backward compatibility & deprecated practice From 836e485b9419b645cb8686e1cd8a567c590aec0f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:17:29 -0400 Subject: [PATCH 7809/8469] doc: move python 2to3 doc into deprecated folder --- docs/{ => deprecated}/python3.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{ => deprecated}/python3.txt (100%) diff --git a/docs/python3.txt b/docs/deprecated/python3.txt similarity index 100% rename from docs/python3.txt rename to docs/deprecated/python3.txt From 7b16d4806f44fc0562c80219ab9ee5d4ac0184b7 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:19:06 -0400 Subject: [PATCH 7810/8469] doc: move easy_install file into deprecated folder --- docs/{ => deprecated}/easy_install.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{ => deprecated}/easy_install.txt (100%) diff --git a/docs/easy_install.txt b/docs/deprecated/easy_install.txt similarity index 100% rename from docs/easy_install.txt rename to docs/deprecated/easy_install.txt From 6ff2ea56e7828da84dd6da4bb32964a1e19e81f7 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:20:56 -0400 Subject: [PATCH 7811/8469] doc: rename formats.txt as python-eggs.txt --- docs/{formats.txt => python_eggs.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{formats.txt => python_eggs.txt} (100%) diff --git a/docs/formats.txt b/docs/python_eggs.txt similarity index 100% rename from docs/formats.txt rename to docs/python_eggs.txt From 5c08e3959d2a8aeb83a8a5e1001fb5ed0278a934 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:22:04 -0400 Subject: [PATCH 7812/8469] doc: move python_eggs.txt to deprecated folder --- docs/{ => deprecated}/python_eggs.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{ => deprecated}/python_eggs.txt (100%) diff --git a/docs/python_eggs.txt b/docs/deprecated/python_eggs.txt similarity index 100% rename from docs/python_eggs.txt rename to docs/deprecated/python_eggs.txt From a354d7bc1b7737fc1b4a9d238a247364035ab3d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 14:23:10 -0400 Subject: [PATCH 7813/8469] Use the SetuptoolsDeprecationWarning to make the warning more visible outside test runners. --- setuptools/lib2to3_ex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index 6d9b147c0e..017f7285b7 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -13,6 +13,7 @@ from lib2to3.refactor import RefactoringTool, get_fixers_from_package import setuptools +from ._deprecation_warning import SetuptoolsDeprecationWarning class DistutilsRefactoringTool(RefactoringTool): @@ -40,7 +41,7 @@ def run_2to3(self, files, doctests=False): "requires Python 2 support, please migrate to " "a single-codebase solution or employ an " "independent conversion process.", - DeprecationWarning) + SetuptoolsDeprecationWarning) log.info("Fixing " + " ".join(files)) self.__build_fixer_names() self.__exclude_fixers() From 7e956179d09333cf8022c6261044e9eedf4aeef9 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:43:49 -0400 Subject: [PATCH 7814/8469] docs: change top index depth to one --- docs/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index 2f988a1809..38fbbcc50c 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -14,7 +14,7 @@ designed to facilitate packaging Python projects, where packaging includes: Documentation content: .. toctree:: - :maxdepth: 2 + :maxdepth: 1 User guide Development guide From bbed9d6584a934697a6da0c9251f902d844fc0e9 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:44:32 -0400 Subject: [PATCH 7815/8469] docs: added index for deprecated files --- docs/deprecated/index.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/deprecated/index.txt diff --git a/docs/deprecated/index.txt b/docs/deprecated/index.txt new file mode 100644 index 0000000000..bb6579f826 --- /dev/null +++ b/docs/deprecated/index.txt @@ -0,0 +1,19 @@ +====================================================== +Guides on backward compatibility & deprecated practice +====================================================== + +``Setuptools`` has undergone tremendous changes since its first debut. As its +development continues to roll forward, many of the practice and mechanisms it +had established are now considered deprecated. But they still remain relevant +as a plethora of libraries continue to depend on them. Many people also find +it necessary to equip themselves with the knowledge to better support backward +compatibility. This guide aims to provide the essential information for such +objectives. + +.. toctree:: + :maxdepth: 1 + + python3 + python_eggs + easy_install + From d6769eb69b955ad8aa9f7877d782b97ce388f50f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Sun, 10 May 2020 14:58:43 -0400 Subject: [PATCH 7816/8469] Doc: added changelog.d news fragment --- changelog.d/2097.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2097.doc.rst diff --git a/changelog.d/2097.doc.rst b/changelog.d/2097.doc.rst new file mode 100644 index 0000000000..03cdec8ad9 --- /dev/null +++ b/changelog.d/2097.doc.rst @@ -0,0 +1 @@ +doc: simplify index and group deprecated files From fdee8026f5d58ee7cee0fad3c0b7e0ae7d5272ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 15:51:53 -0400 Subject: [PATCH 7817/8469] Restore parameter --- pkg_resources/__init__.py | 6 +++--- pkg_resources/tests/test_pkg_resources.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4d15086f5e..a50ad1aba5 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2056,19 +2056,19 @@ def find_on_path(importer, path_item, only=False): filtered = ( entry for entry in entries - if dist_factory(entry, only) + if dist_factory(path_item, entry, only) ) # scan for .egg and .egg-info in directory path_item_entries = _by_version_descending(filtered) for entry in path_item_entries: fullpath = os.path.join(path_item, entry) - factory = dist_factory(entry, only) + factory = dist_factory(path_item, entry, only) for dist in factory(fullpath): yield dist -def dist_factory(entry, only): +def dist_factory(path_item, entry, only): """Return a dist_factory for the given entry.""" lower = entry.lower() if lower.endswith('.egg-info'): diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 1c66dec055..9991402c6a 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -335,7 +335,7 @@ def test_dist_info_is_not_dir(tmp_path, only): """Test path containing a file with dist-info extension.""" dist_info = tmp_path / 'foobar.dist-info' dist_info.touch() - assert not pkg_resources.dist_factory(str(dist_info), only) + assert not pkg_resources.dist_factory(None, str(dist_info), only) class TestDeepVersionLookupDistutils: From da3d39f88d3aad2281b78600e03cf05c1e983f71 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 15:56:20 -0400 Subject: [PATCH 7818/8469] Restore single return --- pkg_resources/__init__.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a50ad1aba5..6a6bda2cab 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2071,16 +2071,18 @@ def find_on_path(importer, path_item, only=False): def dist_factory(path_item, entry, only): """Return a dist_factory for the given entry.""" lower = entry.lower() - if lower.endswith('.egg-info'): - return distributions_from_metadata - elif lower.endswith('.dist-info') and os.path.isdir(entry): - return distributions_from_metadata - elif not only and _is_egg_path(entry): - return find_distributions - elif not only and lower.endswith('.egg-link'): - return resolve_egg_link - else: - return NoDists() + is_egg_info = lower.endswith('.egg-info') + is_dist_info = lower.endswith('.dist-info') and os.path.isdir(entry) + is_meta = is_egg_info or is_dist_info + return ( + distributions_from_metadata + if is_meta else + find_distributions + if not only and _is_egg_path(entry) else + resolve_egg_link + if not only and lower.endswith('.egg-link') else + NoDists() + ) class NoDists: From 7b0a818f9a877d5e1fe558cf1a817bf2034ddf9f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 16:05:51 -0400 Subject: [PATCH 7819/8469] Fix test failures when 'foo.dist-info' does not exist --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b840b4d85a..0575a989f8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2072,7 +2072,7 @@ def dist_factory(path_item, entry, only): """Return a dist_factory for the given entry.""" lower = entry.lower() is_egg_info = lower.endswith('.egg-info') - is_dist_info = lower.endswith('.dist-info') and os.path.isdir(entry) + is_dist_info = lower.endswith('.dist-info') and not os.path.isfile(entry) is_meta = is_egg_info or is_dist_info return ( distributions_from_metadata From 5638e4783fc0f4f5cc40e7ecfab0500983826fa0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 16:18:22 -0400 Subject: [PATCH 7820/8469] To assess the directoriness of an entry, include the path of that entry. --- pkg_resources/__init__.py | 5 ++++- pkg_resources/tests/test_pkg_resources.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0575a989f8..0512731d9f 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2072,7 +2072,10 @@ def dist_factory(path_item, entry, only): """Return a dist_factory for the given entry.""" lower = entry.lower() is_egg_info = lower.endswith('.egg-info') - is_dist_info = lower.endswith('.dist-info') and not os.path.isfile(entry) + is_dist_info = ( + lower.endswith('.dist-info') and + os.path.isdir(os.path.join(path_item, entry)) + ) is_meta = is_egg_info or is_dist_info return ( distributions_from_metadata diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 9991402c6a..189a8668be 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -335,7 +335,7 @@ def test_dist_info_is_not_dir(tmp_path, only): """Test path containing a file with dist-info extension.""" dist_info = tmp_path / 'foobar.dist-info' dist_info.touch() - assert not pkg_resources.dist_factory(None, str(dist_info), only) + assert not pkg_resources.dist_factory(str(tmp_path), str(dist_info), only) class TestDeepVersionLookupDistutils: From b1b0134ba75dfefdad23d7410e14c74c8ec83aaa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 17:40:36 -0400 Subject: [PATCH 7821/8469] Based on my understanding, this is more of a bugfix than a breaking change. --- changelog.d/{2075.breaking.rst => 2075.change.rst} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename changelog.d/{2075.breaking.rst => 2075.change.rst} (84%) diff --git a/changelog.d/2075.breaking.rst b/changelog.d/2075.change.rst similarity index 84% rename from changelog.d/2075.breaking.rst rename to changelog.d/2075.change.rst index 8d88b33f21..abb13000ad 100644 --- a/changelog.d/2075.breaking.rst +++ b/changelog.d/2075.change.rst @@ -1 +1 @@ -Stop recognizing files ending with ``.dist-info`` as distribution metadata +Stop recognizing files ending with ``.dist-info`` as distribution metadata. From d57adafdd9550376ef54ad3eb9f6a913adb2b214 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 May 2020 17:42:41 -0400 Subject: [PATCH 7822/8469] =?UTF-8?q?Bump=20version:=2046.1.3=20=E2=86=92?= =?UTF-8?q?=2046.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 12 ++++++++++++ changelog.d/1698.doc.rst | 1 - changelog.d/2040.change.rst | 1 - changelog.d/2062.change.rst | 1 - changelog.d/2075.change.rst | 1 - changelog.d/2082.misc.rst | 2 -- changelog.d/2086.change.rst | 1 - setup.cfg | 2 +- 9 files changed, 14 insertions(+), 9 deletions(-) delete mode 100644 changelog.d/1698.doc.rst delete mode 100644 changelog.d/2040.change.rst delete mode 100644 changelog.d/2062.change.rst delete mode 100644 changelog.d/2075.change.rst delete mode 100644 changelog.d/2082.misc.rst delete mode 100644 changelog.d/2086.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 00cbdc7a3b..c1b062e4d9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.1.3 +current_version = 46.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ac61c17882..03c89be6c5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,15 @@ +v46.2.0 +------- + +* #2040: Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead. +* #2062: Change 'Mac OS X' to 'macOS' in code. +* #2075: Stop recognizing files ending with ``.dist-info`` as distribution metadata. +* #2086: Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools. +* #1698: Added documentation for ``build_meta`` (a bare minimum, not completed). +* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in testes, + because ``lib2to3`` is `deprecated in Python 3.9 `_. + + v46.1.3 ------- diff --git a/changelog.d/1698.doc.rst b/changelog.d/1698.doc.rst deleted file mode 100644 index 90dc14c1f4..0000000000 --- a/changelog.d/1698.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added documentation for ``build_meta`` (a bare minimum, not completed). diff --git a/changelog.d/2040.change.rst b/changelog.d/2040.change.rst deleted file mode 100644 index b8f36f6fb4..0000000000 --- a/changelog.d/2040.change.rst +++ /dev/null @@ -1 +0,0 @@ -Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead. diff --git a/changelog.d/2062.change.rst b/changelog.d/2062.change.rst deleted file mode 100644 index 1f5fd8122e..0000000000 --- a/changelog.d/2062.change.rst +++ /dev/null @@ -1 +0,0 @@ -Change 'Mac OS X' to 'macOS' in code. diff --git a/changelog.d/2075.change.rst b/changelog.d/2075.change.rst deleted file mode 100644 index abb13000ad..0000000000 --- a/changelog.d/2075.change.rst +++ /dev/null @@ -1 +0,0 @@ -Stop recognizing files ending with ``.dist-info`` as distribution metadata. diff --git a/changelog.d/2082.misc.rst b/changelog.d/2082.misc.rst deleted file mode 100644 index 81ad5d5853..0000000000 --- a/changelog.d/2082.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in testes, -because ``lib2to3`` is `deprecated in Python 3.9 `_. diff --git a/changelog.d/2086.change.rst b/changelog.d/2086.change.rst deleted file mode 100644 index 9fa54e5ace..0000000000 --- a/changelog.d/2086.change.rst +++ /dev/null @@ -1 +0,0 @@ -Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools. diff --git a/setup.cfg b/setup.cfg index 60838efce3..2f5525f3c5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.1.3 +version = 46.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 28a1b18a047de2e81712c55e3d81cc3f2c0c54f9 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 13:58:59 -0400 Subject: [PATCH 7823/8469] docs: created folder and index for userguide --- docs/userguide/index.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/userguide/index.txt diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt new file mode 100644 index 0000000000..e69de29bb2 From 7008a98cdcc359be75b1850db7c8f67270435328 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:17:59 -0400 Subject: [PATCH 7824/8469] docs: update userguide index --- docs/userguide/index.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index e69de29bb2..caaaa1d0c8 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -0,0 +1,17 @@ +================================================== +Building and Distributing Packages with Setuptools +================================================== + +``Setuptools`` is a collection of enhancements to the Python ``distutils`` +that allow developers to more easily build and +distribute Python packages, especially ones that have dependencies on other +packages. + +Packages built and distributed using ``setuptools`` look to the user like +ordinary Python packages based on the ``distutils``. + +.. toctree:: + :maxdepth: 1 + + Quickstart + keyword reference \ No newline at end of file From ef435da2b41adf9674db1df00415db2b46012f21 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:19:18 -0400 Subject: [PATCH 7825/8469] docs: migrate basic use to quickstart Did a cut and paste from setuptoo.txt to userguide/quickstart.txt --- docs/setuptools.txt | 164 --------------------------------- docs/userguide/quickstart.txt | 165 ++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 164 deletions(-) create mode 100644 docs/userguide/quickstart.txt diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 30a30c2612..f9d567d7ce 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -55,171 +55,7 @@ Developer's Guide ----------------- -Installing ``setuptools`` -========================= - -.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ - -To install the latest version of setuptools, use:: - - pip install --upgrade setuptools - -Refer to `Installing Packages`_ guide for more information. - -Basic Use -========= - -For basic use of setuptools, just import things from setuptools instead of -the distutils. Here's a minimal setup script using setuptools:: - - from setuptools import setup, find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - ) - -As you can see, it doesn't take much to use setuptools in a project. -Run that script in your project folder, alongside the Python packages -you have developed. - -Invoke that script to produce distributions and automatically include all -packages in the directory where the setup.py lives. See the `Command -Reference`_ section below to see what commands you can give to this setup -script. For example, to produce a source distribution, simply invoke:: - - setup.py sdist - -Of course, before you release your project to PyPI, you'll want to add a bit -more information to your setup script to help people find or learn about your -project. And maybe your project will have grown by then to include a few -dependencies, and perhaps some data files and scripts:: - - from setuptools import setup, find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - scripts=["say_hello.py"], - - # Project uses reStructuredText, so ensure that the docutils get - # installed or upgraded on the target machine - install_requires=["docutils>=0.3"], - - package_data={ - # If any package contains *.txt or *.rst files, include them: - "": ["*.txt", "*.rst"], - # And include any *.msg files found in the "hello" package, too: - "hello": ["*.msg"], - }, - - # metadata to display on PyPI - author="Me", - author_email="me@example.com", - description="This is an Example Package", - keywords="hello world example examples", - url="http://example.com/HelloWorld/", # project home page, if any - project_urls={ - "Bug Tracker": "https://bugs.example.com/HelloWorld/", - "Documentation": "https://docs.example.com/HelloWorld/", - "Source Code": "https://code.example.com/HelloWorld/", - }, - classifiers=[ - "License :: OSI Approved :: Python Software Foundation License" - ] - - # could also include long_description, download_url, etc. - ) -In the sections that follow, we'll explain what most of these ``setup()`` -arguments do (except for the metadata ones), and the various ways you might use -them in your own project(s). - - -Specifying Your Project's Version ---------------------------------- - -Setuptools can work well with most versioning schemes; there are, however, a -few special things to watch out for, in order to ensure that setuptools and -other tools can always tell what version of your package is newer than another -version. Knowing these things will also help you correctly specify what -versions of other projects your project depends on. - -A version consists of an alternating series of release numbers and pre-release -or post-release tags. A release number is a series of digits punctuated by -dots, such as ``2.4`` or ``0.5``. Each series of digits is treated -numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the -same release number, denoting the first subrelease of release 2. But ``2.10`` -is the *tenth* subrelease of release 2, and so is a different and newer release -from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also -ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. - -Following a release number, you can have either a pre-release or post-release -tag. Pre-release tags make a version be considered *older* than the version -they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, -which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make -a version be considered *newer* than the version they are appended to. So, -revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* -than ``2.4.1`` (which has a higher release number). - -A pre-release tag is a series of letters that are alphabetically before -"final". Some examples of prerelease tags would include ``alpha``, ``beta``, -``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash -before the prerelease tag if it's immediately after a number, but it's okay to -do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all -represent release candidate 1 of version ``2.4``, and are treated as identical -by setuptools. - -In addition, there are three special prerelease tags that are treated as if -they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version -``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as -``2.4c1``, and are treated as identical by setuptools. - -A post-release tag is either a series of letters that are alphabetically -greater than or equal to "final", or a dash (``-``). Post-release tags are -generally used to separate patch numbers, port numbers, build numbers, revision -numbers, or date stamps from the release number. For example, the version -``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of -version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped -post-release. - -Notice that after each pre or post-release tag, you are free to place another -release number, followed again by more pre- or post-release tags. For example, -``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- -development version of the ninth alpha of release 0.6. Notice that ``dev`` is -a pre-release tag, so this version is a *lower* version number than ``0.6a9``, -which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is -a post-release tag, so this version is *newer* than ``0.6a9.dev``. - -For the most part, setuptools' interpretation of version numbers is intuitive, -but here are a few tips that will keep you out of trouble in the corner cases: - -* Don't stick adjoining pre-release tags together without a dot or number - between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, - *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in - ``1.9a.dev``, or separate the prerelease tags with a number, as in - ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are - identical versions from setuptools' point of view, so you can use whatever - scheme you prefer. - -* If you want to be certain that your chosen numbering scheme works the way - you think it will, you can use the ``pkg_resources.parse_version()`` function - to compare different version numbers:: - - >>> from pkg_resources import parse_version - >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") - True - >>> parse_version("2.1-rc2") < parse_version("2.1") - True - >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") - True - -Once you've decided on a version numbering scheme for your project, you can -have setuptools automatically tag your in-development releases with various -pre- or post-release tags. See the following sections for more details: - -* `Tagging and "Daily Build" or "Snapshot" Releases`_ -* The `egg_info`_ command New and Changed ``setup()`` Keywords diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt new file mode 100644 index 0000000000..4df50bc56e --- /dev/null +++ b/docs/userguide/quickstart.txt @@ -0,0 +1,165 @@ +Installing ``setuptools`` +========================= + +.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ + +To install the latest version of setuptools, use:: + + pip install --upgrade setuptools + +Refer to `Installing Packages`_ guide for more information. + +Basic Use +========= + +For basic use of setuptools, just import things from setuptools instead of +the distutils. Here's a minimal setup script using setuptools:: + + from setuptools import setup, find_packages + setup( + name="HelloWorld", + version="0.1", + packages=find_packages(), + ) + +As you can see, it doesn't take much to use setuptools in a project. +Run that script in your project folder, alongside the Python packages +you have developed. + +Invoke that script to produce distributions and automatically include all +packages in the directory where the setup.py lives. See the `Command +Reference`_ section below to see what commands you can give to this setup +script. For example, to produce a source distribution, simply invoke:: + + setup.py sdist + +Of course, before you release your project to PyPI, you'll want to add a bit +more information to your setup script to help people find or learn about your +project. And maybe your project will have grown by then to include a few +dependencies, and perhaps some data files and scripts:: + + from setuptools import setup, find_packages + setup( + name="HelloWorld", + version="0.1", + packages=find_packages(), + scripts=["say_hello.py"], + + # Project uses reStructuredText, so ensure that the docutils get + # installed or upgraded on the target machine + install_requires=["docutils>=0.3"], + + package_data={ + # If any package contains *.txt or *.rst files, include them: + "": ["*.txt", "*.rst"], + # And include any *.msg files found in the "hello" package, too: + "hello": ["*.msg"], + }, + + # metadata to display on PyPI + author="Me", + author_email="me@example.com", + description="This is an Example Package", + keywords="hello world example examples", + url="http://example.com/HelloWorld/", # project home page, if any + project_urls={ + "Bug Tracker": "https://bugs.example.com/HelloWorld/", + "Documentation": "https://docs.example.com/HelloWorld/", + "Source Code": "https://code.example.com/HelloWorld/", + }, + classifiers=[ + "License :: OSI Approved :: Python Software Foundation License" + ] + + # could also include long_description, download_url, etc. + ) + +In the sections that follow, we'll explain what most of these ``setup()`` +arguments do (except for the metadata ones), and the various ways you might use +them in your own project(s). + + +Specifying Your Project's Version +--------------------------------- + +Setuptools can work well with most versioning schemes; there are, however, a +few special things to watch out for, in order to ensure that setuptools and +other tools can always tell what version of your package is newer than another +version. Knowing these things will also help you correctly specify what +versions of other projects your project depends on. + +A version consists of an alternating series of release numbers and pre-release +or post-release tags. A release number is a series of digits punctuated by +dots, such as ``2.4`` or ``0.5``. Each series of digits is treated +numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the +same release number, denoting the first subrelease of release 2. But ``2.10`` +is the *tenth* subrelease of release 2, and so is a different and newer release +from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also +ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. + +Following a release number, you can have either a pre-release or post-release +tag. Pre-release tags make a version be considered *older* than the version +they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, +which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make +a version be considered *newer* than the version they are appended to. So, +revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* +than ``2.4.1`` (which has a higher release number). + +A pre-release tag is a series of letters that are alphabetically before +"final". Some examples of prerelease tags would include ``alpha``, ``beta``, +``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash +before the prerelease tag if it's immediately after a number, but it's okay to +do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all +represent release candidate 1 of version ``2.4``, and are treated as identical +by setuptools. + +In addition, there are three special prerelease tags that are treated as if +they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version +``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as +``2.4c1``, and are treated as identical by setuptools. + +A post-release tag is either a series of letters that are alphabetically +greater than or equal to "final", or a dash (``-``). Post-release tags are +generally used to separate patch numbers, port numbers, build numbers, revision +numbers, or date stamps from the release number. For example, the version +``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of +version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped +post-release. + +Notice that after each pre or post-release tag, you are free to place another +release number, followed again by more pre- or post-release tags. For example, +``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- +development version of the ninth alpha of release 0.6. Notice that ``dev`` is +a pre-release tag, so this version is a *lower* version number than ``0.6a9``, +which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is +a post-release tag, so this version is *newer* than ``0.6a9.dev``. + +For the most part, setuptools' interpretation of version numbers is intuitive, +but here are a few tips that will keep you out of trouble in the corner cases: + +* Don't stick adjoining pre-release tags together without a dot or number + between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, + *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in + ``1.9a.dev``, or separate the prerelease tags with a number, as in + ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are + identical versions from setuptools' point of view, so you can use whatever + scheme you prefer. + +* If you want to be certain that your chosen numbering scheme works the way + you think it will, you can use the ``pkg_resources.parse_version()`` function + to compare different version numbers:: + + >>> from pkg_resources import parse_version + >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") + True + >>> parse_version("2.1-rc2") < parse_version("2.1") + True + >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") + True + +Once you've decided on a version numbering scheme for your project, you can +have setuptools automatically tag your in-development releases with various +pre- or post-release tags. See the following sections for more details: + +* `Tagging and "Daily Build" or "Snapshot" Releases`_ +* The `egg_info`_ command \ No newline at end of file From 7971245c98f7218a8614135db56438e9a4642594 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:22:04 -0400 Subject: [PATCH 7826/8469] docs: migrated keywords ref to keywords.txt Did a cut and paste from setuptools.txt --- docs/setuptools.txt | 174 ----------------------------------- docs/userguide/keywords.txt | 175 ++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+), 174 deletions(-) create mode 100644 docs/userguide/keywords.txt diff --git a/docs/setuptools.txt b/docs/setuptools.txt index f9d567d7ce..e8a76c08e0 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -58,181 +58,7 @@ Developer's Guide -New and Changed ``setup()`` Keywords -==================================== -The following keyword arguments to ``setup()`` are added or changed by -``setuptools``. All of them are optional; you do not have to supply them -unless you need the associated ``setuptools`` feature. - -``include_package_data`` - If set to ``True``, this tells ``setuptools`` to automatically include any - data files it finds inside your package directories that are specified by - your ``MANIFEST.in`` file. For more information, see the section below on - `Including Data Files`_. - -``exclude_package_data`` - A dictionary mapping package names to lists of glob patterns that should - be *excluded* from your package directories. You can use this to trim back - any excess files included by ``include_package_data``. For a complete - description and examples, see the section below on `Including Data Files`_. - -``package_data`` - A dictionary mapping package names to lists of glob patterns. For a - complete description and examples, see the section below on `Including - Data Files`_. You do not need to use this option if you are using - ``include_package_data``, unless you need to add e.g. files that are - generated by your setup script and build process. (And are therefore not - in source control or are files that you don't want to include in your - source distribution.) - -``zip_safe`` - A boolean (True or False) flag specifying whether the project can be - safely installed and run from a zip file. If this argument is not - supplied, the ``bdist_egg`` command will have to analyze all of your - project's contents for possible problems each time it builds an egg. - -``install_requires`` - A string or list of strings specifying what other distributions need to - be installed when this one is. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``entry_points`` - A dictionary mapping entry point group names to strings or lists of strings - defining the entry points. Entry points are used to support dynamic - discovery of services or plugins provided by a project. See `Dynamic - Discovery of Services and Plugins`_ for details and examples of the format - of this argument. In addition, this keyword is used to support `Automatic - Script Creation`_. - -``extras_require`` - A dictionary mapping names of "extras" (optional features of your project) - to strings or lists of strings specifying what other distributions must be - installed to support those features. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. - -``python_requires`` - A string corresponding to a version specifier (as defined in PEP 440) for - the Python version, used to specify the Requires-Python defined in PEP 345. - -``setup_requires`` - A string or list of strings specifying what other distributions need to - be present in order for the *setup script* to run. ``setuptools`` will - attempt to obtain these (using pip if available) before processing the - rest of the setup script or commands. This argument is needed if you - are using distutils extensions as part of your build process; for - example, extensions that process setup() arguments and turn them into - EGG-INFO metadata files. - - (Note: projects listed in ``setup_requires`` will NOT be automatically - installed on the system where the setup script is being run. They are - simply downloaded to the ./.eggs directory if they're not locally available - already. If you want them to be installed, as well as being available - when the setup script is run, you should add them to ``install_requires`` - **and** ``setup_requires``.) - -``dependency_links`` - A list of strings naming URLs to be searched when satisfying dependencies. - These links will be used if needed to install packages specified by - ``setup_requires`` or ``tests_require``. They will also be written into - the egg's metadata for use during install by tools that support them. - -``namespace_packages`` - A list of strings naming the project's "namespace packages". A namespace - package is a package that may be split across multiple project - distributions. For example, Zope 3's ``zope`` package is a namespace - package, because subpackages like ``zope.interface`` and ``zope.publisher`` - may be distributed separately. The egg runtime system can automatically - merge such subpackages into a single parent package at runtime, as long - as you declare them in each project that contains any subpackages of the - namespace package, and as long as the namespace package's ``__init__.py`` - does not contain any code other than a namespace declaration. See the - section below on `Namespace Packages`_ for more information. - -``test_suite`` - A string naming a ``unittest.TestCase`` subclass (or a package or module - containing one or more of them, or a method of such a subclass), or naming - a function that can be called with no arguments and returns a - ``unittest.TestSuite``. If the named suite is a module, and the module - has an ``additional_tests()`` function, it is called and the results are - added to the tests to be run. If the named suite is a package, any - submodules and subpackages are recursively added to the overall test suite. - - Specifying this argument enables use of the `test`_ command to run the - specified test suite, e.g. via ``setup.py test``. See the section on the - `test`_ command below for more details. - - New in 41.5.0: Deprecated the test command. - -``tests_require`` - If your project's tests need one or more additional packages besides those - needed to install it, you can use this option to specify them. It should - be a string or list of strings specifying what other distributions need to - be present for the package's tests to run. When you run the ``test`` - command, ``setuptools`` will attempt to obtain these (using pip if - available). Note that these required projects will *not* be installed on - the system where the tests are run, but only downloaded to the project's setup - directory if they're not already installed locally. - - New in 41.5.0: Deprecated the test command. - -.. _test_loader: - -``test_loader`` - If you would like to use a different way of finding tests to run than what - setuptools normally uses, you can specify a module name and class name in - this argument. The named class must be instantiable with no arguments, and - its instances must support the ``loadTestsFromNames()`` method as defined - in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will - pass only one test "name" in the `names` argument: the value supplied for - the ``test_suite`` argument. The loader you specify may interpret this - string in any way it likes, as there are no restrictions on what may be - contained in a ``test_suite`` string. - - The module name and class name must be separated by a ``:``. The default - value of this argument is ``"setuptools.command.test:ScanningLoader"``. If - you want to use the default ``unittest`` behavior, you can specify - ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This - will prevent automatic scanning of submodules and subpackages. - - The module and class you specify here may be contained in another package, - as long as you use the ``tests_require`` option to ensure that the package - containing the loader class is available when the ``test`` command is run. - - New in 41.5.0: Deprecated the test command. - -``eager_resources`` - A list of strings naming resources that should be extracted together, if - any of them is needed, or if any C extensions included in the project are - imported. This argument is only useful if the project will be installed as - a zipfile, and there is a need to have all of the listed resources be - extracted to the filesystem *as a unit*. Resources listed here - should be "/"-separated paths, relative to the source root, so to list a - resource ``foo.png`` in package ``bar.baz``, you would include the string - ``bar/baz/foo.png`` in this argument. - - If you only need to obtain resources one at a time, or you don't have any C - extensions that access other files in the project (such as data files or - shared libraries), you probably do NOT need this argument and shouldn't - mess with it. For more details on how this argument works, see the section - below on `Automatic Resource Extraction`_. - -``use_2to3`` - Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. See :doc:`python3` for more details. - -``convert_2to3_doctests`` - List of doctest source files that need to be converted with 2to3. - See :doc:`python3` for more details. - -``use_2to3_fixers`` - A list of modules to search for additional fixers to be used during - the 2to3 conversion. See :doc:`python3` for more details. - -``project_urls`` - An arbitrary map of URL names to hyperlinks, allowing more extensible - documentation of where various resources can be found than the simple - ``url`` and ``download_url`` options provide. Using ``find_packages()`` diff --git a/docs/userguide/keywords.txt b/docs/userguide/keywords.txt new file mode 100644 index 0000000000..e2852b3410 --- /dev/null +++ b/docs/userguide/keywords.txt @@ -0,0 +1,175 @@ +New and Changed ``setup()`` Keywords +==================================== + +The following keyword arguments to ``setup()`` are added or changed by +``setuptools``. All of them are optional; you do not have to supply them +unless you need the associated ``setuptools`` feature. + +``include_package_data`` + If set to ``True``, this tells ``setuptools`` to automatically include any + data files it finds inside your package directories that are specified by + your ``MANIFEST.in`` file. For more information, see the section below on + `Including Data Files`_. + +``exclude_package_data`` + A dictionary mapping package names to lists of glob patterns that should + be *excluded* from your package directories. You can use this to trim back + any excess files included by ``include_package_data``. For a complete + description and examples, see the section below on `Including Data Files`_. + +``package_data`` + A dictionary mapping package names to lists of glob patterns. For a + complete description and examples, see the section below on `Including + Data Files`_. You do not need to use this option if you are using + ``include_package_data``, unless you need to add e.g. files that are + generated by your setup script and build process. (And are therefore not + in source control or are files that you don't want to include in your + source distribution.) + +``zip_safe`` + A boolean (True or False) flag specifying whether the project can be + safely installed and run from a zip file. If this argument is not + supplied, the ``bdist_egg`` command will have to analyze all of your + project's contents for possible problems each time it builds an egg. + +``install_requires`` + A string or list of strings specifying what other distributions need to + be installed when this one is. See the section below on `Declaring + Dependencies`_ for details and examples of the format of this argument. + +``entry_points`` + A dictionary mapping entry point group names to strings or lists of strings + defining the entry points. Entry points are used to support dynamic + discovery of services or plugins provided by a project. See `Dynamic + Discovery of Services and Plugins`_ for details and examples of the format + of this argument. In addition, this keyword is used to support `Automatic + Script Creation`_. + +``extras_require`` + A dictionary mapping names of "extras" (optional features of your project) + to strings or lists of strings specifying what other distributions must be + installed to support those features. See the section below on `Declaring + Dependencies`_ for details and examples of the format of this argument. + +``python_requires`` + A string corresponding to a version specifier (as defined in PEP 440) for + the Python version, used to specify the Requires-Python defined in PEP 345. + +``setup_requires`` + A string or list of strings specifying what other distributions need to + be present in order for the *setup script* to run. ``setuptools`` will + attempt to obtain these (using pip if available) before processing the + rest of the setup script or commands. This argument is needed if you + are using distutils extensions as part of your build process; for + example, extensions that process setup() arguments and turn them into + EGG-INFO metadata files. + + (Note: projects listed in ``setup_requires`` will NOT be automatically + installed on the system where the setup script is being run. They are + simply downloaded to the ./.eggs directory if they're not locally available + already. If you want them to be installed, as well as being available + when the setup script is run, you should add them to ``install_requires`` + **and** ``setup_requires``.) + +``dependency_links`` + A list of strings naming URLs to be searched when satisfying dependencies. + These links will be used if needed to install packages specified by + ``setup_requires`` or ``tests_require``. They will also be written into + the egg's metadata for use during install by tools that support them. + +``namespace_packages`` + A list of strings naming the project's "namespace packages". A namespace + package is a package that may be split across multiple project + distributions. For example, Zope 3's ``zope`` package is a namespace + package, because subpackages like ``zope.interface`` and ``zope.publisher`` + may be distributed separately. The egg runtime system can automatically + merge such subpackages into a single parent package at runtime, as long + as you declare them in each project that contains any subpackages of the + namespace package, and as long as the namespace package's ``__init__.py`` + does not contain any code other than a namespace declaration. See the + section below on `Namespace Packages`_ for more information. + +``test_suite`` + A string naming a ``unittest.TestCase`` subclass (or a package or module + containing one or more of them, or a method of such a subclass), or naming + a function that can be called with no arguments and returns a + ``unittest.TestSuite``. If the named suite is a module, and the module + has an ``additional_tests()`` function, it is called and the results are + added to the tests to be run. If the named suite is a package, any + submodules and subpackages are recursively added to the overall test suite. + + Specifying this argument enables use of the `test`_ command to run the + specified test suite, e.g. via ``setup.py test``. See the section on the + `test`_ command below for more details. + + New in 41.5.0: Deprecated the test command. + +``tests_require`` + If your project's tests need one or more additional packages besides those + needed to install it, you can use this option to specify them. It should + be a string or list of strings specifying what other distributions need to + be present for the package's tests to run. When you run the ``test`` + command, ``setuptools`` will attempt to obtain these (using pip if + available). Note that these required projects will *not* be installed on + the system where the tests are run, but only downloaded to the project's setup + directory if they're not already installed locally. + + New in 41.5.0: Deprecated the test command. + +.. _test_loader: + +``test_loader`` + If you would like to use a different way of finding tests to run than what + setuptools normally uses, you can specify a module name and class name in + this argument. The named class must be instantiable with no arguments, and + its instances must support the ``loadTestsFromNames()`` method as defined + in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will + pass only one test "name" in the `names` argument: the value supplied for + the ``test_suite`` argument. The loader you specify may interpret this + string in any way it likes, as there are no restrictions on what may be + contained in a ``test_suite`` string. + + The module name and class name must be separated by a ``:``. The default + value of this argument is ``"setuptools.command.test:ScanningLoader"``. If + you want to use the default ``unittest`` behavior, you can specify + ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This + will prevent automatic scanning of submodules and subpackages. + + The module and class you specify here may be contained in another package, + as long as you use the ``tests_require`` option to ensure that the package + containing the loader class is available when the ``test`` command is run. + + New in 41.5.0: Deprecated the test command. + +``eager_resources`` + A list of strings naming resources that should be extracted together, if + any of them is needed, or if any C extensions included in the project are + imported. This argument is only useful if the project will be installed as + a zipfile, and there is a need to have all of the listed resources be + extracted to the filesystem *as a unit*. Resources listed here + should be "/"-separated paths, relative to the source root, so to list a + resource ``foo.png`` in package ``bar.baz``, you would include the string + ``bar/baz/foo.png`` in this argument. + + If you only need to obtain resources one at a time, or you don't have any C + extensions that access other files in the project (such as data files or + shared libraries), you probably do NOT need this argument and shouldn't + mess with it. For more details on how this argument works, see the section + below on `Automatic Resource Extraction`_. + +``use_2to3`` + Convert the source code from Python 2 to Python 3 with 2to3 during the + build process. See :doc:`python3` for more details. + +``convert_2to3_doctests`` + List of doctest source files that need to be converted with 2to3. + See :doc:`python3` for more details. + +``use_2to3_fixers`` + A list of modules to search for additional fixers to be used during + the 2to3 conversion. See :doc:`python3` for more details. + +``project_urls`` + An arbitrary map of URL names to hyperlinks, allowing more extensible + documentation of where various resources can be found than the simple + ``url`` and ``download_url`` options provide. \ No newline at end of file From 9175f899a4ddacc3c6bd6a02f3c17dde66403431 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:25:44 -0400 Subject: [PATCH 7827/8469] docs: add commands ref entry in userguide index --- docs/userguide/index.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index caaaa1d0c8..901aad42c7 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -14,4 +14,5 @@ ordinary Python packages based on the ``distutils``. :maxdepth: 1 Quickstart - keyword reference \ No newline at end of file + keyword reference + Command reference \ No newline at end of file From 9ea37eda077883d310bfb7537f58c51cab84ff4c Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:28:11 -0400 Subject: [PATCH 7828/8469] docs: migrate commands ref to commands.txt --- docs/setuptools.txt | 565 ----------------------------------- docs/userguide/commands.txt | 566 ++++++++++++++++++++++++++++++++++++ 2 files changed, 566 insertions(+), 565 deletions(-) create mode 100644 docs/userguide/commands.txt diff --git a/docs/setuptools.txt b/docs/setuptools.txt index e8a76c08e0..25af9d3322 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1193,572 +1193,7 @@ installed, and that your source releases will be similarly usable with or without Cython. ------------------ -Command Reference ------------------ - -.. _alias: - -``alias`` - Define shortcuts for commonly used commands -======================================================= - -Sometimes, you need to use the same commands over and over, but you can't -necessarily set them as defaults. For example, if you produce both development -snapshot releases and "stable" releases of a project, you may want to put -the distributions in different places, or use different ``egg_info`` tagging -options, etc. In these cases, it doesn't make sense to set the options in -a distutils configuration file, because the values of the options changed based -on what you're trying to do. - -Setuptools therefore allows you to define "aliases" - shortcut names for -an arbitrary string of commands and options, using ``setup.py alias aliasname -expansion``, where aliasname is the name of the new alias, and the remainder of -the command line supplies its expansion. For example, this command defines -a sitewide alias called "daily", that sets various ``egg_info`` tagging -options:: - - setup.py alias --global-config daily egg_info --tag-build=development - -Once the alias is defined, it can then be used with other setup commands, -e.g.:: - - setup.py daily bdist_egg # generate a daily-build .egg file - setup.py daily sdist # generate a daily-build source distro - setup.py daily sdist bdist_egg # generate both - -The above commands are interpreted as if the word ``daily`` were replaced with -``egg_info --tag-build=development``. - -Note that setuptools will expand each alias *at most once* in a given command -line. This serves two purposes. First, if you accidentally create an alias -loop, it will have no effect; you'll instead get an error message about an -unknown command. Second, it allows you to define an alias for a command, that -uses that command. For example, this (project-local) alias:: - - setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg - -redefines the ``bdist_egg`` command so that it always runs the ``rotate`` -command afterwards to delete all but the newest egg file. It doesn't loop -indefinitely on ``bdist_egg`` because the alias is only expanded once when -used. - -You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.:: - - setup.py alias --global-config --remove daily - -would delete the "daily" alias we defined above. - -Aliases can be defined on a project-specific, per-user, or sitewide basis. The -default is to define or remove a project-specific alias, but you can use any of -the `configuration file options`_ (listed under the `saveopts`_ command, below) -to determine which distutils configuration file an aliases will be added to -(or removed from). - -Note that if you omit the "expansion" argument to the ``alias`` command, -you'll get output showing that alias' current definition (and what -configuration file it's defined in). If you omit the alias name as well, -you'll get a listing of all current aliases along with their configuration -file locations. - - -``bdist_egg`` - Create a Python Egg for the project -=================================================== - -.. warning:: - **eggs** are deprecated in favor of wheels, and not supported by pip. - -This command generates a Python Egg (``.egg`` file) for the project. Python -Eggs are the preferred binary distribution format for EasyInstall, because they -are cross-platform (for "pure" packages), directly importable, and contain -project metadata including scripts and information about the project's -dependencies. They can be simply downloaded and added to ``sys.path`` -directly, or they can be placed in a directory on ``sys.path`` and then -automatically discovered by the egg runtime system. - -This command runs the `egg_info`_ command (if it hasn't already run) to update -the project's metadata (``.egg-info``) directory. If you have added any extra -metadata files to the ``.egg-info`` directory, those files will be included in -the new egg file's metadata directory, for use by the egg runtime system or by -any applications or frameworks that use that metadata. - -You won't usually need to specify any special options for this command; just -use ``bdist_egg`` and you're done. But there are a few options that may -be occasionally useful: - -``--dist-dir=DIR, -d DIR`` - Set the directory where the ``.egg`` file will be placed. If you don't - supply this, then the ``--dist-dir`` setting of the ``bdist`` command - will be used, which is usually a directory named ``dist`` in the project - directory. - -``--plat-name=PLATFORM, -p PLATFORM`` - Set the platform name string that will be embedded in the egg's filename - (assuming the egg contains C extensions). This can be used to override - the distutils default platform name with something more meaningful. Keep - in mind, however, that the egg runtime system expects to see eggs with - distutils platform names, so it may ignore or reject eggs with non-standard - platform names. Similarly, the EasyInstall program may ignore them when - searching web pages for download links. However, if you are - cross-compiling or doing some other unusual things, you might find a use - for this option. - -``--exclude-source-files`` - Don't include any modules' ``.py`` files in the egg, just compiled Python, - C, and data files. (Note that this doesn't affect any ``.py`` files in the - EGG-INFO directory or its subdirectories, since for example there may be - scripts with a ``.py`` extension which must still be retained.) We don't - recommend that you use this option except for packages that are being - bundled for proprietary end-user applications, or for "embedded" scenarios - where space is at an absolute premium. On the other hand, if your package - is going to be installed and used in compressed form, you might as well - exclude the source because Python's ``traceback`` module doesn't currently - understand how to display zipped source code anyway, or how to deal with - files that are in a different place from where their code was compiled. - -There are also some options you will probably never need, but which are there -because they were copied from similar ``bdist`` commands used as an example for -creating this one. They may be useful for testing and debugging, however, -which is why we kept them: - -``--keep-temp, -k`` - Keep the contents of the ``--bdist-dir`` tree around after creating the - ``.egg`` file. - -``--bdist-dir=DIR, -b DIR`` - Set the temporary directory for creating the distribution. The entire - contents of this directory are zipped to create the ``.egg`` file, after - running various installation commands to copy the package's modules, data, - and extensions here. - -``--skip-build`` - Skip doing any "build" commands; just go straight to the - install-and-compress phases. - - -.. _develop: - -``develop`` - Deploy the project source in "Development Mode" -============================================================= - -This command allows you to deploy your project's source for use in one or more -"staging areas" where it will be available for importing. This deployment is -done in such a way that changes to the project source are immediately available -in the staging area(s), without needing to run a build or install step after -each change. - -The ``develop`` command works by creating an ``.egg-link`` file (named for the -project) in the given staging area. If the staging area is Python's -``site-packages`` directory, it also updates an ``easy-install.pth`` file so -that the project is on ``sys.path`` by default for all programs run using that -Python installation. - -The ``develop`` command also installs wrapper scripts in the staging area (or -a separate directory, as specified) that will ensure the project's dependencies -are available on ``sys.path`` before running the project's source scripts. -And, it ensures that any missing project dependencies are available in the -staging area, by downloading and installing them if necessary. - -Last, but not least, the ``develop`` command invokes the ``build_ext -i`` -command to ensure any C extensions in the project have been built and are -up-to-date, and the ``egg_info`` command to ensure the project's metadata is -updated (so that the runtime and wrappers know what the project's dependencies -are). If you make any changes to the project's setup script or C extensions, -you should rerun the ``develop`` command against all relevant staging areas to -keep the project's scripts, metadata and extensions up-to-date. Most other -kinds of changes to your project should not require any build operations or -rerunning ``develop``, but keep in mind that even minor changes to the setup -script (e.g. changing an entry point definition) require you to re-run the -``develop`` or ``test`` commands to keep the distribution updated. - -Here are some of the options that the ``develop`` command accepts. Note that -they affect the project's dependencies as well as the project itself, so if you -have dependencies that need to be installed and you use ``--exclude-scripts`` -(for example), the dependencies' scripts will not be installed either! For -this reason, you may want to use pip to install the project's dependencies -before using the ``develop`` command, if you need finer control over the -installation options for dependencies. - -``--uninstall, -u`` - Un-deploy the current project. You may use the ``--install-dir`` or ``-d`` - option to designate the staging area. The created ``.egg-link`` file will - be removed, if present and it is still pointing to the project directory. - The project directory will be removed from ``easy-install.pth`` if the - staging area is Python's ``site-packages`` directory. - - Note that this option currently does *not* uninstall script wrappers! You - must uninstall them yourself, or overwrite them by using pip to install a - different version of the package. You can also avoid installing script - wrappers in the first place, if you use the ``--exclude-scripts`` (aka - ``-x``) option when you run ``develop`` to deploy the project. - -``--multi-version, -m`` - "Multi-version" mode. Specifying this option prevents ``develop`` from - adding an ``easy-install.pth`` entry for the project(s) being deployed, and - if an entry for any version of a project already exists, the entry will be - removed upon successful deployment. In multi-version mode, no specific - version of the package is available for importing, unless you use - ``pkg_resources.require()`` to put it on ``sys.path``, or you are running - a wrapper script generated by ``setuptools``. (In which case the wrapper - script calls ``require()`` for you.) - - Note that if you install to a directory other than ``site-packages``, - this option is automatically in effect, because ``.pth`` files can only be - used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use - the ``--install-dir`` or ``-d`` option (or they are set via configuration - file(s)) your project and its dependencies will be deployed in multi- - version mode. - -``--install-dir=DIR, -d DIR`` - Set the installation directory (staging area). If this option is not - directly specified on the command line or in a distutils configuration - file, the distutils default installation location is used. Normally, this - will be the ``site-packages`` directory, but if you are using distutils - configuration files, setting things like ``prefix`` or ``install_lib``, - then those settings are taken into account when computing the default - staging area. - -``--script-dir=DIR, -s DIR`` - Set the script installation directory. If you don't supply this option - (via the command line or a configuration file), but you *have* supplied - an ``--install-dir`` (via command line or config file), then this option - defaults to the same directory, so that the scripts will be able to find - their associated package installation. Otherwise, this setting defaults - to the location where the distutils would normally install scripts, taking - any distutils configuration file settings into account. - -``--exclude-scripts, -x`` - Don't deploy script wrappers. This is useful if you don't want to disturb - existing versions of the scripts in the staging area. - -``--always-copy, -a`` - Copy all needed distributions to the staging area, even if they - are already present in another directory on ``sys.path``. By default, if - a requirement can be met using a distribution that is already available in - a directory on ``sys.path``, it will not be copied to the staging area. - -``--egg-path=DIR`` - Force the generated ``.egg-link`` file to use a specified relative path - to the source directory. This can be useful in circumstances where your - installation directory is being shared by code running under multiple - platforms (e.g. Mac and Windows) which have different absolute locations - for the code under development, but the same *relative* locations with - respect to the installation directory. If you use this option when - installing, you must supply the same relative path when uninstalling. - -In addition to the above options, the ``develop`` command also accepts all of -the same options accepted by ``easy_install``. If you've configured any -``easy_install`` settings in your ``setup.cfg`` (or other distutils config -files), the ``develop`` command will use them as defaults, unless you override -them in a ``[develop]`` section or on the command line. - - -.. _egg_info: - -``egg_info`` - Create egg metadata and set build tags -===================================================== - -This command performs two operations: it updates a project's ``.egg-info`` -metadata directory (used by the ``bdist_egg``, ``develop``, and ``test`` -commands), and it allows you to temporarily change a project's version string, -to support "daily builds" or "snapshot" releases. It is run automatically by -the ``sdist``, ``bdist_egg``, ``develop``, and ``test`` commands in order to -update the project's metadata, but you can also specify it explicitly in order -to temporarily change the project's version string while executing other -commands. (It also generates the ``.egg-info/SOURCES.txt`` manifest file, which -is used when you are building source distributions.) - -In addition to writing the core egg metadata defined by ``setuptools`` and -required by ``pkg_resources``, this command can be extended to write other -metadata files as well, by defining entry points in the ``egg_info.writers`` -group. See the section on `Adding new EGG-INFO Files`_ below for more details. -Note that using additional metadata writers may require you to include a -``setup_requires`` argument to ``setup()`` in order to ensure that the desired -writers are available on ``sys.path``. - - -Release Tagging Options ------------------------ - -The following options can be used to modify the project's version string for -all remaining commands on the setup command line. The options are processed -in the order shown, so if you use more than one, the requested tags will be -added in the following order: - -``--tag-build=NAME, -b NAME`` - Append NAME to the project's version string. Due to the way setuptools - processes "pre-release" version suffixes beginning with the letters "a" - through "e" (like "alpha", "beta", and "candidate"), you will usually want - to use a tag like ".build" or ".dev", as this will cause the version number - to be considered *lower* than the project's default version. (If you - want to make the version number *higher* than the default version, you can - always leave off --tag-build and then use one or both of the following - options.) - - If you have a default build tag set in your ``setup.cfg``, you can suppress - it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument - to the ``egg_info`` command. - -``--tag-date, -d`` - Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the - project's version number. - -``--no-date, -D`` - Don't include a date stamp in the version number. This option is included - so you can override a default setting in ``setup.cfg``. - - -(Note: Because these options modify the version number used for source and -binary distributions of your project, you should first make sure that you know -how the resulting version numbers will be interpreted by automated tools -like pip. See the section above on `Specifying Your Project's Version`_ for an -explanation of pre- and post-release tags, as well as tips on how to choose and -verify a versioning scheme for your project.) - -For advanced uses, there is one other option that can be set, to change the -location of the project's ``.egg-info`` directory. Commands that need to find -the project's source directory or metadata should get it from this setting: - - -Other ``egg_info`` Options --------------------------- - -``--egg-base=SOURCEDIR, -e SOURCEDIR`` - Specify the directory that should contain the .egg-info directory. This - should normally be the root of your project's source tree (which is not - necessarily the same as your project directory; some projects use a ``src`` - or ``lib`` subdirectory as the source root). You should not normally need - to specify this directory, as it is normally determined from the - ``package_dir`` argument to the ``setup()`` function, if any. If there is - no ``package_dir`` set, this option defaults to the current directory. - - -``egg_info`` Examples ---------------------- - -Creating a dated "nightly build" snapshot egg:: - - setup.py egg_info --tag-date --tag-build=DEV bdist_egg - -Creating a release with no version tags, even if some default tags are -specified in ``setup.cfg``:: - - setup.py egg_info -RDb "" sdist bdist_egg - -(Notice that ``egg_info`` must always appear on the command line *before* any -commands that you want the version changes to apply to.) - -.. _rotate: - -``rotate`` - Delete outdated distribution files -=============================================== - -As you develop new versions of your project, your distribution (``dist``) -directory will gradually fill up with older source and/or binary distribution -files. The ``rotate`` command lets you automatically clean these up, keeping -only the N most-recently modified files matching a given pattern. - -``--match=PATTERNLIST, -m PATTERNLIST`` - Comma-separated list of glob patterns to match. This option is *required*. - The project name and ``-*`` is prepended to the supplied patterns, in order - to match only distributions belonging to the current project (in case you - have a shared distribution directory for multiple projects). Typically, - you will use a glob pattern like ``.zip`` or ``.egg`` to match files of - the specified type. Note that each supplied pattern is treated as a - distinct group of files for purposes of selecting files to delete. - -``--keep=COUNT, -k COUNT`` - Number of matching distributions to keep. For each group of files - identified by a pattern specified with the ``--match`` option, delete all - but the COUNT most-recently-modified files in that group. This option is - *required*. - -``--dist-dir=DIR, -d DIR`` - Directory where the distributions are. This defaults to the value of the - ``bdist`` command's ``--dist-dir`` option, which will usually be the - project's ``dist`` subdirectory. - -**Example 1**: Delete all .tar.gz files from the distribution directory, except -for the 3 most recently modified ones:: - - setup.py rotate --match=.tar.gz --keep=3 -**Example 2**: Delete all Python 2.3 or Python 2.4 eggs from the distribution -directory, except the most recently modified one for each Python version:: - - setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1 - - -.. _saveopts: - -``saveopts`` - Save used options to a configuration file -======================================================== - -Finding and editing ``distutils`` configuration files can be a pain, especially -since you also have to translate the configuration options from command-line -form to the proper configuration file format. You can avoid these hassles by -using the ``saveopts`` command. Just add it to the command line to save the -options you used. For example, this command builds the project using -the ``mingw32`` C compiler, then saves the --compiler setting as the default -for future builds (even those run implicitly by the ``install`` command):: - - setup.py build --compiler=mingw32 saveopts - -The ``saveopts`` command saves all options for every command specified on the -command line to the project's local ``setup.cfg`` file, unless you use one of -the `configuration file options`_ to change where the options are saved. For -example, this command does the same as above, but saves the compiler setting -to the site-wide (global) distutils configuration:: - - setup.py build --compiler=mingw32 saveopts -g - -Note that it doesn't matter where you place the ``saveopts`` command on the -command line; it will still save all the options specified for all commands. -For example, this is another valid way to spell the last example:: - - setup.py saveopts -g build --compiler=mingw32 - -Note, however, that all of the commands specified are always run, regardless of -where ``saveopts`` is placed on the command line. - - -Configuration File Options --------------------------- - -Normally, settings such as options and aliases are saved to the project's -local ``setup.cfg`` file. But you can override this and save them to the -global or per-user configuration files, or to a manually-specified filename. - -``--global-config, -g`` - Save settings to the global ``distutils.cfg`` file inside the ``distutils`` - package directory. You must have write access to that directory to use - this option. You also can't combine this option with ``-u`` or ``-f``. - -``--user-config, -u`` - Save settings to the current user's ``~/.pydistutils.cfg`` (POSIX) or - ``$HOME/pydistutils.cfg`` (Windows) file. You can't combine this option - with ``-g`` or ``-f``. - -``--filename=FILENAME, -f FILENAME`` - Save settings to the specified configuration file to use. You can't - combine this option with ``-g`` or ``-u``. Note that if you specify a - non-standard filename, the ``distutils`` and ``setuptools`` will not - use the file's contents. This option is mainly included for use in - testing. - -These options are used by other ``setuptools`` commands that modify -configuration files, such as the `alias`_ and `setopt`_ commands. - - -.. _setopt: - -``setopt`` - Set a distutils or setuptools option in a config file -================================================================== - -This command is mainly for use by scripts, but it can also be used as a quick -and dirty way to change a distutils configuration option without having to -remember what file the options are in and then open an editor. - -**Example 1**. Set the default C compiler to ``mingw32`` (using long option -names):: - - setup.py setopt --command=build --option=compiler --set-value=mingw32 - -**Example 2**. Remove any setting for the distutils default package -installation directory (short option names):: - - setup.py setopt -c install -o install_lib -r - - -Options for the ``setopt`` command: - -``--command=COMMAND, -c COMMAND`` - Command to set the option for. This option is required. - -``--option=OPTION, -o OPTION`` - The name of the option to set. This option is required. - -``--set-value=VALUE, -s VALUE`` - The value to set the option to. Not needed if ``-r`` or ``--remove`` is - set. - -``--remove, -r`` - Remove (unset) the option, instead of setting it. - -In addition to the above options, you may use any of the `configuration file -options`_ (listed under the `saveopts`_ command, above) to determine which -distutils configuration file the option will be added to (or removed from). - - -.. _test: - -``test`` - Build package and run a unittest suite -================================================= - -.. warning:: - ``test`` is deprecated and will be removed in a future version. Users - looking for a generic test entry point independent of test runner are - encouraged to use `tox `_. - -When doing test-driven development, or running automated builds that need -testing before they are deployed for downloading or use, it's often useful -to be able to run a project's unit tests without actually deploying the project -anywhere, even using the ``develop`` command. The ``test`` command runs a -project's unit tests without actually deploying it, by temporarily putting the -project's source on ``sys.path``, after first running ``build_ext -i`` and -``egg_info`` to ensure that any C extensions and project metadata are -up-to-date. - -To use this command, your project's tests must be wrapped in a ``unittest`` -test suite by either a function, a ``TestCase`` class or method, or a module -or package containing ``TestCase`` classes. If the named suite is a module, -and the module has an ``additional_tests()`` function, it is called and the -result (which must be a ``unittest.TestSuite``) is added to the tests to be -run. If the named suite is a package, any submodules and subpackages are -recursively added to the overall test suite. (Note: if your project specifies -a ``test_loader``, the rules for processing the chosen ``test_suite`` may -differ; see the `test_loader`_ documentation for more details.) - -Note that many test systems including ``doctest`` support wrapping their -non-``unittest`` tests in ``TestSuite`` objects. So, if you are using a test -package that does not support this, we suggest you encourage its developers to -implement test suite support, as this is a convenient and standard way to -aggregate a collection of tests to be run under a common test harness. - -By default, tests will be run in the "verbose" mode of the ``unittest`` -package's text test runner, but you can get the "quiet" mode (just dots) if -you supply the ``-q`` or ``--quiet`` option, either as a global option to -the setup script (e.g. ``setup.py -q test``) or as an option for the ``test`` -command itself (e.g. ``setup.py test -q``). There is one other option -available: - -``--test-suite=NAME, -s NAME`` - Specify the test suite (or module, class, or method) to be run - (e.g. ``some_module.test_suite``). The default for this option can be - set by giving a ``test_suite`` argument to the ``setup()`` function, e.g.:: - - setup( - # ... - test_suite="my_package.tests.test_all" - ) - - If you did not set a ``test_suite`` in your ``setup()`` call, and do not - provide a ``--test-suite`` option, an error will occur. - -New in 41.5.0: Deprecated the test command. - - -.. _upload: - -``upload`` - Upload source and/or egg distributions to PyPI -=========================================================== - -The ``upload`` command was deprecated in version 40.0 and removed in version -42.0. Use `twine `_ instead. - -For more information on the current best practices in uploading your packages -to PyPI, see the Python Packaging User Guide's "Packaging Python Projects" -tutorial specifically the section on `uploading the distribution archives -`_. ----------------------------------------- diff --git a/docs/userguide/commands.txt b/docs/userguide/commands.txt new file mode 100644 index 0000000000..8604841621 --- /dev/null +++ b/docs/userguide/commands.txt @@ -0,0 +1,566 @@ +----------------- +Command Reference +----------------- + +.. _alias: + +``alias`` - Define shortcuts for commonly used commands +======================================================= + +Sometimes, you need to use the same commands over and over, but you can't +necessarily set them as defaults. For example, if you produce both development +snapshot releases and "stable" releases of a project, you may want to put +the distributions in different places, or use different ``egg_info`` tagging +options, etc. In these cases, it doesn't make sense to set the options in +a distutils configuration file, because the values of the options changed based +on what you're trying to do. + +Setuptools therefore allows you to define "aliases" - shortcut names for +an arbitrary string of commands and options, using ``setup.py alias aliasname +expansion``, where aliasname is the name of the new alias, and the remainder of +the command line supplies its expansion. For example, this command defines +a sitewide alias called "daily", that sets various ``egg_info`` tagging +options:: + + setup.py alias --global-config daily egg_info --tag-build=development + +Once the alias is defined, it can then be used with other setup commands, +e.g.:: + + setup.py daily bdist_egg # generate a daily-build .egg file + setup.py daily sdist # generate a daily-build source distro + setup.py daily sdist bdist_egg # generate both + +The above commands are interpreted as if the word ``daily`` were replaced with +``egg_info --tag-build=development``. + +Note that setuptools will expand each alias *at most once* in a given command +line. This serves two purposes. First, if you accidentally create an alias +loop, it will have no effect; you'll instead get an error message about an +unknown command. Second, it allows you to define an alias for a command, that +uses that command. For example, this (project-local) alias:: + + setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg + +redefines the ``bdist_egg`` command so that it always runs the ``rotate`` +command afterwards to delete all but the newest egg file. It doesn't loop +indefinitely on ``bdist_egg`` because the alias is only expanded once when +used. + +You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.:: + + setup.py alias --global-config --remove daily + +would delete the "daily" alias we defined above. + +Aliases can be defined on a project-specific, per-user, or sitewide basis. The +default is to define or remove a project-specific alias, but you can use any of +the `configuration file options`_ (listed under the `saveopts`_ command, below) +to determine which distutils configuration file an aliases will be added to +(or removed from). + +Note that if you omit the "expansion" argument to the ``alias`` command, +you'll get output showing that alias' current definition (and what +configuration file it's defined in). If you omit the alias name as well, +you'll get a listing of all current aliases along with their configuration +file locations. + + +``bdist_egg`` - Create a Python Egg for the project +=================================================== + +.. warning:: + **eggs** are deprecated in favor of wheels, and not supported by pip. + +This command generates a Python Egg (``.egg`` file) for the project. Python +Eggs are the preferred binary distribution format for EasyInstall, because they +are cross-platform (for "pure" packages), directly importable, and contain +project metadata including scripts and information about the project's +dependencies. They can be simply downloaded and added to ``sys.path`` +directly, or they can be placed in a directory on ``sys.path`` and then +automatically discovered by the egg runtime system. + +This command runs the `egg_info`_ command (if it hasn't already run) to update +the project's metadata (``.egg-info``) directory. If you have added any extra +metadata files to the ``.egg-info`` directory, those files will be included in +the new egg file's metadata directory, for use by the egg runtime system or by +any applications or frameworks that use that metadata. + +You won't usually need to specify any special options for this command; just +use ``bdist_egg`` and you're done. But there are a few options that may +be occasionally useful: + +``--dist-dir=DIR, -d DIR`` + Set the directory where the ``.egg`` file will be placed. If you don't + supply this, then the ``--dist-dir`` setting of the ``bdist`` command + will be used, which is usually a directory named ``dist`` in the project + directory. + +``--plat-name=PLATFORM, -p PLATFORM`` + Set the platform name string that will be embedded in the egg's filename + (assuming the egg contains C extensions). This can be used to override + the distutils default platform name with something more meaningful. Keep + in mind, however, that the egg runtime system expects to see eggs with + distutils platform names, so it may ignore or reject eggs with non-standard + platform names. Similarly, the EasyInstall program may ignore them when + searching web pages for download links. However, if you are + cross-compiling or doing some other unusual things, you might find a use + for this option. + +``--exclude-source-files`` + Don't include any modules' ``.py`` files in the egg, just compiled Python, + C, and data files. (Note that this doesn't affect any ``.py`` files in the + EGG-INFO directory or its subdirectories, since for example there may be + scripts with a ``.py`` extension which must still be retained.) We don't + recommend that you use this option except for packages that are being + bundled for proprietary end-user applications, or for "embedded" scenarios + where space is at an absolute premium. On the other hand, if your package + is going to be installed and used in compressed form, you might as well + exclude the source because Python's ``traceback`` module doesn't currently + understand how to display zipped source code anyway, or how to deal with + files that are in a different place from where their code was compiled. + +There are also some options you will probably never need, but which are there +because they were copied from similar ``bdist`` commands used as an example for +creating this one. They may be useful for testing and debugging, however, +which is why we kept them: + +``--keep-temp, -k`` + Keep the contents of the ``--bdist-dir`` tree around after creating the + ``.egg`` file. + +``--bdist-dir=DIR, -b DIR`` + Set the temporary directory for creating the distribution. The entire + contents of this directory are zipped to create the ``.egg`` file, after + running various installation commands to copy the package's modules, data, + and extensions here. + +``--skip-build`` + Skip doing any "build" commands; just go straight to the + install-and-compress phases. + + +.. _develop: + +``develop`` - Deploy the project source in "Development Mode" +============================================================= + +This command allows you to deploy your project's source for use in one or more +"staging areas" where it will be available for importing. This deployment is +done in such a way that changes to the project source are immediately available +in the staging area(s), without needing to run a build or install step after +each change. + +The ``develop`` command works by creating an ``.egg-link`` file (named for the +project) in the given staging area. If the staging area is Python's +``site-packages`` directory, it also updates an ``easy-install.pth`` file so +that the project is on ``sys.path`` by default for all programs run using that +Python installation. + +The ``develop`` command also installs wrapper scripts in the staging area (or +a separate directory, as specified) that will ensure the project's dependencies +are available on ``sys.path`` before running the project's source scripts. +And, it ensures that any missing project dependencies are available in the +staging area, by downloading and installing them if necessary. + +Last, but not least, the ``develop`` command invokes the ``build_ext -i`` +command to ensure any C extensions in the project have been built and are +up-to-date, and the ``egg_info`` command to ensure the project's metadata is +updated (so that the runtime and wrappers know what the project's dependencies +are). If you make any changes to the project's setup script or C extensions, +you should rerun the ``develop`` command against all relevant staging areas to +keep the project's scripts, metadata and extensions up-to-date. Most other +kinds of changes to your project should not require any build operations or +rerunning ``develop``, but keep in mind that even minor changes to the setup +script (e.g. changing an entry point definition) require you to re-run the +``develop`` or ``test`` commands to keep the distribution updated. + +Here are some of the options that the ``develop`` command accepts. Note that +they affect the project's dependencies as well as the project itself, so if you +have dependencies that need to be installed and you use ``--exclude-scripts`` +(for example), the dependencies' scripts will not be installed either! For +this reason, you may want to use pip to install the project's dependencies +before using the ``develop`` command, if you need finer control over the +installation options for dependencies. + +``--uninstall, -u`` + Un-deploy the current project. You may use the ``--install-dir`` or ``-d`` + option to designate the staging area. The created ``.egg-link`` file will + be removed, if present and it is still pointing to the project directory. + The project directory will be removed from ``easy-install.pth`` if the + staging area is Python's ``site-packages`` directory. + + Note that this option currently does *not* uninstall script wrappers! You + must uninstall them yourself, or overwrite them by using pip to install a + different version of the package. You can also avoid installing script + wrappers in the first place, if you use the ``--exclude-scripts`` (aka + ``-x``) option when you run ``develop`` to deploy the project. + +``--multi-version, -m`` + "Multi-version" mode. Specifying this option prevents ``develop`` from + adding an ``easy-install.pth`` entry for the project(s) being deployed, and + if an entry for any version of a project already exists, the entry will be + removed upon successful deployment. In multi-version mode, no specific + version of the package is available for importing, unless you use + ``pkg_resources.require()`` to put it on ``sys.path``, or you are running + a wrapper script generated by ``setuptools``. (In which case the wrapper + script calls ``require()`` for you.) + + Note that if you install to a directory other than ``site-packages``, + this option is automatically in effect, because ``.pth`` files can only be + used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use + the ``--install-dir`` or ``-d`` option (or they are set via configuration + file(s)) your project and its dependencies will be deployed in multi- + version mode. + +``--install-dir=DIR, -d DIR`` + Set the installation directory (staging area). If this option is not + directly specified on the command line or in a distutils configuration + file, the distutils default installation location is used. Normally, this + will be the ``site-packages`` directory, but if you are using distutils + configuration files, setting things like ``prefix`` or ``install_lib``, + then those settings are taken into account when computing the default + staging area. + +``--script-dir=DIR, -s DIR`` + Set the script installation directory. If you don't supply this option + (via the command line or a configuration file), but you *have* supplied + an ``--install-dir`` (via command line or config file), then this option + defaults to the same directory, so that the scripts will be able to find + their associated package installation. Otherwise, this setting defaults + to the location where the distutils would normally install scripts, taking + any distutils configuration file settings into account. + +``--exclude-scripts, -x`` + Don't deploy script wrappers. This is useful if you don't want to disturb + existing versions of the scripts in the staging area. + +``--always-copy, -a`` + Copy all needed distributions to the staging area, even if they + are already present in another directory on ``sys.path``. By default, if + a requirement can be met using a distribution that is already available in + a directory on ``sys.path``, it will not be copied to the staging area. + +``--egg-path=DIR`` + Force the generated ``.egg-link`` file to use a specified relative path + to the source directory. This can be useful in circumstances where your + installation directory is being shared by code running under multiple + platforms (e.g. Mac and Windows) which have different absolute locations + for the code under development, but the same *relative* locations with + respect to the installation directory. If you use this option when + installing, you must supply the same relative path when uninstalling. + +In addition to the above options, the ``develop`` command also accepts all of +the same options accepted by ``easy_install``. If you've configured any +``easy_install`` settings in your ``setup.cfg`` (or other distutils config +files), the ``develop`` command will use them as defaults, unless you override +them in a ``[develop]`` section or on the command line. + + +.. _egg_info: + +``egg_info`` - Create egg metadata and set build tags +===================================================== + +This command performs two operations: it updates a project's ``.egg-info`` +metadata directory (used by the ``bdist_egg``, ``develop``, and ``test`` +commands), and it allows you to temporarily change a project's version string, +to support "daily builds" or "snapshot" releases. It is run automatically by +the ``sdist``, ``bdist_egg``, ``develop``, and ``test`` commands in order to +update the project's metadata, but you can also specify it explicitly in order +to temporarily change the project's version string while executing other +commands. (It also generates the ``.egg-info/SOURCES.txt`` manifest file, which +is used when you are building source distributions.) + +In addition to writing the core egg metadata defined by ``setuptools`` and +required by ``pkg_resources``, this command can be extended to write other +metadata files as well, by defining entry points in the ``egg_info.writers`` +group. See the section on `Adding new EGG-INFO Files`_ below for more details. +Note that using additional metadata writers may require you to include a +``setup_requires`` argument to ``setup()`` in order to ensure that the desired +writers are available on ``sys.path``. + + +Release Tagging Options +----------------------- + +The following options can be used to modify the project's version string for +all remaining commands on the setup command line. The options are processed +in the order shown, so if you use more than one, the requested tags will be +added in the following order: + +``--tag-build=NAME, -b NAME`` + Append NAME to the project's version string. Due to the way setuptools + processes "pre-release" version suffixes beginning with the letters "a" + through "e" (like "alpha", "beta", and "candidate"), you will usually want + to use a tag like ".build" or ".dev", as this will cause the version number + to be considered *lower* than the project's default version. (If you + want to make the version number *higher* than the default version, you can + always leave off --tag-build and then use one or both of the following + options.) + + If you have a default build tag set in your ``setup.cfg``, you can suppress + it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument + to the ``egg_info`` command. + +``--tag-date, -d`` + Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the + project's version number. + +``--no-date, -D`` + Don't include a date stamp in the version number. This option is included + so you can override a default setting in ``setup.cfg``. + + +(Note: Because these options modify the version number used for source and +binary distributions of your project, you should first make sure that you know +how the resulting version numbers will be interpreted by automated tools +like pip. See the section above on `Specifying Your Project's Version`_ for an +explanation of pre- and post-release tags, as well as tips on how to choose and +verify a versioning scheme for your project.) + +For advanced uses, there is one other option that can be set, to change the +location of the project's ``.egg-info`` directory. Commands that need to find +the project's source directory or metadata should get it from this setting: + + +Other ``egg_info`` Options +-------------------------- + +``--egg-base=SOURCEDIR, -e SOURCEDIR`` + Specify the directory that should contain the .egg-info directory. This + should normally be the root of your project's source tree (which is not + necessarily the same as your project directory; some projects use a ``src`` + or ``lib`` subdirectory as the source root). You should not normally need + to specify this directory, as it is normally determined from the + ``package_dir`` argument to the ``setup()`` function, if any. If there is + no ``package_dir`` set, this option defaults to the current directory. + + +``egg_info`` Examples +--------------------- + +Creating a dated "nightly build" snapshot egg:: + + setup.py egg_info --tag-date --tag-build=DEV bdist_egg + +Creating a release with no version tags, even if some default tags are +specified in ``setup.cfg``:: + + setup.py egg_info -RDb "" sdist bdist_egg + +(Notice that ``egg_info`` must always appear on the command line *before* any +commands that you want the version changes to apply to.) + +.. _rotate: + +``rotate`` - Delete outdated distribution files +=============================================== + +As you develop new versions of your project, your distribution (``dist``) +directory will gradually fill up with older source and/or binary distribution +files. The ``rotate`` command lets you automatically clean these up, keeping +only the N most-recently modified files matching a given pattern. + +``--match=PATTERNLIST, -m PATTERNLIST`` + Comma-separated list of glob patterns to match. This option is *required*. + The project name and ``-*`` is prepended to the supplied patterns, in order + to match only distributions belonging to the current project (in case you + have a shared distribution directory for multiple projects). Typically, + you will use a glob pattern like ``.zip`` or ``.egg`` to match files of + the specified type. Note that each supplied pattern is treated as a + distinct group of files for purposes of selecting files to delete. + +``--keep=COUNT, -k COUNT`` + Number of matching distributions to keep. For each group of files + identified by a pattern specified with the ``--match`` option, delete all + but the COUNT most-recently-modified files in that group. This option is + *required*. + +``--dist-dir=DIR, -d DIR`` + Directory where the distributions are. This defaults to the value of the + ``bdist`` command's ``--dist-dir`` option, which will usually be the + project's ``dist`` subdirectory. + +**Example 1**: Delete all .tar.gz files from the distribution directory, except +for the 3 most recently modified ones:: + + setup.py rotate --match=.tar.gz --keep=3 + +**Example 2**: Delete all Python 2.3 or Python 2.4 eggs from the distribution +directory, except the most recently modified one for each Python version:: + + setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1 + + +.. _saveopts: + +``saveopts`` - Save used options to a configuration file +======================================================== + +Finding and editing ``distutils`` configuration files can be a pain, especially +since you also have to translate the configuration options from command-line +form to the proper configuration file format. You can avoid these hassles by +using the ``saveopts`` command. Just add it to the command line to save the +options you used. For example, this command builds the project using +the ``mingw32`` C compiler, then saves the --compiler setting as the default +for future builds (even those run implicitly by the ``install`` command):: + + setup.py build --compiler=mingw32 saveopts + +The ``saveopts`` command saves all options for every command specified on the +command line to the project's local ``setup.cfg`` file, unless you use one of +the `configuration file options`_ to change where the options are saved. For +example, this command does the same as above, but saves the compiler setting +to the site-wide (global) distutils configuration:: + + setup.py build --compiler=mingw32 saveopts -g + +Note that it doesn't matter where you place the ``saveopts`` command on the +command line; it will still save all the options specified for all commands. +For example, this is another valid way to spell the last example:: + + setup.py saveopts -g build --compiler=mingw32 + +Note, however, that all of the commands specified are always run, regardless of +where ``saveopts`` is placed on the command line. + + +Configuration File Options +-------------------------- + +Normally, settings such as options and aliases are saved to the project's +local ``setup.cfg`` file. But you can override this and save them to the +global or per-user configuration files, or to a manually-specified filename. + +``--global-config, -g`` + Save settings to the global ``distutils.cfg`` file inside the ``distutils`` + package directory. You must have write access to that directory to use + this option. You also can't combine this option with ``-u`` or ``-f``. + +``--user-config, -u`` + Save settings to the current user's ``~/.pydistutils.cfg`` (POSIX) or + ``$HOME/pydistutils.cfg`` (Windows) file. You can't combine this option + with ``-g`` or ``-f``. + +``--filename=FILENAME, -f FILENAME`` + Save settings to the specified configuration file to use. You can't + combine this option with ``-g`` or ``-u``. Note that if you specify a + non-standard filename, the ``distutils`` and ``setuptools`` will not + use the file's contents. This option is mainly included for use in + testing. + +These options are used by other ``setuptools`` commands that modify +configuration files, such as the `alias`_ and `setopt`_ commands. + + +.. _setopt: + +``setopt`` - Set a distutils or setuptools option in a config file +================================================================== + +This command is mainly for use by scripts, but it can also be used as a quick +and dirty way to change a distutils configuration option without having to +remember what file the options are in and then open an editor. + +**Example 1**. Set the default C compiler to ``mingw32`` (using long option +names):: + + setup.py setopt --command=build --option=compiler --set-value=mingw32 + +**Example 2**. Remove any setting for the distutils default package +installation directory (short option names):: + + setup.py setopt -c install -o install_lib -r + + +Options for the ``setopt`` command: + +``--command=COMMAND, -c COMMAND`` + Command to set the option for. This option is required. + +``--option=OPTION, -o OPTION`` + The name of the option to set. This option is required. + +``--set-value=VALUE, -s VALUE`` + The value to set the option to. Not needed if ``-r`` or ``--remove`` is + set. + +``--remove, -r`` + Remove (unset) the option, instead of setting it. + +In addition to the above options, you may use any of the `configuration file +options`_ (listed under the `saveopts`_ command, above) to determine which +distutils configuration file the option will be added to (or removed from). + + +.. _test: + +``test`` - Build package and run a unittest suite +================================================= + +.. warning:: + ``test`` is deprecated and will be removed in a future version. Users + looking for a generic test entry point independent of test runner are + encouraged to use `tox `_. + +When doing test-driven development, or running automated builds that need +testing before they are deployed for downloading or use, it's often useful +to be able to run a project's unit tests without actually deploying the project +anywhere, even using the ``develop`` command. The ``test`` command runs a +project's unit tests without actually deploying it, by temporarily putting the +project's source on ``sys.path``, after first running ``build_ext -i`` and +``egg_info`` to ensure that any C extensions and project metadata are +up-to-date. + +To use this command, your project's tests must be wrapped in a ``unittest`` +test suite by either a function, a ``TestCase`` class or method, or a module +or package containing ``TestCase`` classes. If the named suite is a module, +and the module has an ``additional_tests()`` function, it is called and the +result (which must be a ``unittest.TestSuite``) is added to the tests to be +run. If the named suite is a package, any submodules and subpackages are +recursively added to the overall test suite. (Note: if your project specifies +a ``test_loader``, the rules for processing the chosen ``test_suite`` may +differ; see the `test_loader`_ documentation for more details.) + +Note that many test systems including ``doctest`` support wrapping their +non-``unittest`` tests in ``TestSuite`` objects. So, if you are using a test +package that does not support this, we suggest you encourage its developers to +implement test suite support, as this is a convenient and standard way to +aggregate a collection of tests to be run under a common test harness. + +By default, tests will be run in the "verbose" mode of the ``unittest`` +package's text test runner, but you can get the "quiet" mode (just dots) if +you supply the ``-q`` or ``--quiet`` option, either as a global option to +the setup script (e.g. ``setup.py -q test``) or as an option for the ``test`` +command itself (e.g. ``setup.py test -q``). There is one other option +available: + +``--test-suite=NAME, -s NAME`` + Specify the test suite (or module, class, or method) to be run + (e.g. ``some_module.test_suite``). The default for this option can be + set by giving a ``test_suite`` argument to the ``setup()`` function, e.g.:: + + setup( + # ... + test_suite="my_package.tests.test_all" + ) + + If you did not set a ``test_suite`` in your ``setup()`` call, and do not + provide a ``--test-suite`` option, an error will occur. + +New in 41.5.0: Deprecated the test command. + + +.. _upload: + +``upload`` - Upload source and/or egg distributions to PyPI +=========================================================== + +The ``upload`` command was deprecated in version 40.0 and removed in version +42.0. Use `twine `_ instead. + +For more information on the current best practices in uploading your packages +to PyPI, see the Python Packaging User Guide's "Packaging Python Projects" +tutorial specifically the section on `uploading the distribution archives +`_. \ No newline at end of file From 14bae0541bb17824fa4530cf693ef0093b5bdf48 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:46:49 -0400 Subject: [PATCH 7829/8469] docs: migrate functionality info to separate file cut-and-paste from setuptools.txt --- docs/setuptools.txt | 1326 +-------------------------- docs/userguide/functionalities.txt | 1338 ++++++++++++++++++++++++++++ 2 files changed, 1347 insertions(+), 1317 deletions(-) create mode 100644 docs/userguide/functionalities.txt diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 25af9d3322..7daeb3fc3f 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -61,953 +61,29 @@ Developer's Guide -Using ``find_packages()`` -------------------------- - -For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the -package list updated. That's what ``setuptools.find_packages()`` is for. - -``find_packages()`` takes a source directory and two lists of package name -patterns to exclude and include. If omitted, the source directory defaults to -the same -directory as the setup script. Some projects use a ``src`` or ``lib`` -directory as the root of their source tree, and those projects would of course -use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir={"": "src"}`` in their -``setup()`` arguments, but that's just a normal distutils thing.) - -Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python packages (any directory). Packages are only -recognized if they include an ``__init__.py`` file. Finally, exclusion -patterns are applied to remove matching packages. - -Inclusion and exclusion patterns are package names, optionally including -wildcards. For -example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose -last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", -"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, -but it still won't exclude a top-level ``tests`` package or the children -thereof. In fact, if you really want no ``tests`` packages at all, you'll need -something like this:: - - find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) - -in order to cover all the bases. Really, the exclusion patterns are intended -to cover simpler use cases than this, like excluding a single, specified -package and its subpackages. - -Regardless of the parameters, the ``find_packages()`` -function returns a list of package names suitable for use as the ``packages`` -argument to ``setup()``, and so is usually the easiest way to set that -argument in your setup script. Especially since it frees you from having to -remember to modify your setup script whenever your project grows additional -top-level packages or subpackages. - -``find_namespace_packages()`` ------------------------------ -In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant -of ``find_packages``, which has the same function signature as -``find_packages``, but works with `PEP 420`_ compliant implicit namespace -packages. Here is a minimal setup script using ``find_namespace_packages``:: - - from setuptools import setup, find_namespace_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_namespace_packages(), - ) - - -Keep in mind that according to PEP 420, you may have to either re-organize your -codebase a bit or define a few exclusions, as the definition of an implicit -namespace package is quite lenient, so for a project organized like so:: - - - ├── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - ├── setup.py - └── tests - └── test_mod1.py -A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a -top-level package called ``tests``! One way to avoid this problem is to use the -``include`` keyword to whitelist the packages to include, like so:: - from setuptools import setup, find_namespace_packages - setup( - name="namespace.mypackage", - version="0.1", - packages=find_namespace_packages(include=["namespace.*"]) - ) -Another option is to use the "src" layout, where all package code is placed in -the ``src`` directory, like so:: - ├── setup.py - ├── src - │   └── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - └── tests - └── test_mod1.py - -With this layout, the package directory is specified as ``src``, as such:: - - setup(name="namespace.mypackage", - version="0.1", - package_dir={"": "src"}, - packages=find_namespace_packages(where="src")) - -.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ - -Automatic Script Creation -========================= - -Packaging and installing scripts can be a bit awkward with the distutils. For -one thing, there's no easy way to have a script's filename match local -conventions on both Windows and POSIX platforms. For another, you often have -to create a separate file just for the "main" script, when your actual "main" -is a function in a module somewhere. And even in Python 2.4, using the ``-m`` -option only works for actual ``.py`` files that aren't installed in a package. - -``setuptools`` fixes all of these problems by automatically generating scripts -for you with the correct extension, and on Windows it will even create an -``.exe`` file so that users don't have to change their ``PATHEXT`` settings. -The way to use this feature is to define "entry points" in your setup script -that indicate what function the generated script should import and run. For -example, to create two console scripts called ``foo`` and ``bar``, and a GUI -script called ``baz``, you might do something like this:: - - setup( - # other arguments here... - entry_points={ - "console_scripts": [ - "foo = my_package.some_module:main_func", - "bar = other_module:some_func", - ], - "gui_scripts": [ - "baz = my_package_gui:start_func", - ] - } - ) - -When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, -and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. The functions you specify are -called with no arguments, and their return value is passed to -``sys.exit()``, so you can return an errorlevel or message to print to -stderr. - -On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are -created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The -``.exe`` wrappers find and execute the right version of Python to run the -``.py`` or ``.pyw`` file. - -You may define as many "console script" and "gui script" entry points as you -like, and each one can optionally specify "extras" that it depends on, that -will be added to ``sys.path`` when the script is run. For more information on -"extras", see the section below on `Declaring Extras`_. For more information -on "entry points" in general, see the section below on `Dynamic Discovery of -Services and Plugins`_. - - -"Eggsecutable" Scripts ----------------------- - -.. deprecated:: 45.3.0 - -Occasionally, there are situations where it's desirable to make an ``.egg`` -file directly executable. You can do this by including an entry point such -as the following:: - - setup( - # other arguments here... - entry_points={ - "setuptools.installation": [ - "eggsecutable = my_package.some_module:main_func", - ] - } - ) - -Any eggs built from the above setup script will include a short executable -prelude that imports and calls ``main_func()`` from ``my_package.some_module``. -The prelude can be run on Unix-like platforms (including Mac and Linux) by -invoking the egg with ``/bin/sh``, or by enabling execute permissions on the -``.egg`` file. For the executable prelude to run, the appropriate version of -Python must be available via the ``PATH`` environment variable, under its -"long" name. That is, if the egg is built for Python 2.3, there must be a -``python2.3`` executable present in a directory on ``PATH``. - -IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or -invoked via symlinks. They *must* be invoked using their original filename, in -order to ensure that, once running, ``pkg_resources`` will know what project -and version is in use. The header script will check this and exit with an -error if the ``.egg`` file has been renamed or is invoked via a symlink that -changes its base name. - - -Declaring Dependencies -====================== - -``setuptools`` supports automatically installing dependencies when a package is -installed, and including information about dependencies in Python Eggs (so that -package management tools like pip can use the information). - -``setuptools`` and ``pkg_resources`` use a common syntax for specifying a -project's required dependencies. This syntax consists of a project's PyPI -name, optionally followed by a comma-separated list of "extras" in square -brackets, optionally followed by a comma-separated list of version -specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, -``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be -separated by whitespace, but any whitespace or nonstandard characters within a -project name or version identifier must be replaced with ``-``. - -Version specifiers for a given project are internally sorted into ascending -version order, and used to establish what ranges of versions are acceptable. -Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes -``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from -the ranges they fall within. A project's version is then checked for -membership in the resulting ranges. (Note that providing conflicting conditions -for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may -therefore produce bizarre results.) - -Here are some example requirement specifiers:: - - docutils >= 0.3 - - # comment lines and \ continuations are allowed in requirement strings - BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ - ==1.6, ==1.7 # and so are line-end comments - - PEAK[FastCGI, reST]>=0.5a4 - - setuptools==0.5a7 - -The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers. If you include more than one -requirement in a string, each requirement must begin on a new line. - -This has three effects: - -1. When your project is installed, either by using pip, ``setup.py install``, - or ``setup.py develop``, all of the dependencies not already installed will - be located (via PyPI), downloaded, built (if necessary), and installed. -2. Any scripts in your project will be installed with wrappers that verify - the availability of the specified dependencies at runtime, and ensure that - the correct versions are added to ``sys.path`` (e.g. if multiple versions - have been installed). - -3. Python Egg distributions will include a metadata file listing the - dependencies. -Note, by the way, that if you declare your dependencies in ``setup.py``, you do -*not* need to use the ``require()`` function in your scripts or modules, as -long as you either install the project or use ``setup.py develop`` to do -development work on it. (See `"Development Mode"`_ below for more details on -using ``setup.py develop``.) - - -Dependencies that aren't in PyPI --------------------------------- - -.. warning:: - Dependency links support has been dropped by pip starting with version - 19.0 (released 2019-01-22). - -If your project depends on packages that don't exist on PyPI, you may still be -able to depend on them, as long as they are available for download as: - -- an egg, in the standard distutils ``sdist`` format, -- a single ``.py`` file, or -- a VCS repository (Subversion, Mercurial, or Git). - -You just need to add some URLs to the ``dependency_links`` argument to -``setup()``. - -The URLs must be either: - -1. direct download URLs, -2. the URLs of web pages that contain direct download links, or -3. the repository's URL - -In general, it's better to link to web pages, because it is usually less -complex to update a web page than to release a new version of your project. -You can also use a SourceForge ``showfiles.php`` link in the case where a -package you depend on is distributed via SourceForge. - -If you depend on a package that's distributed as a single ``.py`` file, you -must include an ``"#egg=project-version"`` suffix to the URL, to give a project -name and version number. (Be sure to escape any dashes in the name or version -by replacing them with underscores.) EasyInstall will recognize this suffix -and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file -as an egg. - -In the case of a VCS checkout, you should also append ``#egg=project-version`` -in order to identify for what package that checkout should be used. You can -append ``@REV`` to the URL's path (before the fragment) to specify a revision. -Additionally, you can also force the VCS being used by prepending the URL with -a certain prefix. Currently available are: - -- ``svn+URL`` for Subversion, -- ``git+URL`` for Git, and -- ``hg+URL`` for Mercurial - -A more complete example would be: - - ``vcs+proto://host/path@revision#egg=project-version`` - -Be careful with the version. It should match the one inside the project files. -If you want to disregard the version, you have to omit it both in the -``requires`` and in the URL's fragment. - -This will do a checkout (or a clone, in Git and Mercurial parlance) to a -temporary folder and run ``setup.py bdist_egg``. - -The ``dependency_links`` option takes the form of a list of URL strings. For -example, this will cause a search of the specified page for eggs or source -distributions, if the package's dependencies aren't already installed:: - - setup( - ... - dependency_links=[ - "http://peak.telecommunity.com/snapshots/" - ], - ) - - -.. _Declaring Extras: - - -Declaring "Extras" (optional features with their own dependencies) ------------------------------------------------------------------- - -Sometimes a project has "recommended" dependencies, that are not required for -all uses of the project. For example, a project might offer optional PDF -output if ReportLab is installed, and reStructuredText support if docutils is -installed. These optional features are called "extras", and setuptools allows -you to define their requirements as well. In this way, other projects that -require these optional features can force the additional requirements to be -installed, by naming the desired extras in their ``install_requires``. - -For example, let's say that Project A offers optional PDF and reST support:: - - setup( - name="Project-A", - ... - extras_require={ - "PDF": ["ReportLab>=1.2", "RXP"], - "reST": ["docutils>=0.3"], - } - ) - -As you can see, the ``extras_require`` argument takes a dictionary mapping -names of "extra" features, to strings or lists of strings describing those -features' requirements. These requirements will *not* be automatically -installed unless another package depends on them (directly or indirectly) by -including the desired "extras" in square brackets after the associated project -name. (Or if the extras were listed in a requirement spec on the "pip install" -command line.) - -Extras can be used by a project's `entry points`_ to specify dynamic -dependencies. For example, if Project A includes a "rst2pdf" script, it might -declare it like this, so that the "PDF" requirements are only resolved if the -"rst2pdf" script is run:: - - setup( - name="Project-A", - ... - entry_points={ - "console_scripts": [ - "rst2pdf = project_a.tools.pdfgen [PDF]", - "rst2html = project_a.tools.htmlgen", - # more script entry points ... - ], - } - ) - -Projects can also use another project's extras when specifying dependencies. -For example, if project B needs "project A" with PDF support installed, it -might declare the dependency like this:: - - setup( - name="Project-B", - install_requires=["Project-A[PDF]"], - ... - ) - -This will cause ReportLab to be installed along with project A, if project B is -installed -- even if project A was already installed. In this way, a project -can encapsulate groups of optional "downstream dependencies" under a feature -name, so that packages that depend on it don't have to know what the downstream -dependencies are. If a later version of Project A builds in PDF support and -no longer needs ReportLab, or if it ends up needing other dependencies besides -ReportLab in order to provide PDF support, Project B's setup information does -not need to change, but the right packages will still be installed if needed. - -Note, by the way, that if a project ends up not needing any other packages to -support a feature, it should keep an empty requirements list for that feature -in its ``extras_require`` argument, so that packages depending on that feature -don't break (due to an invalid feature name). For example, if Project A above -builds in PDF support and no longer needs ReportLab, it could change its -setup to this:: - - setup( - name="Project-A", - ... - extras_require={ - "PDF": [], - "reST": ["docutils>=0.3"], - } - ) - -so that Package B doesn't have to remove the ``[PDF]`` from its requirement -specifier. - - -.. _Platform Specific Dependencies: - - -Declaring platform specific dependencies ----------------------------------------- - -Sometimes a project might require a dependency to run on a specific platform. -This could to a package that back ports a module so that it can be used in -older python versions. Or it could be a package that is required to run on a -specific operating system. This will allow a project to work on multiple -different platforms without installing dependencies that are not required for -a platform that is installing the project. - -For example, here is a project that uses the ``enum`` module and ``pywin32``:: - - setup( - name="Project", - ... - install_requires=[ - "enum34;python_version<'3.4'", - "pywin32 >= 1.0;platform_system=='Windows'" - ] - ) - -Since the ``enum`` module was added in Python 3.4, it should only be installed -if the python version is earlier. Since ``pywin32`` will only be used on -windows, it should only be installed when the operating system is Windows. -Specifying version requirements for the dependencies is supported as normal. - -The environmental markers that may be used for testing platform types are -detailed in `PEP 508`_. - -.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ - -Including Data Files -==================== - -The distutils have traditionally allowed installation of "data files", which -are placed in a platform-specific location. However, the most common use case -for data files distributed with a package is for use *by* the package, usually -by including the data files in the package directory. - -Setuptools offers three ways to specify data files to be included in your -packages. First, you can simply use the ``include_package_data`` keyword, -e.g.:: - - from setuptools import setup, find_packages - setup( - ... - include_package_data=True - ) - -This tells setuptools to install any data files it finds in your packages. -The data files must be specified via the distutils' ``MANIFEST.in`` file. -(They can also be tracked by a revision control system, using an appropriate -plugin. See the section below on `Adding Support for Revision Control -Systems`_ for information on how to write such plugins.) - -If you want finer-grained control over what files are included (for example, -if you have documentation files in your package directories and want to exclude -them from installation), then you can also use the ``package_data`` keyword, -e.g.:: - - from setuptools import setup, find_packages - setup( - ... - package_data={ - # If any package contains *.txt or *.rst files, include them: - "": ["*.txt", "*.rst"], - # And include any *.msg files found in the "hello" package, too: - "hello": ["*.msg"], - } - ) - -The ``package_data`` argument is a dictionary that maps from package names to -lists of glob patterns. The globs may include subdirectory names, if the data -files are contained in a subdirectory of the package. For example, if the -package tree looks like this:: - - setup.py - src/ - mypkg/ - __init__.py - mypkg.txt - data/ - somefile.dat - otherdata.dat - -The setuptools setup file might look like this:: - - from setuptools import setup, find_packages - setup( - ... - packages=find_packages("src"), # include all packages under src - package_dir={"": "src"}, # tell distutils packages are under src - - package_data={ - # If any package contains *.txt files, include them: - "": ["*.txt"], - # And include any *.dat files found in the "data" subdirectory - # of the "mypkg" package, also: - "mypkg": ["data/*.dat"], - } - ) - -Notice that if you list patterns in ``package_data`` under the empty string, -these patterns are used to find files in every package, even ones that also -have their own patterns listed. Thus, in the above example, the ``mypkg.txt`` -file gets included even though it's not listed in the patterns for ``mypkg``. - -Also notice that if you use paths, you *must* use a forward slash (``/``) as -the path separator, even if you are on Windows. Setuptools automatically -converts slashes to appropriate platform-specific separators at build time. - -If datafiles are contained in a subdirectory of a package that isn't a package -itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required -in the ``package_data`` argument (as shown above with ``"data/*.dat"``). - -When building an ``sdist``, the datafiles are also drawn from the -``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if -the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. - -(Note: although the ``package_data`` argument was previously only available in -``setuptools``, it was also added to the Python ``distutils`` package as of -Python 2.4; there is `some documentation for the feature`__ available on the -python.org website. If using the setuptools-specific ``include_package_data`` -argument, files specified by ``package_data`` will *not* be automatically -added to the manifest unless they are listed in the MANIFEST.in file.) - -__ https://docs.python.org/3/distutils/setupscript.html#installing-package-data - -Sometimes, the ``include_package_data`` or ``package_data`` options alone -aren't sufficient to precisely define what files you want included. For -example, you may want to include package README files in your revision control -system and source distributions, but exclude them from being installed. So, -setuptools offers an ``exclude_package_data`` option as well, that allows you -to do things like this:: - - from setuptools import setup, find_packages - setup( - ... - packages=find_packages("src"), # include all packages under src - package_dir={"": "src"}, # tell distutils packages are under src - - include_package_data=True, # include everything in source control - - # ...but exclude README.txt from all packages - exclude_package_data={"": ["README.txt"]}, - ) - -The ``exclude_package_data`` option is a dictionary mapping package names to -lists of wildcard patterns, just like the ``package_data`` option. And, just -as with that option, a key of ``""`` will apply the given pattern(s) to all -packages. However, any files that match these patterns will be *excluded* -from installation, even if they were listed in ``package_data`` or were -included as a result of using ``include_package_data``. - -In summary, the three options allow you to: - -``include_package_data`` - Accept all data files and directories matched by ``MANIFEST.in``. - -``package_data`` - Specify additional patterns to match files that may or may - not be matched by ``MANIFEST.in`` or found in source control. - -``exclude_package_data`` - Specify patterns for data files and directories that should *not* be - included when a package is installed, even if they would otherwise have - been included due to the use of the preceding options. - -NOTE: Due to the way the distutils build process works, a data file that you -include in your project and then stop including may be "orphaned" in your -project's build directories, requiring you to run ``setup.py clean --all`` to -fully remove them. This may also be important for your users and contributors -if they track intermediate revisions of your project using Subversion; be sure -to let them know when you make changes that remove files from inclusion so they -can run ``setup.py clean --all``. - - -Accessing Data Files at Runtime -------------------------------- - -Typically, existing programs manipulate a package's ``__file__`` attribute in -order to find the location of data files. However, this manipulation isn't -compatible with PEP 302-based import hooks, including importing from zip files -and Python Eggs. It is strongly recommended that, if you are using data files, -you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access -them. The ``pkg_resources`` module is distributed as part of setuptools, so if -you're using setuptools to distribute your package, there is no reason not to -use its resource management API. See also `Importlib Resources`_ for -a quick example of converting code that uses ``__file__`` to use -``pkg_resources`` instead. - -.. _Importlib Resources: https://docs.python.org/3/library/importlib.html#module-importlib.resources - - -Non-Package Data Files ----------------------- - -Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data -files from the distribution into the egg (see `the old docs -`_). As eggs are deprecated and pip-based installs -fall back to the platform-specific location for installing data files, there is -no supported facility to reliably retrieve these resources. - -Instead, the PyPA recommends that any data files you wish to be accessible at -run time be included in the package. - - -Automatic Resource Extraction ------------------------------ - -If you are using tools that expect your resources to be "real" files, or your -project includes non-extension native libraries or other files that your C -extensions expect to be able to access, you may need to list those files in -the ``eager_resources`` argument to ``setup()``, so that the files will be -extracted together, whenever a C extension in the project is imported. - -This is especially important if your project includes shared libraries *other* -than distutils-built C extensions, and those shared libraries use file -extensions other than ``.dll``, ``.so``, or ``.dylib``, which are the -extensions that setuptools 0.6a8 and higher automatically detects as shared -libraries and adds to the ``native_libs.txt`` file for you. Any shared -libraries whose names do not end with one of those extensions should be listed -as ``eager_resources``, because they need to be present in the filesystem when -he C extensions that link to them are used. - -The ``pkg_resources`` runtime for compressed packages will automatically -extract *all* C extensions and ``eager_resources`` at the same time, whenever -*any* C extension or eager resource is requested via the ``resource_filename()`` -API. (C extensions are imported using ``resource_filename()`` internally.) -This ensures that C extensions will see all of the "real" files that they -expect to see. - -Note also that you can list directory resource names in ``eager_resources`` as -well, in which case the directory's contents (including subdirectories) will be -extracted whenever any C extension or eager resource is requested. - -Please note that if you're not sure whether you need to use this argument, you -don't! It's really intended to support projects with lots of non-Python -dependencies and as a last resort for crufty projects that can't otherwise -handle being compressed. If your package is pure Python, Python plus data -files, or Python plus C, you really don't need this. You've got to be using -either C or an external program that needs "real" files in your project before -there's any possibility of ``eager_resources`` being relevant to your project. - - -Extensible Applications and Frameworks -====================================== - - -.. _Entry Points: -Dynamic Discovery of Services and Plugins ------------------------------------------ -``setuptools`` supports creating libraries that "plug in" to extensible -applications and frameworks, by letting you register "entry points" in your -project that can be imported by the application or framework. - -For example, suppose that a blogging tool wants to support plugins -that provide translation for various file types to the blog's output format. -The framework might define an "entry point group" called ``blogtool.parsers``, -and then allow plugins to register entry points for the file extensions they -support. - -This would allow people to create distributions that contain one or more -parsers for different file types, and then the blogging tool would be able to -find the parsers at runtime by looking up an entry point for the file -extension (or mime type, or however it wants to). - -Note that if the blogging tool includes parsers for certain file formats, it -can register these as entry points in its own setup script, which means it -doesn't have to special-case its built-in formats. They can just be treated -the same as any other plugin's entry points would be. - -If you're creating a project that plugs in to an existing application or -framework, you'll need to know what entry points or entry point groups are -defined by that application or framework. Then, you can register entry points -in your setup script. Here are a few examples of ways you might register an -``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, -for our hypothetical blogging tool:: - - setup( - # ... - entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} - ) - - setup( - # ... - entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} - ) - - setup( - # ... - entry_points=""" - [blogtool.parsers] - .rst = some.nested.module:SomeClass.some_classmethod [reST] - """, - extras_require=dict(reST="Docutils>=0.3.5") - ) - -The ``entry_points`` argument to ``setup()`` accepts either a string with -``.ini``-style sections, or a dictionary mapping entry point group names to -either strings or lists of strings containing entry point specifiers. An -entry point specifier consists of a name and value, separated by an ``=`` -sign. The value consists of a dotted module name, optionally followed by a -``:`` and a dotted identifier naming an object within the module. It can -also include a bracketed list of "extras" that are required for the entry -point to be used. When the invoking application or framework requests loading -of an entry point, any requirements implied by the associated extras will be -passed to ``pkg_resources.require()``, so that an appropriate error message -can be displayed if the needed package(s) are missing. (Of course, the -invoking app or framework can ignore such errors if it wants to make an entry -point optional if a requirement isn't installed.) - - -Defining Additional Metadata ----------------------------- - -Some extensible applications and frameworks may need to define their own kinds -of metadata to include in eggs, which they can then access using the -``pkg_resources`` metadata APIs. Ordinarily, this is done by having plugin -developers include additional files in their ``ProjectName.egg-info`` -directory. However, since it can be tedious to create such files by hand, you -may want to create a distutils extension that will create the necessary files -from arguments to ``setup()``, in much the same way that ``setuptools`` does -for many of the ``setup()`` arguments it adds. See the section below on -`Creating distutils Extensions`_ for more details, especially the subsection on -`Adding new EGG-INFO Files`_. - - -"Development Mode" -================== - -Under normal circumstances, the ``distutils`` assume that you are going to -build a distribution of your project, not use it in its "raw" or "unbuilt" -form. If you were to use the ``distutils`` that way, you would have to rebuild -and reinstall your project every time you made a change to it during -development. - -Another problem that sometimes comes up with the ``distutils`` is that you may -need to do development on two related projects at the same time. You may need -to put both projects' packages in the same directory to run them, but need to -keep them separate for revision control purposes. How can you do this? - -Setuptools allows you to deploy your projects for use in a common directory or -staging area, but without copying any files. Thus, you can edit each project's -code in its checkout directory, and only need to run build commands when you -change a project's C extensions or similarly compiled files. You can even -deploy a project into another project's checkout directory, if that's your -preferred way of working (as opposed to using a common independent staging area -or the site-packages directory). - -To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install``, except that it doesn't actually install anything. -Instead, it creates a special ``.egg-link`` file in the deployment directory, -that links to your project's source code. And, if your deployment directory is -Python's ``site-packages`` directory, it will also update the -``easy-install.pth`` file to include your project's source code, thereby making -it available on ``sys.path`` for all programs using that Python installation. - -If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` -will not link directly to your source code when run under Python 3, since -that source code would be made for Python 2 and not work under Python 3. -Instead the ``setup.py develop`` will build Python 3 code under the ``build`` -directory, and link there. This means that after doing code changes you will -have to run ``setup.py build`` before these changes are picked up by your -Python 3 installation. - -In addition, the ``develop`` command creates wrapper scripts in the target -script directory that will run your in-development scripts after ensuring that -all your ``install_requires`` packages are available on ``sys.path``. - -You can deploy the same project to multiple staging areas, e.g. if you have -multiple projects on the same machine that are sharing the same project you're -doing development work. - -When you're done with a given development task, you can remove the project -source from a staging area using ``setup.py develop --uninstall``, specifying -the desired staging area if it's not the default. - -There are several options to control the precise behavior of the ``develop`` -command; see the section on the `develop`_ command below for more details. - -Note that you can also apply setuptools commands to non-setuptools projects, -using commands like this:: - - python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop - -That is, you can simply list the normal setup commands and options following -the quoted part. - - -Distributing a ``setuptools``-based project -=========================================== - -Detailed instructions to distribute a setuptools project can be found at -`Packaging project tutorials`_. - -.. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives - -Before you begin, make sure you have the latest versions of setuptools and wheel:: - - pip install --upgrade setuptools wheel - -To build a setuptools project, run this command from the same directory where -setup.py is located:: - - setup.py sdist bdist_wheel - -This will generate distribution archives in the `dist` directory. - -Before you upload the generated archives make sure you're registered on -https://test.pypi.org/account/register/. You will also need to verify your email -to be able to upload any packages. -You should install twine to be able to upload packages:: - - pip install --upgrade twine - -Now, to upload these archives, run:: - - twine upload --repository-url https://test.pypi.org/legacy/ dist/* - -To install your newly uploaded package ``example_pkg``, you can use pip:: - - pip install --index-url https://test.pypi.org/simple/ example_pkg - -If you have issues at any point, please refer to `Packaging project tutorials`_ -for clarification. - -Setting the ``zip_safe`` flag ------------------------------ - -For some use cases (such as bundling as part of a larger application), Python -packages may be run directly from a zip file. -Not all packages, however, are capable of running in compressed form, because -they may expect to be able to access either source code or data files as -normal operating system files. So, ``setuptools`` can install your project -as a zipfile or a directory, and its default choice is determined by the -project's ``zip_safe`` flag. - -You can pass a True or False value for the ``zip_safe`` argument to the -``setup()`` function, or you can omit it. If you omit it, the ``bdist_egg`` -command will analyze your project's contents to see if it can detect any -conditions that would prevent it from working in a zipfile. It will output -notices to the console about any such conditions that it finds. - -Currently, this analysis is extremely conservative: it will consider the -project unsafe if it contains any C extensions or datafiles whatsoever. This -does *not* mean that the project can't or won't work as a zipfile! It just -means that the ``bdist_egg`` authors aren't yet comfortable asserting that -the project *will* work. If the project contains no C or data files, and does -no ``__file__`` or ``__path__`` introspection or source code manipulation, then -there is an extremely solid chance the project will work when installed as a -zipfile. (And if the project uses ``pkg_resources`` for all its data file -access, then C extensions and other data files shouldn't be a problem at all. -See the `Accessing Data Files at Runtime`_ section above for more information.) -However, if ``bdist_egg`` can't be *sure* that your package will work, but -you've checked over all the warnings it issued, and you are either satisfied it -*will* work (or if you want to try it for yourself), then you should set -``zip_safe`` to ``True`` in your ``setup()`` call. If it turns out that it -doesn't work, you can always change it to ``False``, which will force -``setuptools`` to install your project as a directory rather than as a zipfile. -In the future, as we gain more experience with different packages and become -more satisfied with the robustness of the ``pkg_resources`` runtime, the -"zip safety" analysis may become less conservative. However, we strongly -recommend that you determine for yourself whether your project functions -correctly when installed as a zipfile, correct any problems if you can, and -then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` -flag, so that it will not be necessary for ``bdist_egg`` to try to guess -whether your project can work as a zipfile. -.. _Namespace Packages: -Namespace Packages ------------------- -Sometimes, a large package is more useful if distributed as a collection of -smaller eggs. However, Python does not normally allow the contents of a -package to be retrieved from more than one location. "Namespace packages" -are a solution for this problem. When you declare a package to be a namespace -package, it means that the package has no meaningful contents in its -``__init__.py``, and that it is merely a container for modules and subpackages. -The ``pkg_resources`` runtime will then automatically ensure that the contents -of namespace packages that are spread over multiple eggs or directories are -combined into a single "virtual" package. -The ``namespace_packages`` argument to ``setup()`` lets you declare your -project's namespace packages, so that they will be included in your project's -metadata. The argument should list the namespace packages that the egg -participates in. For example, the ZopeInterface project might do this:: - setup( - # ... - namespace_packages=["zope"] - ) -because it contains a ``zope.interface`` package that lives in the ``zope`` -namespace package. Similarly, a project for a standalone ``zope.publisher`` -would also declare the ``zope`` namespace package. When these projects are -installed and used, Python will see them both as part of a "virtual" ``zope`` -package, even though they will be installed in different locations. - -Namespace packages don't have to be top-level packages. For example, Zope 3's -``zope.app`` package is a namespace package, and in the future PEAK's -``peak.util`` package will be too. - -Note, by the way, that your project's source tree must include the namespace -packages' ``__init__.py`` files (and the ``__init__.py`` of any parent -packages), in a normal Python package layout. These ``__init__.py`` files -*must* contain the line:: - - __import__("pkg_resources").declare_namespace(__name__) - -This code ensures that the namespace package machinery is operating and that -the current package is registered as a namespace package. - -You must NOT include any other code and data in a namespace package's -``__init__.py``. Even though it may appear to work during development, or when -projects are installed as ``.egg`` files, it will not work when the projects -are installed using "system" packaging tools -- in such cases the -``__init__.py`` files will not be installed, let alone executed. - -You must include the ``declare_namespace()`` line in the ``__init__.py`` of -*every* project that has contents for the namespace package in question, in -order to ensure that the namespace will be declared regardless of which -project's copy of ``__init__.py`` is loaded first. If the first loaded -``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded! + + + + TRANSITIONAL NOTE @@ -1033,164 +109,14 @@ Our apologies for the inconvenience, and thank you for your patience. -Tagging and "Daily Build" or "Snapshot" Releases ------------------------------------------------- - -When a set of related projects are under development, it may be important to -track finer-grained version increments than you would normally use for e.g. -"stable" releases. While stable releases might be measured in dotted numbers -with alpha/beta/etc. status codes, development versions of a project often -need to be tracked by revision or build number or even build date. This is -especially true when projects in development need to refer to one another, and -therefore may literally need an up-to-the-minute version of something! - -To support these scenarios, ``setuptools`` allows you to "tag" your source and -egg distributions by adding one or more of the following to the project's -"official" version identifier: - -* A manually-specified pre-release tag, such as "build" or "dev", or a - manually-specified post-release tag, such as a build or revision number - (``--tag-build=STRING, -bSTRING``) - -* An 8-character representation of the build date (``--tag-date, -d``), as - a postrelease tag - -You can add these tags by adding ``egg_info`` and the desired options to -the command line ahead of the ``sdist`` or ``bdist`` commands that you want -to generate a daily build or snapshot for. See the section below on the -`egg_info`_ command for more details. - -(Also, before you release your project, be sure to see the section above on -`Specifying Your Project's Version`_ for more information about how pre- and -post-release tags affect how version numbers are interpreted. This is -important in order to make sure that dependency processing tools will know -which versions of your project are newer than others.) - -Finally, if you are creating builds frequently, and either building them in a -downloadable location or are copying them to a distribution server, you should -probably also check out the `rotate`_ command, which lets you automatically -delete all but the N most-recently-modified distributions matching a glob -pattern. So, you can use a command line like:: - - setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 - -to build an egg whose version info includes "DEV-rNNNN" (where NNNN is the -most recent Subversion revision that affected the source tree), and then -delete any egg files from the distribution directory except for the three -that were built most recently. - -If you have to manage automated builds for multiple packages, each with -different tagging and rotation policies, you may also want to check out the -`alias`_ command, which would let each package define an alias like ``daily`` -that would perform the necessary tag, build, and rotate commands. Then, a -simpler script or cron job could just run ``setup.py daily`` in each project -directory. (And, you could also define sitewide or per-user default versions -of the ``daily`` alias, so that projects that didn't define their own would -use the appropriate defaults.) - - -Generating Source Distributions -------------------------------- - -``setuptools`` enhances the distutils' default algorithm for source file -selection with pluggable endpoints for looking up files to include. If you are -using a revision control system, and your source distributions only need to -include files that you're tracking in revision control, use a corresponding -plugin instead of writing a ``MANIFEST.in`` file. See the section below on -`Adding Support for Revision Control Systems`_ for information on plugins. - -If you need to include automatically generated files, or files that are kept in -an unsupported revision control system, you'll need to create a ``MANIFEST.in`` -file to specify any files that the default file location algorithm doesn't -catch. See the distutils documentation for more information on the format of -the ``MANIFEST.in`` file. -But, be sure to ignore any part of the distutils documentation that deals with -``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you -from these issues and doesn't work the same way in any case. Unlike the -distutils, setuptools regenerates the source distribution manifest file -every time you build a source distribution, and it builds it inside the -project's ``.egg-info`` directory, out of the way of your main project -directory. You therefore need not worry about whether it is up-to-date or not. -Indeed, because setuptools' approach to determining the contents of a source -distribution is so much simpler, its ``sdist`` command omits nearly all of -the options that the distutils' more complex ``sdist`` process requires. For -all practical purposes, you'll probably use only the ``--formats`` option, if -you use any option at all. -Making "Official" (Non-Snapshot) Releases -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you make an official release, creating source or binary distributions, -you will need to override the tag settings from ``setup.cfg``, so that you -don't end up registering versions like ``foobar-0.7a1.dev-r34832``. This is -easy to do if you are developing on the trunk and using tags or branches for -your releases - just make the change to ``setup.cfg`` after branching or -tagging the release, so the trunk will still produce development snapshots. -Alternately, if you are not branching for releases, you can override the -default version options on the command line, using something like:: - setup.py egg_info -Db "" sdist bdist_egg -The first part of this command (``egg_info -Db ""``) will override the -configured tag information, before creating source and binary eggs. Thus, these -commands will use the plain version from your ``setup.py``, without adding the -build designation string. - -Of course, if you will be doing this a lot, you may wish to create a personal -alias for this operation, e.g.:: - - setup.py alias -u release egg_info -Db "" - -You can then use it like this:: - - setup.py release sdist bdist_egg - -Or of course you can create more elaborate aliases that do all of the above. -See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. - - - -Distributing Extensions compiled with Cython --------------------------------------------- - -``setuptools`` will detect at build time whether Cython is installed or not. -If Cython is not found ``setuptools`` will ignore pyx files. - -To ensure Cython is available, include Cython in the build-requires section -of your pyproject.toml:: - - [build-system] - requires=[..., "cython"] - -Built with pip 10 or later, that declaration is sufficient to include Cython -in the build. For broader compatibility, declare the dependency in your -setup-requires of setup.cfg:: - - [options] - setup_requires = - ... - cython - -As long as Cython is present in the build environment, ``setuptools`` includes -transparent support for building Cython extensions, as -long as extensions are defined using ``setuptools.Extension``. - -If you follow these rules, you can safely list ``.pyx`` files as the source -of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` -will use it. - -Of course, for this to work, your source distributions must include the C -code generated by Cython, as well as your original ``.pyx`` files. This means -that you will probably want to include current ``.c`` files in your revision -control system, rebuilding them whenever you check changes in for the ``.pyx`` -source files. This will ensure that people tracking your project in a revision -control system will be able to build it even if they don't have Cython -installed, and that your source releases will be similarly usable with or -without Cython. @@ -1466,247 +392,13 @@ by directives, such as ``attr:`` and others, will be silently ignored. As a consequence, the resulting dictionary will include no such options. --------------------------------- -Extending and Reusing Setuptools --------------------------------- - -Creating ``distutils`` Extensions -================================= - -It can be hard to add new commands or setup arguments to the distutils. But -the ``setuptools`` package makes it a bit easier, by allowing you to distribute -a distutils extension as a separate project, and then have projects that need -the extension just refer to it in their ``setup_requires`` argument. - -With ``setuptools``, your distutils extension projects can hook in new -commands and ``setup()`` arguments just by defining "entry points". These -are mappings from command or argument names to a specification of where to -import a handler from. (See the section on `Dynamic Discovery of Services and -Plugins`_ above for some more background on entry points.) - - -Adding Commands ---------------- - -You can add new ``setup`` commands by defining entry points in the -``distutils.commands`` group. For example, if you wanted to add a ``foo`` -command, you might add something like this to your distutils extension -project's setup script:: - - setup( - # ... - entry_points={ - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - }, - ) - -(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is -a ``setuptools.Command`` subclass.) - -Once a project containing such entry points has been activated on ``sys.path``, -(e.g. by running "install" or "develop" with a site-packages installation -directory) the command(s) will be available to any ``setuptools``-based setup -scripts. It is not necessary to use the ``--command-packages`` option or -to monkeypatch the ``distutils.command`` package to install your commands; -``setuptools`` automatically adds a wrapper to the distutils to search for -entry points in the active distributions on ``sys.path``. In fact, this is -how setuptools' own commands are installed: the setuptools project's setup -script defines entry points for them! - - -Adding ``setup()`` Arguments ----------------------------- - -.. warning:: Adding arguments to setup is discouraged as such arguments - are only supported through imperative execution and not supported through - declarative config. - -Sometimes, your commands may need additional arguments to the ``setup()`` -call. You can enable this by defining entry points in the -``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` -argument called ``bar_baz``, you might add something like this to your -distutils extension project's setup script:: - - setup( - # ... - entry_points={ - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - "distutils.setup_keywords": [ - "bar_baz = mypackage.some_module:validate_bar_baz", - ], - }, - ) - -The idea here is that the entry point defines a function that will be called -to validate the ``setup()`` argument, if it's supplied. The ``Distribution`` -object will have the initial value of the attribute set to ``None``, and the -validation function will only be called if the ``setup()`` call sets it to -a non-None value. Here's an example validation function:: - - def assert_bool(dist, attr, value): - """Verify that value is True, False, 0, or 1""" - if bool(value) != value: - raise DistutilsSetupError( - "%r must be a boolean value (got %r)" % (attr,value) - ) - -Your function should accept three arguments: the ``Distribution`` object, -the attribute name, and the attribute value. It should raise a -``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument -is invalid. Remember, your function will only be called with non-None values, -and the default value of arguments defined this way is always None. So, your -commands should always be prepared for the possibility that the attribute will -be ``None`` when they access it later. - -If more than one active distribution defines an entry point for the same -``setup()`` argument, *all* of them will be called. This allows multiple -distutils extensions to define a common argument, as long as they agree on -what values of that argument are valid. - -Also note that as with commands, it is not necessary to subclass or monkeypatch -the distutils ``Distribution`` class in order to add your arguments; it is -sufficient to define the entry points in your extension, as long as any setup -script using your extension lists your project in its ``setup_requires`` -argument. - - -Customizing Distribution Options --------------------------------- - -Plugins may wish to extend or alter the options on a Distribution object to -suit the purposes of that project. For example, a tool that infers the -``Distribution.version`` from SCM-metadata may need to hook into the -option finalization. To enable this feature, Setuptools offers an entry -point "setuptools.finalize_distribution_options". That entry point must -be a callable taking one argument (the Distribution instance). - -If the callable has an ``.order`` property, that value will be used to -determine the order in which the hook is called. Lower numbers are called -first and the default is zero (0). - -Plugins may read, alter, and set properties on the distribution, but each -plugin is encouraged to load the configuration/settings for their behavior -independently. - - -Adding new EGG-INFO Files -------------------------- - -Some extensible applications or frameworks may want to allow third parties to -develop plugins with application or framework-specific metadata included in -the plugins' EGG-INFO directory, for easy access via the ``pkg_resources`` -metadata API. The easiest way to allow this is to create a distutils extension -to be used from the plugin projects' setup scripts (via ``setup_requires``) -that defines a new setup keyword, and then uses that data to write an EGG-INFO -file when the ``egg_info`` command is run. - -The ``egg_info`` command looks for extension points in an ``egg_info.writers`` -group, and calls them to write the files. Here's a simple example of a -distutils extension defining a setup argument ``foo_bar``, which is a list of -lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any -project that uses the argument:: - - setup( - # ... - entry_points={ - "distutils.setup_keywords": [ - "foo_bar = setuptools.dist:assert_string_list", - ], - "egg_info.writers": [ - "foo_bar.txt = setuptools.command.egg_info:write_arg", - ], - }, - ) - -This simple example makes use of two utility functions defined by setuptools -for its own use: a routine to validate that a setup keyword is a sequence of -strings, and another one that looks up a setup argument and writes it to -a file. Here's what the writer utility looks like:: - - def write_arg(cmd, basename, filename): - argname = os.path.splitext(basename)[0] - value = getattr(cmd.distribution, argname, None) - if value is not None: - value = "\n".join(value) + "\n" - cmd.write_or_delete_file(argname, filename, value) - -As you can see, ``egg_info.writers`` entry points must be a function taking -three arguments: a ``egg_info`` command instance, the basename of the file to -write (e.g. ``foo_bar.txt``), and the actual full filename that should be -written to. - -In general, writer functions should honor the command object's ``dry_run`` -setting when writing files, and use the ``distutils.log`` object to do any -console output. The easiest way to conform to this requirement is to use -the ``cmd`` object's ``write_file()``, ``delete_file()``, and -``write_or_delete_file()`` methods exclusively for your file operations. See -those methods' docstrings for more details. - - -Adding Support for Revision Control Systems -------------------------------------------------- - -If the files you want to include in the source distribution are tracked using -Git, Mercurial or SVN, you can use the following packages to achieve that: - -- Git and Mercurial: `setuptools_scm `_ -- SVN: `setuptools_svn `_ - -If you would like to create a plugin for ``setuptools`` to find files tracked -by another revision control system, you can do so by adding an entry point to -the ``setuptools.file_finders`` group. The entry point should be a function -accepting a single directory name, and should yield all the filenames within -that directory (and any subdirectories thereof) that are under revision -control. - -For example, if you were going to create a plugin for a revision control system -called "foobar", you would write a function something like this: -.. code-block:: python - def find_files_for_foobar(dirname): - # loop to yield paths that start with `dirname` - -And you would register it in a setup script using something like this:: - - entry_points={ - "setuptools.file_finders": [ - "foobar = my_foobar_module:find_files_for_foobar", - ] - } - -Then, anyone who wants to use your plugin can simply install it, and their -local setuptools installation will be able to find the necessary files. - -It is not necessary to distribute source control plugins with projects that -simply use the other source control system, or to specify the plugins in -``setup_requires``. When you create a source distribution with the ``sdist`` -command, setuptools automatically records what files were found in the -``SOURCES.txt`` file. That way, recipients of source distributions don't need -to have revision control at all. However, if someone is working on a package -by checking out with that system, they will need the same plugin(s) that the -original author is using. - -A few important points for writing revision control file finders: - -* Your finder function MUST return relative paths, created by appending to the - passed-in directory name. Absolute paths are NOT allowed, nor are relative - paths that reference a parent directory of the passed-in directory. - -* Your finder function MUST accept an empty string as the directory name, - meaning the current directory. You MUST NOT convert this to a dot; just - yield relative paths. So, yielding a subdirectory named ``some/dir`` under - the current directory should NOT be rendered as ``./some/dir`` or - ``/somewhere/some/dir``, but *always* as simply ``some/dir`` - -* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully - with the absence of needed programs (i.e., ones belonging to the revision - control system itself. It *may*, however, use ``distutils.log.warn()`` to - inform the user of the missing program(s). + + + + + Mailing List and Bug Tracker diff --git a/docs/userguide/functionalities.txt b/docs/userguide/functionalities.txt new file mode 100644 index 0000000000..a310da9713 --- /dev/null +++ b/docs/userguide/functionalities.txt @@ -0,0 +1,1338 @@ +Using ``find_packages()`` +------------------------- + +For simple projects, it's usually easy enough to manually add packages to +the ``packages`` argument of ``setup()``. However, for very large projects +(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the +package list updated. That's what ``setuptools.find_packages()`` is for. + +``find_packages()`` takes a source directory and two lists of package name +patterns to exclude and include. If omitted, the source directory defaults to +the same +directory as the setup script. Some projects use a ``src`` or ``lib`` +directory as the root of their source tree, and those projects would of course +use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And +such projects also need something like ``package_dir={"": "src"}`` in their +``setup()`` arguments, but that's just a normal distutils thing.) + +Anyway, ``find_packages()`` walks the target directory, filtering by inclusion +patterns, and finds Python packages (any directory). Packages are only +recognized if they include an ``__init__.py`` file. Finally, exclusion +patterns are applied to remove matching packages. + +Inclusion and exclusion patterns are package names, optionally including +wildcards. For +example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose +last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", +"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, +but it still won't exclude a top-level ``tests`` package or the children +thereof. In fact, if you really want no ``tests`` packages at all, you'll need +something like this:: + + find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) + +in order to cover all the bases. Really, the exclusion patterns are intended +to cover simpler use cases than this, like excluding a single, specified +package and its subpackages. + +Regardless of the parameters, the ``find_packages()`` +function returns a list of package names suitable for use as the ``packages`` +argument to ``setup()``, and so is usually the easiest way to set that +argument in your setup script. Especially since it frees you from having to +remember to modify your setup script whenever your project grows additional +top-level packages or subpackages. + +``find_namespace_packages()`` +----------------------------- +In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant +of ``find_packages``, which has the same function signature as +``find_packages``, but works with `PEP 420`_ compliant implicit namespace +packages. Here is a minimal setup script using ``find_namespace_packages``:: + + from setuptools import setup, find_namespace_packages + setup( + name="HelloWorld", + version="0.1", + packages=find_namespace_packages(), + ) + + +Keep in mind that according to PEP 420, you may have to either re-organize your +codebase a bit or define a few exclusions, as the definition of an implicit +namespace package is quite lenient, so for a project organized like so:: + + + ├── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + ├── setup.py + └── tests + └── test_mod1.py + +A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a +top-level package called ``tests``! One way to avoid this problem is to use the +``include`` keyword to whitelist the packages to include, like so:: + + from setuptools import setup, find_namespace_packages + + setup( + name="namespace.mypackage", + version="0.1", + packages=find_namespace_packages(include=["namespace.*"]) + ) + +Another option is to use the "src" layout, where all package code is placed in +the ``src`` directory, like so:: + + + ├── setup.py + ├── src + │   └── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + └── tests + └── test_mod1.py + +With this layout, the package directory is specified as ``src``, as such:: + + setup(name="namespace.mypackage", + version="0.1", + package_dir={"": "src"}, + packages=find_namespace_packages(where="src")) + +.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ + +Automatic Script Creation +========================= + +Packaging and installing scripts can be a bit awkward with the distutils. For +one thing, there's no easy way to have a script's filename match local +conventions on both Windows and POSIX platforms. For another, you often have +to create a separate file just for the "main" script, when your actual "main" +is a function in a module somewhere. And even in Python 2.4, using the ``-m`` +option only works for actual ``.py`` files that aren't installed in a package. + +``setuptools`` fixes all of these problems by automatically generating scripts +for you with the correct extension, and on Windows it will even create an +``.exe`` file so that users don't have to change their ``PATHEXT`` settings. +The way to use this feature is to define "entry points" in your setup script +that indicate what function the generated script should import and run. For +example, to create two console scripts called ``foo`` and ``bar``, and a GUI +script called ``baz``, you might do something like this:: + + setup( + # other arguments here... + entry_points={ + "console_scripts": [ + "foo = my_package.some_module:main_func", + "bar = other_module:some_func", + ], + "gui_scripts": [ + "baz = my_package_gui:start_func", + ] + } + ) + +When this project is installed on non-Windows platforms (using "setup.py +install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, +and ``baz`` scripts will be installed that import ``main_func`` and +``some_func`` from the specified modules. The functions you specify are +called with no arguments, and their return value is passed to +``sys.exit()``, so you can return an errorlevel or message to print to +stderr. + +On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are +created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The +``.exe`` wrappers find and execute the right version of Python to run the +``.py`` or ``.pyw`` file. + +You may define as many "console script" and "gui script" entry points as you +like, and each one can optionally specify "extras" that it depends on, that +will be added to ``sys.path`` when the script is run. For more information on +"extras", see the section below on `Declaring Extras`_. For more information +on "entry points" in general, see the section below on `Dynamic Discovery of +Services and Plugins`_. + +"Eggsecutable" Scripts +---------------------- + +.. deprecated:: 45.3.0 + +Occasionally, there are situations where it's desirable to make an ``.egg`` +file directly executable. You can do this by including an entry point such +as the following:: + + setup( + # other arguments here... + entry_points={ + "setuptools.installation": [ + "eggsecutable = my_package.some_module:main_func", + ] + } + ) + +Any eggs built from the above setup script will include a short executable +prelude that imports and calls ``main_func()`` from ``my_package.some_module``. +The prelude can be run on Unix-like platforms (including Mac and Linux) by +invoking the egg with ``/bin/sh``, or by enabling execute permissions on the +``.egg`` file. For the executable prelude to run, the appropriate version of +Python must be available via the ``PATH`` environment variable, under its +"long" name. That is, if the egg is built for Python 2.3, there must be a +``python2.3`` executable present in a directory on ``PATH``. + +IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or +invoked via symlinks. They *must* be invoked using their original filename, in +order to ensure that, once running, ``pkg_resources`` will know what project +and version is in use. The header script will check this and exit with an +error if the ``.egg`` file has been renamed or is invoked via a symlink that +changes its base name. + +Declaring Dependencies +====================== + +``setuptools`` supports automatically installing dependencies when a package is +installed, and including information about dependencies in Python Eggs (so that +package management tools like pip can use the information). + +``setuptools`` and ``pkg_resources`` use a common syntax for specifying a +project's required dependencies. This syntax consists of a project's PyPI +name, optionally followed by a comma-separated list of "extras" in square +brackets, optionally followed by a comma-separated list of version +specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, +``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be +separated by whitespace, but any whitespace or nonstandard characters within a +project name or version identifier must be replaced with ``-``. + +Version specifiers for a given project are internally sorted into ascending +version order, and used to establish what ranges of versions are acceptable. +Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes +``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from +the ranges they fall within. A project's version is then checked for +membership in the resulting ranges. (Note that providing conflicting conditions +for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may +therefore produce bizarre results.) + +Here are some example requirement specifiers:: + + docutils >= 0.3 + + # comment lines and \ continuations are allowed in requirement strings + BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ + ==1.6, ==1.7 # and so are line-end comments + + PEAK[FastCGI, reST]>=0.5a4 + + setuptools==0.5a7 + +The simplest way to include requirement specifiers is to use the +``install_requires`` argument to ``setup()``. It takes a string or list of +strings containing requirement specifiers. If you include more than one +requirement in a string, each requirement must begin on a new line. + +This has three effects: + +1. When your project is installed, either by using pip, ``setup.py install``, + or ``setup.py develop``, all of the dependencies not already installed will + be located (via PyPI), downloaded, built (if necessary), and installed. + +2. Any scripts in your project will be installed with wrappers that verify + the availability of the specified dependencies at runtime, and ensure that + the correct versions are added to ``sys.path`` (e.g. if multiple versions + have been installed). + +3. Python Egg distributions will include a metadata file listing the + dependencies. + +Note, by the way, that if you declare your dependencies in ``setup.py``, you do +*not* need to use the ``require()`` function in your scripts or modules, as +long as you either install the project or use ``setup.py develop`` to do +development work on it. (See `"Development Mode"`_ below for more details on +using ``setup.py develop``.) + +Dependencies that aren't in PyPI +-------------------------------- + +.. warning:: + Dependency links support has been dropped by pip starting with version + 19.0 (released 2019-01-22). + +If your project depends on packages that don't exist on PyPI, you may still be +able to depend on them, as long as they are available for download as: + +- an egg, in the standard distutils ``sdist`` format, +- a single ``.py`` file, or +- a VCS repository (Subversion, Mercurial, or Git). + +You just need to add some URLs to the ``dependency_links`` argument to +``setup()``. + +The URLs must be either: + +1. direct download URLs, +2. the URLs of web pages that contain direct download links, or +3. the repository's URL + +In general, it's better to link to web pages, because it is usually less +complex to update a web page than to release a new version of your project. +You can also use a SourceForge ``showfiles.php`` link in the case where a +package you depend on is distributed via SourceForge. + +If you depend on a package that's distributed as a single ``.py`` file, you +must include an ``"#egg=project-version"`` suffix to the URL, to give a project +name and version number. (Be sure to escape any dashes in the name or version +by replacing them with underscores.) EasyInstall will recognize this suffix +and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file +as an egg. + +In the case of a VCS checkout, you should also append ``#egg=project-version`` +in order to identify for what package that checkout should be used. You can +append ``@REV`` to the URL's path (before the fragment) to specify a revision. +Additionally, you can also force the VCS being used by prepending the URL with +a certain prefix. Currently available are: + +- ``svn+URL`` for Subversion, +- ``git+URL`` for Git, and +- ``hg+URL`` for Mercurial + +A more complete example would be: + + ``vcs+proto://host/path@revision#egg=project-version`` + +Be careful with the version. It should match the one inside the project files. +If you want to disregard the version, you have to omit it both in the +``requires`` and in the URL's fragment. + +This will do a checkout (or a clone, in Git and Mercurial parlance) to a +temporary folder and run ``setup.py bdist_egg``. + +The ``dependency_links`` option takes the form of a list of URL strings. For +example, this will cause a search of the specified page for eggs or source +distributions, if the package's dependencies aren't already installed:: + + setup( + ... + dependency_links=[ + "http://peak.telecommunity.com/snapshots/" + ], + ) + + +.. _Declaring Extras: + + +Declaring "Extras" (optional features with their own dependencies) +------------------------------------------------------------------ + +Sometimes a project has "recommended" dependencies, that are not required for +all uses of the project. For example, a project might offer optional PDF +output if ReportLab is installed, and reStructuredText support if docutils is +installed. These optional features are called "extras", and setuptools allows +you to define their requirements as well. In this way, other projects that +require these optional features can force the additional requirements to be +installed, by naming the desired extras in their ``install_requires``. + +For example, let's say that Project A offers optional PDF and reST support:: + + setup( + name="Project-A", + ... + extras_require={ + "PDF": ["ReportLab>=1.2", "RXP"], + "reST": ["docutils>=0.3"], + } + ) + +As you can see, the ``extras_require`` argument takes a dictionary mapping +names of "extra" features, to strings or lists of strings describing those +features' requirements. These requirements will *not* be automatically +installed unless another package depends on them (directly or indirectly) by +including the desired "extras" in square brackets after the associated project +name. (Or if the extras were listed in a requirement spec on the "pip install" +command line.) + +Extras can be used by a project's `entry points`_ to specify dynamic +dependencies. For example, if Project A includes a "rst2pdf" script, it might +declare it like this, so that the "PDF" requirements are only resolved if the +"rst2pdf" script is run:: + + setup( + name="Project-A", + ... + entry_points={ + "console_scripts": [ + "rst2pdf = project_a.tools.pdfgen [PDF]", + "rst2html = project_a.tools.htmlgen", + # more script entry points ... + ], + } + ) + +Projects can also use another project's extras when specifying dependencies. +For example, if project B needs "project A" with PDF support installed, it +might declare the dependency like this:: + + setup( + name="Project-B", + install_requires=["Project-A[PDF]"], + ... + ) + +This will cause ReportLab to be installed along with project A, if project B is +installed -- even if project A was already installed. In this way, a project +can encapsulate groups of optional "downstream dependencies" under a feature +name, so that packages that depend on it don't have to know what the downstream +dependencies are. If a later version of Project A builds in PDF support and +no longer needs ReportLab, or if it ends up needing other dependencies besides +ReportLab in order to provide PDF support, Project B's setup information does +not need to change, but the right packages will still be installed if needed. + +Note, by the way, that if a project ends up not needing any other packages to +support a feature, it should keep an empty requirements list for that feature +in its ``extras_require`` argument, so that packages depending on that feature +don't break (due to an invalid feature name). For example, if Project A above +builds in PDF support and no longer needs ReportLab, it could change its +setup to this:: + + setup( + name="Project-A", + ... + extras_require={ + "PDF": [], + "reST": ["docutils>=0.3"], + } + ) + +so that Package B doesn't have to remove the ``[PDF]`` from its requirement +specifier. + +.. _Platform Specific Dependencies: + + +Declaring platform specific dependencies +---------------------------------------- + +Sometimes a project might require a dependency to run on a specific platform. +This could to a package that back ports a module so that it can be used in +older python versions. Or it could be a package that is required to run on a +specific operating system. This will allow a project to work on multiple +different platforms without installing dependencies that are not required for +a platform that is installing the project. + +For example, here is a project that uses the ``enum`` module and ``pywin32``:: + + setup( + name="Project", + ... + install_requires=[ + "enum34;python_version<'3.4'", + "pywin32 >= 1.0;platform_system=='Windows'" + ] + ) + +Since the ``enum`` module was added in Python 3.4, it should only be installed +if the python version is earlier. Since ``pywin32`` will only be used on +windows, it should only be installed when the operating system is Windows. +Specifying version requirements for the dependencies is supported as normal. + +The environmental markers that may be used for testing platform types are +detailed in `PEP 508`_. + +.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ + +Including Data Files +==================== + +The distutils have traditionally allowed installation of "data files", which +are placed in a platform-specific location. However, the most common use case +for data files distributed with a package is for use *by* the package, usually +by including the data files in the package directory. + +Setuptools offers three ways to specify data files to be included in your +packages. First, you can simply use the ``include_package_data`` keyword, +e.g.:: + + from setuptools import setup, find_packages + setup( + ... + include_package_data=True + ) + +This tells setuptools to install any data files it finds in your packages. +The data files must be specified via the distutils' ``MANIFEST.in`` file. +(They can also be tracked by a revision control system, using an appropriate +plugin. See the section below on `Adding Support for Revision Control +Systems`_ for information on how to write such plugins.) + +If you want finer-grained control over what files are included (for example, +if you have documentation files in your package directories and want to exclude +them from installation), then you can also use the ``package_data`` keyword, +e.g.:: + + from setuptools import setup, find_packages + setup( + ... + package_data={ + # If any package contains *.txt or *.rst files, include them: + "": ["*.txt", "*.rst"], + # And include any *.msg files found in the "hello" package, too: + "hello": ["*.msg"], + } + ) + +The ``package_data`` argument is a dictionary that maps from package names to +lists of glob patterns. The globs may include subdirectory names, if the data +files are contained in a subdirectory of the package. For example, if the +package tree looks like this:: + + setup.py + src/ + mypkg/ + __init__.py + mypkg.txt + data/ + somefile.dat + otherdata.dat + +The setuptools setup file might look like this:: + + from setuptools import setup, find_packages + setup( + ... + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src + + package_data={ + # If any package contains *.txt files, include them: + "": ["*.txt"], + # And include any *.dat files found in the "data" subdirectory + # of the "mypkg" package, also: + "mypkg": ["data/*.dat"], + } + ) + +Notice that if you list patterns in ``package_data`` under the empty string, +these patterns are used to find files in every package, even ones that also +have their own patterns listed. Thus, in the above example, the ``mypkg.txt`` +file gets included even though it's not listed in the patterns for ``mypkg``. + +Also notice that if you use paths, you *must* use a forward slash (``/``) as +the path separator, even if you are on Windows. Setuptools automatically +converts slashes to appropriate platform-specific separators at build time. + +If datafiles are contained in a subdirectory of a package that isn't a package +itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required +in the ``package_data`` argument (as shown above with ``"data/*.dat"``). + +When building an ``sdist``, the datafiles are also drawn from the +``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if +the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. + +(Note: although the ``package_data`` argument was previously only available in +``setuptools``, it was also added to the Python ``distutils`` package as of +Python 2.4; there is `some documentation for the feature`__ available on the +python.org website. If using the setuptools-specific ``include_package_data`` +argument, files specified by ``package_data`` will *not* be automatically +added to the manifest unless they are listed in the MANIFEST.in file.) + +__ https://docs.python.org/3/distutils/setupscript.html#installing-package-data + +Sometimes, the ``include_package_data`` or ``package_data`` options alone +aren't sufficient to precisely define what files you want included. For +example, you may want to include package README files in your revision control +system and source distributions, but exclude them from being installed. So, +setuptools offers an ``exclude_package_data`` option as well, that allows you +to do things like this:: + + from setuptools import setup, find_packages + setup( + ... + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src + + include_package_data=True, # include everything in source control + + # ...but exclude README.txt from all packages + exclude_package_data={"": ["README.txt"]}, + ) + +The ``exclude_package_data`` option is a dictionary mapping package names to +lists of wildcard patterns, just like the ``package_data`` option. And, just +as with that option, a key of ``""`` will apply the given pattern(s) to all +packages. However, any files that match these patterns will be *excluded* +from installation, even if they were listed in ``package_data`` or were +included as a result of using ``include_package_data``. + +In summary, the three options allow you to: + +``include_package_data`` + Accept all data files and directories matched by ``MANIFEST.in``. + +``package_data`` + Specify additional patterns to match files that may or may + not be matched by ``MANIFEST.in`` or found in source control. + +``exclude_package_data`` + Specify patterns for data files and directories that should *not* be + included when a package is installed, even if they would otherwise have + been included due to the use of the preceding options. + +NOTE: Due to the way the distutils build process works, a data file that you +include in your project and then stop including may be "orphaned" in your +project's build directories, requiring you to run ``setup.py clean --all`` to +fully remove them. This may also be important for your users and contributors +if they track intermediate revisions of your project using Subversion; be sure +to let them know when you make changes that remove files from inclusion so they +can run ``setup.py clean --all``. + +Accessing Data Files at Runtime +------------------------------- + +Typically, existing programs manipulate a package's ``__file__`` attribute in +order to find the location of data files. However, this manipulation isn't +compatible with PEP 302-based import hooks, including importing from zip files +and Python Eggs. It is strongly recommended that, if you are using data files, +you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access +them. The ``pkg_resources`` module is distributed as part of setuptools, so if +you're using setuptools to distribute your package, there is no reason not to +use its resource management API. See also `Importlib Resources`_ for +a quick example of converting code that uses ``__file__`` to use +``pkg_resources`` instead. + +.. _Importlib Resources: https://docs.python.org/3/library/importlib.html#module-importlib.resources + + +Non-Package Data Files +---------------------- + +Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data +files from the distribution into the egg (see `the old docs +`_). As eggs are deprecated and pip-based installs +fall back to the platform-specific location for installing data files, there is +no supported facility to reliably retrieve these resources. + +Instead, the PyPA recommends that any data files you wish to be accessible at +run time be included in the package. + + +Automatic Resource Extraction +----------------------------- + +If you are using tools that expect your resources to be "real" files, or your +project includes non-extension native libraries or other files that your C +extensions expect to be able to access, you may need to list those files in +the ``eager_resources`` argument to ``setup()``, so that the files will be +extracted together, whenever a C extension in the project is imported. + +This is especially important if your project includes shared libraries *other* +than distutils-built C extensions, and those shared libraries use file +extensions other than ``.dll``, ``.so``, or ``.dylib``, which are the +extensions that setuptools 0.6a8 and higher automatically detects as shared +libraries and adds to the ``native_libs.txt`` file for you. Any shared +libraries whose names do not end with one of those extensions should be listed +as ``eager_resources``, because they need to be present in the filesystem when +he C extensions that link to them are used. + +The ``pkg_resources`` runtime for compressed packages will automatically +extract *all* C extensions and ``eager_resources`` at the same time, whenever +*any* C extension or eager resource is requested via the ``resource_filename()`` +API. (C extensions are imported using ``resource_filename()`` internally.) +This ensures that C extensions will see all of the "real" files that they +expect to see. + +Note also that you can list directory resource names in ``eager_resources`` as +well, in which case the directory's contents (including subdirectories) will be +extracted whenever any C extension or eager resource is requested. + +Please note that if you're not sure whether you need to use this argument, you +don't! It's really intended to support projects with lots of non-Python +dependencies and as a last resort for crufty projects that can't otherwise +handle being compressed. If your package is pure Python, Python plus data +files, or Python plus C, you really don't need this. You've got to be using +either C or an external program that needs "real" files in your project before +there's any possibility of ``eager_resources`` being relevant to your project. + + +Extensible Applications and Frameworks +====================================== + + +.. _Entry Points: + +Dynamic Discovery of Services and Plugins +----------------------------------------- + +``setuptools`` supports creating libraries that "plug in" to extensible +applications and frameworks, by letting you register "entry points" in your +project that can be imported by the application or framework. + +For example, suppose that a blogging tool wants to support plugins +that provide translation for various file types to the blog's output format. +The framework might define an "entry point group" called ``blogtool.parsers``, +and then allow plugins to register entry points for the file extensions they +support. + +This would allow people to create distributions that contain one or more +parsers for different file types, and then the blogging tool would be able to +find the parsers at runtime by looking up an entry point for the file +extension (or mime type, or however it wants to). + +Note that if the blogging tool includes parsers for certain file formats, it +can register these as entry points in its own setup script, which means it +doesn't have to special-case its built-in formats. They can just be treated +the same as any other plugin's entry points would be. + +If you're creating a project that plugs in to an existing application or +framework, you'll need to know what entry points or entry point groups are +defined by that application or framework. Then, you can register entry points +in your setup script. Here are a few examples of ways you might register an +``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, +for our hypothetical blogging tool:: + + setup( + # ... + entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} + ) + + setup( + # ... + entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} + ) + + setup( + # ... + entry_points=""" + [blogtool.parsers] + .rst = some.nested.module:SomeClass.some_classmethod [reST] + """, + extras_require=dict(reST="Docutils>=0.3.5") + ) + +The ``entry_points`` argument to ``setup()`` accepts either a string with +``.ini``-style sections, or a dictionary mapping entry point group names to +either strings or lists of strings containing entry point specifiers. An +entry point specifier consists of a name and value, separated by an ``=`` +sign. The value consists of a dotted module name, optionally followed by a +``:`` and a dotted identifier naming an object within the module. It can +also include a bracketed list of "extras" that are required for the entry +point to be used. When the invoking application or framework requests loading +of an entry point, any requirements implied by the associated extras will be +passed to ``pkg_resources.require()``, so that an appropriate error message +can be displayed if the needed package(s) are missing. (Of course, the +invoking app or framework can ignore such errors if it wants to make an entry +point optional if a requirement isn't installed.) + +Defining Additional Metadata +---------------------------- + +Some extensible applications and frameworks may need to define their own kinds +of metadata to include in eggs, which they can then access using the +``pkg_resources`` metadata APIs. Ordinarily, this is done by having plugin +developers include additional files in their ``ProjectName.egg-info`` +directory. However, since it can be tedious to create such files by hand, you +may want to create a distutils extension that will create the necessary files +from arguments to ``setup()``, in much the same way that ``setuptools`` does +for many of the ``setup()`` arguments it adds. See the section below on +`Creating distutils Extensions`_ for more details, especially the subsection on +`Adding new EGG-INFO Files`_. + + +"Development Mode" +================== + +Under normal circumstances, the ``distutils`` assume that you are going to +build a distribution of your project, not use it in its "raw" or "unbuilt" +form. If you were to use the ``distutils`` that way, you would have to rebuild +and reinstall your project every time you made a change to it during +development. + +Another problem that sometimes comes up with the ``distutils`` is that you may +need to do development on two related projects at the same time. You may need +to put both projects' packages in the same directory to run them, but need to +keep them separate for revision control purposes. How can you do this? + +Setuptools allows you to deploy your projects for use in a common directory or +staging area, but without copying any files. Thus, you can edit each project's +code in its checkout directory, and only need to run build commands when you +change a project's C extensions or similarly compiled files. You can even +deploy a project into another project's checkout directory, if that's your +preferred way of working (as opposed to using a common independent staging area +or the site-packages directory). + +To do this, use the ``setup.py develop`` command. It works very similarly to +``setup.py install``, except that it doesn't actually install anything. +Instead, it creates a special ``.egg-link`` file in the deployment directory, +that links to your project's source code. And, if your deployment directory is +Python's ``site-packages`` directory, it will also update the +``easy-install.pth`` file to include your project's source code, thereby making +it available on ``sys.path`` for all programs using that Python installation. + +If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` +will not link directly to your source code when run under Python 3, since +that source code would be made for Python 2 and not work under Python 3. +Instead the ``setup.py develop`` will build Python 3 code under the ``build`` +directory, and link there. This means that after doing code changes you will +have to run ``setup.py build`` before these changes are picked up by your +Python 3 installation. + +In addition, the ``develop`` command creates wrapper scripts in the target +script directory that will run your in-development scripts after ensuring that +all your ``install_requires`` packages are available on ``sys.path``. + +You can deploy the same project to multiple staging areas, e.g. if you have +multiple projects on the same machine that are sharing the same project you're +doing development work. + +When you're done with a given development task, you can remove the project +source from a staging area using ``setup.py develop --uninstall``, specifying +the desired staging area if it's not the default. + +There are several options to control the precise behavior of the ``develop`` +command; see the section on the `develop`_ command below for more details. + +Note that you can also apply setuptools commands to non-setuptools projects, +using commands like this:: + + python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop + +That is, you can simply list the normal setup commands and options following +the quoted part. + + +Distributing a ``setuptools``-based project +=========================================== + +Detailed instructions to distribute a setuptools project can be found at +`Packaging project tutorials`_. + +.. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives + +Before you begin, make sure you have the latest versions of setuptools and wheel:: + + pip install --upgrade setuptools wheel + +To build a setuptools project, run this command from the same directory where +setup.py is located:: + + setup.py sdist bdist_wheel + +This will generate distribution archives in the `dist` directory. + +Before you upload the generated archives make sure you're registered on +https://test.pypi.org/account/register/. You will also need to verify your email +to be able to upload any packages. +You should install twine to be able to upload packages:: + + pip install --upgrade twine + +Now, to upload these archives, run:: + + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +To install your newly uploaded package ``example_pkg``, you can use pip:: + + pip install --index-url https://test.pypi.org/simple/ example_pkg + +If you have issues at any point, please refer to `Packaging project tutorials`_ +for clarification. + + +Setting the ``zip_safe`` flag +----------------------------- + +For some use cases (such as bundling as part of a larger application), Python +packages may be run directly from a zip file. +Not all packages, however, are capable of running in compressed form, because +they may expect to be able to access either source code or data files as +normal operating system files. So, ``setuptools`` can install your project +as a zipfile or a directory, and its default choice is determined by the +project's ``zip_safe`` flag. + +You can pass a True or False value for the ``zip_safe`` argument to the +``setup()`` function, or you can omit it. If you omit it, the ``bdist_egg`` +command will analyze your project's contents to see if it can detect any +conditions that would prevent it from working in a zipfile. It will output +notices to the console about any such conditions that it finds. + +Currently, this analysis is extremely conservative: it will consider the +project unsafe if it contains any C extensions or datafiles whatsoever. This +does *not* mean that the project can't or won't work as a zipfile! It just +means that the ``bdist_egg`` authors aren't yet comfortable asserting that +the project *will* work. If the project contains no C or data files, and does +no ``__file__`` or ``__path__`` introspection or source code manipulation, then +there is an extremely solid chance the project will work when installed as a +zipfile. (And if the project uses ``pkg_resources`` for all its data file +access, then C extensions and other data files shouldn't be a problem at all. +See the `Accessing Data Files at Runtime`_ section above for more information.) + +However, if ``bdist_egg`` can't be *sure* that your package will work, but +you've checked over all the warnings it issued, and you are either satisfied it +*will* work (or if you want to try it for yourself), then you should set +``zip_safe`` to ``True`` in your ``setup()`` call. If it turns out that it +doesn't work, you can always change it to ``False``, which will force +``setuptools`` to install your project as a directory rather than as a zipfile. + +In the future, as we gain more experience with different packages and become +more satisfied with the robustness of the ``pkg_resources`` runtime, the +"zip safety" analysis may become less conservative. However, we strongly +recommend that you determine for yourself whether your project functions +correctly when installed as a zipfile, correct any problems if you can, and +then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` +flag, so that it will not be necessary for ``bdist_egg`` to try to guess +whether your project can work as a zipfile. + +.. _Namespace Packages: + +Namespace Packages +------------------ + +Sometimes, a large package is more useful if distributed as a collection of +smaller eggs. However, Python does not normally allow the contents of a +package to be retrieved from more than one location. "Namespace packages" +are a solution for this problem. When you declare a package to be a namespace +package, it means that the package has no meaningful contents in its +``__init__.py``, and that it is merely a container for modules and subpackages. + +The ``pkg_resources`` runtime will then automatically ensure that the contents +of namespace packages that are spread over multiple eggs or directories are +combined into a single "virtual" package. + +The ``namespace_packages`` argument to ``setup()`` lets you declare your +project's namespace packages, so that they will be included in your project's +metadata. The argument should list the namespace packages that the egg +participates in. For example, the ZopeInterface project might do this:: + + setup( + # ... + namespace_packages=["zope"] + ) + +because it contains a ``zope.interface`` package that lives in the ``zope`` +namespace package. Similarly, a project for a standalone ``zope.publisher`` +would also declare the ``zope`` namespace package. When these projects are +installed and used, Python will see them both as part of a "virtual" ``zope`` +package, even though they will be installed in different locations. + +Namespace packages don't have to be top-level packages. For example, Zope 3's +``zope.app`` package is a namespace package, and in the future PEAK's +``peak.util`` package will be too. + +Note, by the way, that your project's source tree must include the namespace +packages' ``__init__.py`` files (and the ``__init__.py`` of any parent +packages), in a normal Python package layout. These ``__init__.py`` files +*must* contain the line:: + + __import__("pkg_resources").declare_namespace(__name__) + +This code ensures that the namespace package machinery is operating and that +the current package is registered as a namespace package. + +You must NOT include any other code and data in a namespace package's +``__init__.py``. Even though it may appear to work during development, or when +projects are installed as ``.egg`` files, it will not work when the projects +are installed using "system" packaging tools -- in such cases the +``__init__.py`` files will not be installed, let alone executed. + +You must include the ``declare_namespace()`` line in the ``__init__.py`` of +*every* project that has contents for the namespace package in question, in +order to ensure that the namespace will be declared regardless of which +project's copy of ``__init__.py`` is loaded first. If the first loaded +``__init__.py`` doesn't declare it, it will never *be* declared, because no +other copies will ever be loaded! + +Tagging and "Daily Build" or "Snapshot" Releases +------------------------------------------------ + +When a set of related projects are under development, it may be important to +track finer-grained version increments than you would normally use for e.g. +"stable" releases. While stable releases might be measured in dotted numbers +with alpha/beta/etc. status codes, development versions of a project often +need to be tracked by revision or build number or even build date. This is +especially true when projects in development need to refer to one another, and +therefore may literally need an up-to-the-minute version of something! + +To support these scenarios, ``setuptools`` allows you to "tag" your source and +egg distributions by adding one or more of the following to the project's +"official" version identifier: + +* A manually-specified pre-release tag, such as "build" or "dev", or a + manually-specified post-release tag, such as a build or revision number + (``--tag-build=STRING, -bSTRING``) + +* An 8-character representation of the build date (``--tag-date, -d``), as + a postrelease tag + +You can add these tags by adding ``egg_info`` and the desired options to +the command line ahead of the ``sdist`` or ``bdist`` commands that you want +to generate a daily build or snapshot for. See the section below on the +`egg_info`_ command for more details. + +(Also, before you release your project, be sure to see the section above on +`Specifying Your Project's Version`_ for more information about how pre- and +post-release tags affect how version numbers are interpreted. This is +important in order to make sure that dependency processing tools will know +which versions of your project are newer than others.) + +Finally, if you are creating builds frequently, and either building them in a +downloadable location or are copying them to a distribution server, you should +probably also check out the `rotate`_ command, which lets you automatically +delete all but the N most-recently-modified distributions matching a glob +pattern. So, you can use a command line like:: + + setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 + +to build an egg whose version info includes "DEV-rNNNN" (where NNNN is the +most recent Subversion revision that affected the source tree), and then +delete any egg files from the distribution directory except for the three +that were built most recently. + +If you have to manage automated builds for multiple packages, each with +different tagging and rotation policies, you may also want to check out the +`alias`_ command, which would let each package define an alias like ``daily`` +that would perform the necessary tag, build, and rotate commands. Then, a +simpler script or cron job could just run ``setup.py daily`` in each project +directory. (And, you could also define sitewide or per-user default versions +of the ``daily`` alias, so that projects that didn't define their own would +use the appropriate defaults.) + +Generating Source Distributions +------------------------------- + +``setuptools`` enhances the distutils' default algorithm for source file +selection with pluggable endpoints for looking up files to include. If you are +using a revision control system, and your source distributions only need to +include files that you're tracking in revision control, use a corresponding +plugin instead of writing a ``MANIFEST.in`` file. See the section below on +`Adding Support for Revision Control Systems`_ for information on plugins. + +If you need to include automatically generated files, or files that are kept in +an unsupported revision control system, you'll need to create a ``MANIFEST.in`` +file to specify any files that the default file location algorithm doesn't +catch. See the distutils documentation for more information on the format of +the ``MANIFEST.in`` file. + +But, be sure to ignore any part of the distutils documentation that deals with +``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you +from these issues and doesn't work the same way in any case. Unlike the +distutils, setuptools regenerates the source distribution manifest file +every time you build a source distribution, and it builds it inside the +project's ``.egg-info`` directory, out of the way of your main project +directory. You therefore need not worry about whether it is up-to-date or not. + +Indeed, because setuptools' approach to determining the contents of a source +distribution is so much simpler, its ``sdist`` command omits nearly all of +the options that the distutils' more complex ``sdist`` process requires. For +all practical purposes, you'll probably use only the ``--formats`` option, if +you use any option at all. + + +Making "Official" (Non-Snapshot) Releases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you make an official release, creating source or binary distributions, +you will need to override the tag settings from ``setup.cfg``, so that you +don't end up registering versions like ``foobar-0.7a1.dev-r34832``. This is +easy to do if you are developing on the trunk and using tags or branches for +your releases - just make the change to ``setup.cfg`` after branching or +tagging the release, so the trunk will still produce development snapshots. + +Alternately, if you are not branching for releases, you can override the +default version options on the command line, using something like:: + + setup.py egg_info -Db "" sdist bdist_egg + +The first part of this command (``egg_info -Db ""``) will override the +configured tag information, before creating source and binary eggs. Thus, these +commands will use the plain version from your ``setup.py``, without adding the +build designation string. + +Of course, if you will be doing this a lot, you may wish to create a personal +alias for this operation, e.g.:: + + setup.py alias -u release egg_info -Db "" + +You can then use it like this:: + + setup.py release sdist bdist_egg + +Or of course you can create more elaborate aliases that do all of the above. +See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. + +Distributing Extensions compiled with Cython +-------------------------------------------- + +``setuptools`` will detect at build time whether Cython is installed or not. +If Cython is not found ``setuptools`` will ignore pyx files. + +To ensure Cython is available, include Cython in the build-requires section +of your pyproject.toml:: + + [build-system] + requires=[..., "cython"] + +Built with pip 10 or later, that declaration is sufficient to include Cython +in the build. For broader compatibility, declare the dependency in your +setup-requires of setup.cfg:: + + [options] + setup_requires = + ... + cython + +As long as Cython is present in the build environment, ``setuptools`` includes +transparent support for building Cython extensions, as +long as extensions are defined using ``setuptools.Extension``. + +If you follow these rules, you can safely list ``.pyx`` files as the source +of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` +will use it. + +Of course, for this to work, your source distributions must include the C +code generated by Cython, as well as your original ``.pyx`` files. This means +that you will probably want to include current ``.c`` files in your revision +control system, rebuilding them whenever you check changes in for the ``.pyx`` +source files. This will ensure that people tracking your project in a revision +control system will be able to build it even if they don't have Cython +installed, and that your source releases will be similarly usable with or +without Cython. + +-------------------------------- +Extending and Reusing Setuptools +-------------------------------- + +Creating ``distutils`` Extensions +================================= + +It can be hard to add new commands or setup arguments to the distutils. But +the ``setuptools`` package makes it a bit easier, by allowing you to distribute +a distutils extension as a separate project, and then have projects that need +the extension just refer to it in their ``setup_requires`` argument. + +With ``setuptools``, your distutils extension projects can hook in new +commands and ``setup()`` arguments just by defining "entry points". These +are mappings from command or argument names to a specification of where to +import a handler from. (See the section on `Dynamic Discovery of Services and +Plugins`_ above for some more background on entry points.) + + +Adding Commands +--------------- + +You can add new ``setup`` commands by defining entry points in the +``distutils.commands`` group. For example, if you wanted to add a ``foo`` +command, you might add something like this to your distutils extension +project's setup script:: + + setup( + # ... + entry_points={ + "distutils.commands": [ + "foo = mypackage.some_module:foo", + ], + }, + ) + +(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is +a ``setuptools.Command`` subclass.) + +Once a project containing such entry points has been activated on ``sys.path``, +(e.g. by running "install" or "develop" with a site-packages installation +directory) the command(s) will be available to any ``setuptools``-based setup +scripts. It is not necessary to use the ``--command-packages`` option or +to monkeypatch the ``distutils.command`` package to install your commands; +``setuptools`` automatically adds a wrapper to the distutils to search for +entry points in the active distributions on ``sys.path``. In fact, this is +how setuptools' own commands are installed: the setuptools project's setup +script defines entry points for them! + +Adding ``setup()`` Arguments +---------------------------- + +.. warning:: Adding arguments to setup is discouraged as such arguments + are only supported through imperative execution and not supported through + declarative config. + +Sometimes, your commands may need additional arguments to the ``setup()`` +call. You can enable this by defining entry points in the +``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` +argument called ``bar_baz``, you might add something like this to your +distutils extension project's setup script:: + + setup( + # ... + entry_points={ + "distutils.commands": [ + "foo = mypackage.some_module:foo", + ], + "distutils.setup_keywords": [ + "bar_baz = mypackage.some_module:validate_bar_baz", + ], + }, + ) + +The idea here is that the entry point defines a function that will be called +to validate the ``setup()`` argument, if it's supplied. The ``Distribution`` +object will have the initial value of the attribute set to ``None``, and the +validation function will only be called if the ``setup()`` call sets it to +a non-None value. Here's an example validation function:: + + def assert_bool(dist, attr, value): + """Verify that value is True, False, 0, or 1""" + if bool(value) != value: + raise DistutilsSetupError( + "%r must be a boolean value (got %r)" % (attr,value) + ) + +Your function should accept three arguments: the ``Distribution`` object, +the attribute name, and the attribute value. It should raise a +``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument +is invalid. Remember, your function will only be called with non-None values, +and the default value of arguments defined this way is always None. So, your +commands should always be prepared for the possibility that the attribute will +be ``None`` when they access it later. + +If more than one active distribution defines an entry point for the same +``setup()`` argument, *all* of them will be called. This allows multiple +distutils extensions to define a common argument, as long as they agree on +what values of that argument are valid. + +Also note that as with commands, it is not necessary to subclass or monkeypatch +the distutils ``Distribution`` class in order to add your arguments; it is +sufficient to define the entry points in your extension, as long as any setup +script using your extension lists your project in its ``setup_requires`` +argument. + + +Customizing Distribution Options +-------------------------------- + +Plugins may wish to extend or alter the options on a Distribution object to +suit the purposes of that project. For example, a tool that infers the +``Distribution.version`` from SCM-metadata may need to hook into the +option finalization. To enable this feature, Setuptools offers an entry +point "setuptools.finalize_distribution_options". That entry point must +be a callable taking one argument (the Distribution instance). + +If the callable has an ``.order`` property, that value will be used to +determine the order in which the hook is called. Lower numbers are called +first and the default is zero (0). + +Plugins may read, alter, and set properties on the distribution, but each +plugin is encouraged to load the configuration/settings for their behavior +independently. + + +Adding new EGG-INFO Files +------------------------- + +Some extensible applications or frameworks may want to allow third parties to +develop plugins with application or framework-specific metadata included in +the plugins' EGG-INFO directory, for easy access via the ``pkg_resources`` +metadata API. The easiest way to allow this is to create a distutils extension +to be used from the plugin projects' setup scripts (via ``setup_requires``) +that defines a new setup keyword, and then uses that data to write an EGG-INFO +file when the ``egg_info`` command is run. + +The ``egg_info`` command looks for extension points in an ``egg_info.writers`` +group, and calls them to write the files. Here's a simple example of a +distutils extension defining a setup argument ``foo_bar``, which is a list of +lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any +project that uses the argument:: + + setup( + # ... + entry_points={ + "distutils.setup_keywords": [ + "foo_bar = setuptools.dist:assert_string_list", + ], + "egg_info.writers": [ + "foo_bar.txt = setuptools.command.egg_info:write_arg", + ], + }, + ) + +This simple example makes use of two utility functions defined by setuptools +for its own use: a routine to validate that a setup keyword is a sequence of +strings, and another one that looks up a setup argument and writes it to +a file. Here's what the writer utility looks like:: + + def write_arg(cmd, basename, filename): + argname = os.path.splitext(basename)[0] + value = getattr(cmd.distribution, argname, None) + if value is not None: + value = "\n".join(value) + "\n" + cmd.write_or_delete_file(argname, filename, value) + +As you can see, ``egg_info.writers`` entry points must be a function taking +three arguments: a ``egg_info`` command instance, the basename of the file to +write (e.g. ``foo_bar.txt``), and the actual full filename that should be +written to. + +In general, writer functions should honor the command object's ``dry_run`` +setting when writing files, and use the ``distutils.log`` object to do any +console output. The easiest way to conform to this requirement is to use +the ``cmd`` object's ``write_file()``, ``delete_file()``, and +``write_or_delete_file()`` methods exclusively for your file operations. See +those methods' docstrings for more details. + +Adding Support for Revision Control Systems +------------------------------------------------- + +If the files you want to include in the source distribution are tracked using +Git, Mercurial or SVN, you can use the following packages to achieve that: + +- Git and Mercurial: `setuptools_scm `_ +- SVN: `setuptools_svn `_ + +If you would like to create a plugin for ``setuptools`` to find files tracked +by another revision control system, you can do so by adding an entry point to +the ``setuptools.file_finders`` group. The entry point should be a function +accepting a single directory name, and should yield all the filenames within +that directory (and any subdirectories thereof) that are under revision +control. + +For example, if you were going to create a plugin for a revision control system +called "foobar", you would write a function something like this: + +.. code-block:: python + + def find_files_for_foobar(dirname): + # loop to yield paths that start with `dirname` + +And you would register it in a setup script using something like this:: + + entry_points={ + "setuptools.file_finders": [ + "foobar = my_foobar_module:find_files_for_foobar", + ] + } + +Then, anyone who wants to use your plugin can simply install it, and their +local setuptools installation will be able to find the necessary files. + +It is not necessary to distribute source control plugins with projects that +simply use the other source control system, or to specify the plugins in +``setup_requires``. When you create a source distribution with the ``sdist`` +command, setuptools automatically records what files were found in the +``SOURCES.txt`` file. That way, recipients of source distributions don't need +to have revision control at all. However, if someone is working on a package +by checking out with that system, they will need the same plugin(s) that the +original author is using. + +A few important points for writing revision control file finders: + +* Your finder function MUST return relative paths, created by appending to the + passed-in directory name. Absolute paths are NOT allowed, nor are relative + paths that reference a parent directory of the passed-in directory. + +* Your finder function MUST accept an empty string as the directory name, + meaning the current directory. You MUST NOT convert this to a dot; just + yield relative paths. So, yielding a subdirectory named ``some/dir`` under + the current directory should NOT be rendered as ``./some/dir`` or + ``/somewhere/some/dir``, but *always* as simply ``some/dir`` + +* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully + with the absence of needed programs (i.e., ones belonging to the revision + control system itself. It *may*, however, use ``distutils.log.warn()`` to + inform the user of the missing program(s). \ No newline at end of file From 39206c05f07bc8ef754b789f2bcad3404f32df98 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:48:05 -0400 Subject: [PATCH 7830/8469] docs: add functionality entry in userguide index --- docs/userguide/index.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index 901aad42c7..7e6b7f8a6b 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -14,5 +14,6 @@ ordinary Python packages based on the ``distutils``. :maxdepth: 1 Quickstart + Functionalities keyword reference - Command reference \ No newline at end of file + Command reference From 086c2a3fc52f508bc69b2ee4846aea39c646d887 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:50:26 -0400 Subject: [PATCH 7831/8469] docs: migrate declarative config to separate file cut and paste from setuptools.txt --- docs/setuptools.txt | 239 ------------------------- docs/userguide/declarative_config.txt | 240 ++++++++++++++++++++++++++ 2 files changed, 240 insertions(+), 239 deletions(-) create mode 100644 docs/userguide/declarative_config.txt diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7daeb3fc3f..3500efbe8f 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -122,246 +122,7 @@ Our apologies for the inconvenience, and thank you for your patience. ------------------------------------------ -Configuring setup() using setup.cfg files ------------------------------------------ -.. note:: New in 30.3.0 (8 Dec 2016). - -.. important:: - If compatibility with legacy builds (i.e. those not using the :pep:`517` - build API) is desired, a ``setup.py`` file containing a ``setup()`` function - call is still required even if your configuration resides in ``setup.cfg``. - -``Setuptools`` allows using configuration files (usually :file:`setup.cfg`) -to define a package’s metadata and other options that are normally supplied -to the ``setup()`` function (declarative config). - -This approach not only allows automation scenarios but also reduces -boilerplate code in some cases. - -.. note:: - - This implementation has limited compatibility with the distutils2-like - ``setup.cfg`` sections used by the ``pbr`` and ``d2to1`` packages. - - Namely: only metadata-related keys from ``metadata`` section are supported - (except for ``description-file``); keys from ``files``, ``entry_points`` - and ``backwards_compat`` are not supported. - - -.. code-block:: ini - - [metadata] - name = my_package - version = attr: src.VERSION - description = My package description - long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst - keywords = one, two - license = BSD 3-Clause License - classifiers = - Framework :: Django - License :: OSI Approved :: BSD License - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 - - [options] - zip_safe = False - include_package_data = True - packages = find: - scripts = - bin/first.py - bin/second.py - install_requires = - requests - importlib; python_version == "2.6" - - [options.package_data] - * = *.txt, *.rst - hello = *.msg - - [options.extras_require] - pdf = ReportLab>=1.2; RXP - rest = docutils>=0.3; pack ==1.1, ==1.3 - - [options.packages.find] - exclude = - src.subpackage1 - src.subpackage2 - - [options.data_files] - /etc/my_package = - site.d/00_default.conf - host.d/00_default.conf - data = data/img/logo.png, data/svg/icon.svg - -Metadata and options are set in the config sections of the same name. - -* Keys are the same as the keyword arguments one provides to the ``setup()`` - function. - -* Complex values can be written comma-separated or placed one per line - in *dangling* config values. The following are equivalent: - - .. code-block:: ini - - [metadata] - keywords = one, two - - [metadata] - keywords = - one - two - -* In some cases, complex values can be provided in dedicated subsections for - clarity. - -* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in - order to cover common usecases. - -* Unknown keys are ignored. - - -Using a ``src/`` layout -======================= - -One commonly used package configuration has all the module source code in a -subdirectory (often called the ``src/`` layout), like this:: - - ├── src - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - ├── setup.py - └── setup.cfg - -You can set up your ``setup.cfg`` to automatically find all your packages in -the subdirectory like this: - -.. code-block:: ini - - # This example contains just the necessary options for a src-layout, set up - # the rest of the file as described above. - - [options] - package_dir= - =src - packages=find: - - [options.packages.find] - where=src - -Specifying values -================= - -Some values are treated as simple strings, some allow more logic. - -Type names used below: - -* ``str`` - simple string -* ``list-comma`` - dangling list or string of comma-separated values -* ``list-semi`` - dangling list or string of semicolon-separated values -* ``bool`` - ``True`` is 1, yes, true -* ``dict`` - list-comma where keys are separated from values by ``=`` -* ``section`` - values are read from a dedicated (sub)section - - -Special directives: - -* ``attr:`` - Value is read from a module attribute. ``attr:`` supports - callables and iterables; unsupported types are cast using ``str()``. -* ``file:`` - Value is read from a list of files and then concatenated - - -.. note:: - The ``file:`` directive is sandboxed and won't reach anything outside - the directory containing ``setup.py``. - - -Metadata --------- - -.. note:: - The aliases given below are supported for compatibility reasons, - but their use is not advised. - -============================== ================= ================= =============== ===== -Key Aliases Type Minimum Version Notes -============================== ================= ================= =============== ===== -name str -version attr:, file:, str 39.2.0 (1) -url home-page str -download_url download-url str -project_urls dict 38.3.0 -author str -author_email author-email str -maintainer str -maintainer_email maintainer-email str -classifiers classifier file:, list-comma -license str -license_file str -license_files list-comma -description summary file:, str -long_description long-description file:, str -long_description_content_type str 38.6.0 -keywords list-comma -platforms platform list-comma -provides list-comma -requires list-comma -obsoletes list-comma -============================== ================= ================= =============== ===== - -.. note:: - A version loaded using the ``file:`` directive must comply with PEP 440. - It is easy to accidentally put something other than a valid version - string in such a file, so validation is stricter in this case. - -Notes: -1. The `version` file attribute has only been supported since 39.2.0. - -Options -------- - -======================= =================================== =============== ===== -Key Type Minimum Version Notes -======================= =================================== =============== ===== -zip_safe bool -setup_requires list-semi -install_requires list-semi -extras_require section -python_requires str -entry_points file:, section -use_2to3 bool -use_2to3_fixers list-comma -use_2to3_exclude_fixers list-comma -convert_2to3_doctests list-comma -scripts list-comma -eager_resources list-comma -dependency_links list-comma -tests_require list-semi -include_package_data bool -packages find:, find_namespace:, list-comma -package_dir dict -package_data section (1) -exclude_package_data section -namespace_packages list-comma -py_modules list-comma -data_files dict 40.6.0 -======================= =================================== =============== ===== - -.. note:: - - **packages** - The ``find:`` and ``find_namespace:`` directive can be further configured - in a dedicated subsection ``options.packages.find``. This subsection - accepts the same keys as the `setuptools.find_packages` and the - `setuptools.find_namespace_packages` function: - ``where``, ``include``, and ``exclude``. - - **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. - -Notes: -1. In the `package_data` section, a key named with a single asterisk (`*`) -refers to all packages, in lieu of the empty string used in `setup.py`. Configuration API diff --git a/docs/userguide/declarative_config.txt b/docs/userguide/declarative_config.txt new file mode 100644 index 0000000000..b40d3a4a36 --- /dev/null +++ b/docs/userguide/declarative_config.txt @@ -0,0 +1,240 @@ +----------------------------------------- +Configuring setup() using setup.cfg files +----------------------------------------- + +.. note:: New in 30.3.0 (8 Dec 2016). + +.. important:: + If compatibility with legacy builds (i.e. those not using the :pep:`517` + build API) is desired, a ``setup.py`` file containing a ``setup()`` function + call is still required even if your configuration resides in ``setup.cfg``. + +``Setuptools`` allows using configuration files (usually :file:`setup.cfg`) +to define a package’s metadata and other options that are normally supplied +to the ``setup()`` function (declarative config). + +This approach not only allows automation scenarios but also reduces +boilerplate code in some cases. + +.. note:: + + This implementation has limited compatibility with the distutils2-like + ``setup.cfg`` sections used by the ``pbr`` and ``d2to1`` packages. + + Namely: only metadata-related keys from ``metadata`` section are supported + (except for ``description-file``); keys from ``files``, ``entry_points`` + and ``backwards_compat`` are not supported. + + +.. code-block:: ini + + [metadata] + name = my_package + version = attr: src.VERSION + description = My package description + long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst + keywords = one, two + license = BSD 3-Clause License + classifiers = + Framework :: Django + License :: OSI Approved :: BSD License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + + [options] + zip_safe = False + include_package_data = True + packages = find: + scripts = + bin/first.py + bin/second.py + install_requires = + requests + importlib; python_version == "2.6" + + [options.package_data] + * = *.txt, *.rst + hello = *.msg + + [options.extras_require] + pdf = ReportLab>=1.2; RXP + rest = docutils>=0.3; pack ==1.1, ==1.3 + + [options.packages.find] + exclude = + src.subpackage1 + src.subpackage2 + + [options.data_files] + /etc/my_package = + site.d/00_default.conf + host.d/00_default.conf + data = data/img/logo.png, data/svg/icon.svg + +Metadata and options are set in the config sections of the same name. + +* Keys are the same as the keyword arguments one provides to the ``setup()`` + function. + +* Complex values can be written comma-separated or placed one per line + in *dangling* config values. The following are equivalent: + + .. code-block:: ini + + [metadata] + keywords = one, two + + [metadata] + keywords = + one + two + +* In some cases, complex values can be provided in dedicated subsections for + clarity. + +* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in + order to cover common usecases. + +* Unknown keys are ignored. + + +Using a ``src/`` layout +======================= + +One commonly used package configuration has all the module source code in a +subdirectory (often called the ``src/`` layout), like this:: + + ├── src + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + ├── setup.py + └── setup.cfg + +You can set up your ``setup.cfg`` to automatically find all your packages in +the subdirectory like this: + +.. code-block:: ini + + # This example contains just the necessary options for a src-layout, set up + # the rest of the file as described above. + + [options] + package_dir= + =src + packages=find: + + [options.packages.find] + where=src + +Specifying values +================= + +Some values are treated as simple strings, some allow more logic. + +Type names used below: + +* ``str`` - simple string +* ``list-comma`` - dangling list or string of comma-separated values +* ``list-semi`` - dangling list or string of semicolon-separated values +* ``bool`` - ``True`` is 1, yes, true +* ``dict`` - list-comma where keys are separated from values by ``=`` +* ``section`` - values are read from a dedicated (sub)section + + +Special directives: + +* ``attr:`` - Value is read from a module attribute. ``attr:`` supports + callables and iterables; unsupported types are cast using ``str()``. +* ``file:`` - Value is read from a list of files and then concatenated + + +.. note:: + The ``file:`` directive is sandboxed and won't reach anything outside + the directory containing ``setup.py``. + + +Metadata +-------- + +.. note:: + The aliases given below are supported for compatibility reasons, + but their use is not advised. + +============================== ================= ================= =============== ===== +Key Aliases Type Minimum Version Notes +============================== ================= ================= =============== ===== +name str +version attr:, file:, str 39.2.0 (1) +url home-page str +download_url download-url str +project_urls dict 38.3.0 +author str +author_email author-email str +maintainer str +maintainer_email maintainer-email str +classifiers classifier file:, list-comma +license str +license_file str +license_files list-comma +description summary file:, str +long_description long-description file:, str +long_description_content_type str 38.6.0 +keywords list-comma +platforms platform list-comma +provides list-comma +requires list-comma +obsoletes list-comma +============================== ================= ================= =============== ===== + +.. note:: + A version loaded using the ``file:`` directive must comply with PEP 440. + It is easy to accidentally put something other than a valid version + string in such a file, so validation is stricter in this case. + +Notes: +1. The `version` file attribute has only been supported since 39.2.0. + +Options +------- + +======================= =================================== =============== ===== +Key Type Minimum Version Notes +======================= =================================== =============== ===== +zip_safe bool +setup_requires list-semi +install_requires list-semi +extras_require section +python_requires str +entry_points file:, section +use_2to3 bool +use_2to3_fixers list-comma +use_2to3_exclude_fixers list-comma +convert_2to3_doctests list-comma +scripts list-comma +eager_resources list-comma +dependency_links list-comma +tests_require list-semi +include_package_data bool +packages find:, find_namespace:, list-comma +package_dir dict +package_data section (1) +exclude_package_data section +namespace_packages list-comma +py_modules list-comma +data_files dict 40.6.0 +======================= =================================== =============== ===== + +.. note:: + + **packages** - The ``find:`` and ``find_namespace:`` directive can be further configured + in a dedicated subsection ``options.packages.find``. This subsection + accepts the same keys as the `setuptools.find_packages` and the + `setuptools.find_namespace_packages` function: + ``where``, ``include``, and ``exclude``. + + **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. + +Notes: +1. In the `package_data` section, a key named with a single asterisk (`*`) +refers to all packages, in lieu of the empty string used in `setup.py`. \ No newline at end of file From 0a0d6f19e799c53d37a8ce5fffc8cc5cee660712 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:51:09 -0400 Subject: [PATCH 7832/8469] docs: add entry to userguide index --- docs/userguide/index.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index 7e6b7f8a6b..4d7bb2a7c1 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -15,5 +15,6 @@ ordinary Python packages based on the ``distutils``. Quickstart Functionalities + Declarative config keyword reference Command reference From 6b4ffa0893a078f687f7a20d0d0d14d0fef79121 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 14:54:07 -0400 Subject: [PATCH 7833/8469] docs: modify entry in top level index from pointing at setuptools.txt to userguide/index.txt --- docs/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index 38fbbcc50c..fda2e94810 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -16,6 +16,6 @@ Documentation content: .. toctree:: :maxdepth: 1 - User guide + User guide Development guide Backward compatibility & deprecated practice From 911000d2c9a86a86b4dca133cb473458ec3ecfc7 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 11 May 2020 15:06:36 -0400 Subject: [PATCH 7834/8469] docs: add new fragment --- changelog.d/2102.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2102.doc.rst diff --git a/changelog.d/2102.doc.rst b/changelog.d/2102.doc.rst new file mode 100644 index 0000000000..bdb1a50219 --- /dev/null +++ b/changelog.d/2102.doc.rst @@ -0,0 +1 @@ +doc overhaul step 2: break main doc into multiple sections \ No newline at end of file From bb5af519860192d3bca638d903cb0ea123c7abd8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 11 May 2020 23:49:53 +0300 Subject: [PATCH 7835/8469] Fix typo --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 03c89be6c5..a935be562b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ v46.2.0 * #2075: Stop recognizing files ending with ``.dist-info`` as distribution metadata. * #2086: Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools. * #1698: Added documentation for ``build_meta`` (a bare minimum, not completed). -* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in testes, +* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in tests, because ``lib2to3`` is `deprecated in Python 3.9 `_. From 56bcce894e99059a8abda29d8b919b0bee7fd1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 12 May 2020 13:33:04 +0200 Subject: [PATCH 7836/8469] Reuse @ack_2to3 in TestDevelop.test_2to3_user_mode Fixes https://github.com/pypa/setuptools/issues/2100 --- changelog.d/2105.misc.rst | 1 + setuptools/tests/__init__.py | 4 +++- setuptools/tests/test_develop.py | 2 ++ setuptools/tests/test_test.py | 4 +--- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelog.d/2105.misc.rst diff --git a/changelog.d/2105.misc.rst b/changelog.d/2105.misc.rst new file mode 100644 index 0000000000..75eaf2cb39 --- /dev/null +++ b/changelog.d/2105.misc.rst @@ -0,0 +1 @@ +Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``. diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 9c77b51f8d..6377d7857d 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -6,7 +6,7 @@ __all__ = [ - 'fail_on_ascii', 'py2_only', 'py3_only' + 'fail_on_ascii', 'py2_only', 'py3_only', 'ack_2to3' ] @@ -16,3 +16,5 @@ py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only") py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only") + +ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated') diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 792975fd14..bb89a865b9 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -17,6 +17,7 @@ from setuptools.command.develop import develop from setuptools.dist import Distribution +from setuptools.tests import ack_2to3 from . import contexts from . import namespaces @@ -65,6 +66,7 @@ class TestDevelop: @pytest.mark.skipif( in_virtualenv or in_venv, reason="Cannot run when invoked in a virtualenv or venv") + @ack_2to3 def test_2to3_user_mode(self, test_env): settings = dict( name='foo', diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 0f77d8ff3d..892fd120d9 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -10,6 +10,7 @@ from setuptools.command.test import test from setuptools.dist import Distribution +from setuptools.tests import ack_2to3 from .textwrap import DALS @@ -73,9 +74,6 @@ def quiet_log(): log.set_verbosity(0) -ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated') - - @pytest.mark.usefixtures('sample_test', 'quiet_log') @ack_2to3 def test_test(capfd): From 322734cfa00d3d5bffb9af02c780ee8e33142e5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 12 May 2020 20:34:20 -0400 Subject: [PATCH 7837/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2107 --- pkg_resources/tests/test_working_set.py | 4 ++-- setuptools/tests/test_easy_install.py | 2 +- setuptools/tests/test_packageindex.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index b3ca4ea8e4..7a759bbb3f 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -14,8 +14,8 @@ def strip_comments(s): return '\n'.join( - l for l in s.split('\n') - if l.strip() and not l.strip().startswith('#') + line for line in s.split('\n') + if line.strip() and not line.strip().startswith('#') ) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 534392b99d..3044cbd098 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -738,7 +738,7 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): dep_2_0_url=dep_2_0_url, dep_2_0_sdist=dep_2_0_sdist, dep_2_0_python_requires=dep_2_0_python_requires, - ), 'utf-8') + ), 'utf-8') index_url = path_to_url(str(index)) with contexts.save_pkg_resources_state(): test_pkg = create_setup_requires_package( diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 60d968fdfa..fc8f2a7047 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -221,11 +221,11 @@ def test_egg_fragment(self): ('+ubuntu_0', '+ubuntu.0'), ] versions = [ - [''.join([e, r, p, l]) for l in ll] + [''.join([e, r, p, loc]) for loc in locs] for e in epoch for r in releases for p in sum([pre, post, dev], ['']) - for ll in local] + for locs in local] for v, vc in versions: dists = list(setuptools.package_index.distros_for_url( 'http://example.com/example.zip#egg=example-' + v)) From d1dccc76ef90497788b5c839918d775585044f5a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 12 May 2020 19:58:54 -0400 Subject: [PATCH 7838/8469] Just remove fragment remover. PyPI no longer supplies these md5 values anyway. Fixes #2089. --- pkg_resources/__init__.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0512731d9f..edd3d2e8c6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -55,7 +55,7 @@ FileExistsError = OSError from pkg_resources.extern import six -from pkg_resources.extern.six.moves import urllib, map, filter +from pkg_resources.extern.six.moves import map, filter # capture these to bypass sandboxing from os import utime @@ -2546,15 +2546,6 @@ def parse_map(cls, data, dist=None): return maps -def _remove_md5_fragment(location): - if not location: - return '' - parsed = urllib.parse.urlparse(location) - if parsed[-1].startswith('md5='): - return urllib.parse.urlunparse(parsed[:-1] + ('',)) - return location - - def _version_from_file(lines): """ Given an iterable of lines from a Metadata file, return @@ -2611,7 +2602,7 @@ def hashcmp(self): self.parsed_version, self.precedence, self.key, - _remove_md5_fragment(self.location), + self.location, self.py_version or '', self.platform or '', ) From 932d88b5e5972f6da11ebff4e516b787dca8e393 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 12 May 2020 20:22:53 -0400 Subject: [PATCH 7839/8469] Remove the test, no longer relevant now that external links are no longer supported and PyPI no longer allows replacing packages. --- setuptools/tests/test_packageindex.py | 39 --------------------------- 1 file changed, 39 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index fc8f2a7047..452968973c 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -9,9 +9,7 @@ import mock import pytest -import pkg_resources import setuptools.package_index -from setuptools.tests.server import IndexServer from .textwrap import DALS @@ -114,43 +112,6 @@ def test_url_ok(self): url = 'file:///tmp/test_package_index' assert index.url_ok(url, True) - def test_links_priority(self): - """ - Download links from the pypi simple index should be used before - external download links. - https://bitbucket.org/tarek/distribute/issue/163 - - Usecase : - - someone uploads a package on pypi, a md5 is generated - - someone manually copies this link (with the md5 in the url) onto an - external page accessible from the package page. - - someone reuploads the package (with a different md5) - - while easy_installing, an MD5 error occurs because the external link - is used - -> Setuptools should use the link from pypi, not the external one. - """ - if sys.platform.startswith('java'): - # Skip this test on jython because binding to :0 fails - return - - # start an index server - server = IndexServer() - server.start() - index_url = server.base_url() + 'test_links_priority/simple/' - - # scan a test index - pi = setuptools.package_index.PackageIndex(index_url) - requirement = pkg_resources.Requirement.parse('foobar') - pi.find_packages(requirement) - server.stop() - - # the distribution has been found - assert 'foobar' in pi - # we have only one link, because links are compared without md5 - assert len(pi['foobar']) == 1 - # the link should be from the index - assert 'correct_md5' in pi['foobar'][0].location - def test_parse_bdist_wininst(self): parse = setuptools.package_index.parse_bdist_wininst From 6a73d1f0bc1e25833974eb0ec943b65d2381a7a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 12 May 2020 20:49:54 -0400 Subject: [PATCH 7840/8469] Update changelog --- changelog.d/2089.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2089.change.rst diff --git a/changelog.d/2089.change.rst b/changelog.d/2089.change.rst new file mode 100644 index 0000000000..0977cfca16 --- /dev/null +++ b/changelog.d/2089.change.rst @@ -0,0 +1 @@ +Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant. From c12db0915b4e3f0fae91d2a99dab467602c06dd6 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Wed, 13 May 2020 10:55:55 -0400 Subject: [PATCH 7841/8469] docs: migrated section for versioning from quickstart.txt to functionalities.txt --- docs/userguide/functionalities.txt | 87 +++++++++++++++++++++++++++++- docs/userguide/quickstart.txt | 84 ----------------------------- 2 files changed, 86 insertions(+), 85 deletions(-) diff --git a/docs/userguide/functionalities.txt b/docs/userguide/functionalities.txt index a310da9713..7bd3ae8ae6 100644 --- a/docs/userguide/functionalities.txt +++ b/docs/userguide/functionalities.txt @@ -1335,4 +1335,89 @@ A few important points for writing revision control file finders: * Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully with the absence of needed programs (i.e., ones belonging to the revision control system itself. It *may*, however, use ``distutils.log.warn()`` to - inform the user of the missing program(s). \ No newline at end of file + inform the user of the missing program(s). + +Specifying Your Project's Version +--------------------------------- + +Setuptools can work well with most versioning schemes; there are, however, a +few special things to watch out for, in order to ensure that setuptools and +other tools can always tell what version of your package is newer than another +version. Knowing these things will also help you correctly specify what +versions of other projects your project depends on. + +A version consists of an alternating series of release numbers and pre-release +or post-release tags. A release number is a series of digits punctuated by +dots, such as ``2.4`` or ``0.5``. Each series of digits is treated +numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the +same release number, denoting the first subrelease of release 2. But ``2.10`` +is the *tenth* subrelease of release 2, and so is a different and newer release +from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also +ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. + +Following a release number, you can have either a pre-release or post-release +tag. Pre-release tags make a version be considered *older* than the version +they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, +which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make +a version be considered *newer* than the version they are appended to. So, +revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* +than ``2.4.1`` (which has a higher release number). + +A pre-release tag is a series of letters that are alphabetically before +"final". Some examples of prerelease tags would include ``alpha``, ``beta``, +``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash +before the prerelease tag if it's immediately after a number, but it's okay to +do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all +represent release candidate 1 of version ``2.4``, and are treated as identical +by setuptools. + +In addition, there are three special prerelease tags that are treated as if +they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version +``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as +``2.4c1``, and are treated as identical by setuptools. + +A post-release tag is either a series of letters that are alphabetically +greater than or equal to "final", or a dash (``-``). Post-release tags are +generally used to separate patch numbers, port numbers, build numbers, revision +numbers, or date stamps from the release number. For example, the version +``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of +version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped +post-release. + +Notice that after each pre or post-release tag, you are free to place another +release number, followed again by more pre- or post-release tags. For example, +``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- +development version of the ninth alpha of release 0.6. Notice that ``dev`` is +a pre-release tag, so this version is a *lower* version number than ``0.6a9``, +which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is +a post-release tag, so this version is *newer* than ``0.6a9.dev``. + +For the most part, setuptools' interpretation of version numbers is intuitive, +but here are a few tips that will keep you out of trouble in the corner cases: + +* Don't stick adjoining pre-release tags together without a dot or number + between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, + *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in + ``1.9a.dev``, or separate the prerelease tags with a number, as in + ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are + identical versions from setuptools' point of view, so you can use whatever + scheme you prefer. + +* If you want to be certain that your chosen numbering scheme works the way + you think it will, you can use the ``pkg_resources.parse_version()`` function + to compare different version numbers:: + + >>> from pkg_resources import parse_version + >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") + True + >>> parse_version("2.1-rc2") < parse_version("2.1") + True + >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") + True + +Once you've decided on a version numbering scheme for your project, you can +have setuptools automatically tag your in-development releases with various +pre- or post-release tags. See the following sections for more details: + +* `Tagging and "Daily Build" or "Snapshot" Releases`_ +* The `egg_info`_ command \ No newline at end of file diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 4df50bc56e..f2e1a951f5 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -79,87 +79,3 @@ arguments do (except for the metadata ones), and the various ways you might use them in your own project(s). -Specifying Your Project's Version ---------------------------------- - -Setuptools can work well with most versioning schemes; there are, however, a -few special things to watch out for, in order to ensure that setuptools and -other tools can always tell what version of your package is newer than another -version. Knowing these things will also help you correctly specify what -versions of other projects your project depends on. - -A version consists of an alternating series of release numbers and pre-release -or post-release tags. A release number is a series of digits punctuated by -dots, such as ``2.4`` or ``0.5``. Each series of digits is treated -numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the -same release number, denoting the first subrelease of release 2. But ``2.10`` -is the *tenth* subrelease of release 2, and so is a different and newer release -from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also -ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. - -Following a release number, you can have either a pre-release or post-release -tag. Pre-release tags make a version be considered *older* than the version -they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, -which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make -a version be considered *newer* than the version they are appended to. So, -revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* -than ``2.4.1`` (which has a higher release number). - -A pre-release tag is a series of letters that are alphabetically before -"final". Some examples of prerelease tags would include ``alpha``, ``beta``, -``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash -before the prerelease tag if it's immediately after a number, but it's okay to -do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all -represent release candidate 1 of version ``2.4``, and are treated as identical -by setuptools. - -In addition, there are three special prerelease tags that are treated as if -they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version -``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as -``2.4c1``, and are treated as identical by setuptools. - -A post-release tag is either a series of letters that are alphabetically -greater than or equal to "final", or a dash (``-``). Post-release tags are -generally used to separate patch numbers, port numbers, build numbers, revision -numbers, or date stamps from the release number. For example, the version -``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of -version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped -post-release. - -Notice that after each pre or post-release tag, you are free to place another -release number, followed again by more pre- or post-release tags. For example, -``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- -development version of the ninth alpha of release 0.6. Notice that ``dev`` is -a pre-release tag, so this version is a *lower* version number than ``0.6a9``, -which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is -a post-release tag, so this version is *newer* than ``0.6a9.dev``. - -For the most part, setuptools' interpretation of version numbers is intuitive, -but here are a few tips that will keep you out of trouble in the corner cases: - -* Don't stick adjoining pre-release tags together without a dot or number - between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, - *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in - ``1.9a.dev``, or separate the prerelease tags with a number, as in - ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are - identical versions from setuptools' point of view, so you can use whatever - scheme you prefer. - -* If you want to be certain that your chosen numbering scheme works the way - you think it will, you can use the ``pkg_resources.parse_version()`` function - to compare different version numbers:: - - >>> from pkg_resources import parse_version - >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") - True - >>> parse_version("2.1-rc2") < parse_version("2.1") - True - >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") - True - -Once you've decided on a version numbering scheme for your project, you can -have setuptools automatically tag your in-development releases with various -pre- or post-release tags. See the following sections for more details: - -* `Tagging and "Daily Build" or "Snapshot" Releases`_ -* The `egg_info`_ command \ No newline at end of file From e50590a6961a91765ef00aaea447d3be8948666f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Wed, 13 May 2020 10:57:42 -0400 Subject: [PATCH 7842/8469] docs: removed unnecessary transition paragraph so that the quickstart is cleaner for now. Might add more text later --- docs/userguide/quickstart.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index f2e1a951f5..535227a0e3 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -74,8 +74,6 @@ dependencies, and perhaps some data files and scripts:: # could also include long_description, download_url, etc. ) -In the sections that follow, we'll explain what most of these ``setup()`` -arguments do (except for the metadata ones), and the various ways you might use -them in your own project(s). + From 7d3317dee0a6ef6f1474e8f6d07b3a4cfe40a084 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Wed, 13 May 2020 11:28:36 -0400 Subject: [PATCH 7843/8469] docs: migrated section egg-secutable section moved from userguide/functionalities to deprecated/functionalities --- docs/deprecated/functionalities.txt | 33 +++++++++++++++++++++++++++++ docs/userguide/functionalities.txt | 32 ---------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) create mode 100644 docs/deprecated/functionalities.txt diff --git a/docs/deprecated/functionalities.txt b/docs/deprecated/functionalities.txt new file mode 100644 index 0000000000..c6ea83b387 --- /dev/null +++ b/docs/deprecated/functionalities.txt @@ -0,0 +1,33 @@ +"Eggsecutable" Scripts +---------------------- + +.. deprecated:: 45.3.0 + +Occasionally, there are situations where it's desirable to make an ``.egg`` +file directly executable. You can do this by including an entry point such +as the following:: + + setup( + # other arguments here... + entry_points={ + "setuptools.installation": [ + "eggsecutable = my_package.some_module:main_func", + ] + } + ) + +Any eggs built from the above setup script will include a short executable +prelude that imports and calls ``main_func()`` from ``my_package.some_module``. +The prelude can be run on Unix-like platforms (including Mac and Linux) by +invoking the egg with ``/bin/sh``, or by enabling execute permissions on the +``.egg`` file. For the executable prelude to run, the appropriate version of +Python must be available via the ``PATH`` environment variable, under its +"long" name. That is, if the egg is built for Python 2.3, there must be a +``python2.3`` executable present in a directory on ``PATH``. + +IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or +invoked via symlinks. They *must* be invoked using their original filename, in +order to ensure that, once running, ``pkg_resources`` will know what project +and version is in use. The header script will check this and exit with an +error if the ``.egg`` file has been renamed or is invoked via a symlink that +changes its base name. \ No newline at end of file diff --git a/docs/userguide/functionalities.txt b/docs/userguide/functionalities.txt index 7bd3ae8ae6..5946662af3 100644 --- a/docs/userguide/functionalities.txt +++ b/docs/userguide/functionalities.txt @@ -155,39 +155,7 @@ will be added to ``sys.path`` when the script is run. For more information on on "entry points" in general, see the section below on `Dynamic Discovery of Services and Plugins`_. -"Eggsecutable" Scripts ----------------------- - -.. deprecated:: 45.3.0 - -Occasionally, there are situations where it's desirable to make an ``.egg`` -file directly executable. You can do this by including an entry point such -as the following:: - - setup( - # other arguments here... - entry_points={ - "setuptools.installation": [ - "eggsecutable = my_package.some_module:main_func", - ] - } - ) -Any eggs built from the above setup script will include a short executable -prelude that imports and calls ``main_func()`` from ``my_package.some_module``. -The prelude can be run on Unix-like platforms (including Mac and Linux) by -invoking the egg with ``/bin/sh``, or by enabling execute permissions on the -``.egg`` file. For the executable prelude to run, the appropriate version of -Python must be available via the ``PATH`` environment variable, under its -"long" name. That is, if the egg is built for Python 2.3, there must be a -``python2.3`` executable present in a directory on ``PATH``. - -IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or -invoked via symlinks. They *must* be invoked using their original filename, in -order to ensure that, once running, ``pkg_resources`` will know what project -and version is in use. The header script will check this and exit with an -error if the ``.egg`` file has been renamed or is invoked via a symlink that -changes its base name. Declaring Dependencies ====================== From fb09f9c44e0f6a93798d52080cb00741e6c766f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 May 2020 11:56:48 -0400 Subject: [PATCH 7844/8469] bugfix isn't a thing --- changelog.d/{2041.bugfix.rst => 2041.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2041.bugfix.rst => 2041.misc.rst} (100%) diff --git a/changelog.d/2041.bugfix.rst b/changelog.d/2041.misc.rst similarity index 100% rename from changelog.d/2041.bugfix.rst rename to changelog.d/2041.misc.rst From fc0249f24ad39746ae955a2eae0d87ba201454df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 May 2020 11:56:56 -0400 Subject: [PATCH 7845/8469] =?UTF-8?q?Bump=20version:=2046.2.0=20=E2=86=92?= =?UTF-8?q?=2046.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 8 ++++++++ changelog.d/2041.misc.rst | 1 - changelog.d/2089.change.rst | 1 - changelog.d/2105.misc.rst | 1 - setup.cfg | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/2041.misc.rst delete mode 100644 changelog.d/2089.change.rst delete mode 100644 changelog.d/2105.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c1b062e4d9..09a3be97e0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.2.0 +current_version = 46.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a935be562b..97934531c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v46.3.0 +------- + +* #2089: Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant. +* #2041: Preserve file modes during pkg files copying, but clear read only flag for target afterwards. +* #2105: Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``. + + v46.2.0 ------- diff --git a/changelog.d/2041.misc.rst b/changelog.d/2041.misc.rst deleted file mode 100644 index 8db757d89d..0000000000 --- a/changelog.d/2041.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Preserve file modes during pkg files copying, but clear read only flag for target afterwards. diff --git a/changelog.d/2089.change.rst b/changelog.d/2089.change.rst deleted file mode 100644 index 0977cfca16..0000000000 --- a/changelog.d/2089.change.rst +++ /dev/null @@ -1 +0,0 @@ -Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant. diff --git a/changelog.d/2105.misc.rst b/changelog.d/2105.misc.rst deleted file mode 100644 index 75eaf2cb39..0000000000 --- a/changelog.d/2105.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``. diff --git a/setup.cfg b/setup.cfg index 2f5525f3c5..5495343269 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.2.0 +version = 46.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From c79400a2839527d0749798637d182b1cb3d84a01 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 13 May 2020 14:24:42 -0400 Subject: [PATCH 7846/8469] Ensure that the changelog.d doesn't contain files that won't match. --- tools/finalize.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/finalize.py b/tools/finalize.py index 5f284568d2..98b06c070c 100644 --- a/tools/finalize.py +++ b/tools/finalize.py @@ -60,8 +60,22 @@ def ensure_config(): subprocess.check_output(['git', 'config', 'user.email']) +def check_changes(): + """ + Verify that all of the files in changelog.d have the appropriate + names. + """ + allowed = 'deprecation', 'breaking', 'change', 'doc', 'misc' + assert all( + any(key in file.name for key in allowed) + for file in pathlib.Path('changelog.d').iterdir() + if file.name != '.gitignore' + ) + + if __name__ == '__main__': print("Cutting release at", get_version()) ensure_config() + check_changes() update_changelog() bump_version() From 5fe67153b8799fe51407c91b18c7a3acf1d40b0e Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 10:54:50 -0400 Subject: [PATCH 7847/8469] docs: WIP rewrite functionalities such that each section is comprised of a quick intro and example that illustrate the use of that functionality and provide a link to a more detailed explanation. --- docs/userguide/functionalities_rewrite.txt | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 docs/userguide/functionalities_rewrite.txt diff --git a/docs/userguide/functionalities_rewrite.txt b/docs/userguide/functionalities_rewrite.txt new file mode 100644 index 0000000000..657a732de4 --- /dev/null +++ b/docs/userguide/functionalities_rewrite.txt @@ -0,0 +1,143 @@ +======================================================== +Using setuptools to package and distribute your project +======================================================== + +``setuptools`` offers a variety of functionalities that make it easy to +build and distribute your python package. Here we provide an overview on +the commonly used ones. + +Automatic package discovery +=========================== + +For simple projects, it's usually easy enough to manually add packages to +the ``packages`` argument of ``setup()``. However, for very large projects +, it can be a big burden to keep the package list updated. setuptools therefore +provides two tools to ease the burden. + +``find_packages()`` takes a source directory and two lists of package name +patterns to exclude and include. It then walks the target directory, filtering +by inclusion patterns, and finds Python packages (any directory). Packages are only +recognized if they include an ``__init__.py`` file. Finally, exclusion +patterns are applied to remove matching packages. + +Inclusion and exclusion patterns are package names, optionally including +wildcards. For example, ``find_packages(exclude=["*.tests"])`` will exclude +all packages whose last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", +"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, +but it still won't exclude a top-level ``tests`` package or the children +thereof. + +Regardless of the parameters, the ``find_packages()`` +function returns a list of package names suitable for use as the ``packages`` +argument to ``setup()``, and so is usually the easiest way to set that +argument in your setup script. Especially since it frees you from having to +remember to modify your setup script whenever your project grows additional +top-level packages or subpackages. + + + +Entry points and automatic script creation +=========================================== + +Setuptools support automatic creation of scripts upon installation, that runs +code within your package if you specify them with the ``entry_point`` keyword. +This is what allows you to run commands like ``pip install`` instead of having +to type ``python -m pip install``. To accomplish this, consider the following +example:: + + setup( + #.... + entry_points={ + "console_scripts": [ + "foo = my_package.some_module:main_func", + "bar = other_module:some_func", + ], + "gui_scripts": [ + "baz = my_package_gui:start_func", + ] + } + ) + +When this project is installed on non-Windows platforms (using "setup.py +install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, +and ``baz`` scripts will be installed that import ``main_func`` and +``some_func`` from the specified modules. On Windows, a set of ``foo.exe``, +``bar.exe``, and ``baz.exe`` launchers are +created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The +``.exe`` wrappers find and execute the right version of Python to run the +``.py`` or ``.pyw`` file. + +For detailed usage, including managing the additional or optional dependencies, +go to :ref:`entry_point`. + +Dependency management +===================== + +``setuptools`` supports automatically installing dependencies when a package is +installed. The simplest way to include requirement specifiers is to use the +``install_requires`` argument to ``setup()``. It takes a string or list of +strings containing requirement specifiers:: + + setup( + #... + install_requires = "docutils >= 0.3" + ) + +When your project is installed, either by using pip, ``setup.py install``, +or ``setup.py develop``, all of the dependencies not already installed will +be located (via PyPI), downloaded, built (if necessary), and installed. + +For more advanced use, see :ref:`dependencies` + +Including Data Files +==================== + +Development mode +================ + +Setuptools allows you to deploy your projects for use in a common directory or +staging area, but without copying any files. Thus, you can edit each project's +code in its checkout directory, and only need to run build commands when you +change a project's C extensions or similarly compiled files. + +To do this, use the ``setup.py develop`` command. It works very similarly to +``setup.py install``, except that it doesn't actually install anything. +Instead, it creates a special ``.egg-link`` file in the deployment directory, +that links to your project's source code. And, if your deployment directory is +Python's ``site-packages`` directory, it will also update the +``easy-install.pth`` file to include your project's source code, thereby making +it available on ``sys.path`` for all programs using that Python installation. + +for more information, go to :ref:`development_mode` + +Distributing a ``setuptools``-based project +=========================================== +Before you begin, make sure you have the latest versions of setuptools and wheel:: + + pip install --upgrade setuptools wheel + +To build a setuptools project, run this command from the same directory where +setup.py is located:: + + setup.py sdist bdist_wheel + +This will generate distribution archives in the `dist` directory. + +Before you upload the generated archives make sure you're registered on +https://test.pypi.org/account/register/. You will also need to verify your email +to be able to upload any packages. +You should install twine to be able to upload packages:: + + pip install --upgrade twine + +Now, to upload these archives, run:: + + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +To install your newly uploaded package ``example_pkg``, you can use pip:: + + pip install --index-url https://test.pypi.org/simple/ example_pkg + +The next following sections will walk you through all of the available functions +``setuptools`` offers in excrutiating details (including those already mentioned) +for more advanced use. From a6acf0b59d5401766ae63b1d1f7030724606646e Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 11:15:42 -0400 Subject: [PATCH 7848/8469] docs: update functionalities.txt outline is completed, now to fill the donut holes --- docs/userguide/functionalities_rewrite.txt | 61 ++++++++++------------ 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/docs/userguide/functionalities_rewrite.txt b/docs/userguide/functionalities_rewrite.txt index 657a732de4..1cd3dee994 100644 --- a/docs/userguide/functionalities_rewrite.txt +++ b/docs/userguide/functionalities_rewrite.txt @@ -12,29 +12,23 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` argument of ``setup()``. However, for very large projects , it can be a big burden to keep the package list updated. setuptools therefore -provides two tools to ease the burden. +provides tools to ease the burden. ``find_packages()`` takes a source directory and two lists of package name patterns to exclude and include. It then walks the target directory, filtering -by inclusion patterns, and finds Python packages (any directory). Packages are only -recognized if they include an ``__init__.py`` file. Finally, exclusion -patterns are applied to remove matching packages. +by inclusion patterns, and return a list of Python packages (any directory). +Finally, exclusion patterns are applied to remove matching packages. -Inclusion and exclusion patterns are package names, optionally including -wildcards. For example, ``find_packages(exclude=["*.tests"])`` will exclude -all packages whose last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", -"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, -but it still won't exclude a top-level ``tests`` package or the children -thereof. - -Regardless of the parameters, the ``find_packages()`` -function returns a list of package names suitable for use as the ``packages`` -argument to ``setup()``, and so is usually the easiest way to set that -argument in your setup script. Especially since it frees you from having to -remember to modify your setup script whenever your project grows additional -top-level packages or subpackages. +For example:: + #... + from setuptools import find_packages() + setup( + #..., + packages = find_packages() + ) +For more details and advanced use, go to :ref:`package_discovery` Entry points and automatic script creation =========================================== @@ -50,25 +44,13 @@ example:: entry_points={ "console_scripts": [ "foo = my_package.some_module:main_func", - "bar = other_module:some_func", ], - "gui_scripts": [ - "baz = my_package_gui:start_func", - ] } ) -When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, -and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. On Windows, a set of ``foo.exe``, -``bar.exe``, and ``baz.exe`` launchers are -created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The -``.exe`` wrappers find and execute the right version of Python to run the -``.py`` or ``.pyw`` file. - -For detailed usage, including managing the additional or optional dependencies, -go to :ref:`entry_point`. +When this project is installed, a ``foo`` script will be installed and will +invoke the ``main_func`` when called by the user. For detailed usage, including +managing the additional or optional dependencies, go to :ref:`entry_point`. Dependency management ===================== @@ -92,6 +74,21 @@ For more advanced use, see :ref:`dependencies` Including Data Files ==================== +The distutils have traditionally allowed installation of "data files", which +are placed in a platform-specific location. Setuptools offers three ways to +specify data files to be included in your packages. For the simpliest use, you +can simply use the ``include_package_data`` keyword e.g.:: + + setup( + ... + include_package_data=True + ) + +This tells setuptools to install any data files it finds in your packages. +The data files must be specified via the distutils' ``MANIFEST.in`` file. + +For more details, see :ref:`datafiles` + Development mode ================ From 54314cbde4db3d559f158dd4c9f02c249f0f6db5 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 11:16:48 -0400 Subject: [PATCH 7849/8469] docs: put the remaining functionalities into misce those that don't need to put into a dedicated file are now inside the miscellaneous.txt --- docs/userguide/{functionalities.txt => miscellaneous.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/userguide/{functionalities.txt => miscellaneous.txt} (100%) diff --git a/docs/userguide/functionalities.txt b/docs/userguide/miscellaneous.txt similarity index 100% rename from docs/userguide/functionalities.txt rename to docs/userguide/miscellaneous.txt From 88f248944a6033d1781a49a57997cd4932e28746 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 11:20:15 -0400 Subject: [PATCH 7850/8469] docs: merge function walkthrough into quickstart --- docs/userguide/functionalities_rewrite.txt | 131 --------------------- docs/userguide/quickstart.txt | 131 +++++++++++++++++++++ 2 files changed, 131 insertions(+), 131 deletions(-) diff --git a/docs/userguide/functionalities_rewrite.txt b/docs/userguide/functionalities_rewrite.txt index 1cd3dee994..d0997ca67d 100644 --- a/docs/userguide/functionalities_rewrite.txt +++ b/docs/userguide/functionalities_rewrite.txt @@ -6,135 +6,4 @@ Using setuptools to package and distribute your project build and distribute your python package. Here we provide an overview on the commonly used ones. -Automatic package discovery -=========================== -For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -, it can be a big burden to keep the package list updated. setuptools therefore -provides tools to ease the burden. - -``find_packages()`` takes a source directory and two lists of package name -patterns to exclude and include. It then walks the target directory, filtering -by inclusion patterns, and return a list of Python packages (any directory). -Finally, exclusion patterns are applied to remove matching packages. - -For example:: - #... - from setuptools import find_packages() - - setup( - #..., - packages = find_packages() - ) - -For more details and advanced use, go to :ref:`package_discovery` - -Entry points and automatic script creation -=========================================== - -Setuptools support automatic creation of scripts upon installation, that runs -code within your package if you specify them with the ``entry_point`` keyword. -This is what allows you to run commands like ``pip install`` instead of having -to type ``python -m pip install``. To accomplish this, consider the following -example:: - - setup( - #.... - entry_points={ - "console_scripts": [ - "foo = my_package.some_module:main_func", - ], - } - ) - -When this project is installed, a ``foo`` script will be installed and will -invoke the ``main_func`` when called by the user. For detailed usage, including -managing the additional or optional dependencies, go to :ref:`entry_point`. - -Dependency management -===================== - -``setuptools`` supports automatically installing dependencies when a package is -installed. The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers:: - - setup( - #... - install_requires = "docutils >= 0.3" - ) - -When your project is installed, either by using pip, ``setup.py install``, -or ``setup.py develop``, all of the dependencies not already installed will -be located (via PyPI), downloaded, built (if necessary), and installed. - -For more advanced use, see :ref:`dependencies` - -Including Data Files -==================== - -The distutils have traditionally allowed installation of "data files", which -are placed in a platform-specific location. Setuptools offers three ways to -specify data files to be included in your packages. For the simpliest use, you -can simply use the ``include_package_data`` keyword e.g.:: - - setup( - ... - include_package_data=True - ) - -This tells setuptools to install any data files it finds in your packages. -The data files must be specified via the distutils' ``MANIFEST.in`` file. - -For more details, see :ref:`datafiles` - -Development mode -================ - -Setuptools allows you to deploy your projects for use in a common directory or -staging area, but without copying any files. Thus, you can edit each project's -code in its checkout directory, and only need to run build commands when you -change a project's C extensions or similarly compiled files. - -To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install``, except that it doesn't actually install anything. -Instead, it creates a special ``.egg-link`` file in the deployment directory, -that links to your project's source code. And, if your deployment directory is -Python's ``site-packages`` directory, it will also update the -``easy-install.pth`` file to include your project's source code, thereby making -it available on ``sys.path`` for all programs using that Python installation. - -for more information, go to :ref:`development_mode` - -Distributing a ``setuptools``-based project -=========================================== -Before you begin, make sure you have the latest versions of setuptools and wheel:: - - pip install --upgrade setuptools wheel - -To build a setuptools project, run this command from the same directory where -setup.py is located:: - - setup.py sdist bdist_wheel - -This will generate distribution archives in the `dist` directory. - -Before you upload the generated archives make sure you're registered on -https://test.pypi.org/account/register/. You will also need to verify your email -to be able to upload any packages. -You should install twine to be able to upload packages:: - - pip install --upgrade twine - -Now, to upload these archives, run:: - - twine upload --repository-url https://test.pypi.org/legacy/ dist/* - -To install your newly uploaded package ``example_pkg``, you can use pip:: - - pip install --index-url https://test.pypi.org/simple/ example_pkg - -The next following sections will walk you through all of the available functions -``setuptools`` offers in excrutiating details (including those already mentioned) -for more advanced use. diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 535227a0e3..4a851ee3ee 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -74,6 +74,137 @@ dependencies, and perhaps some data files and scripts:: # could also include long_description, download_url, etc. ) +Automatic package discovery +=========================== +For simple projects, it's usually easy enough to manually add packages to +the ``packages`` argument of ``setup()``. However, for very large projects +, it can be a big burden to keep the package list updated. setuptools therefore +provides tools to ease the burden. + +``find_packages()`` takes a source directory and two lists of package name +patterns to exclude and include. It then walks the target directory, filtering +by inclusion patterns, and return a list of Python packages (any directory). +Finally, exclusion patterns are applied to remove matching packages. + +For example:: + #... + from setuptools import find_packages() + + setup( + #..., + packages = find_packages() + ) + +For more details and advanced use, go to :ref:`package_discovery` + +Entry points and automatic script creation +=========================================== + +Setuptools support automatic creation of scripts upon installation, that runs +code within your package if you specify them with the ``entry_point`` keyword. +This is what allows you to run commands like ``pip install`` instead of having +to type ``python -m pip install``. To accomplish this, consider the following +example:: + + setup( + #.... + entry_points={ + "console_scripts": [ + "foo = my_package.some_module:main_func", + ], + } + ) + +When this project is installed, a ``foo`` script will be installed and will +invoke the ``main_func`` when called by the user. For detailed usage, including +managing the additional or optional dependencies, go to :ref:`entry_point`. + +Dependency management +===================== + +``setuptools`` supports automatically installing dependencies when a package is +installed. The simplest way to include requirement specifiers is to use the +``install_requires`` argument to ``setup()``. It takes a string or list of +strings containing requirement specifiers:: + + setup( + #... + install_requires = "docutils >= 0.3" + ) + +When your project is installed, either by using pip, ``setup.py install``, +or ``setup.py develop``, all of the dependencies not already installed will +be located (via PyPI), downloaded, built (if necessary), and installed. + +For more advanced use, see :ref:`dependencies` + +Including Data Files +==================== + +The distutils have traditionally allowed installation of "data files", which +are placed in a platform-specific location. Setuptools offers three ways to +specify data files to be included in your packages. For the simpliest use, you +can simply use the ``include_package_data`` keyword e.g.:: + + setup( + ... + include_package_data=True + ) + +This tells setuptools to install any data files it finds in your packages. +The data files must be specified via the distutils' ``MANIFEST.in`` file. + +For more details, see :ref:`datafiles` + +Development mode +================ + +Setuptools allows you to deploy your projects for use in a common directory or +staging area, but without copying any files. Thus, you can edit each project's +code in its checkout directory, and only need to run build commands when you +change a project's C extensions or similarly compiled files. + +To do this, use the ``setup.py develop`` command. It works very similarly to +``setup.py install``, except that it doesn't actually install anything. +Instead, it creates a special ``.egg-link`` file in the deployment directory, +that links to your project's source code. And, if your deployment directory is +Python's ``site-packages`` directory, it will also update the +``easy-install.pth`` file to include your project's source code, thereby making +it available on ``sys.path`` for all programs using that Python installation. + +for more information, go to :ref:`development_mode` + +Distributing a ``setuptools``-based project +=========================================== +Before you begin, make sure you have the latest versions of setuptools and wheel:: + + pip install --upgrade setuptools wheel + +To build a setuptools project, run this command from the same directory where +setup.py is located:: + + setup.py sdist bdist_wheel + +This will generate distribution archives in the `dist` directory. + +Before you upload the generated archives make sure you're registered on +https://test.pypi.org/account/register/. You will also need to verify your email +to be able to upload any packages. +You should install twine to be able to upload packages:: + + pip install --upgrade twine + +Now, to upload these archives, run:: + + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +To install your newly uploaded package ``example_pkg``, you can use pip:: + + pip install --index-url https://test.pypi.org/simple/ example_pkg + +The next following sections will walk you through all of the available functions +``setuptools`` offers in excrutiating details (including those already mentioned) +for more advanced use. From 5d0859f38e2524cc4e5dd4f8492cd37622dc58a1 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 11:27:02 -0400 Subject: [PATCH 7851/8469] docs: update userguide index --- docs/userguide/index.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index 4d7bb2a7c1..0fa32fd2ff 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -13,8 +13,14 @@ ordinary Python packages based on the ``distutils``. .. toctree:: :maxdepth: 1 - Quickstart - Functionalities - Declarative config - keyword reference - Command reference + quickstart + package_discovery + entry_point + dependencies_management + datafiles + development_mode + distribution + extension + declarative_config + keywords + commands From c0794ed0d6dbeec85e366984db1496747aaaefc1 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:36:20 -0400 Subject: [PATCH 7852/8469] docs: udpate title of quickstart --- docs/userguide/quickstart.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 4a851ee3ee..fb40b12a9e 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -1,5 +1,9 @@ -Installing ``setuptools`` -========================= +========================== +``setuptools`` Quickstart +========================== + +Installation +============ .. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ @@ -12,8 +16,8 @@ Refer to `Installing Packages`_ guide for more information. Basic Use ========= -For basic use of setuptools, just import things from setuptools instead of -the distutils. Here's a minimal setup script using setuptools:: +For basic use of setuptools, just import things from setuptools. Here's a +minimal setup script using setuptools:: from setuptools import setup, find_packages setup( From 6c6568dbf406597ffd6bd1e77ec3081b70992f7c Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:36:37 -0400 Subject: [PATCH 7853/8469] docs: dedicate file for package discovery --- docs/userguide/package_discovery.txt | 169 +++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docs/userguide/package_discovery.txt diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt new file mode 100644 index 0000000000..722f6fcd12 --- /dev/null +++ b/docs/userguide/package_discovery.txt @@ -0,0 +1,169 @@ +=================== +Package Discovery +=================== + + + +Using ``find_packages()`` +------------------------- + +For simple projects, it's usually easy enough to manually add packages to +the ``packages`` argument of ``setup()``. However, for very large projects +(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the +package list updated. That's what ``setuptools.find_packages()`` is for. + +``find_packages()`` takes a source directory and two lists of package name +patterns to exclude and include. If omitted, the source directory defaults to +the same +directory as the setup script. Some projects use a ``src`` or ``lib`` +directory as the root of their source tree, and those projects would of course +use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And +such projects also need something like ``package_dir={"": "src"}`` in their +``setup()`` arguments, but that's just a normal distutils thing.) + +Anyway, ``find_packages()`` walks the target directory, filtering by inclusion +patterns, and finds Python packages (any directory). Packages are only +recognized if they include an ``__init__.py`` file. Finally, exclusion +patterns are applied to remove matching packages. + +Inclusion and exclusion patterns are package names, optionally including +wildcards. For +example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose +last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", +"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, +but it still won't exclude a top-level ``tests`` package or the children +thereof. In fact, if you really want no ``tests`` packages at all, you'll need +something like this:: + + find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) + +in order to cover all the bases. Really, the exclusion patterns are intended +to cover simpler use cases than this, like excluding a single, specified +package and its subpackages. + +Regardless of the parameters, the ``find_packages()`` +function returns a list of package names suitable for use as the ``packages`` +argument to ``setup()``, and so is usually the easiest way to set that +argument in your setup script. Especially since it frees you from having to +remember to modify your setup script whenever your project grows additional +top-level packages or subpackages. + +``find_namespace_packages()`` +----------------------------- +In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant +of ``find_packages``, which has the same function signature as +``find_packages``, but works with `PEP 420`_ compliant implicit namespace +packages. Here is a minimal setup script using ``find_namespace_packages``:: + + from setuptools import setup, find_namespace_packages + setup( + name="HelloWorld", + version="0.1", + packages=find_namespace_packages(), + ) + + +Keep in mind that according to PEP 420, you may have to either re-organize your +codebase a bit or define a few exclusions, as the definition of an implicit +namespace package is quite lenient, so for a project organized like so:: + + + ├── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + ├── setup.py + └── tests + └── test_mod1.py + +A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a +top-level package called ``tests``! One way to avoid this problem is to use the +``include`` keyword to whitelist the packages to include, like so:: + + from setuptools import setup, find_namespace_packages + + setup( + name="namespace.mypackage", + version="0.1", + packages=find_namespace_packages(include=["namespace.*"]) + ) + +Another option is to use the "src" layout, where all package code is placed in +the ``src`` directory, like so:: + + + ├── setup.py + ├── src + │   └── namespace + │   └── mypackage + │   ├── __init__.py + │   └── mod1.py + └── tests + └── test_mod1.py + +With this layout, the package directory is specified as ``src``, as such:: + + setup(name="namespace.mypackage", + version="0.1", + package_dir={"": "src"}, + packages=find_namespace_packages(where="src")) + +.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ + + +Namespace Packages +------------------ + +Sometimes, a large package is more useful if distributed as a collection of +smaller eggs. However, Python does not normally allow the contents of a +package to be retrieved from more than one location. "Namespace packages" +are a solution for this problem. When you declare a package to be a namespace +package, it means that the package has no meaningful contents in its +``__init__.py``, and that it is merely a container for modules and subpackages. + +The ``pkg_resources`` runtime will then automatically ensure that the contents +of namespace packages that are spread over multiple eggs or directories are +combined into a single "virtual" package. + +The ``namespace_packages`` argument to ``setup()`` lets you declare your +project's namespace packages, so that they will be included in your project's +metadata. The argument should list the namespace packages that the egg +participates in. For example, the ZopeInterface project might do this:: + + setup( + # ... + namespace_packages=["zope"] + ) + +because it contains a ``zope.interface`` package that lives in the ``zope`` +namespace package. Similarly, a project for a standalone ``zope.publisher`` +would also declare the ``zope`` namespace package. When these projects are +installed and used, Python will see them both as part of a "virtual" ``zope`` +package, even though they will be installed in different locations. + +Namespace packages don't have to be top-level packages. For example, Zope 3's +``zope.app`` package is a namespace package, and in the future PEAK's +``peak.util`` package will be too. + +Note, by the way, that your project's source tree must include the namespace +packages' ``__init__.py`` files (and the ``__init__.py`` of any parent +packages), in a normal Python package layout. These ``__init__.py`` files +*must* contain the line:: + + __import__("pkg_resources").declare_namespace(__name__) + +This code ensures that the namespace package machinery is operating and that +the current package is registered as a namespace package. + +You must NOT include any other code and data in a namespace package's +``__init__.py``. Even though it may appear to work during development, or when +projects are installed as ``.egg`` files, it will not work when the projects +are installed using "system" packaging tools -- in such cases the +``__init__.py`` files will not be installed, let alone executed. + +You must include the ``declare_namespace()`` line in the ``__init__.py`` of +*every* project that has contents for the namespace package in question, in +order to ensure that the namespace will be declared regardless of which +project's copy of ``__init__.py`` is loaded first. If the first loaded +``__init__.py`` doesn't declare it, it will never *be* declared, because no +other copies will ever be loaded! \ No newline at end of file From 127cfdfb9a01cfe12a7e6d8bf81aa04c56c2d5f1 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:37:17 -0400 Subject: [PATCH 7854/8469] docs: udpate package_discovery.txt --- docs/userguide/package_discovery.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt index 722f6fcd12..8ba12cdf3c 100644 --- a/docs/userguide/package_discovery.txt +++ b/docs/userguide/package_discovery.txt @@ -2,15 +2,27 @@ Package Discovery =================== +``Setuptools`` provide powerful tools to handle package discovery, including +support for namespace package. The following explain how you include package +in your ``setup`` script:: + + setup( + packages = ['mypkg1', 'mypkg2'] + ) + +To speed things up, we introduce two functions provided by setuptools:: + + from setuptools import find_packages + +or:: + + from setuptools import find_namespace_packages Using ``find_packages()`` ------------------------- -For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the -package list updated. That's what ``setuptools.find_packages()`` is for. +Let's start with the first tool. ``find_packages()`` takes a source directory and two lists of package name patterns to exclude and include. If omitted, the source directory defaults to @@ -166,4 +178,4 @@ You must include the ``declare_namespace()`` line in the ``__init__.py`` of order to ensure that the namespace will be declared regardless of which project's copy of ``__init__.py`` is loaded first. If the first loaded ``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded! \ No newline at end of file +other copies will ever be loaded! From 092aec60cb0a947a4030c9fd7c231e6c82ff88e5 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:38:09 -0400 Subject: [PATCH 7855/8469] docs: dedicate a file for entry points --- docs/userguide/entry_point.txt | 115 +++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 docs/userguide/entry_point.txt diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt new file mode 100644 index 0000000000..18211a72c9 --- /dev/null +++ b/docs/userguide/entry_point.txt @@ -0,0 +1,115 @@ +========================================== +Entry Points and Automatic Script Creation +========================================== + +Packaging and installing scripts can be a bit awkward with the distutils. For +one thing, there's no easy way to have a script's filename match local +conventions on both Windows and POSIX platforms. For another, you often have +to create a separate file just for the "main" script, when your actual "main" +is a function in a module somewhere. And even in Python 2.4, using the ``-m`` +option only works for actual ``.py`` files that aren't installed in a package. + +``setuptools`` fixes all of these problems by automatically generating scripts +for you with the correct extension, and on Windows it will even create an +``.exe`` file so that users don't have to change their ``PATHEXT`` settings. +The way to use this feature is to define "entry points" in your setup script +that indicate what function the generated script should import and run. For +example, to create two console scripts called ``foo`` and ``bar``, and a GUI +script called ``baz``, you might do something like this:: + + setup( + # other arguments here... + entry_points={ + "console_scripts": [ + "foo = my_package.some_module:main_func", + "bar = other_module:some_func", + ], + "gui_scripts": [ + "baz = my_package_gui:start_func", + ] + } + ) + +When this project is installed on non-Windows platforms (using "setup.py +install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, +and ``baz`` scripts will be installed that import ``main_func`` and +``some_func`` from the specified modules. The functions you specify are +called with no arguments, and their return value is passed to +``sys.exit()``, so you can return an errorlevel or message to print to +stderr. + +On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are +created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The +``.exe`` wrappers find and execute the right version of Python to run the +``.py`` or ``.pyw`` file. + +You may define as many "console script" and "gui script" entry points as you +like, and each one can optionally specify "extras" that it depends on, that +will be added to ``sys.path`` when the script is run. For more information on +"extras", see the section below on `Declaring Extras`_. For more information +on "entry points" in general, see the section below on `Dynamic Discovery of +Services and Plugins`_. + + +Dynamic Discovery of Services and Plugins +----------------------------------------- + +``setuptools`` supports creating libraries that "plug in" to extensible +applications and frameworks, by letting you register "entry points" in your +project that can be imported by the application or framework. + +For example, suppose that a blogging tool wants to support plugins +that provide translation for various file types to the blog's output format. +The framework might define an "entry point group" called ``blogtool.parsers``, +and then allow plugins to register entry points for the file extensions they +support. + +This would allow people to create distributions that contain one or more +parsers for different file types, and then the blogging tool would be able to +find the parsers at runtime by looking up an entry point for the file +extension (or mime type, or however it wants to). + +Note that if the blogging tool includes parsers for certain file formats, it +can register these as entry points in its own setup script, which means it +doesn't have to special-case its built-in formats. They can just be treated +the same as any other plugin's entry points would be. + +If you're creating a project that plugs in to an existing application or +framework, you'll need to know what entry points or entry point groups are +defined by that application or framework. Then, you can register entry points +in your setup script. Here are a few examples of ways you might register an +``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, +for our hypothetical blogging tool:: + + setup( + # ... + entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} + ) + + setup( + # ... + entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} + ) + + setup( + # ... + entry_points=""" + [blogtool.parsers] + .rst = some.nested.module:SomeClass.some_classmethod [reST] + """, + extras_require=dict(reST="Docutils>=0.3.5") + ) + +The ``entry_points`` argument to ``setup()`` accepts either a string with +``.ini``-style sections, or a dictionary mapping entry point group names to +either strings or lists of strings containing entry point specifiers. An +entry point specifier consists of a name and value, separated by an ``=`` +sign. The value consists of a dotted module name, optionally followed by a +``:`` and a dotted identifier naming an object within the module. It can +also include a bracketed list of "extras" that are required for the entry +point to be used. When the invoking application or framework requests loading +of an entry point, any requirements implied by the associated extras will be +passed to ``pkg_resources.require()``, so that an appropriate error message +can be displayed if the needed package(s) are missing. (Of course, the +invoking app or framework can ignore such errors if it wants to make an entry +point optional if a requirement isn't installed.) \ No newline at end of file From 385b40d5640ea8262245411eb0c43f67af4eb2a4 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:39:30 -0400 Subject: [PATCH 7856/8469] docs: update userguide index to match filename --- docs/userguide/index.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index 0fa32fd2ff..ae9c9d77ae 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -16,8 +16,8 @@ ordinary Python packages based on the ``distutils``. quickstart package_discovery entry_point - dependencies_management - datafiles + dependency_management + data_files development_mode distribution extension From 34f1fa1b86a63f3021ccb7f842220d8b011c9e1d Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:39:48 -0400 Subject: [PATCH 7857/8469] docs: dedicate a file for dependency management --- docs/userguide/dependency_management.txt | 255 +++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 docs/userguide/dependency_management.txt diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt new file mode 100644 index 0000000000..18ba952f4f --- /dev/null +++ b/docs/userguide/dependency_management.txt @@ -0,0 +1,255 @@ +===================================== +Dependencies Management in Setuptools +===================================== + +Declaring Dependencies +====================== + +``setuptools`` supports automatically installing dependencies when a package is +installed, and including information about dependencies in Python Eggs (so that +package management tools like pip can use the information). + +``setuptools`` and ``pkg_resources`` use a common syntax for specifying a +project's required dependencies. This syntax consists of a project's PyPI +name, optionally followed by a comma-separated list of "extras" in square +brackets, optionally followed by a comma-separated list of version +specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, +``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be +separated by whitespace, but any whitespace or nonstandard characters within a +project name or version identifier must be replaced with ``-``. + +Version specifiers for a given project are internally sorted into ascending +version order, and used to establish what ranges of versions are acceptable. +Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes +``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from +the ranges they fall within. A project's version is then checked for +membership in the resulting ranges. (Note that providing conflicting conditions +for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may +therefore produce bizarre results.) + +Here are some example requirement specifiers:: + + docutils >= 0.3 + + # comment lines and \ continuations are allowed in requirement strings + BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ + ==1.6, ==1.7 # and so are line-end comments + + PEAK[FastCGI, reST]>=0.5a4 + + setuptools==0.5a7 + +The simplest way to include requirement specifiers is to use the +``install_requires`` argument to ``setup()``. It takes a string or list of +strings containing requirement specifiers. If you include more than one +requirement in a string, each requirement must begin on a new line. + +This has three effects: + +1. When your project is installed, either by using pip, ``setup.py install``, + or ``setup.py develop``, all of the dependencies not already installed will + be located (via PyPI), downloaded, built (if necessary), and installed. + +2. Any scripts in your project will be installed with wrappers that verify + the availability of the specified dependencies at runtime, and ensure that + the correct versions are added to ``sys.path`` (e.g. if multiple versions + have been installed). + +3. Python Egg distributions will include a metadata file listing the + dependencies. + +Note, by the way, that if you declare your dependencies in ``setup.py``, you do +*not* need to use the ``require()`` function in your scripts or modules, as +long as you either install the project or use ``setup.py develop`` to do +development work on it. (See `"Development Mode"`_ below for more details on +using ``setup.py develop``.) + +Dependencies that aren't in PyPI +-------------------------------- + +.. warning:: + Dependency links support has been dropped by pip starting with version + 19.0 (released 2019-01-22). + +If your project depends on packages that don't exist on PyPI, you may still be +able to depend on them, as long as they are available for download as: + +- an egg, in the standard distutils ``sdist`` format, +- a single ``.py`` file, or +- a VCS repository (Subversion, Mercurial, or Git). + +You just need to add some URLs to the ``dependency_links`` argument to +``setup()``. + +The URLs must be either: + +1. direct download URLs, +2. the URLs of web pages that contain direct download links, or +3. the repository's URL + +In general, it's better to link to web pages, because it is usually less +complex to update a web page than to release a new version of your project. +You can also use a SourceForge ``showfiles.php`` link in the case where a +package you depend on is distributed via SourceForge. + +If you depend on a package that's distributed as a single ``.py`` file, you +must include an ``"#egg=project-version"`` suffix to the URL, to give a project +name and version number. (Be sure to escape any dashes in the name or version +by replacing them with underscores.) EasyInstall will recognize this suffix +and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file +as an egg. + +In the case of a VCS checkout, you should also append ``#egg=project-version`` +in order to identify for what package that checkout should be used. You can +append ``@REV`` to the URL's path (before the fragment) to specify a revision. +Additionally, you can also force the VCS being used by prepending the URL with +a certain prefix. Currently available are: + +- ``svn+URL`` for Subversion, +- ``git+URL`` for Git, and +- ``hg+URL`` for Mercurial + +A more complete example would be: + + ``vcs+proto://host/path@revision#egg=project-version`` + +Be careful with the version. It should match the one inside the project files. +If you want to disregard the version, you have to omit it both in the +``requires`` and in the URL's fragment. + +This will do a checkout (or a clone, in Git and Mercurial parlance) to a +temporary folder and run ``setup.py bdist_egg``. + +The ``dependency_links`` option takes the form of a list of URL strings. For +example, this will cause a search of the specified page for eggs or source +distributions, if the package's dependencies aren't already installed:: + + setup( + ... + dependency_links=[ + "http://peak.telecommunity.com/snapshots/" + ], + ) + + +.. _Declaring Extras: + + +Declaring "Extras" (optional features with their own dependencies) +------------------------------------------------------------------ + +Sometimes a project has "recommended" dependencies, that are not required for +all uses of the project. For example, a project might offer optional PDF +output if ReportLab is installed, and reStructuredText support if docutils is +installed. These optional features are called "extras", and setuptools allows +you to define their requirements as well. In this way, other projects that +require these optional features can force the additional requirements to be +installed, by naming the desired extras in their ``install_requires``. + +For example, let's say that Project A offers optional PDF and reST support:: + + setup( + name="Project-A", + ... + extras_require={ + "PDF": ["ReportLab>=1.2", "RXP"], + "reST": ["docutils>=0.3"], + } + ) + +As you can see, the ``extras_require`` argument takes a dictionary mapping +names of "extra" features, to strings or lists of strings describing those +features' requirements. These requirements will *not* be automatically +installed unless another package depends on them (directly or indirectly) by +including the desired "extras" in square brackets after the associated project +name. (Or if the extras were listed in a requirement spec on the "pip install" +command line.) + +Extras can be used by a project's `entry points`_ to specify dynamic +dependencies. For example, if Project A includes a "rst2pdf" script, it might +declare it like this, so that the "PDF" requirements are only resolved if the +"rst2pdf" script is run:: + + setup( + name="Project-A", + ... + entry_points={ + "console_scripts": [ + "rst2pdf = project_a.tools.pdfgen [PDF]", + "rst2html = project_a.tools.htmlgen", + # more script entry points ... + ], + } + ) + +Projects can also use another project's extras when specifying dependencies. +For example, if project B needs "project A" with PDF support installed, it +might declare the dependency like this:: + + setup( + name="Project-B", + install_requires=["Project-A[PDF]"], + ... + ) + +This will cause ReportLab to be installed along with project A, if project B is +installed -- even if project A was already installed. In this way, a project +can encapsulate groups of optional "downstream dependencies" under a feature +name, so that packages that depend on it don't have to know what the downstream +dependencies are. If a later version of Project A builds in PDF support and +no longer needs ReportLab, or if it ends up needing other dependencies besides +ReportLab in order to provide PDF support, Project B's setup information does +not need to change, but the right packages will still be installed if needed. + +Note, by the way, that if a project ends up not needing any other packages to +support a feature, it should keep an empty requirements list for that feature +in its ``extras_require`` argument, so that packages depending on that feature +don't break (due to an invalid feature name). For example, if Project A above +builds in PDF support and no longer needs ReportLab, it could change its +setup to this:: + + setup( + name="Project-A", + ... + extras_require={ + "PDF": [], + "reST": ["docutils>=0.3"], + } + ) + +so that Package B doesn't have to remove the ``[PDF]`` from its requirement +specifier. + +.. _Platform Specific Dependencies: + + +Declaring platform specific dependencies +---------------------------------------- + +Sometimes a project might require a dependency to run on a specific platform. +This could to a package that back ports a module so that it can be used in +older python versions. Or it could be a package that is required to run on a +specific operating system. This will allow a project to work on multiple +different platforms without installing dependencies that are not required for +a platform that is installing the project. + +For example, here is a project that uses the ``enum`` module and ``pywin32``:: + + setup( + name="Project", + ... + install_requires=[ + "enum34;python_version<'3.4'", + "pywin32 >= 1.0;platform_system=='Windows'" + ] + ) + +Since the ``enum`` module was added in Python 3.4, it should only be installed +if the python version is earlier. Since ``pywin32`` will only be used on +windows, it should only be installed when the operating system is Windows. +Specifying version requirements for the dependencies is supported as normal. + +The environmental markers that may be used for testing platform types are +detailed in `PEP 508`_. + +.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ From bf6e567a736943ae5d54f21b59005b900c909a28 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:40:46 -0400 Subject: [PATCH 7858/8469] docs: udpate quickstart to match ref file --- docs/userguide/quickstart.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index fb40b12a9e..e75d74e181 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -141,7 +141,7 @@ When your project is installed, either by using pip, ``setup.py install``, or ``setup.py develop``, all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed. -For more advanced use, see :ref:`dependencies` +For more advanced use, see :ref:`dependency_management` Including Data Files ==================== @@ -210,5 +210,3 @@ To install your newly uploaded package ``example_pkg``, you can use pip:: The next following sections will walk you through all of the available functions ``setuptools`` offers in excrutiating details (including those already mentioned) for more advanced use. - - From 503d22a209159b9ad990da7ecc5445496f8b2cd7 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:41:14 -0400 Subject: [PATCH 7859/8469] docs: dedicate a file for development mode --- docs/userguide/development_mode.txt | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/userguide/development_mode.txt diff --git a/docs/userguide/development_mode.txt b/docs/userguide/development_mode.txt new file mode 100644 index 0000000000..9d4e758155 --- /dev/null +++ b/docs/userguide/development_mode.txt @@ -0,0 +1,60 @@ +"Development Mode" +================== + +Under normal circumstances, the ``distutils`` assume that you are going to +build a distribution of your project, not use it in its "raw" or "unbuilt" +form. If you were to use the ``distutils`` that way, you would have to rebuild +and reinstall your project every time you made a change to it during +development. + +Another problem that sometimes comes up with the ``distutils`` is that you may +need to do development on two related projects at the same time. You may need +to put both projects' packages in the same directory to run them, but need to +keep them separate for revision control purposes. How can you do this? + +Setuptools allows you to deploy your projects for use in a common directory or +staging area, but without copying any files. Thus, you can edit each project's +code in its checkout directory, and only need to run build commands when you +change a project's C extensions or similarly compiled files. You can even +deploy a project into another project's checkout directory, if that's your +preferred way of working (as opposed to using a common independent staging area +or the site-packages directory). + +To do this, use the ``setup.py develop`` command. It works very similarly to +``setup.py install``, except that it doesn't actually install anything. +Instead, it creates a special ``.egg-link`` file in the deployment directory, +that links to your project's source code. And, if your deployment directory is +Python's ``site-packages`` directory, it will also update the +``easy-install.pth`` file to include your project's source code, thereby making +it available on ``sys.path`` for all programs using that Python installation. + +If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` +will not link directly to your source code when run under Python 3, since +that source code would be made for Python 2 and not work under Python 3. +Instead the ``setup.py develop`` will build Python 3 code under the ``build`` +directory, and link there. This means that after doing code changes you will +have to run ``setup.py build`` before these changes are picked up by your +Python 3 installation. + +In addition, the ``develop`` command creates wrapper scripts in the target +script directory that will run your in-development scripts after ensuring that +all your ``install_requires`` packages are available on ``sys.path``. + +You can deploy the same project to multiple staging areas, e.g. if you have +multiple projects on the same machine that are sharing the same project you're +doing development work. + +When you're done with a given development task, you can remove the project +source from a staging area using ``setup.py develop --uninstall``, specifying +the desired staging area if it's not the default. + +There are several options to control the precise behavior of the ``develop`` +command; see the section on the `develop`_ command below for more details. + +Note that you can also apply setuptools commands to non-setuptools projects, +using commands like this:: + + python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop + +That is, you can simply list the normal setup commands and options following +the quoted part. \ No newline at end of file From 6f43f47eb62ec6ac0a63b6fd1487192b10b1438b Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:41:56 -0400 Subject: [PATCH 7860/8469] docs: update index to match filename --- docs/userguide/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/index.txt b/docs/userguide/index.txt index ae9c9d77ae..abee331a2f 100644 --- a/docs/userguide/index.txt +++ b/docs/userguide/index.txt @@ -17,7 +17,7 @@ ordinary Python packages based on the ``distutils``. package_discovery entry_point dependency_management - data_files + datafiles development_mode distribution extension From 7b4f1b0f23c445583d96e826a9040769dd8f5e49 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:42:13 -0400 Subject: [PATCH 7861/8469] docs: dedicate a file for datafiles support --- docs/userguide/datafiles.txt | 174 +++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 docs/userguide/datafiles.txt diff --git a/docs/userguide/datafiles.txt b/docs/userguide/datafiles.txt new file mode 100644 index 0000000000..315ec7245d --- /dev/null +++ b/docs/userguide/datafiles.txt @@ -0,0 +1,174 @@ +==================== +Data Files Support +==================== + +The distutils have traditionally allowed installation of "data files", which +are placed in a platform-specific location. However, the most common use case +for data files distributed with a package is for use *by* the package, usually +by including the data files in the package directory. + +Setuptools offers three ways to specify data files to be included in your +packages. First, you can simply use the ``include_package_data`` keyword, +e.g.:: + + from setuptools import setup, find_packages + setup( + ... + include_package_data=True + ) + +This tells setuptools to install any data files it finds in your packages. +The data files must be specified via the distutils' ``MANIFEST.in`` file. +(They can also be tracked by a revision control system, using an appropriate +plugin. See the section below on `Adding Support for Revision Control +Systems`_ for information on how to write such plugins.) + +If you want finer-grained control over what files are included (for example, +if you have documentation files in your package directories and want to exclude +them from installation), then you can also use the ``package_data`` keyword, +e.g.:: + + from setuptools import setup, find_packages + setup( + ... + package_data={ + # If any package contains *.txt or *.rst files, include them: + "": ["*.txt", "*.rst"], + # And include any *.msg files found in the "hello" package, too: + "hello": ["*.msg"], + } + ) + +The ``package_data`` argument is a dictionary that maps from package names to +lists of glob patterns. The globs may include subdirectory names, if the data +files are contained in a subdirectory of the package. For example, if the +package tree looks like this:: + + setup.py + src/ + mypkg/ + __init__.py + mypkg.txt + data/ + somefile.dat + otherdata.dat + +The setuptools setup file might look like this:: + + from setuptools import setup, find_packages + setup( + ... + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src + + package_data={ + # If any package contains *.txt files, include them: + "": ["*.txt"], + # And include any *.dat files found in the "data" subdirectory + # of the "mypkg" package, also: + "mypkg": ["data/*.dat"], + } + ) + +Notice that if you list patterns in ``package_data`` under the empty string, +these patterns are used to find files in every package, even ones that also +have their own patterns listed. Thus, in the above example, the ``mypkg.txt`` +file gets included even though it's not listed in the patterns for ``mypkg``. + +Also notice that if you use paths, you *must* use a forward slash (``/``) as +the path separator, even if you are on Windows. Setuptools automatically +converts slashes to appropriate platform-specific separators at build time. + +If datafiles are contained in a subdirectory of a package that isn't a package +itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required +in the ``package_data`` argument (as shown above with ``"data/*.dat"``). + +When building an ``sdist``, the datafiles are also drawn from the +``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if +the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. + +(Note: although the ``package_data`` argument was previously only available in +``setuptools``, it was also added to the Python ``distutils`` package as of +Python 2.4; there is `some documentation for the feature`__ available on the +python.org website. If using the setuptools-specific ``include_package_data`` +argument, files specified by ``package_data`` will *not* be automatically +added to the manifest unless they are listed in the MANIFEST.in file.) + +__ https://docs.python.org/3/distutils/setupscript.html#installing-package-data + +Sometimes, the ``include_package_data`` or ``package_data`` options alone +aren't sufficient to precisely define what files you want included. For +example, you may want to include package README files in your revision control +system and source distributions, but exclude them from being installed. So, +setuptools offers an ``exclude_package_data`` option as well, that allows you +to do things like this:: + + from setuptools import setup, find_packages + setup( + ... + packages=find_packages("src"), # include all packages under src + package_dir={"": "src"}, # tell distutils packages are under src + + include_package_data=True, # include everything in source control + + # ...but exclude README.txt from all packages + exclude_package_data={"": ["README.txt"]}, + ) + +The ``exclude_package_data`` option is a dictionary mapping package names to +lists of wildcard patterns, just like the ``package_data`` option. And, just +as with that option, a key of ``""`` will apply the given pattern(s) to all +packages. However, any files that match these patterns will be *excluded* +from installation, even if they were listed in ``package_data`` or were +included as a result of using ``include_package_data``. + +In summary, the three options allow you to: + +``include_package_data`` + Accept all data files and directories matched by ``MANIFEST.in``. + +``package_data`` + Specify additional patterns to match files that may or may + not be matched by ``MANIFEST.in`` or found in source control. + +``exclude_package_data`` + Specify patterns for data files and directories that should *not* be + included when a package is installed, even if they would otherwise have + been included due to the use of the preceding options. + +NOTE: Due to the way the distutils build process works, a data file that you +include in your project and then stop including may be "orphaned" in your +project's build directories, requiring you to run ``setup.py clean --all`` to +fully remove them. This may also be important for your users and contributors +if they track intermediate revisions of your project using Subversion; be sure +to let them know when you make changes that remove files from inclusion so they +can run ``setup.py clean --all``. + +Accessing Data Files at Runtime +------------------------------- + +Typically, existing programs manipulate a package's ``__file__`` attribute in +order to find the location of data files. However, this manipulation isn't +compatible with PEP 302-based import hooks, including importing from zip files +and Python Eggs. It is strongly recommended that, if you are using data files, +you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access +them. The ``pkg_resources`` module is distributed as part of setuptools, so if +you're using setuptools to distribute your package, there is no reason not to +use its resource management API. See also `Importlib Resources`_ for +a quick example of converting code that uses ``__file__`` to use +``pkg_resources`` instead. + +.. _Importlib Resources: https://docs.python.org/3/library/importlib.html#module-importlib.resources + + +Non-Package Data Files +---------------------- + +Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data +files from the distribution into the egg (see `the old docs +`_). As eggs are deprecated and pip-based installs +fall back to the platform-specific location for installing data files, there is +no supported facility to reliably retrieve these resources. + +Instead, the PyPA recommends that any data files you wish to be accessible at +run time be included in the package. \ No newline at end of file From 5be9afe13040473ec2e5765920af18c85a749157 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:43:22 -0400 Subject: [PATCH 7862/8469] docs: dedicate a file for distribution guide --- docs/userguide/distribution.txt | 240 ++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 docs/userguide/distribution.txt diff --git a/docs/userguide/distribution.txt b/docs/userguide/distribution.txt new file mode 100644 index 0000000000..77ea2660e2 --- /dev/null +++ b/docs/userguide/distribution.txt @@ -0,0 +1,240 @@ +Tagging and "Daily Build" or "Snapshot" Releases +------------------------------------------------ + +When a set of related projects are under development, it may be important to +track finer-grained version increments than you would normally use for e.g. +"stable" releases. While stable releases might be measured in dotted numbers +with alpha/beta/etc. status codes, development versions of a project often +need to be tracked by revision or build number or even build date. This is +especially true when projects in development need to refer to one another, and +therefore may literally need an up-to-the-minute version of something! + +To support these scenarios, ``setuptools`` allows you to "tag" your source and +egg distributions by adding one or more of the following to the project's +"official" version identifier: + +* A manually-specified pre-release tag, such as "build" or "dev", or a + manually-specified post-release tag, such as a build or revision number + (``--tag-build=STRING, -bSTRING``) + +* An 8-character representation of the build date (``--tag-date, -d``), as + a postrelease tag + +You can add these tags by adding ``egg_info`` and the desired options to +the command line ahead of the ``sdist`` or ``bdist`` commands that you want +to generate a daily build or snapshot for. See the section below on the +`egg_info`_ command for more details. + +(Also, before you release your project, be sure to see the section above on +`Specifying Your Project's Version`_ for more information about how pre- and +post-release tags affect how version numbers are interpreted. This is +important in order to make sure that dependency processing tools will know +which versions of your project are newer than others.) + +Finally, if you are creating builds frequently, and either building them in a +downloadable location or are copying them to a distribution server, you should +probably also check out the `rotate`_ command, which lets you automatically +delete all but the N most-recently-modified distributions matching a glob +pattern. So, you can use a command line like:: + + setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 + +to build an egg whose version info includes "DEV-rNNNN" (where NNNN is the +most recent Subversion revision that affected the source tree), and then +delete any egg files from the distribution directory except for the three +that were built most recently. + +If you have to manage automated builds for multiple packages, each with +different tagging and rotation policies, you may also want to check out the +`alias`_ command, which would let each package define an alias like ``daily`` +that would perform the necessary tag, build, and rotate commands. Then, a +simpler script or cron job could just run ``setup.py daily`` in each project +directory. (And, you could also define sitewide or per-user default versions +of the ``daily`` alias, so that projects that didn't define their own would +use the appropriate defaults.) + +Generating Source Distributions +------------------------------- + +``setuptools`` enhances the distutils' default algorithm for source file +selection with pluggable endpoints for looking up files to include. If you are +using a revision control system, and your source distributions only need to +include files that you're tracking in revision control, use a corresponding +plugin instead of writing a ``MANIFEST.in`` file. See the section below on +`Adding Support for Revision Control Systems`_ for information on plugins. + +If you need to include automatically generated files, or files that are kept in +an unsupported revision control system, you'll need to create a ``MANIFEST.in`` +file to specify any files that the default file location algorithm doesn't +catch. See the distutils documentation for more information on the format of +the ``MANIFEST.in`` file. + +But, be sure to ignore any part of the distutils documentation that deals with +``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you +from these issues and doesn't work the same way in any case. Unlike the +distutils, setuptools regenerates the source distribution manifest file +every time you build a source distribution, and it builds it inside the +project's ``.egg-info`` directory, out of the way of your main project +directory. You therefore need not worry about whether it is up-to-date or not. + +Indeed, because setuptools' approach to determining the contents of a source +distribution is so much simpler, its ``sdist`` command omits nearly all of +the options that the distutils' more complex ``sdist`` process requires. For +all practical purposes, you'll probably use only the ``--formats`` option, if +you use any option at all. + + +Making "Official" (Non-Snapshot) Releases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you make an official release, creating source or binary distributions, +you will need to override the tag settings from ``setup.cfg``, so that you +don't end up registering versions like ``foobar-0.7a1.dev-r34832``. This is +easy to do if you are developing on the trunk and using tags or branches for +your releases - just make the change to ``setup.cfg`` after branching or +tagging the release, so the trunk will still produce development snapshots. + +Alternately, if you are not branching for releases, you can override the +default version options on the command line, using something like:: + + setup.py egg_info -Db "" sdist bdist_egg + +The first part of this command (``egg_info -Db ""``) will override the +configured tag information, before creating source and binary eggs. Thus, these +commands will use the plain version from your ``setup.py``, without adding the +build designation string. + +Of course, if you will be doing this a lot, you may wish to create a personal +alias for this operation, e.g.:: + + setup.py alias -u release egg_info -Db "" + +You can then use it like this:: + + setup.py release sdist bdist_egg + +Or of course you can create more elaborate aliases that do all of the above. +See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. + +Distributing Extensions compiled with Cython +-------------------------------------------- + +``setuptools`` will detect at build time whether Cython is installed or not. +If Cython is not found ``setuptools`` will ignore pyx files. + +To ensure Cython is available, include Cython in the build-requires section +of your pyproject.toml:: + + [build-system] + requires=[..., "cython"] + +Built with pip 10 or later, that declaration is sufficient to include Cython +in the build. For broader compatibility, declare the dependency in your +setup-requires of setup.cfg:: + + [options] + setup_requires = + ... + cython + +As long as Cython is present in the build environment, ``setuptools`` includes +transparent support for building Cython extensions, as +long as extensions are defined using ``setuptools.Extension``. + +If you follow these rules, you can safely list ``.pyx`` files as the source +of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` +will use it. + +Of course, for this to work, your source distributions must include the C +code generated by Cython, as well as your original ``.pyx`` files. This means +that you will probably want to include current ``.c`` files in your revision +control system, rebuilding them whenever you check changes in for the ``.pyx`` +source files. This will ensure that people tracking your project in a revision +control system will be able to build it even if they don't have Cython +installed, and that your source releases will be similarly usable with or +without Cython. + +Specifying Your Project's Version +--------------------------------- + +Setuptools can work well with most versioning schemes; there are, however, a +few special things to watch out for, in order to ensure that setuptools and +other tools can always tell what version of your package is newer than another +version. Knowing these things will also help you correctly specify what +versions of other projects your project depends on. + +A version consists of an alternating series of release numbers and pre-release +or post-release tags. A release number is a series of digits punctuated by +dots, such as ``2.4`` or ``0.5``. Each series of digits is treated +numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the +same release number, denoting the first subrelease of release 2. But ``2.10`` +is the *tenth* subrelease of release 2, and so is a different and newer release +from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also +ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. + +Following a release number, you can have either a pre-release or post-release +tag. Pre-release tags make a version be considered *older* than the version +they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, +which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make +a version be considered *newer* than the version they are appended to. So, +revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* +than ``2.4.1`` (which has a higher release number). + +A pre-release tag is a series of letters that are alphabetically before +"final". Some examples of prerelease tags would include ``alpha``, ``beta``, +``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash +before the prerelease tag if it's immediately after a number, but it's okay to +do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all +represent release candidate 1 of version ``2.4``, and are treated as identical +by setuptools. + +In addition, there are three special prerelease tags that are treated as if +they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version +``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as +``2.4c1``, and are treated as identical by setuptools. + +A post-release tag is either a series of letters that are alphabetically +greater than or equal to "final", or a dash (``-``). Post-release tags are +generally used to separate patch numbers, port numbers, build numbers, revision +numbers, or date stamps from the release number. For example, the version +``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of +version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped +post-release. + +Notice that after each pre or post-release tag, you are free to place another +release number, followed again by more pre- or post-release tags. For example, +``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- +development version of the ninth alpha of release 0.6. Notice that ``dev`` is +a pre-release tag, so this version is a *lower* version number than ``0.6a9``, +which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is +a post-release tag, so this version is *newer* than ``0.6a9.dev``. + +For the most part, setuptools' interpretation of version numbers is intuitive, +but here are a few tips that will keep you out of trouble in the corner cases: + +* Don't stick adjoining pre-release tags together without a dot or number + between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, + *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in + ``1.9a.dev``, or separate the prerelease tags with a number, as in + ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are + identical versions from setuptools' point of view, so you can use whatever + scheme you prefer. + +* If you want to be certain that your chosen numbering scheme works the way + you think it will, you can use the ``pkg_resources.parse_version()`` function + to compare different version numbers:: + + >>> from pkg_resources import parse_version + >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") + True + >>> parse_version("2.1-rc2") < parse_version("2.1") + True + >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") + True + +Once you've decided on a version numbering scheme for your project, you can +have setuptools automatically tag your in-development releases with various +pre- or post-release tags. See the following sections for more details: + +* `Tagging and "Daily Build" or "Snapshot" Releases`_ +* The `egg_info`_ command \ No newline at end of file From a99713c017c77c215c278ad759796cdf928c89b7 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:44:13 -0400 Subject: [PATCH 7863/8469] docs: dedicate a file for extending setuptools --- docs/userguide/extension.txt | 235 +++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 docs/userguide/extension.txt diff --git a/docs/userguide/extension.txt b/docs/userguide/extension.txt new file mode 100644 index 0000000000..1e4846fc92 --- /dev/null +++ b/docs/userguide/extension.txt @@ -0,0 +1,235 @@ +Creating ``distutils`` Extensions +================================= + +It can be hard to add new commands or setup arguments to the distutils. But +the ``setuptools`` package makes it a bit easier, by allowing you to distribute +a distutils extension as a separate project, and then have projects that need +the extension just refer to it in their ``setup_requires`` argument. + +With ``setuptools``, your distutils extension projects can hook in new +commands and ``setup()`` arguments just by defining "entry points". These +are mappings from command or argument names to a specification of where to +import a handler from. (See the section on `Dynamic Discovery of Services and +Plugins`_ above for some more background on entry points.) + + +Adding Commands +--------------- + +You can add new ``setup`` commands by defining entry points in the +``distutils.commands`` group. For example, if you wanted to add a ``foo`` +command, you might add something like this to your distutils extension +project's setup script:: + + setup( + # ... + entry_points={ + "distutils.commands": [ + "foo = mypackage.some_module:foo", + ], + }, + ) + +(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is +a ``setuptools.Command`` subclass.) + +Once a project containing such entry points has been activated on ``sys.path``, +(e.g. by running "install" or "develop" with a site-packages installation +directory) the command(s) will be available to any ``setuptools``-based setup +scripts. It is not necessary to use the ``--command-packages`` option or +to monkeypatch the ``distutils.command`` package to install your commands; +``setuptools`` automatically adds a wrapper to the distutils to search for +entry points in the active distributions on ``sys.path``. In fact, this is +how setuptools' own commands are installed: the setuptools project's setup +script defines entry points for them! + +Adding ``setup()`` Arguments +---------------------------- + +.. warning:: Adding arguments to setup is discouraged as such arguments + are only supported through imperative execution and not supported through + declarative config. + +Sometimes, your commands may need additional arguments to the ``setup()`` +call. You can enable this by defining entry points in the +``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` +argument called ``bar_baz``, you might add something like this to your +distutils extension project's setup script:: + + setup( + # ... + entry_points={ + "distutils.commands": [ + "foo = mypackage.some_module:foo", + ], + "distutils.setup_keywords": [ + "bar_baz = mypackage.some_module:validate_bar_baz", + ], + }, + ) + +The idea here is that the entry point defines a function that will be called +to validate the ``setup()`` argument, if it's supplied. The ``Distribution`` +object will have the initial value of the attribute set to ``None``, and the +validation function will only be called if the ``setup()`` call sets it to +a non-None value. Here's an example validation function:: + + def assert_bool(dist, attr, value): + """Verify that value is True, False, 0, or 1""" + if bool(value) != value: + raise DistutilsSetupError( + "%r must be a boolean value (got %r)" % (attr,value) + ) + +Your function should accept three arguments: the ``Distribution`` object, +the attribute name, and the attribute value. It should raise a +``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument +is invalid. Remember, your function will only be called with non-None values, +and the default value of arguments defined this way is always None. So, your +commands should always be prepared for the possibility that the attribute will +be ``None`` when they access it later. + +If more than one active distribution defines an entry point for the same +``setup()`` argument, *all* of them will be called. This allows multiple +distutils extensions to define a common argument, as long as they agree on +what values of that argument are valid. + +Also note that as with commands, it is not necessary to subclass or monkeypatch +the distutils ``Distribution`` class in order to add your arguments; it is +sufficient to define the entry points in your extension, as long as any setup +script using your extension lists your project in its ``setup_requires`` +argument. + + +Customizing Distribution Options +-------------------------------- + +Plugins may wish to extend or alter the options on a Distribution object to +suit the purposes of that project. For example, a tool that infers the +``Distribution.version`` from SCM-metadata may need to hook into the +option finalization. To enable this feature, Setuptools offers an entry +point "setuptools.finalize_distribution_options". That entry point must +be a callable taking one argument (the Distribution instance). + +If the callable has an ``.order`` property, that value will be used to +determine the order in which the hook is called. Lower numbers are called +first and the default is zero (0). + +Plugins may read, alter, and set properties on the distribution, but each +plugin is encouraged to load the configuration/settings for their behavior +independently. + + +Adding new EGG-INFO Files +------------------------- + +Some extensible applications or frameworks may want to allow third parties to +develop plugins with application or framework-specific metadata included in +the plugins' EGG-INFO directory, for easy access via the ``pkg_resources`` +metadata API. The easiest way to allow this is to create a distutils extension +to be used from the plugin projects' setup scripts (via ``setup_requires``) +that defines a new setup keyword, and then uses that data to write an EGG-INFO +file when the ``egg_info`` command is run. + +The ``egg_info`` command looks for extension points in an ``egg_info.writers`` +group, and calls them to write the files. Here's a simple example of a +distutils extension defining a setup argument ``foo_bar``, which is a list of +lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any +project that uses the argument:: + + setup( + # ... + entry_points={ + "distutils.setup_keywords": [ + "foo_bar = setuptools.dist:assert_string_list", + ], + "egg_info.writers": [ + "foo_bar.txt = setuptools.command.egg_info:write_arg", + ], + }, + ) + +This simple example makes use of two utility functions defined by setuptools +for its own use: a routine to validate that a setup keyword is a sequence of +strings, and another one that looks up a setup argument and writes it to +a file. Here's what the writer utility looks like:: + + def write_arg(cmd, basename, filename): + argname = os.path.splitext(basename)[0] + value = getattr(cmd.distribution, argname, None) + if value is not None: + value = "\n".join(value) + "\n" + cmd.write_or_delete_file(argname, filename, value) + +As you can see, ``egg_info.writers`` entry points must be a function taking +three arguments: a ``egg_info`` command instance, the basename of the file to +write (e.g. ``foo_bar.txt``), and the actual full filename that should be +written to. + +In general, writer functions should honor the command object's ``dry_run`` +setting when writing files, and use the ``distutils.log`` object to do any +console output. The easiest way to conform to this requirement is to use +the ``cmd`` object's ``write_file()``, ``delete_file()``, and +``write_or_delete_file()`` methods exclusively for your file operations. See +those methods' docstrings for more details. + +Adding Support for Revision Control Systems +------------------------------------------------- + +If the files you want to include in the source distribution are tracked using +Git, Mercurial or SVN, you can use the following packages to achieve that: + +- Git and Mercurial: `setuptools_scm `_ +- SVN: `setuptools_svn `_ + +If you would like to create a plugin for ``setuptools`` to find files tracked +by another revision control system, you can do so by adding an entry point to +the ``setuptools.file_finders`` group. The entry point should be a function +accepting a single directory name, and should yield all the filenames within +that directory (and any subdirectories thereof) that are under revision +control. + +For example, if you were going to create a plugin for a revision control system +called "foobar", you would write a function something like this: + +.. code-block:: python + + def find_files_for_foobar(dirname): + # loop to yield paths that start with `dirname` + +And you would register it in a setup script using something like this:: + + entry_points={ + "setuptools.file_finders": [ + "foobar = my_foobar_module:find_files_for_foobar", + ] + } + +Then, anyone who wants to use your plugin can simply install it, and their +local setuptools installation will be able to find the necessary files. + +It is not necessary to distribute source control plugins with projects that +simply use the other source control system, or to specify the plugins in +``setup_requires``. When you create a source distribution with the ``sdist`` +command, setuptools automatically records what files were found in the +``SOURCES.txt`` file. That way, recipients of source distributions don't need +to have revision control at all. However, if someone is working on a package +by checking out with that system, they will need the same plugin(s) that the +original author is using. + +A few important points for writing revision control file finders: + +* Your finder function MUST return relative paths, created by appending to the + passed-in directory name. Absolute paths are NOT allowed, nor are relative + paths that reference a parent directory of the passed-in directory. + +* Your finder function MUST accept an empty string as the directory name, + meaning the current directory. You MUST NOT convert this to a dot; just + yield relative paths. So, yielding a subdirectory named ``some/dir`` under + the current directory should NOT be rendered as ``./some/dir`` or + ``/somewhere/some/dir``, but *always* as simply ``some/dir`` + +* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully + with the absence of needed programs (i.e., ones belonging to the revision + control system itself. It *may*, however, use ``distutils.log.warn()`` to + inform the user of the missing program(s). \ No newline at end of file From f5c9ad1e228fb5751cb45171cd074c32890f9787 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 12:45:48 -0400 Subject: [PATCH 7864/8469] docs: dedicate a file for miscel functionalities these should be properly grouped but for now I'm just leaving them here --- docs/userguide/miscellaneous.txt | 1297 ------------------------------ 1 file changed, 1297 deletions(-) diff --git a/docs/userguide/miscellaneous.txt b/docs/userguide/miscellaneous.txt index 5946662af3..65e075cddc 100644 --- a/docs/userguide/miscellaneous.txt +++ b/docs/userguide/miscellaneous.txt @@ -1,589 +1,3 @@ -Using ``find_packages()`` -------------------------- - -For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the -package list updated. That's what ``setuptools.find_packages()`` is for. - -``find_packages()`` takes a source directory and two lists of package name -patterns to exclude and include. If omitted, the source directory defaults to -the same -directory as the setup script. Some projects use a ``src`` or ``lib`` -directory as the root of their source tree, and those projects would of course -use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir={"": "src"}`` in their -``setup()`` arguments, but that's just a normal distutils thing.) - -Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python packages (any directory). Packages are only -recognized if they include an ``__init__.py`` file. Finally, exclusion -patterns are applied to remove matching packages. - -Inclusion and exclusion patterns are package names, optionally including -wildcards. For -example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose -last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", -"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, -but it still won't exclude a top-level ``tests`` package or the children -thereof. In fact, if you really want no ``tests`` packages at all, you'll need -something like this:: - - find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) - -in order to cover all the bases. Really, the exclusion patterns are intended -to cover simpler use cases than this, like excluding a single, specified -package and its subpackages. - -Regardless of the parameters, the ``find_packages()`` -function returns a list of package names suitable for use as the ``packages`` -argument to ``setup()``, and so is usually the easiest way to set that -argument in your setup script. Especially since it frees you from having to -remember to modify your setup script whenever your project grows additional -top-level packages or subpackages. - -``find_namespace_packages()`` ------------------------------ -In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant -of ``find_packages``, which has the same function signature as -``find_packages``, but works with `PEP 420`_ compliant implicit namespace -packages. Here is a minimal setup script using ``find_namespace_packages``:: - - from setuptools import setup, find_namespace_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_namespace_packages(), - ) - - -Keep in mind that according to PEP 420, you may have to either re-organize your -codebase a bit or define a few exclusions, as the definition of an implicit -namespace package is quite lenient, so for a project organized like so:: - - - ├── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - ├── setup.py - └── tests - └── test_mod1.py - -A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a -top-level package called ``tests``! One way to avoid this problem is to use the -``include`` keyword to whitelist the packages to include, like so:: - - from setuptools import setup, find_namespace_packages - - setup( - name="namespace.mypackage", - version="0.1", - packages=find_namespace_packages(include=["namespace.*"]) - ) - -Another option is to use the "src" layout, where all package code is placed in -the ``src`` directory, like so:: - - - ├── setup.py - ├── src - │   └── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - └── tests - └── test_mod1.py - -With this layout, the package directory is specified as ``src``, as such:: - - setup(name="namespace.mypackage", - version="0.1", - package_dir={"": "src"}, - packages=find_namespace_packages(where="src")) - -.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ - -Automatic Script Creation -========================= - -Packaging and installing scripts can be a bit awkward with the distutils. For -one thing, there's no easy way to have a script's filename match local -conventions on both Windows and POSIX platforms. For another, you often have -to create a separate file just for the "main" script, when your actual "main" -is a function in a module somewhere. And even in Python 2.4, using the ``-m`` -option only works for actual ``.py`` files that aren't installed in a package. - -``setuptools`` fixes all of these problems by automatically generating scripts -for you with the correct extension, and on Windows it will even create an -``.exe`` file so that users don't have to change their ``PATHEXT`` settings. -The way to use this feature is to define "entry points" in your setup script -that indicate what function the generated script should import and run. For -example, to create two console scripts called ``foo`` and ``bar``, and a GUI -script called ``baz``, you might do something like this:: - - setup( - # other arguments here... - entry_points={ - "console_scripts": [ - "foo = my_package.some_module:main_func", - "bar = other_module:some_func", - ], - "gui_scripts": [ - "baz = my_package_gui:start_func", - ] - } - ) - -When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, -and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. The functions you specify are -called with no arguments, and their return value is passed to -``sys.exit()``, so you can return an errorlevel or message to print to -stderr. - -On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are -created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The -``.exe`` wrappers find and execute the right version of Python to run the -``.py`` or ``.pyw`` file. - -You may define as many "console script" and "gui script" entry points as you -like, and each one can optionally specify "extras" that it depends on, that -will be added to ``sys.path`` when the script is run. For more information on -"extras", see the section below on `Declaring Extras`_. For more information -on "entry points" in general, see the section below on `Dynamic Discovery of -Services and Plugins`_. - - - -Declaring Dependencies -====================== - -``setuptools`` supports automatically installing dependencies when a package is -installed, and including information about dependencies in Python Eggs (so that -package management tools like pip can use the information). - -``setuptools`` and ``pkg_resources`` use a common syntax for specifying a -project's required dependencies. This syntax consists of a project's PyPI -name, optionally followed by a comma-separated list of "extras" in square -brackets, optionally followed by a comma-separated list of version -specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, -``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be -separated by whitespace, but any whitespace or nonstandard characters within a -project name or version identifier must be replaced with ``-``. - -Version specifiers for a given project are internally sorted into ascending -version order, and used to establish what ranges of versions are acceptable. -Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes -``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from -the ranges they fall within. A project's version is then checked for -membership in the resulting ranges. (Note that providing conflicting conditions -for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may -therefore produce bizarre results.) - -Here are some example requirement specifiers:: - - docutils >= 0.3 - - # comment lines and \ continuations are allowed in requirement strings - BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ - ==1.6, ==1.7 # and so are line-end comments - - PEAK[FastCGI, reST]>=0.5a4 - - setuptools==0.5a7 - -The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers. If you include more than one -requirement in a string, each requirement must begin on a new line. - -This has three effects: - -1. When your project is installed, either by using pip, ``setup.py install``, - or ``setup.py develop``, all of the dependencies not already installed will - be located (via PyPI), downloaded, built (if necessary), and installed. - -2. Any scripts in your project will be installed with wrappers that verify - the availability of the specified dependencies at runtime, and ensure that - the correct versions are added to ``sys.path`` (e.g. if multiple versions - have been installed). - -3. Python Egg distributions will include a metadata file listing the - dependencies. - -Note, by the way, that if you declare your dependencies in ``setup.py``, you do -*not* need to use the ``require()`` function in your scripts or modules, as -long as you either install the project or use ``setup.py develop`` to do -development work on it. (See `"Development Mode"`_ below for more details on -using ``setup.py develop``.) - -Dependencies that aren't in PyPI --------------------------------- - -.. warning:: - Dependency links support has been dropped by pip starting with version - 19.0 (released 2019-01-22). - -If your project depends on packages that don't exist on PyPI, you may still be -able to depend on them, as long as they are available for download as: - -- an egg, in the standard distutils ``sdist`` format, -- a single ``.py`` file, or -- a VCS repository (Subversion, Mercurial, or Git). - -You just need to add some URLs to the ``dependency_links`` argument to -``setup()``. - -The URLs must be either: - -1. direct download URLs, -2. the URLs of web pages that contain direct download links, or -3. the repository's URL - -In general, it's better to link to web pages, because it is usually less -complex to update a web page than to release a new version of your project. -You can also use a SourceForge ``showfiles.php`` link in the case where a -package you depend on is distributed via SourceForge. - -If you depend on a package that's distributed as a single ``.py`` file, you -must include an ``"#egg=project-version"`` suffix to the URL, to give a project -name and version number. (Be sure to escape any dashes in the name or version -by replacing them with underscores.) EasyInstall will recognize this suffix -and automatically create a trivial ``setup.py`` to wrap the single ``.py`` file -as an egg. - -In the case of a VCS checkout, you should also append ``#egg=project-version`` -in order to identify for what package that checkout should be used. You can -append ``@REV`` to the URL's path (before the fragment) to specify a revision. -Additionally, you can also force the VCS being used by prepending the URL with -a certain prefix. Currently available are: - -- ``svn+URL`` for Subversion, -- ``git+URL`` for Git, and -- ``hg+URL`` for Mercurial - -A more complete example would be: - - ``vcs+proto://host/path@revision#egg=project-version`` - -Be careful with the version. It should match the one inside the project files. -If you want to disregard the version, you have to omit it both in the -``requires`` and in the URL's fragment. - -This will do a checkout (or a clone, in Git and Mercurial parlance) to a -temporary folder and run ``setup.py bdist_egg``. - -The ``dependency_links`` option takes the form of a list of URL strings. For -example, this will cause a search of the specified page for eggs or source -distributions, if the package's dependencies aren't already installed:: - - setup( - ... - dependency_links=[ - "http://peak.telecommunity.com/snapshots/" - ], - ) - - -.. _Declaring Extras: - - -Declaring "Extras" (optional features with their own dependencies) ------------------------------------------------------------------- - -Sometimes a project has "recommended" dependencies, that are not required for -all uses of the project. For example, a project might offer optional PDF -output if ReportLab is installed, and reStructuredText support if docutils is -installed. These optional features are called "extras", and setuptools allows -you to define their requirements as well. In this way, other projects that -require these optional features can force the additional requirements to be -installed, by naming the desired extras in their ``install_requires``. - -For example, let's say that Project A offers optional PDF and reST support:: - - setup( - name="Project-A", - ... - extras_require={ - "PDF": ["ReportLab>=1.2", "RXP"], - "reST": ["docutils>=0.3"], - } - ) - -As you can see, the ``extras_require`` argument takes a dictionary mapping -names of "extra" features, to strings or lists of strings describing those -features' requirements. These requirements will *not* be automatically -installed unless another package depends on them (directly or indirectly) by -including the desired "extras" in square brackets after the associated project -name. (Or if the extras were listed in a requirement spec on the "pip install" -command line.) - -Extras can be used by a project's `entry points`_ to specify dynamic -dependencies. For example, if Project A includes a "rst2pdf" script, it might -declare it like this, so that the "PDF" requirements are only resolved if the -"rst2pdf" script is run:: - - setup( - name="Project-A", - ... - entry_points={ - "console_scripts": [ - "rst2pdf = project_a.tools.pdfgen [PDF]", - "rst2html = project_a.tools.htmlgen", - # more script entry points ... - ], - } - ) - -Projects can also use another project's extras when specifying dependencies. -For example, if project B needs "project A" with PDF support installed, it -might declare the dependency like this:: - - setup( - name="Project-B", - install_requires=["Project-A[PDF]"], - ... - ) - -This will cause ReportLab to be installed along with project A, if project B is -installed -- even if project A was already installed. In this way, a project -can encapsulate groups of optional "downstream dependencies" under a feature -name, so that packages that depend on it don't have to know what the downstream -dependencies are. If a later version of Project A builds in PDF support and -no longer needs ReportLab, or if it ends up needing other dependencies besides -ReportLab in order to provide PDF support, Project B's setup information does -not need to change, but the right packages will still be installed if needed. - -Note, by the way, that if a project ends up not needing any other packages to -support a feature, it should keep an empty requirements list for that feature -in its ``extras_require`` argument, so that packages depending on that feature -don't break (due to an invalid feature name). For example, if Project A above -builds in PDF support and no longer needs ReportLab, it could change its -setup to this:: - - setup( - name="Project-A", - ... - extras_require={ - "PDF": [], - "reST": ["docutils>=0.3"], - } - ) - -so that Package B doesn't have to remove the ``[PDF]`` from its requirement -specifier. - -.. _Platform Specific Dependencies: - - -Declaring platform specific dependencies ----------------------------------------- - -Sometimes a project might require a dependency to run on a specific platform. -This could to a package that back ports a module so that it can be used in -older python versions. Or it could be a package that is required to run on a -specific operating system. This will allow a project to work on multiple -different platforms without installing dependencies that are not required for -a platform that is installing the project. - -For example, here is a project that uses the ``enum`` module and ``pywin32``:: - - setup( - name="Project", - ... - install_requires=[ - "enum34;python_version<'3.4'", - "pywin32 >= 1.0;platform_system=='Windows'" - ] - ) - -Since the ``enum`` module was added in Python 3.4, it should only be installed -if the python version is earlier. Since ``pywin32`` will only be used on -windows, it should only be installed when the operating system is Windows. -Specifying version requirements for the dependencies is supported as normal. - -The environmental markers that may be used for testing platform types are -detailed in `PEP 508`_. - -.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ - -Including Data Files -==================== - -The distutils have traditionally allowed installation of "data files", which -are placed in a platform-specific location. However, the most common use case -for data files distributed with a package is for use *by* the package, usually -by including the data files in the package directory. - -Setuptools offers three ways to specify data files to be included in your -packages. First, you can simply use the ``include_package_data`` keyword, -e.g.:: - - from setuptools import setup, find_packages - setup( - ... - include_package_data=True - ) - -This tells setuptools to install any data files it finds in your packages. -The data files must be specified via the distutils' ``MANIFEST.in`` file. -(They can also be tracked by a revision control system, using an appropriate -plugin. See the section below on `Adding Support for Revision Control -Systems`_ for information on how to write such plugins.) - -If you want finer-grained control over what files are included (for example, -if you have documentation files in your package directories and want to exclude -them from installation), then you can also use the ``package_data`` keyword, -e.g.:: - - from setuptools import setup, find_packages - setup( - ... - package_data={ - # If any package contains *.txt or *.rst files, include them: - "": ["*.txt", "*.rst"], - # And include any *.msg files found in the "hello" package, too: - "hello": ["*.msg"], - } - ) - -The ``package_data`` argument is a dictionary that maps from package names to -lists of glob patterns. The globs may include subdirectory names, if the data -files are contained in a subdirectory of the package. For example, if the -package tree looks like this:: - - setup.py - src/ - mypkg/ - __init__.py - mypkg.txt - data/ - somefile.dat - otherdata.dat - -The setuptools setup file might look like this:: - - from setuptools import setup, find_packages - setup( - ... - packages=find_packages("src"), # include all packages under src - package_dir={"": "src"}, # tell distutils packages are under src - - package_data={ - # If any package contains *.txt files, include them: - "": ["*.txt"], - # And include any *.dat files found in the "data" subdirectory - # of the "mypkg" package, also: - "mypkg": ["data/*.dat"], - } - ) - -Notice that if you list patterns in ``package_data`` under the empty string, -these patterns are used to find files in every package, even ones that also -have their own patterns listed. Thus, in the above example, the ``mypkg.txt`` -file gets included even though it's not listed in the patterns for ``mypkg``. - -Also notice that if you use paths, you *must* use a forward slash (``/``) as -the path separator, even if you are on Windows. Setuptools automatically -converts slashes to appropriate platform-specific separators at build time. - -If datafiles are contained in a subdirectory of a package that isn't a package -itself (no ``__init__.py``), then the subdirectory names (or ``*``) are required -in the ``package_data`` argument (as shown above with ``"data/*.dat"``). - -When building an ``sdist``, the datafiles are also drawn from the -``package_name.egg-info/SOURCES.txt`` file, so make sure that this is removed if -the ``setup.py`` ``package_data`` list is updated before calling ``setup.py``. - -(Note: although the ``package_data`` argument was previously only available in -``setuptools``, it was also added to the Python ``distutils`` package as of -Python 2.4; there is `some documentation for the feature`__ available on the -python.org website. If using the setuptools-specific ``include_package_data`` -argument, files specified by ``package_data`` will *not* be automatically -added to the manifest unless they are listed in the MANIFEST.in file.) - -__ https://docs.python.org/3/distutils/setupscript.html#installing-package-data - -Sometimes, the ``include_package_data`` or ``package_data`` options alone -aren't sufficient to precisely define what files you want included. For -example, you may want to include package README files in your revision control -system and source distributions, but exclude them from being installed. So, -setuptools offers an ``exclude_package_data`` option as well, that allows you -to do things like this:: - - from setuptools import setup, find_packages - setup( - ... - packages=find_packages("src"), # include all packages under src - package_dir={"": "src"}, # tell distutils packages are under src - - include_package_data=True, # include everything in source control - - # ...but exclude README.txt from all packages - exclude_package_data={"": ["README.txt"]}, - ) - -The ``exclude_package_data`` option is a dictionary mapping package names to -lists of wildcard patterns, just like the ``package_data`` option. And, just -as with that option, a key of ``""`` will apply the given pattern(s) to all -packages. However, any files that match these patterns will be *excluded* -from installation, even if they were listed in ``package_data`` or were -included as a result of using ``include_package_data``. - -In summary, the three options allow you to: - -``include_package_data`` - Accept all data files and directories matched by ``MANIFEST.in``. - -``package_data`` - Specify additional patterns to match files that may or may - not be matched by ``MANIFEST.in`` or found in source control. - -``exclude_package_data`` - Specify patterns for data files and directories that should *not* be - included when a package is installed, even if they would otherwise have - been included due to the use of the preceding options. - -NOTE: Due to the way the distutils build process works, a data file that you -include in your project and then stop including may be "orphaned" in your -project's build directories, requiring you to run ``setup.py clean --all`` to -fully remove them. This may also be important for your users and contributors -if they track intermediate revisions of your project using Subversion; be sure -to let them know when you make changes that remove files from inclusion so they -can run ``setup.py clean --all``. - -Accessing Data Files at Runtime -------------------------------- - -Typically, existing programs manipulate a package's ``__file__`` attribute in -order to find the location of data files. However, this manipulation isn't -compatible with PEP 302-based import hooks, including importing from zip files -and Python Eggs. It is strongly recommended that, if you are using data files, -you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access -them. The ``pkg_resources`` module is distributed as part of setuptools, so if -you're using setuptools to distribute your package, there is no reason not to -use its resource management API. See also `Importlib Resources`_ for -a quick example of converting code that uses ``__file__`` to use -``pkg_resources`` instead. - -.. _Importlib Resources: https://docs.python.org/3/library/importlib.html#module-importlib.resources - - -Non-Package Data Files ----------------------- - -Historically, ``setuptools`` by way of ``easy_install`` would encapsulate data -files from the distribution into the egg (see `the old docs -`_). As eggs are deprecated and pip-based installs -fall back to the platform-specific location for installing data files, there is -no supported facility to reliably retrieve these resources. - -Instead, the PyPA recommends that any data files you wish to be accessible at -run time be included in the package. - - Automatic Resource Extraction ----------------------------- @@ -621,76 +35,6 @@ files, or Python plus C, you really don't need this. You've got to be using either C or an external program that needs "real" files in your project before there's any possibility of ``eager_resources`` being relevant to your project. - -Extensible Applications and Frameworks -====================================== - - -.. _Entry Points: - -Dynamic Discovery of Services and Plugins ------------------------------------------ - -``setuptools`` supports creating libraries that "plug in" to extensible -applications and frameworks, by letting you register "entry points" in your -project that can be imported by the application or framework. - -For example, suppose that a blogging tool wants to support plugins -that provide translation for various file types to the blog's output format. -The framework might define an "entry point group" called ``blogtool.parsers``, -and then allow plugins to register entry points for the file extensions they -support. - -This would allow people to create distributions that contain one or more -parsers for different file types, and then the blogging tool would be able to -find the parsers at runtime by looking up an entry point for the file -extension (or mime type, or however it wants to). - -Note that if the blogging tool includes parsers for certain file formats, it -can register these as entry points in its own setup script, which means it -doesn't have to special-case its built-in formats. They can just be treated -the same as any other plugin's entry points would be. - -If you're creating a project that plugs in to an existing application or -framework, you'll need to know what entry points or entry point groups are -defined by that application or framework. Then, you can register entry points -in your setup script. Here are a few examples of ways you might register an -``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, -for our hypothetical blogging tool:: - - setup( - # ... - entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} - ) - - setup( - # ... - entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} - ) - - setup( - # ... - entry_points=""" - [blogtool.parsers] - .rst = some.nested.module:SomeClass.some_classmethod [reST] - """, - extras_require=dict(reST="Docutils>=0.3.5") - ) - -The ``entry_points`` argument to ``setup()`` accepts either a string with -``.ini``-style sections, or a dictionary mapping entry point group names to -either strings or lists of strings containing entry point specifiers. An -entry point specifier consists of a name and value, separated by an ``=`` -sign. The value consists of a dotted module name, optionally followed by a -``:`` and a dotted identifier naming an object within the module. It can -also include a bracketed list of "extras" that are required for the entry -point to be used. When the invoking application or framework requests loading -of an entry point, any requirements implied by the associated extras will be -passed to ``pkg_resources.require()``, so that an appropriate error message -can be displayed if the needed package(s) are missing. (Of course, the -invoking app or framework can ignore such errors if it wants to make an entry -point optional if a requirement isn't installed.) - Defining Additional Metadata ---------------------------- @@ -705,107 +49,6 @@ for many of the ``setup()`` arguments it adds. See the section below on `Creating distutils Extensions`_ for more details, especially the subsection on `Adding new EGG-INFO Files`_. - -"Development Mode" -================== - -Under normal circumstances, the ``distutils`` assume that you are going to -build a distribution of your project, not use it in its "raw" or "unbuilt" -form. If you were to use the ``distutils`` that way, you would have to rebuild -and reinstall your project every time you made a change to it during -development. - -Another problem that sometimes comes up with the ``distutils`` is that you may -need to do development on two related projects at the same time. You may need -to put both projects' packages in the same directory to run them, but need to -keep them separate for revision control purposes. How can you do this? - -Setuptools allows you to deploy your projects for use in a common directory or -staging area, but without copying any files. Thus, you can edit each project's -code in its checkout directory, and only need to run build commands when you -change a project's C extensions or similarly compiled files. You can even -deploy a project into another project's checkout directory, if that's your -preferred way of working (as opposed to using a common independent staging area -or the site-packages directory). - -To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install``, except that it doesn't actually install anything. -Instead, it creates a special ``.egg-link`` file in the deployment directory, -that links to your project's source code. And, if your deployment directory is -Python's ``site-packages`` directory, it will also update the -``easy-install.pth`` file to include your project's source code, thereby making -it available on ``sys.path`` for all programs using that Python installation. - -If you have enabled the ``use_2to3`` flag, then of course the ``.egg-link`` -will not link directly to your source code when run under Python 3, since -that source code would be made for Python 2 and not work under Python 3. -Instead the ``setup.py develop`` will build Python 3 code under the ``build`` -directory, and link there. This means that after doing code changes you will -have to run ``setup.py build`` before these changes are picked up by your -Python 3 installation. - -In addition, the ``develop`` command creates wrapper scripts in the target -script directory that will run your in-development scripts after ensuring that -all your ``install_requires`` packages are available on ``sys.path``. - -You can deploy the same project to multiple staging areas, e.g. if you have -multiple projects on the same machine that are sharing the same project you're -doing development work. - -When you're done with a given development task, you can remove the project -source from a staging area using ``setup.py develop --uninstall``, specifying -the desired staging area if it's not the default. - -There are several options to control the precise behavior of the ``develop`` -command; see the section on the `develop`_ command below for more details. - -Note that you can also apply setuptools commands to non-setuptools projects, -using commands like this:: - - python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop - -That is, you can simply list the normal setup commands and options following -the quoted part. - - -Distributing a ``setuptools``-based project -=========================================== - -Detailed instructions to distribute a setuptools project can be found at -`Packaging project tutorials`_. - -.. _Packaging project tutorials: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives - -Before you begin, make sure you have the latest versions of setuptools and wheel:: - - pip install --upgrade setuptools wheel - -To build a setuptools project, run this command from the same directory where -setup.py is located:: - - setup.py sdist bdist_wheel - -This will generate distribution archives in the `dist` directory. - -Before you upload the generated archives make sure you're registered on -https://test.pypi.org/account/register/. You will also need to verify your email -to be able to upload any packages. -You should install twine to be able to upload packages:: - - pip install --upgrade twine - -Now, to upload these archives, run:: - - twine upload --repository-url https://test.pypi.org/legacy/ dist/* - -To install your newly uploaded package ``example_pkg``, you can use pip:: - - pip install --index-url https://test.pypi.org/simple/ example_pkg - -If you have issues at any point, please refer to `Packaging project tutorials`_ -for clarification. - - Setting the ``zip_safe`` flag ----------------------------- @@ -849,543 +92,3 @@ correctly when installed as a zipfile, correct any problems if you can, and then make an explicit declaration of ``True`` or ``False`` for the ``zip_safe`` flag, so that it will not be necessary for ``bdist_egg`` to try to guess whether your project can work as a zipfile. - -.. _Namespace Packages: - -Namespace Packages ------------------- - -Sometimes, a large package is more useful if distributed as a collection of -smaller eggs. However, Python does not normally allow the contents of a -package to be retrieved from more than one location. "Namespace packages" -are a solution for this problem. When you declare a package to be a namespace -package, it means that the package has no meaningful contents in its -``__init__.py``, and that it is merely a container for modules and subpackages. - -The ``pkg_resources`` runtime will then automatically ensure that the contents -of namespace packages that are spread over multiple eggs or directories are -combined into a single "virtual" package. - -The ``namespace_packages`` argument to ``setup()`` lets you declare your -project's namespace packages, so that they will be included in your project's -metadata. The argument should list the namespace packages that the egg -participates in. For example, the ZopeInterface project might do this:: - - setup( - # ... - namespace_packages=["zope"] - ) - -because it contains a ``zope.interface`` package that lives in the ``zope`` -namespace package. Similarly, a project for a standalone ``zope.publisher`` -would also declare the ``zope`` namespace package. When these projects are -installed and used, Python will see them both as part of a "virtual" ``zope`` -package, even though they will be installed in different locations. - -Namespace packages don't have to be top-level packages. For example, Zope 3's -``zope.app`` package is a namespace package, and in the future PEAK's -``peak.util`` package will be too. - -Note, by the way, that your project's source tree must include the namespace -packages' ``__init__.py`` files (and the ``__init__.py`` of any parent -packages), in a normal Python package layout. These ``__init__.py`` files -*must* contain the line:: - - __import__("pkg_resources").declare_namespace(__name__) - -This code ensures that the namespace package machinery is operating and that -the current package is registered as a namespace package. - -You must NOT include any other code and data in a namespace package's -``__init__.py``. Even though it may appear to work during development, or when -projects are installed as ``.egg`` files, it will not work when the projects -are installed using "system" packaging tools -- in such cases the -``__init__.py`` files will not be installed, let alone executed. - -You must include the ``declare_namespace()`` line in the ``__init__.py`` of -*every* project that has contents for the namespace package in question, in -order to ensure that the namespace will be declared regardless of which -project's copy of ``__init__.py`` is loaded first. If the first loaded -``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded! - -Tagging and "Daily Build" or "Snapshot" Releases ------------------------------------------------- - -When a set of related projects are under development, it may be important to -track finer-grained version increments than you would normally use for e.g. -"stable" releases. While stable releases might be measured in dotted numbers -with alpha/beta/etc. status codes, development versions of a project often -need to be tracked by revision or build number or even build date. This is -especially true when projects in development need to refer to one another, and -therefore may literally need an up-to-the-minute version of something! - -To support these scenarios, ``setuptools`` allows you to "tag" your source and -egg distributions by adding one or more of the following to the project's -"official" version identifier: - -* A manually-specified pre-release tag, such as "build" or "dev", or a - manually-specified post-release tag, such as a build or revision number - (``--tag-build=STRING, -bSTRING``) - -* An 8-character representation of the build date (``--tag-date, -d``), as - a postrelease tag - -You can add these tags by adding ``egg_info`` and the desired options to -the command line ahead of the ``sdist`` or ``bdist`` commands that you want -to generate a daily build or snapshot for. See the section below on the -`egg_info`_ command for more details. - -(Also, before you release your project, be sure to see the section above on -`Specifying Your Project's Version`_ for more information about how pre- and -post-release tags affect how version numbers are interpreted. This is -important in order to make sure that dependency processing tools will know -which versions of your project are newer than others.) - -Finally, if you are creating builds frequently, and either building them in a -downloadable location or are copying them to a distribution server, you should -probably also check out the `rotate`_ command, which lets you automatically -delete all but the N most-recently-modified distributions matching a glob -pattern. So, you can use a command line like:: - - setup.py egg_info -rbDEV bdist_egg rotate -m.egg -k3 - -to build an egg whose version info includes "DEV-rNNNN" (where NNNN is the -most recent Subversion revision that affected the source tree), and then -delete any egg files from the distribution directory except for the three -that were built most recently. - -If you have to manage automated builds for multiple packages, each with -different tagging and rotation policies, you may also want to check out the -`alias`_ command, which would let each package define an alias like ``daily`` -that would perform the necessary tag, build, and rotate commands. Then, a -simpler script or cron job could just run ``setup.py daily`` in each project -directory. (And, you could also define sitewide or per-user default versions -of the ``daily`` alias, so that projects that didn't define their own would -use the appropriate defaults.) - -Generating Source Distributions -------------------------------- - -``setuptools`` enhances the distutils' default algorithm for source file -selection with pluggable endpoints for looking up files to include. If you are -using a revision control system, and your source distributions only need to -include files that you're tracking in revision control, use a corresponding -plugin instead of writing a ``MANIFEST.in`` file. See the section below on -`Adding Support for Revision Control Systems`_ for information on plugins. - -If you need to include automatically generated files, or files that are kept in -an unsupported revision control system, you'll need to create a ``MANIFEST.in`` -file to specify any files that the default file location algorithm doesn't -catch. See the distutils documentation for more information on the format of -the ``MANIFEST.in`` file. - -But, be sure to ignore any part of the distutils documentation that deals with -``MANIFEST`` or how it's generated from ``MANIFEST.in``; setuptools shields you -from these issues and doesn't work the same way in any case. Unlike the -distutils, setuptools regenerates the source distribution manifest file -every time you build a source distribution, and it builds it inside the -project's ``.egg-info`` directory, out of the way of your main project -directory. You therefore need not worry about whether it is up-to-date or not. - -Indeed, because setuptools' approach to determining the contents of a source -distribution is so much simpler, its ``sdist`` command omits nearly all of -the options that the distutils' more complex ``sdist`` process requires. For -all practical purposes, you'll probably use only the ``--formats`` option, if -you use any option at all. - - -Making "Official" (Non-Snapshot) Releases -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you make an official release, creating source or binary distributions, -you will need to override the tag settings from ``setup.cfg``, so that you -don't end up registering versions like ``foobar-0.7a1.dev-r34832``. This is -easy to do if you are developing on the trunk and using tags or branches for -your releases - just make the change to ``setup.cfg`` after branching or -tagging the release, so the trunk will still produce development snapshots. - -Alternately, if you are not branching for releases, you can override the -default version options on the command line, using something like:: - - setup.py egg_info -Db "" sdist bdist_egg - -The first part of this command (``egg_info -Db ""``) will override the -configured tag information, before creating source and binary eggs. Thus, these -commands will use the plain version from your ``setup.py``, without adding the -build designation string. - -Of course, if you will be doing this a lot, you may wish to create a personal -alias for this operation, e.g.:: - - setup.py alias -u release egg_info -Db "" - -You can then use it like this:: - - setup.py release sdist bdist_egg - -Or of course you can create more elaborate aliases that do all of the above. -See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. - -Distributing Extensions compiled with Cython --------------------------------------------- - -``setuptools`` will detect at build time whether Cython is installed or not. -If Cython is not found ``setuptools`` will ignore pyx files. - -To ensure Cython is available, include Cython in the build-requires section -of your pyproject.toml:: - - [build-system] - requires=[..., "cython"] - -Built with pip 10 or later, that declaration is sufficient to include Cython -in the build. For broader compatibility, declare the dependency in your -setup-requires of setup.cfg:: - - [options] - setup_requires = - ... - cython - -As long as Cython is present in the build environment, ``setuptools`` includes -transparent support for building Cython extensions, as -long as extensions are defined using ``setuptools.Extension``. - -If you follow these rules, you can safely list ``.pyx`` files as the source -of your ``Extension`` objects in the setup script. If it is, then ``setuptools`` -will use it. - -Of course, for this to work, your source distributions must include the C -code generated by Cython, as well as your original ``.pyx`` files. This means -that you will probably want to include current ``.c`` files in your revision -control system, rebuilding them whenever you check changes in for the ``.pyx`` -source files. This will ensure that people tracking your project in a revision -control system will be able to build it even if they don't have Cython -installed, and that your source releases will be similarly usable with or -without Cython. - --------------------------------- -Extending and Reusing Setuptools --------------------------------- - -Creating ``distutils`` Extensions -================================= - -It can be hard to add new commands or setup arguments to the distutils. But -the ``setuptools`` package makes it a bit easier, by allowing you to distribute -a distutils extension as a separate project, and then have projects that need -the extension just refer to it in their ``setup_requires`` argument. - -With ``setuptools``, your distutils extension projects can hook in new -commands and ``setup()`` arguments just by defining "entry points". These -are mappings from command or argument names to a specification of where to -import a handler from. (See the section on `Dynamic Discovery of Services and -Plugins`_ above for some more background on entry points.) - - -Adding Commands ---------------- - -You can add new ``setup`` commands by defining entry points in the -``distutils.commands`` group. For example, if you wanted to add a ``foo`` -command, you might add something like this to your distutils extension -project's setup script:: - - setup( - # ... - entry_points={ - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - }, - ) - -(Assuming, of course, that the ``foo`` class in ``mypackage.some_module`` is -a ``setuptools.Command`` subclass.) - -Once a project containing such entry points has been activated on ``sys.path``, -(e.g. by running "install" or "develop" with a site-packages installation -directory) the command(s) will be available to any ``setuptools``-based setup -scripts. It is not necessary to use the ``--command-packages`` option or -to monkeypatch the ``distutils.command`` package to install your commands; -``setuptools`` automatically adds a wrapper to the distutils to search for -entry points in the active distributions on ``sys.path``. In fact, this is -how setuptools' own commands are installed: the setuptools project's setup -script defines entry points for them! - -Adding ``setup()`` Arguments ----------------------------- - -.. warning:: Adding arguments to setup is discouraged as such arguments - are only supported through imperative execution and not supported through - declarative config. - -Sometimes, your commands may need additional arguments to the ``setup()`` -call. You can enable this by defining entry points in the -``distutils.setup_keywords`` group. For example, if you wanted a ``setup()`` -argument called ``bar_baz``, you might add something like this to your -distutils extension project's setup script:: - - setup( - # ... - entry_points={ - "distutils.commands": [ - "foo = mypackage.some_module:foo", - ], - "distutils.setup_keywords": [ - "bar_baz = mypackage.some_module:validate_bar_baz", - ], - }, - ) - -The idea here is that the entry point defines a function that will be called -to validate the ``setup()`` argument, if it's supplied. The ``Distribution`` -object will have the initial value of the attribute set to ``None``, and the -validation function will only be called if the ``setup()`` call sets it to -a non-None value. Here's an example validation function:: - - def assert_bool(dist, attr, value): - """Verify that value is True, False, 0, or 1""" - if bool(value) != value: - raise DistutilsSetupError( - "%r must be a boolean value (got %r)" % (attr,value) - ) - -Your function should accept three arguments: the ``Distribution`` object, -the attribute name, and the attribute value. It should raise a -``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument -is invalid. Remember, your function will only be called with non-None values, -and the default value of arguments defined this way is always None. So, your -commands should always be prepared for the possibility that the attribute will -be ``None`` when they access it later. - -If more than one active distribution defines an entry point for the same -``setup()`` argument, *all* of them will be called. This allows multiple -distutils extensions to define a common argument, as long as they agree on -what values of that argument are valid. - -Also note that as with commands, it is not necessary to subclass or monkeypatch -the distutils ``Distribution`` class in order to add your arguments; it is -sufficient to define the entry points in your extension, as long as any setup -script using your extension lists your project in its ``setup_requires`` -argument. - - -Customizing Distribution Options --------------------------------- - -Plugins may wish to extend or alter the options on a Distribution object to -suit the purposes of that project. For example, a tool that infers the -``Distribution.version`` from SCM-metadata may need to hook into the -option finalization. To enable this feature, Setuptools offers an entry -point "setuptools.finalize_distribution_options". That entry point must -be a callable taking one argument (the Distribution instance). - -If the callable has an ``.order`` property, that value will be used to -determine the order in which the hook is called. Lower numbers are called -first and the default is zero (0). - -Plugins may read, alter, and set properties on the distribution, but each -plugin is encouraged to load the configuration/settings for their behavior -independently. - - -Adding new EGG-INFO Files -------------------------- - -Some extensible applications or frameworks may want to allow third parties to -develop plugins with application or framework-specific metadata included in -the plugins' EGG-INFO directory, for easy access via the ``pkg_resources`` -metadata API. The easiest way to allow this is to create a distutils extension -to be used from the plugin projects' setup scripts (via ``setup_requires``) -that defines a new setup keyword, and then uses that data to write an EGG-INFO -file when the ``egg_info`` command is run. - -The ``egg_info`` command looks for extension points in an ``egg_info.writers`` -group, and calls them to write the files. Here's a simple example of a -distutils extension defining a setup argument ``foo_bar``, which is a list of -lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any -project that uses the argument:: - - setup( - # ... - entry_points={ - "distutils.setup_keywords": [ - "foo_bar = setuptools.dist:assert_string_list", - ], - "egg_info.writers": [ - "foo_bar.txt = setuptools.command.egg_info:write_arg", - ], - }, - ) - -This simple example makes use of two utility functions defined by setuptools -for its own use: a routine to validate that a setup keyword is a sequence of -strings, and another one that looks up a setup argument and writes it to -a file. Here's what the writer utility looks like:: - - def write_arg(cmd, basename, filename): - argname = os.path.splitext(basename)[0] - value = getattr(cmd.distribution, argname, None) - if value is not None: - value = "\n".join(value) + "\n" - cmd.write_or_delete_file(argname, filename, value) - -As you can see, ``egg_info.writers`` entry points must be a function taking -three arguments: a ``egg_info`` command instance, the basename of the file to -write (e.g. ``foo_bar.txt``), and the actual full filename that should be -written to. - -In general, writer functions should honor the command object's ``dry_run`` -setting when writing files, and use the ``distutils.log`` object to do any -console output. The easiest way to conform to this requirement is to use -the ``cmd`` object's ``write_file()``, ``delete_file()``, and -``write_or_delete_file()`` methods exclusively for your file operations. See -those methods' docstrings for more details. - -Adding Support for Revision Control Systems -------------------------------------------------- - -If the files you want to include in the source distribution are tracked using -Git, Mercurial or SVN, you can use the following packages to achieve that: - -- Git and Mercurial: `setuptools_scm `_ -- SVN: `setuptools_svn `_ - -If you would like to create a plugin for ``setuptools`` to find files tracked -by another revision control system, you can do so by adding an entry point to -the ``setuptools.file_finders`` group. The entry point should be a function -accepting a single directory name, and should yield all the filenames within -that directory (and any subdirectories thereof) that are under revision -control. - -For example, if you were going to create a plugin for a revision control system -called "foobar", you would write a function something like this: - -.. code-block:: python - - def find_files_for_foobar(dirname): - # loop to yield paths that start with `dirname` - -And you would register it in a setup script using something like this:: - - entry_points={ - "setuptools.file_finders": [ - "foobar = my_foobar_module:find_files_for_foobar", - ] - } - -Then, anyone who wants to use your plugin can simply install it, and their -local setuptools installation will be able to find the necessary files. - -It is not necessary to distribute source control plugins with projects that -simply use the other source control system, or to specify the plugins in -``setup_requires``. When you create a source distribution with the ``sdist`` -command, setuptools automatically records what files were found in the -``SOURCES.txt`` file. That way, recipients of source distributions don't need -to have revision control at all. However, if someone is working on a package -by checking out with that system, they will need the same plugin(s) that the -original author is using. - -A few important points for writing revision control file finders: - -* Your finder function MUST return relative paths, created by appending to the - passed-in directory name. Absolute paths are NOT allowed, nor are relative - paths that reference a parent directory of the passed-in directory. - -* Your finder function MUST accept an empty string as the directory name, - meaning the current directory. You MUST NOT convert this to a dot; just - yield relative paths. So, yielding a subdirectory named ``some/dir`` under - the current directory should NOT be rendered as ``./some/dir`` or - ``/somewhere/some/dir``, but *always* as simply ``some/dir`` - -* Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully - with the absence of needed programs (i.e., ones belonging to the revision - control system itself. It *may*, however, use ``distutils.log.warn()`` to - inform the user of the missing program(s). - -Specifying Your Project's Version ---------------------------------- - -Setuptools can work well with most versioning schemes; there are, however, a -few special things to watch out for, in order to ensure that setuptools and -other tools can always tell what version of your package is newer than another -version. Knowing these things will also help you correctly specify what -versions of other projects your project depends on. - -A version consists of an alternating series of release numbers and pre-release -or post-release tags. A release number is a series of digits punctuated by -dots, such as ``2.4`` or ``0.5``. Each series of digits is treated -numerically, so releases ``2.1`` and ``2.1.0`` are different ways to spell the -same release number, denoting the first subrelease of release 2. But ``2.10`` -is the *tenth* subrelease of release 2, and so is a different and newer release -from ``2.1`` or ``2.1.0``. Leading zeros within a series of digits are also -ignored, so ``2.01`` is the same as ``2.1``, and different from ``2.0.1``. - -Following a release number, you can have either a pre-release or post-release -tag. Pre-release tags make a version be considered *older* than the version -they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, -which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make -a version be considered *newer* than the version they are appended to. So, -revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* -than ``2.4.1`` (which has a higher release number). - -A pre-release tag is a series of letters that are alphabetically before -"final". Some examples of prerelease tags would include ``alpha``, ``beta``, -``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash -before the prerelease tag if it's immediately after a number, but it's okay to -do so if you prefer. Thus, ``2.4c1`` and ``2.4.c1`` and ``2.4-c1`` all -represent release candidate 1 of version ``2.4``, and are treated as identical -by setuptools. - -In addition, there are three special prerelease tags that are treated as if -they were the letter ``c``: ``pre``, ``preview``, and ``rc``. So, version -``2.4rc1``, ``2.4pre1`` and ``2.4preview1`` are all the exact same version as -``2.4c1``, and are treated as identical by setuptools. - -A post-release tag is either a series of letters that are alphabetically -greater than or equal to "final", or a dash (``-``). Post-release tags are -generally used to separate patch numbers, port numbers, build numbers, revision -numbers, or date stamps from the release number. For example, the version -``2.4-r1263`` might denote Subversion revision 1263 of a post-release patch of -version ``2.4``. Or you might use ``2.4-20051127`` to denote a date-stamped -post-release. - -Notice that after each pre or post-release tag, you are free to place another -release number, followed again by more pre- or post-release tags. For example, -``0.6a9.dev-r41475`` could denote Subversion revision 41475 of the in- -development version of the ninth alpha of release 0.6. Notice that ``dev`` is -a pre-release tag, so this version is a *lower* version number than ``0.6a9``, -which would be the actual ninth alpha of release 0.6. But the ``-r41475`` is -a post-release tag, so this version is *newer* than ``0.6a9.dev``. - -For the most part, setuptools' interpretation of version numbers is intuitive, -but here are a few tips that will keep you out of trouble in the corner cases: - -* Don't stick adjoining pre-release tags together without a dot or number - between them. Version ``1.9adev`` is the ``adev`` prerelease of ``1.9``, - *not* a development pre-release of ``1.9a``. Use ``.dev`` instead, as in - ``1.9a.dev``, or separate the prerelease tags with a number, as in - ``1.9a0dev``. ``1.9a.dev``, ``1.9a0dev``, and even ``1.9.a.dev`` are - identical versions from setuptools' point of view, so you can use whatever - scheme you prefer. - -* If you want to be certain that your chosen numbering scheme works the way - you think it will, you can use the ``pkg_resources.parse_version()`` function - to compare different version numbers:: - - >>> from pkg_resources import parse_version - >>> parse_version("1.9.a.dev") == parse_version("1.9a0dev") - True - >>> parse_version("2.1-rc2") < parse_version("2.1") - True - >>> parse_version("0.6a9dev-r41475") < parse_version("0.6a9") - True - -Once you've decided on a version numbering scheme for your project, you can -have setuptools automatically tag your in-development releases with various -pre- or post-release tags. See the following sections for more details: - -* `Tagging and "Daily Build" or "Snapshot" Releases`_ -* The `egg_info`_ command \ No newline at end of file From 30db7409983e3ec81bee1d4b352ecfdc8089a31d Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 14 May 2020 13:25:00 -0400 Subject: [PATCH 7865/8469] added news fragment --- changelog.d/2111.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2111.doc.rst diff --git a/changelog.d/2111.doc.rst b/changelog.d/2111.doc.rst new file mode 100644 index 0000000000..3f44f7aff4 --- /dev/null +++ b/changelog.d/2111.doc.rst @@ -0,0 +1 @@ +doc overhaul step 3: update userguide From 6463fee5c9ed5864eb554ee99ad292e5507d4b55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 04:33:57 -0400 Subject: [PATCH 7866/8469] Sync azure pipelines config with jaraco/skeleton, adding support for building on macOS and Windows. --- azure-pipelines.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0253a770c0..ee772682ab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,10 +11,12 @@ trigger: - '*' pool: - vmimage: 'Ubuntu-18.04' + vmImage: $(pool_vm_image) variables: - group: Azure secrets +- name: pool_vm_image + value: Ubuntu-18.04 stages: - stage: Test @@ -23,10 +25,17 @@ stages: - job: 'Test' strategy: matrix: - Python36: + Bionic Python 3.6: python.version: '3.6' - Python38: + Bionic Python 3.8: python.version: '3.8' + Windows: + python.version: '3.8' + pool_vm_image: vs2017-win2016 + MacOS: + python.version: '3.8' + pool_vm_image: macos-10.15 + maxParallel: 4 steps: From 2f1d7173a196268008938e234e9e796bc6761b27 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 05:00:02 -0400 Subject: [PATCH 7867/8469] Avoid reliance on shell details in test_virtualenv. --- setuptools/tests/test_virtualenv.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 6549a6c01a..a62e564c41 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -57,10 +57,7 @@ def test_clean_env_install(bare_virtualenv): """ Check setuptools can be installed in a clean environment. """ - bare_virtualenv.run(' && '.join(( - 'cd {source}', - 'python setup.py install', - )).format(source=SOURCE_DIR)) + bare_virtualenv.run(['python', 'setup.py', 'install'], cd=SOURCE_DIR) def _get_pip_versions(): From c48365a763ea41d3f9e6298b3becbe73045ff9a1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 05:13:50 -0400 Subject: [PATCH 7868/8469] Avoid reliance on shell details in test_virtualenv. --- setuptools/tests/test_virtualenv.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index a62e564c41..555273aeba 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -112,10 +112,9 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( - 'cd {source}', 'python setup.py -q sdist -d {dist}', 'python setup.py -q bdist_wheel -d {dist}', - )).format(source=SOURCE_DIR, dist=dist_dir)) + )).format(dist=dist_dir), cd=SOURCE_DIR) sdist = glob.glob(os.path.join(dist_dir, '*.zip'))[0] wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] # Then update from wheel. @@ -180,10 +179,8 @@ def sdist(distname, version): open('success', 'w').close() ''')) # Run test command for test package. - virtualenv.run(' && '.join(( - 'cd {tmpdir}', - 'python setup.py test -s test', - )).format(tmpdir=tmpdir)) + virtualenv.run( + ['python', 'setup.py', 'test', '-s', 'test'], cd=str(tmpdir)) assert tmpdir.join('success').check() @@ -204,7 +201,5 @@ def test_no_missing_dependencies(bare_virtualenv): Quick and dirty test to ensure all external dependencies are vendored. """ for command in ('upload',): # sorted(distutils.command.__all__): - bare_virtualenv.run(' && '.join(( - 'cd {source}', - 'python setup.py {command} -h', - )).format(command=command, source=SOURCE_DIR)) + bare_virtualenv.run( + ['python', 'setup.py', command, '-h'], cd=SOURCE_DIR) From f6f25adfc81df76e186bf6c3738a1baa0f92be05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 05:15:42 -0400 Subject: [PATCH 7869/8469] Just write --- setuptools/tests/test_packageindex.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 452968973c..c6016c0963 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -287,13 +287,12 @@ class TestPyPIConfig: def test_percent_in_password(self, tmpdir, monkeypatch): monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) pypirc = tmpdir / '.pypirc' - with pypirc.open('w') as strm: - strm.write(DALS(""" - [pypi] - repository=https://pypi.org - username=jaraco - password=pity% - """)) + pypirc.write(DALS(""" + [pypi] + repository=https://pypi.org + username=jaraco + password=pity% + """)) cfg = setuptools.package_index.PyPIConfig() cred = cfg.creds_by_repository['https://pypi.org'] assert cred.username == 'jaraco' From 2187d0c770de3a93f9a6cdcf53d9a217167dcc83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 05:57:10 -0400 Subject: [PATCH 7870/8469] Extract fixture for a temp home --- setuptools/tests/test_packageindex.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index c6016c0963..7b7815ab89 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -283,10 +283,15 @@ def test_report(self): assert rep == 'My message about md5' +@pytest.fixture +def temp_home(tmpdir, monkeypatch): + monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) + return tmpdir + + class TestPyPIConfig: - def test_percent_in_password(self, tmpdir, monkeypatch): - monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) - pypirc = tmpdir / '.pypirc' + def test_percent_in_password(self, temp_home): + pypirc = temp_home / '.pypirc' pypirc.write(DALS(""" [pypi] repository=https://pypi.org From f866311d60f54499c3637309e3429780d8c8f218 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 06:00:35 -0400 Subject: [PATCH 7871/8469] Add platform-specific code to override the home directory to honor bpo-36264. Fixes #2112. --- setuptools/tests/test_packageindex.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 7b7815ab89..29aace13ef 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -3,6 +3,7 @@ import sys import os import distutils.errors +import platform from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client @@ -285,7 +286,13 @@ def test_report(self): @pytest.fixture def temp_home(tmpdir, monkeypatch): - monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) + key = ( + 'USERPROFILE' + if platform.system() == 'Windows' and sys.version_info > (3, 8) else + 'HOME' + ) + + monkeypatch.setitem(os.environ, key, str(tmpdir)) return tmpdir From 5ccaa70e0917bba8e411ebd8b8f15384ed352fcd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 06:09:56 -0400 Subject: [PATCH 7872/8469] Update badge for Azure Pipelines --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6caaa75640..9cbf7b86e1 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ .. _PyPI link: https://pypi.org/project/setuptools -.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/jaraco.setuptools?branchName=master +.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/pypa.setuptools?branchName=master :target: https://dev.azure.com/jaraco/setuptools/_build/latest?definitionId=1&branchName=master .. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white From e04c75ab906caadff4609ef34de8973c8e92eff8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 May 2020 06:10:33 -0400 Subject: [PATCH 7873/8469] =?UTF-8?q?Bump=20version:=2046.3.0=20=E2=86=92?= =?UTF-8?q?=2046.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 09a3be97e0..4ee9218515 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.3.0 +current_version = 46.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 97934531c7..fd3c16ba05 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v46.3.1 +------- + +No significant changes. + + v46.3.0 ------- diff --git a/setup.cfg b/setup.cfg index 5495343269..467d1fa723 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.3.0 +version = 46.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From bccf87f70b41ee288db4b8e91df02a64ec42579a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 15 May 2020 16:58:38 +0200 Subject: [PATCH 7874/8469] Fix an RST link typo in the dev guide --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 0b4ae4d4c3..e6171e4e30 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -139,7 +139,7 @@ Vendored Dependencies --------------------- Setuptools has some dependencies, but due to `bootstrapping issues -`, those dependencies +`_, those dependencies cannot be declared as they won't be resolved soon enough to build setuptools from source. Eventually, this limitation may be lifted as PEP 517/518 reach ubiquitous adoption, but for now, Setuptools From b9d48323ce2571376ba34c05d65450f66e1581e9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 May 2020 18:06:23 +0200 Subject: [PATCH 7875/8469] bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095) distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter. --- tests/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/__init__.py b/tests/__init__.py index 1b939cbd5d..5d2e69e3e6 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,6 +15,7 @@ import os import sys import unittest +import warnings from test.support import run_unittest @@ -22,6 +23,7 @@ def test_suite(): + old_filters = warnings.filters[:] suite = unittest.TestSuite() for fn in os.listdir(here): if fn.startswith("test") and fn.endswith(".py"): @@ -29,6 +31,10 @@ def test_suite(): __import__(modname) module = sys.modules[modname] suite.addTest(module.test_suite()) + # bpo-40055: Save/restore warnings filters to leave them unchanged. + # Importing tests imports docutils which imports pkg_resources which adds a + # warnings filter. + warnings.filters[:] = old_filters return suite From 6de971f158553c47ce11e7be9d38d268e0398193 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sat, 27 Apr 2019 19:21:50 +0000 Subject: [PATCH 7876/8469] Implement a "literal_attr:" config directive --- setuptools/config.py | 62 +++++++++++++++++++++++++++----- setuptools/tests/test_config.py | 64 +++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 9 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 9b9a0c45e7..d1456cac18 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -1,4 +1,5 @@ from __future__ import absolute_import, unicode_literals +import ast import io import os import sys @@ -316,15 +317,22 @@ def _parse_attr(cls, value, package_dir=None): Examples: attr: package.attr attr: package.module.attr + literal_attr: package.attr + literal_attr: package.module.attr :param str value: :rtype: str """ attr_directive = 'attr:' - if not value.startswith(attr_directive): + literal_attr_directive = 'literal_attr:' + if value.startswith(attr_directive): + directive = attr_directive + elif value.startswith(literal_attr_directive): + directive = literal_attr_directive + else: return value - attrs_path = value.replace(attr_directive, '').strip().split('.') + attrs_path = value.replace(directive, '').strip().split('.') attr_name = attrs_path.pop() module_name = '.'.join(attrs_path) @@ -344,13 +352,49 @@ def _parse_attr(cls, value, package_dir=None): 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) - - finally: - sys.path = sys.path[1:] + if directive == attr_directive: + sys.path.insert(0, parent_path) + try: + module = import_module(module_name) + value = getattr(module, attr_name) + finally: + sys.path = sys.path[1:] + + elif directive == literal_attr_directive: + fpath = os.path.join(parent_path, *module_name.split('.')) + if os.path.exists(fpath + '.py'): + fpath += '.py' + elif os.path.isdir(fpath): + fpath = os.path.join(fpath, '__init__.py') + else: + raise DistutilsOptionError( + 'Could not find module ' + module_name + ) + with open(fpath, 'rb') as fp: + src = fp.read() + found = False + top_level = ast.parse(src) + for statement in top_level.body: + if isinstance(statement, ast.Assign): + for target in statement.targets: + if isinstance(target, ast.Name) \ + and target.id == attr_name: + value = ast.literal_eval(statement.value) + found = True + elif isinstance(target, ast.Tuple) \ + and any(isinstance(t, ast.Name) and t.id==attr_name + for t in target.elts): + stmnt_value = ast.literal_eval(statement.value) + for t,v in zip(target.elts, stmnt_value): + if isinstance(t, ast.Name) \ + and t.id == attr_name: + value = v + found = True + if not found: + raise DistutilsOptionError( + 'No literal assignment to {!r} found in file' + .format(attr_name) + ) return value diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 2fa0b374e2..03e6916bd9 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -300,6 +300,37 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + def test_literal_version(self, tmpdir): + + _, config = fake_env( + tmpdir, + '[metadata]\n' + 'version = literal_attr: fake_package.VERSION\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + + config.write( + '[metadata]\n' + 'version = literal_attr: fake_package.VERSION_MAJOR\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1' + + subpack = tmpdir.join('fake_package').mkdir('subpackage') + subpack.join('__init__.py').write('') + subpack.join('submodule.py').write( + 'import third_party_module\n' + 'VERSION = (2016, 11, 26)' + ) + + config.write( + '[metadata]\n' + 'version = attr: fake_package.subpackage.submodule.VERSION\n' + ) + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '2016.11.26' + def test_version_file(self, tmpdir): _, config = fake_env( @@ -332,6 +363,17 @@ def test_version_with_package_dir_simple(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' + config.write( + '[metadata]\n' + 'version = literal_attr: fake_package_simple.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' = src\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + def test_version_with_package_dir_rename(self, tmpdir): _, config = fake_env( @@ -347,6 +389,17 @@ def test_version_with_package_dir_rename(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' + config.write( + '[metadata]\n' + 'version = literal_attr: fake_package_rename.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' fake_package_rename = fake_dir\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + def test_version_with_package_dir_complex(self, tmpdir): _, config = fake_env( @@ -362,6 +415,17 @@ def test_version_with_package_dir_complex(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' + config.write( + '[metadata]\n' + 'version = literal_attr: fake_package_complex.VERSION\n' + '[options]\n' + 'package_dir =\n' + ' fake_package_complex = src/fake_dir\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.metadata.version == '1.2.3' + def test_unknown_meta_item(self, tmpdir): fake_env( From 2bbd4d72225ad4f717be65460940292b50bd781e Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sat, 27 Apr 2019 19:31:21 +0000 Subject: [PATCH 7877/8469] Update documentation --- docs/setuptools.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index ec58b754fc..3e616582ff 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2193,7 +2193,7 @@ Metadata and options are set in the config sections of the same name. * In some cases, complex values can be provided in dedicated subsections for clarity. -* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in +* Some keys allow ``file:``, ``attr:``, ``literal_attr:``, ``find:``, and ``find_namespace:`` directives in order to cover common usecases. * Unknown keys are ignored. @@ -2290,6 +2290,15 @@ Special directives: * ``attr:`` - Value is read from a module attribute. ``attr:`` supports callables and iterables; unsupported types are cast using ``str()``. + +* ``literal_attr:`` — Like ``attr:``, except that the value is parsed using + ``ast.literal_eval()`` instead of by importing the module. This allows one + to specify an attribute of a module that imports one or more third-party + modules without having to install those modules first; as a downside, + ``literal_attr:`` only supports variables that are assigned constant + expressions, not more complex assignments like ``__version__ = + '.'.join(map(str, (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)))``. + * ``file:`` - Value is read from a list of files and then concatenated @@ -2305,14 +2314,14 @@ Metadata The aliases given below are supported for compatibility reasons, but their use is not advised. -============================== ================= ================= =============== ===== -Key Aliases Type Minimum Version Notes -============================== ================= ================= =============== ===== +============================== ================= ================================ =============== ===== +Key Aliases Type Minimum Version Notes +============================== ================= ================================ =============== ===== name str -version attr:, file:, str 39.2.0 (1) +version attr:, literal_attr:, file:, str 39.2.0 (1) url home-page str download_url download-url str -project_urls dict 38.3.0 +project_urls dict 38.3.0 author str author_email author-email str maintainer str @@ -2323,13 +2332,13 @@ license_file str license_files list-comma description summary file:, str long_description long-description file:, str -long_description_content_type str 38.6.0 +long_description_content_type str 38.6.0 keywords list-comma platforms platform list-comma provides list-comma requires list-comma obsoletes list-comma -============================== ================= ================= =============== ===== +============================== ================= ================================ =============== ===== .. note:: A version loaded using the ``file:`` directive must comply with PEP 440. From 130cbede42d3d351fc21bb35c18c1be7e108df46 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sat, 27 Apr 2019 19:54:51 +0000 Subject: [PATCH 7878/8469] Added changelog.d news fragment --- changelog.d/1753.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1753.change.rst diff --git a/changelog.d/1753.change.rst b/changelog.d/1753.change.rst new file mode 100644 index 0000000000..0f27bb2e46 --- /dev/null +++ b/changelog.d/1753.change.rst @@ -0,0 +1 @@ +Added a ``literal_attr:`` config directive to support reading versions from attributes of modules that import third-party modules From d6bcf5e89ef6a523c2476b249aba810af9808d8b Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Fri, 15 May 2020 21:17:49 +0000 Subject: [PATCH 7879/8469] Merge `literal_attr:` functionality into `attr:` --- changelog.d/1753.change.rst | 5 +- docs/setuptools.txt | 27 +++++----- setuptools/config.py | 87 +++++++++++++++------------------ setuptools/tests/test_config.py | 54 +------------------- 4 files changed, 57 insertions(+), 116 deletions(-) diff --git a/changelog.d/1753.change.rst b/changelog.d/1753.change.rst index 0f27bb2e46..c8b68026c2 100644 --- a/changelog.d/1753.change.rst +++ b/changelog.d/1753.change.rst @@ -1 +1,4 @@ -Added a ``literal_attr:`` config directive to support reading versions from attributes of modules that import third-party modules +``attr:`` now extracts variables through rudimentary examination of the AST, +thereby supporting modules with third-party imports. If examining the AST +fails to find the variable, ``attr:`` falls back to the old behavior of +importing the module. diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 3e616582ff..c37b7ec5c5 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2193,7 +2193,7 @@ Metadata and options are set in the config sections of the same name. * In some cases, complex values can be provided in dedicated subsections for clarity. -* Some keys allow ``file:``, ``attr:``, ``literal_attr:``, ``find:``, and ``find_namespace:`` directives in +* Some keys allow ``file:``, ``attr:``, ``find:``, and ``find_namespace:`` directives in order to cover common usecases. * Unknown keys are ignored. @@ -2291,13 +2291,10 @@ Special directives: * ``attr:`` - Value is read from a module attribute. ``attr:`` supports callables and iterables; unsupported types are cast using ``str()``. -* ``literal_attr:`` — Like ``attr:``, except that the value is parsed using - ``ast.literal_eval()`` instead of by importing the module. This allows one - to specify an attribute of a module that imports one or more third-party - modules without having to install those modules first; as a downside, - ``literal_attr:`` only supports variables that are assigned constant - expressions, not more complex assignments like ``__version__ = - '.'.join(map(str, (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)))``. + In order to support the common case of a literal value assigned to a variable + in a module containing (directly or indirectly) third-party imports, + ``attr:`` first tries to read the value from the module by examining the + module's AST. If that fails, ``attr:`` falls back to importing the module. * ``file:`` - Value is read from a list of files and then concatenated @@ -2314,14 +2311,14 @@ Metadata The aliases given below are supported for compatibility reasons, but their use is not advised. -============================== ================= ================================ =============== ===== -Key Aliases Type Minimum Version Notes -============================== ================= ================================ =============== ===== +============================== ================= ================= =============== ===== +Key Aliases Type Minimum Version Notes +============================== ================= ================= =============== ===== name str -version attr:, literal_attr:, file:, str 39.2.0 (1) +version attr:, file:, str 39.2.0 (1) url home-page str download_url download-url str -project_urls dict 38.3.0 +project_urls dict 38.3.0 author str author_email author-email str maintainer str @@ -2332,13 +2329,13 @@ license_file str license_files list-comma description summary file:, str long_description long-description file:, str -long_description_content_type str 38.6.0 +long_description_content_type str 38.6.0 keywords list-comma platforms platform list-comma provides list-comma requires list-comma obsoletes list-comma -============================== ================= ================================ =============== ===== +============================== ================= ================= =============== ===== .. note:: A version loaded using the ``file:`` directive must comply with PEP 440. diff --git a/setuptools/config.py b/setuptools/config.py index d1456cac18..0a2f51e212 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -317,22 +317,15 @@ def _parse_attr(cls, value, package_dir=None): Examples: attr: package.attr attr: package.module.attr - literal_attr: package.attr - literal_attr: package.module.attr :param str value: :rtype: str """ attr_directive = 'attr:' - literal_attr_directive = 'literal_attr:' - if value.startswith(attr_directive): - directive = attr_directive - elif value.startswith(literal_attr_directive): - directive = literal_attr_directive - else: + if not value.startswith(attr_directive): return value - attrs_path = value.replace(directive, '').strip().split('.') + attrs_path = value.replace(attr_directive, '').strip().split('.') attr_name = attrs_path.pop() module_name = '.'.join(attrs_path) @@ -352,50 +345,50 @@ def _parse_attr(cls, value, package_dir=None): elif '' in package_dir: # A custom parent directory was specified for all root modules parent_path = os.path.join(os.getcwd(), package_dir['']) - if directive == attr_directive: + + fpath = os.path.join(parent_path, *module_name.split('.')) + if os.path.exists(fpath + '.py'): + fpath += '.py' + elif os.path.isdir(fpath): + fpath = os.path.join(fpath, '__init__.py') + else: + raise DistutilsOptionError('Could not find module ' + module_name) + with open(fpath, 'rb') as fp: + src = fp.read() + found = False + top_level = ast.parse(src) + for statement in top_level.body: + if isinstance(statement, ast.Assign): + for target in statement.targets: + if isinstance(target, ast.Name) \ + and target.id == attr_name: + try: + value = ast.literal_eval(statement.value) + except ValueError: + found = False + else: + found = True + elif isinstance(target, ast.Tuple) \ + and any(isinstance(t, ast.Name) and t.id == attr_name + for t in target.elts): + try: + stmnt_value = ast.literal_eval(statement.value) + except ValueError: + found = False + else: + for t, v in zip(target.elts, stmnt_value): + if isinstance(t, ast.Name) \ + and t.id == attr_name: + value = v + found = True + if not found: + # Fall back to extracting attribute via importing sys.path.insert(0, parent_path) try: module = import_module(module_name) value = getattr(module, attr_name) finally: sys.path = sys.path[1:] - - elif directive == literal_attr_directive: - fpath = os.path.join(parent_path, *module_name.split('.')) - if os.path.exists(fpath + '.py'): - fpath += '.py' - elif os.path.isdir(fpath): - fpath = os.path.join(fpath, '__init__.py') - else: - raise DistutilsOptionError( - 'Could not find module ' + module_name - ) - with open(fpath, 'rb') as fp: - src = fp.read() - found = False - top_level = ast.parse(src) - for statement in top_level.body: - if isinstance(statement, ast.Assign): - for target in statement.targets: - if isinstance(target, ast.Name) \ - and target.id == attr_name: - value = ast.literal_eval(statement.value) - found = True - elif isinstance(target, ast.Tuple) \ - and any(isinstance(t, ast.Name) and t.id==attr_name - for t in target.elts): - stmnt_value = ast.literal_eval(statement.value) - for t,v in zip(target.elts, stmnt_value): - if isinstance(t, ast.Name) \ - and t.id == attr_name: - value = v - found = True - if not found: - raise DistutilsOptionError( - 'No literal assignment to {!r} found in file' - .format(attr_name) - ) - return value @classmethod diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 03e6916bd9..d8347c78b9 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -103,7 +103,7 @@ def test_ignore_errors(self, tmpdir): 'version = attr: none.VERSION\n' 'keywords = one, two\n' ) - with pytest.raises(ImportError): + with pytest.raises(DistutilsOptionError): read_configuration('%s' % config) config_dict = read_configuration( @@ -300,25 +300,6 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - def test_literal_version(self, tmpdir): - - _, config = fake_env( - tmpdir, - '[metadata]\n' - 'version = literal_attr: fake_package.VERSION\n' - ) - with get_dist(tmpdir) as dist: - assert dist.metadata.version == '1.2.3' - - config.write( - '[metadata]\n' - 'version = literal_attr: fake_package.VERSION_MAJOR\n' - ) - with get_dist(tmpdir) as dist: - assert dist.metadata.version == '1' - - subpack = tmpdir.join('fake_package').mkdir('subpackage') - subpack.join('__init__.py').write('') subpack.join('submodule.py').write( 'import third_party_module\n' 'VERSION = (2016, 11, 26)' @@ -363,17 +344,6 @@ def test_version_with_package_dir_simple(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' - config.write( - '[metadata]\n' - 'version = literal_attr: fake_package_simple.VERSION\n' - '[options]\n' - 'package_dir =\n' - ' = src\n' - ) - - with get_dist(tmpdir) as dist: - assert dist.metadata.version == '1.2.3' - def test_version_with_package_dir_rename(self, tmpdir): _, config = fake_env( @@ -389,17 +359,6 @@ def test_version_with_package_dir_rename(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' - config.write( - '[metadata]\n' - 'version = literal_attr: fake_package_rename.VERSION\n' - '[options]\n' - 'package_dir =\n' - ' fake_package_rename = fake_dir\n' - ) - - with get_dist(tmpdir) as dist: - assert dist.metadata.version == '1.2.3' - def test_version_with_package_dir_complex(self, tmpdir): _, config = fake_env( @@ -415,17 +374,6 @@ def test_version_with_package_dir_complex(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' - config.write( - '[metadata]\n' - 'version = literal_attr: fake_package_complex.VERSION\n' - '[options]\n' - 'package_dir =\n' - ' fake_package_complex = src/fake_dir\n' - ) - - with get_dist(tmpdir) as dist: - assert dist.metadata.version == '1.2.3' - def test_unknown_meta_item(self, tmpdir): fake_env( From e1824c093bf89e8875ddd329f316b9ed3e7dd533 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 19:54:13 -0400 Subject: [PATCH 7880/8469] Extract StaticModule and patch_path helpers. --- setuptools/config.py | 88 +++++++++++++++++---------------- setuptools/tests/test_config.py | 2 +- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index 0a2f51e212..cd1b115e16 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -10,6 +10,7 @@ from functools import partial from functools import wraps from importlib import import_module +import contextlib from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.extern.packaging.version import LegacyVersion, parse @@ -20,6 +21,44 @@ __metaclass__ = type +class StaticModule: + """ + Attempt to load the module by the name + """ + def __init__(self, name): + spec = importlib.util.find_spec(module_name) + with open(spec.origin) as strm: + src = strm.read() + module = ast.parse(src) + vars(self).update(locals()) + del self.self + + def __getattr__(self, attr): + try: + return next( + ast.literal_eval(statement.value) + for statement in self.module.body + if isinstance(statement, ast.Assign) + for target in statement.targets + if isinstance(target, ast.Name) and target.id == attr + ) + except Exception: + raise AttributeError( + "{self.name} has no attribute {attr}".format(**locals())) + + +@contextlib.contextmanager +def patch_path(path): + """ + Add path to front of sys.path for the duration of the context. + """ + try: + sys.path.insert(0, path) + yield + finally: + sys.path.remove(path) + + def read_configuration( filepath, find_others=False, ignore_option_errors=False): """Read given configuration file and returns options from it as a dict. @@ -346,50 +385,15 @@ def _parse_attr(cls, value, package_dir=None): # A custom parent directory was specified for all root modules parent_path = os.path.join(os.getcwd(), package_dir['']) - fpath = os.path.join(parent_path, *module_name.split('.')) - if os.path.exists(fpath + '.py'): - fpath += '.py' - elif os.path.isdir(fpath): - fpath = os.path.join(fpath, '__init__.py') - else: - raise DistutilsOptionError('Could not find module ' + module_name) - with open(fpath, 'rb') as fp: - src = fp.read() - found = False - top_level = ast.parse(src) - for statement in top_level.body: - if isinstance(statement, ast.Assign): - for target in statement.targets: - if isinstance(target, ast.Name) \ - and target.id == attr_name: - try: - value = ast.literal_eval(statement.value) - except ValueError: - found = False - else: - found = True - elif isinstance(target, ast.Tuple) \ - and any(isinstance(t, ast.Name) and t.id == attr_name - for t in target.elts): - try: - stmnt_value = ast.literal_eval(statement.value) - except ValueError: - found = False - else: - for t, v in zip(target.elts, stmnt_value): - if isinstance(t, ast.Name) \ - and t.id == attr_name: - value = v - found = True - if not found: - # Fall back to extracting attribute via importing - sys.path.insert(0, parent_path) + with patch_path(parent_path): try: + # attempt to load value statically + return getattr(StaticModule(module_name), attr_name) + except Exception: + # fallback to simple import module = import_module(module_name) - value = getattr(module, attr_name) - finally: - sys.path = sys.path[1:] - return value + + return getattr(module, attr_name) @classmethod def _get_parser_compound(cls, *parse_methods): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index d8347c78b9..961f8d4217 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -103,7 +103,7 @@ def test_ignore_errors(self, tmpdir): 'version = attr: none.VERSION\n' 'keywords = one, two\n' ) - with pytest.raises(DistutilsOptionError): + with pytest.raises(ImportError): read_configuration('%s' % config) config_dict = read_configuration( From 43bbaa5827d38eede4ca8c837c9fc4994f9ab665 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 20:13:05 -0400 Subject: [PATCH 7881/8469] Fix imports --- setuptools/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/config.py b/setuptools/config.py index cd1b115e16..b39ac7183d 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -6,10 +6,10 @@ import warnings import functools +import importlib from collections import defaultdict from functools import partial from functools import wraps -from importlib import import_module import contextlib from distutils.errors import DistutilsOptionError, DistutilsFileError @@ -391,7 +391,7 @@ def _parse_attr(cls, value, package_dir=None): return getattr(StaticModule(module_name), attr_name) except Exception: # fallback to simple import - module = import_module(module_name) + module = importlib.import_module(module_name) return getattr(module, attr_name) From a11c8eac4bf7e1b97f489395565d96076285617d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 20:18:54 -0400 Subject: [PATCH 7882/8469] Alter test so it actually triggers the intended behavior. --- setuptools/tests/test_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 961f8d4217..6840a8e283 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -300,14 +300,14 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - subpack.join('submodule.py').write( + subpack.join('othersub.py').write( 'import third_party_module\n' 'VERSION = (2016, 11, 26)' ) config.write( '[metadata]\n' - 'version = attr: fake_package.subpackage.submodule.VERSION\n' + 'version = attr: fake_package.subpackage.othersub.VERSION\n' ) with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' From af199e99549df07f9457567a26a0da8af069f513 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 20:23:25 -0400 Subject: [PATCH 7883/8469] Fix error in StaticModule implementation. --- setuptools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/config.py b/setuptools/config.py index b39ac7183d..45df2e3f2e 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -26,7 +26,7 @@ class StaticModule: Attempt to load the module by the name """ def __init__(self, name): - spec = importlib.util.find_spec(module_name) + spec = importlib.util.find_spec(name) with open(spec.origin) as strm: src = strm.read() module = ast.parse(src) From 7681ff9f70f33651f40c7b64a8186471a7014515 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 20:57:15 -0400 Subject: [PATCH 7884/8469] Delete packages from sys.modules --- setuptools/tests/test_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 6840a8e283..942050e0d7 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +import sys import contextlib + import pytest from distutils.errors import DistutilsOptionError, DistutilsFileError @@ -300,6 +302,9 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + del sys.modules['fake_package'] + del sys.modules['fake_package.subpackage'] + subpack.join('othersub.py').write( 'import third_party_module\n' 'VERSION = (2016, 11, 26)' From 4c62d634784a935eb0fbeedc174a25b82f05e1d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 21:21:30 -0400 Subject: [PATCH 7885/8469] Update test to create separate subpackages. Hoping that avoids issues with caching. --- setuptools/tests/test_config.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 942050e0d7..eeac32cecd 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -import sys import contextlib import pytest @@ -291,28 +290,27 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1' - subpack = tmpdir.join('fake_package').mkdir('subpackage') - subpack.join('__init__.py').write('') - subpack.join('submodule.py').write('VERSION = (2016, 11, 26)') + sub_a = tmpdir.join('fake_package').mkdir('subpkg_a') + sub_a.join('__init__.py').write('') + sub_a.join('mod.py').write('VERSION = (2016, 11, 26)') config.write( '[metadata]\n' - 'version = attr: fake_package.subpackage.submodule.VERSION\n' + 'version = attr: fake_package.subpkg_a.mod.VERSION\n' ) with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - del sys.modules['fake_package'] - del sys.modules['fake_package.subpackage'] - - subpack.join('othersub.py').write( + sub_b = tmpdir.join('fake_package').mkdir('subpkg_b') + sub_b.join('__init__.py').write('') + sub_b.join('mod.py').write( 'import third_party_module\n' 'VERSION = (2016, 11, 26)' ) config.write( '[metadata]\n' - 'version = attr: fake_package.subpackage.othersub.VERSION\n' + 'version = attr: fake_package.subpkg_b.mod.VERSION\n' ) with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' From 55456fe32ab2b5d7a4d476149ba935dbfd6e5fca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 21:45:40 -0400 Subject: [PATCH 7886/8469] Try constructing the fake package at the beginning of the test. --- setuptools/tests/test_config.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index eeac32cecd..77b853eba9 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -54,6 +54,7 @@ def fake_env( ' return [3, 4, 5, "dev"]\n' '\n' ) + return package_dir, config @@ -268,11 +269,23 @@ def test_dict(self, tmpdir): def test_version(self, tmpdir): - _, config = fake_env( + package_dir, config = fake_env( tmpdir, '[metadata]\n' 'version = attr: fake_package.VERSION\n' ) + + sub_a = package_dir.mkdir('subpkg_a') + sub_a.join('__init__.py').write('') + sub_a.join('mod.py').write('VERSION = (2016, 11, 26)') + + sub_b = package_dir.mkdir('subpkg_b') + sub_b.join('__init__.py').write('') + sub_b.join('mod.py').write( + 'import third_party_module\n' + 'VERSION = (2016, 11, 26)' + ) + with get_dist(tmpdir) as dist: assert dist.metadata.version == '1.2.3' @@ -290,10 +303,6 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '1' - sub_a = tmpdir.join('fake_package').mkdir('subpkg_a') - sub_a.join('__init__.py').write('') - sub_a.join('mod.py').write('VERSION = (2016, 11, 26)') - config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_a.mod.VERSION\n' @@ -301,13 +310,6 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - sub_b = tmpdir.join('fake_package').mkdir('subpkg_b') - sub_b.join('__init__.py').write('') - sub_b.join('mod.py').write( - 'import third_party_module\n' - 'VERSION = (2016, 11, 26)' - ) - config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_b.mod.VERSION\n' From 39a37c0758f43b130e5163156facffbbe89cf9fa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 22:18:25 -0400 Subject: [PATCH 7887/8469] Disable test on Python 2. --- changelog.d/1753.change.rst | 4 ++-- setuptools/tests/test_config.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.d/1753.change.rst b/changelog.d/1753.change.rst index c8b68026c2..08fa9ea499 100644 --- a/changelog.d/1753.change.rst +++ b/changelog.d/1753.change.rst @@ -1,4 +1,4 @@ ``attr:`` now extracts variables through rudimentary examination of the AST, -thereby supporting modules with third-party imports. If examining the AST +thereby supporting modules with third-party imports. If examining the AST fails to find the variable, ``attr:`` falls back to the old behavior of -importing the module. +importing the module. Works on Python 3 only. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 77b853eba9..67992c041f 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -10,6 +10,7 @@ from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration from setuptools.extern.six.moves import configparser +from setuptools.extern import six from . import py2_only, py3_only from .textwrap import DALS @@ -310,6 +311,10 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + if six.PY2: + # static version loading is unsupported on Python 2 + return + config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_b.mod.VERSION\n' From b92164bd9ecc08374e1e5e810cf0bc37c8fb9aca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 May 2020 22:20:49 -0400 Subject: [PATCH 7888/8469] =?UTF-8?q?Bump=20version:=2046.3.1=20=E2=86=92?= =?UTF-8?q?=2046.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/1753.change.rst | 4 ---- setup.cfg | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/1753.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4ee9218515..72d02f2b59 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.3.1 +current_version = 46.4.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index fd3c16ba05..ea667028a2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v46.4.0 +------- + +* #1753: ``attr:`` now extracts variables through rudimentary examination of the AST, + thereby supporting modules with third-party imports. If examining the AST + fails to find the variable, ``attr:`` falls back to the old behavior of + importing the module. Works on Python 3 only. + + v46.3.1 ------- diff --git a/changelog.d/1753.change.rst b/changelog.d/1753.change.rst deleted file mode 100644 index 08fa9ea499..0000000000 --- a/changelog.d/1753.change.rst +++ /dev/null @@ -1,4 +0,0 @@ -``attr:`` now extracts variables through rudimentary examination of the AST, -thereby supporting modules with third-party imports. If examining the AST -fails to find the variable, ``attr:`` falls back to the old behavior of -importing the module. Works on Python 3 only. diff --git a/setup.cfg b/setup.cfg index 3933714b11..72d4dce92c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.3.1 +version = 46.4.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 04dbe6f9434bd73ba839f2fd386c63133a8381d1 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 18 May 2020 10:55:58 -0400 Subject: [PATCH 7889/8469] docs: WIP update quickstart guide to make it pep517-compatible and declarative --- docs/userguide/quickstart.txt | 109 +++++++++++++++++----------------- 1 file changed, 53 insertions(+), 56 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index e75d74e181..fd203b1609 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -13,78 +13,75 @@ To install the latest version of setuptools, use:: Refer to `Installing Packages`_ guide for more information. +Python packaging at a glance +============================ + +The landscape of Python packaging is shifting and ``Setuptools`` has evolved to +only provide backend support, no longer being the de-facto packaging tool in +the market. All python package must provide a ``pyproject.toml`` and specify +the backend (build system) it wants to use. The distribution can then +be generated with whatever tools that provides a ``build sdist``-alike +functionality. While this may appear cumbersome, given the added pieces, +it in fact tremendously enhances the portability of your package. The +change is driven under `PEP 517 `` + Basic Use ========= -For basic use of setuptools, just import things from setuptools. Here's a -minimal setup script using setuptools:: +For basic use of setuptools, you will need a ``pyproject.toml`` with the +exact following info, which declares you want to use ``setuptools`` to +package your project: - from setuptools import setup, find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - ) +.. code-block:: toml + + [build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta" + +Then, you will need a ``setup.cfg`` to specify your package information, +such as metadata, contents, dependencies, etc. Here we demonstrate the minimum + +.. code-block:: ini + + [metadata] + name = "mypackage" + version = 0.0.1 -As you can see, it doesn't take much to use setuptools in a project. -Run that script in your project folder, alongside the Python packages -you have developed. + [options] + packages = "mypackage" + install_requires = + requests + importlib; python_version == "2.6" -Invoke that script to produce distributions and automatically include all -packages in the directory where the setup.py lives. See the `Command -Reference`_ section below to see what commands you can give to this setup -script. For example, to produce a source distribution, simply invoke:: +This is what your project would look like:: - setup.py sdist + ~/mypackage/ + pyproject.toml + setup.cfg + mypackage/__init__.py + +As you can see, it doesn't take much to use setuptools in a project. Invoke +the installer at the root of your package:: + + pep517 build + +You now have your distribution ready, which you can upload to PyPI. Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your project. And maybe your project will have grown by then to include a few -dependencies, and perhaps some data files and scripts:: - - from setuptools import setup, find_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_packages(), - scripts=["say_hello.py"], - - # Project uses reStructuredText, so ensure that the docutils get - # installed or upgraded on the target machine - install_requires=["docutils>=0.3"], - - package_data={ - # If any package contains *.txt or *.rst files, include them: - "": ["*.txt", "*.rst"], - # And include any *.msg files found in the "hello" package, too: - "hello": ["*.msg"], - }, - - # metadata to display on PyPI - author="Me", - author_email="me@example.com", - description="This is an Example Package", - keywords="hello world example examples", - url="http://example.com/HelloWorld/", # project home page, if any - project_urls={ - "Bug Tracker": "https://bugs.example.com/HelloWorld/", - "Documentation": "https://docs.example.com/HelloWorld/", - "Source Code": "https://code.example.com/HelloWorld/", - }, - classifiers=[ - "License :: OSI Approved :: Python Software Foundation License" - ] - - # could also include long_description, download_url, etc. - ) +dependencies, and perhaps some data files and scripts. In the next few section, +we will walk through those additional but essential information you need +to specify to properly package your project. Automatic package discovery =========================== For simple projects, it's usually easy enough to manually add packages to -the ``packages`` argument of ``setup()``. However, for very large projects -, it can be a big burden to keep the package list updated. setuptools therefore -provides tools to ease the burden. +the ``packages`` keyword in ``setup.cfg``. However, for very large projects +, it can be a big burden to keep the package list updated. ``setuptools`` +therefore provides tools to ease the burden. ``find_packages()`` takes a source directory and two lists of package name patterns to exclude and include. It then walks the target directory, filtering From c849875356f0ca3b12257cd22a2a1c0bd1603884 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Tue, 19 May 2020 00:52:04 -0500 Subject: [PATCH 7890/8469] use a less confusing example for requirements parsing --- docs/pkg_resources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 71568c1a1a..f2e554f42c 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -594,7 +594,7 @@ Requirements Parsing FooProject >= 1.2 Fizzy [foo, bar] - PickyThing<1.6,>1.9,!=1.9.6,<2.0a0,==2.4c1 + PickyThing>1.6,<=1.9,!=1.8.6 SomethingWhoseVersionIDontCareAbout SomethingWithMarker[foo]>1.0;python_version<"2.7" From 5210488f65e41038e5721d31792fae784c39d649 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 20 May 2020 16:37:25 +0200 Subject: [PATCH 7891/8469] bpo-40698: Improve distutils upload hash digests (GH-20260) - Fix upload test on systems that blocks MD5 - Add SHA2-256 and Blake2b-256 digests based on new Warehous and twine specs. Signed-off-by: Christian Heimes --- command/upload.py | 22 +++++++++++++++++++++- tests/test_upload.py | 24 ++++++++++++++++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/command/upload.py b/command/upload.py index d822ba0133..95e9fda186 100644 --- a/command/upload.py +++ b/command/upload.py @@ -16,6 +16,16 @@ from distutils.spawn import spawn from distutils import log + +# PyPI Warehouse supports MD5, SHA256, and Blake2 (blake2-256) +# https://bugs.python.org/issue40698 +_FILE_CONTENT_DIGESTS = { + "md5_digest": getattr(hashlib, "md5", None), + "sha256_digest": getattr(hashlib, "sha256", None), + "blake2_256_digest": getattr(hashlib, "blake2b", None), +} + + class upload(PyPIRCCommand): description = "upload binary package to PyPI" @@ -87,6 +97,7 @@ def upload_file(self, command, pyversion, filename): content = f.read() finally: f.close() + meta = self.distribution.metadata data = { # action @@ -101,7 +112,6 @@ def upload_file(self, command, pyversion, filename): 'content': (os.path.basename(filename),content), 'filetype': command, 'pyversion': pyversion, - 'md5_digest': hashlib.md5(content).hexdigest(), # additional meta-data 'metadata_version': '1.0', @@ -123,6 +133,16 @@ def upload_file(self, command, pyversion, filename): data['comment'] = '' + # file content digests + for digest_name, digest_cons in _FILE_CONTENT_DIGESTS.items(): + if digest_cons is None: + continue + try: + data[digest_name] = digest_cons(content).hexdigest() + except ValueError: + # hash digest not available or blocked by security policy + pass + if self.sign: with open(filename + ".asc", "rb") as f: data['gpg_signature'] = (os.path.basename(filename) + ".asc", diff --git a/tests/test_upload.py b/tests/test_upload.py index c17d8e7d54..bca5516d2f 100644 --- a/tests/test_upload.py +++ b/tests/test_upload.py @@ -130,14 +130,30 @@ def test_upload(self): # what did we send ? headers = dict(self.last_open.req.headers) - self.assertEqual(headers['Content-length'], '2162') + self.assertGreaterEqual(int(headers['Content-length']), 2162) content_type = headers['Content-type'] self.assertTrue(content_type.startswith('multipart/form-data')) self.assertEqual(self.last_open.req.get_method(), 'POST') expected_url = 'https://upload.pypi.org/legacy/' self.assertEqual(self.last_open.req.get_full_url(), expected_url) - self.assertTrue(b'xxx' in self.last_open.req.data) - self.assertIn(b'protocol_version', self.last_open.req.data) + data = self.last_open.req.data + self.assertIn(b'xxx',data) + self.assertIn(b'protocol_version', data) + self.assertIn(b'sha256_digest', data) + self.assertIn( + b'cd2eb0837c9b4c962c22d2ff8b5441b7b45805887f051d39bf133b583baf' + b'6860', + data + ) + if b'md5_digest' in data: + self.assertIn(b'f561aaf6ef0bf14d4208bb46a4ccb3ad', data) + if b'blake2_256_digest' in data: + self.assertIn( + b'b6f289a27d4fe90da63c503bfe0a9b761a8f76bb86148565065f040be' + b'6d1c3044cf7ded78ef800509bccb4b648e507d88dc6383d67642aadcc' + b'ce443f1534330a', + data + ) # The PyPI response body was echoed results = self.get_logs(INFO) @@ -166,7 +182,7 @@ def test_upload_correct_cr(self): cmd.run() headers = dict(self.last_open.req.headers) - self.assertEqual(headers['Content-length'], '2172') + self.assertGreaterEqual(int(headers['Content-length']), 2172) self.assertIn(b'long description\r', self.last_open.req.data) def test_upload_fails(self): From cdf8524ec7b419a49f7c2c504798b29b79c3bba8 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Wed, 20 May 2020 15:37:30 -0400 Subject: [PATCH 7892/8469] docs: made quickstart pkg section declarative WIP --- docs/userguide/quickstart.txt | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index fd203b1609..d0fe4a2865 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -81,21 +81,26 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` -therefore provides tools to ease the burden. +therefore provides two convenient tools to ease the burden: ``find: `` and +``find_namespace: ``. To use it in your project: -``find_packages()`` takes a source directory and two lists of package name -patterns to exclude and include. It then walks the target directory, filtering -by inclusion patterns, and return a list of Python packages (any directory). -Finally, exclusion patterns are applied to remove matching packages. +.. code-block:: ini -For example:: - #... - from setuptools import find_packages() + [options] + packages = find: - setup( - #..., - packages = find_packages() - ) + [options.packages.find] #optional + where="." + include=['pkg1', 'pkg2'] + exclude=['pkg3', 'pkg4']] + + +When you pass the above information, alongside other necessary ones, +``setuptools`` walks through the directory specified in ``where`` (default to +current directory) and filters the packages +it can find following the ``include`` (default to none), then remove +those that match the ``exclude`` and return a list of Python packages. Note +that each entry in the ``[options.packages.find]`` is optional. For more details and advanced use, go to :ref:`package_discovery` From 46dab46d6debf69331b646bff11052dc731d4ae4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 May 2020 15:50:07 -0400 Subject: [PATCH 7893/8469] Add landing page for Python 2 sunset. Ref #2094. --- ...ls-warns-about-python-2-incompatibility.md | 5 +++ docs/python 2 sunset.txt | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docs/python 2 sunset.txt diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md index 2f5fe53dd0..e2d5ed5360 100644 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -40,6 +40,11 @@ try them first. --> - Python installed how: - Virtualenv version (if using virtualenv): n/a +Command(s) that triggered the warning/error (and output): + +``` +``` + Command(s) used to install setuptools (and output): ``` diff --git a/docs/python 2 sunset.txt b/docs/python 2 sunset.txt new file mode 100644 index 0000000000..543487d81b --- /dev/null +++ b/docs/python 2 sunset.txt @@ -0,0 +1,35 @@ +:orphan: + +Python 2 Sunset +=============== + +Since January 2020 and the release of Setuptools 45, Python 2 is no longer supported by the most current release (`discussion `_). Setuptools as a project continues to support Python 2 with bugfixes and important features on Setuptools 44.x. + +By design, most users will be unaffected by this change. That's because Setuptools 45 declares its supported Python versions to exclude Python 2.7, and installers such as pip 9 or later will honor this declaration and prevent installation of Setuptools 45 or later in Python 2 environments. + +Users that do import any portion of Setuptools 45 or later on Python 2 are directed to this documentation to provide guidance on how to work around the issues. + +Workarounds +----------- + +The best recommendation is to avoid Python 2 and move to Python 3 where possible. This project acknowledges that not all environments can drop Python 2 support, so provides other options. + +In less common scenarios, later versions of Setuptools can be installed on unsupported Python versions. In these environments, the installer is advised to first install ``setuptools<45`` to "pin Setuptools" to a compatible version. + +- When using older versions of pip (before 9.0), the ``Requires-Python`` directive is not honored and invalid versions can be installed. Users are advised first to upgrade pip and retry or to pin Setuptools. Use ``pip --version`` to determine the version of pip. +- When using ``easy_install``, ``Requires-Python`` is not honored and later versions can be installed. In this case, users are advised to pin Setuptools. This applies to ``setup.py install`` invocations as well, as they use Setuptools under the hood. + +It's still not working +---------------------- + +If after trying the above steps, the Python environment still has incompatible versions of Setuptools installed, here are some things to try. + +1. Uninstall and reinstall Setuptools. Run ``pip uninstall -y setuptools`` for the relevant environment. Repeat until there is no Setuptools installed. Then ``pip install setuptools``. + +2. If possible, attempt to replicate the problem in a second environment (virtual machine, friend's computer, etc). If the issue is isolated to just one unique enviornment, first determine what is different about those environments (or reinstall/reset the failing one to defaults). + +3. End users who are not themselves the maintainers for the package they are trying to install should contact the support channels for the relevant application. Please be respectful by searching for existing issues and following the latest guidance before reaching out for support. If you do file an issue, be sure to give as much detail as possible to help the maintainers understand how you encountered the issue following their recommended guidance. + +4. Reach out to your local support groups. There's a good chance someone near you has the expertise and willingness to help. + +5. If all else fails, `file this template `_ with Setuptools. Please complete the whole template, providing as much detail about how you encountered the issue. Setuptools maintainers will summarily close tickets filed without any meaningful detail or engagement with the issue. From 64b1a6fa12f7d4f6508008541adbebdcd6ee20a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 May 2020 16:06:38 -0400 Subject: [PATCH 7894/8469] Force fail on Python 2. When doing so, emit an error that directs users to the latest guidance. Fixes #2094. --- ...ls-warns-about-python-2-incompatibility.md | 1 + .travis.yml | 5 ----- pkg_resources/py2_warn.py | 19 +++++++------------ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md index e2d5ed5360..b5fe8abf68 100644 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -28,6 +28,7 @@ Your first course of action should be to reason about how you managed to get an +- [ ] Read [Python 2 Sunset docs](https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html). - [ ] Python 2 is required for this application. - [ ] I maintain the software that installs Setuptools (if not, please contact that project). - [ ] Setuptools installed with pip 9 or later. diff --git a/.travis.yml b/.travis.yml index 3e97f353aa..21716ea61c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,6 @@ language: python jobs: fast_finish: true include: - - &latest_py2 - python: 2.7 - env: TOXENV=py27 - - <<: *latest_py2 - env: LANG=C TOXENV=py27 - python: pypy3 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py index bfc3523415..00cc8bc75d 100644 --- a/pkg_resources/py2_warn.py +++ b/pkg_resources/py2_warn.py @@ -4,18 +4,13 @@ msg = textwrap.dedent(""" - You are running Setuptools on Python 2, which is no longer - supported and - >>> SETUPTOOLS WILL STOP WORKING <<< - in a subsequent release (no sooner than 2020-04-20). - Please ensure you are installing - Setuptools using pip 9.x or later or pin to `setuptools<45` - in your environment. - If you have done those things and are still encountering - this message, please follow up at - https://bit.ly/setuptools-py2-warning. + Encountered a version of Setuptools that no longer supports + this version of Python. Please head to + https://bit.ly/setuptools-py2-warning for support. """) -pre = "Setuptools will stop working on Python 2\n" +pre = "Setuptools no longer works on Python 2\n" -sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60) +if sys.version_info < (3,): + warnings.warn(pre + "*" * 60 + msg + "*" * 60) + raise SystemExit(32) From e23403355f87272c8b0c027b98bf18309c38fa31 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 May 2020 16:14:54 -0400 Subject: [PATCH 7895/8469] Prefer imperative voice --- docs/python 2 sunset.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/python 2 sunset.txt b/docs/python 2 sunset.txt index 543487d81b..6b8016fb04 100644 --- a/docs/python 2 sunset.txt +++ b/docs/python 2 sunset.txt @@ -28,8 +28,8 @@ If after trying the above steps, the Python environment still has incompatible v 2. If possible, attempt to replicate the problem in a second environment (virtual machine, friend's computer, etc). If the issue is isolated to just one unique enviornment, first determine what is different about those environments (or reinstall/reset the failing one to defaults). -3. End users who are not themselves the maintainers for the package they are trying to install should contact the support channels for the relevant application. Please be respectful by searching for existing issues and following the latest guidance before reaching out for support. If you do file an issue, be sure to give as much detail as possible to help the maintainers understand how you encountered the issue following their recommended guidance. +3. End users who are not themselves the maintainers for the package they are trying to install should contact the support channels for the relevant application. Please be respectful by searching for existing issues and following the latest guidance before reaching out for support. When filing an issue, be sure to give as much detail as possible to help the maintainers understand what factors led to the issue after following their recommended guidance. -4. Reach out to your local support groups. There's a good chance someone near you has the expertise and willingness to help. +4. Reach out to your local support groups. There's a good chance someone nearby has the expertise and willingness to help. -5. If all else fails, `file this template `_ with Setuptools. Please complete the whole template, providing as much detail about how you encountered the issue. Setuptools maintainers will summarily close tickets filed without any meaningful detail or engagement with the issue. +5. If all else fails, `file this template `_ with Setuptools. Please complete the whole template, providing as much detail about what factors led to the issue. Setuptools maintainers will summarily close tickets filed without any meaningful detail or engagement with the issue. From eba78d63e3a4b181153a011caec2a3e50eecfee0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 24 May 2020 19:57:55 -0400 Subject: [PATCH 7896/8469] Remove superfluous RequirementParseError. Ref #1832. --- pkg_resources/__init__.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index edd3d2e8c6..56be3c223b 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3068,11 +3068,6 @@ def issue_warning(*args, **kw): warnings.warn(stacklevel=level + 1, *args, **kw) -class RequirementParseError(ValueError): - def __str__(self): - return ' '.join(self.args) - - def parse_requirements(strs): """Yield ``Requirement`` objects for each specification in `strs` @@ -3098,10 +3093,7 @@ def parse_requirements(strs): class Requirement(packaging.requirements.Requirement): def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" - try: - super(Requirement, self).__init__(requirement_string) - except packaging.requirements.InvalidRequirement as e: - raise RequirementParseError(str(e)) + super(Requirement, self).__init__(requirement_string) self.unsafe_name = self.name project_name = safe_name(self.name) self.project_name, self.key = project_name, project_name.lower() From 7c571c264e0f49965ee2dabbcb9f360aa9c91e28 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 10:31:53 -0400 Subject: [PATCH 7897/8469] Reword and simplify note about supported versions. --- .../setuptools-warns-about-python-2-incompatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md index b5fe8abf68..1a4f58f284 100644 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md @@ -13,7 +13,7 @@ Please DO NOT SUBMIT this template without first investigating the issue and ans If you did not intend to use this template, but only meant to file a blank issue, just hit the back button and click "Open a blank issue". -It's by design that Setuptools 45 and later will stop working on Python 2. To ease the transition, Setuptools 45 was released to continue to have Python 2 compatibility, but emit a strenuous warning that it will stop working. +Setuptools 45 dropped support for Python 2 with a strenuous warning and Setuptools 47 fails to run on Python 2. In most cases, using pip 9 or later to install Setuptools from PyPI or any index supporting the Requires-Python metadata will do the right thing and install Setuptools 44.x on Python 2. From e0b3acb4868f8283565fae462b71fb75d1c5a2bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 10:33:46 -0400 Subject: [PATCH 7898/8469] Add changelog entry. --- changelog.d/2094.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2094.breaking.rst diff --git a/changelog.d/2094.breaking.rst b/changelog.d/2094.breaking.rst new file mode 100644 index 0000000000..c278d0fdb4 --- /dev/null +++ b/changelog.d/2094.breaking.rst @@ -0,0 +1 @@ +Setuptools now actively crashes under Python 2. Python 3.5 or later is required. Users of Python 2 should use ``setuptools<45``. From 96f0781f08b3da918ffaafae656623c3c3152682 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 10:39:33 -0400 Subject: [PATCH 7899/8469] Wrap lines and remove newlines between enumerated paragraphs. --- docs/python 2 sunset.txt | 68 ++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/docs/python 2 sunset.txt b/docs/python 2 sunset.txt index 6b8016fb04..a6d768cb2e 100644 --- a/docs/python 2 sunset.txt +++ b/docs/python 2 sunset.txt @@ -3,33 +3,67 @@ Python 2 Sunset =============== -Since January 2020 and the release of Setuptools 45, Python 2 is no longer supported by the most current release (`discussion `_). Setuptools as a project continues to support Python 2 with bugfixes and important features on Setuptools 44.x. +Since January 2020 and the release of Setuptools 45, Python 2 is no longer +supported by the most current release (`discussion +`_). Setuptools as a project +continues to support Python 2 with bugfixes and important features on +Setuptools 44.x. -By design, most users will be unaffected by this change. That's because Setuptools 45 declares its supported Python versions to exclude Python 2.7, and installers such as pip 9 or later will honor this declaration and prevent installation of Setuptools 45 or later in Python 2 environments. +By design, most users will be unaffected by this change. That's because +Setuptools 45 declares its supported Python versions to exclude Python 2.7, +and installers such as pip 9 or later will honor this declaration and prevent +installation of Setuptools 45 or later in Python 2 environments. -Users that do import any portion of Setuptools 45 or later on Python 2 are directed to this documentation to provide guidance on how to work around the issues. +Users that do import any portion of Setuptools 45 or later on Python 2 are +directed to this documentation to provide guidance on how to work around the +issues. Workarounds ----------- -The best recommendation is to avoid Python 2 and move to Python 3 where possible. This project acknowledges that not all environments can drop Python 2 support, so provides other options. +The best recommendation is to avoid Python 2 and move to Python 3 where +possible. This project acknowledges that not all environments can drop Python +2 support, so provides other options. -In less common scenarios, later versions of Setuptools can be installed on unsupported Python versions. In these environments, the installer is advised to first install ``setuptools<45`` to "pin Setuptools" to a compatible version. +In less common scenarios, later versions of Setuptools can be installed on +unsupported Python versions. In these environments, the installer is advised +to first install ``setuptools<45`` to "pin Setuptools" to a compatible +version. -- When using older versions of pip (before 9.0), the ``Requires-Python`` directive is not honored and invalid versions can be installed. Users are advised first to upgrade pip and retry or to pin Setuptools. Use ``pip --version`` to determine the version of pip. -- When using ``easy_install``, ``Requires-Python`` is not honored and later versions can be installed. In this case, users are advised to pin Setuptools. This applies to ``setup.py install`` invocations as well, as they use Setuptools under the hood. +- When using older versions of pip (before 9.0), the ``Requires-Python`` + directive is not honored and invalid versions can be installed. Users are + advised first to upgrade pip and retry or to pin Setuptools. Use ``pip + --version`` to determine the version of pip. +- When using ``easy_install``, ``Requires-Python`` is not honored and later + versions can be installed. In this case, users are advised to pin + Setuptools. This applies to ``setup.py install`` invocations as well, as + they use Setuptools under the hood. It's still not working ---------------------- -If after trying the above steps, the Python environment still has incompatible versions of Setuptools installed, here are some things to try. +If after trying the above steps, the Python environment still has incompatible +versions of Setuptools installed, here are some things to try. -1. Uninstall and reinstall Setuptools. Run ``pip uninstall -y setuptools`` for the relevant environment. Repeat until there is no Setuptools installed. Then ``pip install setuptools``. - -2. If possible, attempt to replicate the problem in a second environment (virtual machine, friend's computer, etc). If the issue is isolated to just one unique enviornment, first determine what is different about those environments (or reinstall/reset the failing one to defaults). - -3. End users who are not themselves the maintainers for the package they are trying to install should contact the support channels for the relevant application. Please be respectful by searching for existing issues and following the latest guidance before reaching out for support. When filing an issue, be sure to give as much detail as possible to help the maintainers understand what factors led to the issue after following their recommended guidance. - -4. Reach out to your local support groups. There's a good chance someone nearby has the expertise and willingness to help. - -5. If all else fails, `file this template `_ with Setuptools. Please complete the whole template, providing as much detail about what factors led to the issue. Setuptools maintainers will summarily close tickets filed without any meaningful detail or engagement with the issue. +1. Uninstall and reinstall Setuptools. Run ``pip uninstall -y setuptools`` for + the relevant environment. Repeat until there is no Setuptools installed. + Then ``pip install setuptools``. +2. If possible, attempt to replicate the problem in a second environment + (virtual machine, friend's computer, etc). If the issue is isolated to just + one unique enviornment, first determine what is different about those + environments (or reinstall/reset the failing one to defaults). +3. End users who are not themselves the maintainers for the package they are + trying to install should contact the support channels for the relevant + application. Please be respectful by searching for existing issues and + following the latest guidance before reaching out for support. When filing + an issue, be sure to give as much detail as possible to help the + maintainers understand what factors led to the issue after following their + recommended guidance. +4. Reach out to your local support groups. There's a good chance someone + nearby has the expertise and willingness to help. +5. If all else fails, `file this template + `_ + with Setuptools. Please complete the whole template, providing as much + detail about what factors led to the issue. Setuptools maintainers will + summarily close tickets filed without any meaningful detail or engagement + with the issue. From dbdd19d4212a35ac501c3f56987c035512ab6557 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 10:40:09 -0400 Subject: [PATCH 7900/8469] s/respectful/considerate of those projects/ --- docs/python 2 sunset.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/python 2 sunset.txt b/docs/python 2 sunset.txt index a6d768cb2e..f7b7ee257f 100644 --- a/docs/python 2 sunset.txt +++ b/docs/python 2 sunset.txt @@ -54,11 +54,11 @@ versions of Setuptools installed, here are some things to try. environments (or reinstall/reset the failing one to defaults). 3. End users who are not themselves the maintainers for the package they are trying to install should contact the support channels for the relevant - application. Please be respectful by searching for existing issues and - following the latest guidance before reaching out for support. When filing - an issue, be sure to give as much detail as possible to help the - maintainers understand what factors led to the issue after following their - recommended guidance. + application. Please be considerate of those projects by searching for + existing issues and following the latest guidance before reaching out for + support. When filing an issue, be sure to give as much detail as possible + to help the maintainers understand what factors led to the issue after + following their recommended guidance. 4. Reach out to your local support groups. There's a good chance someone nearby has the expertise and willingness to help. 5. If all else fails, `file this template From 780b91b3834e49eeb07d35afd1f419fee777f904 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 15:37:30 -0400 Subject: [PATCH 7901/8469] docs: changed some mistaken explanation in quickst --- docs/userguide/quickstart.txt | 97 ++++++++++++++++------------------- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index d0fe4a2865..3798c40296 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -88,19 +88,22 @@ therefore provides two convenient tools to ease the burden: ``find: `` and [options] packages = find: + package_dir= [options.packages.find] #optional - where="." - include=['pkg1', 'pkg2'] - exclude=['pkg3', 'pkg4']] + where= + include=pkg1, pkg2 + exclude=pk3, pk4 When you pass the above information, alongside other necessary ones, ``setuptools`` walks through the directory specified in ``where`` (default to -current directory) and filters the packages +current directory when left empty) and filters the packages it can find following the ``include`` (default to none), then remove those that match the ``exclude`` and return a list of Python packages. Note -that each entry in the ``[options.packages.find]`` is optional. +that each entry in the ``[options.packages.find]`` is optional. And when +``where`` keyword is used, ``package_dir`` also need to be specified (so that +the packages discovered by ``find:`` can actually be loaded) For more details and advanced use, go to :ref:`package_discovery` @@ -110,40 +113,45 @@ Entry points and automatic script creation Setuptools support automatic creation of scripts upon installation, that runs code within your package if you specify them with the ``entry_point`` keyword. This is what allows you to run commands like ``pip install`` instead of having -to type ``python -m pip install``. To accomplish this, consider the following -example:: - - setup( - #.... - entry_points={ - "console_scripts": [ - "foo = my_package.some_module:main_func", - ], - } - ) - -When this project is installed, a ``foo`` script will be installed and will -invoke the ``main_func`` when called by the user. For detailed usage, including -managing the additional or optional dependencies, go to :ref:`entry_point`. +to type ``python -m pip install``. To accomplish this, add the entry_points +keyword in your ``setup.cfg``: + +.. code-block:: ini + + [options] + entry_points = + [console_script] + main = mypkg:some_func + +When this project is installed, a ``main`` script will be installed and will +invoke the ``some_func`` in the ``__init__.py`` file when called by the user. +For detailed usage, including managing the additional or optional dependencies, +go to :ref:`entry_point`. Dependency management ===================== ``setuptools`` supports automatically installing dependencies when a package is installed. The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers:: - - setup( - #... - install_requires = "docutils >= 0.3" - ) +``install_requires`` argument to ``setup.cfg``. It takes a string or list of +strings containing requirement specifiers (A version specifier is one of the +operators <, >, <=, >=, == or !=, followed by a version identifier): -When your project is installed, either by using pip, ``setup.py install``, -or ``setup.py develop``, all of the dependencies not already installed will -be located (via PyPI), downloaded, built (if necessary), and installed. +.. code-block:: ini -For more advanced use, see :ref:`dependency_management` + [options] + install_requires = + docutils >= 0.3 + requests <= 0.4 + +When your project is installed, all of the dependencies not already installed +will be located (via PyPI), downloaded, built (if necessary), and installed. +This, of course, is a simplified scenarios. ``setuptools`` also provide +additional keywords such as ``setup_requires`` that allows you to install +dependencies before running the script, and ``extras_requires`` that take +care of those needed by automatically generated scripts. It also provides +mechanisms to handle dependencies that are not in PyPI. For more advanced use, +see :ref:`dependency_management` Including Data Files ==================== @@ -151,35 +159,18 @@ Including Data Files The distutils have traditionally allowed installation of "data files", which are placed in a platform-specific location. Setuptools offers three ways to specify data files to be included in your packages. For the simpliest use, you -can simply use the ``include_package_data`` keyword e.g.:: +can simply use the ``include_package_data`` keyword: + +.. code-block:: ini - setup( - ... - include_package_data=True - ) + [options] + include_package_data = True This tells setuptools to install any data files it finds in your packages. The data files must be specified via the distutils' ``MANIFEST.in`` file. For more details, see :ref:`datafiles` -Development mode -================ - -Setuptools allows you to deploy your projects for use in a common directory or -staging area, but without copying any files. Thus, you can edit each project's -code in its checkout directory, and only need to run build commands when you -change a project's C extensions or similarly compiled files. - -To do this, use the ``setup.py develop`` command. It works very similarly to -``setup.py install``, except that it doesn't actually install anything. -Instead, it creates a special ``.egg-link`` file in the deployment directory, -that links to your project's source code. And, if your deployment directory is -Python's ``site-packages`` directory, it will also update the -``easy-install.pth`` file to include your project's source code, thereby making -it available on ``sys.path`` for all programs using that Python installation. - -for more information, go to :ref:`development_mode` Distributing a ``setuptools``-based project =========================================== From 8dbae6eea738b17e1a22ea2949993f0bf238a57f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 15:50:00 -0400 Subject: [PATCH 7902/8469] docs: update quickstart It is now declarative and covers the following aspects of packaging: - installation - basic use - package discovery - entry points - dependencies - data files Each section comprises a brief demonstration of the functionality and provide a link to more advanced explanation --- docs/userguide/quickstart.txt | 59 +++++++---------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 3798c40296..95abec0f6a 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -24,7 +24,8 @@ be generated with whatever tools that provides a ``build sdist``-alike functionality. While this may appear cumbersome, given the added pieces, it in fact tremendously enhances the portability of your package. The change is driven under `PEP 517 `` +build-requirements>``. To learn more about Python packaging in general, +navigate to the `bottom `_ of this page. Basic Use ========= @@ -61,12 +62,14 @@ This is what your project would look like:: setup.cfg mypackage/__init__.py -As you can see, it doesn't take much to use setuptools in a project. Invoke -the installer at the root of your package:: +Then, you need an installer, such as ``pep517 Date: Wed, 8 Nov 2017 16:41:32 -0600 Subject: [PATCH 7903/8469] [maint] move all files into subfolder --- README => distutils/README | 0 __init__.py => distutils/__init__.py | 0 _msvccompiler.py => distutils/_msvccompiler.py | 0 archive_util.py => distutils/archive_util.py | 0 bcppcompiler.py => distutils/bcppcompiler.py | 0 ccompiler.py => distutils/ccompiler.py | 0 cmd.py => distutils/cmd.py | 0 {command => distutils/command}/__init__.py | 0 {command => distutils/command}/bdist.py | 0 {command => distutils/command}/bdist_dumb.py | 0 {command => distutils/command}/bdist_msi.py | 0 {command => distutils/command}/bdist_rpm.py | 0 {command => distutils/command}/bdist_wininst.py | 0 {command => distutils/command}/build.py | 0 {command => distutils/command}/build_clib.py | 0 {command => distutils/command}/build_ext.py | 0 {command => distutils/command}/build_py.py | 0 {command => distutils/command}/build_scripts.py | 0 {command => distutils/command}/check.py | 0 {command => distutils/command}/clean.py | 0 {command => distutils/command}/command_template | 0 {command => distutils/command}/config.py | 0 {command => distutils/command}/install.py | 0 {command => distutils/command}/install_data.py | 0 {command => distutils/command}/install_egg_info.py | 0 {command => distutils/command}/install_headers.py | 0 {command => distutils/command}/install_lib.py | 0 {command => distutils/command}/install_scripts.py | 0 {command => distutils/command}/register.py | 0 {command => distutils/command}/sdist.py | 0 {command => distutils/command}/upload.py | 0 .../command}/wininst-10.0-amd64.exe | Bin {command => distutils/command}/wininst-10.0.exe | Bin .../command}/wininst-14.0-amd64.exe | Bin {command => distutils/command}/wininst-14.0.exe | Bin {command => distutils/command}/wininst-6.0.exe | Bin {command => distutils/command}/wininst-7.1.exe | Bin {command => distutils/command}/wininst-8.0.exe | Bin .../command}/wininst-9.0-amd64.exe | Bin {command => distutils/command}/wininst-9.0.exe | Bin config.py => distutils/config.py | 0 core.py => distutils/core.py | 0 cygwinccompiler.py => distutils/cygwinccompiler.py | 0 debug.py => distutils/debug.py | 0 dep_util.py => distutils/dep_util.py | 0 dir_util.py => distutils/dir_util.py | 0 dist.py => distutils/dist.py | 0 errors.py => distutils/errors.py | 0 extension.py => distutils/extension.py | 0 fancy_getopt.py => distutils/fancy_getopt.py | 0 file_util.py => distutils/file_util.py | 0 filelist.py => distutils/filelist.py | 0 log.py => distutils/log.py | 0 msvc9compiler.py => distutils/msvc9compiler.py | 0 msvccompiler.py => distutils/msvccompiler.py | 0 spawn.py => distutils/spawn.py | 0 sysconfig.py => distutils/sysconfig.py | 0 {tests => distutils/tests}/Setup.sample | 0 {tests => distutils/tests}/__init__.py | 0 {tests => distutils/tests}/includetest.rst | 0 {tests => distutils/tests}/support.py | 0 {tests => distutils/tests}/test_archive_util.py | 0 {tests => distutils/tests}/test_bdist.py | 0 {tests => distutils/tests}/test_bdist_dumb.py | 0 {tests => distutils/tests}/test_bdist_msi.py | 0 {tests => distutils/tests}/test_bdist_rpm.py | 0 {tests => distutils/tests}/test_bdist_wininst.py | 0 {tests => distutils/tests}/test_build.py | 0 {tests => distutils/tests}/test_build_clib.py | 0 {tests => distutils/tests}/test_build_ext.py | 0 {tests => distutils/tests}/test_build_py.py | 0 {tests => distutils/tests}/test_build_scripts.py | 0 {tests => distutils/tests}/test_check.py | 0 {tests => distutils/tests}/test_clean.py | 0 {tests => distutils/tests}/test_cmd.py | 0 {tests => distutils/tests}/test_config.py | 0 {tests => distutils/tests}/test_config_cmd.py | 0 {tests => distutils/tests}/test_core.py | 0 {tests => distutils/tests}/test_cygwinccompiler.py | 0 {tests => distutils/tests}/test_dep_util.py | 0 {tests => distutils/tests}/test_dir_util.py | 0 {tests => distutils/tests}/test_dist.py | 0 {tests => distutils/tests}/test_extension.py | 0 {tests => distutils/tests}/test_file_util.py | 0 {tests => distutils/tests}/test_filelist.py | 0 {tests => distutils/tests}/test_install.py | 0 {tests => distutils/tests}/test_install_data.py | 0 {tests => distutils/tests}/test_install_headers.py | 0 {tests => distutils/tests}/test_install_lib.py | 0 {tests => distutils/tests}/test_install_scripts.py | 0 {tests => distutils/tests}/test_log.py | 0 {tests => distutils/tests}/test_msvc9compiler.py | 0 {tests => distutils/tests}/test_msvccompiler.py | 0 {tests => distutils/tests}/test_register.py | 0 {tests => distutils/tests}/test_sdist.py | 0 {tests => distutils/tests}/test_spawn.py | 0 {tests => distutils/tests}/test_sysconfig.py | 0 {tests => distutils/tests}/test_text_file.py | 0 {tests => distutils/tests}/test_unixccompiler.py | 0 {tests => distutils/tests}/test_upload.py | 0 {tests => distutils/tests}/test_util.py | 0 {tests => distutils/tests}/test_version.py | 0 {tests => distutils/tests}/test_versionpredicate.py | 0 text_file.py => distutils/text_file.py | 0 unixccompiler.py => distutils/unixccompiler.py | 0 util.py => distutils/util.py | 0 version.py => distutils/version.py | 0 .../versionpredicate.py | 0 108 files changed, 0 insertions(+), 0 deletions(-) rename README => distutils/README (100%) rename __init__.py => distutils/__init__.py (100%) rename _msvccompiler.py => distutils/_msvccompiler.py (100%) rename archive_util.py => distutils/archive_util.py (100%) rename bcppcompiler.py => distutils/bcppcompiler.py (100%) rename ccompiler.py => distutils/ccompiler.py (100%) rename cmd.py => distutils/cmd.py (100%) rename {command => distutils/command}/__init__.py (100%) rename {command => distutils/command}/bdist.py (100%) rename {command => distutils/command}/bdist_dumb.py (100%) rename {command => distutils/command}/bdist_msi.py (100%) rename {command => distutils/command}/bdist_rpm.py (100%) rename {command => distutils/command}/bdist_wininst.py (100%) rename {command => distutils/command}/build.py (100%) rename {command => distutils/command}/build_clib.py (100%) rename {command => distutils/command}/build_ext.py (100%) rename {command => distutils/command}/build_py.py (100%) rename {command => distutils/command}/build_scripts.py (100%) rename {command => distutils/command}/check.py (100%) rename {command => distutils/command}/clean.py (100%) rename {command => distutils/command}/command_template (100%) rename {command => distutils/command}/config.py (100%) rename {command => distutils/command}/install.py (100%) rename {command => distutils/command}/install_data.py (100%) rename {command => distutils/command}/install_egg_info.py (100%) rename {command => distutils/command}/install_headers.py (100%) rename {command => distutils/command}/install_lib.py (100%) rename {command => distutils/command}/install_scripts.py (100%) rename {command => distutils/command}/register.py (100%) rename {command => distutils/command}/sdist.py (100%) rename {command => distutils/command}/upload.py (100%) rename {command => distutils/command}/wininst-10.0-amd64.exe (100%) rename {command => distutils/command}/wininst-10.0.exe (100%) rename {command => distutils/command}/wininst-14.0-amd64.exe (100%) rename {command => distutils/command}/wininst-14.0.exe (100%) rename {command => distutils/command}/wininst-6.0.exe (100%) rename {command => distutils/command}/wininst-7.1.exe (100%) rename {command => distutils/command}/wininst-8.0.exe (100%) rename {command => distutils/command}/wininst-9.0-amd64.exe (100%) rename {command => distutils/command}/wininst-9.0.exe (100%) rename config.py => distutils/config.py (100%) rename core.py => distutils/core.py (100%) rename cygwinccompiler.py => distutils/cygwinccompiler.py (100%) rename debug.py => distutils/debug.py (100%) rename dep_util.py => distutils/dep_util.py (100%) rename dir_util.py => distutils/dir_util.py (100%) rename dist.py => distutils/dist.py (100%) rename errors.py => distutils/errors.py (100%) rename extension.py => distutils/extension.py (100%) rename fancy_getopt.py => distutils/fancy_getopt.py (100%) rename file_util.py => distutils/file_util.py (100%) rename filelist.py => distutils/filelist.py (100%) rename log.py => distutils/log.py (100%) rename msvc9compiler.py => distutils/msvc9compiler.py (100%) rename msvccompiler.py => distutils/msvccompiler.py (100%) rename spawn.py => distutils/spawn.py (100%) rename sysconfig.py => distutils/sysconfig.py (100%) rename {tests => distutils/tests}/Setup.sample (100%) rename {tests => distutils/tests}/__init__.py (100%) rename {tests => distutils/tests}/includetest.rst (100%) rename {tests => distutils/tests}/support.py (100%) rename {tests => distutils/tests}/test_archive_util.py (100%) rename {tests => distutils/tests}/test_bdist.py (100%) rename {tests => distutils/tests}/test_bdist_dumb.py (100%) rename {tests => distutils/tests}/test_bdist_msi.py (100%) rename {tests => distutils/tests}/test_bdist_rpm.py (100%) rename {tests => distutils/tests}/test_bdist_wininst.py (100%) rename {tests => distutils/tests}/test_build.py (100%) rename {tests => distutils/tests}/test_build_clib.py (100%) rename {tests => distutils/tests}/test_build_ext.py (100%) rename {tests => distutils/tests}/test_build_py.py (100%) rename {tests => distutils/tests}/test_build_scripts.py (100%) rename {tests => distutils/tests}/test_check.py (100%) rename {tests => distutils/tests}/test_clean.py (100%) rename {tests => distutils/tests}/test_cmd.py (100%) rename {tests => distutils/tests}/test_config.py (100%) rename {tests => distutils/tests}/test_config_cmd.py (100%) rename {tests => distutils/tests}/test_core.py (100%) rename {tests => distutils/tests}/test_cygwinccompiler.py (100%) rename {tests => distutils/tests}/test_dep_util.py (100%) rename {tests => distutils/tests}/test_dir_util.py (100%) rename {tests => distutils/tests}/test_dist.py (100%) rename {tests => distutils/tests}/test_extension.py (100%) rename {tests => distutils/tests}/test_file_util.py (100%) rename {tests => distutils/tests}/test_filelist.py (100%) rename {tests => distutils/tests}/test_install.py (100%) rename {tests => distutils/tests}/test_install_data.py (100%) rename {tests => distutils/tests}/test_install_headers.py (100%) rename {tests => distutils/tests}/test_install_lib.py (100%) rename {tests => distutils/tests}/test_install_scripts.py (100%) rename {tests => distutils/tests}/test_log.py (100%) rename {tests => distutils/tests}/test_msvc9compiler.py (100%) rename {tests => distutils/tests}/test_msvccompiler.py (100%) rename {tests => distutils/tests}/test_register.py (100%) rename {tests => distutils/tests}/test_sdist.py (100%) rename {tests => distutils/tests}/test_spawn.py (100%) rename {tests => distutils/tests}/test_sysconfig.py (100%) rename {tests => distutils/tests}/test_text_file.py (100%) rename {tests => distutils/tests}/test_unixccompiler.py (100%) rename {tests => distutils/tests}/test_upload.py (100%) rename {tests => distutils/tests}/test_util.py (100%) rename {tests => distutils/tests}/test_version.py (100%) rename {tests => distutils/tests}/test_versionpredicate.py (100%) rename text_file.py => distutils/text_file.py (100%) rename unixccompiler.py => distutils/unixccompiler.py (100%) rename util.py => distutils/util.py (100%) rename version.py => distutils/version.py (100%) rename versionpredicate.py => distutils/versionpredicate.py (100%) diff --git a/README b/distutils/README similarity index 100% rename from README rename to distutils/README diff --git a/__init__.py b/distutils/__init__.py similarity index 100% rename from __init__.py rename to distutils/__init__.py diff --git a/_msvccompiler.py b/distutils/_msvccompiler.py similarity index 100% rename from _msvccompiler.py rename to distutils/_msvccompiler.py diff --git a/archive_util.py b/distutils/archive_util.py similarity index 100% rename from archive_util.py rename to distutils/archive_util.py diff --git a/bcppcompiler.py b/distutils/bcppcompiler.py similarity index 100% rename from bcppcompiler.py rename to distutils/bcppcompiler.py diff --git a/ccompiler.py b/distutils/ccompiler.py similarity index 100% rename from ccompiler.py rename to distutils/ccompiler.py diff --git a/cmd.py b/distutils/cmd.py similarity index 100% rename from cmd.py rename to distutils/cmd.py diff --git a/command/__init__.py b/distutils/command/__init__.py similarity index 100% rename from command/__init__.py rename to distutils/command/__init__.py diff --git a/command/bdist.py b/distutils/command/bdist.py similarity index 100% rename from command/bdist.py rename to distutils/command/bdist.py diff --git a/command/bdist_dumb.py b/distutils/command/bdist_dumb.py similarity index 100% rename from command/bdist_dumb.py rename to distutils/command/bdist_dumb.py diff --git a/command/bdist_msi.py b/distutils/command/bdist_msi.py similarity index 100% rename from command/bdist_msi.py rename to distutils/command/bdist_msi.py diff --git a/command/bdist_rpm.py b/distutils/command/bdist_rpm.py similarity index 100% rename from command/bdist_rpm.py rename to distutils/command/bdist_rpm.py diff --git a/command/bdist_wininst.py b/distutils/command/bdist_wininst.py similarity index 100% rename from command/bdist_wininst.py rename to distutils/command/bdist_wininst.py diff --git a/command/build.py b/distutils/command/build.py similarity index 100% rename from command/build.py rename to distutils/command/build.py diff --git a/command/build_clib.py b/distutils/command/build_clib.py similarity index 100% rename from command/build_clib.py rename to distutils/command/build_clib.py diff --git a/command/build_ext.py b/distutils/command/build_ext.py similarity index 100% rename from command/build_ext.py rename to distutils/command/build_ext.py diff --git a/command/build_py.py b/distutils/command/build_py.py similarity index 100% rename from command/build_py.py rename to distutils/command/build_py.py diff --git a/command/build_scripts.py b/distutils/command/build_scripts.py similarity index 100% rename from command/build_scripts.py rename to distutils/command/build_scripts.py diff --git a/command/check.py b/distutils/command/check.py similarity index 100% rename from command/check.py rename to distutils/command/check.py diff --git a/command/clean.py b/distutils/command/clean.py similarity index 100% rename from command/clean.py rename to distutils/command/clean.py diff --git a/command/command_template b/distutils/command/command_template similarity index 100% rename from command/command_template rename to distutils/command/command_template diff --git a/command/config.py b/distutils/command/config.py similarity index 100% rename from command/config.py rename to distutils/command/config.py diff --git a/command/install.py b/distutils/command/install.py similarity index 100% rename from command/install.py rename to distutils/command/install.py diff --git a/command/install_data.py b/distutils/command/install_data.py similarity index 100% rename from command/install_data.py rename to distutils/command/install_data.py diff --git a/command/install_egg_info.py b/distutils/command/install_egg_info.py similarity index 100% rename from command/install_egg_info.py rename to distutils/command/install_egg_info.py diff --git a/command/install_headers.py b/distutils/command/install_headers.py similarity index 100% rename from command/install_headers.py rename to distutils/command/install_headers.py diff --git a/command/install_lib.py b/distutils/command/install_lib.py similarity index 100% rename from command/install_lib.py rename to distutils/command/install_lib.py diff --git a/command/install_scripts.py b/distutils/command/install_scripts.py similarity index 100% rename from command/install_scripts.py rename to distutils/command/install_scripts.py diff --git a/command/register.py b/distutils/command/register.py similarity index 100% rename from command/register.py rename to distutils/command/register.py diff --git a/command/sdist.py b/distutils/command/sdist.py similarity index 100% rename from command/sdist.py rename to distutils/command/sdist.py diff --git a/command/upload.py b/distutils/command/upload.py similarity index 100% rename from command/upload.py rename to distutils/command/upload.py diff --git a/command/wininst-10.0-amd64.exe b/distutils/command/wininst-10.0-amd64.exe similarity index 100% rename from command/wininst-10.0-amd64.exe rename to distutils/command/wininst-10.0-amd64.exe diff --git a/command/wininst-10.0.exe b/distutils/command/wininst-10.0.exe similarity index 100% rename from command/wininst-10.0.exe rename to distutils/command/wininst-10.0.exe diff --git a/command/wininst-14.0-amd64.exe b/distutils/command/wininst-14.0-amd64.exe similarity index 100% rename from command/wininst-14.0-amd64.exe rename to distutils/command/wininst-14.0-amd64.exe diff --git a/command/wininst-14.0.exe b/distutils/command/wininst-14.0.exe similarity index 100% rename from command/wininst-14.0.exe rename to distutils/command/wininst-14.0.exe diff --git a/command/wininst-6.0.exe b/distutils/command/wininst-6.0.exe similarity index 100% rename from command/wininst-6.0.exe rename to distutils/command/wininst-6.0.exe diff --git a/command/wininst-7.1.exe b/distutils/command/wininst-7.1.exe similarity index 100% rename from command/wininst-7.1.exe rename to distutils/command/wininst-7.1.exe diff --git a/command/wininst-8.0.exe b/distutils/command/wininst-8.0.exe similarity index 100% rename from command/wininst-8.0.exe rename to distutils/command/wininst-8.0.exe diff --git a/command/wininst-9.0-amd64.exe b/distutils/command/wininst-9.0-amd64.exe similarity index 100% rename from command/wininst-9.0-amd64.exe rename to distutils/command/wininst-9.0-amd64.exe diff --git a/command/wininst-9.0.exe b/distutils/command/wininst-9.0.exe similarity index 100% rename from command/wininst-9.0.exe rename to distutils/command/wininst-9.0.exe diff --git a/config.py b/distutils/config.py similarity index 100% rename from config.py rename to distutils/config.py diff --git a/core.py b/distutils/core.py similarity index 100% rename from core.py rename to distutils/core.py diff --git a/cygwinccompiler.py b/distutils/cygwinccompiler.py similarity index 100% rename from cygwinccompiler.py rename to distutils/cygwinccompiler.py diff --git a/debug.py b/distutils/debug.py similarity index 100% rename from debug.py rename to distutils/debug.py diff --git a/dep_util.py b/distutils/dep_util.py similarity index 100% rename from dep_util.py rename to distutils/dep_util.py diff --git a/dir_util.py b/distutils/dir_util.py similarity index 100% rename from dir_util.py rename to distutils/dir_util.py diff --git a/dist.py b/distutils/dist.py similarity index 100% rename from dist.py rename to distutils/dist.py diff --git a/errors.py b/distutils/errors.py similarity index 100% rename from errors.py rename to distutils/errors.py diff --git a/extension.py b/distutils/extension.py similarity index 100% rename from extension.py rename to distutils/extension.py diff --git a/fancy_getopt.py b/distutils/fancy_getopt.py similarity index 100% rename from fancy_getopt.py rename to distutils/fancy_getopt.py diff --git a/file_util.py b/distutils/file_util.py similarity index 100% rename from file_util.py rename to distutils/file_util.py diff --git a/filelist.py b/distutils/filelist.py similarity index 100% rename from filelist.py rename to distutils/filelist.py diff --git a/log.py b/distutils/log.py similarity index 100% rename from log.py rename to distutils/log.py diff --git a/msvc9compiler.py b/distutils/msvc9compiler.py similarity index 100% rename from msvc9compiler.py rename to distutils/msvc9compiler.py diff --git a/msvccompiler.py b/distutils/msvccompiler.py similarity index 100% rename from msvccompiler.py rename to distutils/msvccompiler.py diff --git a/spawn.py b/distutils/spawn.py similarity index 100% rename from spawn.py rename to distutils/spawn.py diff --git a/sysconfig.py b/distutils/sysconfig.py similarity index 100% rename from sysconfig.py rename to distutils/sysconfig.py diff --git a/tests/Setup.sample b/distutils/tests/Setup.sample similarity index 100% rename from tests/Setup.sample rename to distutils/tests/Setup.sample diff --git a/tests/__init__.py b/distutils/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to distutils/tests/__init__.py diff --git a/tests/includetest.rst b/distutils/tests/includetest.rst similarity index 100% rename from tests/includetest.rst rename to distutils/tests/includetest.rst diff --git a/tests/support.py b/distutils/tests/support.py similarity index 100% rename from tests/support.py rename to distutils/tests/support.py diff --git a/tests/test_archive_util.py b/distutils/tests/test_archive_util.py similarity index 100% rename from tests/test_archive_util.py rename to distutils/tests/test_archive_util.py diff --git a/tests/test_bdist.py b/distutils/tests/test_bdist.py similarity index 100% rename from tests/test_bdist.py rename to distutils/tests/test_bdist.py diff --git a/tests/test_bdist_dumb.py b/distutils/tests/test_bdist_dumb.py similarity index 100% rename from tests/test_bdist_dumb.py rename to distutils/tests/test_bdist_dumb.py diff --git a/tests/test_bdist_msi.py b/distutils/tests/test_bdist_msi.py similarity index 100% rename from tests/test_bdist_msi.py rename to distutils/tests/test_bdist_msi.py diff --git a/tests/test_bdist_rpm.py b/distutils/tests/test_bdist_rpm.py similarity index 100% rename from tests/test_bdist_rpm.py rename to distutils/tests/test_bdist_rpm.py diff --git a/tests/test_bdist_wininst.py b/distutils/tests/test_bdist_wininst.py similarity index 100% rename from tests/test_bdist_wininst.py rename to distutils/tests/test_bdist_wininst.py diff --git a/tests/test_build.py b/distutils/tests/test_build.py similarity index 100% rename from tests/test_build.py rename to distutils/tests/test_build.py diff --git a/tests/test_build_clib.py b/distutils/tests/test_build_clib.py similarity index 100% rename from tests/test_build_clib.py rename to distutils/tests/test_build_clib.py diff --git a/tests/test_build_ext.py b/distutils/tests/test_build_ext.py similarity index 100% rename from tests/test_build_ext.py rename to distutils/tests/test_build_ext.py diff --git a/tests/test_build_py.py b/distutils/tests/test_build_py.py similarity index 100% rename from tests/test_build_py.py rename to distutils/tests/test_build_py.py diff --git a/tests/test_build_scripts.py b/distutils/tests/test_build_scripts.py similarity index 100% rename from tests/test_build_scripts.py rename to distutils/tests/test_build_scripts.py diff --git a/tests/test_check.py b/distutils/tests/test_check.py similarity index 100% rename from tests/test_check.py rename to distutils/tests/test_check.py diff --git a/tests/test_clean.py b/distutils/tests/test_clean.py similarity index 100% rename from tests/test_clean.py rename to distutils/tests/test_clean.py diff --git a/tests/test_cmd.py b/distutils/tests/test_cmd.py similarity index 100% rename from tests/test_cmd.py rename to distutils/tests/test_cmd.py diff --git a/tests/test_config.py b/distutils/tests/test_config.py similarity index 100% rename from tests/test_config.py rename to distutils/tests/test_config.py diff --git a/tests/test_config_cmd.py b/distutils/tests/test_config_cmd.py similarity index 100% rename from tests/test_config_cmd.py rename to distutils/tests/test_config_cmd.py diff --git a/tests/test_core.py b/distutils/tests/test_core.py similarity index 100% rename from tests/test_core.py rename to distutils/tests/test_core.py diff --git a/tests/test_cygwinccompiler.py b/distutils/tests/test_cygwinccompiler.py similarity index 100% rename from tests/test_cygwinccompiler.py rename to distutils/tests/test_cygwinccompiler.py diff --git a/tests/test_dep_util.py b/distutils/tests/test_dep_util.py similarity index 100% rename from tests/test_dep_util.py rename to distutils/tests/test_dep_util.py diff --git a/tests/test_dir_util.py b/distutils/tests/test_dir_util.py similarity index 100% rename from tests/test_dir_util.py rename to distutils/tests/test_dir_util.py diff --git a/tests/test_dist.py b/distutils/tests/test_dist.py similarity index 100% rename from tests/test_dist.py rename to distutils/tests/test_dist.py diff --git a/tests/test_extension.py b/distutils/tests/test_extension.py similarity index 100% rename from tests/test_extension.py rename to distutils/tests/test_extension.py diff --git a/tests/test_file_util.py b/distutils/tests/test_file_util.py similarity index 100% rename from tests/test_file_util.py rename to distutils/tests/test_file_util.py diff --git a/tests/test_filelist.py b/distutils/tests/test_filelist.py similarity index 100% rename from tests/test_filelist.py rename to distutils/tests/test_filelist.py diff --git a/tests/test_install.py b/distutils/tests/test_install.py similarity index 100% rename from tests/test_install.py rename to distutils/tests/test_install.py diff --git a/tests/test_install_data.py b/distutils/tests/test_install_data.py similarity index 100% rename from tests/test_install_data.py rename to distutils/tests/test_install_data.py diff --git a/tests/test_install_headers.py b/distutils/tests/test_install_headers.py similarity index 100% rename from tests/test_install_headers.py rename to distutils/tests/test_install_headers.py diff --git a/tests/test_install_lib.py b/distutils/tests/test_install_lib.py similarity index 100% rename from tests/test_install_lib.py rename to distutils/tests/test_install_lib.py diff --git a/tests/test_install_scripts.py b/distutils/tests/test_install_scripts.py similarity index 100% rename from tests/test_install_scripts.py rename to distutils/tests/test_install_scripts.py diff --git a/tests/test_log.py b/distutils/tests/test_log.py similarity index 100% rename from tests/test_log.py rename to distutils/tests/test_log.py diff --git a/tests/test_msvc9compiler.py b/distutils/tests/test_msvc9compiler.py similarity index 100% rename from tests/test_msvc9compiler.py rename to distutils/tests/test_msvc9compiler.py diff --git a/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py similarity index 100% rename from tests/test_msvccompiler.py rename to distutils/tests/test_msvccompiler.py diff --git a/tests/test_register.py b/distutils/tests/test_register.py similarity index 100% rename from tests/test_register.py rename to distutils/tests/test_register.py diff --git a/tests/test_sdist.py b/distutils/tests/test_sdist.py similarity index 100% rename from tests/test_sdist.py rename to distutils/tests/test_sdist.py diff --git a/tests/test_spawn.py b/distutils/tests/test_spawn.py similarity index 100% rename from tests/test_spawn.py rename to distutils/tests/test_spawn.py diff --git a/tests/test_sysconfig.py b/distutils/tests/test_sysconfig.py similarity index 100% rename from tests/test_sysconfig.py rename to distutils/tests/test_sysconfig.py diff --git a/tests/test_text_file.py b/distutils/tests/test_text_file.py similarity index 100% rename from tests/test_text_file.py rename to distutils/tests/test_text_file.py diff --git a/tests/test_unixccompiler.py b/distutils/tests/test_unixccompiler.py similarity index 100% rename from tests/test_unixccompiler.py rename to distutils/tests/test_unixccompiler.py diff --git a/tests/test_upload.py b/distutils/tests/test_upload.py similarity index 100% rename from tests/test_upload.py rename to distutils/tests/test_upload.py diff --git a/tests/test_util.py b/distutils/tests/test_util.py similarity index 100% rename from tests/test_util.py rename to distutils/tests/test_util.py diff --git a/tests/test_version.py b/distutils/tests/test_version.py similarity index 100% rename from tests/test_version.py rename to distutils/tests/test_version.py diff --git a/tests/test_versionpredicate.py b/distutils/tests/test_versionpredicate.py similarity index 100% rename from tests/test_versionpredicate.py rename to distutils/tests/test_versionpredicate.py diff --git a/text_file.py b/distutils/text_file.py similarity index 100% rename from text_file.py rename to distutils/text_file.py diff --git a/unixccompiler.py b/distutils/unixccompiler.py similarity index 100% rename from unixccompiler.py rename to distutils/unixccompiler.py diff --git a/util.py b/distutils/util.py similarity index 100% rename from util.py rename to distutils/util.py diff --git a/version.py b/distutils/version.py similarity index 100% rename from version.py rename to distutils/version.py diff --git a/versionpredicate.py b/distutils/versionpredicate.py similarity index 100% rename from versionpredicate.py rename to distutils/versionpredicate.py From b2af2ea980386f86afe5e104e7fe1bf047ac1df9 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 16:08:57 -0400 Subject: [PATCH 7904/8469] docs: update quickstart added a few sections (WIP) to make it more complete --- docs/userguide/quickstart.txt | 44 +++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 95abec0f6a..1b58dfb363 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -2,20 +2,18 @@ ``setuptools`` Quickstart ========================== +.. contents:: + Installation ============ -.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ - To install the latest version of setuptools, use:: pip install --upgrade setuptools -Refer to `Installing Packages`_ guide for more information. Python packaging at a glance ============================ - The landscape of Python packaging is shifting and ``Setuptools`` has evolved to only provide backend support, no longer being the de-facto packaging tool in the market. All python package must provide a ``pyproject.toml`` and specify @@ -27,9 +25,9 @@ change is driven under `PEP 517 ``. To learn more about Python packaging in general, navigate to the `bottom `_ of this page. + Basic Use ========= - For basic use of setuptools, you will need a ``pyproject.toml`` with the exact following info, which declares you want to use ``setuptools`` to package your project: @@ -62,14 +60,14 @@ This is what your project would look like:: setup.cfg mypackage/__init__.py -Then, you need an installer, such as ``pep517 `_ which you can obtain via ``pip install pep517``. After downloading it, invoke the installer:: pep517 build You now have your distribution ready (e.g. a ``tar.gz`` file and a ``.whl`` -file in the ``dist``), which you can upload to PyPI! +file in the ``dist`` directory), which you can upload to PyPI! Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your @@ -78,9 +76,9 @@ dependencies, and perhaps some data files and scripts. In the next few section, we will walk through those additional but essential information you need to specify to properly package your project. + Automatic package discovery =========================== - For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` @@ -105,9 +103,9 @@ that each entry in the ``[options.packages.find]`` is optional. The above setup also allows you to adopt a ``src/`` layout. For more details and advanced use, go to :ref:`package_discovery` + Entry points and automatic script creation =========================================== - Setuptools support automatic creation of scripts upon installation, that runs code within your package if you specify them with the ``entry_point`` keyword. This is what allows you to run commands like ``pip install`` instead of having @@ -126,9 +124,9 @@ invoke the ``some_func`` in the ``__init__.py`` file when called by the user. For detailed usage, including managing the additional or optional dependencies, go to :ref:`entry_point`. + Dependency management ===================== - ``setuptools`` supports automatically installing dependencies when a package is installed. The simplest way to include requirement specifiers is to use the ``install_requires`` argument to ``setup.cfg``. It takes a string or list of @@ -151,9 +149,9 @@ care of those needed by automatically generated scripts. It also provides mechanisms to handle dependencies that are not in PyPI. For more advanced use, see :ref:`dependency_management` + Including Data Files ==================== - The distutils have traditionally allowed installation of "data files", which are placed in a platform-specific location. Setuptools offers three ways to specify data files to be included in your packages. For the simpliest use, you @@ -166,5 +164,27 @@ can simply use the ``include_package_data`` keyword: This tells setuptools to install any data files it finds in your packages. The data files must be specified via the distutils' ``MANIFEST.in`` file. - For more details, see :ref:`datafiles` + + +Uploading your package to PyPI +============================== +After generating the distribution files, next step would be to upload your +distribution so others can use it. This functionality is provided by +``twine `` and we will only demonstrate the +basic use here. + + +Transitioning from ``setup.py`` to ``setup.cfg`` +================================================== +To avoid executing arbitary scripts and boilerplate code, we are transitioning +into a full-fledged ``setup.cfg`` to declare your package information instead +of running ``setup()``. This inevitably brings challenges due to a different +syntax. Here we provide a quick guide to understanding how ``setup.cfg`` is +parsed by ``setuptool`` to ease the pain of transition. + + +Resources on Python packaging +============================= +Packaging in Python is hard. Here we provide a list of links for those that +want to learn more. From b678ce30a356abb36cd49d523731a9f978fce0bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 13:13:44 -0400 Subject: [PATCH 7905/8469] Move distutils import to a separate file to avoid linter errors. --- setuptools/__init__.py | 3 +++ setuptools/distutils_patch.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 setuptools/distutils_patch.py diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 811f3fd2e8..9df71a6d23 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -2,6 +2,9 @@ import os import functools + +import setuptools.distutils_patch # noqa: F401 + import distutils.core import distutils.filelist import re diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py new file mode 100644 index 0000000000..a2fc1a8cb9 --- /dev/null +++ b/setuptools/distutils_patch.py @@ -0,0 +1,15 @@ +""" +Ensure that the local copy of distutils is preferred over stdlib. + +See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 +for more motivation. +""" + +import sys +import importlib +from os.path import dirname + + +sys.path.insert(0, dirname(dirname(__file__))) +importlib.import_module('distutils') +sys.path.pop(0) From 151599602b9d626ebcfe5ae6960ea216b767fec2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 13:38:15 -0400 Subject: [PATCH 7906/8469] Update distutils patch to monkeypatch all paths from sys.path to ensure that distutils is never imported except from the same path as setuptools. Assert that 'distutils' is not already in sys.modules. --- setuptools/distutils_patch.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index a2fc1a8cb9..e0abbd77da 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -7,9 +7,23 @@ import sys import importlib +import contextlib from os.path import dirname -sys.path.insert(0, dirname(dirname(__file__))) -importlib.import_module('distutils') -sys.path.pop(0) +@contextlib.contextmanager +def patch_sys_path(): + orig = sys.path[:] + sys.path[:] = [dirname(dirname(__file__))] + try: + yield + finally: + sys.path[:] = orig + + +if 'distutils' in sys.path: + raise RuntimeError("Distutils must not be imported before setuptools") + + +with patch_sys_path(): + importlib.import_module('distutils') From 81aab2da23caf1a66298847d93b209ba16eb878e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 16:35:24 -0400 Subject: [PATCH 7907/8469] Ignore distutils when running tests. --- conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conftest.py b/conftest.py index 1746bfb588..3f7e59b44e 100644 --- a/conftest.py +++ b/conftest.py @@ -14,6 +14,7 @@ def pytest_addoption(parser): collect_ignore = [ 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', + 'distutils', ] From 781d42dffe2913f1a1f27128effa7198c27f569f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 25 May 2020 16:35:50 -0400 Subject: [PATCH 7908/8469] Fallback to 'lib' when 'sys.platlibdir' does not exist. --- distutils/command/install.py | 2 +- distutils/sysconfig.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distutils/command/install.py b/distutils/command/install.py index aaa300efa9..21f8c27c8b 100644 --- a/distutils/command/install.py +++ b/distutils/command/install.py @@ -298,7 +298,7 @@ def finalize_options(self): 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, 'abiflags': abiflags, - 'platlibdir': sys.platlibdir, + 'platlibdir': getattr(sys, 'platlibdir', 'lib'), } if HAS_USER_SITE: diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 37feae5df7..2109f746ba 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -148,7 +148,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): if plat_specific or standard_lib: # Platform-specific modules (any module from a non-pure-Python # module distribution) or standard Python library modules. - libdir = sys.platlibdir + libdir = getattr(sys, "platlibdir", "lib") else: # Pure Python libdir = "lib" From ffc622639bd2793d3105ac9dcd2d4f55d482b44d Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 17:37:08 -0400 Subject: [PATCH 7909/8469] docs: incoporate PR1765 created directory setuptools/docs/references and place keywords.txt from PR1765 in it en bloc --- docs/references/keywords.txt | 336 +++++++++++++++++++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 docs/references/keywords.txt diff --git a/docs/references/keywords.txt b/docs/references/keywords.txt new file mode 100644 index 0000000000..563561908c --- /dev/null +++ b/docs/references/keywords.txt @@ -0,0 +1,336 @@ +``name`` + A string specifying the name of the package. + +``version`` + A string specifying the version number of the package. + +``description`` + A string describing the package in a single line. + +``long_description`` + A string providing a longer description of the package. + +``long_description_content_type`` + A string specifying the content type is used for the ``long_description`` + (e.g. ``text/markdown``) + +``author`` + A string specifying the author of the package. + +``author_email`` + A string specifying the email address of the package author. + +``maintainer`` + A string specifying the name of the current maintainer, if different from + the author. Note that if the maintainer is provided, setuptools will use it + as the author in ``PKG-INFO``. + +``maintainer_email`` + A string specifying the email address of the current maintainer, if + different from the author. + +``url`` + A string specifying the URL for the package homepage. + +``download_url`` + A string specifying the URL to download the package. + +``packages`` + A list of strings specifying the packages that setuptools will manipulate. + +``py_modules`` + A list of strings specifying the modules that setuptools will manipulate. + +``scripts`` + A list of strings specifying the standalone script files to be built and + installed. + +``ext_package`` + A string specifying the base package name for the extensions provided by + this package. + +``ext_modules`` + A list of instances of ``setuptools.Extension`` providing the list of + Python extensions to be built. + +``classifiers`` + A list of strings describing the categories for the package. + +``distclass`` + A subclass of ``Distribution`` to use. + +``script_name`` + A string specifying the name of the setup.py script -- defaults to + ``sys.argv[0]`` + +``script_args`` + A list of strings defining the arguments to supply to the setup script. + +``options`` + A dictionary providing the default options for the setup script. + +``license`` + A string specifying the license of the package. + +``keywords`` + A list of strings or a comma-separated string providing descriptive + meta-data. See: `PEP 0314`_. + +.. _PEP 0314: https://www.python.org/dev/peps/pep-0314/ + +``platforms`` + A list of strings or comma-separated string. + +``cmdclass`` + A dictionary providing a mapping of command names to ``Command`` + subclasses. + +``data_files`` + + .. warning:: + ``data_files`` is deprecated. It does not work with wheels, so it + should be avoided. + + A list of strings specifying the data files to install. + +``package_dir`` + A dictionary providing a mapping of package to directory names. + +``requires`` + + .. warning:: + ``requires`` is superseded by ``install_requires`` and should not be used + anymore. + +``obsoletes`` + + .. warning:: + ``obsoletes`` is currently ignored by ``pip``. + + List of strings describing packages which this package renders obsolete, + meaning that the two projects should not be installed at the same time. + + Version declarations can be supplied. Version numbers must be in the format + specified in Version specifiers (e.g. ``foo (<3.0)``). + + This field may be followed by an environment marker after a semicolon (e.g. + ``foo; os_name == "posix"``) + + The most common use of this field will be in case a project name changes, + e.g. Gorgon 2.3 gets subsumed into Torqued Python 1.0. When you install + Torqued Python, the Gorgon distribution should be removed. + +``provides`` + + .. warning:: + ``provides`` is currently ignored by ``pip``. + + List of strings describing package- and virtual package names contained + within this package. + + A package may provide additional names, e.g. to indicate that multiple + projects have been bundled together. For instance, source distributions of + the ZODB project have historically included the transaction project, which + is now available as a separate distribution. Installing such a source + distribution satisfies requirements for both ZODB and transaction. + + A package may also provide a “virtual†project name, which does not + correspond to any separately-distributed project: such a name might be used + to indicate an abstract capability which could be supplied by one of + multiple projects. E.g., multiple projects might supply RDBMS bindings for + use by a given ORM: each project might declare that it provides + ORM-bindings, allowing other projects to depend only on having at most one + of them installed. + + A version declaration may be supplied and must follow the rules described in + Version specifiers. The distribution’s version number will be implied if + none is specified (e.g. ``foo (<3.0)``). + + Each package may be followed by an environment marker after a semicolon + (e.g. ``foo; os_name == "posix"``). + +.. Below are setuptools keywords, above are distutils + +``include_package_data`` + If set to ``True``, this tells ``setuptools`` to automatically include any + data files it finds inside your package directories that are specified by + your ``MANIFEST.in`` file. For more information, see the section on + :ref:`Including Data Files`. + +``exclude_package_data`` + A dictionary mapping package names to lists of glob patterns that should + be *excluded* from your package directories. You can use this to trim back + any excess files included by ``include_package_data``. For a complete + description and examples, see the section on :ref:`Including Data Files`. + +``package_data`` + A dictionary mapping package names to lists of glob patterns. For a + complete description and examples, see the section on :ref:`Including Data + Files`. You do not need to use this option if you are using + ``include_package_data``, unless you need to add e.g. files that are + generated by your setup script and build process. (And are therefore not + in source control or are files that you don't want to include in your + source distribution.) + +``zip_safe`` + A boolean (True or False) flag specifying whether the project can be + safely installed and run from a zip file. If this argument is not + supplied, the ``bdist_egg`` command will have to analyze all of your + project's contents for possible problems each time it builds an egg. + +``install_requires`` + A string or list of strings specifying what other distributions need to + be installed when this one is. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. + +``entry_points`` + A dictionary mapping entry point group names to strings or lists of strings + defining the entry points. Entry points are used to support dynamic + discovery of services or plugins provided by a project. See :ref:`Dynamic + Discovery of Services and Plugins` for details and examples of the format + of this argument. In addition, this keyword is used to support + :ref:`Automatic Script Creation`. + +``extras_require`` + A dictionary mapping names of "extras" (optional features of your project) + to strings or lists of strings specifying what other distributions must be + installed to support those features. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. + +``python_requires`` + A string corresponding to a version specifier (as defined in PEP 440) for + the Python version, used to specify the Requires-Python defined in PEP 345. + +``setup_requires`` + + .. warning:: + Using ``setup_requires`` is discouraged in favor of `PEP-518`_ + + A string or list of strings specifying what other distributions need to + be present in order for the *setup script* to run. ``setuptools`` will + attempt to obtain these (even going so far as to download them using + ``EasyInstall``) before processing the rest of the setup script or commands. + This argument is needed if you are using distutils extensions as part of + your build process; for example, extensions that process setup() arguments + and turn them into EGG-INFO metadata files. + + (Note: projects listed in ``setup_requires`` will NOT be automatically + installed on the system where the setup script is being run. They are + simply downloaded to the ./.eggs directory if they're not locally available + already. If you want them to be installed, as well as being available + when the setup script is run, you should add them to ``install_requires`` + **and** ``setup_requires``.) + +.. _PEP-518: http://www.python.org/dev/peps/pep-0518/ + +``dependency_links`` + + .. warning:: + ``dependency_links`` is deprecated. It is not supported anymore by pip. + + A list of strings naming URLs to be searched when satisfying dependencies. + These links will be used if needed to install packages specified by + ``setup_requires`` or ``tests_require``. They will also be written into + the egg's metadata for use by tools like EasyInstall to use when installing + an ``.egg`` file. + +``namespace_packages`` + A list of strings naming the project's "namespace packages". A namespace + package is a package that may be split across multiple project + distributions. For example, Zope 3's ``zope`` package is a namespace + package, because subpackages like ``zope.interface`` and ``zope.publisher`` + may be distributed separately. The egg runtime system can automatically + merge such subpackages into a single parent package at runtime, as long + as you declare them in each project that contains any subpackages of the + namespace package, and as long as the namespace package's ``__init__.py`` + does not contain any code other than a namespace declaration. See the + section on :ref:`Namespace Packages` for more information. + +``test_suite`` + A string naming a ``unittest.TestCase`` subclass (or a package or module + containing one or more of them, or a method of such a subclass), or naming + a function that can be called with no arguments and returns a + ``unittest.TestSuite``. If the named suite is a module, and the module + has an ``additional_tests()`` function, it is called and the results are + added to the tests to be run. If the named suite is a package, any + submodules and subpackages are recursively added to the overall test suite. + + Specifying this argument enables use of the :ref:`test` command to run the + specified test suite, e.g. via ``setup.py test``. See the section on the + :ref:`test` command below for more details. + + New in 41.5.0: Deprecated the test command. + +``tests_require`` + If your project's tests need one or more additional packages besides those + needed to install it, you can use this option to specify them. It should + be a string or list of strings specifying what other distributions need to + be present for the package's tests to run. When you run the ``test`` + command, ``setuptools`` will attempt to obtain these (even going + so far as to download them using ``EasyInstall``). Note that these + required projects will *not* be installed on the system where the tests + are run, but only downloaded to the project's setup directory if they're + not already installed locally. + + New in 41.5.0: Deprecated the test command. + +.. _test_loader: + +``test_loader`` + If you would like to use a different way of finding tests to run than what + setuptools normally uses, you can specify a module name and class name in + this argument. The named class must be instantiable with no arguments, and + its instances must support the ``loadTestsFromNames()`` method as defined + in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will + pass only one test "name" in the `names` argument: the value supplied for + the ``test_suite`` argument. The loader you specify may interpret this + string in any way it likes, as there are no restrictions on what may be + contained in a ``test_suite`` string. + + The module name and class name must be separated by a ``:``. The default + value of this argument is ``"setuptools.command.test:ScanningLoader"``. If + you want to use the default ``unittest`` behavior, you can specify + ``"unittest:TestLoader"`` as your ``test_loader`` argument instead. This + will prevent automatic scanning of submodules and subpackages. + + The module and class you specify here may be contained in another package, + as long as you use the ``tests_require`` option to ensure that the package + containing the loader class is available when the ``test`` command is run. + + New in 41.5.0: Deprecated the test command. + +``eager_resources`` + A list of strings naming resources that should be extracted together, if + any of them is needed, or if any C extensions included in the project are + imported. This argument is only useful if the project will be installed as + a zipfile, and there is a need to have all of the listed resources be + extracted to the filesystem *as a unit*. Resources listed here + should be '/'-separated paths, relative to the source root, so to list a + resource ``foo.png`` in package ``bar.baz``, you would include the string + ``bar/baz/foo.png`` in this argument. + + If you only need to obtain resources one at a time, or you don't have any C + extensions that access other files in the project (such as data files or + shared libraries), you probably do NOT need this argument and shouldn't + mess with it. For more details on how this argument works, see the section + below on :ref:`Automatic Resource Extraction`. + +``use_2to3`` + Convert the source code from Python 2 to Python 3 with 2to3 during the + build process. See :doc:`python3` for more details. + +``convert_2to3_doctests`` + List of doctest source files that need to be converted with 2to3. + See :doc:`python3` for more details. + +``use_2to3_fixers`` + A list of modules to search for additional fixers to be used during + the 2to3 conversion. See :doc:`python3` for more details. + +``use_2to3_exclude_fixers`` + List of fixer names to be skipped. + +``project_urls`` + An arbitrary map of URL names to hyperlinks, allowing more extensible + documentation of where various resources can be found than the simple + ``url`` and ``download_url`` options provide. From 992ecc09a2aa08310ae9bba4865e54e157b581cb Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 17:46:28 -0400 Subject: [PATCH 7910/8469] docs: proper invocation of pep517 before: pep517 build (incorrect) now: python -m pep517.build (correct) --- docs/userguide/quickstart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 1b58dfb363..224be368f6 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -64,7 +64,7 @@ Then, you need an installer, such as `pep517 ` which you can obtain via ``pip install pep517``. After downloading it, invoke the installer:: - pep517 build + python -m pep517.build You now have your distribution ready (e.g. a ``tar.gz`` file and a ``.whl`` file in the ``dist`` directory), which you can upload to PyPI! From b13e4a2a96c2d88890157fdd0b116619436761c4 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Mon, 25 May 2020 21:32:01 -0400 Subject: [PATCH 7911/8469] docs: add dev mode section in quickstart --- docs/userguide/quickstart.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.txt index 224be368f6..5282975102 100644 --- a/docs/userguide/quickstart.txt +++ b/docs/userguide/quickstart.txt @@ -167,6 +167,26 @@ The data files must be specified via the distutils' ``MANIFEST.in`` file. For more details, see :ref:`datafiles` +Development mode +================ +``setuptools`` allows you to install a package without copying any files +to your interpretor directory (e.g. the ``site-packages`` directory). This +allows you to modify your source code and have the changes take effect without +you having to rebuild and reinstall. This is currently incompatible with +PEP 517 and therefore it requires a ``setup.py`` script with the following +content:: + + import setuptools + setuptools.setup() + +Then:: + + pip install --editable . + +This creates a link file in your interpretor site package directory which +associate with your source code. For more information, see: (WIP) + + Uploading your package to PyPI ============================== After generating the distribution files, next step would be to upload your From 7b25b1a6a70577fdadbadb75b55a80a328143848 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 26 May 2020 18:12:33 -0400 Subject: [PATCH 7912/8469] Use new link to sunset page. Ref #2134. --- pkg_resources/py2_warn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py index 00cc8bc75d..6855aa245e 100644 --- a/pkg_resources/py2_warn.py +++ b/pkg_resources/py2_warn.py @@ -6,7 +6,7 @@ msg = textwrap.dedent(""" Encountered a version of Setuptools that no longer supports this version of Python. Please head to - https://bit.ly/setuptools-py2-warning for support. + https://bit.ly/setuptools-py2-sunset for support. """) pre = "Setuptools no longer works on Python 2\n" From d51059ac1cc2fcc54a572eecadfae7e2bb07ad70 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Tue, 26 May 2020 00:43:54 -0400 Subject: [PATCH 7913/8469] docs: WIP detailed guide on pkg discovery --- docs/userguide/package_discovery.txt | 101 +++++++++++++++++---------- 1 file changed, 63 insertions(+), 38 deletions(-) diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt index 8ba12cdf3c..45d88b600c 100644 --- a/docs/userguide/package_discovery.txt +++ b/docs/userguide/package_discovery.txt @@ -1,65 +1,90 @@ +.. _`package_discovery`: + =================== Package Discovery =================== ``Setuptools`` provide powerful tools to handle package discovery, including -support for namespace package. The following explain how you include package -in your ``setup`` script:: +support for namespace package. Normally, you would specify the package to be +included manually in the following manner: + +.. code-block:: ini + + [options] + packages = + mypkg1 + mypkg2 + +.. code-block:: python setup( packages = ['mypkg1', 'mypkg2'] ) -To speed things up, we introduce two functions provided by setuptools:: +This can get tiresome reallly quickly. To speed things up, we introduce two +functions provided by setuptools: - from setuptools import find_packages +.. code-block:: ini -or:: + [options] + packages = find: + #or + packages = find_namespace: +.. code-block:: python + + from setuptools import find_packages + #or from setuptools import find_namespace_packages -Using ``find_packages()`` -------------------------- +Using ``find:`` (``find_packages``) +=================================== +Let's start with the first tool. ``find:`` (``find_packages``) takes a source +directory and two lists of package name patterns to exclude and include, and +then return a list of ``str`` representing the packages it could find. To use +it, consider the following directory + + mypkg/ + src/ + pkg1/__init__.py + pkg2/__init__.py + tests/__init__.py + setup.cfg #or setup.py -Let's start with the first tool. +To have your setup.cfg or setup.py to automatically include packages found +in ``src`` that starts with the name ``pkg`` and not ``tests``: -``find_packages()`` takes a source directory and two lists of package name -patterns to exclude and include. If omitted, the source directory defaults to -the same -directory as the setup script. Some projects use a ``src`` or ``lib`` -directory as the root of their source tree, and those projects would of course -use ``"src"`` or ``"lib"`` as the first argument to ``find_packages()``. (And -such projects also need something like ``package_dir={"": "src"}`` in their -``setup()`` arguments, but that's just a normal distutils thing.) +.. code-block:: ini -Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python packages (any directory). Packages are only -recognized if they include an ``__init__.py`` file. Finally, exclusion -patterns are applied to remove matching packages. + [options] + packages = find: + package_dir = + =src -Inclusion and exclusion patterns are package names, optionally including -wildcards. For -example, ``find_packages(exclude=["*.tests"])`` will exclude all packages whose -last name part is ``tests``. Or, ``find_packages(exclude=["*.tests", -"*.tests.*"])`` will also exclude any subpackages of packages named ``tests``, -but it still won't exclude a top-level ``tests`` package or the children -thereof. In fact, if you really want no ``tests`` packages at all, you'll need -something like this:: + [options.packages.find] + where = src + include = pkg* + exclude = tests - find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) +.. code-block:: python -in order to cover all the bases. Really, the exclusion patterns are intended -to cover simpler use cases than this, like excluding a single, specified -package and its subpackages. + setup( + #... + packages = find_packages( + where = 'src', + include = ['pkg*',], + exclude = ['tests',] + ), + package_dir = {"":"src"} + #... + ) -Regardless of the parameters, the ``find_packages()`` -function returns a list of package names suitable for use as the ``packages`` -argument to ``setup()``, and so is usually the easiest way to set that -argument in your setup script. Especially since it frees you from having to -remember to modify your setup script whenever your project grows additional -top-level packages or subpackages. +Of course the keywords presented here appear arbitary and the example given +doesn't apply to every other scenarios. For best understanding, we recommend +going to :ref:`keywords_ref`. +#####WIP below######### ``find_namespace_packages()`` ----------------------------- In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant From 9b87e896de30cda6003bb2f18c41c5f6c4db9d12 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Tue, 26 May 2020 13:27:34 -0400 Subject: [PATCH 7914/8469] docs: detail pkg discover guide and namespace pkg userguide/pkg_discovery.txt now covers find_package, find_namespace package and legacy use of namespace package creation in both setup.py and setup.cfg style --- docs/userguide/package_discovery.txt | 210 +++++++++++++-------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt index 45d88b600c..77d61770cf 100644 --- a/docs/userguide/package_discovery.txt +++ b/docs/userguide/package_discovery.txt @@ -1,8 +1,19 @@ .. _`package_discovery`: -=================== -Package Discovery -=================== +======================================== +Package Discovery and Namespace Package +======================================== + +.. note:: + a full specification for the keyword supplied to ``setup.cfg`` or + ``setup.py`` can be found at :ref:`keywords reference ` + +.. note:: + the examples provided here are only to demonstrate the functionality + introduced. More metadata and options arguments need to be supplied + if you want to replicate them on your system. If you are completely + new to setuptools, the :ref:`quickstart section ` is a good + place to start. ``Setuptools`` provide powerful tools to handle package discovery, including support for namespace package. Normally, you would specify the package to be @@ -38,22 +49,25 @@ functions provided by setuptools: from setuptools import find_namespace_packages -Using ``find:`` (``find_packages``) -=================================== +Using ``find:`` or ``find_packages`` +==================================== Let's start with the first tool. ``find:`` (``find_packages``) takes a source directory and two lists of package name patterns to exclude and include, and then return a list of ``str`` representing the packages it could find. To use it, consider the following directory +.. code-block:: bash + mypkg/ src/ pkg1/__init__.py pkg2/__init__.py - tests/__init__.py + additional/__init__.py + setup.cfg #or setup.py To have your setup.cfg or setup.py to automatically include packages found -in ``src`` that starts with the name ``pkg`` and not ``tests``: +in ``src`` that starts with the name ``pkg`` and not ``additional``: .. code-block:: ini @@ -65,7 +79,7 @@ in ``src`` that starts with the name ``pkg`` and not ``tests``: [options.packages.find] where = src include = pkg* - exclude = tests + exclude = additional .. code-block:: python @@ -80,127 +94,113 @@ in ``src`` that starts with the name ``pkg`` and not ``tests``: #... ) -Of course the keywords presented here appear arbitary and the example given -doesn't apply to every other scenarios. For best understanding, we recommend -going to :ref:`keywords_ref`. -#####WIP below######### -``find_namespace_packages()`` ------------------------------ -In Python 3.3+, ``setuptools`` also provides the ``find_namespace_packages`` variant -of ``find_packages``, which has the same function signature as -``find_packages``, but works with `PEP 420`_ compliant implicit namespace -packages. Here is a minimal setup script using ``find_namespace_packages``:: +Using ``find_namespace:`` or ``find_namespace_packages`` +======================================================== +``setuptools`` provides the ``find_namespace:`` (``find_namespace_packages``) +which behaves similarly to ``find:`` but works with namespace package. Before +diving in, it is important to have a good understanding of what namespace +packages are. Here is a quick recap: - from setuptools import setup, find_namespace_packages - setup( - name="HelloWorld", - version="0.1", - packages=find_namespace_packages(), - ) +Suppose you have two packages named as follows: +.. code-block:: bash -Keep in mind that according to PEP 420, you may have to either re-organize your -codebase a bit or define a few exclusions, as the definition of an implicit -namespace package is quite lenient, so for a project organized like so:: + /Users/Desktop/timmins/foo/__init__.py + /Library/timmins/bar/__init__.py +If both ``Desktop`` and ``Library`` are on your ``PYTHONPATH``, then a +namespace package called ``timmins`` will be created automatically for you when +you invoke the import mechanism, allowing you to accomplish the following - ├── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - ├── setup.py - └── tests - └── test_mod1.py +.. code-block:: python -A naive ``find_namespace_packages()`` would install both ``namespace.mypackage`` and a -top-level package called ``tests``! One way to avoid this problem is to use the -``include`` keyword to whitelist the packages to include, like so:: + >>> import timmins.foo + >>> import timmins.bar - from setuptools import setup, find_namespace_packages +as if there is only one ``timmins`` on your system. The two packages can then +be distributed separately and installed individually without affecting the +other one. Suppose you are packaging the ``foo`` part: - setup( - name="namespace.mypackage", - version="0.1", - packages=find_namespace_packages(include=["namespace.*"]) - ) +.. code-block:: bash + + foo/ + src/ + timmins/foo/__init__.py + setup.cfg # or setup.py + +and you want the ``foo`` to be automatically included, ``find:`` won't work +because timmins doesn't contain ``__init__.py`` directly, instead, you have +to use ``find_namespace:``: + +.. code-block:: ini + + [options] + package_dir = + =src + packages = find_namespace: -Another option is to use the "src" layout, where all package code is placed in -the ``src`` directory, like so:: + [options.packages.find_namespace] + where = src +When you install the zipped distribution, ``timmins.foo`` would become +available to your interpreter. - ├── setup.py - ├── src - │   └── namespace - │   └── mypackage - │   ├── __init__.py - │   └── mod1.py - └── tests - └── test_mod1.py +You can think of ``find_namespace:`` as identical to ``find:`` except it +would count a directory as a package even if it doesn't contain ``__init__.py`` +file directly. As a result, this creates an interesting side effect. If you +organize your package like this: -With this layout, the package directory is specified as ``src``, as such:: +.. code-block:: bash - setup(name="namespace.mypackage", - version="0.1", - package_dir={"": "src"}, - packages=find_namespace_packages(where="src")) + foo/ + timmins/ + foo/__init__.py + setup.cfg # or setup.py + tests/ + test_foo/__init__.py -.. _PEP 420: https://www.python.org/dev/peps/pep-0420/ +a naive ``find_namespace:`` would include tests as part of your package to +be installed. A simple way to fix it is to adopt the aforementioned +``src`` layout. -Namespace Packages ------------------- +Legacy Namespace Packages +========================== +The fact you can create namespace package so effortlessly above is credited +to `PEP 420 `_. In the past, it +is more cumbersome to accomplish the same result. -Sometimes, a large package is more useful if distributed as a collection of -smaller eggs. However, Python does not normally allow the contents of a -package to be retrieved from more than one location. "Namespace packages" -are a solution for this problem. When you declare a package to be a namespace -package, it means that the package has no meaningful contents in its -``__init__.py``, and that it is merely a container for modules and subpackages. +Starting with the same layout, there are two pieces you need to add to it. +First, an ``__init__.py`` file directly under your namespace package +directory that contains the following: -The ``pkg_resources`` runtime will then automatically ensure that the contents -of namespace packages that are spread over multiple eggs or directories are -combined into a single "virtual" package. +.. code-block:: python -The ``namespace_packages`` argument to ``setup()`` lets you declare your -project's namespace packages, so that they will be included in your project's -metadata. The argument should list the namespace packages that the egg -participates in. For example, the ZopeInterface project might do this:: + __import__("pkg_resources").declare_namespace(__name__) + +And the ``namespace_packages`` keyword in your ``setup.cfg`` or ``setup.py``: + +.. code-block:: ini + + [options] + namespace_packages = timmins + +.. code-block:: python setup( # ... - namespace_packages=["zope"] + namespace_packages = ['timmins'] ) -because it contains a ``zope.interface`` package that lives in the ``zope`` -namespace package. Similarly, a project for a standalone ``zope.publisher`` -would also declare the ``zope`` namespace package. When these projects are -installed and used, Python will see them both as part of a "virtual" ``zope`` -package, even though they will be installed in different locations. - -Namespace packages don't have to be top-level packages. For example, Zope 3's -``zope.app`` package is a namespace package, and in the future PEAK's -``peak.util`` package will be too. +And your directory should look like this:: -Note, by the way, that your project's source tree must include the namespace -packages' ``__init__.py`` files (and the ``__init__.py`` of any parent -packages), in a normal Python package layout. These ``__init__.py`` files -*must* contain the line:: - - __import__("pkg_resources").declare_namespace(__name__) + /foo/ + src/ + timmins/ + __init__.py + foo/__init__.py + setup.cfg #or setup.py -This code ensures that the namespace package machinery is operating and that -the current package is registered as a namespace package. - -You must NOT include any other code and data in a namespace package's -``__init__.py``. Even though it may appear to work during development, or when -projects are installed as ``.egg`` files, it will not work when the projects -are installed using "system" packaging tools -- in such cases the -``__init__.py`` files will not be installed, let alone executed. - -You must include the ``declare_namespace()`` line in the ``__init__.py`` of -*every* project that has contents for the namespace package in question, in -order to ensure that the namespace will be declared regardless of which -project's copy of ``__init__.py`` is loaded first. If the first loaded -``__init__.py`` doesn't declare it, it will never *be* declared, because no -other copies will ever be loaded! +Repeat the same for other packages and you can achieve the same result as +the previous section. From e53fe0d2eafa85c3ad85c837953f67f4aba28ed3 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Tue, 26 May 2020 23:47:49 -0400 Subject: [PATCH 7915/8469] docs: cover pkgutil style namespace pkg --- docs/userguide/package_discovery.txt | 41 ++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt index 77d61770cf..350a02ad27 100644 --- a/docs/userguide/package_discovery.txt +++ b/docs/userguide/package_discovery.txt @@ -22,6 +22,7 @@ included manually in the following manner: .. code-block:: ini [options] + #... packages = mypkg1 mypkg2 @@ -29,6 +30,7 @@ included manually in the following manner: .. code-block:: python setup( + #... packages = ['mypkg1', 'mypkg2'] ) @@ -166,14 +168,24 @@ be installed. A simple way to fix it is to adopt the aforementioned Legacy Namespace Packages -========================== +========================= The fact you can create namespace package so effortlessly above is credited -to `PEP 420 `_. In the past, it -is more cumbersome to accomplish the same result. - -Starting with the same layout, there are two pieces you need to add to it. -First, an ``__init__.py`` file directly under your namespace package -directory that contains the following: +to `PEP 420 `_. It use to be more +cumbersome to accomplish the same result. Historically, there were two methods +to create namespace packages. One is the ``pkg_resources`` style supported by +``setuptools`` and the other one being ``pkgutils`` style offered by +``pkgutils`` module in Python. Both are now considered deprecated despite the +fact they still linger in many existing packages. These two differ in many +subtle yet significant aspects and you can find out more on `Python packaging +user guide `_ + + +``pkg_resource`` style namespace package +---------------------------------------- +This is the method ``setuptools`` directly supports. Starting with the same +layout, there are two pieces you need to add to it. First, an ``__init__.py`` +file directly under your namespace package directory that contains the +following: .. code-block:: python @@ -193,7 +205,9 @@ And the ``namespace_packages`` keyword in your ``setup.cfg`` or ``setup.py``: namespace_packages = ['timmins'] ) -And your directory should look like this:: +And your directory should look like this + +.. code-block:: bash /foo/ src/ @@ -204,3 +218,14 @@ And your directory should look like this:: Repeat the same for other packages and you can achieve the same result as the previous section. + +``pkgutil`` style namespace package +----------------------------------- +This method is almost identical to the ``pkg_resource`` except that the +``__init__.py`` file contains the following: + +.. code-block:: python + + __path__ = __import__('pkgutil').extend_path(__path__, __name__) + +The project layout remains the same and ``setup.cfg`` remains the same. From 70c8c0f39cf737d5eff70e36af5c66973ae1340a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 27 May 2020 08:54:37 -0400 Subject: [PATCH 7916/8469] Mention that `namespace_packages` is omitted. --- docs/userguide/package_discovery.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.txt index 350a02ad27..0e0d27c5b2 100644 --- a/docs/userguide/package_discovery.txt +++ b/docs/userguide/package_discovery.txt @@ -222,7 +222,8 @@ the previous section. ``pkgutil`` style namespace package ----------------------------------- This method is almost identical to the ``pkg_resource`` except that the -``__init__.py`` file contains the following: +``namespace_packages`` declaration is omitted and the ``__init__.py`` +file contains the following: .. code-block:: python From 96a1acb471eb8b2745a7ef98eceafb1671d7812c Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Wed, 27 May 2020 09:06:45 -0700 Subject: [PATCH 7917/8469] DOC: fix link missing > The `decalrative config`_ link present higher in the document is also unresolved, I'm not quite sure what the intended target was. --- docs/build_meta.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index ef9fb2ac5d..fcc2b7fee6 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -68,7 +68,7 @@ Use ``setuptools``' `declarative config`_ to specify the package information:: Now generate the distribution. Although the PyPA is still working to `provide a recommended tool `_ -to build packages, the `pep517 package `_ provides this functionality. To build the package:: $ pip install -q pep517 From 01a876255e0a1135d03ee10c52b8cccfa4992e5d Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Wed, 27 May 2020 09:06:45 -0700 Subject: [PATCH 7918/8469] DOC: fix link missing > The `decalrative config`_ link present higher in the document is also unresolved, I'm not quite sure what the intended target was. --- docs/build_meta.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_meta.txt b/docs/build_meta.txt index ef9fb2ac5d..fcc2b7fee6 100644 --- a/docs/build_meta.txt +++ b/docs/build_meta.txt @@ -68,7 +68,7 @@ Use ``setuptools``' `declarative config`_ to specify the package information:: Now generate the distribution. Although the PyPA is still working to `provide a recommended tool `_ -to build packages, the `pep517 package `_ provides this functionality. To build the package:: $ pip install -q pep517 From 11051abd79b04782d759720a4d9dac2d2bbbf49c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 07:10:59 -0400 Subject: [PATCH 7919/8469] Extract _parents function and _set_egg method. Reword comment. --- pkg_resources/__init__.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index edd3d2e8c6..2e7d505901 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1577,6 +1577,17 @@ def _get(self, path): register_loader_type(object, NullProvider) +def _parents(path): + """ + yield all parents of path including path + """ + last = None + while path != last: + yield path + last = path + path, _ = os.path.split(path) + + class EggProvider(NullProvider): """Provider based on a virtual filesystem""" @@ -1585,18 +1596,16 @@ def __init__(self, module): self._setup_prefix() def _setup_prefix(self): - # we assume here that our metadata may be nested inside a "basket" - # of multiple eggs; that's why we use module_path instead of .archive - path = self.module_path - old = None - while path != old: - if _is_egg_path(path): - self.egg_name = os.path.basename(path) - self.egg_info = os.path.join(path, 'EGG-INFO') - self.egg_root = path - break - old = path - path, base = os.path.split(path) + # Assume that metadata may be nested inside a "basket" + # of multiple eggs and use module_path instead of .archive. + eggs = filter(_is_egg_path, _parents(self.module_path)) + egg = next(eggs, None) + egg and self._set_egg(egg) + + def _set_egg(self, path): + self.egg_name = os.path.basename(path) + self.egg_info = os.path.join(path, 'EGG-INFO') + self.egg_root = path class DefaultProvider(EggProvider): From 965ec0df1ffa98ba5d8913a2770daaf5b92b0a0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 07:03:19 -0400 Subject: [PATCH 7920/8469] In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file. Fixes #2129. --- changelog.d/2129.change.rst | 1 + pkg_resources/__init__.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 changelog.d/2129.change.rst diff --git a/changelog.d/2129.change.rst b/changelog.d/2129.change.rst new file mode 100644 index 0000000000..b7d388621e --- /dev/null +++ b/changelog.d/2129.change.rst @@ -0,0 +1 @@ +In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file. diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2e7d505901..3c826eb0b8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2373,7 +2373,15 @@ def _is_egg_path(path): """ Determine if given path appears to be an egg. """ - return path.lower().endswith('.egg') + return _is_zip_egg(path) or _is_unpacked_egg(path) + + +def _is_zip_egg(path): + return ( + path.lower().endswith('.egg') and + os.path.isfile(path) and + zipfile.is_zipfile(path) + ) def _is_unpacked_egg(path): @@ -2381,7 +2389,7 @@ def _is_unpacked_egg(path): Determine if given path appears to be an unpacked egg. """ return ( - _is_egg_path(path) and + path.lower().endswith('.egg') and os.path.isfile(os.path.join(path, 'EGG-INFO', 'PKG-INFO')) ) From 7339f2c1cea8fa5275b699f494300a309d58c580 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 07:27:00 -0400 Subject: [PATCH 7921/8469] =?UTF-8?q?Bump=20version:=2046.4.0=20=E2=86=92?= =?UTF-8?q?=2047.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1700.change.rst | 1 - changelog.d/2094.breaking.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1700.change.rst delete mode 100644 changelog.d/2094.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 72d02f2b59..2639380ecb 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 46.4.0 +current_version = 47.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ea667028a2..db1c67f71d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v47.0.0 +------- + +* #2094: Setuptools now actively crashes under Python 2. Python 3.5 or later is required. Users of Python 2 should use ``setuptools<45``. +* #1700: Document all supported keywords by migrating the ones from distutils. + + v46.4.0 ------- diff --git a/changelog.d/1700.change.rst b/changelog.d/1700.change.rst deleted file mode 100644 index f66046a2ca..0000000000 --- a/changelog.d/1700.change.rst +++ /dev/null @@ -1 +0,0 @@ -Document all supported keywords by migrating the ones from distutils. diff --git a/changelog.d/2094.breaking.rst b/changelog.d/2094.breaking.rst deleted file mode 100644 index c278d0fdb4..0000000000 --- a/changelog.d/2094.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools now actively crashes under Python 2. Python 3.5 or later is required. Users of Python 2 should use ``setuptools<45``. diff --git a/setup.cfg b/setup.cfg index 72d4dce92c..ed31c45037 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 46.4.0 +version = 47.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 3b32ab28d78eb38f681d36ecef505a65d1cbad38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 07:54:35 -0400 Subject: [PATCH 7922/8469] In wheel-to-egg conversion, use simple pkg_resources-style namespace declaration for packages that declare namespace_packages. Fixes #2070. --- setuptools/wheel.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setuptools/wheel.py b/setuptools/wheel.py index ec1106a7b2..ca09bd1944 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -27,12 +27,8 @@ )\.whl$""", re.VERBOSE).match -NAMESPACE_PACKAGE_INIT = '''\ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - __path__ = __import__('pkgutil').extend_path(__path__, __name__) -''' +NAMESPACE_PACKAGE_INIT = \ + "__import__('pkg_resources').declare_namespace(__name__)\n" def unpack(src_dir, dst_dir): From 6bf44e11960fa31aaa5b910879fdd4435b524244 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 07:55:09 -0400 Subject: [PATCH 7923/8469] =?UTF-8?q?Bump=20version:=2047.0.0=20=E2=86=92?= =?UTF-8?q?=2047.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2639380ecb..1fa442e280 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.0.0 +current_version = 47.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index db1c67f71d..dbade95081 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v47.1.0 +------- + +* #2070: In wheel-to-egg conversion, use simple pkg_resources-style namespace declaration for packages that declare namespace_packages. + + v47.0.0 ------- diff --git a/setup.cfg b/setup.cfg index ed31c45037..c8f72e97cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.0.0 +version = 47.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 1639d010a7469ca6cabf49d038dfcfb4a4472a3d Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Tue, 26 May 2020 17:49:10 -0400 Subject: [PATCH 7924/8469] docs: detail userguide for entry point WIP --- docs/userguide/entry_point.txt | 118 ++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 47 deletions(-) diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt index 18211a72c9..a23d223b50 100644 --- a/docs/userguide/entry_point.txt +++ b/docs/userguide/entry_point.txt @@ -2,61 +2,82 @@ Entry Points and Automatic Script Creation ========================================== -Packaging and installing scripts can be a bit awkward with the distutils. For -one thing, there's no easy way to have a script's filename match local -conventions on both Windows and POSIX platforms. For another, you often have -to create a separate file just for the "main" script, when your actual "main" -is a function in a module somewhere. And even in Python 2.4, using the ``-m`` -option only works for actual ``.py`` files that aren't installed in a package. - -``setuptools`` fixes all of these problems by automatically generating scripts -for you with the correct extension, and on Windows it will even create an -``.exe`` file so that users don't have to change their ``PATHEXT`` settings. -The way to use this feature is to define "entry points" in your setup script -that indicate what function the generated script should import and run. For -example, to create two console scripts called ``foo`` and ``bar``, and a GUI -script called ``baz``, you might do something like this:: +When installing a package, you may realize you can invoke some commands without +explicitly calling the python interpreter. For example, instead of calling +``python -m pip install`` you can just do ``pip install``. The magic behind +this is entry point, a keyword passed to your ``setup.cfg`` or ``setup.py`` +to create script wrapped around function in your libraries. + + +Using entry point in your package +================================= +Let's start with an example. Suppose you have written your package like this: + +.. code-block:: bash + + timmins/ + timmins/__init__.py + setup.cfg + #other necessary files + +and in your ``__init__.py`` it defines a function: + +.. code-block:: python + + def helloworld(): + print("Hello world") + +After installing the package, you can invoke this function in the following +manner, without applying any magic: + +.. code-block:: bash + + python -m mypkg.helloworld + +But entry point simplifies this process and would create a wrapper script around +your function, making it behave more natively. To do that, add the following +lines to your ``setup.cfg`` or ``setup.py``: + +.. code-block:: ini + + [options] + #... + entry_points = + [console_scripts] + helloworld = mypkg:helloworld + +.. code-block:: python setup( - # other arguments here... - entry_points={ - "console_scripts": [ - "foo = my_package.some_module:main_func", - "bar = other_module:some_func", - ], - "gui_scripts": [ - "baz = my_package_gui:start_func", - ] - } + #... + entry_points = """ + [console_scripts] + helloworld = mypkg:helloworld + """ ) -When this project is installed on non-Windows platforms (using "setup.py -install", "setup.py develop", or with pip), a set of ``foo``, ``bar``, -and ``baz`` scripts will be installed that import ``main_func`` and -``some_func`` from the specified modules. The functions you specify are -called with no arguments, and their return value is passed to -``sys.exit()``, so you can return an errorlevel or message to print to -stderr. +The syntax for your entry points is specified as follows -On Windows, a set of ``foo.exe``, ``bar.exe``, and ``baz.exe`` launchers are -created, alongside a set of ``foo.py``, ``bar.py``, and ``baz.pyw`` files. The -``.exe`` wrappers find and execute the right version of Python to run the -``.py`` or ``.pyw`` file. +.. code-block:: -You may define as many "console script" and "gui script" entry points as you -like, and each one can optionally specify "extras" that it depends on, that -will be added to ``sys.path`` when the script is run. For more information on -"extras", see the section below on `Declaring Extras`_. For more information -on "entry points" in general, see the section below on `Dynamic Discovery of -Services and Plugins`_. + [] + = [..]: +where ``name`` is the name for the script you want to create and the left hand +side of ``:`` is the module that contains your function and the right hand +side is the function you wish to wrap. ``type`` specifies the type of script +you want to create. ``setuptools`` currently supports either ``[console_script]`` +and ``[gui_script]`` (DOUBLE CHECK ON THIS). -Dynamic Discovery of Services and Plugins ------------------------------------------ +After installation, you will be able to invoke that function simply calling +``helloworld`` on your command line. It will also do command line options parsing +for you! -``setuptools`` supports creating libraries that "plug in" to extensible -applications and frameworks, by letting you register "entry points" in your -project that can be imported by the application or framework. +Dynamic discovery of services and plugins +========================================= +The ability of entry points isn't limited to "advertising" your functions. In +fact, its implementation allows us to achieve more powerful features, such as +supporting libraries that "plus in" to extensible applications and frameworks For example, suppose that a blogging tool wants to support plugins that provide translation for various file types to the blog's output format. @@ -112,4 +133,7 @@ of an entry point, any requirements implied by the associated extras will be passed to ``pkg_resources.require()``, so that an appropriate error message can be displayed if the needed package(s) are missing. (Of course, the invoking app or framework can ignore such errors if it wants to make an entry -point optional if a requirement isn't installed.) \ No newline at end of file +point optional if a requirement isn't installed.) + +Dependencies management for entry points +======================================== From 45e784678b46636b7152ad7557d0757c3dfefaec Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Wed, 27 May 2020 11:08:45 -0400 Subject: [PATCH 7925/8469] docs: update entry point userguide --- docs/userguide/entry_point.txt | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt index a23d223b50..5772698e37 100644 --- a/docs/userguide/entry_point.txt +++ b/docs/userguide/entry_point.txt @@ -34,9 +34,10 @@ manner, without applying any magic: python -m mypkg.helloworld -But entry point simplifies this process and would create a wrapper script around -your function, making it behave more natively. To do that, add the following -lines to your ``setup.cfg`` or ``setup.py``: +But entry point simplifies the call and would create a wrapper script around +your function, making it behave more natively (you type in ``helloworld`` and +the ``helloworld`` function residing inside ``__init__.py`` is executed!). To +accomplish that, add the following lines to your ``setup.cfg`` or ``setup.py``: .. code-block:: ini @@ -56,22 +57,27 @@ lines to your ``setup.cfg`` or ``setup.py``: """ ) -The syntax for your entry points is specified as follows +The syntax for entry points is specified as follows: .. code-block:: [] - = [..]: + = [..][:.] -where ``name`` is the name for the script you want to create and the left hand +where ``name`` is the name for the script you want to create, the left hand side of ``:`` is the module that contains your function and the right hand -side is the function you wish to wrap. ``type`` specifies the type of script -you want to create. ``setuptools`` currently supports either ``[console_script]`` -and ``[gui_script]`` (DOUBLE CHECK ON THIS). - -After installation, you will be able to invoke that function simply calling -``helloworld`` on your command line. It will also do command line options parsing -for you! +side is the object you want to invoke (e.g. a function). ``type`` specifies the +type of script you want to create. ``setuptools`` currently supports either +``[console_script]`` and ``[gui_script]``. + +.. note:: + the syntax is not limited to ``INI`` string as demonstrated above. You can + also pass in the values in the form of a dictionary or list. Check out + :ref:`keyword reference ` for more details + +After installation, you will be able to invoke that function by simply calling +``helloworld`` on your command line. It will even do command line argument +parsing for you! Dynamic discovery of services and plugins ========================================= From 3eb1cecdd24c53bd07911177c52b3de253159709 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 28 May 2020 13:28:02 -0400 Subject: [PATCH 7926/8469] docs: guide on entry point completed Coverage 1. console_script 2. plugin support 3. optional dependencies --- docs/userguide/entry_point.txt | 181 +++++++++++++++++++++------------ 1 file changed, 118 insertions(+), 63 deletions(-) diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt index 5772698e37..fe31f446d3 100644 --- a/docs/userguide/entry_point.txt +++ b/docs/userguide/entry_point.txt @@ -1,12 +1,14 @@ +.. _`entry_points`: + ========================================== Entry Points and Automatic Script Creation ========================================== -When installing a package, you may realize you can invoke some commands without -explicitly calling the python interpreter. For example, instead of calling -``python -m pip install`` you can just do ``pip install``. The magic behind -this is entry point, a keyword passed to your ``setup.cfg`` or ``setup.py`` -to create script wrapped around function in your libraries. +After installing some packages, you may realize you can invoke some commands +without explicitly calling the python interpreter. For example, instead of +calling ``python -m pip install`` you can just do ``pip install``. The magic +behind this is entry point, a keyword passed to your ``setup.cfg`` or +``setup.py`` to create script wrapped around function in your libraries. Using entry point in your package @@ -17,7 +19,7 @@ Let's start with an example. Suppose you have written your package like this: timmins/ timmins/__init__.py - setup.cfg + setup.cfg # or setup.py #other necessary files and in your ``__init__.py`` it defines a function: @@ -79,67 +81,120 @@ After installation, you will be able to invoke that function by simply calling ``helloworld`` on your command line. It will even do command line argument parsing for you! -Dynamic discovery of services and plugins -========================================= -The ability of entry points isn't limited to "advertising" your functions. In -fact, its implementation allows us to achieve more powerful features, such as -supporting libraries that "plus in" to extensible applications and frameworks - -For example, suppose that a blogging tool wants to support plugins -that provide translation for various file types to the blog's output format. -The framework might define an "entry point group" called ``blogtool.parsers``, -and then allow plugins to register entry points for the file extensions they -support. - -This would allow people to create distributions that contain one or more -parsers for different file types, and then the blogging tool would be able to -find the parsers at runtime by looking up an entry point for the file -extension (or mime type, or however it wants to). - -Note that if the blogging tool includes parsers for certain file formats, it -can register these as entry points in its own setup script, which means it -doesn't have to special-case its built-in formats. They can just be treated -the same as any other plugin's entry points would be. - -If you're creating a project that plugs in to an existing application or -framework, you'll need to know what entry points or entry point groups are -defined by that application or framework. Then, you can register entry points -in your setup script. Here are a few examples of ways you might register an -``.rst`` file parser entry point in the ``blogtool.parsers`` entry point group, -for our hypothetical blogging tool:: - setup( - # ... - entry_points={"blogtool.parsers": ".rst = some_module:SomeClass"} - ) +Dynamic discovery of services (aka plugin support) +================================================== +The ability of entry points isn't limited to "advertising" your functions. Its +implementation allows us to accomplish more powerful features, such as creating +plugins. In fact, the aforementioned script wrapping ability is a form of +plugin that was built into ``setuptools``. With that being said, you now have +more options than ``[console_script]`` or ``[gui_script]`` when creating your +package. - setup( - # ... - entry_points={"blogtool.parsers": [".rst = some_module:a_func"]} - ) +To understand how you can extend this functionality, let's go through how +``setuptool`` does its ``[console_script]`` magic. Again, we use the same +example as above: - setup( - # ... - entry_points=""" - [blogtool.parsers] - .rst = some.nested.module:SomeClass.some_classmethod [reST] - """, - extras_require=dict(reST="Docutils>=0.3.5") - ) +.. code-block:: ini + + [options] + # ... + entry_points = + [console_scripts] + helloworld = mypkg:helloworld + +Package installation contains multiple steps, so at some point, this package +becomes available to your interpreter, and if you run the following code: + +.. code-block:: ini + + >>> import pkg_resources #a module part of setuptools + >>> [item for item in + pkg_srouces.working_set.iter_entry_points('console_scripts')] + +It will return a list of special objects (called "EntryPoints"), and there +will be one of them that corresponds to the ``helloworld = mypkg:helloworld`` +which we defined above. In fact, this object doesn't just contain the string, +but also an encompassing representation of the package that created it. +In the case of ``console_scripts``, setuptools will automatically invoke +an internal function that utilizes this object and create the wrapper scripts +and place them in your ``bin`` directory for your interpreter. How +``pkg_resource`` look up all the entry points is further detailed in our +:ref:`developer_guide` (WIP). With that being said, if you specify a different +entry point: + +.. code-block:: ini + + [options] + # ... + entry_points = + [iam.just.playing.around] + helloworld = mypkg:helloworld + +Then, running the same python expression like above: + +.. code-block:: python + + >>> import pkg_resources + >>> [item for item in + pkg_srouces.working_set.iter_entry_points('iam.just.playing.around') + ] + +will create another ``EntryPoints`` object that contains the +``helloworld = mypkg:helloworld`` and you can create custom +functions to exploit its information however you want. For example, one of +the installed programs on your system may contain a startup script that +scans the system for all the packages that specify this +``iam.just.playing.around`` entry points, such that when you install this new +package, it becomes immediately available without having to reconfigure +the already installed program. This in fact is the very idea of a plugin! -The ``entry_points`` argument to ``setup()`` accepts either a string with -``.ini``-style sections, or a dictionary mapping entry point group names to -either strings or lists of strings containing entry point specifiers. An -entry point specifier consists of a name and value, separated by an ``=`` -sign. The value consists of a dotted module name, optionally followed by a -``:`` and a dotted identifier naming an object within the module. It can -also include a bracketed list of "extras" that are required for the entry -point to be used. When the invoking application or framework requests loading -of an entry point, any requirements implied by the associated extras will be -passed to ``pkg_resources.require()``, so that an appropriate error message -can be displayed if the needed package(s) are missing. (Of course, the -invoking app or framework can ignore such errors if it wants to make an entry -point optional if a requirement isn't installed.) Dependencies management for entry points ======================================== +Some entry points may require additional dependencies for them to work and +others may trigger the installation of additional dependencies only when they +are run. While this is elaborated in more excrutiating details on +:ref:`guide on dependencies management `, we will +provide a brief overview on the entry point aspect. + +Dependencies of this manner are declared using the ``extra_requires`` keywords, +which takes a mapping of the arbitary name of the functionality and a list of +its depencencies, optionally suffixed with its :ref:`version specifier +`. For example, our package provides "pdf" output capability +which requires at least 0.3 version of "ReportLab" and whatever version of "RXP" + +.. code-block:: ini + + [options.extras_require] + PDF = ReportLab>=1.2; RXP + +.. code-block:: python + + setup( + extras_require = { + "PDF": ["ReportLab>=1.2", "RXP"], + } + ) + + +And we only want them to be installed if the console script entry point +``rst2pdf`` is run: + +.. code-block:: ini + + [options] + entry_points = + ['console_script'] + rst2pdf = project_a.tools.pdfgen [PDF] + rst2html = project_a.tools.htmlgen + +.. code-block:: python + + setup( + entry_points = """ + ['console_script'] + rst2pdf = project_a.tools.pdfgen [PDF] + rst2html = project_a.tools.htmlgen + """ + ) From 1459bb4dcdc0f08463c71906952b35275be531de Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 28 May 2020 14:32:49 -0400 Subject: [PATCH 7927/8469] docs: fixed mistaken explanation --- docs/userguide/entry_point.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt index fe31f446d3..8190d8e339 100644 --- a/docs/userguide/entry_point.txt +++ b/docs/userguide/entry_point.txt @@ -69,8 +69,8 @@ The syntax for entry points is specified as follows: where ``name`` is the name for the script you want to create, the left hand side of ``:`` is the module that contains your function and the right hand side is the object you want to invoke (e.g. a function). ``type`` specifies the -type of script you want to create. ``setuptools`` currently supports either -``[console_script]`` and ``[gui_script]``. +type of entry point (pertinent to the program that exploits it). ``setuptools`` +natively supports ``[console_script]`` and ``[gui_script]``. .. note:: the syntax is not limited to ``INI`` string as demonstrated above. You can From fdf51a0bee8de4cf0c10ccd2f94541242580fa0c Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 28 May 2020 16:59:48 -0400 Subject: [PATCH 7928/8469] docs: editing user guide on dependency management --- docs/userguide/dependency_management.txt | 227 ++++++++++++++--------- 1 file changed, 137 insertions(+), 90 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index 18ba952f4f..d9990ded94 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -2,71 +2,118 @@ Dependencies Management in Setuptools ===================================== -Declaring Dependencies -====================== +``Setuptools``'s dependency management is meticulous, or agonizing, depending +on your level of familiarity. There are three types of dependency styles. +1) those required to run the packaging program (build system requirement), +2) those your package depends on (required dependency) and 3) optional +dependency. -``setuptools`` supports automatically installing dependencies when a package is -installed, and including information about dependencies in Python Eggs (so that -package management tools like pip can use the information). +.. Note:: + For all the packages you intend to add to dependency, you can optionally + specify the version following :ref:`reference on version specifyer ` -``setuptools`` and ``pkg_resources`` use a common syntax for specifying a -project's required dependencies. This syntax consists of a project's PyPI -name, optionally followed by a comma-separated list of "extras" in square -brackets, optionally followed by a comma-separated list of version -specifiers. A version specifier is one of the operators ``<``, ``>``, ``<=``, -``>=``, ``==`` or ``!=``, followed by a version identifier. Tokens may be -separated by whitespace, but any whitespace or nonstandard characters within a -project name or version identifier must be replaced with ``-``. -Version specifiers for a given project are internally sorted into ascending -version order, and used to establish what ranges of versions are acceptable. -Adjacent redundant conditions are also consolidated (e.g. ``">1, >2"`` becomes -``">2"``, and ``"<2,<3"`` becomes ``"<2"``). ``"!="`` versions are excised from -the ranges they fall within. A project's version is then checked for -membership in the resulting ranges. (Note that providing conflicting conditions -for the same version (e.g. "<2,>=2" or "==2,!=2") is meaningless and may -therefore produce bizarre results.) +Build system requirement +======================== -Here are some example requirement specifiers:: +Package requirement +------------------- +After organizing all the scripts and files and getting ready for packaging, +there needs to be a way to tell Python what programs it need to actually +do the packgaging (in our case, ``setuptools`` of course). Usually, +you also need the ``wheel`` package as well since it is recommended that you +upload a ``.whl`` file to PyPI alongside your ``.tar.gz`` file. Unlike the +other two types of dependency keyword, this one is specified in your +``pyproject.toml`` file (if you have forgot what this is, go to +:ref:`quickstart` or (WIP)): - docutils >= 0.3 +.. code-block:: ini - # comment lines and \ continuations are allowed in requirement strings - BazSpam ==1.1, ==1.2, ==1.3, ==1.4, ==1.5, \ - ==1.6, ==1.7 # and so are line-end comments + [build-system] + requires = ["setuptools", "wheel"] + #... - PEAK[FastCGI, reST]>=0.5a4 +.. note:: + This used to be accomplished with the ``setup_requires`` keyword but is + now considered deprecated in favor of the PEP 517 style described above. + To peek into how this legacy keyword is used, consult our :ref:`guide on + deprecated practice (WIP)` - setuptools==0.5a7 -The simplest way to include requirement specifiers is to use the -``install_requires`` argument to ``setup()``. It takes a string or list of -strings containing requirement specifiers. If you include more than one -requirement in a string, each requirement must begin on a new line. +Python requirement +------------------ +In some cases, you might need to specify the minimum required python version. +This is handled with the ``python_requires`` keyword supplied to ``setup.cfg`` +or ``setup.py``. -This has three effects: +Example WIP -1. When your project is installed, either by using pip, ``setup.py install``, - or ``setup.py develop``, all of the dependencies not already installed will - be located (via PyPI), downloaded, built (if necessary), and installed. -2. Any scripts in your project will be installed with wrappers that verify - the availability of the specified dependencies at runtime, and ensure that - the correct versions are added to ``sys.path`` (e.g. if multiple versions - have been installed). +Declaring required dependency +============================= +This is where a package declares its core dependencies, without which it won't +be able to run. ``setuptools`` support automatically download and install +these dependencies when the package is installed. Although there is more +finess to it, let's start with a simple example. -3. Python Egg distributions will include a metadata file listing the - dependencies. +.. code-block:: ini + + [options] + #... + install_requires = + docutils + BazSpam ==1.1 + +.. code-block:: python + + setup( + #..., + install_requires = [ + 'docutils', + 'BazSpam ==1.1' + ] + ) + + +When your project is installed (e.g. using pip), all of the dependencies not +already installed will be located (via PyPI), downloaded, built (if necessary), +and installed and 2) Any scripts in your project will be installed with wrappers +that verify the availability of the specified dependencies at runtime, and +ensure that the correct versions are added to ``sys.path`` (e.g. if multiple +versions have been installed). + + +Platform specific dependencies +------------------------------ +Sometimes a project might require a dependency to run on a specific platform. +This could to a package that back ports a module so that it can be used in +older python versions. Or it could be a package that is required to run on a +specific operating system. This will allow a project to work on multiple +different platforms without installing dependencies that are not required for +a platform that is installing the project. + +For example, here is a project that uses the ``enum`` module and ``pywin32``:: + + setup( + name="Project", + ... + install_requires=[ + "enum34;python_version<'3.4'", + "pywin32 >= 1.0;platform_system=='Windows'" + ] + ) + +Since the ``enum`` module was added in Python 3.4, it should only be installed +if the python version is earlier. Since ``pywin32`` will only be used on +windows, it should only be installed when the operating system is Windows. +Specifying version requirements for the dependencies is supported as normal. + +The environmental markers that may be used for testing platform types are +detailed in `PEP 508 `_. -Note, by the way, that if you declare your dependencies in ``setup.py``, you do -*not* need to use the ``require()`` function in your scripts or modules, as -long as you either install the project or use ``setup.py develop`` to do -development work on it. (See `"Development Mode"`_ below for more details on -using ``setup.py develop``.) Dependencies that aren't in PyPI -------------------------------- - .. warning:: Dependency links support has been dropped by pip starting with version 19.0 (released 2019-01-22). @@ -122,22 +169,27 @@ temporary folder and run ``setup.py bdist_egg``. The ``dependency_links`` option takes the form of a list of URL strings. For example, this will cause a search of the specified page for eggs or source -distributions, if the package's dependencies aren't already installed:: +distributions, if the package's dependencies aren't already installed: + +.. code-block:: ini + + [options] + #... + dependency_links = http://peak.telecommunity.com/snapshots/ + +.. code-block:: python setup( - ... + #... dependency_links=[ "http://peak.telecommunity.com/snapshots/" ], ) -.. _Declaring Extras: - - -Declaring "Extras" (optional features with their own dependencies) ------------------------------------------------------------------- +Optional dependencies +===================== Sometimes a project has "recommended" dependencies, that are not required for all uses of the project. For example, a project might offer optional PDF output if ReportLab is installed, and reStructuredText support if docutils is @@ -170,14 +222,28 @@ dependencies. For example, if Project A includes a "rst2pdf" script, it might declare it like this, so that the "PDF" requirements are only resolved if the "rst2pdf" script is run:: +.. code-block:: ini + + [metadata] + name = Project A + #... + + [options] + #... + entry_points= + [console_scripts] + rst2pdf = project_a.tools.pdfgen [PDF] + rst2html = project_a.tools.htmlgen + +.. code-block:: python + setup( - name="Project-A", - ... + name = "Project-A" + #..., entry_points={ "console_scripts": [ "rst2pdf = project_a.tools.pdfgen [PDF]", "rst2html = project_a.tools.htmlgen", - # more script entry points ... ], } ) @@ -186,6 +252,19 @@ Projects can also use another project's extras when specifying dependencies. For example, if project B needs "project A" with PDF support installed, it might declare the dependency like this:: +.. code-block:: ini + + [metadata] + name = Project-B + #... + + [options] + #... + install_requires = + Project-A[PDF] + +.. code-block:: python + setup( name="Project-B", install_requires=["Project-A[PDF]"], @@ -221,35 +300,3 @@ so that Package B doesn't have to remove the ``[PDF]`` from its requirement specifier. .. _Platform Specific Dependencies: - - -Declaring platform specific dependencies ----------------------------------------- - -Sometimes a project might require a dependency to run on a specific platform. -This could to a package that back ports a module so that it can be used in -older python versions. Or it could be a package that is required to run on a -specific operating system. This will allow a project to work on multiple -different platforms without installing dependencies that are not required for -a platform that is installing the project. - -For example, here is a project that uses the ``enum`` module and ``pywin32``:: - - setup( - name="Project", - ... - install_requires=[ - "enum34;python_version<'3.4'", - "pywin32 >= 1.0;platform_system=='Windows'" - ] - ) - -Since the ``enum`` module was added in Python 3.4, it should only be installed -if the python version is earlier. Since ``pywin32`` will only be used on -windows, it should only be installed when the operating system is Windows. -Specifying version requirements for the dependencies is supported as normal. - -The environmental markers that may be used for testing platform types are -detailed in `PEP 508`_. - -.. _PEP 508: https://www.python.org/dev/peps/pep-0508/ From 00888dd0d88a3463afd6e68ad85da515c194d63f Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 28 May 2020 17:49:45 -0400 Subject: [PATCH 7929/8469] docs: more finetuning on dependency guide --- docs/userguide/dependency_management.txt | 128 ++++++++++++----------- 1 file changed, 68 insertions(+), 60 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index d9990ded94..abde5503f1 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -12,6 +12,7 @@ dependency. For all the packages you intend to add to dependency, you can optionally specify the version following :ref:`reference on version specifyer ` +.. contents:: Build system requirement ======================== @@ -85,29 +86,48 @@ versions have been installed). Platform specific dependencies ------------------------------ -Sometimes a project might require a dependency to run on a specific platform. -This could to a package that back ports a module so that it can be used in -older python versions. Or it could be a package that is required to run on a -specific operating system. This will allow a project to work on multiple -different platforms without installing dependencies that are not required for -a platform that is installing the project. +Setuptools offer the capability to evaluate certain conditions before blindly +installing everything listed in ``install_requires``. This is great for platform +specific dependencies. For example, the ``enum`` package was added in Python +3.4, therefore, package that depends on it can elect to install it only when +the Python version is older than 3.4. To accomplish this -For example, here is a project that uses the ``enum`` module and ``pywin32``:: +.. code-block:: ini + + [options] + #... + install_requires = + enum34;python_version<'3.4' + +.. code-block:: python setup( - name="Project", - ... + #... + install_requires=[ + "enum34;python_version<'3.4'",] + ) + +Similarly, if you also wish to declare ``pywin32`` with a minimal version of 1.0 +and only install it if the user is using a Windows operating system: + +.. code-block:: ini + + [options] + #... + install_requires = + enum34;python_version<'3.4' + pywin32 >= 1.0;platform_system=='Windows' + +.. code-block:: python + + setup( + #... install_requires=[ "enum34;python_version<'3.4'", "pywin32 >= 1.0;platform_system=='Windows'" - ] + ] ) -Since the ``enum`` module was added in Python 3.4, it should only be installed -if the python version is earlier. Since ``pywin32`` will only be used on -windows, it should only be installed when the operating system is Windows. -Specifying version requirements for the dependencies is supported as normal. - The environmental markers that may be used for testing platform types are detailed in `PEP 508 `_. @@ -187,40 +207,40 @@ distributions, if the package's dependencies aren't already installed: ) - Optional dependencies ===================== -Sometimes a project has "recommended" dependencies, that are not required for -all uses of the project. For example, a project might offer optional PDF -output if ReportLab is installed, and reStructuredText support if docutils is -installed. These optional features are called "extras", and setuptools allows -you to define their requirements as well. In this way, other projects that -require these optional features can force the additional requirements to be -installed, by naming the desired extras in their ``install_requires``. +Setuptools allows you to declare dependencies that only get installed under +specific circumstances. For example, let's say that Project-A offers optional +PDF support and requires some additional package for it to work. Such a +dependency will be specified with ``extras_require`` keyword and they are only +installed if another package depends on it (either directly or indirectly). + +Let's first see how to specify such package: + +.. code-block:: ini + + [metadata] + name = Package-A + + [options.extras_require] + PDF = ReportLab>=1.2; RXP + -For example, let's say that Project A offers optional PDF and reST support:: +.. code-block:: python setup( name="Project-A", - ... + #... extras_require={ "PDF": ["ReportLab>=1.2", "RXP"], - "reST": ["docutils>=0.3"], } ) -As you can see, the ``extras_require`` argument takes a dictionary mapping -names of "extra" features, to strings or lists of strings describing those -features' requirements. These requirements will *not* be automatically -installed unless another package depends on them (directly or indirectly) by -including the desired "extras" in square brackets after the associated project -name. (Or if the extras were listed in a requirement spec on the "pip install" -command line.) +The name ``PDF`` is an arbitary identifier of such a list of dependencies, to +which other components can refer and have them installed. There are two common +use cases. -Extras can be used by a project's `entry points`_ to specify dynamic -dependencies. For example, if Project A includes a "rst2pdf" script, it might -declare it like this, so that the "PDF" requirements are only resolved if the -"rst2pdf" script is run:: +First is the console_scripts entry point: .. code-block:: ini @@ -248,9 +268,12 @@ declare it like this, so that the "PDF" requirements are only resolved if the } ) -Projects can also use another project's extras when specifying dependencies. -For example, if project B needs "project A" with PDF support installed, it -might declare the dependency like this:: +When the script ``rst2pdf`` is run, it will trigger the installation of +the two dependencies ``PDF`` maps to. + +The second use case is that other package can use this "extra" for their +own dependencies. For example, if "Project-B" needs "project A" with PDF support +installed, it might declare the dependency like this:: .. code-block:: ini @@ -280,23 +303,8 @@ no longer needs ReportLab, or if it ends up needing other dependencies besides ReportLab in order to provide PDF support, Project B's setup information does not need to change, but the right packages will still be installed if needed. -Note, by the way, that if a project ends up not needing any other packages to -support a feature, it should keep an empty requirements list for that feature -in its ``extras_require`` argument, so that packages depending on that feature -don't break (due to an invalid feature name). For example, if Project A above -builds in PDF support and no longer needs ReportLab, it could change its -setup to this:: - - setup( - name="Project-A", - ... - extras_require={ - "PDF": [], - "reST": ["docutils>=0.3"], - } - ) - -so that Package B doesn't have to remove the ``[PDF]`` from its requirement -specifier. - -.. _Platform Specific Dependencies: +.. note:: + Best practice: if a project ends up not needing any other packages to + support a feature, it should keep an empty requirements list for that feature + in its ``extras_require`` argument, so that packages depending on that feature + don't break (due to an invalid feature name). From ca5e271eed022a492a60db8eed1e55e135d1210e Mon Sep 17 00:00:00 2001 From: Sumana Harihareswara Date: Thu, 28 May 2020 17:47:07 -0400 Subject: [PATCH 7930/8469] DOC: Update mailing list link Per https://groups.google.com/d/msg/pypa-dev/rUNsfIbruHM/LCEx-CB5AgAJ the pypa-dev Google Group is now decommissioned. Pointing to distutils-sig instead. Signed-off-by: Sumana Harihareswara --- changelog.d/2156.doc.rst | 1 + docs/developer-guide.txt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 changelog.d/2156.doc.rst diff --git a/changelog.d/2156.doc.rst b/changelog.d/2156.doc.rst new file mode 100644 index 0000000000..8d604979af --- /dev/null +++ b/changelog.d/2156.doc.rst @@ -0,0 +1 @@ +Update mailing list pointer in developer docs diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index e6171e4e30..4a78e22ea4 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -23,16 +23,16 @@ contribution. Project Management ------------------ -Setuptools is maintained primarily in Github at `this home +Setuptools is maintained primarily in GitHub at `this home `_. Setuptools is maintained under the Python Packaging Authority (PyPA) with several core contributors. All bugs -for Setuptools are filed and the canonical source is maintained in Github. +for Setuptools are filed and the canonical source is maintained in GitHub. User support and discussions are done through the issue tracker (for specific) -issues, through the distutils-sig mailing list, or on IRC (Freenode) at +issues, through the `distutils-sig mailing list `_, or on IRC (Freenode) at #pypa. -Discussions about development happen on the pypa-dev mailing list or on +Discussions about development happen on the distutils-sig mailing list or on `Gitter `_. ----------------- @@ -44,7 +44,7 @@ describing the motivation behind making changes. First search to see if a ticket already exists for your issue. If not, create one. Try to think from the perspective of the reader. Explain what behavior you expected, what you got instead, and what factors might have contributed to the unexpected -behavior. In Github, surround a block of code or traceback with the triple +behavior. In GitHub, surround a block of code or traceback with the triple backtick "\`\`\`" so that it is formatted nicely. Filing a ticket provides a forum for justification, discussion, and From 89e852c476c4fad9849ac21562be5be836c5a9f6 Mon Sep 17 00:00:00 2001 From: alvyjudy Date: Thu, 28 May 2020 17:58:16 -0400 Subject: [PATCH 7931/8469] docs: restored notes on "require()" function --- docs/userguide/dependency_management.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index abde5503f1..ca2ac75ac4 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -83,6 +83,12 @@ that verify the availability of the specified dependencies at runtime, and ensure that the correct versions are added to ``sys.path`` (e.g. if multiple versions have been installed). +.. note:: + if you declare your dependencies in ``setup.py``, you do + *not* need to use the ``require()`` function in your scripts or modules, as + long as you either install the project or use ``setup.py develop`` to do + development work on it. + Platform specific dependencies ------------------------------ From 4020c9a5fe3c30e1192412786ce299dd8a909266 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 20:04:58 -0400 Subject: [PATCH 7932/8469] Avoid loading working set during `Distribution.finalize_options` prior to invoking `_install_setup_requires`, broken since v42.0.0. Fixes #2158. --- setuptools/__init__.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a71b2bbdc6..9d8ae1ed5f 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -129,10 +129,27 @@ def _looks_like_package(path): def _install_setup_requires(attrs): # Note: do not use `setuptools.Distribution` directly, as # our PEP 517 backend patch `distutils.core.Distribution`. - dist = distutils.core.Distribution(dict( - (k, v) for k, v in attrs.items() - if k in ('dependency_links', 'setup_requires') - )) + class MinimalDistribution(distutils.core.Distribution): + """ + A minimal version of a distribution for supporting the + fetch_build_eggs interface. + """ + def __init__(self, attrs): + _incl = 'dependency_links', 'setup_requires' + filtered = { + k: attrs[k] + for k in set(_incl) & set(attrs) + } + distutils.core.Distribution.__init__(self, filtered) + + def finalize_options(self): + """ + Disable finalize_options to avoid building the working set. + Ref #2158. + """ + + dist = MinimalDistribution(attrs) + # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: From 2dc4b62da3d32bd765686d62c8ce5ec69b96ff92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 20:05:26 -0400 Subject: [PATCH 7933/8469] Update changelog. --- changelog.d/2158.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2158.misc.rst diff --git a/changelog.d/2158.misc.rst b/changelog.d/2158.misc.rst new file mode 100644 index 0000000000..16a5a50410 --- /dev/null +++ b/changelog.d/2158.misc.rst @@ -0,0 +1 @@ +Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. From df51e62984850e58e8f29e8223b714091e0b8a5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 21:00:39 -0400 Subject: [PATCH 7934/8469] =?UTF-8?q?Bump=20version:=2044.1.0=20=E2=86=92?= =?UTF-8?q?=2044.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2158.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2158.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c8c9f544bf..4bea6cca5a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 44.1.0 +current_version = 44.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 83cd8c784b..43b65eb33a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v44.1.1 +------- + +* #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. + + v44.1.0 ------- diff --git a/changelog.d/2158.misc.rst b/changelog.d/2158.misc.rst deleted file mode 100644 index 16a5a50410..0000000000 --- a/changelog.d/2158.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. diff --git a/setup.cfg b/setup.cfg index cb5ae73bc4..323d2cf596 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ universal = 1 [metadata] name = setuptools -version = 44.1.0 +version = 44.1.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 6214d4d20a1c329f0b333abcdaaf7d242eed5e3f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 28 May 2020 21:13:12 -0400 Subject: [PATCH 7935/8469] =?UTF-8?q?Bump=20version:=2047.1.0=20=E2=86=92?= =?UTF-8?q?=2047.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ changelog.d/2156.doc.rst | 1 - setup.cfg | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2156.doc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1fa442e280..23226c351b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.1.0 +current_version = 47.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 048fef6b13..b018cbea4d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v47.1.1 +------- + +* #2156: Update mailing list pointer in developer docs + +Incorporate changes from v44.1.1: + +* #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. + + v44.1.1 ------- diff --git a/changelog.d/2156.doc.rst b/changelog.d/2156.doc.rst deleted file mode 100644 index 8d604979af..0000000000 --- a/changelog.d/2156.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Update mailing list pointer in developer docs diff --git a/setup.cfg b/setup.cfg index c8f72e97cf..66fb8921b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.1.0 +version = 47.1.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 74de4e985eda49e38ece5805e05197dd4d2d9c8a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 May 2020 17:50:32 -0400 Subject: [PATCH 7936/8469] The workaround is only needed for Python 2. Ref #1998. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index aa99e28367..d3df21bffd 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ minversion = 3.2 requires = tox-pip-version >= 0.0.6 # workaround for #1998 - virtualenv < 20 + virtualenv < 20; python_version=="2.7" [helpers] # Custom pip behavior From e4aa9070e7196975edb41f8dcaccf8eccbf83b2e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 May 2020 18:21:24 -0400 Subject: [PATCH 7937/8469] Setuptools no longer installs a site.py file during easy_install or develop installs. Ref #2165. --- setuptools/command/develop.py | 1 - setuptools/command/easy_install.py | 44 +--------------- setuptools/site-patch.py | 76 --------------------------- setuptools/tests/test_easy_install.py | 8 --- tox.ini | 2 - 5 files changed, 2 insertions(+), 129 deletions(-) delete mode 100644 setuptools/site-patch.py diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index b561924609..e7e03cd449 100644 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -139,7 +139,6 @@ def install_for_development(self): self.reinitialize_command('build_ext', inplace=1) self.run_command('build_ext') - self.install_site_py() # ensure that target dir is site-safe if setuptools.bootstrap_install_from: self.easy_install(setuptools.bootstrap_install_from) setuptools.bootstrap_install_from = None diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5a9576ff29..a68490abda 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -205,7 +205,6 @@ def initialize_options(self): self.pth_file = self.always_copy_from = None self.site_dirs = None self.installed_projects = {} - self.sitepy_installed = False # Always read easy_install options, even if we are subclassed, or have # an independent instance created. This ensures that defaults will # always come from the standard configuration file(s)' "easy_install" @@ -494,12 +493,8 @@ def check_site_dir(self): else: self.pth_file = None - if instdir not in map(normalize_path, _pythonpath()): - # only PYTHONPATH dirs need a site.py, so pretend it's there - self.sitepy_installed = True - elif self.multi_version and not os.path.exists(pth_file): - self.sitepy_installed = True # don't need site.py in this case - self.pth_file = None # and don't create a .pth file + if self.multi_version and not os.path.exists(pth_file): + self.pth_file = None # don't create a .pth file self.install_dir = instdir __cant_write_msg = textwrap.dedent(""" @@ -656,9 +651,6 @@ def _tmpdir(self): os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir)) def easy_install(self, spec, deps=False): - if not self.editable: - self.install_site_py() - with self._tmpdir() as tmpdir: if not isinstance(spec, Requirement): if URL_SCHEME(spec): @@ -1317,38 +1309,6 @@ def byte_compile(self, to_compile): Please make the appropriate changes for your system and try again. """).strip() - def install_site_py(self): - """Make sure there's a site.py in the target dir, if needed""" - - if self.sitepy_installed: - return # already did it, or don't need to - - sitepy = os.path.join(self.install_dir, "site.py") - source = resource_string("setuptools", "site-patch.py") - source = source.decode('utf-8') - current = "" - - if os.path.exists(sitepy): - log.debug("Checking existing site.py in %s", self.install_dir) - with io.open(sitepy) as strm: - current = strm.read() - - if not current.startswith('def __boot():'): - raise DistutilsError( - "%s is not a setuptools-generated site.py; please" - " remove it." % sitepy - ) - - if current != source: - log.info("Creating %s", sitepy) - if not self.dry_run: - ensure_directory(sitepy) - with io.open(sitepy, 'w', encoding='utf-8') as strm: - strm.write(source) - self.byte_compile([sitepy]) - - self.sitepy_installed = True - def create_home_path(self): """Create directories under ~.""" if not self.user: diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py deleted file mode 100644 index be0d43d354..0000000000 --- a/setuptools/site-patch.py +++ /dev/null @@ -1,76 +0,0 @@ -def __boot(): - import sys - import os - PYTHONPATH = os.environ.get('PYTHONPATH') - if PYTHONPATH is None or (sys.platform == 'win32' and not PYTHONPATH): - PYTHONPATH = [] - else: - PYTHONPATH = PYTHONPATH.split(os.pathsep) - - pic = getattr(sys, 'path_importer_cache', {}) - stdpath = sys.path[len(PYTHONPATH):] - mydir = os.path.dirname(__file__) - - for item in stdpath: - if item == mydir or not item: - continue # skip if current dir. on Windows, or my own directory - importer = pic.get(item) - if importer is not None: - loader = importer.find_module('site') - if loader is not None: - # This should actually reload the current module - loader.load_module('site') - break - else: - try: - import imp # Avoid import loop in Python 3 - stream, path, descr = imp.find_module('site', [item]) - except ImportError: - continue - if stream is None: - continue - try: - # This should actually reload the current module - imp.load_module('site', stream, path, descr) - finally: - stream.close() - break - else: - raise ImportError("Couldn't find the real 'site' module") - - # 2.2 comp - known_paths = dict([( - makepath(item)[1], 1) for item in sys.path]) # noqa - - oldpos = getattr(sys, '__egginsert', 0) # save old insertion position - sys.__egginsert = 0 # and reset the current one - - for item in PYTHONPATH: - addsitedir(item) # noqa - - sys.__egginsert += oldpos # restore effective old position - - d, nd = makepath(stdpath[0]) # noqa - insert_at = None - new_path = [] - - for item in sys.path: - p, np = makepath(item) # noqa - - if np == nd and insert_at is None: - # We've hit the first 'system' path entry, so added entries go here - insert_at = len(new_path) - - if np in known_paths or insert_at is None: - new_path.append(item) - else: - # new path after the insert point, back-insert it - new_path.insert(insert_at, item) - insert_at += 1 - - sys.path[:] = new_path - - -if __name__ == 'site': - __boot() - del __boot diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3044cbd098..e8ebd3205a 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -61,14 +61,6 @@ def as_requirement(self): class TestEasyInstallTest: - def test_install_site_py(self, tmpdir): - dist = Distribution() - cmd = ei.easy_install(dist) - cmd.sitepy_installed = False - cmd.install_dir = str(tmpdir) - cmd.install_site_py() - assert (tmpdir / 'site.py').exists() - def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() expected = header + DALS(r""" diff --git a/tox.ini b/tox.ini index d3df21bffd..a1cc0b6e39 100644 --- a/tox.ini +++ b/tox.ini @@ -7,8 +7,6 @@ envlist=python minversion = 3.2 requires = tox-pip-version >= 0.0.6 - # workaround for #1998 - virtualenv < 20; python_version=="2.7" [helpers] # Custom pip behavior From d9a3b57cfabcae25539b5118977b2f6ef78d641b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 May 2020 18:22:39 -0400 Subject: [PATCH 7938/8469] Update changelog. --- changelog.d/2165.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2165.breaking.rst diff --git a/changelog.d/2165.breaking.rst b/changelog.d/2165.breaking.rst new file mode 100644 index 0000000000..a9b598b937 --- /dev/null +++ b/changelog.d/2165.breaking.rst @@ -0,0 +1 @@ +Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165. From a5dbf96442a539dbdb59af56898f0571dc68c3d6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 30 May 2020 17:11:49 -0400 Subject: [PATCH 7939/8469] Drop support for Python 3.5. --- .github/workflows/python-tests.yml | 1 - .travis.yml | 1 - appveyor.yml | 12 +++++------- setup.cfg | 7 +++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index e3663cf0b8..41441644f3 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -23,7 +23,6 @@ jobs: - pypy3 - 3.7 - 3.6 - - 3.5 os: - ubuntu-latest - ubuntu-16.04 diff --git a/.travis.yml b/.travis.yml index f97abc51c4..fa04a42e6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ jobs: include: - python: pypy3 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - - python: 3.5 - python: 3.6 - python: 3.7 - &latest_py3 diff --git a/appveyor.yml b/appveyor.yml index de4e6c66c6..3c0c36b83e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,15 +8,13 @@ environment: matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_JOB_NAME: "python35-x64-vs2015" - PYTHON: "C:\\Python35-x64" + APPVEYOR_JOB_NAME: "python36-x64-vs2015" + PYTHON: "C:\\Python36-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_JOB_NAME: "python35-x64-vs2017" - PYTHON: "C:\\Python35-x64" + APPVEYOR_JOB_NAME: "python36-x64-vs2017" + PYTHON: "C:\\Python36-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_JOB_NAME: "python35-x64-vs2019" - PYTHON: "C:\\Python35-x64" - - APPVEYOR_JOB_NAME: "python36-x64" + APPVEYOR_JOB_NAME: "python36-x64-vs2019" PYTHON: "C:\\Python36-x64" - APPVEYOR_JOB_NAME: "python37-x64" PYTHON: "C:\\Python37-x64" diff --git a/setup.cfg b/setup.cfg index 66fb8921b9..8558057f3b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 @@ -45,7 +44,7 @@ classifiers = [options] zip_safe = True -python_requires = >=3.5 +python_requires = >=3.6 py_modules = easy_install packages = find: @@ -62,14 +61,14 @@ certs = tests = mock pytest-flake8 - flake8-2020; python_version>="3.6" + flake8-2020 virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 pytest>=3.7 wheel coverage>=4.5.1 pytest-cov>=2.5.1 - paver; python_version>="3.6" + paver futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. From 4ac101a1805a3773649b42c7682038f41314738e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 08:43:36 -0400 Subject: [PATCH 7940/8469] Restore Python 3.5 syntax compatibility in distutils.dist. --- distutils/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distutils/dist.py b/distutils/dist.py index 6cf0a0d663..37db4d6cd7 100644 --- a/distutils/dist.py +++ b/distutils/dist.py @@ -35,7 +35,8 @@ def _ensure_list(value, fieldname): elif not isinstance(value, list): # passing a tuple or an iterator perhaps, warn and convert typename = type(value).__name__ - msg = f"Warning: '{fieldname}' should be a list, got type '{typename}'" + msg = "Warning: '{fieldname}' should be a list, got type '{typename}'" + msg = msg.format(**locals()) log.log(log.WARN, msg) value = list(value) return value From 9962c0af814ccd13c370ce8b04742a52f77025c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 08:50:31 -0400 Subject: [PATCH 7941/8469] Extract function for ensure_local_distuils --- setuptools/distutils_patch.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index e0abbd77da..43b64c0fc8 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -21,9 +21,11 @@ def patch_sys_path(): sys.path[:] = orig -if 'distutils' in sys.path: - raise RuntimeError("Distutils must not be imported before setuptools") +def ensure_local_distutils(): + if 'distutils' in sys.path: + raise RuntimeError("Distutils must not be imported before setuptools") + with patch_sys_path(): + importlib.import_module('distutils') -with patch_sys_path(): - importlib.import_module('distutils') +ensure_local_distutils() From 38a8632835c90bfb0a220f91a8b2e982a69b81ab Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 09:34:34 -0400 Subject: [PATCH 7942/8469] Fallback to '_sysconfigdata' when platform-specific sysconfigdata is unavailable. --- distutils/sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 2109f746ba..79391e8671 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -444,7 +444,12 @@ def _init_posix(): platform=sys.platform, multiarch=getattr(sys.implementation, '_multiarch', ''), )) - _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + try: + _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + except ImportError: + # Python 3.5 and pypy 7.3.1 + _temp = __import__( + '_sysconfigdata', globals(), locals(), ['build_time_vars'], 0) build_time_vars = _temp.build_time_vars global _config_vars _config_vars = {} From db7ff2e1b0ea51fee56b7f626a548cd2ef590e5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 12:26:45 -0400 Subject: [PATCH 7943/8469] Add changelog entry. --- changelog.d/2143.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2143.breaking.rst diff --git a/changelog.d/2143.breaking.rst b/changelog.d/2143.breaking.rst new file mode 100644 index 0000000000..185542addf --- /dev/null +++ b/changelog.d/2143.breaking.rst @@ -0,0 +1 @@ +Setuptools adopts distutils from the standard library as a top-level ``distutils`` package and no longer depends on distutils in the standard library. This new ``distutils`` package will be masked by ``distutils`` in the standard library unless that library has been stripped by a downstream package manager or gets removed in a future version. Although this change is not expected to break any use-cases, it will likely affect tool-chains that are monkey-patching distutils or relying on Setuptools' own monkey patching of distutils. From 6588760710433951a1df48c298bdc49fa5bb7c6c Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Thu, 11 Jun 2020 22:09:29 +0300 Subject: [PATCH 7944/8469] Fix exception causes in package_index.py --- setuptools/package_index.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0744ea2ad1..1702c7c693 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -53,10 +53,10 @@ def parse_requirement_arg(spec): try: return Requirement.parse(spec) - except ValueError: + except ValueError as e: raise DistutilsError( "Not a URL, existing file, or requirement spec: %r" % (spec,) - ) + ) from e def parse_bdist_wininst(name): @@ -772,7 +772,7 @@ def open_url(self, url, warning=None): if warning: self.warn(warning, msg) else: - raise DistutilsError('%s %s' % (url, msg)) + raise DistutilsError('%s %s' % (url, msg)) from v except urllib.error.HTTPError as v: return v except urllib.error.URLError as v: @@ -780,7 +780,7 @@ def open_url(self, url, warning=None): self.warn(warning, v.reason) else: raise DistutilsError("Download error for %s: %s" - % (url, v.reason)) + % (url, v.reason)) from v except http_client.BadStatusLine as v: if warning: self.warn(warning, v.line) @@ -789,13 +789,13 @@ def open_url(self, url, warning=None): '%s returned a bad status line. The server might be ' 'down, %s' % (url, v.line) - ) + ) from v except (http_client.HTTPException, socket.error) as v: if warning: self.warn(warning, v) else: raise DistutilsError("Download error for %s: %s" - % (url, v)) + % (url, v)) from v def _download_url(self, scheme, url, tmpdir): # Determine download filename From 01121d057bea0128c34a92813c51ba3ec4902fce Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 14 Jun 2020 12:58:52 -0400 Subject: [PATCH 7945/8469] Decrease start-up time of editable-installed entry points on newer versions of Python --- changelog.d/2194.change.rst | 1 + setuptools/command/easy_install.py | 43 ++++++++++++++++++-------- setuptools/tests/test_easy_install.py | 44 +++++++++++++++++++-------- 3 files changed, 62 insertions(+), 26 deletions(-) create mode 100644 changelog.d/2194.change.rst diff --git a/changelog.d/2194.change.rst b/changelog.d/2194.change.rst new file mode 100644 index 0000000000..8b5adb3196 --- /dev/null +++ b/changelog.d/2194.change.rst @@ -0,0 +1 @@ +Editable-installed entry points now load significantly faster on Python versions 3.8+. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5a9576ff29..a82b165580 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2070,19 +2070,36 @@ class ScriptWriter: gui apps. """ - template = textwrap.dedent(r""" - # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r - __requires__ = %(spec)r - import re - import sys - from pkg_resources import load_entry_point - - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit( - load_entry_point(%(spec)r, %(group)r, %(name)r)() - ) - """).lstrip() + try: + from importlib.metadata import distribution # noqa: F401 + + template = textwrap.dedent(r""" + # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r + __requires__ = %(spec)r + import re + import sys + from importlib.metadata import distribution + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + for entry_point in distribution(%(spec)r).entry_points: + if entry_point.group == %(group)r and entry_point.name == %(name)r: + sys.exit(entry_point.load()()) + """).lstrip() # noqa: E501 + except ImportError: + template = textwrap.dedent(r""" + # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r + __requires__ = %(spec)r + import re + import sys + from pkg_resources import load_entry_point + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point(%(spec)r, %(group)r, %(name)r)() + ) + """).lstrip() # noqa: E501 command_spec_class = CommandSpec diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3044cbd098..58108db6b4 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -71,19 +71,37 @@ def test_install_site_py(self, tmpdir): def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() - expected = header + DALS(r""" - # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' - __requires__ = 'spec' - import re - import sys - from pkg_resources import load_entry_point - - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit( - load_entry_point('spec', 'console_scripts', 'name')() - ) - """) # noqa: E501 + try: + from importlib.metadata import distribution # noqa: F401 + + expected = header + DALS(r""" + # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' + __requires__ = 'spec' + import re + import sys + from importlib.metadata import distribution + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + for entry_point in distribution('spec').entry_points: + if entry_point.group == 'console_scripts' and entry_point.name == 'name': + sys.exit(entry_point.load()()) + """) # noqa: E501 + except ImportError: + expected = header + DALS(r""" + # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' + __requires__ = 'spec' + import re + import sys + from pkg_resources import load_entry_point + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point('spec', 'console_scripts', 'name')() + ) + """) # noqa: E501 + dist = FakeDist() args = next(ei.ScriptWriter.get_args(dist)) From d6501f3c75384340f1742a864c1ffa76977437b6 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 14 Jun 2020 14:21:26 -0400 Subject: [PATCH 7946/8469] address --- setuptools/command/easy_install.py | 6 ++---- setuptools/tests/test_easy_install.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index a82b165580..15e46cfc96 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2070,9 +2070,7 @@ class ScriptWriter: gui apps. """ - try: - from importlib.metadata import distribution # noqa: F401 - + if sys.version_info >= (3, 8): template = textwrap.dedent(r""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r @@ -2086,7 +2084,7 @@ class ScriptWriter: if entry_point.group == %(group)r and entry_point.name == %(name)r: sys.exit(entry_point.load()()) """).lstrip() # noqa: E501 - except ImportError: + else: template = textwrap.dedent(r""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r __requires__ = %(spec)r diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 58108db6b4..9aa2bd632c 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -71,9 +71,7 @@ def test_install_site_py(self, tmpdir): def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() - try: - from importlib.metadata import distribution # noqa: F401 - + if sys.version_info >= (3, 8): expected = header + DALS(r""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' @@ -87,7 +85,7 @@ def test_get_script_args(self): if entry_point.group == 'console_scripts' and entry_point.name == 'name': sys.exit(entry_point.load()()) """) # noqa: E501 - except ImportError: + else: expected = header + DALS(r""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' __requires__ = 'spec' From f8cd1f258f4b3f52521db2a12bfbd0832fb2e9fa Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 14 Jun 2020 21:04:04 -0400 Subject: [PATCH 7947/8469] address --- setuptools/command/easy_install.py | 1 - setuptools/tests/test_easy_install.py | 1 - 2 files changed, 2 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 15e46cfc96..ab8258ca83 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2073,7 +2073,6 @@ class ScriptWriter: if sys.version_info >= (3, 8): template = textwrap.dedent(r""" # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r - __requires__ = %(spec)r import re import sys from importlib.metadata import distribution diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 9aa2bd632c..345823cf42 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -74,7 +74,6 @@ def test_get_script_args(self): if sys.version_info >= (3, 8): expected = header + DALS(r""" # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' - __requires__ = 'spec' import re import sys from importlib.metadata import distribution From a4d8518c7b3cadf5e008871cf0d8c2d02a6a4492 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 08:55:00 -0400 Subject: [PATCH 7948/8469] Make a few assertions about the entry point script rather than keeping a fully-rendered copy. --- setuptools/tests/test_easy_install.py | 38 +++++---------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 345823cf42..8611dc166e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -16,6 +16,7 @@ import zipfile import mock import time +import re from setuptools.extern import six @@ -71,40 +72,15 @@ def test_install_site_py(self, tmpdir): def test_get_script_args(self): header = ei.CommandSpec.best().from_environment().as_header() - if sys.version_info >= (3, 8): - expected = header + DALS(r""" - # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' - import re - import sys - from importlib.metadata import distribution - - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - for entry_point in distribution('spec').entry_points: - if entry_point.group == 'console_scripts' and entry_point.name == 'name': - sys.exit(entry_point.load()()) - """) # noqa: E501 - else: - expected = header + DALS(r""" - # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name' - __requires__ = 'spec' - import re - import sys - from pkg_resources import load_entry_point - - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit( - load_entry_point('spec', 'console_scripts', 'name')() - ) - """) # noqa: E501 - dist = FakeDist() - args = next(ei.ScriptWriter.get_args(dist)) name, script = itertools.islice(args, 2) - - assert script == expected + assert script.startswith(header) + assert "'spec'" in script + assert "'console_scripts'" in script + assert "'name'" in script + assert re.search( + '^# EASY-INSTALL-ENTRY-SCRIPT', script, flags=re.MULTILINE) def test_no_find_links(self): # new option '--no-find-links', that blocks find-links added at From c999ba42e3cc99cfdf8c1eea88b9b0136104af12 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 08:56:45 -0400 Subject: [PATCH 7949/8469] =?UTF-8?q?Bump=20version:=2047.1.1=20=E2=86=92?= =?UTF-8?q?=2047.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2194.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2194.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 23226c351b..ffb0f2e813 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.1.1 +current_version = 47.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index b018cbea4d..44abab75e7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v47.2.0 +------- + +* #2194: Editable-installed entry points now load significantly faster on Python versions 3.8+. + + v47.1.1 ------- diff --git a/changelog.d/2194.change.rst b/changelog.d/2194.change.rst deleted file mode 100644 index 8b5adb3196..0000000000 --- a/changelog.d/2194.change.rst +++ /dev/null @@ -1 +0,0 @@ -Editable-installed entry points now load significantly faster on Python versions 3.8+. diff --git a/setup.cfg b/setup.cfg index 66fb8921b9..4beae652ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.1.1 +version = 47.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 2b4b5de16c8dc782bde3ee6ed54ef8868d90eb6e Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Mon, 15 Jun 2020 11:54:04 -0400 Subject: [PATCH 7950/8469] Fix entry point scripts --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ab8258ca83..2563f3132b 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2079,7 +2079,7 @@ class ScriptWriter: if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - for entry_point in distribution(%(spec)r).entry_points: + for entry_point in distribution(%(spec)r.split('==')[0]).entry_points: if entry_point.group == %(group)r and entry_point.name == %(name)r: sys.exit(entry_point.load()()) """).lstrip() # noqa: E501 From d74a16061950593f388a72871533b303b21e2a4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 16:17:38 -0400 Subject: [PATCH 7951/8469] Update changelog. --- changelog.d/2195.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2195.misc.rst diff --git a/changelog.d/2195.misc.rst b/changelog.d/2195.misc.rst new file mode 100644 index 0000000000..f73994ddce --- /dev/null +++ b/changelog.d/2195.misc.rst @@ -0,0 +1 @@ +Fix broken entry points generated by easy-install (pip editable installs). From 9bb11490f57d8d77cd789e9719588a8603dc375b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 16:34:22 -0400 Subject: [PATCH 7952/8469] Unify the entry point template. --- setuptools/command/easy_install.py | 54 ++++++++++++++++-------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 2563f3132b..81526b9a4f 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2070,33 +2070,37 @@ class ScriptWriter: gui apps. """ - if sys.version_info >= (3, 8): - template = textwrap.dedent(r""" - # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r - import re - import sys + template = textwrap.dedent(r""" + # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r + import re + import sys + + try: from importlib.metadata import distribution + except ImportError: + try: + from importlib_metadata import distribution + except ImportError: + from pkg_resources import load_entry_point - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - for entry_point in distribution(%(spec)r.split('==')[0]).entry_points: - if entry_point.group == %(group)r and entry_point.name == %(name)r: - sys.exit(entry_point.load()()) - """).lstrip() # noqa: E501 - else: - template = textwrap.dedent(r""" - # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r - __requires__ = %(spec)r - import re - import sys - from pkg_resources import load_entry_point - - if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit( - load_entry_point(%(spec)r, %(group)r, %(name)r)() - ) - """).lstrip() # noqa: E501 + + def importlib_load_entry_point(spec, group, name): + dist_name, _, _ = spec.partition('==') + matches = ( + entry_point + for entry_point in distribution(dist_name).entry_points + if entry_point.group == group and entry_point.name == name + ) + return next(matches).load() + + + globals().setdefault('load_entry_point', importlib_load_entry_point) + + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(load_entry_point(%(spec)r, %(group)r, %(name)r)()) + """).lstrip() command_spec_class = CommandSpec From 9db4553f1ce7d9ab4ae42e0e8a37a54bda3fd900 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 16:38:56 -0400 Subject: [PATCH 7953/8469] Update changelog. --- changelog.d/2197.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2197.change.rst diff --git a/changelog.d/2197.change.rst b/changelog.d/2197.change.rst new file mode 100644 index 0000000000..67b0435ab9 --- /dev/null +++ b/changelog.d/2197.change.rst @@ -0,0 +1 @@ +Console script wrapper for editable installs now has a unified template and honors importlib_metadata if present for faster script execution on older Pythons. From 3955acbb0da75df804d86a52d6fbcc269075a9d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 16:47:28 -0400 Subject: [PATCH 7954/8469] =?UTF-8?q?Bump=20version:=2047.2.0=20=E2=86=92?= =?UTF-8?q?=2047.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/2195.misc.rst | 1 - changelog.d/2197.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/2195.misc.rst delete mode 100644 changelog.d/2197.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ffb0f2e813..1bdc4be3fb 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.2.0 +current_version = 47.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 44abab75e7..16608ddc11 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v47.3.0 +------- + +* #2197: Console script wrapper for editable installs now has a unified template and honors importlib_metadata if present for faster script execution on older Pythons. +* #2195: Fix broken entry points generated by easy-install (pip editable installs). + + v47.2.0 ------- diff --git a/changelog.d/2195.misc.rst b/changelog.d/2195.misc.rst deleted file mode 100644 index f73994ddce..0000000000 --- a/changelog.d/2195.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix broken entry points generated by easy-install (pip editable installs). diff --git a/changelog.d/2197.change.rst b/changelog.d/2197.change.rst deleted file mode 100644 index 67b0435ab9..0000000000 --- a/changelog.d/2197.change.rst +++ /dev/null @@ -1 +0,0 @@ -Console script wrapper for editable installs now has a unified template and honors importlib_metadata if present for faster script execution on older Pythons. diff --git a/setup.cfg b/setup.cfg index 4beae652ed..9d3cad52f5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.2.0 +version = 47.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 09df3c7adba9a1e687151805b61aec72f6c8b13f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 17:45:10 -0400 Subject: [PATCH 7955/8469] Add a compatibility wrapper, so downstream consumers trapping a RequirementParseError will now trap an InvalidRequirement, allowing transition to only trapping an InvalidRequirement. --- pkg_resources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 56be3c223b..1433409af7 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3090,6 +3090,10 @@ def parse_requirements(strs): yield Requirement(line) +class RequirementParseError(packaging.requirements.InvalidRequirement): + "Compatibility wrapper for InvalidRequirement" + + class Requirement(packaging.requirements.Requirement): def __init__(self, requirement_string): """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!""" From dfe2ef5d780f476db778aacfb37a44a017022180 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Jun 2020 18:53:58 -0400 Subject: [PATCH 7956/8469] Correct some of the behaviors indicated in new entry points docs. Switch to imperative voice. Limit to declarative config (setup.cfg) examples. --- docs/userguide/entry_point.txt | 234 +++++++++++++-------------------- 1 file changed, 94 insertions(+), 140 deletions(-) diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt index 8190d8e339..7f5165a876 100644 --- a/docs/userguide/entry_point.txt +++ b/docs/userguide/entry_point.txt @@ -1,200 +1,154 @@ .. _`entry_points`: -========================================== -Entry Points and Automatic Script Creation -========================================== +============ +Entry Points +============ -After installing some packages, you may realize you can invoke some commands -without explicitly calling the python interpreter. For example, instead of -calling ``python -m pip install`` you can just do ``pip install``. The magic -behind this is entry point, a keyword passed to your ``setup.cfg`` or -``setup.py`` to create script wrapped around function in your libraries. +Packages may provide commands to be run at the console (console scripts), +such as the ``pip`` command. These commands are defined for a package +as a specific kind of entry point in the ``setup.cfg`` or +``setup.py``. -Using entry point in your package -================================= -Let's start with an example. Suppose you have written your package like this: +Console Scripts +=============== + +First consider an example without entry points. Imagine a package +defined thus:: .. code-block:: bash timmins/ timmins/__init__.py + timmins/__main__.py setup.cfg # or setup.py #other necessary files -and in your ``__init__.py`` it defines a function: +with ``__init__.py`` as: .. code-block:: python def helloworld(): print("Hello world") -After installing the package, you can invoke this function in the following -manner, without applying any magic: +and ``__main__.py`` providing a hook: + + from . import hello_world + if __name__ == '__main__': + hello_world() + +After installing the package, the function may be invoked through the +`runpy `_ module:: .. code-block:: bash - python -m mypkg.helloworld + python -m timmins -But entry point simplifies the call and would create a wrapper script around -your function, making it behave more natively (you type in ``helloworld`` and -the ``helloworld`` function residing inside ``__init__.py`` is executed!). To -accomplish that, add the following lines to your ``setup.cfg`` or ``setup.py``: +Adding a console script entry point allows the package to define a +user-friendly name for installers of the package to execute. Installers +like pip will create wrapper scripts to execute a function. In the +above example, to create a command ``hello-world`` that invokes +``timmins.hello_world``, add a console script entry point to +``setup.cfg``:: .. code-block:: ini - [options] - #... - entry_points = - [console_scripts] - helloworld = mypkg:helloworld - -.. code-block:: python + [options.entry_points] + console_scripts = + hello-world = timmins:hello_world - setup( - #... - entry_points = """ - [console_scripts] - helloworld = mypkg:helloworld - """ - ) +After installing the package, a user may invoke that function by simply calling +``hello-world`` on the command line. The syntax for entry points is specified as follows: .. code-block:: - [] - = [..][:.] + = [.[.]][:.] where ``name`` is the name for the script you want to create, the left hand side of ``:`` is the module that contains your function and the right hand -side is the object you want to invoke (e.g. a function). ``type`` specifies the -type of entry point (pertinent to the program that exploits it). ``setuptools`` -natively supports ``[console_script]`` and ``[gui_script]``. +side is the object you want to invoke (e.g. a function). -.. note:: - the syntax is not limited to ``INI`` string as demonstrated above. You can - also pass in the values in the form of a dictionary or list. Check out - :ref:`keyword reference ` for more details +In addition to ``console_scripts``, Setuptools supports ``gui_scripts``, which +will launch a GUI application without running in a terminal window. -After installation, you will be able to invoke that function by simply calling -``helloworld`` on your command line. It will even do command line argument -parsing for you! +Advertising Behavior +==================== -Dynamic discovery of services (aka plugin support) -================================================== -The ability of entry points isn't limited to "advertising" your functions. Its -implementation allows us to accomplish more powerful features, such as creating -plugins. In fact, the aforementioned script wrapping ability is a form of -plugin that was built into ``setuptools``. With that being said, you now have -more options than ``[console_script]`` or ``[gui_script]`` when creating your -package. +Console scripts are one use of the more general concept of entry points. Entry +points more generally allow a packager to advertise behavior for discovery by +other libraries and applications. This feature enables "plug-in"-like +functionality, where one library solicits entry points and any number of other +libraries provide those entry points. -To understand how you can extend this functionality, let's go through how -``setuptool`` does its ``[console_script]`` magic. Again, we use the same -example as above: +A good example of this plug-in behavior can be seen in +`pytest plugins `_, +where pytest is a test framework that allows other libraries to extend +or modify its functionality through the ``pytest11`` entry point. -.. code-block:: ini +The console scripts work similarly, where libraries advertise their commands +and tools like ``pip`` create wrapper scripts that invoke those commands. - [options] - # ... - entry_points = - [console_scripts] - helloworld = mypkg:helloworld +For a project wishing to solicit entry points, Setuptools recommends the +`importlib.metadata `_ +module (part of stdlib since Python 3.8) or its backport, +`importlib_metadata `_. -Package installation contains multiple steps, so at some point, this package -becomes available to your interpreter, and if you run the following code: +For example, to find the console script entry points from the example above:: -.. code-block:: ini +.. code-block:: python - >>> import pkg_resources #a module part of setuptools - >>> [item for item in - pkg_srouces.working_set.iter_entry_points('console_scripts')] - -It will return a list of special objects (called "EntryPoints"), and there -will be one of them that corresponds to the ``helloworld = mypkg:helloworld`` -which we defined above. In fact, this object doesn't just contain the string, -but also an encompassing representation of the package that created it. -In the case of ``console_scripts``, setuptools will automatically invoke -an internal function that utilizes this object and create the wrapper scripts -and place them in your ``bin`` directory for your interpreter. How -``pkg_resource`` look up all the entry points is further detailed in our -:ref:`developer_guide` (WIP). With that being said, if you specify a different -entry point: + >>> from importlib import metadata + >>> eps = metadata.entry_points()['console_scripts'] + +``eps`` is now a list of ``EntryPoint`` objects, one of which corresponds +to the ``hello-world = timmins:hello_world`` defined above. Each ``EntryPoint`` +contains the ``name``, ``group``, and ``value``. It also supplies a ``.load()`` +method to import and load that entry point (module or object). .. code-block:: ini - [options] - # ... - entry_points = - [iam.just.playing.around] - helloworld = mypkg:helloworld + [options.entry_points] + my.plugins = + hello-world = timmins:hello_world -Then, running the same python expression like above: +Then, a different project wishing to load 'my.plugins' plugins could run +the following routine to load (and invoke) such plugins:: .. code-block:: python - >>> import pkg_resources - >>> [item for item in - pkg_srouces.working_set.iter_entry_points('iam.just.playing.around') - ] - -will create another ``EntryPoints`` object that contains the -``helloworld = mypkg:helloworld`` and you can create custom -functions to exploit its information however you want. For example, one of -the installed programs on your system may contain a startup script that -scans the system for all the packages that specify this -``iam.just.playing.around`` entry points, such that when you install this new -package, it becomes immediately available without having to reconfigure -the already installed program. This in fact is the very idea of a plugin! - - -Dependencies management for entry points -======================================== -Some entry points may require additional dependencies for them to work and -others may trigger the installation of additional dependencies only when they -are run. While this is elaborated in more excrutiating details on -:ref:`guide on dependencies management `, we will -provide a brief overview on the entry point aspect. - -Dependencies of this manner are declared using the ``extra_requires`` keywords, -which takes a mapping of the arbitary name of the functionality and a list of -its depencencies, optionally suffixed with its :ref:`version specifier -`. For example, our package provides "pdf" output capability -which requires at least 0.3 version of "ReportLab" and whatever version of "RXP" - -.. code-block:: ini + >>> from importlib import metadata + >>> eps = metadata.entry_points()['my.plugins'] + >>> for ep in eps: + ... plugin = ep.load() + ... plugin() - [options.extras_require] - PDF = ReportLab>=1.2; RXP +The project soliciting the entry points needs not to have any dependency +or prior knowledge about the libraries implementing the entry points, and +downstream users are able to compose functionality by pulling together +libraries implementing the entry points. -.. code-block:: python - setup( - extras_require = { - "PDF": ["ReportLab>=1.2", "RXP"], - } - ) +Dependency Management +===================== - -And we only want them to be installed if the console script entry point -``rst2pdf`` is run: +Some entry points may require additional dependencies to properly function. +For such an entry point, declare in square brakets any number of dependency +``extras`` following the entry point definition. Such entry points will only +be viable if their extras were declared and installed. See the +:ref:`guide on dependencies management ` for +more information on defining extra requirements. Consider from the +above example:: .. code-block:: ini - [options] - entry_points = - ['console_script'] - rst2pdf = project_a.tools.pdfgen [PDF] - rst2html = project_a.tools.htmlgen - -.. code-block:: python + [options.entry_points] + console_scripts = + hello-world = timmins:hello_world [pretty-printer] - setup( - entry_points = """ - ['console_script'] - rst2pdf = project_a.tools.pdfgen [PDF] - rst2html = project_a.tools.htmlgen - """ - ) +In this case, the ``hello-world`` script is only viable if the ``pretty-printer`` +extra is indicated, and so a plugin host might exclude that entry point +(i.e. not install a console script) if the relevant extra dependencies are not +installed. From 94491a19ae999901b812fdf878c798cba11fc590 Mon Sep 17 00:00:00 2001 From: Samuel Watkins <35979561+slwatkins@users.noreply.github.com> Date: Tue, 16 Jun 2020 12:33:08 -0700 Subject: [PATCH 7957/8469] docs: fix typo in path to vendored.txt --- docs/developer-guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 4a78e22ea4..e84cd640b8 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -145,5 +145,5 @@ setuptools from source. Eventually, this limitation may be lifted as PEP 517/518 reach ubiquitous adoption, but for now, Setuptools cannot declare dependencies other than through ``setuptools/_vendor/vendored.txt`` and -``pkg_reosurces/_vendor/vendored.txt`` and refreshed by way of +``pkg_resources/_vendor/vendored.txt`` and refreshed by way of ``paver update_vendored`` (pavement.py). From 97a686d4e65fb30f0db4be3e498792b531942128 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 16 Jun 2020 17:21:27 -0400 Subject: [PATCH 7958/8469] Restore __requires__ directive for compatibility. Fixes #2198. --- changelog.d/2198.misc.rst | 1 + setuptools/command/easy_install.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/2198.misc.rst diff --git a/changelog.d/2198.misc.rst b/changelog.d/2198.misc.rst new file mode 100644 index 0000000000..d4b4be380a --- /dev/null +++ b/changelog.d/2198.misc.rst @@ -0,0 +1 @@ +Restore ``__requires__`` directive in easy-install wrapper scripts. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 27b4558bd7..89be91ac2e 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2075,6 +2075,9 @@ class ScriptWriter: import re import sys + # for compatibility with easy_install; see #2198 + __requires__ = %(spec)r + try: from importlib.metadata import distribution except ImportError: From 08ae4203c9feef98d4c2dffd2bd48308fdc5bee6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 16 Jun 2020 17:29:18 -0400 Subject: [PATCH 7959/8469] Make the change backward-compatible, since v47 was the breaking change. Ref #1973. --- changelog.d/{1973.breaking.rst => 1973.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{1973.breaking.rst => 1973.misc.rst} (100%) diff --git a/changelog.d/1973.breaking.rst b/changelog.d/1973.misc.rst similarity index 100% rename from changelog.d/1973.breaking.rst rename to changelog.d/1973.misc.rst From 145a78cdc1afb4ce0c0208ae86a00708eb79d27b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 16 Jun 2020 17:29:27 -0400 Subject: [PATCH 7960/8469] =?UTF-8?q?Bump=20version:=2047.3.0=20=E2=86=92?= =?UTF-8?q?=2047.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/1973.misc.rst | 1 - changelog.d/2198.misc.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/1973.misc.rst delete mode 100644 changelog.d/2198.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1bdc4be3fb..9b106cfa3f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.3.0 +current_version = 47.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 16608ddc11..799163edd3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v47.3.1 +------- + +* #1973: Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead. +* #2198: Restore ``__requires__`` directive in easy-install wrapper scripts. + + v47.3.0 ------- diff --git a/changelog.d/1973.misc.rst b/changelog.d/1973.misc.rst deleted file mode 100644 index 398fdd710c..0000000000 --- a/changelog.d/1973.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead. diff --git a/changelog.d/2198.misc.rst b/changelog.d/2198.misc.rst deleted file mode 100644 index d4b4be380a..0000000000 --- a/changelog.d/2198.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restore ``__requires__`` directive in easy-install wrapper scripts. diff --git a/setup.cfg b/setup.cfg index 9d3cad52f5..f23714b659 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.3.0 +version = 47.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 4b54a8a038d5f9f2ead224b030f87f393d57d40b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 17 Jun 2020 18:07:13 +0200 Subject: [PATCH 7961/8469] bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings.filters when importing numpy, to ignore filters installed by numpy. Add the save_restore_warnings_filters() function to the test.support.warnings_helper module. --- tests/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 5d2e69e3e6..16d011fd9e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,26 +15,25 @@ import os import sys import unittest -import warnings from test.support import run_unittest +from test.support.warnings_helper import save_restore_warnings_filters here = os.path.dirname(__file__) or os.curdir def test_suite(): - old_filters = warnings.filters[:] suite = unittest.TestSuite() for fn in os.listdir(here): if fn.startswith("test") and fn.endswith(".py"): modname = "distutils.tests." + fn[:-3] - __import__(modname) + # bpo-40055: Save/restore warnings filters to leave them unchanged. + # Importing tests imports docutils which imports pkg_resources + # which adds a warnings filter. + with save_restore_warnings_filters(): + __import__(modname) module = sys.modules[modname] suite.addTest(module.test_suite()) - # bpo-40055: Save/restore warnings filters to leave them unchanged. - # Importing tests imports docutils which imports pkg_resources which adds a - # warnings filter. - warnings.filters[:] = old_filters return suite From fba62111e62d2ef06097cd319a0838c5baf006ca Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 20 Jun 2020 11:10:31 +0300 Subject: [PATCH 7962/8469] bpo-41043: Escape literal part of the path for glob(). (GH-20994) --- command/build_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/build_py.py b/command/build_py.py index cf0ca57c32..edc2171cd1 100644 --- a/command/build_py.py +++ b/command/build_py.py @@ -5,7 +5,7 @@ import os import importlib.util import sys -from glob import glob +import glob from distutils.core import Command from distutils.errors import * @@ -125,7 +125,7 @@ def find_data_files(self, package, src_dir): files = [] for pattern in globs: # Each pattern has to be converted to a platform-specific path - filelist = glob(os.path.join(src_dir, convert_path(pattern))) + filelist = glob.glob(os.path.join(glob.escape(src_dir), convert_path(pattern))) # Files that match more than one pattern are only added once files.extend([fn for fn in filelist if fn not in files and os.path.isfile(fn)]) @@ -216,7 +216,7 @@ def check_module(self, module, module_file): def find_package_modules(self, package, package_dir): self.check_package(package, package_dir) - module_files = glob(os.path.join(package_dir, "*.py")) + module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py")) modules = [] setup_script = os.path.abspath(self.distribution.script_name) From a8081a19cc48fc285dfd50953bb2c522cb4b8b02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Jun 2020 12:09:39 -0400 Subject: [PATCH 7963/8469] Update setuptools/distutils_patch.py Co-authored-by: Steve Dower --- setuptools/distutils_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index 43b64c0fc8..1416a7a3c8 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -22,7 +22,7 @@ def patch_sys_path(): def ensure_local_distutils(): - if 'distutils' in sys.path: + if 'distutils' in sys.modules: raise RuntimeError("Distutils must not be imported before setuptools") with patch_sys_path(): importlib.import_module('distutils') From 51e062754df592b105547abbd6e20851972435d4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Jun 2020 12:49:50 -0400 Subject: [PATCH 7964/8469] Wordsmith --- changelog.d/2143.breaking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2143.breaking.rst b/changelog.d/2143.breaking.rst index 185542addf..29030b3210 100644 --- a/changelog.d/2143.breaking.rst +++ b/changelog.d/2143.breaking.rst @@ -1 +1 @@ -Setuptools adopts distutils from the standard library as a top-level ``distutils`` package and no longer depends on distutils in the standard library. This new ``distutils`` package will be masked by ``distutils`` in the standard library unless that library has been stripped by a downstream package manager or gets removed in a future version. Although this change is not expected to break any use-cases, it will likely affect tool-chains that are monkey-patching distutils or relying on Setuptools' own monkey patching of distutils. +Setuptools adopts distutils from the standard library as a top-level ``distutils`` package and no longer depends on distutils in the standard library. This new ``distutils`` package will be masked by ``distutils`` in the standard library unless that library has been stripped by a downstream package manager or gets removed in a future version. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. From b596e4b0f684f5ac11673598e1de3aaa5bc74162 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Jun 2020 14:47:11 -0400 Subject: [PATCH 7965/8469] Replace distutils rather than requiring it to be present in advanec. Instead of crashing, issue a warning when Setuptools is replacing distutils. --- distutils/__init__.py | 2 ++ setuptools/distutils_patch.py | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/distutils/__init__.py b/distutils/__init__.py index d823d040a1..7dac55b601 100644 --- a/distutils/__init__.py +++ b/distutils/__init__.py @@ -11,3 +11,5 @@ import sys __version__ = sys.version[:sys.version.index(' ')] + +local = True diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index 1416a7a3c8..f9e637988a 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -6,8 +6,10 @@ """ import sys +import re import importlib import contextlib +import warnings from os.path import dirname @@ -21,11 +23,20 @@ def patch_sys_path(): sys.path[:] = orig +def clear_distutils(): + if 'distutils' not in sys.modules: + return + warnings.warn("Setuptools is replacing distutils") + mods = [name for name in sys.modules if re.match(r'distutils\b', name)] + for name in mods: + del sys.modules[name] + + def ensure_local_distutils(): - if 'distutils' in sys.modules: - raise RuntimeError("Distutils must not be imported before setuptools") + clear_distutils() with patch_sys_path(): importlib.import_module('distutils') + assert sys.modules['distutils'].local ensure_local_distutils() From 4516d87036f971a4c98900301b6354c0aae73dc8 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Sun, 21 Jun 2020 16:39:53 -0600 Subject: [PATCH 7966/8469] Use importlib instead of imp in __bootstrap__ functions --- changelog.d/2071.misc.rst | 1 + setuptools/command/bdist_egg.py | 5 +++-- setuptools/command/build_ext.py | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 changelog.d/2071.misc.rst diff --git a/changelog.d/2071.misc.rst b/changelog.d/2071.misc.rst new file mode 100644 index 0000000000..eb36480caa --- /dev/null +++ b/changelog.d/2071.misc.rst @@ -0,0 +1 @@ +Replaced references to the deprecated imp package with references to importlib diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 1b28d4c938..e94fe25250 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -55,10 +55,11 @@ def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): global __bootstrap__, __loader__, __file__ - import sys, pkg_resources, imp + import sys, pkg_resources + from importlib.machinery import ExtensionFileLoader __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ - imp.load_dynamic(__name__,__file__) + ExtensionFileLoader(__name__,__file__).exec_module() __bootstrap__() """).lstrip() with open(pyfile, 'w') as f: diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 03b6f3467f..327fa06335 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -254,7 +254,8 @@ def write_stub(self, output_dir, ext, compile=False): '\n'.join([ "def __bootstrap__():", " global __bootstrap__, __file__, __loader__", - " import sys, os, pkg_resources, imp" + if_dl(", dl"), + " import sys, os, pkg_resources" + if_dl(", dl"), + " from importlib.machinery import ExtensionFileLoader", " __file__ = pkg_resources.resource_filename" "(__name__,%r)" % os.path.basename(ext._file_name), @@ -266,7 +267,8 @@ def write_stub(self, output_dir, ext, compile=False): " try:", " os.chdir(os.path.dirname(__file__))", if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), - " imp.load_dynamic(__name__,__file__)", + " ExtensionFileLoader(__name__,", + " __file__).exec_module()", " finally:", if_dl(" sys.setdlopenflags(old_flags)"), " os.chdir(old_dir)", From 71d869a55cde5711800918cb0dfc17f987012b66 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Fri, 26 Jun 2020 01:17:57 +0800 Subject: [PATCH 7967/8469] bpo-40275: Use new test.support helper submodules in tests (GH-21151) Use new test.support helper submodules in tests: * distutils tests * test_buffer * test_compile * test_filecmp * test_fileinput * test_readline * test_smtpnet * test_structmembers * test_tools --- tests/test_archive_util.py | 4 +++- tests/test_bdist_msi.py | 3 ++- tests/test_bdist_wininst.py | 3 ++- tests/test_core.py | 10 +++++----- tests/test_dist.py | 3 ++- tests/test_extension.py | 3 ++- tests/test_file_util.py | 4 +++- tests/test_filelist.py | 3 ++- tests/test_register.py | 3 ++- tests/test_sdist.py | 3 ++- tests/test_sysconfig.py | 5 ++++- tests/test_unixccompiler.py | 3 ++- 12 files changed, 31 insertions(+), 16 deletions(-) diff --git a/tests/test_archive_util.py b/tests/test_archive_util.py index e9aad0e40f..edcec2513e 100644 --- a/tests/test_archive_util.py +++ b/tests/test_archive_util.py @@ -13,7 +13,9 @@ ARCHIVE_FORMATS) from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import check_warnings, run_unittest, patch, change_cwd +from test.support import run_unittest, patch +from test.support.os_helper import change_cwd +from test.support.warnings_helper import check_warnings try: import grp diff --git a/tests/test_bdist_msi.py b/tests/test_bdist_msi.py index 418e60ec72..a61266a14f 100644 --- a/tests/test_bdist_msi.py +++ b/tests/test_bdist_msi.py @@ -1,7 +1,8 @@ """Tests for distutils.command.bdist_msi.""" import sys import unittest -from test.support import run_unittest, check_warnings +from test.support import run_unittest +from test.support.warnings_helper import check_warnings from distutils.tests import support diff --git a/tests/test_bdist_wininst.py b/tests/test_bdist_wininst.py index 5c3d025d33..c338069a1d 100644 --- a/tests/test_bdist_wininst.py +++ b/tests/test_bdist_wininst.py @@ -2,7 +2,8 @@ import sys import platform import unittest -from test.support import run_unittest, check_warnings +from test.support import run_unittest +from test.support.warnings_helper import check_warnings from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support diff --git a/tests/test_core.py b/tests/test_core.py index 27ce7324af..4e6694a3d1 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -5,8 +5,8 @@ import os import shutil import sys -import test.support from test.support import captured_stdout, run_unittest +from test.support import os_helper import unittest from distutils.tests import support from distutils import log @@ -62,13 +62,13 @@ def tearDown(self): super(CoreTestCase, self).tearDown() def cleanup_testfn(self): - path = test.support.TESTFN + path = os_helper.TESTFN if os.path.isfile(path): os.remove(path) elif os.path.isdir(path): shutil.rmtree(path) - def write_setup(self, text, path=test.support.TESTFN): + def write_setup(self, text, path=os_helper.TESTFN): f = open(path, "w") try: f.write(text) @@ -105,8 +105,8 @@ def test_run_setup_uses_current_dir(self): cwd = os.getcwd() # Create a directory and write the setup.py file there: - os.mkdir(test.support.TESTFN) - setup_py = os.path.join(test.support.TESTFN, "setup.py") + os.mkdir(os_helper.TESTFN) + setup_py = os.path.join(os_helper.TESTFN, "setup.py") distutils.core.run_setup( self.write_setup(setup_prints_cwd, path=setup_py)) diff --git a/tests/test_dist.py b/tests/test_dist.py index 60956dadef..f8a9e86b16 100644 --- a/tests/test_dist.py +++ b/tests/test_dist.py @@ -12,8 +12,9 @@ from distutils.cmd import Command from test.support import ( - TESTFN, captured_stdout, captured_stderr, run_unittest + captured_stdout, captured_stderr, run_unittest ) +from test.support.os_helper import TESTFN from distutils.tests import support from distutils import log diff --git a/tests/test_extension.py b/tests/test_extension.py index e35f2738b6..81fad02dbe 100644 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -3,7 +3,8 @@ import os import warnings -from test.support import check_warnings, run_unittest +from test.support import run_unittest +from test.support.warnings_helper import check_warnings from distutils.extension import read_setup_file, Extension class ExtensionTestCase(unittest.TestCase): diff --git a/tests/test_file_util.py b/tests/test_file_util.py index a4e2d025f9..c7783b858d 100644 --- a/tests/test_file_util.py +++ b/tests/test_file_util.py @@ -8,7 +8,9 @@ from distutils import log from distutils.tests import support from distutils.errors import DistutilsFileError -from test.support import run_unittest, unlink +from test.support import run_unittest +from test.support.os_helper import unlink + class FileUtilTestCase(support.TempdirManager, unittest.TestCase): diff --git a/tests/test_filelist.py b/tests/test_filelist.py index c71342d0dc..2c26c22617 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -9,6 +9,7 @@ from distutils import filelist import test.support +from test.support import os_helper from test.support import captured_stdout, run_unittest from distutils.tests import support @@ -295,7 +296,7 @@ def test_process_template(self): class FindAllTestCase(unittest.TestCase): - @test.support.skip_unless_symlink + @os_helper.skip_unless_symlink def test_missing_symlink(self): with test.support.temp_cwd(): os.symlink('foo', 'bar') diff --git a/tests/test_register.py b/tests/test_register.py index e68b0af3ce..bba48633c9 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -5,7 +5,8 @@ import urllib import warnings -from test.support import check_warnings, run_unittest +from test.support import run_unittest +from test.support.warnings_helper import check_warnings from distutils.command import register as register_module from distutils.command.register import register diff --git a/tests/test_sdist.py b/tests/test_sdist.py index 23db126959..752e9db5ba 100644 --- a/tests/test_sdist.py +++ b/tests/test_sdist.py @@ -6,7 +6,8 @@ import zipfile from os.path import join from textwrap import dedent -from test.support import captured_stdout, check_warnings, run_unittest +from test.support import captured_stdout, run_unittest +from test.support.warnings_helper import check_warnings try: import zlib diff --git a/tests/test_sysconfig.py b/tests/test_sysconfig.py index 236755d095..59676b0e0b 100644 --- a/tests/test_sysconfig.py +++ b/tests/test_sysconfig.py @@ -10,7 +10,10 @@ from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support -from test.support import TESTFN, run_unittest, check_warnings, swap_item +from test.support import run_unittest, swap_item +from test.support.os_helper import TESTFN +from test.support.warnings_helper import check_warnings + class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): diff --git a/tests/test_unixccompiler.py b/tests/test_unixccompiler.py index eef702cf01..eefe4ba402 100644 --- a/tests/test_unixccompiler.py +++ b/tests/test_unixccompiler.py @@ -1,7 +1,8 @@ """Tests for distutils.unixccompiler.""" import sys import unittest -from test.support import EnvironmentVarGuard, run_unittest +from test.support import run_unittest +from test.support.os_helper import EnvironmentVarGuard from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler From a9eb9e73def8ca6c469e59f1b008746e368ad4c1 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Tue, 16 Jun 2020 13:31:12 +0300 Subject: [PATCH 7968/8469] Fix exception causes all over the codebase --- changelog.d/2199.misc.rst | 1 + pkg_resources/__init__.py | 18 +++++++------- setuptools/archive_util.py | 4 ++-- setuptools/command/easy_install.py | 14 +++++++---- setuptools/command/egg_info.py | 4 ++-- setuptools/command/rotate.py | 4 ++-- setuptools/config.py | 5 ++-- setuptools/dist.py | 38 +++++++++++++++++------------- setuptools/installer.py | 2 +- setuptools/msvc.py | 2 +- 10 files changed, 51 insertions(+), 41 deletions(-) create mode 100644 changelog.d/2199.misc.rst diff --git a/changelog.d/2199.misc.rst b/changelog.d/2199.misc.rst new file mode 100644 index 0000000000..f795256bf0 --- /dev/null +++ b/changelog.d/2199.misc.rst @@ -0,0 +1 @@ +Fix exception causes all over the codebase by using ``raise new_exception from old_exception`` \ No newline at end of file diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2c589d5553..c40f184a73 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1378,7 +1378,7 @@ def evaluate_marker(text, extra=None): marker = packaging.markers.Marker(text) return marker.evaluate() except packaging.markers.InvalidMarker as e: - raise SyntaxError(e) + raise SyntaxError(e) from e class NullProvider: @@ -2287,8 +2287,8 @@ def declare_namespace(packageName): __import__(parent) try: path = sys.modules[parent].__path__ - except AttributeError: - raise TypeError("Not a package:", parent) + except AttributeError as e: + raise TypeError("Not a package:", parent) from e # Track what packages are namespaces, so when new path items are added, # they can be updated @@ -2468,7 +2468,7 @@ def resolve(self): try: return functools.reduce(getattr, self.attrs, module) except AttributeError as exc: - raise ImportError(str(exc)) + raise ImportError(str(exc)) from exc def require(self, env=None, installer=None): if self.extras and not self.dist: @@ -2688,14 +2688,14 @@ def _warn_legacy_version(self): def version(self): try: return self._version - except AttributeError: + except AttributeError as e: version = self._get_version() if version is None: path = self._get_metadata_path_for_display(self.PKG_INFO) msg = ( "Missing 'Version:' header and/or {} file at path: {}" ).format(self.PKG_INFO, path) - raise ValueError(msg, self) + raise ValueError(msg, self) from e return version @@ -2748,10 +2748,10 @@ def requires(self, extras=()): for ext in extras: try: deps.extend(dm[safe_extra(ext)]) - except KeyError: + except KeyError as e: raise UnknownExtra( "%s has no such extra feature %r" % (self, ext) - ) + ) from e return deps def _get_metadata_path_for_display(self, name): @@ -3109,7 +3109,7 @@ def __init__(self, requirement_string): try: super(Requirement, self).__init__(requirement_string) except packaging.requirements.InvalidRequirement as e: - raise RequirementParseError(str(e)) + raise RequirementParseError(str(e)) from e self.unsafe_name = self.name project_name = safe_name(self.name) self.project_name, self.key = project_name, project_name.lower() diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 64528ca7a5..0ce190b8cf 100644 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -134,10 +134,10 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): """ try: tarobj = tarfile.open(filename) - except tarfile.TarError: + except tarfile.TarError as e: raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) - ) + ) from e with contextlib.closing(tarobj): # don't do any chowning! tarobj.chown = lambda *args: None diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 27b4558bd7..8890ec88c8 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -356,8 +356,10 @@ def finalize_options(self): self.optimize = int(self.optimize) if not (0 <= self.optimize <= 2): raise ValueError - except ValueError: - raise DistutilsOptionError("--optimize must be 0, 1, or 2") + except ValueError as e: + raise DistutilsOptionError( + "--optimize must be 0, 1, or 2" + ) from e if self.editable and not self.build_directory: raise DistutilsArgError( @@ -765,9 +767,9 @@ def process_distribution(self, requirement, dist, deps=True, *info): [requirement], self.local_index, self.easy_install ) except DistributionNotFound as e: - raise DistutilsError(str(e)) + raise DistutilsError(str(e)) from e except VersionConflict as e: - raise DistutilsError(e.report()) + raise DistutilsError(e.report()) from e if self.always_copy or self.always_copy_from: # Force all the relevant distros to be copied or activated for dist in distros: @@ -1156,7 +1158,9 @@ def run_setup(self, setup_script, setup_base, args): try: run_setup(setup_script, args) except SystemExit as v: - raise DistutilsError("Setup script exited with %s" % (v.args[0],)) + raise DistutilsError( + "Setup script exited with %s" % (v.args[0],) + ) from v def build_and_install(self, setup_script, setup_base): args = ['bdist_egg', '--dist-dir'] diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 7fa89541cd..0855207ceb 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -208,11 +208,11 @@ def finalize_options(self): list( parse_requirements(spec % (self.egg_name, self.egg_version)) ) - except ValueError: + except ValueError as e: raise distutils.errors.DistutilsOptionError( "Invalid distribution name or version syntax: %s-%s" % (self.egg_name, self.egg_version) - ) + ) from e if self.egg_base is None: dirs = self.distribution.package_dir diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index b89353f529..e398834fa7 100644 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -36,8 +36,8 @@ def finalize_options(self): raise DistutilsOptionError("Must specify number of files to keep") try: self.keep = int(self.keep) - except ValueError: - raise DistutilsOptionError("--keep must be an integer") + except ValueError as e: + raise DistutilsOptionError("--keep must be an integer") from e if isinstance(self.match, six.string_types): self.match = [ convert_path(p.strip()) for p in self.match.split(',') diff --git a/setuptools/config.py b/setuptools/config.py index 45df2e3f2e..a8f8b6b006 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -42,9 +42,10 @@ def __getattr__(self, attr): for target in statement.targets if isinstance(target, ast.Name) and target.id == attr ) - except Exception: + except Exception as e: raise AttributeError( - "{self.name} has no attribute {attr}".format(**locals())) + "{self.name} has no attribute {attr}".format(**locals()) + ) from e @contextlib.contextmanager diff --git a/setuptools/dist.py b/setuptools/dist.py index fe64afa919..e813b11ca7 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -204,11 +204,11 @@ def check_importable(dist, attr, value): try: ep = pkg_resources.EntryPoint.parse('x=' + value) assert not ep.extras - except (TypeError, ValueError, AttributeError, AssertionError): + except (TypeError, ValueError, AttributeError, AssertionError) as e: raise DistutilsSetupError( "%r must be importable 'module:attrs' string (got %r)" % (attr, value) - ) + ) from e def assert_string_list(dist, attr, value): @@ -219,10 +219,10 @@ def assert_string_list(dist, attr, value): assert isinstance(value, (list, tuple)) # verify that elements of value are strings assert ''.join(value) != value - except (TypeError, ValueError, AttributeError, AssertionError): + except (TypeError, ValueError, AttributeError, AssertionError) as e: raise DistutilsSetupError( "%r must be a list of strings (got %r)" % (attr, value) - ) + ) from e def check_nsp(dist, attr, value): @@ -247,12 +247,12 @@ def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: list(itertools.starmap(_check_extra, value.items())) - except (TypeError, ValueError, AttributeError): + except (TypeError, ValueError, AttributeError) as e: raise DistutilsSetupError( "'extras_require' must be a dictionary whose values are " "strings or lists of strings containing valid project/version " "requirement specifiers." - ) + ) from e def _check_extra(extra, reqs): @@ -280,7 +280,9 @@ def check_requirements(dist, attr, value): "{attr!r} must be a string or list of strings " "containing valid project/version requirement specifiers; {error}" ) - raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) + raise DistutilsSetupError( + tmpl.format(attr=attr, error=error) + ) from error def check_specifier(dist, attr, value): @@ -292,7 +294,9 @@ def check_specifier(dist, attr, value): "{attr!r} must be a string " "containing valid version specifiers; {error}" ) - raise DistutilsSetupError(tmpl.format(attr=attr, error=error)) + raise DistutilsSetupError( + tmpl.format(attr=attr, error=error) + ) from error def check_entry_points(dist, attr, value): @@ -300,7 +304,7 @@ def check_entry_points(dist, attr, value): try: pkg_resources.EntryPoint.parse_map(value) except ValueError as e: - raise DistutilsSetupError(e) + raise DistutilsSetupError(e) from e def check_test_suite(dist, attr, value): @@ -609,8 +613,8 @@ def _parse_config_files(self, filenames=None): setattr(self, opt, strtobool(val)) else: setattr(self, opt, val) - except ValueError as msg: - raise DistutilsOptionError(msg) + except ValueError as e: + raise DistutilsOptionError(e) from e @staticmethod def _try_str(val): @@ -676,8 +680,8 @@ def _set_command_options(self, command_obj, option_dict=None): raise DistutilsOptionError( "error in %s: command '%s' has no such option '%s'" % (source, command_name, option)) - except ValueError as msg: - raise DistutilsOptionError(msg) + except ValueError as e: + raise DistutilsOptionError(e) from e def parse_config_files(self, filenames=None, ignore_option_errors=False): """Parses configuration files from various levels @@ -843,10 +847,10 @@ def _exclude_misc(self, name, value): ) try: old = getattr(self, name) - except AttributeError: + except AttributeError as e: raise DistutilsSetupError( "%s: No such distribution setting" % name - ) + ) from e if old is not None and not isinstance(old, sequence): raise DistutilsSetupError( name + ": this setting cannot be changed via include/exclude" @@ -863,10 +867,10 @@ def _include_misc(self, name, value): ) try: old = getattr(self, name) - except AttributeError: + except AttributeError as e: raise DistutilsSetupError( "%s: No such distribution setting" % name - ) + ) from e if old is None: setattr(self, name, value) elif not isinstance(old, sequence): diff --git a/setuptools/installer.py b/setuptools/installer.py index 1f183bd9af..e5acec2726 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -127,7 +127,7 @@ def fetch_build_egg(dist, req): try: subprocess.check_call(cmd) except subprocess.CalledProcessError as e: - raise DistutilsError(str(e)) + raise DistutilsError(str(e)) from e wheel = Wheel(glob.glob(os.path.join(tmpdir, '*.whl'))[0]) dist_location = os.path.join(eggs_dir, wheel.egg_name()) wheel.install_as_egg(dist_location) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 213e39c9d5..72ba0d0c8d 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -277,7 +277,7 @@ def _msvc14_get_vc_env(plat_spec): except subprocess.CalledProcessError as exc: raise distutils.errors.DistutilsPlatformError( "Error executing {}".format(exc.cmd) - ) + ) from exc env = { key.lower(): value From 5f8eebf06792a32d955689daeb5679fc6d3d019e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Jun 2020 20:21:35 -0400 Subject: [PATCH 7969/8469] Add conftest so that tests can run under pytest --- conftest.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000000..f0ec98e74f --- /dev/null +++ b/conftest.py @@ -0,0 +1,5 @@ +import sys +import os + +sys.path.insert(0, os.getcwd()) +__import__('distutils') From b8abfd21934b8b109050696bd99c8fc823f901f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Jun 2020 21:10:28 -0400 Subject: [PATCH 7970/8469] Use tox for tests --- conftest.py | 5 ----- tox.ini | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 conftest.py create mode 100644 tox.ini diff --git a/conftest.py b/conftest.py deleted file mode 100644 index f0ec98e74f..0000000000 --- a/conftest.py +++ /dev/null @@ -1,5 +0,0 @@ -import sys -import os - -sys.path.insert(0, os.getcwd()) -__import__('distutils') diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..1590e308c9 --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[testenv] +deps = + pytest +commands = + pytest {posargs} +setenv = + PYTHONPATH = {toxinidir} +skip_install = True From 73ac895667b5bc6e3f5d685e7bad3d4535f07a80 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Jun 2020 21:16:53 -0400 Subject: [PATCH 7971/8469] Fix test on Python 3.8 and earlier. --- distutils/tests/test_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distutils/tests/test_install.py b/distutils/tests/test_install.py index 51c80e0421..eb684a09e6 100644 --- a/distutils/tests/test_install.py +++ b/distutils/tests/test_install.py @@ -58,7 +58,8 @@ def check_path(got, expected): libdir = os.path.join(destination, "lib", "python") check_path(cmd.install_lib, libdir) - platlibdir = os.path.join(destination, sys.platlibdir, "python") + _platlibdir = getattr(sys, "platlibdir", "lib") + platlibdir = os.path.join(destination, _platlibdir, "python") check_path(cmd.install_platlib, platlibdir) check_path(cmd.install_purelib, libdir) check_path(cmd.install_headers, From c202075affc8a4d03401a4877639a96907438d83 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Jun 2020 22:38:33 -0400 Subject: [PATCH 7972/8469] Mark test_venv to be skipped when running under a virtualenv as virtualenv monkey patches distutils. --- distutils/tests/test_dist.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distutils/tests/test_dist.py b/distutils/tests/test_dist.py index 60956dadef..d431085bbd 100644 --- a/distutils/tests/test_dist.py +++ b/distutils/tests/test_dist.py @@ -83,6 +83,10 @@ def test_command_packages_cmdline(self): self.assertIsInstance(cmd, test_dist) self.assertEqual(cmd.sample_option, "sometext") + @unittest.skipIf( + 'distutils' not in Distribution.parse_config_files.__module__, + 'Cannot test when virtualenv has monkey-patched Distribution.', + ) def test_venv_install_options(self): sys.argv.append("install") self.addCleanup(os.unlink, TESTFN) From 00ce1222d90ca28c6096d847c6ffe52e26bd5db2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 08:43:36 -0400 Subject: [PATCH 7973/8469] Restore Python 3.5 syntax compatibility in distutils.dist. --- distutils/dist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distutils/dist.py b/distutils/dist.py index 6cf0a0d663..37db4d6cd7 100644 --- a/distutils/dist.py +++ b/distutils/dist.py @@ -35,7 +35,8 @@ def _ensure_list(value, fieldname): elif not isinstance(value, list): # passing a tuple or an iterator perhaps, warn and convert typename = type(value).__name__ - msg = f"Warning: '{fieldname}' should be a list, got type '{typename}'" + msg = "Warning: '{fieldname}' should be a list, got type '{typename}'" + msg = msg.format(**locals()) log.log(log.WARN, msg) value = list(value) return value From 3a4c22103551a68630b2e4b38f91deb4c78eae99 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 May 2020 09:34:34 -0400 Subject: [PATCH 7974/8469] Fallback to '_sysconfigdata' when platform-specific sysconfigdata is unavailable. --- distutils/sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 2109f746ba..79391e8671 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -444,7 +444,12 @@ def _init_posix(): platform=sys.platform, multiarch=getattr(sys.implementation, '_multiarch', ''), )) - _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + try: + _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) + except ImportError: + # Python 3.5 and pypy 7.3.1 + _temp = __import__( + '_sysconfigdata', globals(), locals(), ['build_time_vars'], 0) build_time_vars = _temp.build_time_vars global _config_vars _config_vars = {} From 71d738a1f6eced80defe3587f6adbbe4ce1fb7d1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jul 2020 20:19:22 -0400 Subject: [PATCH 7975/8469] Restore Python 3.5 syntax compatibility in distutils.tests.test_build_ext --- distutils/tests/test_build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distutils/tests/test_build_ext.py b/distutils/tests/test_build_ext.py index 5e47e0773a..1aec153783 100644 --- a/distutils/tests/test_build_ext.py +++ b/distutils/tests/test_build_ext.py @@ -82,7 +82,7 @@ def test_build_ext(self): else: ALREADY_TESTED = type(self).__name__ - code = textwrap.dedent(f""" + code = textwrap.dedent(""" tmp_dir = {self.tmp_dir!r} import sys @@ -108,7 +108,7 @@ def test_xx(self): unittest.main() - """) + """.format(**locals())) assert_python_ok('-c', code) def test_solaris_enable_shared(self): From 253d03cad23ed022d020ae635ce419255240feef Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jul 2020 20:42:12 -0400 Subject: [PATCH 7976/8469] Add compatibility module to fix failing tests on Python 3.5 due to missing functionality. --- distutils/tests/py35compat.py | 68 ++++++++++++++++++++++++++++++ distutils/tests/test_build_clib.py | 4 +- distutils/tests/test_config_cmd.py | 4 +- distutils/tests/test_spawn.py | 4 +- 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 distutils/tests/py35compat.py diff --git a/distutils/tests/py35compat.py b/distutils/tests/py35compat.py new file mode 100644 index 0000000000..3eb86b5fe2 --- /dev/null +++ b/distutils/tests/py35compat.py @@ -0,0 +1,68 @@ +""" +Backward compatibility support for Python 3.5 +""" + +import sys +import test.support +import subprocess + + +# copied from Python 3.9 test.support module +def _missing_compiler_executable(cmd_names=[]): + """Check if the compiler components used to build the interpreter exist. + + Check for the existence of the compiler executables whose names are listed + in 'cmd_names' or all the compiler executables when 'cmd_names' is empty + and return the first missing executable or None when none is found + missing. + + """ + from distutils import ccompiler, sysconfig, spawn + compiler = ccompiler.new_compiler() + sysconfig.customize_compiler(compiler) + for name in compiler.executables: + if cmd_names and name not in cmd_names: + continue + cmd = getattr(compiler, name) + if cmd_names: + assert cmd is not None, \ + "the '%s' executable is not configured" % name + elif not cmd: + continue + if spawn.find_executable(cmd[0]) is None: + return cmd[0] + + +missing_compiler_executable = vars(test.support).setdefault( + 'missing_compiler_executable', + _missing_compiler_executable, +) + + +try: + from test.support import unix_shell +except ImportError: + # Adapted from Python 3.9 test.support module + is_android = hasattr(sys, 'getandroidapilevel') + unix_shell = ( + None if sys.platform == 'win32' else + '/system/bin/sh' if is_android else + '/bin/sh' + ) + + +# copied from Python 3.9 subprocess module +def _optim_args_from_interpreter_flags(): + """Return a list of command-line arguments reproducing the current + optimization settings in sys.flags.""" + args = [] + value = sys.flags.optimize + if value > 0: + args.append('-' + 'O' * value) + return args + + +vars(subprocess).setdefault( + '_optim_args_from_interpreter_flags', + _optim_args_from_interpreter_flags, +) diff --git a/distutils/tests/test_build_clib.py b/distutils/tests/test_build_clib.py index abd8313770..259c43522d 100644 --- a/distutils/tests/test_build_clib.py +++ b/distutils/tests/test_build_clib.py @@ -3,7 +3,9 @@ import os import sys -from test.support import run_unittest, missing_compiler_executable +from test.support import run_unittest + +from .py35compat import missing_compiler_executable from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError diff --git a/distutils/tests/test_config_cmd.py b/distutils/tests/test_config_cmd.py index 9aeab07b46..4cd9a6b9a0 100644 --- a/distutils/tests/test_config_cmd.py +++ b/distutils/tests/test_config_cmd.py @@ -2,7 +2,9 @@ import unittest import os import sys -from test.support import run_unittest, missing_compiler_executable +from test.support import run_unittest + +from .py35compat import missing_compiler_executable from distutils.command.config import dump_file, config from distutils.tests import support diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py index cf1faad5f4..919d0ad98f 100644 --- a/distutils/tests/test_spawn.py +++ b/distutils/tests/test_spawn.py @@ -3,9 +3,11 @@ import stat import sys import unittest.mock -from test.support import run_unittest, unix_shell +from test.support import run_unittest from test import support as test_support +from .py35compat import unix_shell + from distutils.spawn import find_executable from distutils.spawn import spawn from distutils.errors import DistutilsExecError From a4eb1127303fbe514ab8f77d6c3896614de02c5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jul 2020 20:49:30 -0400 Subject: [PATCH 7977/8469] Fix failing test in test_fileutil by adapting expectation based on Python version. --- distutils/tests/py35compat.py | 9 +++++++++ distutils/tests/test_filelist.py | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/distutils/tests/py35compat.py b/distutils/tests/py35compat.py index 3eb86b5fe2..0c755261ad 100644 --- a/distutils/tests/py35compat.py +++ b/distutils/tests/py35compat.py @@ -66,3 +66,12 @@ def _optim_args_from_interpreter_flags(): '_optim_args_from_interpreter_flags', _optim_args_from_interpreter_flags, ) + + +def adapt_glob(regex): + """ + Supply legacy expectation on Python 3.5 + """ + if sys.version_info > (3, 6): + return regex + return regex.replace('(?s:', '').replace(r')\Z', r'\Z(?ms)') diff --git a/distutils/tests/test_filelist.py b/distutils/tests/test_filelist.py index c71342d0dc..71fde2b718 100644 --- a/distutils/tests/test_filelist.py +++ b/distutils/tests/test_filelist.py @@ -12,6 +12,9 @@ from test.support import captured_stdout, run_unittest from distutils.tests import support +from .py35compat import adapt_glob + + MANIFEST_IN = """\ include ok include xo @@ -60,7 +63,7 @@ def test_glob_to_re(self): ('foo????', r'(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z'), (r'foo\\??', r'(?s:foo\\\\[^%(sep)s][^%(sep)s])\Z')): regex = regex % {'sep': sep} - self.assertEqual(glob_to_re(glob), regex) + self.assertEqual(glob_to_re(glob), adapt_glob(regex)) def test_process_template_line(self): # testing all MANIFEST.in template patterns From 4f1d15983b650c20dc6de48f6675c9ce84c0c3a9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jul 2020 21:09:47 -0400 Subject: [PATCH 7978/8469] Acknowledge and ignore warning about TestDistribution (it's a "test" distribution, not a "test of distributions"). --- pytest.ini | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..3e01b43900 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +filterwarnings= + # acknowledge that TestDistribution isn't a test + ignore:cannot collect test class 'TestDistribution' From 2f1fae1bfceb88cf812a45c44cd18ce604b69c69 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 00:25:26 +0300 Subject: [PATCH 7979/8469] add pypy schemas --- distutils/command/install.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/distutils/command/install.py b/distutils/command/install.py index 21f8c27c8b..13feeb890f 100644 --- a/distutils/command/install.py +++ b/distutils/command/install.py @@ -43,6 +43,20 @@ 'data' : '$base', }, 'nt': WINDOWS_SCHEME, + 'pypy': { + 'purelib': '$base/site-packages', + 'platlib': '$base/site-packages', + 'headers': '$base/include/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'pypy_nt': { + 'purelib': '$base/site-packages', + 'platlib': '$base/site-packages', + 'headers': '$base/include/$dist_name', + 'scripts': '$base/Scripts', + 'data' : '$base', + }, } # user site schemes @@ -455,6 +469,12 @@ def finalize_other(self): def select_scheme(self, name): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! + if (hasattr(sys, 'pypy_version_info') and + not name.endswith(('_user', '_home'))): + if os.name == 'nt': + name = 'pypy_nt' + else: + name = 'pypy' scheme = INSTALL_SCHEMES[name] for key in SCHEME_KEYS: attrname = 'install_' + key From 12f74fb9280897a07199db0df76103487263136b Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 20:00:07 +0300 Subject: [PATCH 7980/8469] do the minimum to fix sysconfig.py for PyPy, more will probably be needed --- distutils/sysconfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 79391e8671..255243ade5 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -16,6 +16,8 @@ from .errors import DistutilsPlatformError +IS_PYPY = '__pypy__' in sys.builtin_module_names + # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) @@ -97,7 +99,9 @@ def get_python_inc(plat_specific=0, prefix=None): """ if prefix is None: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - if os.name == "posix": + if IS_PYPY: + return os.path.join(prefix, 'include') + elif os.name == "posix": if python_build: # Assume the executable is in the build directory. The # pyconfig.h file should be in the same directory. Since From 50d17611942813f840a69c4838173b2c4dc27f24 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 20:23:28 +0300 Subject: [PATCH 7981/8469] no Makefile with PyPy and has own layout for python stdlib, site-packages --- distutils/sysconfig.py | 79 +++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 255243ade5..879b6981ed 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -142,6 +142,14 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ + if IS_PYPY: + # PyPy-specific schema + if prefix is None: + prefix = PREFIX + if standard_lib: + return os.path.join(prefix, "lib-python", sys.version[0]) + return os.path.join(prefix, 'site-packages') + if prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX @@ -503,41 +511,42 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX - # For backward compatibility, see issue19555 - SO = _config_vars.get('EXT_SUFFIX') - if SO is not None: - _config_vars['SO'] = SO - - # Always convert srcdir to an absolute path - srcdir = _config_vars.get('srcdir', project_base) - if os.name == 'posix': - if python_build: - # If srcdir is a relative path (typically '.' or '..') - # then it should be interpreted relative to the directory - # containing Makefile. - base = os.path.dirname(get_makefile_filename()) - srcdir = os.path.join(base, srcdir) - else: - # srcdir is not meaningful since the installation is - # spread about the filesystem. We choose the - # directory containing the Makefile since we know it - # exists. - srcdir = os.path.dirname(get_makefile_filename()) - _config_vars['srcdir'] = os.path.abspath(os.path.normpath(srcdir)) - - # Convert srcdir into an absolute path if it appears necessary. - # Normally it is relative to the build directory. However, during - # testing, for example, we might be running a non-installed python - # from a different directory. - if python_build and os.name == "posix": - base = project_base - if (not os.path.isabs(_config_vars['srcdir']) and - base != os.getcwd()): - # srcdir is relative and we are not in the same directory - # as the executable. Assume executable is in the build - # directory and make srcdir absolute. - srcdir = os.path.join(base, _config_vars['srcdir']) - _config_vars['srcdir'] = os.path.normpath(srcdir) + if not IS_PYPY: + # For backward compatibility, see issue19555 + SO = _config_vars.get('EXT_SUFFIX') + if SO is not None: + _config_vars['SO'] = SO + + # Always convert srcdir to an absolute path + srcdir = _config_vars.get('srcdir', project_base) + if os.name == 'posix': + if python_build: + # If srcdir is a relative path (typically '.' or '..') + # then it should be interpreted relative to the directory + # containing Makefile. + base = os.path.dirname(get_makefile_filename()) + srcdir = os.path.join(base, srcdir) + else: + # srcdir is not meaningful since the installation is + # spread about the filesystem. We choose the + # directory containing the Makefile since we know it + # exists. + srcdir = os.path.dirname(get_makefile_filename()) + _config_vars['srcdir'] = os.path.abspath(os.path.normpath(srcdir)) + + # Convert srcdir into an absolute path if it appears necessary. + # Normally it is relative to the build directory. However, during + # testing, for example, we might be running a non-installed python + # from a different directory. + if python_build and os.name == "posix": + base = project_base + if (not os.path.isabs(_config_vars['srcdir']) and + base != os.getcwd()): + # srcdir is relative and we are not in the same directory + # as the executable. Assume executable is in the build + # directory and make srcdir absolute. + srcdir = os.path.join(base, _config_vars['srcdir']) + _config_vars['srcdir'] = os.path.normpath(srcdir) # OS X platforms require special customization to handle # multi-architecture, multi-os-version installers From 89d64e81e194d5b8b8a500e837b9cea4f2e1063e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 1 Jul 2020 22:09:26 -0400 Subject: [PATCH 7982/8469] Skip test on PyPy where the functionality is disabled. --- distutils/tests/test_sysconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/distutils/tests/test_sysconfig.py b/distutils/tests/test_sysconfig.py index 236755d095..d5076391fc 100644 --- a/distutils/tests/test_sysconfig.py +++ b/distutils/tests/test_sysconfig.py @@ -45,6 +45,7 @@ def test_get_config_vars(self): self.assertIsInstance(cvars, dict) self.assertTrue(cvars) + @unittest.skip('sysconfig.IS_PYPY') def test_srcdir(self): # See Issues #15322, #15364. srcdir = sysconfig.get_config_var('srcdir') From c3a052aefbba0d5fda10790e676223c0dc12f0ed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Jul 2020 05:06:16 -0400 Subject: [PATCH 7983/8469] In test_unixcompiler.test_osx*, also patch sysconfig.get_config_vars following the patterns of prior implementations. --- distutils/tests/test_unixccompiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/distutils/tests/test_unixccompiler.py b/distutils/tests/test_unixccompiler.py index eef702cf01..f2159662fd 100644 --- a/distutils/tests/test_unixccompiler.py +++ b/distutils/tests/test_unixccompiler.py @@ -11,6 +11,7 @@ class UnixCCompilerTestCase(unittest.TestCase): def setUp(self): self._backup_platform = sys.platform self._backup_get_config_var = sysconfig.get_config_var + self._backup_get_config_vars = sysconfig.get_config_vars class CompilerWrapper(UnixCCompiler): def rpath_foo(self): return self.runtime_library_dir_option('/foo') @@ -19,6 +20,7 @@ def rpath_foo(self): def tearDown(self): sys.platform = self._backup_platform sysconfig.get_config_var = self._backup_get_config_var + sysconfig.get_config_vars = self._backup_get_config_vars @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_runtime_libdir_option(self): @@ -110,7 +112,13 @@ def gcv(v): if v == 'LDSHARED': return 'gcc-4.2 -bundle -undefined dynamic_lookup ' return 'gcc-4.2' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs with EnvironmentVarGuard() as env: env['CC'] = 'my_cc' del env['LDSHARED'] @@ -126,7 +134,13 @@ def gcv(v): if v == 'LDSHARED': return 'gcc-4.2 -bundle -undefined dynamic_lookup ' return 'gcc-4.2' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs with EnvironmentVarGuard() as env: env['CC'] = 'my_cc' env['LDSHARED'] = 'my_ld -bundle -dynamic' From 4bac4653d026922eefcedc40bdf90b2db2f90e75 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Jul 2020 12:07:44 -0400 Subject: [PATCH 7984/8469] Move coverage configuration to .coveragerc. Saves characters and separates concerns. --- .coveragerc | 8 ++++++++ tox.ini | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000..2f0e871437 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +source= + pkg_resources + setuptools +omit= + */_vendor/* + +[report] diff --git a/tox.ini b/tox.ini index d3df21bffd..a177400600 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ setenv = # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir Program* CommonProgram* VS* APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED -commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} +commands=pytest {posargs} usedevelop=True extras = tests @@ -53,13 +53,6 @@ changedir = docs commands = python -m sphinx . {toxinidir}/build/html -[coverage:run] -source= - pkg_resources - setuptools -omit= - */_vendor/* - [testenv:finalize] skip_install = True deps = From c897b90cbcd2d5a907d3b677f7229c2be7c44528 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Jul 2020 12:26:16 -0400 Subject: [PATCH 7985/8469] More directly disable coverage when running tests on pypy. --- .github/workflows/python-tests.yml | 2 -- .travis.yml | 25 +++++-------------------- pytest.ini | 2 +- tox.ini | 6 +++++- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index e3663cf0b8..5a5980842c 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -98,5 +98,3 @@ jobs: python -m tox --parallel auto - -- - --cov diff --git a/.travis.yml b/.travis.yml index f97abc51c4..e8bc75743b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ jobs: fast_finish: true include: - python: pypy3 - env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 - python: 3.6 - python: 3.7 @@ -15,12 +14,12 @@ jobs: env: LANG=C - python: 3.8-dev - <<: *latest_py3 - env: TOXENV=docs DISABLE_COVERAGE=1 + env: TOXENV=docs allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 - <<: *latest_py3 - env: TOXENV=docs DISABLE_COVERAGE=1 + env: TOXENV=docs cache: pip @@ -39,22 +38,8 @@ install: script: - export NETWORK_REQUIRED=1 - - | - ( # Run testsuite. - if [ -z "$DISABLE_COVERAGE" ] - then - tox -- --cov - else - tox - fi - ) + - tox after_success: - - | - ( # Upload coverage data. - if [ -z "$DISABLE_COVERAGE" ] - then - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME - tox -e coverage,codecov - fi - ) + - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME + - tox -e coverage,codecov diff --git a/pytest.ini b/pytest.ini index 479a2965ea..ddcad08bae 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt -r sxX +addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt --cov -r sxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = diff --git a/tox.ini b/tox.ini index a177400600..59213e88f9 100644 --- a/tox.ini +++ b/tox.ini @@ -23,12 +23,16 @@ setenv = # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir Program* CommonProgram* VS* APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED -commands=pytest {posargs} +commands = pytest {posargs} usedevelop=True extras = tests +[testenv:pypy{,3}] +commands = pytest --no-cov {posargs} + + [testenv:coverage] description=Combine coverage data and create report deps=coverage From d9998e6281cbf4bb90cfd8c90e7f34b4ea3a350d Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 20:00:24 +0300 Subject: [PATCH 7986/8469] fix test for deprecation warning --- setuptools/tests/test_build_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 3dc87ca363..2ef8521d51 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -42,7 +42,7 @@ def test_abi3_filename(self): res = cmd.get_ext_filename('spam.eggs') if six.PY2 or not get_abi3_suffix(): - assert res.endswith(get_config_var('SO')) + assert res.endswith(get_config_var('EXT_SUFFIX')) elif sys.platform == 'win32': assert res.endswith('eggs.pyd') else: From 9013321c25606a5cd63271cd029c2539490b16d3 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 20:37:43 +0300 Subject: [PATCH 7987/8469] catch some resource leaks --- pkg_resources/__init__.py | 3 ++- setuptools/launch.py | 3 ++- setuptools/msvc.py | 36 +++++++++++++++++++++--------------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2e7d505901..61f2446159 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1459,7 +1459,8 @@ def run_script(self, script_name, namespace): script_filename = self._fn(self.egg_info, script) namespace['__file__'] = script_filename if os.path.exists(script_filename): - source = open(script_filename).read() + with open(script_filename) as fid: + source = fid.read() code = compile(source, script_filename, 'exec') exec(code, namespace, namespace) else: diff --git a/setuptools/launch.py b/setuptools/launch.py index 308283ea93..0208fdf33b 100644 --- a/setuptools/launch.py +++ b/setuptools/launch.py @@ -25,7 +25,8 @@ def run(): sys.argv[:] = sys.argv[1:] open_ = getattr(tokenize, 'open', open) - script = open_(script_name).read() + with open_(script_name) as fid: + script = fid.read() norm_script = script.replace('\\r\\n', '\\n') code = compile(norm_script, script_name, 'exec') exec(code, namespace) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 213e39c9d5..09f8565ef6 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -643,8 +643,10 @@ def lookup(self, key, name): """ key_read = winreg.KEY_READ openkey = winreg.OpenKey + closekey = winreg.CloseKey ms = self.microsoft for hkey in self.HKEYS: + bkey = None try: bkey = openkey(hkey, ms(key), 0, key_read) except (OSError, IOError): @@ -659,6 +661,9 @@ def lookup(self, key, name): return winreg.QueryValueEx(bkey, name)[0] except (OSError, IOError): pass + finally: + if bkey: + closekey(bkey) class SystemInfo: @@ -726,21 +731,22 @@ def find_reg_vs_vers(self): bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) except (OSError, IOError): continue - subkeys, values, _ = winreg.QueryInfoKey(bkey) - for i in range(values): - try: - ver = float(winreg.EnumValue(bkey, i)[0]) - if ver not in vs_vers: - vs_vers.append(ver) - except ValueError: - pass - for i in range(subkeys): - try: - ver = float(winreg.EnumKey(bkey, i)) - if ver not in vs_vers: - vs_vers.append(ver) - except ValueError: - pass + with bkey: + subkeys, values, _ = winreg.QueryInfoKey(bkey) + for i in range(values): + try: + ver = float(winreg.EnumValue(bkey, i)[0]) + if ver not in vs_vers: + vs_vers.append(ver) + except ValueError: + pass + for i in range(subkeys): + try: + ver = float(winreg.EnumKey(bkey, i)) + if ver not in vs_vers: + vs_vers.append(ver) + except ValueError: + pass return sorted(vs_vers) def find_programdata_vs_vers(self): From bb9fb1fcfe37c1ef1e29e1e6d1fc4e483c743380 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 03:53:46 -0400 Subject: [PATCH 7988/8469] Move distutils into a submodule of setuptools. --- conftest.py | 2 +- {distutils => setuptools/_distutils}/README | 0 .../_distutils}/__init__.py | 0 .../_distutils}/_msvccompiler.py | 0 .../_distutils}/archive_util.py | 0 .../_distutils}/bcppcompiler.py | 0 .../_distutils}/ccompiler.py | 0 {distutils => setuptools/_distutils}/cmd.py | 0 .../_distutils}/command/__init__.py | 0 .../_distutils}/command/bdist.py | 0 .../_distutils}/command/bdist_dumb.py | 0 .../_distutils}/command/bdist_msi.py | 0 .../_distutils}/command/bdist_rpm.py | 0 .../_distutils}/command/bdist_wininst.py | 0 .../_distutils}/command/build.py | 0 .../_distutils}/command/build_clib.py | 0 .../_distutils}/command/build_ext.py | 0 .../_distutils}/command/build_py.py | 0 .../_distutils}/command/build_scripts.py | 0 .../_distutils}/command/check.py | 0 .../_distutils}/command/clean.py | 0 .../_distutils}/command/command_template | 0 .../_distutils}/command/config.py | 0 .../_distutils}/command/install.py | 0 .../_distutils}/command/install_data.py | 0 .../_distutils}/command/install_egg_info.py | 0 .../_distutils}/command/install_headers.py | 0 .../_distutils}/command/install_lib.py | 0 .../_distutils}/command/install_scripts.py | 0 .../_distutils}/command/register.py | 0 .../_distutils}/command/sdist.py | 0 .../_distutils}/command/upload.py | 0 .../command/wininst-10.0-amd64.exe | Bin .../_distutils}/command/wininst-10.0.exe | Bin .../command/wininst-14.0-amd64.exe | Bin .../_distutils}/command/wininst-14.0.exe | Bin .../_distutils}/command/wininst-6.0.exe | Bin .../_distutils}/command/wininst-7.1.exe | Bin .../_distutils}/command/wininst-8.0.exe | Bin .../_distutils}/command/wininst-9.0-amd64.exe | Bin .../_distutils}/command/wininst-9.0.exe | Bin .../_distutils}/config.py | 0 {distutils => setuptools/_distutils}/core.py | 0 .../_distutils}/cygwinccompiler.py | 0 {distutils => setuptools/_distutils}/debug.py | 0 .../_distutils}/dep_util.py | 0 .../_distutils}/dir_util.py | 0 {distutils => setuptools/_distutils}/dist.py | 0 .../_distutils}/errors.py | 0 .../_distutils}/extension.py | 0 .../_distutils}/fancy_getopt.py | 0 .../_distutils}/file_util.py | 0 .../_distutils}/filelist.py | 0 {distutils => setuptools/_distutils}/log.py | 0 .../_distutils}/msvc9compiler.py | 0 .../_distutils}/msvccompiler.py | 0 {distutils => setuptools/_distutils}/spawn.py | 0 .../_distutils}/sysconfig.py | 0 .../_distutils}/tests/Setup.sample | 0 .../_distutils}/tests/__init__.py | 0 .../_distutils}/tests/includetest.rst | 0 .../_distutils}/tests/py35compat.py | 0 .../_distutils}/tests/support.py | 0 .../_distutils}/tests/test_archive_util.py | 0 .../_distutils}/tests/test_bdist.py | 0 .../_distutils}/tests/test_bdist_dumb.py | 0 .../_distutils}/tests/test_bdist_msi.py | 0 .../_distutils}/tests/test_bdist_rpm.py | 0 .../_distutils}/tests/test_bdist_wininst.py | 0 .../_distutils}/tests/test_build.py | 0 .../_distutils}/tests/test_build_clib.py | 0 .../_distutils}/tests/test_build_ext.py | 0 .../_distutils}/tests/test_build_py.py | 0 .../_distutils}/tests/test_build_scripts.py | 0 .../_distutils}/tests/test_check.py | 0 .../_distutils}/tests/test_clean.py | 0 .../_distutils}/tests/test_cmd.py | 0 .../_distutils}/tests/test_config.py | 0 .../_distutils}/tests/test_config_cmd.py | 0 .../_distutils}/tests/test_core.py | 0 .../_distutils}/tests/test_cygwinccompiler.py | 0 .../_distutils}/tests/test_dep_util.py | 0 .../_distutils}/tests/test_dir_util.py | 0 .../_distutils}/tests/test_dist.py | 0 .../_distutils}/tests/test_extension.py | 0 .../_distutils}/tests/test_file_util.py | 0 .../_distutils}/tests/test_filelist.py | 0 .../_distutils}/tests/test_install.py | 0 .../_distutils}/tests/test_install_data.py | 0 .../_distutils}/tests/test_install_headers.py | 0 .../_distutils}/tests/test_install_lib.py | 0 .../_distutils}/tests/test_install_scripts.py | 0 .../_distutils}/tests/test_log.py | 0 .../_distutils}/tests/test_msvc9compiler.py | 0 .../_distutils}/tests/test_msvccompiler.py | 0 .../_distutils}/tests/test_register.py | 0 .../_distutils}/tests/test_sdist.py | 0 .../_distutils}/tests/test_spawn.py | 0 .../_distutils}/tests/test_sysconfig.py | 0 .../_distutils}/tests/test_text_file.py | 0 .../_distutils}/tests/test_unixccompiler.py | 0 .../_distutils}/tests/test_upload.py | 0 .../_distutils}/tests/test_util.py | 0 .../_distutils}/tests/test_version.py | 0 .../tests/test_versionpredicate.py | 0 .../_distutils}/text_file.py | 0 .../_distutils}/unixccompiler.py | 0 {distutils => setuptools/_distutils}/util.py | 0 .../_distutils}/version.py | 0 .../_distutils}/versionpredicate.py | 0 setuptools/distutils_patch.py | 21 +++++------------- 111 files changed, 7 insertions(+), 16 deletions(-) rename {distutils => setuptools/_distutils}/README (100%) rename {distutils => setuptools/_distutils}/__init__.py (100%) rename {distutils => setuptools/_distutils}/_msvccompiler.py (100%) rename {distutils => setuptools/_distutils}/archive_util.py (100%) rename {distutils => setuptools/_distutils}/bcppcompiler.py (100%) rename {distutils => setuptools/_distutils}/ccompiler.py (100%) rename {distutils => setuptools/_distutils}/cmd.py (100%) rename {distutils => setuptools/_distutils}/command/__init__.py (100%) rename {distutils => setuptools/_distutils}/command/bdist.py (100%) rename {distutils => setuptools/_distutils}/command/bdist_dumb.py (100%) rename {distutils => setuptools/_distutils}/command/bdist_msi.py (100%) rename {distutils => setuptools/_distutils}/command/bdist_rpm.py (100%) rename {distutils => setuptools/_distutils}/command/bdist_wininst.py (100%) rename {distutils => setuptools/_distutils}/command/build.py (100%) rename {distutils => setuptools/_distutils}/command/build_clib.py (100%) rename {distutils => setuptools/_distutils}/command/build_ext.py (100%) rename {distutils => setuptools/_distutils}/command/build_py.py (100%) rename {distutils => setuptools/_distutils}/command/build_scripts.py (100%) rename {distutils => setuptools/_distutils}/command/check.py (100%) rename {distutils => setuptools/_distutils}/command/clean.py (100%) rename {distutils => setuptools/_distutils}/command/command_template (100%) rename {distutils => setuptools/_distutils}/command/config.py (100%) rename {distutils => setuptools/_distutils}/command/install.py (100%) rename {distutils => setuptools/_distutils}/command/install_data.py (100%) rename {distutils => setuptools/_distutils}/command/install_egg_info.py (100%) rename {distutils => setuptools/_distutils}/command/install_headers.py (100%) rename {distutils => setuptools/_distutils}/command/install_lib.py (100%) rename {distutils => setuptools/_distutils}/command/install_scripts.py (100%) rename {distutils => setuptools/_distutils}/command/register.py (100%) rename {distutils => setuptools/_distutils}/command/sdist.py (100%) rename {distutils => setuptools/_distutils}/command/upload.py (100%) rename {distutils => setuptools/_distutils}/command/wininst-10.0-amd64.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-10.0.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-14.0-amd64.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-14.0.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-6.0.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-7.1.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-8.0.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-9.0-amd64.exe (100%) rename {distutils => setuptools/_distutils}/command/wininst-9.0.exe (100%) rename {distutils => setuptools/_distutils}/config.py (100%) rename {distutils => setuptools/_distutils}/core.py (100%) rename {distutils => setuptools/_distutils}/cygwinccompiler.py (100%) rename {distutils => setuptools/_distutils}/debug.py (100%) rename {distutils => setuptools/_distutils}/dep_util.py (100%) rename {distutils => setuptools/_distutils}/dir_util.py (100%) rename {distutils => setuptools/_distutils}/dist.py (100%) rename {distutils => setuptools/_distutils}/errors.py (100%) rename {distutils => setuptools/_distutils}/extension.py (100%) rename {distutils => setuptools/_distutils}/fancy_getopt.py (100%) rename {distutils => setuptools/_distutils}/file_util.py (100%) rename {distutils => setuptools/_distutils}/filelist.py (100%) rename {distutils => setuptools/_distutils}/log.py (100%) rename {distutils => setuptools/_distutils}/msvc9compiler.py (100%) rename {distutils => setuptools/_distutils}/msvccompiler.py (100%) rename {distutils => setuptools/_distutils}/spawn.py (100%) rename {distutils => setuptools/_distutils}/sysconfig.py (100%) rename {distutils => setuptools/_distutils}/tests/Setup.sample (100%) rename {distutils => setuptools/_distutils}/tests/__init__.py (100%) rename {distutils => setuptools/_distutils}/tests/includetest.rst (100%) rename {distutils => setuptools/_distutils}/tests/py35compat.py (100%) rename {distutils => setuptools/_distutils}/tests/support.py (100%) rename {distutils => setuptools/_distutils}/tests/test_archive_util.py (100%) rename {distutils => setuptools/_distutils}/tests/test_bdist.py (100%) rename {distutils => setuptools/_distutils}/tests/test_bdist_dumb.py (100%) rename {distutils => setuptools/_distutils}/tests/test_bdist_msi.py (100%) rename {distutils => setuptools/_distutils}/tests/test_bdist_rpm.py (100%) rename {distutils => setuptools/_distutils}/tests/test_bdist_wininst.py (100%) rename {distutils => setuptools/_distutils}/tests/test_build.py (100%) rename {distutils => setuptools/_distutils}/tests/test_build_clib.py (100%) rename {distutils => setuptools/_distutils}/tests/test_build_ext.py (100%) rename {distutils => setuptools/_distutils}/tests/test_build_py.py (100%) rename {distutils => setuptools/_distutils}/tests/test_build_scripts.py (100%) rename {distutils => setuptools/_distutils}/tests/test_check.py (100%) rename {distutils => setuptools/_distutils}/tests/test_clean.py (100%) rename {distutils => setuptools/_distutils}/tests/test_cmd.py (100%) rename {distutils => setuptools/_distutils}/tests/test_config.py (100%) rename {distutils => setuptools/_distutils}/tests/test_config_cmd.py (100%) rename {distutils => setuptools/_distutils}/tests/test_core.py (100%) rename {distutils => setuptools/_distutils}/tests/test_cygwinccompiler.py (100%) rename {distutils => setuptools/_distutils}/tests/test_dep_util.py (100%) rename {distutils => setuptools/_distutils}/tests/test_dir_util.py (100%) rename {distutils => setuptools/_distutils}/tests/test_dist.py (100%) rename {distutils => setuptools/_distutils}/tests/test_extension.py (100%) rename {distutils => setuptools/_distutils}/tests/test_file_util.py (100%) rename {distutils => setuptools/_distutils}/tests/test_filelist.py (100%) rename {distutils => setuptools/_distutils}/tests/test_install.py (100%) rename {distutils => setuptools/_distutils}/tests/test_install_data.py (100%) rename {distutils => setuptools/_distutils}/tests/test_install_headers.py (100%) rename {distutils => setuptools/_distutils}/tests/test_install_lib.py (100%) rename {distutils => setuptools/_distutils}/tests/test_install_scripts.py (100%) rename {distutils => setuptools/_distutils}/tests/test_log.py (100%) rename {distutils => setuptools/_distutils}/tests/test_msvc9compiler.py (100%) rename {distutils => setuptools/_distutils}/tests/test_msvccompiler.py (100%) rename {distutils => setuptools/_distutils}/tests/test_register.py (100%) rename {distutils => setuptools/_distutils}/tests/test_sdist.py (100%) rename {distutils => setuptools/_distutils}/tests/test_spawn.py (100%) rename {distutils => setuptools/_distutils}/tests/test_sysconfig.py (100%) rename {distutils => setuptools/_distutils}/tests/test_text_file.py (100%) rename {distutils => setuptools/_distutils}/tests/test_unixccompiler.py (100%) rename {distutils => setuptools/_distutils}/tests/test_upload.py (100%) rename {distutils => setuptools/_distutils}/tests/test_util.py (100%) rename {distutils => setuptools/_distutils}/tests/test_version.py (100%) rename {distutils => setuptools/_distutils}/tests/test_versionpredicate.py (100%) rename {distutils => setuptools/_distutils}/text_file.py (100%) rename {distutils => setuptools/_distutils}/unixccompiler.py (100%) rename {distutils => setuptools/_distutils}/util.py (100%) rename {distutils => setuptools/_distutils}/version.py (100%) rename {distutils => setuptools/_distutils}/versionpredicate.py (100%) diff --git a/conftest.py b/conftest.py index 3f7e59b44e..72edcf1439 100644 --- a/conftest.py +++ b/conftest.py @@ -14,7 +14,7 @@ def pytest_addoption(parser): collect_ignore = [ 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', - 'distutils', + 'setuptools/_distutils', ] diff --git a/distutils/README b/setuptools/_distutils/README similarity index 100% rename from distutils/README rename to setuptools/_distutils/README diff --git a/distutils/__init__.py b/setuptools/_distutils/__init__.py similarity index 100% rename from distutils/__init__.py rename to setuptools/_distutils/__init__.py diff --git a/distutils/_msvccompiler.py b/setuptools/_distutils/_msvccompiler.py similarity index 100% rename from distutils/_msvccompiler.py rename to setuptools/_distutils/_msvccompiler.py diff --git a/distutils/archive_util.py b/setuptools/_distutils/archive_util.py similarity index 100% rename from distutils/archive_util.py rename to setuptools/_distutils/archive_util.py diff --git a/distutils/bcppcompiler.py b/setuptools/_distutils/bcppcompiler.py similarity index 100% rename from distutils/bcppcompiler.py rename to setuptools/_distutils/bcppcompiler.py diff --git a/distutils/ccompiler.py b/setuptools/_distutils/ccompiler.py similarity index 100% rename from distutils/ccompiler.py rename to setuptools/_distutils/ccompiler.py diff --git a/distutils/cmd.py b/setuptools/_distutils/cmd.py similarity index 100% rename from distutils/cmd.py rename to setuptools/_distutils/cmd.py diff --git a/distutils/command/__init__.py b/setuptools/_distutils/command/__init__.py similarity index 100% rename from distutils/command/__init__.py rename to setuptools/_distutils/command/__init__.py diff --git a/distutils/command/bdist.py b/setuptools/_distutils/command/bdist.py similarity index 100% rename from distutils/command/bdist.py rename to setuptools/_distutils/command/bdist.py diff --git a/distutils/command/bdist_dumb.py b/setuptools/_distutils/command/bdist_dumb.py similarity index 100% rename from distutils/command/bdist_dumb.py rename to setuptools/_distutils/command/bdist_dumb.py diff --git a/distutils/command/bdist_msi.py b/setuptools/_distutils/command/bdist_msi.py similarity index 100% rename from distutils/command/bdist_msi.py rename to setuptools/_distutils/command/bdist_msi.py diff --git a/distutils/command/bdist_rpm.py b/setuptools/_distutils/command/bdist_rpm.py similarity index 100% rename from distutils/command/bdist_rpm.py rename to setuptools/_distutils/command/bdist_rpm.py diff --git a/distutils/command/bdist_wininst.py b/setuptools/_distutils/command/bdist_wininst.py similarity index 100% rename from distutils/command/bdist_wininst.py rename to setuptools/_distutils/command/bdist_wininst.py diff --git a/distutils/command/build.py b/setuptools/_distutils/command/build.py similarity index 100% rename from distutils/command/build.py rename to setuptools/_distutils/command/build.py diff --git a/distutils/command/build_clib.py b/setuptools/_distutils/command/build_clib.py similarity index 100% rename from distutils/command/build_clib.py rename to setuptools/_distutils/command/build_clib.py diff --git a/distutils/command/build_ext.py b/setuptools/_distutils/command/build_ext.py similarity index 100% rename from distutils/command/build_ext.py rename to setuptools/_distutils/command/build_ext.py diff --git a/distutils/command/build_py.py b/setuptools/_distutils/command/build_py.py similarity index 100% rename from distutils/command/build_py.py rename to setuptools/_distutils/command/build_py.py diff --git a/distutils/command/build_scripts.py b/setuptools/_distutils/command/build_scripts.py similarity index 100% rename from distutils/command/build_scripts.py rename to setuptools/_distutils/command/build_scripts.py diff --git a/distutils/command/check.py b/setuptools/_distutils/command/check.py similarity index 100% rename from distutils/command/check.py rename to setuptools/_distutils/command/check.py diff --git a/distutils/command/clean.py b/setuptools/_distutils/command/clean.py similarity index 100% rename from distutils/command/clean.py rename to setuptools/_distutils/command/clean.py diff --git a/distutils/command/command_template b/setuptools/_distutils/command/command_template similarity index 100% rename from distutils/command/command_template rename to setuptools/_distutils/command/command_template diff --git a/distutils/command/config.py b/setuptools/_distutils/command/config.py similarity index 100% rename from distutils/command/config.py rename to setuptools/_distutils/command/config.py diff --git a/distutils/command/install.py b/setuptools/_distutils/command/install.py similarity index 100% rename from distutils/command/install.py rename to setuptools/_distutils/command/install.py diff --git a/distutils/command/install_data.py b/setuptools/_distutils/command/install_data.py similarity index 100% rename from distutils/command/install_data.py rename to setuptools/_distutils/command/install_data.py diff --git a/distutils/command/install_egg_info.py b/setuptools/_distutils/command/install_egg_info.py similarity index 100% rename from distutils/command/install_egg_info.py rename to setuptools/_distutils/command/install_egg_info.py diff --git a/distutils/command/install_headers.py b/setuptools/_distutils/command/install_headers.py similarity index 100% rename from distutils/command/install_headers.py rename to setuptools/_distutils/command/install_headers.py diff --git a/distutils/command/install_lib.py b/setuptools/_distutils/command/install_lib.py similarity index 100% rename from distutils/command/install_lib.py rename to setuptools/_distutils/command/install_lib.py diff --git a/distutils/command/install_scripts.py b/setuptools/_distutils/command/install_scripts.py similarity index 100% rename from distutils/command/install_scripts.py rename to setuptools/_distutils/command/install_scripts.py diff --git a/distutils/command/register.py b/setuptools/_distutils/command/register.py similarity index 100% rename from distutils/command/register.py rename to setuptools/_distutils/command/register.py diff --git a/distutils/command/sdist.py b/setuptools/_distutils/command/sdist.py similarity index 100% rename from distutils/command/sdist.py rename to setuptools/_distutils/command/sdist.py diff --git a/distutils/command/upload.py b/setuptools/_distutils/command/upload.py similarity index 100% rename from distutils/command/upload.py rename to setuptools/_distutils/command/upload.py diff --git a/distutils/command/wininst-10.0-amd64.exe b/setuptools/_distutils/command/wininst-10.0-amd64.exe similarity index 100% rename from distutils/command/wininst-10.0-amd64.exe rename to setuptools/_distutils/command/wininst-10.0-amd64.exe diff --git a/distutils/command/wininst-10.0.exe b/setuptools/_distutils/command/wininst-10.0.exe similarity index 100% rename from distutils/command/wininst-10.0.exe rename to setuptools/_distutils/command/wininst-10.0.exe diff --git a/distutils/command/wininst-14.0-amd64.exe b/setuptools/_distutils/command/wininst-14.0-amd64.exe similarity index 100% rename from distutils/command/wininst-14.0-amd64.exe rename to setuptools/_distutils/command/wininst-14.0-amd64.exe diff --git a/distutils/command/wininst-14.0.exe b/setuptools/_distutils/command/wininst-14.0.exe similarity index 100% rename from distutils/command/wininst-14.0.exe rename to setuptools/_distutils/command/wininst-14.0.exe diff --git a/distutils/command/wininst-6.0.exe b/setuptools/_distutils/command/wininst-6.0.exe similarity index 100% rename from distutils/command/wininst-6.0.exe rename to setuptools/_distutils/command/wininst-6.0.exe diff --git a/distutils/command/wininst-7.1.exe b/setuptools/_distutils/command/wininst-7.1.exe similarity index 100% rename from distutils/command/wininst-7.1.exe rename to setuptools/_distutils/command/wininst-7.1.exe diff --git a/distutils/command/wininst-8.0.exe b/setuptools/_distutils/command/wininst-8.0.exe similarity index 100% rename from distutils/command/wininst-8.0.exe rename to setuptools/_distutils/command/wininst-8.0.exe diff --git a/distutils/command/wininst-9.0-amd64.exe b/setuptools/_distutils/command/wininst-9.0-amd64.exe similarity index 100% rename from distutils/command/wininst-9.0-amd64.exe rename to setuptools/_distutils/command/wininst-9.0-amd64.exe diff --git a/distutils/command/wininst-9.0.exe b/setuptools/_distutils/command/wininst-9.0.exe similarity index 100% rename from distutils/command/wininst-9.0.exe rename to setuptools/_distutils/command/wininst-9.0.exe diff --git a/distutils/config.py b/setuptools/_distutils/config.py similarity index 100% rename from distutils/config.py rename to setuptools/_distutils/config.py diff --git a/distutils/core.py b/setuptools/_distutils/core.py similarity index 100% rename from distutils/core.py rename to setuptools/_distutils/core.py diff --git a/distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py similarity index 100% rename from distutils/cygwinccompiler.py rename to setuptools/_distutils/cygwinccompiler.py diff --git a/distutils/debug.py b/setuptools/_distutils/debug.py similarity index 100% rename from distutils/debug.py rename to setuptools/_distutils/debug.py diff --git a/distutils/dep_util.py b/setuptools/_distutils/dep_util.py similarity index 100% rename from distutils/dep_util.py rename to setuptools/_distutils/dep_util.py diff --git a/distutils/dir_util.py b/setuptools/_distutils/dir_util.py similarity index 100% rename from distutils/dir_util.py rename to setuptools/_distutils/dir_util.py diff --git a/distutils/dist.py b/setuptools/_distutils/dist.py similarity index 100% rename from distutils/dist.py rename to setuptools/_distutils/dist.py diff --git a/distutils/errors.py b/setuptools/_distutils/errors.py similarity index 100% rename from distutils/errors.py rename to setuptools/_distutils/errors.py diff --git a/distutils/extension.py b/setuptools/_distutils/extension.py similarity index 100% rename from distutils/extension.py rename to setuptools/_distutils/extension.py diff --git a/distutils/fancy_getopt.py b/setuptools/_distutils/fancy_getopt.py similarity index 100% rename from distutils/fancy_getopt.py rename to setuptools/_distutils/fancy_getopt.py diff --git a/distutils/file_util.py b/setuptools/_distutils/file_util.py similarity index 100% rename from distutils/file_util.py rename to setuptools/_distutils/file_util.py diff --git a/distutils/filelist.py b/setuptools/_distutils/filelist.py similarity index 100% rename from distutils/filelist.py rename to setuptools/_distutils/filelist.py diff --git a/distutils/log.py b/setuptools/_distutils/log.py similarity index 100% rename from distutils/log.py rename to setuptools/_distutils/log.py diff --git a/distutils/msvc9compiler.py b/setuptools/_distutils/msvc9compiler.py similarity index 100% rename from distutils/msvc9compiler.py rename to setuptools/_distutils/msvc9compiler.py diff --git a/distutils/msvccompiler.py b/setuptools/_distutils/msvccompiler.py similarity index 100% rename from distutils/msvccompiler.py rename to setuptools/_distutils/msvccompiler.py diff --git a/distutils/spawn.py b/setuptools/_distutils/spawn.py similarity index 100% rename from distutils/spawn.py rename to setuptools/_distutils/spawn.py diff --git a/distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py similarity index 100% rename from distutils/sysconfig.py rename to setuptools/_distutils/sysconfig.py diff --git a/distutils/tests/Setup.sample b/setuptools/_distutils/tests/Setup.sample similarity index 100% rename from distutils/tests/Setup.sample rename to setuptools/_distutils/tests/Setup.sample diff --git a/distutils/tests/__init__.py b/setuptools/_distutils/tests/__init__.py similarity index 100% rename from distutils/tests/__init__.py rename to setuptools/_distutils/tests/__init__.py diff --git a/distutils/tests/includetest.rst b/setuptools/_distutils/tests/includetest.rst similarity index 100% rename from distutils/tests/includetest.rst rename to setuptools/_distutils/tests/includetest.rst diff --git a/distutils/tests/py35compat.py b/setuptools/_distutils/tests/py35compat.py similarity index 100% rename from distutils/tests/py35compat.py rename to setuptools/_distutils/tests/py35compat.py diff --git a/distutils/tests/support.py b/setuptools/_distutils/tests/support.py similarity index 100% rename from distutils/tests/support.py rename to setuptools/_distutils/tests/support.py diff --git a/distutils/tests/test_archive_util.py b/setuptools/_distutils/tests/test_archive_util.py similarity index 100% rename from distutils/tests/test_archive_util.py rename to setuptools/_distutils/tests/test_archive_util.py diff --git a/distutils/tests/test_bdist.py b/setuptools/_distutils/tests/test_bdist.py similarity index 100% rename from distutils/tests/test_bdist.py rename to setuptools/_distutils/tests/test_bdist.py diff --git a/distutils/tests/test_bdist_dumb.py b/setuptools/_distutils/tests/test_bdist_dumb.py similarity index 100% rename from distutils/tests/test_bdist_dumb.py rename to setuptools/_distutils/tests/test_bdist_dumb.py diff --git a/distutils/tests/test_bdist_msi.py b/setuptools/_distutils/tests/test_bdist_msi.py similarity index 100% rename from distutils/tests/test_bdist_msi.py rename to setuptools/_distutils/tests/test_bdist_msi.py diff --git a/distutils/tests/test_bdist_rpm.py b/setuptools/_distutils/tests/test_bdist_rpm.py similarity index 100% rename from distutils/tests/test_bdist_rpm.py rename to setuptools/_distutils/tests/test_bdist_rpm.py diff --git a/distutils/tests/test_bdist_wininst.py b/setuptools/_distutils/tests/test_bdist_wininst.py similarity index 100% rename from distutils/tests/test_bdist_wininst.py rename to setuptools/_distutils/tests/test_bdist_wininst.py diff --git a/distutils/tests/test_build.py b/setuptools/_distutils/tests/test_build.py similarity index 100% rename from distutils/tests/test_build.py rename to setuptools/_distutils/tests/test_build.py diff --git a/distutils/tests/test_build_clib.py b/setuptools/_distutils/tests/test_build_clib.py similarity index 100% rename from distutils/tests/test_build_clib.py rename to setuptools/_distutils/tests/test_build_clib.py diff --git a/distutils/tests/test_build_ext.py b/setuptools/_distutils/tests/test_build_ext.py similarity index 100% rename from distutils/tests/test_build_ext.py rename to setuptools/_distutils/tests/test_build_ext.py diff --git a/distutils/tests/test_build_py.py b/setuptools/_distutils/tests/test_build_py.py similarity index 100% rename from distutils/tests/test_build_py.py rename to setuptools/_distutils/tests/test_build_py.py diff --git a/distutils/tests/test_build_scripts.py b/setuptools/_distutils/tests/test_build_scripts.py similarity index 100% rename from distutils/tests/test_build_scripts.py rename to setuptools/_distutils/tests/test_build_scripts.py diff --git a/distutils/tests/test_check.py b/setuptools/_distutils/tests/test_check.py similarity index 100% rename from distutils/tests/test_check.py rename to setuptools/_distutils/tests/test_check.py diff --git a/distutils/tests/test_clean.py b/setuptools/_distutils/tests/test_clean.py similarity index 100% rename from distutils/tests/test_clean.py rename to setuptools/_distutils/tests/test_clean.py diff --git a/distutils/tests/test_cmd.py b/setuptools/_distutils/tests/test_cmd.py similarity index 100% rename from distutils/tests/test_cmd.py rename to setuptools/_distutils/tests/test_cmd.py diff --git a/distutils/tests/test_config.py b/setuptools/_distutils/tests/test_config.py similarity index 100% rename from distutils/tests/test_config.py rename to setuptools/_distutils/tests/test_config.py diff --git a/distutils/tests/test_config_cmd.py b/setuptools/_distutils/tests/test_config_cmd.py similarity index 100% rename from distutils/tests/test_config_cmd.py rename to setuptools/_distutils/tests/test_config_cmd.py diff --git a/distutils/tests/test_core.py b/setuptools/_distutils/tests/test_core.py similarity index 100% rename from distutils/tests/test_core.py rename to setuptools/_distutils/tests/test_core.py diff --git a/distutils/tests/test_cygwinccompiler.py b/setuptools/_distutils/tests/test_cygwinccompiler.py similarity index 100% rename from distutils/tests/test_cygwinccompiler.py rename to setuptools/_distutils/tests/test_cygwinccompiler.py diff --git a/distutils/tests/test_dep_util.py b/setuptools/_distutils/tests/test_dep_util.py similarity index 100% rename from distutils/tests/test_dep_util.py rename to setuptools/_distutils/tests/test_dep_util.py diff --git a/distutils/tests/test_dir_util.py b/setuptools/_distutils/tests/test_dir_util.py similarity index 100% rename from distutils/tests/test_dir_util.py rename to setuptools/_distutils/tests/test_dir_util.py diff --git a/distutils/tests/test_dist.py b/setuptools/_distutils/tests/test_dist.py similarity index 100% rename from distutils/tests/test_dist.py rename to setuptools/_distutils/tests/test_dist.py diff --git a/distutils/tests/test_extension.py b/setuptools/_distutils/tests/test_extension.py similarity index 100% rename from distutils/tests/test_extension.py rename to setuptools/_distutils/tests/test_extension.py diff --git a/distutils/tests/test_file_util.py b/setuptools/_distutils/tests/test_file_util.py similarity index 100% rename from distutils/tests/test_file_util.py rename to setuptools/_distutils/tests/test_file_util.py diff --git a/distutils/tests/test_filelist.py b/setuptools/_distutils/tests/test_filelist.py similarity index 100% rename from distutils/tests/test_filelist.py rename to setuptools/_distutils/tests/test_filelist.py diff --git a/distutils/tests/test_install.py b/setuptools/_distutils/tests/test_install.py similarity index 100% rename from distutils/tests/test_install.py rename to setuptools/_distutils/tests/test_install.py diff --git a/distutils/tests/test_install_data.py b/setuptools/_distutils/tests/test_install_data.py similarity index 100% rename from distutils/tests/test_install_data.py rename to setuptools/_distutils/tests/test_install_data.py diff --git a/distutils/tests/test_install_headers.py b/setuptools/_distutils/tests/test_install_headers.py similarity index 100% rename from distutils/tests/test_install_headers.py rename to setuptools/_distutils/tests/test_install_headers.py diff --git a/distutils/tests/test_install_lib.py b/setuptools/_distutils/tests/test_install_lib.py similarity index 100% rename from distutils/tests/test_install_lib.py rename to setuptools/_distutils/tests/test_install_lib.py diff --git a/distutils/tests/test_install_scripts.py b/setuptools/_distutils/tests/test_install_scripts.py similarity index 100% rename from distutils/tests/test_install_scripts.py rename to setuptools/_distutils/tests/test_install_scripts.py diff --git a/distutils/tests/test_log.py b/setuptools/_distutils/tests/test_log.py similarity index 100% rename from distutils/tests/test_log.py rename to setuptools/_distutils/tests/test_log.py diff --git a/distutils/tests/test_msvc9compiler.py b/setuptools/_distutils/tests/test_msvc9compiler.py similarity index 100% rename from distutils/tests/test_msvc9compiler.py rename to setuptools/_distutils/tests/test_msvc9compiler.py diff --git a/distutils/tests/test_msvccompiler.py b/setuptools/_distutils/tests/test_msvccompiler.py similarity index 100% rename from distutils/tests/test_msvccompiler.py rename to setuptools/_distutils/tests/test_msvccompiler.py diff --git a/distutils/tests/test_register.py b/setuptools/_distutils/tests/test_register.py similarity index 100% rename from distutils/tests/test_register.py rename to setuptools/_distutils/tests/test_register.py diff --git a/distutils/tests/test_sdist.py b/setuptools/_distutils/tests/test_sdist.py similarity index 100% rename from distutils/tests/test_sdist.py rename to setuptools/_distutils/tests/test_sdist.py diff --git a/distutils/tests/test_spawn.py b/setuptools/_distutils/tests/test_spawn.py similarity index 100% rename from distutils/tests/test_spawn.py rename to setuptools/_distutils/tests/test_spawn.py diff --git a/distutils/tests/test_sysconfig.py b/setuptools/_distutils/tests/test_sysconfig.py similarity index 100% rename from distutils/tests/test_sysconfig.py rename to setuptools/_distutils/tests/test_sysconfig.py diff --git a/distutils/tests/test_text_file.py b/setuptools/_distutils/tests/test_text_file.py similarity index 100% rename from distutils/tests/test_text_file.py rename to setuptools/_distutils/tests/test_text_file.py diff --git a/distutils/tests/test_unixccompiler.py b/setuptools/_distutils/tests/test_unixccompiler.py similarity index 100% rename from distutils/tests/test_unixccompiler.py rename to setuptools/_distutils/tests/test_unixccompiler.py diff --git a/distutils/tests/test_upload.py b/setuptools/_distutils/tests/test_upload.py similarity index 100% rename from distutils/tests/test_upload.py rename to setuptools/_distutils/tests/test_upload.py diff --git a/distutils/tests/test_util.py b/setuptools/_distutils/tests/test_util.py similarity index 100% rename from distutils/tests/test_util.py rename to setuptools/_distutils/tests/test_util.py diff --git a/distutils/tests/test_version.py b/setuptools/_distutils/tests/test_version.py similarity index 100% rename from distutils/tests/test_version.py rename to setuptools/_distutils/tests/test_version.py diff --git a/distutils/tests/test_versionpredicate.py b/setuptools/_distutils/tests/test_versionpredicate.py similarity index 100% rename from distutils/tests/test_versionpredicate.py rename to setuptools/_distutils/tests/test_versionpredicate.py diff --git a/distutils/text_file.py b/setuptools/_distutils/text_file.py similarity index 100% rename from distutils/text_file.py rename to setuptools/_distutils/text_file.py diff --git a/distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py similarity index 100% rename from distutils/unixccompiler.py rename to setuptools/_distutils/unixccompiler.py diff --git a/distutils/util.py b/setuptools/_distutils/util.py similarity index 100% rename from distutils/util.py rename to setuptools/_distutils/util.py diff --git a/distutils/version.py b/setuptools/_distutils/version.py similarity index 100% rename from distutils/version.py rename to setuptools/_distutils/version.py diff --git a/distutils/versionpredicate.py b/setuptools/_distutils/versionpredicate.py similarity index 100% rename from distutils/versionpredicate.py rename to setuptools/_distutils/versionpredicate.py diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index f9e637988a..06eed82f0e 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -8,19 +8,7 @@ import sys import re import importlib -import contextlib import warnings -from os.path import dirname - - -@contextlib.contextmanager -def patch_sys_path(): - orig = sys.path[:] - sys.path[:] = [dirname(dirname(__file__))] - try: - yield - finally: - sys.path[:] = orig def clear_distutils(): @@ -34,9 +22,12 @@ def clear_distutils(): def ensure_local_distutils(): clear_distutils() - with patch_sys_path(): - importlib.import_module('distutils') - assert sys.modules['distutils'].local + distutils = importlib.import_module('setuptools._distutils') + sys.modules['distutils'] = distutils + + # sanity check that submodules load as expected + core = importlib.import_module('distutils.core') + assert '_distutils' in core.__file__, core.__file__ ensure_local_distutils() From 97192962e89a24a02effd1f7a541108335517253 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 04:54:40 -0400 Subject: [PATCH 7989/8469] Ensure the module is named 'distutils'. Avoids errors when distutils.log and setuptools._distutils.log are two separate modules with separate state. --- setuptools/distutils_patch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index 06eed82f0e..b2095fbac7 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -23,6 +23,7 @@ def clear_distutils(): def ensure_local_distutils(): clear_distutils() distutils = importlib.import_module('setuptools._distutils') + distutils.__name__ = 'distutils' sys.modules['distutils'] = distutils # sanity check that submodules load as expected From 78928efa890109410b315b03a225c9fc5f041ff8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 05:03:35 -0400 Subject: [PATCH 7990/8469] =?UTF-8?q?Bump=20version:=2047.3.1=20=E2=86=92?= =?UTF-8?q?=2047.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2071.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2071.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9b106cfa3f..8870172755 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.3.1 +current_version = 47.3.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 799163edd3..a8ddb65752 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v47.3.2 +------- + +* #2071: Replaced references to the deprecated imp package with references to importlib + + v47.3.1 ------- diff --git a/changelog.d/2071.misc.rst b/changelog.d/2071.misc.rst deleted file mode 100644 index eb36480caa..0000000000 --- a/changelog.d/2071.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Replaced references to the deprecated imp package with references to importlib diff --git a/setup.cfg b/setup.cfg index f23714b659..cd62393c52 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.3.1 +version = 47.3.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From ca0065fb62c1728cb42b86ae79375533856d2248 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 05:13:12 -0400 Subject: [PATCH 7991/8469] Update changelog. --- changelog.d/2143.breaking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2143.breaking.rst b/changelog.d/2143.breaking.rst index 29030b3210..244a698942 100644 --- a/changelog.d/2143.breaking.rst +++ b/changelog.d/2143.breaking.rst @@ -1 +1 @@ -Setuptools adopts distutils from the standard library as a top-level ``distutils`` package and no longer depends on distutils in the standard library. This new ``distutils`` package will be masked by ``distutils`` in the standard library unless that library has been stripped by a downstream package manager or gets removed in a future version. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. +Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. From 776fa9ffa471863f8d9502ca95872099394c506c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 11:07:49 -0400 Subject: [PATCH 7992/8469] =?UTF-8?q?Bump=20version:=2047.3.2=20=E2=86=92?= =?UTF-8?q?=2048.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2143.breaking.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2143.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8870172755..bee22c9e0e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 47.3.2 +current_version = 48.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a8ddb65752..d653d88920 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v48.0.0 +------- + +* #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. + + v47.3.2 ------- diff --git a/changelog.d/2143.breaking.rst b/changelog.d/2143.breaking.rst deleted file mode 100644 index 244a698942..0000000000 --- a/changelog.d/2143.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. diff --git a/setup.cfg b/setup.cfg index cd62393c52..05638dbc17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 47.3.2 +version = 48.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 08e858804d6ef515b3bcea85e1b6e25a40487986 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 12:12:23 -0400 Subject: [PATCH 7993/8469] Update changelog. --- changelog.d/2137.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2137.change.rst diff --git a/changelog.d/2137.change.rst b/changelog.d/2137.change.rst new file mode 100644 index 0000000000..fb5f507544 --- /dev/null +++ b/changelog.d/2137.change.rst @@ -0,0 +1 @@ +Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead. From 9372bf7d7f63136758196dd86688f00602b7a494 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 12:55:46 -0400 Subject: [PATCH 7994/8469] Keep the full path for each entry when enumerating entries for a candidate path. --- pkg_resources/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3c826eb0b8..5df23e5b30 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2057,7 +2057,10 @@ def find_on_path(importer, path_item, only=False): ) return - entries = safe_listdir(path_item) + entries = ( + os.path.join(path_item, child) + for child in safe_listdir(path_item) + ) # for performance, before sorting by version, # screen entries for only those that will yield From c30aca86261cac34b60e679a1ee430dbc968582c Mon Sep 17 00:00:00 2001 From: Omer Ozarslan Date: Thu, 4 Jun 2020 11:49:32 -0500 Subject: [PATCH 7995/8469] Update vendor packaging in pkg_resources to v19.2 --- pkg_resources/_vendor/packaging/__about__.py | 14 +- pkg_resources/_vendor/packaging/__init__.py | 20 +- pkg_resources/_vendor/packaging/_compat.py | 7 +- .../_vendor/packaging/_structures.py | 4 +- pkg_resources/_vendor/packaging/markers.py | 91 ++-- .../_vendor/packaging/requirements.py | 41 +- pkg_resources/_vendor/packaging/specifiers.py | 71 +-- pkg_resources/_vendor/packaging/tags.py | 404 ++++++++++++++++++ pkg_resources/_vendor/packaging/utils.py | 43 ++ pkg_resources/_vendor/packaging/version.py | 149 ++++--- pkg_resources/_vendor/vendored.txt | 2 +- 11 files changed, 660 insertions(+), 186 deletions(-) create mode 100644 pkg_resources/_vendor/packaging/tags.py diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index 95d330ef82..dc95138d04 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -4,18 +4,24 @@ from __future__ import absolute_import, division, print_function __all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", + "__title__", + "__summary__", + "__uri__", + "__version__", + "__author__", + "__email__", + "__license__", + "__copyright__", ] __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "16.8" +__version__ = "19.2" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" __license__ = "BSD or Apache License, Version 2.0" -__copyright__ = "Copyright 2014-2016 %s" % __author__ +__copyright__ = "Copyright 2014-2019 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/__init__.py b/pkg_resources/_vendor/packaging/__init__.py index 5ee6220203..a0cf67df52 100644 --- a/pkg_resources/_vendor/packaging/__init__.py +++ b/pkg_resources/_vendor/packaging/__init__.py @@ -4,11 +4,23 @@ from __future__ import absolute_import, division, print_function from .__about__ import ( - __author__, __copyright__, __email__, __license__, __summary__, __title__, - __uri__, __version__ + __author__, + __copyright__, + __email__, + __license__, + __summary__, + __title__, + __uri__, + __version__, ) __all__ = [ - "__title__", "__summary__", "__uri__", "__version__", "__author__", - "__email__", "__license__", "__copyright__", + "__title__", + "__summary__", + "__uri__", + "__version__", + "__author__", + "__email__", + "__license__", + "__copyright__", ] diff --git a/pkg_resources/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py index 210bb80b7e..25da473c19 100644 --- a/pkg_resources/_vendor/packaging/_compat.py +++ b/pkg_resources/_vendor/packaging/_compat.py @@ -12,9 +12,9 @@ # flake8: noqa if PY3: - string_types = str, + string_types = (str,) else: - string_types = basestring, + string_types = (basestring,) def with_metaclass(meta, *bases): @@ -27,4 +27,5 @@ def with_metaclass(meta, *bases): class metaclass(meta): def __new__(cls, name, this_bases, d): return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) + + return type.__new__(metaclass, "temporary_class", (), {}) diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py index ccc27861c3..68dcca634d 100644 --- a/pkg_resources/_vendor/packaging/_structures.py +++ b/pkg_resources/_vendor/packaging/_structures.py @@ -5,7 +5,6 @@ class Infinity(object): - def __repr__(self): return "Infinity" @@ -33,11 +32,11 @@ def __ge__(self, other): def __neg__(self): return NegativeInfinity + Infinity = Infinity() class NegativeInfinity(object): - def __repr__(self): return "-Infinity" @@ -65,4 +64,5 @@ def __ge__(self, other): def __neg__(self): return Infinity + NegativeInfinity = NegativeInfinity() diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index 892e578edd..733123fb32 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -17,8 +17,11 @@ __all__ = [ - "InvalidMarker", "UndefinedComparison", "UndefinedEnvironmentName", - "Marker", "default_environment", + "InvalidMarker", + "UndefinedComparison", + "UndefinedEnvironmentName", + "Marker", + "default_environment", ] @@ -42,7 +45,6 @@ class UndefinedEnvironmentName(ValueError): class Node(object): - def __init__(self, value): self.value = value @@ -57,62 +59,52 @@ def serialize(self): class Variable(Node): - def serialize(self): return str(self) class Value(Node): - def serialize(self): return '"{0}"'.format(self) class Op(Node): - def serialize(self): return str(self) VARIABLE = ( - L("implementation_version") | - L("platform_python_implementation") | - L("implementation_name") | - L("python_full_version") | - L("platform_release") | - L("platform_version") | - L("platform_machine") | - L("platform_system") | - L("python_version") | - L("sys_platform") | - L("os_name") | - L("os.name") | # PEP-345 - L("sys.platform") | # PEP-345 - L("platform.version") | # PEP-345 - L("platform.machine") | # PEP-345 - L("platform.python_implementation") | # PEP-345 - L("python_implementation") | # undocumented setuptools legacy - L("extra") + L("implementation_version") + | L("platform_python_implementation") + | L("implementation_name") + | L("python_full_version") + | L("platform_release") + | L("platform_version") + | L("platform_machine") + | L("platform_system") + | L("python_version") + | L("sys_platform") + | L("os_name") + | L("os.name") + | L("sys.platform") # PEP-345 + | L("platform.version") # PEP-345 + | L("platform.machine") # PEP-345 + | L("platform.python_implementation") # PEP-345 + | L("python_implementation") # PEP-345 + | L("extra") # undocumented setuptools legacy ) ALIASES = { - 'os.name': 'os_name', - 'sys.platform': 'sys_platform', - 'platform.version': 'platform_version', - 'platform.machine': 'platform_machine', - 'platform.python_implementation': 'platform_python_implementation', - 'python_implementation': 'platform_python_implementation' + "os.name": "os_name", + "sys.platform": "sys_platform", + "platform.version": "platform_version", + "platform.machine": "platform_machine", + "platform.python_implementation": "platform_python_implementation", + "python_implementation": "platform_python_implementation", } VARIABLE.setParseAction(lambda s, l, t: Variable(ALIASES.get(t[0], t[0]))) VERSION_CMP = ( - L("===") | - L("==") | - L(">=") | - L("<=") | - L("!=") | - L("~=") | - L(">") | - L("<") + L("===") | L("==") | L(">=") | L("<=") | L("!=") | L("~=") | L(">") | L("<") ) MARKER_OP = VERSION_CMP | L("not in") | L("in") @@ -152,8 +144,11 @@ def _format_marker(marker, first=True): # where the single item is itself it's own list. In that case we want skip # the rest of this function so that we don't get extraneous () on the # outside. - if (isinstance(marker, list) and len(marker) == 1 and - isinstance(marker[0], (list, tuple))): + if ( + isinstance(marker, list) + and len(marker) == 1 + and isinstance(marker[0], (list, tuple)) + ): return _format_marker(marker[0]) if isinstance(marker, list): @@ -239,20 +234,20 @@ def _evaluate_markers(markers, environment): def format_full_version(info): - version = '{0.major}.{0.minor}.{0.micro}'.format(info) + version = "{0.major}.{0.minor}.{0.micro}".format(info) kind = info.releaselevel - if kind != 'final': + if kind != "final": version += kind[0] + str(info.serial) return version def default_environment(): - if hasattr(sys, 'implementation'): + if hasattr(sys, "implementation"): iver = format_full_version(sys.implementation.version) implementation_name = sys.implementation.name else: - iver = '0' - implementation_name = '' + iver = "0" + implementation_name = "" return { "implementation_name": implementation_name, @@ -264,19 +259,19 @@ def default_environment(): "platform_version": platform.version(), "python_full_version": platform.python_version(), "platform_python_implementation": platform.python_implementation(), - "python_version": platform.python_version()[:3], + "python_version": ".".join(platform.python_version_tuple()[:2]), "sys_platform": sys.platform, } class Marker(object): - def __init__(self, marker): try: self._markers = _coerce_parse_result(MARKER.parseString(marker)) except ParseException as e: err_str = "Invalid marker: {0!r}, parse error at {1!r}".format( - marker, marker[e.loc:e.loc + 8]) + marker, marker[e.loc : e.loc + 8] + ) raise InvalidMarker(err_str) def __str__(self): diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 0c8c4a3852..c3424dcb64 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -38,8 +38,8 @@ class InvalidRequirement(ValueError): NAME = IDENTIFIER("name") EXTRA = IDENTIFIER -URI = Regex(r'[^ ]+')("url") -URL = (AT + URI) +URI = Regex(r"[^ ]+")("url") +URL = AT + URI EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA) EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras") @@ -48,28 +48,31 @@ class InvalidRequirement(ValueError): VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE) VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY -VERSION_MANY = Combine(VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), - joinString=",", adjacent=False)("_raw_spec") +VERSION_MANY = Combine( + VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False +)("_raw_spec") _VERSION_SPEC = Optional(((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)) -_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or '') +_VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "") VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier") VERSION_SPEC.setParseAction(lambda s, l, t: t[1]) MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") MARKER_EXPR.setParseAction( - lambda s, l, t: Marker(s[t._original_start:t._original_end]) + lambda s, l, t: Marker(s[t._original_start : t._original_end]) ) -MARKER_SEPERATOR = SEMICOLON -MARKER = MARKER_SEPERATOR + MARKER_EXPR +MARKER_SEPARATOR = SEMICOLON +MARKER = MARKER_SEPARATOR + MARKER_EXPR VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER) URL_AND_MARKER = URL + Optional(MARKER) -NAMED_REQUIREMENT = \ - NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) +NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER) REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd +# pkg_resources.extern.pyparsing isn't thread safe during initialization, so we do it eagerly, see +# issue #104 +REQUIREMENT.parseString("x[]") class Requirement(object): @@ -90,15 +93,21 @@ def __init__(self, requirement_string): req = REQUIREMENT.parseString(requirement_string) except ParseException as e: raise InvalidRequirement( - "Invalid requirement, parse error at \"{0!r}\"".format( - requirement_string[e.loc:e.loc + 8])) + 'Parse error at "{0!r}": {1}'.format( + requirement_string[e.loc : e.loc + 8], e.msg + ) + ) self.name = req.name if req.url: parsed_url = urlparse.urlparse(req.url) - if not (parsed_url.scheme and parsed_url.netloc) or ( - not parsed_url.scheme and not parsed_url.netloc): - raise InvalidRequirement("Invalid URL given") + if parsed_url.scheme == "file": + if urlparse.urlunparse(parsed_url) != req.url: + raise InvalidRequirement("Invalid URL given") + elif not (parsed_url.scheme and parsed_url.netloc) or ( + not parsed_url.scheme and not parsed_url.netloc + ): + raise InvalidRequirement("Invalid URL: {0}".format(req.url)) self.url = req.url else: self.url = None @@ -117,6 +126,8 @@ def __str__(self): if self.url: parts.append("@ {0}".format(self.url)) + if self.marker: + parts.append(" ") if self.marker: parts.append("; {0}".format(self.marker)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 7f5a76cfd6..743576a080 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -19,7 +19,6 @@ class InvalidSpecifier(ValueError): class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): - @abc.abstractmethod def __str__(self): """ @@ -84,10 +83,7 @@ def __init__(self, spec="", prereleases=None): if not match: raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) - self._spec = ( - match.group("operator").strip(), - match.group("version").strip(), - ) + self._spec = (match.group("operator").strip(), match.group("version").strip()) # Store whether or not this Specifier should accept prereleases self._prereleases = prereleases @@ -99,11 +95,7 @@ def __repr__(self): else "" ) - return "<{0}({1!r}{2})>".format( - self.__class__.__name__, - str(self), - pre, - ) + return "<{0}({1!r}{2})>".format(self.__class__.__name__, str(self), pre) def __str__(self): return "{0}{1}".format(*self._spec) @@ -194,11 +186,12 @@ def filter(self, iterable, prereleases=None): # If our version is a prerelease, and we were not set to allow # prereleases, then we'll store it for later incase nothing # else matches this specifier. - if (parsed_version.is_prerelease and not - (prereleases or self.prereleases)): + if parsed_version.is_prerelease and not ( + prereleases or self.prereleases + ): found_prereleases.append(version) # Either this is not a prerelease, or we should have been - # accepting prereleases from the begining. + # accepting prereleases from the beginning. else: yielded = True yield version @@ -213,8 +206,7 @@ def filter(self, iterable, prereleases=None): class LegacySpecifier(_IndividualSpecifier): - _regex_str = ( - r""" + _regex_str = r""" (?P(==|!=|<=|>=|<|>)) \s* (?P @@ -225,10 +217,8 @@ class LegacySpecifier(_IndividualSpecifier): # them, and a comma since it's a version separator. ) """ - ) - _regex = re.compile( - r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "==": "equal", @@ -269,13 +259,13 @@ def wrapped(self, prospective, spec): if not isinstance(prospective, Version): return False return fn(self, prospective, spec) + return wrapped class Specifier(_IndividualSpecifier): - _regex_str = ( - r""" + _regex_str = r""" (?P(~=|==|!=|<=|>=|<|>|===)) (?P (?: @@ -367,10 +357,8 @@ class Specifier(_IndividualSpecifier): ) ) """ - ) - _regex = re.compile( - r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) + _regex = re.compile(r"^\s*" + _regex_str + r"\s*$", re.VERBOSE | re.IGNORECASE) _operators = { "~=": "compatible", @@ -397,8 +385,7 @@ def _compare_compatible(self, prospective, spec): prefix = ".".join( list( itertools.takewhile( - lambda x: (not x.startswith("post") and not - x.startswith("dev")), + lambda x: (not x.startswith("post") and not x.startswith("dev")), _version_split(spec), ) )[:-1] @@ -407,8 +394,9 @@ def _compare_compatible(self, prospective, spec): # Add the prefix notation to the end of our string prefix += ".*" - return (self._get_operator(">=")(prospective, spec) and - self._get_operator("==")(prospective, prefix)) + return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( + prospective, prefix + ) @_require_version_compare def _compare_equal(self, prospective, spec): @@ -428,7 +416,7 @@ def _compare_equal(self, prospective, spec): # Shorten the prospective version to be the same length as the spec # so that we can determine if the specifier is a prefix of the # prospective version or not. - prospective = prospective[:len(spec)] + prospective = prospective[: len(spec)] # Pad out our two sides with zeros so that they both equal the same # length. @@ -503,7 +491,7 @@ def _compare_greater_than(self, prospective, spec): return False # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is techincally greater than, to match. + # in the specifier, which is technically greater than, to match. if prospective.local is not None: if Version(prospective.base_version) == Version(spec.base_version): return False @@ -567,27 +555,17 @@ def _pad_version(left, right): right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) # Get the rest of our versions - left_split.append(left[len(left_split[0]):]) - right_split.append(right[len(right_split[0]):]) + left_split.append(left[len(left_split[0]) :]) + right_split.append(right[len(right_split[0]) :]) # Insert our padding - left_split.insert( - 1, - ["0"] * max(0, len(right_split[0]) - len(left_split[0])), - ) - right_split.insert( - 1, - ["0"] * max(0, len(left_split[0]) - len(right_split[0])), - ) + left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) + right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - return ( - list(itertools.chain(*left_split)), - list(itertools.chain(*right_split)), - ) + return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split))) class SpecifierSet(BaseSpecifier): - def __init__(self, specifiers="", prereleases=None): # Split on , to break each indidivual specifier into it's own item, and # strip each item to remove leading/trailing whitespace. @@ -721,10 +699,7 @@ def contains(self, item, prereleases=None): # given version is contained within all of them. # Note: This use of all() here means that an empty set of specifiers # will always return True, this is an explicit design decision. - return all( - s.contains(item, prereleases=prereleases) - for s in self._specs - ) + return all(s.contains(item, prereleases=prereleases) for s in self._specs) def filter(self, iterable, prereleases=None): # Determine if we're forcing a prerelease or not, if we're not forcing diff --git a/pkg_resources/_vendor/packaging/tags.py b/pkg_resources/_vendor/packaging/tags.py new file mode 100644 index 0000000000..ec9942f0f6 --- /dev/null +++ b/pkg_resources/_vendor/packaging/tags.py @@ -0,0 +1,404 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import absolute_import + +import distutils.util + +try: + from importlib.machinery import EXTENSION_SUFFIXES +except ImportError: # pragma: no cover + import imp + + EXTENSION_SUFFIXES = [x[0] for x in imp.get_suffixes()] + del imp +import platform +import re +import sys +import sysconfig +import warnings + + +INTERPRETER_SHORT_NAMES = { + "python": "py", # Generic. + "cpython": "cp", + "pypy": "pp", + "ironpython": "ip", + "jython": "jy", +} + + +_32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32 + + +class Tag(object): + + __slots__ = ["_interpreter", "_abi", "_platform"] + + def __init__(self, interpreter, abi, platform): + self._interpreter = interpreter.lower() + self._abi = abi.lower() + self._platform = platform.lower() + + @property + def interpreter(self): + return self._interpreter + + @property + def abi(self): + return self._abi + + @property + def platform(self): + return self._platform + + def __eq__(self, other): + return ( + (self.platform == other.platform) + and (self.abi == other.abi) + and (self.interpreter == other.interpreter) + ) + + def __hash__(self): + return hash((self._interpreter, self._abi, self._platform)) + + def __str__(self): + return "{}-{}-{}".format(self._interpreter, self._abi, self._platform) + + def __repr__(self): + return "<{self} @ {self_id}>".format(self=self, self_id=id(self)) + + +def parse_tag(tag): + tags = set() + interpreters, abis, platforms = tag.split("-") + for interpreter in interpreters.split("."): + for abi in abis.split("."): + for platform_ in platforms.split("."): + tags.add(Tag(interpreter, abi, platform_)) + return frozenset(tags) + + +def _normalize_string(string): + return string.replace(".", "_").replace("-", "_") + + +def _cpython_interpreter(py_version): + # TODO: Is using py_version_nodot for interpreter version critical? + return "cp{major}{minor}".format(major=py_version[0], minor=py_version[1]) + + +def _cpython_abis(py_version): + abis = [] + version = "{}{}".format(*py_version[:2]) + debug = pymalloc = ucs4 = "" + with_debug = sysconfig.get_config_var("Py_DEBUG") + has_refcount = hasattr(sys, "gettotalrefcount") + # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled + # extension modules is the best option. + # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 + has_ext = "_d.pyd" in EXTENSION_SUFFIXES + if with_debug or (with_debug is None and (has_refcount or has_ext)): + debug = "d" + if py_version < (3, 8): + with_pymalloc = sysconfig.get_config_var("WITH_PYMALLOC") + if with_pymalloc or with_pymalloc is None: + pymalloc = "m" + if py_version < (3, 3): + unicode_size = sysconfig.get_config_var("Py_UNICODE_SIZE") + if unicode_size == 4 or ( + unicode_size is None and sys.maxunicode == 0x10FFFF + ): + ucs4 = "u" + elif debug: + # Debug builds can also load "normal" extension modules. + # We can also assume no UCS-4 or pymalloc requirement. + abis.append("cp{version}".format(version=version)) + abis.insert( + 0, + "cp{version}{debug}{pymalloc}{ucs4}".format( + version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4 + ), + ) + return abis + + +def _cpython_tags(py_version, interpreter, abis, platforms): + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) + for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): + yield tag + for tag in (Tag(interpreter, "none", platform_) for platform_ in platforms): + yield tag + # PEP 384 was first implemented in Python 3.2. + for minor_version in range(py_version[1] - 1, 1, -1): + for platform_ in platforms: + interpreter = "cp{major}{minor}".format( + major=py_version[0], minor=minor_version + ) + yield Tag(interpreter, "abi3", platform_) + + +def _pypy_interpreter(): + return "pp{py_major}{pypy_major}{pypy_minor}".format( + py_major=sys.version_info[0], + pypy_major=sys.pypy_version_info.major, + pypy_minor=sys.pypy_version_info.minor, + ) + + +def _generic_abi(): + abi = sysconfig.get_config_var("SOABI") + if abi: + return _normalize_string(abi) + else: + return "none" + + +def _pypy_tags(py_version, interpreter, abi, platforms): + for tag in (Tag(interpreter, abi, platform) for platform in platforms): + yield tag + for tag in (Tag(interpreter, "none", platform) for platform in platforms): + yield tag + + +def _generic_tags(interpreter, py_version, abi, platforms): + for tag in (Tag(interpreter, abi, platform) for platform in platforms): + yield tag + if abi != "none": + tags = (Tag(interpreter, "none", platform_) for platform_ in platforms) + for tag in tags: + yield tag + + +def _py_interpreter_range(py_version): + """ + Yield Python versions in descending order. + + After the latest version, the major-only version will be yielded, and then + all following versions up to 'end'. + """ + yield "py{major}{minor}".format(major=py_version[0], minor=py_version[1]) + yield "py{major}".format(major=py_version[0]) + for minor in range(py_version[1] - 1, -1, -1): + yield "py{major}{minor}".format(major=py_version[0], minor=minor) + + +def _independent_tags(interpreter, py_version, platforms): + """ + Return the sequence of tags that are consistent across implementations. + + The tags consist of: + - py*-none- + - -none-any + - py*-none-any + """ + for version in _py_interpreter_range(py_version): + for platform_ in platforms: + yield Tag(version, "none", platform_) + yield Tag(interpreter, "none", "any") + for version in _py_interpreter_range(py_version): + yield Tag(version, "none", "any") + + +def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): + if not is_32bit: + return arch + + if arch.startswith("ppc"): + return "ppc" + + return "i386" + + +def _mac_binary_formats(version, cpu_arch): + formats = [cpu_arch] + if cpu_arch == "x86_64": + if version < (10, 4): + return [] + formats.extend(["intel", "fat64", "fat32"]) + + elif cpu_arch == "i386": + if version < (10, 4): + return [] + formats.extend(["intel", "fat32", "fat"]) + + elif cpu_arch == "ppc64": + # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? + if version > (10, 5) or version < (10, 4): + return [] + formats.append("fat64") + + elif cpu_arch == "ppc": + if version > (10, 6): + return [] + formats.extend(["fat32", "fat"]) + + formats.append("universal") + return formats + + +def _mac_platforms(version=None, arch=None): + version_str, _, cpu_arch = platform.mac_ver() + if version is None: + version = tuple(map(int, version_str.split(".")[:2])) + if arch is None: + arch = _mac_arch(cpu_arch) + platforms = [] + for minor_version in range(version[1], -1, -1): + compat_version = version[0], minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + platforms.append( + "macosx_{major}_{minor}_{binary_format}".format( + major=compat_version[0], + minor=compat_version[1], + binary_format=binary_format, + ) + ) + return platforms + + +# From PEP 513. +def _is_manylinux_compatible(name, glibc_version): + # Check for presence of _manylinux module. + try: + import _manylinux + + return bool(getattr(_manylinux, name + "_compatible")) + except (ImportError, AttributeError): + # Fall through to heuristic check below. + pass + + return _have_compatible_glibc(*glibc_version) + + +def _glibc_version_string(): + # Returns glibc version string, or None if not using glibc. + import ctypes + + # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen + # manpage says, "If filename is NULL, then the returned handle is for the + # main program". This way we can let the linker do the work to figure out + # which libc our process is actually using. + process_namespace = ctypes.CDLL(None) + try: + gnu_get_libc_version = process_namespace.gnu_get_libc_version + except AttributeError: + # Symbol doesn't exist -> therefore, we are not linked to + # glibc. + return None + + # Call gnu_get_libc_version, which returns a string like "2.5" + gnu_get_libc_version.restype = ctypes.c_char_p + version_str = gnu_get_libc_version() + # py2 / py3 compatibility: + if not isinstance(version_str, str): + version_str = version_str.decode("ascii") + + return version_str + + +# Separated out from have_compatible_glibc for easier unit testing. +def _check_glibc_version(version_str, required_major, minimum_minor): + # Parse string and check against requested version. + # + # We use a regexp instead of str.split because we want to discard any + # random junk that might come after the minor version -- this might happen + # in patched/forked versions of glibc (e.g. Linaro's version of glibc + # uses version strings like "2.20-2014.11"). See gh-3588. + m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) + if not m: + warnings.warn( + "Expected glibc version with 2 components major.minor," + " got: %s" % version_str, + RuntimeWarning, + ) + return False + return ( + int(m.group("major")) == required_major + and int(m.group("minor")) >= minimum_minor + ) + + +def _have_compatible_glibc(required_major, minimum_minor): + version_str = _glibc_version_string() + if version_str is None: + return False + return _check_glibc_version(version_str, required_major, minimum_minor) + + +def _linux_platforms(is_32bit=_32_BIT_INTERPRETER): + linux = _normalize_string(distutils.util.get_platform()) + if linux == "linux_x86_64" and is_32bit: + linux = "linux_i686" + manylinux_support = ( + ("manylinux2014", (2, 17)), # CentOS 7 w/ glibc 2.17 (PEP 599) + ("manylinux2010", (2, 12)), # CentOS 6 w/ glibc 2.12 (PEP 571) + ("manylinux1", (2, 5)), # CentOS 5 w/ glibc 2.5 (PEP 513) + ) + manylinux_support_iter = iter(manylinux_support) + for name, glibc_version in manylinux_support_iter: + if _is_manylinux_compatible(name, glibc_version): + platforms = [linux.replace("linux", name)] + break + else: + platforms = [] + # Support for a later manylinux implies support for an earlier version. + platforms += [linux.replace("linux", name) for name, _ in manylinux_support_iter] + platforms.append(linux) + return platforms + + +def _generic_platforms(): + platform = _normalize_string(distutils.util.get_platform()) + return [platform] + + +def _interpreter_name(): + name = platform.python_implementation().lower() + return INTERPRETER_SHORT_NAMES.get(name) or name + + +def _generic_interpreter(name, py_version): + version = sysconfig.get_config_var("py_version_nodot") + if not version: + version = "".join(map(str, py_version[:2])) + return "{name}{version}".format(name=name, version=version) + + +def sys_tags(): + """ + Returns the sequence of tag triples for the running interpreter. + + The order of the sequence corresponds to priority order for the + interpreter, from most to least important. + """ + py_version = sys.version_info[:2] + interpreter_name = _interpreter_name() + if platform.system() == "Darwin": + platforms = _mac_platforms() + elif platform.system() == "Linux": + platforms = _linux_platforms() + else: + platforms = _generic_platforms() + + if interpreter_name == "cp": + interpreter = _cpython_interpreter(py_version) + abis = _cpython_abis(py_version) + for tag in _cpython_tags(py_version, interpreter, abis, platforms): + yield tag + elif interpreter_name == "pp": + interpreter = _pypy_interpreter() + abi = _generic_abi() + for tag in _pypy_tags(py_version, interpreter, abi, platforms): + yield tag + else: + interpreter = _generic_interpreter(interpreter_name, py_version) + abi = _generic_abi() + for tag in _generic_tags(interpreter, py_version, abi, platforms): + yield tag + for tag in _independent_tags(interpreter, py_version, platforms): + yield tag diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py index 942387cef5..8841878693 100644 --- a/pkg_resources/_vendor/packaging/utils.py +++ b/pkg_resources/_vendor/packaging/utils.py @@ -5,6 +5,8 @@ import re +from .version import InvalidVersion, Version + _canonicalize_regex = re.compile(r"[-_.]+") @@ -12,3 +14,44 @@ def canonicalize_name(name): # This is taken from PEP 503. return _canonicalize_regex.sub("-", name).lower() + + +def canonicalize_version(version): + """ + This is very similar to Version.__str__, but has one subtle differences + with the way it handles the release segment. + """ + + try: + version = Version(version) + except InvalidVersion: + # Legacy versions cannot be normalized + return version + + parts = [] + + # Epoch + if version.epoch != 0: + parts.append("{0}!".format(version.epoch)) + + # Release segment + # NB: This strips trailing '.0's to normalize + parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in version.release))) + + # Pre-release + if version.pre is not None: + parts.append("".join(str(x) for x in version.pre)) + + # Post-release + if version.post is not None: + parts.append(".post{0}".format(version.post)) + + # Development release + if version.dev is not None: + parts.append(".dev{0}".format(version.dev)) + + # Local version segment + if version.local is not None: + parts.append("+{0}".format(version.local)) + + return "".join(parts) diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index 83b5ee8c5e..95157a1f78 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -10,14 +10,11 @@ from ._structures import Infinity -__all__ = [ - "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN" -] +__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] _Version = collections.namedtuple( - "_Version", - ["epoch", "release", "dev", "pre", "post", "local"], + "_Version", ["epoch", "release", "dev", "pre", "post", "local"] ) @@ -40,7 +37,6 @@ class InvalidVersion(ValueError): class _BaseVersion(object): - def __hash__(self): return hash(self._key) @@ -70,7 +66,6 @@ def _compare(self, other, method): class LegacyVersion(_BaseVersion): - def __init__(self, version): self._version = str(version) self._key = _legacy_cmpkey(self._version) @@ -89,6 +84,26 @@ def public(self): def base_version(self): return self._version + @property + def epoch(self): + return -1 + + @property + def release(self): + return None + + @property + def pre(self): + return None + + @property + def post(self): + return None + + @property + def dev(self): + return None + @property def local(self): return None @@ -101,13 +116,19 @@ def is_prerelease(self): def is_postrelease(self): return False + @property + def is_devrelease(self): + return False -_legacy_version_component_re = re.compile( - r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, -) + +_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE) _legacy_version_replacement_map = { - "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", + "pre": "c", + "preview": "c", + "-": "final-", + "rc": "c", + "dev": "@", } @@ -154,6 +175,7 @@ def _legacy_cmpkey(version): return epoch, parts + # Deliberately not anchored to the start and end of the string, to make it # easier for 3rd party code to reuse VERSION_PATTERN = r""" @@ -190,10 +212,7 @@ def _legacy_cmpkey(version): class Version(_BaseVersion): - _regex = re.compile( - r"^\s*" + VERSION_PATTERN + r"\s*$", - re.VERBOSE | re.IGNORECASE, - ) + _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) def __init__(self, version): # Validate the version and parse it into pieces @@ -205,18 +224,11 @@ def __init__(self, version): self._version = _Version( epoch=int(match.group("epoch")) if match.group("epoch") else 0, release=tuple(int(i) for i in match.group("release").split(".")), - pre=_parse_letter_version( - match.group("pre_l"), - match.group("pre_n"), - ), + pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")), post=_parse_letter_version( - match.group("post_l"), - match.group("post_n1") or match.group("post_n2"), - ), - dev=_parse_letter_version( - match.group("dev_l"), - match.group("dev_n"), + match.group("post_l"), match.group("post_n1") or match.group("post_n2") ), + dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")), local=_parse_local_version(match.group("local")), ) @@ -237,32 +249,57 @@ def __str__(self): parts = [] # Epoch - if self._version.epoch != 0: - parts.append("{0}!".format(self._version.epoch)) + if self.epoch != 0: + parts.append("{0}!".format(self.epoch)) # Release segment - parts.append(".".join(str(x) for x in self._version.release)) + parts.append(".".join(str(x) for x in self.release)) # Pre-release - if self._version.pre is not None: - parts.append("".join(str(x) for x in self._version.pre)) + if self.pre is not None: + parts.append("".join(str(x) for x in self.pre)) # Post-release - if self._version.post is not None: - parts.append(".post{0}".format(self._version.post[1])) + if self.post is not None: + parts.append(".post{0}".format(self.post)) # Development release - if self._version.dev is not None: - parts.append(".dev{0}".format(self._version.dev[1])) + if self.dev is not None: + parts.append(".dev{0}".format(self.dev)) # Local version segment - if self._version.local is not None: - parts.append( - "+{0}".format(".".join(str(x) for x in self._version.local)) - ) + if self.local is not None: + parts.append("+{0}".format(self.local)) return "".join(parts) + @property + def epoch(self): + return self._version.epoch + + @property + def release(self): + return self._version.release + + @property + def pre(self): + return self._version.pre + + @property + def post(self): + return self._version.post[1] if self._version.post else None + + @property + def dev(self): + return self._version.dev[1] if self._version.dev else None + + @property + def local(self): + if self._version.local: + return ".".join(str(x) for x in self._version.local) + else: + return None + @property def public(self): return str(self).split("+", 1)[0] @@ -272,27 +309,25 @@ def base_version(self): parts = [] # Epoch - if self._version.epoch != 0: - parts.append("{0}!".format(self._version.epoch)) + if self.epoch != 0: + parts.append("{0}!".format(self.epoch)) # Release segment - parts.append(".".join(str(x) for x in self._version.release)) + parts.append(".".join(str(x) for x in self.release)) return "".join(parts) - @property - def local(self): - version_string = str(self) - if "+" in version_string: - return version_string.split("+", 1)[1] - @property def is_prerelease(self): - return bool(self._version.dev or self._version.pre) + return self.dev is not None or self.pre is not None @property def is_postrelease(self): - return bool(self._version.post) + return self.post is not None + + @property + def is_devrelease(self): + return self.dev is not None def _parse_letter_version(letter, number): @@ -326,7 +361,7 @@ def _parse_letter_version(letter, number): return letter, int(number) -_local_version_seperators = re.compile(r"[\._-]") +_local_version_separators = re.compile(r"[\._-]") def _parse_local_version(local): @@ -336,7 +371,7 @@ def _parse_local_version(local): if local is not None: return tuple( part.lower() if not part.isdigit() else int(part) - for part in _local_version_seperators.split(local) + for part in _local_version_separators.split(local) ) @@ -347,12 +382,7 @@ def _cmpkey(epoch, release, pre, post, dev, local): # re-reverse it back into the correct order and make it a tuple and use # that for our sorting key. release = tuple( - reversed(list( - itertools.dropwhile( - lambda x: x == 0, - reversed(release), - ) - )) + reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release)))) ) # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0. @@ -385,9 +415,6 @@ def _cmpkey(epoch, release, pre, post, dev, local): # - Numeric segments sort numerically # - Shorter versions sort before longer versions when the prefixes # match exactly - local = tuple( - (i, "") if isinstance(i, int) else (-Infinity, i) - for i in local - ) + local = tuple((i, "") if isinstance(i, int) else (-Infinity, i) for i in local) return epoch, release, pre, post, dev, local diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 7f4f40879b..f581a62349 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ -packaging==16.8 +packaging==19.2 pyparsing==2.2.1 six==1.10.0 appdirs==1.4.3 From d24eb7fd34594be65ab6bf1b08ac6ffffa4a16f2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 14:35:52 -0400 Subject: [PATCH 7996/8469] Update changelog. --- changelog.d/2180.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2180.change.rst diff --git a/changelog.d/2180.change.rst b/changelog.d/2180.change.rst new file mode 100644 index 0000000000..0e660cd931 --- /dev/null +++ b/changelog.d/2180.change.rst @@ -0,0 +1 @@ +Update vendored packaging in pkg_resources to 19.2. From e7e5817e442b01cb199bfc75c7098fb198fdc3ba Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 15:35:32 -0400 Subject: [PATCH 7997/8469] =?UTF-8?q?Bump=20version:=2048.0.0=20=E2=86=92?= =?UTF-8?q?=2049.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2137.change.rst | 1 - changelog.d/2165.breaking.rst | 1 - changelog.d/2180.change.rst | 1 - changelog.d/2199.misc.rst | 1 - setup.cfg | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/2137.change.rst delete mode 100644 changelog.d/2165.breaking.rst delete mode 100644 changelog.d/2180.change.rst delete mode 100644 changelog.d/2199.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index bee22c9e0e..05ff5f1881 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 48.0.0 +current_version = 49.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index d653d88920..bd67931d71 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v49.0.0 +------- + +* #2165: Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165. +* #2137: Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead. +* #2180: Update vendored packaging in pkg_resources to 19.2. +* #2199: Fix exception causes all over the codebase by using ``raise new_exception from old_exception`` + + v48.0.0 ------- diff --git a/changelog.d/2137.change.rst b/changelog.d/2137.change.rst deleted file mode 100644 index fb5f507544..0000000000 --- a/changelog.d/2137.change.rst +++ /dev/null @@ -1 +0,0 @@ -Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead. diff --git a/changelog.d/2165.breaking.rst b/changelog.d/2165.breaking.rst deleted file mode 100644 index a9b598b937..0000000000 --- a/changelog.d/2165.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165. diff --git a/changelog.d/2180.change.rst b/changelog.d/2180.change.rst deleted file mode 100644 index 0e660cd931..0000000000 --- a/changelog.d/2180.change.rst +++ /dev/null @@ -1 +0,0 @@ -Update vendored packaging in pkg_resources to 19.2. diff --git a/changelog.d/2199.misc.rst b/changelog.d/2199.misc.rst deleted file mode 100644 index f795256bf0..0000000000 --- a/changelog.d/2199.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix exception causes all over the codebase by using ``raise new_exception from old_exception`` \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 05638dbc17..d73241861e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 48.0.0 +version = 49.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 58cc03759ab225bfa9767cd04caf69ca014cd353 Mon Sep 17 00:00:00 2001 From: cajhne Date: Fri, 3 Jul 2020 21:30:43 +0100 Subject: [PATCH 7998/8469] Add logo resources --- docs/logo/README.md | 10 + docs/logo/josefinsans/.uuid | 1 + docs/logo/josefinsans/DESCRIPTION.en_us.html | 9 + docs/logo/josefinsans/JosefinSans-Bold.ttf | Bin 0 -> 86300 bytes .../josefinsans/JosefinSans-BoldItalic.ttf | Bin 0 -> 83100 bytes docs/logo/josefinsans/JosefinSans-Italic.ttf | Bin 0 -> 84916 bytes docs/logo/josefinsans/JosefinSans-Light.ttf | Bin 0 -> 87320 bytes .../josefinsans/JosefinSans-LightItalic.ttf | Bin 0 -> 85684 bytes docs/logo/josefinsans/JosefinSans-Regular.ttf | Bin 0 -> 87260 bytes .../logo/josefinsans/JosefinSans-SemiBold.ttf | Bin 0 -> 87880 bytes .../JosefinSans-SemiBoldItalic.ttf | Bin 0 -> 84824 bytes docs/logo/josefinsans/JosefinSans-Thin.ttf | Bin 0 -> 88088 bytes .../josefinsans/JosefinSans-ThinItalic.ttf | Bin 0 -> 85420 bytes docs/logo/josefinsans/METADATA.pb | 99 ++++++++ docs/logo/josefinsans/OFL.txt | 93 +++++++ docs/logo/setup_tools_logo_colour.svg | 227 ++++++++++++++++++ docs/logo/setup_tools_logo_colour_1000px.png | Bin 0 -> 31520 bytes .../setup_tools_logo_colour_banner_1line.svg | 223 +++++++++++++++++ ..._tools_logo_colour_banner_1line_1000px.png | Bin 0 -> 24183 bytes .../setup_tools_logo_colour_banner_2lines.svg | 224 +++++++++++++++++ ...tools_logo_colour_banner_2lines_1000px.png | Bin 0 -> 38105 bytes docs/logo/setup_tools_logo_symbol_colour.svg | 203 ++++++++++++++++ .../setup_tools_logo_symbol_colour_1000px.png | Bin 0 -> 44239 bytes docs/logo/setup_tools_logotype_1line.svg | 169 +++++++++++++ 24 files changed, 1258 insertions(+) create mode 100644 docs/logo/README.md create mode 100644 docs/logo/josefinsans/.uuid create mode 100644 docs/logo/josefinsans/DESCRIPTION.en_us.html create mode 100644 docs/logo/josefinsans/JosefinSans-Bold.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-BoldItalic.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-Italic.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-Light.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-LightItalic.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-Regular.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-SemiBold.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-Thin.ttf create mode 100644 docs/logo/josefinsans/JosefinSans-ThinItalic.ttf create mode 100644 docs/logo/josefinsans/METADATA.pb create mode 100644 docs/logo/josefinsans/OFL.txt create mode 100644 docs/logo/setup_tools_logo_colour.svg create mode 100644 docs/logo/setup_tools_logo_colour_1000px.png create mode 100644 docs/logo/setup_tools_logo_colour_banner_1line.svg create mode 100644 docs/logo/setup_tools_logo_colour_banner_1line_1000px.png create mode 100644 docs/logo/setup_tools_logo_colour_banner_2lines.svg create mode 100644 docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png create mode 100644 docs/logo/setup_tools_logo_symbol_colour.svg create mode 100644 docs/logo/setup_tools_logo_symbol_colour_1000px.png create mode 100644 docs/logo/setup_tools_logotype_1line.svg diff --git a/docs/logo/README.md b/docs/logo/README.md new file mode 100644 index 0000000000..88e6647c7c --- /dev/null +++ b/docs/logo/README.md @@ -0,0 +1,10 @@ +![](setup_tools_logo_colour.svg) +### Design: + +SetupTools logo designed in 2020 by [C.Rogers](crogersmedia.com) for the SetupTools project using the Free Open Source graphics editor [Inkscape](inkscape.org). + +### Copyright: +Logo is (c) the SetupTools developers. + +### Font: +The font used is the Open Font "Josefin Sans", which is available for free under the Open Font License (OFL). diff --git a/docs/logo/josefinsans/.uuid b/docs/logo/josefinsans/.uuid new file mode 100644 index 0000000000..d7e92c770e --- /dev/null +++ b/docs/logo/josefinsans/.uuid @@ -0,0 +1 @@ +922c129c-9f4c-4831-b632-c7f43be6feb0 \ No newline at end of file diff --git a/docs/logo/josefinsans/DESCRIPTION.en_us.html b/docs/logo/josefinsans/DESCRIPTION.en_us.html new file mode 100644 index 0000000000..9364b24940 --- /dev/null +++ b/docs/logo/josefinsans/DESCRIPTION.en_us.html @@ -0,0 +1,9 @@ +

    +The idea of this typeface is to be geometric, elegant, with a vintage feeling, for use at larger sizes. +It is inspired by geometric sans serif designs from the 1920s. +The x-height is half way from baseline to cap height, an unusual proportion. +

    +

    +There is a sister family, Josefin Slab +

    + diff --git a/docs/logo/josefinsans/JosefinSans-Bold.ttf b/docs/logo/josefinsans/JosefinSans-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..12a7ad087e0f26e2d74bc9e43ffc3edc5adba81d GIT binary patch literal 86300 zcmeEv34ByVws%$CPIqS^Nq4%lCv-adLV$!2NFX#}H9-szc92Cj*+fKC1~)C@wz zbsSejL}UR_$Z;-w+eZx_F|z;u>JJfBhTm_EYPx7b z!-x0x6hh(Wh~`lfCe}w!{c4sFqnd??X}M@Z?~28>+d(_-1PEqdvTV+Z@vk%u6=J*( z*|l75VoMaV{%$;9v|z=;WrH&}trc<@e)d?laLyGgfY9^J__i-xdd-3f2XDc{ zX|D{)-S1^_BH%{62x-d5e~XuS&Xn$HY1!Qrz4yx@dmj>-i`1PiCpCe@0CLRjK|62dEKBK-h~&9@rV`UFS^hp);81Ajm_g5Jz}eoUW!=ZHgE<0B^$UVdVq)eJ1inz zq#AgXNDyfTZiO_Y8@Nq4M23Oeg;Qi2c(h0oSt5JM{FTeaJ`N9X_%eq_IDDJK_c{ES z!_PSE;4rvs&dMdy%3&gh=^W;9SkB=94(mA_!{H8aV;c5=oakz=YdpX?B z;a(08aCn%*x4~QLO4J7bRo@zN(zx~h&tVo3C9J|G>?rsDJv>^t(B>tgLez+Q(ICc) zX{f6m+#Ac^7I7-cnY=jp7}s7Vf2@C}@6*3C-xpReS`JtztYEer*d(kFZdtom|6O}j z$ib~lYlVz@kZUvEFk2}3SSTQOgieZB`FLoL`~bgBhT7z*&`J4e=%@?;{~O{y3w6jZ zLx+?*bW$aUkQ=CvAnXVoVtkKCKu#x-Qvgre9;b+*m6`)#{yZMIizZ`)4UzOV~>ygk!i zVjo~1X>YdAwXd*WXK%6JYu{ntXFp_r!+yg4nf?3db+OOH9*MiVhqFgfkBayy@eATN z$8V3{6@M%~kl;)xN~lj*l(0JSo5Y~Q?r=K#IHoz)I_`Ho=Q!XvQIF!~gsO-~M+wks~a~B?@2#*Z_7wG#~~L3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C7v~T7~&h) zKg#UI7M=C{j)fzs*b2&V*<8Z9eR)i}XLZJ;+hfvU-{g4D_P8mjUP=;%orV*-lCGBe zNI%Z8K34i^x*?!tDnmt2napXtsy!dklGZAsFb{#0Fe14ZYGr?P{sOF=M|BtQonW4Hul#%O2+>SmBFh z+Q2IR@+s}NFr2xxNSDF6E$Ir19rj`q?iMW^e23opisXc*9k}_c5;uT00KNubGWfbY zG*wFnK(*{LrwP#>a~RxV4uiYQVQ^0#VK=-9^bH_Wp>N6~e4NH@K9Ft;m}hd^eda0j z3iA~D7V{K(mFM(8`!>(X;5$4ggOKNB5HY6(u+JO@UFI<8F^9o{(#r*Up!8z&U8NVJ z?M-`8Jy9&CCVRAdZqJtco@fx%7%f9tiSEy{L%aq4s!ak>dn}ga6dGh7t;6+ zBj88X)W!TlKAqRK4Pz~LKBsC^?#I)|`QywnKBAw5bjJPI*jE3lo;Disiuq(0mjO@w zINfW+t6ckQ{$1Rjw*91wb74?$l@xrmVXWkqa_Q-{r{=%kqs#|595;@#J$ykH4=&-W HQ2hM|R!sTd literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-BoldItalic.ttf b/docs/logo/josefinsans/JosefinSans-BoldItalic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4a0fc91d04d0c715b16cb2e3da6fbfd50967aaf9 GIT binary patch literal 83100 zcmeFacYKsp_CJ2_eWs*mN-~q4$xJc{Nhl$Z5C|}Y9(o9bASEbG5JAAYimtuHLR2gt z*WT8(V2P`UimvOr%G%bpt_9IGuFl$4$Fef>eV_9@^JFG~yZe3p{`tJVzX|8gnfu&& z?m6e4d+xmtLJA>V2rR-kY5w%7_$7s$bOpXsrcRnXW$c!5cOt45zrUV3ch3A#<6K!n zD4!4^|J3;lT8@caY!#wq64IPIXa3OP>+H8J7GmOFr0+Uv!-`Gq56^i~h)Kwwa>-FA zZ1v@*+be`@$iwrst2eFLFt+HDQ}O!@Au>0tS+Qjk;vM+yz<0`;V@_VZ{^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Fn5Tz>qo#HcRx4Q z)I-r(qZ!YekGJqL;ISWPyUlo!slN}ukB`2sJ?`LI7$SI;6nwT~%ok=0*|DW3=F<-; V_X&>U=0U!T?~ylIOJulV{09+UVPXIP literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-Italic.ttf b/docs/logo/josefinsans/JosefinSans-Italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1cbe036e38b54c11e1ccae7995995b5360d785c4 GIT binary patch literal 84916 zcmeFad3;nw_BUKrx6|F()7dwY&b|_|KmuWFLLiU;LI_JR30qi1HWAlR#0@u8T!(QS zao1LVn`91%<&*yzQoa)ncPi?18 zojP@@>LR2NA|8QFxErUAZ^ADrWXnVNb~ZJR89V&+5%(ji9KU~PntamK#~nGR2%+3U zGz@E+I;~;pp{v7$XzT#Zx|603s9wC|&PXA~d=C0K^OwzC*|znhH-#A6i0rPJf97g; z%ANL8gdARp=ZhDvT(oR><~8Tx_eLS2mo1um`bxyd;de2xh zZd|-zZg=G0CwPTSO2zZq#fY%4k2o2>C*ybi;$^GPwwDhXkKe0>2)}#jiurTDnw7p* z$ZXKtb}gHG_Db!~F^h!E`v&yx<#U%UxTEc%NFnp1gm9d?a>ePZAAN4WHb5|N1QFO;fK6^I?6szEnU4MJF_8W2BP zjYfQ<8UuW+8VkHhHRI_7$Xs^nvQtGNo&?frz%)){6Jf$G9LOPDB#KN?Dyl`jXb{b!Rm=jF6J<@}Z<`be z^(il=j^K1Mwb}U2IM?{@*DdU*mK;1z*inoeViR^$M%Mpm{2rPvqIZPQBt>9 zB36ns1!PU$uOAjl-mClMefqZ|2EQMY59){I!+^br{Y2j>Khr;uU+DYgzx93cYyAEO z@!#q{OP~IMO4PqqN&3Gyr?(Lv)IVVS4GzB*vB>*d<9jo5-3y#b z_!Qrt>3hu*_95rJ$Q6A&^arl_GV!@AlmlghoGiQKQhBbtT;442mXFCD@=du%?w5y^ zT_vhqRjEdx&t|E`>P&S+OV$Q!W3@JIo_2{%*-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^^@# zie7KDww1Ik>&O=RoZiW1B~^bSV!Lf_OOz>>%$zFT=2n*#yUh=EJzjDtzxE(iV|++p z7cjHo?VZyUImH-N7a;DHtC)0NP(_O4UJwIbE+H@6+a`c$$oh66n2OmLp#VJr+S60f+0xJ(8fu0F6ha5crSl8fDP!u@EfJwQXTRg6>1w7B~PtA)fD$ zL=TdPWfkmM8kD?vq)n5`C`$`=rkJ#j;Mz^nb5)5>JFXDs2ugDxb(RUriT6id+1B2I zyb19_do*c%?XEJdCGJ(Z?c$@zA4#%eLG1C03o%?tts|vmD{1V*ynS&8buqTEgF3T= z+HM=}@7@+UM@)@|8QP871GnV#W;A5IbsrEo~-D@+*Sb> z-?p`mI~34j9%lZagNH-&Ku!QL2s!E8!pXfr7J$f_Q^ez=W|4RZIZZr-oFN`UmYmzj zhB;s_12ZIc*13&aYgAVRrs_(>XHeZa;*;1b#3!*25ue0fr7=CQy+&gaa-PN{q)cNH z5)e-T$TIN|QXw8fs>DM`P0Hm0yCCHvY(>gN*hMK9VRb1NVV9&_gk6?$5w_p|M3!WKA5|!^e@vmo{&BQCqWXJFp~UbBg%ZQ} zfcJ$?f8Q%hvcKSxu}7K^%{V~Hob@UAG(cQX9xp5dOZ9#tA+ht0=LS?Y7& z9k|w7^Rbl+t&@=un#SiW`8xOoac18x>uUDbT+5S6~z^A;W@o4HxRS{N*J meC0c1>>wTq?ix6J$9V6PBJvqrj`O#>t9Us#Pf{Yn8T%h4lDd-s literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-Light.ttf b/docs/logo/josefinsans/JosefinSans-Light.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7fe3f7beb77e04bf5f4dc09e7a3a9ea4fedf5ffb GIT binary patch literal 87320 zcmeFa33yaR);C^Nx6|DTA*7RZXHPnNNJ3V!5Vi)wmPFRDgnbp1RYgTy#|2Rl5fM=t z7ew4LitD%y21ZfQVHBN=yNHO6DB~^(r0@4T=ia{Q1azEv-~a!6zV~?>PW9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w_2=V9}1zGG3-SP zC03}kqW8j5O7cc){1PB#uqTiXrab_jAhrT482rZA6VKi+{({vwrKG(Ijf_%RY=gub z5IJA!TZ#2PMv3HKEWpuUPAS&K z_)x{@+36LR@Mgd-gM4-GF zwB{Iohl-z>hMp1azy4_Q1^JTPB|lR=RJ7b9-;i(0r)4Yl4sT=U@CtfoJ6jPRfK~4y z*b@E#Yr^yLWei@s)a9QQy>X9h3E9v?KCDiMW8K<_{oQmiA0xI5ySVk(z1@Np{5GuL zpF=Bm!MCtaJ|q9CQst|-4YiN$0I=nd4FDDZx6HyGB_BJKGW6=0&P=d%bqo~y7! zxDGpmo8{{&LHo2`TVPC1Quu zAGXVZav1g=XUX&BIr3bUq~ft7|3SIsb1FujsbZB!#i=oBg7jkzeT{M`xS|x^-KVf_ zP~obZ+@_o?&q90-i^Pkv8E@C?F27JV6((Ec-{nqu0GdCEc9PgTy(Ra{_wg3K59LR= zmFJQ-h!^2K|6IN!--WI8PL&L<`dGdP-58D;GXyLAYOLf(VQ(=Wmh7|9!i&Ydkgz7{ zQ4P46*QmzgcHUGqUQNcE{Kg5JeI;l%iOZl(J;1tSmvD)^MBV^v?C&AlJLK!A!{@Lx ze6JE!FOp^CaW>|om({E4L(QgzYdy3mEm6zVa-|%jCoMfKJKdh%BRwkJot}`MlAfPF zB7Ii+{H(pl6?RDU=?)$#7I&HTx(gccMbzssY#`sm3!MjhM4(=KP_K71q1jO{7wVOv zWp}FAWvJI(-e_-}H_7Yedi62ub&q#D>h+NKQPk@h@AEN67;z&%spr@N4xI;nI`HWM+sClxfBY%nA0L1C@$(yH8hFB}-r6`>n_)b`FIe=oY1--9(m+h-Z*3l)FSeyXqoml< zgP++F=ojAl2wR{ni6{ae8%iNCJ~mj137~oZAJ!A{fNUlymxmz7iOQ`eC=X<~McL)w zAn}bVUTHKRL+&G>1)f#oAvbqJmYf@TumLO0byI}L

    -The idea of this typeface is to be geometric, elegant, with a vintage feeling, for use at larger sizes. -It is inspired by geometric sans serif designs from the 1920s. -The x-height is half way from baseline to cap height, an unusual proportion. -

    -

    -There is a sister family, Josefin Slab -

    - diff --git a/docs/logo/josefinsans/JosefinSans-Bold.ttf b/docs/logo/josefinsans/JosefinSans-Bold.ttf deleted file mode 100644 index 12a7ad087e0f26e2d74bc9e43ffc3edc5adba81d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86300 zcmeEv34ByVws%$CPIqS^Nq4%lCv-adLV$!2NFX#}H9-szc92Cj*+fKC1~)C@wz zbsSejL}UR_$Z;-w+eZx_F|z;u>JJfBhTm_EYPx7b z!-x0x6hh(Wh~`lfCe}w!{c4sFqnd??X}M@Z?~28>+d(_-1PEqdvTV+Z@vk%u6=J*( z*|l75VoMaV{%$;9v|z=;WrH&}trc<@e)d?laLyGgfY9^J__i-xdd-3f2XDc{ zX|D{)-S1^_BH%{62x-d5e~XuS&Xn$HY1!Qrz4yx@dmj>-i`1PiCpCe@0CLRjK|62dEKBK-h~&9@rV`UFS^hp);81Ajm_g5Jz}eoUW!=ZHgE<0B^$UVdVq)eJ1inz zq#AgXNDyfTZiO_Y8@Nq4M23Oeg;Qi2c(h0oSt5JM{FTeaJ`N9X_%eq_IDDJK_c{ES z!_PSE;4rvs&dMdy%3&gh=^W;9SkB=94(mA_!{H8aV;c5=oakz=YdpX?B z;a(08aCn%*x4~QLO4J7bRo@zN(zx~h&tVo3C9J|G>?rsDJv>^t(B>tgLez+Q(ICc) zX{f6m+#Ac^7I7-cnY=jp7}s7Vf2@C}@6*3C-xpReS`JtztYEer*d(kFZdtom|6O}j z$ib~lYlVz@kZUvEFk2}3SSTQOgieZB`FLoL`~bgBhT7z*&`J4e=%@?;{~O{y3w6jZ zLx+?*bW$aUkQ=CvAnXVoVtkKCKu#x-Qvgre9;b+*m6`)#{yZMIizZ`)4UzOV~>ygk!i zVjo~1X>YdAwXd*WXK%6JYu{ntXFp_r!+yg4nf?3db+OOH9*MiVhqFgfkBayy@eATN z$8V3{6@M%~kl;)x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qo|L1wHIyl1w5Q3q z>zBnAj@_(%N;hKAQ79-^MC}$tqtgT(#7}2lXb++VeI2?!oK1Ou5U!BVC7v~T7~&h) zKg#UI7M=C{j)fzs*b2&V*<8Z9eR)i}XLZJ;+hfvU-{g4D_P8mjUP=;%orV*-lCGBe zNI%Z8K34i^x*?!tDnmt2napXtsy!dklGZAsFb{#0Fe14ZYGr?P{sOF=M|BtQonW4Hul#%O2+>SmBFh z+Q2IR@+s}NFr2xxNSDF6E$Ir19rj`q?iMW^e23opisXc*9k}_c5;uT00KNubGWfbY zG*wFnK(*{LrwP#>a~RxV4uiYQVQ^0#VK=-9^bH_Wp>N6~e4NH@K9Ft;m}hd^eda0j z3iA~D7V{K(mFM(8`!>(X;5$4ggOKNB5HY6(u+JO@UFI<8F^9o{(#r*Up!8z&U8NVJ z?M-`8Jy9&CCVRAdZqJtco@fx%7%f9tiSEy{L%aq4s!ak>dn}ga6dGh7t;6+ zBj88X)W!TlKAqRK4Pz~LKBsC^?#I)|`QywnKBAw5bjJPI*jE3lo;Disiuq(0mjO@w zINfW+t6ckQ{$1Rjw*91wb74?$l@xrmVXWkqa_Q-{r{=%kqs#|595;@#J$ykH4=&-W HQ2hM|R!sTd diff --git a/docs/logo/josefinsans/JosefinSans-BoldItalic.ttf b/docs/logo/josefinsans/JosefinSans-BoldItalic.ttf deleted file mode 100644 index 4a0fc91d04d0c715b16cb2e3da6fbfd50967aaf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83100 zcmeFacYKsp_CJ2_eWs*mN-~q4$xJc{Nhl$Z5C|}Y9(o9bASEbG5JAAYimtuHLR2gt z*WT8(V2P`UimvOr%G%bpt_9IGuFl$4$Fef>eV_9@^JFG~yZe3p{`tJVzX|8gnfu&& z?m6e4d+xmtLJA>V2rR-kY5w%7_$7s$bOpXsrcRnXW$c!5cOt45zrUV3ch3A#<6K!n zD4!4^|J3;lT8@caY!#wq64IPIXa3OP>+H8J7GmOFr0+Uv!-`Gq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FeeRCC9kKCo5iL{bL)~kLF)+ z$my3=Z^g!t`>El)fd9r~_*pe`9-rRL4r^+~SSp+?C~DOGeC%-eFn5Tz>qo#HcRx4Q z)I-r(qZ!YekGJqL;ISWPyUlo!slN}ukB`2sJ?`LI7$SI;6nwT~%ok=0*|DW3=F<-; V_X&>U=0U!T?~ylIOJulV{09+UVPXIP diff --git a/docs/logo/josefinsans/JosefinSans-Italic.ttf b/docs/logo/josefinsans/JosefinSans-Italic.ttf deleted file mode 100644 index 1cbe036e38b54c11e1ccae7995995b5360d785c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84916 zcmeFad3;nw_BUKrx6|F()7dwY&b|_|KmuWFLLiU;LI_JR30qi1HWAlR#0@u8T!(QS zao1LVn`91%<&*yzQoa)ncPi?18 zojP@@>LR2NA|8QFxErUAZ^ADrWXnVNb~ZJR89V&+5%(ji9KU~PntamK#~nGR2%+3U zGz@E+I;~;pp{v7$XzT#Zx|603s9wC|&PXA~d=C0K^OwzC*|znhH-#A6i0rPJf97g; z%ANL8gdARp=ZhDvT(oR><~8Tx_eLS2mo1um`bxyd;de2xh zZd|-zZg=G0CwPTSO2zZq#fY%4k2o2>C*ybi;$^GPwwDhXkKe0>2)}#jiurTDnw7p* z$ZXKtb}gHG_Db!~F^h!E`v&yx<#U%UxTEc%NFnp1gm9d?a>ePZAAN4WHb5|N1QFO;fK6^I?6szEnU4MJF_8W2BP zjYfQ<8UuW+8VkHhHRI_7$Xs^nvQtGNo&?frz%)){6Jf$G9LOPDB#KN?Dyl`jXb{b!Rm=jF6J<@}Z<`be z^(il=j^K1Mwb}U2IM?{@*DdU*mK;1z*inoeViR^$M%Mpm{2rPvqIZPQBt>9 zB36ns1!PU$uOAjl-mClMefqZ|2EQMY59){I!+^br{Y2j>Khr;uU+DYgzx93cYyAEO z@!#q{OP~IMO4PqqN&3Gyr?(Lv)IVVS4GzB*vB>*d<9jo5-3y#b z_!Qrt>3hu*_95rJ$Q6A&^arl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?7-*bbtZq*o@!-`{iN#{>;VNH*rtq05=W|t*u#m7Kx{bYYY-Cvcm*ksow_+Pa$I+5PQHDK@uI2Y^^@# zie7KDww1Ik>&O=RoZiW1B~^bSV!Lf_OOz>>%$zFT=2n*#yUh=EJzjDtzxE(iV|++p z7cjHo?VZyUImH-N7a;DHtC)0NP(_O4UJwIbE+H@6+a`c$$oh66n2OmLp#VJr+S60f+0xJ(8fu0F6ha5crSl8fDP!u@EfJwQXTRg6>1w7B~PtA)fD$ zL=TdPWfkmM8kD?vq)n5`C`$`=rkJ#j;Mz^nb5)5>JFXDs2ugDxb(RUriT6id+1B2I zyb19_do*c%?XEJdCGJ(Z?c$@zA4#%eLG1C03o%?tts|vmD{1V*ynS&8buqTEgF3T= z+HM=}@7@+UM@)@|8QP871GnV#W;A5IbsrEo~-D@+*Sb> z-?p`mI~34j9%lZagNH-&Ku!QL2s!E8!pXfr7J$f_Q^ez=W|4RZIZZr-oFN`UmYmzj zhB;s_12ZIc*13&aYgAVRrs_(>XHeZa;*;1b#3!*25ue0fr7=CQy+&gaa-PN{q)cNH z5)e-T$TIN|QXw8fs>DM`P0Hm0yCCHvY(>gN*hMK9VRb1NVV9&_gk6?$5w_p|M3!WKA5|!^e@vmo{&BQCqWXJFp~UbBg%ZQ} zfcJ$?f8Q%hvcKSxu}7K^%{V~Hob@UAG(cQX9xp5dOZ9#tA+ht0=LS?Y7& z9k|w7^Rbl+t&@=un#SiW`8xOoac18x>uUDbT+5S6~z^A;W@o4HxRS{N*J meC0c1>>wTq?ix6J$9V6PBJvqrj`O#>t9Us#Pf{Yn8T%h4lDd-s diff --git a/docs/logo/josefinsans/JosefinSans-Light.ttf b/docs/logo/josefinsans/JosefinSans-Light.ttf deleted file mode 100644 index 7fe3f7beb77e04bf5f4dc09e7a3a9ea4fedf5ffb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87320 zcmeFa33yaR);C^Nx6|DTA*7RZXHPnNNJ3V!5Vi)wmPFR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sans/JosefinSans-LightItalic.ttf b/docs/logo/josefinsans/JosefinSans-LightItalic.ttf deleted file mode 100644 index 8dc35383c6e833daf63fa0aca9aed9b7b873d676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85684 zcmeFacYKva_CG!|&u!_sX*WGLxyeoMA)y4gbV%p~Lg)wrDgq+bbsk@pt_2%w zK^Gf#4HhixVvnw(AeL35=&HEnV(#;OpYuHT$qk_E=lA{V^ZI?m>r77OIWy19nRCvZ zIWzMhq!1zriA{J%&zLX{e@P)HZ^dudxY1+A4n29;oye-d-`|g$I%P)1fmc2dLV1N4 znLcjD%#ka9y3{Vj=z*ZwFl9z{-HH*LcMCD56ZDIgoVa*R+x98Dgcu8Y*JVpiUFS_} zux}AEP=n_ymaSQS;?V5N&cff<2@!YV^2H~wL4G3sF2Qft@|9;S+kVS6=Ls=+n-DMU zUUBT=r7^oFel4Wu50bnT@2bTo9(&cCFX!X$bA)gnShM=%b@x9#WV?`6rwie} zZ_V0c*OX@UqW;M)(BB5m2oVbqVyjRh6Fi%RyxHOeq$i3?kX|WnKzg%y2I&rgmWuu2 zJEY%Br;svAmLe^eO-KjJxk%^BX_Fd> z{84HY@<*#Nz{jewz{jZ;Je`QTB-f?TQ|fcHC=hKzjvhO)O}Nl&{OG#S_^A@w3CFHo zB~ngYy!HfJGZ!vynooW2eSt=Z8mK>NX9C(c!__lDMF>>%L#@~a%@#b|*>%u5` z@usEXc(F#DDj;j}PW|6P$u0UJ`B(j*h{xY|$-DJ`%XG^OMa%mEx*(c z$Zq`oHS)jFd*u)McPd3cs8aPkT+=&959oLwYU$?m1CfBb52Efv$ood#1^jN*axZ@0 zr+vO$iNQ{@7=Ql2RJa+|lk7cdonHz07@) z`)>F1?pNHeySv=G-TU1K-Jv8~Qgl*cQd&}WQbAG)G~BCyDn{sEiq-gi1;*oM{qN#- zy+=H*ZxuWA`vh!;_!2`JqyH?I;y3Jqyg>g>N5+E6n0!Rg<0X%?oKn5TakOjyF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TORvIUTTlp5`RvI?YK)h2|v0Bc39VP2wS>N<4(rh=-86(8~t4 zCG;X}Tj)jD4WSod4WSodH-%n=-4c2c))aaXb{jr^xfj44(c1I&MQ*nyAmaa_asUTzXINc zp1fZbEg|pMBuebRE>U9t4UAln^1dKZV)#vo62lk4`)W_#mqbg*`z?tQ`}-0l_Ag`P zt5V)qBuWhTBuWflwI1NBbKNsqJHZF*eBkuzJKe*0l8&sn$olyj&L0CG;2Auq`TPLhAqDzjmc2MQJ~%KaTT|Mkeo7aui2ZT&;o!sIL)@+(0(HdxSX&f-qK#+a zI;R8oF5@!bUa2!sD|F6K>qmoMz@ur4_o_G-1`Do|${$W?r}g9dKy>n>z$fqX;BVt_ STzC+w;oZ~%X^9NiwEqG4b1ZZK diff --git a/docs/logo/josefinsans/JosefinSans-Regular.ttf b/docs/logo/josefinsans/JosefinSans-Regular.ttf deleted file mode 100644 index ed11900846890faa98285ecf2b6ded1b18828fd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87260 zcmeFa34ByVwm)7~x3`dxq?2^^rL%Ps61FTPgan$fngoOpWe;0eMph9~5fL3%WE35@ zaeT&6^a&y&qmC2BQJ-;?QO0p$90wH@(ZQ{?l~E*p|KD@&?VC=(nfK=R{@eS!H0Si` zx~J;aa_ZEnbLw7%6hb5b*@SoOv@<5)mlU$~4Sc&Mj2$0&-{DTe4>9%KFUfH{$m*LiAs`bisLRkRFfUQ}FFty5gcG-<)`Q zoDg&H``NFTEnd(b{lKJih0Gp{>%*2I!7;?~IDT)$?}BA3*IjsW|IkP9`)(nk?q0Ea z(Sk#{4=xn4*pCLjwsOIRYqSSq8-yH~1b*+T1uGX%J9q}E ztlTAp`&Vn$E?!fT(LDwIF$DbgqGyDN0SIvix*!F8b`H{3imQRI6?X!62-HSAAp*c( zOQ(=BN|peZ%2wdB7xHW1Z{=|z zRji5y&Q{sLUNuQ*YOZPrUaXelUP?qEb&ybMuo{fiA*up=RcaV;jT(pa@oGHM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3r)ifKqtx+ww zpv<6J%^EC|W*MBqcW?k!QK>IIhPu0`QxE;08YsgI%Xz8oCq^8qH1^I+KN>pgRM7t@ zi}?UNuhKCMZH{|hfHh&qd9gX5=e*QgnpY8mmz+S-DzyGNgsIDV}~;01mU~D-b*%tBh-i^XdXyL6a|Ot#&e#)qKm~-+zGtmx<(yzuosHuT@MQl z9z>@l7Wy(^de0ZJVKfm$mU z2gjtF$&F*um19zGZP4EHD~bkNOa~RbMc#&%!IsiJlpobt4=4Rqz9FGmmW7Kp51Gn% zS|IPTxNeEishoA3v@A}Z2&ja{glh~{Kd=1%ucTLBR$xD*iV1J(W6SztG8L$oR8{)v zpaCzYJygmVEu~YGGr~ni<3q3t2+oRQk9!iF@Y7i~i&OsLE9Tc=E_CKJn}g0pgDrrp z6N(Pt*2=i}dT3oTsG!+8VE)KBLJI?P8BB zzT$Ji(u(_nCG`ie^PVvIP_U%%NU)^vE9fr!_I}Mr+}>{lOX|NBEUABimCM53mx3jQ z-wBo!eh=OEeS3f4BW~}Hf+h8@1WW3F!pirBy*~?<6dntf6uvf|;L&*A9j%pS!%Y@G zxADNcjAu|w3f^S>a})QEp}*oHC*D@w>nkw}zu)m@7{B`n_8W8P?cr0y;bAeFRc6#T zR6dGZ-zJ_7KZ`uWSM(#0j#=L-EBqfHhm}(QT4zJo{xpsLG5jTdY;EOn s9rwaep$9sCGpn3a+V%+t_!U$Mwva5*kLi8k;{vL*5o6|N}%1=k-2H~;_u diff --git a/docs/logo/josefinsans/JosefinSans-SemiBold.ttf b/docs/logo/josefinsans/JosefinSans-SemiBold.ttf deleted file mode 100644 index b67504a6e3a047b50df77282b55e0f7ff21b12ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87880 zcmeFa34ByVwm)7~x6|F((@8p=oz9++03m@SgsoYUKmrIMEMZ^5qOycV1O^c|L`7vB z7sm17h8r>t;>KXcK_8-`;xg!>^Lzj8eO{V#`gGk> zb!$22)TvW-FG30-;(=_!J9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YiVxa-m`;x?sS#N7bKpXvs1OSZ%*2%3t0 z1?)`%oz%oUTDNel1xq?D#gfjp)FA=s>|pRq-C1{KOOAL`u{7egVoCii%=40(@@>VE z!aIs3g`a}%Tz9^omMuBo&nTAEKdV?${~SinsrlYjEGc|mv83!RoQ@>`w5coMn9@FD9jR&f3p z`Wg;$>SNW-Hj6rcz>*)syP=5vAj@Cq9q#SvRjmm&W*jqQtKa!B_MrDc_yNA6?}K#E z`H;=af3n@f3hm>eJLmB+;7+OCQ!BJjQ0tq$@8VXo`8!pd3qu8;lFA=Uu;a#2qbD|Y aKlIUiBK%bxjtlo9HT(#-Kvp8d8T%i~EetvU diff --git a/docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf b/docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf deleted file mode 100644 index 24a27d1596e3de2baff32b01f23a9c40406d8941..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84824 zcmeFad3;nw_BUKrx3}!+Y~5K%I^9VpBq4+(BzR&Z=`}uv|CwM9+bx+l; zI(5#eQ>Ut~LJA>Lkl2K8)YP$K@Rt;_X%c?B#*7+WKlJor_aUnce}6M((!{Cyxg`gL zP(C5*HjSA&t!~AUE9^py+76n{6Q}mAJmvYjy+YIz{rp8M7qm7%Ht`kweL1STa?zP< zecpbKKMOhJO*~(=q;=`ap*dHcBjnH_LL{tQy5RIy6{+ zLOk2K?BoTD2S*?Y_iWLi+cC-nVMO%9E4+`eg_H{u!^!Yh8W%+Fef$eoV+xywCkm z>zb2WduJb=BxK_b(EkCP5h5NS#15fE7I-!tc{9awq$|bcNUssMBE4OpPVtoJMEaEo zBmG7?g_JR}H_}pBi*%5jjdZR&1?h5mKGF;2rARNAHzU1E-i36({0Qkmc@XI*@)M+= z$uE$8CBH&?SRNKq^-{f%=Be>QQ*+f~q$jIoc%u?=$n7JPDp%#m?W-z5SFQRZtyOi% zAE`znf0P;xyk6A>g zX)713SuS!`E?>D^1o0$VRs*JS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G*qde_c)M}-Ww^*AlprYKu;$n+cuAxy4gt0^0S&+6nE_39UEx+h!~qY(5nPc$2&h zO@l3@I!Hgtu?|l9n`}csGb{rWE$%X<@uXnhWrMmYT&Hx_andq4dBUM03KOm|l>I#O z|G$)8IW57yOBNH~RL2(e`9w01FG)w*X`=wor#x0l=q;p@6f@#QdgD{D0tzmOV~=|h zobYoQHjPvM(>IJ?!*ZeX=hzG|*9|s@W|dg9LAO@I#n)r&hCvCLL|T!#31Ud9Vx`G^5J*;$ND4vqBpHfsc);iH)wtxf6@OU`T}3q4?sI?eyuF=f4m=2irq`0 zr?>Go;Ay!VsTI4E)caTeXZUlqrKeTg3j>08NzPZ($|d!@8i`Lm554@HMgNA&aq(HK OrYglES&0l+l>Y(&D3s*@ diff --git a/docs/logo/josefinsans/METADATA.pb b/docs/logo/josefinsans/METADATA.pb deleted file mode 100644 index 8b67716c32..0000000000 --- a/docs/logo/josefinsans/METADATA.pb +++ /dev/null @@ -1,99 +0,0 @@ -name: "Josefin Sans" -designer: "Santiago Orozco" -license: "OFL" -category: "SANS_SERIF" -date_added: "2010-11-17" -fonts { - name: "Josefin Sans" - style: "normal" - weight: 100 - filename: "JosefinSans-Thin.ttf" - post_script_name: "JosefinSans-Thin" - full_name: "Josefin Sans Thin" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "italic" - weight: 100 - filename: "JosefinSans-ThinItalic.ttf" - post_script_name: "JosefinSans-ThinItalic" - full_name: "Josefin Sans Thin Italic" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "normal" - weight: 300 - filename: "JosefinSans-Light.ttf" - post_script_name: "JosefinSans-Light" - full_name: "Josefin Sans Light" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "italic" - weight: 300 - filename: "JosefinSans-LightItalic.ttf" - post_script_name: "JosefinSans-LightItalic" - full_name: "Josefin Sans Light Italic" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "normal" - weight: 400 - filename: "JosefinSans-Regular.ttf" - post_script_name: "JosefinSans-Regular" - full_name: "Josefin Sans Regular" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "italic" - weight: 400 - filename: "JosefinSans-Italic.ttf" - post_script_name: "JosefinSans-Italic" - full_name: "Josefin Sans Italic" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "normal" - weight: 600 - filename: "JosefinSans-SemiBold.ttf" - post_script_name: "JosefinSans-SemiBold" - full_name: "Josefin Sans SemiBold" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "italic" - weight: 600 - filename: "JosefinSans-SemiBoldItalic.ttf" - post_script_name: "JosefinSans-SemiBoldItalic" - full_name: "Josefin Sans SemiBold Italic" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "normal" - weight: 700 - filename: "JosefinSans-Bold.ttf" - post_script_name: "JosefinSans-Bold" - full_name: "Josefin Sans Bold" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -fonts { - name: "Josefin Sans" - style: "italic" - weight: 700 - filename: "JosefinSans-BoldItalic.ttf" - post_script_name: "JosefinSans-BoldItalic" - full_name: "Josefin Sans Bold Italic" - copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." -} -subsets: "latin" -subsets: "latin-ext" -subsets: "menu" -subsets: "vietnamese" diff --git a/docs/logo/josefinsans/OFL.txt b/docs/logo/josefinsans/OFL.txt deleted file mode 100644 index 6586a7e304..0000000000 --- a/docs/logo/josefinsans/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2010, Santiago Orozco (hi@typemade.mx) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/logo/setup_tools_logo_colour.svg b/docs/logo/setup_tools_logo_colour.svg deleted file mode 100644 index 7eae8fc364..0000000000 --- a/docs/logo/setup_tools_logo_colour.svg +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/docs/logo/setup_tools_logo_colour_1000px.png b/docs/logo/setup_tools_logo_colour_1000px.png deleted file mode 100644 index c25a23b9f4c55c574f14a78e76ed3515359f72af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31520 zcmeFZbySpL_bxn$h=PCxsH9R#mvpHpAgPE*t8~ZEH6YR{2nbTr-8C?PbUJhnT_ZKb zz|hQj9^UW$oqxao&RS<3)?&HV@I3du?|tvM_OXB+F#Uy*cnEhzG^KUh7Hly%N@?Uo(?aXede$(ewpu6z{>*U{v%fYN){97_FxdDOPr1K?* z+<(iO;^KCi%SX4=peFLxgspC$U4bXsu{Kkv+fXD_&RYx5>BN9|K19fU+As}^C*7}q zdn#S!V6Lg@{jUJfX84OVLWuTM*n{y^dTFcPOvan4(BZXc{kPSOZM5cI=+B(-j`?hX&AJWt|IGl92 z9!SvG)2~qQpHIK=!Xw)SG;f~E0uE$zRSc5$%+ZNxc&uqhuzQYUZ7UiVY%y}19-VdZ zZ^#Au8B^a|FMTmFpn4MmS(E_;Oq?1y#@nVQ9W2Z%RG+n-Oo z=5fEpsrwOZ0sasO@8a!$5T8ERt+Rp%j^#}@2RaRezX*@s3ldxF5<$7hZfW?J-K2It z&g;Ok;o!0@BiIsAt|$W@^VCJI2cg){D)GrR)tz_HgpJi39j*%*p3cApy_5q~@va8z zjpbmeqPATK-pb19H%Z#2cVo07ovmJ{5x@(L#1cSwqlwIU05Qsy#qsNI(O&AoZEm_j zSnZ$t>$+09LdF-youdt$5Xc`&KwIwm(2LP+mo**sQ&K}Im7@Lq$q=lCWf|G$dDH0z zJ6zAy7!d>l+G$jD44|uRCEQB|>lGaV=Q%gUHn)9=-Oghh8bTt|X}IfZh&BbF*i0tC zkjR9sFJjrA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&mJehRHQJ8?OGslw&8t+salg6v2vUVWOvyh>L-F*-rsT8!Fpc2V z@9+{RWXGvp!u71QJ7<*HUg%^{%l#5mNlD+-)4q|Lc$td~V4(NjX11nM+KOi$S0&Mr$9 z${$-mAdRr)30?h*8%!Sb4l+T>V{-6_sHgJK;nR)|Yu@;rs9Tp2VC99dL~}cqHziNI zw#ZLI7`4U^2bUD?-8P-lHSTnsR9c)9lXYSrl$;W@?W-ik+KY9e;nKuM@|uSk8q2{1Z6&V zoY~@qO5I4CGt#q^tWs>BL7}O#`Ybm|)Vx~4M&?P&mR?KQ#(^P?D0ZK{`qc3Vpj%b! z)v>=u8VCcFnAAye{`+rqc44W7qbX)mLBC`~ViD+fx_5Ari93NI?;-?I|6#9K;XUmk zMK+;FY^>mMp?O>MP)Zc&urE+wr=_vljQLEd%W^ObB{r&^0y$Bb0%3MXIt=ceEE=gJqBojO0O!tyv^o% z7yd#!zI^X47MrH5is#^)TSC+=>v7-FA-R%{$FSKHSCzc$*++0Jct9VJ8A2fvyUcWTLn|B##gS})K4RP`LnBe5(LO?tK04xKIQSBxH z#Ql?metGQ8xO+Cqi>+0oqrUAm96NUI$g_(1cwfu`?5xYzkN64!l;8Ky3fbdpkvinq zdP09wMY8+JmPU2EZfwUf6ktN?uKxCRPe2N<*A(E*?j=>+Fc?wRzpK~+6X1Qv%D}*Y zjbri_;lg)ZEvVLQ2NfO_EHrvi5?q+4M7mbWK1AlzWlyPS;v_M};Ks^L9Zd)xi25;G zquJd+s#Z;{llG!eP?z^B$j|}%KWeybPh9sd$+F^tbwD5V`Sr#>?(MsVgK>G`gc>eC z6+DhiiHPzI%v((k0W;5X7kzcVxHRHD5*7LXpZ|}*|7ir+3LgV)MR1Gf4McnXUFe}K MuO?S6^C9Ga0NJR5iU0rr diff --git a/docs/logo/setup_tools_logo_colour_banner_1line.svg b/docs/logo/setup_tools_logo_colour_banner_1line.svg deleted file mode 100644 index d6dc9aaca2..0000000000 --- a/docs/logo/setup_tools_logo_colour_banner_1line.svg +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png b/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png deleted file mode 100644 index d1604289c8d768aee6f250d1e1127cc85840cc5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24183 zcmeEu^;eYN7w*iE(kTrB(k(SK5(3h~5YpYO>%xObvzSrfn_B9lAwBw6BC5tLn5#74ceQDIqotj%ua)M zo>357I1pr^v_9jajYohg5M0PCL&WjyX~MEPfqWr@kUyfd?*M*#*;mI^(_9lEX0UBM z8o6b?&Ch@IabY2620m;9VEF&f|APf|leNi`1}YnDtQXw#O6uuf2}_R>clwpjqf5&I zDQ8VSfQs*@ts8n7Sb)^1$7wQ>5xdrjGnapMDK>m&O+*R*dx}6P{y69=*+IF#`6949 zS)m*xwp6n+8+zrv0-t)P8*Zcw==GkD$>RpLePEhkp^dG0^-n~1N)&&R>lACFq^;y+ ztVQ&++^G#&3-|emQ_~WlpZaH>9Q(23^AYvC{f7JZME}i|tVKS?g~QE0DC*U)bSW1f z4Tu0Ft$sDQgjVv6JPiQX*Bx6xA5_sMrb!cT#~!ev{(D%*$;a+-9}c?J=B$bP_HMDClz8=6Ao{?J|FmHOpol_S`1or)D6Qf{2T`Cuuro8)U5)1^y+7bT zbY4)}E0wX`tn9`1wNh-z{2RX%Z#PJqry&5og>ESdJskh#`!@14YipV*`!;dBh@kOP zMjP>eqcbVA;_ig8s5rdIUD{!jK0d)c}3@CY=N`Fg^uV_E}o_pOo{7zOOMBOmhD{ma?tbJ1ERjK9N|~ zfc`RSVh1q3l#qByw_gYTH@K~Y&rTFp=-uIBD;Hg!u*(;o-n4%jYm%I^=EHCr5REHk zgD#piOUd1hUf8;4v$STcCzzToy15?qKZ{EaC8#%ENB^_uJAdM_TlL^zb~zUGgppOX zwGU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?C}u8 z3BIixdFa>2LCP^s{qAM{Q0%C~!~4~$VIlRyVPi#*asMOg|Gz(re-4D*T5>aax`}ZN O&w%?zI+%M;U;hueu&zn~ diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines.svg b/docs/logo/setup_tools_logo_colour_banner_2lines.svg deleted file mode 100644 index 991577fba0..0000000000 --- a/docs/logo/setup_tools_logo_colour_banner_2lines.svg +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png b/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png deleted file mode 100644 index 89370a9d012633f184ba67890c7d481c2308a35a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38105 zcmeFYg;!MH7e0K4?(PohQV|&%rIbcMlvF|*hHe-{Nd-v-h7go)r5i*Lq&tSjA%}Ko z-ix2_@3-E6;a%&UwOFh*YtFsr?6dcCp8f27qI9*@NQsz;001C;{7Cr;0AQ~J0Hm4# z5B$bKczzZ9M+kfL+yek^U)=mbn(lE{gI_Xwsyy@5cYWpQ^U~c0@bU2xwRds!uzCrz z5p{L9O-IWz0RRW^Sowj0FJc?%7ih3HEx)%VZ<|2jZJ_H`J~i>gjqn%FT!llaadD}b z=Qlx$$Xg^G<)YQqUJjCu)mVfY9B>npnBCc@jwa5IUA=S_?u_KADE;+@1Cw(v*|`k_(Uiaipj-yQ(h|Nr^_mIZQ-s9Kq`f4lz`i8uLi%4p=ED zZ$7D=@OdROrZlq({c}WK3gYV!7w!NK>@K{MEc0u)k)f51#3|P-P!d+`h+FlP#kQ;H zRA2s4i}*it<@~svjiKo5)HpnMot9Jo(fo{)9s(s+G(Y;3Ucb~-{VqOfVLxmV2ztsH zLT&F~ROT=P_h*uzGP8a-h`|>glt_6Q zCO+j`_|GhQLU>2Q-u8Ch?cT+hk3cHf3(tIN*#q0Nj#JKKcR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Mt;n6SG7UJXept#P-T6dW?Vbo;^ z09eQ(ulCwp+$49uRgqhKLc=`fdRS{nT)Lu8&DnTA0B}!d)5iFYC03JOrnJjUOo!vW zk1*h;?bo6n;;ZhhjBtS_DA1&Qw{`ogL#N0Ibf8Xa$kX+ZcF%y7j-I)JclX!;Kv|O| zt3LF5>-PC)LD}&sqr9@Tu%N%kf@lVkTjk3skKeHZ!1LzEtzTj(a&SgqIP|2A>C{8& z#|^P?a-|J1Ep~$vyw>f{cxCOv4gfj6ELmo*TOM7Lb^!+Qf+b$s&0EJ9q6Ng_4;wq< zRXQ3P7y*!4G^hXJiOqrGl3Sg4fe_}rm%FbUBdEY0b06io^ryobh;%y>am!uxImIP- zs`vHe!-VwM+O5sIFxn;63Bv0S~0{io}xnr<@LiA*bE z5Pago(XZQCfo_`Lr~h1_dhr23cQ{K{?uSqxuX~;BNjF@PCQr#S9^oeX!eu_heo+xU(E>uB-GgX5I`Ucgdn%!R^0I+G215bHF9MBOi+rC}&GV6=$u&7;PZ*u&c!*E>9 sa7f`+JH7s!qr_@9=*<7mM|o!F(A>7mU+n=7FZR5)FtssxW8@zBA8(4v8~^|S diff --git a/docs/logo/setup_tools_logo_symbol_colour.svg b/docs/logo/setup_tools_logo_symbol_colour.svg deleted file mode 100644 index 2936cbb56a..0000000000 --- a/docs/logo/setup_tools_logo_symbol_colour.svg +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/docs/logo/setup_tools_logo_symbol_colour_1000px.png b/docs/logo/setup_tools_logo_symbol_colour_1000px.png deleted file mode 100644 index e0c36fc131ac399ba0a8db8ff16b13d4beb8ad72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44239 zcmeFZXH=8f_XheRDk@SG5dkSmQ)yC^(6JyQO+`heDIkb6LujF^qtXNg>4D&YU<0H} z*C8~41gRpBXec4H00BY^-17#V`TalKulLiPwHVhTc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1h8zg7A( vW3t)t@}Su9l;~i0^Z&{A!2c_zMP4e5JXr3ULE7(!3g+>Z&$0S1iC6y%`)WVf diff --git a/docs/logo/setup_tools_logotype_1line.svg b/docs/logo/setup_tools_logotype_1line.svg deleted file mode 100644 index dbb9c1decf..0000000000 --- a/docs/logo/setup_tools_logotype_1line.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - From 1b22ebc1cea9da7f377a260821e6cb1781df527c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jul 2020 21:24:06 -0400 Subject: [PATCH 8054/8469] Revert "Add banner to main docs page" This reverts commit 0f491dc2b4141a17475eec12b02d8f237d7f7918. --- docs/index.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 228f97c8b5..fc111a9998 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,6 +1,3 @@ -.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg - - Documentation ============= From dcc71f773576c19a3658735879893515b056ece5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:35:02 -0400 Subject: [PATCH 8055/8469] Rename _distutils_importer to _distutils_hack, as it supplies more than just an importer. --- {_distutils_importer => _distutils_hack}/__init__.py | 0 {_distutils_importer => _distutils_hack}/install.py | 0 {_distutils_importer => _distutils_hack}/override.py | 0 conftest.py | 2 +- setup.py | 2 +- setuptools/__init__.py | 2 +- setuptools/sandbox.py | 8 ++++---- 7 files changed, 7 insertions(+), 7 deletions(-) rename {_distutils_importer => _distutils_hack}/__init__.py (100%) rename {_distutils_importer => _distutils_hack}/install.py (100%) rename {_distutils_importer => _distutils_hack}/override.py (100%) diff --git a/_distutils_importer/__init__.py b/_distutils_hack/__init__.py similarity index 100% rename from _distutils_importer/__init__.py rename to _distutils_hack/__init__.py diff --git a/_distutils_importer/install.py b/_distutils_hack/install.py similarity index 100% rename from _distutils_importer/install.py rename to _distutils_hack/install.py diff --git a/_distutils_importer/override.py b/_distutils_hack/override.py similarity index 100% rename from _distutils_importer/override.py rename to _distutils_hack/override.py diff --git a/conftest.py b/conftest.py index 868bf5bed2..25537f56e5 100644 --- a/conftest.py +++ b/conftest.py @@ -15,7 +15,7 @@ def pytest_addoption(parser): 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', 'setuptools/_distutils', - '_distutils_importer', + '_distutils_hack', ] diff --git a/setup.py b/setup.py index a6e1abc455..2d8bdf85d8 100755 --- a/setup.py +++ b/setup.py @@ -95,7 +95,7 @@ class install_with_pth(install): def initialize_options(self): install.initialize_options(self) self.extra_path = ( - 'distutils-precedence', 'import _distutils_importer.install') + 'distutils-precedence', 'import _distutils_hack.install') def finalize_options(self): install.finalize_options(self) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 80b287b4b4..99094230d3 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -5,7 +5,7 @@ import os import re -import _distutils_importer.override # noqa: F401 +import _distutils_hack.override # noqa: F401 import distutils.core from distutils.errors import DistutilsOptionError diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 342a713f5c..24a360808a 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -200,7 +200,7 @@ def setup_context(setup_dir): 'distutils', 'pkg_resources', 'Cython', - '_distutils_importer', + '_distutils_hack', } @@ -232,9 +232,9 @@ def hide_setuptools(): necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. """ - _distutils_importer = sys.modules.get('_distutils_importer', None) - if _distutils_importer is not None: - _distutils_importer.remove_shim() + _distutils_hack = sys.modules.get('_distutils_hack', None) + if _distutils_hack is not None: + _distutils_hack.remove_shim() modules = filter(_needs_hiding, sys.modules) _clear_modules(modules) From 384a51657c94271d29c437415080f25f7df4103b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:38:13 -0400 Subject: [PATCH 8056/8469] Extract pth name and contents into class variables. --- setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 2d8bdf85d8..edb2bbcff6 100755 --- a/setup.py +++ b/setup.py @@ -92,18 +92,21 @@ class install_with_pth(install): `distutils` than the standard library. """ + _pth_name = 'distutils-precedence' + _pth_contents = 'import _distutils_hack.install' + def initialize_options(self): install.initialize_options(self) - self.extra_path = ( - 'distutils-precedence', 'import _distutils_hack.install') + self.extra_path = self._pth_name, self._pth_contents def finalize_options(self): install.finalize_options(self) + # undo secondary effect of `extra_path` adding to `install_lib` install_suffix = os.path.relpath(self.install_lib, self.install_libbase) - if install_suffix == self.extra_path[1]: + if install_suffix == self._pth_contents: self.install_lib = self.install_libbase From f3b177e9c2b77104ddebaec7b581e2aee73a1184 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:42:15 -0400 Subject: [PATCH 8057/8469] Update docstring to use imperative voice, provide a bit more context, and advise against copying of the behavior. --- setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index edb2bbcff6..45ddb149a5 100755 --- a/setup.py +++ b/setup.py @@ -86,10 +86,13 @@ class install_with_pth(install): """ Custom install command to install a .pth file for distutils patching. - This is necessary because there's no standard way to install a `.pth` file - alongside your package (and there probably shouldn't be one), but we need - to do this in order to give precedence higher precedence to our version of - `distutils` than the standard library. + This hack is necessary because there's no standard way to install behavior + on startup (and it's debatable if there should be one). This hack (ab)uses + the `extra_path` behavior in Setuptools to install a `.pth` file with + implicit behavior on startup to give higher precedence to the local version + of `distutils` over the version from the standard library. + + Please do not replicate this behavior. """ _pth_name = 'distutils-precedence' From 268ef5f553f29977f708c256ee398c9e29cb4da7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:43:08 -0400 Subject: [PATCH 8058/8469] Remove hanging indent --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 45ddb149a5..6290a74698 100755 --- a/setup.py +++ b/setup.py @@ -106,8 +106,10 @@ def finalize_options(self): install.finalize_options(self) # undo secondary effect of `extra_path` adding to `install_lib` - install_suffix = os.path.relpath(self.install_lib, - self.install_libbase) + install_suffix = os.path.relpath( + self.install_lib, + self.install_libbase, + ) if install_suffix == self._pth_contents: self.install_lib = self.install_libbase From 5642e413fb6c75434f109be943bdb09ea9e7ade2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:44:51 -0400 Subject: [PATCH 8059/8469] Extract function for restoring install lib to encapsulate behavior. --- setup.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 6290a74698..6f6601fedf 100755 --- a/setup.py +++ b/setup.py @@ -104,14 +104,15 @@ def initialize_options(self): def finalize_options(self): install.finalize_options(self) + self._restore_install_lib() - # undo secondary effect of `extra_path` adding to `install_lib` - install_suffix = os.path.relpath( - self.install_lib, - self.install_libbase, - ) + def _restore_install_lib(self): + """ + Undo secondary effect of `extra_path` adding to `install_lib` + """ + suffix = os.path.relpath(self.install_lib, self.install_libbase) - if install_suffix == self._pth_contents: + if suffix == self._pth_contents: self.install_lib = self.install_libbase From 83a85a71cd779b1b1b3a44e21cc198264650da46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:51:40 -0400 Subject: [PATCH 8060/8469] Restore early opt-in/opt-out for pth behavior. --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6f6601fedf..2e44225e41 100755 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ import os import sys +import textwrap import setuptools from setuptools.command.install import install @@ -96,7 +97,11 @@ class install_with_pth(install): """ _pth_name = 'distutils-precedence' - _pth_contents = 'import _distutils_hack.install' + _pth_contents = textwrap.dedent(""" + import os + enabled = os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'local' + enabled and __import__('_distutils_hack.install') + """).lstrip().replace('\n', '; ') def initialize_options(self): install.initialize_options(self) From 1251a231ad75fa649da700645690eb3c0a348f08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:53:31 -0400 Subject: [PATCH 8061/8469] Replace install behavior on import with direct invocation (now that 'enabled' logic is duplicated in pth file). --- _distutils_hack/install.py | 5 ----- setup.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 _distutils_hack/install.py diff --git a/_distutils_hack/install.py b/_distutils_hack/install.py deleted file mode 100644 index 73f13b2993..0000000000 --- a/_distutils_hack/install.py +++ /dev/null @@ -1,5 +0,0 @@ -from . import enabled, add_shim - - -if enabled(): - add_shim() diff --git a/setup.py b/setup.py index 2e44225e41..37953051b0 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ class install_with_pth(install): _pth_contents = textwrap.dedent(""" import os enabled = os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'local' - enabled and __import__('_distutils_hack.install') + enabled and __import__('_distutils_hack').add_shim() """).lstrip().replace('\n', '; ') def initialize_options(self): From 6c6d69e0213c4012caa36f0087f1fe54bac62c89 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 10:59:11 -0400 Subject: [PATCH 8062/8469] Move all but a small shim in override into _distutils_hack --- _distutils_hack/__init__.py | 51 ++++++++++++++++++++++++++++++++++ _distutils_hack/override.py | 55 +------------------------------------ 2 files changed, 52 insertions(+), 54 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 3ad701002d..a8638344f0 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -1,5 +1,11 @@ import sys import os +import re +import importlib +import warnings + + +is_pypy = '__pypy__' in sys.builtin_module_names def enabled(): @@ -10,6 +16,51 @@ def enabled(): return which == 'local' +def warn_distutils_present(): + if 'distutils' not in sys.modules: + return + if is_pypy and sys.version_info < (3, 7): + # PyPy for 3.6 unconditionally imports distutils, so bypass the warning + # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 + return + warnings.warn( + "Distutils was imported before Setuptools. This usage is discouraged " + "and may exhibit undesirable behaviors or errors. Please use " + "Setuptools' objects directly or at least import Setuptools first.") + + +def clear_distutils(): + if 'distutils' not in sys.modules: + return + warnings.warn("Setuptools is replacing distutils.") + mods = [name for name in sys.modules if re.match(r'distutils\b', name)] + for name in mods: + del sys.modules[name] + + +def ensure_local_distutils(): + clear_distutils() + distutils = importlib.import_module('setuptools._distutils') + distutils.__name__ = 'distutils' + sys.modules['distutils'] = distutils + + # sanity check that submodules load as expected + core = importlib.import_module('distutils.core') + assert '_distutils' in core.__file__, core.__file__ + + +def do_override(): + """ + Ensure that the local copy of distutils is preferred over stdlib. + + See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 + for more motivation. + """ + warn_distutils_present() + if enabled(): + ensure_local_distutils() + + class DistutilsMetaFinder: def find_spec(self, fullname, path, target=None): if path is not None or fullname != "distutils": diff --git a/_distutils_hack/override.py b/_distutils_hack/override.py index 523139bb6e..2cc433a4a5 100644 --- a/_distutils_hack/override.py +++ b/_distutils_hack/override.py @@ -1,54 +1 @@ -""" -Ensure that the local copy of distutils is preferred over stdlib. - -See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 -for more motivation. -""" - -import sys -import re -import importlib -import warnings - -from . import enabled - - -is_pypy = '__pypy__' in sys.builtin_module_names - - -def warn_distutils_present(): - if 'distutils' not in sys.modules: - return - if is_pypy and sys.version_info < (3, 7): - # PyPy for 3.6 unconditionally imports distutils, so bypass the warning - # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 - return - warnings.warn( - "Distutils was imported before Setuptools. This usage is discouraged " - "and may exhibit undesirable behaviors or errors. Please use " - "Setuptools' objects directly or at least import Setuptools first.") - - -def clear_distutils(): - if 'distutils' not in sys.modules: - return - warnings.warn("Setuptools is replacing distutils.") - mods = [name for name in sys.modules if re.match(r'distutils\b', name)] - for name in mods: - del sys.modules[name] - - -def ensure_local_distutils(): - clear_distutils() - distutils = importlib.import_module('setuptools._distutils') - distutils.__name__ = 'distutils' - sys.modules['distutils'] = distutils - - # sanity check that submodules load as expected - core = importlib.import_module('distutils.core') - assert '_distutils' in core.__file__, core.__file__ - - -warn_distutils_present() -if enabled(): - ensure_local_distutils() +__import__('_distutils_hack').do_override() From 95b359c84ae05cb2fd37da194b67ee83c4eb9595 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 29 Jul 2020 22:08:30 +0300 Subject: [PATCH 8063/8469] The PyPA has adopted the PSF code of conduct For details, see: * https://discuss.python.org/t/implementing-pep-609-pypa-governance/4745 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9cbf7b86e1..824a033fb8 100644 --- a/README.rst +++ b/README.rst @@ -54,4 +54,4 @@ 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 `_. +`PSF Code of Conduct `_. From dbc968a808791a0cd494c4d993592e832d2e5fed Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 21:41:20 -0400 Subject: [PATCH 8064/8469] docs: remove editorial message and lengthy description of dependency type --- docs/userguide/dependency_management.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index ca2ac75ac4..1c9cf6380d 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -2,10 +2,8 @@ Dependencies Management in Setuptools ===================================== -``Setuptools``'s dependency management is meticulous, or agonizing, depending -on your level of familiarity. There are three types of dependency styles. -1) those required to run the packaging program (build system requirement), -2) those your package depends on (required dependency) and 3) optional +There are three types of dependency styles offered by setuptools: +1) build system requirement, required dependency and 3) optional dependency. .. Note:: From 3268c199118dd5400e40b1afc401ea75a37dabb1 Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 21:49:08 -0400 Subject: [PATCH 8065/8469] docs: reference PEP440 for versions specifiers --- docs/userguide/dependency_management.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index 1c9cf6380d..8bca4fd7be 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -7,8 +7,9 @@ There are three types of dependency styles offered by setuptools: dependency. .. Note:: - For all the packages you intend to add to dependency, you can optionally - specify the version following :ref:`reference on version specifyer ` + Packages that are added to dependency can be optionally specified with the + version by following `PEP 440 `_ + .. contents:: From bd3d57dfe66bade541faf5573c14669f311a6e5c Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 21:51:21 -0400 Subject: [PATCH 8066/8469] docs: give python requirement a dedicated section --- docs/userguide/dependency_management.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index 8bca4fd7be..97d3b662e4 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -40,14 +40,6 @@ other two types of dependency keyword, this one is specified in your deprecated practice (WIP)` -Python requirement ------------------- -In some cases, you might need to specify the minimum required python version. -This is handled with the ``python_requires`` keyword supplied to ``setup.cfg`` -or ``setup.py``. - -Example WIP - Declaring required dependency ============================= @@ -313,3 +305,12 @@ not need to change, but the right packages will still be installed if needed. support a feature, it should keep an empty requirements list for that feature in its ``extras_require`` argument, so that packages depending on that feature don't break (due to an invalid feature name). + + +Python requirement +================== +In some cases, you might need to specify the minimum required python version. +This is handled with the ``python_requires`` keyword supplied to ``setup.cfg`` +or ``setup.py``. + +Example WIP \ No newline at end of file From e716c1821969d07c8b629b15e1b0782a247b6b57 Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 21:54:31 -0400 Subject: [PATCH 8067/8469] docs: remove mentioning of multiversion install --- docs/userguide/dependency_management.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index 97d3b662e4..b2be4177aa 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -70,9 +70,7 @@ finess to it, let's start with a simple example. When your project is installed (e.g. using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed and 2) Any scripts in your project will be installed with wrappers -that verify the availability of the specified dependencies at runtime, and -ensure that the correct versions are added to ``sys.path`` (e.g. if multiple -versions have been installed). +that verify the availability of the specified dependencies at runtime. .. note:: if you declare your dependencies in ``setup.py``, you do From 5df7ee405dc7455b842daa82989d199689d8650e Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 21:56:08 -0400 Subject: [PATCH 8068/8469] docs: remove note on "require" functionality --- docs/userguide/dependency_management.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index b2be4177aa..50f061c9ab 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -71,12 +71,6 @@ When your project is installed (e.g. using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed and 2) Any scripts in your project will be installed with wrappers that verify the availability of the specified dependencies at runtime. - -.. note:: - if you declare your dependencies in ``setup.py``, you do - *not* need to use the ``require()`` function in your scripts or modules, as - long as you either install the project or use ``setup.py develop`` to do - development work on it. Platform specific dependencies From dee83be182df63d05f4a1d52639c61f34b64234f Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 29 Jul 2020 22:08:52 -0400 Subject: [PATCH 8069/8469] docs: rephrased the introduction for optional dependencies note the use case for tests and docs functions and that "test_require" is deprecated, shorten description of the example --- docs/userguide/dependency_management.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.txt index 50f061c9ab..a26ab6c3b0 100644 --- a/docs/userguide/dependency_management.txt +++ b/docs/userguide/dependency_management.txt @@ -199,12 +199,16 @@ distributions, if the package's dependencies aren't already installed: Optional dependencies ===================== Setuptools allows you to declare dependencies that only get installed under -specific circumstances. For example, let's say that Project-A offers optional -PDF support and requires some additional package for it to work. Such a -dependency will be specified with ``extras_require`` keyword and they are only -installed if another package depends on it (either directly or indirectly). +specific circumstances. These dependencies are specified with ``extras_require`` +keyword and are only installed if another package depends on it (either +directly or indirectly) This makes it convenient to declare dependencies for +ancillary functions such as "tests" and "docs". -Let's first see how to specify such package: +.. note:: + ``tests_require`` is now deprecated + +For example, Package-A offers optional PDF support and requires two other +dependencies for it to work: .. code-block:: ini From 6af765910c71ead64b0093ac51db7592d1ad238c Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 1 Aug 2020 12:20:35 +1000 Subject: [PATCH 8070/8469] Fixed typo --- setuptools/monkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/monkey.py b/setuptools/monkey.py index 3c77f8cf27..e5f1377b54 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -138,7 +138,7 @@ def patch_for_msvc_specialized_compiler(): msvc = import_module('setuptools.msvc') if platform.system() != 'Windows': - # Compilers only availables on Microsoft Windows + # Compilers only available on Microsoft Windows return def patch_params(mod_name, func_name): From 1215561b96389403cbbd55889e54b67db873ddcb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:32:13 -0400 Subject: [PATCH 8071/8469] Suppress ImportError for winreg as the module is only available on some platforms. Allows unit testing of module on non-Windows platforms. --- distutils/_msvccompiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index 0e98692e31..ef0f0b5696 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -15,7 +15,9 @@ import os import subprocess -import winreg +import contextlib +with contextlib.suppress(ImportError): + import winreg from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError From 7f233974b0e3dc3692c820a2c8c3439c4d15fc70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:32:51 -0400 Subject: [PATCH 8072/8469] Add a unit test for testing spawn. Ref pypa/distutils#5. --- distutils/tests/test_msvccompiler.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/distutils/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py index b518d6a78b..f4bb5162fb 100644 --- a/distutils/tests/test_msvccompiler.py +++ b/distutils/tests/test_msvccompiler.py @@ -2,6 +2,7 @@ import sys import unittest import os +import threading from distutils.errors import DistutilsPlatformError from distutils.tests import support @@ -74,6 +75,28 @@ def test_get_vc2015(self): else: raise unittest.SkipTest("VS 2015 is not installed") + +class TestSpawn(unittest.TestCase): + def test_concurrent_safe(self): + """ + Concurrent calls to spawn should have consistent results. + """ + import distutils._msvccompiler as _msvccompiler + compiler = _msvccompiler.MSVCCompiler() + compiler._paths = "expected" + inner_cmd = 'import os; assert os.environ["PATH"] == "expected"' + command = ['python', '-c', inner_cmd] + + threads = [ + threading.Thread(target=compiler.spawn, args=[command]) + for n in range(100) + ] + for thread in threads: + thread.start() + for thread in threads: + thread.join() + + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From 39b30e15365756ae685e02b5af38799a677858af Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:35:12 -0400 Subject: [PATCH 8073/8469] In TestSpawn.test_concurrent_safe, use CheckThread to ensure that the spawn call does not simply fail to execute. Ref pypa/setuptools#2257. --- distutils/tests/test_msvccompiler.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/distutils/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py index f4bb5162fb..88d912b17b 100644 --- a/distutils/tests/test_msvccompiler.py +++ b/distutils/tests/test_msvccompiler.py @@ -76,6 +76,19 @@ def test_get_vc2015(self): raise unittest.SkipTest("VS 2015 is not installed") +class CheckThread(threading.Thread): + exc_info = None + + def run(self): + try: + super().run() + except Exception: + self.exc_info = sys.exc_info() + + def __bool__(self): + return not self.exc_info + + class TestSpawn(unittest.TestCase): def test_concurrent_safe(self): """ @@ -88,13 +101,14 @@ def test_concurrent_safe(self): command = ['python', '-c', inner_cmd] threads = [ - threading.Thread(target=compiler.spawn, args=[command]) + CheckThread(target=compiler.spawn, args=[command]) for n in range(100) ] for thread in threads: thread.start() for thread in threads: thread.join() + assert all(threads) def test_suite(): From 0bb6c6bc47823764649430fca34fc6475c0a42d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:39:57 -0400 Subject: [PATCH 8074/8469] In CCompiler, allow keyword arguments to be passed to spawn calls. Ref pypa/setuptools#2257 and pypa/distutils#5. --- distutils/ccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distutils/ccompiler.py b/distutils/ccompiler.py index b5ef143e72..57bb94e8bb 100644 --- a/distutils/ccompiler.py +++ b/distutils/ccompiler.py @@ -906,8 +906,8 @@ def warn(self, msg): def execute(self, func, args, msg=None, level=1): execute(func, args, msg, self.dry_run) - def spawn(self, cmd): - spawn(cmd, dry_run=self.dry_run) + def spawn(self, cmd, **kwargs): + spawn(cmd, dry_run=self.dry_run, **kwargs) def move_file(self, src, dst): return move_file(src, dst, dry_run=self.dry_run) From 616e129944d87e578fe02146f07f72603a4c0124 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:41:08 -0400 Subject: [PATCH 8075/8469] In _msvccompiler.MSVCCompiler.spawn, use correct capitalization for PATH environment variable. Fixes failing test and fixes pypa/setuptools#2257. --- distutils/_msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index ef0f0b5696..2d56ee0aad 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -503,7 +503,7 @@ def link(self, log.debug("skipping %s (up-to-date)", output_filename) def spawn(self, cmd): - env = dict(os.environ, path=self._paths) + env = dict(os.environ, PATH=self._paths) return super().spawn(cmd, env=env) # -- Miscellaneous methods ----------------------------------------- From a83d96eca1ea6d85a366351457dd25beb1663ad4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:55:24 -0400 Subject: [PATCH 8076/8469] Add changelog. Ref #2257. --- changelog.d/2257.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2257.misc.rst diff --git a/changelog.d/2257.misc.rst b/changelog.d/2257.misc.rst new file mode 100644 index 0000000000..509b372e0d --- /dev/null +++ b/changelog.d/2257.misc.rst @@ -0,0 +1 @@ +Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn. From d3e754feba46b69bf948009d895303a74d2a41bd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 2 Aug 2020 09:57:20 -0400 Subject: [PATCH 8077/8469] =?UTF-8?q?Bump=20version:=2049.2.0=20=E2=86=92?= =?UTF-8?q?=2049.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2257.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2257.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9b3e408589..b534af1bc1 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.2.0 +current_version = 49.2.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 82e6ef66d3..519330ebe9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.2.1 +------- + +* #2257: Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn. + + v49.2.0 ------- diff --git a/changelog.d/2257.misc.rst b/changelog.d/2257.misc.rst deleted file mode 100644 index 509b372e0d..0000000000 --- a/changelog.d/2257.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn. diff --git a/setup.cfg b/setup.cfg index fa0e565646..485714a3b6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.2.0 +version = 49.2.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 44ca8aa51c39bea0c68444389d6ec215bcf98d02 Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Tue, 4 Aug 2020 10:31:11 +0200 Subject: [PATCH 8078/8469] Improve safe_version documentation --- changelog.d/2300.doc.rst | 1 + docs/pkg_resources.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changelog.d/2300.doc.rst diff --git a/changelog.d/2300.doc.rst b/changelog.d/2300.doc.rst new file mode 100644 index 0000000000..3b06cc5f11 --- /dev/null +++ b/changelog.d/2300.doc.rst @@ -0,0 +1 @@ +Improve the ``safe_version`` function documentation diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index f2e554f42c..7d0d8da92a 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1596,12 +1596,12 @@ Parsing Utilities See ``to_filename()``. ``safe_version(version)`` - This will return the normalized form of any PEP 440 version, if the version - string is not PEP 440 compatible than it is similar to ``safe_name()`` - except that spaces in the input become dots, and dots are allowed to exist - in the output. As with ``safe_name()``, if you are generating a filename - from this you should replace any "-" characters in the output with - underscores. + This will return the normalized form of any PEP 440 version. If the version + string is not PEP 440 compatible, this function behaves similar to + ``safe_name()`` except that spaces in the input become dots, and dots are + allowed to exist in the output. As with ``safe_name()``, if you are + generating a filename from this you should replace any "-" characters in + the output with underscores. ``safe_extra(extra)`` Return a "safe" form of an extra's name, suitable for use in a requirement From 8db806d30d7591828528ac937e8f3b334e957ed3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 26 Jul 2020 20:19:45 -0400 Subject: [PATCH 8079/8469] remove shim should by symmetric to add_shim --- _distutils_hack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index a8638344f0..a10af2cc94 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -91,6 +91,6 @@ def add_shim(): def remove_shim(): try: - sys.path.remove(DISTUTILS_FINDER) + sys.meta_path.remove(DISTUTILS_FINDER) except ValueError: pass From ebfe95fcbb12c22f58b045c6f10bd899a21a53d8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 5 Aug 2020 21:49:08 -0400 Subject: [PATCH 8080/8469] Update changelog. --- changelog.d/2259.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2259.change.rst diff --git a/changelog.d/2259.change.rst b/changelog.d/2259.change.rst new file mode 100644 index 0000000000..43701ec23b --- /dev/null +++ b/changelog.d/2259.change.rst @@ -0,0 +1 @@ +Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable. From fe79e6ca8ef48edb3ee2ea42b3021aa7de963a49 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 6 Aug 2020 08:51:10 +0100 Subject: [PATCH 8081/8469] Don't install setup_requires when run as a PEP-517 backend. Under PEP-517, installing build dependencies is up to the frontend. Closes gh-2303 --- setuptools/build_meta.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 46266814ad..49b4cc2835 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -75,6 +75,22 @@ def patch(cls): distutils.core.Distribution = orig +@contextlib.contextmanager +def no_install_setup_requires(): + """Temporarily disable installing setup_requires + + Under PEP 517, the backend reports build dependencies to the frontend, + and the frontend is responsible for ensuring they're installed. + So setuptools (acting as a backend) should not try to install them. + """ + orig = setuptools._install_setup_requires + setuptools._install_setup_requires = lambda attrs: None + try: + yield + finally: + setuptools._install_setup_requires = orig + + def _to_str(s): """ Convert a filename to a string (on Python 2, explicitly @@ -139,7 +155,8 @@ def run_setup(self, setup_script='setup.py'): with _open_setup_script(__file__) as f: code = f.read().replace(r'\r\n', r'\n') - exec(compile(code, __file__, 'exec'), locals()) + with no_install_setup_requires(): + exec(compile(code, __file__, 'exec'), locals()) def get_requires_for_build_wheel(self, config_settings=None): config_settings = self._fix_config(config_settings) From 21c81324f9e37aee92301f64b95947accfafbaa4 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 6 Aug 2020 10:10:13 +0100 Subject: [PATCH 8082/8469] get_requires_for_build* hooks rely on 'installing' setup_requires --- setuptools/build_meta.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 49b4cc2835..371321879a 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -155,8 +155,7 @@ def run_setup(self, setup_script='setup.py'): with _open_setup_script(__file__) as f: code = f.read().replace(r'\r\n', r'\n') - with no_install_setup_requires(): - exec(compile(code, __file__, 'exec'), locals()) + exec(compile(code, __file__, 'exec'), locals()) def get_requires_for_build_wheel(self, config_settings=None): config_settings = self._fix_config(config_settings) @@ -171,7 +170,8 @@ def prepare_metadata_for_build_wheel(self, metadata_directory, config_settings=None): sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', _to_str(metadata_directory)] - self.run_setup() + with no_install_setup_requires(): + self.run_setup() dist_info_directory = metadata_directory while True: @@ -211,7 +211,8 @@ def _build_with_temp_dir(self, setup_command, result_extension, sys.argv = (sys.argv[:1] + setup_command + ['--dist-dir', tmp_dist_dir] + config_settings["--global-option"]) - self.run_setup() + with no_install_setup_requires(): + self.run_setup() result_basename = _file_with_extension( tmp_dist_dir, result_extension) From 8a4b06dbdde7fb3249329b5311f5b5707510fa88 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 6 Aug 2020 10:13:21 +0100 Subject: [PATCH 8083/8469] Add test for PEP 517 backends not installing setup_requires --- setuptools/tests/test_build_meta.py | 32 ++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 8fcf3055ff..f1860b69e6 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -380,7 +380,7 @@ def test_setup_requires(self, setup_literal, requirements, use_wheel, setup( name="qux", version="0.0.0", - py_modules=["hello.py"], + py_modules=["hello"], setup_requires={setup_literal}, ) """).format(setup_literal=setup_literal), @@ -407,6 +407,36 @@ def run(): assert expected == sorted(actual) + def test_dont_install_setup_requires(self, tmpdir_cwd): + files = { + 'setup.py': DALS(""" + from setuptools import setup + + setup( + name="qux", + version="0.0.0", + py_modules=["hello"], + setup_requires=["does-not-exist >99"], + ) + """), + 'hello.py': DALS(""" + def run(): + print('hello') + """), + } + + build_files(files) + + build_backend = self.get_build_backend() + + dist_dir = os.path.abspath('pip-dist-info') + os.makedirs(dist_dir) + + # does-not-exist can't be satisfied, so if it attempts to install + # setup_requires, it will fail. + build_backend.prepare_metadata_for_build_wheel(dist_dir) + + _sys_argv_0_passthrough = { 'setup.py': DALS(""" import os From a78f42ef07c9b9db778087675ad0d84ab9548425 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 6 Aug 2020 10:16:22 +0100 Subject: [PATCH 8084/8469] Add news fragment --- changelog.d/2306.change.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/2306.change.rst diff --git a/changelog.d/2306.change.rst b/changelog.d/2306.change.rst new file mode 100644 index 0000000000..1046eae3f8 --- /dev/null +++ b/changelog.d/2306.change.rst @@ -0,0 +1,3 @@ +When running as a PEP 517 backend, setuptools does not try to install +``setup_requires`` itself. They are reported as build requirements for the +frontend to install. From d2883ac4f1d94c16a1ab279e7b1065558b67da4b Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 6 Aug 2020 10:23:51 +0100 Subject: [PATCH 8085/8469] Flake 99 --- setuptools/tests/test_build_meta.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index f1860b69e6..fdb4b95010 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -436,7 +436,6 @@ def run(): # setup_requires, it will fail. build_backend.prepare_metadata_for_build_wheel(dist_dir) - _sys_argv_0_passthrough = { 'setup.py': DALS(""" import os From 485703c854f59d226c2f231e7c5f4f91263a4463 Mon Sep 17 00:00:00 2001 From: raimon Date: Sat, 8 Aug 2020 20:33:27 +0900 Subject: [PATCH 8086/8469] Provide consistency in the description of setup.cfg --- docs/setuptools.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 7e0914b7dc..d60c87a026 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -1988,11 +1988,11 @@ boilerplate code in some cases. include_package_data = True packages = find: scripts = - bin/first.py - bin/second.py + bin/first.py + bin/second.py install_requires = - requests - importlib; python_version == "2.6" + requests + importlib; python_version == "2.6" [options.package_data] * = *.txt, *.rst @@ -2028,8 +2028,8 @@ Metadata and options are set in the config sections of the same name. [metadata] keywords = - one - two + one + two * In some cases, complex values can be provided in dedicated subsections for clarity. From 7c3a3817923de67956656ea058e80669b77bed1f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 11:44:12 -0400 Subject: [PATCH 8087/8469] Add tests capturing expected distutils behavior. Ref #417. --- setuptools/tests/test_distutils_adoption.py | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 setuptools/tests/test_distutils_adoption.py diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py new file mode 100644 index 0000000000..f4c7072d5c --- /dev/null +++ b/setuptools/tests/test_distutils_adoption.py @@ -0,0 +1,37 @@ +import os +import pytest + + +@pytest.fixture +def env(virtualenv): + virtualenv.run(['pip', 'uninstall', '-y', 'setuptools']) + virtualenv.run(['pip', 'install', os.getcwd()]) + return virtualenv + + +def find_distutils(env, imports='distutils'): + py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals()) + cmd = ['python', '-c', py_cmd] + return env.run(cmd, capture=True, text=True) + + +def test_distutils_stdlib(env): + """ + Ensure stdlib distutils is used when appropriate. + """ + assert '.env' not in find_distutils(env).split(os.sep) + + +def test_distutils_local_with_setuptools(env): + """ + Ensure local distutils is used when appropriate. + """ + env.env.update(SETUPTOOLS_USE_DISTUTILS='local') + loc = find_distutils(env, imports='setuptools, distutils') + assert '.env' in loc.split(os.sep) + + +@pytest.mark.xfail(reason="#2259") +def test_distutils_local(env): + env.env.update(SETUPTOOLS_USE_DISTUTILS='local') + assert '.env' in find_distutils(env).split(os.sep) From 6281bd0917882b930d5923d76cc72ff4ee5a7695 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 12:15:13 -0400 Subject: [PATCH 8088/8469] Support Python 3.5 and 3.6 in the tests. --- setuptools/tests/test_distutils_adoption.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index f4c7072d5c..a945a69fb3 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -1,7 +1,18 @@ import os +import sys +import functools + import pytest +def popen_text(call): + """ + Augment the Popen call with the parameters to ensure unicode text. + """ + return functools.partial(call, universal_newlines=True) \ + if sys.version_info < (3, 7) else functools.partial(call, text=True) + + @pytest.fixture def env(virtualenv): virtualenv.run(['pip', 'uninstall', '-y', 'setuptools']) @@ -12,7 +23,7 @@ def env(virtualenv): def find_distutils(env, imports='distutils'): py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals()) cmd = ['python', '-c', py_cmd] - return env.run(cmd, capture=True, text=True) + return popen_text(env.run)(cmd, capture=True) def test_distutils_stdlib(env): From 41deeb76fc88382f27b3d37cce75eda2c54cbc2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 15:53:41 -0400 Subject: [PATCH 8089/8469] Bypass pytest-virtualenv due to bugs in 'run' command. Instead, use jaraco.envs.VirtualEnv and build a bespoke fixture with a run command. --- setup.cfg | 1 + setuptools/tests/requirements.txt | 1 + setuptools/tests/test_distutils_adoption.py | 48 +++++++++++++-------- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/setup.cfg b/setup.cfg index 485714a3b6..87fa6bf273 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,6 +72,7 @@ tests = paver; python_version>="3.6" futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. + jaraco.envs docs = # Keep these in sync with docs/requirements.txt diff --git a/setuptools/tests/requirements.txt b/setuptools/tests/requirements.txt index 19bf5aefd0..d0d07f70c0 100644 --- a/setuptools/tests/requirements.txt +++ b/setuptools/tests/requirements.txt @@ -10,3 +10,4 @@ pytest-cov>=2.5.1 paver; python_version>="3.6" futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. +jaraco.envs diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index a945a69fb3..476b0a9e4b 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -1,8 +1,27 @@ import os import sys import functools +import subprocess import pytest +import jaraco.envs +import path + + +class VirtualEnv(jaraco.envs.VirtualEnv): + name = '.env' + + def run(self, cmd, *args, **kwargs): + cmd = [self.exe(cmd[0])] + cmd[1:] + return subprocess.check_output(cmd, *args, cwd=self.root, **kwargs) + + +@pytest.fixture +def venv(tmpdir): + env = VirtualEnv() + env.root = path.Path(tmpdir) + env.req = os.getcwd() + return env.create() def popen_text(call): @@ -13,36 +32,29 @@ def popen_text(call): if sys.version_info < (3, 7) else functools.partial(call, text=True) -@pytest.fixture -def env(virtualenv): - virtualenv.run(['pip', 'uninstall', '-y', 'setuptools']) - virtualenv.run(['pip', 'install', os.getcwd()]) - return virtualenv - - -def find_distutils(env, imports='distutils'): +def find_distutils(venv, imports='distutils', **kwargs): py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals()) cmd = ['python', '-c', py_cmd] - return popen_text(env.run)(cmd, capture=True) + return popen_text(venv.run)(cmd, **kwargs) -def test_distutils_stdlib(env): +def test_distutils_stdlib(venv): """ Ensure stdlib distutils is used when appropriate. """ - assert '.env' not in find_distutils(env).split(os.sep) + assert venv.name not in find_distutils(venv, env=dict()).split(os.sep) -def test_distutils_local_with_setuptools(env): +def test_distutils_local_with_setuptools(venv): """ Ensure local distutils is used when appropriate. """ - env.env.update(SETUPTOOLS_USE_DISTUTILS='local') - loc = find_distutils(env, imports='setuptools, distutils') - assert '.env' in loc.split(os.sep) + env = dict(SETUPTOOLS_USE_DISTUTILS='local') + loc = find_distutils(venv, imports='setuptools, distutils', env=env) + assert venv.name in loc.split(os.sep) @pytest.mark.xfail(reason="#2259") -def test_distutils_local(env): - env.env.update(SETUPTOOLS_USE_DISTUTILS='local') - assert '.env' in find_distutils(env).split(os.sep) +def test_distutils_local(venv): + env = dict(SETUPTOOLS_USE_DISTUTILS='local') + assert venv.name in find_distutils(venv, env=env).split(os.sep) From 47ae38fd6f233e6423404bfebfd24d3b98fb897c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 17:01:41 -0400 Subject: [PATCH 8090/8469] On Windows, SYSTEMROOT must be supplied. --- setuptools/tests/test_distutils_adoption.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 476b0a9e4b..7f28a217d6 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -2,6 +2,7 @@ import sys import functools import subprocess +import platform import pytest import jaraco.envs @@ -32,10 +33,12 @@ def popen_text(call): if sys.version_info < (3, 7) else functools.partial(call, text=True) -def find_distutils(venv, imports='distutils', **kwargs): +def find_distutils(venv, imports='distutils', env=None, **kwargs): py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals()) cmd = ['python', '-c', py_cmd] - return popen_text(venv.run)(cmd, **kwargs) + if platform.system() == 'Windows': + env['SYSTEMROOT'] = os.environ['SYSTEMROOT'] + return popen_text(venv.run)(cmd, env=env, **kwargs) def test_distutils_stdlib(venv): From 48a17a56ecfc77fb60780e3cfa75390f6bb10b15 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 12:22:05 -0400 Subject: [PATCH 8091/8469] As discovered in bpo-41509, relpath can strip spaces, so match that expectation. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 37953051b0..5d98c029c5 100755 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def _restore_install_lib(self): """ suffix = os.path.relpath(self.install_lib, self.install_libbase) - if suffix == self._pth_contents: + if suffix.strip() == self._pth_contents.strip(): self.install_lib = self.install_libbase From 6b70fb201d6a81448de6ca6f71d7091b9a26096c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 13:38:56 -0400 Subject: [PATCH 8092/8469] Restore location of 'enabled' --- _distutils_hack/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index a10af2cc94..71fa7ce1b9 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -8,14 +8,6 @@ is_pypy = '__pypy__' in sys.builtin_module_names -def enabled(): - """ - Allow selection of distutils by environment variable. - """ - which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') - return which == 'local' - - def warn_distutils_present(): if 'distutils' not in sys.modules: return @@ -38,6 +30,14 @@ def clear_distutils(): del sys.modules[name] +def enabled(): + """ + Allow selection of distutils by environment variable. + """ + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') + return which == 'local' + + def ensure_local_distutils(): clear_distutils() distutils = importlib.import_module('setuptools._distutils') From 521987da809e63ee51a63aa45dbe372d40deb8f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 19:50:24 -0400 Subject: [PATCH 8093/8469] Remove expected fail. --- setuptools/tests/test_distutils_adoption.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 7f28a217d6..bb8e34d558 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -57,7 +57,10 @@ def test_distutils_local_with_setuptools(venv): assert venv.name in loc.split(os.sep) -@pytest.mark.xfail(reason="#2259") def test_distutils_local(venv): + """ + Even without importing, the setuptools-local copy of distutils is + preferred. + """ env = dict(SETUPTOOLS_USE_DISTUTILS='local') assert venv.name in find_distutils(venv, env=env).split(os.sep) From 7cf009a7e39270e1e1d13d913e0c352fb00534c0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 20:58:57 -0400 Subject: [PATCH 8094/8469] Expect test to fail on PyPy due to implicit import during startup. --- setuptools/tests/test_distutils_adoption.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index bb8e34d558..daccc473c2 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -9,6 +9,9 @@ import path +IS_PYPY = '__pypy__' in sys.builtin_module_names + + class VirtualEnv(jaraco.envs.VirtualEnv): name = '.env' @@ -57,6 +60,7 @@ def test_distutils_local_with_setuptools(venv): assert venv.name in loc.split(os.sep) +@pytest.mark.xfail('IS_PYPY', reason='pypy imports distutils on startup') def test_distutils_local(venv): """ Even without importing, the setuptools-local copy of distutils is From 9d7b246c0f40fabb25741a023849bf14919e408d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 9 Aug 2020 14:50:22 -0400 Subject: [PATCH 8095/8469] =?UTF-8?q?Bump=20version:=2049.2.1=20=E2=86=92?= =?UTF-8?q?=2049.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2259.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2259.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b534af1bc1..99e5def842 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.2.1 +current_version = 49.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 519330ebe9..da0eada3f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.3.0 +------- + +* #2259: Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable. + + v49.2.1 ------- diff --git a/changelog.d/2259.change.rst b/changelog.d/2259.change.rst deleted file mode 100644 index 43701ec23b..0000000000 --- a/changelog.d/2259.change.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable. diff --git a/setup.cfg b/setup.cfg index 87fa6bf273..fd3b11e6c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.2.1 +version = 49.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 33c9d86af4dc1df04cf1b38a0102fe7e121173ec Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 10 Aug 2020 21:10:46 +1000 Subject: [PATCH 8096/8469] Change load_module to exec_module --- setuptools/command/bdist_egg.py | 7 ++++--- setuptools/command/build_ext.py | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 7af3165cd5..4be1545789 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -55,11 +55,12 @@ def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): global __bootstrap__, __loader__, __file__ - import sys, pkg_resources - from importlib.machinery import ExtensionFileLoader + import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ - ExtensionFileLoader(__name__,__file__).load_module() + spec = importlib.util.spec_from_file_location(__name__,__file__) + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) __bootstrap__() """).lstrip() with open(pyfile, 'w') as f: diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 0eb29adc8b..89a0e328f9 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -254,8 +254,8 @@ def write_stub(self, output_dir, ext, compile=False): '\n'.join([ "def __bootstrap__():", " global __bootstrap__, __file__, __loader__", - " import sys, os, pkg_resources" + if_dl(", dl"), - " from importlib.machinery import ExtensionFileLoader", + " import sys, os, pkg_resources, importlib.util" + + if_dl(", dl"), " __file__ = pkg_resources.resource_filename" "(__name__,%r)" % os.path.basename(ext._file_name), @@ -267,8 +267,10 @@ def write_stub(self, output_dir, ext, compile=False): " try:", " os.chdir(os.path.dirname(__file__))", if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), - " ExtensionFileLoader(__name__,", - " __file__).load_module()", + " spec = importlib.util.spec_from_file_location(", + " __name__, __file__)", + " mod = importlib.util.module_from_spec(spec)", + " spec.loader.exec_module(mod)", " finally:", if_dl(" sys.setdlopenflags(old_flags)"), " os.chdir(old_dir)", From 1410a8e6fda5fb8cd78f915e1ffd68f6c7f35af3 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 10 Aug 2020 09:18:46 -0400 Subject: [PATCH 8097/8469] Fix issue with distutils warning --- _distutils_hack/__init__.py | 11 +++++++---- changelog.d/2316.change.rst | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 changelog.d/2316.change.rst diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 71fa7ce1b9..1e7b294bc2 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -16,9 +16,12 @@ def warn_distutils_present(): # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 return warnings.warn( - "Distutils was imported before Setuptools. This usage is discouraged " - "and may exhibit undesirable behaviors or errors. Please use " - "Setuptools' objects directly or at least import Setuptools first.") + "Distutils was imported before Setuptools, but importing Setuptools " + "also replaces the `distutils` module in `sys.modules`. This may lead " + "to undesirable behaviors or errors. To avoid these issues, avoid " + "using distutils directly, ensure that setuptools is installed in the " + "traditional way (e.g. not an editable install), and/or make sure that " + "setuptools is always imported before distutils.") def clear_distutils(): @@ -56,8 +59,8 @@ def do_override(): See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ - warn_distutils_present() if enabled(): + warn_distutils_present() ensure_local_distutils() diff --git a/changelog.d/2316.change.rst b/changelog.d/2316.change.rst new file mode 100644 index 0000000000..7d506b093f --- /dev/null +++ b/changelog.d/2316.change.rst @@ -0,0 +1 @@ +Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. From 0b111ad040887a39e4821ebe5198d4246af0253c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 10 Aug 2020 11:02:31 -0400 Subject: [PATCH 8098/8469] =?UTF-8?q?Bump=20version:=2049.3.0=20=E2=86=92?= =?UTF-8?q?=2049.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2316.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2316.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 99e5def842..bb1e621f16 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.3.0 +current_version = 49.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index da0eada3f2..df0230e75f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +vv49.3.1 +-------- + +* #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. + + v49.3.0 ------- diff --git a/changelog.d/2316.change.rst b/changelog.d/2316.change.rst deleted file mode 100644 index 7d506b093f..0000000000 --- a/changelog.d/2316.change.rst +++ /dev/null @@ -1 +0,0 @@ -Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. diff --git a/setup.cfg b/setup.cfg index fd3b11e6c6..52440198d2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.3.0 +version = 49.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 5ad59e64b35b9444a42a75f9d454802f0916e209 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 10 Aug 2020 11:45:22 -0400 Subject: [PATCH 8099/8469] Remove superfluous 'v' in CHANGES.rst This was an artifact of the fact that I did not use `tox -e finalize` to do the latest release in order to make a patch release. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index df0230e75f..b7c0a018ad 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -vv49.3.1 +v49.3.1 -------- * #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. From 3af54b4b0e31c3f56bbb229cdba58ce8a70fa38b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 12 Aug 2020 16:22:34 -0400 Subject: [PATCH 8100/8469] Update changelog. --- changelog.d/2297.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2297.misc.rst diff --git a/changelog.d/2297.misc.rst b/changelog.d/2297.misc.rst new file mode 100644 index 0000000000..40340324fb --- /dev/null +++ b/changelog.d/2297.misc.rst @@ -0,0 +1 @@ +Once again, in stubs prefer exec_module to the deprecated load_module. From ff4ba978e5c32c44311d9d9817ddee9e1c6c972b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 12 Aug 2020 17:01:10 -0400 Subject: [PATCH 8101/8469] =?UTF-8?q?Bump=20version:=2049.3.1=20=E2=86=92?= =?UTF-8?q?=2049.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/2297.misc.rst | 1 - changelog.d/2300.doc.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/2297.misc.rst delete mode 100644 changelog.d/2300.doc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index bb1e621f16..5e0d7fd7a6 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.3.1 +current_version = 49.3.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index b7c0a018ad..2add741a5e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v49.3.2 +------- + +* #2300: Improve the ``safe_version`` function documentation +* #2297: Once again, in stubs prefer exec_module to the deprecated load_module. + + v49.3.1 -------- diff --git a/changelog.d/2297.misc.rst b/changelog.d/2297.misc.rst deleted file mode 100644 index 40340324fb..0000000000 --- a/changelog.d/2297.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Once again, in stubs prefer exec_module to the deprecated load_module. diff --git a/changelog.d/2300.doc.rst b/changelog.d/2300.doc.rst deleted file mode 100644 index 3b06cc5f11..0000000000 --- a/changelog.d/2300.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Improve the ``safe_version`` function documentation diff --git a/setup.cfg b/setup.cfg index 52440198d2..5d4a084cdf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.3.1 +version = 49.3.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From fac13f0d9950b7c06de650bf4ea226cb2789afc3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 12 Aug 2020 17:01:55 -0400 Subject: [PATCH 8102/8469] Clean up RST. --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2add741a5e..0d2c96c39b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ v49.3.2 v49.3.1 --------- +------- * #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. From 1b27726f6b5922658a5968aa0b7a92fb76bc0ade Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 12 Aug 2020 19:57:03 -0400 Subject: [PATCH 8103/8469] Update packaging to 20.4. Closes #2310. --- pkg_resources/_vendor/packaging/__about__.py | 4 +- pkg_resources/_vendor/packaging/_compat.py | 9 +- .../_vendor/packaging/_structures.py | 26 +- pkg_resources/_vendor/packaging/_typing.py | 48 ++ pkg_resources/_vendor/packaging/markers.py | 54 +- pkg_resources/_vendor/packaging/py.typed | 0 .../_vendor/packaging/requirements.py | 9 +- pkg_resources/_vendor/packaging/specifiers.py | 190 ++++-- pkg_resources/_vendor/packaging/tags.py | 569 ++++++++++++++---- pkg_resources/_vendor/packaging/utils.py | 18 +- pkg_resources/_vendor/packaging/version.py | 151 ++++- pkg_resources/_vendor/vendored.txt | 2 +- setuptools/_vendor/packaging/__about__.py | 4 +- setuptools/_vendor/packaging/_compat.py | 9 +- setuptools/_vendor/packaging/_structures.py | 26 +- setuptools/_vendor/packaging/_typing.py | 48 ++ setuptools/_vendor/packaging/markers.py | 54 +- setuptools/_vendor/packaging/py.typed | 0 setuptools/_vendor/packaging/requirements.py | 9 +- setuptools/_vendor/packaging/specifiers.py | 190 ++++-- setuptools/_vendor/packaging/tags.py | 569 ++++++++++++++---- setuptools/_vendor/packaging/utils.py | 18 +- setuptools/_vendor/packaging/version.py | 151 ++++- setuptools/_vendor/vendored.txt | 2 +- 24 files changed, 1776 insertions(+), 384 deletions(-) create mode 100644 pkg_resources/_vendor/packaging/_typing.py create mode 100644 pkg_resources/_vendor/packaging/py.typed create mode 100644 setuptools/_vendor/packaging/_typing.py create mode 100644 setuptools/_vendor/packaging/py.typed diff --git a/pkg_resources/_vendor/packaging/__about__.py b/pkg_resources/_vendor/packaging/__about__.py index dc95138d04..4d998578d7 100644 --- a/pkg_resources/_vendor/packaging/__about__.py +++ b/pkg_resources/_vendor/packaging/__about__.py @@ -18,10 +18,10 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "19.2" +__version__ = "20.4" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" -__license__ = "BSD or Apache License, Version 2.0" +__license__ = "BSD-2-Clause or Apache-2.0" __copyright__ = "Copyright 2014-2019 %s" % __author__ diff --git a/pkg_resources/_vendor/packaging/_compat.py b/pkg_resources/_vendor/packaging/_compat.py index 25da473c19..e54bd4ede8 100644 --- a/pkg_resources/_vendor/packaging/_compat.py +++ b/pkg_resources/_vendor/packaging/_compat.py @@ -5,6 +5,11 @@ import sys +from ._typing import TYPE_CHECKING + +if TYPE_CHECKING: # pragma: no cover + from typing import Any, Dict, Tuple, Type + PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 @@ -18,14 +23,16 @@ def with_metaclass(meta, *bases): + # type: (Type[Any], Tuple[Type[Any], ...]) -> Any """ Create a base class with a metaclass. """ # This requires a bit of explanation: the basic idea is to make a dummy # metaclass for one level of class instantiation that replaces itself with # the actual metaclass. - class metaclass(meta): + class metaclass(meta): # type: ignore def __new__(cls, name, this_bases, d): + # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any return meta(name, bases, d) return type.__new__(metaclass, "temporary_class", (), {}) diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py index 68dcca634d..800d5c5588 100644 --- a/pkg_resources/_vendor/packaging/_structures.py +++ b/pkg_resources/_vendor/packaging/_structures.py @@ -4,65 +4,83 @@ from __future__ import absolute_import, division, print_function -class Infinity(object): +class InfinityType(object): def __repr__(self): + # type: () -> str return "Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return False def __le__(self, other): + # type: (object) -> bool return False def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return True def __ge__(self, other): + # type: (object) -> bool return True def __neg__(self): + # type: (object) -> NegativeInfinityType return NegativeInfinity -Infinity = Infinity() +Infinity = InfinityType() -class NegativeInfinity(object): +class NegativeInfinityType(object): def __repr__(self): + # type: () -> str return "-Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return True def __le__(self, other): + # type: (object) -> bool return True def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return False def __ge__(self, other): + # type: (object) -> bool return False def __neg__(self): + # type: (object) -> InfinityType return Infinity -NegativeInfinity = NegativeInfinity() +NegativeInfinity = NegativeInfinityType() diff --git a/pkg_resources/_vendor/packaging/_typing.py b/pkg_resources/_vendor/packaging/_typing.py new file mode 100644 index 0000000000..77a8b9185a --- /dev/null +++ b/pkg_resources/_vendor/packaging/_typing.py @@ -0,0 +1,48 @@ +"""For neatly implementing static typing in packaging. + +`mypy` - the static type analysis tool we use - uses the `typing` module, which +provides core functionality fundamental to mypy's functioning. + +Generally, `typing` would be imported at runtime and used in that fashion - +it acts as a no-op at runtime and does not have any run-time overhead by +design. + +As it turns out, `typing` is not vendorable - it uses separate sources for +Python 2/Python 3. Thus, this codebase can not expect it to be present. +To work around this, mypy allows the typing import to be behind a False-y +optional to prevent it from running at runtime and type-comments can be used +to remove the need for the types to be accessible directly during runtime. + +This module provides the False-y guard in a nicely named fashion so that a +curious maintainer can reach here to read this. + +In packaging, all static-typing related imports should be guarded as follows: + + from packaging._typing import TYPE_CHECKING + + if TYPE_CHECKING: + from typing import ... + +Ref: https://github.com/python/mypy/issues/3216 +""" + +__all__ = ["TYPE_CHECKING", "cast"] + +# The TYPE_CHECKING constant defined by the typing module is False at runtime +# but True while type checking. +if False: # pragma: no cover + from typing import TYPE_CHECKING +else: + TYPE_CHECKING = False + +# typing's cast syntax requires calling typing.cast at runtime, but we don't +# want to import typing at runtime. Here, we inform the type checkers that +# we're importing `typing.cast` as `cast` and re-implement typing.cast's +# runtime behavior in a block that is ignored by type checkers. +if TYPE_CHECKING: # pragma: no cover + # not executed at runtime + from typing import cast +else: + # executed at runtime + def cast(type_, value): # noqa + return value diff --git a/pkg_resources/_vendor/packaging/markers.py b/pkg_resources/_vendor/packaging/markers.py index 733123fb32..fd1559c10e 100644 --- a/pkg_resources/_vendor/packaging/markers.py +++ b/pkg_resources/_vendor/packaging/markers.py @@ -13,8 +13,14 @@ from pkg_resources.extern.pyparsing import Literal as L # noqa from ._compat import string_types +from ._typing import TYPE_CHECKING from .specifiers import Specifier, InvalidSpecifier +if TYPE_CHECKING: # pragma: no cover + from typing import Any, Callable, Dict, List, Optional, Tuple, Union + + Operator = Callable[[str, str], bool] + __all__ = [ "InvalidMarker", @@ -46,30 +52,37 @@ class UndefinedEnvironmentName(ValueError): class Node(object): def __init__(self, value): + # type: (Any) -> None self.value = value def __str__(self): + # type: () -> str return str(self.value) def __repr__(self): + # type: () -> str return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) def serialize(self): + # type: () -> str raise NotImplementedError class Variable(Node): def serialize(self): + # type: () -> str return str(self) class Value(Node): def serialize(self): + # type: () -> str return '"{0}"'.format(self) class Op(Node): def serialize(self): + # type: () -> str return str(self) @@ -85,13 +98,13 @@ def serialize(self): | L("python_version") | L("sys_platform") | L("os_name") - | L("os.name") + | L("os.name") # PEP-345 | L("sys.platform") # PEP-345 | L("platform.version") # PEP-345 | L("platform.machine") # PEP-345 | L("platform.python_implementation") # PEP-345 - | L("python_implementation") # PEP-345 - | L("extra") # undocumented setuptools legacy + | L("python_implementation") # undocumented setuptools legacy + | L("extra") # PEP-508 ) ALIASES = { "os.name": "os_name", @@ -131,6 +144,7 @@ def serialize(self): def _coerce_parse_result(results): + # type: (Union[ParseResults, List[Any]]) -> List[Any] if isinstance(results, ParseResults): return [_coerce_parse_result(i) for i in results] else: @@ -138,6 +152,8 @@ def _coerce_parse_result(results): def _format_marker(marker, first=True): + # type: (Union[List[str], Tuple[Node, ...], str], Optional[bool]) -> str + assert isinstance(marker, (list, tuple, string_types)) # Sometimes we have a structure like [[...]] which is a single item list @@ -172,10 +188,11 @@ def _format_marker(marker, first=True): "!=": operator.ne, ">=": operator.ge, ">": operator.gt, -} +} # type: Dict[str, Operator] def _eval_op(lhs, op, rhs): + # type: (str, Op, str) -> bool try: spec = Specifier("".join([op.serialize(), rhs])) except InvalidSpecifier: @@ -183,7 +200,7 @@ def _eval_op(lhs, op, rhs): else: return spec.contains(lhs) - oper = _operators.get(op.serialize()) + oper = _operators.get(op.serialize()) # type: Optional[Operator] if oper is None: raise UndefinedComparison( "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) @@ -192,13 +209,18 @@ def _eval_op(lhs, op, rhs): return oper(lhs, rhs) -_undefined = object() +class Undefined(object): + pass + + +_undefined = Undefined() def _get_env(environment, name): - value = environment.get(name, _undefined) + # type: (Dict[str, str], str) -> str + value = environment.get(name, _undefined) # type: Union[str, Undefined] - if value is _undefined: + if isinstance(value, Undefined): raise UndefinedEnvironmentName( "{0!r} does not exist in evaluation environment.".format(name) ) @@ -207,7 +229,8 @@ def _get_env(environment, name): def _evaluate_markers(markers, environment): - groups = [[]] + # type: (List[Any], Dict[str, str]) -> bool + groups = [[]] # type: List[List[bool]] for marker in markers: assert isinstance(marker, (list, tuple, string_types)) @@ -234,6 +257,7 @@ def _evaluate_markers(markers, environment): def format_full_version(info): + # type: (sys._version_info) -> str version = "{0.major}.{0.minor}.{0.micro}".format(info) kind = info.releaselevel if kind != "final": @@ -242,9 +266,13 @@ def format_full_version(info): def default_environment(): + # type: () -> Dict[str, str] if hasattr(sys, "implementation"): - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name + # Ignoring the `sys.implementation` reference for type checking due to + # mypy not liking that the attribute doesn't exist in Python 2.7 when + # run with the `--py27` flag. + iver = format_full_version(sys.implementation.version) # type: ignore + implementation_name = sys.implementation.name # type: ignore else: iver = "0" implementation_name = "" @@ -266,6 +294,7 @@ def default_environment(): class Marker(object): def __init__(self, marker): + # type: (str) -> None try: self._markers = _coerce_parse_result(MARKER.parseString(marker)) except ParseException as e: @@ -275,12 +304,15 @@ def __init__(self, marker): raise InvalidMarker(err_str) def __str__(self): + # type: () -> str return _format_marker(self._markers) def __repr__(self): + # type: () -> str return "".format(str(self)) def evaluate(self, environment=None): + # type: (Optional[Dict[str, str]]) -> bool """Evaluate a marker. Return the boolean from evaluating the given marker against the diff --git a/pkg_resources/_vendor/packaging/py.typed b/pkg_resources/_vendor/packaging/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index c3424dcb64..8282a63259 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -11,9 +11,13 @@ from pkg_resources.extern.pyparsing import Literal as L # noqa from pkg_resources.extern.six.moves.urllib import parse as urlparse +from ._typing import TYPE_CHECKING from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet +if TYPE_CHECKING: # pragma: no cover + from typing import List + class InvalidRequirement(ValueError): """ @@ -89,6 +93,7 @@ class Requirement(object): # TODO: Can we normalize the name and extra name? def __init__(self, requirement_string): + # type: (str) -> None try: req = REQUIREMENT.parseString(requirement_string) except ParseException as e: @@ -116,7 +121,8 @@ def __init__(self, requirement_string): self.marker = req.marker if req.marker else None def __str__(self): - parts = [self.name] + # type: () -> str + parts = [self.name] # type: List[str] if self.extras: parts.append("[{0}]".format(",".join(sorted(self.extras)))) @@ -135,4 +141,5 @@ def __str__(self): return "".join(parts) def __repr__(self): + # type: () -> str return "".format(str(self)) diff --git a/pkg_resources/_vendor/packaging/specifiers.py b/pkg_resources/_vendor/packaging/specifiers.py index 743576a080..fe09bb1dbb 100644 --- a/pkg_resources/_vendor/packaging/specifiers.py +++ b/pkg_resources/_vendor/packaging/specifiers.py @@ -9,8 +9,27 @@ import re from ._compat import string_types, with_metaclass +from ._typing import TYPE_CHECKING +from .utils import canonicalize_version from .version import Version, LegacyVersion, parse +if TYPE_CHECKING: # pragma: no cover + from typing import ( + List, + Dict, + Union, + Iterable, + Iterator, + Optional, + Callable, + Tuple, + FrozenSet, + ) + + ParsedVersion = Union[Version, LegacyVersion] + UnparsedVersion = Union[Version, LegacyVersion, str] + CallableOperator = Callable[[ParsedVersion, str], bool] + class InvalidSpecifier(ValueError): """ @@ -18,9 +37,10 @@ class InvalidSpecifier(ValueError): """ -class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): +class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): # type: ignore @abc.abstractmethod def __str__(self): + # type: () -> str """ Returns the str representation of this Specifier like object. This should be representative of the Specifier itself. @@ -28,12 +48,14 @@ def __str__(self): @abc.abstractmethod def __hash__(self): + # type: () -> int """ Returns a hash value for this Specifier like object. """ @abc.abstractmethod def __eq__(self, other): + # type: (object) -> bool """ Returns a boolean representing whether or not the two Specifier like objects are equal. @@ -41,6 +63,7 @@ def __eq__(self, other): @abc.abstractmethod def __ne__(self, other): + # type: (object) -> bool """ Returns a boolean representing whether or not the two Specifier like objects are not equal. @@ -48,6 +71,7 @@ def __ne__(self, other): @abc.abstractproperty def prereleases(self): + # type: () -> Optional[bool] """ Returns whether or not pre-releases as a whole are allowed by this specifier. @@ -55,6 +79,7 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None """ Sets whether or not pre-releases as a whole are allowed by this specifier. @@ -62,12 +87,14 @@ def prereleases(self, value): @abc.abstractmethod def contains(self, item, prereleases=None): + # type: (str, Optional[bool]) -> bool """ Determines if the given item is contained within this specifier. """ @abc.abstractmethod def filter(self, iterable, prereleases=None): + # type: (Iterable[UnparsedVersion], Optional[bool]) -> Iterable[UnparsedVersion] """ Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. @@ -76,19 +103,24 @@ def filter(self, iterable, prereleases=None): class _IndividualSpecifier(BaseSpecifier): - _operators = {} + _operators = {} # type: Dict[str, str] def __init__(self, spec="", prereleases=None): + # type: (str, Optional[bool]) -> None match = self._regex.search(spec) if not match: raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) - self._spec = (match.group("operator").strip(), match.group("version").strip()) + self._spec = ( + match.group("operator").strip(), + match.group("version").strip(), + ) # type: Tuple[str, str] # Store whether or not this Specifier should accept prereleases self._prereleases = prereleases def __repr__(self): + # type: () -> str pre = ( ", prereleases={0!r}".format(self.prereleases) if self._prereleases is not None @@ -98,26 +130,35 @@ def __repr__(self): return "<{0}({1!r}{2})>".format(self.__class__.__name__, str(self), pre) def __str__(self): + # type: () -> str return "{0}{1}".format(*self._spec) + @property + def _canonical_spec(self): + # type: () -> Tuple[str, Union[Version, str]] + return self._spec[0], canonicalize_version(self._spec[1]) + def __hash__(self): - return hash(self._spec) + # type: () -> int + return hash(self._canonical_spec) def __eq__(self, other): + # type: (object) -> bool if isinstance(other, string_types): try: - other = self.__class__(other) + other = self.__class__(str(other)) except InvalidSpecifier: return NotImplemented elif not isinstance(other, self.__class__): return NotImplemented - return self._spec == other._spec + return self._canonical_spec == other._canonical_spec def __ne__(self, other): + # type: (object) -> bool if isinstance(other, string_types): try: - other = self.__class__(other) + other = self.__class__(str(other)) except InvalidSpecifier: return NotImplemented elif not isinstance(other, self.__class__): @@ -126,52 +167,67 @@ def __ne__(self, other): return self._spec != other._spec def _get_operator(self, op): - return getattr(self, "_compare_{0}".format(self._operators[op])) + # type: (str) -> CallableOperator + operator_callable = getattr( + self, "_compare_{0}".format(self._operators[op]) + ) # type: CallableOperator + return operator_callable def _coerce_version(self, version): + # type: (UnparsedVersion) -> ParsedVersion if not isinstance(version, (LegacyVersion, Version)): version = parse(version) return version @property def operator(self): + # type: () -> str return self._spec[0] @property def version(self): + # type: () -> str return self._spec[1] @property def prereleases(self): + # type: () -> Optional[bool] return self._prereleases @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value def __contains__(self, item): + # type: (str) -> bool return self.contains(item) def contains(self, item, prereleases=None): + # type: (UnparsedVersion, Optional[bool]) -> bool + # Determine if prereleases are to be allowed or not. if prereleases is None: prereleases = self.prereleases # Normalize item to a Version or LegacyVersion, this allows us to have # a shortcut for ``"2.0" in Specifier(">=2") - item = self._coerce_version(item) + normalized_item = self._coerce_version(item) # Determine if we should be supporting prereleases in this specifier # or not, if we do not support prereleases than we can short circuit # logic if this version is a prereleases. - if item.is_prerelease and not prereleases: + if normalized_item.is_prerelease and not prereleases: return False # Actually do the comparison to determine if this item is contained # within this Specifier or not. - return self._get_operator(self.operator)(item, self.version) + operator_callable = self._get_operator(self.operator) # type: CallableOperator + return operator_callable(normalized_item, self.version) def filter(self, iterable, prereleases=None): + # type: (Iterable[UnparsedVersion], Optional[bool]) -> Iterable[UnparsedVersion] + yielded = False found_prereleases = [] @@ -230,32 +286,43 @@ class LegacySpecifier(_IndividualSpecifier): } def _coerce_version(self, version): + # type: (Union[ParsedVersion, str]) -> LegacyVersion if not isinstance(version, LegacyVersion): version = LegacyVersion(str(version)) return version def _compare_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective == self._coerce_version(spec) def _compare_not_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective != self._coerce_version(spec) def _compare_less_than_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective <= self._coerce_version(spec) def _compare_greater_than_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective >= self._coerce_version(spec) def _compare_less_than(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective < self._coerce_version(spec) def _compare_greater_than(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective > self._coerce_version(spec) -def _require_version_compare(fn): +def _require_version_compare( + fn # type: (Callable[[Specifier, ParsedVersion, str], bool]) +): + # type: (...) -> Callable[[Specifier, ParsedVersion, str], bool] @functools.wraps(fn) def wrapped(self, prospective, spec): + # type: (Specifier, ParsedVersion, str) -> bool if not isinstance(prospective, Version): return False return fn(self, prospective, spec) @@ -373,6 +440,8 @@ class Specifier(_IndividualSpecifier): @_require_version_compare def _compare_compatible(self, prospective, spec): + # type: (ParsedVersion, str) -> bool + # Compatible releases have an equivalent combination of >= and ==. That # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to # implement this in terms of the other specifiers instead of @@ -400,56 +469,75 @@ def _compare_compatible(self, prospective, spec): @_require_version_compare def _compare_equal(self, prospective, spec): + # type: (ParsedVersion, str) -> bool + # We need special logic to handle prefix matching if spec.endswith(".*"): # In the case of prefix matching we want to ignore local segment. prospective = Version(prospective.public) # Split the spec out by dots, and pretend that there is an implicit # dot in between a release segment and a pre-release segment. - spec = _version_split(spec[:-2]) # Remove the trailing .* + split_spec = _version_split(spec[:-2]) # Remove the trailing .* # Split the prospective version out by dots, and pretend that there # is an implicit dot in between a release segment and a pre-release # segment. - prospective = _version_split(str(prospective)) + split_prospective = _version_split(str(prospective)) # Shorten the prospective version to be the same length as the spec # so that we can determine if the specifier is a prefix of the # prospective version or not. - prospective = prospective[: len(spec)] + shortened_prospective = split_prospective[: len(split_spec)] # Pad out our two sides with zeros so that they both equal the same # length. - spec, prospective = _pad_version(spec, prospective) + padded_spec, padded_prospective = _pad_version( + split_spec, shortened_prospective + ) + + return padded_prospective == padded_spec else: # Convert our spec string into a Version - spec = Version(spec) + spec_version = Version(spec) # If the specifier does not have a local segment, then we want to # act as if the prospective version also does not have a local # segment. - if not spec.local: + if not spec_version.local: prospective = Version(prospective.public) - return prospective == spec + return prospective == spec_version @_require_version_compare def _compare_not_equal(self, prospective, spec): + # type: (ParsedVersion, str) -> bool return not self._compare_equal(prospective, spec) @_require_version_compare def _compare_less_than_equal(self, prospective, spec): - return prospective <= Version(spec) + # type: (ParsedVersion, str) -> bool + + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) <= Version(spec) @_require_version_compare def _compare_greater_than_equal(self, prospective, spec): - return prospective >= Version(spec) + # type: (ParsedVersion, str) -> bool + + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) >= Version(spec) @_require_version_compare - def _compare_less_than(self, prospective, spec): + def _compare_less_than(self, prospective, spec_str): + # type: (ParsedVersion, str) -> bool + # Convert our spec to a Version instance, since we'll want to work with # it as a version. - spec = Version(spec) + spec = Version(spec_str) # Check to see if the prospective version is less than the spec # version. If it's not we can short circuit and just return False now @@ -471,10 +559,12 @@ def _compare_less_than(self, prospective, spec): return True @_require_version_compare - def _compare_greater_than(self, prospective, spec): + def _compare_greater_than(self, prospective, spec_str): + # type: (ParsedVersion, str) -> bool + # Convert our spec to a Version instance, since we'll want to work with # it as a version. - spec = Version(spec) + spec = Version(spec_str) # Check to see if the prospective version is greater than the spec # version. If it's not we can short circuit and just return False now @@ -502,10 +592,13 @@ def _compare_greater_than(self, prospective, spec): return True def _compare_arbitrary(self, prospective, spec): + # type: (Version, str) -> bool return str(prospective).lower() == str(spec).lower() @property def prereleases(self): + # type: () -> bool + # If there is an explicit prereleases set for this, then we'll just # blindly use that. if self._prereleases is not None: @@ -530,6 +623,7 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value @@ -537,7 +631,8 @@ def prereleases(self, value): def _version_split(version): - result = [] + # type: (str) -> List[str] + result = [] # type: List[str] for item in version.split("."): match = _prefix_regex.search(item) if match: @@ -548,6 +643,7 @@ def _version_split(version): def _pad_version(left, right): + # type: (List[str], List[str]) -> Tuple[List[str], List[str]] left_split, right_split = [], [] # Get the release segment of our versions @@ -567,14 +663,16 @@ def _pad_version(left, right): class SpecifierSet(BaseSpecifier): def __init__(self, specifiers="", prereleases=None): - # Split on , to break each indidivual specifier into it's own item, and + # type: (str, Optional[bool]) -> None + + # Split on , to break each individual specifier into it's own item, and # strip each item to remove leading/trailing whitespace. - specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] + split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] # Parsed each individual specifier, attempting first to make it a # Specifier and falling back to a LegacySpecifier. parsed = set() - for specifier in specifiers: + for specifier in split_specifiers: try: parsed.add(Specifier(specifier)) except InvalidSpecifier: @@ -588,6 +686,7 @@ def __init__(self, specifiers="", prereleases=None): self._prereleases = prereleases def __repr__(self): + # type: () -> str pre = ( ", prereleases={0!r}".format(self.prereleases) if self._prereleases is not None @@ -597,12 +696,15 @@ def __repr__(self): return "".format(str(self), pre) def __str__(self): + # type: () -> str return ",".join(sorted(str(s) for s in self._specs)) def __hash__(self): + # type: () -> int return hash(self._specs) def __and__(self, other): + # type: (Union[SpecifierSet, str]) -> SpecifierSet if isinstance(other, string_types): other = SpecifierSet(other) elif not isinstance(other, SpecifierSet): @@ -626,9 +728,8 @@ def __and__(self, other): return specifier def __eq__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): + # type: (object) -> bool + if isinstance(other, (string_types, _IndividualSpecifier)): other = SpecifierSet(str(other)) elif not isinstance(other, SpecifierSet): return NotImplemented @@ -636,9 +737,8 @@ def __eq__(self, other): return self._specs == other._specs def __ne__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): + # type: (object) -> bool + if isinstance(other, (string_types, _IndividualSpecifier)): other = SpecifierSet(str(other)) elif not isinstance(other, SpecifierSet): return NotImplemented @@ -646,13 +746,17 @@ def __ne__(self, other): return self._specs != other._specs def __len__(self): + # type: () -> int return len(self._specs) def __iter__(self): + # type: () -> Iterator[FrozenSet[_IndividualSpecifier]] return iter(self._specs) @property def prereleases(self): + # type: () -> Optional[bool] + # If we have been given an explicit prerelease modifier, then we'll # pass that through here. if self._prereleases is not None: @@ -670,12 +774,16 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value def __contains__(self, item): + # type: (Union[ParsedVersion, str]) -> bool return self.contains(item) def contains(self, item, prereleases=None): + # type: (Union[ParsedVersion, str], Optional[bool]) -> bool + # Ensure that our item is a Version or LegacyVersion instance. if not isinstance(item, (LegacyVersion, Version)): item = parse(item) @@ -701,7 +809,13 @@ def contains(self, item, prereleases=None): # will always return True, this is an explicit design decision. return all(s.contains(item, prereleases=prereleases) for s in self._specs) - def filter(self, iterable, prereleases=None): + def filter( + self, + iterable, # type: Iterable[Union[ParsedVersion, str]] + prereleases=None, # type: Optional[bool] + ): + # type: (...) -> Iterable[Union[ParsedVersion, str]] + # Determine if we're forcing a prerelease or not, if we're not forcing # one for this particular filter call, then we'll use whatever the # SpecifierSet thinks for whether or not we should support prereleases. @@ -719,8 +833,8 @@ def filter(self, iterable, prereleases=None): # which will filter out any pre-releases, unless there are no final # releases, and which will filter out LegacyVersion in general. else: - filtered = [] - found_prereleases = [] + filtered = [] # type: List[Union[ParsedVersion, str]] + found_prereleases = [] # type: List[Union[ParsedVersion, str]] for item in iterable: # Ensure that we some kind of Version class for this item. diff --git a/pkg_resources/_vendor/packaging/tags.py b/pkg_resources/_vendor/packaging/tags.py index ec9942f0f6..9064910b8b 100644 --- a/pkg_resources/_vendor/packaging/tags.py +++ b/pkg_resources/_vendor/packaging/tags.py @@ -13,12 +13,37 @@ EXTENSION_SUFFIXES = [x[0] for x in imp.get_suffixes()] del imp +import logging +import os import platform import re +import struct import sys import sysconfig import warnings +from ._typing import TYPE_CHECKING, cast + +if TYPE_CHECKING: # pragma: no cover + from typing import ( + Dict, + FrozenSet, + IO, + Iterable, + Iterator, + List, + Optional, + Sequence, + Tuple, + Union, + ) + + PythonVersion = Sequence[int] + MacVersion = Tuple[int, int] + GlibcVersion = Tuple[int, int] + + +logger = logging.getLogger(__name__) INTERPRETER_SHORT_NAMES = { "python": "py", # Generic. @@ -26,34 +51,48 @@ "pypy": "pp", "ironpython": "ip", "jython": "jy", -} +} # type: Dict[str, str] _32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32 class Tag(object): + """ + A representation of the tag triple for a wheel. + + Instances are considered immutable and thus are hashable. Equality checking + is also supported. + """ __slots__ = ["_interpreter", "_abi", "_platform"] def __init__(self, interpreter, abi, platform): + # type: (str, str, str) -> None self._interpreter = interpreter.lower() self._abi = abi.lower() self._platform = platform.lower() @property def interpreter(self): + # type: () -> str return self._interpreter @property def abi(self): + # type: () -> str return self._abi @property def platform(self): + # type: () -> str return self._platform def __eq__(self, other): + # type: (object) -> bool + if not isinstance(other, Tag): + return NotImplemented + return ( (self.platform == other.platform) and (self.abi == other.abi) @@ -61,16 +100,26 @@ def __eq__(self, other): ) def __hash__(self): + # type: () -> int return hash((self._interpreter, self._abi, self._platform)) def __str__(self): + # type: () -> str return "{}-{}-{}".format(self._interpreter, self._abi, self._platform) def __repr__(self): + # type: () -> str return "<{self} @ {self_id}>".format(self=self, self_id=id(self)) def parse_tag(tag): + # type: (str) -> FrozenSet[Tag] + """ + Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. + + Returning a set is required due to the possibility that the tag is a + compressed tag set. + """ tags = set() interpreters, abis, platforms = tag.split("-") for interpreter in interpreters.split("."): @@ -80,20 +129,54 @@ def parse_tag(tag): return frozenset(tags) +def _warn_keyword_parameter(func_name, kwargs): + # type: (str, Dict[str, bool]) -> bool + """ + Backwards-compatibility with Python 2.7 to allow treating 'warn' as keyword-only. + """ + if not kwargs: + return False + elif len(kwargs) > 1 or "warn" not in kwargs: + kwargs.pop("warn", None) + arg = next(iter(kwargs.keys())) + raise TypeError( + "{}() got an unexpected keyword argument {!r}".format(func_name, arg) + ) + return kwargs["warn"] + + +def _get_config_var(name, warn=False): + # type: (str, bool) -> Union[int, str, None] + value = sysconfig.get_config_var(name) + if value is None and warn: + logger.debug( + "Config variable '%s' is unset, Python ABI tag may be incorrect", name + ) + return value + + def _normalize_string(string): + # type: (str) -> str return string.replace(".", "_").replace("-", "_") -def _cpython_interpreter(py_version): - # TODO: Is using py_version_nodot for interpreter version critical? - return "cp{major}{minor}".format(major=py_version[0], minor=py_version[1]) +def _abi3_applies(python_version): + # type: (PythonVersion) -> bool + """ + Determine if the Python version supports abi3. + + PEP 384 was first implemented in Python 3.2. + """ + return len(python_version) > 1 and tuple(python_version) >= (3, 2) -def _cpython_abis(py_version): +def _cpython_abis(py_version, warn=False): + # type: (PythonVersion, bool) -> List[str] + py_version = tuple(py_version) # To allow for version comparison. abis = [] - version = "{}{}".format(*py_version[:2]) + version = _version_nodot(py_version[:2]) debug = pymalloc = ucs4 = "" - with_debug = sysconfig.get_config_var("Py_DEBUG") + with_debug = _get_config_var("Py_DEBUG", warn) has_refcount = hasattr(sys, "gettotalrefcount") # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled # extension modules is the best option. @@ -102,11 +185,11 @@ def _cpython_abis(py_version): if with_debug or (with_debug is None and (has_refcount or has_ext)): debug = "d" if py_version < (3, 8): - with_pymalloc = sysconfig.get_config_var("WITH_PYMALLOC") + with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) if with_pymalloc or with_pymalloc is None: pymalloc = "m" if py_version < (3, 3): - unicode_size = sysconfig.get_config_var("Py_UNICODE_SIZE") + unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) if unicode_size == 4 or ( unicode_size is None and sys.maxunicode == 0x10FFFF ): @@ -124,86 +207,148 @@ def _cpython_abis(py_version): return abis -def _cpython_tags(py_version, interpreter, abis, platforms): +def cpython_tags( + python_version=None, # type: Optional[PythonVersion] + abis=None, # type: Optional[Iterable[str]] + platforms=None, # type: Optional[Iterable[str]] + **kwargs # type: bool +): + # type: (...) -> Iterator[Tag] + """ + Yields the tags for a CPython interpreter. + + The tags consist of: + - cp-- + - cp-abi3- + - cp-none- + - cp-abi3- # Older Python versions down to 3.2. + + If python_version only specifies a major version then user-provided ABIs and + the 'none' ABItag will be used. + + If 'abi3' or 'none' are specified in 'abis' then they will be yielded at + their normal position and not at the beginning. + """ + warn = _warn_keyword_parameter("cpython_tags", kwargs) + if not python_version: + python_version = sys.version_info[:2] + + interpreter = "cp{}".format(_version_nodot(python_version[:2])) + + if abis is None: + if len(python_version) > 1: + abis = _cpython_abis(python_version, warn) + else: + abis = [] + abis = list(abis) + # 'abi3' and 'none' are explicitly handled later. + for explicit_abi in ("abi3", "none"): + try: + abis.remove(explicit_abi) + except ValueError: + pass + + platforms = list(platforms or _platform_tags()) for abi in abis: for platform_ in platforms: yield Tag(interpreter, abi, platform_) - for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): - yield tag + if _abi3_applies(python_version): + for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): + yield tag for tag in (Tag(interpreter, "none", platform_) for platform_ in platforms): yield tag - # PEP 384 was first implemented in Python 3.2. - for minor_version in range(py_version[1] - 1, 1, -1): - for platform_ in platforms: - interpreter = "cp{major}{minor}".format( - major=py_version[0], minor=minor_version - ) - yield Tag(interpreter, "abi3", platform_) - -def _pypy_interpreter(): - return "pp{py_major}{pypy_major}{pypy_minor}".format( - py_major=sys.version_info[0], - pypy_major=sys.pypy_version_info.major, - pypy_minor=sys.pypy_version_info.minor, - ) + if _abi3_applies(python_version): + for minor_version in range(python_version[1] - 1, 1, -1): + for platform_ in platforms: + interpreter = "cp{version}".format( + version=_version_nodot((python_version[0], minor_version)) + ) + yield Tag(interpreter, "abi3", platform_) def _generic_abi(): + # type: () -> Iterator[str] abi = sysconfig.get_config_var("SOABI") if abi: - return _normalize_string(abi) - else: - return "none" + yield _normalize_string(abi) -def _pypy_tags(py_version, interpreter, abi, platforms): - for tag in (Tag(interpreter, abi, platform) for platform in platforms): - yield tag - for tag in (Tag(interpreter, "none", platform) for platform in platforms): - yield tag +def generic_tags( + interpreter=None, # type: Optional[str] + abis=None, # type: Optional[Iterable[str]] + platforms=None, # type: Optional[Iterable[str]] + **kwargs # type: bool +): + # type: (...) -> Iterator[Tag] + """ + Yields the tags for a generic interpreter. + The tags consist of: + - -- -def _generic_tags(interpreter, py_version, abi, platforms): - for tag in (Tag(interpreter, abi, platform) for platform in platforms): - yield tag - if abi != "none": - tags = (Tag(interpreter, "none", platform_) for platform_ in platforms) - for tag in tags: - yield tag + The "none" ABI will be added if it was not explicitly provided. + """ + warn = _warn_keyword_parameter("generic_tags", kwargs) + if not interpreter: + interp_name = interpreter_name() + interp_version = interpreter_version(warn=warn) + interpreter = "".join([interp_name, interp_version]) + if abis is None: + abis = _generic_abi() + platforms = list(platforms or _platform_tags()) + abis = list(abis) + if "none" not in abis: + abis.append("none") + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) def _py_interpreter_range(py_version): + # type: (PythonVersion) -> Iterator[str] """ - Yield Python versions in descending order. + Yields Python versions in descending order. After the latest version, the major-only version will be yielded, and then - all following versions up to 'end'. + all previous versions of that major version. """ - yield "py{major}{minor}".format(major=py_version[0], minor=py_version[1]) + if len(py_version) > 1: + yield "py{version}".format(version=_version_nodot(py_version[:2])) yield "py{major}".format(major=py_version[0]) - for minor in range(py_version[1] - 1, -1, -1): - yield "py{major}{minor}".format(major=py_version[0], minor=minor) + if len(py_version) > 1: + for minor in range(py_version[1] - 1, -1, -1): + yield "py{version}".format(version=_version_nodot((py_version[0], minor))) -def _independent_tags(interpreter, py_version, platforms): +def compatible_tags( + python_version=None, # type: Optional[PythonVersion] + interpreter=None, # type: Optional[str] + platforms=None, # type: Optional[Iterable[str]] +): + # type: (...) -> Iterator[Tag] """ - Return the sequence of tags that are consistent across implementations. + Yields the sequence of tags that are compatible with a specific version of Python. The tags consist of: - py*-none- - - -none-any + - -none-any # ... if `interpreter` is provided. - py*-none-any """ - for version in _py_interpreter_range(py_version): + if not python_version: + python_version = sys.version_info[:2] + platforms = list(platforms or _platform_tags()) + for version in _py_interpreter_range(python_version): for platform_ in platforms: yield Tag(version, "none", platform_) - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(py_version): + if interpreter: + yield Tag(interpreter, "none", "any") + for version in _py_interpreter_range(python_version): yield Tag(version, "none", "any") def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): + # type: (str, bool) -> str if not is_32bit: return arch @@ -214,6 +359,7 @@ def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): def _mac_binary_formats(version, cpu_arch): + # type: (MacVersion, str) -> List[str] formats = [cpu_arch] if cpu_arch == "x86_64": if version < (10, 4): @@ -240,32 +386,42 @@ def _mac_binary_formats(version, cpu_arch): return formats -def _mac_platforms(version=None, arch=None): - version_str, _, cpu_arch = platform.mac_ver() +def mac_platforms(version=None, arch=None): + # type: (Optional[MacVersion], Optional[str]) -> Iterator[str] + """ + Yields the platform tags for a macOS system. + + The `version` parameter is a two-item tuple specifying the macOS version to + generate platform tags for. The `arch` parameter is the CPU architecture to + generate platform tags for. Both parameters default to the appropriate value + for the current system. + """ + version_str, _, cpu_arch = platform.mac_ver() # type: ignore if version is None: - version = tuple(map(int, version_str.split(".")[:2])) + version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2]))) + else: + version = version if arch is None: arch = _mac_arch(cpu_arch) - platforms = [] + else: + arch = arch for minor_version in range(version[1], -1, -1): compat_version = version[0], minor_version binary_formats = _mac_binary_formats(compat_version, arch) for binary_format in binary_formats: - platforms.append( - "macosx_{major}_{minor}_{binary_format}".format( - major=compat_version[0], - minor=compat_version[1], - binary_format=binary_format, - ) + yield "macosx_{major}_{minor}_{binary_format}".format( + major=compat_version[0], + minor=compat_version[1], + binary_format=binary_format, ) - return platforms # From PEP 513. def _is_manylinux_compatible(name, glibc_version): + # type: (str, GlibcVersion) -> bool # Check for presence of _manylinux module. try: - import _manylinux + import _manylinux # noqa return bool(getattr(_manylinux, name + "_compatible")) except (ImportError, AttributeError): @@ -276,14 +432,50 @@ def _is_manylinux_compatible(name, glibc_version): def _glibc_version_string(): + # type: () -> Optional[str] # Returns glibc version string, or None if not using glibc. - import ctypes + return _glibc_version_string_confstr() or _glibc_version_string_ctypes() + + +def _glibc_version_string_confstr(): + # type: () -> Optional[str] + """ + Primary implementation of glibc_version_string using os.confstr. + """ + # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely + # to be broken or missing. This strategy is used in the standard library + # platform module. + # https://github.com/python/cpython/blob/fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71/Lib/platform.py#L175-L183 + try: + # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17". + version_string = os.confstr( # type: ignore[attr-defined] # noqa: F821 + "CS_GNU_LIBC_VERSION" + ) + assert version_string is not None + _, version = version_string.split() # type: Tuple[str, str] + except (AssertionError, AttributeError, OSError, ValueError): + # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... + return None + return version + + +def _glibc_version_string_ctypes(): + # type: () -> Optional[str] + """ + Fallback implementation of glibc_version_string using ctypes. + """ + try: + import ctypes + except ImportError: + return None # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the returned handle is for the # main program". This way we can let the linker do the work to figure out # which libc our process is actually using. - process_namespace = ctypes.CDLL(None) + # + # Note: typeshed is wrong here so we are ignoring this line. + process_namespace = ctypes.CDLL(None) # type: ignore try: gnu_get_libc_version = process_namespace.gnu_get_libc_version except AttributeError: @@ -293,7 +485,7 @@ def _glibc_version_string(): # Call gnu_get_libc_version, which returns a string like "2.5" gnu_get_libc_version.restype = ctypes.c_char_p - version_str = gnu_get_libc_version() + version_str = gnu_get_libc_version() # type: str # py2 / py3 compatibility: if not isinstance(version_str, str): version_str = version_str.decode("ascii") @@ -303,6 +495,7 @@ def _glibc_version_string(): # Separated out from have_compatible_glibc for easier unit testing. def _check_glibc_version(version_str, required_major, minimum_minor): + # type: (str, int, int) -> bool # Parse string and check against requested version. # # We use a regexp instead of str.split because we want to discard any @@ -324,81 +517,235 @@ def _check_glibc_version(version_str, required_major, minimum_minor): def _have_compatible_glibc(required_major, minimum_minor): + # type: (int, int) -> bool version_str = _glibc_version_string() if version_str is None: return False return _check_glibc_version(version_str, required_major, minimum_minor) +# Python does not provide platform information at sufficient granularity to +# identify the architecture of the running executable in some cases, so we +# determine it dynamically by reading the information from the running +# process. This only applies on Linux, which uses the ELF format. +class _ELFFileHeader(object): + # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + class _InvalidELFFileHeader(ValueError): + """ + An invalid ELF file header was found. + """ + + ELF_MAGIC_NUMBER = 0x7F454C46 + ELFCLASS32 = 1 + ELFCLASS64 = 2 + ELFDATA2LSB = 1 + ELFDATA2MSB = 2 + EM_386 = 3 + EM_S390 = 22 + EM_ARM = 40 + EM_X86_64 = 62 + EF_ARM_ABIMASK = 0xFF000000 + EF_ARM_ABI_VER5 = 0x05000000 + EF_ARM_ABI_FLOAT_HARD = 0x00000400 + + def __init__(self, file): + # type: (IO[bytes]) -> None + def unpack(fmt): + # type: (str) -> int + try: + (result,) = struct.unpack( + fmt, file.read(struct.calcsize(fmt)) + ) # type: (int, ) + except struct.error: + raise _ELFFileHeader._InvalidELFFileHeader() + return result + + self.e_ident_magic = unpack(">I") + if self.e_ident_magic != self.ELF_MAGIC_NUMBER: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_class = unpack("B") + if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_data = unpack("B") + if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_version = unpack("B") + self.e_ident_osabi = unpack("B") + self.e_ident_abiversion = unpack("B") + self.e_ident_pad = file.read(7) + format_h = "H" + format_i = "I" + format_q = "Q" + format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q + self.e_type = unpack(format_h) + self.e_machine = unpack(format_h) + self.e_version = unpack(format_i) + self.e_entry = unpack(format_p) + self.e_phoff = unpack(format_p) + self.e_shoff = unpack(format_p) + self.e_flags = unpack(format_i) + self.e_ehsize = unpack(format_h) + self.e_phentsize = unpack(format_h) + self.e_phnum = unpack(format_h) + self.e_shentsize = unpack(format_h) + self.e_shnum = unpack(format_h) + self.e_shstrndx = unpack(format_h) + + +def _get_elf_header(): + # type: () -> Optional[_ELFFileHeader] + try: + with open(sys.executable, "rb") as f: + elf_header = _ELFFileHeader(f) + except (IOError, OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader): + return None + return elf_header + + +def _is_linux_armhf(): + # type: () -> bool + # hard-float ABI can be detected from the ELF header of the running + # process + # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf + elf_header = _get_elf_header() + if elf_header is None: + return False + result = elf_header.e_ident_class == elf_header.ELFCLASS32 + result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB + result &= elf_header.e_machine == elf_header.EM_ARM + result &= ( + elf_header.e_flags & elf_header.EF_ARM_ABIMASK + ) == elf_header.EF_ARM_ABI_VER5 + result &= ( + elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD + ) == elf_header.EF_ARM_ABI_FLOAT_HARD + return result + + +def _is_linux_i686(): + # type: () -> bool + elf_header = _get_elf_header() + if elf_header is None: + return False + result = elf_header.e_ident_class == elf_header.ELFCLASS32 + result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB + result &= elf_header.e_machine == elf_header.EM_386 + return result + + +def _have_compatible_manylinux_abi(arch): + # type: (str) -> bool + if arch == "armv7l": + return _is_linux_armhf() + if arch == "i686": + return _is_linux_i686() + return True + + def _linux_platforms(is_32bit=_32_BIT_INTERPRETER): + # type: (bool) -> Iterator[str] linux = _normalize_string(distutils.util.get_platform()) - if linux == "linux_x86_64" and is_32bit: - linux = "linux_i686" - manylinux_support = ( - ("manylinux2014", (2, 17)), # CentOS 7 w/ glibc 2.17 (PEP 599) - ("manylinux2010", (2, 12)), # CentOS 6 w/ glibc 2.12 (PEP 571) - ("manylinux1", (2, 5)), # CentOS 5 w/ glibc 2.5 (PEP 513) - ) + if is_32bit: + if linux == "linux_x86_64": + linux = "linux_i686" + elif linux == "linux_aarch64": + linux = "linux_armv7l" + manylinux_support = [] + _, arch = linux.split("_", 1) + if _have_compatible_manylinux_abi(arch): + if arch in {"x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le", "s390x"}: + manylinux_support.append( + ("manylinux2014", (2, 17)) + ) # CentOS 7 w/ glibc 2.17 (PEP 599) + if arch in {"x86_64", "i686"}: + manylinux_support.append( + ("manylinux2010", (2, 12)) + ) # CentOS 6 w/ glibc 2.12 (PEP 571) + manylinux_support.append( + ("manylinux1", (2, 5)) + ) # CentOS 5 w/ glibc 2.5 (PEP 513) manylinux_support_iter = iter(manylinux_support) for name, glibc_version in manylinux_support_iter: if _is_manylinux_compatible(name, glibc_version): - platforms = [linux.replace("linux", name)] + yield linux.replace("linux", name) break - else: - platforms = [] # Support for a later manylinux implies support for an earlier version. - platforms += [linux.replace("linux", name) for name, _ in manylinux_support_iter] - platforms.append(linux) - return platforms + for name, _ in manylinux_support_iter: + yield linux.replace("linux", name) + yield linux def _generic_platforms(): - platform = _normalize_string(distutils.util.get_platform()) - return [platform] + # type: () -> Iterator[str] + yield _normalize_string(distutils.util.get_platform()) -def _interpreter_name(): - name = platform.python_implementation().lower() +def _platform_tags(): + # type: () -> Iterator[str] + """ + Provides the platform tags for this installation. + """ + if platform.system() == "Darwin": + return mac_platforms() + elif platform.system() == "Linux": + return _linux_platforms() + else: + return _generic_platforms() + + +def interpreter_name(): + # type: () -> str + """ + Returns the name of the running interpreter. + """ + try: + name = sys.implementation.name # type: ignore + except AttributeError: # pragma: no cover + # Python 2.7 compatibility. + name = platform.python_implementation().lower() return INTERPRETER_SHORT_NAMES.get(name) or name -def _generic_interpreter(name, py_version): - version = sysconfig.get_config_var("py_version_nodot") - if not version: - version = "".join(map(str, py_version[:2])) - return "{name}{version}".format(name=name, version=version) +def interpreter_version(**kwargs): + # type: (bool) -> str + """ + Returns the version of the running interpreter. + """ + warn = _warn_keyword_parameter("interpreter_version", kwargs) + version = _get_config_var("py_version_nodot", warn=warn) + if version: + version = str(version) + else: + version = _version_nodot(sys.version_info[:2]) + return version + + +def _version_nodot(version): + # type: (PythonVersion) -> str + if any(v >= 10 for v in version): + sep = "_" + else: + sep = "" + return sep.join(map(str, version)) -def sys_tags(): +def sys_tags(**kwargs): + # type: (bool) -> Iterator[Tag] """ Returns the sequence of tag triples for the running interpreter. The order of the sequence corresponds to priority order for the interpreter, from most to least important. """ - py_version = sys.version_info[:2] - interpreter_name = _interpreter_name() - if platform.system() == "Darwin": - platforms = _mac_platforms() - elif platform.system() == "Linux": - platforms = _linux_platforms() - else: - platforms = _generic_platforms() + warn = _warn_keyword_parameter("sys_tags", kwargs) - if interpreter_name == "cp": - interpreter = _cpython_interpreter(py_version) - abis = _cpython_abis(py_version) - for tag in _cpython_tags(py_version, interpreter, abis, platforms): - yield tag - elif interpreter_name == "pp": - interpreter = _pypy_interpreter() - abi = _generic_abi() - for tag in _pypy_tags(py_version, interpreter, abi, platforms): + interp_name = interpreter_name() + if interp_name == "cp": + for tag in cpython_tags(warn=warn): yield tag else: - interpreter = _generic_interpreter(interpreter_name, py_version) - abi = _generic_abi() - for tag in _generic_tags(interpreter, py_version, abi, platforms): + for tag in generic_tags(): yield tag - for tag in _independent_tags(interpreter, py_version, platforms): + + for tag in compatible_tags(): yield tag diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py index 8841878693..19579c1a0f 100644 --- a/pkg_resources/_vendor/packaging/utils.py +++ b/pkg_resources/_vendor/packaging/utils.py @@ -5,28 +5,36 @@ import re +from ._typing import TYPE_CHECKING, cast from .version import InvalidVersion, Version +if TYPE_CHECKING: # pragma: no cover + from typing import NewType, Union + + NormalizedName = NewType("NormalizedName", str) _canonicalize_regex = re.compile(r"[-_.]+") def canonicalize_name(name): + # type: (str) -> NormalizedName # This is taken from PEP 503. - return _canonicalize_regex.sub("-", name).lower() + value = _canonicalize_regex.sub("-", name).lower() + return cast("NormalizedName", value) -def canonicalize_version(version): +def canonicalize_version(_version): + # type: (str) -> Union[Version, str] """ - This is very similar to Version.__str__, but has one subtle differences + This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. """ try: - version = Version(version) + version = Version(_version) except InvalidVersion: # Legacy versions cannot be normalized - return version + return _version parts = [] diff --git a/pkg_resources/_vendor/packaging/version.py b/pkg_resources/_vendor/packaging/version.py index 95157a1f78..00371e86a8 100644 --- a/pkg_resources/_vendor/packaging/version.py +++ b/pkg_resources/_vendor/packaging/version.py @@ -7,8 +7,35 @@ import itertools import re -from ._structures import Infinity - +from ._structures import Infinity, NegativeInfinity +from ._typing import TYPE_CHECKING + +if TYPE_CHECKING: # pragma: no cover + from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union + + from ._structures import InfinityType, NegativeInfinityType + + InfiniteTypes = Union[InfinityType, NegativeInfinityType] + PrePostDevType = Union[InfiniteTypes, Tuple[str, int]] + SubLocalType = Union[InfiniteTypes, int, str] + LocalType = Union[ + NegativeInfinityType, + Tuple[ + Union[ + SubLocalType, + Tuple[SubLocalType, str], + Tuple[NegativeInfinityType, SubLocalType], + ], + ..., + ], + ] + CmpKey = Tuple[ + int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType + ] + LegacyCmpKey = Tuple[int, Tuple[str, ...]] + VersionComparisonMethod = Callable[ + [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool + ] __all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] @@ -19,6 +46,7 @@ def parse(version): + # type: (str) -> Union[LegacyVersion, Version] """ Parse the given version string and return either a :class:`Version` object or a :class:`LegacyVersion` object depending on if the given version is @@ -37,28 +65,38 @@ class InvalidVersion(ValueError): class _BaseVersion(object): + _key = None # type: Union[CmpKey, LegacyCmpKey] + def __hash__(self): + # type: () -> int return hash(self._key) def __lt__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s < o) def __le__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s <= o) def __eq__(self, other): + # type: (object) -> bool return self._compare(other, lambda s, o: s == o) def __ge__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s >= o) def __gt__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s > o) def __ne__(self, other): + # type: (object) -> bool return self._compare(other, lambda s, o: s != o) def _compare(self, other, method): + # type: (object, VersionComparisonMethod) -> Union[bool, NotImplemented] if not isinstance(other, _BaseVersion): return NotImplemented @@ -67,57 +105,71 @@ def _compare(self, other, method): class LegacyVersion(_BaseVersion): def __init__(self, version): + # type: (str) -> None self._version = str(version) self._key = _legacy_cmpkey(self._version) def __str__(self): + # type: () -> str return self._version def __repr__(self): + # type: () -> str return "".format(repr(str(self))) @property def public(self): + # type: () -> str return self._version @property def base_version(self): + # type: () -> str return self._version @property def epoch(self): + # type: () -> int return -1 @property def release(self): + # type: () -> None return None @property def pre(self): + # type: () -> None return None @property def post(self): + # type: () -> None return None @property def dev(self): + # type: () -> None return None @property def local(self): + # type: () -> None return None @property def is_prerelease(self): + # type: () -> bool return False @property def is_postrelease(self): + # type: () -> bool return False @property def is_devrelease(self): + # type: () -> bool return False @@ -133,6 +185,7 @@ def is_devrelease(self): def _parse_version_parts(s): + # type: (str) -> Iterator[str] for part in _legacy_version_component_re.split(s): part = _legacy_version_replacement_map.get(part, part) @@ -150,6 +203,8 @@ def _parse_version_parts(s): def _legacy_cmpkey(version): + # type: (str) -> LegacyCmpKey + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch # greater than or equal to 0. This will effectively put the LegacyVersion, # which uses the defacto standard originally implemented by setuptools, @@ -158,7 +213,7 @@ def _legacy_cmpkey(version): # This scheme is taken from pkg_resources.parse_version setuptools prior to # it's adoption of the packaging library. - parts = [] + parts = [] # type: List[str] for part in _parse_version_parts(version.lower()): if part.startswith("*"): # remove "-" before a prerelease tag @@ -171,9 +226,8 @@ def _legacy_cmpkey(version): parts.pop() parts.append(part) - parts = tuple(parts) - return epoch, parts + return epoch, tuple(parts) # Deliberately not anchored to the start and end of the string, to make it @@ -215,6 +269,8 @@ class Version(_BaseVersion): _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) def __init__(self, version): + # type: (str) -> None + # Validate the version and parse it into pieces match = self._regex.search(version) if not match: @@ -243,9 +299,11 @@ def __init__(self, version): ) def __repr__(self): + # type: () -> str return "".format(repr(str(self))) def __str__(self): + # type: () -> str parts = [] # Epoch @@ -275,26 +333,35 @@ def __str__(self): @property def epoch(self): - return self._version.epoch + # type: () -> int + _epoch = self._version.epoch # type: int + return _epoch @property def release(self): - return self._version.release + # type: () -> Tuple[int, ...] + _release = self._version.release # type: Tuple[int, ...] + return _release @property def pre(self): - return self._version.pre + # type: () -> Optional[Tuple[str, int]] + _pre = self._version.pre # type: Optional[Tuple[str, int]] + return _pre @property def post(self): + # type: () -> Optional[Tuple[str, int]] return self._version.post[1] if self._version.post else None @property def dev(self): + # type: () -> Optional[Tuple[str, int]] return self._version.dev[1] if self._version.dev else None @property def local(self): + # type: () -> Optional[str] if self._version.local: return ".".join(str(x) for x in self._version.local) else: @@ -302,10 +369,12 @@ def local(self): @property def public(self): + # type: () -> str return str(self).split("+", 1)[0] @property def base_version(self): + # type: () -> str parts = [] # Epoch @@ -319,18 +388,41 @@ def base_version(self): @property def is_prerelease(self): + # type: () -> bool return self.dev is not None or self.pre is not None @property def is_postrelease(self): + # type: () -> bool return self.post is not None @property def is_devrelease(self): + # type: () -> bool return self.dev is not None + @property + def major(self): + # type: () -> int + return self.release[0] if len(self.release) >= 1 else 0 + + @property + def minor(self): + # type: () -> int + return self.release[1] if len(self.release) >= 2 else 0 + + @property + def micro(self): + # type: () -> int + return self.release[2] if len(self.release) >= 3 else 0 + + +def _parse_letter_version( + letter, # type: str + number, # type: Union[str, bytes, SupportsInt] +): + # type: (...) -> Optional[Tuple[str, int]] -def _parse_letter_version(letter, number): if letter: # We consider there to be an implicit 0 in a pre-release if there is # not a numeral associated with it. @@ -360,11 +452,14 @@ def _parse_letter_version(letter, number): return letter, int(number) + return None + _local_version_separators = re.compile(r"[\._-]") def _parse_local_version(local): + # type: (str) -> Optional[LocalType] """ Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve"). """ @@ -373,15 +468,25 @@ def _parse_local_version(local): part.lower() if not part.isdigit() else int(part) for part in _local_version_separators.split(local) ) + return None + +def _cmpkey( + epoch, # type: int + release, # type: Tuple[int, ...] + pre, # type: Optional[Tuple[str, int]] + post, # type: Optional[Tuple[str, int]] + dev, # type: Optional[Tuple[str, int]] + local, # type: Optional[Tuple[SubLocalType]] +): + # type: (...) -> CmpKey -def _cmpkey(epoch, release, pre, post, dev, local): # When we compare a release version, we want to compare it with all of the # trailing zeros removed. So we'll use a reverse the list, drop all the now # leading zeros until we come to something non zero, then take the rest # re-reverse it back into the correct order and make it a tuple and use # that for our sorting key. - release = tuple( + _release = tuple( reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release)))) ) @@ -390,23 +495,31 @@ def _cmpkey(epoch, release, pre, post, dev, local): # if there is not a pre or a post segment. If we have one of those then # the normal sorting rules will handle this case correctly. if pre is None and post is None and dev is not None: - pre = -Infinity + _pre = NegativeInfinity # type: PrePostDevType # Versions without a pre-release (except as noted above) should sort after # those with one. elif pre is None: - pre = Infinity + _pre = Infinity + else: + _pre = pre # Versions without a post segment should sort before those with one. if post is None: - post = -Infinity + _post = NegativeInfinity # type: PrePostDevType + + else: + _post = post # Versions without a development segment should sort after those with one. if dev is None: - dev = Infinity + _dev = Infinity # type: PrePostDevType + + else: + _dev = dev if local is None: # Versions without a local segment should sort before those with one. - local = -Infinity + _local = NegativeInfinity # type: LocalType else: # Versions with a local segment need that segment parsed to implement # the sorting rules in PEP440. @@ -415,6 +528,8 @@ def _cmpkey(epoch, release, pre, post, dev, local): # - Numeric segments sort numerically # - Shorter versions sort before longer versions when the prefixes # match exactly - local = tuple((i, "") if isinstance(i, int) else (-Infinity, i) for i in local) + _local = tuple( + (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local + ) - return epoch, release, pre, post, dev, local + return epoch, _release, _pre, _post, _dev, _local diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index f581a62349..7862a3cead 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,4 @@ -packaging==19.2 +packaging==20.4 pyparsing==2.2.1 six==1.10.0 appdirs==1.4.3 diff --git a/setuptools/_vendor/packaging/__about__.py b/setuptools/_vendor/packaging/__about__.py index dc95138d04..4d998578d7 100644 --- a/setuptools/_vendor/packaging/__about__.py +++ b/setuptools/_vendor/packaging/__about__.py @@ -18,10 +18,10 @@ __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packaging" -__version__ = "19.2" +__version__ = "20.4" __author__ = "Donald Stufft and individual contributors" __email__ = "donald@stufft.io" -__license__ = "BSD or Apache License, Version 2.0" +__license__ = "BSD-2-Clause or Apache-2.0" __copyright__ = "Copyright 2014-2019 %s" % __author__ diff --git a/setuptools/_vendor/packaging/_compat.py b/setuptools/_vendor/packaging/_compat.py index 25da473c19..e54bd4ede8 100644 --- a/setuptools/_vendor/packaging/_compat.py +++ b/setuptools/_vendor/packaging/_compat.py @@ -5,6 +5,11 @@ import sys +from ._typing import TYPE_CHECKING + +if TYPE_CHECKING: # pragma: no cover + from typing import Any, Dict, Tuple, Type + PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 @@ -18,14 +23,16 @@ def with_metaclass(meta, *bases): + # type: (Type[Any], Tuple[Type[Any], ...]) -> Any """ Create a base class with a metaclass. """ # This requires a bit of explanation: the basic idea is to make a dummy # metaclass for one level of class instantiation that replaces itself with # the actual metaclass. - class metaclass(meta): + class metaclass(meta): # type: ignore def __new__(cls, name, this_bases, d): + # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any return meta(name, bases, d) return type.__new__(metaclass, "temporary_class", (), {}) diff --git a/setuptools/_vendor/packaging/_structures.py b/setuptools/_vendor/packaging/_structures.py index 68dcca634d..800d5c5588 100644 --- a/setuptools/_vendor/packaging/_structures.py +++ b/setuptools/_vendor/packaging/_structures.py @@ -4,65 +4,83 @@ from __future__ import absolute_import, division, print_function -class Infinity(object): +class InfinityType(object): def __repr__(self): + # type: () -> str return "Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return False def __le__(self, other): + # type: (object) -> bool return False def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return True def __ge__(self, other): + # type: (object) -> bool return True def __neg__(self): + # type: (object) -> NegativeInfinityType return NegativeInfinity -Infinity = Infinity() +Infinity = InfinityType() -class NegativeInfinity(object): +class NegativeInfinityType(object): def __repr__(self): + # type: () -> str return "-Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return True def __le__(self, other): + # type: (object) -> bool return True def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return False def __ge__(self, other): + # type: (object) -> bool return False def __neg__(self): + # type: (object) -> InfinityType return Infinity -NegativeInfinity = NegativeInfinity() +NegativeInfinity = NegativeInfinityType() diff --git a/setuptools/_vendor/packaging/_typing.py b/setuptools/_vendor/packaging/_typing.py new file mode 100644 index 0000000000..77a8b9185a --- /dev/null +++ b/setuptools/_vendor/packaging/_typing.py @@ -0,0 +1,48 @@ +"""For neatly implementing static typing in packaging. + +`mypy` - the static type analysis tool we use - uses the `typing` module, which +provides core functionality fundamental to mypy's functioning. + +Generally, `typing` would be imported at runtime and used in that fashion - +it acts as a no-op at runtime and does not have any run-time overhead by +design. + +As it turns out, `typing` is not vendorable - it uses separate sources for +Python 2/Python 3. Thus, this codebase can not expect it to be present. +To work around this, mypy allows the typing import to be behind a False-y +optional to prevent it from running at runtime and type-comments can be used +to remove the need for the types to be accessible directly during runtime. + +This module provides the False-y guard in a nicely named fashion so that a +curious maintainer can reach here to read this. + +In packaging, all static-typing related imports should be guarded as follows: + + from packaging._typing import TYPE_CHECKING + + if TYPE_CHECKING: + from typing import ... + +Ref: https://github.com/python/mypy/issues/3216 +""" + +__all__ = ["TYPE_CHECKING", "cast"] + +# The TYPE_CHECKING constant defined by the typing module is False at runtime +# but True while type checking. +if False: # pragma: no cover + from typing import TYPE_CHECKING +else: + TYPE_CHECKING = False + +# typing's cast syntax requires calling typing.cast at runtime, but we don't +# want to import typing at runtime. Here, we inform the type checkers that +# we're importing `typing.cast` as `cast` and re-implement typing.cast's +# runtime behavior in a block that is ignored by type checkers. +if TYPE_CHECKING: # pragma: no cover + # not executed at runtime + from typing import cast +else: + # executed at runtime + def cast(type_, value): # noqa + return value diff --git a/setuptools/_vendor/packaging/markers.py b/setuptools/_vendor/packaging/markers.py index 4bdfdb24f2..03fbdfcc94 100644 --- a/setuptools/_vendor/packaging/markers.py +++ b/setuptools/_vendor/packaging/markers.py @@ -13,8 +13,14 @@ from setuptools.extern.pyparsing import Literal as L # noqa from ._compat import string_types +from ._typing import TYPE_CHECKING from .specifiers import Specifier, InvalidSpecifier +if TYPE_CHECKING: # pragma: no cover + from typing import Any, Callable, Dict, List, Optional, Tuple, Union + + Operator = Callable[[str, str], bool] + __all__ = [ "InvalidMarker", @@ -46,30 +52,37 @@ class UndefinedEnvironmentName(ValueError): class Node(object): def __init__(self, value): + # type: (Any) -> None self.value = value def __str__(self): + # type: () -> str return str(self.value) def __repr__(self): + # type: () -> str return "<{0}({1!r})>".format(self.__class__.__name__, str(self)) def serialize(self): + # type: () -> str raise NotImplementedError class Variable(Node): def serialize(self): + # type: () -> str return str(self) class Value(Node): def serialize(self): + # type: () -> str return '"{0}"'.format(self) class Op(Node): def serialize(self): + # type: () -> str return str(self) @@ -85,13 +98,13 @@ def serialize(self): | L("python_version") | L("sys_platform") | L("os_name") - | L("os.name") + | L("os.name") # PEP-345 | L("sys.platform") # PEP-345 | L("platform.version") # PEP-345 | L("platform.machine") # PEP-345 | L("platform.python_implementation") # PEP-345 - | L("python_implementation") # PEP-345 - | L("extra") # undocumented setuptools legacy + | L("python_implementation") # undocumented setuptools legacy + | L("extra") # PEP-508 ) ALIASES = { "os.name": "os_name", @@ -131,6 +144,7 @@ def serialize(self): def _coerce_parse_result(results): + # type: (Union[ParseResults, List[Any]]) -> List[Any] if isinstance(results, ParseResults): return [_coerce_parse_result(i) for i in results] else: @@ -138,6 +152,8 @@ def _coerce_parse_result(results): def _format_marker(marker, first=True): + # type: (Union[List[str], Tuple[Node, ...], str], Optional[bool]) -> str + assert isinstance(marker, (list, tuple, string_types)) # Sometimes we have a structure like [[...]] which is a single item list @@ -172,10 +188,11 @@ def _format_marker(marker, first=True): "!=": operator.ne, ">=": operator.ge, ">": operator.gt, -} +} # type: Dict[str, Operator] def _eval_op(lhs, op, rhs): + # type: (str, Op, str) -> bool try: spec = Specifier("".join([op.serialize(), rhs])) except InvalidSpecifier: @@ -183,7 +200,7 @@ def _eval_op(lhs, op, rhs): else: return spec.contains(lhs) - oper = _operators.get(op.serialize()) + oper = _operators.get(op.serialize()) # type: Optional[Operator] if oper is None: raise UndefinedComparison( "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs) @@ -192,13 +209,18 @@ def _eval_op(lhs, op, rhs): return oper(lhs, rhs) -_undefined = object() +class Undefined(object): + pass + + +_undefined = Undefined() def _get_env(environment, name): - value = environment.get(name, _undefined) + # type: (Dict[str, str], str) -> str + value = environment.get(name, _undefined) # type: Union[str, Undefined] - if value is _undefined: + if isinstance(value, Undefined): raise UndefinedEnvironmentName( "{0!r} does not exist in evaluation environment.".format(name) ) @@ -207,7 +229,8 @@ def _get_env(environment, name): def _evaluate_markers(markers, environment): - groups = [[]] + # type: (List[Any], Dict[str, str]) -> bool + groups = [[]] # type: List[List[bool]] for marker in markers: assert isinstance(marker, (list, tuple, string_types)) @@ -234,6 +257,7 @@ def _evaluate_markers(markers, environment): def format_full_version(info): + # type: (sys._version_info) -> str version = "{0.major}.{0.minor}.{0.micro}".format(info) kind = info.releaselevel if kind != "final": @@ -242,9 +266,13 @@ def format_full_version(info): def default_environment(): + # type: () -> Dict[str, str] if hasattr(sys, "implementation"): - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name + # Ignoring the `sys.implementation` reference for type checking due to + # mypy not liking that the attribute doesn't exist in Python 2.7 when + # run with the `--py27` flag. + iver = format_full_version(sys.implementation.version) # type: ignore + implementation_name = sys.implementation.name # type: ignore else: iver = "0" implementation_name = "" @@ -266,6 +294,7 @@ def default_environment(): class Marker(object): def __init__(self, marker): + # type: (str) -> None try: self._markers = _coerce_parse_result(MARKER.parseString(marker)) except ParseException as e: @@ -275,12 +304,15 @@ def __init__(self, marker): raise InvalidMarker(err_str) def __str__(self): + # type: () -> str return _format_marker(self._markers) def __repr__(self): + # type: () -> str return "".format(str(self)) def evaluate(self, environment=None): + # type: (Optional[Dict[str, str]]) -> bool """Evaluate a marker. Return the boolean from evaluating the given marker against the diff --git a/setuptools/_vendor/packaging/py.typed b/setuptools/_vendor/packaging/py.typed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/setuptools/_vendor/packaging/requirements.py b/setuptools/_vendor/packaging/requirements.py index 8a0c2cb9be..06b1748851 100644 --- a/setuptools/_vendor/packaging/requirements.py +++ b/setuptools/_vendor/packaging/requirements.py @@ -11,9 +11,13 @@ from setuptools.extern.pyparsing import Literal as L # noqa from setuptools.extern.six.moves.urllib import parse as urlparse +from ._typing import TYPE_CHECKING from .markers import MARKER_EXPR, Marker from .specifiers import LegacySpecifier, Specifier, SpecifierSet +if TYPE_CHECKING: # pragma: no cover + from typing import List + class InvalidRequirement(ValueError): """ @@ -89,6 +93,7 @@ class Requirement(object): # TODO: Can we normalize the name and extra name? def __init__(self, requirement_string): + # type: (str) -> None try: req = REQUIREMENT.parseString(requirement_string) except ParseException as e: @@ -116,7 +121,8 @@ def __init__(self, requirement_string): self.marker = req.marker if req.marker else None def __str__(self): - parts = [self.name] + # type: () -> str + parts = [self.name] # type: List[str] if self.extras: parts.append("[{0}]".format(",".join(sorted(self.extras)))) @@ -135,4 +141,5 @@ def __str__(self): return "".join(parts) def __repr__(self): + # type: () -> str return "".format(str(self)) diff --git a/setuptools/_vendor/packaging/specifiers.py b/setuptools/_vendor/packaging/specifiers.py index 743576a080..fe09bb1dbb 100644 --- a/setuptools/_vendor/packaging/specifiers.py +++ b/setuptools/_vendor/packaging/specifiers.py @@ -9,8 +9,27 @@ import re from ._compat import string_types, with_metaclass +from ._typing import TYPE_CHECKING +from .utils import canonicalize_version from .version import Version, LegacyVersion, parse +if TYPE_CHECKING: # pragma: no cover + from typing import ( + List, + Dict, + Union, + Iterable, + Iterator, + Optional, + Callable, + Tuple, + FrozenSet, + ) + + ParsedVersion = Union[Version, LegacyVersion] + UnparsedVersion = Union[Version, LegacyVersion, str] + CallableOperator = Callable[[ParsedVersion, str], bool] + class InvalidSpecifier(ValueError): """ @@ -18,9 +37,10 @@ class InvalidSpecifier(ValueError): """ -class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): +class BaseSpecifier(with_metaclass(abc.ABCMeta, object)): # type: ignore @abc.abstractmethod def __str__(self): + # type: () -> str """ Returns the str representation of this Specifier like object. This should be representative of the Specifier itself. @@ -28,12 +48,14 @@ def __str__(self): @abc.abstractmethod def __hash__(self): + # type: () -> int """ Returns a hash value for this Specifier like object. """ @abc.abstractmethod def __eq__(self, other): + # type: (object) -> bool """ Returns a boolean representing whether or not the two Specifier like objects are equal. @@ -41,6 +63,7 @@ def __eq__(self, other): @abc.abstractmethod def __ne__(self, other): + # type: (object) -> bool """ Returns a boolean representing whether or not the two Specifier like objects are not equal. @@ -48,6 +71,7 @@ def __ne__(self, other): @abc.abstractproperty def prereleases(self): + # type: () -> Optional[bool] """ Returns whether or not pre-releases as a whole are allowed by this specifier. @@ -55,6 +79,7 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None """ Sets whether or not pre-releases as a whole are allowed by this specifier. @@ -62,12 +87,14 @@ def prereleases(self, value): @abc.abstractmethod def contains(self, item, prereleases=None): + # type: (str, Optional[bool]) -> bool """ Determines if the given item is contained within this specifier. """ @abc.abstractmethod def filter(self, iterable, prereleases=None): + # type: (Iterable[UnparsedVersion], Optional[bool]) -> Iterable[UnparsedVersion] """ Takes an iterable of items and filters them so that only items which are contained within this specifier are allowed in it. @@ -76,19 +103,24 @@ def filter(self, iterable, prereleases=None): class _IndividualSpecifier(BaseSpecifier): - _operators = {} + _operators = {} # type: Dict[str, str] def __init__(self, spec="", prereleases=None): + # type: (str, Optional[bool]) -> None match = self._regex.search(spec) if not match: raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec)) - self._spec = (match.group("operator").strip(), match.group("version").strip()) + self._spec = ( + match.group("operator").strip(), + match.group("version").strip(), + ) # type: Tuple[str, str] # Store whether or not this Specifier should accept prereleases self._prereleases = prereleases def __repr__(self): + # type: () -> str pre = ( ", prereleases={0!r}".format(self.prereleases) if self._prereleases is not None @@ -98,26 +130,35 @@ def __repr__(self): return "<{0}({1!r}{2})>".format(self.__class__.__name__, str(self), pre) def __str__(self): + # type: () -> str return "{0}{1}".format(*self._spec) + @property + def _canonical_spec(self): + # type: () -> Tuple[str, Union[Version, str]] + return self._spec[0], canonicalize_version(self._spec[1]) + def __hash__(self): - return hash(self._spec) + # type: () -> int + return hash(self._canonical_spec) def __eq__(self, other): + # type: (object) -> bool if isinstance(other, string_types): try: - other = self.__class__(other) + other = self.__class__(str(other)) except InvalidSpecifier: return NotImplemented elif not isinstance(other, self.__class__): return NotImplemented - return self._spec == other._spec + return self._canonical_spec == other._canonical_spec def __ne__(self, other): + # type: (object) -> bool if isinstance(other, string_types): try: - other = self.__class__(other) + other = self.__class__(str(other)) except InvalidSpecifier: return NotImplemented elif not isinstance(other, self.__class__): @@ -126,52 +167,67 @@ def __ne__(self, other): return self._spec != other._spec def _get_operator(self, op): - return getattr(self, "_compare_{0}".format(self._operators[op])) + # type: (str) -> CallableOperator + operator_callable = getattr( + self, "_compare_{0}".format(self._operators[op]) + ) # type: CallableOperator + return operator_callable def _coerce_version(self, version): + # type: (UnparsedVersion) -> ParsedVersion if not isinstance(version, (LegacyVersion, Version)): version = parse(version) return version @property def operator(self): + # type: () -> str return self._spec[0] @property def version(self): + # type: () -> str return self._spec[1] @property def prereleases(self): + # type: () -> Optional[bool] return self._prereleases @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value def __contains__(self, item): + # type: (str) -> bool return self.contains(item) def contains(self, item, prereleases=None): + # type: (UnparsedVersion, Optional[bool]) -> bool + # Determine if prereleases are to be allowed or not. if prereleases is None: prereleases = self.prereleases # Normalize item to a Version or LegacyVersion, this allows us to have # a shortcut for ``"2.0" in Specifier(">=2") - item = self._coerce_version(item) + normalized_item = self._coerce_version(item) # Determine if we should be supporting prereleases in this specifier # or not, if we do not support prereleases than we can short circuit # logic if this version is a prereleases. - if item.is_prerelease and not prereleases: + if normalized_item.is_prerelease and not prereleases: return False # Actually do the comparison to determine if this item is contained # within this Specifier or not. - return self._get_operator(self.operator)(item, self.version) + operator_callable = self._get_operator(self.operator) # type: CallableOperator + return operator_callable(normalized_item, self.version) def filter(self, iterable, prereleases=None): + # type: (Iterable[UnparsedVersion], Optional[bool]) -> Iterable[UnparsedVersion] + yielded = False found_prereleases = [] @@ -230,32 +286,43 @@ class LegacySpecifier(_IndividualSpecifier): } def _coerce_version(self, version): + # type: (Union[ParsedVersion, str]) -> LegacyVersion if not isinstance(version, LegacyVersion): version = LegacyVersion(str(version)) return version def _compare_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective == self._coerce_version(spec) def _compare_not_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective != self._coerce_version(spec) def _compare_less_than_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective <= self._coerce_version(spec) def _compare_greater_than_equal(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective >= self._coerce_version(spec) def _compare_less_than(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective < self._coerce_version(spec) def _compare_greater_than(self, prospective, spec): + # type: (LegacyVersion, str) -> bool return prospective > self._coerce_version(spec) -def _require_version_compare(fn): +def _require_version_compare( + fn # type: (Callable[[Specifier, ParsedVersion, str], bool]) +): + # type: (...) -> Callable[[Specifier, ParsedVersion, str], bool] @functools.wraps(fn) def wrapped(self, prospective, spec): + # type: (Specifier, ParsedVersion, str) -> bool if not isinstance(prospective, Version): return False return fn(self, prospective, spec) @@ -373,6 +440,8 @@ class Specifier(_IndividualSpecifier): @_require_version_compare def _compare_compatible(self, prospective, spec): + # type: (ParsedVersion, str) -> bool + # Compatible releases have an equivalent combination of >= and ==. That # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to # implement this in terms of the other specifiers instead of @@ -400,56 +469,75 @@ def _compare_compatible(self, prospective, spec): @_require_version_compare def _compare_equal(self, prospective, spec): + # type: (ParsedVersion, str) -> bool + # We need special logic to handle prefix matching if spec.endswith(".*"): # In the case of prefix matching we want to ignore local segment. prospective = Version(prospective.public) # Split the spec out by dots, and pretend that there is an implicit # dot in between a release segment and a pre-release segment. - spec = _version_split(spec[:-2]) # Remove the trailing .* + split_spec = _version_split(spec[:-2]) # Remove the trailing .* # Split the prospective version out by dots, and pretend that there # is an implicit dot in between a release segment and a pre-release # segment. - prospective = _version_split(str(prospective)) + split_prospective = _version_split(str(prospective)) # Shorten the prospective version to be the same length as the spec # so that we can determine if the specifier is a prefix of the # prospective version or not. - prospective = prospective[: len(spec)] + shortened_prospective = split_prospective[: len(split_spec)] # Pad out our two sides with zeros so that they both equal the same # length. - spec, prospective = _pad_version(spec, prospective) + padded_spec, padded_prospective = _pad_version( + split_spec, shortened_prospective + ) + + return padded_prospective == padded_spec else: # Convert our spec string into a Version - spec = Version(spec) + spec_version = Version(spec) # If the specifier does not have a local segment, then we want to # act as if the prospective version also does not have a local # segment. - if not spec.local: + if not spec_version.local: prospective = Version(prospective.public) - return prospective == spec + return prospective == spec_version @_require_version_compare def _compare_not_equal(self, prospective, spec): + # type: (ParsedVersion, str) -> bool return not self._compare_equal(prospective, spec) @_require_version_compare def _compare_less_than_equal(self, prospective, spec): - return prospective <= Version(spec) + # type: (ParsedVersion, str) -> bool + + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) <= Version(spec) @_require_version_compare def _compare_greater_than_equal(self, prospective, spec): - return prospective >= Version(spec) + # type: (ParsedVersion, str) -> bool + + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) >= Version(spec) @_require_version_compare - def _compare_less_than(self, prospective, spec): + def _compare_less_than(self, prospective, spec_str): + # type: (ParsedVersion, str) -> bool + # Convert our spec to a Version instance, since we'll want to work with # it as a version. - spec = Version(spec) + spec = Version(spec_str) # Check to see if the prospective version is less than the spec # version. If it's not we can short circuit and just return False now @@ -471,10 +559,12 @@ def _compare_less_than(self, prospective, spec): return True @_require_version_compare - def _compare_greater_than(self, prospective, spec): + def _compare_greater_than(self, prospective, spec_str): + # type: (ParsedVersion, str) -> bool + # Convert our spec to a Version instance, since we'll want to work with # it as a version. - spec = Version(spec) + spec = Version(spec_str) # Check to see if the prospective version is greater than the spec # version. If it's not we can short circuit and just return False now @@ -502,10 +592,13 @@ def _compare_greater_than(self, prospective, spec): return True def _compare_arbitrary(self, prospective, spec): + # type: (Version, str) -> bool return str(prospective).lower() == str(spec).lower() @property def prereleases(self): + # type: () -> bool + # If there is an explicit prereleases set for this, then we'll just # blindly use that. if self._prereleases is not None: @@ -530,6 +623,7 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value @@ -537,7 +631,8 @@ def prereleases(self, value): def _version_split(version): - result = [] + # type: (str) -> List[str] + result = [] # type: List[str] for item in version.split("."): match = _prefix_regex.search(item) if match: @@ -548,6 +643,7 @@ def _version_split(version): def _pad_version(left, right): + # type: (List[str], List[str]) -> Tuple[List[str], List[str]] left_split, right_split = [], [] # Get the release segment of our versions @@ -567,14 +663,16 @@ def _pad_version(left, right): class SpecifierSet(BaseSpecifier): def __init__(self, specifiers="", prereleases=None): - # Split on , to break each indidivual specifier into it's own item, and + # type: (str, Optional[bool]) -> None + + # Split on , to break each individual specifier into it's own item, and # strip each item to remove leading/trailing whitespace. - specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] + split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] # Parsed each individual specifier, attempting first to make it a # Specifier and falling back to a LegacySpecifier. parsed = set() - for specifier in specifiers: + for specifier in split_specifiers: try: parsed.add(Specifier(specifier)) except InvalidSpecifier: @@ -588,6 +686,7 @@ def __init__(self, specifiers="", prereleases=None): self._prereleases = prereleases def __repr__(self): + # type: () -> str pre = ( ", prereleases={0!r}".format(self.prereleases) if self._prereleases is not None @@ -597,12 +696,15 @@ def __repr__(self): return "".format(str(self), pre) def __str__(self): + # type: () -> str return ",".join(sorted(str(s) for s in self._specs)) def __hash__(self): + # type: () -> int return hash(self._specs) def __and__(self, other): + # type: (Union[SpecifierSet, str]) -> SpecifierSet if isinstance(other, string_types): other = SpecifierSet(other) elif not isinstance(other, SpecifierSet): @@ -626,9 +728,8 @@ def __and__(self, other): return specifier def __eq__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): + # type: (object) -> bool + if isinstance(other, (string_types, _IndividualSpecifier)): other = SpecifierSet(str(other)) elif not isinstance(other, SpecifierSet): return NotImplemented @@ -636,9 +737,8 @@ def __eq__(self, other): return self._specs == other._specs def __ne__(self, other): - if isinstance(other, string_types): - other = SpecifierSet(other) - elif isinstance(other, _IndividualSpecifier): + # type: (object) -> bool + if isinstance(other, (string_types, _IndividualSpecifier)): other = SpecifierSet(str(other)) elif not isinstance(other, SpecifierSet): return NotImplemented @@ -646,13 +746,17 @@ def __ne__(self, other): return self._specs != other._specs def __len__(self): + # type: () -> int return len(self._specs) def __iter__(self): + # type: () -> Iterator[FrozenSet[_IndividualSpecifier]] return iter(self._specs) @property def prereleases(self): + # type: () -> Optional[bool] + # If we have been given an explicit prerelease modifier, then we'll # pass that through here. if self._prereleases is not None: @@ -670,12 +774,16 @@ def prereleases(self): @prereleases.setter def prereleases(self, value): + # type: (bool) -> None self._prereleases = value def __contains__(self, item): + # type: (Union[ParsedVersion, str]) -> bool return self.contains(item) def contains(self, item, prereleases=None): + # type: (Union[ParsedVersion, str], Optional[bool]) -> bool + # Ensure that our item is a Version or LegacyVersion instance. if not isinstance(item, (LegacyVersion, Version)): item = parse(item) @@ -701,7 +809,13 @@ def contains(self, item, prereleases=None): # will always return True, this is an explicit design decision. return all(s.contains(item, prereleases=prereleases) for s in self._specs) - def filter(self, iterable, prereleases=None): + def filter( + self, + iterable, # type: Iterable[Union[ParsedVersion, str]] + prereleases=None, # type: Optional[bool] + ): + # type: (...) -> Iterable[Union[ParsedVersion, str]] + # Determine if we're forcing a prerelease or not, if we're not forcing # one for this particular filter call, then we'll use whatever the # SpecifierSet thinks for whether or not we should support prereleases. @@ -719,8 +833,8 @@ def filter(self, iterable, prereleases=None): # which will filter out any pre-releases, unless there are no final # releases, and which will filter out LegacyVersion in general. else: - filtered = [] - found_prereleases = [] + filtered = [] # type: List[Union[ParsedVersion, str]] + found_prereleases = [] # type: List[Union[ParsedVersion, str]] for item in iterable: # Ensure that we some kind of Version class for this item. diff --git a/setuptools/_vendor/packaging/tags.py b/setuptools/_vendor/packaging/tags.py index ec9942f0f6..9064910b8b 100644 --- a/setuptools/_vendor/packaging/tags.py +++ b/setuptools/_vendor/packaging/tags.py @@ -13,12 +13,37 @@ EXTENSION_SUFFIXES = [x[0] for x in imp.get_suffixes()] del imp +import logging +import os import platform import re +import struct import sys import sysconfig import warnings +from ._typing import TYPE_CHECKING, cast + +if TYPE_CHECKING: # pragma: no cover + from typing import ( + Dict, + FrozenSet, + IO, + Iterable, + Iterator, + List, + Optional, + Sequence, + Tuple, + Union, + ) + + PythonVersion = Sequence[int] + MacVersion = Tuple[int, int] + GlibcVersion = Tuple[int, int] + + +logger = logging.getLogger(__name__) INTERPRETER_SHORT_NAMES = { "python": "py", # Generic. @@ -26,34 +51,48 @@ "pypy": "pp", "ironpython": "ip", "jython": "jy", -} +} # type: Dict[str, str] _32_BIT_INTERPRETER = sys.maxsize <= 2 ** 32 class Tag(object): + """ + A representation of the tag triple for a wheel. + + Instances are considered immutable and thus are hashable. Equality checking + is also supported. + """ __slots__ = ["_interpreter", "_abi", "_platform"] def __init__(self, interpreter, abi, platform): + # type: (str, str, str) -> None self._interpreter = interpreter.lower() self._abi = abi.lower() self._platform = platform.lower() @property def interpreter(self): + # type: () -> str return self._interpreter @property def abi(self): + # type: () -> str return self._abi @property def platform(self): + # type: () -> str return self._platform def __eq__(self, other): + # type: (object) -> bool + if not isinstance(other, Tag): + return NotImplemented + return ( (self.platform == other.platform) and (self.abi == other.abi) @@ -61,16 +100,26 @@ def __eq__(self, other): ) def __hash__(self): + # type: () -> int return hash((self._interpreter, self._abi, self._platform)) def __str__(self): + # type: () -> str return "{}-{}-{}".format(self._interpreter, self._abi, self._platform) def __repr__(self): + # type: () -> str return "<{self} @ {self_id}>".format(self=self, self_id=id(self)) def parse_tag(tag): + # type: (str) -> FrozenSet[Tag] + """ + Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. + + Returning a set is required due to the possibility that the tag is a + compressed tag set. + """ tags = set() interpreters, abis, platforms = tag.split("-") for interpreter in interpreters.split("."): @@ -80,20 +129,54 @@ def parse_tag(tag): return frozenset(tags) +def _warn_keyword_parameter(func_name, kwargs): + # type: (str, Dict[str, bool]) -> bool + """ + Backwards-compatibility with Python 2.7 to allow treating 'warn' as keyword-only. + """ + if not kwargs: + return False + elif len(kwargs) > 1 or "warn" not in kwargs: + kwargs.pop("warn", None) + arg = next(iter(kwargs.keys())) + raise TypeError( + "{}() got an unexpected keyword argument {!r}".format(func_name, arg) + ) + return kwargs["warn"] + + +def _get_config_var(name, warn=False): + # type: (str, bool) -> Union[int, str, None] + value = sysconfig.get_config_var(name) + if value is None and warn: + logger.debug( + "Config variable '%s' is unset, Python ABI tag may be incorrect", name + ) + return value + + def _normalize_string(string): + # type: (str) -> str return string.replace(".", "_").replace("-", "_") -def _cpython_interpreter(py_version): - # TODO: Is using py_version_nodot for interpreter version critical? - return "cp{major}{minor}".format(major=py_version[0], minor=py_version[1]) +def _abi3_applies(python_version): + # type: (PythonVersion) -> bool + """ + Determine if the Python version supports abi3. + + PEP 384 was first implemented in Python 3.2. + """ + return len(python_version) > 1 and tuple(python_version) >= (3, 2) -def _cpython_abis(py_version): +def _cpython_abis(py_version, warn=False): + # type: (PythonVersion, bool) -> List[str] + py_version = tuple(py_version) # To allow for version comparison. abis = [] - version = "{}{}".format(*py_version[:2]) + version = _version_nodot(py_version[:2]) debug = pymalloc = ucs4 = "" - with_debug = sysconfig.get_config_var("Py_DEBUG") + with_debug = _get_config_var("Py_DEBUG", warn) has_refcount = hasattr(sys, "gettotalrefcount") # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled # extension modules is the best option. @@ -102,11 +185,11 @@ def _cpython_abis(py_version): if with_debug or (with_debug is None and (has_refcount or has_ext)): debug = "d" if py_version < (3, 8): - with_pymalloc = sysconfig.get_config_var("WITH_PYMALLOC") + with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) if with_pymalloc or with_pymalloc is None: pymalloc = "m" if py_version < (3, 3): - unicode_size = sysconfig.get_config_var("Py_UNICODE_SIZE") + unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) if unicode_size == 4 or ( unicode_size is None and sys.maxunicode == 0x10FFFF ): @@ -124,86 +207,148 @@ def _cpython_abis(py_version): return abis -def _cpython_tags(py_version, interpreter, abis, platforms): +def cpython_tags( + python_version=None, # type: Optional[PythonVersion] + abis=None, # type: Optional[Iterable[str]] + platforms=None, # type: Optional[Iterable[str]] + **kwargs # type: bool +): + # type: (...) -> Iterator[Tag] + """ + Yields the tags for a CPython interpreter. + + The tags consist of: + - cp-- + - cp-abi3- + - cp-none- + - cp-abi3- # Older Python versions down to 3.2. + + If python_version only specifies a major version then user-provided ABIs and + the 'none' ABItag will be used. + + If 'abi3' or 'none' are specified in 'abis' then they will be yielded at + their normal position and not at the beginning. + """ + warn = _warn_keyword_parameter("cpython_tags", kwargs) + if not python_version: + python_version = sys.version_info[:2] + + interpreter = "cp{}".format(_version_nodot(python_version[:2])) + + if abis is None: + if len(python_version) > 1: + abis = _cpython_abis(python_version, warn) + else: + abis = [] + abis = list(abis) + # 'abi3' and 'none' are explicitly handled later. + for explicit_abi in ("abi3", "none"): + try: + abis.remove(explicit_abi) + except ValueError: + pass + + platforms = list(platforms or _platform_tags()) for abi in abis: for platform_ in platforms: yield Tag(interpreter, abi, platform_) - for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): - yield tag + if _abi3_applies(python_version): + for tag in (Tag(interpreter, "abi3", platform_) for platform_ in platforms): + yield tag for tag in (Tag(interpreter, "none", platform_) for platform_ in platforms): yield tag - # PEP 384 was first implemented in Python 3.2. - for minor_version in range(py_version[1] - 1, 1, -1): - for platform_ in platforms: - interpreter = "cp{major}{minor}".format( - major=py_version[0], minor=minor_version - ) - yield Tag(interpreter, "abi3", platform_) - -def _pypy_interpreter(): - return "pp{py_major}{pypy_major}{pypy_minor}".format( - py_major=sys.version_info[0], - pypy_major=sys.pypy_version_info.major, - pypy_minor=sys.pypy_version_info.minor, - ) + if _abi3_applies(python_version): + for minor_version in range(python_version[1] - 1, 1, -1): + for platform_ in platforms: + interpreter = "cp{version}".format( + version=_version_nodot((python_version[0], minor_version)) + ) + yield Tag(interpreter, "abi3", platform_) def _generic_abi(): + # type: () -> Iterator[str] abi = sysconfig.get_config_var("SOABI") if abi: - return _normalize_string(abi) - else: - return "none" + yield _normalize_string(abi) -def _pypy_tags(py_version, interpreter, abi, platforms): - for tag in (Tag(interpreter, abi, platform) for platform in platforms): - yield tag - for tag in (Tag(interpreter, "none", platform) for platform in platforms): - yield tag +def generic_tags( + interpreter=None, # type: Optional[str] + abis=None, # type: Optional[Iterable[str]] + platforms=None, # type: Optional[Iterable[str]] + **kwargs # type: bool +): + # type: (...) -> Iterator[Tag] + """ + Yields the tags for a generic interpreter. + The tags consist of: + - -- -def _generic_tags(interpreter, py_version, abi, platforms): - for tag in (Tag(interpreter, abi, platform) for platform in platforms): - yield tag - if abi != "none": - tags = (Tag(interpreter, "none", platform_) for platform_ in platforms) - for tag in tags: - yield tag + The "none" ABI will be added if it was not explicitly provided. + """ + warn = _warn_keyword_parameter("generic_tags", kwargs) + if not interpreter: + interp_name = interpreter_name() + interp_version = interpreter_version(warn=warn) + interpreter = "".join([interp_name, interp_version]) + if abis is None: + abis = _generic_abi() + platforms = list(platforms or _platform_tags()) + abis = list(abis) + if "none" not in abis: + abis.append("none") + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) def _py_interpreter_range(py_version): + # type: (PythonVersion) -> Iterator[str] """ - Yield Python versions in descending order. + Yields Python versions in descending order. After the latest version, the major-only version will be yielded, and then - all following versions up to 'end'. + all previous versions of that major version. """ - yield "py{major}{minor}".format(major=py_version[0], minor=py_version[1]) + if len(py_version) > 1: + yield "py{version}".format(version=_version_nodot(py_version[:2])) yield "py{major}".format(major=py_version[0]) - for minor in range(py_version[1] - 1, -1, -1): - yield "py{major}{minor}".format(major=py_version[0], minor=minor) + if len(py_version) > 1: + for minor in range(py_version[1] - 1, -1, -1): + yield "py{version}".format(version=_version_nodot((py_version[0], minor))) -def _independent_tags(interpreter, py_version, platforms): +def compatible_tags( + python_version=None, # type: Optional[PythonVersion] + interpreter=None, # type: Optional[str] + platforms=None, # type: Optional[Iterable[str]] +): + # type: (...) -> Iterator[Tag] """ - Return the sequence of tags that are consistent across implementations. + Yields the sequence of tags that are compatible with a specific version of Python. The tags consist of: - py*-none- - - -none-any + - -none-any # ... if `interpreter` is provided. - py*-none-any """ - for version in _py_interpreter_range(py_version): + if not python_version: + python_version = sys.version_info[:2] + platforms = list(platforms or _platform_tags()) + for version in _py_interpreter_range(python_version): for platform_ in platforms: yield Tag(version, "none", platform_) - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(py_version): + if interpreter: + yield Tag(interpreter, "none", "any") + for version in _py_interpreter_range(python_version): yield Tag(version, "none", "any") def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): + # type: (str, bool) -> str if not is_32bit: return arch @@ -214,6 +359,7 @@ def _mac_arch(arch, is_32bit=_32_BIT_INTERPRETER): def _mac_binary_formats(version, cpu_arch): + # type: (MacVersion, str) -> List[str] formats = [cpu_arch] if cpu_arch == "x86_64": if version < (10, 4): @@ -240,32 +386,42 @@ def _mac_binary_formats(version, cpu_arch): return formats -def _mac_platforms(version=None, arch=None): - version_str, _, cpu_arch = platform.mac_ver() +def mac_platforms(version=None, arch=None): + # type: (Optional[MacVersion], Optional[str]) -> Iterator[str] + """ + Yields the platform tags for a macOS system. + + The `version` parameter is a two-item tuple specifying the macOS version to + generate platform tags for. The `arch` parameter is the CPU architecture to + generate platform tags for. Both parameters default to the appropriate value + for the current system. + """ + version_str, _, cpu_arch = platform.mac_ver() # type: ignore if version is None: - version = tuple(map(int, version_str.split(".")[:2])) + version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2]))) + else: + version = version if arch is None: arch = _mac_arch(cpu_arch) - platforms = [] + else: + arch = arch for minor_version in range(version[1], -1, -1): compat_version = version[0], minor_version binary_formats = _mac_binary_formats(compat_version, arch) for binary_format in binary_formats: - platforms.append( - "macosx_{major}_{minor}_{binary_format}".format( - major=compat_version[0], - minor=compat_version[1], - binary_format=binary_format, - ) + yield "macosx_{major}_{minor}_{binary_format}".format( + major=compat_version[0], + minor=compat_version[1], + binary_format=binary_format, ) - return platforms # From PEP 513. def _is_manylinux_compatible(name, glibc_version): + # type: (str, GlibcVersion) -> bool # Check for presence of _manylinux module. try: - import _manylinux + import _manylinux # noqa return bool(getattr(_manylinux, name + "_compatible")) except (ImportError, AttributeError): @@ -276,14 +432,50 @@ def _is_manylinux_compatible(name, glibc_version): def _glibc_version_string(): + # type: () -> Optional[str] # Returns glibc version string, or None if not using glibc. - import ctypes + return _glibc_version_string_confstr() or _glibc_version_string_ctypes() + + +def _glibc_version_string_confstr(): + # type: () -> Optional[str] + """ + Primary implementation of glibc_version_string using os.confstr. + """ + # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely + # to be broken or missing. This strategy is used in the standard library + # platform module. + # https://github.com/python/cpython/blob/fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71/Lib/platform.py#L175-L183 + try: + # os.confstr("CS_GNU_LIBC_VERSION") returns a string like "glibc 2.17". + version_string = os.confstr( # type: ignore[attr-defined] # noqa: F821 + "CS_GNU_LIBC_VERSION" + ) + assert version_string is not None + _, version = version_string.split() # type: Tuple[str, str] + except (AssertionError, AttributeError, OSError, ValueError): + # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... + return None + return version + + +def _glibc_version_string_ctypes(): + # type: () -> Optional[str] + """ + Fallback implementation of glibc_version_string using ctypes. + """ + try: + import ctypes + except ImportError: + return None # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the returned handle is for the # main program". This way we can let the linker do the work to figure out # which libc our process is actually using. - process_namespace = ctypes.CDLL(None) + # + # Note: typeshed is wrong here so we are ignoring this line. + process_namespace = ctypes.CDLL(None) # type: ignore try: gnu_get_libc_version = process_namespace.gnu_get_libc_version except AttributeError: @@ -293,7 +485,7 @@ def _glibc_version_string(): # Call gnu_get_libc_version, which returns a string like "2.5" gnu_get_libc_version.restype = ctypes.c_char_p - version_str = gnu_get_libc_version() + version_str = gnu_get_libc_version() # type: str # py2 / py3 compatibility: if not isinstance(version_str, str): version_str = version_str.decode("ascii") @@ -303,6 +495,7 @@ def _glibc_version_string(): # Separated out from have_compatible_glibc for easier unit testing. def _check_glibc_version(version_str, required_major, minimum_minor): + # type: (str, int, int) -> bool # Parse string and check against requested version. # # We use a regexp instead of str.split because we want to discard any @@ -324,81 +517,235 @@ def _check_glibc_version(version_str, required_major, minimum_minor): def _have_compatible_glibc(required_major, minimum_minor): + # type: (int, int) -> bool version_str = _glibc_version_string() if version_str is None: return False return _check_glibc_version(version_str, required_major, minimum_minor) +# Python does not provide platform information at sufficient granularity to +# identify the architecture of the running executable in some cases, so we +# determine it dynamically by reading the information from the running +# process. This only applies on Linux, which uses the ELF format. +class _ELFFileHeader(object): + # https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + class _InvalidELFFileHeader(ValueError): + """ + An invalid ELF file header was found. + """ + + ELF_MAGIC_NUMBER = 0x7F454C46 + ELFCLASS32 = 1 + ELFCLASS64 = 2 + ELFDATA2LSB = 1 + ELFDATA2MSB = 2 + EM_386 = 3 + EM_S390 = 22 + EM_ARM = 40 + EM_X86_64 = 62 + EF_ARM_ABIMASK = 0xFF000000 + EF_ARM_ABI_VER5 = 0x05000000 + EF_ARM_ABI_FLOAT_HARD = 0x00000400 + + def __init__(self, file): + # type: (IO[bytes]) -> None + def unpack(fmt): + # type: (str) -> int + try: + (result,) = struct.unpack( + fmt, file.read(struct.calcsize(fmt)) + ) # type: (int, ) + except struct.error: + raise _ELFFileHeader._InvalidELFFileHeader() + return result + + self.e_ident_magic = unpack(">I") + if self.e_ident_magic != self.ELF_MAGIC_NUMBER: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_class = unpack("B") + if self.e_ident_class not in {self.ELFCLASS32, self.ELFCLASS64}: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_data = unpack("B") + if self.e_ident_data not in {self.ELFDATA2LSB, self.ELFDATA2MSB}: + raise _ELFFileHeader._InvalidELFFileHeader() + self.e_ident_version = unpack("B") + self.e_ident_osabi = unpack("B") + self.e_ident_abiversion = unpack("B") + self.e_ident_pad = file.read(7) + format_h = "H" + format_i = "I" + format_q = "Q" + format_p = format_i if self.e_ident_class == self.ELFCLASS32 else format_q + self.e_type = unpack(format_h) + self.e_machine = unpack(format_h) + self.e_version = unpack(format_i) + self.e_entry = unpack(format_p) + self.e_phoff = unpack(format_p) + self.e_shoff = unpack(format_p) + self.e_flags = unpack(format_i) + self.e_ehsize = unpack(format_h) + self.e_phentsize = unpack(format_h) + self.e_phnum = unpack(format_h) + self.e_shentsize = unpack(format_h) + self.e_shnum = unpack(format_h) + self.e_shstrndx = unpack(format_h) + + +def _get_elf_header(): + # type: () -> Optional[_ELFFileHeader] + try: + with open(sys.executable, "rb") as f: + elf_header = _ELFFileHeader(f) + except (IOError, OSError, TypeError, _ELFFileHeader._InvalidELFFileHeader): + return None + return elf_header + + +def _is_linux_armhf(): + # type: () -> bool + # hard-float ABI can be detected from the ELF header of the running + # process + # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf + elf_header = _get_elf_header() + if elf_header is None: + return False + result = elf_header.e_ident_class == elf_header.ELFCLASS32 + result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB + result &= elf_header.e_machine == elf_header.EM_ARM + result &= ( + elf_header.e_flags & elf_header.EF_ARM_ABIMASK + ) == elf_header.EF_ARM_ABI_VER5 + result &= ( + elf_header.e_flags & elf_header.EF_ARM_ABI_FLOAT_HARD + ) == elf_header.EF_ARM_ABI_FLOAT_HARD + return result + + +def _is_linux_i686(): + # type: () -> bool + elf_header = _get_elf_header() + if elf_header is None: + return False + result = elf_header.e_ident_class == elf_header.ELFCLASS32 + result &= elf_header.e_ident_data == elf_header.ELFDATA2LSB + result &= elf_header.e_machine == elf_header.EM_386 + return result + + +def _have_compatible_manylinux_abi(arch): + # type: (str) -> bool + if arch == "armv7l": + return _is_linux_armhf() + if arch == "i686": + return _is_linux_i686() + return True + + def _linux_platforms(is_32bit=_32_BIT_INTERPRETER): + # type: (bool) -> Iterator[str] linux = _normalize_string(distutils.util.get_platform()) - if linux == "linux_x86_64" and is_32bit: - linux = "linux_i686" - manylinux_support = ( - ("manylinux2014", (2, 17)), # CentOS 7 w/ glibc 2.17 (PEP 599) - ("manylinux2010", (2, 12)), # CentOS 6 w/ glibc 2.12 (PEP 571) - ("manylinux1", (2, 5)), # CentOS 5 w/ glibc 2.5 (PEP 513) - ) + if is_32bit: + if linux == "linux_x86_64": + linux = "linux_i686" + elif linux == "linux_aarch64": + linux = "linux_armv7l" + manylinux_support = [] + _, arch = linux.split("_", 1) + if _have_compatible_manylinux_abi(arch): + if arch in {"x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le", "s390x"}: + manylinux_support.append( + ("manylinux2014", (2, 17)) + ) # CentOS 7 w/ glibc 2.17 (PEP 599) + if arch in {"x86_64", "i686"}: + manylinux_support.append( + ("manylinux2010", (2, 12)) + ) # CentOS 6 w/ glibc 2.12 (PEP 571) + manylinux_support.append( + ("manylinux1", (2, 5)) + ) # CentOS 5 w/ glibc 2.5 (PEP 513) manylinux_support_iter = iter(manylinux_support) for name, glibc_version in manylinux_support_iter: if _is_manylinux_compatible(name, glibc_version): - platforms = [linux.replace("linux", name)] + yield linux.replace("linux", name) break - else: - platforms = [] # Support for a later manylinux implies support for an earlier version. - platforms += [linux.replace("linux", name) for name, _ in manylinux_support_iter] - platforms.append(linux) - return platforms + for name, _ in manylinux_support_iter: + yield linux.replace("linux", name) + yield linux def _generic_platforms(): - platform = _normalize_string(distutils.util.get_platform()) - return [platform] + # type: () -> Iterator[str] + yield _normalize_string(distutils.util.get_platform()) -def _interpreter_name(): - name = platform.python_implementation().lower() +def _platform_tags(): + # type: () -> Iterator[str] + """ + Provides the platform tags for this installation. + """ + if platform.system() == "Darwin": + return mac_platforms() + elif platform.system() == "Linux": + return _linux_platforms() + else: + return _generic_platforms() + + +def interpreter_name(): + # type: () -> str + """ + Returns the name of the running interpreter. + """ + try: + name = sys.implementation.name # type: ignore + except AttributeError: # pragma: no cover + # Python 2.7 compatibility. + name = platform.python_implementation().lower() return INTERPRETER_SHORT_NAMES.get(name) or name -def _generic_interpreter(name, py_version): - version = sysconfig.get_config_var("py_version_nodot") - if not version: - version = "".join(map(str, py_version[:2])) - return "{name}{version}".format(name=name, version=version) +def interpreter_version(**kwargs): + # type: (bool) -> str + """ + Returns the version of the running interpreter. + """ + warn = _warn_keyword_parameter("interpreter_version", kwargs) + version = _get_config_var("py_version_nodot", warn=warn) + if version: + version = str(version) + else: + version = _version_nodot(sys.version_info[:2]) + return version + + +def _version_nodot(version): + # type: (PythonVersion) -> str + if any(v >= 10 for v in version): + sep = "_" + else: + sep = "" + return sep.join(map(str, version)) -def sys_tags(): +def sys_tags(**kwargs): + # type: (bool) -> Iterator[Tag] """ Returns the sequence of tag triples for the running interpreter. The order of the sequence corresponds to priority order for the interpreter, from most to least important. """ - py_version = sys.version_info[:2] - interpreter_name = _interpreter_name() - if platform.system() == "Darwin": - platforms = _mac_platforms() - elif platform.system() == "Linux": - platforms = _linux_platforms() - else: - platforms = _generic_platforms() + warn = _warn_keyword_parameter("sys_tags", kwargs) - if interpreter_name == "cp": - interpreter = _cpython_interpreter(py_version) - abis = _cpython_abis(py_version) - for tag in _cpython_tags(py_version, interpreter, abis, platforms): - yield tag - elif interpreter_name == "pp": - interpreter = _pypy_interpreter() - abi = _generic_abi() - for tag in _pypy_tags(py_version, interpreter, abi, platforms): + interp_name = interpreter_name() + if interp_name == "cp": + for tag in cpython_tags(warn=warn): yield tag else: - interpreter = _generic_interpreter(interpreter_name, py_version) - abi = _generic_abi() - for tag in _generic_tags(interpreter, py_version, abi, platforms): + for tag in generic_tags(): yield tag - for tag in _independent_tags(interpreter, py_version, platforms): + + for tag in compatible_tags(): yield tag diff --git a/setuptools/_vendor/packaging/utils.py b/setuptools/_vendor/packaging/utils.py index 8841878693..19579c1a0f 100644 --- a/setuptools/_vendor/packaging/utils.py +++ b/setuptools/_vendor/packaging/utils.py @@ -5,28 +5,36 @@ import re +from ._typing import TYPE_CHECKING, cast from .version import InvalidVersion, Version +if TYPE_CHECKING: # pragma: no cover + from typing import NewType, Union + + NormalizedName = NewType("NormalizedName", str) _canonicalize_regex = re.compile(r"[-_.]+") def canonicalize_name(name): + # type: (str) -> NormalizedName # This is taken from PEP 503. - return _canonicalize_regex.sub("-", name).lower() + value = _canonicalize_regex.sub("-", name).lower() + return cast("NormalizedName", value) -def canonicalize_version(version): +def canonicalize_version(_version): + # type: (str) -> Union[Version, str] """ - This is very similar to Version.__str__, but has one subtle differences + This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. """ try: - version = Version(version) + version = Version(_version) except InvalidVersion: # Legacy versions cannot be normalized - return version + return _version parts = [] diff --git a/setuptools/_vendor/packaging/version.py b/setuptools/_vendor/packaging/version.py index 95157a1f78..00371e86a8 100644 --- a/setuptools/_vendor/packaging/version.py +++ b/setuptools/_vendor/packaging/version.py @@ -7,8 +7,35 @@ import itertools import re -from ._structures import Infinity - +from ._structures import Infinity, NegativeInfinity +from ._typing import TYPE_CHECKING + +if TYPE_CHECKING: # pragma: no cover + from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Union + + from ._structures import InfinityType, NegativeInfinityType + + InfiniteTypes = Union[InfinityType, NegativeInfinityType] + PrePostDevType = Union[InfiniteTypes, Tuple[str, int]] + SubLocalType = Union[InfiniteTypes, int, str] + LocalType = Union[ + NegativeInfinityType, + Tuple[ + Union[ + SubLocalType, + Tuple[SubLocalType, str], + Tuple[NegativeInfinityType, SubLocalType], + ], + ..., + ], + ] + CmpKey = Tuple[ + int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType + ] + LegacyCmpKey = Tuple[int, Tuple[str, ...]] + VersionComparisonMethod = Callable[ + [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool + ] __all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] @@ -19,6 +46,7 @@ def parse(version): + # type: (str) -> Union[LegacyVersion, Version] """ Parse the given version string and return either a :class:`Version` object or a :class:`LegacyVersion` object depending on if the given version is @@ -37,28 +65,38 @@ class InvalidVersion(ValueError): class _BaseVersion(object): + _key = None # type: Union[CmpKey, LegacyCmpKey] + def __hash__(self): + # type: () -> int return hash(self._key) def __lt__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s < o) def __le__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s <= o) def __eq__(self, other): + # type: (object) -> bool return self._compare(other, lambda s, o: s == o) def __ge__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s >= o) def __gt__(self, other): + # type: (_BaseVersion) -> bool return self._compare(other, lambda s, o: s > o) def __ne__(self, other): + # type: (object) -> bool return self._compare(other, lambda s, o: s != o) def _compare(self, other, method): + # type: (object, VersionComparisonMethod) -> Union[bool, NotImplemented] if not isinstance(other, _BaseVersion): return NotImplemented @@ -67,57 +105,71 @@ def _compare(self, other, method): class LegacyVersion(_BaseVersion): def __init__(self, version): + # type: (str) -> None self._version = str(version) self._key = _legacy_cmpkey(self._version) def __str__(self): + # type: () -> str return self._version def __repr__(self): + # type: () -> str return "".format(repr(str(self))) @property def public(self): + # type: () -> str return self._version @property def base_version(self): + # type: () -> str return self._version @property def epoch(self): + # type: () -> int return -1 @property def release(self): + # type: () -> None return None @property def pre(self): + # type: () -> None return None @property def post(self): + # type: () -> None return None @property def dev(self): + # type: () -> None return None @property def local(self): + # type: () -> None return None @property def is_prerelease(self): + # type: () -> bool return False @property def is_postrelease(self): + # type: () -> bool return False @property def is_devrelease(self): + # type: () -> bool return False @@ -133,6 +185,7 @@ def is_devrelease(self): def _parse_version_parts(s): + # type: (str) -> Iterator[str] for part in _legacy_version_component_re.split(s): part = _legacy_version_replacement_map.get(part, part) @@ -150,6 +203,8 @@ def _parse_version_parts(s): def _legacy_cmpkey(version): + # type: (str) -> LegacyCmpKey + # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch # greater than or equal to 0. This will effectively put the LegacyVersion, # which uses the defacto standard originally implemented by setuptools, @@ -158,7 +213,7 @@ def _legacy_cmpkey(version): # This scheme is taken from pkg_resources.parse_version setuptools prior to # it's adoption of the packaging library. - parts = [] + parts = [] # type: List[str] for part in _parse_version_parts(version.lower()): if part.startswith("*"): # remove "-" before a prerelease tag @@ -171,9 +226,8 @@ def _legacy_cmpkey(version): parts.pop() parts.append(part) - parts = tuple(parts) - return epoch, parts + return epoch, tuple(parts) # Deliberately not anchored to the start and end of the string, to make it @@ -215,6 +269,8 @@ class Version(_BaseVersion): _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) def __init__(self, version): + # type: (str) -> None + # Validate the version and parse it into pieces match = self._regex.search(version) if not match: @@ -243,9 +299,11 @@ def __init__(self, version): ) def __repr__(self): + # type: () -> str return "".format(repr(str(self))) def __str__(self): + # type: () -> str parts = [] # Epoch @@ -275,26 +333,35 @@ def __str__(self): @property def epoch(self): - return self._version.epoch + # type: () -> int + _epoch = self._version.epoch # type: int + return _epoch @property def release(self): - return self._version.release + # type: () -> Tuple[int, ...] + _release = self._version.release # type: Tuple[int, ...] + return _release @property def pre(self): - return self._version.pre + # type: () -> Optional[Tuple[str, int]] + _pre = self._version.pre # type: Optional[Tuple[str, int]] + return _pre @property def post(self): + # type: () -> Optional[Tuple[str, int]] return self._version.post[1] if self._version.post else None @property def dev(self): + # type: () -> Optional[Tuple[str, int]] return self._version.dev[1] if self._version.dev else None @property def local(self): + # type: () -> Optional[str] if self._version.local: return ".".join(str(x) for x in self._version.local) else: @@ -302,10 +369,12 @@ def local(self): @property def public(self): + # type: () -> str return str(self).split("+", 1)[0] @property def base_version(self): + # type: () -> str parts = [] # Epoch @@ -319,18 +388,41 @@ def base_version(self): @property def is_prerelease(self): + # type: () -> bool return self.dev is not None or self.pre is not None @property def is_postrelease(self): + # type: () -> bool return self.post is not None @property def is_devrelease(self): + # type: () -> bool return self.dev is not None + @property + def major(self): + # type: () -> int + return self.release[0] if len(self.release) >= 1 else 0 + + @property + def minor(self): + # type: () -> int + return self.release[1] if len(self.release) >= 2 else 0 + + @property + def micro(self): + # type: () -> int + return self.release[2] if len(self.release) >= 3 else 0 + + +def _parse_letter_version( + letter, # type: str + number, # type: Union[str, bytes, SupportsInt] +): + # type: (...) -> Optional[Tuple[str, int]] -def _parse_letter_version(letter, number): if letter: # We consider there to be an implicit 0 in a pre-release if there is # not a numeral associated with it. @@ -360,11 +452,14 @@ def _parse_letter_version(letter, number): return letter, int(number) + return None + _local_version_separators = re.compile(r"[\._-]") def _parse_local_version(local): + # type: (str) -> Optional[LocalType] """ Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve"). """ @@ -373,15 +468,25 @@ def _parse_local_version(local): part.lower() if not part.isdigit() else int(part) for part in _local_version_separators.split(local) ) + return None + +def _cmpkey( + epoch, # type: int + release, # type: Tuple[int, ...] + pre, # type: Optional[Tuple[str, int]] + post, # type: Optional[Tuple[str, int]] + dev, # type: Optional[Tuple[str, int]] + local, # type: Optional[Tuple[SubLocalType]] +): + # type: (...) -> CmpKey -def _cmpkey(epoch, release, pre, post, dev, local): # When we compare a release version, we want to compare it with all of the # trailing zeros removed. So we'll use a reverse the list, drop all the now # leading zeros until we come to something non zero, then take the rest # re-reverse it back into the correct order and make it a tuple and use # that for our sorting key. - release = tuple( + _release = tuple( reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release)))) ) @@ -390,23 +495,31 @@ def _cmpkey(epoch, release, pre, post, dev, local): # if there is not a pre or a post segment. If we have one of those then # the normal sorting rules will handle this case correctly. if pre is None and post is None and dev is not None: - pre = -Infinity + _pre = NegativeInfinity # type: PrePostDevType # Versions without a pre-release (except as noted above) should sort after # those with one. elif pre is None: - pre = Infinity + _pre = Infinity + else: + _pre = pre # Versions without a post segment should sort before those with one. if post is None: - post = -Infinity + _post = NegativeInfinity # type: PrePostDevType + + else: + _post = post # Versions without a development segment should sort after those with one. if dev is None: - dev = Infinity + _dev = Infinity # type: PrePostDevType + + else: + _dev = dev if local is None: # Versions without a local segment should sort before those with one. - local = -Infinity + _local = NegativeInfinity # type: LocalType else: # Versions with a local segment need that segment parsed to implement # the sorting rules in PEP440. @@ -415,6 +528,8 @@ def _cmpkey(epoch, release, pre, post, dev, local): # - Numeric segments sort numerically # - Shorter versions sort before longer versions when the prefixes # match exactly - local = tuple((i, "") if isinstance(i, int) else (-Infinity, i) for i in local) + _local = tuple( + (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local + ) - return epoch, release, pre, post, dev, local + return epoch, _release, _pre, _post, _dev, _local diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index 65183d9a2a..288d077096 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,4 +1,4 @@ -packaging==19.2 +packaging==20.4 pyparsing==2.2.1 six==1.10.0 ordered-set==3.1.1 From 325609811b8db4d4ed161a961cae0ee4840317cc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 12 Aug 2020 19:58:27 -0400 Subject: [PATCH 8104/8469] Update changelog. --- changelog.d/2310.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2310.change.rst diff --git a/changelog.d/2310.change.rst b/changelog.d/2310.change.rst new file mode 100644 index 0000000000..a7f1cc5326 --- /dev/null +++ b/changelog.d/2310.change.rst @@ -0,0 +1 @@ +Updated vendored packaging version to 20.4. From a42d30089c42605d0f3191e4ccc19e1cfd1e0ccd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Aug 2020 09:40:52 -0400 Subject: [PATCH 8105/8469] =?UTF-8?q?Bump=20version:=2049.3.2=20=E2=86=92?= =?UTF-8?q?=2049.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2310.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2310.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5e0d7fd7a6..547dc886cd 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.3.2 +current_version = 49.4.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 0d2c96c39b..ac07145956 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.4.0 +------- + +* #2310: Updated vendored packaging version to 20.4. + + v49.3.2 ------- diff --git a/changelog.d/2310.change.rst b/changelog.d/2310.change.rst deleted file mode 100644 index a7f1cc5326..0000000000 --- a/changelog.d/2310.change.rst +++ /dev/null @@ -1 +0,0 @@ -Updated vendored packaging version to 20.4. diff --git a/setup.cfg b/setup.cfg index 5d4a084cdf..76d99d44d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.3.2 +version = 49.4.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From a7f6ad46b07d51fce91e74b3777d70cbd4168f0f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Aug 2020 18:59:34 -0400 Subject: [PATCH 8106/8469] =?UTF-8?q?Bump=20version:=2049.4.0=20=E2=86=92?= =?UTF-8?q?=2049.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 8 ++++++++ changelog.d/2306.change.rst | 3 --- setup.cfg | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/2306.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 547dc886cd..7ecebcd92e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.4.0 +current_version = 49.5.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ac07145956..534e15a8f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +v49.5.0 +------- + +* #2306: When running as a PEP 517 backend, setuptools does not try to install + ``setup_requires`` itself. They are reported as build requirements for the + frontend to install. + + v49.4.0 ------- diff --git a/changelog.d/2306.change.rst b/changelog.d/2306.change.rst deleted file mode 100644 index 1046eae3f8..0000000000 --- a/changelog.d/2306.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -When running as a PEP 517 backend, setuptools does not try to install -``setup_requires`` itself. They are reported as build requirements for the -frontend to install. diff --git a/setup.cfg b/setup.cfg index 76d99d44d7..7618ab116d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.4.0 +version = 49.5.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 4837f218ea05a304880f8448e27fe0affad3a1a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Aug 2020 21:49:25 -0400 Subject: [PATCH 8107/8469] Update tests to reflect new expectation. --- setuptools/tests/test_distutils_adoption.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index daccc473c2..8edd3f9b44 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -48,15 +48,15 @@ def test_distutils_stdlib(venv): """ Ensure stdlib distutils is used when appropriate. """ - assert venv.name not in find_distutils(venv, env=dict()).split(os.sep) + env = dict(SETUPTOOLS_USE_DISTUTILS='stdlib') + assert venv.name not in find_distutils(venv, env=env).split(os.sep) def test_distutils_local_with_setuptools(venv): """ Ensure local distutils is used when appropriate. """ - env = dict(SETUPTOOLS_USE_DISTUTILS='local') - loc = find_distutils(venv, imports='setuptools, distutils', env=env) + loc = find_distutils(venv, imports='setuptools, distutils', env=dict()) assert venv.name in loc.split(os.sep) @@ -66,5 +66,4 @@ def test_distutils_local(venv): Even without importing, the setuptools-local copy of distutils is preferred. """ - env = dict(SETUPTOOLS_USE_DISTUTILS='local') - assert venv.name in find_distutils(venv, env=env).split(os.sep) + assert venv.name in find_distutils(venv, env=dict()).split(os.sep) From 6f205904ca63a91946b862068278a51dddb36cf4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 13 Aug 2020 21:56:40 -0400 Subject: [PATCH 8108/8469] =?UTF-8?q?Bump=20version:=2049.5.0=20=E2=86=92?= =?UTF-8?q?=2049.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2129.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2129.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7ecebcd92e..4bbe60c466 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.5.0 +current_version = 49.6.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 534e15a8f2..2d49707b23 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.6.0 +------- + +* #2129: In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file. + + v49.5.0 ------- diff --git a/changelog.d/2129.change.rst b/changelog.d/2129.change.rst deleted file mode 100644 index b7d388621e..0000000000 --- a/changelog.d/2129.change.rst +++ /dev/null @@ -1 +0,0 @@ -In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file. diff --git a/setup.cfg b/setup.cfg index 7618ab116d..3c8f867167 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.5.0 +version = 49.6.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From be7a0a31a116f6df9bef616ef1adef72b9d0d48d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 14 Aug 2020 19:32:18 -0400 Subject: [PATCH 8109/8469] Bypass .pth loader when distutils is loaded from pip. Workaround for pypa/pip#8761. --- _distutils_hack/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 814ee97e40..2d358c371d 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -3,6 +3,7 @@ import re import importlib import warnings +import inspect is_pypy = '__pypy__' in sys.builtin_module_names @@ -66,7 +67,7 @@ def do_override(): class DistutilsMetaFinder: def find_spec(self, fullname, path, target=None): - if path is not None or fullname != "distutils": + if path is not None or fullname != "distutils" or self._bypass(): return None return self.get_distutils_spec() @@ -84,6 +85,16 @@ def exec_module(self, module): return importlib.util.spec_from_loader('distutils', DistutilsLoader()) + def _bypass(self): + """ + Suppress the import of distutils from setuptools when running under pip. + See pypa/pip#8761 for rationale. + """ + return any( + level.frame.f_globals['__name__'].startswith('pip.') + for level in inspect.stack(context=False) + ) + DISTUTILS_FINDER = DistutilsMetaFinder() From 77eeb77f48484a6e227275a9a8cc7d4c322596f7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Aug 2020 14:39:25 -0400 Subject: [PATCH 8110/8469] When pip is imported, unload any existing distutils and disable the DistutilsMetaFinder. --- _distutils_hack/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 2d358c371d..bdb365d5ae 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -3,7 +3,6 @@ import re import importlib import warnings -import inspect is_pypy = '__pypy__' in sys.builtin_module_names @@ -67,7 +66,9 @@ def do_override(): class DistutilsMetaFinder: def find_spec(self, fullname, path, target=None): - if path is not None or fullname != "distutils" or self._bypass(): + self._disable_for_pip(fullname, path) + + if path is not None or fullname != "distutils": return None return self.get_distutils_spec() @@ -85,15 +86,17 @@ def exec_module(self, module): return importlib.util.spec_from_loader('distutils', DistutilsLoader()) - def _bypass(self): + def _disable_for_pip(self, fullname, path): """ - Suppress the import of distutils from setuptools when running under pip. + Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. """ - return any( - level.frame.f_globals['__name__'].startswith('pip.') - for level in inspect.stack(context=False) - ) + if path is not None or fullname != "pip": + return + + # pip is being imported the first time. + clear_distutils() + self.get_distutils_spec = lambda: None DISTUTILS_FINDER = DistutilsMetaFinder() From 4eb5b32f8d8bb1e20907028a516346e2b1901391 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Aug 2020 14:42:03 -0400 Subject: [PATCH 8111/8469] Replace hard-coded tox working dir with the environment variable, honoring non-standard working directories. --- tools/tox_pip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 9fe4f905c7..9e1a1e4a7c 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -12,7 +12,7 @@ def remove_setuptools(): cmd = [sys.executable, '-m', 'pip', 'uninstall', '-y', 'setuptools'] # set cwd to something other than '.' to avoid detecting # '.' as the installed package. - subprocess.check_call(cmd, cwd='.tox') + subprocess.check_call(cmd, cwd=os.environ['TOX_WORK_DIR']) def bootstrap(): From 3d404fd3268b0fb7d84916779ca2e282f4586396 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 15 Aug 2020 14:59:37 -0400 Subject: [PATCH 8112/8469] Refactor to use lookups and consolidate behaviors. --- _distutils_hack/__init__.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index bdb365d5ae..074bd5e9c8 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -66,14 +66,14 @@ def do_override(): class DistutilsMetaFinder: def find_spec(self, fullname, path, target=None): - self._disable_for_pip(fullname, path) - - if path is not None or fullname != "distutils": - return None + if path is not None: + return - return self.get_distutils_spec() + method_name = 'spec_for_{fullname}'.format(**locals()) + method = getattr(self, method_name, lambda: None) + return method() - def get_distutils_spec(self): + def spec_for_distutils(self): import importlib.util class DistutilsLoader(importlib.util.abc.Loader): @@ -86,17 +86,13 @@ def exec_module(self, module): return importlib.util.spec_from_loader('distutils', DistutilsLoader()) - def _disable_for_pip(self, fullname, path): + def spec_for_pip(self): """ Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. """ - if path is not None or fullname != "pip": - return - - # pip is being imported the first time. clear_distutils() - self.get_distutils_spec = lambda: None + self.spec_for_distutils = lambda: None DISTUTILS_FINDER = DistutilsMetaFinder() From fb7ab81a3d080422687bad71f9ae9d36eeefbee2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Aug 2020 00:29:24 -0400 Subject: [PATCH 8113/8469] Remove Python 2 compatibility --- bootstrap.py | 2 - pkg_resources/__init__.py | 39 ++---------- pkg_resources/tests/test_pkg_resources.py | 38 +++-------- pkg_resources/tests/test_resources.py | 4 -- pkg_resources/tests/test_working_set.py | 2 - setup.cfg | 1 - setuptools/__init__.py | 20 ++---- setuptools/build_meta.py | 21 ++----- setuptools/command/alias.py | 2 - setuptools/command/bdist_egg.py | 20 ++---- setuptools/command/build_ext.py | 16 +---- setuptools/command/build_py.py | 8 +-- setuptools/command/develop.py | 6 +- setuptools/command/easy_install.py | 55 +++++----------- setuptools/command/egg_info.py | 12 ++-- setuptools/command/py36compat.py | 2 - setuptools/command/rotate.py | 4 +- setuptools/command/sdist.py | 46 +++----------- setuptools/command/setopt.py | 3 +- setuptools/command/test.py | 10 +-- setuptools/command/upload_docs.py | 16 ++--- setuptools/config.py | 12 +--- setuptools/depends.py | 13 ++-- setuptools/dist.py | 48 ++++---------- setuptools/extension.py | 2 - setuptools/installer.py | 8 +-- setuptools/lib2to3_ex.py | 3 - setuptools/monkey.py | 4 +- setuptools/msvc.py | 6 +- setuptools/namespaces.py | 4 -- setuptools/package_index.py | 33 +++++----- setuptools/py27compat.py | 60 ------------------ setuptools/py31compat.py | 32 ---------- setuptools/py33compat.py | 59 ----------------- setuptools/sandbox.py | 15 +---- setuptools/ssl_support.py | 5 +- setuptools/tests/__init__.py | 9 +-- setuptools/tests/contexts.py | 6 +- setuptools/tests/namespaces.py | 2 - setuptools/tests/server.py | 21 +++---- setuptools/tests/test_archive_util.py | 6 +- setuptools/tests/test_build_ext.py | 4 +- setuptools/tests/test_build_meta.py | 20 +----- setuptools/tests/test_config.py | 24 +------ setuptools/tests/test_develop.py | 7 +-- setuptools/tests/test_dist.py | 20 ++---- setuptools/tests/test_dist_info.py | 4 -- setuptools/tests/test_easy_install.py | 8 --- setuptools/tests/test_egg_info.py | 52 +-------------- setuptools/tests/test_extern.py | 2 - setuptools/tests/test_find_packages.py | 11 +--- setuptools/tests/test_integration.py | 2 +- setuptools/tests/test_manifest.py | 6 +- setuptools/tests/test_msvc14.py | 2 - setuptools/tests/test_namespaces.py | 2 - setuptools/tests/test_packageindex.py | 11 ++-- setuptools/tests/test_sdist.py | 77 ++++++++--------------- setuptools/tests/test_setopt.py | 10 +-- setuptools/tests/test_setuptools.py | 3 +- setuptools/tests/test_test.py | 5 -- setuptools/tests/test_virtualenv.py | 11 ---- setuptools/tests/test_wheel.py | 2 - setuptools/tests/test_windows_wrappers.py | 2 - setuptools/tests/text.py | 5 -- setuptools/tests/textwrap.py | 2 - setuptools/unicode_utils.py | 6 +- setuptools/wheel.py | 6 +- tools/tox_pip.py | 12 ---- 68 files changed, 185 insertions(+), 806 deletions(-) delete mode 100644 setuptools/py27compat.py delete mode 100644 setuptools/py31compat.py delete mode 100644 setuptools/py33compat.py diff --git a/bootstrap.py b/bootstrap.py index 8fa9e4b554..118671f62c 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,8 +5,6 @@ egg-info command to flesh out the egg-info directory. """ -from __future__ import unicode_literals - import os import sys import textwrap diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b585e8507a..737f4d5fad 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ Package resource API -------------------- @@ -15,8 +14,6 @@ method. """ -from __future__ import absolute_import - import sys import os import io @@ -54,9 +51,6 @@ except NameError: FileExistsError = OSError -from pkg_resources.extern import six -from pkg_resources.extern.six.moves import map, filter - # capture these to bypass sandboxing from os import utime try: @@ -83,18 +77,9 @@ __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') - -__metaclass__ = type - - -if (3, 0) < sys.version_info < (3, 5): +if sys.version_info < (3, 5): raise RuntimeError("Python 3.5 or later is required") -if six.PY2: - # Those builtin exceptions are only defined in Python 3 - PermissionError = None - NotADirectoryError = None - # declare some globals that will be defined later to # satisfy the linters. require = None @@ -474,7 +459,7 @@ def run_script(dist_spec, script_name): def get_distribution(dist): """Return a current distribution object for a Requirement or string""" - if isinstance(dist, six.string_types): + if isinstance(dist, str): dist = Requirement.parse(dist) if isinstance(dist, Requirement): dist = get_provider(dist) @@ -1418,8 +1403,6 @@ def get_metadata(self, name): return "" path = self._get_metadata_path(name) value = self._get(path) - if six.PY2: - return value try: return value.decode('utf-8') except UnicodeDecodeError as exc: @@ -1910,8 +1893,7 @@ def get_metadata(self, name): return metadata def _warn_on_replacement(self, metadata): - # Python 2.7 compat for: replacement_char = '�' - replacement_char = b'\xef\xbf\xbd'.decode('utf-8') + replacement_char = '�' if replacement_char in metadata: tmpl = "{self.path} could not be properly decoded in UTF-8" msg = tmpl.format(**locals()) @@ -2109,8 +2091,6 @@ class NoDists: """ def __bool__(self): return False - if six.PY2: - __nonzero__ = __bool__ def __call__(self, fullpath): return iter(()) @@ -2127,12 +2107,7 @@ def safe_listdir(path): except OSError as e: # Ignore the directory if does not exist, not a directory or # permission denied - ignorable = ( - e.errno in (errno.ENOTDIR, errno.EACCES, errno.ENOENT) - # Python 2 on Windows needs to be handled this way :( - or getattr(e, "winerror", None) == 267 - ) - if not ignorable: + if e.errno not in (errno.ENOTDIR, errno.EACCES, errno.ENOENT): raise return () @@ -2406,7 +2381,7 @@ def _set_parent_ns(packageName): def yield_lines(strs): """Yield non-empty/non-comment lines of a string or sequence""" - if isinstance(strs, six.string_types): + if isinstance(strs, str): for s in strs.splitlines(): s = s.strip() # skip blank lines/comments @@ -2844,10 +2819,6 @@ def __dir__(self): ) ) - 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( diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 189a8668be..6518820e6f 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import sys import tempfile import os @@ -20,16 +17,11 @@ from pkg_resources import ( DistInfoDistribution, Distribution, EggInfoDistribution, ) -from setuptools.extern import six -from pkg_resources.extern.six.moves import map -from pkg_resources.extern.six import text_type, string_types import pytest import pkg_resources -__metaclass__ = type - def timestamp(dt): """ @@ -42,7 +34,7 @@ def timestamp(dt): return time.mktime(dt.timetuple()) -class EggRemover(text_type): +class EggRemover(str): def __call__(self): if self in sys.path: sys.path.remove(self) @@ -143,7 +135,7 @@ def test_get_cache_path(self): path = mgr.get_cache_path('foo') type_ = str(type(path)) message = "Unexpected type from get_cache_path: " + type_ - assert isinstance(path, string_types), message + assert isinstance(path, str), message def test_get_cache_path_race(self, tmpdir): # Patch to os.path.isdir to create a race condition @@ -225,13 +217,6 @@ def test_get_metadata__bad_utf8(tmpdir): metadata = 'née'.encode('iso-8859-1') dist = make_test_distribution(metadata_path, metadata=metadata) - if six.PY2: - # In Python 2, get_metadata() doesn't do any decoding. - actual = dist.get_metadata(filename) - assert actual == metadata - return - - # Otherwise, we are in the Python 3 case. with pytest.raises(UnicodeDecodeError) as excinfo: dist.get_metadata(filename) @@ -247,25 +232,18 @@ def test_get_metadata__bad_utf8(tmpdir): assert actual.endswith(metadata_path), 'actual: {}'.format(actual) -# TODO: remove this in favor of Path.touch() when Python 2 is dropped. -def touch_file(path): - """ - Create an empty file. - """ - with open(path, 'w'): - pass - - def make_distribution_no_version(tmpdir, basename): """ Create a distribution directory with no file containing the version. """ - # Convert the LocalPath object to a string before joining. - dist_dir = os.path.join(str(tmpdir), basename) - os.mkdir(dist_dir) + dist_dir = tmpdir / basename + dist_dir.ensure_dir() # Make the directory non-empty so distributions_from_metadata() # will detect it and yield it. - touch_file(os.path.join(dist_dir, 'temp.txt')) + dist_dir.join('temp.txt').ensure() + + if sys.version_info < (3, 6): + dist_dir = str(dist_dir) dists = list(pkg_resources.distributions_from_metadata(dist_dir)) assert len(dists) == 1 diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index ed7cdfcc3f..b08bb293ef 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -1,13 +1,9 @@ -from __future__ import unicode_literals - import os import sys import string import platform import itertools -from pkg_resources.extern.six.moves import map - import pytest from pkg_resources.extern import packaging diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index 7a759bbb3f..db13c7149b 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -9,8 +9,6 @@ from .test_resources import Metadata -__metaclass__ = type - def strip_comments(s): return '\n'.join( diff --git a/setup.cfg b/setup.cfg index 3c8f867167..b058fa8671 100644 --- a/setup.cfg +++ b/setup.cfg @@ -70,7 +70,6 @@ tests = coverage>=4.5.1 pytest-cov>=2.5.1 paver; python_version>="3.6" - futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. jaraco.envs diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 99094230d3..4d9b835729 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -13,27 +13,19 @@ from ._deprecation_warning import SetuptoolsDeprecationWarning -from setuptools.extern.six import PY3, string_types -from setuptools.extern.six.moves import filter, map - import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribution from setuptools.depends import Require from . import monkey -__metaclass__ = type - __all__ = [ 'setup', 'Distribution', 'Command', 'Extension', 'Require', 'SetuptoolsDeprecationWarning', - 'find_packages' + 'find_packages', 'find_namespace_packages', ] -if PY3: - __all__.append('find_namespace_packages') - __version__ = setuptools.version.__version__ bootstrap_install_from = None @@ -122,9 +114,7 @@ def _looks_like_package(path): find_packages = PackageFinder.find - -if PY3: - find_namespace_packages = PEP420PackageFinder.find +find_namespace_packages = PEP420PackageFinder.find def _install_setup_requires(attrs): @@ -187,7 +177,7 @@ def _ensure_stringlike(self, option, what, default=None): if val is None: setattr(self, option, default) return default - elif not isinstance(val, string_types): + elif not isinstance(val, str): raise DistutilsOptionError("'%s' must be a %s (got `%s`)" % (option, what, val)) return val @@ -201,11 +191,11 @@ def ensure_string_list(self, option): val = getattr(self, option) if val is None: return - elif isinstance(val, string_types): + elif isinstance(val, str): setattr(self, option, re.split(r',\s*|\s+', val)) else: if isinstance(val, list): - ok = all(isinstance(v, string_types) for v in val) + ok = all(isinstance(v, str) for v in val) else: ok = False if not ok: diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 371321879a..b9e8a2b3fa 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -32,10 +32,10 @@ import tokenize import shutil import contextlib +import tempfile import setuptools import distutils -from setuptools.py31compat import TemporaryDirectory from pkg_resources import parse_requirements @@ -91,19 +91,6 @@ def no_install_setup_requires(): setuptools._install_setup_requires = 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 _get_immediate_subdirectories(a_dir): return [name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))] @@ -168,8 +155,8 @@ def get_requires_for_build_sdist(self, config_settings=None): def prepare_metadata_for_build_wheel(self, metadata_directory, config_settings=None): - sys.argv = sys.argv[:1] + ['dist_info', '--egg-base', - _to_str(metadata_directory)] + sys.argv = sys.argv[:1] + [ + 'dist_info', '--egg-base', metadata_directory] with no_install_setup_requires(): self.run_setup() @@ -207,7 +194,7 @@ def _build_with_temp_dir(self, setup_command, result_extension, # Build in a temporary directory, then copy to the target. os.makedirs(result_directory, exist_ok=True) - with TemporaryDirectory(dir=result_directory) as tmp_dist_dir: + with tempfile.TemporaryDirectory(dir=result_directory) as tmp_dist_dir: sys.argv = (sys.argv[:1] + setup_command + ['--dist-dir', tmp_dist_dir] + config_settings["--global-option"]) diff --git a/setuptools/command/alias.py b/setuptools/command/alias.py index 4532b1cc0d..452a9244ea 100644 --- a/setuptools/command/alias.py +++ b/setuptools/command/alias.py @@ -1,7 +1,5 @@ from distutils.errors import DistutilsOptionError -from setuptools.extern.six.moves import map - from setuptools.command.setopt import edit_config, option_base, config_file diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 4be1545789..a88efb45b8 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -13,24 +13,16 @@ import marshal import warnings -from setuptools.extern import six - from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint from setuptools.extension import Library from setuptools import Command, SetuptoolsDeprecationWarning -try: - # Python 2.7 or >=3.2 - from sysconfig import get_path, get_python_version +from sysconfig import get_path, get_python_version - def _get_purelib(): - return get_path("purelib") -except ImportError: - from distutils.sysconfig import get_python_lib, get_python_version - def _get_purelib(): - return get_python_lib(False) +def _get_purelib(): + return get_path("purelib") def strip_module(filename): @@ -420,9 +412,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 six.PY2: - skip = 8 # skip magic & date - elif sys.version_info < (3, 7): + if sys.version_info < (3, 7): skip = 12 # skip magic & date & file size else: skip = 16 # skip magic & reserved? & date & file size @@ -453,7 +443,7 @@ def iter_symbols(code): for name in code.co_names: yield name for const in code.co_consts: - if isinstance(const, six.string_types): + if isinstance(const, str): yield const elif isinstance(const, CodeType): for name in iter_symbols(const): diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 89a0e328f9..03a72b4fce 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -1,6 +1,7 @@ import os import sys import itertools +from importlib.machinery import EXTENSION_SUFFIXES from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler @@ -9,15 +10,6 @@ from distutils import log from setuptools.extension import Library -from setuptools.extern import six - -if six.PY2: - import imp - - EXTENSION_SUFFIXES = [ - s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION] -else: - from importlib.machinery import EXTENSION_SUFFIXES try: # Attempt to use Cython for building extensions, if available @@ -115,11 +107,7 @@ def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self, fullname) if fullname in self.ext_map: ext = self.ext_map[fullname] - use_abi3 = ( - not six.PY2 - and getattr(ext, 'py_limited_api') - and get_abi3_suffix() - ) + use_abi3 = getattr(ext, 'py_limited_api') and get_abi3_suffix() if use_abi3: so_ext = get_config_var('EXT_SUFFIX') filename = filename[:-len(so_ext)] diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 9d0288a50d..4709679b9f 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -9,9 +9,6 @@ import itertools import stat -from setuptools.extern import six -from setuptools.extern.six.moves import map, filter, filterfalse - try: from setuptools.lib2to3_ex import Mixin2to3 except ImportError: @@ -73,9 +70,6 @@ def __getattr__(self, attr): return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): - if six.PY2 and isinstance(package, six.string_types): - # avoid errors on Python 2 when unicode is passed (#190) - package = package.split('.') outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: @@ -249,7 +243,7 @@ def _unique_everseen(iterable, key=None): seen = set() seen_add = seen.add if key is None: - for element in filterfalse(seen.__contains__, iterable): + for element in itertools.filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index e7e03cd449..faf8c988e2 100644 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -5,15 +5,11 @@ import glob import io -from setuptools.extern import six - import pkg_resources 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""" @@ -108,7 +104,7 @@ def _resolve_setup_path(egg_base, install_dir, egg_path): return path_to_setup def install_for_development(self): - if not six.PY2 and getattr(self.distribution, 'use_2to3', False): + if getattr(self.distribution, 'use_2to3', False): # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index bcbd4f58f5..9ec83b7d8b 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -38,18 +38,15 @@ import subprocess import shlex import io +import configparser from sysconfig import get_config_vars, get_path from setuptools import SetuptoolsDeprecationWarning -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.py27compat import rmtree_safe from setuptools.command import setopt from setuptools.archive_util import unpack_archive from setuptools.package_index import ( @@ -65,8 +62,6 @@ ) import pkg_resources -__metaclass__ = type - # Turn on PEP440Warnings warnings.filterwarnings("default", category=pkg_resources.PEP440Warning) @@ -96,28 +91,16 @@ def samefile(p1, p2): return norm_p1 == norm_p2 -if six.PY2: - - def _to_bytes(s): - return s - - def isascii(s): - try: - six.text_type(s, 'ascii') - return True - except UnicodeError: - return False -else: +def _to_bytes(s): + return s.encode('utf8') - def _to_bytes(s): - return s.encode('utf8') - def isascii(s): - try: - s.encode('ascii') - return True - except UnicodeError: - return False +def isascii(s): + try: + s.encode('ascii') + return True + except UnicodeError: + return False def _one_liner(text): @@ -341,7 +324,7 @@ def finalize_options(self): self.local_index = Environment(self.shadow_path + sys.path) if self.find_links is not None: - if isinstance(self.find_links, six.string_types): + if isinstance(self.find_links, str): self.find_links = self.find_links.split() else: self.find_links = [] @@ -650,7 +633,7 @@ def _tmpdir(self): # cast to str as workaround for #709 and #710 and #712 yield str(tmpdir) finally: - os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir)) + os.path.exists(tmpdir) and rmtree(tmpdir) def easy_install(self, spec, deps=False): with self._tmpdir() as tmpdir: @@ -1318,7 +1301,7 @@ def create_home_path(self): if not self.user: return home = convert_path(os.path.expanduser("~")) - for name, path in six.iteritems(self.config_vars): + for name, path in self.config_vars.items(): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0o700)" % path) os.makedirs(path, 0o700) @@ -1499,7 +1482,7 @@ def extract_wininst_cfg(dist_filename): # Now the config is in bytes, but for RawConfigParser, it should # be text, so decode it. config = config.decode(sys.getfilesystemencoding()) - cfg.readfp(six.StringIO(config)) + cfg.readfp(io.StringIO(config)) except configparser.Error: return None if not cfg.has_section('metadata') or not cfg.has_section('Setup'): @@ -1534,9 +1517,7 @@ def get_exe_prefixes(exe_filename): if name.endswith('-nspkg.pth'): continue if parts[0].upper() in ('PURELIB', 'PLATLIB'): - contents = z.read(name) - if not six.PY2: - contents = contents.decode() + contents = z.read(name).decode() for pth in yield_lines(contents): pth = pth.strip().replace('\\', '/') if not pth.startswith('import'): @@ -1700,7 +1681,8 @@ def auto_chmod(func, arg, exc): chmod(arg, stat.S_IWRITE) return func(arg) et, ev, _ = sys.exc_info() - six.reraise(et, (ev[0], ev[1] + (" %s %s" % (func, arg)))) + # TODO: This code doesn't make sense. What is it trying to do? + raise (ev[0], ev[1] + (" %s %s" % (func, arg))) def update_dist_caches(dist_path, fix_zipimporter_caches): @@ -2263,10 +2245,7 @@ def get_win_launcher(type): def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') - if six.PY2: - return manifest % vars() - else: - return manifest.decode('utf-8') % vars() + return manifest.decode('utf-8') % vars() def rmtree(path, ignore_errors=False, onerror=auto_chmod): diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 0855207ceb..c957154a1f 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -16,9 +16,6 @@ import time import collections -from setuptools.extern import six -from setuptools.extern.six.moves import map - from setuptools import Command from setuptools.command.sdist import sdist from setuptools.command.sdist import walk_revctrl @@ -267,8 +264,7 @@ def write_file(self, what, filename, data): to the file. """ log.info("writing %s to %s", what, filename) - if not six.PY2: - data = data.encode("utf-8") + data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') f.write(data) @@ -647,7 +643,7 @@ def append_cr(line): def write_requirements(cmd, basename, filename): dist = cmd.distribution - data = six.StringIO() + data = io.StringIO() _write_requirements(data, dist.install_requires) extras_require = dist.extras_require or {} for extra in sorted(extras_require): @@ -687,12 +683,12 @@ def write_arg(cmd, basename, filename, force=False): def write_entries(cmd, basename, filename): ep = cmd.distribution.entry_points - if isinstance(ep, six.string_types) or ep is None: + if isinstance(ep, str) or ep is None: data = ep elif ep is not None: data = [] for section, contents in sorted(ep.items()): - if not isinstance(contents, six.string_types): + if not isinstance(contents, str): contents = EntryPoint.parse_group(section, contents) contents = '\n'.join(sorted(map(str, contents.values()))) data.append('[%s]\n%s\n\n' % (section, contents)) diff --git a/setuptools/command/py36compat.py b/setuptools/command/py36compat.py index 2886055862..343547a4d3 100644 --- a/setuptools/command/py36compat.py +++ b/setuptools/command/py36compat.py @@ -3,8 +3,6 @@ from distutils.util import convert_path from distutils.command import sdist -from setuptools.extern.six.moves import filter - class sdist_add_defaults: """ diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py index e398834fa7..74795ba922 100644 --- a/setuptools/command/rotate.py +++ b/setuptools/command/rotate.py @@ -4,8 +4,6 @@ import os import shutil -from setuptools.extern import six - from setuptools import Command @@ -38,7 +36,7 @@ def finalize_options(self): self.keep = int(self.keep) except ValueError as e: raise DistutilsOptionError("--keep must be an integer") from e - if isinstance(self.match, six.string_types): + if isinstance(self.match, str): self.match = [ convert_path(p.strip()) for p in self.match.split(',') ] diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 8c3438eaa6..887b7efa05 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -5,7 +5,7 @@ import io import contextlib -from setuptools.extern import six, ordered_set +from setuptools.extern import ordered_set from .py36compat import sdist_add_defaults @@ -98,34 +98,8 @@ class NoValue: if orig_val is not NoValue: setattr(os, 'link', orig_val) - def __read_template_hack(self): - # This grody hack closes the template file (MANIFEST.in) if an - # exception occurs during read_template. - # Doing so prevents an error when easy_install attempts to delete the - # file. - try: - orig.sdist.read_template(self) - except Exception: - _, _, tb = sys.exc_info() - tb.tb_next.tb_frame.f_locals['template'].close() - raise - - # Beginning with Python 2.7.2, 3.1.4, and 3.2.1, this leaky file handle - # has been fixed, so only override the method if we're using an earlier - # Python. - has_leaky_handle = ( - sys.version_info < (2, 7, 2) - or (3, 0) <= sys.version_info < (3, 1, 4) - or (3, 2) <= sys.version_info < (3, 2, 1) - ) - if has_leaky_handle: - read_template = __read_template_hack - def _add_defaults_optional(self): - if six.PY2: - sdist_add_defaults._add_defaults_optional(self) - else: - super()._add_defaults_optional() + super()._add_defaults_optional() if os.path.isfile('pyproject.toml'): self.filelist.append('pyproject.toml') @@ -158,10 +132,7 @@ def _add_data_files(self, data_files): def _add_defaults_data_files(self): try: - if six.PY2: - sdist_add_defaults._add_defaults_data_files(self) - else: - super()._add_defaults_data_files() + super()._add_defaults_data_files() except TypeError: log.warn("data_files contains unexpected objects") @@ -207,12 +178,11 @@ def read_manifest(self): manifest = open(self.manifest, 'rb') for line in manifest: # The manifest must contain UTF-8. See #303. - if not six.PY2: - try: - line = line.decode('UTF-8') - except UnicodeDecodeError: - log.warn("%r not UTF-8 decodable -- skipping" % line) - continue + try: + line = line.decode('UTF-8') + except UnicodeDecodeError: + log.warn("%r not UTF-8 decodable -- skipping" % line) + continue # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 7e57cc0262..e18057c81e 100644 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -3,8 +3,7 @@ from distutils.errors import DistutilsOptionError import distutils import os - -from setuptools.extern.six.moves import configparser +import configparser from setuptools import Command diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 2d83967dd9..cf71ad015d 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -8,17 +8,12 @@ from distutils import log from unittest import TestLoader -from setuptools.extern import six -from setuptools.extern.six.moves import map, filter - from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, evaluate_marker, add_activation_listener, require, EntryPoint) from setuptools import Command from .build_py import _unique_everseen -__metaclass__ = type - class ScanningLoader(TestLoader): @@ -129,8 +124,7 @@ def with_project_on_sys_path(self, func): @contextlib.contextmanager def project_on_sys_path(self, include_dists=[]): - with_2to3 = not six.PY2 and getattr( - self.distribution, 'use_2to3', False) + with_2to3 = getattr(self.distribution, 'use_2to3', False) if with_2to3: # If we run 2to3 we can not do this inplace: @@ -241,7 +235,7 @@ def run_tests(self): # Purge modules under test from sys.modules. The test loader will # re-import them from the build location. Required when 2to3 is used # with namespace packages. - if not six.PY2 and getattr(self.distribution, 'use_2to3', False): + if getattr(self.distribution, 'use_2to3', False): module = self.test_suite.split('.')[0] if module in _namespace_packages: del_modules = [] diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 0351da7773..2559458a1d 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -15,17 +15,15 @@ import shutil import itertools import functools - -from setuptools.extern import six -from setuptools.extern.six.moves import http_client, urllib +import http.client +import urllib.parse from pkg_resources import iter_entry_points from .upload import upload def _encode(s): - errors = 'strict' if six.PY2 else 'surrogateescape' - return s.encode('utf-8', errors) + return s.encode('utf-8', 'surrogateescape') class upload_docs(upload): @@ -152,9 +150,7 @@ def upload_file(self, filename): } # set up the authentication credentials = _encode(self.username + ':' + self.password) - credentials = standard_b64encode(credentials) - if not six.PY2: - credentials = credentials.decode('ascii') + credentials = standard_b64encode(credentials).decode('ascii') auth = "Basic " + credentials body, ct = self._build_multipart(data) @@ -169,9 +165,9 @@ def upload_file(self, filename): urllib.parse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': - conn = http_client.HTTPConnection(netloc) + conn = http.client.HTTPConnection(netloc) elif schema == 'https': - conn = http_client.HTTPSConnection(netloc) + conn = http.client.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema " + schema) diff --git a/setuptools/config.py b/setuptools/config.py index a8f8b6b006..af3a3bcbd5 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, unicode_literals import ast import io import os @@ -15,10 +14,6 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.extern.packaging.version import LegacyVersion, parse from setuptools.extern.packaging.specifiers import SpecifierSet -from setuptools.extern.six import string_types, PY3 - - -__metaclass__ = type class StaticModule: @@ -324,7 +319,7 @@ def _parse_file(cls, value): """ include_directive = 'file:' - if not isinstance(value, string_types): + if not isinstance(value, str): return value if not value.startswith(include_directive): @@ -559,7 +554,7 @@ def _parse_version(self, value): if callable(version): version = version() - if not isinstance(version, string_types): + if not isinstance(version, str): if hasattr(version, '__iter__'): version = '.'.join(map(str, version)) else: @@ -614,9 +609,6 @@ def _parse_packages(self, value): 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( diff --git a/setuptools/depends.py b/setuptools/depends.py index a37675cbd9..8be6928a31 100644 --- a/setuptools/depends.py +++ b/setuptools/depends.py @@ -1,12 +1,11 @@ import sys import marshal import contextlib +import dis from distutils.version import StrictVersion -from .py33compat import Bytecode - -from .py27compat import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE -from . import py27compat +from ._imp import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE +from . import _imp __all__ = [ @@ -111,12 +110,12 @@ def get_module_constant(module, symbol, default=-1, paths=None): f.read(8) # skip magic & date code = marshal.load(f) elif kind == PY_FROZEN: - code = py27compat.get_frozen_object(module, paths) + code = _imp.get_frozen_object(module, paths) elif kind == PY_SOURCE: code = compile(f.read(), path, 'exec') else: # Not something we can parse; we'll have to import it. :( - imported = py27compat.get_module(module, paths, info) + imported = _imp.get_module(module, paths, info) return getattr(imported, symbol, None) return extract_constant(code, symbol, default) @@ -146,7 +145,7 @@ def extract_constant(code, symbol, default=-1): const = default - for byte_code in Bytecode(code): + for byte_code in dis.Bytecode(code): op = byte_code.opcode arg = byte_code.arg diff --git a/setuptools/dist.py b/setuptools/dist.py index e813b11ca7..2c088ef8cb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -23,10 +23,8 @@ from distutils.util import rfc822_escape from distutils.version import StrictVersion -from setuptools.extern import six from setuptools.extern import packaging from setuptools.extern import ordered_set -from setuptools.extern.six.moves import map, filter, filterfalse from . import SetuptoolsDeprecationWarning @@ -126,12 +124,8 @@ def write_pkg_file(self, file): """ version = self.get_metadata_version() - if six.PY2: - def write_field(key, value): - file.write("%s: %s\n" % (key, self._encode_field(value))) - else: - def write_field(key, value): - file.write("%s: %s\n" % (key, value)) + def write_field(key, value): + file.write("%s: %s\n" % (key, value)) write_field('Metadata-Version', str(version)) write_field('Name', self.get_name()) @@ -308,7 +302,7 @@ def check_entry_points(dist, attr, value): def check_test_suite(dist, attr, value): - if not isinstance(value, six.string_types): + if not isinstance(value, str): raise DistutilsSetupError("test_suite must be a string") @@ -319,7 +313,7 @@ def check_package_data(dist, attr, value): "{!r} must be a dictionary mapping package names to lists of " "string wildcard patterns".format(attr)) for k, v in value.items(): - if not isinstance(k, six.string_types): + if not isinstance(k, str): raise DistutilsSetupError( "keys of {!r} dict must be strings (got {!r})" .format(attr, k) @@ -537,7 +531,7 @@ def is_simple_req(req): spec_inst_reqs = getattr(self, 'install_requires', None) or () inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs)) simple_reqs = filter(is_simple_req, inst_reqs) - complex_reqs = filterfalse(is_simple_req, inst_reqs) + complex_reqs = itertools.filterfalse(is_simple_req, inst_reqs) self.install_requires = list(map(str, simple_reqs)) for r in complex_reqs: @@ -560,10 +554,10 @@ def _parse_config_files(self, filenames=None): this method provides the same functionality in subtly-improved ways. """ - from setuptools.extern.six.moves.configparser import ConfigParser + from configparser import ConfigParser # Ignore install directory options if we have a venv - if not six.PY2 and sys.prefix != sys.base_prefix: + if sys.prefix != sys.base_prefix: ignore_options = [ 'install-base', 'install-platbase', 'install-lib', 'install-platlib', 'install-purelib', 'install-headers', @@ -585,14 +579,14 @@ def _parse_config_files(self, filenames=None): with io.open(filename, encoding='utf-8') as reader: if DEBUG: self.announce(" reading {filename}".format(**locals())) - (parser.readfp if six.PY2 else parser.read_file)(reader) + parser.read_file(reader) for section in parser.sections(): options = parser.options(section) opt_dict = self.get_option_dict(section) for opt in options: if opt != '__name__' and opt not in ignore_options: - val = self._try_str(parser.get(section, opt)) + val = parser.get(section, opt) opt = opt.replace('-', '_') opt_dict[opt] = (filename, val) @@ -616,26 +610,6 @@ def _parse_config_files(self, filenames=None): except ValueError as e: raise DistutilsOptionError(e) from e - @staticmethod - def _try_str(val): - """ - On Python 2, much of distutils relies on string values being of - type 'str' (bytes) and not unicode text. If the value can be safely - encoded to bytes using the default encoding, prefer that. - - Why the default encoding? Because that value can be implicitly - decoded back to text if needed. - - Ref #1653 - """ - if not six.PY2: - return val - try: - return val.encode() - except UnicodeEncodeError: - pass - return val - def _set_command_options(self, command_obj, option_dict=None): """ Set the options for 'command_obj' from 'option_dict'. Basically @@ -669,7 +643,7 @@ def _set_command_options(self, command_obj, option_dict=None): neg_opt = {} try: - is_string = isinstance(value, six.string_types) + is_string = isinstance(value, str) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: @@ -1003,7 +977,7 @@ def handle_display_options(self, option_order): """ import sys - if six.PY2 or self.help_commands: + if self.help_commands: return _Distribution.handle_display_options(self, option_order) # Stdout may be StringIO (e.g. in tests) diff --git a/setuptools/extension.py b/setuptools/extension.py index 29468894f8..1820722a49 100644 --- a/setuptools/extension.py +++ b/setuptools/extension.py @@ -4,8 +4,6 @@ import distutils.errors import distutils.extension -from setuptools.extern.six.moves import map - from .monkey import get_unpatched diff --git a/setuptools/installer.py b/setuptools/installer.py index e5acec2726..e630b87479 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -2,20 +2,18 @@ import os import subprocess import sys +import tempfile from distutils import log from distutils.errors import DistutilsError import pkg_resources from setuptools.command.easy_install import easy_install -from setuptools.extern import six from setuptools.wheel import Wheel -from .py31compat import TemporaryDirectory - def _fixup_find_links(find_links): """Ensure find-links option end-up being a list of strings.""" - if isinstance(find_links, six.string_types): + if isinstance(find_links, str): return find_links.split() assert isinstance(find_links, (tuple, list)) return find_links @@ -103,7 +101,7 @@ def fetch_build_egg(dist, req): for egg_dist in pkg_resources.find_distributions(eggs_dir): if egg_dist in req and environment.can_add(egg_dist): return egg_dist - with TemporaryDirectory() as tmpdir: + with tempfile.TemporaryDirectory() as tmpdir: cmd = [ sys.executable, '-m', 'pip', '--disable-pip-version-check', diff --git a/setuptools/lib2to3_ex.py b/setuptools/lib2to3_ex.py index 017f7285b7..c176abf633 100644 --- a/setuptools/lib2to3_ex.py +++ b/setuptools/lib2to3_ex.py @@ -2,9 +2,6 @@ Customized Mixin2to3 support: - adds support for converting doctests - - -This module raises an ImportError on Python 2. """ import warnings diff --git a/setuptools/monkey.py b/setuptools/monkey.py index e5f1377b54..fb36dc1a97 100644 --- a/setuptools/monkey.py +++ b/setuptools/monkey.py @@ -10,8 +10,6 @@ from importlib import import_module import inspect -from setuptools.extern import six - import setuptools __all__ = [] @@ -37,7 +35,7 @@ def _get_mro(cls): def get_unpatched(item): lookup = ( - get_unpatched_class if isinstance(item, six.class_types) else + get_unpatched_class if isinstance(item, type) else get_unpatched_function if isinstance(item, types.FunctionType) else lambda item: None ) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 72383eb849..24ea0863a6 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -30,12 +30,10 @@ import distutils.errors from setuptools.extern.packaging.version import LegacyVersion -from setuptools.extern.six.moves import filterfalse - from .monkey import get_unpatched if platform.system() == 'Windows': - from setuptools.extern.six.moves import winreg + import winreg from os import environ else: # Mock winreg and environ so the module can be imported on this platform. @@ -1820,7 +1818,7 @@ def _unique_everseen(iterable, key=None): seen = set() seen_add = seen.add if key is None: - for element in filterfalse(seen.__contains__, iterable): + for element in itertools.filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py index 5f403c96d7..44939e1c6d 100644 --- a/setuptools/namespaces.py +++ b/setuptools/namespaces.py @@ -2,8 +2,6 @@ from distutils import log import itertools -from setuptools.extern.six.moves import map - flatten = itertools.chain.from_iterable @@ -72,8 +70,6 @@ def _get_root(self): return "sys._getframe(1).f_locals['sitedir']" def _gen_nspkg_line(self, pkg): - # ensure pkg is not a unicode string under Python 2.7 - pkg = str(pkg) pth = tuple(pkg.split('.')) root = self._get_root() tmpl_lines = self._nspkg_tmpl diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1702c7c693..3979b131b5 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -2,17 +2,21 @@ import sys import os import re +import io import shutil import socket import base64 import hashlib import itertools import warnings +import configparser +import html +import http.client +import urllib.parse +import urllib.request +import urllib.error from functools import wraps -from setuptools.extern import six -from setuptools.extern.six.moves import urllib, http_client, configparser, map - import setuptools from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, @@ -23,12 +27,8 @@ from distutils import log from distutils.errors import DistutilsError from fnmatch import translate -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(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I) PYPI_MD5 = re.compile( @@ -191,7 +191,7 @@ def unique_everseen(iterable, key=None): seen = set() seen_add = seen.add if key is None: - for element in six.moves.filterfalse(seen.__contains__, iterable): + for element in itertools.filterfalse(seen.__contains__, iterable): seen_add(element) yield element else: @@ -740,7 +740,7 @@ def _download_to(self, url, filename): size = -1 if "content-length" in headers: # Some servers return multiple Content-Length headers :( - sizes = get_all_headers(headers, 'Content-Length') + sizes = headers.get_all('Content-Length') size = max(map(int, sizes)) self.reporthook(url, filename, blocknum, bs, size) with open(filename, 'wb') as tfp: @@ -767,7 +767,7 @@ def open_url(self, url, warning=None): return local_open(url) try: return open_with_auth(url, self.opener) - except (ValueError, http_client.InvalidURL) as v: + except (ValueError, http.client.InvalidURL) as v: msg = ' '.join([str(arg) for arg in v.args]) if warning: self.warn(warning, msg) @@ -781,7 +781,7 @@ def open_url(self, url, warning=None): else: raise DistutilsError("Download error for %s: %s" % (url, v.reason)) from v - except http_client.BadStatusLine as v: + except http.client.BadStatusLine as v: if warning: self.warn(warning, v.line) else: @@ -790,7 +790,7 @@ def open_url(self, url, warning=None): 'down, %s' % (url, v.line) ) from v - except (http_client.HTTPException, socket.error) as v: + except (http.client.HTTPException, socket.error) as v: if warning: self.warn(warning, v) else: @@ -940,7 +940,7 @@ def warn(self, msg, *args): def decode_entity(match): what = match.group(0) - return unescape(what) + return html.unescape(what) def htmldecode(text): @@ -972,8 +972,7 @@ def _socket_timeout(*args, **kwargs): def _encode_auth(auth): """ - A function compatible with Python 2.3-3.3 that will encode - auth from a URL suitable for an HTTP header. + Encode auth from a URL suitable for an HTTP header. >>> str(_encode_auth('username%3Apassword')) 'dXNlcm5hbWU6cGFzc3dvcmQ=' @@ -1056,7 +1055,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): # Double scheme does not raise on macOS as revealed by a # failing test. We would expect "nonnumeric port". Refs #20. if netloc.endswith(':'): - raise http_client.InvalidURL("nonnumeric port: ''") + raise http.client.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): auth, address = _splituser(netloc) @@ -1136,5 +1135,5 @@ def local_open(url): status, message, body = 404, "Path not found", "Not found" headers = {'content-type': 'text/html'} - body_stream = six.StringIO(body) + body_stream = io.StringIO(body) return urllib.error.HTTPError(url, status, message, headers, body_stream) diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py deleted file mode 100644 index ba39af52b6..0000000000 --- a/setuptools/py27compat.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -Compatibility Support for Python 2.7 and earlier -""" - -import sys -import platform - -from setuptools.extern import six - - -def get_all_headers(message, key): - """ - Given an HTTPMessage, return all headers matching a given key. - """ - return message.get_all(key) - - -if six.PY2: - def get_all_headers(message, key): # noqa - return message.getheaders(key) - - -linux_py2_ascii = ( - platform.system() == 'Linux' and - six.PY2 -) - -rmtree_safe = str if linux_py2_ascii else lambda x: x -"""Workaround for http://bugs.python.org/issue24672""" - - -try: - from ._imp import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE - from ._imp import get_frozen_object, get_module -except ImportError: - import imp - from imp import PY_COMPILED, PY_FROZEN, PY_SOURCE # noqa - - def find_module(module, paths=None): - """Just like 'imp.find_module()', but with package support""" - parts = module.split('.') - while parts: - part = parts.pop(0) - f, path, (suffix, mode, kind) = info = imp.find_module(part, paths) - - if kind == imp.PKG_DIRECTORY: - parts = parts or ['__init__'] - paths = [path] - - elif parts: - raise ImportError("Can't find %r in %s" % (parts, module)) - - return info - - def get_frozen_object(module, paths): - return imp.get_frozen_object(module) - - def get_module(module, paths, info): - imp.load_module(module, *info) - return sys.modules[module] diff --git a/setuptools/py31compat.py b/setuptools/py31compat.py deleted file mode 100644 index e1da7ee2a2..0000000000 --- a/setuptools/py31compat.py +++ /dev/null @@ -1,32 +0,0 @@ -__all__ = [] - -__metaclass__ = type - - -try: - # Python >=3.2 - from tempfile import TemporaryDirectory -except ImportError: - import shutil - import tempfile - - class TemporaryDirectory: - """ - Very simple temporary directory context manager. - Will try to delete afterward, but will also ignore OS and similar - errors on deletion. - """ - - def __init__(self, **kwargs): - self.name = None # Handle mkdtemp raising an exception - self.name = tempfile.mkdtemp(**kwargs) - - def __enter__(self): - return self.name - - def __exit__(self, exctype, excvalue, exctrace): - try: - shutil.rmtree(self.name, True) - except OSError: # removal errors are not the only possible - pass - self.name = None diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py deleted file mode 100644 index cb69443638..0000000000 --- a/setuptools/py33compat.py +++ /dev/null @@ -1,59 +0,0 @@ -import dis -import array -import collections - -try: - import html -except ImportError: - html = None - -from setuptools.extern import six -from setuptools.extern.six.moves import html_parser - -__metaclass__ = type - -OpArg = collections.namedtuple('OpArg', 'opcode arg') - - -class Bytecode_compat: - def __init__(self, code): - self.code = code - - def __iter__(self): - """Yield '(op,arg)' pair for each operation in code object 'code'""" - - bytes = array.array('b', self.code.co_code) - eof = len(self.code.co_code) - - ptr = 0 - extended_arg = 0 - - while ptr < eof: - - op = bytes[ptr] - - if op >= dis.HAVE_ARGUMENT: - - arg = bytes[ptr + 1] + bytes[ptr + 2] * 256 + extended_arg - ptr += 3 - - if op == dis.EXTENDED_ARG: - long_type = six.integer_types[-1] - extended_arg = arg * long_type(65536) - continue - - else: - arg = None - ptr += 1 - - yield OpArg(op, arg) - - -Bytecode = getattr(dis, 'Bytecode', Bytecode_compat) - - -unescape = getattr(html, 'unescape', None) -if unescape is None: - # HTMLParser.unescape is deprecated since Python 3.4, and will be removed - # from 3.9. - unescape = html_parser.HTMLParser().unescape diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 24a360808a..91b960d899 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,9 +8,7 @@ import contextlib import pickle import textwrap - -from setuptools.extern import six -from setuptools.extern.six.moves import builtins, map +import builtins import pkg_resources from distutils.errors import DistutilsError @@ -138,7 +136,7 @@ def resume(self): return type, exc = map(pickle.loads, self._saved) - six.reraise(type, exc, self._tb) + raise exc.with_traceback(self._tb) @contextlib.contextmanager @@ -251,15 +249,8 @@ def run_setup(setup_script, args): working_set.__init__() working_set.callbacks.append(lambda dist: dist.activate()) - # __file__ should be a byte string on Python 2 (#712) - dunder_file = ( - setup_script - if isinstance(setup_script, str) else - setup_script.encode(sys.getfilesystemencoding()) - ) - with DirectorySandbox(setup_dir): - ns = dict(__file__=dunder_file, __name__='__main__') + ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) except SystemExit as v: if v.args and v.args[0]: diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index 17c14c4694..eac5e65608 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -3,8 +3,9 @@ import atexit import re import functools +import urllib.request +import http.client -from setuptools.extern.six.moves import urllib, http_client, map, filter from pkg_resources import ResolutionError, ExtractionError @@ -31,7 +32,7 @@ try: HTTPSHandler = urllib.request.HTTPSHandler - HTTPSConnection = http_client.HTTPSConnection + HTTPSConnection = http.client.HTTPSConnection except AttributeError: HTTPSHandler = HTTPSConnection = object diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 6377d7857d..a7a2112f73 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -2,19 +2,12 @@ import pytest -from setuptools.extern.six import PY2, PY3 - -__all__ = [ - 'fail_on_ascii', 'py2_only', 'py3_only', 'ack_2to3' -] +__all__ = ['fail_on_ascii', 'ack_2to3'] is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968' fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") -py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only") -py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only") - ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated') diff --git a/setuptools/tests/contexts.py b/setuptools/tests/contexts.py index 535ae10766..51ce8984e0 100644 --- a/setuptools/tests/contexts.py +++ b/setuptools/tests/contexts.py @@ -4,8 +4,8 @@ import sys import contextlib import site +import io -from setuptools.extern import six import pkg_resources @@ -58,8 +58,8 @@ def quiet(): old_stdout = sys.stdout old_stderr = sys.stderr - new_stdout = sys.stdout = six.StringIO() - new_stderr = sys.stderr = six.StringIO() + new_stdout = sys.stdout = io.StringIO() + new_stderr = sys.stderr = io.StringIO() try: yield new_stdout, new_stderr finally: diff --git a/setuptools/tests/namespaces.py b/setuptools/tests/namespaces.py index ef5ecdadac..245cf8ea38 100644 --- a/setuptools/tests/namespaces.py +++ b/setuptools/tests/namespaces.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, unicode_literals - import textwrap diff --git a/setuptools/tests/server.py b/setuptools/tests/server.py index 8b17b0816e..7e2132301b 100644 --- a/setuptools/tests/server.py +++ b/setuptools/tests/server.py @@ -4,13 +4,12 @@ import os import time import threading +import http.server +import urllib.parse +import urllib.request -from setuptools.extern.six.moves import BaseHTTPServer, SimpleHTTPServer -from setuptools.extern.six.moves.urllib_parse import urljoin -from setuptools.extern.six.moves.urllib.request import pathname2url - -class IndexServer(BaseHTTPServer.HTTPServer): +class IndexServer(http.server.HTTPServer): """Basic single-threaded http server simulating a package index You can use this server in unittest like this:: @@ -24,8 +23,8 @@ class IndexServer(BaseHTTPServer.HTTPServer): def __init__( self, server_address=('', 0), - RequestHandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler): - BaseHTTPServer.HTTPServer.__init__( + RequestHandlerClass=http.server.SimpleHTTPRequestHandler): + http.server.HTTPServer.__init__( self, server_address, RequestHandlerClass) self._run = True @@ -48,14 +47,14 @@ def base_url(self): return 'http://127.0.0.1:%s/setuptools/tests/indexes/' % port -class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler): +class RequestRecorder(http.server.BaseHTTPRequestHandler): def do_GET(self): requests = vars(self.server).setdefault('requests', []) requests.append(self) self.send_response(200, 'OK') -class MockServer(BaseHTTPServer.HTTPServer, threading.Thread): +class MockServer(http.server.HTTPServer, threading.Thread): """ A simple HTTP Server that records the requests made to it. """ @@ -63,7 +62,7 @@ class MockServer(BaseHTTPServer.HTTPServer, threading.Thread): def __init__( self, server_address=('', 0), RequestHandlerClass=RequestRecorder): - BaseHTTPServer.HTTPServer.__init__( + http.server.HTTPServer.__init__( self, server_address, RequestHandlerClass) threading.Thread.__init__(self) self.setDaemon(True) @@ -87,5 +86,5 @@ def path_to_url(path, authority=None): base = 'file:' if authority is not None: base += '//' + authority - url = urljoin(base, pathname2url(path)) + url = urllib.parse.urljoin(base, urllib.request.pathname2url(path)) return url diff --git a/setuptools/tests/test_archive_util.py b/setuptools/tests/test_archive_util.py index b789e9acef..7f9962440c 100644 --- a/setuptools/tests/test_archive_util.py +++ b/setuptools/tests/test_archive_util.py @@ -3,8 +3,6 @@ import tarfile import io -from setuptools.extern import six - import pytest from setuptools import archive_util @@ -22,8 +20,6 @@ def tarfile_with_unicode(tmpdir): data = b"" filename = "testimäge.png" - if six.PY2: - filename = filename.decode('utf-8') t = tarfile.TarInfo(filename) t.size = len(data) @@ -39,4 +35,4 @@ def tarfile_with_unicode(tmpdir): @pytest.mark.xfail(reason="#710 and #712") def test_unicode_files(tarfile_with_unicode, tmpdir): target = tmpdir / 'out' - archive_util.unpack_archive(tarfile_with_unicode, six.text_type(target)) + archive_util.unpack_archive(tarfile_with_unicode, str(target)) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 2ef8521d51..838fdb4299 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -2,8 +2,6 @@ import distutils.command.build_ext as orig from distutils.sysconfig import get_config_var -from setuptools.extern import six - from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution from setuptools.extension import Extension @@ -41,7 +39,7 @@ def test_abi3_filename(self): assert 'spam.eggs' in cmd.ext_map res = cmd.get_ext_filename('spam.eggs') - if six.PY2 or not get_abi3_suffix(): + if not get_abi3_suffix(): assert res.endswith(get_config_var('EXT_SUFFIX')) elif sys.platform == 'win32': assert res.endswith('eggs.pyd') diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index fdb4b95010..5462b26a8a 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -1,20 +1,13 @@ -from __future__ import unicode_literals - import os import shutil import tarfile +import importlib +from concurrent import futures import pytest from .files import build_files from .textwrap import DALS -from . import py2_only - -__metaclass__ = type - -# Backports on Python 2.7 -import importlib -from concurrent import futures class BuildBackendBase: @@ -220,15 +213,6 @@ def test_prepare_metadata_for_build_wheel(self, build_backend): assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) - @py2_only - def test_prepare_metadata_for_build_wheel_with_str(self, build_backend): - dist_dir = os.path.abspath(str('pip-dist-info')) - os.makedirs(dist_dir) - - dist_info = build_backend.prepare_metadata_for_build_wheel(dist_dir) - - assert os.path.isfile(os.path.join(dist_dir, dist_info, 'METADATA')) - def test_build_sdist_explicit_dist(self, build_backend): # explicitly specifying the dist folder should work # the folder sdist_directory and the ``--dist-dir`` can be the same diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 67992c041f..1dee12718f 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import contextlib +import configparser import pytest @@ -9,9 +7,6 @@ from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration -from setuptools.extern.six.moves import configparser -from setuptools.extern import six -from . import py2_only, py3_only from .textwrap import DALS @@ -311,10 +306,6 @@ def test_version(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - if six.PY2: - # static version loading is unsupported on Python 2 - return - config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_b.mod.VERSION\n' @@ -719,19 +710,6 @@ def test_find_directive(self, tmpdir): assert set(dist.packages) == set( ['fake_package', 'fake_package.sub_two']) - @py2_only - def test_find_namespace_directive_fails_on_py2(self, tmpdir): - dir_package, config = fake_env( - tmpdir, - '[options]\n' - 'packages = find_namespace:\n' - ) - - with pytest.raises(DistutilsOptionError): - with get_dist(tmpdir) as dist: - dist.parse_config_files() - - @py3_only def test_find_namespace_directive(self, tmpdir): dir_package, config = fake_env( tmpdir, diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index bb89a865b9..9854420e6b 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -1,8 +1,6 @@ """develop tests """ -from __future__ import absolute_import, unicode_literals - import os import site import sys @@ -10,7 +8,6 @@ import subprocess import platform -from setuptools.extern import six from setuptools.command import test import pytest @@ -97,7 +94,7 @@ def test_2to3_user_mode(self, test_env): with io.open(fn) as init_file: init = init_file.read().strip() - expected = 'print "foo"' if six.PY2 else 'print("foo")' + expected = 'print("foo")' assert init == expected def test_console_scripts(self, tmpdir): @@ -163,7 +160,7 @@ def install_develop(src_dir, target): reason="https://github.com/pypa/setuptools/issues/851", ) @pytest.mark.skipif( - platform.python_implementation() == 'PyPy' and not six.PY2, + platform.python_implementation() == 'PyPy', reason="https://github.com/pypa/setuptools/issues/1202", ) def test_namespace_package_importable(self, tmpdir): diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 531ea1b417..cb47fb5848 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -1,11 +1,9 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import io import collections import re import functools +import urllib.request +import urllib.parse from distutils.errors import DistutilsSetupError from setuptools.dist import ( _get_unpatched, @@ -14,9 +12,6 @@ ) from setuptools import sic from setuptools import Distribution -from setuptools.extern.six.moves.urllib.request import pathname2url -from setuptools.extern.six.moves.urllib_parse import urljoin -from setuptools.extern import six from .textwrap import DALS from .test_easy_install import make_nspkg_sdist @@ -29,7 +24,8 @@ def test_dist_fetch_build_egg(tmpdir): Check multiple calls to `Distribution.fetch_build_egg` work as expected. """ index = tmpdir.mkdir('index') - index_url = urljoin('file://', pathname2url(str(index))) + index_url = urllib.parse.urljoin( + 'file://', urllib.request.pathname2url(str(index))) def sdist_with_index(distname, version): dist_dir = index.mkdir(distname) @@ -63,8 +59,7 @@ def sdist_with_index(distname, version): dist.fetch_build_egg(r) for r in reqs ] - # noqa below because on Python 2 it causes flakes - assert [dist.key for dist in resolved_dists if dist] == reqs # noqa + assert [dist.key for dist in resolved_dists if dist] == reqs def test_dist__get_unpatched_deprecated(): @@ -150,10 +145,7 @@ def test_read_metadata(name, attrs): dist_class = metadata_out.__class__ # Write to PKG_INFO and then load into a new metadata object - if six.PY2: - PKG_INFO = io.BytesIO() - else: - PKG_INFO = io.StringIO() + PKG_INFO = io.StringIO() metadata_out.write_pkg_file(PKG_INFO) diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py index f7e7d2bf0a..29fbd09dbe 100644 --- a/setuptools/tests/test_dist_info.py +++ b/setuptools/tests/test_dist_info.py @@ -1,10 +1,6 @@ """Test .dist-info style distributions. """ -from __future__ import unicode_literals - -from setuptools.extern.six.moves import map - import pytest import pkg_resources diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c07b5bea81..26a5e9a6ba 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- """Easy install Tests """ -from __future__ import absolute_import, unicode_literals import sys import os @@ -18,8 +16,6 @@ import time import re -from setuptools.extern import six - import pytest from setuptools import sandbox @@ -41,8 +37,6 @@ from .files import build_files from .textwrap import DALS -__metaclass__ = type - class FakeDist: def get_entry_map(self, group): @@ -984,8 +978,6 @@ def create_setup_requires_package(path, distname='foobar', version='0.1', ) class TestScriptHeader: non_ascii_exe = '/Users/José/bin/python' - if six.PY2: - non_ascii_exe = non_ascii_exe.encode('utf-8') exe_with_spaces = r'C:\Program Files\Python36\python.exe' def test_get_script_header(self): diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 109f913587..dc472af4c8 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -10,7 +10,6 @@ egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision, ) from setuptools.dist import Distribution -from setuptools.extern.six.moves import map import pytest @@ -19,8 +18,6 @@ from .textwrap import DALS from . import contexts -__metaclass__ = type - class Environment(str): pass @@ -73,8 +70,7 @@ def test_egg_info_save_version_info_setup_empty(self, tmpdir_cwd, env): """ When the egg_info section is empty or not present, running save_version_info should add the settings to the setup.cfg - in a deterministic order, consistent with the ordering found - on Python 2.7 with PYTHONHASHSEED=0. + in a deterministic order. """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') dist = Distribution() @@ -906,49 +902,3 @@ def test_egg_info_tag_only_once(self, tmpdir_cwd, env): def test_get_pkg_info_revision_deprecated(self): pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) - - EGG_INFO_TESTS = ( - # Check for issue #1136: invalid string type when - # reading declarative `setup.cfg` under Python 2. - { - 'setup.py': DALS( - """ - from setuptools import setup - setup( - name="foo", - ) - """), - 'setup.cfg': DALS( - """ - [options] - package_dir = - = src - """), - 'src': {}, - }, - # Check Unicode can be used in `setup.py` under Python 2. - { - 'setup.py': DALS( - """ - # -*- coding: utf-8 -*- - from __future__ import unicode_literals - from setuptools import setup, find_packages - setup( - name="foo", - package_dir={'': 'src'}, - ) - """), - 'src': {}, - } - ) - - @pytest.mark.parametrize('package_files', EGG_INFO_TESTS) - def test_egg_info(self, tmpdir_cwd, env, package_files): - """ - """ - build_files(package_files) - code, data = environment.run_setup_py( - cmd=['egg_info'], - data_stream=1, - ) - assert not code, data diff --git a/setuptools/tests/test_extern.py b/setuptools/tests/test_extern.py index 3519a68073..0d6b164f53 100644 --- a/setuptools/tests/test_extern.py +++ b/setuptools/tests/test_extern.py @@ -3,7 +3,6 @@ from setuptools import Distribution from setuptools.extern import ordered_set -from setuptools.tests import py3_only def test_reimport_extern(): @@ -17,6 +16,5 @@ def test_orderedset_pickle_roundtrip(): assert o1 == o2 -@py3_only def test_distribution_picklable(): pickle.loads(pickle.dumps(Distribution())) diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index ab26b4f128..906713f61d 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -7,12 +7,8 @@ import pytest -from . import py3_only - -from setuptools.extern.six import PY3 from setuptools import find_packages -if PY3: - from setuptools import find_namespace_packages +from setuptools import find_namespace_packages # modeled after CPython's test.support.can_symlink @@ -154,34 +150,29 @@ def test_symlinked_packages_are_included(self): def _assert_packages(self, actual, expected): assert set(actual) == set(expected) - @py3_only def test_pep420_ns_package(self): packages = find_namespace_packages( self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @py3_only def test_pep420_ns_package_no_includes(self): packages = find_namespace_packages( self.dist_dir, exclude=['pkg.subpkg.assets']) self._assert_packages( packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) - @py3_only def test_pep420_ns_package_no_includes_or_excludes(self): packages = find_namespace_packages(self.dist_dir) expected = [ 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] self._assert_packages(packages, expected) - @py3_only def test_regular_package_with_nested_pep420_ns_packages(self): self._touch('__init__.py', self.pkg_dir) packages = find_namespace_packages( self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) - @py3_only def test_pep420_ns_package_no_non_package_dirs(self): shutil.rmtree(self.docs_dir) shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index f1a27f8be8..24cef480ea 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -11,8 +11,8 @@ import functools import tarfile import zipfile +import urllib.request -from setuptools.extern.six.moves import urllib import pytest from setuptools.command.easy_install import easy_install diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 042a8b1742..82bdb9c643 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -7,18 +7,16 @@ import sys import tempfile import itertools +import io from distutils import log from distutils.errors import DistutilsTemplateError from setuptools.command.egg_info import FileList, egg_info, translate_pattern from setuptools.dist import Distribution -from setuptools.extern import six from setuptools.tests.textwrap import DALS import pytest -__metaclass__ = type - def make_local_path(s): """Converts '/' in a string to os.sep""" @@ -41,7 +39,7 @@ def make_local_path(s): @contextlib.contextmanager def quiet(): old_stdout, old_stderr = sys.stdout, sys.stderr - sys.stdout, sys.stderr = six.StringIO(), six.StringIO() + sys.stdout, sys.stderr = io.StringIO(), io.StringIO() try: yield finally: diff --git a/setuptools/tests/test_msvc14.py b/setuptools/tests/test_msvc14.py index 7833aab47b..1aca12dd37 100644 --- a/setuptools/tests/test_msvc14.py +++ b/setuptools/tests/test_msvc14.py @@ -31,8 +31,6 @@ def _find_vcvarsall(plat_spec): finally: _msvccompiler._msvc14_find_vcvarsall = old_find_vcvarsall - @pytest.mark.skipif(sys.version_info[0] < 3, - reason="Unicode requires encode/decode on Python 2") def test_get_vc_env_unicode(self): import setuptools.msvc as _msvccompiler diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index f937d98189..6c8c522dc0 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, unicode_literals - import sys import subprocess diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index 29aace13ef..8e9435efef 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -1,12 +1,11 @@ -from __future__ import absolute_import - import sys import os import distutils.errors import platform +import urllib.request +import urllib.error +import http.client -from setuptools.extern import six -from setuptools.extern.six.moves import urllib, http_client import mock import pytest @@ -60,7 +59,7 @@ def test_bad_url_bad_status_line(self): ) def _urlopen(*args): - raise http_client.BadStatusLine('line') + raise http.client.BadStatusLine('line') index.opener = _urlopen url = 'http://example.com' @@ -84,7 +83,7 @@ def test_bad_url_double_scheme(self): try: index.open_url(url) except distutils.errors.DistutilsError as error: - msg = six.text_type(error) + msg = str(error) assert ( 'nonnumeric port' in msg or 'getaddrinfo failed' in msg diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 0bea53dfd7..049fdcc05a 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -1,8 +1,5 @@ -# -*- coding: utf-8 -*- """sdist tests""" -from __future__ import print_function, unicode_literals - import os import sys import tempfile @@ -10,9 +7,6 @@ import contextlib import io -from setuptools.extern import six -from setuptools.extern.six.moves import map - import pytest import pkg_resources @@ -21,7 +15,6 @@ from setuptools.dist import Distribution from setuptools.tests import fail_on_ascii from .text import Filenames -from . import py3_only SETUP_ATTRS = { @@ -42,7 +35,7 @@ @contextlib.contextmanager def quiet(): old_stdout, old_stderr = sys.stdout, sys.stderr - sys.stdout, sys.stderr = six.StringIO(), six.StringIO() + sys.stdout, sys.stderr = io.StringIO(), io.StringIO() try: yield finally: @@ -51,7 +44,7 @@ def quiet(): # Convert to POSIX path def posix(path): - if not six.PY2 and not isinstance(path, str): + if not isinstance(path, str): return path.replace(os.sep.encode('ascii'), b'/') else: return path.replace(os.sep, '/') @@ -59,7 +52,7 @@ def posix(path): # HFS Plus uses decomposed UTF-8 def decompose(path): - if isinstance(path, six.text_type): + if isinstance(path, str): return unicodedata.normalize('NFD', path) try: path = path.decode('utf-8') @@ -231,7 +224,6 @@ def test_manifest_is_written_with_utf8_encoding(self): # The manifest should contain the UTF-8 filename assert posix(filename) in u_contents - @py3_only @fail_on_ascii def test_write_manifest_allows_utf8_filenames(self): # Test for #303. @@ -265,7 +257,6 @@ def test_write_manifest_allows_utf8_filenames(self): # The filelist should have been updated as well assert u_filename in mm.filelist.files - @py3_only def test_write_manifest_skips_non_utf8_filenames(self): """ Files that cannot be encoded to UTF-8 (specifically, those that @@ -329,11 +320,9 @@ def test_manifest_is_read_with_utf8_encoding(self): cmd.read_manifest() # The filelist should contain the UTF-8 filename - if not six.PY2: - filename = filename.decode('utf-8') + filename = filename.decode('utf-8') assert filename in cmd.filelist.files - @py3_only @fail_on_latin1_encoded_filenames def test_read_manifest_skips_non_utf8_filenames(self): # Test for #303. @@ -383,21 +372,18 @@ def test_sdist_with_utf8_encoded_filename(self): if sys.platform == 'darwin': filename = decompose(filename) - if not six.PY2: - fs_enc = sys.getfilesystemencoding() + fs_enc = sys.getfilesystemencoding() - if sys.platform == 'win32': - if fs_enc == 'cp1252': - # Python 3 mangles the UTF-8 filename - filename = filename.decode('cp1252') - assert filename in cmd.filelist.files - else: - filename = filename.decode('mbcs') - assert filename in cmd.filelist.files + if sys.platform == 'win32': + if fs_enc == 'cp1252': + # Python mangles the UTF-8 filename + filename = filename.decode('cp1252') + assert filename in cmd.filelist.files else: - filename = filename.decode('utf-8') + filename = filename.decode('mbcs') assert filename in cmd.filelist.files else: + filename = filename.decode('utf-8') assert filename in cmd.filelist.files @classmethod @@ -425,33 +411,20 @@ def test_sdist_with_latin1_encoded_filename(self): with quiet(): cmd.run() - if six.PY2: - # Under Python 2 there seems to be no decoded string in the - # filelist. However, due to decode and encoding of the - # file name to get utf-8 Manifest the latin1 maybe excluded - try: - # fs_enc should match how one is expect the decoding to - # be proformed for the manifest output. - fs_enc = sys.getfilesystemencoding() - filename.decode(fs_enc) - assert filename in cmd.filelist.files - except UnicodeDecodeError: - filename not in cmd.filelist.files - else: - # not all windows systems have a default FS encoding of cp1252 - if sys.platform == 'win32': - # Latin-1 is similar to Windows-1252 however - # on mbcs filesys it is not in latin-1 encoding - fs_enc = sys.getfilesystemencoding() - if fs_enc != 'mbcs': - fs_enc = 'latin-1' - filename = filename.decode(fs_enc) + # not all windows systems have a default FS encoding of cp1252 + if sys.platform == 'win32': + # Latin-1 is similar to Windows-1252 however + # on mbcs filesys it is not in latin-1 encoding + fs_enc = sys.getfilesystemencoding() + if fs_enc != 'mbcs': + fs_enc = 'latin-1' + filename = filename.decode(fs_enc) - assert filename in cmd.filelist.files - else: - # The Latin-1 filename should have been skipped - filename = filename.decode('latin-1') - filename not in cmd.filelist.files + assert filename in cmd.filelist.files + else: + # The Latin-1 filename should have been skipped + filename = filename.decode('latin-1') + filename not in cmd.filelist.files def test_pyproject_toml_in_sdist(self, tmpdir): """ diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py index 1b0389545a..0163f9af64 100644 --- a/setuptools/tests/test_setopt.py +++ b/setuptools/tests/test_setopt.py @@ -1,13 +1,7 @@ -# coding: utf-8 - -from __future__ import unicode_literals - import io - -import six +import configparser from setuptools.command import setopt -from setuptools.extern.six.moves import configparser class TestEdit: @@ -15,7 +9,7 @@ class TestEdit: def parse_config(filename): parser = configparser.ConfigParser() with io.open(filename, encoding='utf-8') as reader: - (parser.readfp if six.PY2 else parser.read_file)(reader) + parser.read_file(reader) return parser @staticmethod diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py index 08d263ae87..42f8e18bef 100644 --- a/setuptools/tests/test_setuptools.py +++ b/setuptools/tests/test_setuptools.py @@ -15,7 +15,6 @@ import setuptools.dist import setuptools.depends as dep from setuptools.depends import Require -from setuptools.extern import six def makeSetup(**args): @@ -49,7 +48,7 @@ def f1(): x = "test" y = z - fc = six.get_function_code(f1) + fc = f1.__code__ # unrecognized name assert dep.extract_constant(fc, 'q', -1) is None diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 892fd120d9..180562e263 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import mock from distutils import log import os @@ -110,7 +106,6 @@ def test_tests_are_run_once(capfd): with open('dummy/test_dummy.py', 'wt') as f: f.write(DALS( """ - from __future__ import print_function import unittest class TestTest(unittest.TestCase): def test_test(self): diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 555273aeba..b555ce4f62 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -12,17 +12,6 @@ from .test_easy_install import make_nspkg_sdist -@pytest.fixture(autouse=True) -def disable_requires_python(monkeypatch): - """ - Disable Requires-Python on Python 2.7 - """ - if sys.version_info > (3,): - return - - monkeypatch.setenv('PIP_IGNORE_REQUIRES_PYTHON', 'true') - - @pytest.fixture(autouse=True) def pytest_virtualenv_works(virtualenv): """ diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index f72ccbbf32..e56eac14d1 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -25,8 +25,6 @@ from .files import build_files from .textwrap import DALS -__metaclass__ = type - WHEEL_INFO_TESTS = ( ('invalid.whl', ValueError), diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py index 2553394a26..fa647de84f 100644 --- a/setuptools/tests/test_windows_wrappers.py +++ b/setuptools/tests/test_windows_wrappers.py @@ -12,8 +12,6 @@ are to wrap. """ -from __future__ import absolute_import - import sys import textwrap import subprocess diff --git a/setuptools/tests/text.py b/setuptools/tests/text.py index ad2c6249b5..e05cc633ed 100644 --- a/setuptools/tests/text.py +++ b/setuptools/tests/text.py @@ -1,8 +1,3 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - - class Filenames: unicode = 'smörbröd.py' latin_1 = unicode.encode('latin-1') diff --git a/setuptools/tests/textwrap.py b/setuptools/tests/textwrap.py index 5cd9e5bca8..5e39618dca 100644 --- a/setuptools/tests/textwrap.py +++ b/setuptools/tests/textwrap.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import textwrap diff --git a/setuptools/unicode_utils.py b/setuptools/unicode_utils.py index 7c63efd20b..e84e65e3e1 100644 --- a/setuptools/unicode_utils.py +++ b/setuptools/unicode_utils.py @@ -1,12 +1,10 @@ import unicodedata import sys -from setuptools.extern import six - # HFS Plus uses decomposed UTF-8 def decompose(path): - if isinstance(path, six.text_type): + if isinstance(path, str): return unicodedata.normalize('NFD', path) try: path = path.decode('utf-8') @@ -23,7 +21,7 @@ def filesys_decode(path): NONE when no expected encoding works """ - if isinstance(path, six.text_type): + if isinstance(path, str): return path fs_enc = sys.getfilesystemencoding() or 'utf-8' diff --git a/setuptools/wheel.py b/setuptools/wheel.py index ca09bd1944..0be811af2c 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -14,13 +14,9 @@ from pkg_resources import parse_version from setuptools.extern.packaging.tags import sys_tags from setuptools.extern.packaging.utils import canonicalize_name -from setuptools.extern.six import PY3 from setuptools.command.egg_info import write_requirements -__metaclass__ = type - - WHEEL_NAME = re.compile( r"""^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) @@ -112,7 +108,7 @@ def _install_as_egg(self, destination_eggdir, zf): 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() + value = fp.read().decode('utf-8') return email.parser.Parser().parsestr(value) wheel_metadata = get_metadata('WHEEL') diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 9e1a1e4a7c..be2ff1d01d 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -56,24 +56,12 @@ def clean(dep): return filter(None, map(clean, raw)) -def disable_python_requires(): - """ - On Python 2, install the dependencies that are selective - on Python version while honoring REQUIRES_PYTHON, then - disable REQUIRES_PYTHON so that pip can install this - checkout of setuptools. - """ - pip('install', *test_dependencies()) - os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = 'true' - - def run(args): os.environ['PIP_USE_PEP517'] = 'true' if is_install_self(args): remove_setuptools() bootstrap() - sys.version_info > (3,) or disable_python_requires() pip(*args) From 5003bae4ca8aab95091e75f366f466e89926e6e8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Aug 2020 07:03:07 -0400 Subject: [PATCH 8114/8469] Remove dependency on six from packaging. --- pavement.py | 6 +++++- pkg_resources/_vendor/packaging/requirements.py | 2 +- setuptools/_vendor/packaging/requirements.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pavement.py b/pavement.py index b5220d102b..34603ed1b0 100644 --- a/pavement.py +++ b/pavement.py @@ -22,7 +22,11 @@ def rewrite_packaging(pkg_files, new_root): """ for file in pkg_files.glob('*.py'): text = file.text() - text = re.sub(r' (pyparsing|six)', rf' {new_root}.\1', text) + text = re.sub(r' (pyparsing)', rf' {new_root}.\1', text) + text = text.replace( + 'from six.moves.urllib import parse', + 'from urllib import parse', + ) file.write_text(text) diff --git a/pkg_resources/_vendor/packaging/requirements.py b/pkg_resources/_vendor/packaging/requirements.py index 8282a63259..9495a1df1e 100644 --- a/pkg_resources/_vendor/packaging/requirements.py +++ b/pkg_resources/_vendor/packaging/requirements.py @@ -9,7 +9,7 @@ from pkg_resources.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException from pkg_resources.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine from pkg_resources.extern.pyparsing import Literal as L # noqa -from pkg_resources.extern.six.moves.urllib import parse as urlparse +from urllib import parse as urlparse from ._typing import TYPE_CHECKING from .markers import MARKER_EXPR, Marker diff --git a/setuptools/_vendor/packaging/requirements.py b/setuptools/_vendor/packaging/requirements.py index 06b1748851..5d50c7d7e2 100644 --- a/setuptools/_vendor/packaging/requirements.py +++ b/setuptools/_vendor/packaging/requirements.py @@ -9,7 +9,7 @@ from setuptools.extern.pyparsing import stringStart, stringEnd, originalTextFor, ParseException from setuptools.extern.pyparsing import ZeroOrMore, Word, Optional, Regex, Combine from setuptools.extern.pyparsing import Literal as L # noqa -from setuptools.extern.six.moves.urllib import parse as urlparse +from urllib import parse as urlparse from ._typing import TYPE_CHECKING from .markers import MARKER_EXPR, Marker From 45e0ea0ff10a64f315a5c65b6805327222e5b565 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Aug 2020 07:09:10 -0400 Subject: [PATCH 8115/8469] Remove six as a vendored dependency. --- pavement.py | 1 + pkg_resources/_vendor/six.py | 868 ----------------------------- pkg_resources/_vendor/vendored.txt | 1 - setuptools/_vendor/six.py | 868 ----------------------------- setuptools/_vendor/vendored.txt | 1 - 5 files changed, 1 insertion(+), 1738 deletions(-) delete mode 100644 pkg_resources/_vendor/six.py delete mode 100644 setuptools/_vendor/six.py diff --git a/pavement.py b/pavement.py index 34603ed1b0..81ff6f1201 100644 --- a/pavement.py +++ b/pavement.py @@ -54,6 +54,7 @@ def install(vendor): subprocess.check_call(install_args) remove_all(vendor.glob('*.dist-info')) remove_all(vendor.glob('*.egg-info')) + remove_all(vendor.glob('six.py')) (vendor / '__init__.py').write_text('') diff --git a/pkg_resources/_vendor/six.py b/pkg_resources/_vendor/six.py deleted file mode 100644 index 190c0239cd..0000000000 --- a/pkg_resources/_vendor/six.py +++ /dev/null @@ -1,868 +0,0 @@ -"""Utilities for writing code that runs on Python 2 and 3""" - -# Copyright (c) 2010-2015 Benjamin Peterson -# -# 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. - -from __future__ import absolute_import - -import functools -import itertools -import operator -import sys -import types - -__author__ = "Benjamin Peterson " -__version__ = "1.10.0" - - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 -PY34 = sys.version_info[0:2] >= (3, 4) - -if PY3: - string_types = str, - integer_types = int, - class_types = type, - text_type = str - binary_type = bytes - - MAXSIZE = sys.maxsize -else: - string_types = basestring, - integer_types = (int, long) - class_types = (type, types.ClassType) - text_type = unicode - binary_type = str - - if sys.platform.startswith("java"): - # Jython always uses 32 bits. - MAXSIZE = int((1 << 31) - 1) - else: - # It's possible to have sizeof(long) != sizeof(Py_ssize_t). - class X(object): - - def __len__(self): - return 1 << 31 - try: - len(X()) - except OverflowError: - # 32-bit - MAXSIZE = int((1 << 31) - 1) - else: - # 64-bit - MAXSIZE = int((1 << 63) - 1) - del X - - -def _add_doc(func, doc): - """Add documentation to a function.""" - func.__doc__ = doc - - -def _import_module(name): - """Import module, returning the module after the last dot.""" - __import__(name) - return sys.modules[name] - - -class _LazyDescr(object): - - def __init__(self, name): - self.name = name - - def __get__(self, obj, tp): - result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. - try: - # This is a bit ugly, but it avoids running this again by - # removing this descriptor. - delattr(obj.__class__, self.name) - except AttributeError: - pass - return result - - -class MovedModule(_LazyDescr): - - def __init__(self, name, old, new=None): - super(MovedModule, self).__init__(name) - if PY3: - if new is None: - new = name - self.mod = new - else: - self.mod = old - - def _resolve(self): - return _import_module(self.mod) - - def __getattr__(self, attr): - _module = self._resolve() - value = getattr(_module, attr) - setattr(self, attr, value) - return value - - -class _LazyModule(types.ModuleType): - - def __init__(self, name): - super(_LazyModule, self).__init__(name) - self.__doc__ = self.__class__.__doc__ - - def __dir__(self): - attrs = ["__doc__", "__name__"] - attrs += [attr.name for attr in self._moved_attributes] - return attrs - - # Subclasses should override this - _moved_attributes = [] - - -class MovedAttribute(_LazyDescr): - - def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): - super(MovedAttribute, self).__init__(name) - if PY3: - if new_mod is None: - new_mod = name - self.mod = new_mod - if new_attr is None: - if old_attr is None: - new_attr = name - else: - new_attr = old_attr - self.attr = new_attr - else: - self.mod = old_mod - if old_attr is None: - old_attr = name - self.attr = old_attr - - def _resolve(self): - module = _import_module(self.mod) - return getattr(module, self.attr) - - -class _SixMetaPathImporter(object): - - """ - A meta path importer to import six.moves and its submodules. - - This class implements a PEP302 finder and loader. It should be compatible - with Python 2.5 and all existing versions of Python3 - """ - - def __init__(self, six_module_name): - self.name = six_module_name - self.known_modules = {} - - def _add_module(self, mod, *fullnames): - for fullname in fullnames: - self.known_modules[self.name + "." + fullname] = mod - - def _get_module(self, fullname): - return self.known_modules[self.name + "." + fullname] - - def find_module(self, fullname, path=None): - if fullname in self.known_modules: - return self - return None - - def __get_module(self, fullname): - try: - return self.known_modules[fullname] - except KeyError: - raise ImportError("This loader does not know module " + fullname) - - def load_module(self, fullname): - try: - # in case of a reload - return sys.modules[fullname] - except KeyError: - pass - mod = self.__get_module(fullname) - if isinstance(mod, MovedModule): - mod = mod._resolve() - else: - mod.__loader__ = self - sys.modules[fullname] = mod - return mod - - def is_package(self, fullname): - """ - Return true, if the named module is a package. - - We need this method to get correct spec objects with - Python 3.4 (see PEP451) - """ - return hasattr(self.__get_module(fullname), "__path__") - - def get_code(self, fullname): - """Return None - - Required, if is_package is implemented""" - self.__get_module(fullname) # eventually raises ImportError - return None - get_source = get_code # same as get_code - -_importer = _SixMetaPathImporter(__name__) - - -class _MovedItems(_LazyModule): - - """Lazy loading of moved objects""" - __path__ = [] # mark as package - - -_moved_attributes = [ - MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), - MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), - MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), - MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), - MovedAttribute("intern", "__builtin__", "sys"), - MovedAttribute("map", "itertools", "builtins", "imap", "map"), - MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), - MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), - MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), - MovedAttribute("reduce", "__builtin__", "functools"), - MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), - MovedAttribute("StringIO", "StringIO", "io"), - MovedAttribute("UserDict", "UserDict", "collections"), - MovedAttribute("UserList", "UserList", "collections"), - MovedAttribute("UserString", "UserString", "collections"), - MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), - MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), - MovedModule("html_parser", "HTMLParser", "html.parser"), - MovedModule("http_client", "httplib", "http.client"), - MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), - MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), - MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), - MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), - MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), - MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), - MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), - MovedModule("cPickle", "cPickle", "pickle"), - MovedModule("queue", "Queue"), - MovedModule("reprlib", "repr"), - MovedModule("socketserver", "SocketServer"), - MovedModule("_thread", "thread", "_thread"), - MovedModule("tkinter", "Tkinter"), - MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), - MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), - MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), - MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), - MovedModule("tkinter_tix", "Tix", "tkinter.tix"), - MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), - MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), - MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), - MovedModule("tkinter_colorchooser", "tkColorChooser", - "tkinter.colorchooser"), - MovedModule("tkinter_commondialog", "tkCommonDialog", - "tkinter.commondialog"), - MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), - MovedModule("tkinter_font", "tkFont", "tkinter.font"), - MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), - MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", - "tkinter.simpledialog"), - MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), - MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), - MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), - MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), - MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), -] -# Add windows specific modules. -if sys.platform == "win32": - _moved_attributes += [ - MovedModule("winreg", "_winreg"), - ] - -for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) - if isinstance(attr, MovedModule): - _importer._add_module(attr, "moves." + attr.name) -del attr - -_MovedItems._moved_attributes = _moved_attributes - -moves = _MovedItems(__name__ + ".moves") -_importer._add_module(moves, "moves") - - -class Module_six_moves_urllib_parse(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_parse""" - - -_urllib_parse_moved_attributes = [ - MovedAttribute("ParseResult", "urlparse", "urllib.parse"), - MovedAttribute("SplitResult", "urlparse", "urllib.parse"), - MovedAttribute("parse_qs", "urlparse", "urllib.parse"), - MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), - MovedAttribute("urldefrag", "urlparse", "urllib.parse"), - MovedAttribute("urljoin", "urlparse", "urllib.parse"), - MovedAttribute("urlparse", "urlparse", "urllib.parse"), - MovedAttribute("urlsplit", "urlparse", "urllib.parse"), - MovedAttribute("urlunparse", "urlparse", "urllib.parse"), - MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), - MovedAttribute("quote", "urllib", "urllib.parse"), - MovedAttribute("quote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote", "urllib", "urllib.parse"), - MovedAttribute("unquote_plus", "urllib", "urllib.parse"), - MovedAttribute("urlencode", "urllib", "urllib.parse"), - MovedAttribute("splitquery", "urllib", "urllib.parse"), - MovedAttribute("splittag", "urllib", "urllib.parse"), - MovedAttribute("splituser", "urllib", "urllib.parse"), - MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), - MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), - MovedAttribute("uses_params", "urlparse", "urllib.parse"), - MovedAttribute("uses_query", "urlparse", "urllib.parse"), - MovedAttribute("uses_relative", "urlparse", "urllib.parse"), -] -for attr in _urllib_parse_moved_attributes: - setattr(Module_six_moves_urllib_parse, attr.name, attr) -del attr - -Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes - -_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), - "moves.urllib_parse", "moves.urllib.parse") - - -class Module_six_moves_urllib_error(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_error""" - - -_urllib_error_moved_attributes = [ - MovedAttribute("URLError", "urllib2", "urllib.error"), - MovedAttribute("HTTPError", "urllib2", "urllib.error"), - MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), -] -for attr in _urllib_error_moved_attributes: - setattr(Module_six_moves_urllib_error, attr.name, attr) -del attr - -Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes - -_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), - "moves.urllib_error", "moves.urllib.error") - - -class Module_six_moves_urllib_request(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_request""" - - -_urllib_request_moved_attributes = [ - MovedAttribute("urlopen", "urllib2", "urllib.request"), - MovedAttribute("install_opener", "urllib2", "urllib.request"), - MovedAttribute("build_opener", "urllib2", "urllib.request"), - MovedAttribute("pathname2url", "urllib", "urllib.request"), - MovedAttribute("url2pathname", "urllib", "urllib.request"), - MovedAttribute("getproxies", "urllib", "urllib.request"), - MovedAttribute("Request", "urllib2", "urllib.request"), - MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), - MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), - MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), - MovedAttribute("BaseHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), - MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), - MovedAttribute("FileHandler", "urllib2", "urllib.request"), - MovedAttribute("FTPHandler", "urllib2", "urllib.request"), - MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), - MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), - MovedAttribute("urlretrieve", "urllib", "urllib.request"), - MovedAttribute("urlcleanup", "urllib", "urllib.request"), - MovedAttribute("URLopener", "urllib", "urllib.request"), - MovedAttribute("FancyURLopener", "urllib", "urllib.request"), - MovedAttribute("proxy_bypass", "urllib", "urllib.request"), -] -for attr in _urllib_request_moved_attributes: - setattr(Module_six_moves_urllib_request, attr.name, attr) -del attr - -Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes - -_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), - "moves.urllib_request", "moves.urllib.request") - - -class Module_six_moves_urllib_response(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_response""" - - -_urllib_response_moved_attributes = [ - MovedAttribute("addbase", "urllib", "urllib.response"), - MovedAttribute("addclosehook", "urllib", "urllib.response"), - MovedAttribute("addinfo", "urllib", "urllib.response"), - MovedAttribute("addinfourl", "urllib", "urllib.response"), -] -for attr in _urllib_response_moved_attributes: - setattr(Module_six_moves_urllib_response, attr.name, attr) -del attr - -Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes - -_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), - "moves.urllib_response", "moves.urllib.response") - - -class Module_six_moves_urllib_robotparser(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_robotparser""" - - -_urllib_robotparser_moved_attributes = [ - MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), -] -for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -del attr - -Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes - -_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), - "moves.urllib_robotparser", "moves.urllib.robotparser") - - -class Module_six_moves_urllib(types.ModuleType): - - """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" - __path__ = [] # mark as package - parse = _importer._get_module("moves.urllib_parse") - error = _importer._get_module("moves.urllib_error") - request = _importer._get_module("moves.urllib_request") - response = _importer._get_module("moves.urllib_response") - robotparser = _importer._get_module("moves.urllib_robotparser") - - def __dir__(self): - return ['parse', 'error', 'request', 'response', 'robotparser'] - -_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), - "moves.urllib") - - -def add_move(move): - """Add an item to six.moves.""" - setattr(_MovedItems, move.name, move) - - -def remove_move(name): - """Remove item from six.moves.""" - try: - delattr(_MovedItems, name) - except AttributeError: - try: - del moves.__dict__[name] - except KeyError: - raise AttributeError("no such move, %r" % (name,)) - - -if PY3: - _meth_func = "__func__" - _meth_self = "__self__" - - _func_closure = "__closure__" - _func_code = "__code__" - _func_defaults = "__defaults__" - _func_globals = "__globals__" -else: - _meth_func = "im_func" - _meth_self = "im_self" - - _func_closure = "func_closure" - _func_code = "func_code" - _func_defaults = "func_defaults" - _func_globals = "func_globals" - - -try: - advance_iterator = next -except NameError: - def advance_iterator(it): - return it.next() -next = advance_iterator - - -try: - callable = callable -except NameError: - def callable(obj): - return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) - - -if PY3: - def get_unbound_function(unbound): - return unbound - - create_bound_method = types.MethodType - - def create_unbound_method(func, cls): - return func - - Iterator = object -else: - def get_unbound_function(unbound): - return unbound.im_func - - def create_bound_method(func, obj): - return types.MethodType(func, obj, obj.__class__) - - def create_unbound_method(func, cls): - return types.MethodType(func, None, cls) - - class Iterator(object): - - def next(self): - return type(self).__next__(self) - - callable = callable -_add_doc(get_unbound_function, - """Get the function out of a possibly unbound function""") - - -get_method_function = operator.attrgetter(_meth_func) -get_method_self = operator.attrgetter(_meth_self) -get_function_closure = operator.attrgetter(_func_closure) -get_function_code = operator.attrgetter(_func_code) -get_function_defaults = operator.attrgetter(_func_defaults) -get_function_globals = operator.attrgetter(_func_globals) - - -if PY3: - def iterkeys(d, **kw): - return iter(d.keys(**kw)) - - def itervalues(d, **kw): - return iter(d.values(**kw)) - - def iteritems(d, **kw): - return iter(d.items(**kw)) - - def iterlists(d, **kw): - return iter(d.lists(**kw)) - - viewkeys = operator.methodcaller("keys") - - viewvalues = operator.methodcaller("values") - - viewitems = operator.methodcaller("items") -else: - def iterkeys(d, **kw): - return d.iterkeys(**kw) - - def itervalues(d, **kw): - return d.itervalues(**kw) - - def iteritems(d, **kw): - return d.iteritems(**kw) - - def iterlists(d, **kw): - return d.iterlists(**kw) - - viewkeys = operator.methodcaller("viewkeys") - - viewvalues = operator.methodcaller("viewvalues") - - viewitems = operator.methodcaller("viewitems") - -_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") -_add_doc(itervalues, "Return an iterator over the values of a dictionary.") -_add_doc(iteritems, - "Return an iterator over the (key, value) pairs of a dictionary.") -_add_doc(iterlists, - "Return an iterator over the (key, [values]) pairs of a dictionary.") - - -if PY3: - def b(s): - return s.encode("latin-1") - - def u(s): - return s - unichr = chr - import struct - int2byte = struct.Struct(">B").pack - del struct - byte2int = operator.itemgetter(0) - indexbytes = operator.getitem - iterbytes = iter - import io - StringIO = io.StringIO - BytesIO = io.BytesIO - _assertCountEqual = "assertCountEqual" - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" -else: - def b(s): - return s - # Workaround for standalone backslash - - def u(s): - return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") - unichr = unichr - int2byte = chr - - def byte2int(bs): - return ord(bs[0]) - - def indexbytes(buf, i): - return ord(buf[i]) - iterbytes = functools.partial(itertools.imap, ord) - import StringIO - StringIO = BytesIO = StringIO.StringIO - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -_add_doc(b, """Byte literal""") -_add_doc(u, """Text literal""") - - -def assertCountEqual(self, *args, **kwargs): - return getattr(self, _assertCountEqual)(*args, **kwargs) - - -def assertRaisesRegex(self, *args, **kwargs): - return getattr(self, _assertRaisesRegex)(*args, **kwargs) - - -def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -if PY3: - exec_ = getattr(moves.builtins, "exec") - - def reraise(tp, value, tb=None): - if value is None: - value = tp() - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - -else: - def exec_(_code_, _globs_=None, _locs_=None): - """Execute code in a namespace.""" - if _globs_ is None: - frame = sys._getframe(1) - _globs_ = frame.f_globals - if _locs_ is None: - _locs_ = frame.f_locals - del frame - elif _locs_ is None: - _locs_ = _globs_ - exec("""exec _code_ in _globs_, _locs_""") - - exec_("""def reraise(tp, value, tb=None): - raise tp, value, tb -""") - - -if sys.version_info[:2] == (3, 2): - exec_("""def raise_from(value, from_value): - if from_value is None: - raise value - raise value from from_value -""") -elif sys.version_info[:2] > (3, 2): - exec_("""def raise_from(value, from_value): - raise value from from_value -""") -else: - def raise_from(value, from_value): - raise value - - -print_ = getattr(moves.builtins, "print", None) -if print_ is None: - def print_(*args, **kwargs): - """The new-style print function for Python 2.4 and 2.5.""" - fp = kwargs.pop("file", sys.stdout) - if fp is None: - return - - def write(data): - if not isinstance(data, basestring): - data = str(data) - # If the file has an encoding, encode unicode with it. - if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): - errors = getattr(fp, "errors", None) - if errors is None: - errors = "strict" - data = data.encode(fp.encoding, errors) - fp.write(data) - want_unicode = False - sep = kwargs.pop("sep", None) - if sep is not None: - if isinstance(sep, unicode): - want_unicode = True - elif not isinstance(sep, str): - raise TypeError("sep must be None or a string") - end = kwargs.pop("end", None) - if end is not None: - if isinstance(end, unicode): - want_unicode = True - elif not isinstance(end, str): - raise TypeError("end must be None or a string") - if kwargs: - raise TypeError("invalid keyword arguments to print()") - if not want_unicode: - for arg in args: - if isinstance(arg, unicode): - want_unicode = True - break - if want_unicode: - newline = unicode("\n") - space = unicode(" ") - else: - newline = "\n" - space = " " - if sep is None: - sep = space - if end is None: - end = newline - for i, arg in enumerate(args): - if i: - write(sep) - write(arg) - write(end) -if sys.version_info[:2] < (3, 3): - _print = print_ - - def print_(*args, **kwargs): - fp = kwargs.get("file", sys.stdout) - flush = kwargs.pop("flush", False) - _print(*args, **kwargs) - if flush and fp is not None: - fp.flush() - -_add_doc(reraise, """Reraise an exception.""") - -if sys.version_info[0:2] < (3, 4): - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): - def wrapper(f): - f = functools.wraps(wrapped, assigned, updated)(f) - f.__wrapped__ = wrapped - return f - return wrapper -else: - wraps = functools.wraps - - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(meta): - - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - - -def python_2_unicode_compatible(klass): - """ - A decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method - returning text and apply this decorator to the class. - """ - if PY2: - if '__str__' not in klass.__dict__: - raise ValueError("@python_2_unicode_compatible cannot be applied " - "to %s because it doesn't define __str__()." % - klass.__name__) - klass.__unicode__ = klass.__str__ - klass.__str__ = lambda self: self.__unicode__().encode('utf-8') - return klass - - -# Complete the moves implementation. -# This code is at the end of this module to speed up module loading. -# Turn this module into a package. -__path__ = [] # required for PEP 302 and PEP 451 -__package__ = __name__ # see PEP 366 @ReservedAssignment -if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable -# Remove other six meta path importers, since they cause problems. This can -# happen if six is removed from sys.modules and then reloaded. (Setuptools does -# this for some reason.) -if sys.meta_path: - for i, importer in enumerate(sys.meta_path): - # Here's some real nastiness: Another "instance" of the six module might - # be floating around. Therefore, we can't use isinstance() to check for - # the six meta path importer, since the other six instance will have - # inserted an importer with different class. - if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): - del sys.meta_path[i] - break - del i, importer -# Finally, add the importer to the meta path import hook. -sys.meta_path.append(_importer) diff --git a/pkg_resources/_vendor/vendored.txt b/pkg_resources/_vendor/vendored.txt index 7862a3cead..da7a19813e 100644 --- a/pkg_resources/_vendor/vendored.txt +++ b/pkg_resources/_vendor/vendored.txt @@ -1,4 +1,3 @@ packaging==20.4 pyparsing==2.2.1 -six==1.10.0 appdirs==1.4.3 diff --git a/setuptools/_vendor/six.py b/setuptools/_vendor/six.py deleted file mode 100644 index 190c0239cd..0000000000 --- a/setuptools/_vendor/six.py +++ /dev/null @@ -1,868 +0,0 @@ -"""Utilities for writing code that runs on Python 2 and 3""" - -# Copyright (c) 2010-2015 Benjamin Peterson -# -# 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. - -from __future__ import absolute_import - -import functools -import itertools -import operator -import sys -import types - -__author__ = "Benjamin Peterson " -__version__ = "1.10.0" - - -# Useful for very coarse version differentiation. -PY2 = sys.version_info[0] == 2 -PY3 = sys.version_info[0] == 3 -PY34 = sys.version_info[0:2] >= (3, 4) - -if PY3: - string_types = str, - integer_types = int, - class_types = type, - text_type = str - binary_type = bytes - - MAXSIZE = sys.maxsize -else: - string_types = basestring, - integer_types = (int, long) - class_types = (type, types.ClassType) - text_type = unicode - binary_type = str - - if sys.platform.startswith("java"): - # Jython always uses 32 bits. - MAXSIZE = int((1 << 31) - 1) - else: - # It's possible to have sizeof(long) != sizeof(Py_ssize_t). - class X(object): - - def __len__(self): - return 1 << 31 - try: - len(X()) - except OverflowError: - # 32-bit - MAXSIZE = int((1 << 31) - 1) - else: - # 64-bit - MAXSIZE = int((1 << 63) - 1) - del X - - -def _add_doc(func, doc): - """Add documentation to a function.""" - func.__doc__ = doc - - -def _import_module(name): - """Import module, returning the module after the last dot.""" - __import__(name) - return sys.modules[name] - - -class _LazyDescr(object): - - def __init__(self, name): - self.name = name - - def __get__(self, obj, tp): - result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. - try: - # This is a bit ugly, but it avoids running this again by - # removing this descriptor. - delattr(obj.__class__, self.name) - except AttributeError: - pass - return result - - -class MovedModule(_LazyDescr): - - def __init__(self, name, old, new=None): - super(MovedModule, self).__init__(name) - if PY3: - if new is None: - new = name - self.mod = new - else: - self.mod = old - - def _resolve(self): - return _import_module(self.mod) - - def __getattr__(self, attr): - _module = self._resolve() - value = getattr(_module, attr) - setattr(self, attr, value) - return value - - -class _LazyModule(types.ModuleType): - - def __init__(self, name): - super(_LazyModule, self).__init__(name) - self.__doc__ = self.__class__.__doc__ - - def __dir__(self): - attrs = ["__doc__", "__name__"] - attrs += [attr.name for attr in self._moved_attributes] - return attrs - - # Subclasses should override this - _moved_attributes = [] - - -class MovedAttribute(_LazyDescr): - - def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None): - super(MovedAttribute, self).__init__(name) - if PY3: - if new_mod is None: - new_mod = name - self.mod = new_mod - if new_attr is None: - if old_attr is None: - new_attr = name - else: - new_attr = old_attr - self.attr = new_attr - else: - self.mod = old_mod - if old_attr is None: - old_attr = name - self.attr = old_attr - - def _resolve(self): - module = _import_module(self.mod) - return getattr(module, self.attr) - - -class _SixMetaPathImporter(object): - - """ - A meta path importer to import six.moves and its submodules. - - This class implements a PEP302 finder and loader. It should be compatible - with Python 2.5 and all existing versions of Python3 - """ - - def __init__(self, six_module_name): - self.name = six_module_name - self.known_modules = {} - - def _add_module(self, mod, *fullnames): - for fullname in fullnames: - self.known_modules[self.name + "." + fullname] = mod - - def _get_module(self, fullname): - return self.known_modules[self.name + "." + fullname] - - def find_module(self, fullname, path=None): - if fullname in self.known_modules: - return self - return None - - def __get_module(self, fullname): - try: - return self.known_modules[fullname] - except KeyError: - raise ImportError("This loader does not know module " + fullname) - - def load_module(self, fullname): - try: - # in case of a reload - return sys.modules[fullname] - except KeyError: - pass - mod = self.__get_module(fullname) - if isinstance(mod, MovedModule): - mod = mod._resolve() - else: - mod.__loader__ = self - sys.modules[fullname] = mod - return mod - - def is_package(self, fullname): - """ - Return true, if the named module is a package. - - We need this method to get correct spec objects with - Python 3.4 (see PEP451) - """ - return hasattr(self.__get_module(fullname), "__path__") - - def get_code(self, fullname): - """Return None - - Required, if is_package is implemented""" - self.__get_module(fullname) # eventually raises ImportError - return None - get_source = get_code # same as get_code - -_importer = _SixMetaPathImporter(__name__) - - -class _MovedItems(_LazyModule): - - """Lazy loading of moved objects""" - __path__ = [] # mark as package - - -_moved_attributes = [ - MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"), - MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"), - MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"), - MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), - MovedAttribute("intern", "__builtin__", "sys"), - MovedAttribute("map", "itertools", "builtins", "imap", "map"), - MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), - MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), - MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), - MovedAttribute("reduce", "__builtin__", "functools"), - MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), - MovedAttribute("StringIO", "StringIO", "io"), - MovedAttribute("UserDict", "UserDict", "collections"), - MovedAttribute("UserList", "UserList", "collections"), - MovedAttribute("UserString", "UserString", "collections"), - MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), - MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - MovedModule("builtins", "__builtin__"), - MovedModule("configparser", "ConfigParser"), - MovedModule("copyreg", "copy_reg"), - MovedModule("dbm_gnu", "gdbm", "dbm.gnu"), - MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"), - MovedModule("http_cookiejar", "cookielib", "http.cookiejar"), - MovedModule("http_cookies", "Cookie", "http.cookies"), - MovedModule("html_entities", "htmlentitydefs", "html.entities"), - MovedModule("html_parser", "HTMLParser", "html.parser"), - MovedModule("http_client", "httplib", "http.client"), - MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"), - MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"), - MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"), - MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"), - MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"), - MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"), - MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"), - MovedModule("cPickle", "cPickle", "pickle"), - MovedModule("queue", "Queue"), - MovedModule("reprlib", "repr"), - MovedModule("socketserver", "SocketServer"), - MovedModule("_thread", "thread", "_thread"), - MovedModule("tkinter", "Tkinter"), - MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"), - MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"), - MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"), - MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"), - MovedModule("tkinter_tix", "Tix", "tkinter.tix"), - MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"), - MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"), - MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"), - MovedModule("tkinter_colorchooser", "tkColorChooser", - "tkinter.colorchooser"), - MovedModule("tkinter_commondialog", "tkCommonDialog", - "tkinter.commondialog"), - MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"), - MovedModule("tkinter_font", "tkFont", "tkinter.font"), - MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"), - MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", - "tkinter.simpledialog"), - MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"), - MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"), - MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"), - MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), - MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), - MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), -] -# Add windows specific modules. -if sys.platform == "win32": - _moved_attributes += [ - MovedModule("winreg", "_winreg"), - ] - -for attr in _moved_attributes: - setattr(_MovedItems, attr.name, attr) - if isinstance(attr, MovedModule): - _importer._add_module(attr, "moves." + attr.name) -del attr - -_MovedItems._moved_attributes = _moved_attributes - -moves = _MovedItems(__name__ + ".moves") -_importer._add_module(moves, "moves") - - -class Module_six_moves_urllib_parse(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_parse""" - - -_urllib_parse_moved_attributes = [ - MovedAttribute("ParseResult", "urlparse", "urllib.parse"), - MovedAttribute("SplitResult", "urlparse", "urllib.parse"), - MovedAttribute("parse_qs", "urlparse", "urllib.parse"), - MovedAttribute("parse_qsl", "urlparse", "urllib.parse"), - MovedAttribute("urldefrag", "urlparse", "urllib.parse"), - MovedAttribute("urljoin", "urlparse", "urllib.parse"), - MovedAttribute("urlparse", "urlparse", "urllib.parse"), - MovedAttribute("urlsplit", "urlparse", "urllib.parse"), - MovedAttribute("urlunparse", "urlparse", "urllib.parse"), - MovedAttribute("urlunsplit", "urlparse", "urllib.parse"), - MovedAttribute("quote", "urllib", "urllib.parse"), - MovedAttribute("quote_plus", "urllib", "urllib.parse"), - MovedAttribute("unquote", "urllib", "urllib.parse"), - MovedAttribute("unquote_plus", "urllib", "urllib.parse"), - MovedAttribute("urlencode", "urllib", "urllib.parse"), - MovedAttribute("splitquery", "urllib", "urllib.parse"), - MovedAttribute("splittag", "urllib", "urllib.parse"), - MovedAttribute("splituser", "urllib", "urllib.parse"), - MovedAttribute("uses_fragment", "urlparse", "urllib.parse"), - MovedAttribute("uses_netloc", "urlparse", "urllib.parse"), - MovedAttribute("uses_params", "urlparse", "urllib.parse"), - MovedAttribute("uses_query", "urlparse", "urllib.parse"), - MovedAttribute("uses_relative", "urlparse", "urllib.parse"), -] -for attr in _urllib_parse_moved_attributes: - setattr(Module_six_moves_urllib_parse, attr.name, attr) -del attr - -Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes - -_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"), - "moves.urllib_parse", "moves.urllib.parse") - - -class Module_six_moves_urllib_error(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_error""" - - -_urllib_error_moved_attributes = [ - MovedAttribute("URLError", "urllib2", "urllib.error"), - MovedAttribute("HTTPError", "urllib2", "urllib.error"), - MovedAttribute("ContentTooShortError", "urllib", "urllib.error"), -] -for attr in _urllib_error_moved_attributes: - setattr(Module_six_moves_urllib_error, attr.name, attr) -del attr - -Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes - -_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"), - "moves.urllib_error", "moves.urllib.error") - - -class Module_six_moves_urllib_request(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_request""" - - -_urllib_request_moved_attributes = [ - MovedAttribute("urlopen", "urllib2", "urllib.request"), - MovedAttribute("install_opener", "urllib2", "urllib.request"), - MovedAttribute("build_opener", "urllib2", "urllib.request"), - MovedAttribute("pathname2url", "urllib", "urllib.request"), - MovedAttribute("url2pathname", "urllib", "urllib.request"), - MovedAttribute("getproxies", "urllib", "urllib.request"), - MovedAttribute("Request", "urllib2", "urllib.request"), - MovedAttribute("OpenerDirector", "urllib2", "urllib.request"), - MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"), - MovedAttribute("ProxyHandler", "urllib2", "urllib.request"), - MovedAttribute("BaseHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"), - MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"), - MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"), - MovedAttribute("FileHandler", "urllib2", "urllib.request"), - MovedAttribute("FTPHandler", "urllib2", "urllib.request"), - MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"), - MovedAttribute("UnknownHandler", "urllib2", "urllib.request"), - MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"), - MovedAttribute("urlretrieve", "urllib", "urllib.request"), - MovedAttribute("urlcleanup", "urllib", "urllib.request"), - MovedAttribute("URLopener", "urllib", "urllib.request"), - MovedAttribute("FancyURLopener", "urllib", "urllib.request"), - MovedAttribute("proxy_bypass", "urllib", "urllib.request"), -] -for attr in _urllib_request_moved_attributes: - setattr(Module_six_moves_urllib_request, attr.name, attr) -del attr - -Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes - -_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"), - "moves.urllib_request", "moves.urllib.request") - - -class Module_six_moves_urllib_response(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_response""" - - -_urllib_response_moved_attributes = [ - MovedAttribute("addbase", "urllib", "urllib.response"), - MovedAttribute("addclosehook", "urllib", "urllib.response"), - MovedAttribute("addinfo", "urllib", "urllib.response"), - MovedAttribute("addinfourl", "urllib", "urllib.response"), -] -for attr in _urllib_response_moved_attributes: - setattr(Module_six_moves_urllib_response, attr.name, attr) -del attr - -Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes - -_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"), - "moves.urllib_response", "moves.urllib.response") - - -class Module_six_moves_urllib_robotparser(_LazyModule): - - """Lazy loading of moved objects in six.moves.urllib_robotparser""" - - -_urllib_robotparser_moved_attributes = [ - MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"), -] -for attr in _urllib_robotparser_moved_attributes: - setattr(Module_six_moves_urllib_robotparser, attr.name, attr) -del attr - -Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes - -_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"), - "moves.urllib_robotparser", "moves.urllib.robotparser") - - -class Module_six_moves_urllib(types.ModuleType): - - """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" - __path__ = [] # mark as package - parse = _importer._get_module("moves.urllib_parse") - error = _importer._get_module("moves.urllib_error") - request = _importer._get_module("moves.urllib_request") - response = _importer._get_module("moves.urllib_response") - robotparser = _importer._get_module("moves.urllib_robotparser") - - def __dir__(self): - return ['parse', 'error', 'request', 'response', 'robotparser'] - -_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"), - "moves.urllib") - - -def add_move(move): - """Add an item to six.moves.""" - setattr(_MovedItems, move.name, move) - - -def remove_move(name): - """Remove item from six.moves.""" - try: - delattr(_MovedItems, name) - except AttributeError: - try: - del moves.__dict__[name] - except KeyError: - raise AttributeError("no such move, %r" % (name,)) - - -if PY3: - _meth_func = "__func__" - _meth_self = "__self__" - - _func_closure = "__closure__" - _func_code = "__code__" - _func_defaults = "__defaults__" - _func_globals = "__globals__" -else: - _meth_func = "im_func" - _meth_self = "im_self" - - _func_closure = "func_closure" - _func_code = "func_code" - _func_defaults = "func_defaults" - _func_globals = "func_globals" - - -try: - advance_iterator = next -except NameError: - def advance_iterator(it): - return it.next() -next = advance_iterator - - -try: - callable = callable -except NameError: - def callable(obj): - return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) - - -if PY3: - def get_unbound_function(unbound): - return unbound - - create_bound_method = types.MethodType - - def create_unbound_method(func, cls): - return func - - Iterator = object -else: - def get_unbound_function(unbound): - return unbound.im_func - - def create_bound_method(func, obj): - return types.MethodType(func, obj, obj.__class__) - - def create_unbound_method(func, cls): - return types.MethodType(func, None, cls) - - class Iterator(object): - - def next(self): - return type(self).__next__(self) - - callable = callable -_add_doc(get_unbound_function, - """Get the function out of a possibly unbound function""") - - -get_method_function = operator.attrgetter(_meth_func) -get_method_self = operator.attrgetter(_meth_self) -get_function_closure = operator.attrgetter(_func_closure) -get_function_code = operator.attrgetter(_func_code) -get_function_defaults = operator.attrgetter(_func_defaults) -get_function_globals = operator.attrgetter(_func_globals) - - -if PY3: - def iterkeys(d, **kw): - return iter(d.keys(**kw)) - - def itervalues(d, **kw): - return iter(d.values(**kw)) - - def iteritems(d, **kw): - return iter(d.items(**kw)) - - def iterlists(d, **kw): - return iter(d.lists(**kw)) - - viewkeys = operator.methodcaller("keys") - - viewvalues = operator.methodcaller("values") - - viewitems = operator.methodcaller("items") -else: - def iterkeys(d, **kw): - return d.iterkeys(**kw) - - def itervalues(d, **kw): - return d.itervalues(**kw) - - def iteritems(d, **kw): - return d.iteritems(**kw) - - def iterlists(d, **kw): - return d.iterlists(**kw) - - viewkeys = operator.methodcaller("viewkeys") - - viewvalues = operator.methodcaller("viewvalues") - - viewitems = operator.methodcaller("viewitems") - -_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.") -_add_doc(itervalues, "Return an iterator over the values of a dictionary.") -_add_doc(iteritems, - "Return an iterator over the (key, value) pairs of a dictionary.") -_add_doc(iterlists, - "Return an iterator over the (key, [values]) pairs of a dictionary.") - - -if PY3: - def b(s): - return s.encode("latin-1") - - def u(s): - return s - unichr = chr - import struct - int2byte = struct.Struct(">B").pack - del struct - byte2int = operator.itemgetter(0) - indexbytes = operator.getitem - iterbytes = iter - import io - StringIO = io.StringIO - BytesIO = io.BytesIO - _assertCountEqual = "assertCountEqual" - if sys.version_info[1] <= 1: - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" - else: - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" -else: - def b(s): - return s - # Workaround for standalone backslash - - def u(s): - return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") - unichr = unichr - int2byte = chr - - def byte2int(bs): - return ord(bs[0]) - - def indexbytes(buf, i): - return ord(buf[i]) - iterbytes = functools.partial(itertools.imap, ord) - import StringIO - StringIO = BytesIO = StringIO.StringIO - _assertCountEqual = "assertItemsEqual" - _assertRaisesRegex = "assertRaisesRegexp" - _assertRegex = "assertRegexpMatches" -_add_doc(b, """Byte literal""") -_add_doc(u, """Text literal""") - - -def assertCountEqual(self, *args, **kwargs): - return getattr(self, _assertCountEqual)(*args, **kwargs) - - -def assertRaisesRegex(self, *args, **kwargs): - return getattr(self, _assertRaisesRegex)(*args, **kwargs) - - -def assertRegex(self, *args, **kwargs): - return getattr(self, _assertRegex)(*args, **kwargs) - - -if PY3: - exec_ = getattr(moves.builtins, "exec") - - def reraise(tp, value, tb=None): - if value is None: - value = tp() - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - -else: - def exec_(_code_, _globs_=None, _locs_=None): - """Execute code in a namespace.""" - if _globs_ is None: - frame = sys._getframe(1) - _globs_ = frame.f_globals - if _locs_ is None: - _locs_ = frame.f_locals - del frame - elif _locs_ is None: - _locs_ = _globs_ - exec("""exec _code_ in _globs_, _locs_""") - - exec_("""def reraise(tp, value, tb=None): - raise tp, value, tb -""") - - -if sys.version_info[:2] == (3, 2): - exec_("""def raise_from(value, from_value): - if from_value is None: - raise value - raise value from from_value -""") -elif sys.version_info[:2] > (3, 2): - exec_("""def raise_from(value, from_value): - raise value from from_value -""") -else: - def raise_from(value, from_value): - raise value - - -print_ = getattr(moves.builtins, "print", None) -if print_ is None: - def print_(*args, **kwargs): - """The new-style print function for Python 2.4 and 2.5.""" - fp = kwargs.pop("file", sys.stdout) - if fp is None: - return - - def write(data): - if not isinstance(data, basestring): - data = str(data) - # If the file has an encoding, encode unicode with it. - if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): - errors = getattr(fp, "errors", None) - if errors is None: - errors = "strict" - data = data.encode(fp.encoding, errors) - fp.write(data) - want_unicode = False - sep = kwargs.pop("sep", None) - if sep is not None: - if isinstance(sep, unicode): - want_unicode = True - elif not isinstance(sep, str): - raise TypeError("sep must be None or a string") - end = kwargs.pop("end", None) - if end is not None: - if isinstance(end, unicode): - want_unicode = True - elif not isinstance(end, str): - raise TypeError("end must be None or a string") - if kwargs: - raise TypeError("invalid keyword arguments to print()") - if not want_unicode: - for arg in args: - if isinstance(arg, unicode): - want_unicode = True - break - if want_unicode: - newline = unicode("\n") - space = unicode(" ") - else: - newline = "\n" - space = " " - if sep is None: - sep = space - if end is None: - end = newline - for i, arg in enumerate(args): - if i: - write(sep) - write(arg) - write(end) -if sys.version_info[:2] < (3, 3): - _print = print_ - - def print_(*args, **kwargs): - fp = kwargs.get("file", sys.stdout) - flush = kwargs.pop("flush", False) - _print(*args, **kwargs) - if flush and fp is not None: - fp.flush() - -_add_doc(reraise, """Reraise an exception.""") - -if sys.version_info[0:2] < (3, 4): - def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, - updated=functools.WRAPPER_UPDATES): - def wrapper(f): - f = functools.wraps(wrapped, assigned, updated)(f) - f.__wrapped__ = wrapped - return f - return wrapper -else: - wraps = functools.wraps - - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a dummy - # metaclass for one level of class instantiation that replaces itself with - # the actual metaclass. - class metaclass(meta): - - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - - -def python_2_unicode_compatible(klass): - """ - A decorator that defines __unicode__ and __str__ methods under Python 2. - Under Python 3 it does nothing. - - To support Python 2 and 3 with a single code base, define a __str__ method - returning text and apply this decorator to the class. - """ - if PY2: - if '__str__' not in klass.__dict__: - raise ValueError("@python_2_unicode_compatible cannot be applied " - "to %s because it doesn't define __str__()." % - klass.__name__) - klass.__unicode__ = klass.__str__ - klass.__str__ = lambda self: self.__unicode__().encode('utf-8') - return klass - - -# Complete the moves implementation. -# This code is at the end of this module to speed up module loading. -# Turn this module into a package. -__path__ = [] # required for PEP 302 and PEP 451 -__package__ = __name__ # see PEP 366 @ReservedAssignment -if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable -# Remove other six meta path importers, since they cause problems. This can -# happen if six is removed from sys.modules and then reloaded. (Setuptools does -# this for some reason.) -if sys.meta_path: - for i, importer in enumerate(sys.meta_path): - # Here's some real nastiness: Another "instance" of the six module might - # be floating around. Therefore, we can't use isinstance() to check for - # the six meta path importer, since the other six instance will have - # inserted an importer with different class. - if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): - del sys.meta_path[i] - break - del i, importer -# Finally, add the importer to the meta path import hook. -sys.meta_path.append(_importer) diff --git a/setuptools/_vendor/vendored.txt b/setuptools/_vendor/vendored.txt index 288d077096..b1190436bc 100644 --- a/setuptools/_vendor/vendored.txt +++ b/setuptools/_vendor/vendored.txt @@ -1,4 +1,3 @@ packaging==20.4 pyparsing==2.2.1 -six==1.10.0 ordered-set==3.1.1 From 675d32ff667e90d239c95359007a58cb3aa88a97 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 16 Aug 2020 11:25:02 -0400 Subject: [PATCH 8116/8469] Remove six from 'extern' as vendored. --- pkg_resources/extern/__init__.py | 2 +- setuptools/extern/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index bf98d8f296..4dc3beb2fa 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -62,5 +62,5 @@ def install(self): sys.meta_path.append(self) -names = 'packaging', 'pyparsing', 'six', 'appdirs' +names = 'packaging', 'pyparsing', 'appdirs' VendorImporter(__name__, names).install() diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 4e79aa17ec..b7f30dc2e3 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -62,5 +62,5 @@ def install(self): sys.meta_path.append(self) -names = 'six', 'packaging', 'pyparsing', 'ordered_set', +names = 'packaging', 'pyparsing', 'ordered_set', VendorImporter(__name__, names, 'setuptools._vendor').install() From 8bebc79282083d7b914069693bd0098a1394198a Mon Sep 17 00:00:00 2001 From: Aren Cambre Date: Sun, 16 Aug 2020 12:29:14 -0500 Subject: [PATCH 8117/8469] pypa/setuptools#2302 --- setuptools/msvc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 24ea0863a6..006a5c11dd 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -338,7 +338,7 @@ def _augment_exception(exc, version, arch=''): if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed - tmpl = 'Microsoft Visual C++ {version:0.1f} is required.' + tmpl = 'Microsoft Visual C++ {version:0.1f} or greater is required.' message = tmpl.format(**locals()) msdownload = 'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: @@ -358,8 +358,8 @@ def _augment_exception(exc, version, arch=''): message += msdownload % 8279 elif version >= 14.0: # For VC++ 14.X Redirect user to latest Visual C++ Build Tools - message += (' Get it with "Build Tools for Visual Studio": ' - r'https://visualstudio.microsoft.com/downloads/') + message += (' Get it with "Microsoft C++ Build Tools": ' + r'https://visualstudio.microsoft.com/visual-cpp-build-tools/') exc.args = (message, ) From 023cf32a1adfb3b100800f613f5e0cf01dd76c2d Mon Sep 17 00:00:00 2001 From: Aren Cambre Date: Sun, 16 Aug 2020 12:29:14 -0500 Subject: [PATCH 8118/8469] pypa/setuptools#2302 --- setuptools/msvc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 24ea0863a6..1ead72b421 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -338,7 +338,7 @@ def _augment_exception(exc, version, arch=''): if "vcvarsall" in message.lower() or "visual c" in message.lower(): # Special error message if MSVC++ not installed - tmpl = 'Microsoft Visual C++ {version:0.1f} is required.' + tmpl = 'Microsoft Visual C++ {version:0.1f} or greater is required.' message = tmpl.format(**locals()) msdownload = 'www.microsoft.com/download/details.aspx?id=%d' if version == 9.0: @@ -358,8 +358,9 @@ def _augment_exception(exc, version, arch=''): message += msdownload % 8279 elif version >= 14.0: # For VC++ 14.X Redirect user to latest Visual C++ Build Tools - message += (' Get it with "Build Tools for Visual Studio": ' - r'https://visualstudio.microsoft.com/downloads/') + message += (' Get it with "Microsoft C++ Build Tools": ' + r'https://visualstudio.microsoft.com' + r'/visual-cpp-build-tools/') exc.args = (message, ) From 48f728282213311d66f8863a77ee7bafb84cf26c Mon Sep 17 00:00:00 2001 From: Aren Cambre Date: Sun, 16 Aug 2020 14:11:10 -0500 Subject: [PATCH 8119/8469] Add changelog text for pypa/setuptools#2302 --- changelog.d/2334.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2334.change.rst diff --git a/changelog.d/2334.change.rst b/changelog.d/2334.change.rst new file mode 100644 index 0000000000..0da381b4ab --- /dev/null +++ b/changelog.d/2334.change.rst @@ -0,0 +1 @@ +Update text in error message. \ No newline at end of file From 84f1ba0d3c9a4125f1546d98fd44cd5d884e8af8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 18 Aug 2020 21:26:03 -0400 Subject: [PATCH 8120/8469] Update changelog. --- changelog.d/2334.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2334.change.rst b/changelog.d/2334.change.rst index 0da381b4ab..9d3c74403f 100644 --- a/changelog.d/2334.change.rst +++ b/changelog.d/2334.change.rst @@ -1 +1 @@ -Update text in error message. \ No newline at end of file +In MSVC module, refine text in error message. From 04e3df22df840c6bb244e9b27bc56750c44b7c85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 20 Aug 2020 21:41:17 -0400 Subject: [PATCH 8121/8469] =?UTF-8?q?Bump=20version:=2049.6.0=20=E2=86=92?= =?UTF-8?q?=2050.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/2232.breaking.rst | 1 - changelog.d/2334.change.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/2232.breaking.rst delete mode 100644 changelog.d/2334.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4bbe60c466..a50c3badbf 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.6.0 +current_version = 50.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2d49707b23..9dd77e12fb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v50.0.0 +------- + +* #2232: Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. +* #2334: In MSVC module, refine text in error message. + + v49.6.0 ------- diff --git a/changelog.d/2232.breaking.rst b/changelog.d/2232.breaking.rst deleted file mode 100644 index b2fd926fe8..0000000000 --- a/changelog.d/2232.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. diff --git a/changelog.d/2334.change.rst b/changelog.d/2334.change.rst deleted file mode 100644 index 9d3c74403f..0000000000 --- a/changelog.d/2334.change.rst +++ /dev/null @@ -1 +0,0 @@ -In MSVC module, refine text in error message. diff --git a/setup.cfg b/setup.cfg index b058fa8671..577e23c135 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.6.0 +version = 50.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 17cb9d6bf249cefe653d3bdb712582409035a7db Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 30 Aug 2020 14:54:21 -0400 Subject: [PATCH 8122/8469] Create Github releases when releasing. Fixes #2328. --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index 557c8d5acd..535b67d3b9 100644 --- a/tox.ini +++ b/tox.ini @@ -66,9 +66,11 @@ deps = wheel twine[keyring]>=1.13 path + jaraco.develop>=7.1 jaraco.tidelift passenv = TWINE_PASSWORD + GITHUB_TOKEN TIDELIFT_TOKEN setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} @@ -77,4 +79,5 @@ commands = python -c "import path; path.Path('dist').rmtree_p()" python setup.py release python -m twine upload dist/* + python -m jaraco.develop.create-github-release python -m jaraco.tidelift.publish-release-notes From db20067e06d0463c0e071113b981cf5a08082f79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Aug 2020 19:13:43 -0400 Subject: [PATCH 8123/8469] Supply ModuleNotFoundError for Python 3.5. --- distutils/tests/py38compat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distutils/tests/py38compat.py b/distutils/tests/py38compat.py index 46ff575892..32269c7b93 100644 --- a/distutils/tests/py38compat.py +++ b/distutils/tests/py38compat.py @@ -1,6 +1,9 @@ # flake8: noqa import contextlib +import builtins + +ModuleNotFoundError = getattr(builtins, 'ModuleNotFoundError', ImportError) try: from test.support.warnings_helper import check_warnings From 467915b93d3965a7bad42a4e3ec6ce49843f874b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Aug 2020 20:51:18 -0400 Subject: [PATCH 8124/8469] Restore compatibility with aix_support on Python 3.8 and earlier. Fixes pypa/setuptools#2358. --- distutils/py38compat.py | 7 +++++++ distutils/util.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 distutils/py38compat.py diff --git a/distutils/py38compat.py b/distutils/py38compat.py new file mode 100644 index 0000000000..fa9ba73f42 --- /dev/null +++ b/distutils/py38compat.py @@ -0,0 +1,7 @@ +def aix_platform(osname, version, release): + try: + import _aix_support + return _aix_support.aix_platform() + except ImportError: + pass + return "%s-%s.%s" % (osname, version, release) diff --git a/distutils/util.py b/distutils/util.py index 4b002ecef1..9d6c5cbdec 100644 --- a/distutils/util.py +++ b/distutils/util.py @@ -79,8 +79,8 @@ def get_host_platform(): machine += ".%s" % bitness[sys.maxsize] # fall through to standard osname-release-machine representation elif osname[:3] == "aix": - from _aix_support import aix_platform - return aix_platform() + from .py38compat import aix_platform + return aix_platform(osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" rel_re = re.compile (r'[\d.]+', re.ASCII) From ae27e13a663cc53d15632e884f7b4d601a8605dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 31 Aug 2020 21:09:14 -0400 Subject: [PATCH 8125/8469] Supply a copy of _optim_args_from_interpreter_flags for Python 3.5 compatibility. Ref pypa/setuptools#2357. --- distutils/py35compat.py | 19 +++++++++++++++++++ distutils/util.py | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 distutils/py35compat.py diff --git a/distutils/py35compat.py b/distutils/py35compat.py new file mode 100644 index 0000000000..79b2e7f38c --- /dev/null +++ b/distutils/py35compat.py @@ -0,0 +1,19 @@ +import sys +import subprocess + + +def __optim_args_from_interpreter_flags(): + """Return a list of command-line arguments reproducing the current + optimization settings in sys.flags.""" + args = [] + value = sys.flags.optimize + if value > 0: + args.append("-" + "O" * value) + return args + + +_optim_args_from_interpreter_flags = getattr( + subprocess, + "_optim_args_from_interpreter_flags", + __optim_args_from_interpreter_flags, +) diff --git a/distutils/util.py b/distutils/util.py index 9d6c5cbdec..f5aca79421 100644 --- a/distutils/util.py +++ b/distutils/util.py @@ -14,6 +14,8 @@ from distutils.spawn import spawn from distutils import log from distutils.errors import DistutilsByteCompileError +from .py35compat import _optim_args_from_interpreter_flags + def get_host_platform(): """Return a string that identifies the current platform. This is used mainly to @@ -420,7 +422,7 @@ def byte_compile (py_files, """ % (optimize, force, prefix, base_dir, verbose)) cmd = [sys.executable] - cmd.extend(subprocess._optim_args_from_interpreter_flags()) + cmd.extend(_optim_args_from_interpreter_flags()) cmd.append(script_name) spawn(cmd, dry_run=dry_run) execute(os.remove, (script_name,), "removing %s" % script_name, From c3a4de7868e89f4a745b911dae888dfff245abd2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 08:59:35 -0400 Subject: [PATCH 8126/8469] Doctest modules for valid syntax, capturing TabError. --- conftest.py | 11 +++++++++++ pytest.ini | 1 + 2 files changed, 12 insertions(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000000..c0b1040000 --- /dev/null +++ b/conftest.py @@ -0,0 +1,11 @@ +import platform + + +collect_ignore = [] + + +if platform.system() != 'Windows': + collect_ignore.extend([ + 'distutils/command/bdist_msi.py', + 'distutils/msvc9compiler.py', + ]) diff --git a/pytest.ini b/pytest.ini index 3e01b43900..b305356b33 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] +addopts=--doctest-modules filterwarnings= # acknowledge that TestDistribution isn't a test ignore:cannot collect test class 'TestDistribution' From 208fa0103be6d459272de91f17c709973a68ac68 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 09:07:21 -0400 Subject: [PATCH 8127/8469] Fix TabError --- distutils/py38compat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distutils/py38compat.py b/distutils/py38compat.py index fa9ba73f42..7dbe8cef54 100644 --- a/distutils/py38compat.py +++ b/distutils/py38compat.py @@ -1,7 +1,7 @@ def aix_platform(osname, version, release): - try: + try: import _aix_support - return _aix_support.aix_platform() - except ImportError: - pass + return _aix_support.aix_platform() + except ImportError: + pass return "%s-%s.%s" % (osname, version, release) From df8c341bacb103e085d6714bf9778f008a56cb04 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 31 Aug 2020 18:16:41 +0200 Subject: [PATCH 8128/8469] Add Python 3.10 support to _distutils_hack Get the 'Loader' abstract class from importlib.abc rather than importlib.util.abc (alias removed in Python 3.10). --- _distutils_hack/__init__.py | 3 ++- changelog.d/2361.change.rst | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2361.change.rst diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 074bd5e9c8..b8410e1fc8 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -74,9 +74,10 @@ def find_spec(self, fullname, path, target=None): return method() def spec_for_distutils(self): + import importlib.abc import importlib.util - class DistutilsLoader(importlib.util.abc.Loader): + class DistutilsLoader(importlib.abc.Loader): def create_module(self, spec): return importlib.import_module('._distutils', 'setuptools') diff --git a/changelog.d/2361.change.rst b/changelog.d/2361.change.rst new file mode 100644 index 0000000000..6db769c452 --- /dev/null +++ b/changelog.d/2361.change.rst @@ -0,0 +1,3 @@ +Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class +from importlib.abc rather than importlib.util.abc (alias removed in Python +3.10). From d7bc92579bdbfabe4c452b7f29eb45470678deb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 11:30:59 -0400 Subject: [PATCH 8129/8469] Update changelog. Ref #2358. --- changelog.d/2358.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2358.misc.rst diff --git a/changelog.d/2358.misc.rst b/changelog.d/2358.misc.rst new file mode 100644 index 0000000000..89cec8bf7d --- /dev/null +++ b/changelog.d/2358.misc.rst @@ -0,0 +1 @@ +Restored AIX support on Python 3.8 and earlier. From 6783f66441f03b61d5d1035fb0f0374db2c89cfd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 11:31:33 -0400 Subject: [PATCH 8130/8469] Bugfix is 'misc'. Ref #2361. --- changelog.d/{2361.change.rst => 2361.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2361.change.rst => 2361.misc.rst} (100%) diff --git a/changelog.d/2361.change.rst b/changelog.d/2361.misc.rst similarity index 100% rename from changelog.d/2361.change.rst rename to changelog.d/2361.misc.rst From 4ea9dd875488dd0c9f2773ad21aeda4f73d93b23 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 12:13:14 -0400 Subject: [PATCH 8131/8469] Update changelog. Closes #2357. --- changelog.d/2357.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2357.misc.rst diff --git a/changelog.d/2357.misc.rst b/changelog.d/2357.misc.rst new file mode 100644 index 0000000000..a7b3cc3c65 --- /dev/null +++ b/changelog.d/2357.misc.rst @@ -0,0 +1 @@ +Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`. From db378e28cc70ec4ed3c21dfbd255c9ea54a861c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 13:32:50 -0400 Subject: [PATCH 8132/8469] =?UTF-8?q?Bump=20version:=2050.0.0=20=E2=86=92?= =?UTF-8?q?=2050.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ changelog.d/2357.misc.rst | 1 - changelog.d/2358.misc.rst | 1 - changelog.d/2361.misc.rst | 3 --- setup.cfg | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 changelog.d/2357.misc.rst delete mode 100644 changelog.d/2358.misc.rst delete mode 100644 changelog.d/2361.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a50c3badbf..ebb58d3b1c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.0.0 +current_version = 50.0.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 9dd77e12fb..0082b7f30b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v50.0.1 +------- + +* #2357: Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`. +* #2358: Restored AIX support on Python 3.8 and earlier. +* #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class + from importlib.abc rather than importlib.util.abc (alias removed in Python + 3.10). + + v50.0.0 ------- diff --git a/changelog.d/2357.misc.rst b/changelog.d/2357.misc.rst deleted file mode 100644 index a7b3cc3c65..0000000000 --- a/changelog.d/2357.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`. diff --git a/changelog.d/2358.misc.rst b/changelog.d/2358.misc.rst deleted file mode 100644 index 89cec8bf7d..0000000000 --- a/changelog.d/2358.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restored AIX support on Python 3.8 and earlier. diff --git a/changelog.d/2361.misc.rst b/changelog.d/2361.misc.rst deleted file mode 100644 index 6db769c452..0000000000 --- a/changelog.d/2361.misc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class -from importlib.abc rather than importlib.util.abc (alias removed in Python -3.10). diff --git a/setup.cfg b/setup.cfg index 577e23c135..71839ef1d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.0.0 +version = 50.0.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From a3319a388913facb5b9236c938ba9adabd5b9fdd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 16:58:40 -0400 Subject: [PATCH 8133/8469] In distutils hack, use absolute import rather than relative to avoid bpo-30876. Fixes #2352. --- _distutils_hack/__init__.py | 2 +- changelog.d/2352.misc.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2352.misc.rst diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index b8410e1fc8..2bc6df7ac7 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -80,7 +80,7 @@ def spec_for_distutils(self): class DistutilsLoader(importlib.abc.Loader): def create_module(self, spec): - return importlib.import_module('._distutils', 'setuptools') + return importlib.import_module('setuptools._distutils') def exec_module(self, module): pass diff --git a/changelog.d/2352.misc.rst b/changelog.d/2352.misc.rst new file mode 100644 index 0000000000..79dda996fe --- /dev/null +++ b/changelog.d/2352.misc.rst @@ -0,0 +1 @@ +In distutils hack, use absolute import rather than relative to avoid bpo-30876. From edcf84faaf17e87e6e38796dd24f66d9236bf87c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 18:18:26 -0400 Subject: [PATCH 8134/8469] =?UTF-8?q?Bump=20version:=2050.0.1=20=E2=86=92?= =?UTF-8?q?=2050.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2352.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2352.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ebb58d3b1c..e2973162e8 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.0.1 +current_version = 50.0.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 0082b7f30b..435a7b4699 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v50.0.2 +------- + +* #2352: In distutils hack, use absolute import rather than relative to avoid bpo-30876. + + v50.0.1 ------- diff --git a/changelog.d/2352.misc.rst b/changelog.d/2352.misc.rst deleted file mode 100644 index 79dda996fe..0000000000 --- a/changelog.d/2352.misc.rst +++ /dev/null @@ -1 +0,0 @@ -In distutils hack, use absolute import rather than relative to avoid bpo-30876. diff --git a/setup.cfg b/setup.cfg index 71839ef1d7..0101bb8683 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.0.1 +version = 50.0.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 608988196d608f913398fc8853cfb797d2a1b63d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 19:14:22 -0400 Subject: [PATCH 8135/8469] Support 'bpo-' prefix on Python bugs --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b92b50cccf..20800e7174 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,7 +101,7 @@ url='http://bugs.jython.org/issue{jython}', ), dict( - pattern=r'Python #(?P\d+)', + pattern=r'(Python #|bpo-)(?P\d+)', url='http://bugs.python.org/issue{python}', ), dict( From 97a8f11a8a039fc0de04a31d281715f1ce6ea4bc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 21:18:01 -0400 Subject: [PATCH 8136/8469] Restore pythonlib support on older Pythons. Fixes pypa/distutils#9. --- distutils/command/build_ext.py | 3 ++- distutils/command/py37compat.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 distutils/command/py37compat.py diff --git a/distutils/command/build_ext.py b/distutils/command/build_ext.py index 1a9bd1200f..bbb348331b 100644 --- a/distutils/command/build_ext.py +++ b/distutils/command/build_ext.py @@ -16,6 +16,7 @@ from distutils.extension import Extension from distutils.util import get_platform from distutils import log +from . import py37compat from site import USER_BASE @@ -751,4 +752,4 @@ def get_libraries(self, ext): ldversion = get_config_var('LDVERSION') return ext.libraries + ['python' + ldversion] - return ext.libraries + return ext.libraries + py37compat.pythonlib() diff --git a/distutils/command/py37compat.py b/distutils/command/py37compat.py new file mode 100644 index 0000000000..754715a508 --- /dev/null +++ b/distutils/command/py37compat.py @@ -0,0 +1,30 @@ +import sys + + +def _pythonlib_compat(): + """ + On Python 3.7 and earlier, distutils would include the Python + library. See pypa/distutils#9. + """ + from distutils import sysconfig + if not sysconfig.get_config_var('Py_ENABLED_SHARED'): + return + + yield 'python{}.{}{}'.format( + sys.hexversion >> 24, + (sys.hexversion >> 16) & 0xff, + sysconfig.get_config_var('ABIFLAGS'), + ) + + +def compose(f1, f2): + return lambda *args, **kwargs: f1(f2(*args, **kwargs)) + + +pythonlib = ( + compose(list, _pythonlib_compat) + if sys.version_info < (3, 8) + and sys.platform != 'darwin' + and sys.platform[:3] != 'aix' + else list +) From 837fa5cd58e927953183e750d0c429a5e871865f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 21:35:43 -0400 Subject: [PATCH 8137/8469] No longer try to track package changes separately. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e619264d29..4d9dea513c 100644 --- a/README.rst +++ b/README.rst @@ -37,4 +37,4 @@ From the CPython repo, cherry-pick the changes from this project. To Setuptools ------------- -This project also maintains a `clean branch `_ to capture only the code changes to distutils, excluding the ancillary details like packaging and this document. +Simply merge the changes directly into setuptools' repo. From d2e529896bcde20559da3fa2c01e825d218fdb18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 21:46:51 -0400 Subject: [PATCH 8138/8469] Add links for distutils --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 20800e7174..12520586cd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -128,6 +128,10 @@ pattern=r'setuptools_svn #(?P\d+)', url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}', ), + dict( + pattern=r'pypa/distutils#(?P\d+)', + url='{GH}/pypa/distutils/issues/{distutils}', + ), dict( pattern=r'^(?m)((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n', with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', From 400b71c9b932893ab97dd6368ae7bfb822064a87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 21:47:04 -0400 Subject: [PATCH 8139/8469] =?UTF-8?q?Bump=20version:=2050.0.2=20=E2=86=92?= =?UTF-8?q?=2050.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2363.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2363.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e2973162e8..e85c79bbc6 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.0.2 +current_version = 50.0.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 435a7b4699..8f192618c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v50.0.3 +------- + +* #2363: Restore link_libpython support on Python 3.7 and earlier (see pypa/distutils#9). + + v50.0.2 ------- diff --git a/changelog.d/2363.misc.rst b/changelog.d/2363.misc.rst deleted file mode 100644 index 3ac5d9cea8..0000000000 --- a/changelog.d/2363.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restore link_libpython support on Python 3.7 and earlier (see pypa/distutils#9). diff --git a/setup.cfg b/setup.cfg index 0101bb8683..7236ae40f7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.0.2 +version = 50.0.3 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 8eb9efac24a5bd7f964f6f09d142576f1b4a9e07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 1 Sep 2020 21:59:49 -0400 Subject: [PATCH 8140/8469] Ensure GITHUB_TOKEN is set. Closes #2328. --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ee772682ab..4567b9b043 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,6 +76,7 @@ stages: env: TWINE_PASSWORD: $(PyPI-token) TIDELIFT_TOKEN: $(Tidelift-token) + GITHUB_TOKEN: $(Github-token) displayName: 'publish to PyPI' condition: contains(variables['Build.SourceBranch'], 'tags') From c0085e87c69629ec3cf24dfce887c0fb93fa80dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Sep 2020 17:41:38 -0400 Subject: [PATCH 8141/8469] Make stdlib distutils the default again. Stop the burning. Ref #2350 and others. --- _distutils_hack/__init__.py | 2 +- changelog.d/2350.change.rst | 1 + setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/2350.change.rst diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 2bc6df7ac7..3325817bca 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -37,7 +37,7 @@ def enabled(): """ Allow selection of distutils by environment variable. """ - which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local') + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') return which == 'local' diff --git a/changelog.d/2350.change.rst b/changelog.d/2350.change.rst new file mode 100644 index 0000000000..c06930e61f --- /dev/null +++ b/changelog.d/2350.change.rst @@ -0,0 +1 @@ +Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment. diff --git a/setup.py b/setup.py index 34654e19fc..2bd48daa67 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ class install_with_pth(install): _pth_contents = textwrap.dedent(""" import os var = 'SETUPTOOLS_USE_DISTUTILS' - enabled = os.environ.get(var, 'local') == 'local' + enabled = os.environ.get(var, 'stdlib') == 'local' enabled and __import__('_distutils_hack').add_shim() """).lstrip().replace('\n', '; ') From 9e7261b46e42591218ef3e5b6630ab5e2ea13adc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Sep 2020 19:27:44 -0400 Subject: [PATCH 8142/8469] Update tests to specify local or stdlib for stability under default value. --- setuptools/tests/test_distutils_adoption.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index 8edd3f9b44..a53773df8c 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -56,7 +56,8 @@ def test_distutils_local_with_setuptools(venv): """ Ensure local distutils is used when appropriate. """ - loc = find_distutils(venv, imports='setuptools, distutils', env=dict()) + env = dict(SETUPTOOLS_USE_DISTUTILS='local') + loc = find_distutils(venv, imports='setuptools, distutils', env=env) assert venv.name in loc.split(os.sep) @@ -66,4 +67,5 @@ def test_distutils_local(venv): Even without importing, the setuptools-local copy of distutils is preferred. """ - assert venv.name in find_distutils(venv, env=dict()).split(os.sep) + env = dict(SETUPTOOLS_USE_DISTUTILS='local') + assert venv.name in find_distutils(venv, env=env).split(os.sep) From 4c29a5122247f0461a9e44ff8484159c563935c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 2 Sep 2020 20:49:25 -0400 Subject: [PATCH 8143/8469] =?UTF-8?q?Bump=20version:=2050.0.3=20=E2=86=92?= =?UTF-8?q?=2050.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2350.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2350.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e85c79bbc6..34b34fde91 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.0.3 +current_version = 50.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 8f192618c7..a00d827191 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v50.1.0 +------- + +* #2350: Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment. + + v50.0.3 ------- diff --git a/changelog.d/2350.change.rst b/changelog.d/2350.change.rst deleted file mode 100644 index c06930e61f..0000000000 --- a/changelog.d/2350.change.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment. diff --git a/setup.cfg b/setup.cfg index 7236ae40f7..692eb1fe88 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.0.3 +version = 50.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 74febd272d911a1105501fa7b9518fd9143ae3ed Mon Sep 17 00:00:00 2001 From: Eshant Gupta Date: Thu, 3 Sep 2020 23:32:00 +0530 Subject: [PATCH 8144/8469] Adding changes to support PPC64LE --- .travis.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e636eecc4..2557c96f8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,20 +16,51 @@ jobs: - python: 3.9-dev - <<: *latest_py3 env: TOXENV=docs + #PPC64LE + - arch: ppc64le + python: pypy3 + - arch: ppc64le + python: 3.5 + - arch: ppc64le + python: 3.6 + - arch: ppc64le + python: 3.7 + - &latest_py3_ppc + arch: ppc64le + python: 3.8 + - <<: *latest_py3_ppc + env: LANG=C + - arch: ppc64le + python: 3.8-dev + - arch: ppc64le + python: 3.9-dev + - <<: *latest_py3_ppc + env: TOXENV=docs allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 + - arch: ppc64le + python: pypy3 - <<: *latest_py3 env: TOXENV=docs + - <<: *latest_py3_ppc + env: TOXENV=docs + cache: pip +before_install: + - | + if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then + sudo chown -Rfv $USER:$GROUP ~/.cache/pip/wheels + fi + install: # ensure we have recent pip/setuptools/wheel - pip install --disable-pip-version-check --upgrade pip setuptools wheel -# need tox to get started - pip install --upgrade tox tox-venv +# need tox to get started # Output the env, to verify behavior - pip freeze --all From c9ec9537049a63c83bd9b8470cfcabd605ab4d58 Mon Sep 17 00:00:00 2001 From: Eshant Gupta Date: Fri, 4 Sep 2020 12:17:12 +0530 Subject: [PATCH 8145/8469] Adding comments Restoring mis-placed comment, added comment for PPC64LE specific permission fix and reduced number of jobs for the same platform. --- .travis.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2557c96f8d..d6e0e5563a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,17 +21,11 @@ jobs: python: pypy3 - arch: ppc64le python: 3.5 - - arch: ppc64le - python: 3.6 - - arch: ppc64le - python: 3.7 - &latest_py3_ppc arch: ppc64le python: 3.8 - <<: *latest_py3_ppc env: LANG=C - - arch: ppc64le - python: 3.8-dev - arch: ppc64le python: 3.9-dev - <<: *latest_py3_ppc @@ -50,6 +44,8 @@ jobs: cache: pip before_install: +# Fix for PPC64LE, where permissions are fixed to allow tox/pip to install packages. +# As travis base images for PPC64LE except for bionic, do not have this fix. - | if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then sudo chown -Rfv $USER:$GROUP ~/.cache/pip/wheels @@ -59,8 +55,8 @@ install: # ensure we have recent pip/setuptools/wheel - pip install --disable-pip-version-check --upgrade pip setuptools wheel -- pip install --upgrade tox tox-venv # need tox to get started +- pip install --upgrade tox tox-venv # Output the env, to verify behavior - pip freeze --all From 9a7710b1ef1bef6c3d8ad6427e87ee886860b40e Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Sun, 30 Aug 2020 12:34:59 +0200 Subject: [PATCH 8146/8469] Reduce size of setuptools' bdist_rpm._make_spec_file There are some setuptools specific changes in the bdist_rpm module that are no longer needed, because the upstream/shipped version of distutils already contains them. The code that is removed in this commit from bdist_rpm is already part of the python-3.5 version of distutils. Related: #2377 --- changelog.d/2380.change.rst | 4 ++++ setuptools/command/bdist_rpm.py | 14 +------------- 2 files changed, 5 insertions(+), 13 deletions(-) create mode 100644 changelog.d/2380.change.rst diff --git a/changelog.d/2380.change.rst b/changelog.d/2380.change.rst new file mode 100644 index 0000000000..e68d108077 --- /dev/null +++ b/changelog.d/2380.change.rst @@ -0,0 +1,4 @@ +There are some setuptools specific changes in the +`setuptools.command.bdist_rpm` module that are no longer needed, because +they are part of the `bdist_rpm` module in distutils in Python +3.5.0. Therefore, code was removed from `setuptools.command.bdist_rpm`. \ No newline at end of file diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py index 70730927ec..0eb1b9c254 100644 --- a/setuptools/command/bdist_rpm.py +++ b/setuptools/command/bdist_rpm.py @@ -8,8 +8,6 @@ class bdist_rpm(orig.bdist_rpm): 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs in RPM distributions. - 3. Replace dash with underscore in the version numbers for better RPM - compatibility. """ def run(self): @@ -19,25 +17,15 @@ def run(self): orig.bdist_rpm.run(self) def _make_spec_file(self): - version = self.distribution.get_version() - rpmversion = version.replace('-', '_') spec = orig.bdist_rpm._make_spec_file(self) - line23 = '%define version ' + version - line24 = '%define version ' + rpmversion spec = [ line.replace( - "Source0: %{name}-%{version}.tar", - "Source0: %{name}-%{unmangled_version}.tar" - ).replace( "setup.py install ", "setup.py install --single-version-externally-managed " ).replace( "%setup", "%setup -n %{name}-%{unmangled_version}" - ).replace(line23, line24) + ) for line in spec ] - insert_loc = spec.index(line24) + 1 - unmangled_version = "%define unmangled_version " + version - spec.insert(insert_loc, unmangled_version) return spec From a60ba76395353974f5bb51ad1c117d7239ed5032 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Sep 2020 08:59:40 -0400 Subject: [PATCH 8147/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _distutils_hack/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 3325817bca..504c4ac0d8 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -20,8 +20,8 @@ def warn_distutils_present(): "also replaces the `distutils` module in `sys.modules`. This may lead " "to undesirable behaviors or errors. To avoid these issues, avoid " "using distutils directly, ensure that setuptools is installed in the " - "traditional way (e.g. not an editable install), and/or make sure that " - "setuptools is always imported before distutils.") + "traditional way (e.g. not an editable install), and/or make sure " + "that setuptools is always imported before distutils.") def clear_distutils(): From 7c07fec3f02093bf048a1192473ab0736211e47e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Sep 2020 09:29:21 -0400 Subject: [PATCH 8148/8469] When pip is imported as part of a build, leave distutils patched. Fixes #2355. --- _distutils_hack/__init__.py | 13 +++++++++++++ changelog.d/2355.change.rst | 1 + 2 files changed, 14 insertions(+) create mode 100644 changelog.d/2355.change.rst diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index 504c4ac0d8..c31edfed17 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -92,9 +92,22 @@ def spec_for_pip(self): Ensure stdlib distutils when running under pip. See pypa/pip#8761 for rationale. """ + if self.pip_imported_during_build(): + return clear_distutils() self.spec_for_distutils = lambda: None + @staticmethod + def pip_imported_during_build(): + """ + Detect if pip is being imported in a build script. Ref #2355. + """ + import traceback + return any( + frame.f_globals['__file__'].endswith('setup.py') + for frame, line in traceback.walk_stack(None) + ) + DISTUTILS_FINDER = DistutilsMetaFinder() diff --git a/changelog.d/2355.change.rst b/changelog.d/2355.change.rst new file mode 100644 index 0000000000..d17435f55f --- /dev/null +++ b/changelog.d/2355.change.rst @@ -0,0 +1 @@ +When pip is imported as part of a build, leave distutils patched. From 03d36b9edb53e266a0b4b836e1e3178f989a0781 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 4 Sep 2020 10:02:11 -0400 Subject: [PATCH 8149/8469] =?UTF-8?q?Bump=20version:=2050.1.0=20=E2=86=92?= =?UTF-8?q?=2050.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ changelog.d/2355.change.rst | 1 - changelog.d/2380.change.rst | 4 ---- setup.cfg | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) delete mode 100644 changelog.d/2355.change.rst delete mode 100644 changelog.d/2380.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 34b34fde91..0bb91b48fa 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.1.0 +current_version = 50.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a00d827191..9962f63d08 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v50.2.0 +------- + +* #2355: When pip is imported as part of a build, leave distutils patched. +* #2380: There are some setuptools specific changes in the + `setuptools.command.bdist_rpm` module that are no longer needed, because + they are part of the `bdist_rpm` module in distutils in Python + 3.5.0. Therefore, code was removed from `setuptools.command.bdist_rpm`. + + v50.1.0 ------- diff --git a/changelog.d/2355.change.rst b/changelog.d/2355.change.rst deleted file mode 100644 index d17435f55f..0000000000 --- a/changelog.d/2355.change.rst +++ /dev/null @@ -1 +0,0 @@ -When pip is imported as part of a build, leave distutils patched. diff --git a/changelog.d/2380.change.rst b/changelog.d/2380.change.rst deleted file mode 100644 index e68d108077..0000000000 --- a/changelog.d/2380.change.rst +++ /dev/null @@ -1,4 +0,0 @@ -There are some setuptools specific changes in the -`setuptools.command.bdist_rpm` module that are no longer needed, because -they are part of the `bdist_rpm` module in distutils in Python -3.5.0. Therefore, code was removed from `setuptools.command.bdist_rpm`. \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 692eb1fe88..d35e5fa2fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.1.0 +version = 50.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 37fa0e7531fbd240131d498f43436aafd4393149 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2020 10:45:35 -0400 Subject: [PATCH 8150/8469] Add test capturing failed expectation. Ref pypa/distutils#15. --- distutils/tests/test_msvccompiler.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/distutils/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py index 88d912b17b..46a51cd0a7 100644 --- a/distutils/tests/test_msvccompiler.py +++ b/distutils/tests/test_msvccompiler.py @@ -110,6 +110,26 @@ def test_concurrent_safe(self): thread.join() assert all(threads) + def test_concurrent_safe_fallback(self): + """ + If CCompiler.spawn has been monkey-patched without support + for an env, it should still execute. + """ + import distutils._msvccompiler as _msvccompiler + from distutils import ccompiler + compiler = _msvccompiler.MSVCCompiler() + compiler._paths = "expected" + + def CCompiler_spawn(self, cmd): + "A spawn without an env argument." + assert os.environ["PATH"] == "expected" + + with unittest.mock.patch.object( + ccompiler.CCompiler, 'spawn', CCompiler_spawn): + compiler.spawn(["n/a"]) + + assert os.environ.get("PATH") != "expected" + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) From 6e92cdabaff71ab2bab3300763101fb8f84c367f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2020 10:58:55 -0400 Subject: [PATCH 8151/8469] Add fallback for the situation where distutils.ccompiler.CCompiler.spawn has been patched. Fixes pypa/distutils#15. --- distutils/_msvccompiler.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index 2d56ee0aad..f7efd4ebe4 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -16,6 +16,7 @@ import os import subprocess import contextlib +import unittest.mock with contextlib.suppress(ImportError): import winreg @@ -504,7 +505,27 @@ def link(self, def spawn(self, cmd): env = dict(os.environ, PATH=self._paths) - return super().spawn(cmd, env=env) + with self._fallback_spawn(cmd, env) as fallback: + return super().spawn(cmd, env=env) + return fallback.value + + @contextlib.contextmanager + def _fallback_spawn(self, cmd, env): + """ + Discovered in pypa/distutils#15, some tools monkeypatch the compiler, + so the 'env' kwarg causes a TypeError. Detect this condition and + restore the legacy, unsafe behavior. + """ + bag = type('Bag', (), {})() + try: + yield bag + except TypeError as exc: + if "unexpected keyword argument 'env'" not in str(exc): + raise + else: + return + with unittest.mock.patch('os.environ', env): + bag.value = super().spawn(cmd) # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in From 2888d3c08e1c34254f726bc331dc33d419e636dc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2020 11:03:35 -0400 Subject: [PATCH 8152/8469] Emit a warning when the fallback spawn was triggered. Ref pypa/distutils#15. --- distutils/_msvccompiler.py | 3 +++ pytest.ini | 1 + 2 files changed, 4 insertions(+) diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index f7efd4ebe4..e9af4cf52b 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -16,6 +16,7 @@ import os import subprocess import contextlib +import warnings import unittest.mock with contextlib.suppress(ImportError): import winreg @@ -524,6 +525,8 @@ def _fallback_spawn(self, cmd, env): raise else: return + warnings.warn( + "Fallback spawn triggered. Please update distutils monkeypatch.") with unittest.mock.patch('os.environ', env): bag.value = super().spawn(cmd) diff --git a/pytest.ini b/pytest.ini index b305356b33..dba42e75a4 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,4 @@ addopts=--doctest-modules filterwarnings= # acknowledge that TestDistribution isn't a test ignore:cannot collect test class 'TestDistribution' + ignore:Fallback spawn triggered From 6c69bf97aefd67d421c58b49813c71ebfdc35316 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2020 11:08:41 -0400 Subject: [PATCH 8153/8469] Add changelog. Ref pypa/distutils#15. --- changelog.d/2368.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2368.change.rst diff --git a/changelog.d/2368.change.rst b/changelog.d/2368.change.rst new file mode 100644 index 0000000000..b9b6b03372 --- /dev/null +++ b/changelog.d/2368.change.rst @@ -0,0 +1 @@ +In distutils, restore support for monkeypatched CCompiler.spawn per pypa/distutils#15. From f84c145482d273cd6b90e20012443edcfd59ff0d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 5 Sep 2020 11:08:53 -0400 Subject: [PATCH 8154/8469] =?UTF-8?q?Bump=20version:=2050.2.0=20=E2=86=92?= =?UTF-8?q?=2050.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2368.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2368.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0bb91b48fa..7a0aef412a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.2.0 +current_version = 50.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 9962f63d08..83b56b65cc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v50.3.0 +------- + +* #2368: In distutils, restore support for monkeypatched CCompiler.spawn per pypa/distutils#15. + + v50.2.0 ------- diff --git a/changelog.d/2368.change.rst b/changelog.d/2368.change.rst deleted file mode 100644 index b9b6b03372..0000000000 --- a/changelog.d/2368.change.rst +++ /dev/null @@ -1 +0,0 @@ -In distutils, restore support for monkeypatched CCompiler.spawn per pypa/distutils#15. diff --git a/setup.cfg b/setup.cfg index d35e5fa2fd..7851845790 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.2.0 +version = 50.3.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From f01d2719802d3345332b761fb1c62fa4afd212c9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Sep 2020 19:05:13 -0400 Subject: [PATCH 8155/8469] Enable flake8 and cov plugins only when installed. Avoid installing in PyPy. --- conftest.py | 18 ------------------ pyproject.toml | 6 ++++++ pytest.ini | 2 +- setup.cfg | 4 +++- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/conftest.py b/conftest.py index 25537f56e5..9009025396 100644 --- a/conftest.py +++ b/conftest.py @@ -19,24 +19,6 @@ def pytest_addoption(parser): ] -def pytest_configure(config): - disable_coverage_on_pypy(config) - - -def disable_coverage_on_pypy(config): - """ - Coverage makes tests on PyPy unbearably slow, so disable it. - """ - if '__pypy__' not in sys.builtin_module_names: - return - - # Recommended at pytest-dev/pytest-cov#418 - cov = config.pluginmanager.get_plugin('_cov') - cov.options.no_cov = True - if cov.cov_controller: - cov.cov_controller.pause() - - if sys.version_info < (3,): collect_ignore.append('setuptools/lib2to3_ex.py') collect_ignore.append('setuptools/_imp.py') diff --git a/pyproject.toml b/pyproject.toml index cfdc2574b7..cd66e2773e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,3 +41,9 @@ backend-path = ["."] directory = "misc" name = "Misc" showcontent = true + +[tool.jaraco.pytest.plugins.flake8] +addopts = "--flake8" + +[tool.jaraco.pytest.plugins.cov] +addopts = "--cov" diff --git a/pytest.ini b/pytest.ini index ddcad08bae..40efb05465 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt --cov -r sxX +addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = diff --git a/setup.cfg b/setup.cfg index 7851845790..c326d1008f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,10 +68,12 @@ tests = pytest>=3.7 wheel coverage>=4.5.1 - pytest-cov>=2.5.1 + # Coverage is unbearably slow on PyPy + pytest-cov>=2.5.1; python_implementation != "PyPy" paver; python_version>="3.6" pip>=19.1 # For proper file:// URLs support. jaraco.envs + jaraco.test >= 3.1.1 docs = # Keep these in sync with docs/requirements.txt From 2995140fe8fc3d0de9f9fa6fe0d574dc2d9a0ca3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Sep 2020 19:30:08 -0400 Subject: [PATCH 8156/8469] Remove legacy warning suppressions and Python 2 ignored collections. --- conftest.py | 5 ----- pytest.ini | 7 ------- 2 files changed, 12 deletions(-) diff --git a/conftest.py b/conftest.py index 25537f56e5..baffac1adb 100644 --- a/conftest.py +++ b/conftest.py @@ -37,10 +37,5 @@ def disable_coverage_on_pypy(config): cov.cov_controller.pause() -if sys.version_info < (3,): - collect_ignore.append('setuptools/lib2to3_ex.py') - collect_ignore.append('setuptools/_imp.py') - - if sys.version_info < (3, 6): collect_ignore.append('pavement.py') diff --git a/pytest.ini b/pytest.ini index ddcad08bae..70e7d0a24f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,17 +9,10 @@ filterwarnings = ignore:bdist_wininst command is deprecated # Suppress this error; unimportant for CI tests ignore:Extraction path is writable by group/others:UserWarning - # Suppress Python 2 deprecation warning - ignore:Setuptools will stop working on Python 2:UserWarning # Suppress weird RuntimeWarning. ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning # Suppress use of bytes for filenames on Windows until fixed #2016 ignore:The Windows bytes API has been deprecated:DeprecationWarning - # Suppress other Python 2 UnicodeWarnings - ignore:Unicode equal comparison failed to convert:UnicodeWarning - ignore:Unicode unequal comparison failed to convert:UnicodeWarning - # https://github.com/pypa/setuptools/issues/2025 - ignore:direct construction of .*Item has been deprecated:DeprecationWarning # https://github.com/pypa/setuptools/issues/2081 ignore:lib2to3 package is deprecated:PendingDeprecationWarning ignore:lib2to3 package is deprecated:DeprecationWarning From 8fa0599ae2f2309ee5fb48b4c87dc8f2d7ea2f2c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Sep 2020 19:55:44 -0400 Subject: [PATCH 8157/8469] Restrict jaraco.test to Python 3.6 or later to avoid installation failures. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c326d1008f..80541c31c0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -73,7 +73,7 @@ tests = paver; python_version>="3.6" pip>=19.1 # For proper file:// URLs support. jaraco.envs - jaraco.test >= 3.1.1 + jaraco.test >= 3.1.1; python_version >= "3.6" docs = # Keep these in sync with docs/requirements.txt From b19ec937b199ef6c16558a0b5dd88be96b197333 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Sep 2020 20:51:54 -0400 Subject: [PATCH 8158/8469] Remove '--cov' in appveyor too. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index de4e6c66c6..9329aaa26a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ test_script: - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel - pip install --upgrade tox tox-venv virtualenv - pip freeze --all - - tox -- --cov + - tox after_test: - tox -e coverage,codecov From f4c193655d0af1e1ed891ffe2832e4b8c76951e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Sep 2020 11:50:57 -0400 Subject: [PATCH 8159/8469] Move VS tests to Python 3.8 --- appveyor.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9329aaa26a..94813a622f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,18 +8,18 @@ environment: matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_JOB_NAME: "python35-x64-vs2015" - PYTHON: "C:\\Python35-x64" + APPVEYOR_JOB_NAME: "Python38-x64-vs2015" + PYTHON: "C:\\Python38-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_JOB_NAME: "python35-x64-vs2017" - PYTHON: "C:\\Python35-x64" + APPVEYOR_JOB_NAME: "Python38-x64-vs2017" + PYTHON: "C:\\Python38-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_JOB_NAME: "python35-x64-vs2019" - PYTHON: "C:\\Python35-x64" - - APPVEYOR_JOB_NAME: "python36-x64" - PYTHON: "C:\\Python36-x64" + APPVEYOR_JOB_NAME: "Python38-x64-vs2019" + PYTHON: "C:\\Python38-x64" - APPVEYOR_JOB_NAME: "python37-x64" PYTHON: "C:\\Python37-x64" + - APPVEYOR_JOB_NAME: "python36-x64" + PYTHON: "C:\\Python36-x64" install: # symlink python from a directory with a space From 897f409cdf68d99c46e112531e7c256cb2933afd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 15 Sep 2020 17:41:27 -0400 Subject: [PATCH 8160/8469] Bring Python 3.5 tests back to improve coverage. --- appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 94813a622f..c067bad7a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,6 +20,10 @@ environment: PYTHON: "C:\\Python37-x64" - APPVEYOR_JOB_NAME: "python36-x64" PYTHON: "C:\\Python36-x64" + - APPVEYOR_JOB_NAME: "python35-x64" + PYTHON: "C:\\Python35-x64" + PYTEST_ADDOPTS: "--cov" + TOX_TESTENV_PASSENV: "PYTEST_ADDOPTS" install: # symlink python from a directory with a space From 73e379cc55ac1e9ec63c4ac30b75ecc82418f513 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 23 Sep 2020 20:29:14 -0400 Subject: [PATCH 8161/8469] Use canonical extension for docs. --- docs/{build_meta.txt => build_meta.rst} | 0 docs/conf.py | 7 ------- .../{distutils-legacy.txt => distutils-legacy.rst} | 0 docs/deprecated/{easy_install.txt => easy_install.rst} | 0 .../{functionalities.txt => functionalities.rst} | 0 docs/deprecated/{index.txt => index.rst} | 0 docs/deprecated/{python3.txt => python3.rst} | 0 docs/deprecated/{python_eggs.txt => python_eggs.rst} | 0 docs/{developer-guide.txt => developer-guide.rst} | 0 docs/{development.txt => development.rst} | 0 docs/{history.txt => history.rst} | 0 docs/{index.txt => index.rst} | 0 docs/{pkg_resources.txt => pkg_resources.rst} | 0 docs/{python 2 sunset.txt => python 2 sunset.rst} | 0 docs/references/{keywords.txt => keywords.rst} | 0 docs/{releases.txt => releases.rst} | 0 docs/{roadmap.txt => roadmap.rst} | 0 docs/{setuptools.txt => setuptools.rst} | 0 docs/userguide/{commands.txt => commands.rst} | 0 docs/userguide/{datafiles.txt => datafiles.rst} | 0 .../{declarative_config.txt => declarative_config.rst} | 0 ...dependency_management.txt => dependency_management.rst} | 0 .../{development_mode.txt => development_mode.rst} | 0 docs/userguide/{distribution.txt => distribution.rst} | 0 docs/userguide/{entry_point.txt => entry_point.rst} | 0 docs/userguide/{extension.txt => extension.rst} | 0 ...tionalities_rewrite.txt => functionalities_rewrite.rst} | 0 docs/userguide/{index.txt => index.rst} | 0 docs/userguide/{keywords.txt => keywords.rst} | 0 docs/userguide/{miscellaneous.txt => miscellaneous.rst} | 0 .../{package_discovery.txt => package_discovery.rst} | 0 docs/userguide/{quickstart.txt => quickstart.rst} | 0 32 files changed, 7 deletions(-) rename docs/{build_meta.txt => build_meta.rst} (100%) rename docs/deprecated/{distutils-legacy.txt => distutils-legacy.rst} (100%) rename docs/deprecated/{easy_install.txt => easy_install.rst} (100%) rename docs/deprecated/{functionalities.txt => functionalities.rst} (100%) rename docs/deprecated/{index.txt => index.rst} (100%) rename docs/deprecated/{python3.txt => python3.rst} (100%) rename docs/deprecated/{python_eggs.txt => python_eggs.rst} (100%) rename docs/{developer-guide.txt => developer-guide.rst} (100%) rename docs/{development.txt => development.rst} (100%) rename docs/{history.txt => history.rst} (100%) rename docs/{index.txt => index.rst} (100%) rename docs/{pkg_resources.txt => pkg_resources.rst} (100%) rename docs/{python 2 sunset.txt => python 2 sunset.rst} (100%) rename docs/references/{keywords.txt => keywords.rst} (100%) rename docs/{releases.txt => releases.rst} (100%) rename docs/{roadmap.txt => roadmap.rst} (100%) rename docs/{setuptools.txt => setuptools.rst} (100%) rename docs/userguide/{commands.txt => commands.rst} (100%) rename docs/userguide/{datafiles.txt => datafiles.rst} (100%) rename docs/userguide/{declarative_config.txt => declarative_config.rst} (100%) rename docs/userguide/{dependency_management.txt => dependency_management.rst} (100%) rename docs/userguide/{development_mode.txt => development_mode.rst} (100%) rename docs/userguide/{distribution.txt => distribution.rst} (100%) rename docs/userguide/{entry_point.txt => entry_point.rst} (100%) rename docs/userguide/{extension.txt => extension.rst} (100%) rename docs/userguide/{functionalities_rewrite.txt => functionalities_rewrite.rst} (100%) rename docs/userguide/{index.txt => index.rst} (100%) rename docs/userguide/{keywords.txt => keywords.rst} (100%) rename docs/userguide/{miscellaneous.txt => miscellaneous.rst} (100%) rename docs/userguide/{package_discovery.txt => package_discovery.rst} (100%) rename docs/userguide/{quickstart.txt => quickstart.rst} (100%) diff --git a/docs/build_meta.txt b/docs/build_meta.rst similarity index 100% rename from docs/build_meta.txt rename to docs/build_meta.rst diff --git a/docs/conf.py b/docs/conf.py index 12520586cd..673b6ba5cc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,16 +17,9 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# The suffix of source filenames. -source_suffix = '.txt' - # The master toctree document. master_doc = 'index' -# A list of glob-style patterns that should be excluded -# when looking for source files. -exclude_patterns = ['requirements.txt'] - # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] diff --git a/docs/deprecated/distutils-legacy.txt b/docs/deprecated/distutils-legacy.rst similarity index 100% rename from docs/deprecated/distutils-legacy.txt rename to docs/deprecated/distutils-legacy.rst diff --git a/docs/deprecated/easy_install.txt b/docs/deprecated/easy_install.rst similarity index 100% rename from docs/deprecated/easy_install.txt rename to docs/deprecated/easy_install.rst diff --git a/docs/deprecated/functionalities.txt b/docs/deprecated/functionalities.rst similarity index 100% rename from docs/deprecated/functionalities.txt rename to docs/deprecated/functionalities.rst diff --git a/docs/deprecated/index.txt b/docs/deprecated/index.rst similarity index 100% rename from docs/deprecated/index.txt rename to docs/deprecated/index.rst diff --git a/docs/deprecated/python3.txt b/docs/deprecated/python3.rst similarity index 100% rename from docs/deprecated/python3.txt rename to docs/deprecated/python3.rst diff --git a/docs/deprecated/python_eggs.txt b/docs/deprecated/python_eggs.rst similarity index 100% rename from docs/deprecated/python_eggs.txt rename to docs/deprecated/python_eggs.rst diff --git a/docs/developer-guide.txt b/docs/developer-guide.rst similarity index 100% rename from docs/developer-guide.txt rename to docs/developer-guide.rst diff --git a/docs/development.txt b/docs/development.rst similarity index 100% rename from docs/development.txt rename to docs/development.rst diff --git a/docs/history.txt b/docs/history.rst similarity index 100% rename from docs/history.txt rename to docs/history.rst diff --git a/docs/index.txt b/docs/index.rst similarity index 100% rename from docs/index.txt rename to docs/index.rst diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.rst similarity index 100% rename from docs/pkg_resources.txt rename to docs/pkg_resources.rst diff --git a/docs/python 2 sunset.txt b/docs/python 2 sunset.rst similarity index 100% rename from docs/python 2 sunset.txt rename to docs/python 2 sunset.rst diff --git a/docs/references/keywords.txt b/docs/references/keywords.rst similarity index 100% rename from docs/references/keywords.txt rename to docs/references/keywords.rst diff --git a/docs/releases.txt b/docs/releases.rst similarity index 100% rename from docs/releases.txt rename to docs/releases.rst diff --git a/docs/roadmap.txt b/docs/roadmap.rst similarity index 100% rename from docs/roadmap.txt rename to docs/roadmap.rst diff --git a/docs/setuptools.txt b/docs/setuptools.rst similarity index 100% rename from docs/setuptools.txt rename to docs/setuptools.rst diff --git a/docs/userguide/commands.txt b/docs/userguide/commands.rst similarity index 100% rename from docs/userguide/commands.txt rename to docs/userguide/commands.rst diff --git a/docs/userguide/datafiles.txt b/docs/userguide/datafiles.rst similarity index 100% rename from docs/userguide/datafiles.txt rename to docs/userguide/datafiles.rst diff --git a/docs/userguide/declarative_config.txt b/docs/userguide/declarative_config.rst similarity index 100% rename from docs/userguide/declarative_config.txt rename to docs/userguide/declarative_config.rst diff --git a/docs/userguide/dependency_management.txt b/docs/userguide/dependency_management.rst similarity index 100% rename from docs/userguide/dependency_management.txt rename to docs/userguide/dependency_management.rst diff --git a/docs/userguide/development_mode.txt b/docs/userguide/development_mode.rst similarity index 100% rename from docs/userguide/development_mode.txt rename to docs/userguide/development_mode.rst diff --git a/docs/userguide/distribution.txt b/docs/userguide/distribution.rst similarity index 100% rename from docs/userguide/distribution.txt rename to docs/userguide/distribution.rst diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.rst similarity index 100% rename from docs/userguide/entry_point.txt rename to docs/userguide/entry_point.rst diff --git a/docs/userguide/extension.txt b/docs/userguide/extension.rst similarity index 100% rename from docs/userguide/extension.txt rename to docs/userguide/extension.rst diff --git a/docs/userguide/functionalities_rewrite.txt b/docs/userguide/functionalities_rewrite.rst similarity index 100% rename from docs/userguide/functionalities_rewrite.txt rename to docs/userguide/functionalities_rewrite.rst diff --git a/docs/userguide/index.txt b/docs/userguide/index.rst similarity index 100% rename from docs/userguide/index.txt rename to docs/userguide/index.rst diff --git a/docs/userguide/keywords.txt b/docs/userguide/keywords.rst similarity index 100% rename from docs/userguide/keywords.txt rename to docs/userguide/keywords.rst diff --git a/docs/userguide/miscellaneous.txt b/docs/userguide/miscellaneous.rst similarity index 100% rename from docs/userguide/miscellaneous.txt rename to docs/userguide/miscellaneous.rst diff --git a/docs/userguide/package_discovery.txt b/docs/userguide/package_discovery.rst similarity index 100% rename from docs/userguide/package_discovery.txt rename to docs/userguide/package_discovery.rst diff --git a/docs/userguide/quickstart.txt b/docs/userguide/quickstart.rst similarity index 100% rename from docs/userguide/quickstart.txt rename to docs/userguide/quickstart.rst From 67be04f17c3af238138972488a23f0a7118a9458 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:26:58 -0400 Subject: [PATCH 8162/8469] Add changelog for #2093. --- changelog.d/2093.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2093.doc.rst diff --git a/changelog.d/2093.doc.rst b/changelog.d/2093.doc.rst new file mode 100644 index 0000000000..87dbfe82ee --- /dev/null +++ b/changelog.d/2093.doc.rst @@ -0,0 +1 @@ +Finalized doc revamp. From 31e5674df1e3733d3041f1e9b3a7cb071b83998b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:29:53 -0400 Subject: [PATCH 8163/8469] Update changelog. --- changelog.d/2379.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2379.misc.rst diff --git a/changelog.d/2379.misc.rst b/changelog.d/2379.misc.rst new file mode 100644 index 0000000000..09bd762578 --- /dev/null +++ b/changelog.d/2379.misc.rst @@ -0,0 +1 @@ +Travis CI test suite now tests against PPC64. From 81040f8da609061a954972cd34d1646de9445ea2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:33:44 -0400 Subject: [PATCH 8164/8469] Address review comments. --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6e0e5563a..a44252f13e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ jobs: - python: 3.9-dev - <<: *latest_py3 env: TOXENV=docs - #PPC64LE - arch: ppc64le python: pypy3 - arch: ppc64le @@ -28,8 +27,6 @@ jobs: env: LANG=C - arch: ppc64le python: 3.9-dev - - <<: *latest_py3_ppc - env: TOXENV=docs allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 @@ -37,14 +34,12 @@ jobs: python: pypy3 - <<: *latest_py3 env: TOXENV=docs - - <<: *latest_py3_ppc - env: TOXENV=docs cache: pip before_install: -# Fix for PPC64LE, where permissions are fixed to allow tox/pip to install packages. +# Fix for PPC64LE, where permissions are fixed to allow tox/pip to install packages. # As travis base images for PPC64LE except for bionic, do not have this fix. - | if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then From d78027a257e2a1053fa3dd145c6d9054c13f3390 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:38:26 -0400 Subject: [PATCH 8165/8469] Update comment to indicate the problem. --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a44252f13e..d12a9ecee9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,9 +39,12 @@ jobs: cache: pip before_install: -# Fix for PPC64LE, where permissions are fixed to allow tox/pip to install packages. -# As travis base images for PPC64LE except for bionic, do not have this fix. - | + # Except on bionic, Travis Linux base image for PPC64LE + # platform lacks the proper + # permissions to the directory ~/.cache/pip/wheels that allow + # the user running travis build to install pip packages. + # TODO: is someone tracking this issue? Maybe just move to bionic? if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then sudo chown -Rfv $USER:$GROUP ~/.cache/pip/wheels fi From 896ef66ff3b167a13a5efb128013d5bd53633a79 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 10:29:40 -0400 Subject: [PATCH 8166/8469] Move setuptools-specific excluded folders to collect_ignore to match with jaraco/skeleton. --- conftest.py | 5 +++++ pytest.ini | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 41ab30b923..f896561ecf 100644 --- a/conftest.py +++ b/conftest.py @@ -16,6 +16,11 @@ def pytest_addoption(parser): 'setuptools/tests/mod_with_constant.py', 'setuptools/_distutils', '_distutils_hack', + 'setuptools/extern', + 'pkg_resources/extern', + 'pkg_resources/tests/data', + 'setuptools/_vendor', + 'pkg_resources/_vendor', ] diff --git a/pytest.ini b/pytest.ini index a875e1e931..162ad8737b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] addopts=--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX -norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor +norecursedirs=dist build .tox .eggs doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = # Fail on warnings From d8b54614aa93b42695666bc6bdbc6263da9cbbc0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 09:47:47 -0400 Subject: [PATCH 8167/8469] Extract PPC64LE into script and port to Python. --- .travis.yml | 10 +--------- tools/ppc64le-patch.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 tools/ppc64le-patch.py diff --git a/.travis.yml b/.travis.yml index d12a9ecee9..62da9b2078 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,15 +39,7 @@ jobs: cache: pip before_install: - - | - # Except on bionic, Travis Linux base image for PPC64LE - # platform lacks the proper - # permissions to the directory ~/.cache/pip/wheels that allow - # the user running travis build to install pip packages. - # TODO: is someone tracking this issue? Maybe just move to bionic? - if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]]; then - sudo chown -Rfv $USER:$GROUP ~/.cache/pip/wheels - fi +- python tools/ppc64le-patch.py install: diff --git a/tools/ppc64le-patch.py b/tools/ppc64le-patch.py new file mode 100644 index 0000000000..2a8ff8e0a0 --- /dev/null +++ b/tools/ppc64le-patch.py @@ -0,0 +1,28 @@ +""" +Except on bionic, Travis Linux base image for PPC64LE +platform lacks the proper +permissions to the directory ~/.cache/pip/wheels that allow +the user running travis build to install pip packages. +TODO: is someone tracking this issue? Maybe just move to bionic? +""" + +import subprocess +import collections +import os + + +def patch(): + env = collections.defaultdict(str, os.environ) + if env['TRAVIS_CPU_ARCH'] != 'ppc64le': + return + cmd = [ + 'sudo', + 'chown', + '-Rfv', + '{USER}:{GROUP}'.format_map(env), + os.path.expanduser('~/.cache/pip/wheels'), + ] + subprocess.Popen(cmd) + + +__name__ == '__main__' and patch() From 72e14eaeb6da77ea3160ae0ff8b2e0655942923e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 24 Sep 2020 10:46:49 -0400 Subject: [PATCH 8168/8469] Remove pypy3 from ppc64le (doesn't work). --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62da9b2078..7d8c102629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,6 @@ jobs: allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 - - arch: ppc64le - python: pypy3 - <<: *latest_py3 env: TOXENV=docs From 455b3d3c3145254228ce31d73d8964d13550527c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 20 Sep 2020 19:38:33 +0200 Subject: [PATCH 8169/8469] Add a :user: role in Sphinx This change adds a role that links to the GitHub user Sponsors page. If that page is not set up, it'll redirect to the GitHub user profile page instead: Links to https://github.com/sponsors/{{ username }} open as GitHub Sponsors page if the target `username` has it enabled and redirect to https://github.com/{{ username }} if it's disabled. --- changelog.d/2395.doc.1.rst | 1 + docs/conf.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2395.doc.1.rst diff --git a/changelog.d/2395.doc.1.rst b/changelog.d/2395.doc.1.rst new file mode 100644 index 0000000000..14a95cf101 --- /dev/null +++ b/changelog.d/2395.doc.1.rst @@ -0,0 +1 @@ +Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz` diff --git a/docs/conf.py b/docs/conf.py index 673b6ba5cc..d5111391d7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,9 +10,18 @@ cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), ) +# -- Project information ----------------------------------------------------- + +github_url = 'https://github.com' +github_sponsors_url = f'{github_url}/sponsors' + # -- General configuration -- -extensions = ['jaraco.packaging.sphinx', 'rst.linker'] +extensions = [ + 'sphinx.ext.extlinks', # allows to create custom roles easily + 'jaraco.packaging.sphinx', + 'rst.linker', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -27,6 +36,11 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# -- Options for extlinks extension --------------------------------------- +extlinks = { + 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 +} + # -- Options for HTML output -- # The theme to use for HTML and HTML Help pages. Major themes that come with From bb3072883f761f8537d1fc2b8a33b8cc82c1aa27 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 20 Sep 2020 21:27:42 +0200 Subject: [PATCH 8170/8469] =?UTF-8?q?=F0=9F=9A=91=20Exclude=20sphinx=20con?= =?UTF-8?q?f=20from=20pytest=20auto-discovery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit But only under Python 3.5! --- conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conftest.py b/conftest.py index f896561ecf..d5e851fe50 100644 --- a/conftest.py +++ b/conftest.py @@ -25,4 +25,5 @@ def pytest_addoption(parser): if sys.version_info < (3, 6): + collect_ignore.append('docs/conf.py') # uses f-strings collect_ignore.append('pavement.py') From 2754213b760fa4ba845bddda3ac4c0ec34c39e4b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 20 Sep 2020 19:39:57 +0200 Subject: [PATCH 8171/8469] Fix command block in dev guide to `shell-session` This type is more appropriate for snippets containing shell commands with leading prompts followed by their output. `bash` syntax used earlier treats everything as a raw shell script contents highlighting words like `for`. --- docs/developer-guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst index e84cd640b8..efbf1b7c02 100644 --- a/docs/developer-guide.rst +++ b/docs/developer-guide.rst @@ -84,7 +84,7 @@ case two fragments should be added. It is not necessary to make a separate documentation fragment for documentation changes accompanying the relevant code changes. See the following for an example news fragment: -.. code-block:: bash +.. code-block:: shell-session $ cat changelog.d/1288.change.rst Add support for maintainer in PKG-INFO From 0d6920524ed2395e1cab7e7141c58423d94a424f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 20 Sep 2020 21:14:59 +0200 Subject: [PATCH 8172/8469] =?UTF-8?q?=F0=9F=93=9D=20Add=20an=20illustrativ?= =?UTF-8?q?e=20explanation=20of=20change=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change places a `README.rst` document under `changelog.d/` dir in order for GitHub to render it when users navigate to this location via the web UI. It also includes that into the dev guide in Sphinx docs. --- changelog.d/2395.doc.2.rst | 1 + changelog.d/README.rst | 94 ++++++++++++++++++++++++++++++++++++++ docs/developer-guide.rst | 35 ++++---------- 3 files changed, 103 insertions(+), 27 deletions(-) create mode 100644 changelog.d/2395.doc.2.rst create mode 100644 changelog.d/README.rst diff --git a/changelog.d/2395.doc.2.rst b/changelog.d/2395.doc.2.rst new file mode 100644 index 0000000000..bc861ec330 --- /dev/null +++ b/changelog.d/2395.doc.2.rst @@ -0,0 +1 @@ +Added an illustrative explanation about the change notes to fragments dir -- by :user:`webknjaz` diff --git a/changelog.d/README.rst b/changelog.d/README.rst new file mode 100644 index 0000000000..30831edc96 --- /dev/null +++ b/changelog.d/README.rst @@ -0,0 +1,94 @@ +.. _Adding change notes with your PRs: + +Adding change notes with your PRs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is very important to maintain a log for news of how +updating to the new version of the software will affect +end-users. This is why we enforce collection of the change +fragment files in pull requests as per `Towncrier philosophy`_. + +The idea is that when somebody makes a change, they must record +the bits that would affect end-users only including information +that would be useful to them. Then, when the maintainers publish +a new release, they'll automatically use these records to compose +a change log for the respective version. It is important to +understand that including unnecessary low-level implementation +related details generates noise that is not particularly useful +to the end-users most of the time. And so such details should be +recorded in the Git history rather than a changelog. + +Alright! So how to add a news fragment? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``setuptools`` uses `towncrier `_ +for changelog management. +To submit a change note about your PR, add a text file into the +``changelog.d/`` folder. It should contain an +explanation of what applying this PR will change in the way +end-users interact with the project. One sentence is usually +enough but feel free to add as many details as you feel necessary +for the users to understand what it means. + +**Use the past tense** for the text in your fragment because, +combined with others, it will be a part of the "news digest" +telling the readers **what changed** in a specific version of +the library *since the previous version*. You should also use +reStructuredText syntax for highlighting code (inline or block), +linking parts of the docs or external sites. +If you wish to sign your change, feel free to add ``-- by +:user:`github-username``` at the end (replace ``github-username`` +with your own!). + +Finally, name your file following the convention that Towncrier +understands: it should start with the number of an issue or a +PR followed by a dot, then add a patch type, like ``change``, +``doc``, ``misc`` etc., and add ``.rst`` as a suffix. If you +need to add more than one fragment, you may add an optional +sequence number (delimited with another period) between the type +and the suffix. + +In general the name will follow ``..rst`` pattern, +where the categories are: + +- ``change``: Any backwards compatible code change +- ``breaking``: Any backwards-compatibility breaking change +- ``doc``: A change to the documentation +- ``misc``: Changes internal to the repo like CI, test and build changes +- ``deprecation``: For deprecations of an existing feature or behavior + +A pull request may have more than one of these components, for example +a code change may introduce a new feature that deprecates an old +feature, in which case two fragments should be added. It is not +necessary to make a separate documentation fragment for documentation +changes accompanying the relevant code changes. + +Examples for adding changelog entries to your Pull Requests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +File :file:`changelog.d/2395.doc.1.rst`: + +.. code-block:: rst + + Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz` + +File :file:`changelog.d/1354.misc.rst`: + +.. code-block:: rst + + Added ``towncrier`` for changelog managment -- by :user:`pganssle` + +File :file:`changelog.d/2355.change.rst`: + +.. code-block:: rst + + When pip is imported as part of a build, leave :py:mod:`distutils` + patched -- by :user:`jaraco` + +.. tip:: + + See :file:`pyproject.toml` for all available categories + (``tool.towncrier.type``). + +.. _Towncrier philosophy: + https://towncrier.readthedocs.io/en/actual-freaking-docs/#philosophy diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst index efbf1b7c02..d23669317b 100644 --- a/docs/developer-guide.rst +++ b/docs/developer-guide.rst @@ -61,33 +61,14 @@ jump to the in-depth discussion about any subject referenced. Making a pull request --------------------- -When making a pull request, please include a short summary of the changes -and a reference to any issue tickets that the PR is intended to solve. -All PRs with code changes should include tests. All changes should include a -changelog entry. - -``setuptools`` uses `towncrier `_ -for changelog management, so when making a PR, please add a news fragment in the -``changelog.d/`` folder. Changelog files are written in reStructuredText and -should be a 1 or 2 sentence description of the substantive changes in the PR. -They should be named ``..rst``, where the categories are: - -- ``change``: Any backwards compatible code change -- ``breaking``: Any backwards-compatibility breaking change -- ``doc``: A change to the documentation -- ``misc``: Changes internal to the repo like CI, test and build changes -- ``deprecation``: For deprecations of an existing feature or behavior - -A pull request may have more than one of these components, for example a code -change may introduce a new feature that deprecates an old feature, in which -case two fragments should be added. It is not necessary to make a separate -documentation fragment for documentation changes accompanying the relevant -code changes. See the following for an example news fragment: - -.. code-block:: shell-session - - $ cat changelog.d/1288.change.rst - Add support for maintainer in PKG-INFO +When making a pull request, please +:ref:`include a short summary of the changes ` and a reference to any issue tickets that the PR is +intended to solve. +All PRs with code changes should include tests. All changes should +include a changelog entry. + +.. include:: ../changelog.d/README.rst ------------------- Auto-Merge Requests From 26736e834db76aded9a34a5c0679fedd15fd0881 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 24 Sep 2020 23:09:57 +0200 Subject: [PATCH 8173/8469] =?UTF-8?q?=F0=9F=93=9D=20Enable=20showing=20new?= =?UTF-8?q?s=20categories=20in=20towncrier=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2394 --- pyproject.toml | 2 +- towncrier_template.rst | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd66e2773e..2d36286555 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ backend-path = ["."] title_format = "v{version}" issue_format = "#{issue}" template = "towncrier_template.rst" - underlines = ["-"] + underlines = ["-", "^"] [[tool.towncrier.type]] directory = "deprecation" diff --git a/towncrier_template.rst b/towncrier_template.rst index fbc5ef03b0..31098b7cf6 100644 --- a/towncrier_template.rst +++ b/towncrier_template.rst @@ -1,10 +1,14 @@ {% for section, _ in sections.items() %} {% set underline = underlines[0] %}{% if section %}{{section}} {{ underline * section|length }} +{% set underline = underlines[1] %} {% endif %} {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} + +{{ definitions[category]['name'] }} +{{ underline * definitions[category]['name']|length }} {% if definitions[category]['showcontent'] %} {% for text, values in sections[section][category].items() %} * {{ values|join(', ') }}: {{ text }} From a278b0f0485ffc6f2ae9a033b124ba64dd02e3db Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 24 Sep 2020 23:24:24 +0200 Subject: [PATCH 8174/8469] =?UTF-8?q?=F0=9F=93=9D=20Add=20a=20change=20not?= =?UTF-8?q?e=20about=20issue=20#2394=20resolution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Thomas Hisch --- changelog.d/2394.doc.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/2394.doc.rst diff --git a/changelog.d/2394.doc.rst b/changelog.d/2394.doc.rst new file mode 100644 index 0000000000..338e8895d5 --- /dev/null +++ b/changelog.d/2394.doc.rst @@ -0,0 +1,3 @@ +Extended towncrier news template to include change note categories. +This allows to see what types of changes a given version introduces +-- by :user:`webknjaz` From c7bf7961624c2c524edfe04513379d063621bece Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Sep 2020 11:12:09 +0200 Subject: [PATCH 8175/8469] Report test results in the AppVeyor UI --- appveyor.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c067bad7a9..4d1ae55f4f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,9 +41,14 @@ test_script: - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel - pip install --upgrade tox tox-venv virtualenv - pip freeze --all - - tox + - tox -- --junit-xml=test-results.xml after_test: - tox -e coverage,codecov +on_finish: + - ps: | + $wc = New-Object 'System.Net.WebClient' + $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-results.xml)) + version: '{build}' From 5706841b1120b852193a5576c3bfcfa0cf666ab4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Sep 2020 11:23:41 +0200 Subject: [PATCH 8176/8469] =?UTF-8?q?=F0=9F=93=9D=20Add=20a=20change=20not?= =?UTF-8?q?e=20about=20PR=20#2401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.d/2401.misc.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/2401.misc.rst diff --git a/changelog.d/2401.misc.rst b/changelog.d/2401.misc.rst new file mode 100644 index 0000000000..924880a37f --- /dev/null +++ b/changelog.d/2401.misc.rst @@ -0,0 +1,2 @@ +Enabled test results reporting in AppVeyor CI +-- by :user:`webknjaz` From a6673f11935c8ff7e88b66b95de59721a00c3201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Fri, 2 Oct 2020 19:04:57 +0800 Subject: [PATCH 8177/8469] editorial fix --- docs/userguide/package_discovery.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 0e0d27c5b2..02eab172cf 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -90,7 +90,7 @@ in ``src`` that starts with the name ``pkg`` and not ``additional``: packages = find_packages( where = 'src', include = ['pkg*',], - exclude = ['tests',] + exclude = ['additional',] ), package_dir = {"":"src"} #... From c218cc5443dbcec77c81a03391c6ae2a566a7a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Fri, 2 Oct 2020 20:07:58 +0800 Subject: [PATCH 8178/8469] docs: code-block style fix --- docs/userguide/entry_point.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 7f5165a876..f4c43c6e18 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -14,7 +14,7 @@ Console Scripts =============== First consider an example without entry points. Imagine a package -defined thus:: +defined thus: .. code-block:: bash @@ -38,7 +38,7 @@ and ``__main__.py`` providing a hook: hello_world() After installing the package, the function may be invoked through the -`runpy `_ module:: +`runpy `_ module: .. code-block:: bash @@ -49,7 +49,7 @@ user-friendly name for installers of the package to execute. Installers like pip will create wrapper scripts to execute a function. In the above example, to create a command ``hello-world`` that invokes ``timmins.hello_world``, add a console script entry point to -``setup.cfg``:: +``setup.cfg``: .. code-block:: ini @@ -96,7 +96,7 @@ For a project wishing to solicit entry points, Setuptools recommends the module (part of stdlib since Python 3.8) or its backport, `importlib_metadata `_. -For example, to find the console script entry points from the example above:: +For example, to find the console script entry points from the example above: .. code-block:: python @@ -115,7 +115,7 @@ method to import and load that entry point (module or object). hello-world = timmins:hello_world Then, a different project wishing to load 'my.plugins' plugins could run -the following routine to load (and invoke) such plugins:: +the following routine to load (and invoke) such plugins: .. code-block:: python @@ -140,7 +140,7 @@ For such an entry point, declare in square brakets any number of dependency be viable if their extras were declared and installed. See the :ref:`guide on dependencies management ` for more information on defining extra requirements. Consider from the -above example:: +above example: .. code-block:: ini From 1ba4f4e0240d4e09585463dc7ebb9b7a47b1eb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sat, 3 Oct 2020 10:12:36 +0800 Subject: [PATCH 8179/8469] fix inline-code style --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 5282975102..fdc7ff142c 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -82,8 +82,8 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` -therefore provides two convenient tools to ease the burden: ``find: `` and -``find_namespace: ``. To use it in your project: +therefore provides two convenient tools to ease the burden: ``find:`` and +``find_namespace:``. To use it in your project: .. code-block:: ini From 754f710a10c15b7456c086c2839f01ad2556b3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sat, 3 Oct 2020 10:30:49 +0800 Subject: [PATCH 8180/8469] Update dependency_management.rst --- docs/userguide/dependency_management.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index a26ab6c3b0..ae2192d879 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -266,7 +266,7 @@ the two dependencies ``PDF`` maps to. The second use case is that other package can use this "extra" for their own dependencies. For example, if "Project-B" needs "project A" with PDF support -installed, it might declare the dependency like this:: +installed, it might declare the dependency like this: .. code-block:: ini @@ -309,4 +309,4 @@ In some cases, you might need to specify the minimum required python version. This is handled with the ``python_requires`` keyword supplied to ``setup.cfg`` or ``setup.py``. -Example WIP \ No newline at end of file +Example WIP From 81cf64f294d8152707cf7d8f242f50b9c64c62d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sat, 3 Oct 2020 10:32:19 +0800 Subject: [PATCH 8181/8469] Update entry_point.rst --- docs/userguide/entry_point.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index f4c43c6e18..a91fd5dc7f 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -33,6 +33,8 @@ with ``__init__.py`` as: and ``__main__.py`` providing a hook: +.. code-block:: python + from . import hello_world if __name__ == '__main__': hello_world() From 997eae8020dc28ea1ef87572275f5dc41e1bc74a Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sun, 4 Oct 2020 16:11:27 +0100 Subject: [PATCH 8182/8469] ignore any exception when loading 2to3 --- setuptools/command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 4709679b9f..b30aa1290a 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -11,7 +11,7 @@ try: from setuptools.lib2to3_ex import Mixin2to3 -except ImportError: +except Exception: class Mixin2to3: def run_2to3(self, files, doctests=True): From 6722c069db857991b95fb95a5ddf90ec4913094a Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 5 Oct 2020 09:52:31 +0300 Subject: [PATCH 8183/8469] Fix ReST syntax error in the PEP 517 link --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 5282975102..37d33b260e 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -22,7 +22,7 @@ be generated with whatever tools that provides a ``build sdist``-alike functionality. While this may appear cumbersome, given the added pieces, it in fact tremendously enhances the portability of your package. The change is driven under `PEP 517 ``. To learn more about Python packaging in general, +build-requirements>`_. To learn more about Python packaging in general, navigate to the `bottom `_ of this page. From f516f011b0361a329304c3ed6dc611fc97053e2b Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 5 Oct 2020 17:56:12 +0300 Subject: [PATCH 8184/8469] And another malformed link --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 37d33b260e..3af6d5663d 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -191,7 +191,7 @@ Uploading your package to PyPI ============================== After generating the distribution files, next step would be to upload your distribution so others can use it. This functionality is provided by -``twine `` and we will only demonstrate the +`twine `_ and we will only demonstrate the basic use here. From f67c1b099d24a37a0c65bf08f88cb46e261d2a61 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 6 Oct 2020 20:03:04 -0400 Subject: [PATCH 8185/8469] Extract method for maybe_tag. --- setuptools/command/egg_info.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index c957154a1f..0b7ad677f2 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -123,12 +123,17 @@ 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) + return safe_version(self._maybe_tag(self.distribution.get_version())) + + def _maybe_tag(self, version): + """ + egg_info may be called more than once for a distribution, + in which case the version string already contains all tags. + """ + return ( + version if self.vtags and version.endswith(self.vtags) + else version + self.vtags + ) def tags(self): version = '' From a3aafcd7f572ee56c8b43e2d1d60cd252483a02f Mon Sep 17 00:00:00 2001 From: alvy Date: Wed, 7 Oct 2020 17:43:14 -0400 Subject: [PATCH 8186/8469] add a paragraph in index to linkt build_meta doc --- docs/userguide/index.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index abee331a2f..8470e268d8 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -10,6 +10,15 @@ packages. Packages built and distributed using ``setuptools`` look to the user like ordinary Python packages based on the ``distutils``. +Transition to PEP517 +==================== + +Since setuptools no longer serves as the default build tool, one must explicitly +opt in (by providing a ``pyproject.toml`` file) to use this library. The user +facing part is provided by `PEP517 `_ and +backend interface is described :ref:`in this document <../build_meta>`. The +quickstart provides an overview of the new workflow. + .. toctree:: :maxdepth: 1 From bcb6d47f1618fc37bbab24b54f79e268435f849c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Mon, 12 Oct 2020 08:46:07 +0800 Subject: [PATCH 8187/8469] Update docs/userguide/quickstart.rst Co-authored-by: Sviatoslav Sydorenko --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index fdc7ff142c..f2f5e41dc8 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -82,8 +82,8 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` -therefore provides two convenient tools to ease the burden: ``find:`` and -``find_namespace:``. To use it in your project: +therefore provides two convenient tools to ease the burden: ``find:\ `` and +``find_namespace:\ ``. To use it in your project: .. code-block:: ini From 22e15d9d6a6b91904f100799eb8004a7ffa5d6ed Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 12 Oct 2020 09:22:01 +0300 Subject: [PATCH 8188/8469] GHA: Replace 3.9 beta with 3.9 final --- .github/workflows/python-tests.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 93ec79d4ab..2ee7c0fbf5 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -19,6 +19,7 @@ jobs: # max-parallel: 5 matrix: python-version: + - 3.9 - 3.8 - pypy3 - 3.7 @@ -31,12 +32,6 @@ jobs: # - windows-2019 # - windows-2016 include: - # Pre-release versions (GH-shipped) - - os: ubuntu-20.04 - python-version: 3.9.0-beta.4 - 3.9.0 - # Pre-release versions (deadsnakes) - - os: ubuntu-20.04 - python-version: 3.9-beta # Dev versions (deadsnakes) - os: ubuntu-20.04 python-version: 3.9-dev From 5ec1fb258cba95cdd04ea07b3754a47e4ac19cad Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 12 Oct 2020 09:28:06 +0300 Subject: [PATCH 8189/8469] Don't let one failure cancel all the other jobs --- .github/workflows/python-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 2ee7c0fbf5..96e1430879 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -16,6 +16,7 @@ jobs: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false # max-parallel: 5 matrix: python-version: From b66e45a90e82c9170cc48f21e4dac9d206193953 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 12 Oct 2020 16:42:51 +0300 Subject: [PATCH 8190/8469] Use the :pep: role instead of a manual link Co-Authored-By: Sviatoslav Sydorenko --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 3af6d5663d..a07afae773 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -21,8 +21,8 @@ the backend (build system) it wants to use. The distribution can then be generated with whatever tools that provides a ``build sdist``-alike functionality. While this may appear cumbersome, given the added pieces, it in fact tremendously enhances the portability of your package. The -change is driven under `PEP 517 `_. To learn more about Python packaging in general, +change is driven under :pep:`PEP 517 <517#build-requirements>`_. +To learn more about Python packaging in general, navigate to the `bottom `_ of this page. From ec508081a5ccbb304a4ae68c70c56787b9818f04 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 12 Oct 2020 15:53:38 +0200 Subject: [PATCH 8191/8469] Add Python 3.9 trove classifier to the metadata --- changelog.d/2421.misc.rst | 2 ++ setup.cfg | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelog.d/2421.misc.rst diff --git a/changelog.d/2421.misc.rst b/changelog.d/2421.misc.rst new file mode 100644 index 0000000000..5dcdeceeb4 --- /dev/null +++ b/changelog.d/2421.misc.rst @@ -0,0 +1,2 @@ +Python 3.9 trove classifier got added to the dist metadata +-- by :user:`webknjaz` diff --git a/setup.cfg b/setup.cfg index 80541c31c0..95c59a4a80 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,6 +38,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Archiving :: Packaging Topic :: System :: Systems Administration From 475fdd9593c0c1a6f57864de7d11ab0645c3226b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 12 Oct 2020 17:08:33 +0300 Subject: [PATCH 8192/8469] Add changelog --- changelog.d/2420.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2420.misc.rst diff --git a/changelog.d/2420.misc.rst b/changelog.d/2420.misc.rst new file mode 100644 index 0000000000..94984797ca --- /dev/null +++ b/changelog.d/2420.misc.rst @@ -0,0 +1 @@ +Replace Python 3.9.0 beta with 3.9.0 final on GitHub Actions. From 8220a920232fc186978872588e067a3c33e4eee7 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 12 Oct 2020 16:15:01 +0200 Subject: [PATCH 8193/8469] Fix a spelling mistake in the change note s/trove/Trove/ Co-authored-by: Hugo van Kemenade --- changelog.d/2421.misc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2421.misc.rst b/changelog.d/2421.misc.rst index 5dcdeceeb4..295f5de8d3 100644 --- a/changelog.d/2421.misc.rst +++ b/changelog.d/2421.misc.rst @@ -1,2 +1,2 @@ -Python 3.9 trove classifier got added to the dist metadata +Python 3.9 Trove classifier got added to the dist metadata -- by :user:`webknjaz` From f04cd3b21f1bd8ef5c8dedc42fb8708dfdf0fccd Mon Sep 17 00:00:00 2001 From: alvy Date: Mon, 12 Oct 2020 19:23:00 -0400 Subject: [PATCH 8194/8469] make suggested edits --- docs/userguide/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index 8470e268d8..7abc7903fc 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -14,8 +14,8 @@ Transition to PEP517 ==================== Since setuptools no longer serves as the default build tool, one must explicitly -opt in (by providing a ``pyproject.toml`` file) to use this library. The user -facing part is provided by `PEP517 `_ and +opt in (by providing a :file:`pyproject.toml` file) to use this library. The user +facing part is provided by tools such as pip and backend interface is described :ref:`in this document <../build_meta>`. The quickstart provides an overview of the new workflow. From cf9ad4f73a17e669d318187ce9a6cc2e72c3249e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Oct 2020 19:57:20 -0400 Subject: [PATCH 8195/8469] Update changelog --- changelog.d/2413.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2413.misc.rst diff --git a/changelog.d/2413.misc.rst b/changelog.d/2413.misc.rst new file mode 100644 index 0000000000..eaef9c8eca --- /dev/null +++ b/changelog.d/2413.misc.rst @@ -0,0 +1 @@ +Suppress EOF errors (and other exceptions) when importing lib2to3. From f0878e963c3a1086570712d072e967e5c8b57e6a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Oct 2020 20:09:11 -0400 Subject: [PATCH 8196/8469] Exempt README as well. Ref #2395. --- tools/finalize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/finalize.py b/tools/finalize.py index 98b06c070c..352942815a 100644 --- a/tools/finalize.py +++ b/tools/finalize.py @@ -66,10 +66,11 @@ def check_changes(): names. """ allowed = 'deprecation', 'breaking', 'change', 'doc', 'misc' + except_ = 'README.rst', '.gitignore' assert all( any(key in file.name for key in allowed) for file in pathlib.Path('changelog.d').iterdir() - if file.name != '.gitignore' + if file.name not in except_ ) From 0855f30c6f04beaef0354756cd3e30fae244a21a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Oct 2020 20:13:07 -0400 Subject: [PATCH 8197/8469] =?UTF-8?q?Bump=20version:=2050.3.0=20=E2=86=92?= =?UTF-8?q?=2050.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 13 +++++++++++++ changelog.d/2093.doc.rst | 1 - changelog.d/2097.doc.rst | 1 - changelog.d/2102.doc.rst | 1 - changelog.d/2111.doc.rst | 1 - changelog.d/2379.misc.rst | 1 - changelog.d/2395.doc.1.rst | 1 - changelog.d/2395.doc.2.rst | 1 - changelog.d/2413.misc.rst | 1 - setup.cfg | 2 +- 11 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 changelog.d/2093.doc.rst delete mode 100644 changelog.d/2097.doc.rst delete mode 100644 changelog.d/2102.doc.rst delete mode 100644 changelog.d/2111.doc.rst delete mode 100644 changelog.d/2379.misc.rst delete mode 100644 changelog.d/2395.doc.1.rst delete mode 100644 changelog.d/2395.doc.2.rst delete mode 100644 changelog.d/2413.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7a0aef412a..57cc3f1831 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.3.0 +current_version = 50.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 83b56b65cc..c35c4a8792 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +v50.3.1 +------- + +* #2093: Finalized doc revamp. +* #2097: doc: simplify index and group deprecated files +* #2102: doc overhaul step 2: break main doc into multiple sections +* #2111: doc overhaul step 3: update userguide +* #2395: Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz` +* #2395: Added an illustrative explanation about the change notes to fragments dir -- by :user:`webknjaz` +* #2379: Travis CI test suite now tests against PPC64. +* #2413: Suppress EOF errors (and other exceptions) when importing lib2to3. + + v50.3.0 ------- diff --git a/changelog.d/2093.doc.rst b/changelog.d/2093.doc.rst deleted file mode 100644 index 87dbfe82ee..0000000000 --- a/changelog.d/2093.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Finalized doc revamp. diff --git a/changelog.d/2097.doc.rst b/changelog.d/2097.doc.rst deleted file mode 100644 index 03cdec8ad9..0000000000 --- a/changelog.d/2097.doc.rst +++ /dev/null @@ -1 +0,0 @@ -doc: simplify index and group deprecated files diff --git a/changelog.d/2102.doc.rst b/changelog.d/2102.doc.rst deleted file mode 100644 index bdb1a50219..0000000000 --- a/changelog.d/2102.doc.rst +++ /dev/null @@ -1 +0,0 @@ -doc overhaul step 2: break main doc into multiple sections \ No newline at end of file diff --git a/changelog.d/2111.doc.rst b/changelog.d/2111.doc.rst deleted file mode 100644 index 3f44f7aff4..0000000000 --- a/changelog.d/2111.doc.rst +++ /dev/null @@ -1 +0,0 @@ -doc overhaul step 3: update userguide diff --git a/changelog.d/2379.misc.rst b/changelog.d/2379.misc.rst deleted file mode 100644 index 09bd762578..0000000000 --- a/changelog.d/2379.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Travis CI test suite now tests against PPC64. diff --git a/changelog.d/2395.doc.1.rst b/changelog.d/2395.doc.1.rst deleted file mode 100644 index 14a95cf101..0000000000 --- a/changelog.d/2395.doc.1.rst +++ /dev/null @@ -1 +0,0 @@ -Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz` diff --git a/changelog.d/2395.doc.2.rst b/changelog.d/2395.doc.2.rst deleted file mode 100644 index bc861ec330..0000000000 --- a/changelog.d/2395.doc.2.rst +++ /dev/null @@ -1 +0,0 @@ -Added an illustrative explanation about the change notes to fragments dir -- by :user:`webknjaz` diff --git a/changelog.d/2413.misc.rst b/changelog.d/2413.misc.rst deleted file mode 100644 index eaef9c8eca..0000000000 --- a/changelog.d/2413.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Suppress EOF errors (and other exceptions) when importing lib2to3. diff --git a/setup.cfg b/setup.cfg index 80541c31c0..ad3fe4d493 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.3.0 +version = 50.3.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 526241ce94c3d38555914430b9888a8ee0f0ea55 Mon Sep 17 00:00:00 2001 From: alvy Date: Thu, 15 Oct 2020 15:17:38 -0400 Subject: [PATCH 8198/8469] group development related files together --- docs/{ => development}/developer-guide.rst | 0 docs/{ => development}/history.rst | 0 docs/{development.rst => development/index.rst} | 1 + docs/{ => development}/releases.rst | 0 docs/index.rst | 2 +- 5 files changed, 2 insertions(+), 1 deletion(-) rename docs/{ => development}/developer-guide.rst (100%) rename docs/{ => development}/history.rst (100%) rename docs/{development.rst => development/index.rst} (99%) rename docs/{ => development}/releases.rst (100%) diff --git a/docs/developer-guide.rst b/docs/development/developer-guide.rst similarity index 100% rename from docs/developer-guide.rst rename to docs/development/developer-guide.rst diff --git a/docs/history.rst b/docs/development/history.rst similarity index 100% rename from docs/history.rst rename to docs/development/history.rst diff --git a/docs/development.rst b/docs/development/index.rst similarity index 99% rename from docs/development.rst rename to docs/development/index.rst index 28e653fea9..d71d4dfc35 100644 --- a/docs/development.rst +++ b/docs/development/index.rst @@ -33,3 +33,4 @@ setuptools changes. You have been warned. developer-guide formats releases + history diff --git a/docs/releases.rst b/docs/development/releases.rst similarity index 100% rename from docs/releases.rst rename to docs/development/releases.rst diff --git a/docs/index.rst b/docs/index.rst index 5a46052632..33389a2f9b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,5 +10,5 @@ Documentation content: :maxdepth: 1 User guide - Development guide + Development guide Backward compatibility & deprecated practice From d507a9e4e5c13bb0d213ae5de4218e671e50882e Mon Sep 17 00:00:00 2001 From: alvy Date: Thu, 15 Oct 2020 17:03:54 -0400 Subject: [PATCH 8199/8469] revert the change of location of changelog file --- docs/development/index.rst | 1 - docs/{development => }/history.rst | 0 2 files changed, 1 deletion(-) rename docs/{development => }/history.rst (100%) diff --git a/docs/development/index.rst b/docs/development/index.rst index d71d4dfc35..28e653fea9 100644 --- a/docs/development/index.rst +++ b/docs/development/index.rst @@ -33,4 +33,3 @@ setuptools changes. You have been warned. developer-guide formats releases - history diff --git a/docs/development/history.rst b/docs/history.rst similarity index 100% rename from docs/development/history.rst rename to docs/history.rst From ab7fa51fef9b284d2a8723cc926e8c39db07208c Mon Sep 17 00:00:00 2001 From: alvy Date: Thu, 15 Oct 2020 17:08:57 -0400 Subject: [PATCH 8200/8469] fix dev-guide inclusion of fragment guide --- docs/development/developer-guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/developer-guide.rst b/docs/development/developer-guide.rst index d23669317b..13b07e7ea4 100644 --- a/docs/development/developer-guide.rst +++ b/docs/development/developer-guide.rst @@ -68,7 +68,7 @@ intended to solve. All PRs with code changes should include tests. All changes should include a changelog entry. -.. include:: ../changelog.d/README.rst +.. include:: ../../changelog.d/README.rst ------------------- Auto-Merge Requests From ff5d8c4440df27a6f38384d650a0990459a569c3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 15 Oct 2020 15:44:13 +0200 Subject: [PATCH 8201/8469] Recover the changelog docs page link It's been lost as a part of https://github.com/pypa/setuptools/pull/2097 --- docs/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.rst b/docs/index.rst index 5a46052632..42b36ef5cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,3 +12,4 @@ Documentation content: User guide Development guide Backward compatibility & deprecated practice + Changelog From b170eac3e00f65c3d56d48d5aa8ee18f00a7baf9 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 01:09:14 +0200 Subject: [PATCH 8202/8469] =?UTF-8?q?=F0=9F=9A=91=20Make=20Sphinx=20nitpic?= =?UTF-8?q?ky=20about=20broken=20references?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2424 --- docs/conf.py | 4 ++++ tox.ini | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index d5111391d7..1928af58f6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -146,3 +146,7 @@ ], ), } + + +# Be strict about any broken references: +nitpicky = True diff --git a/tox.ini b/tox.ini index 535b67d3b9..828d2c02e3 100644 --- a/tox.ini +++ b/tox.ini @@ -49,7 +49,16 @@ extras = testing changedir = docs commands = - python -m sphinx . {toxinidir}/build/html + {envpython} -m sphinx \ + -j auto \ + -b html \ + --color \ + -a \ + -n \ + -W \ + -d "{temp_dir}/.doctrees" \ + . \ + "{toxinidir}/build/html" [testenv:finalize] skip_install = True From edfa441febf6c5d8af8973ce952b3a0c19b7b575 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 01:14:51 +0200 Subject: [PATCH 8203/8469] =?UTF-8?q?=F0=9F=93=9D=20Recover=20interdoc=20l?= =?UTF-8?q?inks=20&=20correct=20broken=20syntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/build_meta.rst | 3 +- docs/deprecated/index.rst | 1 + docs/development.rst | 1 - docs/index.rst | 5 +++ docs/references/keywords.rst | 12 ++++--- docs/userguide/commands.rst | 4 +-- docs/userguide/datafiles.rst | 9 +++-- docs/userguide/declarative_config.rst | 2 ++ docs/userguide/dependency_management.rst | 11 ++++--- docs/userguide/development_mode.rst | 4 +-- docs/userguide/distribution.rst | 18 ++++++---- docs/userguide/entry_point.rst | 10 ++++-- docs/userguide/extension.rst | 13 ++++++-- docs/userguide/index.rst | 2 ++ docs/userguide/keywords.rst | 42 ++++++++++++------------ docs/userguide/miscellaneous.rst | 8 +++-- docs/userguide/package_discovery.rst | 6 ++-- docs/userguide/quickstart.rst | 12 ++++--- 18 files changed, 101 insertions(+), 62 deletions(-) diff --git a/docs/build_meta.rst b/docs/build_meta.rst index fcc2b7fee6..c36e2bab38 100644 --- a/docs/build_meta.rst +++ b/docs/build_meta.rst @@ -56,7 +56,8 @@ setuptools, the content would be:: requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" -Use ``setuptools``' `declarative config`_ to specify the package information:: +Use ``setuptools``' :ref:`declarative config ` to +specify the package information:: [metadata] name = meowpkg diff --git a/docs/deprecated/index.rst b/docs/deprecated/index.rst index a655b21930..ca80767a77 100644 --- a/docs/deprecated/index.rst +++ b/docs/deprecated/index.rst @@ -17,3 +17,4 @@ objectives. python_eggs easy_install distutils-legacy + functionalities diff --git a/docs/development.rst b/docs/development.rst index 28e653fea9..7ee52361ec 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -31,5 +31,4 @@ setuptools changes. You have been warned. :maxdepth: 1 developer-guide - formats releases diff --git a/docs/index.rst b/docs/index.rst index 42b36ef5cc..961ec394c3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,11 @@ Documentation content: :maxdepth: 1 User guide + build_meta + pkg_resources + references/keywords + roadmap + setuptools Development guide Backward compatibility & deprecated practice Changelog diff --git a/docs/references/keywords.rst b/docs/references/keywords.rst index 563561908c..809491541d 100644 --- a/docs/references/keywords.rst +++ b/docs/references/keywords.rst @@ -1,3 +1,7 @@ +======== +Keywords +======== + ``name`` A string specifying the name of the package. @@ -189,7 +193,7 @@ discovery of services or plugins provided by a project. See :ref:`Dynamic Discovery of Services and Plugins` for details and examples of the format of this argument. In addition, this keyword is used to support - :ref:`Automatic Script Creation`. + :ref:`Automatic Script Creation `. ``extras_require`` A dictionary mapping names of "extras" (optional features of your project) @@ -317,15 +321,15 @@ ``use_2to3`` Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. See :doc:`python3` for more details. + build process. See :doc:`../deprecated/python3` for more details. ``convert_2to3_doctests`` List of doctest source files that need to be converted with 2to3. - See :doc:`python3` for more details. + See :doc:`../deprecated/python3` for more details. ``use_2to3_fixers`` A list of modules to search for additional fixers to be used during - the 2to3 conversion. See :doc:`python3` for more details. + the 2to3 conversion. See :doc:`../deprecated/python3` for more details. ``use_2to3_exclude_fixers`` List of fixer names to be skipped. diff --git a/docs/userguide/commands.rst b/docs/userguide/commands.rst index c64f62bfdd..e632e550b3 100644 --- a/docs/userguide/commands.rst +++ b/docs/userguide/commands.rst @@ -275,7 +275,7 @@ is used when you are building source distributions.) In addition to writing the core egg metadata defined by ``setuptools`` and required by ``pkg_resources``, this command can be extended to write other metadata files as well, by defining entry points in the ``egg_info.writers`` -group. See the section on `Adding new EGG-INFO Files`_ below for more details. +group. See the section on :ref:`Adding new EGG-INFO Files` below for more details. Note that using additional metadata writers may require you to include a ``setup_requires`` argument to ``setup()`` in order to ensure that the desired writers are available on ``sys.path``. @@ -315,7 +315,7 @@ added in the following order: (Note: Because these options modify the version number used for source and binary distributions of your project, you should first make sure that you know how the resulting version numbers will be interpreted by automated tools -like pip. See the section above on `Specifying Your Project's Version`_ for an +like pip. See the section above on :ref:`Specifying Your Project's Version` for an explanation of pre- and post-release tags, as well as tips on how to choose and verify a versioning scheme for your project.) diff --git a/docs/userguide/datafiles.rst b/docs/userguide/datafiles.rst index 315ec7245d..69cf36e699 100644 --- a/docs/userguide/datafiles.rst +++ b/docs/userguide/datafiles.rst @@ -20,8 +20,8 @@ e.g.:: This tells setuptools to install any data files it finds in your packages. The data files must be specified via the distutils' ``MANIFEST.in`` file. (They can also be tracked by a revision control system, using an appropriate -plugin. See the section below on `Adding Support for Revision Control -Systems`_ for information on how to write such plugins.) +plugin. See the section below on :ref:`Adding Support for Revision +Control Systems` for information on how to write such plugins.) If you want finer-grained control over what files are included (for example, if you have documentation files in your package directories and want to exclude @@ -144,6 +144,9 @@ if they track intermediate revisions of your project using Subversion; be sure to let them know when you make changes that remove files from inclusion so they can run ``setup.py clean --all``. + +.. _Accessing Data Files at Runtime: + Accessing Data Files at Runtime ------------------------------- @@ -171,4 +174,4 @@ fall back to the platform-specific location for installing data files, there is no supported facility to reliably retrieve these resources. Instead, the PyPA recommends that any data files you wish to be accessible at -run time be included in the package. \ No newline at end of file +run time be included in the package. diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index 51c897c409..2228bd158c 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -1,3 +1,5 @@ +.. _declarative config: + ----------------------------------------- Configuring setup() using setup.cfg files ----------------------------------------- diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index a26ab6c3b0..354a9f8c36 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -25,7 +25,7 @@ you also need the ``wheel`` package as well since it is recommended that you upload a ``.whl`` file to PyPI alongside your ``.tar.gz`` file. Unlike the other two types of dependency keyword, this one is specified in your ``pyproject.toml`` file (if you have forgot what this is, go to -:ref:`quickstart` or (WIP)): +:doc:`quickstart` or (WIP)): .. code-block:: ini @@ -36,10 +36,11 @@ other two types of dependency keyword, this one is specified in your .. note:: This used to be accomplished with the ``setup_requires`` keyword but is now considered deprecated in favor of the PEP 517 style described above. - To peek into how this legacy keyword is used, consult our :ref:`guide on - deprecated practice (WIP)` + To peek into how this legacy keyword is used, consult our :doc:`guide on + deprecated practice (WIP) <../deprecated/index>` +.. _Declaring Dependencies: Declaring required dependency ============================= @@ -266,7 +267,7 @@ the two dependencies ``PDF`` maps to. The second use case is that other package can use this "extra" for their own dependencies. For example, if "Project-B" needs "project A" with PDF support -installed, it might declare the dependency like this:: +installed, it might declare the dependency like this: .. code-block:: ini @@ -309,4 +310,4 @@ In some cases, you might need to specify the minimum required python version. This is handled with the ``python_requires`` keyword supplied to ``setup.cfg`` or ``setup.py``. -Example WIP \ No newline at end of file +Example WIP diff --git a/docs/userguide/development_mode.rst b/docs/userguide/development_mode.rst index 9d4e758155..bce724a79f 100644 --- a/docs/userguide/development_mode.rst +++ b/docs/userguide/development_mode.rst @@ -49,7 +49,7 @@ source from a staging area using ``setup.py develop --uninstall``, specifying the desired staging area if it's not the default. There are several options to control the precise behavior of the ``develop`` -command; see the section on the `develop`_ command below for more details. +command; see the section on the :ref:`develop ` command below for more details. Note that you can also apply setuptools commands to non-setuptools projects, using commands like this:: @@ -57,4 +57,4 @@ using commands like this:: python -c "import setuptools; with open('setup.py') as f: exec(compile(f.read(), 'setup.py', 'exec'))" develop That is, you can simply list the normal setup commands and options following -the quoted part. \ No newline at end of file +the quoted part. diff --git a/docs/userguide/distribution.rst b/docs/userguide/distribution.rst index 77ea2660e2..377f7bb4f1 100644 --- a/docs/userguide/distribution.rst +++ b/docs/userguide/distribution.rst @@ -23,17 +23,17 @@ egg distributions by adding one or more of the following to the project's You can add these tags by adding ``egg_info`` and the desired options to the command line ahead of the ``sdist`` or ``bdist`` commands that you want to generate a daily build or snapshot for. See the section below on the -`egg_info`_ command for more details. +:ref:`egg_info ` command for more details. (Also, before you release your project, be sure to see the section above on -`Specifying Your Project's Version`_ for more information about how pre- and +:ref:`Specifying Your Project's Version` for more information about how pre- and post-release tags affect how version numbers are interpreted. This is important in order to make sure that dependency processing tools will know which versions of your project are newer than others.) Finally, if you are creating builds frequently, and either building them in a downloadable location or are copying them to a distribution server, you should -probably also check out the `rotate`_ command, which lets you automatically +probably also check out the :ref:`rotate ` command, which lets you automatically delete all but the N most-recently-modified distributions matching a glob pattern. So, you can use a command line like:: @@ -46,7 +46,7 @@ that were built most recently. If you have to manage automated builds for multiple packages, each with different tagging and rotation policies, you may also want to check out the -`alias`_ command, which would let each package define an alias like ``daily`` +:ref:`alias ` command, which would let each package define an alias like ``daily`` that would perform the necessary tag, build, and rotate commands. Then, a simpler script or cron job could just run ``setup.py daily`` in each project directory. (And, you could also define sitewide or per-user default versions @@ -61,7 +61,7 @@ selection with pluggable endpoints for looking up files to include. If you are using a revision control system, and your source distributions only need to include files that you're tracking in revision control, use a corresponding plugin instead of writing a ``MANIFEST.in`` file. See the section below on -`Adding Support for Revision Control Systems`_ for information on plugins. +:ref:`Adding Support for Revision Control Systems` for information on plugins. If you need to include automatically generated files, or files that are kept in an unsupported revision control system, you'll need to create a ``MANIFEST.in`` @@ -114,7 +114,8 @@ You can then use it like this:: setup.py release sdist bdist_egg Or of course you can create more elaborate aliases that do all of the above. -See the sections below on the `egg_info`_ and `alias`_ commands for more ideas. +See the sections below on the :ref:`egg_info ` and +:ref:`alias ` commands for more ideas. Distributing Extensions compiled with Cython -------------------------------------------- @@ -154,6 +155,9 @@ control system will be able to build it even if they don't have Cython installed, and that your source releases will be similarly usable with or without Cython. + +.. _Specifying Your Project's Version: + Specifying Your Project's Version --------------------------------- @@ -237,4 +241,4 @@ have setuptools automatically tag your in-development releases with various pre- or post-release tags. See the following sections for more details: * `Tagging and "Daily Build" or "Snapshot" Releases`_ -* The `egg_info`_ command \ No newline at end of file +* The :ref:`egg_info ` command diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 7f5165a876..d1127ae4fa 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -33,6 +33,8 @@ with ``__init__.py`` as: and ``__main__.py`` providing a hook: +.. code-block:: python + from . import hello_world if __name__ == '__main__': hello_world() @@ -49,7 +51,7 @@ user-friendly name for installers of the package to execute. Installers like pip will create wrapper scripts to execute a function. In the above example, to create a command ``hello-world`` that invokes ``timmins.hello_world``, add a console script entry point to -``setup.cfg``:: +``setup.cfg``: .. code-block:: ini @@ -74,6 +76,8 @@ In addition to ``console_scripts``, Setuptools supports ``gui_scripts``, which will launch a GUI application without running in a terminal window. +.. _dynamic discovery of services and plugins: + Advertising Behavior ==================== @@ -138,9 +142,9 @@ Some entry points may require additional dependencies to properly function. For such an entry point, declare in square brakets any number of dependency ``extras`` following the entry point definition. Such entry points will only be viable if their extras were declared and installed. See the -:ref:`guide on dependencies management ` for +:doc:`guide on dependencies management ` for more information on defining extra requirements. Consider from the -above example:: +above example: .. code-block:: ini diff --git a/docs/userguide/extension.rst b/docs/userguide/extension.rst index 1e4846fc92..4de24ec9d3 100644 --- a/docs/userguide/extension.rst +++ b/docs/userguide/extension.rst @@ -1,3 +1,5 @@ +.. _Creating ``distutils`` Extensions: + Creating ``distutils`` Extensions ================================= @@ -9,8 +11,8 @@ the extension just refer to it in their ``setup_requires`` argument. With ``setuptools``, your distutils extension projects can hook in new commands and ``setup()`` arguments just by defining "entry points". These are mappings from command or argument names to a specification of where to -import a handler from. (See the section on `Dynamic Discovery of Services and -Plugins`_ above for some more background on entry points.) +import a handler from. (See the section on :ref:`Dynamic Discovery of +Services and Plugins` above for some more background on entry points.) Adding Commands @@ -120,6 +122,8 @@ plugin is encouraged to load the configuration/settings for their behavior independently. +.. _Adding new EGG-INFO Files: + Adding new EGG-INFO Files ------------------------- @@ -173,6 +177,9 @@ the ``cmd`` object's ``write_file()``, ``delete_file()``, and ``write_or_delete_file()`` methods exclusively for your file operations. See those methods' docstrings for more details. + +.. _Adding Support for Revision Control Systems: + Adding Support for Revision Control Systems ------------------------------------------------- @@ -232,4 +239,4 @@ A few important points for writing revision control file finders: * Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully with the absence of needed programs (i.e., ones belonging to the revision control system itself. It *may*, however, use ``distutils.log.warn()`` to - inform the user of the missing program(s). \ No newline at end of file + inform the user of the missing program(s). diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index abee331a2f..57b059e50b 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -24,3 +24,5 @@ ordinary Python packages based on the ``distutils``. declarative_config keywords commands + functionalities_rewrite + miscellaneous diff --git a/docs/userguide/keywords.rst b/docs/userguide/keywords.rst index e2852b3410..58fe74bc4a 100644 --- a/docs/userguide/keywords.rst +++ b/docs/userguide/keywords.rst @@ -8,19 +8,19 @@ unless you need the associated ``setuptools`` feature. ``include_package_data`` If set to ``True``, this tells ``setuptools`` to automatically include any data files it finds inside your package directories that are specified by - your ``MANIFEST.in`` file. For more information, see the section below on - `Including Data Files`_. + your ``MANIFEST.in`` file. For more information, see the section on + :ref:`Including Data Files`. ``exclude_package_data`` A dictionary mapping package names to lists of glob patterns that should be *excluded* from your package directories. You can use this to trim back any excess files included by ``include_package_data``. For a complete - description and examples, see the section below on `Including Data Files`_. + description and examples, see the section on :ref:`Including Data Files`. ``package_data`` A dictionary mapping package names to lists of glob patterns. For a - complete description and examples, see the section below on `Including - Data Files`_. You do not need to use this option if you are using + complete description and examples, see the section on :ref:`Including + Data Files`. You do not need to use this option if you are using ``include_package_data``, unless you need to add e.g. files that are generated by your setup script and build process. (And are therefore not in source control or are files that you don't want to include in your @@ -34,22 +34,22 @@ unless you need the associated ``setuptools`` feature. ``install_requires`` A string or list of strings specifying what other distributions need to - be installed when this one is. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. + be installed when this one is. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. ``entry_points`` A dictionary mapping entry point group names to strings or lists of strings defining the entry points. Entry points are used to support dynamic - discovery of services or plugins provided by a project. See `Dynamic - Discovery of Services and Plugins`_ for details and examples of the format - of this argument. In addition, this keyword is used to support `Automatic - Script Creation`_. + discovery of services or plugins provided by a project. See :ref:`Dynamic + Discovery of Services and Plugins` for details and examples of the format + of this argument. In addition, this keyword is used to support + :ref:`Automatic Script Creation `. ``extras_require`` A dictionary mapping names of "extras" (optional features of your project) to strings or lists of strings specifying what other distributions must be - installed to support those features. See the section below on `Declaring - Dependencies`_ for details and examples of the format of this argument. + installed to support those features. See the section on :ref:`Declaring + Dependencies` for details and examples of the format of this argument. ``python_requires`` A string corresponding to a version specifier (as defined in PEP 440) for @@ -87,7 +87,7 @@ unless you need the associated ``setuptools`` feature. as you declare them in each project that contains any subpackages of the namespace package, and as long as the namespace package's ``__init__.py`` does not contain any code other than a namespace declaration. See the - section below on `Namespace Packages`_ for more information. + section below on :ref:`Namespace Packages` for more information. ``test_suite`` A string naming a ``unittest.TestCase`` subclass (or a package or module @@ -98,9 +98,9 @@ unless you need the associated ``setuptools`` feature. added to the tests to be run. If the named suite is a package, any submodules and subpackages are recursively added to the overall test suite. - Specifying this argument enables use of the `test`_ command to run the + Specifying this argument enables use of the :ref:`test ` command to run the specified test suite, e.g. via ``setup.py test``. See the section on the - `test`_ command below for more details. + :ref:`test ` command below for more details. New in 41.5.0: Deprecated the test command. @@ -155,21 +155,21 @@ unless you need the associated ``setuptools`` feature. extensions that access other files in the project (such as data files or shared libraries), you probably do NOT need this argument and shouldn't mess with it. For more details on how this argument works, see the section - below on `Automatic Resource Extraction`_. + below on :ref:`Automatic Resource Extraction`. ``use_2to3`` Convert the source code from Python 2 to Python 3 with 2to3 during the - build process. See :doc:`python3` for more details. + build process. See :doc:`../deprecated/python3` for more details. ``convert_2to3_doctests`` List of doctest source files that need to be converted with 2to3. - See :doc:`python3` for more details. + See :doc:`../deprecated/python3` for more details. ``use_2to3_fixers`` A list of modules to search for additional fixers to be used during - the 2to3 conversion. See :doc:`python3` for more details. + the 2to3 conversion. See :doc:`../deprecated/python3` for more details. ``project_urls`` An arbitrary map of URL names to hyperlinks, allowing more extensible documentation of where various resources can be found than the simple - ``url`` and ``download_url`` options provide. \ No newline at end of file + ``url`` and ``download_url`` options provide. diff --git a/docs/userguide/miscellaneous.rst b/docs/userguide/miscellaneous.rst index 65e075cddc..3df327d795 100644 --- a/docs/userguide/miscellaneous.rst +++ b/docs/userguide/miscellaneous.rst @@ -1,3 +1,5 @@ +.. _Automatic Resource Extraction: + Automatic Resource Extraction ----------------------------- @@ -46,8 +48,8 @@ directory. However, since it can be tedious to create such files by hand, you may want to create a distutils extension that will create the necessary files from arguments to ``setup()``, in much the same way that ``setuptools`` does for many of the ``setup()`` arguments it adds. See the section below on -`Creating distutils Extensions`_ for more details, especially the subsection on -`Adding new EGG-INFO Files`_. +:ref:`Creating ``distutils\`\` Extensions` for more details, especially the +subsection on :ref:`Adding new EGG-INFO Files`. Setting the ``zip_safe`` flag ----------------------------- @@ -75,7 +77,7 @@ no ``__file__`` or ``__path__`` introspection or source code manipulation, then there is an extremely solid chance the project will work when installed as a zipfile. (And if the project uses ``pkg_resources`` for all its data file access, then C extensions and other data files shouldn't be a problem at all. -See the `Accessing Data Files at Runtime`_ section above for more information.) +See the :ref:`Accessing Data Files at Runtime` section above for more information.) However, if ``bdist_egg`` can't be *sure* that your package will work, but you've checked over all the warnings it issued, and you are either satisfied it diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 0e0d27c5b2..3915408d67 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -6,13 +6,13 @@ Package Discovery and Namespace Package .. note:: a full specification for the keyword supplied to ``setup.cfg`` or - ``setup.py`` can be found at :ref:`keywords reference ` + ``setup.py`` can be found at :doc:`keywords reference ` .. note:: the examples provided here are only to demonstrate the functionality introduced. More metadata and options arguments need to be supplied if you want to replicate them on your system. If you are completely - new to setuptools, the :ref:`quickstart section ` is a good + new to setuptools, the :doc:`quickstart section ` is a good place to start. ``Setuptools`` provide powerful tools to handle package discovery, including @@ -97,6 +97,8 @@ in ``src`` that starts with the name ``pkg`` and not ``additional``: ) +.. _Namespace Packages: + Using ``find_namespace:`` or ``find_namespace_packages`` ======================================================== ``setuptools`` provides the ``find_namespace:`` (``find_namespace_packages``) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 5282975102..3ee4fc8c19 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -82,8 +82,8 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` -therefore provides two convenient tools to ease the burden: ``find: `` and -``find_namespace: ``. To use it in your project: +therefore provides two convenient tools to ease the burden: :literal:`find:\ ` and +:literal:`find_namespace:\ `. To use it in your project: .. code-block:: ini @@ -122,7 +122,7 @@ keyword in your ``setup.cfg``: When this project is installed, a ``main`` script will be installed and will invoke the ``some_func`` in the ``__init__.py`` file when called by the user. For detailed usage, including managing the additional or optional dependencies, -go to :ref:`entry_point`. +go to :doc:`entry_point`. Dependency management @@ -147,9 +147,11 @@ additional keywords such as ``setup_requires`` that allows you to install dependencies before running the script, and ``extras_requires`` that take care of those needed by automatically generated scripts. It also provides mechanisms to handle dependencies that are not in PyPI. For more advanced use, -see :ref:`dependency_management` +see :doc:`dependency_management` +.. _Including Data Files: + Including Data Files ==================== The distutils have traditionally allowed installation of "data files", which @@ -164,7 +166,7 @@ can simply use the ``include_package_data`` keyword: This tells setuptools to install any data files it finds in your packages. The data files must be specified via the distutils' ``MANIFEST.in`` file. -For more details, see :ref:`datafiles` +For more details, see :doc:`datafiles` Development mode From 883f33613572e3c92021b58522b54958b00cdc87 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 01:13:03 +0200 Subject: [PATCH 8204/8469] =?UTF-8?q?=E2=9C=A8Make=20the=20default=20impli?= =?UTF-8?q?cit=20role=20autofind=20targets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.rst | 68 +++--- docs/conf.py | 5 + docs/pkg_resources.rst | 306 +++++++++++++------------- docs/references/keywords.rst | 2 +- docs/userguide/declarative_config.rst | 10 +- docs/userguide/keywords.rst | 2 +- docs/userguide/quickstart.rst | 3 +- 7 files changed, 200 insertions(+), 196 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c35c4a8792..c96fb0bc9d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,9 +22,9 @@ v50.2.0 * #2355: When pip is imported as part of a build, leave distutils patched. * #2380: There are some setuptools specific changes in the - `setuptools.command.bdist_rpm` module that are no longer needed, because - they are part of the `bdist_rpm` module in distutils in Python - 3.5.0. Therefore, code was removed from `setuptools.command.bdist_rpm`. + ``setuptools.command.bdist_rpm`` module that are no longer needed, because + they are part of the ``bdist_rpm`` module in distutils in Python + 3.5.0. Therefore, code was removed from ``setuptools.command.bdist_rpm``. v50.1.0 @@ -48,7 +48,7 @@ v50.0.2 v50.0.1 ------- -* #2357: Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`. +* #2357: Restored Python 3.5 support in distutils.util for missing ``subprocess._optim_args_from_interpreter_flags``. * #2358: Restored AIX support on Python 3.8 and earlier. * #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class from importlib.abc rather than importlib.util.abc (alias removed in Python @@ -495,7 +495,7 @@ v40.7.1 v40.7.0 ------- -* #1551: File inputs for the `license` field in `setup.cfg` files now explicitly raise an error. +* #1551: File inputs for the ``license`` field in ``setup.cfg`` files now explicitly raise an error. * #1180: Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136). * #1499: ``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485. * #1544: Added tests for PackageIndex.download (for git URLs). @@ -545,7 +545,7 @@ v40.5.0 * #1335: In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks. * #1502: Deprecated support for downloads from Subversion in package_index/easy_install. -* #1517: Dropped use of six.u in favor of `u""` literals. +* #1517: Dropped use of six.u in favor of ``u""`` literals. * #1520: Added support for ``data_files`` in ``setup.cfg``. * #1525: Fixed rendering of the deprecation warning in easy_install doc. @@ -594,7 +594,7 @@ v40.2.0 v40.1.1 -------- -* #1465: Fix regression with `egg_info` command when tagging is used. +* #1465: Fix regression with ``egg_info`` command when tagging is used. v40.1.0 @@ -631,8 +631,8 @@ v39.2.0 a text file. * #1360: Fixed issue with a mismatch between the name of the package and the name of the .dist-info file in wheel files -* #1364: Add `__dir__()` implementation to `pkg_resources.Distribution()` that - includes the attributes in the `_provider` instance variable. +* #1364: Add ``__dir__()`` implementation to ``pkg_resources.Distribution()`` that + includes the attributes in the ``_provider`` instance variable. * #1365: Take the package_dir option into account when loading the version from a module attribute. * #1353: Added coverage badge to README. @@ -742,7 +742,7 @@ v38.2.5 v38.2.4 ------- -* #1220: Fix `data_files` handling when installing from wheel. +* #1220: Fix ``data_files`` handling when installing from wheel. v38.2.3 ------- @@ -1506,7 +1506,7 @@ v25.4.0 v25.3.0 ------- -* #739 Fix unquoted libpaths by fixing compatibility between `numpy.distutils` and `distutils._msvccompiler` for numpy < 1.11.2 (Fix issue #728, error also fixed in Numpy). +* #739 Fix unquoted libpaths by fixing compatibility between ``numpy.distutils`` and ``distutils._msvccompiler`` for numpy < 1.11.2 (Fix issue #728, error also fixed in Numpy). * #731: Bump certifi. @@ -1523,13 +1523,13 @@ v25.2.0 v25.1.6 ------- -* #725: revert `library_dir_option` patch (Error is related to `numpy.distutils` and make errors on non Numpy users). +* #725: revert ``library_dir_option`` patch (Error is related to ``numpy.distutils`` and make errors on non Numpy users). v25.1.5 ------- * #720 -* #723: Improve patch for `library_dir_option`. +* #723: Improve patch for ``library_dir_option``. v25.1.4 ------- @@ -1537,7 +1537,7 @@ v25.1.4 * #717 * #713 * #707: Fix Python 2 compatibility for MSVC by catching errors properly. -* #715: Fix unquoted libpaths by patching `library_dir_option`. +* #715: Fix unquoted libpaths by patching ``library_dir_option``. v25.1.3 ------- @@ -3065,10 +3065,10 @@ not all users will find 1.0 a drop-in replacement for 0.9. * Issue #50: Normalized API of environment marker support. Specifically, removed line number and filename from SyntaxErrors when returned from - `pkg_resources.invalid_marker`. Any clients depending on the specific + ``pkg_resources.invalid_marker``. Any clients depending on the specific string representation of exceptions returned by that function may need to be updated to account for this change. -* Issue #50: SyntaxErrors generated by `pkg_resources.invalid_marker` are +* Issue #50: SyntaxErrors generated by ``pkg_resources.invalid_marker`` are normalized for cross-implementation consistency. * Removed ``--ignore-conflicts-at-my-risk`` and ``--delete-conflicting`` options to easy_install. These options have been deprecated since 0.6a11. @@ -3076,13 +3076,13 @@ not all users will find 1.0 a drop-in replacement for 0.9. 0.9.8 ----- -* Issue #53: Fix NameErrors in `_vcs_split_rev_from_url`. +* Issue #53: Fix NameErrors in ``_vcs_split_rev_from_url``. 0.9.7 ----- * Issue #49: Correct AttributeError on PyPy where a hashlib.HASH object does - not have a `.name` attribute. + not have a ``.name`` attribute. * Issue #34: Documentation now refers to bootstrap script in code repository referenced by bookmark. * Add underscore-separated keys to environment markers (markerlib). @@ -3090,7 +3090,7 @@ not all users will find 1.0 a drop-in replacement for 0.9. 0.9.6 ----- -* Issue #44: Test failure on Python 2.4 when MD5 hash doesn't have a `.name` +* Issue #44: Test failure on Python 2.4 when MD5 hash doesn't have a ``.name`` attribute. 0.9.5 @@ -3124,7 +3124,7 @@ not all users will find 1.0 a drop-in replacement for 0.9. 0.9 --- -* `package_index` now validates hashes other than MD5 in download links. +* ``package_index`` now validates hashes other than MD5 in download links. 0.8 --- @@ -3171,7 +3171,7 @@ not all users will find 1.0 a drop-in replacement for 0.9. 0.7.2 ----- -* Issue #14: Use markerlib when the `parser` module is not available. +* Issue #14: Use markerlib when the ``parser`` module is not available. * Issue #10: ``ez_setup.py`` now uses HTTPS to download setuptools from PyPI. 0.7.1 @@ -3255,7 +3255,7 @@ Added several features that were slated for setuptools 0.6c12: ------ * Distribute #27: Use public api for loading resources from zip files rather than - the private method `_zip_directory_cache`. + the private method ``_zip_directory_cache``. * Added a new function ``easy_install.get_win_launcher`` which may be used by third-party libraries such as buildout to get a suitable script launcher. @@ -3321,7 +3321,7 @@ how it parses version numbers. * Fix 2 errors with Jython 2.5. * Fix 1 failure with Jython 2.5 and 2.7. * Disable workaround for Jython scripts on Linux systems. -* Distribute #336: `setup.py` no longer masks failure exit code when tests fail. +* Distribute #336: ``setup.py`` no longer masks failure exit code when tests fail. * Fix issue in pkg_resources where try/except around a platform-dependent import would trigger hook load failures on Mercurial. See pull request 32 for details. @@ -3332,7 +3332,7 @@ how it parses version numbers. * Fix test suite with Python 2.6. * Fix some DeprecationWarnings and ResourceWarnings. -* Distribute #335: Backed out `setup_requires` superceding installed requirements +* Distribute #335: Backed out ``setup_requires`` superceding installed requirements until regression can be addressed. 0.6.31 @@ -3342,7 +3342,7 @@ how it parses version numbers. * Distribute #329: Properly close files created by tests for compatibility with Jython. * Work around Jython #1980 and Jython #1981. -* Distribute #334: Provide workaround for packages that reference `sys.__stdout__` +* Distribute #334: Provide workaround for packages that reference ``sys.__stdout__`` such as numpy does. This change should address `virtualenv #359 `_ as long as the system encoding is UTF-8 or the IO encoding is specified in the @@ -3351,7 +3351,7 @@ how it parses version numbers. PYTHONIOENCODING=utf8 pip install numpy * Fix for encoding issue when installing from Windows executable on Python 3. -* Distribute #323: Allow `setup_requires` requirements to supercede installed +* Distribute #323: Allow ``setup_requires`` requirements to supercede installed requirements. Added some new keyword arguments to existing pkg_resources methods. Also had to updated how __path__ is handled for namespace packages to ensure that when a new egg distribution containing a namespace package is @@ -3371,16 +3371,16 @@ how it parses version numbers. * BB Pull Request #14: Honor file permissions in zip files. * Distribute #327: Merged pull request #24 to fix a dependency problem with pip. * Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301. -* If Sphinx is installed, the `upload_docs` command now runs `build_sphinx` +* If Sphinx is installed, the ``upload_docs`` command now runs ``build_sphinx`` to produce uploadable documentation. -* Distribute #326: `upload_docs` provided mangled auth credentials under Python 3. +* Distribute #326: ``upload_docs`` provided mangled auth credentials under Python 3. * Distribute #320: Fix check for "createable" in distribute_setup.py. * Distribute #305: Remove a warning that was triggered during normal operations. * Distribute #311: Print metadata in UTF-8 independent of platform. * Distribute #303: Read manifest file with UTF-8 encoding under Python 3. * Distribute #301: Allow to run tests of namespace packages when using 2to3. * Distribute #304: Prevent import loop in site.py under Python 3.3. -* Distribute #283: Reenable scanning of `*.pyc` / `*.pyo` files on Python 3.3. +* Distribute #283: Reenable scanning of ``*.pyc`` / ``*.pyo`` files on Python 3.3. * Distribute #299: The develop command didn't work on Python 3, when using 2to3, as the egg link would go to the Python 2 source. Linking to the 2to3'd code in build/lib makes it work, although you will have to rebuild the module @@ -3390,10 +3390,10 @@ how it parses version numbers. * Distribute #313: Support for sdist subcommands (Python 2.7) * Distribute #314: test_local_index() would fail an OS X. * Distribute #310: Non-ascii characters in a namespace __init__.py causes errors. -* Distribute #218: Improved documentation on behavior of `package_data` and - `include_package_data`. Files indicated by `package_data` are now included +* Distribute #218: Improved documentation on behavior of ``package_data`` and + ``include_package_data``. Files indicated by ``package_data`` are now included in the manifest. -* `distribute_setup.py` now allows a `--download-base` argument for retrieving +* ``distribute_setup.py`` now allows a ``--download-base`` argument for retrieving distribute from a specified location. 0.6.28 @@ -3402,7 +3402,7 @@ how it parses version numbers. * Distribute #294: setup.py can now be invoked from any directory. * Scripts are now installed honoring the umask. * Added support for .dist-info directories. -* Distribute #283: Fix and disable scanning of `*.pyc` / `*.pyo` files on +* Distribute #283: Fix and disable scanning of ``*.pyc`` / ``*.pyo`` files on Python 3.3. 0.6.27 @@ -3636,7 +3636,7 @@ how it parses version numbers. 0.6.4 ----- -* Added the generation of `distribute_setup_3k.py` during the release. +* Added the generation of ``distribute_setup_3k.py`` during the release. This closes Distribute #52. * Added an upload_docs command to easily upload project documentation to diff --git a/docs/conf.py b/docs/conf.py index 1928af58f6..982f5e6212 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -150,3 +150,8 @@ # Be strict about any broken references: nitpicky = True + + +# Ref: https://github.com/python-attrs/attrs/pull/571/files\ +# #diff-85987f48f1258d9ee486e3191495582dR82 +default_role = 'any' diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst index 7d0d8da92a..364e218328 100644 --- a/docs/pkg_resources.rst +++ b/docs/pkg_resources.rst @@ -149,7 +149,7 @@ more information on this.) Also, you must add a ``declare_namespace()`` call in the package's ``__init__.py`` file(s): ``declare_namespace(name)`` - Declare that the dotted package name `name` is a "namespace package" whose + Declare that the dotted package name ``name`` is a "namespace package" whose contained packages and modules may be spread across multiple distributions. The named package's ``__path__`` will be extended to include the corresponding package in all distributions on ``sys.path`` that contain a @@ -163,7 +163,7 @@ Applications that manipulate namespace packages or directly alter ``sys.path`` at runtime may also need to use this API function: ``fixup_namespace_packages(path_item)`` - Declare that `path_item` is a newly added item on ``sys.path`` that may + Declare that ``path_item`` is a newly added item on ``sys.path`` that may need to be used to update existing namespace packages. Ordinarily, this is called for you when an egg is automatically added to ``sys.path``, but if your application modifies ``sys.path`` to include locations that may @@ -197,7 +197,7 @@ not provide any way to detect arbitrary changes to a list object like ``working_set`` based on changes to ``sys.path``. ``WorkingSet(entries=None)`` - Create a ``WorkingSet`` from an iterable of path entries. If `entries` + Create a ``WorkingSet`` from an iterable of path entries. If ``entries`` is not supplied, it defaults to the value of ``sys.path`` at the time the constructor is called. @@ -229,9 +229,9 @@ abbreviation for ``pkg_resources.working_set.require()``: ``require(*requirements)`` - Ensure that distributions matching `requirements` are activated + Ensure that distributions matching ``requirements`` are activated - `requirements` must be a string or a (possibly-nested) sequence + ``requirements`` must be a string or a (possibly-nested) sequence thereof, specifying the distributions and versions required. The return value is a sequence of the distributions that needed to be activated to fulfill the requirements; all relevant distributions are @@ -259,8 +259,8 @@ abbreviation for ``pkg_resources.working_set.require()``: ``obtain()`` method of ``Environment`` objects. ``run_script(requires, script_name)`` - Locate distribution specified by `requires` and run its `script_name` - script. `requires` must be a string containing a requirement specifier. + Locate distribution specified by ``requires`` and run its ``script_name`` + script. ``requires`` must be a string containing a requirement specifier. (See `Requirements Parsing`_ below for the syntax.) The script, if found, will be executed in *the caller's globals*. That's @@ -274,11 +274,11 @@ abbreviation for ``pkg_resources.working_set.require()``: object's `Metadata API`_ instead. ``iter_entry_points(group, name=None)`` - Yield entry point objects from `group` matching `name` + Yield entry point objects from ``group`` matching ``name`` - If `name` is None, yields all entry points in `group` from all + If ``name`` is None, yields all entry points in ``group`` from all distributions in the working set, otherwise only ones matching both - `group` and `name` are yielded. Entry points are yielded from the active + ``group`` and ``name`` are yielded. Entry points are yielded from the active distributions in the order that the distributions appear in the working set. (For the global ``working_set``, this should be the same as the order that they are listed in ``sys.path``.) Note that within the entry points @@ -301,14 +301,14 @@ instance: called by the ``WorkingSet()`` constructor during initialization. This method uses ``find_distributions(entry,True)`` to find distributions - corresponding to the path entry, and then ``add()`` them. `entry` is + corresponding to the path entry, and then ``add()`` them. ``entry`` is always appended to the ``entries`` attribute, even if it is already present, however. (This is because ``sys.path`` can contain the same value more than once, and the ``entries`` attribute should be able to reflect this.) ``__contains__(dist)`` - True if `dist` is active in this ``WorkingSet``. Note that only one + True if ``dist`` is active in this ``WorkingSet``. Note that only one distribution for a given project can be active in a given ``WorkingSet``. ``__iter__()`` @@ -317,34 +317,34 @@ instance: added to the working set. ``find(req)`` - Find a distribution matching `req` (a ``Requirement`` instance). + Find a distribution matching ``req`` (a ``Requirement`` instance). If there is an active distribution for the requested project, this returns it, as long as it meets the version requirement specified by - `req`. But, if there is an active distribution for the project and it - does *not* meet the `req` requirement, ``VersionConflict`` is raised. + ``req``. But, if there is an active distribution for the project and it + does *not* meet the ``req`` requirement, ``VersionConflict`` is raised. If there is no active distribution for the requested project, ``None`` is returned. ``resolve(requirements, env=None, installer=None)`` - List all distributions needed to (recursively) meet `requirements` + List all distributions needed to (recursively) meet ``requirements`` - `requirements` must be a sequence of ``Requirement`` objects. `env`, + ``requirements`` must be a sequence of ``Requirement`` objects. ``env``, if supplied, should be an ``Environment`` instance. If not supplied, an ``Environment`` is created from the working set's - ``entries``. `installer`, if supplied, will be invoked with each + ``entries``. ``installer``, if supplied, will be invoked with each requirement that cannot be met by an already-installed distribution; it should return a ``Distribution`` or ``None``. (See the ``obtain()`` method - of `Environment Objects`_, below, for more information on the `installer` + of `Environment Objects`_, below, for more information on the ``installer`` argument.) ``add(dist, entry=None)`` - Add `dist` to working set, associated with `entry` + Add ``dist`` to working set, associated with ``entry`` - If `entry` is unspecified, it defaults to ``dist.location``. On exit from - this routine, `entry` is added to the end of the working set's ``.entries`` + If ``entry`` is unspecified, it defaults to ``dist.location``. On exit from + this routine, ``entry`` is added to the end of the working set's ``.entries`` (if it wasn't already present). - `dist` is only added to the working set if it's for a project that + ``dist`` is only added to the working set if it's for a project that doesn't already have a distribution active in the set. If it's successfully added, any callbacks registered with the ``subscribe()`` method will be called. (See `Receiving Change Notifications`_, below.) @@ -401,7 +401,7 @@ environment for the newest version of each project that can be safely loaded without conflicts or missing requirements. ``find_plugins(plugin_env, full_env=None, fallback=True)`` - Scan `plugin_env` and identify which distributions could be added to this + Scan ``plugin_env`` and identify which distributions could be added to this working set without version conflicts or missing requirements. Example usage:: @@ -412,19 +412,19 @@ without conflicts or missing requirements. map(working_set.add, distributions) # add plugins+libs to sys.path print "Couldn't load", errors # display errors - The `plugin_env` should be an ``Environment`` instance that contains only + The ``plugin_env`` should be an ``Environment`` instance that contains only distributions that are in the project's "plugin directory" or directories. - The `full_env`, if supplied, should be an ``Environment`` instance that + The ``full_env``, if supplied, should be an ``Environment`` instance that contains all currently-available distributions. - If `full_env` is not supplied, one is created automatically from the + If ``full_env`` is not supplied, one is created automatically from the ``WorkingSet`` this method is called on, which will typically mean that every directory on ``sys.path`` will be scanned for distributions. - This method returns a 2-tuple: (`distributions`, `error_info`), where - `distributions` is a list of the distributions found in `plugin_env` that + This method returns a 2-tuple: (``distributions``, ``error_info``), where + ``distributions`` is a list of the distributions found in ``plugin_env`` that were loadable, along with any other distributions that are needed to resolve - their dependencies. `error_info` is a dictionary mapping unloadable plugin + their dependencies. ``error_info`` is a dictionary mapping unloadable plugin distributions to an exception instance describing the error that occurred. Usually this will be a ``DistributionNotFound`` or ``VersionConflict`` instance. @@ -436,7 +436,7 @@ without conflicts or missing requirements. metadata tracking and hooks to be activated. The resolution algorithm used by ``find_plugins()`` is as follows. First, - the project names of the distributions present in `plugin_env` are sorted. + the project names of the distributions present in ``plugin_env`` are sorted. Then, each project's eggs are tried in descending version order (i.e., newest version first). @@ -446,7 +446,7 @@ without conflicts or missing requirements. the next project name, and no older eggs for that project are tried. If the resolution attempt fails, however, the error is added to the error - dictionary. If the `fallback` flag is true, the next older version of the + dictionary. If the ``fallback`` flag is true, the next older version of the plugin is tried, until a working version is found. If false, the resolution process continues with the next plugin project name. @@ -455,7 +455,7 @@ without conflicts or missing requirements. may not be able to safely downgrade a version of a package. Others may want to ensure that a new plugin configuration is either 100% good or else revert to a known-good configuration. (That is, they may wish to revert to - a known configuration if the `error_info` return value is non-empty.) + a known configuration if the ``error_info`` return value is non-empty.) Note that this algorithm gives precedence to satisfying the dependencies of alphabetically prior project names in case of version conflicts. If two @@ -473,22 +473,22 @@ that are present and potentially importable on the current platform. distributions during dependency resolution. ``Environment(search_path=None, platform=get_supported_platform(), python=PY_MAJOR)`` - Create an environment snapshot by scanning `search_path` for distributions - compatible with `platform` and `python`. `search_path` should be a + Create an environment snapshot by scanning ``search_path`` for distributions + compatible with ``platform`` and ``python``. ``search_path`` should be a sequence of strings such as might be used on ``sys.path``. If a - `search_path` isn't supplied, ``sys.path`` is used. + ``search_path`` isn't supplied, ``sys.path`` is used. - `platform` is an optional string specifying the name of the platform + ``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 + unspecified, it defaults to the current platform. ``python`` is an optional string naming the desired version of Python (e.g. ``'2.4'``); it defaults to the currently-running version. - You may explicitly set `platform` (and/or `python`) to ``None`` if you + You may explicitly set ``platform`` (and/or ``python``) to ``None`` if you wish to include *all* distributions, not just those compatible with the running platform or Python version. - Note that `search_path` is scanned immediately for distributions, and the + Note that ``search_path`` is scanned immediately for distributions, and the resulting ``Environment`` is a snapshot of the found distributions. It is not automatically updated if the system's state changes due to e.g. installation or removal of distributions. @@ -504,15 +504,15 @@ distributions during dependency resolution. The yielded names are always in lower case. ``add(dist)`` - Add `dist` to the environment if it matches the platform and python version + Add ``dist`` to the environment if it matches the platform and python version specified at creation time, and only if the distribution hasn't already been added. (i.e., adding the same distribution more than once is a no-op.) ``remove(dist)`` - Remove `dist` from the environment. + Remove ``dist`` from the environment. ``can_add(dist)`` - Is distribution `dist` acceptable for this environment? If it's not + Is distribution ``dist`` acceptable for this environment? If it's not compatible with the ``platform`` and ``python`` version values specified when the environment was created, a false value is returned. @@ -534,34 +534,34 @@ distributions during dependency resolution. are silently ignored. ``best_match(req, working_set, installer=None)`` - Find distribution best matching `req` and usable on `working_set` + Find distribution best matching ``req`` and usable on ``working_set`` - This calls the ``find(req)`` method of the `working_set` to see if a + This calls the ``find(req)`` method of the ``working_set`` to see if a suitable distribution is already active. (This may raise ``VersionConflict`` if an unsuitable version of the project is already - active in the specified `working_set`.) If a suitable distribution isn't + active in the specified ``working_set``.) If a suitable distribution isn't active, this method returns the newest distribution in the environment - that meets the ``Requirement`` in `req`. If no suitable distribution is - found, and `installer` is supplied, then the result of calling + that meets the ``Requirement`` in ``req``. If no suitable distribution is + found, and ``installer`` is supplied, then the result of calling the environment's ``obtain(req, installer)`` method will be returned. ``obtain(requirement, installer=None)`` Obtain a distro that matches requirement (e.g. via download). In the base ``Environment`` class, this routine just returns - ``installer(requirement)``, unless `installer` is None, in which case + ``installer(requirement)``, unless ``installer`` is None, in which case None is returned instead. This method is a hook that allows subclasses to attempt other ways of obtaining a distribution before falling back - to the `installer` argument. + to the ``installer`` argument. ``scan(search_path=None)`` - Scan `search_path` for distributions usable on `platform` + Scan ``search_path`` for distributions usable on ``platform`` - Any distributions found are added to the environment. `search_path` should + Any distributions found are added to the environment. ``search_path`` should be a sequence of strings such as might be used on ``sys.path``. If not supplied, ``sys.path`` is used. Only distributions conforming to the platform/python version defined at initialization are added. This method is a shortcut for using the ``find_distributions()`` function to - find the distributions from each item in `search_path`, and then calling + find the distributions from each item in ``search_path``, and then calling ``add()`` to add each one to the environment. @@ -627,10 +627,10 @@ Requirements Parsing -------------------------------------- ``__contains__(dist_or_version)`` - Return true if `dist_or_version` fits the criteria for this requirement. - If `dist_or_version` is a ``Distribution`` object, its project name must + Return true if ``dist_or_version`` fits the criteria for this requirement. + If ``dist_or_version`` is a ``Distribution`` object, its project name must match the requirement's project name, and its version must meet the - requirement's version criteria. If `dist_or_version` is a string, it is + requirement's version criteria. If ``dist_or_version`` is a string, it is parsed using the ``parse_version()`` utility function. Otherwise, it is assumed to be an already-parsed version. @@ -668,8 +668,8 @@ Requirements Parsing ``specs`` A list of ``(op,version)`` tuples, sorted in ascending parsed-version - order. The `op` in each tuple is a comparison operator, represented as - a string. The `version` is the (unparsed) version number. + order. The ``op`` in each tuple is a comparison operator, represented as + a string. The ``version`` is the (unparsed) version number. ``marker`` An instance of ``packaging.markers.Marker`` that allows evaluation @@ -721,14 +721,14 @@ in sys.path order, etc. Convenience API --------------- -In the following functions, the `dist` argument can be a ``Distribution`` +In the following functions, the ``dist`` argument can be a ``Distribution`` instance, a ``Requirement`` instance, or a string specifying a requirement (i.e. project name, version, etc.). If the argument is a string or ``Requirement``, the specified distribution is located (and added to sys.path if not already present). An error will be raised if a matching distribution is not available. -The `group` argument should be a string containing a dotted identifier, +The ``group`` argument should be a string containing a dotted identifier, identifying an entry point group. If you are defining an entry point group, you should include some portion of your package's name in the group name so as to avoid collision with other packages' entry point groups. @@ -738,25 +738,25 @@ to avoid collision with other packages' entry point groups. ``ImportError``. ``get_entry_info(dist, group, name)`` - Return an ``EntryPoint`` object for the given `group` and `name` from + Return an ``EntryPoint`` object for the given ``group`` and ``name`` from the specified distribution. Returns ``None`` if the distribution has not advertised a matching entry point. ``get_entry_map(dist, group=None)`` - Return the distribution's entry point map for `group`, or the full entry + Return the distribution's entry point map for ``group``, or the full entry map for the distribution. This function always returns a dictionary, - even if the distribution advertises no entry points. If `group` is given, + even if the distribution advertises no entry points. If ``group`` is given, the dictionary maps entry point names to the corresponding ``EntryPoint`` - object. If `group` is None, the dictionary maps group names to + object. If ``group`` is None, the dictionary maps group names to dictionaries that then map entry point names to the corresponding ``EntryPoint`` instance in that group. ``iter_entry_points(group, name=None)`` - Yield entry point objects from `group` matching `name`. + Yield entry point objects from ``group`` matching ``name``. - If `name` is None, yields all entry points in `group` from all + If ``name`` is None, yields all entry points in ``group`` from all distributions in the working set on sys.path, otherwise only ones matching - both `group` and `name` are yielded. Entry points are yielded from + both ``group`` and ``name`` are yielded. Entry points are yielded from the active distributions in the order that the distributions appear on sys.path. (Within entry points for a particular distribution, however, there is no particular ordering.) @@ -769,26 +769,26 @@ Creating and Parsing -------------------- ``EntryPoint(name, module_name, attrs=(), extras=(), dist=None)`` - Create an ``EntryPoint`` instance. `name` is the entry point name. The - `module_name` is the (dotted) name of the module containing the advertised - object. `attrs` is an optional tuple of names to look up from the - module to obtain the advertised object. For example, an `attrs` of - ``("foo","bar")`` and a `module_name` of ``"baz"`` would mean that the + Create an ``EntryPoint`` instance. ``name`` is the entry point name. The + ``module_name`` is the (dotted) name of the module containing the advertised + object. ``attrs`` is an optional tuple of names to look up from the + module to obtain the advertised object. For example, an ``attrs`` of + ``("foo","bar")`` and a ``module_name`` of ``"baz"`` would mean that the advertised object could be obtained by the following code:: import baz advertised_object = baz.foo.bar - The `extras` are an optional tuple of "extra feature" names that the + The ``extras`` are an optional tuple of "extra feature" names that the distribution needs in order to provide this entry point. When the - entry point is loaded, these extra features are looked up in the `dist` + entry point is loaded, these extra features are looked up in the ``dist`` argument to find out what other distributions may need to be activated - on sys.path; see the ``load()`` method for more details. The `extras` - argument is only meaningful if `dist` is specified. `dist` must be + on sys.path; see the ``load()`` method for more details. The ``extras`` + argument is only meaningful if ``dist`` is specified. ``dist`` must be a ``Distribution`` instance. ``EntryPoint.parse(src, dist=None)`` (classmethod) - Parse a single entry point from string `src` + Parse a single entry point from string ``src`` Entry point syntax follows the form:: @@ -796,27 +796,27 @@ Creating and Parsing The entry name and module name are required, but the ``:attrs`` and ``[extras]`` parts are optional, as is the whitespace shown between - some of the items. The `dist` argument is passed through to the + some of the items. The ``dist`` argument is passed through to the ``EntryPoint()`` constructor, along with the other values parsed from - `src`. + ``src``. ``EntryPoint.parse_group(group, lines, dist=None)`` (classmethod) - Parse `lines` (a string or sequence of lines) to create a dictionary + Parse ``lines`` (a string or sequence of lines) to create a dictionary mapping entry point names to ``EntryPoint`` objects. ``ValueError`` is - raised if entry point names are duplicated, if `group` is not a valid + raised if entry point names are duplicated, if ``group`` is not a valid entry point group name, or if there are any syntax errors. (Note: the - `group` parameter is used only for validation and to create more - informative error messages.) If `dist` is provided, it will be used to + ``group`` parameter is used only for validation and to create more + informative error messages.) If ``dist`` is provided, it will be used to set the ``dist`` attribute of the created ``EntryPoint`` objects. ``EntryPoint.parse_map(data, dist=None)`` (classmethod) - Parse `data` into a dictionary mapping group names to dictionaries mapping - entry point names to ``EntryPoint`` objects. If `data` is a dictionary, + Parse ``data`` into a dictionary mapping group names to dictionaries mapping + entry point names to ``EntryPoint`` objects. If ``data`` is a dictionary, then the keys are used as group names and the values are passed to - ``parse_group()`` as the `lines` argument. If `data` is a string or + ``parse_group()`` as the ``lines`` argument. If ``data`` is a string or sequence of lines, it is first split into .ini-style sections (using the ``split_sections()`` utility function) and the section names are used - as group names. In either case, the `dist` argument is passed through to + as group names. In either case, the ``dist`` argument is passed through to ``parse_group()`` so that the entry points will be linked to the specified distribution. @@ -837,9 +837,9 @@ addition, the following methods are provided: Ensure that any "extras" needed by the entry point are available on sys.path. ``UnknownExtra`` is raised if the ``EntryPoint`` has ``extras``, but no ``dist``, or if the named extras are not defined by the - distribution. If `env` is supplied, it must be an ``Environment``, and it + distribution. If ``env`` is supplied, it must be an ``Environment``, and it will be used to search for needed distributions if they are not already - present on sys.path. If `installer` is supplied, it must be a callable + present on sys.path. If ``installer`` is supplied, it must be a callable taking a ``Requirement`` instance and returning a matching importable ``Distribution`` instance or None. @@ -872,16 +872,16 @@ available distributions, respectively.) You can also obtain ``Distribution`` objects from one of these high-level APIs: ``find_distributions(path_item, only=False)`` - Yield distributions accessible via `path_item`. If `only` is true, yield - only distributions whose ``location`` is equal to `path_item`. In other - words, if `only` is true, this yields any distributions that would be - importable if `path_item` were on ``sys.path``. If `only` is false, this - also yields distributions that are "in" or "under" `path_item`, but would + Yield distributions accessible via ``path_item``. If ``only`` is true, yield + only distributions whose ``location`` is equal to ``path_item``. In other + words, if ``only`` is true, this yields any distributions that would be + importable if ``path_item`` were on ``sys.path``. If ``only`` is false, this + also yields distributions that are "in" or "under" ``path_item``, but would not be importable unless their locations were also added to ``sys.path``. ``get_distribution(dist_spec)`` Return a ``Distribution`` object for a given ``Requirement`` or string. - If `dist_spec` is already a ``Distribution`` instance, it is returned. + If ``dist_spec`` is already a ``Distribution`` instance, it is returned. If it is a ``Requirement`` object or a string that can be parsed into one, it is used to locate and activate a matching distribution, which is then returned. @@ -890,18 +890,18 @@ However, if you're creating specialized tools for working with distributions, or creating a new distribution format, you may also need to create ``Distribution`` objects directly, using one of the three constructors below. -These constructors all take an optional `metadata` argument, which is used to -access any resources or metadata associated with the distribution. `metadata` +These constructors all take an optional ``metadata`` argument, which is used to +access any resources or metadata associated with the distribution. ``metadata`` must be an object that implements the ``IResourceProvider`` interface, or None. If it is None, an ``EmptyProvider`` is used instead. ``Distribution`` objects implement both the `IResourceProvider`_ and `IMetadataProvider Methods`_ by -delegating them to the `metadata` object. +delegating them to the ``metadata`` object. ``Distribution.from_location(location, basename, metadata=None, **kw)`` (classmethod) - Create a distribution for `location`, which must be a string such as a + Create a distribution for ``location``, which must be a string such as a URL, filename, or other string that might be used on ``sys.path``. - `basename` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``. - If `basename` ends with ``.egg``, then the project's name, version, python + ``basename`` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``. + If ``basename`` ends with ``.egg``, then the project's name, version, python version and platform are extracted from the filename and used to set those properties of the created distribution. Any additional keyword arguments are forwarded to the ``Distribution()`` constructor. @@ -917,8 +917,8 @@ delegating them to the `metadata` object. ``Distribution(location,metadata,project_name,version,py_version,platform,precedence)`` Create a distribution by setting its properties. All arguments are - optional and default to None, except for `py_version` (which defaults to - the current Python version) and `precedence` (which defaults to + optional and default to None, except for ``py_version`` (which defaults to + the current Python version) and ``precedence`` (which defaults to ``EGG_DIST``; for more details see ``precedence`` under `Distribution Attributes`_ below). Note that it's usually easier to use the ``from_filename()`` or ``from_location()`` constructors than to specify @@ -938,7 +938,7 @@ project_name A string, naming the project that this distribution is for. Project names are defined by a project's setup script, and they are used to identify projects on PyPI. When a ``Distribution`` is constructed, the - `project_name` argument is passed through the ``safe_name()`` utility + ``project_name`` argument is passed through the ``safe_name()`` utility function to filter out any unacceptable characters. key @@ -952,9 +952,9 @@ extras version A string denoting what release of the project this distribution contains. - When a ``Distribution`` is constructed, the `version` argument is passed + When a ``Distribution`` is constructed, the ``version`` argument is passed through the ``safe_version()`` utility function to filter out any - unacceptable characters. If no `version` is specified at construction + unacceptable characters. If no ``version`` is specified at construction time, then attempting to access this attribute later will cause the ``Distribution`` to try to discover its version by reading its ``PKG-INFO`` metadata file. If ``PKG-INFO`` is unavailable or can't be parsed, @@ -967,7 +967,7 @@ parsed_version distributions by version. (See the `Parsing Utilities`_ section below for more information on the ``parse_version()`` function.) Note that accessing ``parsed_version`` may result in a ``ValueError`` if the ``Distribution`` - was constructed without a `version` and without `metadata` capable of + was constructed without a ``version`` and without ``metadata`` capable of supplying the missing version info. py_version @@ -998,9 +998,9 @@ precedence ------------------------ ``activate(path=None)`` - Ensure distribution is importable on `path`. If `path` is None, + Ensure distribution is importable on ``path``. If ``path`` is None, ``sys.path`` is used instead. This ensures that the distribution's - ``location`` is in the `path` list, and it also performs any necessary + ``location`` is in the ``path`` list, and it also performs any necessary namespace package fixups or declarations. (That is, if the distribution contains namespace packages, this method ensures that they are declared, and that the distribution's contents for those namespace packages are @@ -1020,7 +1020,7 @@ precedence ``requires(extras=())`` List the ``Requirement`` objects that specify this distribution's - dependencies. If `extras` is specified, it should be a sequence of names + dependencies. If ``extras`` is specified, it should be a sequence of names of "extras" defined by the distribution, and the list returned will then include any dependencies needed to support the named "extras". @@ -1047,11 +1047,11 @@ by the distribution. See the section above on `Entry Points`_ for more detailed information about these operations: ``get_entry_info(group, name)`` - Return the ``EntryPoint`` object for `group` and `name`, or None if no + Return the ``EntryPoint`` object for ``group`` and ``name``, or None if no such point is advertised by this distribution. ``get_entry_map(group=None)`` - Return the entry point map for `group`. If `group` is None, return + Return the entry point map for ``group``. If ``group`` is None, return a dictionary mapping group names to entry point maps for all groups. (An entry point map is a dictionary of entry point names to ``EntryPoint`` objects.) @@ -1079,8 +1079,8 @@ documented in later sections): * ``resource_isdir(resource_name)`` * ``resource_listdir(resource_name)`` -If the distribution was created with a `metadata` argument, these resource and -metadata access methods are all delegated to that `metadata` provider. +If the distribution was created with a ``metadata`` argument, these resource and +metadata access methods are all delegated to that ``metadata`` provider. Otherwise, they are delegated to an ``EmptyProvider``, so that the distribution will appear to have no resources or metadata. This delegation approach is used so that supporting custom importers or new distribution formats can be done @@ -1112,11 +1112,11 @@ Thus, you can use the APIs below without needing an explicit Basic Resource Access --------------------- -In the following methods, the `package_or_requirement` argument may be either +In the following methods, the ``package_or_requirement`` argument may be either a Python package/module name (e.g. ``foo.bar``) or a ``Requirement`` instance. If it is a package or module name, the named module or package must be importable (i.e., be in a distribution or directory on ``sys.path``), and the -`resource_name` argument is interpreted relative to the named package. (Note +``resource_name`` argument is interpreted relative to the named package. (Note that if a module name is used, then the resource name is relative to the package immediately containing the named module. Also, you should not use use a namespace package name, because a namespace package can be spread across @@ -1127,7 +1127,7 @@ If it is a ``Requirement``, then the requirement is automatically resolved (searching the current ``Environment`` if necessary) and a matching distribution is added to the ``WorkingSet`` and ``sys.path`` if one was not already present. (Unless the ``Requirement`` can't be satisfied, in which -case an exception is raised.) The `resource_name` argument is then interpreted +case an exception is raised.) The ``resource_name`` argument is then interpreted relative to the root of the identified distribution; i.e. its first path segment will be treated as a peer of the top-level modules or packages in the distribution. @@ -1229,12 +1229,12 @@ no need to use these methods. Unlike the other methods listed above, they are you must therefore have an explicit ``ResourceManager`` instance to use them. ``get_cache_path(archive_name, names=())`` - Return absolute location in cache for `archive_name` and `names` + Return absolute location in cache for ``archive_name`` and ``names`` The parent directory of the resulting path will be created if it does - not already exist. `archive_name` should be the base filename of the + not already exist. ``archive_name`` should be the base filename of the enclosing egg (which may not be the name of the enclosing zipfile!), - including its ".egg" extension. `names`, if provided, should be a + including its ".egg" extension. ``names``, if provided, should be a sequence of path name parts "under" the egg's extraction location. This method should only be called by resource providers that need to @@ -1250,12 +1250,12 @@ you must therefore have an explicit ``ResourceManager`` instance to use them. wrap or handle extraction errors themselves. ``postprocess(tempname, filename)`` - Perform any platform-specific postprocessing of `tempname`. + Perform any platform-specific postprocessing of ``tempname``. Resource providers should call this method ONLY after successfully extracting a compressed resource. They must NOT call it on resources that are already in the filesystem. - `tempname` is the current (temporary) name of the file, and `filename` + ``tempname`` is the current (temporary) name of the file, and ``filename`` is the name it will be renamed to by the caller after this routine returns. @@ -1323,7 +1323,7 @@ implement the ``IMetadataProvider`` or ``IResourceProvider`` interfaces are: ``run_script(script_name, namespace)`` Execute the named script in the supplied namespace dictionary. Raises ``ResolutionError`` if there is no script by that name in the ``scripts`` - metadata directory. `namespace` should be a Python dictionary, usually + metadata directory. ``namespace`` should be a Python dictionary, usually a module dictionary if the script is being run as a module. @@ -1380,11 +1380,11 @@ with other (PEP 302-compatible) importers or module loaders, you may need to register various handlers and support functions using these APIs: ``register_finder(importer_type, distribution_finder)`` - Register `distribution_finder` to find distributions in ``sys.path`` items. - `importer_type` is the type or class of a PEP 302 "Importer" (``sys.path`` - item handler), and `distribution_finder` is a callable that, when passed a - path item, the importer instance, and an `only` flag, yields - ``Distribution`` instances found under that path item. (The `only` flag, + Register ``distribution_finder`` to find distributions in ``sys.path`` items. + ``importer_type`` is the type or class of a PEP 302 "Importer" (``sys.path`` + item handler), and ``distribution_finder`` is a callable that, when passed a + path item, the importer instance, and an ``only`` flag, yields + ``Distribution`` instances found under that path item. (The ``only`` flag, if true, means the finder should yield only ``Distribution`` objects whose ``location`` is equal to the path item provided.) @@ -1392,16 +1392,16 @@ register various handlers and support functions using these APIs: example finder function. ``register_loader_type(loader_type, provider_factory)`` - Register `provider_factory` to make ``IResourceProvider`` objects for - `loader_type`. `loader_type` is the type or class of a PEP 302 - ``module.__loader__``, and `provider_factory` is a function that, when + Register ``provider_factory`` to make ``IResourceProvider`` objects for + ``loader_type``. ``loader_type`` is the type or class of a PEP 302 + ``module.__loader__``, and ``provider_factory`` is a function that, when passed a module object, returns an `IResourceProvider`_ for that module, allowing it to be used with the `ResourceManager API`_. ``register_namespace_handler(importer_type, namespace_handler)`` - Register `namespace_handler` to declare namespace packages for the given - `importer_type`. `importer_type` is the type or class of a PEP 302 - "importer" (sys.path item handler), and `namespace_handler` is a callable + Register ``namespace_handler`` to declare namespace packages for the given + ``importer_type``. ``importer_type`` is the type or class of a PEP 302 + "importer" (sys.path item handler), and ``namespace_handler`` is a callable with a signature like this:: def namespace_handler(importer, path_entry, moduleName, module): @@ -1421,23 +1421,23 @@ IResourceProvider ----------------- ``IResourceProvider`` is an abstract class that documents what methods are -required of objects returned by a `provider_factory` registered with +required of objects returned by a ``provider_factory`` registered with ``register_loader_type()``. ``IResourceProvider`` is a subclass of ``IMetadataProvider``, so objects that implement this interface must also implement all of the `IMetadataProvider Methods`_ as well as the methods -shown here. The `manager` argument to the methods below must be an object +shown here. The ``manager`` argument to the methods below must be an object that supports the full `ResourceManager API`_ documented above. ``get_resource_filename(manager, resource_name)`` - Return a true filesystem path for `resource_name`, coordinating the - extraction with `manager`, if the resource must be unpacked to the + Return a true filesystem path for ``resource_name``, coordinating the + extraction with ``manager``, if the resource must be unpacked to the filesystem. ``get_resource_stream(manager, resource_name)`` - Return a readable file-like object for `resource_name`. + Return a readable file-like object for ``resource_name``. ``get_resource_string(manager, resource_name)`` - Return a string containing the contents of `resource_name`. + Return a string containing the contents of ``resource_name``. ``has_resource(resource_name)`` Does the package contain the named resource? @@ -1501,15 +1501,15 @@ where appropriate. Their inheritance tree looks like this:: ``PathMetadata(path, egg_info)`` Create an ``IResourceProvider`` for a filesystem-based distribution, where - `path` is the filesystem location of the importable modules, and `egg_info` + ``path`` is the filesystem location of the importable modules, and ``egg_info`` is the filesystem location of the distribution's metadata directory. - `egg_info` should usually be the ``EGG-INFO`` subdirectory of `path` for an - "unpacked egg", and a ``ProjectName.egg-info`` subdirectory of `path` for + ``egg_info`` should usually be the ``EGG-INFO`` subdirectory of ``path`` for an + "unpacked egg", and a ``ProjectName.egg-info`` subdirectory of ``path`` for a "development egg". However, other uses are possible for custom purposes. ``EggMetadata(zipimporter)`` Create an ``IResourceProvider`` for a zipfile-based distribution. The - `zipimporter` should be a ``zipimport.zipimporter`` instance, and may + ``zipimporter`` should be a ``zipimport.zipimporter`` instance, and may represent a "basket" (a zipfile containing multiple ".egg" subdirectories) a specific egg *within* a basket, or a zipfile egg (where the zipfile itself is a ".egg"). It can also be a combination, such as a zipfile egg @@ -1547,12 +1547,12 @@ Parsing Utilities ``yield_lines(strs)`` Yield non-empty/non-comment lines from a string/unicode or a possibly- - nested sequence thereof. If `strs` is an instance of ``basestring``, it + nested sequence thereof. If ``strs`` is an instance of ``basestring``, it is split into lines, and each non-blank, non-comment line is yielded after stripping leading and trailing whitespace. (Lines whose first non-blank character is ``#`` are considered comment lines.) - If `strs` is not an instance of ``basestring``, it is iterated over, and + If ``strs`` is not an instance of ``basestring``, it is iterated over, and each item is passed recursively to ``yield_lines()``, so that an arbitrarily nested sequence of strings, or sequences of sequences of strings can be flattened out to the lines contained therein. So for example, passing @@ -1636,15 +1636,15 @@ Platform Utilities ``compatible_platforms()`` function. ``compatible_platforms(provided, required)`` - Return true if a distribution built on the `provided` platform may be used - on the `required` platform. If either platform value is ``None``, it is + Return true if a distribution built on the ``provided`` platform may be used + on the ``required`` platform. If either platform value is ``None``, it is considered a wildcard, and the platforms are therefore compatible. Likewise, if the platform strings are equal, they're also considered compatible, and ``True`` is returned. Currently, the only non-equal platform strings that are considered compatible are macOS platform strings with the same hardware type (e.g. ``ppc``) and major version - (e.g. ``10``) with the `provided` platform's minor version being less than - or equal to the `required` platform's minor version. + (e.g. ``10``) with the ``provided`` platform's minor version being less than + or equal to the ``required`` platform's minor version. ``get_default_cache()`` Determine the default cache location for extracting resources from zipped @@ -1666,14 +1666,14 @@ File/Path Utilities ------------------- ``ensure_directory(path)`` - Ensure that the parent directory (``os.path.dirname``) of `path` actually + Ensure that the parent directory (``os.path.dirname``) of ``path`` actually exists, using ``os.makedirs()`` if necessary. ``normalize_path(path)`` - Return a "normalized" version of `path`, such that two paths represent + Return a "normalized" version of ``path``, such that two paths represent the same filesystem location if they have equal ``normalized_path()`` values. Specifically, this is a shortcut for calling ``os.path.realpath`` - and ``os.path.normcase`` on `path`. Unfortunately, on certain platforms + and ``os.path.normcase`` on ``path``. Unfortunately, on certain platforms (notably Cygwin and macOS) the ``normcase`` function does not accurately reflect the platform's case-sensitivity, so there is always the possibility of two apparently-different paths being equal on such platforms. diff --git a/docs/references/keywords.rst b/docs/references/keywords.rst index 809491541d..03ce9fa23a 100644 --- a/docs/references/keywords.rst +++ b/docs/references/keywords.rst @@ -286,7 +286,7 @@ Keywords this argument. The named class must be instantiable with no arguments, and its instances must support the ``loadTestsFromNames()`` method as defined in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will - pass only one test "name" in the `names` argument: the value supplied for + pass only one test "name" in the ``names`` argument: the value supplied for the ``test_suite`` argument. The loader you specify may interpret this string in any way it likes, as there are no restrictions on what may be contained in a ``test_suite`` string. diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index 2228bd158c..bc66869b6e 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -201,7 +201,7 @@ obsoletes list-comma string in such a file, so validation is stricter in this case. Notes: -1. The `version` file attribute has only been supported since 39.2.0. +1. The ``version`` file attribute has only been supported since 39.2.0. Options ------- @@ -237,12 +237,12 @@ data_files dict 40.6.0 **packages** - The ``find:`` and ``find_namespace:`` directive can be further configured in a dedicated subsection ``options.packages.find``. This subsection - accepts the same keys as the `setuptools.find_packages` and the - `setuptools.find_namespace_packages` function: + accepts the same keys as the ``setuptools.find_packages`` and the + ``setuptools.find_namespace_packages`` function: ``where``, ``include``, and ``exclude``. **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. Notes: -1. In the `package_data` section, a key named with a single asterisk (`*`) -refers to all packages, in lieu of the empty string used in `setup.py`. +1. In the ``package_data`` section, a key named with a single asterisk (``*``) +refers to all packages, in lieu of the empty string used in ``setup.py``. diff --git a/docs/userguide/keywords.rst b/docs/userguide/keywords.rst index 58fe74bc4a..268e4f4238 100644 --- a/docs/userguide/keywords.rst +++ b/docs/userguide/keywords.rst @@ -124,7 +124,7 @@ unless you need the associated ``setuptools`` feature. this argument. The named class must be instantiable with no arguments, and its instances must support the ``loadTestsFromNames()`` method as defined in the Python ``unittest`` module's ``TestLoader`` class. Setuptools will - pass only one test "name" in the `names` argument: the value supplied for + pass only one test "name" in the ``names`` argument: the value supplied for the ``test_suite`` argument. The loader you specify may interpret this string in any way it likes, as there are no restrictions on what may be contained in a ``test_suite`` string. diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 3ee4fc8c19..24ea3e4b52 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -21,8 +21,7 @@ the backend (build system) it wants to use. The distribution can then be generated with whatever tools that provides a ``build sdist``-alike functionality. While this may appear cumbersome, given the added pieces, it in fact tremendously enhances the portability of your package. The -change is driven under `PEP 517 ``. To learn more about Python packaging in general, +change is driven under :pep:`517 <517#build-requirements>`. To learn more about Python packaging in general, navigate to the `bottom `_ of this page. From 3d9fc0b61f77c2604e6c04efa14c53ee33836b34 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 01:17:45 +0200 Subject: [PATCH 8205/8469] Add a change note --- changelog.d/2427.doc.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/2427.doc.rst diff --git a/changelog.d/2427.doc.rst b/changelog.d/2427.doc.rst new file mode 100644 index 0000000000..bec964ffc4 --- /dev/null +++ b/changelog.d/2427.doc.rst @@ -0,0 +1,2 @@ +Started enforcing strict syntax and reference validation +in the Sphinx docs -- by :user:`webknjaz` From b413a986d7cf3c71384329371d14c4b462ee0c99 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 02:22:24 +0200 Subject: [PATCH 8206/8469] =?UTF-8?q?=F0=9F=94=A5=20Get=20rid=20of=20the?= =?UTF-8?q?=20unused=20sphinx=20`Makefile`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Makefile | 75 --------------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 docs/Makefile diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 30bf10a930..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html web pickle htmlhelp latex changes linkcheck - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview over all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - -clean: - -rm -rf build/* - -html: - mkdir -p build/html build/doctrees - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html - @echo - @echo "Build finished. The HTML pages are in build/html." - -pickle: - mkdir -p build/pickle build/doctrees - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -web: pickle - -json: - mkdir -p build/json build/doctrees - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - mkdir -p build/htmlhelp build/doctrees - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in build/htmlhelp." - -latex: - mkdir -p build/latex build/doctrees - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex - @echo - @echo "Build finished; the LaTeX files are in build/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." - -changes: - mkdir -p build/changes build/doctrees - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes - @echo - @echo "The overview file is in build/changes." - -linkcheck: - mkdir -p build/linkcheck build/doctrees - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in build/linkcheck/output.txt." From 438af387ddd07211fb87f047adad49cf5ab48270 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 16 Oct 2020 02:27:00 +0200 Subject: [PATCH 8207/8469] Add a change note --- changelog.d/2428.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2428.doc.rst diff --git a/changelog.d/2428.doc.rst b/changelog.d/2428.doc.rst new file mode 100644 index 0000000000..43586b0e14 --- /dev/null +++ b/changelog.d/2428.doc.rst @@ -0,0 +1 @@ +Removed redundant Sphinx ``Makefile`` support -- by :user:`webknjaz` From a7e930914e1d5baed8a646ae5a0be65a9c97d07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Sat, 17 Oct 2020 16:54:56 +0800 Subject: [PATCH 8208/8469] Restore quickstart.rst --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 64be2cb9f2..24ea3e4b52 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -81,8 +81,8 @@ Automatic package discovery For simple projects, it's usually easy enough to manually add packages to the ``packages`` keyword in ``setup.cfg``. However, for very large projects , it can be a big burden to keep the package list updated. ``setuptools`` -therefore provides two convenient tools to ease the burden: ``find:\ `` and -``find_namespace:\ ``. To use it in your project: +therefore provides two convenient tools to ease the burden: :literal:`find:\ ` and +:literal:`find_namespace:\ `. To use it in your project: .. code-block:: ini From 23f874ca386f8f33beae3e287b866af79f97415f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 11:56:01 -0400 Subject: [PATCH 8209/8469] Prefer doc role to ref role. Co-authored-by: Sviatoslav Sydorenko --- docs/userguide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index 7abc7903fc..18679c5486 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -16,7 +16,7 @@ Transition to PEP517 Since setuptools no longer serves as the default build tool, one must explicitly opt in (by providing a :file:`pyproject.toml` file) to use this library. The user facing part is provided by tools such as pip and -backend interface is described :ref:`in this document <../build_meta>`. The +backend interface is described :doc:`in this document <../build_meta>`. The quickstart provides an overview of the new workflow. .. toctree:: From de66347b5ededaf3296c2d8a5207534f8e803996 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 12:00:02 -0400 Subject: [PATCH 8210/8469] Defer to default behavior for fail fast for now. --- .github/workflows/python-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 96e1430879..2ee7c0fbf5 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -16,7 +16,6 @@ jobs: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: false # max-parallel: 5 matrix: python-version: From 7ff173926c4773d39f3320ff0c9d65afb290e7b1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 12:04:28 -0400 Subject: [PATCH 8211/8469] =?UTF-8?q?Bump=20version:=2050.3.1=20=E2=86=92?= =?UTF-8?q?=2050.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 22 ++++++++++++++++++++++ changelog.d/2394.doc.rst | 3 --- changelog.d/2401.misc.rst | 2 -- changelog.d/2420.misc.rst | 1 - changelog.d/2421.misc.rst | 2 -- changelog.d/2427.doc.rst | 2 -- changelog.d/2428.doc.rst | 1 - setup.cfg | 2 +- 9 files changed, 24 insertions(+), 13 deletions(-) delete mode 100644 changelog.d/2394.doc.rst delete mode 100644 changelog.d/2401.misc.rst delete mode 100644 changelog.d/2420.misc.rst delete mode 100644 changelog.d/2421.misc.rst delete mode 100644 changelog.d/2427.doc.rst delete mode 100644 changelog.d/2428.doc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 57cc3f1831..97840e4275 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.3.1 +current_version = 50.3.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index c96fb0bc9d..ab03c20abf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,25 @@ +v50.3.2 +------- + + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2394: Extended towncrier news template to include change note categories. + This allows to see what types of changes a given version introduces + -- by :user:`webknjaz` +* #2427: Started enforcing strict syntax and reference validation + in the Sphinx docs -- by :user:`webknjaz` +* #2428: Removed redundant Sphinx ``Makefile`` support -- by :user:`webknjaz` + +Misc +^^^^ +* #2401: Enabled test results reporting in AppVeyor CI + -- by :user:`webknjaz` +* #2420: Replace Python 3.9.0 beta with 3.9.0 final on GitHub Actions. +* #2421: Python 3.9 Trove classifier got added to the dist metadata + -- by :user:`webknjaz` + + v50.3.1 ------- diff --git a/changelog.d/2394.doc.rst b/changelog.d/2394.doc.rst deleted file mode 100644 index 338e8895d5..0000000000 --- a/changelog.d/2394.doc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Extended towncrier news template to include change note categories. -This allows to see what types of changes a given version introduces --- by :user:`webknjaz` diff --git a/changelog.d/2401.misc.rst b/changelog.d/2401.misc.rst deleted file mode 100644 index 924880a37f..0000000000 --- a/changelog.d/2401.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Enabled test results reporting in AppVeyor CI --- by :user:`webknjaz` diff --git a/changelog.d/2420.misc.rst b/changelog.d/2420.misc.rst deleted file mode 100644 index 94984797ca..0000000000 --- a/changelog.d/2420.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Replace Python 3.9.0 beta with 3.9.0 final on GitHub Actions. diff --git a/changelog.d/2421.misc.rst b/changelog.d/2421.misc.rst deleted file mode 100644 index 295f5de8d3..0000000000 --- a/changelog.d/2421.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Python 3.9 Trove classifier got added to the dist metadata --- by :user:`webknjaz` diff --git a/changelog.d/2427.doc.rst b/changelog.d/2427.doc.rst deleted file mode 100644 index bec964ffc4..0000000000 --- a/changelog.d/2427.doc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Started enforcing strict syntax and reference validation -in the Sphinx docs -- by :user:`webknjaz` diff --git a/changelog.d/2428.doc.rst b/changelog.d/2428.doc.rst deleted file mode 100644 index 43586b0e14..0000000000 --- a/changelog.d/2428.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed redundant Sphinx ``Makefile`` support -- by :user:`webknjaz` diff --git a/setup.cfg b/setup.cfg index 99846e9f3d..5ee3a8e98a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.3.1 +version = 50.3.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 2ff24f67d5f69ac6c392a94ab1e6e2bbd885ec70 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 17 Oct 2020 19:07:22 +0200 Subject: [PATCH 8212/8469] =?UTF-8?q?=F0=9F=90=9B=F0=9F=93=9D=20Fix=20the?= =?UTF-8?q?=20TOC=20link=20to=20the=20relocated=20dev=20guide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change corrects the typo introduced by #2426. --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index f8c4725815..b9a7964766 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,6 +15,6 @@ Documentation content: references/keywords roadmap setuptools - Development guide + Development guide Backward compatibility & deprecated practice Changelog From 9ab7bc54cf1eb1a0cb088e8157dc8c88c553b9c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 13:14:24 -0400 Subject: [PATCH 8213/8469] Clean up syntax on entry_points.console_scripts. Fixes #2429. --- docs/userguide/quickstart.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index aebcf60fba..697087edb4 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -106,16 +106,15 @@ use, go to :ref:`package_discovery` Entry points and automatic script creation =========================================== Setuptools support automatic creation of scripts upon installation, that runs -code within your package if you specify them with the ``entry_point`` keyword. +code within your package if you specify them with the ``entry_points`` keyword. This is what allows you to run commands like ``pip install`` instead of having to type ``python -m pip install``. To accomplish this, add the entry_points keyword in your ``setup.cfg``: .. code-block:: ini - [options] - entry_points = - [console_script] + [options.entry_points] + console_scripts = main = mypkg:some_func When this project is installed, a ``main`` script will be installed and will From e711cb076ddd0813351745050b89d77f6387cf35 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 17 Oct 2020 19:21:30 +0200 Subject: [PATCH 8214/8469] =?UTF-8?q?=F0=9F=90=9B=F0=9F=93=9D=20Fix=20"Tit?= =?UTF-8?q?le=20level=20inconsistent"=20in=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was caused by #2399 CI invocation happening before merging PR #2427 that made Sphinx nitpicky. --- CHANGES.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ab03c20abf..30750c0aa0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3080,7 +3080,7 @@ process to fail and PyPI uploads no longer accept files for 13.0. connection. Backward-Incompatible Changes -============================= +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This release includes a couple of backward-incompatible changes, but most if not all users will find 1.0 a drop-in replacement for 0.9. @@ -3670,12 +3670,12 @@ how it parses version numbers. ----- setuptools -========== +^^^^^^^^^^ * Fixed a bunch of calls to file() that caused crashes on Python 3. bootstrapping -============= +^^^^^^^^^^^^^ * Fixed a bug in sorting that caused bootstrap to fail on Python 3. @@ -3683,7 +3683,7 @@ bootstrapping ----- setuptools -========== +^^^^^^^^^^ * Added Python 3 support; see docs/python3.txt. This closes Old Setuptools #39. @@ -3701,7 +3701,7 @@ setuptools This closes Old Setuptools #41. bootstrapping -============= +^^^^^^^^^^^^^ * Fixed bootstrap not working on Windows. This closes issue Distribute #49. @@ -3714,7 +3714,7 @@ bootstrapping ----- setuptools -========== +^^^^^^^^^^ * package_index.urlopen now catches BadStatusLine and malformed url errors. This closes Distribute #16 and Distribute #18. @@ -3731,7 +3731,7 @@ setuptools bootstrapping -============= +^^^^^^^^^^^^^ * The boostrap process leave setuptools alone if detected in the system and --root or --prefix is provided, but is not in the same location. @@ -3741,7 +3741,7 @@ bootstrapping --- setuptools -========== +^^^^^^^^^^ * Packages required at build time where not fully present at install time. This closes Distribute #12. @@ -3758,7 +3758,7 @@ setuptools * Added compatibility with Subversion 1.6. This references Distribute #1. pkg_resources -============= +^^^^^^^^^^^^^ * Avoid a call to /usr/bin/sw_vers on OSX and use the official platform API instead. Based on a patch from ronaldoussoren. This closes issue #5. @@ -3775,7 +3775,7 @@ pkg_resources * Immediately close all file handles. This closes Distribute #3. easy_install -============ +^^^^^^^^^^^^ * Immediately close all file handles. This closes Distribute #3. From a94c2c3d128582adb2457dd978bf98ce40ab11b9 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 17 Oct 2020 19:32:21 +0200 Subject: [PATCH 8215/8469] =?UTF-8?q?=F0=9F=93=9D=20Add=20change=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.d/2430.doc.1.rst | 2 ++ changelog.d/2430.doc.2.rst | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/2430.doc.1.rst create mode 100644 changelog.d/2430.doc.2.rst diff --git a/changelog.d/2430.doc.1.rst b/changelog.d/2430.doc.1.rst new file mode 100644 index 0000000000..d09e0b9e7b --- /dev/null +++ b/changelog.d/2430.doc.1.rst @@ -0,0 +1,2 @@ +Fixed a typo in Sphinx docs that made docs dev section disappear +as a result of PR #2426 -- by :user:`webknjaz` diff --git a/changelog.d/2430.doc.2.rst b/changelog.d/2430.doc.2.rst new file mode 100644 index 0000000000..0ac8782323 --- /dev/null +++ b/changelog.d/2430.doc.2.rst @@ -0,0 +1,2 @@ +Fixed inconsistent RST title nesting levels caused by #2399 +-- by :user:`webknjaz` From 6d33d5dda0400c31d7f7c3a8054b7802273b0fb0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 17 Oct 2020 19:47:33 +0200 Subject: [PATCH 8216/8469] =?UTF-8?q?=F0=9F=93=9D=20Update=20devguide=20li?= =?UTF-8?q?nks=20in=20the=20PR=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is necessary because the document has been moved in PR #2426. --- .github/pull_request_template.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index aa5508076e..ef5a98e727 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ - + ## Summary of changes @@ -9,4 +9,10 @@ Closes ### Pull Request Checklist - [ ] Changes have tests -- [ ] News fragment added in changelog.d. See [documentation](http://setuptools.readthedocs.io/en/latest/developer-guide.html#making-a-pull-request) for details +- [ ] News fragment added in [`changelog.d/`]. + _(See [documentation][PR docs] for details)_ + + +[`changelog.d/`]: https://github.com/pypa/setuptools/tree/master/changelog.d +[PR docs]: +https://setuptools.readthedocs.io/en/latest/development/developer-guide.html#making-a-pull-request From 38de858e37f9c7a90498ea78c78ed76aca835ad2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 16:32:23 -0400 Subject: [PATCH 8217/8469] Update changelog --- changelog.d/2435.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2435.breaking.rst diff --git a/changelog.d/2435.breaking.rst b/changelog.d/2435.breaking.rst new file mode 100644 index 0000000000..d29c60eb39 --- /dev/null +++ b/changelog.d/2435.breaking.rst @@ -0,0 +1 @@ +Require Python 3.6 or later. From 66ca4205ee7e017d6c10346f0bd71fcfc556211f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 21:36:34 -0400 Subject: [PATCH 8218/8469] Use 'virtualenv.python'. Fixes #2434. --- setuptools/tests/test_virtualenv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index b555ce4f62..c8ed9e57ea 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -168,8 +168,9 @@ def sdist(distname, version): open('success', 'w').close() ''')) # Run test command for test package. - virtualenv.run( - ['python', 'setup.py', 'test', '-s', 'test'], cd=str(tmpdir)) + # use 'virtualenv.python' as workaround for man-group/pytest-plugins#166 + cmd = [virtualenv.python, 'setup.py', 'test', '-s', 'test'] + virtualenv.run(cmd, cd=str(tmpdir)) assert tmpdir.join('success').check() From 3dd7313d5e61dabd7bf7c647af1eeb6d72a75a6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Oct 2020 22:06:26 -0400 Subject: [PATCH 8219/8469] Bump PPC runs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 918b9745be..8b945bd336 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ jobs: - arch: ppc64le python: pypy3 - arch: ppc64le - python: 3.5 + python: 3.6 - &latest_py3_ppc arch: ppc64le python: 3.8 From 97ee66249afed0f38f4266c1280e28af1882fabd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Oct 2020 13:12:15 -0400 Subject: [PATCH 8220/8469] Remove Python 3.5 from Appveyor tests --- appveyor.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4d1ae55f4f..8c24ec3f51 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,10 +20,6 @@ environment: PYTHON: "C:\\Python37-x64" - APPVEYOR_JOB_NAME: "python36-x64" PYTHON: "C:\\Python36-x64" - - APPVEYOR_JOB_NAME: "python35-x64" - PYTHON: "C:\\Python35-x64" - PYTEST_ADDOPTS: "--cov" - TOX_TESTENV_PASSENV: "PYTEST_ADDOPTS" install: # symlink python from a directory with a space From 7cf674e13dbaa2a3c5ef54b22d3af4c380e6b006 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 18 Oct 2020 19:35:09 +0200 Subject: [PATCH 8221/8469] Reconstruct changelog with categories from history --- CHANGES.rst | 417 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 416 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 30750c0aa0..567b2bac76 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,7 @@ v50.3.2 ------- + Documentation changes ^^^^^^^^^^^^^^^^^^^^^ * #2394: Extended towncrier news template to include change note categories. @@ -23,12 +24,19 @@ Misc v50.3.1 ------- + + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #2093: Finalized doc revamp. * #2097: doc: simplify index and group deprecated files * #2102: doc overhaul step 2: break main doc into multiple sections * #2111: doc overhaul step 3: update userguide * #2395: Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz` * #2395: Added an illustrative explanation about the change notes to fragments dir -- by :user:`webknjaz` + +Misc +^^^^ * #2379: Travis CI test suite now tests against PPC64. * #2413: Suppress EOF errors (and other exceptions) when importing lib2to3. @@ -36,12 +44,20 @@ v50.3.1 v50.3.0 ------- + + +Changes +^^^^^^^ * #2368: In distutils, restore support for monkeypatched CCompiler.spawn per pypa/distutils#15. v50.2.0 ------- + + +Changes +^^^^^^^ * #2355: When pip is imported as part of a build, leave distutils patched. * #2380: There are some setuptools specific changes in the ``setuptools.command.bdist_rpm`` module that are no longer needed, because @@ -52,24 +68,40 @@ v50.2.0 v50.1.0 ------- + + +Changes +^^^^^^^ * #2350: Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment. v50.0.3 ------- + + +Misc +^^^^ * #2363: Restore link_libpython support on Python 3.7 and earlier (see pypa/distutils#9). v50.0.2 ------- + + +Misc +^^^^ * #2352: In distutils hack, use absolute import rather than relative to avoid bpo-30876. v50.0.1 ------- + + +Misc +^^^^ * #2357: Restored Python 3.5 support in distutils.util for missing ``subprocess._optim_args_from_interpreter_flags``. * #2358: Restored AIX support on Python 3.8 and earlier. * #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class @@ -80,19 +112,34 @@ v50.0.1 v50.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #2232: Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. + +Changes +^^^^^^^ * #2334: In MSVC module, refine text in error message. v49.6.0 ------- + + +Changes +^^^^^^^ * #2129: In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file. v49.5.0 ------- + + +Changes +^^^^^^^ * #2306: When running as a PEP 517 backend, setuptools does not try to install ``setup_requires`` itself. They are reported as build requirements for the frontend to install. @@ -101,43 +148,74 @@ v49.5.0 v49.4.0 ------- + + +Changes +^^^^^^^ * #2310: Updated vendored packaging version to 20.4. v49.3.2 ------- + + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #2300: Improve the ``safe_version`` function documentation + +Misc +^^^^ * #2297: Once again, in stubs prefer exec_module to the deprecated load_module. v49.3.1 ------- + + +Changes +^^^^^^^ * #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled. v49.3.0 ------- + + +Changes +^^^^^^^ * #2259: Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable. v49.2.1 ------- + + +Misc +^^^^ * #2257: Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn. v49.2.0 ------- + + +Changes +^^^^^^^ * #2230: Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first. v49.1.3 ------- + + +Misc +^^^^ * #2212: (Distutils) Allow spawn to accept environment. Avoid monkey-patching global state. * #2249: Fix extension loading technique in stubs. @@ -145,39 +223,69 @@ v49.1.3 v49.1.2 ------- + + +Changes +^^^^^^^ * #2232: In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used. v49.1.1 ------- + + +Misc +^^^^ * #2094: Removed pkg_resources.py2_warn module, which is no longer reachable. v49.0.1 ------- + + +Misc +^^^^ * #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file. v49.1.0 ------- + + +Changes +^^^^^^^ * #2228: Disabled distutils adoption for now while emergent issues are addressed. v49.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #2165: Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165. + +Changes +^^^^^^^ * #2137: Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead. * #2180: Update vendored packaging in pkg_resources to 19.2. + +Misc +^^^^ * #2199: Fix exception causes all over the codebase by using ``raise new_exception from old_exception`` v48.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. To avoid getting any legacy behavior from the standard library, projects are advised to always "import setuptools" prior to importing anything from distutils. This behavior happens by default when using ``pip install`` or ``pep517.build``. Workflows that rely on ``setup.py (anything)`` will need to first ensure setuptools is imported. One way to achieve this behavior without modifying code is to invoke Python thus: ``python -c "import setuptools; exec(open('setup.py').read())" (anything)``. @@ -185,12 +293,20 @@ v48.0.0 v47.3.2 ------- + + +Misc +^^^^ * #2071: Replaced references to the deprecated imp package with references to importlib v47.3.1 ------- + + +Misc +^^^^ * #1973: Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead. * #2198: Restore ``__requires__`` directive in easy-install wrapper scripts. @@ -198,22 +314,38 @@ v47.3.1 v47.3.0 ------- + + +Changes +^^^^^^^ * #2197: Console script wrapper for editable installs now has a unified template and honors importlib_metadata if present for faster script execution on older Pythons. + +Misc +^^^^ * #2195: Fix broken entry points generated by easy-install (pip editable installs). v47.2.0 ------- + + +Changes +^^^^^^^ * #2194: Editable-installed entry points now load significantly faster on Python versions 3.8+. v47.1.1 ------- + + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #2156: Update mailing list pointer in developer docs Incorporate changes from v44.1.1: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. @@ -221,25 +353,44 @@ Incorporate changes from v44.1.1: v44.1.1 ------- + + +Misc +^^^^ * #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0. v47.1.0 ------- + + +Changes +^^^^^^^ * #2070: In wheel-to-egg conversion, use simple pkg_resources-style namespace declaration for packages that declare namespace_packages. v47.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #2094: Setuptools now actively crashes under Python 2. Python 3.5 or later is required. Users of Python 2 should use ``setuptools<45``. + +Changes +^^^^^^^ * #1700: Document all supported keywords by migrating the ones from distutils. v46.4.0 ------- + + +Changes +^^^^^^^ * #1753: ``attr:`` now extracts variables through rudimentary examination of the AST, thereby supporting modules with third-party imports. If examining the AST fails to find the variable, ``attr:`` falls back to the old behavior of @@ -255,7 +406,14 @@ No significant changes. v46.3.0 ------- + + +Changes +^^^^^^^ * #2089: Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant. + +Misc +^^^^ * #2041: Preserve file modes during pkg files copying, but clear read only flag for target afterwards. * #2105: Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``. @@ -263,11 +421,21 @@ v46.3.0 v46.2.0 ------- + + +Changes +^^^^^^^ * #2040: Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead. * #2062: Change 'Mac OS X' to 'macOS' in code. * #2075: Stop recognizing files ending with ``.dist-info`` as distribution metadata. * #2086: Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1698: Added documentation for ``build_meta`` (a bare minimum, not completed). + +Misc +^^^^ * #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in tests, because ``lib2to3`` is `deprecated in Python 3.9 `_. @@ -281,6 +449,10 @@ No significant changes. v46.1.2 ------- + + +Misc +^^^^ * #1458: Added template for reporting Python 2 incompatibilities. @@ -293,12 +465,17 @@ No significant changes. v46.1.0 ------- + + +Changes +^^^^^^^ * #308: Allow version number normalization to be bypassed by wrapping in a 'setuptools.sic()' call. * #1424: Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag. * #1431: In ``easy_install.check_site_dir``, ensure the installation directory exists. * #1563: In ``pkg_resources`` prefer ``find_spec`` (PEP 451) to ``find_module``. Incorporate changes from v44.1.0: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ * #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 @@ -308,6 +485,10 @@ Incorporate changes from v44.1.0: v44.1.0 ------- + + +Changes +^^^^^^^ * #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ * #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 * #1994: Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook. @@ -316,16 +497,33 @@ v44.1.0 v46.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #65: Once again as in 3.0, removed the Features feature. + +Changes +^^^^^^^ * #1890: Fix vendored dependencies so importing ``setuptools.extern.some_module`` gives the same object as ``setuptools._vendor.some_module``. This makes Metadata picklable again. * #1899: Test suite now fails on warnings. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #2011: Fix broken link to distutils docs on package_data + +Misc +^^^^ * #1991: Include pkg_resources test data in sdist, so tests can be executed from it. v45.3.0 ------- + + +Changes +^^^^^^^ * #1557: Deprecated eggsecutable scripts and updated docs. * #1904: Update msvc.py to use CPython 3.8.0 mechanism to find msvc 14+ @@ -333,6 +531,10 @@ v45.3.0 v45.2.0 ------- + + +Changes +^^^^^^^ * #1905: Fixed defect in _imp, introduced in 41.6.0 when the 'tests' directory is not present. * #1941: Improve editable installs with PEP 518 build isolation: @@ -340,12 +542,19 @@ v45.2.0 * The error shown when the install directory is not in ``PYTHONPATH`` has been turned into a warning. * #1981: Setuptools now declares its ``tests`` and ``docs`` dependencies in metadata (extras). * #1985: Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9). + +Misc +^^^^ * #1968: Add flake8-2020 to check for misuse of sys.version or sys.version_info. v45.1.0 ------- + + +Changes +^^^^^^^ * #1458: Add minimum sunset date and preamble to Python 2 warning. * #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__ * #1974: Add Python 3 Only Trove Classifier and remove universal wheel declaration for more complete transition from Python 2. @@ -354,26 +563,47 @@ v45.1.0 v45.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1458: Drop support for Python 2. Setuptools now requires Python 3.5 or later. Install setuptools using pip >=9 or pin to Setuptools <45 to maintain 2.7 support. + +Changes +^^^^^^^ * #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2 v44.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1908: Drop support for Python 3.4. v43.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1634: Include ``pyproject.toml`` in source distribution by default. Projects relying on the previous behavior where ``pyproject.toml`` was excluded by default should stop relying on that behavior or add ``exclude pyproject.toml`` to their MANIFEST.in file. + +Changes +^^^^^^^ * #1927: Setuptools once again declares 'setuptools' in the ``build-system.requires`` and adds PEP 517 build support by declaring itself as the ``build-backend``. It additionally specifies ``build-system.backend-path`` to rely on itself for those builders that support it. v42.0.2 ------- +Changes +^^^^^^^ + * #1921: Fix support for easy_install's ``find-links`` option in ``setup.cfg``. * #1922: Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. @@ -381,12 +611,20 @@ v42.0.2 v42.0.1 ------- + + +Changes +^^^^^^^ * #1918: Fix regression in handling wheels compatibility tags. v42.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1830, #1909: Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior: * support for ``python_requires`` * better support for wheels (proper handling of priority with respect to PEP 425 tags) @@ -395,6 +633,9 @@ v42.0.0 * no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored) * pip environment variables are honored (and take precedence over easy_install options) * #1898: Removed the "upload" and "register" commands in favor of `twine `_. + +Changes +^^^^^^^ * #1767: Add support for the ``license_files`` option in ``setup.cfg`` to automatically include multiple license files in a source distribution. * #1829: Update handling of wheels compatibility tags: @@ -407,46 +648,82 @@ v42.0.0 v41.6.0 ------- + + +Changes +^^^^^^^ * #479: Replace usage of deprecated ``imp`` module with local re-implementation in ``setuptools._imp``. v41.5.1 ------- + + +Changes +^^^^^^^ * #1891: Fix code for detecting Visual Studio's version on Windows under Python 2. v41.5.0 ------- + + +Changes +^^^^^^^ * #1811: Improve Visual C++ 14.X support, mainly for Visual Studio 2017 and 2019. * #1814: Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account. * #1824: Fix tests when running under ``python3.10``. * #1878: Formally deprecated the ``test`` command, with the recommendation that users migrate to ``tox``. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1860: Update documentation to mention the egg format is not supported by pip and dependency links support was dropped starting with pip 19.0. * #1862: Drop ez_setup documentation: deprecated for some time (last updated in 2016), and still relying on easy_install (deprecated too). * #1868: Drop most documentation references to (deprecated) EasyInstall. * #1884: Added a trove classifier to document support for Python 3.8. + +Misc +^^^^ * #1886: Added Python 3.8 release to the Travis test matrix. v41.4.0 ------- + + +Changes +^^^^^^^ * #1847: In declarative config, now traps errors when invalid ``python_requires`` values are supplied. v41.3.0 ------- + + +Changes +^^^^^^^ * #1690: When storing extras, rely on OrderedSet to retain order of extras as indicated by the packager, which will also be deterministic on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+. + +Misc +^^^^ * #1858: Fixed failing integration test triggered by 'long_description_content_type' in packaging. v41.2.0 ------- + + +Changes +^^^^^^^ * #479: Remove some usage of the deprecated ``imp`` module. + +Misc +^^^^ * #1565: Changed html_sidebars from string to list of string as per https://www.sphinx-doc.org/en/master/changes.html#id58 @@ -454,6 +731,10 @@ v41.2.0 v41.1.0 ------- + + +Misc +^^^^ * #1697: Moved most of the constants from setup.py to setup.cfg * #1749: Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory. * #1750: Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist. @@ -461,12 +742,19 @@ v41.1.0 * #1769: Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings. * #1788: Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9. * #1790: Added the file path to the error message when a ``UnicodeDecodeError`` occurs while reading a metadata file. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1776: Use license classifiers rather than the license field. v41.0.1 ------- + + +Changes +^^^^^^^ * #1671: Fixed issue with the PEP 517 backend that prevented building a wheel when the ``dist/`` directory contained existing ``.whl`` files. * #1709: In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH. * #1741: In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows @@ -475,22 +763,37 @@ v41.0.1 v41.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1735: When parsing setup.cfg files, setuptools now requires the files to be encoded as UTF-8. Any other encoding will lead to a UnicodeDecodeError. This change removes support for specifying an encoding using a 'coding: ' directive in the header of the file, a feature that was introduces in 40.7. Given the recent release of the aforementioned feature, it is assumed that few if any projects are utilizing the feature to specify an encoding other than UTF-8. v40.9.0 ------- + + +Changes +^^^^^^^ * #1675: Added support for ``setup.cfg``-only projects when using the ``setuptools.build_meta`` backend. Projects that have enabled PEP 517 no longer need to have a ``setup.py`` and can use the purely declarative ``setup.cfg`` configuration file instead. * #1720: Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``setuptools.build_meta`` build backend. * #1664: Added the path to the ``PKG-INFO`` or ``METADATA`` file in the exception text when the ``Version:`` header can't be found. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1705: Removed some placeholder documentation sections referring to deprecated features. v40.8.0 ------- + + +Changes +^^^^^^^ * #1652: Added the ``build_meta:__legacy__`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``. * #1635: Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors. * #1536: ``setuptools`` will now automatically include licenses if ``setup.cfg`` contains a ``license_file`` attribute, unless this file is manually excluded inside ``MANIFEST.in``. @@ -499,25 +802,44 @@ v40.8.0 v40.7.3 ------- + + +Changes +^^^^^^^ * #1670: In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use ``urllib.parse.urlparse`` led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668. v40.7.2 ------- + + +Changes +^^^^^^^ * #1666: Restore port in URL handling in package_index. v40.7.1 ------- + + +Changes +^^^^^^^ * #1660: On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations. v40.7.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1551: File inputs for the ``license`` field in ``setup.cfg`` files now explicitly raise an error. + +Changes +^^^^^^^ * #1180: Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136). * #1499: ``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485. * #1544: Added tests for PackageIndex.download (for git URLs). @@ -527,30 +849,51 @@ v40.7.0 v40.6.3 ------- + + +Changes +^^^^^^^ * #1594: PEP 517 backend no longer declares setuptools as a dependency as it can be assumed. v40.6.2 ------- + + +Changes +^^^^^^^ * #1592: Fix invalid dependency on external six module (instead of vendored version). v40.6.1 ------- + + +Changes +^^^^^^^ * #1590: Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata. v40.6.0 ------- + + +Deprecations +^^^^^^^^^^^^ * #1541: Officially deprecated the ``requires`` parameter in ``setup()``. + +Changes +^^^^^^^ * #1519: In ``pkg_resources.normalize_path``, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows. * #1545: Changed the warning class of all deprecation warnings; deprecation warning classes are no longer derived from ``DeprecationWarning`` and are thus visible by default. * #1554: ``build_meta.build_sdist`` now includes ``setup.py`` in source distributions by default. * #1576: Started monkey-patching ``get_metadata_version`` and ``read_pkg_file`` onto ``distutils.DistributionMetadata`` to retain the correct version on the ``PKG-INFO`` file in the (deprecated) ``upload`` command. -* #1533: Restricted the ``recursive-include setuptools/_vendor`` to contain only .py and .txt files. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1395: Changed Pyrex references to Cython in the documentation. * #1456: Documented that the ``rpmbuild`` packages is required for the ``bdist_rpm`` command. * #1537: Documented how to use ``setup.cfg`` for ``src/ layouts`` @@ -559,69 +902,115 @@ v40.6.0 * #1553: Updated installation instructions to point to ``pip install`` instead of ``ez_setup.py``. * #1560: Updated ``setuptools`` distribution documentation to remove some outdated information. * #1564: Documented ``setup.cfg`` minimum version for version and project_urls. + +Misc +^^^^ +* #1533: Restricted the ``recursive-include setuptools/_vendor`` to contain only .py and .txt files. * #1572: Added the ``concurrent.futures`` backport ``futures`` to the Python 2.7 test suite requirements. v40.5.0 ------- + + +Changes +^^^^^^^ * #1335: In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks. * #1502: Deprecated support for downloads from Subversion in package_index/easy_install. * #1517: Dropped use of six.u in favor of ``u""`` literals. * #1520: Added support for ``data_files`` in ``setup.cfg``. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1525: Fixed rendering of the deprecation warning in easy_install doc. v40.4.3 ------- + + +Changes +^^^^^^^ * #1480: Bump vendored pyparsing in pkg_resources to 2.2.1. v40.4.2 ------- + + +Misc +^^^^ * #1497: Updated gitignore in repo. v40.4.1 ------- + + +Changes +^^^^^^^ * #1480: Bump vendored pyparsing to 2.2.1. v40.4.0 ------- + + +Changes +^^^^^^^ * #1481: Join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two). v40.3.0 ------- + + +Changes +^^^^^^^ * #1402: Fixed a bug with namespace packages under Python 3.6 when one package in current directory hides another which is installed. * #1427: Set timestamp of ``.egg-info`` directory whenever ``egg_info`` command is run. * #1474: ``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore. * #1486: Suppress warnings in pkg_resources.handle_ns. + +Misc +^^^^ * #1479: Remove internal use of six.binary_type. v40.2.0 ------- + + +Changes +^^^^^^^ * #1466: Fix handling of Unicode arguments in PEP 517 backend v40.1.1 -------- + + +Changes +^^^^^^^ * #1465: Fix regression with ``egg_info`` command when tagging is used. v40.1.0 ------- + + +Changes +^^^^^^^ * #1410: Deprecated ``upload`` and ``register`` commands. * #1312: Introduced find_namespace_packages() to find PEP 420 namespace packages. * #1420: Added find_namespace: directive to config parser. @@ -631,24 +1020,44 @@ v40.1.0 * #1388: Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found. * #1389: Added support for scripts which have unicode content. * #1416: Moved several Python version checks over to using ``six.PY2`` and ``six.PY3``. + +Misc +^^^^ * #1441: Removed spurious executable permissions from files that don't need them. v40.0.0 ------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ * #1342: Drop support for Python 3.3. + +Changes +^^^^^^^ * #1366: In package_index, fixed handling of encoded entities in URLs. * #1383: In pkg_resources VendorImporter, avoid removing packages imported from the root. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1379: Minor doc fixes after actually using the new release process. * #1385: Removed section on non-package data files. * #1403: Fix developer's guide. + +Misc +^^^^ * #1404: Fix PEP 518 configuration: set build requirements in ``pyproject.toml`` to ``["wheel"]``. v39.2.0 ------- + + +Changes +^^^^^^^ * #1359: Support using "file:" to load a PEP 440-compliant package version from a text file. * #1360: Fixed issue with a mismatch between the name of the package and the @@ -657,11 +1066,17 @@ v39.2.0 includes the attributes in the ``_provider`` instance variable. * #1365: Take the package_dir option into account when loading the version from a module attribute. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ * #1353: Added coverage badge to README. * #1356: Made small fixes to the developer guide documentation. * #1357: Fixed warnings in documentation builds and started enforcing that the docs build without warnings in tox. * #1376: Updated release process docs. + +Misc +^^^^ * #1343: The ``setuptools`` specific ``long_description_content_type``, ``project_urls`` and ``provides_extras`` fields are now set consistently after any ``distutils`` ``setup_keywords`` calls, allowing them to override From 6597dcb657705154bb1ae75104dd1b7fab0b8b10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Oct 2020 13:54:16 -0400 Subject: [PATCH 8222/8469] Switch to RTD v2 config --- .readthedocs.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index cb10a7f991..6a40653472 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,6 +1,8 @@ +# Read the Docs configuration file +# https://docs.readthedocs.io/en/stable/config-file/v2.html + +version: 2 + python: - version: 3 - extra_requirements: - - docs - pip_install: false - requirements: docs/requirements.txt + install: + - requirements: docs/requirements.txt From 0e1fc1c6318864ab70dc0868762e02fa8faaaf8e Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 19 Oct 2020 10:06:57 +0300 Subject: [PATCH 8223/8469] s/517/PEP 517/ --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 697087edb4..874ac086a2 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -21,7 +21,7 @@ the backend (build system) it wants to use. The distribution can then be generated with whatever tools that provides a ``build sdist``-alike functionality. While this may appear cumbersome, given the added pieces, it in fact tremendously enhances the portability of your package. The -change is driven under :pep:`517 <517#build-requirements>`. To learn more about Python packaging in general, +change is driven under :pep:`PEP 517 <517#build-requirements>`. To learn more about Python packaging in general, navigate to the `bottom `_ of this page. From d7170a28dc3ad02eacc69d1c425bb6f1d5afe619 Mon Sep 17 00:00:00 2001 From: Greg Solon Date: Tue, 20 Oct 2020 21:55:56 +0800 Subject: [PATCH 8224/8469] Update quickstart.rst Removed quotes in setup.cfg which caused build to fail. --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 697087edb4..a9cb76a4ee 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -43,11 +43,11 @@ such as metadata, contents, dependencies, etc. Here we demonstrate the minimum .. code-block:: ini [metadata] - name = "mypackage" + name = mypackage version = 0.0.1 [options] - packages = "mypackage" + packages = mypackage install_requires = requests importlib; python_version == "2.6" From fb8d9c43500c06f6f2286ea7c7ae452d41cce412 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 14 Nov 2020 20:32:18 -0500 Subject: [PATCH 8225/8469] Move Tidelift release note publishing to Github Actions. --- .github/workflows/main.yml | 6 ++++++ azure-pipelines.yml | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..01999cabbf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,6 @@ +jobs: + release: + steps: + - name: Release + env: + TIDELIFT_TOKEN: ${{ secrets.TIDELIFT_TOKEN }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 01bfa5f56f..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,2 +0,0 @@ - env: - TIDELIFT_TOKEN: $(Tidelift-token) From ec944a40aa06f0499201b06a308fe713d77ddbf4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 18 Nov 2020 16:16:42 +0100 Subject: [PATCH 8226/8469] Upgrade GHA actions using deprecated env mechanism --- .github/workflows/python-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 2d5abe2767..e1147ca0cb 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -62,7 +62,7 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v2.1.1 + uses: actions/setup-python@v2 if: >- !fromJSON(env.USE_DEADSNAKES) && true || false with: @@ -77,7 +77,7 @@ jobs: run: >- python -m sysconfig - name: Pip cache - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} From de48cfdb81f285a46d0484e780019b7ee75e95ce Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 18 Nov 2020 16:25:43 +0100 Subject: [PATCH 8227/8469] Temporarily allow `set-env` GHA commands Refs: * github.com/deadsnakes/issues/issues/135 * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ --- .github/workflows/python-tests.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index e1147ca0cb..b664018174 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -50,6 +50,11 @@ jobs: if: >- endsWith(env.PYTHON_VERSION, '-beta') || endsWith(env.PYTHON_VERSION, '-dev') + # FIXME: replace `set-env` with a newer alternative + # Refs: + # * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: | from __future__ import print_function python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '') @@ -59,6 +64,12 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes) uses: deadsnakes/action@v1.0.0 if: fromJSON(env.USE_DEADSNAKES) && true || false + # FIXME: drop once deadsnakes/action gets fixed + # Refs: + # * github.com/deadsnakes/issues/issues/135 + # * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true with: python-version: ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -99,6 +110,11 @@ jobs: python -m pip freeze --all - name: Adjust TOXENV for PyPy if: startsWith(env.PYTHON_VERSION, 'pypy') + # FIXME: replace `set-env` with a newer alternative + # Refs: + # * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: >- echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}" - name: Log env vars From b20d12e1fb7132fada3e6b58ec1c1c0bd409c5f7 Mon Sep 17 00:00:00 2001 From: Harald Korneliussen Date: Wed, 18 Nov 2020 19:32:18 +0100 Subject: [PATCH 8228/8469] Fixes syntax issues in quickstart (#2448) Quotes in the name and packages field causes an "Invalid distribution name or version syntax" if you follow this quickstart guide directly. pep517.build also requires you to specify the directory. --- docs/userguide/quickstart.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 697087edb4..50a984ec9b 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -43,11 +43,11 @@ such as metadata, contents, dependencies, etc. Here we demonstrate the minimum .. code-block:: ini [metadata] - name = "mypackage" + name = mypackage version = 0.0.1 [options] - packages = "mypackage" + packages = mypackage install_requires = requests importlib; python_version == "2.6" @@ -63,7 +63,7 @@ Then, you need an installer, such as `pep517 ` which you can obtain via ``pip install pep517``. After downloading it, invoke the installer:: - python -m pep517.build + python -m pep517.build . You now have your distribution ready (e.g. a ``tar.gz`` file and a ``.whl`` file in the ``dist`` directory), which you can upload to PyPI! From 4a4d50af47c067eff372fd007123b62c25e5c6dd Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 20 Nov 2020 00:02:20 +0100 Subject: [PATCH 8229/8469] Fix all deprecated set-env and add-path uses @ GHA --- .github/workflows/python-tests.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index b664018174..9dc4b9d7a8 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -57,19 +57,15 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: | from __future__ import print_function + import os python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '') - print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version)) - print('::set-env name=USE_DEADSNAKES::true') + with open(os.environ['GITHUB_ENV'], 'a') as env_file: + env_file.write('PYTHON_VERSION={ver}\n'.format(ver=python_version)) + env_file.write('USE_DEADSNAKES=true\n') shell: python - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes) - uses: deadsnakes/action@v1.0.0 + uses: deadsnakes/action@v2.0.1 if: fromJSON(env.USE_DEADSNAKES) && true || false - # FIXME: drop once deadsnakes/action gets fixed - # Refs: - # * github.com/deadsnakes/issues/issues/135 - # * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true with: python-version: ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -110,13 +106,10 @@ jobs: python -m pip freeze --all - name: Adjust TOXENV for PyPy if: startsWith(env.PYTHON_VERSION, 'pypy') - # FIXME: replace `set-env` with a newer alternative - # Refs: - # * github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: >- - echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}" + echo "TOXENV=${{ env.PYTHON_VERSION }}" + >> + "${GITHUB_ENV}" - name: Log env vars run: >- env From b4de397a00c6c9ef0551082d532a60badbea7ee9 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Fri, 4 Dec 2020 13:57:21 -0600 Subject: [PATCH 8230/8469] fix broken link to entry-points details --- docs/pkg_resources.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst index 364e218328..c99f0cd13a 100644 --- a/docs/pkg_resources.rst +++ b/docs/pkg_resources.rst @@ -703,7 +703,7 @@ entry point group and look for entry points named "pre_process" and To advertise an entry point, a project needs to use ``setuptools`` and provide an ``entry_points`` argument to ``setup()`` in its setup script, so that the entry points will be included in the distribution's metadata. For more -details, see the [``setuptools`` documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins). +details, see `Advertising Behavior _. Each project distribution can advertise at most one entry point of a given name within the same entry point group. For example, a distutils extension From 475fb309a8559556b12a5b37acd03e5d0cf49aa0 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Sat, 5 Dec 2020 12:07:28 -0600 Subject: [PATCH 8231/8469] Update docs/pkg_resources.rst Co-authored-by: Sviatoslav Sydorenko --- docs/pkg_resources.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst index c99f0cd13a..19d43244d1 100644 --- a/docs/pkg_resources.rst +++ b/docs/pkg_resources.rst @@ -703,7 +703,7 @@ entry point group and look for entry points named "pre_process" and To advertise an entry point, a project needs to use ``setuptools`` and provide an ``entry_points`` argument to ``setup()`` in its setup script, so that the entry points will be included in the distribution's metadata. For more -details, see `Advertising Behavior _. +details, see :ref:`Advertising Behavior`. Each project distribution can advertise at most one entry point of a given name within the same entry point group. For example, a distutils extension @@ -1939,4 +1939,3 @@ History 0.3a1 * Initial release. - From 65441834e019b064bae862d3cfd9971ecbd1c7f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Dec 2020 12:39:41 -0500 Subject: [PATCH 8232/8469] Remove conditional skip, no longer relevant. --- setuptools/tests/test_integration.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 24cef480ea..2360491050 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -123,8 +123,6 @@ def test_pyuri(install_context): @pytest.mark.parametrize("build_dep", build_deps) -@pytest.mark.skipif( - sys.version_info < (3, 6), reason='run only on late versions') def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): """ All setuptools build dependencies must build without From 99bc2c11d74075ebf0b1dae4cab881225765f404 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Dec 2020 12:54:20 -0500 Subject: [PATCH 8233/8469] Remove tests guaranteeing that (vendored) dependencies can be installed without setuptools. In a PEP 517 world without distutils, packagers will need to find another way to build and supply the dependencies --- setuptools/tests/test_integration.py | 56 ---------------------------- 1 file changed, 56 deletions(-) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 2360491050..04ba62f7ba 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -6,11 +6,6 @@ import glob import os import sys -import re -import subprocess -import functools -import tarfile -import zipfile import urllib.request import pytest @@ -117,54 +112,3 @@ def test_pyuri(install_context): # The package data should be installed. assert os.path.exists(os.path.join(pyuri.location, 'pyuri', 'uri.regex')) - - -build_deps = ['appdirs', 'packaging', 'pyparsing', 'six'] - - -@pytest.mark.parametrize("build_dep", build_deps) -def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): - """ - All setuptools build dependencies must build without - setuptools. - """ - if 'pyparsing' in build_dep: - pytest.xfail(reason="Project imports setuptools unconditionally") - build_target = tmpdir_factory.mktemp('source') - build_dir = download_and_extract(request, build_dep, build_target) - install_target = tmpdir_factory.mktemp('target') - output = install(build_dir, install_target) - for line in output.splitlines(): - match = re.search('Unknown distribution option: (.*)', line) - allowed_unknowns = [ - 'test_suite', - 'tests_require', - 'python_requires', - 'install_requires', - 'long_description_content_type', - ] - assert not match or match.group(1).strip('"\'') in allowed_unknowns - - -def install(pkg_dir, install_dir): - with open(os.path.join(pkg_dir, 'setuptools.py'), 'w') as breaker: - breaker.write('raise ImportError()') - cmd = [sys.executable, 'setup.py', 'install', '--prefix', str(install_dir)] - env = dict(os.environ, PYTHONPATH=str(pkg_dir)) - output = subprocess.check_output( - cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) - return output.decode('utf-8') - - -def download_and_extract(request, req, target): - cmd = [ - sys.executable, '-m', 'pip', 'download', '--no-deps', - '--no-binary', ':all:', req, - ] - output = subprocess.check_output(cmd, encoding='utf-8') - filename = re.search('Saved (.*)', output).group(1) - request.addfinalizer(functools.partial(os.remove, filename)) - opener = zipfile.ZipFile if filename.endswith('.zip') else tarfile.open - with opener(filename) as archive: - archive.extractall(target) - return os.path.join(target, os.listdir(target)[0]) From 2a0463cb489a1b8a222248c65422d908dc4aee18 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Dec 2020 12:55:57 -0500 Subject: [PATCH 8234/8469] Update changelog. --- changelog.d/2471.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2471.misc.rst diff --git a/changelog.d/2471.misc.rst b/changelog.d/2471.misc.rst new file mode 100644 index 0000000000..5bd42a6d98 --- /dev/null +++ b/changelog.d/2471.misc.rst @@ -0,0 +1 @@ +Removed the tests that guarantee that the vendored dependencies can be built by distutils. From b6bbe236ed0689f50b5148f1172510b975687e62 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Dec 2020 19:32:25 -0500 Subject: [PATCH 8235/8469] =?UTF-8?q?Bump=20version:=2050.3.2=20=E2=86=92?= =?UTF-8?q?=2051.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 20 ++++++++++++++++++++ changelog.d/2430.doc.1.rst | 2 -- changelog.d/2430.doc.2.rst | 2 -- changelog.d/2435.breaking.rst | 1 - changelog.d/2471.misc.rst | 1 - setup.cfg | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/2430.doc.1.rst delete mode 100644 changelog.d/2430.doc.2.rst delete mode 100644 changelog.d/2435.breaking.rst delete mode 100644 changelog.d/2471.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 97840e4275..c56d45dc8e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 50.3.2 +current_version = 51.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 567b2bac76..55133876e9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,23 @@ +v51.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2435: Require Python 3.6 or later. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2430: Fixed inconsistent RST title nesting levels caused by #2399 + -- by :user:`webknjaz` +* #2430: Fixed a typo in Sphinx docs that made docs dev section disappear + as a result of PR #2426 -- by :user:`webknjaz` + +Misc +^^^^ +* #2471: Removed the tests that guarantee that the vendored dependencies can be built by distutils. + + v50.3.2 ------- diff --git a/changelog.d/2430.doc.1.rst b/changelog.d/2430.doc.1.rst deleted file mode 100644 index d09e0b9e7b..0000000000 --- a/changelog.d/2430.doc.1.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed a typo in Sphinx docs that made docs dev section disappear -as a result of PR #2426 -- by :user:`webknjaz` diff --git a/changelog.d/2430.doc.2.rst b/changelog.d/2430.doc.2.rst deleted file mode 100644 index 0ac8782323..0000000000 --- a/changelog.d/2430.doc.2.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed inconsistent RST title nesting levels caused by #2399 --- by :user:`webknjaz` diff --git a/changelog.d/2435.breaking.rst b/changelog.d/2435.breaking.rst deleted file mode 100644 index d29c60eb39..0000000000 --- a/changelog.d/2435.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Require Python 3.6 or later. diff --git a/changelog.d/2471.misc.rst b/changelog.d/2471.misc.rst deleted file mode 100644 index 5bd42a6d98..0000000000 --- a/changelog.d/2471.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed the tests that guarantee that the vendored dependencies can be built by distutils. diff --git a/setup.cfg b/setup.cfg index 0d3fdcf682..570bd2889b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 50.3.2 +version = 51.0.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From c681f6748acaea1bf0b706528c36327cc94a6eed Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 8 Dec 2020 16:29:09 -0500 Subject: [PATCH 8236/8469] Collapse skeleton history from archive/2020-12 --- .coveragerc | 5 ++ .flake8 | 9 +++ .github/workflows/main.yml | 42 +++++++++++ .pre-commit-config.yaml | 10 +++ .readthedocs.yml | 6 ++ CHANGES.rst | 0 LICENSE | 19 +++++ README.rst | 18 +++++ docs/conf.py | 26 +++++++ docs/history.rst | 8 +++ docs/index.rst | 22 ++++++ mypy.ini | 2 + pyproject.toml | 22 ++++++ pytest.ini | 9 +++ setup.cfg | 45 ++++++++++++ setup.py | 6 ++ skeleton.md | 144 +++++++++++++++++++++++++++++++++++++ tox.ini | 40 +++++++++++ 18 files changed, 433 insertions(+) create mode 100644 .coveragerc create mode 100644 .flake8 create mode 100644 .github/workflows/main.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .readthedocs.yml create mode 100644 CHANGES.rst create mode 100644 LICENSE create mode 100644 README.rst create mode 100644 docs/conf.py create mode 100644 docs/history.rst create mode 100644 docs/index.rst create mode 100644 mypy.ini create mode 100644 pyproject.toml create mode 100644 pytest.ini create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 skeleton.md create mode 100644 tox.ini diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000..45823064a3 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,5 @@ +[run] +omit = .tox/* + +[report] +show_missing = True diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..790c109fdb --- /dev/null +++ b/.flake8 @@ -0,0 +1,9 @@ +[flake8] +max-line-length = 88 +ignore = + # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 + W503 + # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 + W504 + # Black creates whitespace before colon + E203 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..8c5c232c36 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: Automated Tests + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + python: [3.6, 3.8, 3.9] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install tox + run: | + python -m pip install tox + - name: Run tests + run: tox + + release: + needs: test + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install tox + run: | + python -m pip install tox + - name: Release + run: tox -e release + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..6639c78c6c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/psf/black + rev: stable + hooks: + - id: black + +- repo: https://github.com/asottile/blacken-docs + rev: v1.8.0 + hooks: + - id: blacken-docs diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000000..cc698548db --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,6 @@ +version: 2 +python: + install: + - path: . + extra_requirements: + - docs diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..353924be0e --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright Jason R. Coombs + +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. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000..69554ef811 --- /dev/null +++ b/README.rst @@ -0,0 +1,18 @@ +.. image:: https://img.shields.io/pypi/v/skeleton.svg + :target: `PyPI link`_ + +.. image:: https://img.shields.io/pypi/pyversions/skeleton.svg + :target: `PyPI link`_ + +.. _PyPI link: https://pypi.org/project/skeleton + +.. image:: https://github.com/jaraco/skeleton/workflows/Automated%20Tests/badge.svg + :target: https://github.com/jaraco/skeleton/actions?query=workflow%3A%22Automated+Tests%22 + :alt: Automated Tests + +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/psf/black + :alt: Code style: Black + +.. .. image:: https://readthedocs.org/projects/skeleton/badge/?version=latest +.. :target: https://skeleton.readthedocs.io/en/latest/?badge=latest diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000..433d185d4a --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] + +master_doc = "index" + +link_files = { + '../CHANGES.rst': dict( + using=dict(GH='https://github.com'), + replace=[ + dict( + pattern=r'(Issue #|\B#)(?P\d+)', + url='{package_url}/issues/{issue}', + ), + dict( + pattern=r'(?m:^((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n)', + with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', + ), + dict( + pattern=r'PEP[- ](?P\d+)', + url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', + ), + ], + ) +} diff --git a/docs/history.rst b/docs/history.rst new file mode 100644 index 0000000000..8e217503ba --- /dev/null +++ b/docs/history.rst @@ -0,0 +1,8 @@ +:tocdepth: 2 + +.. _changes: + +History +******* + +.. include:: ../CHANGES (links).rst diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000..d14131b0ef --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,22 @@ +Welcome to skeleton documentation! +======================================== + +.. toctree:: + :maxdepth: 1 + + history + + +.. automodule:: skeleton + :members: + :undoc-members: + :show-inheritance: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000000..976ba02946 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..79f088a956 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"] +build-backend = "setuptools.build_meta" + +[tool.black] +skip-string-normalization = true + +[tool.setuptools_scm] + +# jaraco/skeleton#22 +[tool.jaraco.pytest.plugins.black] +addopts = "--black" + +# jaraco/skeleton#22 +[tool.jaraco.pytest.plugins.mypy] +addopts = "--mypy" + +[tool.jaraco.pytest.plugins.flake8] +addopts = "--flake8" + +[tool.jaraco.pytest.plugins.cov] +addopts = "--cov" diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..d7f0b11559 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,9 @@ +[pytest] +norecursedirs=dist build .tox .eggs +addopts=--doctest-modules +doctest_optionflags=ALLOW_UNICODE ELLIPSIS +# workaround for warning pytest-dev/pytest#6178 +junit_family=xunit2 +filterwarnings= + # https://github.com/pytest-dev/pytest/issues/6928 + ignore:direct construction of .*Item has been deprecated:DeprecationWarning diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..6321ca774c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,45 @@ +[metadata] +license_file = LICENSE +name = skeleton +author = Jason R. Coombs +author_email = jaraco@jaraco.com +description = skeleton +long_description = file:README.rst +url = https://github.com/jaraco/skeleton +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + +[options] +packages = find: +include_package_data = true +python_requires = >=3.6 +install_requires = +setup_requires = setuptools_scm[toml] >= 3.4.1 + +[options.extras_require] +testing = + # upstream + pytest >= 3.5, !=3.7.3 + pytest-checkdocs >= 1.2.3 + pytest-flake8 + pytest-black >= 0.3.7; python_implementation != "PyPy" + pytest-cov + pytest-mypy; python_implementation != "PyPy" + # jaraco/skeleton#22 + jaraco.test >= 3.2.0 + + # local + +docs = + # upstream + sphinx + jaraco.packaging >= 3.2 + rst.linker >= 1.9 + + # local + +[options.entry_points] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..bac24a43d9 --- /dev/null +++ b/setup.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +import setuptools + +if __name__ == "__main__": + setuptools.setup() diff --git a/skeleton.md b/skeleton.md new file mode 100644 index 0000000000..ec421c2598 --- /dev/null +++ b/skeleton.md @@ -0,0 +1,144 @@ +# Overview + +This project is merged with [skeleton](https://github.com/jaraco/skeleton). What is skeleton? It's the scaffolding of a Python project jaraco [introduced in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). It seeks to provide a means to re-use techniques and inherit advances when managing projects for distribution. + +## An SCM-Managed Approach + +While maintaining dozens of projects in PyPI, jaraco derives best practices for project distribution and publishes them in the [skeleton repo](https://github.com/jaraco/skeleton), a Git repo capturing the evolution and culmination of these best practices. + +It's intended to be used by a new or existing project to adopt these practices and honed and proven techniques. Adopters are encouraged to use the project directly and maintain a small deviation from the technique, make their own fork for more substantial changes unique to their environment or preferences, or simply adopt the skeleton once and abandon it thereafter. + +The primary advantage to using an SCM for maintaining these techniques is that those tools help facilitate the merge between the template and its adopting projects. + +Another advantage to using an SCM-managed approach is that tools like GitHub recognize that a change in the skeleton is the _same change_ across all projects that merge with that skeleton. Without the ancestry, with a traditional copy/paste approach, a [commit like this](https://github.com/jaraco/skeleton/commit/12eed1326e1bc26ce256e7b3f8cd8d3a5beab2d5) would produce notifications in the upstream project issue for each and every application, but because it's centralized, GitHub provides just the one notification when the change is added to the skeleton. + +# Usage + +## new projects + +To use skeleton for a new project, simply pull the skeleton into a new project: + +``` +$ git init my-new-project +$ cd my-new-project +$ git pull gh://jaraco/skeleton +``` + +Now customize the project to suit your individual project needs. + +## existing projects + +If you have an existing project, you can still incorporate the skeleton by merging it into the codebase. + +``` +$ git merge skeleton --allow-unrelated-histories +``` + +The `--allow-unrelated-histories` is necessary because the history from the skeleton was previously unrelated to the existing codebase. Resolve any merge conflicts and commit to the master, and now the project is based on the shared skeleton. + +## Updating + +Whenever a change is needed or desired for the general technique for packaging, it can be made in the skeleton project and then merged into each of the derived projects as needed, recommended before each release. As a result, features and best practices for packaging are centrally maintained and readily trickle into a whole suite of packages. This technique lowers the amount of tedious work necessary to create or maintain a project, and coupled with other techniques like continuous integration and deployment, lowers the cost of creating and maintaining refined Python projects to just a few, familiar Git operations. + +For example, here's a session of the [path project](https://pypi.org/project/path) pulling non-conflicting changes from the skeleton: + + + +Thereafter, the target project can make whatever customizations it deems relevant to the scaffolding. The project may even at some point decide that the divergence is too great to merit renewed merging with the original skeleton. This approach applies maximal guidance while creating minimal constraints. + +# Features + +The features/techniques employed by the skeleton include: + +- PEP 517/518-based build relying on Setuptools as the build tool +- Setuptools declarative configuration using setup.cfg +- tox for running tests +- A README.rst as reStructuredText with some popular badges, but with Read the Docs and AppVeyor badges commented out +- A CHANGES.rst file intended for publishing release notes about the project +- Use of [Black](https://black.readthedocs.io/en/stable/) for code formatting (disabled on unsupported Python 3.5 and earlier) +- Integrated type checking through [mypy](https://github.com/python/mypy/). + +## Packaging Conventions + +A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and declares the requirements necessary to build the project on Setuptools (a minimum version compatible with setup.cfg declarative config). + +The setup.cfg file implements the following features: + +- Assumes universal wheel for release +- Advertises the project's LICENSE file (MIT by default) +- Reads the README.rst file into the long description +- Some common Trove classifiers +- Includes all packages discovered in the repo +- Data files in the package are also included (not just Python files) +- Declares the required Python versions +- Declares install requirements (empty by default) +- Declares setup requirements for legacy environments +- Supplies two 'extras': + - testing: requirements for running tests + - docs: requirements for building docs + - these extras split the declaration into "upstream" (requirements as declared by the skeleton) and "local" (those specific to the local project); these markers help avoid merge conflicts +- Placeholder for defining entry points + +Additionally, the setup.py file declares `use_scm_version` which relies on [setuptools_scm](https://pypi.org/project/setuptools_scm) to do two things: + +- derive the project version from SCM tags +- ensure that all files committed to the repo are automatically included in releases + +## Running Tests + +The skeleton assumes the developer has [tox](https://pypi.org/project/tox) installed. The developer is expected to run `tox` to run tests on the current Python version using [pytest](https://pypi.org/project/pytest). + +Other environments (invoked with `tox -e {name}`) supplied include: + + - a `docs` environment to build the documentation + - a `release` environment to publish the package to PyPI + +A pytest.ini is included to define common options around running tests. In particular: + +- rely on default test discovery in the current directory +- avoid recursing into common directories not containing tests +- run doctests on modules and invoke Flake8 tests +- in doctests, allow Unicode literals and regular literals to match, allowing for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that would be undone by supplying the prior option. +- filters out known warnings caused by libraries/functionality included by the skeleton + +Relies on a .flake8 file to correct some default behaviors: + +- disable mutually incompatible rules W503 and W504 +- support for Black format + +## Continuous Integration + +The project is pre-configured to run Continuous Integration tests. + +### Github Actions + +[Github Actions](https://docs.github.com/en/free-pro-team@latest/actions) are the preferred provider as they provide free, fast, multi-platform services with straightforward configuration. Configured in `.github/workflows`. + +Features include: +- test against multiple Python versions +- run on late (and updated) platform versions +- automated releases of tagged commits + +### Continuous Deployments + +In addition to running tests, an additional publish stage is configured to automatically release tagged commits to PyPI using [API tokens](https://pypi.org/help/#apitoken). The release process expects an authorized token to be configured with each Github project (or org) `PYPI_TOKEN` [secret](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets). Example: + +``` +pip-run -q jaraco.develop -- -m jaraco.develop.add-github-secrets +``` + +## Building Documentation + +Documentation is automatically built by [Read the Docs](https://readthedocs.org) when the project is registered with it, by way of the .readthedocs.yml file. To test the docs build manually, a tox env may be invoked as `tox -e docs`. Both techniques rely on the dependencies declared in `setup.cfg/options.extras_require.docs`. + +In addition to building the Sphinx docs scaffolded in `docs/`, the docs build a `history.html` file that first injects release dates and hyperlinks into the CHANGES.rst before incorporating it as history in the docs. + +## Cutting releases + +By default, tagged commits are released through the continuous integration deploy stage. + +Releases may also be cut manually by invoking the tox environment `release` with the PyPI token set as the TWINE_PASSWORD: + +``` +TWINE_PASSWORD={token} tox -e release +``` diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..7233b94232 --- /dev/null +++ b/tox.ini @@ -0,0 +1,40 @@ +[tox] +envlist = python +minversion = 3.2 +# https://github.com/jaraco/skeleton/issues/6 +tox_pip_extensions_ext_venv_update = true +toxworkdir={env:TOX_WORK_DIR:.tox} + + +[testenv] +deps = +commands = + pytest {posargs} +usedevelop = True +extras = testing + +[testenv:docs] +extras = + docs + testing +changedir = docs +commands = + python -m sphinx . {toxinidir}/build/html + +[testenv:release] +skip_install = True +deps = + pep517>=0.5 + twine[keyring]>=1.13 + path + jaraco.develop>=7.1 +passenv = + TWINE_PASSWORD + GITHUB_TOKEN +setenv = + TWINE_USERNAME = {env:TWINE_USERNAME:__token__} +commands = + python -c "import path; path.Path('dist').rmtree_p()" + python -m pep517.build . + python -m twine upload dist/* + python -m jaraco.develop.create-github-release From d00fac7b86abd71664af6a28acd924eff7c79017 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Dec 2020 12:22:45 -0500 Subject: [PATCH 8237/8469] Include rst files in docs in sdist. Fixes #2477. --- MANIFEST.in | 2 +- changelog.d/2477.misc.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2477.misc.rst diff --git a/MANIFEST.in b/MANIFEST.in index 128ae280ec..92bd4f6938 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ recursive-include setuptools *.py *.exe *.xml recursive-include tests *.py recursive-include setuptools/tests *.html -recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html +recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html recursive-include setuptools/_vendor *.py *.txt recursive-include pkg_resources *.py *.txt recursive-include pkg_resources/tests/data * diff --git a/changelog.d/2477.misc.rst b/changelog.d/2477.misc.rst new file mode 100644 index 0000000000..48900e9da2 --- /dev/null +++ b/changelog.d/2477.misc.rst @@ -0,0 +1 @@ +Restore inclusion of rst files in sdist. From d97cb2b35ec9afe2839a48587a456d81b0055a60 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Dec 2020 12:34:36 -0500 Subject: [PATCH 8238/8469] Update changelog. Ref #2484. --- changelog.d/2484.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2484.misc.rst diff --git a/changelog.d/2484.misc.rst b/changelog.d/2484.misc.rst new file mode 100644 index 0000000000..8f93b3d0ed --- /dev/null +++ b/changelog.d/2484.misc.rst @@ -0,0 +1 @@ +Setuptools has replaced the master branch with the main branch. From 1603dcbaae3bbee4fa90e34828146e348c661401 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Fri, 11 Dec 2020 04:34:59 +0800 Subject: [PATCH 8239/8469] Fix test_test_command_install_requirements with pip 20.3+ setuptools appends --find-links to pip if dependency_links is found, and both takes URLs [1][2]. [1] https://github.com/pypa/setuptools/blob/v51.0.0/docs/userguide/dependency_management.rst#dependencies-that-arent-in-pypi [2] https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-f --- changelog.d/2478.misc.2.rst | 2 ++ setuptools/tests/test_virtualenv.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2478.misc.2.rst diff --git a/changelog.d/2478.misc.2.rst b/changelog.d/2478.misc.2.rst new file mode 100644 index 0000000000..27c07b1152 --- /dev/null +++ b/changelog.d/2478.misc.2.rst @@ -0,0 +1,2 @@ +Fix tests with pip 20.3+ +-- by :user:`yan12125` diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index c8ed9e57ea..e7b100fba4 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,6 +2,8 @@ import os import sys +import pathlib + import pytest from pytest import yield_fixture from pytest_fixture_config import yield_requires_config @@ -124,7 +126,7 @@ def sdist(distname, version): make_nspkg_sdist(str(dist_path), distname, version) return dist_path dependency_links = [ - str(dist_path) + pathlib.Path(str(dist_path)).as_uri() for dist_path in ( sdist('foobar', '2.4'), sdist('bits', '4.2'), From d368be2b5be8676ba8a3d55045b45b55090f6982 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Dec 2020 13:36:37 -0500 Subject: [PATCH 8240/8469] Move changelog to new issue. Fixes #2485. --- changelog.d/2478.misc.2.rst | 2 -- changelog.d/2485.misc.rst | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/2478.misc.2.rst create mode 100644 changelog.d/2485.misc.rst diff --git a/changelog.d/2478.misc.2.rst b/changelog.d/2478.misc.2.rst deleted file mode 100644 index 27c07b1152..0000000000 --- a/changelog.d/2478.misc.2.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix tests with pip 20.3+ --- by :user:`yan12125` diff --git a/changelog.d/2485.misc.rst b/changelog.d/2485.misc.rst new file mode 100644 index 0000000000..0a28fd931e --- /dev/null +++ b/changelog.d/2485.misc.rst @@ -0,0 +1,2 @@ +Fixed failing test when pip 20.3+ is present. +-- by :user:`yan12125` From 3f7a90f597ff52d05abae1b07ba65fd6b5c80c85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Dec 2020 14:10:51 -0500 Subject: [PATCH 8241/8469] Update changelog. --- changelog.d/2486.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2486.change.rst diff --git a/changelog.d/2486.change.rst b/changelog.d/2486.change.rst new file mode 100644 index 0000000000..f4f783e200 --- /dev/null +++ b/changelog.d/2486.change.rst @@ -0,0 +1 @@ +Project adopts jaraco/skeleton for shared package maintenance. From 2667241f44fed464948cbd140bed1b17cfe4e826 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 12 Dec 2020 23:29:03 -0500 Subject: [PATCH 8242/8469] Update skeleton description to describe the periodic collapse. Fixes #27. --- skeleton.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/skeleton.md b/skeleton.md index ec421c2598..dd8ec014cd 100644 --- a/skeleton.md +++ b/skeleton.md @@ -46,6 +46,26 @@ For example, here's a session of the [path project](https://pypi.org/project/pat Thereafter, the target project can make whatever customizations it deems relevant to the scaffolding. The project may even at some point decide that the divergence is too great to merit renewed merging with the original skeleton. This approach applies maximal guidance while creating minimal constraints. +## Periodic Collapse + +In late 2020, this project [introduced](https://github.com/jaraco/skeleton/issues/27) the idea of a periodic but infrequent (O(years)) collapse of commits to limit the number of commits a new consumer will need to accept to adopt the skeleton. + +The full history of commits is collapsed into a single commit and that commit becomes the new mainline head. + +When one of these collapse operations happens, any project that previously pulled from the skeleton will no longer have a related history with that new main branch. For those projects, the skeleton provides a "handoff" branch that reconciles the two branches. Any project that has previously merged with the skeleton but now gets an error "fatal: refusing to merge unrelated histories" should instead use the handoff branch once to incorporate the new main branch. + +``` +$ git pull https://github.com/jaraco/skeleton 2020-handoff +``` + +This handoff needs to be pulled just once and thereafter the project can pull from the main head. + +The archive and handoff branches from prior collapses are indicate here: + +| refresh | archive | handoff | +|---------|-----------------|--------------| +| 2020-12 | archive/2020-12 | 2020-handoff | + # Features The features/techniques employed by the skeleton include: From 701eee9e53dcbfe200bef46420da420052699e68 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Sun, 13 Dec 2020 18:01:50 +0800 Subject: [PATCH 8243/8469] Fix tests with pytest 6.2 The latest pytest deprecates pytest.yield_fixture in favor of pytest.fixture [1]. The changelog [2] says that both are the same. [1] https://github.com/pytest-dev/pytest/pull/7988 [2] https://docs.pytest.org/en/stable/changelog.html#pytest-6-2-0-2020-12-12 --- changelog.d/2487.misc.rst | 2 ++ pkg_resources/tests/test_resources.py | 4 ++-- setuptools/tests/fixtures.py | 4 ++-- setuptools/tests/test_develop.py | 4 ++-- setuptools/tests/test_easy_install.py | 6 +++--- setuptools/tests/test_egg_info.py | 2 +- setuptools/tests/test_msvc.py | 6 +++--- setuptools/tests/test_virtualenv.py | 3 +-- 8 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 changelog.d/2487.misc.rst diff --git a/changelog.d/2487.misc.rst b/changelog.d/2487.misc.rst new file mode 100644 index 0000000000..003f6efbdf --- /dev/null +++ b/changelog.d/2487.misc.rst @@ -0,0 +1,2 @@ + Fix tests with pytest 6.2 +-- by :user:`yan12125` diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index b08bb293ef..965a7c0089 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -773,7 +773,7 @@ class TestNamespaces: ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" - @pytest.yield_fixture + @pytest.fixture def symlinked_tmpdir(self, tmpdir): """ Where available, return the tempdir as a symlink, @@ -791,7 +791,7 @@ def symlinked_tmpdir(self, tmpdir): finally: os.unlink(link_name) - @pytest.yield_fixture(autouse=True) + @pytest.fixture(autouse=True) def patched_path(self, tmpdir): """ Patch sys.path to include the 'site-pkgs' dir. Also diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 5204c8d126..e8cb7f5237 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -3,7 +3,7 @@ from . import contexts -@pytest.yield_fixture +@pytest.fixture def user_override(monkeypatch): """ Override site.USER_BASE and site.USER_SITE with temporary directories in @@ -17,7 +17,7 @@ def user_override(monkeypatch): yield -@pytest.yield_fixture +@pytest.fixture def tmpdir_cwd(tmpdir): with tmpdir.as_cwd() as orig: yield orig diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 9854420e6b..2766da2f79 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -31,7 +31,7 @@ """ -@pytest.yield_fixture +@pytest.fixture def temp_user(monkeypatch): with contexts.tempdir() as user_base: with contexts.tempdir() as user_site: @@ -40,7 +40,7 @@ def temp_user(monkeypatch): yield -@pytest.yield_fixture +@pytest.fixture def test_env(tmpdir, temp_user): target = tmpdir foo = target.mkdir('foo') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 26a5e9a6ba..dc00e697de 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -305,7 +305,7 @@ def test_add_from_site_is_ignored(self): assert not pth.dirty -@pytest.yield_fixture +@pytest.fixture def setup_context(tmpdir): with (tmpdir / 'setup.py').open('w') as f: f.write(SETUP_PY) @@ -361,7 +361,7 @@ def foo_package(self, tmpdir): f.write('Name: foo\n') return str(tmpdir) - @pytest.yield_fixture() + @pytest.fixture() def install_target(self, tmpdir): target = str(tmpdir) with mock.patch('sys.path', sys.path + [target]): @@ -406,7 +406,7 @@ def patched_setup_context(self): ) -@pytest.yield_fixture +@pytest.fixture def distutils_package(): distutils_setup_py = SETUP_PY.replace( 'from setuptools import setup', diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index dc472af4c8..1047468b18 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -45,7 +45,7 @@ def run(): """) }) - @pytest.yield_fixture + @pytest.fixture def env(self): with contexts.tempdir(prefix='setuptools-test.') as env_dir: env = Environment(env_dir) diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py index 24e38ea880..d1527bfa46 100644 --- a/setuptools/tests/test_msvc.py +++ b/setuptools/tests/test_msvc.py @@ -88,7 +88,7 @@ def test_no_registry_entries_means_nothing_found(self): assert isinstance(exc, expected) assert 'aka.ms/vcpython27' in str(exc) - @pytest.yield_fixture + @pytest.fixture def user_preferred_setting(self): """ Set up environment with different install dirs for user vs. system @@ -116,7 +116,7 @@ def test_prefer_current_user(self, user_preferred_setting): expected = os.path.join(user_preferred_setting, 'vcvarsall.bat') assert expected == result - @pytest.yield_fixture + @pytest.fixture def local_machine_setting(self): """ Set up environment with only the system environment configured. @@ -138,7 +138,7 @@ def test_local_machine_recognized(self, local_machine_setting): expected = os.path.join(local_machine_setting, 'vcvarsall.bat') assert expected == result - @pytest.yield_fixture + @pytest.fixture def x64_preferred_setting(self): """ Set up environment with 64-bit and 32-bit system settings configured diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index e7b100fba4..21dea5bb87 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -5,7 +5,6 @@ import pathlib import pytest -from pytest import yield_fixture from pytest_fixture_config import yield_requires_config import pytest_virtualenv @@ -29,7 +28,7 @@ def pytest_virtualenv_works(virtualenv): @yield_requires_config(pytest_virtualenv.CONFIG, ['virtualenv_executable']) -@yield_fixture(scope='function') +@pytest.fixture(scope='function') def bare_virtualenv(): """ Bare virtualenv (no pip/setuptools/wheel). """ From 150321caba0dc73489b61d6b5bbfbed52b795ae7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 13 Dec 2020 14:03:23 -0500 Subject: [PATCH 8244/8469] Enable automerge --- .github/workflows/automerge.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000000..4f70acfbcb --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,27 @@ +name: automerge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: automerge + uses: "pascalgn/automerge-action@v0.12.0" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From 9008e48a54bde1cbbabaf4423906630a4edab877 Mon Sep 17 00:00:00 2001 From: Matt Deitke Date: Sun, 13 Dec 2020 20:42:20 -0800 Subject: [PATCH 8245/8469] typo --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 30989826fb..1d557d47bd 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -71,7 +71,7 @@ file in the ``dist`` directory), which you can upload to PyPI! Of course, before you release your project to PyPI, you'll want to add a bit more information to your setup script to help people find or learn about your project. And maybe your project will have grown by then to include a few -dependencies, and perhaps some data files and scripts. In the next few section, +dependencies, and perhaps some data files and scripts. In the next few sections, we will walk through those additional but essential information you need to specify to properly package your project. From a283c8776ef8ee56c5088a93a55c77509bc399c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 13:09:01 -0500 Subject: [PATCH 8246/8469] Restore fail on warning in docs builds. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8b628f6545..54ea6850b8 100644 --- a/tox.ini +++ b/tox.ini @@ -38,7 +38,7 @@ extras = testing changedir = docs commands = - python -m sphinx . {toxinidir}/build/html + python -m sphinx -W . {toxinidir}/build/html [testenv:finalize] skip_install = True From c769f4d850a0697833216fa7daef7bf0f0519b8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 13:52:52 -0500 Subject: [PATCH 8247/8469] Remove redundant dependencies --- setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index edcbb03f45..f3f53f6c98 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,18 +45,13 @@ testing = # local mock - pytest-flake8 flake8-2020 virtualenv>=13.0.0 pytest-virtualenv>=1.2.7 - pytest>=3.7 wheel - coverage>=4.5.1 - pytest-cov>=2.5.1 paver pip>=19.1 # For proper file:// URLs support. jaraco.envs - jaraco.test >= 3.1.1; python_version >= "3.6" docs = # Keep these in sync with docs/requirements.txt From 176622446978b4d8f69cffd81c734753fc094616 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 13:53:59 -0500 Subject: [PATCH 8248/8469] Add PyPy3 to list of Pythons tested --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c5c232c36..0e2a8fa8e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - python: [3.6, 3.8, 3.9] + python: [3.6, 3.8, 3.9, pypy3] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: From e52ace421bdf5bf9b236c05af924501e061a7f3c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 14:18:05 -0500 Subject: [PATCH 8249/8469] Ensure windir is passed in environment. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 54ea6850b8..d58164cc68 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,8 @@ install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} +passenv = + windir # required for test_pkg_resources [testenv:coverage] description=Combine coverage data and create report From cabb200e590955eee70b67787eaa5597d4d0ff19 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 14:54:14 -0500 Subject: [PATCH 8250/8469] =?UTF-8?q?Bump=20version:=2051.0.0=20=E2=86=92?= =?UTF-8?q?=2051.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 18 ++++++++++++++++++ changelog.d/2477.misc.rst | 1 - changelog.d/2484.misc.rst | 1 - changelog.d/2485.misc.rst | 2 -- changelog.d/2486.change.rst | 1 - changelog.d/2487.misc.rst | 2 -- setup.cfg | 2 +- 8 files changed, 20 insertions(+), 9 deletions(-) delete mode 100644 changelog.d/2477.misc.rst delete mode 100644 changelog.d/2484.misc.rst delete mode 100644 changelog.d/2485.misc.rst delete mode 100644 changelog.d/2486.change.rst delete mode 100644 changelog.d/2487.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c56d45dc8e..d156dedb0f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.0.0 +current_version = 51.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 55133876e9..fb5725cc3f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,21 @@ +v51.1.0 +------- + + +Changes +^^^^^^^ +* #2486: Project adopts jaraco/skeleton for shared package maintenance. + +Misc +^^^^ +* #2477: Restore inclusion of rst files in sdist. +* #2484: Setuptools has replaced the master branch with the main branch. +* #2485: Fixed failing test when pip 20.3+ is present. + -- by :user:`yan12125` +* #2487: Fix tests with pytest 6.2 + -- by :user:`yan12125` + + v51.0.0 ------- diff --git a/changelog.d/2477.misc.rst b/changelog.d/2477.misc.rst deleted file mode 100644 index 48900e9da2..0000000000 --- a/changelog.d/2477.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Restore inclusion of rst files in sdist. diff --git a/changelog.d/2484.misc.rst b/changelog.d/2484.misc.rst deleted file mode 100644 index 8f93b3d0ed..0000000000 --- a/changelog.d/2484.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Setuptools has replaced the master branch with the main branch. diff --git a/changelog.d/2485.misc.rst b/changelog.d/2485.misc.rst deleted file mode 100644 index 0a28fd931e..0000000000 --- a/changelog.d/2485.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed failing test when pip 20.3+ is present. --- by :user:`yan12125` diff --git a/changelog.d/2486.change.rst b/changelog.d/2486.change.rst deleted file mode 100644 index f4f783e200..0000000000 --- a/changelog.d/2486.change.rst +++ /dev/null @@ -1 +0,0 @@ -Project adopts jaraco/skeleton for shared package maintenance. diff --git a/changelog.d/2487.misc.rst b/changelog.d/2487.misc.rst deleted file mode 100644 index 003f6efbdf..0000000000 --- a/changelog.d/2487.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ - Fix tests with pytest 6.2 --- by :user:`yan12125` diff --git a/setup.cfg b/setup.cfg index f3f53f6c98..6ef70e2660 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] license_file = LICENSE name = setuptools -version = 51.0.0 +version = 51.1.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 8a99cc4660582b651d91421d4f47cb988a355741 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 20:42:36 -0500 Subject: [PATCH 8251/8469] Disable integration tests on PyPy on Windows. Ref #2496. --- setuptools/tests/test_integration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index 04ba62f7ba..b557831216 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -15,6 +15,13 @@ from setuptools.dist import Distribution +pytestmark = pytest.mark.skipif( + 'platform.python_implementation() == "PyPy" and ' + 'platform.system() == "Windows"', + reason="pypa/setuptools#2496", +) + + def setup_module(module): packages = 'stevedore', 'virtualenvwrapper', 'pbr', 'novaclient' for pkg in packages: From 9e3806e5a557d3041dacb34801aed3e4a1dc654e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 23:26:07 -0500 Subject: [PATCH 8252/8469] Fix syntax in test_build_meta, version should not have quotes. Bug was masked by LegacyVersion parsing. --- setuptools/tests/test_build_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 5462b26a8a..6d3a997ee0 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -108,7 +108,7 @@ def run(): 'setup.cfg': DALS(""" [metadata] name = foo - version='0.0.0' + version = 0.0.0 [options] py_modules=hello From d503f75e0535edb644a53fd77b4bc85a97fb4add Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Dec 2020 23:37:47 -0500 Subject: [PATCH 8253/8469] Fix badge for GHA --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 2273dcd897..526d1222da 100644 --- a/README.rst +++ b/README.rst @@ -6,8 +6,8 @@ .. _PyPI link: https://pypi.org/project/setuptools -.. image:: https://github.com/jaraco/setuptools/workflows/Automated%20Tests/badge.svg - :target: https://github.com/jaraco/setuptools/actions?query=workflow%3A%22Automated+Tests%22 +.. image:: https://github.com/pypa/setuptools/workflows/Automated%20Tests/badge.svg + :target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22Automated+Tests%22 :alt: Automated Tests .. image:: https://img.shields.io/badge/code%20style-black-000000.svg From dfd155218751787fecd2bb3a11fef6e510ed8ec3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 21 Dec 2020 11:25:18 -0500 Subject: [PATCH 8254/8469] Unset tag_build and tag_date prior to cutting a release. Fixes #2500. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 517dd4d906..9680ec0100 100644 --- a/tox.ini +++ b/tox.ini @@ -68,6 +68,8 @@ setenv = commands = python -m bootstrap python -c "import path; path.Path('dist').rmtree_p()" + # unset tag_build and tag_date pypa/setuptools#2500 + python setup.py egg_info -Db "" saveopts python -m pep517.build . python -m twine upload dist/* python -m jaraco.develop.create-github-release From ac2311014ab27409f1ca109101131fd7383cdc32 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 21 Dec 2020 12:20:02 -0500 Subject: [PATCH 8255/8469] Include tmpl files in manifest template. Workaround for #2498. Tests once again pass on an extract of the sdist. --- MANIFEST.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 92bd4f6938..eba40c5de6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,10 +1,12 @@ -recursive-include setuptools *.py *.exe *.xml +recursive-include setuptools *.py *.exe *.xml *.tmpl recursive-include tests *.py recursive-include setuptools/tests *.html recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html recursive-include setuptools/_vendor *.py *.txt recursive-include pkg_resources *.py *.txt recursive-include pkg_resources/tests/data * +recursive-include tools * +recursive-include changelog.d * include *.py include *.rst include MANIFEST.in From 44d45ae20a663f1cb75812657cee1244e3dddb58 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Mon, 14 Dec 2020 09:37:47 -0800 Subject: [PATCH 8256/8469] Failing test for #2489 --- .../data/my-test-package-zip/my-test-package.zip | Bin 0 -> 1809 bytes pkg_resources/tests/test_find_distributions.py | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 pkg_resources/tests/data/my-test-package-zip/my-test-package.zip diff --git a/pkg_resources/tests/data/my-test-package-zip/my-test-package.zip b/pkg_resources/tests/data/my-test-package-zip/my-test-package.zip new file mode 100644 index 0000000000000000000000000000000000000000..81f9a0170f7aca13a0d1d8e5201c2c186554ce7e GIT binary patch literal 1809 zcmWIWW@h1H0D)azeSu&Gl#pbQVaTnFFG(#fi7!Y@&Q45E)k{rJ*UijJ%hwML;bdUe zpMO0bgi9;985mh!GBYrMi2%5fTY*MSX1i|02s9Fe)$kcvl3x&?lUkOVqgPT<0ybX_ zXf_C=na_pW0$qF-q@)(4=B1?OC0EAhWaecTQ(%uGK6|P%3v`PU(^3igK?E2i91Ng9 z>Qt-#nFi!t0AdwCnp#)4OE7jTz7~^SAlTG(bAA8AyDPR;f4!dkX8HNea$EmA zwK}WtMDnKS#3`EQP;!goS%>XQ>Q?o zm|3%DM}%Z96?pah?Q{8e$DdA|KbtFL*1Rr(A|2h6C-j}3zh3rCE$x|tORdr5;LlwX zx9nUZrY@c;Hl^Wh6DQjfm1#?!ia%9yVL&9U4{oU0ffE=l#i=Ew1$xP8>0qa`%*2{J z5upMy;`CJ|oe*G%WB@S-+=zloxC!NRF%tOcGrA}AwE{K#bTxG~PM$xn`OL}S>j58L zJywMipb!W>g&G2(ml#h^T`DG;{_OcpEy-7s4y~(|Jj5D;Ma>j94s5Nm*O1WXqEz}f>TdjX9DWiPC$3=%$=nG4y~L2% Date: Mon, 14 Dec 2020 09:14:45 -0800 Subject: [PATCH 8257/8469] Find .egg-info in zipimport too Fixes #2489 --- changelog.d/2489.change.rst | 2 ++ pkg_resources/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2489.change.rst diff --git a/changelog.d/2489.change.rst b/changelog.d/2489.change.rst new file mode 100644 index 0000000000..40eddbe734 --- /dev/null +++ b/changelog.d/2489.change.rst @@ -0,0 +1,2 @@ +``pkg_resources`` behavior for zipimport now matches the regular behavior, and finds +``.egg-info`` (previoulsy would only find ``.dist-info``) -- by :user:`thatch` diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 737f4d5fad..ba90c8c4ab 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1978,12 +1978,13 @@ def find_eggs_in_zip(importer, path_item, only=False): # don't yield nested distros return for subitem in metadata.resource_listdir(''): + lower = subitem.lower() if _is_egg_path(subitem): subpath = os.path.join(path_item, subitem) dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) for dist in dists: yield dist - elif subitem.lower().endswith('.dist-info'): + elif any(map(lower.endswith, ('.dist-info', '.egg-info'))): subpath = os.path.join(path_item, subitem) submeta = EggMetadata(zipimport.zipimporter(subpath)) submeta.egg_info = subpath From 66ca25303126c88b2eb82b21e77a6146ccfd3de9 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 22 Dec 2020 14:24:22 -0500 Subject: [PATCH 8258/8469] docs: recommend pypa build --- docs/build_meta.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/build_meta.rst b/docs/build_meta.rst index c36e2bab38..9744488e99 100644 --- a/docs/build_meta.rst +++ b/docs/build_meta.rst @@ -67,14 +67,11 @@ specify the package information:: [options] packages = find: -Now generate the distribution. Although the PyPA is still working to -`provide a recommended tool `_ -to build packages, the `pep517 package `_ -provides this functionality. To build the package:: - - $ pip install -q pep517 - $ mkdir dist - $ python -m pep517.build . +Now generate the distribution. To build the package, use +`PyPA build `_:: + + $ pip install -q build + $ python -m build And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed and installed:: From 13d7bcb994097895ed7f6c6af419e3a037fe90a7 Mon Sep 17 00:00:00 2001 From: Daniel Moore Date: Wed, 23 Dec 2020 14:39:27 -0800 Subject: [PATCH 8259/8469] Clarify Development Mode first paragraph --- docs/userguide/development_mode.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/userguide/development_mode.rst b/docs/userguide/development_mode.rst index bce724a79f..3c477ec114 100644 --- a/docs/userguide/development_mode.rst +++ b/docs/userguide/development_mode.rst @@ -3,9 +3,9 @@ Under normal circumstances, the ``distutils`` assume that you are going to build a distribution of your project, not use it in its "raw" or "unbuilt" -form. If you were to use the ``distutils`` that way, you would have to rebuild -and reinstall your project every time you made a change to it during -development. +form. However, if you were to use the ``distutils`` to build a distribution, +you would have to rebuild and reinstall your project every time you made a +change to it during development. Another problem that sometimes comes up with the ``distutils`` is that you may need to do development on two related projects at the same time. You may need From e83dc66104e2a5ad8e5a8db3079d24628b1fa6d7 Mon Sep 17 00:00:00 2001 From: Drew Date: Fri, 25 Dec 2020 15:52:54 -0500 Subject: [PATCH 8260/8469] docs (build_meta): fix spelling mistake --- docs/build_meta.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_meta.rst b/docs/build_meta.rst index 9744488e99..2ad5ae267e 100644 --- a/docs/build_meta.rst +++ b/docs/build_meta.rst @@ -7,7 +7,7 @@ What is it? Python packaging has come `a long way `_. -The traditional ``setuptools`` way of packgaging Python modules +The traditional ``setuptools`` way of packaging Python modules uses a ``setup()`` function within the ``setup.py`` script. Commands such as ``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a distribution bundle and ``python setup.py install`` installs the distribution. From c0c9cfde2eb7ad0573bf68ddb34944833aeb1d3c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 21 Dec 2020 20:32:49 +0100 Subject: [PATCH 8261/8469] Migrate to `extend-exclude` in flake8 config This makes sure that flake8's defaults are in use. Specifically, it excludes `.tox/` dir that is known to contain a lot of files in nested folders that are not supposed to be linted. Refs: * https://github.com/pypa/setuptools/issues/2501#issuecomment-749144396 * https://github.com/pypa/setuptools/pull/2486/files#r546877674 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-exclude * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-exclude --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 8bc2d27060..13381d6a5d 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] max-line-length = 88 -exclude = +extend-exclude = setuptools/_vendor pkg_resources/_vendor ignore = From 45721e8f5e9cbbdb5f2406cc125cd4855e83fa0a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 21 Dec 2020 20:35:35 +0100 Subject: [PATCH 8262/8469] Exclude `build/lib/` artifacts in flake8 config --- .flake8 | 1 + 1 file changed, 1 insertion(+) diff --git a/.flake8 b/.flake8 index 13381d6a5d..5e1c7cae92 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,7 @@ [flake8] max-line-length = 88 extend-exclude = + build/lib setuptools/_vendor pkg_resources/_vendor ignore = From cfb8ae513add75757e9e19d912bb8b8300f05b94 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Dec 2020 22:01:46 +0100 Subject: [PATCH 8263/8469] Fix misplaced/mistyped per-file-ignores in flake8 Ref: https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-per-file-ignores --- .flake8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 8bc2d27060..bd097eec11 100644 --- a/.flake8 +++ b/.flake8 @@ -10,5 +10,8 @@ ignore = W504 # Black creates whitespace before colon E203 - setuptools/site-patch.py F821 - setuptools/py*compat.py F811 + +# Allow certain violations in certain files: +per-file-ignores = + setuptools/site-patch.py: F821 + setuptools/py*compat.py: F811 From ae51676d767f8ea514a62f050e670ada435ad91d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Dec 2020 22:04:27 +0100 Subject: [PATCH 8264/8469] Drop non-existing site-patch.py from flake8 --- .flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/.flake8 b/.flake8 index bd097eec11..42d9c477d3 100644 --- a/.flake8 +++ b/.flake8 @@ -13,5 +13,4 @@ ignore = # Allow certain violations in certain files: per-file-ignores = - setuptools/site-patch.py: F821 setuptools/py*compat.py: F811 From 5f4153bfb8c131467a47d05407325bb6b10dd992 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Dec 2020 22:05:03 +0100 Subject: [PATCH 8265/8469] Drop unmached py*compat.py ignore rule from flake8 --- .flake8 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.flake8 b/.flake8 index 42d9c477d3..2fb438d5ba 100644 --- a/.flake8 +++ b/.flake8 @@ -10,7 +10,3 @@ ignore = W504 # Black creates whitespace before colon E203 - -# Allow certain violations in certain files: -per-file-ignores = - setuptools/py*compat.py: F811 From 33d09d12cb20412fbe1c490e7c3865202f3b7cf2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Dec 2020 22:17:52 +0100 Subject: [PATCH 8266/8469] Use `extend-ignore` in flake8 config This option allows adding extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * #2501 * https://github.com//skeleton/issues/28 --- .flake8 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.flake8 b/.flake8 index 8bc2d27060..bfa744bef2 100644 --- a/.flake8 +++ b/.flake8 @@ -3,11 +3,7 @@ max-line-length = 88 exclude = setuptools/_vendor pkg_resources/_vendor -ignore = - # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 - W503 - # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 - W504 +extend-ignore = # Black creates whitespace before colon E203 setuptools/site-patch.py F821 From 4665f91bda1541205d9a6675bc81ed6599a608e3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 26 Dec 2020 23:09:10 +0100 Subject: [PATCH 8267/8469] Use license_files instead of license_file in meta Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6ef70e2660..32d1f674cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,6 @@ [metadata] -license_file = LICENSE +license_files = + LICENSE name = setuptools version = 51.1.0 author = Python Packaging Authority From c657e826e0d4f24a3702763ab25610d48ceea222 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 15:05:45 -0500 Subject: [PATCH 8268/8469] Replace incorrect statement about triggering installation of dependencies to indicate that the handling is mostly implementation specific. Ref pypa/setuptools#1471. --- docs/userguide/dependency_management.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index 354a9f8c36..0eb2186494 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -72,7 +72,7 @@ When your project is installed (e.g. using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed and 2) Any scripts in your project will be installed with wrappers that verify the availability of the specified dependencies at runtime. - + Platform specific dependencies ------------------------------ @@ -202,7 +202,7 @@ Optional dependencies Setuptools allows you to declare dependencies that only get installed under specific circumstances. These dependencies are specified with ``extras_require`` keyword and are only installed if another package depends on it (either -directly or indirectly) This makes it convenient to declare dependencies for +directly or indirectly) This makes it convenient to declare dependencies for ancillary functions such as "tests" and "docs". .. note:: @@ -262,8 +262,12 @@ First is the console_scripts entry point: } ) -When the script ``rst2pdf`` is run, it will trigger the installation of -the two dependencies ``PDF`` maps to. +This syntax indicates that the entry point (in this case a console script) +is only valid when the PDF extra is installed. It is up to the installer +to determine how to handle the situation where PDF was not indicated +(e.g. omit the console script, provide a warning when attempting to load +the entry point, assume the extras are present and let the implementation +fail later). The second use case is that other package can use this "extra" for their own dependencies. For example, if "Project-B" needs "project A" with PDF support From 36233fe32c300e8e6b7c4d3ce53b37f23af24933 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 15:58:41 -0500 Subject: [PATCH 8269/8469] Update changelog. Ref #1471. --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index fb5725cc3f..a9945d3cfb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -371,6 +371,7 @@ v47.2.0 Changes ^^^^^^^ * #2194: Editable-installed entry points now load significantly faster on Python versions 3.8+. +* #1471: Incidentally fixed by #2194 on Python 3.8 or when importlib_metadata is present. v47.1.1 From 0f699dcd4d3a74aeae19e7c61c150c037bf06213 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 18:01:34 -0500 Subject: [PATCH 8270/8469] In test_test_command_install_requirements, uninstall setuptools to avoid getting some other version in the environment. --- setuptools/tests/test_virtualenv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 21dea5bb87..950c74c5d5 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -179,6 +179,8 @@ def test_test_command_install_requirements(virtualenv, tmpdir): # Ensure pip/wheel packages are installed. virtualenv.run( "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") + # uninstall setuptools so that 'setup.py develop' works + virtualenv.run("python -m pip uninstall -y setuptools") _check_test_command_install_requirements(virtualenv, tmpdir) From bc65372f3e3c73e7e16a3d3faf29dc0984752718 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:20:42 -0500 Subject: [PATCH 8271/8469] Disable index URL in pip-based fetch_build_eggs to avoid hitting PyPI. --- setuptools/tests/test_virtualenv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 950c74c5d5..5a942d84c5 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -181,6 +181,8 @@ def test_test_command_install_requirements(virtualenv, tmpdir): "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") # uninstall setuptools so that 'setup.py develop' works virtualenv.run("python -m pip uninstall -y setuptools") + # disable index URL so bits and bobs aren't requested from PyPI + virtualenv.env['PIP_NO_INDEX'] = '1' _check_test_command_install_requirements(virtualenv, tmpdir) From 3d4b6b0b15c6a78397a704194bcd5037d8382c1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:37:48 -0500 Subject: [PATCH 8272/8469] Update changelog. --- changelog.d/2525.patch.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2525.patch.rst diff --git a/changelog.d/2525.patch.rst b/changelog.d/2525.patch.rst new file mode 100644 index 0000000000..8b590dce27 --- /dev/null +++ b/changelog.d/2525.patch.rst @@ -0,0 +1 @@ +Avoid hitting network during test_virtualenv.test_test_command. From 4bc5bb337b52ff8619e2c0009ab6eb71678fa429 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:45:45 -0500 Subject: [PATCH 8273/8469] Rename changelog --- changelog.d/{2525.patch.rst => 2525.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2525.patch.rst => 2525.misc.rst} (100%) diff --git a/changelog.d/2525.patch.rst b/changelog.d/2525.misc.rst similarity index 100% rename from changelog.d/2525.patch.rst rename to changelog.d/2525.misc.rst From 60c341b82f3ddb188823405225ec5cd5b217784c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:45:52 -0500 Subject: [PATCH 8274/8469] =?UTF-8?q?Bump=20version:=2051.1.0=20=E2=86=92?= =?UTF-8?q?=2051.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2525.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2525.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d156dedb0f..60e7352f59 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.1.0 +current_version = 51.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a9945d3cfb..ca76648bd2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.1.1 +------- + + +Misc +^^^^ +* #2525: Avoid hitting network during test_virtualenv.test_test_command. + + v51.1.0 ------- diff --git a/changelog.d/2525.misc.rst b/changelog.d/2525.misc.rst deleted file mode 100644 index 8b590dce27..0000000000 --- a/changelog.d/2525.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Avoid hitting network during test_virtualenv.test_test_command. diff --git a/setup.cfg b/setup.cfg index 6ef70e2660..9d41be119c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] license_file = LICENSE name = setuptools -version = 51.1.0 +version = 51.1.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 4b1334629e1cb254a1b6853f045f2615b79ec9e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Dec 2020 09:56:52 -0500 Subject: [PATCH 8275/8469] Automatically inject project name in docs heading. --- docs/index.rst | 4 ++-- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index d14131b0ef..325842bb7f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ -Welcome to skeleton documentation! -======================================== +Welcome to |project| documentation! +=================================== .. toctree:: :maxdepth: 1 diff --git a/setup.cfg b/setup.cfg index 6321ca774c..4fc095b31d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ testing = docs = # upstream sphinx - jaraco.packaging >= 3.2 + jaraco.packaging >= 8.2 rst.linker >= 1.9 # local From ad71fbc76951144facc0dbd4fe39715c95915511 Mon Sep 17 00:00:00 2001 From: Jonathan E Date: Tue, 29 Dec 2020 17:19:49 -0800 Subject: [PATCH 8276/8469] Fix code typo in entry_point.rst In __init__.py the function helloworld() was defined, but everywhere else, hello_world() is called. Rename this function so that it is consistent with the naming in the rest of the file. --- docs/userguide/entry_point.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index edab446502..738207282c 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -28,7 +28,7 @@ with ``__init__.py`` as: .. code-block:: python - def helloworld(): + def hello_world(): print("Hello world") and ``__main__.py`` providing a hook: From cfe99a5a7941f9f8785dd3ec12d1df94e9134411 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 29 Dec 2020 21:27:53 -0500 Subject: [PATCH 8277/8469] pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6639c78c6c..c15ab0c9e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ repos: - repo: https://github.com/psf/black - rev: stable + rev: 20.8b1 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: v1.8.0 + rev: v1.9.1 hooks: - id: blacken-docs From 060d491a9aaacfe457ad365cfd60b611fc9f5bcf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Dec 2020 10:57:25 -0500 Subject: [PATCH 8278/8469] Rename 'Automated Tests' to simply 'tests' --- .github/workflows/main.yml | 2 +- README.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c5c232c36..6a8ff006f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Automated Tests +name: tests on: [push, pull_request] diff --git a/README.rst b/README.rst index 69554ef811..128e61e41e 100644 --- a/README.rst +++ b/README.rst @@ -6,9 +6,9 @@ .. _PyPI link: https://pypi.org/project/skeleton -.. image:: https://github.com/jaraco/skeleton/workflows/Automated%20Tests/badge.svg - :target: https://github.com/jaraco/skeleton/actions?query=workflow%3A%22Automated+Tests%22 - :alt: Automated Tests +.. image:: https://github.com/jaraco/skeleton/workflows/tests/badge.svg + :target: https://github.com/jaraco/skeleton/actions?query=workflow%3A%22tests%22 + :alt: tests .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black From 2b839bad1c2189f4eeb0f74c4a2455ba6687741b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Dec 2020 12:06:13 -0500 Subject: [PATCH 8279/8469] Add note about automatic merging of PRs and the requirements and limitations. --- skeleton.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skeleton.md b/skeleton.md index dd8ec014cd..0938f8920d 100644 --- a/skeleton.md +++ b/skeleton.md @@ -138,6 +138,8 @@ Features include: - test against multiple Python versions - run on late (and updated) platform versions - automated releases of tagged commits +- [automatic merging of PRs](https://github.com/marketplace/actions/merge-pull-requests) (requires [protecting branches with required status checks](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-required-status-checks), [not possible through API](https://github.community/t/set-all-status-checks-to-be-required-as-branch-protection-using-the-github-api/119493)) + ### Continuous Deployments From a36768aa363c8f7b54aae00e11f895ff06337532 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 30 Dec 2020 22:20:46 -0500 Subject: [PATCH 8280/8469] Prefer pytest-enabler to jaraco.test --- pyproject.toml | 10 ++++------ setup.cfg | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79f088a956..b6ebc0bef6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,16 +7,14 @@ skip-string-normalization = true [tool.setuptools_scm] -# jaraco/skeleton#22 -[tool.jaraco.pytest.plugins.black] +[pytest.enabler.black] addopts = "--black" -# jaraco/skeleton#22 -[tool.jaraco.pytest.plugins.mypy] +[pytest.enabler.mypy] addopts = "--mypy" -[tool.jaraco.pytest.plugins.flake8] +[pytest.enabler.flake8] addopts = "--flake8" -[tool.jaraco.pytest.plugins.cov] +[pytest.enabler.cov] addopts = "--cov" diff --git a/setup.cfg b/setup.cfg index 4fc095b31d..d5010f7046 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,8 +29,7 @@ testing = pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov pytest-mypy; python_implementation != "PyPy" - # jaraco/skeleton#22 - jaraco.test >= 3.2.0 + pytest-enabler # local From 02038f6272bd2fc04066480f7ba7d564ddb58769 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 13:09:59 +0100 Subject: [PATCH 8281/8469] Simplify `setuptools.archive_util.unpack_tarfile` --- setuptools/archive_util.py | 94 +++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/setuptools/archive_util.py b/setuptools/archive_util.py index 0ce190b8cf..0f70284822 100644 --- a/setuptools/archive_util.py +++ b/setuptools/archive_util.py @@ -125,6 +125,56 @@ def unpack_zipfile(filename, extract_dir, progress_filter=default_filter): os.chmod(target, unix_attributes) +def _resolve_tar_file_or_dir(tar_obj, tar_member_obj): + """Resolve any links and extract link targets as normal files.""" + while tar_member_obj is not None and ( + tar_member_obj.islnk() or tar_member_obj.issym()): + linkpath = tar_member_obj.linkname + if tar_member_obj.issym(): + base = posixpath.dirname(tar_member_obj.name) + linkpath = posixpath.join(base, linkpath) + linkpath = posixpath.normpath(linkpath) + tar_member_obj = tar_obj._getmember(linkpath) + + is_file_or_dir = ( + tar_member_obj is not None and + (tar_member_obj.isfile() or tar_member_obj.isdir()) + ) + if is_file_or_dir: + return tar_member_obj + + raise LookupError('Got unknown file type') + + +def _iter_open_tar(tar_obj, extract_dir, progress_filter): + """Emit member-destination pairs from a tar archive.""" + # don't do any chowning! + tar_obj.chown = lambda *args: None + + with contextlib.closing(tar_obj): + for member in tar_obj: + name = member.name + # don't extract absolute paths or ones with .. in them + if name.startswith('/') or '..' in name.split('/'): + continue + + prelim_dst = os.path.join(extract_dir, *name.split('/')) + + try: + member = _resolve_tar_file_or_dir(tar_obj, member) + except LookupError: + continue + + final_dst = progress_filter(name, prelim_dst) + if not final_dst: + continue + + if final_dst.endswith(os.sep): + final_dst = final_dst[:-1] + + yield member, final_dst + + def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir` @@ -138,38 +188,18 @@ def unpack_tarfile(filename, extract_dir, progress_filter=default_filter): raise UnrecognizedFormat( "%s is not a compressed or uncompressed tar file" % (filename,) ) from e - with contextlib.closing(tarobj): - # don't do any chowning! - tarobj.chown = lambda *args: None - for member in tarobj: - name = member.name - # don't extract absolute paths or ones with .. in them - if not name.startswith('/') and '..' not in name.split('/'): - prelim_dst = os.path.join(extract_dir, *name.split('/')) - - # resolve any links and to extract the link targets as normal - # files - while member is not None and ( - member.islnk() or member.issym()): - linkpath = member.linkname - if member.issym(): - base = posixpath.dirname(member.name) - linkpath = posixpath.join(base, linkpath) - linkpath = posixpath.normpath(linkpath) - member = tarobj._getmember(linkpath) - - if member is not None and (member.isfile() or member.isdir()): - final_dst = progress_filter(name, prelim_dst) - if final_dst: - if final_dst.endswith(os.sep): - final_dst = final_dst[:-1] - try: - # XXX Ugh - tarobj._extract_member(member, final_dst) - except tarfile.ExtractError: - # chown/chmod/mkfifo/mknode/makedev failed - pass - return True + + for member, final_dst in _iter_open_tar( + tarobj, extract_dir, progress_filter, + ): + try: + # XXX Ugh + tarobj._extract_member(member, final_dst) + except tarfile.ExtractError: + # chown/chmod/mkfifo/mknode/makedev failed + pass + + return True extraction_drivers = unpack_directory, unpack_zipfile, unpack_tarfile From 0d3b9600b2a94449796d06e3cea06c7a3972887b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:50:15 +0100 Subject: [PATCH 8282/8469] Simplify `easy_install.install_eggs` --- setuptools/command/easy_install.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 9ec83b7d8b..ff449435fd 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -837,12 +837,19 @@ def write_script(self, script_name, contents, mode="t", blockers=()): def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them - if dist_filename.lower().endswith('.egg'): - return [self.install_egg(dist_filename, tmpdir)] - elif dist_filename.lower().endswith('.exe'): - return [self.install_exe(dist_filename, tmpdir)] - elif dist_filename.lower().endswith('.whl'): - return [self.install_wheel(dist_filename, tmpdir)] + installer_map = { + '.egg': self.install_egg, + '.exe': self.install_exe, + '.whl': self.install_wheel, + } + try: + install_dist = installer_map[ + dist_filename.lower()[-4:] + ] + except KeyError: + pass + else: + return [install_dist(dist_filename, tmpdir)] # Anything else, try to extract and build setup_base = tmpdir From b5fdca1ecb05a8c4c2da434e55d6ef5efec91e3e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:51:58 +0100 Subject: [PATCH 8283/8469] Simplify `easy_install.update_pth` --- setuptools/command/easy_install.py | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index ff449435fd..6d990af4e5 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1196,11 +1196,13 @@ def update_pth(self, dist): return for d in self.pth_file[dist.key]: # drop old entries - if self.multi_version or d.location != dist.location: - log.info("Removing %s from easy-install.pth file", d) - self.pth_file.remove(d) - if d.location in self.shadow_path: - self.shadow_path.remove(d.location) + if not self.multi_version and d.location == dist.location: + continue + + log.info("Removing %s from easy-install.pth file", d) + self.pth_file.remove(d) + if d.location in self.shadow_path: + self.shadow_path.remove(d.location) if not self.multi_version: if dist.location in self.pth_file.paths: @@ -1214,19 +1216,21 @@ def update_pth(self, dist): if dist.location not in self.shadow_path: self.shadow_path.append(dist.location) - if not self.dry_run: + if self.dry_run: + return - self.pth_file.save() + self.pth_file.save() - if dist.key == 'setuptools': - # Ensure that setuptools itself never becomes unavailable! - # XXX should this check for latest version? - filename = os.path.join(self.install_dir, 'setuptools.pth') - if os.path.islink(filename): - os.unlink(filename) - f = open(filename, 'wt') - f.write(self.pth_file.make_relative(dist.location) + '\n') - f.close() + if dist.key != 'setuptools': + return + + # Ensure that setuptools itself never becomes unavailable! + # XXX should this check for latest version? + filename = os.path.join(self.install_dir, 'setuptools.pth') + if os.path.islink(filename): + os.unlink(filename) + with open(filename, 'wt') as f: + f.write(self.pth_file.make_relative(dist.location) + '\n') def unpack_progress(self, src, dst): # Progress filter for unpacking From 554ded3e40f5a2f6f426569534d402aad239a199 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:54:06 +0100 Subject: [PATCH 8284/8469] Simplify `command.easy_install.get_site_dirs` --- setuptools/command/easy_install.py | 81 ++++++++++++++++-------------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6d990af4e5..df7b1d0728 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1371,51 +1371,56 @@ def get_site_dirs(): if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) for prefix in prefixes: - if prefix: - if sys.platform in ('os2emx', 'riscos'): - sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': - sitedirs.extend([ - os.path.join( - prefix, - "lib", - "python{}.{}".format(*sys.version_info), - "site-packages", - ), - os.path.join(prefix, "lib", "site-python"), - ]) - else: - sitedirs.extend([ + if not prefix: + continue + + if sys.platform in ('os2emx', 'riscos'): + sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': + sitedirs.extend([ + os.path.join( prefix, - os.path.join(prefix, "lib", "site-packages"), - ]) - if sys.platform == 'darwin': - # for framework builds *only* we add the standard Apple - # locations. Currently only per-user, but /Library and - # /Network/Library could be added too - if 'Python.framework' in prefix: - home = os.environ.get('HOME') - if home: - home_sp = os.path.join( - home, - 'Library', - 'Python', - '{}.{}'.format(*sys.version_info), - 'site-packages', - ) - sitedirs.append(home_sp) + "lib", + "python{}.{}".format(*sys.version_info), + "site-packages", + ), + os.path.join(prefix, "lib", "site-python"), + ]) + else: + sitedirs.extend([ + prefix, + os.path.join(prefix, "lib", "site-packages"), + ]) + if sys.platform != 'darwin': + continue + + # for framework builds *only* we add the standard Apple + # locations. Currently only per-user, but /Library and + # /Network/Library could be added too + if 'Python.framework' not in prefix: + continue + + home = os.environ.get('HOME') + if not home: + continue + + home_sp = os.path.join( + home, + 'Library', + 'Python', + '{}.{}'.format(*sys.version_info), + 'site-packages', + ) + sitedirs.append(home_sp) lib_paths = get_path('purelib'), get_path('platlib') - for site_lib in lib_paths: - if site_lib not in sitedirs: - sitedirs.append(site_lib) + + sitedirs.extend(s for s in lib_paths if s not in sitedirs) if site.ENABLE_USER_SITE: sitedirs.append(site.USER_SITE) - try: + with contextlib.suppress(AttributeError): sitedirs.extend(site.getsitepackages()) - except AttributeError: - pass sitedirs = list(map(normalize_path, sitedirs)) From 7b5f8e131cdce8626c138f8815f9001214dc2541 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:54:56 +0100 Subject: [PATCH 8285/8469] Simplify `command.easy_install.expand_paths` --- setuptools/command/easy_install.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index df7b1d0728..6882efe00e 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1459,13 +1459,18 @@ def expand_paths(inputs): # Yield existing non-dupe, non-import directory lines from it for line in lines: - if not line.startswith("import"): - line = normalize_path(line.rstrip()) - if line not in seen: - seen[line] = 1 - if not os.path.isdir(line): - continue - yield line, os.listdir(line) + if line.startswith("import"): + continue + + line = normalize_path(line.rstrip()) + if line in seen: + continue + + seen[line] = 1 + if not os.path.isdir(line): + continue + + yield line, os.listdir(line) def extract_wininst_cfg(dist_filename): From 28b54b140cee8b33748833372ca6dbd7e305d94d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:56:00 +0100 Subject: [PATCH 8286/8469] Simplify `egg_info.FileList.process_template_line` --- setuptools/command/egg_info.py | 127 +++++++++++++++++---------------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 0b7ad677f2..8e34e4a2c8 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -8,6 +8,7 @@ from distutils import log import distutils.errors import distutils.filelist +import functools import os import re import sys @@ -332,70 +333,74 @@ def process_template_line(self, line): # patterns, (dir and patterns), or (dir_pattern). (action, patterns, dir, dir_pattern) = self._parse_template_line(line) + action_map = { + 'include': self.include, + 'exclude': self.exclude, + 'global-include': self.global_include, + 'global-exclude': self.global_exclude, + 'recursive-include': functools.partial( + self.recursive_include, dir, + ), + 'recursive-exclude': functools.partial( + self.recursive_exclude, dir, + ), + 'graft': self.graft, + 'prune': self.prune, + } + log_map = { + 'include': "warning: no files found matching '%s'", + 'exclude': ( + "warning: no previously-included files found " + "matching '%s'" + ), + 'global-include': ( + "warning: no files found matching '%s' " + "anywhere in distribution" + ), + 'global-exclude': ( + "warning: no previously-included files matching " + "'%s' found anywhere in distribution" + ), + 'recursive-include': ( + "warning: no files found matching '%s' " + "under directory '%s'" + ), + 'recursive-exclude': ( + "warning: no previously-included files matching " + "'%s' found under directory '%s'" + ), + 'graft': "warning: no directories found matching '%s'", + 'prune': "no previously-included directories found matching '%s'", + } + + try: + process_action = action_map[action] + except KeyError: + raise DistutilsInternalError( + "this cannot happen: invalid action '{action!s}'". + format(action=action), + ) + # OK, now we know that the action is valid and we have the # right number of words on the line for that action -- so we # can proceed with minimal error-checking. - if action == 'include': - self.debug_print("include " + ' '.join(patterns)) - for pattern in patterns: - if not self.include(pattern): - log.warn("warning: no files found matching '%s'", pattern) - - elif action == 'exclude': - self.debug_print("exclude " + ' '.join(patterns)) - for pattern in patterns: - if not self.exclude(pattern): - log.warn(("warning: no previously-included files " - "found matching '%s'"), pattern) - - elif action == 'global-include': - self.debug_print("global-include " + ' '.join(patterns)) - for pattern in patterns: - if not self.global_include(pattern): - log.warn(("warning: no files found matching '%s' " - "anywhere in distribution"), pattern) - - elif action == 'global-exclude': - self.debug_print("global-exclude " + ' '.join(patterns)) - for pattern in patterns: - if not self.global_exclude(pattern): - log.warn(("warning: no previously-included files matching " - "'%s' found anywhere in distribution"), - pattern) - - elif action == 'recursive-include': - self.debug_print("recursive-include %s %s" % - (dir, ' '.join(patterns))) - for pattern in patterns: - if not self.recursive_include(dir, pattern): - log.warn(("warning: no files found matching '%s' " - "under directory '%s'"), - pattern, dir) - - elif action == 'recursive-exclude': - self.debug_print("recursive-exclude %s %s" % - (dir, ' '.join(patterns))) - for pattern in patterns: - if not self.recursive_exclude(dir, pattern): - log.warn(("warning: no previously-included files matching " - "'%s' found under directory '%s'"), - pattern, dir) - - elif action == 'graft': - self.debug_print("graft " + dir_pattern) - if not self.graft(dir_pattern): - log.warn("warning: no directories found matching '%s'", - dir_pattern) - - elif action == 'prune': - self.debug_print("prune " + dir_pattern) - if not self.prune(dir_pattern): - log.warn(("no previously-included directories found " - "matching '%s'"), dir_pattern) - - else: - raise DistutilsInternalError( - "this cannot happen: invalid action '%s'" % action) + + action_is_recursive = action.startswith('recursive-') + if action in {'graft', 'prune'}: + patterns = [dir_pattern] + extra_log_args = (dir, ) if action_is_recursive else () + log_tmpl = log_map[action] + + self.debug_print( + ' '.join( + [action] + + ([dir] if action_is_recursive else []) + + patterns, + ) + ) + for pattern in patterns: + if not process_action(pattern): + log.warn(log_tmpl, pattern, *extra_log_args) def _remove_files(self, predicate): """ From 08984781ec38f9ba8b35c70c6a5fff38e00b55aa Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 17:58:45 +0100 Subject: [PATCH 8287/8469] Simplify `dist.Distribution._parse_config_files` --- setuptools/dist.py | 50 ++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 2c088ef8cb..186a407cb8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -557,14 +557,12 @@ def _parse_config_files(self, filenames=None): from configparser import ConfigParser # Ignore install directory options if we have a venv - if sys.prefix != sys.base_prefix: - ignore_options = [ - 'install-base', 'install-platbase', 'install-lib', - 'install-platlib', 'install-purelib', 'install-headers', - 'install-scripts', 'install-data', 'prefix', 'exec-prefix', - 'home', 'user', 'root'] - else: - ignore_options = [] + ignore_options = [] if sys.prefix == sys.base_prefix else [ + 'install-base', 'install-platbase', 'install-lib', + 'install-platlib', 'install-purelib', 'install-headers', + 'install-scripts', 'install-data', 'prefix', 'exec-prefix', + 'home', 'user', 'root', + ] ignore_options = frozenset(ignore_options) @@ -585,30 +583,34 @@ def _parse_config_files(self, filenames=None): opt_dict = self.get_option_dict(section) for opt in options: - if opt != '__name__' and opt not in ignore_options: - val = parser.get(section, opt) - opt = opt.replace('-', '_') - opt_dict[opt] = (filename, val) + if opt == '__name__' or opt in ignore_options: + continue + + val = parser.get(section, opt) + opt = opt.replace('-', '_') + opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain # the original filenames that options come from) parser.__init__() + if 'global' not in self.command_options: + return + # If there was a "global" section in the config file, use it # to set Distribution options. - if 'global' in self.command_options: - for (opt, (src, val)) in self.command_options['global'].items(): - alias = self.negative_opt.get(opt) - try: - if alias: - setattr(self, alias, not strtobool(val)) - elif opt in ('verbose', 'dry_run'): # ugh! - setattr(self, opt, strtobool(val)) - else: - setattr(self, opt, val) - except ValueError as e: - raise DistutilsOptionError(e) from e + for (opt, (src, val)) in self.command_options['global'].items(): + alias = self.negative_opt.get(opt) + if alias: + val = not strtobool(val) + elif opt in ('verbose', 'dry_run'): # ugh! + val = strtobool(val) + + try: + setattr(self, alias or opt, val) + except ValueError as e: + raise DistutilsOptionError(e) from e def _set_command_options(self, command_obj, option_dict=None): """ From 818680c71d2a407f76ae9dc9edaee6c8b338ab2c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 18:00:05 +0100 Subject: [PATCH 8288/8469] Simplify `setuptools.glob._iglob` --- setuptools/glob.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/setuptools/glob.py b/setuptools/glob.py index 9d7cbc5da6..87062b8187 100644 --- a/setuptools/glob.py +++ b/setuptools/glob.py @@ -47,6 +47,8 @@ def iglob(pathname, recursive=False): def _iglob(pathname, recursive): dirname, basename = os.path.split(pathname) + glob_in_dir = glob2 if recursive and _isrecursive(basename) else glob1 + if not has_magic(pathname): if basename: if os.path.lexists(pathname): @@ -56,13 +58,9 @@ def _iglob(pathname, recursive): if os.path.isdir(dirname): yield pathname return + if not dirname: - if recursive and _isrecursive(basename): - for x in glob2(dirname, basename): - yield x - else: - for x in glob1(dirname, basename): - yield x + yield from glob_in_dir(dirname, basename) return # `os.path.split()` returns the argument itself as a dirname if it is a # drive or UNC path. Prevent an infinite recursion if a drive or UNC path @@ -71,12 +69,7 @@ def _iglob(pathname, recursive): dirs = _iglob(dirname, recursive) else: dirs = [dirname] - if has_magic(basename): - if recursive and _isrecursive(basename): - glob_in_dir = glob2 - else: - glob_in_dir = glob1 - else: + if not has_magic(basename): glob_in_dir = glob0 for dirname in dirs: for name in glob_in_dir(dirname, basename): From 9c88e35e0e54712f8ac361faffe5bc9cd370ad8d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 18:02:31 +0100 Subject: [PATCH 8289/8469] Simplify `setuptools.installer.fetch_build_egg` --- setuptools/installer.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/setuptools/installer.py b/setuptools/installer.py index e630b87479..ac2aba1802 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -80,20 +80,17 @@ def fetch_build_egg(dist, req): if 'allow_hosts' in opts: raise DistutilsError('the `allow-hosts` option is not supported ' 'when using pip to install requirements.') - if 'PIP_QUIET' in os.environ or 'PIP_VERBOSE' in os.environ: - quiet = False - else: - quiet = True + quiet = 'PIP_QUIET' not in os.environ and 'PIP_VERBOSE' not in os.environ if 'PIP_INDEX_URL' in os.environ: index_url = None elif 'index_url' in opts: index_url = opts['index_url'][1] else: index_url = None - if 'find_links' in opts: - find_links = _fixup_find_links(opts['find_links'][1])[:] - else: - find_links = [] + find_links = ( + _fixup_find_links(opts['find_links'][1])[:] if 'find_links' in opts + else [] + ) if dist.dependency_links: find_links.extend(dist.dependency_links) eggs_dir = os.path.realpath(dist.get_egg_cache_dir()) @@ -112,16 +109,12 @@ def fetch_build_egg(dist, req): cmd.append('--quiet') if index_url is not None: cmd.extend(('--index-url', index_url)) - if find_links is not None: - for link in find_links: - cmd.extend(('--find-links', link)) + for link in find_links or []: + cmd.extend(('--find-links', link)) # If requirement is a PEP 508 direct URL, directly pass # the URL to pip, as `req @ url` does not work on the # command line. - if req.url: - cmd.append(req.url) - else: - cmd.append(str(req)) + cmd.append(req.url or str(req)) try: subprocess.check_call(cmd) except subprocess.CalledProcessError as e: From 699afd09f252025ff412c3be101d78576ce0fe60 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 18:03:15 +0100 Subject: [PATCH 8290/8469] Simplify `msvc.SystemInfo.find_reg_vs_vers` --- setuptools/msvc.py | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 1ead72b421..53d45e592c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -24,6 +24,7 @@ from os import listdir, pathsep from os.path import join, isfile, isdir, dirname import sys +import contextlib import platform import itertools import subprocess @@ -724,28 +725,23 @@ def find_reg_vs_vers(self): ms = self.ri.microsoft vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vs_vers = [] - for hkey in self.ri.HKEYS: - for key in vckeys: - try: - bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) - except (OSError, IOError): - continue - with bkey: - subkeys, values, _ = winreg.QueryInfoKey(bkey) - for i in range(values): - try: - ver = float(winreg.EnumValue(bkey, i)[0]) - if ver not in vs_vers: - vs_vers.append(ver) - except ValueError: - pass - for i in range(subkeys): - try: - ver = float(winreg.EnumKey(bkey, i)) - if ver not in vs_vers: - vs_vers.append(ver) - except ValueError: - pass + for hkey, key in itertools.product(self.ri.HKEYS, vckeys): + try: + bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ) + except (OSError, IOError): + continue + with bkey: + subkeys, values, _ = winreg.QueryInfoKey(bkey) + for i in range(values): + with contextlib.suppress(ValueError): + ver = float(winreg.EnumValue(bkey, i)[0]) + if ver not in vs_vers: + vs_vers.append(ver) + for i in range(subkeys): + with contextlib.suppress(ValueError): + ver = float(winreg.EnumKey(bkey, i)) + if ver not in vs_vers: + vs_vers.append(ver) return sorted(vs_vers) def find_programdata_vs_vers(self): From c225c4c0f64bf044f2f82693df097ad07f9c12bd Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 18:04:46 +0100 Subject: [PATCH 8291/8469] Simplify `PackageIndex.process_index` --- setuptools/package_index.py | 68 ++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3979b131b5..713391af62 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -428,49 +428,53 @@ def scan_egg_link(self, path, entry): dist.precedence = SOURCE_DIST self.add(dist) + def _scan(self, link): + # Process a URL to see if it's for a package page + NO_MATCH_SENTINEL = None, None + if not link.startswith(self.index_url): + return NO_MATCH_SENTINEL + + parts = list(map( + urllib.parse.unquote, link[len(self.index_url):].split('/') + )) + if len(parts) != 2 or '#' in parts[1]: + return NO_MATCH_SENTINEL + + # it's a package page, sanitize and index it + pkg = safe_name(parts[0]) + ver = safe_version(parts[1]) + self.package_pages.setdefault(pkg.lower(), {})[link] = True + return to_filename(pkg), to_filename(ver) + def process_index(self, url, page): """Process the contents of a PyPI page""" - def scan(link): - # Process a URL to see if it's for a package page - if link.startswith(self.index_url): - parts = list(map( - urllib.parse.unquote, link[len(self.index_url):].split('/') - )) - if len(parts) == 2 and '#' not in parts[1]: - # it's a package page, sanitize and index it - pkg = safe_name(parts[0]) - ver = safe_version(parts[1]) - self.package_pages.setdefault(pkg.lower(), {})[link] = True - return to_filename(pkg), to_filename(ver) - return None, None - # process an index page into the package-page index for match in HREF.finditer(page): try: - scan(urllib.parse.urljoin(url, htmldecode(match.group(1)))) + self._scan(urllib.parse.urljoin(url, htmldecode(match.group(1)))) except ValueError: pass - pkg, ver = scan(url) # ensure this page is in the page index - if pkg: - # process individual package page - for new_url in find_external_links(url, page): - # Process the found URL - base, frag = egg_info_for_url(new_url) - if base.endswith('.py') and not frag: - if ver: - new_url += '#egg=%s-%s' % (pkg, ver) - else: - self.need_version_info(url) - self.scan_url(new_url) - - return PYPI_MD5.sub( - lambda m: '%s' % m.group(1, 3, 2), page - ) - else: + pkg, ver = self._scan(url) # ensure this page is in the page index + if not pkg: return "" # no sense double-scanning non-package pages + # process individual package page + for new_url in find_external_links(url, page): + # Process the found URL + base, frag = egg_info_for_url(new_url) + if base.endswith('.py') and not frag: + if ver: + new_url += '#egg=%s-%s' % (pkg, ver) + else: + self.need_version_info(url) + self.scan_url(new_url) + + return PYPI_MD5.sub( + lambda m: '%s' % m.group(1, 3, 2), page + ) + def need_version_info(self, url): self.scan_all( "Page at %s links to .py file(s) without version info; an index " From fc891f5cf6d93ad533e2afb5e15a2952408ab358 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 13:08:18 +0100 Subject: [PATCH 8292/8469] Apply noqa C901 comments to overly complex code --- pkg_resources/__init__.py | 9 ++++++--- setuptools/command/bdist_egg.py | 2 +- setuptools/command/easy_install.py | 19 ++++++++++++------- setuptools/command/egg_info.py | 2 +- setuptools/dist.py | 8 +++++--- setuptools/installer.py | 2 +- setuptools/msvc.py | 4 ++-- setuptools/package_index.py | 8 +++++--- setuptools/ssl_support.py | 2 +- 9 files changed, 34 insertions(+), 22 deletions(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 737f4d5fad..f42257776e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -696,7 +696,8 @@ def add(self, dist, entry=None, insert=True, replace=False): keys2.append(dist.key) self._added_new(dist) - def resolve(self, requirements, env=None, installer=None, + # FIXME: 'WorkingSet.resolve' is too complex (11) + def resolve(self, requirements, env=None, installer=None, # noqa: C901 replace_conflicting=False, extras=None): """List all distributions needed to (recursively) meet `requirements` @@ -1745,7 +1746,8 @@ def _get_date_and_size(zip_stat): timestamp = time.mktime(date_time) return timestamp, size - def _extract_resource(self, manager, zip_path): + # FIXME: 'ZipProvider._extract_resource' is too complex (12) + def _extract_resource(self, manager, zip_path): # noqa: C901 if zip_path in self._index(): for name in self._index()[zip_path]: @@ -2858,7 +2860,8 @@ def get_entry_info(self, group, name): """Return the EntryPoint object for `group`+`name`, or ``None``""" return self.get_entry_map(group).get(name) - def insert_on(self, path, loc=None, replace=False): + # FIXME: 'Distribution.insert_on' is too complex (13) + def insert_on(self, path, loc=None, replace=False): # noqa: C901 """Ensure self.location is on path If replace=False (default): diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index a88efb45b8..206f2419ba 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -153,7 +153,7 @@ def call_command(self, cmdname, **kw): self.run_command(cmdname) return cmd - def run(self): + def run(self): # noqa: C901 # is too complex (14) # FIXME # Generate metadata first self.run_command("egg_info") # We run install_lib before install_data, because some data hacks diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6882efe00e..f1e487d4d2 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -226,7 +226,7 @@ def _render_version(): print(tmpl.format(**locals())) raise SystemExit() - def finalize_options(self): + def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME self.version and self._render_version() py_version = sys.version.split()[0] @@ -437,7 +437,7 @@ def pseudo_tempname(self): def warn_deprecated_options(self): pass - def check_site_dir(self): + def check_site_dir(self): # noqa: C901 # is too complex (12) # FIXME """Verify that self.install_dir is .pth-capable dir, if needed""" instdir = normalize_path(self.install_dir) @@ -713,7 +713,10 @@ def select_scheme(self, name): if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) - def process_distribution(self, requirement, dist, deps=True, *info): + # FIXME: 'easy_install.process_distribution' is too complex (12) + def process_distribution( # noqa: C901 + self, requirement, dist, deps=True, *info, + ): self.update_pth(dist) self.package_index.add(dist) if dist in self.local_index[dist.key]: @@ -894,7 +897,8 @@ def egg_distribution(self, egg_path): metadata = EggMetadata(zipimport.zipimporter(egg_path)) return Distribution.from_filename(egg_path, metadata=metadata) - def install_egg(self, egg_path, tmpdir): + # FIXME: 'easy_install.install_egg' is too complex (11) + def install_egg(self, egg_path, tmpdir): # noqa: C901 destination = os.path.join( self.install_dir, os.path.basename(egg_path), @@ -993,7 +997,8 @@ def install_exe(self, dist_filename, tmpdir): # install the .egg return self.install_egg(egg_path, tmpdir) - def exe_to_egg(self, dist_filename, egg_tmp): + # FIXME: 'easy_install.exe_to_egg' is too complex (12) + def exe_to_egg(self, dist_filename, egg_tmp): # noqa: C901 """Extract a bdist_wininst to the directories an egg would use""" # Check for .pth file and set up prefix translations prefixes = get_exe_prefixes(dist_filename) @@ -1191,7 +1196,7 @@ def _set_fetcher_options(self, base): cfg_filename = os.path.join(base, 'setup.cfg') setopt.edit_config(cfg_filename, settings) - def update_pth(self, dist): + def update_pth(self, dist): # noqa: C901 # is too complex (11) # FIXME if self.pth_file is None: return @@ -1427,7 +1432,7 @@ def get_site_dirs(): return sitedirs -def expand_paths(inputs): +def expand_paths(inputs): # noqa: C901 # is too complex (11) # FIXME """Yield sys.path directories that might contain "old-style" packages""" seen = {} diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8e34e4a2c8..1f120b67d1 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -32,7 +32,7 @@ from setuptools import SetuptoolsDeprecationWarning -def translate_pattern(glob): +def translate_pattern(glob): # noqa: C901 # is too complex (14) # FIXME """ Translate a file path glob like '*.txt' in to a regular expression. This differs from fnmatch.translate which allows wildcards to match diff --git a/setuptools/dist.py b/setuptools/dist.py index 186a407cb8..662fbe67c5 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -119,7 +119,7 @@ def _read_list(name): # Based on Python 3.5 version -def write_pkg_file(self, file): +def write_pkg_file(self, file): # noqa: C901 # is too complex (14) # FIXME """Write the PKG-INFO format data to a file object. """ version = self.get_metadata_version() @@ -548,7 +548,8 @@ def _clean_req(self, req): req.marker = None return req - def _parse_config_files(self, filenames=None): + # FIXME: 'Distribution._parse_config_files' is too complex (14) + def _parse_config_files(self, filenames=None): # noqa: C901 """ Adapted from distutils.dist.Distribution.parse_config_files, this method provides the same functionality in subtly-improved @@ -612,7 +613,8 @@ def _parse_config_files(self, filenames=None): except ValueError as e: raise DistutilsOptionError(e) from e - def _set_command_options(self, command_obj, option_dict=None): + # FIXME: 'Distribution._set_command_options' is too complex (14) + def _set_command_options(self, command_obj, option_dict=None): # noqa: C901 """ Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to diff --git a/setuptools/installer.py b/setuptools/installer.py index ac2aba1802..c5822a31f4 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -51,7 +51,7 @@ def _legacy_fetch_build_egg(dist, req): return cmd.easy_install(req) -def fetch_build_egg(dist, req): +def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME """Fetch an egg needed for building. Use pip/wheel to fetch/build a wheel.""" diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 53d45e592c..d5e0a95232 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -921,8 +921,8 @@ def WindowsSdkLastVersion(self): """ return self._use_last_dir_name(join(self.WindowsSdkDir, 'lib')) - @property - def WindowsSdkDir(self): + @property # noqa: C901 + def WindowsSdkDir(self): # noqa: C901 # is too complex (12) # FIXME """ Microsoft Windows SDK directory. diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 713391af62..123e9582b5 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -320,7 +320,8 @@ def __init__( else: self.opener = urllib.request.urlopen - def process_url(self, url, retrieve=False): + # FIXME: 'PackageIndex.process_url' is too complex (14) + def process_url(self, url, retrieve=False): # noqa: C901 """Evaluate a URL as a possible download, and maybe retrieve it""" if url in self.scanned_urls and not retrieve: return @@ -595,7 +596,7 @@ def download(self, spec, tmpdir): spec = parse_requirement_arg(spec) return getattr(self.fetch_distribution(spec, tmpdir), 'location', None) - def fetch_distribution( + def fetch_distribution( # noqa: C901 # is too complex (14) # FIXME self, requirement, tmpdir, force_scan=False, source=False, develop_ok=False, local_index=None): """Obtain a distribution suitable for fulfilling `requirement` @@ -766,7 +767,8 @@ def _download_to(self, url, filename): def reporthook(self, url, filename, blocknum, blksize, size): pass # no-op - def open_url(self, url, warning=None): + # FIXME: + def open_url(self, url, warning=None): # noqa: C901 # is too complex (12) if url.startswith('file:'): return local_open(url) try: diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py index eac5e65608..b58cca37c9 100644 --- a/setuptools/ssl_support.py +++ b/setuptools/ssl_support.py @@ -56,7 +56,7 @@ class CertificateError(ValueError): pass -if not match_hostname: +if not match_hostname: # noqa: C901 # 'If 59' is too complex (21) # FIXME def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 From 6f74941c2649b6154dee860417b8b4a576d19974 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Dec 2020 18:05:28 +0100 Subject: [PATCH 8293/8469] Enable McCabe complexity check in flake8 --- .flake8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.flake8 b/.flake8 index 8bc2d27060..f6a5cc8636 100644 --- a/.flake8 +++ b/.flake8 @@ -12,3 +12,6 @@ ignore = E203 setuptools/site-patch.py F821 setuptools/py*compat.py F811 + +# Let's not overcomplicate the code: +max-complexity = 10 From 51b78f9d90fcdb0a924ed12e7baa24660f53008c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 1 Jan 2021 20:16:51 -0500 Subject: [PATCH 8294/8469] fix: suggest PyPA build instead of pep517.build --- docs/setuptools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.rst b/docs/setuptools.rst index 1000a0cebf..05516a4e31 100644 --- a/docs/setuptools.rst +++ b/docs/setuptools.rst @@ -157,7 +157,7 @@ To use this feature: ] build-backend = "setuptools.build_meta" -* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``pep517``. +* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``build``. .. warning:: From de4b9885060814c121f692db3e94b70994e15b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 30 Dec 2020 12:05:02 +0100 Subject: [PATCH 8295/8469] Define create_module()/exec_module() in VendorImporter Fixes https://github.com/pypa/setuptools/issues/2481 --- changelog.d/2481.change.rst | 2 ++ pkg_resources/extern/__init__.py | 6 ++++++ setuptools/extern/__init__.py | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 changelog.d/2481.change.rst diff --git a/changelog.d/2481.change.rst b/changelog.d/2481.change.rst new file mode 100644 index 0000000000..dc824c9c2e --- /dev/null +++ b/changelog.d/2481.change.rst @@ -0,0 +1,2 @@ +Define ``create_module()`` and ``exec_module()`` methods in ``VendorImporter`` +to get rid of ``ImportWarning`` -- by :user:`hroncok` diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 4dc3beb2fa..1fbb4fcc89 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -54,6 +54,12 @@ def load_module(self, fullname): "distribution.".format(**locals()) ) + def create_module(self, spec): + return self.load_module(spec.name) + + def exec_module(self, module): + pass + def install(self): """ Install this importer into sys.meta_path if not already present. diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index b7f30dc2e3..399701a044 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -54,6 +54,12 @@ def load_module(self, fullname): "distribution.".format(**locals()) ) + def create_module(self, spec): + return self.load_module(spec.name) + + def exec_module(self, module): + pass + def install(self): """ Install this importer into sys.meta_path if not already present. From f146b387548711d8095002e3d1214ca98a8b0392 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 6 Jan 2021 17:40:30 +0100 Subject: [PATCH 8296/8469] Avoid deprecated load_module() in pkg_resources namespace delaration Fixes: https://github.com/pypa/setuptools/issues/2493 --- changelog.d/2493.change.rst | 2 ++ pkg_resources/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2493.change.rst diff --git a/changelog.d/2493.change.rst b/changelog.d/2493.change.rst new file mode 100644 index 0000000000..f2c4693240 --- /dev/null +++ b/changelog.d/2493.change.rst @@ -0,0 +1,2 @@ +Use importlib.import_module() rather than the deprectated loader.load_module() +in pkg_resources namespace delaration -- by :user:`encukou` diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 737f4d5fad..99b7f68075 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -38,6 +38,7 @@ import inspect import ntpath import posixpath +import importlib from pkgutil import get_importer try: @@ -2209,7 +2210,7 @@ def _handle_ns(packageName, path_item): if subpath is not None: path = module.__path__ path.append(subpath) - loader.load_module(packageName) + importlib.import_module(packageName) _rebuild_mod_path(path, packageName, module) return subpath From c1b2b1a60f7d099e841d6bbcac3531c5cb2efc1b Mon Sep 17 00:00:00 2001 From: YuanPei Li Date: Fri, 8 Jan 2021 17:35:33 +0800 Subject: [PATCH 8297/8469] fix typo Fix a difference between the name of function definition and calling. --- docs/userguide/entry_point.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index edab446502..738207282c 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -28,7 +28,7 @@ with ``__init__.py`` as: .. code-block:: python - def helloworld(): + def hello_world(): print("Hello world") and ``__main__.py`` providing a hook: From 0ace684768f5d9b42338fa4c0c10e3b4345a411f Mon Sep 17 00:00:00 2001 From: YuanPei Li Date: Fri, 8 Jan 2021 17:41:47 +0800 Subject: [PATCH 8298/8469] Create 2525.doc.rst --- changelog.d/2525.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2525.doc.rst diff --git a/changelog.d/2525.doc.rst b/changelog.d/2525.doc.rst new file mode 100644 index 0000000000..86baac98c1 --- /dev/null +++ b/changelog.d/2525.doc.rst @@ -0,0 +1 @@ +Fix typo in the entry point page. -- by :user:`jtr109` From 6a0c93bb62f45d1696ae8487c30090b279bb5f0f Mon Sep 17 00:00:00 2001 From: YuanPei Li Date: Fri, 8 Jan 2021 17:46:42 +0800 Subject: [PATCH 8299/8469] Update 2525.doc.rst --- changelog.d/2525.doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2525.doc.rst b/changelog.d/2525.doc.rst index 86baac98c1..5d7ad5d335 100644 --- a/changelog.d/2525.doc.rst +++ b/changelog.d/2525.doc.rst @@ -1 +1 @@ -Fix typo in the entry point page. -- by :user:`jtr109` +Fix typo in the document page about entry point. -- by :user:`jtr109` From fbc9bd6fdbce132b9b5136345b0f6b3a1f6debaf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 8 Jan 2021 14:14:14 -0500 Subject: [PATCH 8300/8469] Disable inclusion of package data as it causes 'tests' to be included as data. Fixes #2505. --- changelog.d/2505.misc.rst | 1 + setup.cfg | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2505.misc.rst diff --git a/changelog.d/2505.misc.rst b/changelog.d/2505.misc.rst new file mode 100644 index 0000000000..11c642e778 --- /dev/null +++ b/changelog.d/2505.misc.rst @@ -0,0 +1 @@ +Disable inclusion of package data as it causes 'tests' to be included as data. diff --git a/setup.cfg b/setup.cfg index 4eb5018390..02d99530b7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,8 @@ project_urls = [options] packages = find: py_modules = easy_install -include_package_data = true +# disabled as it causes tests to be included #2505 +# include_package_data = true python_requires = >=3.6 install_requires = From fe0541078d9a7720d9fa679f66209598bb6f4572 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 8 Jan 2021 14:14:52 -0500 Subject: [PATCH 8301/8469] =?UTF-8?q?Bump=20version:=2051.1.1=20=E2=86=92?= =?UTF-8?q?=2051.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2505.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2505.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 60e7352f59..432c813062 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.1.1 +current_version = 51.1.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index ca76648bd2..5f69c6abbc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.1.2 +------- + + +Misc +^^^^ +* #2505: Disable inclusion of package data as it causes 'tests' to be included as data. + + v51.1.1 ------- diff --git a/changelog.d/2505.misc.rst b/changelog.d/2505.misc.rst deleted file mode 100644 index 11c642e778..0000000000 --- a/changelog.d/2505.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Disable inclusion of package data as it causes 'tests' to be included as data. diff --git a/setup.cfg b/setup.cfg index 02d99530b7..dff72caf38 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] license_file = LICENSE name = setuptools -version = 51.1.1 +version = 51.1.2 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 3e876d7906fa6387ab6ac9a9bff8659762363017 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 8 Jan 2021 23:14:07 -0500 Subject: [PATCH 8302/8469] Enable complexity limit. Fixes jaraco/skeleton#34. --- .flake8 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.flake8 b/.flake8 index 790c109fdb..59a51f8691 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,9 @@ [flake8] max-line-length = 88 + +# jaraco/skeleton#34 +max-complexity = 10 + ignore = # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 W503 From 1731fbebe9f6655a203e6e08ab309f9916ea6f65 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 9 Jan 2021 05:21:12 +0100 Subject: [PATCH 8303/8469] Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 7233b94232..249f97c24f 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ commands = [testenv:release] skip_install = True deps = - pep517>=0.5 + build twine[keyring]>=1.13 path jaraco.develop>=7.1 @@ -35,6 +35,6 @@ setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = python -c "import path; path.Path('dist').rmtree_p()" - python -m pep517.build . + python -m build python -m twine upload dist/* python -m jaraco.develop.create-github-release From a9b3f681dea9728235c2a9c68165f7b5cbf350ab Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 9 Jan 2021 05:27:24 +0100 Subject: [PATCH 8304/8469] Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d5010f7046..88bc263a47 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,6 @@ [metadata] -license_file = LICENSE +license_files = + LICENSE name = skeleton author = Jason R. Coombs author_email = jaraco@jaraco.com From 77fbe1df4af6d8f75f44440e89ee1bc249c9f2e0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 9 Jan 2021 05:37:11 +0100 Subject: [PATCH 8305/8469] Use `extend-ignore` in flake8 config (#33) * Use `extend-ignore` in flake8 config This option allows to add extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Fixes #28. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * Enable complexity limit. Fixes jaraco/skeleton#34. * Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs * Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file Co-authored-by: Jason R. Coombs --- .flake8 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.flake8 b/.flake8 index 59a51f8691..48b2e246f1 100644 --- a/.flake8 +++ b/.flake8 @@ -4,10 +4,6 @@ max-line-length = 88 # jaraco/skeleton#34 max-complexity = 10 -ignore = - # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 - W503 - # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 - W504 +extend-ignore = # Black creates whitespace before colon E203 From e39cb0d21041578f3435e29bc45b3e7894e48548 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Fri, 15 Jan 2021 13:53:33 -0600 Subject: [PATCH 8306/8469] Move helper method out of class --- setuptools/tests/test_egg_info.py | 57 ++++++++++++++++--------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1047468b18..0297f13108 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -19,6 +19,26 @@ from . import contexts +def _run_egg_info_command(tmpdir_cwd, env, cmd=None, output=None): + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + if cmd is None: + cmd = [ + 'egg_info', + ] + code, data = environment.run_setup_py( + cmd=cmd, + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + assert not code, data + + if output: + assert output in data + + class Environment(str): pass @@ -132,7 +152,7 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): def test_expected_files_produced(self, tmpdir_cwd, env): self._create_project() - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) actual = os.listdir('foo.egg-info') expected = [ @@ -166,7 +186,7 @@ def test_license_is_a_string(self, tmpdir_cwd, env): # currently configured to use a subprocess, the actual traceback # object is lost and we need to parse it from stderr with pytest.raises(AssertionError) as exc: - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) # Hopefully this is not too fragile: the only argument to the # assertion error should be a traceback, ending with: @@ -180,13 +200,13 @@ def test_rebuilt(self, tmpdir_cwd, env): """Ensure timestamps are updated when the command is re-run.""" self._create_project() - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) timestamp_a = os.path.getmtime('foo.egg-info') # arbitrary sleep just to handle *really* fast systems time.sleep(.001) - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) timestamp_b = os.path.getmtime('foo.egg-info') assert timestamp_a != timestamp_b @@ -201,7 +221,7 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): 'usage.rst': "Run 'hi'", } }) - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) egg_info_dir = os.path.join('.', 'foo.egg-info') sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') with open(sources_txt) as f: @@ -441,7 +461,7 @@ def test_requires( self, tmpdir_cwd, env, requires, use_setup_cfg, expected_requires, install_cmd_kwargs): self._setup_script_with_requires(requires, use_setup_cfg) - self._run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) + _run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) egg_info_dir = os.path.join('.', 'foo.egg-info') requires_txt = os.path.join(egg_info_dir, 'requires.txt') if os.path.exists(requires_txt): @@ -461,14 +481,14 @@ def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): req = 'install_requires={"fake-factory==0.5.2", "pytz"}' self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): @@ -476,7 +496,7 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - self._run_egg_info_command(tmpdir_cwd, env) + _run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_provides_extra(self, tmpdir_cwd, env): @@ -865,25 +885,6 @@ def test_egg_info_includes_setup_py(self, tmpdir_cwd): sources = f.read().split('\n') assert 'setup.py' in sources - def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - if cmd is None: - cmd = [ - 'egg_info', - ] - code, data = environment.run_setup_py( - cmd=cmd, - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - assert not code, data - - if output: - assert output in data - def test_egg_info_tag_only_once(self, tmpdir_cwd, env): self._create_project() build_files({ From 2788dbf93ee8e3d86f7bc86ec6ffc79c7a4643c8 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Fri, 15 Jan 2021 13:54:54 -0600 Subject: [PATCH 8307/8469] Add failing test --- setuptools/tests/test_egg_info.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 0297f13108..1d0f07e306 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,6 +6,7 @@ import stat import time +from setuptools.build_meta import prepare_metadata_for_build_wheel from setuptools.command.egg_info import ( egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision, ) @@ -885,7 +886,22 @@ def test_egg_info_includes_setup_py(self, tmpdir_cwd): sources = f.read().split('\n') assert 'setup.py' in sources - def test_egg_info_tag_only_once(self, tmpdir_cwd, env): + @pytest.mark.parametrize( + ('make_metadata_path', 'run_command'), + [ + ( + lambda env: os.path.join('.', 'foo.egg-info', 'PKG-INFO'), + lambda tmpdir_cwd, env: _run_egg_info_command(tmpdir_cwd, env) + ), + ( + lambda env: os.path.join(env, 'foo.dist-info', 'METADATA'), + lambda tmpdir_cwd, env: prepare_metadata_for_build_wheel(env) + ) + ] + ) + def test_egg_info_tag_only_once( + self, tmpdir_cwd, env, make_metadata_path, run_command + ): self._create_project() build_files({ 'setup.cfg': DALS(""" @@ -895,11 +911,10 @@ def test_egg_info_tag_only_once(self, tmpdir_cwd, env): tag_svn_revision = 0 """), }) - self._run_egg_info_command(tmpdir_cwd, env) - egg_info_dir = os.path.join('.', 'foo.egg-info') - with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: - pkg_info_lines = pkginfo_file.read().split('\n') - assert 'Version: 0.0.0.dev0' in pkg_info_lines + run_command(tmpdir_cwd, env) + with open(make_metadata_path(env)) as metadata_file: + metadata_lines = metadata_file.read().split('\n') + assert 'Version: 0.0.0.dev0' in metadata_lines def test_get_pkg_info_revision_deprecated(self): pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) From ed07f8b124f75b43e27e5d636484898476a0be4f Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Fri, 15 Jan 2021 14:19:14 -0600 Subject: [PATCH 8308/8469] Correctly handle normalized tags --- changelog.d/2529.change.rst | 1 + setuptools/command/egg_info.py | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelog.d/2529.change.rst diff --git a/changelog.d/2529.change.rst b/changelog.d/2529.change.rst new file mode 100644 index 0000000000..10c41518d4 --- /dev/null +++ b/changelog.d/2529.change.rst @@ -0,0 +1 @@ +Fixed an issue where version tags may be added multiple times diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 0b7ad677f2..066c248886 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -130,10 +130,12 @@ def _maybe_tag(self, version): egg_info may be called more than once for a distribution, in which case the version string already contains all tags. """ - return ( - version if self.vtags and version.endswith(self.vtags) - else version + self.vtags - ) + # Remove the tags if they exist. The tags maybe have been normalized + # (e.g. turning .dev into .dev0) so we can't just compare strings + base_version = parse_version(version).base_version + + # Add the tags + return base_version + self.vtags def tags(self): version = '' From 0df40810ec54590c888ae0e4073d73f731c91f4a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 15 Jan 2021 19:16:28 -0500 Subject: [PATCH 8309/8469] Add support for namespace packages. Closes jaraco/skeleton#40. --- setup.cfg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 88bc263a47..106763e3d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,12 +15,18 @@ classifiers = Programming Language :: Python :: 3 :: Only [options] -packages = find: +packages = find_namespace: include_package_data = true python_requires = >=3.6 install_requires = setup_requires = setuptools_scm[toml] >= 3.4.1 +[options.packages.find] +exclude = + build* + docs* + tests* + [options.extras_require] testing = # upstream From a499dee61ecdabf867853f24a2bc78a8197c97f1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 16:36:47 -0500 Subject: [PATCH 8310/8469] Avoid hitting network during test_easy_install --- changelog.d/2525.misc.rst | 1 + setuptools/tests/test_easy_install.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 changelog.d/2525.misc.rst diff --git a/changelog.d/2525.misc.rst b/changelog.d/2525.misc.rst new file mode 100644 index 0000000000..50d1bfa1b1 --- /dev/null +++ b/changelog.d/2525.misc.rst @@ -0,0 +1 @@ +Avoid hitting network during test_easy_install. diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index dc00e697de..93ac23e49e 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -38,6 +38,16 @@ from .textwrap import DALS +@pytest.fixture(autouse=True) +def pip_disable_index(monkeypatch): + """ + Important: Disable the default index for pip to avoid + querying packages in the index and potentially resolving + and installing packages there. + """ + monkeypatch.setenv('PIP_NO_INDEX', 'true') + + class FakeDist: def get_entry_map(self, group): if group != 'console_scripts': From b316312fa192f1299b3baea108f956d44a8b43f8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 16:40:50 -0500 Subject: [PATCH 8311/8469] Point changelog at 2534 for more info --- changelog.d/{2525.misc.rst => 2534.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2525.misc.rst => 2534.misc.rst} (100%) diff --git a/changelog.d/2525.misc.rst b/changelog.d/2534.misc.rst similarity index 100% rename from changelog.d/2525.misc.rst rename to changelog.d/2534.misc.rst From 0d6368684f349c1615600eabff877f7a5a29d6c6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 16:42:48 -0500 Subject: [PATCH 8312/8469] =?UTF-8?q?Bump=20version:=2051.1.2=20=E2=86=92?= =?UTF-8?q?=2051.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 18 ++++++++++++++++++ changelog.d/2493.change.rst | 2 -- changelog.d/2525.doc.rst | 1 - changelog.d/2534.misc.rst | 1 - setup.cfg | 2 +- 6 files changed, 20 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/2493.change.rst delete mode 100644 changelog.d/2525.doc.rst delete mode 100644 changelog.d/2534.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 432c813062..facadd5f3b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.1.2 +current_version = 51.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 5f69c6abbc..a95d7c72f6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,21 @@ +v51.2.0 +------- + + +Changes +^^^^^^^ +* #2493: Use importlib.import_module() rather than the deprectated loader.load_module() + in pkg_resources namespace delaration -- by :user:`encukou` + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2525: Fix typo in the document page about entry point. -- by :user:`jtr109` + +Misc +^^^^ +* #2534: Avoid hitting network during test_easy_install. + + v51.1.2 ------- diff --git a/changelog.d/2493.change.rst b/changelog.d/2493.change.rst deleted file mode 100644 index f2c4693240..0000000000 --- a/changelog.d/2493.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Use importlib.import_module() rather than the deprectated loader.load_module() -in pkg_resources namespace delaration -- by :user:`encukou` diff --git a/changelog.d/2525.doc.rst b/changelog.d/2525.doc.rst deleted file mode 100644 index 5d7ad5d335..0000000000 --- a/changelog.d/2525.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix typo in the document page about entry point. -- by :user:`jtr109` diff --git a/changelog.d/2534.misc.rst b/changelog.d/2534.misc.rst deleted file mode 100644 index 50d1bfa1b1..0000000000 --- a/changelog.d/2534.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Avoid hitting network during test_easy_install. diff --git a/setup.cfg b/setup.cfg index dff72caf38..451abe835a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] license_file = LICENSE name = setuptools -version = 51.1.2 +version = 51.2.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From d2b1f7ebd6ebd57b4a50bc6660e93b31129bacb4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 16:43:27 -0500 Subject: [PATCH 8313/8469] Point changelog at 2534 for more info --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index a95d7c72f6..e51b5e646c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -31,7 +31,7 @@ v51.1.1 Misc ^^^^ -* #2525: Avoid hitting network during test_virtualenv.test_test_command. +* #2534: Avoid hitting network during test_virtualenv.test_test_command. v51.1.0 From aaf8eb94dad0e5f4dce7bb1b51e586c08e3a4319 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 16:58:28 -0500 Subject: [PATCH 8314/8469] Disable PIP_NO_INDEX for tests that override the index. Ref #2534. --- setuptools/tests/test_easy_install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 93ac23e49e..6aa17e9414 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -455,6 +455,7 @@ def test_setup_requires_honors_fetch_params(self, mock_index, monkeypatch): """ monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + monkeypatch.setenv('PIP_NO_INDEX', 'false') with contexts.quiet(): # create an sdist that has a build-time dependency. with TestSetupRequires.create_sdist() as dist_file: @@ -628,6 +629,7 @@ def make_dependency_sdist(dist_path, distname, version): def test_setup_requires_honors_pip_env(self, mock_index, monkeypatch): monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) + monkeypatch.setenv('PIP_NO_INDEX', 'false') monkeypatch.setenv(str('PIP_INDEX_URL'), mock_index.url) with contexts.save_pkg_resources_state(): with contexts.tempdir() as temp_dir: From b091db995ff295d3d4ccc4717e401a1c134183a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 18:30:18 -0500 Subject: [PATCH 8315/8469] Exclude _distutils from flake8 also. --- .flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 5e1c7cae92..a8bbdd53a5 100644 --- a/.flake8 +++ b/.flake8 @@ -1,8 +1,9 @@ [flake8] max-line-length = 88 extend-exclude = - build/lib + build setuptools/_vendor + setuptools/_distutils pkg_resources/_vendor ignore = # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 From b31105bdc855d75fc4f9fc7cfe005a81e7cc2f38 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 18:47:18 -0500 Subject: [PATCH 8316/8469] Rely on tuple argument to endswith Co-authored-by: Sviatoslav Sydorenko --- pkg_resources/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ba90c8c4ab..a304647fd0 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1984,7 +1984,7 @@ def find_eggs_in_zip(importer, path_item, only=False): dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) for dist in dists: yield dist - elif any(map(lower.endswith, ('.dist-info', '.egg-info'))): + elif subitem.lower().endswith(('.dist-info', '.egg-info')): subpath = os.path.join(path_item, subitem) submeta = EggMetadata(zipimport.zipimporter(subpath)) submeta.egg_info = subpath From b994bc637e5817798f356bfd373011ab1d894216 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 18:59:29 -0500 Subject: [PATCH 8317/8469] Remove unused variable --- pkg_resources/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 73f8545967..c84f1dd9e8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1981,7 +1981,6 @@ def find_eggs_in_zip(importer, path_item, only=False): # don't yield nested distros return for subitem in metadata.resource_listdir(''): - lower = subitem.lower() if _is_egg_path(subitem): subpath = os.path.join(path_item, subitem) dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath) From d01d3ee286d4aab0ca0d78bd7a47b2556f81f499 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Dec 2020 11:21:30 -0500 Subject: [PATCH 8318/8469] Quick fix for #1390. Now description cannot contain a newline. --- changelog.d/1390.change.rst | 1 + setuptools/dist.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1390.change.rst diff --git a/changelog.d/1390.change.rst b/changelog.d/1390.change.rst new file mode 100644 index 0000000000..fcb57f54c5 --- /dev/null +++ b/changelog.d/1390.change.rst @@ -0,0 +1 @@ +Newlines in metadata description/Summary now trigger a ValueError. diff --git a/setuptools/dist.py b/setuptools/dist.py index 662fbe67c5..2d0aac333d 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -118,6 +118,13 @@ def _read_list(name): self.obsoletes = None +def single_line(val): + # quick and dirty validation for description pypa/setuptools#1390 + if '\n' in val: + raise ValueError("newlines not allowed") + return val + + # Based on Python 3.5 version def write_pkg_file(self, file): # noqa: C901 # is too complex (14) # FIXME """Write the PKG-INFO format data to a file object. @@ -130,7 +137,7 @@ def write_field(key, value): write_field('Metadata-Version', str(version)) write_field('Name', self.get_name()) write_field('Version', self.get_version()) - write_field('Summary', self.get_description()) + write_field('Summary', single_line(self.get_description())) write_field('Home-page', self.get_url()) if version < StrictVersion('1.2'): From dc051ceb9071b7bc93fb8a3eaa8afc3ad57d5490 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 19:14:43 -0500 Subject: [PATCH 8319/8469] =?UTF-8?q?Bump=20version:=2051.2.0=20=E2=86=92?= =?UTF-8?q?=2051.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 14 ++++++++++++++ changelog.d/1390.change.rst | 1 - changelog.d/2481.change.rst | 2 -- changelog.d/2489.change.rst | 2 -- changelog.d/2529.change.rst | 1 - setup.cfg | 2 +- 7 files changed, 16 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/1390.change.rst delete mode 100644 changelog.d/2481.change.rst delete mode 100644 changelog.d/2489.change.rst delete mode 100644 changelog.d/2529.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index facadd5f3b..0789cb9847 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.2.0 +current_version = 51.3.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index e51b5e646c..48669d992c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,17 @@ +v51.3.0 +------- + + +Changes +^^^^^^^ +* #1390: Newlines in metadata description/Summary now trigger a ValueError. +* #2481: Define ``create_module()`` and ``exec_module()`` methods in ``VendorImporter`` + to get rid of ``ImportWarning`` -- by :user:`hroncok` +* #2489: ``pkg_resources`` behavior for zipimport now matches the regular behavior, and finds + ``.egg-info`` (previoulsy would only find ``.dist-info``) -- by :user:`thatch` +* #2529: Fixed an issue where version tags may be added multiple times + + v51.2.0 ------- diff --git a/changelog.d/1390.change.rst b/changelog.d/1390.change.rst deleted file mode 100644 index fcb57f54c5..0000000000 --- a/changelog.d/1390.change.rst +++ /dev/null @@ -1 +0,0 @@ -Newlines in metadata description/Summary now trigger a ValueError. diff --git a/changelog.d/2481.change.rst b/changelog.d/2481.change.rst deleted file mode 100644 index dc824c9c2e..0000000000 --- a/changelog.d/2481.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Define ``create_module()`` and ``exec_module()`` methods in ``VendorImporter`` -to get rid of ``ImportWarning`` -- by :user:`hroncok` diff --git a/changelog.d/2489.change.rst b/changelog.d/2489.change.rst deleted file mode 100644 index 40eddbe734..0000000000 --- a/changelog.d/2489.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -``pkg_resources`` behavior for zipimport now matches the regular behavior, and finds -``.egg-info`` (previoulsy would only find ``.dist-info``) -- by :user:`thatch` diff --git a/changelog.d/2529.change.rst b/changelog.d/2529.change.rst deleted file mode 100644 index 10c41518d4..0000000000 --- a/changelog.d/2529.change.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed an issue where version tags may be added multiple times diff --git a/setup.cfg b/setup.cfg index 4e7312a107..43c4f23b6f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.2.0 +version = 51.3.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 5156278555fa20234db59f81097bee8cd7b5aaf4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 22:05:43 -0500 Subject: [PATCH 8320/8469] Revert "Merge pull request #2533 from pypa/fix/2529" This reverts commit ef457b2e4eb215ab9d730afbd61a10ed3b118d3c, reversing changes made to d2b1f7ebd6ebd57b4a50bc6660e93b31129bacb4. --- setuptools/command/egg_info.py | 10 ++-- setuptools/tests/test_egg_info.py | 84 +++++++++++++------------------ 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index bb47203602..1f120b67d1 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -131,12 +131,10 @@ def _maybe_tag(self, version): egg_info may be called more than once for a distribution, in which case the version string already contains all tags. """ - # Remove the tags if they exist. The tags maybe have been normalized - # (e.g. turning .dev into .dev0) so we can't just compare strings - base_version = parse_version(version).base_version - - # Add the tags - return base_version + self.vtags + return ( + version if self.vtags and version.endswith(self.vtags) + else version + self.vtags + ) def tags(self): version = '' diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1d0f07e306..1047468b18 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,7 +6,6 @@ import stat import time -from setuptools.build_meta import prepare_metadata_for_build_wheel from setuptools.command.egg_info import ( egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision, ) @@ -20,26 +19,6 @@ from . import contexts -def _run_egg_info_command(tmpdir_cwd, env, cmd=None, output=None): - environ = os.environ.copy().update( - HOME=env.paths['home'], - ) - if cmd is None: - cmd = [ - 'egg_info', - ] - code, data = environment.run_setup_py( - cmd=cmd, - pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), - data_stream=1, - env=environ, - ) - assert not code, data - - if output: - assert output in data - - class Environment(str): pass @@ -153,7 +132,7 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): def test_expected_files_produced(self, tmpdir_cwd, env): self._create_project() - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) actual = os.listdir('foo.egg-info') expected = [ @@ -187,7 +166,7 @@ def test_license_is_a_string(self, tmpdir_cwd, env): # currently configured to use a subprocess, the actual traceback # object is lost and we need to parse it from stderr with pytest.raises(AssertionError) as exc: - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) # Hopefully this is not too fragile: the only argument to the # assertion error should be a traceback, ending with: @@ -201,13 +180,13 @@ def test_rebuilt(self, tmpdir_cwd, env): """Ensure timestamps are updated when the command is re-run.""" self._create_project() - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) timestamp_a = os.path.getmtime('foo.egg-info') # arbitrary sleep just to handle *really* fast systems time.sleep(.001) - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) timestamp_b = os.path.getmtime('foo.egg-info') assert timestamp_a != timestamp_b @@ -222,7 +201,7 @@ def test_manifest_template_is_read(self, tmpdir_cwd, env): 'usage.rst': "Run 'hi'", } }) - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) egg_info_dir = os.path.join('.', 'foo.egg-info') sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') with open(sources_txt) as f: @@ -462,7 +441,7 @@ def test_requires( self, tmpdir_cwd, env, requires, use_setup_cfg, expected_requires, install_cmd_kwargs): self._setup_script_with_requires(requires, use_setup_cfg) - _run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) + self._run_egg_info_command(tmpdir_cwd, env, **install_cmd_kwargs) egg_info_dir = os.path.join('.', 'foo.egg-info') requires_txt = os.path.join(egg_info_dir, 'requires.txt') if os.path.exists(requires_txt): @@ -482,14 +461,14 @@ def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): req = 'install_requires={"fake-factory==0.5.2", "pytz"}' self._setup_script_with_requires(req) with pytest.raises(AssertionError): - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): @@ -497,7 +476,7 @@ def test_extras_require_with_invalid_marker_in_req(self, tmpdir_cwd, env): req = tmpl.format(marker=self.invalid_marker) self._setup_script_with_requires(req) with pytest.raises(AssertionError): - _run_egg_info_command(tmpdir_cwd, env) + self._run_egg_info_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] def test_provides_extra(self, tmpdir_cwd, env): @@ -886,22 +865,26 @@ def test_egg_info_includes_setup_py(self, tmpdir_cwd): sources = f.read().split('\n') assert 'setup.py' in sources - @pytest.mark.parametrize( - ('make_metadata_path', 'run_command'), - [ - ( - lambda env: os.path.join('.', 'foo.egg-info', 'PKG-INFO'), - lambda tmpdir_cwd, env: _run_egg_info_command(tmpdir_cwd, env) - ), - ( - lambda env: os.path.join(env, 'foo.dist-info', 'METADATA'), - lambda tmpdir_cwd, env: prepare_metadata_for_build_wheel(env) - ) - ] - ) - def test_egg_info_tag_only_once( - self, tmpdir_cwd, env, make_metadata_path, run_command - ): + def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + if cmd is None: + cmd = [ + 'egg_info', + ] + code, data = environment.run_setup_py( + cmd=cmd, + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + assert not code, data + + if output: + assert output in data + + def test_egg_info_tag_only_once(self, tmpdir_cwd, env): self._create_project() build_files({ 'setup.cfg': DALS(""" @@ -911,10 +894,11 @@ def test_egg_info_tag_only_once( tag_svn_revision = 0 """), }) - run_command(tmpdir_cwd, env) - with open(make_metadata_path(env)) as metadata_file: - metadata_lines = metadata_file.read().split('\n') - assert 'Version: 0.0.0.dev0' in metadata_lines + self._run_egg_info_command(tmpdir_cwd, env) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + assert 'Version: 0.0.0.dev0' in pkg_info_lines def test_get_pkg_info_revision_deprecated(self): pytest.warns(EggInfoDeprecationWarning, get_pkg_info_revision) From 6b44f948ca40ee490c59d216a0e859d17431742a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 22:09:51 -0500 Subject: [PATCH 8321/8469] =?UTF-8?q?Bump=20version:=2051.3.0=20=E2=86=92?= =?UTF-8?q?=2051.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ setup.cfg | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0789cb9847..2cb50290ea 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.3.0 +current_version = 51.3.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 48669d992c..2be5fa2fac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.3.1 +------- + + +Misc +^^^^ +* #2536: Reverted tag deduplication handling. + + v51.3.0 ------- diff --git a/setup.cfg b/setup.cfg index 43c4f23b6f..aead43461b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.3.0 +version = 51.3.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From fbb705406dca3e8a41ac6be4a28e1611102cac5c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 01:36:19 -0500 Subject: [PATCH 8322/8469] Remove support for easy_install-based downloads for fetch_build_eggs (setup_requires). --- setuptools/installer.py | 46 +-------------------------- setuptools/tests/test_easy_install.py | 10 +++--- setuptools/tests/test_virtualenv.py | 5 --- 3 files changed, 5 insertions(+), 56 deletions(-) diff --git a/setuptools/installer.py b/setuptools/installer.py index c5822a31f4..57e2b587aa 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -7,7 +7,6 @@ from distutils.errors import DistutilsError import pkg_resources -from setuptools.command.easy_install import easy_install from setuptools.wheel import Wheel @@ -19,54 +18,11 @@ def _fixup_find_links(find_links): return find_links -def _legacy_fetch_build_egg(dist, req): - """Fetch an egg needed for building. - - Legacy path using EasyInstall. - """ - tmp_dist = dist.__class__({'script_args': ['easy_install']}) - opts = tmp_dist.get_option_dict('easy_install') - opts.clear() - opts.update( - (k, v) - for k, v in dist.get_option_dict('easy_install').items() - if k in ( - # don't use any other settings - 'find_links', 'site_dirs', 'index_url', - 'optimize', 'site_dirs', 'allow_hosts', - )) - if dist.dependency_links: - links = dist.dependency_links[:] - if 'find_links' in opts: - links = _fixup_find_links(opts['find_links'][1]) + links - opts['find_links'] = ('setup', links) - install_dir = dist.get_egg_cache_dir() - cmd = easy_install( - tmp_dist, args=["x"], install_dir=install_dir, - exclude_scripts=True, - always_copy=False, build_directory=None, editable=False, - upgrade=False, multi_version=True, no_report=True, user=False - ) - cmd.ensure_finalized() - return cmd.easy_install(req) - - def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME """Fetch an egg needed for building. Use pip/wheel to fetch/build a wheel.""" - # Check pip is available. - try: - pkg_resources.get_distribution('pip') - except pkg_resources.DistributionNotFound: - dist.announce( - 'WARNING: The pip package is not available, falling back ' - 'to EasyInstall for handling setup_requires/test_requires; ' - 'this is deprecated and will be removed in a future version.', - log.WARN - ) - return _legacy_fetch_build_egg(dist, req) - # Warn if wheel is not. + # Warn if wheel is not available try: pkg_resources.get_distribution('wheel') except pkg_resources.DistributionNotFound: diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 6aa17e9414..3340a59c24 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -742,10 +742,10 @@ def test_setup_requires_with_python_requires(self, monkeypatch, tmpdir): assert eggs == ['dep 1.0'] @pytest.mark.parametrize( - 'use_legacy_installer,with_dependency_links_in_setup_py', - itertools.product((False, True), (False, True))) + 'with_dependency_links_in_setup_py', + (False, True)) def test_setup_requires_with_find_links_in_setup_cfg( - self, monkeypatch, use_legacy_installer, + self, monkeypatch, with_dependency_links_in_setup_py): monkeypatch.setenv(str('PIP_RETRIES'), str('0')) monkeypatch.setenv(str('PIP_TIMEOUT'), str('0')) @@ -767,11 +767,9 @@ def test_setup_requires_with_find_links_in_setup_cfg( fp.write(DALS( ''' from setuptools import installer, setup - if {use_legacy_installer}: - installer.fetch_build_egg = installer._legacy_fetch_build_egg setup(setup_requires='python-xlib==42', dependency_links={dependency_links!r}) - ''').format(use_legacy_installer=use_legacy_installer, # noqa + ''').format( dependency_links=dependency_links)) with open(test_setup_cfg, 'w') as fp: fp.write(DALS( diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 5a942d84c5..8681ed2741 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -186,11 +186,6 @@ def test_test_command_install_requirements(virtualenv, tmpdir): _check_test_command_install_requirements(virtualenv, tmpdir) -def test_test_command_install_requirements_when_using_easy_install( - bare_virtualenv, tmpdir): - _check_test_command_install_requirements(bare_virtualenv, tmpdir) - - def test_no_missing_dependencies(bare_virtualenv): """ Quick and dirty test to ensure all external dependencies are vendored. From 2f891b433c42eb1554644199058c9190790ebf85 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 12:14:25 -0500 Subject: [PATCH 8323/8469] Repair Descriptions with newlines and emit a warning that the value will be disallowed in the future. --- changelog.d/1390.misc.rst | 1 + setuptools/dist.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1390.misc.rst diff --git a/changelog.d/1390.misc.rst b/changelog.d/1390.misc.rst new file mode 100644 index 0000000000..5e4fb11488 --- /dev/null +++ b/changelog.d/1390.misc.rst @@ -0,0 +1 @@ +Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces). diff --git a/setuptools/dist.py b/setuptools/dist.py index 2d0aac333d..172d66b1f4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -121,7 +121,9 @@ def _read_list(name): def single_line(val): # quick and dirty validation for description pypa/setuptools#1390 if '\n' in val: - raise ValueError("newlines not allowed") + # TODO after 2021-07-31: Replace with `raise ValueError("newlines not allowed")` + warnings.UserWarning("newlines not allowed and will break in the future") + val = val.replace('\n', ' ') return val From c5e0397b231f36d6349357a33c48618f82facb58 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 13:35:16 -0500 Subject: [PATCH 8324/8469] =?UTF-8?q?Bump=20version:=2051.3.1=20=E2=86=92?= =?UTF-8?q?=2051.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/1390.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1390.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2cb50290ea..4d60721741 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.3.1 +current_version = 51.3.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2be5fa2fac..2de874ca96 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.3.2 +------- + + +Misc +^^^^ +* #1390: Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces). + + v51.3.1 ------- diff --git a/changelog.d/1390.misc.rst b/changelog.d/1390.misc.rst deleted file mode 100644 index 5e4fb11488..0000000000 --- a/changelog.d/1390.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces). diff --git a/setup.cfg b/setup.cfg index aead43461b..2476ede8b0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.3.1 +version = 51.3.2 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 9d61fdd3078805cad8ccd84c769a8a27e033a1a8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 13:37:03 -0500 Subject: [PATCH 8325/8469] Add changelog. --- changelog.d/2537.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2537.breaking.rst diff --git a/changelog.d/2537.breaking.rst b/changelog.d/2537.breaking.rst new file mode 100644 index 0000000000..184d8e8758 --- /dev/null +++ b/changelog.d/2537.breaking.rst @@ -0,0 +1 @@ +Remove fallback support for fetch_build_eggs using easy_install. Now pip is required for setup_requires to succeed. From 49364a9eb82a986da1a1e6ad24022f7aac6e10d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 17:13:37 -0500 Subject: [PATCH 8326/8469] Fix AttributeError in Description validation. Fixes #2539. --- changelog.d/2539.misc.rst | 1 + setuptools/dist.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2539.misc.rst diff --git a/changelog.d/2539.misc.rst b/changelog.d/2539.misc.rst new file mode 100644 index 0000000000..20114be805 --- /dev/null +++ b/changelog.d/2539.misc.rst @@ -0,0 +1 @@ +Fix AttributeError in Description validation. diff --git a/setuptools/dist.py b/setuptools/dist.py index 172d66b1f4..050388de16 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -122,7 +122,7 @@ def single_line(val): # quick and dirty validation for description pypa/setuptools#1390 if '\n' in val: # TODO after 2021-07-31: Replace with `raise ValueError("newlines not allowed")` - warnings.UserWarning("newlines not allowed and will break in the future") + warnings.warn("newlines not allowed and will break in the future") val = val.replace('\n', ' ') return val From 925b6be6796c185e5d832a89ce33fbe38c0df5f6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 17:14:28 -0500 Subject: [PATCH 8327/8469] =?UTF-8?q?Bump=20version:=2051.3.2=20=E2=86=92?= =?UTF-8?q?=2051.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2539.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2539.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4d60721741..debcfeeb64 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.3.2 +current_version = 51.3.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2de874ca96..c094960f9a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.3.3 +------- + + +Misc +^^^^ +* #2539: Fix AttributeError in Description validation. + + v51.3.2 ------- diff --git a/changelog.d/2539.misc.rst b/changelog.d/2539.misc.rst deleted file mode 100644 index 20114be805..0000000000 --- a/changelog.d/2539.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix AttributeError in Description validation. diff --git a/setup.cfg b/setup.cfg index 2476ede8b0..536ec70fab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.3.2 +version = 51.3.3 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From d3885f25e37b28fe5a50274a5db9819d5e2ce042 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 18 Nov 2020 18:38:02 +0100 Subject: [PATCH 8328/8469] Parallelize the test runs via pytest-xdist Resolves #2458 --- pytest.ini | 3 +++ setup.cfg | 1 + 2 files changed, 4 insertions(+) diff --git a/pytest.ini b/pytest.ini index 03fc773cf4..df30b82273 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,6 +4,9 @@ addopts= --doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX + + # `pytest-xdist`: + -n auto doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 diff --git a/setup.cfg b/setup.cfg index 536ec70fab..bda5ab6f1b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,7 @@ testing = paver pip>=19.1 # For proper file:// URLs support. jaraco.envs + pytest-xdist docs = # Keep these in sync with docs/requirements.txt From c9188cbf991dbaac6d94b0dd57d3132760fc9e89 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 02:24:08 +0100 Subject: [PATCH 8329/8469] Sanitize CWD out of sys.path in xdist mode --- setuptools/tests/test_build_meta.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 6d3a997ee0..b0455a62cc 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -1,8 +1,10 @@ import os import shutil +import sys import tarfile import importlib from concurrent import futures +from contextlib import suppress import pytest @@ -44,6 +46,15 @@ def __init__(self, *args, **kwargs): def __call__(self, name, *args, **kw): """Handles aribrary function invocations on the build backend.""" + with suppress(ValueError): + # NOTE: pytest-xdist tends to inject '' into `sys.path` which + # NOTE: may break certain isolation expectations. To address + # NOTE: this, we remove this entry from there so the import + # NOTE: machinery behaves the same as in the default + # NOTE: sequential mode. + # Ref: https://github.com/pytest-dev/pytest-xdist/issues/376 + sys.path.remove('') + os.chdir(self.cwd) os.environ.update(self.env) mod = importlib.import_module(self.backend_name) From be6abaec7183e43c164be21112d0b57307748e1d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 02:26:30 +0100 Subject: [PATCH 8330/8469] Clarify `test_build_sdist_relative_path_import` --- setuptools/tests/test_build_meta.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index b0455a62cc..63c7c275b3 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -349,6 +349,7 @@ def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_files(self._relative_path_import_files) build_backend = self.get_build_backend() with pytest.raises(ImportError): + with pytest.raises(ImportError, match="^No module named 'hello'$"): build_backend.build_sdist("temp") @pytest.mark.parametrize('setup_literal, requirements', [ From 8a7a014b8abebcbec942a12d5c63759ada956802 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 02:27:43 +0100 Subject: [PATCH 8331/8469] Make `get_build_backend` cwd path customizable --- setuptools/tests/test_build_meta.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 63c7c275b3..a117a9beba 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -136,8 +136,10 @@ def run(): class TestBuildMetaBackend: backend_name = 'setuptools.build_meta' - def get_build_backend(self): - return BuildBackend(cwd='.', backend_name=self.backend_name) + def get_build_backend(self, cwd_path=None): + if cwd_path is None: + cwd_path = '.' + return BuildBackend(cwd=cwd_path, backend_name=self.backend_name) @pytest.fixture(params=defns) def build_backend(self, tmpdir, request): From 08ded165701faff86313674b8ee92730902e7a3c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 02:28:22 +0100 Subject: [PATCH 8332/8469] Replace `tmpdir_cwd` fixture with `tmp_path` --- setuptools/tests/test_build_meta.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index a117a9beba..3f1ba0465f 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -347,12 +347,11 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): """) } - def test_build_sdist_relative_path_import(self, tmpdir_cwd): - build_files(self._relative_path_import_files) - build_backend = self.get_build_backend() - with pytest.raises(ImportError): + def test_build_sdist_relative_path_import(self, tmp_path): + build_files(self._relative_path_import_files, prefix=str(tmp_path)) + build_backend = self.get_build_backend(cwd_path=tmp_path) with pytest.raises(ImportError, match="^No module named 'hello'$"): - build_backend.build_sdist("temp") + build_backend.build_sdist(tmp_path / "temp") @pytest.mark.parametrize('setup_literal, requirements', [ ("'foo'", ['foo']), From 2e077b73e8a391f460b365382408d70439494d43 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 23:10:35 +0100 Subject: [PATCH 8333/8469] Make `test_pip_upgrade_from_source` xdist-friendly --- setuptools/tests/fixtures.py | 28 ++++++++++++++++++++++++++++ setuptools/tests/test_virtualenv.py | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index e8cb7f5237..0480033c5b 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,8 +1,14 @@ +import pathlib +import shutil + import pytest from . import contexts +SRC_DIR = pathlib.Path(__file__).parents[2] + + @pytest.fixture def user_override(monkeypatch): """ @@ -21,3 +27,25 @@ def user_override(monkeypatch): def tmpdir_cwd(tmpdir): with tmpdir.as_cwd() as orig: yield orig + + +@pytest.fixture +def src_dir(): + """The project source directory available via fixture.""" + return SRC_DIR + + +@pytest.fixture +def tmp_src(src_dir, tmp_path): + """Make a copy of the source dir under `$tmp/src`. + + This fixture is useful whenever it's necessary to run `setup.py` + or `pip install` against the source directory when there's no + control over the number of simultaneous invocations. Such + concurrent runs create and delete directories with the same names + under the target directory and so they influence each other's runs + when they are not being executed sequentially. + """ + tmp_src_path = tmp_path / 'src' + shutil.copytree(src_dir, tmp_src_path) + return tmp_src_path diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 5a942d84c5..79468b1baa 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -85,7 +85,7 @@ def _get_pip_versions(): @pytest.mark.parametrize('pip_version', _get_pip_versions()) -def test_pip_upgrade_from_source(pip_version, virtualenv): +def test_pip_upgrade_from_source(pip_version, tmp_src, virtualenv): """ Check pip can upgrade setuptools from source. """ @@ -104,7 +104,7 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): virtualenv.run(' && '.join(( 'python setup.py -q sdist -d {dist}', 'python setup.py -q bdist_wheel -d {dist}', - )).format(dist=dist_dir), cd=SOURCE_DIR) + )).format(dist=dist_dir), cd=tmp_src) sdist = glob.glob(os.path.join(dist_dir, '*.zip'))[0] wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] # Then update from wheel. From fecbc2d2b439385bfee6ac52fa004a61ccde35f6 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 1 Jan 2021 23:54:14 +0100 Subject: [PATCH 8334/8469] Isolate src for `test_distutils_adoption` --- setuptools/tests/test_distutils_adoption.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_distutils_adoption.py b/setuptools/tests/test_distutils_adoption.py index a53773df8c..0e89921c90 100644 --- a/setuptools/tests/test_distutils_adoption.py +++ b/setuptools/tests/test_distutils_adoption.py @@ -21,10 +21,10 @@ def run(self, cmd, *args, **kwargs): @pytest.fixture -def venv(tmpdir): +def venv(tmp_path, tmp_src): env = VirtualEnv() - env.root = path.Path(tmpdir) - env.req = os.getcwd() + env.root = path.Path(tmp_path / 'venv') + env.req = str(tmp_src) return env.create() From 5f3d12316dc4e3c3f638786668cee38ff5a73bd3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 2 Jan 2021 00:15:33 +0100 Subject: [PATCH 8335/8469] Use tmp src copy in `test_clean_env_install` --- setuptools/tests/test_virtualenv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 79468b1baa..d72dcbd0e5 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -43,11 +43,11 @@ def bare_virtualenv(): SOURCE_DIR = os.path.join(os.path.dirname(__file__), '../..') -def test_clean_env_install(bare_virtualenv): +def test_clean_env_install(bare_virtualenv, tmp_src): """ Check setuptools can be installed in a clean environment. """ - bare_virtualenv.run(['python', 'setup.py', 'install'], cd=SOURCE_DIR) + bare_virtualenv.run(['python', 'setup.py', 'install'], cd=tmp_src) def _get_pip_versions(): From 7fe4a4054a92782a434d25d4ff85231537892c7f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 21:42:33 -0500 Subject: [PATCH 8336/8469] Rely on pytest-enabler to enable pytest-xdist when present and enabled. --- pyproject.toml | 3 +++ pytest.ini | 3 --- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0bc2a46f4f..4e80bdc1a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,9 @@ addopts = "--flake8" [pytest.enabler.cov] addopts = "--cov" +[pytest.enabler.xdist] +addopts = "-n auto" + [tool.towncrier] package = "setuptools" package_dir = "setuptools" diff --git a/pytest.ini b/pytest.ini index df30b82273..03fc773cf4 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,9 +4,6 @@ addopts= --doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX - - # `pytest-xdist`: - -n auto doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 diff --git a/setup.cfg b/setup.cfg index bda5ab6f1b..36c7daeebc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ testing = pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov pytest-mypy; python_implementation != "PyPy" - pytest-enabler + pytest-enabler >= 1.0.1 # local mock From 3c8e758caa11abe63040058ba136a68d2b620ea3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 17 Jan 2021 21:49:57 -0500 Subject: [PATCH 8337/8469] Avoid indirection in src_dir --- setuptools/tests/fixtures.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 0480033c5b..4a990eb950 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -6,9 +6,6 @@ from . import contexts -SRC_DIR = pathlib.Path(__file__).parents[2] - - @pytest.fixture def user_override(monkeypatch): """ @@ -32,7 +29,7 @@ def tmpdir_cwd(tmpdir): @pytest.fixture def src_dir(): """The project source directory available via fixture.""" - return SRC_DIR + return pathlib.Path(__file__).parents[2] @pytest.fixture From 31b0896bba77f21984dfad5a0b82fcd57bda9658 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 10:30:11 -0500 Subject: [PATCH 8338/8469] Rely on rootdir to determine the source. Avoids coupling with position in the test suite. --- setuptools/tests/fixtures.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index 4a990eb950..d975c0fc5b 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,4 +1,3 @@ -import pathlib import shutil import pytest @@ -27,13 +26,7 @@ def tmpdir_cwd(tmpdir): @pytest.fixture -def src_dir(): - """The project source directory available via fixture.""" - return pathlib.Path(__file__).parents[2] - - -@pytest.fixture -def tmp_src(src_dir, tmp_path): +def tmp_src(request, tmp_path): """Make a copy of the source dir under `$tmp/src`. This fixture is useful whenever it's necessary to run `setup.py` @@ -44,5 +37,5 @@ def tmp_src(src_dir, tmp_path): when they are not being executed sequentially. """ tmp_src_path = tmp_path / 'src' - shutil.copytree(src_dir, tmp_src_path) + shutil.copytree(request.config.rootdir, tmp_src_path) return tmp_src_path From f767b4f59b14aa94d7c085173cb9360ba2d187eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 10:48:38 -0500 Subject: [PATCH 8339/8469] Extract workaround for pytest-dev/pytest-xdist#376 as a fixture. Invoke the repair at the session level and only when xdist is present. --- setuptools/tests/fixtures.py | 19 +++++++++++++++++++ setuptools/tests/test_build_meta.py | 11 ----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index d975c0fc5b..d74b5f031a 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,3 +1,5 @@ +import contextlib +import sys import shutil import pytest @@ -39,3 +41,20 @@ def tmp_src(request, tmp_path): tmp_src_path = tmp_path / 'src' shutil.copytree(request.config.rootdir, tmp_src_path) return tmp_src_path + + +@pytest.fixture(autouse=True, scope="session") +def workaround_xdist_376(request): + """ + Workaround pytest-dev/pytest-xdist#376 + + ``pytest-xdist`` tends to inject '' into ``sys.path``, + which may break certain isolation expectations. + Remove the entry so the import + machinery behaves the same irrespective of xdist. + """ + if not request.config.pluginmanager.has_plugin('xdist'): + return + + with contextlib.suppress(ValueError): + sys.path.remove('') diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 3f1ba0465f..5dee857707 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -1,10 +1,8 @@ import os import shutil -import sys import tarfile import importlib from concurrent import futures -from contextlib import suppress import pytest @@ -46,15 +44,6 @@ def __init__(self, *args, **kwargs): def __call__(self, name, *args, **kw): """Handles aribrary function invocations on the build backend.""" - with suppress(ValueError): - # NOTE: pytest-xdist tends to inject '' into `sys.path` which - # NOTE: may break certain isolation expectations. To address - # NOTE: this, we remove this entry from there so the import - # NOTE: machinery behaves the same as in the default - # NOTE: sequential mode. - # Ref: https://github.com/pytest-dev/pytest-xdist/issues/376 - sys.path.remove('') - os.chdir(self.cwd) os.environ.update(self.env) mod = importlib.import_module(self.backend_name) From daf01571d508234fcff707b1a1156c7496c0c131 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 11:02:06 -0500 Subject: [PATCH 8340/8469] Simplify get_build_backend to simply allow override of cwd. --- setuptools/tests/test_build_meta.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 5dee857707..5331e2f8af 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -11,7 +11,7 @@ class BuildBackendBase: - def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): + def __init__(self, cwd='.', env={}, backend_name='setuptools.build_meta'): self.cwd = cwd self.env = env self.backend_name = backend_name @@ -125,10 +125,8 @@ def run(): class TestBuildMetaBackend: backend_name = 'setuptools.build_meta' - def get_build_backend(self, cwd_path=None): - if cwd_path is None: - cwd_path = '.' - return BuildBackend(cwd=cwd_path, backend_name=self.backend_name) + def get_build_backend(self, **kwargs): + return BuildBackend(backend_name=self.backend_name, **kwargs) @pytest.fixture(params=defns) def build_backend(self, tmpdir, request): @@ -338,7 +336,7 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): def test_build_sdist_relative_path_import(self, tmp_path): build_files(self._relative_path_import_files, prefix=str(tmp_path)) - build_backend = self.get_build_backend(cwd_path=tmp_path) + build_backend = self.get_build_backend(cwd=tmp_path) with pytest.raises(ImportError, match="^No module named 'hello'$"): build_backend.build_sdist(tmp_path / "temp") From 77aefc128699182e5b1271162f0b7c557d81b1d5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 11:22:05 -0500 Subject: [PATCH 8341/8469] Restore test_build_sdist_relative_path_import to its former simple implementation. --- setuptools/tests/test_build_meta.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 5331e2f8af..e117d8e629 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -125,8 +125,8 @@ def run(): class TestBuildMetaBackend: backend_name = 'setuptools.build_meta' - def get_build_backend(self, **kwargs): - return BuildBackend(backend_name=self.backend_name, **kwargs) + def get_build_backend(self): + return BuildBackend(backend_name=self.backend_name) @pytest.fixture(params=defns) def build_backend(self, tmpdir, request): @@ -334,11 +334,11 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): """) } - def test_build_sdist_relative_path_import(self, tmp_path): - build_files(self._relative_path_import_files, prefix=str(tmp_path)) - build_backend = self.get_build_backend(cwd=tmp_path) + def test_build_sdist_relative_path_import(self, tmpdir_cwd): + build_files(self._relative_path_import_files) + build_backend = self.get_build_backend() with pytest.raises(ImportError, match="^No module named 'hello'$"): - build_backend.build_sdist(tmp_path / "temp") + build_backend.build_sdist("temp") @pytest.mark.parametrize('setup_literal, requirements', [ ("'foo'", ['foo']), From 347f7497d9668049b50a26c381dc661c2b641a7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 11:29:28 -0500 Subject: [PATCH 8342/8469] Simplify and enhance tests in test_build_meta. Ref #2459. --- setuptools/tests/test_build_meta.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 6d3a997ee0..e117d8e629 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -11,7 +11,7 @@ class BuildBackendBase: - def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'): + def __init__(self, cwd='.', env={}, backend_name='setuptools.build_meta'): self.cwd = cwd self.env = env self.backend_name = backend_name @@ -126,7 +126,7 @@ class TestBuildMetaBackend: backend_name = 'setuptools.build_meta' def get_build_backend(self): - return BuildBackend(cwd='.', backend_name=self.backend_name) + return BuildBackend(backend_name=self.backend_name) @pytest.fixture(params=defns) def build_backend(self, tmpdir, request): @@ -337,7 +337,7 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): def test_build_sdist_relative_path_import(self, tmpdir_cwd): build_files(self._relative_path_import_files) build_backend = self.get_build_backend() - with pytest.raises(ImportError): + with pytest.raises(ImportError, match="^No module named 'hello'$"): build_backend.build_sdist("temp") @pytest.mark.parametrize('setup_literal, requirements', [ From 3b571b08feda091838f55d6d0ec3a72325264051 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 12:08:11 -0500 Subject: [PATCH 8343/8469] Add changelog. --- changelog.d/2459.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2459.change.rst diff --git a/changelog.d/2459.change.rst b/changelog.d/2459.change.rst new file mode 100644 index 0000000000..3b8d11a9ed --- /dev/null +++ b/changelog.d/2459.change.rst @@ -0,0 +1 @@ +Tests now run in parallel via pytest-xdist, completing in about half the time. Special thanks to :user:`webknjaz` for hard work implementing test isolation. To run without parallelization, disable the plugin with ``tox -- -p no:xdist``. From 8222d6f7b992d3b184434acb31cd66b0f2e41401 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 18 Jan 2021 12:18:26 -0500 Subject: [PATCH 8344/8469] Prefer 'rootdir' for resolving the project root. --- setuptools/tests/test_virtualenv.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index d72dcbd0e5..7aa88b83ff 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -40,9 +40,6 @@ def bare_virtualenv(): yield venv -SOURCE_DIR = os.path.join(os.path.dirname(__file__), '../..') - - def test_clean_env_install(bare_virtualenv, tmp_src): """ Check setuptools can be installed in a clean environment. @@ -113,12 +110,12 @@ def test_pip_upgrade_from_source(pip_version, tmp_src, virtualenv): virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) -def _check_test_command_install_requirements(virtualenv, tmpdir): +def _check_test_command_install_requirements(virtualenv, tmpdir, cwd): """ Check the test command will install all required dependencies. """ # Install setuptools. - virtualenv.run('python setup.py develop', cd=SOURCE_DIR) + virtualenv.run('python setup.py develop', cd=cwd) def sdist(distname, version): dist_path = tmpdir.join('%s-%s.tar.gz' % (distname, version)) @@ -175,7 +172,7 @@ def sdist(distname, version): assert tmpdir.join('success').check() -def test_test_command_install_requirements(virtualenv, tmpdir): +def test_test_command_install_requirements(virtualenv, tmpdir, request): # Ensure pip/wheel packages are installed. virtualenv.run( "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") @@ -183,18 +180,19 @@ def test_test_command_install_requirements(virtualenv, tmpdir): virtualenv.run("python -m pip uninstall -y setuptools") # disable index URL so bits and bobs aren't requested from PyPI virtualenv.env['PIP_NO_INDEX'] = '1' - _check_test_command_install_requirements(virtualenv, tmpdir) + _check_test_command_install_requirements(virtualenv, tmpdir, request.config.rootdir) def test_test_command_install_requirements_when_using_easy_install( - bare_virtualenv, tmpdir): - _check_test_command_install_requirements(bare_virtualenv, tmpdir) + bare_virtualenv, tmpdir, request): + _check_test_command_install_requirements( + bare_virtualenv, tmpdir, request.config.rootdir) -def test_no_missing_dependencies(bare_virtualenv): +def test_no_missing_dependencies(bare_virtualenv, request): """ Quick and dirty test to ensure all external dependencies are vendored. """ for command in ('upload',): # sorted(distutils.command.__all__): - bare_virtualenv.run( - ['python', 'setup.py', command, '-h'], cd=SOURCE_DIR) + cmd = ['python', 'setup.py', command, '-h'] + bare_virtualenv.run(cmd, cd=request.config.rootdir) From 183a306ef87fd15df27dc4327182a944033ea3a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Jan 2021 20:37:26 -0500 Subject: [PATCH 8345/8469] Remove bootstrap and tox-pip and instead rely on pep517. --- bootstrap.py | 57 --------------------------------------- pyproject.toml | 1 - setup.py | 12 --------- tools/tox_pip.py | 70 ------------------------------------------------ tox.ini | 6 ----- 5 files changed, 146 deletions(-) delete mode 100644 bootstrap.py delete mode 100644 tools/tox_pip.py diff --git a/bootstrap.py b/bootstrap.py deleted file mode 100644 index 118671f62c..0000000000 --- a/bootstrap.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -If setuptools is not already installed in the environment, it's not possible -to invoke setuptools' own commands. This routine will bootstrap this local -environment by creating a minimal egg-info directory and then invoking the -egg-info command to flesh out the egg-info directory. -""" - -import os -import sys -import textwrap -import subprocess -import io - - -minimal_egg_info = textwrap.dedent(""" - [distutils.commands] - egg_info = setuptools.command.egg_info:egg_info - - [distutils.setup_keywords] - include_package_data = setuptools.dist:assert_bool - install_requires = setuptools.dist:check_requirements - extras_require = setuptools.dist:check_extras - entry_points = setuptools.dist:check_entry_points - - [egg_info.writers] - PKG-INFO = setuptools.command.egg_info:write_pkg_info - dependency_links.txt = setuptools.command.egg_info:overwrite_arg - entry_points.txt = setuptools.command.egg_info:write_entries - requires.txt = setuptools.command.egg_info:write_requirements - """) - - -def ensure_egg_info(): - if os.path.exists('setuptools.egg-info'): - return - print("adding minimal entry_points") - add_minimal_info() - run_egg_info() - - -def add_minimal_info(): - """ - Build a minimal egg-info, enough to invoke egg_info - """ - - os.mkdir('setuptools.egg-info') - with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep: - ep.write(minimal_egg_info) - - -def run_egg_info(): - cmd = [sys.executable, 'setup.py', 'egg_info'] - print("Regenerating egg_info") - subprocess.check_call(cmd) - - -__name__ == '__main__' and ensure_egg_info() diff --git a/pyproject.toml b/pyproject.toml index 4e80bdc1a7..414ffed581 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] requires = [ - # avoid self install on Python 2; ref #1996 "setuptools >= 40.8; python_version > '3'", "wheel", ] diff --git a/setup.py b/setup.py index 28d3dada34..378fda1487 100755 --- a/setup.py +++ b/setup.py @@ -10,17 +10,6 @@ here = os.path.dirname(__file__) -def require_metadata(): - "Prevent improper installs without necessary metadata. See #659" - egg_info_dir = os.path.join(here, 'setuptools.egg-info') - if not os.path.exists(egg_info_dir): - msg = ( - "Cannot build setuptools without metadata. " - "Run `bootstrap.py`." - ) - raise RuntimeError(msg) - - def read_commands(): command_ns = {} cmd_module_path = 'setuptools/command/__init__.py' @@ -189,5 +178,4 @@ def _restore_install_lib(self): if __name__ == '__main__': # allow setup.py to run from another directory here and os.chdir(here) - require_metadata() dist = setuptools.setup(**setup_params) diff --git a/tools/tox_pip.py b/tools/tox_pip.py deleted file mode 100644 index be2ff1d01d..0000000000 --- a/tools/tox_pip.py +++ /dev/null @@ -1,70 +0,0 @@ -import os -import subprocess -import sys -import re - - -def remove_setuptools(): - """ - Remove setuptools from the current environment. - """ - print("Removing setuptools") - cmd = [sys.executable, '-m', 'pip', 'uninstall', '-y', 'setuptools'] - # set cwd to something other than '.' to avoid detecting - # '.' as the installed package. - subprocess.check_call(cmd, cwd=os.environ['TOX_WORK_DIR']) - - -def bootstrap(): - print("Running bootstrap") - cmd = [sys.executable, '-m', 'bootstrap'] - subprocess.check_call(cmd) - - -def is_install_self(args): - """ - Do the args represent an install of .? - """ - def strip_extras(arg): - match = re.match(r'(.*)?\[.*\]$', arg) - return match.group(1) if match else arg - - return ( - 'install' in args - and any( - arg in ['.', os.getcwd()] - for arg in map(strip_extras, args) - ) - ) - - -def pip(*args): - cmd = [sys.executable, '-m', 'pip'] + list(args) - return subprocess.check_call(cmd) - - -def test_dependencies(): - from ConfigParser import ConfigParser - - def clean(dep): - spec, _, _ = dep.partition('#') - return spec.strip() - - parser = ConfigParser() - parser.read('setup.cfg') - raw = parser.get('options.extras_require', 'tests').split('\n') - return filter(None, map(clean, raw)) - - -def run(args): - os.environ['PIP_USE_PEP517'] = 'true' - - if is_install_self(args): - remove_setuptools() - bootstrap() - - pip(*args) - - -if __name__ == '__main__': - run(sys.argv[1:]) diff --git a/tox.ini b/tox.ini index 8083d8c27b..8ab2b8cf02 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,6 @@ commands = pytest {posargs} usedevelop = True extras = testing -install_command = {[helpers]pip} install {opts} {packages} -list_dependencies_command = {[helpers]pip} freeze --all setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname} passenv = @@ -74,7 +72,3 @@ commands = python -m twine upload dist/* python -m jaraco.develop.create-github-release python -m jaraco.tidelift.publish-release-notes - -[helpers] -# Custom pip behavior -pip = python {toxinidir}/tools/tox_pip.py From 6b628e370caa6cf42faea1253e005881adebf041 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Jan 2021 21:05:31 -0500 Subject: [PATCH 8346/8469] Update changelog. Fixes #1527. --- changelog.d/1527.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1527.breaking.rst diff --git a/changelog.d/1527.breaking.rst b/changelog.d/1527.breaking.rst new file mode 100644 index 0000000000..7eb8a63f73 --- /dev/null +++ b/changelog.d/1527.breaking.rst @@ -0,0 +1 @@ +Removed bootstrap script. Now Setuptools requires pip or another pep517-compliant builder such as 'build' to build. Now Setuptools can be installed from Github main branch. From 71815558fb8cd44028d838b693f2083a3e969c74 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 19 Jan 2021 21:09:54 -0500 Subject: [PATCH 8347/8469] Remove bootstrap from docs build --- docs/conf.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8cb959dfa3..18cd7bdc49 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,11 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import subprocess -import sys -import os - - extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] master_doc = "index" @@ -82,14 +74,6 @@ } -# hack to run the bootstrap script so that jaraco.packaging.sphinx -# can invoke setup.py -'READTHEDOCS' in os.environ and subprocess.check_call( - [sys.executable, '-m', 'bootstrap'], - cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), -) - - # Add support for linking usernames github_url = 'https://github.com' github_sponsors_url = f'{github_url}/sponsors' From fa81391fe65fa727f79f1be73f058e83ffe97193 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jan 2021 21:13:41 -0500 Subject: [PATCH 8348/8469] Remove eggsecutable --- setup.py | 2 -- setuptools/command/bdist_egg.py | 49 ++---------------------------- setuptools/command/easy_install.py | 10 ------ setuptools/tests/test_bdist_egg.py | 15 --------- 4 files changed, 2 insertions(+), 74 deletions(-) diff --git a/setup.py b/setup.py index 28d3dada34..3d84c65ac4 100755 --- a/setup.py +++ b/setup.py @@ -171,8 +171,6 @@ def _restore_install_lib(self): "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], "console_scripts": list(_gen_console_scripts()), - "setuptools.installation": - ['eggsecutable = setuptools.command.easy_install:bootstrap'], }, dependency_links=[ pypi_link( diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 206f2419ba..e6b1609f7b 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -2,7 +2,6 @@ Build .egg distributions""" -from distutils.errors import DistutilsSetupError from distutils.dir_util import remove_tree, mkpath from distutils import log from types import CodeType @@ -11,12 +10,10 @@ import re import textwrap import marshal -import warnings from pkg_resources import get_build_platform, Distribution, ensure_directory -from pkg_resources import EntryPoint from setuptools.extension import Library -from setuptools import Command, SetuptoolsDeprecationWarning +from setuptools import Command from sysconfig import get_path, get_python_version @@ -268,49 +265,7 @@ def zip_safe(self): return analyze_egg(self.bdist_dir, self.stubs) def gen_header(self): - epm = EntryPoint.parse_map(self.distribution.entry_points or '') - ep = epm.get('setuptools.installation', {}).get('eggsecutable') - if ep is None: - return 'w' # not an eggsecutable, do it the usual way. - - warnings.warn( - "Eggsecutables are deprecated and will be removed in a future " - "version.", - SetuptoolsDeprecationWarning - ) - - if not ep.attrs or ep.extras: - raise DistutilsSetupError( - "eggsecutable entry point (%r) cannot have 'extras' " - "or refer to a module" % (ep,) - ) - - pyver = '{}.{}'.format(*sys.version_info) - pkg = ep.module_name - full = '.'.join(ep.attrs) - base = ep.attrs[0] - basename = os.path.basename(self.egg_output) - - header = ( - "#!/bin/sh\n" - 'if [ `basename $0` = "%(basename)s" ]\n' - 'then exec python%(pyver)s -c "' - "import sys, os; sys.path.insert(0, os.path.abspath('$0')); " - "from %(pkg)s import %(base)s; sys.exit(%(full)s())" - '" "$@"\n' - 'else\n' - ' echo $0 is not the correct name for this egg file.\n' - ' echo Please rename it back to %(basename)s and try again.\n' - ' exec false\n' - 'fi\n' - ) % locals() - - if not self.dry_run: - mkpath(os.path.dirname(self.egg_output), dry_run=self.dry_run) - f = open(self.egg_output, 'w') - f.write(header) - f.close() - return 'a' + return 'w' def copy_metadata_to(self, target_dir): "Copy metadata (egg info) to the target_dir" diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f1e487d4d2..544e8fd444 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2284,16 +2284,6 @@ def current_umask(): return tmp -def bootstrap(): - # This function is called when setuptools*.egg is run using /bin/sh - import setuptools - - argv0 = os.path.dirname(setuptools.__path__[0]) - sys.argv[0] = argv0 - sys.argv.append(argv0) - main() - - def main(argv=None, **kw): from setuptools import setup from setuptools.dist import Distribution diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 8760ea304c..fb5b90b1a3 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -7,7 +7,6 @@ import pytest from setuptools.dist import Distribution -from setuptools import SetuptoolsDeprecationWarning from . import contexts @@ -65,17 +64,3 @@ def test_exclude_source_files(self, setup_context, user_override): names = list(zi.filename for zi in zip.filelist) assert 'hi.pyc' in names assert 'hi.py' not in names - - def test_eggsecutable_warning(self, setup_context, user_override): - dist = Distribution(dict( - script_name='setup.py', - script_args=['bdist_egg'], - name='foo', - py_modules=['hi'], - entry_points={ - 'setuptools.installation': - ['eggsecutable = my_package.some_module:main_func']}, - )) - dist.parse_command_line() - with pytest.warns(SetuptoolsDeprecationWarning): - dist.run_commands() From e3e7ff854038788d56d6d7f6624357b81341e876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2021 14:20:57 -0500 Subject: [PATCH 8349/8469] For compatibility, add a bootstrap script with a warning. --- bootstrap.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bootstrap.py diff --git a/bootstrap.py b/bootstrap.py new file mode 100644 index 0000000000..229b996503 --- /dev/null +++ b/bootstrap.py @@ -0,0 +1,7 @@ +import warnings + + +msg = "bootstrap.py is no longer needed. Use a PEP-517-compatible builder instead." + + +__name__ == '__main__' and warnings.warn(msg) From c0660de32f80ad71b3940abcb26b237ca2103876 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2021 19:07:21 -0500 Subject: [PATCH 8350/8469] Update changelog. --- changelog.d/2545.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2545.breaking.rst diff --git a/changelog.d/2545.breaking.rst b/changelog.d/2545.breaking.rst new file mode 100644 index 0000000000..0c69fdf34d --- /dev/null +++ b/changelog.d/2545.breaking.rst @@ -0,0 +1 @@ +Removed support for eggsecutables. From 4b0408a18dcda286af6668b7ef6934e53d1f247c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 20 Jan 2021 21:02:24 -0500 Subject: [PATCH 8351/8469] Remove easy_install script and module. --- easy_install.py | 5 ----- setup.cfg | 1 - setup.py | 17 ----------------- setuptools/tests/test_namespaces.py | 5 +++-- 4 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 easy_install.py diff --git a/easy_install.py b/easy_install.py deleted file mode 100644 index d87e984034..0000000000 --- a/easy_install.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Run the EasyInstall command""" - -if __name__ == '__main__': - from setuptools.command.easy_install import main - main() diff --git a/setup.cfg b/setup.cfg index 36c7daeebc..006851daac 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,6 @@ project_urls = [options] packages = find_namespace: -py_modules = easy_install # disabled as it causes tests to be included #2505 # include_package_data = true python_requires = >=3.6 diff --git a/setup.py b/setup.py index 3d84c65ac4..31eda0fbb0 100755 --- a/setup.py +++ b/setup.py @@ -30,22 +30,6 @@ def read_commands(): return command_ns['__all__'] -def _gen_console_scripts(): - yield "easy_install = setuptools.command.easy_install:main" - - # Gentoo distributions manage the python-version-specific scripts - # themselves, so those platforms define an environment variable to - # suppress the creation of the version-specific scripts. - var_names = ( - 'SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', - 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT', - ) - if any(os.environ.get(var) not in (None, "", "0") for var in var_names): - return - tmpl = "easy_install-{shortver} = setuptools.command.easy_install:main" - yield tmpl.format(shortver='{}.{}'.format(*sys.version_info)) - - package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], ) @@ -170,7 +154,6 @@ def _restore_install_lib(self): "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": list(_gen_console_scripts()), }, dependency_links=[ pypi_link( diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 6c8c522dc0..270f90c98b 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -62,8 +62,9 @@ def test_pkg_resources_import(self, tmpdir): target.mkdir() install_cmd = [ sys.executable, - '-m', 'easy_install', - '-d', str(target), + '-m', 'pip', + 'install', + '-t', str(target), str(pkg), ] with test.test.paths_on_pythonpath([str(target)]): From 2885ca26494e6f555fae85f8f9983c2361c93829 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2021 19:35:27 -0500 Subject: [PATCH 8352/8469] Remove 'main' function from 'easy_install'. --- setuptools/command/easy_install.py | 46 +-------------------------- setuptools/tests/test_easy_install.py | 13 ++++---- 2 files changed, 7 insertions(+), 52 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 544e8fd444..eeb21b5083 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -67,7 +67,7 @@ __all__ = [ 'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg', - 'main', 'get_exe_prefixes', + 'get_exe_prefixes', ] @@ -2284,50 +2284,6 @@ def current_umask(): return tmp -def main(argv=None, **kw): - from setuptools import setup - from setuptools.dist import Distribution - - class DistributionWithoutHelpCommands(Distribution): - common_usage = "" - - def _show_help(self, *args, **kw): - with _patch_usage(): - Distribution._show_help(self, *args, **kw) - - if argv is None: - argv = sys.argv[1:] - - with _patch_usage(): - setup( - script_args=['-q', 'easy_install', '-v'] + argv, - script_name=sys.argv[0] or 'easy_install', - distclass=DistributionWithoutHelpCommands, - **kw - ) - - -@contextlib.contextmanager -def _patch_usage(): - import distutils.core - USAGE = textwrap.dedent(""" - usage: %(script)s [options] requirement_or_url ... - or: %(script)s --help - """).lstrip() - - def gen_usage(script_name): - return USAGE % dict( - script=os.path.basename(script_name), - ) - - saved = distutils.core.gen_usage - distutils.core.gen_usage = gen_usage - try: - yield - finally: - distutils.core.gen_usage = saved - - class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning): """ Warning for EasyInstall deprecations, bypassing suppression. diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 3340a59c24..66598066d7 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -15,6 +15,7 @@ import mock import time import re +import subprocess import pytest @@ -25,7 +26,6 @@ EasyInstallDeprecationWarning, ScriptWriter, PthDistributions, WindowsScriptWriter, ) -from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribution from pkg_resources import normalize_path, working_set from pkg_resources import Distribution as PRDistribution @@ -461,17 +461,16 @@ def test_setup_requires_honors_fetch_params(self, mock_index, monkeypatch): with TestSetupRequires.create_sdist() as dist_file: with contexts.tempdir() as temp_install_dir: with contexts.environment(PYTHONPATH=temp_install_dir): - ei_params = [ + cmd = [ + sys.executable, + '-m', 'setup', + 'easy_install', '--index-url', mock_index.url, '--exclude-scripts', '--install-dir', temp_install_dir, dist_file, ] - with sandbox.save_argv(['easy_install']): - # attempt to install the dist. It should - # fail because it doesn't exist. - with pytest.raises(SystemExit): - easy_install_pkg.main(ei_params) + subprocess.Popen(cmd).wait() # there should have been one requests to the server assert [r.path for r in mock_index.requests] == ['/does-not-exist/'] From 4fb7735edd1cb7e746b7fb25fdba2aca145bde10 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2021 19:48:03 -0500 Subject: [PATCH 8353/8469] Update changelog --- changelog.d/2544.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2544.breaking.rst diff --git a/changelog.d/2544.breaking.rst b/changelog.d/2544.breaking.rst new file mode 100644 index 0000000000..169c41b95e --- /dev/null +++ b/changelog.d/2544.breaking.rst @@ -0,0 +1 @@ +Removed 'easy_install' top-level model (runpy entry point) and 'easy_install' console script. From e1ffc2abbae4f2aa78dd09ee9827d754b7702b7b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 23 Jan 2021 19:49:42 -0500 Subject: [PATCH 8354/8469] =?UTF-8?q?Bump=20version:=2051.3.3=20=E2=86=92?= =?UTF-8?q?=2052.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 15 +++++++++++++++ changelog.d/2459.change.rst | 1 - changelog.d/2537.breaking.rst | 1 - changelog.d/2544.breaking.rst | 1 - changelog.d/2545.breaking.rst | 1 - setup.cfg | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/2459.change.rst delete mode 100644 changelog.d/2537.breaking.rst delete mode 100644 changelog.d/2544.breaking.rst delete mode 100644 changelog.d/2545.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index debcfeeb64..c3bdafab95 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.3.3 +current_version = 52.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index c094960f9a..79941d8efe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,18 @@ +v52.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2537: Remove fallback support for fetch_build_eggs using easy_install. Now pip is required for setup_requires to succeed. +* #2544: Removed 'easy_install' top-level model (runpy entry point) and 'easy_install' console script. +* #2545: Removed support for eggsecutables. + +Changes +^^^^^^^ +* #2459: Tests now run in parallel via pytest-xdist, completing in about half the time. Special thanks to :user:`webknjaz` for hard work implementing test isolation. To run without parallelization, disable the plugin with ``tox -- -p no:xdist``. + + v51.3.3 ------- diff --git a/changelog.d/2459.change.rst b/changelog.d/2459.change.rst deleted file mode 100644 index 3b8d11a9ed..0000000000 --- a/changelog.d/2459.change.rst +++ /dev/null @@ -1 +0,0 @@ -Tests now run in parallel via pytest-xdist, completing in about half the time. Special thanks to :user:`webknjaz` for hard work implementing test isolation. To run without parallelization, disable the plugin with ``tox -- -p no:xdist``. diff --git a/changelog.d/2537.breaking.rst b/changelog.d/2537.breaking.rst deleted file mode 100644 index 184d8e8758..0000000000 --- a/changelog.d/2537.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Remove fallback support for fetch_build_eggs using easy_install. Now pip is required for setup_requires to succeed. diff --git a/changelog.d/2544.breaking.rst b/changelog.d/2544.breaking.rst deleted file mode 100644 index 169c41b95e..0000000000 --- a/changelog.d/2544.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Removed 'easy_install' top-level model (runpy entry point) and 'easy_install' console script. diff --git a/changelog.d/2545.breaking.rst b/changelog.d/2545.breaking.rst deleted file mode 100644 index 0c69fdf34d..0000000000 --- a/changelog.d/2545.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Removed support for eggsecutables. diff --git a/setup.cfg b/setup.cfg index 006851daac..e0c4edc2e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.3.3 +version = 52.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From c121d289da5d19cf6df2bf6b64ac28916a060161 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 1 Feb 2021 10:11:49 -0500 Subject: [PATCH 8355/8469] =?UTF-8?q?Bump=20version:=2052.0.0=20=E2=86=92?= =?UTF-8?q?=2053.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/1527.breaking.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1527.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c3bdafab95..d11952599e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 52.0.0 +current_version = 53.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 79941d8efe..93eae6870c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v53.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #1527: Removed bootstrap script. Now Setuptools requires pip or another pep517-compliant builder such as 'build' to build. Now Setuptools can be installed from Github main branch. + + v52.0.0 ------- diff --git a/changelog.d/1527.breaking.rst b/changelog.d/1527.breaking.rst deleted file mode 100644 index 7eb8a63f73..0000000000 --- a/changelog.d/1527.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Removed bootstrap script. Now Setuptools requires pip or another pep517-compliant builder such as 'build' to build. Now Setuptools can be installed from Github main branch. diff --git a/setup.cfg b/setup.cfg index e0c4edc2e6..14ff445daa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 52.0.0 +version = 53.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 14f91af8370eaa1c7c7c19510aa9d4d5a65c069d Mon Sep 17 00:00:00 2001 From: Pablo Woolvett Date: Thu, 4 Feb 2021 13:59:15 -0300 Subject: [PATCH 8356/8469] docs(userguide): Marker example for extras_require Signed-off-by: Pablo Woolvett --- docs/userguide/declarative_config.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index bc66869b6e..f2e8b81f75 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -243,6 +243,19 @@ data_files dict 40.6.0 **find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3. + Notes: 1. In the ``package_data`` section, a key named with a single asterisk (``*``) refers to all packages, in lieu of the empty string used in ``setup.py``. + +2. In the ``extras_require`` section, values are parsed as ``list-semi``. This implies that in +order to include markers, they **must** be *dangling*: + +.. code-block:: ini + + [options.extras_require] + rest = docutils>=0.3; pack ==1.1, ==1.3 + pdf = + ReportLab>=1.2 + RXP + importlib-metadata; python_version < "3.8" From f957da57a1312d29deea8cc902562b9ac55bcbda Mon Sep 17 00:00:00 2001 From: Pablo Woolvett Date: Thu, 4 Feb 2021 14:04:22 -0300 Subject: [PATCH 8357/8469] newsfragment Signed-off-by: Pablo Woolvett --- changelog.d/2553.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2553.doc.rst diff --git a/changelog.d/2553.doc.rst b/changelog.d/2553.doc.rst new file mode 100644 index 0000000000..51c609616e --- /dev/null +++ b/changelog.d/2553.doc.rst @@ -0,0 +1 @@ +Added userguide example for markers in extras_require -- by :user:`webknjaz` From 65db33b158a377a2d3f74ea28478a66a3097f273 Mon Sep 17 00:00:00 2001 From: pwoolvett Date: Thu, 4 Feb 2021 16:44:53 -0300 Subject: [PATCH 8358/8469] Update 2553.doc.rst --- changelog.d/2553.doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2553.doc.rst b/changelog.d/2553.doc.rst index 51c609616e..fa03329ad9 100644 --- a/changelog.d/2553.doc.rst +++ b/changelog.d/2553.doc.rst @@ -1 +1 @@ -Added userguide example for markers in extras_require -- by :user:`webknjaz` +Added userguide example for markers in extras_require -- by :user:`pwoolvett` From e70c2afc1868a7d9bb2e2887ebf19f6c84dcf283 Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Tue, 9 Feb 2021 09:20:47 +0300 Subject: [PATCH 8359/8469] quickstart: recommend PyPA build instead of pep517.build see https://github.com/pypa/pep517/issues/91 --- docs/conf.py | 5 ++++- docs/userguide/quickstart.rst | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 18cd7bdc49..0a5136b0af 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -73,6 +73,9 @@ ), } +intersphinx_mapping = { + 'pypa-build': ('https://pypa-build.readthedocs.io/en/latest/', None) +} # Add support for linking usernames github_url = 'https://github.com' @@ -80,7 +83,7 @@ extlinks = { 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 } -extensions += ['sphinx.ext.extlinks'] +extensions += ['sphinx.ext.extlinks', 'sphinx.ext.intersphinx'] # Be strict about any broken references: nitpicky = True diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 1d557d47bd..e7594ba33e 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -59,11 +59,11 @@ This is what your project would look like:: setup.cfg mypackage/__init__.py -Then, you need an installer, such as `pep517 `_ -which you can obtain via ``pip install pep517``. After downloading it, invoke +Then, you need an installer, such as :std:doc:`PyPA build ` +which you can obtain via ``pip install build``. After downloading it, invoke the installer:: - python -m pep517.build . + python -m build You now have your distribution ready (e.g. a ``tar.gz`` file and a ``.whl`` file in the ``dist`` directory), which you can upload to PyPI! From 51298a2cc4faa7253e9fe41d7a9574cf9aac997c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 9 Feb 2021 23:08:58 -0500 Subject: [PATCH 8360/8469] Normalize indentation --- setup.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 106763e3d9..8df8d273a3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,9 +23,9 @@ setup_requires = setuptools_scm[toml] >= 3.4.1 [options.packages.find] exclude = - build* - docs* - tests* + build* + docs* + tests* [options.extras_require] testing = From cb00954729e1deaef431697bae8b8a6a7198c2ce Mon Sep 17 00:00:00 2001 From: Simone Pierazzini Date: Thu, 18 Feb 2021 06:40:17 +0100 Subject: [PATCH 8361/8469] Correctly parse cmdclass in setup.cfg. Fixes #2570 --- changelog.d/2570.change.rst | 1 + setuptools/config.py | 17 +++++++++++++++++ setuptools/tests/test_config.py | 24 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 changelog.d/2570.change.rst diff --git a/changelog.d/2570.change.rst b/changelog.d/2570.change.rst new file mode 100644 index 0000000000..165089ed31 --- /dev/null +++ b/changelog.d/2570.change.rst @@ -0,0 +1 @@ +Correctly parse cmdclass in setup.cfg. diff --git a/setuptools/config.py b/setuptools/config.py index af3a3bcbd5..4a6cd4694b 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -574,6 +574,7 @@ def parsers(self): parse_list_semicolon = partial(self._parse_list, separator=';') parse_bool = self._parse_bool parse_dict = self._parse_dict + parse_cmdclass = self._parse_cmdclass return { 'zip_safe': parse_bool, @@ -594,6 +595,22 @@ def parsers(self): 'entry_points': self._parse_file, 'py_modules': parse_list, 'python_requires': SpecifierSet, + 'cmdclass': parse_cmdclass, + } + + def _parse_cmdclass(self, value): + def resolve_class(qualified_class_name): + idx = qualified_class_name.rfind('.') + class_name = qualified_class_name[idx+1:] + pkg_name = qualified_class_name[:idx] + + module = __import__(pkg_name) + + return getattr(module, class_name) + + return { + k: resolve_class(v) + for k, v in self._parse_dict(value).items() } def _parse_packages(self, value): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 1dee12718f..16892cb134 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,3 +1,6 @@ +import types +import sys + import contextlib import configparser @@ -7,6 +10,7 @@ from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration +from distutils.core import Command from .textwrap import DALS @@ -853,6 +857,26 @@ def test_python_requires_invalid(self, tmpdir): with get_dist(tmpdir) as dist: dist.parse_config_files() + def test_cmdclass(self, tmpdir): + class CustomCmd(Command): + pass + + m = types.ModuleType('custom_build', 'test package') + + m.__dict__['CustomCmd'] = CustomCmd + + sys.modules['custom_build'] = m + + fake_env( + tmpdir, + '[options]\n' + 'cmdclass =\n' + ' customcmd = custom_build.CustomCmd\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.cmdclass == {'customcmd': CustomCmd} + saved_dist_init = _Distribution.__init__ From 37a6284c9fcd71a3d4b2fe5dbc802fcf5cbe0786 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Thu, 18 Feb 2021 23:02:29 -0500 Subject: [PATCH 8362/8469] Fix sphinx upload_docs --- setup.cfg | 1 + setuptools/command/upload_docs.py | 7 +++- setuptools/tests/requirements.txt | 1 + setuptools/tests/test_sphinx_upload_docs.py | 42 +++++++++++++++++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 setuptools/tests/test_sphinx_upload_docs.py diff --git a/setup.cfg b/setup.cfg index e0c4edc2e6..3368d88dfa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,7 @@ testing = pip>=19.1 # For proper file:// URLs support. jaraco.envs pytest-xdist + sphinx docs = # Keep these in sync with docs/requirements.txt diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 2559458a1d..95383319ef 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -2,7 +2,7 @@ """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to -PyPI's pythonhosted.org). +sites other than PyPi such as devpi). """ from base64 import standard_b64encode @@ -59,7 +59,10 @@ def finalize_options(self): if self.upload_dir is None: if self.has_sphinx(): build_sphinx = self.get_finalized_command('build_sphinx') - self.target_dir = build_sphinx.builder_target_dir + for (builder, builder_dir) in build_sphinx.builder_target_dirs: + if builder == "html": + self.target_dir = builder_dir + break else: build = self.get_finalized_command('build') self.target_dir = os.path.join(build.build_base, 'docs') diff --git a/setuptools/tests/requirements.txt b/setuptools/tests/requirements.txt index d0d07f70c0..b2d84a941e 100644 --- a/setuptools/tests/requirements.txt +++ b/setuptools/tests/requirements.txt @@ -11,3 +11,4 @@ paver; python_version>="3.6" futures; python_version=="2.7" pip>=19.1 # For proper file:// URLs support. jaraco.envs +sphinx diff --git a/setuptools/tests/test_sphinx_upload_docs.py b/setuptools/tests/test_sphinx_upload_docs.py new file mode 100644 index 0000000000..4287b00e4e --- /dev/null +++ b/setuptools/tests/test_sphinx_upload_docs.py @@ -0,0 +1,42 @@ +import pytest +import os + +from setuptools.command.upload_docs import upload_docs +from setuptools.dist import Distribution + + +@pytest.fixture +def sphinx_doc_sample_project(tmpdir_cwd): + # setup.py + with open('setup.py', 'wt') as f: + f.write('from setuptools import setup; setup()\n') + + os.makedirs('build/docs') + + # A test conf.py for Sphinx + with open('build/docs/conf.py', 'w') as f: + f.write("project = 'test'") + + # A test index.rst for Sphinx + with open('build/docs/index.rst', 'w') as f: + f.write(".. toctree::\ + :maxdepth: 2\ + :caption: Contents:") + + +@pytest.mark.usefixtures('sphinx_doc_sample_project') +@pytest.mark.usefixtures('user_override') +class TestSphinxUploadDocs: + def test_sphinx_doc(self): + params = dict( + name='foo', + packages=['test'], + ) + dist = Distribution(params) + + cmd = upload_docs(dist) + + cmd.initialize_options() + assert cmd.upload_dir is None + assert cmd.has_sphinx() is True + cmd.finalize_options() From df9ff438af59bc90c2f37a4180d1560d2ebca541 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Fri, 19 Feb 2021 19:26:28 -0500 Subject: [PATCH 8363/8469] Add changelog --- changelog.d/2573.change.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/2573.change.rst diff --git a/changelog.d/2573.change.rst b/changelog.d/2573.change.rst new file mode 100644 index 0000000000..b06bd8c954 --- /dev/null +++ b/changelog.d/2573.change.rst @@ -0,0 +1,2 @@ +Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used. +Note: :code:`upload_docs` is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li` \ No newline at end of file From 4d72bbd3906ea609cce5e5ed8b89b379ae8d65e7 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Fri, 19 Feb 2021 20:59:24 -0500 Subject: [PATCH 8364/8469] Update fix and documentation --- setuptools/command/upload_docs.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 95383319ef..845bff4421 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -31,7 +31,7 @@ class upload_docs(upload): # supported by Warehouse (and won't be). DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi/' - description = 'Upload documentation to PyPI' + description = 'Upload documentation to sites other than PyPi such as devpi' user_options = [ ('repository=', 'r', @@ -59,10 +59,7 @@ def finalize_options(self): if self.upload_dir is None: if self.has_sphinx(): build_sphinx = self.get_finalized_command('build_sphinx') - for (builder, builder_dir) in build_sphinx.builder_target_dirs: - if builder == "html": - self.target_dir = builder_dir - break + self.target_dir = dict(build_sphinx.builder_target_dirs)['html'] else: build = self.get_finalized_command('build') self.target_dir = os.path.join(build.build_base, 'docs') @@ -70,7 +67,7 @@ def finalize_options(self): self.ensure_dirname('upload_dir') self.target_dir = self.upload_dir if 'pypi.python.org' in self.repository: - log.warn("Upload_docs command is deprecated. Use RTD instead.") + log.warn("Upload_docs command is deprecated for PyPi. Use RTD instead.") self.announce('Using upload directory %s' % self.target_dir) def create_zipfile(self, filename): From ba68d13940659709fff8035e17bef7ae7c574618 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Fri, 19 Feb 2021 20:59:58 -0500 Subject: [PATCH 8365/8469] Update sphinx upload_docs test --- setuptools/tests/test_sphinx_upload_docs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setuptools/tests/test_sphinx_upload_docs.py b/setuptools/tests/test_sphinx_upload_docs.py index 4287b00e4e..a48ba7f8b3 100644 --- a/setuptools/tests/test_sphinx_upload_docs.py +++ b/setuptools/tests/test_sphinx_upload_docs.py @@ -25,7 +25,6 @@ def sphinx_doc_sample_project(tmpdir_cwd): @pytest.mark.usefixtures('sphinx_doc_sample_project') -@pytest.mark.usefixtures('user_override') class TestSphinxUploadDocs: def test_sphinx_doc(self): params = dict( From 5c57b5cc1e1d247fec64858d8cc4e93b5ffb11a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Feb 2021 12:31:39 -0500 Subject: [PATCH 8366/8469] Switch to jaraco.path for building files --- setup.cfg | 1 + setuptools/tests/files.py | 38 --------------------------- setuptools/tests/test_build_ext.py | 5 ++-- setuptools/tests/test_build_meta.py | 26 +++++++++--------- setuptools/tests/test_easy_install.py | 4 +-- setuptools/tests/test_egg_info.py | 26 +++++++++--------- setuptools/tests/test_glob.py | 5 ++-- setuptools/tests/test_wheel.py | 4 +-- 8 files changed, 36 insertions(+), 73 deletions(-) delete mode 100644 setuptools/tests/files.py diff --git a/setup.cfg b/setup.cfg index e0c4edc2e6..2158905b18 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,7 @@ testing = pip>=19.1 # For proper file:// URLs support. jaraco.envs pytest-xdist + jaraco.path docs = # Keep these in sync with docs/requirements.txt diff --git a/setuptools/tests/files.py b/setuptools/tests/files.py deleted file mode 100644 index 71194b9de0..0000000000 --- a/setuptools/tests/files.py +++ /dev/null @@ -1,38 +0,0 @@ -import os - - -def build_files(file_defs, prefix=""): - """ - Build a set of files/directories, as described by the - file_defs dictionary. - - Each key/value pair in the dictionary is interpreted as - a filename/contents - pair. If the contents value is a dictionary, a directory - is created, and the - dictionary interpreted as the files within it, recursively. - - For example: - - {"README.txt": "A README file", - "foo": { - "__init__.py": "", - "bar": { - "__init__.py": "", - }, - "baz.py": "# Some code", - } - } - """ - for name, contents in file_defs.items(): - full_name = os.path.join(prefix, name) - if isinstance(contents, dict): - os.makedirs(full_name, exist_ok=True) - build_files(contents, prefix=full_name) - else: - if isinstance(contents, bytes): - with open(full_name, 'wb') as f: - f.write(contents) - else: - with open(full_name, 'w') as f: - f.write(contents) diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 838fdb4299..be03893a1b 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -2,12 +2,13 @@ import distutils.command.build_ext as orig from distutils.sysconfig import get_config_var +from jaraco import path + from setuptools.command.build_ext import build_ext, get_abi3_suffix from setuptools.dist import Distribution from setuptools.extension import Extension from . import environment -from .files import build_files from .textwrap import DALS @@ -106,7 +107,7 @@ def test_build_ext_config_handling(tmpdir_cwd): build-base = foo_build """), } - build_files(files) + path.build(files) code, output = environment.run_setup_py( cmd=['build'], data_stream=(0, 2), ) diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index e117d8e629..f33a69688d 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -5,8 +5,8 @@ from concurrent import futures import pytest +from jaraco import path -from .files import build_files from .textwrap import DALS @@ -130,7 +130,7 @@ def get_build_backend(self): @pytest.fixture(params=defns) def build_backend(self, tmpdir, request): - build_files(request.param, prefix=str(tmpdir)) + path.build(request.param, prefix=str(tmpdir)) with tmpdir.as_cwd(): yield self.get_build_backend() @@ -170,7 +170,7 @@ def test_build_with_existing_file_present(self, build_type, tmpdir_cwd): """), } - build_files(files) + path.build(files) dist_dir = os.path.abspath('preexisting-' + build_type) @@ -262,7 +262,7 @@ def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd): build-backend = "setuptools.build_meta """), } - build_files(files) + path.build(files) build_backend = self.get_build_backend() targz_path = build_backend.build_sdist("temp") with tarfile.open(os.path.join("temp", targz_path)) as tar: @@ -271,7 +271,7 @@ def test_build_sdist_pyproject_toml_exists(self, tmpdir_cwd): def test_build_sdist_setup_py_exists(self, tmpdir_cwd): # If build_sdist is called from a script other than setup.py, # ensure setup.py is included - build_files(defns[0]) + path.build(defns[0]) build_backend = self.get_build_backend() targz_path = build_backend.build_sdist("temp") @@ -293,7 +293,7 @@ def test_build_sdist_setup_py_manifest_excluded(self, tmpdir_cwd): """) } - build_files(files) + path.build(files) build_backend = self.get_build_backend() targz_path = build_backend.build_sdist("temp") @@ -315,7 +315,7 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): """) } - build_files(files) + path.build(files) build_backend = self.get_build_backend() build_backend.build_sdist("temp") @@ -335,7 +335,7 @@ def test_build_sdist_builds_targz_even_if_zip_indicated(self, tmpdir_cwd): } def test_build_sdist_relative_path_import(self, tmpdir_cwd): - build_files(self._relative_path_import_files) + path.build(self._relative_path_import_files) build_backend = self.get_build_backend() with pytest.raises(ImportError, match="^No module named 'hello'$"): build_backend.build_sdist("temp") @@ -374,7 +374,7 @@ def run(): """), } - build_files(files) + path.build(files) build_backend = self.get_build_backend() @@ -409,7 +409,7 @@ def run(): """), } - build_files(files) + path.build(files) build_backend = self.get_build_backend() @@ -437,7 +437,7 @@ def run(): } def test_sys_argv_passthrough(self, tmpdir_cwd): - build_files(self._sys_argv_0_passthrough) + path.build(self._sys_argv_0_passthrough) build_backend = self.get_build_backend() with pytest.raises(AssertionError): build_backend.build_sdist("temp") @@ -449,13 +449,13 @@ class TestBuildMetaLegacyBackend(TestBuildMetaBackend): # build_meta_legacy-specific tests def test_build_sdist_relative_path_import(self, tmpdir_cwd): # This must fail in build_meta, but must pass in build_meta_legacy - build_files(self._relative_path_import_files) + path.build(self._relative_path_import_files) build_backend = self.get_build_backend() build_backend.build_sdist("temp") def test_sys_argv_passthrough(self, tmpdir_cwd): - build_files(self._sys_argv_0_passthrough) + path.build(self._sys_argv_0_passthrough) build_backend = self.get_build_backend() build_backend.build_sdist("temp") diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index 66598066d7..a3b2d6e66c 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -18,6 +18,7 @@ import subprocess import pytest +from jaraco import path from setuptools import sandbox from setuptools.sandbox import run_setup @@ -34,7 +35,6 @@ import pkg_resources from . import contexts -from .files import build_files from .textwrap import DALS @@ -794,7 +794,7 @@ def test_setup_requires_with_transitive_extra_dependency( # Create source tree for `dep`. dep_pkg = os.path.join(temp_dir, 'dep') os.mkdir(dep_pkg) - build_files({ + path.build({ 'setup.py': DALS(""" import setuptools diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 1047468b18..5dfad7e269 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -6,15 +6,15 @@ import stat import time +import pytest +from jaraco import path + from setuptools.command.egg_info import ( egg_info, manifest_maker, EggInfoDeprecationWarning, get_pkg_info_revision, ) from setuptools.dist import Distribution -import pytest - from . import environment -from .files import build_files from .textwrap import DALS from . import contexts @@ -37,7 +37,7 @@ class TestEggInfo: """) def _create_project(self): - build_files({ + path.build({ 'setup.py': self.setup_script, 'hello.py': DALS(""" def run(): @@ -56,7 +56,7 @@ def env(self): for dirname in subs ) list(map(os.mkdir, env.paths.values())) - build_files({ + path.build({ env.paths['home']: { '.pydistutils.cfg': DALS(""" [egg_info] @@ -106,7 +106,7 @@ def test_egg_info_save_version_info_setup_defaults(self, tmpdir_cwd, env): the file should remain unchanged. """ setup_cfg = os.path.join(env.paths['home'], 'setup.cfg') - build_files({ + path.build({ setup_cfg: DALS(""" [egg_info] tag_build = @@ -159,7 +159,7 @@ def test_license_is_a_string(self, tmpdir_cwd, env): setup() """) - build_files({'setup.py': setup_script, + path.build({'setup.py': setup_script, 'setup.cfg': setup_config}) # This command should fail with a ValueError, but because it's @@ -193,7 +193,7 @@ def test_rebuilt(self, tmpdir_cwd, env): def test_manifest_template_is_read(self, tmpdir_cwd, env): self._create_project() - build_files({ + path.build({ 'MANIFEST.in': DALS(""" recursive-include docs *.rst """), @@ -216,7 +216,7 @@ def _setup_script_with_requires(self, requires, use_setup_cfg=False): ''' ) % ('' if use_setup_cfg else requires) setup_config = requires if use_setup_cfg else '' - build_files({'setup.py': setup_script, + path.build({'setup.py': setup_script, 'setup.cfg': setup_config}) mismatch_marker = "python_version<'{this_ver}'".format( @@ -546,7 +546,7 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): def test_setup_cfg_license_file( self, tmpdir_cwd, env, files, license_in_sources): self._create_project() - build_files(files) + path.build(files) environment.run_setup_py( cmd=['egg_info'], @@ -645,7 +645,7 @@ def test_setup_cfg_license_file( def test_setup_cfg_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): self._create_project() - build_files(files) + path.build(files) environment.run_setup_py( cmd=['egg_info'], @@ -750,7 +750,7 @@ def test_setup_cfg_license_files( def test_setup_cfg_license_file_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): self._create_project() - build_files(files) + path.build(files) environment.run_setup_py( cmd=['egg_info'], @@ -886,7 +886,7 @@ def _run_egg_info_command(self, tmpdir_cwd, env, cmd=None, output=None): def test_egg_info_tag_only_once(self, tmpdir_cwd, env): self._create_project() - build_files({ + path.build({ 'setup.cfg': DALS(""" [egg_info] tag_build = dev diff --git a/setuptools/tests/test_glob.py b/setuptools/tests/test_glob.py index a0728c5d12..e99587f568 100644 --- a/setuptools/tests/test_glob.py +++ b/setuptools/tests/test_glob.py @@ -1,9 +1,8 @@ import pytest +from jaraco import path from setuptools.glob import glob -from .files import build_files - @pytest.mark.parametrize('tree, pattern, matches', ( ('', b'', []), @@ -31,5 +30,5 @@ )) def test_glob(monkeypatch, tmpdir, tree, pattern, matches): monkeypatch.chdir(tmpdir) - build_files({name: '' for name in tree.split()}) + path.build({name: '' for name in tree.split()}) assert list(sorted(glob(pattern))) == list(sorted(matches)) diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index e56eac14d1..7345b135fd 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -15,6 +15,7 @@ import zipfile import pytest +from jaraco import path from pkg_resources import Distribution, PathMetadata, PY_MAJOR from setuptools.extern.packaging.utils import canonicalize_name @@ -22,7 +23,6 @@ from setuptools.wheel import Wheel from .contexts import tempdir -from .files import build_files from .textwrap import DALS @@ -91,7 +91,7 @@ def build_wheel(extra_file_defs=None, **kwargs): if extra_file_defs: file_defs.update(extra_file_defs) with tempdir() as source_dir: - build_files(file_defs, source_dir) + path.build(file_defs, source_dir) subprocess.check_call((sys.executable, 'setup.py', '-q', 'bdist_wheel'), cwd=source_dir) yield glob.glob(os.path.join(source_dir, 'dist', '*.whl'))[0] From 346d98c700e2048bc7667970f23694d17d2c5642 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Feb 2021 12:32:25 -0500 Subject: [PATCH 8367/8469] =?UTF-8?q?=F0=9F=91=B9=20Feed=20the=20hobgoblin?= =?UTF-8?q?s=20(delint).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setuptools/tests/test_egg_info.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 5dfad7e269..bf95b03ce6 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -159,8 +159,10 @@ def test_license_is_a_string(self, tmpdir_cwd, env): setup() """) - path.build({'setup.py': setup_script, - 'setup.cfg': setup_config}) + path.build({ + 'setup.py': setup_script, + 'setup.cfg': setup_config, + }) # This command should fail with a ValueError, but because it's # currently configured to use a subprocess, the actual traceback @@ -216,8 +218,10 @@ def _setup_script_with_requires(self, requires, use_setup_cfg=False): ''' ) % ('' if use_setup_cfg else requires) setup_config = requires if use_setup_cfg else '' - path.build({'setup.py': setup_script, - 'setup.cfg': setup_config}) + path.build({ + 'setup.py': setup_script, + 'setup.cfg': setup_config, + }) mismatch_marker = "python_version<'{this_ver}'".format( this_ver=sys.version_info[0], From 23cae26198fdda29e75cd0c1076ad601b0532d6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Feb 2021 12:40:33 -0500 Subject: [PATCH 8368/8469] Pin minimum jaraco.path version Co-authored-by: Benoit Pierre --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 2158905b18..a3b9ca1b73 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,7 +58,7 @@ testing = pip>=19.1 # For proper file:// URLs support. jaraco.envs pytest-xdist - jaraco.path + jaraco.path>=3.2.0 docs = # Keep these in sync with docs/requirements.txt From 9be50723119ba4a636364b4dc17912f94d4632ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Feb 2021 12:53:32 -0500 Subject: [PATCH 8369/8469] Use path builder in upload_docs tests. --- setuptools/tests/test_sphinx_upload_docs.py | 27 ++++++++---------- setuptools/tests/test_upload_docs.py | 31 ++++++++------------- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/setuptools/tests/test_sphinx_upload_docs.py b/setuptools/tests/test_sphinx_upload_docs.py index a48ba7f8b3..cc5b8293bf 100644 --- a/setuptools/tests/test_sphinx_upload_docs.py +++ b/setuptools/tests/test_sphinx_upload_docs.py @@ -1,5 +1,6 @@ import pytest -import os + +from jaraco import path from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution @@ -7,21 +8,17 @@ @pytest.fixture def sphinx_doc_sample_project(tmpdir_cwd): - # setup.py - with open('setup.py', 'wt') as f: - f.write('from setuptools import setup; setup()\n') - - os.makedirs('build/docs') - - # A test conf.py for Sphinx - with open('build/docs/conf.py', 'w') as f: - f.write("project = 'test'") - - # A test index.rst for Sphinx - with open('build/docs/index.rst', 'w') as f: - f.write(".. toctree::\ + path.build({ + 'setup.py': 'from setuptools import setup; setup()', + 'build': { + 'docs': { + 'conf.py': 'project="test"', + 'index.rst': ".. toctree::\ :maxdepth: 2\ - :caption: Contents:") + :caption: Contents:", + }, + }, + }) @pytest.mark.usefixtures('sphinx_doc_sample_project') diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index a26e32a61d..55978aadc7 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -3,6 +3,7 @@ import contextlib import pytest +from jaraco import path from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution @@ -10,28 +11,20 @@ from .textwrap import DALS from . import contexts -SETUP_PY = DALS( - """ - from setuptools import setup - - setup(name='foo') - """) - @pytest.fixture def sample_project(tmpdir_cwd): - # setup.py - with open('setup.py', 'wt') as f: - f.write(SETUP_PY) - - os.mkdir('build') - - # A test document. - with open('build/index.html', 'w') as f: - f.write("Hello world.") - - # An empty folder. - os.mkdir('build/empty') + path.build({ + 'setup.py': DALS(""" + from setuptools import setup + + setup(name='foo') + """), + 'build': { + 'index.html': 'Hello world.', + 'empty': {}, + } + }) @pytest.mark.usefixtures('sample_project') From ea9c5778539b73db8d366a7544d2d314cb85f1ed Mon Sep 17 00:00:00 2001 From: Thea Date: Sat, 20 Feb 2021 21:23:48 +0100 Subject: [PATCH 8370/8469] Include link to new developer guide in the old one --- docs/setuptools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.rst b/docs/setuptools.rst index 05516a4e31..e6fa7a69e7 100644 --- a/docs/setuptools.rst +++ b/docs/setuptools.rst @@ -54,7 +54,7 @@ Feature Highlights: Developer's Guide ----------------- - +The developer's guide has been updated. See the `most recent version. `_ From 65f727e9a695947d8013c952b4defde6789e2ff7 Mon Sep 17 00:00:00 2001 From: Thea Date: Sat, 20 Feb 2021 22:11:06 +0100 Subject: [PATCH 8371/8469] Use :doc: instead of direct link --- docs/setuptools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.rst b/docs/setuptools.rst index e6fa7a69e7..761fc722d2 100644 --- a/docs/setuptools.rst +++ b/docs/setuptools.rst @@ -54,7 +54,7 @@ Feature Highlights: Developer's Guide ----------------- -The developer's guide has been updated. See the `most recent version. `_ +The developer's guide has been updated. See the :doc:`most recent version `. From 869e223f903678775e6903bf8f6ca9b6cc805977 Mon Sep 17 00:00:00 2001 From: Thea Date: Sat, 20 Feb 2021 22:32:29 +0100 Subject: [PATCH 8372/8469] Reference index in the userguide directory --- docs/setuptools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setuptools.rst b/docs/setuptools.rst index e6fa7a69e7..541bec515a 100644 --- a/docs/setuptools.rst +++ b/docs/setuptools.rst @@ -54,7 +54,7 @@ Feature Highlights: Developer's Guide ----------------- -The developer's guide has been updated. See the `most recent version. `_ +The developer's guide has been updated. See the :doc:`most recent version `. From 743af7249d56e55a7c2c5f3111958ceee008d8ea Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Feb 2021 13:04:46 -0500 Subject: [PATCH 8373/8469] Exclude dist from discovered packages. Fixes jaraco/skeleton#46. --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 8df8d273a3..af246415cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,7 @@ setup_requires = setuptools_scm[toml] >= 3.4.1 [options.packages.find] exclude = build* + dist* docs* tests* From 38fff62edb5e282f144dc77cc1bf5555367336d9 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Sat, 6 Feb 2021 23:03:13 +0300 Subject: [PATCH 8374/8469] Added an .editorconfig. Pull request jaraco/skeleton#43. --- .editorconfig | 15 +++++++++++++++ pytest.ini | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..6385b57343 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +indent_style = tab +indent_size = 4 +insert_final_newline = true +end_of_line = lf + +[*.py] +indent_style = space + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/pytest.ini b/pytest.ini index d7f0b11559..016063b546 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,5 +5,5 @@ doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 filterwarnings= - # https://github.com/pytest-dev/pytest/issues/6928 - ignore:direct construction of .*Item has been deprecated:DeprecationWarning + # https://github.com/pytest-dev/pytest/issues/6928 + ignore:direct construction of .*Item has been deprecated:DeprecationWarning From 5e416793c008c5ef285c37828072fbea5ced6d08 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Feb 2021 21:34:35 -0500 Subject: [PATCH 8375/8469] It's no longer necessary to filter this warning and it's not a warning anymore. --- pytest.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 016063b546..6bf69af142 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,5 +5,3 @@ doctest_optionflags=ALLOW_UNICODE ELLIPSIS # workaround for warning pytest-dev/pytest#6178 junit_family=xunit2 filterwarnings= - # https://github.com/pytest-dev/pytest/issues/6928 - ignore:direct construction of .*Item has been deprecated:DeprecationWarning From d9a13c77ce2a3efea70c97d219ca4335c0f03c40 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Feb 2021 21:36:53 -0500 Subject: [PATCH 8376/8469] Bump minimum pytest --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index af246415cf..81f70eeab7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,7 @@ exclude = [options.extras_require] testing = # upstream - pytest >= 3.5, !=3.7.3 + pytest >= 4.6 pytest-checkdocs >= 1.2.3 pytest-flake8 pytest-black >= 0.3.7; python_implementation != "PyPy" From 21b122e06969a9d85c65ce8276519d34da7dc747 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 23 Feb 2021 21:23:35 -0500 Subject: [PATCH 8377/8469] Preserve case-sensitive keys in setup.cfg --- setuptools/dist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 050388de16..c31020f0c4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -583,6 +583,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 self.announce("Distribution.parse_config_files():") parser = ConfigParser() + parser.optionxform = str for filename in filenames: with io.open(filename, encoding='utf-8') as reader: if DEBUG: From 90d8740c353ddf20c1c76d8c06cd923c19b8cc84 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 23 Feb 2021 21:06:55 -0500 Subject: [PATCH 8378/8469] Add case-sensitive entry point name test --- setuptools/tests/test_config.py | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 1dee12718f..6cc1d0a46b 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -802,6 +802,40 @@ def test_entry_points(self, tmpdir): with get_dist(tmpdir) as dist: assert dist.entry_points == expected + def test_case_sensitive_entry_points(self, tmpdir): + _, config = fake_env( + tmpdir, + '[options.entry_points]\n' + 'GROUP1 = point1 = pack.module:func, ' + '.point2 = pack.module2:func_rest [rest]\n' + 'group2 = point3 = pack.module:func2\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.entry_points == { + 'GROUP1': [ + 'point1 = pack.module:func', + '.point2 = pack.module2:func_rest [rest]', + ], + 'group2': ['point3 = pack.module:func2'] + } + + expected = ( + '[blogtool.parsers]\n' + '.rst = some.nested.module:SomeClass.some_classmethod[reST]\n' + ) + + tmpdir.join('entry_points').write(expected) + + # From file. + config.write( + '[options]\n' + 'entry_points = file: entry_points\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.entry_points == expected + def test_data_files(self, tmpdir): fake_env( tmpdir, From 39659040bda0664ee08588ecd2faa41b4ea406a1 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Wed, 24 Feb 2021 00:31:16 -0500 Subject: [PATCH 8379/8469] Add change note --- changelog.d/1937.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1937.breaking.rst diff --git a/changelog.d/1937.breaking.rst b/changelog.d/1937.breaking.rst new file mode 100644 index 0000000000..94dc739ab6 --- /dev/null +++ b/changelog.d/1937.breaking.rst @@ -0,0 +1 @@ +Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser -- by :user:`melissa-kun-li` \ No newline at end of file From 3dd8e559112d2b2af58caed77a105be7e925f1c4 Mon Sep 17 00:00:00 2001 From: Thea Date: Wed, 24 Feb 2021 23:12:59 +0100 Subject: [PATCH 8380/8469] Add ini to display code block in doc --- docs/userguide/entry_point.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 738207282c..63d30a4893 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -64,7 +64,7 @@ After installing the package, a user may invoke that function by simply calling The syntax for entry points is specified as follows: -.. code-block:: +.. code-block:: ini = [.[.]][:.] From 7f3e6d688e5ff080ee6bd7ccc6bd81a87c05cfd7 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Wed, 24 Feb 2021 23:57:59 -0500 Subject: [PATCH 8381/8469] Update test for case-sensitive entry point names --- setuptools/tests/test_config.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 6cc1d0a46b..649075609a 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -820,22 +820,6 @@ def test_case_sensitive_entry_points(self, tmpdir): 'group2': ['point3 = pack.module:func2'] } - expected = ( - '[blogtool.parsers]\n' - '.rst = some.nested.module:SomeClass.some_classmethod[reST]\n' - ) - - tmpdir.join('entry_points').write(expected) - - # From file. - config.write( - '[options]\n' - 'entry_points = file: entry_points\n' - ) - - with get_dist(tmpdir) as dist: - assert dist.entry_points == expected - def test_data_files(self, tmpdir): fake_env( tmpdir, From 11529db0de4081404b37fab17711660faa85abb8 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Thu, 25 Feb 2021 00:00:23 -0500 Subject: [PATCH 8382/8469] Update change log --- changelog.d/1937.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1937.change.rst diff --git a/changelog.d/1937.change.rst b/changelog.d/1937.change.rst new file mode 100644 index 0000000000..acd4305968 --- /dev/null +++ b/changelog.d/1937.change.rst @@ -0,0 +1 @@ +Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE: Any projects relying on case-insensitivity will need to adapt to accept the original case as published. -- by :user:`melissa-kun-li` \ No newline at end of file From 898a0b59427f143efe0bcc0cabf69007fb3ee439 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Feb 2021 08:57:04 -0500 Subject: [PATCH 8383/8469] Remove 'breaking' changelog, superseded by 'change'. --- changelog.d/1937.breaking.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog.d/1937.breaking.rst diff --git a/changelog.d/1937.breaking.rst b/changelog.d/1937.breaking.rst deleted file mode 100644 index 94dc739ab6..0000000000 --- a/changelog.d/1937.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser -- by :user:`melissa-kun-li` \ No newline at end of file From fa14483daaf6f0479d109d1b3cab3f1e1bef6894 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 25 Feb 2021 08:58:43 -0500 Subject: [PATCH 8384/8469] =?UTF-8?q?Bump=20version:=2053.0.0=20=E2=86=92?= =?UTF-8?q?=2053.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 11 +++++++++++ changelog.d/1937.change.rst | 1 - changelog.d/2573.change.rst | 2 -- setup.cfg | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 changelog.d/1937.change.rst delete mode 100644 changelog.d/2573.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d11952599e..a408627e47 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 53.0.0 +current_version = 53.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 93eae6870c..7e8c28bf0b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +v53.1.0 +------- + + +Changes +^^^^^^^ +* #1937: Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE: Any projects relying on case-insensitivity will need to adapt to accept the original case as published. -- by :user:`melissa-kun-li` +* #2573: Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used. + Note: :code:`upload_docs` is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li` + + v53.0.0 ------- diff --git a/changelog.d/1937.change.rst b/changelog.d/1937.change.rst deleted file mode 100644 index acd4305968..0000000000 --- a/changelog.d/1937.change.rst +++ /dev/null @@ -1 +0,0 @@ -Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE: Any projects relying on case-insensitivity will need to adapt to accept the original case as published. -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/changelog.d/2573.change.rst b/changelog.d/2573.change.rst deleted file mode 100644 index b06bd8c954..0000000000 --- a/changelog.d/2573.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used. -Note: :code:`upload_docs` is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 3c85d99882..12ce13861d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 53.0.0 +version = 53.1.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 693e4a0cd296d5e107c39ba1986174e29ed409c8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 11:37:33 -0500 Subject: [PATCH 8385/8469] Only Python 3 is relevant now --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 414ffed581..58659eab07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >= 40.8; python_version > '3'", + "setuptools >= 40.8", "wheel", ] build-backend = "setuptools.build_meta" From 1a549254c1828161417ff1053b8cdea34b9ad1dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2021 13:51:32 -0500 Subject: [PATCH 8386/8469] Trim excess whitespace --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7e8c28bf0b..864ee10566 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ v53.1.0 Changes ^^^^^^^ * #1937: Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE: Any projects relying on case-insensitivity will need to adapt to accept the original case as published. -- by :user:`melissa-kun-li` -* #2573: Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used. +* #2573: Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used. Note: :code:`upload_docs` is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li` From accbc3aa9f6692e43a079bb3d1847ab4eb5c3ce5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 11:49:01 -0500 Subject: [PATCH 8387/8469] Try omitting setuptools as build requirement. After all, Setuptools is right here. --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 58659eab07..70e3473d44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [build-system] requires = [ - "setuptools >= 40.8", "wheel", ] build-backend = "setuptools.build_meta" From 0a1f89c272be2720e9c737108153fcf88a1d8640 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 12:01:24 -0500 Subject: [PATCH 8388/8469] Restore pyproject.toml in sdist --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index eba40c5de6..3e8f09de37 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,4 +15,3 @@ include launcher.c include msvc-build-launcher.cmd include pytest.ini include tox.ini -exclude pyproject.toml # Temporary workaround for #1644. From 30bd8a5702d38d7b98bd325e94fb50886b2b3d4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 14:14:46 -0500 Subject: [PATCH 8389/8469] Add minimal entry points for bootstrapping --- bootstrap.egg-info/entry_points.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 bootstrap.egg-info/entry_points.txt diff --git a/bootstrap.egg-info/entry_points.txt b/bootstrap.egg-info/entry_points.txt new file mode 100644 index 0000000000..834d674e57 --- /dev/null +++ b/bootstrap.egg-info/entry_points.txt @@ -0,0 +1,14 @@ +[distutils.commands] +egg_info = setuptools.command.egg_info:egg_info + +[distutils.setup_keywords] +include_package_data = setuptools.dist:assert_bool +install_requires = setuptools.dist:check_requirements +extras_require = setuptools.dist:check_extras +entry_points = setuptools.dist:check_entry_points + +[egg_info.writers] +PKG-INFO = setuptools.command.egg_info:write_pkg_info +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +requires.txt = setuptools.command.egg_info:write_requirements From 7f838213da6d49c59e11aef6b8ebe0fcbc113801 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 19:43:15 -0500 Subject: [PATCH 8390/8469] Add metadata --- bootstrap.egg-info/PKG-INFO | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 bootstrap.egg-info/PKG-INFO diff --git a/bootstrap.egg-info/PKG-INFO b/bootstrap.egg-info/PKG-INFO new file mode 100644 index 0000000000..6e11ceeb9b --- /dev/null +++ b/bootstrap.egg-info/PKG-INFO @@ -0,0 +1,2 @@ +Name: setuptools-bootstrap +Version: 1.0 From 3d3c69e3800e66de8e6e3b5fc5672886f2b1068e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 20:05:37 -0500 Subject: [PATCH 8391/8469] Remove pip 19 from the upgrade from source tests. --- setuptools/tests/test_virtualenv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index fcd5da5d45..ea74ebe2d2 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -69,7 +69,9 @@ def _get_pip_versions(): 'pip==9.0.3', 'pip==10.0.1', 'pip==18.1', - 'pip==19.0.1', + # fails due to pypa/pip#6599 + # 'pip==19.3.1', + 'pip==20.0.2', 'https://github.com/pypa/pip/archive/master.zip', ] From ac3154576db19ae91a3cb1c26b7eba279fd12191 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 20:55:35 -0500 Subject: [PATCH 8392/8469] Rely on pytest-checkdocs 2.4 to avoid picking up 'bootstrap' as the local project. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f4bf489a9c..7adf85691b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,7 +41,7 @@ exclude = testing = # upstream pytest >= 3.5, !=3.7.3 - pytest-checkdocs >= 1.2.3 + pytest-checkdocs >= 2.4 pytest-flake8 pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov From 1da02dc4d8dd591a67e83a663379ab5c926de47f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Feb 2021 21:28:00 -0500 Subject: [PATCH 8393/8469] Update changelog. --- changelog.d/2582.breaking.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2582.breaking.rst diff --git a/changelog.d/2582.breaking.rst b/changelog.d/2582.breaking.rst new file mode 100644 index 0000000000..15dfbdb11e --- /dev/null +++ b/changelog.d/2582.breaking.rst @@ -0,0 +1 @@ +Simplified build-from source story. Build requirements no longer include setuptools itself. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9. From 4451606b2572870050bbabe7f6672a96d0c4d745 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2021 13:57:27 -0500 Subject: [PATCH 8394/8469] Prefer xfail to skip on known failure mode. --- setuptools/tests/test_virtualenv.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index ea74ebe2d2..5a16f52917 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -1,6 +1,8 @@ import glob import os import sys +import itertools +from collections import UserString import pathlib @@ -65,22 +67,33 @@ def _get_pip_versions(): # No network, disable most of these tests network = False + def mark_param(orig, *marks): + result = UserString(orig) if not isinstance(orig, UserString) else orig + result.marks = getattr(result, 'marks', ()) + marks + return result + + def make_param(marked_param): + marks = getattr(marked_param, 'marks', ()) + return pytest.param(marked_param, marks=marks) + + def skip_network(param): + return mark_param(param, pytest.mark.skip) if not network else param + network_versions = [ 'pip==9.0.3', 'pip==10.0.1', 'pip==18.1', - # fails due to pypa/pip#6599 - # 'pip==19.3.1', + mark_param('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', 'https://github.com/pypa/pip/archive/master.zip', ] - versions = [None] + [ - pytest.param(v, **({} if network else {'marks': pytest.mark.skip})) - for v in network_versions - ] + versions = itertools.chain( + [None], + map(skip_network, network_versions) + ) - return versions + return list(map(make_param, versions)) @pytest.mark.parametrize('pip_version', _get_pip_versions()) From 61b3376a257be3e74ac6fa0633cb72dc8a600453 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2021 13:59:56 -0500 Subject: [PATCH 8395/8469] Expand on the change in the changelog. --- changelog.d/2582.breaking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2582.breaking.rst b/changelog.d/2582.breaking.rst index 15dfbdb11e..908ababe78 100644 --- a/changelog.d/2582.breaking.rst +++ b/changelog.d/2582.breaking.rst @@ -1 +1 @@ -Simplified build-from source story. Build requirements no longer include setuptools itself. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9. +Simplified build-from-source story by providing bootstrapping metadata in a separate egg-info directory. Build requirements no longer include setuptools itself. Sdist once again includes the pyproject.toml. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9. From ce7632f3a75ab8771ec3bc71cf21136a22de55ff Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2021 14:50:01 -0500 Subject: [PATCH 8396/8469] Rely more on pytest param to append markers. --- setuptools/tests/test_virtualenv.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 5a16f52917..f13f7997e3 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -2,7 +2,6 @@ import os import sys import itertools -from collections import UserString import pathlib @@ -67,23 +66,19 @@ def _get_pip_versions(): # No network, disable most of these tests network = False - def mark_param(orig, *marks): - result = UserString(orig) if not isinstance(orig, UserString) else orig - result.marks = getattr(result, 'marks', ()) + marks - return result - - def make_param(marked_param): - marks = getattr(marked_param, 'marks', ()) - return pytest.param(marked_param, marks=marks) + def mark(param, *marks): + if not isinstance(param, type(pytest.param(''))): + param = pytest.param(param) + return param._replace(marks=param.marks + marks) def skip_network(param): - return mark_param(param, pytest.mark.skip) if not network else param + return param if network else mark(param, pytest.mark.skip(reason="no network")) network_versions = [ 'pip==9.0.3', 'pip==10.0.1', 'pip==18.1', - mark_param('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), + mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', 'https://github.com/pypa/pip/archive/master.zip', ] @@ -93,7 +88,7 @@ def skip_network(param): map(skip_network, network_versions) ) - return list(map(make_param, versions)) + return list(versions) @pytest.mark.parametrize('pip_version', _get_pip_versions()) From 85f824f49d69177f68245b9788acaf5ace97afb7 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Sat, 27 Feb 2021 21:31:09 -0500 Subject: [PATCH 8397/8469] handle AttributeError by raising DisutilsSetupError in check_specifier --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index c31020f0c4..6ae3886b1f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -292,7 +292,7 @@ def check_specifier(dist, attr, value): """Verify that value is a valid version specifier""" try: packaging.specifiers.SpecifierSet(value) - except packaging.specifiers.InvalidSpecifier as error: + except (packaging.specifiers.InvalidSpecifier, AttributeError) as error: tmpl = ( "{attr!r} must be a string " "containing valid version specifiers; {error}" From 20ced7533c2b737e9d99deacd97633f84b26567d Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Sun, 28 Feb 2021 00:59:58 -0500 Subject: [PATCH 8398/8469] test check_specifier --- setuptools/tests/test_dist.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index cb47fb5848..e4bba47bce 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -9,6 +9,7 @@ _get_unpatched, check_package_data, DistDeprecationWarning, + check_specifier, ) from setuptools import sic from setuptools import Distribution @@ -323,3 +324,15 @@ def test_check_package_data(package_data, expected_message): with pytest.raises( DistutilsSetupError, match=re.escape(expected_message)): check_package_data(None, str('package_data'), package_data) + + +def test_check_specifier(): + # valid specifier value + attrs = {'name': 'foo', 'python_requires': '>=3.0, !=3.1'} + dist = Distribution(attrs) + check_specifier(dist, attrs, attrs['python_requires']) + + # invalid specifier value + attrs = {'name': 'foo', 'python_requires': ['>=3.0', '!=3.1']} + with pytest.raises(DistutilsSetupError): + dist = Distribution(attrs) From adf32a23250c56b8c3856c768b5776bb78f695a3 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Sun, 28 Feb 2021 02:11:42 -0500 Subject: [PATCH 8399/8469] Add changelog --- changelog.d/1932.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1932.change.rst diff --git a/changelog.d/1932.change.rst b/changelog.d/1932.change.rst new file mode 100644 index 0000000000..a7af5b72ac --- /dev/null +++ b/changelog.d/1932.change.rst @@ -0,0 +1 @@ +Handled :code:`AttributeError` by raising :code:`DistutilsSetupError` in :code:`dist.check_specifier()` when specifier is not a string -- by :user:`melissa-kun-li` \ No newline at end of file From f07e7ea59a484f4e7c2d5c8c6def50c836af334a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Feb 2021 16:47:11 -0500 Subject: [PATCH 8400/8469] =?UTF-8?q?Bump=20version:=2053.1.0=20=E2=86=92?= =?UTF-8?q?=2054.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 18 ++++++++++++++++++ changelog.d/1932.change.rst | 1 - changelog.d/2553.doc.rst | 1 - changelog.d/2570.change.rst | 1 - changelog.d/2582.breaking.rst | 1 - setup.cfg | 2 +- 7 files changed, 20 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/1932.change.rst delete mode 100644 changelog.d/2553.doc.rst delete mode 100644 changelog.d/2570.change.rst delete mode 100644 changelog.d/2582.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a408627e47..25490e49c9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 53.1.0 +current_version = 54.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 864ee10566..62f911aa89 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,21 @@ +v54.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2582: Simplified build-from-source story by providing bootstrapping metadata in a separate egg-info directory. Build requirements no longer include setuptools itself. Sdist once again includes the pyproject.toml. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9. + +Changes +^^^^^^^ +* #1932: Handled :code:`AttributeError` by raising :code:`DistutilsSetupError` in :code:`dist.check_specifier()` when specifier is not a string -- by :user:`melissa-kun-li` +* #2570: Correctly parse cmdclass in setup.cfg. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2553: Added userguide example for markers in extras_require -- by :user:`pwoolvett` + + v53.1.0 ------- diff --git a/changelog.d/1932.change.rst b/changelog.d/1932.change.rst deleted file mode 100644 index a7af5b72ac..0000000000 --- a/changelog.d/1932.change.rst +++ /dev/null @@ -1 +0,0 @@ -Handled :code:`AttributeError` by raising :code:`DistutilsSetupError` in :code:`dist.check_specifier()` when specifier is not a string -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/changelog.d/2553.doc.rst b/changelog.d/2553.doc.rst deleted file mode 100644 index fa03329ad9..0000000000 --- a/changelog.d/2553.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added userguide example for markers in extras_require -- by :user:`pwoolvett` diff --git a/changelog.d/2570.change.rst b/changelog.d/2570.change.rst deleted file mode 100644 index 165089ed31..0000000000 --- a/changelog.d/2570.change.rst +++ /dev/null @@ -1 +0,0 @@ -Correctly parse cmdclass in setup.cfg. diff --git a/changelog.d/2582.breaking.rst b/changelog.d/2582.breaking.rst deleted file mode 100644 index 908ababe78..0000000000 --- a/changelog.d/2582.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Simplified build-from-source story by providing bootstrapping metadata in a separate egg-info directory. Build requirements no longer include setuptools itself. Sdist once again includes the pyproject.toml. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9. diff --git a/setup.cfg b/setup.cfg index 7adf85691b..d60a9b2633 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 53.1.0 +version = 54.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 8307bd497dba77f5ef40f504842e023334eba04b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 28 Feb 2021 16:50:09 -0500 Subject: [PATCH 8401/8469] Term is builder. --- docs/userguide/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index e7594ba33e..75dc302f41 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -59,9 +59,9 @@ This is what your project would look like:: setup.cfg mypackage/__init__.py -Then, you need an installer, such as :std:doc:`PyPA build ` +Then, you need an builder, such as :std:doc:`PyPA build ` which you can obtain via ``pip install build``. After downloading it, invoke -the installer:: +the builder:: python -m build From 666f44463ce9749f1040694f9954cd93a4b80bdc Mon Sep 17 00:00:00 2001 From: Amy Date: Sun, 28 Feb 2021 22:29:48 -0500 Subject: [PATCH 8402/8469] Add sphinx-inline-tabs extension --- docs/conf.py | 2 +- docs/requirements.txt | 1 + setup.cfg | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 18cd7bdc49..9082fb1d41 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,4 @@ -extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker', 'sphinx_inline_tabs'] master_doc = "index" diff --git a/docs/requirements.txt b/docs/requirements.txt index 104d68faef..0292759301 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,5 +3,6 @@ sphinx jaraco.packaging>=6.1 rst.linker>=1.9 pygments-github-lexers==0.0.5 +sphinx-inline-tabs setuptools>=34 diff --git a/setup.cfg b/setup.cfg index 14ff445daa..9de9f87f88 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,6 +65,7 @@ docs = sphinx jaraco.packaging >= 8.2 rst.linker >= 1.9 + sphinx-inline-tabs # local pygments-github-lexers==0.0.5 From 474f833a1181ca07b17fe4c52a9680c70335181e Mon Sep 17 00:00:00 2001 From: Amy Date: Sun, 28 Feb 2021 23:07:47 -0500 Subject: [PATCH 8403/8469] Replace adjacent code blocks with tabbed containers --- docs/userguide/dependency_management.rst | 228 +++++++++++++---------- docs/userguide/package_discovery.rst | 112 ++++++----- docs/userguide/quickstart.rst | 43 +++-- 3 files changed, 223 insertions(+), 160 deletions(-) diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index 0eb2186494..6108d9b2e9 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -49,23 +49,27 @@ be able to run. ``setuptools`` support automatically download and install these dependencies when the package is installed. Although there is more finess to it, let's start with a simple example. -.. code-block:: ini +.. tab:: setup.cfg - [options] - #... - install_requires = - docutils - BazSpam ==1.1 + .. code-block:: ini + + [options] + #... + install_requires = + docutils + BazSpam ==1.1 + +.. tab:: setup.py -.. code-block:: python + .. code-block:: python - setup( - #..., - install_requires = [ - 'docutils', - 'BazSpam ==1.1' - ] - ) + setup( + #..., + install_requires = [ + 'docutils', + 'BazSpam ==1.1' + ] + ) When your project is installed (e.g. using pip), all of the dependencies not @@ -82,41 +86,49 @@ specific dependencies. For example, the ``enum`` package was added in Python 3.4, therefore, package that depends on it can elect to install it only when the Python version is older than 3.4. To accomplish this -.. code-block:: ini - - [options] - #... - install_requires = - enum34;python_version<'3.4' +.. tab:: setup.cfg -.. code-block:: python + .. code-block:: ini - setup( + [options] #... - install_requires=[ - "enum34;python_version<'3.4'",] - ) + install_requires = + enum34;python_version<'3.4' + +.. tab:: setup.py + + .. code-block:: python + + setup( + #... + install_requires=[ + "enum34;python_version<'3.4'",] + ) Similarly, if you also wish to declare ``pywin32`` with a minimal version of 1.0 and only install it if the user is using a Windows operating system: -.. code-block:: ini - - [options] - #... - install_requires = - enum34;python_version<'3.4' - pywin32 >= 1.0;platform_system=='Windows' +.. tab:: setup.cfg -.. code-block:: python + .. code-block:: ini - setup( + [options] #... - install_requires=[ - "enum34;python_version<'3.4'", - "pywin32 >= 1.0;platform_system=='Windows'" - ] - ) + install_requires = + enum34;python_version<'3.4' + pywin32 >= 1.0;platform_system=='Windows' + +.. tab:: setup.py + + .. code-block:: python + + setup( + #... + install_requires=[ + "enum34;python_version<'3.4'", + "pywin32 >= 1.0;platform_system=='Windows'" + ] + ) The environmental markers that may be used for testing platform types are detailed in `PEP 508 `_. @@ -181,20 +193,24 @@ The ``dependency_links`` option takes the form of a list of URL strings. For example, this will cause a search of the specified page for eggs or source distributions, if the package's dependencies aren't already installed: -.. code-block:: ini - - [options] - #... - dependency_links = http://peak.telecommunity.com/snapshots/ +.. tab:: setup.cfg -.. code-block:: python + .. code-block:: ini - setup( + [options] #... - dependency_links=[ - "http://peak.telecommunity.com/snapshots/" - ], - ) + dependency_links = http://peak.telecommunity.com/snapshots/ + +.. tab:: setup.py + + .. code-block:: python + + setup( + #... + dependency_links=[ + "http://peak.telecommunity.com/snapshots/" + ], + ) Optional dependencies @@ -211,24 +227,28 @@ ancillary functions such as "tests" and "docs". For example, Package-A offers optional PDF support and requires two other dependencies for it to work: -.. code-block:: ini +.. tab:: setup.cfg - [metadata] - name = Package-A + .. code-block:: ini - [options.extras_require] - PDF = ReportLab>=1.2; RXP + [metadata] + name = Package-A + [options.extras_require] + PDF = ReportLab>=1.2; RXP -.. code-block:: python - setup( - name="Project-A", - #... - extras_require={ - "PDF": ["ReportLab>=1.2", "RXP"], - } - ) +.. tab:: setup.py + + .. code-block:: python + + setup( + name="Project-A", + #... + extras_require={ + "PDF": ["ReportLab>=1.2", "RXP"], + } + ) The name ``PDF`` is an arbitary identifier of such a list of dependencies, to which other components can refer and have them installed. There are two common @@ -236,31 +256,35 @@ use cases. First is the console_scripts entry point: -.. code-block:: ini +.. tab:: setup.cfg - [metadata] - name = Project A - #... + .. code-block:: ini - [options] - #... - entry_points= - [console_scripts] - rst2pdf = project_a.tools.pdfgen [PDF] - rst2html = project_a.tools.htmlgen - -.. code-block:: python - - setup( - name = "Project-A" - #..., - entry_points={ - "console_scripts": [ - "rst2pdf = project_a.tools.pdfgen [PDF]", - "rst2html = project_a.tools.htmlgen", - ], - } - ) + [metadata] + name = Project A + #... + + [options] + #... + entry_points= + [console_scripts] + rst2pdf = project_a.tools.pdfgen [PDF] + rst2html = project_a.tools.htmlgen + +.. tab:: setup.py + + .. code-block:: python + + setup( + name = "Project-A" + #..., + entry_points={ + "console_scripts": [ + "rst2pdf = project_a.tools.pdfgen [PDF]", + "rst2html = project_a.tools.htmlgen", + ], + } + ) This syntax indicates that the entry point (in this case a console script) is only valid when the PDF extra is installed. It is up to the installer @@ -273,24 +297,28 @@ The second use case is that other package can use this "extra" for their own dependencies. For example, if "Project-B" needs "project A" with PDF support installed, it might declare the dependency like this: -.. code-block:: ini +.. tab:: setup.cfg - [metadata] - name = Project-B - #... + .. code-block:: ini - [options] - #... - install_requires = - Project-A[PDF] + [metadata] + name = Project-B + #... + + [options] + #... + install_requires = + Project-A[PDF] + +.. tab:: setup.py -.. code-block:: python + .. code-block:: python - setup( - name="Project-B", - install_requires=["Project-A[PDF]"], - ... - ) + setup( + name="Project-B", + install_requires=["Project-A[PDF]"], + ... + ) This will cause ReportLab to be installed along with project A, if project B is installed -- even if project A was already installed. In this way, a project diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index de4ef6682f..842ade828d 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -19,36 +19,44 @@ Package Discovery and Namespace Package support for namespace package. Normally, you would specify the package to be included manually in the following manner: -.. code-block:: ini - - [options] - #... - packages = - mypkg1 - mypkg2 +.. tab:: setup.cfg -.. code-block:: python + .. code-block:: ini - setup( + [options] #... - packages = ['mypkg1', 'mypkg2'] - ) + packages = + mypkg1 + mypkg2 + +.. tab:: setup.py + + .. code-block:: python + + setup( + #... + packages = ['mypkg1', 'mypkg2'] + ) This can get tiresome reallly quickly. To speed things up, we introduce two functions provided by setuptools: -.. code-block:: ini +.. tab:: setup.cfg - [options] - packages = find: - #or - packages = find_namespace: + .. code-block:: ini -.. code-block:: python + [options] + packages = find: + #or + packages = find_namespace: - from setuptools import find_packages - #or - from setuptools import find_namespace_packages +.. tab:: setup.py + + .. code-block:: python + + from setuptools import find_packages + #or + from setuptools import find_namespace_packages Using ``find:`` or ``find_packages`` @@ -71,30 +79,34 @@ it, consider the following directory To have your setup.cfg or setup.py to automatically include packages found in ``src`` that starts with the name ``pkg`` and not ``additional``: -.. code-block:: ini +.. tab:: setup.cfg - [options] - packages = find: - package_dir = - =src + .. code-block:: ini - [options.packages.find] - where = src - include = pkg* - exclude = additional + [options] + packages = find: + package_dir = + =src -.. code-block:: python + [options.packages.find] + where = src + include = pkg* + exclude = additional - setup( - #... - packages = find_packages( - where = 'src', - include = ['pkg*',], - exclude = ['additional',] - ), - package_dir = {"":"src"} - #... - ) +.. tab:: setup.py + + .. code-block:: python + + setup( + #... + packages = find_packages( + where = 'src', + include = ['pkg*',], + exclude = ['additional',] + ), + package_dir = {"":"src"} + #... + ) .. _Namespace Packages: @@ -195,17 +207,21 @@ following: And the ``namespace_packages`` keyword in your ``setup.cfg`` or ``setup.py``: -.. code-block:: ini +.. tab:: setup.cfg - [options] - namespace_packages = timmins + .. code-block:: ini -.. code-block:: python + [options] + namespace_packages = timmins + +.. tab:: setup.py + + .. code-block:: python - setup( - # ... - namespace_packages = ['timmins'] - ) + setup( + # ... + namespace_packages = ['timmins'] + ) And your directory should look like this diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 1d557d47bd..16cd4f7192 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -37,26 +37,45 @@ package your project: requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" -Then, you will need a ``setup.cfg`` to specify your package information, -such as metadata, contents, dependencies, etc. Here we demonstrate the minimum +Then, you will need a ``setup.cfg`` or ``setup.py`` to specify your package +information, such as metadata, contents, dependencies, etc. Here we demonstrate +the minimum -.. code-block:: ini +.. tab:: setup.cfg - [metadata] - name = mypackage - version = 0.0.1 + .. code-block:: ini - [options] - packages = mypackage - install_requires = - requests - importlib; python_version == "2.6" + [metadata] + name = mypackage + version = 0.0.1 + + [options] + packages = mypackage + install_requires = + requests + importlib; python_version == "2.6" + +.. tab:: setup.py + + .. code-block:: python + + from setuptools import setup + + setup( + name='mypackage"' + version='0.0.1', + packages=['mypackage'], + install_requires=[ + 'requests', + 'importlib; python_version == "2.6"', + ], + ) This is what your project would look like:: ~/mypackage/ pyproject.toml - setup.cfg + setup.cfg # or setup.py mypackage/__init__.py Then, you need an installer, such as `pep517 `_ From c88c4e8a443e34f739547aeb76f4d9e752c0c31c Mon Sep 17 00:00:00 2001 From: Amy Date: Sun, 28 Feb 2021 23:33:22 -0500 Subject: [PATCH 8404/8469] Add changelog --- changelog.d/2584.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2584.doc.rst diff --git a/changelog.d/2584.doc.rst b/changelog.d/2584.doc.rst new file mode 100644 index 0000000000..3474049963 --- /dev/null +++ b/changelog.d/2584.doc.rst @@ -0,0 +1 @@ +Added ``sphinx-inline-tabs`` extension to allow for comparison of ``setup.py`` and its equivalent ``setup.cfg`` -- by :user:`amy-lei` \ No newline at end of file From a2e9ae4cb75f9b00ddf37713ec307e5f00869737 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 2 Mar 2021 19:36:41 -0500 Subject: [PATCH 8405/8469] Add compatibility method to warn for future underscore change --- setuptools/dist.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 6ae3886b1f..fe5bd6f8f0 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -598,7 +598,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 continue val = parser.get(section, opt) - opt = opt.replace('-', '_') + opt = self.dash_to_underscore_warning(opt) opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -623,6 +623,21 @@ def _parse_config_files(self, filenames=None): # noqa: C901 except ValueError as e: raise DistutilsOptionError(e) from e + def dash_to_underscore_warning(self, opt): + if opt in ( + 'home-page', 'download-url', 'author-email', + 'maintainer-email', 'long-description', 'build-base', + 'project-urls', 'license-file', 'license-files', + 'long-description-content-type', + ): + underscore_opt = opt.replace('-', '_') + warnings.warn( + "Usage of dash-separated '%s' will not be supported in future " + "versions. Please use the underscore name '%s' instead" + % (opt, underscore_opt)) + return underscore_opt + return opt + # FIXME: 'Distribution._set_command_options' is too complex (14) def _set_command_options(self, command_obj, option_dict=None): # noqa: C901 """ From d027d6d2140daf87079dd3bd186585a5b063269e Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 2 Mar 2021 20:13:06 -0500 Subject: [PATCH 8406/8469] Modify existing tests to be compatible with future underscore change --- setuptools/command/easy_install.py | 2 +- setuptools/tests/test_build_ext.py | 2 +- setuptools/tests/test_config.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index eeb21b5083..0917804f41 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1190,7 +1190,7 @@ def _set_fetcher_options(self, base): for key, val in ei_opts.items(): if key not in fetch_directives: continue - fetch_options[key.replace('_', '-')] = val[1] + fetch_options[key] = val[1] # create a settings dictionary suitable for `edit_config` settings = dict(easy_install=fetch_options) cfg_filename = os.path.join(base, 'setup.cfg') diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index be03893a1b..b6deebe4e2 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -104,7 +104,7 @@ def test_build_ext_config_handling(tmpdir_cwd): 'setup.cfg': DALS( """ [build] - build-base = foo_build + build_base = foo_build """), } path.build(files) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 6db86c7c58..0983f8362d 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -210,8 +210,8 @@ def test_aliases(self, tmpdir): fake_env( tmpdir, '[metadata]\n' - 'author-email = test@test.com\n' - 'home-page = http://test.test.com/test/\n' + 'author_email = test@test.com\n' + 'home_page = http://test.test.com/test/\n' 'summary = Short summary\n' 'platform = a, b\n' 'classifier =\n' From 08d6a2f2b0fb4b57f749d0adaaca3efc158419cd Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 2 Mar 2021 22:54:53 -0500 Subject: [PATCH 8407/8469] Add test for conversion warning --- setuptools/tests/test_config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 0983f8362d..4a39917922 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -507,6 +507,25 @@ def test_not_utf8(self, tmpdir): with get_dist(tmpdir): pass + def test_dash_to_underscore_warning(self, tmpdir): + # dash_to_underscore_warning() is a method in setuptools.dist + # remove this test and method when dash convert to underscore in setup.cfg + # is no longer supported + fake_env( + tmpdir, + '[metadata]\n' + 'author-email = test@test.com\n' + 'maintainer_email = foo@foo.com\n' + ) + msg = ("Usage of dash-separated 'author-email' will not be supported " + "in future versions. " + "Please use the underscore name 'author_email' instead") + with pytest.warns(UserWarning, match=msg): + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.author_email == 'test@test.com' + assert metadata.maintainer_email == 'foo@foo.com' + class TestOptions: From 67a5991997659326fd1439a58e2140731144f08c Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 2 Mar 2021 23:25:39 -0500 Subject: [PATCH 8408/8469] Add test for dash preserved extras_require in setup.cfg --- setuptools/tests/test_config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 4a39917922..eac26749d4 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -791,6 +791,20 @@ def test_extras_require(self, tmpdir): } assert dist.metadata.provides_extras == set(['pdf', 'rest']) + def test_dash_preserved_extras_require(self, tmpdir): + fake_env( + tmpdir, + '[options.extras_require]\n' + 'foo-a = foo\n' + 'foo_b = test\n' + ) + + with get_dist(tmpdir) as dist: + assert dist.extras_require == { + 'foo-a': ['foo'], + 'foo_b': ['test'] + } + def test_entry_points(self, tmpdir): _, config = fake_env( tmpdir, From 4cd5f1a23bced5679f219387afacc59dd360bce5 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Tue, 2 Mar 2021 23:53:19 -0500 Subject: [PATCH 8409/8469] Add changelog --- changelog.d/1608.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1608.change.rst diff --git a/changelog.d/1608.change.rst b/changelog.d/1608.change.rst new file mode 100644 index 0000000000..77fcfd57b7 --- /dev/null +++ b/changelog.d/1608.change.rst @@ -0,0 +1 @@ +Removed the general conversion of dashes to underscores in the keys of :code:`setup.cfg` to support the usage of dashes. Added a compatibility method to warn users when they use a specific dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li` \ No newline at end of file From 9c2b717818046a0d8679b4a97c63db2dc1e32d54 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Wed, 3 Mar 2021 16:42:16 -0500 Subject: [PATCH 8410/8469] Update warning for dash to underscore conversion --- changelog.d/1608.change.rst | 2 +- setuptools/dist.py | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/changelog.d/1608.change.rst b/changelog.d/1608.change.rst index 77fcfd57b7..c0f493b16c 100644 --- a/changelog.d/1608.change.rst +++ b/changelog.d/1608.change.rst @@ -1 +1 @@ -Removed the general conversion of dashes to underscores in the keys of :code:`setup.cfg` to support the usage of dashes. Added a compatibility method to warn users when they use a specific dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li` \ No newline at end of file +Removed the conversion of dashes to underscores in the :code:`extras_require` and :code:`data_files` of :code:`setup.cfg` to support the usage of dashes. Method will warn users when they use a dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/setuptools/dist.py b/setuptools/dist.py index fe5bd6f8f0..40440a406a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -598,7 +598,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 continue val = parser.get(section, opt) - opt = self.dash_to_underscore_warning(opt) + opt = self.dash_to_underscore_warning(opt, section) opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -622,21 +622,19 @@ def _parse_config_files(self, filenames=None): # noqa: C901 setattr(self, alias or opt, val) except ValueError as e: raise DistutilsOptionError(e) from e - - def dash_to_underscore_warning(self, opt): - if opt in ( - 'home-page', 'download-url', 'author-email', - 'maintainer-email', 'long-description', 'build-base', - 'project-urls', 'license-file', 'license-files', - 'long-description-content-type', + + def dash_to_underscore_warning(self, opt, section): + if section in ( + 'options.extras_require', 'options.data_files', ): - underscore_opt = opt.replace('-', '_') + return opt + underscore_opt = opt.replace('-', '_') + if '-' in opt: warnings.warn( "Usage of dash-separated '%s' will not be supported in future " "versions. Please use the underscore name '%s' instead" % (opt, underscore_opt)) - return underscore_opt - return opt + return underscore_opt # FIXME: 'Distribution._set_command_options' is too complex (14) def _set_command_options(self, command_obj, option_dict=None): # noqa: C901 From 1af7000887487cfe1aa4d127a15e7802656f1e8a Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Wed, 3 Mar 2021 17:02:45 -0500 Subject: [PATCH 8411/8469] Dash to underscore compatibility --- setuptools/dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index 40440a406a..c074468ba9 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -622,7 +622,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 setattr(self, alias or opt, val) except ValueError as e: raise DistutilsOptionError(e) from e - + def dash_to_underscore_warning(self, opt, section): if section in ( 'options.extras_require', 'options.data_files', From b40d7f4174083c92ad532eccf9b13c2d8570accf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Mar 2021 11:07:23 -0500 Subject: [PATCH 8412/8469] =?UTF-8?q?Bump=20version:=2054.0.0=20=E2=86=92?= =?UTF-8?q?=2054.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/1608.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/1608.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 25490e49c9..9a23064374 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.0.0 +current_version = 54.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 62f911aa89..3920b27e93 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v54.1.0 +------- + + +Changes +^^^^^^^ +* #1608: Removed the conversion of dashes to underscores in the :code:`extras_require` and :code:`data_files` of :code:`setup.cfg` to support the usage of dashes. Method will warn users when they use a dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li` + + v54.0.0 ------- diff --git a/changelog.d/1608.change.rst b/changelog.d/1608.change.rst deleted file mode 100644 index c0f493b16c..0000000000 --- a/changelog.d/1608.change.rst +++ /dev/null @@ -1 +0,0 @@ -Removed the conversion of dashes to underscores in the :code:`extras_require` and :code:`data_files` of :code:`setup.cfg` to support the usage of dashes. Method will warn users when they use a dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index d60a9b2633..18950611bc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.0.0 +version = 54.1.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 265fb0eda039711e749bec09b512b91e9ce56627 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 5 Mar 2021 11:12:28 -0500 Subject: [PATCH 8413/8469] Extend extensions later in the file. Fixes flake8 failure and isolates the (sole) change from other concerns. --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 9082fb1d41..581d8d5e75 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,4 @@ -extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker', 'sphinx_inline_tabs'] +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] master_doc = "index" @@ -93,3 +93,6 @@ html_theme = 'alabaster' templates_path = ['_templates'] html_sidebars = {'index': ['tidelift-sidebar.html']} + +# Add support for inline tabs +extensions += ['sphinx_inline_tabs'] From 132a6cde2a47f34680527258a3753a692e23b266 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Fri, 5 Mar 2021 23:03:15 -0500 Subject: [PATCH 8414/8469] Warn for uppercase usage in setup.cfg metadata --- setuptools/dist.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index c074468ba9..43a51ad808 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -599,6 +599,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 val = parser.get(section, opt) opt = self.dash_to_underscore_warning(opt, section) + opt = self.uppercase_warning(opt, section) opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -636,6 +637,17 @@ def dash_to_underscore_warning(self, opt, section): % (opt, underscore_opt)) return underscore_opt + def uppercase_warning(self, opt, section): + if section in ('metadata',) and (any(c.isupper() for c in opt)): + lowercase_opt = opt.lower() + warnings.warn( + "Usage of uppercase key '%s' in '%s' will be deprecated in future " + "versions. Please use lowercase '%s' instead" + % (opt, section, lowercase_opt) + ) + return lowercase_opt + return opt + # FIXME: 'Distribution._set_command_options' is too complex (14) def _set_command_options(self, command_obj, option_dict=None): # noqa: C901 """ From fa48ac3626c21efc5261b4f112270ca40d2e004d Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Fri, 5 Mar 2021 23:20:59 -0500 Subject: [PATCH 8415/8469] Test for uppercase metadata warning --- setuptools/tests/test_config.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index eac26749d4..454ffb245e 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -526,6 +526,24 @@ def test_dash_to_underscore_warning(self, tmpdir): assert metadata.author_email == 'test@test.com' assert metadata.maintainer_email == 'foo@foo.com' + def test_uppercase_warning(self, tmpdir): + # remove this test and the method uppercase_warning() in setuptools.dist + # when no longer needed + fake_env( + tmpdir, + '[metadata]\n' + 'Name = foo\n' + 'description = Some description\n' + ) + msg = ("Usage of uppercase key 'Name' in 'metadata' will be deprecated in " + "future versions. " + "Please use lowercase 'name' instead") + with pytest.warns(UserWarning, match=msg): + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.name == 'foo' + assert metadata.description == 'Some description' + class TestOptions: From 28c7abc9516821cb701be5576ccd274a3b0c0389 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Sat, 6 Mar 2021 00:00:37 -0500 Subject: [PATCH 8416/8469] Add changelog --- changelog.d/2592.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2592.change.rst diff --git a/changelog.d/2592.change.rst b/changelog.d/2592.change.rst new file mode 100644 index 0000000000..3dbe816fd8 --- /dev/null +++ b/changelog.d/2592.change.rst @@ -0,0 +1 @@ +Warned for usage of uppercase keys in :code:`metadata` in :code:`setup.cfg`, restored some compatiblity by transforming to lowercase if not. Followed the change of keys in :code:`setup.cfg` now being case-sensitive -- by :user:`melissa-kun-li` \ No newline at end of file From bf9fae2c0df316dc837d56ae68880620733d5ff6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Mar 2021 09:57:43 -0500 Subject: [PATCH 8417/8469] Require twine 3 with keyring unconditionally required. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 249f97c24f..a9a50b01a6 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands = skip_install = True deps = build - twine[keyring]>=1.13 + twine>=3 path jaraco.develop>=7.1 passenv = From 9acf04c1461fd013fc0a1bd95158e74c7cf437d4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 7 Mar 2021 01:38:02 +0100 Subject: [PATCH 8418/8469] Introduce issue forms in the repo --- .github/ISSUE_TEMPLATE/bug-report.yml | 130 ++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 15 ++ .../ISSUE_TEMPLATE/documentation-report.yml | 93 +++++++++++++ .github/ISSUE_TEMPLATE/feature-request.yml | 105 ++++++++++++++ 4 files changed, 343 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation-report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000..5f551a4be7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,130 @@ +--- +name: 🛠Bug report +description: >- + Create a report to help us improve when + something is not working correctly +title: '[BUG] ' +labels: +- bug +- Needs Triage +issue_body: false # default: true, adds a classic WSYWIG textarea, if on + +body: +- type: markdown + attributes: + value: > + **Thank you for wanting to report a bug in setuptools!** + + + ⚠ + Verify first that your issue is not + [already reported on GitHub][issue search] and keep in mind and + keep in mind that we may have to keep the current behavior because + [every change breaks someone's workflow][XKCD 1172]. + We try to be mindful about this. + + Also test if the latest release and main branch are affected too. + + + If you are seeking community support, please consider + [starting a discussion][Discussions]. + + + Thank you for your collaboration! + + + [Discussions]: https://github.com/pypa/setuptools/discussions + + [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues + + [XKCD 1172]: https://xkcd.com/1172/ + +- type: markdown + attributes: + value: >- + **Environment** +- type: input + attributes: + label: setuptools version + placeholder: For example, setuptools===60.4.2 + validations: + required: true +- type: input + attributes: + label: Python version + placeholder: For example, Python 3.10 + validations: + required: true +- type: input + attributes: + label: OS + placeholder: For example, Gentoo Linux, RHEL 8, Arch Linux, macOS etc. + validations: + required: true +- type: textarea + attributes: + label: Additional environment information + description: >- + Feel free to add more information about your environment here. + placeholder: >- + This is only happening when I run setuptools on my fridge's patched firmware 🤯 + +- type: textarea + attributes: + label: Description + description: >- + A clear and concise description of what the bug is. + placeholder: >- + I tried doing X and I expected it to result in Y because the docs + mentioned Z but what happened next what totally unexpected! + And here's why... + validations: + required: true + +- type: textarea + attributes: + label: Expected behavior + description: >- + A clear and concise description of what you expected to happen. + placeholder: >- + I tried doing X and I expected it to result in Y. I'm confused... + validations: + required: true + +- type: textarea + attributes: + label: How to Reproduce + description: >- + Describe the steps to reproduce this bug. + placeholder: | + 1. Integrate setuptools via '...' + 2. Then run '...' + 3. An error occurs. + validations: + required: true + +- type: textarea + attributes: + label: Output + description: >- + Paste the output of the steps above, including the commands + themselves and setuptools' output/traceback etc. + value: | + ```console + + ``` + validations: + required: true + + +- type: checkboxes + attributes: + label: Code of Conduct + description: | + Read the [PSF Code of Conduct][CoC] first. + + [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md + options: + - label: I agree to follow the PSF Code of Conduct + required: true +... diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..dde102ca11 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,15 @@ +# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser +blank_issues_enabled: false # default: true +contact_links: +- name: 🤔 Have questions or need support? + url: https://github.com/pypa/setuptools/discussions + about: This is a place for the community to exchange ideas and recipes +- name: 💬 Discourse + url: https://discuss.python.org/c/packaging + about: | + Please ask typical Q&A here: general ideas for Python packaging, + questions about structuring projects and so on +- name: >- + 💬 IRC: #pypa @ Freenode + url: https://webchat.freenode.net/#pypa + about: Chat with devs diff --git a/.github/ISSUE_TEMPLATE/documentation-report.yml b/.github/ISSUE_TEMPLATE/documentation-report.yml new file mode 100644 index 0000000000..a947dad83e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-report.yml @@ -0,0 +1,93 @@ +--- +name: 📠Documentation Report +title: '[Docs] ' +description: Ask us about docs +labels: +- documentation +- Needs Triage +# NOTE: issue body is enabled to allow screenshots +issue_body: true # default: true, adds a classic WSYWIG textarea, if on + +body: +- type: markdown + attributes: + value: > + **Thank you for wanting to report a problem with setuptools + documentation!** + + + Please fill out your suggestions below. If the problem seems + straightforward, feel free to go ahead and + submit a pull request instead! + + + ⚠ + Verify first that your issue is not [already reported on + GitHub][issue search]. + + + If you are seeking community support, please consider + [starting a discussion][Discussions]. + + + Thank you for your collaboration! + + + [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues + + [Discussions]: https://github.com/pypa/setuptools/discussions + +- type: textarea + attributes: + label: Summary + description: > + Explain the problem briefly below, add suggestions to wording + or structure. + + + **HINT:** Did you know the documentation has a `View on GitHub` + link on every page? Feel free to use it to start a pull request + right from the GitHub UI! + placeholder: >- + I was reading the setuptools documentation of version X and I'm + having problems understanding Y. It would be very helpful if that + got rephrased as Z. + validations: + required: true + +- type: textarea + attributes: + label: OS / Environment + description: >- + Provide all relevant information below, e.g. OS version, + browser, etc. + placeholder: Fedora 33, Firefox etc. + + +- type: checkboxes + attributes: + label: Code of Conduct + description: | + Read the [PSF Code of Conduct][CoC] first. + + [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md + options: + - label: I agree to follow the PSF Code of Conduct + required: true + + +- type: markdown + attributes: + value: > + + + ### Additional Information + + + Describe how this improves the documentation, e.g. before/after + situation or screenshots. + + + **HINT:** You can paste https://gist.github.com links for + larger files. +... diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000000..7dec35a8dc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,105 @@ +--- +name: ✨ Feature request +description: Suggest an idea for setuptools +title: '[FR] ' +labels: +- enhancement +- Needs Triage +issue_body: false # default: true, adds a classic WSYWIG textarea, if on + +body: +- type: markdown + attributes: + value: > + **Thank you for wanting to suggest a feature for setuptools!** + + + 💡 + Before you go ahead with your request, please first consider if it + would be useful for majority of the setuptools users. As a general + rule of thumb, any feature that is only of interest to a small sub + group should be implemented in a third-party plugin or maybe even + just your project alone. Be mindful of the fact that the core + setuptools features have a broad impact. + + +
    + + â— Every change breaks someone's workflow. + + + + [![â— Every change breaks someone's workflow.](https://imgs.xkcd.com/comics/workflow.png) + ](https://xkcd.com/1172/) +
    + + + âš  + Verify first that your idea is not [already requested on GitHub][issue search]. + + + + [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues + +- type: textarea + attributes: + label: What's the problem this feature will solve? + description: >- + What are you trying to do, that you are unable to achieve + with setuptools as it currently stands? + placeholder: >- + I'm trying to do X and I'm missing feature Y for this to be + easily achievable. + validations: + required: true + +- type: textarea + attributes: + label: Describe the solution you'd like + description: > + Clear and concise description of what you want to happen. + + + Provide examples of real world use cases that this would enable + and how it solves the problem described above. + placeholder: >- + When I do X, I want to achieve Y in a situation when Z. + validations: + required: true + +- type: textarea + attributes: + label: Alternative Solutions + description: >- + Have you tried to workaround the problem using other tools? Or a + different approach to solving this issue? Please elaborate here. + placeholder: >- + I tried doing X, Y and Z. But they are subobpimal because of P. + +- type: textarea + attributes: + label: Additional context + description: > + Add any other context, links, etc. about the feature here. + Describe how the feature would be used, why it is needed and what + it would solve. + + + **HINT:** You can paste https://gist.github.com links for + larger files. + placeholder: >- + I asked on https://stackoverflow.com/.... and the community + advised me to do X, Y and Z. + + +- type: checkboxes + attributes: + label: Code of Conduct + description: | + Read the [PSF Code of Conduct][CoC] first. + + [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md + options: + - label: I agree to follow the PSF Code of Conduct + required: true +... From 0bffc7c1c673f9735bdac71a2949fae809ec07a3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Mar 2021 21:47:15 -0500 Subject: [PATCH 8419/8469] Apply suggestions in code review. Co-authored-by: Sviatoslav Sydorenko --- changelog.d/2592.change.rst | 4 +++- setuptools/dist.py | 23 ++++++++++++----------- setuptools/tests/test_config.py | 5 +++-- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/changelog.d/2592.change.rst b/changelog.d/2592.change.rst index 3dbe816fd8..a38ae0c4c4 100644 --- a/changelog.d/2592.change.rst +++ b/changelog.d/2592.change.rst @@ -1 +1,3 @@ -Warned for usage of uppercase keys in :code:`metadata` in :code:`setup.cfg`, restored some compatiblity by transforming to lowercase if not. Followed the change of keys in :code:`setup.cfg` now being case-sensitive -- by :user:`melissa-kun-li` \ No newline at end of file +Made option keys in the ``[metadata]`` section of ``setup.cfg`` case-sensitive. Users having +uppercase option spellings will get a warning suggesting to make them to lowercase +-- by :user:`melissa-kun-li` diff --git a/setuptools/dist.py b/setuptools/dist.py index 43a51ad808..70c0e6becb 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -599,7 +599,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 val = parser.get(section, opt) opt = self.dash_to_underscore_warning(opt, section) - opt = self.uppercase_warning(opt, section) + opt = self.make_option_lowercase(opt, section) opt_dict[opt] = (filename, val) # Make the ConfigParser forget everything (so we retain @@ -637,16 +637,17 @@ def dash_to_underscore_warning(self, opt, section): % (opt, underscore_opt)) return underscore_opt - def uppercase_warning(self, opt, section): - if section in ('metadata',) and (any(c.isupper() for c in opt)): - lowercase_opt = opt.lower() - warnings.warn( - "Usage of uppercase key '%s' in '%s' will be deprecated in future " - "versions. Please use lowercase '%s' instead" - % (opt, section, lowercase_opt) - ) - return lowercase_opt - return opt + def make_option_lowercase(self, opt, section): + if section != 'metadata' or opt.islower(): + return opt + + lowercase_opt = opt.lower() + warnings.warn( + "Usage of uppercase key '%s' in '%s' will be deprecated in future " + "versions. Please use lowercase '%s' instead" + % (opt, section, lowercase_opt) + ) + return lowercase_opt # FIXME: 'Distribution._set_command_options' is too complex (14) def _set_command_options(self, command_obj, option_dict=None): # noqa: C901 diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 454ffb245e..1ff5ee4185 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -541,8 +541,9 @@ def test_uppercase_warning(self, tmpdir): with pytest.warns(UserWarning, match=msg): with get_dist(tmpdir) as dist: metadata = dist.metadata - assert metadata.name == 'foo' - assert metadata.description == 'Some description' + + assert metadata.name == 'foo' + assert metadata.description == 'Some description' class TestOptions: From 66323adeae5cb2d143d00db13fd96686c0887233 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Mar 2021 21:49:29 -0500 Subject: [PATCH 8420/8469] Make change a bugfix --- changelog.d/{2592.change.rst => 2592.bugfix.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2592.change.rst => 2592.bugfix.rst} (100%) diff --git a/changelog.d/2592.change.rst b/changelog.d/2592.bugfix.rst similarity index 100% rename from changelog.d/2592.change.rst rename to changelog.d/2592.bugfix.rst From c71b7bdbd0148bda4924d4c9fc84c574e5e4c227 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Mar 2021 22:02:58 -0500 Subject: [PATCH 8421/8469] The term is misc :/ --- changelog.d/{2592.bugfix.rst => 2592.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{2592.bugfix.rst => 2592.misc.rst} (100%) diff --git a/changelog.d/2592.bugfix.rst b/changelog.d/2592.misc.rst similarity index 100% rename from changelog.d/2592.bugfix.rst rename to changelog.d/2592.misc.rst From d2ae3cd2cfc66c300bc6661ca33f0ba1f651fd56 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 6 Mar 2021 22:04:03 -0500 Subject: [PATCH 8422/8469] =?UTF-8?q?Bump=20version:=2054.1.0=20=E2=86=92?= =?UTF-8?q?=2054.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 15 +++++++++++++++ changelog.d/2584.doc.rst | 1 - changelog.d/2592.misc.rst | 3 --- setup.cfg | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/2584.doc.rst delete mode 100644 changelog.d/2592.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9a23064374..1d2c227839 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.1.0 +current_version = 54.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 3920b27e93..bedd1faa01 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,18 @@ +v54.1.1 +------- + + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2584: Added ``sphinx-inline-tabs`` extension to allow for comparison of ``setup.py`` and its equivalent ``setup.cfg`` -- by :user:`amy-lei` + +Misc +^^^^ +* #2592: Made option keys in the ``[metadata]`` section of ``setup.cfg`` case-sensitive. Users having + uppercase option spellings will get a warning suggesting to make them to lowercase + -- by :user:`melissa-kun-li` + + v54.1.0 ------- diff --git a/changelog.d/2584.doc.rst b/changelog.d/2584.doc.rst deleted file mode 100644 index 3474049963..0000000000 --- a/changelog.d/2584.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added ``sphinx-inline-tabs`` extension to allow for comparison of ``setup.py`` and its equivalent ``setup.cfg`` -- by :user:`amy-lei` \ No newline at end of file diff --git a/changelog.d/2592.misc.rst b/changelog.d/2592.misc.rst deleted file mode 100644 index a38ae0c4c4..0000000000 --- a/changelog.d/2592.misc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Made option keys in the ``[metadata]`` section of ``setup.cfg`` case-sensitive. Users having -uppercase option spellings will get a warning suggesting to make them to lowercase --- by :user:`melissa-kun-li` diff --git a/setup.cfg b/setup.cfg index bc31dc2e6b..7b05eed32f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.1.0 +version = 54.1.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 7bdab57872da46ef6a5a7f5ea9099a197bdc3131 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Mar 2021 12:23:48 -0500 Subject: [PATCH 8423/8469] Add comments indicating why the exclusions are present --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index 81f70eeab7..dd215c65bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,8 +34,10 @@ testing = pytest >= 4.6 pytest-checkdocs >= 1.2.3 pytest-flake8 + # python_implementation: workaround for jaraco/skeleton#22 pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov + # python_implementation: workaround for jaraco/skeleton#22 pytest-mypy; python_implementation != "PyPy" pytest-enabler From 14312a5bd75d3313ffd3e14fc7fbbc2a9b05cee5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Mar 2021 12:24:21 -0500 Subject: [PATCH 8424/8469] Exclude mypy on Python 3.10 as workaround for python/typed_ast#156. --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index dd215c65bb..55497f8efc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,7 +38,8 @@ testing = pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov # python_implementation: workaround for jaraco/skeleton#22 - pytest-mypy; python_implementation != "PyPy" + # python_version: workaround for python/typed_ast#156 + pytest-mypy; python_implementation != "PyPy" and python_version < "3.10" pytest-enabler # local From af5445115af0cb68e671a678538a0207389586be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Mar 2021 12:30:25 -0500 Subject: [PATCH 8425/8469] Bump minimums on pytest-checkdocs and pytest-enabler as found on Setuptools. --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 55497f8efc..3f6610be8b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ exclude = testing = # upstream pytest >= 4.6 - pytest-checkdocs >= 1.2.3 + pytest-checkdocs >= 2.4 pytest-flake8 # python_implementation: workaround for jaraco/skeleton#22 pytest-black >= 0.3.7; python_implementation != "PyPy" @@ -40,7 +40,7 @@ testing = # python_implementation: workaround for jaraco/skeleton#22 # python_version: workaround for python/typed_ast#156 pytest-mypy; python_implementation != "PyPy" and python_version < "3.10" - pytest-enabler + pytest-enabler >= 1.0.1 # local From 86efb884f805a9e1f64661ec758f3bd084fed515 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Mar 2021 12:53:54 -0500 Subject: [PATCH 8426/8469] Also deny black on Python 3.10 as workaround for python/typed_ast#156. --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 3f6610be8b..52876d55f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,8 @@ testing = pytest-checkdocs >= 2.4 pytest-flake8 # python_implementation: workaround for jaraco/skeleton#22 - pytest-black >= 0.3.7; python_implementation != "PyPy" + # python_version: workaround for python/typed_ast#156 + pytest-black >= 0.3.7; python_implementation != "PyPy" and python_version < "3.10" pytest-cov # python_implementation: workaround for jaraco/skeleton#22 # python_version: workaround for python/typed_ast#156 From b2f7b8f92725c63b164d5776f85e67cc560def4e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Mar 2021 13:37:29 -0500 Subject: [PATCH 8427/8469] Don't bother testing old versions of pip on Python 3.10 and later. Fixes #2599. --- setuptools/tests/test_virtualenv.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index f13f7997e3..9cf6d30f7d 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -74,10 +74,15 @@ def mark(param, *marks): def skip_network(param): return param if network else mark(param, pytest.mark.skip(reason="no network")) + issue2599 = pytest.mark.skipif( + sys.version_info > (3, 10), + reason="pypa/setuptools#2599", + ) + network_versions = [ - 'pip==9.0.3', - 'pip==10.0.1', - 'pip==18.1', + mark('pip==9.0.3', issue2599), + mark('pip==10.0.1', issue2599), + mark('pip==18.1', issue2599), mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', 'https://github.com/pypa/pip/archive/master.zip', From 938a33922c8cba3bbff6dfd1c2f723e5f929d6ce Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Mon, 8 Mar 2021 02:59:16 -0500 Subject: [PATCH 8428/8469] Reduce scope of dash deprecation warning to Setuptools and distutils --- setuptools/dist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index 70c0e6becb..d1587e3415 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -11,6 +11,7 @@ import distutils.core import distutils.cmd import distutils.dist +import distutils.command from distutils.util import strtobool from distutils.debug import DEBUG from distutils.fancy_getopt import translate_longopt @@ -29,6 +30,7 @@ from . import SetuptoolsDeprecationWarning import setuptools +import setuptools.command from setuptools import windows_support from setuptools.monkey import get_unpatched from setuptools.config import parse_configuration @@ -629,7 +631,13 @@ def dash_to_underscore_warning(self, opt, section): 'options.extras_require', 'options.data_files', ): return opt + underscore_opt = opt.replace('-', '_') + commands = distutils.command.__all__ + setuptools.command.__all__ + if (not section.startswith('options') and section != 'metadata' + and section not in commands): + return underscore_opt + if '-' in opt: warnings.warn( "Usage of dash-separated '%s' will not be supported in future " From 7129ad1107f7015fe16f275eec17bf36a8badd84 Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Mon, 8 Mar 2021 03:25:14 -0500 Subject: [PATCH 8429/8469] Fix formatting of tests and change dash deprecation method name --- setuptools/dist.py | 4 ++-- setuptools/tests/test_config.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/setuptools/dist.py b/setuptools/dist.py index d1587e3415..7cebcb37f4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -600,7 +600,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 continue val = parser.get(section, opt) - opt = self.dash_to_underscore_warning(opt, section) + opt = self.warn_dash_deprecation(opt, section) opt = self.make_option_lowercase(opt, section) opt_dict[opt] = (filename, val) @@ -626,7 +626,7 @@ def _parse_config_files(self, filenames=None): # noqa: C901 except ValueError as e: raise DistutilsOptionError(e) from e - def dash_to_underscore_warning(self, opt, section): + def warn_dash_deprecation(self, opt, section): if section in ( 'options.extras_require', 'options.data_files', ): diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 1ff5ee4185..21f1becd49 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -507,10 +507,9 @@ def test_not_utf8(self, tmpdir): with get_dist(tmpdir): pass - def test_dash_to_underscore_warning(self, tmpdir): - # dash_to_underscore_warning() is a method in setuptools.dist - # remove this test and method when dash convert to underscore in setup.cfg - # is no longer supported + def test_warn_dash_deprecation(self, tmpdir): + # warn_dash_deprecation() is a method in setuptools.dist + # remove this test and the method when no longer needed fake_env( tmpdir, '[metadata]\n' @@ -523,11 +522,12 @@ def test_dash_to_underscore_warning(self, tmpdir): with pytest.warns(UserWarning, match=msg): with get_dist(tmpdir) as dist: metadata = dist.metadata - assert metadata.author_email == 'test@test.com' - assert metadata.maintainer_email == 'foo@foo.com' - def test_uppercase_warning(self, tmpdir): - # remove this test and the method uppercase_warning() in setuptools.dist + assert metadata.author_email == 'test@test.com' + assert metadata.maintainer_email == 'foo@foo.com' + + def test_make_option_lowercase(self, tmpdir): + # remove this test and the method make_option_lowercase() in setuptools.dist # when no longer needed fake_env( tmpdir, From 214ba3de5cf8bf6cdff824059732eebd26f3d40c Mon Sep 17 00:00:00 2001 From: Melissa Li Date: Mon, 8 Mar 2021 03:41:04 -0500 Subject: [PATCH 8430/8469] Add changelog --- changelog.d/2595.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2595.misc.rst diff --git a/changelog.d/2595.misc.rst b/changelog.d/2595.misc.rst new file mode 100644 index 0000000000..976117dc9a --- /dev/null +++ b/changelog.d/2595.misc.rst @@ -0,0 +1 @@ +Reduced scope of dash deprecation warning to Setuptools/distutils only -- by :user:`melissa-kun-li` \ No newline at end of file From e6fdc967a538c7c08768a4898317572a76de2f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 12 Feb 2021 09:55:57 +0100 Subject: [PATCH 8431/8469] Remove bdist_wininst Fixes https://github.com/pypa/setuptools/issues/2558 --- changelog.d/2566.breaking.rst | 1 + setuptools/command/__init__.py | 2 +- setuptools/command/bdist_wininst.py | 30 --------------------- setuptools/command/install_scripts.py | 3 ++- setuptools/tests/test_bdist_deprecations.py | 23 ---------------- 5 files changed, 4 insertions(+), 55 deletions(-) create mode 100644 changelog.d/2566.breaking.rst delete mode 100644 setuptools/command/bdist_wininst.py delete mode 100644 setuptools/tests/test_bdist_deprecations.py diff --git a/changelog.d/2566.breaking.rst b/changelog.d/2566.breaking.rst new file mode 100644 index 0000000000..e56945750b --- /dev/null +++ b/changelog.d/2566.breaking.rst @@ -0,0 +1 @@ +Remove the deprecated ``bdist_wininst`` command. Binary packages should be built as wheels instead. -- by :user:`hroncok` diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 743f5588fa..570e69576e 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'bdist_wininst', 'upload_docs', 'build_clib', 'dist_info', + 'upload_docs', 'build_clib', 'dist_info', ] from distutils.command.bdist import bdist diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py deleted file mode 100644 index ff4b634592..0000000000 --- a/setuptools/command/bdist_wininst.py +++ /dev/null @@ -1,30 +0,0 @@ -import distutils.command.bdist_wininst as orig -import warnings - -from setuptools import SetuptoolsDeprecationWarning - - -class bdist_wininst(orig.bdist_wininst): - def reinitialize_command(self, command, reinit_subcommands=0): - """ - Supplement reinitialize_command to work around - http://bugs.python.org/issue20819 - """ - cmd = self.distribution.reinitialize_command( - command, reinit_subcommands) - if command in ('install', 'install_lib'): - cmd.install_lib = None - return cmd - - def run(self): - warnings.warn( - "bdist_wininst is deprecated and will be removed in a future " - "version. Use bdist_wheel (wheel packages) instead.", - SetuptoolsDeprecationWarning - ) - - self._is_running = True - try: - orig.bdist_wininst.run(self) - finally: - self._is_running = False diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 8c9a15e2bb..9cd8eb0627 100644 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,5 +1,6 @@ from distutils import log import distutils.command.install_scripts as orig +from distutils.errors import DistutilsModuleError import os import sys @@ -35,7 +36,7 @@ def run(self): try: bw_cmd = self.get_finalized_command("bdist_wininst") is_wininst = getattr(bw_cmd, '_is_running', False) - except ImportError: + except (ImportError, DistutilsModuleError): is_wininst = False writer = ei.ScriptWriter if is_wininst: diff --git a/setuptools/tests/test_bdist_deprecations.py b/setuptools/tests/test_bdist_deprecations.py deleted file mode 100644 index 704164aacb..0000000000 --- a/setuptools/tests/test_bdist_deprecations.py +++ /dev/null @@ -1,23 +0,0 @@ -"""develop tests -""" -import mock - -import pytest - -from setuptools.dist import Distribution -from setuptools import SetuptoolsDeprecationWarning - - -@mock.patch("distutils.command.bdist_wininst.bdist_wininst") -def test_bdist_wininst_warning(distutils_cmd): - dist = Distribution(dict( - script_name='setup.py', - script_args=['bdist_wininst'], - name='foo', - py_modules=['hi'], - )) - dist.parse_command_line() - with pytest.warns(SetuptoolsDeprecationWarning): - dist.run_commands() - - distutils_cmd.run.assert_called_once() From 5d60ccefb48329b7cedfe6d78fc1cb95683104b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 12 Feb 2021 09:56:14 +0100 Subject: [PATCH 8432/8469] Filter out distutils deprecation warning until the situation is resolved The distutils platform problems are likely to be resolved before the removal. Once this happens, setuptools will no longer use distutils from the Python standard library. --- _distutils_hack/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index c31edfed17..47ce24944b 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -8,6 +8,11 @@ is_pypy = '__pypy__' in sys.builtin_module_names +warnings.filterwarnings('ignore', + '.+ distutils .+ deprecated', + DeprecationWarning) + + def warn_distutils_present(): if 'distutils' not in sys.modules: return From 8230bbf82b07d25bcc65e612e0e936dce269e463 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 14 Mar 2021 11:08:14 -0400 Subject: [PATCH 8433/8469] =?UTF-8?q?Bump=20version:=2054.1.1=20=E2=86=92?= =?UTF-8?q?=2054.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2595.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2595.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1d2c227839..2c0c640ec0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.1.1 +current_version = 54.1.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index bedd1faa01..c8db71ee59 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v54.1.2 +------- + + +Misc +^^^^ +* #2595: Reduced scope of dash deprecation warning to Setuptools/distutils only -- by :user:`melissa-kun-li` + + v54.1.1 ------- diff --git a/changelog.d/2595.misc.rst b/changelog.d/2595.misc.rst deleted file mode 100644 index 976117dc9a..0000000000 --- a/changelog.d/2595.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Reduced scope of dash deprecation warning to Setuptools/distutils only -- by :user:`melissa-kun-li` \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 7da11a03ee..2c4cb02fbb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.1.1 +version = 54.1.2 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 7fe4ab8294a843622d20face7f9f6ccddb2d0a14 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 15 Mar 2021 18:31:04 -0400 Subject: [PATCH 8434/8469] Add leading */ to coverage.run.omit. Workaround for pytest-dev/pytest-cov#456. --- .coveragerc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.coveragerc b/.coveragerc index 45823064a3..6a34e662d3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,7 @@ [run] -omit = .tox/* +omit = + # leading `*/` for pytest-dev/pytest-cov#456 + */.tox/* [report] show_missing = True From 024b1e13b644cc9829d2a15cd5867920e11c9a9e Mon Sep 17 00:00:00 2001 From: layday Date: Tue, 16 Mar 2021 18:58:11 +0200 Subject: [PATCH 8435/8469] build_meta: produce informative error when a dist is not found Previously, when `build_sdist` or `build_wheel` were unable to build a distribution (and were therefore unable to find the distribution file), they would throw a ValueError: not enough values to unpack (expected 1, got 0) which did not offer any clues as to where the issue might lie. --- changelog.d/2608.change.rst | 2 ++ setuptools/build_meta.py | 8 ++++++-- setuptools/tests/test_build_meta.py | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 changelog.d/2608.change.rst diff --git a/changelog.d/2608.change.rst b/changelog.d/2608.change.rst new file mode 100644 index 0000000000..d469f15e2e --- /dev/null +++ b/changelog.d/2608.change.rst @@ -0,0 +1,2 @@ +Added informative error message to PEP 517 build failures owing to +an empty ``setup.py`` -- by :user:layday diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index b9e8a2b3fa..3c45db72fb 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -101,8 +101,12 @@ def _file_with_extension(directory, extension): f for f in os.listdir(directory) if f.endswith(extension) ) - file, = matching - return file + try: + return next(matching) + except StopIteration: + raise ValueError('No distribution was found. The distribution was ' + 'possibly not built. Ensure that your `setup.py` ' + 'is not empty and that it calls `setup()`.') def _open_setup_script(setup_script): diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index f33a69688d..f776b09d71 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -3,6 +3,7 @@ import tarfile import importlib from concurrent import futures +import re import pytest from jaraco import path @@ -442,6 +443,19 @@ def test_sys_argv_passthrough(self, tmpdir_cwd): with pytest.raises(AssertionError): build_backend.build_sdist("temp") + @pytest.mark.parametrize('build_hook', ('build_sdist', 'build_wheel')) + def test_build_with_empty_setuppy(self, build_backend, build_hook): + files = {'setup.py': ''} + path.build(files) + + with pytest.raises( + ValueError, + match=re.escape( + 'No distribution was found. The distribution was ' + 'possibly not built. Ensure that your `setup.py` ' + 'is not empty and that it calls `setup()`.')): + getattr(build_backend, build_hook)("temp") + class TestBuildMetaLegacyBackend(TestBuildMetaBackend): backend_name = 'setuptools.build_meta:__legacy__' From 8f2cc7a1f6cfbfdd8fd07b92dc086b24f2d00e41 Mon Sep 17 00:00:00 2001 From: layday Date: Tue, 16 Mar 2021 19:10:19 +0200 Subject: [PATCH 8436/8469] fixup! build_meta: produce informative error when a dist is not found --- changelog.d/2608.change.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/2608.change.rst b/changelog.d/2608.change.rst index d469f15e2e..f966649ae7 100644 --- a/changelog.d/2608.change.rst +++ b/changelog.d/2608.change.rst @@ -1,2 +1,2 @@ Added informative error message to PEP 517 build failures owing to -an empty ``setup.py`` -- by :user:layday +an empty ``setup.py`` -- by :user:`layday` From b4d8e4755eafc786a9848333ca73bff381747745 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Mar 2021 21:19:49 -0400 Subject: [PATCH 8437/8469] Add test capturing missed expectation. Ref #2612. --- setuptools/tests/fixtures.py | 14 ++++++++++++++ setuptools/tests/test_develop.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py index d74b5f031a..a5a172e0f9 100644 --- a/setuptools/tests/fixtures.py +++ b/setuptools/tests/fixtures.py @@ -1,6 +1,7 @@ import contextlib import sys import shutil +import subprocess import pytest @@ -58,3 +59,16 @@ def workaround_xdist_376(request): with contextlib.suppress(ValueError): sys.path.remove('') + + +@pytest.fixture +def sample_project(tmp_path): + """ + Clone the 'sampleproject' and return a path to it. + """ + cmd = ['git', 'clone', 'https://github.com/pypa/sampleproject'] + try: + subprocess.check_call(cmd, cwd=str(tmp_path)) + except Exception: + pytest.skip("Unable to clone sampleproject") + return tmp_path / 'sampleproject' diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 2766da2f79..e793c36d9f 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -7,6 +7,7 @@ import io import subprocess import platform +import pathlib from setuptools.command import test @@ -199,3 +200,32 @@ def test_namespace_package_importable(self, tmpdir): ] with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp) + + @pytest.mark.xfail(reason="#2612") + def test_editable_prefix(self, tmp_path, sample_project): + """ + Editable install to a prefix should be discoverable. + """ + prefix = tmp_path / 'prefix' + prefix.mkdir() + + cmd = [ + sys.executable, + '-m', 'pip', + 'install', + '-e', str(sample_project), + '--prefix', str(prefix), + ] + subprocess.check_call(cmd) + + # now run 'sample' with the prefix on the PYTHONPATH + site_packages = prefix / next( + pathlib.Path(path).relative_to(sys.prefix) + for path in sys.path + if 'site-packages' in path + and path.startswith(sys.prefix) + ) + env = dict(PYTHONPATH=site_packages) + bin = 'Scripts' if platform.system() == 'Windows' else 'bin' + sample = prefix / bin / 'sample' + subprocess.check_call([sample], env=env) From cb962021c53b7130bf0a1792f75678efcc0724be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Mar 2021 03:38:43 -0400 Subject: [PATCH 8438/8469] Illustrate how one might leverage sitecustomize.py to make a project available on PYTHONPATH. Fixes #2612. --- setuptools/tests/test_develop.py | 42 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index e793c36d9f..0dea40bd79 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -8,6 +8,7 @@ import subprocess import platform import pathlib +import textwrap from setuptools.command import test @@ -201,7 +202,17 @@ def test_namespace_package_importable(self, tmpdir): with test.test.paths_on_pythonpath([str(target)]): subprocess.check_call(pkg_resources_imp) - @pytest.mark.xfail(reason="#2612") + @staticmethod + def install_workaround(site_packages): + site_packages.mkdir(parents=True) + sc = site_packages / 'sitecustomize.py' + sc.write_text(textwrap.dedent(""" + import site + import pathlib + here = pathlib.Path(__file__).parent + site.addsitedir(str(here)) + """).lstrip()) + def test_editable_prefix(self, tmp_path, sample_project): """ Editable install to a prefix should be discoverable. @@ -209,23 +220,30 @@ def test_editable_prefix(self, tmp_path, sample_project): prefix = tmp_path / 'prefix' prefix.mkdir() + # figure out where pip will likely install the package + site_packages = prefix / next( + pathlib.Path(path).relative_to(sys.prefix) + for path in sys.path + if 'site-packages' in path + and path.startswith(sys.prefix) + ) + + # install the workaround + self.install_workaround(site_packages) + + env = dict(PYTHONPATH=site_packages) cmd = [ sys.executable, '-m', 'pip', 'install', - '-e', str(sample_project), + '--editable', + str(sample_project), '--prefix', str(prefix), + '--no-build-isolation', ] - subprocess.check_call(cmd) + subprocess.check_call(cmd, env=env) # now run 'sample' with the prefix on the PYTHONPATH - site_packages = prefix / next( - pathlib.Path(path).relative_to(sys.prefix) - for path in sys.path - if 'site-packages' in path - and path.startswith(sys.prefix) - ) - env = dict(PYTHONPATH=site_packages) bin = 'Scripts' if platform.system() == 'Windows' else 'bin' - sample = prefix / bin / 'sample' - subprocess.check_call([sample], env=env) + exe = prefix / bin / 'sample' + subprocess.check_call([exe], env=env) From 0c485af05591ba869b8adb96802d1cf4b49fe28d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Mar 2021 04:03:10 -0400 Subject: [PATCH 8439/8469] Cast values to str and retain other environ vars for Windows' sake --- setuptools/tests/test_develop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 0dea40bd79..a0e84b9a28 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -231,7 +231,7 @@ def test_editable_prefix(self, tmp_path, sample_project): # install the workaround self.install_workaround(site_packages) - env = dict(PYTHONPATH=site_packages) + env = dict(os.environ, PYTHONPATH=str(site_packages)) cmd = [ sys.executable, '-m', 'pip', @@ -246,4 +246,6 @@ def test_editable_prefix(self, tmp_path, sample_project): # now run 'sample' with the prefix on the PYTHONPATH bin = 'Scripts' if platform.system() == 'Windows' else 'bin' exe = prefix / bin / 'sample' + if sys.version_info < (3, 7) and platform.system() == 'Windows': + exe = str(exe) subprocess.check_call([exe], env=env) From 202c7a808e61a415d6a8c724a5d8fe664301863b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 Mar 2021 09:51:21 -0400 Subject: [PATCH 8440/8469] Expect failure on PyPy. --- setuptools/tests/test_develop.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index a0e84b9a28..df8db4e281 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -213,6 +213,10 @@ def install_workaround(site_packages): site.addsitedir(str(here)) """).lstrip()) + @pytest.mark.xfail( + platform.python_implementation() == 'PyPy', + reason="Workaround fails on PyPy (why?)", + ) def test_editable_prefix(self, tmp_path, sample_project): """ Editable install to a prefix should be discoverable. From f3ba2139eacd5d27d052f0659b5d7dc1413977b0 Mon Sep 17 00:00:00 2001 From: layday Date: Sun, 21 Mar 2021 19:36:14 +0200 Subject: [PATCH 8441/8469] fixup! fixup! build_meta: produce informative error when a dist is not found --- setuptools/build_meta.py | 6 +++--- setuptools/tests/test_build_meta.py | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 3c45db72fb..36fbc9e8a1 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -104,9 +104,9 @@ def _file_with_extension(directory, extension): try: return next(matching) except StopIteration: - raise ValueError('No distribution was found. The distribution was ' - 'possibly not built. Ensure that your `setup.py` ' - 'is not empty and that it calls `setup()`.') + raise ValueError( + 'No distribution was found. Ensure that `setup.py` ' + 'is not empty and that it calls `setup()`.') def _open_setup_script(setup_script): diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index f776b09d71..ab75a1896c 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -450,10 +450,7 @@ def test_build_with_empty_setuppy(self, build_backend, build_hook): with pytest.raises( ValueError, - match=re.escape( - 'No distribution was found. The distribution was ' - 'possibly not built. Ensure that your `setup.py` ' - 'is not empty and that it calls `setup()`.')): + match=re.escape('No distribution was found.')): getattr(build_backend, build_hook)("temp") From 2cec54e4f451d6318ad9fc18213d0f8f7d4aa669 Mon Sep 17 00:00:00 2001 From: layday Date: Sun, 21 Mar 2021 22:00:29 +0200 Subject: [PATCH 8442/8469] fixup! build_meta: produce informative error when a dist is not found --- setuptools/build_meta.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index 36fbc9e8a1..de85685445 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -102,11 +102,13 @@ def _file_with_extension(directory, extension): if f.endswith(extension) ) try: - return next(matching) - except StopIteration: + file, = matching + except ValueError: raise ValueError( 'No distribution was found. Ensure that `setup.py` ' 'is not empty and that it calls `setup()`.') + else: + return file def _open_setup_script(setup_script): From 99a9891ec20550421453ae60ebef5c8422f70e4c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Mar 2021 08:43:19 -0400 Subject: [PATCH 8443/8469] =?UTF-8?q?Bump=20version:=2054.1.2=20=E2=86=92?= =?UTF-8?q?=2054.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2c0c640ec0..89f47f621d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.1.2 +current_version = 54.1.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index c8db71ee59..8612991a41 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v54.1.3 +------- + +No significant changes. + + v54.1.2 ------- diff --git a/setup.cfg b/setup.cfg index 2c4cb02fbb..b3e5bb8adf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.1.2 +version = 54.1.3 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From e0655f6459c8ba7ee8a0befbaf55c0e89d25512a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Mar 2021 08:44:55 -0400 Subject: [PATCH 8444/8469] Remove superfluous else. --- setuptools/build_meta.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setuptools/build_meta.py b/setuptools/build_meta.py index de85685445..9dfb2f24b5 100644 --- a/setuptools/build_meta.py +++ b/setuptools/build_meta.py @@ -107,8 +107,7 @@ def _file_with_extension(directory, extension): raise ValueError( 'No distribution was found. Ensure that `setup.py` ' 'is not empty and that it calls `setup()`.') - else: - return file + return file def _open_setup_script(setup_script): From e0dc5bd639dcade02605aa901f5e43e4f027c484 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Mar 2021 08:46:01 -0400 Subject: [PATCH 8445/8469] =?UTF-8?q?Bump=20version:=2054.1.3=20=E2=86=92?= =?UTF-8?q?=2054.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 10 ++++++++++ changelog.d/2608.change.rst | 2 -- setup.cfg | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/2608.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 89f47f621d..fdde71809e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.1.3 +current_version = 54.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 8612991a41..dca490b75b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +v54.2.0 +------- + + +Changes +^^^^^^^ +* #2608: Added informative error message to PEP 517 build failures owing to + an empty ``setup.py`` -- by :user:`layday` + + v54.1.3 ------- diff --git a/changelog.d/2608.change.rst b/changelog.d/2608.change.rst deleted file mode 100644 index f966649ae7..0000000000 --- a/changelog.d/2608.change.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added informative error message to PEP 517 build failures owing to -an empty ``setup.py`` -- by :user:`layday` diff --git a/setup.cfg b/setup.cfg index b3e5bb8adf..1b0e618807 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.1.3 +version = 54.2.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 4b1568c71b5299b39a5579bb778c8930991448b8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 22 Mar 2021 19:58:47 -0400 Subject: [PATCH 8446/8469] Tidelift no longer requires or expects publishing release notes. --- tox.ini | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 tox.ini diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 35053514de..0000000000 --- a/tox.ini +++ /dev/null @@ -1,7 +0,0 @@ -[testenv:release] -deps = - jaraco.tidelift -passenv = - TIDELIFT_TOKEN -commands = - python -m jaraco.tidelift.publish-release-notes From 842eb1423ba76dadbf568f9b0abf04a233711529 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Mar 2021 18:52:10 -0400 Subject: [PATCH 8447/8469] Remove Tidelift from main.yml, no longer needed --- .github/workflows/main.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 01999cabbf..0000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,6 +0,0 @@ -jobs: - release: - steps: - - name: Release - env: - TIDELIFT_TOKEN: ${{ secrets.TIDELIFT_TOKEN }} From adae68e251a4418f348ff501261487c06666ebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Gmach?= Date: Wed, 24 Mar 2021 16:42:20 +0100 Subject: [PATCH 8448/8469] remove duplicate word --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0917804f41..45adb6a1ea 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2193,7 +2193,7 @@ def _get_script_args(cls, type_, name, header, script_text): @classmethod def _adjust_header(cls, type_, orig_header): """ - Make sure 'pythonw' is used for gui and and 'python' is used for + Make sure 'pythonw' is used for gui and 'python' is used for console (regardless of what sys.executable is). """ pattern = 'pythonw.exe' From 0ffe795dbf920da44db9744759e38b92dad7f9e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Mar 2021 15:22:04 -0400 Subject: [PATCH 8449/8469] Pin to upstream main branch for sphinx-inline-tabs. Workaround for #2614. --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0292759301..bf408839e8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,6 +3,6 @@ sphinx jaraco.packaging>=6.1 rst.linker>=1.9 pygments-github-lexers==0.0.5 -sphinx-inline-tabs +sphinx-inline-tabs@git+https://github.com/pradyunsg/sphinx-inline-tabs@main setuptools>=34 From 3d660e49a4d1a1b7fb8fca725b17958a9e16c5c4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Mar 2021 16:50:43 -0400 Subject: [PATCH 8450/8469] Reset RTD config to match skeleton and rely on package metadata for docs build requirements. --- .readthedocs.yml | 4 +++- docs/requirements.txt | 8 -------- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 850d79c4a1..cc698548db 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,4 +1,6 @@ version: 2 python: install: - - requirements: docs/requirements.txt + - path: . + extra_requirements: + - docs diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index bf408839e8..0000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -# keep these in sync with setup.cfg -sphinx -jaraco.packaging>=6.1 -rst.linker>=1.9 -pygments-github-lexers==0.0.5 -sphinx-inline-tabs@git+https://github.com/pradyunsg/sphinx-inline-tabs@main - -setuptools>=34 diff --git a/setup.cfg b/setup.cfg index 1b0e618807..05ddf01dae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,10 +72,10 @@ docs = sphinx jaraco.packaging >= 8.2 rst.linker >= 1.9 - sphinx-inline-tabs # local pygments-github-lexers==0.0.5 + sphinx-inline-tabs@git+https://github.com/pradyunsg/sphinx-inline-tabs@main ssl = wincertstore==0.2; sys_platform=='win32' From b5eadccc4d51363fac26d6fd7093db1fd83b8ccd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Mar 2021 17:04:18 -0400 Subject: [PATCH 8451/8469] Remove latent comment. Meant for previous commit. --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 05ddf01dae..b8805d93fb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -67,7 +67,6 @@ testing = jaraco.path>=3.2.0 docs = - # Keep these in sync with docs/requirements.txt # upstream sphinx jaraco.packaging >= 8.2 From 63789e80d9d3c680f8b5ba63f21fae4644c4ea16 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 15:40:24 +0200 Subject: [PATCH 8452/8469] Tests - Fix url for pip download --- setuptools/tests/test_virtualenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 9cf6d30f7d..399dbaf0bb 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -85,7 +85,7 @@ def skip_network(param): mark('pip==18.1', issue2599), mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', - 'https://github.com/pypa/pip/archive/master.zip', + 'https://github.com/pypa/pip/archive/main.zip', ] versions = itertools.chain( From a80e8868d336f04648c82dde85714949b8cab17f Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 28 Mar 2021 16:09:06 +0200 Subject: [PATCH 8453/8469] Use sphinx-inline-tabs from PyPI Fixes #2614 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index b8805d93fb..7673fceb57 100644 --- a/setup.cfg +++ b/setup.cfg @@ -74,7 +74,7 @@ docs = # local pygments-github-lexers==0.0.5 - sphinx-inline-tabs@git+https://github.com/pradyunsg/sphinx-inline-tabs@main + sphinx-inline-tabs ssl = wincertstore==0.2; sys_platform=='win32' From c0b90dba0326d637ec44d2b67cb0fadcead1c640 Mon Sep 17 00:00:00 2001 From: Zack Didcott <66186954+Zedeldi@users.noreply.github.com> Date: Mon, 29 Mar 2021 00:26:32 +0000 Subject: [PATCH 8454/8469] Update dependency_management.rst Fix spelling and grammar --- docs/userguide/dependency_management.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst index 6108d9b2e9..188083e0fb 100644 --- a/docs/userguide/dependency_management.rst +++ b/docs/userguide/dependency_management.rst @@ -3,7 +3,7 @@ Dependencies Management in Setuptools ===================================== There are three types of dependency styles offered by setuptools: -1) build system requirement, required dependency and 3) optional +1) build system requirement, 2) required dependency and 3) optional dependency. .. Note:: @@ -19,8 +19,8 @@ Build system requirement Package requirement ------------------- After organizing all the scripts and files and getting ready for packaging, -there needs to be a way to tell Python what programs it need to actually -do the packgaging (in our case, ``setuptools`` of course). Usually, +there needs to be a way to tell Python what programs it needs to actually +do the packaging (in our case, ``setuptools`` of course). Usually, you also need the ``wheel`` package as well since it is recommended that you upload a ``.whl`` file to PyPI alongside your ``.tar.gz`` file. Unlike the other two types of dependency keyword, this one is specified in your @@ -47,7 +47,7 @@ Declaring required dependency This is where a package declares its core dependencies, without which it won't be able to run. ``setuptools`` support automatically download and install these dependencies when the package is installed. Although there is more -finess to it, let's start with a simple example. +finesse to it, let's start with a simple example. .. tab:: setup.cfg From 07d5e663650f594288dda1c92f2cda010a2a899b Mon Sep 17 00:00:00 2001 From: "T. Wouters" Date: Mon, 29 Mar 2021 15:02:41 +0200 Subject: [PATCH 8455/8469] Fix typo in setup.py example in quickstart guide. --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 7f111dd575..4ee5909851 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -62,7 +62,7 @@ the minimum from setuptools import setup setup( - name='mypackage"' + name='mypackage' version='0.0.1', packages=['mypackage'], install_requires=[ From c91153a1bf73ceb65efd611603edf638a996f720 Mon Sep 17 00:00:00 2001 From: "T. Wouters" Date: Mon, 29 Mar 2021 15:10:26 +0200 Subject: [PATCH 8456/8469] Update quickstart.rst --- docs/userguide/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 4ee5909851..2807f59bee 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -62,7 +62,7 @@ the minimum from setuptools import setup setup( - name='mypackage' + name='mypackage', version='0.0.1', packages=['mypackage'], install_requires=[ From 6dffcbe97d556809788afb8bed66ac4860c0d939 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 Mar 2021 22:00:07 -0400 Subject: [PATCH 8457/8469] Section for 'find' and 'find_namespace' options is 'options.packages.find'. Fixes #2406. --- docs/userguide/package_discovery.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 842ade828d..0a8070ae43 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -156,7 +156,7 @@ to use ``find_namespace:``: =src packages = find_namespace: - [options.packages.find_namespace] + [options.packages.find] where = src When you install the zipped distribution, ``timmins.foo`` would become From 30cf7823c7acd8ba5503ed3fdc7dc9cb28800880 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 Mar 2021 22:02:15 -0400 Subject: [PATCH 8458/8469] =?UTF-8?q?Bump=20version:=2054.2.0=20=E2=86=92?= =?UTF-8?q?=2055.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ changelog.d/2566.breaking.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2566.breaking.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index fdde71809e..7fe611a698 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.2.0 +current_version = 55.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index dca490b75b..d073fa8ef3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v55.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2566: Remove the deprecated ``bdist_wininst`` command. Binary packages should be built as wheels instead. -- by :user:`hroncok` + + v54.2.0 ------- diff --git a/changelog.d/2566.breaking.rst b/changelog.d/2566.breaking.rst deleted file mode 100644 index e56945750b..0000000000 --- a/changelog.d/2566.breaking.rst +++ /dev/null @@ -1 +0,0 @@ -Remove the deprecated ``bdist_wininst`` command. Binary packages should be built as wheels instead. -- by :user:`hroncok` diff --git a/setup.cfg b/setup.cfg index 7673fceb57..6bb6508f8b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.2.0 +version = 55.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From 8fe85c22cee7fde5e6af571b30f864bad156a010 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 Apr 2021 13:13:28 -0400 Subject: [PATCH 8459/8469] Officially declare pkg_resources as deprecated. Closes #2531. --- docs/pkg_resources.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst index 19d43244d1..994bea6f2b 100644 --- a/docs/pkg_resources.rst +++ b/docs/pkg_resources.rst @@ -10,6 +10,13 @@ eggs, support for merging packages that have separately-distributed modules or subpackages, and APIs for managing Python's current "working set" of active packages. +Use of ``pkg_resources`` is discouraged in favor of +`importlib.resources `_, +`importlib.metadata `_, +and their backports (`resources `_, +`metadata `_). +Please consider using those libraries instead of pkg_resources. + .. contents:: **Table of Contents** From 749b97499ea36d9a7660ed73db622837ae64c57d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 13:37:48 +0200 Subject: [PATCH 8460/8469] license_files - Add support for glob patterns + add default patterns --- setuptools/command/sdist.py | 53 +++++++++++++++++++------------ setuptools/tests/test_egg_info.py | 4 +-- setuptools/tests/test_manifest.py | 1 + 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 887b7efa05..cd308ab9dd 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,6 +4,8 @@ import sys import io import contextlib +import warnings +from glob import iglob from setuptools.extern import ordered_set @@ -194,29 +196,38 @@ def check_license(self): """Checks if license_file' or 'license_files' is configured and adds any valid paths to 'self.filelist'. """ - - files = ordered_set.OrderedSet() - opts = self.distribution.get_option_dict('metadata') - # ignore the source of the value - _, license_file = opts.get('license_file', (None, None)) - - if license_file is None: - log.debug("'license_file' option was not specified") - else: - files.add(license_file) - + files = ordered_set.OrderedSet() try: - files.update(self.distribution.metadata.license_files) + license_files = self.distribution.metadata.license_files except TypeError: log.warn("warning: 'license_files' option is malformed") - - for f in files: - if not os.path.exists(f): - log.warn( - "warning: Failed to find the configured license file '%s'", - f) - files.remove(f) - - self.filelist.extend(files) + license_files = ordered_set.OrderedSet() + patterns = license_files if isinstance(license_files, ordered_set.OrderedSet) \ + else ordered_set.OrderedSet(license_files) + + if 'license_file' in opts: + warnings.warn( + "The 'license_file' option is deprecated. Use 'license_files' instead.", + DeprecationWarning) + patterns.append(opts['license_file'][1]) + + if 'license_file' not in opts and 'license_files' not in opts: + patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*') + + for pattern in patterns: + for path in iglob(pattern): + if path.endswith('~'): + log.debug( + "ignoring license file '%s' as it looks like a backup", + path) + continue + + if path not in files and os.path.isfile(path): + log.info( + "adding license file '%s' (matched pattern '%s')", + path, pattern) + files.add(path) + + self.filelist.extend(sorted(files)) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index bf95b03ce6..4915c0cb40 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -537,7 +537,7 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): 'setup.cfg': DALS(""" """), 'LICENSE': "Test license" - }, False), # no license_file attribute + }, True), # no license_file attribute, LICENSE auto-included ({ 'setup.cfg': DALS(""" [metadata] @@ -625,7 +625,7 @@ def test_setup_cfg_license_file( 'setup.cfg': DALS(""" """), 'LICENSE': "Test license" - }, [], ['LICENSE']), # no license_files attribute + }, ['LICENSE'], []), # no license_files attribute, LICENSE auto-included ({ 'setup.cfg': DALS(""" [metadata] diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 82bdb9c643..589cefb2c0 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -55,6 +55,7 @@ def touch(filename): default_files = frozenset(map(make_local_path, [ 'README.rst', 'MANIFEST.in', + 'LICENSE', 'setup.py', 'app.egg-info/PKG-INFO', 'app.egg-info/SOURCES.txt', From 91e7956d961ef84080c30eb5253c220fa3b001dc Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 13:39:35 +0200 Subject: [PATCH 8461/8469] Add documentation + changelog entries --- changelog.d/2620.breaking.rst | 5 +++++ changelog.d/2620.change.rst | 1 + changelog.d/2620.deprecation.rst | 2 ++ changelog.d/2620.doc.rst | 1 + docs/references/keywords.rst | 12 ++++++++++++ docs/userguide/declarative_config.rst | 2 +- 6 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2620.breaking.rst create mode 100644 changelog.d/2620.change.rst create mode 100644 changelog.d/2620.deprecation.rst create mode 100644 changelog.d/2620.doc.rst diff --git a/changelog.d/2620.breaking.rst b/changelog.d/2620.breaking.rst new file mode 100644 index 0000000000..de91facc57 --- /dev/null +++ b/changelog.d/2620.breaking.rst @@ -0,0 +1,5 @@ +If neither ``license_file`` nor ``license_files`` is specified, the ``sdist`` +option will now auto-include files that match the following patterns: +``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``. +This matches the behavior of ``bdist_wheel``. +Any ``exclude`` in ``MANIFEST.in`` will overwrite it. -- by :user:`cdce8p` diff --git a/changelog.d/2620.change.rst b/changelog.d/2620.change.rst new file mode 100644 index 0000000000..5470592d17 --- /dev/null +++ b/changelog.d/2620.change.rst @@ -0,0 +1 @@ +The ``license_file`` and ``license_files`` options now support glob patterns. -- by :user:`cdce8p` diff --git a/changelog.d/2620.deprecation.rst b/changelog.d/2620.deprecation.rst new file mode 100644 index 0000000000..1af5f2461a --- /dev/null +++ b/changelog.d/2620.deprecation.rst @@ -0,0 +1,2 @@ +The ``license_file`` option is now marked as deprecated. +Use ``license_files`` instead. -- by :user:`cdce8p` diff --git a/changelog.d/2620.doc.rst b/changelog.d/2620.doc.rst new file mode 100644 index 0000000000..7564adaca4 --- /dev/null +++ b/changelog.d/2620.doc.rst @@ -0,0 +1 @@ +Added documentation for the ``license_files`` option. -- by :user:`cdce8p` diff --git a/docs/references/keywords.rst b/docs/references/keywords.rst index 03ce9fa23a..6485437b84 100644 --- a/docs/references/keywords.rst +++ b/docs/references/keywords.rst @@ -76,6 +76,18 @@ Keywords ``license`` A string specifying the license of the package. +``license_file`` + + .. warning:: + ``license_file`` is deprecated. Use ``license_files`` instead. + +``license_files`` + + A list of glob patterns for license related files that should be included. + If neither ``license_file`` nor ``license_files`` is specified, this option + defaults to ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, and ``AUTHORS*``. + Any ``exclude`` specified in ``MANIFEST.in`` will overwrite it. + ``keywords`` A list of strings or a comma-separated string providing descriptive meta-data. See: `PEP 0314`_. diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index f2e8b81f75..7c97ca1cfa 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -184,7 +184,7 @@ maintainer_email maintainer-email str classifiers classifier file:, list-comma license str license_file str -license_files list-comma +license_files list-comma 42.0.0 description summary file:, str long_description long-description file:, str long_description_content_type str 38.6.0 From 1da769c049093b6492b63422272f56b6e95df39d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 14:32:52 +0200 Subject: [PATCH 8462/8469] Additional test cases --- setuptools/tests/test_egg_info.py | 65 +++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4915c0cb40..4751d1b553 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -545,7 +545,15 @@ def test_doesnt_provides_extra(self, tmpdir_cwd, env): """), 'MANIFEST.in': "exclude LICENSE", 'LICENSE': "Test license" - }, False) # license file is manually excluded + }, False), # license file is manually excluded + pytest.param({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICEN[CS]E* + """), + 'LICENSE': "Test license", + }, True, + id="glob_pattern"), ]) def test_setup_cfg_license_file( self, tmpdir_cwd, env, files, license_in_sources): @@ -644,7 +652,37 @@ def test_setup_cfg_license_file( 'MANIFEST.in': "exclude LICENSE-XYZ", 'LICENSE-ABC': "ABC license", 'LICENSE-XYZ': "XYZ license" - }, ['LICENSE-ABC'], ['LICENSE-XYZ']) # subset is manually excluded + }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # subset is manually excluded + pytest.param({ + 'setup.cfg': DALS(""" + """), + 'LICENSE-ABC': "ABC license", + 'COPYING-ABC': "ABC copying", + 'NOTICE-ABC': "ABC notice", + 'AUTHORS-ABC': "ABC authors", + 'LICENCE-XYZ': "XYZ license", + 'LICENSE': "License", + 'INVALID-LICENSE': "Invalid license", + }, [ + 'LICENSE-ABC', + 'COPYING-ABC', + 'NOTICE-ABC', + 'AUTHORS-ABC', + 'LICENCE-XYZ', + 'LICENSE', + ], ['INVALID-LICENSE'], + # ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*') + id="default_glob_patterns"), + pytest.param({ + 'setup.cfg': DALS(""" + [metadata] + license_files = + LICENSE* + """), + 'LICENSE-ABC': "ABC license", + 'NOTICE-XYZ': "XYZ notice", + }, ['LICENSE-ABC'], ['NOTICE-XYZ'], + id="no_default_glob_patterns"), ]) def test_setup_cfg_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): @@ -749,7 +787,28 @@ def test_setup_cfg_license_files( 'LICENSE-PQR': "PQR license", 'LICENSE-XYZ': "XYZ license" # manually excluded - }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']) + }, ['LICENSE-XYZ'], ['LICENSE-ABC', 'LICENSE-PQR']), + pytest.param({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE* + """), + 'LICENSE-ABC': "ABC license", + 'NOTICE-XYZ': "XYZ notice", + }, ['LICENSE-ABC'], ['NOTICE-XYZ'], + id="no_default_glob_patterns"), + pytest.param({ + 'setup.cfg': DALS(""" + [metadata] + license_file = LICENSE* + license_files = + NOTICE* + """), + 'LICENSE-ABC': "ABC license", + 'NOTICE-ABC': "ABC notice", + 'AUTHORS-ABC': "ABC authors", + }, ['LICENSE-ABC', 'NOTICE-ABC'], ['AUTHORS-ABC'], + id="combined_glob_patterrns"), ]) def test_setup_cfg_license_file_license_files( self, tmpdir_cwd, env, files, incl_licenses, excl_licenses): From 0f34639e5aa630b8cbe32af9cfe8dfec7be890e7 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 28 Mar 2021 17:34:01 +0200 Subject: [PATCH 8463/8469] Change deprecation warning --- setuptools/command/sdist.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index cd308ab9dd..278b8ce0b6 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -4,7 +4,6 @@ import sys import io import contextlib -import warnings from glob import iglob from setuptools.extern import ordered_set @@ -208,9 +207,9 @@ def check_license(self): else ordered_set.OrderedSet(license_files) if 'license_file' in opts: - warnings.warn( - "The 'license_file' option is deprecated. Use 'license_files' instead.", - DeprecationWarning) + log.warn( + "warning: the 'license_file' option is deprecated, " + "use 'license_files' instead") patterns.append(opts['license_file'][1]) if 'license_file' not in opts and 'license_files' not in opts: From 608c376e86326c879dd52b56660b2247a3ca854e Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 3 Apr 2021 21:34:00 +0200 Subject: [PATCH 8464/8469] Small changes --- changelog.d/2620.breaking.rst | 3 +-- docs/references/keywords.rst | 1 - setuptools/command/sdist.py | 3 +++ setuptools/tests/test_egg_info.py | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/changelog.d/2620.breaking.rst b/changelog.d/2620.breaking.rst index de91facc57..431e7105d9 100644 --- a/changelog.d/2620.breaking.rst +++ b/changelog.d/2620.breaking.rst @@ -1,5 +1,4 @@ If neither ``license_file`` nor ``license_files`` is specified, the ``sdist`` option will now auto-include files that match the following patterns: ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``. -This matches the behavior of ``bdist_wheel``. -Any ``exclude`` in ``MANIFEST.in`` will overwrite it. -- by :user:`cdce8p` +This matches the behavior of ``bdist_wheel``. -- by :user:`cdce8p` diff --git a/docs/references/keywords.rst b/docs/references/keywords.rst index 6485437b84..619b2d1493 100644 --- a/docs/references/keywords.rst +++ b/docs/references/keywords.rst @@ -86,7 +86,6 @@ Keywords A list of glob patterns for license related files that should be included. If neither ``license_file`` nor ``license_files`` is specified, this option defaults to ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, and ``AUTHORS*``. - Any ``exclude`` specified in ``MANIFEST.in`` will overwrite it. ``keywords`` A list of strings or a comma-separated string providing descriptive diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 278b8ce0b6..a6ea814a30 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -213,6 +213,9 @@ def check_license(self): patterns.append(opts['license_file'][1]) if 'license_file' not in opts and 'license_files' not in opts: + # Default patterns match the ones wheel uses + # See https://wheel.readthedocs.io/en/stable/user_guide.html + # -> 'Including license files in the generated wheel file' patterns = ('LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*') for pattern in patterns: diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4751d1b553..80d3577424 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -654,8 +654,7 @@ def test_setup_cfg_license_file( 'LICENSE-XYZ': "XYZ license" }, ['LICENSE-ABC'], ['LICENSE-XYZ']), # subset is manually excluded pytest.param({ - 'setup.cfg': DALS(""" - """), + 'setup.cfg': "", 'LICENSE-ABC': "ABC license", 'COPYING-ABC': "ABC copying", 'NOTICE-ABC': "ABC notice", From c5185cd00cc3a96bad4cf5bca3968af710916d3a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 8 Apr 2021 20:34:05 +0200 Subject: [PATCH 8465/8469] Add a change note for PR #2633 --- changelog.d/2632.change.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/2632.change.rst diff --git a/changelog.d/2632.change.rst b/changelog.d/2632.change.rst new file mode 100644 index 0000000000..a13bfdfa70 --- /dev/null +++ b/changelog.d/2632.change.rst @@ -0,0 +1,3 @@ +Implemented ``VendorImporter.find_spec()`` method to get rid +of ``ImportWarning`` that Python 3.10 emits when only the old-style +importer hooks are present -- by :user:`webknjaz` From c826dffc2fd99de0431ee2a8b483868ab54e9cdc Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 8 Apr 2021 19:58:24 +0200 Subject: [PATCH 8466/8469] Implement `find_spec` in vendored module importers This change makes the import warning emitted by Python 3.10 disappear but implementing the hook that is supposed to replace the old import mechanism. Refs: * https://bugs.python.org/issue42134 * https://bugs.python.org/issue43540 * https://github.com/pypa/setuptools/issues/2632#issuecomment-815701078 Fixes #2632 Co-authored-by: Jason R. Coombs --- pkg_resources/extern/__init__.py | 21 +++++++++++++++------ setuptools/extern/__init__.py | 21 +++++++++++++++------ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 1fbb4fcc89..c45f58e2ac 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -1,3 +1,4 @@ +import importlib.machinery import sys @@ -20,17 +21,18 @@ def search_path(self): yield self.vendor_pkg + '.' yield '' + def _module_matches_namespace(self, fullname): + """Figure out if the target module is vendored.""" + root, base, target = fullname.partition(self.root_name + '.') + return not root and any(map(target.startswith, self.vendored_names)) + def find_module(self, fullname, path=None): """ Return self when fullname starts with root_name and the target module is one vendored through this importer. """ - root, base, target = fullname.partition(self.root_name + '.') - if root: - return - if not any(map(target.startswith, self.vendored_names)): - return - return self + spec = self.find_spec(fullname, path) + return spec.loader if spec is not None else None def load_module(self, fullname): """ @@ -60,6 +62,13 @@ def create_module(self, spec): def exec_module(self, module): pass + def find_spec(self, fullname, path=None, target=None): + """Return a module spec for vendored names.""" + return ( + importlib.machinery.ModuleSpec(fullname, self) + if self._module_matches_namespace(fullname) else None + ) + def install(self): """ Install this importer into sys.meta_path if not already present. diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 399701a044..bd8636c7b7 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,3 +1,4 @@ +import importlib.machinery import sys @@ -20,17 +21,18 @@ def search_path(self): yield self.vendor_pkg + '.' yield '' + def _module_matches_namespace(self, fullname): + """Figure out if the target module is vendored.""" + root, base, target = fullname.partition(self.root_name + '.') + return not root and any(map(target.startswith, self.vendored_names)) + def find_module(self, fullname, path=None): """ Return self when fullname starts with root_name and the target module is one vendored through this importer. """ - root, base, target = fullname.partition(self.root_name + '.') - if root: - return - if not any(map(target.startswith, self.vendored_names)): - return - return self + spec = self.find_spec(fullname, path) + return spec.loader if spec is not None else None def load_module(self, fullname): """ @@ -60,6 +62,13 @@ def create_module(self, spec): def exec_module(self, module): pass + def find_spec(self, fullname, path=None, target=None): + """Return a module spec for vendored names.""" + return ( + importlib.machinery.ModuleSpec(fullname, self) + if self._module_matches_namespace(fullname) else None + ) + def install(self): """ Install this importer into sys.meta_path if not already present. From dd1453b3c2ebcc4460b088979576876e89372302 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 8 Apr 2021 23:45:40 +0200 Subject: [PATCH 8467/8469] Drop deprecated `find_module` from vendor importer --- pkg_resources/extern/__init__.py | 8 -------- setuptools/extern/__init__.py | 8 -------- 2 files changed, 16 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index c45f58e2ac..33e4e6f134 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -26,14 +26,6 @@ def _module_matches_namespace(self, fullname): root, base, target = fullname.partition(self.root_name + '.') return not root and any(map(target.startswith, self.vendored_names)) - def find_module(self, fullname, path=None): - """ - Return self when fullname starts with root_name and the - target module is one vendored through this importer. - """ - spec = self.find_spec(fullname, path) - return spec.loader if spec is not None else None - def load_module(self, fullname): """ Iterate over the search path to locate and load fullname. diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index bd8636c7b7..0d4acb3eff 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -26,14 +26,6 @@ def _module_matches_namespace(self, fullname): root, base, target = fullname.partition(self.root_name + '.') return not root and any(map(target.startswith, self.vendored_names)) - def find_module(self, fullname, path=None): - """ - Return self when fullname starts with root_name and the - target module is one vendored through this importer. - """ - spec = self.find_spec(fullname, path) - return spec.loader if spec is not None else None - def load_module(self, fullname): """ Iterate over the search path to locate and load fullname. From b5f3ae57debb9ef018aedc92dd0a3704a1d06fa7 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 9 Apr 2021 00:13:11 +0200 Subject: [PATCH 8468/8469] Use importlib.util.spec_from_loader in find_spec --- pkg_resources/extern/__init__.py | 4 ++-- setuptools/extern/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 33e4e6f134..fed5929540 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -1,4 +1,4 @@ -import importlib.machinery +import importlib.util import sys @@ -57,7 +57,7 @@ def exec_module(self, module): def find_spec(self, fullname, path=None, target=None): """Return a module spec for vendored names.""" return ( - importlib.machinery.ModuleSpec(fullname, self) + importlib.util.spec_from_loader(fullname, self) if self._module_matches_namespace(fullname) else None ) diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 0d4acb3eff..7df32fdea2 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -1,4 +1,4 @@ -import importlib.machinery +import importlib.util import sys @@ -57,7 +57,7 @@ def exec_module(self, module): def find_spec(self, fullname, path=None, target=None): """Return a module spec for vendored names.""" return ( - importlib.machinery.ModuleSpec(fullname, self) + importlib.util.spec_from_loader(fullname, self) if self._module_matches_namespace(fullname) else None ) From 1d330f9daded60f0d7721b51d8027494c5bf11d3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Apr 2021 19:34:42 -0400 Subject: [PATCH 8469/8469] =?UTF-8?q?Bump=20version:=2055.0.0=20=E2=86=92?= =?UTF-8?q?=2056.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 28 ++++++++++++++++++++++++++++ changelog.d/2620.breaking.rst | 4 ---- changelog.d/2620.change.rst | 1 - changelog.d/2620.deprecation.rst | 2 -- changelog.d/2620.doc.rst | 1 - changelog.d/2632.change.rst | 3 --- setup.cfg | 2 +- 8 files changed, 30 insertions(+), 13 deletions(-) delete mode 100644 changelog.d/2620.breaking.rst delete mode 100644 changelog.d/2620.change.rst delete mode 100644 changelog.d/2620.deprecation.rst delete mode 100644 changelog.d/2620.doc.rst delete mode 100644 changelog.d/2632.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7fe611a698..dd76f43d91 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 55.0.0 +current_version = 56.0.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index d073fa8ef3..ef1d926b15 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,31 @@ +v56.0.0 +------- + + +Deprecations +^^^^^^^^^^^^ +* #2620: The ``license_file`` option is now marked as deprecated. + Use ``license_files`` instead. -- by :user:`cdce8p` + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2620: If neither ``license_file`` nor ``license_files`` is specified, the ``sdist`` + option will now auto-include files that match the following patterns: + ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``. + This matches the behavior of ``bdist_wheel``. -- by :user:`cdce8p` + +Changes +^^^^^^^ +* #2620: The ``license_file`` and ``license_files`` options now support glob patterns. -- by :user:`cdce8p` +* #2632: Implemented ``VendorImporter.find_spec()`` method to get rid + of ``ImportWarning`` that Python 3.10 emits when only the old-style + importer hooks are present -- by :user:`webknjaz` + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2620: Added documentation for the ``license_files`` option. -- by :user:`cdce8p` + + v55.0.0 ------- diff --git a/changelog.d/2620.breaking.rst b/changelog.d/2620.breaking.rst deleted file mode 100644 index 431e7105d9..0000000000 --- a/changelog.d/2620.breaking.rst +++ /dev/null @@ -1,4 +0,0 @@ -If neither ``license_file`` nor ``license_files`` is specified, the ``sdist`` -option will now auto-include files that match the following patterns: -``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``. -This matches the behavior of ``bdist_wheel``. -- by :user:`cdce8p` diff --git a/changelog.d/2620.change.rst b/changelog.d/2620.change.rst deleted file mode 100644 index 5470592d17..0000000000 --- a/changelog.d/2620.change.rst +++ /dev/null @@ -1 +0,0 @@ -The ``license_file`` and ``license_files`` options now support glob patterns. -- by :user:`cdce8p` diff --git a/changelog.d/2620.deprecation.rst b/changelog.d/2620.deprecation.rst deleted file mode 100644 index 1af5f2461a..0000000000 --- a/changelog.d/2620.deprecation.rst +++ /dev/null @@ -1,2 +0,0 @@ -The ``license_file`` option is now marked as deprecated. -Use ``license_files`` instead. -- by :user:`cdce8p` diff --git a/changelog.d/2620.doc.rst b/changelog.d/2620.doc.rst deleted file mode 100644 index 7564adaca4..0000000000 --- a/changelog.d/2620.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added documentation for the ``license_files`` option. -- by :user:`cdce8p` diff --git a/changelog.d/2632.change.rst b/changelog.d/2632.change.rst deleted file mode 100644 index a13bfdfa70..0000000000 --- a/changelog.d/2632.change.rst +++ /dev/null @@ -1,3 +0,0 @@ -Implemented ``VendorImporter.find_spec()`` method to get rid -of ``ImportWarning`` that Python 3.10 emits when only the old-style -importer hooks are present -- by :user:`webknjaz` diff --git a/setup.cfg b/setup.cfg index 6bb6508f8b..ebdc2c638c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 55.0.0 +version = 56.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages

    3FzTbe=;8WNcj)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efinsans/JosefinSans-LightItalic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8dc35383c6e833daf63fa0aca9aed9b7b873d676 GIT binary patch literal 85684 zcmeFacYKva_CG!|&u!_sX*WGLxyeoMA)y4gbV%p~Lg)wrDgq+bbsk@pt_2%w zK^Gf#4HhixVvnw(AeL35=&HEnV(#;OpYuHT$qk_E=lA{V^ZI?m>r77OIWy19nRCvZ zIWzMhq!1zriA{J%&zLX{e@P)HZ^dudxY1+A4n29;oye-d-`|g$I%P)1fmc2dLV1N4 znLcjD%#ka9y3{Vj=z*ZwFl9z{-HH*LcMCD56ZDIgoVa*R+x98Dgcu8Y*JVpiUFS_} zux}AEP=n_ymaSQS;?V5N&cff<2@!YV^2H~wL4G3sF2Qft@|9;S+kVS6=Ls=+n-DMU zUUBT=r7^oFel4Wu50bnT@2bTo9(&cCFX!X$bA)gnShM=%b@x9#WV?`6rwie} zZ_V0c*OX@UqW;M)(BB5m2oVbqVyjRh6Fi%RyxHOeq$i3?kX|WnKzg%y2I&rgmWuu2 zJEY%Br;svAmLe^eO-KjJxk%^BX_Fd> z{84HY@<*#Nz{jewz{jZ;Je`QTB-f?TQ|fcHC=hKzjvhO)O}Nl&{OG#S_^A@w3CFHo zB~ngYy!HfJGZ!vynooW2eSt=Z8mK>NX9C(c!__lDMF>>%L#@~a%@#b|*>%u5` z@usEXc(F#DDj;j}PW|6P$u0UJ`B(j*h{xY|$-DJ`%XG^OMa%mEx*(c z$Zq`oHS)jFd*u)McPd3cs8aPkT+=&959oLwYU$?m1CfBb52Efv$ood#1^jN*axZ@0 zr+vO$iNQ{@7=Ql2RJa+|lk7cdonHz07@) z`)>F1?pNHeySv=G-TU1K-Jv8~Qgl*cQd&}WQbAG)G~BCyDn{sEiq-gi1;*oM{qN#- zy+=H*ZxuWA`vh!;_!2`JqyH?I;y3Jqyg>g>N5+E6n0!Rg<0X%?oKn5TakOjyFSfh&3+yHI5 z5O5LTkAREyURZ}5{g6c!9(NjHSRF{pOW?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~t4 zCG;X}Tj)jD4WSod4WSodH-%n=-4c2c))aaXb{jr^xfj44(c1I&MQ*nyAmaa_asUTzXINc zp1fZbEg|pMBuebRE>U9t4UAln^1dKZV)#vo62lk4`)W_#mqbg*`z?tQ`}-0l_Ag`P zt5V)qBuWhTBuWflwI1NBbKNsqJHZF*eBkuzJKe*0l8&sn$olyj&L0CG;2Auq`TPLhAqDzjmc2MQJ~%KaTT|Mkeo7aui2ZT&;o!sIL)@+(0(HdxSX&f-qK#+a zI;R8oF5@!bUa2!sD|F6K>qmoMz@ur4_o_G-1`Do|${$W?r}g9dKy>n>z$fqX;BVt_ STzC+w;oZ~%X^9NiwEqG4b1ZZK literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-Regular.ttf b/docs/logo/josefinsans/JosefinSans-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ed11900846890faa98285ecf2b6ded1b18828fd9 GIT binary patch literal 87260 zcmeFa34ByVwm)7~x3`dxq?2^^rL%Ps61FTPgan$fngoOpWe;0eMph9~5fL3%WE35@ zaeT&6^a&y&qmC2BQJ-;?QO0p$90wH@(ZQ{?l~E*p|KD@&?VC=(nfK=R{@eS!H0Si` zx~J;aa_ZEnbLw7%6hb5b*@SoOv@<5)mlU$~4Sc&Mj2$0&-{DTe4>9%KFUfH{$m*LiAs`bisLRkRFfUQ}FFty5gcG-<)`Q zoDg&H``NFTEnd(b{lKJih0Gp{>%*2I!7;?~IDT)$?}BA3*IjsW|IkP9`)(nk?q0Ea z(Sk#{4=xn4*pCLjwsOIRYqSSq8-yH~1b*+T1uGX%J9q}E ztlTAp`&Vn$E?!fT(LDwIF$DbgqGyDN0SIvix*!F8b`H{3imQRI6?X!62-HSAAp*c( zOQ(=BN|peZ%2wdB7xHW1Z{=|z zRji5y&Q{sLUNuQ*YOZPrUaXelUP?qEb&ybMuo{fiA*up=RcaV;jT(pa@oGHMC#XiG zG$X&{{0ez7bmB#|Q>d}yn_ETfiUsRdiEOkDf4V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E;08YsgI%Xz8oCq^8qH1^I+KN>pgRM7t@ zi}?UNuhKCMZH{|hfHh&qd9gX5=e*QgnpY8mmz+S-DzyGNgsIDV}~;01mU~D-b*%tBh-i^XdXyL6a|Ot#&e#)qKm~-+zGtmx<(yzuosHuT@MQl z9z>@l7Wy(^de0ZJVKfm$mU z2gjtF$&F*um19zGZP4EHD~bkNOa~RbMc#&%!IsiJlpobt4=4Rqz9FGmmW7Kp51Gn% zS|IPTxNeEishoA3v@A}Z2&ja{glh~{Kd=1%ucTLBR$xD*iV1J(W6SztG8L$oR8{)v zpaCzYJygmVEu~YGGr~ni<3q3t2+oRQk9!iF@Y7i~i&OsLE9Tc=E_CKJn}g0pgDrrp z6N(Pt*2=i}dT3oTsG!+8VE)KBLJI?P8BB zzT$Ji(u(_nCG`ie^PVvIP_U%%NU)^vE9fr!_I}Mr+}>{lOX|NBEUABimCM53mx3jQ z-wBo!eh=OEeS3f4BW~}Hf+h8@1WW3F!pirBy*~?<6dntf6uvf|;L&*A9j%pS!%Y@G zxADNcjAu|w3f^S>a})QEp}*oHC*D@w>nkw}zu)m@7{B`n_8W8P?cr0y;bAeFRc6#T zR6dGZ-zJ_7KZ`uWSM(#0j#=L-EBqfHhm}(QT4zJo{xpsLG5jTdY;EOn s9rwaep$9sCGpn3a+V%+t_!U$Mwva5*kLi8k;{vL*5o6|N}%1=k-2H~;_u literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-SemiBold.ttf b/docs/logo/josefinsans/JosefinSans-SemiBold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b67504a6e3a047b50df77282b55e0f7ff21b12ad GIT binary patch literal 87880 zcmeFa34ByVwm)7~x6|F((@8p=oz9++03m@SgsoYUKmrIMEMZ^5qOycV1O^c|L`7vB z7sm17h8r>t;>KXcK_8-`;xg!>^Lzj8eO{V#`gGk> zb!$22)TvW-FG30-;(=_!J9O;uI{cDCPVnK|SvRz%wxX@_V<hHn2!Xz$G!!>H{y5h{DsR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DNel1xq?D#gfjp)FA=s>|pRq-C1{KOOAL`u{7egVoCii%=40(@@>VE z!aIs3g`a}%Tz9^omMuBo&nTAEKdV?${~SinsrlYjEGc|mv83!RoQ@>`w5coMn9@FD9jR&f3p z`Wg;$>SNW-Hj6rcz>*)syP=5vAj@Cq9q#SvRjmm&W*jqQtKa!B_MrDc_yNA6?}K#E z`H;=af3n@f3hm>eJLmB+;7+OCQ!BJjQ0tq$@8VXo`8!pd3qu8;lFA=Uu;a#2qbD|Y aKlIUiBK%bxjtlo9HT(#-Kvp8d8T%i~EetvU literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf b/docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..24a27d1596e3de2baff32b01f23a9c40406d8941 GIT binary patch literal 84824 zcmeFad3;nw_BUKrx3}!+Y~5K%I^9VpBq4+(BzR&Z=`}uv|CwM9+bx+l; zI(5#eQ>Ut~LJA>Lkl2K8)YP$K@Rt;_X%c?B#*7+WKlJor_aUnce}6M((!{Cyxg`gL zP(C5*HjSA&t!~AUE9^py+76n{6Q}mAJmvYjy+YIz{rp8M7qm7%Ht`kweL1STa?zP< zecpbKKMOhJO*~(=q;=`ap*dHcBjnH_LL{tQy5RIy6{+ zLOk2K?BoTD2S*?Y_iWLi+cC-nVMO%9E4+`eg_H{u!^!Yh8W%+Fef$eoV+xywCkm z>zb2WduJb=BxK_b(EkCP5h5NS#15fE7I-!tc{9awq$|bcNUssMBE4OpPVtoJMEaEo zBmG7?g_JR}H_}pBi*%5jjdZR&1?h5mKGF;2rARNAHzU1E-i36({0Qkmc@XI*@)M+= z$uE$8CBH&?SRNKq^-{f%=Be>QQ*+f~q$jIoc%u?=$n7JPDp%#m?W-z5SFQRZtyOi% zAE`znf0P;xyk6A>g zX)713SuS!`E?>D^1o0$VRs*JS8Jn;Rhj5~X7?CD&M2V;rgG8NZ6jQ`3P`U7~3H;k8 zMd~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!~qY(5nPc$2&h zO@l3@I!Hgtu?|l9n`}csGb{rWE$%X<@uXnhWrMmYT&Hx_andq4dBUM03KOm|l>I#O z|G$)8IW57yOBNH~RL2(e`9w01FG)w*X`=wor#x0l=q;p@6f@#QdgD{D0tzmOV~=|h zobYoQHjPvM(>IJ?!*ZeX=hzG|*9|s@W|dg9LAO@I#n)r&hCvCLL|T!#31Ud9Vx`G^5J*;$ND4vqBpHfsc);iH)wtxf6@OU`T}3q4?sI?eyuF=f4m=2irq`0 zr?>Go;Ay!VsTI4E)caTeXZUlqrKeTg3j>08NzPZ($|d!@8i`Lm554@HMgNA&aq(HK OrYglES&0l+l>Y(&D3s*@ literal 0 HcmV?d00001 diff --git a/docs/logo/josefinsans/METADATA.pb b/docs/logo/josefinsans/METADATA.pb new file mode 100644 index 0000000000..8b67716c32 --- /dev/null +++ b/docs/logo/josefinsans/METADATA.pb @@ -0,0 +1,99 @@ +name: "Josefin Sans" +designer: "Santiago Orozco" +license: "OFL" +category: "SANS_SERIF" +date_added: "2010-11-17" +fonts { + name: "Josefin Sans" + style: "normal" + weight: 100 + filename: "JosefinSans-Thin.ttf" + post_script_name: "JosefinSans-Thin" + full_name: "Josefin Sans Thin" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "italic" + weight: 100 + filename: "JosefinSans-ThinItalic.ttf" + post_script_name: "JosefinSans-ThinItalic" + full_name: "Josefin Sans Thin Italic" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "normal" + weight: 300 + filename: "JosefinSans-Light.ttf" + post_script_name: "JosefinSans-Light" + full_name: "Josefin Sans Light" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "italic" + weight: 300 + filename: "JosefinSans-LightItalic.ttf" + post_script_name: "JosefinSans-LightItalic" + full_name: "Josefin Sans Light Italic" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "normal" + weight: 400 + filename: "JosefinSans-Regular.ttf" + post_script_name: "JosefinSans-Regular" + full_name: "Josefin Sans Regular" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "italic" + weight: 400 + filename: "JosefinSans-Italic.ttf" + post_script_name: "JosefinSans-Italic" + full_name: "Josefin Sans Italic" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "normal" + weight: 600 + filename: "JosefinSans-SemiBold.ttf" + post_script_name: "JosefinSans-SemiBold" + full_name: "Josefin Sans SemiBold" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "italic" + weight: 600 + filename: "JosefinSans-SemiBoldItalic.ttf" + post_script_name: "JosefinSans-SemiBoldItalic" + full_name: "Josefin Sans SemiBold Italic" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "normal" + weight: 700 + filename: "JosefinSans-Bold.ttf" + post_script_name: "JosefinSans-Bold" + full_name: "Josefin Sans Bold" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +fonts { + name: "Josefin Sans" + style: "italic" + weight: 700 + filename: "JosefinSans-BoldItalic.ttf" + post_script_name: "JosefinSans-BoldItalic" + full_name: "Josefin Sans Bold Italic" + copyright: "Copyright 2010 The Josefin Sans Project Authors (https://github.com/ThomasJockin/JosefinSansFont-master), with Reserved Font Name \"Josefin Sans\"." +} +subsets: "latin" +subsets: "latin-ext" +subsets: "menu" +subsets: "vietnamese" diff --git a/docs/logo/josefinsans/OFL.txt b/docs/logo/josefinsans/OFL.txt new file mode 100644 index 0000000000..6586a7e304 --- /dev/null +++ b/docs/logo/josefinsans/OFL.txt @@ -0,0 +1,93 @@ +Copyright (c) 2010, Santiago Orozco (hi@typemade.mx) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/logo/setup_tools_logo_colour.svg b/docs/logo/setup_tools_logo_colour.svg new file mode 100644 index 0000000000..7eae8fc364 --- /dev/null +++ b/docs/logo/setup_tools_logo_colour.svg @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/docs/logo/setup_tools_logo_colour_1000px.png b/docs/logo/setup_tools_logo_colour_1000px.png new file mode 100644 index 0000000000000000000000000000000000000000..c25a23b9f4c55c574f14a78e76ed3515359f72af GIT binary patch literal 31520 zcmeFZbySpL_bxn$h=PCxsH9R#mvpHpAgPE*t8~ZEH6YR{2nbTr-8C?PbUJhnT_ZKb zz|hQj9^UW$oqxao&RS<3)?&HV@I3du?|tvM_OXB+F#Uy*cnEhzG^KUh7Hly%N@?Uo(?aXede$(ewpu6z{>*U{v%fYN){97_FxdDOPr1K?* z+<(iO;^KCi%SX4=peFLxgspC$U4bXsu{Kkv+fXD_&RYx5>BN9|K19fU+As}^C*7}q zdn#S!V6Lg@{jUJfX84OVLWuTM*n{y^dTFcPOvan4(BZXc{kPSOZM5cI=+B(-j`?hX&AJWt|IGl92 z9!SvG)2~qQpHIK=!Xw)SG;f~E0uE$zRSc5$%+ZNxc&uqhuzQYUZ7UiVY%y}19-VdZ zZ^#Au8B^a|FMTmFpn4MmS(E_;Oq?1y#@nVQ9W2Z%RG+n-Oo z=5fEpsrwOZ0sasO@8a!$5T8ERt+Rp%j^#}@2RaRezX*@s3ldxF5<$7hZfW?J-K2It z&g;Ok;o!0@BiIsAt|$W@^VCJI2cg){D)GrR)tz_HgpJi39j*%*p3cApy_5q~@va8z zjpbmeqPATK-pb19H%Z#2cVo07ovmJ{5x@(L#1cSwqlwIU05Qsy#qsNI(O&AoZEm_j zSnZ$t>$+09LdF-youdt$5Xc`&KwIwm(2LP+mo**sQ&K}Im7@Lq$q=lCWf|G$dDH0z zJ6zAy7!d>l+G$jD44|uRCEQB|>lGaV=Q%gUHn)9=-Oghh8bTt|X}IfZh&BbF*i0tC zkjR9sFJjrAT*pL>Xf?))@JQQ!C{7t~h;WLli20z)zY%#re;x8izD*KPRY0PY>8?J> z*X_L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Gvp!u71QJ7<*HUg%^{%l#5mNlD+-)4q|Lc$td~V4(NjX11nM+KOi$S0&Mr$9 z${$-mAdRr)30?h*8%!Sb4l+T>V{-6_sHgJK;nR)|Yu@;rs9Tp2VC99dL~}cqHziNI zw#ZLI7`4U^2bUD?-8P-lHSTnsR9c)9lXYSrl$;W@?W-ik+KY9e;nKuM@|uSk8q2{1Z6&V zoY~@qO5I4CGt#q^tWs>BL7}O#`Ybm|)Vx~4M&?P&mR?KQ#(^P?D0ZK{`qc3Vpj%b! z)v>=u8VCcFnAAye{`+rqc44W7qbX)mLBC`~ViD+fx_5Ari93NI?;-?I|6#9K;XUmk zMK+;FY^>mMp?O>MP)Zc&urE+wr=_vljQLEd%W^ObB{r&^0y$Bb0%3MXIt=ceEE=gJqBojO0O!tyv^o% z7yd#!zI^X47MrH5is#^)TSC+=>v7-FA-R%{$FSKHSCzc$*++0Jct9VJ8A2fvyUcWTLn|B##gS})K4RP`LnBe5(LO?tK04xKIQSBxH z#Ql?metGQ8xO+Cqi>+0oqrUAm96NUI$g_(1cwfu`?5xYzkN64!l;8Ky3fbdpkvinq zdP09wMY8+JmPU2EZfwUf6ktN?uKxCRPe2N<*A(E*?j=>+Fc?wRzpK~+6X1Qv%D}*Y zjbri_;lg)ZEvVLQ2NfO_EHrvi5?q+4M7mbWK1AlzWlyPS;v_M};Ks^L9Zd)xi25;G zquJd+s#Z;{llG!eP?z^B$j|}%KWeybPh9sd$+F^tbwD5V`Sr#>?(MsVgK>G`gc>eC z6+DhiiHPzI%v((k0W;5X7kzcVxHRHD5*7LXpZ|}*|7ir+3LgV)MR1Gf4McnXUFe}K MuO?S6^C9Ga0NJR5iU0rr literal 0 HcmV?d00001 diff --git a/docs/logo/setup_tools_logo_colour_banner_1line.svg b/docs/logo/setup_tools_logo_colour_banner_1line.svg new file mode 100644 index 0000000000..d6dc9aaca2 --- /dev/null +++ b/docs/logo/setup_tools_logo_colour_banner_1line.svg @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png b/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png new file mode 100644 index 0000000000000000000000000000000000000000..d1604289c8d768aee6f250d1e1127cc85840cc5e GIT binary patch literal 24183 zcmeEu^;eYN7w*iE(kTrB(k(SK5(3h~5YpYO>%xObvzSrfn_B9lAwBw6BC5tLn5#74ceQDIqotj%ua)M zo>357I1pr^v_9jajYohg5M0PCL&WjyX~MEPfqWr@kUyfd?*M*#*;mI^(_9lEX0UBM z8o6b?&Ch@IabY2620m;9VEF&f|APf|leNi`1}YnDtQXw#O6uuf2}_R>clwpjqf5&I zDQ8VSfQs*@ts8n7Sb)^1$7wQ>5xdrjGnapMDK>m&O+*R*dx}6P{y69=*+IF#`6949 zS)m*xwp6n+8+zrv0-t)P8*Zcw==GkD$>RpLePEhkp^dG0^-n~1N)&&R>lACFq^;y+ ztVQ&++^G#&3-|emQ_~WlpZaH>9Q(23^AYvC{f7JZME}i|tVKS?g~QE0DC*U)bSW1f z4Tu0Ft$sDQgjVv6JPiQX*Bx6xA5_sMrb!cT#~!ev{(D%*$;a+-9}c?J=B$bP_HMDClz8=6Ao{?J|FmHOpol_S`1or)D6Qf{2T`Cuuro8)U5)1^y+7bT zbY4)}E0wX`tn9`1wNh-z{2RX%Z#PJqry&5og>ESdJskh#`!@14YipV*`!;dBh@kOP zMjP>eqcbVA;_ig8s5rdIUD{!jK0d)c}3@CY=N`Fg^uV_E}o_pOo{7zOOMBOmhD{ma?tbJ1ERjK9N|~ zfc`RSVh1q3l#qByw_gYTH@K~Y&rTFp=-uIBD;Hg!u*(;o-n4%jYm%I^=EHCr5REHk zgD#piOUd1hUf8;4v$STcCzzToy15?qKZ{EaC8#%ENB^_uJAdM_TlL^zb~zUGgppOX zwGU6>TnfP-&{nD;6U;%x8-xG*AP(ac+H={*fl-NGSK4_=xGNqY!*@+TT^C%V6^BO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*T5>aax`}ZN O&w%?zI+%M;U;hueu&zn~ literal 0 HcmV?d00001 diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines.svg b/docs/logo/setup_tools_logo_colour_banner_2lines.svg new file mode 100644 index 0000000000..991577fba0 --- /dev/null +++ b/docs/logo/setup_tools_logo_colour_banner_2lines.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png b/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png new file mode 100644 index 0000000000000000000000000000000000000000..89370a9d012633f184ba67890c7d481c2308a35a GIT binary patch literal 38105 zcmeFYg;!MH7e0K4?(PohQV|&%rIbcMlvF|*hHe-{Nd-v-h7go)r5i*Lq&tSjA%}Ko z-ix2_@3-E6;a%&UwOFh*YtFsr?6dcCp8f27qI9*@NQsz;001C;{7Cr;0AQ~J0Hm4# z5B$bKczzZ9M+kfL+yek^U)=mbn(lE{gI_Xwsyy@5cYWpQ^U~c0@bU2xwRds!uzCrz z5p{L9O-IWz0RRW^Sowj0FJc?%7ih3HEx)%VZ<|2jZJ_H`J~i>gjqn%FT!llaadD}b z=Qlx$$Xg^G<)YQqUJjCu)mVfY9B>npnBCc@jwa5IUA=S_?u_KADE;+@1Cw(v*|`k_(Uiaipj-yQ(h|Nr^_mIZQ-s9Kq`f4lz`i8uLi%4p=ED zZ$7D=@OdROrZlq({c}WK3gYV!7w!NK>@K{MEc0u)k)f51#3|P-P!d+`h+FlP#kQ;H zRA2s4i}*it<@~svjiKo5)HpnMot9Jo(fo{)9s(s+G(Y;3Ucb~-{VqOfVLxmV2ztsH zLT&F~ROT=P_h*uzGP8a-h`|>glt_6Q zCO+j`_|GhQLU>2Q-u8Ch?cT+hk3cHf3(tIN*#q0Nj#JKKcRqyAkt{szkvN;nGu@U+ z~0|~f#zNJ zJBj~|(u)OGLnN5%Vk!&yAOj)UxoiDO9V%%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DnTA0B}!d)5iFYC03JOrnJjUOo!vW zk1*h;?bo6n;;ZhhjBtS_DA1&Qw{`ogL#N0Ibf8Xa$kX+ZcF%y7j-I)JclX!;Kv|O| zt3LF5>-PC)LD}&sqr9@Tu%N%kf@lVkTjk3skKeHZ!1LzEtzTj(a&SgqIP|2A>C{8& z#|^P?a-|J1Ep~$vyw>f{cxCOv4gfj6ELmo*TOM7Lb^!+Qf+b$s&0EJ9q6Ng_4;wq< zRXQ3P7y*!4G^hXJiOqrGl3Sg4fe_}rm%FbUBdEY0b06io^ryobh;%y>am!uxImIP- zs`vHe!-VwM+O5sIFxn;63Bv0S~0{io}xnr<@LiA*bE z5Pago(XZQCfo_`Lr~h1_dhr23cQ{K{?uSqxuX~;BNjF@PCQr#S9^oeX!eu_heo+xU(E>uB-GgX5I`Ucgdn%!R^0I+G215bHF9MBOi+rC}&GV6=$u&7;PZ*u&c!*E>9 sa7f`+JH7s!qr_@9=*<7mM|o!F(A>7mU+n=7FZR5)FtssxW8@zBA8(4v8~^|S literal 0 HcmV?d00001 diff --git a/docs/logo/setup_tools_logo_symbol_colour.svg b/docs/logo/setup_tools_logo_symbol_colour.svg new file mode 100644 index 0000000000..2936cbb56a --- /dev/null +++ b/docs/logo/setup_tools_logo_symbol_colour.svg @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/docs/logo/setup_tools_logo_symbol_colour_1000px.png b/docs/logo/setup_tools_logo_symbol_colour_1000px.png new file mode 100644 index 0000000000000000000000000000000000000000..e0c36fc131ac399ba0a8db8ff16b13d4beb8ad72 GIT binary patch literal 44239 zcmeFZXH=8f_XheRDk@SG5dkSmQ)yC^(6JyQO+`heDIkb6LujF^qtXNg>4D&YU<0H} z*C8~41gRpBXec4H00BY^-17#V`TalKulLiPwHVhTc~8#S<=M}E_6gw^O%1qq3GIR) zh|BQ&*~<{bJ_i5n*baVUlG!y3{@Ho|{0$TYxtqX0Y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Vf literal 0 HcmV?d00001 diff --git a/docs/logo/setup_tools_logotype_1line.svg b/docs/logo/setup_tools_logotype_1line.svg new file mode 100644 index 0000000000..dbb9c1decf --- /dev/null +++ b/docs/logo/setup_tools_logotype_1line.svg @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + From 812fc057934b119c9680d8e79c9860bbc36c8b5b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 18:07:21 -0400 Subject: [PATCH 7999/8469] Disable adopted distutils while troubleshooting #2228 and #2230. --- setuptools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 7a1f9f4fe1..a6cbe1322a 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -3,7 +3,8 @@ import os import functools -import setuptools.distutils_patch # noqa: F401 +# Disabled for now due to: #2228, #2230 +# import setuptools.distutils_patch # noqa: F401 import distutils.core import distutils.filelist From 8c85de4eeffc88b00f367fecd7caba81a0351f45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 18:08:20 -0400 Subject: [PATCH 8000/8469] Update changelog. Ref #2228 and #2230. --- changelog.d/2228.change.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2228.change.rst diff --git a/changelog.d/2228.change.rst b/changelog.d/2228.change.rst new file mode 100644 index 0000000000..82cf8a05b1 --- /dev/null +++ b/changelog.d/2228.change.rst @@ -0,0 +1 @@ +Disabled distutils adoption for now while emergent issues are addressed. From d0c71ab32deea2be265a8fcdec020089a8d1d987 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 18:12:39 -0400 Subject: [PATCH 8001/8469] Omit distutils_patch from test collection. --- conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conftest.py b/conftest.py index 72edcf1439..50cc650957 100644 --- a/conftest.py +++ b/conftest.py @@ -15,6 +15,7 @@ def pytest_addoption(parser): 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', 'setuptools/_distutils', + 'setuptools/distutils_patch.py', ] From 4beda61c99b9063cc2b4b8a9f099a842d99a3b6b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 18:17:36 -0400 Subject: [PATCH 8002/8469] =?UTF-8?q?Bump=20version:=2049.0.0=20=E2=86=92?= =?UTF-8?q?=2049.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2228.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2228.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 05ff5f1881..f2f2b27125 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.0.0 +current_version = 49.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index bd67931d71..26586fbde5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.1.0 +------- + +* #2228: Disabled distutils adoption for now while emergent issues are addressed. + + v49.0.0 ------- diff --git a/changelog.d/2228.change.rst b/changelog.d/2228.change.rst deleted file mode 100644 index 82cf8a05b1..0000000000 --- a/changelog.d/2228.change.rst +++ /dev/null @@ -1 +0,0 @@ -Disabled distutils adoption for now while emergent issues are addressed. diff --git a/setup.cfg b/setup.cfg index d73241861e..1f347c3fce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.0.0 +version = 49.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From bd1102648109c85c782286787e4d5290ae280abe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 20:48:15 -0400 Subject: [PATCH 8003/8469] Amend changelog for 48.0 to include more detail about usage expectations. Ref #2230. --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 26586fbde5..95dd2d246b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,7 +16,8 @@ v49.0.0 v48.0.0 ------- -* #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools' own monkey-patching of distutils. +* #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects. + To avoid getting any legacy behavior from the standard library, projects are advised to always "import setuptools" prior to importing anything from distutils. This behavior happens by default when using ``pip install`` or ``pep517.build``. Workflows that rely on ``setup.py (anything)`` will need to first ensure setuptools is imported. One way to achieve this behavior without modifying code is to invoke Python thus: ``python -c "import setuptools; exec(open('setup.py').read())" (anything)``. v47.3.2 From 223b405e1433751dfb695dcb99b124e46c716a2a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jul 2020 11:25:28 -0400 Subject: [PATCH 8004/8469] Use lowercase 't' for consistency in branding. --- docs/logo/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/logo/README.md b/docs/logo/README.md index 88e6647c7c..74fadbf021 100644 --- a/docs/logo/README.md +++ b/docs/logo/README.md @@ -1,10 +1,10 @@ ![](setup_tools_logo_colour.svg) ### Design: -SetupTools logo designed in 2020 by [C.Rogers](crogersmedia.com) for the SetupTools project using the Free Open Source graphics editor [Inkscape](inkscape.org). +Setuptools logo designed in 2020 by [C.Rogers](crogersmedia.com) for the Setuptools project using the Free Open Source graphics editor [Inkscape](inkscape.org). ### Copyright: -Logo is (c) the SetupTools developers. +Logo is (c) the Setuptools developers. ### Font: The font used is the Open Font "Josefin Sans", which is available for free under the Open Font License (OFL). From fd94cd038d644ff27866301f6f365a3ef0901898 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jul 2020 11:43:46 -0400 Subject: [PATCH 8005/8469] Rename logo assets to remove project name and 'logo', which are implied by the context. --- ...ner_1line_1000px.png => banner 1 line color.png} | Bin ...our_banner_1line.svg => banner 1 line color.svg} | 0 ...r_2lines_1000px.png => banner 2 lines color.png} | Bin ...r_banner_2lines.svg => banner 2 lines color.svg} | 0 ...logo_colour_1000px.png => full color 1000px.png} | Bin .../{setup_tools_logo_colour.svg => full color.svg} | 0 ...ol_colour_1000px.png => symbol color 1000px.png} | Bin ...ools_logo_symbol_colour.svg => symbol color.svg} | 0 .../{setup_tools_logotype_1line.svg => type.svg} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename docs/logo/{setup_tools_logo_colour_banner_1line_1000px.png => banner 1 line color.png} (100%) rename docs/logo/{setup_tools_logo_colour_banner_1line.svg => banner 1 line color.svg} (100%) rename docs/logo/{setup_tools_logo_colour_banner_2lines_1000px.png => banner 2 lines color.png} (100%) rename docs/logo/{setup_tools_logo_colour_banner_2lines.svg => banner 2 lines color.svg} (100%) rename docs/logo/{setup_tools_logo_colour_1000px.png => full color 1000px.png} (100%) rename docs/logo/{setup_tools_logo_colour.svg => full color.svg} (100%) rename docs/logo/{setup_tools_logo_symbol_colour_1000px.png => symbol color 1000px.png} (100%) rename docs/logo/{setup_tools_logo_symbol_colour.svg => symbol color.svg} (100%) rename docs/logo/{setup_tools_logotype_1line.svg => type.svg} (100%) diff --git a/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png b/docs/logo/banner 1 line color.png similarity index 100% rename from docs/logo/setup_tools_logo_colour_banner_1line_1000px.png rename to docs/logo/banner 1 line color.png diff --git a/docs/logo/setup_tools_logo_colour_banner_1line.svg b/docs/logo/banner 1 line color.svg similarity index 100% rename from docs/logo/setup_tools_logo_colour_banner_1line.svg rename to docs/logo/banner 1 line color.svg diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png b/docs/logo/banner 2 lines color.png similarity index 100% rename from docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png rename to docs/logo/banner 2 lines color.png diff --git a/docs/logo/setup_tools_logo_colour_banner_2lines.svg b/docs/logo/banner 2 lines color.svg similarity index 100% rename from docs/logo/setup_tools_logo_colour_banner_2lines.svg rename to docs/logo/banner 2 lines color.svg diff --git a/docs/logo/setup_tools_logo_colour_1000px.png b/docs/logo/full color 1000px.png similarity index 100% rename from docs/logo/setup_tools_logo_colour_1000px.png rename to docs/logo/full color 1000px.png diff --git a/docs/logo/setup_tools_logo_colour.svg b/docs/logo/full color.svg similarity index 100% rename from docs/logo/setup_tools_logo_colour.svg rename to docs/logo/full color.svg diff --git a/docs/logo/setup_tools_logo_symbol_colour_1000px.png b/docs/logo/symbol color 1000px.png similarity index 100% rename from docs/logo/setup_tools_logo_symbol_colour_1000px.png rename to docs/logo/symbol color 1000px.png diff --git a/docs/logo/setup_tools_logo_symbol_colour.svg b/docs/logo/symbol color.svg similarity index 100% rename from docs/logo/setup_tools_logo_symbol_colour.svg rename to docs/logo/symbol color.svg diff --git a/docs/logo/setup_tools_logotype_1line.svg b/docs/logo/type.svg similarity index 100% rename from docs/logo/setup_tools_logotype_1line.svg rename to docs/logo/type.svg From 4056435460b770c3ab7a8ea1637f05de690e7e01 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jul 2020 11:49:37 -0400 Subject: [PATCH 8006/8469] Render logo in the readme. --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 9cbf7b86e1..dc2bf98bde 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,6 @@ +.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg + + .. image:: https://img.shields.io/pypi/v/setuptools.svg :target: `PyPI link`_ @@ -24,6 +27,7 @@ .. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme + See the `Installation Instructions `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From 0f491dc2b4141a17475eec12b02d8f237d7f7918 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jul 2020 11:57:44 -0400 Subject: [PATCH 8007/8469] Add banner to main docs page --- docs/index.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index 13a46e74ef..f3f65cb4d0 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,5 +1,8 @@ -Welcome to Setuptools' documentation! -===================================== +.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg + + +Documentation +============= Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects, where packaging includes: From 5e179ffca0a6ed5f3369139baaea61094df38524 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 4 Jul 2020 11:59:16 -0400 Subject: [PATCH 8008/8469] Remove stale description of packaging. --- docs/index.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/index.txt b/docs/index.txt index f3f65cb4d0..228f97c8b5 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -5,14 +5,7 @@ Documentation ============= Setuptools is a fully-featured, actively-maintained, and stable library -designed to facilitate packaging Python projects, where packaging includes: - - - Python package and module definitions - - Distribution package metadata - - Test hooks - - Project installation - - Platform-specific details - - Python 3 support +designed to facilitate packaging Python projects. Documentation content: From f3b4a9972163e6063b9d37db6352a54735955d81 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 Jul 2020 16:31:24 -0400 Subject: [PATCH 8009/8469] Add test for spawn when exe is missing. Ref pypa/distutils#3. --- distutils/tests/test_spawn.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py index 919d0ad98f..704019a198 100644 --- a/distutils/tests/test_spawn.py +++ b/distutils/tests/test_spawn.py @@ -126,6 +126,11 @@ def test_find_executable(self): rv = find_executable(program) self.assertEqual(rv, filename) + def test_spawn_missing_exe(self): + with self.assertRaises(DistutilsExecError) as ctx: + spawn(['does-not-exist']) + assert 'command does-no-exist failed' in str(ctx) + def test_suite(): return unittest.makeSuite(SpawnTestCase) From 7aa5abeafc1e0b1b351c4c8ac7eb14c310366a46 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 Jul 2020 16:33:16 -0400 Subject: [PATCH 8010/8469] Replace OSError with DistutilsExecError. Fixes pypa/distutils#3 and pypa/setuptools#2228 and bpo-41207. --- distutils/spawn.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/distutils/spawn.py b/distutils/spawn.py index aad277b0ca..0d1bd0391e 100644 --- a/distutils/spawn.py +++ b/distutils/spawn.py @@ -71,9 +71,15 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): env = dict(os.environ, MACOSX_DEPLOYMENT_TARGET=cur_target) - proc = subprocess.Popen(cmd, env=env) - proc.wait() - exitcode = proc.returncode + try: + proc = subprocess.Popen(cmd, env=env) + proc.wait() + exitcode = proc.returncode + except OSError as exc: + if not DEBUG: + cmd = cmd[0] + raise DistutilsExecError( + "command %r failed: %s" % (cmd, exc.args[-1])) from exc if exitcode: if not DEBUG: From ea966a23de98c04df90ba13e9fb03d1b0afe4962 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 Jul 2020 16:40:01 -0400 Subject: [PATCH 8011/8469] Update changelog. Ref #2228. --- changelog.d/2228.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2228.misc.rst diff --git a/changelog.d/2228.misc.rst b/changelog.d/2228.misc.rst new file mode 100644 index 0000000000..be6b199d59 --- /dev/null +++ b/changelog.d/2228.misc.rst @@ -0,0 +1 @@ +Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file. From 44cec449385cac29b0f6c9719b506eb6b8c1826d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 5 Jul 2020 16:40:17 -0400 Subject: [PATCH 8012/8469] =?UTF-8?q?Bump=20version:=2049.0.0=20=E2=86=92?= =?UTF-8?q?=2049.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2228.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2228.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 05ff5f1881..87d756b8bb 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.0.0 +current_version = 49.0.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index bd67931d71..a38b610b46 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.0.1 +------- + +* #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file. + + v49.0.0 ------- diff --git a/changelog.d/2228.misc.rst b/changelog.d/2228.misc.rst deleted file mode 100644 index be6b199d59..0000000000 --- a/changelog.d/2228.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file. diff --git a/setup.cfg b/setup.cfg index d73241861e..c9d108ca98 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.0.0 +version = 49.0.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From c6fff69d9597c203cb6a7f3b34dbb6244f148ae6 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Mon, 6 Jul 2020 20:29:49 +0800 Subject: [PATCH 8013/8469] bpo-40275: Use new test.support helper submodules in tests (GH-21317) --- tests/support.py | 4 ++-- tests/test_build_ext.py | 3 ++- tests/test_filelist.py | 13 ++++++------- tests/test_spawn.py | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/support.py b/tests/support.py index 259af882ec..23b907b607 100644 --- a/tests/support.py +++ b/tests/support.py @@ -6,7 +6,7 @@ import unittest import sysconfig from copy import deepcopy -import test.support +from test.support import os_helper from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL @@ -64,7 +64,7 @@ def tearDown(self): super().tearDown() while self.tempdirs: tmpdir = self.tempdirs.pop() - test.support.rmtree(tmpdir) + os_helper.rmtree(tmpdir) def mkdtemp(self): """Create a temporary directory that will be cleaned up. diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index 5e47e0773a..f9e0d766d8 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -15,6 +15,7 @@ import unittest from test import support +from test.support import os_helper from test.support.script_helper import assert_python_ok # http://bugs.python.org/issue4373 @@ -38,7 +39,7 @@ def setUp(self): # bpo-30132: On Windows, a .pdb file may be created in the current # working directory. Create a temporary working directory to cleanup # everything at the end of the test. - change_cwd = support.change_cwd(self.tmp_dir) + change_cwd = os_helper.change_cwd(self.tmp_dir) change_cwd.__enter__() self.addCleanup(change_cwd.__exit__, None, None, None) diff --git a/tests/test_filelist.py b/tests/test_filelist.py index 2c26c22617..cee97d439e 100644 --- a/tests/test_filelist.py +++ b/tests/test_filelist.py @@ -8,7 +8,6 @@ from distutils.filelist import glob_to_re, translate_pattern, FileList from distutils import filelist -import test.support from test.support import os_helper from test.support import captured_stdout, run_unittest from distutils.tests import support @@ -298,7 +297,7 @@ def test_process_template(self): class FindAllTestCase(unittest.TestCase): @os_helper.skip_unless_symlink def test_missing_symlink(self): - with test.support.temp_cwd(): + with os_helper.temp_cwd(): os.symlink('foo', 'bar') self.assertEqual(filelist.findall(), []) @@ -308,13 +307,13 @@ def test_basic_discovery(self): '.' as the parameter, the dot should be omitted from the results. """ - with test.support.temp_cwd(): + with os_helper.temp_cwd(): os.mkdir('foo') file1 = os.path.join('foo', 'file1.txt') - test.support.create_empty_file(file1) + os_helper.create_empty_file(file1) os.mkdir('bar') file2 = os.path.join('bar', 'file2.txt') - test.support.create_empty_file(file2) + os_helper.create_empty_file(file2) expected = [file2, file1] self.assertEqual(sorted(filelist.findall()), expected) @@ -323,9 +322,9 @@ def test_non_local_discovery(self): When findall is called with another path, the full path name should be returned. """ - with test.support.temp_dir() as temp_dir: + with os_helper.temp_dir() as temp_dir: file1 = os.path.join(temp_dir, 'file1.txt') - test.support.create_empty_file(file1) + os_helper.create_empty_file(file1) expected = [file1] self.assertEqual(filelist.findall(temp_dir), expected) diff --git a/tests/test_spawn.py b/tests/test_spawn.py index cf1faad5f4..3647bab7b1 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -4,7 +4,7 @@ import sys import unittest.mock from test.support import run_unittest, unix_shell -from test import support as test_support +from test.support import os_helper from distutils.spawn import find_executable from distutils.spawn import spawn @@ -44,9 +44,9 @@ def test_spawn(self): spawn([exe]) # should work without any error def test_find_executable(self): - with test_support.temp_dir() as tmp_dir: + with os_helper.temp_dir() as tmp_dir: # use TESTFN to get a pseudo-unique filename - program_noeext = test_support.TESTFN + program_noeext = os_helper.TESTFN # Give the temporary program an ".exe" suffix for all. # It's needed on Windows and not harmful on other platforms. program = program_noeext + ".exe" @@ -66,7 +66,7 @@ def test_find_executable(self): self.assertEqual(rv, filename) # test find in the current directory - with test_support.change_cwd(tmp_dir): + with os_helper.change_cwd(tmp_dir): rv = find_executable(program) self.assertEqual(rv, program) @@ -76,7 +76,7 @@ def test_find_executable(self): self.assertIsNone(rv) # PATH='': no match, except in the current directory - with test_support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env['PATH'] = '' with unittest.mock.patch('distutils.spawn.os.confstr', return_value=tmp_dir, create=True), \ @@ -86,12 +86,12 @@ def test_find_executable(self): self.assertIsNone(rv) # look in current directory - with test_support.change_cwd(tmp_dir): + with os_helper.change_cwd(tmp_dir): rv = find_executable(program) self.assertEqual(rv, program) # PATH=':': explicitly looks in the current directory - with test_support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env['PATH'] = os.pathsep with unittest.mock.patch('distutils.spawn.os.confstr', return_value='', create=True), \ @@ -100,12 +100,12 @@ def test_find_executable(self): self.assertIsNone(rv) # look in current directory - with test_support.change_cwd(tmp_dir): + with os_helper.change_cwd(tmp_dir): rv = find_executable(program) self.assertEqual(rv, program) # missing PATH: test os.confstr("CS_PATH") and os.defpath - with test_support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env.pop('PATH', None) # without confstr From a21ea47bf0a8bbd79afdbd93b80681f1133aedf0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jul 2020 06:39:32 -0400 Subject: [PATCH 8014/8469] Move assert outside the context so it actually has its effect. --- distutils/tests/test_spawn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py index 704019a198..adaa48ef2d 100644 --- a/distutils/tests/test_spawn.py +++ b/distutils/tests/test_spawn.py @@ -129,7 +129,7 @@ def test_find_executable(self): def test_spawn_missing_exe(self): with self.assertRaises(DistutilsExecError) as ctx: spawn(['does-not-exist']) - assert 'command does-no-exist failed' in str(ctx) + self.assertIn("command 'does-not-exist' failed", str(ctx.exception)) def test_suite(): From 58f0b3d1ef9d17d511cf027e87f7b87dc3be6bd9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jul 2020 07:11:12 -0400 Subject: [PATCH 8015/8469] Remove py2_warn, no longer needed as a SyntaxError is encountered before the warning can be issueed. --- pkg_resources/__init__.py | 1 - pkg_resources/py2_warn.py | 16 ---------------- 2 files changed, 17 deletions(-) delete mode 100644 pkg_resources/py2_warn.py diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index b9534903be..5927ef0dfe 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -82,7 +82,6 @@ __import__('pkg_resources.extern.packaging.specifiers') __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') -__import__('pkg_resources.py2_warn') __metaclass__ = type diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py deleted file mode 100644 index 6855aa245e..0000000000 --- a/pkg_resources/py2_warn.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys -import warnings -import textwrap - - -msg = textwrap.dedent(""" - Encountered a version of Setuptools that no longer supports - this version of Python. Please head to - https://bit.ly/setuptools-py2-sunset for support. - """) - -pre = "Setuptools no longer works on Python 2\n" - -if sys.version_info < (3,): - warnings.warn(pre + "*" * 60 + msg + "*" * 60) - raise SystemExit(32) From e34d6d8b739a8e0edbdfa324bf3607430aa3ff70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jul 2020 07:11:28 -0400 Subject: [PATCH 8016/8469] bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359) Automerge-Triggered-By: @jaraco --- spawn.py | 12 +++++++++--- tests/test_spawn.py | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/spawn.py b/spawn.py index aad277b0ca..0d1bd0391e 100644 --- a/spawn.py +++ b/spawn.py @@ -71,9 +71,15 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): env = dict(os.environ, MACOSX_DEPLOYMENT_TARGET=cur_target) - proc = subprocess.Popen(cmd, env=env) - proc.wait() - exitcode = proc.returncode + try: + proc = subprocess.Popen(cmd, env=env) + proc.wait() + exitcode = proc.returncode + except OSError as exc: + if not DEBUG: + cmd = cmd[0] + raise DistutilsExecError( + "command %r failed: %s" % (cmd, exc.args[-1])) from exc if exitcode: if not DEBUG: diff --git a/tests/test_spawn.py b/tests/test_spawn.py index 3647bab7b1..4ec767b120 100644 --- a/tests/test_spawn.py +++ b/tests/test_spawn.py @@ -124,6 +124,11 @@ def test_find_executable(self): rv = find_executable(program) self.assertEqual(rv, filename) + def test_spawn_missing_exe(self): + with self.assertRaises(DistutilsExecError) as ctx: + spawn(['does-not-exist']) + self.assertIn("command 'does-not-exist' failed", str(ctx.exception)) + def test_suite(): return unittest.makeSuite(SpawnTestCase) From 317337daee72994b3d452ffcce5f4ecd47d9dc5d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 7 Jul 2020 17:08:52 -0400 Subject: [PATCH 8017/8469] Update changelog. --- changelog.d/2094.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2094.misc.rst diff --git a/changelog.d/2094.misc.rst b/changelog.d/2094.misc.rst new file mode 100644 index 0000000000..675cd3528a --- /dev/null +++ b/changelog.d/2094.misc.rst @@ -0,0 +1 @@ +Removed pkg_resources.py2_warn module, which is no longer reachable. From cd8ac41d2f40de096251b78a55a74b2705a7af8f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 10 Jul 2020 14:08:59 -0400 Subject: [PATCH 8018/8469] =?UTF-8?q?Bump=20version:=2049.1.0=20=E2=86=92?= =?UTF-8?q?=2049.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2094.misc.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2094.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f2f2b27125..55f806f90b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.1.0 +current_version = 49.1.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index f00482e3fc..d5a2a70345 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.1.1 +------- + +* #2094: Removed pkg_resources.py2_warn module, which is no longer reachable. + + v49.0.1 ------- diff --git a/changelog.d/2094.misc.rst b/changelog.d/2094.misc.rst deleted file mode 100644 index 675cd3528a..0000000000 --- a/changelog.d/2094.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Removed pkg_resources.py2_warn module, which is no longer reachable. diff --git a/setup.cfg b/setup.cfg index 1f347c3fce..3151fa499e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.1.0 +version = 49.1.1 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 069eb7de91856a92f0c630b048f14367af80c3ad Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 11 Jul 2020 02:58:16 +0300 Subject: [PATCH 8019/8469] Test Python 3.9-dev --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e8bc75743b..0e636eecc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ jobs: - <<: *latest_py3 env: LANG=C - python: 3.8-dev + - python: 3.9-dev - <<: *latest_py3 env: TOXENV=docs allow_failures: From 67f0cc59f0d803f13c1da1cb60e87469f656617e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 10 Jul 2020 20:14:49 -0400 Subject: [PATCH 8020/8469] Provide escape hatch for distutils adoption. --- setuptools/distutils_patch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index b2095fbac7..bd1b499702 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -7,6 +7,7 @@ import sys import re +import os import importlib import warnings @@ -20,6 +21,13 @@ def clear_distutils(): del sys.modules[name] +def enabled(): + """ + Provide an escape hatch for environments wishing to opt out. + """ + return 'SETUPTOOLS_DISTUTILS_ADOPTION_OPT_OUT' not in os.environ + + def ensure_local_distutils(): clear_distutils() distutils = importlib.import_module('setuptools._distutils') @@ -31,4 +39,5 @@ def ensure_local_distutils(): assert '_distutils' in core.__file__, core.__file__ -ensure_local_distutils() +if enabled(): + ensure_local_distutils() From bedaf1309d2633831a7fb7dea561642e7da704df Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 10 Jul 2020 20:46:30 -0400 Subject: [PATCH 8021/8469] Allow opt-in and opt-out of distutils adoption at run time with SETUPTOOLS_USE_DISTUTILS environment variable. --- changelog.d/2232.misc.patch | 1 + setuptools/__init__.py | 2 +- setuptools/distutils_patch.py | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog.d/2232.misc.patch diff --git a/changelog.d/2232.misc.patch b/changelog.d/2232.misc.patch new file mode 100644 index 0000000000..4a956e1e3a --- /dev/null +++ b/changelog.d/2232.misc.patch @@ -0,0 +1 @@ +In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used. diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a6cbe1322a..8388251115 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -4,7 +4,7 @@ import functools # Disabled for now due to: #2228, #2230 -# import setuptools.distutils_patch # noqa: F401 +import setuptools.distutils_patch # noqa: F401 import distutils.core import distutils.filelist diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index bd1b499702..c5f273dd4d 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -23,9 +23,10 @@ def clear_distutils(): def enabled(): """ - Provide an escape hatch for environments wishing to opt out. + Allow selection of distutils by environment variable. """ - return 'SETUPTOOLS_DISTUTILS_ADOPTION_OPT_OUT' not in os.environ + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') + return which == 'local' def ensure_local_distutils(): From 599f6393c1be4d5852f5b9884b9fb282a16ca64a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Jul 2020 02:17:03 -0400 Subject: [PATCH 8022/8469] =?UTF-8?q?Bump=20version:=2049.1.1=20=E2=86=92?= =?UTF-8?q?=2049.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2232.misc.patch | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2232.misc.patch diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 55f806f90b..30e83be1e0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.1.1 +current_version = 49.1.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index d5a2a70345..24837a9772 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.1.2 +------- + +* #2232: In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used. + + v49.1.1 ------- diff --git a/changelog.d/2232.misc.patch b/changelog.d/2232.misc.patch deleted file mode 100644 index 4a956e1e3a..0000000000 --- a/changelog.d/2232.misc.patch +++ /dev/null @@ -1 +0,0 @@ -In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used. diff --git a/setup.cfg b/setup.cfg index 3151fa499e..dc29f7b1ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.1.1 +version = 49.1.2 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 8b4ce333c093f459698c0545550269a393387c5f Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Sat, 11 Jul 2020 12:51:48 -0600 Subject: [PATCH 8023/8469] Change exec_module to load_module Fixes #2246 --- setuptools/command/bdist_egg.py | 2 +- setuptools/command/build_ext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index e94fe25250..7af3165cd5 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -59,7 +59,7 @@ def __bootstrap__(): from importlib.machinery import ExtensionFileLoader __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ - ExtensionFileLoader(__name__,__file__).exec_module() + ExtensionFileLoader(__name__,__file__).load_module() __bootstrap__() """).lstrip() with open(pyfile, 'w') as f: diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 327fa06335..0eb29adc8b 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -268,7 +268,7 @@ def write_stub(self, output_dir, ext, compile=False): " os.chdir(os.path.dirname(__file__))", if_dl(" sys.setdlopenflags(dl.RTLD_NOW)"), " ExtensionFileLoader(__name__,", - " __file__).exec_module()", + " __file__).load_module()", " finally:", if_dl(" sys.setdlopenflags(old_flags)"), " os.chdir(old_dir)", From 6d3250fa1ea1a309e8e45737d0a1dccbbd3f95e4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 03:39:35 -0400 Subject: [PATCH 8024/8469] Add a simple blank issue so it gets a green button. --- .github/ISSUE_TEMPLATE/blank.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/blank.md diff --git a/.github/ISSUE_TEMPLATE/blank.md b/.github/ISSUE_TEMPLATE/blank.md new file mode 100644 index 0000000000..e41fc749c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/blank.md @@ -0,0 +1,4 @@ +--- +name: Bug Report or Feature Request +about: Report a bug or request a feature +--- From b69029f753e061359adc554b2f5c600a2d143bf9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 03:49:59 -0400 Subject: [PATCH 8025/8469] Update changelog. --- changelog.d/2249.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2249.misc.rst diff --git a/changelog.d/2249.misc.rst b/changelog.d/2249.misc.rst new file mode 100644 index 0000000000..14742dc354 --- /dev/null +++ b/changelog.d/2249.misc.rst @@ -0,0 +1 @@ +Fix extension loading technique in stubs. From c4e3afb3f559f6cbe0f29ad908de8b05b993fb5f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 04:14:22 -0400 Subject: [PATCH 8026/8469] Add README, including docs describing how to synchronize with CPython. --- README.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000..e619264d29 --- /dev/null +++ b/README.rst @@ -0,0 +1,40 @@ +Python Module Distribution Utilities extracted from the Python Standard Library + +Synchronizing +============= + +This project is kept in sync with the code still in stdlib. + +From CPython +------------ + +The original history and attribution of all changes contributed to CPython can be found in the `cpython branch `_. If new commits are added to CPython, they should be synchronized back to this project. + +First, create a clone of CPython that only includes the distutils changes. Due to the large size of the CPython repository, this operation is fairly expensive. + + git clone https://github.com/python/cpython python-distutils + cd python-distutils + git filter-branch --prune-empty --subdirectory-filter Lib/distutils master + +Then, pull those changes into the repository at the cpython branch. + + cd $distutils + git checkout cpython + git fetch $python_distutils + git merge FETCH_HEAD + +Finally, merge the changes from cpython into master (possibly as a pull request). + +To CPython +---------- + +Merging changes from this repository is easier. + +From the CPython repo, cherry-pick the changes from this project. + + git -C $distutils format-patch HEAD~2 --stdout | git am --directory Lib + +To Setuptools +------------- + +This project also maintains a `clean branch `_ to capture only the code changes to distutils, excluding the ancillary details like packaging and this document. From 0039de02e84a2256d6d4763fb76836dd4748f3e4 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 12 Jul 2020 11:42:24 +0300 Subject: [PATCH 8027/8469] Test Python 3.9-dev --- .github/workflows/python-tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 5a5980842c..f2188d38da 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -30,6 +30,9 @@ jobs: - macOS-latest # - windows-2019 # - windows-2016 + include: + # Dev versions + - { python-version: 3.9-dev, os: ubuntu-20.04 } env: NETWORK_REQUIRED: 1 @@ -38,8 +41,14 @@ jobs: steps: - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} (deadsnakes) + uses: deadsnakes/action@v1.0.0 + if: endsWith(matrix.python-version, '-dev') + with: + python-version: ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1.1.1 + if: "!endsWith(matrix.python-version, '-dev')" with: python-version: ${{ matrix.python-version }} - name: Log Python version From 360aadc4c2a9941a68a3f3f63375ce5380fef6a0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 Jul 2020 15:31:18 -0400 Subject: [PATCH 8028/8469] Allow spawn to accept environment. Avoid monkey-patching global state. Closes pypa/setuptools#2212 and closes pypa/distutils#5. --- distutils/_msvccompiler.py | 8 ++------ distutils/spawn.py | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/distutils/_msvccompiler.py b/distutils/_msvccompiler.py index af8099a407..0e98692e31 100644 --- a/distutils/_msvccompiler.py +++ b/distutils/_msvccompiler.py @@ -501,12 +501,8 @@ def link(self, log.debug("skipping %s (up-to-date)", output_filename) def spawn(self, cmd): - old_path = os.getenv('path') - try: - os.environ['path'] = self._paths - return super().spawn(cmd) - finally: - os.environ['path'] = old_path + env = dict(os.environ, path=self._paths) + return super().spawn(cmd, env=env) # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in diff --git a/distutils/spawn.py b/distutils/spawn.py index 0d1bd0391e..fc592d4a91 100644 --- a/distutils/spawn.py +++ b/distutils/spawn.py @@ -20,7 +20,7 @@ _cfg_target_split = None -def spawn(cmd, search_path=1, verbose=0, dry_run=0): +def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): """Run another program, specified as a command list 'cmd', in a new process. 'cmd' is just the argument list for the new process, ie. @@ -49,7 +49,8 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): if executable is not None: cmd[0] = executable - env = None + env = env if env is not None else dict(os.environ) + if sys.platform == 'darwin': global _cfg_target, _cfg_target_split if _cfg_target is None: @@ -68,8 +69,7 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): 'now "%s" but "%s" during configure' % (cur_target, _cfg_target)) raise DistutilsPlatformError(my_msg) - env = dict(os.environ, - MACOSX_DEPLOYMENT_TARGET=cur_target) + env.update(MACOSX_DEPLOYMENT_TARGET=cur_target) try: proc = subprocess.Popen(cmd, env=env) From 8a4bc38e7b582b2006e17118162b1d2a0a23b8ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 05:02:18 -0400 Subject: [PATCH 8029/8469] Update changelog. --- changelog.d/2212.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2212.misc.rst diff --git a/changelog.d/2212.misc.rst b/changelog.d/2212.misc.rst new file mode 100644 index 0000000000..d6fc7bf8af --- /dev/null +++ b/changelog.d/2212.misc.rst @@ -0,0 +1 @@ +(Distutils) Allow spawn to accept environment. Avoid monkey-patching global state. From 9e16d5399bb6b01aa0d7a73159765f064f88db22 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 05:07:29 -0400 Subject: [PATCH 8030/8469] =?UTF-8?q?Bump=20version:=2049.1.2=20=E2=86=92?= =?UTF-8?q?=2049.1.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 7 +++++++ changelog.d/2212.misc.rst | 1 - changelog.d/2249.misc.rst | 1 - setup.cfg | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/2212.misc.rst delete mode 100644 changelog.d/2249.misc.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 30e83be1e0..5e4d74b050 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.1.2 +current_version = 49.1.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 24837a9772..b23bc3948f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +v49.1.3 +------- + +* #2212: (Distutils) Allow spawn to accept environment. Avoid monkey-patching global state. +* #2249: Fix extension loading technique in stubs. + + v49.1.2 ------- diff --git a/changelog.d/2212.misc.rst b/changelog.d/2212.misc.rst deleted file mode 100644 index d6fc7bf8af..0000000000 --- a/changelog.d/2212.misc.rst +++ /dev/null @@ -1 +0,0 @@ -(Distutils) Allow spawn to accept environment. Avoid monkey-patching global state. diff --git a/changelog.d/2249.misc.rst b/changelog.d/2249.misc.rst deleted file mode 100644 index 14742dc354..0000000000 --- a/changelog.d/2249.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Fix extension loading technique in stubs. diff --git a/setup.cfg b/setup.cfg index dc29f7b1ab..bad15f93e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.1.2 +version = 49.1.3 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From 9e58d95017656ee33d2cf642cf1be6c77298f16d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 10:56:14 -0400 Subject: [PATCH 8031/8469] Re-enable distutils patch by default. --- changelog.d/2232.breaking.rst | 1 + setuptools/distutils_patch.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2232.breaking.rst diff --git a/changelog.d/2232.breaking.rst b/changelog.d/2232.breaking.rst new file mode 100644 index 0000000000..b2fd926fe8 --- /dev/null +++ b/changelog.d/2232.breaking.rst @@ -0,0 +1 @@ +Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index c5f273dd4d..e6b2aad540 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -25,7 +25,7 @@ def enabled(): """ Allow selection of distutils by environment variable. """ - which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local') return which == 'local' From 36df1d74933ef18a4099f4e82dbe55c00e45709e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 11:39:51 -0400 Subject: [PATCH 8032/8469] Warn the user when distutils is present to discourage this usage and direct users to the recommended usage. Closes #2230. --- changelog.d/2230.change.rst | 1 + setuptools/distutils_patch.py | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2230.change.rst diff --git a/changelog.d/2230.change.rst b/changelog.d/2230.change.rst new file mode 100644 index 0000000000..1719f497c0 --- /dev/null +++ b/changelog.d/2230.change.rst @@ -0,0 +1 @@ +Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first. diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index c5f273dd4d..33f1e7f961 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -12,10 +12,26 @@ import warnings +is_pypy = '__pypy__' in sys.builtin_module_names + + +def warn_distutils_present(): + if 'distutils' not in sys.modules: + return + if is_pypy and sys.version_info < (3, 7): + # PyPy for 3.6 unconditionally imports distutils, so bypass the warning + # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 + return + warnings.warn( + "Distutils was imported before Setuptools. This usage is discouraged " + "and may exhibit undesirable behaviors or errors. Please use " + "Setuptools' objects directly or at least import Setuptools first.") + + def clear_distutils(): if 'distutils' not in sys.modules: return - warnings.warn("Setuptools is replacing distutils") + warnings.warn("Setuptools is replacing distutils.") mods = [name for name in sys.modules if re.match(r'distutils\b', name)] for name in mods: del sys.modules[name] @@ -40,5 +56,6 @@ def ensure_local_distutils(): assert '_distutils' in core.__file__, core.__file__ +warn_distutils_present() if enabled(): ensure_local_distutils() From 9f47efe757762351ec12b4303e747ac0774db991 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jul 2020 02:54:32 -0400 Subject: [PATCH 8033/8469] Programmatically disable coverage when running on PyPy. --- conftest.py | 18 ++++++++++++++++++ tox.ini | 4 ---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index 1746bfb588..0bc8d320bf 100644 --- a/conftest.py +++ b/conftest.py @@ -17,6 +17,24 @@ def pytest_addoption(parser): ] +def pytest_configure(config): + disable_coverage_on_pypy(config) + + +def disable_coverage_on_pypy(config): + """ + Coverage makes tests on PyPy unbearably slow, so disable it. + """ + if '__pypy__' not in sys.builtin_module_names: + return + + # Recommended at pytest-dev/pytest-cov#418 + cov = config.pluginmanager.get_plugin('_cov') + cov.options.no_cov = True + if cov.cov_controller: + cov.cov_controller.pause() + + if sys.version_info < (3,): collect_ignore.append('setuptools/lib2to3_ex.py') collect_ignore.append('setuptools/_imp.py') diff --git a/tox.ini b/tox.ini index 59213e88f9..9ce5cb5c37 100644 --- a/tox.ini +++ b/tox.ini @@ -29,10 +29,6 @@ extras = tests -[testenv:pypy{,3}] -commands = pytest --no-cov {posargs} - - [testenv:coverage] description=Combine coverage data and create report deps=coverage From 37d81f4ce8f08c4baf44b6ff0f3f1bd3f6b2a127 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 12 Jul 2020 12:09:11 -0400 Subject: [PATCH 8034/8469] =?UTF-8?q?Bump=20version:=2049.1.3=20=E2=86=92?= =?UTF-8?q?=2049.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CHANGES.rst | 6 ++++++ changelog.d/2230.change.rst | 1 - setup.cfg | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/2230.change.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5e4d74b050..9b3e408589 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.1.3 +current_version = 49.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index b23bc3948f..82e6ef66d3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v49.2.0 +------- + +* #2230: Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first. + + v49.1.3 ------- diff --git a/changelog.d/2230.change.rst b/changelog.d/2230.change.rst deleted file mode 100644 index 1719f497c0..0000000000 --- a/changelog.d/2230.change.rst +++ /dev/null @@ -1 +0,0 @@ -Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first. diff --git a/setup.cfg b/setup.cfg index bad15f93e6..fa0e565646 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.1.3 +version = 49.2.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org From eb2ab6bc6e32ef48d4a286c0453c10d10d0f129b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 09:41:01 -0400 Subject: [PATCH 8035/8469] Remove issue templates The "setuptools warns about incompatibility" template has generated no useful reports and should be removed. --- .github/ISSUE_TEMPLATE/blank.md | 4 -- ...ls-warns-about-python-2-incompatibility.md | 59 ------------------- 2 files changed, 63 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/blank.md delete mode 100644 .github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md diff --git a/.github/ISSUE_TEMPLATE/blank.md b/.github/ISSUE_TEMPLATE/blank.md deleted file mode 100644 index e41fc749c7..0000000000 --- a/.github/ISSUE_TEMPLATE/blank.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: Bug Report or Feature Request -about: Report a bug or request a feature ---- diff --git a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md b/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md deleted file mode 100644 index 1a4f58f284..0000000000 --- a/.github/ISSUE_TEMPLATE/setuptools-warns-about-python-2-incompatibility.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -name: Setuptools warns about Python 2 incompatibility -about: Report the issue where setuptools 45 or later stops working on Python 2 -title: Incompatible install in (summarize your environment) -labels: Python 2 -assignees: '' - ---- - - - -## Prerequisites - - - -- [ ] Read [Python 2 Sunset docs](https://setuptools.readthedocs.io/en/latest/python%202%20sunset.html). -- [ ] Python 2 is required for this application. -- [ ] I maintain the software that installs Setuptools (if not, please contact that project). -- [ ] Setuptools installed with pip 9 or later. -- [ ] Pinning Setuptools to `setuptools<45` in the environment was unsuccessful. - -## Environment Details - -- Operating System and version: -- Python version: -- Python installed how: -- Virtualenv version (if using virtualenv): n/a - -Command(s) that triggered the warning/error (and output): - -``` -``` - -Command(s) used to install setuptools (and output): - -``` -``` - -Output of `pip --version` when installing setuptools: - -``` -``` - -## Other notes From 28e1b5ab2f4d573a91705cdbb025e57023d264b1 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 11:15:26 -0400 Subject: [PATCH 8036/8469] Use .pth file to import distutils from setuptools --- MANIFEST.in | 1 + _distutils_importer/__init__.py | 6 ++++ .../distutils/__init__.py | 3 ++ distutils_precedence.pth | 1 + setup.py | 32 +++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 _distutils_importer/__init__.py create mode 100644 _distutils_importer/distutils-shim-package/distutils/__init__.py create mode 100644 distutils_precedence.pth diff --git a/MANIFEST.in b/MANIFEST.in index 128ae280ec..be83a7f336 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,4 +13,5 @@ include launcher.c include msvc-build-launcher.cmd include pytest.ini include tox.ini +include distutils_precedence.pth exclude pyproject.toml # Temporary workaround for #1644. diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py new file mode 100644 index 0000000000..54a825fed6 --- /dev/null +++ b/_distutils_importer/__init__.py @@ -0,0 +1,6 @@ +import sys + +here = os.path.dirname(__file__) +NEW_DISTUTILS_LOCATION = os.path.join(here, 'distutils-shim-package') + +sys.path.insert(0, NEW_DISTUTILS_LOCATION) diff --git a/_distutils_importer/distutils-shim-package/distutils/__init__.py b/_distutils_importer/distutils-shim-package/distutils/__init__.py new file mode 100644 index 0000000000..de098c72f7 --- /dev/null +++ b/_distutils_importer/distutils-shim-package/distutils/__init__.py @@ -0,0 +1,3 @@ +import setuptools.distutils_patch + +from distutils import * diff --git a/distutils_precedence.pth b/distutils_precedence.pth new file mode 100644 index 0000000000..2d9b996abc --- /dev/null +++ b/distutils_precedence.pth @@ -0,0 +1 @@ +import os; (os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') == 'local' and __import__('_distutils_importer')) diff --git a/setup.py b/setup.py index 1fe18bd13c..daab3e8796 100755 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ import sys import setuptools +from setuptools.command.install import install here = os.path.dirname(__file__) @@ -49,6 +50,7 @@ def _gen_console_scripts(): package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], + _distutils_importer=['distutils-shim-package/distutils/__init__.py'], ) force_windows_specific_files = ( @@ -81,8 +83,38 @@ def pypi_link(pkg_filename): return '/'.join(parts) +class install_with_pth(install): + """ + Custom install command to install a .pth file for distutils patching. + + This is necessary because there's no standard way to install a `.pth` file + alongside your package (and there probably shouldn't be one), but we need + to do this in order to give precedence higher precedence to our version of + `distutils` than the standard library. + """ + + def initialize_options(self): + install.initialize_options(self) + + name = 'distutils_precedence' + with open(os.path.join(here, name + '.pth'), 'rt') as f: + contents = f.read() + + self.extra_path = (name, contents) + + def finalize_options(self): + install.finalize_options(self) + + install_suffix = os.path.relpath(self.install_lib, + self.install_libbase) + + if install_suffix == self.extra_path[1]: + self.install_lib = self.install_libbase + + setup_params = dict( src_root=None, + cmdclass={'install': install_with_pth}, package_data=package_data, entry_points={ "distutils.commands": [ From 03b36b5dc594bbe239d0ad66dc43ea7d1832072c Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 12:02:41 -0400 Subject: [PATCH 8037/8469] Remove warnings With the new `.pth` file, these warnings are no longer necessary. --- setuptools/distutils_patch.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index 33f1e7f961..d01a1a1b10 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -12,26 +12,10 @@ import warnings -is_pypy = '__pypy__' in sys.builtin_module_names - - -def warn_distutils_present(): - if 'distutils' not in sys.modules: - return - if is_pypy and sys.version_info < (3, 7): - # PyPy for 3.6 unconditionally imports distutils, so bypass the warning - # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 - return - warnings.warn( - "Distutils was imported before Setuptools. This usage is discouraged " - "and may exhibit undesirable behaviors or errors. Please use " - "Setuptools' objects directly or at least import Setuptools first.") - - def clear_distutils(): if 'distutils' not in sys.modules: return - warnings.warn("Setuptools is replacing distutils.") + mods = [name for name in sys.modules if re.match(r'distutils\b', name)] for name in mods: del sys.modules[name] @@ -56,6 +40,5 @@ def ensure_local_distutils(): assert '_distutils' in core.__file__, core.__file__ -warn_distutils_present() if enabled(): ensure_local_distutils() From 89e9d3c8910c3f419eb9f1c2758a748c6938655b Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 14:43:23 -0400 Subject: [PATCH 8038/8469] Adjust distutils shim when removing _distutils_importer --- _distutils_importer/__init__.py | 17 ++++++++++++++--- setuptools/sandbox.py | 19 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index 54a825fed6..498c4ac176 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -1,6 +1,17 @@ import sys -here = os.path.dirname(__file__) -NEW_DISTUTILS_LOCATION = os.path.join(here, 'distutils-shim-package') +_HERE = os.path.dirname(__file__) +NEW_DISTUTILS_LOCATION = os.path.join(_HERE, 'distutils-shim-package') -sys.path.insert(0, NEW_DISTUTILS_LOCATION) +def add_shim(): + if NEW_DISTUTILS_LOCATION not in sys.path: + sys.path.insert(0, NEW_DISTUTILS_LOCATION) + +def remove_shim(): + try: + sys.path.remove(NEW_DISTUTILS_LOCATION) + except ValueError: + pass + + +add_shim() diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 93ae8eb4d9..342a713f5c 100644 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -185,8 +185,8 @@ def setup_context(setup_dir): temp_dir = os.path.join(setup_dir, 'temp') with save_pkg_resources_state(): with save_modules(): - hide_setuptools() with save_path(): + hide_setuptools() with save_argv(): with override_temp(temp_dir): with pushd(setup_dir): @@ -195,6 +195,15 @@ def setup_context(setup_dir): yield +_MODULES_TO_HIDE = { + 'setuptools', + 'distutils', + 'pkg_resources', + 'Cython', + '_distutils_importer', +} + + def _needs_hiding(mod_name): """ >>> _needs_hiding('setuptools') @@ -212,8 +221,8 @@ def _needs_hiding(mod_name): >>> _needs_hiding('Cython') True """ - pattern = re.compile(r'(setuptools|pkg_resources|distutils|Cython)(\.|$)') - return bool(pattern.match(mod_name)) + base_module = mod_name.split('.', 1)[0] + return base_module in _MODULES_TO_HIDE def hide_setuptools(): @@ -223,6 +232,10 @@ def hide_setuptools(): necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. """ + _distutils_importer = sys.modules.get('_distutils_importer', None) + if _distutils_importer is not None: + _distutils_importer.remove_shim() + modules = filter(_needs_hiding, sys.modules) _clear_modules(modules) From 642604f82c01175f2ad285800d969ff521495af0 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 14:44:12 -0400 Subject: [PATCH 8039/8469] Clean up setuptools/__init__.py imports This puts non-distutils imports first and removes one unused import. --- setuptools/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 8388251115..d9740403d9 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,17 +1,16 @@ """Extensions to the 'distutils' for large or complex distributions""" -import os +from fnmatch import fnmatchcase import functools +import os +import re # Disabled for now due to: #2228, #2230 import setuptools.distutils_patch # noqa: F401 import distutils.core -import distutils.filelist -import re from distutils.errors import DistutilsOptionError from distutils.util import convert_path -from fnmatch import fnmatchcase from ._deprecation_warning import SetuptoolsDeprecationWarning From 370839b417f6bafe783fa040646d80bdf673fac4 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 15:25:32 -0400 Subject: [PATCH 8040/8469] Use import hook instead of sys.path manipulation --- _distutils_importer/__init__.py | 32 ++++++++++++++++--- .../distutils/__init__.py | 3 -- setup.py | 1 - 3 files changed, 27 insertions(+), 9 deletions(-) delete mode 100644 _distutils_importer/distutils-shim-package/distutils/__init__.py diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index 498c4ac176..323ae2037c 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -1,15 +1,37 @@ import sys -_HERE = os.path.dirname(__file__) -NEW_DISTUTILS_LOCATION = os.path.join(_HERE, 'distutils-shim-package') + +class DistutilsMetaFinder: + def find_spec(self, fullname, path, target=None): + if path is not None or fullname != "distutils": + return None + + return self.get_distutils_spec() + + def get_distutils_spec(self): + import importlib + + class DistutilsLoader(importlib.util.abc.Loader): + + def create_module(self, spec): + return importlib.import_module('._distutils', 'setuptools') + + def exec_module(self, module): + pass + + return importlib.util.spec_from_loader('distutils', DistutilsLoader()) + + +DISTUTILS_FINDER = DistutilsMetaFinder() + def add_shim(): - if NEW_DISTUTILS_LOCATION not in sys.path: - sys.path.insert(0, NEW_DISTUTILS_LOCATION) + sys.meta_path.insert(0, DISTUTILS_FINDER) + def remove_shim(): try: - sys.path.remove(NEW_DISTUTILS_LOCATION) + sys.path.remove(DISTUTILS_FINDER) except ValueError: pass diff --git a/_distutils_importer/distutils-shim-package/distutils/__init__.py b/_distutils_importer/distutils-shim-package/distutils/__init__.py deleted file mode 100644 index de098c72f7..0000000000 --- a/_distutils_importer/distutils-shim-package/distutils/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import setuptools.distutils_patch - -from distutils import * diff --git a/setup.py b/setup.py index daab3e8796..cba37d3e59 100755 --- a/setup.py +++ b/setup.py @@ -50,7 +50,6 @@ def _gen_console_scripts(): package_data = dict( setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'], - _distutils_importer=['distutils-shim-package/distutils/__init__.py'], ) force_windows_specific_files = ( From 85a0a9026d1b40448d1757ca6cd75e5cc2c50fc6 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Mon, 13 Jul 2020 15:36:39 -0400 Subject: [PATCH 8041/8469] Revert "Remove warnings" This reverts commit 30b883f0b8071a3b1472c884574f38ce0128e457. --- setuptools/distutils_patch.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/setuptools/distutils_patch.py b/setuptools/distutils_patch.py index d01a1a1b10..33f1e7f961 100644 --- a/setuptools/distutils_patch.py +++ b/setuptools/distutils_patch.py @@ -12,10 +12,26 @@ import warnings -def clear_distutils(): +is_pypy = '__pypy__' in sys.builtin_module_names + + +def warn_distutils_present(): if 'distutils' not in sys.modules: return + if is_pypy and sys.version_info < (3, 7): + # PyPy for 3.6 unconditionally imports distutils, so bypass the warning + # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250 + return + warnings.warn( + "Distutils was imported before Setuptools. This usage is discouraged " + "and may exhibit undesirable behaviors or errors. Please use " + "Setuptools' objects directly or at least import Setuptools first.") + +def clear_distutils(): + if 'distutils' not in sys.modules: + return + warnings.warn("Setuptools is replacing distutils.") mods = [name for name in sys.modules if re.match(r'distutils\b', name)] for name in mods: del sys.modules[name] @@ -40,5 +56,6 @@ def ensure_local_distutils(): assert '_distutils' in core.__file__, core.__file__ +warn_distutils_present() if enabled(): ensure_local_distutils() From 48cc75e005b18549b424e4a794785c363cb1810a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 18 Jul 2020 11:54:57 +0200 Subject: [PATCH 8042/8469] Set up GHA to test on Python 3.9-beta and 3.8-dev --- .github/workflows/python-tests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index f2188d38da..5e16ab3011 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -25,14 +25,20 @@ jobs: - 3.6 - 3.5 os: - - ubuntu-latest + - ubuntu-18.04 - ubuntu-16.04 - macOS-latest # - windows-2019 # - windows-2016 include: - # Dev versions - - { python-version: 3.9-dev, os: ubuntu-20.04 } + # Pre-release versions (GH-shipped) + - os: ubuntu-20.04 + python-version: 3.9.0-beta.4 - 3.9.0 + # Dev versions (deadsnakes) + - os: ubuntu-20.04 + python-version: 3.9-dev + - os: ubuntu-20.04 + python-version: 3.8-dev env: NETWORK_REQUIRED: 1 @@ -47,7 +53,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1.1.1 + uses: actions/setup-python@v2 if: "!endsWith(matrix.python-version, '-dev')" with: python-version: ${{ matrix.python-version }} From bec11f03ab81da8af69909697925166793893e07 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 18 Jul 2020 13:46:01 -0400 Subject: [PATCH 8043/8469] Add docs on porting from distutils. --- docs/distutils-legacy.txt | 25 +++++++++++++++++++++++++ docs/index.txt | 1 + 2 files changed, 26 insertions(+) create mode 100644 docs/distutils-legacy.txt diff --git a/docs/distutils-legacy.txt b/docs/distutils-legacy.txt new file mode 100644 index 0000000000..a5d9626097 --- /dev/null +++ b/docs/distutils-legacy.txt @@ -0,0 +1,25 @@ +Porting from Distutils +====================== + +Setuptools and the PyPA have a `stated goal `_ to make Setuptools the reference API for distutils. + +Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is disabled by default. To enable the use of this copy of distutils when invoking setuptools, set the enviroment variable: + + SETUPTOOLS_USE_DISTUTILS=local + +This behavior is planned to become the default. + +Prefer Setuptools +----------------- + +As Distutils is deprecated, any usage of functions or objects from distutils is similarly discouraged, and Setuptools aims to replace or deprecate all such uses. This section describes the recommended replacements. + +``distutils.core.setup`` → ``setuptools.setup`` + +``distutils.cmd.Command`` → ``setuptools.Command`` + +``distutils.log`` → (no replacement yet) + +``distutils.version.*`` → ``packaging.version.*`` + +If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker `_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported. diff --git a/docs/index.txt b/docs/index.txt index 228f97c8b5..0dd5fd94c1 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -18,4 +18,5 @@ Documentation content: development roadmap Deprecated: Easy Install + distutils-legacy history From 47e5198e09060c8ff59f659ae56c6e64dcb3607e Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 19 Jul 2020 11:37:34 +0200 Subject: [PATCH 8044/8469] Make tox show tests output in parallel mode @ GHA --- .github/workflows/python-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 5e16ab3011..28ef36f73e 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -106,6 +106,7 @@ jobs: python -m tox --parallel auto + --parallel-live --notest --skip-missing-interpreters false - name: Test with tox @@ -113,3 +114,4 @@ jobs: python -m tox --parallel auto + --parallel-live From f976af5fbcca95cef61b8e228ca3653a094f8a7a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 19 Jul 2020 12:41:52 +0200 Subject: [PATCH 8045/8469] debug! make pytest extremely verbose --- .github/workflows/python-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 28ef36f73e..a9bc859aab 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -115,3 +115,5 @@ jobs: tox --parallel auto --parallel-live + -- + -vvvvv From 2b8b730db204d9d9a279802296de670b8a523fc0 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 19 Jul 2020 15:24:33 +0200 Subject: [PATCH 8046/8469] Add Python 3.9 beta from deadsnakes --- .github/workflows/python-tests.yml | 32 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index a9bc859aab..ed82aebb5a 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -34,6 +34,9 @@ jobs: # Pre-release versions (GH-shipped) - os: ubuntu-20.04 python-version: 3.9.0-beta.4 - 3.9.0 + # Pre-release versions (deadsnakes) + - os: ubuntu-20.04 + python-version: 3.9-beta # Dev versions (deadsnakes) - os: ubuntu-20.04 python-version: 3.9-dev @@ -42,21 +45,34 @@ jobs: env: NETWORK_REQUIRED: 1 + PYTHON_VERSION: ${{ matrix.python-version }} TOX_PARALLEL_NO_SPINNER: 1 TOXENV: python + USE_DEADSNAKES: false steps: - uses: actions/checkout@master - - name: Set up Python ${{ matrix.python-version }} (deadsnakes) + - name: Set flag to use deadsnakes + if: >- + endsWith(env.PYTHON_VERSION, '-beta') || + endsWith(env.PYTHON_VERSION, '-dev') + run: | + from __future__ import print_function + python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '') + print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version)) + print('::set-env name=USE_DEADSNAKES::true') + shell: python + - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes) uses: deadsnakes/action@v1.0.0 - if: endsWith(matrix.python-version, '-dev') + if: fromJSON(env.USE_DEADSNAKES) && true || false with: - python-version: ${{ matrix.python-version }} - - name: Set up Python ${{ matrix.python-version }} + python-version: ${{ env.PYTHON_VERSION }} + - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v2 - if: "!endsWith(matrix.python-version, '-dev')" + if: >- + !fromJSON(env.USE_DEADSNAKES) && true || false with: - python-version: ${{ matrix.python-version }} + python-version: ${{ env.PYTHON_VERSION }} - name: Log Python version run: >- python --version @@ -88,9 +104,9 @@ jobs: run: >- python -m pip freeze --all - name: Adjust TOXENV for PyPy - if: startsWith(matrix.python-version, 'pypy') + if: startsWith(env.PYTHON_VERSION, 'pypy') run: >- - echo "::set-env name=TOXENV::${{ matrix.python-version }}" + echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}" - name: Log env vars run: >- env From e371422476f51a83d27d70dc45bbfba1544aad55 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jul 2020 21:36:33 -0400 Subject: [PATCH 8047/8469] Consolidate distutils importing hacks into _distutils_importer package. Generate distutils-precedence.pth inline. --- MANIFEST.in | 1 - _distutils_importer/__init__.py | 19 ++++++++++++++++--- _distutils_importer/install.py | 5 +++++ .../override.py | 18 ++---------------- conftest.py | 2 +- distutils_precedence.pth | 1 - setup.py | 8 ++------ setuptools/__init__.py | 3 +-- 8 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 _distutils_importer/install.py rename setuptools/distutils_patch.py => _distutils_importer/override.py (79%) delete mode 100644 distutils_precedence.pth diff --git a/MANIFEST.in b/MANIFEST.in index be83a7f336..128ae280ec 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,5 +13,4 @@ include launcher.c include msvc-build-launcher.cmd include pytest.ini include tox.ini -include distutils_precedence.pth exclude pyproject.toml # Temporary workaround for #1644. diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index 323ae2037c..ffa4caead5 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -1,4 +1,20 @@ +""" +Ensure that the local copy of distutils is preferred over stdlib. + +See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 +for more motivation. +""" + import sys +import os + + +def enabled(): + """ + Allow selection of distutils by environment variable. + """ + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') + return which == 'local' class DistutilsMetaFinder: @@ -34,6 +50,3 @@ def remove_shim(): sys.path.remove(DISTUTILS_FINDER) except ValueError: pass - - -add_shim() diff --git a/_distutils_importer/install.py b/_distutils_importer/install.py new file mode 100644 index 0000000000..73f13b2993 --- /dev/null +++ b/_distutils_importer/install.py @@ -0,0 +1,5 @@ +from . import enabled, add_shim + + +if enabled(): + add_shim() diff --git a/setuptools/distutils_patch.py b/_distutils_importer/override.py similarity index 79% rename from setuptools/distutils_patch.py rename to _distutils_importer/override.py index 33f1e7f961..917384852d 100644 --- a/setuptools/distutils_patch.py +++ b/_distutils_importer/override.py @@ -1,16 +1,10 @@ -""" -Ensure that the local copy of distutils is preferred over stdlib. - -See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 -for more motivation. -""" - import sys import re -import os import importlib import warnings +from . import enabled + is_pypy = '__pypy__' in sys.builtin_module_names @@ -37,14 +31,6 @@ def clear_distutils(): del sys.modules[name] -def enabled(): - """ - Allow selection of distutils by environment variable. - """ - which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') - return which == 'local' - - def ensure_local_distutils(): clear_distutils() distutils = importlib.import_module('setuptools._distutils') diff --git a/conftest.py b/conftest.py index 6013e1870f..868bf5bed2 100644 --- a/conftest.py +++ b/conftest.py @@ -15,7 +15,7 @@ def pytest_addoption(parser): 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', 'setuptools/_distutils', - 'setuptools/distutils_patch.py', + '_distutils_importer', ] diff --git a/distutils_precedence.pth b/distutils_precedence.pth deleted file mode 100644 index 2d9b996abc..0000000000 --- a/distutils_precedence.pth +++ /dev/null @@ -1 +0,0 @@ -import os; (os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib') == 'local' and __import__('_distutils_importer')) diff --git a/setup.py b/setup.py index cba37d3e59..a6e1abc455 100755 --- a/setup.py +++ b/setup.py @@ -94,12 +94,8 @@ class install_with_pth(install): def initialize_options(self): install.initialize_options(self) - - name = 'distutils_precedence' - with open(os.path.join(here, name + '.pth'), 'rt') as f: - contents = f.read() - - self.extra_path = (name, contents) + self.extra_path = ( + 'distutils-precedence', 'import _distutils_importer.install') def finalize_options(self): install.finalize_options(self) diff --git a/setuptools/__init__.py b/setuptools/__init__.py index d9740403d9..80b287b4b4 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -5,8 +5,7 @@ import os import re -# Disabled for now due to: #2228, #2230 -import setuptools.distutils_patch # noqa: F401 +import _distutils_importer.override # noqa: F401 import distutils.core from distutils.errors import DistutilsOptionError From 2986be4e55d6c8113344d5e184d40c6c3945a2bb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jul 2020 21:49:24 -0400 Subject: [PATCH 8048/8469] Fix AttributeError when `importlib.util` was not otherwise imported. --- _distutils_importer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index ffa4caead5..06674eb889 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -25,7 +25,7 @@ def find_spec(self, fullname, path, target=None): return self.get_distutils_spec() def get_distutils_spec(self): - import importlib + import importlib.util class DistutilsLoader(importlib.util.abc.Loader): From 1e53a2c14e7e0f788c9df2a542ac10f6b2f511d7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jul 2020 21:53:39 -0400 Subject: [PATCH 8049/8469] Move docstring closer to relevant context --- _distutils_importer/__init__.py | 7 ------- _distutils_importer/override.py | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index 06674eb889..3ad701002d 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -1,10 +1,3 @@ -""" -Ensure that the local copy of distutils is preferred over stdlib. - -See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 -for more motivation. -""" - import sys import os diff --git a/_distutils_importer/override.py b/_distutils_importer/override.py index 917384852d..523139bb6e 100644 --- a/_distutils_importer/override.py +++ b/_distutils_importer/override.py @@ -1,3 +1,10 @@ +""" +Ensure that the local copy of distutils is preferred over stdlib. + +See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 +for more motivation. +""" + import sys import re import importlib From dec637b12e1eee6f884405c56a4d01c505c00dfe Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 21 Jul 2020 15:05:28 +0200 Subject: [PATCH 8050/8469] Try out actions/setup-python@v2.1.1 --- .github/workflows/python-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index ed82aebb5a..93ec79d4ab 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -68,7 +68,7 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.1.1 if: >- !fromJSON(env.USE_DEADSNAKES) && true || false with: From a1686b39e311c38e1c32e0fdfe06597611300861 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jul 2020 21:08:34 -0400 Subject: [PATCH 8051/8469] Revert "Render logo in the readme." This reverts commit 4056435460b770c3ab7a8ea1637f05de690e7e01. --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index dc2bf98bde..9cbf7b86e1 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,3 @@ -.. image:: https://raw.githubusercontent.com/pypa/setuptools/master/docs/logo/banner%201%20line%20color.svg - - .. image:: https://img.shields.io/pypi/v/setuptools.svg :target: `PyPI link`_ @@ -27,7 +24,6 @@ .. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme - See the `Installation Instructions `_ in the Python Packaging User's Guide for instructions on installing, upgrading, and uninstalling From 2bf12c542af74c6e8b76ffd864c95c2efd94d372 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jul 2020 21:08:56 -0400 Subject: [PATCH 8052/8469] Revert "Rename logo assets to remove project name and 'logo', which are implied by the context." This reverts commit fd94cd038d644ff27866301f6f365a3ef0901898. --- .../{full color.svg => setup_tools_logo_colour.svg} | 0 ...000px.png => setup_tools_logo_colour_1000px.png} | Bin ...svg => setup_tools_logo_colour_banner_1line.svg} | 0 ...setup_tools_logo_colour_banner_1line_1000px.png} | Bin ...vg => setup_tools_logo_colour_banner_2lines.svg} | 0 ...etup_tools_logo_colour_banner_2lines_1000px.png} | Bin ...color.svg => setup_tools_logo_symbol_colour.svg} | 0 ...ng => setup_tools_logo_symbol_colour_1000px.png} | Bin .../{type.svg => setup_tools_logotype_1line.svg} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename docs/logo/{full color.svg => setup_tools_logo_colour.svg} (100%) rename docs/logo/{full color 1000px.png => setup_tools_logo_colour_1000px.png} (100%) rename docs/logo/{banner 1 line color.svg => setup_tools_logo_colour_banner_1line.svg} (100%) rename docs/logo/{banner 1 line color.png => setup_tools_logo_colour_banner_1line_1000px.png} (100%) rename docs/logo/{banner 2 lines color.svg => setup_tools_logo_colour_banner_2lines.svg} (100%) rename docs/logo/{banner 2 lines color.png => setup_tools_logo_colour_banner_2lines_1000px.png} (100%) rename docs/logo/{symbol color.svg => setup_tools_logo_symbol_colour.svg} (100%) rename docs/logo/{symbol color 1000px.png => setup_tools_logo_symbol_colour_1000px.png} (100%) rename docs/logo/{type.svg => setup_tools_logotype_1line.svg} (100%) diff --git a/docs/logo/full color.svg b/docs/logo/setup_tools_logo_colour.svg similarity index 100% rename from docs/logo/full color.svg rename to docs/logo/setup_tools_logo_colour.svg diff --git a/docs/logo/full color 1000px.png b/docs/logo/setup_tools_logo_colour_1000px.png similarity index 100% rename from docs/logo/full color 1000px.png rename to docs/logo/setup_tools_logo_colour_1000px.png diff --git a/docs/logo/banner 1 line color.svg b/docs/logo/setup_tools_logo_colour_banner_1line.svg similarity index 100% rename from docs/logo/banner 1 line color.svg rename to docs/logo/setup_tools_logo_colour_banner_1line.svg diff --git a/docs/logo/banner 1 line color.png b/docs/logo/setup_tools_logo_colour_banner_1line_1000px.png similarity index 100% rename from docs/logo/banner 1 line color.png rename to docs/logo/setup_tools_logo_colour_banner_1line_1000px.png diff --git a/docs/logo/banner 2 lines color.svg b/docs/logo/setup_tools_logo_colour_banner_2lines.svg similarity index 100% rename from docs/logo/banner 2 lines color.svg rename to docs/logo/setup_tools_logo_colour_banner_2lines.svg diff --git a/docs/logo/banner 2 lines color.png b/docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png similarity index 100% rename from docs/logo/banner 2 lines color.png rename to docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png diff --git a/docs/logo/symbol color.svg b/docs/logo/setup_tools_logo_symbol_colour.svg similarity index 100% rename from docs/logo/symbol color.svg rename to docs/logo/setup_tools_logo_symbol_colour.svg diff --git a/docs/logo/symbol color 1000px.png b/docs/logo/setup_tools_logo_symbol_colour_1000px.png similarity index 100% rename from docs/logo/symbol color 1000px.png rename to docs/logo/setup_tools_logo_symbol_colour_1000px.png diff --git a/docs/logo/type.svg b/docs/logo/setup_tools_logotype_1line.svg similarity index 100% rename from docs/logo/type.svg rename to docs/logo/setup_tools_logotype_1line.svg From 9dd762c61bdea4491f62c2b812b5cd5672821154 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 Jul 2020 21:11:16 -0400 Subject: [PATCH 8053/8469] Revert "Merge pull request #2229 from cajhne/logo001" This reverts commit 402880a7aed5dea1cf3a84af2b8291e451fb3d9f, reversing changes made to bd1102648109c85c782286787e4d5290ae280abe. --- docs/logo/README.md | 10 - docs/logo/josefinsans/.uuid | 1 - docs/logo/josefinsans/DESCRIPTION.en_us.html | 9 - docs/logo/josefinsans/JosefinSans-Bold.ttf | Bin 86300 -> 0 bytes .../josefinsans/JosefinSans-BoldItalic.ttf | Bin 83100 -> 0 bytes docs/logo/josefinsans/JosefinSans-Italic.ttf | Bin 84916 -> 0 bytes docs/logo/josefinsans/JosefinSans-Light.ttf | Bin 87320 -> 0 bytes .../josefinsans/JosefinSans-LightItalic.ttf | Bin 85684 -> 0 bytes docs/logo/josefinsans/JosefinSans-Regular.ttf | Bin 87260 -> 0 bytes .../logo/josefinsans/JosefinSans-SemiBold.ttf | Bin 87880 -> 0 bytes .../JosefinSans-SemiBoldItalic.ttf | Bin 84824 -> 0 bytes docs/logo/josefinsans/JosefinSans-Thin.ttf | Bin 88088 -> 0 bytes .../josefinsans/JosefinSans-ThinItalic.ttf | Bin 85420 -> 0 bytes docs/logo/josefinsans/METADATA.pb | 99 -------- docs/logo/josefinsans/OFL.txt | 93 ------- docs/logo/setup_tools_logo_colour.svg | 227 ------------------ docs/logo/setup_tools_logo_colour_1000px.png | Bin 31520 -> 0 bytes .../setup_tools_logo_colour_banner_1line.svg | 223 ----------------- ..._tools_logo_colour_banner_1line_1000px.png | Bin 24183 -> 0 bytes .../setup_tools_logo_colour_banner_2lines.svg | 224 ----------------- ...tools_logo_colour_banner_2lines_1000px.png | Bin 38105 -> 0 bytes docs/logo/setup_tools_logo_symbol_colour.svg | 203 ---------------- .../setup_tools_logo_symbol_colour_1000px.png | Bin 44239 -> 0 bytes docs/logo/setup_tools_logotype_1line.svg | 169 ------------- 24 files changed, 1258 deletions(-) delete mode 100644 docs/logo/README.md delete mode 100644 docs/logo/josefinsans/.uuid delete mode 100644 docs/logo/josefinsans/DESCRIPTION.en_us.html delete mode 100644 docs/logo/josefinsans/JosefinSans-Bold.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-BoldItalic.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-Italic.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-Light.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-LightItalic.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-Regular.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-SemiBold.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-SemiBoldItalic.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-Thin.ttf delete mode 100644 docs/logo/josefinsans/JosefinSans-ThinItalic.ttf delete mode 100644 docs/logo/josefinsans/METADATA.pb delete mode 100644 docs/logo/josefinsans/OFL.txt delete mode 100644 docs/logo/setup_tools_logo_colour.svg delete mode 100644 docs/logo/setup_tools_logo_colour_1000px.png delete mode 100644 docs/logo/setup_tools_logo_colour_banner_1line.svg delete mode 100644 docs/logo/setup_tools_logo_colour_banner_1line_1000px.png delete mode 100644 docs/logo/setup_tools_logo_colour_banner_2lines.svg delete mode 100644 docs/logo/setup_tools_logo_colour_banner_2lines_1000px.png delete mode 100644 docs/logo/setup_tools_logo_symbol_colour.svg delete mode 100644 docs/logo/setup_tools_logo_symbol_colour_1000px.png delete mode 100644 docs/logo/setup_tools_logotype_1line.svg diff --git a/docs/logo/README.md b/docs/logo/README.md deleted file mode 100644 index 74fadbf021..0000000000 --- a/docs/logo/README.md +++ /dev/null @@ -1,10 +0,0 @@ -![](setup_tools_logo_colour.svg) -### Design: - -Setuptools logo designed in 2020 by [C.Rogers](crogersmedia.com) for the Setuptools project using the Free Open Source graphics editor [Inkscape](inkscape.org). - -### Copyright: -Logo is (c) the Setuptools developers. - -### Font: -The font used is the Open Font "Josefin Sans", which is available for free under the Open Font License (OFL). diff --git a/docs/logo/josefinsans/.uuid b/docs/logo/josefinsans/.uuid deleted file mode 100644 index d7e92c770e..0000000000 --- a/docs/logo/josefinsans/.uuid +++ /dev/null @@ -1 +0,0 @@ -922c129c-9f4c-4831-b632-c7f43be6feb0 \ No newline at end of file diff --git a/docs/logo/josefinsans/DESCRIPTION.en_us.html b/docs/logo/josefinsans/DESCRIPTION.en_us.html deleted file mode 100644 index 9364b24940..0000000000 --- a/docs/logo/josefinsans/DESCRIPTION.en_us.html +++ /dev/null @@ -1,9 +0,0 @@ -

    }g6xF0(oRpEzalF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>}MEkw-%21CX*xJ)}G}fRwp5^xVQz{C$A<*8x%0>u9fK>QPF6ltGuoAKJcHblus#4r3Eeullm-+iBb z{ri6ZweT1652y2A@9DbW&#J5Yg1`S7ZE<0ygjK%_6UF~))L&|G!66XZ$uBqr-2Zjj zfSUY2J`{?Ef`>)h9gnkNt=zI<%h*uoJo%3Gvi%9`S^L8iUGkQ;sYX4YB7F0Xw|2NK z?=SqVMfO#GX`$z{Uom`oDEv;szw+3r$A)YF@|gM9%~oO&f4kG)v|Ysz-BF9*y7eu$ zcH3JeZ(SP^(t52udhAappr>84$%KX=g3d?)=o1`;TQ*b%AWlwPua^IJY^Ce ze?Lv_#ZU7T9HXA+5T3X26r5%}&tW{f{+y-_=ed{X2%h)y6kMT@=V+c8Jjd`n@h@qb zo99zJ$MSsURGP91=Hj`YZ;j^$9_{a?X?OEH!BYm?ah^e*2YDWXzWY^x;iK>2+=@jadL7(4y z#b1Zbp`VPADB?+6d4_+|PVRo+k#0QiPsT~)ucpF^-~N%s&+_Cfjr9Hxzk4$Nw)lss zmkZ@sGN!|sN4^W6LqL8q7E^(*12QhY4?GLJ27C+*reTtRg@9a?3CEd$=sSM?C)~1m4*&oF literal 0 HcmV?d00001 diff --git a/setuptools/gui.exe b/setuptools/gui.exe new file mode 100644 index 0000000000000000000000000000000000000000..f8d3509653ba8f80ca7f3aa7f95616142ba83a94 GIT binary patch literal 65536 zcmeFae|%KMxj%k3yGc&SCTD>S1PQP}R5YmQ5=~qJi^+zl1UE)DtPsG8blp-*!#RLg z0>QIub24npZS_`f-)#|`^OhvIcH|hGc(UT^E}VYJoC(K^_@EDjE;rth;Yer@_4k$X3I);E0Tn+-Zb>&yT9Ew!oxAMfl)C z#Z+d`C?Ev=lGJ)}%Ksnx|0)G)SVf_n2-;d?f9!~MzIJJ-=wKb=iHfW2QCpC29wSNm zA=ztsPZ<@3t`2ENV!bW?>DIbrM&c*bCbqaRzr~R~Z-r)Gl=RG-p}ugUHp=<&@N<(0nQZ)pc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q%b=VaC$ryH_z)OO!z2Uq0lAnGi8F(51;AS1Uf?O~U+ Date: Tue, 14 May 2013 00:13:46 +0300 Subject: [PATCH 1783/8469] Issue #376: preparing for release; CHANGES.tx t --HG-- branch : distribute extra : rebase_source : 0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 6053c70376..792f3e7ee3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.40 +------ + +* Issue #376: brought back cli.exe and gui.exe that were deleted in the previous release; + ------ 0.6.39 ------ From 788f2aa286e6efc430b2f581c6323a83275ac28f Mon Sep 17 00:00:00 2001 From: Guy Rozendorn Date: Tue, 14 May 2013 11:12:46 +0300 Subject: [PATCH 1784/8469] Added tag 0.6.40 for changeset 0a783fa0dceb --HG-- branch : distribute extra : rebase_source : a9c82cebb8e9cb93674a7ff1ea4c08508c4ed114 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b433c91f43..621bdedd5c 100644 --- a/.hgtags +++ b/.hgtags @@ -49,3 +49,4 @@ be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 2b26ec8909bff210f47c5f8fc620bc505e1610b5 0.6.37 f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 +0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 From 41a57f84efc8284964450615dca400bc17bbbb4e Mon Sep 17 00:00:00 2001 From: Guy Rozendorn Date: Tue, 14 May 2013 11:15:38 +0300 Subject: [PATCH 1785/8469] Bumped to 0.6.41 in preparation for next release. --HG-- branch : distribute extra : rebase_source : 235fe544e2119364d2f4270a6c5ca20db4645324 --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index 610c52ce33..cacf74e195 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.40.tar.gz - $ tar -xzvf distribute-0.6.40.tar.gz - $ cd distribute-0.6.40 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.41.tar.gz + $ tar -xzvf distribute-0.6.41.tar.gz + $ cd distribute-0.6.41 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index c098b9d269..7a2d2a2b2a 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.40" +DEFAULT_VERSION = "0.6.41" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index ac332deb98..b645cce759 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.40' +version = '0.6.41' # The full version, including alpha/beta/rc tags. -release = '0.6.40' +release = '0.6.41' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index 2dc51ae822..8a3af24fd3 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.40' +VERSION = '0.6.41' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 9d15793cfd..314960896e 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.40" +VERSION = "0.6.41" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From b867ca5a7faf5a60f7966837f393f667b51e2cee Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 02:20:54 -0400 Subject: [PATCH 1786/8469] Capture the need to update cli.exe and gui.exe --HG-- branch : distribute extra : rebase_source : da0bcff89ef2ab6d49419e10b503e4987c875a3f --- msvc-build-launcher.cmd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 07c474d4dd..e54c4f6c33 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -19,6 +19,12 @@ if "%ERRORLEVEL%"=="0" ( echo Windows SDK 6.1 not found to build Windows 32-bit version ) +REM buildout (and possibly other implementations) currently depend on +REM the 32-bit launcher scripts without the -32 in the filename, so copy them +REM there for now. +copy setuptools/cli-32.exe setuptools/cli.exe +copy setuptools/gui-32.exe setuptools/gui.exe + REM now for 64-bit REM Use the x86_amd64 profile, which is the 32-bit cross compiler for amd64 call VCVARSx86_amd64 From b5d83f95a99b5e52d36fac68735e84ee73d364fd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 02:44:52 -0400 Subject: [PATCH 1787/8469] Edit changelog. --HG-- branch : distribute extra : rebase_source : bf835a86ab7c996cd47bb196619a09b85fa01db9 --- CHANGES.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 792f3e7ee3..2e0b747ceb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,8 +6,9 @@ CHANGES 0.6.40 ------ -* Issue #376: brought back cli.exe and gui.exe that were deleted in the previous release; - +* Issue #376: brought back cli.exe and gui.exe that were deleted in the + previous release. + ------ 0.6.39 ------ From 289b359721b9a717984c5200d7d5adbfccc8da20 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 02:47:41 -0400 Subject: [PATCH 1788/8469] Extract get_win_launcher function --HG-- branch : distribute extra : rebase_source : 14dbef22dbc8376cc3632ce53be0d61b7976b889 --- CHANGES.txt | 7 +++++++ setuptools/command/easy_install.py | 31 +++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2e0b747ceb..864edfba88 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +------ +0.6.41 +------ + +* Added a new function ``easy_install.get_win_launcher`` which may be used by + third-party libraries such as buildout to get a suitable script launcher. + ------ 0.6.40 ------ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 10a8f27201..df6107d77d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1833,26 +1833,22 @@ def get_script_args(dist, executable=sys_executable, wininst=False): if sys.platform=='win32' or wininst: # On Windows/wininst, add a .py extension and an .exe launcher if group=='gui_scripts': - ext, launcher = '-script.pyw', 'gui.exe' + launcher_type = 'gui' + ext = '-script.pyw' old = ['.pyw'] new_header = re.sub('(?i)python.exe','pythonw.exe',header) else: - ext, launcher = '-script.py', 'cli.exe' + launcher_type = 'cli' + ext = '-script.py' old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) - if platform.machine().lower()=='arm': - launcher = launcher.replace(".", "-arm.") - if is_64bit(): - launcher = launcher.replace(".", "-64.") - else: - launcher = launcher.replace(".", "-32.") if os.path.exists(new_header[2:-1]) or sys.platform!='win32': hdr = new_header else: hdr = header yield (name+ext, hdr+script_text, 't', [name+x for x in old]) yield ( - name+'.exe', resource_string('setuptools', launcher), + name+'.exe', get_win_launcher(launcher_type), 'b' # write in binary mode ) if not is_64bit(): @@ -1868,6 +1864,23 @@ def get_script_args(dist, executable=sys_executable, wininst=False): # just write the stub with no extension. yield (name, header+script_text) +def get_win_launcher(type): + """ + Load the Windows launcher (executable) suitable for launching a script. + + `type` should be either 'cli' or 'gui' + + Returns the executable as a byte string. + """ + launcher_fn = '%s.exe' % type + if platform.machine().lower()=='arm': + launcher_fn = launcher_fn.replace(".", "-arm.") + if is_64bit(): + launcher_fn = launcher_fn.replace(".", "-64.") + else: + launcher_fn = launcher_fn.replace(".", "-32.") + return resource_string('setuptools', launcher_fn) + def load_launcher_manifest(name): manifest = pkg_resources.resource_string(__name__, 'launcher manifest.xml') if sys.version_info[0] < 3: From 0b0d47d267599d19e5ac5ce442c7f9c92bd1177d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 22:52:40 -0400 Subject: [PATCH 1789/8469] Delint release script --HG-- branch : distribute --- release.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release.py b/release.py index 8a3af24fd3..ad4070a143 100644 --- a/release.py +++ b/release.py @@ -69,7 +69,7 @@ def add_milestone_and_version(version=NEXT_VERSION): auth = 'Basic ' + ':'.join(get_mercurial_creds()).encode('base64').strip() headers = { 'Authorization': auth, - } + } base = 'https://api.bitbucket.org' for type in 'milestones', 'versions': url = (base + '/1.0/repositories/{repo}/issues/{type}' @@ -159,14 +159,14 @@ def build_docs(): return if os.path.isdir('docs/build'): shutil.rmtree('docs/build') - subprocess.check_call([ + cmd = [ 'sphinx-build', '-b', 'html', '-d', 'build/doctrees', '.', 'build/html', - ], - cwd='docs') + ] + subprocess.check_call(cmd, cwd='docs') return True def upload_bootstrap_script(): From c0a6a1347041a816d51331285a183fd8b8f69182 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 May 2013 22:54:11 -0400 Subject: [PATCH 1790/8469] Update reference to Travis CI using setuptools mirror --HG-- branch : distribute --- release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.py b/release.py index ad4070a143..e46cd31752 100644 --- a/release.py +++ b/release.py @@ -103,7 +103,7 @@ def do_release(): print("Please do that") raise SystemExit(1) - print("Travis-CI tests: http://travis-ci.org/#!/jaraco/distribute") + print("Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools") res = raw_input('Have you or has someone verified that the tests ' 'pass on this revision? ') if not res.lower().startswith('y'): From 1f43ab9b03178a3eb3a00f509338dc1bd40808a1 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 2 Feb 2013 18:26:56 -0600 Subject: [PATCH 1791/8469] This changes distribute to use zipfile for obtaining a manifest of zip files instead of zipimpot._zip_directory_cache. As I don't see any place that the cache is being clear, should in effect remove the zipimport private variable dependency --HG-- branch : distribute extra : rebase_source : 275dd3d5a2f55dba541f7f12a1bf8ee7c3465825 --- pkg_resources.py | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index f8de449e87..e1bf9ee0bc 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,8 @@ method. """ -import sys, os, zipimport, time, re, imp, types +import sys, os, zipimport, time, re, imp, types +import zipfile from urlparse import urlparse, urlunparse try: @@ -1348,7 +1349,33 @@ def __init__(self): empty_provider = EmptyProvider() - +def build_zipmanifest(path): + """ + This builds a similar dictionary to the zipimport directory + caches. However instead of tuples, ZipInfo objects are stored. + + The translation of the tuple is as follows: + * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep + on pypy it is the same (one reason why distribute did work + in some cases on pypy and win32). + * [1] - zipinfo.compress_type + * [2] - zipinfo.compress_size + * [3] - zipinfo.file_size + * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 + len(ascii encoding of filename) otherwise + * [5] - (zipinfo.date_time[0] - 1980) << 9 | + zipinfo.date_time[1] << 5 | zipinfo.date_time[2] + * [6] - (zipinfo.date_time[3] - 1980) << 11 | + zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) + * [7] - zipinfo.CRC + """ + zipinfo = dict() + with zipfile.ZipFile(path) as zfile: + for zitem in zfile.namelist(): + zpath = zitem.replace('/', os.sep) + zipinfo[zpath] = zfile.getinfo(zitem) + assert zipinfo[zpath] is not None + return zipinfo class ZipProvider(EggProvider): @@ -1358,7 +1385,7 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self,module) - self.zipinfo = zipimport._zip_directory_cache[self.loader.archive] + self.zipinfo = build_zipmanifest(self.load.archive) self.zip_pre = self.loader.archive+os.sep def _zipinfo_name(self, fspath): @@ -1393,12 +1420,10 @@ def get_resource_filename(self, manager, resource_name): return self._extract_resource(manager, zip_path) @staticmethod - def _get_date_and_size(zip_stat): - t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] - date_time = ( - (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd - (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. - ) + def _get_date_and_size(zip_stat): + size = zip_stat.file_size + date_time = zip_stat.date_time + (0, 0, -1) #ymdhms+wday, yday, dst + #1980 offset already done timestamp = time.mktime(date_time) return timestamp, size @@ -1411,7 +1436,7 @@ def _extract_resource(self, manager, zip_path): ) return os.path.dirname(last) # return the extracted directory name - timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) + timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) if not WRITE_SUPPORT: raise IOError('"os.rename" and "os.unlink" are not supported ' @@ -1610,7 +1635,7 @@ class EggMetadata(ZipProvider): def __init__(self, importer): """Create a metadata provider from a zipimporter""" - self.zipinfo = zipimport._zip_directory_cache[importer.archive] + self.zipinfo = build_zipmanifest(importer.archive) self.zip_pre = importer.archive+os.sep self.loader = importer if importer.prefix: @@ -2841,3 +2866,4 @@ def _initialize(g): add_activation_listener(lambda dist: dist.activate()) working_set.entries=[]; map(working_set.add_entry,sys.path) # match order + From 4350a091eecb5af1dd461442c311d981550bedb5 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Mon, 4 Feb 2013 23:43:35 -0600 Subject: [PATCH 1792/8469] A few non-python 3 print statements --HG-- branch : distribute extra : rebase_source : 75f0b0e993a44ccfef8292717af58943e187d4cd --- setuptools/tests/win_script_wrapper.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 9ccc96f07a..82719273b4 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -21,11 +21,11 @@ Let's create a simple script, foo-script.py: ... """#!%(python_exe)s ... import sys ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input + ... print(sys.argv[0][-14:]) + ... print(sys.argv[1:]) + ... print(input) ... if __debug__: - ... print 'non-optimized' + ... print('non-optimized') ... """ % dict(python_exe=nt_quote_arg(sys.executable))) >>> f.close() @@ -54,7 +54,7 @@ the wrapper: ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') >>> input.write('hello\nworld\n') >>> input.close() - >>> print output.read(), + >>> print(output.read(),) \foo-script.py ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] 'hello\nworld\n' @@ -86,18 +86,18 @@ enter the interpreter after running the script, you could use -Oi: ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) - ... print sys.argv[0][-14:] - ... print sys.argv[1:] - ... print input + ... print(sys.argv[0][-14:]) + ... print(sys.argv[1:]) + ... print(input) ... if __debug__: - ... print 'non-optimized' + ... print('non-optimized') ... sys.ps1 = '---' ... """ % dict(python_exe=nt_quote_arg(sys.executable))) >>> f.close() >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) >>> input.close() - >>> print output.read(), + >>> print(output.read(),) \foo-script.py [] '' @@ -136,10 +136,10 @@ Finally, we'll run the script and check the result: >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')) ... + r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) >>> input.close() - >>> print output.read() + >>> print(output.read()) >>> f = open(os.path.join(sample_directory, 'test_output.txt'), 'rb') - >>> print f.read() + >>> print(f.read()) 'Test Argument' >>> f.close() From 0c10ea7a063c2d3f3c3c539c1d601fd8d95429dd Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Tue, 5 Feb 2013 09:55:53 -0600 Subject: [PATCH 1793/8469] minor cleanups --HG-- branch : distribute extra : rebase_source : a872a0ee0700a60994fea3417193998d9e9456a3 --- pkg_resources.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index e1bf9ee0bc..144323cb67 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1349,6 +1349,7 @@ def __init__(self): empty_provider = EmptyProvider() + def build_zipmanifest(path): """ This builds a similar dictionary to the zipimport directory @@ -1363,9 +1364,9 @@ def build_zipmanifest(path): * [3] - zipinfo.file_size * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 len(ascii encoding of filename) otherwise - * [5] - (zipinfo.date_time[0] - 1980) << 9 | + * [5] - (zipinfo.date_time[0] - 1980) << 9 | zipinfo.date_time[1] << 5 | zipinfo.date_time[2] - * [6] - (zipinfo.date_time[3] - 1980) << 11 | + * [6] - (zipinfo.date_time[3] - 1980) << 11 | zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) * [7] - zipinfo.CRC """ @@ -1422,7 +1423,7 @@ def get_resource_filename(self, manager, resource_name): @staticmethod def _get_date_and_size(zip_stat): size = zip_stat.file_size - date_time = zip_stat.date_time + (0, 0, -1) #ymdhms+wday, yday, dst + date_time = zip_stat.date_time + (0, 0, -1) # ymdhms+wday, yday, dst #1980 offset already done timestamp = time.mktime(date_time) return timestamp, size From 4e2823bc3f2f5505ee15fc72ebcc287e5061199d Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 10:46:33 -0600 Subject: [PATCH 1794/8469] Seems to be an issue with using ZipFile as a context on python 3.1 --HG-- branch : distribute extra : rebase_source : d81c62a1c2efbeefc848979e07b16506213c0949 --- pkg_resources.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg_resources.py b/pkg_resources.py index 144323cb67..c29afb5631 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1371,11 +1371,15 @@ def build_zipmanifest(path): * [7] - zipinfo.CRC """ zipinfo = dict() - with zipfile.ZipFile(path) as zfile: + zfile = zipfile.ZipFile(path) + #Got ZipFile has not __exit__ on python 3.1 + try: for zitem in zfile.namelist(): zpath = zitem.replace('/', os.sep) zipinfo[zpath] = zfile.getinfo(zitem) assert zipinfo[zpath] is not None + finally: + zfile.close() return zipinfo From 6f6de308e3ade9a262308297f0a96af261c9dde5 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 11:34:11 -0600 Subject: [PATCH 1795/8469] Backout the pkg_resources.py fix --HG-- branch : distribute extra : rebase_source : d144d2afc763c9ed6420d32bad3015075d265226 --- pkg_resources.py | 51 +++++-------------------- setuptools/tests/win_script_wrapper.txt | 6 ++- 2 files changed, 14 insertions(+), 43 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index c29afb5631..fbae7b57b7 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,8 +13,7 @@ method. """ -import sys, os, zipimport, time, re, imp, types -import zipfile +import sys, os, zipimport, time, re, imp, types from urlparse import urlparse, urlunparse try: @@ -1350,37 +1349,6 @@ def __init__(self): empty_provider = EmptyProvider() -def build_zipmanifest(path): - """ - This builds a similar dictionary to the zipimport directory - caches. However instead of tuples, ZipInfo objects are stored. - - The translation of the tuple is as follows: - * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep - on pypy it is the same (one reason why distribute did work - in some cases on pypy and win32). - * [1] - zipinfo.compress_type - * [2] - zipinfo.compress_size - * [3] - zipinfo.file_size - * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 - len(ascii encoding of filename) otherwise - * [5] - (zipinfo.date_time[0] - 1980) << 9 | - zipinfo.date_time[1] << 5 | zipinfo.date_time[2] - * [6] - (zipinfo.date_time[3] - 1980) << 11 | - zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) - * [7] - zipinfo.CRC - """ - zipinfo = dict() - zfile = zipfile.ZipFile(path) - #Got ZipFile has not __exit__ on python 3.1 - try: - for zitem in zfile.namelist(): - zpath = zitem.replace('/', os.sep) - zipinfo[zpath] = zfile.getinfo(zitem) - assert zipinfo[zpath] is not None - finally: - zfile.close() - return zipinfo class ZipProvider(EggProvider): @@ -1390,7 +1358,7 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self,module) - self.zipinfo = build_zipmanifest(self.load.archive) + self.zipinfo = zipimport._zip_directory_cache[self.loader.archive] self.zip_pre = self.loader.archive+os.sep def _zipinfo_name(self, fspath): @@ -1425,10 +1393,12 @@ def get_resource_filename(self, manager, resource_name): return self._extract_resource(manager, zip_path) @staticmethod - def _get_date_and_size(zip_stat): - size = zip_stat.file_size - date_time = zip_stat.date_time + (0, 0, -1) # ymdhms+wday, yday, dst - #1980 offset already done + def _get_date_and_size(zip_stat): + t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] + date_time = ( + (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd + (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. + ) timestamp = time.mktime(date_time) return timestamp, size @@ -1441,7 +1411,7 @@ def _extract_resource(self, manager, zip_path): ) return os.path.dirname(last) # return the extracted directory name - timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) + timestamp, size = self._get_date_and_size(self.zipinfo[zip_path]) if not WRITE_SUPPORT: raise IOError('"os.rename" and "os.unlink" are not supported ' @@ -1640,7 +1610,7 @@ class EggMetadata(ZipProvider): def __init__(self, importer): """Create a metadata provider from a zipimporter""" - self.zipinfo = build_zipmanifest(importer.archive) + self.zipinfo = zipimport._zip_directory_cache[importer.archive] self.zip_pre = importer.archive+os.sep self.loader = importer if importer.prefix: @@ -2871,4 +2841,3 @@ def _initialize(g): add_activation_listener(lambda dist: dist.activate()) working_set.entries=[]; map(working_set.add_entry,sys.path) # match order - diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 82719273b4..3dc725c849 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -54,11 +54,12 @@ the wrapper: ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') >>> input.write('hello\nworld\n') >>> input.close() - >>> print(output.read(),) + >>> print(output.read()) \foo-script.py ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] 'hello\nworld\n' non-optimized + This example was a little pathological in that it exercised windows (MS C runtime) quoting rules: @@ -97,11 +98,12 @@ enter the interpreter after running the script, you could use -Oi: >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) >>> input.close() - >>> print(output.read(),) + >>> print(output.read()) \foo-script.py [] '' --- + Testing the GUI Version ----------------------- From e183ab7e708f7875f15f0a4651aaa85b6693882f Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 11:35:08 -0600 Subject: [PATCH 1796/8469] Reapply with unix file endings, to make a better diff --HG-- branch : distribute extra : rebase_source : 8fdc661ab1dd38af6d692df15ff65392860a60d1 --- pkg_resources.py | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index fbae7b57b7..878c4ea117 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,7 @@ method. """ -import sys, os, zipimport, time, re, imp, types +import sys, os, time, re, imp, types, zipfile, zipimport from urlparse import urlparse, urlunparse try: @@ -1349,6 +1349,37 @@ def __init__(self): empty_provider = EmptyProvider() +def build_zipmanifest(path): + """ + This builds a similar dictionary to the zipimport directory + caches. However instead of tuples, ZipInfo objects are stored. + + The translation of the tuple is as follows: + * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep + on pypy it is the same (one reason why distribute did work + in some cases on pypy and win32). + * [1] - zipinfo.compress_type + * [2] - zipinfo.compress_size + * [3] - zipinfo.file_size + * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 + len(ascii encoding of filename) otherwise + * [5] - (zipinfo.date_time[0] - 1980) << 9 | + zipinfo.date_time[1] << 5 | zipinfo.date_time[2] + * [6] - (zipinfo.date_time[3] - 1980) << 11 | + zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) + * [7] - zipinfo.CRC + """ + zipinfo = dict() + zfile = zipfile.ZipFile(path) + #Got ZipFile has not __exit__ on python 3.1 + try: + for zitem in zfile.namelist(): + zpath = zitem.replace('/', os.sep) + zipinfo[zpath] = zfile.getinfo(zitem) + assert zipinfo[zpath] is not None + finally: + zfile.close() + return zipinfo class ZipProvider(EggProvider): @@ -1358,7 +1389,7 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self,module) - self.zipinfo = zipimport._zip_directory_cache[self.loader.archive] + self.zipinfo = build_zipmanifest(self.load.archive) self.zip_pre = self.loader.archive+os.sep def _zipinfo_name(self, fspath): @@ -1394,11 +1425,9 @@ def get_resource_filename(self, manager, resource_name): @staticmethod def _get_date_and_size(zip_stat): - t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] - date_time = ( - (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd - (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. - ) + size = zip_stat.file_size + date_time = zip_stat.date_time + (0, 0, -1) # ymdhms+wday, yday, dst + #1980 offset already done timestamp = time.mktime(date_time) return timestamp, size @@ -1610,7 +1639,7 @@ class EggMetadata(ZipProvider): def __init__(self, importer): """Create a metadata provider from a zipimporter""" - self.zipinfo = zipimport._zip_directory_cache[importer.archive] + self.zipinfo = build_zipmanifest(importer.archive) self.zip_pre = importer.archive+os.sep self.loader = importer if importer.prefix: @@ -2841,3 +2870,4 @@ def _initialize(g): add_activation_listener(lambda dist: dist.activate()) working_set.entries=[]; map(working_set.add_entry,sys.path) # match order + From 4bb7aab67a2ba4c890732d053a64737486b31b60 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 15:02:50 -0600 Subject: [PATCH 1797/8469] There were some failing tests on windows. I assume this is a NTFS vs FAT or NT versus 9x things... Seemed odd. In any case. My filesystem is deifnitely NOT cp1252. --HG-- branch : distribute extra : rebase_source : c4d64aff6b811ba36bbf33cd4cf2a12f563a6880 --- setuptools/tests/test_sdist.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index a9d5d6e56c..7e6c837c6b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -337,10 +337,16 @@ def test_sdist_with_utf8_encoded_filename(self): filename = decompose(filename) if sys.version_info >= (3,): - if sys.platform == 'win32': - # Python 3 mangles the UTF-8 filename - filename = filename.decode('cp1252') - self.assertTrue(filename in cmd.filelist.files) + fs_enc = sys.getfilesystemencoding() + + if sys.platform == 'win32': + if fs_enc == 'cp1252': + # Python 3 mangles the UTF-8 filename + filename = filename.decode('cp1252') + self.assertTrue(filename in cmd.filelist.files) + else: + filename = filename.decode('mbcs') + self.assertTrue(filename in cmd.filelist.files) else: filename = filename.decode('utf-8') self.assertTrue(filename in cmd.filelist.files) @@ -357,6 +363,7 @@ def test_sdist_with_latin1_encoded_filename(self): # Latin-1 filename filename = os.path.join(b('sdist_test'), LATIN1_FILENAME) open(filename, 'w').close() + self.assertTrue(os.path.isfile(filename)) quiet() try: @@ -365,16 +372,27 @@ def test_sdist_with_latin1_encoded_filename(self): unquiet() if sys.version_info >= (3,): - filename = filename.decode('latin-1') + fs_enc = sys.getfilesystemencoding() + + + #not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': - # Latin-1 is similar to Windows-1252 + # Latin-1 is similar to Windows-1252 however + # on mbcs filesys it is not in latin-1 encoding + if fs_enc == 'mbcs': + filename = filename.decode('mbcs') + else: + filename = filename.decode('latin-1') + self.assertTrue(filename in cmd.filelist.files) else: # The Latin-1 filename should have been skipped + filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) else: # No conversion takes place under Python 2 and the file # is included. We shall keep it that way for BBB. + filename = filename.decode('latin-1') self.assertTrue(filename in cmd.filelist.files) From 968ff8401b82ad8454191f564c903b137a8e8714 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 15:04:00 -0600 Subject: [PATCH 1798/8469] old win wrapper script not expecting return values from write() python 3 no longer has popen4 had some issue with ^M on end on line. --HG-- branch : distribute extra : rebase_source : 5b2c834e9a8dfd4027791cacef7c2bfe03652f31 --- setuptools/tests/win_script_wrapper.txt | 61 +++++++++++++++++-------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 3dc725c849..db1daf6bcc 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -17,7 +17,7 @@ Let's create a simple script, foo-script.py: >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') - >>> f.write( + >>> bytes_written = f.write( ... """#!%(python_exe)s ... import sys ... input = repr(sys.stdin.read()) @@ -37,7 +37,7 @@ We'll also copy cli.exe to the sample-directory with the name foo.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb') - >>> f.write( + >>> bytes_written = f.write( ... pkg_resources.resource_string('setuptools', 'cli-32.exe') ... ) >>> f.close() @@ -49,12 +49,32 @@ GUI programs, the suffix '-script-pyw' is added.) This is why we named out script the way we did. Now we can run out script by running the wrapper: - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'foo.exe')) - ... + r' arg1 "arg 2" "arg \"2\\\"" "arg 4\\" "arg5 a\\b"') - >>> input.write('hello\nworld\n') + >>> from subprocess import Popen, PIPE, STDOUT + >>> try: + ... unicode=unicode + ... except: + ... unicode=str + >>> def popen4(cmd, *args): + ... if hasattr(os, 'popen4'): + ... input, output = os.popen4(cmd + " ".join(args)) + ... return input, output + ... else: + ... #emulate popen4 in python 3 + ... if cmd[0] == '"' and cmd[-1] != '"': + ... cmd = cmd[1:] + ... cmd += " ".join(args) + ... p = Popen(cmd, shell=True, bufsize=0, + ... stdin=PIPE, stdout=PIPE, stderr=STDOUT) + ... return p.stdin, p.stdout + + >>> input, output = popen4('"' + nt_quote_arg(os.path.join(sample_directory, 'foo.exe')), + ... r' arg1', r'"arg 2"', r'"arg \"2\\\""', r'"arg 4\\"', r'"arg5 a\\b"') + >>> bytes_written = input.write('hello\nworld\n'.encode('utf-8')) >>> input.close() - >>> print(output.read()) + >>> # This is needed for line ending differences between py2 and py3 on win32 + >>> msg = unicode(output.read(), encoding='utf-8').split("\n") + >>> for line in msg: + ... print(line.strip()) \foo-script.py ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b'] 'hello\nworld\n' @@ -83,7 +103,7 @@ options as usual. For example, to run in optimized mode and enter the interpreter after running the script, you could use -Oi: >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') - >>> f.write( + >>> bytes_written = f.write( ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) @@ -96,9 +116,12 @@ enter the interpreter after running the script, you could use -Oi: ... """ % dict(python_exe=nt_quote_arg(sys.executable))) >>> f.close() - >>> input, output = os.popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) + >>> input, output = popen4(nt_quote_arg(os.path.join(sample_directory, 'foo.exe'))) >>> input.close() - >>> print(output.read()) + >>> # This is needed for line ending differences between py2 and py3 on win32 + >>> msg = unicode(output.read(), encoding='utf-8').split("\n") + >>> for line in msg: + ... print(line.strip()) \foo-script.py [] '' @@ -114,11 +137,11 @@ Now let's test the GUI version with the simple scipt, bar-script.py: >>> from setuptools.command.easy_install import nt_quote_arg >>> sample_directory = tempfile.mkdtemp() >>> f = open(os.path.join(sample_directory, 'bar-script.pyw'), 'w') - >>> f.write( + >>> bytes_written = f.write( ... """#!%(python_exe)s ... import sys ... f = open(sys.argv[1], 'wb') - ... f.write(repr(sys.argv[2])) + ... bytes_written = f.write(repr(sys.argv[2]).encode('utf-8')) ... f.close() ... """ % dict(python_exe=nt_quote_arg(sys.executable))) >>> f.close() @@ -127,21 +150,23 @@ We'll also copy gui.exe to the sample-directory with the name bar.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb') - >>> f.write( + >>> bytes_written = f.write( ... pkg_resources.resource_string('setuptools', 'gui-32.exe') ... ) >>> f.close() Finally, we'll run the script and check the result: - >>> import os - >>> input, output = os.popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')) - ... + r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) + >>> input, output = popen4('"'+nt_quote_arg(os.path.join(sample_directory, 'bar.exe')), + ... r' "%s" "Test Argument"' % os.path.join(sample_directory, 'test_output.txt')) >>> input.close() - >>> print(output.read()) + >>> # This is needed for line ending differences between py2 and py3 on win32 + >>> msg = unicode(output.read(), encoding='utf-8').split("\n") + >>> for line in msg: + ... print(line.strip()) >>> f = open(os.path.join(sample_directory, 'test_output.txt'), 'rb') - >>> print(f.read()) + >>> print(unicode(f.read(), encoding='utf-8')) 'Test Argument' >>> f.close() From e9685aa408ac3d118890bd9944bd26260e519908 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 16 Feb 2013 15:22:46 -0600 Subject: [PATCH 1799/8469] don't decode in python 2.x. that's my oops --HG-- branch : distribute extra : rebase_source : 4b981d54c6a171d7a6500c6c62838d8c368ae0b1 --- setuptools/tests/test_sdist.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 7e6c837c6b..f51d45678f 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -372,13 +372,11 @@ def test_sdist_with_latin1_encoded_filename(self): unquiet() if sys.version_info >= (3,): - fs_enc = sys.getfilesystemencoding() - - #not all windows systems have a default FS encoding of cp1252 if sys.platform == 'win32': # Latin-1 is similar to Windows-1252 however # on mbcs filesys it is not in latin-1 encoding + fs_enc = sys.getfilesystemencoding() if fs_enc == 'mbcs': filename = filename.decode('mbcs') else: @@ -392,7 +390,6 @@ def test_sdist_with_latin1_encoded_filename(self): else: # No conversion takes place under Python 2 and the file # is included. We shall keep it that way for BBB. - filename = filename.decode('latin-1') self.assertTrue(filename in cmd.filelist.files) From c7444dbad6e996c53b3f73f0dba71b3b3a33f8bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 09:18:49 -0400 Subject: [PATCH 1800/8469] Correct reference to self.loader. --HG-- branch : distribute --- pkg_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg_resources.py b/pkg_resources.py index 878c4ea117..74acecd52f 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1348,7 +1348,7 @@ def __init__(self): empty_provider = EmptyProvider() - + def build_zipmanifest(path): """ This builds a similar dictionary to the zipimport directory @@ -1389,7 +1389,7 @@ class ZipProvider(EggProvider): def __init__(self, module): EggProvider.__init__(self,module) - self.zipinfo = build_zipmanifest(self.load.archive) + self.zipinfo = build_zipmanifest(self.loader.archive) self.zip_pre = self.loader.archive+os.sep def _zipinfo_name(self, fspath): From e8a18a275aa500ae0b85eccb51ca4d154bfbe8dd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 09:29:07 -0400 Subject: [PATCH 1801/8469] Update changelog and contributors --HG-- branch : distribute --- CHANGES.txt | 2 ++ CONTRIBUTORS.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 864edfba88..a0c2c3cddb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.41 ------ +* Issue #27: Use public api for loading resources from zip files rather than + the private method `_zip_directory_cache`. * Added a new function ``easy_install.get_win_launcher`` which may be used by third-party libraries such as buildout to get a suitable script launcher. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 487e0a44d7..e5e0ed511b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -21,6 +21,7 @@ Contributors * Noufal Ibrahim * Pete Hollobon * Philip Jenvey +* Philip Thiem * Reinout van Rees * Robert Myers * Stefan H. Holek From 565a2093c5d608218c90852488e37dfeeaa9641b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 09:58:04 -0400 Subject: [PATCH 1802/8469] Added tag 0.6.41 for changeset ad107e9b4bee --HG-- branch : distribute --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 621bdedd5c..78cdfc1411 100644 --- a/.hgtags +++ b/.hgtags @@ -50,3 +50,4 @@ be6f65eea9c10ce78b6698d8c220b6e5de577292 0.6.37 f0d502a83f6c83ba38ad21c15a849c2daf389ec7 0.6.38 d737b2039c5f92af8000f78bbc80b6a5183caa97 0.6.39 0a783fa0dceb95b5fc743e47c2d89c1523d0afb7 0.6.40 +ad107e9b4beea24516ac4e1e854696e586fe279d 0.6.41 From cf2a28328628a15a95ec354f8c3a4421d3652e31 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 09:59:08 -0400 Subject: [PATCH 1803/8469] Bumped to 0.6.42 in preparation for next release. --HG-- branch : distribute --- README.txt | 6 +++--- distribute_setup.py | 2 +- docs/conf.py | 4 ++-- release.py | 2 +- setup.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.txt b/README.txt index cacf74e195..9ab453564e 100755 --- a/README.txt +++ b/README.txt @@ -99,9 +99,9 @@ Source installation Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.41.tar.gz - $ tar -xzvf distribute-0.6.41.tar.gz - $ cd distribute-0.6.41 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.42.tar.gz + $ tar -xzvf distribute-0.6.42.tar.gz + $ cd distribute-0.6.42 $ python setup.py install --------------------------- diff --git a/distribute_setup.py b/distribute_setup.py index 7a2d2a2b2a..53345bbd80 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -49,7 +49,7 @@ def quote(arg): args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.41" +DEFAULT_VERSION = "0.6.42" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff --git a/docs/conf.py b/docs/conf.py index b645cce759..bd9028b685 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '0.6.41' +version = '0.6.42' # The full version, including alpha/beta/rc tags. -release = '0.6.41' +release = '0.6.42' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/release.py b/release.py index e46cd31752..b657d990eb 100644 --- a/release.py +++ b/release.py @@ -22,7 +22,7 @@ except Exception: pass -VERSION = '0.6.41' +VERSION = '0.6.42' PACKAGE_INDEX = 'https://pypi.python.org/pypi' PACKAGE_INDEX = 'https://pypi.python.org/pypi' diff --git a/setup.py b/setup.py index 314960896e..8f350c4ea2 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ init_file.close() SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.41" +VERSION = "0.6.42" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py From e3207bd63bcf365a1f91b7c3e75a4b3354435501 Mon Sep 17 00:00:00 2001 From: Dirley Rodrigues Date: Mon, 4 Feb 2013 11:30:58 -0200 Subject: [PATCH 1804/8469] Improve external links finder to not yield duplicate links. --HG-- branch : distribute extra : rebase_source : 78e932fca32ee0ee1f50794cf998f4e7db78131b --- CHANGES.txt | 7 +++++++ setuptools/package_index.py | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a0c2c3cddb..dadd0c7777 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +------ +0.6.42 +------ + +* External links finder no longer yields duplicate links. + ------ 0.6.41 ------ @@ -61,6 +67,7 @@ CHANGES 0.6.35 ------ + Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in how it parses version numbers. diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0ee21e3b7b..4393c83a02 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -139,20 +139,26 @@ def interpret_distro_name(location, basename, metadata, def find_external_links(url, page): """Find rel="homepage" and rel="download" links in `page`, yielding URLs""" + seen = set() for match in REL.finditer(page): tag, rel = match.groups() rels = map(str.strip, rel.lower().split(',')) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): - yield urlparse.urljoin(url, htmldecode(match.group(1))) + url = urlparse.urljoin(url, htmldecode(match.group(1))) + if not url in seen: + yield url for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - yield urlparse.urljoin(url, htmldecode(match.group(1))) + url = urlparse.urljoin(url, htmldecode(match.group(1))) + if not url in seen: + yield url + user_agent = "Python-urllib/%s distribute/%s" % ( sys.version[:3], require('distribute')[0].version From 116420fe62842f18f2d37de46c2177028231755a Mon Sep 17 00:00:00 2001 From: Dirley Rodrigues Date: Mon, 4 Feb 2013 11:39:28 -0200 Subject: [PATCH 1805/8469] avoid naming problems --HG-- branch : distribute extra : rebase_source : 29eeb99013055b8d27cad7f7e8898d06a865b188 --- setuptools/package_index.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 4393c83a02..984feef4d2 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -139,25 +139,25 @@ def interpret_distro_name(location, basename, metadata, def find_external_links(url, page): """Find rel="homepage" and rel="download" links in `page`, yielding URLs""" - seen = set() + seen_links = set() for match in REL.finditer(page): tag, rel = match.groups() rels = map(str.strip, rel.lower().split(',')) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): - url = urlparse.urljoin(url, htmldecode(match.group(1))) - if not url in seen: - yield url + link = urlparse.urljoin(url, htmldecode(match.group(1))) + if not link in seen_links: + yield link for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - url = urlparse.urljoin(url, htmldecode(match.group(1))) - if not url in seen: - yield url + link = urlparse.urljoin(url, htmldecode(match.group(1))) + if not link in seen_links: + yield link user_agent = "Python-urllib/%s distribute/%s" % ( From d7ba7ce3c4ce2427d78cb2393bd062aa3a8496b4 Mon Sep 17 00:00:00 2001 From: Dirley Rodrigues Date: Mon, 4 Feb 2013 11:54:53 -0200 Subject: [PATCH 1806/8469] actually filter the links --HG-- branch : distribute extra : rebase_source : cb6e3497e1f8594181f10110cbc833bd6c81f89e --- setuptools/package_index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 984feef4d2..8974a64790 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -148,6 +148,7 @@ def find_external_links(url, page): for match in HREF.finditer(tag): link = urlparse.urljoin(url, htmldecode(match.group(1))) if not link in seen_links: + seen_links.add(link) yield link for tag in ("Home Page", "Download URL"): @@ -157,6 +158,7 @@ def find_external_links(url, page): if match: link = urlparse.urljoin(url, htmldecode(match.group(1))) if not link in seen_links: + seen_links.add(link) yield link From 4a45583a15586a574c857826c3807d9123ef4418 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 10:27:13 -0400 Subject: [PATCH 1807/8469] Added Dirley to contributors --HG-- branch : distribute --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index e5e0ed511b..d6aa151d91 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -8,6 +8,7 @@ Contributors * Christophe Combelles * Daniel Stutzbach * Daniel Holth +* Dirley Rodrigues * Grigory Petrov * Hanno Schlichting * Jannis Leidel From b8327d7f646141415beb30acd39ce8840ebc708b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 10:36:51 -0400 Subject: [PATCH 1808/8469] Add unique_everseen from Python 2.7 docs --HG-- branch : distribute --- setuptools/package_index.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8974a64790..e542f58677 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1,5 +1,6 @@ """PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO +import itertools import base64 import httplib from pkg_resources import * @@ -134,6 +135,24 @@ def interpret_distro_name(location, basename, metadata, platform = platform ) +# From Python 2.7 docs +def unique_everseen(iterable, key=None): + "List unique elements, preserving order. Remember all elements ever seen." + # unique_everseen('AAAABBBCCDAABBB') --> A B C D + # unique_everseen('ABBCcAD', str.lower) --> A B C D + seen = set() + seen_add = seen.add + if key is None: + for element in itertools.ifilterfalse(seen.__contains__, iterable): + seen_add(element) + yield element + else: + for element in iterable: + k = key(element) + if k not in seen: + seen_add(k) + yield element + REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) # this line is here to fix emacs' cruddy broken syntax highlighting From 3b9a57a0c80ee11995fbe937e7dbeca3d83ec10a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 11:02:05 -0400 Subject: [PATCH 1809/8469] Use a wrapper to ensure unique values on find_external_links. Factors out uniqueness test into a re-usable decorator and simplifies the body of find_external_links. --HG-- branch : distribute --- setuptools/package_index.py | 24 +++++++++++++++--------- setuptools/py24compat.py | 11 +++++++++++ 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 setuptools/py24compat.py diff --git a/setuptools/package_index.py b/setuptools/package_index.py index e542f58677..0a3f9e05dc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -12,6 +12,8 @@ from md5 import md5 from fnmatch import translate +from .py24compat import wraps + 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 @@ -153,32 +155,36 @@ def unique_everseen(iterable, key=None): seen_add(k) yield element +def unique_values(func): + """ + Wrap a function returning an iterable such that the resulting iterable + only ever yields unique items. + """ + @wraps(func) + def wrapper(*args, **kwargs): + return unique_everseen(func(*args, **kwargs)) + return wrapper + REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) # this line is here to fix emacs' cruddy broken syntax highlighting +@unique_values def find_external_links(url, page): """Find rel="homepage" and rel="download" links in `page`, yielding URLs""" - seen_links = set() for match in REL.finditer(page): tag, rel = match.groups() rels = map(str.strip, rel.lower().split(',')) if 'homepage' in rels or 'download' in rels: for match in HREF.finditer(tag): - link = urlparse.urljoin(url, htmldecode(match.group(1))) - if not link in seen_links: - seen_links.add(link) - yield link + yield urlparse.urljoin(url, htmldecode(match.group(1))) for tag in ("Home Page", "Download URL"): pos = page.find(tag) if pos!=-1: match = HREF.search(page,pos) if match: - link = urlparse.urljoin(url, htmldecode(match.group(1))) - if not link in seen_links: - seen_links.add(link) - yield link + yield urlparse.urljoin(url, htmldecode(match.group(1))) user_agent = "Python-urllib/%s distribute/%s" % ( diff --git a/setuptools/py24compat.py b/setuptools/py24compat.py new file mode 100644 index 0000000000..c5d7d2045d --- /dev/null +++ b/setuptools/py24compat.py @@ -0,0 +1,11 @@ +""" +Forward-compatibility support for Python 2.4 and earlier +""" + +# from jaraco.compat 1.2 +try: + from functools import wraps +except ImportError: + def wraps(func): + "Just return the function unwrapped" + return lambda x: x From 8c89c9438e9e461acc7587b60c79fb94b4d1f06d Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 14 Apr 2006 19:38:38 +0000 Subject: [PATCH 1810/8469] First round of prepping setuptools for inclusion in Python 2.5: move site.py to setuptools/site-patch.py; reinstate 'python -m easy_install' support; use distutils' "upload" command when running under 2.5. --HG-- branch : distribute extra : source : fbb6c89a74aa47a556a936202d2e50051b067940 extra : histedit_source : 778122fc56bcca6f5a1dbd5a475df11d29028730 --- setup.py | 10 +++------- setuptools/command/easy_install.py | 2 +- site.py => setuptools/site-patch.py | 0 3 files changed, 4 insertions(+), 8 deletions(-) rename site.py => setuptools/site-patch.py (100%) mode change 100755 => 100644 diff --git a/setup.py b/setup.py index 8f350c4ea2..a9b7bb0f8f 100755 --- a/setup.py +++ b/setup.py @@ -158,20 +158,18 @@ def _being_installed(): test_suite = 'setuptools.tests', src_root = src_root, packages = find_packages(), - package_data = {'setuptools':['*.exe'], 'setuptools.command':['*.xml']}, + package_data = {'setuptools':['*.exe', 'site-patch.py'], 'setuptools.command':['*.xml']}, - py_modules = ['pkg_resources', 'easy_install', 'site'], + py_modules = ['pkg_resources', 'easy_install'], zip_safe = (sys.version>="2.5"), # <2.5 needs unzipped for -m to work cmdclass = {'test': test}, entry_points = { - "distutils.commands" : [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() for cmd in SETUP_COMMANDS ], - "distutils.setup_keywords": [ "eager_resources = setuptools.dist:assert_string_list", "namespace_packages = setuptools.dist:check_nsp", @@ -192,7 +190,6 @@ def _being_installed(): "use_2to3_fixers = setuptools.dist:assert_string_list", "use_2to3_exclude_fixers = setuptools.dist:assert_string_list", ], - "egg_info.writers": [ "PKG-INFO = setuptools.command.egg_info:write_pkg_info", "requires.txt = setuptools.command.egg_info:write_requirements", @@ -203,7 +200,6 @@ def _being_installed(): "depends.txt = setuptools.command.egg_info:warn_depends_obsolete", "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": console_scripts, "setuptools.file_finders": @@ -211,7 +207,7 @@ def _being_installed(): "setuptools.installation": ['eggsecutable = setuptools.command.easy_install:bootstrap'], - }, + }, classifiers = textwrap.dedent(""" diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index df6107d77d..77b0bc3176 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1277,7 +1277,7 @@ def install_site_py(self): return # already did it, or don't need to sitepy = os.path.join(self.install_dir, "site.py") - source = resource_string(Requirement.parse("distribute"), "site.py") + source = resource_string("setuptools", "site-patch.py") current = "" if os.path.exists(sitepy): diff --git a/site.py b/setuptools/site-patch.py old mode 100755 new mode 100644 similarity index 100% rename from site.py rename to setuptools/site-patch.py From ea42db5cb8c6b047ed510fb937a4110b102b92ea Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Mon, 17 Apr 2006 09:22:35 +0000 Subject: [PATCH 1811/8469] Fix for a bug exposed by r45232: /path/to/uninstalled/python setup.py build_ext now failed with pyconfig.h not found. Prior to r45232 the above command did not look for pyconfig.h, but the bug is really in the look-up code: expecting to find it in os.curdir is a rather fragile idea. --- sysconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index eafd49e7af..8d66cc2e7e 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -31,7 +31,7 @@ python_build = os.path.isfile(landmark) -del argv0_path, landmark +del landmark def get_python_version(): @@ -185,7 +185,7 @@ def customize_compiler(compiler): def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: - inc_dir = os.curdir + inc_dir = argv0_path else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': From 8e8c8486409ae4fe7a424a541307265b07d82753 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Mon, 17 Apr 2006 14:43:30 +0000 Subject: [PATCH 1812/8469] disutils checks if MACOSX_DEPLOYMENT_TARGET is consistent with the value at configure time. The current check is too strict and doesn't allow building extensions that can only run on newer versions of the OS than the version python was build for, that is python build for 10.3 or later and an extension for 10.4. This patch relaxes this check. This turned out to be a reimplementation of patch 1193190. --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 8d66cc2e7e..72aa511700 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -372,7 +372,7 @@ def _init_posix(): if cur_target == '': cur_target = cfg_target os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) - if cfg_target != cur_target: + elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) raise DistutilsPlatformError(my_msg) From c4c2a4987d1138c0ae217701f994abf29cdd7148 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Fri, 21 Apr 2006 10:40:58 +0000 Subject: [PATCH 1813/8469] Merge p3yk branch with the trunk up to revision 45595. This breaks a fair number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway. --- command/build_ext.py | 13 ++++++- command/install.py | 1 + command/install_egg_info.py | 75 +++++++++++++++++++++++++++++++++++++ command/upload.py | 11 +++++- log.py | 7 +++- sysconfig.py | 21 ++++++++--- 6 files changed, 119 insertions(+), 9 deletions(-) create mode 100644 command/install_egg_info.py diff --git a/command/build_ext.py b/command/build_ext.py index 6ea5d57998..5771252123 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -185,7 +185,9 @@ def finalize_options (self): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or \ + (sys.platform.startswith('linux') and + sysconfig.get_config_var('Py_ENABLE_SHARED')): if string.find(sys.executable, sys.exec_prefix) != -1: # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", @@ -688,6 +690,13 @@ def get_libraries (self, ext): # extensions, it is a reference to the original list return ext.libraries + [pythonlib, "m"] + extra else: - return ext.libraries + from distutils import sysconfig + if sysconfig.get_config_var('Py_ENABLE_SHARED'): + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + return ext.libraries + [pythonlib] + else: + return ext.libraries # class build_ext diff --git a/command/install.py b/command/install.py index 7723761117..453151d08b 100644 --- a/command/install.py +++ b/command/install.py @@ -601,6 +601,7 @@ def has_data (self): ('install_headers', has_headers), ('install_scripts', has_scripts), ('install_data', has_data), + ('install_egg_info', lambda self:True), ] # class install diff --git a/command/install_egg_info.py b/command/install_egg_info.py new file mode 100644 index 0000000000..c31ac29668 --- /dev/null +++ b/command/install_egg_info.py @@ -0,0 +1,75 @@ +"""distutils.command.install_egg_info + +Implements the Distutils 'install_egg_info' command, for installing +a package's PKG-INFO metadata.""" + + +from distutils.cmd import Command +from distutils import log, dir_util +import os, sys, re + +class install_egg_info(Command): + """Install an .egg-info file for the package""" + + description = "Install package's PKG-INFO metadata as an .egg-info file" + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ] + + def initialize_options(self): + self.install_dir = None + + def finalize_options(self): + self.set_undefined_options('install_lib',('install_dir','install_dir')) + basename = "%s-%s-py%s.egg-info" % ( + to_filename(safe_name(self.distribution.get_name())), + to_filename(safe_version(self.distribution.get_version())), + sys.version[:3] + ) + self.target = os.path.join(self.install_dir, basename) + self.outputs = [self.target] + + def run(self): + target = self.target + if os.path.isdir(target) and not os.path.islink(target): + dir_util.remove_tree(target, dry_run=self.dry_run) + elif os.path.exists(target): + self.execute(os.unlink,(self.target,),"Removing "+target) + log.info("Writing %s", target) + if not self.dry_run: + f = open(target, 'w') + self.distribution.metadata.write_pkg_file(f) + f.close() + + def get_outputs(self): + return self.outputs + + +# The following routines are taken from setuptools' pkg_resources module and +# can be replaced by importing them from pkg_resources once it is included +# in the stdlib. + +def safe_name(name): + """Convert an arbitrary string to a standard distribution name + + Any runs of non-alphanumeric/. characters are replaced with a single '-'. + """ + return re.sub('[^A-Za-z0-9.]+', '-', name) + + +def safe_version(version): + """Convert an arbitrary string to a standard version string + + Spaces become dots, and all other non-alphanumeric characters become + dashes, with runs of multiple dashes condensed to a single dash. + """ + version = version.replace(' ','.') + return re.sub('[^A-Za-z0-9.]+', '-', version) + + +def to_filename(name): + """Convert a project or version name to its filename-escaped form + + Any '-' characters are currently replaced with '_'. + """ + return name.replace('-','_') diff --git a/command/upload.py b/command/upload.py index 62767a348e..6f4ce81f79 100644 --- a/command/upload.py +++ b/command/upload.py @@ -29,6 +29,7 @@ class upload(Command): 'display full response text from server'), ('sign', 's', 'sign files to upload using gpg'), + ('identity=', 'i', 'GPG identity used to sign files'), ] boolean_options = ['show-response', 'sign'] @@ -38,8 +39,13 @@ def initialize_options(self): self.repository = '' self.show_response = 0 self.sign = False + self.identity = None def finalize_options(self): + if self.identity and not self.sign: + raise DistutilsOptionError( + "Must use --sign for --identity to have meaning" + ) if os.environ.has_key('HOME'): rc = os.path.join(os.environ['HOME'], '.pypirc') if os.path.exists(rc): @@ -67,7 +73,10 @@ def run(self): def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: - spawn(("gpg", "--detach-sign", "-a", filename), + gpg_args = ["gpg", "--detach-sign", "-a", filename] + if self.identity: + gpg_args[2:2] = ["--local-user", self.identity] + spawn(gpg_args, dry_run=self.dry_run) # Fill in the data - send all the meta-data in case we need to diff --git a/log.py b/log.py index cf3ee136e0..95d4c1c5a2 100644 --- a/log.py +++ b/log.py @@ -20,7 +20,12 @@ def __init__(self, threshold=WARN): def _log(self, level, msg, args): if level >= self.threshold: - print msg % args + if not args: + # msg may contain a '%'. If args is empty, + # don't even try to string-format + print msg + else: + print msg % args sys.stdout.flush() def log(self, level, msg, *args): diff --git a/sysconfig.py b/sysconfig.py index dc603be8b7..49536f0d3f 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -31,7 +31,7 @@ python_build = os.path.isfile(landmark) -del argv0_path, landmark +del landmark def get_python_version(): @@ -185,7 +185,7 @@ def customize_compiler(compiler): def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: - inc_dir = os.curdir + inc_dir = argv0_path else: inc_dir = get_python_inc(plat_specific=1) if get_python_version() < '2.2': @@ -213,8 +213,8 @@ def parse_config_h(fp, g=None): """ if g is None: g = {} - define_rx = re.compile("#define ([A-Z][A-Z0-9_]+) (.*)\n") - undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") + define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n") + undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n") # while 1: line = fp.readline() @@ -351,6 +351,17 @@ def _init_posix(): raise DistutilsPlatformError(my_msg) + # load the installed pyconfig.h: + try: + filename = get_config_h_filename() + parse_config_h(file(filename), g) + except IOError, msg: + my_msg = "invalid Python installation: unable to open %s" % filename + if hasattr(msg, "strerror"): + my_msg = my_msg + " (%s)" % msg.strerror + + raise DistutilsPlatformError(my_msg) + # On MacOSX we need to check the setting of the environment variable # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. @@ -361,7 +372,7 @@ def _init_posix(): if cur_target == '': cur_target = cfg_target os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target) - if cfg_target != cur_target: + elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')): my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure' % (cur_target, cfg_target)) raise DistutilsPlatformError(my_msg) From aca28c3c53d3a26bed0130d101ca283bd517f2b9 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 25 Apr 2006 00:34:50 +0000 Subject: [PATCH 1814/8469] Put break at correct level so *all* root HKEYs acutally get checked for an installed VC6. Otherwise only the first such tree gets checked and this warning doesn't get displayed. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index f88f36526c..d24d0ac6e0 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -618,7 +618,7 @@ def get_msvc_paths(self, path, platform='x86'): "but the expected registry settings are not present.\n" "You must at least run the Visual Studio GUI once " "so that these entries are created.") - break + break return [] def set_path_env_var(self, name): From a3c755c1adfd523cfd16d54e90c9ef1bb50f9915 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 28 Apr 2006 16:58:52 +0000 Subject: [PATCH 1815/8469] Bug #1478326: don't allow '/' in distutils.util.get_platform machine names since this value is used to name the build directory. --- util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util.py b/util.py index 387e9bdc93..061092b673 100644 --- a/util.py +++ b/util.py @@ -45,6 +45,7 @@ def get_platform (): osname = string.lower(osname) osname = string.replace(osname, '/', '') machine = string.replace(machine, ' ', '_') + machine = string.replace(machine, '/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- From 9115c7ba3b080c10b08610e08a1e3bcec03352e7 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sat, 29 Apr 2006 11:31:35 +0000 Subject: [PATCH 1816/8469] Patch 1471883: --enable-universalsdk on Mac OS X --- sysconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 72aa511700..2a18d2beb0 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -366,8 +366,8 @@ def _init_posix(): # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and g.has_key('CONFIGURE_MACOSX_DEPLOYMENT_TARGET'): - cfg_target = g['CONFIGURE_MACOSX_DEPLOYMENT_TARGET'] + if sys.platform == 'darwin' and g.has_key('MACOSX_DEPLOYMENT_TARGET'): + cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': cur_target = cfg_target From 91bcdf7042985faabfa0efe6fb435a7d55dca67d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 30 Apr 2006 08:57:35 +0000 Subject: [PATCH 1817/8469] In stdlib, use hashlib instead of deprecated md5 and sha modules. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 6f4ce81f79..4a9ed398a0 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ from distutils.core import Command from distutils.spawn import spawn from distutils import log -from md5 import md5 +from hashlib import md5 import os import socket import platform From e22f2ec8532760515e2f60c974283a7b9a841fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 1 May 2006 16:14:16 +0000 Subject: [PATCH 1818/8469] Rename parameters to match the documentation (which in turn matches Microsoft's documentation). Drop unused parameter in CAB.append. --- command/bdist_msi.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f05d66cb5d..75db8773f1 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2005 Martin v. Löwis +# Copyright (C) 2005, 2006 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst @@ -16,7 +16,7 @@ from distutils.errors import DistutilsOptionError from distutils import log import msilib -from msilib import schema, sequence, uisample +from msilib import schema, sequence, text from msilib import Directory, Feature, Dialog, add_data class PyDialog(Dialog): @@ -374,8 +374,8 @@ def add_ui(self): ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250), ("ProgressDlg", None, 1280)]) - add_data(db, 'ActionText', uisample.ActionText) - add_data(db, 'UIText', uisample.UIText) + add_data(db, 'ActionText', text.ActionText) + add_data(db, 'UIText', text.UIText) ##################################################################### # Standard dialogs: FatalError, UserExit, ExitDialog fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title, @@ -502,9 +502,9 @@ def add_ui(self): seldlg.back("< Back", None, active=0) c = seldlg.next("Next >", "Cancel") - c.event("SetTargetPath", "TARGETDIR", order=1) - c.event("SpawnWaitDialog", "WaitForCostingDlg", order=2) - c.event("EndDialog", "Return", order=3) + c.event("SetTargetPath", "TARGETDIR", ordering=1) + c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=2) + c.event("EndDialog", "Return", ordering=3) c = seldlg.cancel("Cancel", "DirectoryCombo") c.event("SpawnDialog", "CancelDlg") @@ -561,7 +561,7 @@ def add_ui(self): c = whichusers.next("Next >", "Cancel") c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1) - c.event("EndDialog", "Return", order = 2) + c.event("EndDialog", "Return", ordering = 2) c = whichusers.cancel("Cancel", "AdminInstall") c.event("SpawnDialog", "CancelDlg") From eef192824d14409f513b9f2acb842aa6ed2b8f5c Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 23 May 2006 11:47:16 +0000 Subject: [PATCH 1819/8469] Disable linking extensions with -lpython2.5 for darwin. This should fix bug #1487105. --- command/build_ext.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/command/build_ext.py b/command/build_ext.py index fbb74768ba..00f8a6b9ae 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -689,6 +689,11 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib, "m"] + extra + + elif sys.platform == 'darwin': + # Don't use the default code below + return ext.libraries + else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): From 0856fd358badca3ac456fd79ba1442dfce7118f6 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 23 May 2006 12:01:11 +0000 Subject: [PATCH 1820/8469] Patch #1488098. This patchs makes it possible to create a universal build on OSX 10.4 and use the result to build extensions on 10.3. It also makes it possible to override the '-arch' and '-isysroot' compiler arguments for specific extensions. --- sysconfig.py | 15 ++++++++++++ unixccompiler.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++-- util.py | 48 ++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 2a18d2beb0..2ba3c4db5d 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -500,6 +500,21 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + if sys.platform == 'darwin': + kernel_version = os.uname()[2] # Kernel version (8.4.3) + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # On Mac OS X before 10.4, check if -arch and -isysroot + # are in CFLAGS or LDFLAGS and remove them if they are. + # This is needed when building extensions on a 10.3 system + # using a universal build of python. + for key in ('LDFLAGS', 'BASECFLAGS'): + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = re.sub('-isysroot [^ \t]* ', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: diff --git a/unixccompiler.py b/unixccompiler.py index 56998c3507..e612cfc2ec 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -42,6 +42,48 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. +def _darwin_compiler_fixup(compiler_so, cc_args): + """ + This function will strip '-isysroot PATH' and '-arch ARCH' from the + compile flags if the user has specified one them in extra_compile_flags. + + This is needed because '-arch ARCH' adds another architecture to the + build, without a way to remove an architecture. Furthermore GCC will + barf if multiple '-isysroot' arguments are present. + """ + stripArch = stripSysroot = 0 + + compiler_so = list(compiler_so) + kernel_version = os.uname()[2] # 8.4.3 + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # OSX before 10.4.0, these don't support -arch and -isysroot at + # all. + stripArch = stripSysroot = True + else: + stripArch = '-arch' in cc_args + stripSysroot = '-isysroot' in cc_args + + if stripArch: + while 1: + try: + index = compiler_so.index('-arch') + # Strip this argument and the next one: + del compiler_so[index:index+2] + except ValueError: + break + + if stripSysroot: + try: + index = compiler_so.index('-isysroot') + # Strip this argument and the next one: + del compiler_so[index:index+1] + except ValueError: + pass + + return compiler_so + class UnixCCompiler(CCompiler): compiler_type = 'unix' @@ -108,8 +150,11 @@ def preprocess(self, source, raise CompileError, msg def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so + if sys.platform == 'darwin': + compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) try: - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError, msg: raise CompileError, msg @@ -172,7 +217,22 @@ def link(self, target_desc, objects, else: linker = self.linker_so[:] if target_lang == "c++" and self.compiler_cxx: - linker[0] = self.compiler_cxx[0] + # skip over environment variable settings if /usr/bin/env + # is used to set up the linker's environment. + # This is needed on OSX. Note: this assumes that the + # normal and C++ compiler have the same environment + # settings. + i = 0 + if os.path.basename(linker[0]) == "env": + i = 1 + while '=' in linker[i]: + i = i + 1 + + linker[i] = self.compiler_cxx[i] + + if sys.platform == 'darwin': + linker = _darwin_compiler_fixup(linker, ld_args) + self.spawn(linker + ld_args) except DistutilsExecError, msg: raise LinkError, msg diff --git a/util.py b/util.py index 061092b673..623c41e280 100644 --- a/util.py +++ b/util.py @@ -67,6 +67,54 @@ def get_platform (): m = rel_re.match(release) if m: release = m.group() + elif osname[:6] == "darwin": + # + # For our purposes, we'll assume that the system version from + # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set + # to. This makes the compatibility story a bit more sane because the + # machine is going to compile and link as if it were + # MACOSX_DEPLOYMENT_TARGET. + from distutils.sysconfig import get_config_vars + cfgvars = get_config_vars() + + macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') + if not macver: + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + + if not macver: + # Get the system version. Reading this plist is a documented + # way to get the system version (see the documentation for + # the Gestalt Manager) + try: + f = open('/System/Library/CoreServices/SystemVersion.plist') + except IOError: + # We're on a plain darwin box, fall back to the default + # behaviour. + pass + else: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + f.close() + if m is not None: + macver = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + + if macver: + from distutils.sysconfig import get_config_vars + release = macver + osname = "macosx" + + + if (release + '.') < '10.4.' and \ + get_config_vars().get('UNIVERSALSDK', '').strip(): + # The universal build will build fat binaries, but not on + # systems before 10.4 + machine = 'fat' + + elif machine in ('PowerPC', 'Power_Macintosh'): + # Pick a sane name for the PPC architecture. + machine = 'ppc' return "%s-%s-%s" % (osname, release, machine) From 57e5a01e0a790b43902fc19615d1a81ffa888c7a Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 23 May 2006 21:54:23 +0000 Subject: [PATCH 1821/8469] Whitespace normalization. --- unixccompiler.py | 2 +- util.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/unixccompiler.py b/unixccompiler.py index e612cfc2ec..324819d4a5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -220,7 +220,7 @@ def link(self, target_desc, objects, # skip over environment variable settings if /usr/bin/env # is used to set up the linker's environment. # This is needed on OSX. Note: this assumes that the - # normal and C++ compiler have the same environment + # normal and C++ compiler have the same environment # settings. i = 0 if os.path.basename(linker[0]) == "env": diff --git a/util.py b/util.py index 623c41e280..cfcc6a951e 100644 --- a/util.py +++ b/util.py @@ -69,10 +69,10 @@ def get_platform (): release = m.group() elif osname[:6] == "darwin": # - # For our purposes, we'll assume that the system version from - # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set + # For our purposes, we'll assume that the system version from + # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set # to. This makes the compatibility story a bit more sane because the - # machine is going to compile and link as if it were + # machine is going to compile and link as if it were # MACOSX_DEPLOYMENT_TARGET. from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() @@ -97,7 +97,7 @@ def get_platform (): r'(.*?)', f.read()) f.close() if m is not None: - macver = '.'.join(m.group(1).split('.')[:2]) + macver = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour if macver: From e6ecfaefb58476548380b845c21cffc4a797fcc2 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Fri, 26 May 2006 14:07:23 +0000 Subject: [PATCH 1822/8469] Fix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc --- ccompiler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 6dad757a6a..1349abeb65 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,7 +15,6 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group -from distutils.sysconfig import python_build from distutils.util import split_quoted, execute from distutils import log @@ -368,7 +367,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, # Get the list of expected output (object) files objects = self.object_filenames(sources, - strip_dir=python_build, + strip_dir=0, output_dir=outdir) assert len(objects) == len(sources) @@ -475,8 +474,7 @@ def _prep_compile(self, sources, output_dir, depends=None): which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames(sources, strip_dir=python_build, - output_dir=output_dir) + objects = self.object_filenames(sources, output_dir=output_dir) assert len(objects) == len(sources) if self.force: From 9cc8b6b8399a7a3b3ce1c8fc308f3f01a39ef975 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sat, 27 May 2006 19:21:47 +0000 Subject: [PATCH 1823/8469] Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. Inherits test_gzip/test_tarfile failures on 64-bit platforms from the trunk, but I don't want the merge to hang around too long (even though the regular p3yk-contributors are/have been busy with other things.) Merged revisions 45621-46490 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r45621 | george.yoshida | 2006-04-21 18:34:17 +0200 (Fri, 21 Apr 2006) | 2 lines Correct the grammar ........ r45622 | tim.peters | 2006-04-21 18:34:54 +0200 (Fri, 21 Apr 2006) | 2 lines Whitespace normalization. ........ r45624 | thomas.heller | 2006-04-21 18:48:56 +0200 (Fri, 21 Apr 2006) | 1 line Merge in changes from ctypes 0.9.9.6 upstream version. ........ r45625 | thomas.heller | 2006-04-21 18:51:04 +0200 (Fri, 21 Apr 2006) | 1 line Merge in changes from ctypes 0.9.9.6 upstream version. ........ r45630 | thomas.heller | 2006-04-21 20:29:17 +0200 (Fri, 21 Apr 2006) | 8 lines Documentation for ctypes. I think that 'generic operating system services' is the best category. Note that the Doc/lib/libctypes.latex file is generated from reST sources. You are welcome to make typo fixes, and I'll try to keep the reST sources in sync, but markup changes would be lost - they should be fixed in the tool that creates the latex file. The conversion script is external/ctypes/docs/manual/mkpydoc.py. ........ r45631 | tim.peters | 2006-04-21 23:18:10 +0200 (Fri, 21 Apr 2006) | 24 lines SF bug #1473760 TempFile can hang on Windows. Python 2.4 changed ntpath.abspath to do an import inside the function. As a result, due to Python's import lock, anything calling abspath on Windows (directly, or indirectly like tempfile.TemporaryFile) hung when it was called from a thread spawned as a side effect of importing a module. This is a depressingly frequent problem, and deserves a more general fix. I'm settling for a micro-fix here because this specific one accounts for a report of Zope Corp's ZEO hanging on Windows, and it was an odd way to change abspath to begin with (ntpath needs a different implementation depending on whether we're actually running on Windows, and the _obvious_ way to arrange for that is not to bury a possibly-failing import _inside_ the function). Note that if/when other micro-fixes of this kind get made, the new Lib/test/threaded_import_hangers.py is a convenient place to add tests for them. ........ r45634 | phillip.eby | 2006-04-21 23:53:37 +0200 (Fri, 21 Apr 2006) | 2 lines Guido wrote contextlib, not me, but thanks anyway. ;) ........ r45636 | andrew.kuchling | 2006-04-22 03:51:41 +0200 (Sat, 22 Apr 2006) | 1 line Typo fixes ........ r45638 | andrew.kuchling | 2006-04-22 03:58:40 +0200 (Sat, 22 Apr 2006) | 1 line Fix comment typo ........ r45639 | andrew.kuchling | 2006-04-22 04:06:03 +0200 (Sat, 22 Apr 2006) | 8 lines Make copy of test_mailbox.py. We'll still want to check the backward compatibility classes in the new mailbox.py that I'll be committing in a few minutes. One change has been made: the tests use len(mbox) instead of len(mbox.boxes). The 'boxes' attribute was never documented and contains some internal state that seems unlikely to have been useful. ........ r45640 | andrew.kuchling | 2006-04-22 04:32:43 +0200 (Sat, 22 Apr 2006) | 16 lines Add Gregory K. Johnson's revised version of mailbox.py (funded by the 2005 Summer of Code). The revision adds a number of new mailbox classes that support adding and removing messages; these classes also support mailbox locking and default to using email.Message instead of rfc822.Message. The old mailbox classes are largely left alone for backward compatibility. The exception is the Maildir class, which was present in the old module and now inherits from the new classes. The Maildir class's interface is pretty simple, though, so I think it'll be compatible with existing code. (The change to the NEWS file also adds a missing word to a different news item, which unfortunately required rewrapping the line.) ........ r45641 | tim.peters | 2006-04-22 07:52:59 +0200 (Sat, 22 Apr 2006) | 2 lines Whitespace normalization. ........ r45642 | neal.norwitz | 2006-04-22 08:07:46 +0200 (Sat, 22 Apr 2006) | 1 line Add libctypes as a dep ........ r45643 | martin.v.loewis | 2006-04-22 13:15:41 +0200 (Sat, 22 Apr 2006) | 1 line Fix more ssize_t problems. ........ r45644 | martin.v.loewis | 2006-04-22 13:40:03 +0200 (Sat, 22 Apr 2006) | 1 line Fix more ssize_t issues. ........ r45645 | george.yoshida | 2006-04-22 17:10:49 +0200 (Sat, 22 Apr 2006) | 2 lines Typo fixes ........ r45647 | martin.v.loewis | 2006-04-22 17:19:54 +0200 (Sat, 22 Apr 2006) | 1 line Port to Python 2.5. Drop .DEF file. Change output file names to .pyd. ........ r45648 | george.yoshida | 2006-04-22 17:27:14 +0200 (Sat, 22 Apr 2006) | 3 lines - add versionadded tag - make arbitrary arguments come last ........ r45649 | hyeshik.chang | 2006-04-22 17:48:15 +0200 (Sat, 22 Apr 2006) | 3 lines Remove $CJKCodecs$ RCS tags. The CJKCodecs isn't maintained outside anymore. ........ r45654 | greg.ward | 2006-04-23 05:47:58 +0200 (Sun, 23 Apr 2006) | 2 lines Update optparse to Optik 1.5.1. ........ r45658 | george.yoshida | 2006-04-23 11:27:10 +0200 (Sun, 23 Apr 2006) | 2 lines wrap SyntaxError with \exception{} ........ r45660 | ronald.oussoren | 2006-04-23 13:59:25 +0200 (Sun, 23 Apr 2006) | 6 lines Patch 1471925 - Weak linking support for OSX This patch causes several symbols in the socket and posix module to be weakly linked on OSX and disables usage of ftime on OSX. These changes make it possible to use a binary build on OSX 10.4 on a 10.3 system. ........ r45661 | ronald.oussoren | 2006-04-23 14:36:23 +0200 (Sun, 23 Apr 2006) | 5 lines Patch 1471761 - test for broken poll at runtime This patch checks if poll is broken when the select module is loaded instead of doing so at configure-time. This functionality is only active on Mac OS X. ........ r45662 | nick.coghlan | 2006-04-23 17:13:32 +0200 (Sun, 23 Apr 2006) | 1 line Add a Context Types section to parallel the Iterator Types section (uses the same terminology as the 2.5a1 implementation) ........ r45663 | nick.coghlan | 2006-04-23 17:14:37 +0200 (Sun, 23 Apr 2006) | 1 line Update contextlib documentation to use the same terminology as the module implementation ........ r45664 | gerhard.haering | 2006-04-23 17:24:26 +0200 (Sun, 23 Apr 2006) | 2 lines Updated the sqlite3 module to the external pysqlite 2.2.2 version. ........ r45666 | nick.coghlan | 2006-04-23 17:39:16 +0200 (Sun, 23 Apr 2006) | 1 line Update with statement documentation to use same terminology as 2.5a1 implementation ........ r45667 | nick.coghlan | 2006-04-23 18:05:04 +0200 (Sun, 23 Apr 2006) | 1 line Add a (very) brief mention of the with statement to the end of chapter 8 ........ r45668 | nick.coghlan | 2006-04-23 18:35:19 +0200 (Sun, 23 Apr 2006) | 1 line Take 2 on mentioning the with statement, this time without inadvertently killing the Unicode examples ........ r45669 | nick.coghlan | 2006-04-23 19:04:07 +0200 (Sun, 23 Apr 2006) | 1 line Backdated NEWS entry to record the implementation of PEP 338 for alpha 1 ........ r45670 | tim.peters | 2006-04-23 20:13:45 +0200 (Sun, 23 Apr 2006) | 2 lines Whitespace normalization. ........ r45671 | skip.montanaro | 2006-04-23 21:14:27 +0200 (Sun, 23 Apr 2006) | 1 line first cut at trace module doc ........ r45672 | skip.montanaro | 2006-04-23 21:26:33 +0200 (Sun, 23 Apr 2006) | 1 line minor tweak ........ r45673 | skip.montanaro | 2006-04-23 21:30:50 +0200 (Sun, 23 Apr 2006) | 1 line it's always helpful if the example works... ........ r45674 | skip.montanaro | 2006-04-23 21:32:14 +0200 (Sun, 23 Apr 2006) | 1 line correct example ........ r45675 | andrew.kuchling | 2006-04-23 23:01:04 +0200 (Sun, 23 Apr 2006) | 1 line Edits to the PEP 343 section ........ r45676 | andrew.kuchling | 2006-04-23 23:51:10 +0200 (Sun, 23 Apr 2006) | 1 line Add two items ........ r45677 | tim.peters | 2006-04-24 04:03:16 +0200 (Mon, 24 Apr 2006) | 5 lines Bug #1337990: clarified that `doctest` does not support examples requiring both expected output and an exception. I'll backport to 2.4 next. ........ r45679 | nick.coghlan | 2006-04-24 05:04:43 +0200 (Mon, 24 Apr 2006) | 1 line Note changes made to PEP 343 related documentation ........ r45681 | nick.coghlan | 2006-04-24 06:17:02 +0200 (Mon, 24 Apr 2006) | 1 line Change PEP 343 related documentation to use the term context specifier instead of context object ........ r45682 | nick.coghlan | 2006-04-24 06:32:47 +0200 (Mon, 24 Apr 2006) | 1 line Add unit tests for the -m and -c command line switches ........ r45683 | nick.coghlan | 2006-04-24 06:37:15 +0200 (Mon, 24 Apr 2006) | 1 line Fix contextlib.nested to cope with exit methods raising and handling exceptions ........ r45685 | nick.coghlan | 2006-04-24 06:59:28 +0200 (Mon, 24 Apr 2006) | 1 line Fix broken contextlib test from last checkin (I'd've sworn I tested that before checking it in. . .) ........ r45686 | nick.coghlan | 2006-04-24 07:24:26 +0200 (Mon, 24 Apr 2006) | 1 line Back out new command line tests (broke buildbot) ........ r45687 | nick.coghlan | 2006-04-24 07:52:15 +0200 (Mon, 24 Apr 2006) | 1 line More reliable version of new command line tests that just checks the exit codes ........ r45688 | thomas.wouters | 2006-04-24 13:37:13 +0200 (Mon, 24 Apr 2006) | 4 lines Stop test_tcl's testLoadTk from leaking the Tk commands 'loadtk' registers. ........ r45690 | andrew.kuchling | 2006-04-24 16:30:47 +0200 (Mon, 24 Apr 2006) | 2 lines Edits, using the new term 'context specifier' in a few places ........ r45697 | phillip.eby | 2006-04-24 22:53:13 +0200 (Mon, 24 Apr 2006) | 2 lines Revert addition of setuptools ........ r45698 | tim.peters | 2006-04-25 00:45:13 +0200 (Tue, 25 Apr 2006) | 2 lines Whitespace normalization. ........ r45700 | trent.mick | 2006-04-25 02:34:50 +0200 (Tue, 25 Apr 2006) | 4 lines Put break at correct level so *all* root HKEYs acutally get checked for an installed VC6. Otherwise only the first such tree gets checked and this warning doesn't get displayed. ........ r45701 | tim.peters | 2006-04-25 05:31:36 +0200 (Tue, 25 Apr 2006) | 3 lines Patch #1475231: add a new SKIP doctest option, thanks to Edward Loper. ........ r45702 | neal.norwitz | 2006-04-25 07:04:35 +0200 (Tue, 25 Apr 2006) | 1 line versionadded for SKIP ........ r45703 | neal.norwitz | 2006-04-25 07:05:03 +0200 (Tue, 25 Apr 2006) | 1 line Restore Walters name ........ r45704 | neal.norwitz | 2006-04-25 07:49:42 +0200 (Tue, 25 Apr 2006) | 1 line Revert previous change, SKIP had a versionadded elsewhere ........ r45706 | nick.coghlan | 2006-04-25 12:56:51 +0200 (Tue, 25 Apr 2006) | 31 lines Move the PEP 343 documentation and implementation closer to the terminology in the alpha 1 documentation. - "context manager" reverts to its alpha 1 definition - the term "context specifier" goes away entirely - contextlib.GeneratorContextManager is renamed GeneratorContext There are still a number of changes relative to alpha 1: - the expression in the with statement is explicitly called the "context expression" in the language reference - the terms 'with statement context', 'context object' or 'with statement context' are used in several places instead of a bare 'context'. The aim of this is to avoid ambiguity in relation to the runtime context set up when the block is executed, and the context objects that already exist in various application domains (such as decimal.Context) - contextlib.contextmanager is renamed to contextfactory This best reflects the nature of the function resulting from the use of that decorator - decimal.ContextManager is renamed to WithStatementContext Simple dropping the 'Manager' part wasn't possible due to the fact that decimal.Context already exists and means something different. WithStatementContext is ugly but workable. A technically unrelated change snuck into this commit: contextlib.closing now avoids the overhead of creating a generator, since it's trivial to implement that particular context manager directly. ........ r45707 | nick.coghlan | 2006-04-25 13:05:56 +0200 (Tue, 25 Apr 2006) | 1 line Fix latex typo ........ r45708 | thomas.wouters | 2006-04-25 14:28:56 +0200 (Tue, 25 Apr 2006) | 4 lines Fix markup glitch in unittest docs. Will backport. ........ r45710 | andrew.kuchling | 2006-04-25 14:31:38 +0200 (Tue, 25 Apr 2006) | 1 line Add two items; easy_install is now off the table, though pkgutil still is ........ r45711 | andrew.kuchling | 2006-04-25 14:47:25 +0200 (Tue, 25 Apr 2006) | 1 line Rework context terminology ........ r45712 | thomas.wouters | 2006-04-25 15:53:23 +0200 (Tue, 25 Apr 2006) | 9 lines SF bug/patch #1433877: string parameter to ioctl not null terminated The new char-array used in ioctl calls wasn't explicitly NUL-terminated; quite probably the cause for the test_pty failures on Solaris that we circumvented earlier. (I wasn't able to reproduce it with this patch, but it has been somewhat elusive to start with.) ........ r45713 | george.yoshida | 2006-04-25 16:09:58 +0200 (Tue, 25 Apr 2006) | 2 lines minor tweak ........ r45714 | thomas.wouters | 2006-04-25 17:08:10 +0200 (Tue, 25 Apr 2006) | 7 lines Fix SF bug #1476111: SystemError in socket sendto. The AF_INET6 and AF_PACKET cases in getsockaddrarg were missing their own checks for tuple-ness of the address argument, which means a confusing SystemError was raised by PyArg_ParseTuple instead. ........ r45715 | thomas.wouters | 2006-04-25 17:29:46 +0200 (Tue, 25 Apr 2006) | 10 lines Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses MAXPATHLEN-sized buffers for various output-buffers (like to realpath()), and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and does not define MAXPATHLEN.) Cursory googling suggests Linux is following a newer standard than BSD, but in cases like this, who knows. Using the greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the most portable solution. ........ r45717 | thomas.heller | 2006-04-25 20:26:08 +0200 (Tue, 25 Apr 2006) | 3 lines Fix compiler warnings on Darwin. Patch by Brett Canon, see https://sourceforge.net/tracker/?func=detail&atid=532156&aid=1475959&group_id=71702 ........ r45718 | guido.van.rossum | 2006-04-25 22:12:45 +0200 (Tue, 25 Apr 2006) | 4 lines Implement MvL's improvement on __context__ in Condition; this can just call __context__ on the underlying lock. (The same change for Semaphore does *not* work!) ........ r45721 | tim.peters | 2006-04-26 03:15:53 +0200 (Wed, 26 Apr 2006) | 13 lines Rev 45706 renamed stuff in contextlib.py, but didn't rename uses of it in test_with.py. As a result, test_with has been skipped (due to failing imports) on all buildbot boxes since. Alas, that's not a test failure -- you have to pay attention to the 1 skip unexpected on PLATFORM: test_with kinds of output at the ends of test runs to notice that this got broken. It's likely that more renaming in test_with.py would be desirable. ........ r45722 | fred.drake | 2006-04-26 07:15:41 +0200 (Wed, 26 Apr 2006) | 1 line markup fixes, cleanup ........ r45723 | fred.drake | 2006-04-26 07:19:39 +0200 (Wed, 26 Apr 2006) | 1 line minor adjustment suggested by Peter Gephardt ........ r45724 | neal.norwitz | 2006-04-26 07:34:03 +0200 (Wed, 26 Apr 2006) | 10 lines Patch from Aldo Cortesi (OpenBSD buildbot owner). After the patch (45590) to add extra debug stats to the gc module, Python was crashing on OpenBSD due to: Fatal Python error: Interpreter not initialized (version mismatch?) This seems to occur due to calling collect() when initialized (in pythonrun.c) is set to 0. Now, the import will occur in the init function which shouldn't suffer this problem. ........ r45725 | neal.norwitz | 2006-04-26 08:26:12 +0200 (Wed, 26 Apr 2006) | 3 lines Fix this test on Solaris. There can be embedded \r, so don't just replace the one at the end. ........ r45727 | nick.coghlan | 2006-04-26 13:50:04 +0200 (Wed, 26 Apr 2006) | 1 line Fix an error in the last contextlib.closing example ........ r45728 | andrew.kuchling | 2006-04-26 14:21:06 +0200 (Wed, 26 Apr 2006) | 1 line [Bug #1475080] Fix example ........ r45729 | andrew.kuchling | 2006-04-26 14:23:39 +0200 (Wed, 26 Apr 2006) | 1 line Add labels to all sections ........ r45730 | thomas.wouters | 2006-04-26 17:53:30 +0200 (Wed, 26 Apr 2006) | 7 lines The result of SF patch #1471578: big-memory tests for strings, lists and tuples. Lots to be added, still, but this will give big-memory people something to play with in 2.5 alpha 2, and hopefully get more people to write these tests. ........ r45731 | tim.peters | 2006-04-26 19:11:16 +0200 (Wed, 26 Apr 2006) | 2 lines Whitespace normalization. ........ r45732 | martin.v.loewis | 2006-04-26 19:19:44 +0200 (Wed, 26 Apr 2006) | 1 line Use GS- and bufferoverlowU.lib where appropriate, for AMD64. ........ r45733 | thomas.wouters | 2006-04-26 20:46:01 +0200 (Wed, 26 Apr 2006) | 5 lines Add tests for += and *= on strings, and fix the memory-use estimate for the list.extend tests (they were estimating half the actual use.) ........ r45734 | thomas.wouters | 2006-04-26 21:14:46 +0200 (Wed, 26 Apr 2006) | 5 lines Some more test-size-estimate fixes: test_append and test_insert trigger a list resize, which overallocates. ........ r45735 | hyeshik.chang | 2006-04-26 21:20:26 +0200 (Wed, 26 Apr 2006) | 3 lines Fix build on MIPS for libffi. I haven't tested this yet because I don't have an access on MIPS machines. Will be tested by buildbot. :) ........ r45737 | fred.drake | 2006-04-27 01:40:32 +0200 (Thu, 27 Apr 2006) | 1 line one more place to use the current Python version ........ r45738 | fred.drake | 2006-04-27 02:02:24 +0200 (Thu, 27 Apr 2006) | 3 lines - update version numbers in file names again, until we have a better way - elaborate instructions for Cygwin support (closes SF #839709) ........ r45739 | fred.drake | 2006-04-27 02:20:14 +0200 (Thu, 27 Apr 2006) | 1 line add missing word ........ r45740 | anthony.baxter | 2006-04-27 04:11:24 +0200 (Thu, 27 Apr 2006) | 2 lines 2.5a2 ........ r45741 | anthony.baxter | 2006-04-27 04:13:13 +0200 (Thu, 27 Apr 2006) | 1 line 2.5a2 ........ r45749 | andrew.kuchling | 2006-04-27 14:22:37 +0200 (Thu, 27 Apr 2006) | 1 line Now that 2.5a2 is out, revert to the current date ........ r45750 | andrew.kuchling | 2006-04-27 14:23:07 +0200 (Thu, 27 Apr 2006) | 1 line Bump document version ........ r45751 | andrew.kuchling | 2006-04-27 14:34:39 +0200 (Thu, 27 Apr 2006) | 6 lines [Bug #1477102] Add necessary import to example This may be a useful style question for the docs -- should examples show the necessary imports, or should it be assumed that the reader will figure it out? In the What's New, I'm not consistent but usually opt for omitting the imports. ........ r45753 | andrew.kuchling | 2006-04-27 14:38:35 +0200 (Thu, 27 Apr 2006) | 1 line [Bug #1477140] Import Error base class ........ r45754 | andrew.kuchling | 2006-04-27 14:42:54 +0200 (Thu, 27 Apr 2006) | 1 line Mention the xmlrpclib.Error base class, which is used in one of the examples ........ r45756 | george.yoshida | 2006-04-27 15:41:07 +0200 (Thu, 27 Apr 2006) | 2 lines markup fix ........ r45757 | thomas.wouters | 2006-04-27 15:46:59 +0200 (Thu, 27 Apr 2006) | 4 lines Some more size-estimate fixes, for large-list-tests. ........ r45758 | thomas.heller | 2006-04-27 17:50:42 +0200 (Thu, 27 Apr 2006) | 3 lines Rerun the libffi configuration if any of the files used for that are newer then fficonfig.py. ........ r45766 | thomas.wouters | 2006-04-28 00:37:50 +0200 (Fri, 28 Apr 2006) | 6 lines Some style fixes and size-calculation fixes. Also do the small-memory run using a prime number, rather than a convenient power-of-2-and-multiple-of-5, so incorrect testing algorithms fail more easily. ........ r45767 | thomas.wouters | 2006-04-28 00:38:32 +0200 (Fri, 28 Apr 2006) | 6 lines Do the small-memory run of big-meormy tests using a prime number, rather than a convenient power-of-2-and-multiple-of-5, so incorrect testing algorithms fail more easily. ........ r45768 | david.goodger | 2006-04-28 00:53:05 +0200 (Fri, 28 Apr 2006) | 1 line Added SVN access for Steven Bethard and Talin, for PEP updating. ........ r45770 | thomas.wouters | 2006-04-28 01:13:20 +0200 (Fri, 28 Apr 2006) | 16 lines - Add new Warning class, ImportWarning - Warn-raise ImportWarning when importing would have picked up a directory as package, if only it'd had an __init__.py. This swaps two tests (for case-ness and __init__-ness), but case-test is not really more expensive, and it's not in a speed-critical section. - Test for the new warning by importing a common non-package directory on sys.path: site-packages - In regrtest.py, silence warnings generated by the build-environment because Modules/ (which is added to sys.path for Setup-created modules) has 'zlib' and '_ctypes' directories without __init__.py's. ........ r45771 | thomas.wouters | 2006-04-28 01:41:27 +0200 (Fri, 28 Apr 2006) | 6 lines Add more ignores of ImportWarnings; these are all just potential triggers (since they won't trigger if zlib is already sucessfully imported); they were found by grepping .py files, instead of looking at warning output :) ........ r45773 | neal.norwitz | 2006-04-28 06:32:20 +0200 (Fri, 28 Apr 2006) | 1 line Add some whitespace to be more consistent. ........ r45774 | neal.norwitz | 2006-04-28 06:34:43 +0200 (Fri, 28 Apr 2006) | 5 lines Try to really fix the slow buildbots this time. Printing to stdout, doesn't mean the data was actually written. It depends on the buffering, so we need to flush. This will hopefully really fix the buildbots getting killed due to no output on the slow bots. ........ r45775 | neal.norwitz | 2006-04-28 07:28:05 +0200 (Fri, 28 Apr 2006) | 1 line Fix some warnings on Mac OS X 10.4 ........ r45776 | neal.norwitz | 2006-04-28 07:28:30 +0200 (Fri, 28 Apr 2006) | 1 line Fix a warning on alpha ........ r45777 | neal.norwitz | 2006-04-28 07:28:54 +0200 (Fri, 28 Apr 2006) | 1 line Fix a warning on ppc (debian) ........ r45778 | george.yoshida | 2006-04-28 18:09:45 +0200 (Fri, 28 Apr 2006) | 2 lines fix markup glitch ........ r45780 | georg.brandl | 2006-04-28 18:31:17 +0200 (Fri, 28 Apr 2006) | 3 lines Add SeaMonkey to the list of Mozilla browsers. ........ r45781 | georg.brandl | 2006-04-28 18:36:55 +0200 (Fri, 28 Apr 2006) | 2 lines Bug #1475009: clarify ntpath.join behavior with absolute components ........ r45783 | george.yoshida | 2006-04-28 18:40:14 +0200 (Fri, 28 Apr 2006) | 2 lines correct a dead link ........ r45785 | georg.brandl | 2006-04-28 18:54:25 +0200 (Fri, 28 Apr 2006) | 4 lines Bug #1472949: stringify IOErrors in shutil.copytree when appending them to the Error errors list. ........ r45786 | georg.brandl | 2006-04-28 18:58:52 +0200 (Fri, 28 Apr 2006) | 3 lines Bug #1478326: don't allow '/' in distutils.util.get_platform machine names since this value is used to name the build directory. ........ r45788 | thomas.heller | 2006-04-28 19:02:18 +0200 (Fri, 28 Apr 2006) | 1 line Remove a duplicated test (the same test is in test_incomplete.py). ........ r45792 | georg.brandl | 2006-04-28 21:09:24 +0200 (Fri, 28 Apr 2006) | 3 lines Bug #1478429: make datetime.datetime.fromtimestamp accept every float, possibly "rounding up" to the next whole second. ........ r45796 | george.yoshida | 2006-04-29 04:43:30 +0200 (Sat, 29 Apr 2006) | 2 lines grammar fix ........ r45800 | ronald.oussoren | 2006-04-29 13:31:35 +0200 (Sat, 29 Apr 2006) | 2 lines Patch 1471883: --enable-universalsdk on Mac OS X ........ r45801 | andrew.kuchling | 2006-04-29 13:53:15 +0200 (Sat, 29 Apr 2006) | 1 line Add item ........ r45802 | andrew.kuchling | 2006-04-29 14:10:28 +0200 (Sat, 29 Apr 2006) | 1 line Make case of 'ZIP' consistent ........ r45803 | andrew.kuchling | 2006-04-29 14:10:43 +0200 (Sat, 29 Apr 2006) | 1 line Add item ........ r45808 | martin.v.loewis | 2006-04-29 14:37:25 +0200 (Sat, 29 Apr 2006) | 3 lines Further changes for #1471883: Edit Misc/NEWS, and add expat_config.h. ........ r45809 | brett.cannon | 2006-04-29 23:29:50 +0200 (Sat, 29 Apr 2006) | 2 lines Fix docstring for contextfactory; mentioned old contextmanager name. ........ r45810 | gerhard.haering | 2006-04-30 01:12:41 +0200 (Sun, 30 Apr 2006) | 3 lines This is the start of documentation for the sqlite3 module. Please feel free to find a better place for the link to it than alongside bsddb & friends. ........ r45811 | andrew.kuchling | 2006-04-30 03:07:09 +0200 (Sun, 30 Apr 2006) | 1 line Add two items ........ r45814 | george.yoshida | 2006-04-30 05:49:56 +0200 (Sun, 30 Apr 2006) | 2 lines Use \versionchanged instead of \versionadded for new parameter support. ........ r45815 | georg.brandl | 2006-04-30 09:06:11 +0200 (Sun, 30 Apr 2006) | 2 lines Patch #1470846: fix urllib2 ProxyBasicAuthHandler. ........ r45817 | georg.brandl | 2006-04-30 10:57:35 +0200 (Sun, 30 Apr 2006) | 3 lines In stdlib, use hashlib instead of deprecated md5 and sha modules. ........ r45819 | georg.brandl | 2006-04-30 11:23:59 +0200 (Sun, 30 Apr 2006) | 3 lines Patch #1470976: don't NLST files when retrieving over FTP. ........ r45821 | georg.brandl | 2006-04-30 13:13:56 +0200 (Sun, 30 Apr 2006) | 6 lines Bug #1473625: stop cPickle making float dumps locale dependent in protocol 0. On the way, add a decorator to test_support to facilitate running single test functions in different locales with automatic cleanup. ........ r45822 | phillip.eby | 2006-04-30 17:59:26 +0200 (Sun, 30 Apr 2006) | 2 lines Fix infinite regress when inspecting or frames. ........ r45824 | georg.brandl | 2006-04-30 19:42:26 +0200 (Sun, 30 Apr 2006) | 3 lines Fix another problem in inspect: if the module for an object cannot be found, don't try to give its __dict__ to linecache. ........ r45825 | georg.brandl | 2006-04-30 20:14:54 +0200 (Sun, 30 Apr 2006) | 3 lines Patch #1472854: make the rlcompleter.Completer class usable on non- UNIX platforms. ........ r45826 | georg.brandl | 2006-04-30 21:34:19 +0200 (Sun, 30 Apr 2006) | 3 lines Patch #1479438: add \keyword markup for "with". ........ r45827 | andrew.kuchling | 2006-04-30 23:19:31 +0200 (Sun, 30 Apr 2006) | 1 line Add urllib2 HOWTO from Michael Foord ........ r45828 | andrew.kuchling | 2006-04-30 23:19:49 +0200 (Sun, 30 Apr 2006) | 1 line Add item ........ r45830 | barry.warsaw | 2006-05-01 05:03:02 +0200 (Mon, 01 May 2006) | 11 lines Port forward from 2.4 branch: Patch #1464708 from William McVey: fixed handling of nested comments in mail addresses. E.g. "Foo ((Foo Bar)) " Fixes for both rfc822.py and email package. This patch needs to be back ported to Python 2.3 for email 2.5. ........ r45832 | fred.drake | 2006-05-01 08:25:58 +0200 (Mon, 01 May 2006) | 4 lines - minor clarification in section title - markup adjustments (there is clearly much to be done in this section) ........ r45833 | martin.v.loewis | 2006-05-01 08:28:01 +0200 (Mon, 01 May 2006) | 2 lines Work around deadlock risk. Will backport. ........ r45836 | andrew.kuchling | 2006-05-01 14:45:02 +0200 (Mon, 01 May 2006) | 1 line Some ElementTree fixes: import from xml, not xmlcore; fix case of module name; mention list() instead of getchildren() ........ r45837 | gerhard.haering | 2006-05-01 17:14:48 +0200 (Mon, 01 May 2006) | 3 lines Further integration of the documentation for the sqlite3 module. There's still quite some content to move over from the pysqlite manual, but it's a start now. ........ r45838 | martin.v.loewis | 2006-05-01 17:56:03 +0200 (Mon, 01 May 2006) | 2 lines Rename uisample to text, drop all non-text tables. ........ r45839 | martin.v.loewis | 2006-05-01 18:12:44 +0200 (Mon, 01 May 2006) | 2 lines Add msilib documentation. ........ r45840 | martin.v.loewis | 2006-05-01 18:14:16 +0200 (Mon, 01 May 2006) | 4 lines Rename parameters to match the documentation (which in turn matches Microsoft's documentation). Drop unused parameter in CAB.append. ........ r45841 | fred.drake | 2006-05-01 18:28:54 +0200 (Mon, 01 May 2006) | 1 line add dependency ........ r45842 | andrew.kuchling | 2006-05-01 18:30:25 +0200 (Mon, 01 May 2006) | 1 line Markup fixes; add some XXX comments noting problems ........ r45843 | andrew.kuchling | 2006-05-01 18:32:49 +0200 (Mon, 01 May 2006) | 1 line Add item ........ r45844 | andrew.kuchling | 2006-05-01 19:06:54 +0200 (Mon, 01 May 2006) | 1 line Markup fixes ........ r45850 | neal.norwitz | 2006-05-02 06:43:14 +0200 (Tue, 02 May 2006) | 3 lines SF #1479181: split open() and file() from being aliases for each other. ........ r45852 | neal.norwitz | 2006-05-02 08:23:22 +0200 (Tue, 02 May 2006) | 1 line Try to fix breakage caused by patch #1479181, r45850 ........ r45853 | fred.drake | 2006-05-02 08:53:59 +0200 (Tue, 02 May 2006) | 3 lines SF #1479988: add methods to allow access to weakrefs for the weakref.WeakKeyDictionary and weakref.WeakValueDictionary ........ r45854 | neal.norwitz | 2006-05-02 09:27:47 +0200 (Tue, 02 May 2006) | 5 lines Fix breakage from patch 1471883 (r45800 & r45808) on OSF/1. The problem was that pyconfig.h was being included before some system headers which caused redefinitions and other breakage. This moves system headers after expat_config.h which includes pyconfig.h. ........ r45855 | vinay.sajip | 2006-05-02 10:35:36 +0200 (Tue, 02 May 2006) | 1 line Replaced my dumb way of calculating seconds to midnight with Tim Peters' much more sensible suggestion. What was I thinking ?!? ........ r45856 | andrew.kuchling | 2006-05-02 13:30:03 +0200 (Tue, 02 May 2006) | 1 line Provide encoding as keyword argument; soften warning paragraph about encodings ........ r45858 | guido.van.rossum | 2006-05-02 19:36:09 +0200 (Tue, 02 May 2006) | 2 lines Fix the formatting of KeyboardInterrupt -- a bad issubclass() call. ........ r45862 | guido.van.rossum | 2006-05-02 21:47:52 +0200 (Tue, 02 May 2006) | 7 lines Get rid of __context__, per the latest changes to PEP 343 and python-dev discussion. There are two places of documentation that still mention __context__: Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without spending a whole lot of time thinking about it; and whatsnew, which Andrew usually likes to change himself. ........ r45863 | armin.rigo | 2006-05-02 21:52:32 +0200 (Tue, 02 May 2006) | 4 lines Documentation bug: PySet_Pop() returns a new reference (because the caller becomes the owner of that reference). ........ r45864 | guido.van.rossum | 2006-05-02 22:47:36 +0200 (Tue, 02 May 2006) | 4 lines Hopefully this will fix the spurious failures of test_mailbox.py that I'm experiencing. (This code and mailbox.py itself are full of calls to file() that should be calls to open() -- but I'm not fixing those.) ........ r45865 | andrew.kuchling | 2006-05-02 23:44:33 +0200 (Tue, 02 May 2006) | 1 line Use open() instead of file() ........ r45866 | andrew.kuchling | 2006-05-03 00:47:49 +0200 (Wed, 03 May 2006) | 1 line Update context manager section for removal of __context__ ........ r45867 | fred.drake | 2006-05-03 03:46:52 +0200 (Wed, 03 May 2006) | 1 line remove unnecessary assignment ........ r45868 | fred.drake | 2006-05-03 03:48:24 +0200 (Wed, 03 May 2006) | 4 lines tell LaTeX2HTML to: - use UTF-8 output - not mess with the >>> prompt! ........ r45869 | fred.drake | 2006-05-03 04:04:40 +0200 (Wed, 03 May 2006) | 3 lines avoid ugly markup based on the unfortunate conversions of ">>" and "<<" to guillemets; no need for magic here ........ r45870 | fred.drake | 2006-05-03 04:12:47 +0200 (Wed, 03 May 2006) | 1 line at least comment on why curly-quotes are not enabled ........ r45871 | fred.drake | 2006-05-03 04:27:40 +0200 (Wed, 03 May 2006) | 1 line one more place to avoid extra markup ........ r45872 | fred.drake | 2006-05-03 04:29:09 +0200 (Wed, 03 May 2006) | 1 line one more place to avoid extra markup (how many will there be?) ........ r45873 | fred.drake | 2006-05-03 04:29:39 +0200 (Wed, 03 May 2006) | 1 line fix up whitespace in prompt strings ........ r45876 | tim.peters | 2006-05-03 06:46:14 +0200 (Wed, 03 May 2006) | 2 lines Whitespace normalization. ........ r45877 | martin.v.loewis | 2006-05-03 06:52:04 +0200 (Wed, 03 May 2006) | 2 lines Correct some formulations, fix XXX comments. ........ r45879 | georg.brandl | 2006-05-03 07:05:02 +0200 (Wed, 03 May 2006) | 2 lines Patch #1480067: don't redirect HTTP digest auth in urllib2 ........ r45881 | georg.brandl | 2006-05-03 07:15:10 +0200 (Wed, 03 May 2006) | 3 lines Move network tests from test_urllib2 to test_urllib2net. ........ r45887 | nick.coghlan | 2006-05-03 15:02:47 +0200 (Wed, 03 May 2006) | 1 line Finish bringing SVN into line with latest version of PEP 343 by getting rid of all remaining references to context objects that I could find. Without a __context__() method context objects no longer exist. Also get test_with working again, and adopt a suggestion from Neal for decimal.Context.get_manager() ........ r45888 | nick.coghlan | 2006-05-03 15:17:49 +0200 (Wed, 03 May 2006) | 1 line Get rid of a couple more context object references, fix some markup and clarify what happens when a generator context function swallows an exception. ........ r45889 | georg.brandl | 2006-05-03 19:46:13 +0200 (Wed, 03 May 2006) | 3 lines Add seamonkey to list of Windows browsers too. ........ r45890 | georg.brandl | 2006-05-03 20:03:22 +0200 (Wed, 03 May 2006) | 3 lines RFE #1472176: In httplib, don't encode the netloc and hostname with "idna" if not necessary. ........ r45891 | georg.brandl | 2006-05-03 20:12:33 +0200 (Wed, 03 May 2006) | 2 lines Bug #1472191: convert breakpoint indices to ints before comparing them to ints ........ r45893 | georg.brandl | 2006-05-03 20:18:32 +0200 (Wed, 03 May 2006) | 3 lines Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package. ........ r45894 | thomas.heller | 2006-05-03 20:35:39 +0200 (Wed, 03 May 2006) | 1 line Don't fail the tests when libglut.so or libgle.so cannot be loaded. ........ r45895 | georg.brandl | 2006-05-04 07:08:10 +0200 (Thu, 04 May 2006) | 2 lines Bug #1481530: allow "from os.path import ..." with imputil ........ r45897 | martin.v.loewis | 2006-05-04 07:51:03 +0200 (Thu, 04 May 2006) | 2 lines Patch #1475845: Raise IndentationError for unexpected indent. ........ r45898 | martin.v.loewis | 2006-05-04 12:08:42 +0200 (Thu, 04 May 2006) | 1 line Implement os.{chdir,rename,rmdir,remove} using Win32 directly. ........ r45899 | martin.v.loewis | 2006-05-04 14:04:27 +0200 (Thu, 04 May 2006) | 2 lines Drop now-unnecessary arguments to posix_2str. ........ r45900 | martin.v.loewis | 2006-05-04 16:27:52 +0200 (Thu, 04 May 2006) | 1 line Update checks to consider Windows error numbers. ........ r45913 | thomas.heller | 2006-05-05 20:42:14 +0200 (Fri, 05 May 2006) | 2 lines Export the 'free' standard C function for use in the test suite. ........ r45914 | thomas.heller | 2006-05-05 20:43:24 +0200 (Fri, 05 May 2006) | 3 lines Fix memory leaks in the ctypes test suite, reported by valgrind, by free()ing the memory we allocate. ........ r45915 | thomas.heller | 2006-05-05 20:46:27 +0200 (Fri, 05 May 2006) | 1 line oops - the function is exported as 'my_free', not 'free'. ........ r45916 | thomas.heller | 2006-05-05 21:14:24 +0200 (Fri, 05 May 2006) | 2 lines Clean up. ........ r45920 | george.yoshida | 2006-05-06 15:09:45 +0200 (Sat, 06 May 2006) | 2 lines describe optional arguments for DocFileSuite ........ r45924 | george.yoshida | 2006-05-06 16:16:51 +0200 (Sat, 06 May 2006) | 2 lines Use \versionchanged for the feature change ........ r45925 | martin.v.loewis | 2006-05-06 18:32:54 +0200 (Sat, 06 May 2006) | 1 line Port access, chmod, parts of getcwdu, mkdir, and utime to direct Win32 API. ........ r45926 | martin.v.loewis | 2006-05-06 22:04:08 +0200 (Sat, 06 May 2006) | 2 lines Handle ERROR_ALREADY_EXISTS. ........ r45931 | andrew.kuchling | 2006-05-07 19:12:12 +0200 (Sun, 07 May 2006) | 1 line [Patch #1479977] Revised version of urllib2 HOWTO, edited by John J. Lee ........ r45932 | andrew.kuchling | 2006-05-07 19:14:53 +0200 (Sun, 07 May 2006) | 1 line Minor language edit ........ r45934 | georg.brandl | 2006-05-07 22:44:34 +0200 (Sun, 07 May 2006) | 3 lines Patch #1483395: add new TLDs to cookielib ........ r45936 | martin.v.loewis | 2006-05-08 07:25:56 +0200 (Mon, 08 May 2006) | 2 lines Add missing PyMem_Free. ........ r45938 | georg.brandl | 2006-05-08 19:28:47 +0200 (Mon, 08 May 2006) | 3 lines Add test for rev. 45934. ........ r45939 | georg.brandl | 2006-05-08 19:36:08 +0200 (Mon, 08 May 2006) | 3 lines Patch #1479302: Make urllib2 digest auth and basic auth play together. ........ r45940 | georg.brandl | 2006-05-08 19:48:01 +0200 (Mon, 08 May 2006) | 3 lines Patch #1478993: take advantage of BaseException/Exception split in cookielib ........ r45941 | neal.norwitz | 2006-05-09 07:38:56 +0200 (Tue, 09 May 2006) | 5 lines Micro optimization. In the first case, we know that frame->f_exc_type is NULL, so there's no reason to do anything with it. In the second case, we know frame->f_exc_type is not NULL, so we can just do an INCREF. ........ r45943 | thomas.heller | 2006-05-09 22:20:15 +0200 (Tue, 09 May 2006) | 2 lines Disable a test that is unreliable. ........ r45944 | tim.peters | 2006-05-10 04:43:01 +0200 (Wed, 10 May 2006) | 4 lines Variant of patch #1478292. doctest.register_optionflag(name) shouldn't create a new flag when `name` is already the name of an option flag. ........ r45947 | neal.norwitz | 2006-05-10 08:57:58 +0200 (Wed, 10 May 2006) | 14 lines Fix problems found by Coverity. longobject.c: also fix an ssize_t problem could have been NULL, so hoist the size calc to not use . _ssl.c: under fail: self is DECREF'd, but it would have been NULL. _elementtree.c: delete self if there was an error. _csv.c: I'm not sure if lineterminator could have been anything other than a string. However, other string method calls are checked, so check this one too. ........ r45948 | thomas.wouters | 2006-05-10 17:04:11 +0200 (Wed, 10 May 2006) | 4 lines Ignore reflog.txt, too. ........ r45949 | georg.brandl | 2006-05-10 17:59:06 +0200 (Wed, 10 May 2006) | 3 lines Bug #1482988: indicate more prominently that the Stats class is in the pstats module. ........ r45950 | georg.brandl | 2006-05-10 18:09:03 +0200 (Wed, 10 May 2006) | 2 lines Bug #1485447: subprocess: document that the "cwd" parameter isn't used to find the executable. Misc. other markup fixes. ........ r45952 | georg.brandl | 2006-05-10 18:11:44 +0200 (Wed, 10 May 2006) | 2 lines Bug #1484978: curses.panel: clarify that Panel objects are destroyed on garbage collection. ........ r45954 | georg.brandl | 2006-05-10 18:26:03 +0200 (Wed, 10 May 2006) | 4 lines Patch #1484695: Update the tarfile module to version 0.8. This fixes a couple of issues, notably handling of long file names using the GNU LONGNAME extension. ........ r45955 | georg.brandl | 2006-05-10 19:13:20 +0200 (Wed, 10 May 2006) | 4 lines Patch #721464: pdb.Pdb instances can now be given explicit stdin and stdout arguments, making it possible to redirect input and output for remote debugging. ........ r45956 | andrew.kuchling | 2006-05-10 19:19:04 +0200 (Wed, 10 May 2006) | 1 line Clarify description of exception handling ........ r45957 | georg.brandl | 2006-05-10 22:09:23 +0200 (Wed, 10 May 2006) | 2 lines Fix two small errors in argument lists. ........ r45960 | brett.cannon | 2006-05-11 07:11:33 +0200 (Thu, 11 May 2006) | 5 lines Detect if %zd is supported by printf() during configure and sets PY_FORMAT_SIZE_T appropriately. Removes warnings on OS X under gcc 4.0.1 when PY_FORMAT_SIZE_T is set to "" instead of "z" as is needed. ........ r45963 | neal.norwitz | 2006-05-11 09:51:59 +0200 (Thu, 11 May 2006) | 1 line Don't mask a no memory error with a less meaningful one as discussed on python-checkins ........ r45964 | martin.v.loewis | 2006-05-11 15:28:43 +0200 (Thu, 11 May 2006) | 3 lines Change WindowsError to carry the Win32 error code in winerror, and the DOS error code in errno. Revert changes where WindowsError catch blocks unnecessarily special-case OSError. ........ r45965 | george.yoshida | 2006-05-11 17:53:27 +0200 (Thu, 11 May 2006) | 2 lines Grammar fix ........ r45967 | andrew.kuchling | 2006-05-11 18:32:24 +0200 (Thu, 11 May 2006) | 1 line typo fix ........ r45968 | tim.peters | 2006-05-11 18:37:42 +0200 (Thu, 11 May 2006) | 5 lines BaseThreadedTestCase.setup(): stop special-casing WindowsError. Rev 45964 fiddled with WindowsError, and broke test_bsddb3 on all the Windows buildbot slaves as a result. This should repair it. ........ r45969 | georg.brandl | 2006-05-11 21:57:09 +0200 (Thu, 11 May 2006) | 2 lines Typo fix. ........ r45970 | tim.peters | 2006-05-12 03:57:59 +0200 (Fri, 12 May 2006) | 5 lines SF patch #1473132: Improve docs for tp_clear and tp_traverse, by Collin Winter. Bugfix candidate (but I'm not going to bother). ........ r45974 | martin.v.loewis | 2006-05-12 14:27:28 +0200 (Fri, 12 May 2006) | 4 lines Dynamically allocate path name buffer for Unicode path name in listdir. Fixes #1431582. Stop overallocating MAX_PATH characters for ANSI path names. Stop assigning to errno. ........ r45975 | martin.v.loewis | 2006-05-12 15:57:36 +0200 (Fri, 12 May 2006) | 1 line Move icon files into DLLs dir. Fixes #1477968. ........ r45976 | george.yoshida | 2006-05-12 18:40:11 +0200 (Fri, 12 May 2006) | 2 lines At first there were 6 steps, but one was removed after that. ........ r45977 | martin.v.loewis | 2006-05-12 19:22:04 +0200 (Fri, 12 May 2006) | 1 line Fix alignment error on Itanium. ........ r45978 | george.yoshida | 2006-05-12 19:25:26 +0200 (Fri, 12 May 2006) | 3 lines Duplicated description about the illegal continue usage can be found in nearly the same place. They are same, so keep the original one and remove the later-added one. ........ r45980 | thomas.heller | 2006-05-12 20:16:03 +0200 (Fri, 12 May 2006) | 2 lines Add missing svn properties. ........ r45981 | thomas.heller | 2006-05-12 20:47:35 +0200 (Fri, 12 May 2006) | 1 line set svn properties ........ r45982 | thomas.heller | 2006-05-12 21:31:46 +0200 (Fri, 12 May 2006) | 1 line add svn:eol-style native svn:keywords Id ........ r45987 | gerhard.haering | 2006-05-13 01:49:49 +0200 (Sat, 13 May 2006) | 3 lines Integrated the rest of the pysqlite reference manual into the Python documentation. Ready to be reviewed and improved upon. ........ r45988 | george.yoshida | 2006-05-13 08:53:31 +0200 (Sat, 13 May 2006) | 2 lines Add \exception markup ........ r45990 | martin.v.loewis | 2006-05-13 15:34:04 +0200 (Sat, 13 May 2006) | 2 lines Revert 43315: Printing of %zd must be signed. ........ r45992 | tim.peters | 2006-05-14 01:28:20 +0200 (Sun, 14 May 2006) | 11 lines Teach PyString_FromFormat, PyErr_Format, and PyString_FromFormatV about "%u", "%lu" and "%zu" formats. Since PyString_FromFormat and PyErr_Format have exactly the same rules (both inherited from PyString_FromFormatV), it would be good if someone with more LaTeX Fu changed one of them to just point to the other. Their docs were way out of synch before this patch, and I just did a mass copy+paste to repair that. Not a backport candidate (this is a new feature). ........ r45993 | tim.peters | 2006-05-14 01:31:05 +0200 (Sun, 14 May 2006) | 2 lines Typo repair. ........ r45994 | tim.peters | 2006-05-14 01:33:19 +0200 (Sun, 14 May 2006) | 2 lines Remove lie in new comment. ........ r45995 | ronald.oussoren | 2006-05-14 21:56:34 +0200 (Sun, 14 May 2006) | 11 lines Rework the build system for osx applications: * Don't use xcodebuild for building PythonLauncher, but use a normal unix makefile. This makes it a lot easier to use the same build flags as for the rest of python (e.g. make a universal version of python launcher) * Convert the mac makefile-s to makefile.in-s and use configure to set makefile variables instead of forwarding them as command-line arguments * Add a C version of pythonw, that we you can use '#!/usr/local/bin/pythonw' * Build IDLE.app using bundlebuilder instead of BuildApplet, that will allow easier modification of the bundle contents later on. ........ r45996 | ronald.oussoren | 2006-05-14 22:35:41 +0200 (Sun, 14 May 2006) | 6 lines A first cut at replacing the icons on MacOS X. This replaces all icons by icons based on the new python.org logo. These are also the first icons that are "proper" OSX icons. These icons were created by Jacob Rus. ........ r45997 | ronald.oussoren | 2006-05-14 23:07:41 +0200 (Sun, 14 May 2006) | 3 lines I missed one small detail in my rewrite of the osx build files: the path to the Python.app template. ........ r45998 | martin.v.loewis | 2006-05-15 07:51:36 +0200 (Mon, 15 May 2006) | 2 lines Fix memory leak. ........ r45999 | neal.norwitz | 2006-05-15 08:48:14 +0200 (Mon, 15 May 2006) | 1 line Move items implemented after a2 into the new a3 section ........ r46000 | neal.norwitz | 2006-05-15 09:04:36 +0200 (Mon, 15 May 2006) | 5 lines - Bug #1487966: Fix SystemError with conditional expression in assignment Most of the test_syntax changes are just updating the numbers. ........ r46001 | neal.norwitz | 2006-05-15 09:17:23 +0200 (Mon, 15 May 2006) | 1 line Patch #1488312, Fix memory alignment problem on SPARC in unicode. Will backport ........ r46003 | martin.v.loewis | 2006-05-15 11:22:27 +0200 (Mon, 15 May 2006) | 3 lines Remove bogus DECREF of self. Change __str__() functions to METH_O. Change WindowsError__str__ to use PyTuple_Pack. ........ r46005 | georg.brandl | 2006-05-15 21:30:35 +0200 (Mon, 15 May 2006) | 3 lines [ 1488881 ] tarfile.py: support for file-objects and bz2 (cp. #1488634) ........ r46007 | tim.peters | 2006-05-15 22:44:10 +0200 (Mon, 15 May 2006) | 9 lines ReadDetectFileobjTest: repair Windows disasters by opening the file object in binary mode. The Windows buildbot slaves shouldn't swap themselves to death anymore. However, test_tarfile may still fail because of a temp directory left behind from a previous failing run. Windows buildbot owners may need to remove that directory by hand. ........ r46009 | tim.peters | 2006-05-15 23:32:25 +0200 (Mon, 15 May 2006) | 3 lines test_directory(): Remove the leftover temp directory that's making the Windows buildbots fail test_tarfile. ........ r46010 | martin.v.loewis | 2006-05-16 09:05:37 +0200 (Tue, 16 May 2006) | 4 lines - Test for sys/statvfs.h before including it, as statvfs is present on some OSX installation, but its header file is not. Will backport to 2.4 ........ r46012 | georg.brandl | 2006-05-16 09:38:27 +0200 (Tue, 16 May 2006) | 3 lines Patch #1435422: zlib's compress and decompress objects now have a copy() method. ........ r46015 | andrew.kuchling | 2006-05-16 18:11:54 +0200 (Tue, 16 May 2006) | 1 line Add item ........ r46016 | andrew.kuchling | 2006-05-16 18:27:31 +0200 (Tue, 16 May 2006) | 3 lines PEP 243 has been withdrawn, so don't refer to it any more. The PyPI upload material has been moved into the section on PEP314. ........ r46017 | george.yoshida | 2006-05-16 19:42:16 +0200 (Tue, 16 May 2006) | 2 lines Update for 'ImportWarning' ........ r46018 | george.yoshida | 2006-05-16 20:07:00 +0200 (Tue, 16 May 2006) | 4 lines Mention that Exception is now a subclass of BaseException. Remove a sentence that says that BaseException inherits from BaseException. (I guess this is just a copy & paste mistake.) ........ r46019 | george.yoshida | 2006-05-16 20:26:10 +0200 (Tue, 16 May 2006) | 2 lines Document ImportWarning ........ r46020 | tim.peters | 2006-05-17 01:22:20 +0200 (Wed, 17 May 2006) | 2 lines Whitespace normalization. ........ r46021 | tim.peters | 2006-05-17 01:24:08 +0200 (Wed, 17 May 2006) | 2 lines Text files missing the SVN eol-style property. ........ r46022 | tim.peters | 2006-05-17 03:30:11 +0200 (Wed, 17 May 2006) | 2 lines PyZlib_copy(), PyZlib_uncopy(): Repair leaks on the normal-case path. ........ r46023 | georg.brandl | 2006-05-17 16:06:07 +0200 (Wed, 17 May 2006) | 3 lines Remove misleading comment about type-class unification. ........ r46024 | georg.brandl | 2006-05-17 16:11:36 +0200 (Wed, 17 May 2006) | 3 lines Apply patch #1489784 from Michael Foord. ........ r46025 | georg.brandl | 2006-05-17 16:18:20 +0200 (Wed, 17 May 2006) | 3 lines Fix typo in os.utime docstring (patch #1490189) ........ r46026 | georg.brandl | 2006-05-17 16:26:50 +0200 (Wed, 17 May 2006) | 3 lines Patch #1490224: set time.altzone correctly on Cygwin. ........ r46027 | georg.brandl | 2006-05-17 16:45:06 +0200 (Wed, 17 May 2006) | 4 lines Add global debug flag to cookielib to avoid heavy dependency on the logging module. Resolves #1484758. ........ r46028 | georg.brandl | 2006-05-17 16:56:04 +0200 (Wed, 17 May 2006) | 3 lines Patch #1486962: Several bugs in the turtle Tk demo module were fixed and several features added, such as speed and geometry control. ........ r46029 | georg.brandl | 2006-05-17 17:17:00 +0200 (Wed, 17 May 2006) | 4 lines Delay-import some large modules to speed up urllib2 import. (fixes #1484793). ........ r46030 | georg.brandl | 2006-05-17 17:51:16 +0200 (Wed, 17 May 2006) | 3 lines Patch #1180296: improve locale string formatting functions ........ r46032 | tim.peters | 2006-05-18 04:06:40 +0200 (Thu, 18 May 2006) | 2 lines Whitespace normalization. ........ r46033 | georg.brandl | 2006-05-18 08:11:19 +0200 (Thu, 18 May 2006) | 3 lines Amendments to patch #1484695. ........ r46034 | georg.brandl | 2006-05-18 08:18:06 +0200 (Thu, 18 May 2006) | 3 lines Remove unused import. ........ r46035 | georg.brandl | 2006-05-18 08:33:27 +0200 (Thu, 18 May 2006) | 3 lines Fix test_locale for platforms without a default thousands separator. ........ r46036 | neal.norwitz | 2006-05-18 08:51:46 +0200 (Thu, 18 May 2006) | 1 line Little cleanup ........ r46037 | georg.brandl | 2006-05-18 09:01:27 +0200 (Thu, 18 May 2006) | 4 lines Bug #1462152: file() now checks more thoroughly for invalid mode strings and removes a possible "U" before passing the mode to the C library function. ........ r46038 | georg.brandl | 2006-05-18 09:20:05 +0200 (Thu, 18 May 2006) | 3 lines Bug #1490688: properly document %e, %f, %g format subtleties. ........ r46039 | vinay.sajip | 2006-05-18 09:28:58 +0200 (Thu, 18 May 2006) | 1 line Changed status from "beta" to "production"; since logging has been part of the stdlib since 2.3, it should be safe to make this assertion ;-) ........ r46040 | ronald.oussoren | 2006-05-18 11:04:15 +0200 (Thu, 18 May 2006) | 2 lines Fix some minor issues with the generated application bundles on MacOSX ........ r46041 | andrew.kuchling | 2006-05-19 02:03:55 +0200 (Fri, 19 May 2006) | 1 line Typo fix; add clarifying word ........ r46044 | neal.norwitz | 2006-05-19 08:31:23 +0200 (Fri, 19 May 2006) | 3 lines Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed. ........ r46045 | neal.norwitz | 2006-05-19 08:43:50 +0200 (Fri, 19 May 2006) | 2 lines Fix #1474677, non-keyword argument following keyword. ........ r46046 | neal.norwitz | 2006-05-19 09:00:58 +0200 (Fri, 19 May 2006) | 4 lines Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64. I suppose this could be backported if anyone cares. ........ r46047 | neal.norwitz | 2006-05-19 09:05:01 +0200 (Fri, 19 May 2006) | 7 lines Oops, I forgot to include this file in the last commit (46046): Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64. I suppose this could be backported if anyone cares. ........ r46050 | ronald.oussoren | 2006-05-19 20:17:31 +0200 (Fri, 19 May 2006) | 6 lines * Change working directory to the users home directory, that makes the file open/save dialogs more useable. * Don't use argv emulator, its not needed for idle. ........ r46052 | tim.peters | 2006-05-19 21:16:34 +0200 (Fri, 19 May 2006) | 2 lines Whitespace normalization. ........ r46054 | ronald.oussoren | 2006-05-20 08:17:01 +0200 (Sat, 20 May 2006) | 9 lines Fix bug #1000914 (again). This patches a file that is generated by bgen, however the code is now the same as a current copy of bgen would generate. Without this patch most types in the Carbon.CF module are unusable. I haven't managed to coax bgen into generating a complete copy of _CFmodule.c yet :-(, hence the manual patching. ........ r46055 | george.yoshida | 2006-05-20 17:36:19 +0200 (Sat, 20 May 2006) | 3 lines - markup fix - add clarifying words ........ r46057 | george.yoshida | 2006-05-20 18:29:14 +0200 (Sat, 20 May 2006) | 3 lines - Add 'as' and 'with' as new keywords in 2.5. - Regenerate keyword lists with reswords.py. ........ r46058 | george.yoshida | 2006-05-20 20:07:26 +0200 (Sat, 20 May 2006) | 2 lines Apply patch #1492147 from Mike Foord. ........ r46059 | andrew.kuchling | 2006-05-20 21:25:16 +0200 (Sat, 20 May 2006) | 1 line Minor edits ........ r46061 | george.yoshida | 2006-05-21 06:22:59 +0200 (Sun, 21 May 2006) | 2 lines Fix the TeX compile error. ........ r46062 | george.yoshida | 2006-05-21 06:40:32 +0200 (Sun, 21 May 2006) | 2 lines Apply patch #1492255 from Mike Foord. ........ r46063 | martin.v.loewis | 2006-05-22 10:48:14 +0200 (Mon, 22 May 2006) | 1 line Patch 1490384: New Icons for the PC build. ........ r46064 | martin.v.loewis | 2006-05-22 11:15:18 +0200 (Mon, 22 May 2006) | 1 line Patch #1492356: Port to Windows CE (patch set 1). ........ r46065 | tim.peters | 2006-05-22 13:29:41 +0200 (Mon, 22 May 2006) | 4 lines Define SIZEOF_{DOUBLE,FLOAT} on Windows. Else Michael Hudson's nice gimmicks for IEEE special values (infinities, NaNs) don't work. ........ r46070 | bob.ippolito | 2006-05-22 16:31:24 +0200 (Mon, 22 May 2006) | 2 lines GzipFile.readline performance improvement (~30-40%), patch #1281707 ........ r46071 | bob.ippolito | 2006-05-22 17:22:46 +0200 (Mon, 22 May 2006) | 1 line Revert gzip readline performance patch #1281707 until a more generic performance improvement can be found ........ r46073 | fredrik.lundh | 2006-05-22 17:35:12 +0200 (Mon, 22 May 2006) | 4 lines docstring tweaks: count counts non-overlapping substrings, not total number of occurences ........ r46075 | bob.ippolito | 2006-05-22 17:59:12 +0200 (Mon, 22 May 2006) | 1 line Apply revised patch for GzipFile.readline performance #1281707 ........ r46076 | fredrik.lundh | 2006-05-22 18:29:30 +0200 (Mon, 22 May 2006) | 3 lines needforspeed: speed up unicode repeat, unicode string copy ........ r46079 | fredrik.lundh | 2006-05-22 19:12:58 +0200 (Mon, 22 May 2006) | 4 lines needforspeed: use memcpy for "long" strings; use a better algorithm for long repeats. ........ r46084 | tim.peters | 2006-05-22 21:17:04 +0200 (Mon, 22 May 2006) | 7 lines PyUnicode_Join(): Recent code changes introduced new compiler warnings on Windows (signed vs unsigned mismatch in comparisons). Cleaned that up by switching more locals to Py_ssize_t. Simplified overflow checking (it can _be_ simpler because while these things are declared as Py_ssize_t, then should in fact never be negative). ........ r46085 | tim.peters | 2006-05-23 07:47:16 +0200 (Tue, 23 May 2006) | 3 lines unicode_repeat(): Change type of local to Py_ssize_t, since that's what it should be. ........ r46094 | fredrik.lundh | 2006-05-23 12:10:57 +0200 (Tue, 23 May 2006) | 3 lines needforspeed: check first *and* last character before doing a full memcmp ........ r46095 | fredrik.lundh | 2006-05-23 12:12:21 +0200 (Tue, 23 May 2006) | 4 lines needforspeed: fixed unicode "in" operator to use same implementation approach as find/index ........ r46096 | richard.jones | 2006-05-23 12:37:38 +0200 (Tue, 23 May 2006) | 7 lines Merge from rjones-funccall branch. Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench. ........ r46098 | ronald.oussoren | 2006-05-23 13:04:24 +0200 (Tue, 23 May 2006) | 2 lines Avoid creating a mess when installing a framework for the second time. ........ r46101 | georg.brandl | 2006-05-23 13:17:21 +0200 (Tue, 23 May 2006) | 3 lines PyErr_NewException now accepts a tuple of base classes as its "base" parameter. ........ r46103 | ronald.oussoren | 2006-05-23 13:47:16 +0200 (Tue, 23 May 2006) | 3 lines Disable linking extensions with -lpython2.5 for darwin. This should fix bug #1487105. ........ r46104 | ronald.oussoren | 2006-05-23 14:01:11 +0200 (Tue, 23 May 2006) | 6 lines Patch #1488098. This patchs makes it possible to create a universal build on OSX 10.4 and use the result to build extensions on 10.3. It also makes it possible to override the '-arch' and '-isysroot' compiler arguments for specific extensions. ........ r46108 | andrew.kuchling | 2006-05-23 14:44:36 +0200 (Tue, 23 May 2006) | 1 line Add some items; mention the sprint ........ r46109 | andrew.kuchling | 2006-05-23 14:47:01 +0200 (Tue, 23 May 2006) | 1 line Mention string improvements ........ r46110 | andrew.kuchling | 2006-05-23 14:49:35 +0200 (Tue, 23 May 2006) | 4 lines Use 'speed' instead of 'performance', because I agree with the argument at http://zestyping.livejournal.com/193260.html that 'erformance' really means something more general. ........ r46113 | ronald.oussoren | 2006-05-23 17:09:57 +0200 (Tue, 23 May 2006) | 2 lines An improved script for building the binary distribution on MacOSX. ........ r46128 | richard.jones | 2006-05-23 20:28:17 +0200 (Tue, 23 May 2006) | 3 lines Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects. ........ r46129 | richard.jones | 2006-05-23 20:32:11 +0200 (Tue, 23 May 2006) | 1 line fix broken merge ........ r46130 | bob.ippolito | 2006-05-23 20:41:17 +0200 (Tue, 23 May 2006) | 1 line Update Misc/NEWS for gzip patch #1281707 ........ r46131 | bob.ippolito | 2006-05-23 20:43:47 +0200 (Tue, 23 May 2006) | 1 line Update Misc/NEWS for gzip patch #1281707 ........ r46132 | fredrik.lundh | 2006-05-23 20:44:25 +0200 (Tue, 23 May 2006) | 7 lines needforspeed: use append+reverse for rsplit, use "bloom filters" to speed up splitlines and strip with charsets; etc. rsplit is now as fast as split in all our tests (reverse takes no time at all), and splitlines() is nearly as fast as a plain split("\n") in our tests. and we're not done yet... ;-) ........ r46133 | tim.peters | 2006-05-23 20:45:30 +0200 (Tue, 23 May 2006) | 38 lines Bug #1334662 / patch #1335972: int(string, base) wrong answers. In rare cases of strings specifying true values near sys.maxint, and oddball bases (not decimal or a power of 2), int(string, base) could deliver insane answers. This repairs all such problems, and also speeds string->int significantly. On my box, here are % speedups for decimal strings of various lengths: length speedup ------ ------- 1 12.4% 2 15.7% 3 20.6% 4 28.1% 5 33.2% 6 37.5% 7 41.9% 8 46.3% 9 51.2% 10 19.5% 11 19.9% 12 23.9% 13 23.7% 14 23.3% 15 24.9% 16 25.3% 17 28.3% 18 27.9% 19 35.7% Note that the difference between 9 and 10 is the difference between short and long Python ints on a 32-bit box. The patch doesn't actually do anything to speed conversion to long: the speedup is due to detecting "unsigned long" overflow more quickly. This is a bugfix candidate, but it's a non-trivial patch and it would be painful to separate the "bug fix" from the "speed up" parts. ........ r46134 | bob.ippolito | 2006-05-23 20:46:41 +0200 (Tue, 23 May 2006) | 1 line Patch #1493701: performance enhancements for struct module. ........ r46136 | andrew.kuchling | 2006-05-23 21:00:45 +0200 (Tue, 23 May 2006) | 1 line Remove duplicate item ........ r46141 | bob.ippolito | 2006-05-23 21:09:51 +0200 (Tue, 23 May 2006) | 1 line revert #1493701 ........ r46142 | bob.ippolito | 2006-05-23 21:11:34 +0200 (Tue, 23 May 2006) | 1 line patch #1493701: performance enhancements for struct module ........ r46144 | bob.ippolito | 2006-05-23 21:12:41 +0200 (Tue, 23 May 2006) | 1 line patch #1493701: performance enhancements for struct module ........ r46148 | bob.ippolito | 2006-05-23 21:25:52 +0200 (Tue, 23 May 2006) | 1 line fix linking issue, warnings, in struct ........ r46149 | andrew.kuchling | 2006-05-23 21:29:38 +0200 (Tue, 23 May 2006) | 1 line Add two items ........ r46150 | bob.ippolito | 2006-05-23 21:31:23 +0200 (Tue, 23 May 2006) | 1 line forward declaration for PyStructType ........ r46151 | bob.ippolito | 2006-05-23 21:32:25 +0200 (Tue, 23 May 2006) | 1 line fix typo in _struct ........ r46152 | andrew.kuchling | 2006-05-23 21:32:35 +0200 (Tue, 23 May 2006) | 1 line Add item ........ r46153 | tim.peters | 2006-05-23 21:34:37 +0200 (Tue, 23 May 2006) | 3 lines Get the Windows build working again (recover from `struct` module changes). ........ r46155 | fredrik.lundh | 2006-05-23 21:47:35 +0200 (Tue, 23 May 2006) | 3 lines return 0 on misses, not -1. ........ r46156 | tim.peters | 2006-05-23 23:51:35 +0200 (Tue, 23 May 2006) | 4 lines test_struct grew weird behavior under regrtest.py -R, due to a module-level cache. Clearing the cache should make it stop showing up in refleak reports. ........ r46157 | tim.peters | 2006-05-23 23:54:23 +0200 (Tue, 23 May 2006) | 2 lines Whitespace normalization. ........ r46158 | tim.peters | 2006-05-23 23:55:53 +0200 (Tue, 23 May 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46161 | fredrik.lundh | 2006-05-24 12:20:36 +0200 (Wed, 24 May 2006) | 3 lines use Py_ssize_t for string indexes (thanks, neal!) ........ r46173 | fredrik.lundh | 2006-05-24 16:28:11 +0200 (Wed, 24 May 2006) | 14 lines needforspeed: use "fastsearch" for count and findstring helpers. this results in a 2.5x speedup on the stringbench count tests, and a 20x (!) speedup on the stringbench search/find/contains test, compared to 2.5a2. for more on the algorithm, see: http://effbot.org/zone/stringlib.htm if you get weird results, you can disable the new algoritm by undefining USE_FAST in Objects/unicodeobject.c. enjoy /F ........ r46182 | fredrik.lundh | 2006-05-24 17:11:01 +0200 (Wed, 24 May 2006) | 3 lines needforspeedindeed: use fastsearch also for __contains__ ........ r46184 | bob.ippolito | 2006-05-24 17:32:06 +0200 (Wed, 24 May 2006) | 1 line refactor unpack, add unpack_from ........ r46189 | fredrik.lundh | 2006-05-24 18:35:18 +0200 (Wed, 24 May 2006) | 4 lines needforspeed: refactored the replace code slightly; special-case constant-length changes; use fastsearch to locate the first match. ........ r46198 | andrew.dalke | 2006-05-24 20:55:37 +0200 (Wed, 24 May 2006) | 10 lines Added a slew of test for string replace, based various corner cases from the Need For Speed sprint coding. Includes commented out overflow tests which will be uncommented once the code is fixed. This test will break the 8-bit string tests because "".replace("", "A") == "" when it should == "A" We have a fix for it, which should be added tomorrow. ........ r46200 | tim.peters | 2006-05-24 22:27:18 +0200 (Wed, 24 May 2006) | 2 lines We can't leave the checked-in tests broken. ........ r46201 | tim.peters | 2006-05-24 22:29:44 +0200 (Wed, 24 May 2006) | 2 lines Whitespace normalization. ........ r46202 | tim.peters | 2006-05-24 23:00:45 +0200 (Wed, 24 May 2006) | 4 lines Disable the damn empty-string replace test -- it can't be make to pass now for unicode if it passes for str, or vice versa. ........ r46203 | tim.peters | 2006-05-24 23:10:40 +0200 (Wed, 24 May 2006) | 58 lines Heavily fiddled variant of patch #1442927: PyLong_FromString optimization. ``long(str, base)`` is now up to 6x faster for non-power-of-2 bases. The largest speedup is for inputs with about 1000 decimal digits. Conversion from non-power-of-2 bases remains quadratic-time in the number of input digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32). Speedups at various lengths for decimal inputs, comparing 2.4.3 with current trunk. Note that it's actually a bit slower for 1-digit strings: len speedup ---- ------- 1 -4.5% 2 4.6% 3 8.3% 4 12.7% 5 16.9% 6 28.6% 7 35.5% 8 44.3% 9 46.6% 10 55.3% 11 65.7% 12 77.7% 13 73.4% 14 75.3% 15 85.2% 16 103.0% 17 95.1% 18 112.8% 19 117.9% 20 128.3% 30 174.5% 40 209.3% 50 236.3% 60 254.3% 70 262.9% 80 295.8% 90 297.3% 100 324.5% 200 374.6% 300 403.1% 400 391.1% 500 388.7% 600 440.6% 700 468.7% 800 498.0% 900 507.2% 1000 501.2% 2000 450.2% 3000 463.2% 4000 452.5% 5000 440.6% 6000 439.6% 7000 424.8% 8000 418.1% 9000 417.7% ........ r46204 | andrew.kuchling | 2006-05-25 02:23:03 +0200 (Thu, 25 May 2006) | 1 line Minor edits; add an item ........ r46205 | fred.drake | 2006-05-25 04:42:25 +0200 (Thu, 25 May 2006) | 3 lines fix broken links in PDF (SF patch #1281291, contributed by Rory Yorke) ........ r46208 | walter.doerwald | 2006-05-25 10:53:28 +0200 (Thu, 25 May 2006) | 2 lines Replace tab inside comment with space. ........ r46209 | thomas.wouters | 2006-05-25 13:25:51 +0200 (Thu, 25 May 2006) | 4 lines Fix #1488915, Multiple dots in relative import statement raise SyntaxError. ........ r46210 | thomas.wouters | 2006-05-25 13:26:25 +0200 (Thu, 25 May 2006) | 5 lines Update graminit.c for the fix for #1488915, Multiple dots in relative import statement raise SyntaxError, and add testcase. ........ r46211 | andrew.kuchling | 2006-05-25 14:27:59 +0200 (Thu, 25 May 2006) | 1 line Add entry; and fix a typo ........ r46214 | fredrik.lundh | 2006-05-25 17:22:03 +0200 (Thu, 25 May 2006) | 7 lines needforspeed: speed up upper and lower for 8-bit string objects. (the unicode versions of these are still 2x faster on windows, though...) based on work by Andrew Dalke, with tweaks by yours truly. ........ r46216 | fredrik.lundh | 2006-05-25 17:49:45 +0200 (Thu, 25 May 2006) | 5 lines needforspeed: make new upper/lower work properly for single-character strings too... (thanks to georg brandl for spotting the exact problem faster than anyone else) ........ r46217 | kristjan.jonsson | 2006-05-25 17:53:30 +0200 (Thu, 25 May 2006) | 1 line Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms ........ r46219 | fredrik.lundh | 2006-05-25 18:10:12 +0200 (Thu, 25 May 2006) | 4 lines needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C versions if they're not defined. ........ r46220 | andrew.kuchling | 2006-05-25 18:23:15 +0200 (Thu, 25 May 2006) | 1 line Fix comment typos ........ r46221 | andrew.dalke | 2006-05-25 18:30:52 +0200 (Thu, 25 May 2006) | 2 lines Added tests for implementation error we came up with in the need for speed sprint. ........ r46222 | andrew.kuchling | 2006-05-25 18:34:54 +0200 (Thu, 25 May 2006) | 1 line Fix another typo ........ r46223 | kristjan.jonsson | 2006-05-25 18:39:27 +0200 (Thu, 25 May 2006) | 1 line Fix incorrect documentation for the Py_IS_FINITE(X) macro. ........ r46224 | fredrik.lundh | 2006-05-25 18:46:54 +0200 (Thu, 25 May 2006) | 3 lines needforspeed: check for overflow in replace (from Andrew Dalke) ........ r46226 | fredrik.lundh | 2006-05-25 19:08:14 +0200 (Thu, 25 May 2006) | 5 lines needforspeed: new replace implementation by Andrew Dalke. replace is now about 3x faster on my machine, for the replace tests from string- bench. ........ r46227 | tim.peters | 2006-05-25 19:34:03 +0200 (Thu, 25 May 2006) | 5 lines A new table to help string->integer conversion was added yesterday to both mystrtoul.c and longobject.c. Share the table instead. Also cut its size by 64 entries (they had been used for an inscrutable trick originally, but the code no longer tries to use that trick). ........ r46229 | andrew.dalke | 2006-05-25 19:53:00 +0200 (Thu, 25 May 2006) | 11 lines Fixed problem identified by Georg. The special-case in-place code for replace made a copy of the string using PyString_FromStringAndSize(s, n) and modify the copied string in-place. However, 1 (and 0) character strings are shared from a cache. This cause "A".replace("A", "a") to change the cached version of "A" -- used by everyone. Now may the copy with NULL as the string and do the memcpy manually. I've added regression tests to check if this happens in the future. Perhaps there should be a PyString_Copy for this case? ........ r46230 | fredrik.lundh | 2006-05-25 19:55:31 +0200 (Thu, 25 May 2006) | 4 lines needforspeed: use "fastsearch" for count. this results in a 3x speedup for the related stringbench tests. ........ r46231 | andrew.dalke | 2006-05-25 20:03:25 +0200 (Thu, 25 May 2006) | 4 lines Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong. Now using PyInt_FromSsize_t. ........ r46233 | andrew.kuchling | 2006-05-25 20:11:16 +0200 (Thu, 25 May 2006) | 1 line Comment typo ........ r46234 | andrew.dalke | 2006-05-25 20:18:39 +0200 (Thu, 25 May 2006) | 4 lines Added overflow test for adding two (very) large strings where the new string is over max Py_ssize_t. I have no way to test it on my box or any box I have access to. At least it doesn't break anything. ........ r46235 | bob.ippolito | 2006-05-25 20:20:23 +0200 (Thu, 25 May 2006) | 1 line Faster path for PyLong_FromLongLong, using PyLong_FromLong algorithm ........ r46238 | georg.brandl | 2006-05-25 20:44:09 +0200 (Thu, 25 May 2006) | 3 lines Guard the _active.remove() call to avoid errors when there is no _active list. ........ r46239 | fredrik.lundh | 2006-05-25 20:44:29 +0200 (Thu, 25 May 2006) | 4 lines needforspeed: use fastsearch also for find/index and contains. the related tests are now about 10x faster. ........ r46240 | bob.ippolito | 2006-05-25 20:44:50 +0200 (Thu, 25 May 2006) | 1 line Struct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed out code that will return int instead of long when in bounds (not active since it's an API and doc change) ........ r46241 | jack.diederich | 2006-05-25 20:47:15 +0200 (Thu, 25 May 2006) | 1 line * eliminate warning by reverting tmp_s type to 'const char*' ........ r46242 | bob.ippolito | 2006-05-25 21:03:19 +0200 (Thu, 25 May 2006) | 1 line Fix Cygwin compiler issue ........ r46243 | bob.ippolito | 2006-05-25 21:15:27 +0200 (Thu, 25 May 2006) | 1 line fix a struct regression where long would be returned for short unsigned integers ........ r46244 | georg.brandl | 2006-05-25 21:15:31 +0200 (Thu, 25 May 2006) | 4 lines Replace PyObject_CallFunction calls with only object args with PyObject_CallFunctionObjArgs, which is 30% faster. ........ r46245 | fredrik.lundh | 2006-05-25 21:19:05 +0200 (Thu, 25 May 2006) | 3 lines needforspeed: use insert+reverse instead of append ........ r46246 | bob.ippolito | 2006-05-25 21:33:38 +0200 (Thu, 25 May 2006) | 1 line Use LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect INT_MIN and INT_MAX ........ r46248 | bob.ippolito | 2006-05-25 21:56:56 +0200 (Thu, 25 May 2006) | 1 line Use faster struct pack/unpack functions for the endian table that matches the host's ........ r46249 | bob.ippolito | 2006-05-25 21:59:56 +0200 (Thu, 25 May 2006) | 1 line enable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable-universalsdk) ........ r46252 | georg.brandl | 2006-05-25 22:28:10 +0200 (Thu, 25 May 2006) | 4 lines Someone seems to just have copy-pasted the docs of tp_compare to tp_richcompare ;) ........ r46253 | brett.cannon | 2006-05-25 22:44:08 +0200 (Thu, 25 May 2006) | 2 lines Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() . ........ r46254 | bob.ippolito | 2006-05-25 22:52:38 +0200 (Thu, 25 May 2006) | 1 line squelch gcc4 darwin/x86 compiler warnings ........ r46255 | bob.ippolito | 2006-05-25 23:09:45 +0200 (Thu, 25 May 2006) | 1 line fix test_float regression and 64-bit size mismatch issue ........ r46256 | georg.brandl | 2006-05-25 23:11:56 +0200 (Thu, 25 May 2006) | 3 lines Add a x-ref to newer calling APIs. ........ r46257 | ronald.oussoren | 2006-05-25 23:30:54 +0200 (Thu, 25 May 2006) | 2 lines Fix minor typo in prep_cif.c ........ r46259 | brett.cannon | 2006-05-25 23:33:11 +0200 (Thu, 25 May 2006) | 4 lines Change test_values so that it compares the lowercasing of group names since getgrall() can return all lowercase names while getgrgid() returns proper casing. Discovered on Ubuntu 5.04 (custom). ........ r46261 | tim.peters | 2006-05-25 23:50:17 +0200 (Thu, 25 May 2006) | 7 lines Some Win64 pre-release in 2000 didn't support QueryPerformanceCounter(), but we believe Win64 does support it now. So use in time.clock(). It would be peachy if someone with a Win64 box tried this ;-) ........ r46262 | tim.peters | 2006-05-25 23:52:19 +0200 (Thu, 25 May 2006) | 2 lines Whitespace normalization. ........ r46263 | bob.ippolito | 2006-05-25 23:58:05 +0200 (Thu, 25 May 2006) | 1 line Add missing files from x86 darwin ctypes patch ........ r46264 | brett.cannon | 2006-05-26 00:00:14 +0200 (Fri, 26 May 2006) | 2 lines Move over to use of METH_O and METH_NOARGS. ........ r46265 | tim.peters | 2006-05-26 00:25:25 +0200 (Fri, 26 May 2006) | 3 lines Repair idiot typo, and complete the job of trying to use the Windows time.clock() implementation on Win64. ........ r46266 | tim.peters | 2006-05-26 00:28:46 +0200 (Fri, 26 May 2006) | 9 lines Patch #1494387: SVN longobject.c compiler warnings The SIGCHECK macro defined here has always been bizarre, but it apparently causes compiler warnings on "Sun Studio 11". I believe the warnings are bogus, but it doesn't hurt to make the macro definition saner. Bugfix candidate (but I'm not going to bother). ........ r46268 | fredrik.lundh | 2006-05-26 01:27:53 +0200 (Fri, 26 May 2006) | 8 lines needforspeed: partition for 8-bit strings. for some simple tests, this is on par with a corresponding find, and nearly twice as fast as split(sep, 1) full tests, a unicode version, and documentation will follow to- morrow. ........ r46271 | andrew.kuchling | 2006-05-26 03:46:22 +0200 (Fri, 26 May 2006) | 1 line Add Soc student ........ r46272 | ronald.oussoren | 2006-05-26 10:41:25 +0200 (Fri, 26 May 2006) | 3 lines Without this patch OSX users couldn't add new help sources because the code tried to update one item in a tuple. ........ r46273 | fredrik.lundh | 2006-05-26 10:54:28 +0200 (Fri, 26 May 2006) | 5 lines needforspeed: partition implementation, part two. feel free to improve the documentation and the docstrings. ........ r46274 | georg.brandl | 2006-05-26 11:05:54 +0200 (Fri, 26 May 2006) | 3 lines Clarify docs for str.partition(). ........ r46278 | fredrik.lundh | 2006-05-26 11:46:59 +0200 (Fri, 26 May 2006) | 5 lines needforspeed: use METH_O for argument handling, which made partition some ~15% faster for the current tests (which is noticable faster than a corre- sponding find call). thanks to neal-who-never-sleeps for the tip. ........ r46280 | fredrik.lundh | 2006-05-26 12:27:17 +0200 (Fri, 26 May 2006) | 5 lines needforspeed: use Py_ssize_t for the fastsearch counter and skip length (thanks, neal!). and yes, I've verified that this doesn't slow things down ;-) ........ r46285 | andrew.dalke | 2006-05-26 13:11:38 +0200 (Fri, 26 May 2006) | 2 lines Added a few more test cases for whitespace split. These strings have leading whitespace. ........ r46286 | jack.diederich | 2006-05-26 13:15:17 +0200 (Fri, 26 May 2006) | 1 line use Py_ssize_t in places that may need it ........ r46287 | andrew.dalke | 2006-05-26 13:15:22 +0200 (Fri, 26 May 2006) | 2 lines Added split whitespace checks for characters other than space. ........ r46288 | ronald.oussoren | 2006-05-26 13:17:55 +0200 (Fri, 26 May 2006) | 2 lines Fix buglet in postinstall script, it would generate an invalid .cshrc file. ........ r46290 | georg.brandl | 2006-05-26 13:26:11 +0200 (Fri, 26 May 2006) | 3 lines Add "partition" to UserString. ........ r46291 | fredrik.lundh | 2006-05-26 13:29:39 +0200 (Fri, 26 May 2006) | 5 lines needforspeed: added Py_LOCAL macro, based on the LOCAL macro used for SRE and others. applied Py_LOCAL to relevant portion of ceval, which gives a 1-2% speedup on my machine. ymmv. ........ r46292 | jack.diederich | 2006-05-26 13:37:20 +0200 (Fri, 26 May 2006) | 1 line when generating python code prefer to generate valid python code ........ r46293 | fredrik.lundh | 2006-05-26 13:38:15 +0200 (Fri, 26 May 2006) | 3 lines use Py_LOCAL also for string and unicode objects ........ r46294 | ronald.oussoren | 2006-05-26 13:38:39 +0200 (Fri, 26 May 2006) | 12 lines - Search the sqlite specific search directories after the normal include directories when looking for the version of sqlite to use. - On OSX: * Extract additional include and link directories from the CFLAGS and LDFLAGS, if the user has bothered to specify them we might as wel use them. * Add '-Wl,-search_paths_first' to the extra_link_args for readline and sqlite. This makes it possible to use a static library to override the system provided dynamic library. ........ r46295 | ronald.oussoren | 2006-05-26 13:43:26 +0200 (Fri, 26 May 2006) | 6 lines Integrate installing a framework in the 'make install' target. Until now users had to use 'make frameworkinstall' to install python when it is configured with '--enable-framework'. This tends to confuse users that don't hunt for readme files hidden in platform specific directories :-) ........ r46297 | fredrik.lundh | 2006-05-26 13:54:04 +0200 (Fri, 26 May 2006) | 4 lines needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive" LOCAL inlining; also added some missing whitespace ........ r46298 | andrew.kuchling | 2006-05-26 14:01:44 +0200 (Fri, 26 May 2006) | 1 line Typo fixes ........ r46299 | fredrik.lundh | 2006-05-26 14:01:49 +0200 (Fri, 26 May 2006) | 4 lines Py_LOCAL shouldn't be used for data; it works for some .NET 2003 compilers, but Trent's copy thinks that it's an anachronism... ........ r46300 | martin.blais | 2006-05-26 14:03:27 +0200 (Fri, 26 May 2006) | 12 lines Support for buffer protocol for socket and struct. * Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer protocol (send and sendto already did). * Added struct.pack_to(), that is the corresponding buffer compatible method to unpack_from(). * Fixed minor typos in arraymodule. ........ r46302 | ronald.oussoren | 2006-05-26 14:23:20 +0200 (Fri, 26 May 2006) | 6 lines - Remove previous version of the binary distribution script for OSX - Some small bugfixes for the IDLE.app wrapper - Tweaks to build-installer to ensure that python gets build in the right way, including sqlite3. - Updated readme files ........ r46305 | tim.peters | 2006-05-26 14:26:21 +0200 (Fri, 26 May 2006) | 2 lines Whitespace normalization. ........ r46307 | andrew.dalke | 2006-05-26 14:28:15 +0200 (Fri, 26 May 2006) | 7 lines I like tests. The new split functions use a preallocated list. Added tests which exceed the preallocation size, to exercise list appends/resizes. Also added more edge case tests. ........ r46308 | andrew.dalke | 2006-05-26 14:31:00 +0200 (Fri, 26 May 2006) | 2 lines Test cases for off-by-one errors in string split with multicharacter pattern. ........ r46309 | tim.peters | 2006-05-26 14:31:20 +0200 (Fri, 26 May 2006) | 2 lines Whitespace normalization. ........ r46313 | andrew.kuchling | 2006-05-26 14:39:48 +0200 (Fri, 26 May 2006) | 1 line Add str.partition() ........ r46314 | bob.ippolito | 2006-05-26 14:52:53 +0200 (Fri, 26 May 2006) | 1 line quick hack to fix busted binhex test ........ r46316 | andrew.dalke | 2006-05-26 15:05:55 +0200 (Fri, 26 May 2006) | 2 lines Added more rstrip tests, including for prealloc'ed arrays ........ r46320 | bob.ippolito | 2006-05-26 15:15:44 +0200 (Fri, 26 May 2006) | 1 line fix #1229380 No struct.pack exception for some out of range integers ........ r46325 | tim.peters | 2006-05-26 15:39:17 +0200 (Fri, 26 May 2006) | 2 lines Use open() to open files (was using file()). ........ r46327 | andrew.dalke | 2006-05-26 16:00:45 +0200 (Fri, 26 May 2006) | 37 lines Changes to string.split/rsplit on whitespace to preallocate space in the results list. Originally it allocated 0 items and used the list growth during append. Now it preallocates 12 items so the first few appends don't need list reallocs. ("Here are some words ."*2).split(None, 1) is 7% faster ("Here are some words ."*2).split() is is 15% faster (Your milage may vary, see dealership for details.) File parsing like this for line in f: count += len(line.split()) is also about 15% faster. There is a slowdown of about 3% for large strings because of the additional overhead of checking if the append is to a preallocated region of the list or not. This will be the rare case. It could be improved with special case code but we decided it was not useful enough. There is a cost of 12*sizeof(PyObject *) bytes per list. For the normal case of file parsing this is not a problem because of the lists have a short lifetime. We have not come up with cases where this is a problem in real life. I chose 12 because human text averages about 11 words per line in books, one of my data sets averages 6.2 words with a final peak at 11 words per line, and I work with a tab delimited data set with 8 tabs per line (or 9 words per line). 12 encompasses all of these. Also changed the last rstrip code to append then reverse, rather than doing insert(0). The strip() and rstrip() times are now comparable. ........ r46328 | tim.peters | 2006-05-26 16:02:05 +0200 (Fri, 26 May 2006) | 5 lines Explicitly close files. I'm trying to stop the frequent spurious test_tarfile failures on Windows buildbots, but it's hard to know how since the regrtest failure output is useless here, and it never fails when a buildbot slave runs test_tarfile the second time in verbose mode. ........ r46329 | andrew.kuchling | 2006-05-26 16:03:41 +0200 (Fri, 26 May 2006) | 1 line Add buffer support for struct, socket ........ r46330 | andrew.kuchling | 2006-05-26 16:04:19 +0200 (Fri, 26 May 2006) | 1 line Typo fix ........ r46331 | bob.ippolito | 2006-05-26 16:07:23 +0200 (Fri, 26 May 2006) | 1 line Fix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc ........ r46333 | bob.ippolito | 2006-05-26 16:23:21 +0200 (Fri, 26 May 2006) | 1 line Fix _struct typo that broke some 64-bit platforms ........ r46335 | bob.ippolito | 2006-05-26 16:29:35 +0200 (Fri, 26 May 2006) | 1 line Enable PY_USE_INT_WHEN_POSSIBLE in struct ........ r46343 | andrew.dalke | 2006-05-26 17:21:01 +0200 (Fri, 26 May 2006) | 2 lines Eeked out another 3% or so performance in split whitespace by cleaning up the algorithm. ........ r46352 | andrew.dalke | 2006-05-26 18:22:52 +0200 (Fri, 26 May 2006) | 3 lines Test for more edge strip cases; leading and trailing separator gets removed even with strip(..., 0) ........ r46354 | bob.ippolito | 2006-05-26 18:23:28 +0200 (Fri, 26 May 2006) | 1 line fix signed/unsigned mismatch in struct ........ r46355 | steve.holden | 2006-05-26 18:27:59 +0200 (Fri, 26 May 2006) | 5 lines Add -t option to allow easy test selection. Action verbose option correctly. Tweak operation counts. Add empty and new instances tests. Enable comparisons across different warp factors. Change version. ........ r46356 | fredrik.lundh | 2006-05-26 18:32:42 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: use Py_LOCAL on a few more locals in stringobject.c ........ r46357 | thomas.heller | 2006-05-26 18:42:44 +0200 (Fri, 26 May 2006) | 4 lines For now, I gave up with automatic conversion of reST to Python-latex, so I'm writing this in latex now. Skeleton for the ctypes reference. ........ r46358 | tim.peters | 2006-05-26 18:49:28 +0200 (Fri, 26 May 2006) | 3 lines Repair Windows compiler warnings about mixing signed and unsigned integral types in comparisons. ........ r46359 | tim.peters | 2006-05-26 18:52:04 +0200 (Fri, 26 May 2006) | 2 lines Whitespace normalization. ........ r46360 | tim.peters | 2006-05-26 18:53:04 +0200 (Fri, 26 May 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46362 | fredrik.lundh | 2006-05-26 19:04:58 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: stringlib refactoring (in progress) ........ r46363 | thomas.heller | 2006-05-26 19:18:33 +0200 (Fri, 26 May 2006) | 1 line Write some docs. ........ r46364 | fredrik.lundh | 2006-05-26 19:22:38 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: stringlib refactoring (in progress) ........ r46366 | fredrik.lundh | 2006-05-26 19:26:39 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: cleanup ........ r46367 | fredrik.lundh | 2006-05-26 19:31:41 +0200 (Fri, 26 May 2006) | 4 lines needforspeed: remove remaining USE_FAST macros; if fastsearch was broken, someone would have noticed by now ;-) ........ r46368 | steve.holden | 2006-05-26 19:41:32 +0200 (Fri, 26 May 2006) | 5 lines Use minimum calibration time rather than avergae to avoid the illusion of negative run times. Halt with an error if run times go below 10 ms, indicating that results will be unreliable. ........ r46370 | thomas.heller | 2006-05-26 19:47:40 +0200 (Fri, 26 May 2006) | 2 lines Reordered, and wrote more docs. ........ r46372 | georg.brandl | 2006-05-26 20:03:31 +0200 (Fri, 26 May 2006) | 9 lines Need for speed: Patch #921466 : sys.path_importer_cache is now used to cache valid and invalid file paths for the built-in import machinery which leads to fewer open calls on startup. Also fix issue with PEP 302 style import hooks which lead to more open() calls than necessary. ........ r46373 | fredrik.lundh | 2006-05-26 20:05:34 +0200 (Fri, 26 May 2006) | 3 lines removed unnecessary include ........ r46377 | fredrik.lundh | 2006-05-26 20:15:38 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: added rpartition implementation ........ r46380 | fredrik.lundh | 2006-05-26 20:24:15 +0200 (Fri, 26 May 2006) | 5 lines needspeed: rpartition documentation, tests, and a bug fixes. feel free to add more tests and improve the documentation. ........ r46381 | steve.holden | 2006-05-26 20:26:21 +0200 (Fri, 26 May 2006) | 4 lines Revert tests to MAL's original round sizes to retiain comparability from long ago and far away. Stop calling this pybench 1.4 because it isn't. Remove the empty test, which was a bad idea. ........ r46387 | andrew.kuchling | 2006-05-26 20:41:18 +0200 (Fri, 26 May 2006) | 1 line Add rpartition() and path caching ........ r46388 | andrew.dalke | 2006-05-26 21:02:09 +0200 (Fri, 26 May 2006) | 10 lines substring split now uses /F's fast string matching algorithm. (If compiled without FAST search support, changed the pre-memcmp test to check the last character as well as the first. This gave a 25% speedup for my test case.) Rewrote the split algorithms so they stop when maxsplit gets to 0. Previously they did a string match first then checked if the maxsplit was reached. The new way prevents a needless string search. ........ r46391 | brett.cannon | 2006-05-26 21:04:47 +0200 (Fri, 26 May 2006) | 2 lines Change C spacing to 4 spaces by default to match PEP 7 for new C files. ........ r46392 | georg.brandl | 2006-05-26 21:04:47 +0200 (Fri, 26 May 2006) | 3 lines Exception isn't the root of all exception classes anymore. ........ r46397 | fredrik.lundh | 2006-05-26 21:23:21 +0200 (Fri, 26 May 2006) | 3 lines added rpartition method to UserString class ........ r46398 | fredrik.lundh | 2006-05-26 21:24:53 +0200 (Fri, 26 May 2006) | 4 lines needforspeed: stringlib refactoring, continued. added count and find helpers; updated unicodeobject to use stringlib_count ........ r46400 | fredrik.lundh | 2006-05-26 21:29:05 +0200 (Fri, 26 May 2006) | 4 lines needforspeed: stringlib refactoring: use stringlib/find for unicode find ........ r46403 | fredrik.lundh | 2006-05-26 21:33:03 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: use a macro to fix slice indexes ........ r46404 | thomas.heller | 2006-05-26 21:43:45 +0200 (Fri, 26 May 2006) | 1 line Write more docs. ........ r46406 | fredrik.lundh | 2006-05-26 21:48:07 +0200 (Fri, 26 May 2006) | 3 lines needforspeed: stringlib refactoring: use stringlib/find for string find ........ r46407 | andrew.kuchling | 2006-05-26 21:51:10 +0200 (Fri, 26 May 2006) | 1 line Comment typo ........ r46409 | georg.brandl | 2006-05-26 22:04:44 +0200 (Fri, 26 May 2006) | 3 lines Replace Py_BuildValue("OO") by PyTuple_Pack. ........ r46411 | georg.brandl | 2006-05-26 22:14:47 +0200 (Fri, 26 May 2006) | 2 lines Patch #1492218: document None being a constant. ........ r46415 | georg.brandl | 2006-05-26 22:22:50 +0200 (Fri, 26 May 2006) | 3 lines Simplify calling. ........ r46416 | andrew.dalke | 2006-05-26 22:25:22 +0200 (Fri, 26 May 2006) | 4 lines Added limits to the replace code so it does not count all of the matching patterns in a string, only the number needed by the max limit. ........ r46417 | bob.ippolito | 2006-05-26 22:25:23 +0200 (Fri, 26 May 2006) | 1 line enable all of the struct tests, use ssize_t, fix some whitespace ........ r46418 | tim.peters | 2006-05-26 22:56:56 +0200 (Fri, 26 May 2006) | 2 lines Record Iceland sprint attendees. ........ r46421 | tim.peters | 2006-05-26 23:51:13 +0200 (Fri, 26 May 2006) | 2 lines Whitespace normalization. ........ r46422 | steve.holden | 2006-05-27 00:17:54 +0200 (Sat, 27 May 2006) | 2 lines Add Richard Tew to developers ........ r46423 | steve.holden | 2006-05-27 00:33:20 +0200 (Sat, 27 May 2006) | 2 lines Update help text and documentaition. ........ r46424 | steve.holden | 2006-05-27 00:39:27 +0200 (Sat, 27 May 2006) | 2 lines Blasted typos ... ........ r46425 | andrew.dalke | 2006-05-27 00:49:03 +0200 (Sat, 27 May 2006) | 2 lines Added description of why splitlines doesn't use the prealloc strategy ........ r46426 | tim.peters | 2006-05-27 01:14:37 +0200 (Sat, 27 May 2006) | 19 lines Patch 1145039. set_exc_info(), reset_exc_info(): By exploiting the likely (who knows?) invariant that when an exception's `type` is NULL, its `value` and `traceback` are also NULL, save some cycles in heavily-executed code. This is a "a kronar saved is a kronar earned" patch: the speedup isn't reliably measurable, but it obviously does reduce the operation count in the normal (no exception raised) path through PyEval_EvalFrameEx(). The tim-exc_sanity branch tries to push this harder, but is still blowing up (at least in part due to pre-existing subtle bugs that appear to have no other visible consequences!). Not a bugfix candidate. ........ r46429 | steve.holden | 2006-05-27 02:51:52 +0200 (Sat, 27 May 2006) | 2 lines Reinstate new-style object tests. ........ r46430 | neal.norwitz | 2006-05-27 07:18:57 +0200 (Sat, 27 May 2006) | 1 line Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code looked duplicated, I wonder if a utility function could help reduce the duplication here.) ........ r46431 | neal.norwitz | 2006-05-27 07:21:30 +0200 (Sat, 27 May 2006) | 4 lines Fix Coverity warnings. - Check the correct variable (str_obj, not str) for NULL - sep_len was already verified it wasn't 0 ........ r46432 | martin.v.loewis | 2006-05-27 10:36:52 +0200 (Sat, 27 May 2006) | 2 lines Patch 1494554: Update numeric properties to Unicode 4.1. ........ r46433 | martin.v.loewis | 2006-05-27 10:54:29 +0200 (Sat, 27 May 2006) | 2 lines Explain why 'consumed' is initialized. ........ r46436 | fredrik.lundh | 2006-05-27 12:05:10 +0200 (Sat, 27 May 2006) | 3 lines needforspeed: more stringlib refactoring ........ r46438 | fredrik.lundh | 2006-05-27 12:39:48 +0200 (Sat, 27 May 2006) | 5 lines needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in- lining killed performance on certain Intel boxes, and the "aggressive" macro itself gives most of the benefits on others. ........ r46439 | andrew.dalke | 2006-05-27 13:04:36 +0200 (Sat, 27 May 2006) | 2 lines fixed typo ........ r46440 | martin.v.loewis | 2006-05-27 13:07:49 +0200 (Sat, 27 May 2006) | 2 lines Revert bogus change committed in 46432 to this file. ........ r46444 | andrew.kuchling | 2006-05-27 13:26:33 +0200 (Sat, 27 May 2006) | 1 line Add Py_LOCAL macros ........ r46450 | bob.ippolito | 2006-05-27 13:47:12 +0200 (Sat, 27 May 2006) | 1 line Remove the range checking and int usage #defines from _struct and strip out the now-dead code ........ r46454 | bob.ippolito | 2006-05-27 14:11:36 +0200 (Sat, 27 May 2006) | 1 line Fix up struct docstrings, add struct.pack_to function for symmetry ........ r46456 | richard.jones | 2006-05-27 14:29:24 +0200 (Sat, 27 May 2006) | 2 lines Conversion of exceptions over from faked-up classes to new-style C types. ........ r46457 | georg.brandl | 2006-05-27 14:30:25 +0200 (Sat, 27 May 2006) | 3 lines Add news item for new-style exception class branch merge. ........ r46458 | tim.peters | 2006-05-27 14:36:53 +0200 (Sat, 27 May 2006) | 3 lines More random thrashing trying to understand spurious Windows failures. Who's keeping a bz2 file open? ........ r46460 | andrew.kuchling | 2006-05-27 15:44:37 +0200 (Sat, 27 May 2006) | 1 line Mention new-style exceptions ........ r46461 | richard.jones | 2006-05-27 15:50:42 +0200 (Sat, 27 May 2006) | 1 line credit where credit is due ........ r46462 | georg.brandl | 2006-05-27 16:02:03 +0200 (Sat, 27 May 2006) | 3 lines Always close BZ2Proxy object. Remove unnecessary struct usage. ........ r46463 | tim.peters | 2006-05-27 16:13:13 +0200 (Sat, 27 May 2006) | 2 lines The cheery optimism of old age. ........ r46464 | andrew.dalke | 2006-05-27 16:16:40 +0200 (Sat, 27 May 2006) | 2 lines cleanup - removed trailing whitespace ........ r46465 | georg.brandl | 2006-05-27 16:41:55 +0200 (Sat, 27 May 2006) | 3 lines Remove spurious semicolons after macro invocations. ........ r46468 | fredrik.lundh | 2006-05-27 16:58:20 +0200 (Sat, 27 May 2006) | 4 lines needforspeed: replace improvements, changed to Py_LOCAL_INLINE where appropriate ........ r46469 | fredrik.lundh | 2006-05-27 17:20:22 +0200 (Sat, 27 May 2006) | 4 lines needforspeed: stringlib refactoring: changed find_obj to find_slice, to enable use from stringobject ........ r46470 | fredrik.lundh | 2006-05-27 17:26:19 +0200 (Sat, 27 May 2006) | 3 lines needforspeed: stringlib refactoring: use find_slice for stringobject ........ r46472 | kristjan.jonsson | 2006-05-27 17:41:31 +0200 (Sat, 27 May 2006) | 1 line Add a PCBuild8 build directory for building with Visual Studio .NET 2005. Contains a special project to perform profile guided optimizations on the pythoncore.dll, by instrumenting and running pybench.py ........ r46473 | jack.diederich | 2006-05-27 17:44:34 +0200 (Sat, 27 May 2006) | 3 lines needforspeed: use PyObject_MALLOC instead of system malloc for small allocations. Use PyMem_MALLOC for larger (1k+) chunks. 1%-2% speedup. ........ r46474 | bob.ippolito | 2006-05-27 17:53:49 +0200 (Sat, 27 May 2006) | 1 line fix struct regression on 64-bit platforms ........ r46475 | richard.jones | 2006-05-27 18:07:28 +0200 (Sat, 27 May 2006) | 1 line doc string additions and tweaks ........ r46477 | richard.jones | 2006-05-27 18:15:11 +0200 (Sat, 27 May 2006) | 1 line move semicolons ........ r46478 | george.yoshida | 2006-05-27 18:32:44 +0200 (Sat, 27 May 2006) | 2 lines minor markup nits ........ r46488 | george.yoshida | 2006-05-27 18:51:43 +0200 (Sat, 27 May 2006) | 3 lines End of Ch.3 is now about "with statement". Avoid obsolescence by directly referring to the section. ........ r46489 | george.yoshida | 2006-05-27 19:09:17 +0200 (Sat, 27 May 2006) | 2 lines fix typo ........ --- ccompiler.py | 6 ++--- command/bdist_msi.py | 16 +++++------ command/build_ext.py | 5 ++++ command/upload.py | 2 +- msvccompiler.py | 2 +- sysconfig.py | 19 +++++++++++-- unixccompiler.py | 64 ++++++++++++++++++++++++++++++++++++++++++-- util.py | 49 +++++++++++++++++++++++++++++++++ 8 files changed, 145 insertions(+), 18 deletions(-) diff --git a/ccompiler.py b/ccompiler.py index 6dad757a6a..1349abeb65 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -15,7 +15,6 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath from distutils.dep_util import newer_pairwise, newer_group -from distutils.sysconfig import python_build from distutils.util import split_quoted, execute from distutils import log @@ -368,7 +367,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends, # Get the list of expected output (object) files objects = self.object_filenames(sources, - strip_dir=python_build, + strip_dir=0, output_dir=outdir) assert len(objects) == len(sources) @@ -475,8 +474,7 @@ def _prep_compile(self, sources, output_dir, depends=None): which source files can be skipped. """ # Get the list of expected output (object) files - objects = self.object_filenames(sources, strip_dir=python_build, - output_dir=output_dir) + objects = self.object_filenames(sources, output_dir=output_dir) assert len(objects) == len(sources) if self.force: diff --git a/command/bdist_msi.py b/command/bdist_msi.py index f05d66cb5d..75db8773f1 100644 --- a/command/bdist_msi.py +++ b/command/bdist_msi.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2005 Martin v. Löwis +# Copyright (C) 2005, 2006 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst @@ -16,7 +16,7 @@ from distutils.errors import DistutilsOptionError from distutils import log import msilib -from msilib import schema, sequence, uisample +from msilib import schema, sequence, text from msilib import Directory, Feature, Dialog, add_data class PyDialog(Dialog): @@ -374,8 +374,8 @@ def add_ui(self): ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250), ("ProgressDlg", None, 1280)]) - add_data(db, 'ActionText', uisample.ActionText) - add_data(db, 'UIText', uisample.UIText) + add_data(db, 'ActionText', text.ActionText) + add_data(db, 'UIText', text.UIText) ##################################################################### # Standard dialogs: FatalError, UserExit, ExitDialog fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title, @@ -502,9 +502,9 @@ def add_ui(self): seldlg.back("< Back", None, active=0) c = seldlg.next("Next >", "Cancel") - c.event("SetTargetPath", "TARGETDIR", order=1) - c.event("SpawnWaitDialog", "WaitForCostingDlg", order=2) - c.event("EndDialog", "Return", order=3) + c.event("SetTargetPath", "TARGETDIR", ordering=1) + c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=2) + c.event("EndDialog", "Return", ordering=3) c = seldlg.cancel("Cancel", "DirectoryCombo") c.event("SpawnDialog", "CancelDlg") @@ -561,7 +561,7 @@ def add_ui(self): c = whichusers.next("Next >", "Cancel") c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1) - c.event("EndDialog", "Return", order = 2) + c.event("EndDialog", "Return", ordering = 2) c = whichusers.cancel("Cancel", "AdminInstall") c.event("SpawnDialog", "CancelDlg") diff --git a/command/build_ext.py b/command/build_ext.py index 5771252123..9626710b0c 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -689,6 +689,11 @@ def get_libraries (self, ext): # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib, "m"] + extra + + elif sys.platform == 'darwin': + # Don't use the default code below + return ext.libraries + else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): diff --git a/command/upload.py b/command/upload.py index 6f4ce81f79..4a9ed398a0 100644 --- a/command/upload.py +++ b/command/upload.py @@ -6,7 +6,7 @@ from distutils.core import Command from distutils.spawn import spawn from distutils import log -from md5 import md5 +from hashlib import md5 import os import socket import platform diff --git a/msvccompiler.py b/msvccompiler.py index f88f36526c..d24d0ac6e0 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -618,7 +618,7 @@ def get_msvc_paths(self, path, platform='x86'): "but the expected registry settings are not present.\n" "You must at least run the Visual Studio GUI once " "so that these entries are created.") - break + break return [] def set_path_env_var(self, name): diff --git a/sysconfig.py b/sysconfig.py index 49536f0d3f..e1397a1988 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -366,8 +366,8 @@ def _init_posix(): # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and g.has_key('CONFIGURE_MACOSX_DEPLOYMENT_TARGET'): - cfg_target = g['CONFIGURE_MACOSX_DEPLOYMENT_TARGET'] + if sys.platform == 'darwin' and g.has_key('MACOSX_DEPLOYMENT_TARGET'): + cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': cur_target = cfg_target @@ -500,6 +500,21 @@ def get_config_vars(*args): _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX + if sys.platform == 'darwin': + kernel_version = os.uname()[2] # Kernel version (8.4.3) + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # On Mac OS X before 10.4, check if -arch and -isysroot + # are in CFLAGS or LDFLAGS and remove them if they are. + # This is needed when building extensions on a 10.3 system + # using a universal build of python. + for key in ('LDFLAGS', 'BASECFLAGS'): + flags = _config_vars[key] + flags = re.sub('-arch\s+\w+\s', ' ', flags) + flags = re.sub('-isysroot [^ \t]* ', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: diff --git a/unixccompiler.py b/unixccompiler.py index 56998c3507..324819d4a5 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -42,6 +42,48 @@ # should just happily stuff them into the preprocessor/compiler/linker # options and carry on. +def _darwin_compiler_fixup(compiler_so, cc_args): + """ + This function will strip '-isysroot PATH' and '-arch ARCH' from the + compile flags if the user has specified one them in extra_compile_flags. + + This is needed because '-arch ARCH' adds another architecture to the + build, without a way to remove an architecture. Furthermore GCC will + barf if multiple '-isysroot' arguments are present. + """ + stripArch = stripSysroot = 0 + + compiler_so = list(compiler_so) + kernel_version = os.uname()[2] # 8.4.3 + major_version = int(kernel_version.split('.')[0]) + + if major_version < 8: + # OSX before 10.4.0, these don't support -arch and -isysroot at + # all. + stripArch = stripSysroot = True + else: + stripArch = '-arch' in cc_args + stripSysroot = '-isysroot' in cc_args + + if stripArch: + while 1: + try: + index = compiler_so.index('-arch') + # Strip this argument and the next one: + del compiler_so[index:index+2] + except ValueError: + break + + if stripSysroot: + try: + index = compiler_so.index('-isysroot') + # Strip this argument and the next one: + del compiler_so[index:index+1] + except ValueError: + pass + + return compiler_so + class UnixCCompiler(CCompiler): compiler_type = 'unix' @@ -108,8 +150,11 @@ def preprocess(self, source, raise CompileError, msg def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so + if sys.platform == 'darwin': + compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs) try: - self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError, msg: raise CompileError, msg @@ -172,7 +217,22 @@ def link(self, target_desc, objects, else: linker = self.linker_so[:] if target_lang == "c++" and self.compiler_cxx: - linker[0] = self.compiler_cxx[0] + # skip over environment variable settings if /usr/bin/env + # is used to set up the linker's environment. + # This is needed on OSX. Note: this assumes that the + # normal and C++ compiler have the same environment + # settings. + i = 0 + if os.path.basename(linker[0]) == "env": + i = 1 + while '=' in linker[i]: + i = i + 1 + + linker[i] = self.compiler_cxx[i] + + if sys.platform == 'darwin': + linker = _darwin_compiler_fixup(linker, ld_args) + self.spawn(linker + ld_args) except DistutilsExecError, msg: raise LinkError, msg diff --git a/util.py b/util.py index 889bf13603..1265f4c4e3 100644 --- a/util.py +++ b/util.py @@ -45,6 +45,7 @@ def get_platform (): osname = string.lower(osname) osname = string.replace(osname, '/', '') machine = string.replace(machine, ' ', '_') + machine = string.replace(machine, '/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- @@ -66,6 +67,54 @@ def get_platform (): m = rel_re.match(release) if m: release = m.group() + elif osname[:6] == "darwin": + # + # For our purposes, we'll assume that the system version from + # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set + # to. This makes the compatibility story a bit more sane because the + # machine is going to compile and link as if it were + # MACOSX_DEPLOYMENT_TARGET. + from distutils.sysconfig import get_config_vars + cfgvars = get_config_vars() + + macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') + if not macver: + macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') + + if not macver: + # Get the system version. Reading this plist is a documented + # way to get the system version (see the documentation for + # the Gestalt Manager) + try: + f = open('/System/Library/CoreServices/SystemVersion.plist') + except IOError: + # We're on a plain darwin box, fall back to the default + # behaviour. + pass + else: + m = re.search( + r'ProductUserVisibleVersion\s*' + + r'(.*?)', f.read()) + f.close() + if m is not None: + macver = '.'.join(m.group(1).split('.')[:2]) + # else: fall back to the default behaviour + + if macver: + from distutils.sysconfig import get_config_vars + release = macver + osname = "macosx" + + + if (release + '.') < '10.4.' and \ + get_config_vars().get('UNIVERSALSDK', '').strip(): + # The universal build will build fat binaries, but not on + # systems before 10.4 + machine = 'fat' + + elif machine in ('PowerPC', 'Power_Macintosh'): + # Pick a sane name for the PPC architecture. + machine = 'ppc' return "%s-%s-%s" % (osname, release, machine) From 5baff4ddf909616e95ebd3eb3febcc6ebfa471d9 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 27 Jun 2006 10:08:25 +0000 Subject: [PATCH 1824/8469] MacOSX: fix rather dumb buglet that made it impossible to create extensions on OSX 10.3 when using a binary distribution build on 10.4. --- sysconfig.py | 2 +- unixccompiler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysconfig.py b/sysconfig.py index 2ba3c4db5d..c3b1e4ecfb 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -512,7 +512,7 @@ def get_config_vars(*args): for key in ('LDFLAGS', 'BASECFLAGS'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = re.sub('-isysroot [^ \t]* ', ' ', flags) + flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags if args: diff --git a/unixccompiler.py b/unixccompiler.py index 324819d4a5..6cd14f7728 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -78,7 +78,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): try: index = compiler_so.index('-isysroot') # Strip this argument and the next one: - del compiler_so[index:index+1] + del compiler_so[index:index+2] except ValueError: pass From 07d3e934ec7648b1c34a414ecd2da1ecd82b4813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 3 Jul 2006 12:28:58 +0000 Subject: [PATCH 1825/8469] Bug #1267547: Put proper recursive setup.py call into the spec file generated by bdist_rpm. --- command/bdist_rpm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 738e3f7269..5b09965867 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -467,7 +467,8 @@ def _make_spec_file(self): # rpm scripts # figure out default build script - def_build = "%s setup.py build" % self.python + def_setup_call = "%s %s" % (self.python,os.path.basename(sys.argv[0])) + def_build = "%s build" % def_setup_call if self.use_rpm_opt_flags: def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build @@ -481,9 +482,9 @@ def _make_spec_file(self): ('prep', 'prep_script', "%setup"), ('build', 'build_script', def_build), ('install', 'install_script', - ("%s setup.py install " + ("%s install " "--root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES") % self.python), + "--record=INSTALLED_FILES") % def_setup_call), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), From 26275077cfdade84786eef6b0bdf0f082bccdb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 10 Jul 2006 07:23:48 +0000 Subject: [PATCH 1826/8469] Introduce DISTUTILS_USE_SDK as a flag to determine whether the SDK environment should be used. Fixes #1508010. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index d24d0ac6e0..d725905bd0 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -237,7 +237,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): def initialize(self): self.__paths = [] - if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" From c536bc62ba9d9ab1ada6951d08f7638b8b13ac22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 10 Jul 2006 07:26:41 +0000 Subject: [PATCH 1827/8469] Change error message to indicate that VS2003 is necessary to build extension modules, not the .NET SDK. --- msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msvccompiler.py b/msvccompiler.py index d725905bd0..c96d527478 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -131,7 +131,7 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: # raise DistutilsPlatformError, \ - ("The .NET Framework SDK needs to be installed before " + ("Visual Studio 2003 needs to be installed before " "building extensions for Python.") p = r"Software\Microsoft\NET Framework Setup\Product" From 50345b356d829f38ac236b497f5eca14852db45e Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Mon, 10 Jul 2006 19:18:35 +0000 Subject: [PATCH 1828/8469] Fix SF#1457312: bad socket error handling in distutils "upload" command. --- command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/upload.py b/command/upload.py index 4a9ed398a0..67ba080427 100644 --- a/command/upload.py +++ b/command/upload.py @@ -185,7 +185,7 @@ def upload_file(self, command, pyversion, filename): http.endheaders() http.send(body) except socket.error, e: - self.announce(e.msg, log.ERROR) + self.announce(str(e), log.ERROR) return r = http.getresponse() From c26881ae32a53f1cfc3389764c10a16ff034bc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 27 Jul 2006 06:38:16 +0000 Subject: [PATCH 1829/8469] Bump distutils version to 2.5, as several new features have been introduced since 2.4. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a1dbb4b5ef..8a28531c8c 100644 --- a/__init__.py +++ b/__init__.py @@ -12,4 +12,4 @@ __revision__ = "$Id$" -__version__ = "2.4.0" +__version__ = "2.5.0" From 747bd24f77e15e41ecc476bc63cf71a56709a7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 30 Jul 2006 13:14:05 +0000 Subject: [PATCH 1830/8469] Base __version__ on sys.version_info, as distutils is no longer maintained separatedly. --- __init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8a28531c8c..9c60e54690 100644 --- a/__init__.py +++ b/__init__.py @@ -12,4 +12,6 @@ __revision__ = "$Id$" -__version__ = "2.5.0" +import sys +__version__ = "%d.%d.%d" % sys.version_info[:3] +del sys From 44994ba49455c4f3ba2c3c5f2e0cc9780168cb4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 30 Jul 2006 13:27:31 +0000 Subject: [PATCH 1831/8469] Mention Cygwin in distutils error message about a missing VS 2003. Fixes #1257728. --- msvccompiler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/msvccompiler.py b/msvccompiler.py index c96d527478..0d72837ed3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -131,8 +131,10 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: # raise DistutilsPlatformError, \ - ("Visual Studio 2003 needs to be installed before " - "building extensions for Python.") + ("""Python was built with Visual Studio 2003; +extensions must be built with a compiler than can generate compatible binaries. +Visual Studio 2003 was not found on this system. If you have Cygwin installed, +you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") p = r"Software\Microsoft\NET Framework Setup\Product" for base in HKEYS: From e11eb794d3d6a0845f8d742935a884c82f9eaaf0 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Fri, 11 Aug 2006 14:57:12 +0000 Subject: [PATCH 1832/8469] Merged revisions 46753-51188 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r46755 | brett.cannon | 2006-06-08 18:23:04 +0200 (Thu, 08 Jun 2006) | 4 lines Make binascii.hexlify() use s# for its arguments instead of t# to actually match its documentation stating it accepts any read-only buffer. ........ r46757 | brett.cannon | 2006-06-08 19:00:45 +0200 (Thu, 08 Jun 2006) | 8 lines Buffer objects would return the read or write buffer for a wrapped object when the char buffer was requested. Now it actually returns the char buffer if available or raises a TypeError if it isn't (as is raised for the other buffer types if they are not present but requested). Not a backport candidate since it does change semantics of the buffer object (although it could be argued this is enough of a bug to bother backporting). ........ r46760 | andrew.kuchling | 2006-06-09 03:10:17 +0200 (Fri, 09 Jun 2006) | 1 line Update functools section ........ r46762 | tim.peters | 2006-06-09 04:11:02 +0200 (Fri, 09 Jun 2006) | 6 lines Whitespace normalization. Since test_file is implicated in mysterious test failures when followed by test_optparse, if I had any brains I'd look at the checkin that last changed test_file ;-) ........ r46763 | tim.peters | 2006-06-09 05:09:42 +0200 (Fri, 09 Jun 2006) | 5 lines To boost morale :-), force test_optparse to run immediately after test_file until we can figure out how to fix it. (See python-dev; at the moment we don't even know which checkin caused the problem.) ........ r46764 | tim.peters | 2006-06-09 05:51:41 +0200 (Fri, 09 Jun 2006) | 6 lines AutoFileTests.tearDown(): Removed mysterious undocumented try/except. Remove TESTFN. Throughout: used open() instead of file(), and wrapped long lines. ........ r46765 | tim.peters | 2006-06-09 06:02:06 +0200 (Fri, 09 Jun 2006) | 8 lines testUnicodeOpen(): I have no idea why, but making this test clean up after itself appears to fix the test failures when test_optparse follows test_file. test_main(): Get rid of TESTFN no matter what. That's also enough to fix the mystery failures. Doesn't hurt to fix them twice :-) ........ r46766 | tim.peters | 2006-06-09 07:12:40 +0200 (Fri, 09 Jun 2006) | 6 lines Remove the temporary hack to force test_optparse to run immediately after test_file. At least 8 buildbot boxes passed since the underlying problem got fixed, and they all failed before the fix, so there's no point to this anymore. ........ r46767 | neal.norwitz | 2006-06-09 07:54:18 +0200 (Fri, 09 Jun 2006) | 1 line Fix grammar and reflow ........ r46769 | andrew.kuchling | 2006-06-09 12:22:35 +0200 (Fri, 09 Jun 2006) | 1 line Markup fix ........ r46773 | andrew.kuchling | 2006-06-09 15:15:57 +0200 (Fri, 09 Jun 2006) | 1 line [Bug #1472827] Make saxutils.XMLGenerator handle \r\n\t in attribute values by escaping them properly. 2.4 bugfix candidate. ........ r46778 | kristjan.jonsson | 2006-06-09 18:28:01 +0200 (Fri, 09 Jun 2006) | 2 lines Turn off warning about deprecated CRT functions on for VisualStudio .NET 2005. Make the definition #ARRAYSIZE conditional. VisualStudio .NET 2005 already has it defined using a better gimmick. ........ r46779 | phillip.eby | 2006-06-09 18:40:18 +0200 (Fri, 09 Jun 2006) | 2 lines Import wsgiref into the stdlib, as of the external version 0.1-r2181. ........ r46783 | andrew.kuchling | 2006-06-09 18:44:40 +0200 (Fri, 09 Jun 2006) | 1 line Add note about XMLGenerator bugfix ........ r46784 | andrew.kuchling | 2006-06-09 18:46:51 +0200 (Fri, 09 Jun 2006) | 1 line Add note about wsgiref ........ r46785 | brett.cannon | 2006-06-09 19:05:48 +0200 (Fri, 09 Jun 2006) | 2 lines Fix inconsistency in naming within an enum. ........ r46787 | tim.peters | 2006-06-09 19:47:00 +0200 (Fri, 09 Jun 2006) | 2 lines Whitespace normalization. ........ r46792 | georg.brandl | 2006-06-09 20:29:52 +0200 (Fri, 09 Jun 2006) | 3 lines Test file.__exit__. ........ r46794 | brett.cannon | 2006-06-09 20:40:46 +0200 (Fri, 09 Jun 2006) | 2 lines svn:ignore .pyc and .pyo files. ........ r46795 | georg.brandl | 2006-06-09 20:45:48 +0200 (Fri, 09 Jun 2006) | 3 lines RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as first argument. ........ r46798 | andrew.kuchling | 2006-06-09 21:03:16 +0200 (Fri, 09 Jun 2006) | 1 line Describe startswith()/endswiith() change; add reminder about wsgiref ........ r46799 | tim.peters | 2006-06-09 21:24:44 +0200 (Fri, 09 Jun 2006) | 11 lines Implementing a happy idea from Georg Brandl: make runtest() try to clean up files and directories the tests often leave behind by mistake. This is the first time in history I don't have a bogus "db_home" directory after running the tests ;-) Also worked on runtest's docstring, to say something about all the arguments, and to document the non-obvious return values. New functions runtest_inner() and cleanup_test_droppings() in support of the above. ........ r46800 | andrew.kuchling | 2006-06-09 21:43:25 +0200 (Fri, 09 Jun 2006) | 1 line Remove unused variable ........ r46801 | andrew.kuchling | 2006-06-09 21:56:05 +0200 (Fri, 09 Jun 2006) | 1 line Add some wsgiref text ........ r46803 | thomas.heller | 2006-06-09 21:59:11 +0200 (Fri, 09 Jun 2006) | 1 line set eol-style svn property ........ r46804 | thomas.heller | 2006-06-09 22:01:01 +0200 (Fri, 09 Jun 2006) | 1 line set eol-style svn property ........ r46805 | georg.brandl | 2006-06-09 22:43:48 +0200 (Fri, 09 Jun 2006) | 3 lines Make use of new str.startswith/endswith semantics. Occurences in email and compiler were ignored due to backwards compat requirements. ........ r46806 | brett.cannon | 2006-06-10 00:31:23 +0200 (Sat, 10 Jun 2006) | 4 lines An object with __call__ as an attribute, when called, will have that attribute checked for __call__ itself, and will continue to look until it finds an object without the attribute. This can lead to an infinite recursion. Closes bug #532646, again. Will be backported. ........ r46808 | brett.cannon | 2006-06-10 00:45:54 +0200 (Sat, 10 Jun 2006) | 2 lines Fix bug introduced in rev. 46806 by not having variable declaration at the top of a block. ........ r46812 | georg.brandl | 2006-06-10 08:40:50 +0200 (Sat, 10 Jun 2006) | 4 lines Apply perky's fix for #1503157: "/".join([u"", u""]) raising OverflowError. Also improve error message on overflow. ........ r46817 | martin.v.loewis | 2006-06-10 10:14:03 +0200 (Sat, 10 Jun 2006) | 2 lines Port cygwin kill_python changes from 2.4 branch. ........ r46818 | armin.rigo | 2006-06-10 12:57:40 +0200 (Sat, 10 Jun 2006) | 4 lines SF bug #1503294. PyThreadState_GET() complains if the tstate is NULL, but only in debug mode. ........ r46819 | martin.v.loewis | 2006-06-10 14:23:46 +0200 (Sat, 10 Jun 2006) | 4 lines Patch #1495999: Part two of Windows CE changes. - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c ........ r46820 | skip.montanaro | 2006-06-10 16:09:11 +0200 (Sat, 10 Jun 2006) | 1 line document the class, not its initializer ........ r46821 | greg.ward | 2006-06-10 18:40:01 +0200 (Sat, 10 Jun 2006) | 4 lines Sync with Optik docs (rev 518): * restore "Extending optparse" section * document ALWAYS_TYPED_ACTIONS (SF #1449311) ........ r46824 | thomas.heller | 2006-06-10 21:51:46 +0200 (Sat, 10 Jun 2006) | 8 lines Upgrade to ctypes version 0.9.9.7. Summary of changes: - support for 'variable sized' data - support for anonymous structure/union fields - fix severe bug with certain arrays or structures containing more than 256 fields ........ r46825 | thomas.heller | 2006-06-10 21:55:36 +0200 (Sat, 10 Jun 2006) | 8 lines Upgrade to ctypes version 0.9.9.7. Summary of changes: - support for 'variable sized' data - support for anonymous structure/union fields - fix severe bug with certain arrays or structures containing more than 256 fields ........ r46826 | fred.drake | 2006-06-10 22:01:34 +0200 (Sat, 10 Jun 2006) | 4 lines SF patch #1303595: improve description of __builtins__, explaining how it varies between __main__ and other modules, and strongly suggest not touching it but using __builtin__ if absolutely necessary ........ r46827 | fred.drake | 2006-06-10 22:02:58 +0200 (Sat, 10 Jun 2006) | 1 line credit for SF patch #1303595 ........ r46831 | thomas.heller | 2006-06-10 22:29:34 +0200 (Sat, 10 Jun 2006) | 2 lines New docs for ctypes. ........ r46834 | thomas.heller | 2006-06-10 23:07:19 +0200 (Sat, 10 Jun 2006) | 1 line Fix a wrong printf format. ........ r46835 | thomas.heller | 2006-06-10 23:17:58 +0200 (Sat, 10 Jun 2006) | 1 line Fix the second occurrence of the problematic printf format. ........ r46837 | thomas.heller | 2006-06-10 23:56:03 +0200 (Sat, 10 Jun 2006) | 1 line Don't use C++ comment. ........ r46838 | thomas.heller | 2006-06-11 00:01:50 +0200 (Sun, 11 Jun 2006) | 1 line Handle failure of PyMem_Realloc. ........ r46839 | skip.montanaro | 2006-06-11 00:38:13 +0200 (Sun, 11 Jun 2006) | 2 lines Suppress warning on MacOSX about possible use before set of proc. ........ r46840 | tim.peters | 2006-06-11 00:51:45 +0200 (Sun, 11 Jun 2006) | 8 lines shuffle() doscstring: Removed warning about sequence length versus generator period. While this was a real weakness of the older WH generator for lists with just a few dozen elements, and so could potentially bite the naive ;-), the Twister should show excellent behavior up to at least 600 elements. Module docstring: reflowed some jarringly short lines. ........ r46844 | greg.ward | 2006-06-11 02:40:49 +0200 (Sun, 11 Jun 2006) | 4 lines Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately, i.e. do *not* expand tabs, but treat them as whitespace that is not equivalent to spaces. Add a couple of test cases. Clarify docs. ........ r46850 | neal.norwitz | 2006-06-11 07:44:18 +0200 (Sun, 11 Jun 2006) | 5 lines Fix Coverity # 146. newDBSequenceObject would deref dbobj, so it can't be NULL. We know it's not NULL from the ParseTuple and DbObject_Check will verify it's not NULL. ........ r46851 | neal.norwitz | 2006-06-11 07:45:25 +0200 (Sun, 11 Jun 2006) | 4 lines Wrap some long lines Top/Bottom factor out some common expressions Add a XXX comment about widing offset. ........ r46852 | neal.norwitz | 2006-06-11 07:45:47 +0200 (Sun, 11 Jun 2006) | 1 line Add versionadded to doc ........ r46853 | neal.norwitz | 2006-06-11 07:47:14 +0200 (Sun, 11 Jun 2006) | 3 lines Update doc to make it agree with code. Bottom factor out some common code. ........ r46854 | neal.norwitz | 2006-06-11 07:48:14 +0200 (Sun, 11 Jun 2006) | 3 lines f_code can't be NULL based on Frame_New and other code that derefs it. So there doesn't seem to be much point to checking here. ........ r46855 | neal.norwitz | 2006-06-11 09:26:27 +0200 (Sun, 11 Jun 2006) | 1 line Fix errors found by pychecker ........ r46856 | neal.norwitz | 2006-06-11 09:26:50 +0200 (Sun, 11 Jun 2006) | 1 line warnings was imported at module scope, no need to import again ........ r46857 | neal.norwitz | 2006-06-11 09:27:56 +0200 (Sun, 11 Jun 2006) | 5 lines Fix errors found by pychecker. I think these changes are correct, but I'm not sure. Could someone who knows how this module works test it? It can at least start on the cmd line. ........ r46858 | neal.norwitz | 2006-06-11 10:35:14 +0200 (Sun, 11 Jun 2006) | 1 line Fix errors found by pychecker ........ r46859 | ronald.oussoren | 2006-06-11 16:33:36 +0200 (Sun, 11 Jun 2006) | 4 lines This patch improves the L&F of IDLE on OSX. The changes are conditionalized on being in an IDLE.app bundle on darwin. This does a slight reorganisation of the menus and adds support for file-open events. ........ r46860 | greg.ward | 2006-06-11 16:42:41 +0200 (Sun, 11 Jun 2006) | 1 line SF #1366250: optparse docs: fix inconsistency in variable name; minor tweaks. ........ r46861 | greg.ward | 2006-06-11 18:24:11 +0200 (Sun, 11 Jun 2006) | 3 lines Bug #1498146: fix optparse to handle Unicode strings in option help, description, and epilog. ........ r46862 | thomas.heller | 2006-06-11 19:04:22 +0200 (Sun, 11 Jun 2006) | 2 lines Release the GIL during COM method calls, to avoid deadlocks in Python coded COM objects. ........ r46863 | tim.peters | 2006-06-11 21:42:51 +0200 (Sun, 11 Jun 2006) | 2 lines Whitespace normalization. ........ r46864 | tim.peters | 2006-06-11 21:43:49 +0200 (Sun, 11 Jun 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46865 | ronald.oussoren | 2006-06-11 21:45:57 +0200 (Sun, 11 Jun 2006) | 2 lines Remove message about using make frameworkinstall, that's no longer necesssary ........ r46866 | ronald.oussoren | 2006-06-11 22:23:29 +0200 (Sun, 11 Jun 2006) | 2 lines Use configure to substitute the correct prefix instead of hardcoding ........ r46867 | ronald.oussoren | 2006-06-11 22:24:45 +0200 (Sun, 11 Jun 2006) | 4 lines - Change fixapplepython23.py to ensure that it will run with /usr/bin/python on intel macs. - Fix some minor problems in the installer for OSX ........ r46868 | neal.norwitz | 2006-06-11 22:25:56 +0200 (Sun, 11 Jun 2006) | 5 lines Try to fix several networking tests. The problem is that if hosts have a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots. ........ r46869 | neal.norwitz | 2006-06-11 22:42:02 +0200 (Sun, 11 Jun 2006) | 7 lines Try to fix another networking test. The problem is that if hosts have a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots. Also add more info to failure message to aid debugging test failure. ........ r46870 | neal.norwitz | 2006-06-11 22:46:46 +0200 (Sun, 11 Jun 2006) | 4 lines Fix test on PPC64 buildbot. It raised an IOError (really an URLError which derives from an IOError). That seems valid. Env Error includes both OSError and IOError, so this seems like a reasonable fix. ........ r46871 | tim.peters | 2006-06-11 22:52:59 +0200 (Sun, 11 Jun 2006) | 10 lines compare_generic_iter(): Fixed the failure of test_wsgiref's testFileWrapper when running with -O. test_simple_validation_error still fails under -O. That appears to be because wsgiref's validate.py uses `assert` statements all over the place to check arguments for sanity. That should all be changed (it's not a logical error in the software if a user passes bogus arguments, so this isn't a reasonable use for `assert` -- checking external preconditions should generally raise ValueError or TypeError instead, as appropriate). ........ r46872 | neal.norwitz | 2006-06-11 23:38:38 +0200 (Sun, 11 Jun 2006) | 1 line Get test to pass on S/390. Shout if you think this change is incorrect. ........ r46873 | neal.norwitz | 2006-06-12 04:05:55 +0200 (Mon, 12 Jun 2006) | 1 line Cleanup Py_ssize_t a little (get rid of second #ifdef) ........ r46874 | neal.norwitz | 2006-06-12 04:06:17 +0200 (Mon, 12 Jun 2006) | 1 line Fix some Py_ssize_t issues ........ r46875 | neal.norwitz | 2006-06-12 04:06:42 +0200 (Mon, 12 Jun 2006) | 1 line Fix some Py_ssize_t issues ........ r46876 | neal.norwitz | 2006-06-12 04:07:24 +0200 (Mon, 12 Jun 2006) | 2 lines Cleanup: Remove import of types to get StringTypes, we can just use basestring. ........ r46877 | neal.norwitz | 2006-06-12 04:07:57 +0200 (Mon, 12 Jun 2006) | 1 line Don't truncate if size_t is bigger than uint ........ r46878 | neal.norwitz | 2006-06-12 04:08:41 +0200 (Mon, 12 Jun 2006) | 1 line Don't leak the list object if there's an error allocating the item storage. Backport candidate ........ r46879 | neal.norwitz | 2006-06-12 04:09:03 +0200 (Mon, 12 Jun 2006) | 1 line Fix typo. Backport if anyone cares. :-) ........ r46880 | neal.norwitz | 2006-06-12 04:09:34 +0200 (Mon, 12 Jun 2006) | 1 line Fix indentation of case and a Py_ssize_t issue. ........ r46881 | neal.norwitz | 2006-06-12 04:11:18 +0200 (Mon, 12 Jun 2006) | 3 lines Get rid of f_restricted too. Doc the other 4 ints that were already removed at the NeedForSpeed sprint. ........ r46882 | neal.norwitz | 2006-06-12 04:13:21 +0200 (Mon, 12 Jun 2006) | 1 line Fix the socket tests so they can be run concurrently. Backport candidate ........ r46883 | neal.norwitz | 2006-06-12 04:16:10 +0200 (Mon, 12 Jun 2006) | 1 line i and j are initialized below when used. No need to do it twice ........ r46884 | neal.norwitz | 2006-06-12 05:05:03 +0200 (Mon, 12 Jun 2006) | 1 line Remove unused import ........ r46885 | neal.norwitz | 2006-06-12 05:05:40 +0200 (Mon, 12 Jun 2006) | 1 line Impl ssize_t ........ r46886 | neal.norwitz | 2006-06-12 05:33:09 +0200 (Mon, 12 Jun 2006) | 6 lines Patch #1503046, Conditional compilation of zlib.(de)compressobj.copy copy is only in newer versions of zlib. This should allow zlibmodule to work with older versions like the Tru64 buildbot. ........ r46887 | phillip.eby | 2006-06-12 06:04:32 +0200 (Mon, 12 Jun 2006) | 2 lines Sync w/external release 0.1.2. Please see PEP 360 before making changes to external packages. ........ r46888 | martin.v.loewis | 2006-06-12 06:26:31 +0200 (Mon, 12 Jun 2006) | 2 lines Get rid of function pointer cast. ........ r46889 | thomas.heller | 2006-06-12 08:05:57 +0200 (Mon, 12 Jun 2006) | 3 lines I don't know how that happend, but the entire file contents was duplicated. Thanks to Simon Percivall for the heads up. ........ r46890 | nick.coghlan | 2006-06-12 10:19:37 +0200 (Mon, 12 Jun 2006) | 1 line Fix site module docstring to match the code ........ r46891 | nick.coghlan | 2006-06-12 10:23:02 +0200 (Mon, 12 Jun 2006) | 1 line Fix site module docstring to match the code for Mac OSX, too ........ r46892 | nick.coghlan | 2006-06-12 10:27:13 +0200 (Mon, 12 Jun 2006) | 1 line The site module documentation also described the Windows behaviour incorrectly. ........ r46893 | nick.coghlan | 2006-06-12 12:17:11 +0200 (Mon, 12 Jun 2006) | 1 line Make the -m switch conform to the documentation of sys.path by behaving like the -c switch ........ r46894 | kristjan.jonsson | 2006-06-12 17:45:12 +0200 (Mon, 12 Jun 2006) | 2 lines Fix the CRT argument error handling for VisualStudio .NET 2005. Install a CRT error handler and disable the assertion for debug builds. This causes CRT to set errno to EINVAL. This update fixes crash cases in the test suite where the default CRT error handler would cause process exit. ........ r46899 | thomas.heller | 2006-06-12 22:56:48 +0200 (Mon, 12 Jun 2006) | 1 line Add pep-291 compatibility markers. ........ r46901 | ka-ping.yee | 2006-06-13 01:47:52 +0200 (Tue, 13 Jun 2006) | 5 lines Add the uuid module. This module has been tested so far on Windows XP (Python 2.4 and 2.5a2), Mac OS X (Python 2.3, 2.4, and 2.5a2), and Linux (Python 2.4 and 2.5a2). ........ r46902 | tim.peters | 2006-06-13 02:30:01 +0200 (Tue, 13 Jun 2006) | 2 lines Whitespace normalization. ........ r46903 | tim.peters | 2006-06-13 02:30:50 +0200 (Tue, 13 Jun 2006) | 2 lines Added missing svn:eol-style property to text files. ........ r46905 | tim.peters | 2006-06-13 05:30:07 +0200 (Tue, 13 Jun 2006) | 5 lines get_matching_blocks(): rewrote code & comments so they match; added more comments about why it's this way at all; and removed what looked like needless expense (sorting (i, j, k) triples directly should give exactly the same order as sorting (i, (i, j, k)) pairs). ........ r46906 | neal.norwitz | 2006-06-13 06:08:53 +0200 (Tue, 13 Jun 2006) | 1 line Don't fail if another process is listening on our port. ........ r46908 | neal.norwitz | 2006-06-13 10:28:19 +0200 (Tue, 13 Jun 2006) | 2 lines Initialize the type object so pychecker can't crash the interpreter. ........ r46909 | neal.norwitz | 2006-06-13 10:41:06 +0200 (Tue, 13 Jun 2006) | 1 line Verify the crash due to EncodingMap not initialized does not return ........ r46910 | thomas.heller | 2006-06-13 10:56:14 +0200 (Tue, 13 Jun 2006) | 3 lines Add some windows datatypes that were missing from this file, and add the aliases defined in windows header files for the structures. ........ r46911 | thomas.heller | 2006-06-13 11:40:14 +0200 (Tue, 13 Jun 2006) | 3 lines Add back WCHAR, UINT, DOUBLE, _LARGE_INTEGER, _ULARGE_INTEGER. VARIANT_BOOL is a special _ctypes data type, not c_short. ........ r46912 | ronald.oussoren | 2006-06-13 13:19:56 +0200 (Tue, 13 Jun 2006) | 4 lines Linecache contains support for PEP302 loaders, but fails to deal with loaders that return None to indicate that the module is valid but no source is available. This patch fixes that. ........ r46913 | andrew.kuchling | 2006-06-13 13:57:04 +0200 (Tue, 13 Jun 2006) | 1 line Mention uuid module ........ r46915 | walter.doerwald | 2006-06-13 14:02:12 +0200 (Tue, 13 Jun 2006) | 2 lines Fix passing errors to the encoder and decoder functions. ........ r46917 | walter.doerwald | 2006-06-13 14:04:43 +0200 (Tue, 13 Jun 2006) | 3 lines errors is an attribute in the incremental decoder not an argument. ........ r46919 | andrew.macintyre | 2006-06-13 17:04:24 +0200 (Tue, 13 Jun 2006) | 11 lines Patch #1454481: Make thread stack size runtime tunable. Heavily revised, comprising revisions: 46640 - original trunk revision (backed out in r46655) 46647 - markup fix (backed out in r46655) 46692:46918 merged from branch aimacintyre-sf1454481 branch tested on buildbots (Windows buildbots had problems not related to these changes). ........ r46920 | brett.cannon | 2006-06-13 18:06:55 +0200 (Tue, 13 Jun 2006) | 2 lines Remove unused variable. ........ r46921 | andrew.kuchling | 2006-06-13 18:41:41 +0200 (Tue, 13 Jun 2006) | 1 line Add ability to set stack size ........ r46923 | marc-andre.lemburg | 2006-06-13 19:04:26 +0200 (Tue, 13 Jun 2006) | 2 lines Update pybench to version 2.0. ........ r46924 | marc-andre.lemburg | 2006-06-13 19:07:14 +0200 (Tue, 13 Jun 2006) | 2 lines Revert wrong svn copy. ........ r46925 | andrew.macintyre | 2006-06-13 19:14:36 +0200 (Tue, 13 Jun 2006) | 2 lines fix exception usage ........ r46927 | tim.peters | 2006-06-13 20:37:07 +0200 (Tue, 13 Jun 2006) | 2 lines Whitespace normalization. ........ r46928 | marc-andre.lemburg | 2006-06-13 20:56:56 +0200 (Tue, 13 Jun 2006) | 9 lines Updated to pybench 2.0. See svn.python.org/external/pybench-2.0 for the original import of that version. Note that platform.py was not copied over from pybench-2.0 since it is already part of Python 2.5. ........ r46929 | andrew.macintyre | 2006-06-13 21:02:35 +0200 (Tue, 13 Jun 2006) | 5 lines Increase the small thread stack size to get the test to pass reliably on the one buildbot that insists on more than 32kB of thread stack. ........ r46930 | marc-andre.lemburg | 2006-06-13 21:20:07 +0200 (Tue, 13 Jun 2006) | 2 lines Whitespace normalization. ........ r46931 | thomas.heller | 2006-06-13 22:18:43 +0200 (Tue, 13 Jun 2006) | 2 lines More docs for ctypes. ........ r46932 | brett.cannon | 2006-06-13 23:34:24 +0200 (Tue, 13 Jun 2006) | 2 lines Ignore .pyc and .pyo files in Pybench. ........ r46933 | brett.cannon | 2006-06-13 23:46:41 +0200 (Tue, 13 Jun 2006) | 7 lines If a classic class defined a __coerce__() method that just returned its two arguments in reverse, the interpreter would infinitely recourse trying to get a coercion that worked. So put in a recursion check after a coercion is made and the next call to attempt to use the coerced values. Fixes bug #992017 and closes crashers/coerce.py . ........ r46936 | gerhard.haering | 2006-06-14 00:24:47 +0200 (Wed, 14 Jun 2006) | 3 lines Merged changes from external pysqlite 2.3.0 release. Documentation updates will follow in a few hours at the latest. Then we should be ready for beta1. ........ r46937 | brett.cannon | 2006-06-14 00:26:13 +0200 (Wed, 14 Jun 2006) | 2 lines Missed test for rev. 46933; infinite recursion from __coerce__() returning its arguments reversed. ........ r46938 | gerhard.haering | 2006-06-14 00:53:48 +0200 (Wed, 14 Jun 2006) | 2 lines Updated documentation for pysqlite 2.3.0 API. ........ r46939 | tim.peters | 2006-06-14 06:09:25 +0200 (Wed, 14 Jun 2006) | 10 lines SequenceMatcher.get_matching_blocks(): This now guarantees that adjacent triples in the result list describe non-adjacent matching blocks. That's _nice_ to have, and Guido said he wanted it. Not a bugfix candidate: Guido or not ;-), this changes visible endcase semantics (note that some tests had to change), and nothing about this was documented before. Since it was working as designed, and behavior was consistent with the docs, it wasn't "a bug". ........ r46940 | tim.peters | 2006-06-14 06:13:00 +0200 (Wed, 14 Jun 2006) | 2 lines Repaired typo in new comment. ........ r46941 | tim.peters | 2006-06-14 06:15:27 +0200 (Wed, 14 Jun 2006) | 2 lines Whitespace normalization. ........ r46942 | fred.drake | 2006-06-14 06:25:02 +0200 (Wed, 14 Jun 2006) | 3 lines - make some disabled tests run what they intend when enabled - remove some over-zealous triple-quoting ........ r46943 | fred.drake | 2006-06-14 07:04:47 +0200 (Wed, 14 Jun 2006) | 3 lines add tests for two cases that are handled correctly in the current code, but that SF patch 1504676 as written mis-handles ........ r46944 | fred.drake | 2006-06-14 07:15:51 +0200 (Wed, 14 Jun 2006) | 1 line explain an XXX in more detail ........ r46945 | martin.v.loewis | 2006-06-14 07:21:04 +0200 (Wed, 14 Jun 2006) | 1 line Patch #1455898: Incremental mode for "mbcs" codec. ........ r46946 | georg.brandl | 2006-06-14 08:08:31 +0200 (Wed, 14 Jun 2006) | 3 lines Bug #1339007: Shelf objects now don't raise an exception in their __del__ method when initialization failed. ........ r46948 | thomas.heller | 2006-06-14 08:18:15 +0200 (Wed, 14 Jun 2006) | 1 line Fix docstring. ........ r46949 | georg.brandl | 2006-06-14 08:29:07 +0200 (Wed, 14 Jun 2006) | 2 lines Bug #1501122: mention __gt__ &co in description of comparison order. ........ r46951 | thomas.heller | 2006-06-14 09:08:38 +0200 (Wed, 14 Jun 2006) | 1 line Write more docs. ........ r46952 | georg.brandl | 2006-06-14 10:31:39 +0200 (Wed, 14 Jun 2006) | 3 lines Bug #1153163: describe __add__ vs __radd__ behavior when adding objects of same type/of subclasses of the other. ........ r46954 | georg.brandl | 2006-06-14 10:42:11 +0200 (Wed, 14 Jun 2006) | 3 lines Bug #1202018: add some common mime.types locations. ........ r46955 | georg.brandl | 2006-06-14 10:50:03 +0200 (Wed, 14 Jun 2006) | 3 lines Bug #1117556: SimpleHTTPServer now tries to find and use the system's mime.types file for determining MIME types. ........ r46957 | thomas.heller | 2006-06-14 11:09:08 +0200 (Wed, 14 Jun 2006) | 1 line Document paramflags. ........ r46958 | thomas.heller | 2006-06-14 11:20:11 +0200 (Wed, 14 Jun 2006) | 1 line Add an __all__ list, since this module does 'from ctypes import *'. ........ r46959 | andrew.kuchling | 2006-06-14 15:59:15 +0200 (Wed, 14 Jun 2006) | 1 line Add item ........ r46961 | georg.brandl | 2006-06-14 18:46:43 +0200 (Wed, 14 Jun 2006) | 3 lines Bug #805015: doc error in PyUnicode_FromEncodedObject. ........ r46962 | gerhard.haering | 2006-06-15 00:28:37 +0200 (Thu, 15 Jun 2006) | 10 lines - Added version checks in C code to make sure we don't trigger bugs in older SQLite versions. - Added version checks in test suite so that we don't execute tests that we know will fail with older (buggy) SQLite versions. Now, all tests should run against all SQLite versions from 3.0.8 until 3.3.6 (latest one now). The sqlite3 module can be built against all these SQLite versions and the sqlite3 module does its best to not trigger bugs in SQLite, but using SQLite 3.3.3 or later is recommended. ........ r46963 | tim.peters | 2006-06-15 00:38:13 +0200 (Thu, 15 Jun 2006) | 2 lines Whitespace normalization. ........ r46964 | neal.norwitz | 2006-06-15 06:54:29 +0200 (Thu, 15 Jun 2006) | 9 lines Speculative checkin (requires approval of Gerhard Haering) This backs out the test changes in 46962 which prevented crashes by not running the tests via a version check. All the version checks added in that rev were removed from the tests. Code was added to the error handler in connection.c that seems to work with older versions of sqlite including 3.1.3. ........ r46965 | neal.norwitz | 2006-06-15 07:55:49 +0200 (Thu, 15 Jun 2006) | 1 line Try to narrow window of failure on slow/busy boxes (ppc64 buildbot) ........ r46966 | martin.v.loewis | 2006-06-15 08:45:05 +0200 (Thu, 15 Jun 2006) | 2 lines Make import/lookup of mbcs fail on non-Windows systems. ........ r46967 | ronald.oussoren | 2006-06-15 10:14:18 +0200 (Thu, 15 Jun 2006) | 2 lines Patch #1446489 (zipfile: support for ZIP64) ........ r46968 | neal.norwitz | 2006-06-15 10:16:44 +0200 (Thu, 15 Jun 2006) | 6 lines Re-revert this change. Install the version check and don't run the test until Gerhard has time to fully debug the issue. This affects versions before 3.2.1 (possibly only versions earlier than 3.1.3). Based on discussion on python-checkins. ........ r46969 | gregory.p.smith | 2006-06-15 10:52:32 +0200 (Thu, 15 Jun 2006) | 6 lines - bsddb: multithreaded DB access using the simple bsddb module interface now works reliably. It has been updated to use automatic BerkeleyDB deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry database calls that would previously deadlock. [SF python bug #775414] ........ r46970 | gregory.p.smith | 2006-06-15 11:23:52 +0200 (Thu, 15 Jun 2006) | 2 lines minor documentation cleanup. mention the bsddb.db interface explicitly by name. ........ r46971 | neal.norwitz | 2006-06-15 11:57:03 +0200 (Thu, 15 Jun 2006) | 5 lines Steal the trick from test_compiler to print out a slow msg. This will hopefully get the buildbots to pass. Not sure this test will be feasible or even work. But everything is red now, so it can't get much worse. ........ r46972 | neal.norwitz | 2006-06-15 12:24:49 +0200 (Thu, 15 Jun 2006) | 1 line Print some more info to get an idea of how much longer the test will last ........ r46981 | tim.peters | 2006-06-15 20:04:40 +0200 (Thu, 15 Jun 2006) | 6 lines Try to reduce the extreme peak memory and disk-space use of this test. It probably still requires more disk space than most buildbots have, and in any case is still so intrusive that if we don't find another way to test this I'm taking my buildbot offline permanently ;-) ........ r46982 | tim.peters | 2006-06-15 20:06:29 +0200 (Thu, 15 Jun 2006) | 2 lines Whitespace normalization. ........ r46983 | tim.peters | 2006-06-15 20:07:28 +0200 (Thu, 15 Jun 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r46984 | tim.peters | 2006-06-15 20:38:19 +0200 (Thu, 15 Jun 2006) | 2 lines Oops -- I introduced an off-by-6436159488 error. ........ r46990 | neal.norwitz | 2006-06-16 06:30:34 +0200 (Fri, 16 Jun 2006) | 1 line Disable this test until we can determine what to do about it ........ r46991 | neal.norwitz | 2006-06-16 06:31:06 +0200 (Fri, 16 Jun 2006) | 1 line Param name is dir, not directory. Update docstring. Backport candidate ........ r46992 | neal.norwitz | 2006-06-16 06:31:28 +0200 (Fri, 16 Jun 2006) | 1 line Add missing period in comment. ........ r46993 | neal.norwitz | 2006-06-16 06:32:43 +0200 (Fri, 16 Jun 2006) | 1 line Fix whitespace, there are memory leaks in this module. ........ r46995 | fred.drake | 2006-06-17 01:45:06 +0200 (Sat, 17 Jun 2006) | 3 lines SF patch 1504676: Make sgmllib char and entity references pluggable (implementation/tests contributed by Sam Ruby) ........ r46996 | fred.drake | 2006-06-17 03:07:54 +0200 (Sat, 17 Jun 2006) | 1 line fix change that broke the htmllib tests ........ r46998 | martin.v.loewis | 2006-06-17 11:15:14 +0200 (Sat, 17 Jun 2006) | 3 lines Patch #763580: Add name and value arguments to Tkinter variable classes. ........ r46999 | martin.v.loewis | 2006-06-17 11:20:41 +0200 (Sat, 17 Jun 2006) | 2 lines Patch #1096231: Add default argument to wm_iconbitmap. ........ r47000 | martin.v.loewis | 2006-06-17 11:25:15 +0200 (Sat, 17 Jun 2006) | 2 lines Patch #1494750: Destroy master after deleting children. ........ r47003 | george.yoshida | 2006-06-17 18:31:52 +0200 (Sat, 17 Jun 2006) | 2 lines markup fix ........ r47005 | george.yoshida | 2006-06-17 18:39:13 +0200 (Sat, 17 Jun 2006) | 4 lines Update url. Old url returned status code:301 Moved permanently. ........ r47007 | martin.v.loewis | 2006-06-17 20:44:27 +0200 (Sat, 17 Jun 2006) | 2 lines Patch #812986: Update the canvas even if not tracing. ........ r47008 | martin.v.loewis | 2006-06-17 21:03:26 +0200 (Sat, 17 Jun 2006) | 2 lines Patch #815924: Restore ability to pass type= and icon= ........ r47009 | neal.norwitz | 2006-06-18 00:37:45 +0200 (Sun, 18 Jun 2006) | 1 line Fix typo in docstring ........ r47010 | neal.norwitz | 2006-06-18 00:38:15 +0200 (Sun, 18 Jun 2006) | 1 line Fix memory leak reported by valgrind while running test_subprocess ........ r47011 | fred.drake | 2006-06-18 04:57:35 +0200 (Sun, 18 Jun 2006) | 1 line remove unnecessary markup ........ r47013 | neal.norwitz | 2006-06-18 21:35:01 +0200 (Sun, 18 Jun 2006) | 7 lines Prevent spurious leaks when running regrtest.py -R. There may be more issues that crop up from time to time, but this change seems to have been pretty stable (no spurious warnings) for about a week. Other modules which use threads may require similar use of threading_setup/threading_cleanup from test_support. ........ r47014 | neal.norwitz | 2006-06-18 21:37:40 +0200 (Sun, 18 Jun 2006) | 9 lines The hppa ubuntu box sometimes hangs forever in these tests. My guess is that the wait is failing for some reason. Use WNOHANG, so we won't wait until the buildbot kills the test suite. I haven't been able to reproduce the failure, so I'm not sure if this will help or not. Hopefully, this change will cause the test to fail, rather than hang. That will be better since we will get the rest of the test results. It may also help us debug the real problem. ........ r47015 | neal.norwitz | 2006-06-18 22:10:24 +0200 (Sun, 18 Jun 2006) | 1 line Revert 47014 until it is more robust ........ r47016 | thomas.heller | 2006-06-18 23:27:04 +0200 (Sun, 18 Jun 2006) | 6 lines Fix typos. Fix doctest example. Mention in the tutorial that 'errcheck' is explained in the ref manual. Use better wording in some places. Remoce code examples that shouldn't be in the tutorial. Remove some XXX notices. ........ r47017 | georg.brandl | 2006-06-19 00:17:29 +0200 (Mon, 19 Jun 2006) | 3 lines Patch #1507676: improve exception messages in abstract.c, object.c and typeobject.c. ........ r47018 | neal.norwitz | 2006-06-19 07:40:44 +0200 (Mon, 19 Jun 2006) | 1 line Use Py_ssize_t ........ r47019 | georg.brandl | 2006-06-19 08:35:54 +0200 (Mon, 19 Jun 2006) | 3 lines Add news entry about error msg improvement. ........ r47020 | thomas.heller | 2006-06-19 09:07:49 +0200 (Mon, 19 Jun 2006) | 2 lines Try to repair the failing test on the OpenBSD buildbot. Trial and error... ........ r47021 | tim.peters | 2006-06-19 09:45:16 +0200 (Mon, 19 Jun 2006) | 2 lines Whitespace normalization. ........ r47022 | walter.doerwald | 2006-06-19 10:07:50 +0200 (Mon, 19 Jun 2006) | 4 lines Patch #1506645: add Python wrappers for the curses functions is_term_resized, resize_term and resizeterm. This uses three separate configure checks (one for each function). ........ r47023 | walter.doerwald | 2006-06-19 10:14:09 +0200 (Mon, 19 Jun 2006) | 2 lines Make check order match in configure and configure.in. ........ r47024 | tim.peters | 2006-06-19 10:14:28 +0200 (Mon, 19 Jun 2006) | 3 lines Repair KeyError when running test_threaded_import under -R, as reported by Neal on python-dev. ........ r47025 | thomas.heller | 2006-06-19 10:32:46 +0200 (Mon, 19 Jun 2006) | 3 lines Next try to fix the OpenBSD buildbot tests: Use ctypes.util.find_library to locate the C runtime library on platforms where is returns useful results. ........ r47026 | tim.peters | 2006-06-19 11:09:44 +0200 (Mon, 19 Jun 2006) | 13 lines TestHelp.make_parser(): This was making a permanent change to os.environ (setting envar COLUMNS), which at least caused test_float_default() to fail if the tests were run more than once. This repairs the test_optparse -R failures Neal reported on python-dev. It also explains some seemingly bizarre test_optparse failures we saw a couple weeks ago on the buildbots, when test_optparse failed due to test_file failing to clean up after itself, and then test_optparse failed in an entirely different way when regrtest's -w option ran test_optparse a second time. It's now obvious that make_parser() permanently changing os.environ was responsible for the second half of that. ........ r47027 | anthony.baxter | 2006-06-19 14:04:15 +0200 (Mon, 19 Jun 2006) | 2 lines Preparing for 2.5b1. ........ r47029 | fred.drake | 2006-06-19 19:31:16 +0200 (Mon, 19 Jun 2006) | 1 line remove non-working document formats from edist ........ r47030 | gerhard.haering | 2006-06-19 23:17:35 +0200 (Mon, 19 Jun 2006) | 5 lines Fixed a memory leak that was introduced with incorrect usage of the Python weak reference API in pysqlite 2.2.1. Bumbed pysqlite version number to upcoming pysqlite 2.3.1 release. ........ r47032 | ka-ping.yee | 2006-06-20 00:49:36 +0200 (Tue, 20 Jun 2006) | 2 lines Remove Python 2.3 compatibility comment. ........ r47033 | trent.mick | 2006-06-20 01:21:25 +0200 (Tue, 20 Jun 2006) | 2 lines Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338). ........ r47034 | trent.mick | 2006-06-20 01:57:41 +0200 (Tue, 20 Jun 2006) | 3 lines [ 1295808 ] expat symbols should be namespaced in pyexpat (http://python.org/sf/1295808) ........ r47039 | andrew.kuchling | 2006-06-20 13:52:16 +0200 (Tue, 20 Jun 2006) | 1 line Uncomment wsgiref section ........ r47040 | andrew.kuchling | 2006-06-20 14:15:09 +0200 (Tue, 20 Jun 2006) | 1 line Add four library items ........ r47041 | andrew.kuchling | 2006-06-20 14:19:54 +0200 (Tue, 20 Jun 2006) | 1 line Terminology and typography fixes ........ r47042 | andrew.kuchling | 2006-06-20 15:05:12 +0200 (Tue, 20 Jun 2006) | 1 line Add introductory paragraphs summarizing the release; minor edits ........ r47043 | andrew.kuchling | 2006-06-20 15:11:29 +0200 (Tue, 20 Jun 2006) | 1 line Minor edits and rearrangements; markup fix ........ r47044 | andrew.kuchling | 2006-06-20 15:20:30 +0200 (Tue, 20 Jun 2006) | 1 line [Bug #1504456] Mention xml -> xmlcore change ........ r47047 | brett.cannon | 2006-06-20 19:30:26 +0200 (Tue, 20 Jun 2006) | 2 lines Raise TestSkipped when the test socket connection is refused. ........ r47049 | brett.cannon | 2006-06-20 21:20:17 +0200 (Tue, 20 Jun 2006) | 2 lines Fix typo of exception name. ........ r47053 | brett.cannon | 2006-06-21 18:57:57 +0200 (Wed, 21 Jun 2006) | 5 lines At the C level, tuple arguments are passed in directly to the exception constructor, meaning it is treated as *args, not as a single argument. This means using the 'message' attribute won't work (until Py3K comes around), and so one must grab from 'arg' to get the error number. ........ r47054 | andrew.kuchling | 2006-06-21 19:10:18 +0200 (Wed, 21 Jun 2006) | 1 line Link to LibRef module documentation ........ r47055 | andrew.kuchling | 2006-06-21 19:17:10 +0200 (Wed, 21 Jun 2006) | 1 line Note some of Barry's work ........ r47056 | andrew.kuchling | 2006-06-21 19:17:28 +0200 (Wed, 21 Jun 2006) | 1 line Bump version ........ r47057 | georg.brandl | 2006-06-21 19:45:17 +0200 (Wed, 21 Jun 2006) | 3 lines fix [ 1509132 ] compiler module builds incorrect AST for TryExceptFinally ........ r47058 | georg.brandl | 2006-06-21 19:52:36 +0200 (Wed, 21 Jun 2006) | 3 lines Make test_fcntl aware of netbsd3. ........ r47059 | georg.brandl | 2006-06-21 19:53:17 +0200 (Wed, 21 Jun 2006) | 3 lines Patch #1509001: expected skips for netbsd3. ........ r47060 | gerhard.haering | 2006-06-21 22:55:04 +0200 (Wed, 21 Jun 2006) | 2 lines Removed call to enable_callback_tracebacks that slipped in by accident. ........ r47061 | armin.rigo | 2006-06-21 23:58:50 +0200 (Wed, 21 Jun 2006) | 13 lines Fix for an obscure bug introduced by revs 46806 and 46808, with a test. The problem of checking too eagerly for recursive calls is the following: if a RuntimeError is caused by recursion, and if code needs to normalize it immediately (as in the 2nd test), then PyErr_NormalizeException() needs a call to the RuntimeError class to instantiate it, and this hits the recursion limit again... causing PyErr_NormalizeException() to never finish. Moved this particular recursion check to slot_tp_call(), which is not involved in instantiating built-in exceptions. Backport candidate. ........ r47064 | neal.norwitz | 2006-06-22 08:30:50 +0200 (Thu, 22 Jun 2006) | 3 lines Copy the wsgiref package during make install. ........ r47065 | neal.norwitz | 2006-06-22 08:35:30 +0200 (Thu, 22 Jun 2006) | 1 line Reset the doc date to today for the automatic doc builds ........ r47067 | andrew.kuchling | 2006-06-22 15:10:23 +0200 (Thu, 22 Jun 2006) | 1 line Mention how to suppress warnings ........ r47069 | georg.brandl | 2006-06-22 16:46:17 +0200 (Thu, 22 Jun 2006) | 3 lines Set lineno correctly on list, tuple and dict literals. ........ r47070 | georg.brandl | 2006-06-22 16:46:46 +0200 (Thu, 22 Jun 2006) | 4 lines Test for correct compilation of try-except-finally stmt. Test for correct lineno on list, tuple, dict literals. ........ r47071 | fred.drake | 2006-06-22 17:50:08 +0200 (Thu, 22 Jun 2006) | 1 line fix markup nit ........ r47072 | brett.cannon | 2006-06-22 18:49:14 +0200 (Thu, 22 Jun 2006) | 6 lines 'warning's was improperly requiring that a command-line Warning category be both a subclass of Warning and a subclass of types.ClassType. The latter is no longer true thanks to new-style exceptions. Closes bug #1510580. Thanks to AMK for the test. ........ r47073 | ronald.oussoren | 2006-06-22 20:33:54 +0200 (Thu, 22 Jun 2006) | 3 lines MacOSX: Add a message to the first screen of the installer that tells users how to avoid updates to their shell profile. ........ r47074 | georg.brandl | 2006-06-22 21:02:18 +0200 (Thu, 22 Jun 2006) | 3 lines Fix my name ;) ........ r47075 | thomas.heller | 2006-06-22 21:07:36 +0200 (Thu, 22 Jun 2006) | 2 lines Small fixes, mostly in the markup. ........ r47076 | peter.astrand | 2006-06-22 22:06:46 +0200 (Thu, 22 Jun 2006) | 1 line Make it possible to run test_subprocess.py on Python 2.2, which lacks test_support.is_resource_enabled. ........ r47077 | peter.astrand | 2006-06-22 22:21:26 +0200 (Thu, 22 Jun 2006) | 1 line Applied patch #1506758: Prevent MemoryErrors with large MAXFD. ........ r47079 | neal.norwitz | 2006-06-23 05:32:44 +0200 (Fri, 23 Jun 2006) | 1 line Fix refleak ........ r47080 | fred.drake | 2006-06-23 08:03:45 +0200 (Fri, 23 Jun 2006) | 9 lines - SF bug #853506: IP6 address parsing in sgmllib ('[' and ']' were not accepted in unquoted attribute values) - cleaned up tests of character and entity reference decoding so the tests cover the documented relationships among handle_charref, handle_entityref, convert_charref, convert_codepoint, and convert_entityref, without bringing up Unicode issues that sgmllib cannot be involved in ........ r47085 | andrew.kuchling | 2006-06-23 21:23:40 +0200 (Fri, 23 Jun 2006) | 11 lines Fit Makefile for the Python doc environment better; this is a step toward including the howtos in the build process. * Put LaTeX output in ../paper-/. * Put HTML output in ../html/ * Explain some of the Makefile variables * Remove some cruft dating to my environment (e.g. the 'web' target) This makefile isn't currently invoked by the documentation build process, so these changes won't destabilize anything. ........ r47086 | hyeshik.chang | 2006-06-23 23:16:18 +0200 (Fri, 23 Jun 2006) | 5 lines Bug #1511381: codec_getstreamcodec() in codec.c is corrected to omit a default "error" argument for NULL pointer. This allows the parser to take a codec from cjkcodecs again. (Reported by Taewook Kang and reviewed by Walter Doerwald) ........ r47091 | ronald.oussoren | 2006-06-25 22:44:16 +0200 (Sun, 25 Jun 2006) | 6 lines Workaround for bug #1512124 Without this patch IDLE will get unresponsive when you open the debugger window on OSX. This is both using the system Tcl/Tk on Tiger as the latest universal download from tk-components.sf.net. ........ r47092 | ronald.oussoren | 2006-06-25 23:14:19 +0200 (Sun, 25 Jun 2006) | 3 lines Drop the calldll demo's for macos, calldll isn't present anymore, no need to keep the demo's around. ........ r47093 | ronald.oussoren | 2006-06-25 23:15:58 +0200 (Sun, 25 Jun 2006) | 3 lines Use a path without a double slash to compile the .py files after installation (macosx, binary installer). This fixes bug #1508369 for python 2.5. ........ r47094 | ronald.oussoren | 2006-06-25 23:19:06 +0200 (Sun, 25 Jun 2006) | 3 lines Also install the .egg-info files in Lib. This will cause wsgiref.egg-info to be installed. ........ r47097 | andrew.kuchling | 2006-06-26 14:40:02 +0200 (Mon, 26 Jun 2006) | 1 line [Bug #1511998] Various comments from Nick Coghlan; thanks! ........ r47098 | andrew.kuchling | 2006-06-26 14:43:43 +0200 (Mon, 26 Jun 2006) | 1 line Describe workaround for PyRange_New()'s removal ........ r47099 | andrew.kuchling | 2006-06-26 15:08:24 +0200 (Mon, 26 Jun 2006) | 5 lines [Bug #1512163] Fix typo. This change will probably break tests on FreeBSD buildbots, but I'll check in a fix for that next. ........ r47100 | andrew.kuchling | 2006-06-26 15:12:16 +0200 (Mon, 26 Jun 2006) | 9 lines [Bug #1512163] Use one set of locking methods, lockf(); remove the flock() calls. On FreeBSD, the two methods lockf() and flock() end up using the same mechanism and the second one fails. A Linux man page claims that the two methods are orthogonal (so locks acquired one way don't interact with locks acquired the other way) but that clearly must be false. ........ r47101 | andrew.kuchling | 2006-06-26 15:23:10 +0200 (Mon, 26 Jun 2006) | 5 lines Add a test for a conflicting lock. On slow machines, maybe the time intervals (2 sec, 0.5 sec) will be too tight. I'll see how the buildbots like it. ........ r47103 | andrew.kuchling | 2006-06-26 16:33:24 +0200 (Mon, 26 Jun 2006) | 1 line Windows doesn't have os.fork(). I'll just disable this test for now ........ r47106 | andrew.kuchling | 2006-06-26 19:00:35 +0200 (Mon, 26 Jun 2006) | 9 lines Attempt to fix build failure on OS X and Debian alpha; the symptom is consistent with os.wait() returning immediately because some other subprocess had previously exited; the test suite then immediately tries to lock the mailbox and gets an error saying it's already locked. To fix this, do a waitpid() so the test suite only continues once the intended child process has exited. ........ r47113 | neal.norwitz | 2006-06-27 06:06:46 +0200 (Tue, 27 Jun 2006) | 1 line Ignore some more warnings in the dynamic linker on an older gentoo ........ r47114 | neal.norwitz | 2006-06-27 06:09:13 +0200 (Tue, 27 Jun 2006) | 6 lines Instead of doing a make test, run the regression tests out of the installed copy. This will hopefully catch problems where directories are added under Lib/ but not to Makefile.pre.in. This breaks out the 2 runs of the test suite with and without -O which is also nicer. ........ r47115 | neal.norwitz | 2006-06-27 06:12:58 +0200 (Tue, 27 Jun 2006) | 5 lines Fix SF bug #1513032, 'make install' failure on FreeBSD 5.3. No need to install lib-old, it's empty in 2.5. ........ r47116 | neal.norwitz | 2006-06-27 06:23:06 +0200 (Tue, 27 Jun 2006) | 1 line Test unimportant change to verify buildbot does not try to build ........ r47117 | neal.norwitz | 2006-06-27 06:26:30 +0200 (Tue, 27 Jun 2006) | 1 line Try again: test unimportant change to verify buildbot does not try to build ........ r47118 | neal.norwitz | 2006-06-27 06:28:56 +0200 (Tue, 27 Jun 2006) | 1 line Verify buildbot picks up these changes (really needs testing after last change to Makefile.pre.in) ........ r47121 | vinay.sajip | 2006-06-27 09:34:37 +0200 (Tue, 27 Jun 2006) | 1 line Removed buggy exception handling in doRollover of rotating file handlers. Exceptions now propagate to caller. ........ r47123 | ronald.oussoren | 2006-06-27 12:08:25 +0200 (Tue, 27 Jun 2006) | 3 lines MacOSX: fix rather dumb buglet that made it impossible to create extensions on OSX 10.3 when using a binary distribution build on 10.4. ........ r47125 | tim.peters | 2006-06-27 13:52:49 +0200 (Tue, 27 Jun 2006) | 2 lines Whitespace normalization. ........ r47128 | ronald.oussoren | 2006-06-27 14:53:52 +0200 (Tue, 27 Jun 2006) | 8 lines Use staticly build copies of zlib and bzip2 to build the OSX installer, that way the resulting binaries have a better change of running on 10.3. This patch also updates the search logic for sleepycat db3/4, without this patch you cannot use a sleepycat build with a non-standard prefix; with this you can (at least on OSX) if you add the prefix to CPPFLAGS/LDFLAGS at configure-time. This change is needed to build the binary installer for OSX. ........ r47131 | ronald.oussoren | 2006-06-27 17:45:32 +0200 (Tue, 27 Jun 2006) | 5 lines macosx: Install a libpython2.5.a inside the framework as a symlink to the actual dylib at the root of the framework, that way tools that expect a unix-like install (python-config, but more importantly external products like mod_python) work correctly. ........ r47137 | neal.norwitz | 2006-06-28 07:03:22 +0200 (Wed, 28 Jun 2006) | 4 lines According to the man pages on Gentoo Linux and Tru64, EACCES or EAGAIN can be returned if fcntl (lockf) fails. This fixes the test failure on Tru64 by checking for either error rather than just EAGAIN. ........ r47139 | neal.norwitz | 2006-06-28 08:28:31 +0200 (Wed, 28 Jun 2006) | 5 lines Fix bug #1512695: cPickle.loads could crash if it was interrupted with a KeyboardInterrupt since PyTuple_Pack was passed a NULL. Will backport. ........ r47142 | nick.coghlan | 2006-06-28 12:41:47 +0200 (Wed, 28 Jun 2006) | 1 line Make full module name available as __module_name__ even when __name__ is set to something else (like '__main__') ........ r47143 | armin.rigo | 2006-06-28 12:49:51 +0200 (Wed, 28 Jun 2006) | 2 lines A couple of crashers of the "won't fix" kind. ........ r47147 | andrew.kuchling | 2006-06-28 16:25:20 +0200 (Wed, 28 Jun 2006) | 1 line [Bug #1508766] Add docs for uuid module; docs written by George Yoshida, with minor rearrangements by me. ........ r47148 | andrew.kuchling | 2006-06-28 16:27:21 +0200 (Wed, 28 Jun 2006) | 1 line [Bug #1508766] Add docs for uuid module; this puts the module in the 'Internet Protocols' section. Arguably this module could also have gone in the chapters on strings or encodings, maybe even the crypto chapter. Fred, please move if you see fit. ........ r47151 | georg.brandl | 2006-06-28 22:23:25 +0200 (Wed, 28 Jun 2006) | 3 lines Fix end_fill(). ........ r47153 | trent.mick | 2006-06-28 22:30:41 +0200 (Wed, 28 Jun 2006) | 2 lines Mention the expat upgrade and pyexpat fix I put in 2.5b1. ........ r47154 | fred.drake | 2006-06-29 02:51:53 +0200 (Thu, 29 Jun 2006) | 6 lines SF bug #1504333: sgmlib should allow angle brackets in quoted values (modified patch by Sam Ruby; changed to use separate REs for start and end tags to reduce matching cost for end tags; extended tests; updated to avoid breaking previous changes to support IPv6 addresses in unquoted attribute values) ........ r47156 | fred.drake | 2006-06-29 04:57:48 +0200 (Thu, 29 Jun 2006) | 1 line document recent bugfixes in sgmllib ........ r47158 | neal.norwitz | 2006-06-29 06:10:08 +0200 (Thu, 29 Jun 2006) | 10 lines Add new utility function, reap_children(), to test_support. This should be called at the end of each test that spawns children (perhaps it should be called from regrtest instead?). This will hopefully prevent some of the unexplained failures in the buildbots (hppa and alpha) during tests that spawn children. The problems were not reproducible. There were many zombies that remained at the end of several tests. In the worst case, this shouldn't cause any more problems, though it may not help either. Time will tell. ........ r47159 | neal.norwitz | 2006-06-29 07:48:14 +0200 (Thu, 29 Jun 2006) | 5 lines This should fix the buildbot failure on s/390 which can't connect to gmail.org. It makes the error message consistent and always sends to stderr. It would be much better for all the networking tests to hit only python.org. ........ r47161 | thomas.heller | 2006-06-29 20:34:15 +0200 (Thu, 29 Jun 2006) | 3 lines Protect the thread api calls in the _ctypes extension module within #ifdef WITH_THREADS/#endif blocks. Found by Sam Rushing. ........ r47162 | martin.v.loewis | 2006-06-29 20:58:44 +0200 (Thu, 29 Jun 2006) | 2 lines Patch #1509163: MS Toolkit Compiler no longer available ........ r47163 | skip.montanaro | 2006-06-29 21:20:09 +0200 (Thu, 29 Jun 2006) | 1 line add string methods to index ........ r47164 | vinay.sajip | 2006-06-30 02:13:08 +0200 (Fri, 30 Jun 2006) | 1 line Fixed bug in fileConfig() which failed to clear logging._handlerList ........ r47166 | tim.peters | 2006-06-30 08:18:39 +0200 (Fri, 30 Jun 2006) | 2 lines Whitespace normalization. ........ r47170 | neal.norwitz | 2006-06-30 09:32:16 +0200 (Fri, 30 Jun 2006) | 1 line Silence compiler warning ........ r47171 | neal.norwitz | 2006-06-30 09:32:46 +0200 (Fri, 30 Jun 2006) | 1 line Another problem reported by Coverity. Backport candidate. ........ r47175 | thomas.heller | 2006-06-30 19:44:54 +0200 (Fri, 30 Jun 2006) | 2 lines Revert the use of PY_FORMAT_SIZE_T in PyErr_Format. ........ r47176 | tim.peters | 2006-06-30 20:34:51 +0200 (Fri, 30 Jun 2006) | 2 lines Remove now-unused fidding with PY_FORMAT_SIZE_T. ........ r47177 | georg.brandl | 2006-06-30 20:47:56 +0200 (Fri, 30 Jun 2006) | 3 lines Document decorator usage of property. ........ r47181 | fred.drake | 2006-06-30 21:29:25 +0200 (Fri, 30 Jun 2006) | 4 lines - consistency nit: always include "()" in \function and \method (*should* be done by the presentation, but that requires changes all over) - avoid spreading the __name meme ........ r47188 | vinay.sajip | 2006-07-01 12:45:20 +0200 (Sat, 01 Jul 2006) | 1 line Added entry for fileConfig() bugfix. ........ r47189 | vinay.sajip | 2006-07-01 12:47:20 +0200 (Sat, 01 Jul 2006) | 1 line Added duplicate call to fileConfig() to ensure that it cleans up after itself correctly. ........ r47190 | martin.v.loewis | 2006-07-01 17:33:37 +0200 (Sat, 01 Jul 2006) | 2 lines Release all forwarded functions in .close. Fixes #1513223. ........ r47191 | fred.drake | 2006-07-01 18:28:20 +0200 (Sat, 01 Jul 2006) | 7 lines SF bug #1296433 (Expat bug #1515266): Unchecked calls to character data handler would cause a segfault. This merges in Expat's lib/xmlparse.c revisions 1.154 and 1.155, which fix this and a closely related problem (the later does not affect Python). Moved the crasher test to the tests for xml.parsers.expat. ........ r47197 | gerhard.haering | 2006-07-02 19:48:30 +0200 (Sun, 02 Jul 2006) | 4 lines The sqlite3 module did cut off data from the SQLite database at the first null character before sending it to a custom converter. This has been fixed now. ........ r47198 | martin.v.loewis | 2006-07-02 20:44:00 +0200 (Sun, 02 Jul 2006) | 1 line Correct arithmetic in access on Win32. Fixes #1513646. ........ r47203 | thomas.heller | 2006-07-03 09:58:09 +0200 (Mon, 03 Jul 2006) | 1 line Cleanup: Remove commented out code. ........ r47204 | thomas.heller | 2006-07-03 09:59:50 +0200 (Mon, 03 Jul 2006) | 1 line Don't run the doctests with Python 2.3 because it doesn't have the ELLIPSIS flag. ........ r47205 | thomas.heller | 2006-07-03 10:04:05 +0200 (Mon, 03 Jul 2006) | 7 lines Fixes so that _ctypes can be compiled with the MingW compiler. It seems that the definition of '__attribute__(x)' was responsible for the compiler ignoring the '__fastcall' attribute on the ffi_closure_SYSV function in libffi_msvc/ffi.c, took me quite some time to figure this out. ........ r47206 | thomas.heller | 2006-07-03 10:08:14 +0200 (Mon, 03 Jul 2006) | 11 lines Add a new function uses_seh() to the _ctypes extension module. This will return True if Windows Structured Exception handling (SEH) is used when calling functions, False otherwise. Currently, only MSVC supports SEH. Fix the test so that it doesn't crash when run with MingW compiled _ctypes. Note that two tests are still failing when mingw is used, I suspect structure layout differences and function calling conventions between MSVC and MingW. ........ r47207 | tim.peters | 2006-07-03 10:23:19 +0200 (Mon, 03 Jul 2006) | 2 lines Whitespace normalization. ........ r47208 | martin.v.loewis | 2006-07-03 11:44:00 +0200 (Mon, 03 Jul 2006) | 3 lines Only setup canvas when it is first created. Fixes #1514703 ........ r47209 | martin.v.loewis | 2006-07-03 12:05:30 +0200 (Mon, 03 Jul 2006) | 3 lines Reimplement turtle.circle using a polyline, to allow correct filling of arcs. Also fixes #1514693. ........ r47210 | martin.v.loewis | 2006-07-03 12:19:49 +0200 (Mon, 03 Jul 2006) | 3 lines Bug #1514693: Update turtle's heading when switching between degrees and radians. ........ r47211 | martin.v.loewis | 2006-07-03 13:12:06 +0200 (Mon, 03 Jul 2006) | 2 lines Document functions added in 2.3 and 2.5. ........ r47212 | martin.v.loewis | 2006-07-03 14:19:50 +0200 (Mon, 03 Jul 2006) | 3 lines Bug #1417699: Reject locale-specific decimal point in float() and atof(). ........ r47213 | martin.v.loewis | 2006-07-03 14:28:58 +0200 (Mon, 03 Jul 2006) | 3 lines Bug #1267547: Put proper recursive setup.py call into the spec file generated by bdist_rpm. ........ r47215 | martin.v.loewis | 2006-07-03 15:01:35 +0200 (Mon, 03 Jul 2006) | 3 lines Patch #825417: Fix timeout processing in expect, read_until. Will backport to 2.4. ........ r47218 | martin.v.loewis | 2006-07-03 15:47:40 +0200 (Mon, 03 Jul 2006) | 2 lines Put method-wrappers into trashcan. Fixes #927248. ........ r47219 | andrew.kuchling | 2006-07-03 16:07:30 +0200 (Mon, 03 Jul 2006) | 1 line [Bug #1515932] Clarify description of slice assignment ........ r47220 | andrew.kuchling | 2006-07-03 16:16:09 +0200 (Mon, 03 Jul 2006) | 4 lines [Bug #1511911] Clarify description of optional arguments to sorted() by improving the xref to the section on lists, and by copying the explanations of the arguments (with a slight modification). ........ r47223 | kristjan.jonsson | 2006-07-03 16:59:05 +0200 (Mon, 03 Jul 2006) | 1 line Fix build problems with the platform SDK on windows. It is not sufficient to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too. ........ r47224 | ronald.oussoren | 2006-07-04 14:30:22 +0200 (Tue, 04 Jul 2006) | 7 lines Sync the darwin/x86 port libffi with the copy in PyObjC. This fixes a number of bugs in that port. The most annoying ones were due to some subtle differences between the document ABI and the actual implementation :-( (there are no python unittests that fail without this patch, but without it some of libffi's unittests fail). ........ r47234 | georg.brandl | 2006-07-05 10:21:00 +0200 (Wed, 05 Jul 2006) | 3 lines Remove remaining references to OverflowWarning. ........ r47236 | thomas.heller | 2006-07-05 11:13:56 +0200 (Wed, 05 Jul 2006) | 3 lines Fix the bitfield test when _ctypes is compiled with MingW. Structures containing bitfields may have different layout on MSVC and MingW . ........ r47237 | thomas.wouters | 2006-07-05 13:03:49 +0200 (Wed, 05 Jul 2006) | 15 lines Fix bug in passing tuples to string.Template. All other values (with working str() or repr()) would work, just not multi-value tuples. Probably not a backport candidate, since it changes the behaviour of passing a single-element tuple: >>> string.Template("$foo").substitute(dict(foo=(1,))) '(1,)' versus '1' ........ r47241 | georg.brandl | 2006-07-05 16:18:45 +0200 (Wed, 05 Jul 2006) | 2 lines Patch #1517490: fix glitches in filter() docs. ........ r47244 | georg.brandl | 2006-07-05 17:50:05 +0200 (Wed, 05 Jul 2006) | 2 lines no need to elaborate "string". ........ r47251 | neal.norwitz | 2006-07-06 06:28:59 +0200 (Thu, 06 Jul 2006) | 3 lines Fix refleaks reported by Shane Hathaway in SF patch #1515361. This change contains only the changes related to leaking the copy variable. ........ r47253 | fred.drake | 2006-07-06 07:13:22 +0200 (Thu, 06 Jul 2006) | 4 lines - back out Expat change; the final fix to Expat will be different - change the pyexpat wrapper to not be so sensitive to this detail of the Expat implementation (the ex-crasher test still passes) ........ r47257 | neal.norwitz | 2006-07-06 08:45:08 +0200 (Thu, 06 Jul 2006) | 1 line Add a NEWS entry for a recent pyexpat fix ........ r47258 | martin.v.loewis | 2006-07-06 08:55:58 +0200 (Thu, 06 Jul 2006) | 2 lines Add sqlite3.dll to the DLLs component, not to the TkDLLs component. Fixes #1517388. ........ r47259 | martin.v.loewis | 2006-07-06 09:05:21 +0200 (Thu, 06 Jul 2006) | 1 line Properly quote compileall and Lib paths in case TARGETDIR has a space. ........ r47260 | thomas.heller | 2006-07-06 09:50:18 +0200 (Thu, 06 Jul 2006) | 5 lines Revert the change done in svn revision 47206: Add a new function uses_seh() to the _ctypes extension module. This will return True if Windows Structured Exception handling (SEH) is used when calling functions, False otherwise. ........ r47261 | armin.rigo | 2006-07-06 09:58:18 +0200 (Thu, 06 Jul 2006) | 3 lines A couple of examples about how to attack the fact that _PyType_Lookup() returns a borrowed ref. Many of the calls are open to attack. ........ r47262 | thomas.heller | 2006-07-06 10:28:14 +0200 (Thu, 06 Jul 2006) | 2 lines The test that calls a function with invalid arguments and catches the resulting Windows access violation will not be run by default. ........ r47263 | thomas.heller | 2006-07-06 10:48:35 +0200 (Thu, 06 Jul 2006) | 5 lines Patch #1517790: It is now possible to use custom objects in the ctypes foreign function argtypes sequence as long as they provide a from_param method, no longer is it required that the object is a ctypes type. ........ r47264 | thomas.heller | 2006-07-06 10:58:40 +0200 (Thu, 06 Jul 2006) | 2 lines Document the Struture and Union constructors. ........ r47265 | thomas.heller | 2006-07-06 11:11:22 +0200 (Thu, 06 Jul 2006) | 2 lines Document the changes in svn revision 47263, from patch #1517790. ........ r47267 | ronald.oussoren | 2006-07-06 12:13:35 +0200 (Thu, 06 Jul 2006) | 7 lines This patch solves the problem Skip was seeing with zlib, this patch ensures that configure uses similar compiler flags as setup.py when doing the zlib test. Without this patch configure would use the first shared library on the linker path, with this patch it uses the first shared or static library on that path just like setup.py. ........ r47268 | thomas.wouters | 2006-07-06 12:48:28 +0200 (Thu, 06 Jul 2006) | 4 lines NEWS entry for r47267: fixing configure's zlib probing. ........ r47269 | fredrik.lundh | 2006-07-06 14:29:24 +0200 (Thu, 06 Jul 2006) | 3 lines added XMLParser alias for cElementTree compatibility ........ r47271 | nick.coghlan | 2006-07-06 14:53:04 +0200 (Thu, 06 Jul 2006) | 1 line Revert the __module_name__ changes made in rev 47142. We'll revisit this in Python 2.6 ........ r47272 | nick.coghlan | 2006-07-06 15:04:56 +0200 (Thu, 06 Jul 2006) | 1 line Update the tutorial section on relative imports ........ r47273 | nick.coghlan | 2006-07-06 15:35:27 +0200 (Thu, 06 Jul 2006) | 1 line Ignore ImportWarning by default ........ r47274 | nick.coghlan | 2006-07-06 15:41:34 +0200 (Thu, 06 Jul 2006) | 1 line Cover ImportWarning, PendingDeprecationWarning and simplefilter() in the warnings module docs ........ r47275 | nick.coghlan | 2006-07-06 15:47:18 +0200 (Thu, 06 Jul 2006) | 1 line Add NEWS entries for the ImportWarning change and documentation update ........ r47276 | andrew.kuchling | 2006-07-06 15:57:28 +0200 (Thu, 06 Jul 2006) | 1 line ImportWarning is now silent by default ........ r47277 | thomas.heller | 2006-07-06 17:06:05 +0200 (Thu, 06 Jul 2006) | 2 lines Document the correct return type of PyLong_AsUnsignedLongLongMask. ........ r47278 | hyeshik.chang | 2006-07-06 17:21:52 +0200 (Thu, 06 Jul 2006) | 2 lines Add a testcase for r47086 which fixed a bug in codec_getstreamcodec(). ........ r47279 | hyeshik.chang | 2006-07-06 17:39:24 +0200 (Thu, 06 Jul 2006) | 3 lines Test using all CJK encodings for the testcases which don't require specific encodings. ........ r47280 | martin.v.loewis | 2006-07-06 21:28:03 +0200 (Thu, 06 Jul 2006) | 2 lines Properly generate logical file ids. Fixes #1515998. Also correct typo in Control.mapping. ........ r47287 | neal.norwitz | 2006-07-07 08:03:15 +0200 (Fri, 07 Jul 2006) | 17 lines Restore rev 47014: The hppa ubuntu box sometimes hangs forever in these tests. My guess is that the wait is failing for some reason. Use WNOHANG, so we won't wait until the buildbot kills the test suite. I haven't been able to reproduce the failure, so I'm not sure if this will help or not. Hopefully, this change will cause the test to fail, rather than hang. That will be better since we will get the rest of the test results. It may also help us debug the real problem. *** The reason this originally failed was because there were many zombie children outstanding before rev 47158 cleaned them up. There are still hangs in test_subprocess that need to be addressed, but that will take more work. This should close some holes. ........ r47289 | georg.brandl | 2006-07-07 10:15:12 +0200 (Fri, 07 Jul 2006) | 3 lines Fix RFC number. ........ r50489 | neal.norwitz | 2006-07-08 07:31:37 +0200 (Sat, 08 Jul 2006) | 1 line Fix SF bug #1519018: 'as' is now validated properly in import statements ........ r50490 | georg.brandl | 2006-07-08 14:15:27 +0200 (Sat, 08 Jul 2006) | 3 lines Add an additional test for bug #1519018. ........ r50491 | tim.peters | 2006-07-08 21:55:05 +0200 (Sat, 08 Jul 2006) | 2 lines Whitespace normalization. ........ r50493 | neil.schemenauer | 2006-07-09 18:16:34 +0200 (Sun, 09 Jul 2006) | 2 lines Fix AST compiler bug #1501934: incorrect LOAD/STORE_GLOBAL generation. ........ r50495 | neil.schemenauer | 2006-07-09 23:19:29 +0200 (Sun, 09 Jul 2006) | 2 lines Fix SF bug 1441486: bad unary minus folding in compiler. ........ r50497 | neal.norwitz | 2006-07-10 00:14:42 +0200 (Mon, 10 Jul 2006) | 4 lines On 64 bit systems, int literals that use less than 64 bits are now ints rather than longs. This also fixes the test for eval(-sys.maxint - 1). ........ r50500 | neal.norwitz | 2006-07-10 02:04:44 +0200 (Mon, 10 Jul 2006) | 4 lines Bug #1512814, Fix incorrect lineno's when code at module scope started after line 256. ........ r50501 | neal.norwitz | 2006-07-10 02:05:34 +0200 (Mon, 10 Jul 2006) | 1 line Fix doco. Backport candidate. ........ r50503 | neal.norwitz | 2006-07-10 02:23:17 +0200 (Mon, 10 Jul 2006) | 5 lines Part of SF patch #1484695. This removes dead code. The chksum was already verified in .frombuf() on the lines above. If there was a problem an exception is raised, so there was no way this condition could have been true. ........ r50504 | neal.norwitz | 2006-07-10 03:18:57 +0200 (Mon, 10 Jul 2006) | 3 lines Patch #1516912: improve Modules support for OpenVMS. ........ r50506 | neal.norwitz | 2006-07-10 04:36:41 +0200 (Mon, 10 Jul 2006) | 7 lines Patch #1504046: Add documentation for xml.etree. /F wrote the text docs, Englebert Gruber massaged it to latex and I did some more massaging to try and improve the consistency and fix some name mismatches between the declaration and text. ........ r50509 | martin.v.loewis | 2006-07-10 09:23:48 +0200 (Mon, 10 Jul 2006) | 2 lines Introduce DISTUTILS_USE_SDK as a flag to determine whether the SDK environment should be used. Fixes #1508010. ........ r50510 | martin.v.loewis | 2006-07-10 09:26:41 +0200 (Mon, 10 Jul 2006) | 1 line Change error message to indicate that VS2003 is necessary to build extension modules, not the .NET SDK. ........ r50511 | martin.v.loewis | 2006-07-10 09:29:41 +0200 (Mon, 10 Jul 2006) | 1 line Add svn:ignore. ........ r50512 | anthony.baxter | 2006-07-10 09:41:04 +0200 (Mon, 10 Jul 2006) | 1 line preparing for 2.5b2 ........ r50513 | thomas.heller | 2006-07-10 11:10:28 +0200 (Mon, 10 Jul 2006) | 2 lines Fix bug #1518190: accept any integer or long value in the ctypes.c_void_p constructor. ........ r50514 | thomas.heller | 2006-07-10 11:31:06 +0200 (Mon, 10 Jul 2006) | 3 lines Fixed a segfault when ctypes.wintypes were imported on non-Windows machines. ........ r50516 | thomas.heller | 2006-07-10 13:11:10 +0200 (Mon, 10 Jul 2006) | 3 lines Assigning None to pointer type structure fields possible overwrote wrong fields. ........ r50517 | thomas.heller | 2006-07-10 13:17:37 +0200 (Mon, 10 Jul 2006) | 5 lines Moved the ctypes news entries from the 'Library' section into the 'Extension Modules' section where they belong, probably. This destroyes the original order of the news entries, don't know if that is important or not. ........ r50526 | phillip.eby | 2006-07-10 21:03:29 +0200 (Mon, 10 Jul 2006) | 2 lines Fix SF#1516184 and add a test to prevent regression. ........ r50528 | phillip.eby | 2006-07-10 21:18:35 +0200 (Mon, 10 Jul 2006) | 2 lines Fix SF#1457312: bad socket error handling in distutils "upload" command. ........ r50537 | peter.astrand | 2006-07-10 22:39:49 +0200 (Mon, 10 Jul 2006) | 1 line Make it possible to run test_subprocess.py with Python 2.2, which lacks test_support.reap_children(). ........ r50541 | tim.peters | 2006-07-10 23:08:24 +0200 (Mon, 10 Jul 2006) | 5 lines After approval from Anthony, merge the tim-current_frames branch into the trunk. This adds a new sys._current_frames() function, which returns a dict mapping thread id to topmost thread stack frame. ........ r50542 | tim.peters | 2006-07-10 23:11:49 +0200 (Mon, 10 Jul 2006) | 2 lines Whitespace normalization. ........ r50553 | martin.v.loewis | 2006-07-11 00:11:28 +0200 (Tue, 11 Jul 2006) | 4 lines Patch #1519566: Remove unused _tofill member. Make begin_fill idempotent. Update demo2 to demonstrate filling of concave shapes. ........ r50567 | anthony.baxter | 2006-07-11 04:04:09 +0200 (Tue, 11 Jul 2006) | 4 lines #1494314: Fix a regression with high-numbered sockets in 2.4.3. This means that select() on sockets > FD_SETSIZE (typically 1024) work again. The patch makes sockets use poll() internally where available. ........ r50568 | tim.peters | 2006-07-11 04:17:48 +0200 (Tue, 11 Jul 2006) | 2 lines Whitespace normalization. ........ r50575 | thomas.heller | 2006-07-11 18:42:05 +0200 (Tue, 11 Jul 2006) | 1 line Add missing Py_DECREF. ........ r50576 | thomas.heller | 2006-07-11 18:44:25 +0200 (Tue, 11 Jul 2006) | 1 line Add missing Py_DECREFs. ........ r50579 | andrew.kuchling | 2006-07-11 19:20:16 +0200 (Tue, 11 Jul 2006) | 1 line Bump version number; add sys._current_frames ........ r50582 | thomas.heller | 2006-07-11 20:28:35 +0200 (Tue, 11 Jul 2006) | 3 lines When a foreign function is retrived by calling __getitem__ on a ctypes library instance, do not set it as attribute. ........ r50583 | thomas.heller | 2006-07-11 20:40:50 +0200 (Tue, 11 Jul 2006) | 2 lines Change the ctypes version number to 1.0.0. ........ r50597 | neal.norwitz | 2006-07-12 07:26:17 +0200 (Wed, 12 Jul 2006) | 3 lines Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again. ........ r50598 | neal.norwitz | 2006-07-12 07:26:35 +0200 (Wed, 12 Jul 2006) | 1 line Fix function name in error msg ........ r50599 | neal.norwitz | 2006-07-12 07:27:46 +0200 (Wed, 12 Jul 2006) | 4 lines Fix uninitialized memory read reported by Valgrind when running doctest. This could happen if size == 0. ........ r50600 | neal.norwitz | 2006-07-12 09:28:29 +0200 (Wed, 12 Jul 2006) | 1 line Actually change the MAGIC #. Create a new section for 2.5c1 and mention the impact of changing the MAGIC #. ........ r50601 | thomas.heller | 2006-07-12 10:43:47 +0200 (Wed, 12 Jul 2006) | 3 lines Fix #1467450: ctypes now uses RTLD_GLOBAL by default on OSX 10.3 to load shared libraries. ........ r50604 | thomas.heller | 2006-07-12 16:25:18 +0200 (Wed, 12 Jul 2006) | 3 lines Fix the wrong description of LibraryLoader.LoadLibrary, and document the DEFAULT_MODE constant. ........ r50607 | georg.brandl | 2006-07-12 17:31:17 +0200 (Wed, 12 Jul 2006) | 3 lines Accept long options "--help" and "--version". ........ r50617 | thomas.heller | 2006-07-13 11:53:47 +0200 (Thu, 13 Jul 2006) | 3 lines A misspelled preprocessor symbol caused ctypes to be always compiled without thread support. Replaced WITH_THREADS with WITH_THREAD. ........ r50619 | thomas.heller | 2006-07-13 19:01:14 +0200 (Thu, 13 Jul 2006) | 3 lines Fix #1521375. When running with root priviledges, 'gcc -o /dev/null' did overwrite /dev/null. Use a temporary file instead of /dev/null. ........ r50620 | thomas.heller | 2006-07-13 19:05:13 +0200 (Thu, 13 Jul 2006) | 2 lines Fix misleading words. ........ r50622 | andrew.kuchling | 2006-07-13 19:37:26 +0200 (Thu, 13 Jul 2006) | 1 line Typo fix ........ r50629 | georg.brandl | 2006-07-14 09:12:54 +0200 (Fri, 14 Jul 2006) | 3 lines Patch #1521874: grammar errors in doanddont.tex. ........ r50630 | neal.norwitz | 2006-07-14 09:20:04 +0200 (Fri, 14 Jul 2006) | 1 line Try to improve grammar further. ........ r50631 | martin.v.loewis | 2006-07-14 11:58:55 +0200 (Fri, 14 Jul 2006) | 1 line Extend build_ssl to Win64, using VSExtComp. ........ r50632 | martin.v.loewis | 2006-07-14 14:10:09 +0200 (Fri, 14 Jul 2006) | 1 line Add debug output to analyse buildbot failure. ........ r50633 | martin.v.loewis | 2006-07-14 14:31:05 +0200 (Fri, 14 Jul 2006) | 1 line Fix Debug build of _ssl. ........ r50636 | andrew.kuchling | 2006-07-14 15:32:38 +0200 (Fri, 14 Jul 2006) | 1 line Mention new options ........ r50638 | peter.astrand | 2006-07-14 16:04:45 +0200 (Fri, 14 Jul 2006) | 1 line Bug #1223937: CalledProcessError.errno -> CalledProcessError.returncode. ........ r50640 | thomas.heller | 2006-07-14 17:01:05 +0200 (Fri, 14 Jul 2006) | 4 lines Make the prototypes of our private PyUnicode_FromWideChar and PyUnicode_AsWideChar replacement functions compatible to the official functions by using Py_ssize_t instead of int. ........ r50643 | thomas.heller | 2006-07-14 19:51:14 +0200 (Fri, 14 Jul 2006) | 3 lines Patch #1521817: The index range checking on ctypes arrays containing exactly one element is enabled again. ........ r50647 | thomas.heller | 2006-07-14 20:22:50 +0200 (Fri, 14 Jul 2006) | 2 lines Updates for the ctypes documentation. ........ r50655 | fredrik.lundh | 2006-07-14 23:45:48 +0200 (Fri, 14 Jul 2006) | 3 lines typo ........ r50664 | george.yoshida | 2006-07-15 18:03:49 +0200 (Sat, 15 Jul 2006) | 2 lines Bug #15187702 : ext/win-cookbook.html has a broken link to distutils ........ r50667 | bob.ippolito | 2006-07-15 18:53:15 +0200 (Sat, 15 Jul 2006) | 1 line Patch #1220874: Update the binhex module for Mach-O. ........ r50671 | fred.drake | 2006-07-16 03:21:20 +0200 (Sun, 16 Jul 2006) | 1 line clean up some link markup ........ r50673 | neal.norwitz | 2006-07-16 03:50:38 +0200 (Sun, 16 Jul 2006) | 4 lines Bug #1512814, Fix incorrect lineno's when code within a function had more than 255 blank lines. Byte codes need to go first, line #s second. ........ r50674 | neal.norwitz | 2006-07-16 04:00:32 +0200 (Sun, 16 Jul 2006) | 5 lines a & b were dereffed above, so they are known to be valid pointers. z is known to be NULL, nothing to DECREF. Reported by Klockwork, #107. ........ r50675 | neal.norwitz | 2006-07-16 04:02:57 +0200 (Sun, 16 Jul 2006) | 5 lines self is dereffed (and passed as first arg), so it's known to be good. func is returned from PyArg_ParseTuple and also dereffed. Reported by Klocwork, #30 (self one at least). ........ r50676 | neal.norwitz | 2006-07-16 04:05:35 +0200 (Sun, 16 Jul 2006) | 4 lines proto was dereffed above and is known to be good. No need for X. Reported by Klocwork, #39. ........ r50677 | neal.norwitz | 2006-07-16 04:15:27 +0200 (Sun, 16 Jul 2006) | 5 lines Fix memory leaks in some conditions. Reported by Klocwork #152. ........ r50678 | neal.norwitz | 2006-07-16 04:17:36 +0200 (Sun, 16 Jul 2006) | 4 lines Fix memory leak under some conditions. Reported by Klocwork, #98. ........ r50679 | neal.norwitz | 2006-07-16 04:22:30 +0200 (Sun, 16 Jul 2006) | 8 lines Use sizeof(buffer) instead of duplicating the constants to ensure they won't be wrong. The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1 to strncat. strncat copies n+1 bytes from src (not dest). Reported by Klocwork #58. ........ r50680 | neal.norwitz | 2006-07-16 04:32:03 +0200 (Sun, 16 Jul 2006) | 5 lines Handle a NULL name properly. Reported by Klocwork #67 ........ r50681 | neal.norwitz | 2006-07-16 04:35:47 +0200 (Sun, 16 Jul 2006) | 6 lines PyFunction_SetDefaults() is documented as taking None or a tuple. A NULL would crash the PyTuple_Check(). Now make NULL return a SystemError. Reported by Klocwork #73. ........ r50683 | neal.norwitz | 2006-07-17 02:55:45 +0200 (Mon, 17 Jul 2006) | 5 lines Stop INCREFing name, then checking if it's NULL. name (f_name) should never be NULL so assert it. Fix one place where we could have passed NULL. Reported by Klocwork #66. ........ r50684 | neal.norwitz | 2006-07-17 02:57:15 +0200 (Mon, 17 Jul 2006) | 5 lines otherset is known to be non-NULL based on checks before and DECREF after. DECREF otherset rather than XDECREF in error conditions too. Reported by Klockwork #154. ........ r50685 | neal.norwitz | 2006-07-17 02:59:04 +0200 (Mon, 17 Jul 2006) | 7 lines Reported by Klocwork #151. v2 can be NULL if exception2 is NULL. I don't think that condition can happen, but I'm not sure it can't either. Now the code will protect against either being NULL. ........ r50686 | neal.norwitz | 2006-07-17 03:00:16 +0200 (Mon, 17 Jul 2006) | 1 line Add NEWS entry for a bunch of fixes due to warnings produced by Klocworks static analysis tool. ........ r50687 | fred.drake | 2006-07-17 07:47:52 +0200 (Mon, 17 Jul 2006) | 3 lines document xmlcore (still minimal; needs mention in each of the xml.* modules) SF bug #1504456 (partial) ........ r50688 | georg.brandl | 2006-07-17 15:23:46 +0200 (Mon, 17 Jul 2006) | 3 lines Remove usage of sets module (patch #1500609). ........ r50689 | georg.brandl | 2006-07-17 15:26:33 +0200 (Mon, 17 Jul 2006) | 3 lines Add missing NEWS item (#1522771) ........ r50690 | andrew.kuchling | 2006-07-17 18:47:54 +0200 (Mon, 17 Jul 2006) | 1 line Attribute more features ........ r50692 | kurt.kaiser | 2006-07-17 23:59:27 +0200 (Mon, 17 Jul 2006) | 8 lines Patch 1479219 - Tal Einat 1. 'as' highlighted as builtin in comment string on import line 2. Comments such as "#False identity" which start with a keyword immediately after the '#' character aren't colored as comments. 3. u or U beginning unicode string not correctly highlighted Closes bug 1325071 ........ r50693 | barry.warsaw | 2006-07-18 01:07:51 +0200 (Tue, 18 Jul 2006) | 16 lines decode_rfc2231(): Be more robust against buggy RFC 2231 encodings. Specifically, instead of raising a ValueError when there is a single tick in the parameter, simply return that the entire string unquoted, with None for both the charset and the language. Also, if there are more than 2 ticks in the parameter, interpret the first three parts as the standard RFC 2231 parts, then the rest of the parts as the encoded string. Test cases added. Original fewer-than-3-parts fix by Tokio Kikuchi. Resolves SF bug # 1218081. I will back port the fix and tests to Python 2.4 (email 3.0) and Python 2.3 (email 2.5). Also, bump the version number to email 4.0.1, removing the 'alpha' moniker. ........ r50695 | kurt.kaiser | 2006-07-18 06:03:16 +0200 (Tue, 18 Jul 2006) | 2 lines Rebinding Tab key was inserting 'tab' instead of 'Tab'. Bug 1179168. ........ r50696 | brett.cannon | 2006-07-18 06:41:36 +0200 (Tue, 18 Jul 2006) | 6 lines Fix bug #1520914. Starting in 2.4, time.strftime() began to check the bounds of values in the time tuple passed in. Unfortunately people came to rely on undocumented behaviour of setting unneeded values to 0, regardless of if it was within the valid range. Now those values force the value internally to the minimum value when 0 is passed in. ........ r50697 | facundo.batista | 2006-07-18 14:16:13 +0200 (Tue, 18 Jul 2006) | 1 line Comments and docs cleanups, and some little fixes, provided by Santiágo Peresón ........ r50704 | martin.v.loewis | 2006-07-18 19:46:31 +0200 (Tue, 18 Jul 2006) | 2 lines Patch #1524429: Use repr instead of backticks again. ........ r50706 | tim.peters | 2006-07-18 23:55:15 +0200 (Tue, 18 Jul 2006) | 2 lines Whitespace normalization. ........ r50708 | tim.peters | 2006-07-19 02:03:19 +0200 (Wed, 19 Jul 2006) | 18 lines SF bug 1524317: configure --without-threads fails to build Moved the code for _PyThread_CurrentFrames() up, so it's no longer in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in one). Changed test_sys's test_current_frames() so it passes with or without thread supported compiled in. Note that test_sys fails when Python is compiled without threads, but for an unrelated reason (the old test_exit() fails with an indirect ImportError on the `thread` module). There are also other unrelated compilation failures without threads, in extension modules (like ctypes); at least the core compiles again. Do we really support --without-threads? If so, there are several problems remaining. ........ r50713 | thomas.heller | 2006-07-19 11:09:32 +0200 (Wed, 19 Jul 2006) | 4 lines Make sure the _ctypes extension can be compiled when WITH_THREAD is not defined on Windows, even if that configuration is probably not supported at all. ........ r50715 | martin.v.loewis | 2006-07-19 19:18:32 +0200 (Wed, 19 Jul 2006) | 4 lines Revert r50706 (Whitespace normalization) and r50697: Comments and docs cleanups, and some little fixes per recommendation from Raymond Hettinger. ........ r50719 | phillip.eby | 2006-07-20 17:54:16 +0200 (Thu, 20 Jul 2006) | 4 lines Fix SF#1516184 (again) and add a test to prevent regression. (There was a problem with empty filenames still causing recursion) ........ r50720 | georg.brandl | 2006-07-20 18:28:39 +0200 (Thu, 20 Jul 2006) | 3 lines Guard for _active being None in __del__ method. ........ r50721 | vinay.sajip | 2006-07-20 18:28:39 +0200 (Thu, 20 Jul 2006) | 1 line Updated documentation for TimedRotatingFileHandler relating to how rollover files are named. The previous documentation was wrongly the same as for RotatingFileHandler. ........ r50731 | fred.drake | 2006-07-20 22:11:57 +0200 (Thu, 20 Jul 2006) | 1 line markup fix ........ r50739 | kurt.kaiser | 2006-07-21 00:22:52 +0200 (Fri, 21 Jul 2006) | 7 lines Avoid occasional failure to detect closing paren properly. Patch 1407280 Tal Einat M ParenMatch.py M NEWS.txt M CREDITS.txt ........ r50740 | vinay.sajip | 2006-07-21 01:20:12 +0200 (Fri, 21 Jul 2006) | 1 line Addressed SF#1524081 by using a dictionary to map level names to syslog priority names, rather than a string.lower(). ........ r50741 | neal.norwitz | 2006-07-21 07:29:58 +0200 (Fri, 21 Jul 2006) | 1 line Add some asserts that we got good params passed ........ r50742 | neal.norwitz | 2006-07-21 07:31:02 +0200 (Fri, 21 Jul 2006) | 5 lines Move the initialization of some pointers earlier. The problem is that if we call Py_DECREF(frame) like we do if allocating locals fails, frame_dealloc() will try to use these bogus values and crash. ........ r50743 | neal.norwitz | 2006-07-21 07:32:28 +0200 (Fri, 21 Jul 2006) | 4 lines Handle allocation failures gracefully. Found with failmalloc. Many (all?) of these could be backported. ........ r50745 | neal.norwitz | 2006-07-21 09:59:02 +0200 (Fri, 21 Jul 2006) | 1 line Speel initialise write. Tanks Anthony. ........ r50746 | neal.norwitz | 2006-07-21 09:59:47 +0200 (Fri, 21 Jul 2006) | 2 lines Handle more memory allocation failures without crashing. ........ r50754 | barry.warsaw | 2006-07-21 16:51:07 +0200 (Fri, 21 Jul 2006) | 23 lines More RFC 2231 improvements for the email 4.0 package. As Mark Sapiro rightly points out there are really two types of continued headers defined in this RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded parameters with the form "name*0="), but we were were handling them both the same way and that isn't correct. This patch should be much more RFC compliant in that only encoded params are %-decoded and the charset/language information is only extract if there are any encoded params in the segments. If there are no encoded params then the RFC says that there will be no charset/language parts. Note however that this will change the return value for Message.get_param() in some cases. For example, whereas before if you had all unencoded param continuations you would have still gotten a 3-tuple back from this method (with charset and language == None), you will now get just a string. I don't believe this is a backward incompatible change though because the documentation for this method already indicates that either return value is possible and that you must do an isinstance(val, tuple) check to discriminate between the two. (Yeah that API kind of sucks but we can't change /that/ without breaking code.) Test cases, some documentation updates, and a NEWS item accompany this patch. ........ r50759 | georg.brandl | 2006-07-21 19:36:31 +0200 (Fri, 21 Jul 2006) | 3 lines Fix check for empty list (vs. None). ........ r50771 | brett.cannon | 2006-07-22 00:44:07 +0200 (Sat, 22 Jul 2006) | 2 lines Remove an XXX marker in a comment. ........ r50773 | neal.norwitz | 2006-07-22 18:20:49 +0200 (Sat, 22 Jul 2006) | 1 line Fix more memory allocation issues found with failmalloc. ........ r50774 | neal.norwitz | 2006-07-22 19:00:57 +0200 (Sat, 22 Jul 2006) | 1 line Don't fail if the directory already exists ........ r50775 | greg.ward | 2006-07-23 04:25:53 +0200 (Sun, 23 Jul 2006) | 6 lines Be a lot smarter about whether this test passes: instead of assuming that a 2.93 sec audio file will always take 3.1 sec (as it did on the hardware I had when I first wrote the test), expect that it will take 2.93 sec +/- 10%, and only fail if it's outside of that range. Compute the expected ........ r50776 | kurt.kaiser | 2006-07-23 06:19:49 +0200 (Sun, 23 Jul 2006) | 2 lines Tooltips failed on new-syle class __init__ args. Bug 1027566 Loren Guthrie ........ r50777 | neal.norwitz | 2006-07-23 09:50:36 +0200 (Sun, 23 Jul 2006) | 1 line Handle more mem alloc issues found with failmalloc ........ r50778 | neal.norwitz | 2006-07-23 09:51:58 +0200 (Sun, 23 Jul 2006) | 5 lines If the for loop isn't entered, entryblock will be NULL. If passed to stackdepth_walk it will be dereffed. Not sure if I found with failmalloc or Klockwork #55. ........ r50779 | neal.norwitz | 2006-07-23 09:53:14 +0200 (Sun, 23 Jul 2006) | 4 lines Move the initialization of size_a down below the check for a being NULL. Reported by Klocwork #106 ........ r50780 | neal.norwitz | 2006-07-23 09:55:55 +0200 (Sun, 23 Jul 2006) | 9 lines Check the allocation of b_objects and return if there was a failure. Also fix a few memory leaks in other failure scenarios. It seems that if b_objects == Py_None, we will have an extra ref to b_objects. Add XXX comment so hopefully someone documents why the else isn't necessary or adds it in. Reported by Klocwork #20 ........ r50781 | neal.norwitz | 2006-07-23 09:57:11 +0200 (Sun, 23 Jul 2006) | 2 lines Fix memory leaks spotted by Klocwork #37. ........ r50782 | neal.norwitz | 2006-07-23 09:59:00 +0200 (Sun, 23 Jul 2006) | 5 lines nextlink can be NULL if teedataobject_new fails, so use XINCREF. Ensure that dataobj is never NULL. Reported by Klocwork #102 ........ r50783 | neal.norwitz | 2006-07-23 10:01:43 +0200 (Sun, 23 Jul 2006) | 8 lines Ensure we don't write beyond errText. I think I got this right, but it definitely could use some review to ensure I'm not off by one and there's no possible overflow/wrap-around of bytes_left. Reported by Klocwork #1. Fix a problem if there is a failure allocating self->db. Found with failmalloc. ........ r50784 | ronald.oussoren | 2006-07-23 11:41:09 +0200 (Sun, 23 Jul 2006) | 3 lines Without this patch CMD-W won't close EditorWindows on MacOS X. This solves part of bug #1517990. ........ r50785 | ronald.oussoren | 2006-07-23 11:46:11 +0200 (Sun, 23 Jul 2006) | 5 lines Fix for bug #1517996: Class and Path browsers show Tk menu This patch replaces the menubar that is used by AquaTk for windows without a menubar of their own by one that is more appropriate for IDLE. ........ r50786 | andrew.macintyre | 2006-07-23 14:57:02 +0200 (Sun, 23 Jul 2006) | 2 lines Build updates for OS/2 EMX port ........ r50787 | andrew.macintyre | 2006-07-23 15:00:04 +0200 (Sun, 23 Jul 2006) | 3 lines bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; will backport. ........ r50789 | andrew.macintyre | 2006-07-23 15:04:00 +0200 (Sun, 23 Jul 2006) | 2 lines Get mailbox module working on OS/2 EMX port. ........ r50791 | greg.ward | 2006-07-23 18:05:51 +0200 (Sun, 23 Jul 2006) | 1 line Resync optparse with Optik 1.5.3: minor tweaks for/to tests. ........ r50794 | martin.v.loewis | 2006-07-24 07:05:22 +0200 (Mon, 24 Jul 2006) | 2 lines Update list of unsupported systems. Fixes #1510853. ........ r50795 | martin.v.loewis | 2006-07-24 12:26:33 +0200 (Mon, 24 Jul 2006) | 1 line Patch #1448199: Release GIL around ConnectRegistry. ........ r50796 | martin.v.loewis | 2006-07-24 13:54:53 +0200 (Mon, 24 Jul 2006) | 3 lines Patch #1232023: Don't include empty path component from registry, so that the current directory does not get added to sys.path. Also fixes #1526785. ........ r50797 | martin.v.loewis | 2006-07-24 14:54:17 +0200 (Mon, 24 Jul 2006) | 3 lines Bug #1524310: Properly report errors from FindNextFile in os.listdir. Will backport to 2.4. ........ r50800 | georg.brandl | 2006-07-24 15:28:57 +0200 (Mon, 24 Jul 2006) | 7 lines Patch #1523356: fix determining include dirs in python-config. Also don't install "python-config" when doing altinstall, but always install "python-config2.x" and make a link to it like with the main executable. ........ r50802 | georg.brandl | 2006-07-24 15:46:47 +0200 (Mon, 24 Jul 2006) | 3 lines Patch #1527744: right order of includes in order to have HAVE_CONIO_H defined properly. ........ r50803 | georg.brandl | 2006-07-24 16:09:56 +0200 (Mon, 24 Jul 2006) | 3 lines Patch #1515343: Fix printing of deprecated string exceptions with a value in the traceback module. ........ r50804 | kurt.kaiser | 2006-07-24 19:13:23 +0200 (Mon, 24 Jul 2006) | 7 lines EditorWindow failed when used stand-alone if sys.ps1 not set. Bug 1010370 Dave Florek M EditorWindow.py M PyShell.py M NEWS.txt ........ r50805 | kurt.kaiser | 2006-07-24 20:05:51 +0200 (Mon, 24 Jul 2006) | 6 lines - EditorWindow.test() was failing. Bug 1417598 M EditorWindow.py M ScriptBinding.py M NEWS.txt ........ r50808 | georg.brandl | 2006-07-24 22:11:35 +0200 (Mon, 24 Jul 2006) | 3 lines Repair accidental NameError. ........ r50809 | tim.peters | 2006-07-24 23:02:15 +0200 (Mon, 24 Jul 2006) | 2 lines Whitespace normalization. ........ r50810 | greg.ward | 2006-07-25 04:11:12 +0200 (Tue, 25 Jul 2006) | 3 lines Don't use standard assert: want tests to fail even when run with -O. Delete cruft. ........ r50811 | tim.peters | 2006-07-25 06:07:22 +0200 (Tue, 25 Jul 2006) | 10 lines current_frames_with_threads(): There's actually no way to guess /which/ line the spawned thread is in at the time sys._current_frames() is called: we know it finished enter_g.set(), but can't know whether the instruction counter has advanced to the following leave_g.wait(). The latter is overwhelming most likely, but not guaranteed, and I see that the "x86 Ubuntu dapper (icc) trunk" buildbot found it on the other line once. Changed the test so it passes in either case. ........ r50815 | martin.v.loewis | 2006-07-25 11:53:12 +0200 (Tue, 25 Jul 2006) | 2 lines Bug #1525817: Don't truncate short lines in IDLE's tool tips. ........ r50816 | martin.v.loewis | 2006-07-25 12:05:47 +0200 (Tue, 25 Jul 2006) | 3 lines Bug #978833: Really close underlying socket in _socketobject.close. Will backport to 2.4. ........ r50817 | martin.v.loewis | 2006-07-25 12:11:14 +0200 (Tue, 25 Jul 2006) | 1 line Revert incomplete checkin. ........ r50819 | georg.brandl | 2006-07-25 12:22:34 +0200 (Tue, 25 Jul 2006) | 4 lines Patch #1525766: correctly pass onerror arg to recursive calls of pkg.walk_packages. Also improve the docstrings. ........ r50825 | brett.cannon | 2006-07-25 19:32:20 +0200 (Tue, 25 Jul 2006) | 2 lines Add comment for changes to test_ossaudiodev. ........ r50826 | brett.cannon | 2006-07-25 19:34:36 +0200 (Tue, 25 Jul 2006) | 3 lines Fix a bug in the messages for an assert failure where not enough arguments to a string were being converted in the format. ........ r50828 | armin.rigo | 2006-07-25 20:09:57 +0200 (Tue, 25 Jul 2006) | 2 lines Document why is and is not a good way to fix the gc_inspection crasher. ........ r50829 | armin.rigo | 2006-07-25 20:11:07 +0200 (Tue, 25 Jul 2006) | 5 lines Added another crasher, which hit me today (I was not intentionally writing such code, of course, but it took some gdb time to figure out what my bug was). ........ r50830 | armin.rigo | 2006-07-25 20:38:39 +0200 (Tue, 25 Jul 2006) | 3 lines Document the crashers that will not go away soon as "won't fix", and explain why. ........ r50831 | ronald.oussoren | 2006-07-25 21:13:35 +0200 (Tue, 25 Jul 2006) | 3 lines Install the compatibility symlink to libpython.a on OSX using 'ln -sf' instead of 'ln -s', this avoid problems when reinstalling python. ........ r50832 | ronald.oussoren | 2006-07-25 21:20:54 +0200 (Tue, 25 Jul 2006) | 7 lines Fix for bug #1525447 (renaming to MacOSmodule.c would also work, but not without causing problems for anyone that is on a case-insensitive filesystem). Setup.py tries to compile the MacOS extension from MacOSmodule.c, while the actual file is named macosmodule.c. This is no problem on the (default) case-insensitive filesystem, but doesn't work on case-sensitive filesystems. ........ r50833 | ronald.oussoren | 2006-07-25 22:28:55 +0200 (Tue, 25 Jul 2006) | 7 lines Fix bug #1517990: IDLE keybindings on OSX This adds a new key definition for OSX, which is slightly different from the classic mac definition. Also add NEWS item for a couple of bugfixes I added recently. ........ r50834 | tim.peters | 2006-07-26 00:30:24 +0200 (Wed, 26 Jul 2006) | 2 lines Whitespace normalization. ........ r50839 | neal.norwitz | 2006-07-26 06:00:18 +0200 (Wed, 26 Jul 2006) | 1 line Hmm, only python2.x is installed, not plain python. Did that change recently? ........ r50840 | barry.warsaw | 2006-07-26 07:54:46 +0200 (Wed, 26 Jul 2006) | 6 lines Forward port some fixes that were in email 2.5 but for some reason didn't make it into email 4.0. Specifically, in Message.get_content_charset(), handle RFC 2231 headers that contain an encoding not known to Python, or a character in the data that isn't in the charset encoding. Also forward port the appropriate unit tests. ........ r50841 | georg.brandl | 2006-07-26 09:23:32 +0200 (Wed, 26 Jul 2006) | 3 lines NEWS entry for #1525766. ........ r50842 | georg.brandl | 2006-07-26 09:40:17 +0200 (Wed, 26 Jul 2006) | 3 lines Bug #1459963: properly capitalize HTTP header names. ........ r50843 | georg.brandl | 2006-07-26 10:03:10 +0200 (Wed, 26 Jul 2006) | 6 lines Part of bug #1523610: fix miscalculation of buffer length. Also add a guard against NULL in converttuple and add a test case (that previously would have crashed). ........ r50844 | martin.v.loewis | 2006-07-26 14:12:56 +0200 (Wed, 26 Jul 2006) | 3 lines Bug #978833: Really close underlying socket in _socketobject.close. Fix httplib.HTTPConnection.getresponse to not close the socket if it is still needed for the response. ........ r50845 | andrew.kuchling | 2006-07-26 19:16:52 +0200 (Wed, 26 Jul 2006) | 1 line [Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment. ........ r50846 | andrew.kuchling | 2006-07-26 19:18:01 +0200 (Wed, 26 Jul 2006) | 1 line Correct error message ........ r50847 | andrew.kuchling | 2006-07-26 19:19:39 +0200 (Wed, 26 Jul 2006) | 1 line Minor grammar fix ........ r50848 | andrew.kuchling | 2006-07-26 19:22:21 +0200 (Wed, 26 Jul 2006) | 1 line Put news item in right section ........ r50850 | andrew.kuchling | 2006-07-26 20:03:12 +0200 (Wed, 26 Jul 2006) | 1 line Use sys.exc_info() ........ r50851 | andrew.kuchling | 2006-07-26 20:15:45 +0200 (Wed, 26 Jul 2006) | 1 line Use sys.exc_info() ........ r50852 | phillip.eby | 2006-07-26 21:48:27 +0200 (Wed, 26 Jul 2006) | 4 lines Allow the 'onerror' argument to walk_packages() to catch any Exception, not just ImportError. This allows documentation tools to better skip unimportable packages. ........ r50854 | tim.peters | 2006-07-27 01:23:15 +0200 (Thu, 27 Jul 2006) | 2 lines Whitespace normalization. ........ r50855 | tim.peters | 2006-07-27 03:14:53 +0200 (Thu, 27 Jul 2006) | 21 lines Bug #1521947: possible bug in mystrtol.c with recent gcc. In general, C doesn't define anything about what happens when an operation on a signed integral type overflows, and PyOS_strtol() did several formally undefined things of that nature on signed longs. Some version of gcc apparently tries to exploit that now, and PyOS_strtol() could fail to detect overflow then. Tried to repair all that, although it seems at least as likely to me that we'll get screwed by bad platform definitions for LONG_MIN and/or LONG_MAX now. For that reason, I don't recommend backporting this. Note that I have no box on which this makes a lick of difference -- can't really test it, except to note that it didn't break anything on my boxes. Silent change: PyOS_strtol() used to return the hard-coded 0x7fffffff in case of overflow. Now it returns LONG_MAX. They're the same only on 32-bit boxes (although C doesn't guarantee that either ...). ........ r50856 | neal.norwitz | 2006-07-27 05:51:58 +0200 (Thu, 27 Jul 2006) | 6 lines Don't kill a normal instance of python running on windows when checking to kill a cygwin instance. build\\python.exe was matching a normal windows instance. Prefix that with a \\ to ensure build is a directory and not PCbuild. As discussed on python-dev. ........ r50857 | neal.norwitz | 2006-07-27 05:55:39 +0200 (Thu, 27 Jul 2006) | 5 lines Closure can't be NULL at this point since we know it's a tuple. Reported by Klocwork # 74. ........ r50858 | neal.norwitz | 2006-07-27 06:04:50 +0200 (Thu, 27 Jul 2006) | 1 line No functional change. Add comment and assert to describe why there cannot be overflow which was reported by Klocwork. Discussed on python-dev ........ r50859 | martin.v.loewis | 2006-07-27 08:38:16 +0200 (Thu, 27 Jul 2006) | 3 lines Bump distutils version to 2.5, as several new features have been introduced since 2.4. ........ r50860 | andrew.kuchling | 2006-07-27 14:18:20 +0200 (Thu, 27 Jul 2006) | 1 line Reformat docstring; fix typo ........ r50861 | georg.brandl | 2006-07-27 17:05:36 +0200 (Thu, 27 Jul 2006) | 6 lines Add test_main() methods. These three tests were never run by regrtest.py. We really need a simpler testing framework. ........ r50862 | tim.peters | 2006-07-27 17:09:20 +0200 (Thu, 27 Jul 2006) | 2 lines News for patch #1529686. ........ r50863 | tim.peters | 2006-07-27 17:11:00 +0200 (Thu, 27 Jul 2006) | 2 lines Whitespace normalization. ........ r50864 | georg.brandl | 2006-07-27 17:38:33 +0200 (Thu, 27 Jul 2006) | 3 lines Amend news entry. ........ r50865 | georg.brandl | 2006-07-27 18:08:15 +0200 (Thu, 27 Jul 2006) | 3 lines Make uuid test suite pass on this box by requesting output with LC_ALL=C. ........ r50866 | andrew.kuchling | 2006-07-27 20:37:33 +0200 (Thu, 27 Jul 2006) | 1 line Add example ........ r50867 | thomas.heller | 2006-07-27 20:39:55 +0200 (Thu, 27 Jul 2006) | 9 lines Remove code that is no longer used (ctypes.com). Fix the DllGetClassObject and DllCanUnloadNow so that they forward the call to the comtypes.server.inprocserver module. The latter was never documented, never used by published code, and didn't work anyway, so I think it does not deserve a NEWS entry (but I might be wrong). ........ r50868 | andrew.kuchling | 2006-07-27 20:41:21 +0200 (Thu, 27 Jul 2006) | 1 line Typo fix ('publically' is rare, poss. non-standard) ........ r50869 | andrew.kuchling | 2006-07-27 20:42:41 +0200 (Thu, 27 Jul 2006) | 1 line Add missing word ........ r50870 | andrew.kuchling | 2006-07-27 20:44:10 +0200 (Thu, 27 Jul 2006) | 1 line Repair typos ........ r50872 | andrew.kuchling | 2006-07-27 20:53:33 +0200 (Thu, 27 Jul 2006) | 1 line Update URL; add example ........ r50873 | andrew.kuchling | 2006-07-27 21:07:29 +0200 (Thu, 27 Jul 2006) | 1 line Add punctuation mark; add some examples ........ r50874 | andrew.kuchling | 2006-07-27 21:11:07 +0200 (Thu, 27 Jul 2006) | 1 line Mention base64 module; rewrite last sentence to be more positive ........ r50875 | andrew.kuchling | 2006-07-27 21:12:49 +0200 (Thu, 27 Jul 2006) | 1 line If binhex is higher-level than binascii, it should come first in the chapter ........ r50876 | tim.peters | 2006-07-27 22:47:24 +0200 (Thu, 27 Jul 2006) | 28 lines check_node(): stop spraying mystery output to stderr. When a node number disagrees, keep track of all sources & the node numbers they reported, and stick all that in the error message. Changed all callers to supply a non-empty "source" argument; made the "source" argument non-optional. On my box, test_uuid still fails, but with the less confusing output: AssertionError: different sources disagree on node: from source 'getnode1', node was 00038a000015 from source 'getnode2', node was 00038a000015 from source 'ipconfig', node was 001111b2b7bf Only the last one appears to be correct; e.g., C:\Code\python\PCbuild>getmac Physical Address Transport Name =================== ========================================================== 00-11-11-B2-B7-BF \Device\Tcpip_{190FB163-5AFD-4483-86A1-2FE16AC61FF1} 62-A1-AC-6C-FD-BE \Device\Tcpip_{8F77DF5A-EA3D-4F1D-975E-D472CEE6438A} E2-1F-01-C6-5D-88 \Device\Tcpip_{CD18F76B-2EF3-409F-9B8A-6481EE70A1E4} I can't find anything on my box with MAC 00-03-8a-00-00-15, and am not clear on where that comes from. ........ r50878 | andrew.kuchling | 2006-07-28 00:40:05 +0200 (Fri, 28 Jul 2006) | 1 line Reword paragraph ........ r50879 | andrew.kuchling | 2006-07-28 00:49:38 +0200 (Fri, 28 Jul 2006) | 1 line Add example ........ r50880 | andrew.kuchling | 2006-07-28 00:49:54 +0200 (Fri, 28 Jul 2006) | 1 line Add example ........ r50881 | barry.warsaw | 2006-07-28 01:43:15 +0200 (Fri, 28 Jul 2006) | 27 lines Patch #1520294: Support for getset and member descriptors in types.py, inspect.py, and pydoc.py. Specifically, this allows for querying the type of an object against these built-in C types and more importantly, for getting their docstrings printed in the interactive interpreter's help() function. This patch includes a new built-in module called _types which provides definitions of getset and member descriptors for use by the types.py module. These types are exposed as types.GetSetDescriptorType and types.MemberDescriptorType. Query functions are provided as inspect.isgetsetdescriptor() and inspect.ismemberdescriptor(). The implementations of these are robust enough to work with Python implementations other than CPython, which may not have these fundamental types. The patch also includes documentation and test suite updates. I commit these changes now under these guiding principles: 1. Silence is assent. The release manager has not said "no", and of the few people that cared enough to respond to the thread, the worst vote was "0". 2. It's easier to ask for forgiveness than permission. 3. It's so dang easy to revert stuff in svn, that you could view this as a forcing function. :) Windows build patches will follow. ........ r50882 | tim.peters | 2006-07-28 01:44:37 +0200 (Fri, 28 Jul 2006) | 4 lines Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally lost that tests are sorted by name before being run. ``DocTestFinder`` has been changed to sort the list of tests it returns. ........ r50883 | tim.peters | 2006-07-28 01:45:48 +0200 (Fri, 28 Jul 2006) | 2 lines Whitespace normalization. ........ r50884 | tim.peters | 2006-07-28 01:46:36 +0200 (Fri, 28 Jul 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r50885 | barry.warsaw | 2006-07-28 01:50:40 +0200 (Fri, 28 Jul 2006) | 4 lines Enable the building of the _types module on Windows. Note that this has only been tested for VS 2003 since that's all I have. ........ r50887 | tim.peters | 2006-07-28 02:23:15 +0200 (Fri, 28 Jul 2006) | 7 lines defdict_reduce(): Plug leaks. We didn't notice these before because test_defaultdict didn't actually do anything before Georg fixed that earlier today. Neal's next refleak run then showed test_defaultdict leaking 9 references on each run. That's repaired by this checkin. ........ r50888 | tim.peters | 2006-07-28 02:30:00 +0200 (Fri, 28 Jul 2006) | 2 lines News about the repaired memory leak in defaultdict. ........ r50889 | gregory.p.smith | 2006-07-28 03:35:25 +0200 (Fri, 28 Jul 2006) | 7 lines - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename methods now allow their database parameter to be None as the sleepycat API allows. Also adds an appropriate test case for DBEnv.dbrename and dbremove. ........ r50895 | neal.norwitz | 2006-07-28 06:22:34 +0200 (Fri, 28 Jul 2006) | 1 line Ensure the actual number matches the expected count ........ r50896 | tim.peters | 2006-07-28 06:51:59 +0200 (Fri, 28 Jul 2006) | 6 lines Live with that "the hardware address" is an ill-defined concept, and that different ways of trying to find "the hardware address" may return different results. Certainly true on both of my Windows boxes, and in different ways (see whining on python-dev). ........ r50897 | neal.norwitz | 2006-07-28 09:21:27 +0200 (Fri, 28 Jul 2006) | 3 lines Try to find the MAC addr on various flavours of Unix. This seems hopeless. The reduces the test_uuid failures, but there's still another method failing. ........ r50898 | martin.v.loewis | 2006-07-28 09:45:49 +0200 (Fri, 28 Jul 2006) | 2 lines Add UUID for upcoming 2.5b3. ........ r50899 | matt.fleming | 2006-07-28 13:27:27 +0200 (Fri, 28 Jul 2006) | 3 lines Allow socketmodule to compile on NetBSD -current, whose bluetooth API differs from both Linux and FreeBSD. Accepted by Neal Norwitz. ........ r50900 | andrew.kuchling | 2006-07-28 14:07:12 +0200 (Fri, 28 Jul 2006) | 1 line [Patch #1529811] Correction to description of r|* mode ........ r50901 | andrew.kuchling | 2006-07-28 14:18:22 +0200 (Fri, 28 Jul 2006) | 1 line Typo fix ........ r50902 | andrew.kuchling | 2006-07-28 14:32:43 +0200 (Fri, 28 Jul 2006) | 1 line Add example ........ r50903 | andrew.kuchling | 2006-07-28 14:33:19 +0200 (Fri, 28 Jul 2006) | 1 line Add example ........ r50904 | andrew.kuchling | 2006-07-28 14:45:55 +0200 (Fri, 28 Jul 2006) | 1 line Don't overwrite built-in name; add some blank lines for readability ........ r50905 | andrew.kuchling | 2006-07-28 14:48:07 +0200 (Fri, 28 Jul 2006) | 1 line Add example. Should I propagate this example to all the other DBM-ish modules, too? ........ r50912 | georg.brandl | 2006-07-28 20:31:39 +0200 (Fri, 28 Jul 2006) | 3 lines Patch #1529686: also run test_email_codecs with regrtest.py. ........ r50913 | georg.brandl | 2006-07-28 20:36:01 +0200 (Fri, 28 Jul 2006) | 3 lines Fix spelling. ........ r50915 | thomas.heller | 2006-07-28 21:42:40 +0200 (Fri, 28 Jul 2006) | 3 lines Remove a useless XXX comment. Cosmetic changes to the code so that the #ifdef _UNICODE block doesn't mess emacs code formatting. ........ r50916 | phillip.eby | 2006-07-28 23:12:07 +0200 (Fri, 28 Jul 2006) | 5 lines Bug #1529871: The speed enhancement patch #921466 broke Python's compliance with PEP 302. This was fixed by adding an ``imp.NullImporter`` type that is used in ``sys.path_importer_cache`` to cache non-directory paths and avoid excessive filesystem operations during imports. ........ r50917 | phillip.eby | 2006-07-28 23:31:54 +0200 (Fri, 28 Jul 2006) | 2 lines Fix svn merge spew. ........ r50918 | thomas.heller | 2006-07-28 23:43:20 +0200 (Fri, 28 Jul 2006) | 4 lines Patch #1529514: More openbsd platforms for ctypes. Regenerated Modules/_ctypes/libffi/configure with autoconf 2.59. Approved by Neal. ........ r50922 | georg.brandl | 2006-07-29 10:51:21 +0200 (Sat, 29 Jul 2006) | 2 lines Bug #835255: The "closure" argument to new.function() is now documented. ........ r50924 | georg.brandl | 2006-07-29 11:33:26 +0200 (Sat, 29 Jul 2006) | 3 lines Bug #1441397: The compiler module now recognizes module and function docstrings correctly as it did in Python 2.4. ........ r50925 | georg.brandl | 2006-07-29 12:25:46 +0200 (Sat, 29 Jul 2006) | 4 lines Revert rev 42617, it was introduced to work around bug #1441397. test_compiler now passes again. ........ r50926 | fred.drake | 2006-07-29 15:22:49 +0200 (Sat, 29 Jul 2006) | 1 line update target version number ........ r50927 | andrew.kuchling | 2006-07-29 15:56:48 +0200 (Sat, 29 Jul 2006) | 1 line Add example ........ r50928 | andrew.kuchling | 2006-07-29 16:04:47 +0200 (Sat, 29 Jul 2006) | 1 line Update URL ........ r50930 | andrew.kuchling | 2006-07-29 16:08:15 +0200 (Sat, 29 Jul 2006) | 1 line Reword paragraph to match the order of the subsequent sections ........ r50931 | andrew.kuchling | 2006-07-29 16:21:15 +0200 (Sat, 29 Jul 2006) | 1 line [Bug #1529157] Mention raw_input() and input(); while I'm at it, reword the description a bit ........ r50932 | andrew.kuchling | 2006-07-29 16:42:48 +0200 (Sat, 29 Jul 2006) | 1 line [Bug #1519571] Document some missing functions: setup(), title(), done() ........ r50933 | andrew.kuchling | 2006-07-29 16:43:55 +0200 (Sat, 29 Jul 2006) | 1 line Fix docstring punctuation ........ r50934 | andrew.kuchling | 2006-07-29 17:10:32 +0200 (Sat, 29 Jul 2006) | 1 line [Bug #1414697] Change docstring of set/frozenset types to specify that the contents are unique. Raymond, please feel free to edit or revert. ........ r50935 | andrew.kuchling | 2006-07-29 17:35:21 +0200 (Sat, 29 Jul 2006) | 1 line [Bug #1530382] Document SSL.server(), .issuer() methods ........ r50936 | andrew.kuchling | 2006-07-29 17:42:46 +0200 (Sat, 29 Jul 2006) | 1 line Typo fix ........ r50937 | andrew.kuchling | 2006-07-29 17:43:13 +0200 (Sat, 29 Jul 2006) | 1 line Tweak wording ........ r50938 | matt.fleming | 2006-07-29 17:55:30 +0200 (Sat, 29 Jul 2006) | 2 lines Fix typo ........ r50939 | andrew.kuchling | 2006-07-29 17:57:08 +0200 (Sat, 29 Jul 2006) | 6 lines [Bug #1528258] Mention that the 'data' argument can be None. The constructor docs referred the reader to the add_data() method's docs, but they weren't very helpful. I've simply copied an earlier explanation of 'data' that's more useful. ........ r50940 | andrew.kuchling | 2006-07-29 18:08:40 +0200 (Sat, 29 Jul 2006) | 1 line Set bug/patch count. Take a bow, everyone! ........ r50941 | fred.drake | 2006-07-29 18:56:15 +0200 (Sat, 29 Jul 2006) | 18 lines expunge the xmlcore changes: 41667, 41668 - initial switch to xmlcore 47044 - mention of xmlcore in What's New 50687 - mention of xmlcore in the library reference re-apply xmlcore changes to xml: 41674 - line ending changes (re-applied manually), directory props 41677 - add cElementTree wrapper 41678 - PSF licensing for etree 41812 - whitespace normalization 42724 - fix svn:eol-style settings 43681, 43682 - remove Python version-compatibility cruft from minidom 46773 - fix encoding of \r\n\t in attr values in saxutils 47269 - added XMLParser alias for cElementTree compatibility additional tests were added in Lib/test/test_sax.py that failed with the xmlcore changes; these relate to SF bugs #1511497, #1513611 ........ r50942 | andrew.kuchling | 2006-07-29 20:14:07 +0200 (Sat, 29 Jul 2006) | 17 lines Reorganize the docs for 'file' and 'open()' after some discussion with Fred. We want to encourage users to write open() when opening a file, but open() was described with a single paragraph and 'file' had lots of explanation of the mode and bufsize arguments. I've shrunk the description of 'file' to cross-reference to the 'File objects' section, and to open() for an explanation of the arguments. open() now has all the paragraphs about the mode string. The bufsize argument was moved up so that it isn't buried at the end; now there's 1 paragraph on mode, 1 on bufsize, and then 3 more on mode. Various other edits and rearrangements were made in the process. It's probably best to read the final text and not to try to make sense of the diffs. ........ r50943 | fred.drake | 2006-07-29 20:19:19 +0200 (Sat, 29 Jul 2006) | 1 line restore test un-intentionally removed in the xmlcore purge (revision 50941) ........ r50944 | fred.drake | 2006-07-29 20:33:29 +0200 (Sat, 29 Jul 2006) | 3 lines make the reference to older versions of the documentation a link to the right page on python.org ........ r50945 | fred.drake | 2006-07-29 21:09:01 +0200 (Sat, 29 Jul 2006) | 1 line document the footnote usage pattern ........ r50947 | fred.drake | 2006-07-29 21:14:10 +0200 (Sat, 29 Jul 2006) | 1 line emphasize and oddball nuance of LaTeX comment syntax ........ r50948 | andrew.kuchling | 2006-07-29 21:24:04 +0200 (Sat, 29 Jul 2006) | 1 line [Patch #1490989 from Skip Montanaro] Mention debugging builds in the API documentation. I've changed Skip's patch to point to Misc/SpecialBuilds and fiddled with the markup a bit. ........ r50949 | neal.norwitz | 2006-07-29 21:29:35 +0200 (Sat, 29 Jul 2006) | 6 lines Disable these tests until they are reliable across platforms. These problems may mask more important, real problems. One or both methods are known to fail on: Solaris, OpenBSD, Debian, Ubuntu. They pass on Windows and some Linux boxes. ........ r50950 | andrew.kuchling | 2006-07-29 21:50:37 +0200 (Sat, 29 Jul 2006) | 1 line [Patch #1068277] Clarify that os.path.exists() can return False depending on permissions. Fred approved committing this patch in December 2004! ........ r50952 | fred.drake | 2006-07-29 22:04:42 +0200 (Sat, 29 Jul 2006) | 6 lines SF bug #1193966: Weakref types documentation misplaced The information about supporting weakrefs with types defined in C extensions is moved to the Extending & Embedding manual. Py_TPFLAGS_HAVE_WEAKREFS is no longer mentioned since it is part of Py_TPFLAGS_DEFAULT. ........ r50953 | skip.montanaro | 2006-07-29 22:06:05 +0200 (Sat, 29 Jul 2006) | 4 lines Add a comment to the csv reader documentation that explains why the treatment of newlines changed in 2.5. Pulled almost verbatim from a comment by Andrew McNamara in . ........ r50954 | neal.norwitz | 2006-07-29 22:20:52 +0200 (Sat, 29 Jul 2006) | 3 lines If the executable doesn't exist, there's no reason to try to start it. This prevents garbage about command not found being printed on Solaris. ........ r50955 | fred.drake | 2006-07-29 22:21:25 +0200 (Sat, 29 Jul 2006) | 1 line fix minor markup error that introduced extra punctuation ........ r50957 | neal.norwitz | 2006-07-29 22:37:08 +0200 (Sat, 29 Jul 2006) | 3 lines Disable test_getnode too, since this is also unreliable. ........ r50958 | andrew.kuchling | 2006-07-29 23:27:12 +0200 (Sat, 29 Jul 2006) | 1 line Follow TeX's conventions for hyphens ........ r50959 | andrew.kuchling | 2006-07-29 23:30:21 +0200 (Sat, 29 Jul 2006) | 1 line Fix case for 'Unix' ........ r50960 | fred.drake | 2006-07-30 01:34:57 +0200 (Sun, 30 Jul 2006) | 1 line markup cleanups ........ r50961 | andrew.kuchling | 2006-07-30 02:27:34 +0200 (Sun, 30 Jul 2006) | 1 line Minor typo fixes ........ r50962 | andrew.kuchling | 2006-07-30 02:37:56 +0200 (Sun, 30 Jul 2006) | 1 line [Bug #793553] Correct description of keyword arguments for SSL authentication ........ r50963 | tim.peters | 2006-07-30 02:58:15 +0200 (Sun, 30 Jul 2006) | 2 lines Whitespace normalization. ........ r50964 | fred.drake | 2006-07-30 05:03:43 +0200 (Sun, 30 Jul 2006) | 1 line lots of markup nits, most commonly Unix/unix --> \UNIX ........ r50965 | fred.drake | 2006-07-30 07:41:28 +0200 (Sun, 30 Jul 2006) | 1 line update information on wxPython, from Robin Dunn ........ r50966 | fred.drake | 2006-07-30 07:49:49 +0200 (Sun, 30 Jul 2006) | 4 lines remove possibly-outdated comment on what GUI toolkit is most commonly used; it is hard to know whether this is right, and it does not add valuable reference information at any rate ........ r50967 | fred.drake | 2006-07-30 07:55:39 +0200 (Sun, 30 Jul 2006) | 3 lines - remove yet another reference to how commonly Tkinter is (thought to be) used - fix an internal section reference ........ r50968 | neal.norwitz | 2006-07-30 08:53:31 +0200 (Sun, 30 Jul 2006) | 4 lines Patch #1531113: Fix augmented assignment with yield expressions. Also fix a SystemError when trying to assign to yield expressions. ........ r50969 | neal.norwitz | 2006-07-30 08:55:48 +0200 (Sun, 30 Jul 2006) | 5 lines Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn(). This provides the proper warning for struct.pack(). PyErr_Warn() is now deprecated in favor of PyErr_WarnEx(). As mentioned by Tim Peters on python-dev. ........ r50970 | neal.norwitz | 2006-07-30 08:57:04 +0200 (Sun, 30 Jul 2006) | 3 lines Bug #1515471: string.replace() accepts character buffers again. Pass the char* and size around rather than PyObject's. ........ r50971 | neal.norwitz | 2006-07-30 08:59:13 +0200 (Sun, 30 Jul 2006) | 1 line Whitespace normalization ........ r50973 | georg.brandl | 2006-07-30 12:53:32 +0200 (Sun, 30 Jul 2006) | 3 lines Clarify that __op__ methods must return NotImplemented if they don't support the operation. ........ r50974 | georg.brandl | 2006-07-30 13:07:23 +0200 (Sun, 30 Jul 2006) | 3 lines Bug #1002398: The documentation for os.path.sameopenfile now correctly refers to file descriptors, not file objects. ........ r50977 | martin.v.loewis | 2006-07-30 15:00:31 +0200 (Sun, 30 Jul 2006) | 3 lines Don't copy directory stat times in shutil.copytree on Windows Fixes #1525866. ........ r50978 | martin.v.loewis | 2006-07-30 15:14:05 +0200 (Sun, 30 Jul 2006) | 3 lines Base __version__ on sys.version_info, as distutils is no longer maintained separatedly. ........ r50979 | martin.v.loewis | 2006-07-30 15:27:31 +0200 (Sun, 30 Jul 2006) | 3 lines Mention Cygwin in distutils error message about a missing VS 2003. Fixes #1257728. ........ r50982 | martin.v.loewis | 2006-07-30 16:09:47 +0200 (Sun, 30 Jul 2006) | 5 lines Drop usage of test -e in configure as it is not portable. Fixes #1439538 Will backport to 2.4 Also regenerate pyconfig.h.in. ........ r50984 | georg.brandl | 2006-07-30 18:20:10 +0200 (Sun, 30 Jul 2006) | 3 lines Fix makefile changes for python-config. ........ r50985 | george.yoshida | 2006-07-30 18:37:37 +0200 (Sun, 30 Jul 2006) | 2 lines Rename struct.pack_to to struct.pack_into as changed in revision 46642. ........ r50986 | george.yoshida | 2006-07-30 18:41:30 +0200 (Sun, 30 Jul 2006) | 2 lines Typo fix ........ r50987 | neal.norwitz | 2006-07-30 21:18:13 +0200 (Sun, 30 Jul 2006) | 1 line Add some asserts and update comments ........ r50988 | neal.norwitz | 2006-07-30 21:18:38 +0200 (Sun, 30 Jul 2006) | 1 line Verify that the signal handlers were really called ........ r50989 | neal.norwitz | 2006-07-30 21:20:42 +0200 (Sun, 30 Jul 2006) | 3 lines Try to prevent hangs on Tru64/Alpha buildbot. I'm not certain this will help and may need to be reverted if it causes problems. ........ r50990 | georg.brandl | 2006-07-30 22:18:51 +0200 (Sun, 30 Jul 2006) | 2 lines Bug #1531349: right <-> left glitch in __rop__ description. ........ r50992 | tim.peters | 2006-07-31 03:46:03 +0200 (Mon, 31 Jul 2006) | 2 lines Whitespace normalization. ........ r50993 | andrew.mcnamara | 2006-07-31 04:27:48 +0200 (Mon, 31 Jul 2006) | 2 lines Redo the comment about the 2.5 change in quoted-newline handling. ........ r50994 | tim.peters | 2006-07-31 04:40:23 +0200 (Mon, 31 Jul 2006) | 10 lines ZipFile.close(): Killed one of the struct.pack deprecation warnings on Win32. Also added an XXX about the line: pos3 = self.fp.tell() `pos3` is never referenced, and I have no idea what the code intended to do instead. ........ r50996 | tim.peters | 2006-07-31 04:53:03 +0200 (Mon, 31 Jul 2006) | 8 lines ZipFile.close(): Kill the other struct.pack deprecation warning on Windows. Afraid I can't detect a pattern to when the pack formats decide to use a signed or unsigned format code -- appears nearly arbitrary to my eyes. So I left all the pack formats alone and changed the special-case data values instead. ........ r50997 | skip.montanaro | 2006-07-31 05:09:45 +0200 (Mon, 31 Jul 2006) | 1 line minor tweaks ........ r50998 | skip.montanaro | 2006-07-31 05:11:11 +0200 (Mon, 31 Jul 2006) | 1 line minor tweaks ........ r50999 | andrew.kuchling | 2006-07-31 14:20:24 +0200 (Mon, 31 Jul 2006) | 1 line Add refcounts for PyErr_WarnEx ........ r51000 | andrew.kuchling | 2006-07-31 14:39:05 +0200 (Mon, 31 Jul 2006) | 9 lines Document PyErr_WarnEx. (Bad Neal! No biscuit!) Is the explanation of the 'stacklevel' parameter clear? Please feel free to edit it. I don't have LaTeX installed on this machine, so haven't verified that the markup is correct. Will check tonight, or maybe the automatic doc build will tell me. ........ r51001 | andrew.kuchling | 2006-07-31 14:52:26 +0200 (Mon, 31 Jul 2006) | 1 line Add PyErr_WarnEx() ........ r51002 | andrew.kuchling | 2006-07-31 15:18:27 +0200 (Mon, 31 Jul 2006) | 1 line Mention csv newline changes ........ r51003 | andrew.kuchling | 2006-07-31 17:22:58 +0200 (Mon, 31 Jul 2006) | 1 line Typo fix ........ r51004 | andrew.kuchling | 2006-07-31 17:23:43 +0200 (Mon, 31 Jul 2006) | 1 line Remove reference to notation ........ r51005 | georg.brandl | 2006-07-31 18:00:34 +0200 (Mon, 31 Jul 2006) | 3 lines Fix function name. ........ r51006 | andrew.kuchling | 2006-07-31 18:10:24 +0200 (Mon, 31 Jul 2006) | 1 line [Bug #1514540] Instead of putting the standard types in a section, put them in a chapter of their own. This means string methods will now show up in the ToC. (Should the types come before or after the functions+exceptions+constants chapter? I've put them after, for now.) ........ r51007 | andrew.kuchling | 2006-07-31 18:22:05 +0200 (Mon, 31 Jul 2006) | 1 line [Bug #848556] Remove \d* from second alternative to avoid exponential case when repeating match ........ r51008 | andrew.kuchling | 2006-07-31 18:27:57 +0200 (Mon, 31 Jul 2006) | 1 line Update list of files; fix a typo ........ r51013 | andrew.kuchling | 2006-08-01 18:24:30 +0200 (Tue, 01 Aug 2006) | 1 line typo fix ........ r51018 | thomas.heller | 2006-08-01 18:54:43 +0200 (Tue, 01 Aug 2006) | 2 lines Fix a potential segfault and various potentail refcount leaks in the cast() function. ........ r51020 | thomas.heller | 2006-08-01 19:46:10 +0200 (Tue, 01 Aug 2006) | 1 line Minimal useful docstring for CopyComPointer. ........ r51021 | andrew.kuchling | 2006-08-01 20:16:15 +0200 (Tue, 01 Aug 2006) | 8 lines [Patch #1520905] Attempt to suppress core file created by test_subprocess.py. Patch by Douglas Greiman. The test_run_abort() testcase produces a core file on Unix systems, even though the test is successful. This can be confusing or alarming to someone who runs 'make test' and then finds that the Python interpreter apparently crashed. ........ r51023 | georg.brandl | 2006-08-01 20:49:24 +0200 (Tue, 01 Aug 2006) | 3 lines os.urandom no longer masks unrelated exceptions like SystemExit or KeyboardInterrupt. ........ r51025 | thomas.heller | 2006-08-01 21:14:15 +0200 (Tue, 01 Aug 2006) | 2 lines Speed up PyType_stgdict and PyObject_stgdict. ........ r51027 | ronald.oussoren | 2006-08-01 22:30:31 +0200 (Tue, 01 Aug 2006) | 3 lines Make sure the postinstall action that optionally updates the user's profile on MacOS X actually works correctly in all cases. ........ r51028 | ronald.oussoren | 2006-08-01 23:00:57 +0200 (Tue, 01 Aug 2006) | 4 lines This fixes bug #1527397: PythonLauncher runs scripts with the wrong working directory. It also fixes a bug where PythonLauncher failed to launch scripts when the scriptname (or the path to the script) contains quotes. ........ r51031 | tim.peters | 2006-08-02 05:27:46 +0200 (Wed, 02 Aug 2006) | 2 lines Whitespace normalization. ........ r51032 | tim.peters | 2006-08-02 06:12:36 +0200 (Wed, 02 Aug 2006) | 19 lines Try to squash struct.pack warnings on the "amd64 gentoo trunk" buildbot (& possibly other 64-bit boxes) during test_gzip. The native zlib crc32 function returns an unsigned 32-bit integer, which the Python wrapper implicitly casts to C long. Therefore the same crc can "look negative" on a 32-bit box but "look positive" on a 64-bit box. This patch papers over that platform difference when writing the crc to file. It may be better to change the Python wrapper, either to make the result "look positive" on all platforms (which means it may have to return a Python long at times on a 32-bit box), or to keep the sign the same across boxes. But that would be a visible change in what users see, while the current hack changes no visible behavior (well, apart from stopping the struct deprecation warning). Note that the module-level write32() function is no longer used. ........ r51033 | neal.norwitz | 2006-08-02 06:27:11 +0200 (Wed, 02 Aug 2006) | 4 lines Prevent memory leak on error. Reported by Klocwork #36 ........ r51034 | tim.peters | 2006-08-02 07:20:08 +0200 (Wed, 02 Aug 2006) | 9 lines _Stream.close(): Try to kill struct.pack() warnings when writing the crc to file on the "PPC64 Debian trunk" buildbot when running test_tarfile. This is again a case where the native zlib crc is an unsigned 32-bit int, but the Python wrapper implicitly casts it to signed C long, so that "the sign bit looks different" on different platforms. ........ r51035 | ronald.oussoren | 2006-08-02 08:10:10 +0200 (Wed, 02 Aug 2006) | 2 lines Updated documentation for the script that builds the OSX installer. ........ r51036 | neal.norwitz | 2006-08-02 08:14:22 +0200 (Wed, 02 Aug 2006) | 2 lines _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long. ........ r51037 | neal.norwitz | 2006-08-02 08:15:10 +0200 (Wed, 02 Aug 2006) | 1 line v is already checked for NULL, so just DECREF it ........ r51038 | neal.norwitz | 2006-08-02 08:19:19 +0200 (Wed, 02 Aug 2006) | 1 line Let us know when there was a problem and the child had to kill the parent ........ r51039 | neal.norwitz | 2006-08-02 08:46:21 +0200 (Wed, 02 Aug 2006) | 5 lines Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during a socket operation on a socket with a timeout, the exception will be caught correctly. Previously, the exception was not caught. ........ r51040 | neal.norwitz | 2006-08-02 09:09:32 +0200 (Wed, 02 Aug 2006) | 1 line Add some explanation about Klocwork and Coverity static analysis ........ r51041 | anthony.baxter | 2006-08-02 09:43:09 +0200 (Wed, 02 Aug 2006) | 1 line pre-release machinations ........ r51043 | thomas.heller | 2006-08-02 13:35:31 +0200 (Wed, 02 Aug 2006) | 4 lines A few nore words about what ctypes does. Document that using the wrong calling convention can also raise 'ValueError: Procedure called with the wrong number of arguments'. ........ r51045 | thomas.heller | 2006-08-02 14:00:13 +0200 (Wed, 02 Aug 2006) | 1 line Fix a mistake. ........ r51046 | martin.v.loewis | 2006-08-02 15:53:55 +0200 (Wed, 02 Aug 2006) | 3 lines Correction of patch #1455898: In the mbcs decoder, set final=False for stream decoder, but final=True for the decode function. ........ r51049 | tim.peters | 2006-08-02 20:19:35 +0200 (Wed, 02 Aug 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r51079 | neal.norwitz | 2006-08-04 06:50:21 +0200 (Fri, 04 Aug 2006) | 3 lines Bug #1531405, format_exception no longer raises an exception if str(exception) raised an exception. ........ r51080 | neal.norwitz | 2006-08-04 06:58:47 +0200 (Fri, 04 Aug 2006) | 11 lines Bug #1191458: tracing over for loops now produces a line event on each iteration. I'm not positive this is the best way to handle this. I'm also not sure that there aren't other cases where the lnotab is generated incorrectly. It would be great if people that use pdb or tracing could test heavily. Also: * Remove dead/duplicated code that wasn't used/necessary because we already handled the docstring prior to entering the loop. * add some debugging code into the compiler (#if 0'd out). ........ r51081 | neal.norwitz | 2006-08-04 07:09:28 +0200 (Fri, 04 Aug 2006) | 4 lines Bug #1333982: string/number constants were inappropriately stored in the byte code and co_consts even if they were not used, ie immediately popped off the stack. ........ r51082 | neal.norwitz | 2006-08-04 07:12:19 +0200 (Fri, 04 Aug 2006) | 1 line There were really two issues ........ r51084 | fred.drake | 2006-08-04 07:17:21 +0200 (Fri, 04 Aug 2006) | 1 line SF patch #1534048 (bug #1531003): fix typo in error message ........ r51085 | gregory.p.smith | 2006-08-04 07:17:47 +0200 (Fri, 04 Aug 2006) | 3 lines fix typos ........ r51087 | georg.brandl | 2006-08-04 08:03:53 +0200 (Fri, 04 Aug 2006) | 3 lines Fix bug caused by first decrefing, then increfing. ........ r51109 | neil.schemenauer | 2006-08-04 18:20:30 +0200 (Fri, 04 Aug 2006) | 5 lines Fix the 'compiler' package to generate correct code for MAKE_CLOSURE. In the 2.5 development cycle, MAKE_CLOSURE as changed to take free variables as a tuple rather than as individual items on the stack. Closes patch #1534084. ........ r51110 | georg.brandl | 2006-08-04 20:03:37 +0200 (Fri, 04 Aug 2006) | 3 lines Change fix for segfaulting property(), add a NEWS entry and a test. ........ r51111 | georg.brandl | 2006-08-04 20:07:34 +0200 (Fri, 04 Aug 2006) | 3 lines Better fix for bug #1531405, not executing str(value) twice. ........ r51112 | thomas.heller | 2006-08-04 20:17:40 +0200 (Fri, 04 Aug 2006) | 1 line On Windows, make PyErr_Warn an exported function again. ........ r51113 | thomas.heller | 2006-08-04 20:57:34 +0200 (Fri, 04 Aug 2006) | 4 lines Fix #1530448 - fix ctypes build failure on solaris 10. The '-mimpure-text' linker flag is required when linking _ctypes.so. ........ r51114 | thomas.heller | 2006-08-04 21:49:31 +0200 (Fri, 04 Aug 2006) | 3 lines Fix #1534738: win32 debug version of _msi must be _msi_d.pyd, not _msi.pyd. Fix the name of the pdb file as well. ........ r51115 | andrew.kuchling | 2006-08-04 22:37:43 +0200 (Fri, 04 Aug 2006) | 1 line Typo fixes ........ r51116 | andrew.kuchling | 2006-08-04 23:10:03 +0200 (Fri, 04 Aug 2006) | 1 line Fix mangled sentence ........ r51118 | tim.peters | 2006-08-05 00:00:35 +0200 (Sat, 05 Aug 2006) | 2 lines Whitespace normalization. ........ r51119 | bob.ippolito | 2006-08-05 01:59:21 +0200 (Sat, 05 Aug 2006) | 5 lines Fix #1530559, struct.pack raises TypeError where it used to convert. Passing float arguments to struct.pack when integers are expected now triggers a DeprecationWarning. ........ r51123 | georg.brandl | 2006-08-05 08:10:54 +0200 (Sat, 05 Aug 2006) | 3 lines Patch #1534922: correct and enhance unittest docs. ........ r51126 | georg.brandl | 2006-08-06 09:06:33 +0200 (Sun, 06 Aug 2006) | 2 lines Bug #1535182: really test the xreadlines() method of bz2 objects. ........ r51128 | georg.brandl | 2006-08-06 09:26:21 +0200 (Sun, 06 Aug 2006) | 4 lines Bug #1535081: A leading underscore has been added to the names of the md5 and sha modules, so add it in Modules/Setup.dist too. ........ r51129 | georg.brandl | 2006-08-06 10:23:54 +0200 (Sun, 06 Aug 2006) | 3 lines Bug #1535165: fixed a segfault in input() and raw_input() when sys.stdin is closed. ........ r51131 | georg.brandl | 2006-08-06 11:17:16 +0200 (Sun, 06 Aug 2006) | 2 lines Don't produce output in test_builtin. ........ r51133 | andrew.macintyre | 2006-08-06 14:37:03 +0200 (Sun, 06 Aug 2006) | 4 lines test_threading now skips testing alternate thread stack sizes on platforms that don't support changing thread stack size. ........ r51134 | andrew.kuchling | 2006-08-07 00:07:04 +0200 (Mon, 07 Aug 2006) | 2 lines [Patch #1464056] Ensure that we use the panelw library when linking with ncursesw. Once I see how the buildbots react, I'll backport this to 2.4. ........ r51137 | georg.brandl | 2006-08-08 13:52:34 +0200 (Tue, 08 Aug 2006) | 3 lines webbrowser: Silence stderr output if no gconftool or gnome browser found ........ r51138 | georg.brandl | 2006-08-08 13:56:21 +0200 (Tue, 08 Aug 2006) | 7 lines Remove "non-mapping" and "non-sequence" from TypeErrors raised by PyMapping_Size and PySequence_Size. Because len() tries first sequence, then mapping size, it will always raise a "non-mapping object has no len" error which is confusing. ........ r51139 | thomas.heller | 2006-08-08 19:37:00 +0200 (Tue, 08 Aug 2006) | 3 lines memcmp() can return values other than -1, 0, and +1 but tp_compare must not. ........ r51140 | thomas.heller | 2006-08-08 19:39:20 +0200 (Tue, 08 Aug 2006) | 1 line Remove accidently committed, duplicated test. ........ r51147 | andrew.kuchling | 2006-08-08 20:50:14 +0200 (Tue, 08 Aug 2006) | 1 line Reword paragraph to clarify ........ r51148 | andrew.kuchling | 2006-08-08 20:56:08 +0200 (Tue, 08 Aug 2006) | 1 line Move obmalloc item into C API section ........ r51149 | andrew.kuchling | 2006-08-08 21:00:14 +0200 (Tue, 08 Aug 2006) | 1 line 'Other changes' section now has only one item; move the item elsewhere and remove the section ........ r51150 | andrew.kuchling | 2006-08-08 21:00:34 +0200 (Tue, 08 Aug 2006) | 1 line Bump version number ........ r51151 | georg.brandl | 2006-08-08 22:11:22 +0200 (Tue, 08 Aug 2006) | 2 lines Bug #1536828: typo: TypeType should have been StringType. ........ r51153 | georg.brandl | 2006-08-08 22:13:13 +0200 (Tue, 08 Aug 2006) | 2 lines Bug #1536660: separate two words. ........ r51155 | georg.brandl | 2006-08-08 22:48:10 +0200 (Tue, 08 Aug 2006) | 3 lines ``str`` is now the same object as ``types.StringType``. ........ r51156 | tim.peters | 2006-08-09 02:52:26 +0200 (Wed, 09 Aug 2006) | 2 lines Whitespace normalization. ........ r51158 | georg.brandl | 2006-08-09 09:03:22 +0200 (Wed, 09 Aug 2006) | 4 lines Introduce an upper bound on tuple nesting depth in C argument format strings; fixes rest of #1523610. ........ r51160 | martin.v.loewis | 2006-08-09 09:57:39 +0200 (Wed, 09 Aug 2006) | 4 lines __hash__ may now return long int; the final hash value is obtained by invoking hash on the long int. Fixes #1536021. ........ r51168 | andrew.kuchling | 2006-08-09 15:03:41 +0200 (Wed, 09 Aug 2006) | 1 line [Bug #1536021] Mention __hash__ change ........ r51169 | andrew.kuchling | 2006-08-09 15:57:05 +0200 (Wed, 09 Aug 2006) | 1 line [Patch #1534027] Add notes on locale module changes ........ r51170 | andrew.kuchling | 2006-08-09 16:05:35 +0200 (Wed, 09 Aug 2006) | 1 line Add missing 'self' parameters ........ r51171 | andrew.kuchling | 2006-08-09 16:06:19 +0200 (Wed, 09 Aug 2006) | 1 line Reindent code ........ r51172 | armin.rigo | 2006-08-09 16:55:26 +0200 (Wed, 09 Aug 2006) | 2 lines Fix and test for an infinite C recursion. ........ r51173 | ronald.oussoren | 2006-08-09 16:56:33 +0200 (Wed, 09 Aug 2006) | 2 lines It's unlikely that future versions will require _POSIX_C_SOURCE ........ r51178 | armin.rigo | 2006-08-09 17:37:26 +0200 (Wed, 09 Aug 2006) | 2 lines Concatenation on a long string breaks (SF #1526585). ........ r51180 | kurt.kaiser | 2006-08-09 18:46:15 +0200 (Wed, 09 Aug 2006) | 8 lines 1. When used w/o subprocess, all exceptions were preceeded by an error message claiming they were IDLE internal errors (since 1.2a1). 2. Add Ronald Oussoren to CREDITS M NEWS.txt M PyShell.py M CREDITS.txt ........ r51181 | kurt.kaiser | 2006-08-09 19:47:15 +0200 (Wed, 09 Aug 2006) | 4 lines As a slight enhancement to the previous checkin, improve the internal error reporting by moving message to IDLE console. ........ r51182 | andrew.kuchling | 2006-08-09 20:23:14 +0200 (Wed, 09 Aug 2006) | 1 line Typo fix ........ r51183 | kurt.kaiser | 2006-08-09 22:34:46 +0200 (Wed, 09 Aug 2006) | 2 lines ToggleTab dialog was setting indent to 8 even if cancelled (since 1.2a1). ........ r51184 | martin.v.loewis | 2006-08-10 01:42:18 +0200 (Thu, 10 Aug 2006) | 2 lines Add some commentary on -mimpure-text. ........ r51185 | tim.peters | 2006-08-10 02:58:49 +0200 (Thu, 10 Aug 2006) | 2 lines Add missing svn:eol-style property to text files. ........ r51186 | kurt.kaiser | 2006-08-10 03:41:17 +0200 (Thu, 10 Aug 2006) | 2 lines Changing tokenize (39046) to detect dedent broke tabnanny check (since 1.2a1) ........ r51187 | tim.peters | 2006-08-10 05:01:26 +0200 (Thu, 10 Aug 2006) | 13 lines test_copytree_simple(): This was leaving behind two new temp directories each time it ran, at least on Windows. Several changes: explicitly closed all files; wrapped long lines; stopped suppressing errors when removing a file or directory fails (removing /shouldn't/ fail!); and changed what appeared to be incorrect usage of os.removedirs() (that doesn't remove empty directories at and /under/ the given path, instead it must be given an empty leaf directory and then deletes empty directories moving /up/ the path -- could be that the conceptually simpler shutil.rmtree() was really actually intended here). ........ --- __init__.py | 4 +++- command/bdist_rpm.py | 7 ++++--- command/upload.py | 2 +- msvccompiler.py | 8 +++++--- sysconfig.py | 2 +- unixccompiler.py | 2 +- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/__init__.py b/__init__.py index a1dbb4b5ef..9c60e54690 100644 --- a/__init__.py +++ b/__init__.py @@ -12,4 +12,6 @@ __revision__ = "$Id$" -__version__ = "2.4.0" +import sys +__version__ = "%d.%d.%d" % sys.version_info[:3] +del sys diff --git a/command/bdist_rpm.py b/command/bdist_rpm.py index 738e3f7269..5b09965867 100644 --- a/command/bdist_rpm.py +++ b/command/bdist_rpm.py @@ -467,7 +467,8 @@ def _make_spec_file(self): # rpm scripts # figure out default build script - def_build = "%s setup.py build" % self.python + def_setup_call = "%s %s" % (self.python,os.path.basename(sys.argv[0])) + def_build = "%s build" % def_setup_call if self.use_rpm_opt_flags: def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build @@ -481,9 +482,9 @@ def _make_spec_file(self): ('prep', 'prep_script', "%setup"), ('build', 'build_script', def_build), ('install', 'install_script', - ("%s setup.py install " + ("%s install " "--root=$RPM_BUILD_ROOT " - "--record=INSTALLED_FILES") % self.python), + "--record=INSTALLED_FILES") % def_setup_call), ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), ('verifyscript', 'verify_script', None), ('pre', 'pre_install', None), diff --git a/command/upload.py b/command/upload.py index 4a9ed398a0..67ba080427 100644 --- a/command/upload.py +++ b/command/upload.py @@ -185,7 +185,7 @@ def upload_file(self, command, pyversion, filename): http.endheaders() http.send(body) except socket.error, e: - self.announce(e.msg, log.ERROR) + self.announce(str(e), log.ERROR) return r = http.getresponse() diff --git a/msvccompiler.py b/msvccompiler.py index d24d0ac6e0..0d72837ed3 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -131,8 +131,10 @@ def load_macros(self, version): self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: # raise DistutilsPlatformError, \ - ("The .NET Framework SDK needs to be installed before " - "building extensions for Python.") + ("""Python was built with Visual Studio 2003; +extensions must be built with a compiler than can generate compatible binaries. +Visual Studio 2003 was not found on this system. If you have Cygwin installed, +you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""") p = r"Software\Microsoft\NET Framework Setup\Product" for base in HKEYS: @@ -237,7 +239,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): def initialize(self): self.__paths = [] - if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" diff --git a/sysconfig.py b/sysconfig.py index e1397a1988..76fe256c00 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -512,7 +512,7 @@ def get_config_vars(*args): for key in ('LDFLAGS', 'BASECFLAGS'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) - flags = re.sub('-isysroot [^ \t]* ', ' ', flags) + flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags if args: diff --git a/unixccompiler.py b/unixccompiler.py index 324819d4a5..6cd14f7728 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -78,7 +78,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): try: index = compiler_so.index('-isysroot') # Strip this argument and the next one: - del compiler_so[index:index+1] + del compiler_so[index:index+2] except ValueError: pass From 4c9e5df1bd52b0bad6fcfb2ac599999a00c8f413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Wed, 16 Aug 2006 08:13:26 +0000 Subject: [PATCH 1833/8469] Revert to having static version numbers again. --- __init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 9c60e54690..21d34c767b 100644 --- a/__init__.py +++ b/__init__.py @@ -12,6 +12,12 @@ __revision__ = "$Id$" -import sys -__version__ = "%d.%d.%d" % sys.version_info[:3] -del sys +# Distutils version +# +# Please coordinate with Marc-Andre Lemburg when adding +# new features to distutils that would warrant bumping the version number. +# +# In general, major and minor version should loosely follow the Python +# version number the distutils code was shipped with. +# +__version__ = "2.5.0" From 61e2384194c8c759b122464be8f82c562301a108 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 18 Aug 2006 22:13:04 +0000 Subject: [PATCH 1834/8469] Get rid of dict.has_key(). Boy this has a lot of repercussions! Not all code has been fixed yet; this is just a checkpoint... The C API still has PyDict_HasKey() and _HasKeyString(); not sure if I want to change those just yet. --- archive_util.py | 2 +- ccompiler.py | 2 +- command/build_ext.py | 2 +- core.py | 6 +++--- dist.py | 8 ++++---- fancy_getopt.py | 8 ++++---- sysconfig.py | 22 +++++++++++----------- text_file.py | 4 ++-- util.py | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/archive_util.py b/archive_util.py index b725a14b41..059d5447f6 100644 --- a/archive_util.py +++ b/archive_util.py @@ -124,7 +124,7 @@ def visit (z, dirname, names): def check_archive_formats (formats): for format in formats: - if not ARCHIVE_FORMATS.has_key(format): + if format not in ARCHIVE_FORMATS: return format else: return None diff --git a/ccompiler.py b/ccompiler.py index 1349abeb65..0ed9a40a35 100644 --- a/ccompiler.py +++ b/ccompiler.py @@ -159,7 +159,7 @@ class (via the 'executables' class attribute), but most will have: # basically the same things with Unix C compilers. for key in args.keys(): - if not self.executables.has_key(key): + if key not in self.executables: raise ValueError, \ "unknown executable '%s' for class %s" % \ (key, self.__class__.__name__) diff --git a/command/build_ext.py b/command/build_ext.py index 9626710b0c..cd67544b7a 100644 --- a/command/build_ext.py +++ b/command/build_ext.py @@ -341,7 +341,7 @@ def check_extensions_list (self, extensions): # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') - if build_info.has_key('def_file'): + if 'def_file' in build_info: log.warn("'def_file' element of build info dict " "no longer supported") diff --git a/core.py b/core.py index c9c6f037a7..85a28fe795 100644 --- a/core.py +++ b/core.py @@ -101,9 +101,9 @@ class found in 'cmdclass' is used in place of the default, which is else: klass = Distribution - if not attrs.has_key('script_name'): + if 'script_name' not in attrs: attrs['script_name'] = os.path.basename(sys.argv[0]) - if not attrs.has_key('script_args'): + if 'script_args' not in attrs: attrs['script_args'] = sys.argv[1:] # Create the Distribution instance, using the remaining arguments @@ -111,7 +111,7 @@ class found in 'cmdclass' is used in place of the default, which is try: _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: - if attrs.has_key('name'): + if 'name' not in attrs: raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) else: diff --git a/dist.py b/dist.py index ff49886d97..d098cb9713 100644 --- a/dist.py +++ b/dist.py @@ -239,7 +239,7 @@ def __init__ (self, attrs=None): for (opt, val) in cmd_options.items(): opt_dict[opt] = ("setup script", val) - if attrs.has_key('licence'): + if 'licence' in attrs: attrs['license'] = attrs['licence'] del attrs['licence'] msg = "'licence' distribution option is deprecated; use 'license'" @@ -343,7 +343,7 @@ def find_config_files (self): user_filename = "pydistutils.cfg" # And look for the user config file - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: user_file = os.path.join(os.environ.get('HOME'), user_filename) if os.path.isfile(user_file): files.append(user_file) @@ -388,7 +388,7 @@ def parse_config_files (self, filenames=None): # If there was a "global" section in the config file, use it # to set Distribution options. - if self.command_options.has_key('global'): + if 'global' in self.command_options: for (opt, (src, val)) in self.command_options['global'].items(): alias = self.negative_opt.get(opt) try: @@ -907,7 +907,7 @@ def _set_command_options (self, command_obj, option_dict=None): try: is_string = type(value) is StringType - if neg_opt.has_key(option) and is_string: + if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: setattr(command_obj, option, strtobool(value)) diff --git a/fancy_getopt.py b/fancy_getopt.py index 218ed73f98..31cf0c5c3b 100644 --- a/fancy_getopt.py +++ b/fancy_getopt.py @@ -97,7 +97,7 @@ def set_option_table (self, option_table): self._build_index() def add_option (self, long_option, short_option=None, help_string=None): - if self.option_index.has_key(long_option): + if long_option in self.option_index: raise DistutilsGetoptError, \ "option conflict: already an option '%s'" % long_option else: @@ -109,7 +109,7 @@ def add_option (self, long_option, short_option=None, help_string=None): def has_option (self, long_option): """Return true if the option table for this parser has an option with long name 'long_option'.""" - return self.option_index.has_key(long_option) + return long_option in self.option_index def get_attr_name (self, long_option): """Translate long option name 'long_option' to the form it @@ -121,11 +121,11 @@ def get_attr_name (self, long_option): def _check_alias_dict (self, aliases, what): assert type(aliases) is DictionaryType for (alias, opt) in aliases.items(): - if not self.option_index.has_key(alias): + if alias not in self.option_index: raise DistutilsGetoptError, \ ("invalid %s '%s': " "option '%s' not defined") % (what, alias, alias) - if not self.option_index.has_key(opt): + if opt not in self.option_index: raise DistutilsGetoptError, \ ("invalid %s '%s': " "aliased option '%s' not defined") % (what, alias, opt) diff --git a/sysconfig.py b/sysconfig.py index 76fe256c00..0ea4bb7334 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -150,22 +150,22 @@ def customize_compiler(compiler): get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') - if os.environ.has_key('CC'): + if 'CC' in os.environ: cc = os.environ['CC'] - if os.environ.has_key('CXX'): + if 'CXX' in os.environ: cxx = os.environ['CXX'] - if os.environ.has_key('LDSHARED'): + if 'LDSHARED' in os.environ: ldshared = os.environ['LDSHARED'] - if os.environ.has_key('CPP'): + if 'CPP' in os.environ: cpp = os.environ['CPP'] else: cpp = cc + " -E" # not always - if os.environ.has_key('LDFLAGS'): + if 'LDFLAGS' in os.environ: ldshared = ldshared + ' ' + os.environ['LDFLAGS'] - if os.environ.has_key('CFLAGS'): + if 'CFLAGS' in os.environ: cflags = opt + ' ' + os.environ['CFLAGS'] ldshared = ldshared + ' ' + os.environ['CFLAGS'] - if os.environ.has_key('CPPFLAGS'): + if 'CPPFLAGS' in os.environ: cpp = cpp + ' ' + os.environ['CPPFLAGS'] cflags = cflags + ' ' + os.environ['CPPFLAGS'] ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] @@ -277,12 +277,12 @@ def parse_makefile(fn, g=None): if m: n = m.group(1) found = True - if done.has_key(n): + if n in done: item = str(done[n]) - elif notdone.has_key(n): + elif n in notdone: # get it on a subsequent round found = False - elif os.environ.has_key(n): + elif n in os.environ: # do it like make: fall back to environment item = os.environ[n] else: @@ -366,7 +366,7 @@ def _init_posix(): # MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so # it needs to be compatible. # If it isn't set we set it to the configure-time value - if sys.platform == 'darwin' and g.has_key('MACOSX_DEPLOYMENT_TARGET'): + if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in g: cfg_target = g['MACOSX_DEPLOYMENT_TARGET'] cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '') if cur_target == '': diff --git a/text_file.py b/text_file.py index 67efd65e36..ff2878de1b 100644 --- a/text_file.py +++ b/text_file.py @@ -89,7 +89,7 @@ def __init__ (self, filename=None, file=None, **options): # set values for all options -- either from client option hash # or fallback to default_options for opt in self.default_options.keys(): - if options.has_key (opt): + if opt in options: setattr (self, opt, options[opt]) else: @@ -97,7 +97,7 @@ def __init__ (self, filename=None, file=None, **options): # sanity check client option hash for opt in options.keys(): - if not self.default_options.has_key (opt): + if opt not in self.default_options: raise KeyError, "invalid TextFile option '%s'" % opt if file is None: diff --git a/util.py b/util.py index 1265f4c4e3..1bcda93fe0 100644 --- a/util.py +++ b/util.py @@ -200,11 +200,11 @@ def check_environ (): if _environ_checked: return - if os.name == 'posix' and not os.environ.has_key('HOME'): + if os.name == 'posix' and 'HOME' not in os.environ: import pwd os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] - if not os.environ.has_key('PLAT'): + if 'PLAT' not in os.environ: os.environ['PLAT'] = get_platform() _environ_checked = 1 @@ -222,7 +222,7 @@ def subst_vars (s, local_vars): check_environ() def _subst (match, local_vars=local_vars): var_name = match.group(1) - if local_vars.has_key(var_name): + if var_name in local_vars: return str(local_vars[var_name]) else: return os.environ[var_name] From cacb980ab0e5e233a16ebdcea087b89b2f97f79a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 20 Aug 2006 16:25:10 +0000 Subject: [PATCH 1835/8469] Get rid of a bunch more has_key() uses. We *really* need a tool for this. test_aepack now passes. IDLE still needs to be converted (among others). --- dir_util.py | 2 +- msvccompiler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dir_util.py b/dir_util.py index a4aff58e3d..92f49346f7 100644 --- a/dir_util.py +++ b/dir_util.py @@ -207,7 +207,7 @@ def remove_tree (directory, verbose=0, dry_run=0): cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) - if _path_created.has_key(abspath): + if abspath in _path_created: del _path_created[abspath] except (IOError, OSError), exc: log.warn(grok_environment_error( diff --git a/msvccompiler.py b/msvccompiler.py index 0d72837ed3..9ec3508c76 100644 --- a/msvccompiler.py +++ b/msvccompiler.py @@ -239,7 +239,7 @@ def __init__ (self, verbose=0, dry_run=0, force=0): def initialize(self): self.__paths = [] - if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): + if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" From 75682ad15d892d2159454279c881771f44e2500f Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Mon, 21 Aug 2006 19:07:27 +0000 Subject: [PATCH 1836/8469] Merge current trunk into p3yk. This includes the PyNumber_Index API change, which unfortunately means the errors from the bytes type change somewhat: bytes([300]) still raises a ValueError, but bytes([10**100]) now raises a TypeError (either that, or bytes(1.0) also raises a ValueError -- PyNumber_AsSsize_t() can only raise one type of exception.) Merged revisions 51188-51433 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r51189 | kurt.kaiser | 2006-08-10 19:11:09 +0200 (Thu, 10 Aug 2006) | 4 lines Retrieval of previous shell command was not always preserving indentation since 1.2a1) Patch 1528468 Tal Einat. ........ r51190 | guido.van.rossum | 2006-08-10 19:41:07 +0200 (Thu, 10 Aug 2006) | 3 lines Chris McDonough's patch to defend against certain DoS attacks on FieldStorage. SF bug #1112549. ........ r51191 | guido.van.rossum | 2006-08-10 19:42:50 +0200 (Thu, 10 Aug 2006) | 2 lines News item for SF bug 1112549. ........ r51192 | guido.van.rossum | 2006-08-10 20:09:25 +0200 (Thu, 10 Aug 2006) | 2 lines Fix title -- it's rc1, not beta3. ........ r51194 | martin.v.loewis | 2006-08-10 21:04:00 +0200 (Thu, 10 Aug 2006) | 3 lines Update dangling references to the 3.2 database to mention that this is UCD 4.1 now. ........ r51195 | tim.peters | 2006-08-11 00:45:34 +0200 (Fri, 11 Aug 2006) | 6 lines Followup to bug #1069160. PyThreadState_SetAsyncExc(): internal correctness changes wrt refcount safety and deadlock avoidance. Also added a basic test case (relying on ctypes) and repaired the docs. ........ r51196 | tim.peters | 2006-08-11 00:48:45 +0200 (Fri, 11 Aug 2006) | 2 lines Whitespace normalization. ........ r51197 | tim.peters | 2006-08-11 01:22:13 +0200 (Fri, 11 Aug 2006) | 5 lines Whitespace normalization broke test_cgi, because a line of quoted test data relied on preserving a single trailing blank. Changed the string from raw to regular, and forced in the trailing blank via an explicit \x20 escape. ........ r51198 | tim.peters | 2006-08-11 02:49:01 +0200 (Fri, 11 Aug 2006) | 10 lines test_PyThreadState_SetAsyncExc(): This is failing on some 64-bit boxes. I have no idea what the ctypes docs mean by "integers", and blind-guessing here that it intended to mean the signed C "int" type, in which case perhaps I can repair this by feeding the thread id argument to type ctypes.c_long(). Also made the worker thread daemonic, so it doesn't hang Python shutdown if the test continues to fail. ........ r51199 | tim.peters | 2006-08-11 05:49:10 +0200 (Fri, 11 Aug 2006) | 6 lines force_test_exit(): This has been completely ineffective at stopping test_signal from hanging forever on the Tru64 buildbot. That could be because there's no such thing as signal.SIGALARM. Changed to the idiotic (but standard) signal.SIGALRM instead, and added some more debug output. ........ r51202 | neal.norwitz | 2006-08-11 08:09:41 +0200 (Fri, 11 Aug 2006) | 6 lines Fix the failures on cygwin (2006-08-10 fixed the actual locking issue). The first hunk changes the colon to an ! like other Windows variants. We need to always wait on the child so the lock gets released and no other tests fail. This is the try/finally in the second hunk. ........ r51205 | georg.brandl | 2006-08-11 09:15:38 +0200 (Fri, 11 Aug 2006) | 3 lines Add Chris McDonough (latest cgi.py patch) ........ r51206 | georg.brandl | 2006-08-11 09:26:10 +0200 (Fri, 11 Aug 2006) | 3 lines logging's atexit hook now runs even if the rest of the module has already been cleaned up. ........ r51212 | thomas.wouters | 2006-08-11 17:02:39 +0200 (Fri, 11 Aug 2006) | 4 lines Add ignore of *.pyc and *.pyo to Lib/xml/etree/. ........ r51215 | thomas.heller | 2006-08-11 21:55:35 +0200 (Fri, 11 Aug 2006) | 7 lines When a ctypes C callback function is called, zero out the result storage before converting the result to C data. See the comment in the code for details. Provide a better context for errors when the conversion of a callback function's result cannot be converted. ........ r51218 | neal.norwitz | 2006-08-12 03:43:40 +0200 (Sat, 12 Aug 2006) | 6 lines Klocwork made another run and found a bunch more problems. This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree). ........ r51219 | neal.norwitz | 2006-08-12 03:45:47 +0200 (Sat, 12 Aug 2006) | 9 lines Even though _Py_Mangle() isn't truly public anyone can call it and there was no verification that privateobj was a PyString. If it wasn't a string, this could have allowed a NULL pointer to creep in below and crash. I wonder if this should be PyString_CheckExact? Must identifiers be strings or can they be subclasses? Klocwork #275 ........ r51220 | neal.norwitz | 2006-08-12 03:46:42 +0200 (Sat, 12 Aug 2006) | 5 lines It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222. ........ r51221 | neal.norwitz | 2006-08-12 03:47:59 +0200 (Sat, 12 Aug 2006) | 7 lines This code is actually not used unless WITHOUT_COMPLEX is defined. However, there was no error checking that PyFloat_FromDouble returned a valid pointer. I believe this change is correct as it seemed to follow other code in the area. Klocwork # 292. ........ r51222 | neal.norwitz | 2006-08-12 03:49:12 +0200 (Sat, 12 Aug 2006) | 5 lines Handle NULL nodes while parsing. I'm not entirely sure this is correct. There might be something else that needs to be done to setup the error. Klocwork #295. ........ r51223 | neal.norwitz | 2006-08-12 03:50:38 +0200 (Sat, 12 Aug 2006) | 6 lines If _stat_float_times is false, we will try to INCREF ival which could be NULL. Return early in that case. The caller checks for PyErr_Occurred so this should be ok. Klocwork #297 ........ r51224 | neal.norwitz | 2006-08-12 03:51:12 +0200 (Sat, 12 Aug 2006) | 3 lines Move the assert which checks for a NULL pointer first. Klocwork #274. ........ r51225 | neal.norwitz | 2006-08-12 03:53:28 +0200 (Sat, 12 Aug 2006) | 5 lines Try to handle a malloc failure. I'm not entirely sure this is correct. There might be something else we need to do to handle the exception. Klocwork # 212-213 ........ r51226 | neal.norwitz | 2006-08-12 03:57:47 +0200 (Sat, 12 Aug 2006) | 6 lines I'm not sure why this code allocates this string for the error message. I think it would be better to always use snprintf and have the format limit the size of the name appropriately (like %.200s). Klocwork #340 ........ r51227 | neal.norwitz | 2006-08-12 04:06:34 +0200 (Sat, 12 Aug 2006) | 3 lines Check returned pointer is valid. Klocwork #233 ........ r51228 | neal.norwitz | 2006-08-12 04:12:30 +0200 (Sat, 12 Aug 2006) | 1 line Whoops, how did that get in there. :-) Revert all the parts of 51227 that were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed ........ r51229 | neal.norwitz | 2006-08-12 04:33:36 +0200 (Sat, 12 Aug 2006) | 4 lines Don't deref v if it's NULL. Klocwork #214 ........ r51230 | neal.norwitz | 2006-08-12 05:16:54 +0200 (Sat, 12 Aug 2006) | 5 lines Check return of PyMem_MALLOC (garbage) is non-NULL. Check seq in both portions of if/else. Klocwork #289-290. ........ r51231 | neal.norwitz | 2006-08-12 05:17:41 +0200 (Sat, 12 Aug 2006) | 4 lines PyModule_GetDict() can fail, produce fatal errors if this happens on startup. Klocwork #298-299. ........ r51232 | neal.norwitz | 2006-08-12 05:18:50 +0200 (Sat, 12 Aug 2006) | 5 lines Verify verdat which is returned from malloc is not NULL. Ensure we don't pass NULL to free. Klocwork #306 (at least the first part, checking malloc) ........ r51233 | tim.peters | 2006-08-12 06:42:47 +0200 (Sat, 12 Aug 2006) | 35 lines test_signal: Signal handling on the Tru64 buildbot appears to be utterly insane. Plug some theoretical insecurities in the test script: - Verify that the SIGALRM handler was actually installed. - Don't call alarm() before the handler is installed. - Move everything that can fail inside the try/finally, so the test cleans up after itself more often. - Try sending all the expected signals in force_test_exit(), not just SIGALRM. Since that was fixed to actually send SIGALRM (instead of invisibly dying with an AttributeError), we've seen that sending SIGALRM alone does not stop this from hanging. - Move the "kill the child" business into the finally clause, so the child doesn't survive test failure to send SIGALRM to other tests later (there are also baffling SIGALRM-related failures in test_socket). - Cancel the alarm in the finally clause -- if the test dies early, we again don't want SIGALRM showing up to confuse a later test. Alas, this still relies on timing luck wrt the spawned script that sends the test signals, but it's hard to see how waiting for seconds can so often be so unlucky. test_threadedsignals: curiously, this test never fails on Tru64, but doesn't normally signal SIGALRM. Anyway, fixed an obvious (but probably inconsequential) logic error. ........ r51234 | tim.peters | 2006-08-12 07:17:41 +0200 (Sat, 12 Aug 2006) | 8 lines Ah, fudge. One of the prints here actually "shouldn't be" protected by "if verbose:", which caused the test to fail on all non-Windows boxes. Note that I deliberately didn't convert this to unittest yet, because I expect it would be even harder to debug this on Tru64 after conversion. ........ r51235 | georg.brandl | 2006-08-12 10:32:02 +0200 (Sat, 12 Aug 2006) | 3 lines Repair logging test spew caused by rev. 51206. ........ r51236 | neal.norwitz | 2006-08-12 19:03:09 +0200 (Sat, 12 Aug 2006) | 8 lines Patch #1538606, Patch to fix __index__() clipping. I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible. ........ r51238 | neal.norwitz | 2006-08-12 20:44:06 +0200 (Sat, 12 Aug 2006) | 10 lines Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots were failing due to inappropriate clipping of numbers larger than 2**31 with new-style classes. (typeobject.c) In reviewing the code for classic classes, there were 2 problems. Any negative value return could be returned. Always return -1 if there was an error. Also make the checks similar with the new-style classes. I believe this is correct for 32 and 64 bit boxes, including Windows64. Add a test of classic classes too. ........ r51240 | neal.norwitz | 2006-08-13 02:20:49 +0200 (Sun, 13 Aug 2006) | 1 line SF bug #1539336, distutils example code missing ........ r51245 | neal.norwitz | 2006-08-13 20:10:10 +0200 (Sun, 13 Aug 2006) | 6 lines Move/copy assert for tstate != NULL before first use. Verify that PyEval_Get{Globals,Locals} returned valid pointers. Klocwork 231-232 ........ r51246 | neal.norwitz | 2006-08-13 20:10:28 +0200 (Sun, 13 Aug 2006) | 5 lines Handle a whole lot of failures from PyString_FromInternedString(). Should fix most of Klocwork 234-272. ........ r51247 | neal.norwitz | 2006-08-13 20:10:47 +0200 (Sun, 13 Aug 2006) | 8 lines cpathname could be NULL if it was longer than MAXPATHLEN. Don't try to write the .pyc to NULL. Check results of PyList_GetItem() and PyModule_GetDict() are not NULL. Klocwork 282, 283, 285 ........ r51248 | neal.norwitz | 2006-08-13 20:11:08 +0200 (Sun, 13 Aug 2006) | 6 lines Fix segfault when doing string formatting on subclasses of long if __oct__, __hex__ don't return a string. Klocwork 308 ........ r51250 | neal.norwitz | 2006-08-13 20:11:27 +0200 (Sun, 13 Aug 2006) | 5 lines Check return result of PyModule_GetDict(). Fix a bunch of refleaks in the init of the module. This would only be found when running python -v. ........ r51251 | neal.norwitz | 2006-08-13 20:11:43 +0200 (Sun, 13 Aug 2006) | 5 lines Handle malloc and fopen failures more gracefully. Klocwork 180-181 ........ r51252 | neal.norwitz | 2006-08-13 20:12:03 +0200 (Sun, 13 Aug 2006) | 7 lines It's very unlikely, though possible that source is not a string. Verify that PyString_AsString() returns a valid pointer. (The problem can arise when zlib.decompress doesn't return a string.) Klocwork 346 ........ r51253 | neal.norwitz | 2006-08-13 20:12:26 +0200 (Sun, 13 Aug 2006) | 5 lines Handle failures from lookup. Klocwork 341-342 ........ r51254 | neal.norwitz | 2006-08-13 20:12:45 +0200 (Sun, 13 Aug 2006) | 6 lines Handle failure from PyModule_GetDict() (Klocwork 208). Fix a bunch of refleaks in the init of the module. This would only be found when running python -v. ........ r51255 | neal.norwitz | 2006-08-13 20:13:02 +0200 (Sun, 13 Aug 2006) | 4 lines Really address the issue of where to place the assert for leftblock. (Followup of Klocwork 274) ........ r51256 | neal.norwitz | 2006-08-13 20:13:36 +0200 (Sun, 13 Aug 2006) | 4 lines Handle malloc failure. Klocwork 281 ........ r51258 | neal.norwitz | 2006-08-13 20:40:39 +0200 (Sun, 13 Aug 2006) | 4 lines Handle alloca failures. Klocwork 225-228 ........ r51259 | neal.norwitz | 2006-08-13 20:41:15 +0200 (Sun, 13 Aug 2006) | 1 line Get rid of compiler warning ........ r51261 | neal.norwitz | 2006-08-14 02:51:15 +0200 (Mon, 14 Aug 2006) | 1 line Ignore pgen.exe and kill_python.exe for cygwin ........ r51262 | neal.norwitz | 2006-08-14 02:59:03 +0200 (Mon, 14 Aug 2006) | 4 lines Can't return NULL from a void function. If there is a memory error, about the best we can do is call PyErr_WriteUnraisable and go on. We won't be able to do the call below either, so verify delstr is valid. ........ r51263 | neal.norwitz | 2006-08-14 03:49:54 +0200 (Mon, 14 Aug 2006) | 1 line Update purify doc some. ........ r51264 | thomas.heller | 2006-08-14 09:13:05 +0200 (Mon, 14 Aug 2006) | 2 lines Remove unused, buggy test function. Fixes klockwork issue #207. ........ r51265 | thomas.heller | 2006-08-14 09:14:09 +0200 (Mon, 14 Aug 2006) | 2 lines Check for NULL return value from new_CArgObject(). Fixes klockwork issues #183, #184, #185. ........ r51266 | thomas.heller | 2006-08-14 09:50:14 +0200 (Mon, 14 Aug 2006) | 2 lines Check for NULL return value of GenericCData_new(). Fixes klockwork issues #188, #189. ........ r51274 | thomas.heller | 2006-08-14 12:02:24 +0200 (Mon, 14 Aug 2006) | 2 lines Revert the change that tries to zero out a closure's result storage area because the size if unknown in source/callproc.c. ........ r51276 | marc-andre.lemburg | 2006-08-14 12:55:19 +0200 (Mon, 14 Aug 2006) | 11 lines Slightly revised version of patch #1538956: Replace UnicodeDecodeErrors raised during == and != compares of Unicode and other objects with a new UnicodeWarning. All other comparisons continue to raise exceptions. Exceptions other than UnicodeDecodeErrors are also left untouched. ........ r51277 | thomas.heller | 2006-08-14 13:17:48 +0200 (Mon, 14 Aug 2006) | 13 lines Apply the patch #1532975 plus ideas from the patch #1533481. ctypes instances no longer have the internal and undocumented '_as_parameter_' attribute which was used to adapt them to foreign function calls; this mechanism is replaced by a function pointer in the type's stgdict. In the 'from_param' class methods, try the _as_parameter_ attribute if other conversions are not possible. This makes the documented _as_parameter_ mechanism work as intended. Change the ctypes version number to 1.0.1. ........ r51278 | marc-andre.lemburg | 2006-08-14 13:44:34 +0200 (Mon, 14 Aug 2006) | 3 lines Readd NEWS items that were accidentally removed by r51276. ........ r51279 | georg.brandl | 2006-08-14 14:36:06 +0200 (Mon, 14 Aug 2006) | 3 lines Improve markup in PyUnicode_RichCompare. ........ r51280 | marc-andre.lemburg | 2006-08-14 14:57:27 +0200 (Mon, 14 Aug 2006) | 3 lines Correct an accidentally removed previous patch. ........ r51281 | thomas.heller | 2006-08-14 18:17:41 +0200 (Mon, 14 Aug 2006) | 3 lines Patch #1536908: Add support for AMD64 / OpenBSD. Remove the -no-stack-protector compiler flag for OpenBSD as it has been reported to be unneeded. ........ r51282 | thomas.heller | 2006-08-14 18:20:04 +0200 (Mon, 14 Aug 2006) | 1 line News item for rev 51281. ........ r51283 | georg.brandl | 2006-08-14 22:25:39 +0200 (Mon, 14 Aug 2006) | 3 lines Fix refleak introduced in rev. 51248. ........ r51284 | georg.brandl | 2006-08-14 23:34:08 +0200 (Mon, 14 Aug 2006) | 5 lines Make tabnanny recognize IndentationErrors raised by tokenize. Add a test to test_inspect to make sure indented source is recognized correctly. (fixes #1224621) ........ r51285 | georg.brandl | 2006-08-14 23:42:55 +0200 (Mon, 14 Aug 2006) | 3 lines Patch #1535500: fix segfault in BZ2File.writelines and make sure it raises the correct exceptions. ........ r51287 | georg.brandl | 2006-08-14 23:45:32 +0200 (Mon, 14 Aug 2006) | 3 lines Add an additional test: BZ2File write methods should raise IOError when file is read-only. ........ r51289 | georg.brandl | 2006-08-14 23:55:28 +0200 (Mon, 14 Aug 2006) | 3 lines Patch #1536071: trace.py should now find the full module name of a file correctly even on Windows. ........ r51290 | georg.brandl | 2006-08-15 00:01:24 +0200 (Tue, 15 Aug 2006) | 3 lines Cookie.py shouldn't "bogusly" use string._idmap. ........ r51291 | georg.brandl | 2006-08-15 00:10:24 +0200 (Tue, 15 Aug 2006) | 3 lines Patch #1511317: don't crash on invalid hostname info ........ r51292 | tim.peters | 2006-08-15 02:25:04 +0200 (Tue, 15 Aug 2006) | 2 lines Whitespace normalization. ........ r51293 | neal.norwitz | 2006-08-15 06:14:57 +0200 (Tue, 15 Aug 2006) | 3 lines Georg fixed one of my bugs, so I'll repay him with 2 NEWS entries. Now we're even. :-) ........ r51295 | neal.norwitz | 2006-08-15 06:58:28 +0200 (Tue, 15 Aug 2006) | 8 lines Fix the test for SocketServer so it should pass on cygwin and not fail sporadically on other platforms. This is really a band-aid that doesn't fix the underlying issue in SocketServer. It's not clear if it's worth it to fix SocketServer, however, I opened a bug to track it: http://python.org/sf/1540386 ........ r51296 | neal.norwitz | 2006-08-15 06:59:30 +0200 (Tue, 15 Aug 2006) | 3 lines Update the docstring to use a version a little newer than 1999. This was taken from a Debian patch. Should we update the version for each release? ........ r51298 | neal.norwitz | 2006-08-15 08:29:03 +0200 (Tue, 15 Aug 2006) | 2 lines Subclasses of int/long are allowed to define an __index__. ........ r51300 | thomas.heller | 2006-08-15 15:07:21 +0200 (Tue, 15 Aug 2006) | 1 line Check for NULL return value from new_CArgObject calls. ........ r51303 | kurt.kaiser | 2006-08-16 05:15:26 +0200 (Wed, 16 Aug 2006) | 2 lines The 'with' statement is now a Code Context block opener ........ r51304 | anthony.baxter | 2006-08-16 05:42:26 +0200 (Wed, 16 Aug 2006) | 1 line preparing for 2.5c1 ........ r51305 | anthony.baxter | 2006-08-16 05:58:37 +0200 (Wed, 16 Aug 2006) | 1 line preparing for 2.5c1 - no, really this time ........ r51306 | kurt.kaiser | 2006-08-16 07:01:42 +0200 (Wed, 16 Aug 2006) | 9 lines Patch #1540892: site.py Quitter() class attempts to close sys.stdin before raising SystemExit, allowing IDLE to honor quit() and exit(). M Lib/site.py M Lib/idlelib/PyShell.py M Lib/idlelib/CREDITS.txt M Lib/idlelib/NEWS.txt M Misc/NEWS ........ r51307 | ka-ping.yee | 2006-08-16 09:02:50 +0200 (Wed, 16 Aug 2006) | 6 lines Update code and tests to support the 'bytes_le' attribute (for little-endian byte order on Windows), and to work around clocks with low resolution yielding duplicate UUIDs. Anthony Baxter has approved this change. ........ r51308 | kurt.kaiser | 2006-08-16 09:04:17 +0200 (Wed, 16 Aug 2006) | 2 lines Get quit() and exit() to work cleanly when not using subprocess. ........ r51309 | marc-andre.lemburg | 2006-08-16 10:13:26 +0200 (Wed, 16 Aug 2006) | 2 lines Revert to having static version numbers again. ........ r51310 | martin.v.loewis | 2006-08-16 14:55:10 +0200 (Wed, 16 Aug 2006) | 2 lines Build _hashlib on Windows. Build OpenSSL with masm assembler code. Fixes #1535502. ........ r51311 | thomas.heller | 2006-08-16 15:03:11 +0200 (Wed, 16 Aug 2006) | 6 lines Add commented assert statements to check that the result of PyObject_stgdict() and PyType_stgdict() calls are non-NULL before dereferencing the result. Hopefully this fixes what klocwork is complaining about. Fix a few other nits as well. ........ r51312 | anthony.baxter | 2006-08-16 15:08:25 +0200 (Wed, 16 Aug 2006) | 1 line news entry for 51307 ........ r51313 | andrew.kuchling | 2006-08-16 15:22:20 +0200 (Wed, 16 Aug 2006) | 1 line Add UnicodeWarning ........ r51314 | andrew.kuchling | 2006-08-16 15:41:52 +0200 (Wed, 16 Aug 2006) | 1 line Bump document version to 1.0; remove pystone paragraph ........ r51315 | andrew.kuchling | 2006-08-16 15:51:32 +0200 (Wed, 16 Aug 2006) | 1 line Link to docs; remove an XXX comment ........ r51316 | martin.v.loewis | 2006-08-16 15:58:51 +0200 (Wed, 16 Aug 2006) | 1 line Make cl build step compile-only (/c). Remove libs from source list. ........ r51317 | thomas.heller | 2006-08-16 16:07:44 +0200 (Wed, 16 Aug 2006) | 5 lines The __repr__ method of a NULL py_object does no longer raise an exception. Remove a stray '?' character from the exception text when the value is retrieved of such an object. Includes tests. ........ r51318 | andrew.kuchling | 2006-08-16 16:18:23 +0200 (Wed, 16 Aug 2006) | 1 line Update bug/patch counts ........ r51319 | andrew.kuchling | 2006-08-16 16:21:14 +0200 (Wed, 16 Aug 2006) | 1 line Wording/typo fixes ........ r51320 | thomas.heller | 2006-08-16 17:10:12 +0200 (Wed, 16 Aug 2006) | 9 lines Remove the special casing of Py_None when converting the return value of the Python part of a callback function to C. If it cannot be converted, call PyErr_WriteUnraisable with the exception we got. Before, arbitrary data has been passed to the calling C code in this case. (I'm not really sure the NEWS entry is understandable, but I cannot find better words) ........ r51321 | marc-andre.lemburg | 2006-08-16 18:11:01 +0200 (Wed, 16 Aug 2006) | 2 lines Add NEWS item mentioning the reverted distutils version number patch. ........ r51322 | fredrik.lundh | 2006-08-16 18:47:07 +0200 (Wed, 16 Aug 2006) | 5 lines SF#1534630 ignore data that arrives before the opening start tag ........ r51324 | andrew.kuchling | 2006-08-16 19:11:18 +0200 (Wed, 16 Aug 2006) | 1 line Grammar fix ........ r51328 | thomas.heller | 2006-08-16 20:02:11 +0200 (Wed, 16 Aug 2006) | 12 lines Tutorial: Clarify somewhat how parameters are passed to functions (especially explain what integer means). Correct the table - Python integers and longs can both be used. Further clarification to the table comparing ctypes types, Python types, and C types. Reference: Replace integer by C ``int`` where it makes sense. ........ r51329 | kurt.kaiser | 2006-08-16 23:45:59 +0200 (Wed, 16 Aug 2006) | 8 lines File menu hotkeys: there were three 'p' assignments. Reassign the 'Save Copy As' and 'Print' hotkeys to 'y' and 't'. Change the Shell menu hotkey from 's' to 'l'. M Bindings.py M PyShell.py M NEWS.txt ........ r51330 | neil.schemenauer | 2006-08-17 01:38:05 +0200 (Thu, 17 Aug 2006) | 3 lines Fix a bug in the ``compiler`` package that caused invalid code to be generated for generator expressions. ........ r51342 | martin.v.loewis | 2006-08-17 21:19:32 +0200 (Thu, 17 Aug 2006) | 3 lines Merge 51340 and 51341 from 2.5 branch: Leave tk build directory to restore original path. Invoke debug mk1mf.pl after running Configure. ........ r51354 | martin.v.loewis | 2006-08-18 05:47:18 +0200 (Fri, 18 Aug 2006) | 3 lines Bug #1541863: uuid.uuid1 failed to generate unique identifiers on systems with low clock resolution. ........ r51355 | neal.norwitz | 2006-08-18 05:57:54 +0200 (Fri, 18 Aug 2006) | 1 line Add template for 2.6 on HEAD ........ r51356 | neal.norwitz | 2006-08-18 06:01:38 +0200 (Fri, 18 Aug 2006) | 1 line More post-release wibble ........ r51357 | neal.norwitz | 2006-08-18 06:58:33 +0200 (Fri, 18 Aug 2006) | 1 line Try to get Windows bots working again ........ r51358 | neal.norwitz | 2006-08-18 07:10:00 +0200 (Fri, 18 Aug 2006) | 1 line Try to get Windows bots working again. Take 2 ........ r51359 | neal.norwitz | 2006-08-18 07:39:20 +0200 (Fri, 18 Aug 2006) | 1 line Try to get Unix bots install working again. ........ r51360 | neal.norwitz | 2006-08-18 07:41:46 +0200 (Fri, 18 Aug 2006) | 1 line Set version to 2.6a0, seems more consistent. ........ r51362 | neal.norwitz | 2006-08-18 08:14:52 +0200 (Fri, 18 Aug 2006) | 1 line More version wibble ........ r51364 | georg.brandl | 2006-08-18 09:27:59 +0200 (Fri, 18 Aug 2006) | 4 lines Bug #1541682: Fix example in the "Refcount details" API docs. Additionally, remove a faulty example showing PySequence_SetItem applied to a newly created list object and add notes that this isn't a good idea. ........ r51366 | anthony.baxter | 2006-08-18 09:29:02 +0200 (Fri, 18 Aug 2006) | 3 lines Updating IDLE's version number to match Python's (as per python-dev discussion). ........ r51367 | anthony.baxter | 2006-08-18 09:30:07 +0200 (Fri, 18 Aug 2006) | 1 line RPM specfile updates ........ r51368 | georg.brandl | 2006-08-18 09:35:47 +0200 (Fri, 18 Aug 2006) | 2 lines Typo in tp_clear docs. ........ r51378 | andrew.kuchling | 2006-08-18 15:57:13 +0200 (Fri, 18 Aug 2006) | 1 line Minor edits ........ r51379 | thomas.heller | 2006-08-18 16:38:46 +0200 (Fri, 18 Aug 2006) | 6 lines Add asserts to check for 'impossible' NULL values, with comments. In one place where I'n not 1000% sure about the non-NULL, raise a RuntimeError for safety. This should fix the klocwork issues that Neal sent me. If so, it should be applied to the release25-maint branch also. ........ r51400 | neal.norwitz | 2006-08-19 06:22:33 +0200 (Sat, 19 Aug 2006) | 5 lines Move initialization of interned strings to before allocating the object so we don't leak op. (Fixes an earlier patch to this code) Klockwork #350 ........ r51401 | neal.norwitz | 2006-08-19 06:23:04 +0200 (Sat, 19 Aug 2006) | 4 lines Move assert to after NULL check, otherwise we deref NULL in the assert. Klocwork #307 ........ r51402 | neal.norwitz | 2006-08-19 06:25:29 +0200 (Sat, 19 Aug 2006) | 2 lines SF #1542693: Remove semi-colon at end of PyImport_ImportModuleEx macro ........ r51403 | neal.norwitz | 2006-08-19 06:28:55 +0200 (Sat, 19 Aug 2006) | 6 lines Move initialization to after the asserts for non-NULL values. Klocwork 286-287. (I'm not backporting this, but if someone wants to, feel free.) ........ r51404 | neal.norwitz | 2006-08-19 06:52:03 +0200 (Sat, 19 Aug 2006) | 6 lines Handle PyString_FromInternedString() failing (unlikely, but possible). Klocwork #325 (I'm not backporting this, but if someone wants to, feel free.) ........ r51416 | georg.brandl | 2006-08-20 15:15:39 +0200 (Sun, 20 Aug 2006) | 2 lines Patch #1542948: fix urllib2 header casing issue. With new test. ........ r51428 | jeremy.hylton | 2006-08-21 18:19:37 +0200 (Mon, 21 Aug 2006) | 3 lines Move peephole optimizer to separate file. ........ r51429 | jeremy.hylton | 2006-08-21 18:20:29 +0200 (Mon, 21 Aug 2006) | 2 lines Move peephole optimizer to separate file. (Forgot .h in previous checkin.) ........ r51432 | neal.norwitz | 2006-08-21 19:59:46 +0200 (Mon, 21 Aug 2006) | 5 lines Fix bug #1543303, tarfile adds padding that breaks gunzip. Patch # 1543897. Will backport to 2.5 ........ r51433 | neal.norwitz | 2006-08-21 20:01:30 +0200 (Mon, 21 Aug 2006) | 2 lines Add assert to make Klocwork happy (#276) ........ --- __init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 9c60e54690..21d34c767b 100644 --- a/__init__.py +++ b/__init__.py @@ -12,6 +12,12 @@ __revision__ = "$Id$" -import sys -__version__ = "%d.%d.%d" % sys.version_info[:3] -del sys +# Distutils version +# +# Please coordinate with Marc-Andre Lemburg when adding +# new features to distutils that would warrant bumping the version number. +# +# In general, major and minor version should loosely follow the Python +# version number the distutils code was shipped with. +# +__version__ = "2.5.0" From 6c4f3892adad5878f43e5246f8794c3de5b685e1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 24 Aug 2006 00:41:19 +0000 Subject: [PATCH 1837/8469] Restructure comparison dramatically. There is no longer a default *ordering* between objects; there is only a default equality test (defined by an object being equal to itself only). Read the comment in object.c. The current implementation never uses a three-way comparison to compute a rich comparison, but it does use a rich comparison to compute a three-way comparison. I'm not quite done ripping out all the calls to PyObject_Compare/Cmp, or replacing tp_compare implementations with tp_richcompare implementations; but much of that has happened (to make most unit tests pass). The following tests still fail, because I need help deciding or understanding: test_codeop -- depends on comparing code objects test_datetime -- need Tim Peters' opinion test_marshal -- depends on comparing code objects test_mutants -- need help understanding it The problem with test_codeop and test_marshal is this: these tests compare two different code objects and expect them to be equal. Is that still a feature we'd like to support? I've temporarily removed the comparison and hash code from code objects, so they use the default (equality by pointer only) comparison. For the other two tests, run them to see for yourself. (There may be more failing test with "-u all".) A general problem with getting lots of these tests to pass is the reality that for object types that have a natural total ordering, implementing __cmp__ is much more convenient than implementing __eq__, __ne__, __lt__, and so on. Should we go back to allowing __cmp__ to provide a total ordering? Should we provide some other way to implement rich comparison with a single method override? Alex proposed a __key__() method; I've considered a __richcmp__() method. Or perhaps __cmp__() just shouldn't be killed off... --- version.py | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/version.py b/version.py index 71a5614719..2cd36365e7 100644 --- a/version.py +++ b/version.py @@ -32,7 +32,8 @@ class Version: """Abstract base class for version numbering classes. Just provides constructor (__init__) and reproducer (__repr__), because those - seem to be the same for all version numbering classes. + seem to be the same for all version numbering classes; and route + rich comparisons to __cmp__. """ def __init__ (self, vstring=None): @@ -42,6 +43,42 @@ def __init__ (self, vstring=None): def __repr__ (self): return "%s ('%s')" % (self.__class__.__name__, str(self)) + def __eq__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c == 0 + + def __ne__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c != 0 + + def __lt__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c < 0 + + def __le__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c <= 0 + + def __gt__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c > 0 + + def __ge__(self, other): + c = self.__cmp__(other) + if c is NotImplemented: + return c + return c >= 0 + # Interface for version-number classes -- must be implemented # by the following classes (the concrete ones -- Version should From f4e988990abc4e2e3408af5bf07bb08203347252 Mon Sep 17 00:00:00 2001 From: Alex Martelli Date: Thu, 24 Aug 2006 02:58:11 +0000 Subject: [PATCH 1838/8469] Anna Ravenscroft identified many occurrences of "file" used to open a file in the stdlib and changed each of them to use "open" instead. At this time there are no other known occurrences that can be safely changed (in Lib and all subdirectories thereof). --- sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysconfig.py b/sysconfig.py index 0ea4bb7334..96923bdca4 100644 --- a/sysconfig.py +++ b/sysconfig.py @@ -354,7 +354,7 @@ def _init_posix(): # load the installed pyconfig.h: try: filename = get_config_h_filename() - parse_config_h(file(filename), g) + parse_config_h(open(filename), g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): From e9ab4dbfd784248dbcfc3332f76526872c8e114d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 4 Oct 2006 15:25:28 +0000 Subject: [PATCH 1839/8469] Add MSVC8 project files to create wininst-8.exe. --- command/wininst-8.exe | Bin 0 -> 61440 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 command/wininst-8.exe diff --git a/command/wininst-8.exe b/command/wininst-8.exe new file mode 100644 index 0000000000000000000000000000000000000000..7403bfabf5cc10c13ef2b6a2ea276b4f6d26ff37 GIT binary patch literal 61440 zcmeFa4_Fk}^*=nzF1R4Nt3o6ZlTE~g1T`dRDgl#4SwzF)Dgu&-h_E=U2n1&QlZt^X zq>SUHwl%43ZEC7*ZR@wSiT@Iff)GJt8vjMnn8YM}(;;gcl2AoMGwq_X&Fa``CR>X%SDj10!)cI4;9r;vPFT22a}G1KeLao{@+e8++Rhd9vCBn(?)u0JdcuDx=($QYgX+eoKWeRpQA?3d(zIy-3^!W@`QriLm`|RxuFs{9p0~0@g5JCt46Lz zx}ixN(eQV{lFJ{fvU8qb^&M|(xPMTt$DqEGmv^bfDn|3W(S;hhj%xp17;;_BLm~6i zMEQw={Dda^f|hLgqW5BWR!*)wWfN*AT-uA4O^Kpe9MtA8V;j!p@U?_YH0R`GsbaW# z#@nk(jy_An4=6iQK`U>sQM^qRZK`NR4P}I?svrq;?(X^umAt(!A=IUjP#L0M{~8M4Zf9A@>5>@X)C5=T-!8a}URQpvV~2MJ9D3!XTvae1=0 z#%j)z^UXQAmWJm+wP&)=(eB|~N^us)$&PTz(Jnh8?2_ZC?1=JA=6Q@(a&%Co&l4`W zr2JE9%Gw7}wIipMfukc(IK;&#qtIi*SU}7r z)Nv^b(>Ul*o-j_U5HqlXe`La?MA1rejKWy5l$JS=Uu$?8MjVb27s!X$czoMp?2vNZ zMLSgFrB%()oHwL~eHfJ7(2lF**eEv~We;oRh7R_yRc<(ihb;M*6squL7(b0m372PE z;|_Y2TO`K@FShJz-5!YjeAWMT8v75R_U5^<}mWDnMYB`W|ySHhA zFWjh#YbECn%YjUr@d$FGjmIn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